TableView.TableCell

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class TableView.TableCell

  • java.lang.Object
    • javax.swing.text.View
      • javax.swing.text.CompositeView
        • javax.swing.text.BoxView
          • javax.swing.text.TableView.TableCell
  • All Implemented Interfaces:
    SwingConstants
    Enclosing class:
    TableView
    Deprecated.
    A table cell can now be any View implementation.

    @Deprecated
public class TableView.TableCell
extends BoxView

    • Field Summary

      • Fields inherited from class javax.swing.text.View

        BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

    • Constructor Summary

      Constructors
      Constructor and Description
      TableCell(Element elem)
      Deprecated.
      Constructs a TableCell for the given element.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      int getColumnCount()
      Deprecated.
      Gets the number of columns this cell spans (e.g.
      int getGridColumn()
      Deprecated.
      Gets the column of the grid location
      int getGridRow()
      Deprecated.
      Gets the row of the grid location
      int getRowCount()
      Deprecated.
      Gets the number of rows this cell spans (that is, the grid height).
      void setGridLocation(int row, int col)
      Deprecated.
      Sets the grid location.

      • Methods inherited from class javax.swing.text.BoxView

        baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel

      • Methods inherited from class javax.swing.text.CompositeView

        getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent

      • Methods inherited from class javax.swing.text.View

        append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TableCell

        public TableCell(Element elem)
        Deprecated.
        Constructs a TableCell for the given element.
        Parameters:
        elem - the element that this view is responsible for
        Since:
        1.4

    • Method Detail

      • getColumnCount

        public int getColumnCount()
        Deprecated.
        Gets the number of columns this cell spans (e.g. the grid width).
        Returns:
        the number of columns

      • getRowCount

        public int getRowCount()
        Deprecated.
        Gets the number of rows this cell spans (that is, the grid height).
        Returns:
        the number of rows

      • setGridLocation

        public void setGridLocation(int row,
                            int col)
        Deprecated.
        Sets the grid location.
        Parameters:
        row - the row >= 0
        col - the column >= 0

      • getGridRow

        public int getGridRow()
        Deprecated.
        Gets the row of the grid location

      • getGridColumn

        public int getGridColumn()
        Deprecated.
        Gets the column of the grid location
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TableView.TableRow

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class TableView.TableRow

  • java.lang.Object
    • javax.swing.text.View
      • javax.swing.text.CompositeView
        • javax.swing.text.BoxView
          • javax.swing.text.TableView.TableRow
  • All Implemented Interfaces:
    SwingConstants
    Enclosing class:
    TableView

    public class TableView.TableRow
extends BoxView
    View of a row in a row-centric table.

    • Field Summary

      • Fields inherited from class javax.swing.text.View

        BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

    • Constructor Summary

      Constructors
      Constructor and Description
      TableRow(Element elem)
      Constructs a TableView for the given element.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getResizeWeight(int axis)
      Determines the resizability of the view along the given axis.
      protected View getViewAtPosition(int pos, Rectangle a)
      Fetches the child view that represents the given position in the model.
      protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
      Perform layout for the major axis of the box (i.e.
      protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
      Perform layout for the minor axis of the box (i.e.
      void replace(int offset, int length, View[] views)
      Change the child views.

      • Methods inherited from class javax.swing.text.BoxView

        baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, modelToView, paint, paintChild, preferenceChanged, setAxis, setSize, viewToModel

      • Methods inherited from class javax.swing.text.CompositeView

        getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent

      • Methods inherited from class javax.swing.text.View

        append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TableRow

        public TableRow(Element elem)
        Constructs a TableView for the given element.
        Parameters:
        elem - the element that this view is responsible for
        Since:
        1.4

    • Method Detail

      • replace

        public void replace(int offset,
                    int length,
                    View[] views)
        Change the child views. This is implemented to provide the superclass behavior and invalidate the grid so that rows and columns will be recalculated.
        Overrides:
        replace in class BoxView
        Parameters:
        offset - the starting index into the child views to insert the new views; this should be a value >= 0 and <= getViewCount
        length - the number of existing child views to remove; This should be a value >= 0 and <= (getViewCount() - offset)
        views - the child views to add; this value can be nullto indicate no children are being added (useful to remove)

      • layoutMajorAxis

        protected void layoutMajorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
        Perform layout for the major axis of the box (i.e. the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the major axis.

        This is re-implemented to give each child the span of the column width for the table, and to give cells that span multiple columns the multi-column span.

        Overrides:
        layoutMajorAxis in class BoxView
        Parameters:
        targetSpan - the total span given to the view, which would be used to layout the children.
        axis - the axis being layed out.
        offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
        spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

      • layoutMinorAxis

        protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
        Perform layout for the minor axis of the box (i.e. the axis orthogonal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis. This is called by the superclass whenever the layout needs to be updated along the minor axis.

        This is implemented to delegate to the superclass, then adjust the span for any cell that spans multiple rows.

        Overrides:
        layoutMinorAxis in class BoxView
        Parameters:
        targetSpan - the total span given to the view, which would be used to layout the children.
        axis - the axis being layed out.
        offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
        spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

      • getResizeWeight

        public int getResizeWeight(int axis)
        Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
        Overrides:
        getResizeWeight in class BoxView
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the resize weight
        Throws:
        IllegalArgumentException - for an invalid axis

      • getViewAtPosition

        protected View getViewAtPosition(int pos,
                                 Rectangle a)
        Fetches the child view that represents the given position in the model. This is implemented to walk through the children looking for a range that contains the given position. In this view the children do not necessarily have a one to one mapping with the child elements.
        Overrides:
        getViewAtPosition in class CompositeView
        Parameters:
        pos - the search position >= 0
        a - the allocation to the table on entry, and the allocation of the view containing the position on exit
        Returns:
        the view representing the given position, or null if there isn't one
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TabSet

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class TabSet

  • java.lang.Object
    • javax.swing.text.TabSet
  • All Implemented Interfaces:
    Serializable

    public class TabSet
extends Object
implements Serializable
    A TabSet is comprised of many TabStops. It offers methods for locating the closest TabStop to a given position and finding all the potential TabStops. It is also immutable.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Constructor and Description
      TabSet(TabStop[] tabs)
      Creates and returns an instance of TabSet.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      boolean equals(Object o)
      Indicates whether this TabSet is equal to another one.
      TabStop getTab(int index)
      Returns the TabStop at index index.
      TabStop getTabAfter(float location)
      Returns the Tab instance after location.
      int getTabCount()
      Returns the number of Tab instances the receiver contains.
      int | getTabIndex(TabStop tab)
      int getTabIndexAfter(float location)
      Returns the index of the Tab to be used after location.
      int hashCode()
      Returns a hashcode for this set of TabStops.
      String toString()
      Returns the string representation of the set of tabs.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TabSet

        public TabSet(TabStop[] tabs)
        Creates and returns an instance of TabSet. The array of Tabs passed in must be sorted in ascending order.

    • Method Detail

      • getTabCount

        public int getTabCount()
        Returns the number of Tab instances the receiver contains.

      • getTab

        public TabStop getTab(int index)
        Returns the TabStop at index index. This will throw an IllegalArgumentException if index is outside the range of tabs.

      • getTabAfter

        public TabStop getTabAfter(float location)
        Returns the Tab instance after location. This will return null if there are no tabs after location.

      • getTabIndex

        public int getTabIndex(TabStop tab)
        Returns:
        the index of the TabStop tab, or -1 if tab is not contained in the receiver.

      • getTabIndexAfter

        public int getTabIndexAfter(float location)
        Returns the index of the Tab to be used after location. This will return -1 if there are no tabs after location.

      • equals

        public boolean equals(Object o)
        Indicates whether this TabSet is equal to another one.
        Overrides:
        equals in class Object
        Parameters:
        o - the TabSet instance which this instance should be compared to.
        Returns:
        true if o is the instance of TabSet, has the same number of TabStops and they are all equal, false otherwise.
        Since:
        1.5
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public int hashCode()
        Returns a hashcode for this set of TabStops.
        Overrides:
        hashCode in class Object
        Returns:
        a hashcode value for this set of TabStops.
        Since:
        1.5
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • toString

        public String toString()
        Returns the string representation of the set of tabs.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TabStop

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class TabStop

  • java.lang.Object
    • javax.swing.text.TabStop
  • All Implemented Interfaces:
    Serializable

    public class TabStop
extends Object
implements Serializable
    This class encapsulates a single tab stop (basically as tab stops are thought of by RTF). A tab stop is at a specified distance from the left margin, aligns text in a specified way, and has a specified leader. TabStops are immutable, and usually contained in TabSets.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | ALIGN_BAR
      static int ALIGN_CENTER
      Characters following tab are positioned such that all following characters up to next tab/newline are centered around the tabs location.
      static int ALIGN_DECIMAL
      Characters following tab are aligned such that next decimal/tab/newline is at the tab location, very similar to RIGHT_TAB, just includes decimal as additional character to look for.
      static int ALIGN_LEFT
      Character following tab is positioned at location.
      static int ALIGN_RIGHT
      Characters following tab are positioned such that all following characters up to next tab/newline end at location.
      static int | LEAD_DOTS
      static int | LEAD_EQUALS
      static int | LEAD_HYPHENS
      static int | LEAD_NONE
      static int | LEAD_THICKLINE
      static int | LEAD_UNDERLINE

    • Constructor Summary

      Constructors
      Constructor and Description
      TabStop(float pos)
      Creates a tab at position pos with a default alignment and default leader.
      TabStop(float pos, int align, int leader)
      Creates a tab with the specified position pos, alignment align and leader leader.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean equals(Object other)
      Returns true if the tabs are equal.
      int getAlignment()
      Returns the alignment, as an integer, of the tab.
      int getLeader()
      Returns the leader of the tab.
      float getPosition()
      Returns the position, as a float, of the tab.
      int hashCode()
      Returns the hashCode for the object.
      String toString()
      Returns a string representation of the object.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Field Detail

      • ALIGN_LEFT

        public static final int ALIGN_LEFT
        Character following tab is positioned at location.
        See Also:
        Constant Field Values

      • ALIGN_RIGHT

        public static final int ALIGN_RIGHT
        Characters following tab are positioned such that all following characters up to next tab/newline end at location.
        See Also:
        Constant Field Values

      • ALIGN_CENTER

        public static final int ALIGN_CENTER
        Characters following tab are positioned such that all following characters up to next tab/newline are centered around the tabs location.
        See Also:
        Constant Field Values

      • ALIGN_DECIMAL

        public static final int ALIGN_DECIMAL
        Characters following tab are aligned such that next decimal/tab/newline is at the tab location, very similar to RIGHT_TAB, just includes decimal as additional character to look for.
        See Also:
        Constant Field Values

      • ALIGN_BAR

        public static final int ALIGN_BAR
        See Also:
        Constant Field Values

      • LEAD_NONE

        public static final int LEAD_NONE
        See Also:
        Constant Field Values

      • LEAD_DOTS

        public static final int LEAD_DOTS
        See Also:
        Constant Field Values

      • LEAD_HYPHENS

        public static final int LEAD_HYPHENS
        See Also:
        Constant Field Values

      • LEAD_UNDERLINE

        public static final int LEAD_UNDERLINE
        See Also:
        Constant Field Values

      • LEAD_THICKLINE

        public static final int LEAD_THICKLINE
        See Also:
        Constant Field Values

      • LEAD_EQUALS

        public static final int LEAD_EQUALS
        See Also:
        Constant Field Values

    • Constructor Detail

      • TabStop

        public TabStop(float pos)
        Creates a tab at position pos with a default alignment and default leader.

      • TabStop

        public TabStop(float pos,
               int align,
               int leader)
        Creates a tab with the specified position pos, alignment align and leader leader.

    • Method Detail

      • getPosition

        public float getPosition()
        Returns the position, as a float, of the tab.
        Returns:
        the position of the tab

      • getAlignment

        public int getAlignment()
        Returns the alignment, as an integer, of the tab.
        Returns:
        the alignment of the tab

      • getLeader

        public int getLeader()
        Returns the leader of the tab.
        Returns:
        the leader of the tab

      • equals

        public boolean equals(Object other)
        Returns true if the tabs are equal.
        Overrides:
        equals in class Object
        Parameters:
        other - the reference object with which to compare.
        Returns:
        true if the tabs are equal, otherwise false
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public int hashCode()
        Returns the hashCode for the object. This must be defined here to ensure 100% pure.
        Overrides:
        hashCode in class Object
        Returns:
        the hashCode for the object
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • toString

        public String toString()
        Description copied from class: Object
        Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

        The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

         getClass().getName() + '@' + Integer.toHexString(hashCode())
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TextAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class TextAction

  • java.lang.Object
    • javax.swing.AbstractAction
      • javax.swing.text.TextAction
  • All Implemented Interfaces:
    ActionListener, Serializable, Cloneable, EventListener, Action
    Direct Known Subclasses:
    DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction, StyledEditorKit.StyledTextAction

    public abstract class TextAction
extends AbstractAction
    An Action implementation useful for key bindings that are shared across a number of different text components. Because the action is shared, it must have a way of getting it's target to act upon. This class provides support to try and find a text component to operate on. The preferred way of getting the component to act upon is through the ActionEvent that is received. If the Object returned by getSource can be narrowed to a text component, it will be used. If the action event is null or can't be narrowed, the last focused text component is tried. This is determined by being used in conjunction with a JTextController which arranges to share that information with a TextAction.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled

      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

    • Constructor Summary

      Constructors
      Constructor and Description
      TextAction(String name)
      Creates a new JTextAction object.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      static Action[] augmentList(Action[] list1, Action[] list2)
      Takes one list of commands and augments it with another list of commands.
      protected JTextComponent getFocusedComponent()
      Fetches the text component that currently has focus.
      protected JTextComponent getTextComponent(ActionEvent e)
      Determines the component to use for the action.

      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled

      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface java.awt.event.ActionListener

        actionPerformed

    • Constructor Detail

      • TextAction

        public TextAction(String name)
        Creates a new JTextAction object.
        Parameters:
        name - the name of the action

    • Method Detail

      • getTextComponent

        protected final JTextComponent getTextComponent(ActionEvent e)
        Determines the component to use for the action. This if fetched from the source of the ActionEvent if it's not null and can be narrowed. Otherwise, the last focused component is used.
        Parameters:
        e - the ActionEvent
        Returns:
        the component

      • augmentList

        public static final Action[] augmentList(Action[] list1,
                                         Action[] list2)
        Takes one list of commands and augments it with another list of commands. The second list takes precedence over the first list; that is, when both lists contain a command with the same name, the command from the second list is used.
        Parameters:
        list1 - the first list, may be empty but not null
        list2 - the second list, may be empty but not null
        Returns:
        the augmented list

      • getFocusedComponent

        protected final JTextComponent getFocusedComponent()
        Fetches the text component that currently has focus. This allows actions to be shared across text components which is useful for key-bindings where a large set of actions are defined, but generally used the same way across many different components.
        Returns:
        the component
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Utilities

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class Utilities

  • java.lang.Object
    • javax.swing.text.Utilities

  • public class Utilities
extends Object
    A collection of methods to deal with various text related activities.

    • Constructor Summary

      Constructors
      Constructor and Description
      Utilities()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
      Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
      static int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
      Determine where to break the given text to fit within the given span.
      static int getNextWord(JTextComponent c, int offs)
      Determines the start of the next word for the given location.
      static Element getParagraphElement(JTextComponent c, int offs)
      Determines the element to use for a paragraph/line.
      static int getPositionAbove(JTextComponent c, int offs, int x)
      Determines the position in the model that is closest to the given view location in the row above.
      static int getPositionBelow(JTextComponent c, int offs, int x)
      Determines the position in the model that is closest to the given view location in the row below.
      static int getPreviousWord(JTextComponent c, int offs)
      Determine the start of the prev word for the given location.
      static int getRowEnd(JTextComponent c, int offs)
      Determines the ending row model position of the row that contains the specified model position.
      static int getRowStart(JTextComponent c, int offs)
      Determines the starting row model position of the row that contains the specified model position.
      static int getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
      Determines the relative offset into the given text that best represents the given span in the view coordinate system.
      static int | getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
      static int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset)
      Determines the width of the given segment of text taking tabs into consideration.
      static int getWordEnd(JTextComponent c, int offs)
      Determines the end of a word for the given location.
      static int getWordStart(JTextComponent c, int offs)
      Determines the start of a word for the given model location.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Utilities

        public Utilities()

    • Method Detail

      • drawTabbedText

        public static final int drawTabbedText(Segment s,
                                       int x,
                                       int y,
                                       Graphics g,
                                       TabExpander e,
                                       int startOffset)
        Draws the given text, expanding any tabs that are contained using the given tab expansion technique. This particular implementation renders in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
        Parameters:
        s - the source of the text
        x - the X origin >= 0
        y - the Y origin >= 0
        g - the graphics context
        e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
        startOffset - starting offset of the text in the document >= 0
        Returns:
        the X location at the end of the rendered text

      • getTabbedTextWidth

        public static final int getTabbedTextWidth(Segment s,
                                           FontMetrics metrics,
                                           int x,
                                           TabExpander e,
                                           int startOffset)
        Determines the width of the given segment of text taking tabs into consideration. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
        Parameters:
        s - the source of the text
        metrics - the font metrics to use for the calculation
        x - the X origin >= 0
        e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
        startOffset - starting offset of the text in the document >= 0
        Returns:
        the width of the text

      • getTabbedTextOffset

        public static final int getTabbedTextOffset(Segment s,
                                            FontMetrics metrics,
                                            int x0,
                                            int x,
                                            TabExpander e,
                                            int startOffset)
        Determines the relative offset into the given text that best represents the given span in the view coordinate system. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
        Parameters:
        s - the source of the text
        metrics - the font metrics to use for the calculation
        x0 - the starting view location representing the start of the given text >= 0.
        x - the target view location to translate to an offset into the text >= 0.
        e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
        startOffset - starting offset of the text in the document >= 0
        Returns:
        the offset into the text >= 0

      • getTabbedTextOffset

        public static final int getTabbedTextOffset(Segment s,
                                            FontMetrics metrics,
                                            int x0,
                                            int x,
                                            TabExpander e,
                                            int startOffset,
                                            boolean round)

      • getBreakLocation

        public static final int getBreakLocation(Segment s,
                                         FontMetrics metrics,
                                         int x0,
                                         int x,
                                         TabExpander e,
                                         int startOffset)
        Determine where to break the given text to fit within the given span. This tries to find a word boundary.
        Parameters:
        s - the source of the text
        metrics - the font metrics to use for the calculation
        x0 - the starting view location representing the start of the given text.
        x - the target view location to translate to an offset into the text.
        e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
        startOffset - starting offset in the document of the text
        Returns:
        the offset into the given text

      • getRowStart

        public static final int getRowStart(JTextComponent c,
                                    int offs)
                             throws BadLocationException
        Determines the starting row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
        Throws:
        BadLocationException - if the offset is out of range

      • getRowEnd

        public static final int getRowEnd(JTextComponent c,
                                  int offs)
                           throws BadLocationException
        Determines the ending row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
        Throws:
        BadLocationException - if the offset is out of range

      • getPositionAbove

        public static final int getPositionAbove(JTextComponent c,
                                         int offs,
                                         int x)
                                  throws BadLocationException
        Determines the position in the model that is closest to the given view location in the row above. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        x - the X coordinate >= 0
        Returns:
        the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
        Throws:
        BadLocationException - if the offset is out of range

      • getPositionBelow

        public static final int getPositionBelow(JTextComponent c,
                                         int offs,
                                         int x)
                                  throws BadLocationException
        Determines the position in the model that is closest to the given view location in the row below. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        x - the X coordinate >= 0
        Returns:
        the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
        Throws:
        BadLocationException - if the offset is out of range

      • getWordStart

        public static final int getWordStart(JTextComponent c,
                                     int offs)
                              throws BadLocationException
        Determines the start of a word for the given model location. Uses BreakIterator.getWordInstance() to actually get the words.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the location in the model of the word start >= 0
        Throws:
        BadLocationException - if the offset is out of range

      • getWordEnd

        public static final int getWordEnd(JTextComponent c,
                                   int offs)
                            throws BadLocationException
        Determines the end of a word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the location in the model of the word end >= 0
        Throws:
        BadLocationException - if the offset is out of range

      • getNextWord

        public static final int getNextWord(JTextComponent c,
                                    int offs)
                             throws BadLocationException
        Determines the start of the next word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the location in the model of the word start >= 0
        Throws:
        BadLocationException - if the offset is out of range

      • getPreviousWord

        public static final int getPreviousWord(JTextComponent c,
                                        int offs)
                                 throws BadLocationException
        Determine the start of the prev word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
        Parameters:
        c - the editor
        offs - the offset in the document >= 0
        Returns:
        the location in the model of the word start >= 0
        Throws:
        BadLocationException - if the offset is out of range

      • getParagraphElement

        public static final Element getParagraphElement(JTextComponent c,
                                                int offs)
        Determines the element to use for a paragraph/line.
        Parameters:
        c - the editor
        offs - the starting offset in the document >= 0
        Returns:
        the element
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


View

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class View

  • java.lang.Object
    • javax.swing.text.View
  • All Implemented Interfaces:
    SwingConstants
    Direct Known Subclasses:
    AsyncBoxView, ComponentView, CompositeView, GlyphView, IconView, ImageView, PlainView

    public abstract class View
extends Object
implements SwingConstants

    A very important part of the text package is the View class. As the name suggests it represents a view of the text model, or a piece of the text model. It is this class that is responsible for the look of the text component. The view is not intended to be some completely new thing that one must learn, but rather is much like a lightweight component.

    By default, a view is very light. It contains a reference to the parent view from which it can fetch many things without holding state, and it contains a reference to a portion of the model (Element). A view does not have to exactly represent an element in the model, that is simply a typical and therefore convenient mapping. A view can alternatively maintain a couple of Position objects to maintain its location in the model (i.e. represent a fragment of an element). This is typically the result of formatting where views have been broken down into pieces. The convenience of a substantial relationship to the element makes it easier to build factories to produce the views, and makes it easier to keep track of the view pieces as the model is changed and the view must be changed to reflect the model. Simple views therefore represent an Element directly and complex views do not.

    A view has the following responsibilities:

    Participate in layout.

    The view has a setSize method which is like doLayout and setSize in Component combined. The view has a preferenceChanged method which is like invalidate in Component except that one can invalidate just one axis and the child requesting the change is identified.

    A View expresses the size that it would like to be in terms of three values, a minimum, a preferred, and a maximum span. Layout in a view is can be done independently upon each axis. For a properly functioning View implementation, the minimum span will be <= the preferred span which in turn will be <= the maximum span.

    The above text describes this graphic.

    The minimum set of methods for layout are:

    • getMinimumSpan
    • getPreferredSpan
    • getMaximumSpan
    • getAlignment
    • preferenceChanged
    • setSize

    The setSize method should be prepared to be called a number of times (i.e. It may be called even if the size didn't change). The setSize method is generally called to make sure the View layout is complete prior to trying to perform an operation on it that requires an up-to-date layout. A view's size should always be set to a value within the minimum and maximum span specified by that view. Additionally, the view must always call the preferenceChanged method on the parent if it has changed the values for the layout it would like, and expects the parent to honor. The parent View is not required to recognize a change until the preferenceChanged has been sent. This allows parent View implementations to cache the child requirements if desired. The calling sequence looks something like the following:

    Sample calling sequence between parent view and child view: setSize, getMinimum, getPreferred, getMaximum, getAlignment, setSize

    The exact calling sequence is up to the layout functionality of the parent view (if the view has any children). The view may collect the preferences of the children prior to determining what it will give each child, or it might iteratively update the children one at a time.

    Render a portion of the model.

    This is done in the paint method, which is pretty much like a component paint method. Views are expected to potentially populate a fairly large tree. A View has the following semantics for rendering:

    • The view gets its allocation from the parent at paint time, so it must be prepared to redo layout if the allocated area is different from what it is prepared to deal with.
    • The coordinate system is the same as the hosting Component (i.e. the Component returned by the getContainer method). This means a child view lives in the same coordinate system as the parent view unless the parent has explicitly changed the coordinate system. To schedule itself to be repainted a view can call repaint on the hosting Component.
    • The default is to not clip the children. It is more efficient to allow a view to clip only if it really feels it needs clipping.
    • The Graphics object given is not initialized in any way. A view should set any settings needed.
    • A View is inherently transparent. While a view may render into its entire allocation, typically a view does not. Rendering is performed by traversing down the tree of View implementations. Each View is responsible for rendering its children. This behavior is depended upon for thread safety. While view implementations do not necessarily have to be implemented with thread safety in mind, other view implementations that do make use of concurrency can depend upon a tree traversal to guarantee thread safety.
    • The order of views relative to the model is up to the implementation. Although child views will typically be arranged in the same order that they occur in the model, they may be visually arranged in an entirely different order. View implementations may have Z-Order associated with them if the children are overlapping.

    The methods for rendering are:

    • paint
    Translate between the model and view coordinate systems.

    Because the view objects are produced from a factory and therefore cannot necessarily be counted upon to be in a particular pattern, one must be able to perform translation to properly locate spatial representation of the model. The methods for doing this are:

    • modelToView
    • viewToModel
    • getDocument
    • getElement
    • getStartOffset
    • getEndOffset

    The layout must be valid prior to attempting to make the translation. The translation is not valid, and must not be attempted while changes are being broadcasted from the model via a DocumentEvent.

    Respond to changes from the model.

    If the overall view is represented by many pieces (which is the best situation if one want to be able to change the view and write the least amount of new code), it would be impractical to have a huge number of DocumentListeners. If each view listened to the model, only a few would actually be interested in the changes broadcasted at any given time. Since the model has no knowledge of views, it has no way to filter the broadcast of change information. The view hierarchy itself is instead responsible for propagating the change information. At any level in the view hierarchy, that view knows enough about its children to best distribute the change information further. Changes are therefore broadcasted starting from the root of the view hierarchy. The methods for doing this are:

    • insertUpdate
    • removeUpdate
    • changedUpdate

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int BadBreakWeight
      The weight to indicate a view is a bad break opportunity for the purpose of formatting.
      static int ExcellentBreakWeight
      The weight to indicate a view supports breaking, and this represents a very attractive place to break.
      static int ForcedBreakWeight
      The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats its children by breaking them.
      static int GoodBreakWeight
      The weight to indicate a view supports breaking, but better opportunities probably exist.
      static int X_AXIS
      Axis for format/break operations.
      static int Y_AXIS
      Axis for format/break operations.

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

    • Constructor Summary

      Constructors
      Constructor and Description
      View(Element elem)
      Creates a new View object.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void append(View v)
      Appends a single child view.
      View breakView(int axis, int offset, float pos, float len)
      Tries to break this view on the given axis.
      void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification from the document that attributes were changed in a location that this view is responsible for.
      View createFragment(int p0, int p1)
      Creates a view that represents a portion of the element.
      protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
      Forwards the given DocumentEvent to the child views that need to be notified of the change to the model.
      protected void forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f)
      Forwards the DocumentEvent to the give child view.
      float getAlignment(int axis)
      Determines the desired alignment for this view along an axis.
      AttributeSet getAttributes()
      Fetches the attributes to use when rendering.
      int getBreakWeight(int axis, float pos, float len)
      Determines how attractive a break opportunity in this view is.
      Shape getChildAllocation(int index, Shape a)
      Fetches the allocation for the given child view.
      Container getContainer()
      Fetches the container hosting the view.
      Document getDocument()
      Fetches the model associated with the view.
      Element getElement()
      Fetches the structural portion of the subject that this view is mapped to.
      int getEndOffset()
      Fetches the portion of the model for which this view is responsible.
      Graphics getGraphics()
      Fetch a Graphics for rendering.
      float getMaximumSpan(int axis)
      Determines the maximum span for this view along an axis.
      float getMinimumSpan(int axis)
      Determines the minimum span for this view along an axis.
      int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
      Provides a way to determine the next visually represented model location at which one might place a caret.
      View getParent()
      Returns the parent of the view.
      abstract float getPreferredSpan(int axis)
      Determines the preferred span for this view along an axis.
      int getResizeWeight(int axis)
      Determines the resizability of the view along the given axis.
      int getStartOffset()
      Fetches the portion of the model for which this view is responsible.
      String getToolTipText(float x, float y, Shape allocation)
      Returns the tooltip text at the specified location.
      View getView(int n)
      Gets the nth child view.
      int getViewCount()
      Returns the number of views in this view.
      ViewFactory getViewFactory()
      Fetches the ViewFactory implementation that is feeding the view hierarchy.
      int getViewIndex(float x, float y, Shape allocation)
      Returns the child view index representing the given position in the view.
      int getViewIndex(int pos, Position.Bias b)
      Returns the child view index representing the given position in the model.
      void insert(int offs, View v)
      Inserts a single child view.
      void insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification that something was inserted into the document in a location that this view is responsible for.
      boolean isVisible()
      Returns a boolean that indicates whether the view is visible or not.
      Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
      Provides a mapping, for a given region, from the document model coordinate space to the view coordinate space.
      Shape modelToView(int pos, Shape a)
      Deprecated.
      abstract Shape modelToView(int pos, Shape a, Position.Bias b)
      Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space.
      abstract void paint(Graphics g, Shape allocation)
      Renders using the given rendering surface and area on that surface.
      void preferenceChanged(View child, boolean width, boolean height)
      Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
      void remove(int i)
      Removes one of the children at the given position.
      void removeAll()
      Removes all of the children.
      void removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification that something was removed from the document in a location that this view is responsible for.
      void replace(int offset, int length, View[] views)
      Replaces child views.
      void setParent(View parent)
      Establishes the parent view for this view.
      void setSize(float width, float height)
      Sets the size of the view.
      protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f)
      Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
      protected void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
      Updates the layout in response to receiving notification of change from the model.
      int viewToModel(float x, float y, Shape a)
      Deprecated.
      abstract int viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn)
      Provides a mapping from the view coordinate space to the logical coordinate space of the model.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • BadBreakWeight

        public static final int BadBreakWeight
        The weight to indicate a view is a bad break opportunity for the purpose of formatting. This value indicates that no attempt should be made to break the view into fragments as the view has not been written to support fragmenting.
        See Also:
        getBreakWeight(int, float, float), GoodBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, Constant Field Values

      • GoodBreakWeight

        public static final int GoodBreakWeight
        The weight to indicate a view supports breaking, but better opportunities probably exist.
        See Also:
        getBreakWeight(int, float, float), BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, Constant Field Values

      • ExcellentBreakWeight

        public static final int ExcellentBreakWeight
        The weight to indicate a view supports breaking, and this represents a very attractive place to break.
        See Also:
        getBreakWeight(int, float, float), BadBreakWeight, GoodBreakWeight, ForcedBreakWeight, Constant Field Values

      • ForcedBreakWeight

        public static final int ForcedBreakWeight
        The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats its children by breaking them.
        See Also:
        getBreakWeight(int, float, float), BadBreakWeight, GoodBreakWeight, ExcellentBreakWeight, Constant Field Values

      • X_AXIS

        public static final int X_AXIS
        Axis for format/break operations.
        See Also:
        Constant Field Values

      • Y_AXIS

        public static final int Y_AXIS
        Axis for format/break operations.
        See Also:
        Constant Field Values

    • Constructor Detail

      • View

        public View(Element elem)
        Creates a new View object.
        Parameters:
        elem - the Element to represent

    • Method Detail

      • getParent

        public View getParent()
        Returns the parent of the view.
        Returns:
        the parent, or null if none exists

      • isVisible

        public boolean isVisible()
        Returns a boolean that indicates whether the view is visible or not. By default all views are visible.
        Returns:
        always returns true

      • getPreferredSpan

        public abstract float getPreferredSpan(int axis)
        Determines the preferred span for this view along an axis.
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the span the view would like to be rendered into. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view
        See Also:
        getPreferredSpan(int)

      • getMinimumSpan

        public float getMinimumSpan(int axis)
        Determines the minimum span for this view along an axis.
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the minimum span the view can be rendered into
        See Also:
        getPreferredSpan(int)

      • getMaximumSpan

        public float getMaximumSpan(int axis)
        Determines the maximum span for this view along an axis.
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the maximum span the view can be rendered into
        See Also:
        getPreferredSpan(int)

      • preferenceChanged

        public void preferenceChanged(View child,
                              boolean width,
                              boolean height)
        Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout. By default this just propagates upward to the next parent. The root view will call revalidate on the associated text component.
        Parameters:
        child - the child view
        width - true if the width preference has changed
        height - true if the height preference has changed
        See Also:
        JComponent.revalidate()

      • getAlignment

        public float getAlignment(int axis)
        Determines the desired alignment for this view along an axis. The desired alignment is returned. This should be a value >= 0.0 and <= 1.0, where 0 indicates alignment at the origin and 1.0 indicates alignment to the full span away from the origin. An alignment of 0.5 would be the center of the view.
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the value 0.5

      • paint

        public abstract void paint(Graphics g,
                           Shape allocation)
        Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
        Parameters:
        g - the rendering surface to use
        allocation - the allocated region to render into

      • setParent

        public void setParent(View parent)
        Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly. This is also the last method called, since it is called to indicate the view has been removed from the hierarchy as well. When this method is called to set the parent to null, this method does the same for each of its children, propagating the notification that they have been disconnected from the view tree. If this is reimplemented, super.setParent() should be called.
        Parameters:
        parent - the new parent, or null if the view is being removed from a parent

      • getViewCount

        public int getViewCount()
        Returns the number of views in this view. Since the default is to not be a composite view this returns 0.
        Returns:
        the number of views >= 0
        See Also:
        getViewCount()

      • getView

        public View getView(int n)
        Gets the nth child view. Since there are no children by default, this returns null.
        Parameters:
        n - the number of the view to get, >= 0 && < getViewCount()
        Returns:
        the view

      • removeAll

        public void removeAll()
        Removes all of the children. This is a convenience call to replace.
        Since:
        1.3

      • remove

        public void remove(int i)
        Removes one of the children at the given position. This is a convenience call to replace.
        Since:
        1.3

      • insert

        public void insert(int offs,
                   View v)
        Inserts a single child view. This is a convenience call to replace.
        Parameters:
        offs - the offset of the view to insert before >= 0
        v - the view
        Since:
        1.3
        See Also:
        replace(int, int, javax.swing.text.View[])

      • append

        public void append(View v)
        Appends a single child view. This is a convenience call to replace.
        Parameters:
        v - the view
        Since:
        1.3
        See Also:
        replace(int, int, javax.swing.text.View[])

      • replace

        public void replace(int offset,
                    int length,
                    View[] views)
        Replaces child views. If there are no views to remove this acts as an insert. If there are no views to add this acts as a remove. Views being removed will have the parent set to null, and the internal reference to them removed so that they can be garbage collected. This is implemented to do nothing, because by default a view has no children.
        Parameters:
        offset - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount
        length - the number of existing child views to remove This should be a value >= 0 and <= (getViewCount() - offset).
        views - the child views to add. This value can be null to indicate no children are being added (useful to remove).
        Since:
        1.3

      • getViewIndex

        public int getViewIndex(int pos,
                        Position.Bias b)
        Returns the child view index representing the given position in the model. By default a view has no children so this is implemented to return -1 to indicate there is no valid child index for any position.
        Parameters:
        pos - the position >= 0
        Returns:
        index of the view representing the given position, or -1 if no view represents that position
        Since:
        1.3

      • getChildAllocation

        public Shape getChildAllocation(int index,
                                Shape a)
        Fetches the allocation for the given child view. This enables finding out where various views are located, without assuming how the views store their location. This returns null since the default is to not have any child views.
        Parameters:
        index - the index of the child, >= 0 && < getViewCount()
        a - the allocation to this view
        Returns:
        the allocation to the child

      • getNextVisualPositionFrom

        public int getNextVisualPositionFrom(int pos,
                                     Position.Bias b,
                                     Shape a,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
        Provides a way to determine the next visually represented model location at which one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model. This method enables specifying a position to convert within the range of >=0. If the value is -1, a position will be calculated automatically. If the value < -1, the BadLocationException will be thrown.
        Parameters:
        pos - the position to convert
        a - the allocated region in which to render
        direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This will be one of the following values:
        • SwingConstants.WEST
        • SwingConstants.EAST
        • SwingConstants.NORTH
        • SwingConstants.SOUTH
        Returns:
        the location within the model that best represents the next location visual position
        Throws:
        BadLocationException - the given position is not a valid position within the document
        IllegalArgumentException - if direction doesn't have one of the legal values above

      • modelToView

        public abstract Shape modelToView(int pos,
                                  Shape a,
                                  Position.Bias b)
                           throws BadLocationException
        Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space.
        Parameters:
        pos - the position of the desired character (>=0)
        a - the area of the view, which encompasses the requested character
        b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; b will have one of these values:
        • Position.Bias.Forward
        • Position.Bias.Backward
        Returns:
        the bounding box, in view coordinate space, of the character at the specified position
        Throws:
        BadLocationException - if the specified position does not represent a valid location in the associated document
        IllegalArgumentException - if b is not one of the legal Position.Bias values listed above
        See Also:
        viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

      • modelToView

        public Shape modelToView(int p0,
                         Position.Bias b0,
                         int p1,
                         Position.Bias b1,
                         Shape a)
                  throws BadLocationException
        Provides a mapping, for a given region, from the document model coordinate space to the view coordinate space. The specified region is created as a union of the first and last character positions.
        Parameters:
        p0 - the position of the first character (>=0)
        b0 - the bias of the first character position, toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; b0 will have one of these values:
        • Position.Bias.Forward
        • Position.Bias.Backward
        p1 - the position of the last character (>=0)
        b1 - the bias for the second character position, defined one of the legal values shown above
        a - the area of the view, which encompasses the requested region
        Returns:
        the bounding box which is a union of the region specified by the first and last character positions
        Throws:
        BadLocationException - if the given position does not represent a valid location in the associated document
        IllegalArgumentException - if b0 or b1 are not one of the legal Position.Bias values listed above
        See Also:
        viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

      • viewToModel

        public abstract int viewToModel(float x,
                                float y,
                                Shape a,
                                Position.Bias[] biasReturn)
        Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.
        Parameters:
        x - the X coordinate >= 0
        y - the Y coordinate >= 0
        a - the allocated region in which to render
        Returns:
        the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

      • insertUpdate

        public void insertUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was inserted into the document in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
        1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
        2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
        3. updateLayout is called to give the view a chance to either repair its layout, to reschedule layout, or do nothing.
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • removeUpdate

        public void removeUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was removed from the document in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
        1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
        2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
        3. updateLayout is called to give the view a chance to either repair its layout, to reschedule layout, or do nothing.
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • changedUpdate

        public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
        Gives notification from the document that attributes were changed in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
        1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
        2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
        3. updateLayout is called to give the view a chance to either repair its layout, to reschedule layout, or do nothing.
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • getDocument

        public Document getDocument()
        Fetches the model associated with the view.
        Returns:
        the view model, null if none
        See Also:
        getDocument()

      • getStartOffset

        public int getStartOffset()
        Fetches the portion of the model for which this view is responsible.
        Returns:
        the starting offset into the model >= 0
        See Also:
        getStartOffset()

      • getEndOffset

        public int getEndOffset()
        Fetches the portion of the model for which this view is responsible.
        Returns:
        the ending offset into the model >= 0
        See Also:
        getEndOffset()

      • getElement

        public Element getElement()
        Fetches the structural portion of the subject that this view is mapped to. The view may not be responsible for the entire portion of the element.
        Returns:
        the subject
        See Also:
        getElement()

      • getGraphics

        public Graphics getGraphics()
        Fetch a Graphics for rendering. This can be used to determine font characteristics, and will be different for a print view than a component view.
        Returns:
        a Graphics object for rendering
        Since:
        1.3

      • getAttributes

        public AttributeSet getAttributes()
        Fetches the attributes to use when rendering. By default this simply returns the attributes of the associated element. This method should be used rather than using the element directly to obtain access to the attributes to allow view-specific attributes to be mixed in or to allow the view to have view-specific conversion of attributes by subclasses. Each view should document what attributes it recognizes for the purpose of rendering or layout, and should always access them through the AttributeSet returned by this method.

      • breakView

        public View breakView(int axis,
                      int offset,
                      float pos,
                      float len)
        Tries to break this view on the given axis. This is called by views that try to do formatting of their children. For example, a view of a paragraph will typically try to place its children into row and views representing chunks of text can sometimes be broken down into smaller pieces.

        This is implemented to return the view itself, which represents the default behavior on not being breakable. If the view does support breaking, the starting offset of the view returned should be the given offset, and the end offset should be less than or equal to the end offset of the view being broken.

        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        offset - the location in the document model that a broken fragment would occupy >= 0. This would be the starting offset of the fragment returned
        pos - the position along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations
        len - specifies the distance along the axis where a potential break is desired >= 0
        Returns:
        the fragment of the view that represents the given span, if the view can be broken. If the view doesn't support breaking behavior, the view itself is returned.
        See Also:
        ParagraphView

      • createFragment

        public View createFragment(int p0,
                           int p1)
        Creates a view that represents a portion of the element. This is potentially useful during formatting operations for taking measurements of fragments of the view. If the view doesn't support fragmenting (the default), it should return itself.
        Parameters:
        p0 - the starting offset >= 0. This should be a value greater or equal to the element starting offset and less than the element ending offset.
        p1 - the ending offset > p0. This should be a value less than or equal to the elements end offset and greater than the elements starting offset.
        Returns:
        the view fragment, or itself if the view doesn't support breaking into fragments
        See Also:
        LabelView

      • getBreakWeight

        public int getBreakWeight(int axis,
                          float pos,
                          float len)
        Determines how attractive a break opportunity in this view is. This can be used for determining which view is the most attractive to call breakView on in the process of formatting. A view that represents text that has whitespace in it might be more attractive than a view that has no whitespace, for example. The higher the weight, the more attractive the break. A value equal to or lower than BadBreakWeight should not be considered for a break. A value greater than or equal to ForcedBreakWeight should be broken.

        This is implemented to provide the default behavior of returning BadBreakWeight unless the length is greater than the length of the view in which case the entire view represents the fragment. Unless a view has been written to support breaking behavior, it is not attractive to try and break the view. An example of a view that does support breaking is LabelView. An example of a view that uses break weight is ParagraphView.

        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        pos - the potential location of the start of the broken view >= 0. This may be useful for calculating tab positions
        len - specifies the relative length from pos where a potential break is desired >= 0
        Returns:
        the weight, which should be a value between ForcedBreakWeight and BadBreakWeight
        See Also:
        LabelView, ParagraphView, BadBreakWeight, GoodBreakWeight, ExcellentBreakWeight, ForcedBreakWeight

      • getResizeWeight

        public int getResizeWeight(int axis)
        Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the weight

      • setSize

        public void setSize(float width,
                    float height)
        Sets the size of the view. This should cause layout of the view along the given axis, if it has any layout duties.
        Parameters:
        width - the width >= 0
        height - the height >= 0

      • getContainer

        public Container getContainer()
        Fetches the container hosting the view. This is useful for things like scheduling a repaint, finding out the host components font, etc. The default implementation of this is to forward the query to the parent view.
        Returns:
        the container, null if none

      • getViewFactory

        public ViewFactory getViewFactory()
        Fetches the ViewFactory implementation that is feeding the view hierarchy. Normally the views are given this as an argument to updates from the model when they are most likely to need the factory, but this method serves to provide it at other times.
        Returns:
        the factory, null if none

      • getToolTipText

        public String getToolTipText(float x,
                             float y,
                             Shape allocation)
        Returns the tooltip text at the specified location. The default implementation returns the value from the child View identified by the passed in location.
        Since:
        1.4
        See Also:
        JTextComponent.getToolTipText(java.awt.event.MouseEvent)

      • getViewIndex

        public int getViewIndex(float x,
                        float y,
                        Shape allocation)
        Returns the child view index representing the given position in the view. This iterates over all the children returning the first with a bounds that contains x, y.
        Parameters:
        x - the x coordinate
        y - the y coordinate
        allocation - current allocation of the View.
        Returns:
        index of the view representing the given location, or -1 if no view represents that position
        Since:
        1.4

      • updateChildren

        protected boolean updateChildren(DocumentEvent.ElementChange ec,
                                 DocumentEvent e,
                                 ViewFactory f)
        Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for. This is implemented to assume the child views are directly responsible for the child elements of the element this view represents. The ViewFactory is used to create child views for each element specified as added in the ElementChange, starting at the index specified in the given ElementChange. The number of child views representing the removed elements specified are removed.
        Parameters:
        ec - the change information for the element this view is responsible for. This should not be null if this method gets called
        e - the change information from the associated document
        f - the factory to use to build child views
        Returns:
        whether or not the child views represent the child elements of the element this view is responsible for. Some views create children that represent a portion of the element they are responsible for, and should return false. This information is used to determine if views in the range of the added elements should be forwarded to or not
        Since:
        1.3
        See Also:
        insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • forwardUpdate

        protected void forwardUpdate(DocumentEvent.ElementChange ec,
                             DocumentEvent e,
                             Shape a,
                             ViewFactory f)
        Forwards the given DocumentEvent to the child views that need to be notified of the change to the model. If there were changes to the element this view is responsible for, that should be considered when forwarding (i.e. new child views should not get notified).
        Parameters:
        ec - changes to the element this view is responsible for (may be null if there were no changes).
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        Since:
        1.3
        See Also:
        insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • forwardUpdateToView

        protected void forwardUpdateToView(View v,
                                   DocumentEvent e,
                                   Shape a,
                                   ViewFactory f)
        Forwards the DocumentEvent to the give child view. This simply messages the view with a call to insertUpdate, removeUpdate, or changedUpdate depending upon the type of the event. This is called by forwardUpdate to forward the event to children that need it.
        Parameters:
        v - the child view to forward the event to
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        Since:
        1.3
        See Also:
        forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • updateLayout

        protected void updateLayout(DocumentEvent.ElementChange ec,
                            DocumentEvent e,
                            Shape a)
        Updates the layout in response to receiving notification of change from the model. This is implemented to call preferenceChanged to reschedule a new layout if the ElementChange record is not null.
        Parameters:
        ec - changes to the element this view is responsible for (may be null if there were no changes)
        e - the change information from the associated document
        a - the current allocation of the view
        Since:
        1.3
        See Also:
        insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • modelToView

        @Deprecated
public Shape modelToView(int pos,
                                     Shape a)
                              throws BadLocationException
        Deprecated.
        Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. This is implemented to default the bias to Position.Bias.Forward which was previously implied.
        Parameters:
        pos - the position to convert >= 0
        a - the allocated region in which to render
        Returns:
        the bounding box of the given position is returned
        Throws:
        BadLocationException - if the given position does not represent a valid location in the associated document
        See Also:
        modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

      • viewToModel

        @Deprecated
public int viewToModel(float x,
                                   float y,
                                   Shape a)
        Deprecated.
        Provides a mapping from the view coordinate space to the logical coordinate space of the model.
        Parameters:
        x - the X coordinate >= 0
        y - the Y coordinate >= 0
        a - the allocated region in which to render
        Returns:
        the location within the model that best represents the given point in the view >= 0
        See Also:
        viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ViewFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Interface ViewFactory

  • All Known Implementing Classes:
    BasicEditorPaneUI, BasicFormattedTextFieldUI, BasicPasswordFieldUI, BasicTextAreaUI, BasicTextFieldUI, BasicTextPaneUI, BasicTextUI, DefaultTextUI, HTMLEditorKit.HTMLFactory, MetalTextFieldUI, SynthEditorPaneUI, SynthFormattedTextFieldUI, SynthPasswordFieldUI, SynthTextAreaUI, SynthTextFieldUI, SynthTextPaneUI

    public interface ViewFactory
    A factory to create a view of some portion of document subject. This is intended to enable customization of how views get mapped over a document model.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      View create(Element elem)
      Creates a view from the given structural element of a document.

    • Method Detail

      • create

        View create(Element elem)
        Creates a view from the given structural element of a document.
        Parameters:
        elem - the piece of the document to build a view of
        Returns:
        the view
        See Also:
        View
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrappedPlainView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class WrappedPlainView

  • java.lang.Object
    • javax.swing.text.View
      • javax.swing.text.CompositeView
        • javax.swing.text.BoxView
          • javax.swing.text.WrappedPlainView
  • All Implemented Interfaces:
    SwingConstants, TabExpander

    public class WrappedPlainView
extends BoxView
implements TabExpander
    View of plain text (text with only one font and color) that does line-wrapping. This view expects that its associated element has child elements that represent the lines it should be wrapping. It is implemented as a vertical box that contains logical line views. The logical line views are nested classes that render the logical line as multiple physical line if the logical line is too wide to fit within the allocation. The line views draw upon the outer class for its state to reduce their memory requirements.

    The line views do all of their rendering through the drawLine method which in turn does all of its rendering through the drawSelectedText and drawUnselectedText methods. This enables subclasses to easily specialize the rendering without concern for the layout aspects.

    See Also:
    View

    • Field Summary

      • Fields inherited from class javax.swing.text.View

        BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

    • Constructor Summary

      Constructors
      Constructor and Description
      WrappedPlainView(Element elem)
      Creates a new WrappedPlainView.
      WrappedPlainView(Element elem, boolean wordWrap)
      Creates a new WrappedPlainView.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      protected int calculateBreakPosition(int p0, int p1)
      This is called by the nested wrapped line views to determine the break location.
      void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification from the document that attributes were changed in a location that this view is responsible for.
      protected void drawLine(int p0, int p1, Graphics g, int x, int y)
      Renders a line of text, suppressing whitespace at the end and expanding any tabs.
      protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1)
      Renders the given range in the model as selected text.
      protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
      Renders the given range in the model as normal unselected text.
      protected Segment getLineBuffer()
      Gives access to a buffer that can be used to fetch text from the associated document.
      float getMaximumSpan(int axis)
      Determines the maximum span for this view along an axis.
      float getMinimumSpan(int axis)
      Determines the minimum span for this view along an axis.
      float getPreferredSpan(int axis)
      Determines the preferred span for this view along an axis.
      protected int getTabSize()
      Returns the tab size set for the document, defaulting to 8.
      void insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification that something was inserted into the document in a location that this view is responsible for.
      protected void loadChildren(ViewFactory f)
      Loads all of the children to initialize the view.
      float nextTabStop(float x, int tabOffset)
      Returns the next tab stop position after a given reference position.
      void paint(Graphics g, Shape a)
      Renders using the given rendering surface and area on that surface.
      void removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
      Gives notification that something was removed from the document in a location that this view is responsible for.
      void setSize(float width, float height)
      Sets the size of the view.

      • Methods inherited from class javax.swing.text.BoxView

        baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, viewToModel

      • Methods inherited from class javax.swing.text.CompositeView

        getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, modelToView, setInsets, setParagraphInsets, setParent

      • Methods inherited from class javax.swing.text.View

        append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WrappedPlainView

        public WrappedPlainView(Element elem)
        Creates a new WrappedPlainView. Lines will be wrapped on character boundaries.
        Parameters:
        elem - the element underlying the view

      • WrappedPlainView

        public WrappedPlainView(Element elem,
                        boolean wordWrap)
        Creates a new WrappedPlainView. Lines can be wrapped on either character or word boundaries depending upon the setting of the wordWrap parameter.
        Parameters:
        elem - the element underlying the view
        wordWrap - should lines be wrapped on word boundaries?

    • Method Detail

      • getTabSize

        protected int getTabSize()
        Returns the tab size set for the document, defaulting to 8.
        Returns:
        the tab size

      • drawLine

        protected void drawLine(int p0,
                        int p1,
                        Graphics g,
                        int x,
                        int y)
        Renders a line of text, suppressing whitespace at the end and expanding any tabs. This is implemented to make calls to the methods drawUnselectedText and drawSelectedText so that the way selected and unselected text are rendered can be customized.
        Parameters:
        p0 - the starting document location to use >= 0
        p1 - the ending document location to use >= p1
        g - the graphics context
        x - the starting X position >= 0
        y - the starting Y position >= 0
        See Also:
        drawUnselectedText(java.awt.Graphics, int, int, int, int), drawSelectedText(java.awt.Graphics, int, int, int, int)

      • drawUnselectedText

        protected int drawUnselectedText(Graphics g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws BadLocationException
        Renders the given range in the model as normal unselected text.
        Parameters:
        g - the graphics context
        x - the starting X coordinate >= 0
        y - the starting Y coordinate >= 0
        p0 - the beginning position in the model >= 0
        p1 - the ending position in the model >= p0
        Returns:
        the X location of the end of the range >= 0
        Throws:
        BadLocationException - if the range is invalid

      • drawSelectedText

        protected int drawSelectedText(Graphics g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws BadLocationException
        Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background.
        Parameters:
        g - the graphics context
        x - the starting X coordinate >= 0
        y - the starting Y coordinate >= 0
        p0 - the beginning position in the model >= 0
        p1 - the ending position in the model >= p0
        Returns:
        the location of the end of the range.
        Throws:
        BadLocationException - if the range is invalid

      • getLineBuffer

        protected final Segment getLineBuffer()
        Gives access to a buffer that can be used to fetch text from the associated document.
        Returns:
        the buffer

      • calculateBreakPosition

        protected int calculateBreakPosition(int p0,
                                     int p1)
        This is called by the nested wrapped line views to determine the break location. This can be reimplemented to alter the breaking behavior. It will either break at word or character boundaries depending upon the break argument given at construction.

      • loadChildren

        protected void loadChildren(ViewFactory f)
        Loads all of the children to initialize the view. This is called by the setParent method. Subclasses can reimplement this to initialize their child views in a different manner. The default implementation creates a child view for each child element.
        Overrides:
        loadChildren in class CompositeView
        Parameters:
        f - the view factory
        See Also:
        CompositeView.setParent(javax.swing.text.View)

      • nextTabStop

        public float nextTabStop(float x,
                         int tabOffset)
        Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.
        Specified by:
        nextTabStop in interface TabExpander
        Parameters:
        x - the current position >= 0
        tabOffset - the position within the text stream that the tab occurred at >= 0.
        Returns:
        the tab stop, measured in points >= 0

      • paint

        public void paint(Graphics g,
                  Shape a)
        Renders using the given rendering surface and area on that surface. This is implemented to stash the selection positions, selection colors, and font metrics for the nested lines to use.
        Overrides:
        paint in class BoxView
        Parameters:
        g - the rendering surface to use
        a - the allocated region to render into
        See Also:
        View.paint(java.awt.Graphics, java.awt.Shape)

      • setSize

        public void setSize(float width,
                    float height)
        Sets the size of the view. This should cause layout of the view along the given axis, if it has any layout duties.
        Overrides:
        setSize in class BoxView
        Parameters:
        width - the width >= 0
        height - the height >= 0

      • getPreferredSpan

        public float getPreferredSpan(int axis)
        Determines the preferred span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
        Overrides:
        getPreferredSpan in class BoxView
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the span the view would like to be rendered into. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.
        See Also:
        View.getPreferredSpan(int)

      • getMinimumSpan

        public float getMinimumSpan(int axis)
        Determines the minimum span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
        Overrides:
        getMinimumSpan in class BoxView
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the span the view would like to be rendered into. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.
        See Also:
        View.getMinimumSpan(int)

      • getMaximumSpan

        public float getMaximumSpan(int axis)
        Determines the maximum span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
        Overrides:
        getMaximumSpan in class BoxView
        Parameters:
        axis - may be either View.X_AXIS or View.Y_AXIS
        Returns:
        the span the view would like to be rendered into. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.
        See Also:
        View.getMaximumSpan(int)

      • insertUpdate

        public void insertUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was inserted into the document in a location that this view is responsible for. This is implemented to simply update the children.
        Overrides:
        insertUpdate in class View
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • removeUpdate

        public void removeUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was removed from the document in a location that this view is responsible for. This is implemented to simply update the children.
        Overrides:
        removeUpdate in class View
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • changedUpdate

        public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
        Gives notification from the document that attributes were changed in a location that this view is responsible for.
        Overrides:
        changedUpdate in class View
        Parameters:
        e - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ZoneView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.text

Class ZoneView

  • java.lang.Object
    • javax.swing.text.View
      • javax.swing.text.CompositeView
        • javax.swing.text.BoxView
          • javax.swing.text.ZoneView
  • All Implemented Interfaces:
    SwingConstants

    public class ZoneView
extends BoxView
    ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations. This enables a substantial reduction in memory consumption for situations where the model being represented is very large, by building view objects only for the region being actively viewed/edited. The size of the children can be estimated in some way, or calculated asynchronously with only the result being saved.

    ZoneView extends BoxView to provide a box that implements zones for its children. The zones are special View implementations (the children of an instance of this class) that represent only a portion of the model that an instance of ZoneView is responsible for. The zones don't create child views until an attempt is made to display them. A box shaped view is well suited to this because:

    • Boxes are a heavily used view, and having a box that provides this behavior gives substantial opportunity to plug the behavior into a view hierarchy from the view factory.
    • Boxes are tiled in one direction, so it is easy to divide them into zones in a reliable way.
    • Boxes typically have a simple relationship to the model (i.e. they create child views that directly represent the child elements).
    • Boxes are easier to estimate the size of than some other shapes.

    The default behavior is controlled by two properties, maxZoneSize and maxZonesLoaded. Setting maxZoneSize to Integer.MAX_VALUE would have the effect of causing only one zone to be created. This would effectively turn the view into an implementation of the decorator pattern. Setting maxZonesLoaded to a value of Integer.MAX_VALUE would cause zones to never be unloaded. For simplicity, zones are created on boundaries represented by the child elements of the element the view is responsible for. The zones can be any View implementation, but the default implementation is based upon AsyncBoxView which supports fairly large zones efficiently.

    Since:
    1.3
    See Also:
    View

    • Field Summary

      • Fields inherited from class javax.swing.text.View

        BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

    • Constructor Summary

      Constructors
      Constructor and Description
      ZoneView(Element elem, int axis)
      Constructs a ZoneView.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      protected View createZone(int p0, int p1)
      Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility).
      int getMaximumZoneSize()
      Get the current maximum zone size.
      int getMaxZonesLoaded()
      Get the current setting of the number of zones allowed to be loaded at the same time.
      protected int getViewIndexAtPosition(int pos)
      Returns the child view index representing the given position in the model.
      void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
      Gives notification that something was inserted into the document in a location that this view is responsible for.
      protected boolean isZoneLoaded(View zone)
      Determine if a zone is in the loaded state.
      protected void loadChildren(ViewFactory f)
      Loads all of the children to initialize the view.
      void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
      Gives notification that something was removed from the document in a location that this view is responsible for.
      void setMaximumZoneSize(int size)
      Set the desired maximum zone size.
      void setMaxZonesLoaded(int mzl)
      Sets the current setting of the number of zones allowed to be loaded at the same time.
      protected void unloadZone(View zone)
      Unload a zone (Convert the zone to its memory saving state).
      protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f)
      The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.
      protected void zoneWasLoaded(View zone)
      Called by a zone when it gets loaded.

      • Methods inherited from class javax.swing.text.BoxView

        baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel

      • Methods inherited from class javax.swing.text.CompositeView

        getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent

      • Methods inherited from class javax.swing.text.View

        append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateLayout, viewToModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ZoneView

        public ZoneView(Element elem,
                int axis)
        Constructs a ZoneView.
        Parameters:
        elem - the element this view is responsible for
        axis - either View.X_AXIS or View.Y_AXIS

    • Method Detail

      • getMaximumZoneSize

        public int getMaximumZoneSize()
        Get the current maximum zone size.

      • setMaximumZoneSize

        public void setMaximumZoneSize(int size)
        Set the desired maximum zone size. A zone may get larger than this size if a single child view is larger than this size since zones are formed on child view boundaries.
        Parameters:
        size - the number of characters the zone may represent before attempting to break the zone into a smaller size.

      • getMaxZonesLoaded

        public int getMaxZonesLoaded()
        Get the current setting of the number of zones allowed to be loaded at the same time.

      • setMaxZonesLoaded

        public void setMaxZonesLoaded(int mzl)
        Sets the current setting of the number of zones allowed to be loaded at the same time. This will throw an IllegalArgumentException if mzl is less than 1.
        Parameters:
        mzl - the desired maximum number of zones to be actively loaded, must be greater than 0
        Throws:
        IllegalArgumentException - if mzl is < 1

      • zoneWasLoaded

        protected void zoneWasLoaded(View zone)
        Called by a zone when it gets loaded. This happens when an attempt is made to display or perform a model/view translation on a zone that was in an unloaded state. This is implemented to check if the maximum number of zones was reached and to unload the oldest zone if so.
        Parameters:
        zone - the child view that was just loaded.

      • unloadZone

        protected void unloadZone(View zone)
        Unload a zone (Convert the zone to its memory saving state). The zones are expected to represent a subset of the child elements of the element this view is responsible for. Therefore, the default implementation is to simple remove all the children.
        Parameters:
        zone - the child view desired to be set to an unloaded state.

      • isZoneLoaded

        protected boolean isZoneLoaded(View zone)
        Determine if a zone is in the loaded state. The zones are expected to represent a subset of the child elements of the element this view is responsible for. Therefore, the default implementation is to return true if the view has children.

      • createZone

        protected View createZone(int p0,
                          int p1)
        Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility). This is called by the zone management logic to create new zones. Subclasses can provide a different implementation for a zone by changing this method.
        Parameters:
        p0 - the start of the desired zone. This should be >= getStartOffset() and < getEndOffset(). This value should also be < p1.
        p1 - the end of the desired zone. This should be > getStartOffset() and <= getEndOffset(). This value should also be > p0.

      • loadChildren

        protected void loadChildren(ViewFactory f)
        Loads all of the children to initialize the view. This is called by the setParent method. This is reimplemented to not load any children directly (as they are created by the zones). This method creates the initial set of zones. Zones don't actually get populated however until an attempt is made to display them or to do model/view coordinate translation.
        Overrides:
        loadChildren in class CompositeView
        Parameters:
        f - the view factory
        See Also:
        CompositeView.setParent(javax.swing.text.View)

      • getViewIndexAtPosition

        protected int getViewIndexAtPosition(int pos)
        Returns the child view index representing the given position in the model.
        Overrides:
        getViewIndexAtPosition in class CompositeView
        Parameters:
        pos - the position >= 0
        Returns:
        index of the view representing the given position, or -1 if no view represents that position

      • updateChildren

        protected boolean updateChildren(DocumentEvent.ElementChange ec,
                                 DocumentEvent e,
                                 ViewFactory f)
        The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element. This is reimplemented to do nothing and return false.
        Overrides:
        updateChildren in class View
        Parameters:
        ec - the change information for the element this view is responsible for. This should not be null if this method gets called
        e - the change information from the associated document
        f - the factory to use to build child views
        Returns:
        whether or not the child views represent the child elements of the element this view is responsible for. Some views create children that represent a portion of the element they are responsible for, and should return false. This information is used to determine if views in the range of the added elements should be forwarded to or not
        See Also:
        View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • insertUpdate

        public void insertUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was inserted into the document in a location that this view is responsible for. This is largely delegated to the superclass, but is reimplemented to update the relevant zone (i.e. determine if a zone needs to be split into a set of 2 or more zones).
        Overrides:
        insertUpdate in class View
        Parameters:
        changes - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

      • removeUpdate

        public void removeUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
        Gives notification that something was removed from the document in a location that this view is responsible for. This is largely delegated to the superclass, but is reimplemented to update the relevant zones (i.e. determine if zones need to be removed or joined with another zone).
        Overrides:
        removeUpdate in class View
        Parameters:
        changes - the change information from the associated document
        a - the current allocation of the view
        f - the factory to use to rebuild if the view has children
        See Also:
        View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Timer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class Timer

  • java.lang.Object
    • javax.swing.Timer
  • All Implemented Interfaces:
    Serializable

    public class Timer
extends Object
implements Serializable
    Fires one or more ActionEvents at specified intervals. An example use is an animation object that uses a Timer as the trigger for drawing its frames.

    Setting up a timer involves creating a Timer object, registering one or more action listeners on it, and starting the timer using the start method. For example, the following code creates and starts a timer that fires an action event once per second (as specified by the first argument to the Timer constructor). The second argument to the Timer constructor specifies a listener to receive the timer's action events.

      int delay = 1000; //milliseconds
  ActionListener taskPerformer = new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
          //...Perform a task...
      }
  };
  new Timer(delay, taskPerformer).start();

    Timers are constructed by specifying both a delay parameter and an ActionListener. The delay parameter is used to set both the initial delay and the delay between event firing, in milliseconds. Once the timer has been started, it waits for the initial delay before firing its first ActionEvent to registered listeners. After this first event, it continues to fire events every time the between-event delay has elapsed, until it is stopped.

    After construction, the initial delay and the between-event delay can be changed independently, and additional ActionListeners may be added.

    If you want the timer to fire only the first time and then stop, invoke setRepeats(false) on the timer.

    Although all Timers perform their waiting using a single, shared thread (created by the first Timer object that executes), the action event handlers for Timers execute on another thread -- the event-dispatching thread. This means that the action handlers for Timers can safely perform operations on Swing components. However, it also means that the handlers must execute quickly to keep the GUI responsive.

    In v 1.3, another Timer class was added to the Java platform: java.util.Timer. Both it and javax.swing.Timer provide the same basic functionality, but java.util.Timer is more general and has more features. The javax.swing.Timer has two features that can make it a little easier to use with GUIs. First, its event handling metaphor is familiar to GUI programmers and can make dealing with the event-dispatching thread a bit simpler. Second, its automatic thread sharing means that you don't have to take special steps to avoid spawning too many threads. Instead, your timer uses the same thread used to make cursors blink, tool tips appear, and so on.

    You can find further documentation and several examples of using timers by visiting How to Use Timers, a section in The Java Tutorial. For more examples and help in choosing between this Timer class and java.util.Timer, see Using Timers in Swing Applications, an article in The Swing Connection.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    java.util.Timer

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected EventListenerList | listenerList

    • Constructor Summary

      Constructors
      Constructor and Description
      Timer(int delay, ActionListener listener)
      Creates a Timer and initializes both the initial delay and between-event delay to delay milliseconds.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addActionListener(ActionListener listener)
      Adds an action listener to the Timer.
      protected void fireActionPerformed(ActionEvent e)
      Notifies all listeners that have registered interest for notification on this event type.
      String getActionCommand()
      Returns the string that will be delivered as the action command in ActionEvents fired by this timer.
      ActionListener[] getActionListeners()
      Returns an array of all the action listeners registered on this timer.
      int getDelay()
      Returns the delay, in milliseconds, between firings of action events.
      int getInitialDelay()
      Returns the Timer's initial delay.
      <T extends EventListener>
      T[]             		getListeners(Class<T> listenerType)
      Returns an array of all the objects currently registered as FooListeners upon this Timer.
      static boolean getLogTimers()
      Returns true if logging is enabled.
      boolean isCoalesce()
      Returns true if the Timer coalesces multiple pending action events.
      boolean isRepeats()
      Returns true (the default) if the Timer will send an action event to its listeners multiple times.
      boolean isRunning()
      Returns true if the Timer is running.
      void removeActionListener(ActionListener listener)
      Removes the specified action listener from the Timer.
      void restart()
      Restarts the Timer, canceling any pending firings and causing it to fire with its initial delay.
      void setActionCommand(String command)
      Sets the string that will be delivered as the action command in ActionEvents fired by this timer.
      void setCoalesce(boolean flag)
      Sets whether the Timer coalesces multiple pending ActionEvent firings.
      void setDelay(int delay)
      Sets the Timer's between-event delay, the number of milliseconds between successive action events.
      void setInitialDelay(int initialDelay)
      Sets the Timer's initial delay, the time in milliseconds to wait after the timer is started before firing the first event.
      static void setLogTimers(boolean flag)
      Enables or disables the timer log.
      void setRepeats(boolean flag)
      If flag is false, instructs the Timer to send only one action event to its listeners.
      void start()
      Starts the Timer, causing it to start sending action events to its listeners.
      void stop()
      Stops the Timer, causing it to stop sending action events to its listeners.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • listenerList

        protected EventListenerList listenerList

    • Constructor Detail

      • Timer

        public Timer(int delay,
             ActionListener listener)
        Creates a Timer and initializes both the initial delay and between-event delay to delay milliseconds. If delay is less than or equal to zero, the timer fires as soon as it is started. If listener is not null, it's registered as an action listener on the timer.
        Parameters:
        delay - milliseconds for the initial and between-event delay
        listener - an initial listener; can be null
        See Also:
        addActionListener(java.awt.event.ActionListener), setInitialDelay(int), setRepeats(boolean)

    • Method Detail

      • addActionListener

        public void addActionListener(ActionListener listener)
        Adds an action listener to the Timer.
        Parameters:
        listener - the listener to add
        See Also:
        Timer(int, java.awt.event.ActionListener)

      • removeActionListener

        public void removeActionListener(ActionListener listener)
        Removes the specified action listener from the Timer.
        Parameters:
        listener - the listener to remove

      • getActionListeners

        public ActionListener[] getActionListeners()
        Returns an array of all the action listeners registered on this timer.
        Returns:
        all of the timer's ActionListeners or an empty array if no action listeners are currently registered
        Since:
        1.4
        See Also:
        addActionListener(java.awt.event.ActionListener), removeActionListener(java.awt.event.ActionListener)

      • fireActionPerformed

        protected void fireActionPerformed(ActionEvent e)
        Notifies all listeners that have registered interest for notification on this event type.
        Parameters:
        e - the action event to fire
        See Also:
        EventListenerList

      • getListeners

        public <T extends EventListener> T[] getListeners(Class<T> listenerType)
        Returns an array of all the objects currently registered as FooListeners upon this Timer. FooListeners are registered using the addFooListener method.

        You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a Timer instance t for its action listeners with the following code:

        ActionListener[] als = (ActionListener[])(t.getListeners(ActionListener.class));
        If no such listeners exist, this method returns an empty array.
        Parameters:
        listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
        Returns:
        an array of all objects registered as FooListeners on this timer, or an empty array if no such listeners have been added
        Throws:
        ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
        Since:
        1.3
        See Also:
        getActionListeners(),
addActionListener(java.awt.event.ActionListener),
removeActionListener(java.awt.event.ActionListener)

      • setLogTimers

        public static void setLogTimers(boolean flag)
        Enables or disables the timer log. When enabled, a message is posted to System.out whenever the timer goes off.
        Parameters:
        flag - true to enable logging
        See Also:
        getLogTimers()

      • getLogTimers

        public static boolean getLogTimers()
        Returns true if logging is enabled.
        Returns:
        true if logging is enabled; otherwise, false
        See Also:
        setLogTimers(boolean)

      • setDelay

        public void setDelay(int delay)
        Sets the Timer's between-event delay, the number of milliseconds between successive action events. This does not affect the initial delay property, which can be set by the setInitialDelay method.
        Parameters:
        delay - the delay in milliseconds
        See Also:
        setInitialDelay(int)

      • getDelay

        public int getDelay()
        Returns the delay, in milliseconds, between firings of action events.
        See Also:
        setDelay(int), getInitialDelay()

      • setInitialDelay

        public void setInitialDelay(int initialDelay)
        Sets the Timer's initial delay, the time in milliseconds to wait after the timer is started before firing the first event. Upon construction, this is set to be the same as the between-event delay, but then its value is independent and remains unaffected by changes to the between-event delay.
        Parameters:
        initialDelay - the initial delay, in milliseconds
        See Also:
        setDelay(int)

      • getInitialDelay

        public int getInitialDelay()
        Returns the Timer's initial delay.
        See Also:
        setInitialDelay(int), setDelay(int)

      • setRepeats

        public void setRepeats(boolean flag)
        If flag is false, instructs the Timer to send only one action event to its listeners.
        Parameters:
        flag - specify false to make the timer stop after sending its first action event

      • isRepeats

        public boolean isRepeats()
        Returns true (the default) if the Timer will send an action event to its listeners multiple times.
        See Also:
        setRepeats(boolean)

      • setCoalesce

        public void setCoalesce(boolean flag)
        Sets whether the Timer coalesces multiple pending ActionEvent firings. A busy application may not be able to keep up with a Timer's event generation, causing multiple action events to be queued. When processed, the application sends these events one after the other, causing the Timer's listeners to receive a sequence of events with no delay between them. Coalescing avoids this situation by reducing multiple pending events to a single event. Timers coalesce events by default.
        Parameters:
        flag - specify false to turn off coalescing

      • isCoalesce

        public boolean isCoalesce()
        Returns true if the Timer coalesces multiple pending action events.
        See Also:
        setCoalesce(boolean)

      • setActionCommand

        public void setActionCommand(String command)
        Sets the string that will be delivered as the action command in ActionEvents fired by this timer. null is an acceptable value.
        Parameters:
        command - the action command
        Since:
        1.6

      • getActionCommand

        public String getActionCommand()
        Returns the string that will be delivered as the action command in ActionEvents fired by this timer. May be null, which is also the default.
        Returns:
        the action command used in firing events
        Since:
        1.6

      • start

        public void start()
        Starts the Timer, causing it to start sending action events to its listeners.
        See Also:
        stop()

      • isRunning

        public boolean isRunning()
        Returns true if the Timer is running.
        See Also:
        start()

      • stop

        public void stop()
        Stops the Timer, causing it to stop sending action events to its listeners.
        See Also:
        start()

      • restart

        public void restart()
        Restarts the Timer, canceling any pending firings and causing it to fire with its initial delay.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ToolTipManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class ToolTipManager

  • java.lang.Object
    • java.awt.event.MouseAdapter
      • javax.swing.ToolTipManager
  • All Implemented Interfaces:
    MouseListener, MouseMotionListener, MouseWheelListener, EventListener

    public class ToolTipManager
extends MouseAdapter
implements MouseMotionListener
    Manages all the ToolTips in the system.

    ToolTipManager contains numerous properties for configuring how long it will take for the tooltips to become visible, and how long till they hide. Consider a component that has a different tooltip based on where the mouse is, such as JTree. When the mouse moves into the JTree and over a region that has a valid tooltip, the tooltip will become visible after initialDelay milliseconds. After dismissDelay milliseconds the tooltip will be hidden. If the mouse is over a region that has a valid tooltip, and the tooltip is currently visible, when the mouse moves to a region that doesn't have a valid tooltip the tooltip will be hidden. If the mouse then moves back into a region that has a valid tooltip within reshowDelay milliseconds, the tooltip will immediately be shown, otherwise the tooltip will be shown again after initialDelay milliseconds.

    See Also:
    JComponent.createToolTip()

    • Nested Class Summary

      Nested Classes
      Modifier and Type | Class and Description
      protected class  | ToolTipManager.insideTimerAction
      protected class  | ToolTipManager.outsideTimerAction
      protected class  | ToolTipManager.stillInsideTimerAction

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected boolean | heavyWeightPopupEnabled
      protected boolean | lightWeightPopupEnabled

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getDismissDelay()
      Returns the dismissal delay value.
      int getInitialDelay()
      Returns the initial delay value.
      int getReshowDelay()
      Returns the reshow delay property.
      boolean isEnabled()
      Returns true if this object is enabled.
      boolean isLightWeightPopupEnabled()
      Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used.
      void mouseDragged(MouseEvent event)
      Called when the mouse is pressed and dragged.
      void mouseEntered(MouseEvent event)
      Called when the mouse enters the region of a component.
      void mouseExited(MouseEvent event)
      Called when the mouse exits the region of a component.
      void mouseMoved(MouseEvent event)
      Called when the mouse is moved.
      void mousePressed(MouseEvent event)
      Called when the mouse is pressed.
      void registerComponent(JComponent component)
      Registers a component for tooltip management.
      void setDismissDelay(int milliseconds)
      Specifies the dismissal delay value.
      void setEnabled(boolean flag)
      Enables or disables the tooltip.
      void setInitialDelay(int milliseconds)
      Specifies the initial delay value.
      void setLightWeightPopupEnabled(boolean aFlag)
      When displaying the JToolTip, the ToolTipManager chooses to use a lightweight JPanel if it fits.
      void setReshowDelay(int milliseconds)
      Used to specify the amount of time before the user has to wait initialDelay milliseconds before a tooltip will be shown.
      static ToolTipManager sharedInstance()
      Returns a shared ToolTipManager instance.
      void unregisterComponent(JComponent component)
      Removes a component from tooltip control.

      • Methods inherited from class java.awt.event.MouseAdapter

        mouseClicked, mouseReleased, mouseWheelMoved

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • lightWeightPopupEnabled

        protected boolean lightWeightPopupEnabled

      • heavyWeightPopupEnabled

        protected boolean heavyWeightPopupEnabled

    • Method Detail

      • setEnabled

        public void setEnabled(boolean flag)
        Enables or disables the tooltip.
        Parameters:
        flag - true to enable the tip, false otherwise

      • isEnabled

        public boolean isEnabled()
        Returns true if this object is enabled.
        Returns:
        true if this object is enabled, false otherwise

      • setLightWeightPopupEnabled

        public void setLightWeightPopupEnabled(boolean aFlag)
        When displaying the JToolTip, the ToolTipManager chooses to use a lightweight JPanel if it fits. This method allows you to disable this feature. You have to do disable it if your application mixes light weight and heavy weights components.
        Parameters:
        aFlag - true if a lightweight panel is desired, false otherwise

      • isLightWeightPopupEnabled

        public boolean isLightWeightPopupEnabled()
        Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used.
        Returns:
        true if lightweight ToolTips are in use

      • setInitialDelay

        public void setInitialDelay(int milliseconds)
        Specifies the initial delay value.
        Parameters:
        milliseconds - the number of milliseconds to delay (after the cursor has paused) before displaying the tooltip
        See Also:
        getInitialDelay()

      • getInitialDelay

        public int getInitialDelay()
        Returns the initial delay value.
        Returns:
        an integer representing the initial delay value, in milliseconds
        See Also:
        setInitialDelay(int)

      • setDismissDelay

        public void setDismissDelay(int milliseconds)
        Specifies the dismissal delay value.
        Parameters:
        milliseconds - the number of milliseconds to delay before taking away the tooltip
        See Also:
        getDismissDelay()

      • getDismissDelay

        public int getDismissDelay()
        Returns the dismissal delay value.
        Returns:
        an integer representing the dismissal delay value, in milliseconds
        See Also:
        setDismissDelay(int)

      • setReshowDelay

        public void setReshowDelay(int milliseconds)
        Used to specify the amount of time before the user has to wait initialDelay milliseconds before a tooltip will be shown. That is, if the tooltip is hidden, and the user moves into a region of the same Component that has a valid tooltip within milliseconds milliseconds the tooltip will immediately be shown. Otherwise, if the user moves into a region with a valid tooltip after milliseconds milliseconds, the user will have to wait an additional initialDelay milliseconds before the tooltip is shown again.
        Parameters:
        milliseconds - time in milliseconds
        See Also:
        getReshowDelay()

      • getReshowDelay

        public int getReshowDelay()
        Returns the reshow delay property.
        Returns:
        reshown delay property
        See Also:
        setReshowDelay(int)

      • sharedInstance

        public static ToolTipManager sharedInstance()
        Returns a shared ToolTipManager instance.
        Returns:
        a shared ToolTipManager object

      • registerComponent

        public void registerComponent(JComponent component)
        Registers a component for tooltip management.

        This will register key bindings to show and hide the tooltip text only if component has focus bindings. This is done so that components that are not normally focus traversable, such as JLabel, are not made focus traversable as a result of invoking this method.

        Parameters:
        component - a JComponent object to add
        See Also:
        Component.isFocusTraversable()

      • unregisterComponent

        public void unregisterComponent(JComponent component)
        Removes a component from tooltip control.
        Parameters:
        component - a JComponent object to remove

      • mouseEntered

        public void mouseEntered(MouseEvent event)
        Called when the mouse enters the region of a component. This determines whether the tool tip should be shown.
        Specified by:
        mouseEntered in interface MouseListener
        Overrides:
        mouseEntered in class MouseAdapter
        Parameters:
        event - the event in question

      • mouseExited

        public void mouseExited(MouseEvent event)
        Called when the mouse exits the region of a component. Any tool tip showing should be hidden.
        Specified by:
        mouseExited in interface MouseListener
        Overrides:
        mouseExited in class MouseAdapter
        Parameters:
        event - the event in question

      • mousePressed

        public void mousePressed(MouseEvent event)
        Called when the mouse is pressed. Any tool tip showing should be hidden.
        Specified by:
        mousePressed in interface MouseListener
        Overrides:
        mousePressed in class MouseAdapter
        Parameters:
        event - the event in question

      • mouseDragged

        public void mouseDragged(MouseEvent event)
        Called when the mouse is pressed and dragged. Does nothing.
        Specified by:
        mouseDragged in interface MouseMotionListener
        Overrides:
        mouseDragged in class MouseAdapter
        Parameters:
        event - the event in question

      • mouseMoved

        public void mouseMoved(MouseEvent event)
        Called when the mouse is moved. Determines whether the tool tip should be displayed.
        Specified by:
        mouseMoved in interface MouseMotionListener
        Overrides:
        mouseMoved in class MouseAdapter
        Parameters:
        event - the event in question
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ToolTipManager.insideTimerAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class ToolTipManager.insideTimerAction

  • java.lang.Object
    • javax.swing.ToolTipManager.insideTimerAction
  • All Implemented Interfaces:
    ActionListener, EventListener
    Enclosing class:
    ToolTipManager

    protected class ToolTipManager.insideTimerAction
extends Object
implements ActionListener

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | insideTimerAction()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void actionPerformed(ActionEvent e)
      Invoked when an action occurs.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • insideTimerAction

        protected insideTimerAction()

    • Method Detail

      • actionPerformed

        public void actionPerformed(ActionEvent e)
        Description copied from interface: ActionListener
        Invoked when an action occurs.
        Specified by:
        actionPerformed in interface ActionListener
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ToolTipManager.outsideTimerAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class ToolTipManager.outsideTimerAction

  • java.lang.Object
    • javax.swing.ToolTipManager.outsideTimerAction
  • All Implemented Interfaces:
    ActionListener, EventListener
    Enclosing class:
    ToolTipManager

    protected class ToolTipManager.outsideTimerAction
extends Object
implements ActionListener

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | outsideTimerAction()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void actionPerformed(ActionEvent e)
      Invoked when an action occurs.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • outsideTimerAction

        protected outsideTimerAction()

    • Method Detail

      • actionPerformed

        public void actionPerformed(ActionEvent e)
        Description copied from interface: ActionListener
        Invoked when an action occurs.
        Specified by:
        actionPerformed in interface ActionListener
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ToolTipManager.stillInsideTimerAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class ToolTipManager.stillInsideTimerAction

  • java.lang.Object
    • javax.swing.ToolTipManager.stillInsideTimerAction
  • All Implemented Interfaces:
    ActionListener, EventListener
    Enclosing class:
    ToolTipManager

    protected class ToolTipManager.stillInsideTimerAction
extends Object
implements ActionListener

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | stillInsideTimerAction()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void actionPerformed(ActionEvent e)
      Invoked when an action occurs.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • stillInsideTimerAction

        protected stillInsideTimerAction()

    • Method Detail

      • actionPerformed

        public void actionPerformed(ActionEvent e)
        Description copied from interface: ActionListener
        Invoked when an action occurs.
        Specified by:
        actionPerformed in interface ActionListener
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransferHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class TransferHandler

  • java.lang.Object
    • javax.swing.TransferHandler
  • All Implemented Interfaces:
    Serializable

    public class TransferHandler
extends Object
implements Serializable
    This class is used to handle the transfer of a Transferable to and from Swing components. The Transferable is used to represent data that is exchanged via a cut, copy, or paste to/from a clipboard. It is also used in drag-and-drop operations to represent a drag from a component, and a drop to a component. Swing provides functionality that automatically supports cut, copy, and paste keyboard bindings that use the functionality provided by an implementation of this class. Swing also provides functionality that automatically supports drag and drop that uses the functionality provided by an implementation of this class. The Swing developer can concentrate on specifying the semantics of a transfer primarily by setting the transferHandler property on a Swing component.

    This class is implemented to provide a default behavior of transferring a component property simply by specifying the name of the property in the constructor. For example, to transfer the foreground color from one component to another either via the clipboard or a drag and drop operation a TransferHandler can be constructed with the string "foreground". The built in support will use the color returned by getForeground as the source of the transfer, and setForeground for the target of a transfer.

    Please see How to Use Drag and Drop and Data Transfer, a section in The Java Tutorial, for more information.

    Since:
    1.4

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  TransferHandler.DropLocation
      Represents a location where dropped data should be inserted.
      static class  TransferHandler.TransferSupport
      This class encapsulates all relevant details of a clipboard or drag and drop transfer, and also allows for customizing aspects of the drag and drop experience.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int COPY
      An int representing a "copy" transfer action.
      static int COPY_OR_MOVE
      An int representing a source action capability of either "copy" or "move".
      static int LINK
      An int representing a "link" transfer action.
      static int MOVE
      An int representing a "move" transfer action.
      static int NONE
      An int representing no transfer action.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TransferHandler()
      Convenience constructor for subclasses.
        TransferHandler(String property)
      Constructs a transfer handler that can transfer a Java Bean property from one component to another via the clipboard or a drag and drop operation.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean canImport(JComponent comp, DataFlavor[] transferFlavors)
      Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it.
      boolean canImport(TransferHandler.TransferSupport support)
      This method is called repeatedly during a drag and drop operation to allow the developer to configure properties of, and to return the acceptability of transfers; with a return value of true indicating that the transfer represented by the given TransferSupport (which contains all of the details of the transfer) is acceptable at the current time, and a value of false rejecting the transfer.
      protected Transferable createTransferable(JComponent c)
      Creates a Transferable to use as the source for a data transfer.
      void exportAsDrag(JComponent comp, InputEvent e, int action)
      Causes the Swing drag support to be initiated.
      protected void exportDone(JComponent source, Transferable data, int action)
      Invoked after data has been exported.
      void exportToClipboard(JComponent comp, Clipboard clip, int action)
      Causes a transfer from the given component to the given clipboard.
      static Action getCopyAction()
      Returns an Action that performs copy operations to the clipboard.
      static Action getCutAction()
      Returns an Action that performs cut operations to the clipboard.
      Image getDragImage()
      Returns the drag image.
      Point getDragImageOffset()
      Returns an anchor offset for the image to drag.
      static Action getPasteAction()
      Returns an Action that performs paste operations from the clipboard.
      int getSourceActions(JComponent c)
      Returns the type of transfer actions supported by the source; any bitwise-OR combination of COPY, MOVE and LINK.
      Icon getVisualRepresentation(Transferable t)
      Returns an object that establishes the look of a transfer.
      boolean importData(JComponent comp, Transferable t)
      Causes a transfer to a component from a clipboard or a DND drop operation.
      boolean importData(TransferHandler.TransferSupport support)
      Causes a transfer to occur from a clipboard or a drag and drop operation.
      void setDragImage(Image img)
      Sets the drag image parameter.
      void setDragImageOffset(Point p)
      Sets an anchor offset for the image to drag.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • NONE

        public static final int NONE
        An int representing no transfer action.
        See Also:
        Constant Field Values

      • COPY

        public static final int COPY
        An int representing a "copy" transfer action. This value is used when data is copied to a clipboard or copied elsewhere in a drag and drop operation.
        See Also:
        Constant Field Values

      • MOVE

        public static final int MOVE
        An int representing a "move" transfer action. This value is used when data is moved to a clipboard (i.e. a cut) or moved elsewhere in a drag and drop operation.
        See Also:
        Constant Field Values

      • COPY_OR_MOVE

        public static final int COPY_OR_MOVE
        An int representing a source action capability of either "copy" or "move".
        See Also:
        Constant Field Values

      • LINK

        public static final int LINK
        An int representing a "link" transfer action. This value is used to specify that data should be linked in a drag and drop operation.
        Since:
        1.6
        See Also:
        DnDConstants.ACTION_LINK, Constant Field Values

    • Constructor Detail

      • TransferHandler

        public TransferHandler(String property)
        Constructs a transfer handler that can transfer a Java Bean property from one component to another via the clipboard or a drag and drop operation.
        Parameters:
        property - the name of the property to transfer; this can be null if there is no property associated with the transfer handler (a subclass that performs some other kind of transfer, for example)

      • TransferHandler

        protected TransferHandler()
        Convenience constructor for subclasses.

    • Method Detail

      • getCutAction

        public static Action getCutAction()
        Returns an Action that performs cut operations to the clipboard. When performed, this action operates on the JComponent source of the ActionEvent by invoking exportToClipboard, with a MOVE action, on the component's TransferHandler.
        Returns:
        an Action for performing cuts to the clipboard

      • getCopyAction

        public static Action getCopyAction()
        Returns an Action that performs copy operations to the clipboard. When performed, this action operates on the JComponent source of the ActionEvent by invoking exportToClipboard, with a COPY action, on the component's TransferHandler.
        Returns:
        an Action for performing copies to the clipboard

      • getPasteAction

        public static Action getPasteAction()
        Returns an Action that performs paste operations from the clipboard. When performed, this action operates on the JComponent source of the ActionEvent by invoking importData, with the clipboard contents, on the component's TransferHandler.
        Returns:
        an Action for performing pastes from the clipboard

      • setDragImage

        public void setDragImage(Image img)
        Sets the drag image parameter. The image has to be prepared for rendering by the moment of the call. The image is stored by reference because of some performance reasons.
        Parameters:
        img - an image to drag

      • getDragImage

        public Image getDragImage()
        Returns the drag image. If there is no image to drag, the returned value is null.
        Returns:
        the reference to the drag image

      • setDragImageOffset

        public void setDragImageOffset(Point p)
        Sets an anchor offset for the image to drag. It can not be null.
        Parameters:
        p - a Point object that corresponds to coordinates of an anchor offset of the image relative to the upper left corner of the image

      • getDragImageOffset

        public Point getDragImageOffset()
        Returns an anchor offset for the image to drag.
        Returns:
        a Point object that corresponds to coordinates of an anchor offset of the image relative to the upper left corner of the image. The point (0,0) returns by default.

      • exportAsDrag

        public void exportAsDrag(JComponent comp,
                         InputEvent e,
                         int action)
        Causes the Swing drag support to be initiated. This is called by the various UI implementations in the javax.swing.plaf.basic package if the dragEnabled property is set on the component. This can be called by custom UI implementations to use the Swing drag support. This method can also be called by a Swing extension written as a subclass of JComponent to take advantage of the Swing drag support.

        The transfer will not necessarily have been completed at the return of this call (i.e. the call does not block waiting for the drop). The transfer will take place through the Swing implementation of the java.awt.dnd mechanism, requiring no further effort from the developer. The exportDone method will be called when the transfer has completed.

        Parameters:
        comp - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
        e - the event that triggered the transfer
        action - the transfer action initially requested; either COPY, MOVE or LINK; the DnD system may change the action used during the course of the drag operation

      • exportToClipboard

        public void exportToClipboard(JComponent comp,
                              Clipboard clip,
                              int action)
                       throws IllegalStateException
        Causes a transfer from the given component to the given clipboard. This method is called by the default cut and copy actions registered in a component's action map.

        The transfer will take place using the java.awt.datatransfer mechanism, requiring no further effort from the developer. Any data transfer will be complete and the exportDone method will be called with the action that occurred, before this method returns. Should the clipboard be unavailable when attempting to place data on it, the IllegalStateException thrown by Clipboard.setContents(Transferable, ClipboardOwner) will be propagated through this method. However, exportDone will first be called with an action of NONE for consistency.

        Parameters:
        comp - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
        clip - the clipboard to transfer the data into
        action - the transfer action requested; this should be a value of either COPY or MOVE; the operation performed is the intersection of the transfer capabilities given by getSourceActions and the requested action; the intersection may result in an action of NONE if the requested action isn't supported
        Throws:
        IllegalStateException - if the clipboard is currently unavailable
        See Also:
        Clipboard.setContents(Transferable, ClipboardOwner)

      • importData

        public boolean importData(TransferHandler.TransferSupport support)
        Causes a transfer to occur from a clipboard or a drag and drop operation. The Transferable to be imported and the component to transfer to are contained within the TransferSupport.

        While the drag and drop implementation calls canImport to determine the suitability of a transfer before calling this method, the implementation of paste does not. As such, it cannot be assumed that the transfer is acceptable upon a call to this method for paste. It is recommended that canImport be explicitly called to cover this case.

        Note: The TransferSupport object passed to this method is only valid for the duration of the method call. It is undefined what values it may contain after this method returns.

        Parameters:
        support - the object containing the details of the transfer, not null.
        Returns:
        true if the data was inserted into the component, false otherwise
        Throws:
        NullPointerException - if support is null
        Since:
        1.6
        See Also:
        canImport(TransferHandler.TransferSupport)

      • importData

        public boolean importData(JComponent comp,
                          Transferable t)
        Causes a transfer to a component from a clipboard or a DND drop operation. The Transferable represents the data to be imported into the component.

        Note: Swing now calls the newer version of importData that takes a TransferSupport, which in turn calls this method (if the component in the TransferSupport is a JComponent). Developers are encouraged to call and override the newer version as it provides more information (and is the only version that supports use with a TransferHandler set directly on a JFrame or other non-JComponent).

        Parameters:
        comp - the component to receive the transfer; provided to enable sharing of TransferHandlers
        t - the data to import
        Returns:
        true if the data was inserted into the component, false otherwise
        See Also:
        importData(TransferHandler.TransferSupport)

      • canImport

        public boolean canImport(TransferHandler.TransferSupport support)
        This method is called repeatedly during a drag and drop operation to allow the developer to configure properties of, and to return the acceptability of transfers; with a return value of true indicating that the transfer represented by the given TransferSupport (which contains all of the details of the transfer) is acceptable at the current time, and a value of false rejecting the transfer.

        For those components that automatically display a drop location during drag and drop, accepting the transfer, by default, tells them to show the drop location. This can be changed by calling setShowDropLocation on the TransferSupport.

        By default, when the transfer is accepted, the chosen drop action is that picked by the user via their drag gesture. The developer can override this and choose a different action, from the supported source actions, by calling setDropAction on the TransferSupport.

        On every call to canImport, the TransferSupport contains fresh state. As such, any properties set on it must be set on every call. Upon a drop, canImport is called one final time before calling into importData. Any state set on the TransferSupport during that last call will be available in importData.

        This method is not called internally in response to paste operations. As such, it is recommended that implementations of importData explicitly call this method for such cases and that this method be prepared to return the suitability of paste operations as well.

        Note: The TransferSupport object passed to this method is only valid for the duration of the method call. It is undefined what values it may contain after this method returns.

        Parameters:
        support - the object containing the details of the transfer, not null.
        Returns:
        true if the import can happen, false otherwise
        Throws:
        NullPointerException - if support is null
        Since:
        1.6
        See Also:
        importData(TransferHandler.TransferSupport),
TransferHandler.TransferSupport.setShowDropLocation(boolean),
TransferHandler.TransferSupport.setDropAction(int)

      • canImport

        public boolean canImport(JComponent comp,
                         DataFlavor[] transferFlavors)
        Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it.

        Note: Swing now calls the newer version of canImport that takes a TransferSupport, which in turn calls this method (only if the component in the TransferSupport is a JComponent). Developers are encouraged to call and override the newer version as it provides more information (and is the only version that supports use with a TransferHandler set directly on a JFrame or other non-JComponent).

        Parameters:
        comp - the component to receive the transfer; provided to enable sharing of TransferHandlers
        transferFlavors - the data formats available
        Returns:
        true if the data can be inserted into the component, false otherwise
        See Also:
        canImport(TransferHandler.TransferSupport)

      • getSourceActions

        public int getSourceActions(JComponent c)
        Returns the type of transfer actions supported by the source; any bitwise-OR combination of COPY, MOVE and LINK.

        Some models are not mutable, so a transfer operation of MOVE should not be advertised in that case. Returning NONE disables transfers from the component.

        Parameters:
        c - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
        Returns:
        COPY if the transfer property can be found, otherwise returns NONE

      • getVisualRepresentation

        public Icon getVisualRepresentation(Transferable t)
        Returns an object that establishes the look of a transfer. This is useful for both providing feedback while performing a drag operation and for representing the transfer in a clipboard implementation that has a visual appearance. The implementation of the Icon interface should not alter the graphics clip or alpha level. The icon implementation need not be rectangular or paint all of the bounding rectangle and logic that calls the icons paint method should not assume the all bits are painted. null is a valid return value for this method and indicates there is no visual representation provided. In that case, the calling logic is free to represent the transferable however it wants.

        The default Swing logic will not do an alpha blended drag animation if the return is null.

        Parameters:
        t - the data to be transferred; this value is expected to have been created by the createTransferable method
        Returns:
        null, indicating there is no default visual representation

      • createTransferable

        protected Transferable createTransferable(JComponent c)
        Creates a Transferable to use as the source for a data transfer. Returns the representation of the data to be transferred, or null if the component's property is null
        Parameters:
        c - the component holding the data to be transferred; provided to enable sharing of TransferHandlers
        Returns:
        the representation of the data to be transferred, or null if the property associated with c is null

      • exportDone

        protected void exportDone(JComponent source,
                          Transferable data,
                          int action)
        Invoked after data has been exported. This method should remove the data that was transferred if the action was MOVE.

        This method is implemented to do nothing since MOVE is not a supported action of this implementation (getSourceActions does not include MOVE).

        Parameters:
        source - the component that was the source of the data
        data - The data that was transferred or possibly null if the action is NONE.
        action - the actual action that was performed
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransferHandler.DropLocation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class TransferHandler.DropLocation

  • java.lang.Object
    • javax.swing.TransferHandler.DropLocation
  • Direct Known Subclasses:
    JList.DropLocation, JTable.DropLocation, JTextComponent.DropLocation, JTree.DropLocation
    Enclosing class:
    TransferHandler

    public static class TransferHandler.DropLocation
extends Object
    Represents a location where dropped data should be inserted. This is a base class that only encapsulates a point. Components supporting drop may provide subclasses of this containing more information.

    Developers typically shouldn't create instances of, or extend, this class. Instead, these are something provided by the DnD implementation by TransferSupport instances and by components with a getDropLocation() method.

    Since:
    1.6
    See Also:
    TransferHandler.TransferSupport.getDropLocation()

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DropLocation(Point dropPoint)
      Constructs a drop location for the given point.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Point getDropPoint()
      Returns the drop point, representing the mouse's current location within the component.
      String toString()
      Returns a string representation of this drop location.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DropLocation

        protected DropLocation(Point dropPoint)
        Constructs a drop location for the given point.
        Parameters:
        dropPoint - the drop point, representing the mouse's current location within the component.
        Throws:
        IllegalArgumentException - if the point is null

    • Method Detail

      • getDropPoint

        public final Point getDropPoint()
        Returns the drop point, representing the mouse's current location within the component.
        Returns:
        the drop point.

      • toString

        public String toString()
        Returns a string representation of this drop location. This method is intended to be used for debugging purposes, and the content and format of the returned string may vary between implementations.
        Overrides:
        toString in class Object
        Returns:
        a string representation of this drop location
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransferHandler.TransferSupport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class TransferHandler.TransferSupport

  • java.lang.Object
    • javax.swing.TransferHandler.TransferSupport
  • Enclosing class:
    TransferHandler

    public static final class TransferHandler.TransferSupport
extends Object
    This class encapsulates all relevant details of a clipboard or drag and drop transfer, and also allows for customizing aspects of the drag and drop experience.

    The main purpose of this class is to provide the information needed by a developer to determine the suitability of a transfer or to import the data contained within. But it also doubles as a controller for customizing properties during drag and drop, such as whether or not to show the drop location, and which drop action to use.

    Developers typically need not create instances of this class. Instead, they are something provided by the DnD implementation to certain methods in TransferHandler.

    Since:
    1.6
    See Also:
    TransferHandler.canImport(TransferHandler.TransferSupport), TransferHandler.importData(TransferHandler.TransferSupport)

    • Constructor Summary

      Constructors
      Constructor and Description
      TransferSupport(Component component, Transferable transferable)
      Create a TransferSupport with isDrop() false for the given component and Transferable.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Component getComponent()
      Returns the target component of this transfer.
      DataFlavor[] getDataFlavors()
      Returns the data flavors for this transfer.
      int getDropAction()
      Returns the action chosen for the drop, when this TransferSupport represents a drop.
      TransferHandler.DropLocation getDropLocation()
      Returns the current (non-null) drop location for the component, when this TransferSupport represents a drop.
      int getSourceDropActions()
      Returns the drag source's supported drop actions, when this TransferSupport represents a drop.
      Transferable getTransferable()
      Returns the Transferable associated with this transfer.
      int getUserDropAction()
      Returns the user drop action for the drop, when this TransferSupport represents a drop.
      boolean isDataFlavorSupported(DataFlavor df)
      Returns whether or not the given data flavor is supported.
      boolean isDrop()
      Returns whether or not this TransferSupport represents a drop operation.
      void setDropAction(int dropAction)
      Sets the drop action for the transfer - which must represent a drop - to the given action, instead of the default user drop action.
      void setShowDropLocation(boolean showDropLocation)
      Sets whether or not the drop location should be visually indicated for the transfer - which must represent a drop.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TransferSupport

        public TransferSupport(Component component,
                       Transferable transferable)
        Create a TransferSupport with isDrop() false for the given component and Transferable.
        Parameters:
        component - the target component
        transferable - the transferable
        Throws:
        NullPointerException - if either parameter is null

    • Method Detail

      • isDrop

        public boolean isDrop()
        Returns whether or not this TransferSupport represents a drop operation.
        Returns:
        true if this is a drop operation, false otherwise.

      • getComponent

        public Component getComponent()
        Returns the target component of this transfer.
        Returns:
        the target component

      • getDropLocation

        public TransferHandler.DropLocation getDropLocation()
        Returns the current (non-null) drop location for the component, when this TransferSupport represents a drop.

        Note: For components with built-in drop support, this location will be a subclass of DropLocation of the same type returned by that component's getDropLocation method.

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Returns:
        the drop location
        Throws:
        IllegalStateException - if this is not a drop
        See Also:
        isDrop()

      • setShowDropLocation

        public void setShowDropLocation(boolean showDropLocation)
        Sets whether or not the drop location should be visually indicated for the transfer - which must represent a drop. This is applicable to those components that automatically show the drop location when appropriate during a drag and drop operation). By default, the drop location is shown only when the TransferHandler has said it can accept the import represented by this TransferSupport. With this method you can force the drop location to always be shown, or always not be shown.

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Parameters:
        showDropLocation - whether or not to indicate the drop location
        Throws:
        IllegalStateException - if this is not a drop
        See Also:
        isDrop()

      • setDropAction

        public void setDropAction(int dropAction)
        Sets the drop action for the transfer - which must represent a drop - to the given action, instead of the default user drop action. The action must be supported by the source's drop actions, and must be one of COPY, MOVE or LINK.

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Parameters:
        dropAction - the drop action
        Throws:
        IllegalStateException - if this is not a drop
        IllegalArgumentException - if an invalid action is specified
        See Also:
        getDropAction(),
getUserDropAction(),
getSourceDropActions(),
isDrop()

      • getDropAction

        public int getDropAction()
        Returns the action chosen for the drop, when this TransferSupport represents a drop.

        Unless explicitly chosen by way of setDropAction, this returns the user drop action provided by getUserDropAction.

        You may wish to query this in TransferHandler's importData method to customize processing based on the action.

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Returns:
        the action chosen for the drop
        Throws:
        IllegalStateException - if this is not a drop
        See Also:
        setDropAction(int), getUserDropAction(), isDrop()

      • getUserDropAction

        public int getUserDropAction()
        Returns the user drop action for the drop, when this TransferSupport represents a drop.

        The user drop action is chosen for a drop as described in the documentation for DropTargetDragEvent and DropTargetDropEvent. A different action may be chosen as the drop action by way of the setDropAction method.

        You may wish to query this in TransferHandler's canImport method when determining the suitability of a drop or when deciding on a drop action to explicitly choose.

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Returns:
        the user drop action
        Throws:
        IllegalStateException - if this is not a drop
        See Also:
        setDropAction(int), getDropAction(), isDrop()

      • getSourceDropActions

        public int getSourceDropActions()
        Returns the drag source's supported drop actions, when this TransferSupport represents a drop.

        The source actions represent the set of actions supported by the source of this transfer, and are represented as some bitwise-OR combination of COPY, MOVE and LINK. You may wish to query this in TransferHandler's canImport method when determining the suitability of a drop or when deciding on a drop action to explicitly choose. To determine if a particular action is supported by the source, bitwise-AND the action with the source drop actions, and then compare the result against the original action. For example:

         boolean copySupported = (COPY & getSourceDropActions()) == COPY;

        This method is only for use with drag and drop transfers. Calling it when isDrop() is false results in an IllegalStateException.

        Returns:
        the drag source's supported drop actions
        Throws:
        IllegalStateException - if this is not a drop
        See Also:
        isDrop()

      • getDataFlavors

        public DataFlavor[] getDataFlavors()
        Returns the data flavors for this transfer.
        Returns:
        the data flavors for this transfer

      • isDataFlavorSupported

        public boolean isDataFlavorSupported(DataFlavor df)
        Returns whether or not the given data flavor is supported.
        Parameters:
        df - the DataFlavor to test
        Returns:
        whether or not the given flavor is supported.

      • getTransferable

        public Transferable getTransferable()
        Returns the Transferable associated with this transfer.

        Note: Unless it is necessary to fetch the Transferable directly, use one of the other methods on this class to inquire about the transfer. This may perform better than fetching the Transferable and asking it directly.

        Returns:
        the Transferable associated with this transfer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.swing.tree

Provides classes and interfaces for dealing with javax.swing.JTree.

See: Description

  • Interface Summary
    Interface Description
    MutableTreeNode
    Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
    RowMapper
    Defines the requirements for an object that translates paths in the tree into display rows.
    TreeCellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    TreeCellRenderer
    Defines the requirements for an object that displays a tree node.
    TreeModel
    The model used by JTree.
    TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.
    TreeSelectionModel
    This interface represents the current state of the selection for the tree component.
  • Class Summary
    Class Description
    AbstractLayoutCache
    Warning: Serialized objects of this class will not be compatible with future Swing releases.
    AbstractLayoutCache.NodeDimensions
    Used by AbstractLayoutCache to determine the size and x origin of a particular node.
    DefaultMutableTreeNode
    A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
    DefaultTreeCellEditor
    A TreeCellEditor.
    DefaultTreeCellRenderer
    Displays an entry in a tree.
    DefaultTreeModel
    A simple tree data model that uses TreeNodes.
    DefaultTreeSelectionModel
    Default implementation of TreeSelectionModel.
    FixedHeightLayoutCache
    NOTE: This will become more open in a future release.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
    VariableHeightLayoutCache
    NOTE: This will become more open in a future release.
  • Exception Summary
    Exception Description
    ExpandVetoException
    Exception used to stop and expand/collapse from happening.

Package javax.swing.tree Description

Provides classes and interfaces for dealing with javax.swing.JTree. You use these classes and interfaces if you want control over how trees are constructed, updated, and rendered, as well as how data associated with the tree nodes are viewed and managed.

Note: Most of the Swing API is not thread safe. For details, see Threads and Swing, a section in The Java Tutorial.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use Trees, a section in The Java Tutorial
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.swing.tree Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.swing.tree

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.swing.tree.AbstractLayoutCache (implements javax.swing.tree.RowMapper)
      • javax.swing.tree.FixedHeightLayoutCache
      • javax.swing.tree.VariableHeightLayoutCache
    • javax.swing.tree.AbstractLayoutCache.NodeDimensions
    • java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • java.awt.Container
        • javax.swing.tree.DefaultTreeCellEditor.EditorContainer
        • javax.swing.JComponent (implements java.io.Serializable)
          • javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • javax.swing.tree.DefaultTreeCellRenderer (implements javax.swing.tree.TreeCellRenderer)
          • javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
            • javax.swing.JTextField (implements javax.swing.SwingConstants)
              • javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
    • javax.swing.tree.DefaultMutableTreeNode (implements java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable)
    • javax.swing.tree.DefaultTreeCellEditor (implements java.awt.event.ActionListener, javax.swing.tree.TreeCellEditor, javax.swing.event.TreeSelectionListener)
    • javax.swing.tree.DefaultTreeModel (implements java.io.Serializable, javax.swing.tree.TreeModel)
    • javax.swing.tree.DefaultTreeSelectionModel (implements java.lang.Cloneable, java.io.Serializable, javax.swing.tree.TreeSelectionModel)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.swing.tree.ExpandVetoException
    • javax.swing.tree.TreePath (implements java.io.Serializable)

Interface Hierarchy

  • javax.swing.CellEditor
    • javax.swing.tree.TreeCellEditor
  • javax.swing.tree.RowMapper
  • javax.swing.tree.TreeCellRenderer
  • javax.swing.tree.TreeModel
  • javax.swing.tree.TreeNode
    • javax.swing.tree.MutableTreeNode
  • javax.swing.tree.TreeSelectionModel
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.swing.tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.swing.tree

  • Packages that use javax.swing.tree
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.event
    Provides for events fired by Swing components.
    javax.swing.plaf
    Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.plaf.metal
    Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.
    javax.swing.plaf.multi
    Provides user interface objects that combine two or more look and feels.
    javax.swing.plaf.synth
    Synth is a skinnable look and feel in which all painting is delegated.
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.text.html
    Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.
  • Classes in javax.swing.tree used by javax.swing
    Class and Description
    DefaultMutableTreeNode
    A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
    DefaultTreeSelectionModel
    Default implementation of TreeSelectionModel.
    ExpandVetoException
    Exception used to stop and expand/collapse from happening.
    MutableTreeNode
    Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
    RowMapper
    Defines the requirements for an object that translates paths in the tree into display rows.
    TreeCellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    TreeCellRenderer
    Defines the requirements for an object that displays a tree node.
    TreeModel
    The model used by JTree.
    TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
    TreeSelectionModel
    This interface represents the current state of the selection for the tree component.
  • Classes in javax.swing.tree used by javax.swing.event
    Class and Description
    ExpandVetoException
    Exception used to stop and expand/collapse from happening.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
  • Classes in javax.swing.tree used by javax.swing.plaf
    Class and Description
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
  • Classes in javax.swing.tree used by javax.swing.plaf.basic
    Class and Description
    AbstractLayoutCache
    Warning: Serialized objects of this class will not be compatible with future Swing releases.
    AbstractLayoutCache.NodeDimensions
    Used by AbstractLayoutCache to determine the size and x origin of a particular node.
    TreeCellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    TreeCellRenderer
    Defines the requirements for an object that displays a tree node.
    TreeModel
    The model used by JTree.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
    TreeSelectionModel
    This interface represents the current state of the selection for the tree component.
  • Classes in javax.swing.tree used by javax.swing.plaf.metal
    Class and Description
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
  • Classes in javax.swing.tree used by javax.swing.plaf.multi
    Class and Description
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
  • Classes in javax.swing.tree used by javax.swing.plaf.synth
    Class and Description
    TreeCellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    TreeCellRenderer
    Defines the requirements for an object that displays a tree node.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
  • Classes in javax.swing.tree used by javax.swing.text
    Class and Description
    TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.
  • Classes in javax.swing.tree used by javax.swing.text.html
    Class and Description
    TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.
  • Classes in javax.swing.tree used by javax.swing.tree
    Class and Description
    AbstractLayoutCache
    Warning: Serialized objects of this class will not be compatible with future Swing releases.
    AbstractLayoutCache.NodeDimensions
    Used by AbstractLayoutCache to determine the size and x origin of a particular node.
    DefaultMutableTreeNode
    A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
    DefaultTreeCellRenderer
    Displays an entry in a tree.
    MutableTreeNode
    Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
    RowMapper
    Defines the requirements for an object that translates paths in the tree into display rows.
    TreeCellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    TreeCellRenderer
    Defines the requirements for an object that displays a tree node.
    TreeModel
    The model used by JTree.
    TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.
    TreePath
    TreePath represents an array of objects that uniquely identify the path to a node in a tree.
    TreeSelectionModel
    This interface represents the current state of the selection for the tree component.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class AbstractLayoutCache

  • java.lang.Object
    • javax.swing.tree.AbstractLayoutCache
  • All Implemented Interfaces:
    RowMapper
    Direct Known Subclasses:
    FixedHeightLayoutCache, VariableHeightLayoutCache

    public abstract class AbstractLayoutCache
extends Object
implements RowMapper
    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  AbstractLayoutCache.NodeDimensions
      Used by AbstractLayoutCache to determine the size and x origin of a particular node.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected AbstractLayoutCache.NodeDimensions nodeDimensions
      Object responsible for getting the size of a node.
      protected boolean rootVisible
      True if the root node is displayed, false if its children are the highest visible nodes.
      protected int rowHeight
      Height to use for each row.
      protected TreeModel treeModel
      Model providing information.
      protected TreeSelectionModel treeSelectionModel
      Selection model.

    • Constructor Summary

      Constructors
      Constructor and Description
      AbstractLayoutCache()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Rectangle getBounds(TreePath path, Rectangle placeIn)
      Returns a rectangle giving the bounds needed to draw path.
      abstract boolean getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      TreeModel getModel()
      Returns the TreeModel that is providing the data.
      AbstractLayoutCache.NodeDimensions getNodeDimensions()
      Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
      protected Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn)
      Returns, by reference in placeIn, the size needed to represent value.
      abstract TreePath getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      abstract TreePath getPathForRow(int row)
      Returns the path for passed in row.
      int getPreferredHeight()
      Returns the preferred height.
      int getPreferredWidth(Rectangle bounds)
      Returns the preferred width for the passed in region.
      abstract int getRowCount()
      Number of rows being displayed.
      abstract int getRowForPath(TreePath path)
      Returns the row that the last item identified in path is visible at.
      int getRowHeight()
      Returns the height of each row.
      int[] getRowsForPaths(TreePath[] paths)
      Returns the rows that the TreePath instances in path are being displayed at.
      TreeSelectionModel getSelectionModel()
      Returns the model used to maintain the selection.
      abstract int getVisibleChildCount(TreePath path)
      Returns the number of visible children for row.
      abstract Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      abstract void invalidatePathBounds(TreePath path)
      Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
      abstract void invalidateSizes()
      Informs the TreeState that it needs to recalculate all the sizes it is referencing.
      abstract boolean isExpanded(TreePath path)
      Returns true if the value identified by row is currently expanded.
      protected boolean isFixedRowHeight()
      Returns true if the height of each row is a fixed size.
      boolean isRootVisible()
      Returns true if the root node of the tree is displayed.
      abstract void setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      void setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
      Sets the renderer that is responsible for drawing nodes in the tree and which is therefore responsible for calculating the dimensions of individual nodes.
      void setRootVisible(boolean rootVisible)
      Determines whether or not the root node from the TreeModel is visible.
      void setRowHeight(int rowHeight)
      Sets the height of each cell.
      void setSelectionModel(TreeSelectionModel newLSM)
      Sets the TreeSelectionModel used to manage the selection to new LSM.
      abstract void treeNodesChanged(TreeModelEvent e)
      Invoked after a node (or a set of siblings) has changed in some way.
      abstract void treeNodesInserted(TreeModelEvent e)
      Invoked after nodes have been inserted into the tree.
      abstract void treeNodesRemoved(TreeModelEvent e)
      Invoked after nodes have been removed from the tree.
      abstract void treeStructureChanged(TreeModelEvent e)
      Invoked after the tree has drastically changed structure from a given node down.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • nodeDimensions

        protected AbstractLayoutCache.NodeDimensions nodeDimensions
        Object responsible for getting the size of a node.

      • treeModel

        protected TreeModel treeModel
        Model providing information.

      • treeSelectionModel

        protected TreeSelectionModel treeSelectionModel
        Selection model.

      • rootVisible

        protected boolean rootVisible
        True if the root node is displayed, false if its children are the highest visible nodes.

      • rowHeight

        protected int rowHeight
        Height to use for each row. If this is <= 0 the renderer will be used to determine the height for each row.

    • Constructor Detail

      • AbstractLayoutCache

        public AbstractLayoutCache()

    • Method Detail

      • setNodeDimensions

        public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
        Sets the renderer that is responsible for drawing nodes in the tree and which is therefore responsible for calculating the dimensions of individual nodes.
        Parameters:
        nd - a NodeDimensions object

      • getNodeDimensions

        public AbstractLayoutCache.NodeDimensions getNodeDimensions()
        Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
        Returns:
        the NodeDimensions object

      • setModel

        public void setModel(TreeModel newModel)
        Sets the TreeModel that will provide the data.
        Parameters:
        newModel - the TreeModel that is to provide the data

      • getModel

        public TreeModel getModel()
        Returns the TreeModel that is providing the data.
        Returns:
        the TreeModel that is providing the data

      • setRootVisible

        public void setRootVisible(boolean rootVisible)
        Determines whether or not the root node from the TreeModel is visible.
        Parameters:
        rootVisible - true if the root node of the tree is to be displayed
        See Also:
        rootVisible

      • isRootVisible

        public boolean isRootVisible()
        Returns true if the root node of the tree is displayed.
        Returns:
        true if the root node of the tree is displayed
        See Also:
        rootVisible

      • setRowHeight

        public void setRowHeight(int rowHeight)
        Sets the height of each cell. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height.
        Parameters:
        rowHeight - the height of each cell, in pixels

      • getRowHeight

        public int getRowHeight()
        Returns the height of each row. If the returned value is less than or equal to 0 the height for each row is determined by the renderer.

      • setSelectionModel

        public void setSelectionModel(TreeSelectionModel newLSM)
        Sets the TreeSelectionModel used to manage the selection to new LSM.
        Parameters:
        newLSM - the new TreeSelectionModel

      • getSelectionModel

        public TreeSelectionModel getSelectionModel()
        Returns the model used to maintain the selection.
        Returns:
        the treeSelectionModel

      • getPreferredHeight

        public int getPreferredHeight()
        Returns the preferred height.
        Returns:
        the preferred height

      • getPreferredWidth

        public int getPreferredWidth(Rectangle bounds)
        Returns the preferred width for the passed in region. The region is defined by the path closest to (bounds.x, bounds.y) and ends at bounds.height + bounds.y. If bounds is null, the preferred width for all the nodes will be returned (and this may be a VERY expensive computation).
        Parameters:
        bounds - the region being queried
        Returns:
        the preferred width for the passed in region

      • isExpanded

        public abstract boolean isExpanded(TreePath path)
        Returns true if the value identified by row is currently expanded.

      • getBounds

        public abstract Rectangle getBounds(TreePath path,
                                    Rectangle placeIn)
        Returns a rectangle giving the bounds needed to draw path.
        Parameters:
        path - a TreePath specifying a node
        placeIn - a Rectangle object giving the available space
        Returns:
        a Rectangle object specifying the space to be used

      • getPathForRow

        public abstract TreePath getPathForRow(int row)
        Returns the path for passed in row. If row is not visible null is returned.
        Parameters:
        row - the row being queried
        Returns:
        the TreePath for the given row

      • getRowForPath

        public abstract int getRowForPath(TreePath path)
        Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
        Parameters:
        path - the TreePath being queried
        Returns:
        the row where the last item in path is visible or -1 if any elements in path aren't currently visible

      • getPathClosestTo

        public abstract TreePath getPathClosestTo(int x,
                                          int y)
        Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
        Parameters:
        x - the horizontal component of the desired location
        y - the vertical component of the desired location
        Returns:
        the TreePath closest to the specified point

      • getVisiblePathsFrom

        public abstract Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
        Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed. The first element of the returned enumeration will be path, unless it isn't visible, in which case null will be returned.
        Parameters:
        path - the starting location for the enumeration
        Returns:
        the Enumerator starting at the desired location

      • getVisibleChildCount

        public abstract int getVisibleChildCount(TreePath path)
        Returns the number of visible children for row.
        Parameters:
        path - the path being queried
        Returns:
        the number of visible children for the specified path

      • setExpandedState

        public abstract void setExpandedState(TreePath path,
                                      boolean isExpanded)
        Marks the path path expanded state to isExpanded.
        Parameters:
        path - the path being expanded or collapsed
        isExpanded - true if the path should be expanded, false otherwise

      • getExpandedState

        public abstract boolean getExpandedState(TreePath path)
        Returns true if the path is expanded, and visible.
        Parameters:
        path - the path being queried
        Returns:
        true if the path is expanded and visible, false otherwise

      • getRowCount

        public abstract int getRowCount()
        Number of rows being displayed.
        Returns:
        the number of rows being displayed

      • invalidateSizes

        public abstract void invalidateSizes()
        Informs the TreeState that it needs to recalculate all the sizes it is referencing.

      • invalidatePathBounds

        public abstract void invalidatePathBounds(TreePath path)
        Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
        Parameters:
        path - the path being updated

      • treeNodesChanged

        public abstract void treeNodesChanged(TreeModelEvent e)

        Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

        e.path() returns the path the parent of the changed node(s).

        e.childIndices() returns the index(es) of the changed node(s).

        Parameters:
        e - the TreeModelEvent

      • treeNodesInserted

        public abstract void treeNodesInserted(TreeModelEvent e)

        Invoked after nodes have been inserted into the tree.

        e.path() returns the parent of the new nodes

        e.childIndices() returns the indices of the new nodes in ascending order.

        Parameters:
        e - the TreeModelEvent

      • treeNodesRemoved

        public abstract void treeNodesRemoved(TreeModelEvent e)

        Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

        e.path() returns the former parent of the deleted nodes.

        e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

        Parameters:
        e - the TreeModelEvent

      • treeStructureChanged

        public abstract void treeStructureChanged(TreeModelEvent e)

        Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

        e.path() holds the path to the node.

        e.childIndices() returns null.

        Parameters:
        e - the TreeModelEvent

      • getRowsForPaths

        public int[] getRowsForPaths(TreePath[] paths)
        Returns the rows that the TreePath instances in path are being displayed at. This method should return an array of the same length as that passed in, and if one of the TreePaths in path is not valid its entry in the array should be set to -1.
        Specified by:
        getRowsForPaths in interface RowMapper
        Parameters:
        paths - the array of TreePaths being queried
        Returns:
        an array of the same length that is passed in containing the rows that each corresponding where each TreePath is displayed; if paths is null, null is returned

      • getNodeDimensions

        protected Rectangle getNodeDimensions(Object value,
                                      int row,
                                      int depth,
                                      boolean expanded,
                                      Rectangle placeIn)
        Returns, by reference in placeIn, the size needed to represent value. If inPlace is null, a newly created Rectangle should be returned, otherwise the value should be placed in inPlace and returned. This will return null if there is no renderer.
        Parameters:
        value - the value to be represented
        row - row being queried
        depth - the depth of the row
        expanded - true if row is expanded, false otherwise
        placeIn - a Rectangle containing the size needed to represent value
        Returns:
        a Rectangle containing the node dimensions, or null if node has no dimension

      • isFixedRowHeight

        protected boolean isFixedRowHeight()
        Returns true if the height of each row is a fixed size.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractLayoutCache.NodeDimensions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class AbstractLayoutCache.NodeDimensions

  • java.lang.Object
    • javax.swing.tree.AbstractLayoutCache.NodeDimensions
  • Direct Known Subclasses:
    BasicTreeUI.NodeDimensionsHandler
    Enclosing class:
    AbstractLayoutCache

    public abstract static class AbstractLayoutCache.NodeDimensions
extends Object
    Used by AbstractLayoutCache to determine the size and x origin of a particular node.

    • Constructor Summary

      Constructors
      Constructor and Description
      NodeDimensions()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds)
      Returns, by reference in bounds, the size and x origin to place value at.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NodeDimensions

        public NodeDimensions()

    • Method Detail

      • getNodeDimensions

        public abstract Rectangle getNodeDimensions(Object value,
                                            int row,
                                            int depth,
                                            boolean expanded,
                                            Rectangle bounds)
        Returns, by reference in bounds, the size and x origin to place value at. The calling method is responsible for determining the Y location. If bounds is null, a newly created Rectangle should be returned, otherwise the value should be placed in bounds and returned.
        Parameters:
        value - the value to be represented
        row - row being queried
        depth - the depth of the row
        expanded - true if row is expanded, false otherwise
        bounds - a Rectangle containing the size needed to represent value
        Returns:
        a Rectangle containing the node dimensions, or null if node has no dimension
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.AbstractLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.AbstractLayoutCache

  • Packages that use AbstractLayoutCache
    Package Description
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of AbstractLayoutCache in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as AbstractLayoutCache
      Modifier and Type Field and Description
      protected AbstractLayoutCache BasicTreeUI.treeState
      Object responsible for handling sizing and expanded issues.
      Methods in javax.swing.plaf.basic that return AbstractLayoutCache
      Modifier and Type Method and Description
      protected AbstractLayoutCache BasicTreeUI.createLayoutCache()
      Creates the object responsible for managing what is expanded, as well as the size of nodes.

    • Uses of AbstractLayoutCache in javax.swing.tree

      Subclasses of AbstractLayoutCache in javax.swing.tree
      Modifier and Type Class and Description
      class  FixedHeightLayoutCache
      NOTE: This will become more open in a future release.
      class  VariableHeightLayoutCache
      NOTE: This will become more open in a future release.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.AbstractLayoutCache.NodeDimensions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.AbstractLayoutCache.NodeDimensions

  • Packages that use AbstractLayoutCache.NodeDimensions
    Package Description
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of AbstractLayoutCache.NodeDimensions in javax.swing.plaf.basic

      Subclasses of AbstractLayoutCache.NodeDimensions in javax.swing.plaf.basic
      Modifier and Type Class and Description
      class  BasicTreeUI.NodeDimensionsHandler
      Class responsible for getting size of node, method is forwarded to BasicTreeUI method.
      Fields in javax.swing.plaf.basic declared as AbstractLayoutCache.NodeDimensions
      Modifier and Type Field and Description
      protected AbstractLayoutCache.NodeDimensions BasicTreeUI.nodeDimensions
      Reponsible for telling the TreeState the size needed for a node.
      Methods in javax.swing.plaf.basic that return AbstractLayoutCache.NodeDimensions
      Modifier and Type Method and Description
      protected AbstractLayoutCache.NodeDimensions BasicTreeUI.createNodeDimensions()
      Creates an instance of NodeDimensions that is able to determine the size of a given node in the tree.

    • Uses of AbstractLayoutCache.NodeDimensions in javax.swing.tree

      Fields in javax.swing.tree declared as AbstractLayoutCache.NodeDimensions
      Modifier and Type Field and Description
      protected AbstractLayoutCache.NodeDimensions AbstractLayoutCache.nodeDimensions
      Object responsible for getting the size of a node.
      Methods in javax.swing.tree that return AbstractLayoutCache.NodeDimensions
      Modifier and Type Method and Description
      AbstractLayoutCache.NodeDimensions AbstractLayoutCache.getNodeDimensions()
      Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
      Methods in javax.swing.tree with parameters of type AbstractLayoutCache.NodeDimensions
      Modifier and Type Method and Description
      void AbstractLayoutCache.setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
      Sets the renderer that is responsible for drawing nodes in the tree and which is therefore responsible for calculating the dimensions of individual nodes.
      void VariableHeightLayoutCache.setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
      Sets the renderer that is responsible for drawing nodes in the tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultMutableTreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultMutableTreeNode

  • Packages that use DefaultMutableTreeNode
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of DefaultMutableTreeNode in javax.swing

      Subclasses of DefaultMutableTreeNode in javax.swing
      Modifier and Type Class and Description
      static class  JTree.DynamicUtilTreeNode
      DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
      Methods in javax.swing with parameters of type DefaultMutableTreeNode
      Modifier and Type Method and Description
      static void JTree.DynamicUtilTreeNode.createChildren(DefaultMutableTreeNode parent, Object children)
      Adds to parent all the children in children.

    • Uses of DefaultMutableTreeNode in javax.swing.tree

      Methods in javax.swing.tree that return DefaultMutableTreeNode
      Modifier and Type Method and Description
      DefaultMutableTreeNode DefaultMutableTreeNode.getFirstLeaf()
      Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf.
      DefaultMutableTreeNode DefaultMutableTreeNode.getLastLeaf()
      Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf.
      DefaultMutableTreeNode DefaultMutableTreeNode.getNextLeaf()
      Returns the leaf after this node or null if this node is the last leaf in the tree.
      DefaultMutableTreeNode DefaultMutableTreeNode.getNextNode()
      Returns the node that follows this node in a preorder traversal of this node's tree.
      DefaultMutableTreeNode DefaultMutableTreeNode.getNextSibling()
      Returns the next sibling of this node in the parent's children array.
      DefaultMutableTreeNode DefaultMutableTreeNode.getPreviousLeaf()
      Returns the leaf before this node or null if this node is the first leaf in the tree.
      DefaultMutableTreeNode DefaultMutableTreeNode.getPreviousNode()
      Returns the node that precedes this node in a preorder traversal of this node's tree.
      DefaultMutableTreeNode DefaultMutableTreeNode.getPreviousSibling()
      Returns the previous sibling of this node in the parent's children array.
      Methods in javax.swing.tree with parameters of type DefaultMutableTreeNode
      Modifier and Type Method and Description
      TreeNode DefaultMutableTreeNode.getSharedAncestor(DefaultMutableTreeNode aNode)
      Returns the nearest common ancestor to this node and aNode.
      boolean DefaultMutableTreeNode.isNodeDescendant(DefaultMutableTreeNode anotherNode)
      Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children.
      boolean DefaultMutableTreeNode.isNodeRelated(DefaultMutableTreeNode aNode)
      Returns true if and only if aNode is in the same tree as this node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeCellEditor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeCellEditor

No usage of javax.swing.tree.DefaultTreeCellEditor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

No usage of javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeCellEditor.EditorContainer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeCellEditor.EditorContainer

No usage of javax.swing.tree.DefaultTreeCellEditor.EditorContainer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeCellRenderer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeCellRenderer

  • Packages that use DefaultTreeCellRenderer
    Package Description
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of DefaultTreeCellRenderer in javax.swing.tree

      Fields in javax.swing.tree declared as DefaultTreeCellRenderer
      Modifier and Type Field and Description
      protected DefaultTreeCellRenderer DefaultTreeCellEditor.renderer
      Renderer, used to get border and offsets from.
      Constructors in javax.swing.tree with parameters of type DefaultTreeCellRenderer
      Constructor and Description
      DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
      DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeModel

No usage of javax.swing.tree.DefaultTreeModel
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.DefaultTreeSelectionModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.DefaultTreeSelectionModel

  • Packages that use DefaultTreeSelectionModel
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

    • Uses of DefaultTreeSelectionModel in javax.swing

      Subclasses of DefaultTreeSelectionModel in javax.swing
      Modifier and Type Class and Description
      protected static class  JTree.EmptySelectionModel
      EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.ExpandVetoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.ExpandVetoException

  • Packages that use ExpandVetoException
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.event
    Provides for events fired by Swing components.

    • Uses of ExpandVetoException in javax.swing

      Methods in javax.swing that throw ExpandVetoException
      Modifier and Type Method and Description
      void JTree.fireTreeWillCollapse(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.
      void JTree.fireTreeWillExpand(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.

    • Uses of ExpandVetoException in javax.swing.event

      Methods in javax.swing.event that throw ExpandVetoException
      Modifier and Type Method and Description
      void TreeWillExpandListener.treeWillCollapse(TreeExpansionEvent event)
      Invoked whenever a node in the tree is about to be collapsed.
      void TreeWillExpandListener.treeWillExpand(TreeExpansionEvent event)
      Invoked whenever a node in the tree is about to be expanded.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.FixedHeightLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.FixedHeightLayoutCache

No usage of javax.swing.tree.FixedHeightLayoutCache
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.TreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.TreePath

  • Packages that use TreePath
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.event
    Provides for events fired by Swing components.
    javax.swing.plaf
    Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.plaf.metal
    Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.
    javax.swing.plaf.multi
    Provides user interface objects that combine two or more look and feels.
    javax.swing.plaf.synth
    Synth is a skinnable look and feel in which all painting is delegated.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreePath in javax.swing

      Methods in javax.swing that return TreePath
      Modifier and Type Method and Description
      TreePath JTree.getAnchorSelectionPath()
      Returns the path identified as the anchor.
      TreePath JTree.getClosestPathForLocation(int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath JTree.getEditingPath()
      Returns the path to the element that is currently being edited.
      TreePath JTree.getLeadSelectionPath()
      Returns the path identified as the lead.
      TreePath JTree.getNextMatch(String prefix, int startingRow, Position.Bias bias)
      Returns the TreePath to the next tree element that begins with a prefix.
      TreePath JTree.DropLocation.getPath()
      Returns the path where dropped data should be placed in the tree.
      protected TreePath[] JTree.getPathBetweenRows(int index0, int index1)
      Returns the paths (inclusive) between the specified rows.
      TreePath JTree.getPathForLocation(int x, int y)
      Returns the path for the node at the specified location.
      TreePath JTree.getPathForRow(int row)
      Returns the path for the specified row.
      TreePath JTree.getSelectionPath()
      Returns the path to the first selected node.
      TreePath[] JTree.getSelectionPaths()
      Returns the paths of all selected values.
      Methods in javax.swing that return types with arguments of type TreePath
      Modifier and Type Method and Description
      protected Enumeration<TreePath> JTree.getDescendantToggledPaths(TreePath parent)
      Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
      Enumeration<TreePath> JTree.getExpandedDescendants(TreePath parent)
      Returns an Enumeration of the descendants of the path parent that are currently expanded.
      Methods in javax.swing with parameters of type TreePath
      Modifier and Type Method and Description
      void JTree.addSelectionPath(TreePath path)
      Adds the node identified by the specified TreePath to the current selection.
      void JTree.addSelectionPaths(TreePath[] paths)
      Adds each path in the array of paths to the current selection.
      void JTree.EmptySelectionModel.addSelectionPaths(TreePath[] paths)
      This is overriden to do nothing; EmptySelectionModel does not allow a selection.
      void JTree.collapsePath(TreePath path)
      Ensures that the node identified by the specified path is collapsed and viewable.
      void JTree.expandPath(TreePath path)
      Ensures that the node identified by the specified path is expanded and viewable.
      void JTree.fireTreeCollapsed(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.
      void JTree.fireTreeExpanded(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.
      void JTree.fireTreeWillCollapse(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.
      void JTree.fireTreeWillExpand(TreePath path)
      Notifies all listeners that have registered interest for notification on this event type.
      protected Enumeration<TreePath> JTree.getDescendantToggledPaths(TreePath parent)
      Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
      Enumeration<TreePath> JTree.getExpandedDescendants(TreePath parent)
      Returns an Enumeration of the descendants of the path parent that are currently expanded.
      Rectangle JTree.getPathBounds(TreePath path)
      Returns the Rectangle that the specified node will be drawn into.
      int JTree.getRowForPath(TreePath path)
      Returns the row that displays the node identified by the specified path.
      boolean JTree.hasBeenExpanded(TreePath path)
      Returns true if the node identified by the path has ever been expanded.
      boolean JTree.isCollapsed(TreePath path)
      Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
      boolean JTree.isExpanded(TreePath path)
      Returns true if the node identified by the path is currently expanded,
      boolean JTree.isPathEditable(TreePath path)
      Returns isEditable.
      boolean JTree.isPathSelected(TreePath path)
      Returns true if the item identified by the path is currently selected.
      boolean JTree.isVisible(TreePath path)
      Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.
      void JTree.makeVisible(TreePath path)
      Ensures that the node identified by path is currently viewable.
      protected boolean JTree.removeDescendantSelectedPaths(TreePath path, boolean includePath)
      Removes any paths in the selection that are descendants of path.
      void JTree.removeSelectionPath(TreePath path)
      Removes the node identified by the specified path from the current selection.
      void JTree.removeSelectionPaths(TreePath[] paths)
      Removes the nodes identified by the specified paths from the current selection.
      void JTree.EmptySelectionModel.removeSelectionPaths(TreePath[] paths)
      This is overriden to do nothing; EmptySelectionModel does not allow a selection.
      void JTree.scrollPathToVisible(TreePath path)
      Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.
      void JTree.setAnchorSelectionPath(TreePath newPath)
      Sets the path identified as the anchor.
      protected void JTree.setExpandedState(TreePath path, boolean state)
      Sets the expanded state of this JTree.
      void JTree.setLeadSelectionPath(TreePath newPath)
      Sets the path identifies as the lead.
      void JTree.setSelectionPath(TreePath path)
      Selects the node identified by the specified path.
      void JTree.setSelectionPaths(TreePath[] paths)
      Selects the nodes identified by the specified array of paths.
      void JTree.EmptySelectionModel.setSelectionPaths(TreePath[] paths)
      This is overriden to do nothing; EmptySelectionModel does not allow a selection.
      void JTree.startEditingAtPath(TreePath path)
      Selects the node identified by the specified path and initiates editing.
      Method parameters in javax.swing with type arguments of type TreePath
      Modifier and Type Method and Description
      protected void JTree.removeDescendantToggledPaths(Enumeration<TreePath> toRemove)
      Removes any descendants of the TreePaths in toRemove that have been expanded.
      Constructors in javax.swing with parameters of type TreePath
      Constructor and Description
      AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
      Constructs an AccessibleJTreeNode

    • Uses of TreePath in javax.swing.event

      Fields in javax.swing.event declared as TreePath
      Modifier and Type Field and Description
      protected TreePath TreeSelectionEvent.newLeadSelectionPath
      leadSelectionPath after the paths changed, may be null.
      protected TreePath TreeSelectionEvent.oldLeadSelectionPath
      leadSelectionPath before the paths changed, may be null.
      protected TreePath TreeModelEvent.path
      Path to the parent of the nodes that have changed.
      protected TreePath TreeExpansionEvent.path
      Path to the value this event represents.
      protected TreePath[] TreeSelectionEvent.paths
      Paths this event represents.
      Methods in javax.swing.event that return TreePath
      Modifier and Type Method and Description
      TreePath TreeSelectionEvent.getNewLeadSelectionPath()
      Returns the current lead path.
      TreePath TreeSelectionEvent.getOldLeadSelectionPath()
      Returns the path that was previously the lead path.
      TreePath TreeSelectionEvent.getPath()
      Returns the first path element.
      TreePath TreeExpansionEvent.getPath()
      Returns the path to the value that has been expanded/collapsed.
      TreePath[] TreeSelectionEvent.getPaths()
      Returns the paths that have been added or removed from the selection.
      TreePath TreeModelEvent.getTreePath()
      For all events, except treeStructureChanged, returns the parent of the changed nodes.
      Methods in javax.swing.event with parameters of type TreePath
      Modifier and Type Method and Description
      boolean TreeSelectionEvent.isAddedPath(TreePath path)
      Returns whether the specified path was added to the selection.
      Constructors in javax.swing.event with parameters of type TreePath
      Constructor and Description
      TreeExpansionEvent(Object source, TreePath path)
      Constructs a TreeExpansionEvent object.
      TreeModelEvent(Object source, TreePath path)
      Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.
      TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)
      Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
      TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
      Represents a change in the selection of a TreeSelectionModel.
      TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
      Represents a change in the selection of a TreeSelectionModel.
      TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
      Represents a change in the selection of a TreeSelectionModel.

    • Uses of TreePath in javax.swing.plaf

      Methods in javax.swing.plaf that return TreePath
      Modifier and Type Method and Description
      abstract TreePath TreeUI.getClosestPathForLocation(JTree tree, int x, int y)
      Returns the path to the node that is closest to x,y.
      abstract TreePath TreeUI.getEditingPath(JTree tree)
      Returns the path to the element that is being edited.
      abstract TreePath TreeUI.getPathForRow(JTree tree, int row)
      Returns the path for passed in row.
      Methods in javax.swing.plaf with parameters of type TreePath
      Modifier and Type Method and Description
      abstract Rectangle TreeUI.getPathBounds(JTree tree, TreePath path)
      Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
      abstract int TreeUI.getRowForPath(JTree tree, TreePath path)
      Returns the row that the last item identified in path is visible at.
      abstract void TreeUI.startEditingAtPath(JTree tree, TreePath path)
      Selects the last item in path and tries to edit it.

    • Uses of TreePath in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as TreePath
      Modifier and Type Field and Description
      protected TreePath BasicTreeUI.editingPath
      Path that is being edited.
      Fields in javax.swing.plaf.basic with type parameters of type TreePath
      Modifier and Type Field and Description
      protected Hashtable<TreePath,Boolean> BasicTreeUI.drawingCache
      Used for minimizing the drawing of vertical lines.
      Methods in javax.swing.plaf.basic that return TreePath
      Modifier and Type Method and Description
      TreePath BasicTreeUI.getClosestPathForLocation(JTree tree, int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath BasicTreeUI.getEditingPath(JTree tree)
      Returns the path to the element that is being edited.
      protected TreePath BasicTreeUI.getLastChildPath(TreePath parent)
      Returns a path to the last child of parent.
      TreePath BasicTreeUI.getPathForRow(JTree tree, int row)
      Returns the path for passed in row.
      Methods in javax.swing.plaf.basic with parameters of type TreePath
      Modifier and Type Method and Description
      protected void BasicTreeUI.checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)
      If the mouseX and mouseY are in the expand/collapse region of the row, this will toggle the row.
      protected TreePath BasicTreeUI.getLastChildPath(TreePath parent)
      Returns a path to the last child of parent.
      Rectangle BasicTreeUI.getPathBounds(JTree tree, TreePath path)
      Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
      int BasicTreeUI.getRowForPath(JTree tree, TreePath path)
      Returns the row that the last item identified in path is visible at.
      protected void BasicTreeUI.handleExpandControlClick(TreePath path, int mouseX, int mouseY)
      Messaged when the user clicks the particular row, this invokes toggleExpandState.
      protected boolean BasicTreeUI.isLocationInExpandControl(TreePath path, int mouseX, int mouseY)
      Returns true if mouseX and mouseY fall in the area of row that is used to expand/collapse the node and the node at row does not represent a leaf.
      protected void BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Paints the expand (toggle) part of a row.
      protected void BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Paints the horizontal part of the leg.
      protected void BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Paints the renderer part of a row.
      protected void BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
      Paints the vertical part of the leg.
      protected void BasicTreeUI.pathWasCollapsed(TreePath path)
      Messaged from the VisibleTreeNode after it has collapsed.
      protected void BasicTreeUI.pathWasExpanded(TreePath path)
      Messaged from the VisibleTreeNode after it has been expanded.
      protected void BasicTreeUI.selectPathForEvent(TreePath path, MouseEvent event)
      Messaged to update the selection based on a MouseEvent over a particular row.
      protected boolean BasicTreeUI.shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Returns true if the expand (toggle) control should be drawn for the specified row.
      protected boolean BasicTreeUI.startEditing(TreePath path, MouseEvent event)
      Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
      void BasicTreeUI.startEditingAtPath(JTree tree, TreePath path)
      Selects the last item in path and tries to edit it.
      protected void BasicTreeUI.toggleExpandState(TreePath path)
      Expands path if it is not expanded, or collapses row if it is expanded.
      protected void BasicTreeUI.updateExpandedDescendants(TreePath path)
      Updates the expanded state of all the descendants of path by getting the expanded descendants from the tree and forwarding to the tree state.

    • Uses of TreePath in javax.swing.plaf.metal

      Methods in javax.swing.plaf.metal with parameters of type TreePath
      Modifier and Type | Method and Description
      protected void | MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      protected void | MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)

    • Uses of TreePath in javax.swing.plaf.multi

      Methods in javax.swing.plaf.multi that return TreePath
      Modifier and Type Method and Description
      TreePath MultiTreeUI.getClosestPathForLocation(JTree a, int b, int c)
      Invokes the getClosestPathForLocation method on each UI handled by this object.
      TreePath MultiTreeUI.getEditingPath(JTree a)
      Invokes the getEditingPath method on each UI handled by this object.
      TreePath MultiTreeUI.getPathForRow(JTree a, int b)
      Invokes the getPathForRow method on each UI handled by this object.
      Methods in javax.swing.plaf.multi with parameters of type TreePath
      Modifier and Type Method and Description
      Rectangle MultiTreeUI.getPathBounds(JTree a, TreePath b)
      Invokes the getPathBounds method on each UI handled by this object.
      int MultiTreeUI.getRowForPath(JTree a, TreePath b)
      Invokes the getRowForPath method on each UI handled by this object.
      void MultiTreeUI.startEditingAtPath(JTree a, TreePath b)
      Invokes the startEditingAtPath method on each UI handled by this object.

    • Uses of TreePath in javax.swing.plaf.synth

      Methods in javax.swing.plaf.synth with parameters of type TreePath
      Modifier and Type Method and Description
      protected void SynthTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Paints the expand (toggle) part of a row.
      protected void SynthTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
      Paints the horizontal part of the leg.
      protected void SynthTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
      Paints the vertical part of the leg.

    • Uses of TreePath in javax.swing.tree

      Fields in javax.swing.tree declared as TreePath
      Modifier and Type Field and Description
      protected TreePath DefaultTreeCellEditor.lastPath
      Last path that was selected.
      protected TreePath DefaultTreeSelectionModel.leadPath
      Last path that was added.
      protected TreePath[] DefaultTreeSelectionModel.selection
      Paths that are currently selected.
      Methods in javax.swing.tree that return TreePath
      Modifier and Type Method and Description
      TreePath TreeSelectionModel.getLeadSelectionPath()
      Returns the last path that was added.
      TreePath DefaultTreeSelectionModel.getLeadSelectionPath()
      Returns the last path that was added.
      TreePath TreePath.getParentPath()
      Returns the TreePath of the parent.
      TreePath FixedHeightLayoutCache.getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      abstract TreePath AbstractLayoutCache.getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath VariableHeightLayoutCache.getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath FixedHeightLayoutCache.getPathForRow(int row)
      Returns the path for passed in row.
      abstract TreePath AbstractLayoutCache.getPathForRow(int row)
      Returns the path for passed in row.
      TreePath VariableHeightLayoutCache.getPathForRow(int row)
      Returns the path for row.
      TreePath TreeSelectionModel.getSelectionPath()
      Returns the first path in the selection.
      TreePath DefaultTreeSelectionModel.getSelectionPath()
      Returns the first path in the selection.
      TreePath[] TreeSelectionModel.getSelectionPaths()
      Returns the paths in the selection.
      TreePath[] DefaultTreeSelectionModel.getSelectionPaths()
      Returns the selection.
      TreePath TreePath.pathByAddingChild(Object child)
      Returns a new path containing all the elements of this path plus child.
      Methods in javax.swing.tree that return types with arguments of type TreePath
      Modifier and Type Method and Description
      Enumeration<TreePath> FixedHeightLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      abstract Enumeration<TreePath> AbstractLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      Enumeration<TreePath> VariableHeightLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      Methods in javax.swing.tree with parameters of type TreePath
      Modifier and Type Method and Description
      void TreeSelectionModel.addSelectionPath(TreePath path)
      Adds path to the current selection.
      void DefaultTreeSelectionModel.addSelectionPath(TreePath path)
      Adds path to the current selection.
      void TreeSelectionModel.addSelectionPaths(TreePath[] paths)
      Adds paths to the current selection.
      void DefaultTreeSelectionModel.addSelectionPaths(TreePath[] paths)
      Adds paths to the current selection.
      protected boolean DefaultTreeSelectionModel.arePathsContiguous(TreePath[] paths)
      Returns true if the paths are contiguous, or this object has no RowMapper.
      protected boolean DefaultTreeSelectionModel.canPathsBeAdded(TreePath[] paths)
      Used to test if a particular set of TreePaths can be added.
      protected boolean DefaultTreeSelectionModel.canPathsBeRemoved(TreePath[] paths)
      Returns true if the paths can be removed without breaking the continuity of the model.
      Rectangle FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
      Returns a rectangle giving the bounds needed to draw path.
      abstract Rectangle AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn)
      Returns a rectangle giving the bounds needed to draw path.
      Rectangle VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn)
      Returns the Rectangle enclosing the label portion into which the item identified by path will be drawn.
      boolean FixedHeightLayoutCache.getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      abstract boolean AbstractLayoutCache.getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      boolean VariableHeightLayoutCache.getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      int FixedHeightLayoutCache.getRowForPath(TreePath path)
      Returns the row that the last item identified in path is visible at.
      abstract int AbstractLayoutCache.getRowForPath(TreePath path)
      Returns the row that the last item identified in path is visible at.
      int VariableHeightLayoutCache.getRowForPath(TreePath path)
      Returns the row where the last item identified in path is visible.
      int[] RowMapper.getRowsForPaths(TreePath[] path)
      Returns the rows that the TreePath instances in path are being displayed at.
      int[] AbstractLayoutCache.getRowsForPaths(TreePath[] paths)
      Returns the rows that the TreePath instances in path are being displayed at.
      int FixedHeightLayoutCache.getVisibleChildCount(TreePath path)
      Returns the number of visible children for row.
      abstract int AbstractLayoutCache.getVisibleChildCount(TreePath path)
      Returns the number of visible children for row.
      int VariableHeightLayoutCache.getVisibleChildCount(TreePath path)
      Returns the number of visible children for path.
      Enumeration<TreePath> FixedHeightLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      abstract Enumeration<TreePath> AbstractLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      Enumeration<TreePath> VariableHeightLayoutCache.getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      void FixedHeightLayoutCache.invalidatePathBounds(TreePath path)
      Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
      abstract void AbstractLayoutCache.invalidatePathBounds(TreePath path)
      Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
      void VariableHeightLayoutCache.invalidatePathBounds(TreePath path)
      Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
      boolean TreePath.isDescendant(TreePath aTreePath)
      Returns true if aTreePath is a descendant of this TreePath.
      boolean FixedHeightLayoutCache.isExpanded(TreePath path)
      Returns true if the value identified by row is currently expanded.
      abstract boolean AbstractLayoutCache.isExpanded(TreePath path)
      Returns true if the value identified by row is currently expanded.
      boolean VariableHeightLayoutCache.isExpanded(TreePath path)
      Returns true if the value identified by path is currently expanded.
      boolean TreeSelectionModel.isPathSelected(TreePath path)
      Returns true if the path, path, is in the current selection.
      boolean DefaultTreeSelectionModel.isPathSelected(TreePath path)
      Returns true if the path, path, is in the current selection.
      protected void DefaultTreeSelectionModel.notifyPathChange(Vector<?> changedPaths, TreePath oldLeadSelection)
      Deprecated.
      As of JDK version 1.7
      void TreeSelectionModel.removeSelectionPath(TreePath path)
      Removes path from the selection.
      void DefaultTreeSelectionModel.removeSelectionPath(TreePath path)
      Removes path from the selection.
      void TreeSelectionModel.removeSelectionPaths(TreePath[] paths)
      Removes paths from the selection.
      void DefaultTreeSelectionModel.removeSelectionPaths(TreePath[] paths)
      Removes paths from the selection.
      void FixedHeightLayoutCache.setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      abstract void AbstractLayoutCache.setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      void VariableHeightLayoutCache.setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      void TreeSelectionModel.setSelectionPath(TreePath path)
      Sets the selection to path.
      void DefaultTreeSelectionModel.setSelectionPath(TreePath path)
      Sets the selection to path.
      void TreeSelectionModel.setSelectionPaths(TreePath[] paths)
      Sets the selection to path.
      void DefaultTreeSelectionModel.setSelectionPaths(TreePath[] pPaths)
      Sets the selection.
      void DefaultTreeModel.valueForPathChanged(TreePath path, Object newValue)
      This sets the user object of the TreeNode identified by path and posts a node changed.
      void TreeModel.valueForPathChanged(TreePath path, Object newValue)
      Messaged when the user has altered the value for the item identified by path to newValue.
      Constructors in javax.swing.tree with parameters of type TreePath
      Constructor and Description
      TreePath(TreePath parent, Object lastPathComponent)
      Creates a TreePath with the specified parent and element.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.tree.VariableHeightLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.tree.VariableHeightLayoutCache

No usage of javax.swing.tree.VariableHeightLayoutCache
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.MutableTreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.MutableTreeNode

  • Packages that use MutableTreeNode
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of MutableTreeNode in javax.swing

      Classes in javax.swing that implement MutableTreeNode
      Modifier and Type Class and Description
      static class  JTree.DynamicUtilTreeNode
      DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.

    • Uses of MutableTreeNode in javax.swing.tree

      Classes in javax.swing.tree that implement MutableTreeNode
      Modifier and Type Class and Description
      class  DefaultMutableTreeNode
      A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
      Fields in javax.swing.tree declared as MutableTreeNode
      Modifier and Type Field and Description
      protected MutableTreeNode DefaultMutableTreeNode.parent
      this node's parent, or null if this node has no parent
      Methods in javax.swing.tree with parameters of type MutableTreeNode
      Modifier and Type Method and Description
      void DefaultMutableTreeNode.add(MutableTreeNode newChild)
      Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
      void DefaultMutableTreeNode.insert(MutableTreeNode newChild, int childIndex)
      Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.
      void MutableTreeNode.insert(MutableTreeNode child, int index)
      Adds child to the receiver at index.
      void DefaultTreeModel.insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
      Invoked this to insert newChild at location index in parents children.
      void DefaultMutableTreeNode.remove(MutableTreeNode aChild)
      Removes aChild from this node's child array, giving it a null parent.
      void MutableTreeNode.remove(MutableTreeNode node)
      Removes node from the receiver.
      void DefaultTreeModel.removeNodeFromParent(MutableTreeNode node)
      Message this to remove node from its parent.
      void DefaultMutableTreeNode.setParent(MutableTreeNode newParent)
      Sets this node's parent to newParent but does not change the parent's child array.
      void MutableTreeNode.setParent(MutableTreeNode newParent)
      Sets the parent of the receiver to newParent.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.RowMapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.RowMapper

  • Packages that use RowMapper
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of RowMapper in javax.swing

      Methods in javax.swing with parameters of type RowMapper
      Modifier and Type Method and Description
      void JTree.EmptySelectionModel.setRowMapper(RowMapper mapper)
      This is overriden to do nothing; EmptySelectionModel does not allow a selection.

    • Uses of RowMapper in javax.swing.tree

      Classes in javax.swing.tree that implement RowMapper
      Modifier and Type Class and Description
      class  AbstractLayoutCache
      Warning: Serialized objects of this class will not be compatible with future Swing releases.
      class  FixedHeightLayoutCache
      NOTE: This will become more open in a future release.
      class  VariableHeightLayoutCache
      NOTE: This will become more open in a future release.
      Fields in javax.swing.tree declared as RowMapper
      Modifier and Type Field and Description
      protected RowMapper DefaultTreeSelectionModel.rowMapper
      Provides a row for a given path.
      Methods in javax.swing.tree that return RowMapper
      Modifier and Type Method and Description
      RowMapper TreeSelectionModel.getRowMapper()
      Returns the RowMapper instance that is able to map a TreePath to a row.
      RowMapper DefaultTreeSelectionModel.getRowMapper()
      Returns the RowMapper instance that is able to map a TreePath to a row.
      Methods in javax.swing.tree with parameters of type RowMapper
      Modifier and Type Method and Description
      void TreeSelectionModel.setRowMapper(RowMapper newMapper)
      Sets the RowMapper instance.
      void DefaultTreeSelectionModel.setRowMapper(RowMapper newMapper)
      Sets the RowMapper instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.TreeCellEditor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.TreeCellEditor

  • Packages that use TreeCellEditor
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.plaf.synth
    Synth is a skinnable look and feel in which all painting is delegated.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreeCellEditor in javax.swing

      Classes in javax.swing that implement TreeCellEditor
      Modifier and Type Class and Description
      class  DefaultCellEditor
      The default editor for table and tree cells.
      Fields in javax.swing declared as TreeCellEditor
      Modifier and Type Field and Description
      protected TreeCellEditor JTree.cellEditor
      Editor for the entries.
      Methods in javax.swing that return TreeCellEditor
      Modifier and Type Method and Description
      TreeCellEditor JTree.getCellEditor()
      Returns the editor used to edit entries in the tree.
      Methods in javax.swing with parameters of type TreeCellEditor
      Modifier and Type Method and Description
      void JTree.setCellEditor(TreeCellEditor cellEditor)
      Sets the cell editor.

    • Uses of TreeCellEditor in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as TreeCellEditor
      Modifier and Type Field and Description
      protected TreeCellEditor BasicTreeUI.cellEditor
      Editor for the tree.
      Methods in javax.swing.plaf.basic that return TreeCellEditor
      Modifier and Type | Method and Description
      protected TreeCellEditor BasicTreeUI.createDefaultCellEditor()
      Creates a default cell editor.
      protected TreeCellEditor | BasicTreeUI.getCellEditor()
      Methods in javax.swing.plaf.basic with parameters of type TreeCellEditor
      Modifier and Type Method and Description
      protected void BasicTreeUI.setCellEditor(TreeCellEditor editor)
      Sets the cell editor.

    • Uses of TreeCellEditor in javax.swing.plaf.synth

      Methods in javax.swing.plaf.synth that return TreeCellEditor
      Modifier and Type Method and Description
      protected TreeCellEditor SynthTreeUI.createDefaultCellEditor()
      Creates a default cell editor.

    • Uses of TreeCellEditor in javax.swing.tree

      Classes in javax.swing.tree that implement TreeCellEditor
      Modifier and Type Class and Description
      class  DefaultTreeCellEditor
      A TreeCellEditor.
      Fields in javax.swing.tree declared as TreeCellEditor
      Modifier and Type Field and Description
      protected TreeCellEditor DefaultTreeCellEditor.realEditor
      Editor handling the editing.
      Methods in javax.swing.tree that return TreeCellEditor
      Modifier and Type Method and Description
      protected TreeCellEditor DefaultTreeCellEditor.createTreeCellEditor()
      This is invoked if a TreeCellEditor is not supplied in the constructor.
      Constructors in javax.swing.tree with parameters of type TreeCellEditor
      Constructor and Description
      DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.TreeCellRenderer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.TreeCellRenderer

  • Packages that use TreeCellRenderer
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.plaf.synth
    Synth is a skinnable look and feel in which all painting is delegated.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreeCellRenderer in javax.swing

      Fields in javax.swing declared as TreeCellRenderer
      Modifier and Type Field and Description
      protected TreeCellRenderer JTree.cellRenderer
      The cell used to draw nodes.
      Methods in javax.swing that return TreeCellRenderer
      Modifier and Type Method and Description
      TreeCellRenderer JTree.getCellRenderer()
      Returns the current TreeCellRenderer that is rendering each cell.
      Methods in javax.swing with parameters of type TreeCellRenderer
      Modifier and Type Method and Description
      void JTree.setCellRenderer(TreeCellRenderer x)
      Sets the TreeCellRenderer that will be used to draw each cell.

    • Uses of TreeCellRenderer in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as TreeCellRenderer
      Modifier and Type Field and Description
      protected TreeCellRenderer BasicTreeUI.currentCellRenderer
      Renderer that is being used to do the actual cell drawing.
      Methods in javax.swing.plaf.basic that return TreeCellRenderer
      Modifier and Type Method and Description
      protected TreeCellRenderer BasicTreeUI.createDefaultCellRenderer()
      Returns the default cell renderer that is used to do the stamping of each node.
      protected TreeCellRenderer BasicTreeUI.getCellRenderer()
      Return currentCellRenderer, which will either be the trees renderer, or defaultCellRenderer, which ever wasn't null.
      Methods in javax.swing.plaf.basic with parameters of type TreeCellRenderer
      Modifier and Type Method and Description
      protected void BasicTreeUI.setCellRenderer(TreeCellRenderer tcr)
      Sets the TreeCellRenderer to tcr.

    • Uses of TreeCellRenderer in javax.swing.plaf.synth

      Methods in javax.swing.plaf.synth that return TreeCellRenderer
      Modifier and Type Method and Description
      protected TreeCellRenderer SynthTreeUI.createDefaultCellRenderer()
      Returns the default cell renderer that is used to do the stamping of each node.

    • Uses of TreeCellRenderer in javax.swing.tree

      Classes in javax.swing.tree that implement TreeCellRenderer
      Modifier and Type Class and Description
      class  DefaultTreeCellRenderer
      Displays an entry in a tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.TreeModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.TreeModel

  • Packages that use TreeModel
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreeModel in javax.swing

      Fields in javax.swing declared as TreeModel
      Modifier and Type Field and Description
      protected TreeModel JTree.treeModel
      The model that defines the tree displayed by this object.
      Methods in javax.swing that return TreeModel
      Modifier and Type Method and Description
      protected static TreeModel JTree.createTreeModel(Object value)
      Returns a TreeModel wrapping the specified object.
      protected static TreeModel JTree.getDefaultTreeModel()
      Creates and returns a sample TreeModel.
      TreeModel JTree.getModel()
      Returns the TreeModel that is providing the data.
      Methods in javax.swing with parameters of type TreeModel
      Modifier and Type Method and Description
      void JTree.setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      Constructors in javax.swing with parameters of type TreeModel
      Constructor and Description
      JTree(TreeModel newModel)
      Returns an instance of JTree which displays the root node -- the tree is created using the specified data model.

    • Uses of TreeModel in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as TreeModel
      Modifier and Type Field and Description
      protected TreeModel BasicTreeUI.treeModel
      Used to determine what to display.
      Methods in javax.swing.plaf.basic that return TreeModel
      Modifier and Type | Method and Description
      protected TreeModel | BasicTreeUI.getModel()
      Methods in javax.swing.plaf.basic with parameters of type TreeModel
      Modifier and Type Method and Description
      protected void BasicTreeUI.setModel(TreeModel model)
      Sets the TreeModel.

    • Uses of TreeModel in javax.swing.tree

      Classes in javax.swing.tree that implement TreeModel
      Modifier and Type Class and Description
      class  DefaultTreeModel
      A simple tree data model that uses TreeNodes.
      Fields in javax.swing.tree declared as TreeModel
      Modifier and Type Field and Description
      protected TreeModel AbstractLayoutCache.treeModel
      Model providing information.
      Methods in javax.swing.tree that return TreeModel
      Modifier and Type Method and Description
      TreeModel AbstractLayoutCache.getModel()
      Returns the TreeModel that is providing the data.
      Methods in javax.swing.tree with parameters of type TreeModel
      Modifier and Type Method and Description
      void FixedHeightLayoutCache.setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      void AbstractLayoutCache.setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      void VariableHeightLayoutCache.setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.TreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.TreeNode

  • Packages that use TreeNode
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.text.html
    Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreeNode in javax.swing

      Classes in javax.swing that implement TreeNode
      Modifier and Type Class and Description
      static class  JTree.DynamicUtilTreeNode
      DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
      Methods in javax.swing that return TreeNode
      Modifier and Type Method and Description
      TreeNode JTree.DynamicUtilTreeNode.getChildAt(int index)
      Subclassed to load the children, if necessary.
      Constructors in javax.swing with parameters of type TreeNode
      Constructor and Description
      JTree(TreeNode root)
      Returns a JTree with the specified TreeNode as its root, which displays the root node.
      JTree(TreeNode root, boolean asksAllowsChildren)
      Returns a JTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.

    • Uses of TreeNode in javax.swing.text

      Classes in javax.swing.text that implement TreeNode
      Modifier and Type Class and Description
      class  AbstractDocument.AbstractElement
      Implements the abstract part of an element.
      class  AbstractDocument.BranchElement
      Implements a composite element that contains other elements.
      class  AbstractDocument.LeafElement
      Implements an element that directly represents content of some kind.
      protected class  DefaultStyledDocument.SectionElement
      Default root element for a document...
      Methods in javax.swing.text that return TreeNode
      Modifier and Type Method and Description
      TreeNode AbstractDocument.AbstractElement.getChildAt(int childIndex)
      Returns the child TreeNode at index childIndex.
      TreeNode AbstractDocument.AbstractElement.getParent()
      Returns the parent TreeNode of the receiver.
      Methods in javax.swing.text with parameters of type TreeNode
      Modifier and Type Method and Description
      int AbstractDocument.AbstractElement.getIndex(TreeNode node)
      Returns the index of node in the receivers children.

    • Uses of TreeNode in javax.swing.text.html

      Classes in javax.swing.text.html that implement TreeNode
      Modifier and Type Class and Description
      class  HTMLDocument.BlockElement
      An element that represents a structural block of HTML.
      class  HTMLDocument.RunElement
      An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

    • Uses of TreeNode in javax.swing.tree

      Subinterfaces of TreeNode in javax.swing.tree
      Modifier and Type Interface and Description
      interface  MutableTreeNode
      Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
      Classes in javax.swing.tree that implement TreeNode
      Modifier and Type Class and Description
      class  DefaultMutableTreeNode
      A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
      Fields in javax.swing.tree declared as TreeNode
      Modifier and Type Field and Description
      protected TreeNode DefaultTreeModel.root
      Root of the tree.
      Fields in javax.swing.tree with type parameters of type TreeNode
      Modifier and Type Field and Description
      static Enumeration<TreeNode> DefaultMutableTreeNode.EMPTY_ENUMERATION
      An enumeration that is always empty.
      Methods in javax.swing.tree that return TreeNode
      Modifier and Type Method and Description
      TreeNode DefaultMutableTreeNode.getChildAfter(TreeNode aChild)
      Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
      TreeNode TreeNode.getChildAt(int childIndex)
      Returns the child TreeNode at index childIndex.
      TreeNode DefaultMutableTreeNode.getChildAt(int index)
      Returns the child at the specified index in this node's child array.
      TreeNode DefaultMutableTreeNode.getChildBefore(TreeNode aChild)
      Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
      TreeNode DefaultMutableTreeNode.getFirstChild()
      Returns this node's first child.
      TreeNode DefaultMutableTreeNode.getLastChild()
      Returns this node's last child.
      TreeNode TreeNode.getParent()
      Returns the parent TreeNode of the receiver.
      TreeNode DefaultMutableTreeNode.getParent()
      Returns this node's parent or null if this node has no parent.
      TreeNode[] DefaultMutableTreeNode.getPath()
      Returns the path from the root, to get to this node.
      TreeNode[] DefaultTreeModel.getPathToRoot(TreeNode aNode)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      protected TreeNode[] DefaultTreeModel.getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      protected TreeNode[] DefaultMutableTreeNode.getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      TreeNode DefaultMutableTreeNode.getRoot()
      Returns the root of the tree that contains this node.
      TreeNode DefaultMutableTreeNode.getSharedAncestor(DefaultMutableTreeNode aNode)
      Returns the nearest common ancestor to this node and aNode.
      Methods in javax.swing.tree with parameters of type TreeNode
      Modifier and Type Method and Description
      TreeNode DefaultMutableTreeNode.getChildAfter(TreeNode aChild)
      Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
      TreeNode DefaultMutableTreeNode.getChildBefore(TreeNode aChild)
      Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
      int TreeNode.getIndex(TreeNode node)
      Returns the index of node in the receivers children.
      int DefaultMutableTreeNode.getIndex(TreeNode aChild)
      Returns the index of the specified child in this node's child array.
      TreeNode[] DefaultTreeModel.getPathToRoot(TreeNode aNode)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      protected TreeNode[] DefaultTreeModel.getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      protected TreeNode[] DefaultMutableTreeNode.getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      boolean DefaultMutableTreeNode.isNodeAncestor(TreeNode anotherNode)
      Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.
      boolean DefaultMutableTreeNode.isNodeChild(TreeNode aNode)
      Returns true if aNode is a child of this node.
      boolean DefaultMutableTreeNode.isNodeSibling(TreeNode anotherNode)
      Returns true if anotherNode is a sibling of (has the same parent as) this node.
      void DefaultTreeModel.nodeChanged(TreeNode node)
      Invoke this method after you've changed how node is to be represented in the tree.
      void DefaultTreeModel.nodesChanged(TreeNode node, int[] childIndices)
      Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
      void DefaultTreeModel.nodeStructureChanged(TreeNode node)
      Invoke this method if you've totally changed the children of node and its children's children...
      void DefaultTreeModel.nodesWereInserted(TreeNode node, int[] childIndices)
      Invoke this method after you've inserted some TreeNodes into node.
      void DefaultTreeModel.nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)
      Invoke this method after you've removed some TreeNodes from node.
      Enumeration DefaultMutableTreeNode.pathFromAncestorEnumeration(TreeNode ancestor)
      Creates and returns an enumeration that follows the path from ancestor to this node.
      void DefaultTreeModel.reload(TreeNode node)
      Invoke this method if you've modified the TreeNodes upon which this model depends.
      void DefaultTreeModel.setRoot(TreeNode root)
      Sets the root to root.
      Constructors in javax.swing.tree with parameters of type TreeNode
      Constructor and Description
      DefaultTreeModel(TreeNode root)
      Creates a tree in which any node can have children.
      DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
      Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.tree.TreeSelectionModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.tree.TreeSelectionModel

  • Packages that use TreeSelectionModel
    Package Description
    javax.swing
    Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    javax.swing.plaf.basic
    Provides user interface objects built according to the Basic look and feel.
    javax.swing.tree
    Provides classes and interfaces for dealing with javax.swing.JTree.

    • Uses of TreeSelectionModel in javax.swing

      Classes in javax.swing that implement TreeSelectionModel
      Modifier and Type Class and Description
      protected static class  JTree.EmptySelectionModel
      EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
      Fields in javax.swing declared as TreeSelectionModel
      Modifier and Type Field and Description
      protected TreeSelectionModel JTree.selectionModel
      Models the set of selected nodes in this tree.
      Methods in javax.swing that return TreeSelectionModel
      Modifier and Type Method and Description
      TreeSelectionModel JTree.getSelectionModel()
      Returns the model for selections.
      Methods in javax.swing with parameters of type TreeSelectionModel
      Modifier and Type Method and Description
      void JTree.setSelectionModel(TreeSelectionModel selectionModel)
      Sets the tree's selection model.

    • Uses of TreeSelectionModel in javax.swing.plaf.basic

      Fields in javax.swing.plaf.basic declared as TreeSelectionModel
      Modifier and Type Field and Description
      protected TreeSelectionModel BasicTreeUI.treeSelectionModel
      Model maintaining the selection.
      Methods in javax.swing.plaf.basic that return TreeSelectionModel
      Modifier and Type | Method and Description
      protected TreeSelectionModel | BasicTreeUI.getSelectionModel()
      Methods in javax.swing.plaf.basic with parameters of type TreeSelectionModel
      Modifier and Type Method and Description
      protected void BasicTreeUI.setSelectionModel(TreeSelectionModel newLSM)
      Resets the selection model.

    • Uses of TreeSelectionModel in javax.swing.tree

      Classes in javax.swing.tree that implement TreeSelectionModel
      Modifier and Type Class and Description
      class  DefaultTreeSelectionModel
      Default implementation of TreeSelectionModel.
      Fields in javax.swing.tree declared as TreeSelectionModel
      Modifier and Type Field and Description
      protected TreeSelectionModel AbstractLayoutCache.treeSelectionModel
      Selection model.
      Methods in javax.swing.tree that return TreeSelectionModel
      Modifier and Type Method and Description
      TreeSelectionModel AbstractLayoutCache.getSelectionModel()
      Returns the model used to maintain the selection.
      Methods in javax.swing.tree with parameters of type TreeSelectionModel
      Modifier and Type Method and Description
      void AbstractLayoutCache.setSelectionModel(TreeSelectionModel newLSM)
      Sets the TreeSelectionModel used to manage the selection to new LSM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultMutableTreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultMutableTreeNode

  • java.lang.Object
    • javax.swing.tree.DefaultMutableTreeNode
  • All Implemented Interfaces:
    Serializable, Cloneable, MutableTreeNode, TreeNode
    Direct Known Subclasses:
    JTree.DynamicUtilTreeNode

    public class DefaultMutableTreeNode
extends Object
implements Cloneable, MutableTreeNode, Serializable
    A DefaultMutableTreeNode is a general-purpose node in a tree data structure. For examples of using default mutable tree nodes, see How to Use Trees in The Java Tutorial.

    A tree node may have at most one parent and 0 or more children. DefaultMutableTreeNode provides operations for examining and modifying a node's parent and children and also operations for examining the tree that the node is a part of. A node's tree is the set of all nodes that can be reached by starting at the node and following all the possible links to parents and children. A node with no parent is the root of its tree; a node with no children is a leaf. A tree may consist of many subtrees, each node acting as the root for its own subtree.

    This class provides enumerations for efficiently traversing a tree or subtree in various orders or for following the path between two nodes. A DefaultMutableTreeNode may also hold a reference to a user object, the use of which is left to the user. Asking a DefaultMutableTreeNode for its string representation with toString() returns the string representation of its user object.

    This is not a thread safe class.If you intend to use a DefaultMutableTreeNode (or a tree of TreeNodes) in more than one thread, you need to do your own synchronizing. A good convention to adopt is synchronizing on the root node of a tree.

    While DefaultMutableTreeNode implements the MutableTreeNode interface and will allow you to add in any implementation of MutableTreeNode not all of the methods in DefaultMutableTreeNode will be applicable to all MutableTreeNodes implementations. Especially with some of the enumerations that are provided, using some of these methods assumes the DefaultMutableTreeNode contains only DefaultMutableNode instances. All of the TreeNode/MutableTreeNode methods will behave as defined no matter what implementations are added.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    MutableTreeNode

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected boolean allowsChildren
      true if the node is able to have children
      protected Vector children
      array of children, may be null if this node has no children
      static Enumeration<TreeNode> EMPTY_ENUMERATION
      An enumeration that is always empty.
      protected MutableTreeNode parent
      this node's parent, or null if this node has no parent
      protected Object userObject
      optional user object

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultMutableTreeNode()
      Creates a tree node that has no parent and no children, but which allows children.
      DefaultMutableTreeNode(Object userObject)
      Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
      DefaultMutableTreeNode(Object userObject, boolean allowsChildren)
      Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void add(MutableTreeNode newChild)
      Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
      Enumeration breadthFirstEnumeration()
      Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.
      Enumeration children()
      Creates and returns a forward-order enumeration of this node's children.
      Object clone()
      Overridden to make clone public.
      Enumeration depthFirstEnumeration()
      Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.
      boolean getAllowsChildren()
      Returns true if this node is allowed to have children.
      TreeNode getChildAfter(TreeNode aChild)
      Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
      TreeNode getChildAt(int index)
      Returns the child at the specified index in this node's child array.
      TreeNode getChildBefore(TreeNode aChild)
      Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
      int getChildCount()
      Returns the number of children of this node.
      int getDepth()
      Returns the depth of the tree rooted at this node -- the longest distance from this node to a leaf.
      TreeNode getFirstChild()
      Returns this node's first child.
      DefaultMutableTreeNode getFirstLeaf()
      Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf.
      int getIndex(TreeNode aChild)
      Returns the index of the specified child in this node's child array.
      TreeNode getLastChild()
      Returns this node's last child.
      DefaultMutableTreeNode getLastLeaf()
      Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf.
      int getLeafCount()
      Returns the total number of leaves that are descendants of this node.
      int getLevel()
      Returns the number of levels above this node -- the distance from the root to this node.
      DefaultMutableTreeNode getNextLeaf()
      Returns the leaf after this node or null if this node is the last leaf in the tree.
      DefaultMutableTreeNode getNextNode()
      Returns the node that follows this node in a preorder traversal of this node's tree.
      DefaultMutableTreeNode getNextSibling()
      Returns the next sibling of this node in the parent's children array.
      TreeNode getParent()
      Returns this node's parent or null if this node has no parent.
      TreeNode[] getPath()
      Returns the path from the root, to get to this node.
      protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      DefaultMutableTreeNode getPreviousLeaf()
      Returns the leaf before this node or null if this node is the first leaf in the tree.
      DefaultMutableTreeNode getPreviousNode()
      Returns the node that precedes this node in a preorder traversal of this node's tree.
      DefaultMutableTreeNode getPreviousSibling()
      Returns the previous sibling of this node in the parent's children array.
      TreeNode getRoot()
      Returns the root of the tree that contains this node.
      TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)
      Returns the nearest common ancestor to this node and aNode.
      int getSiblingCount()
      Returns the number of siblings of this node.
      Object getUserObject()
      Returns this node's user object.
      Object[] getUserObjectPath()
      Returns the user object path, from the root, to get to this node.
      void insert(MutableTreeNode newChild, int childIndex)
      Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.
      boolean isLeaf()
      Returns true if this node has no children.
      boolean isNodeAncestor(TreeNode anotherNode)
      Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.
      boolean isNodeChild(TreeNode aNode)
      Returns true if aNode is a child of this node.
      boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)
      Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children.
      boolean isNodeRelated(DefaultMutableTreeNode aNode)
      Returns true if and only if aNode is in the same tree as this node.
      boolean isNodeSibling(TreeNode anotherNode)
      Returns true if anotherNode is a sibling of (has the same parent as) this node.
      boolean isRoot()
      Returns true if this node is the root of the tree.
      Enumeration pathFromAncestorEnumeration(TreeNode ancestor)
      Creates and returns an enumeration that follows the path from ancestor to this node.
      Enumeration postorderEnumeration()
      Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.
      Enumeration preorderEnumeration()
      Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.
      void remove(int childIndex)
      Removes the child at the specified index from this node's children and sets that node's parent to null.
      void remove(MutableTreeNode aChild)
      Removes aChild from this node's child array, giving it a null parent.
      void removeAllChildren()
      Removes all of this node's children, setting their parents to null.
      void removeFromParent()
      Removes the subtree rooted at this node from the tree, giving this node a null parent.
      void setAllowsChildren(boolean allows)
      Determines whether or not this node is allowed to have children.
      void setParent(MutableTreeNode newParent)
      Sets this node's parent to newParent but does not change the parent's child array.
      void setUserObject(Object userObject)
      Sets the user object for this node to userObject.
      String toString()
      Returns the result of sending toString() to this node's user object, or the empty string if the node has no user object.

      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • EMPTY_ENUMERATION

        public static final Enumeration<TreeNode> EMPTY_ENUMERATION
        An enumeration that is always empty. This is used when an enumeration of a leaf node's children is requested.

      • parent

        protected MutableTreeNode parent
        this node's parent, or null if this node has no parent

      • children

        protected Vector children
        array of children, may be null if this node has no children

      • userObject

        protected transient Object userObject
        optional user object

      • allowsChildren

        protected boolean allowsChildren
        true if the node is able to have children

    • Constructor Detail

      • DefaultMutableTreeNode

        public DefaultMutableTreeNode()
        Creates a tree node that has no parent and no children, but which allows children.

      • DefaultMutableTreeNode

        public DefaultMutableTreeNode(Object userObject)
        Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
        Parameters:
        userObject - an Object provided by the user that constitutes the node's data

      • DefaultMutableTreeNode

        public DefaultMutableTreeNode(Object userObject,
                              boolean allowsChildren)
        Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
        Parameters:
        userObject - an Object provided by the user that constitutes the node's data
        allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node

    • Method Detail

      • insert

        public void insert(MutableTreeNode newChild,
                   int childIndex)
        Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex. newChild must not be null and must not be an ancestor of this node.
        Specified by:
        insert in interface MutableTreeNode
        Parameters:
        newChild - the MutableTreeNode to insert under this node
        childIndex - the index in this node's child array where this node is to be inserted
        Throws:
        ArrayIndexOutOfBoundsException - if childIndex is out of bounds
        IllegalArgumentException - if newChild is null or is an ancestor of this node
        IllegalStateException - if this node does not allow children
        See Also:
        isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

      • remove

        public void remove(int childIndex)
        Removes the child at the specified index from this node's children and sets that node's parent to null. The child node to remove must be a MutableTreeNode.
        Specified by:
        remove in interface MutableTreeNode
        Parameters:
        childIndex - the index in this node's child array of the child to remove
        Throws:
        ArrayIndexOutOfBoundsException - if childIndex is out of bounds

      • setParent

        public void setParent(MutableTreeNode newParent)
        Sets this node's parent to newParent but does not change the parent's child array. This method is called from insert() and remove() to reassign a child's parent, it should not be messaged from anywhere else.
        Specified by:
        setParent in interface MutableTreeNode
        Parameters:
        newParent - this node's new parent

      • getParent

        public TreeNode getParent()
        Returns this node's parent or null if this node has no parent.
        Specified by:
        getParent in interface TreeNode
        Returns:
        this node's parent TreeNode, or null if this node has no parent

      • getChildAt

        public TreeNode getChildAt(int index)
        Returns the child at the specified index in this node's child array.
        Specified by:
        getChildAt in interface TreeNode
        Parameters:
        index - an index into this node's child array
        Returns:
        the TreeNode in this node's child array at the specified index
        Throws:
        ArrayIndexOutOfBoundsException - if index is out of bounds

      • getChildCount

        public int getChildCount()
        Returns the number of children of this node.
        Specified by:
        getChildCount in interface TreeNode
        Returns:
        an int giving the number of children of this node

      • getIndex

        public int getIndex(TreeNode aChild)
        Returns the index of the specified child in this node's child array. If the specified node is not a child of this node, returns -1. This method performs a linear search and is O(n) where n is the number of children.
        Specified by:
        getIndex in interface TreeNode
        Parameters:
        aChild - the TreeNode to search for among this node's children
        Returns:
        an int giving the index of the node in this node's child array, or -1 if the specified node is a not a child of this node
        Throws:
        IllegalArgumentException - if aChild is null

      • children

        public Enumeration children()
        Creates and returns a forward-order enumeration of this node's children. Modifying this node's child array invalidates any child enumerations created before the modification.
        Specified by:
        children in interface TreeNode
        Returns:
        an Enumeration of this node's children

      • setAllowsChildren

        public void setAllowsChildren(boolean allows)
        Determines whether or not this node is allowed to have children. If allows is false, all of this node's children are removed.

        Note: By default, a node allows children.

        Parameters:
        allows - true if this node is allowed to have children

      • getAllowsChildren

        public boolean getAllowsChildren()
        Returns true if this node is allowed to have children.
        Specified by:
        getAllowsChildren in interface TreeNode
        Returns:
        true if this node allows children, else false

      • setUserObject

        public void setUserObject(Object userObject)
        Sets the user object for this node to userObject.
        Specified by:
        setUserObject in interface MutableTreeNode
        Parameters:
        userObject - the Object that constitutes this node's user-specified data
        See Also:
        getUserObject(), toString()

      • getUserObject

        public Object getUserObject()
        Returns this node's user object.
        Returns:
        the Object stored at this node by the user
        See Also:
        setUserObject(java.lang.Object), toString()

      • removeFromParent

        public void removeFromParent()
        Removes the subtree rooted at this node from the tree, giving this node a null parent. Does nothing if this node is the root of its tree.
        Specified by:
        removeFromParent in interface MutableTreeNode

      • remove

        public void remove(MutableTreeNode aChild)
        Removes aChild from this node's child array, giving it a null parent.
        Specified by:
        remove in interface MutableTreeNode
        Parameters:
        aChild - a child of this node to remove
        Throws:
        IllegalArgumentException - if aChild is null or is not a child of this node

      • removeAllChildren

        public void removeAllChildren()
        Removes all of this node's children, setting their parents to null. If this node has no children, this method does nothing.

      • add

        public void add(MutableTreeNode newChild)
        Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
        Parameters:
        newChild - node to add as a child of this node
        Throws:
        IllegalArgumentException - if newChild is null
        IllegalStateException - if this node does not allow children
        See Also:
        insert(javax.swing.tree.MutableTreeNode, int)

      • isNodeAncestor

        public boolean isNodeAncestor(TreeNode anotherNode)
        Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent. (Note that a node is considered an ancestor of itself.) If anotherNode is null, this method returns false. This operation is at worst O(h) where h is the distance from the root to this node.
        Parameters:
        anotherNode - node to test as an ancestor of this node
        Returns:
        true if this node is a descendant of anotherNode
        See Also:
        isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode), getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode)

      • isNodeDescendant

        public boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)
        Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children. Note that a node is considered a descendant of itself. If anotherNode is null, returns false. This operation is at worst O(h) where h is the distance from the root to anotherNode.
        Parameters:
        anotherNode - node to test as descendant of this node
        Returns:
        true if this node is an ancestor of anotherNode
        See Also:
        isNodeAncestor(javax.swing.tree.TreeNode), getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode)

      • getSharedAncestor

        public TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)
        Returns the nearest common ancestor to this node and aNode. Returns null, if no such ancestor exists -- if this node and aNode are in different trees or if aNode is null. A node is considered an ancestor of itself.
        Parameters:
        aNode - node to find common ancestor with
        Returns:
        nearest ancestor common to this node and aNode, or null if none
        See Also:
        isNodeAncestor(javax.swing.tree.TreeNode), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

      • isNodeRelated

        public boolean isNodeRelated(DefaultMutableTreeNode aNode)
        Returns true if and only if aNode is in the same tree as this node. Returns false if aNode is null.
        Returns:
        true if aNode is in the same tree as this node; false if aNode is null
        See Also:
        getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode), getRoot()

      • getDepth

        public int getDepth()
        Returns the depth of the tree rooted at this node -- the longest distance from this node to a leaf. If this node has no children, returns 0. This operation is much more expensive than getLevel() because it must effectively traverse the entire tree rooted at this node.
        Returns:
        the depth of the tree whose root is this node
        See Also:
        getLevel()

      • getLevel

        public int getLevel()
        Returns the number of levels above this node -- the distance from the root to this node. If this node is the root, returns 0.
        Returns:
        the number of levels above this node
        See Also:
        getDepth()

      • getPath

        public TreeNode[] getPath()
        Returns the path from the root, to get to this node. The last element in the path is this node.
        Returns:
        an array of TreeNode objects giving the path, where the first element in the path is the root and the last element is this node.

      • getPathToRoot

        protected TreeNode[] getPathToRoot(TreeNode aNode,
                                   int depth)
        Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
        Parameters:
        aNode - the TreeNode to get the path for
        depth - an int giving the number of steps already taken towards the root (on recursive calls), used to size the returned array
        Returns:
        an array of TreeNodes giving the path from the root to the specified node

      • getUserObjectPath

        public Object[] getUserObjectPath()
        Returns the user object path, from the root, to get to this node. If some of the TreeNodes in the path have null user objects, the returned path will contain nulls.

      • getRoot

        public TreeNode getRoot()
        Returns the root of the tree that contains this node. The root is the ancestor with a null parent.
        Returns:
        the root of the tree that contains this node
        See Also:
        isNodeAncestor(javax.swing.tree.TreeNode)

      • isRoot

        public boolean isRoot()
        Returns true if this node is the root of the tree. The root is the only node in the tree with a null parent; every tree has exactly one root.
        Returns:
        true if this node is the root of its tree

      • getNextNode

        public DefaultMutableTreeNode getNextNode()
        Returns the node that follows this node in a preorder traversal of this node's tree. Returns null if this node is the last node of the traversal. This is an inefficient way to traverse the entire tree; use an enumeration, instead.
        Returns:
        the node that follows this node in a preorder traversal, or null if this node is last
        See Also:
        preorderEnumeration()

      • getPreviousNode

        public DefaultMutableTreeNode getPreviousNode()
        Returns the node that precedes this node in a preorder traversal of this node's tree. Returns null if this node is the first node of the traversal -- the root of the tree. This is an inefficient way to traverse the entire tree; use an enumeration, instead.
        Returns:
        the node that precedes this node in a preorder traversal, or null if this node is the first
        See Also:
        preorderEnumeration()

      • preorderEnumeration

        public Enumeration preorderEnumeration()
        Creates and returns an enumeration that traverses the subtree rooted at this node in preorder. The first node returned by the enumeration's nextElement() method is this node.

        Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

        Returns:
        an enumeration for traversing the tree in preorder
        See Also:
        postorderEnumeration()

      • postorderEnumeration

        public Enumeration postorderEnumeration()
        Creates and returns an enumeration that traverses the subtree rooted at this node in postorder. The first node returned by the enumeration's nextElement() method is the leftmost leaf. This is the same as a depth-first traversal.

        Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

        Returns:
        an enumeration for traversing the tree in postorder
        See Also:
        depthFirstEnumeration(), preorderEnumeration()

      • breadthFirstEnumeration

        public Enumeration breadthFirstEnumeration()
        Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order. The first node returned by the enumeration's nextElement() method is this node.

        Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

        Returns:
        an enumeration for traversing the tree in breadth-first order
        See Also:
        depthFirstEnumeration()

      • depthFirstEnumeration

        public Enumeration depthFirstEnumeration()
        Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order. The first node returned by the enumeration's nextElement() method is the leftmost leaf. This is the same as a postorder traversal.

        Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

        Returns:
        an enumeration for traversing the tree in depth-first order
        See Also:
        breadthFirstEnumeration(), postorderEnumeration()

      • pathFromAncestorEnumeration

        public Enumeration pathFromAncestorEnumeration(TreeNode ancestor)
        Creates and returns an enumeration that follows the path from ancestor to this node. The enumeration's nextElement() method first returns ancestor, then the child of ancestor that is an ancestor of this node, and so on, and finally returns this node. Creation of the enumeration is O(m) where m is the number of nodes between this node and ancestor, inclusive. Each nextElement() message is O(1).

        Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

        Returns:
        an enumeration for following the path from an ancestor of this node to this one
        Throws:
        IllegalArgumentException - if ancestor is not an ancestor of this node
        See Also:
        isNodeAncestor(javax.swing.tree.TreeNode), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

      • isNodeChild

        public boolean isNodeChild(TreeNode aNode)
        Returns true if aNode is a child of this node. If aNode is null, this method returns false.
        Returns:
        true if aNode is a child of this node; false if aNode is null

      • getFirstChild

        public TreeNode getFirstChild()
        Returns this node's first child. If this node has no children, throws NoSuchElementException.
        Returns:
        the first child of this node
        Throws:
        NoSuchElementException - if this node has no children

      • getLastChild

        public TreeNode getLastChild()
        Returns this node's last child. If this node has no children, throws NoSuchElementException.
        Returns:
        the last child of this node
        Throws:
        NoSuchElementException - if this node has no children

      • getChildAfter

        public TreeNode getChildAfter(TreeNode aChild)
        Returns the child in this node's child array that immediately follows aChild, which must be a child of this node. If aChild is the last child, returns null. This method performs a linear search of this node's children for aChild and is O(n) where n is the number of children; to traverse the entire array of children, use an enumeration instead.
        Returns:
        the child of this node that immediately follows aChild
        Throws:
        IllegalArgumentException - if aChild is null or is not a child of this node
        See Also:
        children

      • getChildBefore

        public TreeNode getChildBefore(TreeNode aChild)
        Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node. If aChild is the first child, returns null. This method performs a linear search of this node's children for aChild and is O(n) where n is the number of children.
        Returns:
        the child of this node that immediately precedes aChild
        Throws:
        IllegalArgumentException - if aChild is null or is not a child of this node

      • isNodeSibling

        public boolean isNodeSibling(TreeNode anotherNode)
        Returns true if anotherNode is a sibling of (has the same parent as) this node. A node is its own sibling. If anotherNode is null, returns false.
        Parameters:
        anotherNode - node to test as sibling of this node
        Returns:
        true if anotherNode is a sibling of this node

      • getSiblingCount

        public int getSiblingCount()
        Returns the number of siblings of this node. A node is its own sibling (if it has no parent or no siblings, this method returns 1).
        Returns:
        the number of siblings of this node

      • getNextSibling

        public DefaultMutableTreeNode getNextSibling()
        Returns the next sibling of this node in the parent's children array. Returns null if this node has no parent or is the parent's last child. This method performs a linear search that is O(n) where n is the number of children; to traverse the entire array, use the parent's child enumeration instead.
        Returns:
        the sibling of this node that immediately follows this node
        See Also:
        children

      • getPreviousSibling

        public DefaultMutableTreeNode getPreviousSibling()
        Returns the previous sibling of this node in the parent's children array. Returns null if this node has no parent or is the parent's first child. This method performs a linear search that is O(n) where n is the number of children.
        Returns:
        the sibling of this node that immediately precedes this node

      • isLeaf

        public boolean isLeaf()
        Returns true if this node has no children. To distinguish between nodes that have no children and nodes that cannot have children (e.g. to distinguish files from empty directories), use this method in conjunction with getAllowsChildren
        Specified by:
        isLeaf in interface TreeNode
        Returns:
        true if this node has no children
        See Also:
        getAllowsChildren()

      • getFirstLeaf

        public DefaultMutableTreeNode getFirstLeaf()
        Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf. Returns this node if it is a leaf.
        Returns:
        the first leaf in the subtree rooted at this node
        See Also:
        isLeaf(), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

      • getLastLeaf

        public DefaultMutableTreeNode getLastLeaf()
        Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf. Returns this node if it is a leaf.
        Returns:
        the last leaf in the subtree rooted at this node
        See Also:
        isLeaf(), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

      • getNextLeaf

        public DefaultMutableTreeNode getNextLeaf()
        Returns the leaf after this node or null if this node is the last leaf in the tree.

        In this implementation of the MutableNode interface, this operation is very inefficient. In order to determine the next node, this method first performs a linear search in the parent's child-list in order to find the current node.

        That implementation makes the operation suitable for short traversals from a known position. But to traverse all of the leaves in the tree, you should use depthFirstEnumeration to enumerate the nodes in the tree and use isLeaf on each node to determine which are leaves.

        Returns:
        returns the next leaf past this node
        See Also:
        depthFirstEnumeration(), isLeaf()

      • getPreviousLeaf

        public DefaultMutableTreeNode getPreviousLeaf()
        Returns the leaf before this node or null if this node is the first leaf in the tree.

        In this implementation of the MutableNode interface, this operation is very inefficient. In order to determine the previous node, this method first performs a linear search in the parent's child-list in order to find the current node.

        That implementation makes the operation suitable for short traversals from a known position. But to traverse all of the leaves in the tree, you should use depthFirstEnumeration to enumerate the nodes in the tree and use isLeaf on each node to determine which are leaves.

        Returns:
        returns the leaf before this node
        See Also:
        depthFirstEnumeration(), isLeaf()

      • getLeafCount

        public int getLeafCount()
        Returns the total number of leaves that are descendants of this node. If this node is a leaf, returns 1. This method is O(n) where n is the number of descendants of this node.
        Returns:
        the number of leaves beneath this node
        See Also:
        isNodeAncestor(javax.swing.tree.TreeNode)

      • toString

        public String toString()
        Returns the result of sending toString() to this node's user object, or the empty string if the node has no user object.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
        See Also:
        getUserObject()

      • clone

        public Object clone()
        Overridden to make clone public. Returns a shallow copy of this node; the new node has no parent or children and has a reference to the same user object, if any.
        Overrides:
        clone in class Object
        Returns:
        a copy of this node
        See Also:
        Cloneable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeCellEditor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeCellEditor

  • java.lang.Object
    • javax.swing.tree.DefaultTreeCellEditor
  • All Implemented Interfaces:
    ActionListener, EventListener, CellEditor, TreeSelectionListener, TreeCellEditor

    public class DefaultTreeCellEditor
extends Object
implements ActionListener, TreeCellEditor, TreeSelectionListener
    A TreeCellEditor. You need to supply an instance of DefaultTreeCellRenderer so that the icons can be obtained. You can optionally supply a TreeCellEditor that will be layed out according to the icon in the DefaultTreeCellRenderer. If you do not supply a TreeCellEditor, a TextField will be used. Editing is started on a triple mouse click, or after a click, pause, click and a delay of 1200 milliseconds.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    JTree

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      class  DefaultTreeCellEditor.DefaultTextField
      TextField used when no editor is supplied.
      class  DefaultTreeCellEditor.EditorContainer
      Container responsible for placing the editingComponent.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected Color borderSelectionColor
      True if the border selection color should be drawn.
      protected boolean canEdit
      As of Java 2 platform v1.4 this field should no longer be used.
      protected Component editingComponent
      Component used in editing, obtained from the editingContainer.
      protected Container editingContainer
      Editing container, will contain the editorComponent.
      protected Icon editingIcon
      Icon to use when editing.
      protected Font font
      Font to paint with, null indicates font of renderer is to be used.
      protected TreePath lastPath
      Last path that was selected.
      protected int lastRow
      Row that was last passed into getTreeCellEditorComponent.
      protected int offset
      Used in editing.
      protected TreeCellEditor realEditor
      Editor handling the editing.
      protected DefaultTreeCellRenderer renderer
      Renderer, used to get border and offsets from.
      protected Timer timer
      Used before starting the editing session.
      protected JTree tree
      JTree instance listening too.

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
      DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
      Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      void actionPerformed(ActionEvent e)
      Messaged when the timer fires, this will start the editing session.
      void addCellEditorListener(CellEditorListener l)
      Adds the CellEditorListener.
      void cancelCellEditing()
      Messages cancelCellEditing to the realEditor and removes it from this instance.
      protected boolean canEditImmediately(EventObject event)
      Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.
      protected Container createContainer()
      Creates the container to manage placement of editingComponent.
      protected TreeCellEditor createTreeCellEditor()
      This is invoked if a TreeCellEditor is not supplied in the constructor.
      protected void | determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
      Color getBorderSelectionColor()
      Returns the color the border is drawn.
      CellEditorListener[] getCellEditorListeners()
      Returns an array of all the CellEditorListeners added to this DefaultTreeCellEditor with addCellEditorListener().
      Object getCellEditorValue()
      Returns the value currently being edited.
      Font getFont()
      Gets the font used for editing.
      Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
      Configures the editor.
      protected boolean inHitRegion(int x, int y)
      Returns true if the passed in location is a valid mouse location to start editing from.
      boolean isCellEditable(EventObject event)
      If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
      protected void prepareForEditing()
      Invoked just before editing is to start.
      void removeCellEditorListener(CellEditorListener l)
      Removes the previously added CellEditorListener.
      void setBorderSelectionColor(Color newColor)
      Sets the color to use for the border.
      void setFont(Font font)
      Sets the font to edit with.
      protected void setTree(JTree newTree)
      Sets the tree currently editing for.
      boolean shouldSelectCell(EventObject event)
      Messages the realEditor for the return value.
      protected boolean shouldStartEditingTimer(EventObject event)
      Returns true if event is a MouseEvent and the click count is 1.
      protected void startEditingTimer()
      Starts the editing timer.
      boolean stopCellEditing()
      If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
      void valueChanged(TreeSelectionEvent e)
      Resets lastPath.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • realEditor

        protected TreeCellEditor realEditor
        Editor handling the editing.

      • renderer

        protected DefaultTreeCellRenderer renderer
        Renderer, used to get border and offsets from.

      • editingContainer

        protected Container editingContainer
        Editing container, will contain the editorComponent.

      • editingComponent

        protected transient Component editingComponent
        Component used in editing, obtained from the editingContainer.

      • canEdit

        protected boolean canEdit
        As of Java 2 platform v1.4 this field should no longer be used. If you wish to provide similar behavior you should directly override isCellEditable.

      • offset

        protected transient int offset
        Used in editing. Indicates x position to place editingComponent.

      • tree

        protected transient JTree tree
        JTree instance listening too.

      • lastPath

        protected transient TreePath lastPath
        Last path that was selected.

      • timer

        protected transient Timer timer
        Used before starting the editing session.

      • lastRow

        protected transient int lastRow
        Row that was last passed into getTreeCellEditorComponent.

      • borderSelectionColor

        protected Color borderSelectionColor
        True if the border selection color should be drawn.

      • editingIcon

        protected transient Icon editingIcon
        Icon to use when editing.

      • font

        protected Font font
        Font to paint with, null indicates font of renderer is to be used.

    • Constructor Detail

      • DefaultTreeCellEditor

        public DefaultTreeCellEditor(JTree tree,
                             DefaultTreeCellRenderer renderer)
        Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor. (Use this constructor for normal editing.)
        Parameters:
        tree - a JTree object
        renderer - a DefaultTreeCellRenderer object

      • DefaultTreeCellEditor

        public DefaultTreeCellEditor(JTree tree,
                             DefaultTreeCellRenderer renderer,
                             TreeCellEditor editor)
        Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.)
        Parameters:
        tree - a JTree object
        renderer - a DefaultTreeCellRenderer object
        editor - a TreeCellEditor object

    • Method Detail

      • setBorderSelectionColor

        public void setBorderSelectionColor(Color newColor)
        Sets the color to use for the border.
        Parameters:
        newColor - the new border color

      • getBorderSelectionColor

        public Color getBorderSelectionColor()
        Returns the color the border is drawn.
        Returns:
        the border selection color

      • setFont

        public void setFont(Font font)
        Sets the font to edit with. null indicates the renderers font should be used. This will NOT override any font you have set in the editor the receiver was instantiated with. If null for an editor was passed in a default editor will be created that will pick up this font.
        Parameters:
        font - the editing Font
        See Also:
        getFont()

      • getFont

        public Font getFont()
        Gets the font used for editing.
        Returns:
        the editing Font
        See Also:
        setFont(java.awt.Font)

      • getTreeCellEditorComponent

        public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
        Configures the editor. Passed onto the realEditor.
        Specified by:
        getTreeCellEditorComponent in interface TreeCellEditor
        Parameters:
        tree - the JTree that is asking the editor to edit; this parameter can be null
        value - the value of the cell to be edited
        isSelected - true if the cell is to be rendered with selection highlighting
        expanded - true if the node is expanded
        leaf - true if the node is a leaf node
        row - the row index of the node being edited
        Returns:
        the component for editing

      • getCellEditorValue

        public Object getCellEditorValue()
        Returns the value currently being edited.
        Specified by:
        getCellEditorValue in interface CellEditor
        Returns:
        the value currently being edited

      • isCellEditable

        public boolean isCellEditable(EventObject event)
        If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
        Specified by:
        isCellEditable in interface CellEditor
        Parameters:
        event - the event the editor should use to consider whether to begin editing or not
        Returns:
        true if editing can be started
        See Also:
        CellEditor.shouldSelectCell(java.util.EventObject)

      • shouldSelectCell

        public boolean shouldSelectCell(EventObject event)
        Messages the realEditor for the return value.
        Specified by:
        shouldSelectCell in interface CellEditor
        Parameters:
        event - the event the editor should use to start editing
        Returns:
        true if the editor would like the editing cell to be selected; otherwise returns false
        See Also:
        CellEditor.isCellEditable(java.util.EventObject)

      • stopCellEditing

        public boolean stopCellEditing()
        If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
        Specified by:
        stopCellEditing in interface CellEditor
        Returns:
        true if editing was stopped; false otherwise

      • cancelCellEditing

        public void cancelCellEditing()
        Messages cancelCellEditing to the realEditor and removes it from this instance.
        Specified by:
        cancelCellEditing in interface CellEditor

      • addCellEditorListener

        public void addCellEditorListener(CellEditorListener l)
        Adds the CellEditorListener.
        Specified by:
        addCellEditorListener in interface CellEditor
        Parameters:
        l - the listener to be added

      • removeCellEditorListener

        public void removeCellEditorListener(CellEditorListener l)
        Removes the previously added CellEditorListener.
        Specified by:
        removeCellEditorListener in interface CellEditor
        Parameters:
        l - the listener to be removed

      • getCellEditorListeners

        public CellEditorListener[] getCellEditorListeners()
        Returns an array of all the CellEditorListeners added to this DefaultTreeCellEditor with addCellEditorListener().
        Returns:
        all of the CellEditorListeners added or an empty array if no listeners have been added
        Since:
        1.4

      • valueChanged

        public void valueChanged(TreeSelectionEvent e)
        Resets lastPath.
        Specified by:
        valueChanged in interface TreeSelectionListener
        Parameters:
        e - the event that characterizes the change.

      • actionPerformed

        public void actionPerformed(ActionEvent e)
        Messaged when the timer fires, this will start the editing session.
        Specified by:
        actionPerformed in interface ActionListener

      • setTree

        protected void setTree(JTree newTree)
        Sets the tree currently editing for. This is needed to add a selection listener.
        Parameters:
        newTree - the new tree to be edited

      • shouldStartEditingTimer

        protected boolean shouldStartEditingTimer(EventObject event)
        Returns true if event is a MouseEvent and the click count is 1.
        Parameters:
        event - the event being studied

      • startEditingTimer

        protected void startEditingTimer()
        Starts the editing timer.

      • canEditImmediately

        protected boolean canEditImmediately(EventObject event)
        Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.
        Parameters:
        event - the event being studied

      • inHitRegion

        protected boolean inHitRegion(int x,
                              int y)
        Returns true if the passed in location is a valid mouse location to start editing from. This is implemented to return false if x is <= the width of the icon and icon gap displayed by the renderer. In other words this returns true if the user clicks over the text part displayed by the renderer, and false otherwise.
        Parameters:
        x - the x-coordinate of the point
        y - the y-coordinate of the point
        Returns:
        true if the passed in location is a valid mouse location

      • determineOffset

        protected void determineOffset(JTree tree,
                               Object value,
                               boolean isSelected,
                               boolean expanded,
                               boolean leaf,
                               int row)

      • prepareForEditing

        protected void prepareForEditing()
        Invoked just before editing is to start. Will add the editingComponent to the editingContainer.

      • createContainer

        protected Container createContainer()
        Creates the container to manage placement of editingComponent.

      • createTreeCellEditor

        protected TreeCellEditor createTreeCellEditor()
        This is invoked if a TreeCellEditor is not supplied in the constructor. It returns a TextField editor.
        Returns:
        a new TextField editor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeCellEditor.DefaultTextField

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeCellEditor.DefaultTextField

  • java.lang.Object
    • java.awt.Component
      • java.awt.Container
        • javax.swing.JComponent
          • javax.swing.text.JTextComponent
            • javax.swing.JTextField
              • javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants
    Enclosing class:
    DefaultTreeCellEditor

    public class DefaultTreeCellEditor.DefaultTextField
extends JTextField
    TextField used when no editor is supplied. This textfield locks into the border it is constructed with. It also prefers its parents font over its font. And if the renderer is not null and no font has been specified the preferred height is that of the renderer.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JTextField

        JTextField.AccessibleJTextField

      • Nested classes/interfaces inherited from class javax.swing.text.JTextComponent

        JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        JComponent.AccessibleJComponent

      • Nested classes/interfaces inherited from class java.awt.Container

        Container.AccessibleAWTContainer

      • Nested classes/interfaces inherited from class java.awt.Component

        Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected Border border
      Border to use.

      • Fields inherited from class javax.swing.JTextField

        notifyAction

      • Fields inherited from class javax.swing.text.JTextComponent

        DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY

      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultTextField(Border border)
      Constructs a DefaultTreeCellEditor.DefaultTextField object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Border getBorder()
      Overrides JComponent.getBorder to returns the current border.
      Font getFont()
      Gets the font of this component.
      Dimension getPreferredSize()
      Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
      void setBorder(Border border)
      Sets the border of this component.

      • Methods inherited from class javax.swing.JTextField

        actionPropertyChanged, addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setHorizontalAlignment, setScrollOffset

      • Methods inherited from class javax.swing.text.JTextComponent

        addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write

      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree

      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • border

        protected Border border
        Border to use.

    • Constructor Detail

      • DefaultTextField

        public DefaultTextField(Border border)
        Constructs a DefaultTreeCellEditor.DefaultTextField object.
        Parameters:
        border - a Border object
        Since:
        1.4

    • Method Detail

      • setBorder

        public void setBorder(Border border)
        Sets the border of this component.

        This is a bound property.

        Overrides:
        setBorder in class JComponent
        Parameters:
        border - the border to be rendered for this component
        See Also:
        Border, CompoundBorder

      • getBorder

        public Border getBorder()
        Overrides JComponent.getBorder to returns the current border.
        Overrides:
        getBorder in class JComponent
        Returns:
        the border object for this component
        See Also:
        JComponent.setBorder(javax.swing.border.Border)

      • getFont

        public Font getFont()
        Description copied from class: Component
        Gets the font of this component.
        Specified by:
        getFont in interface MenuContainer
        Overrides:
        getFont in class Component
        Returns:
        this component's font; if a font has not been set for this component, the font of its parent is returned
        See Also:
        Component.setFont(java.awt.Font)

      • getPreferredSize

        public Dimension getPreferredSize()
        Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
        Overrides:
        getPreferredSize in class JTextField
        Returns:
        a Dimension object containing the preferred size
        See Also:
        JComponent.setPreferredSize(java.awt.Dimension), ComponentUI
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeCellEditor.EditorContainer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeCellEditor.EditorContainer

  • java.lang.Object
    • java.awt.Component
      • java.awt.Container
        • javax.swing.tree.DefaultTreeCellEditor.EditorContainer
  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable
    Enclosing class:
    DefaultTreeCellEditor

    public class DefaultTreeCellEditor.EditorContainer
extends Container
    Container responsible for placing the editingComponent.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Container

        Container.AccessibleAWTContainer

      • Nested classes/interfaces inherited from class java.awt.Component

        Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

    • Field Summary

      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

    • Constructor Summary

      Constructors
      Constructor and Description
      EditorContainer()
      Constructs an EditorContainer object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      void doLayout()
      Lays out this Container.
      void | EditorContainer()
      Dimension getPreferredSize()
      Returns the preferred size for the Container.
      void paint(Graphics g)
      Overrides Container.paint to paint the node's icon and use the selection color for the background.

      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree

      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • EditorContainer

        public EditorContainer()
        Constructs an EditorContainer object.

    • Method Detail

      • EditorContainer

        public void EditorContainer()

      • paint

        public void paint(Graphics g)
        Overrides Container.paint to paint the node's icon and use the selection color for the background.
        Overrides:
        paint in class Container
        Parameters:
        g - the specified Graphics window
        See Also:
        Component.update(Graphics)

      • doLayout

        public void doLayout()
        Lays out this Container. If editing, the editor will be placed at offset in the x direction and 0 for y.
        Overrides:
        doLayout in class Container
        See Also:
        LayoutManager.layoutContainer(java.awt.Container),
Container.setLayout(java.awt.LayoutManager),
Container.validate()

      • getPreferredSize

        public Dimension getPreferredSize()
        Returns the preferred size for the Container. This will be at least preferred size of the editor plus offset.
        Overrides:
        getPreferredSize in class Container
        Returns:
        a Dimension containing the preferred size for the Container; if editingComponent is null the Dimension returned is 0, 0
        See Also:
        Container.getMinimumSize(),
Container.getMaximumSize(),
Container.getLayout(),
LayoutManager.preferredLayoutSize(Container),
Component.getPreferredSize()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeCellRenderer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeCellRenderer

  • java.lang.Object
    • java.awt.Component
      • java.awt.Container
        • javax.swing.JComponent
          • javax.swing.JLabel
            • javax.swing.tree.DefaultTreeCellRenderer
  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TreeCellRenderer

    public class DefaultTreeCellRenderer
extends JLabel
implements TreeCellRenderer
    Displays an entry in a tree. DefaultTreeCellRenderer is not opaque and unless you subclass paint you should not change this. See How to Use Trees in The Java Tutorial for examples of customizing node display using this class.

    The set of icons and colors used by DefaultTreeCellRenderer can be configured using the various setter methods. The value for each property is initialized from the defaults table. When the look and feel changes (updateUI is invoked), any properties that have a value of type UIResource are refreshed from the defaults table. The following table lists the mapping between DefaultTreeCellRenderer property and defaults table key:
    Property: Key:
    "leafIcon" | "Tree.leafIcon"
    "closedIcon" | "Tree.closedIcon"
    "openIcon" | "Tree.openIcon"
    "textSelectionColor" | "Tree.selectionForeground"
    "textNonSelectionColor" | "Tree.textForeground"
    "backgroundSelectionColor" | "Tree.selectionBackground"
    "backgroundNonSelectionColor" | "Tree.textBackground"
    "borderSelectionColor" | "Tree.selectionBorderColor"

    Implementation Note: This class overrides invalidate, validate, revalidate, repaint, and firePropertyChange solely to improve performance. If not overridden, these frequently called methods would execute code paths that are unnecessary for the default tree cell renderer. If you write your own renderer, take care to weigh the benefits and drawbacks of overriding these methods.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JLabel

        JLabel.AccessibleJLabel

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        JComponent.AccessibleJComponent

      • Nested classes/interfaces inherited from class java.awt.Container

        Container.AccessibleAWTContainer

      • Nested classes/interfaces inherited from class java.awt.Component

        Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected Color backgroundNonSelectionColor
      Color to use for the background when the node isn't selected.
      protected Color backgroundSelectionColor
      Color to use for the background when a node is selected.
      protected Color borderSelectionColor
      Color to use for the focus indicator when the node has focus.
      protected Icon closedIcon
      Icon used to show non-leaf nodes that aren't expanded.
      protected boolean hasFocus
      True if has focus.
      protected Icon leafIcon
      Icon used to show leaf nodes.
      protected Icon openIcon
      Icon used to show non-leaf nodes that are expanded.
      protected boolean selected
      Is the value currently selected.
      protected Color textNonSelectionColor
      Color to use for the foreground for non-selected nodes.
      protected Color textSelectionColor
      Color to use for the foreground for selected nodes.

      • Fields inherited from class javax.swing.JLabel

        labelFor

      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultTreeCellRenderer()
      Creates a DefaultTreeCellRenderer.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, byte oldValue, byte newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, char oldValue, char newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, double oldValue, double newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, float oldValue, float newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, int oldValue, int newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, long oldValue, long newValue)
      Overridden for performance reasons.
      protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
      Overridden for performance reasons.
      void firePropertyChange(String propertyName, short oldValue, short newValue)
      Overridden for performance reasons.
      Color getBackgroundNonSelectionColor()
      Returns the background color to be used for non selected nodes.
      Color getBackgroundSelectionColor()
      Returns the color to use for the background if node is selected.
      Color getBorderSelectionColor()
      Returns the color the border is drawn.
      Icon getClosedIcon()
      Returns the icon used to represent non-leaf nodes that are not expanded.
      Icon getDefaultClosedIcon()
      Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.
      Icon getDefaultLeafIcon()
      Returns the default icon, for the current laf, that is used to represent leaf nodes.
      Icon getDefaultOpenIcon()
      Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.
      Font getFont()
      Gets the font of this component.
      Icon getLeafIcon()
      Returns the icon used to represent leaf nodes.
      Icon getOpenIcon()
      Returns the icon used to represent non-leaf nodes that are expanded.
      Dimension getPreferredSize()
      Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
      Color getTextNonSelectionColor()
      Returns the color the text is drawn with when the node isn't selected.
      Color getTextSelectionColor()
      Returns the color the text is drawn with when the node is selected.
      Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
      Configures the renderer based on the passed in components.
      void invalidate()
      Overridden for performance reasons.
      void paint(Graphics g)
      Paints the value.
      void repaint()
      Overridden for performance reasons.
      void repaint(long tm, int x, int y, int width, int height)
      Overridden for performance reasons.
      void repaint(Rectangle r)
      Overridden for performance reasons.
      void revalidate()
      Overridden for performance reasons.
      void setBackground(Color color)
      Subclassed to map ColorUIResources to null.
      void setBackgroundNonSelectionColor(Color newColor)
      Sets the background color to be used for non selected nodes.
      void setBackgroundSelectionColor(Color newColor)
      Sets the color to use for the background if node is selected.
      void setBorderSelectionColor(Color newColor)
      Sets the color to use for the border.
      void setClosedIcon(Icon newIcon)
      Sets the icon used to represent non-leaf nodes that are not expanded.
      void setFont(Font font)
      Subclassed to map FontUIResources to null.
      void setLeafIcon(Icon newIcon)
      Sets the icon used to represent leaf nodes.
      void setOpenIcon(Icon newIcon)
      Sets the icon used to represent non-leaf nodes that are expanded.
      void setTextNonSelectionColor(Color newColor)
      Sets the color the text is drawn with when the node isn't selected.
      void setTextSelectionColor(Color newColor)
      Sets the color the text is drawn with when the node is selected.
      void updateUI()
      Resets the UI property to a value from the current look and feel.
      void validate()
      Overridden for performance reasons.

      • Methods inherited from class javax.swing.JLabel

        checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition

      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateTree

      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • selected

        protected boolean selected
        Is the value currently selected.

      • hasFocus

        protected boolean hasFocus
        True if has focus.

      • closedIcon

        protected transient Icon closedIcon
        Icon used to show non-leaf nodes that aren't expanded.

      • leafIcon

        protected transient Icon leafIcon
        Icon used to show leaf nodes.

      • openIcon

        protected transient Icon openIcon
        Icon used to show non-leaf nodes that are expanded.

      • textSelectionColor

        protected Color textSelectionColor
        Color to use for the foreground for selected nodes.

      • textNonSelectionColor

        protected Color textNonSelectionColor
        Color to use for the foreground for non-selected nodes.

      • backgroundSelectionColor

        protected Color backgroundSelectionColor
        Color to use for the background when a node is selected.

      • backgroundNonSelectionColor

        protected Color backgroundNonSelectionColor
        Color to use for the background when the node isn't selected.

      • borderSelectionColor

        protected Color borderSelectionColor
        Color to use for the focus indicator when the node has focus.

    • Constructor Detail

      • DefaultTreeCellRenderer

        public DefaultTreeCellRenderer()
        Creates a DefaultTreeCellRenderer. Icons and text color are determined from the UIManager.

    • Method Detail

      • updateUI

        public void updateUI()
        Resets the UI property to a value from the current look and feel.
        Overrides:
        updateUI in class JLabel
        Since:
        1.7
        See Also:
        JComponent.updateUI()

      • getDefaultOpenIcon

        public Icon getDefaultOpenIcon()
        Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.

      • getDefaultClosedIcon

        public Icon getDefaultClosedIcon()
        Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.

      • getDefaultLeafIcon

        public Icon getDefaultLeafIcon()
        Returns the default icon, for the current laf, that is used to represent leaf nodes.

      • setOpenIcon

        public void setOpenIcon(Icon newIcon)
        Sets the icon used to represent non-leaf nodes that are expanded.

      • getOpenIcon

        public Icon getOpenIcon()
        Returns the icon used to represent non-leaf nodes that are expanded.

      • setClosedIcon

        public void setClosedIcon(Icon newIcon)
        Sets the icon used to represent non-leaf nodes that are not expanded.

      • getClosedIcon

        public Icon getClosedIcon()
        Returns the icon used to represent non-leaf nodes that are not expanded.

      • setLeafIcon

        public void setLeafIcon(Icon newIcon)
        Sets the icon used to represent leaf nodes.

      • getLeafIcon

        public Icon getLeafIcon()
        Returns the icon used to represent leaf nodes.

      • setTextSelectionColor

        public void setTextSelectionColor(Color newColor)
        Sets the color the text is drawn with when the node is selected.

      • getTextSelectionColor

        public Color getTextSelectionColor()
        Returns the color the text is drawn with when the node is selected.

      • setTextNonSelectionColor

        public void setTextNonSelectionColor(Color newColor)
        Sets the color the text is drawn with when the node isn't selected.

      • getTextNonSelectionColor

        public Color getTextNonSelectionColor()
        Returns the color the text is drawn with when the node isn't selected.

      • setBackgroundSelectionColor

        public void setBackgroundSelectionColor(Color newColor)
        Sets the color to use for the background if node is selected.

      • getBackgroundSelectionColor

        public Color getBackgroundSelectionColor()
        Returns the color to use for the background if node is selected.

      • setBackgroundNonSelectionColor

        public void setBackgroundNonSelectionColor(Color newColor)
        Sets the background color to be used for non selected nodes.

      • getBackgroundNonSelectionColor

        public Color getBackgroundNonSelectionColor()
        Returns the background color to be used for non selected nodes.

      • setBorderSelectionColor

        public void setBorderSelectionColor(Color newColor)
        Sets the color to use for the border.

      • getBorderSelectionColor

        public Color getBorderSelectionColor()
        Returns the color the border is drawn.

      • setFont

        public void setFont(Font font)
        Subclassed to map FontUIResources to null. If font is null, or a FontUIResource, this has the effect of letting the font of the JTree show through. On the other hand, if font is non-null, and not a FontUIResource, the font becomes font.
        Overrides:
        setFont in class JComponent
        Parameters:
        font - the desired Font for this component
        See Also:
        Component.getFont()

      • getFont

        public Font getFont()
        Gets the font of this component.
        Specified by:
        getFont in interface MenuContainer
        Overrides:
        getFont in class Component
        Returns:
        this component's font; if a font has not been set for this component, the font of its parent is returned
        See Also:
        Component.setFont(java.awt.Font)

      • setBackground

        public void setBackground(Color color)
        Subclassed to map ColorUIResources to null. If color is null, or a ColorUIResource, this has the effect of letting the background color of the JTree show through. On the other hand, if color is non-null, and not a ColorUIResource, the background becomes color.
        Overrides:
        setBackground in class JComponent
        Parameters:
        color - the desired background Color
        See Also:
        Component.getBackground(), JComponent.setOpaque(boolean)

      • getTreeCellRendererComponent

        public Component getTreeCellRendererComponent(JTree tree,
                                              Object value,
                                              boolean sel,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus)
        Configures the renderer based on the passed in components. The value is set from messaging the tree with convertValueToText, which ultimately invokes toString on value. The foreground color is set based on the selection and the icon is set based on the leaf and expanded parameters.
        Specified by:
        getTreeCellRendererComponent in interface TreeCellRenderer
        Returns:
        the Component that the renderer uses to draw the value

      • paint

        public void paint(Graphics g)
        Paints the value. The background is filled based on selected.
        Overrides:
        paint in class JComponent
        Parameters:
        g - the Graphics context in which to paint
        See Also:
        JComponent.paintComponent(java.awt.Graphics),
JComponent.paintBorder(java.awt.Graphics),
JComponent.paintChildren(java.awt.Graphics),
JComponent.getComponentGraphics(java.awt.Graphics),
JComponent.repaint(long, int, int, int, int)

      • getPreferredSize

        public Dimension getPreferredSize()
        Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
        Overrides:
        getPreferredSize in class JComponent
        Returns:
        the value of the preferredSize property
        See Also:
        JComponent.setPreferredSize(java.awt.Dimension), ComponentUI

      • validate

        public void validate()
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        validate in class Container
        See Also:
        Container.add(java.awt.Component),
Container.invalidate(),
Container.isValidateRoot(),
JComponent.revalidate(),
Container.validateTree()

      • invalidate

        public void invalidate()
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        invalidate in class Container
        Since:
        1.5
        See Also:
        Container.validate(), Container.layout(), LayoutManager2

      • revalidate

        public void revalidate()
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        revalidate in class JComponent
        See Also:
        Component.invalidate(),
Container.validate(),
JComponent.isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)

      • repaint

        public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        repaint in class JComponent
        Parameters:
        tm - this parameter is not used
        x - the x value of the dirty region
        y - the y value of the dirty region
        width - the width of the dirty region
        height - the height of the dirty region
        See Also:
        JComponent.isPaintingOrigin(),
Component.isShowing(),
RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

      • repaint

        public void repaint(Rectangle r)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        repaint in class JComponent
        Parameters:
        r - a Rectangle containing the dirty region
        See Also:
        JComponent.isPaintingOrigin(),
Component.isShowing(),
RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

      • repaint

        public void repaint()
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        repaint in class Component
        Since:
        1.5
        See Also:
        Component.update(Graphics)

      • firePropertyChange

        protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               byte oldValue,
                               byte newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a byte)
        newValue - the new value of the property (as a byte)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               char oldValue,
                               char newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class JComponent
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a char)
        newValue - the new value of the property (as a char)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               short oldValue,
                               short newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a short)
        newValue - the old value of the property (as a short)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               int oldValue,
                               int newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class JComponent
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               long oldValue,
                               long newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a long)
        newValue - the new value of the property (as a long)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               float oldValue,
                               float newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a float)
        newValue - the new value of the property (as a float)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               double oldValue,
                               double newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class Component
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a double)
        newValue - the new value of the property (as a double)
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

      • firePropertyChange

        public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        firePropertyChange in class JComponent
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeModel

  • java.lang.Object
    • javax.swing.tree.DefaultTreeModel
  • All Implemented Interfaces:
    Serializable, TreeModel

    public class DefaultTreeModel
extends Object
implements Serializable, TreeModel
    A simple tree data model that uses TreeNodes. For further information and examples that use DefaultTreeModel, see How to Use Trees in The Java Tutorial.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected boolean asksAllowsChildren
      Determines how the isLeaf method figures out if a node is a leaf node.
      protected EventListenerList listenerList
      Listeners.
      protected TreeNode root
      Root of the tree.

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultTreeModel(TreeNode root)
      Creates a tree in which any node can have children.
      DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
      Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addTreeModelListener(TreeModelListener l)
      Adds a listener for the TreeModelEvent posted after the tree changes.
      boolean asksAllowsChildren()
      Tells how leaf nodes are determined.
      protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
      Notifies all listeners that have registered interest for notification on this event type.
      protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
      Notifies all listeners that have registered interest for notification on this event type.
      protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
      Notifies all listeners that have registered interest for notification on this event type.
      protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
      Notifies all listeners that have registered interest for notification on this event type.
      Object getChild(Object parent, int index)
      Returns the child of parent at index index in the parent's child array.
      int getChildCount(Object parent)
      Returns the number of children of parent.
      int getIndexOfChild(Object parent, Object child)
      Returns the index of child in parent.
      <T extends EventListener>
      T[]             		getListeners(Class<T> listenerType)
      Returns an array of all the objects currently registered as FooListeners upon this model.
      TreeNode[] getPathToRoot(TreeNode aNode)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)
      Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
      Object getRoot()
      Returns the root of the tree.
      TreeModelListener[] getTreeModelListeners()
      Returns an array of all the tree model listeners registered on this model.
      void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
      Invoked this to insert newChild at location index in parents children.
      boolean isLeaf(Object node)
      Returns whether the specified node is a leaf node.
      void nodeChanged(TreeNode node)
      Invoke this method after you've changed how node is to be represented in the tree.
      void nodesChanged(TreeNode node, int[] childIndices)
      Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
      void nodeStructureChanged(TreeNode node)
      Invoke this method if you've totally changed the children of node and its children's children...
      void nodesWereInserted(TreeNode node, int[] childIndices)
      Invoke this method after you've inserted some TreeNodes into node.
      void nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)
      Invoke this method after you've removed some TreeNodes from node.
      void reload()
      Invoke this method if you've modified the TreeNodes upon which this model depends.
      void reload(TreeNode node)
      Invoke this method if you've modified the TreeNodes upon which this model depends.
      void removeNodeFromParent(MutableTreeNode node)
      Message this to remove node from its parent.
      void removeTreeModelListener(TreeModelListener l)
      Removes a listener previously added with addTreeModelListener().
      void setAsksAllowsChildren(boolean newValue)
      Sets whether or not to test leafness by asking getAllowsChildren() or isLeaf() to the TreeNodes.
      void setRoot(TreeNode root)
      Sets the root to root.
      void valueForPathChanged(TreePath path, Object newValue)
      This sets the user object of the TreeNode identified by path and posts a node changed.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • root

        protected TreeNode root
        Root of the tree.

      • listenerList

        protected EventListenerList listenerList
        Listeners.

      • asksAllowsChildren

        protected boolean asksAllowsChildren
        Determines how the isLeaf method figures out if a node is a leaf node. If true, a node is a leaf node if it does not allow children. (If it allows children, it is not a leaf node, even if no children are present.) That lets you distinguish between folder nodes and file nodes in a file system, for example.

        If this value is false, then any node which has no children is a leaf node, and any node may acquire children.

        See Also:
        TreeNode.getAllowsChildren(),
TreeModel.isLeaf(java.lang.Object),
setAsksAllowsChildren(boolean)

    • Constructor Detail

      • DefaultTreeModel

        @ConstructorProperties(value="root")
public DefaultTreeModel(TreeNode root)
        Creates a tree in which any node can have children.
        Parameters:
        root - a TreeNode object that is the root of the tree
        See Also:
        DefaultTreeModel(TreeNode, boolean)

      • DefaultTreeModel

        public DefaultTreeModel(TreeNode root,
                        boolean asksAllowsChildren)
        Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.
        Parameters:
        root - a TreeNode object that is the root of the tree
        asksAllowsChildren - a boolean, false if any node can have children, true if each node is asked to see if it can have children
        See Also:
        asksAllowsChildren

    • Method Detail

      • setAsksAllowsChildren

        public void setAsksAllowsChildren(boolean newValue)
        Sets whether or not to test leafness by asking getAllowsChildren() or isLeaf() to the TreeNodes. If newvalue is true, getAllowsChildren() is messaged, otherwise isLeaf() is messaged.

      • asksAllowsChildren

        public boolean asksAllowsChildren()
        Tells how leaf nodes are determined.
        Returns:
        true if only nodes which do not allow children are leaf nodes, false if nodes which have no children (even if allowed) are leaf nodes
        See Also:
        asksAllowsChildren

      • setRoot

        public void setRoot(TreeNode root)
        Sets the root to root. A null root implies the tree is to display nothing, and is legal.

      • getRoot

        public Object getRoot()
        Returns the root of the tree. Returns null only if the tree has no nodes.
        Specified by:
        getRoot in interface TreeModel
        Returns:
        the root of the tree

      • getIndexOfChild

        public int getIndexOfChild(Object parent,
                           Object child)
        Returns the index of child in parent. If either the parent or child is null, returns -1.
        Specified by:
        getIndexOfChild in interface TreeModel
        Parameters:
        parent - a note in the tree, obtained from this data source
        child - the node we are interested in
        Returns:
        the index of the child in the parent, or -1 if either the parent or the child is null

      • getChild

        public Object getChild(Object parent,
                       int index)
        Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index < getChildCount(parent)).
        Specified by:
        getChild in interface TreeModel
        Parameters:
        parent - a node in the tree, obtained from this data source
        Returns:
        the child of parent at index index

      • getChildCount

        public int getChildCount(Object parent)
        Returns the number of children of parent. Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
        Specified by:
        getChildCount in interface TreeModel
        Parameters:
        parent - a node in the tree, obtained from this data source
        Returns:
        the number of children of the node parent

      • isLeaf

        public boolean isLeaf(Object node)
        Returns whether the specified node is a leaf node. The way the test is performed depends on the askAllowsChildren setting.
        Specified by:
        isLeaf in interface TreeModel
        Parameters:
        node - the node to check
        Returns:
        true if the node is a leaf node
        See Also:
        asksAllowsChildren, TreeModel.isLeaf(java.lang.Object)

      • reload

        public void reload()
        Invoke this method if you've modified the TreeNodes upon which this model depends. The model will notify all of its listeners that the model has changed.

      • valueForPathChanged

        public void valueForPathChanged(TreePath path,
                                Object newValue)
        This sets the user object of the TreeNode identified by path and posts a node changed. If you use custom user objects in the TreeModel you're going to need to subclass this and set the user object of the changed node to something meaningful.
        Specified by:
        valueForPathChanged in interface TreeModel
        Parameters:
        path - path to the node that the user has altered
        newValue - the new value from the TreeCellEditor

      • insertNodeInto

        public void insertNodeInto(MutableTreeNode newChild,
                           MutableTreeNode parent,
                           int index)
        Invoked this to insert newChild at location index in parents children. This will then message nodesWereInserted to create the appropriate event. This is the preferred way to add children as it will create the appropriate event.

      • removeNodeFromParent

        public void removeNodeFromParent(MutableTreeNode node)
        Message this to remove node from its parent. This will message nodesWereRemoved to create the appropriate event. This is the preferred way to remove a node as it handles the event creation for you.

      • nodeChanged

        public void nodeChanged(TreeNode node)
        Invoke this method after you've changed how node is to be represented in the tree.

      • reload

        public void reload(TreeNode node)
        Invoke this method if you've modified the TreeNodes upon which this model depends. The model will notify all of its listeners that the model has changed below the given node.
        Parameters:
        node - the node below which the model has changed

      • nodesWereInserted

        public void nodesWereInserted(TreeNode node,
                              int[] childIndices)
        Invoke this method after you've inserted some TreeNodes into node. childIndices should be the index of the new elements and must be sorted in ascending order.

      • nodesWereRemoved

        public void nodesWereRemoved(TreeNode node,
                             int[] childIndices,
                             Object[] removedChildren)
        Invoke this method after you've removed some TreeNodes from node. childIndices should be the index of the removed elements and must be sorted in ascending order. And removedChildren should be the array of the children objects that were removed.

      • nodesChanged

        public void nodesChanged(TreeNode node,
                         int[] childIndices)
        Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.

      • nodeStructureChanged

        public void nodeStructureChanged(TreeNode node)
        Invoke this method if you've totally changed the children of node and its children's children... This will post a treeStructureChanged event.

      • getPathToRoot

        public TreeNode[] getPathToRoot(TreeNode aNode)
        Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
        Parameters:
        aNode - the TreeNode to get the path for

      • getPathToRoot

        protected TreeNode[] getPathToRoot(TreeNode aNode,
                                   int depth)
        Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
        Parameters:
        aNode - the TreeNode to get the path for
        depth - an int giving the number of steps already taken towards the root (on recursive calls), used to size the returned array
        Returns:
        an array of TreeNodes giving the path from the root to the specified node

      • addTreeModelListener

        public void addTreeModelListener(TreeModelListener l)
        Adds a listener for the TreeModelEvent posted after the tree changes.
        Specified by:
        addTreeModelListener in interface TreeModel
        Parameters:
        l - the listener to add
        See Also:
        removeTreeModelListener(javax.swing.event.TreeModelListener)

      • removeTreeModelListener

        public void removeTreeModelListener(TreeModelListener l)
        Removes a listener previously added with addTreeModelListener().
        Specified by:
        removeTreeModelListener in interface TreeModel
        Parameters:
        l - the listener to remove
        See Also:
        addTreeModelListener(javax.swing.event.TreeModelListener)

      • getTreeModelListeners

        public TreeModelListener[] getTreeModelListeners()
        Returns an array of all the tree model listeners registered on this model.
        Returns:
        all of this model's TreeModelListeners or an empty array if no tree model listeners are currently registered
        Since:
        1.4
        See Also:
        addTreeModelListener(javax.swing.event.TreeModelListener), removeTreeModelListener(javax.swing.event.TreeModelListener)

      • fireTreeNodesChanged

        protected void fireTreeNodesChanged(Object source,
                                    Object[] path,
                                    int[] childIndices,
                                    Object[] children)
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
        Parameters:
        source - the source of the TreeModelEvent; typically this
        path - the path to the parent of the nodes that changed; use null to identify the root has changed
        childIndices - the indices of the changed elements
        children - the changed elements

      • fireTreeNodesInserted

        protected void fireTreeNodesInserted(Object source,
                                     Object[] path,
                                     int[] childIndices,
                                     Object[] children)
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
        Parameters:
        source - the source of the TreeModelEvent; typically this
        path - the path to the parent the nodes were added to
        childIndices - the indices of the new elements
        children - the new elements

      • fireTreeNodesRemoved

        protected void fireTreeNodesRemoved(Object source,
                                    Object[] path,
                                    int[] childIndices,
                                    Object[] children)
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
        Parameters:
        source - the source of the TreeModelEvent; typically this
        path - the path to the parent the nodes were removed from
        childIndices - the indices of the removed elements
        children - the removed elements

      • fireTreeStructureChanged

        protected void fireTreeStructureChanged(Object source,
                                        Object[] path,
                                        int[] childIndices,
                                        Object[] children)
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
        Parameters:
        source - the source of the TreeModelEvent; typically this
        path - the path to the parent of the structure that has changed; use null to identify the root has changed
        childIndices - the indices of the affected elements
        children - the affected elements

      • getListeners

        public <T extends EventListener> T[] getListeners(Class<T> listenerType)
        Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

        You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultTreeModel m for its tree model listeners with the following code:

        TreeModelListener[] tmls = (TreeModelListener[])(m.getListeners(TreeModelListener.class));
        If no such listeners exist, this method returns an empty array.
        Parameters:
        listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
        Returns:
        an array of all objects registered as FooListeners on this component, or an empty array if no such listeners have been added
        Throws:
        ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
        Since:
        1.3
        See Also:
        getTreeModelListeners()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultTreeSelectionModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class DefaultTreeSelectionModel

  • java.lang.Object
    • javax.swing.tree.DefaultTreeSelectionModel
  • All Implemented Interfaces:
    Serializable, Cloneable, TreeSelectionModel
    Direct Known Subclasses:
    JTree.EmptySelectionModel

    public class DefaultTreeSelectionModel
extends Object
implements Cloneable, Serializable, TreeSelectionModel
    Default implementation of TreeSelectionModel. Listeners are notified whenever the paths in the selection change, not the rows. In order to be able to track row changes you may wish to become a listener for expansion events on the tree and test for changes from there.

    resetRowSelection is called from any of the methods that update the selected paths. If you subclass any of these methods to filter what is allowed to be selected, be sure and message resetRowSelection if you do not message super. Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    JTree

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected SwingPropertyChangeSupport changeSupport
      Used to messaged registered listeners.
      protected int leadIndex
      Index of the lead path in selection.
      protected TreePath leadPath
      Last path that was added.
      protected int leadRow
      Lead row.
      protected EventListenerList listenerList
      Event listener list.
      protected DefaultListSelectionModel listSelectionModel
      Handles maintaining the list selection model.
      protected RowMapper rowMapper
      Provides a row for a given path.
      protected TreePath[] selection
      Paths that are currently selected.
      static String SELECTION_MODE_PROPERTY
      Property name for selectionMode.
      protected int selectionMode
      Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

      • Fields inherited from interface javax.swing.tree.TreeSelectionModel

        CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultTreeSelectionModel()
      Creates a new instance of DefaultTreeSelectionModel that is empty, with a selection mode of DISCONTIGUOUS_TREE_SELECTION.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      void addSelectionPath(TreePath path)
      Adds path to the current selection.
      void addSelectionPaths(TreePath[] paths)
      Adds paths to the current selection.
      void addTreeSelectionListener(TreeSelectionListener x)
      Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
      protected boolean arePathsContiguous(TreePath[] paths)
      Returns true if the paths are contiguous, or this object has no RowMapper.
      protected boolean canPathsBeAdded(TreePath[] paths)
      Used to test if a particular set of TreePaths can be added.
      protected boolean canPathsBeRemoved(TreePath[] paths)
      Returns true if the paths can be removed without breaking the continuity of the model.
      void clearSelection()
      Empties the current selection.
      Object clone()
      Returns a clone of this object with the same selection.
      protected void fireValueChanged(TreeSelectionEvent e)
      Notifies all listeners that are registered for tree selection events on this object.
      TreePath getLeadSelectionPath()
      Returns the last path that was added.
      int getLeadSelectionRow()
      Returns the lead selection index.
      <T extends EventListener>
      T[]             		getListeners(Class<T> listenerType)
      Returns an array of all the objects currently registered as FooListeners upon this model.
      int getMaxSelectionRow()
      Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
      int getMinSelectionRow()
      Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
      PropertyChangeListener[] getPropertyChangeListeners()
      Returns an array of all the property change listeners registered on this DefaultTreeSelectionModel.
      RowMapper getRowMapper()
      Returns the RowMapper instance that is able to map a TreePath to a row.
      int getSelectionCount()
      Returns the number of paths that are selected.
      int getSelectionMode()
      Returns the selection mode, one of SINGLE_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION or CONTIGUOUS_TREE_SELECTION.
      TreePath getSelectionPath()
      Returns the first path in the selection.
      TreePath[] getSelectionPaths()
      Returns the selection.
      int[] getSelectionRows()
      Returns the selection in terms of rows.
      TreeSelectionListener[] getTreeSelectionListeners()
      Returns an array of all the tree selection listeners registered on this model.
      protected void insureRowContinuity()
      Makes sure the currently selected TreePaths are valid for the current selection mode.
      protected void insureUniqueness()
      This method is obsolete and its implementation is now a noop.
      boolean isPathSelected(TreePath path)
      Returns true if the path, path, is in the current selection.
      boolean isRowSelected(int row)
      Returns true if the row identified by row is selected.
      boolean isSelectionEmpty()
      Returns true if the selection is currently empty.
      protected void notifyPathChange(Vector<?> changedPaths, TreePath oldLeadSelection)
      Deprecated.
      As of JDK version 1.7
      void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      void removeSelectionPath(TreePath path)
      Removes path from the selection.
      void removeSelectionPaths(TreePath[] paths)
      Removes paths from the selection.
      void removeTreeSelectionListener(TreeSelectionListener x)
      Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
      void resetRowSelection()
      Updates this object's mapping from TreePath to rows.
      void setRowMapper(RowMapper newMapper)
      Sets the RowMapper instance.
      void setSelectionMode(int mode)
      Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
      void setSelectionPath(TreePath path)
      Sets the selection to path.
      void setSelectionPaths(TreePath[] pPaths)
      Sets the selection.
      String toString()
      Returns a string that displays and identifies this object's properties.
      protected void updateLeadIndex()
      Updates the leadIndex instance variable.

      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • SELECTION_MODE_PROPERTY

        public static final String SELECTION_MODE_PROPERTY
        Property name for selectionMode.
        See Also:
        Constant Field Values

      • changeSupport

        protected SwingPropertyChangeSupport changeSupport
        Used to messaged registered listeners.

      • selection

        protected TreePath[] selection
        Paths that are currently selected. Will be null if nothing is currently selected.

      • listenerList

        protected EventListenerList listenerList
        Event listener list.

      • rowMapper

        protected transient RowMapper rowMapper
        Provides a row for a given path.

      • listSelectionModel

        protected DefaultListSelectionModel listSelectionModel
        Handles maintaining the list selection model. The RowMapper is used to map from a TreePath to a row, and the value is then placed here.

      • selectionMode

        protected int selectionMode
        Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

      • leadPath

        protected TreePath leadPath
        Last path that was added.

      • leadIndex

        protected int leadIndex
        Index of the lead path in selection.

      • leadRow

        protected int leadRow
        Lead row.

    • Constructor Detail

      • DefaultTreeSelectionModel

        public DefaultTreeSelectionModel()
        Creates a new instance of DefaultTreeSelectionModel that is empty, with a selection mode of DISCONTIGUOUS_TREE_SELECTION.

    • Method Detail

      • setRowMapper

        public void setRowMapper(RowMapper newMapper)
        Sets the RowMapper instance. This instance is used to determine the row for a particular TreePath.
        Specified by:
        setRowMapper in interface TreeSelectionModel

      • getRowMapper

        public RowMapper getRowMapper()
        Returns the RowMapper instance that is able to map a TreePath to a row.
        Specified by:
        getRowMapper in interface TreeSelectionModel

      • setSelectionMode

        public void setSelectionMode(int mode)
        Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION. If mode is not one of the defined value, DISCONTIGUOUS_TREE_SELECTION is assumed.

        This may change the selection if the current selection is not valid for the new mode. For example, if three TreePaths are selected when the mode is changed to SINGLE_TREE_SELECTION, only one TreePath will remain selected. It is up to the particular implementation to decide what TreePath remains selected.

        Setting the mode to something other than the defined types will result in the mode becoming DISCONTIGUOUS_TREE_SELECTION.

        Specified by:
        setSelectionMode in interface TreeSelectionModel

      • getSelectionMode

        public int getSelectionMode()
        Returns the selection mode, one of SINGLE_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION or CONTIGUOUS_TREE_SELECTION.
        Specified by:
        getSelectionMode in interface TreeSelectionModel

      • setSelectionPath

        public void setSelectionPath(TreePath path)
        Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If path is null, this has the same effect as invoking clearSelection.
        Specified by:
        setSelectionPath in interface TreeSelectionModel
        Parameters:
        path - new path to select

      • setSelectionPaths

        public void setSelectionPaths(TreePath[] pPaths)
        Sets the selection. Whether the supplied paths are taken as the new selection depends upon the selection mode. If the supplied array is null, or empty, the selection is cleared. If the selection mode is SINGLE_TREE_SELECTION, only the first path in pPaths is used. If the selection mode is CONTIGUOUS_TREE_SELECTION and the supplied paths are not contiguous, then only the first path in pPaths is used. If the selection mode is DISCONTIGUOUS_TREE_SELECTION, then all paths are used.

        All null paths in pPaths are ignored.

        If this represents a change, all registered TreeSelectionListeners are notified.

        The lead path is set to the last unique path.

        The paths returned from getSelectionPaths are in the same order as those supplied to this method.

        Specified by:
        setSelectionPaths in interface TreeSelectionModel
        Parameters:
        pPaths - the new selection

      • addSelectionPath

        public void addSelectionPath(TreePath path)
        Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified. This has no effect if path is null.
        Specified by:
        addSelectionPath in interface TreeSelectionModel
        Parameters:
        path - the new path to add to the current selection

      • addSelectionPaths

        public void addSelectionPaths(TreePath[] paths)
        Adds paths to the current selection. If any of the paths in paths are not currently in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.

        The lead path is set to the last element in paths.

        If the selection mode is CONTIGUOUS_TREE_SELECTION, and adding the new paths would make the selection discontiguous. Then two things can result: if the TreePaths in paths are contiguous, then the selection becomes these TreePaths, otherwise the TreePaths aren't contiguous and the selection becomes the first TreePath in paths.

        Specified by:
        addSelectionPaths in interface TreeSelectionModel
        Parameters:
        paths - the new path to add to the current selection

      • removeSelectionPath

        public void removeSelectionPath(TreePath path)
        Removes path from the selection. If path is in the selection The TreeSelectionListeners are notified. This has no effect if path is null.
        Specified by:
        removeSelectionPath in interface TreeSelectionModel
        Parameters:
        path - the path to remove from the selection

      • removeSelectionPaths

        public void removeSelectionPaths(TreePath[] paths)
        Removes paths from the selection. If any of the paths in paths are in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.
        Specified by:
        removeSelectionPaths in interface TreeSelectionModel
        Parameters:
        paths - the paths to remove from the selection

      • getSelectionPath

        public TreePath getSelectionPath()
        Returns the first path in the selection. This is useful if there if only one item currently selected.
        Specified by:
        getSelectionPath in interface TreeSelectionModel

      • getSelectionPaths

        public TreePath[] getSelectionPaths()
        Returns the selection.
        Specified by:
        getSelectionPaths in interface TreeSelectionModel
        Returns:
        the selection

      • getSelectionCount

        public int getSelectionCount()
        Returns the number of paths that are selected.
        Specified by:
        getSelectionCount in interface TreeSelectionModel

      • isPathSelected

        public boolean isPathSelected(TreePath path)
        Returns true if the path, path, is in the current selection.
        Specified by:
        isPathSelected in interface TreeSelectionModel

      • isSelectionEmpty

        public boolean isSelectionEmpty()
        Returns true if the selection is currently empty.
        Specified by:
        isSelectionEmpty in interface TreeSelectionModel

      • clearSelection

        public void clearSelection()
        Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.
        Specified by:
        clearSelection in interface TreeSelectionModel

      • addTreeSelectionListener

        public void addTreeSelectionListener(TreeSelectionListener x)
        Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
        Specified by:
        addTreeSelectionListener in interface TreeSelectionModel
        Parameters:
        x - the new listener to be added

      • removeTreeSelectionListener

        public void removeTreeSelectionListener(TreeSelectionListener x)
        Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
        Specified by:
        removeTreeSelectionListener in interface TreeSelectionModel
        Parameters:
        x - the listener to remove

      • getTreeSelectionListeners

        public TreeSelectionListener[] getTreeSelectionListeners()
        Returns an array of all the tree selection listeners registered on this model.
        Returns:
        all of this model's TreeSelectionListeners or an empty array if no tree selection listeners are currently registered
        Since:
        1.4
        See Also:
        addTreeSelectionListener(javax.swing.event.TreeSelectionListener), removeTreeSelectionListener(javax.swing.event.TreeSelectionListener)

      • fireValueChanged

        protected void fireValueChanged(TreeSelectionEvent e)
        Notifies all listeners that are registered for tree selection events on this object.
        See Also:
        addTreeSelectionListener(javax.swing.event.TreeSelectionListener), EventListenerList

      • getListeners

        public <T extends EventListener> T[] getListeners(Class<T> listenerType)
        Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

        You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultTreeSelectionModel m for its tree selection listeners with the following code:

        TreeSelectionListener[] tsls = (TreeSelectionListener[])(m.getListeners(TreeSelectionListener.class));
        If no such listeners exist, this method returns an empty array.
        Parameters:
        listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
        Returns:
        an array of all objects registered as FooListeners on this component, or an empty array if no such listeners have been added
        Throws:
        ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
        Since:
        1.3
        See Also:
        getTreeSelectionListeners(), getPropertyChangeListeners()

      • getSelectionRows

        public int[] getSelectionRows()
        Returns the selection in terms of rows. There is not necessarily a one-to-one mapping between the TreePaths returned from getSelectionPaths and this method. In particular, if a TreePath is not viewable (the RowMapper returns -1 for the row corresponding to the TreePath), then the corresponding row is not included in the returned array. For example, if the selection consists of two paths, A and B, with A at row 10, and B not currently viewable, then this method returns an array with the single entry 10.
        Specified by:
        getSelectionRows in interface TreeSelectionModel
        Returns:
        the selection in terms of rows

      • getMinSelectionRow

        public int getMinSelectionRow()
        Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.
        Specified by:
        getMinSelectionRow in interface TreeSelectionModel

      • getMaxSelectionRow

        public int getMaxSelectionRow()
        Returns the largest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.
        Specified by:
        getMaxSelectionRow in interface TreeSelectionModel

      • isRowSelected

        public boolean isRowSelected(int row)
        Returns true if the row identified by row is selected.
        Specified by:
        isRowSelected in interface TreeSelectionModel

      • resetRowSelection

        public void resetRowSelection()
        Updates this object's mapping from TreePath to rows. This should be invoked when the mapping from TreePaths to integers has changed (for example, a node has been expanded).

        You do not normally have to call this, JTree and its associated Listeners will invoke this for you. If you are implementing your own View class, then you will have to invoke this.

        This will invoke insureRowContinuity to make sure the currently selected TreePaths are still valid based on the selection mode.

        Specified by:
        resetRowSelection in interface TreeSelectionModel

      • getLeadSelectionRow

        public int getLeadSelectionRow()
        Returns the lead selection index. That is the last index that was added.
        Specified by:
        getLeadSelectionRow in interface TreeSelectionModel

      • getLeadSelectionPath

        public TreePath getLeadSelectionPath()
        Returns the last path that was added. This may differ from the leadSelectionPath property maintained by the JTree.
        Specified by:
        getLeadSelectionPath in interface TreeSelectionModel

      • addPropertyChangeListener

        public void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

        A PropertyChangeEvent will get fired when the selection mode changes.

        Specified by:
        addPropertyChangeListener in interface TreeSelectionModel
        Parameters:
        listener - the PropertyChangeListener to be added

      • removePropertyChangeListener

        public void removePropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
        Specified by:
        removePropertyChangeListener in interface TreeSelectionModel
        Parameters:
        listener - the PropertyChangeListener to be removed

      • getPropertyChangeListeners

        public PropertyChangeListener[] getPropertyChangeListeners()
        Returns an array of all the property change listeners registered on this DefaultTreeSelectionModel.
        Returns:
        all of this model's PropertyChangeListeners or an empty array if no property change listeners are currently registered
        Since:
        1.4
        See Also:
        addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener)

      • insureRowContinuity

        protected void insureRowContinuity()
        Makes sure the currently selected TreePaths are valid for the current selection mode. If the selection mode is CONTIGUOUS_TREE_SELECTION and a RowMapper exists, this will make sure all the rows are contiguous, that is, when sorted all the rows are in order with no gaps. If the selection isn't contiguous, the selection is reset to contain the first set, when sorted, of contiguous rows.

        If the selection mode is SINGLE_TREE_SELECTION and more than one TreePath is selected, the selection is reset to contain the first path currently selected.

      • arePathsContiguous

        protected boolean arePathsContiguous(TreePath[] paths)
        Returns true if the paths are contiguous, or this object has no RowMapper.

      • canPathsBeAdded

        protected boolean canPathsBeAdded(TreePath[] paths)
        Used to test if a particular set of TreePaths can be added. This will return true if paths is null (or empty), or this object has no RowMapper, or nothing is currently selected, or the selection mode is DISCONTIGUOUS_TREE_SELECTION, or adding the paths to the current selection still results in a contiguous set of TreePaths.

      • canPathsBeRemoved

        protected boolean canPathsBeRemoved(TreePath[] paths)
        Returns true if the paths can be removed without breaking the continuity of the model. This is rather expensive.

      • notifyPathChange

        @Deprecated
protected void notifyPathChange(Vector<?> changedPaths,
                                            TreePath oldLeadSelection)
        Deprecated. As of JDK version 1.7
        Notifies listeners of a change in path. changePaths should contain instances of PathPlaceHolder.

      • updateLeadIndex

        protected void updateLeadIndex()
        Updates the leadIndex instance variable.

      • insureUniqueness

        protected void insureUniqueness()
        This method is obsolete and its implementation is now a noop. It's still called by setSelectionPaths and addSelectionPaths, but only for backwards compatibility.

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object

      • clone

        public Object clone()
             throws CloneNotSupportedException
        Returns a clone of this object with the same selection. This method does not duplicate selection listeners and property listeners.
        Overrides:
        clone in class Object
        Returns:
        a clone of this instance.
        Throws:
        CloneNotSupportedException - never thrown by instances of this class
        See Also:
        Cloneable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ExpandVetoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class ExpandVetoException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.swing.tree.ExpandVetoException
  • All Implemented Interfaces:
    Serializable

    public class ExpandVetoException
extends Exception
    Exception used to stop and expand/collapse from happening. See How to Write a Tree-Will-Expand Listener in The Java Tutorial for further information and examples.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected TreeExpansionEvent event
      The event that the exception was created for.

    • Constructor Summary

      Constructors
      Constructor and Description
      ExpandVetoException(TreeExpansionEvent event)
      Constructs an ExpandVetoException object with no message.
      ExpandVetoException(TreeExpansionEvent event, String message)
      Constructs an ExpandVetoException object with the specified message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • event

        protected TreeExpansionEvent event
        The event that the exception was created for.

    • Constructor Detail

      • ExpandVetoException

        public ExpandVetoException(TreeExpansionEvent event)
        Constructs an ExpandVetoException object with no message.
        Parameters:
        event - a TreeExpansionEvent object

      • ExpandVetoException

        public ExpandVetoException(TreeExpansionEvent event,
                           String message)
        Constructs an ExpandVetoException object with the specified message.
        Parameters:
        event - a TreeExpansionEvent object
        message - a String containing the message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FixedHeightLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class FixedHeightLayoutCache

  • java.lang.Object
    • javax.swing.tree.AbstractLayoutCache
      • javax.swing.tree.FixedHeightLayoutCache
  • All Implemented Interfaces:
    RowMapper

    public class FixedHeightLayoutCache
extends AbstractLayoutCache
    NOTE: This will become more open in a future release.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.tree.AbstractLayoutCache

        AbstractLayoutCache.NodeDimensions

    • Field Summary

      • Fields inherited from class javax.swing.tree.AbstractLayoutCache

        nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel

    • Constructor Summary

      Constructors
      Constructor and Description
      FixedHeightLayoutCache()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Rectangle getBounds(TreePath path, Rectangle placeIn)
      Returns a rectangle giving the bounds needed to draw path.
      boolean getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      TreePath getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath getPathForRow(int row)
      Returns the path for passed in row.
      int getRowCount()
      Returns the number of visible rows.
      int getRowForPath(TreePath path)
      Returns the row that the last item identified in path is visible at.
      int getVisibleChildCount(TreePath path)
      Returns the number of visible children for row.
      Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      void invalidatePathBounds(TreePath path)
      Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
      void invalidateSizes()
      Informs the TreeState that it needs to recalculate all the sizes it is referencing.
      boolean isExpanded(TreePath path)
      Returns true if the value identified by row is currently expanded.
      void setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      void setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      void setRootVisible(boolean rootVisible)
      Determines whether or not the root node from the TreeModel is visible.
      void setRowHeight(int rowHeight)
      Sets the height of each cell.
      void treeNodesChanged(TreeModelEvent e)
      Invoked after a node (or a set of siblings) has changed in some way.
      void treeNodesInserted(TreeModelEvent e)
      Invoked after nodes have been inserted into the tree.
      void treeNodesRemoved(TreeModelEvent e)
      Invoked after nodes have been removed from the tree.
      void treeStructureChanged(TreeModelEvent e)
      Invoked after the tree has drastically changed structure from a given node down.

      • Methods inherited from class javax.swing.tree.AbstractLayoutCache

        getModel, getNodeDimensions, getNodeDimensions, getPreferredHeight, getPreferredWidth, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setNodeDimensions, setSelectionModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • FixedHeightLayoutCache

        public FixedHeightLayoutCache()

    • Method Detail

      • setModel

        public void setModel(TreeModel newModel)
        Sets the TreeModel that will provide the data.
        Overrides:
        setModel in class AbstractLayoutCache
        Parameters:
        newModel - the TreeModel that is to provide the data

      • setRootVisible

        public void setRootVisible(boolean rootVisible)
        Determines whether or not the root node from the TreeModel is visible.
        Overrides:
        setRootVisible in class AbstractLayoutCache
        Parameters:
        rootVisible - true if the root node of the tree is to be displayed
        See Also:
        AbstractLayoutCache.rootVisible

      • setRowHeight

        public void setRowHeight(int rowHeight)
        Sets the height of each cell. If rowHeight is less than or equal to 0 this will throw an IllegalArgumentException.
        Overrides:
        setRowHeight in class AbstractLayoutCache
        Parameters:
        rowHeight - the height of each cell, in pixels

      • getRowCount

        public int getRowCount()
        Returns the number of visible rows.
        Specified by:
        getRowCount in class AbstractLayoutCache
        Returns:
        the number of rows being displayed

      • invalidatePathBounds

        public void invalidatePathBounds(TreePath path)
        Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
        Specified by:
        invalidatePathBounds in class AbstractLayoutCache
        Parameters:
        path - the path being updated

      • invalidateSizes

        public void invalidateSizes()
        Informs the TreeState that it needs to recalculate all the sizes it is referencing.
        Specified by:
        invalidateSizes in class AbstractLayoutCache

      • isExpanded

        public boolean isExpanded(TreePath path)
        Returns true if the value identified by row is currently expanded.
        Specified by:
        isExpanded in class AbstractLayoutCache

      • getBounds

        public Rectangle getBounds(TreePath path,
                           Rectangle placeIn)
        Returns a rectangle giving the bounds needed to draw path.
        Specified by:
        getBounds in class AbstractLayoutCache
        Parameters:
        path - a TreePath specifying a node
        placeIn - a Rectangle object giving the available space
        Returns:
        a Rectangle object specifying the space to be used

      • getPathForRow

        public TreePath getPathForRow(int row)
        Returns the path for passed in row. If row is not visible null is returned.
        Specified by:
        getPathForRow in class AbstractLayoutCache
        Parameters:
        row - the row being queried
        Returns:
        the TreePath for the given row

      • getRowForPath

        public int getRowForPath(TreePath path)
        Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
        Specified by:
        getRowForPath in class AbstractLayoutCache
        Parameters:
        path - the TreePath being queried
        Returns:
        the row where the last item in path is visible or -1 if any elements in path aren't currently visible

      • getPathClosestTo

        public TreePath getPathClosestTo(int x,
                                 int y)
        Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
        Specified by:
        getPathClosestTo in class AbstractLayoutCache
        Parameters:
        x - the horizontal component of the desired location
        y - the vertical component of the desired location
        Returns:
        the TreePath closest to the specified point

      • getVisibleChildCount

        public int getVisibleChildCount(TreePath path)
        Returns the number of visible children for row.
        Specified by:
        getVisibleChildCount in class AbstractLayoutCache
        Parameters:
        path - the path being queried
        Returns:
        the number of visible children for the specified path

      • getVisiblePathsFrom

        public Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
        Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed.
        Specified by:
        getVisiblePathsFrom in class AbstractLayoutCache
        Parameters:
        path - the starting location for the enumeration
        Returns:
        the Enumerator starting at the desired location

      • setExpandedState

        public void setExpandedState(TreePath path,
                             boolean isExpanded)
        Marks the path path expanded state to isExpanded.
        Specified by:
        setExpandedState in class AbstractLayoutCache
        Parameters:
        path - the path being expanded or collapsed
        isExpanded - true if the path should be expanded, false otherwise

      • getExpandedState

        public boolean getExpandedState(TreePath path)
        Returns true if the path is expanded, and visible.
        Specified by:
        getExpandedState in class AbstractLayoutCache
        Parameters:
        path - the path being queried
        Returns:
        true if the path is expanded and visible, false otherwise

      • treeNodesChanged

        public void treeNodesChanged(TreeModelEvent e)

        Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

        e.path() returns the path the parent of the changed node(s).

        e.childIndices() returns the index(es) of the changed node(s).

        Specified by:
        treeNodesChanged in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent

      • treeNodesInserted

        public void treeNodesInserted(TreeModelEvent e)

        Invoked after nodes have been inserted into the tree.

        e.path() returns the parent of the new nodes

        e.childIndices() returns the indices of the new nodes in ascending order.

        Specified by:
        treeNodesInserted in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent

      • treeNodesRemoved

        public void treeNodesRemoved(TreeModelEvent e)

        Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

        e.path() returns the former parent of the deleted nodes.

        e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

        Specified by:
        treeNodesRemoved in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent

      • treeStructureChanged

        public void treeStructureChanged(TreeModelEvent e)

        Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

        e.path() holds the path to the node.

        e.childIndices() returns null.

        Specified by:
        treeStructureChanged in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MutableTreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface MutableTreeNode

  • All Superinterfaces:
    TreeNode
    All Known Implementing Classes:
    DefaultMutableTreeNode, JTree.DynamicUtilTreeNode

    public interface MutableTreeNode
extends TreeNode
    Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
    See Also:
    DefaultMutableTreeNode, JTree

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void insert(MutableTreeNode child, int index)
      Adds child to the receiver at index.
      void remove(int index)
      Removes the child at index from the receiver.
      void remove(MutableTreeNode node)
      Removes node from the receiver.
      void removeFromParent()
      Removes the receiver from its parent.
      void setParent(MutableTreeNode newParent)
      Sets the parent of the receiver to newParent.
      void setUserObject(Object object)
      Resets the user object of the receiver to object.

      • Methods inherited from interface javax.swing.tree.TreeNode

        children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf

    • Method Detail

      • insert

        void insert(MutableTreeNode child,
            int index)
        Adds child to the receiver at index. child will be messaged with setParent.

      • remove

        void remove(int index)
        Removes the child at index from the receiver.

      • remove

        void remove(MutableTreeNode node)
        Removes node from the receiver. setParent will be messaged on node.

      • setUserObject

        void setUserObject(Object object)
        Resets the user object of the receiver to object.

      • removeFromParent

        void removeFromParent()
        Removes the receiver from its parent.

      • setParent

        void setParent(MutableTreeNode newParent)
        Sets the parent of the receiver to newParent.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RowMapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface RowMapper

  • All Known Implementing Classes:
    AbstractLayoutCache, FixedHeightLayoutCache, VariableHeightLayoutCache

    public interface RowMapper
    Defines the requirements for an object that translates paths in the tree into display rows.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int[] getRowsForPaths(TreePath[] path)
      Returns the rows that the TreePath instances in path are being displayed at.

    • Method Detail

      • getRowsForPaths

        int[] getRowsForPaths(TreePath[] path)
        Returns the rows that the TreePath instances in path are being displayed at. The receiver should return an array of the same length as that passed in, and if one of the TreePaths in path is not valid its entry in the array should be set to -1.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreeCellEditor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface TreeCellEditor

  • All Superinterfaces:
    CellEditor
    All Known Implementing Classes:
    DefaultCellEditor, DefaultTreeCellEditor

    public interface TreeCellEditor
extends CellEditor
    Adds to CellEditor the extensions necessary to configure an editor in a tree.
    See Also:
    JTree

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
      Sets an initial value for the editor.

      • Methods inherited from interface javax.swing.CellEditor

        addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing

    • Method Detail

      • getTreeCellEditorComponent

        Component getTreeCellEditorComponent(JTree tree,
                                     Object value,
                                     boolean isSelected,
                                     boolean expanded,
                                     boolean leaf,
                                     int row)
        Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

        Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

        Parameters:
        tree - the JTree that is asking the editor to edit; this parameter can be null
        value - the value of the cell to be edited
        isSelected - true if the cell is to be rendered with selection highlighting
        expanded - true if the node is expanded
        leaf - true if the node is a leaf node
        row - the row index of the node being edited
        Returns:
        the component for editing
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreeCellRenderer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface TreeCellRenderer

  • All Known Implementing Classes:
    DefaultTreeCellRenderer

    public interface TreeCellRenderer
    Defines the requirements for an object that displays a tree node. See How to Use Trees in The Java Tutorial for an example of implementing a tree cell renderer that displays custom icons.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
      Sets the value of the current tree cell to value.

    • Method Detail

      • getTreeCellRendererComponent

        Component getTreeCellRendererComponent(JTree tree,
                                       Object value,
                                       boolean selected,
                                       boolean expanded,
                                       boolean leaf,
                                       int row,
                                       boolean hasFocus)
        Sets the value of the current tree cell to value. If selected is true, the cell will be drawn as if selected. If expanded is true the node is currently expanded and if leaf is true the node represents a leaf and if hasFocus is true the node currently has focus. tree is the JTree the receiver is being configured for. Returns the Component that the renderer uses to draw the value.

        The TreeCellRenderer is also responsible for rendering the the cell representing the tree's current DnD drop location if it has one. If this renderer cares about rendering the DnD drop location, it should query the tree directly to see if the given row represents the drop location:

             JTree.DropLocation dropLocation = tree.getDropLocation();
     if (dropLocation != null
             && dropLocation.getChildIndex() == -1
             && tree.getRowForPath(dropLocation.getPath()) == row) {

         // this row represents the current drop location
         // so render it specially, perhaps with a different color
     }
        Returns:
        the Component that the renderer uses to draw the value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreeModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface TreeModel

  • All Known Implementing Classes:
    DefaultTreeModel

    public interface TreeModel
    The model used by JTree.

    JTree and its related classes make extensive use of TreePaths for identifying nodes in the TreeModel. If a TreeModel returns the same object, as compared by equals, at two different indices under the same parent than the resulting TreePath objects will be considered equal as well. Some implementations may assume that if two TreePaths are equal, they identify the same node. If this condition is not met, painting problems and other oddities may result. In other words, if getChild for a given parent returns the same Object (as determined by equals) problems may result, and it is recommended you avoid doing this.

    Similarly JTree and its related classes place TreePaths in Maps. As such if a node is requested twice, the return values must be equal (using the equals method) and have the same hashCode.

    For further information on tree models, including an example of a custom implementation, see How to Use Trees in The Java Tutorial.

    See Also:
    TreePath

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addTreeModelListener(TreeModelListener l)
      Adds a listener for the TreeModelEvent posted after the tree changes.
      Object getChild(Object parent, int index)
      Returns the child of parent at index index in the parent's child array.
      int getChildCount(Object parent)
      Returns the number of children of parent.
      int getIndexOfChild(Object parent, Object child)
      Returns the index of child in parent.
      Object getRoot()
      Returns the root of the tree.
      boolean isLeaf(Object node)
      Returns true if node is a leaf.
      void removeTreeModelListener(TreeModelListener l)
      Removes a listener previously added with addTreeModelListener.
      void valueForPathChanged(TreePath path, Object newValue)
      Messaged when the user has altered the value for the item identified by path to newValue.

    • Method Detail

      • getRoot

        Object getRoot()
        Returns the root of the tree. Returns null only if the tree has no nodes.
        Returns:
        the root of the tree

      • getChild

        Object getChild(Object parent,
                int index)
        Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index < getChildCount(parent)).
        Parameters:
        parent - a node in the tree, obtained from this data source
        Returns:
        the child of parent at index index

      • getChildCount

        int getChildCount(Object parent)
        Returns the number of children of parent. Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
        Parameters:
        parent - a node in the tree, obtained from this data source
        Returns:
        the number of children of the node parent

      • isLeaf

        boolean isLeaf(Object node)
        Returns true if node is a leaf. It is possible for this method to return false even if node has no children. A directory in a filesystem, for example, may contain no files; the node representing the directory is not a leaf, but it also has no children.
        Parameters:
        node - a node in the tree, obtained from this data source
        Returns:
        true if node is a leaf

      • valueForPathChanged

        void valueForPathChanged(TreePath path,
                         Object newValue)
        Messaged when the user has altered the value for the item identified by path to newValue. If newValue signifies a truly new value the model should post a treeNodesChanged event.
        Parameters:
        path - path to the node that the user has altered
        newValue - the new value from the TreeCellEditor

      • getIndexOfChild

        int getIndexOfChild(Object parent,
                    Object child)
        Returns the index of child in parent. If either parent or child is null, returns -1. If either parent or child don't belong to this tree model, returns -1.
        Parameters:
        parent - a node in the tree, obtained from this data source
        child - the node we are interested in
        Returns:
        the index of the child in the parent, or -1 if either child or parent are null or don't belong to this tree model

      • addTreeModelListener

        void addTreeModelListener(TreeModelListener l)
        Adds a listener for the TreeModelEvent posted after the tree changes.
        Parameters:
        l - the listener to add
        See Also:
        removeTreeModelListener(javax.swing.event.TreeModelListener)

      • removeTreeModelListener

        void removeTreeModelListener(TreeModelListener l)
        Removes a listener previously added with addTreeModelListener.
        Parameters:
        l - the listener to remove
        See Also:
        addTreeModelListener(javax.swing.event.TreeModelListener)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreeNode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface TreeNode

  • All Known Subinterfaces:
    MutableTreeNode
    All Known Implementing Classes:
    AbstractDocument.AbstractElement, AbstractDocument.BranchElement, AbstractDocument.LeafElement, DefaultMutableTreeNode, DefaultStyledDocument.SectionElement, HTMLDocument.BlockElement, HTMLDocument.RunElement, JTree.DynamicUtilTreeNode

    public interface TreeNode
    Defines the requirements for an object that can be used as a tree node in a JTree.

    Implementations of TreeNode that override equals will typically need to override hashCode as well. Refer to TreeModel for more information. For further information and examples of using tree nodes, see How to Use Tree Nodes in The Java Tutorial.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Enumeration children()
      Returns the children of the receiver as an Enumeration.
      boolean getAllowsChildren()
      Returns true if the receiver allows children.
      TreeNode getChildAt(int childIndex)
      Returns the child TreeNode at index childIndex.
      int getChildCount()
      Returns the number of children TreeNodes the receiver contains.
      int getIndex(TreeNode node)
      Returns the index of node in the receivers children.
      TreeNode getParent()
      Returns the parent TreeNode of the receiver.
      boolean isLeaf()
      Returns true if the receiver is a leaf.

    • Method Detail

      • getChildAt

        TreeNode getChildAt(int childIndex)
        Returns the child TreeNode at index childIndex.

      • getChildCount

        int getChildCount()
        Returns the number of children TreeNodes the receiver contains.

      • getParent

        TreeNode getParent()
        Returns the parent TreeNode of the receiver.

      • getIndex

        int getIndex(TreeNode node)
        Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

      • getAllowsChildren

        boolean getAllowsChildren()
        Returns true if the receiver allows children.

      • isLeaf

        boolean isLeaf()
        Returns true if the receiver is a leaf.

      • children

        Enumeration children()
        Returns the children of the receiver as an Enumeration.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class TreePath

  • java.lang.Object
    • javax.swing.tree.TreePath
  • All Implemented Interfaces:
    Serializable

    public class TreePath
extends Object
implements Serializable
    TreePath represents an array of objects that uniquely identify the path to a node in a tree. The elements of the array are ordered with the root as the first element of the array. For example, a file on the file system is uniquely identified based on the array of parent directories and the name of the file. The path /tmp/foo/bar could be represented by a TreePath as new TreePath(new Object[] {"tmp", "foo", "bar"}).

    TreePath is used extensively by JTree and related classes. For example, JTree represents the selection as an array of TreePaths. When used with JTree, the elements of the path are the objects returned from the TreeModel. When JTree is paired with DefaultTreeModel, the elements of the path are TreeNodes. The following example illustrates extracting the user object from the selection of a JTree:

       DefaultMutableTreeNode root = ...;
   DefaultTreeModel model = new DefaultTreeModel(root);
   JTree tree = new JTree(model);
   ...
   TreePath selectedPath = tree.getSelectionPath();
   DefaultMutableTreeNode selectedNode =
       ((DefaultMutableTreeNode)selectedPath.getLastPathComponent()).
       getUserObject();
    Subclasses typically need override only getLastPathComponent, and getParentPath. As JTree internally creates TreePaths at various points, it's generally not useful to subclass TreePath and use with JTree.

    While TreePath is serializable, a NotSerializableException is thrown if any elements of the path are not serializable.

    For further information and examples of using tree paths, see How to Use Trees in The Java Tutorial.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TreePath()
      Creates an empty TreePath.
        TreePath(Object lastPathComponent)
      Creates a TreePath containing a single element.
        TreePath(Object[] path)
      Creates a TreePath from an array.
      protected TreePath(Object[] path, int length)
      Creates a TreePath from an array.
      protected TreePath(TreePath parent, Object lastPathComponent)
      Creates a TreePath with the specified parent and element.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean equals(Object o)
      Compares this TreePath to the specified object.
      Object getLastPathComponent()
      Returns the last element of this path.
      TreePath getParentPath()
      Returns the TreePath of the parent.
      Object[] getPath()
      Returns an ordered array of the elements of this TreePath.
      Object getPathComponent(int index)
      Returns the path element at the specified index.
      int getPathCount()
      Returns the number of elements in the path.
      int hashCode()
      Returns the hash code of this TreePath.
      boolean isDescendant(TreePath aTreePath)
      Returns true if aTreePath is a descendant of this TreePath.
      TreePath pathByAddingChild(Object child)
      Returns a new path containing all the elements of this path plus child.
      String toString()
      Returns a string that displays and identifies this object's properties.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TreePath

        @ConstructorProperties(value="path")
public TreePath(Object[] path)
        Creates a TreePath from an array. The array uniquely identifies the path to a node.
        Parameters:
        path - an array of objects representing the path to a node
        Throws:
        IllegalArgumentException - if path is null, empty, or contains a null value

      • TreePath

        public TreePath(Object lastPathComponent)
        Creates a TreePath containing a single element. This is used to construct a TreePath identifying the root.
        Parameters:
        lastPathComponent - the root
        Throws:
        IllegalArgumentException - if lastPathComponent is null
        See Also:
        TreePath(Object[])

      • TreePath

        protected TreePath(TreePath parent,
                   Object lastPathComponent)
        Creates a TreePath with the specified parent and element.
        Parameters:
        parent - the path to the parent, or null to indicate the root
        lastPathComponent - the last path element
        Throws:
        IllegalArgumentException - if lastPathComponent is null

      • TreePath

        protected TreePath(Object[] path,
                   int length)
        Creates a TreePath from an array. The returned TreePath represents the elements of the array from 0 to length - 1.

        This constructor is used internally, and generally not useful outside of subclasses.

        Parameters:
        path - the array to create the TreePath from
        length - identifies the number of elements in path to create the TreePath from
        Throws:
        NullPointerException - if path is null
        ArrayIndexOutOfBoundsException - if length - 1 is outside the range of the array
        IllegalArgumentException - if any of the elements from 0 to length - 1 are null

      • TreePath

        protected TreePath()
        Creates an empty TreePath. This is provided for subclasses that represent paths in a different manner. Subclasses that use this constructor must override getLastPathComponent, and getParentPath.

    • Method Detail

      • getPath

        public Object[] getPath()
        Returns an ordered array of the elements of this TreePath. The first element is the root.
        Returns:
        an array of the elements in this TreePath

      • getLastPathComponent

        public Object getLastPathComponent()
        Returns the last element of this path.
        Returns:
        the last element in the path

      • getPathCount

        public int getPathCount()
        Returns the number of elements in the path.
        Returns:
        the number of elements in the path

      • getPathComponent

        public Object getPathComponent(int index)
        Returns the path element at the specified index.
        Parameters:
        index - the index of the element requested
        Returns:
        the element at the specified index
        Throws:
        IllegalArgumentException - if the index is outside the range of this path

      • equals

        public boolean equals(Object o)
        Compares this TreePath to the specified object. This returns true if o is a TreePath with the exact same elements (as determined by using equals on each element of the path).
        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare
        Returns:
        true if this object is the same as the obj argument; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public int hashCode()
        Returns the hash code of this TreePath. The hash code of a TreePath is the hash code of the last element in the path.
        Overrides:
        hashCode in class Object
        Returns:
        the hashCode for the object
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • isDescendant

        public boolean isDescendant(TreePath aTreePath)
        Returns true if aTreePath is a descendant of this TreePath. A TreePath P1 is a descendant of a TreePath P2 if P1 contains all of the elements that make up P2's path. For example, if this object has the path [a, b], and aTreePath has the path [a, b, c], then aTreePath is a descendant of this object. However, if aTreePath has the path [a], then it is not a descendant of this object. By this definition a TreePath is always considered a descendant of itself. That is, aTreePath.isDescendant(aTreePath) returns true.
        Parameters:
        aTreePath - the TreePath to check
        Returns:
        true if aTreePath is a descendant of this path

      • pathByAddingChild

        public TreePath pathByAddingChild(Object child)
        Returns a new path containing all the elements of this path plus child. child is the last element of the newly created TreePath.
        Parameters:
        child - the path element to add
        Throws:
        NullPointerException - if child is null

      • getParentPath

        public TreePath getParentPath()
        Returns the TreePath of the parent. A return value of null indicates this is the root node.
        Returns:
        the parent path

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TreeSelectionModel

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Interface TreeSelectionModel

  • All Known Implementing Classes:
    DefaultTreeSelectionModel, JTree.EmptySelectionModel

    public interface TreeSelectionModel
    This interface represents the current state of the selection for the tree component. For information and examples of using tree selection models, see How to Use Trees in The Java Tutorial.

    The state of the tree selection is characterized by a set of TreePaths, and optionally a set of integers. The mapping from TreePath to integer is done by way of an instance of RowMapper. It is not necessary for a TreeSelectionModel to have a RowMapper to correctly operate, but without a RowMapper getSelectionRows will return null.

    A TreeSelectionModel can be configured to allow only one path (SINGLE_TREE_SELECTION) a number of contiguous paths (CONTIGUOUS_TREE_SELECTION) or a number of discontiguous paths (DISCONTIGUOUS_TREE_SELECTION). A RowMapper is used to determine if TreePaths are contiguous. In the absence of a RowMapper CONTIGUOUS_TREE_SELECTION and DISCONTIGUOUS_TREE_SELECTION behave the same, that is they allow any number of paths to be contained in the TreeSelectionModel.

    For a selection model of CONTIGUOUS_TREE_SELECTION any time the paths are changed (setSelectionPath, addSelectionPath ...) the TreePaths are again checked to make they are contiguous. A check of the TreePaths can also be forced by invoking resetRowSelection. How a set of discontiguous TreePaths is mapped to a contiguous set is left to implementors of this interface to enforce a particular policy.

    Implementations should combine duplicate TreePaths that are added to the selection. For example, the following code

       TreePath[] paths = new TreePath[] { treePath, treePath };
   treeSelectionModel.setSelectionPaths(paths);
    should result in only one path being selected: treePath, and not two copies of treePath.

    The lead TreePath is the last path that was added (or set). The lead row is then the row that corresponds to the TreePath as determined from the RowMapper.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int CONTIGUOUS_TREE_SELECTION
      Selection can only be contiguous.
      static int DISCONTIGUOUS_TREE_SELECTION
      Selection can contain any number of items that are not necessarily contiguous.
      static int SINGLE_TREE_SELECTION
      Selection can only contain one path at a time.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      void addSelectionPath(TreePath path)
      Adds path to the current selection.
      void addSelectionPaths(TreePath[] paths)
      Adds paths to the current selection.
      void addTreeSelectionListener(TreeSelectionListener x)
      Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
      void clearSelection()
      Empties the current selection.
      TreePath getLeadSelectionPath()
      Returns the last path that was added.
      int getLeadSelectionRow()
      Returns the lead selection index.
      int getMaxSelectionRow()
      Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
      int getMinSelectionRow()
      Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
      RowMapper getRowMapper()
      Returns the RowMapper instance that is able to map a TreePath to a row.
      int getSelectionCount()
      Returns the number of paths that are selected.
      int getSelectionMode()
      Returns the current selection mode, one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
      TreePath getSelectionPath()
      Returns the first path in the selection.
      TreePath[] getSelectionPaths()
      Returns the paths in the selection.
      int[] getSelectionRows()
      Returns all of the currently selected rows.
      boolean isPathSelected(TreePath path)
      Returns true if the path, path, is in the current selection.
      boolean isRowSelected(int row)
      Returns true if the row identified by row is selected.
      boolean isSelectionEmpty()
      Returns true if the selection is currently empty.
      void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      void removeSelectionPath(TreePath path)
      Removes path from the selection.
      void removeSelectionPaths(TreePath[] paths)
      Removes paths from the selection.
      void removeTreeSelectionListener(TreeSelectionListener x)
      Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
      void resetRowSelection()
      Updates this object's mapping from TreePaths to rows.
      void setRowMapper(RowMapper newMapper)
      Sets the RowMapper instance.
      void setSelectionMode(int mode)
      Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
      void setSelectionPath(TreePath path)
      Sets the selection to path.
      void setSelectionPaths(TreePath[] paths)
      Sets the selection to path.

    • Field Detail

      • SINGLE_TREE_SELECTION

        static final int SINGLE_TREE_SELECTION
        Selection can only contain one path at a time.
        See Also:
        Constant Field Values

      • CONTIGUOUS_TREE_SELECTION

        static final int CONTIGUOUS_TREE_SELECTION
        Selection can only be contiguous. This will only be enforced if a RowMapper instance is provided. That is, if no RowMapper is set this behaves the same as DISCONTIGUOUS_TREE_SELECTION.
        See Also:
        Constant Field Values

      • DISCONTIGUOUS_TREE_SELECTION

        static final int DISCONTIGUOUS_TREE_SELECTION
        Selection can contain any number of items that are not necessarily contiguous.
        See Also:
        Constant Field Values

    • Method Detail

      • setSelectionMode

        void setSelectionMode(int mode)
        Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

        This may change the selection if the current selection is not valid for the new mode. For example, if three TreePaths are selected when the mode is changed to SINGLE_TREE_SELECTION, only one TreePath will remain selected. It is up to the particular implementation to decide what TreePath remains selected.

      • getSelectionMode

        int getSelectionMode()
        Returns the current selection mode, one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

      • setSelectionPath

        void setSelectionPath(TreePath path)
        Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If path is null, this has the same effect as invoking clearSelection.
        Parameters:
        path - new path to select

      • setSelectionPaths

        void setSelectionPaths(TreePath[] paths)
        Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If paths is null, this has the same effect as invoking clearSelection.
        Parameters:
        paths - new selection

      • addSelectionPath

        void addSelectionPath(TreePath path)
        Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified. This has no effect if path is null.
        Parameters:
        path - the new path to add to the current selection

      • addSelectionPaths

        void addSelectionPaths(TreePath[] paths)
        Adds paths to the current selection. If any of the paths in paths are not currently in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.
        Parameters:
        paths - the new paths to add to the current selection

      • removeSelectionPath

        void removeSelectionPath(TreePath path)
        Removes path from the selection. If path is in the selection The TreeSelectionListeners are notified. This has no effect if path is null.
        Parameters:
        path - the path to remove from the selection

      • removeSelectionPaths

        void removeSelectionPaths(TreePath[] paths)
        Removes paths from the selection. If any of the paths in paths are in the selection, the TreeSelectionListeners are notified. This method has no effect if paths is null.
        Parameters:
        paths - the path to remove from the selection

      • getSelectionPath

        TreePath getSelectionPath()
        Returns the first path in the selection. How first is defined is up to implementors, and may not necessarily be the TreePath with the smallest integer value as determined from the RowMapper.

      • getSelectionPaths

        TreePath[] getSelectionPaths()
        Returns the paths in the selection. This will return null (or an empty array) if nothing is currently selected.

      • getSelectionCount

        int getSelectionCount()
        Returns the number of paths that are selected.

      • isPathSelected

        boolean isPathSelected(TreePath path)
        Returns true if the path, path, is in the current selection.

      • isSelectionEmpty

        boolean isSelectionEmpty()
        Returns true if the selection is currently empty.

      • clearSelection

        void clearSelection()
        Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.

      • setRowMapper

        void setRowMapper(RowMapper newMapper)
        Sets the RowMapper instance. This instance is used to determine the row for a particular TreePath.

      • getRowMapper

        RowMapper getRowMapper()
        Returns the RowMapper instance that is able to map a TreePath to a row.

      • getSelectionRows

        int[] getSelectionRows()
        Returns all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set.

      • getMinSelectionRow

        int getMinSelectionRow()
        Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.

      • getMaxSelectionRow

        int getMaxSelectionRow()
        Returns the largest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.

      • isRowSelected

        boolean isRowSelected(int row)
        Returns true if the row identified by row is selected.

      • resetRowSelection

        void resetRowSelection()
        Updates this object's mapping from TreePaths to rows. This should be invoked when the mapping from TreePaths to integers has changed (for example, a node has been expanded).

        You do not normally have to call this; JTree and its associated listeners will invoke this for you. If you are implementing your own view class, then you will have to invoke this.

      • getLeadSelectionRow

        int getLeadSelectionRow()
        Returns the lead selection index. That is the last index that was added.

      • getLeadSelectionPath

        TreePath getLeadSelectionPath()
        Returns the last path that was added. This may differ from the leadSelectionPath property maintained by the JTree.

      • addPropertyChangeListener

        void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

        A PropertyChangeEvent will get fired when the selection mode changes.

        Parameters:
        listener - the PropertyChangeListener to be added

      • removePropertyChangeListener

        void removePropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
        Parameters:
        listener - the PropertyChangeListener to be removed

      • addTreeSelectionListener

        void addTreeSelectionListener(TreeSelectionListener x)
        Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
        Parameters:
        x - the new listener to be added

      • removeTreeSelectionListener

        void removeTreeSelectionListener(TreeSelectionListener x)
        Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
        Parameters:
        x - the listener to remove
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VariableHeightLayoutCache

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.tree

Class VariableHeightLayoutCache

  • java.lang.Object
    • javax.swing.tree.AbstractLayoutCache
      • javax.swing.tree.VariableHeightLayoutCache
  • All Implemented Interfaces:
    RowMapper

    public class VariableHeightLayoutCache
extends AbstractLayoutCache
    NOTE: This will become more open in a future release.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.tree.AbstractLayoutCache

        AbstractLayoutCache.NodeDimensions

    • Field Summary

      • Fields inherited from class javax.swing.tree.AbstractLayoutCache

        nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel

    • Constructor Summary

      Constructors
      Constructor and Description
      VariableHeightLayoutCache()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Rectangle getBounds(TreePath path, Rectangle placeIn)
      Returns the Rectangle enclosing the label portion into which the item identified by path will be drawn.
      boolean getExpandedState(TreePath path)
      Returns true if the path is expanded, and visible.
      TreePath getPathClosestTo(int x, int y)
      Returns the path to the node that is closest to x,y.
      TreePath getPathForRow(int row)
      Returns the path for row.
      int getPreferredHeight()
      Returns the preferred height.
      int getPreferredWidth(Rectangle bounds)
      Returns the preferred width and height for the region in visibleRegion.
      int getRowCount()
      Returns the number of visible rows.
      int getRowForPath(TreePath path)
      Returns the row where the last item identified in path is visible.
      int getVisibleChildCount(TreePath path)
      Returns the number of visible children for path.
      Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
      Returns an Enumerator that increments over the visible paths starting at the passed in location.
      void invalidatePathBounds(TreePath path)
      Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
      void invalidateSizes()
      Informs the TreeState that it needs to recalculate all the sizes it is referencing.
      boolean isExpanded(TreePath path)
      Returns true if the value identified by path is currently expanded.
      void setExpandedState(TreePath path, boolean isExpanded)
      Marks the path path expanded state to isExpanded.
      void setModel(TreeModel newModel)
      Sets the TreeModel that will provide the data.
      void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
      Sets the renderer that is responsible for drawing nodes in the tree.
      void setRootVisible(boolean rootVisible)
      Determines whether or not the root node from the TreeModel is visible.
      void setRowHeight(int rowHeight)
      Sets the height of each cell.
      void treeNodesChanged(TreeModelEvent e)
      Invoked after a node (or a set of siblings) has changed in some way.
      void treeNodesInserted(TreeModelEvent e)
      Invoked after nodes have been inserted into the tree.
      void treeNodesRemoved(TreeModelEvent e)
      Invoked after nodes have been removed from the tree.
      void treeStructureChanged(TreeModelEvent e)
      Invoked after the tree has drastically changed structure from a given node down.

      • Methods inherited from class javax.swing.tree.AbstractLayoutCache

        getModel, getNodeDimensions, getNodeDimensions, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setSelectionModel

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • VariableHeightLayoutCache

        public VariableHeightLayoutCache()

    • Method Detail

      • setModel

        public void setModel(TreeModel newModel)
        Sets the TreeModel that will provide the data.
        Overrides:
        setModel in class AbstractLayoutCache
        Parameters:
        newModel - the TreeModel that is to provide the data

      • setRootVisible

        public void setRootVisible(boolean rootVisible)
        Determines whether or not the root node from the TreeModel is visible.
        Overrides:
        setRootVisible in class AbstractLayoutCache
        Parameters:
        rootVisible - true if the root node of the tree is to be displayed
        See Also:
        AbstractLayoutCache.rootVisible

      • setRowHeight

        public void setRowHeight(int rowHeight)
        Sets the height of each cell. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height.
        Overrides:
        setRowHeight in class AbstractLayoutCache
        Parameters:
        rowHeight - the height of each cell, in pixels

      • setNodeDimensions

        public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
        Sets the renderer that is responsible for drawing nodes in the tree.
        Overrides:
        setNodeDimensions in class AbstractLayoutCache
        Parameters:
        nd - the renderer

      • setExpandedState

        public void setExpandedState(TreePath path,
                             boolean isExpanded)
        Marks the path path expanded state to isExpanded.
        Specified by:
        setExpandedState in class AbstractLayoutCache
        Parameters:
        path - the TreePath of interest
        isExpanded - true if the path should be expanded, otherwise false

      • getExpandedState

        public boolean getExpandedState(TreePath path)
        Returns true if the path is expanded, and visible.
        Specified by:
        getExpandedState in class AbstractLayoutCache
        Parameters:
        path - the path being queried
        Returns:
        true if the path is expanded and visible, otherwise false

      • getBounds

        public Rectangle getBounds(TreePath path,
                           Rectangle placeIn)
        Returns the Rectangle enclosing the label portion into which the item identified by path will be drawn.
        Specified by:
        getBounds in class AbstractLayoutCache
        Parameters:
        path - the path to be drawn
        placeIn - the bounds of the enclosing rectangle
        Returns:
        the bounds of the enclosing rectangle or null if the node could not be ascertained

      • getPathForRow

        public TreePath getPathForRow(int row)
        Returns the path for row. If row is not visible, null is returned.
        Specified by:
        getPathForRow in class AbstractLayoutCache
        Parameters:
        row - the location of interest
        Returns:
        the path for row, or null if row is not visible

      • getRowForPath

        public int getRowForPath(TreePath path)
        Returns the row where the last item identified in path is visible. Will return -1 if any of the elements in path are not currently visible.
        Specified by:
        getRowForPath in class AbstractLayoutCache
        Parameters:
        path - the TreePath of interest
        Returns:
        the row where the last item in path is visible

      • getRowCount

        public int getRowCount()
        Returns the number of visible rows.
        Specified by:
        getRowCount in class AbstractLayoutCache
        Returns:
        the number of visible rows

      • invalidatePathBounds

        public void invalidatePathBounds(TreePath path)
        Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
        Specified by:
        invalidatePathBounds in class AbstractLayoutCache
        Parameters:
        path - the TreePath which is now invalid

      • getPreferredHeight

        public int getPreferredHeight()
        Returns the preferred height.
        Overrides:
        getPreferredHeight in class AbstractLayoutCache
        Returns:
        the preferred height

      • getPreferredWidth

        public int getPreferredWidth(Rectangle bounds)
        Returns the preferred width and height for the region in visibleRegion.
        Overrides:
        getPreferredWidth in class AbstractLayoutCache
        Parameters:
        bounds - the region being queried
        Returns:
        the preferred width for the passed in region

      • getPathClosestTo

        public TreePath getPathClosestTo(int x,
                                 int y)
        Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it will always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
        Specified by:
        getPathClosestTo in class AbstractLayoutCache
        Parameters:
        x - the x-coordinate
        y - the y-coordinate
        Returns:
        the path to the node that is closest to x, y

      • getVisiblePathsFrom

        public Enumeration<TreePath> getVisiblePathsFrom(TreePath path)
        Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed.
        Specified by:
        getVisiblePathsFrom in class AbstractLayoutCache
        Parameters:
        path - the location in the TreePath to start
        Returns:
        an Enumerator that increments over the visible paths

      • getVisibleChildCount

        public int getVisibleChildCount(TreePath path)
        Returns the number of visible children for path.
        Specified by:
        getVisibleChildCount in class AbstractLayoutCache
        Parameters:
        path - the path being queried
        Returns:
        the number of visible children for path

      • invalidateSizes

        public void invalidateSizes()
        Informs the TreeState that it needs to recalculate all the sizes it is referencing.
        Specified by:
        invalidateSizes in class AbstractLayoutCache

      • isExpanded

        public boolean isExpanded(TreePath path)
        Returns true if the value identified by path is currently expanded.
        Specified by:
        isExpanded in class AbstractLayoutCache
        Returns:
        true if the value identified by path is currently expanded

      • treeNodesChanged

        public void treeNodesChanged(TreeModelEvent e)
        Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

        e.path returns the path the parent of the changed node(s).

        e.childIndices returns the index(es) of the changed node(s).

        Specified by:
        treeNodesChanged in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent of interest

      • treeNodesInserted

        public void treeNodesInserted(TreeModelEvent e)
        Invoked after nodes have been inserted into the tree.

        e.path returns the parent of the new nodes.

        e.childIndices returns the indices of the new nodes in ascending order.

        Specified by:
        treeNodesInserted in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent of interest

      • treeNodesRemoved

        public void treeNodesRemoved(TreeModelEvent e)
        Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

        e.path returns the former parent of the deleted nodes.

        e.childIndices returns the indices the nodes had before they were deleted in ascending order.

        Specified by:
        treeNodesRemoved in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent of interest

      • treeStructureChanged

        public void treeStructureChanged(TreeModelEvent e)
        Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

        e.path holds the path to the node.

        e.childIndices returns null.

        Specified by:
        treeStructureChanged in class AbstractLayoutCache
        Parameters:
        e - the TreeModelEvent of interest
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIDefaults

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UIDefaults

  • java.lang.Object
    • java.util.Dictionary<K,V>
      • java.util.Hashtable<Object,Object>
        • javax.swing.UIDefaults
  • All Implemented Interfaces:
    Serializable, Cloneable, Map<Object,Object>

    public class UIDefaults
extends Hashtable<Object,Object>
    A table of defaults for Swing components. Applications can set/get default values via the UIManager.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    UIManager

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static interface  UIDefaults.ActiveValue
      This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
      static class  UIDefaults.LazyInputMap
      LazyInputMap will create a InputMap in its createValue method.
      static interface  UIDefaults.LazyValue
      This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
      static class  UIDefaults.ProxyLazyValue
      This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.

    • Constructor Summary

      Constructors
      Constructor and Description
      UIDefaults()
      Creates an empty defaults table.
      UIDefaults(int initialCapacity, float loadFactor)
      Creates an empty defaults table with the specified initial capacity and load factor.
      UIDefaults(Object[] keyValueList)
      Creates a defaults table initialized with the specified key/value pairs.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      void addResourceBundle(String bundleName)
      Adds a resource bundle to the list of resource bundles that are searched for localized values.
      protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
      Support for reporting bound property changes.
      Object get(Object key)
      Returns the value for key.
      Object get(Object key, Locale l)
      Returns the value for key associated with the given locale.
      boolean getBoolean(Object key)
      If the value of key is boolean, return the boolean value, otherwise return false.
      boolean getBoolean(Object key, Locale l)
      If the value of key for the given Locale is boolean, return the boolean value, otherwise return false.
      Border getBorder(Object key)
      If the value of key is a Border return it, otherwise return null.
      Border getBorder(Object key, Locale l)
      If the value of key for the given Locale is a Border return it, otherwise return null.
      Color getColor(Object key)
      If the value of key is a Color return it, otherwise return null.
      Color getColor(Object key, Locale l)
      If the value of key for the given Locale is a Color return it, otherwise return null.
      Locale getDefaultLocale()
      Returns the default locale.
      Dimension getDimension(Object key)
      If the value of key is a Dimension return it, otherwise return null.
      Dimension getDimension(Object key, Locale l)
      If the value of key for the given Locale is a Dimension return it, otherwise return null.
      Font getFont(Object key)
      If the value of key is a Font return it, otherwise return null.
      Font getFont(Object key, Locale l)
      If the value of key for the given Locale is a Font return it, otherwise return null.
      Icon getIcon(Object key)
      If the value of key is an Icon return it, otherwise return null.
      Icon getIcon(Object key, Locale l)
      If the value of key for the given Locale is an Icon return it, otherwise return null.
      Insets getInsets(Object key)
      If the value of key is an Insets return it, otherwise return null.
      Insets getInsets(Object key, Locale l)
      If the value of key for the given Locale is an Insets return it, otherwise return null.
      int getInt(Object key)
      If the value of key is an Integer return its integer value, otherwise return 0.
      int getInt(Object key, Locale l)
      If the value of key for the given Locale is an Integer return its integer value, otherwise return 0.
      PropertyChangeListener[] getPropertyChangeListeners()
      Returns an array of all the PropertyChangeListeners added to this UIDefaults with addPropertyChangeListener().
      String getString(Object key)
      If the value of key is a String return it, otherwise return null.
      String getString(Object key, Locale l)
      If the value of key for the given Locale is a String return it, otherwise return null.
      ComponentUI getUI(JComponent target)
      Creates an ComponentUI implementation for the specified component.
      Class<? extends ComponentUI> getUIClass(String uiClassID)
      Returns the L&F class that renders this component.
      Class<? extends ComponentUI> getUIClass(String uiClassID, ClassLoader uiClassLoader)
      The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
      protected void getUIError(String msg)
      If getUI() fails for any reason, it calls this method before returning null.
      Object put(Object key, Object value)
      Sets the value of key to value for all locales.
      void putDefaults(Object[] keyValueList)
      Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent.
      void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      void removeResourceBundle(String bundleName)
      Removes a resource bundle from the list of resource bundles that are searched for localized defaults.
      void setDefaultLocale(Locale l)
      Sets the default locale.

      • Methods inherited from class java.util.Hashtable

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values

      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UIDefaults

        public UIDefaults()
        Creates an empty defaults table.

      • UIDefaults

        public UIDefaults(int initialCapacity,
                  float loadFactor)
        Creates an empty defaults table with the specified initial capacity and load factor.
        Parameters:
        initialCapacity - the initial capacity of the defaults table
        loadFactor - the load factor of the defaults table
        Since:
        1.6
        See Also:
        Hashtable

      • UIDefaults

        public UIDefaults(Object[] keyValueList)
        Creates a defaults table initialized with the specified key/value pairs. For example:
                Object[] uiDefaults = {
             "Font", new Font("Dialog", Font.BOLD, 12),
            "Color", Color.red,
             "five", new Integer(5)
        }
        UIDefaults myDefaults = new UIDefaults(uiDefaults);
        Parameters:
        keyValueList - an array of objects containing the key/value pairs

    • Method Detail

      • get

        public Object get(Object key)
        Returns the value for key. If the value is a UIDefaults.LazyValue then the real value is computed with LazyValue.createValue(), the table entry is replaced, and the real value is returned. If the value is an UIDefaults.ActiveValue the table entry is not replaced - the value is computed with ActiveValue.createValue() for each get() call. If the key is not found in the table then it is searched for in the list of resource bundles maintained by this object. The resource bundles are searched most recently added first using the locale returned by getDefaultLocale. LazyValues and ActiveValues are not supported in the resource bundles.
        Specified by:
        get in interface Map<Object,Object>
        Overrides:
        get in class Hashtable<Object,Object>
        Parameters:
        key - the desired key
        Returns:
        the value for key
        Since:
        1.4
        See Also:
        UIDefaults.LazyValue,
UIDefaults.ActiveValue,
Hashtable.get(java.lang.Object),
getDefaultLocale(),
addResourceBundle(java.lang.String)

      • get

        public Object get(Object key,
                  Locale l)
        Returns the value for key associated with the given locale. If the value is a UIDefaults.LazyValue then the real value is computed with LazyValue.createValue(), the table entry is replaced, and the real value is returned. If the value is an UIDefaults.ActiveValue the table entry is not replaced - the value is computed with ActiveValue.createValue() for each get() call. If the key is not found in the table then it is searched for in the list of resource bundles maintained by this object. The resource bundles are searched most recently added first using the given locale. LazyValues and ActiveValues are not supported in the resource bundles.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        the value for key
        Since:
        1.4
        See Also:
        UIDefaults.LazyValue, UIDefaults.ActiveValue, Hashtable.get(java.lang.Object), addResourceBundle(java.lang.String)

      • put

        public Object put(Object key,
                  Object value)
        Sets the value of key to value for all locales. If key is a string and the new value isn't equal to the old one, fire a PropertyChangeEvent. If value is null, the key is removed from the table.
        Specified by:
        put in interface Map<Object,Object>
        Overrides:
        put in class Hashtable<Object,Object>
        Parameters:
        key - the unique Object who's value will be used to retrieve the data value associated with it
        value - the new Object to store as data under that key
        Returns:
        the previous Object value, or null
        See Also:
        putDefaults(java.lang.Object[]), Hashtable.put(K, V)

      • putDefaults

        public void putDefaults(Object[] keyValueList)
        Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent. The events oldValue and newValue will be null and its propertyName will be "UIDefaults". The key/value pairs are added for all locales.
        Parameters:
        keyValueList - an array of key/value pairs
        See Also:
        put(java.lang.Object, java.lang.Object), Hashtable.put(K, V)

      • getFont

        public Font getFont(Object key)
        If the value of key is a Font return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is a Font, return the Font object; otherwise return null

      • getFont

        public Font getFont(Object key,
                    Locale l)
        If the value of key for the given Locale is a Font return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is a Font, return the Font object; otherwise return null
        Since:
        1.4

      • getColor

        public Color getColor(Object key)
        If the value of key is a Color return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is a Color, return the Color object; otherwise return null

      • getColor

        public Color getColor(Object key,
                      Locale l)
        If the value of key for the given Locale is a Color return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is a Color, return the Color object; otherwise return null
        Since:
        1.4

      • getIcon

        public Icon getIcon(Object key)
        If the value of key is an Icon return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is an Icon, return the Icon object; otherwise return null

      • getIcon

        public Icon getIcon(Object key,
                    Locale l)
        If the value of key for the given Locale is an Icon return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is an Icon, return the Icon object; otherwise return null
        Since:
        1.4

      • getBorder

        public Border getBorder(Object key)
        If the value of key is a Border return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is a Border, return the Border object; otherwise return null

      • getBorder

        public Border getBorder(Object key,
                        Locale l)
        If the value of key for the given Locale is a Border return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is a Border, return the Border object; otherwise return null
        Since:
        1.4

      • getString

        public String getString(Object key)
        If the value of key is a String return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is a String, return the String object; otherwise return null

      • getString

        public String getString(Object key,
                        Locale l)
        If the value of key for the given Locale is a String return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired Locale
        Returns:
        if the value for key for the given Locale is a String, return the String object; otherwise return null
        Since:
        1.4

      • getInt

        public int getInt(Object key)
        If the value of key is an Integer return its integer value, otherwise return 0.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is an Integer, return its value, otherwise return 0

      • getInt

        public int getInt(Object key,
                  Locale l)
        If the value of key for the given Locale is an Integer return its integer value, otherwise return 0.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is an Integer, return its value, otherwise return 0
        Since:
        1.4

      • getBoolean

        public boolean getBoolean(Object key)
        If the value of key is boolean, return the boolean value, otherwise return false.
        Parameters:
        key - an Object specifying the key for the desired boolean value
        Returns:
        if the value of key is boolean, return the boolean value, otherwise return false.
        Since:
        1.4

      • getBoolean

        public boolean getBoolean(Object key,
                          Locale l)
        If the value of key for the given Locale is boolean, return the boolean value, otherwise return false.
        Parameters:
        key - an Object specifying the key for the desired boolean value
        l - the desired locale
        Returns:
        if the value for key and Locale is boolean, return the boolean value, otherwise return false.
        Since:
        1.4

      • getInsets

        public Insets getInsets(Object key)
        If the value of key is an Insets return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is an Insets, return the Insets object; otherwise return null

      • getInsets

        public Insets getInsets(Object key,
                        Locale l)
        If the value of key for the given Locale is an Insets return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is an Insets, return the Insets object; otherwise return null
        Since:
        1.4

      • getDimension

        public Dimension getDimension(Object key)
        If the value of key is a Dimension return it, otherwise return null.
        Parameters:
        key - the desired key
        Returns:
        if the value for key is a Dimension, return the Dimension object; otherwise return null

      • getDimension

        public Dimension getDimension(Object key,
                              Locale l)
        If the value of key for the given Locale is a Dimension return it, otherwise return null.
        Parameters:
        key - the desired key
        l - the desired locale
        Returns:
        if the value for key and Locale is a Dimension, return the Dimension object; otherwise return null
        Since:
        1.4

      • getUIClass

        public Class<? extends ComponentUI> getUIClass(String uiClassID,
                                               ClassLoader uiClassLoader)
        The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class. If the class hasn't been loaded before, this method looks up the class with uiClassLoader.loadClass() if a non null class loader is provided, classForName() otherwise.

        If a mapping for uiClassID exists or if the specified class can't be found, return null.

        This method is used by getUI, it's usually not necessary to call it directly.

        Parameters:
        uiClassID - a string containing the class ID
        uiClassLoader - the object which will load the class
        Returns:
        the value of Class.forName(get(uidClassID))
        See Also:
        getUI(javax.swing.JComponent)

      • getUIClass

        public Class<? extends ComponentUI> getUIClass(String uiClassID)
        Returns the L&F class that renders this component.
        Parameters:
        uiClassID - a string containing the class ID
        Returns:
        the Class object returned by getUIClass(uiClassID, null)

      • getUIError

        protected void getUIError(String msg)
        If getUI() fails for any reason, it calls this method before returning null. Subclasses may choose to do more or less here.
        Parameters:
        msg - message string to print
        See Also:
        getUI(javax.swing.JComponent)

      • getUI

        public ComponentUI getUI(JComponent target)
        Creates an ComponentUI implementation for the specified component. In other words create the look and feel specific delegate object for target. This is done in two steps:
        • Look up the name of the ComponentUI implementation class under the value returned by target.getUIClassID().
        • Use the implementation classes static createUI() method to construct a look and feel delegate.
        Parameters:
        target - the JComponent which needs a UI
        Returns:
        the ComponentUI object

      • addPropertyChangeListener

        public void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

        A PropertyChangeEvent will get fired whenever a default is changed.

        Parameters:
        listener - the PropertyChangeListener to be added
        See Also:
        PropertyChangeSupport

      • removePropertyChangeListener

        public void removePropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
        Parameters:
        listener - the PropertyChangeListener to be removed
        See Also:
        PropertyChangeSupport

      • getPropertyChangeListeners

        public PropertyChangeListener[] getPropertyChangeListeners()
        Returns an array of all the PropertyChangeListeners added to this UIDefaults with addPropertyChangeListener().
        Returns:
        all of the PropertyChangeListeners added or an empty array if no listeners have been added
        Since:
        1.4

      • firePropertyChange

        protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
        Support for reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEventx listener list isn't empty, then fire a PropertyChange event to each listener.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property
        newValue - the new value of the property
        See Also:
        PropertyChangeSupport

      • addResourceBundle

        public void addResourceBundle(String bundleName)
        Adds a resource bundle to the list of resource bundles that are searched for localized values. Resource bundles are searched in the reverse order they were added. In other words, the most recently added bundle is searched first.
        Parameters:
        bundleName - the base name of the resource bundle to be added
        Since:
        1.4
        See Also:
        ResourceBundle, removeResourceBundle(java.lang.String)

      • removeResourceBundle

        public void removeResourceBundle(String bundleName)
        Removes a resource bundle from the list of resource bundles that are searched for localized defaults.
        Parameters:
        bundleName - the base name of the resource bundle to be removed
        Since:
        1.4
        See Also:
        ResourceBundle, addResourceBundle(java.lang.String)

      • setDefaultLocale

        public void setDefaultLocale(Locale l)
        Sets the default locale. The default locale is used in retrieving localized values via get methods that do not take a locale argument. As of release 1.4, Swing UI objects should retrieve localized values using the locale of their component rather than the default locale. The default locale exists to provide compatibility with pre 1.4 behaviour.
        Parameters:
        l - the new default locale
        Since:
        1.4
        See Also:
        getDefaultLocale(), get(Object), get(Object,Locale)

      • getDefaultLocale

        public Locale getDefaultLocale()
        Returns the default locale. The default locale is used in retrieving localized values via get methods that do not take a locale argument. As of release 1.4, Swing UI objects should retrieve localized values using the locale of their component rather than the default locale. The default locale exists to provide compatibility with pre 1.4 behaviour.
        Returns:
        the default locale
        Since:
        1.4
        See Also:
        setDefaultLocale(java.util.Locale), get(Object), get(Object,Locale)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIDefaults.ActiveValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Interface UIDefaults.ActiveValue

  • Enclosing class:
    UIDefaults

    public static interface UIDefaults.ActiveValue
    This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods. Here's an example of an ActiveValue that constructs a DefaultListCellRenderer:
      Object cellRendererActiveValue = new UIDefaults.ActiveValue() {
      public Object createValue(UIDefaults table) {
          return new DefaultListCellRenderer();
      }
  };

  uiDefaultsTable.put("MyRenderer", cellRendererActiveValue);
    See Also:
    UIDefaults.get(java.lang.Object)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object createValue(UIDefaults table)
      Creates the value retrieved from the UIDefaults table.

    • Method Detail

      • createValue

        Object createValue(UIDefaults table)
        Creates the value retrieved from the UIDefaults table. The object is created each time it is accessed.
        Parameters:
        table - a UIDefaults table
        Returns:
        the created Object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIDefaults.LazyInputMap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UIDefaults.LazyInputMap

  • java.lang.Object
    • javax.swing.UIDefaults.LazyInputMap
  • All Implemented Interfaces:
    UIDefaults.LazyValue
    Enclosing class:
    UIDefaults

    public static class UIDefaults.LazyInputMap
extends Object
implements UIDefaults.LazyValue
    LazyInputMap will create a InputMap in its createValue method. The bindings are passed in in the constructor. The bindings are an array with the even number entries being string KeyStrokes (eg "alt SPACE") and the odd number entries being the value to use in the InputMap (and the key in the ActionMap).
    Since:
    1.3

    • Constructor Summary

      Constructors
      Constructor and Description
      LazyInputMap(Object[] bindings)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Object createValue(UIDefaults table)
      Creates an InputMap with the bindings that are passed in.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • LazyInputMap

        public LazyInputMap(Object[] bindings)

    • Method Detail

      • createValue

        public Object createValue(UIDefaults table)
        Creates an InputMap with the bindings that are passed in.
        Specified by:
        createValue in interface UIDefaults.LazyValue
        Parameters:
        table - a UIDefaults table
        Returns:
        the InputMap
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIDefaults.LazyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Interface UIDefaults.LazyValue

  • All Known Implementing Classes:
    UIDefaults.LazyInputMap, UIDefaults.ProxyLazyValue
    Enclosing class:
    UIDefaults

    public static interface UIDefaults.LazyValue
    This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods. Lazy values are useful for defaults that are expensive to construct or are seldom retrieved. The first time a LazyValue is retrieved its "real value" is computed by calling LazyValue.createValue() and the real value is used to replace the LazyValue in the UIDefaults table. Subsequent lookups for the same key return the real value. Here's an example of a LazyValue that constructs a Border:
      Object borderLazyValue = new UIDefaults.LazyValue() {
      public Object createValue(UIDefaults table) {
          return new BorderFactory.createLoweredBevelBorder();
      }
  };

  uiDefaultsTable.put("MyBorder", borderLazyValue);
    See Also:
    UIDefaults.get(java.lang.Object)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object createValue(UIDefaults table)
      Creates the actual value retrieved from the UIDefaults table.

    • Method Detail

      • createValue

        Object createValue(UIDefaults table)
        Creates the actual value retrieved from the UIDefaults table. When an object that implements this interface is retrieved from the table, this method is used to create the real value, which is then stored in the table and returned to the calling method.
        Parameters:
        table - a UIDefaults table
        Returns:
        the created Object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIDefaults.ProxyLazyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UIDefaults.ProxyLazyValue

  • java.lang.Object
    • javax.swing.UIDefaults.ProxyLazyValue
  • All Implemented Interfaces:
    UIDefaults.LazyValue
    Enclosing class:
    UIDefaults

    public static class UIDefaults.ProxyLazyValue
extends Object
implements UIDefaults.LazyValue
    This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created. It also avoids creation of an anonymous inner class for the LazyValue subclass. Both of these improve performance at the time that a a Look and Feel is loaded, at the cost of a slight performance reduction the first time createValue is called (since Reflection APIs are used).
    Since:
    1.3

    • Constructor Summary

      Constructors
      Constructor and Description
      ProxyLazyValue(String c)
      Creates a LazyValue which will construct an instance when asked.
      ProxyLazyValue(String c, Object[] o)
      Creates a LazyValue which will construct an instance when asked.
      ProxyLazyValue(String c, String m)
      Creates a LazyValue which will construct an instance when asked.
      ProxyLazyValue(String c, String m, Object[] o)
      Creates a LazyValue which will construct an instance when asked.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Object createValue(UIDefaults table)
      Creates the value retrieved from the UIDefaults table.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ProxyLazyValue

        public ProxyLazyValue(String c)
        Creates a LazyValue which will construct an instance when asked.
        Parameters:
        c - a String specifying the classname of the instance to be created on demand

      • ProxyLazyValue

        public ProxyLazyValue(String c,
                      String m)
        Creates a LazyValue which will construct an instance when asked.
        Parameters:
        c - a String specifying the classname of the class containing a static method to be called for instance creation
        m - a String specifying the static method to be called on class c

      • ProxyLazyValue

        public ProxyLazyValue(String c,
                      Object[] o)
        Creates a LazyValue which will construct an instance when asked.
        Parameters:
        c - a String specifying the classname of the instance to be created on demand
        o - an array of Objects to be passed as paramaters to the constructor in class c

      • ProxyLazyValue

        public ProxyLazyValue(String c,
                      String m,
                      Object[] o)
        Creates a LazyValue which will construct an instance when asked.
        Parameters:
        c - a String specifying the classname of the class containing a static method to be called for instance creation.
        m - a String specifying the static method to be called on class c
        o - an array of Objects to be passed as paramaters to the static method in class c

    • Method Detail

      • createValue

        public Object createValue(UIDefaults table)
        Creates the value retrieved from the UIDefaults table. The object is created each time it is accessed.
        Specified by:
        createValue in interface UIDefaults.LazyValue
        Parameters:
        table - a UIDefaults table
        Returns:
        the created Object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UIManager

  • java.lang.Object
    • javax.swing.UIManager
  • All Implemented Interfaces:
    Serializable

    public class UIManager
extends Object
implements Serializable
    UIManager manages the current look and feel, the set of available look and feels, PropertyChangeListeners that are notified when the look and feel changes, look and feel defaults, and convenience methods for obtaining various default values.

    Specifying the look and feel

    The look and feel can be specified in two distinct ways: by specifying the fully qualified name of the class for the look and feel, or by creating an instance of LookAndFeel and passing it to setLookAndFeel. The following example illustrates setting the look and feel to the system look and feel:
       UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    The following example illustrates setting the look and feel based on class name:
       UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    Once the look and feel has been changed it is imperative to invoke updateUI on all JComponents. The method SwingUtilities.updateComponentTreeUI(java.awt.Component) makes it easy to apply updateUI to a containment hierarchy. Refer to it for details. The exact behavior of not invoking updateUI after changing the look and feel is unspecified. It is very possible to receive unexpected exceptions, painting problems, or worse.

    Default look and feel

    The class used for the default look and feel is chosen in the following manner:
    1. If the system property swing.defaultlaf is non-null, use its value as the default look and feel class name.
    2. If the Properties file swing.properties exists and contains the key swing.defaultlaf, use its value as the default look and feel class name. The location that is checked for swing.properties may vary depending upon the implementation of the Java platform. Typically the swing.properties file is located in the lib subdirectory of the Java installation directory. Refer to the release notes of the implementation being used for further details.
    3. Otherwise use the cross platform look and feel.

    Defaults

    UIManager manages three sets of UIDefaults. In order, they are:
    1. Developer defaults. With few exceptions Swing does not alter the developer defaults; these are intended to be modified and used by the developer.
    2. Look and feel defaults. The look and feel defaults are supplied by the look and feel at the time it is installed as the current look and feel (setLookAndFeel() is invoked). The look and feel defaults can be obtained using the getLookAndFeelDefaults() method.
    3. System defaults. The system defaults are provided by Swing.
    Invoking any of the various get methods results in checking each of the defaults, in order, returning the first non-null value. For example, invoking UIManager.getString("Table.foreground") results in first checking developer defaults. If the developer defaults contain a value for "Table.foreground" it is returned, otherwise the look and feel defaults are checked, followed by the system defaults.

    It's important to note that getDefaults returns a custom instance of UIDefaults with this resolution logic built into it. For example, UIManager.getDefaults().getString("Table.foreground") is equivalent to UIManager.getString("Table.foreground"). Both resolve using the algorithm just described. In many places the documentation uses the word defaults to refer to the custom instance of UIDefaults with the resolution logic as previously described.

    When the look and feel is changed, UIManager alters only the look and feel defaults; the developer and system defaults are not altered by the UIManager in any way.

    The set of defaults a particular look and feel supports is defined and documented by that look and feel. In addition, each look and feel, or ComponentUI provided by a look and feel, may access the defaults at different times in their life cycle. Some look and feels may aggressively look up defaults, so that changing a default may not have an effect after installing the look and feel. Other look and feels may lazily access defaults so that a change to the defaults may effect an existing look and feel. Finally, other look and feels might not configure themselves from the defaults table in any way. None-the-less it is usually the case that a look and feel expects certain defaults, so that in general a ComponentUI provided by one look and feel will not work with another look and feel.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  UIManager.LookAndFeelInfo
      Provides a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.

    • Constructor Summary

      Constructors
      Constructor and Description
      UIManager()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static void addAuxiliaryLookAndFeel(LookAndFeel laf)
      Adds a LookAndFeel to the list of auxiliary look and feels.
      static void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      static Object get(Object key)
      Returns an object from the defaults.
      static Object get(Object key, Locale l)
      Returns an object from the defaults that is appropriate for the given locale.
      static LookAndFeel[] getAuxiliaryLookAndFeels()
      Returns the list of auxiliary look and feels (can be null).
      static boolean getBoolean(Object key)
      Returns a boolean from the defaults which is associated with the key value.
      static boolean getBoolean(Object key, Locale l)
      Returns a boolean from the defaults which is associated with the key value and the given Locale.
      static Border getBorder(Object key)
      Returns a border from the defaults.
      static Border getBorder(Object key, Locale l)
      Returns a border from the defaults that is appropriate for the given locale.
      static Color getColor(Object key)
      Returns a color from the defaults.
      static Color getColor(Object key, Locale l)
      Returns a color from the defaults that is appropriate for the given locale.
      static String getCrossPlatformLookAndFeelClassName()
      Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF).
      static UIDefaults getDefaults()
      Returns the defaults.
      static Dimension getDimension(Object key)
      Returns a dimension from the defaults.
      static Dimension getDimension(Object key, Locale l)
      Returns a dimension from the defaults that is appropriate for the given locale.
      static Font getFont(Object key)
      Returns a font from the defaults.
      static Font getFont(Object key, Locale l)
      Returns a font from the defaults that is appropriate for the given locale.
      static Icon getIcon(Object key)
      Returns an Icon from the defaults.
      static Icon getIcon(Object key, Locale l)
      Returns an Icon from the defaults that is appropriate for the given locale.
      static Insets getInsets(Object key)
      Returns an Insets object from the defaults.
      static Insets getInsets(Object key, Locale l)
      Returns an Insets object from the defaults that is appropriate for the given locale.
      static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
      Returns an array of LookAndFeelInfos representing the LookAndFeel implementations currently available.
      static int getInt(Object key)
      Returns an integer from the defaults.
      static int getInt(Object key, Locale l)
      Returns an integer from the defaults that is appropriate for the given locale.
      static LookAndFeel getLookAndFeel()
      Returns the current look and feel or null.
      static UIDefaults getLookAndFeelDefaults()
      Returns the UIDefaults from the current look and feel, that were obtained at the time the look and feel was installed.
      static PropertyChangeListener[] getPropertyChangeListeners()
      Returns an array of all the PropertyChangeListeners added to this UIManager with addPropertyChangeListener().
      static String getString(Object key)
      Returns a string from the defaults.
      static String getString(Object key, Locale l)
      Returns a string from the defaults that is appropriate for the given locale.
      static String getSystemLookAndFeelClassName()
      Returns the name of the LookAndFeel class that implements the native system look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
      static ComponentUI getUI(JComponent target)
      Returns the appropriate ComponentUI implementation for target.
      static void installLookAndFeel(String name, String className)
      Adds the specified look and feel to the set of available look and feels.
      static void installLookAndFeel(UIManager.LookAndFeelInfo info)
      Adds the specified look and feel to the set of available look and feels.
      static Object put(Object key, Object value)
      Stores an object in the developer defaults.
      static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
      Removes a LookAndFeel from the list of auxiliary look and feels.
      static void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
      Sets the set of available look and feels.
      static void setLookAndFeel(LookAndFeel newLookAndFeel)
      Sets the current look and feel to newLookAndFeel.
      static void setLookAndFeel(String className)
      Loads the LookAndFeel specified by the given class name, using the current thread's context class loader, and passes it to setLookAndFeel(LookAndFeel).

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • UIManager

        public UIManager()

    • Method Detail

      • getInstalledLookAndFeels

        public static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
        Returns an array of LookAndFeelInfos representing the LookAndFeel implementations currently available. The LookAndFeelInfo objects can be used by an application to construct a menu of look and feel options for the user, or to determine which look and feel to set at startup time. To avoid the penalty of creating numerous LookAndFeel objects, LookAndFeelInfo maintains the class name of the LookAndFeel class, not the actual LookAndFeel instance.

        The following example illustrates setting the current look and feel from an instance of LookAndFeelInfo:

           UIManager.setLookAndFeel(info.getClassName());
        Returns:
        an array of LookAndFeelInfo objects
        See Also:
        setLookAndFeel(javax.swing.LookAndFeel)

      • setInstalledLookAndFeels

        public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
                                     throws SecurityException
        Sets the set of available look and feels. While this method does not check to ensure all of the LookAndFeelInfos are non-null, it is strongly recommended that only non-null values are supplied in the infos array.
        Parameters:
        infos - set of LookAndFeelInfo objects specifying the available look and feels
        Throws:
        NullPointerException - if infos is null
        SecurityException
        See Also:
        getInstalledLookAndFeels()

      • installLookAndFeel

        public static void installLookAndFeel(UIManager.LookAndFeelInfo info)
        Adds the specified look and feel to the set of available look and feels. While this method allows a null info, it is strongly recommended that a non-null value be used.
        Parameters:
        info - a LookAndFeelInfo object that names the look and feel and identifies the class that implements it
        See Also:
        setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[])

      • installLookAndFeel

        public static void installLookAndFeel(String name,
                                      String className)
        Adds the specified look and feel to the set of available look and feels. While this method does not check the arguments in any way, it is strongly recommended that non-null values be supplied.
        Parameters:
        name - descriptive name of the look and feel
        className - name of the class that implements the look and feel
        See Also:
        setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[])

      • getLookAndFeel

        public static LookAndFeel getLookAndFeel()
        Returns the current look and feel or null.
        Returns:
        current look and feel, or null
        See Also:
        setLookAndFeel(javax.swing.LookAndFeel)

      • setLookAndFeel

        public static void setLookAndFeel(LookAndFeel newLookAndFeel)
                           throws UnsupportedLookAndFeelException
        Sets the current look and feel to newLookAndFeel. If the current look and feel is non-null uninitialize is invoked on it. If newLookAndFeel is non-null, initialize is invoked on it followed by getDefaults. The defaults returned from newLookAndFeel.getDefaults() replace those of the defaults from the previous look and feel. If the newLookAndFeel is null, the look and feel defaults are set to null.

        A value of null can be used to set the look and feel to null. As the LookAndFeel is required for most of Swing to function, setting the LookAndFeel to null is strongly discouraged.

        This is a JavaBeans bound property.

        Parameters:
        newLookAndFeel - LookAndFeel to install
        Throws:
        UnsupportedLookAndFeelException - if newLookAndFeel is non-null and newLookAndFeel.isSupportedLookAndFeel() returns false
        See Also:
        getLookAndFeel()

      • setLookAndFeel

        public static void setLookAndFeel(String className)
                           throws ClassNotFoundException,
                                  InstantiationException,
                                  IllegalAccessException,
                                  UnsupportedLookAndFeelException
        Loads the LookAndFeel specified by the given class name, using the current thread's context class loader, and passes it to setLookAndFeel(LookAndFeel).
        Parameters:
        className - a string specifying the name of the class that implements the look and feel
        Throws:
        ClassNotFoundException - if the LookAndFeel class could not be found
        InstantiationException - if a new instance of the class couldn't be created
        IllegalAccessException - if the class or initializer isn't accessible
        UnsupportedLookAndFeelException - if lnf.isSupportedLookAndFeel() is false
        ClassCastException - if className does not identify a class that extends LookAndFeel

      • getSystemLookAndFeelClassName

        public static String getSystemLookAndFeelClassName()
        Returns the name of the LookAndFeel class that implements the native system look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class. This value can be overriden by setting the swing.systemlaf system property.
        Returns:
        the String of the LookAndFeel class
        See Also:
        setLookAndFeel(javax.swing.LookAndFeel), getCrossPlatformLookAndFeelClassName()

      • getCrossPlatformLookAndFeelClassName

        public static String getCrossPlatformLookAndFeelClassName()
        Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF). This value can be overriden by setting the swing.crossplatformlaf system property.
        Returns:
        a string with the JLF implementation-class
        See Also:
        setLookAndFeel(javax.swing.LookAndFeel), getSystemLookAndFeelClassName()

      • getDefaults

        public static UIDefaults getDefaults()
        Returns the defaults. The returned defaults resolve using the logic specified in the class documentation.
        Returns:
        a UIDefaults object containing the default values

      • getFont

        public static Font getFont(Object key)
        Returns a font from the defaults. If the value for key is not a Font, null is returned.
        Parameters:
        key - an Object specifying the font
        Returns:
        the Font object
        Throws:
        NullPointerException - if key is null

      • getFont

        public static Font getFont(Object key,
                           Locale l)
        Returns a font from the defaults that is appropriate for the given locale. If the value for key is not a Font, null is returned.
        Parameters:
        key - an Object specifying the font
        l - the Locale for which the font is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Font object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getColor

        public static Color getColor(Object key)
        Returns a color from the defaults. If the value for key is not a Color, null is returned.
        Parameters:
        key - an Object specifying the color
        Returns:
        the Color object
        Throws:
        NullPointerException - if key is null

      • getColor

        public static Color getColor(Object key,
                             Locale l)
        Returns a color from the defaults that is appropriate for the given locale. If the value for key is not a Color, null is returned.
        Parameters:
        key - an Object specifying the color
        l - the Locale for which the color is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Color object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getIcon

        public static Icon getIcon(Object key)
        Returns an Icon from the defaults. If the value for key is not an Icon, null is returned.
        Parameters:
        key - an Object specifying the icon
        Returns:
        the Icon object
        Throws:
        NullPointerException - if key is null

      • getIcon

        public static Icon getIcon(Object key,
                           Locale l)
        Returns an Icon from the defaults that is appropriate for the given locale. If the value for key is not an Icon, null is returned.
        Parameters:
        key - an Object specifying the icon
        l - the Locale for which the icon is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Icon object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getBorder

        public static Border getBorder(Object key)
        Returns a border from the defaults. If the value for key is not a Border, null is returned.
        Parameters:
        key - an Object specifying the border
        Returns:
        the Border object
        Throws:
        NullPointerException - if key is null

      • getBorder

        public static Border getBorder(Object key,
                               Locale l)
        Returns a border from the defaults that is appropriate for the given locale. If the value for key is not a Border, null is returned.
        Parameters:
        key - an Object specifying the border
        l - the Locale for which the border is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Border object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getString

        public static String getString(Object key)
        Returns a string from the defaults. If the value for key is not a String, null is returned.
        Parameters:
        key - an Object specifying the string
        Returns:
        the String
        Throws:
        NullPointerException - if key is null

      • getString

        public static String getString(Object key,
                               Locale l)
        Returns a string from the defaults that is appropriate for the given locale. If the value for key is not a String, null is returned.
        Parameters:
        key - an Object specifying the string
        l - the Locale for which the string is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the String
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getInt

        public static int getInt(Object key)
        Returns an integer from the defaults. If the value for key is not an Integer, or does not exist, 0 is returned.
        Parameters:
        key - an Object specifying the int
        Returns:
        the int
        Throws:
        NullPointerException - if key is null

      • getInt

        public static int getInt(Object key,
                         Locale l)
        Returns an integer from the defaults that is appropriate for the given locale. If the value for key is not an Integer, or does not exist, 0 is returned.
        Parameters:
        key - an Object specifying the int
        l - the Locale for which the int is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the int
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getBoolean

        public static boolean getBoolean(Object key)
        Returns a boolean from the defaults which is associated with the key value. If the key is not found or the key doesn't represent a boolean value then false is returned.
        Parameters:
        key - an Object specifying the key for the desired boolean value
        Returns:
        the boolean value corresponding to the key
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getBoolean

        public static boolean getBoolean(Object key,
                                 Locale l)
        Returns a boolean from the defaults which is associated with the key value and the given Locale. If the key is not found or the key doesn't represent a boolean value then false will be returned.
        Parameters:
        key - an Object specifying the key for the desired boolean value
        l - the Locale for which the boolean is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the boolean value corresponding to the key
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getInsets

        public static Insets getInsets(Object key)
        Returns an Insets object from the defaults. If the value for key is not an Insets, null is returned.
        Parameters:
        key - an Object specifying the Insets object
        Returns:
        the Insets object
        Throws:
        NullPointerException - if key is null

      • getInsets

        public static Insets getInsets(Object key,
                               Locale l)
        Returns an Insets object from the defaults that is appropriate for the given locale. If the value for key is not an Insets, null is returned.
        Parameters:
        key - an Object specifying the Insets object
        l - the Locale for which the object is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Insets object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • getDimension

        public static Dimension getDimension(Object key)
        Returns a dimension from the defaults. If the value for key is not a Dimension, null is returned.
        Parameters:
        key - an Object specifying the dimension object
        Returns:
        the Dimension object
        Throws:
        NullPointerException - if key is null

      • getDimension

        public static Dimension getDimension(Object key,
                                     Locale l)
        Returns a dimension from the defaults that is appropriate for the given locale. If the value for key is not a Dimension, null is returned.
        Parameters:
        key - an Object specifying the dimension object
        l - the Locale for which the object is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Dimension object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • get

        public static Object get(Object key)
        Returns an object from the defaults.
        Parameters:
        key - an Object specifying the desired object
        Returns:
        the Object
        Throws:
        NullPointerException - if key is null

      • get

        public static Object get(Object key,
                         Locale l)
        Returns an object from the defaults that is appropriate for the given locale.
        Parameters:
        key - an Object specifying the desired object
        l - the Locale for which the object is desired; refer to UIDefaults for details on how a null Locale is handled
        Returns:
        the Object
        Throws:
        NullPointerException - if key is null
        Since:
        1.4

      • put

        public static Object put(Object key,
                         Object value)
        Stores an object in the developer defaults. This is a cover method for getDefaults().put(key, value). This only effects the developer defaults, not the system or look and feel defaults.
        Parameters:
        key - an Object specifying the retrieval key
        value - the Object to store; refer to UIDefaults for details on how null is handled
        Returns:
        the Object returned by UIDefaults.put(java.lang.Object, java.lang.Object)
        Throws:
        NullPointerException - if key is null
        See Also:
        UIDefaults.put(java.lang.Object, java.lang.Object)

      • getUI

        public static ComponentUI getUI(JComponent target)
        Returns the appropriate ComponentUI implementation for target. Typically, this is a cover for getDefaults().getUI(target). However, if an auxiliary look and feel has been installed, this first invokes getUI(target) on the multiplexing look and feel's defaults, and returns that value if it is non-null.
        Parameters:
        target - the JComponent to return the ComponentUI for
        Returns:
        the ComponentUI object for target
        Throws:
        NullPointerException - if target is null
        See Also:
        UIDefaults.getUI(javax.swing.JComponent)

      • getLookAndFeelDefaults

        public static UIDefaults getLookAndFeelDefaults()
        Returns the UIDefaults from the current look and feel, that were obtained at the time the look and feel was installed.

        In general, developers should use the UIDefaults returned from getDefaults(). As the current look and feel may expect certain values to exist, altering the UIDefaults returned from this method could have unexpected results.

        Returns:
        UIDefaults from the current look and feel
        See Also:
        getDefaults(), setLookAndFeel(LookAndFeel), LookAndFeel.getDefaults()

      • addAuxiliaryLookAndFeel

        public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
        Adds a LookAndFeel to the list of auxiliary look and feels. The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI. The change will only take effect when a new UI class is created or when the default look and feel is changed on a component instance.

        Note these are not the same as the installed look and feels.

        Parameters:
        laf - the LookAndFeel object
        See Also:
        removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
setLookAndFeel(javax.swing.LookAndFeel),
getAuxiliaryLookAndFeels(),
getInstalledLookAndFeels()

      • removeAuxiliaryLookAndFeel

        public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
        Removes a LookAndFeel from the list of auxiliary look and feels. The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI. The change will only take effect when a new UI class is created or when the default look and feel is changed on a component instance.

        Note these are not the same as the installed look and feels.

        Returns:
        true if the LookAndFeel was removed from the list
        See Also:
        removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
getAuxiliaryLookAndFeels(),
setLookAndFeel(javax.swing.LookAndFeel),
getInstalledLookAndFeels()

      • getAuxiliaryLookAndFeels

        public static LookAndFeel[] getAuxiliaryLookAndFeels()
        Returns the list of auxiliary look and feels (can be null). The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI.

        Note these are not the same as the installed look and feels.

        Returns:
        list of auxiliary LookAndFeels or null
        See Also:
        addAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
setLookAndFeel(javax.swing.LookAndFeel),
getInstalledLookAndFeels()

      • addPropertyChangeListener

        public static void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.
        Parameters:
        listener - the PropertyChangeListener to be added
        See Also:
        PropertyChangeSupport

      • removePropertyChangeListener

        public static void removePropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
        Parameters:
        listener - the PropertyChangeListener to be removed
        See Also:
        PropertyChangeSupport

      • getPropertyChangeListeners

        public static PropertyChangeListener[] getPropertyChangeListeners()
        Returns an array of all the PropertyChangeListeners added to this UIManager with addPropertyChangeListener().
        Returns:
        all of the PropertyChangeListeners added or an empty array if no listeners have been added
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIManager.LookAndFeelInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UIManager.LookAndFeelInfo

  • java.lang.Object
    • javax.swing.UIManager.LookAndFeelInfo
  • Enclosing class:
    UIManager

    public static class UIManager.LookAndFeelInfo
extends Object
    Provides a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
    See Also:
    UIManager.getInstalledLookAndFeels(), LookAndFeel

    • Constructor Summary

      Constructors
      Constructor and Description
      LookAndFeelInfo(String name, String className)
      Constructs a UIManagers LookAndFeelInfo object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getClassName()
      Returns the name of the class that implements this look and feel.
      String getName()
      Returns the name of the look and feel in a form suitable for a menu or other presentation
      String toString()
      Returns a string that displays and identifies this object's properties.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • LookAndFeelInfo

        public LookAndFeelInfo(String name,
                       String className)
        Constructs a UIManagers LookAndFeelInfo object.
        Parameters:
        name - a String specifying the name of the look and feel
        className - a String specifying the name of the class that implements the look and feel

    • Method Detail

      • getName

        public String getName()
        Returns the name of the look and feel in a form suitable for a menu or other presentation
        Returns:
        a String containing the name
        See Also:
        LookAndFeel.getName()

      • getClassName

        public String getClassName()
        Returns the name of the class that implements this look and feel.
        Returns:
        the name of the class that implements this LookAndFeel
        See Also:
        LookAndFeel

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


undo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.swing.undo

Allows developers to provide support for undo/redo in applications such as text editors.

See: Description

  • Interface Summary
    Interface Description
    StateEditable
    StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
    UndoableEdit
    An UndoableEdit represents an edit.
  • Class Summary
    Class Description
    AbstractUndoableEdit
    An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
    CompoundEdit
    A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
    StateEdit
    StateEdit is a general edit for objects that change state.
    UndoableEditSupport
    A support class used for managing UndoableEdit listeners.
    UndoManager
    UndoManager manages a list of UndoableEdits, providing a way to undo or redo the appropriate edits.
  • Exception Summary
    Exception Description
    CannotRedoException
    Thrown when an UndoableEdit is told to redo() and can't.
    CannotUndoException
    Thrown when an UndoableEdit is told to undo() and can't.

Package javax.swing.undo Description

Allows developers to provide support for undo/redo in applications such as text editors.

Note: Most of the Swing API is not thread safe. For details, see Threads and Swing, a section in The Java Tutorial.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Implementing Undo and Redo, a section in The Java Tutorial
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.swing.undo Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.swing.undo

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.swing.undo.AbstractUndoableEdit (implements java.io.Serializable, javax.swing.undo.UndoableEdit)
      • javax.swing.undo.CompoundEdit
        • javax.swing.undo.UndoManager (implements javax.swing.event.UndoableEditListener)
      • javax.swing.undo.StateEdit
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.swing.undo.CannotRedoException
          • javax.swing.undo.CannotUndoException
    • javax.swing.undo.UndoableEditSupport

Interface Hierarchy

  • javax.swing.undo.StateEditable
  • javax.swing.undo.UndoableEdit
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.swing.undo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.swing.undo

  • Packages that use javax.swing.undo
    Package Description
    javax.swing.event
    Provides for events fired by Swing components.
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.
  • Classes in javax.swing.undo used by javax.swing.event
    Class and Description
    UndoableEdit
    An UndoableEdit represents an edit.
  • Classes in javax.swing.undo used by javax.swing.text
    Class and Description
    AbstractUndoableEdit
    An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
    CannotRedoException
    Thrown when an UndoableEdit is told to redo() and can't.
    CannotUndoException
    Thrown when an UndoableEdit is told to undo() and can't.
    CompoundEdit
    A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
    UndoableEdit
    An UndoableEdit represents an edit.
  • Classes in javax.swing.undo used by javax.swing.undo
    Class and Description
    AbstractUndoableEdit
    An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
    CannotRedoException
    Thrown when an UndoableEdit is told to redo() and can't.
    CannotUndoException
    Thrown when an UndoableEdit is told to undo() and can't.
    CompoundEdit
    A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
    StateEditable
    StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
    UndoableEdit
    An UndoableEdit represents an edit.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractUndoableEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class AbstractUndoableEdit

  • java.lang.Object
    • javax.swing.undo.AbstractUndoableEdit
  • All Implemented Interfaces:
    Serializable, UndoableEdit
    Direct Known Subclasses:
    AbstractDocument.ElementEdit, CompoundEdit, DefaultStyledDocument.AttributeUndoableEdit, StateEdit

    public class AbstractUndoableEdit
extends Object
implements UndoableEdit, Serializable
    An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected static String RedoName
      String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
      protected static String UndoName
      String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.

    • Constructor Summary

      Constructors
      Constructor and Description
      AbstractUndoableEdit()
      Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean addEdit(UndoableEdit anEdit)
      This default implementation returns false.
      boolean canRedo()
      Returns true if this edit is alive and hasBeenDone is false.
      boolean canUndo()
      Returns true if this edit is alive and hasBeenDone is true.
      void die()
      Sets alive to false.
      String getPresentationName()
      This default implementation returns "".
      String getRedoPresentationName()
      Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName.
      String getUndoPresentationName()
      Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName.
      boolean isSignificant()
      This default implementation returns true.
      void redo()
      Throws CannotRedoException if canRedo returns false.
      boolean replaceEdit(UndoableEdit anEdit)
      This default implementation returns false.
      String toString()
      Returns a string that displays and identifies this object's properties.
      void undo()
      Throws CannotUndoException if canUndo returns false.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • UndoName

        protected static final String UndoName
        String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.undoText.
        See Also:
        UIDefaults, Constant Field Values

      • RedoName

        protected static final String RedoName
        String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.redoText.
        See Also:
        UIDefaults, Constant Field Values

    • Constructor Detail

      • AbstractUndoableEdit

        public AbstractUndoableEdit()
        Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.

    • Method Detail

      • die

        public void die()
        Sets alive to false. Note that this is a one way operation; dead edits cannot be resurrected. Sending undo or redo to a dead edit results in an exception being thrown.

        Typically an edit is killed when it is consolidated by another edit's addEdit or replaceEdit method, or when it is dequeued from an UndoManager.

        Specified by:
        die in interface UndoableEdit
        See Also:
        CompoundEdit.die()

      • undo

        public void undo()
          throws CannotUndoException
        Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.
        Specified by:
        undo in interface UndoableEdit
        Throws:
        CannotUndoException - if canUndo returns false
        See Also:
        canUndo()

      • canUndo

        public boolean canUndo()
        Returns true if this edit is alive and hasBeenDone is true.
        Specified by:
        canUndo in interface UndoableEdit
        Returns:
        true if this edit is alive and hasBeenDone is true
        See Also:
        die(),
undo(),
redo()

      • redo

        public void redo()
          throws CannotRedoException
        Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.
        Specified by:
        redo in interface UndoableEdit
        Throws:
        CannotRedoException - if canRedo returns false
        See Also:
        canRedo()

      • canRedo

        public boolean canRedo()
        Returns true if this edit is alive and hasBeenDone is false.
        Specified by:
        canRedo in interface UndoableEdit
        Returns:
        true if this edit is alive and hasBeenDone is false
        See Also:
        die(),
undo(),
redo()

      • addEdit

        public boolean addEdit(UndoableEdit anEdit)
        This default implementation returns false.
        Specified by:
        addEdit in interface UndoableEdit
        Parameters:
        anEdit - the edit to be added
        Returns:
        false
        See Also:
        UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)

      • replaceEdit

        public boolean replaceEdit(UndoableEdit anEdit)
        This default implementation returns false.
        Specified by:
        replaceEdit in interface UndoableEdit
        Parameters:
        anEdit - the edit to replace
        Returns:
        false
        See Also:
        UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)

      • isSignificant

        public boolean isSignificant()
        This default implementation returns true.
        Specified by:
        isSignificant in interface UndoableEdit
        Returns:
        true
        See Also:
        UndoableEdit.isSignificant()

      • getPresentationName

        public String getPresentationName()
        This default implementation returns "". Used by getUndoPresentationName and getRedoPresentationName to construct the strings they return. Subclasses should override to return an appropriate description of the operation this edit represents.
        Specified by:
        getPresentationName in interface UndoableEdit
        Returns:
        the empty string ""
        See Also:
        getUndoPresentationName(), getRedoPresentationName()

      • getUndoPresentationName

        public String getUndoPresentationName()
        Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone.
        Specified by:
        getUndoPresentationName in interface UndoableEdit
        Returns:
        the value from the defaults table with key AbstractUndoableEdit.undoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.
        See Also:
        getPresentationName()

      • getRedoPresentationName

        public String getRedoPresentationName()
        Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone.
        Specified by:
        getRedoPresentationName in interface UndoableEdit
        Returns:
        the value from the defaults table with key AbstractUndoableEdit.redoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.
        See Also:
        getPresentationName()

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CannotRedoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class CannotRedoException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.swing.undo.CannotRedoException
  • All Implemented Interfaces:
    Serializable

    public class CannotRedoException
extends RuntimeException
    Thrown when an UndoableEdit is told to redo() and can't.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Constructor and Description
      CannotRedoException()

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • CannotRedoException

        public CannotRedoException()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CannotUndoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class CannotUndoException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.swing.undo.CannotUndoException
  • All Implemented Interfaces:
    Serializable

    public class CannotUndoException
extends RuntimeException
    Thrown when an UndoableEdit is told to undo() and can't.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Constructor and Description
      CannotUndoException()

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • CannotUndoException

        public CannotUndoException()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.AbstractUndoableEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.AbstractUndoableEdit

  • Packages that use AbstractUndoableEdit
    Package Description
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of AbstractUndoableEdit in javax.swing.text

      Subclasses of AbstractUndoableEdit in javax.swing.text
      Modifier and Type Class and Description
      class  AbstractDocument.DefaultDocumentEvent
      Stores document changes as the document is being modified.
      static class  AbstractDocument.ElementEdit
      An implementation of ElementChange that can be added to the document event.
      static class  DefaultStyledDocument.AttributeUndoableEdit
      An UndoableEdit used to remember AttributeSet changes to an Element.

    • Uses of AbstractUndoableEdit in javax.swing.undo

      Subclasses of AbstractUndoableEdit in javax.swing.undo
      Modifier and Type Class and Description
      class  CompoundEdit
      A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
      class  StateEdit
      StateEdit is a general edit for objects that change state.
      class  UndoManager
      UndoManager manages a list of UndoableEdits, providing a way to undo or redo the appropriate edits.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.CannotRedoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.CannotRedoException

  • Packages that use CannotRedoException
    Package Description
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of CannotRedoException in javax.swing.text

      Methods in javax.swing.text that throw CannotRedoException
      Modifier and Type Method and Description
      void AbstractDocument.DefaultDocumentEvent.redo()
      Redoes a change.
      void AbstractDocument.ElementEdit.redo()
      Redoes a change.
      void DefaultStyledDocument.AttributeUndoableEdit.redo()
      Redoes a change.

    • Uses of CannotRedoException in javax.swing.undo

      Methods in javax.swing.undo that throw CannotRedoException
      Modifier and Type Method and Description
      void UndoManager.redo()
      Redoes the appropriate edits.
      void UndoableEdit.redo()
      Re-applies the edit.
      void CompoundEdit.redo()
      Sends redo to all contained UndoableEdits in the order in which they were added.
      void AbstractUndoableEdit.redo()
      Throws CannotRedoException if canRedo returns false.
      protected void UndoManager.redoTo(UndoableEdit edit)
      Redoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
      void UndoManager.undoOrRedo()
      Convenience method that invokes one of undo or redo.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.CannotUndoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.CannotUndoException

  • Packages that use CannotUndoException
    Package Description
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of CannotUndoException in javax.swing.text

      Methods in javax.swing.text that throw CannotUndoException
      Modifier and Type Method and Description
      void AbstractDocument.DefaultDocumentEvent.undo()
      Undoes a change.
      void AbstractDocument.ElementEdit.undo()
      Undoes a change.
      void DefaultStyledDocument.AttributeUndoableEdit.undo()
      Undoes a change.

    • Uses of CannotUndoException in javax.swing.undo

      Methods in javax.swing.undo that throw CannotUndoException
      Modifier and Type Method and Description
      void UndoManager.undo()
      Undoes the appropriate edits.
      void UndoableEdit.undo()
      Undo the edit.
      void CompoundEdit.undo()
      Sends undo to all contained UndoableEdits in the reverse of the order in which they were added.
      void AbstractUndoableEdit.undo()
      Throws CannotUndoException if canUndo returns false.
      void UndoManager.undoOrRedo()
      Convenience method that invokes one of undo or redo.
      protected void UndoManager.undoTo(UndoableEdit edit)
      Undoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.CompoundEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.CompoundEdit

  • Packages that use CompoundEdit
    Package Description
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of CompoundEdit in javax.swing.text

      Subclasses of CompoundEdit in javax.swing.text
      Modifier and Type Class and Description
      class  AbstractDocument.DefaultDocumentEvent
      Stores document changes as the document is being modified.

    • Uses of CompoundEdit in javax.swing.undo

      Subclasses of CompoundEdit in javax.swing.undo
      Modifier and Type Class and Description
      class  UndoManager
      UndoManager manages a list of UndoableEdits, providing a way to undo or redo the appropriate edits.
      Fields in javax.swing.undo declared as CompoundEdit
      Modifier and Type | Field and Description
      protected CompoundEdit | UndoableEditSupport.compoundEdit
      Methods in javax.swing.undo that return CompoundEdit
      Modifier and Type Method and Description
      protected CompoundEdit UndoableEditSupport.createCompoundEdit()
      Called only from beginUpdate.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.StateEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.StateEdit

No usage of javax.swing.undo.StateEdit
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.UndoableEditSupport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.UndoableEditSupport

No usage of javax.swing.undo.UndoableEditSupport
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.swing.undo.UndoManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.swing.undo.UndoManager

No usage of javax.swing.undo.UndoManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.undo.StateEditable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.undo.StateEditable

  • Packages that use StateEditable
    Package Description
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of StateEditable in javax.swing.undo

      Fields in javax.swing.undo declared as StateEditable
      Modifier and Type Field and Description
      protected StateEditable StateEdit.object
      The object being edited
      Methods in javax.swing.undo with parameters of type StateEditable
      Modifier and Type | Method and Description
      protected void | StateEdit.init(StateEditable anObject, String name)
      Constructors in javax.swing.undo with parameters of type StateEditable
      Constructor and Description
      StateEdit(StateEditable anObject)
      Create and return a new StateEdit.
      StateEdit(StateEditable anObject, String name)
      Create and return a new StateEdit with a presentation name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.swing.undo.UndoableEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.swing.undo.UndoableEdit

  • Packages that use UndoableEdit
    Package Description
    javax.swing.event
    Provides for events fired by Swing components.
    javax.swing.text
    Provides classes and interfaces that deal with editable and noneditable text components.
    javax.swing.undo
    Allows developers to provide support for undo/redo in applications such as text editors.

    • Uses of UndoableEdit in javax.swing.event

      Methods in javax.swing.event that return UndoableEdit
      Modifier and Type Method and Description
      UndoableEdit UndoableEditEvent.getEdit()
      Returns the edit value.
      Constructors in javax.swing.event with parameters of type UndoableEdit
      Constructor and Description
      UndoableEditEvent(Object source, UndoableEdit edit)
      Constructs an UndoableEditEvent object.

    • Uses of UndoableEdit in javax.swing.text

      Classes in javax.swing.text that implement UndoableEdit
      Modifier and Type Class and Description
      class  AbstractDocument.DefaultDocumentEvent
      Stores document changes as the document is being modified.
      static class  AbstractDocument.ElementEdit
      An implementation of ElementChange that can be added to the document event.
      static class  DefaultStyledDocument.AttributeUndoableEdit
      An UndoableEdit used to remember AttributeSet changes to an Element.
      Methods in javax.swing.text that return UndoableEdit
      Modifier and Type Method and Description
      UndoableEdit StringContent.insertString(int where, String str)
      Inserts a string into the content.
      UndoableEdit AbstractDocument.Content.insertString(int where, String str)
      Inserts a string of characters into the sequence.
      UndoableEdit GapContent.insertString(int where, String str)
      Inserts a string into the content.
      UndoableEdit StringContent.remove(int where, int nitems)
      Removes part of the content.
      UndoableEdit AbstractDocument.Content.remove(int where, int nitems)
      Removes some portion of the sequence.
      UndoableEdit GapContent.remove(int where, int nitems)
      Removes part of the content.
      Methods in javax.swing.text with parameters of type UndoableEdit
      Modifier and Type Method and Description
      boolean AbstractDocument.DefaultDocumentEvent.addEdit(UndoableEdit anEdit)
      Adds a document edit.

    • Uses of UndoableEdit in javax.swing.undo

      Classes in javax.swing.undo that implement UndoableEdit
      Modifier and Type Class and Description
      class  AbstractUndoableEdit
      An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
      class  CompoundEdit
      A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
      class  StateEdit
      StateEdit is a general edit for objects that change state.
      class  UndoManager
      UndoManager manages a list of UndoableEdits, providing a way to undo or redo the appropriate edits.
      Fields in javax.swing.undo with type parameters of type UndoableEdit
      Modifier and Type Field and Description
      protected Vector<UndoableEdit> CompoundEdit.edits
      The collection of UndoableEdits undone/redone en masse by this CompoundEdit.
      Methods in javax.swing.undo that return UndoableEdit
      Modifier and Type Method and Description
      protected UndoableEdit UndoManager.editToBeRedone()
      Returns the the next significant edit to be redone if redo is invoked.
      protected UndoableEdit UndoManager.editToBeUndone()
      Returns the the next significant edit to be undone if undo is invoked.
      protected UndoableEdit CompoundEdit.lastEdit()
      Returns the last UndoableEdit in edits, or null if edits is empty.
      Methods in javax.swing.undo with parameters of type UndoableEdit
      Modifier and Type Method and Description
      protected void UndoableEditSupport._postEdit(UndoableEdit e)
      Called only from postEdit and endUpdate.
      boolean UndoManager.addEdit(UndoableEdit anEdit)
      Adds an UndoableEdit to this UndoManager, if it's possible.
      boolean UndoableEdit.addEdit(UndoableEdit anEdit)
      Adds an UndoableEdit to this UndoableEdit.
      boolean CompoundEdit.addEdit(UndoableEdit anEdit)
      If this edit is inProgress, accepts anEdit and returns true.
      boolean AbstractUndoableEdit.addEdit(UndoableEdit anEdit)
      This default implementation returns false.
      void UndoableEditSupport.postEdit(UndoableEdit e)
      DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
      protected void UndoManager.redoTo(UndoableEdit edit)
      Redoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
      boolean UndoableEdit.replaceEdit(UndoableEdit anEdit)
      Returns true if this UndoableEdit should replace anEdit.
      boolean AbstractUndoableEdit.replaceEdit(UndoableEdit anEdit)
      This default implementation returns false.
      protected void UndoManager.undoTo(UndoableEdit edit)
      Undoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CompoundEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class CompoundEdit

  • java.lang.Object
    • javax.swing.undo.AbstractUndoableEdit
      • javax.swing.undo.CompoundEdit
  • All Implemented Interfaces:
    Serializable, UndoableEdit
    Direct Known Subclasses:
    AbstractDocument.DefaultDocumentEvent, UndoManager

    public class CompoundEdit
extends AbstractUndoableEdit
    A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected Vector<UndoableEdit> edits
      The collection of UndoableEdits undone/redone en masse by this CompoundEdit.

      • Fields inherited from class javax.swing.undo.AbstractUndoableEdit

        RedoName, UndoName

    • Constructor Summary

      Constructors
      Constructor and Description
      CompoundEdit()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean addEdit(UndoableEdit anEdit)
      If this edit is inProgress, accepts anEdit and returns true.
      boolean canRedo()
      Returns false if isInProgress or if super returns false.
      boolean canUndo()
      Returns false if isInProgress or if super returns false.
      void die()
      Sends die to each subedit, in the reverse of the order that they were added.
      void end()
      Sets inProgress to false.
      String getPresentationName()
      Returns getPresentationName from the last UndoableEdit added to edits.
      String getRedoPresentationName()
      Returns getRedoPresentationName from the last UndoableEdit added to edits.
      String getUndoPresentationName()
      Returns getUndoPresentationName from the last UndoableEdit added to edits.
      boolean isInProgress()
      Returns true if this edit is in progress--that is, it has not received end.
      boolean isSignificant()
      Returns true if any of the UndoableEdits in edits do.
      protected UndoableEdit lastEdit()
      Returns the last UndoableEdit in edits, or null if edits is empty.
      void redo()
      Sends redo to all contained UndoableEdits in the order in which they were added.
      String toString()
      Returns a string that displays and identifies this object's properties.
      void undo()
      Sends undo to all contained UndoableEdits in the reverse of the order in which they were added.

      • Methods inherited from class javax.swing.undo.AbstractUndoableEdit

        replaceEdit

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • edits

        protected Vector<UndoableEdit> edits
        The collection of UndoableEdits undone/redone en masse by this CompoundEdit.

    • Constructor Detail

      • CompoundEdit

        public CompoundEdit()

    • Method Detail

      • undo

        public void undo()
          throws CannotUndoException
        Sends undo to all contained UndoableEdits in the reverse of the order in which they were added.
        Specified by:
        undo in interface UndoableEdit
        Overrides:
        undo in class AbstractUndoableEdit
        Throws:
        CannotUndoException - if canUndo returns false
        See Also:
        AbstractUndoableEdit.canUndo()

      • redo

        public void redo()
          throws CannotRedoException
        Sends redo to all contained UndoableEdits in the order in which they were added.
        Specified by:
        redo in interface UndoableEdit
        Overrides:
        redo in class AbstractUndoableEdit
        Throws:
        CannotRedoException - if canRedo returns false
        See Also:
        AbstractUndoableEdit.canRedo()

      • lastEdit

        protected UndoableEdit lastEdit()
        Returns the last UndoableEdit in edits, or null if edits is empty.

      • die

        public void die()
        Sends die to each subedit, in the reverse of the order that they were added.
        Specified by:
        die in interface UndoableEdit
        Overrides:
        die in class AbstractUndoableEdit
        See Also:
        die()

      • addEdit

        public boolean addEdit(UndoableEdit anEdit)
        If this edit is inProgress, accepts anEdit and returns true.

        The last edit added to this CompoundEdit is given a chance to addEdit(anEdit). If it refuses (returns false), anEdit is given a chance to replaceEdit the last edit. If anEdit returns false here, it is added to edits.

        Specified by:
        addEdit in interface UndoableEdit
        Overrides:
        addEdit in class AbstractUndoableEdit
        Parameters:
        anEdit - the edit to be added
        Returns:
        true if the edit is inProgress; otherwise returns false
        See Also:
        UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)

      • end

        public void end()
        Sets inProgress to false.
        See Also:
        canUndo(), canRedo()

      • canUndo

        public boolean canUndo()
        Returns false if isInProgress or if super returns false.
        Specified by:
        canUndo in interface UndoableEdit
        Overrides:
        canUndo in class AbstractUndoableEdit
        Returns:
        true if this edit is alive and hasBeenDone is true
        See Also:
        isInProgress()

      • canRedo

        public boolean canRedo()
        Returns false if isInProgress or if super returns false.
        Specified by:
        canRedo in interface UndoableEdit
        Overrides:
        canRedo in class AbstractUndoableEdit
        Returns:
        true if this edit is alive and hasBeenDone is false
        See Also:
        isInProgress()

      • isInProgress

        public boolean isInProgress()
        Returns true if this edit is in progress--that is, it has not received end. This generally means that edits are still being added to it.
        See Also:
        end()

      • isSignificant

        public boolean isSignificant()
        Returns true if any of the UndoableEdits in edits do. Returns false if they all return false.
        Specified by:
        isSignificant in interface UndoableEdit
        Overrides:
        isSignificant in class AbstractUndoableEdit
        Returns:
        true
        See Also:
        UndoableEdit.isSignificant()

      • getPresentationName

        public String getPresentationName()
        Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
        Specified by:
        getPresentationName in interface UndoableEdit
        Overrides:
        getPresentationName in class AbstractUndoableEdit
        Returns:
        the empty string ""
        See Also:
        AbstractUndoableEdit.getUndoPresentationName(), AbstractUndoableEdit.getRedoPresentationName()

      • getUndoPresentationName

        public String getUndoPresentationName()
        Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
        Specified by:
        getUndoPresentationName in interface UndoableEdit
        Overrides:
        getUndoPresentationName in class AbstractUndoableEdit
        Returns:
        the value from the defaults table with key AbstractUndoableEdit.undoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.
        See Also:
        AbstractUndoableEdit.getPresentationName()

      • getRedoPresentationName

        public String getRedoPresentationName()
        Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
        Specified by:
        getRedoPresentationName in interface UndoableEdit
        Overrides:
        getRedoPresentationName in class AbstractUndoableEdit
        Returns:
        the value from the defaults table with key AbstractUndoableEdit.redoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.
        See Also:
        AbstractUndoableEdit.getPresentationName()

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class AbstractUndoableEdit
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StateEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class StateEdit

  • java.lang.Object
    • javax.swing.undo.AbstractUndoableEdit
      • javax.swing.undo.StateEdit
  • All Implemented Interfaces:
    Serializable, UndoableEdit

    public class StateEdit
extends AbstractUndoableEdit

    StateEdit is a general edit for objects that change state. Objects being edited must conform to the StateEditable interface.

    This edit class works by asking an object to store it's state in Hashtables before and after editing occurs. Upon undo or redo the object is told to restore it's state from these Hashtables.

    A state edit is used as follows:
          // Create the edit during the "before" state of the object
      StateEdit newEdit = new StateEdit(myObject);
      // Modify the object
      myObject.someStateModifyingMethod();
      // "end" the edit when you are done modifying the object
      newEdit.end();

    Note that when a StateEdit ends, it removes redundant state from the Hashtables - A state Hashtable is not guaranteed to contain all keys/values placed into it when the state is stored!

    See Also:
    StateEditable

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected StateEditable object
      The object being edited
      protected Hashtable<Object,Object> postState
      The state information after the edit
      protected Hashtable<Object,Object> preState
      The state information prior to the edit
      protected static String | RCSID
      protected String undoRedoName
      The undo/redo presentation name

      • Fields inherited from class javax.swing.undo.AbstractUndoableEdit

        RedoName, UndoName

    • Constructor Summary

      Constructors
      Constructor and Description
      StateEdit(StateEditable anObject)
      Create and return a new StateEdit.
      StateEdit(StateEditable anObject, String name)
      Create and return a new StateEdit with a presentation name.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      void end()
      Gets the post-edit state of the StateEditable object and ends the edit.
      String getPresentationName()
      Gets the presentation name for this edit
      protected void | init(StateEditable anObject, String name)
      void redo()
      Tells the edited object to apply the state after the edit
      protected void removeRedundantState()
      Remove redundant key/values in state hashtables.
      void undo()
      Tells the edited object to apply the state prior to the edit

      • Methods inherited from class javax.swing.undo.AbstractUndoableEdit

        addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • RCSID

        protected static final String RCSID
        See Also:
        Constant Field Values

      • object

        protected StateEditable object
        The object being edited

      • preState

        protected Hashtable<Object,Object> preState
        The state information prior to the edit

      • postState

        protected Hashtable<Object,Object> postState
        The state information after the edit

      • undoRedoName

        protected String undoRedoName
        The undo/redo presentation name

    • Constructor Detail

      • StateEdit

        public StateEdit(StateEditable anObject)
        Create and return a new StateEdit.
        Parameters:
        anObject - The object to watch for changing state
        See Also:
        StateEdit

      • StateEdit

        public StateEdit(StateEditable anObject,
                 String name)
        Create and return a new StateEdit with a presentation name.
        Parameters:
        anObject - The object to watch for changing state
        name - The presentation name to be used for this edit
        See Also:
        StateEdit

    • Method Detail

      • init

        protected void init(StateEditable anObject,
                    String name)

      • end

        public void end()
        Gets the post-edit state of the StateEditable object and ends the edit.

      • undo

        public void undo()
        Tells the edited object to apply the state prior to the edit
        Specified by:
        undo in interface UndoableEdit
        Overrides:
        undo in class AbstractUndoableEdit
        See Also:
        AbstractUndoableEdit.canUndo()

      • redo

        public void redo()
        Tells the edited object to apply the state after the edit
        Specified by:
        redo in interface UndoableEdit
        Overrides:
        redo in class AbstractUndoableEdit
        See Also:
        AbstractUndoableEdit.canRedo()

      • getPresentationName

        public String getPresentationName()
        Gets the presentation name for this edit
        Specified by:
        getPresentationName in interface UndoableEdit
        Overrides:
        getPresentationName in class AbstractUndoableEdit
        Returns:
        the empty string ""
        See Also:
        AbstractUndoableEdit.getUndoPresentationName(), AbstractUndoableEdit.getRedoPresentationName()

      • removeRedundantState

        protected void removeRedundantState()
        Remove redundant key/values in state hashtables.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StateEditable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Interface StateEditable

  • public interface StateEditable
    StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
    See Also:
    StateEdit

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String RCSID
      Resource ID for this class.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void restoreState(Hashtable<?,?> state)
      Upon receiving this message the receiver should extract any relevant state out of state.
      void storeState(Hashtable<Object,Object> state)
      Upon receiving this message the receiver should place any relevant state into state.

    • Field Detail

      • RCSID

        static final String RCSID
        Resource ID for this class.
        See Also:
        Constant Field Values

    • Method Detail

      • storeState

        void storeState(Hashtable<Object,Object> state)
        Upon receiving this message the receiver should place any relevant state into state.

      • restoreState

        void restoreState(Hashtable<?,?> state)
        Upon receiving this message the receiver should extract any relevant state out of state.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UndoableEdit

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Interface UndoableEdit

  • All Known Implementing Classes:
    AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractUndoableEdit, CompoundEdit, DefaultStyledDocument.AttributeUndoableEdit, StateEdit, UndoManager

    public interface UndoableEdit
    An UndoableEdit represents an edit. The edit may be undone, or if already undone the edit may be redone.

    UndoableEdit is designed to be used with the UndoManager. As UndoableEdits are generated by an UndoableEditListener they are typically added to the UndoManager. When an UndoableEdit is added to an UndoManager the following occurs (assuming end has not been called on the UndoManager):

    1. If the UndoManager contains edits it will call addEdit on the current edit passing in the new edit as the argument. If addEdit returns true the new edit is assumed to have been incorporated into the current edit and the new edit will not be added to the list of current edits. Edits can use addEdit as a way for smaller edits to be incorporated into a larger edit and treated as a single edit.
    2. If addEdit returns false replaceEdit is called on the new edit with the current edit passed in as the argument. This is the inverse of addEdit — if the new edit returns true from replaceEdit, the new edit replaces the current edit.
    The UndoManager makes use of isSignificant to determine how many edits should be undone or redone. The UndoManager will undo or redo all insignificant edits (isSignificant returns false) between the current edit and the last or next significant edit. addEdit and replaceEdit can be used to treat multiple edits as a single edit, returning false from isSignificant allows for treating can be used to have many smaller edits undone or redone at once. Similar functionality can also be done using the addEdit method.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean addEdit(UndoableEdit anEdit)
      Adds an UndoableEdit to this UndoableEdit.
      boolean canRedo()
      Returns true if this edit may be redone.
      boolean canUndo()
      Returns true if this edit may be undone.
      void die()
      Informs the edit that it should no longer be used.
      String getPresentationName()
      Returns a localized, human-readable description of this edit, suitable for use in a change log, for example.
      String getRedoPresentationName()
      Returns a localized, human-readable description of the redoable form of this edit, suitable for use as a Redo menu item, for example.
      String getUndoPresentationName()
      Returns a localized, human-readable description of the undoable form of this edit, suitable for use as an Undo menu item, for example.
      boolean isSignificant()
      Returns true if this edit is considered significant.
      void redo()
      Re-applies the edit.
      boolean replaceEdit(UndoableEdit anEdit)
      Returns true if this UndoableEdit should replace anEdit.
      void undo()
      Undo the edit.

    • Method Detail

      • undo

        void undo()
   throws CannotUndoException
        Undo the edit.
        Throws:
        CannotUndoException - if this edit can not be undone

      • canUndo

        boolean canUndo()
        Returns true if this edit may be undone.
        Returns:
        true if this edit may be undone

      • redo

        void redo()
   throws CannotRedoException
        Re-applies the edit.
        Throws:
        CannotRedoException - if this edit can not be redone

      • canRedo

        boolean canRedo()
        Returns true if this edit may be redone.
        Returns:
        true if this edit may be redone

      • die

        void die()
        Informs the edit that it should no longer be used. Once an UndoableEdit has been marked as dead it can no longer be undone or redone.

        This is a useful hook for cleaning up state no longer needed once undoing or redoing is impossible--for example, deleting file resources used by objects that can no longer be undeleted. UndoManager calls this before it dequeues edits.

        Note that this is a one-way operation. There is no "un-die" method.

        See Also:
        CompoundEdit.die()

      • addEdit

        boolean addEdit(UndoableEdit anEdit)
        Adds an UndoableEdit to this UndoableEdit. This method can be used to coalesce smaller edits into a larger compound edit. For example, text editors typically allow undo operations to apply to words or sentences. The text editor may choose to generate edits on each key event, but allow those edits to be coalesced into a more user-friendly unit, such as a word. In this case, the UndoableEdit would override addEdit to return true when the edits may be coalesced.

        A return value of true indicates anEdit was incorporated into this edit. A return value of false indicates anEdit may not be incorporated into this edit.

        Typically the receiver is already in the queue of a UndoManager (or other UndoableEditListener), and is being given a chance to incorporate anEdit rather than letting it be added to the queue in turn.

        If true is returned, from now on anEdit must return false from canUndo and canRedo, and must throw the appropriate exception on undo or redo.

        Parameters:
        anEdit - the edit to be added
        Returns:
        true if anEdit may be incorporated into this edit

      • replaceEdit

        boolean replaceEdit(UndoableEdit anEdit)
        Returns true if this UndoableEdit should replace anEdit. This method is used by CompoundEdit and the UndoManager; it is called if anEdit could not be added to the current edit (addEdit returns false).

        This method provides a way for an edit to replace an existing edit.

        This message is the opposite of addEdit--anEdit has typically already been queued in an UndoManager (or other UndoableEditListener), and the receiver is being given a chance to take its place.

        If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().

        Parameters:
        anEdit - the edit that replaces the current edit
        Returns:
        true if this edit should replace anEdit

      • isSignificant

        boolean isSignificant()
        Returns true if this edit is considered significant. A significant edit is typically an edit that should be presented to the user, perhaps on a menu item or tooltip. The UndoManager will undo, or redo, all insignificant edits to the next significant edit.
        Returns:
        true if this edit is significant

      • getPresentationName

        String getPresentationName()
        Returns a localized, human-readable description of this edit, suitable for use in a change log, for example.
        Returns:
        description of this edit

      • getUndoPresentationName

        String getUndoPresentationName()
        Returns a localized, human-readable description of the undoable form of this edit, suitable for use as an Undo menu item, for example. This is typically derived from getPresentationName.
        Returns:
        a description of the undoable form of this edit

      • getRedoPresentationName

        String getRedoPresentationName()
        Returns a localized, human-readable description of the redoable form of this edit, suitable for use as a Redo menu item, for example. This is typically derived from getPresentationName.
        Returns:
        a description of the redoable form of this edit
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UndoableEditSupport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class UndoableEditSupport

  • java.lang.Object
    • javax.swing.undo.UndoableEditSupport

  • public class UndoableEditSupport
extends Object
    A support class used for managing UndoableEdit listeners.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected CompoundEdit | compoundEdit
      protected Vector<UndoableEditListener> | listeners
      protected Object | realSource
      protected int | updateLevel

    • Constructor Summary

      Constructors
      Constructor and Description
      UndoableEditSupport()
      Constructs an UndoableEditSupport object.
      UndoableEditSupport(Object r)
      Constructs an UndoableEditSupport object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      protected void _postEdit(UndoableEdit e)
      Called only from postEdit and endUpdate.
      void addUndoableEditListener(UndoableEditListener l)
      Registers an UndoableEditListener.
      void | beginUpdate()
      protected CompoundEdit createCompoundEdit()
      Called only from beginUpdate.
      void endUpdate()
      DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
      UndoableEditListener[] getUndoableEditListeners()
      Returns an array of all the UndoableEditListeners added to this UndoableEditSupport with addUndoableEditListener().
      int getUpdateLevel()
      Returns the update level value.
      void postEdit(UndoableEdit e)
      DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
      void removeUndoableEditListener(UndoableEditListener l)
      Removes an UndoableEditListener.
      String toString()
      Returns a string that displays and identifies this object's properties.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • updateLevel

        protected int updateLevel

      • compoundEdit

        protected CompoundEdit compoundEdit

      • listeners

        protected Vector<UndoableEditListener> listeners

      • realSource

        protected Object realSource

    • Constructor Detail

      • UndoableEditSupport

        public UndoableEditSupport()
        Constructs an UndoableEditSupport object.

      • UndoableEditSupport

        public UndoableEditSupport(Object r)
        Constructs an UndoableEditSupport object.
        Parameters:
        r - an Object

    • Method Detail

      • addUndoableEditListener

        public void addUndoableEditListener(UndoableEditListener l)
        Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone.
        Parameters:
        l - an UndoableEditListener object
        See Also:
        removeUndoableEditListener(javax.swing.event.UndoableEditListener)

      • removeUndoableEditListener

        public void removeUndoableEditListener(UndoableEditListener l)
        Removes an UndoableEditListener.
        Parameters:
        l - the UndoableEditListener object to be removed
        See Also:
        addUndoableEditListener(javax.swing.event.UndoableEditListener)

      • getUndoableEditListeners

        public UndoableEditListener[] getUndoableEditListeners()
        Returns an array of all the UndoableEditListeners added to this UndoableEditSupport with addUndoableEditListener().
        Returns:
        all of the UndoableEditListeners added or an empty array if no listeners have been added
        Since:
        1.4

      • _postEdit

        protected void _postEdit(UndoableEdit e)
        Called only from postEdit and endUpdate. Calls undoableEditHappened in all listeners. No synchronization is performed here, since the two calling methods are synchronized.

      • postEdit

        public void postEdit(UndoableEdit e)
        DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.

      • getUpdateLevel

        public int getUpdateLevel()
        Returns the update level value.
        Returns:
        an integer representing the update level

      • beginUpdate

        public void beginUpdate()

      • createCompoundEdit

        protected CompoundEdit createCompoundEdit()
        Called only from beginUpdate. Exposed here for subclasses' use.

      • endUpdate

        public void endUpdate()
        DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UndoManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing.undo

Class UndoManager

  • java.lang.Object
    • javax.swing.undo.AbstractUndoableEdit
      • javax.swing.undo.CompoundEdit
        • javax.swing.undo.UndoManager
  • All Implemented Interfaces:
    Serializable, EventListener, UndoableEditListener, UndoableEdit

    public class UndoManager
extends CompoundEdit
implements UndoableEditListener
    UndoManager manages a list of UndoableEdits, providing a way to undo or redo the appropriate edits. There are two ways to add edits to an UndoManager. Add the edit directly using the addEdit method, or add the UndoManager to a bean that supports UndoableEditListener. The following examples creates an UndoManager and adds it as an UndoableEditListener to a JTextField:
       UndoManager undoManager = new UndoManager();
   JTextField tf = ...;
   tf.getDocument().addUndoableEditListener(undoManager);

    UndoManager maintains an ordered list of edits and the index of the next edit in that list. The index of the next edit is either the size of the current list of edits, or if undo has been invoked it corresponds to the index of the last significant edit that was undone. When undo is invoked all edits from the index of the next edit to the last significant edit are undone, in reverse order. For example, consider an UndoManager consisting of the following edits: A b c D. Edits with a upper-case letter in bold are significant, those in lower-case and italicized are insignificant.

    Figure 1

    As shown in figure 1, if D was just added, the index of the next edit will be 4. Invoking undo results in invoking undo on D and setting the index of the next edit to 3 (edit c), as shown in the following figure.

    Figure 2

    The last significant edit is A, so that invoking undo again invokes undo on c, b, and A, in that order, setting the index of the next edit to 0, as shown in the following figure.

    Figure 3

    Invoking redo results in invoking redo on all edits between the index of the next edit and the next significant edit (or the end of the list). Continuing with the previous example if redo were invoked, redo would in turn be invoked on A, b and c. In addition the index of the next edit is set to 3 (as shown in figure 2).

    Adding an edit to an UndoManager results in removing all edits from the index of the next edit to the end of the list. Continuing with the previous example, if a new edit, e, is added the edit D is removed from the list (after having die invoked on it). If c is not incorporated by the next edit (c.addEdit(e) returns true), or replaced by it (e.replaceEdit(c) returns true), the new edit is added after c, as shown in the following figure.

    Figure 4

    Once end has been invoked on an UndoManager the superclass behavior is used for all UndoableEdit methods. Refer to CompoundEdit for more details on its behavior.

    Unlike the rest of Swing, this class is thread safe.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Field Summary

      • Fields inherited from class javax.swing.undo.CompoundEdit

        edits

      • Fields inherited from class javax.swing.undo.AbstractUndoableEdit

        RedoName, UndoName

    • Constructor Summary

      Constructors
      Constructor and Description
      UndoManager()
      Creates a new UndoManager.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean addEdit(UndoableEdit anEdit)
      Adds an UndoableEdit to this UndoManager, if it's possible.
      boolean canRedo()
      Returns true if edits may be redone.
      boolean canUndo()
      Returns true if edits may be undone.
      boolean canUndoOrRedo()
      Returns true if it is possible to invoke undo or redo.
      void discardAllEdits()
      Empties the undo manager sending each edit a die message in the process.
      protected UndoableEdit editToBeRedone()
      Returns the the next significant edit to be redone if redo is invoked.
      protected UndoableEdit editToBeUndone()
      Returns the the next significant edit to be undone if undo is invoked.
      void end()
      Turns this UndoManager into a normal CompoundEdit.
      int getLimit()
      Returns the maximum number of edits this UndoManager holds.
      String getRedoPresentationName()
      Returns a description of the redoable form of this edit.
      String getUndoOrRedoPresentationName()
      Convenience method that returns either getUndoPresentationName or getRedoPresentationName.
      String getUndoPresentationName()
      Returns a description of the undoable form of this edit.
      void redo()
      Redoes the appropriate edits.
      protected void redoTo(UndoableEdit edit)
      Redoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
      void setLimit(int l)
      Sets the maximum number of edits this UndoManager holds.
      String toString()
      Returns a string that displays and identifies this object's properties.
      protected void trimEdits(int from, int to)
      Removes edits in the specified range.
      protected void trimForLimit()
      Reduces the number of queued edits to a range of size limit, centered on the index of the next edit.
      void undo()
      Undoes the appropriate edits.
      void undoableEditHappened(UndoableEditEvent e)
      An UndoableEditListener method.
      void undoOrRedo()
      Convenience method that invokes one of undo or redo.
      protected void undoTo(UndoableEdit edit)
      Undoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.

      • Methods inherited from class javax.swing.undo.CompoundEdit

        die, getPresentationName, isInProgress, isSignificant, lastEdit

      • Methods inherited from class javax.swing.undo.AbstractUndoableEdit

        replaceEdit

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UndoManager

        public UndoManager()
        Creates a new UndoManager.

    • Method Detail

      • getLimit

        public int getLimit()
        Returns the maximum number of edits this UndoManager holds. A value less than 0 indicates the number of edits is not limited.
        Returns:
        the maximum number of edits this UndoManager holds
        See Also:
        addEdit(javax.swing.undo.UndoableEdit), setLimit(int)

      • discardAllEdits

        public void discardAllEdits()
        Empties the undo manager sending each edit a die message in the process.
        See Also:
        AbstractUndoableEdit.die()

      • trimForLimit

        protected void trimForLimit()
        Reduces the number of queued edits to a range of size limit, centered on the index of the next edit.

      • trimEdits

        protected void trimEdits(int from,
                         int to)
        Removes edits in the specified range. All edits in the given range (inclusive, and in reverse order) will have die invoked on them and are removed from the list of edits. This has no effect if from > to.
        Parameters:
        from - the minimum index to remove
        to - the maximum index to remove

      • setLimit

        public void setLimit(int l)
        Sets the maximum number of edits this UndoManager holds. A value less than 0 indicates the number of edits is not limited. If edits need to be discarded to shrink the limit, die will be invoked on them in the reverse order they were added. The default is 100.
        Parameters:
        l - the new limit
        Throws:
        RuntimeException - if this UndoManager is not in progress (end has been invoked)
        See Also:
        CompoundEdit.isInProgress(),
end(),
addEdit(javax.swing.undo.UndoableEdit),
getLimit()

      • editToBeUndone

        protected UndoableEdit editToBeUndone()
        Returns the the next significant edit to be undone if undo is invoked. This returns null if there are no edits to be undone.
        Returns:
        the next significant edit to be undone

      • editToBeRedone

        protected UndoableEdit editToBeRedone()
        Returns the the next significant edit to be redone if redo is invoked. This returns null if there are no edits to be redone.
        Returns:
        the next significant edit to be redone

      • undoTo

        protected void undoTo(UndoableEdit edit)
               throws CannotUndoException
        Undoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
        Throws:
        CannotUndoException - if one of the edits throws CannotUndoException

      • redoTo

        protected void redoTo(UndoableEdit edit)
               throws CannotRedoException
        Redoes all changes from the index of the next edit to edit, updating the index of the next edit appropriately.
        Throws:
        CannotRedoException - if one of the edits throws CannotRedoException

      • undoOrRedo

        public void undoOrRedo()
                throws CannotRedoException,
                       CannotUndoException
        Convenience method that invokes one of undo or redo. If any edits have been undone (the index of the next edit is less than the length of the edits list) this invokes redo, otherwise it invokes undo.
        Throws:
        CannotUndoException - if one of the edits throws CannotUndoException
        CannotRedoException - if one of the edits throws CannotRedoException
        See Also:
        canUndoOrRedo(), getUndoOrRedoPresentationName()

      • canUndoOrRedo

        public boolean canUndoOrRedo()
        Returns true if it is possible to invoke undo or redo.
        Returns:
        true if invoking canUndoOrRedo is valid
        See Also:
        undoOrRedo()

      • undo

        public void undo()
          throws CannotUndoException
        Undoes the appropriate edits. If end has been invoked this calls through to the superclass, otherwise this invokes undo on all edits between the index of the next edit and the last significant edit, updating the index of the next edit appropriately.
        Specified by:
        undo in interface UndoableEdit
        Overrides:
        undo in class CompoundEdit
        Throws:
        CannotUndoException - if one of the edits throws CannotUndoException or there are no edits to be undone
        See Also:
        CompoundEdit.end(),
canUndo(),
editToBeUndone()

      • canUndo

        public boolean canUndo()
        Returns true if edits may be undone. If end has been invoked, this returns the value from super. Otherwise this returns true if there are any edits to be undone (editToBeUndone returns non-null).
        Specified by:
        canUndo in interface UndoableEdit
        Overrides:
        canUndo in class CompoundEdit
        Returns:
        true if there are edits to be undone
        See Also:
        CompoundEdit.canUndo(), editToBeUndone()

      • redo

        public void redo()
          throws CannotRedoException
        Redoes the appropriate edits. If end has been invoked this calls through to the superclass. Otherwise this invokes redo on all edits between the index of the next edit and the next significant edit, updating the index of the next edit appropriately.
        Specified by:
        redo in interface UndoableEdit
        Overrides:
        redo in class CompoundEdit
        Throws:
        CannotRedoException - if one of the edits throws CannotRedoException or there are no edits to be redone
        See Also:
        CompoundEdit.end(),
canRedo(),
editToBeRedone()

      • canRedo

        public boolean canRedo()
        Returns true if edits may be redone. If end has been invoked, this returns the value from super. Otherwise, this returns true if there are any edits to be redone (editToBeRedone returns non-null).
        Specified by:
        canRedo in interface UndoableEdit
        Overrides:
        canRedo in class CompoundEdit
        Returns:
        true if there are edits to be redone
        See Also:
        CompoundEdit.canRedo(), editToBeRedone()

      • addEdit

        public boolean addEdit(UndoableEdit anEdit)
        Adds an UndoableEdit to this UndoManager, if it's possible. This removes all edits from the index of the next edit to the end of the edits list. If end has been invoked the edit is not added and false is returned. If end hasn't been invoked this returns true.
        Specified by:
        addEdit in interface UndoableEdit
        Overrides:
        addEdit in class CompoundEdit
        Parameters:
        anEdit - the edit to be added
        Returns:
        true if anEdit can be incorporated into this edit
        See Also:
        CompoundEdit.end(), CompoundEdit.addEdit(javax.swing.undo.UndoableEdit)

      • end

        public void end()
        Turns this UndoManager into a normal CompoundEdit. This removes all edits that have been undone.
        Overrides:
        end in class CompoundEdit
        See Also:
        CompoundEdit.end()

      • getUndoOrRedoPresentationName

        public String getUndoOrRedoPresentationName()
        Convenience method that returns either getUndoPresentationName or getRedoPresentationName. If the index of the next edit equals the size of the edits list, getUndoPresentationName is returned, otherwise getRedoPresentationName is returned.
        Returns:
        undo or redo name

      • getUndoPresentationName

        public String getUndoPresentationName()
        Returns a description of the undoable form of this edit. If end has been invoked this calls into super. Otherwise if there are edits to be undone, this returns the value from the next significant edit that will be undone. If there are no edits to be undone and end has not been invoked this returns the value from the UIManager property "AbstractUndoableEdit.undoText".
        Specified by:
        getUndoPresentationName in interface UndoableEdit
        Overrides:
        getUndoPresentationName in class CompoundEdit
        Returns:
        a description of the undoable form of this edit
        See Also:
        undo(), CompoundEdit.getUndoPresentationName()

      • getRedoPresentationName

        public String getRedoPresentationName()
        Returns a description of the redoable form of this edit. If end has been invoked this calls into super. Otherwise if there are edits to be redone, this returns the value from the next significant edit that will be redone. If there are no edits to be redone and end has not been invoked this returns the value from the UIManager property "AbstractUndoableEdit.redoText".
        Specified by:
        getRedoPresentationName in interface UndoableEdit
        Overrides:
        getRedoPresentationName in class CompoundEdit
        Returns:
        a description of the redoable form of this edit
        See Also:
        redo(), CompoundEdit.getRedoPresentationName()

      • undoableEditHappened

        public void undoableEditHappened(UndoableEditEvent e)
        An UndoableEditListener method. This invokes addEdit with e.getEdit().
        Specified by:
        undoableEditHappened in interface UndoableEditListener
        Parameters:
        e - the UndoableEditEvent the UndoableEditEvent will be added from
        See Also:
        addEdit(javax.swing.undo.UndoableEdit)

      • toString

        public String toString()
        Returns a string that displays and identifies this object's properties.
        Overrides:
        toString in class CompoundEdit
        Returns:
        a String representation of this object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnsupportedLookAndFeelException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class UnsupportedLookAndFeelException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.swing.UnsupportedLookAndFeelException
  • All Implemented Interfaces:
    Serializable

    public class UnsupportedLookAndFeelException
extends Exception
    An exception that indicates the requested look & feel management classes are not present on the user's system.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Constructor and Description
      UnsupportedLookAndFeelException(String s)
      Constructs an UnsupportedLookAndFeelException object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UnsupportedLookAndFeelException

        public UnsupportedLookAndFeelException(String s)
        Constructs an UnsupportedLookAndFeelException object.
        Parameters:
        s - a message String
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ViewportLayout

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Class ViewportLayout

  • java.lang.Object
    • javax.swing.ViewportLayout
  • All Implemented Interfaces:
    LayoutManager, Serializable

    public class ViewportLayout
extends Object
implements LayoutManager, Serializable
    The default layout manager for JViewport. ViewportLayout defines a policy for layout that should be useful for most applications. The viewport makes its view the same size as the viewport, however it will not make the view smaller than its minimum size. As the viewport grows the view is kept bottom justified until the entire view is visible, subsequently the view is kept top justified.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    • Constructor Summary

      Constructors
      Constructor and Description
      ViewportLayout()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addLayoutComponent(String name, Component c)
      Adds the specified component to the layout.
      void layoutContainer(Container parent)
      Called by the AWT when the specified container needs to be laid out.
      Dimension minimumLayoutSize(Container parent)
      Returns the minimum dimensions needed to layout the components contained in the specified target container.
      Dimension preferredLayoutSize(Container parent)
      Returns the preferred dimensions for this layout given the components in the specified target container.
      void removeLayoutComponent(Component c)
      Removes the specified component from the layout.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ViewportLayout

        public ViewportLayout()

    • Method Detail

      • addLayoutComponent

        public void addLayoutComponent(String name,
                               Component c)
        Adds the specified component to the layout. Not used by this class.
        Specified by:
        addLayoutComponent in interface LayoutManager
        Parameters:
        name - the name of the component
        c - the the component to be added

      • removeLayoutComponent

        public void removeLayoutComponent(Component c)
        Removes the specified component from the layout. Not used by this class.
        Specified by:
        removeLayoutComponent in interface LayoutManager
        Parameters:
        c - the component to remove

      • preferredLayoutSize

        public Dimension preferredLayoutSize(Container parent)
        Returns the preferred dimensions for this layout given the components in the specified target container.
        Specified by:
        preferredLayoutSize in interface LayoutManager
        Parameters:
        parent - the component which needs to be laid out
        Returns:
        a Dimension object containing the preferred dimensions
        See Also:
        minimumLayoutSize(java.awt.Container)

      • minimumLayoutSize

        public Dimension minimumLayoutSize(Container parent)
        Returns the minimum dimensions needed to layout the components contained in the specified target container.
        Specified by:
        minimumLayoutSize in interface LayoutManager
        Parameters:
        parent - the component which needs to be laid out
        Returns:
        a Dimension object containing the minimum dimensions
        See Also:
        preferredLayoutSize(java.awt.Container)

      • layoutContainer

        public void layoutContainer(Container parent)
        Called by the AWT when the specified container needs to be laid out.
        Specified by:
        layoutContainer in interface LayoutManager
        Parameters:
        parent - the container to lay out
        Throws:
        AWTError - if the target isn't the container specified to the BoxLayout constructor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WindowConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.swing

Interface WindowConstants

  • All Known Implementing Classes:
    JDialog, JFrame, JInternalFrame

    public interface WindowConstants
    Constants used to control the window-closing operation. The setDefaultCloseOperation and getDefaultCloseOperation methods provided by JFrame, JInternalFrame, and JDialog use these constants. For examples of setting the default window-closing operation, see Responding to Window-Closing Events, a section in The Java Tutorial.
    See Also:
    JFrame.setDefaultCloseOperation(int),
JDialog.setDefaultCloseOperation(int),
JInternalFrame.setDefaultCloseOperation(int)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int DISPOSE_ON_CLOSE
      The dispose-window default window close operation.
      static int DO_NOTHING_ON_CLOSE
      The do-nothing default window close operation.
      static int EXIT_ON_CLOSE
      The exit application default window close operation.
      static int HIDE_ON_CLOSE
      The hide-window default window close operation

    • Field Detail

      • DO_NOTHING_ON_CLOSE

        static final int DO_NOTHING_ON_CLOSE
        The do-nothing default window close operation.
        See Also:
        Constant Field Values

      • HIDE_ON_CLOSE

        static final int HIDE_ON_CLOSE
        The hide-window default window close operation
        See Also:
        Constant Field Values

      • DISPOSE_ON_CLOSE

        static final int DISPOSE_ON_CLOSE
        The dispose-window default window close operation.

        Note: When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See AWT Threading Issues for more information.

        See Also:
        Window.dispose(), JInternalFrame.dispose(), Constant Field Values

      • EXIT_ON_CLOSE

        static final int EXIT_ON_CLOSE
        The exit application default window close operation. Attempting to set this on Windows that support this, such as JFrame, may throw a SecurityException based on the SecurityManager. It is recommended you only use this in an application.
        Since:
        1.4
        See Also:
        JFrame.setDefaultCloseOperation(int), Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


tools

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.tools

Provides interfaces for tools which can be invoked from a program, for example, compilers.

See: Description

  • Interface Summary
    Interface Description
    Diagnostic<S>
    Interface for diagnostics from tools.
    DiagnosticListener<S>
    Interface for receiving diagnostics from tools.
    DocumentationTool
    Interface to invoke Java™ programming language documentation tools from programs.
    DocumentationTool.DocumentationTask
    Interface representing a future for a documentation task.
    FileObject
    File abstraction for tools.
    JavaCompiler
    Interface to invoke Java™ programming language compilers from programs.
    JavaCompiler.CompilationTask
    Interface representing a future for a compilation task.
    JavaFileManager
    File manager for tools operating on Java™ programming language source and class files.
    JavaFileManager.Location
    Interface for locations of file objects.
    JavaFileObject
    File abstraction for tools operating on Java™ programming language source and class files.
    OptionChecker
    Interface for recognizing options.
    StandardJavaFileManager
    File manager based on java.io.File.
    Tool
    Common interface for tools that can be invoked from a program.
  • Class Summary
    Class Description
    DiagnosticCollector<S>
    Provides an easy way to collect diagnostics in a list.
    ForwardingFileObject<F extends FileObject>
    Forwards calls to a given file object.
    ForwardingJavaFileManager<M extends JavaFileManager>
    Forwards calls to a given file manager.
    ForwardingJavaFileObject<F extends JavaFileObject>
    Forwards calls to a given file object.
    SimpleJavaFileObject
    Provides simple implementations for most methods in JavaFileObject.
    ToolProvider
    Provides methods for locating tool providers, for example, providers of compilers.
  • Enum Summary
    Enum Description
    Diagnostic.Kind
    Kinds of diagnostics, for example, error or warning.
    DocumentationTool.Location
    Locations specific to DocumentationTool.
    JavaFileObject.Kind
    Kinds of JavaFileObjects.
    StandardLocation
    Standard locations of file objects.

Package javax.tools Description

Provides interfaces for tools which can be invoked from a program, for example, compilers.

These interfaces and classes are required as part of the Java™ Platform, Standard Edition (Java SE), but there is no requirement to provide any tools implementing them.

Unless explicitly allowed, all methods in this package might throw a NullPointerException if given a null argument or if given a list or collection containing null elements. Similarly, no method may return null unless explicitly allowed.

This package is the home of the Java programming language compiler framework. This framework allows clients of the framework to locate and run compilers from programs. The framework also provides Service Provider Interfaces (SPI) for structured access to diagnostics (DiagnosticListener) as well as a file abstraction for overriding file access (JavaFileManager and JavaFileObject). See JavaCompiler for more details on using the SPI.

There is no requirement for a compiler at runtime. However, if a default compiler is provided, it can be located using the ToolProvider, for example:

JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();

It is possible to provide alternative compilers or tools through the service provider mechanism.

For example, if com.vendor.VendorJavaCompiler is a provider of the JavaCompiler tool then its jar file would contain the file META-INF/services/javax.tools.JavaCompiler. This file would contain the single line:

com.vendor.VendorJavaCompiler

If the jar file is on the class path, VendorJavaCompiler can be located using code like this:

JavaCompiler compiler = ServiceLoader.load(JavaCompiler.class).iterator().next();

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.tools Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.tools

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.tools.DiagnosticCollector<S> (implements javax.tools.DiagnosticListener<S>)
    • javax.tools.ForwardingFileObject<F> (implements javax.tools.FileObject)
      • javax.tools.ForwardingJavaFileObject<F> (implements javax.tools.JavaFileObject)
    • javax.tools.ForwardingJavaFileManager<M> (implements javax.tools.JavaFileManager)
    • javax.tools.SimpleJavaFileObject (implements javax.tools.JavaFileObject)
    • javax.tools.ToolProvider

Interface Hierarchy

  • java.lang.AutoCloseable
    • java.io.Closeable
      • javax.tools.JavaFileManager (also extends java.io.Flushable, javax.tools.OptionChecker)
        • javax.tools.StandardJavaFileManager
  • java.util.concurrent.Callable<V>
    • javax.tools.DocumentationTool.DocumentationTask
    • javax.tools.JavaCompiler.CompilationTask
  • javax.tools.Diagnostic<S>
  • javax.tools.DiagnosticListener<S>
  • javax.tools.FileObject
    • javax.tools.JavaFileObject
  • java.io.Flushable
    • javax.tools.JavaFileManager (also extends java.io.Closeable, javax.tools.OptionChecker)
      • javax.tools.StandardJavaFileManager
  • javax.tools.JavaFileManager.Location
  • javax.tools.OptionChecker
    • javax.tools.DocumentationTool (also extends javax.tools.Tool)
    • javax.tools.JavaCompiler (also extends javax.tools.Tool)
    • javax.tools.JavaFileManager (also extends java.io.Closeable, java.io.Flushable)
      • javax.tools.StandardJavaFileManager
  • javax.tools.Tool
    • javax.tools.DocumentationTool (also extends javax.tools.OptionChecker)
    • javax.tools.JavaCompiler (also extends javax.tools.OptionChecker)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • javax.tools.DocumentationTool.Location (implements javax.tools.JavaFileManager.Location)
      • javax.tools.JavaFileObject.Kind
      • javax.tools.StandardLocation (implements javax.tools.JavaFileManager.Location)
      • javax.tools.Diagnostic.Kind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.tools

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.tools

  • Packages that use javax.tools
    Package Description
    javax.annotation.processing
    Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.
  • Classes in javax.tools used by javax.annotation.processing
    Class and Description
    Diagnostic.Kind
    Kinds of diagnostics, for example, error or warning.
    FileObject
    File abstraction for tools.
    JavaFileManager.Location
    Interface for locations of file objects.
    JavaFileObject
    File abstraction for tools operating on Java™ programming language source and class files.
  • Classes in javax.tools used by javax.tools
    Class and Description
    Diagnostic
    Interface for diagnostics from tools.
    Diagnostic.Kind
    Kinds of diagnostics, for example, error or warning.
    DiagnosticListener
    Interface for receiving diagnostics from tools.
    DocumentationTool
    Interface to invoke Java™ programming language documentation tools from programs.
    DocumentationTool.DocumentationTask
    Interface representing a future for a documentation task.
    DocumentationTool.Location
    Locations specific to DocumentationTool.
    FileObject
    File abstraction for tools.
    ForwardingFileObject
    Forwards calls to a given file object.
    JavaCompiler
    Interface to invoke Java™ programming language compilers from programs.
    JavaCompiler.CompilationTask
    Interface representing a future for a compilation task.
    JavaFileManager
    File manager for tools operating on Java™ programming language source and class files.
    JavaFileManager.Location
    Interface for locations of file objects.
    JavaFileObject
    File abstraction for tools operating on Java™ programming language source and class files.
    JavaFileObject.Kind
    Kinds of JavaFileObjects.
    OptionChecker
    Interface for recognizing options.
    StandardJavaFileManager
    File manager based on java.io.File.
    StandardLocation
    Standard locations of file objects.
    Tool
    Common interface for tools that can be invoked from a program.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.Diagnostic.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.Diagnostic.Kind

  • Packages that use Diagnostic.Kind
    Package Description
    javax.annotation.processing
    Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of Diagnostic.Kind in javax.annotation.processing

      Methods in javax.annotation.processing with parameters of type Diagnostic.Kind
      Modifier and Type Method and Description
      void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg)
      Prints a message of the specified kind.
      void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e)
      Prints a message of the specified kind at the location of the element.
      void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)
      Prints a message of the specified kind at the location of the annotation mirror of the annotated element.
      void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
      Prints a message of the specified kind at the location of the annotation value inside the annotation mirror of the annotated element.

    • Uses of Diagnostic.Kind in javax.tools

      Methods in javax.tools that return Diagnostic.Kind
      Modifier and Type Method and Description
      Diagnostic.Kind Diagnostic.getKind()
      Gets the kind of this diagnostic, for example, error or warning.
      static Diagnostic.Kind Diagnostic.Kind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Diagnostic.Kind[] Diagnostic.Kind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.DiagnosticCollector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.DiagnosticCollector

No usage of javax.tools.DiagnosticCollector
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.DocumentationTool.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.DocumentationTool.Location

  • Packages that use DocumentationTool.Location
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of DocumentationTool.Location in javax.tools

      Methods in javax.tools that return DocumentationTool.Location
      Modifier and Type Method and Description
      static DocumentationTool.Location DocumentationTool.Location.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static DocumentationTool.Location[] DocumentationTool.Location.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.ForwardingFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.ForwardingFileObject

  • Packages that use ForwardingFileObject
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of ForwardingFileObject in javax.tools

      Subclasses of ForwardingFileObject in javax.tools
      Modifier and Type Class and Description
      class  ForwardingJavaFileObject<F extends JavaFileObject>
      Forwards calls to a given file object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.ForwardingJavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.ForwardingJavaFileManager

No usage of javax.tools.ForwardingJavaFileManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.ForwardingJavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.ForwardingJavaFileObject

No usage of javax.tools.ForwardingJavaFileObject
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.JavaFileObject.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.JavaFileObject.Kind

  • Packages that use JavaFileObject.Kind
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaFileObject.Kind in javax.tools

      Fields in javax.tools declared as JavaFileObject.Kind
      Modifier and Type Field and Description
      protected JavaFileObject.Kind SimpleJavaFileObject.kind
      The kind of this file object.
      Methods in javax.tools that return JavaFileObject.Kind
      Modifier and Type | Method and Description
      JavaFileObject.Kind | ForwardingJavaFileObject.getKind()
      JavaFileObject.Kind JavaFileObject.getKind()
      Gets the kind of this file object.
      JavaFileObject.Kind | SimpleJavaFileObject.getKind()
      static JavaFileObject.Kind JavaFileObject.Kind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static JavaFileObject.Kind[] JavaFileObject.Kind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Methods in javax.tools with parameters of type JavaFileObject.Kind
      Modifier and Type | Method and Description
      JavaFileObject JavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      Gets a file object for input representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      JavaFileObject JavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      boolean | ForwardingJavaFileObject.isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      boolean JavaFileObject.isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      Checks if this file object is compatible with the specified simple name and kind.
      boolean SimpleJavaFileObject.isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      This implementation compares the path of its URI to the given simple name.
      Method parameters in javax.tools with type arguments of type JavaFileObject.Kind
      Modifier and Type | Method and Description
      Iterable<JavaFileObject> JavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Lists all file objects matching the given criteria in the given location.
      Iterable<JavaFileObject> | ForwardingJavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Constructors in javax.tools with parameters of type JavaFileObject.Kind
      Constructor and Description
      SimpleJavaFileObject(URI uri, JavaFileObject.Kind kind)
      Construct a SimpleJavaFileObject of the given kind and with the given URI.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.SimpleJavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.SimpleJavaFileObject

No usage of javax.tools.SimpleJavaFileObject
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.StandardLocation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.StandardLocation

  • Packages that use StandardLocation
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of StandardLocation in javax.tools

      Methods in javax.tools that return StandardLocation
      Modifier and Type Method and Description
      static StandardLocation StandardLocation.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static StandardLocation[] StandardLocation.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.tools.ToolProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.tools.ToolProvider

No usage of javax.tools.ToolProvider
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.Diagnostic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.Diagnostic

  • Packages that use Diagnostic
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of Diagnostic in javax.tools

      Methods in javax.tools that return types with arguments of type Diagnostic
      Modifier and Type Method and Description
      List<Diagnostic<? extends S>> DiagnosticCollector.getDiagnostics()
      Gets a list view of diagnostics collected by this object.
      Methods in javax.tools with parameters of type Diagnostic
      Modifier and Type | Method and Description
      void | DiagnosticCollector.report(Diagnostic<? extends S> diagnostic)
      void DiagnosticListener.report(Diagnostic<? extends S> diagnostic)
      Invoked when a problem is found.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.DiagnosticListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.DiagnosticListener

  • Packages that use DiagnosticListener
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of DiagnosticListener in javax.tools

      Classes in javax.tools that implement DiagnosticListener
      Modifier and Type Class and Description
      class  DiagnosticCollector<S>
      Provides an easy way to collect diagnostics in a list.
      Methods in javax.tools with parameters of type DiagnosticListener
      Modifier and Type Method and Description
      StandardJavaFileManager DocumentationTool.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      StandardJavaFileManager JavaCompiler.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      DocumentationTool.DocumentationTask DocumentationTool.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.
      JavaCompiler.CompilationTask JavaCompiler.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.DocumentationTool

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.DocumentationTool

  • Packages that use DocumentationTool
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of DocumentationTool in javax.tools

      Methods in javax.tools that return DocumentationTool
      Modifier and Type Method and Description
      static DocumentationTool ToolProvider.getSystemDocumentationTool()
      Gets the Java™ programming language documentation tool provided with this platform.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.DocumentationTool.DocumentationTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.DocumentationTool.DocumentationTask

  • Packages that use DocumentationTool.DocumentationTask
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of DocumentationTool.DocumentationTask in javax.tools

      Methods in javax.tools that return DocumentationTool.DocumentationTask
      Modifier and Type Method and Description
      DocumentationTool.DocumentationTask DocumentationTool.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.FileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.FileObject

  • Packages that use FileObject
    Package Description
    javax.annotation.processing
    Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of FileObject in javax.annotation.processing

      Methods in javax.annotation.processing that return FileObject
      Modifier and Type Method and Description
      FileObject Filer.createResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName, Element... originatingElements)
      Creates a new auxiliary resource file for writing and returns a file object for it.
      FileObject Filer.getResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName)
      Returns an object for reading an existing resource.

    • Uses of FileObject in javax.tools

      Classes in javax.tools with type parameters of type FileObject
      Modifier and Type Class and Description
      class  ForwardingFileObject<F extends FileObject>
      Forwards calls to a given file object.
      Subinterfaces of FileObject in javax.tools
      Modifier and Type Interface and Description
      interface  JavaFileObject
      File abstraction for tools operating on Java™ programming language source and class files.
      Classes in javax.tools that implement FileObject
      Modifier and Type Class and Description
      class  ForwardingFileObject<F extends FileObject>
      Forwards calls to a given file object.
      class  ForwardingJavaFileObject<F extends JavaFileObject>
      Forwards calls to a given file object.
      class  SimpleJavaFileObject
      Provides simple implementations for most methods in JavaFileObject.
      Fields in javax.tools declared as FileObject
      Modifier and Type Field and Description
      protected F ForwardingFileObject.fileObject
      The file object which all methods are delegated to.
      Methods in javax.tools that return FileObject
      Modifier and Type | Method and Description
      FileObject JavaFileManager.getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      Gets a file object for input representing the specified relative name in the specified package in the given location.
      FileObject | ForwardingJavaFileManager.getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      FileObject JavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Gets a file object for output representing the specified relative name in the specified package in the given location.
      FileObject | ForwardingJavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Methods in javax.tools with parameters of type FileObject
      Modifier and Type | Method and Description
      FileObject JavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Gets a file object for output representing the specified relative name in the specified package in the given location.
      FileObject | ForwardingJavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      JavaFileObject JavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      boolean JavaFileManager.isSameFile(FileObject a, FileObject b)
      Compares two file objects and return true if they represent the same underlying object.
      boolean | ForwardingJavaFileManager.isSameFile(FileObject a, FileObject b)
      boolean StandardJavaFileManager.isSameFile(FileObject a, FileObject b)
      Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.JavaCompiler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.JavaCompiler

  • Packages that use JavaCompiler
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaCompiler in javax.tools

      Methods in javax.tools that return JavaCompiler
      Modifier and Type Method and Description
      static JavaCompiler ToolProvider.getSystemJavaCompiler()
      Gets the Java™ programming language compiler provided with this platform.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.JavaCompiler.CompilationTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.JavaCompiler.CompilationTask

  • Packages that use JavaCompiler.CompilationTask
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaCompiler.CompilationTask in javax.tools

      Methods in javax.tools that return JavaCompiler.CompilationTask
      Modifier and Type Method and Description
      JavaCompiler.CompilationTask JavaCompiler.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.JavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.JavaFileManager

  • Packages that use JavaFileManager
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaFileManager in javax.tools

      Classes in javax.tools with type parameters of type JavaFileManager
      Modifier and Type Class and Description
      class  ForwardingJavaFileManager<M extends JavaFileManager>
      Forwards calls to a given file manager.
      Subinterfaces of JavaFileManager in javax.tools
      Modifier and Type Interface and Description
      interface  StandardJavaFileManager
      File manager based on java.io.File.
      Classes in javax.tools that implement JavaFileManager
      Modifier and Type Class and Description
      class  ForwardingJavaFileManager<M extends JavaFileManager>
      Forwards calls to a given file manager.
      Fields in javax.tools declared as JavaFileManager
      Modifier and Type Field and Description
      protected M ForwardingJavaFileManager.fileManager
      The file manager which all methods are delegated to.
      Methods in javax.tools with parameters of type JavaFileManager
      Modifier and Type Method and Description
      DocumentationTool.DocumentationTask DocumentationTool.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.
      JavaCompiler.CompilationTask JavaCompiler.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.JavaFileManager.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.JavaFileManager.Location

  • Packages that use JavaFileManager.Location
    Package Description
    javax.annotation.processing
    Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaFileManager.Location in javax.annotation.processing

      Methods in javax.annotation.processing with parameters of type JavaFileManager.Location
      Modifier and Type Method and Description
      FileObject Filer.createResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName, Element... originatingElements)
      Creates a new auxiliary resource file for writing and returns a file object for it.
      FileObject Filer.getResource(JavaFileManager.Location location, CharSequence pkg, CharSequence relativeName)
      Returns an object for reading an existing resource.

    • Uses of JavaFileManager.Location in javax.tools

      Classes in javax.tools that implement JavaFileManager.Location
      Modifier and Type Class and Description
      static class  DocumentationTool.Location
      Locations specific to DocumentationTool.
      class  StandardLocation
      Standard locations of file objects.
      Methods in javax.tools that return JavaFileManager.Location
      Modifier and Type Method and Description
      static JavaFileManager.Location StandardLocation.locationFor(String name)
      Gets a location object with the given name.
      Methods in javax.tools with parameters of type JavaFileManager.Location
      Modifier and Type | Method and Description
      ClassLoader JavaFileManager.getClassLoader(JavaFileManager.Location location)
      Gets a class loader for loading plug-ins from the given location.
      ClassLoader | ForwardingJavaFileManager.getClassLoader(JavaFileManager.Location location)
      FileObject JavaFileManager.getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      Gets a file object for input representing the specified relative name in the specified package in the given location.
      FileObject | ForwardingJavaFileManager.getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      FileObject JavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Gets a file object for output representing the specified relative name in the specified package in the given location.
      FileObject | ForwardingJavaFileManager.getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      JavaFileObject JavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      Gets a file object for input representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      JavaFileObject JavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Iterable<? extends File> StandardJavaFileManager.getLocation(JavaFileManager.Location location)
      Gets the path associated with the given location.
      boolean JavaFileManager.hasLocation(JavaFileManager.Location location)
      Determines if a location is known to this file manager.
      boolean | ForwardingJavaFileManager.hasLocation(JavaFileManager.Location location)
      String JavaFileManager.inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Infers a binary name of a file object based on a location.
      String | ForwardingJavaFileManager.inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Iterable<JavaFileObject> JavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Lists all file objects matching the given criteria in the given location.
      Iterable<JavaFileObject> | ForwardingJavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      void StandardJavaFileManager.setLocation(JavaFileManager.Location location, Iterable<? extends File> path)
      Associates the given path with the given location.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.JavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.JavaFileObject

  • Packages that use JavaFileObject
    Package Description
    javax.annotation.processing
    Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of JavaFileObject in javax.annotation.processing

      Methods in javax.annotation.processing that return JavaFileObject
      Modifier and Type Method and Description
      JavaFileObject Filer.createClassFile(CharSequence name, Element... originatingElements)
      Creates a new class file, and returns an object to allow writing to it.
      JavaFileObject Filer.createSourceFile(CharSequence name, Element... originatingElements)
      Creates a new source file and returns an object to allow writing to it.

    • Uses of JavaFileObject in javax.tools

      Classes in javax.tools with type parameters of type JavaFileObject
      Modifier and Type Class and Description
      class  ForwardingJavaFileObject<F extends JavaFileObject>
      Forwards calls to a given file object.
      Classes in javax.tools that implement JavaFileObject
      Modifier and Type Class and Description
      class  ForwardingJavaFileObject<F extends JavaFileObject>
      Forwards calls to a given file object.
      class  SimpleJavaFileObject
      Provides simple implementations for most methods in JavaFileObject.
      Methods in javax.tools that return JavaFileObject
      Modifier and Type | Method and Description
      JavaFileObject JavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      Gets a file object for input representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      JavaFileObject JavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      JavaFileObject | ForwardingJavaFileManager.getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Methods in javax.tools that return types with arguments of type JavaFileObject
      Modifier and Type | Method and Description
      Iterable<? extends JavaFileObject> StandardJavaFileManager.getJavaFileObjects(File... files)
      Gets file objects representing the given files.
      Iterable<? extends JavaFileObject> StandardJavaFileManager.getJavaFileObjects(String... names)
      Gets file objects representing the given file names.
      Iterable<? extends JavaFileObject> StandardJavaFileManager.getJavaFileObjectsFromFiles(Iterable<? extends File> files)
      Gets file objects representing the given files.
      Iterable<? extends JavaFileObject> StandardJavaFileManager.getJavaFileObjectsFromStrings(Iterable<String> names)
      Gets file objects representing the given file names.
      Iterable<JavaFileObject> JavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Lists all file objects matching the given criteria in the given location.
      Iterable<JavaFileObject> | ForwardingJavaFileManager.list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Methods in javax.tools with parameters of type JavaFileObject
      Modifier and Type | Method and Description
      String JavaFileManager.inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Infers a binary name of a file object based on a location.
      String | ForwardingJavaFileManager.inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Method parameters in javax.tools with type arguments of type JavaFileObject
      Modifier and Type Method and Description
      StandardJavaFileManager DocumentationTool.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      StandardJavaFileManager JavaCompiler.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      DocumentationTool.DocumentationTask DocumentationTool.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.
      DocumentationTool.DocumentationTask DocumentationTool.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.
      JavaCompiler.CompilationTask JavaCompiler.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.
      JavaCompiler.CompilationTask JavaCompiler.getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.OptionChecker

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.OptionChecker

  • Packages that use OptionChecker
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of OptionChecker in javax.tools

      Subinterfaces of OptionChecker in javax.tools
      Modifier and Type Interface and Description
      interface  DocumentationTool
      Interface to invoke Java™ programming language documentation tools from programs.
      interface  JavaCompiler
      Interface to invoke Java™ programming language compilers from programs.
      interface  JavaFileManager
      File manager for tools operating on Java™ programming language source and class files.
      interface  StandardJavaFileManager
      File manager based on java.io.File.
      Classes in javax.tools that implement OptionChecker
      Modifier and Type Class and Description
      class  ForwardingJavaFileManager<M extends JavaFileManager>
      Forwards calls to a given file manager.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.StandardJavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.StandardJavaFileManager

  • Packages that use StandardJavaFileManager
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of StandardJavaFileManager in javax.tools

      Methods in javax.tools that return StandardJavaFileManager
      Modifier and Type Method and Description
      StandardJavaFileManager DocumentationTool.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      StandardJavaFileManager JavaCompiler.getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.tools.Tool

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.tools.Tool

  • Packages that use Tool
    Package Description
    javax.tools
    Provides interfaces for tools which can be invoked from a program, for example, compilers.

    • Uses of Tool in javax.tools

      Subinterfaces of Tool in javax.tools
      Modifier and Type Interface and Description
      interface  DocumentationTool
      Interface to invoke Java™ programming language documentation tools from programs.
      interface  JavaCompiler
      Interface to invoke Java™ programming language compilers from programs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Diagnostic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface Diagnostic<S>

  • Type Parameters:
    S - the type of source object used by this diagnostic

    public interface Diagnostic<S>
    Interface for diagnostics from tools. A diagnostic usually reports a problem at a specific position in a source file. However, not all diagnostics are associated with a position or a file.

    A position is a zero-based character offset from the beginning of a file. Negative values (except NOPOS) are not valid positions.

    Line and column numbers begin at 1. Negative values (except NOPOS) and 0 are not valid line or column numbers.

    Since:
    1.6

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  Diagnostic.Kind
      Kinds of diagnostics, for example, error or warning.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static long NOPOS
      Used to signal that no position is available.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getCode()
      Gets a diagnostic code indicating the type of diagnostic.
      long getColumnNumber()
      Gets the column number of the character offset returned by getPosition().
      long getEndPosition()
      Gets the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem.
      Diagnostic.Kind getKind()
      Gets the kind of this diagnostic, for example, error or warning.
      long getLineNumber()
      Gets the line number of the character offset returned by getPosition().
      String getMessage(Locale locale)
      Gets a localized message for the given locale.
      long getPosition()
      Gets a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem.
      S getSource()
      Gets the source object associated with this diagnostic.
      long getStartPosition()
      Gets the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem.

    • Field Detail

      • NOPOS

        static final long NOPOS
        Used to signal that no position is available.
        See Also:
        Constant Field Values

    • Method Detail

      • getKind

        Diagnostic.Kind getKind()
        Gets the kind of this diagnostic, for example, error or warning.
        Returns:
        the kind of this diagnostic

      • getSource

        S getSource()
        Gets the source object associated with this diagnostic.
        Returns:
        the source object associated with this diagnostic. null if no source object is associated with the diagnostic.

      • getPosition

        long getPosition()
        Gets a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem. In addition, the following must be true:

        getStartPostion() <= getPosition()

        getPosition() <= getEndPosition()

        Returns:
        character offset from beginning of source; NOPOS if getSource() would return null or if no location is suitable

      • getStartPosition

        long getStartPosition()
        Gets the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem.
        Returns:
        offset from beginning of file; NOPOS if and only if getPosition() returns NOPOS

      • getEndPosition

        long getEndPosition()
        Gets the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem.
        Returns:
        offset from beginning of file; NOPOS if and only if getPosition() returns NOPOS

      • getLineNumber

        long getLineNumber()
        Gets the line number of the character offset returned by getPosition().
        Returns:
        a line number or NOPOS if and only if getPosition() returns NOPOS

      • getColumnNumber

        long getColumnNumber()
        Gets the column number of the character offset returned by getPosition().
        Returns:
        a column number or NOPOS if and only if getPosition() returns NOPOS

      • getCode

        String getCode()
        Gets a diagnostic code indicating the type of diagnostic. The code is implementation-dependent and might be null.
        Returns:
        a diagnostic code

      • getMessage

        String getMessage(Locale locale)
        Gets a localized message for the given locale. The actual message is implementation-dependent. If the locale is null use the default locale.
        Parameters:
        locale - a locale; might be null
        Returns:
        a localized message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Diagnostic.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
compact3
javax.tools

Enum Diagnostic.Kind

  • java.lang.Object
    • java.lang.Enum<Diagnostic.Kind>
      • javax.tools.Diagnostic.Kind
  • All Implemented Interfaces:
    Serializable, Comparable<Diagnostic.Kind>
    Enclosing interface:
    Diagnostic<S>

    public static enum Diagnostic.Kind
extends Enum<Diagnostic.Kind>
    Kinds of diagnostics, for example, error or warning. The kind of a diagnostic can be used to determine how the diagnostic should be presented to the user. For example, errors might be colored red or prefixed with the word "Error", while warnings might be colored yellow or prefixed with the word "Warning". There is no requirement that the Kind should imply any inherent semantic meaning to the message of the diagnostic: for example, a tool might provide an option to report all warnings as errors.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ERROR
      Problem which prevents the tool's normal completion.
      MANDATORY_WARNING
      Problem similar to a warning, but is mandated by the tool's specification.
      NOTE
      Informative message from the tool.
      OTHER
      Diagnostic which does not fit within the other kinds.
      WARNING
      Problem which does not usually prevent the tool from completing normally.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static Diagnostic.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Diagnostic.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • ERROR

        public static final Diagnostic.Kind ERROR
        Problem which prevents the tool's normal completion.

      • WARNING

        public static final Diagnostic.Kind WARNING
        Problem which does not usually prevent the tool from completing normally.

      • MANDATORY_WARNING

        public static final Diagnostic.Kind MANDATORY_WARNING
        Problem similar to a warning, but is mandated by the tool's specification. For example, the Java™ Language Specification mandates warnings on certain unchecked operations and the use of deprecated methods.

      • NOTE

        public static final Diagnostic.Kind NOTE
        Informative message from the tool.

      • OTHER

        public static final Diagnostic.Kind OTHER
        Diagnostic which does not fit within the other kinds.

    • Method Detail

      • values

        public static Diagnostic.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Diagnostic.Kind c : Diagnostic.Kind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static Diagnostic.Kind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DiagnosticCollector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class DiagnosticCollector<S>

  • java.lang.Object
    • javax.tools.DiagnosticCollector<S>
  • Type Parameters:
    S - the type of source objects used by diagnostics received by this object
    All Implemented Interfaces:
    DiagnosticListener<S>

    public final class DiagnosticCollector<S>
extends Object
implements DiagnosticListener<S>
    Provides an easy way to collect diagnostics in a list.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      DiagnosticCollector()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      List<Diagnostic<? extends S>> getDiagnostics()
      Gets a list view of diagnostics collected by this object.
      void report(Diagnostic<? extends S> diagnostic)
      Invoked when a problem is found.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DiagnosticCollector

        public DiagnosticCollector()

    • Method Detail

      • report

        public void report(Diagnostic<? extends S> diagnostic)
        Description copied from interface: DiagnosticListener
        Invoked when a problem is found.
        Specified by:
        report in interface DiagnosticListener<S>
        Parameters:
        diagnostic - a diagnostic representing the problem that was found

      • getDiagnostics

        public List<Diagnostic<? extends S>> getDiagnostics()
        Gets a list view of diagnostics collected by this object.
        Returns:
        a list view of diagnostics
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DiagnosticListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface DiagnosticListener<S>

  • Type Parameters:
    S - the type of source objects used by diagnostics received by this listener
    All Known Implementing Classes:
    DiagnosticCollector

    public interface DiagnosticListener<S>
    Interface for receiving diagnostics from tools.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void report(Diagnostic<? extends S> diagnostic)
      Invoked when a problem is found.

    • Method Detail

      • report

        void report(Diagnostic<? extends S> diagnostic)
        Invoked when a problem is found.
        Parameters:
        diagnostic - a diagnostic representing the problem that was found
        Throws:
        NullPointerException - if the diagnostic argument is null and the implementation cannot handle null arguments
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentationTool

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface DocumentationTool

  • All Superinterfaces:
    OptionChecker, Tool

    public interface DocumentationTool
extends Tool, OptionChecker
    Interface to invoke Java™ programming language documentation tools from programs.

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  DocumentationTool.DocumentationTask
      Interface representing a future for a documentation task.
      static class  DocumentationTool.Location
      Locations specific to DocumentationTool.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      DocumentationTool.DocumentationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a documentation task with the given components and arguments.

      • Methods inherited from interface javax.tools.Tool

        getSourceVersions, run

      • Methods inherited from interface javax.tools.OptionChecker

        isSupportedOption

    • Method Detail

      • getTask

        DocumentationTool.DocumentationTask getTask(Writer out,
                                            JavaFileManager fileManager,
                                            DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                            Class<?> docletClass,
                                            Iterable<String> options,
                                            Iterable<? extends JavaFileObject> compilationUnits)
        Creates a future for a documentation task with the given components and arguments. The task might not have completed as described in the DocumentationTask interface.

        If a file manager is provided, it must be able to handle all locations defined in DocumentationTool.Location, as well as StandardLocation.SOURCE_PATH, StandardLocation.CLASS_PATH, and StandardLocation.PLATFORM_CLASS_PATH.

        Parameters:
        out - a Writer for additional output from the tool; use System.err if null
        fileManager - a file manager; if null use the tool's standard filemanager
        diagnosticListener - a diagnostic listener; if null use the tool's default method for reporting diagnostics
        docletClass - a class providing the necessary methods required of a doclet
        options - documentation tool options and doclet options, null means no options
        compilationUnits - the compilation units to compile, null means no compilation units
        Returns:
        an object representing the compilation
        Throws:
        RuntimeException - if an unrecoverable error occurred in a user supplied component. The cause will be the error in user code.
        IllegalArgumentException - if any of the given compilation units are of other kind than source

      • getStandardFileManager

        StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                               Locale locale,
                                               Charset charset)
        Gets a new instance of the standard file manager implementation for this tool. The file manager will use the given diagnostic listener for producing any non-fatal diagnostics. Fatal errors will be signaled with the appropriate exceptions.

        The standard file manager will be automatically reopened if it is accessed after calls to flush or close. The standard file manager must be usable with other tools.

        Parameters:
        diagnosticListener - a diagnostic listener for non-fatal diagnostics; if null use the compiler's default method for reporting diagnostics
        locale - the locale to apply when formatting diagnostics; null means the default locale.
        charset - the character set used for decoding bytes; if null use the platform default
        Returns:
        the standard file manager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentationTool.DocumentationTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface DocumentationTool.DocumentationTask

  • All Superinterfaces:
    Callable<Boolean>
    Enclosing interface:
    DocumentationTool

    public static interface DocumentationTool.DocumentationTask
extends Callable<Boolean>
    Interface representing a future for a documentation task. The task has not yet started. To start the task, call the call method.

    Before calling the call method, additional aspects of the task can be configured, for example, by calling the setLocale method.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Boolean call()
      Performs this documentation task.
      void setLocale(Locale locale)
      Set the locale to be applied when formatting diagnostics and other localized data.

    • Method Detail

      • setLocale

        void setLocale(Locale locale)
        Set the locale to be applied when formatting diagnostics and other localized data.
        Parameters:
        locale - the locale to apply; null means apply no locale
        Throws:
        IllegalStateException - if the task has started

      • call

        Boolean call()
        Performs this documentation task. The task may only be performed once. Subsequent calls to this method throw IllegalStateException.
        Specified by:
        call in interface Callable<Boolean>
        Returns:
        true if and only all the files were processed without errors; false otherwise
        Throws:
        RuntimeException - if an unrecoverable error occurred in a user-supplied component. The cause will be the error in user code.
        IllegalStateException - if called more than once
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentationTool.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
compact3
javax.tools

Enum DocumentationTool.Location

  • java.lang.Object
    • java.lang.Enum<DocumentationTool.Location>
      • javax.tools.DocumentationTool.Location
  • All Implemented Interfaces:
    Serializable, Comparable<DocumentationTool.Location>, JavaFileManager.Location
    Enclosing interface:
    DocumentationTool

    public static enum DocumentationTool.Location
extends Enum<DocumentationTool.Location>
implements JavaFileManager.Location
    Locations specific to DocumentationTool.
    See Also:
    StandardLocation

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      DOCLET_PATH
      Location to search for doclets.
      DOCUMENTATION_OUTPUT
      Location of new documentation files.
      TAGLET_PATH
      Location to search for taglets.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getName()
      Gets the name of this location.
      boolean isOutputLocation()
      Determines if this is an output location.
      static DocumentationTool.Location valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static DocumentationTool.Location[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • DOCUMENTATION_OUTPUT

        public static final DocumentationTool.Location DOCUMENTATION_OUTPUT
        Location of new documentation files.

      • DOCLET_PATH

        public static final DocumentationTool.Location DOCLET_PATH
        Location to search for doclets.

      • TAGLET_PATH

        public static final DocumentationTool.Location TAGLET_PATH
        Location to search for taglets.

    • Method Detail

      • values

        public static DocumentationTool.Location[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DocumentationTool.Location c : DocumentationTool.Location.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static DocumentationTool.Location valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null

      • getName

        public String getName()
        Description copied from interface: JavaFileManager.Location
        Gets the name of this location.
        Specified by:
        getName in interface JavaFileManager.Location
        Returns:
        a name

      • isOutputLocation

        public boolean isOutputLocation()
        Description copied from interface: JavaFileManager.Location
        Determines if this is an output location. An output location is a location that is conventionally used for output.
        Specified by:
        isOutputLocation in interface JavaFileManager.Location
        Returns:
        true if this is an output location, false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface FileObject

  • All Known Subinterfaces:
    JavaFileObject
    All Known Implementing Classes:
    ForwardingFileObject, ForwardingJavaFileObject, SimpleJavaFileObject

    public interface FileObject
    File abstraction for tools. In this context, file means an abstraction of regular files and other sources of data. For example, a file object can be used to represent regular files, memory cache, or data in databases.

    All methods in this interface might throw a SecurityException if a security exception occurs.

    Unless explicitly allowed, all methods in this interface might throw a NullPointerException if given a null argument.

    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean delete()
      Deletes this file object.
      CharSequence getCharContent(boolean ignoreEncodingErrors)
      Gets the character content of this file object, if available.
      long getLastModified()
      Gets the time this file object was last modified.
      String getName()
      Gets a user-friendly name for this file object.
      InputStream openInputStream()
      Gets an InputStream for this file object.
      OutputStream openOutputStream()
      Gets an OutputStream for this file object.
      Reader openReader(boolean ignoreEncodingErrors)
      Gets a reader for this object.
      Writer openWriter()
      Gets a Writer for this file object.
      URI toUri()
      Returns a URI identifying this file object.

    • Method Detail

      • toUri

        URI toUri()
        Returns a URI identifying this file object.
        Returns:
        a URI

      • getName

        String getName()
        Gets a user-friendly name for this file object. The exact value returned is not specified but implementations should take care to preserve names as given by the user. For example, if the user writes the filename "BobsApp\Test.java" on the command line, this method should return "BobsApp\Test.java" whereas the toUri method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.
        Returns:
        a user-friendly name

      • openInputStream

        InputStream openInputStream()
                     throws IOException
        Gets an InputStream for this file object.
        Returns:
        an InputStream
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support byte access
        IOException - if an I/O error occurred

      • openOutputStream

        OutputStream openOutputStream()
                       throws IOException
        Gets an OutputStream for this file object.
        Returns:
        an OutputStream
        Throws:
        IllegalStateException - if this file object was opened for reading and does not support writing
        UnsupportedOperationException - if this kind of file object does not support byte access
        IOException - if an I/O error occurred

      • openReader

        Reader openReader(boolean ignoreEncodingErrors)
           throws IOException
        Gets a reader for this object. The returned reader will replace bytes that cannot be decoded with the default translation character. In addition, the reader may report a diagnostic unless ignoreEncodingErrors is true.
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a Reader
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getCharContent

        CharSequence getCharContent(boolean ignoreEncodingErrors)
                     throws IOException
        Gets the character content of this file object, if available. Any byte that cannot be decoded will be replaced by the default translation character. In addition, a diagnostic may be reported unless ignoreEncodingErrors is true.
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a CharSequence if available; null otherwise
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • openWriter

        Writer openWriter()
           throws IOException
        Gets a Writer for this file object.
        Returns:
        a Writer
        Throws:
        IllegalStateException - if this file object was opened for reading and does not support writing
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getLastModified

        long getLastModified()
        Gets the time this file object was last modified. The time is measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
        Returns:
        the time this file object was last modified; or 0 if the file object does not exist, if an I/O error occurred, or if the operation is not supported

      • delete

        boolean delete()
        Deletes this file object. In case of errors, returns false.
        Returns:
        true if and only if this file object is successfully deleted; false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardingFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class ForwardingFileObject<F extends FileObject>

  • java.lang.Object
    • javax.tools.ForwardingFileObject<F>
  • Type Parameters:
    F - the kind of file object forwarded to by this object
    All Implemented Interfaces:
    FileObject
    Direct Known Subclasses:
    ForwardingJavaFileObject

    public class ForwardingFileObject<F extends FileObject>
extends Object
implements FileObject
    Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods.
    Since:
    1.6

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected F fileObject
      The file object which all methods are delegated to.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected ForwardingFileObject(F fileObject)
      Creates a new instance of ForwardingFileObject.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean delete()
      Deletes this file object.
      CharSequence getCharContent(boolean ignoreEncodingErrors)
      Gets the character content of this file object, if available.
      long getLastModified()
      Gets the time this file object was last modified.
      String getName()
      Gets a user-friendly name for this file object.
      InputStream openInputStream()
      Gets an InputStream for this file object.
      OutputStream openOutputStream()
      Gets an OutputStream for this file object.
      Reader openReader(boolean ignoreEncodingErrors)
      Gets a reader for this object.
      Writer openWriter()
      Gets a Writer for this file object.
      URI toUri()
      Returns a URI identifying this file object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • fileObject

        protected final F extends FileObject fileObject
        The file object which all methods are delegated to.

    • Constructor Detail

      • ForwardingFileObject

        protected ForwardingFileObject(F fileObject)
        Creates a new instance of ForwardingFileObject.
        Parameters:
        fileObject - delegate to this file object

    • Method Detail

      • toUri

        public URI toUri()
        Description copied from interface: FileObject
        Returns a URI identifying this file object.
        Specified by:
        toUri in interface FileObject
        Returns:
        a URI

      • getName

        public String getName()
        Description copied from interface: FileObject
        Gets a user-friendly name for this file object. The exact value returned is not specified but implementations should take care to preserve names as given by the user. For example, if the user writes the filename "BobsApp\Test.java" on the command line, this method should return "BobsApp\Test.java" whereas the toUri method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.
        Specified by:
        getName in interface FileObject
        Returns:
        a user-friendly name

      • openInputStream

        public InputStream openInputStream()
                            throws IOException
        Description copied from interface: FileObject
        Gets an InputStream for this file object.
        Specified by:
        openInputStream in interface FileObject
        Returns:
        an InputStream
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support byte access
        IOException - if an I/O error occurred

      • openOutputStream

        public OutputStream openOutputStream()
                              throws IOException
        Description copied from interface: FileObject
        Gets an OutputStream for this file object.
        Specified by:
        openOutputStream in interface FileObject
        Returns:
        an OutputStream
        Throws:
        IllegalStateException - if this file object was opened for reading and does not support writing
        UnsupportedOperationException - if this kind of file object does not support byte access
        IOException - if an I/O error occurred

      • openReader

        public Reader openReader(boolean ignoreEncodingErrors)
                  throws IOException
        Description copied from interface: FileObject
        Gets a reader for this object. The returned reader will replace bytes that cannot be decoded with the default translation character. In addition, the reader may report a diagnostic unless ignoreEncodingErrors is true.
        Specified by:
        openReader in interface FileObject
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a Reader
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getCharContent

        public CharSequence getCharContent(boolean ignoreEncodingErrors)
                            throws IOException
        Description copied from interface: FileObject
        Gets the character content of this file object, if available. Any byte that cannot be decoded will be replaced by the default translation character. In addition, a diagnostic may be reported unless ignoreEncodingErrors is true.
        Specified by:
        getCharContent in interface FileObject
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a CharSequence if available; null otherwise
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • openWriter

        public Writer openWriter()
                  throws IOException
        Description copied from interface: FileObject
        Gets a Writer for this file object.
        Specified by:
        openWriter in interface FileObject
        Returns:
        a Writer
        Throws:
        IllegalStateException - if this file object was opened for reading and does not support writing
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getLastModified

        public long getLastModified()
        Description copied from interface: FileObject
        Gets the time this file object was last modified. The time is measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
        Specified by:
        getLastModified in interface FileObject
        Returns:
        the time this file object was last modified; or 0 if the file object does not exist, if an I/O error occurred, or if the operation is not supported

      • delete

        public boolean delete()
        Description copied from interface: FileObject
        Deletes this file object. In case of errors, returns false.
        Specified by:
        delete in interface FileObject
        Returns:
        true if and only if this file object is successfully deleted; false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardingJavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class ForwardingJavaFileManager<M extends JavaFileManager>

  • java.lang.Object
    • javax.tools.ForwardingJavaFileManager<M>
  • Type Parameters:
    M - the kind of file manager forwarded to by this object
    All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable, JavaFileManager, OptionChecker

    public class ForwardingJavaFileManager<M extends JavaFileManager>
extends Object
implements JavaFileManager
    Forwards calls to a given file manager. Subclasses of this class might override some of these methods and might also provide additional fields and methods.
    Since:
    1.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileManager

        JavaFileManager.Location

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected M fileManager
      The file manager which all methods are delegated to.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected ForwardingJavaFileManager(M fileManager)
      Creates a new instance of ForwardingJavaFileManager.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void close()
      Releases any resources opened by this file manager directly or indirectly.
      void flush()
      Flushes any resources opened for output by this file manager directly or indirectly.
      ClassLoader getClassLoader(JavaFileManager.Location location)
      Gets a class loader for loading plug-ins from the given location.
      FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      Gets a file object for input representing the specified relative name in the specified package in the given location.
      FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Gets a file object for output representing the specified relative name in the specified package in the given location.
      JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      Gets a file object for input representing the specified class of the specified kind in the given location.
      JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      boolean handleOption(String current, Iterator<String> remaining)
      Handles one option.
      boolean hasLocation(JavaFileManager.Location location)
      Determines if a location is known to this file manager.
      String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Infers a binary name of a file object based on a location.
      boolean isSameFile(FileObject a, FileObject b)
      Compares two file objects and return true if they represent the same underlying object.
      int isSupportedOption(String option)
      Determines if the given option is supported and if so, the number of arguments the option takes.
      Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Lists all file objects matching the given criteria in the given location.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • fileManager

        protected final M extends JavaFileManager fileManager
        The file manager which all methods are delegated to.

    • Constructor Detail

      • ForwardingJavaFileManager

        protected ForwardingJavaFileManager(M fileManager)
        Creates a new instance of ForwardingJavaFileManager.
        Parameters:
        fileManager - delegate to this file manager

    • Method Detail

      • getClassLoader

        public ClassLoader getClassLoader(JavaFileManager.Location location)
        Description copied from interface: JavaFileManager
        Gets a class loader for loading plug-ins from the given location. For example, to load annotation processors, a compiler will request a class loader for the ANNOTATION_PROCESSOR_PATH location.
        Specified by:
        getClassLoader in interface JavaFileManager
        Parameters:
        location - a location
        Returns:
        a class loader for the given location; or null if loading plug-ins from the given location is disabled or if the location is not known
        Throws:
        SecurityException - if a class loader can not be created in the current security context
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened

      • list

        public Iterable<JavaFileObject> list(JavaFileManager.Location location,
                                     String packageName,
                                     Set<JavaFileObject.Kind> kinds,
                                     boolean recurse)
                              throws IOException
        Description copied from interface: JavaFileManager
        Lists all file objects matching the given criteria in the given location. List file objects in "subpackages" if recurse is true.

        Note: even if the given location is unknown to this file manager, it may not return null. Also, an unknown location may not cause an exception.

        Specified by:
        list in interface JavaFileManager
        Parameters:
        location - a location
        packageName - a package name
        kinds - return objects only of these kinds
        recurse - if true include "subpackages"
        Returns:
        an Iterable of file objects matching the given criteria
        Throws:
        IOException - if an I/O error occurred, or if JavaFileManager.close() has been called and this file manager cannot be reopened
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened

      • inferBinaryName

        public String inferBinaryName(JavaFileManager.Location location,
                              JavaFileObject file)
        Description copied from interface: JavaFileManager
        Infers a binary name of a file object based on a location. The binary name returned might not be a valid binary name according to The Java™ Language Specification.
        Specified by:
        inferBinaryName in interface JavaFileManager
        Parameters:
        location - a location
        file - a file object
        Returns:
        a binary name or null the file object is not found in the given location
        Throws:
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened

      • isSameFile

        public boolean isSameFile(FileObject a,
                          FileObject b)
        Description copied from interface: JavaFileManager
        Compares two file objects and return true if they represent the same underlying object.
        Specified by:
        isSameFile in interface JavaFileManager
        Parameters:
        a - a file object
        b - a file object
        Returns:
        true if the given file objects represent the same underlying object
        Throws:
        IllegalArgumentException - if either of the arguments were created with another file manager and this file manager does not support foreign file objects

      • handleOption

        public boolean handleOption(String current,
                            Iterator<String> remaining)
        Description copied from interface: JavaFileManager
        Handles one option. If current is an option to this file manager it will consume any arguments to that option from remaining and return true, otherwise return false.
        Specified by:
        handleOption in interface JavaFileManager
        Parameters:
        current - current option
        remaining - remaining options
        Returns:
        true if this option was handled by this file manager, false otherwise
        Throws:
        IllegalArgumentException - if this option to this file manager is used incorrectly
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened

      • hasLocation

        public boolean hasLocation(JavaFileManager.Location location)
        Description copied from interface: JavaFileManager
        Determines if a location is known to this file manager.
        Specified by:
        hasLocation in interface JavaFileManager
        Parameters:
        location - a location
        Returns:
        true if the location is known

      • isSupportedOption

        public int isSupportedOption(String option)
        Description copied from interface: OptionChecker
        Determines if the given option is supported and if so, the number of arguments the option takes.
        Specified by:
        isSupportedOption in interface OptionChecker
        Parameters:
        option - an option
        Returns:
        the number of arguments the given option takes or -1 if the option is not supported

      • getJavaFileForInput

        public JavaFileObject getJavaFileForInput(JavaFileManager.Location location,
                                          String className,
                                          JavaFileObject.Kind kind)
                                   throws IOException
        Description copied from interface: JavaFileManager
        Gets a file object for input representing the specified class of the specified kind in the given location.
        Specified by:
        getJavaFileForInput in interface JavaFileManager
        Parameters:
        location - a location
        className - the name of a class
        kind - the kind of file, must be one of SOURCE or CLASS
        Returns:
        a file object, might return null if the file does not exist
        Throws:
        IllegalArgumentException - if the location is not known to this file manager and the file manager does not support unknown locations, or if the kind is not valid
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened
        IOException - if an I/O error occurred, or if JavaFileManager.close() has been called and this file manager cannot be reopened

      • getJavaFileForOutput

        public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
                                           String className,
                                           JavaFileObject.Kind kind,
                                           FileObject sibling)
                                    throws IOException
        Description copied from interface: JavaFileManager
        Gets a file object for output representing the specified class of the specified kind in the given location.

        Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method.

        Specified by:
        getJavaFileForOutput in interface JavaFileManager
        Parameters:
        location - a location
        className - the name of a class
        kind - the kind of file, must be one of SOURCE or CLASS
        sibling - a file object to be used as hint for placement; might be null
        Returns:
        a file object for output
        Throws:
        IllegalArgumentException - if sibling is not known to this file manager, or if the location is not known to this file manager and the file manager does not support unknown locations, or if the kind is not valid
        IllegalStateException - JavaFileManager.close() has been called and this file manager cannot be reopened
        IOException - if an I/O error occurred, or if JavaFileManager.close() has been called and this file manager cannot be reopened

      • getFileForInput

        public FileObject getFileForInput(JavaFileManager.Location location,
                                  String packageName,
                                  String relativeName)
                           throws IOException
        Description copied from interface: JavaFileManager
        Gets a file object for input representing the specified relative name in the specified package in the given location.

        If the returned object represents a source or class file, it must be an instance of JavaFileObject.

        Informally, the file object returned by this method is located in the concatenation of the location, package name, and relative name. For example, to locate the properties file "resources/compiler.properties" in the package "com.sun.tools.javac" in the SOURCE_PATH location, this method might be called like so:

        getFileForInput(SOURCE_PATH, "com.sun.tools.javac", "resources/compiler.properties");

        If the call was executed on Windows, with SOURCE_PATH set to "C:\Documents and Settings\UncleBob\src\share\classes", a valid result would be a file object representing the file "C:\Documents and Settings\UncleBob\src\share\classes\com\sun\tools\javac\resources\compiler.properties".

        Specified by:
        getFileForInput in interface JavaFileManager
        Parameters:
        location - a location
        packageName - a package name
        relativeName - a relative name
        Returns:
        a file object, might return null if the file does not exist
        Throws:
        IllegalArgumentException - if the location is not known to this file manager and the file manager does not support unknown locations, or if relativeName is not valid
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened
        IOException - if an I/O error occurred, or if JavaFileManager.close() has been called and this file manager cannot be reopened

      • getFileForOutput

        public FileObject getFileForOutput(JavaFileManager.Location location,
                                   String packageName,
                                   String relativeName,
                                   FileObject sibling)
                            throws IOException
        Description copied from interface: JavaFileManager
        Gets a file object for output representing the specified relative name in the specified package in the given location.

        Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method.

        If the returned object represents a source or class file, it must be an instance of JavaFileObject.

        Informally, the file object returned by this method is located in the concatenation of the location, package name, and relative name or next to the sibling argument. See getFileForInput for an example.

        Specified by:
        getFileForOutput in interface JavaFileManager
        Parameters:
        location - a location
        packageName - a package name
        relativeName - a relative name
        sibling - a file object to be used as hint for placement; might be null
        Returns:
        a file object
        Throws:
        IllegalArgumentException - if sibling is not known to this file manager, or if the location is not known to this file manager and the file manager does not support unknown locations, or if relativeName is not valid
        IllegalStateException - if JavaFileManager.close() has been called and this file manager cannot be reopened
        IOException - if an I/O error occurred, or if JavaFileManager.close() has been called and this file manager cannot be reopened

      • flush

        public void flush()
           throws IOException
        Description copied from interface: JavaFileManager
        Flushes any resources opened for output by this file manager directly or indirectly. Flushing a closed file manager has no effect.
        Specified by:
        flush in interface Flushable
        Specified by:
        flush in interface JavaFileManager
        Throws:
        IOException - if an I/O error occurred
        See Also:
        JavaFileManager.close()

      • close

        public void close()
           throws IOException
        Description copied from interface: JavaFileManager
        Releases any resources opened by this file manager directly or indirectly. This might render this file manager useless and the effect of subsequent calls to methods on this object or any objects obtained through this object is undefined unless explicitly allowed. However, closing a file manager which has already been closed has no effect.
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface JavaFileManager
        Throws:
        IOException - if an I/O error occurred
        See Also:
        JavaFileManager.flush()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardingJavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class ForwardingJavaFileObject<F extends JavaFileObject>

  • java.lang.Object
    • javax.tools.ForwardingFileObject<F>
      • javax.tools.ForwardingJavaFileObject<F>
  • Type Parameters:
    F - the kind of file object forwarded to by this object
    All Implemented Interfaces:
    FileObject, JavaFileObject

    public class ForwardingJavaFileObject<F extends JavaFileObject>
extends ForwardingFileObject<F>
implements JavaFileObject
    Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods.
    Since:
    1.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileObject

        JavaFileObject.Kind

    • Field Summary

      • Fields inherited from class javax.tools.ForwardingFileObject

        fileObject

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected ForwardingJavaFileObject(F fileObject)
      Creates a new instance of ForwardingJavaFileObject.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Modifier getAccessLevel()
      Provides a hint about the access level of the class represented by this file object.
      JavaFileObject.Kind getKind()
      Gets the kind of this file object.
      NestingKind getNestingKind()
      Provides a hint about the nesting level of the class represented by this file object.
      boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      Checks if this file object is compatible with the specified simple name and kind.

      • Methods inherited from class javax.tools.ForwardingFileObject

        delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.tools.FileObject

        delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri

    • Constructor Detail

      • ForwardingJavaFileObject

        protected ForwardingJavaFileObject(F fileObject)
        Creates a new instance of ForwardingJavaFileObject.
        Parameters:
        fileObject - delegate to this file object

    • Method Detail

      • getKind

        public JavaFileObject.Kind getKind()
        Description copied from interface: JavaFileObject
        Gets the kind of this file object.
        Specified by:
        getKind in interface JavaFileObject
        Returns:
        the kind

      • isNameCompatible

        public boolean isNameCompatible(String simpleName,
                                JavaFileObject.Kind kind)
        Description copied from interface: JavaFileObject
        Checks if this file object is compatible with the specified simple name and kind. A simple name is a single identifier (not qualified) as defined in The Java™ Language Specification, section 6.2 "Names and Identifiers".
        Specified by:
        isNameCompatible in interface JavaFileObject
        Parameters:
        simpleName - a simple name of a class
        kind - a kind
        Returns:
        true if this file object is compatible; false otherwise

      • getNestingKind

        public NestingKind getNestingKind()
        Description copied from interface: JavaFileObject
        Provides a hint about the nesting level of the class represented by this file object. This method may return NestingKind.MEMBER to mean NestingKind.LOCAL or NestingKind.ANONYMOUS. If the nesting level is not known or this file object does not represent a class file this method returns null.
        Specified by:
        getNestingKind in interface JavaFileObject
        Returns:
        the nesting kind, or null if the nesting kind is not known

      • getAccessLevel

        public Modifier getAccessLevel()
        Description copied from interface: JavaFileObject
        Provides a hint about the access level of the class represented by this file object. If the access level is not known or if this file object does not represent a class file this method returns null.
        Specified by:
        getAccessLevel in interface JavaFileObject
        Returns:
        the access level
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaCompiler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface JavaCompiler

  • All Superinterfaces:
    OptionChecker, Tool

    public interface JavaCompiler
extends Tool, OptionChecker
    Interface to invoke Java™ programming language compilers from programs.

    The compiler might generate diagnostics during compilation (for example, error messages). If a diagnostic listener is provided, the diagnostics will be supplied to the listener. If no listener is provided, the diagnostics will be formatted in an unspecified format and written to the default output, which is System.err unless otherwise specified. Even if a diagnostic listener is supplied, some diagnostics might not fit in a Diagnostic and will be written to the default output.

    A compiler tool has an associated standard file manager, which is the file manager that is native to the tool (or built-in). The standard file manager can be obtained by calling getStandardFileManager.

    A compiler tool must function with any file manager as long as any additional requirements as detailed in the methods below are met. If no file manager is provided, the compiler tool will use a standard file manager such as the one returned by getStandardFileManager.

    An instance implementing this interface must conform to The Java™ Language Specification and generate class files conforming to The Java™ Virtual Machine Specification. The versions of these specifications are defined in the Tool interface. Additionally, an instance of this interface supporting SourceVersion.RELEASE_6 or higher must also support annotation processing.

    The compiler relies on two services: diagnostic listener and file manager. Although most classes and interfaces in this package defines an API for compilers (and tools in general) the interfaces DiagnosticListener, JavaFileManager, FileObject, and JavaFileObject are not intended to be used in applications. Instead these interfaces are intended to be implemented and used to provide customized services for a compiler and thus defines an SPI for compilers.

    There are a number of classes and interfaces in this package which are designed to ease the implementation of the SPI to customize the behavior of a compiler:

    StandardJavaFileManager
    Every compiler which implements this interface provides a standard file manager for operating on regular files. The StandardJavaFileManager interface defines additional methods for creating file objects from regular files.

    The standard file manager serves two purposes:

    • basic building block for customizing how a compiler reads and writes files
    • sharing between multiple compilation tasks

    Reusing a file manager can potentially reduce overhead of scanning the file system and reading jar files. Although there might be no reduction in overhead, a standard file manager must work with multiple sequential compilations making the following example a recommended coding pattern:

           File[] files1 = ... ; // input for first compilation task
       File[] files2 = ... ; // input for second compilation task

       JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
       StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);

        Iterable<? extends JavaFileObject> compilationUnits1 =
           fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files1));
       compiler.getTask(null, fileManager, null, null, null, compilationUnits1).call();

        Iterable<? extends JavaFileObject> compilationUnits2 =
           fileManager.getJavaFileObjects(files2); // use alternative method
       // reuse the same file manager to allow caching of jar files
       compiler.getTask(null, fileManager, null, null, null, compilationUnits2).call();

       fileManager.close();
    DiagnosticCollector
    Used to collect diagnostics in a list, for example:
            Iterable<? extends JavaFileObject> compilationUnits = ...;
       JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
       StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
       compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnits).call();

       for ( Diagnostic<? extends JavaFileObject> diagnostic : diagnostics.getDiagnostics())
           System.out.format("Error on line %d in %s%n",
                             diagnostic.getLineNumber(),
                             diagnostic.getSource().toUri());

       fileManager.close();
    ForwardingJavaFileManager, ForwardingFileObject, and ForwardingJavaFileObject
    Subclassing is not available for overriding the behavior of a standard file manager as it is created by calling a method on a compiler, not by invoking a constructor. Instead forwarding (or delegation) should be used. These classes makes it easy to forward most calls to a given file manager or file object while allowing customizing behavior. For example, consider how to log all calls to JavaFileManager.flush():
           final Logger logger = ...;
        Iterable<? extends JavaFileObject> compilationUnits = ...;
       JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
       StandardJavaFileManager stdFileManager = compiler.getStandardFileManager(null, null, null);
       JavaFileManager fileManager = new ForwardingJavaFileManager(stdFileManager) {
           public void flush() throws IOException {
               logger.entering(StandardJavaFileManager.class.getName(), "flush");
               super.flush();
               logger.exiting(StandardJavaFileManager.class.getName(), "flush");
           }
       };
       compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();
    SimpleJavaFileObject
    This class provides a basic file object implementation which can be used as building block for creating file objects. For example, here is how to define a file object which represent source code stored in a string:
           /**
        * A file object used to represent source coming from a string.
         */
       public class JavaSourceFromString extends SimpleJavaFileObject {
           /**
            * The source code of this "file".
             */
           final String code;

           /**
            * Constructs a new JavaSourceFromString.
            *  @param name the name of the compilation unit represented by this file object
            *  @param code the source code for the compilation unit represented by this file object
             */
           JavaSourceFromString(String name, String code) {
               super(URI.create("string:///" + name.replace('.','/') + Kind.SOURCE.extension),
                     Kind.SOURCE);
               this.code = code;
           }

            @Override
           public CharSequence getCharContent(boolean ignoreEncodingErrors) {
               return code;
           }
       }
    Since:
    1.6
    See Also:
    DiagnosticListener, Diagnostic, JavaFileManager

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  JavaCompiler.CompilationTask
      Interface representing a future for a compilation task.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
      Gets a new instance of the standard file manager implementation for this tool.
      JavaCompiler.CompilationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits)
      Creates a future for a compilation task with the given components and arguments.

      • Methods inherited from interface javax.tools.Tool

        getSourceVersions, run

      • Methods inherited from interface javax.tools.OptionChecker

        isSupportedOption

    • Method Detail

      • getTask

        JavaCompiler.CompilationTask getTask(Writer out,
                                     JavaFileManager fileManager,
                                     DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                     Iterable<String> options,
                                     Iterable<String> classes,
                                     Iterable<? extends JavaFileObject> compilationUnits)
        Creates a future for a compilation task with the given components and arguments. The compilation might not have completed as described in the CompilationTask interface.

        If a file manager is provided, it must be able to handle all locations defined in StandardLocation.

        Note that annotation processing can process both the compilation units of source code to be compiled, passed with the compilationUnits parameter, as well as class files, whose names are passed with the classes parameter.

        Parameters:
        out - a Writer for additional output from the compiler; use System.err if null
        fileManager - a file manager; if null use the compiler's standard filemanager
        diagnosticListener - a diagnostic listener; if null use the compiler's default method for reporting diagnostics
        options - compiler options, null means no options
        classes - names of classes to be processed by annotation processing, null means no class names
        compilationUnits - the compilation units to compile, null means no compilation units
        Returns:
        an object representing the compilation
        Throws:
        RuntimeException - if an unrecoverable error occurred in a user supplied component. The cause will be the error in user code.
        IllegalArgumentException - if any of the options are invalid, or if any of the given compilation units are of other kind than source

      • getStandardFileManager

        StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                               Locale locale,
                                               Charset charset)
        Gets a new instance of the standard file manager implementation for this tool. The file manager will use the given diagnostic listener for producing any non-fatal diagnostics. Fatal errors will be signaled with the appropriate exceptions.

        The standard file manager will be automatically reopened if it is accessed after calls to flush or close. The standard file manager must be usable with other tools.

        Parameters:
        diagnosticListener - a diagnostic listener for non-fatal diagnostics; if null use the compiler's default method for reporting diagnostics
        locale - the locale to apply when formatting diagnostics; null means the default locale.
        charset - the character set used for decoding bytes; if null use the platform default
        Returns:
        the standard file manager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaCompiler.CompilationTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface JavaCompiler.CompilationTask

  • All Superinterfaces:
    Callable<Boolean>
    Enclosing interface:
    JavaCompiler

    public static interface JavaCompiler.CompilationTask
extends Callable<Boolean>
    Interface representing a future for a compilation task. The compilation task has not yet started. To start the task, call the call method.

    Before calling the call method, additional aspects of the task can be configured, for example, by calling the setProcessors method.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Boolean call()
      Performs this compilation task.
      void setLocale(Locale locale)
      Set the locale to be applied when formatting diagnostics and other localized data.
      void setProcessors(Iterable<? extends Processor> processors)
      Sets processors (for annotation processing).

    • Method Detail

      • setProcessors

        void setProcessors(Iterable<? extends Processor> processors)
        Sets processors (for annotation processing). This will bypass the normal discovery mechanism.
        Parameters:
        processors - processors (for annotation processing)
        Throws:
        IllegalStateException - if the task has started

      • setLocale

        void setLocale(Locale locale)
        Set the locale to be applied when formatting diagnostics and other localized data.
        Parameters:
        locale - the locale to apply; null means apply no locale
        Throws:
        IllegalStateException - if the task has started

      • call

        Boolean call()
        Performs this compilation task. The compilation may only be performed once. Subsequent calls to this method throw IllegalStateException.
        Specified by:
        call in interface Callable<Boolean>
        Returns:
        true if and only all the files compiled without errors; false otherwise
        Throws:
        RuntimeException - if an unrecoverable error occurred in a user-supplied component. The cause will be the error in user code.
        IllegalStateException - if called more than once
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface JavaFileManager

  • All Superinterfaces:
    AutoCloseable, Closeable, Flushable, OptionChecker
    All Known Subinterfaces:
    StandardJavaFileManager
    All Known Implementing Classes:
    ForwardingJavaFileManager

    public interface JavaFileManager
extends Closeable, Flushable, OptionChecker
    File manager for tools operating on Java™ programming language source and class files. In this context, file means an abstraction of regular files and other sources of data.

    When constructing new JavaFileObjects, the file manager must determine where to create them. For example, if a file manager manages regular files on a file system, it would most likely have a current/working directory to use as default location when creating or finding files. A number of hints can be provided to a file manager as to where to create files. Any file manager might choose to ignore these hints.

    Some methods in this interface use class names. Such class names must be given in the Java Virtual Machine internal form of fully qualified class and interface names. For convenience '.' and '/' are interchangeable. The internal form is defined in chapter four of The Java™ Virtual Machine Specification.

    Discussion: this means that the names "java/lang.package-info", "java/lang/package-info", "java.lang.package-info", are valid and equivalent. Compare to binary name as defined in The Java™ Language Specification, section 13.1 "The Form of a Binary".

    The case of names is significant. All names should be treated as case-sensitive. For example, some file systems have case-insensitive, case-aware file names. File objects representing such files should take care to preserve case by using File.getCanonicalFile() or similar means. If the system is not case-aware, file objects must use other means to preserve case.

    Relative names: some methods in this interface use relative names. A relative name is a non-null, non-empty sequence of path segments separated by '/'. '.' or '..' are invalid path segments. A valid relative name must match the "path-rootless" rule of RFC 3986, section 3.3. Informally, this should be true:

      URI.create(relativeName).normalize().getPath().equals(relativeName)

    All methods in this interface might throw a SecurityException.

    An object of this interface is not required to support multi-threaded access, that is, be synchronized. However, it must support concurrent access to different file objects created by this object.

    Implementation note: a consequence of this requirement is that a trivial implementation of output to a JarOutputStream is not a sufficient implementation. That is, rather than creating a JavaFileObject that returns the JarOutputStream directly, the contents must be cached until closed and then written to the JarOutputStream.

    Unless explicitly allowed, all methods in this interface might throw a NullPointerException if given a null argument.

    Since:
    1.6
    See Also:
    JavaFileObject, FileObject

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  JavaFileManager.Location
      Interface for locations of file objects.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void close()
      Releases any resources opened by this file manager directly or indirectly.
      void flush()
      Flushes any resources opened for output by this file manager directly or indirectly.
      ClassLoader getClassLoader(JavaFileManager.Location location)
      Gets a class loader for loading plug-ins from the given location.
      FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
      Gets a file object for input representing the specified relative name in the specified package in the given location.
      FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
      Gets a file object for output representing the specified relative name in the specified package in the given location.
      JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
      Gets a file object for input representing the specified class of the specified kind in the given location.
      JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
      Gets a file object for output representing the specified class of the specified kind in the given location.
      boolean handleOption(String current, Iterator<String> remaining)
      Handles one option.
      boolean hasLocation(JavaFileManager.Location location)
      Determines if a location is known to this file manager.
      String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
      Infers a binary name of a file object based on a location.
      boolean isSameFile(FileObject a, FileObject b)
      Compares two file objects and return true if they represent the same underlying object.
      Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
      Lists all file objects matching the given criteria in the given location.

      • Methods inherited from interface javax.tools.OptionChecker

        isSupportedOption

    • Method Detail

      • getClassLoader

        ClassLoader getClassLoader(JavaFileManager.Location location)
        Gets a class loader for loading plug-ins from the given location. For example, to load annotation processors, a compiler will request a class loader for the ANNOTATION_PROCESSOR_PATH location.
        Parameters:
        location - a location
        Returns:
        a class loader for the given location; or null if loading plug-ins from the given location is disabled or if the location is not known
        Throws:
        SecurityException - if a class loader can not be created in the current security context
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • list

        Iterable<JavaFileObject> list(JavaFileManager.Location location,
                              String packageName,
                              Set<JavaFileObject.Kind> kinds,
                              boolean recurse)
                       throws IOException
        Lists all file objects matching the given criteria in the given location. List file objects in "subpackages" if recurse is true.

        Note: even if the given location is unknown to this file manager, it may not return null. Also, an unknown location may not cause an exception.

        Parameters:
        location - a location
        packageName - a package name
        kinds - return objects only of these kinds
        recurse - if true include "subpackages"
        Returns:
        an Iterable of file objects matching the given criteria
        Throws:
        IOException - if an I/O error occurred, or if close() has been called and this file manager cannot be reopened
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • inferBinaryName

        String inferBinaryName(JavaFileManager.Location location,
                       JavaFileObject file)
        Infers a binary name of a file object based on a location. The binary name returned might not be a valid binary name according to The Java™ Language Specification.
        Parameters:
        location - a location
        file - a file object
        Returns:
        a binary name or null the file object is not found in the given location
        Throws:
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • isSameFile

        boolean isSameFile(FileObject a,
                   FileObject b)
        Compares two file objects and return true if they represent the same underlying object.
        Parameters:
        a - a file object
        b - a file object
        Returns:
        true if the given file objects represent the same underlying object
        Throws:
        IllegalArgumentException - if either of the arguments were created with another file manager and this file manager does not support foreign file objects

      • handleOption

        boolean handleOption(String current,
                     Iterator<String> remaining)
        Handles one option. If current is an option to this file manager it will consume any arguments to that option from remaining and return true, otherwise return false.
        Parameters:
        current - current option
        remaining - remaining options
        Returns:
        true if this option was handled by this file manager, false otherwise
        Throws:
        IllegalArgumentException - if this option to this file manager is used incorrectly
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • hasLocation

        boolean hasLocation(JavaFileManager.Location location)
        Determines if a location is known to this file manager.
        Parameters:
        location - a location
        Returns:
        true if the location is known

      • getJavaFileForInput

        JavaFileObject getJavaFileForInput(JavaFileManager.Location location,
                                   String className,
                                   JavaFileObject.Kind kind)
                            throws IOException
        Gets a file object for input representing the specified class of the specified kind in the given location.
        Parameters:
        location - a location
        className - the name of a class
        kind - the kind of file, must be one of SOURCE or CLASS
        Returns:
        a file object, might return null if the file does not exist
        Throws:
        IllegalArgumentException - if the location is not known to this file manager and the file manager does not support unknown locations, or if the kind is not valid
        IOException - if an I/O error occurred, or if close() has been called and this file manager cannot be reopened
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • getJavaFileForOutput

        JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
                                    String className,
                                    JavaFileObject.Kind kind,
                                    FileObject sibling)
                             throws IOException
        Gets a file object for output representing the specified class of the specified kind in the given location.

        Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method.

        Parameters:
        location - a location
        className - the name of a class
        kind - the kind of file, must be one of SOURCE or CLASS
        sibling - a file object to be used as hint for placement; might be null
        Returns:
        a file object for output
        Throws:
        IllegalArgumentException - if sibling is not known to this file manager, or if the location is not known to this file manager and the file manager does not support unknown locations, or if the kind is not valid
        IOException - if an I/O error occurred, or if close() has been called and this file manager cannot be reopened
        IllegalStateException - close() has been called and this file manager cannot be reopened

      • getFileForInput

        FileObject getFileForInput(JavaFileManager.Location location,
                           String packageName,
                           String relativeName)
                    throws IOException
        Gets a file object for input representing the specified relative name in the specified package in the given location.

        If the returned object represents a source or class file, it must be an instance of JavaFileObject.

        Informally, the file object returned by this method is located in the concatenation of the location, package name, and relative name. For example, to locate the properties file "resources/compiler.properties" in the package "com.sun.tools.javac" in the SOURCE_PATH location, this method might be called like so:

        getFileForInput(SOURCE_PATH, "com.sun.tools.javac", "resources/compiler.properties");

        If the call was executed on Windows, with SOURCE_PATH set to "C:\Documents and Settings\UncleBob\src\share\classes", a valid result would be a file object representing the file "C:\Documents and Settings\UncleBob\src\share\classes\com\sun\tools\javac\resources\compiler.properties".

        Parameters:
        location - a location
        packageName - a package name
        relativeName - a relative name
        Returns:
        a file object, might return null if the file does not exist
        Throws:
        IllegalArgumentException - if the location is not known to this file manager and the file manager does not support unknown locations, or if relativeName is not valid
        IOException - if an I/O error occurred, or if close() has been called and this file manager cannot be reopened
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • getFileForOutput

        FileObject getFileForOutput(JavaFileManager.Location location,
                            String packageName,
                            String relativeName,
                            FileObject sibling)
                     throws IOException
        Gets a file object for output representing the specified relative name in the specified package in the given location.

        Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method.

        If the returned object represents a source or class file, it must be an instance of JavaFileObject.

        Informally, the file object returned by this method is located in the concatenation of the location, package name, and relative name or next to the sibling argument. See getFileForInput for an example.

        Parameters:
        location - a location
        packageName - a package name
        relativeName - a relative name
        sibling - a file object to be used as hint for placement; might be null
        Returns:
        a file object
        Throws:
        IllegalArgumentException - if sibling is not known to this file manager, or if the location is not known to this file manager and the file manager does not support unknown locations, or if relativeName is not valid
        IOException - if an I/O error occurred, or if close() has been called and this file manager cannot be reopened
        IllegalStateException - if close() has been called and this file manager cannot be reopened

      • flush

        void flush()
    throws IOException
        Flushes any resources opened for output by this file manager directly or indirectly. Flushing a closed file manager has no effect.
        Specified by:
        flush in interface Flushable
        Throws:
        IOException - if an I/O error occurred
        See Also:
        close()

      • close

        void close()
    throws IOException
        Releases any resources opened by this file manager directly or indirectly. This might render this file manager useless and the effect of subsequent calls to methods on this object or any objects obtained through this object is undefined unless explicitly allowed. However, closing a file manager which has already been closed has no effect.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Throws:
        IOException - if an I/O error occurred
        See Also:
        flush()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaFileManager.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface JavaFileManager.Location

  • All Known Implementing Classes:
    DocumentationTool.Location, StandardLocation
    Enclosing interface:
    JavaFileManager

    public static interface JavaFileManager.Location
    Interface for locations of file objects. Used by file managers to determine where to place or search for file objects.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      Gets the name of this location.
      boolean isOutputLocation()
      Determines if this is an output location.

    • Method Detail

      • getName

        String getName()
        Gets the name of this location.
        Returns:
        a name

      • isOutputLocation

        boolean isOutputLocation()
        Determines if this is an output location. An output location is a location that is conventionally used for output.
        Returns:
        true if this is an output location, false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface JavaFileObject

  • All Superinterfaces:
    FileObject
    All Known Implementing Classes:
    ForwardingJavaFileObject, SimpleJavaFileObject

    public interface JavaFileObject
extends FileObject
    File abstraction for tools operating on Java™ programming language source and class files.

    All methods in this interface might throw a SecurityException if a security exception occurs.

    Unless explicitly allowed, all methods in this interface might throw a NullPointerException if given a null argument.

    Since:
    1.6
    See Also:
    JavaFileManager

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  JavaFileObject.Kind
      Kinds of JavaFileObjects.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Modifier getAccessLevel()
      Provides a hint about the access level of the class represented by this file object.
      JavaFileObject.Kind getKind()
      Gets the kind of this file object.
      NestingKind getNestingKind()
      Provides a hint about the nesting level of the class represented by this file object.
      boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      Checks if this file object is compatible with the specified simple name and kind.

      • Methods inherited from interface javax.tools.FileObject

        delete, getCharContent, getLastModified, getName, openInputStream, openOutputStream, openReader, openWriter, toUri

    • Method Detail

      • getKind

        JavaFileObject.Kind getKind()
        Gets the kind of this file object.
        Returns:
        the kind

      • isNameCompatible

        boolean isNameCompatible(String simpleName,
                         JavaFileObject.Kind kind)
        Checks if this file object is compatible with the specified simple name and kind. A simple name is a single identifier (not qualified) as defined in The Java™ Language Specification, section 6.2 "Names and Identifiers".
        Parameters:
        simpleName - a simple name of a class
        kind - a kind
        Returns:
        true if this file object is compatible; false otherwise

      • getNestingKind

        NestingKind getNestingKind()
        Provides a hint about the nesting level of the class represented by this file object. This method may return NestingKind.MEMBER to mean NestingKind.LOCAL or NestingKind.ANONYMOUS. If the nesting level is not known or this file object does not represent a class file this method returns null.
        Returns:
        the nesting kind, or null if the nesting kind is not known

      • getAccessLevel

        Modifier getAccessLevel()
        Provides a hint about the access level of the class represented by this file object. If the access level is not known or if this file object does not represent a class file this method returns null.
        Returns:
        the access level
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JavaFileObject.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
compact3
javax.tools

Enum JavaFileObject.Kind

  • java.lang.Object
    • java.lang.Enum<JavaFileObject.Kind>
      • javax.tools.JavaFileObject.Kind
  • All Implemented Interfaces:
    Serializable, Comparable<JavaFileObject.Kind>
    Enclosing interface:
    JavaFileObject

    public static enum JavaFileObject.Kind
extends Enum<JavaFileObject.Kind>
    Kinds of JavaFileObjects.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      CLASS
      Class files for the Java Virtual Machine.
      HTML
      HTML files.
      OTHER
      Any other kind.
      SOURCE
      Source files written in the Java programming language.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String extension
      The extension which (by convention) is normally used for this kind of file object.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static JavaFileObject.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static JavaFileObject.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • SOURCE

        public static final JavaFileObject.Kind SOURCE
        Source files written in the Java programming language. For example, regular files ending with .java.

      • CLASS

        public static final JavaFileObject.Kind CLASS
        Class files for the Java Virtual Machine. For example, regular files ending with .class.

      • HTML

        public static final JavaFileObject.Kind HTML
        HTML files. For example, regular files ending with .html.

      • OTHER

        public static final JavaFileObject.Kind OTHER
        Any other kind.

    • Field Detail

      • extension

        public final String extension
        The extension which (by convention) is normally used for this kind of file object. If no convention exists, the empty string ("") is used.

    • Method Detail

      • values

        public static JavaFileObject.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JavaFileObject.Kind c : JavaFileObject.Kind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static JavaFileObject.Kind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OptionChecker

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface OptionChecker

  • All Known Subinterfaces:
    DocumentationTool, JavaCompiler, JavaFileManager, StandardJavaFileManager
    All Known Implementing Classes:
    ForwardingJavaFileManager

    public interface OptionChecker
    Interface for recognizing options.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int isSupportedOption(String option)
      Determines if the given option is supported and if so, the number of arguments the option takes.

    • Method Detail

      • isSupportedOption

        int isSupportedOption(String option)
        Determines if the given option is supported and if so, the number of arguments the option takes.
        Parameters:
        option - an option
        Returns:
        the number of arguments the given option takes or -1 if the option is not supported
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SimpleJavaFileObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class SimpleJavaFileObject

  • java.lang.Object
    • javax.tools.SimpleJavaFileObject
  • All Implemented Interfaces:
    FileObject, JavaFileObject

    public class SimpleJavaFileObject
extends Object
implements JavaFileObject
    Provides simple implementations for most methods in JavaFileObject. This class is designed to be subclassed and used as a basis for JavaFileObject implementations. Subclasses can override the implementation and specification of any method of this class as long as the general contract of JavaFileObject is obeyed.
    Since:
    1.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileObject

        JavaFileObject.Kind

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected JavaFileObject.Kind kind
      The kind of this file object.
      protected URI uri
      A URI for this file object.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SimpleJavaFileObject(URI uri, JavaFileObject.Kind kind)
      Construct a SimpleJavaFileObject of the given kind and with the given URI.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean delete()
      This implementation does nothing.
      Modifier getAccessLevel()
      This implementation returns null.
      CharSequence getCharContent(boolean ignoreEncodingErrors)
      This implementation always throws UnsupportedOperationException.
      JavaFileObject.Kind getKind()
      Gets the kind of this file object.
      long getLastModified()
      This implementation returns 0L.
      String getName()
      Gets a user-friendly name for this file object.
      NestingKind getNestingKind()
      This implementation returns null.
      boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
      This implementation compares the path of its URI to the given simple name.
      InputStream openInputStream()
      This implementation always throws UnsupportedOperationException.
      OutputStream openOutputStream()
      This implementation always throws UnsupportedOperationException.
      Reader openReader(boolean ignoreEncodingErrors)
      Wraps the result of getCharContent(boolean) in a Reader.
      Writer openWriter()
      Wraps the result of openOutputStream in a Writer.
      String toString()
      Returns a string representation of the object.
      URI toUri()
      Returns a URI identifying this file object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • uri

        protected final URI uri
        A URI for this file object.

      • kind

        protected final JavaFileObject.Kind kind
        The kind of this file object.

    • Constructor Detail

      • SimpleJavaFileObject

        protected SimpleJavaFileObject(URI uri,
                               JavaFileObject.Kind kind)
        Construct a SimpleJavaFileObject of the given kind and with the given URI.
        Parameters:
        uri - the URI for this file object
        kind - the kind of this file object

    • Method Detail

      • toUri

        public URI toUri()
        Description copied from interface: FileObject
        Returns a URI identifying this file object.
        Specified by:
        toUri in interface FileObject
        Returns:
        a URI

      • getName

        public String getName()
        Description copied from interface: FileObject
        Gets a user-friendly name for this file object. The exact value returned is not specified but implementations should take care to preserve names as given by the user. For example, if the user writes the filename "BobsApp\Test.java" on the command line, this method should return "BobsApp\Test.java" whereas the toUri method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.
        Specified by:
        getName in interface FileObject
        Returns:
        a user-friendly name

      • openInputStream

        public InputStream openInputStream()
                            throws IOException
        This implementation always throws UnsupportedOperationException. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        openInputStream in interface FileObject
        Returns:
        an InputStream
        Throws:
        IOException - if an I/O error occurred

      • openOutputStream

        public OutputStream openOutputStream()
                              throws IOException
        This implementation always throws UnsupportedOperationException. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        openOutputStream in interface FileObject
        Returns:
        an OutputStream
        Throws:
        IOException - if an I/O error occurred

      • openReader

        public Reader openReader(boolean ignoreEncodingErrors)
                  throws IOException
        Wraps the result of getCharContent(boolean) in a Reader. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        openReader in interface FileObject
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a Reader wrapping the result of getCharContent
        Throws:
        IllegalStateException - if this file object was opened for writing and does not support reading
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getCharContent

        public CharSequence getCharContent(boolean ignoreEncodingErrors)
                            throws IOException
        This implementation always throws UnsupportedOperationException. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        getCharContent in interface FileObject
        Parameters:
        ignoreEncodingErrors - ignore encoding errors if true
        Returns:
        a CharSequence if available; null otherwise
        Throws:
        IOException - if an I/O error occurred

      • openWriter

        public Writer openWriter()
                  throws IOException
        Wraps the result of openOutputStream in a Writer. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        openWriter in interface FileObject
        Returns:
        a Writer wrapping the result of openOutputStream
        Throws:
        IllegalStateException - if this file object was opened for reading and does not support writing
        UnsupportedOperationException - if this kind of file object does not support character access
        IOException - if an I/O error occurred

      • getLastModified

        public long getLastModified()
        This implementation returns 0L. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        getLastModified in interface FileObject
        Returns:
        0L

      • delete

        public boolean delete()
        This implementation does nothing. Subclasses can change this behavior as long as the contract of FileObject is obeyed.
        Specified by:
        delete in interface FileObject
        Returns:
        false

      • getKind

        public JavaFileObject.Kind getKind()
        Description copied from interface: JavaFileObject
        Gets the kind of this file object.
        Specified by:
        getKind in interface JavaFileObject
        Returns:
        this.kind

      • isNameCompatible

        public boolean isNameCompatible(String simpleName,
                                JavaFileObject.Kind kind)
        This implementation compares the path of its URI to the given simple name. This method returns true if the given kind is equal to the kind of this object, and if the path is equal to simpleName + kind.extension or if it ends with "/" + simpleName + kind.extension.

        This method calls getKind() and toUri() and does not access the fields uri and kind directly.

        Subclasses can change this behavior as long as the contract of JavaFileObject is obeyed.

        Specified by:
        isNameCompatible in interface JavaFileObject
        Parameters:
        simpleName - a simple name of a class
        kind - a kind
        Returns:
        true if this file object is compatible; false otherwise

      • getNestingKind

        public NestingKind getNestingKind()
        This implementation returns null. Subclasses can change this behavior as long as the contract of JavaFileObject is obeyed.
        Specified by:
        getNestingKind in interface JavaFileObject
        Returns:
        the nesting kind, or null if the nesting kind is not known

      • getAccessLevel

        public Modifier getAccessLevel()
        This implementation returns null. Subclasses can change this behavior as long as the contract of JavaFileObject is obeyed.
        Specified by:
        getAccessLevel in interface JavaFileObject
        Returns:
        the access level

      • toString

        public String toString()
        Description copied from class: Object
        Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

        The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

         getClass().getName() + '@' + Integer.toHexString(hashCode())
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StandardJavaFileManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface StandardJavaFileManager

  • All Superinterfaces:
    AutoCloseable, Closeable, Flushable, JavaFileManager, OptionChecker

    public interface StandardJavaFileManager
extends JavaFileManager
    File manager based on java.io.File. A common way to obtain an instance of this class is using getStandardFileManager, for example:
       JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    DiagnosticCollector<JavaFileObject> diagnostics =
       new  DiagnosticCollector<JavaFileObject>();
   StandardJavaFileManager fm = compiler.getStandardFileManager(diagnostics, null, null);
    This file manager creates file objects representing regular files, zip file entries, or entries in similar file system based containers. Any file object returned from a file manager implementing this interface must observe the following behavior:
    • File names need not be canonical.
    • For file objects representing regular files
      • the method FileObject.delete() is equivalent to File.delete(),
      • the method FileObject.getLastModified() is equivalent to File.lastModified(),
      • the methods FileObject.getCharContent(boolean), FileObject.openInputStream(), and FileObject.openReader(boolean) must succeed if the following would succeed (ignoring encoding issues):
        new FileInputStream(new File(fileObject.toUri()))
      • and the methods FileObject.openOutputStream(), and FileObject.openWriter() must succeed if the following would succeed (ignoring encoding issues):
        new FileOutputStream(new File(fileObject.toUri()))
    • The URI returned from FileObject.toUri()
      • must be absolute (have a schema), and
      • must have a normalized path component which can be resolved without any process-specific context such as the current directory (file names must be absolute).
    According to these rules, the following URIs, for example, are allowed:
    • file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java
    • jar:///C:/Documents%20and%20Settings/UncleBob/lib/vendorA.jar!com/vendora/LibraryClass.class
    Whereas these are not (reason in parentheses):
    • file:BobsApp/Test.java (the file name is relative and depend on the current directory)
    • jar:lib/vendorA.jar!com/vendora/LibraryClass.class (the first half of the path depends on the current directory, whereas the component after ! is legal)
    • Test.java (this URI depends on the current directory and does not have a schema)
    • jar:///C:/Documents%20and%20Settings/UncleBob/BobsApp/../lib/vendorA.jar!com/vendora/LibraryClass.class (the path is not normalized)
    Since:
    1.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileManager

        JavaFileManager.Location

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
      Gets file objects representing the given files.
      Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
      Gets file objects representing the given file names.
      Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
      Gets file objects representing the given files.
      Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
      Gets file objects representing the given file names.
      Iterable<? extends File> getLocation(JavaFileManager.Location location)
      Gets the path associated with the given location.
      boolean isSameFile(FileObject a, FileObject b)
      Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
      void setLocation(JavaFileManager.Location location, Iterable<? extends File> path)
      Associates the given path with the given location.

      • Methods inherited from interface javax.tools.JavaFileManager

        close, flush, getClassLoader, getFileForInput, getFileForOutput, getJavaFileForInput, getJavaFileForOutput, handleOption, hasLocation, inferBinaryName, list

      • Methods inherited from interface javax.tools.OptionChecker

        isSupportedOption

    • Method Detail

      • isSameFile

        boolean isSameFile(FileObject a,
                   FileObject b)
        Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
        Specified by:
        isSameFile in interface JavaFileManager
        Parameters:
        a - a file object
        b - a file object
        Returns:
        true if the given file objects represent the same canonical file or zip file entry; false otherwise
        Throws:
        IllegalArgumentException - if either of the arguments were created with another file manager implementation

      • getJavaFileObjectsFromFiles

        Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
        Gets file objects representing the given files.
        Parameters:
        files - a list of files
        Returns:
        a list of file objects
        Throws:
        IllegalArgumentException - if the list of files includes a directory

      • getJavaFileObjects

        Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
        Gets file objects representing the given files. Convenience method equivalent to:
             getJavaFileObjectsFromFiles(Arrays.asList(files))
        Parameters:
        files - an array of files
        Returns:
        a list of file objects
        Throws:
        IllegalArgumentException - if the array of files includes a directory
        NullPointerException - if the given array contains null elements

      • getJavaFileObjectsFromStrings

        Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
        Gets file objects representing the given file names.
        Parameters:
        names - a list of file names
        Returns:
        a list of file objects
        Throws:
        IllegalArgumentException - if the list of file names includes a directory

      • getJavaFileObjects

        Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
        Gets file objects representing the given file names. Convenience method equivalent to:
             getJavaFileObjectsFromStrings(Arrays.asList(names))
        Parameters:
        names - a list of file names
        Returns:
        a list of file objects
        Throws:
        IllegalArgumentException - if the array of file names includes a directory
        NullPointerException - if the given array contains null elements

      • setLocation

        void setLocation(JavaFileManager.Location location,
                 Iterable<? extends File> path)
          throws IOException
        Associates the given path with the given location. Any previous value will be discarded.
        Parameters:
        location - a location
        path - a list of files, if null use the default path for this location
        Throws:
        IllegalArgumentException - if location is an output location and path does not contain exactly one element
        IOException - if location is an output location and path does not represent an existing directory
        See Also:
        getLocation(javax.tools.JavaFileManager.Location)

      • getLocation

        Iterable<? extends File> getLocation(JavaFileManager.Location location)
        Gets the path associated with the given location.
        Parameters:
        location - a location
        Returns:
        a list of files or null if this location has no associated path
        See Also:
        setLocation(javax.tools.JavaFileManager.Location, java.lang.Iterable<? extends java.io.File>)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StandardLocation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
compact3
javax.tools

Enum StandardLocation

  • java.lang.Object
    • java.lang.Enum<StandardLocation>
      • javax.tools.StandardLocation
  • All Implemented Interfaces:
    Serializable, Comparable<StandardLocation>, JavaFileManager.Location

    public enum StandardLocation
extends Enum<StandardLocation>
implements JavaFileManager.Location
    Standard locations of file objects.
    Since:
    1.6

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ANNOTATION_PROCESSOR_PATH
      Location to search for annotation processors.
      CLASS_OUTPUT
      Location of new class files.
      CLASS_PATH
      Location to search for user class files.
      NATIVE_HEADER_OUTPUT
      Location of new native header files.
      PLATFORM_CLASS_PATH
      Location to search for platform classes.
      SOURCE_OUTPUT
      Location of new source files.
      SOURCE_PATH
      Location to search for existing source files.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getName()
      Gets the name of this location.
      boolean isOutputLocation()
      Determines if this is an output location.
      static JavaFileManager.Location locationFor(String name)
      Gets a location object with the given name.
      static StandardLocation valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static StandardLocation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • CLASS_OUTPUT

        public static final StandardLocation CLASS_OUTPUT
        Location of new class files.

      • SOURCE_OUTPUT

        public static final StandardLocation SOURCE_OUTPUT
        Location of new source files.

      • CLASS_PATH

        public static final StandardLocation CLASS_PATH
        Location to search for user class files.

      • SOURCE_PATH

        public static final StandardLocation SOURCE_PATH
        Location to search for existing source files.

      • ANNOTATION_PROCESSOR_PATH

        public static final StandardLocation ANNOTATION_PROCESSOR_PATH
        Location to search for annotation processors.

      • PLATFORM_CLASS_PATH

        public static final StandardLocation PLATFORM_CLASS_PATH
        Location to search for platform classes. Sometimes called the boot class path.

      • NATIVE_HEADER_OUTPUT

        public static final StandardLocation NATIVE_HEADER_OUTPUT
        Location of new native header files.
        Since:
        1.8

    • Method Detail

      • values

        public static StandardLocation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StandardLocation c : StandardLocation.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static StandardLocation valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null

      • locationFor

        public static JavaFileManager.Location locationFor(String name)
        Gets a location object with the given name. The following property must hold: locationFor(x) == locationFor(y) if and only if x.equals(y). The returned location will be an output location if and only if name ends with "_OUTPUT".
        Parameters:
        name - a name
        Returns:
        a location

      • getName

        public String getName()
        Description copied from interface: JavaFileManager.Location
        Gets the name of this location.
        Specified by:
        getName in interface JavaFileManager.Location
        Returns:
        a name

      • isOutputLocation

        public boolean isOutputLocation()
        Description copied from interface: JavaFileManager.Location
        Determines if this is an output location. An output location is a location that is conventionally used for output.
        Specified by:
        isOutputLocation in interface JavaFileManager.Location
        Returns:
        true if this is an output location, false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Tool

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Interface Tool

  • All Known Subinterfaces:
    DocumentationTool, JavaCompiler

    public interface Tool
    Common interface for tools that can be invoked from a program. A tool is traditionally a command line program such as a compiler. The set of tools available with a platform is defined by the vendor.

    Tools can be located using ServiceLoader.load(Class).

    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Set<SourceVersion> getSourceVersions()
      Gets the source versions of the Java™ programming language supported by this tool.
      int run(InputStream in, OutputStream out, OutputStream err, String... arguments)
      Run the tool with the given I/O channels and arguments.

    • Method Detail

      • run

        int run(InputStream in,
        OutputStream out,
        OutputStream err,
        String... arguments)
        Run the tool with the given I/O channels and arguments. By convention a tool returns 0 for success and nonzero for errors. Any diagnostics generated will be written to either out or err in some unspecified format.
        Parameters:
        in - "standard" input; use System.in if null
        out - "standard" output; use System.out if null
        err - "standard" error; use System.err if null
        arguments - arguments to pass to the tool
        Returns:
        0 for success; nonzero otherwise
        Throws:
        NullPointerException - if the array of arguments contains any null elements.

      • getSourceVersions

        Set<SourceVersion> getSourceVersions()
        Gets the source versions of the Java™ programming language supported by this tool.
        Returns:
        a set of supported source versions
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ToolProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.tools

Class ToolProvider

  • java.lang.Object
    • javax.tools.ToolProvider

  • public class ToolProvider
extends Object
    Provides methods for locating tool providers, for example, providers of compilers. This class complements the functionality of ServiceLoader.
    Since:
    1.6

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static DocumentationTool getSystemDocumentationTool()
      Gets the Java™ programming language documentation tool provided with this platform.
      static JavaCompiler getSystemJavaCompiler()
      Gets the Java™ programming language compiler provided with this platform.
      static ClassLoader getSystemToolClassLoader()
      Returns the class loader for tools provided with this platform.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • getSystemJavaCompiler

        public static JavaCompiler getSystemJavaCompiler()
        Gets the Java™ programming language compiler provided with this platform.
        Returns:
        the compiler provided with this platform or null if no compiler is provided

      • getSystemDocumentationTool

        public static DocumentationTool getSystemDocumentationTool()
        Gets the Java™ programming language documentation tool provided with this platform.
        Returns:
        the documentation tool provided with this platform or null if no documentation tool is provided

      • getSystemToolClassLoader

        public static ClassLoader getSystemToolClassLoader()
        Returns the class loader for tools provided with this platform. This does not include user-installed tools. Use the service provider mechanism for locating user installed tools.
        Returns:
        the class loader for tools provided with this platform or null if no tools are provided
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


transaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.transaction

Contains three exceptions thrown by the ORB machinery during unmarshalling.

See: Description

  • Exception Summary
    Exception Description
    InvalidTransactionException
    This exception indicates that the request carried an invalid transaction context.
    TransactionRequiredException
    This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
    TransactionRolledbackException
    This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Package javax.transaction Description

Contains three exceptions thrown by the ORB machinery during unmarshalling.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.transaction Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.transaction

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • java.rmi.RemoteException
            • javax.transaction.InvalidTransactionException
            • javax.transaction.TransactionRequiredException
            • javax.transaction.TransactionRolledbackException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.transaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.transaction

No usage of javax.transaction
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.transaction.InvalidTransactionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.transaction.InvalidTransactionException

No usage of javax.transaction.InvalidTransactionException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.transaction.TransactionRequiredException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.transaction.TransactionRequiredException

No usage of javax.transaction.TransactionRequiredException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.transaction.TransactionRolledbackException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.transaction.TransactionRolledbackException

No usage of javax.transaction.TransactionRolledbackException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidTransactionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction

Class InvalidTransactionException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • java.rmi.RemoteException
            • javax.transaction.InvalidTransactionException
  • All Implemented Interfaces:
    Serializable

    public class InvalidTransactionException
extends RemoteException
    This exception indicates that the request carried an invalid transaction context. For example, this exception could be raised if an error occured when trying to register a resource.
    See Also:
    Serialized Form

    • Field Summary

      • Fields inherited from class java.rmi.RemoteException

        detail

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidTransactionException()
      InvalidTransactionException(String msg)

    • Method Summary

      • Methods inherited from class java.rmi.RemoteException

        getCause, getMessage

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidTransactionException

        public InvalidTransactionException()

      • InvalidTransactionException

        public InvalidTransactionException(String msg)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransactionRequiredException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction

Class TransactionRequiredException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • java.rmi.RemoteException
            • javax.transaction.TransactionRequiredException
  • All Implemented Interfaces:
    Serializable

    public class TransactionRequiredException
extends RemoteException
    This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
    See Also:
    Serialized Form

    • Field Summary

      • Fields inherited from class java.rmi.RemoteException

        detail

    • Constructor Summary

      Constructors
      Constructor and Description
      TransactionRequiredException()
      TransactionRequiredException(String msg)

    • Method Summary

      • Methods inherited from class java.rmi.RemoteException

        getCause, getMessage

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransactionRequiredException

        public TransactionRequiredException()

      • TransactionRequiredException

        public TransactionRequiredException(String msg)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransactionRolledbackException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction

Class TransactionRolledbackException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • java.rmi.RemoteException
            • javax.transaction.TransactionRolledbackException
  • All Implemented Interfaces:
    Serializable

    public class TransactionRolledbackException
extends RemoteException
    This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back. Thus the requested operation either could not be performed or was not performed because further computation on behalf of the transaction would be fruitless
    See Also:
    Serialized Form

    • Field Summary

      • Fields inherited from class java.rmi.RemoteException

        detail

    • Constructor Summary

      Constructors
      Constructor and Description
      TransactionRolledbackException()
      TransactionRolledbackException(String msg)

    • Method Summary

      • Methods inherited from class java.rmi.RemoteException

        getCause, getMessage

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransactionRolledbackException

        public TransactionRolledbackException()

      • TransactionRolledbackException

        public TransactionRolledbackException(String msg)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


xa

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.transaction.xa

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

See: Description

  • Interface Summary
    Interface Description
    XAResource
    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).
    Xid
    The Xid interface is a Java mapping of the X/Open transaction identifier XID structure.
  • Exception Summary
    Exception Description
    XAException
    The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.

Package javax.transaction.xa Description

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions. The driver vendor for a specific resource manager provides the implementation of this API.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.transaction.xa Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.transaction.xa

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.transaction.xa.XAException

Interface Hierarchy

  • javax.transaction.xa.XAResource
  • javax.transaction.xa.Xid
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.transaction.xa

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.transaction.xa

  • Packages that use javax.transaction.xa
    Package Description
    javax.sql
    Provides the API for server side data source access and processing from the JavaTM programming language.
    javax.transaction.xa
    Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.
  • Classes in javax.transaction.xa used by javax.sql
    Class and Description
    XAResource
    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).
  • Classes in javax.transaction.xa used by javax.transaction.xa
    Class and Description
    XAException
    The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.
    XAResource
    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).
    Xid
    The Xid interface is a Java mapping of the X/Open transaction identifier XID structure.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.transaction.xa.XAException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.transaction.xa.XAException

  • Packages that use XAException
    Package Description
    javax.transaction.xa
    Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

    • Uses of XAException in javax.transaction.xa

      Methods in javax.transaction.xa that throw XAException
      Modifier and Type Method and Description
      void XAResource.commit(Xid xid, boolean onePhase)
      Commits the global transaction specified by xid.
      void XAResource.end(Xid xid, int flags)
      Ends the work performed on behalf of a transaction branch.
      void XAResource.forget(Xid xid)
      Tells the resource manager to forget about a heuristically completed transaction branch.
      int XAResource.getTransactionTimeout()
      Obtains the current transaction timeout value set for this XAResource instance.
      boolean XAResource.isSameRM(XAResource xares)
      This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.
      int XAResource.prepare(Xid xid)
      Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
      Xid[] XAResource.recover(int flag)
      Obtains a list of prepared transaction branches from a resource manager.
      void XAResource.rollback(Xid xid)
      Informs the resource manager to roll back work done on behalf of a transaction branch.
      boolean XAResource.setTransactionTimeout(int seconds)
      Sets the current transaction timeout value for this XAResource instance.
      void XAResource.start(Xid xid, int flags)
      Starts work on behalf of a transaction branch specified in xid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.transaction.xa.XAResource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.transaction.xa.XAResource

  • Packages that use XAResource
    Package Description
    javax.sql
    Provides the API for server side data source access and processing from the JavaTM programming language.
    javax.transaction.xa
    Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

    • Uses of XAResource in javax.sql

      Methods in javax.sql that return XAResource
      Modifier and Type Method and Description
      XAResource XAConnection.getXAResource()
      Retrieves an XAResource object that the transaction manager will use to manage this XAConnection object's participation in a distributed transaction.

    • Uses of XAResource in javax.transaction.xa

      Methods in javax.transaction.xa with parameters of type XAResource
      Modifier and Type Method and Description
      boolean XAResource.isSameRM(XAResource xares)
      This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.transaction.xa.Xid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.transaction.xa.Xid

  • Packages that use Xid
    Package Description
    javax.transaction.xa
    Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

    • Uses of Xid in javax.transaction.xa

      Methods in javax.transaction.xa that return Xid
      Modifier and Type Method and Description
      Xid[] XAResource.recover(int flag)
      Obtains a list of prepared transaction branches from a resource manager.
      Methods in javax.transaction.xa with parameters of type Xid
      Modifier and Type Method and Description
      void XAResource.commit(Xid xid, boolean onePhase)
      Commits the global transaction specified by xid.
      void XAResource.end(Xid xid, int flags)
      Ends the work performed on behalf of a transaction branch.
      void XAResource.forget(Xid xid)
      Tells the resource manager to forget about a heuristically completed transaction branch.
      int XAResource.prepare(Xid xid)
      Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
      void XAResource.rollback(Xid xid)
      Informs the resource manager to roll back work done on behalf of a transaction branch.
      void XAResource.start(Xid xid, int flags)
      Starts work on behalf of a transaction branch specified in xid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XAException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction.xa

Class XAException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.transaction.xa.XAException
  • All Implemented Interfaces:
    Serializable

    public class XAException
extends Exception
    The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type Field and Description
      int errorCode
      The error code with which to create the SystemException.
      static int XA_HEURCOM
      The transaction branch has been heuristically committed.
      static int XA_HEURHAZ
      The transaction branch may have been heuristically completed.
      static int XA_HEURMIX
      The transaction branch has been heuristically committed and rolled back.
      static int XA_HEURRB
      The transaction branch has been heuristically rolled back.
      static int XA_NOMIGRATE
      Resumption must occur where the suspension occurred.
      static int XA_RBBASE
      The inclusive lower bound of the rollback codes.
      static int XA_RBCOMMFAIL
      Indicates that the rollback was caused by a communication failure.
      static int XA_RBDEADLOCK
      A deadlock was detected.
      static int XA_RBEND
      The inclusive upper bound of the rollback error code.
      static int XA_RBINTEGRITY
      A condition that violates the integrity of the resource was detected.
      static int XA_RBOTHER
      The resource manager rolled back the transaction branch for a reason not on this list.
      static int XA_RBPROTO
      A protocol error occurred in the resource manager.
      static int XA_RBROLLBACK
      Indicates that the rollback was caused by an unspecified reason.
      static int XA_RBTIMEOUT
      A transaction branch took too long.
      static int XA_RBTRANSIENT
      May retry the transaction branch.
      static int XA_RDONLY
      The transaction branch was read-only and has been committed.
      static int XA_RETRY
      Routine returned with no effect and may be reissued.
      static int XAER_ASYNC
      There is an asynchronous operation already outstanding.
      static int XAER_DUPID
      The XID already exists.
      static int XAER_INVAL
      Invalid arguments were given.
      static int XAER_NOTA
      The XID is not valid.
      static int XAER_OUTSIDE
      The resource manager is doing work outside a global transaction.
      static int XAER_PROTO
      Routine was invoked in an inproper context.
      static int XAER_RMERR
      A resource manager error has occurred in the transaction branch.
      static int XAER_RMFAIL
      Resource manager is unavailable.

    • Constructor Summary

      Constructors
      Constructor and Description
      XAException()
      Create an XAException.
      XAException(int errcode)
      Create an XAException with a given error code.
      XAException(String s)
      Create an XAException with a given string.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • errorCode

        public int errorCode
        The error code with which to create the SystemException.

      • XA_RBBASE

        public static final int XA_RBBASE
        The inclusive lower bound of the rollback codes.
        See Also:
        Constant Field Values

      • XA_RBROLLBACK

        public static final int XA_RBROLLBACK
        Indicates that the rollback was caused by an unspecified reason.
        See Also:
        Constant Field Values

      • XA_RBCOMMFAIL

        public static final int XA_RBCOMMFAIL
        Indicates that the rollback was caused by a communication failure.
        See Also:
        Constant Field Values

      • XA_RBDEADLOCK

        public static final int XA_RBDEADLOCK
        A deadlock was detected.
        See Also:
        Constant Field Values

      • XA_RBINTEGRITY

        public static final int XA_RBINTEGRITY
        A condition that violates the integrity of the resource was detected.
        See Also:
        Constant Field Values

      • XA_RBOTHER

        public static final int XA_RBOTHER
        The resource manager rolled back the transaction branch for a reason not on this list.
        See Also:
        Constant Field Values

      • XA_RBPROTO

        public static final int XA_RBPROTO
        A protocol error occurred in the resource manager.
        See Also:
        Constant Field Values

      • XA_RBTIMEOUT

        public static final int XA_RBTIMEOUT
        A transaction branch took too long.
        See Also:
        Constant Field Values

      • XA_RBTRANSIENT

        public static final int XA_RBTRANSIENT
        May retry the transaction branch.
        See Also:
        Constant Field Values

      • XA_RBEND

        public static final int XA_RBEND
        The inclusive upper bound of the rollback error code.
        See Also:
        Constant Field Values

      • XA_NOMIGRATE

        public static final int XA_NOMIGRATE
        Resumption must occur where the suspension occurred.
        See Also:
        Constant Field Values

      • XA_HEURHAZ

        public static final int XA_HEURHAZ
        The transaction branch may have been heuristically completed.
        See Also:
        Constant Field Values

      • XA_HEURCOM

        public static final int XA_HEURCOM
        The transaction branch has been heuristically committed.
        See Also:
        Constant Field Values

      • XA_HEURRB

        public static final int XA_HEURRB
        The transaction branch has been heuristically rolled back.
        See Also:
        Constant Field Values

      • XA_HEURMIX

        public static final int XA_HEURMIX
        The transaction branch has been heuristically committed and rolled back.
        See Also:
        Constant Field Values

      • XA_RETRY

        public static final int XA_RETRY
        Routine returned with no effect and may be reissued.
        See Also:
        Constant Field Values

      • XA_RDONLY

        public static final int XA_RDONLY
        The transaction branch was read-only and has been committed.
        See Also:
        Constant Field Values

      • XAER_ASYNC

        public static final int XAER_ASYNC
        There is an asynchronous operation already outstanding.
        See Also:
        Constant Field Values

      • XAER_RMERR

        public static final int XAER_RMERR
        A resource manager error has occurred in the transaction branch.
        See Also:
        Constant Field Values

      • XAER_NOTA

        public static final int XAER_NOTA
        The XID is not valid.
        See Also:
        Constant Field Values

      • XAER_INVAL

        public static final int XAER_INVAL
        Invalid arguments were given.
        See Also:
        Constant Field Values

      • XAER_PROTO

        public static final int XAER_PROTO
        Routine was invoked in an inproper context.
        See Also:
        Constant Field Values

      • XAER_RMFAIL

        public static final int XAER_RMFAIL
        Resource manager is unavailable.
        See Also:
        Constant Field Values

      • XAER_DUPID

        public static final int XAER_DUPID
        The XID already exists.
        See Also:
        Constant Field Values

      • XAER_OUTSIDE

        public static final int XAER_OUTSIDE
        The resource manager is doing work outside a global transaction.
        See Also:
        Constant Field Values

    • Constructor Detail

      • XAException

        public XAException()
        Create an XAException.

      • XAException

        public XAException(String s)
        Create an XAException with a given string.
        Parameters:
        s - The String object containing the exception message.

      • XAException

        public XAException(int errcode)
        Create an XAException with a given error code.
        Parameters:
        errcode - The error code identifying the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XAResource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction.xa

Interface XAResource

  • public interface XAResource

    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).

    The XA interface defines the contract between a Resource Manager and a Transaction Manager in a distributed transaction processing (DTP) environment. A JDBC driver or a JMS provider implements this interface to support the association between a global transaction and a database or message service connection.

    The XAResource interface can be supported by any transactional resource that is intended to be used by application programs in an environment where transactions are controlled by an external transaction manager. An example of such a resource is a database management system. An application may access data through multiple database connections. Each database connection is enlisted with the transaction manager as a transactional resource. The transaction manager obtains an XAResource for each connection participating in a global transaction. The transaction manager uses the start method to associate the global transaction with the resource, and it uses the end method to disassociate the transaction from the resource. The resource manager is responsible for associating the global transaction to all work performed on its data between the start and end method invocations.

    At transaction commit time, the resource managers are informed by the transaction manager to prepare, commit, or rollback a transaction according to the two-phase commit protocol.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int TMENDRSCAN
      Ends a recovery scan.
      static int TMFAIL
      Disassociates the caller and marks the transaction branch rollback-only.
      static int TMJOIN
      Caller is joining existing transaction branch.
      static int TMNOFLAGS
      Use TMNOFLAGS to indicate no flags value is selected.
      static int TMONEPHASE
      Caller is using one-phase optimization.
      static int TMRESUME
      Caller is resuming association with a suspended transaction branch.
      static int TMSTARTRSCAN
      Starts a recovery scan.
      static int TMSUCCESS
      Disassociates caller from a transaction branch.
      static int TMSUSPEND
      Caller is suspending (not ending) its association with a transaction branch.
      static int XA_OK
      The transaction work has been prepared normally.
      static int XA_RDONLY
      The transaction branch has been read-only and has been committed.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void commit(Xid xid, boolean onePhase)
      Commits the global transaction specified by xid.
      void end(Xid xid, int flags)
      Ends the work performed on behalf of a transaction branch.
      void forget(Xid xid)
      Tells the resource manager to forget about a heuristically completed transaction branch.
      int getTransactionTimeout()
      Obtains the current transaction timeout value set for this XAResource instance.
      boolean isSameRM(XAResource xares)
      This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.
      int prepare(Xid xid)
      Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
      Xid[] recover(int flag)
      Obtains a list of prepared transaction branches from a resource manager.
      void rollback(Xid xid)
      Informs the resource manager to roll back work done on behalf of a transaction branch.
      boolean setTransactionTimeout(int seconds)
      Sets the current transaction timeout value for this XAResource instance.
      void start(Xid xid, int flags)
      Starts work on behalf of a transaction branch specified in xid.

    • Field Detail

      • TMENDRSCAN

        static final int TMENDRSCAN
        Ends a recovery scan.
        See Also:
        Constant Field Values

      • TMFAIL

        static final int TMFAIL
        Disassociates the caller and marks the transaction branch rollback-only.
        See Also:
        Constant Field Values

      • TMJOIN

        static final int TMJOIN
        Caller is joining existing transaction branch.
        See Also:
        Constant Field Values

      • TMNOFLAGS

        static final int TMNOFLAGS
        Use TMNOFLAGS to indicate no flags value is selected.
        See Also:
        Constant Field Values

      • TMONEPHASE

        static final int TMONEPHASE
        Caller is using one-phase optimization.
        See Also:
        Constant Field Values

      • TMRESUME

        static final int TMRESUME
        Caller is resuming association with a suspended transaction branch.
        See Also:
        Constant Field Values

      • TMSTARTRSCAN

        static final int TMSTARTRSCAN
        Starts a recovery scan.
        See Also:
        Constant Field Values

      • TMSUCCESS

        static final int TMSUCCESS
        Disassociates caller from a transaction branch.
        See Also:
        Constant Field Values

      • TMSUSPEND

        static final int TMSUSPEND
        Caller is suspending (not ending) its association with a transaction branch.
        See Also:
        Constant Field Values

      • XA_RDONLY

        static final int XA_RDONLY
        The transaction branch has been read-only and has been committed.
        See Also:
        Constant Field Values

      • XA_OK

        static final int XA_OK
        The transaction work has been prepared normally.
        See Also:
        Constant Field Values

    • Method Detail

      • commit

        void commit(Xid xid,
            boolean onePhase)
     throws XAException
        Commits the global transaction specified by xid.
        Parameters:
        xid - A global transaction identifier
        onePhase - If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of xid.
        Throws:
        XAException - An error has occurred. Possible XAExceptions are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

        If the resource manager did not commit the transaction and the paramether onePhase is set to true, the resource manager may throw one of the XA_RB* exceptions. Upon return, the resource manager has rolled back the branch's work and has released all held resources.

      • end

        void end(Xid xid,
         int flags)
  throws XAException
        Ends the work performed on behalf of a transaction branch. The resource manager disassociates the XA resource from the transaction branch specified and lets the transaction complete.

        If TMSUSPEND is specified in the flags, the transaction branch is temporarily suspended in an incomplete state. The transaction context is in a suspended state and must be resumed via the start method with TMRESUME specified.

        If TMFAIL is specified, the portion of work has failed. The resource manager may mark the transaction as rollback-only

        If TMSUCCESS is specified, the portion of work has completed successfully.

        Parameters:
        xid - A global transaction identifier that is the same as the identifier used previously in the start method.
        flags - One of TMSUCCESS, TMFAIL, or TMSUSPEND.
        Throws:
        XAException - An error has occurred. Possible XAException values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL, XAER_PROTO, or XA_RB*.

      • forget

        void forget(Xid xid)
     throws XAException
        Tells the resource manager to forget about a heuristically completed transaction branch.
        Parameters:
        xid - A global transaction identifier.
        Throws:
        XAException - An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

      • getTransactionTimeout

        int getTransactionTimeout()
                   throws XAException
        Obtains the current transaction timeout value set for this XAResource instance. If XAResource.setTransactionTimeout was not used prior to invoking this method, the return value is the default timeout set for the resource manager; otherwise, the value used in the previous setTransactionTimeout call is returned.
        Returns:
        the transaction timeout value in seconds.
        Throws:
        XAException - An error has occurred. Possible exception values are XAER_RMERR and XAER_RMFAIL.

      • isSameRM

        boolean isSameRM(XAResource xares)
          throws XAException
        This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.
        Parameters:
        xares - An XAResource object whose resource manager instance is to be compared with the resource manager instance of the target object.
        Returns:
        true if it's the same RM instance; otherwise false.
        Throws:
        XAException - An error has occurred. Possible exception values are XAER_RMERR and XAER_RMFAIL.

      • prepare

        int prepare(Xid xid)
     throws XAException
        Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
        Parameters:
        xid - A global transaction identifier.
        Returns:
        A value indicating the resource manager's vote on the outcome of the transaction. The possible values are: XA_RDONLY or XA_OK. If the resource manager wants to roll back the transaction, it should do so by raising an appropriate XAException in the prepare method.
        Throws:
        XAException - An error has occurred. Possible exception values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

      • recover

        Xid[] recover(int flag)
       throws XAException
        Obtains a list of prepared transaction branches from a resource manager. The transaction manager calls this method during recovery to obtain the list of transaction branches that are currently in prepared or heuristically completed states.
        Parameters:
        flag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS must be used when no other flags are set in the parameter.
        Returns:
        The resource manager returns zero or more XIDs of the transaction branches that are currently in a prepared or heuristically completed state. If an error occurs during the operation, the resource manager should throw the appropriate XAException.
        Throws:
        XAException - An error has occurred. Possible values are XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.

      • rollback

        void rollback(Xid xid)
       throws XAException
        Informs the resource manager to roll back work done on behalf of a transaction branch.
        Parameters:
        xid - A global transaction identifier.
        Throws:
        XAException - An error has occurred.

      • setTransactionTimeout

        boolean setTransactionTimeout(int seconds)
                       throws XAException

        Sets the current transaction timeout value for this XAResource instance. Once set, this timeout value is effective until setTransactionTimeout is invoked again with a different value. To reset the timeout value to the default value used by the resource manager, set the value to zero. If the timeout operation is performed successfully, the method returns true; otherwise false. If a resource manager does not support explicitly setting the transaction timeout value, this method returns false.

        Parameters:
        seconds - The transaction timeout value in seconds.
        Returns:
        true if the transaction timeout value is set successfully; otherwise false.
        Throws:
        XAException - An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.

      • start

        void start(Xid xid,
           int flags)
    throws XAException
        Starts work on behalf of a transaction branch specified in xid. If TMJOIN is specified, the start applies to joining a transaction previously seen by the resource manager. If TMRESUME is specified, the start applies to resuming a suspended transaction specified in the parameter xid. If neither TMJOIN nor TMRESUME is specified and the transaction specified by xid has previously been seen by the resource manager, the resource manager throws the XAException exception with XAER_DUPID error code.
        Parameters:
        xid - A global transaction identifier to be associated with the resource.
        flags - One of TMNOFLAGS, TMJOIN, or TMRESUME.
        Throws:
        XAException - An error has occurred. Possible exceptions are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Xid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.transaction.xa

Interface Xid

  • public interface Xid
    The Xid interface is a Java mapping of the X/Open transaction identifier XID structure. This interface specifies three accessor methods to retrieve a global transaction format ID, global transaction ID, and branch qualifier. The Xid interface is used by the transaction manager and the resource managers. This interface is not visible to the application programs.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int MAXBQUALSIZE
      Maximum number of bytes returned by getBqual.
      static int MAXGTRIDSIZE
      Maximum number of bytes returned by getGtrid.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      byte[] getBranchQualifier()
      Obtain the transaction branch identifier part of XID as an array of bytes.
      int getFormatId()
      Obtain the format identifier part of the XID.
      byte[] getGlobalTransactionId()
      Obtain the global transaction identifier part of XID as an array of bytes.

    • Field Detail

      • MAXGTRIDSIZE

        static final int MAXGTRIDSIZE
        Maximum number of bytes returned by getGtrid.
        See Also:
        Constant Field Values

      • MAXBQUALSIZE

        static final int MAXBQUALSIZE
        Maximum number of bytes returned by getBqual.
        See Also:
        Constant Field Values

    • Method Detail

      • getFormatId

        int getFormatId()
        Obtain the format identifier part of the XID.
        Returns:
        Format identifier. O means the OSI CCR format.

      • getGlobalTransactionId

        byte[] getGlobalTransactionId()
        Obtain the global transaction identifier part of XID as an array of bytes.
        Returns:
        Global transaction identifier.

      • getBranchQualifier

        byte[] getBranchQualifier()
        Obtain the transaction branch identifier part of XID as an array of bytes.
        Returns:
        Global transaction identifier.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


xml

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml

  • Class Summary
    Class Description
    XMLConstants
    Utility class to contain basic XML values as constants.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.XMLConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml

No usage of javax.xml
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


bind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind

Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

See: Description

  • Interface Summary
    Interface Description
    DatatypeConverterInterface
    The DatatypeConverterInterface is for JAXB provider use only.
    Element
    This is an element marker interface.
    Marshaller
    The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data.
    NotIdentifiableEvent
    This event indicates that a problem was encountered resolving an ID/IDREF.
    ParseConversionEvent
    This event indicates that a problem was encountered while converting a string from the XML data into a value of the target Java data type.
    PrintConversionEvent
    This event indicates that a problem was encountered while converting data from the Java content tree into its lexical representation.
    Unmarshaller
    The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled.
    UnmarshallerHandler
    Unmarshaller implemented as SAX ContentHandler.
    ValidationEvent
    This event indicates that a problem was encountered while validating the incoming XML data during an unmarshal operation, while performing on-demand validation of the Java content tree, or while marshalling the Java content tree back to XML data.
    ValidationEventHandler
    A basic event handler interface for validation errors.
    ValidationEventLocator
    Encapsulate the location of a ValidationEvent.
    Validator Deprecated
    since JAXB 2.0
  • Class Summary
    Class Description
    Binder<XmlNode>
    Enable synchronization between XML infoset nodes and JAXB objects representing same XML document.
    DatatypeConverter
    The javaType binding declaration can be used to customize the binding of an XML schema datatype to a Java datatype.
    JAXB
    Class that defines convenience methods for common, simple use of JAXB.
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
    JAXBElement<T>
    JAXB representation of an Xml Element.
    JAXBElement.GlobalScope
    Designates global scope for an xml element.
    JAXBIntrospector
    Provide access to JAXB xml binding data for a JAXB object.
    JAXBPermission
    This class is for JAXB permissions.
    Marshaller.Listener

    Register an instance of an implementation of this class with a Marshaller to externally listen for marshal events.
    SchemaOutputResolver
    Controls where a JAXB implementation puts the generates schema files.
    Unmarshaller.Listener

    Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.
  • Exception Summary
    Exception Description
    DataBindingException
    Exception that represents a failure in a JAXB operation.
    JAXBException
    This is the root exception class for all JAXB exceptions.
    MarshalException
    This exception indicates that an error has occurred while performing a marshal operation that the provider is unable to recover from.
    PropertyException
    This exception indicates that an error was encountered while getting or setting a property.
    TypeConstraintException
    This exception indicates that a violation of a dynamically checked type constraint was detected.
    UnmarshalException
    This exception indicates that an error has occurred while performing an unmarshal operation that prevents the JAXB Provider from completing the operation.
    ValidationException
    This exception indicates that an error has occurred while performing a validate operation.

Package javax.xml.bind Description

Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

JAXBContext is the client-entry point to the runtime binding framework.

Package Specification

  • JAXB Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • The JAXB Website
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Element

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface Element

  • public interface Element
    This is an element marker interface. Under certain circumstances, it is necessary for the binding compiler to generate derived java content classes that implement this interface. In those cases, client applications must supply element instances rather than types of elements. For more detail, see section 5.7 "Element Declaration" and 5.7.1 "Bind to Java Element Interface" of the specification.
    Since:
    JAXB1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.bind.Binder<XmlNode>
    • javax.xml.bind.DatatypeConverter
    • javax.xml.bind.JAXB
    • javax.xml.bind.JAXBContext
    • javax.xml.bind.JAXBElement<T> (implements java.io.Serializable)
    • javax.xml.bind.JAXBElement.GlobalScope
    • javax.xml.bind.JAXBIntrospector
    • javax.xml.bind.Marshaller.Listener
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • javax.xml.bind.JAXBPermission
    • javax.xml.bind.SchemaOutputResolver
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.bind.JAXBException
          • javax.xml.bind.MarshalException
          • javax.xml.bind.PropertyException
          • javax.xml.bind.UnmarshalException
          • javax.xml.bind.ValidationException
        • java.lang.RuntimeException
          • javax.xml.bind.DataBindingException
          • javax.xml.bind.TypeConstraintException
    • javax.xml.bind.Unmarshaller.Listener

Interface Hierarchy

  • org.xml.sax.ContentHandler
    • javax.xml.bind.UnmarshallerHandler
  • javax.xml.bind.DatatypeConverterInterface
  • javax.xml.bind.Element
  • javax.xml.bind.Marshaller
  • javax.xml.bind.Unmarshaller
  • javax.xml.bind.ValidationEvent
    • javax.xml.bind.NotIdentifiableEvent
    • javax.xml.bind.ParseConversionEvent
    • javax.xml.bind.PrintConversionEvent
  • javax.xml.bind.ValidationEventHandler
  • javax.xml.bind.ValidationEventLocator
  • javax.xml.bind.Validator
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotIdentifiableEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface NotIdentifiableEvent

  • All Superinterfaces:
    ValidationEvent
    All Known Implementing Classes:
    NotIdentifiableEventImpl

    public interface NotIdentifiableEvent
extends ValidationEvent
    This event indicates that a problem was encountered resolving an ID/IDREF.
    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEventHandler

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Method Summary

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParseConversionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface ParseConversionEvent

  • All Superinterfaces:
    ValidationEvent
    All Known Implementing Classes:
    ParseConversionEventImpl

    public interface ParseConversionEvent
extends ValidationEvent
    This event indicates that a problem was encountered while converting a string from the XML data into a value of the target Java data type.
    Since:
    JAXB1.0
    See Also:
    ValidationEvent, ValidationEventHandler, Unmarshaller

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Method Summary

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PrintConversionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface PrintConversionEvent

  • All Superinterfaces:
    ValidationEvent
    All Known Implementing Classes:
    PrintConversionEventImpl

    public interface PrintConversionEvent
extends ValidationEvent
    This event indicates that a problem was encountered while converting data from the Java content tree into its lexical representation.
    Since:
    JAXB1.0
    See Also:
    ValidationEvent, ValidationEventHandler, Marshaller

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Method Summary

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind

  • Packages that use javax.xml.bind
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
  • Classes in javax.xml.bind used by javax.xml.bind
    Class and Description
    Binder
    Enable synchronization between XML infoset nodes and JAXB objects representing same XML document.
    DatatypeConverterInterface
    The DatatypeConverterInterface is for JAXB provider use only.
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
    JAXBElement
    JAXB representation of an Xml Element.
    JAXBException
    This is the root exception class for all JAXB exceptions.
    JAXBIntrospector
    Provide access to JAXB xml binding data for a JAXB object.
    Marshaller
    The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data.
    Marshaller.Listener

    Register an instance of an implementation of this class with a Marshaller to externally listen for marshal events.
    PropertyException
    This exception indicates that an error was encountered while getting or setting a property.
    SchemaOutputResolver
    Controls where a JAXB implementation puts the generates schema files.
    Unmarshaller
    The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled.
    Unmarshaller.Listener

    Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.
    UnmarshallerHandler
    Unmarshaller implemented as SAX ContentHandler.
    ValidationEvent
    This event indicates that a problem was encountered while validating the incoming XML data during an unmarshal operation, while performing on-demand validation of the Java content tree, or while marshalling the Java content tree back to XML data.
    ValidationEventHandler
    A basic event handler interface for validation errors.
    ValidationEventLocator
    Encapsulate the location of a ValidationEvent.
    Validator
    Deprecated.
    since JAXB 2.0
  • Classes in javax.xml.bind used by javax.xml.bind.annotation
    Class and Description
    ValidationEventHandler
    A basic event handler interface for validation errors.
  • Classes in javax.xml.bind used by javax.xml.bind.helpers
    Class and Description
    JAXBElement
    JAXB representation of an Xml Element.
    JAXBException
    This is the root exception class for all JAXB exceptions.
    Marshaller
    The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data.
    Marshaller.Listener

    Register an instance of an implementation of this class with a Marshaller to externally listen for marshal events.
    NotIdentifiableEvent
    This event indicates that a problem was encountered resolving an ID/IDREF.
    ParseConversionEvent
    This event indicates that a problem was encountered while converting a string from the XML data into a value of the target Java data type.
    PrintConversionEvent
    This event indicates that a problem was encountered while converting data from the Java content tree into its lexical representation.
    PropertyException
    This exception indicates that an error was encountered while getting or setting a property.
    UnmarshalException
    This exception indicates that an error has occurred while performing an unmarshal operation that prevents the JAXB Provider from completing the operation.
    Unmarshaller
    The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled.
    Unmarshaller.Listener

    Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.
    ValidationEvent
    This event indicates that a problem was encountered while validating the incoming XML data during an unmarshal operation, while performing on-demand validation of the Java content tree, or while marshalling the Java content tree back to XML data.
    ValidationEventHandler
    A basic event handler interface for validation errors.
    ValidationEventLocator
    Encapsulate the location of a ValidationEvent.
  • Classes in javax.xml.bind used by javax.xml.bind.util
    Class and Description
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
    JAXBException
    This is the root exception class for all JAXB exceptions.
    Marshaller
    The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data.
    Unmarshaller
    The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled.
    ValidationEvent
    This event indicates that a problem was encountered while validating the incoming XML data during an unmarshal operation, while performing on-demand validation of the Java content tree, or while marshalling the Java content tree back to XML data.
    ValidationEventHandler
    A basic event handler interface for validation errors.
  • Classes in javax.xml.bind used by javax.xml.ws
    Class and Description
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
  • Classes in javax.xml.bind used by javax.xml.ws.handler.soap
    Class and Description
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
  • Classes in javax.xml.bind used by javax.xml.ws.spi
    Class and Description
    JAXBContext
    The JAXBContext class provides the client's entry point to the JAXB API.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


annotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind.annotation

Defines annotations for customizing Java program elements to XML Schema mapping.

See: Description

  • Interface Summary
    Interface Description
    DomHandler<ElementT,ResultT extends Result>
    Converts an element (and its descendants) from/to DOM (or similar) representation.
  • Class Summary
    Class Description
    W3CDomHandler
    DomHandler implementation for W3C DOM (org.w3c.dom package.)
    XmlElement.DEFAULT
    Used in XmlElement.type() to signal that the type be inferred from the signature of the property.
    XmlElementDecl.GLOBAL
    Used in XmlElementDecl.scope() to signal that the declaration is in the global scope.
    XmlElementRef.DEFAULT
    Used in XmlElementRef.type() to signal that the type be inferred from the signature of the property.
    XmlSchemaType.DEFAULT
    Used in XmlSchemaType.type() to signal that the type be inferred from the signature of the property.
    XmlType.DEFAULT
    Used in XmlType.factoryClass() to signal that either factory mehod is not used or that it's in the class with this XmlType itself.
  • Enum Summary
    Enum Description
    XmlAccessOrder
    Used by XmlAccessorOrder to control the ordering of properties and fields in a JAXB bound class.
    XmlAccessType
    Used by XmlAccessorType to control serialization of fields or properties.
    XmlNsForm
    Enumeration of XML Schema namespace qualifications.
  • Annotation Types Summary
    Annotation Type Description
    XmlAccessorOrder
    Controls the ordering of fields and properties in a class.
    XmlAccessorType
    Controls whether fields or Javabean properties are serialized by default.
    XmlAnyAttribute
    Maps a JavaBean property to a map of wildcard attributes.
    XmlAnyElement
    Maps a JavaBean property to XML infoset representation and/or JAXB element.
    XmlAttachmentRef
    Marks a field/property that its XML form is a uri reference to mime content.
    XmlAttribute
    Maps a JavaBean property to a XML attribute.
    XmlElement
    Maps a JavaBean property to a XML element derived from property name.
    XmlElementDecl
    Maps a factory method to a XML element.
    XmlElementRef
    Maps a JavaBean property to a XML element derived from property's type.
    XmlElementRefs
    Marks a property that refers to classes with XmlElement or JAXBElement.
    XmlElements
    A container for multiple @XmlElement annotations.
    XmlElementWrapper
    Generates a wrapper element around XML representation.
    XmlEnum
    Maps an enum type Enum to XML representation.
    XmlEnumValue
    Maps an enum constant in Enum type to XML representation.
    XmlID
    Maps a JavaBean property to XML ID.
    XmlIDREF
    Maps a JavaBean property to XML IDREF.
    XmlInlineBinaryData
    Disable consideration of XOP encoding for datatypes that are bound to base64-encoded binary data in XML.
    XmlList
    Used to map a property to a list simple type.
    XmlMimeType
    Associates the MIME type that controls the XML representation of the property.
    XmlMixed
    Annotate a JavaBean multi-valued property to support mixed content.
    XmlNs
    Associates a namespace prefix with a XML namespace URI.
    XmlRegistry
    Marks a class that has XmlElementDecls.
    XmlRootElement
    Maps a class or an enum type to an XML element.
    XmlSchema
    Maps a package name to a XML namespace.
    XmlSchemaType
    Maps a Java type to a simple schema built-in type.
    XmlSchemaTypes
    A container for multiple @XmlSchemaType annotations.
    XmlSeeAlso
    Instructs JAXB to also bind other classes when binding this class.
    XmlTransient
    Prevents the mapping of a JavaBean property/type to XML representation.
    XmlType
    Maps a class or an enum type to a XML Schema type.
    XmlValue
    Enables mapping a class to a XML Schema complex type with a simpleContent or a XML Schema simple type.

Package javax.xml.bind.annotation Description

Defines annotations for customizing Java program elements to XML Schema mapping.

Package Specification

The following table shows the JAXB mapping annotations that can be associated with each program element.

Program Element JAXB annotation
Package
XmlAccessorOrder
XmlAccessorType
XmlSchema
XmlSchemaType
XmlSchemaTypes
XmlJavaTypeAdapter
XmlJavaTypeAdapters
Class
XmlAccessorOrder
XmlAccessorType
XmlInlineBinaryData
XmlRootElement
XmlType
XmlJavaTypeAdapter
Enum type
XmlEnum
XmlEnumValue (enum constant only)
XmlRootElement
XmlType
XmlJavaTypeAdapter
JavaBean Property/field
XmlElement
XmlElements
XmlElementRef
XmlElementRefs
XmlElementWrapper
XmlAnyElement
XmlAttribute
XmlAnyAttribute
XmlTransient
XmlValue
XmlID
XmlIDREF
XmlList
XmlMixed
XmlMimeType
XmlAttachmentRef
XmlInlineBinaryData
XmlElementDecl (only on method)
XmlJavaTypeAdapter
Parameter
XmlList
XmlAttachmentRef
XmlMimeType
XmlJavaTypeAdapter

Terminology

JavaBean property and field: For the purposes of mapping, there is no semantic difference between a field and a JavaBean property. Thus, an annotation that can be applied to a JavaBean property can always be applied to a field. Hence in the Javadoc documentation, for brevity, the term JavaBean property or property is used to mean either JavaBean property or a field. Where required, both are explicitly mentioned.

top level class: For the purpose of mapping, there is no semantic difference between a top level class and a static nested class. Thus, an annotation that can be applied to a top level class, can always be applied to a nested static class. Hence in the Javadoc documentation, for brevity, the term "top level class" or just class is used to mean either a top level class or a nested static class.

mapping annotation:A JAXB 2.0 defined program annotation based on the JSR 175 programming annotation facility.

Common Usage Constraints

The following usage constraints are defined here since they apply to more than annotation:

  • For a property, a given annotation can be applied to either read or write property but not both.
  • A property name must be different from any other property name in any of the super classes of the class being mapped.
  • A mapped field name or the decapitalized name of a mapped property must be unique within a class.

Notations

Namespace prefixes

The following namespace prefixes are used in the XML Schema fragments in this package.

Prefix | Namespace | Notes
xs | http://www.w3.org/2001/XMLSchema | Namespace of XML Schema namespace
ref | http://ws-i.org/profiles/basic/1.1/xsd | Namespace for swaref schema component
xsi | http://www.w3.org/2001/XMLSchema-instance | XML Schema namespace for instances

Since:
JAXB 2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind.annotation Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind.annotation

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.bind.annotation.W3CDomHandler (implements javax.xml.bind.annotation.DomHandler<ElementT,ResultT>)
    • javax.xml.bind.annotation.XmlElement.DEFAULT
    • javax.xml.bind.annotation.XmlElementDecl.GLOBAL
    • javax.xml.bind.annotation.XmlElementRef.DEFAULT
    • javax.xml.bind.annotation.XmlSchemaType.DEFAULT
    • javax.xml.bind.annotation.XmlType.DEFAULT

Interface Hierarchy

  • javax.xml.bind.annotation.DomHandler<ElementT,ResultT>

Annotation Type Hierarchy

  • javax.xml.bind.annotation.XmlAccessorType (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElementRefs (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlMixed (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlAccessorOrder (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlAttribute (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlNs (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlAnyAttribute (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlList (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElementWrapper (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlSchema (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlID (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlIDREF (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlEnumValue (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElementDecl (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlType (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlMimeType (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlAttachmentRef (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElementRef (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlAnyElement (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlSchemaType (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlRootElement (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlValue (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElements (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlInlineBinaryData (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlEnum (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlTransient (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlSeeAlso (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlRegistry (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlSchemaTypes (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.XmlElement (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • javax.xml.bind.annotation.XmlAccessType
      • javax.xml.bind.annotation.XmlNsForm
      • javax.xml.bind.annotation.XmlAccessOrder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind.annotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind.annotation

  • Packages that use javax.xml.bind.annotation
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
  • Classes in javax.xml.bind.annotation used by javax.xml.bind.annotation
    Class and Description
    DomHandler
    Converts an element (and its descendants) from/to DOM (or similar) representation.
    XmlAccessOrder
    Used by XmlAccessorOrder to control the ordering of properties and fields in a JAXB bound class.
    XmlAccessType
    Used by XmlAccessorType to control serialization of fields or properties.
    XmlNsForm
    Enumeration of XML Schema namespace qualifications.
  • Classes in javax.xml.bind.annotation used by javax.xml.ws
    Class and Description
    XmlTransient
    Prevents the mapping of a JavaBean property/type to XML representation.
  • Classes in javax.xml.bind.annotation used by javax.xml.ws.wsaddressing
    Class and Description
    XmlRootElement
    Maps a class or an enum type to an XML element.
    XmlType
    Maps a class or an enum type to a XML Schema type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAnyAttribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAnyAttribute

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlAnyAttribute

    Maps a JavaBean property to a map of wildcard attributes.

    Usage

    The @XmlAnyAttribute annotation can be used with the following program elements:

    • JavaBean property
    • non static, non transient field

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    The usage is subject to the following constraints:
    • At most one field or property in a class can be annotated with @XmlAnyAttribute.
    • The type of the property or the field must java.util.Map

    While processing attributes to be unmarshalled into a value class, each attribute that is not statically associated with another JavaBean property, via XmlAttribute, is entered into the wildcard attribute map represented by Map<QName,Object>. The attribute QName is the map's key. The key's value is the String value of the attribute.

    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAttachmentRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAttachmentRef

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,PARAMETER})
public @interface XmlAttachmentRef
    Marks a field/property that its XML form is a uri reference to mime content. The mime content is optimally stored out-of-line as an attachment. A field/property must always map to the DataHandler class.

    Usage

     @XmlRootElement
 class Foo {
   @XmlAttachmentRef
   @XmlAttribute
   DataHandler data;

   @XmlAttachmentRef
   @XmlElement
   DataHandler body;
 }
    The above code maps to the following XML:
     <xs:element name="foo" xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="body" type="ref:swaRef" minOccurs="0" />
     </xs:sequence>
     <xs:attribute name="data" type="ref:swaRef" use="optional" />
   </xs:complexType>
 </xs:element>

    The above binding supports WS-I AP 1.0 WS-I Attachments Profile Version 1.0.

    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlID

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlID

    Maps a JavaBean property to XML ID.

    To preserve referential integrity of an object graph across XML serialization followed by a XML deserialization, requires an object reference to be marshalled by reference or containment appropriately. Annotations @XmlID and @XmlIDREF together allow a customized mapping of a JavaBean property's type by containment or reference.

    Usage

    The @XmlID annotation can be used with the following program elements:
    • a JavaBean property
    • non static, non transient field

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    The usage is subject to the following constraints:
    • At most one field or property in a class can be annotated with @XmlID.
    • The JavaBean property's type must be java.lang.String.
    • The only other mapping annotations that can be used with @XmlID are:@XmlElement and @XmlAttribute.

    Example: Map a JavaBean property's type to xs:ID

        // Example: code fragment
    public class Customer {
        @XmlAttribute
        @XmlID
        public String getCustomerID();
        public void setCustomerID(String id);
        .... other properties not shown
    }

    <!-- Example: XML Schema fragment -->
    <xs:complexType name="Customer">
      <xs:complexContent>
        <xs:sequence>
          ....
        </xs:sequence>
        <xs:attribute name="customerID" type="xs:ID"/>
      </xs:complexContent>
    </xs:complexType>
    Since:
    JAXB2.0
    See Also:
    XmlIDREF
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlIDREF

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlIDREF

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlIDREF

    Maps a JavaBean property to XML IDREF.

    To preserve referential integrity of an object graph across XML serialization followed by a XML deserialization, requires an object reference to be marshalled by reference or containment appropriately. Annotations @XmlID and @XmlIDREF together allow a customized mapping of a JavaBean property's type by containment or reference.

    Usage

    The @XmlIDREF annotation can be used with the following program elements:
    • a JavaBean property
    • non static, non transient field

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    The usage is subject to the following constraints:

    • If the type of the field or property is a collection type, then the collection item type must contain a property or field annotated with @XmlID.
    • If the field or property is single valued, then the type of the property or field must contain a property or field annotated with @XmlID.

      Note: If the collection item type or the type of the property (for non collection type) is java.lang.Object, then the instance must contain a property/field annotated with @XmlID attribute.

    • This annotation can be used with the following annotations: XmlElement, XmlAttribute, XmlList, and XmlElements.

    Example: Map a JavaBean property to xs:IDREF (i.e. by reference rather than by containment)

   //EXAMPLE: Code fragment
   public class Shipping {
       @XmlIDREF public Customer getCustomer();
       public void setCustomer(Customer customer);
       ....
    }

   <!-- Example: XML Schema fragment -->
   <xs:complexType name="Shipping">
     <xs:complexContent>
       <xs:sequence>
         <xs:element name="customer" type="xs:IDREF"/>
         ....
       </xs:sequence>
     </xs:complexContent>
   </xs:complexType>

    Example 2: The following is a complete example of containment versus reference.

        // By default, Customer maps to complex type xs:Customer
    public class Customer {

        // map JavaBean property type to xs:ID
        @XmlID public String getCustomerID();
        public void setCustomerID(String id);

        // .... other properties not shown
    }

   // By default, Invoice maps to a complex type xs:Invoice
   public class Invoice {

       // map by reference
       @XmlIDREF public Customer getCustomer();
       public void setCustomer(Customer customer);

      // .... other properties not shown here
   }

   // By default, Shipping maps to complex type xs:Shipping
   public class Shipping {

       // map by reference
       @XmlIDREF public Customer getCustomer();
       public void setCustomer(Customer customer);
   }

   // at least one class must reference Customer by containment;
   // Customer instances won't be marshalled.
   @XmlElement(name="CustomerData")
   public class CustomerData {
       // map reference to Customer by containment by default.
       public Customer getCustomer();

       // maps reference to Shipping by containment by default.
       public Shipping getShipping();

       // maps reference to Invoice by containment by default.
       public Invoice getInvoice();
   }

   <!-- XML Schema mapping for above code frament -->

   <xs:complexType name="Invoice">
     <xs:complexContent>
       <xs:sequence>
         <xs:element name="customer" type="xs:IDREF"/>
         ....
       </xs:sequence>
     </xs:complexContent>
   </xs:complexType>

   <xs:complexType name="Shipping">
     <xs:complexContent>
       <xs:sequence>
         <xs:element name="customer" type="xs:IDREF"/>
         ....
       </xs:sequence>
     </xs:complexContent>
   </xs:complexType>

   <xs:complexType name="Customer">
     <xs:complexContent>
       <xs:sequence>
         ....
       </xs:sequence>
       <xs:attribute name="CustomerID" type="xs:ID"/>
     </xs:complexContent>
   </xs:complexType>

   <xs:complexType name="CustomerData">
     <xs:complexContent>
       <xs:sequence>
         <xs:element name="customer" type="xs:Customer"/>
         <xs:element name="shipping" type="xs:Shipping"/>
         <xs:element name="invoice"  type="xs:Invoice"/>
       </xs:sequence>
     </xs:complexContent>
   </xs:complexType>

   <xs:element name"customerData" type="xs:CustomerData"/>

   <!-- Instance document conforming to the above XML Schema -->
    <customerData>
       <customer customerID="Alice">
           ....
       </customer>

       <shipping customer="Alice">
           ....
       </shipping>

       <invoice customer="Alice">
           ....
       </invoice>
   </customerData>

    Example 3: Mapping List to repeating element of type IDREF

         // Code fragment
     public class Shipping {
         @XmlIDREF
         @XmlElement(name="Alice")
             public List customers;
     }

     <!-- XML schema fragment -->
     <xs:complexType name="Shipping">
       <xs:sequence>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
           <xs:element name="Alice" type="xs:IDREF"/>
         </xs:choice>
       </xs:sequence>
     </xs:complexType>

    Example 4: Mapping a List to a list of elements of type IDREF.

         //Code fragment
     public class Shipping {
         @XmlIDREF
         @XmlElements(
             @XmlElement(name="Alice", type="Customer.class")
              @XmlElement(name="John", type="InternationalCustomer.class")
         public List customers;
     }

     <!-- XML Schema fragment -->
     <xs:complexType name="Shipping">
       <xs:sequence>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
           <xs:element name="Alice" type="xs:IDREF"/>
           <xs:element name="John" type="xs:IDREF"/>
         </xs:choice>
       </xs:sequence>
     </xs:complexType>
    Since:
    JAXB2.0
    See Also:
    XmlID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlInlineBinaryData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlInlineBinaryData

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,TYPE})
public @interface XmlInlineBinaryData
    Disable consideration of XOP encoding for datatypes that are bound to base64-encoded binary data in XML.

    When XOP encoding is enabled as described in AttachmentMarshaller.isXOPPackage(), this annotation disables datatypes such as Image or Source or byte[] that are bound to base64-encoded binary from being considered for XOP encoding. If a JAXB property is annotated with this annotation or if the JAXB property's base type is annotated with this annotation, neither AttachmentMarshaller.addMtomAttachment(DataHandler, String, String) nor AttachmentMarshaller.addMtomAttachment(byte[], int, int, String, String, String) is ever called for the property. The binary data will always be inlined.

    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlList

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,PARAMETER})
public @interface XmlList
    Used to map a property to a list simple type.

    Usage

    The @XmlList annotation can be used with the following program elements:

    • JavaBean property
    • field

    When a collection property is annotated just with @XmlElement, each item in the collection will be wrapped by an element. For example,

     @XmlRootElement
 class Foo {
     @XmlElement
     List<String> data;
 }
    would produce XML like this:
     <foo>
   <data>abc
   <data>def
 </foo>
    @XmlList annotation, on the other hand, allows multiple values to be represented as whitespace-separated tokens in a single element. For example,
     @XmlRootElement
 class Foo {
     @XmlElement
     @XmlList
     List<String> data;
 }
    the above code will produce XML like this:
     <foo>
   <data>abc def
 </foo>

    This annotation can be used with the following annotations: XmlElement, XmlAttribute, XmlValue, XmlIDREF.

    • The use of @XmlList with XmlValue while allowed, is redundant since XmlList maps a collection type to a simple schema type that derives by list just as XmlValue would.
    • The use of @XmlList with XmlAttribute while allowed, is redundant since XmlList maps a collection type to a simple schema type that derives by list just as XmlAttribute would.
    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlMixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlMixed

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlMixed

    Annotate a JavaBean multi-valued property to support mixed content.

    The usage is subject to the following constraints:

    • can be used with @XmlElementRef, @XmlElementRefs or @XmlAnyElement

    The following can be inserted into @XmlMixed annotated multi-valued property

    • XML text information items are added as values of java.lang.String.
    • Children element information items are added as instances of JAXBElement or instances with a class that is annotated with @XmlRootElement.
    • Unknown content that is not be bound to a JAXB mapped class is inserted as Element. (Assumes property annotated with @XmlAnyElement)
    Below is an example of binding and creation of mixed content.
      <!-- schema fragment having  mixed content -->
  <xs:complexType name="letterBody" mixed="true">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="quantity" type="xs:positiveInteger"/>
      <xs:element name="productName" type="xs:string"/>
      <!-- etc. -->
    </xs:sequence>
  </xs:complexType>
  <xs:element name="letterBody" type="letterBody"/>

 // Schema-derived Java code:
 // (Only annotations relevant to mixed content are shown below,
 //  others are ommitted.)
 import java.math.BigInteger;
 public class ObjectFactory {
      // element instance factories
      JAXBElement<LetterBody> createLetterBody(LetterBody value);
      JAXBElement<String>     createLetterBodyName(String value);
      JAXBElement<BigInteger> createLetterBodyQuantity(BigInteger value);
      JAXBElement<String>     createLetterBodyProductName(String value);
      // type instance factory
      LetterBody> createLetterBody();
 }

     public class LetterBody {
      // Mixed content can contain instances of Element classes
      // Name, Quantity and ProductName. Text data is represented as
      // java.util.String for text.
      @XmlMixed
      @XmlElementRefs({
              @XmlElementRef(name="productName", type=JAXBElement.class),
              @XmlElementRef(name="quantity", type=JAXBElement.class),
              @XmlElementRef(name="name", type=JAXBElement.class)})
      List getContent(){...}
 }
    The following is an XML instance document with mixed content
     <letterBody>
 Dear Mr.<name>Robert Smith</name>
 Your order of <quantity>1</quantity> <productName>Baby
 Monitor</productName> shipped from our warehouse. ....
 </letterBody>
    that can be constructed using following JAXB API calls.
     LetterBody lb = ObjectFactory.createLetterBody();
 JAXBElement<LetterBody> lbe = ObjectFactory.createLetterBody(lb);
 List gcl = lb.getContent();  //add mixed content to general content property.
 gcl.add("Dear Mr.");  // add text information item as a String.

 // add child element information item
 gcl.add(ObjectFactory.createLetterBodyName("Robert Smith"));
 gcl.add("Your order of "); // add text information item as a String

 // add children element information items
 gcl.add(ObjectFactory.
                      createLetterBodyQuantity(new BigInteger("1")));
 gcl.add(ObjectFactory.createLetterBodyProductName("Baby Monitor"));
 gcl.add("shipped from our warehouse");  // add text information item

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlRegistry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlRegistry

  • @Retention(value=RUNTIME)
 @Target(value=TYPE)
public @interface XmlRegistry
    Marks a class that has XmlElementDecls.
    Since:
    JAXB 2.0
    See Also:
    XmlElementDecl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlTransient

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlTransient

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,TYPE})
public @interface XmlTransient

    Prevents the mapping of a JavaBean property/type to XML representation.

    The @XmlTransient annotation is useful for resolving name collisions between a JavaBean property name and a field name or preventing the mapping of a field/property. A name collision can occur when the decapitalized JavaBean property name and a field name are the same. If the JavaBean property refers to the field, then the name collision can be resolved by preventing the mapping of either the field or the JavaBean property using the @XmlTransient annotation.

    When placed on a class, it indicates that the class shouldn't be mapped to XML by itself. Properties on such class will be mapped to XML along with its derived classes, as if the class is inlined.

    Usage

    The @XmlTransient annotation can be used with the following program elements:

    • a JavaBean property
    • field
    • class

    @XmlTransientis mutually exclusive with all other JAXB defined annotations.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Example: Resolve name collision between JavaBean property and field name

       // Example: Code fragment
   public class USAddress {

       // The field name "name" collides with the property name
       // obtained by bean decapitalization of getName() below
       @XmlTransient public String name;

       String getName() {..};
       String setName() {..};
   }

   <!-- Example: XML Schema fragment -->
   <xs:complexType name="USAddress">
     <xs:sequence>
       <xs:element name="name" type="xs:string"/>
     </xs:sequence>
   </xs:complexType>
    Since:
    JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlValue

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlValue

    Enables mapping a class to a XML Schema complex type with a simpleContent or a XML Schema simple type.

    Usage:

    The @XmlValue annotation can be used with the following program elements:

    • a JavaBean property.
    • non static, non transient field.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    The usage is subject to the following usage constraints:
    • At most one field or property can be annotated with the @XmlValue annotation.
    • @XmlValue can be used with the following annotations: XmlList. However this is redundant since XmlList maps a type to a simple schema type that derives by list just as XmlValue would.
    • If the type of the field or property is a collection type, then the collection item type must map to a simple schema type.
    • If the type of the field or property is not a collection type, then the type must map to a XML Schema simple type.

    If the annotated JavaBean property is the sole class member being mapped to XML Schema construct, then the class is mapped to a simple type. If there are additional JavaBean properties (other than the JavaBean property annotated with @XmlValue annotation) that are mapped to XML attributes, then the class is mapped to a complex type with simpleContent.

    Example 1: Map a class to XML Schema simpleType

     // Example 1: Code fragment
     public class USPrice {
         @XmlValue
         public java.math.BigDecimal price;
     }

     <!-- Example 1: XML Schema fragment -->
     <xs:simpleType name="USPrice">
       <xs:restriction base="xs:decimal"/>
     </xs:simpleType>

    Example 2: Map a class to XML Schema complexType with with simpleContent.

   // Example 2: Code fragment
   public class InternationalPrice {
       @XmlValue
       public java.math.BigDecimal price;

       @XmlAttribute
       public String currency;
   }

   <!-- Example 2: XML Schema fragment -->
   <xs:complexType name="InternationalPrice">
     <xs:simpleContent>
       <xs:extension base="xs:decimal">
         <xs:attribute name="currency" type="xs:string"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>

    Since:
    JAXB2.0
    See Also:
    XmlType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


adapters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind.annotation.adapters

XmlAdapter and its spec-defined sub-classes to allow arbitrary Java classes to be used with JAXB.

See: Description

  • Class Summary
    Class Description
    CollapsedStringAdapter
    Built-in XmlAdapter to handle xs:token and its derived types.
    HexBinaryAdapter
    XmlAdapter for xs:hexBinary.
    NormalizedStringAdapter
    XmlAdapter to handle xs:normalizedString.
    XmlAdapter<ValueType,BoundType>
    Adapts a Java type for custom marshaling.
    XmlJavaTypeAdapter.DEFAULT
    Used in XmlJavaTypeAdapter.type() to signal that the type be inferred from the signature of the field, property, parameter or the class.
  • Annotation Types Summary
    Annotation Type Description
    XmlJavaTypeAdapter
    Use an adapter that implements XmlAdapter for custom marshaling.
    XmlJavaTypeAdapters
    A container for multiple @XmlJavaTypeAdapter annotations.

Package javax.xml.bind.annotation.adapters Description

XmlAdapter and its spec-defined sub-classes to allow arbitrary Java classes to be used with JAXB.

Package Specification

  • JAXB Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • The JAXB Website
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind.annotation.adapters Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind.annotation.adapters

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
      • javax.xml.bind.annotation.adapters.CollapsedStringAdapter
      • javax.xml.bind.annotation.adapters.HexBinaryAdapter
      • javax.xml.bind.annotation.adapters.NormalizedStringAdapter
    • javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT

Annotation Type Hierarchy

  • javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter (implements java.lang.annotation.Annotation)
  • javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters (implements java.lang.annotation.Annotation)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind.annotation.adapters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind.annotation.adapters

  • Packages that use javax.xml.bind.annotation.adapters
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation.adapters
    XmlAdapter and its spec-defined sub-classes to allow arbitrary Java classes to be used with JAXB.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
  • Classes in javax.xml.bind.annotation.adapters used by javax.xml.bind
    Class and Description
    XmlAdapter
    Adapts a Java type for custom marshaling.
  • Classes in javax.xml.bind.annotation.adapters used by javax.xml.bind.annotation.adapters
    Class and Description
    XmlAdapter
    Adapts a Java type for custom marshaling.
  • Classes in javax.xml.bind.annotation.adapters used by javax.xml.bind.helpers
    Class and Description
    XmlAdapter
    Adapts a Java type for custom marshaling.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.CollapsedStringAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.CollapsedStringAdapter

No usage of javax.xml.bind.annotation.adapters.CollapsedStringAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.HexBinaryAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.HexBinaryAdapter

No usage of javax.xml.bind.annotation.adapters.HexBinaryAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.NormalizedStringAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.NormalizedStringAdapter

No usage of javax.xml.bind.annotation.adapters.NormalizedStringAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.XmlAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.XmlAdapter

  • Packages that use XmlAdapter
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation.adapters
    XmlAdapter and its spec-defined sub-classes to allow arbitrary Java classes to be used with JAXB.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of XmlAdapter in javax.xml.bind

      Methods in javax.xml.bind with type parameters of type XmlAdapter
      Modifier and Type Method and Description
      <A extends XmlAdapter>
      A             		Unmarshaller.getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      <A extends XmlAdapter>
      A             		Marshaller.getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      <A extends XmlAdapter>
      void             		Unmarshaller.setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      <A extends XmlAdapter>
      void             		Marshaller.setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this marshaller.
      Methods in javax.xml.bind with parameters of type XmlAdapter
      Modifier and Type Method and Description
      void Unmarshaller.setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      void Marshaller.setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this marshaller.

    • Uses of XmlAdapter in javax.xml.bind.annotation.adapters

      Subclasses of XmlAdapter in javax.xml.bind.annotation.adapters
      Modifier and Type Class and Description
      class  CollapsedStringAdapter
      Built-in XmlAdapter to handle xs:token and its derived types.
      class  HexBinaryAdapter
      XmlAdapter for xs:hexBinary.
      class  NormalizedStringAdapter
      XmlAdapter to handle xs:normalizedString.

    • Uses of XmlAdapter in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with type parameters of type XmlAdapter
      Modifier and Type Method and Description
      <A extends XmlAdapter>
      A             		AbstractUnmarshallerImpl.getAdapter(Class<A> type)
      <A extends XmlAdapter>
      A             		AbstractMarshallerImpl.getAdapter(Class<A> type)
      <A extends XmlAdapter>
      void             		AbstractUnmarshallerImpl.setAdapter(Class<A> type, A adapter)
      <A extends XmlAdapter>
      void             		AbstractMarshallerImpl.setAdapter(Class<A> type, A adapter)
      Methods in javax.xml.bind.helpers with parameters of type XmlAdapter
      Modifier and Type | Method and Description
      void | AbstractUnmarshallerImpl.setAdapter(XmlAdapter adapter)
      void | AbstractMarshallerImpl.setAdapter(XmlAdapter adapter)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

No usage of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT

No usage of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters

No usage of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CollapsedStringAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation.adapters

Class CollapsedStringAdapter

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      • javax.xml.bind.annotation.adapters.CollapsedStringAdapter

  • public class CollapsedStringAdapter
extends XmlAdapter<String,String>
    Built-in XmlAdapter to handle xs:token and its derived types.

    This adapter removes leading and trailing whitespaces, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.

    Since:
    JAXB 2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      CollapsedStringAdapter()

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      protected static boolean isWhiteSpace(char ch)
      returns true if the specified char is a white space character.
      String marshal(String s)
      No-op.
      String unmarshal(String text)
      Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CollapsedStringAdapter

        public CollapsedStringAdapter()

    • Method Detail

      • unmarshal

        public String unmarshal(String text)
        Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
        Specified by:
        unmarshal in class XmlAdapter<String,String>
        Parameters:
        text - The value to be converted. Can be null.

      • marshal

        public String marshal(String s)
        No-op. Just return the same string given as the parameter.
        Specified by:
        marshal in class XmlAdapter<String,String>
        Parameters:
        s - The value to be convereted. Can be null.

      • isWhiteSpace

        protected static boolean isWhiteSpace(char ch)
        returns true if the specified char is a white space character.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HexBinaryAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation.adapters

Class HexBinaryAdapter

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlAdapter<String,byte[]>
      • javax.xml.bind.annotation.adapters.HexBinaryAdapter

  • public final class HexBinaryAdapter
extends XmlAdapter<String,byte[]>
    XmlAdapter for xs:hexBinary.

    This XmlAdapter binds byte[] to the hexBinary representation in XML.

    Since:
    JAXB 2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      HexBinaryAdapter()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String marshal(byte[] bytes)
      Convert a bound type to a value type.
      byte[] unmarshal(String s)
      Convert a value type to a bound type.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • HexBinaryAdapter

        public HexBinaryAdapter()

    • Method Detail

      • unmarshal

        public byte[] unmarshal(String s)
        Description copied from class: XmlAdapter
        Convert a value type to a bound type.
        Specified by:
        unmarshal in class XmlAdapter<String,byte[]>
        Parameters:
        s - The value to be converted. Can be null.

      • marshal

        public String marshal(byte[] bytes)
        Description copied from class: XmlAdapter
        Convert a bound type to a value type.
        Specified by:
        marshal in class XmlAdapter<String,byte[]>
        Parameters:
        bytes - The value to be convereted. Can be null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NormalizedStringAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation.adapters

Class NormalizedStringAdapter

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      • javax.xml.bind.annotation.adapters.NormalizedStringAdapter

  • public final class NormalizedStringAdapter
extends XmlAdapter<String,String>
    XmlAdapter to handle xs:normalizedString.

    Replaces any tab, CR, and LF by a whitespace character ' ', as specified in the whitespace facet 'replace'

    Since:
    JAXB 2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      NormalizedStringAdapter()

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      protected static boolean isWhiteSpaceExceptSpace(char ch)
      Returns true if the specified char is a white space character but not 0x20.
      String marshal(String s)
      No-op.
      String unmarshal(String text)
      Replace any tab, CR, and LF by a whitespace character ' ', as specified in the whitespace facet 'replace'

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NormalizedStringAdapter

        public NormalizedStringAdapter()

    • Method Detail

      • unmarshal

        public String unmarshal(String text)
        Replace any tab, CR, and LF by a whitespace character ' ', as specified in the whitespace facet 'replace'
        Specified by:
        unmarshal in class XmlAdapter<String,String>
        Parameters:
        text - The value to be converted. Can be null.

      • marshal

        public String marshal(String s)
        No-op. Just return the same string given as the parameter.
        Specified by:
        marshal in class XmlAdapter<String,String>
        Parameters:
        s - The value to be convereted. Can be null.

      • isWhiteSpaceExceptSpace

        protected static boolean isWhiteSpaceExceptSpace(char ch)
        Returns true if the specified char is a white space character but not 0x20.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation.adapters

Class XmlAdapter<ValueType,BoundType>

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
  • Type Parameters:
    BoundType - The type that JAXB doesn't know how to handle. An adapter is written to allow this type to be used as an in-memory representation through the ValueType.
    ValueType - The type that JAXB knows how to handle out of the box.
    Direct Known Subclasses:
    CollapsedStringAdapter, HexBinaryAdapter, NormalizedStringAdapter

    public abstract class XmlAdapter<ValueType,BoundType>
extends Object
    Adapts a Java type for custom marshaling.

    Usage:

    Some Java types do not map naturally to a XML representation, for example HashMap or other non JavaBean classes. Conversely, a XML repsentation may map to a Java type but an application may choose to accesss the XML representation using another Java type. For example, the schema to Java binding rules bind xs:DateTime by default to XmlGregorianCalendar. But an application may desire to bind xs:DateTime to a custom type, MyXmlGregorianCalendar, for example. In both cases, there is a mismatch between bound type , used by an application to access XML content and the value type, that is mapped to an XML representation.

    This abstract class defines methods for adapting a bound type to a value type or vice versa. The methods are invoked by the JAXB binding framework during marshaling and unmarshalling:

    • XmlAdapter.marshal(...): During marshalling, JAXB binding framework invokes XmlAdapter.marshal(..) to adapt a bound type to value type, which is then marshaled to XML representation.
    • XmlAdapter.unmarshal(...): During unmarshalling, JAXB binding framework first unmarshals XML representation to a value type and then invokes XmlAdapter.unmarshal(..) to adapt the value type to a bound type.
    Writing an adapter therefore involves the following steps:
    • Write an adapter that implements this abstract class.
    • Install the adapter using the annotation XmlJavaTypeAdapter

    Example: Customized mapping of HashMap

    The following example illustrates the use of @XmlAdapter and @XmlJavaTypeAdapter to customize the mapping of a HashMap.

    Step 1: Determine the desired XML representation for HashMap.

         <hashmap>
         <entry key="id123">this is a value</entry>
         <entry key="id312">this is another value</entry>
         ...
       </hashmap>

    Step 2: Determine the schema definition that the desired XML representation shown above should follow.

     <xs:complexType name="myHashMapType">
       <xs:sequence>
         <xs:element name="entry" type="myHashMapEntryType"
                        minOccurs = "0" maxOccurs="unbounded"/>
       </xs:sequence>
     </xs:complexType>

     <xs:complexType name="myHashMapEntryType">
       <xs:simpleContent>
         <xs:extension base="xs:string">
           <xs:attribute name="key" type="xs:int"/>
         </xs:extension>
       </xs:simpleContent>
     </xs:complexType>

    Step 3: Write value types that can generate the above schema definition.

         public class MyHashMapType {
         List<MyHashMapEntryType> entry;
     }

     public class MyHashMapEntryType {
         @XmlAttribute
         public Integer key;

         @XmlValue
         public String value;
     }

    Step 4: Write the adapter that adapts the value type, MyHashMapType to a bound type, HashMap, used by the application.

         public final class MyHashMapAdapter extends
                        XmlAdapter<MyHashMapType,HashMap> { ... }

    Step 5: Use the adapter.

         public class Foo {
         @XmlJavaTypeAdapter(MyHashMapAdapter.class)
         HashMap hashmap;
         ...
     }
    The above code fragment will map to the following schema:
         <xs:complexType name="Foo">
       <xs:sequence>
         <xs:element name="hashmap" type="myHashMapType"
       </xs:sequence>
     </xs:complexType>
    Since:
    JAXB 2.0
    See Also:
    XmlJavaTypeAdapter

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected XmlAdapter()
      Do-nothing constructor for the derived classes.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract ValueType marshal(BoundType v)
      Convert a bound type to a value type.
      abstract BoundType unmarshal(ValueType v)
      Convert a value type to a bound type.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XmlAdapter

        protected XmlAdapter()
        Do-nothing constructor for the derived classes.

    • Method Detail

      • unmarshal

        public abstract BoundType unmarshal(ValueType v)
                             throws Exception
        Convert a value type to a bound type.
        Parameters:
        v - The value to be converted. Can be null.
        Throws:
        Exception - if there's an error during the conversion. The caller is responsible for reporting the error to the user through ValidationEventHandler.

      • marshal

        public abstract ValueType marshal(BoundType v)
                           throws Exception
        Convert a bound type to a value type.
        Parameters:
        v - The value to be convereted. Can be null.
        Throws:
        Exception - if there's an error during the conversion. The caller is responsible for reporting the error to the user through ValidationEventHandler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlJavaTypeAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation.adapters

Annotation Type XmlJavaTypeAdapter

  • @Retention(value=RUNTIME)
 @Target(value={PACKAGE,FIELD,METHOD,TYPE,PARAMETER})
public @interface XmlJavaTypeAdapter
    Use an adapter that implements XmlAdapter for custom marshaling.

    Usage:

    The @XmlJavaTypeAdapter annotation can be used with the following program elements:

    • a JavaBean property
    • field
    • parameter
    • package
    • from within XmlJavaTypeAdapters

    When @XmlJavaTypeAdapter annotation is defined on a class, it applies to all references to the class.

    When @XmlJavaTypeAdapter annotation is defined at the package level it applies to all references from within the package to @XmlJavaTypeAdapter.type().

    When @XmlJavaTypeAdapter annotation is defined on the field, property or parameter, then the annotation applies to the field, property or the parameter only.

    A @XmlJavaTypeAdapter annotation on a field, property or parameter overrides the @XmlJavaTypeAdapter annotation associated with the class being referenced by the field, property or parameter.

    A @XmlJavaTypeAdapter annotation on a class overrides the @XmlJavaTypeAdapter annotation specified at the package level for that class.

    This annotation can be used with the following other annotations: XmlElement, XmlAttribute, XmlElementRef, XmlElementRefs, XmlAnyElement. This can also be used at the package level with the following annotations: XmlAccessorType, XmlSchema, XmlSchemaType, XmlSchemaTypes.

    Example: See example in XmlAdapter

    Since:
    JAXB2.0
    See Also:
    XmlAdapter

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      Class<? extends XmlAdapter> value
      Points to the class that converts a value type to a bound type or vice versa.

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      Class type
      If this annotation is used at the package level, then value of the type() must be specified.

    • Element Detail

      • value

        public abstract Class<? extends XmlAdapter> value
        Points to the class that converts a value type to a bound type or vice versa. See XmlAdapter for more details.

      • type

        public abstract Class type
        If this annotation is used at the package level, then value of the type() must be specified.
        Default:
        javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT.class
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlJavaTypeAdapter.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation.adapters

Class XmlJavaTypeAdapter.DEFAULT

  • java.lang.Object
    • javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT
  • Enclosing class:
    XmlJavaTypeAdapter

    public static final class XmlJavaTypeAdapter.DEFAULT
extends Object
    Used in XmlJavaTypeAdapter.type() to signal that the type be inferred from the signature of the field, property, parameter or the class.

    • Constructor Summary

      Constructors
      Constructor and Description
      DEFAULT()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DEFAULT

        public DEFAULT()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlJavaTypeAdapters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation.adapters

Annotation Type XmlJavaTypeAdapters

  • @Retention(value=RUNTIME)
 @Target(value=PACKAGE)
public @interface XmlJavaTypeAdapters

    A container for multiple @XmlJavaTypeAdapter annotations.

    Multiple annotations of the same type are not allowed on a program element. This annotation therefore serves as a container annotation for multiple @XmlJavaTypeAdapter as follows:

     @XmlJavaTypeAdapters ({ @XmlJavaTypeAdapter(...),@XmlJavaTypeAdapter(...) })

    The @XmlJavaTypeAdapters annnotation is useful for defining XmlJavaTypeAdapter annotations for different types at the package level.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Since:
    JAXB2.0
    See Also:
    XmlJavaTypeAdapter

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      XmlJavaTypeAdapter[] value
      Collection of @XmlJavaTypeAdapter annotations

    • Element Detail

      • value

        public abstract XmlJavaTypeAdapter[] value
        Collection of @XmlJavaTypeAdapter annotations
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.W3CDomHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.W3CDomHandler

No usage of javax.xml.bind.annotation.W3CDomHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAccessOrder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAccessOrder

  • Packages that use XmlAccessOrder
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.

    • Uses of XmlAccessOrder in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return XmlAccessOrder
      Modifier and Type Method and Description
      static XmlAccessOrder XmlAccessOrder.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlAccessOrder[] XmlAccessOrder.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAccessorOrder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAccessorOrder

No usage of javax.xml.bind.annotation.XmlAccessorOrder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAccessorType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAccessorType

No usage of javax.xml.bind.annotation.XmlAccessorType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAccessType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAccessType

  • Packages that use XmlAccessType
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.

    • Uses of XmlAccessType in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return XmlAccessType
      Modifier and Type Method and Description
      static XmlAccessType XmlAccessType.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlAccessType[] XmlAccessType.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAnyAttribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAnyAttribute

No usage of javax.xml.bind.annotation.XmlAnyAttribute
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAnyElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAnyElement

No usage of javax.xml.bind.annotation.XmlAnyElement
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAttachmentRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAttachmentRef

No usage of javax.xml.bind.annotation.XmlAttachmentRef
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlAttribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlAttribute

No usage of javax.xml.bind.annotation.XmlAttribute
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElement

No usage of javax.xml.bind.annotation.XmlElement
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElement.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElement.DEFAULT

No usage of javax.xml.bind.annotation.XmlElement.DEFAULT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementDecl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementDecl

No usage of javax.xml.bind.annotation.XmlElementDecl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementDecl.GLOBAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementDecl.GLOBAL

No usage of javax.xml.bind.annotation.XmlElementDecl.GLOBAL
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementRef

No usage of javax.xml.bind.annotation.XmlElementRef
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementRef.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementRef.DEFAULT

No usage of javax.xml.bind.annotation.XmlElementRef.DEFAULT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementRefs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementRefs

No usage of javax.xml.bind.annotation.XmlElementRefs
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElements

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElements

No usage of javax.xml.bind.annotation.XmlElements
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlElementWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlElementWrapper

No usage of javax.xml.bind.annotation.XmlElementWrapper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlEnum

No usage of javax.xml.bind.annotation.XmlEnum
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlEnumValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlEnumValue

No usage of javax.xml.bind.annotation.XmlEnumValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlID

No usage of javax.xml.bind.annotation.XmlID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlIDREF

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlIDREF

No usage of javax.xml.bind.annotation.XmlIDREF
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlInlineBinaryData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlInlineBinaryData

No usage of javax.xml.bind.annotation.XmlInlineBinaryData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlList

No usage of javax.xml.bind.annotation.XmlList
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlMimeType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlMimeType

No usage of javax.xml.bind.annotation.XmlMimeType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlMixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlMixed

No usage of javax.xml.bind.annotation.XmlMixed
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlNs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlNs

No usage of javax.xml.bind.annotation.XmlNs
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlNsForm

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlNsForm

  • Packages that use XmlNsForm
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.

    • Uses of XmlNsForm in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return XmlNsForm
      Modifier and Type Method and Description
      static XmlNsForm XmlNsForm.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlNsForm[] XmlNsForm.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlRegistry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlRegistry

No usage of javax.xml.bind.annotation.XmlRegistry
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlRootElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlRootElement

  • Packages that use XmlRootElement
    Package Description
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of XmlRootElement in javax.xml.ws.wsaddressing

      Classes in javax.xml.ws.wsaddressing with annotations of type XmlRootElement
      Modifier and Type Class and Description
      class  W3CEndpointReference
      This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlSchema

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlSchema

No usage of javax.xml.bind.annotation.XmlSchema
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlSchemaType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlSchemaType

No usage of javax.xml.bind.annotation.XmlSchemaType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlSchemaType.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlSchemaType.DEFAULT

No usage of javax.xml.bind.annotation.XmlSchemaType.DEFAULT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlSchemaTypes

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlSchemaTypes

No usage of javax.xml.bind.annotation.XmlSchemaTypes
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlSeeAlso

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlSeeAlso

No usage of javax.xml.bind.annotation.XmlSeeAlso
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlTransient

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlTransient

  • Packages that use XmlTransient
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.

    • Uses of XmlTransient in javax.xml.ws

      Classes in javax.xml.ws with annotations of type XmlTransient
      Modifier and Type Class and Description
      class  EndpointReference
      This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlType

  • Packages that use XmlType
    Package Description
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of XmlType in javax.xml.ws.wsaddressing

      Classes in javax.xml.ws.wsaddressing with annotations of type XmlType
      Modifier and Type Class and Description
      class  W3CEndpointReference
      This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlType.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlType.DEFAULT

No usage of javax.xml.bind.annotation.XmlType.DEFAULT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.annotation.XmlValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.annotation.XmlValue

No usage of javax.xml.bind.annotation.XmlValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.annotation.DomHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.annotation.DomHandler

  • Packages that use DomHandler
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.

    • Uses of DomHandler in javax.xml.bind.annotation

      Classes in javax.xml.bind.annotation that implement DomHandler
      Modifier and Type Class and Description
      class  W3CDomHandler
      DomHandler implementation for W3C DOM (org.w3c.dom package.)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DomHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Interface DomHandler<ElementT,ResultT extends Result>

  • All Known Implementing Classes:
    W3CDomHandler

    public interface DomHandler<ElementT,ResultT extends Result>
    Converts an element (and its descendants) from/to DOM (or similar) representation.

    Implementations of this interface will be used in conjunction with XmlAnyElement annotation to map an element of XML into a representation of infoset such as W3C DOM.

    Implementations hide how a portion of XML is converted into/from such DOM-like representation, allowing JAXB providers to work with arbitrary such library.

    This interface is intended to be implemented by library writers and consumed by JAXB providers. None of those methods are intended to be called from applications.

    Since:
    JAXB2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ResultT createUnmarshaller(ValidationEventHandler errorHandler)
      When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object.
      ElementT getElement(ResultT rt)
      Once the portion is sent to the Result.
      Source marshal(ElementT n, ValidationEventHandler errorHandler)
      This method is called when a JAXB provider needs to marshal an element to XML.

    • Method Detail

      • createUnmarshaller

        ResultT createUnmarshaller(ValidationEventHandler errorHandler)
        When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object.

        A JAXB provider will then send a portion of the XML into the given result. Such a portion always form a subtree of the whole XML document rooted at an element.

        Parameters:
        errorHandler - if any error happens between the invocation of this method and the invocation of getElement(Result), they must be reported to this handler. The caller must provide a non-null error handler. The Result object created from this method may hold a reference to this error handler.
        Returns:
        null if the operation fails. The error must have been reported to the error handler.

      • getElement

        ElementT getElement(ResultT rt)
        Once the portion is sent to the Result. This method is called by a JAXB provider to obtain the unmarshalled element representation.

        Multiple invocations of this method may return different objects. This method can be invoked only when the whole sub-tree are fed to the Result object.

        Parameters:
        rt - The Result object created by createUnmarshaller(ValidationEventHandler).
        Returns:
        null if the operation fails. The error must have been reported to the error handler.

      • marshal

        Source marshal(ElementT n,
               ValidationEventHandler errorHandler)
        This method is called when a JAXB provider needs to marshal an element to XML.

        If non-null, the returned Source must contain a whole document rooted at one element, which will then be weaved into a bigger document that the JAXB provider is marshalling.

        Parameters:
        errorHandler - Receives any errors happened during the process of converting an element into a Source. The caller must provide a non-null error handler.
        Returns:
        null if there was an error. The error should have been reported to the handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


W3CDomHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class W3CDomHandler

  • java.lang.Object
    • javax.xml.bind.annotation.W3CDomHandler
  • All Implemented Interfaces:
    DomHandler<Element,DOMResult>

    public class W3CDomHandler
extends Object
implements DomHandler<Element,DOMResult>
    DomHandler implementation for W3C DOM (org.w3c.dom package.)
    Since:
    JAXB2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      W3CDomHandler()
      Default constructor.
      W3CDomHandler(DocumentBuilder builder)
      Constructor that allows applications to specify which DOM implementation to be used.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      DOMResult createUnmarshaller(ValidationEventHandler errorHandler)
      When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object.
      DocumentBuilder getBuilder()
      Element getElement(DOMResult r)
      Once the portion is sent to the Result.
      Source marshal(Element element, ValidationEventHandler errorHandler)
      This method is called when a JAXB provider needs to marshal an element to XML.
      void | setBuilder(DocumentBuilder builder)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • W3CDomHandler

        public W3CDomHandler()
        Default constructor. It is up to a JAXB provider to decide which DOM implementation to use or how that is configured.

      • W3CDomHandler

        public W3CDomHandler(DocumentBuilder builder)
        Constructor that allows applications to specify which DOM implementation to be used.
        Parameters:
        builder - must not be null. JAXB uses this DocumentBuilder to create a new element.

    • Method Detail

      • getBuilder

        public DocumentBuilder getBuilder()

      • setBuilder

        public void setBuilder(DocumentBuilder builder)

      • createUnmarshaller

        public DOMResult createUnmarshaller(ValidationEventHandler errorHandler)
        Description copied from interface: DomHandler
        When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object.

        A JAXB provider will then send a portion of the XML into the given result. Such a portion always form a subtree of the whole XML document rooted at an element.

        Specified by:
        createUnmarshaller in interface DomHandler<Element,DOMResult>
        Parameters:
        errorHandler - if any error happens between the invocation of this method and the invocation of DomHandler.getElement(Result), they must be reported to this handler. The caller must provide a non-null error handler. The Result object created from this method may hold a reference to this error handler.
        Returns:
        null if the operation fails. The error must have been reported to the error handler.

      • getElement

        public Element getElement(DOMResult r)
        Description copied from interface: DomHandler
        Once the portion is sent to the Result. This method is called by a JAXB provider to obtain the unmarshalled element representation.

        Multiple invocations of this method may return different objects. This method can be invoked only when the whole sub-tree are fed to the Result object.

        Specified by:
        getElement in interface DomHandler<Element,DOMResult>
        Parameters:
        r - The Result object created by DomHandler.createUnmarshaller(ValidationEventHandler).
        Returns:
        null if the operation fails. The error must have been reported to the error handler.

      • marshal

        public Source marshal(Element element,
                      ValidationEventHandler errorHandler)
        Description copied from interface: DomHandler
        This method is called when a JAXB provider needs to marshal an element to XML.

        If non-null, the returned Source must contain a whole document rooted at one element, which will then be weaved into a bigger document that the JAXB provider is marshalling.

        Specified by:
        marshal in interface DomHandler<Element,DOMResult>
        errorHandler - Receives any errors happened during the process of converting an element into a Source. The caller must provide a non-null error handler.
        Returns:
        null if there was an error. The error should have been reported to the handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAccessOrder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.bind.annotation

Enum XmlAccessOrder

  • java.lang.Object
    • java.lang.Enum<XmlAccessOrder>
      • javax.xml.bind.annotation.XmlAccessOrder
  • All Implemented Interfaces:
    Serializable, Comparable<XmlAccessOrder>

    public enum XmlAccessOrder
extends Enum<XmlAccessOrder>
    Used by XmlAccessorOrder to control the ordering of properties and fields in a JAXB bound class.
    Since:
    JAXB2.0
    See Also:
    XmlAccessorOrder

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ALPHABETICAL
      The ordering of fields and properties in a class is in alphabetical order as determined by the method java.lang.String.compareTo(String anotherString).
      UNDEFINED
      The ordering of fields and properties in a class is undefined.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static XmlAccessOrder valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlAccessOrder[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • UNDEFINED

        public static final XmlAccessOrder UNDEFINED
        The ordering of fields and properties in a class is undefined.

      • ALPHABETICAL

        public static final XmlAccessOrder ALPHABETICAL
        The ordering of fields and properties in a class is in alphabetical order as determined by the method java.lang.String.compareTo(String anotherString).

    • Method Detail

      • values

        public static XmlAccessOrder[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (XmlAccessOrder c : XmlAccessOrder.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static XmlAccessOrder valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAccessorOrder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAccessorOrder

  • @Inherited
 @Retention(value=RUNTIME)
 @Target(value={PACKAGE,TYPE})
public @interface XmlAccessorOrder

    Controls the ordering of fields and properties in a class.

    Usage

    @XmlAccessorOrder annotation can be used with the following program elements:

    • package
    • a top level class

    See "Package Specification" in javax.xml.bind package javadoc for additional common information.

    The effective XmlAccessOrder on a class is determined as follows:

    • If there is a @XmlAccessorOrder on a class, then it is used.
    • Otherwise, if a @XmlAccessorOrder exists on one of its super classes, then it is inherited (by the virtue of Inherited)
    • Otherwise, the @XmlAccessorOrder on the package of the class is used, if it's there.
    • Otherwise XmlAccessOrder.UNDEFINED.

    This annotation can be used with the following annotations: XmlType, XmlRootElement, XmlAccessorType, XmlSchema, XmlSchemaType, XmlSchemaTypes, , XmlJavaTypeAdapter. It can also be used with the following annotations at the package level: XmlJavaTypeAdapter.

    Since:
    JAXB2.0
    See Also:
    XmlAccessOrder

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      XmlAccessOrder value

    • Element Detail

      • value

        public abstract XmlAccessOrder value
        Default:
        javax.xml.bind.annotation.XmlAccessOrder.UNDEFINED
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAccessorType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAccessorType

  • @Inherited
 @Retention(value=RUNTIME)
 @Target(value={PACKAGE,TYPE})
public @interface XmlAccessorType

    Controls whether fields or Javabean properties are serialized by default.

    Usage

    @XmlAccessorType annotation can be used with the following program elements:

    • package
    • a top level class

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    This annotation provides control over the default serialization of properties and fields in a class.

    The annotation @XmlAccessorType on a package applies to all classes in the package. The following inheritance semantics apply:

    • If there is a @XmlAccessorType on a class, then it is used.
    • Otherwise, if a @XmlAccessorType exists on one of its super classes, then it is inherited.
    • Otherwise, the @XmlAccessorType on a package is inherited.

    Defaulting Rules:

    By default, if @XmlAccessorType on a package is absent, then the following package level annotation is assumed.

       @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)

    By default, if @XmlAccessorType on a class is absent, and none of its super classes is annotated with @XmlAccessorType, then the following default on the class is assumed:

       @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)

    This annotation can be used with the following annotations: XmlType, XmlRootElement, XmlAccessorOrder, XmlSchema, XmlSchemaType, XmlSchemaTypes, , XmlJavaTypeAdapter. It can also be used with the following annotations at the package level: XmlJavaTypeAdapter.

    Since:
    JAXB2.0
    See Also:
    XmlAccessType

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      XmlAccessType value
      Specifies whether fields or properties are serialized.

    • Element Detail

      • value

        public abstract XmlAccessType value
        Specifies whether fields or properties are serialized.
        See Also:
        XmlAccessType
        Default:
        javax.xml.bind.annotation.XmlAccessType.PUBLIC_MEMBER
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAccessType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.bind.annotation

Enum XmlAccessType

  • java.lang.Object
    • java.lang.Enum<XmlAccessType>
      • javax.xml.bind.annotation.XmlAccessType
  • All Implemented Interfaces:
    Serializable, Comparable<XmlAccessType>

    public enum XmlAccessType
extends Enum<XmlAccessType>
    Used by XmlAccessorType to control serialization of fields or properties.
    Since:
    JAXB2.0
    See Also:
    XmlAccessorType

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      FIELD
      Every non static, non transient field in a JAXB-bound class will be automatically bound to XML, unless annotated by XmlTransient.
      NONE
      None of the fields or properties is bound to XML unless they are specifically annotated with some of the JAXB annotations.
      PROPERTY
      Every getter/setter pair in a JAXB-bound class will be automatically bound to XML, unless annotated by XmlTransient.
      PUBLIC_MEMBER
      Every public getter/setter pair and every public field will be automatically bound to XML, unless annotated by XmlTransient.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static XmlAccessType valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlAccessType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • PROPERTY

        public static final XmlAccessType PROPERTY
        Every getter/setter pair in a JAXB-bound class will be automatically bound to XML, unless annotated by XmlTransient. Fields are bound to XML only when they are explicitly annotated by some of the JAXB annotations.

      • FIELD

        public static final XmlAccessType FIELD
        Every non static, non transient field in a JAXB-bound class will be automatically bound to XML, unless annotated by XmlTransient. Getter/setter pairs are bound to XML only when they are explicitly annotated by some of the JAXB annotations.

      • PUBLIC_MEMBER

        public static final XmlAccessType PUBLIC_MEMBER
        Every public getter/setter pair and every public field will be automatically bound to XML, unless annotated by XmlTransient. Fields or getter/setter pairs that are private, protected, or defaulted to package-only access are bound to XML only when they are explicitly annotated by the appropriate JAXB annotations.

      • NONE

        public static final XmlAccessType NONE
        None of the fields or properties is bound to XML unless they are specifically annotated with some of the JAXB annotations.

    • Method Detail

      • values

        public static XmlAccessType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (XmlAccessType c : XmlAccessType.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static XmlAccessType valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAnyElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAnyElement

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlAnyElement
    Maps a JavaBean property to XML infoset representation and/or JAXB element.

    This annotation serves as a "catch-all" property while unmarshalling xml content into a instance of a JAXB annotated class. It typically annotates a multi-valued JavaBean property, but it can occur on single value JavaBean property. During unmarshalling, each xml element that does not match a static @XmlElement or @XmlElementRef annotation for the other JavaBean properties on the class, is added to this "catch-all" property.

    Usages:

     @XmlAnyElement
 public Element[] others;

 // Collection of Element or JAXB elements.
 @XmlAnyElement(lax="true")
 public Object[] others;

 @XmlAnyElement
 private List<Element> nodes;

 @XmlAnyElement
 private Element node;

    Restriction usage constraints

    This annotation is mutually exclusive with XmlElement, XmlAttribute, XmlValue, XmlElements, XmlID, and XmlIDREF.

    There can be only one XmlAnyElement annotated JavaBean property in a class and its super classes.

    Relationship to other annotations

    This annotation can be used with XmlJavaTypeAdapter, so that users can map their own data structure to DOM, which in turn can be composed into XML.

    This annotation can be used with XmlMixed like this:

     // List of java.lang.String or DOM nodes.
 @XmlAnyElement @XmlMixed
 List<Object> others;

    Schema To Java example

    The following schema would produce the following Java class:
     <xs:complexType name="foo">
   <xs:sequence>
     <xs:element name="a" type="xs:int" />
     <xs:element name="b" type="xs:int" />
     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
   </xs:sequence>
 </xs:complexType>

     class Foo {
   int a;
   int b;
   @XmlAnyElement
   List<Element> any;
 }
    It can unmarshal instances like
     <foo xmlns:e="extra">
   <a>1
   <e:other />  // this will be bound to DOM, because unmarshalling is orderless
   <b>3
   <e:other />
   <c>5     // this will be bound to DOM, because the annotation doesn't remember namespaces.
 </foo>
    The following schema would produce the following Java class:
     <xs:complexType name="bar">
   <xs:complexContent>
   <xs:extension base="foo">
     <xs:sequence>
       <xs:element name="c" type="xs:int" />
       <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
     </xs:sequence>
   </xs:extension>
 </xs:complexType>

     class Bar extends Foo {
   int c;
   // Foo.getAny() also represents wildcard content for type definition bar.
 }
    It can unmarshal instances like
     <bar xmlns:e="extra">
   <a>1
   <e:other />  // this will be bound to DOM, because unmarshalling is orderless
   <b>3
   <e:other />
   <c>5     // this now goes to Bar.c
   <e:other />  // this will go to Foo.any
 </bar>

    Using XmlAnyElement with XmlElementRef

    The XmlAnyElement annotation can be used with XmlElementRefs to designate additional elements that can participate in the content tree.

    The following schema would produce the following Java class:

     <xs:complexType name="foo">
   <xs:choice maxOccurs="unbounded" minOccurs="0">
     <xs:element name="a" type="xs:int" />
     <xs:element name="b" type="xs:int" />
     <xs:any namespace="##other" processContents="lax" />
   </xs:choice>
 </xs:complexType>

     class Foo {
   @XmlAnyElement(lax="true")
   @XmlElementRefs({
     @XmlElementRef(name="a", type="JAXBElement.class")
     @XmlElementRef(name="b", type="JAXBElement.class")
   })
   List<Object> others;
 }

 @XmlRegistry
 class ObjectFactory {
   ...
   @XmlElementDecl(name = "a", namespace = "", scope = Foo.class)
   JAXBElement<Integer> createFooA( Integer i ) { ... }

   @XmlElementDecl(name = "b", namespace = "", scope = Foo.class)
   JAXBElement<Integer> createFooB( Integer i ) { ... }
    It can unmarshal instances like
     <foo xmlns:e="extra">
   <a>1     // this will unmarshal to a JAXBElement instance whose value is 1.
   <e:other />  // this will unmarshal to a DOM Element.
   <b>3     // this will unmarshal to a JAXBElement instance whose value is 1.
 </foo>

    W3C XML Schema "lax" wildcard emulation

    The lax element of the annotation enables the emulation of the "lax" wildcard semantics. For example, when the Java source code is annotated like this:
     @XmlRootElement
 class Foo {
   @XmlAnyElement(lax=true)
   public Object[] others;
 }
    then the following document will unmarshal like this:
     <foo>
   <unknown />
   <foo />
 </foo>

 Foo foo = unmarshal();
 // 1 for 'unknown', another for 'foo'
 assert foo.others.length==2;
 // 'unknown' unmarshals to a DOM element
 assert foo.others[0] instanceof Element;
 // because of lax=true, the 'foo' element eagerly
 // unmarshals to a Foo object.
 assert foo.others[1] instanceof Foo;
    Since:
    JAXB2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      boolean lax
      Controls the unmarshaller behavior when it sees elements known to the current JAXBContext.
      Class<? extends DomHandler> value
      Specifies the DomHandler which is responsible for actually converting XML from/to a DOM-like data structure.

    • Element Detail

      • lax

        public abstract boolean lax
        Controls the unmarshaller behavior when it sees elements known to the current JAXBContext.

        When false

        If false, all the elements that match the property will be unmarshalled to DOM, and the property will only contain DOM elements.

        When true

        If true, when an element matches a property marked with XmlAnyElement is known to JAXBContext (for example, there's a class with XmlRootElement that has the same tag name, or there's XmlElementDecl that has the same tag name), the unmarshaller will eagerly unmarshal this element to the JAXB object, instead of unmarshalling it to DOM. Additionally, if the element is unknown but it has a known xsi:type, the unmarshaller eagerly unmarshals the element to a JAXBElement, with the unknown element name and the JAXBElement value is set to an instance of the JAXB mapping of the known xsi:type.

        As a result, after the unmarshalling, the property can become heterogeneous; it can have both DOM nodes and some JAXB objects at the same time.

        This can be used to emulate the "lax" wildcard semantics of the W3C XML Schema.

        Default:
        false

      • value

        public abstract Class<? extends DomHandler> value
        Specifies the DomHandler which is responsible for actually converting XML from/to a DOM-like data structure.
        Default:
        javax.xml.bind.annotation.W3CDomHandler.class
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlAttribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlAttribute

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlAttribute

    Maps a JavaBean property to a XML attribute.

    Usage

    The @XmlAttribute annotation can be used with the following program elements:

    • JavaBean property
    • field

    A static final field is mapped to a XML fixed attribute.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    The usage is subject to the following constraints:
    • If type of the field or the property is a collection type, then the collection item type must be mapped to schema simple type.
           // Examples
     @XmlAttribute List<Integer> items; //legal
     @XmlAttribute List<Bar> foo; // illegal if Bar does not map to a schema simple type
    • If the type of the field or the property is a non collection type, then the type of the property or field must map to a simple schema type.
           // Examples
     @XmlAttribute int foo; // legal
     @XmlAttribute Foo foo; // illegal if Foo does not map to a schema simple type
    • This annotation can be used with the following annotations: XmlID, XmlIDREF, XmlList, XmlSchemaType, XmlValue, XmlAttachmentRef, XmlMimeType, XmlInlineBinaryData, XmlJavaTypeAdapter.

    Example 1: Map a JavaBean property to an XML attribute.

         //Example: Code fragment
     public class USPrice {
         @XmlAttribute
         public java.math.BigDecimal getPrice() {...} ;
         public void setPrice(java.math.BigDecimal ) {...};
     }

     <!-- Example: XML Schema fragment -->
     <xs:complexType name="USPrice">
       <xs:sequence>
       </xs:sequence>
       <xs:attribute name="price" type="xs:decimal"/>
     </xs:complexType>

    Example 2: Map a JavaBean property to an XML attribute with anonymous type.

    See Example 7 in @XmlType.

    Example 3: Map a JavaBean collection property to an XML attribute.

         // Example: Code fragment
     class Foo {
         ...
         @XmlAttribute List<Integer> items;
     }

     <!-- Example: XML Schema fragment -->
     <xs:complexType name="foo">
       ...
       <xs:attribute name="items">
         <xs:simpleType>
           <xs:list itemType="xs:int"/>
         </xs:simpleType>
     </xs:complexType>
    Since:
    JAXB2.0
    See Also:
    XmlType

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      Name of the XML Schema attribute.
      String namespace
      Specifies the XML target namespace of the XML Schema attribute.
      boolean required
      Specifies if the XML Schema attribute is optional or required.

    • Element Detail

      • name

        public abstract String name
        Name of the XML Schema attribute. By default, the XML Schema attribute name is derived from the JavaBean property name.
        Default:
        "##default"

      • required

        public abstract boolean required
        Specifies if the XML Schema attribute is optional or required. If true, then the JavaBean property is mapped to a XML Schema attribute that is required. Otherwise it is mapped to a XML Schema attribute that is optional.
        Default:
        false

      • namespace

        public abstract String namespace
        Specifies the XML target namespace of the XML Schema attribute.
        Default:
        "##default"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElement

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,PARAMETER})
public @interface XmlElement
    Maps a JavaBean property to a XML element derived from property name.

    Usage

    @XmlElement annotation can be used with the following program elements:

    • a JavaBean property
    • non static, non transient field
    • within XmlElements

    The usage is subject to the following constraints:
    • This annotation can be used with following annotations: XmlID, XmlIDREF, XmlList, XmlSchemaType, XmlValue, XmlAttachmentRef, XmlMimeType, XmlInlineBinaryData, XmlElementWrapper, XmlJavaTypeAdapter
    • if the type of JavaBean property is a collection type of array, an indexed property, or a parameterized list, and this annotation is used with XmlElements then, @XmlElement.type() must be DEFAULT.class since the collection item type is already known.

    A JavaBean property, when annotated with @XmlElement annotation is mapped to a local element in the XML Schema complex type to which the containing class is mapped.

    Example 1: Map a public non static non final field to local element

         //Example: Code fragment
     public class USPrice {
         @XmlElement(name="itemprice")
         public java.math.BigDecimal price;
     }

     <!-- Example: Local XML Schema element -->
     <xs:complexType name="USPrice"/>
       <xs:sequence>
         <xs:element name="itemprice" type="xs:decimal" minOccurs="0"/>
       </sequence>
     </xs:complexType>

    Example 2: Map a field to a nillable element.

     //Example: Code fragment
     public class USPrice {
         @XmlElement(nillable=true)
         public java.math.BigDecimal price;
     }

     <!-- Example: Local XML Schema element -->
     <xs:complexType name="USPrice">
       <xs:sequence>
         <xs:element name="price" type="xs:decimal" nillable="true" minOccurs="0"/>
       </sequence>
     </xs:complexType>

    Example 3: Map a field to a nillable, required element.

     //Example: Code fragment
     public class USPrice {
         @XmlElement(nillable=true, required=true)
         public java.math.BigDecimal price;
     }

     <!-- Example: Local XML Schema element -->
     <xs:complexType name="USPrice">
       <xs:sequence>
         <xs:element name="price" type="xs:decimal" nillable="true" minOccurs="1"/>
       </sequence>
     </xs:complexType>

    Example 4: Map a JavaBean property to an XML element with anonymous type.

    See Example 6 in @XmlType.

    Since:
    JAXB2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String defaultValue
      Default value of this element.
      String name
      Name of the XML Schema element.
      String namespace
      XML target namespace of the XML Schema element.
      boolean nillable
      Customize the element declaration to be nillable.
      boolean required
      Customize the element declaration to be required.
      Class type
      The Java class being referenced.

    • Element Detail

      • name

        public abstract String name
        Name of the XML Schema element.

        If the value is "##default", then element name is derived from the JavaBean property name.

        Default:
        "##default"

      • nillable

        public abstract boolean nillable
        Customize the element declaration to be nillable.

        If nillable() is true, then the JavaBean property is mapped to a XML Schema nillable element declaration.

        Default:
        false

      • required

        public abstract boolean required
        Customize the element declaration to be required.

        If required() is true, then Javabean property is mapped to an XML schema element declaration with minOccurs="1". maxOccurs is "1" for a single valued property and "unbounded" for a multivalued property.

        If required() is false, then the Javabean property is mapped to XML Schema element declaration with minOccurs="0". maxOccurs is "1" for a single valued property and "unbounded" for a multivalued property.

        Default:
        false

      • namespace

        public abstract String namespace
        XML target namespace of the XML Schema element.

        If the value is "##default", then the namespace is determined as follows:

        1. If the enclosing package has XmlSchema annotation, and its elementFormDefault is QUALIFIED, then the namespace of the enclosing class.
        2. Otherwise '' (which produces unqualified element in the default namespace.
        Default:
        "##default"

      • defaultValue

        public abstract String defaultValue
        Default value of this element.

        The

        ''
        value specified as a default of this annotation element is used as a poor-man's substitute for null to allow implementations to recognize the 'no default value' state.
        Default:
        "\u0000"

      • type

        public abstract Class type
        The Java class being referenced.
        Default:
        javax.xml.bind.annotation.XmlElement.DEFAULT.class
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElement.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class XmlElement.DEFAULT

  • java.lang.Object
    • javax.xml.bind.annotation.XmlElement.DEFAULT
  • Enclosing class:
    XmlElement

    public static final class XmlElement.DEFAULT
extends Object
    Used in XmlElement.type() to signal that the type be inferred from the signature of the property.

    • Constructor Summary

      Constructors
      Constructor and Description
      DEFAULT()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DEFAULT

        public DEFAULT()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementDecl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElementDecl

  • @Retention(value=RUNTIME)
 @Target(value=METHOD)
public @interface XmlElementDecl
    Maps a factory method to a XML element.

    Usage

    The annotation creates a mapping between an XML schema element declaration and a element factory method that returns a JAXBElement instance representing the element declaration. Typically, the element factory method is generated (and annotated) from a schema into the ObjectFactory class in a Java package that represents the binding of the element declaration's target namespace. Thus, while the annotation syntax allows @XmlElementDecl to be used on any method, semantically its use is restricted to annotation of element factory method. The usage is subject to the following constraints:
    • The class containing the element factory method annotated with @XmlElementDecl must be marked with XmlRegistry.
    • The element factory method must take one parameter assignable to Object.

    Example 1: Annotation on a factory method

         // Example: code fragment
     @XmlRegistry
     class ObjectFactory {
         @XmlElementDecl(name="foo")
         JAXBElement<String> createFoo(String s) { ... }
     }

         <!-- XML input -->
       <foo>string

     // Example: code fragment corresponding to XML input
     JAXBElement o =
     (JAXBElement)unmarshaller.unmarshal(aboveDocument);
     // print JAXBElement instance to show values
     System.out.println(o.getName());   // prints  "{}foo"
     System.out.println(o.getValue());  // prints  "string"
     System.out.println(o.getValue().getClass()); // prints "java.lang.String"

     <!-- Example: XML schema definition -->
     <xs:element name="foo" type="xs:string"/>

    Example 2: Element declaration with non local scope

    The following example illustrates the use of scope annotation parameter in binding of element declaration in schema derived code.

    The following example may be replaced in a future revision of this javadoc.

         <!-- Example: XML schema definition -->
     <xs:schema>
       <xs:complexType name="pea">
         <xs:choice maxOccurs="unbounded">
           <xs:element name="foo" type="xs:string"/>
           <xs:element name="bar" type="xs:string"/>
         </xs:choice>
       </xs:complexType>
       <xs:element name="foo" type="xs:int"/>
     </xs:schema>

         // Example: expected default binding
     class Pea {
         @XmlElementRefs({
             @XmlElementRef(name="foo",type=JAXBElement.class)
             @XmlElementRef(name="bar",type=JAXBElement.class)
         })
         List<JAXBElement<String>> fooOrBar;
     }

     @XmlRegistry
     class ObjectFactory {
         @XmlElementDecl(scope=Pea.class,name="foo")
         JAXBElement createPeaFoo(String s);

         @XmlElementDecl(scope=Pea.class,name="bar")
         JAXBElement createPeaBar(String s);

         @XmlElementDecl(name="foo")
         JAXBElement createFoo(Integer i);
     }
    Without scope createFoo and createPeaFoo would become ambiguous since both of them map to a XML schema element with the same local name "foo".
    Since:
    JAXB 2.0
    See Also:
    XmlRegistry

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String name
      local name of the XML element.

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String defaultValue
      Default value of this element.
      String namespace
      namespace name of the XML element.
      Class scope
      scope of the mapping.
      String substitutionHeadName
      XML local name of a substitution group's head element.
      String substitutionHeadNamespace
      namespace name of a substitution group's head XML element.

    • Element Detail

      • name

        public abstract String name
        local name of the XML element.

        Note to reviewers: There is no default name; since the annotation is on a factory method, it is not clear that the method name can be derived from the factory method name.

        See Also:
        namespace()

      • scope

        public abstract Class scope
        scope of the mapping.

        If this is not XmlElementDecl.GLOBAL, then this element declaration mapping is only active within the specified class.

        Default:
        javax.xml.bind.annotation.XmlElementDecl.GLOBAL.class

      • namespace

        public abstract String namespace
        namespace name of the XML element.

        If the value is "##default", then the value is the namespace name for the package of the class containing this factory method.

        See Also:
        name()
        Default:
        "##default"

      • substitutionHeadNamespace

        public abstract String substitutionHeadNamespace
        namespace name of a substitution group's head XML element.

        This specifies the namespace name of the XML element whose local name is specified by substitutionHeadName().

        If susbtitutionHeadName() is "", then this value can only be "##default". But the value is ignored since since this element is not part of susbtitution group when the value of susbstitutionHeadName() is "".

        If susbtitutionHeadName() is not "" and the value is "##default", then the namespace name is the namespace name to which the package of the containing class, marked with XmlRegistry, is mapped.

        If susbtitutionHeadName() is not "" and the value is not "##default", then the value is the namespace name.

        See Also:
        substitutionHeadName()
        Default:
        "##default"

      • substitutionHeadName

        public abstract String substitutionHeadName
        XML local name of a substitution group's head element.

        If the value is "", then this element is not part of any substitution group.

        See Also:
        substitutionHeadNamespace()
        Default:
        ""

      • defaultValue

        public abstract String defaultValue
        Default value of this element.

        The

        ''
        value specified as a default of this annotation element is used as a poor-man's substitute for null to allow implementations to recognize the 'no default value' state.
        Default:
        "\u0000"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementDecl.GLOBAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class XmlElementDecl.GLOBAL

  • java.lang.Object
    • javax.xml.bind.annotation.XmlElementDecl.GLOBAL
  • Enclosing class:
    XmlElementDecl

    public static final class XmlElementDecl.GLOBAL
extends Object
    Used in XmlElementDecl.scope() to signal that the declaration is in the global scope.

    • Constructor Summary

      Constructors
      Constructor and Description
      GLOBAL()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • GLOBAL

        public GLOBAL()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElementRef

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlElementRef

    Maps a JavaBean property to a XML element derived from property's type.

    Usage

    @XmlElementRef annotation can be used with a JavaBean property or from within XmlElementRefs

    This annotation dynamically associates an XML element name with the JavaBean property. When a JavaBean property is annotated with XmlElement, the XML element name is statically derived from the JavaBean property name. However, when this annotation is used, the XML element name is derived from the instance of the type of the JavaBean property at runtime.

    XML Schema substitution group support

    XML Schema allows a XML document author to use XML element names that were not statically specified in the content model of a schema using substitution groups. Schema derived code provides support for substitution groups using an element property, (section 5.5.5, "Element Property" of JAXB 2.0 specification). An element property method signature is of the form:
         public void setTerm(JAXBElement);
     public JAXBElement getTerm();

    An element factory method annotated with XmlElementDecl is used to create a JAXBElement instance, containing an XML element name. The presence of @XmlElementRef annotation on an element property indicates that the element name from JAXBElement instance be used instead of deriving an XML element name from the JavaBean property name.

    The usage is subject to the following constraints:

    • If the collection item type (for collection property) or property type (for single valued property) is JAXBElement, then @XmlElementRef}.name() and @XmlElementRef.namespace() must point an element factory method with an @XmlElementDecl annotation in a class annotated with @XmlRegistry (usually ObjectFactory class generated by the schema compiler) :
      • @XmlElementDecl.name() must equal @XmlElementRef.name()
      • @XmlElementDecl.namespace() must equal @XmlElementRef.namespace().
    • If the collection item type (for collection property) or property type (for single valued property) is not JAXBElement, then the type referenced by the property or field must be annotated with XmlRootElement.
    • This annotation can be used with the following annotations: XmlElementWrapper, XmlJavaTypeAdapter.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Example 1: Ant Task Example

    The following Java class hierarchy models an Ant build script. An Ant task corresponds to a class in the class hierarchy. The XML element name of an Ant task is indicated by the @XmlRootElement annotation on its corresponding class.
         @XmlRootElement(name="target")
     class Target {
         // The presence of @XmlElementRef indicates that the XML
         // element name will be derived from the @XmlRootElement
         // annotation on the type (for e.g. "jar" for JarTask).
         @XmlElementRef
         List<Task> tasks;
     }

     abstract class Task {
     }

     @XmlRootElement(name="jar")
     class JarTask extends Task {
         ...
     }

     @XmlRootElement(name="javac")
     class JavacTask extends Task {
         ...
     }

     <!-- XML Schema fragment -->
     <xs:element name="target" type="Target">
     <xs:complexType name="Target">
       <xs:sequence>
         <xs:choice maxOccurs="unbounded">
           <xs:element ref="jar">
           <xs:element ref="javac">
         </xs:choice>
       </xs:sequence>
     </xs:complexType>

    Thus the following code fragment:

         Target target = new Target();
     target.tasks.add(new JarTask());
     target.tasks.add(new JavacTask());
     marshal(target);
    will produce the following XML output:
         <target>
       <jar>
         ....
       </jar>
       <javac>
         ....
       </javac>
     </target>

    It is not an error to have a class that extends Task that doesn't have XmlRootElement. But they can't show up in an XML instance (because they don't have XML element names).

    Example 2: XML Schema Susbstitution group support

    The following example shows the annotations for XML Schema substitution groups. The annotations and the ObjectFactory are derived from the schema.

         @XmlElement
     class Math {
         //  The value of type()is
         //  JAXBElement.class , which indicates the XML
         //  element name ObjectFactory - in general a class marked
         //  with @XmlRegistry. (See ObjectFactory below)
         //
         //  The name() is "operator", a pointer to a
         // factory method annotated with a
         //  XmlElementDecl with the name "operator". Since
         //  "operator" is the head of a substitution group that
         //  contains elements "add" and "sub" elements, "operator"
         //  element can be substituted in an instance document by
         //  elements "add" or "sub". At runtime, JAXBElement
         //  instance contains the element name that has been
         //  substituted in the XML document.
         //
         @XmlElementRef(type=JAXBElement.class,name="operator")
         JAXBElement<? extends Operator> term;
     }

     @XmlRegistry
     class ObjectFactory {
         @XmlElementDecl(name="operator")
         JAXBElement<Operator> createOperator(Operator o) {...}
         @XmlElementDecl(name="add",substitutionHeadName="operator")
         JAXBElement<Operator> createAdd(Operator o) {...}
         @XmlElementDecl(name="sub",substitutionHeadName="operator")
         JAXBElement<Operator> createSub(Operator o) {...}
     }

     class Operator {
         ...
     }

    Thus, the following code fragment

         Math m = new Math();
     m.term = new ObjectFactory().createAdd(new Operator());
     marshal(m);
    will produce the following XML output:
         <math>
       <add>...</add>
     </math>
    Since:
    JAXB2.0
    See Also:
    XmlElementRefs

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      String namespace
      This parameter and name() are used to determine the XML element for the JavaBean property.
      boolean required
      Customize the element declaration to be required.
      Class type
      The Java type being referenced.

    • Element Detail

      • type

        public abstract Class type
        The Java type being referenced.

        If the value is DEFAULT.class, the type is inferred from the the type of the JavaBean property.

        Default:
        javax.xml.bind.annotation.XmlElementRef.DEFAULT.class

      • namespace

        public abstract String namespace
        This parameter and name() are used to determine the XML element for the JavaBean property.

        If type() is JAXBElement.class , then namespace() and name() point to a factory method with XmlElementDecl. The XML element name is the element name from the factory method's XmlElementDecl annotation or if an element from its substitution group (of which it is a head element) has been substituted in the XML document, then the element name is from the XmlElementDecl on the substituted element.

        If type() is not JAXBElement.class, then the XML element name is the XML element name statically associated with the type using the annotation XmlRootElement on the type. If the type is not annotated with an XmlElementDecl, then it is an error.

        If type() is not JAXBElement.class, then this value must be "".

        Default:
        ""

      • name

        public abstract String name
        See Also:
        namespace()
        Default:
        "##default"

      • required

        public abstract boolean required
        Customize the element declaration to be required.

        If required() is true, then Javabean property is mapped to an XML schema element declaration with minOccurs="1". maxOccurs is "1" for a single valued property and "unbounded" for a multivalued property.

        If required() is false, then the Javabean property is mapped to XML Schema element declaration with minOccurs="0". maxOccurs is "1" for a single valued property and "unbounded" for a multivalued property.

        For compatibility with JAXB 2.1, this property defaults to true, despite the fact that XmlElement.required() defaults to false.

        Since:
        2.2
        Default:
        true
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementRef.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class XmlElementRef.DEFAULT

  • java.lang.Object
    • javax.xml.bind.annotation.XmlElementRef.DEFAULT
  • Enclosing class:
    XmlElementRef

    public static final class XmlElementRef.DEFAULT
extends Object
    Used in XmlElementRef.type() to signal that the type be inferred from the signature of the property.

    • Constructor Summary

      Constructors
      Constructor and Description
      DEFAULT()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DEFAULT

        public DEFAULT()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementRefs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElementRefs

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlElementRefs
    Marks a property that refers to classes with XmlElement or JAXBElement.

    Compared to an element property (property with XmlElement annotation), a reference property has a different substitution semantics. When a sub-class is assigned to a property, an element property produces the same tag name with @xsi:type, whereas a reference property produces a different tag name (the tag name that's on the the sub-class.)

    This annotation can be used with the following annotations: XmlJavaTypeAdapter, XmlElementWrapper.

    Since:
    JAXB2.0
    See Also:
    XmlElementWrapper, XmlElementRef

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      XmlElementRef[] value

    • Element Detail

      • value

        public abstract XmlElementRef[] value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElements

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElements

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlElements

    A container for multiple @XmlElement annotations. Multiple annotations of the same type are not allowed on a program element. This annotation therefore serves as a container annotation for multiple @XmlElements as follows:

     @XmlElements({ @XmlElement(...),@XmlElement(...) })

    The @XmlElements annnotation can be used with the following program elements:

    • a JavaBean property
    • non static, non transient field
    This annotation is intended for annotation a JavaBean collection property (e.g. List).

    Usage

    The usage is subject to the following constraints:

    • This annotation can be used with the following annotations: @XmlIDREF, @XmlElementWrapper.
    • If @XmlIDREF is also specified on the JavaBean property, then each @XmlElement.type() must contain a JavaBean property annotated with @XmlID.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Example 1: Map to a list of elements

    // Mapped code fragment
    public class Foo {
        @XmlElements(
            @XmlElement(name="A", type=Integer.class),
            @XmlElement(name="B", type=Float.class)
         }
         public List items;
    }

    <!-- XML Representation for a List of {1,2.5}
            XML output is not wrapped using another element -->
    ...
    <A> 1 </A>
    <B> 2.5 </B>
    ...

    <!-- XML Schema fragment -->
    <xs:complexType name="Foo">
      <xs:sequence>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="A" type="xs:int"/>
          <xs:element name="B" type="xs:float"/>
        <xs:choice>
      </xs:sequence>
    </xs:complexType>

    Example 2: Map to a list of elements wrapped with another element

    // Mapped code fragment
    public class Foo {
        @XmlElementWrapper(name="bar")
        @XmlElements(
            @XmlElement(name="A", type=Integer.class),
            @XmlElement(name="B", type=Float.class)
        }
        public List items;
    }

    <!-- XML Schema fragment -->
    <xs:complexType name="Foo">
      <xs:sequence>
        <xs:element name="bar">
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="A" type="xs:int"/>
              <xs:element name="B" type="xs:float"/>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>

    Example 3: Change element name based on type using an adapter.

        class Foo {
       @XmlJavaTypeAdapter(QtoPAdapter.class)
       @XmlElements({
           @XmlElement(name="A",type=PX.class),
           @XmlElement(name="B",type=PY.class)
       })
       Q bar;
    }

    @XmlType abstract class P {...}
    @XmlType(name="PX") class PX extends P {...}
    @XmlType(name="PY") class PY extends P {...}

    <!-- XML Schema fragment -->
    <xs:complexType name="Foo">
      <xs:sequence>
        <xs:element name="bar">
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="A" type="PX"/>
              <xs:element name="B" type="PY"/>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
    Since:
    JAXB2.0
    See Also:
    XmlElement, XmlElementRef, XmlElementRefs, XmlJavaTypeAdapter

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      XmlElement[] value
      Collection of @XmlElement annotations

    • Element Detail

      • value

        public abstract XmlElement[] value
        Collection of @XmlElement annotations
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlElementWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlElementWrapper

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD})
public @interface XmlElementWrapper
    Generates a wrapper element around XML representation. This is primarily intended to be used to produce a wrapper XML element around collections. The annotation therefore supports two forms of serialization shown below.
        //Example: code fragment
      int[] names;

    // XML Serialization Form 1 (Unwrapped collection)
    <names> ... </names>
    <names> ... </names>

    // XML Serialization Form 2 ( Wrapped collection )
    <wrapperElement>
       <names> value-of-item </names>
       <names> value-of-item </names>
       ....
    </wrapperElement>

    The two serialized XML forms allow a null collection to be represented either by absence or presence of an element with a nillable attribute.

    Usage

    The @XmlElementWrapper annotation can be used with the following program elements:

    • JavaBean property
    • non static, non transient field

    The usage is subject to the following constraints:

    • The property must be a collection property
    • This annotation can be used with the following annotations: XmlElement, XmlElements, XmlElementRef, XmlElementRefs, XmlJavaTypeAdapter.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Since:
    JAXB2.0
    See Also:
    XmlElement, XmlElements, XmlElementRef, XmlElementRefs

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      Name of the XML wrapper element.
      String namespace
      XML target namespace of the XML wrapper element.
      boolean nillable
      If true, the absence of the collection is represented by using xsi:nil='true'.
      boolean required
      Customize the wrapper element declaration to be required.

    • Element Detail

      • name

        public abstract String name
        Name of the XML wrapper element. By default, the XML wrapper element name is derived from the JavaBean property name.
        Default:
        "##default"

      • namespace

        public abstract String namespace
        XML target namespace of the XML wrapper element.

        If the value is "##default", then the namespace is determined as follows:

        1. If the enclosing package has XmlSchema annotation, and its elementFormDefault is QUALIFIED, then the namespace of the enclosing class.
        2. Otherwise "" (which produces unqualified element in the default namespace.
        Default:
        "##default"

      • nillable

        public abstract boolean nillable
        If true, the absence of the collection is represented by using xsi:nil='true'. Otherwise, it is represented by the absence of the element.
        Default:
        false

      • required

        public abstract boolean required
        Customize the wrapper element declaration to be required.

        If required() is true, then the corresponding generated XML schema element declaration will have minOccurs="1", to indicate that the wrapper element is always expected.

        Note that this only affects the schema generation, and not the unmarshalling or marshalling capability. This is simply a mechanism to let users express their application constraints better.

        Since:
        JAXB 2.1
        Default:
        false
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlEnum

  • @Retention(value=RUNTIME)
 @Target(value=TYPE)
public @interface XmlEnum

    Maps an enum type Enum to XML representation.

    This annotation, together with XmlEnumValue provides a mapping of enum type to XML representation.

    Usage

    The @XmlEnum annotation can be used with the following program elements:

    • enum type

    The usage is subject to the following constraints:

    • This annotation can be used the following other annotations: XmlType, XmlRootElement

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information

    An enum type is mapped to a schema simple type with enumeration facets. The schema type is derived from the Java type to which @XmlEnum.value(). Each enum constant @XmlEnumValue must have a valid lexical representation for the type @XmlEnum.value() .

    Examples: See examples in XmlEnumValue

    Since:
    JAXB2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      Class<?> value
      Java type that is mapped to a XML simple type.

    • Element Detail

      • value

        public abstract Class<?> value
        Java type that is mapped to a XML simple type.
        Default:
        java.lang.String.class
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlEnumValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlEnumValue

  • @Retention(value=RUNTIME)
 @Target(value=FIELD)
public @interface XmlEnumValue
    Maps an enum constant in Enum type to XML representation.

    Usage

    The @XmlEnumValue annotation can be used with the following program elements:

    • enum constant

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    This annotation, together with XmlEnum provides a mapping of enum type to XML representation.

    An enum type is mapped to a schema simple type with enumeration facets. The schema type is derived from the Java type specified in @XmlEnum.value(). Each enum constant @XmlEnumValue must have a valid lexical representation for the type @XmlEnum.value()

    In the absence of this annotation, Enum.name() is used as the XML representation.

    Example 1: Map enum constant name -> enumeration facet

         //Example: Code fragment
     @XmlEnum(String.class)
     public enum Card { CLUBS, DIAMONDS, HEARTS, SPADES }

     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Card">
       <xs:restriction base="xs:string"/>
         <xs:enumeration value="CLUBS"/>
         <xs:enumeration value="DIAMONDS"/>
         <xs:enumeration value="HEARTS"/>
         <xs:enumeration value="SPADES"/>
     </xs:simpleType>

    Example 2: Map enum constant name(value) -> enumeration facet

         //Example: code fragment
     @XmlType
     @XmlEnum(Integer.class)
     public enum Coin {
         @XmlEnumValue("1") PENNY(1),
         @XmlEnumValue("5") NICKEL(5),
         @XmlEnumValue("10") DIME(10),
         @XmlEnumValue("25") QUARTER(25) }

     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Coin">
       <xs:restriction base="xs:int">
         <xs:enumeration value="1"/>
         <xs:enumeration value="5"/>
         <xs:enumeration value="10"/>
         <xs:enumeration value="25"/>
       </xs:restriction>
     </xs:simpleType>

    Example 3: Map enum constant name -> enumeration facet

         //Code fragment
     @XmlType
     @XmlEnum(Integer.class)
     public enum Code {
         @XmlEnumValue("1") ONE,
         @XmlEnumValue("2") TWO;
     }

     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Code">
       <xs:restriction base="xs:int">
         <xs:enumeration value="1"/>
         <xs:enumeration value="2"/>
       </xs:restriction>
     </xs:simpleType>
    Since:
    JAXB 2.0

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String value

    • Element Detail

      • value

        public abstract String value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlMimeType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlMimeType

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,PARAMETER})
public @interface XmlMimeType
    Associates the MIME type that controls the XML representation of the property.

    This annotation is used in conjunction with datatypes such as Image or Source that are bound to base64-encoded binary in XML.

    If a property that has this annotation has a sibling property bound to the xmime:contentType attribute, and if in the instance the property has a value, the value of the attribute takes precedence and that will control the marshalling.

    Since:
    JAXB2.0

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String value
      The textual representation of the MIME type, such as "image/jpeg" "image/*", "text/xml; charset=iso-8859-1" and so on.

    • Element Detail

      • value

        public abstract String value
        The textual representation of the MIME type, such as "image/jpeg" "image/*", "text/xml; charset=iso-8859-1" and so on.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlNs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlNs

  • @Retention(value=RUNTIME)
 @Target(value={})
public @interface XmlNs

    Associates a namespace prefix with a XML namespace URI.

    Usage

    @XmlNs annotation is intended for use from other program annotations.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Example:See XmlSchema annotation type for an example.

    Since:
    JAXB2.0

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String namespaceURI
      Namespace URI
      String prefix
      Namespace prefix

    • Element Detail

      • prefix

        public abstract String prefix
        Namespace prefix

      • namespaceURI

        public abstract String namespaceURI
        Namespace URI
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlNsForm

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.bind.annotation

Enum XmlNsForm

  • java.lang.Object
    • java.lang.Enum<XmlNsForm>
      • javax.xml.bind.annotation.XmlNsForm
  • All Implemented Interfaces:
    Serializable, Comparable<XmlNsForm>

    public enum XmlNsForm
extends Enum<XmlNsForm>
    Enumeration of XML Schema namespace qualifications.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Usage

    The namespace qualification values are used in the annotations defined in this packge. The enumeration values are mapped as follows:

    Enum Value | XML Schema Value
    UNQUALIFIED | unqualified
    QUALIFIED | qualified
    UNSET | namespace qualification attribute is absent from the XML Schema fragment

    Since:
    JAXB2.0

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      QUALIFIED
      UNQUALIFIED
      UNSET

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static XmlNsForm valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static XmlNsForm[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • UNQUALIFIED

        public static final XmlNsForm UNQUALIFIED

      • QUALIFIED

        public static final XmlNsForm QUALIFIED

      • UNSET

        public static final XmlNsForm UNSET

    • Method Detail

      • values

        public static XmlNsForm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (XmlNsForm c : XmlNsForm.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static XmlNsForm valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlRootElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlRootElement

  • @Retention(value=RUNTIME)
 @Target(value=TYPE)
public @interface XmlRootElement
    Maps a class or an enum type to an XML element.

    Usage

    The @XmlRootElement annotation can be used with the following program elements:

    • a top level class
    • an enum type

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    When a top level class or an enum type is annotated with the @XmlRootElement annotation, then its value is represented as XML element in an XML document.

    This annotation can be used with the following annotations: XmlType, XmlEnum, XmlAccessorType, XmlAccessorOrder.

    Example 1: Associate an element with XML Schema type

         // Example: Code fragment
     @XmlRootElement
     class Point {
        int x;
        int y;
        Point(int _x,int _y) {x=_x;y=_y;}
     }

         //Example: Code fragment corresponding to XML output
     marshal( new Point(3,5), System.out);

         <!-- Example: XML output -->
     <point>
       <x> 3
       <y> 5
     </point>
    The annotation causes an global element declaration to be produced in the schema. The global element declaration is associated with the XML schema type to which the class is mapped.
         <!-- Example: XML schema definition -->
     <xs:element name="point" type="point"/>
     <xs:complexType name="point">
       <xs:sequence>
         <xs:element name="x" type="xs:int"/>
         <xs:element name="y" type="xs:int"/>
       </xs:sequence>
     </xs:complexType>

    Example 2: Orthogonality to type inheritance

    An element declaration annotated on a type is not inherited by its derived types. The following example shows this.

         // Example: Code fragment
     @XmlRootElement
     class Point3D extends Point {
         int z;
         Point3D(int _x,int _y,int _z) {super(_x,_y);z=_z;}
     }

     //Example: Code fragment corresponding to XML output *
     marshal( new Point3D(3,5,0), System.out );

     <!-- Example: XML output -->
     <!-- The element name is point3D not point -->
     <point3D>
       <x>3</x>
       <y>5</y>
       <z>0</z>
     </point3D>

     <!-- Example: XML schema definition -->
     <xs:element name="point3D" type="point3D"/>
     <xs:complexType name="point3D">
       <xs:complexContent>
         <xs:extension base="point">
           <xs:sequence>
             <xs:element name="z" type="xs:int"/>
           </xs:sequence>
         </xs:extension>
       </xs:complexContent>
     </xs:complexType>
    Example 3: Associate a global element with XML Schema type to which the class is mapped.
         //Example: Code fragment
     @XmlRootElement(name="PriceElement")
     public class USPrice {
         @XmlElement
         public java.math.BigDecimal price;
     }

     <!-- Example: XML schema definition -->
     <xs:element name="PriceElement" type="USPrice"/>
     <xs:complexType name="USPrice">
       <xs:sequence>
         <xs:element name="price" type="xs:decimal"/>
       </sequence>
     </xs:complexType>
    Since:
    JAXB2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      local name of the XML element.
      String namespace
      namespace name of the XML element.

    • Element Detail

      • namespace

        public abstract String namespace
        namespace name of the XML element.

        If the value is "##default", then the XML namespace name is derived from the package of the class ( XmlSchema ). If the package is unnamed, then the XML namespace is the default empty namespace.

        Default:
        "##default"

      • name

        public abstract String name
        local name of the XML element.

        If the value is "##default", then the name is derived from the class name.

        Default:
        "##default"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlSchema

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlSchema

  • @Retention(value=RUNTIME)
 @Target(value=PACKAGE)
public @interface XmlSchema

    Maps a package name to a XML namespace.

    Usage

    The XmlSchema annotation can be used with the following program elements:

    • package

    This is a package level annotation and follows the recommendations and restrictions contained in JSR 175, section III, "Annotations". Thus the usage is subject to the following constraints and recommendations.

    • There can only be one package declaration as noted in JSR 175, section III, "Annotations".
    • JSR 175 recommends package-info.java for package level annotations. JAXB Providers that follow this recommendation will allow the package level annotations to be defined in package-info.java.

    Example 1: Customize name of XML namespace to which package is mapped.

        @javax.xml.bind.annotation.XmlSchema (
      namespace = "http://www.example.com/MYPO1"
    )

    <!-- XML Schema fragment -->
    <schema
      xmlns=...
      xmlns:po=....
      targetNamespace="http://www.example.com/MYPO1"
    >
    <!-- prefixes generated by default are implementation
            depedenent -->

    Example 2: Customize namespace prefix, namespace URI mapping

        // Package level annotation
    @javax.xml.bind.annotation.XmlSchema (
      xmlns = {
        @javax.xml.bind.annotation.XmlNs(prefix = "po",
                   namespaceURI="http://www.example.com/myPO1"),

        @javax.xml.bind.annotation.XmlNs(prefix="xs",
                   namespaceURI="http://www.w3.org/2001/XMLSchema")
      )
    )

    <!-- XML Schema fragment -->
    <schema
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:po="http://www.example.com/PO1"
        targetNamespace="http://www.example.com/PO1">

    Example 3: Customize elementFormDefault

        @javax.xml.bind.annotation.XmlSchema (
      elementFormDefault=XmlNsForm.UNQUALIFIED
      ...
    )

    <!-- XML Schema fragment -->
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:po="http://www.example.com/PO1"
        elementFormDefault="unqualified">
    Since:
    JAXB2.0

    • Field Summary

      Fields
      Modifier and Type Fields and Description
      static String NO_LOCATION
      The default value of the location() attribute, which indicates that the schema generator will generate components in this namespace.

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      XmlNsForm attributeFormDefault
      Namespace qualification for attributes.
      XmlNsForm elementFormDefault
      Namespace qualification for elements.
      String location
      Indicates that this namespace (specified by namespace()) has a schema already available exeternally, available at this location.
      String namespace
      Name of the XML namespace.
      XmlNs[] xmlns
      Customize the namespace URI, prefix associations.

    • Field Detail

      • NO_LOCATION

        public static final String NO_LOCATION
        The default value of the location() attribute, which indicates that the schema generator will generate components in this namespace.

    • Element Detail

      • xmlns

        public abstract XmlNs[] xmlns
        Customize the namespace URI, prefix associations. By default, the namespace prefixes for a XML namespace are generated by a JAXB Provider in an implementation dependent way.
        Default:
        {}

      • namespace

        public abstract String namespace
        Name of the XML namespace.
        Default:
        ""

      • elementFormDefault

        public abstract XmlNsForm elementFormDefault
        Namespace qualification for elements. By default, element default attribute will be absent from the XML Schema fragment.
        Default:
        javax.xml.bind.annotation.XmlNsForm.UNSET

      • attributeFormDefault

        public abstract XmlNsForm attributeFormDefault
        Namespace qualification for attributes. By default, attributesFormDefault will be absent from the XML Schema fragment.
        Default:
        javax.xml.bind.annotation.XmlNsForm.UNSET

      • location

        public abstract String location
        Indicates that this namespace (specified by namespace()) has a schema already available exeternally, available at this location.

        This instructs the JAXB schema generators to simply refer to the pointed schema, as opposed to generating components into the schema. This schema is assumed to match what would be otherwise produced by the schema generator (same element names, same type names...)

        This feature is intended to be used when a set of the Java classes is originally generated from an existing schema, hand-written to match externally defined schema, or the generated schema is modified manually.

        Value could be any absolute URI, like http://example.org/some.xsd. It is also possible to specify the empty string, to indicate that the schema is externally available but the location is unspecified (and thus it's the responsibility of the reader of the generate schema to locate it.) Finally, the default value of this property "##generate" indicates that the schema generator is going to generate components for this namespace (as it did in JAXB 2.0.)

        Multiple XmlSchema annotations on multiple packages are allowed to govern the same namespace(). In such case, all of them must have the same location() values.

        Note to implementor

        More precisely, the value must be either "", "##generate", or a valid lexical representation of xs:anyURI that begins with <scheme>:.

        A schema generator is expected to generate a corresponding <xs:import namespace="..." schemaLocation="..."/> (or no schemaLocation attribute at all if the empty string is specified.) However, the schema generator is allowed to use a different value in the schemaLocation attribute (including not generating such attribute), for example so that the user can specify a local copy of the resource through the command line interface.

        Since:
        JAXB2.1
        Default:
        "##generate"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlSchemaType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlSchemaType

  • @Retention(value=RUNTIME)
 @Target(value={FIELD,METHOD,PACKAGE})
public @interface XmlSchemaType
    Maps a Java type to a simple schema built-in type.

    Usage

    @XmlSchemaType annotation can be used with the following program elements:

    • a JavaBean property
    • field
    • package

    @XmlSchemaType annotation defined for Java type applies to all references to the Java type from a property/field. A @XmlSchemaType annotation specified on the property/field overrides the @XmlSchemaType annotation specified at the package level.

    This annotation can be used with the following annotations: XmlElement, XmlAttribute.

    Example 1: Customize mapping of XMLGregorianCalendar on the field.

         //Example: Code fragment
     public class USPrice {
         @XmlElement
         @XmlSchemaType(name="date")
         public XMLGregorianCalendar date;
     }

     <!-- Example: Local XML Schema element -->
     <xs:complexType name="USPrice"/>
       <xs:sequence>
         <xs:element name="date" type="xs:date"/>
       </sequence>
     </xs:complexType>

    Example 2: Customize mapping of XMLGregorianCalendar at package level

         package foo;
     @javax.xml.bind.annotation.XmlSchemaType(
          name="date", type=javax.xml.datatype.XMLGregorianCalendar.class)
     }
    Since:
    JAXB2.0

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      String name

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String namespace
      Class type
      If this annotation is used at the package level, then value of the type() must be specified.

    • Element Detail

      • name

        public abstract String name

      • namespace

        public abstract String namespace
        Default:
        "http://www.w3.org/2001/XMLSchema"

      • type

        public abstract Class type
        If this annotation is used at the package level, then value of the type() must be specified.
        Default:
        javax.xml.bind.annotation.XmlSchemaType.DEFAULT.class
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlSchemaType.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class XmlSchemaType.DEFAULT

  • java.lang.Object
    • javax.xml.bind.annotation.XmlSchemaType.DEFAULT
  • Enclosing class:
    XmlSchemaType

    public static final class XmlSchemaType.DEFAULT
extends Object
    Used in XmlSchemaType.type() to signal that the type be inferred from the signature of the property.

    • Constructor Summary

      Constructors
      Constructor and Description
      DEFAULT()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DEFAULT

        public DEFAULT()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlSchemaTypes

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlSchemaTypes

  • @Retention(value=RUNTIME)
 @Target(value=PACKAGE)
public @interface XmlSchemaTypes

    A container for multiple @XmlSchemaType annotations.

    Multiple annotations of the same type are not allowed on a program element. This annotation therefore serves as a container annotation for multiple @XmlSchemaType annotations as follows:

     @XmlSchemaTypes({ @XmlSchemaType(...), @XmlSchemaType(...) })

    The @XmlSchemaTypes annnotation can be used to define XmlSchemaType for different types at the package level.

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Since:
    JAXB2.0
    See Also:
    XmlSchemaType

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      XmlSchemaType[] value
      Collection of @XmlSchemaType annotations

    • Element Detail

      • value

        public abstract XmlSchemaType[] value
        Collection of @XmlSchemaType annotations
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlSeeAlso

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlSeeAlso

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
public @interface XmlSeeAlso
    Instructs JAXB to also bind other classes when binding this class.

    Java makes it impractical/impossible to list all sub-classes of a given class. This often gets in a way of JAXB users, as it JAXB cannot automatically list up the classes that need to be known to JAXBContext.

    For example, with the following class definitions:

     class Animal {}
 class Dog extends Animal {}
 class Cat extends Animal {}

    The user would be required to create JAXBContext as JAXBContext.newInstance(Dog.class,Cat.class) (Animal will be automatically picked up since Dog and Cat refers to it.)

    XmlSeeAlso annotation would allow you to write:

     @XmlSeeAlso({Dog.class,Cat.class})
 class Animal {}
 class Dog extends Animal {}
 class Cat extends Animal {}

    This would allow you to do JAXBContext.newInstance(Animal.class). By the help of this annotation, JAXB implementations will be able to correctly bind Dog and Cat.

    Since:
    JAXB2.1

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      Class[] value

    • Element Detail

      • value

        public abstract Class[] value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.bind.annotation

Annotation Type XmlType

  • @Retention(value=RUNTIME)
 @Target(value=TYPE)
public @interface XmlType

    Maps a class or an enum type to a XML Schema type.

    Usage

    The @XmlType annnotation can be used with the following program elements:

    • a top level class
    • an enum type

    See "Package Specification" in javax.xml.bind.package javadoc for additional common information.

    Mapping a Class

    A class maps to a XML Schema type. A class is a data container for values represented by properties and fields. A schema type is a data container for values represented by schema components within a schema type's content model (e.g. model groups, attributes etc).

    To be mapped, a class must either have a public no-arg constructor or a static no-arg factory method. The static factory method can be specified in factoryMethod() and factoryClass() annotation elements. The static factory method or the no-arg constructor is used during unmarshalling to create an instance of this class. If both are present, the static factory method overrides the no-arg constructor.

    A class maps to either a XML Schema complex type or a XML Schema simple type. The XML Schema type is derived based on the mapping of JavaBean properties and fields contained within the class. The schema type to which the class is mapped can either be named or anonymous. A class can be mapped to an anonymous schema type by annotating the class with @XmlType(name="").

    Either a global element, local element or a local attribute can be associated with an anonymous type as follows:

    • global element: A global element of an anonymous type can be derived by annotating the class with @XmlRootElement. See Example 3 below.
    • local element: A JavaBean property that references a class annotated with @XmlType(name="") and is mapped to the element associated with the anonymous type. See Example 4 below.
    • attribute: A JavaBean property that references a class annotated with @XmlType(name="") and is mapped to the attribute associated with the anonymous type. See Example 5 below.
    Mapping to XML Schema Complex Type
    • If class is annotated with @XmlType(name="") , it is mapped to an anonymous type otherwise, the class name maps to a complex type name. The XmlName() annotation element can be used to customize the name.
    • Properties and fields that are mapped to elements are mapped to a content model within a complex type. The annotation element propOrder() can be used to customize the content model to be xs:all or xs:sequence. It is used for specifying the order of XML elements in xs:sequence.
    • Properties and fields can be mapped to attributes within the complex type.
    • The targetnamespace of the XML Schema type can be customized using the annotation element namespace().

    Mapping class to XML Schema simple type

    A class can be mapped to a XML Schema simple type using the @XmlValue annotation. For additional details and examples, see @XmlValue annotation type.

    The following table shows the mapping of the class to a XML Schema complex type or simple type. The notational symbols used in the table are:

    • -> : represents a mapping
    • [x]+ : one or more occurances of x
    • [ @XmlValue property ]: JavaBean property annotated with @XmlValue
    • X : don't care
    Target propOrder ClassBody ComplexType SimpleType
    Class {} [property]+ -> elements complexcontent
    xs:all
    Class non empty [property]+ -> elements complexcontent
    xs:sequence
    Class X no property -> element complexcontent
    empty sequence
    Class X 1 [ @XmlValue property] &&
    [property]+ ->attributes     		simplecontent
    Class X 1 [ @XmlValue property ]&&
    no properties -> attribute     		simpletype

    Mapping an enum type

    An enum type maps to a XML schema simple type with enumeration facets. The following annotation elements are ignored since they are not meaningful: propOrder() , factoryMethod() , factoryClass() .

    Usage with other annotations

    This annotation can be used with the following annotations: XmlRootElement, XmlAccessorOrder, XmlAccessorType, XmlEnum. However, XmlAccessorOrder and XmlAccessorType are ignored when this annotation is used on an enum type.

    Example 1: Map a class to a complex type with xs:sequence with a customized ordering of JavaBean properties.

       @XmlType(propOrder={"street", "city" , "state", "zip", "name" })
   public class USAddress {
     String getName() {..};
     void setName(String) {..};

     String getStreet() {..};
     void setStreet(String) {..};

     String getCity() {..};
     void setCity(String) {..};

     String getState() {..};
     void setState(String) {..};

     java.math.BigDecimal getZip() {..};
     void setZip(java.math.BigDecimal) {..};
   }

   <!-- XML Schema mapping for USAddress -->
   <xs:complexType name="USAddress">
     <xs:sequence>
       <xs:element name="street" type="xs:string"/>
       <xs:element name="city" type="xs:string"/>
       <xs:element name="state" type="xs:string"/>
       <xs:element name="zip" type="xs:decimal"/>
       <xs:element name="name" type="xs:string"/>
     </xs:all>
   </xs:complexType>

    Example 2: Map a class to a complex type with xs:all

     @XmlType(propOrder={})
 public class USAddress { ...}

 <!-- XML Schema mapping for USAddress -->
 <xs:complexType name="USAddress">
   <xs:all>
     <xs:element name="name" type="xs:string"/>
     <xs:element name="street" type="xs:string"/>
     <xs:element name="city" type="xs:string"/>
     <xs:element name="state" type="xs:string"/>
     <xs:element name="zip" type="xs:decimal"/>
   </xs:sequence>
 </xs:complexType>

    Example 3: Map a class to a global element with an anonymous type.

       @XmlRootElement
   @XmlType(name="")
   public class USAddress { ...}

   <!-- XML Schema mapping for USAddress -->
   <xs:element name="USAddress">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="name" type="xs:string"/>
         <xs:element name="street" type="xs:string"/>
         <xs:element name="city" type="xs:string"/>
         <xs:element name="state" type="xs:string"/>
         <xs:element name="zip" type="xs:decimal"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>

    Example 4: Map a property to a local element with anonmyous type.

       //Example: Code fragment
   public class Invoice {
       USAddress addr;
           ...
       }

   @XmlType(name="")
   public class USAddress { ... }
   }

   <!-- XML Schema mapping for USAddress -->
   <xs:complexType name="Invoice">
     <xs:sequence>
       <xs:element name="addr">
         <xs:complexType>
           <xs:element name="name", type="xs:string"/>
           <xs:element name="city", type="xs:string"/>
           <xs:element name="city" type="xs:string"/>
           <xs:element name="state" type="xs:string"/>
           <xs:element name="zip" type="xs:decimal"/>
         </xs:complexType>
       ...
     </xs:sequence>
   </xs:complexType>

    Example 5: Map a property to an attribute with anonymous type.

     //Example: Code fragment
     public class Item {
         public String name;
         @XmlAttribute
         public USPrice price;
     }

     // map class to anonymous simple type.
     @XmlType(name="")
     public class USPrice {
         @XmlValue
         public java.math.BigDecimal price;
     }

     <!-- Example: XML Schema fragment -->
     <xs:complexType name="Item">
       <xs:sequence>
         <xs:element name="name" type="xs:string"/>
         <xs:attribute name="price">
           <xs:simpleType>
             <xs:restriction base="xs:decimal"/>
           </xs:simpleType>
         </xs:attribute>
       </xs:sequence>
     </xs:complexType>

    Example 6: Define a factoryClass and factoryMethod

          @XmlType(name="USAddressType", factoryClass=USAddressFactory.class,
      factoryMethod="getUSAddress")
      public class USAddress {

          private String city;
          private String name;
          private String state;
          private String street;
          private int    zip;

      public USAddress(String name, String street, String city,
          String state, int zip) {
          this.name = name;
          this.street = street;
          this.city = city;
          this.state = state;
          this.zip = zip;
      }
  }

  public class USAddressFactory {
      public static USAddress getUSAddress(){
       return new USAddress("Mark Baker", "23 Elm St",
          "Dayton", "OH", 90952);
  }

    Example 7: Define factoryMethod and use the default factoryClass

          @XmlType(name="USAddressType", factoryMethod="getNewInstance")
      public class USAddress {

          private String city;
          private String name;
          private String state;
          private String street;
          private int    zip;

          private USAddress() {}

          public static USAddress getNewInstance(){
              return new USAddress();
          }
      }
    Since:
    JAXB2.0
    See Also:
    XmlElement, XmlAttribute, XmlValue, XmlSchema

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      Class factoryClass
      Class containing a no-arg factory method for creating an instance of this class.
      String factoryMethod
      Name of a no-arg factory method in the class specified in factoryClass factoryClass().
      String name
      Name of the XML Schema type which the class is mapped.
      String namespace
      Name of the target namespace of the XML Schema type.
      String[] propOrder
      Specifies the order for XML Schema elements when class is mapped to a XML Schema complex type.

    • Element Detail

      • name

        public abstract String name
        Name of the XML Schema type which the class is mapped.
        Default:
        "##default"

      • propOrder

        public abstract String[] propOrder
        Specifies the order for XML Schema elements when class is mapped to a XML Schema complex type.

        Refer to the table for how the propOrder affects the mapping of class

        The propOrder is a list of names of JavaBean properties in the class. Each name in the list is the name of a Java identifier of the JavaBean property. The order in which JavaBean properties are listed is the order of XML Schema elements to which the JavaBean properties are mapped.

        All of the JavaBean properties being mapped to XML Schema elements must be listed.

        A JavaBean property or field listed in propOrder must not be transient or annotated with @XmlTransient.

        The default ordering of JavaBean properties is determined by @XmlAccessorOrder.

        Default:
        ""

      • namespace

        public abstract String namespace
        Name of the target namespace of the XML Schema type. By default, this is the target namespace to which the package containing the class is mapped.
        Default:
        "##default"

      • factoryClass

        public abstract Class factoryClass
        Class containing a no-arg factory method for creating an instance of this class. The default is this class.

        If factoryClass is DEFAULT.class and factoryMethod is "", then there is no static factory method.

        If factoryClass is DEFAULT.class and factoryMethod is not "", then factoryMethod is the name of a static factory method in this class.

        If factoryClass is not DEFAULT.class, then factoryMethod must not be "" and must be the name of a static factory method specified in factoryClass.

        Default:
        javax.xml.bind.annotation.XmlType.DEFAULT.class

      • factoryMethod

        public abstract String factoryMethod
        Name of a no-arg factory method in the class specified in factoryClass factoryClass().
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XmlType.DEFAULT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.annotation

Class XmlType.DEFAULT

  • java.lang.Object
    • javax.xml.bind.annotation.XmlType.DEFAULT
  • Enclosing class:
    XmlType

    public static final class XmlType.DEFAULT
extends Object
    Used in XmlType.factoryClass() to signal that either factory mehod is not used or that it's in the class with this XmlType itself.

    • Constructor Summary

      Constructors
      Constructor and Description
      DEFAULT()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DEFAULT

        public DEFAULT()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


attachment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind.attachment

This package is implemented by a MIME-based package processor that enables the interpretation and creation of optimized binary data within an MIME-based package format.

See: Description

  • Class Summary
    Class Description
    AttachmentMarshaller
    Enable JAXB marshalling to optimize storage of binary data.
    AttachmentUnmarshaller
    Enables JAXB unmarshalling of a root document containing optimized binary data formats.

Package javax.xml.bind.attachment Description

This package is implemented by a MIME-based package processor that enables the interpretation and creation of optimized binary data within an MIME-based package format.

Soap MTOM[1], XOP([2][3]) and WS-I AP[4] standardize approaches to optimized transmission of binary datatypes as an attachment. To optimally support these standards within a message passing environment, this package enables an integrated solution between a MIME-based package processor and JAXB unmarshall/marshal processes.

Package Specification

  • JAXB Specification

Related Standards

  • [1]SOAP Message Transmission Optimization Mechanism
  • [2]XML-binary Optimized Packaging
  • [3]WS-I Attachments Profile Version 1.0.
  • [4]Describing Media Content of Binary Data in XML
Since:
JAXB 2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind.attachment Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind.attachment

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.bind.attachment.AttachmentMarshaller
    • javax.xml.bind.attachment.AttachmentUnmarshaller
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind.attachment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind.attachment

  • Packages that use javax.xml.bind.attachment
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
  • Classes in javax.xml.bind.attachment used by javax.xml.bind
    Class and Description
    AttachmentMarshaller
    Enable JAXB marshalling to optimize storage of binary data.
    AttachmentUnmarshaller
    Enables JAXB unmarshalling of a root document containing optimized binary data formats.
  • Classes in javax.xml.bind.attachment used by javax.xml.bind.helpers
    Class and Description
    AttachmentMarshaller
    Enable JAXB marshalling to optimize storage of binary data.
    AttachmentUnmarshaller
    Enables JAXB unmarshalling of a root document containing optimized binary data formats.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttachmentMarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.attachment

Class AttachmentMarshaller

  • java.lang.Object
    • javax.xml.bind.attachment.AttachmentMarshaller

  • public abstract class AttachmentMarshaller
extends Object

    Enable JAXB marshalling to optimize storage of binary data.

    This API enables an efficient cooperative creation of optimized binary data formats between a JAXB marshalling process and a MIME-based package processor. A JAXB implementation marshals the root body of a MIME-based package, delegating the creation of referenceable MIME parts to the MIME-based package processor that implements this abstraction.

    XOP processing is enabled when isXOPPackage() is true. See addMtomAttachment(DataHandler, String, String) for details.

    WS-I Attachment Profile 1.0 is supported by addSwaRefAttachment(DataHandler) being called by the marshaller for each JAXB property related to {http://ws-i.org/profiles/basic/1.1/xsd}swaRef.

    Since:
    JAXB 2.0
    See Also:
    Marshaller.setAttachmentMarshaller(AttachmentMarshaller), XML-binary Optimized Packaging, WS-I Attachments Profile Version 1.0.

    • Constructor Summary

      Constructors
      Constructor and Description
      AttachmentMarshaller()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName)
      Consider binary data for optimized binary storage as an attachment.
      abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName)
      Consider MIME content data for optimized binary storage as an attachment.
      abstract String addSwaRefAttachment(DataHandler data)
      Add MIME data as an attachment and return attachment's content-id, cid.
      boolean isXOPPackage()
      Read-only property that returns true if JAXB marshaller should enable XOP creation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttachmentMarshaller

        public AttachmentMarshaller()

    • Method Detail

      • addMtomAttachment

        public abstract String addMtomAttachment(DataHandler data,
                                         String elementNamespace,
                                         String elementLocalName)

        Consider MIME content data for optimized binary storage as an attachment.

        This method is called by JAXB marshal process when isXOPPackage() is true, for each element whose datatype is "base64Binary", as described in Step 3 in Creating XOP Packages.

        The method implementor determines whether data shall be attached separately or inlined as base64Binary data. If the implementation chooses to optimize the storage of the binary data as a MIME part, it is responsible for attaching data to the MIME-based package, and then assigning an unique content-id, cid, that identifies the MIME part within the MIME message. This method returns the cid, which enables the JAXB marshaller to marshal a XOP element that refers to that cid in place of marshalling the binary data. When the method returns null, the JAXB marshaller inlines data as base64binary data.

        The caller of this method is required to meet the following constraint. If the element infoset item containing data has the attribute xmime:contentType or if the JAXB property/field representing datais annotated with a known MIME type, data.getContentType() should be set to that MIME type.

        The elementNamespace and elementLocalName parameters provide the context that contains the binary data. This information could be used by the MIME-based package processor to determine if the binary data should be inlined or optimized as an attachment.

        Parameters:
        data - represents the data to be attached. Must be non-null.
        elementNamespace - the namespace URI of the element that encloses the base64Binary data. Can be empty but never null.
        elementLocalName - The local name of the element. Always a non-null valid string.
        Returns:
        a valid content-id URI (see RFC 2387) that identifies the attachment containing data. Otherwise, null if the attachment was not added and should instead be inlined in the message.
        See Also:
        XML-binary Optimized Packaging, Describing Media Content of Binary Data in XML

      • addMtomAttachment

        public abstract String addMtomAttachment(byte[] data,
                                         int offset,
                                         int length,
                                         String mimeType,
                                         String elementNamespace,
                                         String elementLocalName)

        Consider binary data for optimized binary storage as an attachment.

        Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".

        The elementNamespace and elementLocalName parameters provide the context that contains the binary data. This information could be used by the MIME-based package processor to determine if the binary data should be inlined or optimized as an attachment.

        Parameters:
        data - represents the data to be attached. Must be non-null. The actual data region is specified by (data,offset,length) tuple.
        offset - The offset within the array of the first byte to be read; must be non-negative and no larger than array.length
        length - The number of bytes to be read from the given array; must be non-negative and no larger than array.length
        mimeType - If the data has an associated MIME type known to JAXB, that is passed as this parameter. If none is known, "application/octet-stream". This parameter may never be null.
        elementNamespace - the namespace URI of the element that encloses the base64Binary data. Can be empty but never null.
        elementLocalName - The local name of the element. Always a non-null valid string.
        Returns:
        content-id URI, cid, to the attachment containing data or null if data should be inlined.
        See Also:
        addMtomAttachment(DataHandler, String, String)

      • isXOPPackage

        public boolean isXOPPackage()

        Read-only property that returns true if JAXB marshaller should enable XOP creation.

        This value must not change during the marshalling process. When this value is true, the addMtomAttachment(...) method is invoked when the appropriate binary datatypes are encountered by the marshal process.

        Marshaller.marshal() must throw IllegalStateException if this value is true and the XML content to be marshalled violates Step 1 in Creating XOP Pacakges http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages. "Ensure the Original XML Infoset contains no element information item with a [namespace name] of "http://www.w3.org/2004/08/xop/include" and a [local name] of Include"

        When this method returns true and during the marshal process at least one call to addMtomAttachment(...) returns a content-id, the MIME-based package processor must label the root part with the application/xop+xml media type as described in Step 5 of Creating XOP Pacakges.

        Returns:
        true when MIME context is a XOP Package.

      • addSwaRefAttachment

        public abstract String addSwaRefAttachment(DataHandler data)

        Add MIME data as an attachment and return attachment's content-id, cid.

        This method is called by JAXB marshal process for each element/attribute typed as {http://ws-i.org/profiles/basic/1.1/xsd}swaRef. The MIME-based package processor implementing this method is responsible for attaching the specified data to a MIME attachment, and generating a content-id, cid, that uniquely identifies the attachment within the MIME-based package.

        Caller inserts the returned content-id, cid, into the XML content being marshalled.

        Parameters:
        data - represents the data to be attached. Must be non-null.
        Returns:
        must be a valid URI used as cid. Must satisfy Conformance Requirement R2928 from WS-I Attachments Profile Version 1.0.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttachmentUnmarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.attachment

Class AttachmentUnmarshaller

  • java.lang.Object
    • javax.xml.bind.attachment.AttachmentUnmarshaller

  • public abstract class AttachmentUnmarshaller
extends Object

    Enables JAXB unmarshalling of a root document containing optimized binary data formats.

    This API enables an efficient cooperative processing of optimized binary data formats between a JAXB 2.0 implementation and MIME-based package processor (MTOM/XOP and WS-I AP 1.0). JAXB unmarshals the body of a package, delegating the understanding of the packaging format being used to a MIME-based package processor that implements this abstract class.

    This abstract class identifies if a package requires XOP processing, isXOPPackage() and provides retrieval of binary content stored as attachments by content-id.

    Identifying the content-id, cid, to pass to getAttachment*(String cid)

    • For XOP processing, the infoset representation of the cid is described in step 2a in Section 3.2 Interpreting XOP Packages
    • For WS-I AP 1.0, the cid is identified as an element or attribute of type ref:swaRef specified in Section 4.4 Referencing Attachments from the SOAP Envelope
    Since:
    JAXB 2.0
    See Also:
    Unmarshaller.setAttachmentUnmarshaller(AttachmentUnmarshaller), XML-binary Optimized Packaging, WS-I Attachments Profile Version 1.0., Describing Media Content of Binary Data in XML

    • Constructor Summary

      Constructors
      Constructor and Description
      AttachmentUnmarshaller()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract byte[] getAttachmentAsByteArray(String cid)
      Retrieve the attachment identified by content-id, cid, as a byte[]
      abstract DataHandler getAttachmentAsDataHandler(String cid)
      Lookup MIME content by content-id, cid, and return as a DataHandler.
      boolean isXOPPackage()
      Read-only property that returns true if JAXB unmarshaller needs to perform XOP processing.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttachmentUnmarshaller

        public AttachmentUnmarshaller()

    • Method Detail

      • getAttachmentAsDataHandler

        public abstract DataHandler getAttachmentAsDataHandler(String cid)

        Lookup MIME content by content-id, cid, and return as a DataHandler.

        The returned DataHandler instance must be configured to meet the following required mapping constaint.
        Required Mappings between MIME and Java Types
        MIME Type | Java Type
        DataHandler.getContentType() | instanceof DataHandler.getContent()
        image/gif | java.awt.Image
        image/jpeg | java.awt.Image
        text/xml or application/xml | javax.xml.transform.Source
        Note that it is allowable to support additional mappings.

        Parameters:
        cid - It is expected to be a valid lexical form of the XML Schema xs:anyURI datatype. If isXOPPackage() ==true, it must be a valid URI per the cid: URI scheme (see RFC 2387)
        Returns:
        a DataHandler that represents the MIME attachment.
        Throws:
        IllegalArgumentException - if the attachment for the given cid is not found.

      • getAttachmentAsByteArray

        public abstract byte[] getAttachmentAsByteArray(String cid)

        Retrieve the attachment identified by content-id, cid, as a byte[]

        .
        Parameters:
        cid - It is expected to be a valid lexical form of the XML Schema xs:anyURI datatype. If isXOPPackage() ==true, it must be a valid URI per the cid: URI scheme (see RFC 2387)
        Returns:
        byte[] representation of attachment identified by cid.
        Throws:
        IllegalArgumentException - if the attachment for the given cid is not found.

      • isXOPPackage

        public boolean isXOPPackage()

        Read-only property that returns true if JAXB unmarshaller needs to perform XOP processing.

        This method returns true when the constraints specified in Identifying XOP Documents are met. This value must not change during the unmarshalling process.

        Returns:
        true when MIME context is a XOP Document.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.attachment.AttachmentMarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.attachment.AttachmentMarshaller

  • Packages that use AttachmentMarshaller
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of AttachmentMarshaller in javax.xml.bind

      Methods in javax.xml.bind that return AttachmentMarshaller
      Modifier and Type | Method and Description
      AttachmentMarshaller | Marshaller.getAttachmentMarshaller()
      Methods in javax.xml.bind with parameters of type AttachmentMarshaller
      Modifier and Type Method and Description
      void Marshaller.setAttachmentMarshaller(AttachmentMarshaller am)
      Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment.

    • Uses of AttachmentMarshaller in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return AttachmentMarshaller
      Modifier and Type | Method and Description
      AttachmentMarshaller | AbstractMarshallerImpl.getAttachmentMarshaller()
      Methods in javax.xml.bind.helpers with parameters of type AttachmentMarshaller
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.setAttachmentMarshaller(AttachmentMarshaller am)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.attachment.AttachmentUnmarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.attachment.AttachmentUnmarshaller

  • Packages that use AttachmentUnmarshaller
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of AttachmentUnmarshaller in javax.xml.bind

      Methods in javax.xml.bind that return AttachmentUnmarshaller
      Modifier and Type | Method and Description
      AttachmentUnmarshaller | Unmarshaller.getAttachmentUnmarshaller()
      Methods in javax.xml.bind with parameters of type AttachmentUnmarshaller
      Modifier and Type Method and Description
      void Unmarshaller.setAttachmentUnmarshaller(AttachmentUnmarshaller au)
      Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments.

    • Uses of AttachmentUnmarshaller in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return AttachmentUnmarshaller
      Modifier and Type | Method and Description
      AttachmentUnmarshaller | AbstractUnmarshallerImpl.getAttachmentUnmarshaller()
      Methods in javax.xml.bind.helpers with parameters of type AttachmentUnmarshaller
      Modifier and Type | Method and Description
      void | AbstractUnmarshallerImpl.setAttachmentUnmarshaller(AttachmentUnmarshaller au)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Binder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class Binder<XmlNode>

  • java.lang.Object
    • javax.xml.bind.Binder<XmlNode>

  • public abstract class Binder<XmlNode>
extends Object
    Enable synchronization between XML infoset nodes and JAXB objects representing same XML document.

    An instance of this class maintains the association between XML nodes of an infoset preserving view and a JAXB representation of an XML document. Navigation between the two views is provided by the methods getXMLNode(Object) and getJAXBNode(Object).

    Modifications can be made to either the infoset preserving view or the JAXB representation of the document while the other view remains unmodified. The binder is able to synchronize the changes made in the modified view back into the other view using the appropriate Binder update methods, updateXML(Object, Object) or updateJAXB(Object).

    A typical usage scenario is the following:

    • load XML document into an XML infoset representation
    • unmarshal(Object) XML infoset view to JAXB view. (Note to conserve resources, it is possible to only unmarshal a subtree of the XML infoset view to the JAXB view.)
    • application access/updates JAXB view of XML document.
    • updateXML(Object) synchronizes modifications to JAXB view back into the XML infoset view. Update operation preserves as much of original XML infoset as possible (i.e. comments, PI, ...)

    A Binder instance is created using the factory method JAXBContext.createBinder() or JAXBContext.createBinder(Class).

    The template parameter, XmlNode, is the root interface/class for the XML infoset preserving representation. A Binder implementation is required to minimally support an XmlNode value of org.w3c.dom.Node.class. A Binder implementation can support alternative XML infoset preserving representations.

    Since:
    JAXB 2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      Binder()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract ValidationEventHandler getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      abstract Object getJAXBNode(XmlNode xmlNode)
      Gets the JAXB object associated with the given XML element.
      abstract Object getProperty(String name)
      Get the particular property in the underlying implementation of Binder.
      abstract Schema getSchema()
      Gets the last Schema object (including null) set by the setSchema(Schema) method.
      abstract XmlNode getXMLNode(Object jaxbObject)
      Gets the XML element associated with the given JAXB object.
      abstract void marshal(Object jaxbObject, XmlNode xmlNode)
      Marshal a JAXB object tree to a new XML document.
      abstract void setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.
      abstract void setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Binder.
      abstract void setSchema(Schema schema)
      Specifies whether marshal, unmarshal and update methods performs validation on their XML content.
      abstract Object unmarshal(XmlNode xmlNode)
      Unmarshal XML infoset view to a JAXB object tree.
      abstract <T> JAXBElement<T> unmarshal(XmlNode xmlNode, Class<T> declaredType)
      Unmarshal XML root element by provided declaredType to a JAXB object tree.
      abstract Object updateJAXB(XmlNode xmlNode)
      Takes an XML node and updates its associated JAXB object and its descendants.
      abstract XmlNode updateXML(Object jaxbObject)
      Takes an JAXB object and updates its associated XML node and its descendants.
      abstract XmlNode updateXML(Object jaxbObject, XmlNode xmlNode)
      Changes in JAXB object tree are updated in its associated XML parse tree.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Binder

        public Binder()

    • Method Detail

      • unmarshal

        public abstract Object unmarshal(XmlNode xmlNode)
                          throws JAXBException
        Unmarshal XML infoset view to a JAXB object tree.

        This method is similar to Unmarshaller.unmarshal(Node) with the addition of maintaining the association between XML nodes and the produced JAXB objects, enabling future update operations, updateXML(Object, Object) or updateJAXB(Object).

        When getSchema() is non-null, xmlNode and its descendants is validated during this operation.

        This method throws UnmarshalException when the Binder's JAXBContext does not have a mapping for the XML element name or the type, specifiable via @xsi:type, of xmlNode to a JAXB mapped class. The method unmarshal(Object, Class) enables an application to specify the JAXB mapped class that the xmlNode should be mapped to.

        Parameters:
        xmlNode - the document/element to unmarshal XML data from.
        Returns:
        the newly created root object of the JAXB object tree.
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Binder is unable to perform the XML to Java binding.
        IllegalArgumentException - If the node parameter is null

      • unmarshal

        public abstract <T> JAXBElement<T> unmarshal(XmlNode xmlNode,
                                             Class<T> declaredType)
                                      throws JAXBException
        Unmarshal XML root element by provided declaredType to a JAXB object tree.

        Implements Unmarshal by Declared Type

        This method is similar to Unmarshaller.unmarshal(Node, Class) with the addition of maintaining the association between XML nodes and the produced JAXB objects, enabling future update operations, updateXML(Object, Object) or updateJAXB(Object).

        When getSchema() is non-null, xmlNode and its descendants is validated during this operation.

        Parameters:
        xmlNode - the document/element to unmarshal XML data from.
        declaredType - appropriate JAXB mapped class to hold node's XML data.
        Returns:
        JAXB Element representation of node
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Binder is unable to perform the XML to Java binding.
        IllegalArgumentException - If any of the input parameters are null
        Since:
        JAXB2.0

      • marshal

        public abstract void marshal(Object jaxbObject,
                             XmlNode xmlNode)
                      throws JAXBException
        Marshal a JAXB object tree to a new XML document.

        This method is similar to Marshaller.marshal(Object, Node) with the addition of maintaining the association between JAXB objects and the produced XML nodes, enabling future update operations such as updateXML(Object, Object) or updateJAXB(Object).

        When getSchema() is non-null, the marshalled xml content is validated during this operation.

        Parameters:
        jaxbObject - The content tree to be marshalled.
        xmlNode - The parameter must be a Node that accepts children.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Binder is unable to marshal jaxbObject (or any object reachable from jaxbObject).
        IllegalArgumentException - If any of the method parameters are null

      • getXMLNode

        public abstract XmlNode getXMLNode(Object jaxbObject)
        Gets the XML element associated with the given JAXB object.

        Once a JAXB object tree is associated with an XML fragment, this method enables navigation between the two trees.

        An association between an XML element and a JAXB object is established by the bind methods and the update methods. Note that this association is partial; not all XML elements have associated JAXB objects, and not all JAXB objects have associated XML elements.

        Parameters:
        jaxbObject - An instance that is reachable from a prior call to a bind or update method that returned a JAXB object tree.
        Returns:
        null if the specified JAXB object is not known to this Binder, or if it is not associated with an XML element.
        Throws:
        IllegalArgumentException - If the jaxbObject parameter is null

      • getJAXBNode

        public abstract Object getJAXBNode(XmlNode xmlNode)
        Gets the JAXB object associated with the given XML element.

        Once a JAXB object tree is associated with an XML fragment, this method enables navigation between the two trees.

        An association between an XML element and a JAXB object is established by the unmarshal, marshal and update methods. Note that this association is partial; not all XML elements have associated JAXB objects, and not all JAXB objects have associated XML elements.

        Returns:
        null if the specified XML node is not known to this Binder, or if it is not associated with a JAXB object.
        Throws:
        IllegalArgumentException - If the node parameter is null

      • updateXML

        public abstract XmlNode updateXML(Object jaxbObject)
                           throws JAXBException
        Takes an JAXB object and updates its associated XML node and its descendants.

        This is a convenience method of:

         updateXML( jaxbObject, getXMLNode(jaxbObject));
        Throws:
        JAXBException - If any unexpected problem occurs updating corresponding XML content.
        IllegalArgumentException - If the jaxbObject parameter is null

      • updateXML

        public abstract XmlNode updateXML(Object jaxbObject,
                                  XmlNode xmlNode)
                           throws JAXBException
        Changes in JAXB object tree are updated in its associated XML parse tree.

        This operation can be thought of as an "in-place" marshalling. The difference is that instead of creating a whole new XML tree, this operation updates an existing tree while trying to preserve the XML as much as possible.

        For example, unknown elements/attributes in XML that were not bound to JAXB will be left untouched (whereas a marshalling operation would create a new tree that doesn't contain any of those.)

        As a side-effect, this operation updates the association between XML nodes and JAXB objects.

        Parameters:
        jaxbObject - root of potentially modified JAXB object tree
        xmlNode - root of update target XML parse tree
        Returns:
        Returns the updated XML node. Typically, this is the same node you passed in as xmlNode, but it maybe a different object, for example when the tag name of the object has changed.
        Throws:
        JAXBException - If any unexpected problem occurs updating corresponding XML content.
        IllegalArgumentException - If any of the input parameters are null

      • updateJAXB

        public abstract Object updateJAXB(XmlNode xmlNode)
                           throws JAXBException
        Takes an XML node and updates its associated JAXB object and its descendants.

        This operation can be thought of as an "in-place" unmarshalling. The difference is that instead of creating a whole new JAXB tree, this operation updates an existing tree, reusing as much JAXB objects as possible.

        As a side-effect, this operation updates the association between XML nodes and JAXB objects.

        Returns:
        Returns the updated JAXB object. Typically, this is the same object that was returned from earlier marshal(Object,Object) or updateJAXB(Object) method invocation, but it maybe a different object, for example when the name of the XML element has changed.
        Throws:
        JAXBException - If any unexpected problem occurs updating corresponding JAXB mapped content.
        IllegalArgumentException - If node parameter is null

      • setSchema

        public abstract void setSchema(Schema schema)
        Specifies whether marshal, unmarshal and update methods performs validation on their XML content.
        Parameters:
        schema - set to null to disable validation.
        See Also:
        Unmarshaller.setSchema(Schema)

      • getSchema

        public abstract Schema getSchema()
        Gets the last Schema object (including null) set by the setSchema(Schema) method.
        Returns:
        the Schema object for validation or null if not present

      • setEventHandler

        public abstract void setEventHandler(ValidationEventHandler handler)
                              throws JAXBException
        Allow an application to register a ValidationEventHandler.

        The ValidationEventHandler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the Binder unmarshal, marshal and update methods.

        Calling this method with a null parameter will cause the Binder to revert back to the default default event handler.

        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler

      • getEventHandler

        public abstract ValidationEventHandler getEventHandler()
                                                throws JAXBException
        Return the current event handler or the default event handler if one hasn't been set.
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler

      • setProperty

        public abstract void setProperty(String name,
                                 Object value)
                          throws PropertyException
        Set the particular property in the underlying implementation of Binder. This method can only be used to set one of the standard JAXB defined unmarshal/marshal properties or a provider specific property for binder, unmarshal or marshal. Attempting to set an undefined property will result in a PropertyException being thrown. See Supported Unmarshal Properties and Supported Marshal Properties.
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value
        IllegalArgumentException - If the name parameter is null

      • getProperty

        public abstract Object getProperty(String name)
                            throws PropertyException
        Get the particular property in the underlying implementation of Binder. This method can only be used to get one of the standard JAXB defined unmarshal/marshal properties or a provider specific property for binder, unmarshal or marshal. Attempting to get an undefined property will result in a PropertyException being thrown. See Supported Unmarshal Properties and Supported Marshal Properties.
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name
        IllegalArgumentException - If the name parameter is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.Binder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.Binder

  • Packages that use Binder
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of Binder in javax.xml.bind

      Methods in javax.xml.bind that return Binder
      Modifier and Type Method and Description
      Binder<Node> JAXBContext.createBinder()
      Creates a Binder for W3C DOM.
      <T> Binder<T> JAXBContext.createBinder(Class<T> domType)
      Creates a Binder object that can be used for associative/in-place unmarshalling/marshalling.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.DataBindingException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.DataBindingException

No usage of javax.xml.bind.DataBindingException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.DatatypeConverter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.DatatypeConverter

No usage of javax.xml.bind.DatatypeConverter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXB

No usage of javax.xml.bind.JAXB
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBContext

  • Packages that use JAXBContext
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of JAXBContext in javax.xml.bind

      Methods in javax.xml.bind that return JAXBContext
      Modifier and Type Method and Description
      static JAXBContext JAXBContext.newInstance(Class... classesToBeBound)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(Class[] classesToBeBound, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath, ClassLoader classLoader)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath, ClassLoader classLoader, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.

    • Uses of JAXBContext in javax.xml.bind.util

      Constructors in javax.xml.bind.util with parameters of type JAXBContext
      Constructor and Description
      JAXBResult(JAXBContext context)
      Creates a new instance that uses the specified JAXBContext to unmarshal.
      JAXBSource(JAXBContext context, Object contentObject)
      Creates a new Source for the given content object.

    • Uses of JAXBContext in javax.xml.ws

      Methods in javax.xml.ws with parameters of type JAXBContext
      Modifier and Type Method and Description
      Dispatch<Object> Service.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      Object LogicalMessage.getPayload(JAXBContext context)
      Gets the message payload as a JAXB object.
      void LogicalMessage.setPayload(Object payload, JAXBContext context)
      Sets the message payload

    • Uses of JAXBContext in javax.xml.ws.handler.soap

      Methods in javax.xml.ws.handler.soap with parameters of type JAXBContext
      Modifier and Type Method and Description
      Object[] SOAPMessageContext.getHeaders(QName header, JAXBContext context, boolean allRoles)
      Gets headers that have a particular qualified name from the message in the message context.

    • Uses of JAXBContext in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type JAXBContext
      Modifier and Type Method and Description
      abstract Dispatch<Object> ServiceDelegate.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBElement

  • Packages that use JAXBElement
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of JAXBElement in javax.xml.bind

      Methods in javax.xml.bind that return JAXBElement
      Modifier and Type Method and Description
      <T> JAXBElement<T> Unmarshaller.unmarshal(Node node, Class<T> declaredType)
      Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(Source source, Class<T> declaredType)
      Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLEventReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.
      abstract <T> JAXBElement<T> Binder.unmarshal(XmlNode xmlNode, Class<T> declaredType)
      Unmarshal XML root element by provided declaredType to a JAXB object tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLStreamReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

    • Uses of JAXBElement in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return JAXBElement
      Modifier and Type | Method and Description
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Node node, Class<T> expectedType)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Source source, Class<T> expectedType)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader, Class<T> expectedType)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader, Class<T> expectedType)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBElement.GlobalScope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBElement.GlobalScope

No usage of javax.xml.bind.JAXBElement.GlobalScope
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBException

  • Packages that use JAXBException
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of JAXBException in javax.xml.bind

      Subclasses of JAXBException in javax.xml.bind
      Modifier and Type Class and Description
      class  MarshalException
      This exception indicates that an error has occurred while performing a marshal operation that the provider is unable to recover from.
      class  PropertyException
      This exception indicates that an error was encountered while getting or setting a property.
      class  UnmarshalException
      This exception indicates that an error has occurred while performing an unmarshal operation that prevents the JAXB Provider from completing the operation.
      class  ValidationException
      This exception indicates that an error has occurred while performing a validate operation.
      Methods in javax.xml.bind that throw JAXBException
      Modifier and Type Method and Description
      abstract Marshaller JAXBContext.createMarshaller()
      Create a Marshaller object that can be used to convert a java content tree into XML data.
      abstract Unmarshaller JAXBContext.createUnmarshaller()
      Create an Unmarshaller object that can be used to convert XML data into a java content tree.
      abstract Validator JAXBContext.createValidator()
      Deprecated.
      since JAXB2.0
      ValidationEventHandler Unmarshaller.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      ValidationEventHandler Validator.getEventHandler()
      Deprecated.
      since JAXB2.0
      ValidationEventHandler Marshaller.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      abstract ValidationEventHandler Binder.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      Node Marshaller.getNode(Object contentTree)
      Get a DOM tree view of the content tree(Optional).
      Object UnmarshallerHandler.getResult()
      Obtains the unmarshalled result.
      boolean Unmarshaller.isValidating()
      Deprecated.
      since JAXB2.0, please see Unmarshaller.getSchema()
      void Marshaller.marshal(Object jaxbElement, ContentHandler handler)
      Marshal the content tree rooted at jaxbElement into SAX2 events.
      void Marshaller.marshal(Object jaxbElement, File output)
      Marshal the content tree rooted at jaxbElement into a file.
      void Marshaller.marshal(Object jaxbElement, Node node)
      Marshal the content tree rooted at jaxbElement into a DOM tree.
      void Marshaller.marshal(Object jaxbElement, OutputStream os)
      Marshal the content tree rooted at jaxbElement into an output stream.
      void Marshaller.marshal(Object jaxbElement, Result result)
      Marshal the content tree rooted at jaxbElement into the specified javax.xml.transform.Result.
      void Marshaller.marshal(Object jaxbElement, Writer writer)
      Marshal the content tree rooted at jaxbElement into a Writer.
      void Marshaller.marshal(Object jaxbElement, XMLEventWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLEventWriter.
      abstract void Binder.marshal(Object jaxbObject, XmlNode xmlNode)
      Marshal a JAXB object tree to a new XML document.
      void Marshaller.marshal(Object jaxbElement, XMLStreamWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.
      static JAXBContext JAXBContext.newInstance(Class... classesToBeBound)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(Class[] classesToBeBound, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath, ClassLoader classLoader)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext JAXBContext.newInstance(String contextPath, ClassLoader classLoader, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.
      void Unmarshaller.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.
      void Validator.setEventHandler(ValidationEventHandler handler)
      Deprecated.
      since JAXB2.0
      void Marshaller.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      abstract void Binder.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.
      void Unmarshaller.setValidating(boolean validating)
      Deprecated.
      since JAXB2.0, please see Unmarshaller.setSchema(javax.xml.validation.Schema)
      Object Unmarshaller.unmarshal(File f)
      Unmarshal XML data from the specified file and return the resulting content tree.
      Object Unmarshaller.unmarshal(InputSource source)
      Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.
      Object Unmarshaller.unmarshal(InputStream is)
      Unmarshal XML data from the specified InputStream and return the resulting content tree.
      Object Unmarshaller.unmarshal(Node node)
      Unmarshal global XML data from the specified DOM tree and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(Node node, Class<T> declaredType)
      Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.
      Object Unmarshaller.unmarshal(Reader reader)
      Unmarshal XML data from the specified Reader and return the resulting content tree.
      Object Unmarshaller.unmarshal(Source source)
      Unmarshal XML data from the specified XML Source and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(Source source, Class<T> declaredType)
      Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.
      Object Unmarshaller.unmarshal(URL url)
      Unmarshal XML data from the specified URL and return the resulting content tree.
      Object Unmarshaller.unmarshal(XMLEventReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLEventReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.
      abstract Object Binder.unmarshal(XmlNode xmlNode)
      Unmarshal XML infoset view to a JAXB object tree.
      abstract <T> JAXBElement<T> Binder.unmarshal(XmlNode xmlNode, Class<T> declaredType)
      Unmarshal XML root element by provided declaredType to a JAXB object tree.
      Object Unmarshaller.unmarshal(XMLStreamReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLStreamReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.
      abstract Object Binder.updateJAXB(XmlNode xmlNode)
      Takes an XML node and updates its associated JAXB object and its descendants.
      abstract XmlNode Binder.updateXML(Object jaxbObject)
      Takes an JAXB object and updates its associated XML node and its descendants.
      abstract XmlNode Binder.updateXML(Object jaxbObject, XmlNode xmlNode)
      Changes in JAXB object tree are updated in its associated XML parse tree.
      boolean Validator.validate(Object subrootObj)
      Deprecated.
      since JAXB2.0
      boolean Validator.validateRoot(Object rootObj)
      Deprecated.
      since JAXB2.0

    • Uses of JAXBException in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that throw JAXBException
      Modifier and Type | Method and Description
      ValidationEventHandler AbstractUnmarshallerImpl.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      ValidationEventHandler | AbstractMarshallerImpl.getEventHandler()
      Node AbstractMarshallerImpl.getNode(Object obj)
      By default, the getNode method is unsupported and throw an UnsupportedOperationException.
      protected XMLReader AbstractUnmarshallerImpl.getXMLReader()
      Obtains a configured XMLReader.
      boolean AbstractUnmarshallerImpl.isValidating()
      Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.
      void | AbstractMarshallerImpl.marshal(Object obj, ContentHandler handler)
      void | AbstractMarshallerImpl.marshal(Object jaxbElement, File output)
      void | AbstractMarshallerImpl.marshal(Object obj, Node node)
      void | AbstractMarshallerImpl.marshal(Object obj, OutputStream os)
      void | AbstractMarshallerImpl.marshal(Object obj, Writer w)
      void | AbstractMarshallerImpl.marshal(Object obj, XMLEventWriter writer)
      void | AbstractMarshallerImpl.marshal(Object obj, XMLStreamWriter writer)
      void AbstractUnmarshallerImpl.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      void | AbstractMarshallerImpl.setEventHandler(ValidationEventHandler handler)
      void AbstractUnmarshallerImpl.setValidating(boolean validating)
      Specifies whether or not the Unmarshaller should validate during unmarshal operations.
      Object | AbstractUnmarshallerImpl.unmarshal(File f)
      Object | AbstractUnmarshallerImpl.unmarshal(InputSource source)
      Object | AbstractUnmarshallerImpl.unmarshal(InputStream is)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Node node, Class<T> expectedType)
      Object | AbstractUnmarshallerImpl.unmarshal(Reader reader)
      Object | AbstractUnmarshallerImpl.unmarshal(Source source)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Source source, Class<T> expectedType)
      Object | AbstractUnmarshallerImpl.unmarshal(URL url)
      Object | AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader, Class<T> expectedType)
      protected abstract Object AbstractUnmarshallerImpl.unmarshal(XMLReader reader, InputSource source)
      Unmarshals an object by using the specified XMLReader and the InputSource.
      Object | AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader, Class<T> expectedType)

    • Uses of JAXBException in javax.xml.bind.util

      Methods in javax.xml.bind.util that throw JAXBException
      Modifier and Type Method and Description
      Object JAXBResult.getResult()
      Gets the unmarshalled object created by the transformation.
      Constructors in javax.xml.bind.util that throw JAXBException
      Constructor and Description
      JAXBResult(JAXBContext context)
      Creates a new instance that uses the specified JAXBContext to unmarshal.
      JAXBResult(Unmarshaller _unmarshaller)
      Creates a new instance that uses the specified Unmarshaller to unmarshal an object.
      JAXBSource(JAXBContext context, Object contentObject)
      Creates a new Source for the given content object.
      JAXBSource(Marshaller marshaller, Object contentObject)
      Creates a new Source for the given content object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBIntrospector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBIntrospector

  • Packages that use JAXBIntrospector
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of JAXBIntrospector in javax.xml.bind

      Methods in javax.xml.bind that return JAXBIntrospector
      Modifier and Type Method and Description
      JAXBIntrospector JAXBContext.createJAXBIntrospector()
      Creates a JAXBIntrospector object that can be used to introspect JAXB objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.JAXBPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.JAXBPermission

No usage of javax.xml.bind.JAXBPermission
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.MarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.MarshalException

No usage of javax.xml.bind.MarshalException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.Marshaller.Listener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.Marshaller.Listener

  • Packages that use Marshaller.Listener
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of Marshaller.Listener in javax.xml.bind

      Methods in javax.xml.bind that return Marshaller.Listener
      Modifier and Type Method and Description
      Marshaller.Listener Marshaller.getListener()
      Return Marshaller.Listener registered with this Marshaller.
      Methods in javax.xml.bind with parameters of type Marshaller.Listener
      Modifier and Type Method and Description
      void Marshaller.setListener(Marshaller.Listener listener)
      Register marshal event callback Marshaller.Listener with this Marshaller.

    • Uses of Marshaller.Listener in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return Marshaller.Listener
      Modifier and Type | Method and Description
      Marshaller.Listener | AbstractMarshallerImpl.getListener()
      Methods in javax.xml.bind.helpers with parameters of type Marshaller.Listener
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.setListener(Marshaller.Listener listener)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.PropertyException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.PropertyException

  • Packages that use PropertyException
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of PropertyException in javax.xml.bind

      Methods in javax.xml.bind that throw PropertyException
      Modifier and Type Method and Description
      Object Unmarshaller.getProperty(String name)
      Get the particular property in the underlying implementation of Unmarshaller.
      Object Validator.getProperty(String name)
      Deprecated.
      since JAXB2.0
      Object Marshaller.getProperty(String name)
      Get the particular property in the underlying implementation of Marshaller.
      abstract Object Binder.getProperty(String name)
      Get the particular property in the underlying implementation of Binder.
      void Unmarshaller.setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Unmarshaller.
      void Validator.setProperty(String name, Object value)
      Deprecated.
      since JAXB2.0
      void Marshaller.setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Marshaller.
      abstract void Binder.setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Binder.

    • Uses of PropertyException in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that throw PropertyException
      Modifier and Type Method and Description
      Object AbstractUnmarshallerImpl.getProperty(String name)
      Default implementation of the getProperty method always throws PropertyException since there are no required properties.
      Object AbstractMarshallerImpl.getProperty(String name)
      Default implementation of the getProperty method handles the four defined properties in Marshaller.
      void AbstractUnmarshallerImpl.setProperty(String name, Object value)
      Default implementation of the setProperty method always throws PropertyException since there are no required properties.
      void AbstractMarshallerImpl.setProperty(String name, Object value)
      Default implementation of the setProperty method handles the four defined properties in Marshaller.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.SchemaOutputResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.SchemaOutputResolver

  • Packages that use SchemaOutputResolver
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of SchemaOutputResolver in javax.xml.bind

      Methods in javax.xml.bind with parameters of type SchemaOutputResolver
      Modifier and Type Method and Description
      void JAXBContext.generateSchema(SchemaOutputResolver outputResolver)
      Generates the schema documents for this context.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.TypeConstraintException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.TypeConstraintException

No usage of javax.xml.bind.TypeConstraintException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.UnmarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.UnmarshalException

  • Packages that use UnmarshalException
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of UnmarshalException in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return UnmarshalException
      Modifier and Type Method and Description
      protected UnmarshalException AbstractUnmarshallerImpl.createUnmarshalException(SAXException e)
      Creates an UnmarshalException from a SAXException.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.Unmarshaller.Listener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.Unmarshaller.Listener

  • Packages that use Unmarshaller.Listener
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of Unmarshaller.Listener in javax.xml.bind

      Methods in javax.xml.bind that return Unmarshaller.Listener
      Modifier and Type Method and Description
      Unmarshaller.Listener Unmarshaller.getListener()
      Return Unmarshaller.Listener registered with this Unmarshaller.
      Methods in javax.xml.bind with parameters of type Unmarshaller.Listener
      Modifier and Type Method and Description
      void Unmarshaller.setListener(Unmarshaller.Listener listener)
      Register unmarshal event callback Unmarshaller.Listener with this Unmarshaller.

    • Uses of Unmarshaller.Listener in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return Unmarshaller.Listener
      Modifier and Type | Method and Description
      Unmarshaller.Listener | AbstractUnmarshallerImpl.getListener()
      Methods in javax.xml.bind.helpers with parameters of type Unmarshaller.Listener
      Modifier and Type | Method and Description
      void | AbstractUnmarshallerImpl.setListener(Unmarshaller.Listener listener)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.ValidationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.ValidationException

No usage of javax.xml.bind.ValidationException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.DatatypeConverterInterface

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.DatatypeConverterInterface

  • Packages that use DatatypeConverterInterface
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of DatatypeConverterInterface in javax.xml.bind

      Methods in javax.xml.bind with parameters of type DatatypeConverterInterface
      Modifier and Type Method and Description
      static void DatatypeConverter.setDatatypeConverter(DatatypeConverterInterface converter)
      This method is for JAXB provider use only.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.Element

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.Element

No usage of javax.xml.bind.Element
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.Marshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.Marshaller

  • Packages that use Marshaller
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of Marshaller in javax.xml.bind

      Methods in javax.xml.bind that return Marshaller
      Modifier and Type Method and Description
      abstract Marshaller JAXBContext.createMarshaller()
      Create a Marshaller object that can be used to convert a java content tree into XML data.

    • Uses of Marshaller in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement Marshaller
      Modifier and Type Class and Description
      class  AbstractMarshallerImpl
      Partial default Marshaller implementation.

    • Uses of Marshaller in javax.xml.bind.util

      Constructors in javax.xml.bind.util with parameters of type Marshaller
      Constructor and Description
      JAXBSource(Marshaller marshaller, Object contentObject)
      Creates a new Source for the given content object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.NotIdentifiableEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.NotIdentifiableEvent

  • Packages that use NotIdentifiableEvent
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of NotIdentifiableEvent in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement NotIdentifiableEvent
      Modifier and Type Class and Description
      class  NotIdentifiableEventImpl
      Default implementation of the NotIdentifiableEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.ParseConversionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.ParseConversionEvent

  • Packages that use ParseConversionEvent
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of ParseConversionEvent in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement ParseConversionEvent
      Modifier and Type Class and Description
      class  ParseConversionEventImpl
      Default implementation of the ParseConversionEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.PrintConversionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.PrintConversionEvent

  • Packages that use PrintConversionEvent
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of PrintConversionEvent in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement PrintConversionEvent
      Modifier and Type Class and Description
      class  PrintConversionEventImpl
      Default implementation of the PrintConversionEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.Unmarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.Unmarshaller

  • Packages that use Unmarshaller
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of Unmarshaller in javax.xml.bind

      Methods in javax.xml.bind that return Unmarshaller
      Modifier and Type Method and Description
      abstract Unmarshaller JAXBContext.createUnmarshaller()
      Create an Unmarshaller object that can be used to convert XML data into a java content tree.

    • Uses of Unmarshaller in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement Unmarshaller
      Modifier and Type Class and Description
      class  AbstractUnmarshallerImpl
      Partial default Unmarshaller implementation.

    • Uses of Unmarshaller in javax.xml.bind.util

      Constructors in javax.xml.bind.util with parameters of type Unmarshaller
      Constructor and Description
      JAXBResult(Unmarshaller _unmarshaller)
      Creates a new instance that uses the specified Unmarshaller to unmarshal an object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.UnmarshallerHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.UnmarshallerHandler

  • Packages that use UnmarshallerHandler
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of UnmarshallerHandler in javax.xml.bind

      Methods in javax.xml.bind that return UnmarshallerHandler
      Modifier and Type Method and Description
      UnmarshallerHandler Unmarshaller.getUnmarshallerHandler()
      Get an unmarshaller handler object that can be used as a component in an XML pipeline.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.ValidationEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.ValidationEvent

  • Packages that use ValidationEvent
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of ValidationEvent in javax.xml.bind

      Subinterfaces of ValidationEvent in javax.xml.bind
      Modifier and Type Interface and Description
      interface  NotIdentifiableEvent
      This event indicates that a problem was encountered resolving an ID/IDREF.
      interface  ParseConversionEvent
      This event indicates that a problem was encountered while converting a string from the XML data into a value of the target Java data type.
      interface  PrintConversionEvent
      This event indicates that a problem was encountered while converting data from the Java content tree into its lexical representation.
      Methods in javax.xml.bind with parameters of type ValidationEvent
      Modifier and Type Method and Description
      boolean ValidationEventHandler.handleEvent(ValidationEvent event)
      Receive notification of a validation warning or error.

    • Uses of ValidationEvent in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement ValidationEvent
      Modifier and Type Class and Description
      class  NotIdentifiableEventImpl
      Default implementation of the NotIdentifiableEvent interface.
      class  ParseConversionEventImpl
      Default implementation of the ParseConversionEvent interface.
      class  PrintConversionEventImpl
      Default implementation of the PrintConversionEvent interface.
      class  ValidationEventImpl
      Default implementation of the ValidationEvent interface.
      Methods in javax.xml.bind.helpers with parameters of type ValidationEvent
      Modifier and Type | Method and Description
      boolean | DefaultValidationEventHandler.handleEvent(ValidationEvent event)

    • Uses of ValidationEvent in javax.xml.bind.util

      Methods in javax.xml.bind.util that return ValidationEvent
      Modifier and Type Method and Description
      ValidationEvent[] ValidationEventCollector.getEvents()
      Return an array of ValidationEvent objects containing a copy of each of the collected errors and warnings.
      Methods in javax.xml.bind.util with parameters of type ValidationEvent
      Modifier and Type | Method and Description
      boolean | ValidationEventCollector.handleEvent(ValidationEvent event)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.ValidationEventHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.ValidationEventHandler

  • Packages that use ValidationEventHandler
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of ValidationEventHandler in javax.xml.bind

      Methods in javax.xml.bind that return ValidationEventHandler
      Modifier and Type Method and Description
      ValidationEventHandler Unmarshaller.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      ValidationEventHandler Validator.getEventHandler()
      Deprecated.
      since JAXB2.0
      ValidationEventHandler Marshaller.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      abstract ValidationEventHandler Binder.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      Methods in javax.xml.bind with parameters of type ValidationEventHandler
      Modifier and Type Method and Description
      void Unmarshaller.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.
      void Validator.setEventHandler(ValidationEventHandler handler)
      Deprecated.
      since JAXB2.0
      void Marshaller.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      abstract void Binder.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.

    • Uses of ValidationEventHandler in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation with parameters of type ValidationEventHandler
      Modifier and Type | Method and Description
      ResultT DomHandler.createUnmarshaller(ValidationEventHandler errorHandler)
      When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object.
      DOMResult | W3CDomHandler.createUnmarshaller(ValidationEventHandler errorHandler)
      Source DomHandler.marshal(ElementT n, ValidationEventHandler errorHandler)
      This method is called when a JAXB provider needs to marshal an element to XML.
      Source | W3CDomHandler.marshal(Element element, ValidationEventHandler errorHandler)

    • Uses of ValidationEventHandler in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement ValidationEventHandler
      Modifier and Type Class and Description
      class  DefaultValidationEventHandler
      JAXB 1.0 only default validation event handler.
      Methods in javax.xml.bind.helpers that return ValidationEventHandler
      Modifier and Type | Method and Description
      ValidationEventHandler AbstractUnmarshallerImpl.getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      ValidationEventHandler | AbstractMarshallerImpl.getEventHandler()
      Methods in javax.xml.bind.helpers with parameters of type ValidationEventHandler
      Modifier and Type | Method and Description
      void AbstractUnmarshallerImpl.setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      void | AbstractMarshallerImpl.setEventHandler(ValidationEventHandler handler)

    • Uses of ValidationEventHandler in javax.xml.bind.util

      Classes in javax.xml.bind.util that implement ValidationEventHandler
      Modifier and Type Class and Description
      class  ValidationEventCollector
      ValidationEventHandler implementation that collects all events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.ValidationEventLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.ValidationEventLocator

  • Packages that use ValidationEventLocator
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of ValidationEventLocator in javax.xml.bind

      Methods in javax.xml.bind that return ValidationEventLocator
      Modifier and Type Method and Description
      ValidationEventLocator ValidationEvent.getLocator()
      Retrieve the locator for this warning/error.

    • Uses of ValidationEventLocator in javax.xml.bind.helpers

      Classes in javax.xml.bind.helpers that implement ValidationEventLocator
      Modifier and Type Class and Description
      class  ValidationEventLocatorImpl
      Default implementation of the ValidationEventLocator interface.
      Methods in javax.xml.bind.helpers that return ValidationEventLocator
      Modifier and Type | Method and Description
      ValidationEventLocator | ValidationEventImpl.getLocator()
      Methods in javax.xml.bind.helpers with parameters of type ValidationEventLocator
      Modifier and Type Method and Description
      void ValidationEventImpl.setLocator(ValidationEventLocator _locator)
      Set the locator object for this event.
      Constructors in javax.xml.bind.helpers with parameters of type ValidationEventLocator
      Constructor and Description
      NotIdentifiableEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new NotIdentifiableEventImpl.
      NotIdentifiableEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new NotIdentifiableEventImpl.
      ParseConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new ParseConversionEventImpl.
      ParseConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new ParseConversionEventImpl.
      PrintConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new PrintConversionEventImpl.
      PrintConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new PrintConversionEventImpl.
      ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new ValidationEventImpl.
      ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new ValidationEventImpl.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.bind.Validator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.bind.Validator

  • Packages that use Validator
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

    • Uses of Validator in javax.xml.bind

      Methods in javax.xml.bind that return Validator
      Modifier and Type Method and Description
      abstract Validator JAXBContext.createValidator()
      Deprecated.
      since JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DataBindingException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class DataBindingException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.bind.DataBindingException
  • All Implemented Interfaces:
    Serializable

    public class DataBindingException
extends RuntimeException
    Exception that represents a failure in a JAXB operation.

    This exception differs from JAXBException in that this is an unchecked exception, while JAXBException is a checked exception.

    Since:
    JAXB2.1
    See Also:
    JAXB, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      DataBindingException(String message, Throwable cause)
      DataBindingException(Throwable cause)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DataBindingException

        public DataBindingException(String message,
                            Throwable cause)

      • DataBindingException

        public DataBindingException(Throwable cause)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeConverter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class DatatypeConverter

  • java.lang.Object
    • javax.xml.bind.DatatypeConverter

  • public final class DatatypeConverter
extends Object

    The javaType binding declaration can be used to customize the binding of an XML schema datatype to a Java datatype. Customizations can involve writing a parse and print method for parsing and printing lexical representations of a XML schema datatype respectively. However, writing parse and print methods requires knowledge of the lexical representations ( XML Schema Part2: Datatypes specification ) and hence may be difficult to write.

    This class makes it easier to write parse and print methods. It defines static parse and print methods that provide access to a JAXB provider's implementation of parse and print methods. These methods are invoked by custom parse and print methods. For example, the binding of xsd:dateTime to a long can be customized using parse and print methods as follows:

        // Customized parse method
    public long myParseCal( String dateTimeString ) {
        java.util.Calendar cal = DatatypeConverter.parseDateTime(dateTimeString);
        long longval = convert_calendar_to_long(cal); //application specific
        return longval;
    }

    // Customized print method
    public String myPrintCal( Long longval ) {
        java.util.Calendar cal = convert_long_to_calendar(longval) ; //application specific
        String dateTimeString = DatatypeConverter.printDateTime(cal);
        return dateTimeString;
    }

    There is a static parse and print method corresponding to each parse and print method respectively in the DatatypeConverterInterface.

    The static methods defined in the class can also be used to specify a parse or a print method in a javaType binding declaration.

    JAXB Providers are required to call the setDatatypeConverter api at some point before the first marshal or unmarshal operation (perhaps during the call to JAXBContext.newInstance). This step is necessary to configure the converter that should be used to perform the print and parse functionality.

    A print method for a XML schema datatype can output any lexical representation that is valid with respect to the XML schema datatype. If an error is encountered during conversion, then an IllegalArgumentException, or a subclass of IllegalArgumentException must be thrown by the method.

    Since:
    JAXB1.0
    See Also:
    DatatypeConverterInterface, ParseConversionEvent, PrintConversionEvent

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static String parseAnySimpleType(String lexicalXSDAnySimpleType)
      Return a string containing the lexical representation of the simple type.
      static byte[] parseBase64Binary(String lexicalXSDBase64Binary)
      Converts the string argument into an array of bytes.
      static boolean parseBoolean(String lexicalXSDBoolean)
      Converts the string argument into a boolean value.
      static byte parseByte(String lexicalXSDByte)
      Converts the string argument into a byte value.
      static Calendar parseDate(String lexicalXSDDate)
      Converts the string argument into a Calendar value.
      static Calendar parseDateTime(String lexicalXSDDateTime)
      Converts the string argument into a Calendar value.
      static BigDecimal parseDecimal(String lexicalXSDDecimal)
      Converts the string argument into a BigDecimal value.
      static double parseDouble(String lexicalXSDDouble)
      Converts the string argument into a double value.
      static float parseFloat(String lexicalXSDFloat)
      Converts the string argument into a float value.
      static byte[] parseHexBinary(String lexicalXSDHexBinary)
      Converts the string argument into an array of bytes.
      static int parseInt(String lexicalXSDInt)
      Convert the string argument into an int value.
      static BigInteger parseInteger(String lexicalXSDInteger)
      Convert the string argument into a BigInteger value.
      static long parseLong(String lexicalXSDLong)
      Converts the string argument into a long value.
      static QName parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a byte value.
      static short parseShort(String lexicalXSDShort)
      Converts the string argument into a short value.
      static String parseString(String lexicalXSDString)
      Convert the lexical XSD string argument into a String value.
      static Calendar parseTime(String lexicalXSDTime)
      Converts the string argument into a Calendar value.
      static long parseUnsignedInt(String lexicalXSDUnsignedInt)
      Converts the string argument into a long value.
      static int parseUnsignedShort(String lexicalXSDUnsignedShort)
      Converts the string argument into an int value.
      static String printAnySimpleType(String val)
      Converts a string value into a string.
      static String printBase64Binary(byte[] val)
      Converts an array of bytes into a string.
      static String printBoolean(boolean val)
      Converts a boolean value into a string.
      static String printByte(byte val)
      Converts a byte value into a string.
      static String printDate(Calendar val)
      Converts a Calendar value into a string.
      static String printDateTime(Calendar val)
      Converts a Calendar value into a string.
      static String printDecimal(BigDecimal val)
      Converts a BigDecimal value into a string.
      static String printDouble(double val)
      Converts a double value into a string.
      static String printFloat(float val)
      Converts a float value into a string.
      static String printHexBinary(byte[] val)
      Converts an array of bytes into a string.
      static String printInt(int val)
      Converts an int value into a string.
      static String printInteger(BigInteger val)
      Converts a BigInteger value into a string.
      static String printLong(long val)
      Converts A long value into a string.
      static String printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.
      static String printShort(short val)
      Converts a short value into a string.
      static String printString(String val)
      Converts the string argument into a string.
      static String printTime(Calendar val)
      Converts a Calendar value into a string.
      static String printUnsignedInt(long val)
      Converts a long value into a string.
      static String printUnsignedShort(int val)
      Converts an int value into a string.
      static void setDatatypeConverter(DatatypeConverterInterface converter)
      This method is for JAXB provider use only.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • setDatatypeConverter

        public static void setDatatypeConverter(DatatypeConverterInterface converter)
        This method is for JAXB provider use only.

        JAXB Providers are required to call this method at some point before allowing any of the JAXB client marshal or unmarshal operations to occur. This is necessary to configure the datatype converter that should be used to perform the print and parse conversions.

        Calling this api repeatedly will have no effect - the DatatypeConverterInterface instance passed into the first invocation is the one that will be used from then on.

        Parameters:
        converter - an instance of a class that implements the DatatypeConverterInterface class - this parameter must not be null.
        Throws:
        IllegalArgumentException - if the parameter is null
        SecurityException - If the SecurityManager in charge denies the access to set the datatype converter.
        See Also:
        JAXBPermission

      • parseString

        public static String parseString(String lexicalXSDString)

        Convert the lexical XSD string argument into a String value.

        Parameters:
        lexicalXSDString - A string containing a lexical representation of xsd:string.
        Returns:
        A String value represented by the string argument.

      • parseInteger

        public static BigInteger parseInteger(String lexicalXSDInteger)

        Convert the string argument into a BigInteger value.

        Parameters:
        lexicalXSDInteger - A string containing a lexical representation of xsd:integer.
        Returns:
        A BigInteger value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDInteger is not a valid string representation of a BigInteger value.

      • parseInt

        public static int parseInt(String lexicalXSDInt)

        Convert the string argument into an int value.

        Parameters:
        lexicalXSDInt - A string containing a lexical representation of xsd:int.
        Returns:
        A int value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDInt is not a valid string representation of an int value.

      • parseLong

        public static long parseLong(String lexicalXSDLong)

        Converts the string argument into a long value.

        Parameters:
        lexicalXSDLong - A string containing lexical representation of xsd:long.
        Returns:
        A long value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDLong is not a valid string representation of a long value.

      • parseShort

        public static short parseShort(String lexicalXSDShort)

        Converts the string argument into a short value.

        Parameters:
        lexicalXSDShort - A string containing lexical representation of xsd:short.
        Returns:
        A short value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDShort is not a valid string representation of a short value.

      • parseDecimal

        public static BigDecimal parseDecimal(String lexicalXSDDecimal)

        Converts the string argument into a BigDecimal value.

        Parameters:
        lexicalXSDDecimal - A string containing lexical representation of xsd:decimal.
        Returns:
        A BigDecimal value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDDecimal is not a valid string representation of BigDecimal.

      • parseFloat

        public static float parseFloat(String lexicalXSDFloat)

        Converts the string argument into a float value.

        Parameters:
        lexicalXSDFloat - A string containing lexical representation of xsd:float.
        Returns:
        A float value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDFloat is not a valid string representation of a float value.

      • parseDouble

        public static double parseDouble(String lexicalXSDDouble)

        Converts the string argument into a double value.

        Parameters:
        lexicalXSDDouble - A string containing lexical representation of xsd:double.
        Returns:
        A double value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDDouble is not a valid string representation of a double value.

      • parseBoolean

        public static boolean parseBoolean(String lexicalXSDBoolean)

        Converts the string argument into a boolean value.

        Parameters:
        lexicalXSDBoolean - A string containing lexical representation of xsd:boolean.
        Returns:
        A boolean value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:boolean.

      • parseByte

        public static byte parseByte(String lexicalXSDByte)

        Converts the string argument into a byte value.

        Parameters:
        lexicalXSDByte - A string containing lexical representation of xsd:byte.
        Returns:
        A byte value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.

      • parseQName

        public static QName parseQName(String lexicalXSDQName,
                               NamespaceContext nsc)

        Converts the string argument into a byte value.

        String parameter lexicalXSDQname must conform to lexical value space specifed at XML Schema Part 2:Datatypes specification:QNames

        Parameters:
        lexicalXSDQName - A string containing lexical representation of xsd:QName.
        nsc - A namespace context for interpreting a prefix within a QName.
        Returns:
        A QName value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to XML Schema Part 2 specification or if namespace prefix of lexicalXSDQname is not bound to a URI in NamespaceContext nsc.

      • parseDateTime

        public static Calendar parseDateTime(String lexicalXSDDateTime)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDDateTime - A string containing lexical representation of xsd:datetime.
        Returns:
        A Calendar object represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:dateTime.

      • parseBase64Binary

        public static byte[] parseBase64Binary(String lexicalXSDBase64Binary)

        Converts the string argument into an array of bytes.

        Parameters:
        lexicalXSDBase64Binary - A string containing lexical representation of xsd:base64Binary.
        Returns:
        An array of bytes represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:base64Binary

      • parseHexBinary

        public static byte[] parseHexBinary(String lexicalXSDHexBinary)

        Converts the string argument into an array of bytes.

        Parameters:
        lexicalXSDHexBinary - A string containing lexical representation of xsd:hexBinary.
        Returns:
        An array of bytes represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:hexBinary.

      • parseUnsignedInt

        public static long parseUnsignedInt(String lexicalXSDUnsignedInt)

        Converts the string argument into a long value.

        Parameters:
        lexicalXSDUnsignedInt - A string containing lexical representation of xsd:unsignedInt.
        Returns:
        A long value represented by the string argument.
        Throws:
        NumberFormatException - if string parameter can not be parsed into a long value.

      • parseUnsignedShort

        public static int parseUnsignedShort(String lexicalXSDUnsignedShort)

        Converts the string argument into an int value.

        Parameters:
        lexicalXSDUnsignedShort - A string containing lexical representation of xsd:unsignedShort.
        Returns:
        An int value represented by the string argument.
        Throws:
        NumberFormatException - if string parameter can not be parsed into an int value.

      • parseTime

        public static Calendar parseTime(String lexicalXSDTime)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDTime - A string containing lexical representation of xsd:time.
        Returns:
        A Calendar value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Time.

      • parseDate

        public static Calendar parseDate(String lexicalXSDDate)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDDate - A string containing lexical representation of xsd:Date.
        Returns:
        A Calendar value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Date.

      • parseAnySimpleType

        public static String parseAnySimpleType(String lexicalXSDAnySimpleType)

        Return a string containing the lexical representation of the simple type.

        Parameters:
        lexicalXSDAnySimpleType - A string containing lexical representation of the simple type.
        Returns:
        A string containing the lexical representation of the simple type.

      • printString

        public static String printString(String val)

        Converts the string argument into a string.

        Parameters:
        val - A string value.
        Returns:
        A string containing a lexical representation of xsd:string.

      • printInteger

        public static String printInteger(BigInteger val)

        Converts a BigInteger value into a string.

        Parameters:
        val - A BigInteger value
        Returns:
        A string containing a lexical representation of xsd:integer
        Throws:
        IllegalArgumentException - val is null.

      • printInt

        public static String printInt(int val)

        Converts an int value into a string.

        Parameters:
        val - An int value
        Returns:
        A string containing a lexical representation of xsd:int

      • printLong

        public static String printLong(long val)

        Converts A long value into a string.

        Parameters:
        val - A long value
        Returns:
        A string containing a lexical representation of xsd:long

      • printShort

        public static String printShort(short val)

        Converts a short value into a string.

        Parameters:
        val - A short value
        Returns:
        A string containing a lexical representation of xsd:short

      • printDecimal

        public static String printDecimal(BigDecimal val)

        Converts a BigDecimal value into a string.

        Parameters:
        val - A BigDecimal value
        Returns:
        A string containing a lexical representation of xsd:decimal
        Throws:
        IllegalArgumentException - val is null.

      • printFloat

        public static String printFloat(float val)

        Converts a float value into a string.

        Parameters:
        val - A float value
        Returns:
        A string containing a lexical representation of xsd:float

      • printDouble

        public static String printDouble(double val)

        Converts a double value into a string.

        Parameters:
        val - A double value
        Returns:
        A string containing a lexical representation of xsd:double

      • printBoolean

        public static String printBoolean(boolean val)

        Converts a boolean value into a string.

        Parameters:
        val - A boolean value
        Returns:
        A string containing a lexical representation of xsd:boolean

      • printByte

        public static String printByte(byte val)

        Converts a byte value into a string.

        Parameters:
        val - A byte value
        Returns:
        A string containing a lexical representation of xsd:byte

      • printQName

        public static String printQName(QName val,
                                NamespaceContext nsc)

        Converts a QName instance into a string.

        Parameters:
        val - A QName value
        nsc - A namespace context for interpreting a prefix within a QName.
        Returns:
        A string containing a lexical representation of QName
        Throws:
        IllegalArgumentException - if val is null or if nsc is non-null or nsc.getPrefix(nsprefixFromVal) is null.

      • printDateTime

        public static String printDateTime(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:dateTime
        Throws:
        IllegalArgumentException - if val is null.

      • printBase64Binary

        public static String printBase64Binary(byte[] val)

        Converts an array of bytes into a string.

        Parameters:
        val - An array of bytes
        Returns:
        A string containing a lexical representation of xsd:base64Binary
        Throws:
        IllegalArgumentException - if val is null.

      • printHexBinary

        public static String printHexBinary(byte[] val)

        Converts an array of bytes into a string.

        Parameters:
        val - An array of bytes
        Returns:
        A string containing a lexical representation of xsd:hexBinary
        Throws:
        IllegalArgumentException - if val is null.

      • printUnsignedInt

        public static String printUnsignedInt(long val)

        Converts a long value into a string.

        Parameters:
        val - A long value
        Returns:
        A string containing a lexical representation of xsd:unsignedInt

      • printUnsignedShort

        public static String printUnsignedShort(int val)

        Converts an int value into a string.

        Parameters:
        val - An int value
        Returns:
        A string containing a lexical representation of xsd:unsignedShort

      • printTime

        public static String printTime(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:time
        Throws:
        IllegalArgumentException - if val is null.

      • printDate

        public static String printDate(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:date
        Throws:
        IllegalArgumentException - if val is null.

      • printAnySimpleType

        public static String printAnySimpleType(String val)

        Converts a string value into a string.

        Parameters:
        val - A string value
        Returns:
        A string containing a lexical representation of xsd:AnySimpleType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeConverterInterface

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface DatatypeConverterInterface

  • public interface DatatypeConverterInterface

    The DatatypeConverterInterface is for JAXB provider use only. A JAXB provider must supply a class that implements this interface. JAXB Providers are required to call the DatatypeConverter.setDatatypeConverter api at some point before the first marshal or unmarshal operation (perhaps during the call to JAXBContext.newInstance). This step is necessary to configure the converter that should be used to perform the print and parse functionality. Calling this api repeatedly will have no effect - the DatatypeConverter instance passed into the first invocation is the one that will be used from then on.

    This interface defines the parse and print methods. There is one parse and print method for each XML schema datatype specified in the the default binding Table 5-1 in the JAXB specification.

    The parse and print methods defined here are invoked by the static parse and print methods defined in the DatatypeConverter class.

    A parse method for a XML schema datatype must be capable of converting any lexical representation of the XML schema datatype ( specified by the XML Schema Part2: Datatypes specification into a value in the value space of the XML schema datatype. If an error is encountered during conversion, then an IllegalArgumentException or a subclass of IllegalArgumentException must be thrown by the method.

    A print method for a XML schema datatype can output any lexical representation that is valid with respect to the XML schema datatype. If an error is encountered during conversion, then an IllegalArgumentException, or a subclass of IllegalArgumentException must be thrown by the method.

    The prefix xsd: is used to refer to XML schema datatypes XML Schema Part2: Datatypes specification.

    Since:
    JAXB1.0
    See Also:
    DatatypeConverter, ParseConversionEvent, PrintConversionEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String parseAnySimpleType(String lexicalXSDAnySimpleType)
      Return a string containing the lexical representation of the simple type.
      byte[] parseBase64Binary(String lexicalXSDBase64Binary)
      Converts the string argument into an array of bytes.
      boolean parseBoolean(String lexicalXSDBoolean)
      Converts the string argument into a boolean value.
      byte parseByte(String lexicalXSDByte)
      Converts the string argument into a byte value.
      Calendar parseDate(String lexicalXSDDate)
      Converts the string argument into a Calendar value.
      Calendar parseDateTime(String lexicalXSDDateTime)
      Converts the string argument into a Calendar value.
      BigDecimal parseDecimal(String lexicalXSDDecimal)
      Converts the string argument into a BigDecimal value.
      double parseDouble(String lexicalXSDDouble)
      Converts the string argument into a double value.
      float parseFloat(String lexicalXSDFloat)
      Converts the string argument into a float value.
      byte[] parseHexBinary(String lexicalXSDHexBinary)
      Converts the string argument into an array of bytes.
      int parseInt(String lexicalXSDInt)
      Convert the string argument into an int value.
      BigInteger parseInteger(String lexicalXSDInteger)
      Convert the string argument into a BigInteger value.
      long parseLong(String lexicalXSDLong)
      Converts the string argument into a long value.
      QName parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a QName value.
      short parseShort(String lexicalXSDShort)
      Converts the string argument into a short value.
      String parseString(String lexicalXSDString)
      Convert the string argument into a string.
      Calendar parseTime(String lexicalXSDTime)
      Converts the string argument into a Calendar value.
      long parseUnsignedInt(String lexicalXSDUnsignedInt)
      Converts the string argument into a long value.
      int parseUnsignedShort(String lexicalXSDUnsignedShort)
      Converts the string argument into an int value.
      String printAnySimpleType(String val)
      Converts a string value into a string.
      String printBase64Binary(byte[] val)
      Converts an array of bytes into a string.
      String printBoolean(boolean val)
      Converts a boolean value into a string.
      String printByte(byte val)
      Converts a byte value into a string.
      String printDate(Calendar val)
      Converts a Calendar value into a string.
      String printDateTime(Calendar val)
      Converts a Calendar value into a string.
      String printDecimal(BigDecimal val)
      Converts a BigDecimal value into a string.
      String printDouble(double val)
      Converts a double value into a string.
      String printFloat(float val)
      Converts a float value into a string.
      String printHexBinary(byte[] val)
      Converts an array of bytes into a string.
      String printInt(int val)
      Converts an int value into a string.
      String printInteger(BigInteger val)
      Converts a BigInteger value into a string.
      String printLong(long val)
      Converts a long value into a string.
      String printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.
      String printShort(short val)
      Converts a short value into a string.
      String printString(String val)
      Converts the string argument into a string.
      String printTime(Calendar val)
      Converts a Calendar value into a string.
      String printUnsignedInt(long val)
      Converts a long value into a string.
      String printUnsignedShort(int val)
      Converts an int value into a string.

    • Method Detail

      • parseString

        String parseString(String lexicalXSDString)

        Convert the string argument into a string.

        Parameters:
        lexicalXSDString - A lexical representation of the XML Schema datatype xsd:string
        Returns:
        A string that is the same as the input string.

      • parseInteger

        BigInteger parseInteger(String lexicalXSDInteger)

        Convert the string argument into a BigInteger value.

        Parameters:
        lexicalXSDInteger - A string containing a lexical representation of xsd:integer.
        Returns:
        A BigInteger value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDInteger is not a valid string representation of a BigInteger value.

      • parseInt

        int parseInt(String lexicalXSDInt)

        Convert the string argument into an int value.

        Parameters:
        lexicalXSDInt - A string containing a lexical representation of xsd:int.
        Returns:
        An int value represented byte the string argument.
        Throws:
        NumberFormatException - lexicalXSDInt is not a valid string representation of an int value.

      • parseLong

        long parseLong(String lexicalXSDLong)

        Converts the string argument into a long value.

        Parameters:
        lexicalXSDLong - A string containing lexical representation of xsd:long.
        Returns:
        A long value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDLong is not a valid string representation of a long value.

      • parseShort

        short parseShort(String lexicalXSDShort)

        Converts the string argument into a short value.

        Parameters:
        lexicalXSDShort - A string containing lexical representation of xsd:short.
        Returns:
        A short value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDShort is not a valid string representation of a short value.

      • parseDecimal

        BigDecimal parseDecimal(String lexicalXSDDecimal)

        Converts the string argument into a BigDecimal value.

        Parameters:
        lexicalXSDDecimal - A string containing lexical representation of xsd:decimal.
        Returns:
        A BigDecimal value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDDecimal is not a valid string representation of BigDecimal.

      • parseFloat

        float parseFloat(String lexicalXSDFloat)

        Converts the string argument into a float value.

        Parameters:
        lexicalXSDFloat - A string containing lexical representation of xsd:float.
        Returns:
        A float value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDFloat is not a valid string representation of a float value.

      • parseDouble

        double parseDouble(String lexicalXSDDouble)

        Converts the string argument into a double value.

        Parameters:
        lexicalXSDDouble - A string containing lexical representation of xsd:double.
        Returns:
        A double value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDDouble is not a valid string representation of a double value.

      • parseBoolean

        boolean parseBoolean(String lexicalXSDBoolean)

        Converts the string argument into a boolean value.

        Parameters:
        lexicalXSDBoolean - A string containing lexical representation of xsd:boolean.
        Returns:
        A boolean value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:boolean.

      • parseByte

        byte parseByte(String lexicalXSDByte)

        Converts the string argument into a byte value.

        Parameters:
        lexicalXSDByte - A string containing lexical representation of xsd:byte.
        Returns:
        A byte value represented by the string argument.
        Throws:
        NumberFormatException - lexicalXSDByte does not contain a parseable byte.
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.

      • parseQName

        QName parseQName(String lexicalXSDQName,
                 NamespaceContext nsc)

        Converts the string argument into a QName value.

        String parameter lexicalXSDQname must conform to lexical value space specifed at XML Schema Part 2:Datatypes specification:QNames

        Parameters:
        lexicalXSDQName - A string containing lexical representation of xsd:QName.
        nsc - A namespace context for interpreting a prefix within a QName.
        Returns:
        A QName value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to XML Schema Part 2 specification or if namespace prefix of lexicalXSDQname is not bound to a URI in NamespaceContext nsc.

      • parseDateTime

        Calendar parseDateTime(String lexicalXSDDateTime)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDDateTime - A string containing lexical representation of xsd:datetime.
        Returns:
        A Calendar object represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:dateTime.

      • parseBase64Binary

        byte[] parseBase64Binary(String lexicalXSDBase64Binary)

        Converts the string argument into an array of bytes.

        Parameters:
        lexicalXSDBase64Binary - A string containing lexical representation of xsd:base64Binary.
        Returns:
        An array of bytes represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:base64Binary

      • parseHexBinary

        byte[] parseHexBinary(String lexicalXSDHexBinary)

        Converts the string argument into an array of bytes.

        Parameters:
        lexicalXSDHexBinary - A string containing lexical representation of xsd:hexBinary.
        Returns:
        An array of bytes represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:hexBinary.

      • parseUnsignedInt

        long parseUnsignedInt(String lexicalXSDUnsignedInt)

        Converts the string argument into a long value.

        Parameters:
        lexicalXSDUnsignedInt - A string containing lexical representation of xsd:unsignedInt.
        Returns:
        A long value represented by the string argument.
        Throws:
        NumberFormatException - if string parameter can not be parsed into a long value.

      • parseUnsignedShort

        int parseUnsignedShort(String lexicalXSDUnsignedShort)

        Converts the string argument into an int value.

        Parameters:
        lexicalXSDUnsignedShort - A string containing lexical representation of xsd:unsignedShort.
        Returns:
        An int value represented by the string argument.
        Throws:
        NumberFormatException - if string parameter can not be parsed into an int value.

      • parseTime

        Calendar parseTime(String lexicalXSDTime)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDTime - A string containing lexical representation of xsd:Time.
        Returns:
        A Calendar value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Time.

      • parseDate

        Calendar parseDate(String lexicalXSDDate)

        Converts the string argument into a Calendar value.

        Parameters:
        lexicalXSDDate - A string containing lexical representation of xsd:Date.
        Returns:
        A Calendar value represented by the string argument.
        Throws:
        IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Date.

      • parseAnySimpleType

        String parseAnySimpleType(String lexicalXSDAnySimpleType)

        Return a string containing the lexical representation of the simple type.

        Parameters:
        lexicalXSDAnySimpleType - A string containing lexical representation of the simple type.
        Returns:
        A string containing the lexical representation of the simple type.

      • printString

        String printString(String val)

        Converts the string argument into a string.

        Parameters:
        val - A string value.
        Returns:
        A string containing a lexical representation of xsd:string

      • printInteger

        String printInteger(BigInteger val)

        Converts a BigInteger value into a string.

        Parameters:
        val - A BigInteger value
        Returns:
        A string containing a lexical representation of xsd:integer
        Throws:
        IllegalArgumentException - val is null.

      • printInt

        String printInt(int val)

        Converts an int value into a string.

        Parameters:
        val - An int value
        Returns:
        A string containing a lexical representation of xsd:int

      • printLong

        String printLong(long val)

        Converts a long value into a string.

        Parameters:
        val - A long value
        Returns:
        A string containing a lexical representation of xsd:long

      • printShort

        String printShort(short val)

        Converts a short value into a string.

        Parameters:
        val - A short value
        Returns:
        A string containing a lexical representation of xsd:short

      • printDecimal

        String printDecimal(BigDecimal val)

        Converts a BigDecimal value into a string.

        Parameters:
        val - A BigDecimal value
        Returns:
        A string containing a lexical representation of xsd:decimal
        Throws:
        IllegalArgumentException - val is null.

      • printFloat

        String printFloat(float val)

        Converts a float value into a string.

        Parameters:
        val - A float value
        Returns:
        A string containing a lexical representation of xsd:float

      • printDouble

        String printDouble(double val)

        Converts a double value into a string.

        Parameters:
        val - A double value
        Returns:
        A string containing a lexical representation of xsd:double

      • printBoolean

        String printBoolean(boolean val)

        Converts a boolean value into a string.

        Parameters:
        val - A boolean value
        Returns:
        A string containing a lexical representation of xsd:boolean

      • printByte

        String printByte(byte val)

        Converts a byte value into a string.

        Parameters:
        val - A byte value
        Returns:
        A string containing a lexical representation of xsd:byte

      • printQName

        String printQName(QName val,
                  NamespaceContext nsc)

        Converts a QName instance into a string.

        Parameters:
        val - A QName value
        nsc - A namespace context for interpreting a prefix within a QName.
        Returns:
        A string containing a lexical representation of QName
        Throws:
        IllegalArgumentException - if val is null or if nsc is non-null or nsc.getPrefix(nsprefixFromVal) is null.

      • printDateTime

        String printDateTime(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:dateTime
        Throws:
        IllegalArgumentException - if val is null.

      • printBase64Binary

        String printBase64Binary(byte[] val)

        Converts an array of bytes into a string.

        Parameters:
        val - an array of bytes
        Returns:
        A string containing a lexical representation of xsd:base64Binary
        Throws:
        IllegalArgumentException - if val is null.

      • printHexBinary

        String printHexBinary(byte[] val)

        Converts an array of bytes into a string.

        Parameters:
        val - an array of bytes
        Returns:
        A string containing a lexical representation of xsd:hexBinary
        Throws:
        IllegalArgumentException - if val is null.

      • printUnsignedInt

        String printUnsignedInt(long val)

        Converts a long value into a string.

        Parameters:
        val - A long value
        Returns:
        A string containing a lexical representation of xsd:unsignedInt

      • printUnsignedShort

        String printUnsignedShort(int val)

        Converts an int value into a string.

        Parameters:
        val - An int value
        Returns:
        A string containing a lexical representation of xsd:unsignedShort

      • printTime

        String printTime(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:time
        Throws:
        IllegalArgumentException - if val is null.

      • printDate

        String printDate(Calendar val)

        Converts a Calendar value into a string.

        Parameters:
        val - A Calendar value
        Returns:
        A string containing a lexical representation of xsd:date
        Throws:
        IllegalArgumentException - if val is null.

      • printAnySimpleType

        String printAnySimpleType(String val)

        Converts a string value into a string.

        Parameters:
        val - A string value
        Returns:
        A string containing a lexical representation of xsd:AnySimpleType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind.helpers

JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

See: Description

  • Class Summary
    Class Description
    AbstractMarshallerImpl
    Partial default Marshaller implementation.
    AbstractUnmarshallerImpl
    Partial default Unmarshaller implementation.
    DefaultValidationEventHandler
    JAXB 1.0 only default validation event handler.
    NotIdentifiableEventImpl
    Default implementation of the NotIdentifiableEvent interface.
    ParseConversionEventImpl
    Default implementation of the ParseConversionEvent interface.
    PrintConversionEventImpl
    Default implementation of the PrintConversionEvent interface.
    ValidationEventImpl
    Default implementation of the ValidationEvent interface.
    ValidationEventLocatorImpl
    Default implementation of the ValidationEventLocator interface.

Package javax.xml.bind.helpers Description

JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

JAXB Providers can extend these classes and implement the abstract methods.

Package Specification

  • JAXB Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • The JAXB Website
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind.helpers Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind.helpers

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.bind.helpers.AbstractMarshallerImpl (implements javax.xml.bind.Marshaller)
    • javax.xml.bind.helpers.AbstractUnmarshallerImpl (implements javax.xml.bind.Unmarshaller)
    • javax.xml.bind.helpers.DefaultValidationEventHandler (implements javax.xml.bind.ValidationEventHandler)
    • javax.xml.bind.helpers.ValidationEventImpl (implements javax.xml.bind.ValidationEvent)
      • javax.xml.bind.helpers.NotIdentifiableEventImpl (implements javax.xml.bind.NotIdentifiableEvent)
      • javax.xml.bind.helpers.ParseConversionEventImpl (implements javax.xml.bind.ParseConversionEvent)
      • javax.xml.bind.helpers.PrintConversionEventImpl (implements javax.xml.bind.PrintConversionEvent)
    • javax.xml.bind.helpers.ValidationEventLocatorImpl (implements javax.xml.bind.ValidationEventLocator)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind.helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind.helpers

  • Packages that use javax.xml.bind.helpers
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
  • Classes in javax.xml.bind.helpers used by javax.xml.bind.helpers
    Class and Description
    ValidationEventImpl
    Default implementation of the ValidationEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractMarshallerImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class AbstractMarshallerImpl

  • java.lang.Object
    • javax.xml.bind.helpers.AbstractMarshallerImpl
  • All Implemented Interfaces:
    Marshaller

    public abstract class AbstractMarshallerImpl
extends Object
implements Marshaller
    Partial default Marshaller implementation.

    This class provides a partial default implementation for the Marshaller interface.

    The only methods that a JAXB Provider has to implement are
marshal(Object, javax.xml.transform.Result),
marshal(Object, javax.xml.stream.XMLStreamWriter), and
marshal(Object, javax.xml.stream.XMLEventWriter).

    Since:
    JAXB1.0
    See Also:
    Marshaller

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.xml.bind.Marshaller

        Marshaller.Listener

    • Field Summary

      • Fields inherited from interface javax.xml.bind.Marshaller

        JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION

    • Constructor Summary

      Constructors
      Constructor and Description
      AbstractMarshallerImpl()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      <A extends XmlAdapter>
      A             		getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      AttachmentMarshaller getAttachmentMarshaller()
      protected String getEncoding()
      Convenience method for getting the current output encoding.
      ValidationEventHandler getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      protected String getJavaEncoding(String encoding)
      Gets the corresponding Java encoding name from an IANA name.
      Marshaller.Listener getListener()
      Return Marshaller.Listener registered with this Marshaller.
      Node getNode(Object obj)
      By default, the getNode method is unsupported and throw an UnsupportedOperationException.
      protected String getNoNSSchemaLocation()
      Convenience method for getting the current noNamespaceSchemaLocation.
      Object getProperty(String name)
      Default implementation of the getProperty method handles the four defined properties in Marshaller.
      Schema getSchema()
      Get the JAXP 1.3 Schema object being used to perform marshal-time validation.
      protected String getSchemaLocation()
      Convenience method for getting the current schemaLocation.
      protected boolean isFormattedOutput()
      Convenience method for getting the formatted output flag.
      protected boolean isFragment()
      Convenience method for getting the fragment flag.
      void marshal(Object obj, ContentHandler handler)
      Marshal the content tree rooted at jaxbElement into SAX2 events.
      void marshal(Object jaxbElement, File output)
      Marshal the content tree rooted at jaxbElement into a file.
      void marshal(Object obj, Node node)
      Marshal the content tree rooted at jaxbElement into a DOM tree.
      void marshal(Object obj, OutputStream os)
      Marshal the content tree rooted at jaxbElement into an output stream.
      void marshal(Object obj, Writer w)
      Marshal the content tree rooted at jaxbElement into a Writer.
      void marshal(Object obj, XMLEventWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLEventWriter.
      void marshal(Object obj, XMLStreamWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.
      <A extends XmlAdapter>
      void             		setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this marshaller.
      void setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this marshaller.
      void setAttachmentMarshaller(AttachmentMarshaller am)
      Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment.
      protected void setEncoding(String encoding)
      Convenience method for setting the output encoding.
      void setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      protected void setFormattedOutput(boolean v)
      Convenience method for setting the formatted output flag.
      protected void setFragment(boolean v)
      Convenience method for setting the fragment flag.
      void setListener(Marshaller.Listener listener)
      Register marshal event callback Marshaller.Listener with this Marshaller.
      protected void setNoNSSchemaLocation(String location)
      Convenience method for setting the noNamespaceSchemaLocation.
      void setProperty(String name, Object value)
      Default implementation of the setProperty method handles the four defined properties in Marshaller.
      void setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent marshal operations against.
      protected void setSchemaLocation(String location)
      Convenience method for setting the schemaLocation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.xml.bind.Marshaller

        marshal

    • Constructor Detail

      • AbstractMarshallerImpl

        public AbstractMarshallerImpl()

    • Method Detail

      • marshal

        public final void marshal(Object obj,
                          OutputStream os)
                   throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into an output stream.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The root of content tree to be marshalled.
        os - XML will be added to this stream.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • marshal

        public void marshal(Object jaxbElement,
                    File output)
             throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into a file.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        output - File to be written. If this file already exists, it will be overwritten.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • marshal

        public final void marshal(Object obj,
                          Writer w)
                   throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into a Writer.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The root of content tree to be marshalled.
        w - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • marshal

        public final void marshal(Object obj,
                          ContentHandler handler)
                   throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into SAX2 events.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The root of content tree to be marshalled.
        handler - XML will be sent to this handler as SAX2 events.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • marshal

        public final void marshal(Object obj,
                          Node node)
                   throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into a DOM tree.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The content tree to be marshalled.
        node - DOM nodes will be added as children of this node. This parameter must be a Node that accepts children (Document, DocumentFragment, or Element)
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal jaxbElement (or any object reachable from jaxbElement). See Marshalling a JAXB element.

      • getNode

        public Node getNode(Object obj)
             throws JAXBException
        By default, the getNode method is unsupported and throw an UnsupportedOperationException. Implementations that choose to support this method must override this method.
        Specified by:
        getNode in interface Marshaller
        Parameters:
        obj - - JAXB Java representation of XML content
        Returns:
        the DOM tree view of the contentTree
        Throws:
        JAXBException - If any unexpected problem occurs

      • getEncoding

        protected String getEncoding()
        Convenience method for getting the current output encoding.
        Returns:
        the current encoding or "UTF-8" if it hasn't been set.

      • setEncoding

        protected void setEncoding(String encoding)
        Convenience method for setting the output encoding.
        Parameters:
        encoding - a valid encoding as specified in the Marshaller class documentation

      • getSchemaLocation

        protected String getSchemaLocation()
        Convenience method for getting the current schemaLocation.
        Returns:
        the current schemaLocation or null if it hasn't been set

      • setSchemaLocation

        protected void setSchemaLocation(String location)
        Convenience method for setting the schemaLocation.
        Parameters:
        location - the schemaLocation value

      • getNoNSSchemaLocation

        protected String getNoNSSchemaLocation()
        Convenience method for getting the current noNamespaceSchemaLocation.
        Returns:
        the current noNamespaceSchemaLocation or null if it hasn't been set

      • setNoNSSchemaLocation

        protected void setNoNSSchemaLocation(String location)
        Convenience method for setting the noNamespaceSchemaLocation.
        Parameters:
        location - the noNamespaceSchemaLocation value

      • isFormattedOutput

        protected boolean isFormattedOutput()
        Convenience method for getting the formatted output flag.
        Returns:
        the current value of the formatted output flag or false if it hasn't been set.

      • setFormattedOutput

        protected void setFormattedOutput(boolean v)
        Convenience method for setting the formatted output flag.
        Parameters:
        v - value of the formatted output flag.

      • isFragment

        protected boolean isFragment()
        Convenience method for getting the fragment flag.
        Returns:
        the current value of the fragment flag or false if it hasn't been set.

      • setFragment

        protected void setFragment(boolean v)
        Convenience method for setting the fragment flag.
        Parameters:
        v - value of the fragment flag.

      • getJavaEncoding

        protected String getJavaEncoding(String encoding)
                          throws UnsupportedEncodingException
        Gets the corresponding Java encoding name from an IANA name. This method is a helper method for the derived class to convert encoding names.
        Throws:
        UnsupportedEncodingException - If this implementation couldn't find the Java encoding name.

      • setProperty

        public void setProperty(String name,
                        Object value)
                 throws PropertyException
        Default implementation of the setProperty method handles the four defined properties in Marshaller. If a provider needs to handle additional properties, it should override this method in a derived class.
        Specified by:
        setProperty in interface Marshaller
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value

      • getProperty

        public Object getProperty(String name)
                   throws PropertyException
        Default implementation of the getProperty method handles the four defined properties in Marshaller. If a provider needs to support additional provider specific properties, it should override this method in a derived class.
        Specified by:
        getProperty in interface Marshaller
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name

      • getEventHandler

        public ValidationEventHandler getEventHandler()
                                       throws JAXBException
        Description copied from interface: Marshaller
        Return the current event handler or the default event handler if one hasn't been set.
        Specified by:
        getEventHandler in interface Marshaller
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler
        See Also:
        Marshaller.getEventHandler()

      • setEventHandler

        public void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException
        Description copied from interface: Marshaller
        Allow an application to register a validation event handler.

        The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the marshal API's. If the client application does not register a validation event handler before invoking one of the marshal methods, then validation events will be handled by the default event handler which will terminate the marshal operation after the first error or fatal error is encountered.

        Calling this method with a null parameter will cause the Marshaller to revert back to the default default event handler.

        Specified by:
        setEventHandler in interface Marshaller
        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler
        See Also:
        Marshaller.setEventHandler(ValidationEventHandler)

      • marshal

        public void marshal(Object obj,
                    XMLEventWriter writer)
             throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into a XMLEventWriter.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The content tree rooted at jaxbElement to be marshalled.
        writer - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • marshal

        public void marshal(Object obj,
                    XMLStreamWriter writer)
             throws JAXBException
        Description copied from interface: Marshaller
        Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.
        Specified by:
        marshal in interface Marshaller
        Parameters:
        obj - The content tree to be marshalled.
        writer - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.

      • setSchema

        public void setSchema(Schema schema)
        Description copied from interface: Marshaller
        Specify the JAXP 1.3 Schema object that should be used to validate subsequent marshal operations against. Passing null into this method will disable validation.

        This method allows the caller to validate the marshalled XML as it's marshalled.

        Initially this property is set to null.

        Specified by:
        setSchema in interface Marshaller
        Parameters:
        schema - Schema object to validate marshal operations against or null to disable validation

      • getSchema

        public Schema getSchema()
        Description copied from interface: Marshaller
        Get the JAXP 1.3 Schema object being used to perform marshal-time validation. If there is no Schema set on the marshaller, then this method will return null indicating that marshal-time validation will not be performed.
        Specified by:
        getSchema in interface Marshaller
        Returns:
        the Schema object being used to perform marshal-time validation or null if not present.

      • setAdapter

        public void setAdapter(XmlAdapter adapter)
        Description copied from interface: Marshaller
        Associates a configured instance of XmlAdapter with this marshaller.

        This is a convenience method that invokes setAdapter(adapter.getClass(),adapter);.

        Specified by:
        setAdapter in interface Marshaller
        See Also:
        Marshaller.setAdapter(Class,XmlAdapter)

      • setAdapter

        public <A extends XmlAdapter> void setAdapter(Class<A> type,
                                              A adapter)
        Description copied from interface: Marshaller
        Associates a configured instance of XmlAdapter with this marshaller.

        Every marshaller internally maintains a Map<Class,XmlAdapter>, which it uses for marshalling classes whose fields/methods are annotated with XmlJavaTypeAdapter.

        This method allows applications to use a configured instance of XmlAdapter. When an instance of an adapter is not given, a marshaller will create one by invoking its default constructor.

        Specified by:
        setAdapter in interface Marshaller
        Parameters:
        type - The type of the adapter. The specified instance will be used when XmlJavaTypeAdapter.value() refers to this type.
        adapter - The instance of the adapter to be used. If null, it will un-register the current adapter set for this type.

      • getAdapter

        public <A extends XmlAdapter> A getAdapter(Class<A> type)
        Description copied from interface: Marshaller
        Gets the adapter associated with the specified type. This is the reverse operation of the Marshaller.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter) method.
        Specified by:
        getAdapter in interface Marshaller

      • setAttachmentMarshaller

        public void setAttachmentMarshaller(AttachmentMarshaller am)
        Description copied from interface: Marshaller

        Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment. The attachment is referenced from the XML document content model by content-id URIs(cid) references stored within the xml document.

        Specified by:
        setAttachmentMarshaller in interface Marshaller

      • getAttachmentMarshaller

        public AttachmentMarshaller getAttachmentMarshaller()
        Specified by:
        getAttachmentMarshaller in interface Marshaller

      • setListener

        public void setListener(Marshaller.Listener listener)
        Description copied from interface: Marshaller

        Register marshal event callback Marshaller.Listener with this Marshaller.

        There is only one Listener per Marshaller. Setting a Listener replaces the previous set Listener. One can unregister current Listener by setting listener to null.

        Specified by:
        setListener in interface Marshaller
        Parameters:
        listener - an instance of a class that implements Marshaller.Listener

      • getListener

        public Marshaller.Listener getListener()
        Description copied from interface: Marshaller

        Return Marshaller.Listener registered with this Marshaller.

        Specified by:
        getListener in interface Marshaller
        Returns:
        registered Marshaller.Listener or null if no Listener is registered with this Marshaller.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractUnmarshallerImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class AbstractUnmarshallerImpl

  • java.lang.Object
    • javax.xml.bind.helpers.AbstractUnmarshallerImpl
  • All Implemented Interfaces:
    Unmarshaller

    public abstract class AbstractUnmarshallerImpl
extends Object
implements Unmarshaller
    Partial default Unmarshaller implementation.

    This class provides a partial default implementation for the Unmarshallerinterface.

    A JAXB Provider has to implement five methods (getUnmarshallerHandler, unmarshal(Node), unmarshal(XMLReader,InputSource), unmarshal(XMLStreamReader), and unmarshal(XMLEventReader).

    Since:
    JAXB1.0
    See Also:
    Unmarshaller

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.xml.bind.Unmarshaller

        Unmarshaller.Listener

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected boolean validating
      whether or not the unmarshaller will validate

    • Constructor Summary

      Constructors
      Constructor and Description
      AbstractUnmarshallerImpl()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      protected UnmarshalException createUnmarshalException(SAXException e)
      Creates an UnmarshalException from a SAXException.
      <A extends XmlAdapter>
      A             		getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      AttachmentUnmarshaller getAttachmentUnmarshaller()
      ValidationEventHandler getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      Unmarshaller.Listener getListener()
      Return Unmarshaller.Listener registered with this Unmarshaller.
      Object getProperty(String name)
      Default implementation of the getProperty method always throws PropertyException since there are no required properties.
      Schema getSchema()
      Get the JAXP 1.3 Schema object being used to perform unmarshal-time validation.
      protected XMLReader getXMLReader()
      Obtains a configured XMLReader.
      boolean isValidating()
      Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.
      <A extends XmlAdapter>
      void             		setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      void setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      void setAttachmentUnmarshaller(AttachmentUnmarshaller au)
      Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments.
      void setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      void setListener(Unmarshaller.Listener listener)
      Register unmarshal event callback Unmarshaller.Listener with this Unmarshaller.
      void setProperty(String name, Object value)
      Default implementation of the setProperty method always throws PropertyException since there are no required properties.
      void setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent unmarshal operations against.
      void setValidating(boolean validating)
      Specifies whether or not the Unmarshaller should validate during unmarshal operations.
      Object unmarshal(File f)
      Unmarshal XML data from the specified file and return the resulting content tree.
      Object unmarshal(InputSource source)
      Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.
      Object unmarshal(InputStream is)
      Unmarshal XML data from the specified InputStream and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(Node node, Class<T> expectedType)
      Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.
      Object unmarshal(Reader reader)
      Unmarshal XML data from the specified Reader and return the resulting content tree.
      Object unmarshal(Source source)
      Unmarshal XML data from the specified XML Source and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(Source source, Class<T> expectedType)
      Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.
      Object unmarshal(URL url)
      Unmarshal XML data from the specified URL and return the resulting content tree.
      Object unmarshal(XMLEventReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.
      protected abstract Object unmarshal(XMLReader reader, InputSource source)
      Unmarshals an object by using the specified XMLReader and the InputSource.
      Object unmarshal(XMLStreamReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> expectedType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.xml.bind.Unmarshaller

        getUnmarshallerHandler, unmarshal

    • Field Detail

      • validating

        protected boolean validating
        whether or not the unmarshaller will validate

    • Constructor Detail

      • AbstractUnmarshallerImpl

        public AbstractUnmarshallerImpl()

    • Method Detail

      • getXMLReader

        protected XMLReader getXMLReader()
                          throws JAXBException
        Obtains a configured XMLReader. This method is used when the client-specified SAXSource object doesn't have XMLReader. Unmarshaller is not re-entrant, so we will only use one instance of XMLReader.
        Throws:
        JAXBException

      • unmarshal

        public Object unmarshal(Source source)
                 throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified XML Source and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        SAX 2.0 Parser Pluggability

        A client application can choose not to use the default parser mechanism supplied with their JAXB provider. Any SAX 2.0 compliant parser can be substituted for the JAXB provider's default mechanism. To do so, the client application must properly configure a SAXSource containing an XMLReader implemented by the SAX 2.0 parser provider. If the XMLReader has an org.xml.sax.ErrorHandler registered on it, it will be replaced by the JAXB Provider so that validation errors can be reported via the ValidationEventHandler mechanism of JAXB. If the SAXSource does not contain an XMLReader, then the JAXB provider's default parser mechanism will be used.

        This parser replacement mechanism can also be used to replace the JAXB provider's unmarshal-time validation engine. The client application must properly configure their SAX 2.0 compliant parser to perform validation (as shown in the example above). Any SAXParserExceptions encountered by the parser during the unmarshal operation will be processed by the JAXB provider and converted into JAXB ValidationEvent objects which will be reported back to the client via the ValidationEventHandler registered with the Unmarshaller. Note: specifying a substitute validating SAX 2.0 parser for unmarshalling does not necessarily replace the validation engine used by the JAXB provider for performing on-demand validation.

        The only way for a client application to specify an alternate parser mechanism to be used during unmarshal is via the unmarshal(SAXSource) API. All other forms of the unmarshal method (File, URL, Node, etc) will use the JAXB provider's default parser and validator mechanisms.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        source - the XML Source to unmarshal XML data from (providers are only required to support SAXSource, DOMSource, and StreamSource)
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        See Also:
        Unmarshaller.unmarshal(javax.xml.transform.Source, Class)

      • unmarshal

        protected abstract Object unmarshal(XMLReader reader,
                                    InputSource source)
                             throws JAXBException
        Unmarshals an object by using the specified XMLReader and the InputSource. The callee should call the setErrorHandler method of the XMLReader so that errors are passed to the client-specified ValidationEventHandler.
        Throws:
        JAXBException

      • unmarshal

        public final Object unmarshal(InputSource source)
                       throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        source - the input source to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public final Object unmarshal(URL url)
                       throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified URL and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        url - the url to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public final Object unmarshal(File f)
                       throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified file and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        f - the file to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public final Object unmarshal(InputStream is)
                       throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified InputStream and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API.

        Implements Unmarshal Global Root Element.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        is - the InputStream to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public final Object unmarshal(Reader reader)
                       throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified Reader and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API, because a Reader does not provide the system ID.

        Implements Unmarshal Global Root Element.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        reader - the Reader to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • isValidating

        public boolean isValidating()
                     throws JAXBException
        Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.

        Note: I named this method isValidating() to stay in-line with JAXP, as opposed to naming it getValidating().

        Specified by:
        isValidating in interface Unmarshaller
        Returns:
        true if the Unmarshaller is configured to validate during unmarshal operations, false otherwise
        Throws:
        JAXBException - if an error occurs while retrieving the validating flag

      • setEventHandler

        public void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException
        Allow an application to register a validation event handler.

        The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the unmarshal methods. If the client application does not register a validation event handler before invoking the unmarshal methods, then all validation events will be silently ignored and may result in unexpected behaviour.

        Specified by:
        setEventHandler in interface Unmarshaller
        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler

      • setValidating

        public void setValidating(boolean validating)
                   throws JAXBException
        Specifies whether or not the Unmarshaller should validate during unmarshal operations. By default, the Unmarshaller does not validate.

        This method may only be invoked before or after calling one of the unmarshal methods.

        Specified by:
        setValidating in interface Unmarshaller
        Parameters:
        validating - true if the Unmarshaller should validate during unmarshal, false otherwise
        Throws:
        JAXBException - if an error occurred while enabling or disabling validation at unmarshal time

      • getEventHandler

        public ValidationEventHandler getEventHandler()
                                       throws JAXBException
        Return the current event handler or the default event handler if one hasn't been set.
        Specified by:
        getEventHandler in interface Unmarshaller
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler

      • createUnmarshalException

        protected UnmarshalException createUnmarshalException(SAXException e)
        Creates an UnmarshalException from a SAXException. This is an utility method provided for the derived classes.

        When a provider-implemented ContentHandler wants to throw a JAXBException, it needs to wrap the exception by a SAXException. If the unmarshaller implementation blindly wrap SAXException by JAXBException, such an exception will be a JAXBException wrapped by a SAXException wrapped by another JAXBException. This is silly.

        This method checks the nested exception of SAXException and reduce those excessive wrapping.

        Returns:
        the resulting UnmarshalException

      • setProperty

        public void setProperty(String name,
                        Object value)
                 throws PropertyException
        Default implementation of the setProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.
        Specified by:
        setProperty in interface Unmarshaller
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value

      • getProperty

        public Object getProperty(String name)
                   throws PropertyException
        Default implementation of the getProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.
        Specified by:
        getProperty in interface Unmarshaller
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name

      • unmarshal

        public Object unmarshal(XMLEventReader reader)
                 throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified pull parser and return the resulting content tree.

        This method is an Unmarshal Global Root method.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        reader - The parser to be read.
        Returns:
        the newly created root object of the java content tree.
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        See Also:
        Unmarshaller.unmarshal(javax.xml.stream.XMLEventReader, Class)

      • unmarshal

        public Object unmarshal(XMLStreamReader reader)
                 throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified pull parser and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        reader - The parser to be read.
        Returns:
        the newly created root object of the java content tree.
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        See Also:
        Unmarshaller.unmarshal(javax.xml.stream.XMLStreamReader, Class)

      • unmarshal

        public <T> JAXBElement<T> unmarshal(Node node,
                                    Class<T> expectedType)
                             throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.

        Implements Unmarshal by Declared Type

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        node - the document/element to unmarshal XML data from. The caller must support at least Document and Element.
        expectedType - appropriate JAXB mapped class to hold node's XML data.
        Returns:
        JAXB Element representation of node
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public <T> JAXBElement<T> unmarshal(Source source,
                                    Class<T> expectedType)
                             throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.

        Implements Unmarshal by Declared Type

        See SAX 2.0 Parser Pluggability

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        source - the XML Source to unmarshal XML data from (providers are only required to support SAXSource, DOMSource, and StreamSource)
        expectedType - appropriate JAXB mapped class to hold source's xml root element
        Returns:
        Java content rooted by JAXB Element
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public <T> JAXBElement<T> unmarshal(XMLStreamReader reader,
                                    Class<T> expectedType)
                             throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

        This method implements unmarshal by declaredType.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        reader - The parser to be read.
        expectedType - appropriate JAXB mapped class to hold reader's START_ELEMENT XML data.
        Returns:
        content tree rooted by JAXB Element representation
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • unmarshal

        public <T> JAXBElement<T> unmarshal(XMLEventReader reader,
                                    Class<T> expectedType)
                             throws JAXBException
        Description copied from interface: Unmarshaller
        Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

        This method implements unmarshal by declaredType.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Specified by:
        unmarshal in interface Unmarshaller
        Parameters:
        reader - The parser to be read.
        expectedType - appropriate JAXB mapped class to hold reader's START_ELEMENT XML data.
        Returns:
        content tree rooted by JAXB Element representation
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data

      • setSchema

        public void setSchema(Schema schema)
        Description copied from interface: Unmarshaller
        Specify the JAXP 1.3 Schema object that should be used to validate subsequent unmarshal operations against. Passing null into this method will disable validation.

        This method replaces the deprecated setValidating(boolean) API.

        Initially this property is set to null.

        Specified by:
        setSchema in interface Unmarshaller
        Parameters:
        schema - Schema object to validate unmarshal operations against or null to disable validation

      • getSchema

        public Schema getSchema()
        Description copied from interface: Unmarshaller
        Get the JAXP 1.3 Schema object being used to perform unmarshal-time validation. If there is no Schema set on the unmarshaller, then this method will return null indicating that unmarshal-time validation will not be performed.

        This method provides replacement functionality for the deprecated Unmarshaller.isValidating() API as well as access to the Schema object. To determine if the Unmarshaller has validation enabled, simply test the return type for null:

        boolean isValidating = u.getSchema()!=null;

        Specified by:
        getSchema in interface Unmarshaller
        Returns:
        the Schema object being used to perform unmarshal-time validation or null if not present

      • setAdapter

        public void setAdapter(XmlAdapter adapter)
        Description copied from interface: Unmarshaller
        Associates a configured instance of XmlAdapter with this unmarshaller.

        This is a convenience method that invokes setAdapter(adapter.getClass(),adapter);.

        Specified by:
        setAdapter in interface Unmarshaller
        See Also:
        Unmarshaller.setAdapter(Class,XmlAdapter)

      • setAdapter

        public <A extends XmlAdapter> void setAdapter(Class<A> type,
                                              A adapter)
        Description copied from interface: Unmarshaller
        Associates a configured instance of XmlAdapter with this unmarshaller.

        Every unmarshaller internally maintains a Map<Class,XmlAdapter>, which it uses for unmarshalling classes whose fields/methods are annotated with XmlJavaTypeAdapter.

        This method allows applications to use a configured instance of XmlAdapter. When an instance of an adapter is not given, an unmarshaller will create one by invoking its default constructor.

        Specified by:
        setAdapter in interface Unmarshaller
        Parameters:
        type - The type of the adapter. The specified instance will be used when XmlJavaTypeAdapter.value() refers to this type.
        adapter - The instance of the adapter to be used. If null, it will un-register the current adapter set for this type.

      • getAdapter

        public <A extends XmlAdapter> A getAdapter(Class<A> type)
        Description copied from interface: Unmarshaller
        Gets the adapter associated with the specified type. This is the reverse operation of the Unmarshaller.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter) method.
        Specified by:
        getAdapter in interface Unmarshaller

      • setAttachmentUnmarshaller

        public void setAttachmentUnmarshaller(AttachmentUnmarshaller au)
        Description copied from interface: Unmarshaller

        Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments.

        Unmarshal time validation, enabled via Unmarshaller.setSchema(Schema), must be supported even when unmarshaller is performing XOP processing.

        Specified by:
        setAttachmentUnmarshaller in interface Unmarshaller

      • getAttachmentUnmarshaller

        public AttachmentUnmarshaller getAttachmentUnmarshaller()
        Specified by:
        getAttachmentUnmarshaller in interface Unmarshaller

      • setListener

        public void setListener(Unmarshaller.Listener listener)
        Description copied from interface: Unmarshaller

        Register unmarshal event callback Unmarshaller.Listener with this Unmarshaller.

        There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener. One can unregister current Listener by setting listener to null.

        Specified by:
        setListener in interface Unmarshaller
        Parameters:
        listener - provides unmarshal event callbacks for this Unmarshaller

      • getListener

        public Unmarshaller.Listener getListener()
        Description copied from interface: Unmarshaller

        Return Unmarshaller.Listener registered with this Unmarshaller.

        Specified by:
        getListener in interface Unmarshaller
        Returns:
        registered Unmarshaller.Listener or null if no Listener is registered with this Unmarshaller.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.AbstractMarshallerImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.AbstractMarshallerImpl

No usage of javax.xml.bind.helpers.AbstractMarshallerImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.AbstractUnmarshallerImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.AbstractUnmarshallerImpl

No usage of javax.xml.bind.helpers.AbstractUnmarshallerImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.DefaultValidationEventHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.DefaultValidationEventHandler

No usage of javax.xml.bind.helpers.DefaultValidationEventHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.NotIdentifiableEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.NotIdentifiableEventImpl

No usage of javax.xml.bind.helpers.NotIdentifiableEventImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.ParseConversionEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.ParseConversionEventImpl

No usage of javax.xml.bind.helpers.ParseConversionEventImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.PrintConversionEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.PrintConversionEventImpl

No usage of javax.xml.bind.helpers.PrintConversionEventImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.ValidationEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.ValidationEventImpl

  • Packages that use ValidationEventImpl
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

    • Uses of ValidationEventImpl in javax.xml.bind.helpers

      Subclasses of ValidationEventImpl in javax.xml.bind.helpers
      Modifier and Type Class and Description
      class  NotIdentifiableEventImpl
      Default implementation of the NotIdentifiableEvent interface.
      class  ParseConversionEventImpl
      Default implementation of the ParseConversionEvent interface.
      class  PrintConversionEventImpl
      Default implementation of the PrintConversionEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.helpers.ValidationEventLocatorImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.helpers.ValidationEventLocatorImpl

No usage of javax.xml.bind.helpers.ValidationEventLocatorImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultValidationEventHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class DefaultValidationEventHandler

  • java.lang.Object
    • javax.xml.bind.helpers.DefaultValidationEventHandler
  • All Implemented Interfaces:
    ValidationEventHandler

    public class DefaultValidationEventHandler
extends Object
implements ValidationEventHandler

    JAXB 1.0 only default validation event handler. This is the default handler for all objects created from a JAXBContext that is managing schema-derived code generated by a JAXB 1.0 binding compiler.

    This handler causes the unmarshal and validate operations to fail on the first error or fatal error.

    This handler is not the default handler for JAXB mapped classes following JAXB 2.0 or later versions. Default validation event handling has changed and is specified in Unmarshaller and Marshaller.

    Since:
    JAXB1.0
    See Also:
    Unmarshaller, Validator, ValidationEventHandler

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultValidationEventHandler()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean handleEvent(ValidationEvent event)
      Receive notification of a validation warning or error.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DefaultValidationEventHandler

        public DefaultValidationEventHandler()

    • Method Detail

      • handleEvent

        public boolean handleEvent(ValidationEvent event)
        Description copied from interface: ValidationEventHandler
        Receive notification of a validation warning or error. The ValidationEvent will have a ValidationEventLocator embedded in it that indicates where the error or warning occurred.

        If an unchecked runtime exception is thrown from this method, the JAXB provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.

        Specified by:
        handleEvent in interface ValidationEventHandler
        Parameters:
        event - the encapsulated validation event information. It is a provider error if this parameter is null.
        Returns:
        true if the JAXB Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotIdentifiableEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class NotIdentifiableEventImpl

  • java.lang.Object
    • javax.xml.bind.helpers.ValidationEventImpl
      • javax.xml.bind.helpers.NotIdentifiableEventImpl
  • All Implemented Interfaces:
    NotIdentifiableEvent, ValidationEvent

    public class NotIdentifiableEventImpl
extends ValidationEventImpl
implements NotIdentifiableEvent
    Default implementation of the NotIdentifiableEvent interface.

    JAXB providers are allowed to use whatever class that implements the ValidationEvent interface. This class is just provided for a convenience.

    Since:
    JAXB1.0
    See Also:
    NotIdentifiableEvent, Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Constructor Summary

      Constructors
      Constructor and Description
      NotIdentifiableEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new NotIdentifiableEventImpl.
      NotIdentifiableEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new NotIdentifiableEventImpl.

    • Method Summary

      • Methods inherited from class javax.xml.bind.helpers.ValidationEventImpl

        getLinkedException, getLocator, getMessage, getSeverity, setLinkedException, setLocator, setMessage, setSeverity, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity

    • Constructor Detail

      • NotIdentifiableEventImpl

        public NotIdentifiableEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator)
        Create a new NotIdentifiableEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

      • NotIdentifiableEventImpl

        public NotIdentifiableEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator,
                                Throwable _linkedException)
        Create a new NotIdentifiableEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        _linkedException - An optional linked exception that may provide additional information about the event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParseConversionEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class ParseConversionEventImpl

  • java.lang.Object
    • javax.xml.bind.helpers.ValidationEventImpl
      • javax.xml.bind.helpers.ParseConversionEventImpl
  • All Implemented Interfaces:
    ParseConversionEvent, ValidationEvent

    public class ParseConversionEventImpl
extends ValidationEventImpl
implements ParseConversionEvent
    Default implementation of the ParseConversionEvent interface.

    JAXB providers are allowed to use whatever class that implements the ValidationEvent interface. This class is just provided for a convenience.

    Since:
    JAXB1.0
    See Also:
    ParseConversionEvent, Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Constructor Summary

      Constructors
      Constructor and Description
      ParseConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new ParseConversionEventImpl.
      ParseConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new ParseConversionEventImpl.

    • Method Summary

      • Methods inherited from class javax.xml.bind.helpers.ValidationEventImpl

        getLinkedException, getLocator, getMessage, getSeverity, setLinkedException, setLocator, setMessage, setSeverity, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity

    • Constructor Detail

      • ParseConversionEventImpl

        public ParseConversionEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator)
        Create a new ParseConversionEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

      • ParseConversionEventImpl

        public ParseConversionEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator,
                                Throwable _linkedException)
        Create a new ParseConversionEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        _linkedException - An optional linked exception that may provide additional information about the event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PrintConversionEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class PrintConversionEventImpl

  • java.lang.Object
    • javax.xml.bind.helpers.ValidationEventImpl
      • javax.xml.bind.helpers.PrintConversionEventImpl
  • All Implemented Interfaces:
    PrintConversionEvent, ValidationEvent

    public class PrintConversionEventImpl
extends ValidationEventImpl
implements PrintConversionEvent
    Default implementation of the PrintConversionEvent interface.

    JAXB providers are allowed to use whatever class that implements the ValidationEvent interface. This class is just provided for a convenience.

    Since:
    JAXB1.0
    See Also:
    PrintConversionEvent, Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Constructor Summary

      Constructors
      Constructor and Description
      PrintConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new PrintConversionEventImpl.
      PrintConversionEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new PrintConversionEventImpl.

    • Method Summary

      • Methods inherited from class javax.xml.bind.helpers.ValidationEventImpl

        getLinkedException, getLocator, getMessage, getSeverity, setLinkedException, setLocator, setMessage, setSeverity, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface javax.xml.bind.ValidationEvent

        getLinkedException, getLocator, getMessage, getSeverity

    • Constructor Detail

      • PrintConversionEventImpl

        public PrintConversionEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator)
        Create a new PrintConversionEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

      • PrintConversionEventImpl

        public PrintConversionEventImpl(int _severity,
                                String _message,
                                ValidationEventLocator _locator,
                                Throwable _linkedException)
        Create a new PrintConversionEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        _linkedException - An optional linked exception that may provide additional information about the event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEventImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class ValidationEventImpl

  • java.lang.Object
    • javax.xml.bind.helpers.ValidationEventImpl
  • All Implemented Interfaces:
    ValidationEvent
    Direct Known Subclasses:
    NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl

    public class ValidationEventImpl
extends Object
implements ValidationEvent
    Default implementation of the ValidationEvent interface.

    JAXB providers are allowed to use whatever class that implements the ValidationEvent interface. This class is just provided for a convenience.

    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Field Summary

      • Fields inherited from interface javax.xml.bind.ValidationEvent

        ERROR, FATAL_ERROR, WARNING

    • Constructor Summary

      Constructors
      Constructor and Description
      ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator)
      Create a new ValidationEventImpl.
      ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
      Create a new ValidationEventImpl.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getLinkedException()
      Retrieve the linked exception for this warning/error.
      ValidationEventLocator getLocator()
      Retrieve the locator for this warning/error.
      String getMessage()
      Retrieve the text message for this warning/error.
      int getSeverity()
      Retrieve the severity code for this warning/error.
      void setLinkedException(Throwable _linkedException)
      Set the linked exception field of this event.
      void setLocator(ValidationEventLocator _locator)
      Set the locator object for this event.
      void setMessage(String _message)
      Set the message field of this event.
      void setSeverity(int _severity)
      Set the severity field of this event.
      String toString()
      Returns a string representation of this object in a format helpful to debugging.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ValidationEventImpl

        public ValidationEventImpl(int _severity,
                           String _message,
                           ValidationEventLocator _locator)
        Create a new ValidationEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

      • ValidationEventImpl

        public ValidationEventImpl(int _severity,
                           String _message,
                           ValidationEventLocator _locator,
                           Throwable _linkedException)
        Create a new ValidationEventImpl.
        Parameters:
        _severity - The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR
        _message - The text message for this event - may be null.
        _locator - The locator object for this event - may be null.
        _linkedException - An optional linked exception that may provide additional information about the event - may be null.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

    • Method Detail

      • getSeverity

        public int getSeverity()
        Description copied from interface: ValidationEvent
        Retrieve the severity code for this warning/error.

        Must be one of ValidationError.WARNING, ValidationError.ERROR, or ValidationError.FATAL_ERROR.

        Specified by:
        getSeverity in interface ValidationEvent
        Returns:
        the severity code for this warning/error

      • setSeverity

        public void setSeverity(int _severity)
        Set the severity field of this event.
        Parameters:
        _severity - Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.
        Throws:
        IllegalArgumentException - if an illegal severity field is supplied

      • getMessage

        public String getMessage()
        Description copied from interface: ValidationEvent
        Retrieve the text message for this warning/error.
        Specified by:
        getMessage in interface ValidationEvent
        Returns:
        the text message for this warning/error or null if one wasn't set

      • setMessage

        public void setMessage(String _message)
        Set the message field of this event.
        Parameters:
        _message - String message - may be null.

      • getLinkedException

        public Throwable getLinkedException()
        Description copied from interface: ValidationEvent
        Retrieve the linked exception for this warning/error.
        Specified by:
        getLinkedException in interface ValidationEvent
        Returns:
        the linked exception for this warning/error or null if one wasn't set

      • setLinkedException

        public void setLinkedException(Throwable _linkedException)
        Set the linked exception field of this event.
        Parameters:
        _linkedException - Optional linked exception - may be null.

      • getLocator

        public ValidationEventLocator getLocator()
        Description copied from interface: ValidationEvent
        Retrieve the locator for this warning/error.
        Specified by:
        getLocator in interface ValidationEvent
        Returns:
        the locator that indicates where the warning/error occurred

      • setLocator

        public void setLocator(ValidationEventLocator _locator)
        Set the locator object for this event.
        Parameters:
        _locator - The locator - may be null.

      • toString

        public String toString()
        Returns a string representation of this object in a format helpful to debugging.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
        See Also:
        Object.equals(Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEventLocatorImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.helpers

Class ValidationEventLocatorImpl

  • java.lang.Object
    • javax.xml.bind.helpers.ValidationEventLocatorImpl
  • All Implemented Interfaces:
    ValidationEventLocator

    public class ValidationEventLocatorImpl
extends Object
implements ValidationEventLocator
    Default implementation of the ValidationEventLocator interface.

    JAXB providers are allowed to use whatever class that implements the ValidationEventLocator interface. This class is just provided for a convenience.

    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Constructor Summary

      Constructors
      Constructor and Description
      ValidationEventLocatorImpl()
      Creates an object with all fields unavailable.
      ValidationEventLocatorImpl(Locator loc)
      Constructs an object from an org.xml.sax.Locator.
      ValidationEventLocatorImpl(Node _node)
      Constructs an object that points to a DOM Node.
      ValidationEventLocatorImpl(Object _object)
      Constructs an object that points to a JAXB content object.
      ValidationEventLocatorImpl(SAXParseException e)
      Constructs an object from the location information of a SAXParseException.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      Return the column number if available
      int getLineNumber()
      Return the line number if available
      Node getNode()
      Return a reference to the DOM Node if available
      Object getObject()
      Return a reference to the object in the Java content tree if available
      int getOffset()
      Return the byte offset if available
      URL getURL()
      Return the name of the XML source as a URL if available
      void setColumnNumber(int _columnNumber)
      Set the columnNumber field on this event locator.
      void setLineNumber(int _lineNumber)
      Set the lineNumber field on this event locator.
      void setNode(Node _node)
      Set the Node field on this event locator.
      void setObject(Object _object)
      Set the Object field on this event locator.
      void setOffset(int _offset)
      Set the offset field on this event locator.
      void setURL(URL _url)
      Set the URL field on this event locator.
      String toString()
      Returns a string representation of this object in a format helpful to debugging.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ValidationEventLocatorImpl

        public ValidationEventLocatorImpl()
        Creates an object with all fields unavailable.

      • ValidationEventLocatorImpl

        public ValidationEventLocatorImpl(Locator loc)
        Constructs an object from an org.xml.sax.Locator. The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available.
        Parameters:
        loc - the SAX Locator object that will be used to populate this event locator.
        Throws:
        IllegalArgumentException - if the Locator is null

      • ValidationEventLocatorImpl

        public ValidationEventLocatorImpl(SAXParseException e)
        Constructs an object from the location information of a SAXParseException. The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available.
        Parameters:
        e - the SAXParseException object that will be used to populate this event locator.
        Throws:
        IllegalArgumentException - if the SAXParseException is null

      • ValidationEventLocatorImpl

        public ValidationEventLocatorImpl(Node _node)
        Constructs an object that points to a DOM Node. The object's Node becomes available. ColumnNumber, LineNumber, Object, Offset, and URL are not available.
        Parameters:
        _node - the DOM Node object that will be used to populate this event locator.
        Throws:
        IllegalArgumentException - if the Node is null

      • ValidationEventLocatorImpl

        public ValidationEventLocatorImpl(Object _object)
        Constructs an object that points to a JAXB content object. The object's Object becomes available. ColumnNumber, LineNumber, Node, Offset, and URL are not available.
        Parameters:
        _object - the Object that will be used to populate this event locator.
        Throws:
        IllegalArgumentException - if the Object is null

    • Method Detail

      • getURL

        public URL getURL()
        Description copied from interface: ValidationEventLocator
        Return the name of the XML source as a URL if available
        Specified by:
        getURL in interface ValidationEventLocator
        Returns:
        the name of the XML source as a URL or null if unavailable
        See Also:
        ValidationEventLocator.getURL()

      • setURL

        public void setURL(URL _url)
        Set the URL field on this event locator. Null values are allowed.
        Parameters:
        _url - the url

      • getOffset

        public int getOffset()
        Description copied from interface: ValidationEventLocator
        Return the byte offset if available
        Specified by:
        getOffset in interface ValidationEventLocator
        Returns:
        the byte offset into the input source or -1 if unavailable
        See Also:
        ValidationEventLocator.getOffset()

      • setOffset

        public void setOffset(int _offset)
        Set the offset field on this event locator.
        Parameters:
        _offset - the offset

      • getLineNumber

        public int getLineNumber()
        Description copied from interface: ValidationEventLocator
        Return the line number if available
        Specified by:
        getLineNumber in interface ValidationEventLocator
        Returns:
        the line number or -1 if unavailable
        See Also:
        ValidationEventLocator.getLineNumber()

      • setLineNumber

        public void setLineNumber(int _lineNumber)
        Set the lineNumber field on this event locator.
        Parameters:
        _lineNumber - the line number

      • getColumnNumber

        public int getColumnNumber()
        Description copied from interface: ValidationEventLocator
        Return the column number if available
        Specified by:
        getColumnNumber in interface ValidationEventLocator
        Returns:
        the column number or -1 if unavailable
        See Also:
        ValidationEventLocator.getColumnNumber()

      • setColumnNumber

        public void setColumnNumber(int _columnNumber)
        Set the columnNumber field on this event locator.
        Parameters:
        _columnNumber - the column number

      • getObject

        public Object getObject()
        Description copied from interface: ValidationEventLocator
        Return a reference to the object in the Java content tree if available
        Specified by:
        getObject in interface ValidationEventLocator
        Returns:
        a reference to the object in the Java content tree or null if unavailable
        See Also:
        ValidationEventLocator.getObject()

      • setObject

        public void setObject(Object _object)
        Set the Object field on this event locator. Null values are allowed.
        Parameters:
        _object - the java content object

      • getNode

        public Node getNode()
        Description copied from interface: ValidationEventLocator
        Return a reference to the DOM Node if available
        Specified by:
        getNode in interface ValidationEventLocator
        Returns:
        a reference to the DOM Node or null if unavailable
        See Also:
        ValidationEventLocator.getNode()

      • setNode

        public void setNode(Node _node)
        Set the Node field on this event locator. Null values are allowed.
        Parameters:
        _node - the Node

      • toString

        public String toString()
        Returns a string representation of this object in a format helpful to debugging.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
        See Also:
        Object.equals(Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXB

  • java.lang.Object
    • javax.xml.bind.JAXB

  • public final class JAXB
extends Object
    Class that defines convenience methods for common, simple use of JAXB.

    Methods defined in this class are convenience methods that combine several basic operations in the JAXBContext, Unmarshaller, and Marshaller. They are designed to be the prefered methods for developers new to JAXB. They have the following characterstics:

    1. Generally speaking, the performance is not necessarily optimal. It is expected that people who need to write performance critical code will use the rest of the JAXB API directly.
    2. Errors that happen during the processing is wrapped into DataBindingException (which will have JAXBException as its cause. It is expected that people who prefer the checked exception would use the rest of the JAXB API directly.

    In addition, the unmarshal methods have the following characteristic:

    1. Schema validation is not performed on the input XML. The processing will try to continue even if there are errors in the XML, as much as possible. Only as the last resort, this method fails with DataBindingException.

    Similarly, the marshal methods have the following characteristic:

    1. The processing will try to continue even if the Java object tree does not meet the validity requirement. Only as the last resort, this method fails with DataBindingException.

    All the methods on this class require non-null arguments to all parameters. The unmarshal methods either fail with an exception or return a non-null value.

    Since:
    2.1

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static void marshal(Object jaxbObject, File xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, OutputStream xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, Result xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, String xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, URI xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, URL xml)
      Writes a Java object tree to XML and store it to the specified location.
      static void marshal(Object jaxbObject, Writer xml)
      Writes a Java object tree to XML and store it to the specified location.
      static <T> T unmarshal(File xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(InputStream xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(Reader xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(Source xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(String xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(URI xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      static <T> T unmarshal(URL xml, Class<T> type)
      Reads in a Java object tree from the given XML input.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • unmarshal

        public static <T> T unmarshal(File xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - Reads the entire file as XML.

      • unmarshal

        public static <T> T unmarshal(URL xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The resource pointed by the URL is read in its entirety.

      • unmarshal

        public static <T> T unmarshal(URI xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The URI is turned into URL and then follows the handling of URL.

      • unmarshal

        public static <T> T unmarshal(String xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The string is first interpreted as an absolute URI. If it's not a valid absolute URI, then it's interpreted as a File

      • unmarshal

        public static <T> T unmarshal(InputStream xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The entire stream is read as an XML infoset. Upon a successful completion, the stream will be closed by this method.

      • unmarshal

        public static <T> T unmarshal(Reader xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The character stream is read as an XML infoset. The encoding declaration in the XML will be ignored. Upon a successful completion, the stream will be closed by this method.

      • unmarshal

        public static <T> T unmarshal(Source xml,
                              Class<T> type)
        Reads in a Java object tree from the given XML input.
        Parameters:
        xml - The XML infoset that the Source represents is read.

      • marshal

        public static void marshal(Object jaxbObject,
                           File xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - XML will be written to this file. If it already exists, it will be overwritten.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           URL xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The XML will be sent to the resource pointed by this URL. Note that not all URLs support such operation, and exact semantics depends on the URL implementations. In case of HTTP URLs, this will perform HTTP POST.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           URI xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The URI is turned into URL and then follows the handling of URL. See above.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           String xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The string is first interpreted as an absolute URI. If it's not a valid absolute URI, then it's interpreted as a File
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           OutputStream xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The XML will be sent to the given OutputStream. Upon a successful completion, the stream will be closed by this method.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           Writer xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The XML will be sent as a character stream to the given Writer. Upon a successful completion, the stream will be closed by this method.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.

      • marshal

        public static void marshal(Object jaxbObject,
                           Result xml)
        Writes a Java object tree to XML and store it to the specified location.
        Parameters:
        jaxbObject - The Java object to be marshalled into XML. If this object is a JAXBElement, it will provide the root tag name and the body. If this object has XmlRootElement on its class definition, that will be used as the root tag name and the given object will provide the body. Otherwise, the root tag name is infered from the short class name. This parameter must not be null.
        xml - The XML will be sent to the Result object.
        Throws:
        DataBindingException - If the operation fails, such as due to I/O error, unbindable classes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBContext

  • java.lang.Object
    • javax.xml.bind.JAXBContext

  • public abstract class JAXBContext
extends Object

    The JAXBContext class provides the client's entry point to the JAXB API. It provides an abstraction for managing the XML/Java binding information necessary to implement the JAXB binding framework operations: unmarshal, marshal and validate.

    A client application normally obtains new instances of this class using one of these two styles for newInstance methods, although there are other specialized forms of the method available:

    • JAXBContext.newInstance( "com.acme.foo:com.acme.bar" )
      The JAXBContext instance is initialized from a list of colon separated Java package names. Each java package contains JAXB mapped classes, schema-derived classes and/or user annotated classes. Additionally, the java package may contain JAXB package annotations that must be processed. (see JLS, Section 7.4.1 "Named Packages").
    • JAXBContext.newInstance( com.acme.foo.Foo.class )
      The JAXBContext instance is initialized with class(es) passed as parameter(s) and classes that are statically reachable from these class(es). See newInstance(Class...) for details.

    SPEC REQUIREMENT: the provider must supply an implementation class containing the following method signatures:

     public static JAXBContext createContext( String contextPath, ClassLoader classLoader, Map<String,Object> properties ) throws JAXBException
 public static JAXBContext createContext( Class[] classes, Map<String,Object> properties ) throws JAXBException

    The following JAXB 1.0 requirement is only required for schema to java interface/implementation binding. It does not apply to JAXB annotated classes. JAXB Providers must generate a jaxb.properties file in each package containing schema derived classes. The property file must contain a property named javax.xml.bind.context.factory whose value is the name of the class that implements the createContext APIs.

    The class supplied by the provider does not have to be assignable to javax.xml.bind.JAXBContext, it simply has to provide a class that implements the createContext APIs.

    In addition, the provider must call the DatatypeConverter.setDatatypeConverter api prior to any client invocations of the marshal and unmarshal methods. This is necessary to configure the datatype converter that will be used during these operations.

    Unmarshalling

    The Unmarshaller class provides the client application the ability to convert XML data into a tree of Java content objects. The unmarshal method allows for any global XML element declared in the schema to be unmarshalled as the root of an instance document. Additionally, the unmarshal method allows for an unrecognized root element that has an xsi:type attribute's value that references a type definition declared in the schema to be unmarshalled as the root of an instance document. The JAXBContext object allows the merging of global elements and type definitions across a set of schemas (listed in the contextPath). Since each schema in the schema set can belong to distinct namespaces, the unification of schemas to an unmarshalling context should be namespace independent. This means that a client application is able to unmarshal XML documents that are instances of any of the schemas listed in the contextPath. For example:

            JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );
        Unmarshaller u = jc.createUnmarshaller();
        FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); // ok
        BarObject barObj = (BarObject)u.unmarshal( new File( "bar.xml" ) ); // ok
        BazObject bazObj = (BazObject)u.unmarshal( new File( "baz.xml" ) ); // error, "com.acme.baz" not in contextPath

    The client application may also generate Java content trees explicitly rather than unmarshalling existing XML data. For all JAXB-annotated value classes, an application can create content using constructors. For schema-derived interface/implementation classes and for the creation of elements that are not bound to a JAXB-annotated class, an application needs to have access and knowledge about each of the schema derived ObjectFactory classes that exist in each of java packages contained in the contextPath. For each schema derived java class, there is a static factory method that produces objects of that type. For example, assume that after compiling a schema, you have a package com.acme.foo that contains a schema derived interface named PurchaseOrder. In order to create objects of that type, the client application would use the factory method like this:

           com.acme.foo.PurchaseOrder po =
           com.acme.foo.ObjectFactory.createPurchaseOrder();

    Once the client application has an instance of the the schema derived object, it can use the mutator methods to set content on it.

    For more information on the generated ObjectFactory classes, see Section 4.2 Java Package of the specification.

    SPEC REQUIREMENT: the provider must generate a class in each package that contains all of the necessary object factory methods for that package named ObjectFactory as well as the static newInstance( javaContentInterface ) method

    Marshalling

    The Marshaller class provides the client application the ability to convert a Java content tree back into XML data. There is no difference between marshalling a content tree that is created manually using the factory methods and marshalling a content tree that is the result an unmarshal operation. Clients can marshal a java content tree back to XML data to a java.io.OutputStream or a java.io.Writer. The marshalling process can alternatively produce SAX2 event streams to a registered ContentHandler or produce a DOM Node object. Client applications have control over the output encoding as well as whether or not to marshal the XML data as a complete document or as a fragment.

    Here is a simple example that unmarshals an XML document and then marshals it back out:

            JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );

        // unmarshal from foo.xml
        Unmarshaller u = jc.createUnmarshaller();
        FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) );

        // marshal to System.out
        Marshaller m = jc.createMarshaller();
        m.marshal( fooObj, System.out );

    Validation

    Validation has been changed significantly since JAXB 1.0. The Validator class has been deprecated and made optional. This means that you are advised not to use this class and, in fact, it may not even be available depending on your JAXB provider. JAXB 1.0 client applications that rely on Validator will still work properly when deployed with the JAXB 1.0 runtime system. In JAXB 2.0, the Unmarshaller has included convenince methods that expose the JAXP 1.3 javax.xml.validation framework. Please refer to the Unmarshaller.setSchema(javax.xml.validation.Schema) API for more information.

    JAXB Runtime Binding Framework Compatibility

    The following JAXB 1.0 restriction only applies to binding schema to interfaces/implementation classes. Since this binding does not require a common runtime system, a JAXB client application must not attempt to mix runtime objects (JAXBContext, Marshaller, etc. ) from different providers. This does not mean that the client application isn't portable, it simply means that a client has to use a runtime system provided by the same provider that was used to compile the schema.

    Discovery of JAXB implementation

    When one of the newInstance methods is called, a JAXB implementation is discovered by the following steps.

    1. For each package/class explicitly passed in to the newInstance(java.lang.String) method, in the order they are specified, jaxb.properties file is looked up in its package, by using the associated classloader — this is the owner class loader for a Class argument, and for a package the specified ClassLoader.

      If such a file is discovered, it is loaded as a property file, and the value of the JAXB_CONTEXT_FACTORY key will be assumed to be the provider factory class. This class is then loaded by the associated classloader discussed above.

      This phase of the look up allows some packages to force the use of a certain JAXB implementation. (For example, perhaps the schema compiler has generated some vendor extension in the code.)

    2. If the system property JAXB_CONTEXT_FACTORY exists, then its value is assumed to be the provider factory class. This phase of the look up enables per-JVM override of the JAXB implementation.
    3. Look for /META-INF/services/javax.xml.bind.JAXBContext file in the associated classloader. This file follows the standard service descriptor convention, and if such a file exists, its content is assumed to be the provider factory class. This phase of the look up is for automatic discovery. It allows users to just put a JAXB implementation in a classpath and use it without any furhter configuration.
    4. Finally, if all the steps above fail, then the rest of the look up is unspecified. That said, the recommended behavior is to simply look for some hard-coded platform default JAXB implementation. This phase of the look up is so that JavaSE can have its own JAXB implementation as the last resort.

    Once the provider factory class is discovered, its public static JAXBContext createContext(String,ClassLoader,Map) method (see newInstance(String, ClassLoader, Map) for the parameter semantics.) or public static JAXBContext createContet(Class[],Map) method (see newInstance(Class[], Map) for the parameter semantics) are invoked to create a JAXBContext.

    Since:
    JAXB1.0
    See Also:
    Marshaller, Unmarshaller, 7.4.1 "Named Packages" in Java Language Specification

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String JAXB_CONTEXT_FACTORY
      The name of the property that contains the name of the class capable of creating new JAXBContext objects.

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | JAXBContext()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      Binder<Node> createBinder()
      Creates a Binder for W3C DOM.
      <T> Binder<T> createBinder(Class<T> domType)
      Creates a Binder object that can be used for associative/in-place unmarshalling/marshalling.
      JAXBIntrospector createJAXBIntrospector()
      Creates a JAXBIntrospector object that can be used to introspect JAXB objects.
      abstract Marshaller createMarshaller()
      Create a Marshaller object that can be used to convert a java content tree into XML data.
      abstract Unmarshaller createUnmarshaller()
      Create an Unmarshaller object that can be used to convert XML data into a java content tree.
      abstract Validator createValidator()
      Deprecated.
      since JAXB2.0
      void generateSchema(SchemaOutputResolver outputResolver)
      Generates the schema documents for this context.
      static JAXBContext newInstance(Class... classesToBeBound)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext newInstance(Class[] classesToBeBound, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext newInstance(String contextPath)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext newInstance(String contextPath, ClassLoader classLoader)
      Obtain a new instance of a JAXBContext class.
      static JAXBContext newInstance(String contextPath, ClassLoader classLoader, Map<String,?> properties)
      Obtain a new instance of a JAXBContext class.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • JAXB_CONTEXT_FACTORY

        public static final String JAXB_CONTEXT_FACTORY
        The name of the property that contains the name of the class capable of creating new JAXBContext objects.
        See Also:
        Constant Field Values

    • Constructor Detail

      • JAXBContext

        protected JAXBContext()

    • Method Detail

      • newInstance

        public static JAXBContext newInstance(String contextPath)
                               throws JAXBException

        Obtain a new instance of a JAXBContext class.

        This is a convenience method to invoke the newInstance(String,ClassLoader) method with the context class loader of the current thread.

        Throws:
        JAXBException - if an error was encountered while creating the JAXBContext such as
        1. failure to locate either ObjectFactory.class or jaxb.index in the packages
        2. an ambiguity among global elements contained in the contextPath
        3. failure to locate a value for the context factory provider property
        4. mixing schema derived packages from different providers on the same contextPath

      • newInstance

        public static JAXBContext newInstance(String contextPath,
                                      ClassLoader classLoader)
                               throws JAXBException

        Obtain a new instance of a JAXBContext class.

        The client application must supply a context path which is a list of colon (':', \u003A) separated java package names that contain schema-derived classes and/or fully qualified JAXB-annotated classes. Schema-derived code is registered with the JAXBContext by the ObjectFactory.class generated per package. Alternatively than being listed in the context path, programmer annotated JAXB mapped classes can be listed in a jaxb.index resource file, format described below. Note that a java package can contain both schema-derived classes and user annotated JAXB classes. Additionally, the java package may contain JAXB package annotations that must be processed. (see JLS, Section 7.4.1 "Named Packages").

        Every package listed on the contextPath must meet one or both of the following conditions otherwise a JAXBException will be thrown:

        1. it must contain ObjectFactory.class
        2. it must contain jaxb.index

        Format for jaxb.index

        The file contains a newline-separated list of class names. Space and tab characters, as well as blank lines, are ignored. The comment character is '#' (0x23); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8. Classes that are reachable, as defined in newInstance(Class...), from the listed classes are also registered with JAXBContext.

        Constraints on class name occuring in a jaxb.index file are:

        • Must not end with ".class".
        • Class names are resolved relative to package containing jaxb.index file. Only classes occuring directly in package containing jaxb.index file are allowed.
        • Fully qualified class names are not allowed. A qualified class name,relative to current package, is only allowed to specify a nested or inner class.

        To maintain compatibility with JAXB 1.0 schema to java interface/implementation binding, enabled by schema customization <jaxb:globalBindings valueClass="false">, the JAXB provider will ensure that each package on the context path has a jaxb.properties file which contains a value for the javax.xml.bind.context.factory property and that all values resolve to the same provider. This requirement does not apply to JAXB annotated classes.

        If there are any global XML element name collisions across the various packages listed on the contextPath, a JAXBException will be thrown.

        Mixing generated interface/impl bindings from multiple JAXB Providers in the same context path may result in a JAXBException being thrown.

        The steps involved in discovering the JAXB implementation is discussed in the class javadoc.

        Parameters:
        contextPath - list of java package names that contain schema derived class and/or java to schema (JAXB-annotated) mapped classes
        classLoader - This class loader will be used to locate the implementation classes.
        Returns:
        a new instance of a JAXBContext
        Throws:
        JAXBException - if an error was encountered while creating the JAXBContext such as
        1. failure to locate either ObjectFactory.class or jaxb.index in the packages
        2. an ambiguity among global elements contained in the contextPath
        3. failure to locate a value for the context factory provider property
        4. mixing schema derived packages from different providers on the same contextPath

      • newInstance

        public static JAXBContext newInstance(String contextPath,
                                      ClassLoader classLoader,
                                      Map<String,?> properties)
                               throws JAXBException

        Obtain a new instance of a JAXBContext class.

        This is mostly the same as newInstance(String, ClassLoader), but this version allows you to pass in provider-specific properties to configure the instantiation of JAXBContext.

        The interpretation of properties is up to implementations. Implementations should throw JAXBException if it finds properties that it doesn't understand.

        Parameters:
        contextPath - list of java package names that contain schema derived classes
        classLoader - This class loader will be used to locate the implementation classes.
        properties - provider-specific properties. Can be null, which means the same thing as passing in an empty map.
        Returns:
        a new instance of a JAXBContext
        Throws:
        JAXBException - if an error was encountered while creating the JAXBContext such as
        1. failure to locate either ObjectFactory.class or jaxb.index in the packages
        2. an ambiguity among global elements contained in the contextPath
        3. failure to locate a value for the context factory provider property
        4. mixing schema derived packages from different providers on the same contextPath
        Since:
        JAXB2.0

      • newInstance

        public static JAXBContext newInstance(Class... classesToBeBound)
                               throws JAXBException

        Obtain a new instance of a JAXBContext class.

        The client application must supply a list of classes that the new context object needs to recognize. Not only the new context will recognize all the classes specified, but it will also recognize any classes that are directly/indirectly referenced statically from the specified classes. Subclasses of referenced classes nor @XmlTransient referenced classes are not registered with JAXBContext. For example, in the following Java code, if you do newInstance(Foo.class), the newly created JAXBContext will recognize both Foo and Bar, but not Zot or FooBar:

         class Foo {
      @XmlTransient FooBar c;
      Bar b;
 }
 class Bar { int x; }
 class Zot extends Bar { int y; }
 class FooBar { }
        Therefore, a typical client application only needs to specify the top-level classes, but it needs to be careful.

        Note that for each java package registered with JAXBContext, when the optional package annotations exist, they must be processed. (see JLS, Section 7.4.1 "Named Packages").

        The steps involved in discovering the JAXB implementation is discussed in the class javadoc.

        Parameters:
        classesToBeBound - list of java classes to be recognized by the new JAXBContext. Can be empty, in which case a JAXBContext that only knows about spec-defined classes will be returned.
        Returns:
        A new instance of a JAXBContext. Always non-null valid object.
        Throws:
        JAXBException - if an error was encountered while creating the JAXBContext, such as (but not limited to):
        1. No JAXB implementation was discovered
        2. Classes use JAXB annotations incorrectly
        3. Classes have colliding annotations (i.e., two classes with the same type name)
        4. The JAXB implementation was unable to locate provider-specific out-of-band information (such as additional files generated at the development time.)
        IllegalArgumentException - if the parameter contains null (i.e., newInstance(null);)
        Since:
        JAXB2.0

      • newInstance

        public static JAXBContext newInstance(Class[] classesToBeBound,
                                      Map<String,?> properties)
                               throws JAXBException

        Obtain a new instance of a JAXBContext class.

        An overloading of newInstance(Class...) to configure 'properties' for this instantiation of JAXBContext.

        The interpretation of properties is up to implementations. Implementations should throw JAXBException if it finds properties that it doesn't understand.

        Parameters:
        classesToBeBound - list of java classes to be recognized by the new JAXBContext. Can be empty, in which case a JAXBContext that only knows about spec-defined classes will be returned.
        properties - provider-specific properties. Can be null, which means the same thing as passing in an empty map.
        Returns:
        A new instance of a JAXBContext. Always non-null valid object.
        Throws:
        JAXBException - if an error was encountered while creating the JAXBContext, such as (but not limited to):
        1. No JAXB implementation was discovered
        2. Classes use JAXB annotations incorrectly
        3. Classes have colliding annotations (i.e., two classes with the same type name)
        4. The JAXB implementation was unable to locate provider-specific out-of-band information (such as additional files generated at the development time.)
        IllegalArgumentException - if the parameter contains null (i.e., newInstance(null,someMap);)
        Since:
        JAXB2.0

      • createUnmarshaller

        public abstract Unmarshaller createUnmarshaller()
                                         throws JAXBException
        Create an Unmarshaller object that can be used to convert XML data into a java content tree.
        Returns:
        an Unmarshaller object
        Throws:
        JAXBException - if an error was encountered while creating the Unmarshaller object

      • createMarshaller

        public abstract Marshaller createMarshaller()
                                     throws JAXBException
        Create a Marshaller object that can be used to convert a java content tree into XML data.
        Returns:
        a Marshaller object
        Throws:
        JAXBException - if an error was encountered while creating the Marshaller object

      • createValidator

        public abstract Validator createValidator()
                                   throws JAXBException
        Deprecated. since JAXB2.0
        Validator has been made optional and deprecated in JAXB 2.0. Please refer to the javadoc for Validator for more detail.

        Create a Validator object that can be used to validate a java content tree against its source schema.

        Returns:
        a Validator object
        Throws:
        JAXBException - if an error was encountered while creating the Validator object

      • createBinder

        public <T> Binder<T> createBinder(Class<T> domType)
        Creates a Binder object that can be used for associative/in-place unmarshalling/marshalling.
        Parameters:
        domType - select the DOM API to use by passing in its DOM Node class.
        Returns:
        always a new valid Binder object.
        Throws:
        UnsupportedOperationException - if DOM API corresponding to domType is not supported by the implementation.
        Since:
        JAXB2.0

      • createBinder

        public Binder<Node> createBinder()
        Creates a Binder for W3C DOM.
        Returns:
        always a new valid Binder object.
        Since:
        JAXB2.0

      • createJAXBIntrospector

        public JAXBIntrospector createJAXBIntrospector()
        Creates a JAXBIntrospector object that can be used to introspect JAXB objects.
        Returns:
        always return a non-null valid JAXBIntrospector object.
        Throws:
        UnsupportedOperationException - Calling this method on JAXB 1.0 implementations will throw an UnsupportedOperationException.
        Since:
        JAXB2.0

      • generateSchema

        public void generateSchema(SchemaOutputResolver outputResolver)
                    throws IOException
        Generates the schema documents for this context.
        Parameters:
        outputResolver - this object controls the output to which schemas will be sent.
        Throws:
        IOException - if SchemaOutputResolver throws an IOException.
        UnsupportedOperationException - Calling this method on JAXB 1.0 implementations will throw an UnsupportedOperationException.
        Since:
        JAXB 2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBElement<T>

  • java.lang.Object
    • javax.xml.bind.JAXBElement<T>
  • All Implemented Interfaces:
    Serializable

    public class JAXBElement<T>
extends Object
implements Serializable

    JAXB representation of an Xml Element.

    This class represents information about an Xml Element from both the element declaration within a schema and the element instance value within an xml document with the following properties

    • element's xml tag name
    • value represents the element instance's atttribute(s) and content model
    • element declaration's declaredType (xs:element @type attribute)
    • scope of element declaration
    • boolean nil property. (element instance's xsi:nil attribute)

    The declaredType and scope property are the JAXB class binding for the xml type definition.

    Scope is either JAXBElement.GlobalScope or the Java class representing the complex type definition containing the schema element declaration.

    There is a property constraint that if value is null, then nil must be true. The converse is not true to enable representing a nil element with attribute(s). If nil is true, it is possible that value is non-null so it can hold the value of the attributes associated with a nil element.

    Since:
    JAXB 2.0
    See Also:
    Serialized Form

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  JAXBElement.GlobalScope
      Designates global scope for an xml element.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected Class<T> declaredType
      Java datatype binding for xml element declaration's type.
      protected QName name
      xml element tag name
      protected boolean nil
      true iff the xml element instance has xsi:nil="true".
      protected Class scope
      Scope of xml element declaration representing this xml element instance.
      protected T value
      xml element value.

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBElement(QName name, Class<T> declaredType, Class scope, T value)
      Construct an xml element instance.
      JAXBElement(QName name, Class<T> declaredType, T value)
      Construct an xml element instance.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Class<T> getDeclaredType()
      Returns the Java binding of the xml element declaration's type attribute.
      QName getName()
      Returns the xml element tag name.
      Class getScope()
      Returns scope of xml element declaration.
      T getValue()
      Return the content model and attribute values for this element.
      boolean isGlobalScope()
      Returns true iff this xml element declaration is global.
      boolean isNil()
      Returns true iff this element instance content model is nil.
      boolean isTypeSubstituted()
      Returns true iff this xml element instance's value has a different type than xml element declaration's declared type.
      void setNil(boolean value)
      Set whether this element has nil content.
      void setValue(T t)
      Set the content model and attributes of this xml element.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • name

        protected final QName name
        xml element tag name

      • declaredType

        protected final Class<T> declaredType
        Java datatype binding for xml element declaration's type.

      • scope

        protected final Class scope
        Scope of xml element declaration representing this xml element instance. Can be one of the following values: - JAXBElement.GlobalScope for global xml element declaration. - local element declaration has a scope set to the Java class representation of complex type defintion containing xml element declaration.

      • value

        protected T value
        xml element value. Represents content model and attributes of an xml element instance.

      • nil

        protected boolean nil
        true iff the xml element instance has xsi:nil="true".

    • Constructor Detail

      • JAXBElement

        public JAXBElement(QName name,
                   Class<T> declaredType,
                   Class scope,
                   T value)

        Construct an xml element instance.

        Parameters:
        name - Java binding of xml element tag name
        declaredType - Java binding of xml element declaration's type
        scope - Java binding of scope of xml element declaration. Passing null is the same as passing GlobalScope.class
        value - Java instance representing xml element's value.
        See Also:
        getScope(), isTypeSubstituted()

      • JAXBElement

        public JAXBElement(QName name,
                   Class<T> declaredType,
                   T value)
        Construct an xml element instance. This is just a convenience method for new JAXBElement(name,declaredType,GlobalScope.class,value)

    • Method Detail

      • getDeclaredType

        public Class<T> getDeclaredType()
        Returns the Java binding of the xml element declaration's type attribute.

      • getName

        public QName getName()
        Returns the xml element tag name.

      • setValue

        public void setValue(T t)

        Set the content model and attributes of this xml element.

        When this property is set to null, isNil() must by true. Details of constraint are described at isNil().

        See Also:
        isTypeSubstituted()

      • getValue

        public T getValue()

        Return the content model and attribute values for this element.

        See isNil() for a description of a property constraint when this value is null

      • getScope

        public Class getScope()
        Returns scope of xml element declaration.
        Returns:
        GlobalScope.class if this element is of global scope.
        See Also:
        isGlobalScope()

      • isNil

        public boolean isNil()

        Returns true iff this element instance content model is nil.

        This property always returns true when getValue() is null. Note that the converse is not true, when this property is true, getValue() can contain a non-null value for attribute(s). It is valid for a nil xml element to have attribute(s).

      • setNil

        public void setNil(boolean value)

        Set whether this element has nil content.

        See Also:
        isNil()

      • isGlobalScope

        public boolean isGlobalScope()
        Returns true iff this xml element declaration is global.

      • isTypeSubstituted

        public boolean isTypeSubstituted()
        Returns true iff this xml element instance's value has a different type than xml element declaration's declared type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBElement.GlobalScope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBElement.GlobalScope

  • java.lang.Object
    • javax.xml.bind.JAXBElement.GlobalScope
  • Enclosing class:
    JAXBElement<T>

    public static final class JAXBElement.GlobalScope
extends Object
    Designates global scope for an xml element.

    • Constructor Summary

      Constructors
      Constructor and Description
      GlobalScope()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • GlobalScope

        public GlobalScope()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.bind.JAXBException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    MarshalException, PropertyException, UnmarshalException, ValidationException

    public class JAXBException
extends Exception
    This is the root exception class for all JAXB exceptions.
    Since:
    JAXB1.0
    See Also:
    JAXBContext, Marshaller, Unmarshaller, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBException(String message)
      Construct a JAXBException with the specified detail message.
      JAXBException(String message, String errorCode)
      Construct a JAXBException with the specified detail message and vendor specific errorCode.
      JAXBException(String message, String errorCode, Throwable exception)
      Construct a JAXBException with the specified detail message, vendor specific errorCode, and linkedException.
      JAXBException(String message, Throwable exception)
      Construct a JAXBException with the specified detail message and linkedException.
      JAXBException(Throwable exception)
      Construct a JAXBException with a linkedException.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this throwable or null if the cause is nonexistent or unknown.
      String getErrorCode()
      Get the vendor specific error code
      Throwable getLinkedException()
      Get the linked exception
      void printStackTrace()
      Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to System.err.
      void printStackTrace(PrintStream s)
      Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream.
      void printStackTrace(PrintWriter s)
      Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintWriter.
      void setLinkedException(Throwable exception)
      Add a linked Exception.
      String toString()
      Returns a short description of this JAXBException.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • JAXBException

        public JAXBException(String message)
        Construct a JAXBException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • JAXBException

        public JAXBException(String message,
                     String errorCode)
        Construct a JAXBException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • JAXBException

        public JAXBException(Throwable exception)
        Construct a JAXBException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • JAXBException

        public JAXBException(String message,
                     Throwable exception)
        Construct a JAXBException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • JAXBException

        public JAXBException(String message,
                     String errorCode,
                     Throwable exception)
        Construct a JAXBException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception

    • Method Detail

      • getErrorCode

        public String getErrorCode()
        Get the vendor specific error code
        Returns:
        a string specifying the vendor specific error code

      • getLinkedException

        public Throwable getLinkedException()
        Get the linked exception
        Returns:
        the linked Exception, null if none exists

      • setLinkedException

        public void setLinkedException(Throwable exception)
        Add a linked Exception.
        Parameters:
        exception - the linked Exception (A null value is permitted and indicates that the linked exception does not exist or is unknown).

      • toString

        public String toString()
        Returns a short description of this JAXBException.
        Overrides:
        toString in class Throwable
        Returns:
        a string representation of this throwable.

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace()
        Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to System.err.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintWriter.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output

      • getCause

        public Throwable getCause()
        Description copied from class: Throwable
        Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

        This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the Throwable.initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBIntrospector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBIntrospector

  • java.lang.Object
    • javax.xml.bind.JAXBIntrospector

  • public abstract class JAXBIntrospector
extends Object
    Provide access to JAXB xml binding data for a JAXB object.

    Intially, the intent of this class is to just conceptualize how a JAXB application developer can access xml binding information, independent if binding model is java to schema or schema to java. Since accessing the XML element name related to a JAXB element is a highly requested feature, demonstrate access to this binding information. The factory method to get a JAXBIntrospector instance is JAXBContext.createJAXBIntrospector().

    Since:
    JAXB2.0
    See Also:
    JAXBContext.createJAXBIntrospector()

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBIntrospector()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract QName getElementName(Object jaxbElement)
      Get xml element qname for jaxbElement.
      static Object getValue(Object jaxbElement)
      Get the element value of a JAXB element.
      abstract boolean isElement(Object object)
      Return true if object represents a JAXB element.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • JAXBIntrospector

        public JAXBIntrospector()

    • Method Detail

      • isElement

        public abstract boolean isElement(Object object)

        Return true if object represents a JAXB element.

        Parameter object is a JAXB element for following cases:

        1. It is an instance of javax.xml.bind.JAXBElement.
        2. The class of object is annotated with @XmlRootElement.
        See Also:
        getElementName(Object)

      • getElementName

        public abstract QName getElementName(Object jaxbElement)

        Get xml element qname for jaxbElement.

        Parameters:
        jaxbElement - is an object that isElement(Object) returned true.
        Returns:
        xml element qname associated with jaxbElement; null if jaxbElement is not a JAXB Element.

      • getValue

        public static Object getValue(Object jaxbElement)

        Get the element value of a JAXB element.

        Convenience method to abstract whether working with either a javax.xml.bind.JAXBElement instance or an instance of @XmlRootElement annotated Java class.

        Parameters:
        jaxbElement - object that #isElement(Object) returns true.
        Returns:
        The element value of the jaxbElement.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class JAXBPermission

  • java.lang.Object
    • java.security.Permission
      • java.security.BasicPermission
        • javax.xml.bind.JAXBPermission
  • All Implemented Interfaces:
    Serializable, Guard

    public final class JAXBPermission
extends BasicPermission
    This class is for JAXB permissions. A JAXBPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

    The target name is the name of the JAXB permission (see below).

    The following table lists all the possible JAXBPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

    Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
    setDatatypeConverter | Allows the code to set VM-wide DatatypeConverterInterface via the setDatatypeConverter method that all the methods on DatatypeConverter uses. | Malicious code can set DatatypeConverterInterface, which has VM-wide singleton semantics, before a genuine JAXB implementation sets one. This allows malicious code to gain access to objects that it may otherwise not have access to, such as Frame.getFrames() that belongs to another application running in the same JVM.

    Since:
    JAXB 2.2
    See Also:
    BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBPermission(String name)
      Creates a new JAXBPermission with the specified name.

    • Method Summary

      • Methods inherited from class java.security.BasicPermission

        equals, getActions, hashCode, implies, newPermissionCollection

      • Methods inherited from class java.security.Permission

        checkGuard, getName, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • JAXBPermission

        public JAXBPermission(String name)
        Creates a new JAXBPermission with the specified name.
        Parameters:
        name - The name of the JAXBPermission. As of 2.2 only "setDatatypeConverter" is defined.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class MarshalException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.bind.JAXBException
          • javax.xml.bind.MarshalException
  • All Implemented Interfaces:
    Serializable

    public class MarshalException
extends JAXBException
    This exception indicates that an error has occurred while performing a marshal operation that the provider is unable to recover from.

    The ValidationEventHandler can cause this exception to be thrown during the marshal operations. See ValidationEventHandler.handleEvent(ValidationEvent).

    Since:
    JAXB1.0
    See Also:
    JAXBException, Marshaller, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      MarshalException(String message)
      Construct a MarshalException with the specified detail message.
      MarshalException(String message, String errorCode)
      Construct a MarshalException with the specified detail message and vendor specific errorCode.
      MarshalException(String message, String errorCode, Throwable exception)
      Construct a MarshalException with the specified detail message, vendor specific errorCode, and linkedException.
      MarshalException(String message, Throwable exception)
      Construct a MarshalException with the specified detail message and linkedException.
      MarshalException(Throwable exception)
      Construct a MarshalException with a linkedException.

    • Method Summary

      • Methods inherited from class javax.xml.bind.JAXBException

        getCause, getErrorCode, getLinkedException, printStackTrace, printStackTrace, printStackTrace, setLinkedException, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • MarshalException

        public MarshalException(String message)
        Construct a MarshalException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • MarshalException

        public MarshalException(String message,
                        String errorCode)
        Construct a MarshalException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • MarshalException

        public MarshalException(Throwable exception)
        Construct a MarshalException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • MarshalException

        public MarshalException(String message,
                        Throwable exception)
        Construct a MarshalException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • MarshalException

        public MarshalException(String message,
                        String errorCode,
                        Throwable exception)
        Construct a MarshalException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Marshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface Marshaller

  • All Known Implementing Classes:
    AbstractMarshallerImpl

    public interface Marshaller

    The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data. It provides the basic marshalling methods:

    Assume the following setup code for all following code fragments:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       Object element = u.unmarshal( new File( "foo.xml" ) );
       Marshaller m = jc.createMarshaller();

    Marshalling to a File:

           OutputStream os = new FileOutputStream( "nosferatu.xml" );
       m.marshal( element, os );

    Marshalling to a SAX ContentHandler:

           // assume MyContentHandler instanceof ContentHandler
       m.marshal( element, new MyContentHandler() );

    Marshalling to a DOM Node:

           DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
       dbf.setNamespaceAware(true);
       DocumentBuilder db = dbf.newDocumentBuilder();
       Document doc = db.newDocument();

       m.marshal( element, doc );

    Marshalling to a java.io.OutputStream:

           m.marshal( element, System.out );

    Marshalling to a java.io.Writer:

           m.marshal( element, new PrintWriter( System.out ) );

    Marshalling to a javax.xml.transform.SAXResult:

           // assume MyContentHandler instanceof ContentHandler
       SAXResult result = new SAXResult( new MyContentHandler() );

       m.marshal( element, result );

    Marshalling to a javax.xml.transform.DOMResult:

           DOMResult result = new DOMResult();

       m.marshal( element, result );

    Marshalling to a javax.xml.transform.StreamResult:

           StreamResult result = new StreamResult( System.out );

       m.marshal( element, result );

    Marshalling to a javax.xml.stream.XMLStreamWriter:

           XMLStreamWriter xmlStreamWriter =
           XMLOutputFactory.newInstance().createXMLStreamWriter( ... );

       m.marshal( element, xmlStreamWriter );

    Marshalling to a javax.xml.stream.XMLEventWriter:

           XMLEventWriter xmlEventWriter =
           XMLOutputFactory.newInstance().createXMLEventWriter( ... );

       m.marshal( element, xmlEventWriter );

    Marshalling content tree rooted by a JAXB element

    The first parameter of the overloaded Marshaller.marshal(java.lang.Object, ...) methods must be a JAXB element as computed by JAXBIntrospector.isElement(java.lang.Object); otherwise, a Marshaller.marshal method must throw a MarshalException. There exist two mechanisms to enable marshalling an instance that is not a JAXB element. One method is to wrap the instance as a value of a JAXBElement, and pass the wrapper element as the first parameter to a Marshaller.marshal method. For java to schema binding, it is also possible to simply annotate the instance's class with @XmlRootElement.

    Encoding

    By default, the Marshaller will use UTF-8 encoding when generating XML data to a java.io.OutputStream, or a java.io.Writer. Use the setProperty API to change the output encoding used during these marshal operations. Client applications are expected to supply a valid character encoding name as defined in the W3C XML 1.0 Recommendation and supported by your Java Platform.

    Validation and Well-Formedness

    Client applications are not required to validate the Java content tree prior to calling any of the marshal API's. Furthermore, there is no requirement that the Java content tree be valid with respect to its original schema in order to marshal it back into XML data. Different JAXB Providers will support marshalling invalid Java content trees at varying levels, however all JAXB Providers must be able to marshal a valid content tree back to XML data. A JAXB Provider must throw a MarshalException when it is unable to complete the marshal operation due to invalid content. Some JAXB Providers will fully allow marshalling invalid content, others will fail on the first validation error.

    Even when schema validation is not explictly enabled for the marshal operation, it is possible that certain types of validation events will be detected during the operation. Validation events will be reported to the registered event handler. If the client application has not registered an event handler prior to invoking one of the marshal API's, then events will be delivered to a default event handler which will terminate the marshal operation after encountering the first error or fatal error. Note that for JAXB 2.0 and later versions, DefaultValidationEventHandler is no longer used.

    Supported Properties

    All JAXB Providers are required to support the following set of properties. Some providers may support additional properties.

    jaxb.encoding - value must be a java.lang.String
    The output encoding to use when marshalling the XML data. The Marshaller will use "UTF-8" by default if this property is not specified.
    jaxb.formatted.output - value must be a java.lang.Boolean
    This property controls whether or not the Marshaller will format the resulting XML data with line breaks and indentation. A true value for this property indicates human readable indented xml data, while a false value indicates unformatted xml data. The Marshaller will default to false (unformatted) if this property is not specified.
    jaxb.schemaLocation - value must be a java.lang.String
    This property allows the client application to specify an xsi:schemaLocation attribute in the generated XML data. The format of the schemaLocation attribute value is discussed in an easy to understand, non-normative form in Section 5.6 of the W3C XML Schema Part 0: Primer and specified in Section 2.6 of the W3C XML Schema Part 1: Structures.
    jaxb.noNamespaceSchemaLocation - value must be a java.lang.String
    This property allows the client application to specify an xsi:noNamespaceSchemaLocation attribute in the generated XML data. The format of the schemaLocation attribute value is discussed in an easy to understand, non-normative form in Section 5.6 of the W3C XML Schema Part 0: Primer and specified in Section 2.6 of the W3C XML Schema Part 1: Structures.
    jaxb.fragment - value must be a java.lang.Boolean
    This property determines whether or not document level events will be generated by the Marshaller. If the property is not specified, the default is false. This property has different implications depending on which marshal api you are using - when this property is set to true:
    • marshal(Object,ContentHandler) - the Marshaller won't
             invoke ContentHandler.startDocument() and
             ContentHandler.endDocument().
    • marshal(Object,Node) - the property has no effect on this API.
    • marshal(Object,OutputStream) - the Marshaller won't generate an xml declaration.
    • marshal(Object,Writer) - the Marshaller won't generate an xml declaration.
    • marshal(Object,Result) - depends on the kind of Result object, see semantics for Node, ContentHandler, and Stream APIs
    • marshal(Object,XMLEventWriter) - the Marshaller will not generate XMLStreamConstants.START_DOCUMENT and XMLStreamConstants.END_DOCUMENT events.
    • marshal(Object,XMLStreamWriter) - the Marshaller will not generate XMLStreamConstants.START_DOCUMENT and XMLStreamConstants.END_DOCUMENT events.

    Marshal Event Callbacks

    "The Marshaller provides two styles of callback mechanisms that allow application specific processing during key points in the unmarshalling process. In 'class defined' event callbacks, application specific code placed in JAXB mapped classes is triggered during marshalling. 'External listeners' allow for centralized processing of marshal events in one callback method rather than by type event callbacks.

    Class defined event callback methods allow any JAXB mapped class to specify its own specific callback methods by defining methods with the following method signatures:

       // Invoked by Marshaller after it has created an instance of this object.
   boolean beforeMarshal(Marshaller);

   // Invoked by Marshaller after it has marshalled all properties of this object.
   void afterMarshal(Marshaller);
    The class defined event callback methods should be used when the callback method requires access to non-public methods and/or fields of the class.

    The external listener callback mechanism enables the registration of a Marshaller.Listener instance with a setListener(Listener). The external listener receives all callback events, allowing for more centralized processing than per class defined callback methods.

    The 'class defined' and external listener event callback methods are independent of each other, both can be called for one event. The invocation ordering when both listener callback methods exist is defined in Marshaller.Listener.beforeMarshal(Object) and Marshaller.Listener.afterMarshal(Object).

    An event callback method throwing an exception terminates the current marshal process.

    Since:
    JAXB1.0
    See Also:
    JAXBContext, Validator, Unmarshaller

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  Marshaller.Listener

      Register an instance of an implementation of this class with a Marshaller to externally listen for marshal events.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String JAXB_ENCODING
      The name of the property used to specify the output encoding in the marshalled XML data.
      static String JAXB_FORMATTED_OUTPUT
      The name of the property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.
      static String JAXB_FRAGMENT
      The name of the property used to specify whether or not the marshaller will generate document level events (ie calling startDocument or endDocument).
      static String JAXB_NO_NAMESPACE_SCHEMA_LOCATION
      The name of the property used to specify the xsi:noNamespaceSchemaLocation attribute value to place in the marshalled XML output.
      static String JAXB_SCHEMA_LOCATION
      The name of the property used to specify the xsi:schemaLocation attribute value to place in the marshalled XML output.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      <A extends XmlAdapter>
      A             		getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      AttachmentMarshaller getAttachmentMarshaller()
      ValidationEventHandler getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      Marshaller.Listener getListener()
      Return Marshaller.Listener registered with this Marshaller.
      Node getNode(Object contentTree)
      Get a DOM tree view of the content tree(Optional).
      Object getProperty(String name)
      Get the particular property in the underlying implementation of Marshaller.
      Schema getSchema()
      Get the JAXP 1.3 Schema object being used to perform marshal-time validation.
      void marshal(Object jaxbElement, ContentHandler handler)
      Marshal the content tree rooted at jaxbElement into SAX2 events.
      void marshal(Object jaxbElement, File output)
      Marshal the content tree rooted at jaxbElement into a file.
      void marshal(Object jaxbElement, Node node)
      Marshal the content tree rooted at jaxbElement into a DOM tree.
      void marshal(Object jaxbElement, OutputStream os)
      Marshal the content tree rooted at jaxbElement into an output stream.
      void marshal(Object jaxbElement, Result result)
      Marshal the content tree rooted at jaxbElement into the specified javax.xml.transform.Result.
      void marshal(Object jaxbElement, Writer writer)
      Marshal the content tree rooted at jaxbElement into a Writer.
      void marshal(Object jaxbElement, XMLEventWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLEventWriter.
      void marshal(Object jaxbElement, XMLStreamWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.
      <A extends XmlAdapter>
      void             		setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this marshaller.
      void setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this marshaller.
      void setAttachmentMarshaller(AttachmentMarshaller am)
      Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment.
      void setEventHandler(ValidationEventHandler handler)
      Allow an application to register a validation event handler.
      void setListener(Marshaller.Listener listener)
      Register marshal event callback Marshaller.Listener with this Marshaller.
      void setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Marshaller.
      void setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent marshal operations against.

    • Field Detail

      • JAXB_ENCODING

        static final String JAXB_ENCODING
        The name of the property used to specify the output encoding in the marshalled XML data.
        See Also:
        Constant Field Values

      • JAXB_FORMATTED_OUTPUT

        static final String JAXB_FORMATTED_OUTPUT
        The name of the property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.
        See Also:
        Constant Field Values

      • JAXB_SCHEMA_LOCATION

        static final String JAXB_SCHEMA_LOCATION
        The name of the property used to specify the xsi:schemaLocation attribute value to place in the marshalled XML output.
        See Also:
        Constant Field Values

      • JAXB_NO_NAMESPACE_SCHEMA_LOCATION

        static final String JAXB_NO_NAMESPACE_SCHEMA_LOCATION
        The name of the property used to specify the xsi:noNamespaceSchemaLocation attribute value to place in the marshalled XML output.
        See Also:
        Constant Field Values

      • JAXB_FRAGMENT

        static final String JAXB_FRAGMENT
        The name of the property used to specify whether or not the marshaller will generate document level events (ie calling startDocument or endDocument).
        See Also:
        Constant Field Values

    • Method Detail

      • marshal

        void marshal(Object jaxbElement,
             Result result)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into the specified javax.xml.transform.Result.

        All JAXB Providers must at least support DOMResult, SAXResult, and StreamResult. It can support other derived classes of Result as well.

        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        result - XML will be sent to this Result
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null

      • marshal

        void marshal(Object jaxbElement,
             OutputStream os)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into an output stream.
        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        os - XML will be added to this stream.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null

      • marshal

        void marshal(Object jaxbElement,
             File output)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into a file.
        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        output - File to be written. If this file already exists, it will be overwritten.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null
        Since:
        JAXB2.1

      • marshal

        void marshal(Object jaxbElement,
             Writer writer)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into a Writer.
        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        writer - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null

      • marshal

        void marshal(Object jaxbElement,
             ContentHandler handler)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into SAX2 events.
        Parameters:
        jaxbElement - The root of content tree to be marshalled.
        handler - XML will be sent to this handler as SAX2 events.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null

      • marshal

        void marshal(Object jaxbElement,
             Node node)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into a DOM tree.
        Parameters:
        jaxbElement - The content tree to be marshalled.
        node - DOM nodes will be added as children of this node. This parameter must be a Node that accepts children (Document, DocumentFragment, or Element)
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal jaxbElement (or any object reachable from jaxbElement). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null

      • marshal

        void marshal(Object jaxbElement,
             XMLStreamWriter writer)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.
        Parameters:
        jaxbElement - The content tree to be marshalled.
        writer - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null
        Since:
        JAXB 2.0

      • marshal

        void marshal(Object jaxbElement,
             XMLEventWriter writer)
      throws JAXBException
        Marshal the content tree rooted at jaxbElement into a XMLEventWriter.
        Parameters:
        jaxbElement - The content tree rooted at jaxbElement to be marshalled.
        writer - XML will be sent to this writer.
        Throws:
        JAXBException - If any unexpected problem occurs during the marshalling.
        MarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Marshaller is unable to marshal obj (or any object reachable from obj). See Marshalling a JAXB element.
        IllegalArgumentException - If any of the method parameters are null
        Since:
        JAXB 2.0

      • getNode

        Node getNode(Object contentTree)
      throws JAXBException
        Get a DOM tree view of the content tree(Optional). If the returned DOM tree is updated, these changes are also visible in the content tree. Use marshal(Object, org.w3c.dom.Node) to force a deep copy of the content tree to a DOM representation.
        Parameters:
        contentTree - - JAXB Java representation of XML content
        Returns:
        the DOM tree view of the contentTree
        Throws:
        UnsupportedOperationException - If the JAXB provider implementation does not support a DOM view of the content tree
        IllegalArgumentException - If any of the method parameters are null
        JAXBException - If any unexpected problem occurs

      • setProperty

        void setProperty(String name,
                 Object value)
          throws PropertyException
        Set the particular property in the underlying implementation of Marshaller. This method can only be used to set one of the standard JAXB defined properties above or a provider specific property. Attempting to set an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value
        IllegalArgumentException - If the name parameter is null

      • getProperty

        Object getProperty(String name)
            throws PropertyException
        Get the particular property in the underlying implementation of Marshaller. This method can only be used to get one of the standard JAXB defined properties above or a provider specific property. Attempting to get an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name
        IllegalArgumentException - If the name parameter is null

      • setEventHandler

        void setEventHandler(ValidationEventHandler handler)
              throws JAXBException
        Allow an application to register a validation event handler.

        The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the marshal API's. If the client application does not register a validation event handler before invoking one of the marshal methods, then validation events will be handled by the default event handler which will terminate the marshal operation after the first error or fatal error is encountered.

        Calling this method with a null parameter will cause the Marshaller to revert back to the default default event handler.

        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler

      • getEventHandler

        ValidationEventHandler getEventHandler()
                                throws JAXBException
        Return the current event handler or the default event handler if one hasn't been set.
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler

      • setAdapter

        void setAdapter(XmlAdapter adapter)
        Associates a configured instance of XmlAdapter with this marshaller.

        This is a convenience method that invokes setAdapter(adapter.getClass(),adapter);.

        Throws:
        IllegalArgumentException - if the adapter parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB 2.0
        See Also:
        setAdapter(Class,XmlAdapter)

      • setAdapter

        <A extends XmlAdapter> void setAdapter(Class<A> type,
                                       A adapter)
        Associates a configured instance of XmlAdapter with this marshaller.

        Every marshaller internally maintains a Map<Class,XmlAdapter>, which it uses for marshalling classes whose fields/methods are annotated with XmlJavaTypeAdapter.

        This method allows applications to use a configured instance of XmlAdapter. When an instance of an adapter is not given, a marshaller will create one by invoking its default constructor.

        Parameters:
        type - The type of the adapter. The specified instance will be used when XmlJavaTypeAdapter.value() refers to this type.
        adapter - The instance of the adapter to be used. If null, it will un-register the current adapter set for this type.
        Throws:
        IllegalArgumentException - if the type parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB 2.0

      • getAdapter

        <A extends XmlAdapter> A getAdapter(Class<A> type)
        Gets the adapter associated with the specified type. This is the reverse operation of the setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter) method.
        Throws:
        IllegalArgumentException - if the type parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB 2.0

      • setAttachmentMarshaller

        void setAttachmentMarshaller(AttachmentMarshaller am)

        Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment. The attachment is referenced from the XML document content model by content-id URIs(cid) references stored within the xml document.

        Throws:
        IllegalStateException - if attempt to concurrently call this method during a marshal operation.

      • getAttachmentMarshaller

        AttachmentMarshaller getAttachmentMarshaller()

      • setSchema

        void setSchema(Schema schema)
        Specify the JAXP 1.3 Schema object that should be used to validate subsequent marshal operations against. Passing null into this method will disable validation.

        This method allows the caller to validate the marshalled XML as it's marshalled.

        Initially this property is set to null.

        Parameters:
        schema - Schema object to validate marshal operations against or null to disable validation
        Throws:
        UnsupportedOperationException - could be thrown if this method is invoked on an Marshaller created from a JAXBContext referencing JAXB 1.0 mapped classes
        Since:
        JAXB2.0

      • getSchema

        Schema getSchema()
        Get the JAXP 1.3 Schema object being used to perform marshal-time validation. If there is no Schema set on the marshaller, then this method will return null indicating that marshal-time validation will not be performed.
        Returns:
        the Schema object being used to perform marshal-time validation or null if not present.
        Throws:
        UnsupportedOperationException - could be thrown if this method is invoked on an Marshaller created from a JAXBContext referencing JAXB 1.0 mapped classes
        Since:
        JAXB2.0

      • setListener

        void setListener(Marshaller.Listener listener)

        Register marshal event callback Marshaller.Listener with this Marshaller.

        There is only one Listener per Marshaller. Setting a Listener replaces the previous set Listener. One can unregister current Listener by setting listener to null.

        Parameters:
        listener - an instance of a class that implements Marshaller.Listener
        Since:
        JAXB2.0

      • getListener

        Marshaller.Listener getListener()

        Return Marshaller.Listener registered with this Marshaller.

        Returns:
        registered Marshaller.Listener or null if no Listener is registered with this Marshaller.
        Since:
        JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Marshaller.Listener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class Marshaller.Listener

  • java.lang.Object
    • javax.xml.bind.Marshaller.Listener
  • Enclosing interface:
    Marshaller

    public abstract static class Marshaller.Listener
extends Object

    Register an instance of an implementation of this class with a Marshaller to externally listen for marshal events.

    This class enables pre and post processing of each marshalled object. The event callbacks are called when marshalling from an instance that maps to an xml element or complex type definition. The event callbacks are not called when marshalling from an instance of a Java datatype that represents a simple type definition.

    External listener is one of two different mechanisms for defining marshal event callbacks. See Marshal Event Callbacks for an overview.

    Since:
    JAXB2.0
    See Also:
    Marshaller.setListener(Listener), Marshaller.getListener()

    • Constructor Summary

      Constructors
      Constructor and Description
      Listener()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void afterMarshal(Object source)

      Callback method invoked after marshalling source to XML.
      void beforeMarshal(Object source)

      Callback method invoked before marshalling from source to XML.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Listener

        public Listener()

    • Method Detail

      • beforeMarshal

        public void beforeMarshal(Object source)

        Callback method invoked before marshalling from source to XML.

        This method is invoked just before marshalling process starts to marshal source. Note that if the class of source defines its own beforeMarshal method, the class specific callback method is invoked just before this method is invoked.

        Parameters:
        source - instance of JAXB mapped class prior to marshalling from it.

      • afterMarshal

        public void afterMarshal(Object source)

        Callback method invoked after marshalling source to XML.

        This method is invoked after source and all its descendants have been marshalled. Note that if the class of source defines its own afterMarshal method, the class specific callback method is invoked just before this method is invoked.

        Parameters:
        source - instance of JAXB mapped class after marshalling it.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PropertyException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class PropertyException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.bind.JAXBException
          • javax.xml.bind.PropertyException
  • All Implemented Interfaces:
    Serializable

    public class PropertyException
extends JAXBException
    This exception indicates that an error was encountered while getting or setting a property.
    Since:
    JAXB1.0
    See Also:
    JAXBContext, Validator, Unmarshaller, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      PropertyException(String message)
      Construct a PropertyException with the specified detail message.
      PropertyException(String name, Object value)
      Construct a PropertyException whose message field is set based on the name of the property and value.toString().
      PropertyException(String message, String errorCode)
      Construct a PropertyException with the specified detail message and vendor specific errorCode.
      PropertyException(String message, String errorCode, Throwable exception)
      Construct a PropertyException with the specified detail message, vendor specific errorCode, and linkedException.
      PropertyException(String message, Throwable exception)
      Construct a PropertyException with the specified detail message and linkedException.
      PropertyException(Throwable exception)
      Construct a PropertyException with a linkedException.

    • Method Summary

      • Methods inherited from class javax.xml.bind.JAXBException

        getCause, getErrorCode, getLinkedException, printStackTrace, printStackTrace, printStackTrace, setLinkedException, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • PropertyException

        public PropertyException(String message)
        Construct a PropertyException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • PropertyException

        public PropertyException(String message,
                         String errorCode)
        Construct a PropertyException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • PropertyException

        public PropertyException(Throwable exception)
        Construct a PropertyException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • PropertyException

        public PropertyException(String message,
                         Throwable exception)
        Construct a PropertyException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • PropertyException

        public PropertyException(String message,
                         String errorCode,
                         Throwable exception)
        Construct a PropertyException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception

      • PropertyException

        public PropertyException(String name,
                         Object value)
        Construct a PropertyException whose message field is set based on the name of the property and value.toString().
        Parameters:
        name - the name of the property related to this exception
        value - the value of the property related to this exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SchemaOutputResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class SchemaOutputResolver

  • java.lang.Object
    • javax.xml.bind.SchemaOutputResolver

  • public abstract class SchemaOutputResolver
extends Object
    Controls where a JAXB implementation puts the generates schema files.

    An implementation of this abstract class has to be provided by the calling application to generate schemas.

    This is a class, not an interface so as to allow future versions to evolve without breaking the compatibility.

    • Constructor Summary

      Constructors
      Constructor and Description
      SchemaOutputResolver()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Result createOutput(String namespaceUri, String suggestedFileName)
      Decides where the schema file (of the given namespace URI) will be written, and return it as a Result object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SchemaOutputResolver

        public SchemaOutputResolver()

    • Method Detail

      • createOutput

        public abstract Result createOutput(String namespaceUri,
                                    String suggestedFileName)
                             throws IOException
        Decides where the schema file (of the given namespace URI) will be written, and return it as a Result object.

        This method is called only once for any given namespace. IOW, all the components in one namespace is always written into the same schema document.

        Parameters:
        namespaceUri - The namespace URI that the schema declares. Can be the empty string, but never be null.
        suggestedFileName - A JAXB implementation generates an unique file name (like "schema1.xsd") for the convenience of the callee. This name can be used for the file name of the schema, or the callee can just ignore this name and come up with its own name. This is just a hint.
        Returns:
        a Result object that encapsulates the actual destination of the schema. If the Result object has a system ID, it must be an absolute system ID. Those system IDs are relativized by the caller and used for <xs:import> statements. If the Result object does not have a system ID, a schema for the namespace URI is generated but it won't be explicitly <xs:import>ed from other schemas. If null is returned, the schema generation for this namespace URI will be skipped.
        Throws:
        IOException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeConstraintException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class TypeConstraintException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.bind.TypeConstraintException
  • All Implemented Interfaces:
    Serializable

    public class TypeConstraintException
extends RuntimeException
    This exception indicates that a violation of a dynamically checked type constraint was detected.

    This exception can be thrown by the generated setter methods of the schema derived Java content classes. However, since fail-fast validation is an optional feature for JAXB Providers to support, not all setter methods will throw this exception when a type constraint is violated.

    If this exception is throw while invoking a fail-fast setter, the value of the property is guaranteed to remain unchanged, as if the setter were never called.

    Since:
    JAXB1.0
    See Also:
    ValidationEvent, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeConstraintException(String message)
      Construct a TypeConstraintException with the specified detail message.
      TypeConstraintException(String message, String errorCode)
      Construct a TypeConstraintException with the specified detail message and vendor specific errorCode.
      TypeConstraintException(String message, String errorCode, Throwable exception)
      Construct a TypeConstraintException with the specified detail message, vendor specific errorCode, and linkedException.
      TypeConstraintException(String message, Throwable exception)
      Construct a TypeConstraintException with the specified detail message and linkedException.
      TypeConstraintException(Throwable exception)
      Construct a TypeConstraintException with a linkedException.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getErrorCode()
      Get the vendor specific error code
      Throwable getLinkedException()
      Get the linked exception
      void printStackTrace()
      Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to System.err.
      void printStackTrace(PrintStream s)
      Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream.
      void setLinkedException(Throwable exception)
      Add a linked Exception.
      String toString()
      Returns a short description of this TypeConstraintException.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TypeConstraintException

        public TypeConstraintException(String message)
        Construct a TypeConstraintException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • TypeConstraintException

        public TypeConstraintException(String message,
                               String errorCode)
        Construct a TypeConstraintException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • TypeConstraintException

        public TypeConstraintException(Throwable exception)
        Construct a TypeConstraintException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • TypeConstraintException

        public TypeConstraintException(String message,
                               Throwable exception)
        Construct a TypeConstraintException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • TypeConstraintException

        public TypeConstraintException(String message,
                               String errorCode,
                               Throwable exception)
        Construct a TypeConstraintException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception

    • Method Detail

      • getErrorCode

        public String getErrorCode()
        Get the vendor specific error code
        Returns:
        a string specifying the vendor specific error code

      • getLinkedException

        public Throwable getLinkedException()
        Get the linked exception
        Returns:
        the linked Exception, null if none exists

      • setLinkedException

        public void setLinkedException(Throwable exception)
        Add a linked Exception.
        Parameters:
        exception - the linked Exception (A null value is permitted and indicates that the linked exception does not exist or is unknown).

      • toString

        public String toString()
        Returns a short description of this TypeConstraintException.
        Overrides:
        toString in class Throwable
        Returns:
        a string representation of this throwable.

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace()
        Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to System.err.
        Overrides:
        printStackTrace in class Throwable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnmarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class UnmarshalException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.bind.JAXBException
          • javax.xml.bind.UnmarshalException
  • All Implemented Interfaces:
    Serializable

    public class UnmarshalException
extends JAXBException
    This exception indicates that an error has occurred while performing an unmarshal operation that prevents the JAXB Provider from completing the operation.

    The ValidationEventHandler can cause this exception to be thrown during the unmarshal operations. See ValidationEventHandler.handleEvent(ValidationEvent).

    Since:
    JAXB1.0
    See Also:
    JAXBException, Unmarshaller, ValidationEventHandler, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      UnmarshalException(String message)
      Construct an UnmarshalException with the specified detail message.
      UnmarshalException(String message, String errorCode)
      Construct an UnmarshalException with the specified detail message and vendor specific errorCode.
      UnmarshalException(String message, String errorCode, Throwable exception)
      Construct an UnmarshalException with the specified detail message, vendor specific errorCode, and linkedException.
      UnmarshalException(String message, Throwable exception)
      Construct an UnmarshalException with the specified detail message and linkedException.
      UnmarshalException(Throwable exception)
      Construct an UnmarshalException with a linkedException.

    • Method Summary

      • Methods inherited from class javax.xml.bind.JAXBException

        getCause, getErrorCode, getLinkedException, printStackTrace, printStackTrace, printStackTrace, setLinkedException, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UnmarshalException

        public UnmarshalException(String message)
        Construct an UnmarshalException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • UnmarshalException

        public UnmarshalException(String message,
                          String errorCode)
        Construct an UnmarshalException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • UnmarshalException

        public UnmarshalException(Throwable exception)
        Construct an UnmarshalException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • UnmarshalException

        public UnmarshalException(String message,
                          Throwable exception)
        Construct an UnmarshalException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • UnmarshalException

        public UnmarshalException(String message,
                          String errorCode,
                          Throwable exception)
        Construct an UnmarshalException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Unmarshaller

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface Unmarshaller

  • All Known Implementing Classes:
    AbstractUnmarshallerImpl

    public interface Unmarshaller
    The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled. It provides an overloading of unmarshal methods for many different input kinds.

    Unmarshalling from a File:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       Object o = u.unmarshal( new File( "nosferatu.xml" ) );

    Unmarshalling from an InputStream:

           InputStream is = new FileInputStream( "nosferatu.xml" );
       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       Object o = u.unmarshal( is );

    Unmarshalling from a URL:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       URL url = new URL( "http://beaker.east/nosferatu.xml" );
       Object o = u.unmarshal( url );

    Unmarshalling from a StringBuffer using a javax.xml.transform.stream.StreamSource:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       StringBuffer xmlStr = new StringBuffer( "<?xml version="1.0"?>..." );
       Object o = u.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) );

    Unmarshalling from a org.w3c.dom.Node:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();

       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
       dbf.setNamespaceAware(true);
       DocumentBuilder db = dbf.newDocumentBuilder();
       Document doc = db.parse(new File( "nosferatu.xml"));

       Object o = u.unmarshal( doc );

    Unmarshalling from a javax.xml.transform.sax.SAXSource using a client specified validating SAX2.0 parser:

           // configure a validating SAX2.0 parser (Xerces2)
       static final String JAXP_SCHEMA_LANGUAGE =
           "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
       static final String JAXP_SCHEMA_LOCATION =
           "http://java.sun.com/xml/jaxp/properties/schemaSource";
       static final String W3C_XML_SCHEMA =
           "http://www.w3.org/2001/XMLSchema";

       System.setProperty( "javax.xml.parsers.SAXParserFactory",
                           "org.apache.xerces.jaxp.SAXParserFactoryImpl" );

       SAXParserFactory spf = SAXParserFactory.newInstance();
       spf.setNamespaceAware(true);
       spf.setValidating(true);
       SAXParser saxParser = spf.newSAXParser();

       try {
           saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
           saxParser.setProperty(JAXP_SCHEMA_LOCATION, "http://....");
       } catch (SAXNotRecognizedException x) {
           // exception handling omitted
       }

       XMLReader xmlReader = saxParser.getXMLReader();
       SAXSource source =
           new SAXSource( xmlReader, new InputSource( "http://..." ) );

       // Setup JAXB to unmarshal
       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
       ValidationEventCollector vec = new ValidationEventCollector();
       u.setEventHandler( vec );

       // turn off the JAXB provider's default validation mechanism to
       // avoid duplicate validation
       u.setValidating( false )

       // unmarshal
       Object o = u.unmarshal( source );

       // check for events
       if( vec.hasEvents() ) {
          // iterate over events
       }

    Unmarshalling from a StAX XMLStreamReader:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();

       javax.xml.stream.XMLStreamReader xmlStreamReader =
           javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... );

       Object o = u.unmarshal( xmlStreamReader );

    Unmarshalling from a StAX XMLEventReader:

           JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();

       javax.xml.stream.XMLEventReader xmlEventReader =
           javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... );

       Object o = u.unmarshal( xmlEventReader );

    Unmarshalling XML Data

    Unmarshalling can deserialize XML data that represents either an entire XML document or a subtree of an XML document. Typically, it is sufficient to use the unmarshalling methods described by Unmarshal root element that is declared globally. These unmarshal methods utilize JAXBContext's mapping of global XML element declarations and type definitions to JAXB mapped classes to initiate the unmarshalling of the root element of XML data. When the JAXBContext's mappings are not sufficient to unmarshal the root element of XML data, the application can assist the unmarshalling process by using the unmarshal by declaredType methods. These methods are useful for unmarshalling XML data where the root element corresponds to a local element declaration in the schema.
    An unmarshal method never returns null. If the unmarshal process is unable to unmarshal the root of XML content to a JAXB mapped object, a fatal error is reported that terminates processing by throwing JAXBException.

    Unmarshal a root element that is globally declared

    The unmarshal methods that do not have an declaredType parameter use JAXBContext to unmarshal the root element of an XML data. The JAXBContext instance is the one that was used to create this Unmarshaller. The JAXBContext instance maintains a mapping of globally declared XML element and type definition names to JAXB mapped classes. The unmarshal method checks if JAXBContext has a mapping from the root element's XML name and/or @xsi:type to a JAXB mapped class. If it does, it umarshalls the XML data using the appropriate JAXB mapped class. Note that when the root element name is unknown and the root element has an @xsi:type, the XML data is unmarshalled using that JAXB mapped class as the value of a JAXBElement. When the JAXBContext object does not have a mapping for the root element's name nor its @xsi:type, if it exists, then the unmarshal operation will abort immediately by throwing a UnmarshalException. This exception scenario can be worked around by using the unmarshal by declaredType methods described in the next subsection.

    Unmarshal by Declared Type

    The unmarshal methods with a declaredType parameter enable an application to deserialize a root element of XML data, even when there is no mapping in JAXBContext of the root element's XML name. The unmarshaller unmarshals the root element using the application provided mapping specified as the declaredType parameter. Note that even when the root element's element name is mapped by JAXBContext, the declaredType parameter overrides that mapping for deserializing the root element when using these unmarshal methods. Additionally, when the root element of XML data has an xsi:type attribute and that attribute's value references a type definition that is mapped to a JAXB mapped class by JAXBContext, that the root element's xsi:type attribute takes precedence over the unmarshal methods declaredType parameter. These methods always return a JAXBElement<declaredType> instance. The table below shows how the properties of the returned JAXBElement instance are set.

    Unmarshal By Declared Type returned JAXBElement
    JAXBElement Property | Value
    name | xml element name
    value | instanceof declaredType
    declaredType | unmarshal method declaredType parameter
    scope | null (actual scope is unknown)

    The following is an example of unmarshal by declaredType method.

    Unmarshal by declaredType from a org.w3c.dom.Node:

           Schema fragment for example
       <xs:schema>
          <xs:complexType name="FooType">...<\xs:complexType>
          <!-- global element declaration "PurchaseOrder" -->
          <xs:element name="PurchaseOrder">
              <xs:complexType>
                 <xs:sequence>
                    <!-- local element declaration "foo" -->
                    <xs:element name="foo" type="FooType"/>
                    ...
                 </xs:sequence>
              </xs:complexType>
          </xs:element>
       </xs:schema>

       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();

       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
       dbf.setNamespaceAware(true);
       DocumentBuilder db = dbf.newDocumentBuilder();
       Document doc = db.parse(new File( "nosferatu.xml"));
       Element  fooSubtree = ...; // traverse DOM till reach xml element foo, constrained by a
                                  // local element declaration in schema.

       // FooType is the JAXB mapping of the type of local element declaration foo.
       JAXBElement<FooType> foo = u.unmarshal( fooSubtree, FooType.class);

    Support for SAX2.0 Compliant Parsers

    A client application has the ability to select the SAX2.0 compliant parser of their choice. If a SAX parser is not selected, then the JAXB Provider's default parser will be used. Even though the JAXB Provider's default parser is not required to be SAX2.0 compliant, all providers are required to allow a client application to specify their own SAX2.0 parser. Some providers may require the client application to specify the SAX2.0 parser at schema compile time. See unmarshal(Source) for more detail.

    Validation and Well-Formedness

    A client application can enable or disable JAXP 1.3 validation mechanism via the setSchema(javax.xml.validation.Schema) API. Sophisticated clients can specify their own validating SAX 2.0 compliant parser and bypass the JAXP 1.3 validation mechanism using the unmarshal(Source) API.

    Since unmarshalling invalid XML content is defined in JAXB 2.0, the Unmarshaller default validation event handler was made more lenient than in JAXB 1.0. When schema-derived code generated by JAXB 1.0 binding compiler is registered with JAXBContext, the default unmarshal validation handler is DefaultValidationEventHandler and it terminates the marshal operation after encountering either a fatal error or an error. For a JAXB 2.0 client application, there is no explicitly defined default validation handler and the default event handling only terminates the unmarshal operation after encountering a fatal error.

    Supported Properties

    There currently are not any properties required to be supported by all JAXB Providers on Unmarshaller. However, some providers may support their own set of provider specific properties.

    Unmarshal Event Callbacks

    The Unmarshaller provides two styles of callback mechanisms that allow application specific processing during key points in the unmarshalling process. In 'class defined' event callbacks, application specific code placed in JAXB mapped classes is triggered during unmarshalling. 'External listeners' allow for centralized processing of unmarshal events in one callback method rather than by type event callbacks.

    'Class defined' event callback methods allow any JAXB mapped class to specify its own specific callback methods by defining methods with the following method signature:

       // This method is called immediately after the object is created and before the unmarshalling of this
   // object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling.
   void beforeUnmarshal(Unmarshaller, Object parent);

   //This method is called after all the properties (except IDREF) are unmarshalled for this object,
   //but before this object is set to the parent object.
   void afterUnmarshal(Unmarshaller, Object parent);
    The class defined callback methods should be used when the callback method requires access to non-public methods and/or fields of the class.

    The external listener callback mechanism enables the registration of a Unmarshaller.Listener instance with an setListener(Listener). The external listener receives all callback events, allowing for more centralized processing than per class defined callback methods. The external listener receives events when unmarshalling proces is marshalling to a JAXB element or to JAXB mapped class.

    The 'class defined' and external listener event callback methods are independent of each other, both can be called for one event. The invocation ordering when both listener callback methods exist is defined in Unmarshaller.Listener.beforeUnmarshal(Object, Object) and Unmarshaller.Listener.afterUnmarshal(Object, Object).

    An event callback method throwing an exception terminates the current unmarshal process.

    Since:
    JAXB1.0
    See Also:
    JAXBContext, Marshaller, Validator

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  Unmarshaller.Listener

      Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      <A extends XmlAdapter>
      A             		getAdapter(Class<A> type)
      Gets the adapter associated with the specified type.
      AttachmentUnmarshaller getAttachmentUnmarshaller()
      ValidationEventHandler getEventHandler()
      Return the current event handler or the default event handler if one hasn't been set.
      Unmarshaller.Listener getListener()
      Return Unmarshaller.Listener registered with this Unmarshaller.
      Object getProperty(String name)
      Get the particular property in the underlying implementation of Unmarshaller.
      Schema getSchema()
      Get the JAXP 1.3 Schema object being used to perform unmarshal-time validation.
      UnmarshallerHandler getUnmarshallerHandler()
      Get an unmarshaller handler object that can be used as a component in an XML pipeline.
      boolean isValidating()
      Deprecated.
      since JAXB2.0, please see getSchema()
      <A extends XmlAdapter>
      void             		setAdapter(Class<A> type, A adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      void setAdapter(XmlAdapter adapter)
      Associates a configured instance of XmlAdapter with this unmarshaller.
      void setAttachmentUnmarshaller(AttachmentUnmarshaller au)
      Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments.
      void setEventHandler(ValidationEventHandler handler)
      Allow an application to register a ValidationEventHandler.
      void setListener(Unmarshaller.Listener listener)
      Register unmarshal event callback Unmarshaller.Listener with this Unmarshaller.
      void setProperty(String name, Object value)
      Set the particular property in the underlying implementation of Unmarshaller.
      void setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent unmarshal operations against.
      void setValidating(boolean validating)
      Deprecated.
      since JAXB2.0, please see setSchema(javax.xml.validation.Schema)
      Object unmarshal(File f)
      Unmarshal XML data from the specified file and return the resulting content tree.
      Object unmarshal(InputSource source)
      Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.
      Object unmarshal(InputStream is)
      Unmarshal XML data from the specified InputStream and return the resulting content tree.
      Object unmarshal(Node node)
      Unmarshal global XML data from the specified DOM tree and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(Node node, Class<T> declaredType)
      Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.
      Object unmarshal(Reader reader)
      Unmarshal XML data from the specified Reader and return the resulting content tree.
      Object unmarshal(Source source)
      Unmarshal XML data from the specified XML Source and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(Source source, Class<T> declaredType)
      Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.
      Object unmarshal(URL url)
      Unmarshal XML data from the specified URL and return the resulting content tree.
      Object unmarshal(XMLEventReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.
      Object unmarshal(XMLStreamReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

    • Method Detail

      • unmarshal

        Object unmarshal(File f)
          throws JAXBException
        Unmarshal XML data from the specified file and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Parameters:
        f - the file to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the file parameter is null

      • unmarshal

        Object unmarshal(InputStream is)
          throws JAXBException
        Unmarshal XML data from the specified InputStream and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API.

        Implements Unmarshal Global Root Element.

        Parameters:
        is - the InputStream to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the InputStream parameter is null

      • unmarshal

        Object unmarshal(Reader reader)
          throws JAXBException
        Unmarshal XML data from the specified Reader and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API, because a Reader does not provide the system ID.

        Implements Unmarshal Global Root Element.

        Parameters:
        reader - the Reader to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the InputStream parameter is null
        Since:
        JAXB2.0

      • unmarshal

        Object unmarshal(URL url)
          throws JAXBException
        Unmarshal XML data from the specified URL and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Parameters:
        url - the url to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the URL parameter is null

      • unmarshal

        Object unmarshal(InputSource source)
          throws JAXBException
        Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Parameters:
        source - the input source to unmarshal XML data from
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the InputSource parameter is null

      • unmarshal

        Object unmarshal(Node node)
          throws JAXBException
        Unmarshal global XML data from the specified DOM tree and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        Parameters:
        node - the document/element to unmarshal XML data from. The caller must support at least Document and Element.
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the Node parameter is null
        See Also:
        unmarshal(org.w3c.dom.Node, Class)

      • unmarshal

        <T> JAXBElement<T> unmarshal(Node node,
                             Class<T> declaredType)
                      throws JAXBException
        Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.

        Implements Unmarshal by Declared Type

        Parameters:
        node - the document/element to unmarshal XML data from. The caller must support at least Document and Element.
        declaredType - appropriate JAXB mapped class to hold node's XML data.
        Returns:
        JAXB Element representation of node
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If any parameter is null
        Since:
        JAXB2.0

      • unmarshal

        Object unmarshal(Source source)
          throws JAXBException
        Unmarshal XML data from the specified XML Source and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        SAX 2.0 Parser Pluggability

        A client application can choose not to use the default parser mechanism supplied with their JAXB provider. Any SAX 2.0 compliant parser can be substituted for the JAXB provider's default mechanism. To do so, the client application must properly configure a SAXSource containing an XMLReader implemented by the SAX 2.0 parser provider. If the XMLReader has an org.xml.sax.ErrorHandler registered on it, it will be replaced by the JAXB Provider so that validation errors can be reported via the ValidationEventHandler mechanism of JAXB. If the SAXSource does not contain an XMLReader, then the JAXB provider's default parser mechanism will be used.

        This parser replacement mechanism can also be used to replace the JAXB provider's unmarshal-time validation engine. The client application must properly configure their SAX 2.0 compliant parser to perform validation (as shown in the example above). Any SAXParserExceptions encountered by the parser during the unmarshal operation will be processed by the JAXB provider and converted into JAXB ValidationEvent objects which will be reported back to the client via the ValidationEventHandler registered with the Unmarshaller. Note: specifying a substitute validating SAX 2.0 parser for unmarshalling does not necessarily replace the validation engine used by the JAXB provider for performing on-demand validation.

        The only way for a client application to specify an alternate parser mechanism to be used during unmarshal is via the unmarshal(SAXSource) API. All other forms of the unmarshal method (File, URL, Node, etc) will use the JAXB provider's default parser and validator mechanisms.

        Parameters:
        source - the XML Source to unmarshal XML data from (providers are only required to support SAXSource, DOMSource, and StreamSource)
        Returns:
        the newly created root object of the java content tree
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the Source parameter is null
        See Also:
        unmarshal(javax.xml.transform.Source, Class)

      • unmarshal

        <T> JAXBElement<T> unmarshal(Source source,
                             Class<T> declaredType)
                      throws JAXBException
        Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.

        Implements Unmarshal by Declared Type

        See SAX 2.0 Parser Pluggability

        Parameters:
        source - the XML Source to unmarshal XML data from (providers are only required to support SAXSource, DOMSource, and StreamSource)
        declaredType - appropriate JAXB mapped class to hold source's xml root element
        Returns:
        Java content rooted by JAXB Element
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If any parameter is null
        Since:
        JAXB2.0

      • unmarshal

        Object unmarshal(XMLStreamReader reader)
          throws JAXBException
        Unmarshal XML data from the specified pull parser and return the resulting content tree.

        Implements Unmarshal Global Root Element.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Parameters:
        reader - The parser to be read.
        Returns:
        the newly created root object of the java content tree.
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the reader parameter is null
        IllegalStateException - If reader is not pointing to a START_DOCUMENT or START_ELEMENT event.
        Since:
        JAXB2.0
        See Also:
        unmarshal(javax.xml.stream.XMLStreamReader, Class)

      • unmarshal

        <T> JAXBElement<T> unmarshal(XMLStreamReader reader,
                             Class<T> declaredType)
                      throws JAXBException
        Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

        This method implements unmarshal by declaredType.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Parameters:
        reader - The parser to be read.
        declaredType - appropriate JAXB mapped class to hold reader's START_ELEMENT XML data.
        Returns:
        content tree rooted by JAXB Element representation
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If any parameter is null
        Since:
        JAXB2.0

      • unmarshal

        Object unmarshal(XMLEventReader reader)
          throws JAXBException
        Unmarshal XML data from the specified pull parser and return the resulting content tree.

        This method is an Unmarshal Global Root method.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Parameters:
        reader - The parser to be read.
        Returns:
        the newly created root object of the java content tree.
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If the reader parameter is null
        IllegalStateException - If reader is not pointing to a START_DOCUMENT or START_ELEMENT event.
        Since:
        JAXB2.0
        See Also:
        unmarshal(javax.xml.stream.XMLEventReader, Class)

      • unmarshal

        <T> JAXBElement<T> unmarshal(XMLEventReader reader,
                             Class<T> declaredType)
                      throws JAXBException
        Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

        This method implements unmarshal by declaredType.

        This method assumes that the parser is on a START_DOCUMENT or START_ELEMENT event. Unmarshalling will be done from this start event to the corresponding end event. If this method returns successfully, the reader will be pointing at the token right after the end event.

        Parameters:
        reader - The parser to be read.
        declaredType - appropriate JAXB mapped class to hold reader's START_ELEMENT XML data.
        Returns:
        content tree rooted by JAXB Element representation
        Throws:
        JAXBException - If any unexpected errors occur while unmarshalling
        UnmarshalException - If the ValidationEventHandler returns false from its handleEvent method or the Unmarshaller is unable to perform the XML to Java binding. See Unmarshalling XML Data
        IllegalArgumentException - If any parameter is null
        Since:
        JAXB2.0

      • getUnmarshallerHandler

        UnmarshallerHandler getUnmarshallerHandler()
        Get an unmarshaller handler object that can be used as a component in an XML pipeline.

        The JAXB Provider can return the same handler object for multiple invocations of this method. In other words, this method does not necessarily create a new instance of UnmarshallerHandler. If the application needs to use more than one UnmarshallerHandler, it should create more than one Unmarshaller.

        Returns:
        the unmarshaller handler object
        See Also:
        UnmarshallerHandler

      • setValidating

        void setValidating(boolean validating)
            throws JAXBException
        Deprecated. since JAXB2.0, please see setSchema(javax.xml.validation.Schema)
        Specifies whether or not the default validation mechanism of the Unmarshaller should validate during unmarshal operations. By default, the Unmarshaller does not validate.

        This method may only be invoked before or after calling one of the unmarshal methods.

        This method only controls the JAXB Provider's default unmarshal-time validation mechanism - it has no impact on clients that specify their own validating SAX 2.0 compliant parser. Clients that specify their own unmarshal-time validation mechanism may wish to turn off the JAXB Provider's default validation mechanism via this API to avoid "double validation".

        This method is deprecated as of JAXB 2.0 - please use the new setSchema(javax.xml.validation.Schema) API.

        Parameters:
        validating - true if the Unmarshaller should validate during unmarshal, false otherwise
        Throws:
        JAXBException - if an error occurred while enabling or disabling validation at unmarshal time
        UnsupportedOperationException - could be thrown if this method is invoked on an Unmarshaller created from a JAXBContext referencing JAXB 2.0 mapped classes

      • isValidating

        boolean isValidating()
              throws JAXBException
        Deprecated. since JAXB2.0, please see getSchema()
        Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.

        This API returns the state of the JAXB Provider's default unmarshal-time validation mechanism.

        This method is deprecated as of JAXB 2.0 - please use the new getSchema() API.

        Returns:
        true if the Unmarshaller is configured to validate during unmarshal operations, false otherwise
        Throws:
        JAXBException - if an error occurs while retrieving the validating flag
        UnsupportedOperationException - could be thrown if this method is invoked on an Unmarshaller created from a JAXBContext referencing JAXB 2.0 mapped classes

      • setEventHandler

        void setEventHandler(ValidationEventHandler handler)
              throws JAXBException
        Allow an application to register a ValidationEventHandler.

        The ValidationEventHandler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the unmarshal methods. If the client application does not register a ValidationEventHandler before invoking the unmarshal methods, then ValidationEvents will be handled by the default event handler which will terminate the unmarshal operation after the first error or fatal error is encountered.

        Calling this method with a null parameter will cause the Unmarshaller to revert back to the default event handler.

        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler

      • getEventHandler

        ValidationEventHandler getEventHandler()
                                throws JAXBException
        Return the current event handler or the default event handler if one hasn't been set.
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler

      • setProperty

        void setProperty(String name,
                 Object value)
          throws PropertyException
        Set the particular property in the underlying implementation of Unmarshaller. This method can only be used to set one of the standard JAXB defined properties above or a provider specific property. Attempting to set an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value
        IllegalArgumentException - If the name parameter is null

      • getProperty

        Object getProperty(String name)
            throws PropertyException
        Get the particular property in the underlying implementation of Unmarshaller. This method can only be used to get one of the standard JAXB defined properties above or a provider specific property. Attempting to get an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name
        IllegalArgumentException - If the name parameter is null

      • setSchema

        void setSchema(Schema schema)
        Specify the JAXP 1.3 Schema object that should be used to validate subsequent unmarshal operations against. Passing null into this method will disable validation.

        This method replaces the deprecated setValidating(boolean) API.

        Initially this property is set to null.

        Parameters:
        schema - Schema object to validate unmarshal operations against or null to disable validation
        Throws:
        UnsupportedOperationException - could be thrown if this method is invoked on an Unmarshaller created from a JAXBContext referencing JAXB 1.0 mapped classes
        Since:
        JAXB2.0

      • getSchema

        Schema getSchema()
        Get the JAXP 1.3 Schema object being used to perform unmarshal-time validation. If there is no Schema set on the unmarshaller, then this method will return null indicating that unmarshal-time validation will not be performed.

        This method provides replacement functionality for the deprecated isValidating() API as well as access to the Schema object. To determine if the Unmarshaller has validation enabled, simply test the return type for null:

        boolean isValidating = u.getSchema()!=null;

        Returns:
        the Schema object being used to perform unmarshal-time validation or null if not present
        Throws:
        UnsupportedOperationException - could be thrown if this method is invoked on an Unmarshaller created from a JAXBContext referencing JAXB 1.0 mapped classes
        Since:
        JAXB2.0

      • setAdapter

        void setAdapter(XmlAdapter adapter)
        Associates a configured instance of XmlAdapter with this unmarshaller.

        This is a convenience method that invokes setAdapter(adapter.getClass(),adapter);.

        Throws:
        IllegalArgumentException - if the adapter parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB2.0
        See Also:
        setAdapter(Class,XmlAdapter)

      • setAdapter

        <A extends XmlAdapter> void setAdapter(Class<A> type,
                                       A adapter)
        Associates a configured instance of XmlAdapter with this unmarshaller.

        Every unmarshaller internally maintains a Map<Class,XmlAdapter>, which it uses for unmarshalling classes whose fields/methods are annotated with XmlJavaTypeAdapter.

        This method allows applications to use a configured instance of XmlAdapter. When an instance of an adapter is not given, an unmarshaller will create one by invoking its default constructor.

        Parameters:
        type - The type of the adapter. The specified instance will be used when XmlJavaTypeAdapter.value() refers to this type.
        adapter - The instance of the adapter to be used. If null, it will un-register the current adapter set for this type.
        Throws:
        IllegalArgumentException - if the type parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB2.0

      • getAdapter

        <A extends XmlAdapter> A getAdapter(Class<A> type)
        Gets the adapter associated with the specified type. This is the reverse operation of the setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter) method.
        Throws:
        IllegalArgumentException - if the type parameter is null.
        UnsupportedOperationException - if invoked agains a JAXB 1.0 implementation.
        Since:
        JAXB2.0

      • setAttachmentUnmarshaller

        void setAttachmentUnmarshaller(AttachmentUnmarshaller au)

        Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments.

        Unmarshal time validation, enabled via setSchema(Schema), must be supported even when unmarshaller is performing XOP processing.

        Throws:
        IllegalStateException - if attempt to concurrently call this method during a unmarshal operation.

      • getAttachmentUnmarshaller

        AttachmentUnmarshaller getAttachmentUnmarshaller()

      • setListener

        void setListener(Unmarshaller.Listener listener)

        Register unmarshal event callback Unmarshaller.Listener with this Unmarshaller.

        There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener. One can unregister current Listener by setting listener to null.

        Parameters:
        listener - provides unmarshal event callbacks for this Unmarshaller
        Since:
        JAXB2.0

      • getListener

        Unmarshaller.Listener getListener()

        Return Unmarshaller.Listener registered with this Unmarshaller.

        Returns:
        registered Unmarshaller.Listener or null if no Listener is registered with this Unmarshaller.
        Since:
        JAXB2.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Unmarshaller.Listener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class Unmarshaller.Listener

  • java.lang.Object
    • javax.xml.bind.Unmarshaller.Listener
  • Enclosing interface:
    Unmarshaller

    public abstract static class Unmarshaller.Listener
extends Object

    Register an instance of an implementation of this class with Unmarshaller to externally listen for unmarshal events.

    This class enables pre and post processing of an instance of a JAXB mapped class as XML data is unmarshalled into it. The event callbacks are called when unmarshalling XML content into a JAXBElement instance or a JAXB mapped class that represents a complex type definition. The event callbacks are not called when unmarshalling to an instance of a Java datatype that represents a simple type definition.

    External listener is one of two different mechanisms for defining unmarshal event callbacks. See Unmarshal Event Callbacks for an overview.

    (@link #setListener(Listener)} (@link #getListener()}

    Since:
    JAXB2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      Listener()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void afterUnmarshal(Object target, Object parent)

      Callback method invoked after unmarshalling XML data into target.
      void beforeUnmarshal(Object target, Object parent)

      Callback method invoked before unmarshalling into target.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Listener

        public Listener()

    • Method Detail

      • beforeUnmarshal

        public void beforeUnmarshal(Object target,
                            Object parent)

        Callback method invoked before unmarshalling into target.

        This method is invoked immediately after target was created and before the unmarshalling of this object begins. Note that if the class of target defines its own beforeUnmarshal method, the class specific callback method is invoked before this method is invoked.

        Parameters:
        target - non-null instance of JAXB mapped class prior to unmarshalling into it.
        parent - instance of JAXB mapped class that will eventually reference target. null when target is root element.

      • afterUnmarshal

        public void afterUnmarshal(Object target,
                           Object parent)

        Callback method invoked after unmarshalling XML data into target.

        This method is invoked after all the properties (except IDREF) are unmarshalled into target, but before target is set into its parent object. Note that if the class of target defines its own afterUnmarshal method, the class specific callback method is invoked before this method is invoked.

        Parameters:
        target - non-null instance of JAXB mapped class prior to unmarshalling into it.
        parent - instance of JAXB mapped class that will reference target. null when target is root element.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnmarshallerHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface UnmarshallerHandler

  • All Superinterfaces:
    ContentHandler

    public interface UnmarshallerHandler
extends ContentHandler
    Unmarshaller implemented as SAX ContentHandler.

    Applications can use this interface to use their JAXB provider as a component in an XML pipeline. For example:

           JAXBContext context = JAXBContext.newInstance( "org.acme.foo" );

       Unmarshaller unmarshaller = context.createUnmarshaller();

       UnmarshallerHandler unmarshallerHandler = unmarshaller.getUnmarshallerHandler();

       SAXParserFactory spf = SAXParserFactory.newInstance();
       spf.setNamespaceAware( true );

       XMLReader xmlReader = spf.newSAXParser().getXMLReader();
       xmlReader.setContentHandler( unmarshallerHandler );
       xmlReader.parse(new InputSource( new FileInputStream( XML_FILE ) ) );

       MyObject myObject= (MyObject)unmarshallerHandler.getResult();

    This interface is reusable: even if the user fails to unmarshal an object, s/he can still start a new round of unmarshalling.

    Since:
    JAXB1.0
    See Also:
    Unmarshaller.getUnmarshallerHandler()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object getResult()
      Obtains the unmarshalled result.

      • Methods inherited from interface org.xml.sax.ContentHandler

        characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

    • Method Detail

      • getResult

        Object getResult()
          throws JAXBException,
                 IllegalStateException
        Obtains the unmarshalled result. This method can be called only after this handler receives the endDocument SAX event.
        Returns:
        always return a non-null valid object which was unmarshalled.
        Throws:
        IllegalStateException - if this method is called before this handler receives the endDocument event.
        JAXBException - if there is any unmarshalling error. Note that the implementation is allowed to throw SAXException during the parsing when it finds an error.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.bind.util

Useful client utility classes.

See: Description

  • Class Summary
    Class Description
    JAXBResult
    JAXP Result implementation that unmarshals a JAXB object.
    JAXBSource
    JAXP Source implementation that marshals a JAXB-generated object.
    ValidationEventCollector
    ValidationEventHandler implementation that collects all events.

Package javax.xml.bind.util Description

Useful client utility classes.

Package Specification

  • JAXB Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • The JAXB Website
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.bind.util Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.bind.util

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.sax.SAXResult (implements javax.xml.transform.Result)
      • javax.xml.bind.util.JAXBResult
    • javax.xml.transform.sax.SAXSource (implements javax.xml.transform.Source)
      • javax.xml.bind.util.JAXBSource
    • javax.xml.bind.util.ValidationEventCollector (implements javax.xml.bind.ValidationEventHandler)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.bind.util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.bind.util

No usage of javax.xml.bind.util
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.util.JAXBResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.util.JAXBResult

No usage of javax.xml.bind.util.JAXBResult
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.util.JAXBSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.util.JAXBSource

No usage of javax.xml.bind.util.JAXBSource
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.bind.util.ValidationEventCollector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.bind.util.ValidationEventCollector

No usage of javax.xml.bind.util.ValidationEventCollector
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.util

Class JAXBResult

  • java.lang.Object
    • javax.xml.transform.sax.SAXResult
      • javax.xml.bind.util.JAXBResult
  • All Implemented Interfaces:
    Result

    public class JAXBResult
extends SAXResult
    JAXP Result implementation that unmarshals a JAXB object.

    This utility class is useful to combine JAXB with other Java/XML technologies.

    The following example shows how to use JAXB to unmarshal a document resulting from an XSLT transformation.

           JAXBResult result = new JAXBResult(
         JAXBContext.newInstance("org.acme.foo") );

       // set up XSLT transformation
       TransformerFactory tf = TransformerFactory.newInstance();
       Transformer t = tf.newTransformer(new StreamSource("test.xsl"));

       // run transformation
       t.transform(new StreamSource("document.xml"),result);

       // obtain the unmarshalled content tree
       Object o = result.getResult();

    The fact that JAXBResult derives from SAXResult is an implementation detail. Thus in general applications are strongly discouraged from accessing methods defined on SAXResult.

    In particular it shall never attempt to call the setHandler, setLexicalHandler, and setSystemId methods.

    • Field Summary

      • Fields inherited from class javax.xml.transform.sax.SAXResult

        FEATURE

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBResult(JAXBContext context)
      Creates a new instance that uses the specified JAXBContext to unmarshal.
      JAXBResult(Unmarshaller _unmarshaller)
      Creates a new instance that uses the specified Unmarshaller to unmarshal an object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Object getResult()
      Gets the unmarshalled object created by the transformation.

      • Methods inherited from class javax.xml.transform.sax.SAXResult

        getHandler, getLexicalHandler, getSystemId, setHandler, setLexicalHandler, setSystemId

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • JAXBResult

        public JAXBResult(JAXBContext context)
           throws JAXBException
        Creates a new instance that uses the specified JAXBContext to unmarshal.
        Parameters:
        context - The JAXBContext that will be used to create the necessary Unmarshaller. This parameter must not be null.
        Throws:
        JAXBException - if an error is encountered while creating the JAXBResult or if the context parameter is null.

      • JAXBResult

        public JAXBResult(Unmarshaller _unmarshaller)
           throws JAXBException
        Creates a new instance that uses the specified Unmarshaller to unmarshal an object.

        This JAXBResult object will use the specified Unmarshaller instance. It is the caller's responsibility not to use the same Unmarshaller for other purposes while it is being used by this object.

        The primary purpose of this method is to allow the client to configure Unmarshaller. Unless you know what you are doing, it's easier and safer to pass a JAXBContext.

        Parameters:
        _unmarshaller - the unmarshaller. This parameter must not be null.
        Throws:
        JAXBException - if an error is encountered while creating the JAXBResult or the Unmarshaller parameter is null.

    • Method Detail

      • getResult

        public Object getResult()
                 throws JAXBException
        Gets the unmarshalled object created by the transformation.
        Returns:
        Always return a non-null object.
        Throws:
        IllegalStateException - if this method is called before an object is unmarshalled.
        JAXBException - if there is any unmarshalling error. Note that the implementation is allowed to throw SAXException during the parsing when it finds an error.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


JAXBSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.util

Class JAXBSource

  • java.lang.Object
    • javax.xml.transform.sax.SAXSource
      • javax.xml.bind.util.JAXBSource
  • All Implemented Interfaces:
    Source

    public class JAXBSource
extends SAXSource
    JAXP Source implementation that marshals a JAXB-generated object.

    This utility class is useful to combine JAXB with other Java/XML technologies.

    The following example shows how to use JAXB to marshal a document for transformation by XSLT.

           MyObject o = // get JAXB content tree

       // jaxbContext is a JAXBContext object from which 'o' is created.
       JAXBSource source = new JAXBSource( jaxbContext, o );

       // set up XSLT transformation
       TransformerFactory tf = TransformerFactory.newInstance();
       Transformer t = tf.newTransformer(new StreamSource("test.xsl"));

       // run transformation
       t.transform(source,new StreamResult(System.out));

    The fact that JAXBSource derives from SAXSource is an implementation detail. Thus in general applications are strongly discouraged from accessing methods defined on SAXSource. In particular, the setXMLReader and setInputSource methods shall never be called. The XMLReader object obtained by the getXMLReader method shall be used only for parsing the InputSource object returned by the getInputSource method.

    Similarly the InputSource object obtained by the getInputSource method shall be used only for being parsed by the XMLReader object returned by the getXMLReader.

    • Field Summary

      • Fields inherited from class javax.xml.transform.sax.SAXSource

        FEATURE

    • Constructor Summary

      Constructors
      Constructor and Description
      JAXBSource(JAXBContext context, Object contentObject)
      Creates a new Source for the given content object.
      JAXBSource(Marshaller marshaller, Object contentObject)
      Creates a new Source for the given content object.

    • Method Summary

      • Methods inherited from class javax.xml.transform.sax.SAXSource

        getInputSource, getSystemId, getXMLReader, setInputSource, setSystemId, setXMLReader, sourceToInputSource

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • JAXBSource

        public JAXBSource(JAXBContext context,
                  Object contentObject)
           throws JAXBException
        Creates a new Source for the given content object.
        Parameters:
        context - JAXBContext that was used to create contentObject. This context is used to create a new instance of marshaller and must not be null.
        contentObject - An instance of a JAXB-generated class, which will be used as a Source (by marshalling it into XML). It must not be null.
        Throws:
        JAXBException - if an error is encountered while creating the JAXBSource or if either of the parameters are null.

      • JAXBSource

        public JAXBSource(Marshaller marshaller,
                  Object contentObject)
           throws JAXBException
        Creates a new Source for the given content object.
        Parameters:
        marshaller - A marshaller instance that will be used to marshal contentObject into XML. This must be created from a JAXBContext that was used to build contentObject and must not be null.
        contentObject - An instance of a JAXB-generated class, which will be used as a Source (by marshalling it into XML). It must not be null.
        Throws:
        JAXBException - if an error is encountered while creating the JAXBSource or if either of the parameters are null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEventCollector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind.util

Class ValidationEventCollector

  • java.lang.Object
    • javax.xml.bind.util.ValidationEventCollector
  • All Implemented Interfaces:
    ValidationEventHandler

    public class ValidationEventCollector
extends Object
implements ValidationEventHandler
    ValidationEventHandler implementation that collects all events.

    To use this class, create a new instance and pass it to the setEventHandler method of the Validator, Unmarshaller, Marshaller class. After the call to validate or unmarshal completes, call the getEvents method to retrieve all the reported errors and warnings.

    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

    • Constructor Summary

      Constructors
      Constructor and Description
      ValidationEventCollector()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      ValidationEvent[] getEvents()
      Return an array of ValidationEvent objects containing a copy of each of the collected errors and warnings.
      boolean handleEvent(ValidationEvent event)
      Receive notification of a validation warning or error.
      boolean hasEvents()
      Returns true if this event collector contains at least one ValidationEvent.
      void reset()
      Clear all collected errors and warnings.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ValidationEventCollector

        public ValidationEventCollector()

    • Method Detail

      • getEvents

        public ValidationEvent[] getEvents()
        Return an array of ValidationEvent objects containing a copy of each of the collected errors and warnings.
        Returns:
        a copy of all the collected errors and warnings or an empty array if there weren't any

      • reset

        public void reset()
        Clear all collected errors and warnings.

      • hasEvents

        public boolean hasEvents()
        Returns true if this event collector contains at least one ValidationEvent.
        Returns:
        true if this event collector contains at least one ValidationEvent, false otherwise

      • handleEvent

        public boolean handleEvent(ValidationEvent event)
        Description copied from interface: ValidationEventHandler
        Receive notification of a validation warning or error. The ValidationEvent will have a ValidationEventLocator embedded in it that indicates where the error or warning occurred.

        If an unchecked runtime exception is thrown from this method, the JAXB provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.

        Specified by:
        handleEvent in interface ValidationEventHandler
        Parameters:
        event - the encapsulated validation event information. It is a provider error if this parameter is null.
        Returns:
        true if the JAXB Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface ValidationEvent

  • All Known Subinterfaces:
    NotIdentifiableEvent, ParseConversionEvent, PrintConversionEvent
    All Known Implementing Classes:
    NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl, ValidationEventImpl

    public interface ValidationEvent
    This event indicates that a problem was encountered while validating the incoming XML data during an unmarshal operation, while performing on-demand validation of the Java content tree, or while marshalling the Java content tree back to XML data.
    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEventHandler

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int ERROR
      Conditions that correspond to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation
      static int FATAL_ERROR
      Conditions that correspond to the definition of "fatal error" in section 1.2 of the W3C XML 1.0 Recommendation
      static int WARNING
      Conditions that are not errors or fatal errors as defined by the XML 1.0 recommendation

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Throwable getLinkedException()
      Retrieve the linked exception for this warning/error.
      ValidationEventLocator getLocator()
      Retrieve the locator for this warning/error.
      String getMessage()
      Retrieve the text message for this warning/error.
      int getSeverity()
      Retrieve the severity code for this warning/error.

    • Field Detail

      • WARNING

        static final int WARNING
        Conditions that are not errors or fatal errors as defined by the XML 1.0 recommendation
        See Also:
        Constant Field Values

      • ERROR

        static final int ERROR
        Conditions that correspond to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation
        See Also:
        Constant Field Values

      • FATAL_ERROR

        static final int FATAL_ERROR
        Conditions that correspond to the definition of "fatal error" in section 1.2 of the W3C XML 1.0 Recommendation
        See Also:
        Constant Field Values

    • Method Detail

      • getSeverity

        int getSeverity()
        Retrieve the severity code for this warning/error.

        Must be one of ValidationError.WARNING, ValidationError.ERROR, or ValidationError.FATAL_ERROR.

        Returns:
        the severity code for this warning/error

      • getMessage

        String getMessage()
        Retrieve the text message for this warning/error.
        Returns:
        the text message for this warning/error or null if one wasn't set

      • getLinkedException

        Throwable getLinkedException()
        Retrieve the linked exception for this warning/error.
        Returns:
        the linked exception for this warning/error or null if one wasn't set

      • getLocator

        ValidationEventLocator getLocator()
        Retrieve the locator for this warning/error.
        Returns:
        the locator that indicates where the warning/error occurred
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEventHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface ValidationEventHandler

  • All Known Implementing Classes:
    DefaultValidationEventHandler, ValidationEventCollector

    public interface ValidationEventHandler
    A basic event handler interface for validation errors.

    If an application needs to implement customized event handling, it must implement this interface and then register it with either the Unmarshaller, the Validator, or the Marshaller. The JAXB Provider will then report validation errors and warnings encountered during the unmarshal, marshal, and validate operations to these event handlers.

    If the handleEvent method throws an unchecked runtime exception, the JAXB Provider must treat that as if the method returned false, effectively terminating whatever operation was in progress at the time (unmarshal, validate, or marshal).

    Modifying the Java content tree within your event handler is undefined by the specification and may result in unexpected behaviour.

    Failing to return false from the handleEvent method after encountering a fatal error is undefined by the specification and may result in unexpected behavior.

    Default Event Handler

    See: Validator javadocs
    Since:
    JAXB1.0
    See Also:
    Unmarshaller, Validator, Marshaller, ValidationEvent, ValidationEventCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean handleEvent(ValidationEvent event)
      Receive notification of a validation warning or error.

    • Method Detail

      • handleEvent

        boolean handleEvent(ValidationEvent event)
        Receive notification of a validation warning or error. The ValidationEvent will have a ValidationEventLocator embedded in it that indicates where the error or warning occurred.

        If an unchecked runtime exception is thrown from this method, the JAXB provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.

        Parameters:
        event - the encapsulated validation event information. It is a provider error if this parameter is null.
        Returns:
        true if the JAXB Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.
        Throws:
        IllegalArgumentException - if the event object is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationEventLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface ValidationEventLocator

  • All Known Implementing Classes:
    ValidationEventLocatorImpl

    public interface ValidationEventLocator
    Encapsulate the location of a ValidationEvent.

    The ValidationEventLocator indicates where the ValidationEvent occurred. Different fields will be set depending on the type of validation that was being performed when the error or warning was detected. For example, on-demand validation would produce locators that contained references to objects in the Java content tree while unmarshal-time validation would produce locators containing information appropriate to the source of the XML data (file, url, Node, etc).

    Since:
    JAXB1.0
    See Also:
    Validator, ValidationEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      Return the column number if available
      int getLineNumber()
      Return the line number if available
      Node getNode()
      Return a reference to the DOM Node if available
      Object getObject()
      Return a reference to the object in the Java content tree if available
      int getOffset()
      Return the byte offset if available
      URL getURL()
      Return the name of the XML source as a URL if available

    • Method Detail

      • getURL

        URL getURL()
        Return the name of the XML source as a URL if available
        Returns:
        the name of the XML source as a URL or null if unavailable

      • getOffset

        int getOffset()
        Return the byte offset if available
        Returns:
        the byte offset into the input source or -1 if unavailable

      • getLineNumber

        int getLineNumber()
        Return the line number if available
        Returns:
        the line number or -1 if unavailable

      • getColumnNumber

        int getColumnNumber()
        Return the column number if available
        Returns:
        the column number or -1 if unavailable

      • getObject

        Object getObject()
        Return a reference to the object in the Java content tree if available
        Returns:
        a reference to the object in the Java content tree or null if unavailable

      • getNode

        Node getNode()
        Return a reference to the DOM Node if available
        Returns:
        a reference to the DOM Node or null if unavailable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Class ValidationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.bind.JAXBException
          • javax.xml.bind.ValidationException
  • All Implemented Interfaces:
    Serializable

    public class ValidationException
extends JAXBException
    This exception indicates that an error has occurred while performing a validate operation.

    The ValidationEventHandler can cause this exception to be thrown during the validate operations. See ValidationEventHandler.handleEvent(ValidationEvent).

    Since:
    JAXB1.0
    See Also:
    JAXBException, Validator, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ValidationException(String message)
      Construct an ValidationException with the specified detail message.
      ValidationException(String message, String errorCode)
      Construct an ValidationException with the specified detail message and vendor specific errorCode.
      ValidationException(String message, String errorCode, Throwable exception)
      Construct an ValidationException with the specified detail message, vendor specific errorCode, and linkedException.
      ValidationException(String message, Throwable exception)
      Construct an ValidationException with the specified detail message and linkedException.
      ValidationException(Throwable exception)
      Construct an ValidationException with a linkedException.

    • Method Summary

      • Methods inherited from class javax.xml.bind.JAXBException

        getCause, getErrorCode, getLinkedException, printStackTrace, printStackTrace, printStackTrace, setLinkedException, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ValidationException

        public ValidationException(String message)
        Construct an ValidationException with the specified detail message. The errorCode and linkedException will default to null.
        Parameters:
        message - a description of the exception

      • ValidationException

        public ValidationException(String message,
                           String errorCode)
        Construct an ValidationException with the specified detail message and vendor specific errorCode. The linkedException will default to null.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code

      • ValidationException

        public ValidationException(Throwable exception)
        Construct an ValidationException with a linkedException. The detail message and vendor specific errorCode will default to null.
        Parameters:
        exception - the linked exception

      • ValidationException

        public ValidationException(String message,
                           Throwable exception)
        Construct an ValidationException with the specified detail message and linkedException. The errorCode will default to null.
        Parameters:
        message - a description of the exception
        exception - the linked exception

      • ValidationException

        public ValidationException(String message,
                           String errorCode,
                           Throwable exception)
        Construct an ValidationException with the specified detail message, vendor specific errorCode, and linkedException.
        Parameters:
        message - a description of the exception
        errorCode - a string specifying the vendor specific error code
        exception - the linked exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Validator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.bind

Interface Validator

  • Deprecated.
    since JAXB 2.0

    public interface Validator
    As of JAXB 2.0, this class is deprecated and optional.

    The Validator class is responsible for controlling the validation of content trees during runtime.

    Three Forms of Validation

    Unmarshal-Time Validation
    This form of validation enables a client application to receive information about validation errors and warnings detected while unmarshalling XML data into a Java content tree and is completely orthogonal to the other types of validation. To enable or disable it, see the javadoc for Unmarshaller.setValidating. All JAXB 1.0 Providers are required to support this operation.
    On-Demand Validation
    This form of validation enables a client application to receive information about validation errors and warnings detected in the Java content tree. At any point, client applications can call the Validator.validate method on the Java content tree (or any sub-tree of it). All JAXB 1.0 Providers are required to support this operation.
    Fail-Fast Validation
    This form of validation enables a client application to receive immediate feedback about modifications to the Java content tree that violate type constraints on Java Properties as defined in the specification. JAXB Providers are not required support this type of validation. Of the JAXB Providers that do support this type of validation, some may require you to decide at schema compile time whether or not a client application will be allowed to request fail-fast validation at runtime.

    The Validator class is responsible for managing On-Demand Validation. The Unmarshaller class is responsible for managing Unmarshal-Time Validation during the unmarshal operations. Although there is no formal method of enabling validation during the marshal operations, the Marshaller may detect errors, which will be reported to the ValidationEventHandler registered on it.

    Using the Default EventHandler

    If the client application does not set an event handler on their Validator, Unmarshaller, or Marshaller prior to calling the validate, unmarshal, or marshal methods, then a default event handler will receive notification of any errors or warnings encountered. The default event handler will cause the current operation to halt after encountering the first error or fatal error (but will attempt to continue after receiving warnings).

    Handling Validation Events

    There are three ways to handle events encountered during the unmarshal, validate, and marshal operations:
    Use the default event handler
    The default event handler will be used if you do not specify one via the setEventHandler API's on Validator, Unmarshaller, or Marshaller.
    Implement and register a custom event handler
    Client applications that require sophisticated event processing can implement the ValidationEventHandler interface and register it with the Unmarshaller and/or Validator.
    Use the ValidationEventCollector utility
    For convenience, a specialized event handler is provided that simply collects any ValidationEvent objects created during the unmarshal, validate, and marshal operations and returns them to the client application as a java.util.Collection.

    Validation and Well-Formedness

    Validation events are handled differently depending on how the client application is configured to process them as described in the previous section. However, there are certain cases where a JAXB Provider indicates that it is no longer able to reliably detect and report errors. In these cases, the JAXB Provider will set the severity of the ValidationEvent to FATAL_ERROR to indicate that the unmarshal, validate, or marshal operations should be terminated. The default event handler and ValidationEventCollector utility class must terminate processing after being notified of a fatal error. Client applications that supply their own ValidationEventHandler should also terminate processing after being notified of a fatal error. If not, unexpected behaviour may occur.

    Supported Properties

    There currently are not any properties required to be supported by all JAXB Providers on Validator. However, some providers may support their own set of provider specific properties.

    Since:
    JAXB1.0
    See Also:
    JAXBContext, Unmarshaller, ValidationEventHandler, ValidationEvent, ValidationEventCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      ValidationEventHandler getEventHandler()
      Deprecated.
      since JAXB2.0
      Object getProperty(String name)
      Deprecated.
      since JAXB2.0
      void setEventHandler(ValidationEventHandler handler)
      Deprecated.
      since JAXB2.0
      void setProperty(String name, Object value)
      Deprecated.
      since JAXB2.0
      boolean validate(Object subrootObj)
      Deprecated.
      since JAXB2.0
      boolean validateRoot(Object rootObj)
      Deprecated.
      since JAXB2.0

    • Method Detail

      • setEventHandler

        void setEventHandler(ValidationEventHandler handler)
              throws JAXBException
        Deprecated. since JAXB2.0
        Allow an application to register a validation event handler.

        The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to validate. If the client application does not register a validation event handler before invoking the validate method, then validation events will be handled by the default event handler which will terminate the validate operation after the first error or fatal error is encountered.

        Calling this method with a null parameter will cause the Validator to revert back to the default default event handler.

        Parameters:
        handler - the validation event handler
        Throws:
        JAXBException - if an error was encountered while setting the event handler

      • getEventHandler

        ValidationEventHandler getEventHandler()
                                throws JAXBException
        Deprecated. since JAXB2.0
        Return the current event handler or the default event handler if one hasn't been set.
        Returns:
        the current ValidationEventHandler or the default event handler if it hasn't been set
        Throws:
        JAXBException - if an error was encountered while getting the current event handler

      • validate

        boolean validate(Object subrootObj)
          throws JAXBException
        Deprecated. since JAXB2.0
        Validate the Java content tree starting at subrootObj.

        Client applications can use this method to validate Java content trees on-demand at runtime. This method can be used to validate any arbitrary subtree of the Java content tree. Global constraint checking will not be performed as part of this operation (i.e. ID/IDREF constraints).

        Parameters:
        subrootObj - the obj to begin validation at
        Returns:
        true if the subtree rooted at subrootObj is valid, false otherwise
        Throws:
        JAXBException - if any unexpected problem occurs during validation
        ValidationException - If the ValidationEventHandler returns false from its handleEvent method or the Validator is unable to validate the content tree rooted at subrootObj
        IllegalArgumentException - If the subrootObj parameter is null

      • validateRoot

        boolean validateRoot(Object rootObj)
              throws JAXBException
        Deprecated. since JAXB2.0
        Validate the Java content tree rooted at rootObj.

        Client applications can use this method to validate Java content trees on-demand at runtime. This method is used to validate an entire Java content tree. Global constraint checking will be performed as part of this operation (i.e. ID/IDREF constraints).

        Parameters:
        rootObj - the root obj to begin validation at
        Returns:
        true if the tree rooted at rootObj is valid, false otherwise
        Throws:
        JAXBException - if any unexpected problem occurs during validation
        ValidationException - If the ValidationEventHandler returns false from its handleEvent method or the Validator is unable to validate the content tree rooted at rootObj
        IllegalArgumentException - If the rootObj parameter is null

      • setProperty

        void setProperty(String name,
                 Object value)
          throws PropertyException
        Deprecated. since JAXB2.0
        Set the particular property in the underlying implementation of Validator. This method can only be used to set one of the standard JAXB defined properties above or a provider specific property. Attempting to set an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.
        value - the value of the property to be set
        Throws:
        PropertyException - when there is an error processing the given property or value
        IllegalArgumentException - If the name parameter is null

      • getProperty

        Object getProperty(String name)
            throws PropertyException
        Deprecated. since JAXB2.0
        Get the particular property in the underlying implementation of Validator. This method can only be used to get one of the standard JAXB defined properties above or a provider specific property. Attempting to get an undefined property will result in a PropertyException being thrown. See Supported Properties.
        Parameters:
        name - the name of the property to retrieve
        Returns:
        the value of the requested property
        Throws:
        PropertyException - when there is an error retrieving the given property or value property name
        IllegalArgumentException - If the name parameter is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.XMLConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.XMLConstants

No usage of javax.xml.XMLConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


crypto

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto

Common classes for XML cryptography.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmMethod
    An abstract representation of an algorithm defined in the XML Security specifications.
    Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms.
    KeySelectorResult
    The result returned by the KeySelector.select method.
    NodeSetData
    An abstract representation of a Data type containing a node-set.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
    XMLStructure
    A representation of an XML structure from any namespace.
  • Class Summary
    Class Description
    KeySelector
    A selector that finds and returns a key using the data contained in a KeyInfo object.
    KeySelector.Purpose
    The purpose of the key that is to be selected.
    OctetStreamData
    A representation of a Data type containing an octet stream.
  • Exception Summary
    Exception Description
    KeySelectorException
    Indicates an exceptional condition thrown by a KeySelector.
    MarshalException
    Indicates an exceptional condition that occurred during the XML marshalling or unmarshalling process.
    NoSuchMechanismException
    This exception is thrown when a particular XML mechanism is requested but is not available in the environment.
    URIReferenceException
    Indicates an exceptional condition thrown while dereferencing a URIReference.

Package javax.xml.crypto Description

Common classes for XML cryptography. This package includes common classes that are used to perform XML cryptographic operations, such as generating an XML signature or encrypting XML data.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Data

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface Data

  • All Known Subinterfaces:
    NodeSetData
    All Known Implementing Classes:
    OctetStreamData

    public interface Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms. The primary purpose of this interface is to group and provide type safety for all Data subtypes.
    Since:
    1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.crypto.KeySelector
    • javax.xml.crypto.KeySelector.Purpose
    • javax.xml.crypto.OctetStreamData (implements javax.xml.crypto.Data)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.crypto.KeySelectorException
        • javax.xml.crypto.MarshalException
        • java.lang.RuntimeException
          • javax.xml.crypto.NoSuchMechanismException
        • javax.xml.crypto.URIReferenceException

Interface Hierarchy

  • javax.xml.crypto.AlgorithmMethod
  • javax.xml.crypto.Data
    • javax.xml.crypto.NodeSetData
  • javax.xml.crypto.KeySelectorResult
  • javax.xml.crypto.URIDereferencer
  • javax.xml.crypto.URIReference
  • javax.xml.crypto.XMLCryptoContext
  • javax.xml.crypto.XMLStructure
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto

  • Packages that use javax.xml.crypto
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.
  • Classes in javax.xml.crypto used by javax.xml.crypto
    Class and Description
    AlgorithmMethod
    An abstract representation of an algorithm defined in the XML Security specifications.
    Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms.
    KeySelector
    A selector that finds and returns a key using the data contained in a KeyInfo object.
    KeySelector.Purpose
    The purpose of the key that is to be selected.
    KeySelectorException
    Indicates an exceptional condition thrown by a KeySelector.
    KeySelectorResult
    The result returned by the KeySelector.select method.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    URIReferenceException
    Indicates an exceptional condition thrown while dereferencing a URIReference.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
  • Classes in javax.xml.crypto used by javax.xml.crypto.dom
    Class and Description
    KeySelector
    A selector that finds and returns a key using the data contained in a KeyInfo object.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
    XMLStructure
    A representation of an XML structure from any namespace.
  • Classes in javax.xml.crypto used by javax.xml.crypto.dsig
    Class and Description
    AlgorithmMethod
    An abstract representation of an algorithm defined in the XML Security specifications.
    Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms.
    KeySelectorResult
    The result returned by the KeySelector.select method.
    MarshalException
    Indicates an exceptional condition that occurred during the XML marshalling or unmarshalling process.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
    XMLStructure
    A representation of an XML structure from any namespace.
  • Classes in javax.xml.crypto used by javax.xml.crypto.dsig.dom
    Class and Description
    KeySelector
    A selector that finds and returns a key using the data contained in a KeyInfo object.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
  • Classes in javax.xml.crypto used by javax.xml.crypto.dsig.keyinfo
    Class and Description
    Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms.
    MarshalException
    Indicates an exceptional condition that occurred during the XML marshalling or unmarshalling process.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    URIReferenceException
    Indicates an exceptional condition thrown while dereferencing a URIReference.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
    XMLStructure
    A representation of an XML structure from any namespace.
  • Classes in javax.xml.crypto used by javax.xml.crypto.dsig.spec
    Class and Description
    XMLStructure
    A representation of an XML structure from any namespace.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AlgorithmMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface AlgorithmMethod

  • All Known Subinterfaces:
    CanonicalizationMethod, DigestMethod, SignatureMethod, Transform
    All Known Implementing Classes:
    TransformService

    public interface AlgorithmMethod
    An abstract representation of an algorithm defined in the XML Security specifications. Subclasses represent specific types of XML security algorithms, such as a Transform.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getAlgorithm()
      Returns the algorithm URI of this AlgorithmMethod.
      AlgorithmParameterSpec getParameterSpec()
      Returns the algorithm parameters of this AlgorithmMethod.

    • Method Detail

      • getAlgorithm

        String getAlgorithm()
        Returns the algorithm URI of this AlgorithmMethod.
        Returns:
        the algorithm URI of this AlgorithmMethod

      • getParameterSpec

        AlgorithmParameterSpec getParameterSpec()
        Returns the algorithm parameters of this AlgorithmMethod.
        Returns:
        the algorithm parameters of this AlgorithmMethod. Returns null if this AlgorithmMethod does not require parameters and they are not specified.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.KeySelector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.KeySelector

  • Packages that use KeySelector
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.

    • Uses of KeySelector in javax.xml.crypto

      Methods in javax.xml.crypto that return KeySelector
      Modifier and Type Method and Description
      KeySelector XMLCryptoContext.getKeySelector()
      Returns the key selector for finding a key.
      static KeySelector KeySelector.singletonKeySelector(Key key)
      Returns a KeySelector that always selects the specified key, regardless of the KeyInfo passed to it.
      Methods in javax.xml.crypto with parameters of type KeySelector
      Modifier and Type Method and Description
      void XMLCryptoContext.setKeySelector(KeySelector ks)
      Sets the key selector for finding a key.

    • Uses of KeySelector in javax.xml.crypto.dom

      Methods in javax.xml.crypto.dom that return KeySelector
      Modifier and Type | Method and Description
      KeySelector | DOMCryptoContext.getKeySelector()
      Methods in javax.xml.crypto.dom with parameters of type KeySelector
      Modifier and Type | Method and Description
      void | DOMCryptoContext.setKeySelector(KeySelector ks)

    • Uses of KeySelector in javax.xml.crypto.dsig.dom

      Constructors in javax.xml.crypto.dsig.dom with parameters of type KeySelector
      Constructor and Description
      DOMSignContext(KeySelector ks, Node parent)
      Creates a DOMSignContext with the specified key selector and parent node.
      DOMSignContext(KeySelector ks, Node parent, Node nextSibling)
      Creates a DOMSignContext with the specified key selector, parent and next sibling nodes.
      DOMValidateContext(KeySelector ks, Node node)
      Creates a DOMValidateContext containing the specified key selector and node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.KeySelector.Purpose

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.KeySelector.Purpose

  • Packages that use KeySelector.Purpose
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.

    • Uses of KeySelector.Purpose in javax.xml.crypto

      Fields in javax.xml.crypto declared as KeySelector.Purpose
      Modifier and Type Field and Description
      static KeySelector.Purpose KeySelector.Purpose.DECRYPT
      A key for decrypting.
      static KeySelector.Purpose KeySelector.Purpose.ENCRYPT
      A key for encrypting.
      static KeySelector.Purpose KeySelector.Purpose.SIGN
      A key for signing.
      static KeySelector.Purpose KeySelector.Purpose.VERIFY
      A key for verifying.
      Methods in javax.xml.crypto with parameters of type KeySelector.Purpose
      Modifier and Type Method and Description
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.KeySelectorException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.KeySelectorException

  • Packages that use KeySelectorException
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.

    • Uses of KeySelectorException in javax.xml.crypto

      Methods in javax.xml.crypto that throw KeySelectorException
      Modifier and Type Method and Description
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.MarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.MarshalException

  • Packages that use MarshalException
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of MarshalException in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that throw MarshalException
      Modifier and Type Method and Description
      abstract void TransformService.marshalParams(XMLStructure parent, XMLCryptoContext context)
      Marshals the algorithm-specific parameters.
      void XMLSignature.sign(XMLSignContext signContext)
      Signs this XMLSignature.
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLStructure xmlStructure)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance.
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext context)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.

    • Uses of MarshalException in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that throw MarshalException
      Modifier and Type Method and Description
      void KeyInfo.marshal(XMLStructure parent, XMLCryptoContext context)
      Marshals the key info to XML.
      abstract KeyInfo KeyInfoFactory.unmarshalKeyInfo(XMLStructure xmlStructure)
      Unmarshals a new KeyInfo instance from a mechanism-specific XMLStructure (ex: DOMStructure) instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.NoSuchMechanismException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.NoSuchMechanismException

No usage of javax.xml.crypto.NoSuchMechanismException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.OctetStreamData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.OctetStreamData

No usage of javax.xml.crypto.OctetStreamData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.URIReferenceException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.URIReferenceException

  • Packages that use URIReferenceException
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of URIReferenceException in javax.xml.crypto

      Methods in javax.xml.crypto that throw URIReferenceException
      Modifier and Type Method and Description
      Data URIDereferencer.dereference(URIReference uriReference, XMLCryptoContext context)
      Dereferences the specified URIReference and returns the dereferenced data.

    • Uses of URIReferenceException in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that throw URIReferenceException
      Modifier and Type Method and Description
      Data RetrievalMethod.dereference(XMLCryptoContext context)
      Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.AlgorithmMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.AlgorithmMethod

  • Packages that use AlgorithmMethod
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of AlgorithmMethod in javax.xml.crypto

      Methods in javax.xml.crypto with parameters of type AlgorithmMethod
      Modifier and Type Method and Description
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.

    • Uses of AlgorithmMethod in javax.xml.crypto.dsig

      Subinterfaces of AlgorithmMethod in javax.xml.crypto.dsig
      Modifier and Type Interface and Description
      interface  CanonicalizationMethod
      A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  DigestMethod
      A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  SignatureMethod
      A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  Transform
      A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      Classes in javax.xml.crypto.dsig that implement AlgorithmMethod
      Modifier and Type Class and Description
      class  TransformService
      A Service Provider Interface for transform and canonicalization algorithms.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.Data

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.Data

  • Packages that use Data
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of Data in javax.xml.crypto

      Subinterfaces of Data in javax.xml.crypto
      Modifier and Type Interface and Description
      interface  NodeSetData
      An abstract representation of a Data type containing a node-set.
      Classes in javax.xml.crypto that implement Data
      Modifier and Type Class and Description
      class  OctetStreamData
      A representation of a Data type containing an octet stream.
      Methods in javax.xml.crypto that return Data
      Modifier and Type Method and Description
      Data URIDereferencer.dereference(URIReference uriReference, XMLCryptoContext context)
      Dereferences the specified URIReference and returns the dereferenced data.

    • Uses of Data in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return Data
      Modifier and Type Method and Description
      Data Reference.getDereferencedData()
      Returns the dereferenced data, if reference caching is enabled.
      Data Transform.transform(Data data, XMLCryptoContext context)
      Transforms the specified data using the underlying transform algorithm.
      Data Transform.transform(Data data, XMLCryptoContext context, OutputStream os)
      Transforms the specified data using the underlying transform algorithm.
      Methods in javax.xml.crypto.dsig with parameters of type Data
      Modifier and Type Method and Description
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      Data Transform.transform(Data data, XMLCryptoContext context)
      Transforms the specified data using the underlying transform algorithm.
      Data Transform.transform(Data data, XMLCryptoContext context, OutputStream os)
      Transforms the specified data using the underlying transform algorithm.

    • Uses of Data in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return Data
      Modifier and Type Method and Description
      Data RetrievalMethod.dereference(XMLCryptoContext context)
      Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.KeySelectorResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.KeySelectorResult

  • Packages that use KeySelectorResult
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of KeySelectorResult in javax.xml.crypto

      Methods in javax.xml.crypto that return KeySelectorResult
      Modifier and Type Method and Description
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.

    • Uses of KeySelectorResult in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return KeySelectorResult
      Modifier and Type Method and Description
      KeySelectorResult XMLSignature.getKeySelectorResult()
      Returns the result of the KeySelector, if specified, after this XMLSignature has been signed or validated.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.NodeSetData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.NodeSetData

No usage of javax.xml.crypto.NodeSetData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.URIDereferencer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.URIDereferencer

  • Packages that use URIDereferencer
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of URIDereferencer in javax.xml.crypto

      Methods in javax.xml.crypto that return URIDereferencer
      Modifier and Type Method and Description
      URIDereferencer XMLCryptoContext.getURIDereferencer()
      Returns a URIDereferencer that is used to dereference URIReferences.
      Methods in javax.xml.crypto with parameters of type URIDereferencer
      Modifier and Type Method and Description
      void XMLCryptoContext.setURIDereferencer(URIDereferencer dereferencer)
      Sets a URIDereferencer that is used to dereference URIReferences.

    • Uses of URIDereferencer in javax.xml.crypto.dom

      Methods in javax.xml.crypto.dom that return URIDereferencer
      Modifier and Type | Method and Description
      URIDereferencer | DOMCryptoContext.getURIDereferencer()
      Methods in javax.xml.crypto.dom with parameters of type URIDereferencer
      Modifier and Type | Method and Description
      void | DOMCryptoContext.setURIDereferencer(URIDereferencer dereferencer)

    • Uses of URIDereferencer in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return URIDereferencer
      Modifier and Type Method and Description
      abstract URIDereferencer XMLSignatureFactory.getURIDereferencer()
      Returns a reference to the URIDereferencer that is used by default to dereference URIs in Reference objects.

    • Uses of URIDereferencer in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return URIDereferencer
      Modifier and Type Method and Description
      abstract URIDereferencer KeyInfoFactory.getURIDereferencer()
      Returns a reference to the URIDereferencer that is used by default to dereference URIs in RetrievalMethod objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.URIReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.URIReference

  • Packages that use URIReference
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of URIReference in javax.xml.crypto

      Methods in javax.xml.crypto that return URIReference
      Modifier and Type Method and Description
      URIReference URIReferenceException.getURIReference()
      Returns the URIReference that was being dereferenced when the exception was thrown.
      Methods in javax.xml.crypto with parameters of type URIReference
      Modifier and Type Method and Description
      Data URIDereferencer.dereference(URIReference uriReference, XMLCryptoContext context)
      Dereferences the specified URIReference and returns the dereferenced data.
      Constructors in javax.xml.crypto with parameters of type URIReference
      Constructor and Description
      URIReferenceException(String message, Throwable cause, URIReference uriReference)
      Constructs a new URIReferenceException with the specified detail message, cause and URIReference.

    • Uses of URIReference in javax.xml.crypto.dom

      Subinterfaces of URIReference in javax.xml.crypto.dom
      Modifier and Type Interface and Description
      interface  DOMURIReference
      A DOM-specific URIReference.

    • Uses of URIReference in javax.xml.crypto.dsig

      Subinterfaces of URIReference in javax.xml.crypto.dsig
      Modifier and Type Interface and Description
      interface  Reference
      A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.

    • Uses of URIReference in javax.xml.crypto.dsig.keyinfo

      Subinterfaces of URIReference in javax.xml.crypto.dsig.keyinfo
      Modifier and Type Interface and Description
      interface  RetrievalMethod
      A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.XMLCryptoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.XMLCryptoContext

  • Packages that use XMLCryptoContext
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of XMLCryptoContext in javax.xml.crypto

      Methods in javax.xml.crypto with parameters of type XMLCryptoContext
      Modifier and Type Method and Description
      Data URIDereferencer.dereference(URIReference uriReference, XMLCryptoContext context)
      Dereferences the specified URIReference and returns the dereferenced data.
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.

    • Uses of XMLCryptoContext in javax.xml.crypto.dom

      Classes in javax.xml.crypto.dom that implement XMLCryptoContext
      Modifier and Type Class and Description
      class  DOMCryptoContext
      This class provides a DOM-specific implementation of the XMLCryptoContext interface.

    • Uses of XMLCryptoContext in javax.xml.crypto.dsig

      Subinterfaces of XMLCryptoContext in javax.xml.crypto.dsig
      Modifier and Type Interface and Description
      interface  XMLSignContext
      Contains context information for generating XML Signatures.
      interface  XMLValidateContext
      Contains context information for validating XML Signatures.
      Methods in javax.xml.crypto.dsig with parameters of type XMLCryptoContext
      Modifier and Type Method and Description
      abstract void TransformService.init(XMLStructure parent, XMLCryptoContext context)
      Initializes this TransformService with the specified parameters and document context.
      abstract void TransformService.marshalParams(XMLStructure parent, XMLCryptoContext context)
      Marshals the algorithm-specific parameters.
      Data Transform.transform(Data data, XMLCryptoContext context)
      Transforms the specified data using the underlying transform algorithm.
      Data Transform.transform(Data data, XMLCryptoContext context, OutputStream os)
      Transforms the specified data using the underlying transform algorithm.

    • Uses of XMLCryptoContext in javax.xml.crypto.dsig.dom

      Classes in javax.xml.crypto.dsig.dom that implement XMLCryptoContext
      Modifier and Type Class and Description
      class  DOMSignContext
      A DOM-specific XMLSignContext.
      class  DOMValidateContext
      A DOM-specific XMLValidateContext.

    • Uses of XMLCryptoContext in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo with parameters of type XMLCryptoContext
      Modifier and Type Method and Description
      Data RetrievalMethod.dereference(XMLCryptoContext context)
      Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
      void KeyInfo.marshal(XMLStructure parent, XMLCryptoContext context)
      Marshals the key info to XML.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.XMLStructure

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.XMLStructure

  • Packages that use XMLStructure
    Package Description
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.

    • Uses of XMLStructure in javax.xml.crypto.dom

      Classes in javax.xml.crypto.dom that implement XMLStructure
      Modifier and Type Class and Description
      class  DOMStructure
      A DOM-specific XMLStructure.

    • Uses of XMLStructure in javax.xml.crypto.dsig

      Subinterfaces of XMLStructure in javax.xml.crypto.dsig
      Modifier and Type Interface and Description
      interface  CanonicalizationMethod
      A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  DigestMethod
      A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  Manifest
      A representation of the XML Manifest element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  Reference
      A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  SignatureMethod
      A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  SignatureProperties
      A representation of the XML SignatureProperties element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  SignatureProperty
      A representation of the XML SignatureProperty element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  SignedInfo
      An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  Transform
      A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  XMLObject
      A representation of the XML Object element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  XMLSignature
      A representation of the XML Signature element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      static interface  XMLSignature.SignatureValue
      A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      Classes in javax.xml.crypto.dsig that implement XMLStructure
      Modifier and Type Class and Description
      class  TransformService
      A Service Provider Interface for transform and canonicalization algorithms.
      Methods in javax.xml.crypto.dsig with parameters of type XMLStructure
      Modifier and Type Method and Description
      abstract void TransformService.init(XMLStructure parent, XMLCryptoContext context)
      Initializes this TransformService with the specified parameters and document context.
      abstract void TransformService.marshalParams(XMLStructure parent, XMLCryptoContext context)
      Marshals the algorithm-specific parameters.
      abstract CanonicalizationMethod XMLSignatureFactory.newCanonicalizationMethod(String algorithm, XMLStructure params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
      abstract Transform XMLSignatureFactory.newTransform(String algorithm, XMLStructure params)
      Creates a Transform for the specified algorithm URI and parameters.
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLStructure xmlStructure)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance.

    • Uses of XMLStructure in javax.xml.crypto.dsig.keyinfo

      Subinterfaces of XMLStructure in javax.xml.crypto.dsig.keyinfo
      Modifier and Type Interface and Description
      interface  KeyInfo
      A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  KeyName
      A representation of the XML KeyName element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  KeyValue
      A representation of the XML KeyValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  PGPData
      A representation of the XML PGPData element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  RetrievalMethod
      A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  X509Data
      A representation of the XML X509Data element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      interface  X509IssuerSerial
      A representation of the XML X509IssuerSerial element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      Methods in javax.xml.crypto.dsig.keyinfo with parameters of type XMLStructure
      Modifier and Type Method and Description
      void KeyInfo.marshal(XMLStructure parent, XMLCryptoContext context)
      Marshals the key info to XML.
      abstract KeyInfo KeyInfoFactory.unmarshalKeyInfo(XMLStructure xmlStructure)
      Unmarshals a new KeyInfo instance from a mechanism-specific XMLStructure (ex: DOMStructure) instance.

    • Uses of XMLStructure in javax.xml.crypto.dsig.spec

      Methods in javax.xml.crypto.dsig.spec that return XMLStructure
      Modifier and Type Method and Description
      XMLStructure XSLTTransformParameterSpec.getStylesheet()
      Returns the stylesheet.
      Constructors in javax.xml.crypto.dsig.spec with parameters of type XMLStructure
      Constructor and Description
      XSLTTransformParameterSpec(XMLStructure stylesheet)
      Creates an XSLTTransformParameterSpec with the specified stylesheet.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto.dom

DOM-specific classes for the javax.xml.crypto package.

See: Description

  • Interface Summary
    Interface Description
    DOMURIReference
    A DOM-specific URIReference.
  • Class Summary
    Class Description
    DOMCryptoContext
    This class provides a DOM-specific implementation of the XMLCryptoContext interface.
    DOMStructure
    A DOM-specific XMLStructure.

Package javax.xml.crypto.dom Description

DOM-specific classes for the javax.xml.crypto package. Only users who are using a DOM-based XML cryptographic implementations (ex: XMLSignatureFactory or KeyInfoFactory) should need to make direct use of this package.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dom Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto.dom

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.crypto.dom.DOMCryptoContext (implements javax.xml.crypto.XMLCryptoContext)
    • javax.xml.crypto.dom.DOMStructure (implements javax.xml.crypto.XMLStructure)

Interface Hierarchy

  • javax.xml.crypto.URIReference
    • javax.xml.crypto.dom.DOMURIReference
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto.dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto.dom

  • Packages that use javax.xml.crypto.dom
    Package Description
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
  • Classes in javax.xml.crypto.dom used by javax.xml.crypto.dsig.dom
    Class and Description
    DOMCryptoContext
    This class provides a DOM-specific implementation of the XMLCryptoContext interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dom.DOMCryptoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dom.DOMCryptoContext

  • Packages that use DOMCryptoContext
    Package Description
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.

    • Uses of DOMCryptoContext in javax.xml.crypto.dsig.dom

      Subclasses of DOMCryptoContext in javax.xml.crypto.dsig.dom
      Modifier and Type Class and Description
      class  DOMSignContext
      A DOM-specific XMLSignContext.
      class  DOMValidateContext
      A DOM-specific XMLValidateContext.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dom.DOMStructure

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dom.DOMStructure

No usage of javax.xml.crypto.dom.DOMStructure
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dom.DOMURIReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dom.DOMURIReference

No usage of javax.xml.crypto.dom.DOMURIReference
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMCryptoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dom

Class DOMCryptoContext

  • java.lang.Object
    • javax.xml.crypto.dom.DOMCryptoContext
  • All Implemented Interfaces:
    XMLCryptoContext
    Direct Known Subclasses:
    DOMSignContext, DOMValidateContext

    public class DOMCryptoContext
extends Object
implements XMLCryptoContext
    This class provides a DOM-specific implementation of the XMLCryptoContext interface. It also includes additional methods that are specific to a DOM-based implementation for registering and retrieving elements that contain attributes of type ID.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DOMCryptoContext()
      Default constructor.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Object get(Object key)
      This implementation uses an internal HashMap to get the object that the specified key maps to.
      String getBaseURI()
      Returns the base URI.
      String getDefaultNamespacePrefix()
      Returns the default namespace prefix.
      Element getElementById(String idValue)
      Returns the Element with the specified ID attribute value.
      KeySelector getKeySelector()
      Returns the key selector for finding a key.
      String getNamespacePrefix(String namespaceURI, String defaultPrefix)
      This implementation uses an internal HashMap to get the prefix that the specified URI maps to.
      Object getProperty(String name)
      This implementation uses an internal HashMap to get the object that the specified name maps to.
      URIDereferencer getURIDereferencer()
      Returns a URIDereferencer that is used to dereference URIReferences.
      Iterator iterator()
      Returns a read-only iterator over the set of Id/Element mappings of this DOMCryptoContext.
      Object put(Object key, Object value)
      This implementation uses an internal HashMap to map the key to the specified object.
      String putNamespacePrefix(String namespaceURI, String prefix)
      This implementation uses an internal HashMap to map the URI to the specified prefix.
      void setBaseURI(String baseURI)
      Sets the base URI.
      void setDefaultNamespacePrefix(String defaultPrefix)
      Sets the default namespace prefix.
      void setIdAttributeNS(Element element, String namespaceURI, String localName)
      Registers the element's attribute specified by the namespace URI and local name to be of type ID.
      void setKeySelector(KeySelector ks)
      Sets the key selector for finding a key.
      Object setProperty(String name, Object value)
      This implementation uses an internal HashMap to map the name to the specified object.
      void setURIDereferencer(URIDereferencer dereferencer)
      Sets a URIDereferencer that is used to dereference URIReferences.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DOMCryptoContext

        protected DOMCryptoContext()
        Default constructor. (For invocation by subclass constructors).

    • Method Detail

      • getNamespacePrefix

        public String getNamespacePrefix(String namespaceURI,
                                 String defaultPrefix)
        This implementation uses an internal HashMap to get the prefix that the specified URI maps to. It returns the defaultPrefix if it maps to null.
        Specified by:
        getNamespacePrefix in interface XMLCryptoContext
        Parameters:
        namespaceURI - a namespace URI
        defaultPrefix - the prefix to be returned in the event that the the specified namespace URI has not been bound to a prefix.
        Returns:
        the prefix that is associated with the specified namespace URI, or defaultPrefix if the URI is not registered. If the namespace URI is registered but has no prefix, an empty string ("") is returned.
        Throws:
        NullPointerException - if namespaceURI is null
        See Also:
        XMLCryptoContext.putNamespacePrefix(String, String)

      • putNamespacePrefix

        public String putNamespacePrefix(String namespaceURI,
                                 String prefix)
        This implementation uses an internal HashMap to map the URI to the specified prefix.
        Specified by:
        putNamespacePrefix in interface XMLCryptoContext
        Parameters:
        namespaceURI - a namespace URI
        prefix - a namespace prefix (or null to remove any existing mapping). Specifying the empty string ("") binds no prefix to the namespace URI.
        Returns:
        the previous prefix associated with the specified namespace URI, or null if there was none
        Throws:
        NullPointerException - if namespaceURI is null
        See Also:
        XMLCryptoContext.getNamespacePrefix(String, String)

      • getDefaultNamespacePrefix

        public String getDefaultNamespacePrefix()
        Description copied from interface: XMLCryptoContext
        Returns the default namespace prefix. The default namespace prefix is the prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
        Specified by:
        getDefaultNamespacePrefix in interface XMLCryptoContext
        Returns:
        the default namespace prefix, or null if none has been set.
        See Also:
        XMLCryptoContext.setDefaultNamespacePrefix(String)

      • setDefaultNamespacePrefix

        public void setDefaultNamespacePrefix(String defaultPrefix)
        Description copied from interface: XMLCryptoContext
        Sets the default namespace prefix. This sets the namespace prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
        Specified by:
        setDefaultNamespacePrefix in interface XMLCryptoContext
        Parameters:
        defaultPrefix - the default namespace prefix, or null to remove the current setting. Specify the empty string ("") to bind no prefix.
        See Also:
        XMLCryptoContext.getDefaultNamespacePrefix()

      • getBaseURI

        public String getBaseURI()
        Description copied from interface: XMLCryptoContext
        Returns the base URI.
        Specified by:
        getBaseURI in interface XMLCryptoContext
        Returns:
        the base URI, or null if not specified
        See Also:
        XMLCryptoContext.setBaseURI(String)

      • setBaseURI

        public void setBaseURI(String baseURI)
        Description copied from interface: XMLCryptoContext
        Sets the base URI.
        Specified by:
        setBaseURI in interface XMLCryptoContext
        Parameters:
        baseURI - the base URI, or null to remove current value
        Throws:
        IllegalArgumentException - if baseURI is not RFC 2396 compliant
        See Also:
        XMLCryptoContext.getBaseURI()

      • getURIDereferencer

        public URIDereferencer getURIDereferencer()
        Description copied from interface: XMLCryptoContext
        Returns a URIDereferencer that is used to dereference URIReferences.
        Specified by:
        getURIDereferencer in interface XMLCryptoContext
        Returns:
        the URIDereferencer, or null if not specified
        See Also:
        XMLCryptoContext.setURIDereferencer(URIDereferencer)

      • setURIDereferencer

        public void setURIDereferencer(URIDereferencer dereferencer)
        Description copied from interface: XMLCryptoContext
        Sets a URIDereferencer that is used to dereference URIReferences. The specified URIDereferencer is used in place of an implementation's default URIDereferencer.
        Specified by:
        setURIDereferencer in interface XMLCryptoContext
        Parameters:
        dereferencer - the URIDereferencer, or null to remove any current setting
        See Also:
        XMLCryptoContext.getURIDereferencer()

      • getProperty

        public Object getProperty(String name)
        This implementation uses an internal HashMap to get the object that the specified name maps to.
        Specified by:
        getProperty in interface XMLCryptoContext
        Parameters:
        name - the name of the property
        Returns:
        the current value of the specified property, or null if it does not have a value
        Throws:
        NullPointerException - if name is null
        See Also:
        XMLCryptoContext.setProperty(String, Object)

      • setProperty

        public Object setProperty(String name,
                          Object value)
        This implementation uses an internal HashMap to map the name to the specified object.
        Specified by:
        setProperty in interface XMLCryptoContext
        Parameters:
        name - the name of the property
        value - the value of the property to be set
        Returns:
        the previous value of the specified property, or null if it did not have a value
        Throws:
        NullPointerException - if name is null
        See Also:
        XMLCryptoContext.getProperty(String)

      • getKeySelector

        public KeySelector getKeySelector()
        Description copied from interface: XMLCryptoContext
        Returns the key selector for finding a key.
        Specified by:
        getKeySelector in interface XMLCryptoContext
        Returns:
        the key selector, or null if not specified
        See Also:
        XMLCryptoContext.setKeySelector(KeySelector)

      • setKeySelector

        public void setKeySelector(KeySelector ks)
        Description copied from interface: XMLCryptoContext
        Sets the key selector for finding a key.
        Specified by:
        setKeySelector in interface XMLCryptoContext
        Parameters:
        ks - the key selector, or null to remove the current setting
        See Also:
        XMLCryptoContext.getKeySelector()

      • getElementById

        public Element getElementById(String idValue)
        Returns the Element with the specified ID attribute value.

        This implementation uses an internal HashMap to get the element that the specified attribute value maps to.

        Parameters:
        idValue - the value of the ID
        Returns:
        the Element with the specified ID attribute value, or null if none.
        Throws:
        NullPointerException - if idValue is null
        See Also:
        setIdAttributeNS(org.w3c.dom.Element, java.lang.String, java.lang.String)

      • setIdAttributeNS

        public void setIdAttributeNS(Element element,
                             String namespaceURI,
                             String localName)
        Registers the element's attribute specified by the namespace URI and local name to be of type ID. The attribute must have a non-empty value.

        This implementation uses an internal HashMap to map the attribute's value to the specified element.

        Parameters:
        element - the element
        namespaceURI - the namespace URI of the attribute (specify null if not applicable)
        localName - the local name of the attribute
        Throws:
        IllegalArgumentException - if localName is not an attribute of the specified element or it does not contain a specific value
        NullPointerException - if element or localName is null
        See Also:
        getElementById(java.lang.String)

      • iterator

        public Iterator iterator()
        Returns a read-only iterator over the set of Id/Element mappings of this DOMCryptoContext. Attempts to modify the set via the Iterator.remove() method throw an UnsupportedOperationException. The mappings are returned in no particular order. Each element in the iteration is represented as a Map.Entry. If the DOMCryptoContext is modified while an iteration is in progress, the results of the iteration are undefined.
        Returns:
        a read-only iterator over the set of mappings

      • get

        public Object get(Object key)
        This implementation uses an internal HashMap to get the object that the specified key maps to.
        Specified by:
        get in interface XMLCryptoContext
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which this context maps the specified key, or null if there is no mapping for the key
        See Also:
        XMLCryptoContext.put(Object, Object)

      • put

        public Object put(Object key,
                  Object value)
        This implementation uses an internal HashMap to map the key to the specified object.
        Specified by:
        put in interface XMLCryptoContext
        Parameters:
        key - key with which the specified value is to be associated with
        value - value to be associated with the specified key
        Returns:
        the previous value associated with the key, or null if there was no mapping for the key
        Throws:
        IllegalArgumentException - if some aspect of this key or value prevents it from being stored in this context
        See Also:
        XMLCryptoContext.get(Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMStructure

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dom

Class DOMStructure

  • java.lang.Object
    • javax.xml.crypto.dom.DOMStructure
  • All Implemented Interfaces:
    XMLStructure

    public class DOMStructure
extends Object
implements XMLStructure
    A DOM-specific XMLStructure. The purpose of this class is to allow a DOM node to be used to represent extensible content (any elements or mixed content) in XML Signature structures.

    If a sequence of nodes is needed, the node contained in the DOMStructure is the first node of the sequence and successive nodes can be accessed by invoking Node.getNextSibling().

    If the owner document of the DOMStructure is different than the target document of an XMLSignature, the XMLSignature.sign(XMLSignContext) method imports the node into the target document before generating the signature.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMStructure(Node node)
      Creates a DOMStructure containing the specified node.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getNode()
      Returns the node contained in this DOMStructure.
      boolean isFeatureSupported(String feature)
      Indicates whether a specified feature is supported.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DOMStructure

        public DOMStructure(Node node)
        Creates a DOMStructure containing the specified node.
        Parameters:
        node - the node
        Throws:
        NullPointerException - if node is null

    • Method Detail

      • getNode

        public Node getNode()
        Returns the node contained in this DOMStructure.
        Returns:
        the node

      • isFeatureSupported

        public boolean isFeatureSupported(String feature)
        Description copied from interface: XMLStructure
        Indicates whether a specified feature is supported.
        Specified by:
        isFeatureSupported in interface XMLStructure
        Parameters:
        feature - the feature name (as an absolute URI)
        Returns:
        true if the specified feature is supported, false otherwise
        Throws:
        NullPointerException - if feature is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMURIReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dom

Interface DOMURIReference

  • All Superinterfaces:
    URIReference

    public interface DOMURIReference
extends URIReference
    A DOM-specific URIReference. The purpose of this class is to provide additional context necessary for resolving XPointer URIs or same-document references.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Node getHere()
      Returns the here node.

      • Methods inherited from interface javax.xml.crypto.URIReference

        getType, getURI

    • Method Detail

      • getHere

        Node getHere()
        Returns the here node.
        Returns:
        the attribute or processing instruction node or the parent element of the text node that directly contains the URI
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


dsig

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto.dsig

Classes for generating and validating XML digital signatures.

See: Description

  • Interface Summary
    Interface Description
    CanonicalizationMethod
    A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    DigestMethod
    A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Manifest
    A representation of the XML Manifest element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Reference
    A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureMethod
    A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperties
    A representation of the XML SignatureProperties element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperty
    A representation of the XML SignatureProperty element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignedInfo
    An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Transform
    A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLObject
    A representation of the XML Object element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature
    A representation of the XML Signature element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature.SignatureValue
    A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignContext
    Contains context information for generating XML Signatures.
    XMLValidateContext
    Contains context information for validating XML Signatures.
  • Class Summary
    Class Description
    TransformService
    A Service Provider Interface for transform and canonicalization algorithms.
    XMLSignatureFactory
    A factory for creating XMLSignature objects from scratch or for unmarshalling an XMLSignature object from a corresponding XML representation.
  • Exception Summary
    Exception Description
    TransformException
    Indicates an exceptional condition that occurred while executing a transform algorithm.
    XMLSignatureException
    Indicates an exceptional condition that occurred during the XML signature generation or validation process.

Package javax.xml.crypto.dsig Description

Classes for generating and validating XML digital signatures. This package includes classes that represent the core elements defined in the W3C XML digital signature specification: XMLSignature, SignedInfo, CanonicalizationMethod, SignatureMethod, Reference, DigestMethod, XMLObject, Manifest, SignatureProperties, and SignatureProperty. KeyInfo types are defined in the javax.xml.crypto.dsig.keyinfo subpackage. XMLSignatureFactory is an abstract factory that creates XMLSignature objects from scratch or from a pre-existing XML representation, such as a DOM node. TransformService is a service provider interface for creating and plugging in implementations of transform and canonicalization algorithms.

Of primary significance in this package is the XMLSignature class, which allows you to sign and validate an XML digital signature.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto.dsig

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.crypto.dsig.TransformException
        • javax.xml.crypto.dsig.XMLSignatureException
    • javax.xml.crypto.dsig.TransformService (implements javax.xml.crypto.dsig.Transform)
    • javax.xml.crypto.dsig.XMLSignatureFactory

Interface Hierarchy

  • javax.xml.crypto.AlgorithmMethod
    • javax.xml.crypto.dsig.DigestMethod (also extends javax.xml.crypto.XMLStructure)
    • javax.xml.crypto.dsig.SignatureMethod (also extends javax.xml.crypto.XMLStructure)
    • javax.xml.crypto.dsig.Transform (also extends javax.xml.crypto.XMLStructure)
      • javax.xml.crypto.dsig.CanonicalizationMethod
  • javax.xml.crypto.URIReference
    • javax.xml.crypto.dsig.Reference (also extends javax.xml.crypto.XMLStructure)
  • javax.xml.crypto.XMLCryptoContext
    • javax.xml.crypto.dsig.XMLSignContext
    • javax.xml.crypto.dsig.XMLValidateContext
  • javax.xml.crypto.XMLStructure
    • javax.xml.crypto.dsig.DigestMethod (also extends javax.xml.crypto.AlgorithmMethod)
    • javax.xml.crypto.dsig.Manifest
    • javax.xml.crypto.dsig.Reference (also extends javax.xml.crypto.URIReference)
    • javax.xml.crypto.dsig.SignatureMethod (also extends javax.xml.crypto.AlgorithmMethod)
    • javax.xml.crypto.dsig.SignatureProperties
    • javax.xml.crypto.dsig.SignatureProperty
    • javax.xml.crypto.dsig.SignedInfo
    • javax.xml.crypto.dsig.Transform (also extends javax.xml.crypto.AlgorithmMethod)
      • javax.xml.crypto.dsig.CanonicalizationMethod
    • javax.xml.crypto.dsig.XMLObject
    • javax.xml.crypto.dsig.XMLSignature
    • javax.xml.crypto.dsig.XMLSignature.SignatureValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto.dsig

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto.dsig

  • Packages that use javax.xml.crypto.dsig
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
  • Classes in javax.xml.crypto.dsig used by javax.xml.crypto.dsig
    Class and Description
    CanonicalizationMethod
    A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    DigestMethod
    A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Manifest
    A representation of the XML Manifest element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Reference
    A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureMethod
    A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperties
    A representation of the XML SignatureProperties element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperty
    A representation of the XML SignatureProperty element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignedInfo
    An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Transform
    A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    TransformException
    Indicates an exceptional condition that occurred while executing a transform algorithm.
    TransformService
    A Service Provider Interface for transform and canonicalization algorithms.
    XMLObject
    A representation of the XML Object element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature
    A representation of the XML Signature element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature.SignatureValue
    A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignatureException
    Indicates an exceptional condition that occurred during the XML signature generation or validation process.
    XMLSignatureFactory
    A factory for creating XMLSignature objects from scratch or for unmarshalling an XMLSignature object from a corresponding XML representation.
    XMLSignContext
    Contains context information for generating XML Signatures.
    XMLValidateContext
    Contains context information for validating XML Signatures.
  • Classes in javax.xml.crypto.dsig used by javax.xml.crypto.dsig.dom
    Class and Description
    XMLSignContext
    Contains context information for generating XML Signatures.
    XMLValidateContext
    Contains context information for validating XML Signatures.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CanonicalizationMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface CanonicalizationMethod

  • All Superinterfaces:
    AlgorithmMethod, Transform, XMLStructure

    public interface CanonicalizationMethod
extends Transform
    A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

       <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
     <complexType name="CanonicalizationMethodType" mixed="true">
       <sequence>
         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
           <!-- (0,unbounded) elements from (1,1) namespace -->
       </sequence>
       <attribute name="Algorithm" type="anyURI" use="required"/>
     </complexType>
    A CanonicalizationMethod instance may be created by invoking the newCanonicalizationMethod method of the XMLSignatureFactory class.
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newCanonicalizationMethod(String, C14NMethodParameterSpec)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String EXCLUSIVE
      The Exclusive Canonical XML (without comments) canonicalization method algorithm URI.
      static String EXCLUSIVE_WITH_COMMENTS
      The Exclusive Canonical XML with comments canonicalization method algorithm URI.
      static String INCLUSIVE
      The Canonical XML (without comments) canonicalization method algorithm URI.
      static String INCLUSIVE_WITH_COMMENTS
      The Canonical XML with comments canonicalization method algorithm URI.

      • Fields inherited from interface javax.xml.crypto.dsig.Transform

        BASE64, ENVELOPED, XPATH, XPATH2, XSLT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AlgorithmParameterSpec getParameterSpec()
      Returns the algorithm-specific input parameters associated with this CanonicalizationMethod.

      • Methods inherited from interface javax.xml.crypto.dsig.Transform

        transform, transform

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

      • Methods inherited from interface javax.xml.crypto.AlgorithmMethod

        getAlgorithm

    • Field Detail

      • INCLUSIVE

        static final String INCLUSIVE
        The Canonical XML (without comments) canonicalization method algorithm URI.
        See Also:
        Constant Field Values

      • INCLUSIVE_WITH_COMMENTS

        static final String INCLUSIVE_WITH_COMMENTS
        The Canonical XML with comments canonicalization method algorithm URI.
        See Also:
        Constant Field Values

      • EXCLUSIVE

        static final String EXCLUSIVE
        The Exclusive Canonical XML (without comments) canonicalization method algorithm URI.
        See Also:
        Constant Field Values

      • EXCLUSIVE_WITH_COMMENTS

        static final String EXCLUSIVE_WITH_COMMENTS
        The Exclusive Canonical XML with comments canonicalization method algorithm URI.
        See Also:
        Constant Field Values

    • Method Detail

      • getParameterSpec

        AlgorithmParameterSpec getParameterSpec()
        Returns the algorithm-specific input parameters associated with this CanonicalizationMethod.

        The returned parameters can be typecast to a C14NMethodParameterSpec object.

        Specified by:
        getParameterSpec in interface AlgorithmMethod
        Specified by:
        getParameterSpec in interface Transform
        Returns:
        the algorithm-specific input parameters (may be null if not specified)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.TransformException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.TransformException

  • Packages that use TransformException
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of TransformException in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that throw TransformException
      Modifier and Type Method and Description
      Data Transform.transform(Data data, XMLCryptoContext context)
      Transforms the specified data using the underlying transform algorithm.
      Data Transform.transform(Data data, XMLCryptoContext context, OutputStream os)
      Transforms the specified data using the underlying transform algorithm.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.TransformService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.TransformService

  • Packages that use TransformService
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of TransformService in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return TransformService
      Modifier and Type Method and Description
      static TransformService TransformService.getInstance(String algorithm, String mechanismType)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM).
      static TransformService TransformService.getInstance(String algorithm, String mechanismType, Provider provider)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider.
      static TransformService TransformService.getInstance(String algorithm, String mechanismType, String provider)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.XMLSignatureException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.XMLSignatureException

  • Packages that use XMLSignatureException
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of XMLSignatureException in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that throw XMLSignatureException
      Modifier and Type Method and Description
      void XMLSignature.sign(XMLSignContext signContext)
      Signs this XMLSignature.
      boolean Reference.validate(XMLValidateContext validateContext)
      Validates this reference.
      boolean XMLSignature.validate(XMLValidateContext validateContext)
      Validates the signature according to the core validation processing rules.
      boolean XMLSignature.SignatureValue.validate(XMLValidateContext validateContext)
      Validates the signature value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.XMLSignatureFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.XMLSignatureFactory

  • Packages that use XMLSignatureFactory
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of XMLSignatureFactory in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return XMLSignatureFactory
      Modifier and Type Method and Description
      static XMLSignatureFactory XMLSignatureFactory.getInstance()
      Returns an XMLSignatureFactory that supports the default XML processing mechanism and representation type ("DOM").
      static XMLSignatureFactory XMLSignatureFactory.getInstance(String mechanismType)
      Returns an XMLSignatureFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").
      static XMLSignatureFactory XMLSignatureFactory.getInstance(String mechanismType, Provider provider)
      Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      static XMLSignatureFactory XMLSignatureFactory.getInstance(String mechanismType, String provider)
      Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.CanonicalizationMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.CanonicalizationMethod

  • Packages that use CanonicalizationMethod
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of CanonicalizationMethod in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return CanonicalizationMethod
      Modifier and Type Method and Description
      CanonicalizationMethod SignedInfo.getCanonicalizationMethod()
      Returns the canonicalization method of this SignedInfo.
      abstract CanonicalizationMethod XMLSignatureFactory.newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
      abstract CanonicalizationMethod XMLSignatureFactory.newCanonicalizationMethod(String algorithm, XMLStructure params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
      Methods in javax.xml.crypto.dsig with parameters of type CanonicalizationMethod
      Modifier and Type Method and Description
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
      Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
      Creates a SignedInfo with the specified parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.DigestMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.DigestMethod

  • Packages that use DigestMethod
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of DigestMethod in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return DigestMethod
      Modifier and Type Method and Description
      DigestMethod Reference.getDigestMethod()
      Returns the digest method of this Reference.
      abstract DigestMethod XMLSignatureFactory.newDigestMethod(String algorithm, DigestMethodParameterSpec params)
      Creates a DigestMethod for the specified algorithm URI and parameters.
      Methods in javax.xml.crypto.dsig with parameters of type DigestMethod
      Modifier and Type Method and Description
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm)
      Creates a Reference with the specified URI and digest method.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
      Creates a Reference with the specified parameters and pre-calculated digest value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.Manifest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.Manifest

  • Packages that use Manifest
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of Manifest in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return Manifest
      Modifier and Type Method and Description
      abstract Manifest XMLSignatureFactory.newManifest(List references)
      Creates a Manifest containing the specified list of References.
      abstract Manifest XMLSignatureFactory.newManifest(List references, String id)
      Creates a Manifest containing the specified list of References and optional id.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.Reference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.Reference

  • Packages that use Reference
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of Reference in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return Reference
      Modifier and Type Method and Description
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm)
      Creates a Reference with the specified URI and digest method.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference XMLSignatureFactory.newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
      Creates a Reference with the specified parameters and pre-calculated digest value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.SignatureMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.SignatureMethod

  • Packages that use SignatureMethod
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of SignatureMethod in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return SignatureMethod
      Modifier and Type Method and Description
      SignatureMethod SignedInfo.getSignatureMethod()
      Returns the signature method of this SignedInfo.
      abstract SignatureMethod XMLSignatureFactory.newSignatureMethod(String algorithm, SignatureMethodParameterSpec params)
      Creates a SignatureMethod for the specified algorithm URI and parameters.
      Methods in javax.xml.crypto.dsig with parameters of type SignatureMethod
      Modifier and Type Method and Description
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
      Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
      Creates a SignedInfo with the specified parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.SignatureProperties

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.SignatureProperties

  • Packages that use SignatureProperties
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of SignatureProperties in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return SignatureProperties
      Modifier and Type Method and Description
      abstract SignatureProperties XMLSignatureFactory.newSignatureProperties(List properties, String id)
      Creates a SignatureProperties containing the specified list of SignaturePropertys and optional id.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.SignatureProperty

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.SignatureProperty

  • Packages that use SignatureProperty
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of SignatureProperty in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return SignatureProperty
      Modifier and Type Method and Description
      abstract SignatureProperty XMLSignatureFactory.newSignatureProperty(List content, String target, String id)
      Creates a SignatureProperty containing the specified list of XMLStructures, target URI and optional id.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.SignedInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.SignedInfo

  • Packages that use SignedInfo
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of SignedInfo in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return SignedInfo
      Modifier and Type Method and Description
      SignedInfo XMLSignature.getSignedInfo()
      Returns the signed info of this XMLSignature.
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
      Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
      abstract SignedInfo XMLSignatureFactory.newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
      Creates a SignedInfo with the specified parameters.
      Methods in javax.xml.crypto.dsig with parameters of type SignedInfo
      Modifier and Type Method and Description
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki)
      Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
      Creates an XMLSignature and initializes it with the specified parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.Transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.Transform

  • Packages that use Transform
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of Transform in javax.xml.crypto.dsig

      Subinterfaces of Transform in javax.xml.crypto.dsig
      Modifier and Type Interface and Description
      interface  CanonicalizationMethod
      A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
      Classes in javax.xml.crypto.dsig that implement Transform
      Modifier and Type Class and Description
      class  TransformService
      A Service Provider Interface for transform and canonicalization algorithms.
      Methods in javax.xml.crypto.dsig that return Transform
      Modifier and Type Method and Description
      abstract Transform XMLSignatureFactory.newTransform(String algorithm, TransformParameterSpec params)
      Creates a Transform for the specified algorithm URI and parameters.
      abstract Transform XMLSignatureFactory.newTransform(String algorithm, XMLStructure params)
      Creates a Transform for the specified algorithm URI and parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.XMLObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.XMLObject

  • Packages that use XMLObject
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of XMLObject in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return XMLObject
      Modifier and Type Method and Description
      abstract XMLObject XMLSignatureFactory.newXMLObject(List content, String id, String mimeType, String encoding)
      Creates an XMLObject from the specified parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.XMLSignature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.XMLSignature

  • Packages that use XMLSignature
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of XMLSignature in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return XMLSignature
      Modifier and Type Method and Description
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki)
      Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
      Creates an XMLSignature and initializes it with the specified parameters.
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLStructure xmlStructure)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance.
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext context)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.XMLSignature.SignatureValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.XMLSignature.SignatureValue

  • Packages that use XMLSignature.SignatureValue
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of XMLSignature.SignatureValue in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return XMLSignature.SignatureValue
      Modifier and Type Method and Description
      XMLSignature.SignatureValue XMLSignature.getSignatureValue()
      Returns the signature value of this XMLSignature.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.XMLSignContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.XMLSignContext

  • Packages that use XMLSignContext
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.

    • Uses of XMLSignContext in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type XMLSignContext
      Modifier and Type Method and Description
      void XMLSignature.sign(XMLSignContext signContext)
      Signs this XMLSignature.

    • Uses of XMLSignContext in javax.xml.crypto.dsig.dom

      Classes in javax.xml.crypto.dsig.dom that implement XMLSignContext
      Modifier and Type Class and Description
      class  DOMSignContext
      A DOM-specific XMLSignContext.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.XMLValidateContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.XMLValidateContext

  • Packages that use XMLValidateContext
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.

    • Uses of XMLValidateContext in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type XMLValidateContext
      Modifier and Type Method and Description
      abstract XMLSignature XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext context)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.
      boolean Reference.validate(XMLValidateContext validateContext)
      Validates this reference.
      boolean XMLSignature.validate(XMLValidateContext validateContext)
      Validates the signature according to the core validation processing rules.
      boolean XMLSignature.SignatureValue.validate(XMLValidateContext validateContext)
      Validates the signature value.

    • Uses of XMLValidateContext in javax.xml.crypto.dsig.dom

      Classes in javax.xml.crypto.dsig.dom that implement XMLValidateContext
      Modifier and Type Class and Description
      class  DOMValidateContext
      A DOM-specific XMLValidateContext.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DigestMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface DigestMethod

  • All Superinterfaces:
    AlgorithmMethod, XMLStructure

    public interface DigestMethod
extends XMLStructure, AlgorithmMethod
    A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

       <element name="DigestMethod" type="ds:DigestMethodType"/>
     <complexType name="DigestMethodType" mixed="true">
       <sequence>
         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
           <!-- (0,unbounded) elements from (1,1) namespace -->
       </sequence>
       <attribute name="Algorithm" type="anyURI" use="required"/>
     </complexType>
    A DigestMethod instance may be created by invoking the newDigestMethod method of the XMLSignatureFactory class.
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newDigestMethod(String, DigestMethodParameterSpec)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String RIPEMD160
      The RIPEMD-160 digest method algorithm URI.
      static String SHA1
      The SHA1 digest method algorithm URI.
      static String SHA256
      The SHA256 digest method algorithm URI.
      static String SHA512
      The SHA512 digest method algorithm URI.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AlgorithmParameterSpec getParameterSpec()
      Returns the algorithm-specific input parameters associated with this DigestMethod.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

      • Methods inherited from interface javax.xml.crypto.AlgorithmMethod

        getAlgorithm

    • Field Detail

      • SHA1

        static final String SHA1
        The SHA1 digest method algorithm URI.
        See Also:
        Constant Field Values

      • SHA256

        static final String SHA256
        The SHA256 digest method algorithm URI.
        See Also:
        Constant Field Values

      • SHA512

        static final String SHA512
        The SHA512 digest method algorithm URI.
        See Also:
        Constant Field Values

      • RIPEMD160

        static final String RIPEMD160
        The RIPEMD-160 digest method algorithm URI.
        See Also:
        Constant Field Values

    • Method Detail

      • getParameterSpec

        AlgorithmParameterSpec getParameterSpec()
        Returns the algorithm-specific input parameters associated with this DigestMethod.

        The returned parameters can be typecast to a DigestMethodParameterSpec object.

        Specified by:
        getParameterSpec in interface AlgorithmMethod
        Returns:
        the algorithm-specific parameters (may be null if not specified)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto.dsig.dom

DOM-specific classes for the javax.xml.crypto.dsig package.

See: Description

  • Class Summary
    Class Description
    DOMSignContext
    A DOM-specific XMLSignContext.
    DOMValidateContext
    A DOM-specific XMLValidateContext.

Package javax.xml.crypto.dsig.dom Description

DOM-specific classes for the javax.xml.crypto.dsig package. Only users who are using a DOM-based XMLSignatureFactory or KeyInfoFactory should need to make direct use of this package.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.dom Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto.dsig.dom

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.crypto.dom.DOMCryptoContext (implements javax.xml.crypto.XMLCryptoContext)
      • javax.xml.crypto.dsig.dom.DOMSignContext (implements javax.xml.crypto.dsig.XMLSignContext)
      • javax.xml.crypto.dsig.dom.DOMValidateContext (implements javax.xml.crypto.dsig.XMLValidateContext)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto.dsig.dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto.dsig.dom

No usage of javax.xml.crypto.dsig.dom
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.dom.DOMSignContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.dom.DOMSignContext

No usage of javax.xml.crypto.dsig.dom.DOMSignContext
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.dom.DOMValidateContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.dom.DOMValidateContext

No usage of javax.xml.crypto.dsig.dom.DOMValidateContext
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMSignContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.dom

Class DOMSignContext

  • java.lang.Object
    • javax.xml.crypto.dom.DOMCryptoContext
      • javax.xml.crypto.dsig.dom.DOMSignContext
  • All Implemented Interfaces:
    XMLSignContext, XMLCryptoContext

    public class DOMSignContext
extends DOMCryptoContext
implements XMLSignContext
    A DOM-specific XMLSignContext. This class contains additional methods to specify the location in a DOM tree where an XMLSignature object is to be marshalled when generating the signature.

    Note that DOMSignContext instances can contain information and state specific to the XML signature structure it is used with. The results are unpredictable if a DOMSignContext is used with different signature structures (for example, you should not use the same DOMSignContext instance to sign two different XMLSignature objects).

    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMSignContext(Key signingKey, Node parent)
      Creates a DOMSignContext with the specified signing key and parent node.
      DOMSignContext(Key signingKey, Node parent, Node nextSibling)
      Creates a DOMSignContext with the specified signing key, parent and next sibling nodes.
      DOMSignContext(KeySelector ks, Node parent)
      Creates a DOMSignContext with the specified key selector and parent node.
      DOMSignContext(KeySelector ks, Node parent, Node nextSibling)
      Creates a DOMSignContext with the specified key selector, parent and next sibling nodes.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getNextSibling()
      Returns the nextSibling node.
      Node getParent()
      Returns the parent node.
      void setNextSibling(Node nextSibling)
      Sets the next sibling node.
      void setParent(Node parent)
      Sets the parent node.

      • Methods inherited from class javax.xml.crypto.dom.DOMCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getElementById, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, iterator, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setIdAttributeNS, setKeySelector, setProperty, setURIDereferencer

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.xml.crypto.XMLCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setKeySelector, setProperty, setURIDereferencer

    • Constructor Detail

      • DOMSignContext

        public DOMSignContext(Key signingKey,
                      Node parent)
        Creates a DOMSignContext with the specified signing key and parent node. The signing key is stored in a singleton KeySelector that is returned by the getKeySelector method. The marshalled XMLSignature will be added as the last child element of the specified parent node unless a next sibling node is specified by invoking the setNextSibling method.
        Parameters:
        signingKey - the signing key
        parent - the parent node
        Throws:
        NullPointerException - if signingKey or parent is null

      • DOMSignContext

        public DOMSignContext(Key signingKey,
                      Node parent,
                      Node nextSibling)
        Creates a DOMSignContext with the specified signing key, parent and next sibling nodes. The signing key is stored in a singleton KeySelector that is returned by the getKeySelector method. The marshalled XMLSignature will be inserted as a child element of the specified parent node and immediately before the specified next sibling node.
        Parameters:
        signingKey - the signing key
        parent - the parent node
        nextSibling - the next sibling node
        Throws:
        NullPointerException - if signingKey, parent or nextSibling is null

      • DOMSignContext

        public DOMSignContext(KeySelector ks,
                      Node parent)
        Creates a DOMSignContext with the specified key selector and parent node. The marshalled XMLSignature will be added as the last child element of the specified parent node unless a next sibling node is specified by invoking the setNextSibling method.
        Parameters:
        ks - the key selector
        parent - the parent node
        Throws:
        NullPointerException - if ks or parent is null

      • DOMSignContext

        public DOMSignContext(KeySelector ks,
                      Node parent,
                      Node nextSibling)
        Creates a DOMSignContext with the specified key selector, parent and next sibling nodes. The marshalled XMLSignature will be inserted as a child element of the specified parent node and immediately before the specified next sibling node.
        Parameters:
        ks - the key selector
        parent - the parent node
        nextSibling - the next sibling node
        Throws:
        NullPointerException - if ks, parent or nextSibling is null

    • Method Detail

      • setParent

        public void setParent(Node parent)
        Sets the parent node.
        Parameters:
        parent - the parent node. The marshalled XMLSignature will be added as a child element of this node.
        Throws:
        NullPointerException - if parent is null
        See Also:
        getParent()

      • setNextSibling

        public void setNextSibling(Node nextSibling)
        Sets the next sibling node.
        Parameters:
        nextSibling - the next sibling node. The marshalled XMLSignature will be inserted immediately before this node. Specify null to remove the current setting.
        See Also:
        getNextSibling()

      • getParent

        public Node getParent()
        Returns the parent node.
        Returns:
        the parent node (never null)
        See Also:
        setParent(Node)

      • getNextSibling

        public Node getNextSibling()
        Returns the nextSibling node.
        Returns:
        the nextSibling node, or null if not specified.
        See Also:
        setNextSibling(Node)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMValidateContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.dom

Class DOMValidateContext

  • java.lang.Object
    • javax.xml.crypto.dom.DOMCryptoContext
      • javax.xml.crypto.dsig.dom.DOMValidateContext
  • All Implemented Interfaces:
    XMLValidateContext, XMLCryptoContext

    public class DOMValidateContext
extends DOMCryptoContext
implements XMLValidateContext
    A DOM-specific XMLValidateContext. This class contains additional methods to specify the location in a DOM tree where an XMLSignature is to be unmarshalled and validated from.

    Note that the behavior of an unmarshalled XMLSignature is undefined if the contents of the underlying DOM tree are modified by the caller after the XMLSignature is created.

    Also, note that DOMValidateContext instances can contain information and state specific to the XML signature structure it is used with. The results are unpredictable if a DOMValidateContext is used with different signature structures (for example, you should not use the same DOMValidateContext instance to validate two different XMLSignature objects).

    Since:
    1.6
    See Also:
    XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext)

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMValidateContext(Key validatingKey, Node node)
      Creates a DOMValidateContext containing the specified key and node.
      DOMValidateContext(KeySelector ks, Node node)
      Creates a DOMValidateContext containing the specified key selector and node.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getNode()
      Returns the node.
      void setNode(Node node)
      Sets the node.

      • Methods inherited from class javax.xml.crypto.dom.DOMCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getElementById, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, iterator, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setIdAttributeNS, setKeySelector, setProperty, setURIDereferencer

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.xml.crypto.XMLCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setKeySelector, setProperty, setURIDereferencer

    • Constructor Detail

      • DOMValidateContext

        public DOMValidateContext(KeySelector ks,
                          Node node)
        Creates a DOMValidateContext containing the specified key selector and node.
        Parameters:
        ks - a key selector for finding a validation key
        node - the node
        Throws:
        NullPointerException - if ks or node is null

      • DOMValidateContext

        public DOMValidateContext(Key validatingKey,
                          Node node)
        Creates a DOMValidateContext containing the specified key and node. The validating key will be stored in a singleton KeySelector that is returned when the getKeySelector method is called.
        Parameters:
        validatingKey - the validating key
        node - the node
        Throws:
        NullPointerException - if validatingKey or node is null

    • Method Detail

      • setNode

        public void setNode(Node node)
        Sets the node.
        Parameters:
        node - the node
        Throws:
        NullPointerException - if node is null
        See Also:
        getNode()

      • getNode

        public Node getNode()
        Returns the node.
        Returns:
        the node (never null)
        See Also:
        setNode(Node)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


keyinfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto.dsig.keyinfo

Classes for parsing and processing KeyInfo elements and structures.

See: Description

  • Interface Summary
    Interface Description
    KeyInfo
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyName
    A representation of the XML KeyName element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyValue
    A representation of the XML KeyValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    PGPData
    A representation of the XML PGPData element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    RetrievalMethod
    A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509Data
    A representation of the XML X509Data element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509IssuerSerial
    A representation of the XML X509IssuerSerial element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
  • Class Summary
    Class Description
    KeyInfoFactory
    A factory for creating KeyInfo objects from scratch or for unmarshalling a KeyInfo object from a corresponding XML representation.

Package javax.xml.crypto.dsig.keyinfo Description

Classes for parsing and processing KeyInfo elements and structures. KeyInfo is an optional element that enables the recipient(s) to obtain the key needed to validate an XMLSignature. KeyInfo may contain keys, names, certificates and other public key management information, such as in-band key distribution or key agreement data. This package contains classes representing types defined in the W3C specification for XML Signatures, such as KeyName, KeyValue, RetrievalMethod, X509Data, X509IssuerSerial, and PGPData. KeyInfoFactory is an abstract factory that creates KeyInfo objects from scratch.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.keyinfo Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto.dsig.keyinfo

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.crypto.dsig.keyinfo.KeyInfoFactory

Interface Hierarchy

  • javax.xml.crypto.URIReference
    • javax.xml.crypto.dsig.keyinfo.RetrievalMethod (also extends javax.xml.crypto.XMLStructure)
  • javax.xml.crypto.XMLStructure
    • javax.xml.crypto.dsig.keyinfo.KeyInfo
    • javax.xml.crypto.dsig.keyinfo.KeyName
    • javax.xml.crypto.dsig.keyinfo.KeyValue
    • javax.xml.crypto.dsig.keyinfo.PGPData
    • javax.xml.crypto.dsig.keyinfo.RetrievalMethod (also extends javax.xml.crypto.URIReference)
    • javax.xml.crypto.dsig.keyinfo.X509Data
    • javax.xml.crypto.dsig.keyinfo.X509IssuerSerial
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto.dsig.keyinfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto.dsig.keyinfo

  • Packages that use javax.xml.crypto.dsig.keyinfo
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.
  • Classes in javax.xml.crypto.dsig.keyinfo used by javax.xml.crypto
    Class and Description
    KeyInfo
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
  • Classes in javax.xml.crypto.dsig.keyinfo used by javax.xml.crypto.dsig
    Class and Description
    KeyInfo
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyInfoFactory
    A factory for creating KeyInfo objects from scratch or for unmarshalling a KeyInfo object from a corresponding XML representation.
  • Classes in javax.xml.crypto.dsig.keyinfo used by javax.xml.crypto.dsig.keyinfo
    Class and Description
    KeyInfo
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyInfoFactory
    A factory for creating KeyInfo objects from scratch or for unmarshalling a KeyInfo object from a corresponding XML representation.
    KeyName
    A representation of the XML KeyName element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyValue
    A representation of the XML KeyValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    PGPData
    A representation of the XML PGPData element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    RetrievalMethod
    A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509Data
    A representation of the XML X509Data element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509IssuerSerial
    A representation of the XML X509IssuerSerial element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.keyinfo.KeyInfoFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory

  • Packages that use KeyInfoFactory
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of KeyInfoFactory in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return KeyInfoFactory
      Modifier and Type Method and Description
      KeyInfoFactory XMLSignatureFactory.getKeyInfoFactory()
      Returns a KeyInfoFactory that creates KeyInfo objects.

    • Uses of KeyInfoFactory in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return KeyInfoFactory
      Modifier and Type Method and Description
      static KeyInfoFactory KeyInfoFactory.getInstance()
      Returns a KeyInfoFactory that supports the default XML processing mechanism and representation type ("DOM").
      static KeyInfoFactory KeyInfoFactory.getInstance(String mechanismType)
      Returns a KeyInfoFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").
      static KeyInfoFactory KeyInfoFactory.getInstance(String mechanismType, Provider provider)
      Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      static KeyInfoFactory KeyInfoFactory.getInstance(String mechanismType, String provider)
      Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.KeyInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.KeyInfo

  • Packages that use KeyInfo
    Package Description
    javax.xml.crypto
    Common classes for XML cryptography.
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of KeyInfo in javax.xml.crypto

      Methods in javax.xml.crypto with parameters of type KeyInfo
      Modifier and Type Method and Description
      abstract KeySelectorResult KeySelector.select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.

    • Uses of KeyInfo in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig that return KeyInfo
      Modifier and Type Method and Description
      KeyInfo XMLSignature.getKeyInfo()
      Returns the key info of this XMLSignature.
      Methods in javax.xml.crypto.dsig with parameters of type KeyInfo
      Modifier and Type Method and Description
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki)
      Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
      abstract XMLSignature XMLSignatureFactory.newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
      Creates an XMLSignature and initializes it with the specified parameters.

    • Uses of KeyInfo in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return KeyInfo
      Modifier and Type Method and Description
      abstract KeyInfo KeyInfoFactory.newKeyInfo(List content)
      Creates a KeyInfo containing the specified list of key information types.
      abstract KeyInfo KeyInfoFactory.newKeyInfo(List content, String id)
      Creates a KeyInfo containing the specified list of key information types and optional id.
      abstract KeyInfo KeyInfoFactory.unmarshalKeyInfo(XMLStructure xmlStructure)
      Unmarshals a new KeyInfo instance from a mechanism-specific XMLStructure (ex: DOMStructure) instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.KeyName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.KeyName

  • Packages that use KeyName
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of KeyName in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return KeyName
      Modifier and Type Method and Description
      abstract KeyName KeyInfoFactory.newKeyName(String name)
      Creates a KeyName from the specified name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.KeyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.KeyValue

  • Packages that use KeyValue
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of KeyValue in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return KeyValue
      Modifier and Type Method and Description
      abstract KeyValue KeyInfoFactory.newKeyValue(PublicKey key)
      Creates a KeyValue from the specified public key.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.PGPData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.PGPData

  • Packages that use PGPData
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of PGPData in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return PGPData
      Modifier and Type Method and Description
      abstract PGPData KeyInfoFactory.newPGPData(byte[] keyId)
      Creates a PGPData from the specified PGP public key identifier.
      abstract PGPData KeyInfoFactory.newPGPData(byte[] keyId, byte[] keyPacket, List other)
      Creates a PGPData from the specified PGP public key identifier, and optional key material packet and list of external elements.
      abstract PGPData KeyInfoFactory.newPGPData(byte[] keyPacket, List other)
      Creates a PGPData from the specified PGP key material packet and optional list of external elements.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.RetrievalMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.RetrievalMethod

  • Packages that use RetrievalMethod
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of RetrievalMethod in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return RetrievalMethod
      Modifier and Type Method and Description
      abstract RetrievalMethod KeyInfoFactory.newRetrievalMethod(String uri)
      Creates a RetrievalMethod from the specified URI.
      abstract RetrievalMethod KeyInfoFactory.newRetrievalMethod(String uri, String type, List transforms)
      Creates a RetrievalMethod from the specified parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.X509Data

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.X509Data

  • Packages that use X509Data
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of X509Data in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return X509Data
      Modifier and Type Method and Description
      abstract X509Data KeyInfoFactory.newX509Data(List content)
      Creates a X509Data containing the specified list of X.509 content.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.keyinfo.X509IssuerSerial

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.keyinfo.X509IssuerSerial

  • Packages that use X509IssuerSerial
    Package Description
    javax.xml.crypto.dsig.keyinfo
    Classes for parsing and processing KeyInfo elements and structures.

    • Uses of X509IssuerSerial in javax.xml.crypto.dsig.keyinfo

      Methods in javax.xml.crypto.dsig.keyinfo that return X509IssuerSerial
      Modifier and Type Method and Description
      abstract X509IssuerSerial KeyInfoFactory.newX509IssuerSerial(String issuerName, BigInteger serialNumber)
      Creates an X509IssuerSerial from the specified X.500 issuer distinguished name and serial number.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeyInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface KeyInfo

  • All Superinterfaces:
    XMLStructure

    public interface KeyInfo
extends XMLStructure
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A KeyInfo contains a list of XMLStructures, each of which contain information that enables the recipient(s) to obtain the key needed to validate an XML signature. The XML Schema Definition is defined as:
     <element name="KeyInfo" type="ds:KeyInfoType"/>
 <complexType name="KeyInfoType" mixed="true">
   <choice maxOccurs="unbounded">
     <element ref="ds:KeyName"/>
     <element ref="ds:KeyValue"/>
     <element ref="ds:RetrievalMethod"/>
     <element ref="ds:X509Data"/>
     <element ref="ds:PGPData"/>
     <element ref="ds:SPKIData"/>
     <element ref="ds:MgmtData"/>
     <any processContents="lax" namespace="##other"/>
     <!-- (1,1) elements from (0,unbounded) namespaces -->
   </choice>
   <attribute name="Id" type="ID" use="optional"/>
 </complexType>
    A KeyInfo instance may be created by invoking one of the newKeyInfo methods of the KeyInfoFactory class, and passing it a list of one or more XMLStructures and an optional id parameter; for example:
       KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
   KeyInfo keyInfo = factory.newKeyInfo
      (Collections.singletonList(factory.newKeyName("Alice"), "keyinfo-1"));

    KeyInfo objects can also be marshalled to XML by invoking the marshal method.

    Since:
    1.6
    See Also:
    KeyInfoFactory.newKeyInfo(List), KeyInfoFactory.newKeyInfo(List, String)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List getContent()
      Returns an unmodifiable list containing the key information.
      String getId()
      Return the optional Id attribute of this KeyInfo, which may be useful for referencing this KeyInfo from other XML structures.
      void marshal(XMLStructure parent, XMLCryptoContext context)
      Marshals the key info to XML.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getContent

        List getContent()
        Returns an unmodifiable list containing the key information. Each entry of the list is an XMLStructure.

        If there is a public subclass representing the type of XMLStructure, it is returned as an instance of that class (ex: an X509Data element would be returned as an instance of X509Data).

        Returns:
        an unmodifiable list of one or more XMLStructures in this KeyInfo. Never returns null or an empty list.

      • getId

        String getId()
        Return the optional Id attribute of this KeyInfo, which may be useful for referencing this KeyInfo from other XML structures.
        Returns:
        the Id attribute of this KeyInfo (may be null if not specified)

      • marshal

        void marshal(XMLStructure parent,
             XMLCryptoContext context)
      throws MarshalException
        Marshals the key info to XML.
        Parameters:
        parent - a mechanism-specific structure containing the parent node that the marshalled key info will be appended to
        context - the XMLCryptoContext containing additional context (may be null if not applicable)
        Throws:
        ClassCastException - if the type of parent or context is not compatible with this key info
        MarshalException - if the key info cannot be marshalled
        NullPointerException - if parent is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeyInfoFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Class KeyInfoFactory

  • java.lang.Object
    • javax.xml.crypto.dsig.keyinfo.KeyInfoFactory

  • public abstract class KeyInfoFactory
extends Object
    A factory for creating KeyInfo objects from scratch or for unmarshalling a KeyInfo object from a corresponding XML representation.

    Each instance of KeyInfoFactory supports a specific XML mechanism type. To create a KeyInfoFactory, call one of the static getInstance methods, passing in the XML mechanism type desired, for example:

    KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");

    The objects that this factory produces will be based on DOM and abide by the DOM interoperability requirements as defined in the DOM Mechanism Requirements section of the API overview. See the Service Providers section of the API overview for a list of standard mechanism types.

    KeyInfoFactory implementations are registered and loaded using the Provider mechanism. For example, a service provider that supports the DOM mechanism would be specified in the Provider subclass as:

         put("KeyInfoFactory.DOM", "org.example.DOMKeyInfoFactory");

    Also, the XMLStructures that are created by this factory may contain state specific to the KeyInfo and are not intended to be reusable.

    An implementation MUST minimally support the default mechanism type: DOM.

    Note that a caller must use the same KeyInfoFactory instance to create the XMLStructures of a particular KeyInfo object. The behavior is undefined if XMLStructures from different providers or different mechanism types are used together.

    Concurrent Access

    The static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.

    However, this is not true for the non-static methods defined by this class. Unless otherwise documented by a specific provider, threads that need to access a single KeyInfoFactory instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a different KeyInfoFactory instance need not synchronize.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected KeyInfoFactory()
      Default constructor, for invocation by subclasses.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      static KeyInfoFactory getInstance()
      Returns a KeyInfoFactory that supports the default XML processing mechanism and representation type ("DOM").
      static KeyInfoFactory getInstance(String mechanismType)
      Returns a KeyInfoFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").
      static KeyInfoFactory getInstance(String mechanismType, Provider provider)
      Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      static KeyInfoFactory getInstance(String mechanismType, String provider)
      Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      String getMechanismType()
      Returns the type of the XML processing mechanism and representation supported by this KeyInfoFactory (ex: "DOM")
      Provider getProvider()
      Returns the provider of this KeyInfoFactory.
      abstract URIDereferencer getURIDereferencer()
      Returns a reference to the URIDereferencer that is used by default to dereference URIs in RetrievalMethod objects.
      abstract boolean isFeatureSupported(String feature)
      Indicates whether a specified feature is supported.
      abstract KeyInfo newKeyInfo(List content)
      Creates a KeyInfo containing the specified list of key information types.
      abstract KeyInfo newKeyInfo(List content, String id)
      Creates a KeyInfo containing the specified list of key information types and optional id.
      abstract KeyName newKeyName(String name)
      Creates a KeyName from the specified name.
      abstract KeyValue newKeyValue(PublicKey key)
      Creates a KeyValue from the specified public key.
      abstract PGPData newPGPData(byte[] keyId)
      Creates a PGPData from the specified PGP public key identifier.
      abstract PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other)
      Creates a PGPData from the specified PGP public key identifier, and optional key material packet and list of external elements.
      abstract PGPData newPGPData(byte[] keyPacket, List other)
      Creates a PGPData from the specified PGP key material packet and optional list of external elements.
      abstract RetrievalMethod newRetrievalMethod(String uri)
      Creates a RetrievalMethod from the specified URI.
      abstract RetrievalMethod newRetrievalMethod(String uri, String type, List transforms)
      Creates a RetrievalMethod from the specified parameters.
      abstract X509Data newX509Data(List content)
      Creates a X509Data containing the specified list of X.509 content.
      abstract X509IssuerSerial newX509IssuerSerial(String issuerName, BigInteger serialNumber)
      Creates an X509IssuerSerial from the specified X.500 issuer distinguished name and serial number.
      abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
      Unmarshals a new KeyInfo instance from a mechanism-specific XMLStructure (ex: DOMStructure) instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • KeyInfoFactory

        protected KeyInfoFactory()
        Default constructor, for invocation by subclasses.

    • Method Detail

      • getInstance

        public static KeyInfoFactory getInstance(String mechanismType)
        Returns a KeyInfoFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").

        This method uses the standard JCA provider lookup mechanism to locate and instantiate a KeyInfoFactory implementation of the desired mechanism type. It traverses the list of registered security Providers, starting with the most preferred Provider. A new KeyInfoFactory object from the first Provider that supports the specified mechanism is returned.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        Returns:
        a new KeyInfoFactory
        Throws:
        NullPointerException - if mechanismType is null
        NoSuchMechanismException - if no Provider supports a KeyInfoFactory implementation for the specified mechanism
        See Also:
        Provider

      • getInstance

        public static KeyInfoFactory getInstance(String mechanismType,
                                         Provider provider)
        Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. Note that the specified Provider object does not have to be registered in the provider list.
        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        provider - the Provider object
        Returns:
        a new KeyInfoFactory
        Throws:
        NullPointerException - if mechanismType or provider are null
        NoSuchMechanismException - if a KeyInfoFactory implementation for the specified mechanism is not available from the specified Provider object
        See Also:
        Provider

      • getInstance

        public static KeyInfoFactory getInstance(String mechanismType,
                                         String provider)
                                  throws NoSuchProviderException
        Returns a KeyInfoFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. The specified provider must be registered in the security provider list.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        provider - the string name of the provider
        Returns:
        a new KeyInfoFactory
        Throws:
        NoSuchProviderException - if the specified provider is not registered in the security provider list
        NullPointerException - if mechanismType or provider are null
        NoSuchMechanismException - if a KeyInfoFactory implementation for the specified mechanism is not available from the specified provider
        See Also:
        Provider

      • getInstance

        public static KeyInfoFactory getInstance()
        Returns a KeyInfoFactory that supports the default XML processing mechanism and representation type ("DOM").

        This method uses the standard JCA provider lookup mechanism to locate and instantiate a KeyInfoFactory implementation of the default mechanism type. It traverses the list of registered security Providers, starting with the most preferred Provider. A new KeyInfoFactory object from the first Provider that supports the DOM mechanism is returned.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Returns:
        a new KeyInfoFactory
        Throws:
        NoSuchMechanismException - if no Provider supports a KeyInfoFactory implementation for the DOM mechanism
        See Also:
        Provider

      • getMechanismType

        public final String getMechanismType()
        Returns the type of the XML processing mechanism and representation supported by this KeyInfoFactory (ex: "DOM")
        Returns:
        the XML processing mechanism type supported by this KeyInfoFactory

      • getProvider

        public final Provider getProvider()
        Returns the provider of this KeyInfoFactory.
        Returns:
        the provider of this KeyInfoFactory

      • newKeyInfo

        public abstract KeyInfo newKeyInfo(List content)
        Creates a KeyInfo containing the specified list of key information types.
        Parameters:
        content - a list of one or more XMLStructures representing key information types. The list is defensively copied to protect against subsequent modification.
        Returns:
        a KeyInfo
        Throws:
        NullPointerException - if content is null
        IllegalArgumentException - if content is empty
        ClassCastException - if content contains any entries that are not of type XMLStructure

      • newKeyInfo

        public abstract KeyInfo newKeyInfo(List content,
                                   String id)
        Creates a KeyInfo containing the specified list of key information types and optional id. The id parameter represents the value of an XML ID attribute and is useful for referencing the KeyInfo from other XML structures.
        Parameters:
        content - a list of one or more XMLStructures representing key information types. The list is defensively copied to protect against subsequent modification.
        id - the value of an XML ID (may be null)
        Returns:
        a KeyInfo
        Throws:
        NullPointerException - if content is null
        IllegalArgumentException - if content is empty
        ClassCastException - if content contains any entries that are not of type XMLStructure

      • newKeyName

        public abstract KeyName newKeyName(String name)
        Creates a KeyName from the specified name.
        Parameters:
        name - the name that identifies the key
        Returns:
        a KeyName
        Throws:
        NullPointerException - if name is null

      • newKeyValue

        public abstract KeyValue newKeyValue(PublicKey key)
                              throws KeyException
        Creates a KeyValue from the specified public key.
        Parameters:
        key - the public key
        Returns:
        a KeyValue
        Throws:
        KeyException - if the key's algorithm is not recognized or supported by this KeyInfoFactory
        NullPointerException - if key is null

      • newPGPData

        public abstract PGPData newPGPData(byte[] keyId)
        Creates a PGPData from the specified PGP public key identifier.
        Parameters:
        keyId - a PGP public key identifier as defined in RFC 2440, section 11.2. The array is cloned to protect against subsequent modification.
        Returns:
        a PGPData
        Throws:
        NullPointerException - if keyId is null
        IllegalArgumentException - if the key id is not in the correct format

      • newPGPData

        public abstract PGPData newPGPData(byte[] keyId,
                                   byte[] keyPacket,
                                   List other)
        Creates a PGPData from the specified PGP public key identifier, and optional key material packet and list of external elements.
        Parameters:
        keyId - a PGP public key identifier as defined in RFC 2440, section 11.2. The array is cloned to protect against subsequent modification.
        keyPacket - a PGP key material packet as defined in RFC 2440, section 5.5. The array is cloned to protect against subsequent modification. May be null.
        other - a list of XMLStructures representing elements from an external namespace. The list is defensively copied to protect against subsequent modification. May be null or empty.
        Returns:
        a PGPData
        Throws:
        NullPointerException - if keyId is null
        IllegalArgumentException - if the keyId or keyPacket is not in the correct format. For keyPacket, the format of the packet header is checked and the tag is verified that it is of type key material. The contents and format of the packet body are not checked.
        ClassCastException - if other contains any entries that are not of type XMLStructure

      • newPGPData

        public abstract PGPData newPGPData(byte[] keyPacket,
                                   List other)
        Creates a PGPData from the specified PGP key material packet and optional list of external elements.
        Parameters:
        keyPacket - a PGP key material packet as defined in RFC 2440, section 5.5. The array is cloned to protect against subsequent modification.
        other - a list of XMLStructures representing elements from an external namespace. The list is defensively copied to protect against subsequent modification. May be null or empty.
        Returns:
        a PGPData
        Throws:
        NullPointerException - if keyPacket is null
        IllegalArgumentException - if keyPacket is not in the correct format. For keyPacket, the format of the packet header is checked and the tag is verified that it is of type key material. The contents and format of the packet body are not checked.
        ClassCastException - if other contains any entries that are not of type XMLStructure

      • newRetrievalMethod

        public abstract RetrievalMethod newRetrievalMethod(String uri)
        Creates a RetrievalMethod from the specified URI.
        Parameters:
        uri - the URI that identifies the KeyInfo information to be retrieved
        Returns:
        a RetrievalMethod
        Throws:
        NullPointerException - if uri is null
        IllegalArgumentException - if uri is not RFC 2396 compliant

      • newRetrievalMethod

        public abstract RetrievalMethod newRetrievalMethod(String uri,
                                                   String type,
                                                   List transforms)
        Creates a RetrievalMethod from the specified parameters.
        Parameters:
        uri - the URI that identifies the KeyInfo information to be retrieved
        type - a URI that identifies the type of KeyInfo information to be retrieved (may be null)
        transforms - a list of Transforms. The list is defensively copied to protect against subsequent modification. May be null or empty.
        Returns:
        a RetrievalMethod
        Throws:
        NullPointerException - if uri is null
        IllegalArgumentException - if uri is not RFC 2396 compliant
        ClassCastException - if transforms contains any entries that are not of type Transform

      • newX509Data

        public abstract X509Data newX509Data(List content)
        Creates a X509Data containing the specified list of X.509 content.
        Parameters:
        content - a list of one or more X.509 content types. Valid types are String (subject names), byte[] (subject key ids), X509Certificate, X509CRL, or XMLStructure (X509IssuerSerial objects or elements from an external namespace). Subject names are distinguished names in RFC 2253 String format. Implementations MUST support the attribute type keywords defined in RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID). Implementations MAY support additional keywords. The list is defensively copied to protect against subsequent modification.
        Returns:
        a X509Data
        Throws:
        NullPointerException - if content is null
        IllegalArgumentException - if content is empty, or if a subject name is not RFC 2253 compliant or one of the attribute type keywords is not recognized.
        ClassCastException - if content contains any entries that are not of one of the valid types mentioned above

      • newX509IssuerSerial

        public abstract X509IssuerSerial newX509IssuerSerial(String issuerName,
                                                     BigInteger serialNumber)
        Creates an X509IssuerSerial from the specified X.500 issuer distinguished name and serial number.
        Parameters:
        issuerName - the issuer's distinguished name in RFC 2253 String format. Implementations MUST support the attribute type keywords defined in RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID). Implementations MAY support additional keywords.
        serialNumber - the serial number
        Returns:
        an X509IssuerSerial
        Throws:
        NullPointerException - if issuerName or serialNumber are null
        IllegalArgumentException - if the issuer name is not RFC 2253 compliant or one of the attribute type keywords is not recognized.

      • isFeatureSupported

        public abstract boolean isFeatureSupported(String feature)
        Indicates whether a specified feature is supported.
        Parameters:
        feature - the feature name (as an absolute URI)
        Returns:
        true if the specified feature is supported, false otherwise
        Throws:
        NullPointerException - if feature is null

      • getURIDereferencer

        public abstract URIDereferencer getURIDereferencer()
        Returns a reference to the URIDereferencer that is used by default to dereference URIs in RetrievalMethod objects.
        Returns:
        a reference to the default URIDereferencer

      • unmarshalKeyInfo

        public abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
                                  throws MarshalException
        Unmarshals a new KeyInfo instance from a mechanism-specific XMLStructure (ex: DOMStructure) instance.
        Parameters:
        xmlStructure - a mechanism-specific XML structure from which to unmarshal the keyinfo from
        Returns:
        the KeyInfo
        Throws:
        NullPointerException - if xmlStructure is null
        ClassCastException - if the type of xmlStructure is inappropriate for this factory
        MarshalException - if an unrecoverable exception occurs during unmarshalling
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeyName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface KeyName

  • All Superinterfaces:
    XMLStructure

    public interface KeyName
extends XMLStructure
    A representation of the XML KeyName element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A KeyName object contains a string value which may be used by the signer to communicate a key identifier to the recipient. The XML Schema Definition is defined as:
     <element name="KeyName" type="string"/>
    A KeyName instance may be created by invoking the newKeyName method of the KeyInfoFactory class, and passing it a String representing the name of the key; for example:
     KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 KeyName keyName = factory.newKeyName("Alice");
    Since:
    1.6
    See Also:
    KeyInfoFactory.newKeyName(String)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      Returns the name of this KeyName.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getName

        String getName()
        Returns the name of this KeyName.
        Returns:
        the name of this KeyName (never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface KeyValue

  • All Superinterfaces:
    XMLStructure

    public interface KeyValue
extends XMLStructure
    A representation of the XML KeyValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A KeyValue object contains a single public key that may be useful in validating the signature. The XML schema definition is defined as:
        <element name="KeyValue" type="ds:KeyValueType"/>
    <complexType name="KeyValueType" mixed="true">
      <choice>
        <element ref="ds:DSAKeyValue"/>
        <element ref="ds:RSAKeyValue"/>
        <any namespace="##other" processContents="lax"/>
      </choice>
    </complexType>

    <element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
    <complexType name="DSAKeyValueType">
      <sequence>
        <sequence minOccurs="0">
          <element name="P" type="ds:CryptoBinary"/>
          <element name="Q" type="ds:CryptoBinary"/>
        </sequence>
        <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
        <element name="Y" type="ds:CryptoBinary"/>
        <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
        <sequence minOccurs="0">
          <element name="Seed" type="ds:CryptoBinary"/>
          <element name="PgenCounter" type="ds:CryptoBinary"/>
        </sequence>
      </sequence>
    </complexType>

    <element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
    <complexType name="RSAKeyValueType">
      <sequence>
        <element name="Modulus" type="ds:CryptoBinary"/>
        <element name="Exponent" type="ds:CryptoBinary"/>
      </sequence>
    </complexType>
    A KeyValue instance may be created by invoking the newKeyValue method of the KeyInfoFactory class, and passing it a PublicKey representing the value of the public key. Here is an example of creating a KeyValue from a DSAPublicKey of a Certificate stored in a KeyStore:
     KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
 PublicKey dsaPublicKey = keyStore.getCertificate("myDSASigningCert").getPublicKey();
 KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 KeyValue keyValue = factory.newKeyValue(dsaPublicKey);
    This class returns the DSAKeyValue and RSAKeyValue elements as objects of type DSAPublicKey and RSAPublicKey, respectively. Note that not all of the fields in the schema are accessible as parameters of these types.
    Since:
    1.6
    See Also:
    KeyInfoFactory.newKeyValue(PublicKey)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DSA_TYPE
      URI identifying the DSA KeyValue KeyInfo type: http://www.w3.org/2000/09/xmldsig#DSAKeyValue.
      static String RSA_TYPE
      URI identifying the RSA KeyValue KeyInfo type: http://www.w3.org/2000/09/xmldsig#RSAKeyValue.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      PublicKey getPublicKey()
      Returns the public key of this KeyValue.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • DSA_TYPE

        static final String DSA_TYPE
        URI identifying the DSA KeyValue KeyInfo type: http://www.w3.org/2000/09/xmldsig#DSAKeyValue. This can be specified as the value of the type parameter of the RetrievalMethod class to describe a remote DSAKeyValue structure.
        See Also:
        Constant Field Values

      • RSA_TYPE

        static final String RSA_TYPE
        URI identifying the RSA KeyValue KeyInfo type: http://www.w3.org/2000/09/xmldsig#RSAKeyValue. This can be specified as the value of the type parameter of the RetrievalMethod class to describe a remote RSAKeyValue structure.
        See Also:
        Constant Field Values

    • Method Detail

      • getPublicKey

        PublicKey getPublicKey()
                throws KeyException
        Returns the public key of this KeyValue.
        Returns:
        the public key of this KeyValue
        Throws:
        KeyException - if this KeyValue cannot be converted to a PublicKey
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PGPData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface PGPData

  • All Superinterfaces:
    XMLStructure

    public interface PGPData
extends XMLStructure
    A representation of the XML PGPData element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A PGPData object is used to convey information related to PGP public key pairs and signatures on such keys. The XML Schema Definition is defined as:
        <element name="PGPData" type="ds:PGPDataType"/>
    <complexType name="PGPDataType">
      <choice>
        <sequence>
          <element name="PGPKeyID" type="base64Binary"/>
          <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
          <any namespace="##other" processContents="lax" minOccurs="0"
           maxOccurs="unbounded"/>
        </sequence>
        <sequence>
          <element name="PGPKeyPacket" type="base64Binary"/>
          <any namespace="##other" processContents="lax" minOccurs="0"
           maxOccurs="unbounded"/>
        </sequence>
      </choice>
    </complexType>
    A PGPData instance may be created by invoking one of the newPGPData methods of the KeyInfoFactory class, and passing it byte arrays representing the contents of the PGP public key identifier and/or PGP key material packet, and an optional list of elements from an external namespace.
    Since:
    1.6
    See Also:
    KeyInfoFactory.newPGPData(byte[]),
KeyInfoFactory.newPGPData(byte[], byte[], List),
KeyInfoFactory.newPGPData(byte[], List)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String TYPE
      URI identifying the PGPData KeyInfo type: http://www.w3.org/2000/09/xmldsig#PGPData.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List getExternalElements()
      Returns an unmodifiable list of XMLStructures representing elements from an external namespace.
      byte[] getKeyId()
      Returns the PGP public key identifier of this PGPData as defined in RFC 2440, section 11.2.
      byte[] getKeyPacket()
      Returns the PGP key material packet of this PGPData as defined in RFC 2440, section 5.5.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • TYPE

        static final String TYPE
        URI identifying the PGPData KeyInfo type: http://www.w3.org/2000/09/xmldsig#PGPData. This can be specified as the value of the type parameter of the RetrievalMethod class to describe a remote PGPData structure.
        See Also:
        Constant Field Values

    • Method Detail

      • getKeyId

        byte[] getKeyId()
        Returns the PGP public key identifier of this PGPData as defined in RFC 2440, section 11.2.
        Returns:
        the PGP public key identifier (may be null if not specified). Each invocation of this method returns a new clone to protect against subsequent modification.

      • getKeyPacket

        byte[] getKeyPacket()
        Returns the PGP key material packet of this PGPData as defined in RFC 2440, section 5.5.
        Returns:
        the PGP key material packet (may be null if not specified). Each invocation of this method returns a new clone to protect against subsequent modification.

      • getExternalElements

        List getExternalElements()
        Returns an unmodifiable list of XMLStructures representing elements from an external namespace.
        Returns:
        an unmodifiable list of XMLStructures (may be empty, but never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RetrievalMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface RetrievalMethod

  • All Superinterfaces:
    URIReference, XMLStructure

    public interface RetrievalMethod
extends URIReference, XMLStructure
    A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A RetrievalMethod object is used to convey a reference to KeyInfo information that is stored at another location. The XML schema definition is defined as:
       <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
   <complexType name="RetrievalMethodType">
     <sequence>
       <element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
     </sequence>
     <attribute name="URI" type="anyURI"/>
     <attribute name="Type" type="anyURI" use="optional"/>
   </complexType>
    A RetrievalMethod instance may be created by invoking one of the newRetrievalMethod methods of the KeyInfoFactory class, and passing it the URI identifying the location of the KeyInfo, an optional type URI identifying the type of KeyInfo, and an optional list of Transforms; for example:
       KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
   RetrievalMethod rm = factory.newRetrievalMethod
      ("#KeyValue-1", KeyValue.DSA_TYPE, Collections.singletonList(Transform.BASE64));
    Since:
    1.6
    See Also:
    KeyInfoFactory.newRetrievalMethod(String), KeyInfoFactory.newRetrievalMethod(String, String, List)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Data dereference(XMLCryptoContext context)
      Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
      List getTransforms()
      Returns an unmodifiable list of Transforms of this RetrievalMethod.
      String getURI()
      Returns the URI of the referenced KeyInfo information.

      • Methods inherited from interface javax.xml.crypto.URIReference

        getType

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getTransforms

        List getTransforms()
        Returns an unmodifiable list of Transforms of this RetrievalMethod.
        Returns:
        an unmodifiable list of Transform objects (may be empty but never null).

      • getURI

        String getURI()
        Returns the URI of the referenced KeyInfo information.
        Specified by:
        getURI in interface URIReference
        Returns:
        the URI of the referenced KeyInfo information in RFC 2396 format (never null)

      • dereference

        Data dereference(XMLCryptoContext context)
          throws URIReferenceException
        Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
        Parameters:
        context - an XMLCryptoContext that may contain additional useful information for dereferencing the URI. The context's baseURI and dereferencer parameters (if specified) are used to resolve and dereference this RetrievalMethod
        Returns:
        a Data object representing the raw contents of the KeyInfo information referenced by this RetrievalMethod. It is the caller's responsibility to convert the returned data to an appropriate KeyInfo object.
        Throws:
        NullPointerException - if context is null
        URIReferenceException - if there is an error while dereferencing
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


X509Data

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface X509Data

  • All Superinterfaces:
    XMLStructure

    public interface X509Data
extends XMLStructure
    A representation of the XML X509Data element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. An X509Data object contains one or more identifers of keys or X.509 certificates (or certificates' identifiers or a revocation list). The XML Schema Definition is defined as:
        <element name="X509Data" type="ds:X509DataType"/>
    <complexType name="X509DataType">
        <sequence maxOccurs="unbounded">
          <choice>
            <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
            <element name="X509SKI" type="base64Binary"/>
            <element name="X509SubjectName" type="string"/>
            <element name="X509Certificate" type="base64Binary"/>
            <element name="X509CRL" type="base64Binary"/>
            <any namespace="##other" processContents="lax"/>
          </choice>
        </sequence>
    </complexType>

    <complexType name="X509IssuerSerialType">
      <sequence>
        <element name="X509IssuerName" type="string"/>
        <element name="X509SerialNumber" type="integer"/>
      </sequence>
    </complexType>
    An X509Data instance may be created by invoking the newX509Data methods of the KeyInfoFactory class and passing it a list of one or more XMLStructures representing X.509 content; for example:
       KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
   X509Data x509Data = factory.newX509Data
       (Collections.singletonList("cn=Alice"));
    Since:
    1.6
    See Also:
    KeyInfoFactory.newX509Data(List)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String RAW_X509_CERTIFICATE_TYPE
      URI identifying the binary (ASN.1 DER) X.509 Certificate KeyInfo type: http://www.w3.org/2000/09/xmldsig#rawX509Certificate.
      static String TYPE
      URI identifying the X509Data KeyInfo type: http://www.w3.org/2000/09/xmldsig#X509Data.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List getContent()
      Returns an unmodifiable list of the content in this X509Data.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • TYPE

        static final String TYPE
        URI identifying the X509Data KeyInfo type: http://www.w3.org/2000/09/xmldsig#X509Data. This can be specified as the value of the type parameter of the RetrievalMethod class to describe a remote X509Data structure.
        See Also:
        Constant Field Values

      • RAW_X509_CERTIFICATE_TYPE

        static final String RAW_X509_CERTIFICATE_TYPE
        URI identifying the binary (ASN.1 DER) X.509 Certificate KeyInfo type: http://www.w3.org/2000/09/xmldsig#rawX509Certificate. This can be specified as the value of the type parameter of the RetrievalMethod class to describe a remote X509 Certificate.
        See Also:
        Constant Field Values

    • Method Detail

      • getContent

        List getContent()
        Returns an unmodifiable list of the content in this X509Data. Valid types are String (subject names), byte[] (subject key ids), X509Certificate, X509CRL, or XMLStructure (X509IssuerSerial objects or elements from an external namespace).
        Returns:
        an unmodifiable list of the content in this X509Data (never null or empty)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


X509IssuerSerial

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.keyinfo

Interface X509IssuerSerial

  • All Superinterfaces:
    XMLStructure

    public interface X509IssuerSerial
extends XMLStructure
    A representation of the XML X509IssuerSerial element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. An X509IssuerSerial object contains an X.509 issuer distinguished name (DN) and serial number pair. The XML schema definition is defined as:
       <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
   <complexType name="X509IssuerSerialType">
     <sequence>
       <element name="X509IssuerName" type="string"/>
       <element name="X509SerialNumber" type="integer"/>
     </sequence>
   </complexType>
    An X509IssuerSerial instance may be created by invoking the newX509IssuerSerial method of the KeyInfoFactory class, and passing it a String and BigInteger representing the X.500 DN and serial number. Here is an example of creating an X509IssuerSerial from the issuer DN and serial number of an existing X509Certificate:
     KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 X509IssuerSerial issuer = factory.newX509IssuerSerial
     (cert.getIssuerX500Principal().getName(), cert.getSerialNumber());
    Since:
    1.6
    See Also:
    X509Data.getContent(), KeyInfoFactory.newX509IssuerSerial(String, BigInteger)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getIssuerName()
      Returns the X.500 distinguished name of this X509IssuerSerial in RFC 2253 String format.
      BigInteger getSerialNumber()
      Returns the serial number of this X509IssuerSerial.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getIssuerName

        String getIssuerName()
        Returns the X.500 distinguished name of this X509IssuerSerial in RFC 2253 String format.
        Returns:
        the X.500 distinguished name in RFC 2253 String format (never null)

      • getSerialNumber

        BigInteger getSerialNumber()
        Returns the serial number of this X509IssuerSerial.
        Returns:
        the serial number (never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Manifest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface Manifest

  • All Superinterfaces:
    XMLStructure

    public interface Manifest
extends XMLStructure
    A representation of the XML Manifest element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

 <element name="Manifest" type="ds:ManifestType"/>
   <complexType name="ManifestType">
     <sequence>
       <element ref="ds:Reference" maxOccurs="unbounded"/>
     </sequence>
     <attribute name="Id" type="ID" use="optional"/>
   </complexType>
    A Manifest instance may be created by invoking one of the newManifest methods of the XMLSignatureFactory class; for example:
       XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
   List references = Collections.singletonList(factory.newReference
       ("#reference-1", DigestMethod.SHA1));
   Manifest manifest = factory.newManifest(references, "manifest-1");
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newManifest(List), XMLSignatureFactory.newManifest(List, String)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String TYPE
      URI that identifies the Manifest element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getId()
      Returns the Id of this Manifest.
      List getReferences()
      Returns an unmodifiable list of one or more References that are contained in this Manifest.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • TYPE

        static final String TYPE
        URI that identifies the Manifest element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).
        See Also:
        Constant Field Values

    • Method Detail

      • getId

        String getId()
        Returns the Id of this Manifest.
        Returns:
        the Id of this Manifest (or null if not specified)

      • getReferences

        List getReferences()
        Returns an unmodifiable list of one or more References that are contained in this Manifest.
        Returns:
        an unmodifiable list of one or more References
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Reference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface Reference

  • All Superinterfaces:
    URIReference, XMLStructure

    public interface Reference
extends URIReference, XMLStructure
    A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML schema is defined as:
     <element name="Reference" type="ds:ReferenceType"/>
 <complexType name="ReferenceType">
   <sequence>
     <element ref="ds:Transforms" minOccurs="0"/>
     <element ref="ds:DigestMethod"/>
     <element ref="ds:DigestValue"/>
   </sequence>
   <attribute name="Id" type="ID" use="optional"/>
   <attribute name="URI" type="anyURI" use="optional"/>
   <attribute name="Type" type="anyURI" use="optional"/>
 </complexType>

 <element name="DigestValue" type="ds:DigestValueType"/>
 <simpleType name="DigestValueType">
   <restriction base="base64Binary"/>
 </simpleType>

    A Reference instance may be created by invoking one of the newReference methods of the XMLSignatureFactory class; for example:

       XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
   Reference ref = factory.newReference
     ("http://www.ietf.org/rfc/rfc3275.txt",
      factory.newDigestMethod(DigestMethod.SHA1, null));
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newReference(String, DigestMethod), XMLSignatureFactory.newReference(String, DigestMethod, List, String, String)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      byte[] getCalculatedDigestValue()
      Returns the calculated digest value of this Reference after a validation operation.
      Data getDereferencedData()
      Returns the dereferenced data, if reference caching is enabled.
      InputStream getDigestInputStream()
      Returns the pre-digested input stream, if reference caching is enabled.
      DigestMethod getDigestMethod()
      Returns the digest method of this Reference.
      byte[] getDigestValue()
      Returns the digest value of this Reference.
      String getId()
      Returns the optional Id attribute of this Reference, which permits this reference to be referenced from elsewhere.
      List getTransforms()
      Returns an unmodifiable list of Transforms that are contained in this Reference.
      boolean validate(XMLValidateContext validateContext)
      Validates this reference.

      • Methods inherited from interface javax.xml.crypto.URIReference

        getType, getURI

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getTransforms

        List getTransforms()
        Returns an unmodifiable list of Transforms that are contained in this Reference.
        Returns:
        an unmodifiable list of Transforms (may be empty but never null)

      • getDigestMethod

        DigestMethod getDigestMethod()
        Returns the digest method of this Reference.
        Returns:
        the digest method

      • getId

        String getId()
        Returns the optional Id attribute of this Reference, which permits this reference to be referenced from elsewhere.
        Returns:
        the Id attribute (may be null if not specified)

      • getDigestValue

        byte[] getDigestValue()
        Returns the digest value of this Reference.
        Returns:
        the raw digest value, or null if this reference has not been digested yet. Each invocation of this method returns a new clone to protect against subsequent modification.

      • getCalculatedDigestValue

        byte[] getCalculatedDigestValue()
        Returns the calculated digest value of this Reference after a validation operation. This method is useful for debugging if the reference fails to validate.
        Returns:
        the calculated digest value, or null if this reference has not been validated yet. Each invocation of this method returns a new clone to protect against subsequent modification.

      • validate

        boolean validate(XMLValidateContext validateContext)
          throws XMLSignatureException
        Validates this reference. This method verifies the digest of this reference.

        This method only validates the reference the first time it is invoked. On subsequent invocations, it returns a cached result.

        Parameters:
        validateContext - the validating context
        Returns:
        true if this reference was validated successfully; false otherwise
        Throws:
        NullPointerException - if validateContext is null
        XMLSignatureException - if an unexpected exception occurs while validating the reference

      • getDereferencedData

        Data getDereferencedData()
        Returns the dereferenced data, if reference caching is enabled. This is the result of dereferencing the URI of this reference during a validation or generation operation.
        Returns:
        the dereferenced data, or null if reference caching is not enabled or this reference has not been generated or validated

      • getDigestInputStream

        InputStream getDigestInputStream()
        Returns the pre-digested input stream, if reference caching is enabled. This is the input to the digest operation during a validation or signing operation.
        Returns:
        an input stream containing the pre-digested input, or null if reference caching is not enabled or this reference has not been generated or validated
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SignatureMethod

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface SignatureMethod

  • All Superinterfaces:
    AlgorithmMethod, XMLStructure

    public interface SignatureMethod
extends XMLStructure, AlgorithmMethod
    A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

       <element name="SignatureMethod" type="ds:SignatureMethodType"/>
     <complexType name="SignatureMethodType" mixed="true">
       <sequence>
         <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
         <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
           <!-- (0,unbounded) elements from (1,1) namespace -->
       </sequence>
       <attribute name="Algorithm" type="anyURI" use="required"/>
     </complexType>
    A SignatureMethod instance may be created by invoking the newSignatureMethod method of the XMLSignatureFactory class.
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newSignatureMethod(String, SignatureMethodParameterSpec)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DSA_SHA1
      The DSAwithSHA1 (DSS) signature method algorithm URI.
      static String HMAC_SHA1
      The HMAC-SHA1 MAC signature method algorithm URI
      static String RSA_SHA1
      The RSAwithSHA1 (PKCS #1) signature method algorithm URI.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AlgorithmParameterSpec getParameterSpec()
      Returns the algorithm-specific input parameters of this SignatureMethod.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

      • Methods inherited from interface javax.xml.crypto.AlgorithmMethod

        getAlgorithm

    • Field Detail

      • DSA_SHA1

        static final String DSA_SHA1
        The DSAwithSHA1 (DSS) signature method algorithm URI.
        See Also:
        Constant Field Values

      • RSA_SHA1

        static final String RSA_SHA1
        The RSAwithSHA1 (PKCS #1) signature method algorithm URI.
        See Also:
        Constant Field Values

      • HMAC_SHA1

        static final String HMAC_SHA1
        The HMAC-SHA1 MAC signature method algorithm URI
        See Also:
        Constant Field Values

    • Method Detail

      • getParameterSpec

        AlgorithmParameterSpec getParameterSpec()
        Returns the algorithm-specific input parameters of this SignatureMethod.

        The returned parameters can be typecast to a SignatureMethodParameterSpec object.

        Specified by:
        getParameterSpec in interface AlgorithmMethod
        Returns:
        the algorithm-specific input parameters of this SignatureMethod (may be null if not specified)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SignatureProperties

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface SignatureProperties

  • All Superinterfaces:
    XMLStructure

    public interface SignatureProperties
extends XMLStructure
    A representation of the XML SignatureProperties element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
   <complexType name="SignaturePropertiesType">
     <sequence>
       <element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
     </sequence>
     <attribute name="Id" type="ID" use="optional"/>
   </complexType>
    A SignatureProperties instance may be created by invoking the newSignatureProperties method of the XMLSignatureFactory class; for example:
       XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
   SignatureProperties properties =
      factory.newSignatureProperties(props, "signature-properties-1");
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newSignatureProperties(List, String), SignatureProperty

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String TYPE
      URI that identifies the SignatureProperties element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getId()
      Returns the Id of this SignatureProperties.
      List getProperties()
      Returns an unmodifiable list of one or more SignaturePropertys that are contained in this SignatureProperties.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • TYPE

        static final String TYPE
        URI that identifies the SignatureProperties element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).
        See Also:
        Constant Field Values

    • Method Detail

      • getId

        String getId()
        Returns the Id of this SignatureProperties.
        Returns:
        the Id of this SignatureProperties (or null if not specified)

      • getProperties

        List getProperties()
        Returns an unmodifiable list of one or more SignaturePropertys that are contained in this SignatureProperties.
        Returns:
        an unmodifiable list of one or more SignaturePropertys
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SignatureProperty

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface SignatureProperty

  • All Superinterfaces:
    XMLStructure

    public interface SignatureProperty
extends XMLStructure
    A representation of the XML SignatureProperty element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
   <complexType name="SignaturePropertyType" mixed="true">
     <choice maxOccurs="unbounded">
       <any namespace="##other" processContents="lax"/>
       <!-- (1,1) elements from (1, unbounded) namespaces -->
     </choice>
     <attribute name="Target" type="anyURI" use="required"/>
     <attribute name="Id" type="ID" use="optional"/>
   </complexType>
    A SignatureProperty instance may be created by invoking the newSignatureProperty method of the XMLSignatureFactory class; for example:
       XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
   SignatureProperty property = factory.newSignatureProperty
      (Collections.singletonList(content), "#Signature-1", "TimeStamp");
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newSignatureProperty(List, String, String), SignatureProperties

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List getContent()
      Returns an unmodifiable list of one or more XMLStructures that are contained in this SignatureProperty.
      String getId()
      Returns the Id of this SignatureProperty.
      String getTarget()
      Returns the target URI of this SignatureProperty.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getTarget

        String getTarget()
        Returns the target URI of this SignatureProperty.
        Returns:
        the target URI of this SignatureProperty (never null)

      • getId

        String getId()
        Returns the Id of this SignatureProperty.
        Returns:
        the Id of this SignatureProperty (or null if not specified)

      • getContent

        List getContent()
        Returns an unmodifiable list of one or more XMLStructures that are contained in this SignatureProperty. These represent additional information items concerning the generation of the XMLSignature (i.e. date/time stamp or serial numbers of cryptographic hardware used in signature generation).
        Returns:
        an unmodifiable list of one or more XMLStructures
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SignedInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface SignedInfo

  • All Superinterfaces:
    XMLStructure

    public interface SignedInfo
extends XMLStructure
    An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

 <element name="SignedInfo" type="ds:SignedInfoType"/>
 <complexType name="SignedInfoType">
   <sequence>
     <element ref="ds:CanonicalizationMethod"/>
     <element ref="ds:SignatureMethod"/>
     <element ref="ds:Reference" maxOccurs="unbounded"/>
   </sequence>
   <attribute name="Id" type="ID" use="optional"/>
 </complexType>
    A SignedInfo instance may be created by invoking one of the newSignedInfo methods of the XMLSignatureFactory class.
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newSignedInfo(CanonicalizationMethod, SignatureMethod, List), XMLSignatureFactory.newSignedInfo(CanonicalizationMethod, SignatureMethod, List, String)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      CanonicalizationMethod getCanonicalizationMethod()
      Returns the canonicalization method of this SignedInfo.
      InputStream getCanonicalizedData()
      Returns the canonicalized signed info bytes after a signing or validation operation.
      String getId()
      Returns the optional Id attribute of this SignedInfo.
      List getReferences()
      Returns an unmodifiable list of one or more References.
      SignatureMethod getSignatureMethod()
      Returns the signature method of this SignedInfo.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getCanonicalizationMethod

        CanonicalizationMethod getCanonicalizationMethod()
        Returns the canonicalization method of this SignedInfo.
        Returns:
        the canonicalization method

      • getSignatureMethod

        SignatureMethod getSignatureMethod()
        Returns the signature method of this SignedInfo.
        Returns:
        the signature method

      • getReferences

        List getReferences()
        Returns an unmodifiable list of one or more References.
        Returns:
        an unmodifiable list of one or more References

      • getId

        String getId()
        Returns the optional Id attribute of this SignedInfo.
        Returns:
        the id (may be null if not specified)

      • getCanonicalizedData

        InputStream getCanonicalizedData()
        Returns the canonicalized signed info bytes after a signing or validation operation. This method is useful for debugging.
        Returns:
        an InputStream containing the canonicalized bytes, or null if this SignedInfo has not been signed or validated yet
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.crypto.dsig.spec

Parameter classes for XML digital signatures.

See: Description

  • Interface Summary
    Interface Description
    C14NMethodParameterSpec
    A specification of algorithm parameters for a CanonicalizationMethod Algorithm.
    DigestMethodParameterSpec
    A specification of algorithm parameters for a DigestMethod algorithm.
    SignatureMethodParameterSpec
    A specification of algorithm parameters for an XML SignatureMethod algorithm.
    TransformParameterSpec
    A specification of algorithm parameters for a Transform algorithm.
  • Class Summary
    Class Description
    ExcC14NParameterSpec
    Parameters for the W3C Recommendation: Exclusive XML Canonicalization (C14N) algorithm.
    HMACParameterSpec
    Parameters for the XML Signature HMAC Algorithm.
    XPathFilter2ParameterSpec
    Parameters for the W3C Recommendation XPath Filter 2.0 Transform Algorithm.
    XPathFilterParameterSpec
    Parameters for the XPath Filtering Transform Algorithm.
    XPathType
    The XML Schema Definition of the XPath element as defined in the W3C Recommendation for XML-Signature XPath Filter 2.0:
    XPathType.Filter
    Represents the filter set operation.
    XSLTTransformParameterSpec
    Parameters for the XSLT Transform Algorithm.

Package javax.xml.crypto.dsig.spec Description

Parameter classes for XML digital signatures. This package contains interfaces and classes representing input parameters for the digest, signature, transform, or canonicalization algorithms used in the processing of XML signatures.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing
  • Exclusive XML Canonicalization algorithm: W3C Recommendation
  • XPath Filter 2.0 Transform Algorithm: W3C Recommendation

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


C14NMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Interface C14NMethodParameterSpec

  • All Superinterfaces:
    AlgorithmParameterSpec, TransformParameterSpec
    All Known Implementing Classes:
    ExcC14NParameterSpec

    public interface C14NMethodParameterSpec
extends TransformParameterSpec
    A specification of algorithm parameters for a CanonicalizationMethod Algorithm. The purpose of this interface is to group (and provide type safety for) all canonicalization (C14N) parameter specifications. All canonicalization parameter specifications must implement this interface.
    Since:
    1.6
    See Also:
    CanonicalizationMethod
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DigestMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Interface DigestMethodParameterSpec

  • All Superinterfaces:
    AlgorithmParameterSpec

    public interface DigestMethodParameterSpec
extends AlgorithmParameterSpec
    A specification of algorithm parameters for a DigestMethod algorithm. The purpose of this interface is to group (and provide type safety for) all digest method parameter specifications. All digest method parameter specifications must implement this interface.
    Since:
    1.6
    See Also:
    DigestMethod
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.spec Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.crypto.dsig.spec

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.ExcC14NParameterSpec (implements javax.xml.crypto.dsig.spec.C14NMethodParameterSpec)
    • javax.xml.crypto.dsig.spec.HMACParameterSpec (implements javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec)
    • javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec (implements javax.xml.crypto.dsig.spec.TransformParameterSpec)
    • javax.xml.crypto.dsig.spec.XPathFilterParameterSpec (implements javax.xml.crypto.dsig.spec.TransformParameterSpec)
    • javax.xml.crypto.dsig.spec.XPathType
    • javax.xml.crypto.dsig.spec.XPathType.Filter
    • javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec (implements javax.xml.crypto.dsig.spec.TransformParameterSpec)

Interface Hierarchy

  • java.security.spec.AlgorithmParameterSpec
    • javax.xml.crypto.dsig.spec.DigestMethodParameterSpec
    • javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec
    • javax.xml.crypto.dsig.spec.TransformParameterSpec
      • javax.xml.crypto.dsig.spec.C14NMethodParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SignatureMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Interface SignatureMethodParameterSpec

  • All Superinterfaces:
    AlgorithmParameterSpec
    All Known Implementing Classes:
    HMACParameterSpec

    public interface SignatureMethodParameterSpec
extends AlgorithmParameterSpec
    A specification of algorithm parameters for an XML SignatureMethod algorithm. The purpose of this interface is to group (and provide type safety for) all signature method parameter specifications. All signature method parameter specifications must implement this interface.
    Since:
    1.6
    See Also:
    SignatureMethod
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Interface TransformParameterSpec

  • All Superinterfaces:
    AlgorithmParameterSpec
    All Known Subinterfaces:
    C14NMethodParameterSpec
    All Known Implementing Classes:
    ExcC14NParameterSpec, XPathFilter2ParameterSpec, XPathFilterParameterSpec, XSLTTransformParameterSpec

    public interface TransformParameterSpec
extends AlgorithmParameterSpec
    A specification of algorithm parameters for a Transform algorithm. The purpose of this interface is to group (and provide type safety for) all transform parameter specifications. All transform parameter specifications must implement this interface.
    Since:
    1.6
    See Also:
    Transform
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.crypto.dsig.spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.crypto.dsig.spec

  • Packages that use javax.xml.crypto.dsig.spec
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.
  • Classes in javax.xml.crypto.dsig.spec used by javax.xml.crypto.dsig
    Class and Description
    C14NMethodParameterSpec
    A specification of algorithm parameters for a CanonicalizationMethod Algorithm.
    DigestMethodParameterSpec
    A specification of algorithm parameters for a DigestMethod algorithm.
    SignatureMethodParameterSpec
    A specification of algorithm parameters for an XML SignatureMethod algorithm.
    TransformParameterSpec
    A specification of algorithm parameters for a Transform algorithm.
  • Classes in javax.xml.crypto.dsig.spec used by javax.xml.crypto.dsig.spec
    Class and Description
    C14NMethodParameterSpec
    A specification of algorithm parameters for a CanonicalizationMethod Algorithm.
    SignatureMethodParameterSpec
    A specification of algorithm parameters for an XML SignatureMethod algorithm.
    TransformParameterSpec
    A specification of algorithm parameters for a Transform algorithm.
    XPathType.Filter
    Represents the filter set operation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.ExcC14NParameterSpec

No usage of javax.xml.crypto.dsig.spec.ExcC14NParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.HMACParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.HMACParameterSpec

No usage of javax.xml.crypto.dsig.spec.HMACParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec

No usage of javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.XPathFilterParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.XPathFilterParameterSpec

No usage of javax.xml.crypto.dsig.spec.XPathFilterParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.XPathType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.XPathType

No usage of javax.xml.crypto.dsig.spec.XPathType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.XPathType.Filter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.XPathType.Filter

  • Packages that use XPathType.Filter
    Package Description
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.

    • Uses of XPathType.Filter in javax.xml.crypto.dsig.spec

      Fields in javax.xml.crypto.dsig.spec declared as XPathType.Filter
      Modifier and Type Field and Description
      static XPathType.Filter XPathType.Filter.INTERSECT
      The intersect filter operation.
      static XPathType.Filter XPathType.Filter.SUBTRACT
      The subtract filter operation.
      static XPathType.Filter XPathType.Filter.UNION
      The union filter operation.
      Methods in javax.xml.crypto.dsig.spec that return XPathType.Filter
      Modifier and Type Method and Description
      XPathType.Filter XPathType.getFilter()
      Returns the filter operation.
      Constructors in javax.xml.crypto.dsig.spec with parameters of type XPathType.Filter
      Constructor and Description
      XPathType(String expression, XPathType.Filter filter)
      Creates an XPathType instance with the specified XPath expression and filter.
      XPathType(String expression, XPathType.Filter filter, Map namespaceMap)
      Creates an XPathType instance with the specified XPath expression, filter, and namespace map.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec

No usage of javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.spec.C14NMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.spec.C14NMethodParameterSpec

  • Packages that use C14NMethodParameterSpec
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.

    • Uses of C14NMethodParameterSpec in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type C14NMethodParameterSpec
      Modifier and Type Method and Description
      abstract CanonicalizationMethod XMLSignatureFactory.newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.

    • Uses of C14NMethodParameterSpec in javax.xml.crypto.dsig.spec

      Classes in javax.xml.crypto.dsig.spec that implement C14NMethodParameterSpec
      Modifier and Type Class and Description
      class  ExcC14NParameterSpec
      Parameters for the W3C Recommendation: Exclusive XML Canonicalization (C14N) algorithm.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.spec.DigestMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.spec.DigestMethodParameterSpec

  • Packages that use DigestMethodParameterSpec
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.

    • Uses of DigestMethodParameterSpec in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type DigestMethodParameterSpec
      Modifier and Type Method and Description
      abstract DigestMethod XMLSignatureFactory.newDigestMethod(String algorithm, DigestMethodParameterSpec params)
      Creates a DigestMethod for the specified algorithm URI and parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec

  • Packages that use SignatureMethodParameterSpec
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.

    • Uses of SignatureMethodParameterSpec in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type SignatureMethodParameterSpec
      Modifier and Type Method and Description
      abstract SignatureMethod XMLSignatureFactory.newSignatureMethod(String algorithm, SignatureMethodParameterSpec params)
      Creates a SignatureMethod for the specified algorithm URI and parameters.

    • Uses of SignatureMethodParameterSpec in javax.xml.crypto.dsig.spec

      Classes in javax.xml.crypto.dsig.spec that implement SignatureMethodParameterSpec
      Modifier and Type Class and Description
      class  HMACParameterSpec
      Parameters for the XML Signature HMAC Algorithm.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.crypto.dsig.spec.TransformParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.crypto.dsig.spec.TransformParameterSpec

  • Packages that use TransformParameterSpec
    Package Description
    javax.xml.crypto.dsig
    Classes for generating and validating XML digital signatures.
    javax.xml.crypto.dsig.spec
    Parameter classes for XML digital signatures.

    • Uses of TransformParameterSpec in javax.xml.crypto.dsig

      Methods in javax.xml.crypto.dsig with parameters of type TransformParameterSpec
      Modifier and Type Method and Description
      abstract void TransformService.init(TransformParameterSpec params)
      Initializes this TransformService with the specified parameters.
      abstract Transform XMLSignatureFactory.newTransform(String algorithm, TransformParameterSpec params)
      Creates a Transform for the specified algorithm URI and parameters.

    • Uses of TransformParameterSpec in javax.xml.crypto.dsig.spec

      Subinterfaces of TransformParameterSpec in javax.xml.crypto.dsig.spec
      Modifier and Type Interface and Description
      interface  C14NMethodParameterSpec
      A specification of algorithm parameters for a CanonicalizationMethod Algorithm.
      Classes in javax.xml.crypto.dsig.spec that implement TransformParameterSpec
      Modifier and Type Class and Description
      class  ExcC14NParameterSpec
      Parameters for the W3C Recommendation: Exclusive XML Canonicalization (C14N) algorithm.
      class  XPathFilter2ParameterSpec
      Parameters for the W3C Recommendation XPath Filter 2.0 Transform Algorithm.
      class  XPathFilterParameterSpec
      Parameters for the XPath Filtering Transform Algorithm.
      class  XSLTTransformParameterSpec
      Parameters for the XSLT Transform Algorithm.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ExcC14NParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class ExcC14NParameterSpec

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.ExcC14NParameterSpec
  • All Implemented Interfaces:
    AlgorithmParameterSpec, C14NMethodParameterSpec, TransformParameterSpec

    public final class ExcC14NParameterSpec
extends Object
implements C14NMethodParameterSpec
    Parameters for the W3C Recommendation: Exclusive XML Canonicalization (C14N) algorithm. The parameters include an optional inclusive namespace prefix list. The XML Schema Definition of the Exclusive XML Canonicalization parameters is defined as:

 <schema xmlns="http://www.w3.org/2001/XMLSchema"
         xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
         targetNamespace="http://www.w3.org/2001/10/xml-exc-c14n#"
         version="0.1" elementFormDefault="qualified">

 <element name="InclusiveNamespaces" type="ec:InclusiveNamespaces"/>
 <complexType name="InclusiveNamespaces">
   <attribute name="PrefixList" type="xsd:string"/>
 </complexType>
 </schema>
    Since:
    1.6
    See Also:
    CanonicalizationMethod

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DEFAULT
      Indicates the default namespace ("#default").

    • Constructor Summary

      Constructors
      Constructor and Description
      ExcC14NParameterSpec()
      Creates a ExcC14NParameterSpec with an empty prefix list.
      ExcC14NParameterSpec(List prefixList)
      Creates a ExcC14NParameterSpec with the specified list of prefixes.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      List getPrefixList()
      Returns the inclusive namespace prefix list.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • DEFAULT

        public static final String DEFAULT
        Indicates the default namespace ("#default").
        See Also:
        Constant Field Values

    • Constructor Detail

      • ExcC14NParameterSpec

        public ExcC14NParameterSpec()
        Creates a ExcC14NParameterSpec with an empty prefix list.

      • ExcC14NParameterSpec

        public ExcC14NParameterSpec(List prefixList)
        Creates a ExcC14NParameterSpec with the specified list of prefixes. The list is copied to protect against subsequent modification.
        Parameters:
        prefixList - the inclusive namespace prefix list. Each entry in the list is a String that represents a namespace prefix.
        Throws:
        NullPointerException - if prefixList is null
        ClassCastException - if any of the entries in the list are not of type String

    • Method Detail

      • getPrefixList

        public List getPrefixList()
        Returns the inclusive namespace prefix list. Each entry in the list is a String that represents a namespace prefix.

        This implementation returns an unmodifiable list.

        Returns:
        the inclusive namespace prefix list (may be empty but never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HMACParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class HMACParameterSpec

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.HMACParameterSpec
  • All Implemented Interfaces:
    AlgorithmParameterSpec, SignatureMethodParameterSpec

    public final class HMACParameterSpec
extends Object
implements SignatureMethodParameterSpec
    Parameters for the XML Signature HMAC Algorithm. The parameters include an optional output length which specifies the MAC truncation length in bits. The resulting HMAC will be truncated to the specified number of bits. If the parameter is not specified, then this implies that all the bits of the hash are to be output. The XML Schema Definition of the HMACOutputLength element is defined as:

 <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
 <simpleType name="HMACOutputLengthType">
   <restriction base="integer"/>
 </simpleType>
    Since:
    1.6
    See Also:
    SignatureMethod, RFC 2104

    • Constructor Summary

      Constructors
      Constructor and Description
      HMACParameterSpec(int outputLength)
      Creates an HMACParameterSpec with the specified truncation length.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getOutputLength()
      Returns the truncation length.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • HMACParameterSpec

        public HMACParameterSpec(int outputLength)
        Creates an HMACParameterSpec with the specified truncation length.
        Parameters:
        outputLength - the truncation length in number of bits

    • Method Detail

      • getOutputLength

        public int getOutputLength()
        Returns the truncation length.
        Returns:
        the truncation length in number of bits
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFilter2ParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class XPathFilter2ParameterSpec

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec
  • All Implemented Interfaces:
    AlgorithmParameterSpec, TransformParameterSpec

    public final class XPathFilter2ParameterSpec
extends Object
implements TransformParameterSpec
    Parameters for the W3C Recommendation XPath Filter 2.0 Transform Algorithm. The parameters include a list of one or more XPathType objects.
    Since:
    1.6
    See Also:
    Transform, XPathFilterParameterSpec

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathFilter2ParameterSpec(List xPathList)
      Creates an XPathFilter2ParameterSpec.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      List getXPathList()
      Returns a list of one or more XPathType objects.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XPathFilter2ParameterSpec

        public XPathFilter2ParameterSpec(List xPathList)
        Creates an XPathFilter2ParameterSpec.
        Parameters:
        xPathList - a list of one or more XPathType objects. The list is defensively copied to protect against subsequent modification.
        Throws:
        ClassCastException - if xPathList contains any entries that are not of type XPathType
        IllegalArgumentException - if xPathList is empty
        NullPointerException - if xPathList is null

    • Method Detail

      • getXPathList

        public List getXPathList()
        Returns a list of one or more XPathType objects.

        This implementation returns an unmodifiable list.

        Returns:
        a List of XPathType objects (never null or empty)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFilterParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class XPathFilterParameterSpec

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.XPathFilterParameterSpec
  • All Implemented Interfaces:
    AlgorithmParameterSpec, TransformParameterSpec

    public final class XPathFilterParameterSpec
extends Object
implements TransformParameterSpec
    Parameters for the XPath Filtering Transform Algorithm. The parameters include the XPath expression and an optional Map of additional namespace prefix mappings. The XML Schema Definition of the XPath Filtering transform parameters is defined as:

 <element name="XPath" type="string"/>
    Since:
    1.6
    See Also:
    Transform

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathFilterParameterSpec(String xPath)
      Creates an XPathFilterParameterSpec with the specified XPath expression.
      XPathFilterParameterSpec(String xPath, Map namespaceMap)
      Creates an XPathFilterParameterSpec with the specified XPath expression and namespace map.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Map getNamespaceMap()
      Returns a map of namespace prefixes.
      String getXPath()
      Returns the XPath expression to be evaluated.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XPathFilterParameterSpec

        public XPathFilterParameterSpec(String xPath)
        Creates an XPathFilterParameterSpec with the specified XPath expression.
        Parameters:
        xPath - the XPath expression to be evaluated
        Throws:
        NullPointerException - if xPath is null

      • XPathFilterParameterSpec

        public XPathFilterParameterSpec(String xPath,
                                Map namespaceMap)
        Creates an XPathFilterParameterSpec with the specified XPath expression and namespace map. The map is copied to protect against subsequent modification.
        Parameters:
        xPath - the XPath expression to be evaluated
        namespaceMap - the map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.
        Throws:
        NullPointerException - if xPath or namespaceMap are null
        ClassCastException - if any of the map's keys or entries are not of type String

    • Method Detail

      • getXPath

        public String getXPath()
        Returns the XPath expression to be evaluated.
        Returns:
        the XPath expression to be evaluated

      • getNamespaceMap

        public Map getNamespaceMap()
        Returns a map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.

        This implementation returns an unmodifiable map.

        Returns:
        a Map of namespace prefixes to namespace URIs (may be empty, but never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class XPathType

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.XPathType

  • public class XPathType
extends Object
    The XML Schema Definition of the XPath element as defined in the W3C Recommendation for XML-Signature XPath Filter 2.0:

 <schema xmlns="http://www.w3.org/2001/XMLSchema"
         xmlns:xf="http://www.w3.org/2002/06/xmldsig-filter2"
         targetNamespace="http://www.w3.org/2002/06/xmldsig-filter2"
         version="0.1" elementFormDefault="qualified">

 <element name="XPath"
          type="xf:XPathType"/>

 <complexType name="XPathType">
   <simpleContent>
     <extension base="string">
       <attribute name="Filter">
         <simpleType>
           <restriction base="string">
             <enumeration value="intersect"/>
             <enumeration value="subtract"/>
             <enumeration value="union"/>
           </restriction>
         </simpleType>
       </attribute>
     </extension>
   </simpleContent>
 </complexType>
    Since:
    1.6
    See Also:
    XPathFilter2ParameterSpec

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  XPathType.Filter
      Represents the filter set operation.

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathType(String expression, XPathType.Filter filter)
      Creates an XPathType instance with the specified XPath expression and filter.
      XPathType(String expression, XPathType.Filter filter, Map namespaceMap)
      Creates an XPathType instance with the specified XPath expression, filter, and namespace map.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getExpression()
      Returns the XPath expression to be evaluated.
      XPathType.Filter getFilter()
      Returns the filter operation.
      Map getNamespaceMap()
      Returns a map of namespace prefixes.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XPathType

        public XPathType(String expression,
                 XPathType.Filter filter)
        Creates an XPathType instance with the specified XPath expression and filter.
        Parameters:
        expression - the XPath expression to be evaluated
        filter - the filter operation (XPathType.Filter.INTERSECT, XPathType.Filter.SUBTRACT, or XPathType.Filter.UNION)
        Throws:
        NullPointerException - if expression or filter is null

      • XPathType

        public XPathType(String expression,
                 XPathType.Filter filter,
                 Map namespaceMap)
        Creates an XPathType instance with the specified XPath expression, filter, and namespace map. The map is copied to protect against subsequent modification.
        Parameters:
        expression - the XPath expression to be evaluated
        filter - the filter operation (XPathType.Filter.INTERSECT, XPathType.Filter.SUBTRACT, or XPathType.Filter.UNION)
        namespaceMap - the map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.
        Throws:
        NullPointerException - if expression, filter or namespaceMap are null
        ClassCastException - if any of the map's keys or entries are not of type String

    • Method Detail

      • getExpression

        public String getExpression()
        Returns the XPath expression to be evaluated.
        Returns:
        the XPath expression to be evaluated

      • getFilter

        public XPathType.Filter getFilter()
        Returns the filter operation.
        Returns:
        the filter operation

      • getNamespaceMap

        public Map getNamespaceMap()
        Returns a map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.

        This implementation returns an unmodifiable map.

        Returns:
        a Map of namespace prefixes to namespace URIs (may be empty, but never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathType.Filter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class XPathType.Filter

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.XPathType.Filter
  • Enclosing class:
    XPathType

    public static class XPathType.Filter
extends Object
    Represents the filter set operation.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static XPathType.Filter INTERSECT
      The intersect filter operation.
      static XPathType.Filter SUBTRACT
      The subtract filter operation.
      static XPathType.Filter UNION
      The union filter operation.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String toString()
      Returns the string form of the operation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • INTERSECT

        public static final XPathType.Filter INTERSECT
        The intersect filter operation.

      • SUBTRACT

        public static final XPathType.Filter SUBTRACT
        The subtract filter operation.

      • UNION

        public static final XPathType.Filter UNION
        The union filter operation.

    • Method Detail

      • toString

        public String toString()
        Returns the string form of the operation.
        Overrides:
        toString in class Object
        Returns:
        the string form of the operation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XSLTTransformParameterSpec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig.spec

Class XSLTTransformParameterSpec

  • java.lang.Object
    • javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec
  • All Implemented Interfaces:
    AlgorithmParameterSpec, TransformParameterSpec

    public final class XSLTTransformParameterSpec
extends Object
implements TransformParameterSpec
    Parameters for the XSLT Transform Algorithm. The parameters include a namespace-qualified stylesheet element.

    An XSLTTransformParameterSpec is instantiated with a mechanism-dependent (ex: DOM) stylesheet element. For example:

       DOMStructure stylesheet = new DOMStructure(element)
   XSLTTransformParameterSpec spec = new XSLTransformParameterSpec(stylesheet);
    where element is an Element containing the namespace-qualified stylesheet element.
    Since:
    1.6
    See Also:
    Transform

    • Constructor Summary

      Constructors
      Constructor and Description
      XSLTTransformParameterSpec(XMLStructure stylesheet)
      Creates an XSLTTransformParameterSpec with the specified stylesheet.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      XMLStructure getStylesheet()
      Returns the stylesheet.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XSLTTransformParameterSpec

        public XSLTTransformParameterSpec(XMLStructure stylesheet)
        Creates an XSLTTransformParameterSpec with the specified stylesheet.
        Parameters:
        stylesheet - the XSLT stylesheet to be used
        Throws:
        NullPointerException - if stylesheet is null

    • Method Detail

      • getStylesheet

        public XMLStructure getStylesheet()
        Returns the stylesheet.
        Returns:
        the stylesheet
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface Transform

  • All Superinterfaces:
    AlgorithmMethod, XMLStructure
    All Known Subinterfaces:
    CanonicalizationMethod
    All Known Implementing Classes:
    TransformService

    public interface Transform
extends XMLStructure, AlgorithmMethod
    A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:
     <element name="Transform" type="ds:TransformType"/>
   <complexType name="TransformType" mixed="true">
     <choice minOccurs="0" maxOccurs="unbounded">
       <any namespace="##other" processContents="lax"/>
       <!-- (1,1) elements from (0,unbounded) namespaces -->
       <element name="XPath" type="string"/>
     </choice>
     <attribute name="Algorithm" type="anyURI" use="required"/>
   </complexType>
    A Transform instance may be created by invoking the newTransform method of the XMLSignatureFactory class.
    Since:
    1.6
    See Also:
    XMLSignatureFactory.newTransform(String, TransformParameterSpec)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String BASE64
      The Base64 transform algorithm URI.
      static String ENVELOPED
      The Enveloped Signature transform algorithm URI.
      static String XPATH
      The XPath transform algorithm URI.
      static String XPATH2
      The XPath Filter 2 transform algorithm URI.
      static String XSLT
      The XSLT transform algorithm URI.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AlgorithmParameterSpec getParameterSpec()
      Returns the algorithm-specific input parameters associated with this Transform.
      Data transform(Data data, XMLCryptoContext context)
      Transforms the specified data using the underlying transform algorithm.
      Data transform(Data data, XMLCryptoContext context, OutputStream os)
      Transforms the specified data using the underlying transform algorithm.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

      • Methods inherited from interface javax.xml.crypto.AlgorithmMethod

        getAlgorithm

    • Field Detail

      • BASE64

        static final String BASE64
        The Base64 transform algorithm URI.
        See Also:
        Constant Field Values

      • ENVELOPED

        static final String ENVELOPED
        The Enveloped Signature transform algorithm URI.
        See Also:
        Constant Field Values

      • XPATH

        static final String XPATH
        The XPath transform algorithm URI.
        See Also:
        Constant Field Values

      • XPATH2

        static final String XPATH2
        The XPath Filter 2 transform algorithm URI.
        See Also:
        Constant Field Values

      • XSLT

        static final String XSLT
        The XSLT transform algorithm URI.
        See Also:
        Constant Field Values

    • Method Detail

      • getParameterSpec

        AlgorithmParameterSpec getParameterSpec()
        Returns the algorithm-specific input parameters associated with this Transform.

        The returned parameters can be typecast to a TransformParameterSpec object.

        Specified by:
        getParameterSpec in interface AlgorithmMethod
        Returns:
        the algorithm-specific input parameters (may be null if not specified)

      • transform

        Data transform(Data data,
               XMLCryptoContext context)
        throws TransformException
        Transforms the specified data using the underlying transform algorithm.
        Parameters:
        data - the data to be transformed
        context - the XMLCryptoContext containing additional context (may be null if not applicable)
        Returns:
        the transformed data
        Throws:
        NullPointerException - if data is null
        TransformException - if an error occurs while executing the transform

      • transform

        Data transform(Data data,
               XMLCryptoContext context,
               OutputStream os)
        throws TransformException
        Transforms the specified data using the underlying transform algorithm. If the output of this transform is an OctetStreamData, then this method returns null and the bytes are written to the specified OutputStream. Otherwise, the OutputStream is ignored and the method behaves as if transform(Data, XMLCryptoContext) were invoked.
        Parameters:
        data - the data to be transformed
        context - the XMLCryptoContext containing additional context (may be null if not applicable)
        os - the OutputStream that should be used to write the transformed data to
        Returns:
        the transformed data (or null if the data was written to the OutputStream parameter)
        Throws:
        NullPointerException - if data or os is null
        TransformException - if an error occurs while executing the transform
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Class TransformException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.crypto.dsig.TransformException
  • All Implemented Interfaces:
    Serializable

    public class TransformException
extends Exception
    Indicates an exceptional condition that occurred while executing a transform algorithm.

    A TransformException can contain a cause: another throwable that caused this TransformException to get thrown.

    Since:
    1.6
    See Also:
    Transform.transform(javax.xml.crypto.Data, javax.xml.crypto.XMLCryptoContext), Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TransformException()
      Constructs a new TransformException with null as its detail message.
      TransformException(String message)
      Constructs a new TransformException with the specified detail message.
      TransformException(String message, Throwable cause)
      Constructs a new TransformException with the specified detail message and cause.
      TransformException(Throwable cause)
      Constructs a new TransformException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this TransformException or null if the cause is nonexistent or unknown.
      void printStackTrace()
      Prints this TransformException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this TransformException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this TransformException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransformException

        public TransformException()
        Constructs a new TransformException with null as its detail message.

      • TransformException

        public TransformException(String message)
        Constructs a new TransformException with the specified detail message.
        Parameters:
        message - the detail message

      • TransformException

        public TransformException(String message,
                          Throwable cause)
        Constructs a new TransformException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • TransformException

        public TransformException(Throwable cause)
        Constructs a new TransformException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getCause

        public Throwable getCause()
        Returns the cause of this TransformException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this TransformException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this TransformException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this TransformException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this TransformException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this TransformException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Class TransformService

  • java.lang.Object
    • javax.xml.crypto.dsig.TransformService
  • All Implemented Interfaces:
    AlgorithmMethod, Transform, XMLStructure

    public abstract class TransformService
extends Object
implements Transform
    A Service Provider Interface for transform and canonicalization algorithms.

    Each instance of TransformService supports a specific transform or canonicalization algorithm and XML mechanism type. To create a TransformService, call one of the static getInstance methods, passing in the algorithm URI and XML mechanism type desired, for example:

    TransformService ts = TransformService.getInstance(Transform.XPATH2, "DOM");

    TransformService implementations are registered and loaded using the Provider mechanism. Each TransformService service provider implementation should include a MechanismType service attribute that identifies the XML mechanism type that it supports. If the attribute is not specified, "DOM" is assumed. For example, a service provider that supports the XPath Filter 2 Transform and DOM mechanism would be specified in the Provider subclass as:

         put("TransformService." + Transform.XPATH2,
         "org.example.XPath2TransformService");
     put("TransformService." + Transform.XPATH2 + " MechanismType", "DOM");
    TransformService implementations that support the DOM mechanism type must abide by the DOM interoperability requirements defined in the DOM Mechanism Requirements section of the API overview. See the Service Providers section of the API overview for a list of standard mechanism types.

    Once a TransformService has been created, it can be used to process Transform or CanonicalizationMethod objects. If the Transform or CanonicalizationMethod exists in XML form (for example, when validating an existing XMLSignature), the init(XMLStructure, XMLCryptoContext) method must be first called to initialize the transform and provide document context (even if there are no parameters). Alternatively, if the Transform or CanonicalizationMethod is being created from scratch, the init(TransformParameterSpec) method is called to initialize the transform with parameters and the marshalParams method is called to marshal the parameters to XML and provide the transform with document context. Finally, the transform method is called to perform the transformation.

    Concurrent Access

    The static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.

    However, this is not true for the non-static methods defined by this class. Unless otherwise documented by a specific provider, threads that need to access a single TransformService instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a different TransformService instance need not synchronize.

    Since:
    1.6

    • Field Summary

      • Fields inherited from interface javax.xml.crypto.dsig.Transform

        BASE64, ENVELOPED, XPATH, XPATH2, XSLT

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TransformService()
      Default constructor, for invocation by subclasses.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      String getAlgorithm()
      Returns the URI of the algorithm supported by this TransformService.
      static TransformService getInstance(String algorithm, String mechanismType)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM).
      static TransformService getInstance(String algorithm, String mechanismType, Provider provider)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider.
      static TransformService getInstance(String algorithm, String mechanismType, String provider)
      Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider.
      String getMechanismType()
      Returns the mechanism type supported by this TransformService.
      Provider getProvider()
      Returns the provider of this TransformService.
      abstract void init(TransformParameterSpec params)
      Initializes this TransformService with the specified parameters.
      abstract void init(XMLStructure parent, XMLCryptoContext context)
      Initializes this TransformService with the specified parameters and document context.
      abstract void marshalParams(XMLStructure parent, XMLCryptoContext context)
      Marshals the algorithm-specific parameters.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.xml.crypto.dsig.Transform

        getParameterSpec, transform, transform

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Constructor Detail

      • TransformService

        protected TransformService()
        Default constructor, for invocation by subclasses.

    • Method Detail

      • getInstance

        public static TransformService getInstance(String algorithm,
                                           String mechanismType)
                                    throws NoSuchAlgorithmException
        Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM).

        This method uses the standard JCA provider lookup mechanism to locate and instantiate a TransformService implementation of the desired algorithm and MechanismType service attribute. It traverses the list of registered security Providers, starting with the most preferred Provider. A new TransformService object from the first Provider that supports the specified algorithm and mechanism type is returned.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        algorithm - the URI of the algorithm
        mechanismType - the type of the XML processing mechanism and representation
        Returns:
        a new TransformService
        Throws:
        NullPointerException - if algorithm or mechanismType is null
        NoSuchAlgorithmException - if no Provider supports a TransformService implementation for the specified algorithm and mechanism type
        See Also:
        Provider

      • getInstance

        public static TransformService getInstance(String algorithm,
                                           String mechanismType,
                                           Provider provider)
                                    throws NoSuchAlgorithmException
        Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider. Note that the specified Provider object does not have to be registered in the provider list.
        Parameters:
        algorithm - the URI of the algorithm
        mechanismType - the type of the XML processing mechanism and representation
        provider - the Provider object
        Returns:
        a new TransformService
        Throws:
        NullPointerException - if provider, algorithm, or mechanismType is null
        NoSuchAlgorithmException - if a TransformService implementation for the specified algorithm and mechanism type is not available from the specified Provider object
        See Also:
        Provider

      • getInstance

        public static TransformService getInstance(String algorithm,
                                           String mechanismType,
                                           String provider)
                                    throws NoSuchAlgorithmException,
                                           NoSuchProviderException
        Returns a TransformService that supports the specified algorithm URI (ex: Transform.XPATH2) and mechanism type (ex: DOM) as supplied by the specified provider. The specified provider must be registered in the security provider list.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        algorithm - the URI of the algorithm
        mechanismType - the type of the XML processing mechanism and representation
        provider - the string name of the provider
        Returns:
        a new TransformService
        Throws:
        NoSuchProviderException - if the specified provider is not registered in the security provider list
        NullPointerException - if provider, mechanismType, or algorithm is null
        NoSuchAlgorithmException - if a TransformService implementation for the specified algorithm and mechanism type is not available from the specified provider
        See Also:
        Provider

      • getMechanismType

        public final String getMechanismType()
        Returns the mechanism type supported by this TransformService.
        Returns:
        the mechanism type

      • getAlgorithm

        public final String getAlgorithm()
        Returns the URI of the algorithm supported by this TransformService.
        Specified by:
        getAlgorithm in interface AlgorithmMethod
        Returns:
        the algorithm URI

      • getProvider

        public final Provider getProvider()
        Returns the provider of this TransformService.
        Returns:
        the provider

      • init

        public abstract void init(TransformParameterSpec params)
                   throws InvalidAlgorithmParameterException
        Initializes this TransformService with the specified parameters.

        If the parameters exist in XML form, the init(XMLStructure, XMLCryptoContext) method should be used to initialize the TransformService.

        Parameters:
        params - the algorithm parameters (may be null if not required or optional)
        Throws:
        InvalidAlgorithmParameterException - if the specified parameters are invalid for this algorithm

      • marshalParams

        public abstract void marshalParams(XMLStructure parent,
                                   XMLCryptoContext context)
                            throws MarshalException
        Marshals the algorithm-specific parameters. If there are no parameters to be marshalled, this method returns without throwing an exception.
        Parameters:
        parent - a mechanism-specific structure containing the parent node that the marshalled parameters should be appended to
        context - the XMLCryptoContext containing additional context (may be null if not applicable)
        Throws:
        ClassCastException - if the type of parent or context is not compatible with this TransformService
        NullPointerException - if parent is null
        MarshalException - if the parameters cannot be marshalled

      • init

        public abstract void init(XMLStructure parent,
                          XMLCryptoContext context)
                   throws InvalidAlgorithmParameterException
        Initializes this TransformService with the specified parameters and document context.
        Parameters:
        parent - a mechanism-specific structure containing the parent structure
        context - the XMLCryptoContext containing additional context (may be null if not applicable)
        Throws:
        ClassCastException - if the type of parent or context is not compatible with this TransformService
        NullPointerException - if parent is null
        InvalidAlgorithmParameterException - if the specified parameters are invalid for this algorithm
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface XMLObject

  • All Superinterfaces:
    XMLStructure

    public interface XMLObject
extends XMLStructure
    A representation of the XML Object element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. An XMLObject may contain any data and may include optional MIME type, ID, and encoding attributes. The XML Schema Definition is defined as:

 <element name="Object" type="ds:ObjectType"/>
 <complexType name="ObjectType" mixed="true">
   <sequence minOccurs="0" maxOccurs="unbounded">
     <any namespace="##any" processContents="lax"/>
   </sequence>
   <attribute name="Id" type="ID" use="optional"/>
   <attribute name="MimeType" type="string" use="optional"/>
   <attribute name="Encoding" type="anyURI" use="optional"/>
 </complexType>
    A XMLObject instance may be created by invoking the newXMLObject method of the XMLSignatureFactory class; for example:
       XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
   List content = Collections.singletonList(fac.newManifest(references)));
   XMLObject object = factory.newXMLObject(content, "object-1", null, null);

    Note that this class is named XMLObject rather than Object to avoid naming clashes with the existing java.lang.Object class.

    Since:
    1.6
    See Also:
    XMLSignatureFactory.newXMLObject(List, String, String, String)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String TYPE
      URI that identifies the Object element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List getContent()
      Returns an unmodifiable list of XMLStructures contained in this XMLObject, which represent elements from any namespace.
      String getEncoding()
      Returns the encoding URI of this XMLObject.
      String getId()
      Returns the Id of this XMLObject.
      String getMimeType()
      Returns the mime type of this XMLObject.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • TYPE

        static final String TYPE
        URI that identifies the Object element (this can be specified as the value of the type parameter of the Reference class to identify the referent's type).
        See Also:
        Constant Field Values

    • Method Detail

      • getContent

        List getContent()
        Returns an unmodifiable list of XMLStructures contained in this XMLObject, which represent elements from any namespace.

        If there is a public subclass representing the type of XMLStructure, it is returned as an instance of that class (ex: a SignatureProperties element would be returned as an instance of SignatureProperties).

        Returns:
        an unmodifiable list of XMLStructures (may be empty but never null)

      • getId

        String getId()
        Returns the Id of this XMLObject.
        Returns:
        the Id (or null if not specified)

      • getMimeType

        String getMimeType()
        Returns the mime type of this XMLObject. The mime type is an optional attribute which describes the data within this XMLObject (independent of its encoding).
        Returns:
        the mime type (or null if not specified)

      • getEncoding

        String getEncoding()
        Returns the encoding URI of this XMLObject. The encoding URI identifies the method by which the object is encoded.
        Returns:
        the encoding URI (or null if not specified)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLSignature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface XMLSignature

  • All Superinterfaces:
    XMLStructure

    public interface XMLSignature
extends XMLStructure
    A representation of the XML Signature element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. This class contains methods for signing and validating XML signatures with behavior as defined by the W3C specification. The XML Schema Definition is defined as:

 <element name="Signature" type="ds:SignatureType"/>
 <complexType name="SignatureType">
    <sequence>
      <element ref="ds:SignedInfo"/>
      <element ref="ds:SignatureValue"/>
      <element ref="ds:KeyInfo" minOccurs="0"/>
      <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="Id" type="ID" use="optional"/>
 </complexType>

    An XMLSignature instance may be created by invoking one of the newXMLSignature methods of the XMLSignatureFactory class.

    If the contents of the underlying document containing the XMLSignature are subsequently modified, the behavior is undefined.

    Note that this class is named XMLSignature rather than Signature to avoid naming clashes with the existing java.security.Signature class.

    Since:
    1.6
    See Also:
    XMLSignatureFactory.newXMLSignature(SignedInfo, KeyInfo), XMLSignatureFactory.newXMLSignature(SignedInfo, KeyInfo, List, String, String)

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  XMLSignature.SignatureValue
      A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String XMLNS
      The XML Namespace URI of the W3C Recommendation for XML-Signature Syntax and Processing.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getId()
      Returns the optional Id of this XMLSignature.
      KeyInfo getKeyInfo()
      Returns the key info of this XMLSignature.
      KeySelectorResult getKeySelectorResult()
      Returns the result of the KeySelector, if specified, after this XMLSignature has been signed or validated.
      List getObjects()
      Returns an unmodifiable list of XMLObjects contained in this XMLSignature.
      XMLSignature.SignatureValue getSignatureValue()
      Returns the signature value of this XMLSignature.
      SignedInfo getSignedInfo()
      Returns the signed info of this XMLSignature.
      void sign(XMLSignContext signContext)
      Signs this XMLSignature.
      boolean validate(XMLValidateContext validateContext)
      Validates the signature according to the core validation processing rules.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Field Detail

      • XMLNS

        static final String XMLNS
        The XML Namespace URI of the W3C Recommendation for XML-Signature Syntax and Processing.
        See Also:
        Constant Field Values

    • Method Detail

      • validate

        boolean validate(XMLValidateContext validateContext)
          throws XMLSignatureException
        Validates the signature according to the core validation processing rules. This method validates the signature using the existing state, it does not unmarshal and reinitialize the contents of the XMLSignature using the location information specified in the context.

        This method only validates the signature the first time it is invoked. On subsequent invocations, it returns a cached result.

        Parameters:
        validateContext - the validating context
        Returns:
        true if the signature passed core validation, otherwise false
        Throws:
        ClassCastException - if the type of validateContext is not compatible with this XMLSignature
        NullPointerException - if validateContext is null
        XMLSignatureException - if an unexpected error occurs during validation that prevented the validation operation from completing

      • getKeyInfo

        KeyInfo getKeyInfo()
        Returns the key info of this XMLSignature.
        Returns:
        the key info (may be null if not specified)

      • getSignedInfo

        SignedInfo getSignedInfo()
        Returns the signed info of this XMLSignature.
        Returns:
        the signed info (never null)

      • getObjects

        List getObjects()
        Returns an unmodifiable list of XMLObjects contained in this XMLSignature.
        Returns:
        an unmodifiable list of XMLObjects (may be empty but never null)

      • getId

        String getId()
        Returns the optional Id of this XMLSignature.
        Returns:
        the Id (may be null if not specified)

      • getSignatureValue

        XMLSignature.SignatureValue getSignatureValue()
        Returns the signature value of this XMLSignature.
        Returns:
        the signature value

      • sign

        void sign(XMLSignContext signContext)
   throws MarshalException,
          XMLSignatureException
        Signs this XMLSignature.

        If this method throws an exception, this XMLSignature and the signContext parameter will be left in the state that it was in prior to the invocation.

        Parameters:
        signContext - the signing context
        Throws:
        ClassCastException - if the type of signContext is not compatible with this XMLSignature
        NullPointerException - if signContext is null
        MarshalException - if an exception occurs while marshalling
        XMLSignatureException - if an unexpected exception occurs while generating the signature

      • getKeySelectorResult

        KeySelectorResult getKeySelectorResult()
        Returns the result of the KeySelector, if specified, after this XMLSignature has been signed or validated.
        Returns:
        the key selector result, or null if a key selector has not been specified or this XMLSignature has not been signed or validated
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLSignature.SignatureValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface XMLSignature.SignatureValue

  • All Superinterfaces:
    XMLStructure
    Enclosing interface:
    XMLSignature

    public static interface XMLSignature.SignatureValue
extends XMLStructure
    A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. The XML Schema Definition is defined as:

       <element name="SignatureValue" type="ds:SignatureValueType"/>
     <complexType name="SignatureValueType">
       <simpleContent>
         <extension base="base64Binary">
           <attribute name="Id" type="ID" use="optional"/>
         </extension>
       </simpleContent>
     </complexType>

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getId()
      Returns the optional Id attribute of this SignatureValue, which permits this element to be referenced from elsewhere.
      byte[] getValue()
      Returns the signature value of this SignatureValue.
      boolean validate(XMLValidateContext validateContext)
      Validates the signature value.

      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported

    • Method Detail

      • getId

        String getId()
        Returns the optional Id attribute of this SignatureValue, which permits this element to be referenced from elsewhere.
        Returns:
        the Id attribute (may be null if not specified)

      • getValue

        byte[] getValue()
        Returns the signature value of this SignatureValue.
        Returns:
        the signature value (may be null if the XMLSignature has not been signed yet). Each invocation of this method returns a new clone of the array to prevent subsequent modification.

      • validate

        boolean validate(XMLValidateContext validateContext)
          throws XMLSignatureException
        Validates the signature value. This method performs a cryptographic validation of the signature calculated over the SignedInfo of the XMLSignature.

        This method only validates the signature the first time it is invoked. On subsequent invocations, it returns a cached result.

        Parameters:
        validateContext - the validating context
        Returns:
        true if the signature was validated successfully; false otherwise
        Throws:
        NullPointerException - if validateContext is null
        XMLSignatureException - if an unexpected exception occurs while validating the signature
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLSignatureException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Class XMLSignatureException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.crypto.dsig.XMLSignatureException
  • All Implemented Interfaces:
    Serializable

    public class XMLSignatureException
extends Exception
    Indicates an exceptional condition that occurred during the XML signature generation or validation process.

    An XMLSignatureException can contain a cause: another throwable that caused this XMLSignatureException to get thrown.

    Since:
    1.6
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      XMLSignatureException()
      Constructs a new XMLSignatureException with null as its detail message.
      XMLSignatureException(String message)
      Constructs a new XMLSignatureException with the specified detail message.
      XMLSignatureException(String message, Throwable cause)
      Constructs a new XMLSignatureException with the specified detail message and cause.
      XMLSignatureException(Throwable cause)
      Constructs a new XMLSignatureException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this XMLSignatureException or null if the cause is nonexistent or unknown.
      void printStackTrace()
      Prints this XMLSignatureException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this XMLSignatureException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this XMLSignatureException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XMLSignatureException

        public XMLSignatureException()
        Constructs a new XMLSignatureException with null as its detail message.

      • XMLSignatureException

        public XMLSignatureException(String message)
        Constructs a new XMLSignatureException with the specified detail message.
        Parameters:
        message - the detail message

      • XMLSignatureException

        public XMLSignatureException(String message,
                             Throwable cause)
        Constructs a new XMLSignatureException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • XMLSignatureException

        public XMLSignatureException(Throwable cause)
        Constructs a new XMLSignatureException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getCause

        public Throwable getCause()
        Returns the cause of this XMLSignatureException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this XMLSignatureException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this XMLSignatureException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this XMLSignatureException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this XMLSignatureException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this XMLSignatureException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLSignatureFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Class XMLSignatureFactory

  • java.lang.Object
    • javax.xml.crypto.dsig.XMLSignatureFactory

  • public abstract class XMLSignatureFactory
extends Object
    A factory for creating XMLSignature objects from scratch or for unmarshalling an XMLSignature object from a corresponding XML representation.

    XMLSignatureFactory Type

    Each instance of XMLSignatureFactory supports a specific XML mechanism type. To create an XMLSignatureFactory, call one of the static getInstance methods, passing in the XML mechanism type desired, for example:

    XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");

    The objects that this factory produces will be based on DOM and abide by the DOM interoperability requirements as defined in the DOM Mechanism Requirements section of the API overview. See the Service Providers section of the API overview for a list of standard mechanism types.

    XMLSignatureFactory implementations are registered and loaded using the Provider mechanism. For example, a service provider that supports the DOM mechanism would be specified in the Provider subclass as:

         put("XMLSignatureFactory.DOM", "org.example.DOMXMLSignatureFactory");

    An implementation MUST minimally support the default mechanism type: DOM.

    Note that a caller must use the same XMLSignatureFactory instance to create the XMLStructures of a particular XMLSignature that is to be generated. The behavior is undefined if XMLStructures from different providers or different mechanism types are used together.

    Also, the XMLStructures that are created by this factory may contain state specific to the XMLSignature and are not intended to be reusable.

    Creating XMLSignatures from scratch

    Once the XMLSignatureFactory has been created, objects can be instantiated by calling the appropriate method. For example, a Reference instance may be created by invoking one of the newReference methods.

    Unmarshalling XMLSignatures from XML

    Alternatively, an XMLSignature may be created from an existing XML representation by invoking the unmarshalXMLSignature method and passing it a mechanism-specific XMLValidateContext instance containing the XML content:

     DOMValidateContext context = new DOMValidateContext(key, signatureElement);
 XMLSignature signature = factory.unmarshalXMLSignature(context);
    Each XMLSignatureFactory must support the required XMLValidateContext types for that factory type, but may support others. A DOM XMLSignatureFactory must support DOMValidateContext objects.

    Signing and marshalling XMLSignatures to XML

    Each XMLSignature created by the factory can also be marshalled to an XML representation and signed, by invoking the sign method of the XMLSignature object and passing it a mechanism-specific XMLSignContext object containing the signing key and marshalling parameters (see DOMSignContext). For example:
        DOMSignContext context = new DOMSignContext(privateKey, document);
    signature.sign(context);
    Concurrent Access

    The static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.

    However, this is not true for the non-static methods defined by this class. Unless otherwise documented by a specific provider, threads that need to access a single XMLSignatureFactory instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a different XMLSignatureFactory instance need not synchronize.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected XMLSignatureFactory()
      Default constructor, for invocation by subclasses.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      static XMLSignatureFactory getInstance()
      Returns an XMLSignatureFactory that supports the default XML processing mechanism and representation type ("DOM").
      static XMLSignatureFactory getInstance(String mechanismType)
      Returns an XMLSignatureFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").
      static XMLSignatureFactory getInstance(String mechanismType, Provider provider)
      Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      static XMLSignatureFactory getInstance(String mechanismType, String provider)
      Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider.
      KeyInfoFactory getKeyInfoFactory()
      Returns a KeyInfoFactory that creates KeyInfo objects.
      String getMechanismType()
      Returns the type of the XML processing mechanism and representation supported by this XMLSignatureFactory (ex: "DOM").
      Provider getProvider()
      Returns the provider of this XMLSignatureFactory.
      abstract URIDereferencer getURIDereferencer()
      Returns a reference to the URIDereferencer that is used by default to dereference URIs in Reference objects.
      abstract boolean isFeatureSupported(String feature)
      Indicates whether a specified feature is supported.
      abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
      abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params)
      Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
      abstract DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec params)
      Creates a DigestMethod for the specified algorithm URI and parameters.
      abstract Manifest newManifest(List references)
      Creates a Manifest containing the specified list of References.
      abstract Manifest newManifest(List references, String id)
      Creates a Manifest containing the specified list of References and optional id.
      abstract Reference newReference(String uri, DigestMethod dm)
      Creates a Reference with the specified URI and digest method.
      abstract Reference newReference(String uri, DigestMethod dm, List appliedTransforms, Data result, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id)
      Creates a Reference with the specified parameters.
      abstract Reference newReference(String uri, DigestMethod dm, List transforms, String type, String id, byte[] digestValue)
      Creates a Reference with the specified parameters and pre-calculated digest value.
      abstract SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec params)
      Creates a SignatureMethod for the specified algorithm URI and parameters.
      abstract SignatureProperties newSignatureProperties(List properties, String id)
      Creates a SignatureProperties containing the specified list of SignaturePropertys and optional id.
      abstract SignatureProperty newSignatureProperty(List content, String target, String id)
      Creates a SignatureProperty containing the specified list of XMLStructures, target URI and optional id.
      abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references)
      Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
      abstract SignedInfo newSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List references, String id)
      Creates a SignedInfo with the specified parameters.
      abstract Transform newTransform(String algorithm, TransformParameterSpec params)
      Creates a Transform for the specified algorithm URI and parameters.
      abstract Transform newTransform(String algorithm, XMLStructure params)
      Creates a Transform for the specified algorithm URI and parameters.
      abstract XMLObject newXMLObject(List content, String id, String mimeType, String encoding)
      Creates an XMLObject from the specified parameters.
      abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki)
      Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
      abstract XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki, List objects, String id, String signatureValueId)
      Creates an XMLSignature and initializes it with the specified parameters.
      abstract XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance.
      abstract XMLSignature unmarshalXMLSignature(XMLValidateContext context)
      Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XMLSignatureFactory

        protected XMLSignatureFactory()
        Default constructor, for invocation by subclasses.

    • Method Detail

      • getInstance

        public static XMLSignatureFactory getInstance(String mechanismType)
        Returns an XMLSignatureFactory that supports the specified XML processing mechanism and representation type (ex: "DOM").

        This method uses the standard JCA provider lookup mechanism to locate and instantiate an XMLSignatureFactory implementation of the desired mechanism type. It traverses the list of registered security Providers, starting with the most preferred Provider. A new XMLSignatureFactory object from the first Provider that supports the specified mechanism is returned.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        Returns:
        a new XMLSignatureFactory
        Throws:
        NullPointerException - if mechanismType is null
        NoSuchMechanismException - if no Provider supports an XMLSignatureFactory implementation for the specified mechanism
        See Also:
        Provider

      • getInstance

        public static XMLSignatureFactory getInstance(String mechanismType,
                                              Provider provider)
        Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. Note that the specified Provider object does not have to be registered in the provider list.
        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        provider - the Provider object
        Returns:
        a new XMLSignatureFactory
        Throws:
        NullPointerException - if provider or mechanismType is null
        NoSuchMechanismException - if an XMLSignatureFactory implementation for the specified mechanism is not available from the specified Provider object
        See Also:
        Provider

      • getInstance

        public static XMLSignatureFactory getInstance(String mechanismType,
                                              String provider)
                                       throws NoSuchProviderException
        Returns an XMLSignatureFactory that supports the requested XML processing mechanism and representation type (ex: "DOM"), as supplied by the specified provider. The specified provider must be registered in the security provider list.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Parameters:
        mechanismType - the type of the XML processing mechanism and representation. See the Service Providers section of the API overview for a list of standard mechanism types.
        provider - the string name of the provider
        Returns:
        a new XMLSignatureFactory
        Throws:
        NoSuchProviderException - if the specified provider is not registered in the security provider list
        NullPointerException - if provider or mechanismType is null
        NoSuchMechanismException - if an XMLSignatureFactory implementation for the specified mechanism is not available from the specified provider
        See Also:
        Provider

      • getInstance

        public static XMLSignatureFactory getInstance()
        Returns an XMLSignatureFactory that supports the default XML processing mechanism and representation type ("DOM").

        This method uses the standard JCA provider lookup mechanism to locate and instantiate an XMLSignatureFactory implementation of the default mechanism type. It traverses the list of registered security Providers, starting with the most preferred Provider. A new XMLSignatureFactory object from the first Provider that supports the DOM mechanism is returned.

        Note that the list of registered providers may be retrieved via the Security.getProviders() method.

        Returns:
        a new XMLSignatureFactory
        Throws:
        NoSuchMechanismException - if no Provider supports an XMLSignatureFactory implementation for the DOM mechanism
        See Also:
        Provider

      • getMechanismType

        public final String getMechanismType()
        Returns the type of the XML processing mechanism and representation supported by this XMLSignatureFactory (ex: "DOM").
        Returns:
        the XML processing mechanism type supported by this XMLSignatureFactory

      • getProvider

        public final Provider getProvider()
        Returns the provider of this XMLSignatureFactory.
        Returns:
        the provider of this XMLSignatureFactory

      • newXMLSignature

        public abstract XMLSignature newXMLSignature(SignedInfo si,
                                             KeyInfo ki)
        Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.
        Parameters:
        si - the signed info
        ki - the key info (may be null)
        Returns:
        an XMLSignature
        Throws:
        NullPointerException - if si is null

      • newXMLSignature

        public abstract XMLSignature newXMLSignature(SignedInfo si,
                                             KeyInfo ki,
                                             List objects,
                                             String id,
                                             String signatureValueId)
        Creates an XMLSignature and initializes it with the specified parameters.
        Parameters:
        si - the signed info
        ki - the key info (may be null)
        objects - a list of XMLObjects (may be empty or null)
        id - the Id (may be null)
        signatureValueId - the SignatureValue Id (may be null)
        Returns:
        an XMLSignature
        Throws:
        NullPointerException - if si is null
        ClassCastException - if any of the objects are not of type XMLObject

      • newReference

        public abstract Reference newReference(String uri,
                                       DigestMethod dm)
        Creates a Reference with the specified URI and digest method.
        Parameters:
        uri - the reference URI (may be null)
        dm - the digest method
        Returns:
        a Reference
        Throws:
        IllegalArgumentException - if uri is not RFC 2396 compliant
        NullPointerException - if dm is null

      • newReference

        public abstract Reference newReference(String uri,
                                       DigestMethod dm,
                                       List transforms,
                                       String type,
                                       String id)
        Creates a Reference with the specified parameters.
        Parameters:
        uri - the reference URI (may be null)
        dm - the digest method
        transforms - a list of Transforms. The list is defensively copied to protect against subsequent modification. May be null or empty.
        type - the reference type, as a URI (may be null)
        id - the reference ID (may be null)
        Returns:
        a Reference
        Throws:
        ClassCastException - if any of the transforms are not of type Transform
        IllegalArgumentException - if uri is not RFC 2396 compliant
        NullPointerException - if dm is null

      • newReference

        public abstract Reference newReference(String uri,
                                       DigestMethod dm,
                                       List transforms,
                                       String type,
                                       String id,
                                       byte[] digestValue)
        Creates a Reference with the specified parameters and pre-calculated digest value.

        This method is useful when the digest value of a Reference has been previously computed. See for example, the OASIS-DSS (Digital Signature Services) specification.

        Parameters:
        uri - the reference URI (may be null)
        dm - the digest method
        transforms - a list of Transforms. The list is defensively copied to protect against subsequent modification. May be null or empty.
        type - the reference type, as a URI (may be null)
        id - the reference ID (may be null)
        digestValue - the digest value. The array is cloned to protect against subsequent modification.
        Returns:
        a Reference
        Throws:
        ClassCastException - if any of the transforms are not of type Transform
        IllegalArgumentException - if uri is not RFC 2396 compliant
        NullPointerException - if dm or digestValue is null

      • newReference

        public abstract Reference newReference(String uri,
                                       DigestMethod dm,
                                       List appliedTransforms,
                                       Data result,
                                       List transforms,
                                       String type,
                                       String id)
        Creates a Reference with the specified parameters.

        This method is useful when a list of transforms have already been applied to the Reference. See for example, the OASIS-DSS (Digital Signature Services) specification.

        When an XMLSignature containing this reference is generated, the specified transforms (if non-null) are applied to the specified result. The Transforms element of the resulting Reference element is set to the concatenation of the appliedTransforms and transforms.

        Parameters:
        uri - the reference URI (may be null)
        dm - the digest method
        appliedTransforms - a list of Transforms that have already been applied. The list is defensively copied to protect against subsequent modification. The list must contain at least one entry.
        result - the result of processing the sequence of appliedTransforms
        transforms - a list of Transforms that are to be applied when generating the signature. The list is defensively copied to protect against subsequent modification. May be null or empty.
        type - the reference type, as a URI (may be null)
        id - the reference ID (may be null)
        Returns:
        a Reference
        Throws:
        ClassCastException - if any of the transforms (in either list) are not of type Transform
        IllegalArgumentException - if uri is not RFC 2396 compliant or appliedTransforms is empty
        NullPointerException - if dm, appliedTransforms or result is null

      • newSignedInfo

        public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm,
                                         SignatureMethod sm,
                                         List references)
        Creates a SignedInfo with the specified canonicalization and signature methods, and list of one or more references.
        Parameters:
        cm - the canonicalization method
        sm - the signature method
        references - a list of one or more References. The list is defensively copied to protect against subsequent modification.
        Returns:
        a SignedInfo
        Throws:
        ClassCastException - if any of the references are not of type Reference
        IllegalArgumentException - if references is empty
        NullPointerException - if any of the parameters are null

      • newSignedInfo

        public abstract SignedInfo newSignedInfo(CanonicalizationMethod cm,
                                         SignatureMethod sm,
                                         List references,
                                         String id)
        Creates a SignedInfo with the specified parameters.
        Parameters:
        cm - the canonicalization method
        sm - the signature method
        references - a list of one or more References. The list is defensively copied to protect against subsequent modification.
        id - the id (may be null)
        Returns:
        a SignedInfo
        Throws:
        ClassCastException - if any of the references are not of type Reference
        IllegalArgumentException - if references is empty
        NullPointerException - if cm, sm, or references are null

      • newXMLObject

        public abstract XMLObject newXMLObject(List content,
                                       String id,
                                       String mimeType,
                                       String encoding)
        Creates an XMLObject from the specified parameters.
        Parameters:
        content - a list of XMLStructures. The list is defensively copied to protect against subsequent modification. May be null or empty.
        id - the Id (may be null)
        mimeType - the mime type (may be null)
        encoding - the encoding (may be null)
        Returns:
        an XMLObject
        Throws:
        ClassCastException - if content contains any entries that are not of type XMLStructure

      • newManifest

        public abstract Manifest newManifest(List references)
        Creates a Manifest containing the specified list of References.
        Parameters:
        references - a list of one or more References. The list is defensively copied to protect against subsequent modification.
        Returns:
        a Manifest
        Throws:
        NullPointerException - if references is null
        IllegalArgumentException - if references is empty
        ClassCastException - if references contains any entries that are not of type Reference

      • newManifest

        public abstract Manifest newManifest(List references,
                                     String id)
        Creates a Manifest containing the specified list of References and optional id.
        Parameters:
        references - a list of one or more References. The list is defensively copied to protect against subsequent modification.
        id - the id (may be null)
        Returns:
        a Manifest
        Throws:
        NullPointerException - if references is null
        IllegalArgumentException - if references is empty
        ClassCastException - if references contains any entries that are not of type Reference

      • newSignatureProperty

        public abstract SignatureProperty newSignatureProperty(List content,
                                                       String target,
                                                       String id)
        Creates a SignatureProperty containing the specified list of XMLStructures, target URI and optional id.
        Parameters:
        content - a list of one or more XMLStructures. The list is defensively copied to protect against subsequent modification.
        target - the target URI of the Signature that this property applies to
        id - the id (may be null)
        Returns:
        a SignatureProperty
        Throws:
        NullPointerException - if content or target is null
        IllegalArgumentException - if content is empty
        ClassCastException - if content contains any entries that are not of type XMLStructure

      • newSignatureProperties

        public abstract SignatureProperties newSignatureProperties(List properties,
                                                           String id)
        Creates a SignatureProperties containing the specified list of SignaturePropertys and optional id.
        Parameters:
        properties - a list of one or more SignaturePropertys. The list is defensively copied to protect against subsequent modification.
        id - the id (may be null)
        Returns:
        a SignatureProperties
        Throws:
        NullPointerException - if properties is null
        IllegalArgumentException - if properties is empty
        ClassCastException - if properties contains any entries that are not of type SignatureProperty

      • newDigestMethod

        public abstract DigestMethod newDigestMethod(String algorithm,
                                             DigestMethodParameterSpec params)
                                      throws NoSuchAlgorithmException,
                                             InvalidAlgorithmParameterException
        Creates a DigestMethod for the specified algorithm URI and parameters.
        Parameters:
        algorithm - the URI identifying the digest algorithm
        params - algorithm-specific digest parameters (may be null)
        Returns:
        the DigestMethod
        Throws:
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • newSignatureMethod

        public abstract SignatureMethod newSignatureMethod(String algorithm,
                                                   SignatureMethodParameterSpec params)
                                            throws NoSuchAlgorithmException,
                                                   InvalidAlgorithmParameterException
        Creates a SignatureMethod for the specified algorithm URI and parameters.
        Parameters:
        algorithm - the URI identifying the signature algorithm
        params - algorithm-specific signature parameters (may be null)
        Returns:
        the SignatureMethod
        Throws:
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • newTransform

        public abstract Transform newTransform(String algorithm,
                                       TransformParameterSpec params)
                                throws NoSuchAlgorithmException,
                                       InvalidAlgorithmParameterException
        Creates a Transform for the specified algorithm URI and parameters.
        Parameters:
        algorithm - the URI identifying the transform algorithm
        params - algorithm-specific transform parameters (may be null)
        Returns:
        the Transform
        Throws:
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • newTransform

        public abstract Transform newTransform(String algorithm,
                                       XMLStructure params)
                                throws NoSuchAlgorithmException,
                                       InvalidAlgorithmParameterException
        Creates a Transform for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specific XMLStructure (ex: DOMStructure). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.
        Parameters:
        algorithm - the URI identifying the transform algorithm
        params - a mechanism-specific XML structure from which to unmarshal the parameters from (may be null if not required or optional)
        Returns:
        the Transform
        Throws:
        ClassCastException - if the type of params is inappropriate for this XMLSignatureFactory
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • newCanonicalizationMethod

        public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm,
                                                                 C14NMethodParameterSpec params)
                                                          throws NoSuchAlgorithmException,
                                                                 InvalidAlgorithmParameterException
        Creates a CanonicalizationMethod for the specified algorithm URI and parameters.
        Parameters:
        algorithm - the URI identifying the canonicalization algorithm
        params - algorithm-specific canonicalization parameters (may be null)
        Returns:
        the CanonicalizationMethod
        Throws:
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • newCanonicalizationMethod

        public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm,
                                                                 XMLStructure params)
                                                          throws NoSuchAlgorithmException,
                                                                 InvalidAlgorithmParameterException
        Creates a CanonicalizationMethod for the specified algorithm URI and parameters. The parameters are specified as a mechanism-specific XMLStructure (ex: DOMStructure). This method is useful when the parameters are in XML form or there is no standard class for specifying the parameters.
        Parameters:
        algorithm - the URI identifying the canonicalization algorithm
        params - a mechanism-specific XML structure from which to unmarshal the parameters from (may be null if not required or optional)
        Returns:
        the CanonicalizationMethod
        Throws:
        ClassCastException - if the type of params is inappropriate for this XMLSignatureFactory
        InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested algorithm
        NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be found
        NullPointerException - if algorithm is null

      • getKeyInfoFactory

        public final KeyInfoFactory getKeyInfoFactory()
        Returns a KeyInfoFactory that creates KeyInfo objects. The returned KeyInfoFactory has the same mechanism type and provider as this XMLSignatureFactory.
        Returns:
        a KeyInfoFactory
        Throws:
        NoSuchMechanismException - if a KeyFactory implementation with the same mechanism type and provider is not available

      • unmarshalXMLSignature

        public abstract XMLSignature unmarshalXMLSignature(XMLValidateContext context)
                                            throws MarshalException
        Unmarshals a new XMLSignature instance from a mechanism-specific XMLValidateContext instance.
        Parameters:
        context - a mechanism-specific context from which to unmarshal the signature from
        Returns:
        the XMLSignature
        Throws:
        NullPointerException - if context is null
        ClassCastException - if the type of context is inappropriate for this factory
        MarshalException - if an unrecoverable exception occurs during unmarshalling

      • unmarshalXMLSignature

        public abstract XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
                                            throws MarshalException
        Unmarshals a new XMLSignature instance from a mechanism-specific XMLStructure instance. This method is useful if you only want to unmarshal (and not validate) an XMLSignature.
        Parameters:
        xmlStructure - a mechanism-specific XML structure from which to unmarshal the signature from
        Returns:
        the XMLSignature
        Throws:
        NullPointerException - if xmlStructure is null
        ClassCastException - if the type of xmlStructure is inappropriate for this factory
        MarshalException - if an unrecoverable exception occurs during unmarshalling

      • isFeatureSupported

        public abstract boolean isFeatureSupported(String feature)
        Indicates whether a specified feature is supported.
        Parameters:
        feature - the feature name (as an absolute URI)
        Returns:
        true if the specified feature is supported, false otherwise
        Throws:
        NullPointerException - if feature is null

      • getURIDereferencer

        public abstract URIDereferencer getURIDereferencer()
        Returns a reference to the URIDereferencer that is used by default to dereference URIs in Reference objects.
        Returns:
        a reference to the default URIDereferencer (never null)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLSignContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface XMLSignContext

  • All Superinterfaces:
    XMLCryptoContext
    All Known Implementing Classes:
    DOMSignContext

    public interface XMLSignContext
extends XMLCryptoContext
    Contains context information for generating XML Signatures. This interface is primarily intended for type-safety.

    Note that XMLSignContext instances can contain information and state specific to the XML signature structure it is used with. The results are unpredictable if an XMLSignContext is used with different signature structures (for example, you should not use the same XMLSignContext instance to sign two different XMLSignature objects).

    Supported Properties

    The following properties can be set using the setProperty method.

    • javax.xml.crypto.dsig.cacheReference: value must be a Boolean. This property controls whether or not the digested Reference objects will cache the dereferenced content and pre-digested input for subsequent retrieval via the Reference.getDereferencedData and Reference.getDigestInputStream methods. The default value if not specified is Boolean.FALSE.
    Since:
    1.6
    See Also:
    XMLSignature.sign(XMLSignContext)

    • Method Summary

      • Methods inherited from interface javax.xml.crypto.XMLCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setKeySelector, setProperty, setURIDereferencer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLValidateContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto.dsig

Interface XMLValidateContext

  • All Superinterfaces:
    XMLCryptoContext
    All Known Implementing Classes:
    DOMValidateContext

    public interface XMLValidateContext
extends XMLCryptoContext
    Contains context information for validating XML Signatures. This interface is primarily intended for type-safety.

    Note that XMLValidateContext instances can contain information and state specific to the XML signature structure it is used with. The results are unpredictable if an XMLValidateContext is used with different signature structures (for example, you should not use the same XMLValidateContext instance to validate two different XMLSignature objects).

    Supported Properties

    The following properties can be set by an application using the setProperty method.

    • javax.xml.crypto.dsig.cacheReference: value must be a Boolean. This property controls whether or not the Reference.validate method will cache the dereferenced content and pre-digested input for subsequent retrieval via the Reference.getDereferencedData and Reference.getDigestInputStream methods. The default value if not specified is Boolean.FALSE.
    Since:
    1.6
    See Also:
    XMLSignature.validate(XMLValidateContext), Reference.validate(XMLValidateContext)

    • Method Summary

      • Methods inherited from interface javax.xml.crypto.XMLCryptoContext

        get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setKeySelector, setProperty, setURIDereferencer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeySelector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class KeySelector

  • java.lang.Object
    • javax.xml.crypto.KeySelector

  • public abstract class KeySelector
extends Object
    A selector that finds and returns a key using the data contained in a KeyInfo object. An example of an implementation of this class is one that searches a KeyStore for trusted keys that match information contained in a KeyInfo.

    Whether or not the returned key is trusted and the mechanisms used to determine that is implementation-specific.

    Since:
    1.6

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  KeySelector.Purpose
      The purpose of the key that is to be selected.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected KeySelector()
      Default no-args constructor; intended for invocation by subclasses only.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract KeySelectorResult select(KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context)
      Attempts to find a key that satisfies the specified constraints.
      static KeySelector singletonKeySelector(Key key)
      Returns a KeySelector that always selects the specified key, regardless of the KeyInfo passed to it.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • KeySelector

        protected KeySelector()
        Default no-args constructor; intended for invocation by subclasses only.

    • Method Detail

      • select

        public abstract KeySelectorResult select(KeyInfo keyInfo,
                                         KeySelector.Purpose purpose,
                                         AlgorithmMethod method,
                                         XMLCryptoContext context)
                                  throws KeySelectorException
        Attempts to find a key that satisfies the specified constraints.
        Parameters:
        keyInfo - a KeyInfo (may be null)
        purpose - the key's purpose (KeySelector.Purpose.SIGN, KeySelector.Purpose.VERIFY, KeySelector.Purpose.ENCRYPT, or KeySelector.Purpose.DECRYPT)
        method - the algorithm method that this key is to be used for. Only keys that are compatible with the algorithm and meet the constraints of the specified algorithm should be returned.
        context - an XMLCryptoContext that may contain useful information for finding an appropriate key. If this key selector supports resolving RetrievalMethod types, the context's baseURI and dereferencer parameters (if specified) should be used by the selector to resolve and dereference the URI.
        Returns:
        the result of the key selector
        Throws:
        KeySelectorException - if an exceptional condition occurs while attempting to find a key. Note that an inability to find a key is not considered an exception (null should be returned in that case). However, an error condition (ex: network communications failure) that prevented the KeySelector from finding a potential key should be considered an exception.
        ClassCastException - if the data type of method is not supported by this key selector

      • singletonKeySelector

        public static KeySelector singletonKeySelector(Key key)
        Returns a KeySelector that always selects the specified key, regardless of the KeyInfo passed to it.
        Parameters:
        key - the sole key to be stored in the key selector
        Returns:
        a key selector that always selects the specified key
        Throws:
        NullPointerException - if key is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeySelector.Purpose

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class KeySelector.Purpose

  • java.lang.Object
    • javax.xml.crypto.KeySelector.Purpose
  • Enclosing class:
    KeySelector

    public static class KeySelector.Purpose
extends Object
    The purpose of the key that is to be selected.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static KeySelector.Purpose DECRYPT
      A key for decrypting.
      static KeySelector.Purpose ENCRYPT
      A key for encrypting.
      static KeySelector.Purpose SIGN
      A key for signing.
      static KeySelector.Purpose VERIFY
      A key for verifying.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String toString()
      Returns a string representation of this purpose ("sign", "verify", "encrypt", or "decrypt").

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • SIGN

        public static final KeySelector.Purpose SIGN
        A key for signing.

      • VERIFY

        public static final KeySelector.Purpose VERIFY
        A key for verifying.

      • ENCRYPT

        public static final KeySelector.Purpose ENCRYPT
        A key for encrypting.

      • DECRYPT

        public static final KeySelector.Purpose DECRYPT
        A key for decrypting.

    • Method Detail

      • toString

        public String toString()
        Returns a string representation of this purpose ("sign", "verify", "encrypt", or "decrypt").
        Overrides:
        toString in class Object
        Returns:
        a string representation of this purpose
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeySelectorException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class KeySelectorException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.crypto.KeySelectorException
  • All Implemented Interfaces:
    Serializable

    public class KeySelectorException
extends Exception
    Indicates an exceptional condition thrown by a KeySelector.

    A KeySelectorException can contain a cause: another throwable that caused this KeySelectorException to get thrown.

    Since:
    1.6
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      KeySelectorException()
      Constructs a new KeySelectorException with null as its detail message.
      KeySelectorException(String message)
      Constructs a new KeySelectorException with the specified detail message.
      KeySelectorException(String message, Throwable cause)
      Constructs a new KeySelectorException with the specified detail message and cause.
      KeySelectorException(Throwable cause)
      Constructs a new KeySelectorException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this KeySelectorException or null if the cause is nonexistent or unknown.
      void printStackTrace()
      Prints this KeySelectorException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this KeySelectorException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this KeySelectorException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • KeySelectorException

        public KeySelectorException()
        Constructs a new KeySelectorException with null as its detail message.

      • KeySelectorException

        public KeySelectorException(String message)
        Constructs a new KeySelectorException with the specified detail message.
        Parameters:
        message - the detail message

      • KeySelectorException

        public KeySelectorException(String message,
                            Throwable cause)
        Constructs a new KeySelectorException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • KeySelectorException

        public KeySelectorException(Throwable cause)
        Constructs a new KeySelectorException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getCause

        public Throwable getCause()
        Returns the cause of this KeySelectorException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this KeySelectorException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this KeySelectorException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this KeySelectorException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this KeySelectorException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this KeySelectorException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


KeySelectorResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface KeySelectorResult

  • public interface KeySelectorResult
    The result returned by the KeySelector.select method.

    At a minimum, a KeySelectorResult contains the Key selected by the KeySelector. Implementations of this interface may add methods to return implementation or algorithm specific information, such as a chain of certificates or debugging information.

    Since:
    1.6
    See Also:
    KeySelector

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Key getKey()
      Returns the selected key.

    • Method Detail

      • getKey

        Key getKey()
        Returns the selected key.
        Returns:
        the selected key, or null if none can be found
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class MarshalException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.crypto.MarshalException
  • All Implemented Interfaces:
    Serializable

    public class MarshalException
extends Exception
    Indicates an exceptional condition that occurred during the XML marshalling or unmarshalling process.

    A MarshalException can contain a cause: another throwable that caused this MarshalException to get thrown.

    Since:
    1.6
    See Also:
    XMLSignature.sign(XMLSignContext), XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext), Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      MarshalException()
      Constructs a new MarshalException with null as its detail message.
      MarshalException(String message)
      Constructs a new MarshalException with the specified detail message.
      MarshalException(String message, Throwable cause)
      Constructs a new MarshalException with the specified detail message and cause.
      MarshalException(Throwable cause)
      Constructs a new MarshalException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this MarshalException or null if the cause is nonexistent or unknown.
      void printStackTrace()
      Prints this MarshalException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this MarshalException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this MarshalException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • MarshalException

        public MarshalException()
        Constructs a new MarshalException with null as its detail message.

      • MarshalException

        public MarshalException(String message)
        Constructs a new MarshalException with the specified detail message.
        Parameters:
        message - the detail message

      • MarshalException

        public MarshalException(String message,
                        Throwable cause)
        Constructs a new MarshalException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • MarshalException

        public MarshalException(Throwable cause)
        Constructs a new MarshalException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getCause

        public Throwable getCause()
        Returns the cause of this MarshalException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this MarshalException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this MarshalException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this MarshalException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this MarshalException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this MarshalException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NodeSetData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface NodeSetData

  • All Superinterfaces:
    Data

    public interface NodeSetData
extends Data
    An abstract representation of a Data type containing a node-set. The type (class) and ordering of the nodes contained in the set are not defined by this class; instead that behavior should be defined by NodeSetData subclasses.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Iterator iterator()
      Returns a read-only iterator over the nodes contained in this NodeSetData in document order.

    • Method Detail

      • iterator

        Iterator iterator()
        Returns a read-only iterator over the nodes contained in this NodeSetData in document order. Attempts to modify the returned iterator via the remove method throw UnsupportedOperationException.
        Returns:
        an Iterator over the nodes in this NodeSetData in document order
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NoSuchMechanismException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class NoSuchMechanismException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.crypto.NoSuchMechanismException
  • All Implemented Interfaces:
    Serializable

    public class NoSuchMechanismException
extends RuntimeException
    This exception is thrown when a particular XML mechanism is requested but is not available in the environment.

    A NoSuchMechanismException can contain a cause: another throwable that caused this NoSuchMechanismException to get thrown.

    Since:
    1.6
    See Also:
    XMLSignatureFactory.getInstance, KeyInfoFactory.getInstance, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      NoSuchMechanismException()
      Constructs a new NoSuchMechanismException with null as its detail message.
      NoSuchMechanismException(String message)
      Constructs a new NoSuchMechanismException with the specified detail message.
      NoSuchMechanismException(String message, Throwable cause)
      Constructs a new NoSuchMechanismException with the specified detail message and cause.
      NoSuchMechanismException(Throwable cause)
      Constructs a new NoSuchMechanismException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this NoSuchMechanismException or null if the cause is nonexistent or unknown.
      void printStackTrace()
      Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NoSuchMechanismException

        public NoSuchMechanismException()
        Constructs a new NoSuchMechanismException with null as its detail message.

      • NoSuchMechanismException

        public NoSuchMechanismException(String message)
        Constructs a new NoSuchMechanismException with the specified detail message.
        Parameters:
        message - the detail message

      • NoSuchMechanismException

        public NoSuchMechanismException(String message,
                                Throwable cause)
        Constructs a new NoSuchMechanismException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • NoSuchMechanismException

        public NoSuchMechanismException(Throwable cause)
        Constructs a new NoSuchMechanismException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getCause

        public Throwable getCause()
        Returns the cause of this NoSuchMechanismException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this NoSuchMechanismException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this NoSuchMechanismException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this NoSuchMechanismException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OctetStreamData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class OctetStreamData

  • java.lang.Object
    • javax.xml.crypto.OctetStreamData
  • All Implemented Interfaces:
    Data

    public class OctetStreamData
extends Object
implements Data
    A representation of a Data type containing an octet stream.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      OctetStreamData(InputStream octetStream)
      Creates a new OctetStreamData.
      OctetStreamData(InputStream octetStream, String uri, String mimeType)
      Creates a new OctetStreamData.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getMimeType()
      Returns the MIME type associated with the data object represented by this OctetStreamData.
      InputStream getOctetStream()
      Returns the input stream of this OctetStreamData.
      String getURI()
      Returns the URI String identifying the data object represented by this OctetStreamData.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • OctetStreamData

        public OctetStreamData(InputStream octetStream)
        Creates a new OctetStreamData.
        Parameters:
        octetStream - the input stream containing the octets
        Throws:
        NullPointerException - if octetStream is null

      • OctetStreamData

        public OctetStreamData(InputStream octetStream,
                       String uri,
                       String mimeType)
        Creates a new OctetStreamData.
        Parameters:
        octetStream - the input stream containing the octets
        uri - the URI String identifying the data object (may be null)
        mimeType - the MIME type associated with the data object (may be null)
        Throws:
        NullPointerException - if octetStream is null

    • Method Detail

      • getOctetStream

        public InputStream getOctetStream()
        Returns the input stream of this OctetStreamData.
        Returns:
        the input stream of this OctetStreamData.

      • getURI

        public String getURI()
        Returns the URI String identifying the data object represented by this OctetStreamData.
        Returns:
        the URI String or null if not applicable

      • getMimeType

        public String getMimeType()
        Returns the MIME type associated with the data object represented by this OctetStreamData.
        Returns:
        the MIME type or null if not applicable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


URIDereferencer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface URIDereferencer

  • public interface URIDereferencer
    A dereferencer of URIReferences.

    The result of dereferencing a URIReference is either an instance of OctetStreamData or NodeSetData. Unless the URIReference is a same-document reference as defined in section 4.2 of the W3C Recommendation for XML-Signature Syntax and Processing, the result of dereferencing the URIReference MUST be an OctetStreamData.

    Since:
    1.6
    See Also:
    XMLCryptoContext.setURIDereferencer(URIDereferencer), XMLCryptoContext.getURIDereferencer()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Data dereference(URIReference uriReference, XMLCryptoContext context)
      Dereferences the specified URIReference and returns the dereferenced data.

    • Method Detail

      • dereference

        Data dereference(URIReference uriReference,
                 XMLCryptoContext context)
          throws URIReferenceException
        Dereferences the specified URIReference and returns the dereferenced data.
        Parameters:
        uriReference - the URIReference
        context - an XMLCryptoContext that may contain additional useful information for dereferencing the URI. This implementation should dereference the specified URIReference against the context's baseURI parameter, if specified.
        Returns:
        the dereferenced data
        Throws:
        NullPointerException - if uriReference or context are null
        URIReferenceException - if an exception occurs while dereferencing the specified uriReference
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


URIReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface URIReference

  • All Known Subinterfaces:
    DOMURIReference, Reference, RetrievalMethod

    public interface URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.

    Note that some subclasses may not have a type attribute and for objects of those types, the getType() method always returns null.

    Since:
    1.6
    See Also:
    URIDereferencer

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getType()
      Returns the type of data referenced by this URI.
      String getURI()
      Returns the URI of the referenced data object.

    • Method Detail

      • getURI

        String getURI()
        Returns the URI of the referenced data object.
        Returns:
        the URI of the data object in RFC 2396 format (may be null if not specified)

      • getType

        String getType()
        Returns the type of data referenced by this URI.
        Returns:
        the type (a URI) of the data object (may be null if not specified)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


URIReferenceException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Class URIReferenceException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.crypto.URIReferenceException
  • All Implemented Interfaces:
    Serializable

    public class URIReferenceException
extends Exception
    Indicates an exceptional condition thrown while dereferencing a URIReference.

    A URIReferenceException can contain a cause: another throwable that caused this URIReferenceException to get thrown.

    Since:
    1.6
    See Also:
    URIDereferencer.dereference(URIReference, XMLCryptoContext), RetrievalMethod.dereference(XMLCryptoContext), Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      URIReferenceException()
      Constructs a new URIReferenceException with null as its detail message.
      URIReferenceException(String message)
      Constructs a new URIReferenceException with the specified detail message.
      URIReferenceException(String message, Throwable cause)
      Constructs a new URIReferenceException with the specified detail message and cause.
      URIReferenceException(String message, Throwable cause, URIReference uriReference)
      Constructs a new URIReferenceException with the specified detail message, cause and URIReference.
      URIReferenceException(Throwable cause)
      Constructs a new URIReferenceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this URIReferenceException or null if the cause is nonexistent or unknown.
      URIReference getURIReference()
      Returns the URIReference that was being dereferenced when the exception was thrown.
      void printStackTrace()
      Prints this URIReferenceException, its backtrace and the cause's backtrace to the standard error stream.
      void printStackTrace(PrintStream s)
      Prints this URIReferenceException, its backtrace and the cause's backtrace to the specified print stream.
      void printStackTrace(PrintWriter s)
      Prints this URIReferenceException, its backtrace and the cause's backtrace to the specified print writer.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • URIReferenceException

        public URIReferenceException()
        Constructs a new URIReferenceException with null as its detail message.

      • URIReferenceException

        public URIReferenceException(String message)
        Constructs a new URIReferenceException with the specified detail message.
        Parameters:
        message - the detail message

      • URIReferenceException

        public URIReferenceException(String message,
                             Throwable cause)
        Constructs a new URIReferenceException with the specified detail message and cause.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • URIReferenceException

        public URIReferenceException(String message,
                             Throwable cause,
                             URIReference uriReference)
        Constructs a new URIReferenceException with the specified detail message, cause and URIReference.

        Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

        Parameters:
        message - the detail message
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        uriReference - the URIReference that was being dereferenced when the error was encountered
        Throws:
        NullPointerException - if uriReference is null

      • URIReferenceException

        public URIReferenceException(Throwable cause)
        Constructs a new URIReferenceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - the cause (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    • Method Detail

      • getURIReference

        public URIReference getURIReference()
        Returns the URIReference that was being dereferenced when the exception was thrown.
        Returns:
        the URIReference that was being dereferenced when the exception was thrown, or null if not specified

      • getCause

        public Throwable getCause()
        Returns the cause of this URIReferenceException or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this URIReferenceException to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this URIReferenceException or null if the cause is nonexistent or unknown.

      • printStackTrace

        public void printStackTrace()
        Prints this URIReferenceException, its backtrace and the cause's backtrace to the standard error stream.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Prints this URIReferenceException, its backtrace and the cause's backtrace to the specified print stream.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintStream to use for output

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Prints this URIReferenceException, its backtrace and the cause's backtrace to the specified print writer.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - PrintWriter to use for output
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLCryptoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface XMLCryptoContext

  • All Known Subinterfaces:
    XMLSignContext, XMLValidateContext
    All Known Implementing Classes:
    DOMCryptoContext, DOMSignContext, DOMValidateContext

    public interface XMLCryptoContext
    Contains common context information for XML cryptographic operations.

    This interface contains methods for setting and retrieving properties that affect the processing of XML signatures or XML encrypted structures.

    Note that XMLCryptoContext instances can contain information and state specific to the XML cryptographic structure it is used with. The results are unpredictable if an XMLCryptoContext is used with multiple structures (for example, you should not use the same XMLValidateContext instance to validate two different XMLSignature objects).

    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object get(Object key)
      Returns the value to which this context maps the specified key.
      String getBaseURI()
      Returns the base URI.
      String getDefaultNamespacePrefix()
      Returns the default namespace prefix.
      KeySelector getKeySelector()
      Returns the key selector for finding a key.
      String getNamespacePrefix(String namespaceURI, String defaultPrefix)
      Returns the namespace prefix that the specified namespace URI is associated with.
      Object getProperty(String name)
      Returns the value of the specified property.
      URIDereferencer getURIDereferencer()
      Returns a URIDereferencer that is used to dereference URIReferences.
      Object put(Object key, Object value)
      Associates the specified value with the specified key in this context.
      String putNamespacePrefix(String namespaceURI, String prefix)
      Maps the specified namespace URI to the specified prefix.
      void setBaseURI(String baseURI)
      Sets the base URI.
      void setDefaultNamespacePrefix(String defaultPrefix)
      Sets the default namespace prefix.
      void setKeySelector(KeySelector ks)
      Sets the key selector for finding a key.
      Object setProperty(String name, Object value)
      Sets the specified property.
      void setURIDereferencer(URIDereferencer dereferencer)
      Sets a URIDereferencer that is used to dereference URIReferences.

    • Method Detail

      • getBaseURI

        String getBaseURI()
        Returns the base URI.
        Returns:
        the base URI, or null if not specified
        See Also:
        setBaseURI(String)

      • setBaseURI

        void setBaseURI(String baseURI)
        Sets the base URI.
        Parameters:
        baseURI - the base URI, or null to remove current value
        Throws:
        IllegalArgumentException - if baseURI is not RFC 2396 compliant
        See Also:
        getBaseURI()

      • getKeySelector

        KeySelector getKeySelector()
        Returns the key selector for finding a key.
        Returns:
        the key selector, or null if not specified
        See Also:
        setKeySelector(KeySelector)

      • setKeySelector

        void setKeySelector(KeySelector ks)
        Sets the key selector for finding a key.
        Parameters:
        ks - the key selector, or null to remove the current setting
        See Also:
        getKeySelector()

      • getURIDereferencer

        URIDereferencer getURIDereferencer()
        Returns a URIDereferencer that is used to dereference URIReferences.
        Returns:
        the URIDereferencer, or null if not specified
        See Also:
        setURIDereferencer(URIDereferencer)

      • setURIDereferencer

        void setURIDereferencer(URIDereferencer dereferencer)
        Sets a URIDereferencer that is used to dereference URIReferences. The specified URIDereferencer is used in place of an implementation's default URIDereferencer.
        Parameters:
        dereferencer - the URIDereferencer, or null to remove any current setting
        See Also:
        getURIDereferencer()

      • getNamespacePrefix

        String getNamespacePrefix(String namespaceURI,
                          String defaultPrefix)
        Returns the namespace prefix that the specified namespace URI is associated with. Returns the specified default prefix if the specified namespace URI has not been bound to a prefix. To bind a namespace URI to a prefix, call the putNamespacePrefix method.
        Parameters:
        namespaceURI - a namespace URI
        defaultPrefix - the prefix to be returned in the event that the the specified namespace URI has not been bound to a prefix.
        Returns:
        the prefix that is associated with the specified namespace URI, or defaultPrefix if the URI is not registered. If the namespace URI is registered but has no prefix, an empty string ("") is returned.
        Throws:
        NullPointerException - if namespaceURI is null
        See Also:
        putNamespacePrefix(String, String)

      • putNamespacePrefix

        String putNamespacePrefix(String namespaceURI,
                          String prefix)
        Maps the specified namespace URI to the specified prefix. If there is already a prefix associated with the specified namespace URI, the old prefix is replaced by the specified prefix.
        Parameters:
        namespaceURI - a namespace URI
        prefix - a namespace prefix (or null to remove any existing mapping). Specifying the empty string ("") binds no prefix to the namespace URI.
        Returns:
        the previous prefix associated with the specified namespace URI, or null if there was none
        Throws:
        NullPointerException - if namespaceURI is null
        See Also:
        getNamespacePrefix(String, String)

      • getDefaultNamespacePrefix

        String getDefaultNamespacePrefix()
        Returns the default namespace prefix. The default namespace prefix is the prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
        Returns:
        the default namespace prefix, or null if none has been set.
        See Also:
        setDefaultNamespacePrefix(String)

      • setDefaultNamespacePrefix

        void setDefaultNamespacePrefix(String defaultPrefix)
        Sets the default namespace prefix. This sets the namespace prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
        Parameters:
        defaultPrefix - the default namespace prefix, or null to remove the current setting. Specify the empty string ("") to bind no prefix.
        See Also:
        getDefaultNamespacePrefix()

      • setProperty

        Object setProperty(String name,
                   Object value)
        Sets the specified property.
        Parameters:
        name - the name of the property
        value - the value of the property to be set
        Returns:
        the previous value of the specified property, or null if it did not have a value
        Throws:
        NullPointerException - if name is null
        See Also:
        getProperty(String)

      • getProperty

        Object getProperty(String name)
        Returns the value of the specified property.
        Parameters:
        name - the name of the property
        Returns:
        the current value of the specified property, or null if it does not have a value
        Throws:
        NullPointerException - if name is null
        See Also:
        setProperty(String, Object)

      • get

        Object get(Object key)
        Returns the value to which this context maps the specified key.

        More formally, if this context contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

        This method is useful for retrieving arbitrary information that is specific to the cryptographic operation that this context is used for.

        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which this context maps the specified key, or null if there is no mapping for the key
        See Also:
        put(Object, Object)

      • put

        Object put(Object key,
           Object value)
        Associates the specified value with the specified key in this context. If the context previously contained a mapping for this key, the old value is replaced by the specified value.

        This method is useful for storing arbitrary information that is specific to the cryptographic operation that this context is used for.

        Parameters:
        key - key with which the specified value is to be associated with
        value - value to be associated with the specified key
        Returns:
        the previous value associated with the key, or null if there was no mapping for the key
        Throws:
        IllegalArgumentException - if some aspect of this key or value prevents it from being stored in this context
        See Also:
        get(Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLStructure

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
javax.xml.crypto

Interface XMLStructure

  • All Known Subinterfaces:
    CanonicalizationMethod, DigestMethod, KeyInfo, KeyName, KeyValue, Manifest, PGPData, Reference, RetrievalMethod, SignatureMethod, SignatureProperties, SignatureProperty, SignedInfo, Transform, X509Data, X509IssuerSerial, XMLObject, XMLSignature, XMLSignature.SignatureValue
    All Known Implementing Classes:
    DOMStructure, TransformService

    public interface XMLStructure
    A representation of an XML structure from any namespace. The purpose of this interface is to group (and provide type safety for) all representations of XML structures.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isFeatureSupported(String feature)
      Indicates whether a specified feature is supported.

    • Method Detail

      • isFeatureSupported

        boolean isFeatureSupported(String feature)
        Indicates whether a specified feature is supported.
        Parameters:
        feature - the feature name (as an absolute URI)
        Returns:
        true if the specified feature is supported, false otherwise
        Throws:
        NullPointerException - if feature is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


datatype

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.datatype

XML/Java Type Mappings.

See: Description

  • Class Summary
    Class Description
    DatatypeConstants
    Utility class to contain basic Datatype values as constants.
    DatatypeConstants.Field
    Type-safe enum class that represents six fields of the Duration class.
    DatatypeFactory
    Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
    Duration
    Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification.
    XMLGregorianCalendar
    Representation for W3C XML Schema 1.0 date/time datatypes.
  • Exception Summary
    Exception Description
    DatatypeConfigurationException
    Indicates a serious configuration error.

Package javax.xml.datatype Description

XML/Java Type Mappings.

javax.xml.datatypeAPI provides XML/Java type mappings.

The following XML standards apply:

  • W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
W3C XML Schema Data Type | Java Data Type
xs:date | XMLGregorianCalendar
xs:dateTime | XMLGregorianCalendar
xs:duration | Duration
xs:gDay | XMLGregorianCalendar
xs:gMonth | XMLGregorianCalendar
xs:gMonthDay | XMLGregorianCalendar
xs:gYear | XMLGregorianCalendar
xs:gYearMonth | XMLGregorianCalendar
xs:time | XMLGregorianCalendar
XQuery 1.0 and XPath 2.0 Data Model | Java Data Type
xdt:dayTimeDuration | Duration
xdt:yearMonthDuration | Duration

W3C XML Schema data types that have a "natural" mapping to Java types are defined by JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. JAXB defined mappings for XML Schema built-in data types include:

  • xs:anySimpleType
  • xs:base64Binary
  • xs:boolean
  • xs:byte
  • xs:decimal
  • xs:double
  • xs:float
  • xs:hexBinary
  • xs:int
  • xs:integer
  • xs:long
  • xs:QName
  • xs:short
  • xs:string
  • xs:unsignedByte
  • xs:unsignedInt
  • xs:unsignedShort
  • Author Jeff Suttor
  • See W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.datatype Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.datatype

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.datatype.DatatypeConstants
    • javax.xml.datatype.DatatypeConstants.Field
    • javax.xml.datatype.DatatypeFactory
    • javax.xml.datatype.Duration
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.datatype.DatatypeConfigurationException
    • javax.xml.datatype.XMLGregorianCalendar (implements java.lang.Cloneable)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.datatype

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.datatype

  • Packages that use javax.xml.datatype
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.
  • Classes in javax.xml.datatype used by javax.xml.datatype
    Class and Description
    DatatypeConfigurationException
    Indicates a serious configuration error.
    DatatypeConstants.Field
    Type-safe enum class that represents six fields of the Duration class.
    DatatypeFactory
    Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
    Duration
    Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification.
    XMLGregorianCalendar
    Representation for W3C XML Schema 1.0 date/time datatypes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.DatatypeConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.DatatypeConfigurationException

  • Packages that use DatatypeConfigurationException
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.

    • Uses of DatatypeConfigurationException in javax.xml.datatype

      Methods in javax.xml.datatype that throw DatatypeConfigurationException
      Modifier and Type Method and Description
      static DatatypeFactory DatatypeFactory.newInstance()
      Obtain a new instance of a DatatypeFactory.
      static DatatypeFactory DatatypeFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a DatatypeFactory from class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.DatatypeConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.DatatypeConstants

No usage of javax.xml.datatype.DatatypeConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.DatatypeConstants.Field

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.DatatypeConstants.Field

  • Packages that use DatatypeConstants.Field
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.

    • Uses of DatatypeConstants.Field in javax.xml.datatype

      Fields in javax.xml.datatype declared as DatatypeConstants.Field
      Modifier and Type Field and Description
      static DatatypeConstants.Field DatatypeConstants.DAYS
      A constant that represents the days field.
      static DatatypeConstants.Field DatatypeConstants.HOURS
      A constant that represents the hours field.
      static DatatypeConstants.Field DatatypeConstants.MINUTES
      A constant that represents the minutes field.
      static DatatypeConstants.Field DatatypeConstants.MONTHS
      A constant that represents the months field.
      static DatatypeConstants.Field DatatypeConstants.SECONDS
      A constant that represents the seconds field.
      static DatatypeConstants.Field DatatypeConstants.YEARS
      A constant that represents the years field.
      Methods in javax.xml.datatype with parameters of type DatatypeConstants.Field
      Modifier and Type Method and Description
      abstract Number Duration.getField(DatatypeConstants.Field field)
      Gets the value of a field.
      abstract boolean Duration.isSet(DatatypeConstants.Field field)
      Checks if a field is set.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.DatatypeFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.DatatypeFactory

  • Packages that use DatatypeFactory
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.

    • Uses of DatatypeFactory in javax.xml.datatype

      Methods in javax.xml.datatype that return DatatypeFactory
      Modifier and Type Method and Description
      static DatatypeFactory DatatypeFactory.newInstance()
      Obtain a new instance of a DatatypeFactory.
      static DatatypeFactory DatatypeFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a DatatypeFactory from class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.Duration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.Duration

  • Packages that use Duration
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.

    • Uses of Duration in javax.xml.datatype

      Methods in javax.xml.datatype that return Duration
      Modifier and Type Method and Description
      abstract Duration Duration.add(Duration rhs)
      Computes a new duration whose value is this+rhs.
      abstract Duration Duration.multiply(BigDecimal factor)
      Computes a new duration whose value is factor times longer than the value of this duration.
      Duration Duration.multiply(int factor)
      Computes a new duration whose value is factor times longer than the value of this duration.
      abstract Duration Duration.negate()
      Returns a new Duration object whose value is -this.
      abstract Duration DatatypeFactory.newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)
      Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
      Duration DatatypeFactory.newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
      Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
      abstract Duration DatatypeFactory.newDuration(long durationInMilliSeconds)
      Obtain a new instance of a Duration specifying the Duration as milliseconds.
      abstract Duration DatatypeFactory.newDuration(String lexicalRepresentation)
      Obtain a new instance of a Duration specifying the Duration as its string representation, "PnYnMnDTnHnMnS", as defined in XML Schema 1.0 section 3.2.6.1.
      Duration DatatypeFactory.newDurationDayTime(boolean isPositive, BigInteger day, BigInteger hour, BigInteger minute, BigInteger second)
      Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration DatatypeFactory.newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)
      Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration DatatypeFactory.newDurationDayTime(long durationInMilliseconds)
      Create a Duration of type xdt:dayTimeDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration DatatypeFactory.newDurationDayTime(String lexicalRepresentation)
      Create a Duration of type xdt:dayTimeDuration by parsing its String representation, "PnDTnHnMnS", XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration DatatypeFactory.newDurationYearMonth(boolean isPositive, BigInteger year, BigInteger month)
      Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration DatatypeFactory.newDurationYearMonth(boolean isPositive, int year, int month)
      Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration DatatypeFactory.newDurationYearMonth(long durationInMilliseconds)
      Create a Duration of type xdt:yearMonthDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration DatatypeFactory.newDurationYearMonth(String lexicalRepresentation)
      Create a Duration of type xdt:yearMonthDuration by parsing its String representation, "PnYnM", XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      abstract Duration Duration.normalizeWith(Calendar startTimeInstant)
      Converts the years and months fields into the days field by using a specific time instant as the reference point.
      Duration Duration.subtract(Duration rhs)
      Computes a new duration whose value is this-rhs.
      Methods in javax.xml.datatype with parameters of type Duration
      Modifier and Type Method and Description
      abstract void XMLGregorianCalendar.add(Duration duration)
      Add duration to this instance.
      abstract Duration Duration.add(Duration rhs)
      Computes a new duration whose value is this+rhs.
      abstract int Duration.compare(Duration duration)
      Partial order relation comparison with this Duration instance.
      boolean Duration.isLongerThan(Duration duration)
      Checks if this duration object is strictly longer than another Duration object.
      boolean Duration.isShorterThan(Duration duration)
      Checks if this duration object is strictly shorter than another Duration object.
      Duration Duration.subtract(Duration rhs)
      Computes a new duration whose value is this-rhs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.datatype.XMLGregorianCalendar

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.datatype.XMLGregorianCalendar

  • Packages that use XMLGregorianCalendar
    Package Description
    javax.xml.datatype
    XML/Java Type Mappings.

    • Uses of XMLGregorianCalendar in javax.xml.datatype

      Methods in javax.xml.datatype that return XMLGregorianCalendar
      Modifier and Type Method and Description
      abstract XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendar()
      Create a new instance of an XMLGregorianCalendar.
      abstract XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendar(BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone)
      Constructor allowing for complete value spaces allowed by W3C XML Schema 1.0 recommendation for xsd:dateTime and related builtin datatypes.
      abstract XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendar(GregorianCalendar cal)
      Create an XMLGregorianCalendar from a GregorianCalendar.
      XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendar(int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)
      Constructor of value spaces that a java.util.GregorianCalendar instance would need to convert to an XMLGregorianCalendar instance.
      abstract XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendar(String lexicalRepresentation)
      Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
      XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendarDate(int year, int month, int day, int timezone)
      Create a Java representation of XML Schema builtin datatype date or g*.
      XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendarTime(int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone)
      Create a Java instance of XML Schema builtin datatype time.
      XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int timezone)
      Create a Java instance of XML Schema builtin datatype time.
      XMLGregorianCalendar DatatypeFactory.newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int milliseconds, int timezone)
      Create a Java instance of XML Schema builtin datatype time.
      abstract XMLGregorianCalendar XMLGregorianCalendar.normalize()
      Normalize this instance to UTC.
      Methods in javax.xml.datatype with parameters of type XMLGregorianCalendar
      Modifier and Type Method and Description
      abstract int XMLGregorianCalendar.compare(XMLGregorianCalendar xmlGregorianCalendar)
      Compare two instances of W3C XML Schema 1.0 date/time datatypes according to partial order relation defined in W3C XML Schema 1.0 Part 2, Section 3.2.7.3, Order relation on dateTime.
      abstract GregorianCalendar XMLGregorianCalendar.toGregorianCalendar(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)
      Convert this XMLGregorianCalendar along with provided parameters to a GregorianCalendar instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class DatatypeConfigurationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.datatype.DatatypeConfigurationException
  • All Implemented Interfaces:
    Serializable

    public class DatatypeConfigurationException
extends Exception

    Indicates a serious configuration error.

    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      DatatypeConfigurationException()
      Create a new DatatypeConfigurationException with no specified detail mesage and cause.
      DatatypeConfigurationException(String message)
      Create a new DatatypeConfigurationException with the specified detail message.
      DatatypeConfigurationException(String message, Throwable cause)
      Create a new DatatypeConfigurationException with the specified detail message and cause.
      DatatypeConfigurationException(Throwable cause)
      Create a new DatatypeConfigurationException with the specified cause.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DatatypeConfigurationException

        public DatatypeConfigurationException()

        Create a new DatatypeConfigurationException with no specified detail mesage and cause.

      • DatatypeConfigurationException

        public DatatypeConfigurationException(String message)

        Create a new DatatypeConfigurationException with the specified detail message.

        Parameters:
        message - The detail message.

      • DatatypeConfigurationException

        public DatatypeConfigurationException(String message,
                                      Throwable cause)

        Create a new DatatypeConfigurationException with the specified detail message and cause.

        Parameters:
        message - The detail message.
        cause - The cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.

      • DatatypeConfigurationException

        public DatatypeConfigurationException(Throwable cause)

        Create a new DatatypeConfigurationException with the specified cause.

        Parameters:
        cause - The cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class DatatypeConstants

  • java.lang.Object
    • javax.xml.datatype.DatatypeConstants

  • public final class DatatypeConstants
extends Object

    Utility class to contain basic Datatype values as constants.

    Since:
    1.5

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  DatatypeConstants.Field
      Type-safe enum class that represents six fields of the Duration class.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int APRIL
      Value for fourth month of year.
      static int AUGUST
      Value for eighth month of year.
      static QName DATE
      Fully qualified name for W3C XML Schema 1.0 datatype date.
      static QName DATETIME
      Fully qualified name for W3C XML Schema 1.0 datatype dateTime.
      static DatatypeConstants.Field DAYS
      A constant that represents the days field.
      static int DECEMBER
      Value for twelve month of year.
      static QName DURATION
      Fully qualified name for W3C XML Schema datatype duration.
      static QName DURATION_DAYTIME
      Fully qualified name for XQuery 1.0 and XPath 2.0 datatype dayTimeDuration.
      static QName DURATION_YEARMONTH
      Fully qualified name for XQuery 1.0 and XPath 2.0 datatype yearMonthDuration.
      static int EQUAL
      Comparison result.
      static int FEBRUARY
      Value for second month of year.
      static int FIELD_UNDEFINED
      Designation that an "int" field is not set.
      static QName GDAY
      Fully qualified name for W3C XML Schema 1.0 datatype gDay.
      static QName GMONTH
      Fully qualified name for W3C XML Schema 1.0 datatype gMonth.
      static QName GMONTHDAY
      Fully qualified name for W3C XML Schema 1.0 datatype gMonthDay.
      static int GREATER
      Comparison result.
      static QName GYEAR
      Fully qualified name for W3C XML Schema 1.0 datatype gYear.
      static QName GYEARMONTH
      Fully qualified name for W3C XML Schema 1.0 datatype gYearMonth.
      static DatatypeConstants.Field HOURS
      A constant that represents the hours field.
      static int INDETERMINATE
      Comparison result.
      static int JANUARY
      Value for first month of year.
      static int JULY
      Value for seventh month of year.
      static int JUNE
      Value for sixth month of year.
      static int LESSER
      Comparison result.
      static int MARCH
      Value for third month of year.
      static int MAX_TIMEZONE_OFFSET
      W3C XML Schema max timezone offset is -14:00.
      static int MAY
      Value for fifth month of year.
      static int MIN_TIMEZONE_OFFSET
      W3C XML Schema min timezone offset is +14:00.
      static DatatypeConstants.Field MINUTES
      A constant that represents the minutes field.
      static DatatypeConstants.Field MONTHS
      A constant that represents the months field.
      static int NOVEMBER
      Value for eleven month of year.
      static int OCTOBER
      Value for tenth month of year.
      static DatatypeConstants.Field SECONDS
      A constant that represents the seconds field.
      static int SEPTEMBER
      Value for ninth month of year.
      static QName TIME
      Fully qualified name for W3C XML Schema 1.0 datatype time.
      static DatatypeConstants.Field YEARS
      A constant that represents the years field.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • JANUARY

        public static final int JANUARY
        Value for first month of year.
        See Also:
        Constant Field Values

      • FEBRUARY

        public static final int FEBRUARY
        Value for second month of year.
        See Also:
        Constant Field Values

      • MARCH

        public static final int MARCH
        Value for third month of year.
        See Also:
        Constant Field Values

      • APRIL

        public static final int APRIL
        Value for fourth month of year.
        See Also:
        Constant Field Values

      • MAY

        public static final int MAY
        Value for fifth month of year.
        See Also:
        Constant Field Values

      • JUNE

        public static final int JUNE
        Value for sixth month of year.
        See Also:
        Constant Field Values

      • JULY

        public static final int JULY
        Value for seventh month of year.
        See Also:
        Constant Field Values

      • AUGUST

        public static final int AUGUST
        Value for eighth month of year.
        See Also:
        Constant Field Values

      • SEPTEMBER

        public static final int SEPTEMBER
        Value for ninth month of year.
        See Also:
        Constant Field Values

      • OCTOBER

        public static final int OCTOBER
        Value for tenth month of year.
        See Also:
        Constant Field Values

      • NOVEMBER

        public static final int NOVEMBER
        Value for eleven month of year.
        See Also:
        Constant Field Values

      • DECEMBER

        public static final int DECEMBER
        Value for twelve month of year.
        See Also:
        Constant Field Values

      • LESSER

        public static final int LESSER

        Comparison result.

        See Also:
        Constant Field Values

      • EQUAL

        public static final int EQUAL

        Comparison result.

        See Also:
        Constant Field Values

      • GREATER

        public static final int GREATER

        Comparison result.

        See Also:
        Constant Field Values

      • INDETERMINATE

        public static final int INDETERMINATE

        Comparison result.

        See Also:
        Constant Field Values

      • FIELD_UNDEFINED

        public static final int FIELD_UNDEFINED
        Designation that an "int" field is not set.
        See Also:
        Constant Field Values

      • YEARS

        public static final DatatypeConstants.Field YEARS

        A constant that represents the years field.

      • MONTHS

        public static final DatatypeConstants.Field MONTHS

        A constant that represents the months field.

      • DAYS

        public static final DatatypeConstants.Field DAYS

        A constant that represents the days field.

      • HOURS

        public static final DatatypeConstants.Field HOURS

        A constant that represents the hours field.

      • MINUTES

        public static final DatatypeConstants.Field MINUTES

        A constant that represents the minutes field.

      • SECONDS

        public static final DatatypeConstants.Field SECONDS

        A constant that represents the seconds field.

      • DATETIME

        public static final QName DATETIME

        Fully qualified name for W3C XML Schema 1.0 datatype dateTime.

      • TIME

        public static final QName TIME

        Fully qualified name for W3C XML Schema 1.0 datatype time.

      • DATE

        public static final QName DATE

        Fully qualified name for W3C XML Schema 1.0 datatype date.

      • GYEARMONTH

        public static final QName GYEARMONTH

        Fully qualified name for W3C XML Schema 1.0 datatype gYearMonth.

      • GMONTHDAY

        public static final QName GMONTHDAY

        Fully qualified name for W3C XML Schema 1.0 datatype gMonthDay.

      • GYEAR

        public static final QName GYEAR

        Fully qualified name for W3C XML Schema 1.0 datatype gYear.

      • GMONTH

        public static final QName GMONTH

        Fully qualified name for W3C XML Schema 1.0 datatype gMonth.

      • GDAY

        public static final QName GDAY

        Fully qualified name for W3C XML Schema 1.0 datatype gDay.

      • DURATION

        public static final QName DURATION

        Fully qualified name for W3C XML Schema datatype duration.

      • DURATION_DAYTIME

        public static final QName DURATION_DAYTIME

        Fully qualified name for XQuery 1.0 and XPath 2.0 datatype dayTimeDuration.

      • DURATION_YEARMONTH

        public static final QName DURATION_YEARMONTH

        Fully qualified name for XQuery 1.0 and XPath 2.0 datatype yearMonthDuration.

      • MAX_TIMEZONE_OFFSET

        public static final int MAX_TIMEZONE_OFFSET
        W3C XML Schema max timezone offset is -14:00. Zone offset is in minutes.
        See Also:
        Constant Field Values

      • MIN_TIMEZONE_OFFSET

        public static final int MIN_TIMEZONE_OFFSET
        W3C XML Schema min timezone offset is +14:00. Zone offset is in minutes.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeConstants.Field

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class DatatypeConstants.Field

  • java.lang.Object
    • javax.xml.datatype.DatatypeConstants.Field
  • Enclosing class:
    DatatypeConstants

    public static final class DatatypeConstants.Field
extends Object
    Type-safe enum class that represents six fields of the Duration class.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getId()
      Get id of this Field.
      String toString()
      Returns a field name in English.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Method Detail

      • toString

        public String toString()
        Returns a field name in English. This method is intended to be used for debugging/diagnosis and not for display to end-users.
        Overrides:
        toString in class Object
        Returns:
        a non-null valid String constant.

      • getId

        public int getId()

        Get id of this Field.

        Returns:
        Id of field.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DatatypeFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class DatatypeFactory

  • java.lang.Object
    • javax.xml.datatype.DatatypeFactory

  • public abstract class DatatypeFactory
extends Object

    Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.

    A new instance of the DatatypeFactory is created through the newInstance() method that uses the following implementation resolution mechanisms to determine an implementation:

    1. If the system property specified by DATATYPEFACTORY_PROPERTY, "javax.xml.datatype.DatatypeFactory", exists, a class with the name of the property value is instantiated. Any Exception thrown during the instantiation process is wrapped as a DatatypeConfigurationException.
    2. If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a Properties Object. The Properties Object is then queried for the property as documented in the prior step and processed as documented in the prior step.
    3. Uses the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
      In case of service configuration error a DatatypeConfigurationException will be thrown.
    4. The final mechanism is to attempt to instantiate the Class specified by DATATYPEFACTORY_IMPLEMENTATION_CLASS. Any Exception thrown during the instantiation process is wrapped as a DatatypeConfigurationException.
    Since:
    1.5
    Version:
    $Revision: 1.13 $, $Date: 2010/03/11 23:10:53 $

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DATATYPEFACTORY_IMPLEMENTATION_CLASS
      Default implementation class name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
      static String DATATYPEFACTORY_PROPERTY
      Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DatatypeFactory()
      Protected constructor to prevent instaniation outside of package.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Duration newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)
      Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
      Duration newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
      Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
      abstract Duration newDuration(long durationInMilliSeconds)
      Obtain a new instance of a Duration specifying the Duration as milliseconds.
      abstract Duration newDuration(String lexicalRepresentation)
      Obtain a new instance of a Duration specifying the Duration as its string representation, "PnYnMnDTnHnMnS", as defined in XML Schema 1.0 section 3.2.6.1.
      Duration newDurationDayTime(boolean isPositive, BigInteger day, BigInteger hour, BigInteger minute, BigInteger second)
      Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)
      Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration newDurationDayTime(long durationInMilliseconds)
      Create a Duration of type xdt:dayTimeDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration newDurationDayTime(String lexicalRepresentation)
      Create a Duration of type xdt:dayTimeDuration by parsing its String representation, "PnDTnHnMnS", XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
      Duration newDurationYearMonth(boolean isPositive, BigInteger year, BigInteger month)
      Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration newDurationYearMonth(boolean isPositive, int year, int month)
      Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration newDurationYearMonth(long durationInMilliseconds)
      Create a Duration of type xdt:yearMonthDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      Duration newDurationYearMonth(String lexicalRepresentation)
      Create a Duration of type xdt:yearMonthDuration by parsing its String representation, "PnYnM", XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
      static DatatypeFactory newInstance()
      Obtain a new instance of a DatatypeFactory.
      static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a DatatypeFactory from class name.
      abstract XMLGregorianCalendar newXMLGregorianCalendar()
      Create a new instance of an XMLGregorianCalendar.
      abstract XMLGregorianCalendar newXMLGregorianCalendar(BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone)
      Constructor allowing for complete value spaces allowed by W3C XML Schema 1.0 recommendation for xsd:dateTime and related builtin datatypes.
      abstract XMLGregorianCalendar newXMLGregorianCalendar(GregorianCalendar cal)
      Create an XMLGregorianCalendar from a GregorianCalendar.
      XMLGregorianCalendar newXMLGregorianCalendar(int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)
      Constructor of value spaces that a java.util.GregorianCalendar instance would need to convert to an XMLGregorianCalendar instance.
      abstract XMLGregorianCalendar newXMLGregorianCalendar(String lexicalRepresentation)
      Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
      XMLGregorianCalendar newXMLGregorianCalendarDate(int year, int month, int day, int timezone)
      Create a Java representation of XML Schema builtin datatype date or g*.
      XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone)
      Create a Java instance of XML Schema builtin datatype time.
      XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int timezone)
      Create a Java instance of XML Schema builtin datatype time.
      XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int milliseconds, int timezone)
      Create a Java instance of XML Schema builtin datatype time.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • DATATYPEFACTORY_PROPERTY

        public static final String DATATYPEFACTORY_PROPERTY

        Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.

        Default value is javax.xml.datatype.DatatypeFactory.

        See Also:
        Constant Field Values

      • DATATYPEFACTORY_IMPLEMENTATION_CLASS

        public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS

        Default implementation class name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.

        Implementers should specify the name of an appropriate class to be instantiated if no other implementation resolution mechanism succeeds.

        Users should not refer to this field; it is intended only to document a factory implementation detail.

    • Constructor Detail

      • DatatypeFactory

        protected DatatypeFactory()

        Protected constructor to prevent instaniation outside of package.

        Use newInstance() to create a DatatypeFactory.

    • Method Detail

      • newInstance

        public static DatatypeFactory newInstance()
                                   throws DatatypeConfigurationException

        Obtain a new instance of a DatatypeFactory.

        The implementation resolution mechanisms are defined in this Class's documentation.

        Returns:
        New instance of a DatatypeFactory
        Throws:
        DatatypeConfigurationException - If the implementation is not available or cannot be instantiated.
        See Also:
        newInstance(String factoryClassName, ClassLoader classLoader)

      • newInstance

        public static DatatypeFactory newInstance(String factoryClassName,
                                          ClassLoader classLoader)
                                   throws DatatypeConfigurationException

        Obtain a new instance of a DatatypeFactory from class name. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Once an application has obtained a reference to a DatatypeFactory it can use the factory to configure and obtain datatype instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.datatype.DatatypeFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        New instance of a DatatypeFactory
        Throws:
        DatatypeConfigurationException - if factoryClassName is null, or the factory class cannot be loaded, instantiated.
        Since:
        1.6
        See Also:
        newInstance()

      • newDuration

        public abstract Duration newDuration(String lexicalRepresentation)

        Obtain a new instance of a Duration specifying the Duration as its string representation, "PnYnMnDTnHnMnS", as defined in XML Schema 1.0 section 3.2.6.1.

        XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:

        duration represents a duration of time. The value space of duration is a six-dimensional space where the coordinates designate the Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. These components are ordered in their significance by their order of appearance i.e. as year, month, day, hour, minute, and second.

        All six values are set and available from the created Duration

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        Parameters:
        lexicalRepresentation - String representation of a Duration.
        Returns:
        New Duration created from parsing the lexicalRepresentation.
        Throws:
        IllegalArgumentException - If lexicalRepresentation is not a valid representation of a Duration.
        UnsupportedOperationException - If implementation cannot support requested values.
        NullPointerException - if lexicalRepresentation is null.

      • newDuration

        public abstract Duration newDuration(long durationInMilliSeconds)

        Obtain a new instance of a Duration specifying the Duration as milliseconds.

        XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:

        duration represents a duration of time. The value space of duration is a six-dimensional space where the coordinates designate the Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. These components are ordered in their significance by their order of appearance i.e. as year, month, day, hour, minute, and second.

        All six values are set by computing their values from the specified milliseconds and are available using the get methods of the created Duration. The values conform to and are defined by:

        • ISO 8601:2000(E) Section 5.5.3.2 Alternative format
        • W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats
        • XMLGregorianCalendar Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation

        The default start instance is defined by GregorianCalendar's use of the start of the epoch: i.e., Calendar.YEAR = 1970, Calendar.MONTH = Calendar.JANUARY, Calendar.DATE = 1, etc. This is important as there are variations in the Gregorian Calendar, e.g. leap years have different days in the month = Calendar.FEBRUARY so the result of Duration.getMonths() and Duration.getDays() can be influenced.

        Parameters:
        durationInMilliSeconds - Duration in milliseconds to create.
        Returns:
        New Duration representing durationInMilliSeconds.

      • newDuration

        public abstract Duration newDuration(boolean isPositive,
                                     BigInteger years,
                                     BigInteger months,
                                     BigInteger days,
                                     BigInteger hours,
                                     BigInteger minutes,
                                     BigDecimal seconds)

        Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        A null value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        years - of this Duration
        months - of this Duration
        days - of this Duration
        hours - of this Duration
        minutes - of this Duration
        seconds - of this Duration
        Returns:
        New Duration created from the specified values.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if all the fields (years, months, ...) are null or if any of the fields is negative.
        UnsupportedOperationException - If implementation cannot support requested values.

      • newDuration

        public Duration newDuration(boolean isPositive,
                            int years,
                            int months,
                            int days,
                            int hours,
                            int minutes,
                            int seconds)

        Obtain a new instance of a Duration specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        years - of this Duration
        months - of this Duration
        days - of this Duration
        hours - of this Duration
        minutes - of this Duration
        seconds - of this Duration
        Returns:
        New Duration created from the specified values.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if any of the fields is negative.
        See Also:
        newDuration( boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)

      • newDurationDayTime

        public Duration newDurationDayTime(String lexicalRepresentation)

        Create a Duration of type xdt:dayTimeDuration by parsing its String representation, "PnDTnHnMnS", XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.

        The datatype xdt:dayTimeDuration is a subtype of xs:duration whose lexical representation contains only day, hour, minute, and second components. This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.

        All four values are set and available from the created Duration

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        Parameters:
        lexicalRepresentation - Lexical representation of a duration.
        Returns:
        New Duration created using the specified lexicalRepresentation.
        Throws:
        IllegalArgumentException - If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of days and time.
        UnsupportedOperationException - If implementation cannot support requested values.
        NullPointerException - If lexicalRepresentation is null.

      • newDurationDayTime

        public Duration newDurationDayTime(long durationInMilliseconds)

        Create a Duration of type xdt:dayTimeDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.

        The datatype xdt:dayTimeDuration is a subtype of xs:duration whose lexical representation contains only day, hour, minute, and second components. This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.

        All four values are set by computing their values from the specified milliseconds and are available using the get methods of the created Duration. The values conform to and are defined by:

        • ISO 8601:2000(E) Section 5.5.3.2 Alternative format
        • W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats
        • XMLGregorianCalendar Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation

        The default start instance is defined by GregorianCalendar's use of the start of the epoch: i.e., Calendar.YEAR = 1970, Calendar.MONTH = Calendar.JANUARY, Calendar.DATE = 1, etc. This is important as there are variations in the Gregorian Calendar, e.g. leap years have different days in the month = Calendar.FEBRUARY so the result of Duration.getDays() can be influenced.

        Any remaining milliseconds after determining the day, hour, minute and second are discarded.

        Parameters:
        durationInMilliseconds - Milliseconds of Duration to create.
        Returns:
        New Duration created with the specified durationInMilliseconds.
        See Also:
        XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration

      • newDurationDayTime

        public Duration newDurationDayTime(boolean isPositive,
                                   BigInteger day,
                                   BigInteger hour,
                                   BigInteger minute,
                                   BigInteger second)

        Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.

        The datatype xdt:dayTimeDuration is a subtype of xs:duration whose lexical representation contains only day, hour, minute, and second components. This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        A null value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        day - Day of Duration.
        hour - Hour of Duration.
        minute - Minute of Duration.
        second - Second of Duration.
        Returns:
        New Duration created with the specified day, hour, minute and second.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if all the fields (day, hour, ...) are null or if any of the fields is negative.
        UnsupportedOperationException - If implementation cannot support requested values.

      • newDurationDayTime

        public Duration newDurationDayTime(boolean isPositive,
                                   int day,
                                   int hour,
                                   int minute,
                                   int second)

        Create a Duration of type xdt:dayTimeDuration using the specified day, hour, minute and second as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.

        The datatype xdt:dayTimeDuration is a subtype of xs:duration whose lexical representation contains only day, hour, minute, and second components. This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        day - Day of Duration.
        hour - Hour of Duration.
        minute - Minute of Duration.
        second - Second of Duration.
        Returns:
        New Duration created with the specified day, hour, minute and second.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if any of the fields (day, hour, ...) is negative.

      • newDurationYearMonth

        public Duration newDurationYearMonth(String lexicalRepresentation)

        Create a Duration of type xdt:yearMonthDuration by parsing its String representation, "PnYnM", XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.

        The datatype xdt:yearMonthDuration is a subtype of xs:duration whose lexical representation contains only year and month components. This datatype resides in the namespace XMLConstants.W3C_XPATH_DATATYPE_NS_URI.

        Both values are set and available from the created Duration

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        Parameters:
        lexicalRepresentation - Lexical representation of a duration.
        Returns:
        New Duration created using the specified lexicalRepresentation.
        Throws:
        IllegalArgumentException - If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of years and months.
        UnsupportedOperationException - If implementation cannot support requested values.
        NullPointerException - If lexicalRepresentation is null.

      • newDurationYearMonth

        public Duration newDurationYearMonth(long durationInMilliseconds)

        Create a Duration of type xdt:yearMonthDuration using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.

        The datatype xdt:yearMonthDuration is a subtype of xs:duration whose lexical representation contains only year and month components. This datatype resides in the namespace XMLConstants.W3C_XPATH_DATATYPE_NS_URI.

        Both values are set by computing their values from the specified milliseconds and are available using the get methods of the created Duration. The values conform to and are defined by:

        • ISO 8601:2000(E) Section 5.5.3.2 Alternative format
        • W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats
        • XMLGregorianCalendar Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation

        The default start instance is defined by GregorianCalendar's use of the start of the epoch: i.e., Calendar.YEAR = 1970, Calendar.MONTH = Calendar.JANUARY, Calendar.DATE = 1, etc. This is important as there are variations in the Gregorian Calendar, e.g. leap years have different days in the month = Calendar.FEBRUARY so the result of Duration.getMonths() can be influenced.

        Any remaining milliseconds after determining the year and month are discarded.

        Parameters:
        durationInMilliseconds - Milliseconds of Duration to create.
        Returns:
        New Duration created using the specified durationInMilliseconds.

      • newDurationYearMonth

        public Duration newDurationYearMonth(boolean isPositive,
                                     BigInteger year,
                                     BigInteger month)

        Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.

        The XML Schema specification states that values can be of an arbitrary size. Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. An UnsupportedOperationException will be thrown with a message indicating implementation limits if implementation capacities are exceeded.

        A null value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        year - Year of Duration.
        month - Month of Duration.
        Returns:
        New Duration created using the specified year and month.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if all of the fields (year, month) are null or if any of the fields is negative.
        UnsupportedOperationException - If implementation cannot support requested values.

      • newDurationYearMonth

        public Duration newDurationYearMonth(boolean isPositive,
                                     int year,
                                     int month)

        Create a Duration of type xdt:yearMonthDuration using the specified year and month as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        isPositive - Set to false to create a negative duration. When the length of the duration is zero, this parameter will be ignored.
        year - Year of Duration.
        month - Month of Duration.
        Returns:
        New Duration created using the specified year and month.
        Throws:
        IllegalArgumentException - If the values are not a valid representation of a Duration: if any of the fields (year, month) is negative.

      • newXMLGregorianCalendar

        public abstract XMLGregorianCalendar newXMLGregorianCalendar()

        Create a new instance of an XMLGregorianCalendar.

        All date/time datatype fields set to DatatypeConstants.FIELD_UNDEFINED or null.

        Returns:
        New XMLGregorianCalendar with all date/time datatype fields set to DatatypeConstants.FIELD_UNDEFINED or null.

      • newXMLGregorianCalendar

        public abstract XMLGregorianCalendar newXMLGregorianCalendar(String lexicalRepresentation)

        Create a new XMLGregorianCalendar by parsing the String as a lexical representation.

        Parsing the lexical string representation is defined in XML Schema 1.0 Part 2, Section 3.2.[7-14].1, Lexical Representation.

        The string representation may not have any leading and trailing whitespaces.

        The parsing is done field by field so that the following holds for any lexically correct String x:

         newXMLGregorianCalendar(x).toXMLFormat().equals(x)

        Except for the noted lexical/canonical representation mismatches listed in XML Schema 1.0 errata, Section 3.2.7.2.

        Parameters:
        lexicalRepresentation - Lexical representation of one the eight XML Schema date/time datatypes.
        Returns:
        XMLGregorianCalendar created from the lexicalRepresentation.
        Throws:
        IllegalArgumentException - If the lexicalRepresentation is not a valid XMLGregorianCalendar.
        NullPointerException - If lexicalRepresentation is null.

      • newXMLGregorianCalendar

        public abstract XMLGregorianCalendar newXMLGregorianCalendar(GregorianCalendar cal)

        Create an XMLGregorianCalendar from a GregorianCalendar.

        Field by Field Conversion from GregorianCalendar to an XMLGregorianCalendar
        java.util.GregorianCalendar field | javax.xml.datatype.XMLGregorianCalendar field
        ERA == GregorianCalendar.BC ? -YEAR : YEAR | XMLGregorianCalendar.setYear(int year)
        MONTH + 1 | XMLGregorianCalendar.setMonth(int month)
        DAY_OF_MONTH | XMLGregorianCalendar.setDay(int day)
        HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND | XMLGregorianCalendar.setTime(int hour, int minute, int second, BigDecimal fractional)
        (ZONE_OFFSET + DST_OFFSET) / (60*1000)
        (in minutes)         		XMLGregorianCalendar.setTimezone(int offset) *

        *conversion loss of information. It is not possible to represent a java.util.GregorianCalendar daylight savings timezone id in the XML Schema 1.0 date/time datatype representation.

        To compute the return value's TimeZone field,

        • when this.getTimezone() != FIELD_UNDEFINED, create a java.util.TimeZone with a custom timezone id using the this.getTimezone().
        • else use the GregorianCalendar default timezone value for the host is defined as specified by java.util.TimeZone.getDefault().

        Parameters:
        cal - java.util.GregorianCalendar used to create XMLGregorianCalendar
        Returns:
        XMLGregorianCalendar created from java.util.GregorianCalendar
        Throws:
        NullPointerException - If cal is null.

      • newXMLGregorianCalendar

        public abstract XMLGregorianCalendar newXMLGregorianCalendar(BigInteger year,
                                                             int month,
                                                             int day,
                                                             int hour,
                                                             int minute,
                                                             int second,
                                                             BigDecimal fractionalSecond,
                                                             int timezone)

        Constructor allowing for complete value spaces allowed by W3C XML Schema 1.0 recommendation for xsd:dateTime and related builtin datatypes. Note that year parameter supports arbitrarily large numbers and fractionalSecond has infinite precision.

        A null value indicates that field is not set.

        Parameters:
        year - of XMLGregorianCalendar to be created.
        month - of XMLGregorianCalendar to be created.
        day - of XMLGregorianCalendar to be created.
        hour - of XMLGregorianCalendar to be created.
        minute - of XMLGregorianCalendar to be created.
        second - of XMLGregorianCalendar to be created.
        fractionalSecond - of XMLGregorianCalendar to be created.
        timezone - of XMLGregorianCalendar to be created.
        Returns:
        XMLGregorianCalendar created from specified values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().

      • newXMLGregorianCalendar

        public XMLGregorianCalendar newXMLGregorianCalendar(int year,
                                                    int month,
                                                    int day,
                                                    int hour,
                                                    int minute,
                                                    int second,
                                                    int millisecond,
                                                    int timezone)

        Constructor of value spaces that a java.util.GregorianCalendar instance would need to convert to an XMLGregorianCalendar instance.

        XMLGregorianCalendar eon and fractionalSecond are set to null

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        year - of XMLGregorianCalendar to be created.
        month - of XMLGregorianCalendar to be created.
        day - of XMLGregorianCalendar to be created.
        hour - of XMLGregorianCalendar to be created.
        minute - of XMLGregorianCalendar to be created.
        second - of XMLGregorianCalendar to be created.
        millisecond - of XMLGregorianCalendar to be created.
        timezone - of XMLGregorianCalendar to be created.
        Returns:
        XMLGregorianCalendar created from specified values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().

      • newXMLGregorianCalendarDate

        public XMLGregorianCalendar newXMLGregorianCalendarDate(int year,
                                                        int month,
                                                        int day,
                                                        int timezone)

        Create a Java representation of XML Schema builtin datatype date or g*.

        For example, an instance of gYear can be created invoking this factory with month and day parameters set to DatatypeConstants.FIELD_UNDEFINED.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        year - of XMLGregorianCalendar to be created.
        month - of XMLGregorianCalendar to be created.
        day - of XMLGregorianCalendar to be created.
        timezone - offset in minutes. DatatypeConstants.FIELD_UNDEFINED indicates optional field is not set.
        Returns:
        XMLGregorianCalendar created from parameter values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().
        See Also:
        DatatypeConstants.FIELD_UNDEFINED

      • newXMLGregorianCalendarTime

        public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours,
                                                        int minutes,
                                                        int seconds,
                                                        int timezone)

        Create a Java instance of XML Schema builtin datatype time.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        hours - number of hours
        minutes - number of minutes
        seconds - number of seconds
        timezone - offset in minutes. DatatypeConstants.FIELD_UNDEFINED indicates optional field is not set.
        Returns:
        XMLGregorianCalendar created from parameter values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().
        See Also:
        DatatypeConstants.FIELD_UNDEFINED

      • newXMLGregorianCalendarTime

        public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours,
                                                        int minutes,
                                                        int seconds,
                                                        BigDecimal fractionalSecond,
                                                        int timezone)

        Create a Java instance of XML Schema builtin datatype time.

        A null value indicates that field is not set.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        hours - number of hours
        minutes - number of minutes
        seconds - number of seconds
        fractionalSecond - value of null indicates that this optional field is not set.
        timezone - offset in minutes. DatatypeConstants.FIELD_UNDEFINED indicates optional field is not set.
        Returns:
        XMLGregorianCalendar created from parameter values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().
        See Also:
        DatatypeConstants.FIELD_UNDEFINED

      • newXMLGregorianCalendarTime

        public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours,
                                                        int minutes,
                                                        int seconds,
                                                        int milliseconds,
                                                        int timezone)

        Create a Java instance of XML Schema builtin datatype time.

        A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

        Parameters:
        hours - number of hours
        minutes - number of minutes
        seconds - number of seconds
        milliseconds - number of milliseconds
        timezone - offset in minutes. DatatypeConstants.FIELD_UNDEFINED indicates optional field is not set.
        Returns:
        XMLGregorianCalendar created from parameter values.
        Throws:
        IllegalArgumentException - If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().
        See Also:
        DatatypeConstants.FIELD_UNDEFINED
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Duration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class Duration

  • java.lang.Object
    • javax.xml.datatype.Duration

  • public abstract class Duration
extends Object

    Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification.

    A Duration object represents a period of Gregorian time, which consists of six fields (years, months, days, hours, minutes, and seconds) plus a sign (+/-) field.

    The first five fields have non-negative (>=0) integers or null (which represents that the field is not set), and the seconds field has a non-negative decimal or null. A negative sign indicates a negative duration.

    This class provides a number of methods that make it easy to use for the duration datatype of XML Schema 1.0 with the errata.

    Order relationship

    Duration objects only have partial order, where two values A and B maybe either:

    1. A<B (A is shorter than B)
    2. A>B (A is longer than B)
    3. A==B (A and B are of the same duration)
    4. A<>B (Comparison between A and B is indeterminate)

    For example, 30 days cannot be meaningfully compared to one month. The compare(Duration duration) method implements this relationship.

    See the isLongerThan(Duration) method for details about the order relationship among Duration objects.

    Operations over Duration

    This class provides a set of basic arithmetic operations, such as addition, subtraction and multiplication. Because durations don't have total order, an operation could fail for some combinations of operations. For example, you cannot subtract 15 days from 1 month. See the javadoc of those methods for detailed conditions where this could happen.

    Also, division of a duration by a number is not provided because the Duration class can only deal with finite precision decimal numbers. For example, one cannot represent 1 sec divided by 3.

    However, you could substitute a division by 3 with multiplying by numbers such as 0.3 or 0.333.

    Range of allowed values

    Because some operations of Duration rely on Calendar even though Duration can hold very large or very small values, some of the methods may not work correctly on such Durations. The impacted methods document their dependency on Calendar.

    Since:
    1.5
    See Also:
    XMLGregorianCalendar.add(Duration)

    • Constructor Summary

      Constructors
      Constructor and Description
      Duration()
      Default no-arg constructor.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Duration add(Duration rhs)
      Computes a new duration whose value is this+rhs.
      abstract void addTo(Calendar calendar)
      Adds this duration to a Calendar object.
      void addTo(Date date)
      Adds this duration to a Date object.
      abstract int compare(Duration duration)
      Partial order relation comparison with this Duration instance.
      boolean equals(Object duration)
      Checks if this duration object has the same duration as another Duration object.
      int getDays()
      Obtains the value of the DAYS field as an integer value, or 0 if not present.
      abstract Number getField(DatatypeConstants.Field field)
      Gets the value of a field.
      int getHours()
      Obtains the value of the HOURS field as an integer value, or 0 if not present.
      int getMinutes()
      Obtains the value of the MINUTES field as an integer value, or 0 if not present.
      int getMonths()
      Obtains the value of the MONTHS field as an integer value, or 0 if not present.
      int getSeconds()
      Obtains the value of the SECONDS field as an integer value, or 0 if not present.
      abstract int getSign()
      Returns the sign of this duration in -1,0, or 1.
      long getTimeInMillis(Calendar startInstant)
      Returns the length of the duration in milli-seconds.
      long getTimeInMillis(Date startInstant)
      Returns the length of the duration in milli-seconds.
      QName getXMLSchemaType()
      Return the name of the XML Schema date/time type that this instance maps to.
      int getYears()
      Get the years value of this Duration as an int or 0 if not present.
      abstract int hashCode()
      Returns a hash code consistent with the definition of the equals method.
      boolean isLongerThan(Duration duration)
      Checks if this duration object is strictly longer than another Duration object.
      abstract boolean isSet(DatatypeConstants.Field field)
      Checks if a field is set.
      boolean isShorterThan(Duration duration)
      Checks if this duration object is strictly shorter than another Duration object.
      abstract Duration multiply(BigDecimal factor)
      Computes a new duration whose value is factor times longer than the value of this duration.
      Duration multiply(int factor)
      Computes a new duration whose value is factor times longer than the value of this duration.
      abstract Duration negate()
      Returns a new Duration object whose value is -this.
      abstract Duration normalizeWith(Calendar startTimeInstant)
      Converts the years and months fields into the days field by using a specific time instant as the reference point.
      Duration subtract(Duration rhs)
      Computes a new duration whose value is this-rhs.
      String toString()
      Returns a String representation of this Duration Object.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • Duration

        public Duration()
        Default no-arg constructor.

        Note: Always use the DatatypeFactory to construct an instance of Duration. The constructor on this class cannot be guaranteed to produce an object with a consistent state and may be removed in the future.

    • Method Detail

      • getXMLSchemaType

        public QName getXMLSchemaType()

        Return the name of the XML Schema date/time type that this instance maps to. Type is computed based on fields that are set, i.e. isSet(DatatypeConstants.Field field) == true.

        Required fields for XML Schema 1.0 Date/Time Datatypes.
        (timezone is optional for all date/time datatypes)
        Datatype | year | month | day | hour | minute | second
        DatatypeConstants.DURATION | X | X | X | X | X | X
        DatatypeConstants.DURATION_DAYTIME | X | X | X | X
        DatatypeConstants.DURATION_YEARMONTH | X | X
        Returns:
        one of the following constants: DatatypeConstants.DURATION, DatatypeConstants.DURATION_DAYTIME or DatatypeConstants.DURATION_YEARMONTH.
        Throws:
        IllegalStateException - If the combination of set fields does not match one of the XML Schema date/time datatypes.

      • getSign

        public abstract int getSign()
        Returns the sign of this duration in -1,0, or 1.
        Returns:
        -1 if this duration is negative, 0 if the duration is zero, and 1 if the duration is positive.

      • getYears

        public int getYears()

        Get the years value of this Duration as an int or 0 if not present.

        getYears() is a convenience method for getField(DatatypeConstants.YEARS).

        As the return value is an int, an incorrect value will be returned for Durations with years that go beyond the range of an int. Use getField(DatatypeConstants.YEARS) to avoid possible loss of precision.

        Returns:
        If the years field is present, return its value as an int, else return 0.

      • getMonths

        public int getMonths()
        Obtains the value of the MONTHS field as an integer value, or 0 if not present. This method works just like getYears() except that this method works on the MONTHS field.
        Returns:
        Months of this Duration.

      • getDays

        public int getDays()
        Obtains the value of the DAYS field as an integer value, or 0 if not present. This method works just like getYears() except that this method works on the DAYS field.
        Returns:
        Days of this Duration.

      • getHours

        public int getHours()
        Obtains the value of the HOURS field as an integer value, or 0 if not present. This method works just like getYears() except that this method works on the HOURS field.
        Returns:
        Hours of this Duration.

      • getMinutes

        public int getMinutes()
        Obtains the value of the MINUTES field as an integer value, or 0 if not present. This method works just like getYears() except that this method works on the MINUTES field.
        Returns:
        Minutes of this Duration.

      • getSeconds

        public int getSeconds()
        Obtains the value of the SECONDS field as an integer value, or 0 if not present. This method works just like getYears() except that this method works on the SECONDS field.
        Returns:
        seconds in the integer value. The fraction of seconds will be discarded (for example, if the actual value is 2.5, this method returns 2)

      • getTimeInMillis

        public long getTimeInMillis(Calendar startInstant)

        Returns the length of the duration in milli-seconds.

        If the seconds field carries more digits than milli-second order, those will be simply discarded (or in other words, rounded to zero.) For example, for any Calendar value x,

         new Duration("PT10.00099S").getTimeInMills(x) == 10000.
 new Duration("-PT10.00099S").getTimeInMills(x) == -10000.

        Note that this method uses the addTo(Calendar) method, which may work incorrectly with Duration objects with very large values in its fields. See the addTo(Calendar) method for details.

        Parameters:
        startInstant - The length of a month/year varies. The startInstant is used to disambiguate this variance. Specifically, this method returns the difference between startInstant and startInstant+duration
        Returns:
        milliseconds between startInstant and startInstant plus this Duration
        Throws:
        NullPointerException - if startInstant parameter is null.

      • getTimeInMillis

        public long getTimeInMillis(Date startInstant)

        Returns the length of the duration in milli-seconds.

        If the seconds field carries more digits than milli-second order, those will be simply discarded (or in other words, rounded to zero.) For example, for any Date value x,

         new Duration("PT10.00099S").getTimeInMills(x) == 10000.
 new Duration("-PT10.00099S").getTimeInMills(x) == -10000.

        Note that this method uses the addTo(Date) method, which may work incorrectly with Duration objects with very large values in its fields. See the addTo(Date) method for details.

        Parameters:
        startInstant - The length of a month/year varies. The startInstant is used to disambiguate this variance. Specifically, this method returns the difference between startInstant and startInstant+duration.
        Returns:
        milliseconds between startInstant and startInstant plus this Duration
        Throws:
        NullPointerException - If the startInstant parameter is null.
        See Also:
        getTimeInMillis(Calendar)

      • getField

        public abstract Number getField(DatatypeConstants.Field field)
        Gets the value of a field. Fields of a duration object may contain arbitrary large value. Therefore this method is designed to return a Number object. In case of YEARS, MONTHS, DAYS, HOURS, and MINUTES, the returned number will be a non-negative integer. In case of seconds, the returned number may be a non-negative decimal value.
        Parameters:
        field - one of the six Field constants (YEARS,MONTHS,DAYS,HOURS, MINUTES, or SECONDS.)
        Returns:
        If the specified field is present, this method returns a non-null non-negative Number object that represents its value. If it is not present, return null. For YEARS, MONTHS, DAYS, HOURS, and MINUTES, this method returns a BigInteger object. For SECONDS, this method returns a BigDecimal.
        Throws:
        NullPointerException - If the field is null.

      • isSet

        public abstract boolean isSet(DatatypeConstants.Field field)
        Checks if a field is set. A field of a duration object may or may not be present. This method can be used to test if a field is present.
        Parameters:
        field - one of the six Field constants (YEARS,MONTHS,DAYS,HOURS, MINUTES, or SECONDS.)
        Returns:
        true if the field is present. false if not.
        Throws:
        NullPointerException - If the field parameter is null.

      • add

        public abstract Duration add(Duration rhs)

        Computes a new duration whose value is this+rhs.

        For example,

         "1 day" + "-3 days" = "-2 days"
 "1 year" + "1 day" = "1 year and 1 day"
 "-(1 hour,50 minutes)" + "-20 minutes" = "-(1 hours,70 minutes)"
 "15 hours" + "-3 days" = "-(2 days,9 hours)"
 "1 year" + "-1 day" = IllegalStateException

        Since there's no way to meaningfully subtract 1 day from 1 month, there are cases where the operation fails in IllegalStateException.

        Formally, the computation is defined as follows.

        Firstly, we can assume that two Durations to be added are both positive without losing generality (i.e., (-X)+Y=Y-X, X+(-Y)=X-Y, (-X)+(-Y)=-(X+Y))

        Addition of two positive Durations are simply defined as field by field addition where missing fields are treated as 0.

        A field of the resulting Duration will be unset if and only if respective fields of two input Durations are unset.

        Note that lhs.add(rhs) will be always successful if lhs.signum()*rhs.signum()!=-1 or both of them are normalized.

        Parameters:
        rhs - Duration to add to this Duration
        Returns:
        non-null valid Duration object.
        Throws:
        NullPointerException - If the rhs parameter is null.
        IllegalStateException - If two durations cannot be meaningfully added. For example, adding negative one day to one month causes this exception.
        See Also:
        subtract(Duration)

      • addTo

        public abstract void addTo(Calendar calendar)
        Adds this duration to a Calendar object.

        Calls Calendar.add(int,int) in the order of YEARS, MONTHS, DAYS, HOURS, MINUTES, SECONDS, and MILLISECONDS if those fields are present. Because the Calendar class uses int to hold values, there are cases where this method won't work correctly (for example if values of fields exceed the range of int.)

        Also, since this duration class is a Gregorian duration, this method will not work correctly if the given Calendar object is based on some other calendar systems.

        Any fractional parts of this Duration object beyond milliseconds will be simply ignored. For example, if this duration is "P1.23456S", then 1 is added to SECONDS, 234 is added to MILLISECONDS, and the rest will be unused.

        Note that because Calendar.add(int, int) is using int, Duration with values beyond the range of int in its fields will cause overflow/underflow to the given Calendar. XMLGregorianCalendar.add(Duration) provides the same basic operation as this method while avoiding the overflow/underflow issues.

        Parameters:
        calendar - A calendar object whose value will be modified.
        Throws:
        NullPointerException - if the calendar parameter is null.

      • addTo

        public void addTo(Date date)
        Adds this duration to a Date object.

        The given date is first converted into a GregorianCalendar, then the duration is added exactly like the addTo(Calendar) method.

        The updated time instant is then converted back into a Date object and used to update the given Date object.

        This somewhat redundant computation is necessary to unambiguously determine the duration of months and years.

        Parameters:
        date - A date object whose value will be modified.
        Throws:
        NullPointerException - if the date parameter is null.

      • subtract

        public Duration subtract(Duration rhs)

        Computes a new duration whose value is this-rhs.

        For example:

         "1 day" - "-3 days" = "4 days"
 "1 year" - "1 day" = IllegalStateException
 "-(1 hour,50 minutes)" - "-20 minutes" = "-(1hours,30 minutes)"
 "15 hours" - "-3 days" = "3 days and 15 hours"
 "1 year" - "-1 day" = "1 year and 1 day"

        Since there's no way to meaningfully subtract 1 day from 1 month, there are cases where the operation fails in IllegalStateException.

        Formally the computation is defined as follows. First, we can assume that two Durations are both positive without losing generality. (i.e., (-X)-Y=-(X+Y), X-(-Y)=X+Y, (-X)-(-Y)=-(X-Y))

        Then two durations are subtracted field by field. If the sign of any non-zero field F is different from the sign of the most significant field, 1 (if F is negative) or -1 (otherwise) will be borrowed from the next bigger unit of F.

        This process is repeated until all the non-zero fields have the same sign.

        If a borrow occurs in the days field (in other words, if the computation needs to borrow 1 or -1 month to compensate days), then the computation fails by throwing an IllegalStateException.

        Parameters:
        rhs - Duration to subtract from this Duration.
        Returns:
        New Duration created from subtracting rhs from this Duration.
        Throws:
        IllegalStateException - If two durations cannot be meaningfully subtracted. For example, subtracting one day from one month causes this exception.
        NullPointerException - If the rhs parameter is null.
        See Also:
        add(Duration)

      • multiply

        public Duration multiply(int factor)

        Computes a new duration whose value is factor times longer than the value of this duration.

        This method is provided for the convenience. It is functionally equivalent to the following code:

         multiply(new BigDecimal(String.valueOf(factor)))
        Parameters:
        factor - Factor times longer of new Duration to create.
        Returns:
        New Duration that is factortimes longer than this Duration.
        See Also:
        multiply(BigDecimal)

      • multiply

        public abstract Duration multiply(BigDecimal factor)
        Computes a new duration whose value is factor times longer than the value of this duration.

        For example,

         "P1M" (1 month) * "12" = "P12M" (12 months)
 "PT1M" (1 min) * "0.3" = "PT18S" (18 seconds)
 "P1M" (1 month) * "1.5" = IllegalStateException

        Since the Duration class is immutable, this method doesn't change the value of this object. It simply computes a new Duration object and returns it.

        The operation will be performed field by field with the precision of BigDecimal. Since all the fields except seconds are restricted to hold integers, any fraction produced by the computation will be carried down toward the next lower unit. For example, if you multiply "P1D" (1 day) with "0.5", then it will be 0.5 day, which will be carried down to "PT12H" (12 hours). When fractions of month cannot be meaningfully carried down to days, or year to months, this will cause an IllegalStateException to be thrown. For example if you multiple one month by 0.5.

        To avoid IllegalStateException, use the normalizeWith(Calendar) method to remove the years and months fields.

        Parameters:
        factor - to multiply by
        Returns:
        returns a non-null valid Duration object
        Throws:
        IllegalStateException - if operation produces fraction in the months field.
        NullPointerException - if the factor parameter is null.

      • negate

        public abstract Duration negate()
        Returns a new Duration object whose value is -this.

        Since the Duration class is immutable, this method doesn't change the value of this object. It simply computes a new Duration object and returns it.

        Returns:
        always return a non-null valid Duration object.

      • normalizeWith

        public abstract Duration normalizeWith(Calendar startTimeInstant)

        Converts the years and months fields into the days field by using a specific time instant as the reference point.

        For example, duration of one month normalizes to 31 days given the start time instance "July 8th 2003, 17:40:32".

        Formally, the computation is done as follows:

        1. the given Calendar object is cloned
        2. the years, months and days fields will be added to the Calendar object by using the Calendar.add(int,int) method
        3. the difference between the two Calendars in computed in milliseconds and converted to days, if a remainder occurs due to Daylight Savings Time, it is discarded
        4. the computed days, along with the hours, minutes and seconds fields of this duration object is used to construct a new Duration object.

        Note that since the Calendar class uses int to hold the value of year and month, this method may produce an unexpected result if this duration object holds a very large value in the years or months fields.

        Parameters:
        startTimeInstant - Calendar reference point.
        Returns:
        Duration of years and months of this Duration as days.
        Throws:
        NullPointerException - If the startTimeInstant parameter is null.

      • compare

        public abstract int compare(Duration duration)

        Partial order relation comparison with this Duration instance.

        Comparison result must be in accordance with W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2, Order relation on duration.

        Return:

        • DatatypeConstants.LESSER if this Duration is shorter than duration parameter
        • DatatypeConstants.EQUAL if this Duration is equal to duration parameter
        • DatatypeConstants.GREATER if this Duration is longer than duration parameter
        • DatatypeConstants.INDETERMINATE if a conclusive partial order relation cannot be determined
        Parameters:
        duration - to compare
        Returns:
        the relationship between this Durationand duration parameter as DatatypeConstants.LESSER, DatatypeConstants.EQUAL, DatatypeConstants.GREATER or DatatypeConstants.INDETERMINATE.
        Throws:
        UnsupportedOperationException - If the underlying implementation cannot reasonably process the request, e.g. W3C XML Schema allows for arbitrarily large/small/precise values, the request may be beyond the implementations capability.
        NullPointerException - if duration is null.
        See Also:
        isShorterThan(Duration), isLongerThan(Duration)

      • isLongerThan

        public boolean isLongerThan(Duration duration)

        Checks if this duration object is strictly longer than another Duration object.

        Duration X is "longer" than Y if and only if X>Y as defined in the section 3.2.6.2 of the XML Schema 1.0 specification.

        For example, "P1D" (one day) > "PT12H" (12 hours) and "P2Y" (two years) > "P23M" (23 months).

        Parameters:
        duration - Duration to test this Duration against.
        Returns:
        true if the duration represented by this object is longer than the given duration. false otherwise.
        Throws:
        UnsupportedOperationException - If the underlying implementation cannot reasonably process the request, e.g. W3C XML Schema allows for arbitrarily large/small/precise values, the request may be beyond the implementations capability.
        NullPointerException - If duration is null.
        See Also:
        isShorterThan(Duration), compare(Duration duration)

      • isShorterThan

        public boolean isShorterThan(Duration duration)

        Checks if this duration object is strictly shorter than another Duration object.

        Parameters:
        duration - Duration to test this Duration against.
        Returns:
        true if duration parameter is shorter than this Duration, else false.
        Throws:
        UnsupportedOperationException - If the underlying implementation cannot reasonably process the request, e.g. W3C XML Schema allows for arbitrarily large/small/precise values, the request may be beyond the implementations capability.
        NullPointerException - if duration is null.
        See Also:
        isLongerThan(Duration duration), compare(Duration duration)

      • equals

        public boolean equals(Object duration)

        Checks if this duration object has the same duration as another Duration object.

        For example, "P1D" (1 day) is equal to "PT24H" (24 hours).

        Duration X is equal to Y if and only if time instant t+X and t+Y are the same for all the test time instants specified in the section 3.2.6.2 of the XML Schema 1.0 specification.

        Note that there are cases where two Durations are "incomparable" to each other, like one month and 30 days. For example,

         !new Duration("P1M").isShorterThan(new Duration("P30D"))
 !new Duration("P1M").isLongerThan(new Duration("P30D"))
 !new Duration("P1M").equals(new Duration("P30D"))
        Overrides:
        equals in class Object
        Parameters:
        duration - The object to compare this Duration against.
        Returns:
        true if this duration is the same length as duration. false if duration is null, is not a Duration object, or its length is different from this duration.
        Throws:
        UnsupportedOperationException - If the underlying implementation cannot reasonably process the request, e.g. W3C XML Schema allows for arbitrarily large/small/precise values, the request may be beyond the implementations capability.
        See Also:
        compare(Duration duration)

      • hashCode

        public abstract int hashCode()
        Returns a hash code consistent with the definition of the equals method.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code value for this object.
        See Also:
        Object.hashCode()

      • toString

        public String toString()

        Returns a String representation of this Duration Object.

        The result is formatted according to the XML Schema 1.0 spec and can be always parsed back later into the equivalent Duration Object by DatatypeFactory.newDuration(String lexicalRepresentation).

        Formally, the following holds for any Duration Object x:

         new Duration(x.toString()).equals(x)
        Overrides:
        toString in class Object
        Returns:
        A non-null valid String representation of this Duration.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLGregorianCalendar

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.datatype

Class XMLGregorianCalendar

  • java.lang.Object
    • javax.xml.datatype.XMLGregorianCalendar
  • All Implemented Interfaces:
    Cloneable

    public abstract class XMLGregorianCalendar
extends Object
implements Cloneable

    Representation for W3C XML Schema 1.0 date/time datatypes. Specifically, these date/time datatypes are DatatypeConstants.DATETIME, DatatypeConstants.TIME, DatatypeConstants.DATE, DatatypeConstants.GYEARMONTH, DatatypeConstants.GMONTHDAY, DatatypeConstants.GYEAR, DatatypeConstants.GMONTH, and DatatypeConstants.GDAY defined in the XML Namespace "http://www.w3.org/2001/XMLSchema". These datatypes are normatively defined in W3C XML Schema 1.0 Part 2, Section 3.2.7-14.

    The table below defines the mapping between XML Schema 1.0 date/time datatype fields and this class' fields. It also summarizes the value constraints for the date and time fields defined in W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats.

    Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
    XML Schema 1.0
    datatype
    field     		Related
    XMLGregorianCalendar
    Accessor(s)     		Value Range
    year getYear() + getEon() or
    getEonAndYear()     		getYear() is a value between -(10^9-1) to (10^9)-1 or DatatypeConstants.FIELD_UNDEFINED.
    getEon() is high order year value in billion of years.
    getEon() has values greater than or equal to (10^9) or less than or equal to -(10^9). A value of null indicates field is undefined.
    Given that XML Schema 1.0 errata states that the year zero will be a valid lexical value in a future version of XML Schema, this class allows the year field to be set to zero. Otherwise, the year field value is handled exactly as described in the errata and [ISO-8601-1988]. Note that W3C XML Schema 1.0 validation does not allow for the year field to have a value of zero.
    month | getMonth() | 1 to 12 or DatatypeConstants.FIELD_UNDEFINED
    day getDay() Independent of month, max range is 1 to 31 or DatatypeConstants.FIELD_UNDEFINED.
    The normative value constraint stated relative to month field's value is in W3C XML Schema 1.0 Part 2, Appendix D.
    hour | getHour() | 0 to 23 or DatatypeConstants.FIELD_UNDEFINED. An hour value of 24 is allowed to be set in the lexical space provided the minute and second field values are zero. However, an hour value of 24 is not allowed in value space and will be transformed to represent the value of the first instance of the following day as per XML Schema Part 2: Datatypes Second Edition, 3.2 Primitive datatypes.
    minute | getMinute() | 0 to 59 or DatatypeConstants.FIELD_UNDEFINED
    second getSecond() + getMillisecond()/1000 or
    getSecond() + getFractionalSecond()     		getSecond() from 0 to 60 or DatatypeConstants.FIELD_UNDEFINED.
    (Note: 60 only allowable for leap second.)
    getFractionalSecond() allows for infinite precision over the range from 0.0 to 1.0 when the getSecond() is defined.
    FractionalSecond is optional and has a value of null when it is undefined.
    getMillisecond() is the convenience millisecond precision of value of getFractionalSecond().
    timezone | getTimezone() | Number of minutes or DatatypeConstants.FIELD_UNDEFINED. Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes).

    All maximum value space constraints listed for the fields in the table above are checked by factory methods, @{link DatatypeFactory}, setter methods and parse methods of this class. IllegalArgumentException is thrown when a parameter's value is outside the value constraint for the field or if the composite values constitute an invalid XMLGregorianCalendar instance (for example, if the 31st of June is specified).

    The following operations are defined for this class:

    • accessors/mutators for independent date/time fields
    • conversion between this class and W3C XML Schema 1.0 lexical representation, toString(), DatatypeFactory.newXMLGregorianCalendar(String lexicalRepresentation)
    • conversion between this class and GregorianCalendar, toGregorianCalendar(java.util.TimeZone timezone, java.util.Locale aLocale, XMLGregorianCalendar defaults), DatatypeFactory
    • partial order relation comparator method, compare(XMLGregorianCalendar xmlGregorianCalendar)
    • equals(Object) defined relative to compare(XMLGregorianCalendar xmlGregorianCalendar).
    • addition operation with Duration instance as defined in W3C XML Schema 1.0 Part 2, Appendix E, Adding durations to dateTimes.

    Since:
    1.5
    See Also:
    Duration, DatatypeFactory

    • Constructor Summary

      Constructors
      Constructor and Description
      XMLGregorianCalendar()
      Default no-arg constructor.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void add(Duration duration)
      Add duration to this instance.
      abstract void clear()
      Unset all fields to undefined.
      abstract Object clone()
      Creates and returns a copy of this object.
      abstract int compare(XMLGregorianCalendar xmlGregorianCalendar)
      Compare two instances of W3C XML Schema 1.0 date/time datatypes according to partial order relation defined in W3C XML Schema 1.0 Part 2, Section 3.2.7.3, Order relation on dateTime.
      boolean equals(Object obj)
      Compares this calendar to the specified object.
      abstract int getDay()
      Return day in month or DatatypeConstants.FIELD_UNDEFINED.
      abstract BigInteger getEon()
      Return high order component for XML Schema 1.0 dateTime datatype field for year.
      abstract BigInteger getEonAndYear()
      Return XML Schema 1.0 dateTime datatype field for year.
      abstract BigDecimal getFractionalSecond()
      Return fractional seconds.
      abstract int getHour()
      Return hours or DatatypeConstants.FIELD_UNDEFINED.
      int getMillisecond()
      Return millisecond precision of getFractionalSecond().
      abstract int getMinute()
      Return minutes or DatatypeConstants.FIELD_UNDEFINED.
      abstract int getMonth()
      Return number of month or DatatypeConstants.FIELD_UNDEFINED.
      abstract int getSecond()
      Return seconds or DatatypeConstants.FIELD_UNDEFINED.
      abstract int getTimezone()
      Return timezone offset in minutes or DatatypeConstants.FIELD_UNDEFINED if this optional field is not defined.
      abstract TimeZone getTimeZone(int defaultZoneoffset)
      Returns a java.util.TimeZone for this class.
      abstract QName getXMLSchemaType()
      Return the name of the XML Schema date/time type that this instance maps to.
      abstract int getYear()
      Return low order component for XML Schema 1.0 dateTime datatype field for year or DatatypeConstants.FIELD_UNDEFINED.
      int hashCode()
      Returns a hash code consistent with the definition of the equals method.
      abstract boolean isValid()
      Validate instance by getXMLSchemaType() constraints.
      abstract XMLGregorianCalendar normalize()
      Normalize this instance to UTC.
      abstract void reset()
      Reset this XMLGregorianCalendar to its original values.
      abstract void setDay(int day)
      Set days in month.
      abstract void setFractionalSecond(BigDecimal fractional)
      Set fractional seconds.
      abstract void setHour(int hour)
      Set hours.
      abstract void setMillisecond(int millisecond)
      Set milliseconds.
      abstract void setMinute(int minute)
      Set minutes.
      abstract void setMonth(int month)
      Set month.
      abstract void setSecond(int second)
      Set seconds.
      void setTime(int hour, int minute, int second)
      Set time as one unit.
      void setTime(int hour, int minute, int second, BigDecimal fractional)
      Set time as one unit, including the optional infinite precision fractional seconds.
      void setTime(int hour, int minute, int second, int millisecond)
      Set time as one unit, including optional milliseconds.
      abstract void setTimezone(int offset)
      Set the number of minutes in the timezone offset.
      abstract void setYear(BigInteger year)
      Set low and high order component of XSD dateTime year field.
      abstract void setYear(int year)
      Set year of XSD dateTime year field.
      abstract GregorianCalendar toGregorianCalendar()
      Convert this XMLGregorianCalendar to a GregorianCalendar.
      abstract GregorianCalendar toGregorianCalendar(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)
      Convert this XMLGregorianCalendar along with provided parameters to a GregorianCalendar instance.
      String toString()
      Returns a String representation of this XMLGregorianCalendar Object.
      abstract String toXMLFormat()
      Return the lexical representation of this instance.

      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XMLGregorianCalendar

        public XMLGregorianCalendar()
        Default no-arg constructor.

        Note: Always use the DatatypeFactory to construct an instance of XMLGregorianCalendar. The constructor on this class cannot be guaranteed to produce an object with a consistent state and may be removed in the future.

    • Method Detail

      • clear

        public abstract void clear()

        Unset all fields to undefined.

        Set all int fields to DatatypeConstants.FIELD_UNDEFINED and reference fields to null.

      • reset

        public abstract void reset()

        Reset this XMLGregorianCalendar to its original values.

        XMLGregorianCalendar is reset to the same values as when it was created with DatatypeFactory.newXMLGregorianCalendar(), DatatypeFactory.newXMLGregorianCalendar(String lexicalRepresentation), DatatypeFactory.newXMLGregorianCalendar( BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone), DatatypeFactory.newXMLGregorianCalendar( int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone), DatatypeFactory.newXMLGregorianCalendar(GregorianCalendar cal), DatatypeFactory.newXMLGregorianCalendarDate( int year, int month, int day, int timezone), DatatypeFactory.newXMLGregorianCalendarTime( int hours, int minutes, int seconds, int timezone), DatatypeFactory.newXMLGregorianCalendarTime( int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone) or DatatypeFactory.newXMLGregorianCalendarTime( int hours, int minutes, int seconds, int milliseconds, int timezone).

        reset() is designed to allow the reuse of existing XMLGregorianCalendars thus saving resources associated with the creation of new XMLGregorianCalendars.

      • setYear

        public abstract void setYear(BigInteger year)

        Set low and high order component of XSD dateTime year field.

        Unset this field by invoking the setter with a parameter value of null.

        Parameters:
        year - value constraints summarized in year field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if year parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setYear

        public abstract void setYear(int year)

        Set year of XSD dateTime year field.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Note: if the absolute value of the year parameter is less than 10^9, the eon component of the XSD year field is set to null by this method.

        Parameters:
        year - value constraints are summarized in year field of date/time field mapping table. If year is DatatypeConstants.FIELD_UNDEFINED, then eon is set to null.

      • setMonth

        public abstract void setMonth(int month)

        Set month.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        month - value constraints summarized in month field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if month parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setDay

        public abstract void setDay(int day)

        Set days in month.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        day - value constraints summarized in day field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if day parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setTimezone

        public abstract void setTimezone(int offset)

        Set the number of minutes in the timezone offset.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        offset - value constraints summarized in timezone field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if offset parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setTime

        public void setTime(int hour,
                    int minute,
                    int second)

        Set time as one unit.

        Parameters:
        hour - value constraints are summarized in hour field of date/time field mapping table.
        minute - value constraints are summarized in minute field of date/time field mapping table.
        second - value constraints are summarized in second field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if any parameter is outside value constraints for the field as specified in date/time field mapping table.
        See Also:
        setTime(int, int, int, BigDecimal)

      • setHour

        public abstract void setHour(int hour)

        Set hours.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        hour - value constraints summarized in hour field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if hour parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setMinute

        public abstract void setMinute(int minute)

        Set minutes.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        minute - value constraints summarized in minute field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if minute parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setSecond

        public abstract void setSecond(int second)

        Set seconds.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        second - value constraints summarized in second field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if second parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setMillisecond

        public abstract void setMillisecond(int millisecond)

        Set milliseconds.

        Unset this field by invoking the setter with a parameter value of DatatypeConstants.FIELD_UNDEFINED.

        Parameters:
        millisecond - value constraints summarized in second field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if millisecond parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setFractionalSecond

        public abstract void setFractionalSecond(BigDecimal fractional)

        Set fractional seconds.

        Unset this field by invoking the setter with a parameter value of null.

        Parameters:
        fractional - value constraints summarized in second field of date/time field mapping table.
        Throws:
        IllegalArgumentException - if fractional parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setTime

        public void setTime(int hour,
                    int minute,
                    int second,
                    BigDecimal fractional)

        Set time as one unit, including the optional infinite precision fractional seconds.

        Parameters:
        hour - value constraints are summarized in hour field of date/time field mapping table.
        minute - value constraints are summarized in minute field of date/time field mapping table.
        second - value constraints are summarized in second field of date/time field mapping table.
        fractional - value of null indicates this optional field is not set.
        Throws:
        IllegalArgumentException - if any parameter is outside value constraints for the field as specified in date/time field mapping table.

      • setTime

        public void setTime(int hour,
                    int minute,
                    int second,
                    int millisecond)

        Set time as one unit, including optional milliseconds.

        Parameters:
        hour - value constraints are summarized in hour field of date/time field mapping table.
        minute - value constraints are summarized in minute field of date/time field mapping table.
        second - value constraints are summarized in second field of date/time field mapping table.
        millisecond - value of DatatypeConstants.FIELD_UNDEFINED indicates this optional field is not set.
        Throws:
        IllegalArgumentException - if any parameter is outside value constraints for the field as specified in date/time field mapping table.

      • getEon

        public abstract BigInteger getEon()

        Return high order component for XML Schema 1.0 dateTime datatype field for year. null if this optional part of the year field is not defined.

        Value constraints for this value are summarized in year field of date/time field mapping table.

        Returns:
        eon of this XMLGregorianCalendar. The value returned is an integer multiple of 10^9.
        See Also:
        getYear(), getEonAndYear()

      • getYear

        public abstract int getYear()

        Return low order component for XML Schema 1.0 dateTime datatype field for year or DatatypeConstants.FIELD_UNDEFINED.

        Value constraints for this value are summarized in year field of date/time field mapping table.

        Returns:
        year of this XMLGregorianCalendar.
        See Also:
        getEon(), getEonAndYear()

      • getEonAndYear

        public abstract BigInteger getEonAndYear()

        Return XML Schema 1.0 dateTime datatype field for year.

        Value constraints for this value are summarized in year field of date/time field mapping table.

        Returns:
        sum of eon and BigInteger.valueOf(year) when both fields are defined. When only year is defined, return it. When both eon and year are not defined, return null.
        See Also:
        getEon(), getYear()

      • getMonth

        public abstract int getMonth()

        Return number of month or DatatypeConstants.FIELD_UNDEFINED.

        Value constraints for this value are summarized in month field of date/time field mapping table.

        Returns:
        year of this XMLGregorianCalendar.

      • getDay

        public abstract int getDay()
        Return day in month or DatatypeConstants.FIELD_UNDEFINED.

        Value constraints for this value are summarized in day field of date/time field mapping table.

        See Also:
        setDay(int)

      • getTimezone

        public abstract int getTimezone()
        Return timezone offset in minutes or DatatypeConstants.FIELD_UNDEFINED if this optional field is not defined.

        Value constraints for this value are summarized in timezone field of date/time field mapping table.

        See Also:
        setTimezone(int)

      • getHour

        public abstract int getHour()
        Return hours or DatatypeConstants.FIELD_UNDEFINED. Returns DatatypeConstants.FIELD_UNDEFINED if this field is not defined.

        Value constraints for this value are summarized in hour field of date/time field mapping table.

        See Also:
        setTime(int, int, int)

      • getMinute

        public abstract int getMinute()
        Return minutes or DatatypeConstants.FIELD_UNDEFINED.

        Returns DatatypeConstants.FIELD_UNDEFINED if this field is not defined.

        Value constraints for this value are summarized in minute field of date/time field mapping table.

        See Also:
        setTime(int, int, int)

      • getSecond

        public abstract int getSecond()

        Return seconds or DatatypeConstants.FIELD_UNDEFINED.

        Returns DatatypeConstants.FIELD_UNDEFINED if this field is not defined. When this field is not defined, the optional xs:dateTime fractional seconds field, represented by getFractionalSecond() and getMillisecond(), must not be defined.

        Value constraints for this value are summarized in second field of date/time field mapping table.

        Returns:
        Second of this XMLGregorianCalendar.
        See Also:
        getFractionalSecond(),
getMillisecond(),
setTime(int, int, int)

      • getMillisecond

        public int getMillisecond()

        Return millisecond precision of getFractionalSecond().

        This method represents a convenience accessor to infinite precision fractional second value returned by getFractionalSecond(). The returned value is the rounded down to milliseconds value of getFractionalSecond(). When getFractionalSecond() returns null, this method must return DatatypeConstants.FIELD_UNDEFINED.

        Value constraints for this value are summarized in second field of date/time field mapping table.

        Returns:
        Millisecond of this XMLGregorianCalendar.
        See Also:
        getFractionalSecond(), setTime(int, int, int)

      • getFractionalSecond

        public abstract BigDecimal getFractionalSecond()

        Return fractional seconds.

        null is returned when this optional field is not defined.

        Value constraints are detailed in second field of date/time field mapping table.

        This optional field can only have a defined value when the xs:dateTime second field, represented by getSecond(), does not return DatatypeConstants.FIELD_UNDEFINED.

        Returns:
        fractional seconds of this XMLGregorianCalendar.
        See Also:
        getSecond(), setTime(int, int, int, BigDecimal)

      • compare

        public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar)

        Compare two instances of W3C XML Schema 1.0 date/time datatypes according to partial order relation defined in W3C XML Schema 1.0 Part 2, Section 3.2.7.3, Order relation on dateTime.

        xsd:dateTime datatype field mapping to accessors of this class are defined in date/time field mapping table.

        Parameters:
        xmlGregorianCalendar - Instance of XMLGregorianCalendar to compare
        Returns:
        The relationship between this XMLGregorianCalendar and the specified xmlGregorianCalendar as DatatypeConstants.LESSER, DatatypeConstants.EQUAL, DatatypeConstants.GREATER or DatatypeConstants.INDETERMINATE.
        Throws:
        NullPointerException - if xmlGregorianCalendar is null.

      • normalize

        public abstract XMLGregorianCalendar normalize()

        Normalize this instance to UTC.

        2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z

        Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).

        Returns:
        this XMLGregorianCalendar normalized to UTC.

      • equals

        public boolean equals(Object obj)

        Compares this calendar to the specified object. The result is true if and only if the argument is not null and is an XMLGregorianCalendar object that represents the same instant in time as this object.

        Overrides:
        equals in class Object
        Parameters:
        obj - to compare.
        Returns:
        true when obj is an instance of XMLGregorianCalendar and compare(XMLGregorianCalendar obj) returns DatatypeConstants.EQUAL, otherwise false.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public int hashCode()

        Returns a hash code consistent with the definition of the equals method.

        Overrides:
        hashCode in class Object
        Returns:
        hash code of this object.
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • toXMLFormat

        public abstract String toXMLFormat()

        Return the lexical representation of this instance. The format is specified in XML Schema 1.0 Part 2, Section 3.2.[7-14].1, Lexical Representation".

        Specific target lexical representation format is determined by getXMLSchemaType().

        Returns:
        XML, as String, representation of this XMLGregorianCalendar
        Throws:
        IllegalStateException - if the combination of set fields does not match one of the eight defined XML Schema builtin date/time datatypes.

      • getXMLSchemaType

        public abstract QName getXMLSchemaType()

        Return the name of the XML Schema date/time type that this instance maps to. Type is computed based on fields that are set.

        Required fields for XML Schema 1.0 Date/Time Datatypes.
        (timezone is optional for all date/time datatypes)
        Datatype | year | month | day | hour | minute | second
        DatatypeConstants.DATETIME | X | X | X | X | X | X
        DatatypeConstants.DATE | X | X | X
        DatatypeConstants.TIME | X | X | X
        DatatypeConstants.GYEARMONTH | X | X
        DatatypeConstants.GMONTHDAY | X | X
        DatatypeConstants.GYEAR | X
        DatatypeConstants.GMONTH | X
        DatatypeConstants.GDAY | X
        Returns:
        One of the following class constants: DatatypeConstants.DATETIME, DatatypeConstants.TIME, DatatypeConstants.DATE, DatatypeConstants.GYEARMONTH, DatatypeConstants.GMONTHDAY, DatatypeConstants.GYEAR, DatatypeConstants.GMONTH or DatatypeConstants.GDAY.
        Throws:
        IllegalStateException - if the combination of set fields does not match one of the eight defined XML Schema builtin date/time datatypes.

      • toString

        public String toString()

        Returns a String representation of this XMLGregorianCalendar Object.

        The result is a lexical representation generated by toXMLFormat().

        Overrides:
        toString in class Object
        Returns:
        A non-null valid String representation of this XMLGregorianCalendar.
        Throws:
        IllegalStateException - if the combination of set fields does not match one of the eight defined XML Schema builtin date/time datatypes.
        See Also:
        toXMLFormat()

      • isValid

        public abstract boolean isValid()
        Validate instance by getXMLSchemaType() constraints.
        Returns:
        true if data values are valid.

      • add

        public abstract void add(Duration duration)

        Add duration to this instance.

        The computation is specified in XML Schema 1.0 Part 2, Appendix E, Adding durations to dateTimes>. date/time field mapping table defines the mapping from XML Schema 1.0 dateTime fields to this class' representation of those fields.

        Parameters:
        duration - Duration to add to this XMLGregorianCalendar.
        Throws:
        NullPointerException - when duration parameter is null.

      • toGregorianCalendar

        public abstract GregorianCalendar toGregorianCalendar()

        Convert this XMLGregorianCalendar to a GregorianCalendar.

        When this instance has an undefined field, this conversion relies on the java.util.GregorianCalendar default for its corresponding field. A notable difference between XML Schema 1.0 date/time datatypes and java.util.GregorianCalendar is that Timezone value is optional for date/time datatypes and it is a required field for java.util.GregorianCalendar. See javadoc for java.util.TimeZone.getDefault() on how the default is determined. To explicitly specify the TimeZone instance, see toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar).

        Field by Field Conversion from this class to java.util.GregorianCalendar
        java.util.GregorianCalendar field | javax.xml.datatype.XMLGregorianCalendar field
        ERA | getEonAndYear() .signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD
        YEAR | getEonAndYear() .abs().intValue()*
        MONTH | getMonth() - DatatypeConstants.JANUARY + Calendar.JANUARY
        DAY_OF_MONTH | getDay()
        HOUR_OF_DAY | getHour()
        MINUTE | getMinute()
        SECOND | getSecond()
        MILLISECOND | get millisecond order from getFractionalSecond() *
        GregorianCalendar.setTimeZone(TimeZone) | getTimezone() formatted into Custom timezone id
        * designates possible loss of precision during the conversion due to source datatype having higher precision than target datatype.

        To ensure consistency in conversion implementations, the new GregorianCalendar should be instantiated in following manner.

        • Using timeZone value as defined above, create a new java.util.GregorianCalendar(timeZone,Locale.getDefault()).
        • Initialize all GregorianCalendar fields by calling Calendar.clear().
        • Obtain a pure Gregorian Calendar by invoking GregorianCalendar.setGregorianChange( new Date(Long.MIN_VALUE)).
        • Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE, SECOND and MILLISECOND are set using the method Calendar.set(int,int)

        See Also:
        toGregorianCalendar(java.util.TimeZone, java.util.Locale, XMLGregorianCalendar)

      • toGregorianCalendar

        public abstract GregorianCalendar toGregorianCalendar(TimeZone timezone,
                                                      Locale aLocale,
                                                      XMLGregorianCalendar defaults)

        Convert this XMLGregorianCalendar along with provided parameters to a GregorianCalendar instance.

        Since XML Schema 1.0 date/time datetypes has no concept of timezone ids or daylight savings timezone ids, this conversion operation allows the user to explicitly specify one with timezone parameter.

        To compute the return value's TimeZone field,

        • when parameter timeZone is non-null, it is the timezone field.
        • else when this.getTimezone() != FIELD_UNDEFINED, create a java.util.TimeZone with a custom timezone id using the this.getTimezone().
        • else when defaults.getTimezone() != FIELD_UNDEFINED, create a java.util.TimeZone with a custom timezone id using defaults.getTimezone().
        • else use the GregorianCalendar default timezone value for the host is defined as specified by java.util.TimeZone.getDefault().

          • To ensure consistency in conversion implementations, the new GregorianCalendar should be instantiated in following manner.

          • Create a new java.util.GregorianCalendar(TimeZone, Locale) with TimeZone set as specified above and the Locale parameter.
          • Initialize all GregorianCalendar fields by calling Calendar.clear()
          • Obtain a pure Gregorian Calendar by invoking GregorianCalendar.setGregorianChange( new Date(Long.MIN_VALUE)).
          • Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE, SECOND and MILLISECOND are set using the method Calendar.set(int,int)
        Parameters:
        timezone - provide Timezone. null is a legal value.
        aLocale - provide explicit Locale. Use default GregorianCalendar locale if value is null.
        defaults - provide default field values to use when corresponding field for this instance is FIELD_UNDEFINED or null. If defaultsis null or a field within the specified defaults is undefined, just use java.util.GregorianCalendar defaults.
        Returns:
        a java.util.GregorianCalendar conversion of this instance.

      • getTimeZone

        public abstract TimeZone getTimeZone(int defaultZoneoffset)

        Returns a java.util.TimeZone for this class.

        If timezone field is defined for this instance, returns TimeZone initialized with custom timezone id of zoneoffset. If timezone field is undefined, try the defaultZoneoffset that was passed in. If defaultZoneoffset is FIELD_UNDEFINED, return default timezone for this host. (Same default as java.util.GregorianCalendar).

        Parameters:
        defaultZoneoffset - default zoneoffset if this zoneoffset is DatatypeConstants.FIELD_UNDEFINED.
        Returns:
        TimeZone for this.

      • clone

        public abstract Object clone()

        Creates and returns a copy of this object.

        Overrides:
        clone in class Object
        Returns:
        copy of this Object
        See Also:
        Cloneable
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.namespace

XML Namespace processing.

See: Description

  • Interface Summary
    Interface Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
  • Class Summary
    Class Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.

Package javax.xml.namespace Description

XML Namespace processing.

The following XML standards apply:

  • XML Schema Part2: Datatypes specification
  • Namespaces in XML
  • Namespaces in XML Errata
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.namespace Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.namespace

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.namespace.QName (implements java.io.Serializable)

Interface Hierarchy

  • javax.xml.namespace.NamespaceContext
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.namespace

  • Packages that use javax.xml.namespace
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.datatype
    XML/Java Type Mappings.
    javax.xml.namespace
    XML Namespace processing.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.
  • Classes in javax.xml.namespace used by javax.xml.bind
    Class and Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.datatype
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.namespace
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.soap
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.stream
    Class and Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.stream.events
    Class and Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.stream.util
    Class and Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.ws
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.ws.handler
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.ws.handler.soap
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.ws.spi
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.ws.wsaddressing
    Class and Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
  • Classes in javax.xml.namespace used by javax.xml.xpath
    Class and Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.namespace.QName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.namespace.QName

  • Packages that use QName
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.datatype
    XML/Java Type Mappings.
    javax.xml.namespace
    XML Namespace processing.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of QName in javax.xml.bind

      Fields in javax.xml.bind declared as QName
      Modifier and Type Field and Description
      protected QName JAXBElement.name
      xml element tag name
      Methods in javax.xml.bind that return QName
      Modifier and Type Method and Description
      abstract QName JAXBIntrospector.getElementName(Object jaxbElement)
      Get xml element qname for jaxbElement.
      QName JAXBElement.getName()
      Returns the xml element tag name.
      QName DatatypeConverterInterface.parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a QName value.
      static QName DatatypeConverter.parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a byte value.
      Methods in javax.xml.bind with parameters of type QName
      Modifier and Type Method and Description
      String DatatypeConverterInterface.printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.
      static String DatatypeConverter.printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.
      Constructors in javax.xml.bind with parameters of type QName
      Constructor and Description
      JAXBElement(QName name, Class<T> declaredType, Class scope, T value)
      Construct an xml element instance.
      JAXBElement(QName name, Class<T> declaredType, T value)
      Construct an xml element instance.

    • Uses of QName in javax.xml.datatype

      Fields in javax.xml.datatype declared as QName
      Modifier and Type Field and Description
      static QName DatatypeConstants.DATE
      Fully qualified name for W3C XML Schema 1.0 datatype date.
      static QName DatatypeConstants.DATETIME
      Fully qualified name for W3C XML Schema 1.0 datatype dateTime.
      static QName DatatypeConstants.DURATION
      Fully qualified name for W3C XML Schema datatype duration.
      static QName DatatypeConstants.DURATION_DAYTIME
      Fully qualified name for XQuery 1.0 and XPath 2.0 datatype dayTimeDuration.
      static QName DatatypeConstants.DURATION_YEARMONTH
      Fully qualified name for XQuery 1.0 and XPath 2.0 datatype yearMonthDuration.
      static QName DatatypeConstants.GDAY
      Fully qualified name for W3C XML Schema 1.0 datatype gDay.
      static QName DatatypeConstants.GMONTH
      Fully qualified name for W3C XML Schema 1.0 datatype gMonth.
      static QName DatatypeConstants.GMONTHDAY
      Fully qualified name for W3C XML Schema 1.0 datatype gMonthDay.
      static QName DatatypeConstants.GYEAR
      Fully qualified name for W3C XML Schema 1.0 datatype gYear.
      static QName DatatypeConstants.GYEARMONTH
      Fully qualified name for W3C XML Schema 1.0 datatype gYearMonth.
      static QName DatatypeConstants.TIME
      Fully qualified name for W3C XML Schema 1.0 datatype time.
      Methods in javax.xml.datatype that return QName
      Modifier and Type Method and Description
      abstract QName XMLGregorianCalendar.getXMLSchemaType()
      Return the name of the XML Schema date/time type that this instance maps to.
      QName Duration.getXMLSchemaType()
      Return the name of the XML Schema date/time type that this instance maps to.

    • Uses of QName in javax.xml.namespace

      Methods in javax.xml.namespace that return QName
      Modifier and Type Method and Description
      static QName QName.valueOf(String qNameAsString)
      QName derived from parsing the formatted String.

    • Uses of QName in javax.xml.soap

      Fields in javax.xml.soap declared as QName
      Modifier and Type Field and Description
      static QName SOAPConstants.SOAP_DATAENCODINGUNKNOWN_FAULT
      SOAP 1.2 DataEncodingUnknown Fault
      static QName SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT
      SOAP 1.2 MustUnderstand Fault
      static QName SOAPConstants.SOAP_RECEIVER_FAULT
      SOAP 1.2 Receiver Fault
      static QName SOAPConstants.SOAP_SENDER_FAULT
      SOAP 1.2 Sender Fault
      static QName SOAPConstants.SOAP_VERSIONMISMATCH_FAULT
      SOAP 1.2 VersionMismatch Fault
      Methods in javax.xml.soap that return QName
      Modifier and Type Method and Description
      QName SOAPElement.createQName(String localName, String prefix)
      Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement.
      QName SOAPElement.getElementQName()
      Returns the qname of this SOAPElement object.
      QName SOAPFault.getFaultCodeAsQName()
      Gets the fault code for this SOAPFault object as a QName object.
      Methods in javax.xml.soap with parameters of type QName
      Modifier and Type Method and Description
      SOAPElement SOAPElement.addAttribute(QName qname, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPBodyElement SOAPBody.addBodyElement(QName qname)
      Creates a new SOAPBodyElement object with the specified QName and adds it to this SOAPBody object.
      SOAPElement SOAPElement.addChildElement(QName qname)
      Creates a new SOAPElement object initialized with the given QName object and adds the new element to this SOAPElement object.
      DetailEntry Detail.addDetailEntry(QName qname)
      Creates a new DetailEntry object with the given QName and adds it to this Detail object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPHeaderElement SOAPHeader.addHeaderElement(QName qname)
      Creates a new SOAPHeaderElement object initialized with the specified qname and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addNotUnderstoodHeaderElement(QName name)
      Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      void SOAPFault.appendFaultSubcode(QName subcode)
      Adds a Subcode to the end of the sequence of Subcodes contained by this SOAPFault.
      SOAPElement SOAPFactory.createElement(QName qname)
      Creates a SOAPElement object initialized with the given QName object.
      abstract SOAPFault SOAPFactory.createFault(String reasonText, QName faultCode)
      Creates a new SOAPFault object initialized with the given reasonText and faultCode
      String SOAPElement.getAttributeValue(QName qname)
      Returns the value of the attribute with the specified qname.
      Iterator SOAPElement.getChildElements(QName qname)
      Returns an Iterator over all the immediate child Nodes of this element with the specified qname.
      boolean SOAPElement.removeAttribute(QName qname)
      Removes the attribute with the specified qname.
      SOAPElement SOAPElement.setElementQName(QName newName)
      Changes the name of this Element to newName if possible.
      void SOAPFault.setFaultCode(QName faultCodeQName)
      Sets this SOAPFault object with the given fault code.

    • Uses of QName in javax.xml.stream

      Methods in javax.xml.stream that return QName
      Modifier and Type Method and Description
      QName XMLStreamReader.getAttributeName(int index)
      Returns the qname of the attribute at the provided index
      QName XMLStreamReader.getName()
      Returns a QName for the current START_ELEMENT or END_ELEMENT event
      Methods in javax.xml.stream with parameters of type QName
      Modifier and Type Method and Description
      abstract Attribute XMLEventFactory.createAttribute(QName name, String value)
      Create a new Attribute
      abstract EndElement XMLEventFactory.createEndElement(QName name, Iterator namespaces)
      Create a new EndElement
      abstract StartElement XMLEventFactory.createStartElement(QName name, Iterator attributes, Iterator namespaces)
      Create a new StartElement.

    • Uses of QName in javax.xml.stream.events

      Methods in javax.xml.stream.events that return QName
      Modifier and Type Method and Description
      QName EndElement.getName()
      Get the name of this event
      QName StartElement.getName()
      Get the name of this event
      QName Attribute.getName()
      Returns the QName for this attribute
      QName XMLEvent.getSchemaType()
      This method is provided for implementations to provide optional type information about the associated event.
      Methods in javax.xml.stream.events with parameters of type QName
      Modifier and Type Method and Description
      Attribute StartElement.getAttributeByName(QName name)
      Returns the attribute referred to by this name

    • Uses of QName in javax.xml.stream.util

      Methods in javax.xml.stream.util that return QName
      Modifier and Type | Method and Description
      QName | StreamReaderDelegate.getAttributeName(int index)
      QName | StreamReaderDelegate.getName()

    • Uses of QName in javax.xml.ws

      Methods in javax.xml.ws that return QName
      Modifier and Type Method and Description
      QName Service.getServiceName()
      Gets the name of this service.
      Methods in javax.xml.ws that return types with arguments of type QName
      Modifier and Type Method and Description
      Iterator<QName> Service.getPorts()
      Returns an Iterator for the list of QNames of service endpoints grouped by this service
      Methods in javax.xml.ws with parameters of type QName
      Modifier and Type Method and Description
      void Service.addPort(QName portName, String bindingId, String endpointAddress)
      Creates a new port for the service.
      static Service Service.create(QName serviceName)
      Creates a Service instance.
      static Service Service.create(QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      static Service Service.create(URL wsdlDocumentLocation, QName serviceName)
      Creates a Service instance.
      static Service Service.create(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the client's choosing.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> T Service.getPort(QName portName, Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      <T> T Service.getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      Constructors in javax.xml.ws with parameters of type QName
      Constructor and Description
      Service(URL wsdlDocumentLocation, QName serviceName)
      Service(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)

    • Uses of QName in javax.xml.ws.handler

      Methods in javax.xml.ws.handler that return QName
      Modifier and Type Method and Description
      QName PortInfo.getPortName()
      Gets the qualified name of the WSDL port being accessed.
      QName PortInfo.getServiceName()
      Gets the qualified name of the WSDL service name containing the port being accessed.

    • Uses of QName in javax.xml.ws.handler.soap

      Methods in javax.xml.ws.handler.soap that return types with arguments of type QName
      Modifier and Type Method and Description
      Set<QName> SOAPHandler.getHeaders()
      Gets the header blocks that can be processed by this Handler instance.
      Methods in javax.xml.ws.handler.soap with parameters of type QName
      Modifier and Type Method and Description
      Object[] SOAPMessageContext.getHeaders(QName header, JAXBContext context, boolean allRoles)
      Gets headers that have a particular qualified name from the message in the message context.

    • Uses of QName in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return QName
      Modifier and Type Method and Description
      abstract QName ServiceDelegate.getServiceName()
      Gets the name of this service.
      Methods in javax.xml.ws.spi that return types with arguments of type QName
      Modifier and Type Method and Description
      abstract Iterator<QName> ServiceDelegate.getPorts()
      Returns an Iterator for the list of QNames of service endpoints grouped by this service
      Methods in javax.xml.ws.spi with parameters of type QName
      Modifier and Type Method and Description
      abstract void ServiceDelegate.addPort(QName portName, String bindingId, String endpointAddress)
      Creates a new port for the service.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass)
      Creates a service delegate object.
      ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features)
      Creates a service delegate object.
      abstract W3CEndpointReference Provider.createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.
      abstract <T> T ServiceDelegate.getPort(QName portName, Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      abstract <T> T ServiceDelegate.getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      Method parameters in javax.xml.ws.spi with type arguments of type QName
      Modifier and Type Method and Description
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.

    • Uses of QName in javax.xml.ws.wsaddressing

      Methods in javax.xml.ws.wsaddressing with parameters of type QName
      Modifier and Type Method and Description
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.attribute(QName name, String value)
      Adds an extension attribute to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.endpointName(QName endpointName)
      Sets the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.interfaceName(QName interfaceName)
      Sets the interfaceName as the wsam:InterfaceName element in the wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.serviceName(QName serviceName)
      Sets the serviceName as the wsam:ServiceName element in the wsa:Metadata element.

    • Uses of QName in javax.xml.xpath

      Fields in javax.xml.xpath declared as QName
      Modifier and Type Field and Description
      static QName XPathConstants.BOOLEAN
      The XPath 1.0 boolean data type.
      static QName XPathConstants.NODE
      The XPath 1.0 NodeSet data type.
      static QName XPathConstants.NODESET
      The XPath 1.0 NodeSet data type.
      static QName XPathConstants.NUMBER
      The XPath 1.0 number data type.
      static QName XPathConstants.STRING
      The XPath 1.0 string data type.
      Methods in javax.xml.xpath with parameters of type QName
      Modifier and Type Method and Description
      Object XPathExpression.evaluate(InputSource source, QName returnType)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.
      Object XPathExpression.evaluate(Object item, QName returnType)
      Evaluate the compiled XPath expression in the specified context and return the result as the specified type.
      Object XPath.evaluate(String expression, InputSource source, QName returnType)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as the specified type.
      Object XPath.evaluate(String expression, Object item, QName returnType)
      Evaluate an XPath expression in the specified context and return the result as the specified type.
      XPathFunction XPathFunctionResolver.resolveFunction(QName functionName, int arity)
      Find a function in the set of available functions.
      Object XPathVariableResolver.resolveVariable(QName variableName)
      Find a variable in the set of available variables.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.namespace.NamespaceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.namespace.NamespaceContext

  • Packages that use NamespaceContext
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of NamespaceContext in javax.xml.bind

      Methods in javax.xml.bind with parameters of type NamespaceContext
      Modifier and Type Method and Description
      QName DatatypeConverterInterface.parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a QName value.
      static QName DatatypeConverter.parseQName(String lexicalXSDQName, NamespaceContext nsc)
      Converts the string argument into a byte value.
      String DatatypeConverterInterface.printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.
      static String DatatypeConverter.printQName(QName val, NamespaceContext nsc)
      Converts a QName instance into a string.

    • Uses of NamespaceContext in javax.xml.stream

      Methods in javax.xml.stream that return NamespaceContext
      Modifier and Type Method and Description
      NamespaceContext XMLEventWriter.getNamespaceContext()
      Returns the current namespace context.
      NamespaceContext XMLStreamWriter.getNamespaceContext()
      Returns the current namespace context.
      NamespaceContext XMLStreamReader.getNamespaceContext()
      Returns a read only namespace context for the current position.
      Methods in javax.xml.stream with parameters of type NamespaceContext
      Modifier and Type Method and Description
      abstract StartElement XMLEventFactory.createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
      Create a new StartElement.
      void XMLEventWriter.setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.
      void XMLStreamWriter.setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.

    • Uses of NamespaceContext in javax.xml.stream.events

      Methods in javax.xml.stream.events that return NamespaceContext
      Modifier and Type Method and Description
      NamespaceContext StartElement.getNamespaceContext()
      Gets a read-only namespace context.

    • Uses of NamespaceContext in javax.xml.stream.util

      Methods in javax.xml.stream.util that return NamespaceContext
      Modifier and Type | Method and Description
      NamespaceContext | StreamReaderDelegate.getNamespaceContext()

    • Uses of NamespaceContext in javax.xml.xpath

      Methods in javax.xml.xpath that return NamespaceContext
      Modifier and Type Method and Description
      NamespaceContext XPath.getNamespaceContext()
      Return the current namespace context.
      Methods in javax.xml.xpath with parameters of type NamespaceContext
      Modifier and Type Method and Description
      void XPath.setNamespaceContext(NamespaceContext nsContext)
      Establish a namespace context.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamespaceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.namespace

Interface NamespaceContext

  • public interface NamespaceContext

    Interface for read only XML Namespace context processing.

    An XML Namespace has the properties:

    • Namespace URI: Namespace name expressed as a URI to which the prefix is bound
    • prefix: syntactically, this is the part of the attribute name following the XMLConstants.XMLNS_ATTRIBUTE ("xmlns") in the Namespace declaration

    example: <element xmlns:prefix="http://Namespace-name-URI">

    All get*(*) methods operate in the current scope for Namespace URI and prefix resolution.

    Note that a Namespace URI can be bound to multiple prefixes in the current scope. This can occur when multiple XMLConstants.XMLNS_ATTRIBUTE ("xmlns") Namespace declarations occur in the same Start-Tag and refer to the same Namespace URI. e.g.

     <element xmlns:prefix1="http://Namespace-name-URI"
          xmlns:prefix2="http://Namespace-name-URI">
    This can also occur when the same Namespace URI is used in multiple XMLConstants.XMLNS_ATTRIBUTE ("xmlns") Namespace declarations in the logical parent element hierarchy. e.g.
     <parent xmlns:prefix1="http://Namespace-name-URI">
   <child xmlns:prefix2="http://Namespace-name-URI">
     ...
   </child>
 </parent>

    A prefix can only be bound to a single Namespace URI in the current scope.

    Since:
    1.5
    See Also:
    javax.xml.XMLConstants for declarations of common XML values, XML Schema Part2: Datatypes, Namespaces in XML, Namespaces in XML Errata

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getNamespaceURI(String prefix)
      Get Namespace URI bound to a prefix in the current scope.
      String getPrefix(String namespaceURI)
      Get prefix bound to Namespace URI in the current scope.
      Iterator getPrefixes(String namespaceURI)
      Get all prefixes bound to a Namespace URI in the current scope.

    • Method Detail

      • getNamespaceURI

        String getNamespaceURI(String prefix)

        Get Namespace URI bound to a prefix in the current scope.

        When requesting a Namespace URI by prefix, the following table describes the returned Namespace URI value for all possible prefix values:

        getNamespaceURI(prefix) return value for specified prefixes
        prefix parameter | Namespace URI return value
        DEFAULT_NS_PREFIX ("") | default Namespace URI in the current scope or XMLConstants.NULL_NS_URI("") when there is no default Namespace URI in the current scope
        bound prefix | Namespace URI bound to prefix in current scope
        unbound prefix | XMLConstants.NULL_NS_URI("")
        XMLConstants.XML_NS_PREFIX ("xml") | XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace")
        XMLConstants.XMLNS_ATTRIBUTE ("xmlns") | XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/")
        null | IllegalArgumentException is thrown
        Parameters:
        prefix - prefix to look up
        Returns:
        Namespace URI bound to prefix in the current scope
        Throws:
        IllegalArgumentException - When prefix is null

      • getPrefix

        String getPrefix(String namespaceURI)

        Get prefix bound to Namespace URI in the current scope.

        To get all prefixes bound to a Namespace URI in the current scope, use getPrefixes(String namespaceURI).

        When requesting a prefix by Namespace URI, the following table describes the returned prefix value for all Namespace URI values:

        getPrefix(namespaceURI) return value for specified Namespace URIs
        Namespace URI parameter | prefix value returned
        <default Namespace URI> | XMLConstants.DEFAULT_NS_PREFIX ("")
        bound Namespace URI | prefix bound to Namespace URI in the current scope, if multiple prefixes are bound to the Namespace URI in the current scope, a single arbitrary prefix, whose choice is implementation dependent, is returned
        unbound Namespace URI | null
        XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace") | XMLConstants.XML_NS_PREFIX ("xml")
        XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/") | XMLConstants.XMLNS_ATTRIBUTE ("xmlns")
        null | IllegalArgumentException is thrown
        Parameters:
        namespaceURI - URI of Namespace to lookup
        Returns:
        prefix bound to Namespace URI in current context
        Throws:
        IllegalArgumentException - When namespaceURI is null

      • getPrefixes

        Iterator getPrefixes(String namespaceURI)

        Get all prefixes bound to a Namespace URI in the current scope.

        An Iterator over String elements is returned in an arbitrary, implementation dependent, order.

        The Iterator is not modifiable. e.g. the remove() method will throw UnsupportedOperationException.

        When requesting prefixes by Namespace URI, the following table describes the returned prefixes value for all Namespace URI values:

        getPrefixes(namespaceURI) return value for specified Namespace URIs
        Namespace URI parameter | prefixes value returned
        bound Namespace URI, including the <default Namespace URI> | Iterator over prefixes bound to Namespace URI in the current scope in an arbitrary, implementation dependent, order
        unbound Namespace URI | empty Iterator
        XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace") | Iterator with one element set to XMLConstants.XML_NS_PREFIX ("xml")
        XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/") | Iterator with one element set to XMLConstants.XMLNS_ATTRIBUTE ("xmlns")
        null | IllegalArgumentException is thrown
        Parameters:
        namespaceURI - URI of Namespace to lookup
        Returns:
        Iterator for all prefixes bound to the Namespace URI in the current scope
        Throws:
        IllegalArgumentException - When namespaceURI is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


QName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.namespace

Class QName

  • java.lang.Object
    • javax.xml.namespace.QName
  • All Implemented Interfaces:
    Serializable

    public class QName
extends Object
implements Serializable

    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.

    The value of a QName contains a Namespace URI, local part and prefix.

    The prefix is included in QName to retain lexical information when present in an XML input source. The prefix is NOT used in QName.equals(Object) or to compute the QName.hashCode(). Equality and the hash code are defined using only the Namespace URI and local part.

    If not specified, the Namespace URI is set to XMLConstants.NULL_NS_URI. If not specified, the prefix is set to XMLConstants.DEFAULT_NS_PREFIX.

    QName is immutable.

    Since:
    1.5
    Version:
    $Revision: 1.8 $, $Date: 2010/03/18 03:06:17 $
    See Also:
    XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      QName(String localPart)
      QName constructor specifying the local part.
      QName(String namespaceURI, String localPart)
      QName constructor specifying the Namespace URI and local part.
      QName(String namespaceURI, String localPart, String prefix)
      QName constructor specifying the Namespace URI, local part and prefix.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean equals(Object objectToTest)
      Test this QName for equality with another Object.
      String getLocalPart()
      Get the local part of this QName.
      String getNamespaceURI()
      Get the Namespace URI of this QName.
      String getPrefix()
      Get the prefix of this QName.
      int hashCode()
      Generate the hash code for this QName.
      String toString()
      String representation of this QName.
      static QName valueOf(String qNameAsString)
      QName derived from parsing the formatted String.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • QName

        public QName(String namespaceURI,
             String localPart)

        QName constructor specifying the Namespace URI and local part.

        If the Namespace URI is null, it is set to XMLConstants.NULL_NS_URI. This value represents no explicitly defined Namespace as defined by the Namespaces in XML specification. This action preserves compatible behavior with QName 1.0. Explicitly providing the XMLConstants.NULL_NS_URI value is the preferred coding style.

        If the local part is null an IllegalArgumentException is thrown. A local part of "" is allowed to preserve compatible behavior with QName 1.0.

        When using this constructor, the prefix is set to XMLConstants.DEFAULT_NS_PREFIX.

        The Namespace URI is not validated as a URI reference. The local part is not validated as a NCName as specified in Namespaces in XML.

        Parameters:
        namespaceURI - Namespace URI of the QName
        localPart - local part of the QName
        Throws:
        IllegalArgumentException - When localPart is null
        See Also:
        QName(String namespaceURI, String localPart, String prefix)

      • QName

        public QName(String namespaceURI,
             String localPart,
             String prefix)

        QName constructor specifying the Namespace URI, local part and prefix.

        If the Namespace URI is null, it is set to XMLConstants.NULL_NS_URI. This value represents no explicitly defined Namespace as defined by the Namespaces in XML specification. This action preserves compatible behavior with QName 1.0. Explicitly providing the XMLConstants.NULL_NS_URI value is the preferred coding style.

        If the local part is null an IllegalArgumentException is thrown. A local part of "" is allowed to preserve compatible behavior with QName 1.0.

        If the prefix is null, an IllegalArgumentException is thrown. Use XMLConstants.DEFAULT_NS_PREFIX to explicitly indicate that no prefix is present or the prefix is not relevant.

        The Namespace URI is not validated as a URI reference. The local part and prefix are not validated as a NCName as specified in Namespaces in XML.

        Parameters:
        namespaceURI - Namespace URI of the QName
        localPart - local part of the QName
        prefix - prefix of the QName
        Throws:
        IllegalArgumentException - When localPart or prefix is null

      • QName

        public QName(String localPart)

        QName constructor specifying the local part.

        If the local part is null an IllegalArgumentException is thrown. A local part of "" is allowed to preserve compatible behavior with QName 1.0.

        When using this constructor, the Namespace URI is set to XMLConstants.NULL_NS_URI and the prefix is set to XMLConstants.DEFAULT_NS_PREFIX.

        In an XML context, all Element and Attribute names exist in the context of a Namespace. Making this explicit during the construction of a QName helps prevent hard to diagnosis XML validity errors. The constructors QName(String namespaceURI, String localPart) and QName(String namespaceURI, String localPart, String prefix) are preferred.

        The local part is not validated as a NCName as specified in Namespaces in XML.

        Parameters:
        localPart - local part of the QName
        Throws:
        IllegalArgumentException - When localPart is null
        See Also:
        QName(String namespaceURI, String localPart), QName(String namespaceURI, String localPart, String prefix)

    • Method Detail

      • getNamespaceURI

        public String getNamespaceURI()

        Get the Namespace URI of this QName.

        Returns:
        Namespace URI of this QName

      • getLocalPart

        public String getLocalPart()

        Get the local part of this QName.

        Returns:
        local part of this QName

      • getPrefix

        public String getPrefix()

        Get the prefix of this QName.

        The prefix assigned to a QName might NOT be valid in a different context. For example, a QName may be assigned a prefix in the context of parsing a document but that prefix may be invalid in the context of a different document.

        Returns:
        prefix of this QName

      • equals

        public final boolean equals(Object objectToTest)

        Test this QName for equality with another Object.

        If the Object to be tested is not a QName or is null, then this method returns false.

        Two QNames are considered equal if and only if both the Namespace URI and local part are equal. This method uses String.equals() to check equality of the Namespace URI and local part. The prefix is NOT used to determine equality.

        This method satisfies the general contract of Object.equals(Object)

        Overrides:
        equals in class Object
        Parameters:
        objectToTest - the Object to test for equality with this QName
        Returns:
        true if the given Object is equal to this QName else false
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public final int hashCode()

        Generate the hash code for this QName.

        The hash code is calculated using both the Namespace URI and the local part of the QName. The prefix is NOT used to calculate the hash code.

        This method satisfies the general contract of Object.hashCode().

        Overrides:
        hashCode in class Object
        Returns:
        hash code for this QName Object
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • toString

        public String toString()

        String representation of this QName.

        The commonly accepted way of representing a QName as a String was defined by James Clark. Although this is not a standard specification, it is in common use, e.g. Transformer.setParameter(String name, Object value). This implementation represents a QName as: "{" + Namespace URI + "}" + local part. If the Namespace URI .equals(XMLConstants.NULL_NS_URI), only the local part is returned. An appropriate use of this method is for debugging or logging for human consumption.

        Note the prefix value is NOT returned as part of the String representation.

        This method satisfies the general contract of Object.toString().

        Overrides:
        toString in class Object
        Returns:
        String representation of this QName

      • valueOf

        public static QName valueOf(String qNameAsString)

        QName derived from parsing the formatted String.

        If the String is null or does not conform to QName.toString() formatting, an IllegalArgumentException is thrown.

        The String MUST be in the form returned by QName.toString().

        The commonly accepted way of representing a QName as a String was defined by James Clark. Although this is not a standard specification, it is in common use, e.g. Transformer.setParameter(String name, Object value). This implementation parses a String formatted as: "{" + Namespace URI + "}" + local part. If the Namespace URI .equals(XMLConstants.NULL_NS_URI), only the local part should be provided.

        The prefix value CANNOT be represented in the String and will be set to XMLConstants.DEFAULT_NS_PREFIX.

        This method does not do full validation of the resulting QName.

        The Namespace URI is not validated as a URI reference. The local part is not validated as a NCName as specified in Namespaces in XML.

        Parameters:
        qNameAsString - String representation of the QName
        Returns:
        QName corresponding to the given String
        Throws:
        IllegalArgumentException - When qNameAsString is null or malformed
        See Also:
        QName.toString()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


parsers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.parsers

Provides classes allowing the processing of XML documents.

See: Description

  • Class Summary
    Class Description
    DocumentBuilder
    Defines the API to obtain DOM Document instances from an XML document.
    DocumentBuilderFactory
    Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
    SAXParser
    Defines the API that wraps an XMLReader implementation class.
    SAXParserFactory
    Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
  • Exception Summary
    Exception Description
    ParserConfigurationException
    Indicates a serious configuration error.
  • Error Summary
    Error Description
    FactoryConfigurationError
    Thrown when a problem with configuration with the Parser Factories exists.

Package javax.xml.parsers Description

Provides classes allowing the processing of XML documents. Two types of plugable parsers are supported:

  • SAX (Simple API for XML)
  • DOM (Document Object Model)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.parsers Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.parsers

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.parsers.DocumentBuilder
    • javax.xml.parsers.DocumentBuilderFactory
    • javax.xml.parsers.SAXParser
    • javax.xml.parsers.SAXParserFactory
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • javax.xml.parsers.FactoryConfigurationError
      • java.lang.Exception
        • javax.xml.parsers.ParserConfigurationException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.parsers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.parsers

  • Packages that use javax.xml.parsers
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
  • Classes in javax.xml.parsers used by javax.xml.bind.annotation
    Class and Description
    DocumentBuilder
    Defines the API to obtain DOM Document instances from an XML document.
  • Classes in javax.xml.parsers used by javax.xml.parsers
    Class and Description
    DocumentBuilder
    Defines the API to obtain DOM Document instances from an XML document.
    DocumentBuilderFactory
    Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
    ParserConfigurationException
    Indicates a serious configuration error.
    SAXParser
    Defines the API that wraps an XMLReader implementation class.
    SAXParserFactory
    Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.DocumentBuilder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.DocumentBuilder

  • Packages that use DocumentBuilder
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of DocumentBuilder in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return DocumentBuilder
      Modifier and Type | Method and Description
      DocumentBuilder | W3CDomHandler.getBuilder()
      Methods in javax.xml.bind.annotation with parameters of type DocumentBuilder
      Modifier and Type | Method and Description
      void | W3CDomHandler.setBuilder(DocumentBuilder builder)
      Constructors in javax.xml.bind.annotation with parameters of type DocumentBuilder
      Constructor and Description
      W3CDomHandler(DocumentBuilder builder)
      Constructor that allows applications to specify which DOM implementation to be used.

    • Uses of DocumentBuilder in javax.xml.parsers

      Methods in javax.xml.parsers that return DocumentBuilder
      Modifier and Type Method and Description
      abstract DocumentBuilder DocumentBuilderFactory.newDocumentBuilder()
      Creates a new instance of a DocumentBuilder using the currently configured parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.DocumentBuilderFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.DocumentBuilderFactory

  • Packages that use DocumentBuilderFactory
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of DocumentBuilderFactory in javax.xml.parsers

      Methods in javax.xml.parsers that return DocumentBuilderFactory
      Modifier and Type Method and Description
      static DocumentBuilderFactory DocumentBuilderFactory.newInstance()
      Obtain a new instance of a DocumentBuilderFactory.
      static DocumentBuilderFactory DocumentBuilderFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a DocumentBuilderFactory from class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.FactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.FactoryConfigurationError

No usage of javax.xml.parsers.FactoryConfigurationError
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.ParserConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.ParserConfigurationException

  • Packages that use ParserConfigurationException
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of ParserConfigurationException in javax.xml.parsers

      Methods in javax.xml.parsers that throw ParserConfigurationException
      Modifier and Type Method and Description
      abstract boolean DocumentBuilderFactory.getFeature(String name)
      Get the state of the named feature.
      abstract boolean SAXParserFactory.getFeature(String name)
      Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
      abstract DocumentBuilder DocumentBuilderFactory.newDocumentBuilder()
      Creates a new instance of a DocumentBuilder using the currently configured parameters.
      abstract SAXParser SAXParserFactory.newSAXParser()
      Creates a new instance of a SAXParser using the currently configured factory parameters.
      abstract void DocumentBuilderFactory.setFeature(String name, boolean value)
      Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.
      abstract void SAXParserFactory.setFeature(String name, boolean value)
      Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.SAXParser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.SAXParser

  • Packages that use SAXParser
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of SAXParser in javax.xml.parsers

      Methods in javax.xml.parsers that return SAXParser
      Modifier and Type Method and Description
      abstract SAXParser SAXParserFactory.newSAXParser()
      Creates a new instance of a SAXParser using the currently configured factory parameters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.parsers.SAXParserFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.parsers.SAXParserFactory

  • Packages that use SAXParserFactory
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of SAXParserFactory in javax.xml.parsers

      Methods in javax.xml.parsers that return SAXParserFactory
      Modifier and Type Method and Description
      static SAXParserFactory SAXParserFactory.newInstance()
      Obtain a new instance of a SAXParserFactory.
      static SAXParserFactory SAXParserFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a SAXParserFactory from class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentBuilder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class DocumentBuilder

  • java.lang.Object
    • javax.xml.parsers.DocumentBuilder

  • public abstract class DocumentBuilder
extends Object
    Defines the API to obtain DOM Document instances from an XML document. Using this class, an application programmer can obtain a Document from XML.

    An instance of this class can be obtained from the DocumentBuilderFactory.newDocumentBuilder() method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.

    Note that this class reuses several classes from the SAX API. This does not require that the implementor of the underlying DOM implementation use a SAX parser to parse XML document into a Document. It merely requires that the implementation communicate with the application using these existing APIs.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DocumentBuilder()
      Protected constructor

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract DOMImplementation getDOMImplementation()
      Obtain an instance of a DOMImplementation object.
      Schema getSchema()
      Get a reference to the the Schema being used by the XML processor.
      abstract boolean isNamespaceAware()
      Indicates whether or not this parser is configured to understand namespaces.
      abstract boolean isValidating()
      Indicates whether or not this parser is configured to validate XML documents.
      boolean isXIncludeAware()
      Get the XInclude processing mode for this parser.
      abstract Document newDocument()
      Obtain a new instance of a DOM Document object to build a DOM tree with.
      Document parse(File f)
      Parse the content of the given file as an XML document and return a new DOM Document object.
      abstract Document parse(InputSource is)
      Parse the content of the given input source as an XML document and return a new DOM Document object.
      Document parse(InputStream is)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      Document parse(InputStream is, String systemId)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      Document parse(String uri)
      Parse the content of the given URI as an XML document and return a new DOM Document object.
      void reset()
      Reset this DocumentBuilder to its original configuration.
      abstract void setEntityResolver(EntityResolver er)
      Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.
      abstract void setErrorHandler(ErrorHandler eh)
      Specify the ErrorHandler to be used by the parser.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DocumentBuilder

        protected DocumentBuilder()
        Protected constructor

    • Method Detail

      • reset

        public void reset()

        Reset this DocumentBuilder to its original configuration.

        DocumentBuilder is reset to the same state as when it was created with DocumentBuilderFactory.newDocumentBuilder(). reset() is designed to allow the reuse of existing DocumentBuilders thus saving resources associated with the creation of new DocumentBuilders.

        The reset DocumentBuilder is not guaranteed to have the same EntityResolver or ErrorHandler Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal EntityResolver and ErrorHandler.

        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5

      • parse

        public Document parse(InputStream is)
               throws SAXException,
                      IOException
        Parse the content of the given InputStream as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the InputStream is null.
        Parameters:
        is - InputStream containing the content to be parsed.
        Returns:
        Document result of parsing the InputStream
        Throws:
        IOException - If any IO errors occur.
        SAXException - If any parse errors occur.
        IllegalArgumentException - When is is null
        See Also:
        DocumentHandler

      • parse

        public Document parse(InputStream is,
                      String systemId)
               throws SAXException,
                      IOException
        Parse the content of the given InputStream as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the InputStream is null.
        Parameters:
        is - InputStream containing the content to be parsed.
        systemId - Provide a base for resolving relative URIs.
        Returns:
        A new DOM Document object.
        Throws:
        IOException - If any IO errors occur.
        SAXException - If any parse errors occur.
        IllegalArgumentException - When is is null
        See Also:
        DocumentHandler

      • parse

        public Document parse(String uri)
               throws SAXException,
                      IOException
        Parse the content of the given URI as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the URI is null null.
        Parameters:
        uri - The location of the content to be parsed.
        Returns:
        A new DOM Document object.
        Throws:
        IOException - If any IO errors occur.
        SAXException - If any parse errors occur.
        IllegalArgumentException - When uri is null
        See Also:
        DocumentHandler

      • parse

        public Document parse(File f)
               throws SAXException,
                      IOException
        Parse the content of the given file as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the File is null null.
        Parameters:
        f - The file containing the XML to parse.
        Returns:
        A new DOM Document object.
        Throws:
        IOException - If any IO errors occur.
        SAXException - If any parse errors occur.
        IllegalArgumentException - When f is null
        See Also:
        DocumentHandler

      • parse

        public abstract Document parse(InputSource is)
                        throws SAXException,
                               IOException
        Parse the content of the given input source as an XML document and return a new DOM Document object. An IllegalArgumentException is thrown if the InputSource is null null.
        Parameters:
        is - InputSource containing the content to be parsed.
        Returns:
        A new DOM Document object.
        Throws:
        IOException - If any IO errors occur.
        SAXException - If any parse errors occur.
        IllegalArgumentException - When is is null
        See Also:
        DocumentHandler

      • isNamespaceAware

        public abstract boolean isNamespaceAware()
        Indicates whether or not this parser is configured to understand namespaces.
        Returns:
        true if this parser is configured to understand namespaces; false otherwise.

      • isValidating

        public abstract boolean isValidating()
        Indicates whether or not this parser is configured to validate XML documents.
        Returns:
        true if this parser is configured to validate XML documents; false otherwise.

      • setEntityResolver

        public abstract void setEntityResolver(EntityResolver er)
        Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.
        Parameters:
        er - The EntityResolver to be used to resolve entities present in the XML document to be parsed.

      • setErrorHandler

        public abstract void setErrorHandler(ErrorHandler eh)
        Specify the ErrorHandler to be used by the parser. Setting this to null will result in the underlying implementation using it's own default implementation and behavior.
        Parameters:
        eh - The ErrorHandler to be used by the parser.

      • newDocument

        public abstract Document newDocument()
        Obtain a new instance of a DOM Document object to build a DOM tree with.
        Returns:
        A new instance of a DOM Document object.

      • getDOMImplementation

        public abstract DOMImplementation getDOMImplementation()
        Obtain an instance of a DOMImplementation object.
        Returns:
        A new instance of a DOMImplementation.

      • getSchema

        public Schema getSchema()

        Get a reference to the the Schema being used by the XML processor.

        If no schema is being used, null is returned.

        Returns:
        Schema being used or null if none in use
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5

      • isXIncludeAware

        public boolean isXIncludeAware()

        Get the XInclude processing mode for this parser.

        Returns:
        the return value of the DocumentBuilderFactory.isXIncludeAware() when this parser was created from factory.
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5
        See Also:
        DocumentBuilderFactory.setXIncludeAware(boolean)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentBuilderFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class DocumentBuilderFactory

  • java.lang.Object
    • javax.xml.parsers.DocumentBuilderFactory

  • public abstract class DocumentBuilderFactory
extends Object
    Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
    Version:
    $Revision: 1.9 $, $Date: 2010/05/25 16:19:44 $

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DocumentBuilderFactory()
      Protected constructor to prevent instantiation.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Object getAttribute(String name)
      Allows the user to retrieve specific attributes on the underlying implementation.
      abstract boolean getFeature(String name)
      Get the state of the named feature.
      Schema getSchema()
      Gets the Schema object specified through the setSchema(Schema schema) method.
      boolean isCoalescing()
      Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.
      boolean isExpandEntityReferences()
      Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.
      boolean isIgnoringComments()
      Indicates whether or not the factory is configured to produce parsers which ignores comments.
      boolean isIgnoringElementContentWhitespace()
      Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.
      boolean isNamespaceAware()
      Indicates whether or not the factory is configured to produce parsers which are namespace aware.
      boolean isValidating()
      Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
      boolean isXIncludeAware()
      Get state of XInclude processing.
      abstract DocumentBuilder newDocumentBuilder()
      Creates a new instance of a DocumentBuilder using the currently configured parameters.
      static DocumentBuilderFactory newInstance()
      Obtain a new instance of a DocumentBuilderFactory.
      static DocumentBuilderFactory newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a DocumentBuilderFactory from class name.
      abstract void setAttribute(String name, Object value)
      Allows the user to set specific attributes on the underlying implementation.
      void setCoalescing(boolean coalescing)
      Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node.
      void setExpandEntityReferences(boolean expandEntityRef)
      Specifies that the parser produced by this code will expand entity reference nodes.
      abstract void setFeature(String name, boolean value)
      Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.
      void setIgnoringComments(boolean ignoreComments)
      Specifies that the parser produced by this code will ignore comments.
      void setIgnoringElementContentWhitespace(boolean whitespace)
      Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10).
      void setNamespaceAware(boolean awareness)
      Specifies that the parser produced by this code will provide support for XML namespaces.
      void setSchema(Schema schema)
      Set the Schema to be used by parsers created from this factory.
      void setValidating(boolean validating)
      Specifies that the parser produced by this code will validate documents as they are parsed.
      void setXIncludeAware(boolean state)
      Set state of XInclude processing.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DocumentBuilderFactory

        protected DocumentBuilderFactory()

        Protected constructor to prevent instantiation. Use newInstance().

    • Method Detail

      • newInstance

        public static DocumentBuilderFactory newInstance()
        Obtain a new instance of a DocumentBuilderFactory. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the DocumentBuilderFactory implementation class to load:
        • Use the javax.xml.parsers.DocumentBuilderFactory system property.
        • Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. The jaxp.properties file is read only once by the JAXP implementation and it's values are then cached for future use. If the file does not exist when the first attempt is made to read from it, no further attempts are made to check for its existence. It is not possible to change the value of any property in jaxp.properties after it has been read for the first time.
        • Uses the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, the system-default implementation is returned.
        Once an application has obtained a reference to a DocumentBuilderFactory it can use the factory to configure and obtain parser instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems loading DocumentBuilders, try:

         java -Djaxp.debug=1 YourProgram ....
        Returns:
        New instance of a DocumentBuilderFactory
        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static DocumentBuilderFactory newInstance(String factoryClassName,
                                                 ClassLoader classLoader)

        Obtain a new instance of a DocumentBuilderFactory from class name. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Once an application has obtained a reference to a DocumentBuilderFactory it can use the factory to configure and obtain parser instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.parsers.DocumentBuilderFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        New instance of a DocumentBuilderFactory
        Throws:
        FactoryConfigurationError - if factoryClassName is null, or the factory class cannot be loaded, instantiated.
        Since:
        1.6
        See Also:
        newInstance()

      • newDocumentBuilder

        public abstract DocumentBuilder newDocumentBuilder()
                                            throws ParserConfigurationException
        Creates a new instance of a DocumentBuilder using the currently configured parameters.
        Returns:
        A new instance of a DocumentBuilder.
        Throws:
        ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.

      • setNamespaceAware

        public void setNamespaceAware(boolean awareness)
        Specifies that the parser produced by this code will provide support for XML namespaces. By default the value of this is set to false
        Parameters:
        awareness - true if the parser produced will provide support for XML namespaces; false otherwise.

      • setValidating

        public void setValidating(boolean validating)
        Specifies that the parser produced by this code will validate documents as they are parsed. By default the value of this is set to false.

        Note that "the validation" here means a validating parser as defined in the XML recommendation. In other words, it essentially just controls the DTD validation. (except the legacy two properties defined in JAXP 1.2.)

        To use modern schema languages such as W3C XML Schema or RELAX NG instead of DTD, you can configure your parser to be a non-validating parser by leaving the setValidating(boolean) method false, then use the setSchema(Schema) method to associate a schema to a parser.

        Parameters:
        validating - true if the parser produced will validate documents as they are parsed; false otherwise.

      • setIgnoringElementContentWhitespace

        public void setIgnoringElementContentWhitespace(boolean whitespace)
        Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10). Note that only whitespace which is directly contained within element content that has an element only content model (see XML Rec 3.2.1) will be eliminated. Due to reliance on the content model this setting requires the parser to be in validating mode. By default the value of this is set to false.
        Parameters:
        whitespace - true if the parser created must eliminate whitespace in the element content when parsing XML documents; false otherwise.

      • setExpandEntityReferences

        public void setExpandEntityReferences(boolean expandEntityRef)
        Specifies that the parser produced by this code will expand entity reference nodes. By default the value of this is set to true
        Parameters:
        expandEntityRef - true if the parser produced will expand entity reference nodes; false otherwise.

      • setIgnoringComments

        public void setIgnoringComments(boolean ignoreComments)

        Specifies that the parser produced by this code will ignore comments. By default the value of this is set to false .

        Parameters:
        ignoreComments - boolean value to ignore comments during processing

      • setCoalescing

        public void setCoalescing(boolean coalescing)
        Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node. By default the value of this is set to false
        Parameters:
        coalescing - true if the parser produced will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node; false otherwise.

      • isNamespaceAware

        public boolean isNamespaceAware()
        Indicates whether or not the factory is configured to produce parsers which are namespace aware.
        Returns:
        true if the factory is configured to produce parsers which are namespace aware; false otherwise.

      • isValidating

        public boolean isValidating()
        Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
        Returns:
        true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.

      • isIgnoringElementContentWhitespace

        public boolean isIgnoringElementContentWhitespace()
        Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.
        Returns:
        true if the factory is configured to produce parsers which ignore ignorable whitespace in element content; false otherwise.

      • isExpandEntityReferences

        public boolean isExpandEntityReferences()
        Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.
        Returns:
        true if the factory is configured to produce parsers which expand entity reference nodes; false otherwise.

      • isIgnoringComments

        public boolean isIgnoringComments()
        Indicates whether or not the factory is configured to produce parsers which ignores comments.
        Returns:
        true if the factory is configured to produce parsers which ignores comments; false otherwise.

      • isCoalescing

        public boolean isCoalescing()
        Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.
        Returns:
        true if the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node; false otherwise.

      • setAttribute

        public abstract void setAttribute(String name,
                                  Object value)
                           throws IllegalArgumentException
        Allows the user to set specific attributes on the underlying implementation.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD and XMLConstants.ACCESS_EXTERNAL_SCHEMA properties.

        • Setting the XMLConstants.ACCESS_EXTERNAL_DTD property restricts the access to external DTDs, external Entity References to the protocols specified by the property. If access is denied during parsing due to the restriction of this property, SAXException will be thrown by the parse methods defined by DocumentBuilder.

          Setting the XMLConstants.ACCESS_EXTERNAL_SCHEMA property restricts the access to external Schema set by the schemaLocation attribute to the protocols specified by the property. If access is denied during parsing due to the restriction of this property, SAXException will be thrown by the parse methods defined by DocumentBuilder.

        Parameters:
        name - The name of the attribute.
        value - The value of the attribute.
        Throws:
        IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

      • getAttribute

        public abstract Object getAttribute(String name)
                             throws IllegalArgumentException
        Allows the user to retrieve specific attributes on the underlying implementation.
        Parameters:
        name - The name of the attribute.
        Returns:
        value The value of the attribute.
        Throws:
        IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

      • setFeature

        public abstract void setFeature(String name,
                                boolean value)
                         throws ParserConfigurationException

        Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.

        Feature names are fully qualified URIs. Implementations may define their own features. A ParserConfigurationException is thrown if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support the feature. It is possible for a DocumentBuilderFactory to expose a feature value but be unable to change its state.

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is:

        • true: the implementation will limit XML processing to conform to implementation limits. Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorHandler.fatalError(SAXParseException exception). See DocumentBuilder.setErrorHandler(org.xml.sax.ErrorHandler errorHandler).
        • false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
        Parameters:
        name - Feature name.
        value - Is feature state true or false.
        Throws:
        ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.
        NullPointerException - If the name parameter is null.

      • getFeature

        public abstract boolean getFeature(String name)
                            throws ParserConfigurationException

        Get the state of the named feature.

        Feature names are fully qualified URIs. Implementations may define their own features. An ParserConfigurationException is thrown if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support the feature. It is possible for an DocumentBuilderFactory to expose a feature value but be unable to change its state.

        Parameters:
        name - Feature name.
        Returns:
        State of the named feature.
        Throws:
        ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.

      • getSchema

        public Schema getSchema()
        Gets the Schema object specified through the setSchema(Schema schema) method.
        Returns:
        the Schema object that was last set through the setSchema(Schema) method, or null if the method was not invoked since a DocumentBuilderFactory is created.
        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5

      • setSchema

        public void setSchema(Schema schema)

        Set the Schema to be used by parsers created from this factory.

        When a Schema is non-null, a parser will use a validator created from it to validate documents before it passes information down to the application.

        When errors are found by the validator, the parser is responsible to report them to the user-specified ErrorHandler (or if the error handler is not set, ignore them or throw them), just like any other errors found by the parser itself. In other words, if the user-specified ErrorHandler is set, it must receive those errors, and if not, they must be treated according to the implementation specific default error handling rules.

        A validator may modify the outcome of a parse (for example by adding default values that were missing in documents), and a parser is responsible to make sure that the application will receive modified DOM trees.

        Initialy, null is set as the Schema.

        This processing will take effect even if the isValidating() method returns false.

        It is an error to use the http://java.sun.com/xml/jaxp/properties/schemaSource property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage property in conjunction with a Schema object. Such configuration will cause a ParserConfigurationException exception when the newDocumentBuilder() is invoked.

        Note for implmentors

        A parser must be able to work with any Schema implementation. However, parsers and schemas are allowed to use implementation-specific custom mechanisms as long as they yield the result described in the specification.

        Parameters:
        schema - Schema to use or null to remove a schema.
        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5

      • setXIncludeAware

        public void setXIncludeAware(boolean state)

        Set state of XInclude processing.

        If XInclude markup is found in the document instance, should it be processed as specified in XML Inclusions (XInclude) Version 1.0.

        XInclude processing defaults to false.

        Parameters:
        state - Set XInclude processing to true or false
        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5

      • isXIncludeAware

        public boolean isXIncludeAware()

        Get state of XInclude processing.

        Returns:
        current state of XInclude processing
        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class FactoryConfigurationError

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Error
        • javax.xml.parsers.FactoryConfigurationError
  • All Implemented Interfaces:
    Serializable

    public class FactoryConfigurationError
extends Error
    Thrown when a problem with configuration with the Parser Factories exists. This error will typically be thrown when the class of a parser factory specified in the system properties cannot be found or instantiated.
    Version:
    $Revision: 1.7 $, $Date: 2010-11-01 04:36:09 $
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      FactoryConfigurationError()
      Create a new FactoryConfigurationError with no detail mesage.
      FactoryConfigurationError(Exception e)
      Create a new FactoryConfigurationError with a given Exception base cause of the error.
      FactoryConfigurationError(Exception e, String msg)
      Create a new FactoryConfigurationError with the given Exception base cause and detail message.
      FactoryConfigurationError(String msg)
      Create a new FactoryConfigurationError with the String specified as an error message.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      use the exception chaining mechanism of JDK1.4
      Exception getException()
      Return the actual exception (if any) that caused this exception to be raised.
      String getMessage()
      Return the message (if any) for this error .

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • FactoryConfigurationError

        public FactoryConfigurationError()
        Create a new FactoryConfigurationError with no detail mesage.

      • FactoryConfigurationError

        public FactoryConfigurationError(String msg)
        Create a new FactoryConfigurationError with the String specified as an error message.
        Parameters:
        msg - The error message for the exception.

      • FactoryConfigurationError

        public FactoryConfigurationError(Exception e)
        Create a new FactoryConfigurationError with a given Exception base cause of the error.
        Parameters:
        e - The exception to be encapsulated in a FactoryConfigurationError.

      • FactoryConfigurationError

        public FactoryConfigurationError(Exception e,
                                 String msg)
        Create a new FactoryConfigurationError with the given Exception base cause and detail message.
        Parameters:
        e - The exception to be encapsulated in a FactoryConfigurationError
        msg - The detail message.

    • Method Detail

      • getMessage

        public String getMessage()
        Return the message (if any) for this error . If there is no message for the exception and there is an encapsulated exception then the message of that exception, if it exists will be returned. Else the name of the encapsulated exception will be returned.
        Overrides:
        getMessage in class Throwable
        Returns:
        The error message.

      • getException

        public Exception getException()
        Return the actual exception (if any) that caused this exception to be raised.
        Returns:
        The encapsulated exception, or null if there is none.

      • getCause

        public Throwable getCause()
        use the exception chaining mechanism of JDK1.4
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParserConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class ParserConfigurationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.parsers.ParserConfigurationException
  • All Implemented Interfaces:
    Serializable

    public class ParserConfigurationException
extends Exception
    Indicates a serious configuration error.
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ParserConfigurationException()
      Create a new ParserConfigurationException with no detail mesage.
      ParserConfigurationException(String msg)
      Create a new ParserConfigurationException with the String specified as an error message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ParserConfigurationException

        public ParserConfigurationException()
        Create a new ParserConfigurationException with no detail mesage.

      • ParserConfigurationException

        public ParserConfigurationException(String msg)
        Create a new ParserConfigurationException with the String specified as an error message.
        Parameters:
        msg - The error message for the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXParser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class SAXParser

  • java.lang.Object
    • javax.xml.parsers.SAXParser

  • public abstract class SAXParser
extends Object
    Defines the API that wraps an XMLReader implementation class. In JAXP 1.0, this class wrapped the Parser interface, however this interface was replaced by the XMLReader. For ease of transition, this class continues to support the same name and interface as well as supporting new methods. An instance of this class can be obtained from the SAXParserFactory.newSAXParser() method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.

    This static method creates a new factory instance based on a system property setting or uses the platform default if no property has been defined.

    The system property that controls which Factory implementation to create is named "javax.xml.parsers.SAXParserFactory". This property names a class that is a concrete subclass of this abstract class. If no property is defined, a platform default will be used.

    As the content is parsed by the underlying parser, methods of the given HandlerBase or the DefaultHandler are called.

    Implementors of this class which wrap an underlaying implementation can consider using the ParserAdapter class to initially adapt their SAX1 implementation to work under this revised class.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SAXParser()
      Protected constructor to prevent instaniation.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Parser getParser()
      Returns the SAX parser that is encapsultated by the implementation of this class.
      abstract Object getProperty(String name)
      Returns the particular property requested for in the underlying implementation of XMLReader.
      Schema getSchema()
      Get a reference to the the Schema being used by the XML processor.
      abstract XMLReader getXMLReader()
      Returns the XMLReader that is encapsulated by the implementation of this class.
      abstract boolean isNamespaceAware()
      Indicates whether or not this parser is configured to understand namespaces.
      abstract boolean isValidating()
      Indicates whether or not this parser is configured to validate XML documents.
      boolean isXIncludeAware()
      Get the XInclude processing mode for this parser.
      void parse(File f, DefaultHandler dh)
      Parse the content of the file specified as XML using the specified DefaultHandler.
      void parse(File f, HandlerBase hb)
      Parse the content of the file specified as XML using the specified HandlerBase.
      void parse(InputSource is, DefaultHandler dh)
      Parse the content given InputSource as XML using the specified DefaultHandler.
      void parse(InputSource is, HandlerBase hb)
      Parse the content given InputSource as XML using the specified HandlerBase.
      void parse(InputStream is, DefaultHandler dh)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void parse(InputStream is, DefaultHandler dh, String systemId)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void parse(InputStream is, HandlerBase hb)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      void parse(InputStream is, HandlerBase hb, String systemId)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      void parse(String uri, DefaultHandler dh)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified DefaultHandler.
      void parse(String uri, HandlerBase hb)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified HandlerBase.
      void reset()
      Reset this SAXParser to its original configuration.
      abstract void setProperty(String name, Object value)
      Sets the particular property in the underlying implementation of XMLReader.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SAXParser

        protected SAXParser()

        Protected constructor to prevent instaniation. Use SAXParserFactory.newSAXParser().

    • Method Detail

      • reset

        public void reset()

        Reset this SAXParser to its original configuration.

        SAXParser is reset to the same state as when it was created with SAXParserFactory.newSAXParser(). reset() is designed to allow the reuse of existing SAXParsers thus saving resources associated with the creation of new SAXParsers.

        The reset SAXParser is not guaranteed to have the same Schema Object, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal Schema.

        Throws:
        UnsupportedOperationException - When Implementations do not override this method
        Since:
        1.5

      • parse

        public void parse(InputStream is,
                  HandlerBase hb)
           throws SAXException,
                  IOException

        Parse the content of the given InputStream instance as XML using the specified HandlerBase. Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0.

        Parameters:
        is - InputStream containing the content to be parsed.
        hb - The SAX HandlerBase to use.
        Throws:
        IllegalArgumentException - If the given InputStream is null.
        SAXException - If parse produces a SAX error.
        IOException - If an IO error occurs interacting with the InputStream.
        See Also:
        DocumentHandler

      • parse

        public void parse(InputStream is,
                  HandlerBase hb,
                  String systemId)
           throws SAXException,
                  IOException

        Parse the content of the given InputStream instance as XML using the specified HandlerBase. Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0.

        Parameters:
        is - InputStream containing the content to be parsed.
        hb - The SAX HandlerBase to use.
        systemId - The systemId which is needed for resolving relative URIs.
        Throws:
        IllegalArgumentException - If the given InputStream is null.
        IOException - If any IO error occurs interacting with the InputStream.
        SAXException - If any SAX errors occur during processing.
        See Also:
        version of this method instead.

      • parse

        public void parse(InputStream is,
                  DefaultHandler dh)
           throws SAXException,
                  IOException
        Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
        Parameters:
        is - InputStream containing the content to be parsed.
        dh - The SAX DefaultHandler to use.
        Throws:
        IllegalArgumentException - If the given InputStream is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(InputStream is,
                  DefaultHandler dh,
                  String systemId)
           throws SAXException,
                  IOException
        Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
        Parameters:
        is - InputStream containing the content to be parsed.
        dh - The SAX DefaultHandler to use.
        systemId - The systemId which is needed for resolving relative URIs.
        Throws:
        IllegalArgumentException - If the given InputStream is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        version of this method instead.

      • parse

        public void parse(String uri,
                  HandlerBase hb)
           throws SAXException,
                  IOException
        Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified HandlerBase. Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
        Parameters:
        uri - The location of the content to be parsed.
        hb - The SAX HandlerBase to use.
        Throws:
        IllegalArgumentException - If the uri is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(String uri,
                  DefaultHandler dh)
           throws SAXException,
                  IOException
        Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified DefaultHandler.
        Parameters:
        uri - The location of the content to be parsed.
        dh - The SAX DefaultHandler to use.
        Throws:
        IllegalArgumentException - If the uri is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(File f,
                  HandlerBase hb)
           throws SAXException,
                  IOException
        Parse the content of the file specified as XML using the specified HandlerBase. Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
        Parameters:
        f - The file containing the XML to parse
        hb - The SAX HandlerBase to use.
        Throws:
        IllegalArgumentException - If the File object is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(File f,
                  DefaultHandler dh)
           throws SAXException,
                  IOException
        Parse the content of the file specified as XML using the specified DefaultHandler.
        Parameters:
        f - The file containing the XML to parse
        dh - The SAX DefaultHandler to use.
        Throws:
        IllegalArgumentException - If the File object is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(InputSource is,
                  HandlerBase hb)
           throws SAXException,
                  IOException
        Parse the content given InputSource as XML using the specified HandlerBase. Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
        Parameters:
        is - The InputSource containing the content to be parsed.
        hb - The SAX HandlerBase to use.
        Throws:
        IllegalArgumentException - If the InputSource object is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • parse

        public void parse(InputSource is,
                  DefaultHandler dh)
           throws SAXException,
                  IOException
        Parse the content given InputSource as XML using the specified DefaultHandler.
        Parameters:
        is - The InputSource containing the content to be parsed.
        dh - The SAX DefaultHandler to use.
        Throws:
        IllegalArgumentException - If the InputSource object is null.
        IOException - If any IO errors occur.
        SAXException - If any SAX errors occur during processing.
        See Also:
        DocumentHandler

      • getParser

        public abstract Parser getParser()
                          throws SAXException
        Returns the SAX parser that is encapsultated by the implementation of this class.
        Returns:
        The SAX parser that is encapsultated by the implementation of this class.
        Throws:
        SAXException - If any SAX errors occur during processing.

      • getXMLReader

        public abstract XMLReader getXMLReader()
                                throws SAXException
        Returns the XMLReader that is encapsulated by the implementation of this class.
        Returns:
        The XMLReader that is encapsulated by the implementation of this class.
        Throws:
        SAXException - If any SAX errors occur during processing.

      • isNamespaceAware

        public abstract boolean isNamespaceAware()
        Indicates whether or not this parser is configured to understand namespaces.
        Returns:
        true if this parser is configured to understand namespaces; false otherwise.

      • isValidating

        public abstract boolean isValidating()
        Indicates whether or not this parser is configured to validate XML documents.
        Returns:
        true if this parser is configured to validate XML documents; false otherwise.

      • setProperty

        public abstract void setProperty(String name,
                                 Object value)
                          throws SAXNotRecognizedException,
                                 SAXNotSupportedException

        Sets the particular property in the underlying implementation of XMLReader. A list of the core features and properties can be found at http://sax.sourceforge.net/?selected=get-set.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD and XMLConstants.ACCESS_EXTERNAL_SCHEMA properties.

        • Setting the XMLConstants.ACCESS_EXTERNAL_DTD property restricts the access to external DTDs, external Entity References to the protocols specified by the property. If access is denied during parsing due to the restriction of this property, SAXException will be thrown by the parse methods defined by SAXParser.

          Setting the XMLConstants.ACCESS_EXTERNAL_SCHEMA property restricts the access to external Schema set by the schemaLocation attribute to the protocols specified by the property. If access is denied during parsing due to the restriction of this property, SAXException will be thrown by the parse methods defined by the SAXParser.

        Parameters:
        name - The name of the property to be set.
        value - The value of the property to be set.
        Throws:
        SAXNotRecognizedException - When the underlying XMLReader does not recognize the property name.
        SAXNotSupportedException - When the underlying XMLReader recognizes the property name but doesn't support the property.
        See Also:
        XMLReader.setProperty(java.lang.String, java.lang.Object)

      • getProperty

        public abstract Object getProperty(String name)
                            throws SAXNotRecognizedException,
                                   SAXNotSupportedException

        Returns the particular property requested for in the underlying implementation of XMLReader.

        Parameters:
        name - The name of the property to be retrieved.
        Returns:
        Value of the requested property.
        Throws:
        SAXNotRecognizedException - When the underlying XMLReader does not recognize the property name.
        SAXNotSupportedException - When the underlying XMLReader recognizes the property name but doesn't support the property.
        See Also:
        XMLReader.getProperty(java.lang.String)

      • getSchema

        public Schema getSchema()

        Get a reference to the the Schema being used by the XML processor.

        If no schema is being used, null is returned.

        Returns:
        Schema being used or null if none in use
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5

      • isXIncludeAware

        public boolean isXIncludeAware()

        Get the XInclude processing mode for this parser.

        Returns:
        the return value of the SAXParserFactory.isXIncludeAware() when this parser was created from factory.
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5
        See Also:
        SAXParserFactory.setXIncludeAware(boolean)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXParserFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.parsers

Class SAXParserFactory

  • java.lang.Object
    • javax.xml.parsers.SAXParserFactory

  • public abstract class SAXParserFactory
extends Object
    Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
    Version:
    $Revision: 1.9 $, $Date: 2010/05/25 16:19:44 $

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SAXParserFactory()
      Protected constructor to force use of newInstance().

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract boolean getFeature(String name)
      Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
      Schema getSchema()
      Gets the Schema object specified through the setSchema(Schema schema) method.
      boolean isNamespaceAware()
      Indicates whether or not the factory is configured to produce parsers which are namespace aware.
      boolean isValidating()
      Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
      boolean isXIncludeAware()
      Get state of XInclude processing.
      static SAXParserFactory newInstance()
      Obtain a new instance of a SAXParserFactory.
      static SAXParserFactory newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a SAXParserFactory from class name.
      abstract SAXParser newSAXParser()
      Creates a new instance of a SAXParser using the currently configured factory parameters.
      abstract void setFeature(String name, boolean value)
      Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.
      void setNamespaceAware(boolean awareness)
      Specifies that the parser produced by this code will provide support for XML namespaces.
      void setSchema(Schema schema)
      Set the Schema to be used by parsers created from this factory.
      void setValidating(boolean validating)
      Specifies that the parser produced by this code will validate documents as they are parsed.
      void setXIncludeAware(boolean state)
      Set state of XInclude processing.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SAXParserFactory

        protected SAXParserFactory()

        Protected constructor to force use of newInstance().

    • Method Detail

      • newInstance

        public static SAXParserFactory newInstance()
        Obtain a new instance of a SAXParserFactory. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the SAXParserFactory implementation class to load:
        • Use the javax.xml.parsers.SAXParserFactory system property.
        • Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. The jaxp.properties file is read only once by the JAXP implementation and it's values are then cached for future use. If the file does not exist when the first attempt is made to read from it, no further attempts are made to check for its existence. It is not possible to change the value of any property in jaxp.properties after it has been read for the first time.
        • Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise the system-default implementation is returned.
        Once an application has obtained a reference to a SAXParserFactory it can use the factory to configure and obtain parser instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems loading SAXParsers, try:

         java -Djaxp.debug=1 YourProgram ....
        Returns:
        A new instance of a SAXParserFactory.
        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static SAXParserFactory newInstance(String factoryClassName,
                                           ClassLoader classLoader)

        Obtain a new instance of a SAXParserFactory from class name. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Once an application has obtained a reference to a SAXParserFactory it can use the factory to configure and obtain parser instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems, try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.parsers.SAXParserFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        New instance of a SAXParserFactory
        Throws:
        FactoryConfigurationError - if factoryClassName is null, or the factory class cannot be loaded, instantiated.
        Since:
        1.6
        See Also:
        newInstance()

      • newSAXParser

        public abstract SAXParser newSAXParser()
                                throws ParserConfigurationException,
                                       SAXException

        Creates a new instance of a SAXParser using the currently configured factory parameters.

        Returns:
        A new instance of a SAXParser.
        Throws:
        ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
        SAXException - for SAX errors.

      • setNamespaceAware

        public void setNamespaceAware(boolean awareness)
        Specifies that the parser produced by this code will provide support for XML namespaces. By default the value of this is set to false.
        Parameters:
        awareness - true if the parser produced by this code will provide support for XML namespaces; false otherwise.

      • setValidating

        public void setValidating(boolean validating)
        Specifies that the parser produced by this code will validate documents as they are parsed. By default the value of this is set to false.

        Note that "the validation" here means a validating parser as defined in the XML recommendation. In other words, it essentially just controls the DTD validation. (except the legacy two properties defined in JAXP 1.2.)

        To use modern schema languages such as W3C XML Schema or RELAX NG instead of DTD, you can configure your parser to be a non-validating parser by leaving the setValidating(boolean) method false, then use the setSchema(Schema) method to associate a schema to a parser.

        Parameters:
        validating - true if the parser produced by this code will validate documents as they are parsed; false otherwise.

      • isNamespaceAware

        public boolean isNamespaceAware()
        Indicates whether or not the factory is configured to produce parsers which are namespace aware.
        Returns:
        true if the factory is configured to produce parsers which are namespace aware; false otherwise.

      • isValidating

        public boolean isValidating()
        Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
        Returns:
        true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.

      • setFeature

        public abstract void setFeature(String name,
                                boolean value)
                         throws ParserConfigurationException,
                                SAXNotRecognizedException,
                                SAXNotSupportedException

        Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. A list of the core features and properties can be found at http://www.saxproject.org/

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is

        • true: the implementation will limit XML processing to conform to implementation limits. Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorHandler.fatalError(SAXParseException exception). See SAXParser parse methods for handler specification.
        • When the feature is false, the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
        Parameters:
        name - The name of the feature to be set.
        value - The value of the feature to be set.
        Throws:
        ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
        SAXNotRecognizedException - When the underlying XMLReader does not recognize the property name.
        SAXNotSupportedException - When the underlying XMLReader recognizes the property name but doesn't support the property.
        NullPointerException - If the name parameter is null.
        See Also:
        XMLReader.setFeature(java.lang.String, boolean)

      • getFeature

        public abstract boolean getFeature(String name)
                            throws ParserConfigurationException,
                                   SAXNotRecognizedException,
                                   SAXNotSupportedException

        Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

        Parameters:
        name - The name of the property to be retrieved.
        Returns:
        Value of the requested property.
        Throws:
        ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
        SAXNotRecognizedException - When the underlying XMLReader does not recognize the property name.
        SAXNotSupportedException - When the underlying XMLReader recognizes the property name but doesn't support the property.
        See Also:
        XMLReader.getProperty(java.lang.String)

      • getSchema

        public Schema getSchema()
        Gets the Schema object specified through the setSchema(Schema schema) method.
        Returns:
        the Schema object that was last set through the setSchema(Schema) method, or null if the method was not invoked since a SAXParserFactory is created.
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5

      • setSchema

        public void setSchema(Schema schema)

        Set the Schema to be used by parsers created from this factory.

        When a Schema is non-null, a parser will use a validator created from it to validate documents before it passes information down to the application.

        When warnings/errors/fatal errors are found by the validator, the parser must handle them as if those errors were found by the parser itself. In other words, if the user-specified ErrorHandler is set, it must receive those errors, and if not, they must be treated according to the implementation specific default error handling rules.

        A validator may modify the SAX event stream (for example by adding default values that were missing in documents), and a parser is responsible to make sure that the application will receive those modified event stream.

        Initialy, null is set as the Schema.

        This processing will take effect even if the isValidating() method returns false.

        It is an error to use the http://java.sun.com/xml/jaxp/properties/schemaSource property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage property in conjunction with a non-null Schema object. Such configuration will cause a SAXException exception when those properties are set on a SAXParser.

        Note for implementors

        A parser must be able to work with any Schema implementation. However, parsers and schemas are allowed to use implementation-specific custom mechanisms as long as they yield the result described in the specification.

        Parameters:
        schema - Schema to use, null to remove a schema.
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5

      • setXIncludeAware

        public void setXIncludeAware(boolean state)

        Set state of XInclude processing.

        If XInclude markup is found in the document instance, should it be processed as specified in XML Inclusions (XInclude) Version 1.0.

        XInclude processing defaults to false.

        Parameters:
        state - Set XInclude processing to true or false
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5

      • isXIncludeAware

        public boolean isXIncludeAware()

        Get state of XInclude processing.

        Returns:
        current state of XInclude processing
        Throws:
        UnsupportedOperationException - When implementation does not override this method
        Since:
        1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.soap

Provides the API for creating and building SOAP messages.

See: Description

  • Interface Summary
    Interface Description
    Detail
    A container for DetailEntry objects.
    DetailEntry
    The content for a Detail object, giving details for a SOAPFault object.
    Name
    A representation of an XML name.
    Node
    A representation of a node (element) in an XML document.
    SOAPBody
    An object that represents the contents of the SOAP body element in a SOAP message.
    SOAPBodyElement
    A SOAPBodyElement object represents the contents in a SOAPBody object.
    SOAPConstants
    The definition of constants pertaining to the SOAP protocol.
    SOAPElement
    An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
    SOAPEnvelope
    The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
    SOAPFault
    An element in the SOAPBody object that contains error and/or status information.
    SOAPFaultElement
    A representation of the contents in a SOAPFault object.
    SOAPHeader
    A representation of the SOAP header element.
    SOAPHeaderElement
    An object representing the contents in the SOAP header part of the SOAP envelope.
    Text
    A representation of a node whose value is text.
  • Class Summary
    Class Description
    AttachmentPart
    A single attachment to a SOAPMessage object.
    MessageFactory
    A factory for creating SOAPMessage objects.
    MimeHeader
    An object that stores a MIME header name and its value.
    MimeHeaders
    A container for MimeHeader objects, which represent the MIME headers present in a MIME part of a message.
    SAAJMetaFactory
    The access point for the implementation classes of the factories defined in the SAAJ API.
    SAAJResult
    Acts as a holder for the results of a JAXP transformation or a JAXB marshalling, in the form of a SAAJ tree.
    SOAPConnection
    A point-to-point connection that a client can use for sending messages directly to a remote party (represented by a URL, for instance).
    SOAPConnectionFactory
    A factory for creating SOAPConnection objects.
    SOAPElementFactory Deprecated
    - Use javax.xml.soap.SOAPFactory for creating SOAPElements.
    SOAPFactory
    SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
    SOAPMessage
    The root class for all SOAP messages.
    SOAPPart
    The container for the SOAP-specific portion of a SOAPMessage object.
  • Exception Summary
    Exception Description
    SOAPException
    An exception that signals that a SOAP exception has occurred.

Package javax.xml.soap Description

Provides the API for creating and building SOAP messages. This package is defined in the SOAP with Attachments API for JavaTM (SAAJ) 1.3 specification.

The API in the javax.xml.soap package allows you to do the following:

  • create a point-to-point connection to a specified endpoint
  • create a SOAP message
  • create an XML fragment
  • add content to the header of a SOAP message
  • add content to the body of a SOAP message
  • create attachment parts and add content to them
  • access/add/modify parts of a SOAP message
  • create/add/modify SOAP fault information
  • extract content from a SOAP message
  • send a SOAP request-response message

In addition the APIs in the javax.xml.soap package extend their counterparts in the org.w3c.dom package. This means that the SOAPPart of a SOAPMessage is also a DOM Level 2 Document, and can be manipulated as such by applications, tools and libraries that use DOM (see http://www.w3.org/DOM/ for more information). It is important to note that, while it is possible to use DOM APIs to add ordinary DOM nodes to a SAAJ tree, the SAAJ APIs are still required to return SAAJ types when examining or manipulating the tree. In order to accomplish this the SAAJ APIs (specifically SOAPElement.getChildElements()) are allowed to silently replace objects that are incorrectly typed relative to SAAJ requirements with equivalent objects of the required type. These replacements must never cause the logical structure of the tree to change, so from the perspective of the DOM APIs the tree will remain unchanged. However, the physical composition of the tree will have changed so that references to the nodes that were replaced will refer to nodes that are no longer a part of the tree. The SAAJ APIs are not allowed to make these replacements if they are not required so the replacement objects will never subsequently be silently replaced by future calls to the SAAJ API.

What this means in practical terms is that an application that starts to use SAAJ APIs on a tree after manipulating it using DOM APIs must assume that the tree has been translated into an all SAAJ tree and that any references to objects within the tree that were obtained using DOM APIs are no longer valid. Switching from SAAJ APIs to DOM APIs is not allowed to cause invalid references and neither is using SAAJ APIs exclusively. It is only switching from using DOM APIs on a particular SAAJ tree to using SAAJ APIs that causes the risk of invalid references.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DetailEntry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface DetailEntry

  • All Superinterfaces:
    Element, Node, SOAPElement

    public interface DetailEntry
extends SOAPElement
    The content for a Detail object, giving details for a SOAPFault object. A DetailEntry object, which carries information about errors related to the SOAPBody object that contains it, is application-specific.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.soap Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.soap

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.soap.AttachmentPart
    • javax.xml.transform.dom.DOMResult (implements javax.xml.transform.Result)
      • javax.xml.soap.SAAJResult
    • javax.xml.soap.MessageFactory
    • javax.xml.soap.MimeHeader
    • javax.xml.soap.MimeHeaders
    • javax.xml.soap.SAAJMetaFactory
    • javax.xml.soap.SOAPConnection
    • javax.xml.soap.SOAPConnectionFactory
    • javax.xml.soap.SOAPElementFactory
    • javax.xml.soap.SOAPFactory
    • javax.xml.soap.SOAPMessage
    • javax.xml.soap.SOAPPart (implements org.w3c.dom.Document, javax.xml.soap.Node)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.soap.SOAPException

Interface Hierarchy

  • javax.xml.soap.Name
  • org.w3c.dom.Node
    • org.w3c.dom.CharacterData
      • org.w3c.dom.Text
        • javax.xml.soap.Text (also extends javax.xml.soap.Node)
    • org.w3c.dom.Element
      • javax.xml.soap.SOAPElement (also extends javax.xml.soap.Node)
        • javax.xml.soap.DetailEntry
        • javax.xml.soap.SOAPBody
        • javax.xml.soap.SOAPBodyElement
          • javax.xml.soap.SOAPFault
        • javax.xml.soap.SOAPEnvelope
        • javax.xml.soap.SOAPFaultElement
          • javax.xml.soap.Detail
        • javax.xml.soap.SOAPHeader
        • javax.xml.soap.SOAPHeaderElement
    • javax.xml.soap.Node
      • javax.xml.soap.SOAPElement (also extends org.w3c.dom.Element)
        • javax.xml.soap.DetailEntry
        • javax.xml.soap.SOAPBody
        • javax.xml.soap.SOAPBodyElement
          • javax.xml.soap.SOAPFault
        • javax.xml.soap.SOAPEnvelope
        • javax.xml.soap.SOAPFaultElement
          • javax.xml.soap.Detail
        • javax.xml.soap.SOAPHeader
        • javax.xml.soap.SOAPHeaderElement
      • javax.xml.soap.Text (also extends org.w3c.dom.Text)
  • javax.xml.soap.SOAPConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPBodyElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPBodyElement

  • All Superinterfaces:
    Element, Node, SOAPElement
    All Known Subinterfaces:
    SOAPFault

    public interface SOAPBodyElement
extends SOAPElement
    A SOAPBodyElement object represents the contents in a SOAPBody object. The SOAPFault interface is a SOAPBodyElement object that has been defined.

    A new SOAPBodyElement object can be created and added to a SOAPBody object with the SOAPBody method addBodyElement. In the following line of code, sb is a SOAPBody object, and myName is a Name object.

        SOAPBodyElement sbe = sb.addBodyElement(myName);

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPFaultElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPFaultElement

  • All Superinterfaces:
    Element, Node, SOAPElement
    All Known Subinterfaces:
    Detail

    public interface SOAPFaultElement
extends SOAPElement
    A representation of the contents in a SOAPFault object. The Detail interface is a SOAPFaultElement.

    Content is added to a SOAPFaultElement using the SOAPElement method addTextNode.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.soap

  • Packages that use javax.xml.soap
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.
  • Classes in javax.xml.soap used by javax.xml.soap
    Class and Description
    AttachmentPart
    A single attachment to a SOAPMessage object.
    Detail
    A container for DetailEntry objects.
    DetailEntry
    The content for a Detail object, giving details for a SOAPFault object.
    MessageFactory
    A factory for creating SOAPMessage objects.
    MimeHeaders
    A container for MimeHeader objects, which represent the MIME headers present in a MIME part of a message.
    Name
    A representation of an XML name.
    Node
    A representation of a node (element) in an XML document.
    SOAPBody
    An object that represents the contents of the SOAP body element in a SOAP message.
    SOAPBodyElement
    A SOAPBodyElement object represents the contents in a SOAPBody object.
    SOAPConnection
    A point-to-point connection that a client can use for sending messages directly to a remote party (represented by a URL, for instance).
    SOAPConnectionFactory
    A factory for creating SOAPConnection objects.
    SOAPElement
    An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
    SOAPElementFactory
    Deprecated.
    - Use javax.xml.soap.SOAPFactory for creating SOAPElements.
    SOAPEnvelope
    The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
    SOAPException
    An exception that signals that a SOAP exception has occurred.
    SOAPFactory
    SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
    SOAPFault
    An element in the SOAPBody object that contains error and/or status information.
    SOAPFaultElement
    A representation of the contents in a SOAPFault object.
    SOAPHeader
    A representation of the SOAP header element.
    SOAPHeaderElement
    An object representing the contents in the SOAP header part of the SOAP envelope.
    SOAPMessage
    The root class for all SOAP messages.
    SOAPPart
    The container for the SOAP-specific portion of a SOAPMessage object.
  • Classes in javax.xml.soap used by javax.xml.ws.handler.soap
    Class and Description
    SOAPMessage
    The root class for all SOAP messages.
  • Classes in javax.xml.soap used by javax.xml.ws.soap
    Class and Description
    MessageFactory
    A factory for creating SOAPMessage objects.
    SOAPFactory
    SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
    SOAPFault
    An element in the SOAPBody object that contains error and/or status information.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttachmentPart

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class AttachmentPart

  • java.lang.Object
    • javax.xml.soap.AttachmentPart

  • public abstract class AttachmentPart
extends Object
    A single attachment to a SOAPMessage object. A SOAPMessage object may contain zero, one, or many AttachmentPart objects. Each AttachmentPart object consists of two parts, application-specific content and associated MIME headers. The MIME headers consists of name/value pairs that can be used to identify and describe the content.

    An AttachmentPart object must conform to certain standards.

    1. It must conform to MIME [RFC2045] standards
    2. It MUST contain content
    3. The header portion MUST include the following header:
      • Content-Type
        This header identifies the type of data in the content of an AttachmentPart object and MUST conform to [RFC2045]. The following is an example of a Content-Type header:
               Content-Type:  application/xml
        The following line of code, in which ap is an AttachmentPart object, sets the header shown in the previous example.
               ap.setMimeHeader("Content-Type", "application/xml");

    There are no restrictions on the content portion of an AttachmentPart object. The content may be anything from a simple plain text object to a complex XML document or image file.

    An AttachmentPart object is created with the method SOAPMessage.createAttachmentPart. After setting its MIME headers, the AttachmentPart object is added to the message that created it with the method SOAPMessage.addAttachmentPart.

    The following code fragment, in which m is a SOAPMessage object and contentStringl is a String, creates an instance of AttachmentPart, sets the AttachmentPart object with some content and header information, and adds the AttachmentPart object to the SOAPMessage object.

         AttachmentPart ap1 = m.createAttachmentPart();
     ap1.setContent(contentString1, "text/plain");
     m.addAttachmentPart(ap1);

    The following code fragment creates and adds a second AttachmentPart instance to the same message. jpegData is a binary byte buffer representing the jpeg file.

         AttachmentPart ap2 = m.createAttachmentPart();
     byte[] jpegData =  ...;
     ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg");
     m.addAttachmentPart(ap2);

    The getContent method retrieves the contents and header from an AttachmentPart object. Depending on the DataContentHandler objects present, the returned Object can either be a typed Java object corresponding to the MIME type or an InputStream object that contains the content as bytes.

         String content1 = ap1.getContent();
     java.io.InputStream content2 = ap2.getContent();
    The method clearContent removes all the content from an AttachmentPart object but does not affect its header information.
         ap1.clearContent();

    • Constructor Summary

      Constructors
      Constructor and Description
      AttachmentPart()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void addMimeHeader(String name, String value)
      Adds a MIME header with the specified name and value to this AttachmentPart object.
      abstract void clearContent()
      Clears out the content of this AttachmentPart object.
      abstract Iterator getAllMimeHeaders()
      Retrieves all the headers for this AttachmentPart object as an iterator over the MimeHeader objects.
      abstract InputStream getBase64Content()
      Returns an InputStream which can be used to obtain the content of AttachmentPart as Base64 encoded character data, this method would base64 encode the raw bytes of the attachment and return.
      abstract Object getContent()
      Gets the content of this AttachmentPart object as a Java object.
      String getContentId()
      Gets the value of the MIME header whose name is "Content-ID".
      String getContentLocation()
      Gets the value of the MIME header whose name is "Content-Location".
      String getContentType()
      Gets the value of the MIME header whose name is "Content-Type".
      abstract DataHandler getDataHandler()
      Gets the DataHandler object for this AttachmentPart object.
      abstract Iterator getMatchingMimeHeaders(String[] names)
      Retrieves all MimeHeader objects that match a name in the given array.
      abstract String[] getMimeHeader(String name)
      Gets all the values of the header identified by the given String.
      abstract Iterator getNonMatchingMimeHeaders(String[] names)
      Retrieves all MimeHeader objects whose name does not match a name in the given array.
      abstract InputStream getRawContent()
      Gets the content of this AttachmentPart object as an InputStream as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.
      abstract byte[] getRawContentBytes()
      Gets the content of this AttachmentPart object as a byte[] array as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.
      abstract int getSize()
      Returns the number of bytes in this AttachmentPart object.
      abstract void removeAllMimeHeaders()
      Removes all the MIME header entries.
      abstract void removeMimeHeader(String header)
      Removes all MIME headers that match the given name.
      abstract void setBase64Content(InputStream content, String contentType)
      Sets the content of this attachment part from the Base64 source InputStream and sets the value of the Content-Type header to the value contained in contentType, This method would first decode the base64 input and write the resulting raw bytes to the attachment.
      abstract void setContent(Object object, String contentType)
      Sets the content of this attachment part to that of the given Object and sets the value of the Content-Type header to the given type.
      void setContentId(String contentId)
      Sets the MIME header whose name is "Content-ID" with the given value.
      void setContentLocation(String contentLocation)
      Sets the MIME header whose name is "Content-Location" with the given value.
      void setContentType(String contentType)
      Sets the MIME header whose name is "Content-Type" with the given value.
      abstract void setDataHandler(DataHandler dataHandler)
      Sets the given DataHandler object as the data handler for this AttachmentPart object.
      abstract void setMimeHeader(String name, String value)
      Changes the first header entry that matches the given name to the given value, adding a new header if no existing header matches.
      abstract void setRawContent(InputStream content, String contentType)
      Sets the content of this attachment part to that contained by the InputStream content and sets the value of the Content-Type header to the value contained in contentType.
      abstract void setRawContentBytes(byte[] content, int offset, int len, String contentType)
      Sets the content of this attachment part to that contained by the byte[] array content and sets the value of the Content-Type header to the value contained in contentType.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttachmentPart

        public AttachmentPart()

    • Method Detail

      • getSize

        public abstract int getSize()
                     throws SOAPException
        Returns the number of bytes in this AttachmentPart object.
        Returns:
        the size of this AttachmentPart object in bytes or -1 if the size cannot be determined
        Throws:
        SOAPException - if the content of this attachment is corrupted of if there was an exception while trying to determine the size.

      • clearContent

        public abstract void clearContent()
        Clears out the content of this AttachmentPart object. The MIME header portion is left untouched.

      • getContent

        public abstract Object getContent()
                           throws SOAPException
        Gets the content of this AttachmentPart object as a Java object. The type of the returned Java object depends on (1) the DataContentHandler object that is used to interpret the bytes and (2) the Content-Type given in the header.

        For the MIME content types "text/plain", "text/html" and "text/xml", the DataContentHandler object does the conversions to and from the Java types corresponding to the MIME types. For other MIME types,the DataContentHandler object can return an InputStream object that contains the content data as raw bytes.

        A SAAJ-compliant implementation must, as a minimum, return a java.lang.String object corresponding to any content stream with a Content-Type value of text/plain, a javax.xml.transform.stream.StreamSource object corresponding to a content stream with a Content-Type value of text/xml, a java.awt.Image object corresponding to a content stream with a Content-Type value of image/gif or image/jpeg. For those content types that an installed DataContentHandler object does not understand, the DataContentHandler object is required to return a java.io.InputStream object with the raw bytes.

        Returns:
        a Java object with the content of this AttachmentPart object
        Throws:
        SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error

      • getRawContent

        public abstract InputStream getRawContent()
                                   throws SOAPException
        Gets the content of this AttachmentPart object as an InputStream as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.

        Note that reading from the returned InputStream would result in consuming the data in the stream. It is the responsibility of the caller to reset the InputStream appropriately before calling a Subsequent API. If a copy of the raw attachment content is required then the getRawContentBytes() API should be used instead.

        Returns:
        an InputStream from which the raw data contained by the AttachmentPart can be accessed.
        Throws:
        SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
        Since:
        SAAJ 1.3
        See Also:
        getRawContentBytes()

      • getRawContentBytes

        public abstract byte[] getRawContentBytes()
                                   throws SOAPException
        Gets the content of this AttachmentPart object as a byte[] array as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.
        Returns:
        a byte[] array containing the raw data of the AttachmentPart.
        Throws:
        SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
        Since:
        SAAJ 1.3

      • getBase64Content

        public abstract InputStream getBase64Content()
                                      throws SOAPException
        Returns an InputStream which can be used to obtain the content of AttachmentPart as Base64 encoded character data, this method would base64 encode the raw bytes of the attachment and return.
        Returns:
        an InputStream from which the Base64 encoded AttachmentPart can be read.
        Throws:
        SOAPException - if there is no content set into this AttachmentPart object or if there was a data transformation error.
        Since:
        SAAJ 1.3

      • setContent

        public abstract void setContent(Object object,
                                String contentType)
        Sets the content of this attachment part to that of the given Object and sets the value of the Content-Type header to the given type. The type of the Object should correspond to the value given for the Content-Type. This depends on the particular set of DataContentHandler objects in use.
        Parameters:
        object - the Java object that makes up the content for this attachment part
        contentType - the MIME string that specifies the type of the content
        Throws:
        IllegalArgumentException - may be thrown if the contentType does not match the type of the content object, or if there was no DataContentHandler object for this content object
        See Also:
        getContent()

      • setRawContent

        public abstract void setRawContent(InputStream content,
                                   String contentType)
                            throws SOAPException
        Sets the content of this attachment part to that contained by the InputStream content and sets the value of the Content-Type header to the value contained in contentType.

        A subsequent call to getSize() may not be an exact measure of the content size.

        Parameters:
        content - the raw data to add to the attachment part
        contentType - the value to set into the Content-Type header
        Throws:
        SOAPException - if an there is an error in setting the content
        NullPointerException - if content is null
        Since:
        SAAJ 1.3

      • setRawContentBytes

        public abstract void setRawContentBytes(byte[] content,
                                        int offset,
                                        int len,
                                        String contentType)
                                 throws SOAPException
        Sets the content of this attachment part to that contained by the byte[] array content and sets the value of the Content-Type header to the value contained in contentType.
        Parameters:
        content - the raw data to add to the attachment part
        contentType - the value to set into the Content-Type header
        offset - the offset in the byte array of the content
        len - the number of bytes that form the content
        Throws:
        SOAPException - if an there is an error in setting the content or content is null
        Since:
        SAAJ 1.3

      • setBase64Content

        public abstract void setBase64Content(InputStream content,
                                      String contentType)
                               throws SOAPException
        Sets the content of this attachment part from the Base64 source InputStream and sets the value of the Content-Type header to the value contained in contentType, This method would first decode the base64 input and write the resulting raw bytes to the attachment.

        A subsequent call to getSize() may not be an exact measure of the content size.

        Parameters:
        content - the base64 encoded data to add to the attachment part
        contentType - the value to set into the Content-Type header
        Throws:
        SOAPException - if an there is an error in setting the content
        NullPointerException - if content is null
        Since:
        SAAJ 1.3

      • getDataHandler

        public abstract DataHandler getDataHandler()
                                    throws SOAPException
        Gets the DataHandler object for this AttachmentPart object.
        Returns:
        the DataHandler object associated with this AttachmentPart object
        Throws:
        SOAPException - if there is no data in this AttachmentPart object

      • setDataHandler

        public abstract void setDataHandler(DataHandler dataHandler)
        Sets the given DataHandler object as the data handler for this AttachmentPart object. Typically, on an incoming message, the data handler is automatically set. When a message is being created and populated with content, the setDataHandler method can be used to get data from various data sources into the message.
        Parameters:
        dataHandler - the DataHandler object to be set
        Throws:
        IllegalArgumentException - if there was a problem with the specified DataHandler object

      • getContentId

        public String getContentId()
        Gets the value of the MIME header whose name is "Content-ID".
        Returns:
        a String giving the value of the "Content-ID" header or null if there is none
        See Also:
        setContentId(java.lang.String)

      • getContentLocation

        public String getContentLocation()
        Gets the value of the MIME header whose name is "Content-Location".
        Returns:
        a String giving the value of the "Content-Location" header or null if there is none

      • getContentType

        public String getContentType()
        Gets the value of the MIME header whose name is "Content-Type".
        Returns:
        a String giving the value of the "Content-Type" header or null if there is none

      • setContentId

        public void setContentId(String contentId)
        Sets the MIME header whose name is "Content-ID" with the given value.
        Parameters:
        contentId - a String giving the value of the "Content-ID" header
        Throws:
        IllegalArgumentException - if there was a problem with the specified contentId value
        See Also:
        getContentId()

      • setContentLocation

        public void setContentLocation(String contentLocation)
        Sets the MIME header whose name is "Content-Location" with the given value.
        Parameters:
        contentLocation - a String giving the value of the "Content-Location" header
        Throws:
        IllegalArgumentException - if there was a problem with the specified content location

      • setContentType

        public void setContentType(String contentType)
        Sets the MIME header whose name is "Content-Type" with the given value.
        Parameters:
        contentType - a String giving the value of the "Content-Type" header
        Throws:
        IllegalArgumentException - if there was a problem with the specified content type

      • removeMimeHeader

        public abstract void removeMimeHeader(String header)
        Removes all MIME headers that match the given name.
        Parameters:
        header - the string name of the MIME header/s to be removed

      • removeAllMimeHeaders

        public abstract void removeAllMimeHeaders()
        Removes all the MIME header entries.

      • getMimeHeader

        public abstract String[] getMimeHeader(String name)
        Gets all the values of the header identified by the given String.
        Parameters:
        name - the name of the header; example: "Content-Type"
        Returns:
        a String array giving the value for the specified header
        See Also:
        setMimeHeader(java.lang.String, java.lang.String)

      • setMimeHeader

        public abstract void setMimeHeader(String name,
                                   String value)
        Changes the first header entry that matches the given name to the given value, adding a new header if no existing header matches. This method also removes all matching headers but the first.

        Note that RFC822 headers can only contain US-ASCII characters.

        Parameters:
        name - a String giving the name of the header for which to search
        value - a String giving the value to be set for the header whose name matches the given name
        Throws:
        IllegalArgumentException - if there was a problem with the specified mime header name or value

      • addMimeHeader

        public abstract void addMimeHeader(String name,
                                   String value)
        Adds a MIME header with the specified name and value to this AttachmentPart object.

        Note that RFC822 headers can contain only US-ASCII characters.

        Parameters:
        name - a String giving the name of the header to be added
        value - a String giving the value of the header to be added
        Throws:
        IllegalArgumentException - if there was a problem with the specified mime header name or value

      • getAllMimeHeaders

        public abstract Iterator getAllMimeHeaders()
        Retrieves all the headers for this AttachmentPart object as an iterator over the MimeHeader objects.
        Returns:
        an Iterator object with all of the Mime headers for this AttachmentPart object

      • getMatchingMimeHeaders

        public abstract Iterator getMatchingMimeHeaders(String[] names)
        Retrieves all MimeHeader objects that match a name in the given array.
        Parameters:
        names - a String array with the name(s) of the MIME headers to be returned
        Returns:
        all of the MIME headers that match one of the names in the given array as an Iterator object

      • getNonMatchingMimeHeaders

        public abstract Iterator getNonMatchingMimeHeaders(String[] names)
        Retrieves all MimeHeader objects whose name does not match a name in the given array.
        Parameters:
        names - a String array with the name(s) of the MIME headers not to be returned
        Returns:
        all of the MIME headers in this AttachmentPart object except those that match one of the names in the given array. The nonmatching MIME headers are returned as an Iterator object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.AttachmentPart

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.AttachmentPart

  • Packages that use AttachmentPart
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of AttachmentPart in javax.xml.soap

      Methods in javax.xml.soap that return AttachmentPart
      Modifier and Type Method and Description
      abstract AttachmentPart SOAPMessage.createAttachmentPart()
      Creates a new empty AttachmentPart object.
      AttachmentPart SOAPMessage.createAttachmentPart(DataHandler dataHandler)
      Creates an AttachmentPart object and populates it using the given DataHandler object.
      AttachmentPart SOAPMessage.createAttachmentPart(Object content, String contentType)
      Creates an AttachmentPart object and populates it with the specified data of the specified content type.
      abstract AttachmentPart SOAPMessage.getAttachment(SOAPElement element)
      Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists.
      Methods in javax.xml.soap with parameters of type AttachmentPart
      Modifier and Type Method and Description
      abstract void SOAPMessage.addAttachmentPart(AttachmentPart AttachmentPart)
      Adds the given AttachmentPart object to this SOAPMessage object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.MessageFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.MessageFactory

  • Packages that use MessageFactory
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of MessageFactory in javax.xml.soap

      Methods in javax.xml.soap that return MessageFactory
      Modifier and Type Method and Description
      static MessageFactory MessageFactory.newInstance()
      Creates a new MessageFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load: Use the javax.xml.soap.MessageFactory system property.
      static MessageFactory MessageFactory.newInstance(String protocol)
      Creates a new MessageFactory object that is an instance of the specified implementation.
      protected abstract MessageFactory SAAJMetaFactory.newMessageFactory(String protocol)
      Creates a MessageFactory object for the given String protocol.

    • Uses of MessageFactory in javax.xml.ws.soap

      Methods in javax.xml.ws.soap that return MessageFactory
      Modifier and Type Method and Description
      MessageFactory SOAPBinding.getMessageFactory()
      Gets the SAAJ MessageFactory instance used by this SOAP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.MimeHeader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.MimeHeader

No usage of javax.xml.soap.MimeHeader
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.MimeHeaders

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.MimeHeaders

  • Packages that use MimeHeaders
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of MimeHeaders in javax.xml.soap

      Methods in javax.xml.soap that return MimeHeaders
      Modifier and Type Method and Description
      abstract MimeHeaders SOAPMessage.getMimeHeaders()
      Returns all the transport-specific MIME headers for this SOAPMessage object in a transport-independent fashion.
      Methods in javax.xml.soap with parameters of type MimeHeaders
      Modifier and Type Method and Description
      abstract SOAPMessage MessageFactory.createMessage(MimeHeaders headers, InputStream in)
      Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.
      abstract Iterator SOAPMessage.getAttachments(MimeHeaders headers)
      Retrieves all the AttachmentPart objects that have header entries that match the specified headers.
      abstract void SOAPMessage.removeAttachments(MimeHeaders headers)
      Removes all the AttachmentPart objects that have header entries that match the specified headers.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SAAJMetaFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SAAJMetaFactory

No usage of javax.xml.soap.SAAJMetaFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SAAJResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SAAJResult

No usage of javax.xml.soap.SAAJResult
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPConnection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPConnection

  • Packages that use SOAPConnection
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPConnection in javax.xml.soap

      Methods in javax.xml.soap that return SOAPConnection
      Modifier and Type Method and Description
      abstract SOAPConnection SOAPConnectionFactory.createConnection()
      Create a new SOAPConnection.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPConnectionFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPConnectionFactory

  • Packages that use SOAPConnectionFactory
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPConnectionFactory in javax.xml.soap

      Methods in javax.xml.soap that return SOAPConnectionFactory
      Modifier and Type Method and Description
      static SOAPConnectionFactory SOAPConnectionFactory.newInstance()
      Creates an instance of the default SOAPConnectionFactory object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPElementFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPElementFactory

  • Packages that use SOAPElementFactory
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPElementFactory in javax.xml.soap

      Methods in javax.xml.soap that return SOAPElementFactory
      Modifier and Type Method and Description
      static SOAPElementFactory SOAPElementFactory.newInstance()
      Deprecated.
      Creates a new instance of SOAPElementFactory.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPException

  • Packages that use SOAPException
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPException in javax.xml.soap

      Methods in javax.xml.soap that throw SOAPException
      Modifier and Type Method and Description
      SOAPElement SOAPElement.addAttribute(Name name, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPElement SOAPElement.addAttribute(QName qname, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPBody SOAPEnvelope.addBody()
      Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.
      SOAPBodyElement SOAPBody.addBodyElement(Name name)
      Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
      SOAPBodyElement SOAPBody.addBodyElement(QName qname)
      Creates a new SOAPBodyElement object with the specified QName and adds it to this SOAPBody object.
      SOAPElement SOAPElement.addChildElement(Name name)
      Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(QName qname)
      Creates a new SOAPElement object initialized with the given QName object and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(SOAPElement element)
      Add a SOAPElement as a child of this SOAPElement instance.
      SOAPElement SOAPElement.addChildElement(String localName)
      Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(String localName, String prefix)
      Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object.
      Detail SOAPFault.addDetail()
      Creates an optional Detail object and sets it as the Detail object for this SOAPFault object.
      DetailEntry Detail.addDetailEntry(Name name)
      Creates a new DetailEntry object with the given name and adds it to this Detail object.
      DetailEntry Detail.addDetailEntry(QName qname)
      Creates a new DetailEntry object with the given QName and adds it to this Detail object.
      SOAPBodyElement SOAPBody.addDocument(Document document)
      Adds the root node of the DOM Document to this SOAPBody object.
      SOAPFault SOAPBody.addFault()
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      void SOAPFault.addFaultReasonText(String text, Locale locale)
      Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived from locale.
      SOAPHeader SOAPEnvelope.addHeader()
      Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.
      SOAPHeaderElement SOAPHeader.addHeaderElement(Name name)
      Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addHeaderElement(QName qname)
      Creates a new SOAPHeaderElement object initialized with the specified qname and adds it to this SOAPHeader object.
      SOAPElement SOAPElement.addNamespaceDeclaration(String prefix, String uri)
      Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
      SOAPHeaderElement SOAPHeader.addNotUnderstoodHeaderElement(QName name)
      Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPElement SOAPElement.addTextNode(String text)
      Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(Iterator supportedSOAPURIs)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(String supportedSoapUri)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified supported SOAP URI and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(String[] supportedSoapUris)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified array of supported SOAP URIs and adds it to this SOAPHeader object.
      void SOAPFault.appendFaultSubcode(QName subcode)
      Adds a Subcode to the end of the sequence of Subcodes contained by this SOAPFault.
      abstract SOAPMessage SOAPConnection.call(SOAPMessage request, Object to)
      Sends the given message to the specified endpoint and blocks until it has returned the response.
      abstract void SOAPConnection.close()
      Closes this SOAPConnection object.
      SOAPElement SOAPElementFactory.create(Name name)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
      SOAPElement SOAPElementFactory.create(String localName)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName) instead
      SOAPElement SOAPElementFactory.create(String localName, String prefix, String uri)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix, String uri) instead
      abstract SOAPConnection SOAPConnectionFactory.createConnection()
      Create a new SOAPConnection.
      abstract Detail SOAPFactory.createDetail()
      Creates a new Detail object which serves as a container for DetailEntry objects.
      SOAPElement SOAPFactory.createElement(Element domElement)
      Creates a SOAPElement object from an existing DOM Element.
      abstract SOAPElement SOAPFactory.createElement(Name name)
      Creates a SOAPElement object initialized with the given Name object.
      SOAPElement SOAPFactory.createElement(QName qname)
      Creates a SOAPElement object initialized with the given QName object.
      abstract SOAPElement SOAPFactory.createElement(String localName)
      Creates a SOAPElement object initialized with the given local name.
      abstract SOAPElement SOAPFactory.createElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object with the given local name, prefix and uri.
      abstract SOAPFault SOAPFactory.createFault()
      Creates a new default SOAPFault object
      abstract SOAPFault SOAPFactory.createFault(String reasonText, QName faultCode)
      Creates a new SOAPFault object initialized with the given reasonText and faultCode
      abstract SOAPMessage MessageFactory.createMessage()
      Creates a new SOAPMessage object with the default SOAPPart, SOAPEnvelope, SOAPBody, and SOAPHeader objects.
      abstract SOAPMessage MessageFactory.createMessage(MimeHeaders headers, InputStream in)
      Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.
      abstract Name SOAPFactory.createName(String localName)
      Creates a new Name object initialized with the given local name.
      Name SOAPEnvelope.createName(String localName)
      Creates a new Name object initialized with the given local name.
      abstract Name SOAPFactory.createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      Name SOAPEnvelope.createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      QName SOAPElement.createQName(String localName, String prefix)
      Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement.
      Document SOAPBody.extractContentAsDocument()
      Creates a new DOM Document and sets the first child of this SOAPBody as it's document element.
      SOAPMessage SOAPConnection.get(Object to)
      Gets a message from a specific endpoint and blocks until it receives,
      abstract AttachmentPart SOAPMessage.getAttachment(SOAPElement element)
      Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists.
      abstract InputStream AttachmentPart.getBase64Content()
      Returns an InputStream which can be used to obtain the content of AttachmentPart as Base64 encoded character data, this method would base64 encode the raw bytes of the attachment and return.
      SOAPBody SOAPEnvelope.getBody()
      Returns the SOAPBody object associated with this SOAPEnvelope object.
      abstract Object AttachmentPart.getContent()
      Gets the content of this AttachmentPart object as a Java object.
      abstract Source SOAPPart.getContent()
      Returns the content of the SOAPEnvelope as a JAXP Source object.
      abstract DataHandler AttachmentPart.getDataHandler()
      Gets the DataHandler object for this AttachmentPart object.
      abstract SOAPEnvelope SOAPPart.getEnvelope()
      Gets the SOAPEnvelope object associated with this SOAPPart object.
      Iterator SOAPFault.getFaultReasonLocales()
      Returns an Iterator over a distinct sequence of Locales for which there are associated Reason Text items.
      String SOAPFault.getFaultReasonText(Locale locale)
      Returns the Reason Text associated with the given Locale.
      Iterator SOAPFault.getFaultReasonTexts()
      Returns an Iterator over a sequence of String objects containing all of the Reason Text items for this SOAPFault.
      SOAPHeader SOAPEnvelope.getHeader()
      Returns the SOAPHeader object for this SOAPEnvelope object.
      Object SOAPMessage.getProperty(String property)
      Retrieves value of the specified property.
      abstract InputStream AttachmentPart.getRawContent()
      Gets the content of this AttachmentPart object as an InputStream as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.
      abstract byte[] AttachmentPart.getRawContentBytes()
      Gets the content of this AttachmentPart object as a byte[] array as if a call had been made to getContent and no DataContentHandler had been registered for the content-type of this AttachmentPart.
      abstract int AttachmentPart.getSize()
      Returns the number of bytes in this AttachmentPart object.
      SOAPBody SOAPMessage.getSOAPBody()
      Gets the SOAP Body contained in this SOAPMessage object.
      SOAPHeader SOAPMessage.getSOAPHeader()
      Gets the SOAP Header contained in this SOAPMessage object.
      static MessageFactory MessageFactory.newInstance()
      Creates a new MessageFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load: Use the javax.xml.soap.MessageFactory system property.
      static SOAPFactory SOAPFactory.newInstance()
      Creates a new SOAPFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load: Use the javax.xml.soap.SOAPFactory system property.
      static SOAPConnectionFactory SOAPConnectionFactory.newInstance()
      Creates an instance of the default SOAPConnectionFactory object.
      static SOAPElementFactory SOAPElementFactory.newInstance()
      Deprecated.
      Creates a new instance of SOAPElementFactory.
      static MessageFactory MessageFactory.newInstance(String protocol)
      Creates a new MessageFactory object that is an instance of the specified implementation.
      static SOAPFactory SOAPFactory.newInstance(String protocol)
      Creates a new SOAPFactory object that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.
      protected abstract MessageFactory SAAJMetaFactory.newMessageFactory(String protocol)
      Creates a MessageFactory object for the given String protocol.
      protected abstract SOAPFactory SAAJMetaFactory.newSOAPFactory(String protocol)
      Creates a SOAPFactory object for the given String protocol.
      abstract void SOAPMessage.saveChanges()
      Updates this SOAPMessage object with all the changes that have been made to it.
      abstract void AttachmentPart.setBase64Content(InputStream content, String contentType)
      Sets the content of this attachment part from the Base64 source InputStream and sets the value of the Content-Type header to the value contained in contentType, This method would first decode the base64 input and write the resulting raw bytes to the attachment.
      abstract void SOAPPart.setContent(Source source)
      Sets the content of the SOAPEnvelope object with the data from the given Source object.
      SOAPElement SOAPElement.setElementQName(QName newName)
      Changes the name of this Element to newName if possible.
      void SOAPElement.setEncodingStyle(String encodingStyle)
      Sets the encoding style for this SOAPElement object to one specified.
      void SOAPFault.setFaultActor(String faultActor)
      Sets this SOAPFault object with the given fault actor.
      void SOAPFault.setFaultCode(Name faultCodeQName)
      Sets this SOAPFault object with the given fault code.
      void SOAPFault.setFaultCode(QName faultCodeQName)
      Sets this SOAPFault object with the given fault code.
      void SOAPFault.setFaultCode(String faultCode)
      Sets this SOAPFault object with the give fault code.
      void SOAPFault.setFaultNode(String uri)
      Creates or replaces any existing Node element value for this SOAPFault object.
      void SOAPFault.setFaultRole(String uri)
      Creates or replaces any existing Role element value for this SOAPFault object.
      void SOAPFault.setFaultString(String faultString)
      Sets the fault string for this SOAPFault object to the given string.
      void SOAPFault.setFaultString(String faultString, Locale locale)
      Sets the fault string for this SOAPFault object to the given string and localized to the given locale.
      void Node.setParentElement(SOAPElement parent)
      Sets the parent of this Node object to the given SOAPElement object.
      void SOAPMessage.setProperty(String property, Object value)
      Associates the specified value with the specified property.
      abstract void AttachmentPart.setRawContent(InputStream content, String contentType)
      Sets the content of this attachment part to that contained by the InputStream content and sets the value of the Content-Type header to the value contained in contentType.
      abstract void AttachmentPart.setRawContentBytes(byte[] content, int offset, int len, String contentType)
      Sets the content of this attachment part to that contained by the byte[] array content and sets the value of the Content-Type header to the value contained in contentType.
      void SOAPHeaderElement.setRelay(boolean relay)
      Sets the relay attribute for this SOAPHeaderElement to be either true or false.
      void SOAPHeaderElement.setRole(String uri)
      Sets the Role associated with this SOAPHeaderElement object to the specified Role.
      abstract void SOAPMessage.writeTo(OutputStream out)
      Writes this SOAPMessage object to the given output stream.
      Constructors in javax.xml.soap that throw SOAPException
      Constructor and Description
      SAAJResult()
      Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the default (SOAP 1.1) protocol.
      SAAJResult(String protocol)
      Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the specified protocol.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPFactory

  • Packages that use SOAPFactory
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of SOAPFactory in javax.xml.soap

      Methods in javax.xml.soap that return SOAPFactory
      Modifier and Type Method and Description
      static SOAPFactory SOAPFactory.newInstance()
      Creates a new SOAPFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load: Use the javax.xml.soap.SOAPFactory system property.
      static SOAPFactory SOAPFactory.newInstance(String protocol)
      Creates a new SOAPFactory object that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.
      protected abstract SOAPFactory SAAJMetaFactory.newSOAPFactory(String protocol)
      Creates a SOAPFactory object for the given String protocol.

    • Uses of SOAPFactory in javax.xml.ws.soap

      Methods in javax.xml.ws.soap that return SOAPFactory
      Modifier and Type Method and Description
      SOAPFactory SOAPBinding.getSOAPFactory()
      Gets the SAAJ SOAPFactory instance used by this SOAP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPMessage

  • Packages that use SOAPMessage
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.

    • Uses of SOAPMessage in javax.xml.soap

      Methods in javax.xml.soap that return SOAPMessage
      Modifier and Type Method and Description
      abstract SOAPMessage SOAPConnection.call(SOAPMessage request, Object to)
      Sends the given message to the specified endpoint and blocks until it has returned the response.
      abstract SOAPMessage MessageFactory.createMessage()
      Creates a new SOAPMessage object with the default SOAPPart, SOAPEnvelope, SOAPBody, and SOAPHeader objects.
      abstract SOAPMessage MessageFactory.createMessage(MimeHeaders headers, InputStream in)
      Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.
      SOAPMessage SOAPConnection.get(Object to)
      Gets a message from a specific endpoint and blocks until it receives,
      Methods in javax.xml.soap with parameters of type SOAPMessage
      Modifier and Type Method and Description
      abstract SOAPMessage SOAPConnection.call(SOAPMessage request, Object to)
      Sends the given message to the specified endpoint and blocks until it has returned the response.
      Constructors in javax.xml.soap with parameters of type SOAPMessage
      Constructor and Description
      SAAJResult(SOAPMessage message)
      Creates a SAAJResult that will write the results into the SOAPPart of the supplied SOAPMessage.

    • Uses of SOAPMessage in javax.xml.ws.handler.soap

      Methods in javax.xml.ws.handler.soap that return SOAPMessage
      Modifier and Type Method and Description
      SOAPMessage SOAPMessageContext.getMessage()
      Gets the SOAPMessage from this message context.
      Methods in javax.xml.ws.handler.soap with parameters of type SOAPMessage
      Modifier and Type Method and Description
      void SOAPMessageContext.setMessage(SOAPMessage message)
      Sets the SOAPMessage in this message context
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.soap.SOAPPart

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.soap.SOAPPart

  • Packages that use SOAPPart
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPPart in javax.xml.soap

      Methods in javax.xml.soap that return SOAPPart
      Modifier and Type Method and Description
      abstract SOAPPart SOAPMessage.getSOAPPart()
      Gets the SOAP part of this SOAPMessage object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.Detail

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.Detail

  • Packages that use Detail
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of Detail in javax.xml.soap

      Methods in javax.xml.soap that return Detail
      Modifier and Type Method and Description
      Detail SOAPFault.addDetail()
      Creates an optional Detail object and sets it as the Detail object for this SOAPFault object.
      abstract Detail SOAPFactory.createDetail()
      Creates a new Detail object which serves as a container for DetailEntry objects.
      Detail SOAPFault.getDetail()
      Returns the optional detail element for this SOAPFault object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.DetailEntry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.DetailEntry

  • Packages that use DetailEntry
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of DetailEntry in javax.xml.soap

      Methods in javax.xml.soap that return DetailEntry
      Modifier and Type Method and Description
      DetailEntry Detail.addDetailEntry(Name name)
      Creates a new DetailEntry object with the given name and adds it to this Detail object.
      DetailEntry Detail.addDetailEntry(QName qname)
      Creates a new DetailEntry object with the given QName and adds it to this Detail object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.Name

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.Name

  • Packages that use Name
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of Name in javax.xml.soap

      Methods in javax.xml.soap that return Name
      Modifier and Type Method and Description
      abstract Name SOAPFactory.createName(String localName)
      Creates a new Name object initialized with the given local name.
      Name SOAPEnvelope.createName(String localName)
      Creates a new Name object initialized with the given local name.
      abstract Name SOAPFactory.createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      Name SOAPEnvelope.createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      Name SOAPElement.getElementName()
      Returns the name of this SOAPElement object.
      Name SOAPFault.getFaultCodeAsName()
      Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object.
      Methods in javax.xml.soap with parameters of type Name
      Modifier and Type Method and Description
      SOAPElement SOAPElement.addAttribute(Name name, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPBodyElement SOAPBody.addBodyElement(Name name)
      Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
      SOAPElement SOAPElement.addChildElement(Name name)
      Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.
      DetailEntry Detail.addDetailEntry(Name name)
      Creates a new DetailEntry object with the given name and adds it to this Detail object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPHeaderElement SOAPHeader.addHeaderElement(Name name)
      Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPElement SOAPElementFactory.create(Name name)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
      abstract SOAPElement SOAPFactory.createElement(Name name)
      Creates a SOAPElement object initialized with the given Name object.
      String SOAPElement.getAttributeValue(Name name)
      Returns the value of the attribute with the specified name.
      Iterator SOAPElement.getChildElements(Name name)
      Returns an Iterator over all the immediate child Nodes of this element with the specified name.
      boolean SOAPElement.removeAttribute(Name name)
      Removes the attribute with the specified name.
      void SOAPFault.setFaultCode(Name faultCodeQName)
      Sets this SOAPFault object with the given fault code.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.Node

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.Node

  • Packages that use Node
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of Node in javax.xml.soap

      Subinterfaces of Node in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Detail
      A container for DetailEntry objects.
      interface  DetailEntry
      The content for a Detail object, giving details for a SOAPFault object.
      interface  SOAPBody
      An object that represents the contents of the SOAP body element in a SOAP message.
      interface  SOAPBodyElement
      A SOAPBodyElement object represents the contents in a SOAPBody object.
      interface  SOAPElement
      An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
      interface  SOAPEnvelope
      The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
      interface  SOAPFault
      An element in the SOAPBody object that contains error and/or status information.
      interface  SOAPFaultElement
      A representation of the contents in a SOAPFault object.
      interface  SOAPHeader
      A representation of the SOAP header element.
      interface  SOAPHeaderElement
      An object representing the contents in the SOAP header part of the SOAP envelope.
      interface  Text
      A representation of a node whose value is text.
      Methods in javax.xml.soap that return Node
      Modifier and Type | Method and Description
      Node | SAAJResult.getResult()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPBody

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPBody

  • Packages that use SOAPBody
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPBody in javax.xml.soap

      Methods in javax.xml.soap that return SOAPBody
      Modifier and Type Method and Description
      SOAPBody SOAPEnvelope.addBody()
      Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.
      SOAPBody SOAPEnvelope.getBody()
      Returns the SOAPBody object associated with this SOAPEnvelope object.
      SOAPBody SOAPMessage.getSOAPBody()
      Gets the SOAP Body contained in this SOAPMessage object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPBodyElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPBodyElement

  • Packages that use SOAPBodyElement
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPBodyElement in javax.xml.soap

      Subinterfaces of SOAPBodyElement in javax.xml.soap
      Modifier and Type Interface and Description
      interface  SOAPFault
      An element in the SOAPBody object that contains error and/or status information.
      Methods in javax.xml.soap that return SOAPBodyElement
      Modifier and Type Method and Description
      SOAPBodyElement SOAPBody.addBodyElement(Name name)
      Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
      SOAPBodyElement SOAPBody.addBodyElement(QName qname)
      Creates a new SOAPBodyElement object with the specified QName and adds it to this SOAPBody object.
      SOAPBodyElement SOAPBody.addDocument(Document document)
      Adds the root node of the DOM Document to this SOAPBody object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPConstants

No usage of javax.xml.soap.SOAPConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPElement

  • Packages that use SOAPElement
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPElement in javax.xml.soap

      Subinterfaces of SOAPElement in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Detail
      A container for DetailEntry objects.
      interface  DetailEntry
      The content for a Detail object, giving details for a SOAPFault object.
      interface  SOAPBody
      An object that represents the contents of the SOAP body element in a SOAP message.
      interface  SOAPBodyElement
      A SOAPBodyElement object represents the contents in a SOAPBody object.
      interface  SOAPEnvelope
      The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
      interface  SOAPFault
      An element in the SOAPBody object that contains error and/or status information.
      interface  SOAPFaultElement
      A representation of the contents in a SOAPFault object.
      interface  SOAPHeader
      A representation of the SOAP header element.
      interface  SOAPHeaderElement
      An object representing the contents in the SOAP header part of the SOAP envelope.
      Methods in javax.xml.soap that return SOAPElement
      Modifier and Type Method and Description
      SOAPElement SOAPElement.addAttribute(Name name, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPElement SOAPElement.addAttribute(QName qname, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(Name name)
      Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(QName qname)
      Creates a new SOAPElement object initialized with the given QName object and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(SOAPElement element)
      Add a SOAPElement as a child of this SOAPElement instance.
      SOAPElement SOAPElement.addChildElement(String localName)
      Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(String localName, String prefix)
      Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addChildElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object.
      SOAPElement SOAPElement.addNamespaceDeclaration(String prefix, String uri)
      Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
      SOAPElement SOAPElement.addTextNode(String text)
      Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
      SOAPElement SOAPElementFactory.create(Name name)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
      SOAPElement SOAPElementFactory.create(String localName)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName) instead
      SOAPElement SOAPElementFactory.create(String localName, String prefix, String uri)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix, String uri) instead
      SOAPElement SOAPFactory.createElement(Element domElement)
      Creates a SOAPElement object from an existing DOM Element.
      abstract SOAPElement SOAPFactory.createElement(Name name)
      Creates a SOAPElement object initialized with the given Name object.
      SOAPElement SOAPFactory.createElement(QName qname)
      Creates a SOAPElement object initialized with the given QName object.
      abstract SOAPElement SOAPFactory.createElement(String localName)
      Creates a SOAPElement object initialized with the given local name.
      abstract SOAPElement SOAPFactory.createElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object with the given local name, prefix and uri.
      SOAPElement Node.getParentElement()
      Returns the parent element of this Node object.
      SOAPElement SOAPElement.setElementQName(QName newName)
      Changes the name of this Element to newName if possible.
      Methods in javax.xml.soap with parameters of type SOAPElement
      Modifier and Type Method and Description
      SOAPElement SOAPElement.addChildElement(SOAPElement element)
      Add a SOAPElement as a child of this SOAPElement instance.
      abstract AttachmentPart SOAPMessage.getAttachment(SOAPElement element)
      Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists.
      void Node.setParentElement(SOAPElement parent)
      Sets the parent of this Node object to the given SOAPElement object.
      Constructors in javax.xml.soap with parameters of type SOAPElement
      Constructor and Description
      SAAJResult(SOAPElement rootNode)
      Creates a SAAJResult that will write the results as a child node of the SOAPElement specified.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPEnvelope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPEnvelope

  • Packages that use SOAPEnvelope
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPEnvelope in javax.xml.soap

      Methods in javax.xml.soap that return SOAPEnvelope
      Modifier and Type Method and Description
      abstract SOAPEnvelope SOAPPart.getEnvelope()
      Gets the SOAPEnvelope object associated with this SOAPPart object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPFault

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPFault

  • Packages that use SOAPFault
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of SOAPFault in javax.xml.soap

      Methods in javax.xml.soap that return SOAPFault
      Modifier and Type Method and Description
      SOAPFault SOAPBody.addFault()
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(Name faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault SOAPBody.addFault(QName faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      abstract SOAPFault SOAPFactory.createFault()
      Creates a new default SOAPFault object
      abstract SOAPFault SOAPFactory.createFault(String reasonText, QName faultCode)
      Creates a new SOAPFault object initialized with the given reasonText and faultCode
      SOAPFault SOAPBody.getFault()
      Returns the SOAPFault object in this SOAPBody object.

    • Uses of SOAPFault in javax.xml.ws.soap

      Methods in javax.xml.ws.soap that return SOAPFault
      Modifier and Type Method and Description
      SOAPFault SOAPFaultException.getFault()
      Gets the embedded SOAPFault instance.
      Constructors in javax.xml.ws.soap with parameters of type SOAPFault
      Constructor and Description
      SOAPFaultException(SOAPFault fault)
      Constructor for SOAPFaultException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPFaultElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPFaultElement

  • Packages that use SOAPFaultElement
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPFaultElement in javax.xml.soap

      Subinterfaces of SOAPFaultElement in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Detail
      A container for DetailEntry objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPHeader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPHeader

  • Packages that use SOAPHeader
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPHeader in javax.xml.soap

      Methods in javax.xml.soap that return SOAPHeader
      Modifier and Type Method and Description
      SOAPHeader SOAPEnvelope.addHeader()
      Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.
      SOAPHeader SOAPEnvelope.getHeader()
      Returns the SOAPHeader object for this SOAPEnvelope object.
      SOAPHeader SOAPMessage.getSOAPHeader()
      Gets the SOAP Header contained in this SOAPMessage object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.SOAPHeaderElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.SOAPHeaderElement

  • Packages that use SOAPHeaderElement
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of SOAPHeaderElement in javax.xml.soap

      Methods in javax.xml.soap that return SOAPHeaderElement
      Modifier and Type Method and Description
      SOAPHeaderElement SOAPHeader.addHeaderElement(Name name)
      Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addHeaderElement(QName qname)
      Creates a new SOAPHeaderElement object initialized with the specified qname and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addNotUnderstoodHeaderElement(QName name)
      Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(Iterator supportedSOAPURIs)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(String supportedSoapUri)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified supported SOAP URI and adds it to this SOAPHeader object.
      SOAPHeaderElement SOAPHeader.addUpgradeHeaderElement(String[] supportedSoapUris)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified array of supported SOAP URIs and adds it to this SOAPHeader object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.soap.Text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.soap.Text

No usage of javax.xml.soap.Text
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Detail

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface Detail

  • All Superinterfaces:
    Element, Node, SOAPElement, SOAPFaultElement

    public interface Detail
extends SOAPFaultElement
    A container for DetailEntry objects. DetailEntry objects give detailed error information that is application-specific and related to the SOAPBody object that contains it.

    A Detail object, which is part of a SOAPFault object, can be retrieved using the method SOAPFault.getDetail. The Detail interface provides two methods. One creates a new DetailEntry object and also automatically adds it to the Detail object. The second method gets a list of the DetailEntry objects contained in a Detail object.

    The following code fragment, in which sf is a SOAPFault object, gets its Detail object (d), adds a new DetailEntry object to d, and then gets a list of all the DetailEntry objects in d. The code also creates a Name object to pass to the method addDetailEntry. The variable se, used to create the Name object, is a SOAPEnvelope object.

        Detail d = sf.getDetail();
    Name name = se.createName("GetLastTradePrice", "WOMBAT",
                                "http://www.wombat.org/trader");
    d.addDetailEntry(name);
    Iterator it = d.getDetailEntries();

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DetailEntry addDetailEntry(Name name)
      Creates a new DetailEntry object with the given name and adds it to this Detail object.
      DetailEntry addDetailEntry(QName qname)
      Creates a new DetailEntry object with the given QName and adds it to this Detail object.
      Iterator getDetailEntries()
      Gets an Iterator over all of the DetailEntrys in this Detail object.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • addDetailEntry

        DetailEntry addDetailEntry(Name name)
                    throws SOAPException
        Creates a new DetailEntry object with the given name and adds it to this Detail object.
        Parameters:
        name - a Name object identifying the new DetailEntry object
        Throws:
        SOAPException - thrown when there is a problem in adding a DetailEntry object to this Detail object.
        See Also:
        addDetailEntry(QName qname)

      • addDetailEntry

        DetailEntry addDetailEntry(QName qname)
                    throws SOAPException
        Creates a new DetailEntry object with the given QName and adds it to this Detail object. This method is the preferred over the one using Name.
        Parameters:
        qname - a QName object identifying the new DetailEntry object
        Throws:
        SOAPException - thrown when there is a problem in adding a DetailEntry object to this Detail object.
        Since:
        SAAJ 1.3
        See Also:
        addDetailEntry(Name name)

      • getDetailEntries

        Iterator getDetailEntries()
        Gets an Iterator over all of the DetailEntrys in this Detail object.
        Returns:
        an Iterator object over the DetailEntry objects in this Detail object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MessageFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class MessageFactory

  • java.lang.Object
    • javax.xml.soap.MessageFactory

  • public abstract class MessageFactory
extends Object
    A factory for creating SOAPMessage objects.

    A SAAJ client can create a MessageFactory object using the method newInstance, as shown in the following lines of code.

           MessageFactory mf = MessageFactory.newInstance();
       MessageFactory mf12 = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);

    All MessageFactory objects, regardless of how they are created, will produce SOAPMessage objects that have the following elements by default:

    • A SOAPPart object
    • A SOAPEnvelope object
    • A SOAPBody object
    • A SOAPHeader object
    In some cases, specialized MessageFactory objects may be obtained that produce messages prepopulated with additional entries in the SOAPHeader object and the SOAPBody object. The content of a new SOAPMessage object depends on which of the two MessageFactory methods is used to create it.
    • createMessage()
      This is the method clients would normally use to create a request message.
    • createMessage(MimeHeaders, java.io.InputStream) -- message has content from the InputStream object and headers from the MimeHeaders object
      This method can be used internally by a service implementation to create a message that is a response to a request.

    • Constructor Summary

      Constructors
      Constructor and Description
      MessageFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract SOAPMessage createMessage()
      Creates a new SOAPMessage object with the default SOAPPart, SOAPEnvelope, SOAPBody, and SOAPHeader objects.
      abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in)
      Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.
      static MessageFactory newInstance()
      Creates a new MessageFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load: Use the javax.xml.soap.MessageFactory system property.
      static MessageFactory newInstance(String protocol)
      Creates a new MessageFactory object that is an instance of the specified implementation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • MessageFactory

        public MessageFactory()

    • Method Detail

      • newInstance

        public static MessageFactory newInstance()
                                  throws SOAPException
        Creates a new MessageFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load:
        • Use the javax.xml.soap.MessageFactory system property.
        • Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
        • Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.soap.MessageFactory in jars available to the runtime.
        • Use the SAAJMetaFactory instance to locate the MessageFactory implementation class.
        Returns:
        a new instance of a MessageFactory
        Throws:
        SOAPException - if there was an error in creating the default implementation of the MessageFactory.
        See Also:
        SAAJMetaFactory

      • newInstance

        public static MessageFactory newInstance(String protocol)
                                  throws SOAPException
        Creates a new MessageFactory object that is an instance of the specified implementation. May be a dynamic message factory, a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic message factory creates messages based on the MIME headers specified as arguments to the createMessage method. This method uses the SAAJMetaFactory to locate the implementation class and create the MessageFactory instance.
        Parameters:
        protocol - a string constant representing the class of the specified message factory implementation. May be either DYNAMIC_SOAP_PROTOCOL, DEFAULT_SOAP_PROTOCOL (which is the same as) SOAP_1_1_PROTOCOL, or SOAP_1_2_PROTOCOL.
        Returns:
        a new instance of a MessageFactory
        Throws:
        SOAPException - if there was an error in creating the specified implementation of MessageFactory.
        Since:
        SAAJ 1.3
        See Also:
        SAAJMetaFactory

      • createMessage

        public abstract SOAPMessage createMessage()
                                   throws SOAPException
        Creates a new SOAPMessage object with the default SOAPPart, SOAPEnvelope, SOAPBody, and SOAPHeader objects. Profile-specific message factories can choose to prepopulate the SOAPMessage object with profile-specific headers.

        Content can be added to this message's SOAPPart object, and the message can be sent "as is" when a message containing only a SOAP part is sufficient. Otherwise, the SOAPMessage object needs to create one or more AttachmentPart objects and add them to itself. Any content that is not in XML format must be in an AttachmentPart object.

        Returns:
        a new SOAPMessage object
        Throws:
        SOAPException - if a SOAP error occurs
        UnsupportedOperationException - if the protocol of this MessageFactory instance is DYNAMIC_SOAP_PROTOCOL

      • createMessage

        public abstract SOAPMessage createMessage(MimeHeaders headers,
                                          InputStream in)
                                   throws IOException,
                                          SOAPException
        Internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.
        Parameters:
        in - the InputStream object that contains the data for a message
        headers - the transport-specific headers passed to the message in a transport-independent fashion for creation of the message
        Returns:
        a new SOAPMessage object containing the data from the given InputStream object
        Throws:
        IOException - if there is a problem in reading data from the input stream
        SOAPException - may be thrown if the message is invalid
        IllegalArgumentException - if the MessageFactory requires one or more MIME headers to be present in the headers parameter and they are missing. MessageFactory implementations for SOAP_1_1_PROTOCOL or SOAP_1_2_PROTOCOL must not throw IllegalArgumentException for this reason.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MimeHeader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class MimeHeader

  • java.lang.Object
    • javax.xml.soap.MimeHeader

  • public class MimeHeader
extends Object
    An object that stores a MIME header name and its value. One or more MimeHeader objects may be contained in a MimeHeaders object.
    See Also:
    MimeHeaders

    • Constructor Summary

      Constructors
      Constructor and Description
      MimeHeader(String name, String value)
      Constructs a MimeHeader object initialized with the given name and value.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getName()
      Returns the name of this MimeHeader object.
      String getValue()
      Returns the value of this MimeHeader object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • MimeHeader

        public MimeHeader(String name,
                  String value)
        Constructs a MimeHeader object initialized with the given name and value.
        Parameters:
        name - a String giving the name of the header
        value - a String giving the value of the header

    • Method Detail

      • getName

        public String getName()
        Returns the name of this MimeHeader object.
        Returns:
        the name of the header as a String

      • getValue

        public String getValue()
        Returns the value of this MimeHeader object.
        Returns:
        the value of the header as a String
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MimeHeaders

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class MimeHeaders

  • java.lang.Object
    • javax.xml.soap.MimeHeaders

  • public class MimeHeaders
extends Object
    A container for MimeHeader objects, which represent the MIME headers present in a MIME part of a message.

    This class is used primarily when an application wants to retrieve specific attachments based on certain MIME headers and values. This class will most likely be used by implementations of AttachmentPart and other MIME dependent parts of the SAAJ API.

    See Also:
    SOAPMessage.getAttachments(), AttachmentPart

    • Constructor Summary

      Constructors
      Constructor and Description
      MimeHeaders()
      Constructs a default MimeHeaders object initialized with an empty Vector object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addHeader(String name, String value)
      Adds a MimeHeader object with the specified name and value to this MimeHeaders object's list of headers.
      Iterator getAllHeaders()
      Returns all the MimeHeaders in this MimeHeaders object.
      String[] getHeader(String name)
      Returns all of the values for the specified header as an array of String objects.
      Iterator getMatchingHeaders(String[] names)
      Returns all the MimeHeader objects whose name matches a name in the given array of names.
      Iterator getNonMatchingHeaders(String[] names)
      Returns all of the MimeHeader objects whose name does not match a name in the given array of names.
      void removeAllHeaders()
      Removes all the header entries from this MimeHeaders object.
      void removeHeader(String name)
      Remove all MimeHeader objects whose name matches the given name.
      void setHeader(String name, String value)
      Replaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • MimeHeaders

        public MimeHeaders()
        Constructs a default MimeHeaders object initialized with an empty Vector object.

    • Method Detail

      • getHeader

        public String[] getHeader(String name)
        Returns all of the values for the specified header as an array of String objects.
        Parameters:
        name - the name of the header for which values will be returned
        Returns:
        a String array with all of the values for the specified header
        See Also:
        setHeader(java.lang.String, java.lang.String)

      • setHeader

        public void setHeader(String name,
                      String value)
        Replaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches. This method also removes all matching headers after the first one.

        Note that RFC822 headers can contain only US-ASCII characters.

        Parameters:
        name - a String with the name of the header for which to search
        value - a String with the value that will replace the current value of the specified header
        Throws:
        IllegalArgumentException - if there was a problem in the mime header name or the value being set
        See Also:
        getHeader(java.lang.String)

      • addHeader

        public void addHeader(String name,
                      String value)
        Adds a MimeHeader object with the specified name and value to this MimeHeaders object's list of headers.

        Note that RFC822 headers can contain only US-ASCII characters.

        Parameters:
        name - a String with the name of the header to be added
        value - a String with the value of the header to be added
        Throws:
        IllegalArgumentException - if there was a problem in the mime header name or value being added

      • removeHeader

        public void removeHeader(String name)
        Remove all MimeHeader objects whose name matches the given name.
        Parameters:
        name - a String with the name of the header for which to search

      • removeAllHeaders

        public void removeAllHeaders()
        Removes all the header entries from this MimeHeaders object.

      • getAllHeaders

        public Iterator getAllHeaders()
        Returns all the MimeHeaders in this MimeHeaders object.
        Returns:
        an Iterator object over this MimeHeaders object's list of MimeHeader objects

      • getMatchingHeaders

        public Iterator getMatchingHeaders(String[] names)
        Returns all the MimeHeader objects whose name matches a name in the given array of names.
        Parameters:
        names - an array of String objects with the names for which to search
        Returns:
        an Iterator object over the MimeHeader objects whose name matches one of the names in the given list

      • getNonMatchingHeaders

        public Iterator getNonMatchingHeaders(String[] names)
        Returns all of the MimeHeader objects whose name does not match a name in the given array of names.
        Parameters:
        names - an array of String objects with the names for which to search
        Returns:
        an Iterator object over the MimeHeader objects whose name does not match one of the names in the given list
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Name

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface Name

  • public interface Name
    A representation of an XML name. This interface provides methods for getting the local and namespace-qualified names and also for getting the prefix associated with the namespace for the name. It is also possible to get the URI of the namespace.

    The following is an example of a namespace declaration in an element.

       <wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader">
    ("xmlns" stands for "XML namespace".) The following shows what the methods in the Name interface will return.
    • getQualifiedName will return "prefix:LocalName" = "WOMBAT:GetLastTradePrice"
    • getURI will return "http://www.wombat.org/trader"
    • getLocalName will return "GetLastTracePrice"
    • getPrefix will return "WOMBAT"

    XML namespaces are used to disambiguate SOAP identifiers from application-specific identifiers.

    Name objects are created using the method SOAPEnvelope.createName, which has two versions. One method creates Name objects with a local name, a namespace prefix, and a namespace URI. and the second creates Name objects with just a local name. The following line of code, in which se is a SOAPEnvelope object, creates a new Name object with all three.

         Name name = se.createName("GetLastTradePrice", "WOMBAT",
                                "http://www.wombat.org/trader");
    The following line of code gives an example of how a Name object can be used. The variable element is a SOAPElement object. This code creates a new SOAPElement object with the given name and adds it to element.
         element.addChildElement(name);

    The Name interface may be deprecated in a future release of SAAJ in favor of javax.xml.namespace.QName

    See Also:
    SOAPEnvelope.createName, SOAPFactory.createName

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getLocalName()
      Gets the local name part of the XML name that this Name object represents.
      String getPrefix()
      Returns the prefix that was specified when this Name object was initialized.
      String getQualifiedName()
      Gets the namespace-qualified name of the XML name that this Name object represents.
      String getURI()
      Returns the URI of the namespace for the XML name that this Name object represents.

    • Method Detail

      • getLocalName

        String getLocalName()
        Gets the local name part of the XML name that this Name object represents.
        Returns:
        a string giving the local name

      • getQualifiedName

        String getQualifiedName()
        Gets the namespace-qualified name of the XML name that this Name object represents.
        Returns:
        the namespace-qualified name as a string

      • getPrefix

        String getPrefix()
        Returns the prefix that was specified when this Name object was initialized. This prefix is associated with the namespace for the XML name that this Name object represents.
        Returns:
        the prefix as a string

      • getURI

        String getURI()
        Returns the URI of the namespace for the XML name that this Name object represents.
        Returns:
        the URI as a string
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Node

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface Node

  • All Superinterfaces:
    Node
    All Known Subinterfaces:
    Detail, DetailEntry, SOAPBody, SOAPBodyElement, SOAPElement, SOAPEnvelope, SOAPFault, SOAPFaultElement, SOAPHeader, SOAPHeaderElement, Text

    public interface Node
extends Node
    A representation of a node (element) in an XML document. This interface extnends the standard DOM Node interface with methods for getting and setting the value of a node, for getting and setting the parent of a node, and for removing a node.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void detachNode()
      Removes this Node object from the tree.
      SOAPElement getParentElement()
      Returns the parent element of this Node object.
      String getValue()
      Returns the value of this node if this is a Text node or the value of the immediate child of this node otherwise.
      void recycleNode()
      Notifies the implementation that this Node object is no longer being used by the application and that the implementation is free to reuse this object for nodes that may be created later.
      void setParentElement(SOAPElement parent)
      Sets the parent of this Node object to the given SOAPElement object.
      void setValue(String value)
      If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getValue

        String getValue()
        Returns the value of this node if this is a Text node or the value of the immediate child of this node otherwise. If there is an immediate child of this Node that it is a Text node then it's value will be returned. If there is more than one Text node then the value of the first Text Node will be returned. Otherwise null is returned.
        Returns:
        a String with the text of this node if this is a Text node or the text contained by the first immediate child of this Node object that is a Text object if such a child exists; null otherwise.

      • setValue

        void setValue(String value)
        If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node. The value of the immediate child of this node can be set only if, there is one child node and that node is a Text node, or if there are no children in which case a child Text node will be created.
        Throws:
        IllegalStateException - if the node is not a Text node and either has more than one child node or has a child node that is not a Text node.
        Since:
        SAAJ 1.2

      • setParentElement

        void setParentElement(SOAPElement parent)
               throws SOAPException
        Sets the parent of this Node object to the given SOAPElement object.
        Parameters:
        parent - the SOAPElement object to be set as the parent of this Node object
        Throws:
        SOAPException - if there is a problem in setting the parent to the given element
        See Also:
        getParentElement()

      • getParentElement

        SOAPElement getParentElement()
        Returns the parent element of this Node object. This method can throw an UnsupportedOperationException if the tree is not kept in memory.
        Returns:
        the SOAPElement object that is the parent of this Node object or null if this Node object is root
        Throws:
        UnsupportedOperationException - if the whole tree is not kept in memory
        See Also:
        setParentElement(javax.xml.soap.SOAPElement)

      • detachNode

        void detachNode()
        Removes this Node object from the tree.

      • recycleNode

        void recycleNode()
        Notifies the implementation that this Node object is no longer being used by the application and that the implementation is free to reuse this object for nodes that may be created later.

        Calling the method recycleNode implies that the method detachNode has been called previously.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAAJMetaFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SAAJMetaFactory

  • java.lang.Object
    • javax.xml.soap.SAAJMetaFactory

  • public abstract class SAAJMetaFactory
extends Object
    The access point for the implementation classes of the factories defined in the SAAJ API. All of the newInstance methods defined on factories in SAAJ 1.3 defer to instances of this class to do the actual object creation. The implementations of newInstance() methods (in SOAPFactory and MessageFactory) that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2 defined lookup fails to locate the Factory implementation class name.

    SAAJMetaFactory is a service provider interface. There are no public methods on this class.

    Since:
    SAAJ 1.3

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | SAAJMetaFactory()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      protected abstract MessageFactory newMessageFactory(String protocol)
      Creates a MessageFactory object for the given String protocol.
      protected abstract SOAPFactory newSOAPFactory(String protocol)
      Creates a SOAPFactory object for the given String protocol.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SAAJMetaFactory

        protected SAAJMetaFactory()

    • Method Detail

      • newMessageFactory

        protected abstract MessageFactory newMessageFactory(String protocol)
                                             throws SOAPException
        Creates a MessageFactory object for the given String protocol.
        Parameters:
        protocol - a String indicating the protocol
        Throws:
        SOAPException - if there is an error in creating the MessageFactory
        See Also:
        SOAPConstants.SOAP_1_1_PROTOCOL, SOAPConstants.SOAP_1_2_PROTOCOL, SOAPConstants.DYNAMIC_SOAP_PROTOCOL

      • newSOAPFactory

        protected abstract SOAPFactory newSOAPFactory(String protocol)
                                       throws SOAPException
        Creates a SOAPFactory object for the given String protocol.
        Parameters:
        protocol - a String indicating the protocol
        Throws:
        SOAPException - if there is an error in creating the SOAPFactory
        See Also:
        SOAPConstants.SOAP_1_1_PROTOCOL, SOAPConstants.SOAP_1_2_PROTOCOL, SOAPConstants.DYNAMIC_SOAP_PROTOCOL
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAAJResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SAAJResult

  • java.lang.Object
    • javax.xml.transform.dom.DOMResult
      • javax.xml.soap.SAAJResult
  • All Implemented Interfaces:
    Result

    public class SAAJResult
extends DOMResult
    Acts as a holder for the results of a JAXP transformation or a JAXB marshalling, in the form of a SAAJ tree. These results should be accessed by using the getResult() method. The DOMResult.getNode() method should be avoided in almost all cases.
    Since:
    SAAJ 1.3

    • Field Summary

      • Fields inherited from class javax.xml.transform.dom.DOMResult

        FEATURE

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      SAAJResult()
      Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the default (SOAP 1.1) protocol.
      SAAJResult(SOAPElement rootNode)
      Creates a SAAJResult that will write the results as a child node of the SOAPElement specified.
      SAAJResult(SOAPMessage message)
      Creates a SAAJResult that will write the results into the SOAPPart of the supplied SOAPMessage.
      SAAJResult(String protocol)
      Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the specified protocol.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getResult()

      • Methods inherited from class javax.xml.transform.dom.DOMResult

        getNextSibling, getNode, getSystemId, setNextSibling, setNode, setSystemId

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SAAJResult

        public SAAJResult()
           throws SOAPException
        Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the default (SOAP 1.1) protocol.

        This kind of SAAJResult is meant for use in situations where the results will be used as a parameter to a method that takes a parameter whose type, such as SOAPElement, is drawn from the SAAJ API. When used in a transformation, the results are populated into the SOAPPart of a SOAPMessage that is created internally. The SOAPPart returned by DOMResult.getNode() is not guaranteed to be well-formed.

        Throws:
        SOAPException - if there is a problem creating a SOAPMessage
        Since:
        SAAJ 1.3

      • SAAJResult

        public SAAJResult(String protocol)
           throws SOAPException
        Creates a SAAJResult that will present results in the form of a SAAJ tree that supports the specified protocol. The DYNAMIC_SOAP_PROTOCOL is ambiguous in this context and will cause this constructor to throw an UnsupportedOperationException.

        This kind of SAAJResult is meant for use in situations where the results will be used as a parameter to a method that takes a parameter whose type, such as SOAPElement, is drawn from the SAAJ API. When used in a transformation the results are populated into the SOAPPart of a SOAPMessage that is created internally. The SOAPPart returned by DOMResult.getNode() is not guaranteed to be well-formed.

        Parameters:
        protocol - - the name of the SOAP protocol that the resulting SAAJ tree should support
        Throws:
        SOAPException - if a SOAPMessage supporting the specified protocol cannot be created
        Since:
        SAAJ 1.3

      • SAAJResult

        public SAAJResult(SOAPMessage message)
        Creates a SAAJResult that will write the results into the SOAPPart of the supplied SOAPMessage. In the normal case these results will be written using DOM APIs and, as a result, the finished SOAPPart will not be guaranteed to be well-formed unless the data used to create it is also well formed. When used in a transformation the validity of the SOAPMessage after the transformation can be guaranteed only by means outside SAAJ specification.
        Parameters:
        message - - the message whose SOAPPart will be populated as a result of some transformation or marshalling operation
        Since:
        SAAJ 1.3

      • SAAJResult

        public SAAJResult(SOAPElement rootNode)
        Creates a SAAJResult that will write the results as a child node of the SOAPElement specified. In the normal case these results will be written using DOM APIs and as a result may invalidate the structure of the SAAJ tree. This kind of SAAJResult should only be used when the validity of the incoming data can be guaranteed by means outside of the SAAJ specification.
        Parameters:
        rootNode - - the root to which the results will be appended
        Since:
        SAAJ 1.3

    • Method Detail

      • getResult

        public Node getResult()
        Returns:
        the resulting Tree that was created under the specified root Node.
        Since:
        SAAJ 1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPBody

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPBody

  • All Superinterfaces:
    Element, Node, SOAPElement

    public interface SOAPBody
extends SOAPElement
    An object that represents the contents of the SOAP body element in a SOAP message. A SOAP body element consists of XML data that affects the way the application-specific content is processed.

    A SOAPBody object contains SOAPBodyElement objects, which have the content for the SOAP body. A SOAPFault object, which carries status and/or error information, is an example of a SOAPBodyElement object.

    See Also:
    SOAPFault

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      SOAPBodyElement addBodyElement(Name name)
      Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
      SOAPBodyElement addBodyElement(QName qname)
      Creates a new SOAPBodyElement object with the specified QName and adds it to this SOAPBody object.
      SOAPBodyElement addDocument(Document document)
      Adds the root node of the DOM Document to this SOAPBody object.
      SOAPFault addFault()
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault addFault(Name faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault addFault(Name faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault addFault(QName faultCode, String faultString)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      SOAPFault addFault(QName faultCode, String faultString, Locale locale)
      Creates a new SOAPFault object and adds it to this SOAPBody object.
      Document extractContentAsDocument()
      Creates a new DOM Document and sets the first child of this SOAPBody as it's document element.
      SOAPFault getFault()
      Returns the SOAPFault object in this SOAPBody object.
      boolean hasFault()
      Indicates whether a SOAPFault object exists in this SOAPBody object.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • addFault

        SOAPFault addFault()
            throws SOAPException
        Creates a new SOAPFault object and adds it to this SOAPBody object. The new SOAPFault will have default values set for the mandatory child elements. The type of the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on the protocol specified while creating the MessageFactory instance.

        A SOAPBody may contain at most one SOAPFault child element.

        Returns:
        the new SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error

      • addFault

        SOAPFault addFault(Name faultCode,
                   String faultString,
                   Locale locale)
            throws SOAPException
        Creates a new SOAPFault object and adds it to this SOAPBody object. The type of the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on the protocol specified while creating the MessageFactory instance.

        For SOAP 1.2 the faultCode parameter is the value of the Fault/Code/Value element and the faultString parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 the faultCode parameter is the value of the faultcode element and the faultString parameter is the value of the faultstring element.

        A SOAPBody may contain at most one SOAPFault child element.

        Parameters:
        faultCode - a Name object giving the fault code to be set; must be one of the fault codes defined in the Version of SOAP specification in use
        faultString - a String giving an explanation of the fault
        locale - a Locale object indicating the native language of the faultString
        Returns:
        the new SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.2
        See Also:
        SOAPFault.setFaultCode(javax.xml.soap.Name), SOAPFault.setFaultString(java.lang.String)

      • addFault

        SOAPFault addFault(QName faultCode,
                   String faultString,
                   Locale locale)
            throws SOAPException
        Creates a new SOAPFault object and adds it to this SOAPBody object. The type of the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on the protocol specified while creating the MessageFactory instance.

        For SOAP 1.2 the faultCode parameter is the value of the Fault/Code/Value element and the faultString parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 the faultCode parameter is the value of the faultcode element and the faultString parameter is the value of the faultstring element.

        A SOAPBody may contain at most one SOAPFault child element.

        Parameters:
        faultCode - a QName object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in use.
        faultString - a String giving an explanation of the fault
        locale - a Locale object indicating the native language of the faultString
        Returns:
        the new SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.3
        See Also:
        SOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String),
addFault(Name faultCode, String faultString, Locale locale)

      • addFault

        SOAPFault addFault(Name faultCode,
                   String faultString)
            throws SOAPException
        Creates a new SOAPFault object and adds it to this SOAPBody object. The type of the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on the protocol specified while creating the MessageFactory instance.

        For SOAP 1.2 the faultCode parameter is the value of the Fault/Code/Value element and the faultString parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 the faultCode parameter is the value of the faultcode element and the faultString parameter is the value of the faultstring element.

        In case of a SOAP 1.2 fault, the default value for the mandatory xml:lang attribute on the Fault/Reason/Text element will be set to java.util.Locale.getDefault()

        A SOAPBody may contain at most one SOAPFault child element.

        Parameters:
        faultCode - a Name object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in use
        faultString - a String giving an explanation of the fault
        Returns:
        the new SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.2
        See Also:
        SOAPFault.setFaultCode(javax.xml.soap.Name), SOAPFault.setFaultString(java.lang.String)

      • addFault

        SOAPFault addFault(QName faultCode,
                   String faultString)
            throws SOAPException
        Creates a new SOAPFault object and adds it to this SOAPBody object. The type of the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on the protocol specified while creating the MessageFactory instance.

        For SOAP 1.2 the faultCode parameter is the value of the Fault/Code/Value element and the faultString parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 the faultCode parameter is the value of the faultcode element and the faultString parameter is the value of the faultstring element.

        In case of a SOAP 1.2 fault, the default value for the mandatory xml:lang attribute on the Fault/Reason/Text element will be set to java.util.Locale.getDefault()

        A SOAPBody may contain at most one SOAPFault child element

        Parameters:
        faultCode - a QName object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in use
        faultString - a String giving an explanation of the fault
        Returns:
        the new SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.3
        See Also:
        SOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String),
addFault(Name faultCode, String faultString)

      • hasFault

        boolean hasFault()
        Indicates whether a SOAPFault object exists in this SOAPBody object.
        Returns:
        true if a SOAPFault object exists in this SOAPBody object; false otherwise

      • getFault

        SOAPFault getFault()
        Returns the SOAPFault object in this SOAPBody object.
        Returns:
        the SOAPFault object in this SOAPBody object if present, null otherwise.

      • addBodyElement

        SOAPBodyElement addBodyElement(Name name)
                        throws SOAPException
        Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
        Parameters:
        name - a Name object with the name for the new SOAPBodyElement object
        Returns:
        the new SOAPBodyElement object
        Throws:
        SOAPException - if a SOAP error occurs
        See Also:
        addBodyElement(javax.xml.namespace.QName)

      • addBodyElement

        SOAPBodyElement addBodyElement(QName qname)
                        throws SOAPException
        Creates a new SOAPBodyElement object with the specified QName and adds it to this SOAPBody object.
        Parameters:
        qname - a QName object with the qname for the new SOAPBodyElement object
        Returns:
        the new SOAPBodyElement object
        Throws:
        SOAPException - if a SOAP error occurs
        Since:
        SAAJ 1.3
        See Also:
        addBodyElement(Name)

      • addDocument

        SOAPBodyElement addDocument(Document document)
                     throws SOAPException
        Adds the root node of the DOM Document to this SOAPBody object.

        Calling this method invalidates the document parameter. The client application should discard all references to this Document and its contents upon calling addDocument. The behavior of an application that continues to use such references is undefined.

        Parameters:
        document - the Document object whose root node will be added to this SOAPBody.
        Returns:
        the SOAPBodyElement that represents the root node that was added.
        Throws:
        SOAPException - if the Document cannot be added
        Since:
        SAAJ 1.2

      • extractContentAsDocument

        Document extractContentAsDocument()
                           throws SOAPException
        Creates a new DOM Document and sets the first child of this SOAPBody as it's document element. The child SOAPElement is removed as part of the process.
        Returns:
        the Document representation of the SOAPBody content.
        Throws:
        SOAPException - if there is not exactly one child SOAPElement of the SOAPBody.
        Since:
        SAAJ 1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPConnection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPConnection

  • java.lang.Object
    • javax.xml.soap.SOAPConnection

  • public abstract class SOAPConnection
extends Object
    A point-to-point connection that a client can use for sending messages directly to a remote party (represented by a URL, for instance).

    The SOAPConnection class is optional. Some implementations may not implement this interface in which case the call to SOAPConnectionFactory.newInstance() (see below) will throw an UnsupportedOperationException.

    A client can obtain a SOAPConnection object using a SOAPConnectionFactory object as in the following example:

          SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
      SOAPConnection con = factory.createConnection();
    A SOAPConnection object can be used to send messages directly to a URL following the request/response paradigm. That is, messages are sent using the method call, which sends the message and then waits until it gets a reply.

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPConnection()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract SOAPMessage call(SOAPMessage request, Object to)
      Sends the given message to the specified endpoint and blocks until it has returned the response.
      abstract void close()
      Closes this SOAPConnection object.
      SOAPMessage get(Object to)
      Gets a message from a specific endpoint and blocks until it receives,

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SOAPConnection

        public SOAPConnection()

    • Method Detail

      • call

        public abstract SOAPMessage call(SOAPMessage request,
                                 Object to)
                          throws SOAPException
        Sends the given message to the specified endpoint and blocks until it has returned the response.
        Parameters:
        request - the SOAPMessage object to be sent
        to - an Object that identifies where the message should be sent. It is required to support Objects of type java.lang.String, java.net.URL, and when JAXM is present javax.xml.messaging.URLEndpoint
        Returns:
        the SOAPMessage object that is the response to the message that was sent
        Throws:
        SOAPException - if there is a SOAP error

      • get

        public SOAPMessage get(Object to)
                throws SOAPException
        Gets a message from a specific endpoint and blocks until it receives,
        Parameters:
        to - an Object that identifies where the request should be sent. Objects of type java.lang.String and java.net.URL must be supported.
        Returns:
        the SOAPMessage object that is the response to the get message request
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.3

      • close

        public abstract void close()
                    throws SOAPException
        Closes this SOAPConnection object.
        Throws:
        SOAPException - if there is a SOAP error
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPConnectionFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPConnectionFactory

  • java.lang.Object
    • javax.xml.soap.SOAPConnectionFactory

  • public abstract class SOAPConnectionFactory
extends Object
    A factory for creating SOAPConnection objects. Implementation of this class is optional. If SOAPConnectionFactory.newInstance() throws an UnsupportedOperationException then the implementation does not support the SAAJ communication infrastructure. Otherwise SOAPConnection objects can be created by calling createConnection() on the newly created SOAPConnectionFactory object.

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPConnectionFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract SOAPConnection createConnection()
      Create a new SOAPConnection.
      static SOAPConnectionFactory newInstance()
      Creates an instance of the default SOAPConnectionFactory object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SOAPConnectionFactory

        public SOAPConnectionFactory()

    • Method Detail

      • newInstance

        public static SOAPConnectionFactory newInstance()
                                         throws SOAPException,
                                                UnsupportedOperationException
        Creates an instance of the default SOAPConnectionFactory object.
        Returns:
        a new instance of a default SOAPConnectionFactory object
        Throws:
        SOAPException - if there was an error creating the SOAPConnectionFactory
        UnsupportedOperationException - if newInstance is not supported.

      • createConnection

        public abstract SOAPConnection createConnection()
                                         throws SOAPException
        Create a new SOAPConnection.
        Returns:
        the new SOAPConnection object.
        Throws:
        SOAPException - if there was an exception creating the SOAPConnection object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPConstants

  • public interface SOAPConstants
    The definition of constants pertaining to the SOAP protocol.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DEFAULT_SOAP_PROTOCOL
      The default protocol: SOAP 1.1 for backwards compatibility.
      static String DYNAMIC_SOAP_PROTOCOL
      Used to create MessageFactory instances that create SOAPMessages whose concrete type is based on the Content-Type MIME header passed to the createMessage method.
      static String SOAP_1_1_CONTENT_TYPE
      The media type of the Content-Type MIME header in SOAP 1.1.
      static String SOAP_1_1_PROTOCOL
      Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.1 specification.
      static String SOAP_1_2_CONTENT_TYPE
      The media type of the Content-Type MIME header in SOAP 1.2.
      static String SOAP_1_2_PROTOCOL
      Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.2 specification
      static QName SOAP_DATAENCODINGUNKNOWN_FAULT
      SOAP 1.2 DataEncodingUnknown Fault
      static String SOAP_ENV_PREFIX
      The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
      static QName SOAP_MUSTUNDERSTAND_FAULT
      SOAP 1.2 MustUnderstand Fault
      static QName SOAP_RECEIVER_FAULT
      SOAP 1.2 Receiver Fault
      static QName SOAP_SENDER_FAULT
      SOAP 1.2 Sender Fault
      static QName SOAP_VERSIONMISMATCH_FAULT
      SOAP 1.2 VersionMismatch Fault
      static String URI_NS_SOAP_1_1_ENVELOPE
      The namespace identifier for the SOAP 1.1 envelope.
      static String URI_NS_SOAP_1_2_ENCODING
      The namespace identifier for the SOAP 1.2 encoding.
      static String URI_NS_SOAP_1_2_ENVELOPE
      The namespace identifier for the SOAP 1.2 envelope.
      static String URI_NS_SOAP_ENCODING
      The namespace identifier for the SOAP 1.1 encoding.
      static String URI_NS_SOAP_ENVELOPE
      The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this namespace are defined by the SOAP 1.1 specification.
      static String URI_SOAP_1_2_ROLE_NEXT
      The URI identifying the next application processing a SOAP request as the intended role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2 specification).
      static String URI_SOAP_1_2_ROLE_NONE
      The URI specifying the role None in SOAP 1.2.
      static String URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER
      The URI identifying the ultimate receiver of the SOAP 1.2 message.
      static String URI_SOAP_ACTOR_NEXT
      The URI identifying the next application processing a SOAP request as the intended actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).

    • Field Detail

      • DYNAMIC_SOAP_PROTOCOL

        static final String DYNAMIC_SOAP_PROTOCOL
        Used to create MessageFactory instances that create SOAPMessages whose concrete type is based on the Content-Type MIME header passed to the createMessage method. If no Content-Type header is passed then the createMessage may throw an IllegalArgumentException or, in the case of the no argument version of createMessage, an UnsupportedOperationException.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_1_1_PROTOCOL

        static final String SOAP_1_1_PROTOCOL
        Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.1 specification.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_1_2_PROTOCOL

        static final String SOAP_1_2_PROTOCOL
        Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.2 specification
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • DEFAULT_SOAP_PROTOCOL

        static final String DEFAULT_SOAP_PROTOCOL
        The default protocol: SOAP 1.1 for backwards compatibility.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_NS_SOAP_1_1_ENVELOPE

        static final String URI_NS_SOAP_1_1_ENVELOPE
        The namespace identifier for the SOAP 1.1 envelope.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_NS_SOAP_1_2_ENVELOPE

        static final String URI_NS_SOAP_1_2_ENVELOPE
        The namespace identifier for the SOAP 1.2 envelope.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_NS_SOAP_ENVELOPE

        static final String URI_NS_SOAP_ENVELOPE
        The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this namespace are defined by the SOAP 1.1 specification.
        See Also:
        Constant Field Values

      • URI_NS_SOAP_ENCODING

        static final String URI_NS_SOAP_ENCODING
        The namespace identifier for the SOAP 1.1 encoding. An attribute named encodingStyle in the URI_NS_SOAP_ENVELOPE namespace and set to the value URI_NS_SOAP_ENCODING can be added to an element to indicate that it is encoded using the rules in section 5 of the SOAP 1.1 specification.
        See Also:
        Constant Field Values

      • URI_NS_SOAP_1_2_ENCODING

        static final String URI_NS_SOAP_1_2_ENCODING
        The namespace identifier for the SOAP 1.2 encoding.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_1_1_CONTENT_TYPE

        static final String SOAP_1_1_CONTENT_TYPE
        The media type of the Content-Type MIME header in SOAP 1.1.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_1_2_CONTENT_TYPE

        static final String SOAP_1_2_CONTENT_TYPE
        The media type of the Content-Type MIME header in SOAP 1.2.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_SOAP_ACTOR_NEXT

        static final String URI_SOAP_ACTOR_NEXT
        The URI identifying the next application processing a SOAP request as the intended actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).

        This value can be passed to
SOAPHeader.examineMustUnderstandHeaderElements(String),
SOAPHeader.examineHeaderElements(String) and
SOAPHeader.extractHeaderElements(String)

        See Also:
        Constant Field Values

      • URI_SOAP_1_2_ROLE_NEXT

        static final String URI_SOAP_1_2_ROLE_NEXT
        The URI identifying the next application processing a SOAP request as the intended role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2 specification).
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_SOAP_1_2_ROLE_NONE

        static final String URI_SOAP_1_2_ROLE_NONE
        The URI specifying the role None in SOAP 1.2.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER

        static final String URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER
        The URI identifying the ultimate receiver of the SOAP 1.2 message.
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_ENV_PREFIX

        static final String SOAP_ENV_PREFIX
        The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
        Since:
        SAAJ 1.3
        See Also:
        Constant Field Values

      • SOAP_VERSIONMISMATCH_FAULT

        static final QName SOAP_VERSIONMISMATCH_FAULT
        SOAP 1.2 VersionMismatch Fault
        Since:
        SAAJ 1.3

      • SOAP_MUSTUNDERSTAND_FAULT

        static final QName SOAP_MUSTUNDERSTAND_FAULT
        SOAP 1.2 MustUnderstand Fault
        Since:
        SAAJ 1.3

      • SOAP_DATAENCODINGUNKNOWN_FAULT

        static final QName SOAP_DATAENCODINGUNKNOWN_FAULT
        SOAP 1.2 DataEncodingUnknown Fault
        Since:
        SAAJ 1.3

      • SOAP_SENDER_FAULT

        static final QName SOAP_SENDER_FAULT
        SOAP 1.2 Sender Fault
        Since:
        SAAJ 1.3

      • SOAP_RECEIVER_FAULT

        static final QName SOAP_RECEIVER_FAULT
        SOAP 1.2 Receiver Fault
        Since:
        SAAJ 1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPElement

  • All Superinterfaces:
    Element, Node
    All Known Subinterfaces:
    Detail, DetailEntry, SOAPBody, SOAPBodyElement, SOAPEnvelope, SOAPFault, SOAPFaultElement, SOAPHeader, SOAPHeaderElement

    public interface SOAPElement
extends Node, Element
    An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification. This interface serves as the base interface for those objects that are specifically prescribed by a SOAP specification.

    Methods in this interface that are required to return SAAJ specific objects may "silently" replace nodes in the tree as required to successfully return objects of the correct type. See getChildElements() and javax.xml.soap for details.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      SOAPElement addAttribute(Name name, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPElement addAttribute(QName qname, String value)
      Adds an attribute with the specified name and value to this SOAPElement object.
      SOAPElement addChildElement(Name name)
      Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.
      SOAPElement addChildElement(QName qname)
      Creates a new SOAPElement object initialized with the given QName object and adds the new element to this SOAPElement object.
      SOAPElement addChildElement(SOAPElement element)
      Add a SOAPElement as a child of this SOAPElement instance.
      SOAPElement addChildElement(String localName)
      Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object.
      SOAPElement addChildElement(String localName, String prefix)
      Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object.
      SOAPElement addChildElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object.
      SOAPElement addNamespaceDeclaration(String prefix, String uri)
      Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
      SOAPElement addTextNode(String text)
      Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
      QName createQName(String localName, String prefix)
      Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement.
      Iterator getAllAttributes()
      Returns an Iterator over all of the attribute Name objects in this SOAPElement object.
      Iterator getAllAttributesAsQNames()
      Returns an Iterator over all of the attributes in this SOAPElement as QName objects.
      String getAttributeValue(Name name)
      Returns the value of the attribute with the specified name.
      String getAttributeValue(QName qname)
      Returns the value of the attribute with the specified qname.
      Iterator getChildElements()
      Returns an Iterator over all the immediate child Nodes of this element.
      Iterator getChildElements(Name name)
      Returns an Iterator over all the immediate child Nodes of this element with the specified name.
      Iterator getChildElements(QName qname)
      Returns an Iterator over all the immediate child Nodes of this element with the specified qname.
      Name getElementName()
      Returns the name of this SOAPElement object.
      QName getElementQName()
      Returns the qname of this SOAPElement object.
      String getEncodingStyle()
      Returns the encoding style for this SOAPElement object.
      Iterator getNamespacePrefixes()
      Returns an Iterator over the namespace prefix Strings declared by this element.
      String getNamespaceURI(String prefix)
      Returns the URI of the namespace that has the given prefix.
      Iterator getVisibleNamespacePrefixes()
      Returns an Iterator over the namespace prefix Strings visible to this element.
      boolean removeAttribute(Name name)
      Removes the attribute with the specified name.
      boolean removeAttribute(QName qname)
      Removes the attribute with the specified qname.
      void removeContents()
      Detaches all children of this SOAPElement.
      boolean removeNamespaceDeclaration(String prefix)
      Removes the namespace declaration corresponding to the given prefix.
      SOAPElement setElementQName(QName newName)
      Changes the name of this Element to newName if possible.
      void setEncodingStyle(String encodingStyle)
      Sets the encoding style for this SOAPElement object to one specified.

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • addChildElement

        SOAPElement addChildElement(Name name)
                     throws SOAPException
        Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.

        This method may be deprecated in a future release of SAAJ in favor of addChildElement(javax.xml.namespace.QName)

        Parameters:
        name - a Name object with the XML name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        See Also:
        addChildElement(javax.xml.namespace.QName)

      • addChildElement

        SOAPElement addChildElement(QName qname)
                     throws SOAPException
        Creates a new SOAPElement object initialized with the given QName object and adds the new element to this SOAPElement object. The namespace, localname and prefix of the new SOAPElement are all taken from the qname argument.
        Parameters:
        qname - a QName object with the XML name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        Since:
        SAAJ 1.3
        See Also:
        addChildElement(Name)

      • addChildElement

        SOAPElement addChildElement(String localName)
                     throws SOAPException
        Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object. The new SOAPElement inherits any in-scope default namespace.
        Parameters:
        localName - a String giving the local name for the element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object

      • addChildElement

        SOAPElement addChildElement(String localName,
                            String prefix)
                     throws SOAPException
        Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object.
        Parameters:
        localName - a String giving the local name for the new element
        prefix - a String giving the namespace prefix for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if the prefix is not valid in the context of this SOAPElement or if there is an error in creating the SOAPElement object

      • addChildElement

        SOAPElement addChildElement(String localName,
                            String prefix,
                            String uri)
                     throws SOAPException
        Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object.
        Parameters:
        localName - a String giving the local name for the new element
        prefix - a String giving the namespace prefix for the new element
        uri - a String giving the URI of the namespace to which the new element belongs
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object

      • addChildElement

        SOAPElement addChildElement(SOAPElement element)
                     throws SOAPException
        Add a SOAPElement as a child of this SOAPElement instance. The SOAPElement is expected to be created by a SOAPFactory. Callers should not rely on the element instance being added as is into the XML tree. Implementations could end up copying the content of the SOAPElement passed into an instance of a different SOAPElement implementation. For instance if addChildElement() is called on a SOAPHeader, element will be copied into an instance of a SOAPHeaderElement.

        The fragment rooted in element is either added as a whole or not at all, if there was an error.

        The fragment rooted in element cannot contain elements named "Envelope", "Header" or "Body" and in the SOAP namespace. Any namespace prefixes present in the fragment should be fully resolved using appropriate namespace declarations within the fragment itself.

        Parameters:
        element - the SOAPElement to be added as a new child
        Returns:
        an instance representing the new SOAP element that was actually added to the tree.
        Throws:
        SOAPException - if there was an error in adding this element as a child

      • removeContents

        void removeContents()
        Detaches all children of this SOAPElement.

        This method is useful for rolling back the construction of partially completed SOAPHeaders and SOAPBodys in preparation for sending a fault when an error condition is detected. It is also useful for recycling portions of a document within a SOAP message.

        Since:
        SAAJ 1.2

      • addTextNode

        SOAPElement addTextNode(String text)
                 throws SOAPException
        Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
        Parameters:
        text - a String object with the textual content to be added
        Returns:
        the SOAPElement object into which the new Text object was inserted
        Throws:
        SOAPException - if there is an error in creating the new Text object or if it is not legal to attach it as a child to this SOAPElement

      • addAttribute

        SOAPElement addAttribute(Name name,
                         String value)
                  throws SOAPException
        Adds an attribute with the specified name and value to this SOAPElement object.
        Parameters:
        name - a Name object with the name of the attribute
        value - a String giving the value of the attribute
        Returns:
        the SOAPElement object into which the attribute was inserted
        Throws:
        SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with Name name on this SOAPElement.
        See Also:
        addAttribute(javax.xml.namespace.QName, String)

      • addAttribute

        SOAPElement addAttribute(QName qname,
                         String value)
                  throws SOAPException
        Adds an attribute with the specified name and value to this SOAPElement object.
        Parameters:
        qname - a QName object with the name of the attribute
        value - a String giving the value of the attribute
        Returns:
        the SOAPElement object into which the attribute was inserted
        Throws:
        SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with QName qname on this SOAPElement.
        Since:
        SAAJ 1.3
        See Also:
        addAttribute(Name, String)

      • addNamespaceDeclaration

        SOAPElement addNamespaceDeclaration(String prefix,
                                    String uri)
                             throws SOAPException
        Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
        Parameters:
        prefix - a String giving the prefix of the namespace
        uri - a String giving the uri of the namespace
        Returns:
        the SOAPElement object into which this namespace declaration was inserted.
        Throws:
        SOAPException - if there is an error in creating the namespace

      • getAttributeValue

        String getAttributeValue(Name name)
        Returns the value of the attribute with the specified name.
        Parameters:
        name - a Name object with the name of the attribute
        Returns:
        a String giving the value of the specified attribute, Null if there is no such attribute
        See Also:
        getAttributeValue(javax.xml.namespace.QName)

      • getAttributeValue

        String getAttributeValue(QName qname)
        Returns the value of the attribute with the specified qname.
        Parameters:
        qname - a QName object with the qname of the attribute
        Returns:
        a String giving the value of the specified attribute, Null if there is no such attribute
        Since:
        SAAJ 1.3
        See Also:
        getAttributeValue(Name)

      • getAllAttributes

        Iterator getAllAttributes()
        Returns an Iterator over all of the attribute Name objects in this SOAPElement object. The iterator can be used to get the attribute names, which can then be passed to the method getAttributeValue to retrieve the value of each attribute.
        Returns:
        an iterator over the names of the attributes
        See Also:
        getAllAttributesAsQNames()

      • getAllAttributesAsQNames

        Iterator getAllAttributesAsQNames()
        Returns an Iterator over all of the attributes in this SOAPElement as QName objects. The iterator can be used to get the attribute QName, which can then be passed to the method getAttributeValue to retrieve the value of each attribute.
        Returns:
        an iterator over the QNames of the attributes
        Since:
        SAAJ 1.3
        See Also:
        getAllAttributes()

      • getNamespaceURI

        String getNamespaceURI(String prefix)
        Returns the URI of the namespace that has the given prefix.
        Parameters:
        prefix - a String giving the prefix of the namespace for which to search
        Returns:
        a String with the uri of the namespace that has the given prefix

      • getNamespacePrefixes

        Iterator getNamespacePrefixes()
        Returns an Iterator over the namespace prefix Strings declared by this element. The prefixes returned by this iterator can be passed to the method getNamespaceURI to retrieve the URI of each namespace.
        Returns:
        an iterator over the namespace prefixes in this SOAPElement object

      • getVisibleNamespacePrefixes

        Iterator getVisibleNamespacePrefixes()
        Returns an Iterator over the namespace prefix Strings visible to this element. The prefixes returned by this iterator can be passed to the method getNamespaceURI to retrieve the URI of each namespace.
        Returns:
        an iterator over the namespace prefixes are within scope of this SOAPElement object
        Since:
        SAAJ 1.2

      • createQName

        QName createQName(String localName,
                  String prefix)
           throws SOAPException
        Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement. The remaining elements of the new QName are taken directly from the parameters, localName and prefix.
        Parameters:
        localName - a String containing the local part of the name.
        prefix - a String containing the prefix for the name.
        Returns:
        a QName with the specified localName and prefix, and with a namespace that is associated with the prefix in the context of this SOAPElement. This namespace will be the same as the one that would be returned by getNamespaceURI(String) if it were given prefix as it's parameter.
        Throws:
        SOAPException - if the QName cannot be created.
        Since:
        SAAJ 1.3

      • getElementName

        Name getElementName()
        Returns the name of this SOAPElement object.
        Returns:
        a Name object with the name of this SOAPElement object

      • getElementQName

        QName getElementQName()
        Returns the qname of this SOAPElement object.
        Returns:
        a QName object with the qname of this SOAPElement object
        Since:
        SAAJ 1.3
        See Also:
        getElementName()

      • setElementQName

        SOAPElement setElementQName(QName newName)
                     throws SOAPException
        Changes the name of this Element to newName if possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody etc. cannot have their names changed using this method. Any attempt to do so will result in a SOAPException being thrown.

        Callers should not rely on the element instance being renamed as is. Implementations could end up copying the content of the SOAPElement to a renamed instance.

        Parameters:
        newName - the new name for the Element.
        Returns:
        The renamed Node
        Throws:
        SOAPException - if changing the name of this Element is not allowed.
        Since:
        SAAJ 1.3

      • removeAttribute

        boolean removeAttribute(Name name)
        Removes the attribute with the specified name.
        Parameters:
        name - the Name object with the name of the attribute to be removed
        Returns:
        true if the attribute was removed successfully; false if it was not
        See Also:
        removeAttribute(javax.xml.namespace.QName)

      • removeAttribute

        boolean removeAttribute(QName qname)
        Removes the attribute with the specified qname.
        Parameters:
        qname - the QName object with the qname of the attribute to be removed
        Returns:
        true if the attribute was removed successfully; false if it was not
        Since:
        SAAJ 1.3
        See Also:
        removeAttribute(Name)

      • removeNamespaceDeclaration

        boolean removeNamespaceDeclaration(String prefix)
        Removes the namespace declaration corresponding to the given prefix.
        Parameters:
        prefix - a String giving the prefix for which to search
        Returns:
        true if the namespace declaration was removed successfully; false if it was not

      • getChildElements

        Iterator getChildElements()
        Returns an Iterator over all the immediate child Nodes of this element. This includes javax.xml.soap.Text objects as well as SOAPElement objects.

        Calling this method may cause child Element, SOAPElement and org.w3c.dom.Text nodes to be replaced by SOAPElement, SOAPHeaderElement, SOAPBodyElement or javax.xml.soap.Text nodes as appropriate for the type of this parent node. As a result the calling application must treat any existing references to these child nodes that have been obtained through DOM APIs as invalid and either discard them or refresh them with the values returned by this Iterator. This behavior can be avoided by calling the equivalent DOM APIs. See javax.xml.soap for more details.

        Returns:
        an iterator with the content of this SOAPElement object

      • getChildElements

        Iterator getChildElements(Name name)
        Returns an Iterator over all the immediate child Nodes of this element with the specified name. All of these children will be SOAPElement nodes.

        Calling this method may cause child Element, SOAPElement and org.w3c.dom.Text nodes to be replaced by SOAPElement, SOAPHeaderElement, SOAPBodyElement or javax.xml.soap.Text nodes as appropriate for the type of this parent node. As a result the calling application must treat any existing references to these child nodes that have been obtained through DOM APIs as invalid and either discard them or refresh them with the values returned by this Iterator. This behavior can be avoided by calling the equivalent DOM APIs. See javax.xml.soap for more details.

        Parameters:
        name - a Name object with the name of the child elements to be returned
        Returns:
        an Iterator object over all the elements in this SOAPElement object with the specified name
        See Also:
        getChildElements(javax.xml.namespace.QName)

      • getChildElements

        Iterator getChildElements(QName qname)
        Returns an Iterator over all the immediate child Nodes of this element with the specified qname. All of these children will be SOAPElement nodes.

        Calling this method may cause child Element, SOAPElement and org.w3c.dom.Text nodes to be replaced by SOAPElement, SOAPHeaderElement, SOAPBodyElement or javax.xml.soap.Text nodes as appropriate for the type of this parent node. As a result the calling application must treat any existing references to these child nodes that have been obtained through DOM APIs as invalid and either discard them or refresh them with the values returned by this Iterator. This behavior can be avoided by calling the equivalent DOM APIs. See javax.xml.soap for more details.

        Parameters:
        qname - a QName object with the qname of the child elements to be returned
        Returns:
        an Iterator object over all the elements in this SOAPElement object with the specified qname
        Since:
        SAAJ 1.3
        See Also:
        getChildElements(Name)

      • setEncodingStyle

        void setEncodingStyle(String encodingStyle)
               throws SOAPException
        Sets the encoding style for this SOAPElement object to one specified.
        Parameters:
        encodingStyle - a String giving the encoding style
        Throws:
        IllegalArgumentException - if there was a problem in the encoding style being set.
        SOAPException - if setting the encodingStyle is invalid for this SOAPElement.
        See Also:
        getEncodingStyle()

      • getEncodingStyle

        String getEncodingStyle()
        Returns the encoding style for this SOAPElement object.
        Returns:
        a String giving the encoding style
        See Also:
        setEncodingStyle(java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPElementFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPElementFactory

  • java.lang.Object
    • javax.xml.soap.SOAPElementFactory
  • Deprecated.
    - Use javax.xml.soap.SOAPFactory for creating SOAPElements.

    public class SOAPElementFactory
extends Object
    SOAPElementFactory is a factory for XML fragments that will eventually end up in the SOAP part. These fragments can be inserted as children of the SOAPHeader or SOAPBody or SOAPEnvelope.

    Elements created using this factory do not have the properties of an element that lives inside a SOAP header document. These elements are copied into the XML document tree when they are inserted.

    See Also:
    SOAPFactory

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      SOAPElement create(Name name)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
      SOAPElement create(String localName)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName) instead
      SOAPElement create(String localName, String prefix, String uri)
      Deprecated.
      Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix, String uri) instead
      static SOAPElementFactory newInstance()
      Deprecated.
      Creates a new instance of SOAPElementFactory.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • create

        public SOAPElement create(Name name)
                   throws SOAPException
        Deprecated. Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
        Create a SOAPElement object initialized with the given Name object.
        Parameters:
        name - a Name object with the XML name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        See Also:
        SOAPFactory.createElement(javax.xml.soap.Name), SOAPFactory.createElement(javax.xml.namespace.QName)

      • create

        public SOAPElement create(String localName)
                   throws SOAPException
        Deprecated. Use javax.xml.soap.SOAPFactory.createElement(String localName) instead
        Create a SOAPElement object initialized with the given local name.
        Parameters:
        localName - a String giving the local name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        See Also:
        SOAPFactory.createElement(java.lang.String)

      • create

        public SOAPElement create(String localName,
                          String prefix,
                          String uri)
                   throws SOAPException
        Deprecated. Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix, String uri) instead
        Create a new SOAPElement object with the given local name, prefix and uri.
        Parameters:
        localName - a String giving the local name for the new element
        prefix - the prefix for this SOAPElement
        uri - a String giving the URI of the namespace to which the new element belongs
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        See Also:
        SOAPFactory.createElement(java.lang.String, java.lang.String, java.lang.String)

      • newInstance

        public static SOAPElementFactory newInstance()
                                      throws SOAPException
        Deprecated.
        Creates a new instance of SOAPElementFactory.
        Returns:
        a new instance of a SOAPElementFactory
        Throws:
        SOAPException - if there was an error creating the default SOAPElementFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPEnvelope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPEnvelope

  • All Superinterfaces:
    Element, Node, SOAPElement

    public interface SOAPEnvelope
extends SOAPElement
    The container for the SOAPHeader and SOAPBody portions of a SOAPPart object. By default, a SOAPMessage object is created with a SOAPPart object that has a SOAPEnvelope object. The SOAPEnvelope object by default has an empty SOAPBody object and an empty SOAPHeader object. The SOAPBody object is required, and the SOAPHeader object, though optional, is used in the majority of cases. If the SOAPHeader object is not needed, it can be deleted, which is shown later.

    A client can access the SOAPHeader and SOAPBody objects by calling the methods SOAPEnvelope.getHeader and SOAPEnvelope.getBody. The following lines of code use these two methods after starting with the SOAPMessage object message to get the SOAPPart object sp, which is then used to get the SOAPEnvelope object se.

         SOAPPart sp = message.getSOAPPart();
     SOAPEnvelope se = sp.getEnvelope();
     SOAPHeader sh = se.getHeader();
     SOAPBody sb = se.getBody();

    It is possible to change the body or header of a SOAPEnvelope object by retrieving the current one, deleting it, and then adding a new body or header. The javax.xml.soap.Node method deleteNode deletes the XML element (node) on which it is called. For example, the following line of code deletes the SOAPBody object that is retrieved by the method getBody.

          se.getBody().detachNode();
    To create a SOAPHeader object to replace the one that was removed, a client uses the method SOAPEnvelope.addHeader, which creates a new header and adds it to the SOAPEnvelope object. Similarly, the method addBody creates a new SOAPBody object and adds it to the SOAPEnvelope object. The following code fragment retrieves the current header, removes it, and adds a new one. Then it retrieves the current body, removes it, and adds a new one.
         SOAPPart sp = message.getSOAPPart();
     SOAPEnvelope se = sp.getEnvelope();
     se.getHeader().detachNode();
     SOAPHeader sh = se.addHeader();
     se.getBody().detachNode();
     SOAPBody sb = se.addBody();
    It is an error to add a SOAPBody or SOAPHeader object if one already exists.

    The SOAPEnvelope interface provides three methods for creating Name objects. One method creates Name objects with a local name, a namespace prefix, and a namesapce URI. The second method creates Name objects with a local name and a namespace prefix, and the third creates Name objects with just a local name. The following line of code, in which se is a SOAPEnvelope object, creates a new Name object with all three.

         Name name = se.createName("GetLastTradePrice", "WOMBAT",
                                "http://www.wombat.org/trader");

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      SOAPBody addBody()
      Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.
      SOAPHeader addHeader()
      Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.
      Name createName(String localName)
      Creates a new Name object initialized with the given local name.
      Name createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      SOAPBody getBody()
      Returns the SOAPBody object associated with this SOAPEnvelope object.
      SOAPHeader getHeader()
      Returns the SOAPHeader object for this SOAPEnvelope object.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • createName

        Name createName(String localName,
                String prefix,
                String uri)
         throws SOAPException
        Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.

        This factory method creates Name objects for use in the SOAP/XML document.

        Parameters:
        localName - a String giving the local name
        prefix - a String giving the prefix of the namespace
        uri - a String giving the URI of the namespace
        Returns:
        a Name object initialized with the given local name, namespace prefix, and namespace URI
        Throws:
        SOAPException - if there is a SOAP error

      • createName

        Name createName(String localName)
         throws SOAPException
        Creates a new Name object initialized with the given local name.

        This factory method creates Name objects for use in the SOAP/XML document.

        Parameters:
        localName - a String giving the local name
        Returns:
        a Name object initialized with the given local name
        Throws:
        SOAPException - if there is a SOAP error

      • getHeader

        SOAPHeader getHeader()
              throws SOAPException
        Returns the SOAPHeader object for this SOAPEnvelope object.

        A new SOAPMessage object is by default created with a SOAPEnvelope object that contains an empty SOAPHeader object. As a result, the method getHeader will always return a SOAPHeader object unless the header has been removed and a new one has not been added.

        Returns:
        the SOAPHeader object or null if there is none
        Throws:
        SOAPException - if there is a problem obtaining the SOAPHeader object

      • getBody

        SOAPBody getBody()
          throws SOAPException
        Returns the SOAPBody object associated with this SOAPEnvelope object.

        A new SOAPMessage object is by default created with a SOAPEnvelope object that contains an empty SOAPBody object. As a result, the method getBody will always return a SOAPBody object unless the body has been removed and a new one has not been added.

        Returns:
        the SOAPBody object for this SOAPEnvelope object or null if there is none
        Throws:
        SOAPException - if there is a problem obtaining the SOAPBody object

      • addHeader

        SOAPHeader addHeader()
              throws SOAPException
        Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.

        It is illegal to add a header when the envelope already contains a header. Therefore, this method should be called only after the existing header has been removed.

        Returns:
        the new SOAPHeader object
        Throws:
        SOAPException - if this SOAPEnvelope object already contains a valid SOAPHeader object

      • addBody

        SOAPBody addBody()
          throws SOAPException
        Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.

        It is illegal to add a body when the envelope already contains a body. Therefore, this method should be called only after the existing body has been removed.

        Returns:
        the new SOAPBody object
        Throws:
        SOAPException - if this SOAPEnvelope object already contains a valid SOAPBody object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.soap.SOAPException
  • All Implemented Interfaces:
    Serializable

    public class SOAPException
extends Exception
    An exception that signals that a SOAP exception has occurred. A SOAPException object may contain a String that gives the reason for the exception, an embedded Throwable object, or both. This class provides methods for retrieving reason messages and for retrieving the embedded Throwable object.

    Typical reasons for throwing a SOAPException object are problems such as difficulty setting a header, not being able to send a message, and not being able to get a connection with the provider. Reasons for embedding a Throwable object include problems such as input/output errors or a parsing problem, such as an error in parsing a header.

    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPException()
      Constructs a SOAPException object with no reason or embedded Throwable object.
      SOAPException(String reason)
      Constructs a SOAPException object with the given String as the reason for the exception being thrown.
      SOAPException(String reason, Throwable cause)
      Constructs a SOAPException object with the given String as the reason for the exception being thrown and the given Throwable object as an embedded exception.
      SOAPException(Throwable cause)
      Constructs a SOAPException object initialized with the given Throwable object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the Throwable object embedded in this SOAPException if there is one.
      String getMessage()
      Returns the detail message for this SOAPException object.
      Throwable initCause(Throwable cause)
      Initializes the cause field of this SOAPException object with the given Throwable object.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SOAPException

        public SOAPException()
        Constructs a SOAPException object with no reason or embedded Throwable object.

      • SOAPException

        public SOAPException(String reason)
        Constructs a SOAPException object with the given String as the reason for the exception being thrown.
        Parameters:
        reason - a description of what caused the exception

      • SOAPException

        public SOAPException(String reason,
                     Throwable cause)
        Constructs a SOAPException object with the given String as the reason for the exception being thrown and the given Throwable object as an embedded exception.
        Parameters:
        reason - a description of what caused the exception
        cause - a Throwable object that is to be embedded in this SOAPException object

      • SOAPException

        public SOAPException(Throwable cause)
        Constructs a SOAPException object initialized with the given Throwable object.

    • Method Detail

      • getMessage

        public String getMessage()
        Returns the detail message for this SOAPException object.

        If there is an embedded Throwable object, and if the SOAPException object has no detail message of its own, this method will return the detail message from the embedded Throwable object.

        Overrides:
        getMessage in class Throwable
        Returns:
        the error or warning message for this SOAPException or, if it has none, the message of the embedded Throwable object, if there is one

      • getCause

        public Throwable getCause()
        Returns the Throwable object embedded in this SOAPException if there is one. Otherwise, this method returns null.
        Overrides:
        getCause in class Throwable
        Returns:
        the embedded Throwable object or null if there is none

      • initCause

        public Throwable initCause(Throwable cause)
        Initializes the cause field of this SOAPException object with the given Throwable object.

        This method can be called at most once. It is generally called from within the constructor or immediately after the constructor has returned a new SOAPException object. If this SOAPException object was created with the constructor SOAPException(Throwable) or SOAPException(String,Throwable), meaning that its cause field already has a value, this method cannot be called even once.

        Overrides:
        initCause in class Throwable
        Parameters:
        cause - the Throwable object that caused this SOAPException object to be thrown. The value of this parameter is saved for later retrieval by the getCause() method. A null value is permitted and indicates that the cause is nonexistent or unknown.
        Returns:
        a reference to this SOAPException instance
        Throws:
        IllegalArgumentException - if cause is this Throwable object. (A Throwable object cannot be its own cause.)
        IllegalStateException - if the cause for this SOAPException object has already been initialized
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPFactory

  • java.lang.Object
    • javax.xml.soap.SOAPFactory

  • public abstract class SOAPFactory
extends Object
    SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree. SOAPFactory can be used to create XML fragments that will eventually end up in the SOAP part. These fragments can be inserted as children of the SOAPHeaderElement or SOAPBodyElement or SOAPEnvelope or other SOAPElement objects. SOAPFactory also has methods to create javax.xml.soap.Detail objects as well as java.xml.soap.Name objects.

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Detail createDetail()
      Creates a new Detail object which serves as a container for DetailEntry objects.
      SOAPElement createElement(Element domElement)
      Creates a SOAPElement object from an existing DOM Element.
      abstract SOAPElement createElement(Name name)
      Creates a SOAPElement object initialized with the given Name object.
      SOAPElement createElement(QName qname)
      Creates a SOAPElement object initialized with the given QName object.
      abstract SOAPElement createElement(String localName)
      Creates a SOAPElement object initialized with the given local name.
      abstract SOAPElement createElement(String localName, String prefix, String uri)
      Creates a new SOAPElement object with the given local name, prefix and uri.
      abstract SOAPFault createFault()
      Creates a new default SOAPFault object
      abstract SOAPFault createFault(String reasonText, QName faultCode)
      Creates a new SOAPFault object initialized with the given reasonText and faultCode
      abstract Name createName(String localName)
      Creates a new Name object initialized with the given local name.
      abstract Name createName(String localName, String prefix, String uri)
      Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
      static SOAPFactory newInstance()
      Creates a new SOAPFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load: Use the javax.xml.soap.SOAPFactory system property.
      static SOAPFactory newInstance(String protocol)
      Creates a new SOAPFactory object that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SOAPFactory

        public SOAPFactory()

    • Method Detail

      • createElement

        public SOAPElement createElement(Element domElement)
                          throws SOAPException
        Creates a SOAPElement object from an existing DOM Element. If the DOM Element that is passed in as an argument is already a SOAPElement then this method must return it unmodified without any further work. Otherwise, a new SOAPElement is created and a deep copy is made of the domElement argument. The concrete type of the return value will depend on the name of the domElement argument. If any part of the tree rooted in domElement violates SOAP rules, a SOAPException will be thrown.
        Parameters:
        domElement - - the Element to be copied.
        Returns:
        a new SOAPElement that is a copy of domElement.
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        Since:
        SAAJ 1.3

      • createElement

        public abstract SOAPElement createElement(Name name)
                                   throws SOAPException
        Creates a SOAPElement object initialized with the given Name object. The concrete type of the return value will depend on the name given to the new SOAPElement. For instance, a new SOAPElement with the name "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a SOAPEnvelope that supports SOAP 1.2 behavior to be created.
        Parameters:
        name - a Name object with the XML name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        See Also:
        createElement(javax.xml.namespace.QName)

      • createElement

        public SOAPElement createElement(QName qname)
                          throws SOAPException
        Creates a SOAPElement object initialized with the given QName object. The concrete type of the return value will depend on the name given to the new SOAPElement. For instance, a new SOAPElement with the name "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a SOAPEnvelope that supports SOAP 1.2 behavior to be created.
        Parameters:
        qname - a QName object with the XML name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object
        Since:
        SAAJ 1.3
        See Also:
        createElement(Name)

      • createElement

        public abstract SOAPElement createElement(String localName)
                                   throws SOAPException
        Creates a SOAPElement object initialized with the given local name.
        Parameters:
        localName - a String giving the local name for the new element
        Returns:
        the new SOAPElement object that was created
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object

      • createElement

        public abstract SOAPElement createElement(String localName,
                                          String prefix,
                                          String uri)
                                   throws SOAPException
        Creates a new SOAPElement object with the given local name, prefix and uri. The concrete type of the return value will depend on the name given to the new SOAPElement. For instance, a new SOAPElement with the name "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a SOAPEnvelope that supports SOAP 1.2 behavior to be created.
        Parameters:
        localName - a String giving the local name for the new element
        prefix - the prefix for this SOAPElement
        uri - a String giving the URI of the namespace to which the new element belongs
        Throws:
        SOAPException - if there is an error in creating the SOAPElement object

      • createDetail

        public abstract Detail createDetail()
                             throws SOAPException
        Creates a new Detail object which serves as a container for DetailEntry objects.

        This factory method creates Detail objects for use in situations where it is not practical to use the SOAPFault abstraction.

        Returns:
        a Detail object
        Throws:
        SOAPException - if there is a SOAP error
        UnsupportedOperationException - if the protocol specified for the SOAPFactory was DYNAMIC_SOAP_PROTOCOL

      • createFault

        public abstract SOAPFault createFault(String reasonText,
                                      QName faultCode)
                               throws SOAPException
        Creates a new SOAPFault object initialized with the given reasonText and faultCode
        Parameters:
        reasonText - the ReasonText/FaultString for the fault
        faultCode - the FaultCode for the fault
        Returns:
        a SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.3

      • createFault

        public abstract SOAPFault createFault()
                               throws SOAPException
        Creates a new default SOAPFault object
        Returns:
        a SOAPFault object
        Throws:
        SOAPException - if there is a SOAP error
        Since:
        SAAJ 1.3

      • createName

        public abstract Name createName(String localName,
                                String prefix,
                                String uri)
                         throws SOAPException
        Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.

        This factory method creates Name objects for use in situations where it is not practical to use the SOAPEnvelope abstraction.

        Parameters:
        localName - a String giving the local name
        prefix - a String giving the prefix of the namespace
        uri - a String giving the URI of the namespace
        Returns:
        a Name object initialized with the given local name, namespace prefix, and namespace URI
        Throws:
        SOAPException - if there is a SOAP error

      • createName

        public abstract Name createName(String localName)
                         throws SOAPException
        Creates a new Name object initialized with the given local name.

        This factory method creates Name objects for use in situations where it is not practical to use the SOAPEnvelope abstraction.

        Parameters:
        localName - a String giving the local name
        Returns:
        a Name object initialized with the given local name
        Throws:
        SOAPException - if there is a SOAP error

      • newInstance

        public static SOAPFactory newInstance()
                               throws SOAPException
        Creates a new SOAPFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load:
        • Use the javax.xml.soap.SOAPFactory system property.
        • Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
        • Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.soap.SOAPFactory in jars available to the runtime.
        • Use the SAAJMetaFactory instance to locate the SOAPFactory implementation class.
        Returns:
        a new instance of a SOAPFactory
        Throws:
        SOAPException - if there was an error creating the default SOAPFactory
        See Also:
        SAAJMetaFactory

      • newInstance

        public static SOAPFactory newInstance(String protocol)
                               throws SOAPException
        Creates a new SOAPFactory object that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.
        Parameters:
        protocol - a string constant representing the protocol of the specified SOAP factory implementation. May be either DYNAMIC_SOAP_PROTOCOL, DEFAULT_SOAP_PROTOCOL (which is the same as) SOAP_1_1_PROTOCOL, or SOAP_1_2_PROTOCOL.
        Returns:
        a new instance of a SOAPFactory
        Throws:
        SOAPException - if there was an error creating the specified SOAPFactory
        Since:
        SAAJ 1.3
        See Also:
        SAAJMetaFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPFault

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPFault

  • All Superinterfaces:
    Element, Node, SOAPBodyElement, SOAPElement

    public interface SOAPFault
extends SOAPBodyElement
    An element in the SOAPBody object that contains error and/or status information. This information may relate to errors in the SOAPMessage object or to problems that are not related to the content in the message itself. Problems not related to the message itself are generally errors in processing, such as the inability to communicate with an upstream server.

    Depending on the protocol specified while creating the MessageFactory instance, a SOAPFault has sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Detail addDetail()
      Creates an optional Detail object and sets it as the Detail object for this SOAPFault object.
      void addFaultReasonText(String text, Locale locale)
      Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived from locale.
      void appendFaultSubcode(QName subcode)
      Adds a Subcode to the end of the sequence of Subcodes contained by this SOAPFault.
      Detail getDetail()
      Returns the optional detail element for this SOAPFault object.
      String getFaultActor()
      Gets the fault actor for this SOAPFault object.
      String getFaultCode()
      Gets the fault code for this SOAPFault object.
      Name getFaultCodeAsName()
      Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object.
      QName getFaultCodeAsQName()
      Gets the fault code for this SOAPFault object as a QName object.
      String getFaultNode()
      Returns the optional Node element value for this SOAPFault object.
      Iterator getFaultReasonLocales()
      Returns an Iterator over a distinct sequence of Locales for which there are associated Reason Text items.
      String getFaultReasonText(Locale locale)
      Returns the Reason Text associated with the given Locale.
      Iterator getFaultReasonTexts()
      Returns an Iterator over a sequence of String objects containing all of the Reason Text items for this SOAPFault.
      String getFaultRole()
      Returns the optional Role element value for this SOAPFault object.
      String getFaultString()
      Gets the fault string for this SOAPFault object.
      Locale getFaultStringLocale()
      Gets the locale of the fault string for this SOAPFault object.
      Iterator getFaultSubcodes()
      Gets the Subcodes for this SOAPFault as an iterator over QNames.
      boolean hasDetail()
      Returns true if this SOAPFault has a Detail subelement and false otherwise.
      void removeAllFaultSubcodes()
      Removes any Subcodes that may be contained by this SOAPFault.
      void setFaultActor(String faultActor)
      Sets this SOAPFault object with the given fault actor.
      void setFaultCode(Name faultCodeQName)
      Sets this SOAPFault object with the given fault code.
      void setFaultCode(QName faultCodeQName)
      Sets this SOAPFault object with the given fault code.
      void setFaultCode(String faultCode)
      Sets this SOAPFault object with the give fault code.
      void setFaultNode(String uri)
      Creates or replaces any existing Node element value for this SOAPFault object.
      void setFaultRole(String uri)
      Creates or replaces any existing Role element value for this SOAPFault object.
      void setFaultString(String faultString)
      Sets the fault string for this SOAPFault object to the given string.
      void setFaultString(String faultString, Locale locale)
      Sets the fault string for this SOAPFault object to the given string and localized to the given locale.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • setFaultCode

        void setFaultCode(Name faultCodeQName)
           throws SOAPException
        Sets this SOAPFault object with the given fault code.

        Fault codes, which give information about the fault, are defined in the SOAP 1.1 specification. A fault code is mandatory and must be of type Name. This method provides a convenient way to set a fault code. For example,

         SOAPEnvelope se = ...;
 // Create a qualified name in the SOAP namespace with a localName
 // of "Client". Note that prefix parameter is optional and is null
 // here which causes the implementation to use an appropriate prefix.
 Name qname = se.createName("Client", null,
                            SOAPConstants.URI_NS_SOAP_ENVELOPE);
 SOAPFault fault = ...;
 fault.setFaultCode(qname);
        It is preferable to use this method over setFaultCode(String).
        Parameters:
        faultCodeQName - a Name object giving the fault code to be set. It must be namespace qualified.
        Throws:
        SOAPException - if there was an error in adding the faultcode element to the underlying XML tree.
        Since:
        SAAJ 1.2
        See Also:
        getFaultCodeAsName()

      • setFaultCode

        void setFaultCode(QName faultCodeQName)
           throws SOAPException
        Sets this SOAPFault object with the given fault code. It is preferable to use this method over setFaultCode(Name).
        Parameters:
        faultCodeQName - a QName object giving the fault code to be set. It must be namespace qualified.
        Throws:
        SOAPException - if there was an error in adding the faultcode element to the underlying XML tree.
        Since:
        SAAJ 1.3
        See Also:
        getFaultCodeAsQName(), setFaultCode(Name), getFaultCodeAsQName()

      • setFaultCode

        void setFaultCode(String faultCode)
           throws SOAPException
        Sets this SOAPFault object with the give fault code.

        Fault codes, which given information about the fault, are defined in the SOAP 1.1 specification. This element is mandatory in SOAP 1.1. Because the fault code is required to be a QName it is preferable to use the setFaultCode(Name) form of this method.

        Parameters:
        faultCode - a String giving the fault code to be set. It must be of the form "prefix:localName" where the prefix has been defined in a namespace declaration.
        Throws:
        SOAPException - if there was an error in adding the faultCode to the underlying XML tree.
        See Also:
        setFaultCode(Name), getFaultCode(), SOAPElement.addNamespaceDeclaration(java.lang.String, java.lang.String)

      • getFaultCodeAsName

        Name getFaultCodeAsName()
        Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object. The SOAP 1.1 specification requires the value of the "faultcode" element to be of type QName. This method returns the content of the element as a QName in the form of a SAAJ Name object. This method should be used instead of the getFaultCode method since it allows applications to easily access the namespace name without additional parsing.
        Returns:
        a Name representing the faultcode
        Since:
        SAAJ 1.2
        See Also:
        setFaultCode(Name)

      • getFaultCodeAsQName

        QName getFaultCodeAsQName()
        Gets the fault code for this SOAPFault object as a QName object.
        Returns:
        a QName representing the faultcode
        Since:
        SAAJ 1.3
        See Also:
        setFaultCode(QName)

      • getFaultSubcodes

        Iterator getFaultSubcodes()
        Gets the Subcodes for this SOAPFault as an iterator over QNames.
        Returns:
        an Iterator that accesses a sequence of QNames. This Iterator should not support the optional remove method. The order in which the Subcodes are returned reflects the hierarchy of Subcodes present in the fault from top to bottom.
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Subcode.
        Since:
        SAAJ 1.3

      • removeAllFaultSubcodes

        void removeAllFaultSubcodes()
        Removes any Subcodes that may be contained by this SOAPFault. Subsequent calls to getFaultSubcodes will return an empty iterator until a call to appendFaultSubcode is made.
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Subcode.
        Since:
        SAAJ 1.3

      • appendFaultSubcode

        void appendFaultSubcode(QName subcode)
                 throws SOAPException
        Adds a Subcode to the end of the sequence of Subcodes contained by this SOAPFault. Subcodes, which were introduced in SOAP 1.2, are represented by a recursive sequence of subelements rooted in the mandatory Code subelement of a SOAP Fault.
        Parameters:
        subcode - a QName containing the Value of the Subcode.
        Throws:
        SOAPException - if there was an error in setting the Subcode
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Subcode.
        Since:
        SAAJ 1.3

      • getFaultCode

        String getFaultCode()
        Gets the fault code for this SOAPFault object.
        Returns:
        a String with the fault code
        See Also:
        getFaultCodeAsName(), setFaultCode(javax.xml.soap.Name)

      • setFaultActor

        void setFaultActor(String faultActor)
            throws SOAPException
        Sets this SOAPFault object with the given fault actor.

        The fault actor is the recipient in the message path who caused the fault to happen.

        If this SOAPFault supports SOAP 1.2 then this call is equivalent to setFaultRole(String)

        Parameters:
        faultActor - a String identifying the actor that caused this SOAPFault object
        Throws:
        SOAPException - if there was an error in adding the faultActor to the underlying XML tree.
        See Also:
        getFaultActor()

      • getFaultActor

        String getFaultActor()
        Gets the fault actor for this SOAPFault object.

        If this SOAPFault supports SOAP 1.2 then this call is equivalent to getFaultRole()

        Returns:
        a String giving the actor in the message path that caused this SOAPFault object
        See Also:
        setFaultActor(java.lang.String)

      • setFaultString

        void setFaultString(String faultString)
             throws SOAPException
        Sets the fault string for this SOAPFault object to the given string.

        If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

              addFaultReasonText(faultString, Locale.getDefault());
        Parameters:
        faultString - a String giving an explanation of the fault
        Throws:
        SOAPException - if there was an error in adding the faultString to the underlying XML tree.
        See Also:
        getFaultString()

      • setFaultString

        void setFaultString(String faultString,
                    Locale locale)
             throws SOAPException
        Sets the fault string for this SOAPFault object to the given string and localized to the given locale.

        If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

              addFaultReasonText(faultString, locale);
        Parameters:
        faultString - a String giving an explanation of the fault
        locale - a Locale object indicating the native language of the faultString
        Throws:
        SOAPException - if there was an error in adding the faultString to the underlying XML tree.
        Since:
        SAAJ 1.2
        See Also:
        getFaultString()

      • getFaultString

        String getFaultString()
        Gets the fault string for this SOAPFault object.

        If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

            String reason = null;
    try {
        reason = (String) getFaultReasonTexts().next();
    } catch (SOAPException e) {}
    return reason;
        Returns:
        a String giving an explanation of the fault
        See Also:
        setFaultString(String), setFaultString(String, Locale)

      • getFaultStringLocale

        Locale getFaultStringLocale()
        Gets the locale of the fault string for this SOAPFault object.

        If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

            Locale locale = null;
    try {
        locale = (Locale) getFaultReasonLocales().next();
    } catch (SOAPException e) {}
    return locale;
        Returns:
        a Locale object indicating the native language of the fault string or null if no locale was specified
        Since:
        SAAJ 1.2
        See Also:
        setFaultString(String, Locale)

      • hasDetail

        boolean hasDetail()
        Returns true if this SOAPFault has a Detail subelement and false otherwise. Equivalent to (getDetail()!=null).
        Returns:
        true if this SOAPFault has a Detail subelement and false otherwise.
        Since:
        SAAJ 1.3

      • getDetail

        Detail getDetail()
        Returns the optional detail element for this SOAPFault object.

        A Detail object carries application-specific error information, the scope of the error information is restricted to faults in the SOAPBodyElement objects if this is a SOAP 1.1 Fault.

        Returns:
        a Detail object with application-specific error information if present, null otherwise

      • addDetail

        Detail addDetail()
          throws SOAPException
        Creates an optional Detail object and sets it as the Detail object for this SOAPFault object.

        It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.

        Returns:
        the new Detail object
        Throws:
        SOAPException - if this SOAPFault object already contains a valid Detail object

      • getFaultReasonLocales

        Iterator getFaultReasonLocales()
                        throws SOAPException
        Returns an Iterator over a distinct sequence of Locales for which there are associated Reason Text items. Any of these Locales can be used in a call to getFaultReasonText in order to obtain a localized version of the Reason Text string.
        Returns:
        an Iterator over a sequence of Locale objects for which there are associated Reason Text items.
        Throws:
        SOAPException - if there was an error in retrieving the fault Reason locales.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Reason.
        Since:
        SAAJ 1.3

      • getFaultReasonTexts

        Iterator getFaultReasonTexts()
                      throws SOAPException
        Returns an Iterator over a sequence of String objects containing all of the Reason Text items for this SOAPFault.
        Returns:
        an Iterator over env:Fault/env:Reason/env:Text items.
        Throws:
        SOAPException - if there was an error in retrieving the fault Reason texts.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Reason.
        Since:
        SAAJ 1.3

      • getFaultReasonText

        String getFaultReasonText(Locale locale)
                   throws SOAPException
        Returns the Reason Text associated with the given Locale. If more than one such Reason Text exists the first matching Text is returned
        Parameters:
        locale - -- the Locale for which a localized Reason Text is desired
        Returns:
        the Reason Text associated with locale
        Throws:
        SOAPException - if there was an error in retrieving the fault Reason text for the specified locale .
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Reason.
        Since:
        SAAJ 1.3
        See Also:
        getFaultString()

      • addFaultReasonText

        void addFaultReasonText(String text,
                        Locale locale)
                 throws SOAPException
        Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived from locale. If a Reason Text item with this xml:lang already exists its text value will be replaced with text. The locale parameter should not be null

        Code sample:

         SOAPFault fault = ...;
 fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
        Parameters:
        text - -- reason message string
        locale - -- Locale object representing the locale of the message
        Throws:
        SOAPException - if there was an error in adding the Reason text or the locale passed was null.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Reason.
        Since:
        SAAJ 1.3

      • getFaultNode

        String getFaultNode()
        Returns the optional Node element value for this SOAPFault object. The Node element is optional in SOAP 1.2.
        Returns:
        Content of the env:Fault/env:Node element as a String or null if none
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Node.
        Since:
        SAAJ 1.3

      • setFaultNode

        void setFaultNode(String uri)
           throws SOAPException
        Creates or replaces any existing Node element value for this SOAPFault object. The Node element is optional in SOAP 1.2.
        Throws:
        SOAPException - if there was an error in setting the Node for this SOAPFault object.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Node.
        Since:
        SAAJ 1.3

      • getFaultRole

        String getFaultRole()
        Returns the optional Role element value for this SOAPFault object. The Role element is optional in SOAP 1.2.
        Returns:
        Content of the env:Fault/env:Role element as a String or null if none
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Role.
        Since:
        SAAJ 1.3

      • setFaultRole

        void setFaultRole(String uri)
           throws SOAPException
        Creates or replaces any existing Role element value for this SOAPFault object. The Role element is optional in SOAP 1.2.
        Parameters:
        uri - - the URI of the Role
        Throws:
        SOAPException - if there was an error in setting the Role for this SOAPFault object.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Role.
        Since:
        SAAJ 1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPHeader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPHeader

  • All Superinterfaces:
    Element, Node, SOAPElement

    public interface SOAPHeader
extends SOAPElement
    A representation of the SOAP header element. A SOAP header element consists of XML data that affects the way the application-specific content is processed by the message provider. For example, transaction semantics, authentication information, and so on, can be specified as the content of a SOAPHeader object.

    A SOAPEnvelope object contains an empty SOAPHeader object by default. If the SOAPHeader object, which is optional, is not needed, it can be retrieved and deleted with the following line of code. The variable se is a SOAPEnvelope object.

          se.getHeader().detachNode();
    A SOAPHeader object is created with the SOAPEnvelope method addHeader. This method, which creates a new header and adds it to the envelope, may be called only after the existing header has been removed.
          se.getHeader().detachNode();
      SOAPHeader sh = se.addHeader();

    A SOAPHeader object can have only SOAPHeaderElement objects as its immediate children. The method addHeaderElement creates a new HeaderElement object and adds it to the SOAPHeader object. In the following line of code, the argument to the method addHeaderElement is a Name object that is the name for the new HeaderElement object.

          SOAPHeaderElement shElement = sh.addHeaderElement(name);
    See Also:
    SOAPHeaderElement

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      SOAPHeaderElement addHeaderElement(Name name)
      Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPHeaderElement addHeaderElement(QName qname)
      Creates a new SOAPHeaderElement object initialized with the specified qname and adds it to this SOAPHeader object.
      SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
      Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
      SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object.
      SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified supported SOAP URI and adds it to this SOAPHeader object.
      SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
      Creates a new Upgrade SOAPHeaderElement object initialized with the specified array of supported SOAP URIs and adds it to this SOAPHeader object.
      Iterator examineAllHeaderElements()
      Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object.
      Iterator examineHeaderElements(String actor)
      Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor.
      Iterator examineMustUnderstandHeaderElements(String actor)
      Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent to true.
      Iterator extractAllHeaderElements()
      Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object and detaches them from this SOAPHeader object.
      Iterator extractHeaderElements(String actor)
      Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and detaches them from this SOAPHeader object.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • addHeaderElement

        SOAPHeaderElement addHeaderElement(Name name)
                            throws SOAPException
        Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
        Parameters:
        name - a Name object with the name of the new SOAPHeaderElement object
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs
        See Also:
        addHeaderElement(javax.xml.namespace.QName)

      • addHeaderElement

        SOAPHeaderElement addHeaderElement(QName qname)
                            throws SOAPException
        Creates a new SOAPHeaderElement object initialized with the specified qname and adds it to this SOAPHeader object.
        Parameters:
        qname - a QName object with the qname of the new SOAPHeaderElement object
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs
        Since:
        SAAJ 1.3
        See Also:
        addHeaderElement(Name)

      • examineMustUnderstandHeaderElements

        Iterator examineMustUnderstandHeaderElements(String actor)
        Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent to true.

        In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.

        Parameters:
        actor - a String giving the URI of the actor / role for which to search
        Returns:
        an Iterator object over all the SOAPHeaderElement objects that contain the specified actor / role and are marked as MustUnderstand
        Since:
        SAAJ 1.2
        See Also:
        examineHeaderElements(java.lang.String), extractHeaderElements(java.lang.String), SOAPConstants.URI_SOAP_ACTOR_NEXT

      • examineHeaderElements

        Iterator examineHeaderElements(String actor)
        Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor. An actor is a global attribute that indicates the intermediate parties that should process a message before it reaches its ultimate receiver. An actor receives the message and processes it before sending it on to the next actor. The default actor is the ultimate intended recipient for the message, so if no actor attribute is included in a SOAPHeader object, it is sent to the ultimate receiver along with the message body.

        In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.

        Parameters:
        actor - a String giving the URI of the actor / role for which to search
        Returns:
        an Iterator object over all the SOAPHeaderElement objects that contain the specified actor / role
        See Also:
        extractHeaderElements(java.lang.String), SOAPConstants.URI_SOAP_ACTOR_NEXT

      • extractHeaderElements

        Iterator extractHeaderElements(String actor)
        Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and detaches them from this SOAPHeader object.

        This method allows an actor to process the parts of the SOAPHeader object that apply to it and to remove them before passing the message on to the next actor.

        In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.

        Parameters:
        actor - a String giving the URI of the actor / role for which to search
        Returns:
        an Iterator object over all the SOAPHeaderElement objects that contain the specified actor / role
        See Also:
        examineHeaderElements(java.lang.String), SOAPConstants.URI_SOAP_ACTOR_NEXT

      • addNotUnderstoodHeaderElement

        SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
                                         throws SOAPException
        Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object. This operation is supported only by SOAP 1.2.
        Parameters:
        name - a QName object with the name of the SOAPHeaderElement object that was not understood.
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs.
        UnsupportedOperationException - if this is a SOAP 1.1 Header.
        Since:
        SAAJ 1.3

      • addUpgradeHeaderElement

        SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
                                   throws SOAPException
        Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
        Parameters:
        supportedSOAPURIs - an Iterator object with the URIs of SOAP versions supported.
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs.
        Since:
        SAAJ 1.3

      • addUpgradeHeaderElement

        SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
                                   throws SOAPException
        Creates a new Upgrade SOAPHeaderElement object initialized with the specified array of supported SOAP URIs and adds it to this SOAPHeader object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
        Parameters:
        supportedSoapUris - an array of the URIs of SOAP versions supported.
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs.
        Since:
        SAAJ 1.3

      • addUpgradeHeaderElement

        SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
                                   throws SOAPException
        Creates a new Upgrade SOAPHeaderElement object initialized with the specified supported SOAP URI and adds it to this SOAPHeader object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
        Parameters:
        supportedSoapUri - the URI of SOAP the version that is supported.
        Returns:
        the new SOAPHeaderElement object that was inserted into this SOAPHeader object
        Throws:
        SOAPException - if a SOAP error occurs.
        Since:
        SAAJ 1.3

      • examineAllHeaderElements

        Iterator examineAllHeaderElements()
        Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object.
        Returns:
        an Iterator object over all the SOAPHeaderElement objects contained by this SOAPHeader
        Since:
        SAAJ 1.2
        See Also:
        extractAllHeaderElements()

      • extractAllHeaderElements

        Iterator extractAllHeaderElements()
        Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object and detaches them from this SOAPHeader object.
        Returns:
        an Iterator object over all the SOAPHeaderElement objects contained by this SOAPHeader
        Since:
        SAAJ 1.2
        See Also:
        examineAllHeaderElements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPHeaderElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface SOAPHeaderElement

  • All Superinterfaces:
    Element, Node, SOAPElement

    public interface SOAPHeaderElement
extends SOAPElement
    An object representing the contents in the SOAP header part of the SOAP envelope. The immediate children of a SOAPHeader object can be represented only as SOAPHeaderElement objects.

    A SOAPHeaderElement object can have other SOAPElement objects as its children.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getActor()
      Returns the uri of the actor attribute of this SOAPHeaderElement.
      boolean getMustUnderstand()
      Returns the boolean value of the mustUnderstand attribute for this SOAPHeaderElement.
      boolean getRelay()
      Returns the boolean value of the relay attribute for this SOAPHeaderElement
      String getRole()
      Returns the value of the Role attribute of this SOAPHeaderElement.
      void setActor(String actorURI)
      Sets the actor associated with this SOAPHeaderElement object to the specified actor.
      void setMustUnderstand(boolean mustUnderstand)
      Sets the mustUnderstand attribute for this SOAPHeaderElement object to be either true or false.
      void setRelay(boolean relay)
      Sets the relay attribute for this SOAPHeaderElement to be either true or false.
      void setRole(String uri)
      Sets the Role associated with this SOAPHeaderElement object to the specified Role.

      • Methods inherited from interface javax.xml.soap.SOAPElement

        addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Element

        getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • setActor

        void setActor(String actorURI)
        Sets the actor associated with this SOAPHeaderElement object to the specified actor. The default value of an actor is: SOAPConstants.URI_SOAP_ACTOR_NEXT

        If this SOAPHeaderElement supports SOAP 1.2 then this call is equivalent to setRole(String)

        Parameters:
        actorURI - a String giving the URI of the actor to set
        Throws:
        IllegalArgumentException - if there is a problem in setting the actor.
        See Also:
        getActor()

      • setRole

        void setRole(String uri)
      throws SOAPException
        Sets the Role associated with this SOAPHeaderElement object to the specified Role.
        Parameters:
        uri - - the URI of the Role
        Throws:
        SOAPException - if there is an error in setting the role
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Role.
        Since:
        SAAJ 1.3

      • getActor

        String getActor()
        Returns the uri of the actor attribute of this SOAPHeaderElement.

        If this SOAPHeaderElement supports SOAP 1.2 then this call is equivalent to getRole()

        Returns:
        a String giving the URI of the actor
        See Also:
        setActor(java.lang.String)

      • getRole

        String getRole()
        Returns the value of the Role attribute of this SOAPHeaderElement.
        Returns:
        a String giving the URI of the Role
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Fault Role.
        Since:
        SAAJ 1.3

      • setMustUnderstand

        void setMustUnderstand(boolean mustUnderstand)
        Sets the mustUnderstand attribute for this SOAPHeaderElement object to be either true or false.

        If the mustUnderstand attribute is on, the actor who receives the SOAPHeaderElement must process it correctly. This ensures, for example, that if the SOAPHeaderElement object modifies the message, that the message is being modified correctly.

        Parameters:
        mustUnderstand - true to set the mustUnderstand attribute to true; false to set it to false
        Throws:
        IllegalArgumentException - if there is a problem in setting the mustUnderstand attribute
        See Also:
        getMustUnderstand(), setRelay(boolean)

      • getMustUnderstand

        boolean getMustUnderstand()
        Returns the boolean value of the mustUnderstand attribute for this SOAPHeaderElement.
        Returns:
        true if the mustUnderstand attribute of this SOAPHeaderElement object is turned on; false otherwise

      • setRelay

        void setRelay(boolean relay)
       throws SOAPException
        Sets the relay attribute for this SOAPHeaderElement to be either true or false.

        The SOAP relay attribute is set to true to indicate that the SOAP header block must be relayed by any node that is targeted by the header block but not actually process it. This attribute is ignored on header blocks whose mustUnderstand attribute is set to true or that are targeted at the ultimate reciever (which is the default). The default value of this attribute is false.

        Parameters:
        relay - the new value of the relay attribute
        Throws:
        SOAPException - if there is a problem in setting the relay attribute.
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Relay attribute.
        Since:
        SAAJ 1.3
        See Also:
        setMustUnderstand(boolean), getRelay()

      • getRelay

        boolean getRelay()
        Returns the boolean value of the relay attribute for this SOAPHeaderElement
        Returns:
        true if the relay attribute is turned on; false otherwise
        Throws:
        UnsupportedOperationException - if this message does not support the SOAP 1.2 concept of Relay attribute.
        Since:
        SAAJ 1.3
        See Also:
        getMustUnderstand(), setRelay(boolean)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPMessage

  • java.lang.Object
    • javax.xml.soap.SOAPMessage

  • public abstract class SOAPMessage
extends Object
    The root class for all SOAP messages. As transmitted on the "wire", a SOAP message is an XML document or a MIME message whose first body part is an XML/SOAP document.

    A SOAPMessage object consists of a SOAP part and optionally one or more attachment parts. The SOAP part for a SOAPMessage object is a SOAPPart object, which contains information used for message routing and identification, and which can contain application-specific content. All data in the SOAP Part of a message must be in XML format.

    A new SOAPMessage object contains the following by default:

    • A SOAPPart object
    • A SOAPEnvelope object
    • A SOAPBody object
    • A SOAPHeader object
    The SOAP part of a message can be retrieved by calling the method SOAPMessage.getSOAPPart(). The SOAPEnvelope object is retrieved from the SOAPPart object, and the SOAPEnvelope object is used to retrieve the SOAPBody and SOAPHeader objects.
         SOAPPart sp = message.getSOAPPart();
     SOAPEnvelope se = sp.getEnvelope();
     SOAPBody sb = se.getBody();
     SOAPHeader sh = se.getHeader();

    In addition to the mandatory SOAPPart object, a SOAPMessage object may contain zero or more AttachmentPart objects, each of which contains application-specific data. The SOAPMessage interface provides methods for creating AttachmentPart objects and also for adding them to a SOAPMessage object. A party that has received a SOAPMessage object can examine its contents by retrieving individual attachment parts.

    Unlike the rest of a SOAP message, an attachment is not required to be in XML format and can therefore be anything from simple text to an image file. Consequently, any message content that is not in XML format must be in an AttachmentPart object.

    A MessageFactory object may create SOAPMessage objects with behavior that is specialized to a particular implementation or application of SAAJ. For instance, a MessageFactory object may produce SOAPMessage objects that conform to a particular Profile such as ebXML. In this case a MessageFactory object might produce SOAPMessage objects that are initialized with ebXML headers.

    In order to ensure backward source compatibility, methods that are added to this class after version 1.1 of the SAAJ specification are all concrete instead of abstract and they all have default implementations. Unless otherwise noted in the JavaDocs for those methods the default implementations simply throw an UnsupportedOperationException and the SAAJ implementation code must override them with methods that provide the specified behavior. Legacy client code does not have this restriction, however, so long as there is no claim made that it conforms to some later version of the specification than it was originally written for. A legacy class that extends the SOAPMessage class can be compiled and/or run against succeeding versions of the SAAJ API without modification. If such a class was correctly implemented then it will continue to behave correctly relative to the version of the specification against which it was written.

    See Also:
    MessageFactory, AttachmentPart

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String CHARACTER_SET_ENCODING
      Specifies the character type encoding for the SOAP Message.
      static String WRITE_XML_DECLARATION
      Specifies whether the SOAP Message will contain an XML declaration when it is sent.

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPMessage()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void addAttachmentPart(AttachmentPart AttachmentPart)
      Adds the given AttachmentPart object to this SOAPMessage object.
      abstract int countAttachments()
      Gets a count of the number of attachments in this message.
      abstract AttachmentPart createAttachmentPart()
      Creates a new empty AttachmentPart object.
      AttachmentPart createAttachmentPart(DataHandler dataHandler)
      Creates an AttachmentPart object and populates it using the given DataHandler object.
      AttachmentPart createAttachmentPart(Object content, String contentType)
      Creates an AttachmentPart object and populates it with the specified data of the specified content type.
      abstract AttachmentPart getAttachment(SOAPElement element)
      Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists.
      abstract Iterator getAttachments()
      Retrieves all the AttachmentPart objects that are part of this SOAPMessage object.
      abstract Iterator getAttachments(MimeHeaders headers)
      Retrieves all the AttachmentPart objects that have header entries that match the specified headers.
      abstract String getContentDescription()
      Retrieves a description of this SOAPMessage object's content.
      abstract MimeHeaders getMimeHeaders()
      Returns all the transport-specific MIME headers for this SOAPMessage object in a transport-independent fashion.
      Object getProperty(String property)
      Retrieves value of the specified property.
      SOAPBody getSOAPBody()
      Gets the SOAP Body contained in this SOAPMessage object.
      SOAPHeader getSOAPHeader()
      Gets the SOAP Header contained in this SOAPMessage object.
      abstract SOAPPart getSOAPPart()
      Gets the SOAP part of this SOAPMessage object.
      abstract void removeAllAttachments()
      Removes all AttachmentPart objects that have been added to this SOAPMessage object.
      abstract void removeAttachments(MimeHeaders headers)
      Removes all the AttachmentPart objects that have header entries that match the specified headers.
      abstract void saveChanges()
      Updates this SOAPMessage object with all the changes that have been made to it.
      abstract boolean saveRequired()
      Indicates whether this SOAPMessage object needs to have the method saveChanges called on it.
      abstract void setContentDescription(String description)
      Sets the description of this SOAPMessage object's content with the given description.
      void setProperty(String property, Object value)
      Associates the specified value with the specified property.
      abstract void writeTo(OutputStream out)
      Writes this SOAPMessage object to the given output stream.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • CHARACTER_SET_ENCODING

        public static final String CHARACTER_SET_ENCODING
        Specifies the character type encoding for the SOAP Message. Valid values include "utf-8" and "utf-16". See vendor documentation for additional supported values. The default is "utf-8".
        Since:
        SAAJ 1.2
        See Also:
        SOAPMessage.setProperty, Constant Field Values

      • WRITE_XML_DECLARATION

        public static final String WRITE_XML_DECLARATION
        Specifies whether the SOAP Message will contain an XML declaration when it is sent. The only valid values are "true" and "false". The default is "false".
        Since:
        SAAJ 1.2
        See Also:
        SOAPMessage.setProperty, Constant Field Values

    • Constructor Detail

      • SOAPMessage

        public SOAPMessage()

    • Method Detail

      • setContentDescription

        public abstract void setContentDescription(String description)
        Sets the description of this SOAPMessage object's content with the given description.
        Parameters:
        description - a String describing the content of this message
        See Also:
        getContentDescription()

      • getContentDescription

        public abstract String getContentDescription()
        Retrieves a description of this SOAPMessage object's content.
        Returns:
        a String describing the content of this message or null if no description has been set
        See Also:
        setContentDescription(java.lang.String)

      • getSOAPPart

        public abstract SOAPPart getSOAPPart()
        Gets the SOAP part of this SOAPMessage object.

        SOAPMessage object contains one or more attachments, the SOAP Part must be the first MIME body part in the message.

        Returns:
        the SOAPPart object for this SOAPMessage object

      • getSOAPBody

        public SOAPBody getSOAPBody()
                     throws SOAPException
        Gets the SOAP Body contained in this SOAPMessage object.

        Returns:
        the SOAPBody object contained by this SOAPMessage object
        Throws:
        SOAPException - if the SOAP Body does not exist or cannot be retrieved
        Since:
        SAAJ 1.2

      • getSOAPHeader

        public SOAPHeader getSOAPHeader()
                         throws SOAPException
        Gets the SOAP Header contained in this SOAPMessage object.

        Returns:
        the SOAPHeader object contained by this SOAPMessage object
        Throws:
        SOAPException - if the SOAP Header does not exist or cannot be retrieved
        Since:
        SAAJ 1.2

      • removeAllAttachments

        public abstract void removeAllAttachments()
        Removes all AttachmentPart objects that have been added to this SOAPMessage object.

        This method does not touch the SOAP part.

      • countAttachments

        public abstract int countAttachments()
        Gets a count of the number of attachments in this message. This count does not include the SOAP part.
        Returns:
        the number of AttachmentPart objects that are part of this SOAPMessage object

      • getAttachments

        public abstract Iterator getAttachments()
        Retrieves all the AttachmentPart objects that are part of this SOAPMessage object.
        Returns:
        an iterator over all the attachments in this message

      • getAttachments

        public abstract Iterator getAttachments(MimeHeaders headers)
        Retrieves all the AttachmentPart objects that have header entries that match the specified headers. Note that a returned attachment could have headers in addition to those specified.
        Parameters:
        headers - a MimeHeaders object containing the MIME headers for which to search
        Returns:
        an iterator over all attachments that have a header that matches one of the given headers

      • removeAttachments

        public abstract void removeAttachments(MimeHeaders headers)
        Removes all the AttachmentPart objects that have header entries that match the specified headers. Note that the removed attachment could have headers in addition to those specified.
        Parameters:
        headers - a MimeHeaders object containing the MIME headers for which to search
        Since:
        SAAJ 1.3

      • getAttachment

        public abstract AttachmentPart getAttachment(SOAPElement element)
                                      throws SOAPException
        Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists. References can be made via an href attribute as described in SOAP Messages with Attachments, or via a single Text child node containing a URI as described in the WS-I Attachments Profile 1.0 for elements of schema type ref:swaRef. These two mechanisms must be supported. The support for references via href attribute also implies that this method should also be supported on an element that is an xop:Include element ( XOP). other reference mechanisms may be supported by individual implementations of this standard. Contact your vendor for details.
        Parameters:
        element - The SOAPElement containing the reference to an Attachment
        Returns:
        the referenced AttachmentPart or null if no such AttachmentPart exists or no reference can be found in this SOAPElement.
        Throws:
        SOAPException - if there is an error in the attempt to access the attachment
        Since:
        SAAJ 1.3

      • addAttachmentPart

        public abstract void addAttachmentPart(AttachmentPart AttachmentPart)
        Adds the given AttachmentPart object to this SOAPMessage object. An AttachmentPart object must be created before it can be added to a message.
        Parameters:
        AttachmentPart - an AttachmentPart object that is to become part of this SOAPMessage object
        Throws:
        IllegalArgumentException

      • createAttachmentPart

        public abstract AttachmentPart createAttachmentPart()
        Creates a new empty AttachmentPart object. Note that the method addAttachmentPart must be called with this new AttachmentPart object as the parameter in order for it to become an attachment to this SOAPMessage object.
        Returns:
        a new AttachmentPart object that can be populated and added to this SOAPMessage object

      • createAttachmentPart

        public AttachmentPart createAttachmentPart(DataHandler dataHandler)
        Creates an AttachmentPart object and populates it using the given DataHandler object.
        Parameters:
        dataHandler - the javax.activation.DataHandler object that will generate the content for this SOAPMessage object
        Returns:
        a new AttachmentPart object that contains data generated by the given DataHandler object
        Throws:
        IllegalArgumentException - if there was a problem with the specified DataHandler object
        See Also:
        DataHandler, DataContentHandler

      • getMimeHeaders

        public abstract MimeHeaders getMimeHeaders()
        Returns all the transport-specific MIME headers for this SOAPMessage object in a transport-independent fashion.
        Returns:
        a MimeHeaders object containing the MimeHeader objects

      • createAttachmentPart

        public AttachmentPart createAttachmentPart(Object content,
                                           String contentType)
        Creates an AttachmentPart object and populates it with the specified data of the specified content type. The type of the Object should correspond to the value given for the Content-Type.
        Parameters:
        content - an Object containing the content for the AttachmentPart object to be created
        contentType - a String object giving the type of content; examples are "text/xml", "text/plain", and "image/jpeg"
        Returns:
        a new AttachmentPart object that contains the given data
        Throws:
        IllegalArgumentException - may be thrown if the contentType does not match the type of the content object, or if there was no DataContentHandler object for the given content object
        See Also:
        DataHandler, DataContentHandler

      • saveChanges

        public abstract void saveChanges()
                          throws SOAPException
        Updates this SOAPMessage object with all the changes that have been made to it. This method is called automatically when writeTo(OutputStream) is called. However, if changes are made to a message that was received or to one that has already been sent, the method saveChanges needs to be called explicitly in order to save the changes. The method saveChanges also generates any changes that can be read back (for example, a MessageId in profiles that support a message id). All MIME headers in a message that is created for sending purposes are guaranteed to have valid values only after saveChanges has been called.

        In addition, this method marks the point at which the data from all constituent AttachmentPart objects are pulled into the message.

        Throws:
        SOAPException - if there was a problem saving changes to this message.
        SOAPException

      • saveRequired

        public abstract boolean saveRequired()
        Indicates whether this SOAPMessage object needs to have the method saveChanges called on it.
        Returns:
        true if saveChanges needs to be called; false otherwise.

      • writeTo

        public abstract void writeTo(OutputStream out)
                      throws SOAPException,
                             IOException
        Writes this SOAPMessage object to the given output stream. The externalization format is as defined by the SOAP 1.1 with Attachments specification.

        If there are no attachments, just an XML stream is written out. For those messages that have attachments, writeTo writes a MIME-encoded byte stream.

        Note that this method does not write the transport-specific MIME Headers of the Message

        Parameters:
        out - the OutputStream object to which this SOAPMessage object will be written
        Throws:
        IOException - if an I/O error occurs
        SOAPException - if there was a problem in externalizing this SOAP message

      • setProperty

        public void setProperty(String property,
                        Object value)
                 throws SOAPException
        Associates the specified value with the specified property. If there was already a value associated with this property, the old value is replaced.

        The valid property names include WRITE_XML_DECLARATION and CHARACTER_SET_ENCODING. All of these standard SAAJ properties are prefixed by "javax.xml.soap". Vendors may also add implementation specific properties. These properties must be prefixed with package names that are unique to the vendor.

        Setting the property WRITE_XML_DECLARATION to "true" will cause an XML Declaration to be written out at the start of the SOAP message. The default value of "false" suppresses this declaration.

        The property CHARACTER_SET_ENCODING defaults to the value "utf-8" which causes the SOAP message to be encoded using UTF-8. Setting CHARACTER_SET_ENCODING to "utf-16" causes the SOAP message to be encoded using UTF-16.

        Some implementations may allow encodings in addition to UTF-8 and UTF-16. Refer to your vendor's documentation for details.

        Parameters:
        property - the property with which the specified value is to be associated.
        value - the value to be associated with the specified property
        Throws:
        SOAPException - if the property name is not recognized.
        Since:
        SAAJ 1.2

      • getProperty

        public Object getProperty(String property)
                   throws SOAPException
        Retrieves value of the specified property.
        Parameters:
        property - the name of the property to retrieve
        Returns:
        the value associated with the named property or null if no such property exists.
        Throws:
        SOAPException - if the property name is not recognized.
        Since:
        SAAJ 1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPPart

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Class SOAPPart

  • java.lang.Object
    • javax.xml.soap.SOAPPart
  • All Implemented Interfaces:
    Document, Node

    public abstract class SOAPPart
extends Object
implements Document, Node
    The container for the SOAP-specific portion of a SOAPMessage object. All messages are required to have a SOAP part, so when a SOAPMessage object is created, it will automatically have a SOAPPart object.

    A SOAPPart object is a MIME part and has the MIME headers Content-Id, Content-Location, and Content-Type. Because the value of Content-Type must be "text/xml", a SOAPPart object automatically has a MIME header of Content-Type with its value set to "text/xml". The value must be "text/xml" because content in the SOAP part of a message must be in XML format. Content that is not of type "text/xml" must be in an AttachmentPart object rather than in the SOAPPart object.

    When a message is sent, its SOAP part must have the MIME header Content-Type set to "text/xml". Or, from the other perspective, the SOAP part of any message that is received must have the MIME header Content-Type with a value of "text/xml".

    A client can access the SOAPPart object of a SOAPMessage object by calling the method SOAPMessage.getSOAPPart. The following line of code, in which message is a SOAPMessage object, retrieves the SOAP part of a message.

       SOAPPart soapPart = message.getSOAPPart();

    A SOAPPart object contains a SOAPEnvelope object, which in turn contains a SOAPBody object and a SOAPHeader object. The SOAPPart method getEnvelope can be used to retrieve the SOAPEnvelope object.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPPart()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void addMimeHeader(String name, String value)
      Creates a MimeHeader object with the specified name and value and adds it to this SOAPPart object.
      abstract Iterator getAllMimeHeaders()
      Retrieves all the headers for this SOAPPart object as an iterator over the MimeHeader objects.
      abstract Source getContent()
      Returns the content of the SOAPEnvelope as a JAXP Source object.
      String getContentId()
      Retrieves the value of the MIME header whose name is "Content-Id".
      String getContentLocation()
      Retrieves the value of the MIME header whose name is "Content-Location".
      abstract SOAPEnvelope getEnvelope()
      Gets the SOAPEnvelope object associated with this SOAPPart object.
      abstract Iterator getMatchingMimeHeaders(String[] names)
      Retrieves all MimeHeader objects that match a name in the given array.
      abstract String[] getMimeHeader(String name)
      Gets all the values of the MimeHeader object in this SOAPPart object that is identified by the given String.
      abstract Iterator getNonMatchingMimeHeaders(String[] names)
      Retrieves all MimeHeader objects whose name does not match a name in the given array.
      abstract void removeAllMimeHeaders()
      Removes all the MimeHeader objects for this SOAPEnvelope object.
      abstract void removeMimeHeader(String header)
      Removes all MIME headers that match the given name.
      abstract void setContent(Source source)
      Sets the content of the SOAPEnvelope object with the data from the given Source object.
      void setContentId(String contentId)
      Sets the value of the MIME header named "Content-Id" to the given String.
      void setContentLocation(String contentLocation)
      Sets the value of the MIME header "Content-Location" to the given String.
      abstract void setMimeHeader(String name, String value)
      Changes the first header entry that matches the given header name so that its value is the given value, adding a new header with the given name and value if no existing header is a match.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.w3c.dom.Document

        adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Constructor Detail

      • SOAPPart

        public SOAPPart()

    • Method Detail

      • getEnvelope

        public abstract SOAPEnvelope getEnvelope()
                                  throws SOAPException
        Gets the SOAPEnvelope object associated with this SOAPPart object. Once the SOAP envelope is obtained, it can be used to get its contents.
        Returns:
        the SOAPEnvelope object for this SOAPPart object
        Throws:
        SOAPException - if there is a SOAP error

      • getContentId

        public String getContentId()
        Retrieves the value of the MIME header whose name is "Content-Id".
        Returns:
        a String giving the value of the MIME header named "Content-Id"
        See Also:
        setContentId(java.lang.String)

      • getContentLocation

        public String getContentLocation()
        Retrieves the value of the MIME header whose name is "Content-Location".
        Returns:
        a String giving the value of the MIME header whose name is "Content-Location"
        See Also:
        setContentLocation(java.lang.String)

      • setContentId

        public void setContentId(String contentId)
        Sets the value of the MIME header named "Content-Id" to the given String.
        Parameters:
        contentId - a String giving the value of the MIME header "Content-Id"
        Throws:
        IllegalArgumentException - if there is a problem in setting the content id
        See Also:
        getContentId()

      • setContentLocation

        public void setContentLocation(String contentLocation)
        Sets the value of the MIME header "Content-Location" to the given String.
        Parameters:
        contentLocation - a String giving the value of the MIME header "Content-Location"
        Throws:
        IllegalArgumentException - if there is a problem in setting the content location.
        See Also:
        getContentLocation()

      • removeMimeHeader

        public abstract void removeMimeHeader(String header)
        Removes all MIME headers that match the given name.
        Parameters:
        header - a String giving the name of the MIME header(s) to be removed

      • removeAllMimeHeaders

        public abstract void removeAllMimeHeaders()
        Removes all the MimeHeader objects for this SOAPEnvelope object.

      • getMimeHeader

        public abstract String[] getMimeHeader(String name)
        Gets all the values of the MimeHeader object in this SOAPPart object that is identified by the given String.
        Parameters:
        name - the name of the header; example: "Content-Type"
        Returns:
        a String array giving all the values for the specified header
        See Also:
        setMimeHeader(java.lang.String, java.lang.String)

      • setMimeHeader

        public abstract void setMimeHeader(String name,
                                   String value)
        Changes the first header entry that matches the given header name so that its value is the given value, adding a new header with the given name and value if no existing header is a match. If there is a match, this method clears all existing values for the first header that matches and sets the given value instead. If more than one header has the given name, this method removes all of the matching headers after the first one.

        Note that RFC822 headers can contain only US-ASCII characters.

        Parameters:
        name - a String giving the header name for which to search
        value - a String giving the value to be set. This value will be substituted for the current value(s) of the first header that is a match if there is one. If there is no match, this value will be the value for a new MimeHeader object.
        Throws:
        IllegalArgumentException - if there was a problem with the specified mime header name or value
        See Also:
        getMimeHeader(java.lang.String)

      • addMimeHeader

        public abstract void addMimeHeader(String name,
                                   String value)
        Creates a MimeHeader object with the specified name and value and adds it to this SOAPPart object. If a MimeHeader with the specified name already exists, this method adds the specified value to the already existing value(s).

        Note that RFC822 headers can contain only US-ASCII characters.

        Parameters:
        name - a String giving the header name
        value - a String giving the value to be set or added
        Throws:
        IllegalArgumentException - if there was a problem with the specified mime header name or value

      • getAllMimeHeaders

        public abstract Iterator getAllMimeHeaders()
        Retrieves all the headers for this SOAPPart object as an iterator over the MimeHeader objects.
        Returns:
        an Iterator object with all of the Mime headers for this SOAPPart object

      • getMatchingMimeHeaders

        public abstract Iterator getMatchingMimeHeaders(String[] names)
        Retrieves all MimeHeader objects that match a name in the given array.
        Parameters:
        names - a String array with the name(s) of the MIME headers to be returned
        Returns:
        all of the MIME headers that match one of the names in the given array, returned as an Iterator object

      • getNonMatchingMimeHeaders

        public abstract Iterator getNonMatchingMimeHeaders(String[] names)
        Retrieves all MimeHeader objects whose name does not match a name in the given array.
        Parameters:
        names - a String array with the name(s) of the MIME headers not to be returned
        Returns:
        all of the MIME headers in this SOAPPart object except those that match one of the names in the given array. The nonmatching MIME headers are returned as an Iterator object.

      • setContent

        public abstract void setContent(Source source)
                         throws SOAPException
        Sets the content of the SOAPEnvelope object with the data from the given Source object. This Source must contain a valid SOAP document.
        Parameters:
        source - the javax.xml.transform.Source object with the data to be set
        Throws:
        SOAPException - if there is a problem in setting the source
        See Also:
        getContent()

      • getContent

        public abstract Source getContent()
                           throws SOAPException
        Returns the content of the SOAPEnvelope as a JAXP Source object.
        Returns:
        the content as a javax.xml.transform.Source object
        Throws:
        SOAPException - if the implementation cannot convert the specified Source object
        See Also:
        setContent(javax.xml.transform.Source)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.soap

Interface Text

  • All Superinterfaces:
    CharacterData, Node, Text

    public interface Text
extends Node, Text
    A representation of a node whose value is text. A Text object may represent text that is content or text that is a comment.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isComment()
      Retrieves whether this Text object represents a comment.

      • Methods inherited from interface javax.xml.soap.Node

        detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue

      • Methods inherited from interface org.w3c.dom.Text

        getWholeText, isElementContentWhitespace, replaceWholeText, splitText

      • Methods inherited from interface org.w3c.dom.CharacterData

        appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • isComment

        boolean isComment()
        Retrieves whether this Text object represents a comment.
        Returns:
        true if this Text object is a comment; false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.stream

  • Interface Summary
    Interface Description
    EventFilter
    This interface declares a simple filter interface that one can create to filter XMLEventReaders
    Location
    Provides information on the location of an event.
    StreamFilter
    This interface declares a simple filter interface that one can create to filter XMLStreamReaders
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLReporter
    This interface is used to report non-fatal errors.
    XMLResolver
    This interface is used to resolve resources during an XML parse.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Class Summary
    Class Description
    XMLEventFactory
    This interface defines a utility class for creating instances of XMLEvents
    XMLInputFactory
    Defines an abstract implementation of a factory for getting streams.
    XMLOutputFactory
    Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters.
  • Exception Summary
    Exception Description
    XMLStreamException
    The base exception for unexpected processing errors.
  • Error Summary
    Error Description
    FactoryConfigurationError
    An error class for reporting factory configuration errors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.stream

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • javax.xml.stream.FactoryConfigurationError
      • java.lang.Exception
        • javax.xml.stream.XMLStreamException
    • javax.xml.stream.XMLEventFactory
    • javax.xml.stream.XMLInputFactory
    • javax.xml.stream.XMLOutputFactory

Interface Hierarchy

  • javax.xml.stream.EventFilter
  • java.util.Iterator<E>
    • javax.xml.stream.XMLEventReader
  • javax.xml.stream.Location
  • javax.xml.stream.StreamFilter
  • javax.xml.stream.util.XMLEventConsumer
    • javax.xml.stream.XMLEventWriter
  • javax.xml.stream.XMLReporter
  • javax.xml.stream.XMLResolver
  • javax.xml.stream.XMLStreamConstants
    • javax.xml.stream.XMLStreamReader
  • javax.xml.stream.XMLStreamWriter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.stream

  • Packages that use javax.xml.stream
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.
  • Classes in javax.xml.stream used by javax.xml.bind
    Class and Description
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Classes in javax.xml.stream used by javax.xml.bind.helpers
    Class and Description
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Classes in javax.xml.stream used by javax.xml.stream
    Class and Description
    EventFilter
    This interface declares a simple filter interface that one can create to filter XMLEventReaders
    FactoryConfigurationError
    An error class for reporting factory configuration errors.
    Location
    Provides information on the location of an event.
    StreamFilter
    This interface declares a simple filter interface that one can create to filter XMLStreamReaders
    XMLEventFactory
    This interface defines a utility class for creating instances of XMLEvents
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLInputFactory
    Defines an abstract implementation of a factory for getting streams.
    XMLOutputFactory
    Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters.
    XMLReporter
    This interface is used to report non-fatal errors.
    XMLResolver
    This interface is used to resolve resources during an XML parse.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamException
    The base exception for unexpected processing errors.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Classes in javax.xml.stream used by javax.xml.stream.events
    Class and Description
    Location
    Provides information on the location of an event.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamException
    The base exception for unexpected processing errors.
  • Classes in javax.xml.stream used by javax.xml.stream.util
    Class and Description
    Location
    Provides information on the location of an event.
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamException
    The base exception for unexpected processing errors.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
  • Classes in javax.xml.stream used by javax.xml.transform.stax
    Class and Description
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLStreamException
    The base exception for unexpected processing errors.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.FactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.FactoryConfigurationError

  • Packages that use FactoryConfigurationError
    Package Description
    javax.xml.stream

    • Uses of FactoryConfigurationError in javax.xml.stream

      Methods in javax.xml.stream that throw FactoryConfigurationError
      Modifier and Type Method and Description
      static XMLEventFactory XMLEventFactory.newFactory()
      Create a new instance of the factory.
      static XMLOutputFactory XMLOutputFactory.newFactory()
      Create a new instance of the factory.
      static XMLInputFactory XMLInputFactory.newFactory()
      Create a new instance of the factory.
      static XMLEventFactory XMLEventFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLOutputFactory XMLOutputFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLInputFactory XMLInputFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLEventFactory XMLEventFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the XMLEventFactory.newFactory() method.
      static XMLOutputFactory XMLOutputFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the XMLOutputFactory.newFactory() method.
      static XMLInputFactory XMLInputFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the XMLInputFactory.newFactory() method.
      static XMLEventFactory XMLEventFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement XMLEventFactory.newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
      static XMLInputFactory XMLOutputFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new method XMLOutputFactory.newFactory(java.lang.String, java.lang.ClassLoader) instead.
      static XMLInputFactory XMLInputFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement XMLInputFactory.newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.XMLEventFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.XMLEventFactory

  • Packages that use XMLEventFactory
    Package Description
    javax.xml.stream

    • Uses of XMLEventFactory in javax.xml.stream

      Methods in javax.xml.stream that return XMLEventFactory
      Modifier and Type Method and Description
      static XMLEventFactory XMLEventFactory.newFactory()
      Create a new instance of the factory.
      static XMLEventFactory XMLEventFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLEventFactory XMLEventFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
      static XMLEventFactory XMLEventFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.XMLInputFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.XMLInputFactory

  • Packages that use XMLInputFactory
    Package Description
    javax.xml.stream

    • Uses of XMLInputFactory in javax.xml.stream

      Methods in javax.xml.stream that return XMLInputFactory
      Modifier and Type Method and Description
      static XMLInputFactory XMLInputFactory.newFactory()
      Create a new instance of the factory.
      static XMLInputFactory XMLInputFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLInputFactory XMLInputFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
      static XMLInputFactory XMLOutputFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new method XMLOutputFactory.newFactory(java.lang.String, java.lang.ClassLoader) instead.
      static XMLInputFactory XMLInputFactory.newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.XMLOutputFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.XMLOutputFactory

  • Packages that use XMLOutputFactory
    Package Description
    javax.xml.stream

    • Uses of XMLOutputFactory in javax.xml.stream

      Methods in javax.xml.stream that return XMLOutputFactory
      Modifier and Type Method and Description
      static XMLOutputFactory XMLOutputFactory.newFactory()
      Create a new instance of the factory.
      static XMLOutputFactory XMLOutputFactory.newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLOutputFactory XMLOutputFactory.newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.XMLStreamException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.XMLStreamException

  • Packages that use XMLStreamException
    Package Description
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.

    • Uses of XMLStreamException in javax.xml.stream

      Methods in javax.xml.stream that throw XMLStreamException
      Modifier and Type Method and Description
      void XMLEventWriter.add(XMLEvent event)
      Add an event to the output stream Adding a START_ELEMENT will open a new namespace scope that will be closed when the corresponding END_ELEMENT is written.
      void XMLEventWriter.add(XMLEventReader reader)
      Adds an entire stream to an output stream, calls next() on the inputStream argument until hasNext() returns false This should be treated as a convenience method that will perform the following loop over all the events in an event reader and call add on each event.
      void XMLEventWriter.close()
      Frees any resources associated with this stream
      void XMLStreamWriter.close()
      Close this writer and free any resources associated with the writer.
      void XMLEventReader.close()
      Frees any resources associated with this Reader.
      void XMLStreamReader.close()
      Frees any resources associated with this Reader.
      abstract XMLEventReader XMLInputFactory.createFilteredReader(XMLEventReader reader, EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader
      abstract XMLStreamReader XMLInputFactory.createFilteredReader(XMLStreamReader reader, StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(InputStream stream, String encoding)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(Source source)
      Create a new XMLEventReader from a JAXP source.
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(String systemId, InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(String systemId, Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(XMLStreamReader reader)
      Create a new XMLEventReader from an XMLStreamReader.
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(OutputStream stream)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(OutputStream stream, String encoding)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(Result result)
      Create a new XMLEventWriter that writes to a JAXP result.
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(Writer stream)
      Create a new XMLEventWriter that writes to a writer
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(InputStream stream, String encoding)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(Reader reader)
      Create a new XMLStreamReader from a reader
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(Source source)
      Create a new XMLStreamReader from a JAXP source.
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(String systemId, InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(String systemId, Reader reader)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(OutputStream stream)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(OutputStream stream, String encoding)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(Result result)
      Create a new XMLStreamWriter that writes to a JAXP result.
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(Writer stream)
      Create a new XMLStreamWriter that writes to a writer
      void XMLEventWriter.flush()
      Writes any cached events to the underlying output mechanism
      void XMLStreamWriter.flush()
      Write any cached data to the underlying output mechanism.
      String XMLEventReader.getElementText()
      Reads the content of a text-only element.
      String XMLStreamReader.getElementText()
      Reads the content of a text-only element, an exception is thrown if this is not a text-only element.
      String XMLEventWriter.getPrefix(String uri)
      Gets the prefix the uri is bound to
      String XMLStreamWriter.getPrefix(String uri)
      Gets the prefix the uri is bound to
      int XMLStreamReader.getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
      Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
      boolean XMLStreamReader.hasNext()
      Returns true if there are more parsing events and false if there are no more events.
      int XMLStreamReader.next()
      Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
      XMLEvent XMLEventReader.nextEvent()
      Get the next XMLEvent
      XMLEvent XMLEventReader.nextTag()
      Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
      int XMLStreamReader.nextTag()
      Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.
      XMLEvent XMLEventReader.peek()
      Check the next XMLEvent without reading it from the stream.
      void XMLReporter.report(String message, String errorType, Object relatedInformation, Location location)
      Report the desired message in an application specific format.
      void XMLStreamReader.require(int type, String namespaceURI, String localName)
      Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
      Object XMLResolver.resolveEntity(String publicID, String systemID, String baseURI, String namespace)
      Retrieves a resource.
      void XMLEventWriter.setDefaultNamespace(String uri)
      Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.
      void XMLStreamWriter.setDefaultNamespace(String uri)
      Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.
      void XMLEventWriter.setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.
      void XMLStreamWriter.setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.
      void XMLEventWriter.setPrefix(String prefix, String uri)
      Sets the prefix the uri is bound to.
      void XMLStreamWriter.setPrefix(String prefix, String uri)
      Sets the prefix the uri is bound to.
      void XMLStreamWriter.writeAttribute(String localName, String value)
      Writes an attribute to the output stream without a prefix.
      void XMLStreamWriter.writeAttribute(String namespaceURI, String localName, String value)
      Writes an attribute to the output stream
      void XMLStreamWriter.writeAttribute(String prefix, String namespaceURI, String localName, String value)
      Writes an attribute to the output stream
      void XMLStreamWriter.writeCData(String data)
      Writes a CData section
      void XMLStreamWriter.writeCharacters(char[] text, int start, int len)
      Write text to the output
      void XMLStreamWriter.writeCharacters(String text)
      Write text to the output
      void XMLStreamWriter.writeComment(String data)
      Writes an xml comment with the data enclosed
      void XMLStreamWriter.writeDefaultNamespace(String namespaceURI)
      Writes the default namespace to the stream
      void XMLStreamWriter.writeDTD(String dtd)
      Write a DTD section.
      void XMLStreamWriter.writeEmptyElement(String localName)
      Writes an empty element tag to the output
      void XMLStreamWriter.writeEmptyElement(String namespaceURI, String localName)
      Writes an empty element tag to the output
      void XMLStreamWriter.writeEmptyElement(String prefix, String localName, String namespaceURI)
      Writes an empty element tag to the output
      void XMLStreamWriter.writeEndDocument()
      Closes any start tags and writes corresponding end tags.
      void XMLStreamWriter.writeEndElement()
      Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.
      void XMLStreamWriter.writeEntityRef(String name)
      Writes an entity reference
      void XMLStreamWriter.writeNamespace(String prefix, String namespaceURI)
      Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace
      void XMLStreamWriter.writeProcessingInstruction(String target)
      Writes a processing instruction
      void XMLStreamWriter.writeProcessingInstruction(String target, String data)
      Writes a processing instruction
      void XMLStreamWriter.writeStartDocument()
      Write the XML Declaration.
      void XMLStreamWriter.writeStartDocument(String version)
      Write the XML Declaration.
      void XMLStreamWriter.writeStartDocument(String encoding, String version)
      Write the XML Declaration.
      void XMLStreamWriter.writeStartElement(String localName)
      Writes a start tag to the output.
      void XMLStreamWriter.writeStartElement(String namespaceURI, String localName)
      Writes a start tag to the output
      void XMLStreamWriter.writeStartElement(String prefix, String localName, String namespaceURI)
      Writes a start tag to the output

    • Uses of XMLStreamException in javax.xml.stream.events

      Methods in javax.xml.stream.events that throw XMLStreamException
      Modifier and Type Method and Description
      void XMLEvent.writeAsEncodedUnicode(Writer writer)
      This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.

    • Uses of XMLStreamException in javax.xml.stream.util

      Methods in javax.xml.stream.util that throw XMLStreamException
      Modifier and Type | Method and Description
      void XMLEventConsumer.add(XMLEvent event)
      This method adds an event to the consumer.
      XMLEvent XMLEventAllocator.allocate(XMLStreamReader reader)
      This method allocates an event given the current state of the XMLStreamReader.
      void XMLEventAllocator.allocate(XMLStreamReader reader, XMLEventConsumer consumer)
      This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in.
      void | EventReaderDelegate.close()
      void | StreamReaderDelegate.close()
      String | EventReaderDelegate.getElementText()
      String | StreamReaderDelegate.getElementText()
      int | StreamReaderDelegate.getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
      boolean | StreamReaderDelegate.hasNext()
      int | StreamReaderDelegate.next()
      XMLEvent | EventReaderDelegate.nextEvent()
      XMLEvent | EventReaderDelegate.nextTag()
      int | StreamReaderDelegate.nextTag()
      XMLEvent | EventReaderDelegate.peek()
      void | StreamReaderDelegate.require(int type, String namespaceURI, String localName)

    • Uses of XMLStreamException in javax.xml.transform.stax

      Constructors in javax.xml.transform.stax that throw XMLStreamException
      Constructor and Description
      StAXSource(XMLEventReader xmlEventReader)
      Creates a new instance of a StAXSource by supplying an XMLEventReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.EventFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.EventFilter

  • Packages that use EventFilter
    Package Description
    javax.xml.stream

    • Uses of EventFilter in javax.xml.stream

      Methods in javax.xml.stream with parameters of type EventFilter
      Modifier and Type Method and Description
      abstract XMLEventReader XMLInputFactory.createFilteredReader(XMLEventReader reader, EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.Location

  • Packages that use Location
    Package Description
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util

    • Uses of Location in javax.xml.stream

      Fields in javax.xml.stream declared as Location
      Modifier and Type | Field and Description
      protected Location | XMLStreamException.location
      Methods in javax.xml.stream that return Location
      Modifier and Type Method and Description
      Location XMLStreamException.getLocation()
      Gets the location of the exception
      Location XMLStreamReader.getLocation()
      Return the current location of the processor.
      Methods in javax.xml.stream with parameters of type Location
      Modifier and Type Method and Description
      void XMLReporter.report(String message, String errorType, Object relatedInformation, Location location)
      Report the desired message in an application specific format.
      abstract void XMLEventFactory.setLocation(Location location)
      This method allows setting of the Location on each event that is created by this factory.
      Constructors in javax.xml.stream with parameters of type Location
      Constructor and Description
      XMLStreamException(String msg, Location location)
      Construct an exception with the assocated message, exception and location.
      XMLStreamException(String msg, Location location, Throwable th)
      Construct an exception with the assocated message, exception and location.

    • Uses of Location in javax.xml.stream.events

      Methods in javax.xml.stream.events that return Location
      Modifier and Type Method and Description
      Location XMLEvent.getLocation()
      Return the location of this event.

    • Uses of Location in javax.xml.stream.util

      Methods in javax.xml.stream.util that return Location
      Modifier and Type | Method and Description
      Location | StreamReaderDelegate.getLocation()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.StreamFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.StreamFilter

  • Packages that use StreamFilter
    Package Description
    javax.xml.stream

    • Uses of StreamFilter in javax.xml.stream

      Methods in javax.xml.stream with parameters of type StreamFilter
      Modifier and Type Method and Description
      abstract XMLStreamReader XMLInputFactory.createFilteredReader(XMLStreamReader reader, StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLEventReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLEventReader

  • Packages that use XMLEventReader
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.stream
    javax.xml.stream.util
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.

    • Uses of XMLEventReader in javax.xml.bind

      Methods in javax.xml.bind with parameters of type XMLEventReader
      Modifier and Type Method and Description
      Object Unmarshaller.unmarshal(XMLEventReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLEventReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

    • Uses of XMLEventReader in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type XMLEventReader
      Modifier and Type | Method and Description
      Object | AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader, Class<T> expectedType)

    • Uses of XMLEventReader in javax.xml.stream

      Methods in javax.xml.stream that return XMLEventReader
      Modifier and Type Method and Description
      abstract XMLEventReader XMLInputFactory.createFilteredReader(XMLEventReader reader, EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(InputStream stream, String encoding)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(Source source)
      Create a new XMLEventReader from a JAXP source.
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(String systemId, InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(String systemId, Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(XMLStreamReader reader)
      Create a new XMLEventReader from an XMLStreamReader.
      Methods in javax.xml.stream with parameters of type XMLEventReader
      Modifier and Type Method and Description
      void XMLEventWriter.add(XMLEventReader reader)
      Adds an entire stream to an output stream, calls next() on the inputStream argument until hasNext() returns false This should be treated as a convenience method that will perform the following loop over all the events in an event reader and call add on each event.
      abstract XMLEventReader XMLInputFactory.createFilteredReader(XMLEventReader reader, EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader

    • Uses of XMLEventReader in javax.xml.stream.util

      Classes in javax.xml.stream.util that implement XMLEventReader
      Modifier and Type Class and Description
      class  EventReaderDelegate
      This is the base class for deriving an XMLEventReader filter.
      Methods in javax.xml.stream.util that return XMLEventReader
      Modifier and Type Method and Description
      XMLEventReader EventReaderDelegate.getParent()
      Get the parent of this instance.
      Methods in javax.xml.stream.util with parameters of type XMLEventReader
      Modifier and Type Method and Description
      void EventReaderDelegate.setParent(XMLEventReader reader)
      Set the parent of this instance.
      Constructors in javax.xml.stream.util with parameters of type XMLEventReader
      Constructor and Description
      EventReaderDelegate(XMLEventReader reader)
      Construct an filter with the specified parent.

    • Uses of XMLEventReader in javax.xml.transform.stax

      Methods in javax.xml.transform.stax that return XMLEventReader
      Modifier and Type Method and Description
      XMLEventReader StAXSource.getXMLEventReader()
      Get the XMLEventReader used by this StAXSource.
      Constructors in javax.xml.transform.stax with parameters of type XMLEventReader
      Constructor and Description
      StAXSource(XMLEventReader xmlEventReader)
      Creates a new instance of a StAXSource by supplying an XMLEventReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLEventWriter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLEventWriter

  • Packages that use XMLEventWriter
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.stream
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.

    • Uses of XMLEventWriter in javax.xml.bind

      Methods in javax.xml.bind with parameters of type XMLEventWriter
      Modifier and Type Method and Description
      void Marshaller.marshal(Object jaxbElement, XMLEventWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLEventWriter.

    • Uses of XMLEventWriter in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type XMLEventWriter
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.marshal(Object obj, XMLEventWriter writer)

    • Uses of XMLEventWriter in javax.xml.stream

      Methods in javax.xml.stream that return XMLEventWriter
      Modifier and Type Method and Description
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(OutputStream stream)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(OutputStream stream, String encoding)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(Result result)
      Create a new XMLEventWriter that writes to a JAXP result.
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(Writer stream)
      Create a new XMLEventWriter that writes to a writer

    • Uses of XMLEventWriter in javax.xml.transform.stax

      Methods in javax.xml.transform.stax that return XMLEventWriter
      Modifier and Type Method and Description
      XMLEventWriter StAXResult.getXMLEventWriter()
      Get the XMLEventWriter used by this StAXResult.
      Constructors in javax.xml.transform.stax with parameters of type XMLEventWriter
      Constructor and Description
      StAXResult(XMLEventWriter xmlEventWriter)
      Creates a new instance of a StAXResult by supplying an XMLEventWriter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLReporter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLReporter

  • Packages that use XMLReporter
    Package Description
    javax.xml.stream

    • Uses of XMLReporter in javax.xml.stream

      Methods in javax.xml.stream that return XMLReporter
      Modifier and Type Method and Description
      abstract XMLReporter XMLInputFactory.getXMLReporter()
      The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      Methods in javax.xml.stream with parameters of type XMLReporter
      Modifier and Type Method and Description
      abstract void XMLInputFactory.setXMLReporter(XMLReporter reporter)
      The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLResolver

  • Packages that use XMLResolver
    Package Description
    javax.xml.stream

    • Uses of XMLResolver in javax.xml.stream

      Methods in javax.xml.stream that return XMLResolver
      Modifier and Type Method and Description
      abstract XMLResolver XMLInputFactory.getXMLResolver()
      The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      Methods in javax.xml.stream with parameters of type XMLResolver
      Modifier and Type Method and Description
      abstract void XMLInputFactory.setXMLResolver(XMLResolver resolver)
      The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLStreamConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLStreamConstants

  • Packages that use XMLStreamConstants
    Package Description
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util

    • Uses of XMLStreamConstants in javax.xml.stream

      Subinterfaces of XMLStreamConstants in javax.xml.stream
      Modifier and Type Interface and Description
      interface  XMLStreamReader
      The XMLStreamReader interface allows forward, read-only access to XML.

    • Uses of XMLStreamConstants in javax.xml.stream.events

      Subinterfaces of XMLStreamConstants in javax.xml.stream.events
      Modifier and Type Interface and Description
      interface  Attribute
      An interface that contains information about an attribute.
      interface  Characters
      This describes the interface to Characters events.
      interface  Comment
      An interface for comment events
      interface  DTD
      This is the top level interface for events dealing with DTDs
      interface  EndDocument
      A marker interface for the end of the document
      interface  EndElement
      An interface for the end element event.
      interface  EntityDeclaration
      An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
      interface  EntityReference
      An interface for handling Entity events.
      interface  Namespace
      An interface that contains information about a namespace.
      interface  NotationDeclaration
      An interface for handling Notation Declarations Receive notification of a notation declaration event.
      interface  ProcessingInstruction
      An interface that describes the data found in processing instructions
      interface  StartDocument
      An interface for the start document event
      interface  StartElement
      The StartElement interface provides access to information about start elements.
      interface  XMLEvent
      This is the base event interface for handling markup events.

    • Uses of XMLStreamConstants in javax.xml.stream.util

      Classes in javax.xml.stream.util that implement XMLStreamConstants
      Modifier and Type Class and Description
      class  StreamReaderDelegate
      This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLStreamReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLStreamReader

  • Packages that use XMLStreamReader
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.stream
    javax.xml.stream.util
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.

    • Uses of XMLStreamReader in javax.xml.bind

      Methods in javax.xml.bind with parameters of type XMLStreamReader
      Modifier and Type Method and Description
      Object Unmarshaller.unmarshal(XMLStreamReader reader)
      Unmarshal XML data from the specified pull parser and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(XMLStreamReader reader, Class<T> declaredType)
      Unmarshal root element to JAXB mapped declaredType and return the resulting content tree.

    • Uses of XMLStreamReader in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type XMLStreamReader
      Modifier and Type | Method and Description
      Object | AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader, Class<T> expectedType)

    • Uses of XMLStreamReader in javax.xml.stream

      Methods in javax.xml.stream that return XMLStreamReader
      Modifier and Type Method and Description
      abstract XMLStreamReader XMLInputFactory.createFilteredReader(XMLStreamReader reader, StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(InputStream stream, String encoding)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(Reader reader)
      Create a new XMLStreamReader from a reader
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(Source source)
      Create a new XMLStreamReader from a JAXP source.
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(String systemId, InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(String systemId, Reader reader)
      Create a new XMLStreamReader from a java.io.InputStream
      Methods in javax.xml.stream with parameters of type XMLStreamReader
      Modifier and Type Method and Description
      boolean StreamFilter.accept(XMLStreamReader reader)
      Tests whether the current state is part of this stream.
      abstract XMLStreamReader XMLInputFactory.createFilteredReader(XMLStreamReader reader, StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(XMLStreamReader reader)
      Create a new XMLEventReader from an XMLStreamReader.

    • Uses of XMLStreamReader in javax.xml.stream.util

      Classes in javax.xml.stream.util that implement XMLStreamReader
      Modifier and Type Class and Description
      class  StreamReaderDelegate
      This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader.
      Methods in javax.xml.stream.util that return XMLStreamReader
      Modifier and Type Method and Description
      XMLStreamReader StreamReaderDelegate.getParent()
      Get the parent of this instance.
      Methods in javax.xml.stream.util with parameters of type XMLStreamReader
      Modifier and Type Method and Description
      XMLEvent XMLEventAllocator.allocate(XMLStreamReader reader)
      This method allocates an event given the current state of the XMLStreamReader.
      void XMLEventAllocator.allocate(XMLStreamReader reader, XMLEventConsumer consumer)
      This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in.
      void StreamReaderDelegate.setParent(XMLStreamReader reader)
      Set the parent of this instance.
      Constructors in javax.xml.stream.util with parameters of type XMLStreamReader
      Constructor and Description
      StreamReaderDelegate(XMLStreamReader reader)
      Construct an filter with the specified parent.

    • Uses of XMLStreamReader in javax.xml.transform.stax

      Methods in javax.xml.transform.stax that return XMLStreamReader
      Modifier and Type Method and Description
      XMLStreamReader StAXSource.getXMLStreamReader()
      Get the XMLStreamReader used by this StAXSource.
      Constructors in javax.xml.transform.stax with parameters of type XMLStreamReader
      Constructor and Description
      StAXSource(XMLStreamReader xmlStreamReader)
      Creates a new instance of a StAXSource by supplying an XMLStreamReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.XMLStreamWriter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.XMLStreamWriter

  • Packages that use XMLStreamWriter
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.stream
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.

    • Uses of XMLStreamWriter in javax.xml.bind

      Methods in javax.xml.bind with parameters of type XMLStreamWriter
      Modifier and Type Method and Description
      void Marshaller.marshal(Object jaxbElement, XMLStreamWriter writer)
      Marshal the content tree rooted at jaxbElement into a XMLStreamWriter.

    • Uses of XMLStreamWriter in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type XMLStreamWriter
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.marshal(Object obj, XMLStreamWriter writer)

    • Uses of XMLStreamWriter in javax.xml.stream

      Methods in javax.xml.stream that return XMLStreamWriter
      Modifier and Type Method and Description
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(OutputStream stream)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(OutputStream stream, String encoding)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(Result result)
      Create a new XMLStreamWriter that writes to a JAXP result.
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(Writer stream)
      Create a new XMLStreamWriter that writes to a writer

    • Uses of XMLStreamWriter in javax.xml.transform.stax

      Methods in javax.xml.transform.stax that return XMLStreamWriter
      Modifier and Type Method and Description
      XMLStreamWriter StAXResult.getXMLStreamWriter()
      Get the XMLStreamWriter used by this StAXResult.
      Constructors in javax.xml.transform.stax with parameters of type XMLStreamWriter
      Constructor and Description
      StAXResult(XMLStreamWriter xmlStreamWriter)
      Creates a new instance of a StAXResult by supplying an XMLStreamWriter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EventFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface EventFilter

  • public interface EventFilter
    This interface declares a simple filter interface that one can create to filter XMLEventReaders
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean accept(XMLEvent event)
      Tests whether this event is part of this stream.

    • Method Detail

      • accept

        boolean accept(XMLEvent event)
        Tests whether this event is part of this stream. This method will return true if this filter accepts this event and false otherwise.
        Parameters:
        event - the event to test
        Returns:
        true if this filter accepts this event, false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.stream.events

  • Interface Summary
    Interface Description
    Attribute
    An interface that contains information about an attribute.
    Characters
    This describes the interface to Characters events.
    Comment
    An interface for comment events
    DTD
    This is the top level interface for events dealing with DTDs
    EndDocument
    A marker interface for the end of the document
    EndElement
    An interface for the end element event.
    EntityDeclaration
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    EntityReference
    An interface for handling Entity events.
    Namespace
    An interface that contains information about a namespace.
    NotationDeclaration
    An interface for handling Notation Declarations Receive notification of a notation declaration event.
    ProcessingInstruction
    An interface that describes the data found in processing instructions
    StartDocument
    An interface for the start document event
    StartElement
    The StartElement interface provides access to information about start elements.
    XMLEvent
    This is the base event interface for handling markup events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EndDocument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface EndDocument

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface EndDocument
extends XMLEvent
    A marker interface for the end of the document
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream.events Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.stream.events

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • javax.xml.stream.XMLStreamConstants
    • javax.xml.stream.events.XMLEvent
      • javax.xml.stream.events.Attribute
        • javax.xml.stream.events.Namespace
      • javax.xml.stream.events.Characters
      • javax.xml.stream.events.Comment
      • javax.xml.stream.events.DTD
      • javax.xml.stream.events.EndDocument
      • javax.xml.stream.events.EndElement
      • javax.xml.stream.events.EntityDeclaration
      • javax.xml.stream.events.EntityReference
      • javax.xml.stream.events.NotationDeclaration
      • javax.xml.stream.events.ProcessingInstruction
      • javax.xml.stream.events.StartDocument
      • javax.xml.stream.events.StartElement
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.stream.events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.stream.events

  • Packages that use javax.xml.stream.events
    Package Description
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util
  • Classes in javax.xml.stream.events used by javax.xml.stream
    Class and Description
    Attribute
    An interface that contains information about an attribute.
    Characters
    This describes the interface to Characters events.
    Comment
    An interface for comment events
    DTD
    This is the top level interface for events dealing with DTDs
    EndDocument
    A marker interface for the end of the document
    EndElement
    An interface for the end element event.
    EntityDeclaration
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    EntityReference
    An interface for handling Entity events.
    Namespace
    An interface that contains information about a namespace.
    ProcessingInstruction
    An interface that describes the data found in processing instructions
    StartDocument
    An interface for the start document event
    StartElement
    The StartElement interface provides access to information about start elements.
    XMLEvent
    This is the base event interface for handling markup events.
  • Classes in javax.xml.stream.events used by javax.xml.stream.events
    Class and Description
    Attribute
    An interface that contains information about an attribute.
    Characters
    This describes the interface to Characters events.
    EndElement
    An interface for the end element event.
    EntityDeclaration
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    StartElement
    The StartElement interface provides access to information about start elements.
    XMLEvent
    This is the base event interface for handling markup events.
  • Classes in javax.xml.stream.events used by javax.xml.stream.util
    Class and Description
    XMLEvent
    This is the base event interface for handling markup events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Attribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface Attribute

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants
    All Known Subinterfaces:
    Namespace

    public interface Attribute
extends XMLEvent
    An interface that contains information about an attribute. Attributes are reported as a set of events accessible from a StartElement. Other applications may report Attributes as first-order events, for example as the results of an XPath expression.
    Since:
    1.6
    Version:
    1.0
    See Also:
    StartElement

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getDTDType()
      Gets the type of this attribute, default is the String "CDATA"
      QName getName()
      Returns the QName for this attribute
      String getValue()
      Gets the normalized value of this attribute
      boolean isSpecified()
      A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getName

        QName getName()
        Returns the QName for this attribute

      • getValue

        String getValue()
        Gets the normalized value of this attribute

      • getDTDType

        String getDTDType()
        Gets the type of this attribute, default is the String "CDATA"
        Returns:
        the type as a String, default is "CDATA"

      • isSpecified

        boolean isSpecified()
        A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.
        Returns:
        returns true if this was specified in the start element
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Characters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface Characters

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface Characters
extends XMLEvent
    This describes the interface to Characters events. All text events get reported as Characters events. Content, CData and whitespace are all reported as Characters events. IgnorableWhitespace, in most cases, will be set to false unless an element declaration of element content is present for the current element.
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getData()
      Get the character data of this event
      boolean isCData()
      Returns true if this is a CData section.
      boolean isIgnorableWhiteSpace()
      Return true if this is ignorableWhiteSpace.
      boolean isWhiteSpace()
      Returns true if this set of Characters is all whitespace.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getData

        String getData()
        Get the character data of this event

      • isWhiteSpace

        boolean isWhiteSpace()
        Returns true if this set of Characters is all whitespace. Whitespace inside a document is reported as CHARACTERS. This method allows checking of CHARACTERS events to see if they are composed of only whitespace characters

      • isCData

        boolean isCData()
        Returns true if this is a CData section. If this event is CData its event type will be CDATA If javax.xml.stream.isCoalescing is set to true CDATA Sections that are surrounded by non CDATA characters will be reported as a single Characters event. This method will return false in this case.

      • isIgnorableWhiteSpace

        boolean isIgnorableWhiteSpace()
        Return true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.Attribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.Attribute

  • Packages that use Attribute
    Package Description
    javax.xml.stream
    javax.xml.stream.events

    • Uses of Attribute in javax.xml.stream

      Methods in javax.xml.stream that return Attribute
      Modifier and Type Method and Description
      abstract Attribute XMLEventFactory.createAttribute(QName name, String value)
      Create a new Attribute
      abstract Attribute XMLEventFactory.createAttribute(String localName, String value)
      Create a new Attribute
      abstract Attribute XMLEventFactory.createAttribute(String prefix, String namespaceURI, String localName, String value)
      Create a new Attribute

    • Uses of Attribute in javax.xml.stream.events

      Subinterfaces of Attribute in javax.xml.stream.events
      Modifier and Type Interface and Description
      interface  Namespace
      An interface that contains information about a namespace.
      Methods in javax.xml.stream.events that return Attribute
      Modifier and Type Method and Description
      Attribute StartElement.getAttributeByName(QName name)
      Returns the attribute referred to by this name
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.Characters

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.Characters

  • Packages that use Characters
    Package Description
    javax.xml.stream
    javax.xml.stream.events

    • Uses of Characters in javax.xml.stream

      Methods in javax.xml.stream that return Characters
      Modifier and Type Method and Description
      abstract Characters XMLEventFactory.createCData(String content)
      Create a Characters event with the CData flag set to true
      abstract Characters XMLEventFactory.createCharacters(String content)
      Create a Characters event, this method does not check if the content is all whitespace.
      abstract Characters XMLEventFactory.createIgnorableSpace(String content)
      Create an ignorable space
      abstract Characters XMLEventFactory.createSpace(String content)
      Create a Characters event with the isSpace flag set to true

    • Uses of Characters in javax.xml.stream.events

      Methods in javax.xml.stream.events that return Characters
      Modifier and Type Method and Description
      Characters XMLEvent.asCharacters()
      Returns this event as Characters, may result in a class cast exception if this event is not Characters.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.Comment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.Comment

  • Packages that use Comment
    Package Description
    javax.xml.stream

    • Uses of Comment in javax.xml.stream

      Methods in javax.xml.stream that return Comment
      Modifier and Type Method and Description
      abstract Comment XMLEventFactory.createComment(String text)
      Create a comment
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.DTD

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.DTD

  • Packages that use DTD
    Package Description
    javax.xml.stream

    • Uses of DTD in javax.xml.stream

      Methods in javax.xml.stream that return DTD
      Modifier and Type Method and Description
      abstract DTD XMLEventFactory.createDTD(String dtd)
      Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.EndDocument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.EndDocument

  • Packages that use EndDocument
    Package Description
    javax.xml.stream

    • Uses of EndDocument in javax.xml.stream

      Methods in javax.xml.stream that return EndDocument
      Modifier and Type Method and Description
      abstract EndDocument XMLEventFactory.createEndDocument()
      Creates a new instance of an EndDocument event
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.EndElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.EndElement

  • Packages that use EndElement
    Package Description
    javax.xml.stream
    javax.xml.stream.events

    • Uses of EndElement in javax.xml.stream

      Methods in javax.xml.stream that return EndElement
      Modifier and Type Method and Description
      abstract EndElement XMLEventFactory.createEndElement(QName name, Iterator namespaces)
      Create a new EndElement
      abstract EndElement XMLEventFactory.createEndElement(String prefix, String namespaceUri, String localName)
      Create a new EndElement
      abstract EndElement XMLEventFactory.createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
      Create a new EndElement

    • Uses of EndElement in javax.xml.stream.events

      Methods in javax.xml.stream.events that return EndElement
      Modifier and Type Method and Description
      EndElement XMLEvent.asEndElement()
      Returns this event as an end element event, may result in a class cast exception if this event is not a end element.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.EntityDeclaration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.EntityDeclaration

  • Packages that use EntityDeclaration
    Package Description
    javax.xml.stream
    javax.xml.stream.events

    • Uses of EntityDeclaration in javax.xml.stream

      Methods in javax.xml.stream with parameters of type EntityDeclaration
      Modifier and Type Method and Description
      abstract EntityReference XMLEventFactory.createEntityReference(String name, EntityDeclaration declaration)
      Creates a new instance of a EntityReference event

    • Uses of EntityDeclaration in javax.xml.stream.events

      Methods in javax.xml.stream.events that return EntityDeclaration
      Modifier and Type Method and Description
      EntityDeclaration EntityReference.getDeclaration()
      Return the declaration of this entity.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.EntityReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.EntityReference

  • Packages that use EntityReference
    Package Description
    javax.xml.stream

    • Uses of EntityReference in javax.xml.stream

      Methods in javax.xml.stream that return EntityReference
      Modifier and Type Method and Description
      abstract EntityReference XMLEventFactory.createEntityReference(String name, EntityDeclaration declaration)
      Creates a new instance of a EntityReference event
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.Namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.Namespace

  • Packages that use Namespace
    Package Description
    javax.xml.stream

    • Uses of Namespace in javax.xml.stream

      Methods in javax.xml.stream that return Namespace
      Modifier and Type Method and Description
      abstract Namespace XMLEventFactory.createNamespace(String namespaceURI)
      Create a new default Namespace
      abstract Namespace XMLEventFactory.createNamespace(String prefix, String namespaceUri)
      Create a new Namespace
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.NotationDeclaration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.NotationDeclaration

No usage of javax.xml.stream.events.NotationDeclaration
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.ProcessingInstruction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.ProcessingInstruction

  • Packages that use ProcessingInstruction
    Package Description
    javax.xml.stream

    • Uses of ProcessingInstruction in javax.xml.stream

      Methods in javax.xml.stream that return ProcessingInstruction
      Modifier and Type Method and Description
      abstract ProcessingInstruction XMLEventFactory.createProcessingInstruction(String target, String data)
      Create a processing instruction
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.StartDocument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.StartDocument

  • Packages that use StartDocument
    Package Description
    javax.xml.stream

    • Uses of StartDocument in javax.xml.stream

      Methods in javax.xml.stream that return StartDocument
      Modifier and Type Method and Description
      abstract StartDocument XMLEventFactory.createStartDocument()
      Creates a new instance of a StartDocument event
      abstract StartDocument XMLEventFactory.createStartDocument(String encoding)
      Creates a new instance of a StartDocument event
      abstract StartDocument XMLEventFactory.createStartDocument(String encoding, String version)
      Creates a new instance of a StartDocument event
      abstract StartDocument XMLEventFactory.createStartDocument(String encoding, String version, boolean standalone)
      Creates a new instance of a StartDocument event
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.StartElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.StartElement

  • Packages that use StartElement
    Package Description
    javax.xml.stream
    javax.xml.stream.events

    • Uses of StartElement in javax.xml.stream

      Methods in javax.xml.stream that return StartElement
      Modifier and Type Method and Description
      abstract StartElement XMLEventFactory.createStartElement(QName name, Iterator attributes, Iterator namespaces)
      Create a new StartElement.
      abstract StartElement XMLEventFactory.createStartElement(String prefix, String namespaceUri, String localName)
      Create a new StartElement.
      abstract StartElement XMLEventFactory.createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
      Create a new StartElement.
      abstract StartElement XMLEventFactory.createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
      Create a new StartElement.

    • Uses of StartElement in javax.xml.stream.events

      Methods in javax.xml.stream.events that return StartElement
      Modifier and Type Method and Description
      StartElement XMLEvent.asStartElement()
      Returns this event as a start element event, may result in a class cast exception if this event is not a start element.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.events.XMLEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.events.XMLEvent

  • Packages that use XMLEvent
    Package Description
    javax.xml.stream
    javax.xml.stream.events
    javax.xml.stream.util

    • Uses of XMLEvent in javax.xml.stream

      Methods in javax.xml.stream that return XMLEvent
      Modifier and Type Method and Description
      XMLEvent XMLEventReader.nextEvent()
      Get the next XMLEvent
      XMLEvent XMLEventReader.nextTag()
      Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
      XMLEvent XMLEventReader.peek()
      Check the next XMLEvent without reading it from the stream.
      Methods in javax.xml.stream with parameters of type XMLEvent
      Modifier and Type Method and Description
      boolean EventFilter.accept(XMLEvent event)
      Tests whether this event is part of this stream.
      void XMLEventWriter.add(XMLEvent event)
      Add an event to the output stream Adding a START_ELEMENT will open a new namespace scope that will be closed when the corresponding END_ELEMENT is written.

    • Uses of XMLEvent in javax.xml.stream.events

      Subinterfaces of XMLEvent in javax.xml.stream.events
      Modifier and Type Interface and Description
      interface  Attribute
      An interface that contains information about an attribute.
      interface  Characters
      This describes the interface to Characters events.
      interface  Comment
      An interface for comment events
      interface  DTD
      This is the top level interface for events dealing with DTDs
      interface  EndDocument
      A marker interface for the end of the document
      interface  EndElement
      An interface for the end element event.
      interface  EntityDeclaration
      An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
      interface  EntityReference
      An interface for handling Entity events.
      interface  Namespace
      An interface that contains information about a namespace.
      interface  NotationDeclaration
      An interface for handling Notation Declarations Receive notification of a notation declaration event.
      interface  ProcessingInstruction
      An interface that describes the data found in processing instructions
      interface  StartDocument
      An interface for the start document event
      interface  StartElement
      The StartElement interface provides access to information about start elements.

    • Uses of XMLEvent in javax.xml.stream.util

      Methods in javax.xml.stream.util that return XMLEvent
      Modifier and Type | Method and Description
      XMLEvent XMLEventAllocator.allocate(XMLStreamReader reader)
      This method allocates an event given the current state of the XMLStreamReader.
      XMLEvent | EventReaderDelegate.nextEvent()
      XMLEvent | EventReaderDelegate.nextTag()
      XMLEvent | EventReaderDelegate.peek()
      Methods in javax.xml.stream.util with parameters of type XMLEvent
      Modifier and Type Method and Description
      void XMLEventConsumer.add(XMLEvent event)
      This method adds an event to the consumer.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Comment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface Comment

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface Comment
extends XMLEvent
    An interface for comment events
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getText()
      Return the string data of the comment, returns empty string if it does not exist

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getText

        String getText()
        Return the string data of the comment, returns empty string if it does not exist
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DTD

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface DTD

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface DTD
extends XMLEvent
    This is the top level interface for events dealing with DTDs
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getDocumentTypeDeclaration()
      Returns the entire Document Type Declaration as a string, including the internal DTD subset.
      List getEntities()
      Return a List containing the general entities, both external and internal, declared in the DTD.
      List getNotations()
      Return a List containing the notations declared in the DTD.
      Object getProcessedDTD()
      Returns an implementation defined representation of the DTD.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getDocumentTypeDeclaration

        String getDocumentTypeDeclaration()
        Returns the entire Document Type Declaration as a string, including the internal DTD subset. This may be null if there is not an internal subset. If it is not null it must return the entire Document Type Declaration which matches the doctypedecl production in the XML 1.0 specification

      • getProcessedDTD

        Object getProcessedDTD()
        Returns an implementation defined representation of the DTD. This method may return null if no representation is available.

      • getNotations

        List getNotations()
        Return a List containing the notations declared in the DTD. This list must contain NotationDeclaration events.
        Returns:
        an unordered list of NotationDeclaration events
        See Also:
        NotationDeclaration

      • getEntities

        List getEntities()
        Return a List containing the general entities, both external and internal, declared in the DTD. This list must contain EntityDeclaration events.
        Returns:
        an unordered list of EntityDeclaration events
        See Also:
        EntityDeclaration
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EndElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface EndElement

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface EndElement
extends XMLEvent
    An interface for the end element event. An EndElement is reported for each End Tag in the document.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLEvent

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      QName getName()
      Get the name of this event
      Iterator getNamespaces()
      Returns an Iterator of namespaces that have gone out of scope.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getName

        QName getName()
        Get the name of this event
        Returns:
        the qualified name of this event

      • getNamespaces

        Iterator getNamespaces()
        Returns an Iterator of namespaces that have gone out of scope. Returns an empty iterator if no namespaces have gone out of scope.
        Returns:
        an Iterator over Namespace interfaces, or an empty iterator
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EntityDeclaration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface EntityDeclaration

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface EntityDeclaration
extends XMLEvent
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBaseURI()
      Get the base URI for this reference or null if this information is not available
      String getName()
      The entity's name
      String getNotationName()
      The name of the associated notation.
      String getPublicId()
      The entity's public identifier, or null if none was given
      String getReplacementText()
      The replacement text of the entity.
      String getSystemId()
      The entity's system identifier.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getPublicId

        String getPublicId()
        The entity's public identifier, or null if none was given
        Returns:
        the public ID for this declaration or null

      • getSystemId

        String getSystemId()
        The entity's system identifier.
        Returns:
        the system ID for this declaration or null

      • getName

        String getName()
        The entity's name
        Returns:
        the name, may not be null

      • getNotationName

        String getNotationName()
        The name of the associated notation.
        Returns:
        the notation name

      • getReplacementText

        String getReplacementText()
        The replacement text of the entity. This method will only return non-null if this is an internal entity.
        Returns:
        null or the replacment text

      • getBaseURI

        String getBaseURI()
        Get the base URI for this reference or null if this information is not available
        Returns:
        the base URI or null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EntityReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface EntityReference

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface EntityReference
extends XMLEvent
    An interface for handling Entity events. This event reports entities that have not been resolved and reports their replacement text unprocessed (if available). This event will be reported if javax.xml.stream.isReplacingEntityReferences is set to false. If javax.xml.stream.isReplacingEntityReferences is set to true entity references will be resolved transparently. Entities are handled in two possible ways: (1) If javax.xml.stream.isReplacingEntityReferences is set to true all entity references are resolved and reported as markup transparently. (2) If javax.xml.stream.isReplacingEntityReferences is set to false Entity references are reported as an EntityReference Event.
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      EntityDeclaration getDeclaration()
      Return the declaration of this entity.
      String getName()
      The name of the entity

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getDeclaration

        EntityDeclaration getDeclaration()
        Return the declaration of this entity.

      • getName

        String getName()
        The name of the entity
        Returns:
        the entity's name, may not be null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface Namespace

  • All Superinterfaces:
    Attribute, XMLEvent, XMLStreamConstants

    public interface Namespace
extends Attribute
    An interface that contains information about a namespace. Namespaces are accessed from a StartElement.
    Since:
    1.6
    Version:
    1.0
    See Also:
    StartElement

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getNamespaceURI()
      Gets the uri bound to the prefix of this namespace
      String getPrefix()
      Gets the prefix, returns "" if this is a default namespace declaration.
      boolean isDefaultNamespaceDeclaration()
      returns true if this attribute declares the default namespace

      • Methods inherited from interface javax.xml.stream.events.Attribute

        getDTDType, getName, getValue, isSpecified

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getPrefix

        String getPrefix()
        Gets the prefix, returns "" if this is a default namespace declaration.

      • getNamespaceURI

        String getNamespaceURI()
        Gets the uri bound to the prefix of this namespace

      • isDefaultNamespaceDeclaration

        boolean isDefaultNamespaceDeclaration()
        returns true if this attribute declares the default namespace
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotationDeclaration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface NotationDeclaration

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface NotationDeclaration
extends XMLEvent
    An interface for handling Notation Declarations Receive notification of a notation declaration event. It is up to the application to record the notation for later reference, At least one of publicId and systemId must be non-null. There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      The notation name.
      String getPublicId()
      The notation's public identifier, or null if none was given.
      String getSystemId()
      The notation's system identifier, or null if none was given.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getName

        String getName()
        The notation name.

      • getPublicId

        String getPublicId()
        The notation's public identifier, or null if none was given.

      • getSystemId

        String getSystemId()
        The notation's system identifier, or null if none was given.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ProcessingInstruction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface ProcessingInstruction

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface ProcessingInstruction
extends XMLEvent
    An interface that describes the data found in processing instructions
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getData()
      The data section of the processing instruction
      String getTarget()
      The target section of the processing instruction

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getTarget

        String getTarget()
        The target section of the processing instruction
        Returns:
        the String value of the PI or null

      • getData

        String getData()
        The data section of the processing instruction
        Returns:
        the String value of the PI's data or null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StartDocument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface StartDocument

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface StartDocument
extends XMLEvent
    An interface for the start document event
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean encodingSet()
      Returns true if CharacterEncodingScheme was set in the encoding declaration of the document
      String getCharacterEncodingScheme()
      Returns the encoding style of the XML data
      String getSystemId()
      Returns the system ID of the XML data
      String getVersion()
      Returns the version of XML of this XML stream
      boolean isStandalone()
      Returns if this XML is standalone
      boolean standaloneSet()
      Returns true if the standalone attribute was set in the encoding declaration of the document.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getSystemId

        String getSystemId()
        Returns the system ID of the XML data
        Returns:
        the system ID, defaults to ""

      • getCharacterEncodingScheme

        String getCharacterEncodingScheme()
        Returns the encoding style of the XML data
        Returns:
        the character encoding, defaults to "UTF-8"

      • encodingSet

        boolean encodingSet()
        Returns true if CharacterEncodingScheme was set in the encoding declaration of the document

      • isStandalone

        boolean isStandalone()
        Returns if this XML is standalone
        Returns:
        the standalone state of XML, defaults to "no"

      • standaloneSet

        boolean standaloneSet()
        Returns true if the standalone attribute was set in the encoding declaration of the document.

      • getVersion

        String getVersion()
        Returns the version of XML of this XML stream
        Returns:
        the version of XML, defaults to "1.0"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StartElement

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface StartElement

  • All Superinterfaces:
    XMLEvent, XMLStreamConstants

    public interface StartElement
extends XMLEvent
    The StartElement interface provides access to information about start elements. A StartElement is reported for each Start Tag in the document.
    Since:
    1.6
    Version:
    1.0

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Attribute getAttributeByName(QName name)
      Returns the attribute referred to by this name
      Iterator getAttributes()
      Returns an Iterator of non-namespace declared attributes declared on this START_ELEMENT, returns an empty iterator if there are no attributes.
      QName getName()
      Get the name of this event
      NamespaceContext getNamespaceContext()
      Gets a read-only namespace context.
      Iterator getNamespaces()
      Returns an Iterator of namespaces declared on this element.
      String getNamespaceURI(String prefix)
      Gets the value that the prefix is bound to in the context of this element.

      • Methods inherited from interface javax.xml.stream.events.XMLEvent

        asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode

    • Method Detail

      • getName

        QName getName()
        Get the name of this event
        Returns:
        the qualified name of this event

      • getAttributes

        Iterator getAttributes()
        Returns an Iterator of non-namespace declared attributes declared on this START_ELEMENT, returns an empty iterator if there are no attributes. The iterator must contain only implementations of the javax.xml.stream.Attribute interface. Attributes are fundamentally unordered and may not be reported in any order.
        Returns:
        a readonly Iterator over Attribute interfaces, or an empty iterator

      • getNamespaces

        Iterator getNamespaces()
        Returns an Iterator of namespaces declared on this element. This Iterator does not contain previously declared namespaces unless they appear on the current START_ELEMENT. Therefore this list may contain redeclared namespaces and duplicate namespace declarations. Use the getNamespaceContext() method to get the current context of namespace declarations.

        The iterator must contain only implementations of the javax.xml.stream.Namespace interface.

        A Namespace isA Attribute. One can iterate over a list of namespaces as a list of attributes. However this method returns only the list of namespaces declared on this START_ELEMENT and does not include the attributes declared on this START_ELEMENT. Returns an empty iterator if there are no namespaces.

        Returns:
        a readonly Iterator over Namespace interfaces, or an empty iterator

      • getAttributeByName

        Attribute getAttributeByName(QName name)
        Returns the attribute referred to by this name
        Parameters:
        name - the qname of the desired name
        Returns:
        the attribute corresponding to the name value or null

      • getNamespaceContext

        NamespaceContext getNamespaceContext()
        Gets a read-only namespace context. If no context is available this method will return an empty namespace context. The NamespaceContext contains information about all namespaces in scope for this StartElement.
        Returns:
        the current namespace context

      • getNamespaceURI

        String getNamespaceURI(String prefix)
        Gets the value that the prefix is bound to in the context of this element. Returns null if the prefix is not bound in this context
        Parameters:
        prefix - the prefix to lookup
        Returns:
        the uri bound to the prefix or null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.events

Interface XMLEvent

  • All Superinterfaces:
    XMLStreamConstants
    All Known Subinterfaces:
    Attribute, Characters, Comment, DTD, EndDocument, EndElement, EntityDeclaration, EntityReference, Namespace, NotationDeclaration, ProcessingInstruction, StartDocument, StartElement

    public interface XMLEvent
extends XMLStreamConstants
    This is the base event interface for handling markup events. Events are value objects that are used to communicate the XML 1.0 InfoSet to the Application. Events may be cached and referenced after the parse has completed.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLEventReader, Characters, ProcessingInstruction, StartElement, EndElement, StartDocument, EndDocument, EntityReference, EntityDeclaration, NotationDeclaration

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Characters asCharacters()
      Returns this event as Characters, may result in a class cast exception if this event is not Characters.
      EndElement asEndElement()
      Returns this event as an end element event, may result in a class cast exception if this event is not a end element.
      StartElement asStartElement()
      Returns this event as a start element event, may result in a class cast exception if this event is not a start element.
      int getEventType()
      Returns an integer code for this event.
      Location getLocation()
      Return the location of this event.
      QName getSchemaType()
      This method is provided for implementations to provide optional type information about the associated event.
      boolean isAttribute()
      A utility function to check if this event is an Attribute.
      boolean isCharacters()
      A utility function to check if this event is Characters.
      boolean isEndDocument()
      A utility function to check if this event is an EndDocument.
      boolean isEndElement()
      A utility function to check if this event is a EndElement.
      boolean isEntityReference()
      A utility function to check if this event is an EntityReference.
      boolean isNamespace()
      A utility function to check if this event is a Namespace.
      boolean isProcessingInstruction()
      A utility function to check if this event is a ProcessingInstruction.
      boolean isStartDocument()
      A utility function to check if this event is a StartDocument.
      boolean isStartElement()
      A utility function to check if this event is a StartElement.
      void writeAsEncodedUnicode(Writer writer)
      This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.

    • Method Detail

      • getEventType

        int getEventType()
        Returns an integer code for this event.
        See Also:
        XMLStreamConstants.START_ELEMENT, XMLStreamConstants.END_ELEMENT, XMLStreamConstants.CHARACTERS, XMLStreamConstants.ATTRIBUTE, XMLStreamConstants.NAMESPACE, XMLStreamConstants.PROCESSING_INSTRUCTION, XMLStreamConstants.COMMENT, XMLStreamConstants.START_DOCUMENT, XMLStreamConstants.END_DOCUMENT, XMLStreamConstants.DTD

      • getLocation

        Location getLocation()
        Return the location of this event. The Location returned from this method is non-volatile and will retain its information.
        See Also:
        Location

      • isStartElement

        boolean isStartElement()
        A utility function to check if this event is a StartElement.
        See Also:
        StartElement

      • isAttribute

        boolean isAttribute()
        A utility function to check if this event is an Attribute.
        See Also:
        Attribute

      • isNamespace

        boolean isNamespace()
        A utility function to check if this event is a Namespace.
        See Also:
        Namespace

      • isEndElement

        boolean isEndElement()
        A utility function to check if this event is a EndElement.
        See Also:
        EndElement

      • isEntityReference

        boolean isEntityReference()
        A utility function to check if this event is an EntityReference.
        See Also:
        EntityReference

      • isProcessingInstruction

        boolean isProcessingInstruction()
        A utility function to check if this event is a ProcessingInstruction.
        See Also:
        ProcessingInstruction

      • isCharacters

        boolean isCharacters()
        A utility function to check if this event is Characters.
        See Also:
        Characters

      • isStartDocument

        boolean isStartDocument()
        A utility function to check if this event is a StartDocument.
        See Also:
        StartDocument

      • isEndDocument

        boolean isEndDocument()
        A utility function to check if this event is an EndDocument.
        See Also:
        EndDocument

      • asStartElement

        StartElement asStartElement()
        Returns this event as a start element event, may result in a class cast exception if this event is not a start element.

      • asEndElement

        EndElement asEndElement()
        Returns this event as an end element event, may result in a class cast exception if this event is not a end element.

      • asCharacters

        Characters asCharacters()
        Returns this event as Characters, may result in a class cast exception if this event is not Characters.

      • getSchemaType

        QName getSchemaType()
        This method is provided for implementations to provide optional type information about the associated event. It is optional and will return null if no information is available.

      • writeAsEncodedUnicode

        void writeAsEncodedUnicode(Writer writer)
                    throws XMLStreamException
        This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.
        Parameters:
        writer - The writer that will output the data
        Throws:
        XMLStreamException - if there is a fatal error writing the event
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Class FactoryConfigurationError

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Error
        • javax.xml.stream.FactoryConfigurationError
  • All Implemented Interfaces:
    Serializable

    public class FactoryConfigurationError
extends Error
    An error class for reporting factory configuration errors.
    Since:
    1.6
    Version:
    1.0
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      FactoryConfigurationError()
      Default constructor
      FactoryConfigurationError(Exception e)
      Construct an exception with a nested inner exception
      FactoryConfigurationError(Exception e, String msg)
      Construct an exception with a nested inner exception and a message
      FactoryConfigurationError(String msg)
      Construct an exception with associated message
      FactoryConfigurationError(String msg, Exception e)
      Construct an exception with a nested inner exception and a message

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      use the exception chaining mechanism of JDK1.4
      Exception getException()
      Return the nested exception (if any)
      String getMessage()
      Report the message associated with this error

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • FactoryConfigurationError

        public FactoryConfigurationError()
        Default constructor

      • FactoryConfigurationError

        public FactoryConfigurationError(Exception e)
        Construct an exception with a nested inner exception
        Parameters:
        e - the exception to nest

      • FactoryConfigurationError

        public FactoryConfigurationError(Exception e,
                                 String msg)
        Construct an exception with a nested inner exception and a message
        Parameters:
        e - the exception to nest
        msg - the message to report

      • FactoryConfigurationError

        public FactoryConfigurationError(String msg,
                                 Exception e)
        Construct an exception with a nested inner exception and a message
        Parameters:
        msg - the message to report
        e - the exception to nest

      • FactoryConfigurationError

        public FactoryConfigurationError(String msg)
        Construct an exception with associated message
        Parameters:
        msg - the message to report

    • Method Detail

      • getException

        public Exception getException()
        Return the nested exception (if any)
        Returns:
        the nested exception or null

      • getCause

        public Throwable getCause()
        use the exception chaining mechanism of JDK1.4
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.

      • getMessage

        public String getMessage()
        Report the message associated with this error
        Overrides:
        getMessage in class Throwable
        Returns:
        the string value of the message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface Location

  • public interface Location
    Provides information on the location of an event. All the information provided by a Location is optional. For example an application may only report line numbers.
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getCharacterOffset()
      Return the byte or character offset into the input source this location is pointing to.
      int getColumnNumber()
      Return the column number where the current event ends, returns -1 if none is available.
      int getLineNumber()
      Return the line number where the current event ends, returns -1 if none is available.
      String getPublicId()
      Returns the public ID of the XML
      String getSystemId()
      Returns the system ID of the XML

    • Method Detail

      • getLineNumber

        int getLineNumber()
        Return the line number where the current event ends, returns -1 if none is available.
        Returns:
        the current line number

      • getColumnNumber

        int getColumnNumber()
        Return the column number where the current event ends, returns -1 if none is available.
        Returns:
        the current column number

      • getCharacterOffset

        int getCharacterOffset()
        Return the byte or character offset into the input source this location is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. Returns -1 if there is no offset available.
        Returns:
        the current offset

      • getPublicId

        String getPublicId()
        Returns the public ID of the XML
        Returns:
        the public ID, or null if not available

      • getSystemId

        String getSystemId()
        Returns the system ID of the XML
        Returns:
        the system ID, or null if not available
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StreamFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface StreamFilter

  • public interface StreamFilter
    This interface declares a simple filter interface that one can create to filter XMLStreamReaders
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean accept(XMLStreamReader reader)
      Tests whether the current state is part of this stream.

    • Method Detail

      • accept

        boolean accept(XMLStreamReader reader)
        Tests whether the current state is part of this stream. This method will return true if this filter accepts this event and false otherwise. The method should not change the state of the reader when accepting a state.
        Parameters:
        reader - the event to test
        Returns:
        true if this filter accepts this event, false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.stream.util

  • Interface Summary
    Interface Description
    XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader.
    XMLEventConsumer
    This interface defines an event consumer interface.
  • Class Summary
    Class Description
    EventReaderDelegate
    This is the base class for deriving an XMLEventReader filter.
    StreamReaderDelegate
    This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream.util Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.stream.util

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.stream.util.EventReaderDelegate (implements javax.xml.stream.XMLEventReader)
    • javax.xml.stream.util.StreamReaderDelegate (implements javax.xml.stream.XMLStreamReader)

Interface Hierarchy

  • javax.xml.stream.util.XMLEventAllocator
  • javax.xml.stream.util.XMLEventConsumer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.stream.util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.stream.util

  • Packages that use javax.xml.stream.util
    Package Description
    javax.xml.stream
    javax.xml.stream.util
  • Classes in javax.xml.stream.util used by javax.xml.stream
    Class and Description
    XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader.
    XMLEventConsumer
    This interface defines an event consumer interface.
  • Classes in javax.xml.stream.util used by javax.xml.stream.util
    Class and Description
    XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader.
    XMLEventConsumer
    This interface defines an event consumer interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.util.EventReaderDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.util.EventReaderDelegate

No usage of javax.xml.stream.util.EventReaderDelegate
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.stream.util.StreamReaderDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.stream.util.StreamReaderDelegate

No usage of javax.xml.stream.util.StreamReaderDelegate
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.util.XMLEventAllocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.util.XMLEventAllocator

  • Packages that use XMLEventAllocator
    Package Description
    javax.xml.stream
    javax.xml.stream.util

    • Uses of XMLEventAllocator in javax.xml.stream

      Methods in javax.xml.stream that return XMLEventAllocator
      Modifier and Type Method and Description
      abstract XMLEventAllocator XMLInputFactory.getEventAllocator()
      Gets the allocator used by streams created with this factory
      Methods in javax.xml.stream with parameters of type XMLEventAllocator
      Modifier and Type Method and Description
      abstract void XMLInputFactory.setEventAllocator(XMLEventAllocator allocator)
      Set a user defined event allocator for events

    • Uses of XMLEventAllocator in javax.xml.stream.util

      Methods in javax.xml.stream.util that return XMLEventAllocator
      Modifier and Type Method and Description
      XMLEventAllocator XMLEventAllocator.newInstance()
      This method creates an instance of the XMLEventAllocator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.stream.util.XMLEventConsumer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.stream.util.XMLEventConsumer

  • Packages that use XMLEventConsumer
    Package Description
    javax.xml.stream
    javax.xml.stream.util

    • Uses of XMLEventConsumer in javax.xml.stream

      Subinterfaces of XMLEventConsumer in javax.xml.stream
      Modifier and Type Interface and Description
      interface  XMLEventWriter
      This is the top level interface for writing XML documents.

    • Uses of XMLEventConsumer in javax.xml.stream.util

      Methods in javax.xml.stream.util with parameters of type XMLEventConsumer
      Modifier and Type Method and Description
      void XMLEventAllocator.allocate(XMLStreamReader reader, XMLEventConsumer consumer)
      This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EventReaderDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.util

Class EventReaderDelegate

  • java.lang.Object
    • javax.xml.stream.util.EventReaderDelegate
  • All Implemented Interfaces:
    Iterator, XMLEventReader

    public class EventReaderDelegate
extends Object
implements XMLEventReader
    This is the base class for deriving an XMLEventReader filter. This class is designed to sit between an XMLEventReader and an application's XMLEventReader. By default each method does nothing but call the corresponding method on the parent interface.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLEventReader, StreamReaderDelegate

    • Constructor Summary

      Constructors
      Constructor and Description
      EventReaderDelegate()
      Construct an empty filter with no parent.
      EventReaderDelegate(XMLEventReader reader)
      Construct an filter with the specified parent.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void close()
      Frees any resources associated with this Reader.
      String getElementText()
      Reads the content of a text-only element.
      XMLEventReader getParent()
      Get the parent of this instance.
      Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      boolean hasNext()
      Check if there are more events.
      Object next()
      Returns the next element in the iteration.
      XMLEvent nextEvent()
      Get the next XMLEvent
      XMLEvent nextTag()
      Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
      XMLEvent peek()
      Check the next XMLEvent without reading it from the stream.
      void remove()
      Removes from the underlying collection the last element returned by this iterator (optional operation).
      void setParent(XMLEventReader reader)
      Set the parent of this instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface java.util.Iterator

        forEachRemaining

    • Constructor Detail

      • EventReaderDelegate

        public EventReaderDelegate()
        Construct an empty filter with no parent.

      • EventReaderDelegate

        public EventReaderDelegate(XMLEventReader reader)
        Construct an filter with the specified parent.
        Parameters:
        reader - the parent

    • Method Detail

      • setParent

        public void setParent(XMLEventReader reader)
        Set the parent of this instance.
        Parameters:
        reader - the new parent

      • getParent

        public XMLEventReader getParent()
        Get the parent of this instance.
        Returns:
        the parent or null if none is set

      • nextEvent

        public XMLEvent nextEvent()
                   throws XMLStreamException
        Description copied from interface: XMLEventReader
        Get the next XMLEvent
        Specified by:
        nextEvent in interface XMLEventReader
        Throws:
        XMLStreamException - if there is an error with the underlying XML.
        See Also:
        XMLEvent

      • next

        public Object next()
        Description copied from interface: Iterator
        Returns the next element in the iteration.
        Specified by:
        next in interface Iterator
        Returns:
        the next element in the iteration

      • hasNext

        public boolean hasNext()
        Description copied from interface: XMLEventReader
        Check if there are more events. Returns true if there are more events and false otherwise.
        Specified by:
        hasNext in interface Iterator
        Specified by:
        hasNext in interface XMLEventReader
        Returns:
        true if the event reader has more events, false otherwise

      • peek

        public XMLEvent peek()
              throws XMLStreamException
        Description copied from interface: XMLEventReader
        Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().
        Specified by:
        peek in interface XMLEventReader
        Throws:
        XMLStreamException
        See Also:
        XMLEvent

      • close

        public void close()
           throws XMLStreamException
        Description copied from interface: XMLEventReader
        Frees any resources associated with this Reader. This method does not close the underlying input source.
        Specified by:
        close in interface XMLEventReader
        Throws:
        XMLStreamException - if there are errors freeing associated resources

      • getElementText

        public String getElementText()
                      throws XMLStreamException
        Description copied from interface: XMLEventReader
        Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.
        Specified by:
        getElementText in interface XMLEventReader
        Throws:
        XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

      • nextTag

        public XMLEvent nextTag()
                 throws XMLStreamException
        Description copied from interface: XMLEventReader
        Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.
        Specified by:
        nextTag in interface XMLEventReader
        Throws:
        XMLStreamException - if anything other than space characters are encountered

      • getProperty

        public Object getProperty(String name)
                   throws IllegalArgumentException
        Description copied from interface: XMLEventReader
        Get the value of a feature/property from the underlying implementation
        Specified by:
        getProperty in interface XMLEventReader
        Parameters:
        name - The name of the property
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • remove

        public void remove()
        Description copied from interface: Iterator
        Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to Iterator.next(). The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
        Specified by:
        remove in interface Iterator
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StreamReaderDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.util

Class StreamReaderDelegate

  • java.lang.Object
    • javax.xml.stream.util.StreamReaderDelegate
  • All Implemented Interfaces:
    XMLStreamConstants, XMLStreamReader

    public class StreamReaderDelegate
extends Object
implements XMLStreamReader
    This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader. By default each method does nothing but call the corresponding method on the parent interface.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLStreamReader, EventReaderDelegate

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Constructor Summary

      Constructors
      Constructor and Description
      StreamReaderDelegate()
      Construct an empty filter with no parent.
      StreamReaderDelegate(XMLStreamReader reader)
      Construct an filter with the specified parent.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void close()
      Frees any resources associated with this Reader.
      int getAttributeCount()
      Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE.
      String getAttributeLocalName(int index)
      Returns the localName of the attribute at the provided index
      QName getAttributeName(int index)
      Returns the qname of the attribute at the provided index
      String getAttributeNamespace(int index)
      Returns the namespace of the attribute at the provided index
      String getAttributePrefix(int index)
      Returns the prefix of this attribute at the provided index
      String getAttributeType(int index)
      Returns the XML type of the attribute at the provided index
      String getAttributeValue(int index)
      Returns the value of the attribute at the index
      String getAttributeValue(String namespaceUri, String localName)
      Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality
      String getCharacterEncodingScheme()
      Returns the character encoding declared on the xml declaration Returns null if none was declared
      String getElementText()
      Reads the content of a text-only element, an exception is thrown if this is not a text-only element.
      String getEncoding()
      Return input encoding if known or null if unknown.
      int getEventType()
      Returns an integer code that indicates the type of the event the cursor is pointing to.
      String getLocalName()
      Returns the (local) name of the current event.
      Location getLocation()
      Return the current location of the processor.
      QName getName()
      Returns a QName for the current START_ELEMENT or END_ELEMENT event
      NamespaceContext getNamespaceContext()
      Returns a read only namespace context for the current position.
      int getNamespaceCount()
      Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE.
      String getNamespacePrefix(int index)
      Returns the prefix for the namespace declared at the index.
      String getNamespaceURI()
      If the current event is a START_ELEMENT or END_ELEMENT this method returns the URI of the prefix or the default namespace.
      String getNamespaceURI(int index)
      Returns the uri for the namespace declared at the index.
      String getNamespaceURI(String prefix)
      Return the uri for the given prefix.
      XMLStreamReader getParent()
      Get the parent of this instance.
      String getPIData()
      Get the data section of a processing instruction
      String getPITarget()
      Get the target of a processing instruction
      String getPrefix()
      Returns the prefix of the current event or null if the event does not have a prefix
      Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      String getText()
      Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD.
      char[] getTextCharacters()
      Returns an array which contains the characters from this event.
      int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
      Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
      int getTextLength()
      Returns the length of the sequence of characters for this Text event within the text character array.
      int getTextStart()
      Returns the offset into the text character array where the first character (of this text event) is stored.
      String getVersion()
      Get the xml version declared on the xml declaration Returns null if none was declared
      boolean hasName()
      returns true if the current event has a name (is a START_ELEMENT or END_ELEMENT) returns false otherwise
      boolean hasNext()
      Returns true if there are more parsing events and false if there are no more events.
      boolean hasText()
      Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT, SPACE
      boolean isAttributeSpecified(int index)
      Returns a boolean which indicates if this attribute was created by default
      boolean isCharacters()
      Returns true if the cursor points to a character data event
      boolean isEndElement()
      Returns true if the cursor points to an end tag (otherwise false)
      boolean isStandalone()
      Get the standalone declaration from the xml declaration
      boolean isStartElement()
      Returns true if the cursor points to a start tag (otherwise false)
      boolean isWhiteSpace()
      Returns true if the cursor points to a character data event that consists of all whitespace
      int next()
      Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
      int nextTag()
      Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.
      void require(int type, String namespaceURI, String localName)
      Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
      void setParent(XMLStreamReader reader)
      Set the parent of this instance.
      boolean standaloneSet()
      Checks if standalone was set in the document

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • StreamReaderDelegate

        public StreamReaderDelegate()
        Construct an empty filter with no parent.

      • StreamReaderDelegate

        public StreamReaderDelegate(XMLStreamReader reader)
        Construct an filter with the specified parent.
        Parameters:
        reader - the parent

    • Method Detail

      • setParent

        public void setParent(XMLStreamReader reader)
        Set the parent of this instance.
        Parameters:
        reader - the new parent

      • getParent

        public XMLStreamReader getParent()
        Get the parent of this instance.
        Returns:
        the parent or null if none is set

      • next

        public int next()
         throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks. If the property javax.xml.stream.isCoalescing is set to true element content must be coalesced and only one CHARACTERS event must be returned for contiguous element content or CDATA Sections. By default entity references must be expanded and reported transparently to the application. An exception will be thrown if an entity reference cannot be expanded. If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.

        Given the following XML:
        <foo><!--description-->content text<![CDATA[<greeting>Hello</greeting>]]>other content</foo>
        The behavior of calling next() when being on foo will be:
        1- the comment (COMMENT)
        2- then the characters section (CHARACTERS)
        3- then the CDATA section (another CHARACTERS)
        4- then the next characters section (another CHARACTERS)
        5- then the END_ELEMENT

        NOTE: empty element (such as <tag/>) will be reported with two separate events: START_ELEMENT, END_ELEMENT - This preserves parsing equivalency of empty element to <tag></tag>. This method will throw an IllegalStateException if it is called after hasNext() returns false.

        Specified by:
        next in interface XMLStreamReader
        Returns:
        the integer code corresponding to the current parse event
        Throws:
        XMLStreamException - if there is an error processing the underlying XML source
        See Also:
        XMLEvent

      • nextTag

        public int nextTag()
            throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached. If other than white space characters, COMMENT, PROCESSING_INSTRUCTION, START_ELEMENT, END_ELEMENT are encountered, an exception is thrown. This method should be used when processing element-only content seperated by white space.
        Precondition: none
        Postcondition: the current event is START_ELEMENT or END_ELEMENT and cursor may have moved over any whitespace event.
        Essentially it does the following (implementations are free to optimized but must do equivalent processing):
         int eventType = next();
 while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
 || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
 // skip whitespace
 || eventType == XMLStreamConstants.SPACE
 || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
 || eventType == XMLStreamConstants.COMMENT
 ) {
 eventType = next();
 }
 if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
 throw new String XMLStreamException("expected start or end tag", getLocation());
 }
 return eventType;
        Specified by:
        nextTag in interface XMLStreamReader
        Returns:
        the event type of the element read (START_ELEMENT or END_ELEMENT)
        Throws:
        XMLStreamException - if the current event is not white space, PROCESSING_INSTRUCTION, START_ELEMENT or END_ELEMENT

      • getElementText

        public String getElementText()
                      throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Reads the content of a text-only element, an exception is thrown if this is not a text-only element. Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content.
        Precondition: the current event is START_ELEMENT.
        Postcondition: the current event is the corresponding END_ELEMENT.
        The method does the following (implementations are free to optimized but must do equivalent processing):
         if(getEventType() != XMLStreamConstants.START_ELEMENT) {
 throw new XMLStreamException(
 "parser must be on START_ELEMENT to read next text", getLocation());
 }
 int eventType = next();
 StringBuffer content = new StringBuffer();
 while(eventType != XMLStreamConstants.END_ELEMENT ) {
 if(eventType == XMLStreamConstants.CHARACTERS
 || eventType == XMLStreamConstants.CDATA
 || eventType == XMLStreamConstants.SPACE
 || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
 buf.append(getText());
 } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
 || eventType == XMLStreamConstants.COMMENT) {
 // skipping
 } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
 throw new XMLStreamException(
 "unexpected end of document when reading element text content", this);
 } else if(eventType == XMLStreamConstants.START_ELEMENT) {
 throw new XMLStreamException(
 "element text content may not contain START_ELEMENT", getLocation());
 } else {
 throw new XMLStreamException(
 "Unexpected event type "+eventType, getLocation());
 }
 eventType = next();
 }
 return buf.toString();
        Specified by:
        getElementText in interface XMLStreamReader
        Throws:
        XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

      • require

        public void require(int type,
                    String namespaceURI,
                    String localName)
             throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.
        Specified by:
        require in interface XMLStreamReader
        Parameters:
        type - the event type
        namespaceURI - the uri of the event, may be null
        localName - the localName of the event, may be null
        Throws:
        XMLStreamException - if the required values are not matched.

      • hasNext

        public boolean hasNext()
                throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Returns true if there are more parsing events and false if there are no more events. This method will return false if the current state of the XMLStreamReader is END_DOCUMENT
        Specified by:
        hasNext in interface XMLStreamReader
        Returns:
        true if there are more events, false otherwise
        Throws:
        XMLStreamException - if there is a fatal error detecting the next state

      • close

        public void close()
           throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Frees any resources associated with this Reader. This method does not close the underlying input source.
        Specified by:
        close in interface XMLStreamReader
        Throws:
        XMLStreamException - if there are errors freeing associated resources

      • getNamespaceURI

        public String getNamespaceURI(String prefix)
        Description copied from interface: XMLStreamReader
        Return the uri for the given prefix. The uri returned depends on the current state of the processor.

        NOTE:The 'xml' prefix is bound as defined in Namespaces in XML specification to "http://www.w3.org/XML/1998/namespace".

        NOTE: The 'xmlns' prefix must be resolved to following namespace http://www.w3.org/2000/xmlns/

        Specified by:
        getNamespaceURI in interface XMLStreamReader
        Parameters:
        prefix - The prefix to lookup, may not be null
        Returns:
        the uri bound to the given prefix or null if it is not bound

      • getNamespaceContext

        public NamespaceContext getNamespaceContext()
        Description copied from interface: XMLStreamReader
        Returns a read only namespace context for the current position. The context is transient and only valid until a call to next() changes the state of the reader.
        Specified by:
        getNamespaceContext in interface XMLStreamReader
        Returns:
        return a namespace context

      • isStartElement

        public boolean isStartElement()
        Description copied from interface: XMLStreamReader
        Returns true if the cursor points to a start tag (otherwise false)
        Specified by:
        isStartElement in interface XMLStreamReader
        Returns:
        true if the cursor points to a start tag, false otherwise

      • isEndElement

        public boolean isEndElement()
        Description copied from interface: XMLStreamReader
        Returns true if the cursor points to an end tag (otherwise false)
        Specified by:
        isEndElement in interface XMLStreamReader
        Returns:
        true if the cursor points to an end tag, false otherwise

      • isCharacters

        public boolean isCharacters()
        Description copied from interface: XMLStreamReader
        Returns true if the cursor points to a character data event
        Specified by:
        isCharacters in interface XMLStreamReader
        Returns:
        true if the cursor points to character data, false otherwise

      • isWhiteSpace

        public boolean isWhiteSpace()
        Description copied from interface: XMLStreamReader
        Returns true if the cursor points to a character data event that consists of all whitespace
        Specified by:
        isWhiteSpace in interface XMLStreamReader
        Returns:
        true if the cursor points to all whitespace, false otherwise

      • getAttributeValue

        public String getAttributeValue(String namespaceUri,
                                String localName)
        Description copied from interface: XMLStreamReader
        Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality
        Specified by:
        getAttributeValue in interface XMLStreamReader
        Parameters:
        namespaceUri - the namespace of the attribute
        localName - the local name of the attribute, cannot be null
        Returns:
        returns the value of the attribute , returns null if not found

      • getAttributeCount

        public int getAttributeCount()
        Description copied from interface: XMLStreamReader
        Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE. This count excludes namespace definitions. Attribute indices are zero-based.
        Specified by:
        getAttributeCount in interface XMLStreamReader
        Returns:
        returns the number of attributes

      • getAttributeName

        public QName getAttributeName(int index)
        Description copied from interface: XMLStreamReader
        Returns the qname of the attribute at the provided index
        Specified by:
        getAttributeName in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the QName of the attribute

      • getAttributePrefix

        public String getAttributePrefix(int index)
        Description copied from interface: XMLStreamReader
        Returns the prefix of this attribute at the provided index
        Specified by:
        getAttributePrefix in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the prefix of the attribute

      • getAttributeNamespace

        public String getAttributeNamespace(int index)
        Description copied from interface: XMLStreamReader
        Returns the namespace of the attribute at the provided index
        Specified by:
        getAttributeNamespace in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the namespace URI (can be null)

      • getAttributeLocalName

        public String getAttributeLocalName(int index)
        Description copied from interface: XMLStreamReader
        Returns the localName of the attribute at the provided index
        Specified by:
        getAttributeLocalName in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the localName of the attribute

      • getAttributeType

        public String getAttributeType(int index)
        Description copied from interface: XMLStreamReader
        Returns the XML type of the attribute at the provided index
        Specified by:
        getAttributeType in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the XML type of the attribute

      • getAttributeValue

        public String getAttributeValue(int index)
        Description copied from interface: XMLStreamReader
        Returns the value of the attribute at the index
        Specified by:
        getAttributeValue in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        the attribute value

      • isAttributeSpecified

        public boolean isAttributeSpecified(int index)
        Description copied from interface: XMLStreamReader
        Returns a boolean which indicates if this attribute was created by default
        Specified by:
        isAttributeSpecified in interface XMLStreamReader
        Parameters:
        index - the position of the attribute
        Returns:
        true if this is a default attribute

      • getNamespaceCount

        public int getNamespaceCount()
        Description copied from interface: XMLStreamReader
        Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On an END_ELEMENT the count is of the namespaces that are about to go out of scope. This is the equivalent of the information reported by SAX callback for an end element event.
        Specified by:
        getNamespaceCount in interface XMLStreamReader
        Returns:
        returns the number of namespace declarations on this specific element

      • getNamespacePrefix

        public String getNamespacePrefix(int index)
        Description copied from interface: XMLStreamReader
        Returns the prefix for the namespace declared at the index. Returns null if this is the default namespace declaration
        Specified by:
        getNamespacePrefix in interface XMLStreamReader
        Parameters:
        index - the position of the namespace declaration
        Returns:
        returns the namespace prefix

      • getNamespaceURI

        public String getNamespaceURI(int index)
        Description copied from interface: XMLStreamReader
        Returns the uri for the namespace declared at the index.
        Specified by:
        getNamespaceURI in interface XMLStreamReader
        Parameters:
        index - the position of the namespace declaration
        Returns:
        returns the namespace uri

      • getEventType

        public int getEventType()
        Description copied from interface: XMLStreamReader
        Returns an integer code that indicates the type of the event the cursor is pointing to.
        Specified by:
        getEventType in interface XMLStreamReader

      • getText

        public String getText()
        Description copied from interface: XMLStreamReader
        Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD. If an ENTITY_REFERENCE has been resolved, any character data will be reported as CHARACTERS events.
        Specified by:
        getText in interface XMLStreamReader
        Returns:
        the current text or null

      • getTextCharacters

        public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
                      throws XMLStreamException
        Description copied from interface: XMLStreamReader
        Gets the the text associated with a CHARACTERS, SPACE or CDATA event. Text starting a "sourceStart" is copied into "target" starting at "targetStart". Up to "length" characters are copied. The number of characters actually copied is returned. The "sourceStart" argument must be greater or equal to 0 and less than or equal to the number of characters associated with the event. Usually, one requests text starting at a "sourceStart" of 0. If the number of characters actually copied is less than the "length", then there is no more text. Otherwise, subsequent calls need to be made until all text has been retrieved. For example: int length = 1024; char[] myBuffer = new char[ length ]; for ( int sourceStart = 0 ; ; sourceStart += length ) { int nCopied = stream.getTextCharacters( sourceStart, myBuffer, 0, length ); if (nCopied < length) break; } XMLStreamException may be thrown if there are any XML errors in the underlying source. The "targetStart" argument must be greater than or equal to 0 and less than the length of "target", Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
        Specified by:
        getTextCharacters in interface XMLStreamReader
        Parameters:
        sourceStart - the index of the first character in the source array to copy
        target - the destination array
        targetStart - the start offset in the target array
        length - the number of characters to copy
        Returns:
        the number of characters actually copied
        Throws:
        XMLStreamException - if the underlying XML source is not well-formed

      • getTextCharacters

        public char[] getTextCharacters()
        Description copied from interface: XMLStreamReader
        Returns an array which contains the characters from this event. This array should be treated as read-only and transient. I.e. the array will contain the text characters until the XMLStreamReader moves on to the next event. Attempts to hold onto the character array beyond that time or modify the contents of the array are breaches of the contract for this interface.
        Specified by:
        getTextCharacters in interface XMLStreamReader
        Returns:
        the current text or an empty array

      • getTextStart

        public int getTextStart()
        Description copied from interface: XMLStreamReader
        Returns the offset into the text character array where the first character (of this text event) is stored.
        Specified by:
        getTextStart in interface XMLStreamReader

      • getTextLength

        public int getTextLength()
        Description copied from interface: XMLStreamReader
        Returns the length of the sequence of characters for this Text event within the text character array.
        Specified by:
        getTextLength in interface XMLStreamReader

      • getEncoding

        public String getEncoding()
        Description copied from interface: XMLStreamReader
        Return input encoding if known or null if unknown.
        Specified by:
        getEncoding in interface XMLStreamReader
        Returns:
        the encoding of this instance or null

      • hasText

        public boolean hasText()
        Description copied from interface: XMLStreamReader
        Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT, SPACE
        Specified by:
        hasText in interface XMLStreamReader

      • getLocation

        public Location getLocation()
        Description copied from interface: XMLStreamReader
        Return the current location of the processor. If the Location is unknown the processor should return an implementation of Location that returns -1 for the location and null for the publicId and systemId. The location information is only valid until next() is called.
        Specified by:
        getLocation in interface XMLStreamReader

      • getName

        public QName getName()
        Description copied from interface: XMLStreamReader
        Returns a QName for the current START_ELEMENT or END_ELEMENT event
        Specified by:
        getName in interface XMLStreamReader
        Returns:
        the QName for the current START_ELEMENT or END_ELEMENT event

      • getLocalName

        public String getLocalName()
        Description copied from interface: XMLStreamReader
        Returns the (local) name of the current event. For START_ELEMENT or END_ELEMENT returns the (local) name of the current element. For ENTITY_REFERENCE it returns entity name. The current event must be START_ELEMENT or END_ELEMENT, or ENTITY_REFERENCE
        Specified by:
        getLocalName in interface XMLStreamReader
        Returns:
        the localName

      • hasName

        public boolean hasName()
        Description copied from interface: XMLStreamReader
        returns true if the current event has a name (is a START_ELEMENT or END_ELEMENT) returns false otherwise
        Specified by:
        hasName in interface XMLStreamReader

      • getNamespaceURI

        public String getNamespaceURI()
        Description copied from interface: XMLStreamReader
        If the current event is a START_ELEMENT or END_ELEMENT this method returns the URI of the prefix or the default namespace. Returns null if the event does not have a prefix.
        Specified by:
        getNamespaceURI in interface XMLStreamReader
        Returns:
        the URI bound to this elements prefix, the default namespace, or null

      • getPrefix

        public String getPrefix()
        Description copied from interface: XMLStreamReader
        Returns the prefix of the current event or null if the event does not have a prefix
        Specified by:
        getPrefix in interface XMLStreamReader
        Returns:
        the prefix or null

      • getVersion

        public String getVersion()
        Description copied from interface: XMLStreamReader
        Get the xml version declared on the xml declaration Returns null if none was declared
        Specified by:
        getVersion in interface XMLStreamReader
        Returns:
        the XML version or null

      • isStandalone

        public boolean isStandalone()
        Description copied from interface: XMLStreamReader
        Get the standalone declaration from the xml declaration
        Specified by:
        isStandalone in interface XMLStreamReader
        Returns:
        true if this is standalone, or false otherwise

      • standaloneSet

        public boolean standaloneSet()
        Description copied from interface: XMLStreamReader
        Checks if standalone was set in the document
        Specified by:
        standaloneSet in interface XMLStreamReader
        Returns:
        true if standalone was set in the document, or false otherwise

      • getCharacterEncodingScheme

        public String getCharacterEncodingScheme()
        Description copied from interface: XMLStreamReader
        Returns the character encoding declared on the xml declaration Returns null if none was declared
        Specified by:
        getCharacterEncodingScheme in interface XMLStreamReader
        Returns:
        the encoding declared in the document or null

      • getPITarget

        public String getPITarget()
        Description copied from interface: XMLStreamReader
        Get the target of a processing instruction
        Specified by:
        getPITarget in interface XMLStreamReader
        Returns:
        the target or null

      • getPIData

        public String getPIData()
        Description copied from interface: XMLStreamReader
        Get the data section of a processing instruction
        Specified by:
        getPIData in interface XMLStreamReader
        Returns:
        the data or null

      • getProperty

        public Object getProperty(String name)
        Description copied from interface: XMLStreamReader
        Get the value of a feature/property from the underlying implementation
        Specified by:
        getProperty in interface XMLStreamReader
        Parameters:
        name - The name of the property, may not be null
        Returns:
        The value of the property
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEventAllocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.util

Interface XMLEventAllocator

  • public interface XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader. An implementation is not required to use the XMLEventFactory implementation but this is recommended. The XMLEventAllocator can be set on an XMLInputFactory using the property "javax.xml.stream.allocator"
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLInputFactory, XMLEventFactory

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      XMLEvent allocate(XMLStreamReader reader)
      This method allocates an event given the current state of the XMLStreamReader.
      void allocate(XMLStreamReader reader, XMLEventConsumer consumer)
      This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in.
      XMLEventAllocator newInstance()
      This method creates an instance of the XMLEventAllocator.

    • Method Detail

      • newInstance

        XMLEventAllocator newInstance()
        This method creates an instance of the XMLEventAllocator. This allows the XMLInputFactory to allocate a new instance per reader.

      • allocate

        XMLEvent allocate(XMLStreamReader reader)
           throws XMLStreamException
        This method allocates an event given the current state of the XMLStreamReader. If this XMLEventAllocator does not have a one-to-one mapping between reader states and events this method will return null. This method must not modify the state of the XMLStreamReader.
        Parameters:
        reader - The XMLStreamReader to allocate from
        Returns:
        the event corresponding to the current reader state
        Throws:
        XMLStreamException

      • allocate

        void allocate(XMLStreamReader reader,
              XMLEventConsumer consumer)
       throws XMLStreamException
        This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in. This method can be used to expand or contract reader states into event states. This method may modify the state of the XMLStreamReader.
        Parameters:
        reader - The XMLStreamReader to allocate from
        consumer - The XMLEventConsumer to add to.
        Throws:
        XMLStreamException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEventConsumer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream.util

Interface XMLEventConsumer

  • All Known Subinterfaces:
    XMLEventWriter

    public interface XMLEventConsumer
    This interface defines an event consumer interface. The contract of the of a consumer is to accept the event. This interface can be used to mark an object as able to receive events. Add may be called several times in immediate succession so a consumer must be able to cache events it hasn't processed yet.
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void add(XMLEvent event)
      This method adds an event to the consumer.

    • Method Detail

      • add

        void add(XMLEvent event)
  throws XMLStreamException
        This method adds an event to the consumer. Calling this method invalidates the event parameter. The client application should discard all references to this event upon calling add. The behavior of an application that continues to use such references is undefined.
        Parameters:
        event - the event to add, may not be null
        Throws:
        XMLStreamException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEventFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Class XMLEventFactory

  • java.lang.Object
    • javax.xml.stream.XMLEventFactory

  • public abstract class XMLEventFactory
extends Object
    This interface defines a utility class for creating instances of XMLEvents
    Since:
    1.6
    Version:
    1.2
    See Also:
    StartElement, EndElement, ProcessingInstruction, Comment, Characters, StartDocument, EndDocument, DTD

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | XMLEventFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      abstract Attribute createAttribute(QName name, String value)
      Create a new Attribute
      abstract Attribute createAttribute(String localName, String value)
      Create a new Attribute
      abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)
      Create a new Attribute
      abstract Characters createCData(String content)
      Create a Characters event with the CData flag set to true
      abstract Characters createCharacters(String content)
      Create a Characters event, this method does not check if the content is all whitespace.
      abstract Comment createComment(String text)
      Create a comment
      abstract DTD createDTD(String dtd)
      Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification
      abstract EndDocument createEndDocument()
      Creates a new instance of an EndDocument event
      abstract EndElement createEndElement(QName name, Iterator namespaces)
      Create a new EndElement
      abstract EndElement createEndElement(String prefix, String namespaceUri, String localName)
      Create a new EndElement
      abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
      Create a new EndElement
      abstract EntityReference createEntityReference(String name, EntityDeclaration declaration)
      Creates a new instance of a EntityReference event
      abstract Characters createIgnorableSpace(String content)
      Create an ignorable space
      abstract Namespace createNamespace(String namespaceURI)
      Create a new default Namespace
      abstract Namespace createNamespace(String prefix, String namespaceUri)
      Create a new Namespace
      abstract ProcessingInstruction createProcessingInstruction(String target, String data)
      Create a processing instruction
      abstract Characters createSpace(String content)
      Create a Characters event with the isSpace flag set to true
      abstract StartDocument createStartDocument()
      Creates a new instance of a StartDocument event
      abstract StartDocument createStartDocument(String encoding)
      Creates a new instance of a StartDocument event
      abstract StartDocument createStartDocument(String encoding, String version)
      Creates a new instance of a StartDocument event
      abstract StartDocument createStartDocument(String encoding, String version, boolean standalone)
      Creates a new instance of a StartDocument event
      abstract StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces)
      Create a new StartElement.
      abstract StartElement createStartElement(String prefix, String namespaceUri, String localName)
      Create a new StartElement.
      abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
      Create a new StartElement.
      abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
      Create a new StartElement.
      static XMLEventFactory newFactory()
      Create a new instance of the factory.
      static XMLEventFactory newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLEventFactory newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
      static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
      abstract void setLocation(Location location)
      This method allows setting of the Location on each event that is created by this factory.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XMLEventFactory

        protected XMLEventFactory()

    • Method Detail

      • newInstance

        public static XMLEventFactory newInstance()
                                   throws FactoryConfigurationError
        Creates a new instance of the factory in exactly the same manner as the newFactory() method.
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLEventFactory newFactory()
                                  throws FactoryConfigurationError
        Create a new instance of the factory.

        This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the XMLEventFactory implementation class to load:

        • Use the javax.xml.stream.XMLEventFactory system property.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
        • Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, the system-default implementation is returned.

        Once an application has obtained a reference to a XMLEventFactory it can use the factory to configure and obtain stream instances.

        Note that this is a new method that replaces the deprecated newInstance() method. No changes in behavior are defined by this replacement method relative to the deprecated method.

        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static XMLEventFactory newInstance(String factoryId,
                                          ClassLoader classLoader)
                                   throws FactoryConfigurationError
        Deprecated. This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
        Create a new instance of the factory
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLEventFactory newFactory(String factoryId,
                                         ClassLoader classLoader)
                                  throws FactoryConfigurationError
        Create a new instance of the factory. If the classLoader argument is null, then the ContextClassLoader is used.

        This method uses the following ordered lookup procedure to determine the XMLEventFactory implementation class to load:

        • Use the value of the system property identified by factoryId.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the given factoryId.
        • If factoryId is "javax.xml.stream.XMLEventFactory", use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the specified ClassLoader. If classLoader is null, the default loading mechanism will apply: That is, the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, throws a FactoryConfigurationError.

        Note that this is a new method that replaces the deprecated newInstance(String factoryId, ClassLoader classLoader) method. No changes in behavior are defined by this replacement method relative to the deprecated method.

        API Note:
        The parameter factoryId defined here is inconsistent with that of other JAXP factories where the first parameter is fully qualified factory class name that provides implementation of the factory.
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • setLocation

        public abstract void setLocation(Location location)
        This method allows setting of the Location on each event that is created by this factory. The values are copied by value into the events created by this factory. To reset the location information set the location to null.
        Parameters:
        location - the location to set on each event created

      • createAttribute

        public abstract Attribute createAttribute(String prefix,
                                          String namespaceURI,
                                          String localName,
                                          String value)
        Create a new Attribute
        Parameters:
        prefix - the prefix of this attribute, may not be null
        namespaceURI - the attribute value is set to this value, may not be null
        localName - the local name of the XML name of the attribute, localName cannot be null
        value - the attribute value to set, may not be null
        Returns:
        the Attribute with specified values

      • createAttribute

        public abstract Attribute createAttribute(String localName,
                                          String value)
        Create a new Attribute
        Parameters:
        localName - the local name of the XML name of the attribute, localName cannot be null
        value - the attribute value to set, may not be null
        Returns:
        the Attribute with specified values

      • createAttribute

        public abstract Attribute createAttribute(QName name,
                                          String value)
        Create a new Attribute
        Parameters:
        name - the qualified name of the attribute, may not be null
        value - the attribute value to set, may not be null
        Returns:
        the Attribute with specified values

      • createNamespace

        public abstract Namespace createNamespace(String namespaceURI)
        Create a new default Namespace
        Parameters:
        namespaceURI - the default namespace uri
        Returns:
        the Namespace with the specified value

      • createNamespace

        public abstract Namespace createNamespace(String prefix,
                                          String namespaceUri)
        Create a new Namespace
        Parameters:
        prefix - the prefix of this namespace, may not be null
        namespaceUri - the attribute value is set to this value, may not be null
        Returns:
        the Namespace with the specified values

      • createStartElement

        public abstract StartElement createStartElement(QName name,
                                                Iterator attributes,
                                                Iterator namespaces)
        Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.
        Parameters:
        name - the qualified name of the attribute, may not be null
        attributes - an optional unordered set of objects that implement Attribute to add to the new StartElement, may be null
        namespaces - an optional unordered set of objects that implement Namespace to add to the new StartElement, may be null
        Returns:
        an instance of the requested StartElement

      • createStartElement

        public abstract StartElement createStartElement(String prefix,
                                                String namespaceUri,
                                                String localName)
        Create a new StartElement. This defaults the NamespaceContext to an empty NamespaceContext. Querying this event for its namespaces or attributes will result in an empty iterator being returned.
        Parameters:
        namespaceUri - the uri of the QName of the new StartElement
        localName - the local name of the QName of the new StartElement
        prefix - the prefix of the QName of the new StartElement
        Returns:
        an instance of the requested StartElement

      • createStartElement

        public abstract StartElement createStartElement(String prefix,
                                                String namespaceUri,
                                                String localName,
                                                Iterator attributes,
                                                Iterator namespaces)
        Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.
        Parameters:
        namespaceUri - the uri of the QName of the new StartElement
        localName - the local name of the QName of the new StartElement
        prefix - the prefix of the QName of the new StartElement
        attributes - an unordered set of objects that implement Attribute to add to the new StartElement
        namespaces - an unordered set of objects that implement Namespace to add to the new StartElement
        Returns:
        an instance of the requested StartElement

      • createStartElement

        public abstract StartElement createStartElement(String prefix,
                                                String namespaceUri,
                                                String localName,
                                                Iterator attributes,
                                                Iterator namespaces,
                                                NamespaceContext context)
        Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.
        Parameters:
        namespaceUri - the uri of the QName of the new StartElement
        localName - the local name of the QName of the new StartElement
        prefix - the prefix of the QName of the new StartElement
        attributes - an unordered set of objects that implement Attribute to add to the new StartElement, may be null
        namespaces - an unordered set of objects that implement Namespace to add to the new StartElement, may be null
        context - the namespace context of this element
        Returns:
        an instance of the requested StartElement

      • createEndElement

        public abstract EndElement createEndElement(QName name,
                                            Iterator namespaces)
        Create a new EndElement
        Parameters:
        name - the qualified name of the EndElement
        namespaces - an optional unordered set of objects that implement Namespace that have gone out of scope, may be null
        Returns:
        an instance of the requested EndElement

      • createEndElement

        public abstract EndElement createEndElement(String prefix,
                                            String namespaceUri,
                                            String localName)
        Create a new EndElement
        Parameters:
        namespaceUri - the uri of the QName of the new StartElement
        localName - the local name of the QName of the new StartElement
        prefix - the prefix of the QName of the new StartElement
        Returns:
        an instance of the requested EndElement

      • createEndElement

        public abstract EndElement createEndElement(String prefix,
                                            String namespaceUri,
                                            String localName,
                                            Iterator namespaces)
        Create a new EndElement
        Parameters:
        namespaceUri - the uri of the QName of the new StartElement
        localName - the local name of the QName of the new StartElement
        prefix - the prefix of the QName of the new StartElement
        namespaces - an unordered set of objects that implement Namespace that have gone out of scope, may be null
        Returns:
        an instance of the requested EndElement

      • createCharacters

        public abstract Characters createCharacters(String content)
        Create a Characters event, this method does not check if the content is all whitespace. To create a space event use #createSpace(String)
        Parameters:
        content - the string to create
        Returns:
        a Characters event

      • createCData

        public abstract Characters createCData(String content)
        Create a Characters event with the CData flag set to true
        Parameters:
        content - the string to create
        Returns:
        a Characters event

      • createSpace

        public abstract Characters createSpace(String content)
        Create a Characters event with the isSpace flag set to true
        Parameters:
        content - the content of the space to create
        Returns:
        a Characters event

      • createIgnorableSpace

        public abstract Characters createIgnorableSpace(String content)
        Create an ignorable space
        Parameters:
        content - the space to create
        Returns:
        a Characters event

      • createStartDocument

        public abstract StartDocument createStartDocument()
        Creates a new instance of a StartDocument event
        Returns:
        a StartDocument event

      • createStartDocument

        public abstract StartDocument createStartDocument(String encoding,
                                                  String version,
                                                  boolean standalone)
        Creates a new instance of a StartDocument event
        Parameters:
        encoding - the encoding style
        version - the XML version
        standalone - the status of standalone may be set to "true" or "false"
        Returns:
        a StartDocument event

      • createStartDocument

        public abstract StartDocument createStartDocument(String encoding,
                                                  String version)
        Creates a new instance of a StartDocument event
        Parameters:
        encoding - the encoding style
        version - the XML version
        Returns:
        a StartDocument event

      • createStartDocument

        public abstract StartDocument createStartDocument(String encoding)
        Creates a new instance of a StartDocument event
        Parameters:
        encoding - the encoding style
        Returns:
        a StartDocument event

      • createEndDocument

        public abstract EndDocument createEndDocument()
        Creates a new instance of an EndDocument event
        Returns:
        an EndDocument event

      • createEntityReference

        public abstract EntityReference createEntityReference(String name,
                                                      EntityDeclaration declaration)
        Creates a new instance of a EntityReference event
        Parameters:
        name - The name of the reference
        declaration - the declaration for the event
        Returns:
        an EntityReference event

      • createComment

        public abstract Comment createComment(String text)
        Create a comment
        Parameters:
        text - The text of the comment a Comment event

      • createProcessingInstruction

        public abstract ProcessingInstruction createProcessingInstruction(String target,
                                                                  String data)
        Create a processing instruction
        Parameters:
        target - The target of the processing instruction
        data - The text of the processing instruction
        Returns:
        a ProcessingInstruction event

      • createDTD

        public abstract DTD createDTD(String dtd)
        Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification
        Parameters:
        dtd - the text of the document type definition
        Returns:
        a DTD event
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEventReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLEventReader

  • All Superinterfaces:
    Iterator
    All Known Implementing Classes:
    EventReaderDelegate

    public interface XMLEventReader
extends Iterator
    This is the top level interface for parsing XML Events. It provides the ability to peek at the next event and returns configuration information through the property interface.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLInputFactory, XMLEventWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void close()
      Frees any resources associated with this Reader.
      String getElementText()
      Reads the content of a text-only element.
      Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      boolean hasNext()
      Check if there are more events.
      XMLEvent nextEvent()
      Get the next XMLEvent
      XMLEvent nextTag()
      Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
      XMLEvent peek()
      Check the next XMLEvent without reading it from the stream.

      • Methods inherited from interface java.util.Iterator

        forEachRemaining, next, remove

    • Method Detail

      • nextEvent

        XMLEvent nextEvent()
            throws XMLStreamException
        Get the next XMLEvent
        Throws:
        XMLStreamException - if there is an error with the underlying XML.
        NoSuchElementException - iteration has no more elements.
        See Also:
        XMLEvent

      • hasNext

        boolean hasNext()
        Check if there are more events. Returns true if there are more events and false otherwise.
        Specified by:
        hasNext in interface Iterator
        Returns:
        true if the event reader has more events, false otherwise

      • peek

        XMLEvent peek()
       throws XMLStreamException
        Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().
        Throws:
        XMLStreamException
        See Also:
        XMLEvent

      • getElementText

        String getElementText()
               throws XMLStreamException
        Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.
        Throws:
        XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

      • nextTag

        XMLEvent nextTag()
          throws XMLStreamException
        Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.
        Throws:
        XMLStreamException - if anything other than space characters are encountered

      • getProperty

        Object getProperty(String name)
            throws IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Parameters:
        name - The name of the property
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • close

        void close()
    throws XMLStreamException
        Frees any resources associated with this Reader. This method does not close the underlying input source.
        Throws:
        XMLStreamException - if there are errors freeing associated resources
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLEventWriter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLEventWriter

  • All Superinterfaces:
    XMLEventConsumer

    public interface XMLEventWriter
extends XMLEventConsumer
    This is the top level interface for writing XML documents. Instances of this interface are not required to validate the form of the XML.
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLEventReader, XMLEvent, Characters, ProcessingInstruction, StartElement, EndElement

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void add(XMLEvent event)
      Add an event to the output stream Adding a START_ELEMENT will open a new namespace scope that will be closed when the corresponding END_ELEMENT is written.
      void add(XMLEventReader reader)
      Adds an entire stream to an output stream, calls next() on the inputStream argument until hasNext() returns false This should be treated as a convenience method that will perform the following loop over all the events in an event reader and call add on each event.
      void close()
      Frees any resources associated with this stream
      void flush()
      Writes any cached events to the underlying output mechanism
      NamespaceContext getNamespaceContext()
      Returns the current namespace context.
      String getPrefix(String uri)
      Gets the prefix the uri is bound to
      void setDefaultNamespace(String uri)
      Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.
      void setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.
      void setPrefix(String prefix, String uri)
      Sets the prefix the uri is bound to.

    • Method Detail

      • flush

        void flush()
    throws XMLStreamException
        Writes any cached events to the underlying output mechanism
        Throws:
        XMLStreamException

      • close

        void close()
    throws XMLStreamException
        Frees any resources associated with this stream
        Throws:
        XMLStreamException

      • add

        void add(XMLEvent event)
  throws XMLStreamException
        Add an event to the output stream Adding a START_ELEMENT will open a new namespace scope that will be closed when the corresponding END_ELEMENT is written.
        Required and optional fields for events added to the writer
        Event Type | Required Fields | Optional Fields | Required Behavior
        START_ELEMENT | QName name | namespaces , attributes | A START_ELEMENT will be written by writing the name, namespaces, and attributes of the event in XML 1.0 valid syntax for START_ELEMENTs. The name is written by looking up the prefix for the namespace uri. The writer can be configured to respect prefixes of QNames. If the writer is respecting prefixes it must use the prefix set on the QName. The default behavior is to lookup the value for the prefix on the EventWriter's internal namespace context. Each attribute (if any) is written using the behavior specified in the attribute section of this table. Each namespace (if any) is written using the behavior specified in the namespace section of this table.
        END_ELEMENT | Qname name | None | A well formed END_ELEMENT tag is written. The name is written by looking up the prefix for the namespace uri. The writer can be configured to respect prefixes of QNames. If the writer is respecting prefixes it must use the prefix set on the QName. The default behavior is to lookup the value for the prefix on the EventWriter's internal namespace context. If the END_ELEMENT name does not match the START_ELEMENT name an XMLStreamException is thrown.
        ATTRIBUTE | QName name , String value | QName type | An attribute is written using the same algorithm to find the lexical form as used in START_ELEMENT. The default is to use double quotes to wrap attribute values and to escape any double quotes found in the value. The type value is ignored.
        NAMESPACE | String prefix, String namespaceURI, boolean isDefaultNamespaceDeclaration | None | A namespace declaration is written. If the namespace is a default namespace declaration (isDefault is true) then xmlns="$namespaceURI" is written and the prefix is optional. If isDefault is false, the prefix must be declared and the writer must prepend xmlns to the prefix and write out a standard prefix declaration.
        PROCESSING_INSTRUCTION | None | String target, String data | The data does not need to be present and may be null. Target is required and many not be null. The writer will write data section directly after the target, enclosed in appropriate XML 1.0 syntax
        COMMENT | None | String comment | If the comment is present (not null) it is written, otherwise an an empty comment is written
        START_DOCUMENT | None | String encoding , boolean standalone, String version | A START_DOCUMENT event is not required to be written to the stream. If present the attributes are written inside the appropriate XML declaration syntax
        END_DOCUMENT | None | None | Nothing is written to the output
        DTD | String DocumentTypeDefinition | None | The DocumentTypeDefinition is written to the output
        Specified by:
        add in interface XMLEventConsumer
        Parameters:
        event - the event to be added
        Throws:
        XMLStreamException

      • add

        void add(XMLEventReader reader)
  throws XMLStreamException
        Adds an entire stream to an output stream, calls next() on the inputStream argument until hasNext() returns false This should be treated as a convenience method that will perform the following loop over all the events in an event reader and call add on each event.
        Parameters:
        reader - the event stream to add to the output
        Throws:
        XMLStreamException

      • getPrefix

        String getPrefix(String uri)
          throws XMLStreamException
        Gets the prefix the uri is bound to
        Parameters:
        uri - the uri to look up
        Throws:
        XMLStreamException

      • setPrefix

        void setPrefix(String prefix,
               String uri)
        throws XMLStreamException
        Sets the prefix the uri is bound to. This prefix is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the prefix is bound in the root scope.
        Parameters:
        prefix - the prefix to bind to the uri
        uri - the uri to bind to the prefix
        Throws:
        XMLStreamException

      • setDefaultNamespace

        void setDefaultNamespace(String uri)
                  throws XMLStreamException
        Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the uri is bound in the root scope.
        Parameters:
        uri - the uri to bind to the default namespace
        Throws:
        XMLStreamException

      • setNamespaceContext

        void setNamespaceContext(NamespaceContext context)
                  throws XMLStreamException
        Sets the current namespace context for prefix and uri bindings. This context becomes the root namespace context for writing and will replace the current root namespace context. Subsequent calls to setPrefix and setDefaultNamespace will bind namespaces using the context passed to the method as the root context for resolving namespaces.
        Parameters:
        context - the namespace context to use for this writer
        Throws:
        XMLStreamException

      • getNamespaceContext

        NamespaceContext getNamespaceContext()
        Returns the current namespace context.
        Returns:
        the current namespace context
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLInputFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Class XMLInputFactory

  • java.lang.Object
    • javax.xml.stream.XMLInputFactory

  • public abstract class XMLInputFactory
extends Object
    Defines an abstract implementation of a factory for getting streams. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
    Configuration parameters
    Property Name | Behavior | Return type | Default Value | Required
    javax.xml.stream.isValidating | Turns on/off implementation specific DTD validation | Boolean | False | No
    javax.xml.stream.isNamespaceAware | Turns on/off namespace processing for XML 1.0 support | Boolean | True | True (required) / False (optional)
    javax.xml.stream.isCoalescing | Requires the processor to coalesce adjacent character data | Boolean | False | Yes
    javax.xml.stream.isReplacingEntityReferences | replace internal entity references with their replacement text and report them as characters | Boolean | True | Yes
    javax.xml.stream.isSupportingExternalEntities | Resolve external parsed entities | Boolean | Unspecified | Yes
    javax.xml.stream.supportDTD | Use this property to request processors that do not support DTDs | Boolean | True | Yes
    javax.xml.stream.reporter | sets/gets the impl of the XMLReporter | javax.xml.stream.XMLReporter | Null | Yes
    javax.xml.stream.resolver | sets/gets the impl of the XMLResolver interface | javax.xml.stream.XMLResolver | Null | Yes
    javax.xml.stream.allocator | sets/gets the impl of the XMLEventAllocator interface | javax.xml.stream.util.XMLEventAllocator | Null | Yes
    Since:
    1.6
    Version:
    1.2
    See Also:
    XMLOutputFactory, XMLEventReader, XMLStreamReader, EventFilter, XMLReporter, XMLResolver, XMLEventAllocator

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ALLOCATOR
      The property used to set/get the implementation of the allocator
      static String IS_COALESCING
      The property that requires the parser to coalesce adjacent character data sections
      static String IS_NAMESPACE_AWARE
      The property used to turn on/off namespace support, this is to support XML 1.0 documents, only the true setting must be supported
      static String IS_REPLACING_ENTITY_REFERENCES
      Requires the parser to replace internal entity references with their replacement text and report them as characters
      static String IS_SUPPORTING_EXTERNAL_ENTITIES
      The property that requires the parser to resolve external parsed entities
      static String IS_VALIDATING
      The property used to turn on/off implementation specific validation
      static String REPORTER
      The property used to set/get the implementation of the XMLReporter interface
      static String RESOLVER
      The property used to set/get the implementation of the XMLResolver
      static String SUPPORT_DTD
      The property that requires the parser to support DTDs

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | XMLInputFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader
      abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
      abstract XMLEventReader createXMLEventReader(InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader createXMLEventReader(InputStream stream, String encoding)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader createXMLEventReader(Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader createXMLEventReader(Source source)
      Create a new XMLEventReader from a JAXP source.
      abstract XMLEventReader createXMLEventReader(String systemId, InputStream stream)
      Create a new XMLEventReader from a java.io.InputStream
      abstract XMLEventReader createXMLEventReader(String systemId, Reader reader)
      Create a new XMLEventReader from a reader
      abstract XMLEventReader createXMLEventReader(XMLStreamReader reader)
      Create a new XMLEventReader from an XMLStreamReader.
      abstract XMLStreamReader createXMLStreamReader(InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader createXMLStreamReader(InputStream stream, String encoding)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader createXMLStreamReader(Reader reader)
      Create a new XMLStreamReader from a reader
      abstract XMLStreamReader createXMLStreamReader(Source source)
      Create a new XMLStreamReader from a JAXP source.
      abstract XMLStreamReader createXMLStreamReader(String systemId, InputStream stream)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLStreamReader createXMLStreamReader(String systemId, Reader reader)
      Create a new XMLStreamReader from a java.io.InputStream
      abstract XMLEventAllocator getEventAllocator()
      Gets the allocator used by streams created with this factory
      abstract Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      abstract XMLReporter getXMLReporter()
      The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      abstract XMLResolver getXMLResolver()
      The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      abstract boolean isPropertySupported(String name)
      Query the set of properties that this factory supports.
      static XMLInputFactory newFactory()
      Create a new instance of the factory.
      static XMLInputFactory newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLInputFactory newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
      static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
      abstract void setEventAllocator(XMLEventAllocator allocator)
      Set a user defined event allocator for events
      abstract void setProperty(String name, Object value)
      Allows the user to set specific feature/property on the underlying implementation.
      abstract void setXMLReporter(XMLReporter reporter)
      The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
      abstract void setXMLResolver(XMLResolver resolver)
      The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • IS_NAMESPACE_AWARE

        public static final String IS_NAMESPACE_AWARE
        The property used to turn on/off namespace support, this is to support XML 1.0 documents, only the true setting must be supported
        See Also:
        Constant Field Values

      • IS_VALIDATING

        public static final String IS_VALIDATING
        The property used to turn on/off implementation specific validation
        See Also:
        Constant Field Values

      • IS_COALESCING

        public static final String IS_COALESCING
        The property that requires the parser to coalesce adjacent character data sections
        See Also:
        Constant Field Values

      • IS_REPLACING_ENTITY_REFERENCES

        public static final String IS_REPLACING_ENTITY_REFERENCES
        Requires the parser to replace internal entity references with their replacement text and report them as characters
        See Also:
        Constant Field Values

      • IS_SUPPORTING_EXTERNAL_ENTITIES

        public static final String IS_SUPPORTING_EXTERNAL_ENTITIES
        The property that requires the parser to resolve external parsed entities
        See Also:
        Constant Field Values

      • SUPPORT_DTD

        public static final String SUPPORT_DTD
        The property that requires the parser to support DTDs
        See Also:
        Constant Field Values

      • REPORTER

        public static final String REPORTER
        The property used to set/get the implementation of the XMLReporter interface
        See Also:
        Constant Field Values

      • RESOLVER

        public static final String RESOLVER
        The property used to set/get the implementation of the XMLResolver
        See Also:
        Constant Field Values

      • ALLOCATOR

        public static final String ALLOCATOR
        The property used to set/get the implementation of the allocator
        See Also:
        Constant Field Values

    • Constructor Detail

      • XMLInputFactory

        protected XMLInputFactory()

    • Method Detail

      • newInstance

        public static XMLInputFactory newInstance()
                                   throws FactoryConfigurationError
        Creates a new instance of the factory in exactly the same manner as the newFactory() method.
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLInputFactory newFactory()
                                  throws FactoryConfigurationError
        Create a new instance of the factory.

        This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the XMLInputFactory implementation class to load:

        • Use the javax.xml.stream.XMLInputFactory system property.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
        • Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, the system-default implementation is returned.

        Once an application has obtained a reference to a XMLInputFactory it can use the factory to configure and obtain stream instances.

        Note that this is a new method that replaces the deprecated newInstance() method. No changes in behavior are defined by this replacement method relative to the deprecated method.

        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static XMLInputFactory newInstance(String factoryId,
                                          ClassLoader classLoader)
                                   throws FactoryConfigurationError
        Deprecated. This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader) method defines no changes in behavior.
        Create a new instance of the factory
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLInputFactory newFactory(String factoryId,
                                         ClassLoader classLoader)
                                  throws FactoryConfigurationError
        Create a new instance of the factory. If the classLoader argument is null, then the ContextClassLoader is used.

        This method uses the following ordered lookup procedure to determine the XMLInputFactory implementation class to load:

        • Use the value of the system property identified by factoryId.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the given factoryId.
        • If factoryId is "javax.xml.stream.XMLInputFactory", use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the specified ClassLoader. If classLoader is null, the default loading mechanism will apply: That is, the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, throws a FactoryConfigurationError.

        Note that this is a new method that replaces the deprecated newInstance(String factoryId, ClassLoader classLoader) method. No changes in behavior are defined by this replacement method relative to the deprecated method.

        API Note:
        The parameter factoryId defined here is inconsistent with that of other JAXP factories where the first parameter is fully qualified factory class name that provides implementation of the factory.
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(Reader reader)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a reader
        Parameters:
        reader - the XML data to read from
        Throws:
        XMLStreamException

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(Source source)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a JAXP source. This method is optional.
        Parameters:
        source - the source to read from
        Throws:
        UnsupportedOperationException - if this method is not supported by this XMLInputFactory
        XMLStreamException

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(InputStream stream)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a java.io.InputStream
        Parameters:
        stream - the InputStream to read from
        Throws:
        XMLStreamException

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(InputStream stream,
                                                      String encoding)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a java.io.InputStream
        Parameters:
        stream - the InputStream to read from
        encoding - the character encoding of the stream
        Throws:
        XMLStreamException

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(String systemId,
                                                      InputStream stream)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a java.io.InputStream
        Parameters:
        systemId - the system ID of the stream
        stream - the InputStream to read from
        Throws:
        XMLStreamException

      • createXMLStreamReader

        public abstract XMLStreamReader createXMLStreamReader(String systemId,
                                                      Reader reader)
                                               throws XMLStreamException
        Create a new XMLStreamReader from a java.io.InputStream
        Parameters:
        systemId - the system ID of the stream
        reader - the InputStream to read from
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(Reader reader)
                                             throws XMLStreamException
        Create a new XMLEventReader from a reader
        Parameters:
        reader - the XML data to read from
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(String systemId,
                                                    Reader reader)
                                             throws XMLStreamException
        Create a new XMLEventReader from a reader
        Parameters:
        systemId - the system ID of the input
        reader - the XML data to read from
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader)
                                             throws XMLStreamException
        Create a new XMLEventReader from an XMLStreamReader. After being used to construct the XMLEventReader instance returned from this method the XMLStreamReader must not be used.
        Parameters:
        reader - the XMLStreamReader to read from (may not be modified)
        Returns:
        a new XMLEventReader
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(Source source)
                                             throws XMLStreamException
        Create a new XMLEventReader from a JAXP source. Support of this method is optional.
        Parameters:
        source - the source to read from
        Throws:
        UnsupportedOperationException - if this method is not supported by this XMLInputFactory
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(InputStream stream)
                                             throws XMLStreamException
        Create a new XMLEventReader from a java.io.InputStream
        Parameters:
        stream - the InputStream to read from
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(InputStream stream,
                                                    String encoding)
                                             throws XMLStreamException
        Create a new XMLEventReader from a java.io.InputStream
        Parameters:
        stream - the InputStream to read from
        encoding - the character encoding of the stream
        Throws:
        XMLStreamException

      • createXMLEventReader

        public abstract XMLEventReader createXMLEventReader(String systemId,
                                                    InputStream stream)
                                             throws XMLStreamException
        Create a new XMLEventReader from a java.io.InputStream
        Parameters:
        systemId - the system ID of the stream
        stream - the InputStream to read from
        Throws:
        XMLStreamException

      • createFilteredReader

        public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader,
                                                     StreamFilter filter)
                                              throws XMLStreamException
        Create a filtered reader that wraps the filter around the reader
        Parameters:
        reader - the reader to filter
        filter - the filter to apply to the reader
        Throws:
        XMLStreamException

      • createFilteredReader

        public abstract XMLEventReader createFilteredReader(XMLEventReader reader,
                                                    EventFilter filter)
                                             throws XMLStreamException
        Create a filtered event reader that wraps the filter around the event reader
        Parameters:
        reader - the event reader to wrap
        filter - the filter to apply to the event reader
        Throws:
        XMLStreamException

      • getXMLResolver

        public abstract XMLResolver getXMLResolver()
        The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

      • setXMLResolver

        public abstract void setXMLResolver(XMLResolver resolver)
        The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
        Parameters:
        resolver - the resolver to use to resolve references

      • getXMLReporter

        public abstract XMLReporter getXMLReporter()
        The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

      • setXMLReporter

        public abstract void setXMLReporter(XMLReporter reporter)
        The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
        Parameters:
        reporter - the resolver to use to report non fatal errors

      • setProperty

        public abstract void setProperty(String name,
                                 Object value)
                          throws IllegalArgumentException
        Allows the user to set specific feature/property on the underlying implementation. The underlying implementation is not required to support every setting of every property in the specification and may use IllegalArgumentException to signal that an unsupported property may not be set with the specified value.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD property.

        • Access to external DTDs, external Entity References is restricted to the protocols specified by the property. If access is denied during parsing due to the restriction of this property, XMLStreamException will be thrown by the XMLStreamReader.next() or XMLEventReader.nextEvent() method.

        Parameters:
        name - The name of the property (may not be null)
        value - The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • getProperty

        public abstract Object getProperty(String name)
                            throws IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • isPropertySupported

        public abstract boolean isPropertySupported(String name)
        Query the set of properties that this factory supports.
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        true if the property is supported and false otherwise

      • setEventAllocator

        public abstract void setEventAllocator(XMLEventAllocator allocator)
        Set a user defined event allocator for events
        Parameters:
        allocator - the user defined allocator

      • getEventAllocator

        public abstract XMLEventAllocator getEventAllocator()
        Gets the allocator used by streams created with this factory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLOutputFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Class XMLOutputFactory

  • java.lang.Object
    • javax.xml.stream.XMLOutputFactory

  • public abstract class XMLOutputFactory
extends Object
    Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
    Configuration parameters
    Property Name | Behavior | Return type | Default Value | Required
    javax.xml.stream.isRepairingNamespaces | defaults prefixes on the output side | Boolean | False | Yes

    The following paragraphs describe the namespace and prefix repair algorithm:

    The property can be set with the following code line: setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));

    This property specifies that the writer default namespace prefix declarations. The default value is false.

    If a writer isRepairingNamespaces it will create a namespace declaration on the current StartElement for any attribute that does not currently have a namespace declaration in scope. If the StartElement has a uri but no prefix specified a prefix will be assigned, if the prefix has not been declared in a parent of the current StartElement it will be declared on the current StartElement. If the defaultNamespace is bound and in scope and the default namespace matches the URI of the attribute or StartElement QName no prefix will be assigned.

    If an element or attribute name has a prefix, but is not bound to any namespace URI, then the prefix will be removed during serialization.

    If element and/or attribute names in the same start or empty-element tag are bound to different namespace URIs and are using the same prefix then the element or the first occurring attribute retains the original prefix and the following attributes have their prefixes replaced with a new prefix that is bound to the namespace URIs of those attributes.

    If an element or attribute name uses a prefix that is bound to a different URI than that inherited from the namespace context of the parent of that element and there is no namespace declaration in the context of the current element then such a namespace declaration is added.

    If an element or attribute name is bound to a prefix and there is a namespace declaration that binds that prefix to a different URI then that namespace declaration is either removed if the correct mapping is inherited from the parent context of that element, or changed to the namespace URI of the element or attribute using that prefix.

    Since:
    1.6
    Version:
    1.2
    See Also:
    XMLInputFactory, XMLEventWriter, XMLStreamWriter

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String IS_REPAIRING_NAMESPACES
      Property used to set prefix defaulting on the output side

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | XMLOutputFactory()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      abstract XMLEventWriter createXMLEventWriter(OutputStream stream)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter createXMLEventWriter(OutputStream stream, String encoding)
      Create a new XMLEventWriter that writes to a stream
      abstract XMLEventWriter createXMLEventWriter(Result result)
      Create a new XMLEventWriter that writes to a JAXP result.
      abstract XMLEventWriter createXMLEventWriter(Writer stream)
      Create a new XMLEventWriter that writes to a writer
      abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream, String encoding)
      Create a new XMLStreamWriter that writes to a stream
      abstract XMLStreamWriter createXMLStreamWriter(Result result)
      Create a new XMLStreamWriter that writes to a JAXP result.
      abstract XMLStreamWriter createXMLStreamWriter(Writer stream)
      Create a new XMLStreamWriter that writes to a writer
      abstract Object getProperty(String name)
      Get a feature/property on the underlying implementation
      abstract boolean isPropertySupported(String name)
      Query the set of properties that this factory supports.
      static XMLOutputFactory newFactory()
      Create a new instance of the factory.
      static XMLOutputFactory newFactory(String factoryId, ClassLoader classLoader)
      Create a new instance of the factory.
      static XMLOutputFactory newInstance()
      Creates a new instance of the factory in exactly the same manner as the newFactory() method.
      static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader)
      Deprecated.
      This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new method newFactory(java.lang.String, java.lang.ClassLoader) instead.
      abstract void setProperty(String name, Object value)
      Allows the user to set specific features/properties on the underlying implementation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • IS_REPAIRING_NAMESPACES

        public static final String IS_REPAIRING_NAMESPACES
        Property used to set prefix defaulting on the output side
        See Also:
        Constant Field Values

    • Constructor Detail

      • XMLOutputFactory

        protected XMLOutputFactory()

    • Method Detail

      • newInstance

        public static XMLOutputFactory newInstance()
                                    throws FactoryConfigurationError
        Creates a new instance of the factory in exactly the same manner as the newFactory() method.
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLOutputFactory newFactory()
                                   throws FactoryConfigurationError
        Create a new instance of the factory.

        This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the XMLOutputFactory implementation class to load:

        • Use the javax.xml.stream.XMLOutputFactory system property.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
        • Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, the system-default implementation is returned.

          • Once an application has obtained a reference to a XMLOutputFactory it can use the factory to configure and obtain stream instances.

          Note that this is a new method that replaces the deprecated newInstance() method. No changes in behavior are defined by this replacement method relative to the deprecated method.

        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static XMLInputFactory newInstance(String factoryId,
                                          ClassLoader classLoader)
                                   throws FactoryConfigurationError
        Deprecated. This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new method newFactory(java.lang.String, java.lang.ClassLoader) instead.
        Create a new instance of the factory.
        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - if an instance of this factory cannot be loaded

      • newFactory

        public static XMLOutputFactory newFactory(String factoryId,
                                          ClassLoader classLoader)
                                   throws FactoryConfigurationError
        Create a new instance of the factory. If the classLoader argument is null, then the ContextClassLoader is used.

        This method uses the following ordered lookup procedure to determine the XMLOutputFactory implementation class to load:

        • Use the value of the system property identified by factoryId.
        • Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the given factoryId.
        • If factoryId is "javax.xml.stream.XMLOutputFactory", use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the specified ClassLoader. If classLoader is null, the default loading mechanism will apply: That is, the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, throws a FactoryConfigurationError.
        API Note:
        The parameter factoryId defined here is inconsistent with that of other JAXP factories where the first parameter is fully qualified factory class name that provides implementation of the factory.

        Note that this is a new method that replaces the deprecated newInstance(String factoryId, ClassLoader classLoader) method. The original method was incorrectly defined to return XMLInputFactory.

        Parameters:
        factoryId - Name of the factory to find, same as a property name
        classLoader - classLoader to use
        Returns:
        the factory implementation
        Throws:
        FactoryConfigurationError - in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • createXMLStreamWriter

        public abstract XMLStreamWriter createXMLStreamWriter(Writer stream)
                                               throws XMLStreamException
        Create a new XMLStreamWriter that writes to a writer
        Parameters:
        stream - the writer to write to
        Throws:
        XMLStreamException

      • createXMLStreamWriter

        public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream)
                                               throws XMLStreamException
        Create a new XMLStreamWriter that writes to a stream
        Parameters:
        stream - the stream to write to
        Throws:
        XMLStreamException

      • createXMLStreamWriter

        public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream,
                                                      String encoding)
                                               throws XMLStreamException
        Create a new XMLStreamWriter that writes to a stream
        Parameters:
        stream - the stream to write to
        encoding - the encoding to use
        Throws:
        XMLStreamException

      • createXMLStreamWriter

        public abstract XMLStreamWriter createXMLStreamWriter(Result result)
                                               throws XMLStreamException
        Create a new XMLStreamWriter that writes to a JAXP result. This method is optional.
        Parameters:
        result - the result to write to
        Throws:
        UnsupportedOperationException - if this method is not supported by this XMLOutputFactory
        XMLStreamException

      • createXMLEventWriter

        public abstract XMLEventWriter createXMLEventWriter(Result result)
                                             throws XMLStreamException
        Create a new XMLEventWriter that writes to a JAXP result. This method is optional.
        Parameters:
        result - the result to write to
        Throws:
        UnsupportedOperationException - if this method is not supported by this XMLOutputFactory
        XMLStreamException

      • createXMLEventWriter

        public abstract XMLEventWriter createXMLEventWriter(OutputStream stream)
                                             throws XMLStreamException
        Create a new XMLEventWriter that writes to a stream
        Parameters:
        stream - the stream to write to
        Throws:
        XMLStreamException

      • createXMLEventWriter

        public abstract XMLEventWriter createXMLEventWriter(OutputStream stream,
                                                    String encoding)
                                             throws XMLStreamException
        Create a new XMLEventWriter that writes to a stream
        Parameters:
        stream - the stream to write to
        encoding - the encoding to use
        Throws:
        XMLStreamException

      • createXMLEventWriter

        public abstract XMLEventWriter createXMLEventWriter(Writer stream)
                                             throws XMLStreamException
        Create a new XMLEventWriter that writes to a writer
        Parameters:
        stream - the stream to write to
        Throws:
        XMLStreamException

      • setProperty

        public abstract void setProperty(String name,
                                 Object value)
                          throws IllegalArgumentException
        Allows the user to set specific features/properties on the underlying implementation.
        Parameters:
        name - The name of the property
        value - The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • getProperty

        public abstract Object getProperty(String name)
                            throws IllegalArgumentException
        Get a feature/property on the underlying implementation
        Parameters:
        name - The name of the property
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported

      • isPropertySupported

        public abstract boolean isPropertySupported(String name)
        Query the set of properties that this factory supports.
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        true if the property is supported and false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLReporter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLReporter

  • public interface XMLReporter
    This interface is used to report non-fatal errors. Only warnings should be echoed through this interface.
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void report(String message, String errorType, Object relatedInformation, Location location)
      Report the desired message in an application specific format.

    • Method Detail

      • report

        void report(String message,
            String errorType,
            Object relatedInformation,
            Location location)
     throws XMLStreamException
        Report the desired message in an application specific format. Only warnings and non-fatal errors should be reported through this interface. Fatal errors should be thrown as XMLStreamException.
        Parameters:
        message - the error message
        errorType - an implementation defined error type
        relatedInformation - information related to the error, if available
        location - the location of the error, if available
        Throws:
        XMLStreamException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLResolver

  • public interface XMLResolver
    This interface is used to resolve resources during an XML parse. If an application wishes to perform custom entity resolution it must register an instance of this interface with the XMLInputFactory using the setXMLResolver method.
    Since:
    1.6
    Version:
    1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object resolveEntity(String publicID, String systemID, String baseURI, String namespace)
      Retrieves a resource.

    • Method Detail

      • resolveEntity

        Object resolveEntity(String publicID,
                     String systemID,
                     String baseURI,
                     String namespace)
              throws XMLStreamException
        Retrieves a resource. This resource can be of the following three return types: (1) java.io.InputStream (2) javax.xml.stream.XMLStreamReader (3) java.xml.stream.XMLEventReader. If this method returns null the processor will attempt to resolve the entity using its default mechanism.
        Parameters:
        publicID - The public identifier of the external entity being referenced, or null if none was supplied.
        systemID - The system identifier of the external entity being referenced.
        baseURI - Absolute base URI associated with systemId.
        namespace - The namespace of the entity to resolve.
        Returns:
        The resource requested or null.
        Throws:
        XMLStreamException - if there was a failure attempting to resolve the resource.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLStreamConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLStreamConstants

  • All Known Subinterfaces:
    Attribute, Characters, Comment, DTD, EndDocument, EndElement, EntityDeclaration, EntityReference, Namespace, NotationDeclaration, ProcessingInstruction, StartDocument, StartElement, XMLEvent, XMLStreamReader
    All Known Implementing Classes:
    StreamReaderDelegate

    public interface XMLStreamConstants
    This interface declares the constants used in this API. Numbers in the range 0 to 256 are reserved for the specification, user defined events must use event codes outside that range.
    Since:
    1.6

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int ATTRIBUTE
      Indicates an event is an attribute
      static int CDATA
      Indicates an event is a CDATA section
      static int CHARACTERS
      Indicates an event is characters
      static int COMMENT
      Indicates an event is a comment
      static int DTD
      Indicates an event is a DTD
      static int END_DOCUMENT
      Indicates an event is an end document
      static int END_ELEMENT
      Indicates an event is an end element
      static int ENTITY_DECLARATION
      Indicates a Entity Declaration
      static int ENTITY_REFERENCE
      Indicates an event is an entity reference
      static int NAMESPACE
      Indicates the event is a namespace declaration
      static int NOTATION_DECLARATION
      Indicates a Notation
      static int PROCESSING_INSTRUCTION
      Indicates an event is a processing instruction
      static int SPACE
      The characters are white space (see [XML], 2.10 "White Space Handling").
      static int START_DOCUMENT
      Indicates an event is a start document
      static int START_ELEMENT
      Indicates an event is a start element

    • Field Detail

      • START_ELEMENT

        static final int START_ELEMENT
        Indicates an event is a start element
        See Also:
        StartElement, Constant Field Values

      • END_ELEMENT

        static final int END_ELEMENT
        Indicates an event is an end element
        See Also:
        EndElement, Constant Field Values

      • PROCESSING_INSTRUCTION

        static final int PROCESSING_INSTRUCTION
        Indicates an event is a processing instruction
        See Also:
        ProcessingInstruction, Constant Field Values

      • CHARACTERS

        static final int CHARACTERS
        Indicates an event is characters
        See Also:
        Characters, Constant Field Values

      • COMMENT

        static final int COMMENT
        Indicates an event is a comment
        See Also:
        Comment, Constant Field Values

      • SPACE

        static final int SPACE
        The characters are white space (see [XML], 2.10 "White Space Handling"). Events are only reported as SPACE if they are ignorable white space. Otherwise they are reported as CHARACTERS.
        See Also:
        Characters, Constant Field Values

      • START_DOCUMENT

        static final int START_DOCUMENT
        Indicates an event is a start document
        See Also:
        StartDocument, Constant Field Values

      • END_DOCUMENT

        static final int END_DOCUMENT
        Indicates an event is an end document
        See Also:
        EndDocument, Constant Field Values

      • ENTITY_REFERENCE

        static final int ENTITY_REFERENCE
        Indicates an event is an entity reference
        See Also:
        EntityReference, Constant Field Values

      • ATTRIBUTE

        static final int ATTRIBUTE
        Indicates an event is an attribute
        See Also:
        Attribute, Constant Field Values

      • DTD

        static final int DTD
        Indicates an event is a DTD
        See Also:
        DTD, Constant Field Values

      • CDATA

        static final int CDATA
        Indicates an event is a CDATA section
        See Also:
        Characters, Constant Field Values

      • NAMESPACE

        static final int NAMESPACE
        Indicates the event is a namespace declaration
        See Also:
        Namespace, Constant Field Values

      • NOTATION_DECLARATION

        static final int NOTATION_DECLARATION
        Indicates a Notation
        See Also:
        NotationDeclaration, Constant Field Values

      • ENTITY_DECLARATION

        static final int ENTITY_DECLARATION
        Indicates a Entity Declaration
        See Also:
        NotationDeclaration, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLStreamException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Class XMLStreamException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.stream.XMLStreamException
  • All Implemented Interfaces:
    Serializable

    public class XMLStreamException
extends Exception
    The base exception for unexpected processing errors. This Exception class is used to report well-formedness errors as well as unexpected processing conditions.
    Since:
    1.6
    Version:
    1.0
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected Location | location
      protected Throwable | nested

    • Constructor Summary

      Constructors
      Constructor and Description
      XMLStreamException()
      Default constructor
      XMLStreamException(String msg)
      Construct an exception with the assocated message.
      XMLStreamException(String msg, Location location)
      Construct an exception with the assocated message, exception and location.
      XMLStreamException(String msg, Location location, Throwable th)
      Construct an exception with the assocated message, exception and location.
      XMLStreamException(String msg, Throwable th)
      Construct an exception with the assocated message and exception
      XMLStreamException(Throwable th)
      Construct an exception with the assocated exception

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Location getLocation()
      Gets the location of the exception
      Throwable getNestedException()
      Gets the nested exception.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • nested

        protected Throwable nested

      • location

        protected Location location

    • Constructor Detail

      • XMLStreamException

        public XMLStreamException()
        Default constructor

      • XMLStreamException

        public XMLStreamException(String msg)
        Construct an exception with the assocated message.
        Parameters:
        msg - the message to report

      • XMLStreamException

        public XMLStreamException(Throwable th)
        Construct an exception with the assocated exception
        Parameters:
        th - a nested exception

      • XMLStreamException

        public XMLStreamException(String msg,
                          Throwable th)
        Construct an exception with the assocated message and exception
        Parameters:
        th - a nested exception
        msg - the message to report

      • XMLStreamException

        public XMLStreamException(String msg,
                          Location location,
                          Throwable th)
        Construct an exception with the assocated message, exception and location.
        Parameters:
        th - a nested exception
        msg - the message to report
        location - the location of the error

      • XMLStreamException

        public XMLStreamException(String msg,
                          Location location)
        Construct an exception with the assocated message, exception and location.
        Parameters:
        msg - the message to report
        location - the location of the error

    • Method Detail

      • getNestedException

        public Throwable getNestedException()
        Gets the nested exception.
        Returns:
        Nested exception

      • getLocation

        public Location getLocation()
        Gets the location of the exception
        Returns:
        the location of the exception, may be null if none is available
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLStreamReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLStreamReader

  • All Superinterfaces:
    XMLStreamConstants
    All Known Implementing Classes:
    StreamReaderDelegate

    public interface XMLStreamReader
extends XMLStreamConstants
    The XMLStreamReader interface allows forward, read-only access to XML. It is designed to be the lowest level and most efficient way to read XML data.

    The XMLStreamReader is designed to iterate over XML using next() and hasNext(). The data can be accessed using methods such as getEventType(), getNamespaceURI(), getLocalName() and getText();

    The next() method causes the reader to read the next parse event. The next() method returns an integer which identifies the type of event just read.

    The event type can be determined using getEventType().

    Parsing events are defined as the XML Declaration, a DTD, start tag, character data, white space, end tag, comment, or processing instruction. An attribute or namespace event may be encountered at the root level of a document as the result of a query operation.

    For XML 1.0 compliance an XML processor must pass the identifiers of declared unparsed entities, notation declarations and their associated identifiers to the application. This information is provided through the property API on this interface. The following two properties allow access to this information: javax.xml.stream.notations and javax.xml.stream.entities. When the current event is a DTD the following call will return a list of Notations List l = (List) getProperty("javax.xml.stream.notations"); The following call will return a list of entity declarations: List l = (List) getProperty("javax.xml.stream.entities"); These properties can only be accessed during a DTD event and are defined to return null if the information is not available.

    The following table describes which methods are valid in what state. If a method is called in an invalid state the method will throw a java.lang.IllegalStateException.
    Valid methods for each state
    Event Type | Valid Methods
    All States | getProperty(), hasNext(), require(), close(), getNamespaceURI(), isStartElement(), isEndElement(), isCharacters(), isWhiteSpace(), getNamespaceContext(), getEventType(),getLocation(), hasText(), hasName()
    START_ELEMENT | next(), getName(), getLocalName(), hasName(), getPrefix(), getAttributeXXX(), isAttributeSpecified(), getNamespaceXXX(), getElementText(), nextTag()
    ATTRIBUTE | next(), nextTag() getAttributeXXX(), isAttributeSpecified(),
    NAMESPACE | next(), nextTag() getNamespaceXXX()
    END_ELEMENT | next(), getName(), getLocalName(), hasName(), getPrefix(), getNamespaceXXX(), nextTag()
    CHARACTERS | next(), getTextXXX(), nextTag()
    CDATA | next(), getTextXXX(), nextTag()
    COMMENT | next(), getTextXXX(), nextTag()
    SPACE | next(), getTextXXX(), nextTag()
    START_DOCUMENT | next(), getEncoding(), getVersion(), isStandalone(), standaloneSet(), getCharacterEncodingScheme(), nextTag()
    END_DOCUMENT | close()
    PROCESSING_INSTRUCTION | next(), getPITarget(), getPIData(), nextTag()
    ENTITY_REFERENCE | next(), getLocalName(), getText(), nextTag()
    DTD | next(), getText(), nextTag()

    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLEvent, XMLInputFactory, XMLStreamWriter

    • Field Summary

      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void close()
      Frees any resources associated with this Reader.
      int getAttributeCount()
      Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE.
      String getAttributeLocalName(int index)
      Returns the localName of the attribute at the provided index
      QName getAttributeName(int index)
      Returns the qname of the attribute at the provided index
      String getAttributeNamespace(int index)
      Returns the namespace of the attribute at the provided index
      String getAttributePrefix(int index)
      Returns the prefix of this attribute at the provided index
      String getAttributeType(int index)
      Returns the XML type of the attribute at the provided index
      String getAttributeValue(int index)
      Returns the value of the attribute at the index
      String getAttributeValue(String namespaceURI, String localName)
      Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality
      String getCharacterEncodingScheme()
      Returns the character encoding declared on the xml declaration Returns null if none was declared
      String getElementText()
      Reads the content of a text-only element, an exception is thrown if this is not a text-only element.
      String getEncoding()
      Return input encoding if known or null if unknown.
      int getEventType()
      Returns an integer code that indicates the type of the event the cursor is pointing to.
      String getLocalName()
      Returns the (local) name of the current event.
      Location getLocation()
      Return the current location of the processor.
      QName getName()
      Returns a QName for the current START_ELEMENT or END_ELEMENT event
      NamespaceContext getNamespaceContext()
      Returns a read only namespace context for the current position.
      int getNamespaceCount()
      Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE.
      String getNamespacePrefix(int index)
      Returns the prefix for the namespace declared at the index.
      String getNamespaceURI()
      If the current event is a START_ELEMENT or END_ELEMENT this method returns the URI of the prefix or the default namespace.
      String getNamespaceURI(int index)
      Returns the uri for the namespace declared at the index.
      String getNamespaceURI(String prefix)
      Return the uri for the given prefix.
      String getPIData()
      Get the data section of a processing instruction
      String getPITarget()
      Get the target of a processing instruction
      String getPrefix()
      Returns the prefix of the current event or null if the event does not have a prefix
      Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      String getText()
      Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD.
      char[] getTextCharacters()
      Returns an array which contains the characters from this event.
      int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
      Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
      int getTextLength()
      Returns the length of the sequence of characters for this Text event within the text character array.
      int getTextStart()
      Returns the offset into the text character array where the first character (of this text event) is stored.
      String getVersion()
      Get the xml version declared on the xml declaration Returns null if none was declared
      boolean hasName()
      returns true if the current event has a name (is a START_ELEMENT or END_ELEMENT) returns false otherwise
      boolean hasNext()
      Returns true if there are more parsing events and false if there are no more events.
      boolean hasText()
      Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT, SPACE
      boolean isAttributeSpecified(int index)
      Returns a boolean which indicates if this attribute was created by default
      boolean isCharacters()
      Returns true if the cursor points to a character data event
      boolean isEndElement()
      Returns true if the cursor points to an end tag (otherwise false)
      boolean isStandalone()
      Get the standalone declaration from the xml declaration
      boolean isStartElement()
      Returns true if the cursor points to a start tag (otherwise false)
      boolean isWhiteSpace()
      Returns true if the cursor points to a character data event that consists of all whitespace
      int next()
      Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
      int nextTag()
      Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.
      void require(int type, String namespaceURI, String localName)
      Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
      boolean standaloneSet()
      Checks if standalone was set in the document

    • Method Detail

      • getProperty

        Object getProperty(String name)
            throws IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Parameters:
        name - The name of the property, may not be null
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if name is null

      • next

        int next()
  throws XMLStreamException
        Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks. If the property javax.xml.stream.isCoalescing is set to true element content must be coalesced and only one CHARACTERS event must be returned for contiguous element content or CDATA Sections. By default entity references must be expanded and reported transparently to the application. An exception will be thrown if an entity reference cannot be expanded. If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.

        Given the following XML:
        <foo><!--description-->content text<![CDATA[<greeting>Hello</greeting>]]>other content</foo>
        The behavior of calling next() when being on foo will be:
        1- the comment (COMMENT)
        2- then the characters section (CHARACTERS)
        3- then the CDATA section (another CHARACTERS)
        4- then the next characters section (another CHARACTERS)
        5- then the END_ELEMENT

        NOTE: empty element (such as <tag/>) will be reported with two separate events: START_ELEMENT, END_ELEMENT - This preserves parsing equivalency of empty element to <tag></tag>. This method will throw an IllegalStateException if it is called after hasNext() returns false.

        Returns:
        the integer code corresponding to the current parse event
        Throws:
        NoSuchElementException - if this is called when hasNext() returns false
        XMLStreamException - if there is an error processing the underlying XML source
        See Also:
        XMLEvent

      • require

        void require(int type,
             String namespaceURI,
             String localName)
      throws XMLStreamException
        Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.
        Parameters:
        type - the event type
        namespaceURI - the uri of the event, may be null
        localName - the localName of the event, may be null
        Throws:
        XMLStreamException - if the required values are not matched.

      • getElementText

        String getElementText()
               throws XMLStreamException
        Reads the content of a text-only element, an exception is thrown if this is not a text-only element. Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content.
        Precondition: the current event is START_ELEMENT.
        Postcondition: the current event is the corresponding END_ELEMENT.
        The method does the following (implementations are free to optimized but must do equivalent processing):
         if(getEventType() != XMLStreamConstants.START_ELEMENT) {
 throw new XMLStreamException(
 "parser must be on START_ELEMENT to read next text", getLocation());
 }
 int eventType = next();
 StringBuffer content = new StringBuffer();
 while(eventType != XMLStreamConstants.END_ELEMENT ) {
 if(eventType == XMLStreamConstants.CHARACTERS
 || eventType == XMLStreamConstants.CDATA
 || eventType == XMLStreamConstants.SPACE
 || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
 buf.append(getText());
 } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
 || eventType == XMLStreamConstants.COMMENT) {
 // skipping
 } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
 throw new XMLStreamException(
 "unexpected end of document when reading element text content", this);
 } else if(eventType == XMLStreamConstants.START_ELEMENT) {
 throw new XMLStreamException(
 "element text content may not contain START_ELEMENT", getLocation());
 } else {
 throw new XMLStreamException(
 "Unexpected event type "+eventType, getLocation());
 }
 eventType = next();
 }
 return buf.toString();
        Throws:
        XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

      • nextTag

        int nextTag()
     throws XMLStreamException
        Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached. If other than white space characters, COMMENT, PROCESSING_INSTRUCTION, START_ELEMENT, END_ELEMENT are encountered, an exception is thrown. This method should be used when processing element-only content seperated by white space.
        Precondition: none
        Postcondition: the current event is START_ELEMENT or END_ELEMENT and cursor may have moved over any whitespace event.
        Essentially it does the following (implementations are free to optimized but must do equivalent processing):
         int eventType = next();
 while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
 || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
 // skip whitespace
 || eventType == XMLStreamConstants.SPACE
 || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
 || eventType == XMLStreamConstants.COMMENT
 ) {
 eventType = next();
 }
 if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
 throw new String XMLStreamException("expected start or end tag", getLocation());
 }
 return eventType;
        Returns:
        the event type of the element read (START_ELEMENT or END_ELEMENT)
        Throws:
        XMLStreamException - if the current event is not white space, PROCESSING_INSTRUCTION, START_ELEMENT or END_ELEMENT
        NoSuchElementException - if this is called when hasNext() returns false

      • hasNext

        boolean hasNext()
         throws XMLStreamException
        Returns true if there are more parsing events and false if there are no more events. This method will return false if the current state of the XMLStreamReader is END_DOCUMENT
        Returns:
        true if there are more events, false otherwise
        Throws:
        XMLStreamException - if there is a fatal error detecting the next state

      • close

        void close()
    throws XMLStreamException
        Frees any resources associated with this Reader. This method does not close the underlying input source.
        Throws:
        XMLStreamException - if there are errors freeing associated resources

      • getNamespaceURI

        String getNamespaceURI(String prefix)
        Return the uri for the given prefix. The uri returned depends on the current state of the processor.

        NOTE:The 'xml' prefix is bound as defined in Namespaces in XML specification to "http://www.w3.org/XML/1998/namespace".

        NOTE: The 'xmlns' prefix must be resolved to following namespace http://www.w3.org/2000/xmlns/

        Parameters:
        prefix - The prefix to lookup, may not be null
        Returns:
        the uri bound to the given prefix or null if it is not bound
        Throws:
        IllegalArgumentException - if the prefix is null

      • isStartElement

        boolean isStartElement()
        Returns true if the cursor points to a start tag (otherwise false)
        Returns:
        true if the cursor points to a start tag, false otherwise

      • isEndElement

        boolean isEndElement()
        Returns true if the cursor points to an end tag (otherwise false)
        Returns:
        true if the cursor points to an end tag, false otherwise

      • isCharacters

        boolean isCharacters()
        Returns true if the cursor points to a character data event
        Returns:
        true if the cursor points to character data, false otherwise

      • isWhiteSpace

        boolean isWhiteSpace()
        Returns true if the cursor points to a character data event that consists of all whitespace
        Returns:
        true if the cursor points to all whitespace, false otherwise

      • getAttributeValue

        String getAttributeValue(String namespaceURI,
                         String localName)
        Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality
        Parameters:
        namespaceURI - the namespace of the attribute
        localName - the local name of the attribute, cannot be null
        Returns:
        returns the value of the attribute , returns null if not found
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeCount

        int getAttributeCount()
        Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE. This count excludes namespace definitions. Attribute indices are zero-based.
        Returns:
        returns the number of attributes
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeName

        QName getAttributeName(int index)
        Returns the qname of the attribute at the provided index
        Parameters:
        index - the position of the attribute
        Returns:
        the QName of the attribute
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeNamespace

        String getAttributeNamespace(int index)
        Returns the namespace of the attribute at the provided index
        Parameters:
        index - the position of the attribute
        Returns:
        the namespace URI (can be null)
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeLocalName

        String getAttributeLocalName(int index)
        Returns the localName of the attribute at the provided index
        Parameters:
        index - the position of the attribute
        Returns:
        the localName of the attribute
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributePrefix

        String getAttributePrefix(int index)
        Returns the prefix of this attribute at the provided index
        Parameters:
        index - the position of the attribute
        Returns:
        the prefix of the attribute
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeType

        String getAttributeType(int index)
        Returns the XML type of the attribute at the provided index
        Parameters:
        index - the position of the attribute
        Returns:
        the XML type of the attribute
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getAttributeValue

        String getAttributeValue(int index)
        Returns the value of the attribute at the index
        Parameters:
        index - the position of the attribute
        Returns:
        the attribute value
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • isAttributeSpecified

        boolean isAttributeSpecified(int index)
        Returns a boolean which indicates if this attribute was created by default
        Parameters:
        index - the position of the attribute
        Returns:
        true if this is a default attribute
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

      • getNamespaceCount

        int getNamespaceCount()
        Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On an END_ELEMENT the count is of the namespaces that are about to go out of scope. This is the equivalent of the information reported by SAX callback for an end element event.
        Returns:
        returns the number of namespace declarations on this specific element
        Throws:
        IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

      • getNamespacePrefix

        String getNamespacePrefix(int index)
        Returns the prefix for the namespace declared at the index. Returns null if this is the default namespace declaration
        Parameters:
        index - the position of the namespace declaration
        Returns:
        returns the namespace prefix
        Throws:
        IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

      • getNamespaceURI

        String getNamespaceURI(int index)
        Returns the uri for the namespace declared at the index.
        Parameters:
        index - the position of the namespace declaration
        Returns:
        returns the namespace uri
        Throws:
        IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

      • getNamespaceContext

        NamespaceContext getNamespaceContext()
        Returns a read only namespace context for the current position. The context is transient and only valid until a call to next() changes the state of the reader.
        Returns:
        return a namespace context

      • getEventType

        int getEventType()
        Returns an integer code that indicates the type of the event the cursor is pointing to.

      • getText

        String getText()
        Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD. If an ENTITY_REFERENCE has been resolved, any character data will be reported as CHARACTERS events.
        Returns:
        the current text or null
        Throws:
        IllegalStateException - if this state is not a valid text state.

      • getTextCharacters

        char[] getTextCharacters()
        Returns an array which contains the characters from this event. This array should be treated as read-only and transient. I.e. the array will contain the text characters until the XMLStreamReader moves on to the next event. Attempts to hold onto the character array beyond that time or modify the contents of the array are breaches of the contract for this interface.
        Returns:
        the current text or an empty array
        Throws:
        IllegalStateException - if this state is not a valid text state.

      • getTextCharacters

        int getTextCharacters(int sourceStart,
                      char[] target,
                      int targetStart,
                      int length)
               throws XMLStreamException
        Gets the the text associated with a CHARACTERS, SPACE or CDATA event. Text starting a "sourceStart" is copied into "target" starting at "targetStart". Up to "length" characters are copied. The number of characters actually copied is returned. The "sourceStart" argument must be greater or equal to 0 and less than or equal to the number of characters associated with the event. Usually, one requests text starting at a "sourceStart" of 0. If the number of characters actually copied is less than the "length", then there is no more text. Otherwise, subsequent calls need to be made until all text has been retrieved. For example: int length = 1024; char[] myBuffer = new char[ length ]; for ( int sourceStart = 0 ; ; sourceStart += length ) { int nCopied = stream.getTextCharacters( sourceStart, myBuffer, 0, length ); if (nCopied < length) break; } XMLStreamException may be thrown if there are any XML errors in the underlying source. The "targetStart" argument must be greater than or equal to 0 and less than the length of "target", Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
        Parameters:
        sourceStart - the index of the first character in the source array to copy
        target - the destination array
        targetStart - the start offset in the target array
        length - the number of characters to copy
        Returns:
        the number of characters actually copied
        Throws:
        XMLStreamException - if the underlying XML source is not well-formed
        IndexOutOfBoundsException - if targetStart < 0 or > than the length of target
        IndexOutOfBoundsException - if length < 0 or targetStart + length > length of target
        UnsupportedOperationException - if this method is not supported
        NullPointerException - is if target is null

      • getTextStart

        int getTextStart()
        Returns the offset into the text character array where the first character (of this text event) is stored.
        Throws:
        IllegalStateException - if this state is not a valid text state.

      • getTextLength

        int getTextLength()
        Returns the length of the sequence of characters for this Text event within the text character array.
        Throws:
        IllegalStateException - if this state is not a valid text state.

      • getEncoding

        String getEncoding()
        Return input encoding if known or null if unknown.
        Returns:
        the encoding of this instance or null

      • hasText

        boolean hasText()
        Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT, SPACE

      • getLocation

        Location getLocation()
        Return the current location of the processor. If the Location is unknown the processor should return an implementation of Location that returns -1 for the location and null for the publicId and systemId. The location information is only valid until next() is called.

      • getName

        QName getName()
        Returns a QName for the current START_ELEMENT or END_ELEMENT event
        Returns:
        the QName for the current START_ELEMENT or END_ELEMENT event
        Throws:
        IllegalStateException - if this is not a START_ELEMENT or END_ELEMENT

      • getLocalName

        String getLocalName()
        Returns the (local) name of the current event. For START_ELEMENT or END_ELEMENT returns the (local) name of the current element. For ENTITY_REFERENCE it returns entity name. The current event must be START_ELEMENT or END_ELEMENT, or ENTITY_REFERENCE
        Returns:
        the localName
        Throws:
        IllegalStateException - if this not a START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

      • hasName

        boolean hasName()
        returns true if the current event has a name (is a START_ELEMENT or END_ELEMENT) returns false otherwise

      • getNamespaceURI

        String getNamespaceURI()
        If the current event is a START_ELEMENT or END_ELEMENT this method returns the URI of the prefix or the default namespace. Returns null if the event does not have a prefix.
        Returns:
        the URI bound to this elements prefix, the default namespace, or null

      • getPrefix

        String getPrefix()
        Returns the prefix of the current event or null if the event does not have a prefix
        Returns:
        the prefix or null

      • getVersion

        String getVersion()
        Get the xml version declared on the xml declaration Returns null if none was declared
        Returns:
        the XML version or null

      • isStandalone

        boolean isStandalone()
        Get the standalone declaration from the xml declaration
        Returns:
        true if this is standalone, or false otherwise

      • standaloneSet

        boolean standaloneSet()
        Checks if standalone was set in the document
        Returns:
        true if standalone was set in the document, or false otherwise

      • getCharacterEncodingScheme

        String getCharacterEncodingScheme()
        Returns the character encoding declared on the xml declaration Returns null if none was declared
        Returns:
        the encoding declared in the document or null

      • getPITarget

        String getPITarget()
        Get the target of a processing instruction
        Returns:
        the target or null

      • getPIData

        String getPIData()
        Get the data section of a processing instruction
        Returns:
        the data or null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLStreamWriter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.stream

Interface XMLStreamWriter

  • public interface XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML. The XMLStreamWriter does not perform well formedness checking on its input. However the writeCharacters method is required to escape & , < and > For attribute values the writeAttribute method will escape the above characters plus " to ensure that all character content and attribute values are well formed. Each NAMESPACE and ATTRIBUTE must be individually written.
    XML Namespaces, javax.xml.stream.isRepairingNamespaces and write method behaviour
    Method | isRepairingNamespaces == true | isRepairingNamespaces == false
    namespaceURI bound | namespaceURI unbound | namespaceURI bound | namespaceURI unbound
    writeAttribute(namespaceURI, localName, value) | prefix:localName="value" [1] | xmlns:{generated}="namespaceURI" {generated}:localName="value" | prefix:localName="value" [1] | XMLStreamException
    writeAttribute(prefix, namespaceURI, localName, value) bound to same prefix:
    prefix:localName="value" [1]

    bound to different prefix:
    xmlns:{generated}="namespaceURI" {generated}:localName="value"     		xmlns:prefix="namespaceURI" prefix:localName="value" [3] bound to same prefix:
    prefix:localName="value" [1][2]

    bound to different prefix:
    XMLStreamException[2]     		xmlns:prefix="namespaceURI" prefix:localName="value" [2][5]
    writeStartElement(namespaceURI, localName)

    writeEmptyElement(namespaceURI, localName)     		<prefix:localName> [1] <{generated}:localName xmlns:{generated}="namespaceURI"> <prefix:localName> [1] XMLStreamException
    writeStartElement(prefix, localName, namespaceURI)

    writeEmptyElement(prefix, localName, namespaceURI)     		bound to same prefix:
    <prefix:localName> [1]

    bound to different prefix:
    <{generated}:localName xmlns:{generated}="namespaceURI">     		<prefix:localName xmlns:prefix="namespaceURI"> [4] bound to same prefix:
    <prefix:localName> [1]

    bound to different prefix:
    XMLStreamException     		<prefix:localName>
    Notes:
    • [1] if namespaceURI == default Namespace URI, then no prefix is written
    • [2] if prefix == "" || null && namespaceURI == "", then no prefix or Namespace declaration is generated or written
    • [3] if prefix == "" || null, then a prefix is randomly generated
    • [4] if prefix == "" || null, then it is treated as the default Namespace and no prefix is generated or written, an xmlns declaration is generated and written if the namespaceURI is unbound
    • [5] if prefix == "" || null, then it is treated as an invalid attempt to define the default Namespace and an XMLStreamException is thrown
    Since:
    1.6
    Version:
    1.0
    See Also:
    XMLOutputFactory, XMLStreamReader

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void close()
      Close this writer and free any resources associated with the writer.
      void flush()
      Write any cached data to the underlying output mechanism.
      NamespaceContext getNamespaceContext()
      Returns the current namespace context.
      String getPrefix(String uri)
      Gets the prefix the uri is bound to
      Object getProperty(String name)
      Get the value of a feature/property from the underlying implementation
      void setDefaultNamespace(String uri)
      Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.
      void setNamespaceContext(NamespaceContext context)
      Sets the current namespace context for prefix and uri bindings.
      void setPrefix(String prefix, String uri)
      Sets the prefix the uri is bound to.
      void writeAttribute(String localName, String value)
      Writes an attribute to the output stream without a prefix.
      void writeAttribute(String namespaceURI, String localName, String value)
      Writes an attribute to the output stream
      void writeAttribute(String prefix, String namespaceURI, String localName, String value)
      Writes an attribute to the output stream
      void writeCData(String data)
      Writes a CData section
      void writeCharacters(char[] text, int start, int len)
      Write text to the output
      void writeCharacters(String text)
      Write text to the output
      void writeComment(String data)
      Writes an xml comment with the data enclosed
      void writeDefaultNamespace(String namespaceURI)
      Writes the default namespace to the stream
      void writeDTD(String dtd)
      Write a DTD section.
      void writeEmptyElement(String localName)
      Writes an empty element tag to the output
      void writeEmptyElement(String namespaceURI, String localName)
      Writes an empty element tag to the output
      void writeEmptyElement(String prefix, String localName, String namespaceURI)
      Writes an empty element tag to the output
      void writeEndDocument()
      Closes any start tags and writes corresponding end tags.
      void writeEndElement()
      Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.
      void writeEntityRef(String name)
      Writes an entity reference
      void writeNamespace(String prefix, String namespaceURI)
      Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace
      void writeProcessingInstruction(String target)
      Writes a processing instruction
      void writeProcessingInstruction(String target, String data)
      Writes a processing instruction
      void writeStartDocument()
      Write the XML Declaration.
      void writeStartDocument(String version)
      Write the XML Declaration.
      void writeStartDocument(String encoding, String version)
      Write the XML Declaration.
      void writeStartElement(String localName)
      Writes a start tag to the output.
      void writeStartElement(String namespaceURI, String localName)
      Writes a start tag to the output
      void writeStartElement(String prefix, String localName, String namespaceURI)
      Writes a start tag to the output

    • Method Detail

      • writeStartElement

        void writeStartElement(String localName)
                throws XMLStreamException
        Writes a start tag to the output. All writeStartElement methods open a new scope in the internal namespace context. Writing the corresponding EndElement causes the scope to be closed.
        Parameters:
        localName - local name of the tag, may not be null
        Throws:
        XMLStreamException

      • writeStartElement

        void writeStartElement(String namespaceURI,
                       String localName)
                throws XMLStreamException
        Writes a start tag to the output
        Parameters:
        namespaceURI - the namespaceURI of the prefix to use, may not be null
        localName - local name of the tag, may not be null
        Throws:
        XMLStreamException - if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true

      • writeStartElement

        void writeStartElement(String prefix,
                       String localName,
                       String namespaceURI)
                throws XMLStreamException
        Writes a start tag to the output
        Parameters:
        localName - local name of the tag, may not be null
        prefix - the prefix of the tag, may not be null
        namespaceURI - the uri to bind the prefix to, may not be null
        Throws:
        XMLStreamException

      • writeEmptyElement

        void writeEmptyElement(String namespaceURI,
                       String localName)
                throws XMLStreamException
        Writes an empty element tag to the output
        Parameters:
        namespaceURI - the uri to bind the tag to, may not be null
        localName - local name of the tag, may not be null
        Throws:
        XMLStreamException - if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true

      • writeEmptyElement

        void writeEmptyElement(String prefix,
                       String localName,
                       String namespaceURI)
                throws XMLStreamException
        Writes an empty element tag to the output
        Parameters:
        prefix - the prefix of the tag, may not be null
        localName - local name of the tag, may not be null
        namespaceURI - the uri to bind the tag to, may not be null
        Throws:
        XMLStreamException

      • writeEmptyElement

        void writeEmptyElement(String localName)
                throws XMLStreamException
        Writes an empty element tag to the output
        Parameters:
        localName - local name of the tag, may not be null
        Throws:
        XMLStreamException

      • writeEndElement

        void writeEndElement()
              throws XMLStreamException
        Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.
        Throws:
        XMLStreamException

      • writeEndDocument

        void writeEndDocument()
               throws XMLStreamException
        Closes any start tags and writes corresponding end tags.
        Throws:
        XMLStreamException

      • close

        void close()
    throws XMLStreamException
        Close this writer and free any resources associated with the writer. This must not close the underlying output stream.
        Throws:
        XMLStreamException

      • flush

        void flush()
    throws XMLStreamException
        Write any cached data to the underlying output mechanism.
        Throws:
        XMLStreamException

      • writeAttribute

        void writeAttribute(String localName,
                    String value)
             throws XMLStreamException
        Writes an attribute to the output stream without a prefix.
        Parameters:
        localName - the local name of the attribute
        value - the value of the attribute
        Throws:
        IllegalStateException - if the current state does not allow Attribute writing
        XMLStreamException

      • writeAttribute

        void writeAttribute(String prefix,
                    String namespaceURI,
                    String localName,
                    String value)
             throws XMLStreamException
        Writes an attribute to the output stream
        Parameters:
        prefix - the prefix for this attribute
        namespaceURI - the uri of the prefix for this attribute
        localName - the local name of the attribute
        value - the value of the attribute
        Throws:
        IllegalStateException - if the current state does not allow Attribute writing
        XMLStreamException - if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true

      • writeAttribute

        void writeAttribute(String namespaceURI,
                    String localName,
                    String value)
             throws XMLStreamException
        Writes an attribute to the output stream
        Parameters:
        namespaceURI - the uri of the prefix for this attribute
        localName - the local name of the attribute
        value - the value of the attribute
        Throws:
        IllegalStateException - if the current state does not allow Attribute writing
        XMLStreamException - if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true

      • writeNamespace

        void writeNamespace(String prefix,
                    String namespaceURI)
             throws XMLStreamException
        Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace
        Parameters:
        prefix - the prefix to bind this namespace to
        namespaceURI - the uri to bind the prefix to
        Throws:
        IllegalStateException - if the current state does not allow Namespace writing
        XMLStreamException

      • writeDefaultNamespace

        void writeDefaultNamespace(String namespaceURI)
                    throws XMLStreamException
        Writes the default namespace to the stream
        Parameters:
        namespaceURI - the uri to bind the default namespace to
        Throws:
        IllegalStateException - if the current state does not allow Namespace writing
        XMLStreamException

      • writeComment

        void writeComment(String data)
           throws XMLStreamException
        Writes an xml comment with the data enclosed
        Parameters:
        data - the data contained in the comment, may be null
        Throws:
        XMLStreamException

      • writeProcessingInstruction

        void writeProcessingInstruction(String target)
                         throws XMLStreamException
        Writes a processing instruction
        Parameters:
        target - the target of the processing instruction, may not be null
        Throws:
        XMLStreamException

      • writeProcessingInstruction

        void writeProcessingInstruction(String target,
                                String data)
                         throws XMLStreamException
        Writes a processing instruction
        Parameters:
        target - the target of the processing instruction, may not be null
        data - the data contained in the processing instruction, may not be null
        Throws:
        XMLStreamException

      • writeCData

        void writeCData(String data)
         throws XMLStreamException
        Writes a CData section
        Parameters:
        data - the data contained in the CData Section, may not be null
        Throws:
        XMLStreamException

      • writeDTD

        void writeDTD(String dtd)
       throws XMLStreamException
        Write a DTD section. This string represents the entire doctypedecl production from the XML 1.0 specification.
        Parameters:
        dtd - the DTD to be written
        Throws:
        XMLStreamException

      • writeEntityRef

        void writeEntityRef(String name)
             throws XMLStreamException
        Writes an entity reference
        Parameters:
        name - the name of the entity
        Throws:
        XMLStreamException

      • writeStartDocument

        void writeStartDocument()
                 throws XMLStreamException
        Write the XML Declaration. Defaults the XML version to 1.0, and the encoding to utf-8
        Throws:
        XMLStreamException

      • writeStartDocument

        void writeStartDocument(String version)
                 throws XMLStreamException
        Write the XML Declaration. Defaults the XML version to 1.0
        Parameters:
        version - version of the xml document
        Throws:
        XMLStreamException

      • writeStartDocument

        void writeStartDocument(String encoding,
                        String version)
                 throws XMLStreamException
        Write the XML Declaration. Note that the encoding parameter does not set the actual encoding of the underlying output. That must be set when the instance of the XMLStreamWriter is created using the XMLOutputFactory
        Parameters:
        encoding - encoding of the xml declaration
        version - version of the xml document
        Throws:
        XMLStreamException - If given encoding does not match encoding of the underlying stream

      • writeCharacters

        void writeCharacters(String text)
              throws XMLStreamException
        Write text to the output
        Parameters:
        text - the value to write
        Throws:
        XMLStreamException

      • writeCharacters

        void writeCharacters(char[] text,
                     int start,
                     int len)
              throws XMLStreamException
        Write text to the output
        Parameters:
        text - the value to write
        start - the starting position in the array
        len - the number of characters to write
        Throws:
        XMLStreamException

      • getPrefix

        String getPrefix(String uri)
          throws XMLStreamException
        Gets the prefix the uri is bound to
        Returns:
        the prefix or null
        Throws:
        XMLStreamException

      • setPrefix

        void setPrefix(String prefix,
               String uri)
        throws XMLStreamException
        Sets the prefix the uri is bound to. This prefix is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the prefix is bound in the root scope.
        Parameters:
        prefix - the prefix to bind to the uri, may not be null
        uri - the uri to bind to the prefix, may be null
        Throws:
        XMLStreamException

      • setDefaultNamespace

        void setDefaultNamespace(String uri)
                  throws XMLStreamException
        Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the uri is bound in the root scope.
        Parameters:
        uri - the uri to bind to the default namespace, may be null
        Throws:
        XMLStreamException

      • setNamespaceContext

        void setNamespaceContext(NamespaceContext context)
                  throws XMLStreamException
        Sets the current namespace context for prefix and uri bindings. This context becomes the root namespace context for writing and will replace the current root namespace context. Subsequent calls to setPrefix and setDefaultNamespace will bind namespaces using the context passed to the method as the root context for resolving namespaces. This method may only be called once at the start of the document. It does not cause the namespaces to be declared. If a namespace URI to prefix mapping is found in the namespace context it is treated as declared and the prefix may be used by the StreamWriter.
        Parameters:
        context - the namespace context to use for this writer, may not be null
        Throws:
        XMLStreamException

      • getNamespaceContext

        NamespaceContext getNamespaceContext()
        Returns the current namespace context.
        Returns:
        the current NamespaceContext

      • getProperty

        Object getProperty(String name)
            throws IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Parameters:
        name - The name of the property, may not be null
        Returns:
        The value of the property
        Throws:
        IllegalArgumentException - if the property is not supported
        NullPointerException - if the name is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.transform

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

See: Description

  • Interface Summary
    Interface Description
    ErrorListener
    To provide customized error handling, implement this interface and use the setErrorListener method to register an instance of the implmentation with the Transformer.
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
    Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.
    URIResolver
    An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
  • Class Summary
    Class Description
    OutputKeys
    Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or Templates object.
    Transformer
    An instance of this abstract class can transform a source tree into a result tree.
    TransformerFactory
    A TransformerFactory instance can be used to create Transformer and Templates objects.
  • Exception Summary
    Exception Description
    TransformerConfigurationException
    Indicates a serious configuration error.
    TransformerException
    This class specifies an exceptional condition that occured during the transformation process.
  • Error Summary
    Error Description
    TransformerFactoryConfigurationError
    Thrown when a problem with configuration with the Transformer Factories exists.

Package javax.xml.transform Description

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result. These interfaces have no dependencies on SAX or the DOM standard, and try to make as few assumptions as possible about the details of the source and result of a transformation. It achieves this by defining Source and Result interfaces.

To define concrete classes for the user, the API defines specializations of the interfaces found at the root level. These interfaces are found in javax.xml.transform.sax, javax.xml.transform.dom, and javax.xml.transform.stream.

Creating Objects

The API allows a concrete TransformerFactory object to be created from the static function TransformerFactory.newInstance().

Specification of Inputs and Outputs

This API defines two interface objects called Source and Result. In order to pass Source and Result objects to the interfaces, concrete classes must be used. Three concrete representations are defined for each of these objects: StreamSource and StreamResult, SAXSource and SAXResult, and DOMSource and DOMResult. Each of these objects defines a FEATURE string (which is i the form of a URL), which can be passed into TransformerFactory.getFeature(java.lang.String) to see if the given type of Source or Result object is supported. For instance, to test if a DOMSource and a StreamResult is supported, you can apply the following test.

TransformerFactory tfactory = TransformerFactory.newInstance();
if (tfactory.getFeature(DOMSource.FEATURE) && tfactory.getFeature(StreamResult.FEATURE)) {
...
}

Qualified Name Representation

Namespaces present something of a problem area when dealing with XML objects. Qualified Names appear in XML markup as prefixed names. But the prefixes themselves do not hold identity. Rather, it is the URIs that they contextually map to that hold the identity. Therefore, when passing a Qualified Name like "xyz:foo" among Java programs, one must provide a means to map "xyz" to a namespace.

One solution has been to create a "QName" object that holds the namespace URI, as well as the prefix and local name, but this is not always an optimal solution, as when, for example, you want to use unique strings as keys in a dictionary object. Not having a string representation also makes it difficult to specify a namespaced identity outside the context of an XML document.

In order to pass namespaced values to transformations, for instance when setting a property or a parameter on a Transformer object, this specification defines that a String "qname" object parameter be passed as two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the qname has a null URI, then the String object only contains the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that the prefix is lost.

Result Tree Serialization

Serialization of the result tree to a stream can be controlled with the Transformer.setOutputProperties(java.util.Properties) and the Transformer.setOutputProperty(java.lang.String, java.lang.String) methods. These properties only apply to stream results, they have no effect when the result is a DOM tree or SAX event stream.

Strings that match the XSLT specification for xsl:output attributes can be referenced from the OutputKeys class. Other strings can be specified as well. If the transformer does not recognize an output key, a IllegalArgumentException is thrown, unless the key name is namespace qualified. Output key names that are namespace qualified are always allowed, although they may be ignored by some implementations.

If all that is desired is the simple identity transformation of a source to a result, then TransformerFactory provides a TransformerFactory.newTransformer() method with no arguments. This method creates a Transformer that effectively copies the source to the result. This method may be used to create a DOM from SAX events or to create an XML or HTML stream from a DOM or SAX events.

Exceptions and Error Reporting

The transformation API throw three types of specialized exceptions. A TransformerFactoryConfigurationError is parallel to the FactoryConfigurationError, and is thrown when a configuration problem with the TransformerFactory exists. This error will typically be thrown when the transformation factory class specified with the "javax.xml.transform.TransformerFactory" system property cannot be found or instantiated.

A TransformerConfigurationException may be thrown if for any reason a Transformer can not be created. A TransformerConfigurationException may be thrown if there is a syntax error in the transformation instructions, for example when TransformerFactory.newTransformer(javax.xml.transform.Source) is called.

TransformerException is a general exception that occurs during the course of a transformation. A transformer exception may wrap another exception, and if any of the TransformerException.printStackTrace() methods are called on it, it will produce a list of stack dumps, starting from the most recent. The transformer exception also provides a SourceLocator object which indicates where in the source tree or transformation instructions the error occurred. TransformerException.getMessageAndLocation() may be called to get an error message with location info, and TransformerException.getLocationAsString() may be called to get just the location string.

Transformation warnings and errors are sent to an ErrorListener, at which point the application may decide to report the error or warning, and may decide to throw an Exception for a non-fatal error. The ErrorListener may be set via TransformerFactory.setErrorListener(javax.xml.transform.ErrorListener) for reporting errors that have to do with syntax errors in the transformation instructions, or via Transformer.setErrorListener(javax.xml.transform.ErrorListener) to report errors that occur during the transformation. The ErrorListener on both objects will always be valid and non-null, whether set by the application or a default implementation provided by the processor. The default implementation provided by the processor will report all warnings and errors to System.err and does not throw any Exceptions. Applications are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors.

Resolution of URIs within a transformation

The API provides a way for URIs referenced from within the stylesheet instructions or within the transformation to be resolved by the calling application. This can be done by creating a class that implements the URIResolver interface, with its one method, URIResolver.resolve(java.lang.String, java.lang.String), and use this class to set the URI resolution for the transformation instructions or transformation with TransformerFactory.setURIResolver(javax.xml.transform.URIResolver) or Transformer.setURIResolver(javax.xml.transform.URIResolver). The URIResolver.resolve method takes two String arguments, the URI found in the stylesheet instructions or built as part of the transformation process, and the base URI against which the first argument will be made absolute if the absolute URI is required. The returned Source object must be usable by the transformer, as specified in its implemented features.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.transform

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.OutputKeys
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • javax.xml.transform.TransformerFactoryConfigurationError
      • java.lang.Exception
        • javax.xml.transform.TransformerException
          • javax.xml.transform.TransformerConfigurationException
    • javax.xml.transform.Transformer
    • javax.xml.transform.TransformerFactory

Interface Hierarchy

  • javax.xml.transform.ErrorListener
  • javax.xml.transform.Result
  • javax.xml.transform.Source
  • javax.xml.transform.SourceLocator
  • javax.xml.transform.Templates
  • javax.xml.transform.URIResolver
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.transform

  • Packages that use javax.xml.transform
    Package Description
    java.sql
    Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.stream
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.
    javax.xml.transform.stream
    This package implements stream- and URI- specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
  • Classes in javax.xml.transform used by java.sql
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.bind
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.bind.annotation
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.bind.helpers
    Class and Description
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.bind.util
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.soap
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.stream
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.transform
    Class and Description
    ErrorListener
    To provide customized error handling, implement this interface and use the setErrorListener method to register an instance of the implmentation with the Transformer.
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
    Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.
    Transformer
    An instance of this abstract class can transform a source tree into a result tree.
    TransformerConfigurationException
    Indicates a serious configuration error.
    TransformerException
    This class specifies an exceptional condition that occured during the transformation process.
    TransformerFactory
    A TransformerFactory instance can be used to create Transformer and Templates objects.
    TransformerFactoryConfigurationError
    Thrown when a problem with configuration with the Transformer Factories exists.
    URIResolver
    An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
  • Classes in javax.xml.transform used by javax.xml.transform.dom
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
  • Classes in javax.xml.transform used by javax.xml.transform.sax
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.
    Transformer
    An instance of this abstract class can transform a source tree into a result tree.
    TransformerConfigurationException
    Indicates a serious configuration error.
    TransformerFactory
    A TransformerFactory instance can be used to create Transformer and Templates objects.
  • Classes in javax.xml.transform used by javax.xml.transform.stax
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.transform.stream
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.validation
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.ws
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.ws.spi
    Class and Description
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
  • Classes in javax.xml.transform used by javax.xml.ws.wsaddressing
    Class and Description
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.OutputKeys

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.OutputKeys

No usage of javax.xml.transform.OutputKeys
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.Transformer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.Transformer

  • Packages that use Transformer
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of Transformer in javax.xml.transform

      Methods in javax.xml.transform that return Transformer
      Modifier and Type Method and Description
      Transformer Templates.newTransformer()
      Create a new transformation context for this Templates object.
      abstract Transformer TransformerFactory.newTransformer()
      Create a new Transformer that performs a copy of the Source to the Result.
      abstract Transformer TransformerFactory.newTransformer(Source source)
      Process the Source into a Transformer Object.

    • Uses of Transformer in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return Transformer
      Modifier and Type Method and Description
      Transformer TransformerHandler.getTransformer()
      Get the Transformer associated with this handler, which is needed in order to set parameters and output properties.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.TransformerConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.TransformerConfigurationException

  • Packages that use TransformerConfigurationException
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of TransformerConfigurationException in javax.xml.transform

      Methods in javax.xml.transform that throw TransformerConfigurationException
      Modifier and Type Method and Description
      abstract Source TransformerFactory.getAssociatedStylesheet(Source source, String media, String title, String charset)
      Get the stylesheet specification(s) associated with the XML Source document via the xml-stylesheet processing instruction that match the given criteria.
      abstract Templates TransformerFactory.newTemplates(Source source)
      Process the Source into a Templates object, which is a a compiled representation of the source.
      Transformer Templates.newTransformer()
      Create a new transformation context for this Templates object.
      abstract Transformer TransformerFactory.newTransformer()
      Create a new Transformer that performs a copy of the Source to the Result.
      abstract Transformer TransformerFactory.newTransformer(Source source)
      Process the Source into a Transformer Object.
      abstract void TransformerFactory.setFeature(String name, boolean value)
      Set a feature for this TransformerFactory and Transformers or Templates created by this factory.

    • Uses of TransformerConfigurationException in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that throw TransformerConfigurationException
      Modifier and Type Method and Description
      abstract TemplatesHandler SAXTransformerFactory.newTemplatesHandler()
      Get a TemplatesHandler object that can process SAX ContentHandler events into a Templates object.
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler()
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result.
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Source src)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument.
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Templates templates)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the Templates argument.
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Source src)
      Create an XMLFilter that uses the given Source as the transformation instructions.
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Templates templates)
      Create an XMLFilter, based on the Templates argument..
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.TransformerException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.TransformerException

  • Packages that use TransformerException
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

    • Uses of TransformerException in javax.xml.transform

      Subclasses of TransformerException in javax.xml.transform
      Modifier and Type Class and Description
      class  TransformerConfigurationException
      Indicates a serious configuration error.
      Methods in javax.xml.transform with parameters of type TransformerException
      Modifier and Type Method and Description
      void ErrorListener.error(TransformerException exception)
      Receive notification of a recoverable error.
      void ErrorListener.fatalError(TransformerException exception)
      Receive notification of a non-recoverable error.
      void ErrorListener.warning(TransformerException exception)
      Receive notification of a warning.
      Methods in javax.xml.transform that throw TransformerException
      Modifier and Type Method and Description
      void ErrorListener.error(TransformerException exception)
      Receive notification of a recoverable error.
      void ErrorListener.fatalError(TransformerException exception)
      Receive notification of a non-recoverable error.
      Source URIResolver.resolve(String href, String base)
      Called by the processor when it encounters an xsl:include, xsl:import, or document() function.
      abstract void Transformer.transform(Source xmlSource, Result outputTarget)
      Transform the XML Source to a Result.
      void ErrorListener.warning(TransformerException exception)
      Receive notification of a warning.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.TransformerFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.TransformerFactory

  • Packages that use TransformerFactory
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of TransformerFactory in javax.xml.transform

      Methods in javax.xml.transform that return TransformerFactory
      Modifier and Type Method and Description
      static TransformerFactory TransformerFactory.newInstance()
      Obtain a new instance of a TransformerFactory.
      static TransformerFactory TransformerFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a TransformerFactory from factory class name.

    • Uses of TransformerFactory in javax.xml.transform.sax

      Subclasses of TransformerFactory in javax.xml.transform.sax
      Modifier and Type Class and Description
      class  SAXTransformerFactory
      This class extends TransformerFactory to provide SAX-specific factory methods.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.TransformerFactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.TransformerFactoryConfigurationError

  • Packages that use TransformerFactoryConfigurationError
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

    • Uses of TransformerFactoryConfigurationError in javax.xml.transform

      Methods in javax.xml.transform that throw TransformerFactoryConfigurationError
      Modifier and Type Method and Description
      static TransformerFactory TransformerFactory.newInstance()
      Obtain a new instance of a TransformerFactory.
      static TransformerFactory TransformerFactory.newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a TransformerFactory from factory class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.ErrorListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.ErrorListener

  • Packages that use ErrorListener
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

    • Uses of ErrorListener in javax.xml.transform

      Methods in javax.xml.transform that return ErrorListener
      Modifier and Type Method and Description
      abstract ErrorListener Transformer.getErrorListener()
      Get the error event handler in effect for the transformation.
      abstract ErrorListener TransformerFactory.getErrorListener()
      Get the error event handler for the TransformerFactory.
      Methods in javax.xml.transform with parameters of type ErrorListener
      Modifier and Type Method and Description
      abstract void Transformer.setErrorListener(ErrorListener listener)
      Set the error event listener in effect for the transformation.
      abstract void TransformerFactory.setErrorListener(ErrorListener listener)
      Set the error event listener for the TransformerFactory, which is used for the processing of transformation instructions, and not for the transformation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.Result

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.Result

  • Packages that use Result
    Package Description
    java.sql
    Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.stream
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.
    javax.xml.transform.stream
    This package implements stream- and URI- specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of Result in java.sql

      Methods in java.sql with type parameters of type Result
      Modifier and Type Method and Description
      <T extends Result>
      T             		SQLXML.setResult(Class<T> resultClass)
      Returns a Result for setting the XML value designated by this SQLXML instance.

    • Uses of Result in javax.xml.bind

      Methods in javax.xml.bind that return Result
      Modifier and Type Method and Description
      abstract Result SchemaOutputResolver.createOutput(String namespaceUri, String suggestedFileName)
      Decides where the schema file (of the given namespace URI) will be written, and return it as a Result object.
      Methods in javax.xml.bind with parameters of type Result
      Modifier and Type Method and Description
      static void JAXB.marshal(Object jaxbObject, Result xml)
      Writes a Java object tree to XML and store it to the specified location.
      void Marshaller.marshal(Object jaxbElement, Result result)
      Marshal the content tree rooted at jaxbElement into the specified javax.xml.transform.Result.

    • Uses of Result in javax.xml.bind.annotation

      Classes in javax.xml.bind.annotation with type parameters of type Result
      Modifier and Type Interface and Description
      interface  DomHandler<ElementT,ResultT extends Result>
      Converts an element (and its descendants) from/to DOM (or similar) representation.

    • Uses of Result in javax.xml.bind.util

      Classes in javax.xml.bind.util that implement Result
      Modifier and Type Class and Description
      class  JAXBResult
      JAXP Result implementation that unmarshals a JAXB object.

    • Uses of Result in javax.xml.soap

      Classes in javax.xml.soap that implement Result
      Modifier and Type Class and Description
      class  SAAJResult
      Acts as a holder for the results of a JAXP transformation or a JAXB marshalling, in the form of a SAAJ tree.

    • Uses of Result in javax.xml.stream

      Methods in javax.xml.stream with parameters of type Result
      Modifier and Type Method and Description
      abstract XMLEventWriter XMLOutputFactory.createXMLEventWriter(Result result)
      Create a new XMLEventWriter that writes to a JAXP result.
      abstract XMLStreamWriter XMLOutputFactory.createXMLStreamWriter(Result result)
      Create a new XMLStreamWriter that writes to a JAXP result.

    • Uses of Result in javax.xml.transform

      Methods in javax.xml.transform with parameters of type Result
      Modifier and Type Method and Description
      abstract void Transformer.transform(Source xmlSource, Result outputTarget)
      Transform the XML Source to a Result.

    • Uses of Result in javax.xml.transform.dom

      Classes in javax.xml.transform.dom that implement Result
      Modifier and Type Class and Description
      class  DOMResult
      Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.

    • Uses of Result in javax.xml.transform.sax

      Classes in javax.xml.transform.sax that implement Result
      Modifier and Type Class and Description
      class  SAXResult
      Acts as an holder for a transformation Result.
      Methods in javax.xml.transform.sax with parameters of type Result
      Modifier and Type Method and Description
      void TransformerHandler.setResult(Result result)
      Set the Result associated with this TransformerHandler to be used for the transformation.

    • Uses of Result in javax.xml.transform.stax

      Classes in javax.xml.transform.stax that implement Result
      Modifier and Type Class and Description
      class  StAXResult
      Acts as a holder for an XML Result in the form of a StAX writer,i.e.

    • Uses of Result in javax.xml.transform.stream

      Classes in javax.xml.transform.stream that implement Result
      Modifier and Type Class and Description
      class  StreamResult
      Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.

    • Uses of Result in javax.xml.validation

      Methods in javax.xml.validation with parameters of type Result
      Modifier and Type Method and Description
      abstract void Validator.validate(Source source, Result result)
      Validates the specified input and send the augmented validation result to the specified output.

    • Uses of Result in javax.xml.ws

      Methods in javax.xml.ws with parameters of type Result
      Modifier and Type Method and Description
      abstract void EndpointReference.writeTo(Result result)
      write this EndpointReference to the specified infoset format

    • Uses of Result in javax.xml.ws.wsaddressing

      Methods in javax.xml.ws.wsaddressing with parameters of type Result
      Modifier and Type Method and Description
      void W3CEndpointReference.writeTo(Result result)
      write this EndpointReference to the specified infoset format
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.Source

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.Source

  • Packages that use Source
    Package Description
    java.sql
    Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.stream
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.transform.stax
    Provides for StAX-specific transformation APIs.
    javax.xml.transform.stream
    This package implements stream- and URI- specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of Source in java.sql

      Methods in java.sql with type parameters of type Source
      Modifier and Type Method and Description
      <T extends Source>
      T             		SQLXML.getSource(Class<T> sourceClass)
      Returns a Source for reading the XML value designated by this SQLXML instance.

    • Uses of Source in javax.xml.bind

      Methods in javax.xml.bind with parameters of type Source
      Modifier and Type Method and Description
      Object Unmarshaller.unmarshal(Source source)
      Unmarshal XML data from the specified XML Source and return the resulting content tree.
      static <T> T JAXB.unmarshal(Source xml, Class<T> type)
      Reads in a Java object tree from the given XML input.
      <T> JAXBElement<T> Unmarshaller.unmarshal(Source source, Class<T> declaredType)
      Unmarshal XML data from the specified XML Source by declaredType and return the resulting content tree.

    • Uses of Source in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return Source
      Modifier and Type | Method and Description
      Source DomHandler.marshal(ElementT n, ValidationEventHandler errorHandler)
      This method is called when a JAXB provider needs to marshal an element to XML.
      Source | W3CDomHandler.marshal(Element element, ValidationEventHandler errorHandler)

    • Uses of Source in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type Source
      Modifier and Type | Method and Description
      Object | AbstractUnmarshallerImpl.unmarshal(Source source)
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Source source, Class<T> expectedType)

    • Uses of Source in javax.xml.bind.util

      Classes in javax.xml.bind.util that implement Source
      Modifier and Type Class and Description
      class  JAXBSource
      JAXP Source implementation that marshals a JAXB-generated object.

    • Uses of Source in javax.xml.soap

      Methods in javax.xml.soap that return Source
      Modifier and Type Method and Description
      abstract Source SOAPPart.getContent()
      Returns the content of the SOAPEnvelope as a JAXP Source object.
      Methods in javax.xml.soap with parameters of type Source
      Modifier and Type Method and Description
      abstract void SOAPPart.setContent(Source source)
      Sets the content of the SOAPEnvelope object with the data from the given Source object.

    • Uses of Source in javax.xml.stream

      Methods in javax.xml.stream with parameters of type Source
      Modifier and Type Method and Description
      abstract XMLEventReader XMLInputFactory.createXMLEventReader(Source source)
      Create a new XMLEventReader from a JAXP source.
      abstract XMLStreamReader XMLInputFactory.createXMLStreamReader(Source source)
      Create a new XMLStreamReader from a JAXP source.

    • Uses of Source in javax.xml.transform

      Methods in javax.xml.transform that return Source
      Modifier and Type Method and Description
      abstract Source TransformerFactory.getAssociatedStylesheet(Source source, String media, String title, String charset)
      Get the stylesheet specification(s) associated with the XML Source document via the xml-stylesheet processing instruction that match the given criteria.
      Source URIResolver.resolve(String href, String base)
      Called by the processor when it encounters an xsl:include, xsl:import, or document() function.
      Methods in javax.xml.transform with parameters of type Source
      Modifier and Type Method and Description
      abstract Source TransformerFactory.getAssociatedStylesheet(Source source, String media, String title, String charset)
      Get the stylesheet specification(s) associated with the XML Source document via the xml-stylesheet processing instruction that match the given criteria.
      abstract Templates TransformerFactory.newTemplates(Source source)
      Process the Source into a Templates object, which is a a compiled representation of the source.
      abstract Transformer TransformerFactory.newTransformer(Source source)
      Process the Source into a Transformer Object.
      abstract void Transformer.transform(Source xmlSource, Result outputTarget)
      Transform the XML Source to a Result.

    • Uses of Source in javax.xml.transform.dom

      Classes in javax.xml.transform.dom that implement Source
      Modifier and Type Class and Description
      class  DOMSource
      Acts as a holder for a transformation Source tree in the form of a Document Object Model (DOM) tree.

    • Uses of Source in javax.xml.transform.sax

      Classes in javax.xml.transform.sax that implement Source
      Modifier and Type Class and Description
      class  SAXSource
      Acts as an holder for SAX-style Source.
      Methods in javax.xml.transform.sax with parameters of type Source
      Modifier and Type Method and Description
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Source src)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument.
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Source src)
      Create an XMLFilter that uses the given Source as the transformation instructions.
      static InputSource SAXSource.sourceToInputSource(Source source)
      Attempt to obtain a SAX InputSource object from a Source object.

    • Uses of Source in javax.xml.transform.stax

      Classes in javax.xml.transform.stax that implement Source
      Modifier and Type Class and Description
      class  StAXSource
      Acts as a holder for an XML Source in the form of a StAX reader,i.e.

    • Uses of Source in javax.xml.transform.stream

      Classes in javax.xml.transform.stream that implement Source
      Modifier and Type Class and Description
      class  StreamSource
      Acts as an holder for a transformation Source in the form of a stream of XML markup.

    • Uses of Source in javax.xml.validation

      Methods in javax.xml.validation with parameters of type Source
      Modifier and Type Method and Description
      Schema SchemaFactory.newSchema(Source schema)
      Parses the specified source as a schema and returns it as a schema.
      abstract Schema SchemaFactory.newSchema(Source[] schemas)
      Parses the specified source(s) as a schema and returns it as a schema.
      void Validator.validate(Source source)
      Validates the specified input.
      abstract void Validator.validate(Source source, Result result)
      Validates the specified input and send the augmented validation result to the specified output.

    • Uses of Source in javax.xml.ws

      Methods in javax.xml.ws that return Source
      Modifier and Type Method and Description
      Source LogicalMessage.getPayload()
      Gets the message payload as an XML source, may be called multiple times on the same LogicalMessage instance, always returns a new Source that may be used to retrieve the entire message payload.
      Methods in javax.xml.ws that return types with arguments of type Source
      Modifier and Type Method and Description
      abstract List<Source> Endpoint.getMetadata()
      Returns a list of metadata documents for the service.
      Methods in javax.xml.ws with parameters of type Source
      Modifier and Type Method and Description
      static EndpointReference EndpointReference.readFrom(Source eprInfoset)
      Factory method to read an EndpointReference from the infoset contained in eprInfoset.
      void LogicalMessage.setPayload(Source payload)
      Sets the message payload
      Method parameters in javax.xml.ws with type arguments of type Source
      Modifier and Type Method and Description
      abstract void Endpoint.setMetadata(List<Source> metadata)
      Sets the metadata for this endpoint.

    • Uses of Source in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type Source
      Modifier and Type Method and Description
      abstract EndpointReference Provider.readEndpointReference(Source eprInfoset)
      read an EndpointReference from the infoset contained in eprInfoset.

    • Uses of Source in javax.xml.ws.wsaddressing

      Constructors in javax.xml.ws.wsaddressing with parameters of type Source
      Constructor and Description
      W3CEndpointReference(Source source)
      Creates an EPR from infoset representation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.SourceLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.SourceLocator

  • Packages that use SourceLocator
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.

    • Uses of SourceLocator in javax.xml.transform

      Methods in javax.xml.transform that return SourceLocator
      Modifier and Type Method and Description
      SourceLocator TransformerException.getLocator()
      Method getLocator retrieves an instance of a SourceLocator object that specifies where an error occured.
      Methods in javax.xml.transform with parameters of type SourceLocator
      Modifier and Type Method and Description
      void TransformerException.setLocator(SourceLocator location)
      Method setLocator sets an instance of a SourceLocator object that specifies where an error occured.
      Constructors in javax.xml.transform with parameters of type SourceLocator
      Constructor and Description
      TransformerConfigurationException(String message, SourceLocator locator)
      Create a new TransformerConfigurationException from a message and a Locator.
      TransformerConfigurationException(String message, SourceLocator locator, Throwable e)
      Wrap an existing exception in a TransformerConfigurationException.
      TransformerException(String message, SourceLocator locator)
      Create a new TransformerException from a message and a Locator.
      TransformerException(String message, SourceLocator locator, Throwable e)
      Wrap an existing exception in a TransformerException.

    • Uses of SourceLocator in javax.xml.transform.dom

      Subinterfaces of SourceLocator in javax.xml.transform.dom
      Modifier and Type Interface and Description
      interface  DOMLocator
      Indicates the position of a node in a source DOM, intended primarily for error reporting.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.Templates

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.Templates

  • Packages that use Templates
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of Templates in javax.xml.transform

      Methods in javax.xml.transform that return Templates
      Modifier and Type Method and Description
      abstract Templates TransformerFactory.newTemplates(Source source)
      Process the Source into a Templates object, which is a a compiled representation of the source.

    • Uses of Templates in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return Templates
      Modifier and Type Method and Description
      Templates TemplatesHandler.getTemplates()
      When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.
      Methods in javax.xml.transform.sax with parameters of type Templates
      Modifier and Type Method and Description
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Templates templates)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the Templates argument.
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Templates templates)
      Create an XMLFilter, based on the Templates argument..
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.URIResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.URIResolver

  • Packages that use URIResolver
    Package Description
    javax.xml.transform
    This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

    • Uses of URIResolver in javax.xml.transform

      Methods in javax.xml.transform that return URIResolver
      Modifier and Type Method and Description
      abstract URIResolver Transformer.getURIResolver()
      Get an object that will be used to resolve URIs used in document().
      abstract URIResolver TransformerFactory.getURIResolver()
      Get the object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.
      Methods in javax.xml.transform with parameters of type URIResolver
      Modifier and Type Method and Description
      abstract void Transformer.setURIResolver(URIResolver resolver)
      Set an object that will be used to resolve URIs used in document().
      abstract void TransformerFactory.setURIResolver(URIResolver resolver)
      Set an object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.transform.dom

This package implements DOM-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    DOMLocator
    Indicates the position of a node in a source DOM, intended primarily for error reporting.
  • Class Summary
    Class Description
    DOMResult
    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
    DOMSource
    Acts as a holder for a transformation Source tree in the form of a Document Object Model (DOM) tree.

Package javax.xml.transform.dom Description

This package implements DOM-specific transformation APIs.

The DOMSource class allows the client of the implementation of this API to specify a DOM Node as the source of the input tree. The model of how the Transformer deals with the DOM tree in terms of mismatches with the XSLT data model or other data models is beyond the scope of this document. Any of the nodes derived from Node are legal input.

The DOMResult class allows a Node to be specified to which result DOM nodes will be appended. If an output node is not specified, the transformer will use DocumentBuilder.newDocument() to create an output Document node. If a node is specified, it should be one of the following: Document, Element, or DocumentFragment. Specification of any other node type is implementation dependent and undefined by this API. If the result is a Document, the output of the transformation must have a single element root to set as the document element.

The DOMLocator node may be passed to TransformerException objects, and retrieved by trying to cast the result of the TransformerException.getLocator() method. The implementation has no responsibility to use a DOMLocator instead of a SourceLocator (though line numbers and the like do not make much sense for a DOM), so the result of getLocator must always be tested with an instanceof.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.dom Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.transform.dom

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.dom.DOMResult (implements javax.xml.transform.Result)
    • javax.xml.transform.dom.DOMSource (implements javax.xml.transform.Source)

Interface Hierarchy

  • javax.xml.transform.SourceLocator
    • javax.xml.transform.dom.DOMLocator
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.transform.dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.transform.dom

  • Packages that use javax.xml.transform.dom
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
  • Classes in javax.xml.transform.dom used by javax.xml.bind.annotation
    Class and Description
    DOMResult
    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
  • Classes in javax.xml.transform.dom used by javax.xml.soap
    Class and Description
    DOMResult
    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.dom.DOMResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.dom.DOMResult

  • Packages that use DOMResult
    Package Description
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.

    • Uses of DOMResult in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return DOMResult
      Modifier and Type | Method and Description
      DOMResult | W3CDomHandler.createUnmarshaller(ValidationEventHandler errorHandler)
      Methods in javax.xml.bind.annotation with parameters of type DOMResult
      Modifier and Type | Method and Description
      Element | W3CDomHandler.getElement(DOMResult r)

    • Uses of DOMResult in javax.xml.soap

      Subclasses of DOMResult in javax.xml.soap
      Modifier and Type Class and Description
      class  SAAJResult
      Acts as a holder for the results of a JAXP transformation or a JAXB marshalling, in the form of a SAAJ tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.dom.DOMSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.dom.DOMSource

No usage of javax.xml.transform.dom.DOMSource
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.dom.DOMLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.dom.DOMLocator

No usage of javax.xml.transform.dom.DOMLocator
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.dom

Interface DOMLocator

  • All Superinterfaces:
    SourceLocator

    public interface DOMLocator
extends SourceLocator
    Indicates the position of a node in a source DOM, intended primarily for error reporting. To use a DOMLocator, the receiver of an error must downcast the SourceLocator object returned by an exception. A Transformer may use this object for purposes other than error reporting, for instance, to indicate the source node that originated a result node.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Node getOriginatingNode()
      Return the node where the event occurred.

      • Methods inherited from interface javax.xml.transform.SourceLocator

        getColumnNumber, getLineNumber, getPublicId, getSystemId

    • Method Detail

      • getOriginatingNode

        Node getOriginatingNode()
        Return the node where the event occurred.
        Returns:
        The node that is the location for the event.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.dom

Class DOMResult

  • java.lang.Object
    • javax.xml.transform.dom.DOMResult
  • All Implemented Interfaces:
    Result
    Direct Known Subclasses:
    SAAJResult

    public class DOMResult
extends Object
implements Result

    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.

    If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation, which may be retrieved with getNode().

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMResult()
      Zero-argument default constructor.
      DOMResult(Node node)
      Use a DOM node to create a new output target.
      DOMResult(Node node, Node nextSibling)
      Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.
      DOMResult(Node node, Node nextSibling, String systemId)
      Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and the specified System ID.
      DOMResult(Node node, String systemId)
      Use a DOM node to create a new output target with the specified System ID.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getNextSibling()
      Get the child node before which the result nodes will be inserted.
      Node getNode()
      Get the node that will contain the result DOM tree.
      String getSystemId()
      Get the System Identifier.
      void setNextSibling(Node nextSibling)
      Set the child node before which the result nodes will be inserted.
      void setNode(Node node)
      Set the node that will contain the result DOM tree.
      void setSystemId(String systemId)
      Set the systemId that may be used in association with the node.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE

        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

        See Also:
        Constant Field Values

    • Constructor Detail

      • DOMResult

        public DOMResult()

        Zero-argument default constructor.

        node, siblingNode and systemId will be set to null.

      • DOMResult

        public DOMResult(Node node)

        Use a DOM node to create a new output target.

        In practice, the node should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

        siblingNode and systemId will be set to null.

        Parameters:
        node - The DOM node that will contain the result tree.

      • DOMResult

        public DOMResult(Node node,
                 String systemId)

        Use a DOM node to create a new output target with the specified System ID.

        In practice, the node should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

        siblingNode will be set to null.

        Parameters:
        node - The DOM node that will contain the result tree.
        systemId - The system identifier which may be used in association with this node.

      • DOMResult

        public DOMResult(Node node,
                 Node nextSibling)

        Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.

        In practice, node and nextSibling should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

        Use nextSibling to specify the child node where the result nodes should be inserted before. If nextSibling is not a sibling of node, then an IllegalArgumentException is thrown. If node is null and nextSibling is not null, then an IllegalArgumentException is thrown. If nextSibling is null, then the behavior is the same as calling DOMResult(Node node), i.e. append the result nodes as the last child of the specified node.

        systemId will be set to null.

        Parameters:
        node - The DOM node that will contain the result tree.
        nextSibling - The child node where the result nodes should be inserted before.
        Throws:
        IllegalArgumentException - If nextSibling is not a sibling of node or node is null and nextSibling is not null.
        Since:
        1.5

      • DOMResult

        public DOMResult(Node node,
                 Node nextSibling,
                 String systemId)

        Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and the specified System ID.

        In practice, node and nextSibling should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

        Use nextSibling to specify the child node where the result nodes should be inserted before. If nextSibling is not a sibling of node, then an IllegalArgumentException is thrown. If node is null and nextSibling is not null, then an IllegalArgumentException is thrown. If nextSibling is null, then the behavior is the same as calling DOMResult(Node node, String systemId), i.e. append the result nodes as the last child of the specified node and use the specified System ID.

        Parameters:
        node - The DOM node that will contain the result tree.
        nextSibling - The child node where the result nodes should be inserted before.
        systemId - The system identifier which may be used in association with this node.
        Throws:
        IllegalArgumentException - If nextSibling is not a sibling of node or node is null and nextSibling is not null.
        Since:
        1.5

    • Method Detail

      • setNode

        public void setNode(Node node)

        Set the node that will contain the result DOM tree.

        In practice, the node should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

        An IllegalStateException is thrown if nextSibling is not null and node is not a parent of nextSibling. An IllegalStateException is thrown if node is null and nextSibling is not null.

        Parameters:
        node - The node to which the transformation will be appended.
        Throws:
        IllegalStateException - If nextSibling is not null and nextSibling is not a child of node or node is null and nextSibling is not null.

      • getNode

        public Node getNode()

        Get the node that will contain the result DOM tree.

        If no node was set via DOMResult(Node node), DOMResult(Node node, String systeId), DOMResult(Node node, Node nextSibling), DOMResult(Node node, Node nextSibling, String systemId) or setNode(Node node), then the node will be set by the transformation, and may be obtained from this method once the transformation is complete. Calling this method before the transformation will return null.

        Returns:
        The node to which the transformation will be appended.

      • setNextSibling

        public void setNextSibling(Node nextSibling)

        Set the child node before which the result nodes will be inserted.

        Use nextSibling to specify the child node before which the result nodes should be inserted. If nextSibling is not a descendant of node, then an IllegalArgumentException is thrown. If node is null and nextSibling is not null, then an IllegalStateException is thrown. If nextSibling is null, then the behavior is the same as calling DOMResult(Node node), i.e. append the result nodes as the last child of the specified node.

        Parameters:
        nextSibling - The child node before which the result nodes will be inserted.
        Throws:
        IllegalArgumentException - If nextSibling is not a descendant of node.
        IllegalStateException - If node is null and nextSibling is not null.
        Since:
        1.5

      • getNextSibling

        public Node getNextSibling()

        Get the child node before which the result nodes will be inserted.

        If no node was set via DOMResult(Node node, Node nextSibling), DOMResult(Node node, Node nextSibling, String systemId) or setNextSibling(Node nextSibling), then null will be returned.

        Returns:
        The child node before which the result nodes will be inserted.
        Since:
        1.5

      • setSystemId

        public void setSystemId(String systemId)

        Set the systemId that may be used in association with the node.

        Specified by:
        setSystemId in interface Result
        Parameters:
        systemId - The system identifier as a URI string.

      • getSystemId

        public String getSystemId()

        Get the System Identifier.

        If no System ID was set via DOMResult(Node node, String systemId), DOMResult(Node node, Node nextSibling, String systemId) or setSystemId(String systemId), then null will be returned.

        Specified by:
        getSystemId in interface Result
        Returns:
        The system identifier.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.dom

Class DOMSource

  • java.lang.Object
    • javax.xml.transform.dom.DOMSource
  • All Implemented Interfaces:
    Source

    public class DOMSource
extends Object
implements Source

    Acts as a holder for a transformation Source tree in the form of a Document Object Model (DOM) tree.

    Note that XSLT requires namespace support. Attempting to transform a DOM that was not contructed with a namespace-aware parser may result in errors. Parsers can be made namespace aware by calling DocumentBuilderFactory.setNamespaceAware(boolean awareness).

    See Also:
    Document Object Model (DOM) Level 2 Specification

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMSource()
      Zero-argument default constructor.
      DOMSource(Node n)
      Create a new input source with a DOM node.
      DOMSource(Node node, String systemID)
      Create a new input source with a DOM node, and with the system ID also passed in as the base URI.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Node getNode()
      Get the node that represents a Source DOM tree.
      String getSystemId()
      Get the base ID (URL or system ID) from where URLs will be resolved.
      void setNode(Node node)
      Set the node that will represents a Source DOM tree.
      void setSystemId(String systemID)
      Set the base ID (URL or system ID) from where URLs will be resolved.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • DOMSource

        public DOMSource()

        Zero-argument default constructor. If this constructor is used, and no DOM source is set using setNode(Node node) , then the Transformer will create an empty source Document using DocumentBuilder.newDocument().

        See Also:
        Transformer.transform(Source xmlSource, Result outputTarget)

      • DOMSource

        public DOMSource(Node n)
        Create a new input source with a DOM node. The operation will be applied to the subtree rooted at this node. In XSLT, a "/" pattern still means the root of the tree (not the subtree), and the evaluation of global variables and parameters is done from the root node also.
        Parameters:
        n - The DOM node that will contain the Source tree.

      • DOMSource

        public DOMSource(Node node,
                 String systemID)
        Create a new input source with a DOM node, and with the system ID also passed in as the base URI.
        Parameters:
        node - The DOM node that will contain the Source tree.
        systemID - Specifies the base URI associated with node.

    • Method Detail

      • setNode

        public void setNode(Node node)
        Set the node that will represents a Source DOM tree.
        Parameters:
        node - The node that is to be transformed.

      • getNode

        public Node getNode()
        Get the node that represents a Source DOM tree.
        Returns:
        The node that is to be transformed.

      • setSystemId

        public void setSystemId(String systemID)
        Set the base ID (URL or system ID) from where URLs will be resolved.
        Specified by:
        setSystemId in interface Source
        Parameters:
        systemID - Base URL for this DOM tree.

      • getSystemId

        public String getSystemId()
        Get the base ID (URL or system ID) from where URLs will be resolved.
        Specified by:
        getSystemId in interface Source
        Returns:
        Base URL for this DOM tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ErrorListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface ErrorListener

  • public interface ErrorListener

    To provide customized error handling, implement this interface and use the setErrorListener method to register an instance of the implmentation with the Transformer. The Transformer then reports all errors and warnings through this interface.

    If an application does not register its own custom ErrorListener, the default ErrorListener is used which reports all warnings and errors to System.err and does not throw any Exceptions. Applications are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors.

    For transformation errors, a Transformer must use this interface instead of throwing an Exception: it is up to the application to decide whether to throw an Exception for different types of errors and warnings. Note however that the Transformer is not required to continue with the transformation after a call to fatalError(TransformerException exception).

    Transformers may use this mechanism to report XML parsing errors as well as transformation errors.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void error(TransformerException exception)
      Receive notification of a recoverable error.
      void fatalError(TransformerException exception)
      Receive notification of a non-recoverable error.
      void warning(TransformerException exception)
      Receive notification of a warning.

    • Method Detail

      • warning

        void warning(TransformerException exception)
      throws TransformerException
        Receive notification of a warning.

        Transformer can use this method to report conditions that are not errors or fatal errors. The default behaviour is to take no action.

        After invoking this method, the Transformer must continue with the transformation. It should still be possible for the application to process the document through to the end.

        Parameters:
        exception - The warning information encapsulated in a transformer exception.
        Throws:
        TransformerException - if the application chooses to discontinue the transformation.
        See Also:
        TransformerException

      • error

        void error(TransformerException exception)
    throws TransformerException
        Receive notification of a recoverable error.

        The transformer must continue to try and provide normal transformation after invoking this method. It should still be possible for the application to process the document through to the end if no other errors are encountered.

        Parameters:
        exception - The error information encapsulated in a transformer exception.
        Throws:
        TransformerException - if the application chooses to discontinue the transformation.
        See Also:
        TransformerException

      • fatalError

        void fatalError(TransformerException exception)
         throws TransformerException

        Receive notification of a non-recoverable error.

        The processor may choose to continue, but will not normally proceed to a successful completion.

        The method should throw an exception if it is unable to process the error, or if it wishes execution to terminate immediately. The processor will not necessarily honor this request.

        Parameters:
        exception - The error information encapsulated in a TransformerException.
        Throws:
        TransformerException - if the application chooses to discontinue the transformation.
        See Also:
        TransformerException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OutputKeys

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class OutputKeys

  • java.lang.Object
    • javax.xml.transform.OutputKeys

  • public class OutputKeys
extends Object
    Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or Templates object.

    All the fields in this class are read-only.

    See Also:
    section 16 of the XSL Transformations (XSLT) W3C Recommendation

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String CDATA_SECTION_ELEMENTS
      cdata-section-elements = expanded names.
      static String DOCTYPE_PUBLIC
      doctype-public = string.
      static String DOCTYPE_SYSTEM
      doctype-system = string.
      static String ENCODING
      encoding = string.
      static String INDENT
      indent = "yes" | "no".
      static String MEDIA_TYPE
      media-type = string.
      static String METHOD
      method = "xml" | "html" | "text" | expanded name.
      static String OMIT_XML_DECLARATION
      omit-xml-declaration = "yes" | "no".
      static String STANDALONE
      standalone = "yes" | "no".
      static String VERSION
      version = nmtoken.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • METHOD

        public static final String METHOD
        method = "xml" | "html" | "text" | expanded name.

        The value of the method property identifies the overall method that should be used for outputting the result tree. Other non-namespaced values may be used, such as "xhtml", but, if accepted, the handling of such values is implementation defined. If any of the method values are not accepted and are not namespace qualified, then Transformer.setOutputProperty(java.lang.String, java.lang.String) or Transformer.setOutputProperties(java.util.Properties) will throw a IllegalArgumentException.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • VERSION

        public static final String VERSION
        version = nmtoken.

        version specifies the version of the output method.

        When the output method is "xml", the version value specifies the version of XML to be used for outputting the result tree. The default value for the xml output method is 1.0. When the output method is "html", the version value indicates the version of the HTML. The default value for the xml output method is 4.0, which specifies that the result should be output as HTML conforming to the HTML 4.0 Recommendation [HTML]. If the output method is "text", the version property is ignored.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • ENCODING

        public static final String ENCODING
        encoding = string.

        encoding specifies the preferred character encoding that the Transformer should use to encode sequences of characters as sequences of bytes. The value of the encoding property should be treated case-insensitively. The value must only contain characters in the range #x21 to #x7E (i.e., printable ASCII characters). The value should either be a charset registered with the Internet Assigned Numbers Authority [IANA], [RFC2278] or start with X-.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • OMIT_XML_DECLARATION

        public static final String OMIT_XML_DECLARATION
        omit-xml-declaration = "yes" | "no".

        omit-xml-declaration specifies whether the XSLT processor should output an XML declaration; the value must be yes or no.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • STANDALONE

        public static final String STANDALONE
        standalone = "yes" | "no".

        standalone specifies whether the Transformer should output a standalone document declaration; the value must be yes or no.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • DOCTYPE_PUBLIC

        public static final String DOCTYPE_PUBLIC
        doctype-public = string.

        See the documentation for the DOCTYPE_SYSTEM property for a description of what the value of the key should be.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • DOCTYPE_SYSTEM

        public static final String DOCTYPE_SYSTEM
        doctype-system = string.

        doctype-system specifies the system identifier to be used in the document type declaration.

        If the doctype-system property is specified, the xml output method should output a document type declaration immediately before the first element. The name following <!DOCTYPE should be the name of the first element. If doctype-public property is also specified, then the xml output method should output PUBLIC followed by the public identifier and then the system identifier; otherwise, it should output SYSTEM followed by the system identifier. The internal subset should be empty. The value of the doctype-public property should be ignored unless the doctype-system property is specified.

        If the doctype-public or doctype-system properties are specified, then the html output method should output a document type declaration immediately before the first element. The name following <!DOCTYPE should be HTML or html. If the doctype-public property is specified, then the output method should output PUBLIC followed by the specified public identifier; if the doctype-system property is also specified, it should also output the specified system identifier following the public identifier. If the doctype-system property is specified but the doctype-public property is not specified, then the output method should output SYSTEM followed by the specified system identifier.

        doctype-system specifies the system identifier to be used in the document type declaration.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • CDATA_SECTION_ELEMENTS

        public static final String CDATA_SECTION_ELEMENTS
        cdata-section-elements = expanded names.

        cdata-section-elements specifies a whitespace delimited list of the names of elements whose text node children should be output using CDATA sections. Note that these names must use the format described in the section Qualfied Name Representation in javax.xml.transform.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation., Constant Field Values

      • INDENT

        public static final String INDENT
        indent = "yes" | "no".

        indent specifies whether the Transformer may add additional whitespace when outputting the result tree; the value must be yes or no.

        See Also:
        section 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values

      • MEDIA_TYPE

        public static final String MEDIA_TYPE
        media-type = string.

        media-type specifies the media type (MIME content type) of the data that results from outputting the result tree. The charset parameter should not be specified explicitly; instead, when the top-level media type is text, a charset parameter should be added according to the character encoding actually used by the output method.

        See Also:
        s ection 16 of the XSL Transformations (XSLT) W3C Recommendation, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Result

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface Result

  • All Known Implementing Classes:
    DOMResult, JAXBResult, SAAJResult, SAXResult, StAXResult, StreamResult

    public interface Result

    An object that implements this interface contains the information needed to build a transformation result tree.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String PI_DISABLE_OUTPUT_ESCAPING
      The name of the processing instruction that is sent if the result tree disables output escaping.
      static String PI_ENABLE_OUTPUT_ESCAPING
      The name of the processing instruction that is sent if the result tree enables output escaping at some point after having received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setSystemId(String systemId)
      Set the system identifier for this Result.

    • Field Detail

      • PI_DISABLE_OUTPUT_ESCAPING

        static final String PI_DISABLE_OUTPUT_ESCAPING
        The name of the processing instruction that is sent if the result tree disables output escaping.

        Normally, result tree serialization escapes & and < (and possibly other characters) when outputting text nodes. This ensures that the output is well-formed XML. However, it is sometimes convenient to be able to produce output that is almost, but not quite well-formed XML; for example, the output may include ill-formed sections that will be transformed into well-formed XML by a subsequent non-XML aware process. If a processing instruction is sent with this name, serialization should be output without any escaping.

        Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.

        See Also:
        disable-output-escaping in XSLT Specification, Constant Field Values

      • PI_ENABLE_OUTPUT_ESCAPING

        static final String PI_ENABLE_OUTPUT_ESCAPING
        The name of the processing instruction that is sent if the result tree enables output escaping at some point after having received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
        See Also:
        disable-output-escaping in XSLT Specification, Constant Field Values

    • Method Detail

      • setSystemId

        void setSystemId(String systemId)
        Set the system identifier for this Result.

        If the Result is not to be written to a file, the system identifier is optional. The application may still want to provide one, however, for use in error messages and warnings, or to resolve relative output identifiers.

        Parameters:
        systemId - The system identifier as a URI string.

      • getSystemId

        String getSystemId()
        Get the system identifier that was set with setSystemId.
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.transform.sax

This package implements SAX2-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    TemplatesHandler
    A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
    TransformerHandler
    A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
  • Class Summary
    Class Description
    SAXResult
    Acts as an holder for a transformation Result.
    SAXSource
    Acts as an holder for SAX-style Source.
    SAXTransformerFactory
    This class extends TransformerFactory to provide SAX-specific factory methods.

Package javax.xml.transform.sax Description

This package implements SAX2-specific transformation APIs. It provides classes which allow input from ContentHandler events, and also classes that produce org.xml.sax.ContentHandler events. It also provides methods to set the input source as an XMLReader, or to use a InputSource as the source. It also allows the creation of a XMLFilter, which enables transformations to "pull" from other transformations, and lets the transformer to be used polymorphically as an XMLReader.

The SAXSource class allows the setting of an XMLReader to be used for "pulling" parse events, and an InputSource that may be used to specify the SAX source.

The SAXResult class allows the setting of a ContentHandler to be the receiver of SAX2 events from the transformation.

The SAXTransformerFactory extends TransformerFactory to provide factory methods for creating TemplatesHandler, TransformerHandler, and XMLReader instances.

To obtain a SAXTransformerFactory, the caller must cast the TransformerFactory instance returned from TransformerFactory.newInstance().

The TransformerHandler interface allows a transformation to be created from SAX2 parse events, which is a "push" model rather than the "pull" model that normally occurs for a transformation. Normal parse events are received through the ContentHandler interface, lexical events such as startCDATA and endCDATA are received through the LexicalHandler interface, and events that signal the start or end of disabling output escaping are received via ContentHandler.processingInstruction(java.lang.String, java.lang.String), with the target parameter being Result.PI_DISABLE_OUTPUT_ESCAPING and Result.PI_ENABLE_OUTPUT_ESCAPING. If parameters, output properties, or other features need to be set on the Transformer handler, a Transformer reference will need to be obtained from TransformerHandler.getTransformer(), and the methods invoked from that reference.

The TemplatesHandler interface allows the creation of Templates objects from SAX2 parse events. Once the ContentHandler events are complete, the Templates object may be obtained from TemplatesHandler.getTemplates(). Note that TemplatesHandler.setSystemId(java.lang.String) should normally be called in order to establish a base system ID from which relative URLs may be resolved.

The SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source) method allows the creation of a XMLFilter, which encapsulates the SAX2 notion of a "pull" transformation. The following illustrates several transformations chained together. Each filter points to a parent XMLReader, and the final transformation is caused by invoking XMLReader.parse(org.xml.sax.InputSource) on the final reader in the chain.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.sax Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.transform.sax

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.sax.SAXResult (implements javax.xml.transform.Result)
    • javax.xml.transform.sax.SAXSource (implements javax.xml.transform.Source)
    • javax.xml.transform.TransformerFactory
      • javax.xml.transform.sax.SAXTransformerFactory

Interface Hierarchy

  • org.xml.sax.ContentHandler
    • javax.xml.transform.sax.TemplatesHandler
    • javax.xml.transform.sax.TransformerHandler (also extends org.xml.sax.DTDHandler, org.xml.sax.ext.LexicalHandler)
  • org.xml.sax.DTDHandler
    • javax.xml.transform.sax.TransformerHandler (also extends org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler)
  • org.xml.sax.ext.LexicalHandler
    • javax.xml.transform.sax.TransformerHandler (also extends org.xml.sax.ContentHandler, org.xml.sax.DTDHandler)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.transform.sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.transform.sax

  • Packages that use javax.xml.transform.sax
    Package Description
    javax.xml.bind.util
    Useful client utility classes.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
  • Classes in javax.xml.transform.sax used by javax.xml.bind.util
    Class and Description
    SAXResult
    Acts as an holder for a transformation Result.
    SAXSource
    Acts as an holder for SAX-style Source.
  • Classes in javax.xml.transform.sax used by javax.xml.transform.sax
    Class and Description
    TemplatesHandler
    A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
    TransformerHandler
    A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.sax.SAXResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.sax.SAXResult

  • Packages that use SAXResult
    Package Description
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of SAXResult in javax.xml.bind.util

      Subclasses of SAXResult in javax.xml.bind.util
      Modifier and Type Class and Description
      class  JAXBResult
      JAXP Result implementation that unmarshals a JAXB object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.sax.SAXSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.sax.SAXSource

  • Packages that use SAXSource
    Package Description
    javax.xml.bind.util
    Useful client utility classes.

    • Uses of SAXSource in javax.xml.bind.util

      Subclasses of SAXSource in javax.xml.bind.util
      Modifier and Type Class and Description
      class  JAXBSource
      JAXP Source implementation that marshals a JAXB-generated object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.sax.SAXTransformerFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.sax.SAXTransformerFactory

No usage of javax.xml.transform.sax.SAXTransformerFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.sax.TemplatesHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.sax.TemplatesHandler

  • Packages that use TemplatesHandler
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of TemplatesHandler in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return TemplatesHandler
      Modifier and Type Method and Description
      abstract TemplatesHandler SAXTransformerFactory.newTemplatesHandler()
      Get a TemplatesHandler object that can process SAX ContentHandler events into a Templates object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.transform.sax.TransformerHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.transform.sax.TransformerHandler

  • Packages that use TransformerHandler
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.

    • Uses of TransformerHandler in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return TransformerHandler
      Modifier and Type Method and Description
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler()
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result.
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Source src)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument.
      abstract TransformerHandler SAXTransformerFactory.newTransformerHandler(Templates templates)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the Templates argument.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.sax

Class SAXResult

  • java.lang.Object
    • javax.xml.transform.sax.SAXResult
  • All Implemented Interfaces:
    Result
    Direct Known Subclasses:
    JAXBResult

    public class SAXResult
extends Object
implements Result

    Acts as an holder for a transformation Result.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXResult()
      Zero-argument default constructor.
      SAXResult(ContentHandler handler)
      Create a SAXResult that targets a SAX2 ContentHandler.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      ContentHandler getHandler()
      Get the ContentHandler that is the Result.
      LexicalHandler getLexicalHandler()
      Get a SAX2 LexicalHandler for the output.
      String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setHandler(ContentHandler handler)
      Set the target to be a SAX2 ContentHandler.
      void setLexicalHandler(LexicalHandler handler)
      Set the SAX2 LexicalHandler for the output.
      void setSystemId(String systemId)
      Method setSystemId Set the systemID that may be used in association with the ContentHandler.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • SAXResult

        public SAXResult()
        Zero-argument default constructor.

      • SAXResult

        public SAXResult(ContentHandler handler)
        Create a SAXResult that targets a SAX2 ContentHandler.
        Parameters:
        handler - Must be a non-null ContentHandler reference.

    • Method Detail

      • setHandler

        public void setHandler(ContentHandler handler)
        Set the target to be a SAX2 ContentHandler.
        Parameters:
        handler - Must be a non-null ContentHandler reference.

      • getHandler

        public ContentHandler getHandler()
        Get the ContentHandler that is the Result.
        Returns:
        The ContentHandler that is to be transformation output.

      • setLexicalHandler

        public void setLexicalHandler(LexicalHandler handler)
        Set the SAX2 LexicalHandler for the output.

        This is needed to handle XML comments and the like. If the lexical handler is not set, an attempt should be made by the transformer to cast the ContentHandler to a LexicalHandler.

        Parameters:
        handler - A non-null LexicalHandler for handling lexical parse events.

      • getLexicalHandler

        public LexicalHandler getLexicalHandler()
        Get a SAX2 LexicalHandler for the output.
        Returns:
        A LexicalHandler, or null.

      • setSystemId

        public void setSystemId(String systemId)
        Method setSystemId Set the systemID that may be used in association with the ContentHandler.
        Specified by:
        setSystemId in interface Result
        Parameters:
        systemId - The system identifier as a URI string.

      • getSystemId

        public String getSystemId()
        Get the system identifier that was set with setSystemId.
        Specified by:
        getSystemId in interface Result
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.sax

Class SAXSource

  • java.lang.Object
    • javax.xml.transform.sax.SAXSource
  • All Implemented Interfaces:
    Source
    Direct Known Subclasses:
    JAXBSource

    public class SAXSource
extends Object
implements Source

    Acts as an holder for SAX-style Source.

    Note that XSLT requires namespace support. Attempting to transform an input source that is not generated with a namespace-aware parser may result in errors. Parsers can be made namespace aware by calling the SAXParserFactory.setNamespaceAware(boolean awareness) method.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXSource()
      Zero-argument default constructor.
      SAXSource(InputSource inputSource)
      Create a SAXSource, using a SAX InputSource.
      SAXSource(XMLReader reader, InputSource inputSource)
      Create a SAXSource, using an XMLReader and a SAX InputSource.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      InputSource getInputSource()
      Get the SAX InputSource to be used for the Source.
      String getSystemId()
      Get the base ID (URI or system ID) from where URIs will be resolved.
      XMLReader getXMLReader()
      Get the XMLReader to be used for the Source.
      void setInputSource(InputSource inputSource)
      Set the SAX InputSource to be used for the Source.
      void setSystemId(String systemId)
      Set the system identifier for this Source.
      void setXMLReader(XMLReader reader)
      Set the XMLReader to be used for the Source.
      static InputSource sourceToInputSource(Source source)
      Attempt to obtain a SAX InputSource object from a Source object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • SAXSource

        public SAXSource()

        Zero-argument default constructor. If this constructor is used, and no SAX source is set using setInputSource(InputSource inputSource) , then the Transformer will create an empty source InputSource using new InputSource().

        See Also:
        Transformer.transform(Source xmlSource, Result outputTarget)

      • SAXSource

        public SAXSource(XMLReader reader,
                 InputSource inputSource)
        Create a SAXSource, using an XMLReader and a SAX InputSource. The Transformer or SAXTransformerFactory will set itself to be the reader's ContentHandler, and then will call reader.parse(inputSource).
        Parameters:
        reader - An XMLReader to be used for the parse.
        inputSource - A SAX input source reference that must be non-null and that will be passed to the reader parse method.

      • SAXSource

        public SAXSource(InputSource inputSource)
        Create a SAXSource, using a SAX InputSource. The Transformer or SAXTransformerFactory creates a reader via XMLReaderFactory (if setXMLReader is not used), sets itself as the reader's ContentHandler, and calls reader.parse(inputSource).
        Parameters:
        inputSource - An input source reference that must be non-null and that will be passed to the parse method of the reader.

    • Method Detail

      • setXMLReader

        public void setXMLReader(XMLReader reader)
        Set the XMLReader to be used for the Source.
        Parameters:
        reader - A valid XMLReader or XMLFilter reference.

      • getXMLReader

        public XMLReader getXMLReader()
        Get the XMLReader to be used for the Source.
        Returns:
        A valid XMLReader or XMLFilter reference, or null.

      • setInputSource

        public void setInputSource(InputSource inputSource)
        Set the SAX InputSource to be used for the Source.
        Parameters:
        inputSource - A valid InputSource reference.

      • getInputSource

        public InputSource getInputSource()
        Get the SAX InputSource to be used for the Source.
        Returns:
        A valid InputSource reference, or null.

      • setSystemId

        public void setSystemId(String systemId)
        Set the system identifier for this Source. If an input source has already been set, it will set the system ID or that input source, otherwise it will create a new input source.

        The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if no byte stream or character stream is specified).

        Specified by:
        setSystemId in interface Source
        Parameters:
        systemId - The system identifier as a URI string.

      • getSystemId

        public String getSystemId()

        Get the base ID (URI or system ID) from where URIs will be resolved.

        Specified by:
        getSystemId in interface Source
        Returns:
        Base URL for the Source, or null.

      • sourceToInputSource

        public static InputSource sourceToInputSource(Source source)
        Attempt to obtain a SAX InputSource object from a Source object.
        Parameters:
        source - Must be a non-null Source reference.
        Returns:
        An InputSource, or null if Source can not be converted.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXTransformerFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.sax

Class SAXTransformerFactory

  • java.lang.Object
    • javax.xml.transform.TransformerFactory
      • javax.xml.transform.sax.SAXTransformerFactory

  • public abstract class SAXTransformerFactory
extends TransformerFactory
    This class extends TransformerFactory to provide SAX-specific factory methods. It provides two types of ContentHandlers, one for creating Transformers, the other for creating Templates objects.

    If an application wants to set the ErrorHandler or EntityResolver for an XMLReader used during a transformation, it should use a URIResolver to return the SAXSource which provides (with getXMLReader) a reference to the XMLReader.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the TransformerFactory returned from TransformerFactory.newInstance() may be safely cast to a SAXTransformerFactory.
      static String FEATURE_XMLFILTER
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the newXMLFilter(Source src) and newXMLFilter(Templates templates) methods are supported.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SAXTransformerFactory()
      The default constructor is protected on purpose.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract TemplatesHandler newTemplatesHandler()
      Get a TemplatesHandler object that can process SAX ContentHandler events into a Templates object.
      abstract TransformerHandler newTransformerHandler()
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result.
      abstract TransformerHandler newTransformerHandler(Source src)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument.
      abstract TransformerHandler newTransformerHandler(Templates templates)
      Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the Templates argument.
      abstract XMLFilter newXMLFilter(Source src)
      Create an XMLFilter that uses the given Source as the transformation instructions.
      abstract XMLFilter newXMLFilter(Templates templates)
      Create an XMLFilter, based on the Templates argument..

      • Methods inherited from class javax.xml.transform.TransformerFactory

        getAssociatedStylesheet, getAttribute, getErrorListener, getFeature, getURIResolver, newInstance, newInstance, newTemplates, newTransformer, newTransformer, setAttribute, setErrorListener, setFeature, setURIResolver

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the TransformerFactory returned from TransformerFactory.newInstance() may be safely cast to a SAXTransformerFactory.
        See Also:
        Constant Field Values

      • FEATURE_XMLFILTER

        public static final String FEATURE_XMLFILTER
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the newXMLFilter(Source src) and newXMLFilter(Templates templates) methods are supported.
        See Also:
        Constant Field Values

    • Constructor Detail

      • SAXTransformerFactory

        protected SAXTransformerFactory()
        The default constructor is protected on purpose.

    • Method Detail

      • newTransformerHandler

        public abstract TransformerHandler newTransformerHandler(Source src)
                                                  throws TransformerConfigurationException
        Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument.
        Parameters:
        src - The Source of the transformation instructions.
        Returns:
        TransformerHandler ready to transform SAX events.
        Throws:
        TransformerConfigurationException - If for some reason the TransformerHandler can not be created.

      • newTransformerHandler

        public abstract TransformerHandler newTransformerHandler(Templates templates)
                                                  throws TransformerConfigurationException
        Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the Templates argument.
        Parameters:
        templates - The compiled transformation instructions.
        Returns:
        TransformerHandler ready to transform SAX events.
        Throws:
        TransformerConfigurationException - If for some reason the TransformerHandler can not be created.

      • newTransformerHandler

        public abstract TransformerHandler newTransformerHandler()
                                                  throws TransformerConfigurationException
        Get a TransformerHandler object that can process SAX ContentHandler events into a Result. The transformation is defined as an identity (or copy) transformation, for example to copy a series of SAX parse events into a DOM tree.
        Returns:
        A non-null reference to a TransformerHandler, that may be used as a ContentHandler for SAX parse events.
        Throws:
        TransformerConfigurationException - If for some reason the TransformerHandler cannot be created.

      • newTemplatesHandler

        public abstract TemplatesHandler newTemplatesHandler()
                                              throws TransformerConfigurationException
        Get a TemplatesHandler object that can process SAX ContentHandler events into a Templates object.
        Returns:
        A non-null reference to a TransformerHandler, that may be used as a ContentHandler for SAX parse events.
        Throws:
        TransformerConfigurationException - If for some reason the TemplatesHandler cannot be created.

      • newXMLFilter

        public abstract XMLFilter newXMLFilter(Source src)
                                throws TransformerConfigurationException
        Create an XMLFilter that uses the given Source as the transformation instructions.
        Parameters:
        src - The Source of the transformation instructions.
        Returns:
        An XMLFilter object, or null if this feature is not supported.
        Throws:
        TransformerConfigurationException - If for some reason the TemplatesHandler cannot be created.

      • newXMLFilter

        public abstract XMLFilter newXMLFilter(Templates templates)
                                throws TransformerConfigurationException
        Create an XMLFilter, based on the Templates argument..
        Parameters:
        templates - The compiled transformation instructions.
        Returns:
        An XMLFilter object, or null if this feature is not supported.
        Throws:
        TransformerConfigurationException - If for some reason the TemplatesHandler cannot be created.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TemplatesHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.sax

Interface TemplatesHandler

  • All Superinterfaces:
    ContentHandler

    public interface TemplatesHandler
extends ContentHandler
    A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.

    Note that TemplatesHandler does not need to implement LexicalHandler.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getSystemId()
      Get the base ID (URI or system ID) from where relative URLs will be resolved.
      Templates getTemplates()
      When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.
      void setSystemId(String systemID)
      Set the base ID (URI or system ID) for the Templates object created by this builder.

      • Methods inherited from interface org.xml.sax.ContentHandler

        characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

    • Method Detail

      • getTemplates

        Templates getTemplates()
        When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.
        Returns:
        The Templates object that was created during the SAX event process, or null if no Templates object has been created.

      • setSystemId

        void setSystemId(String systemID)
        Set the base ID (URI or system ID) for the Templates object created by this builder. This must be set in order to resolve relative URIs in the stylesheet. This must be called before the startDocument event.
        Parameters:
        systemID - Base URI for this stylesheet.

      • getSystemId

        String getSystemId()
        Get the base ID (URI or system ID) from where relative URLs will be resolved.
        Returns:
        The systemID that was set with setSystemId(java.lang.String).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformerHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.sax

Interface TransformerHandler

  • All Superinterfaces:
    ContentHandler, DTDHandler, LexicalHandler

    public interface TransformerHandler
extends ContentHandler, LexicalHandler, DTDHandler
    A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getSystemId()
      Get the base ID (URI or system ID) from where relative URLs will be resolved.
      Transformer getTransformer()
      Get the Transformer associated with this handler, which is needed in order to set parameters and output properties.
      void setResult(Result result)
      Set the Result associated with this TransformerHandler to be used for the transformation.
      void setSystemId(String systemID)
      Set the base ID (URI or system ID) from where relative URLs will be resolved.

      • Methods inherited from interface org.xml.sax.ContentHandler

        characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

      • Methods inherited from interface org.xml.sax.ext.LexicalHandler

        comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity

      • Methods inherited from interface org.xml.sax.DTDHandler

        notationDecl, unparsedEntityDecl

    • Method Detail

      • setResult

        void setResult(Result result)
        throws IllegalArgumentException

        Set the Result associated with this TransformerHandler to be used for the transformation.

        Parameters:
        result - A Result instance, should not be null.
        Throws:
        IllegalArgumentException - if result is invalid for some reason.

      • setSystemId

        void setSystemId(String systemID)
        Set the base ID (URI or system ID) from where relative URLs will be resolved.
        Parameters:
        systemID - Base URI for the source tree.

      • getSystemId

        String getSystemId()
        Get the base ID (URI or system ID) from where relative URLs will be resolved.
        Returns:
        The systemID that was set with setSystemId(java.lang.String).

      • getTransformer

        Transformer getTransformer()

        Get the Transformer associated with this handler, which is needed in order to set parameters and output properties.

        Returns:
        Transformer associated with this TransformerHandler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Source

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface Source

  • All Known Implementing Classes:
    DOMSource, JAXBSource, SAXSource, StAXSource, StreamSource

    public interface Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setSystemId(String systemId)
      Set the system identifier for this Source.

    • Method Detail

      • setSystemId

        void setSystemId(String systemId)
        Set the system identifier for this Source.

        The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings.

        Parameters:
        systemId - The system identifier as a URL string.

      • getSystemId

        String getSystemId()
        Get the system identifier that was set with setSystemId.
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SourceLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface SourceLocator

  • All Known Subinterfaces:
    DOMLocator

    public interface SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      Return the character position where the current document event ends.
      int getLineNumber()
      Return the line number where the current document event ends.
      String getPublicId()
      Return the public identifier for the current document event.
      String getSystemId()
      Return the system identifier for the current document event.

    • Method Detail

      • getPublicId

        String getPublicId()
        Return the public identifier for the current document event.

        The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.

        Returns:
        A string containing the public identifier, or null if none is available.
        See Also:
        getSystemId()

      • getSystemId

        String getSystemId()
        Return the system identifier for the current document event.

        The return value is the system identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.

        If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

        Returns:
        A string containing the system identifier, or null if none is available.
        See Also:
        getPublicId()

      • getLineNumber

        int getLineNumber()
        Return the line number where the current document event ends.

        Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.

        The return value is an approximation of the line number in the document entity or external parsed entity where the markup that triggered the event appears.

        Returns:
        The line number, or -1 if none is available.
        See Also:
        getColumnNumber()

      • getColumnNumber

        int getColumnNumber()
        Return the character position where the current document event ends.

        Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.

        The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.

        Returns:
        The column number, or -1 if none is available.
        See Also:
        getLineNumber()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


stax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.transform.stax

Provides for StAX-specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StAXResult
    Acts as a holder for an XML Result in the form of a StAX writer,i.e.
    StAXSource
    Acts as a holder for an XML Source in the form of a StAX reader,i.e.

Package javax.xml.transform.stax Description

Provides for StAX-specific transformation APIs. TODO: better description(s).

Package Specification

  • JSR 173: Streaming API for XML

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

  • TODO: Refer to non-spec documentation
  • @see XMLStreamReader
  • @see XMLEventReader

Since:
1.6

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.stax Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.transform.stax

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.stax.StAXResult (implements javax.xml.transform.Result)
    • javax.xml.transform.stax.StAXSource (implements javax.xml.transform.Source)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.transform.stax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.transform.stax

No usage of javax.xml.transform.stax
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.stax.StAXResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.stax.StAXResult

No usage of javax.xml.transform.stax.StAXResult
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.stax.StAXSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.stax.StAXSource

No usage of javax.xml.transform.stax.StAXSource
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StAXResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.stax

Class StAXResult

  • java.lang.Object
    • javax.xml.transform.stax.StAXResult
  • All Implemented Interfaces:
    Result

    public class StAXResult
extends Object
implements Result

    Acts as a holder for an XML Result in the form of a StAX writer,i.e. XMLStreamWriter or XMLEventWriter. StAXResult can be used in all cases that accept a Result, e.g. Transformer, Validator which accept Result as input.

    Since:
    1.6
    See Also:
    JSR 173: Streaming API for XML, XMLStreamWriter, XMLEventWriter

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(String name) returns true when passed this value as an argument, the Transformer supports Result output of this type.

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      StAXResult(XMLEventWriter xmlEventWriter)
      Creates a new instance of a StAXResult by supplying an XMLEventWriter.
      StAXResult(XMLStreamWriter xmlStreamWriter)
      Creates a new instance of a StAXResult by supplying an XMLStreamWriter.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getSystemId()
      The returned system identifier is always null.
      XMLEventWriter getXMLEventWriter()
      Get the XMLEventWriter used by this StAXResult.
      XMLStreamWriter getXMLStreamWriter()
      Get the XMLStreamWriter used by this StAXResult.
      void setSystemId(String systemId)
      In the context of a StAXResult, it is not appropriate to explicitly set the system identifier.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(String name) returns true when passed this value as an argument, the Transformer supports Result output of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • StAXResult

        public StAXResult(XMLEventWriter xmlEventWriter)

        Creates a new instance of a StAXResult by supplying an XMLEventWriter.

        XMLEventWriter must be a non-null reference.

        Parameters:
        xmlEventWriter - XMLEventWriter used to create this StAXResult.
        Throws:
        IllegalArgumentException - If xmlEventWriter == null.

      • StAXResult

        public StAXResult(XMLStreamWriter xmlStreamWriter)

        Creates a new instance of a StAXResult by supplying an XMLStreamWriter.

        XMLStreamWriter must be a non-null reference.

        Parameters:
        xmlStreamWriter - XMLStreamWriter used to create this StAXResult.
        Throws:
        IllegalArgumentException - If xmlStreamWriter == null.

    • Method Detail

      • getXMLEventWriter

        public XMLEventWriter getXMLEventWriter()

        Get the XMLEventWriter used by this StAXResult.

        XMLEventWriter will be null if this StAXResult was created with a XMLStreamWriter.

        Returns:
        XMLEventWriter used by this StAXResult.

      • getXMLStreamWriter

        public XMLStreamWriter getXMLStreamWriter()

        Get the XMLStreamWriter used by this StAXResult.

        XMLStreamWriter will be null if this StAXResult was created with a XMLEventWriter.

        Returns:
        XMLStreamWriter used by this StAXResult.

      • setSystemId

        public void setSystemId(String systemId)

        In the context of a StAXResult, it is not appropriate to explicitly set the system identifier. The XMLEventWriter or XMLStreamWriter used to construct this StAXResult determines the system identifier of the XML result.

        An UnsupportedOperationException is always thrown by this method.

        Specified by:
        setSystemId in interface Result
        Parameters:
        systemId - Ignored.
        Throws:
        UnsupportedOperationException - Is always thrown by this method.

      • getSystemId

        public String getSystemId()

        The returned system identifier is always null.

        Specified by:
        getSystemId in interface Result
        Returns:
        The returned system identifier is always null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StAXSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.stax

Class StAXSource

  • java.lang.Object
    • javax.xml.transform.stax.StAXSource
  • All Implemented Interfaces:
    Source

    public class StAXSource
extends Object
implements Source

    Acts as a holder for an XML Source in the form of a StAX reader,i.e. XMLStreamReader or XMLEventReader. StAXSource can be used in all cases that accept a Source, e.g. Transformer, Validator which accept Source as input.

    StAXSources are consumed during processing and are not reusable.

    Since:
    1.6
    See Also:
    JSR 173: Streaming API for XML, XMLStreamReader, XMLEventReader

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(String name) returns true when passed this value as an argument, the Transformer supports Source input of this type.

    • Constructor Summary

      Constructors
      Constructor and Description
      StAXSource(XMLEventReader xmlEventReader)
      Creates a new instance of a StAXSource by supplying an XMLEventReader.
      StAXSource(XMLStreamReader xmlStreamReader)
      Creates a new instance of a StAXSource by supplying an XMLStreamReader.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getSystemId()
      Get the system identifier used by this StAXSource.
      XMLEventReader getXMLEventReader()
      Get the XMLEventReader used by this StAXSource.
      XMLStreamReader getXMLStreamReader()
      Get the XMLStreamReader used by this StAXSource.
      void setSystemId(String systemId)
      In the context of a StAXSource, it is not appropriate to explicitly set the system identifier.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(String name) returns true when passed this value as an argument, the Transformer supports Source input of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • StAXSource

        public StAXSource(XMLEventReader xmlEventReader)
           throws XMLStreamException

        Creates a new instance of a StAXSource by supplying an XMLEventReader.

        XMLEventReader must be a non-null reference.

        XMLEventReader must be in XMLStreamConstants.START_DOCUMENT or XMLStreamConstants.START_ELEMENT state.

        Parameters:
        xmlEventReader - XMLEventReader used to create this StAXSource.
        Throws:
        XMLStreamException - If xmlEventReader access throws an Exception.
        IllegalArgumentException - If xmlEventReader == null.
        IllegalStateException - If xmlEventReader is not in XMLStreamConstants.START_DOCUMENT or XMLStreamConstants.START_ELEMENT state.

      • StAXSource

        public StAXSource(XMLStreamReader xmlStreamReader)

        Creates a new instance of a StAXSource by supplying an XMLStreamReader.

        XMLStreamReader must be a non-null reference.

        XMLStreamReader must be in XMLStreamConstants.START_DOCUMENT or XMLStreamConstants.START_ELEMENT state.

        Parameters:
        xmlStreamReader - XMLStreamReader used to create this StAXSource.
        Throws:
        IllegalArgumentException - If xmlStreamReader == null.
        IllegalStateException - If xmlStreamReader is not in XMLStreamConstants.START_DOCUMENT or XMLStreamConstants.START_ELEMENT state.

    • Method Detail

      • getXMLEventReader

        public XMLEventReader getXMLEventReader()

        Get the XMLEventReader used by this StAXSource.

        XMLEventReader will be null. if this StAXSource was created with a XMLStreamReader.

        Returns:
        XMLEventReader used by this StAXSource.

      • getXMLStreamReader

        public XMLStreamReader getXMLStreamReader()

        Get the XMLStreamReader used by this StAXSource.

        XMLStreamReader will be null if this StAXSource was created with a XMLEventReader.

        Returns:
        XMLStreamReader used by this StAXSource.

      • setSystemId

        public void setSystemId(String systemId)

        In the context of a StAXSource, it is not appropriate to explicitly set the system identifier. The XMLStreamReader or XMLEventReader used to construct this StAXSource determines the system identifier of the XML source.

        An UnsupportedOperationException is always thrown by this method.

        Specified by:
        setSystemId in interface Source
        Parameters:
        systemId - Ignored.
        Throws:
        UnsupportedOperationException - Is always thrown by this method.

      • getSystemId

        public String getSystemId()

        Get the system identifier used by this StAXSource.

        The XMLStreamReader or XMLEventReader used to construct this StAXSource is queried to determine the system identifier of the XML source.

        The system identifier may be null or an empty "" String.

        Specified by:
        getSystemId in interface Source
        Returns:
        System identifier used by this StAXSource.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.transform.stream

This package implements stream- and URI- specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StreamResult
    Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.
    StreamSource
    Acts as an holder for a transformation Source in the form of a stream of XML markup.

Package javax.xml.transform.stream Description

This package implements stream- and URI- specific transformation APIs.

The StreamSource class provides methods for specifying InputStream input, Reader input, and URL input in the form of strings. Even if an input stream or reader is specified as the source, StreamSource.setSystemId(java.lang.String) should still be called, so that the transformer can know from where it should resolve relative URIs. The public identifier is always optional: if the application writer includes one, it will be provided as part of the SourceLocator information.

The StreamResult class provides methods for specifying OutputStream, Writer, or an output system ID, as the output of the transformation result.

Normally streams should be used rather than readers or writers, for both the Source and Result, since readers and writers already have the encoding established to and from the internal Unicode format. However, there are times when it is useful to write to a character stream, such as when using a StringWriter in order to write to a String, or in the case of reading source XML from a StringReader.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.stream Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.transform.stream

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.transform.stream.StreamResult (implements javax.xml.transform.Result)
    • javax.xml.transform.stream.StreamSource (implements javax.xml.transform.Source)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.transform.stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.transform.stream

No usage of javax.xml.transform.stream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.stream.StreamResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.stream.StreamResult

No usage of javax.xml.transform.stream.StreamResult
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.transform.stream.StreamSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.transform.stream.StreamSource

No usage of javax.xml.transform.stream.StreamSource
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StreamResult

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.stream

Class StreamResult

  • java.lang.Object
    • javax.xml.transform.stream.StreamResult
  • All Implemented Interfaces:
    Result

    public class StreamResult
extends Object
implements Result

    Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

      • Fields inherited from interface javax.xml.transform.Result

        PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING

    • Constructor Summary

      Constructors
      Constructor and Description
      StreamResult()
      Zero-argument default constructor.
      StreamResult(File f)
      Construct a StreamResult from a File.
      StreamResult(OutputStream outputStream)
      Construct a StreamResult from a byte stream.
      StreamResult(String systemId)
      Construct a StreamResult from a URL.
      StreamResult(Writer writer)
      Construct a StreamResult from a character stream.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      OutputStream getOutputStream()
      Get the byte stream that was set with setOutputStream.
      String getSystemId()
      Get the system identifier that was set with setSystemId.
      Writer getWriter()
      Get the character stream that was set with setWriter.
      void setOutputStream(OutputStream outputStream)
      Set the ByteStream that is to be written to.
      void setSystemId(File f)
      Set the system ID from a File reference.
      void setSystemId(String systemId)
      Set the systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name).
      void setWriter(Writer writer)
      Set the writer that is to receive the result.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • StreamResult

        public StreamResult()
        Zero-argument default constructor.

      • StreamResult

        public StreamResult(OutputStream outputStream)
        Construct a StreamResult from a byte stream. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding.
        Parameters:
        outputStream - A valid OutputStream reference.

      • StreamResult

        public StreamResult(Writer writer)
        Construct a StreamResult from a character stream. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding. However, there are times when it is useful to write to a character stream, such as when using a StringWriter.
        Parameters:
        writer - A valid Writer reference.

      • StreamResult

        public StreamResult(String systemId)
        Construct a StreamResult from a URL.
        Parameters:
        systemId - Must be a String that conforms to the URI syntax.

      • StreamResult

        public StreamResult(File f)
        Construct a StreamResult from a File.
        Parameters:
        f - Must a non-null File reference.

    • Method Detail

      • setOutputStream

        public void setOutputStream(OutputStream outputStream)
        Set the ByteStream that is to be written to. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding.
        Parameters:
        outputStream - A valid OutputStream reference.

      • getOutputStream

        public OutputStream getOutputStream()
        Get the byte stream that was set with setOutputStream.
        Returns:
        The byte stream that was set with setOutputStream, or null if setOutputStream or the ByteStream constructor was not called.

      • setWriter

        public void setWriter(Writer writer)
        Set the writer that is to receive the result. Normally, a stream should be used rather than a writer, so that the transformer may use instructions contained in the transformation instructions to control the encoding. However, there are times when it is useful to write to a writer, such as when using a StringWriter.
        Parameters:
        writer - A valid Writer reference.

      • getWriter

        public Writer getWriter()
        Get the character stream that was set with setWriter.
        Returns:
        The character stream that was set with setWriter, or null if setWriter or the Writer constructor was not called.

      • setSystemId

        public void setSystemId(String systemId)
        Set the systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name).
        Specified by:
        setSystemId in interface Result
        Parameters:
        systemId - The system identifier as a URI string.

      • setSystemId

        public void setSystemId(File f)

        Set the system ID from a File reference.

        Parameters:
        f - Must a non-null File reference.

      • getSystemId

        public String getSystemId()
        Get the system identifier that was set with setSystemId.
        Specified by:
        getSystemId in interface Result
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StreamSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform.stream

Class StreamSource

  • java.lang.Object
    • javax.xml.transform.stream.StreamSource
  • All Implemented Interfaces:
    Source

    public class StreamSource
extends Object
implements Source

    Acts as an holder for a transformation Source in the form of a stream of XML markup.

    Note: Due to their internal use of either a Reader or InputStream instance, StreamSource instances may only be used once.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String FEATURE
      If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.

    • Constructor Summary

      Constructors
      Constructor and Description
      StreamSource()
      Zero-argument default constructor.
      StreamSource(File f)
      Construct a StreamSource from a File.
      StreamSource(InputStream inputStream)
      Construct a StreamSource from a byte stream.
      StreamSource(InputStream inputStream, String systemId)
      Construct a StreamSource from a byte stream.
      StreamSource(Reader reader)
      Construct a StreamSource from a character reader.
      StreamSource(Reader reader, String systemId)
      Construct a StreamSource from a character reader.
      StreamSource(String systemId)
      Construct a StreamSource from a URL.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      InputStream getInputStream()
      Get the byte stream that was set with setByteStream.
      String getPublicId()
      Get the public identifier that was set with setPublicId.
      Reader getReader()
      Get the character stream that was set with setReader.
      String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setInputStream(InputStream inputStream)
      Set the byte stream to be used as input.
      void setPublicId(String publicId)
      Set the public identifier for this Source.
      void setReader(Reader reader)
      Set the input to be a character reader.
      void setSystemId(File f)
      Set the system ID from a File reference.
      void setSystemId(String systemId)
      Set the system identifier for this Source.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • FEATURE

        public static final String FEATURE
        If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type.
        See Also:
        Constant Field Values

    • Constructor Detail

      • StreamSource

        public StreamSource()

        Zero-argument default constructor. If this constructor is used, and no Stream source is set using setInputStream(java.io.InputStream inputStream) or setReader(java.io.Reader reader), then the Transformer will create an empty source InputStream using new InputStream().

        See Also:
        Transformer.transform(Source xmlSource, Result outputTarget)

      • StreamSource

        public StreamSource(InputStream inputStream)
        Construct a StreamSource from a byte stream. Normally, a stream should be used rather than a reader, so the XML parser can resolve character encoding specified by the XML declaration.

        If this constructor is used to process a stylesheet, normally setSystemId should also be called, so that relative URI references can be resolved.

        Parameters:
        inputStream - A valid InputStream reference to an XML stream.

      • StreamSource

        public StreamSource(InputStream inputStream,
                    String systemId)
        Construct a StreamSource from a byte stream. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration.

        This constructor allows the systemID to be set in addition to the input stream, which allows relative URIs to be processed.

        Parameters:
        inputStream - A valid InputStream reference to an XML stream.
        systemId - Must be a String that conforms to the URI syntax.

      • StreamSource

        public StreamSource(Reader reader)
        Construct a StreamSource from a character reader. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration. However, in many cases the encoding of the input stream is already resolved, as in the case of reading XML from a StringReader.
        Parameters:
        reader - A valid Reader reference to an XML character stream.

      • StreamSource

        public StreamSource(Reader reader,
                    String systemId)
        Construct a StreamSource from a character reader. Normally, a stream should be used rather than a reader, so that the XML parser may resolve character encoding specified by the XML declaration. However, in many cases the encoding of the input stream is already resolved, as in the case of reading XML from a StringReader.
        Parameters:
        reader - A valid Reader reference to an XML character stream.
        systemId - Must be a String that conforms to the URI syntax.

      • StreamSource

        public StreamSource(String systemId)
        Construct a StreamSource from a URL.
        Parameters:
        systemId - Must be a String that conforms to the URI syntax.

      • StreamSource

        public StreamSource(File f)
        Construct a StreamSource from a File.
        Parameters:
        f - Must a non-null File reference.

    • Method Detail

      • setInputStream

        public void setInputStream(InputStream inputStream)
        Set the byte stream to be used as input. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration.

        If this Source object is used to process a stylesheet, normally setSystemId should also be called, so that relative URL references can be resolved.

        Parameters:
        inputStream - A valid InputStream reference to an XML stream.

      • getInputStream

        public InputStream getInputStream()
        Get the byte stream that was set with setByteStream.
        Returns:
        The byte stream that was set with setByteStream, or null if setByteStream or the ByteStream constructor was not called.

      • setReader

        public void setReader(Reader reader)
        Set the input to be a character reader. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration. However, in many cases the encoding of the input stream is already resolved, as in the case of reading XML from a StringReader.
        Parameters:
        reader - A valid Reader reference to an XML CharacterStream.

      • getReader

        public Reader getReader()
        Get the character stream that was set with setReader.
        Returns:
        The character stream that was set with setReader, or null if setReader or the Reader constructor was not called.

      • setPublicId

        public void setPublicId(String publicId)
        Set the public identifier for this Source.

        The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.

        Parameters:
        publicId - The public identifier as a string.

      • getPublicId

        public String getPublicId()
        Get the public identifier that was set with setPublicId.
        Returns:
        The public identifier that was set with setPublicId, or null if setPublicId was not called.

      • setSystemId

        public void setSystemId(String systemId)
        Set the system identifier for this Source.

        The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if there is no byte stream or character stream specified).

        Specified by:
        setSystemId in interface Source
        Parameters:
        systemId - The system identifier as a URL string.

      • getSystemId

        public String getSystemId()
        Get the system identifier that was set with setSystemId.
        Specified by:
        getSystemId in interface Source
        Returns:
        The system identifier that was set with setSystemId, or null if setSystemId was not called.

      • setSystemId

        public void setSystemId(File f)
        Set the system ID from a File reference.
        Parameters:
        f - Must a non-null File reference.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Templates

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface Templates

  • public interface Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.

    Templates must be threadsafe for a given instance over multiple threads running concurrently, and may be used multiple times in a given session.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Properties getOutputProperties()
      Get the properties corresponding to the effective xsl:output element.
      Transformer newTransformer()
      Create a new transformation context for this Templates object.

    • Method Detail

      • newTransformer

        Transformer newTransformer()
                    throws TransformerConfigurationException
        Create a new transformation context for this Templates object.
        Returns:
        A valid non-null instance of a Transformer.
        Throws:
        TransformerConfigurationException - if a Transformer can not be created.

      • getOutputProperties

        Properties getOutputProperties()
        Get the properties corresponding to the effective xsl:output element. The object returned will be a clone of the internal values. Accordingly, it can be mutated without mutating the Templates object, and then handed in to Transformer.setOutputProperties(java.util.Properties).

        The properties returned should contain properties set by the stylesheet, and these properties are "defaulted" by default properties specified by section 16 of the XSL Transformations (XSLT) W3C Recommendation. The properties that were specifically set by the stylesheet should be in the base Properties list, while the XSLT default properties that were not specifically set should be in the "default" Properties list. Thus, getOutputProperties().getProperty(String key) will obtain any property in that was set by the stylesheet, or the default properties, while getOutputProperties().get(String key) will only retrieve properties that were explicitly set in the stylesheet.

        For XSLT, Attribute Value Templates attribute values will be returned unexpanded (since there is no context at this point). The namespace prefixes inside Attribute Value Templates will be unexpanded, so that they remain valid XPath values.

        Returns:
        A Properties object, never null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Transformer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class Transformer

  • java.lang.Object
    • javax.xml.transform.Transformer

  • public abstract class Transformer
extends Object
    An instance of this abstract class can transform a source tree into a result tree.

    An instance of this class can be obtained with the TransformerFactory.newTransformer method. This instance may then be used to process XML from a variety of sources and write the transformation output to a variety of sinks.

    An object of this class may not be used in multiple threads running concurrently. Different Transformers may be used concurrently by different threads.

    A Transformer may be used multiple times. Parameters and output properties are preserved across transformations.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected Transformer()
      Default constructor is protected on purpose.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void clearParameters()
      Clear all parameters set with setParameter.
      abstract ErrorListener getErrorListener()
      Get the error event handler in effect for the transformation.
      abstract Properties getOutputProperties()
      Get a copy of the output properties for the transformation.
      abstract String getOutputProperty(String name)
      Get an output property that is in effect for the transformer.
      abstract Object getParameter(String name)
      Get a parameter that was explicitly set with setParameter.
      abstract URIResolver getURIResolver()
      Get an object that will be used to resolve URIs used in document().
      void reset()
      Reset this Transformer to its original configuration.
      abstract void setErrorListener(ErrorListener listener)
      Set the error event listener in effect for the transformation.
      abstract void setOutputProperties(Properties oformat)
      Set the output properties for the transformation.
      abstract void setOutputProperty(String name, String value)
      Set an output property that will be in effect for the transformation.
      abstract void setParameter(String name, Object value)
      Add a parameter for the transformation.
      abstract void setURIResolver(URIResolver resolver)
      Set an object that will be used to resolve URIs used in document().
      abstract void transform(Source xmlSource, Result outputTarget)
      Transform the XML Source to a Result.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Transformer

        protected Transformer()
        Default constructor is protected on purpose.

    • Method Detail

      • reset

        public void reset()

        Reset this Transformer to its original configuration.

        Transformer is reset to the same state as when it was created with TransformerFactory.newTransformer(), TransformerFactory.newTransformer(Source source) or Templates.newTransformer(). reset() is designed to allow the reuse of existing Transformers thus saving resources associated with the creation of new Transformers.

        The reset Transformer is not guaranteed to have the same URIResolver or ErrorListener Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal URIResolver and ErrorListener.

        Throws:
        UnsupportedOperationException - When implementation does not override this method.
        Since:
        1.5

      • transform

        public abstract void transform(Source xmlSource,
                               Result outputTarget)
                        throws TransformerException

        Transform the XML Source to a Result. Specific transformation behavior is determined by the settings of the TransformerFactory in effect when the Transformer was instantiated and any modifications made to the Transformer instance.

        An empty Source is represented as an empty document as constructed by DocumentBuilder.newDocument(). The result of transforming an empty Source depends on the transformation behavior; it is not always an empty Result.

        Parameters:
        xmlSource - The XML input to transform.
        outputTarget - The Result of transforming the xmlSource.
        Throws:
        TransformerException - If an unrecoverable error occurs during the course of the transformation.

      • setParameter

        public abstract void setParameter(String name,
                                  Object value)
        Add a parameter for the transformation.

        Pass a qualified name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

        For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.

        Parameters:
        name - The name of the parameter, which may begin with a namespace URI in curly braces ({}).
        value - The value object. This can be any valid Java object. It is up to the processor to provide the proper object coersion or to simply pass the object on for use in an extension.
        Throws:
        NullPointerException - If value is null.

      • getParameter

        public abstract Object getParameter(String name)
        Get a parameter that was explicitly set with setParameter.

        This method does not return a default parameter value, which cannot be determined until the node context is evaluated during the transformation process.

        Parameters:
        name - of Object to get
        Returns:
        A parameter that has been set with setParameter.

      • clearParameters

        public abstract void clearParameters()
        Clear all parameters set with setParameter.

      • setURIResolver

        public abstract void setURIResolver(URIResolver resolver)
        Set an object that will be used to resolve URIs used in document().

        If the resolver argument is null, the URIResolver value will be cleared and the transformer will no longer have a resolver.

        Parameters:
        resolver - An object that implements the URIResolver interface, or null.

      • getURIResolver

        public abstract URIResolver getURIResolver()
        Get an object that will be used to resolve URIs used in document().
        Returns:
        An object that implements the URIResolver interface, or null.

      • setOutputProperties

        public abstract void setOutputProperties(Properties oformat)
        Set the output properties for the transformation. These properties will override properties set in the Templates with xsl:output.

        If argument to this function is null, any properties previously set are removed, and the value will revert to the value defined in the templates object.

        Pass a qualified property key name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

        For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.

        An IllegalArgumentException is thrown if any of the argument keys are not recognized and are not namespace qualified.
        Parameters:
        oformat - A set of output properties that will be used to override any of the same properties in affect for the transformation.
        Throws:
        IllegalArgumentException - When keys are not recognized and are not namespace qualified.
        See Also:
        OutputKeys, Properties

      • getOutputProperties

        public abstract Properties getOutputProperties()

        Get a copy of the output properties for the transformation.

        The properties returned should contain properties set by the user, and properties set by the stylesheet, and these properties are "defaulted" by default properties specified by section 16 of the XSL Transformations (XSLT) W3C Recommendation. The properties that were specifically set by the user or the stylesheet should be in the base Properties list, while the XSLT default properties that were not specifically set should be the default Properties list. Thus, getOutputProperties().getProperty(String key) will obtain any property in that was set by setOutputProperty(java.lang.String, java.lang.String), setOutputProperties(java.util.Properties), in the stylesheet, or the default properties, while getOutputProperties().get(String key) will only retrieve properties that were explicitly set by setOutputProperty(java.lang.String, java.lang.String), setOutputProperties(java.util.Properties), or in the stylesheet.

        Note that mutation of the Properties object returned will not effect the properties that the transformer contains.

        If any of the argument keys are not recognized and are not namespace qualified, the property will be ignored and not returned. In other words the behaviour is not orthogonal with setOutputProperties.

        Returns:
        A copy of the set of output properties in effect for the next transformation.
        See Also:
        OutputKeys, Properties, XSL Transformations (XSLT) Version 1.0

      • setOutputProperty

        public abstract void setOutputProperty(String name,
                                       String value)
                                throws IllegalArgumentException
        Set an output property that will be in effect for the transformation.

        Pass a qualified property name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

        For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.

        The Properties object that was passed to setOutputProperties(java.util.Properties) won't be effected by calling this method.

        Parameters:
        name - A non-null String that specifies an output property name, which may be namespace qualified.
        value - The non-null string value of the output property.
        Throws:
        IllegalArgumentException - If the property is not supported, and is not qualified with a namespace.
        See Also:
        OutputKeys

      • getOutputProperty

        public abstract String getOutputProperty(String name)
                                  throws IllegalArgumentException

        Get an output property that is in effect for the transformer.

        If a property has been set using setOutputProperty(java.lang.String, java.lang.String), that value will be returned. Otherwise, if a property is explicitly specified in the stylesheet, that value will be returned. If the value of the property has been defaulted, that is, if no value has been set explicitly either with setOutputProperty(java.lang.String, java.lang.String) or in the stylesheet, the result may vary depending on implementation and input stylesheet.

        Parameters:
        name - A non-null String that specifies an output property name, which may be namespace qualified.
        Returns:
        The string value of the output property, or null if no property was found.
        Throws:
        IllegalArgumentException - If the property is not supported.
        See Also:
        OutputKeys

      • setErrorListener

        public abstract void setErrorListener(ErrorListener listener)
                               throws IllegalArgumentException
        Set the error event listener in effect for the transformation.
        Parameters:
        listener - The new error listener.
        Throws:
        IllegalArgumentException - if listener is null.

      • getErrorListener

        public abstract ErrorListener getErrorListener()
        Get the error event handler in effect for the transformation. Implementations must provide a default error listener.
        Returns:
        The current error handler, which should never be null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformerConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class TransformerConfigurationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.transform.TransformerException
          • javax.xml.transform.TransformerConfigurationException
  • All Implemented Interfaces:
    Serializable

    public class TransformerConfigurationException
extends TransformerException
    Indicates a serious configuration error.
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TransformerConfigurationException()
      Create a new TransformerConfigurationException with no detail mesage.
      TransformerConfigurationException(String msg)
      Create a new TransformerConfigurationException with the String specified as an error message.
      TransformerConfigurationException(String message, SourceLocator locator)
      Create a new TransformerConfigurationException from a message and a Locator.
      TransformerConfigurationException(String message, SourceLocator locator, Throwable e)
      Wrap an existing exception in a TransformerConfigurationException.
      TransformerConfigurationException(String msg, Throwable e)
      Create a new TransformerConfigurationException with the given Exception base cause and detail message.
      TransformerConfigurationException(Throwable e)
      Create a new TransformerConfigurationException with a given Exception base cause of the error.

    • Method Summary

      • Methods inherited from class javax.xml.transform.TransformerException

        getCause, getException, getLocationAsString, getLocator, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocator

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransformerConfigurationException

        public TransformerConfigurationException()
        Create a new TransformerConfigurationException with no detail mesage.

      • TransformerConfigurationException

        public TransformerConfigurationException(String msg)
        Create a new TransformerConfigurationException with the String specified as an error message.
        Parameters:
        msg - The error message for the exception.

      • TransformerConfigurationException

        public TransformerConfigurationException(Throwable e)
        Create a new TransformerConfigurationException with a given Exception base cause of the error.
        Parameters:
        e - The exception to be encapsulated in a TransformerConfigurationException.

      • TransformerConfigurationException

        public TransformerConfigurationException(String msg,
                                         Throwable e)
        Create a new TransformerConfigurationException with the given Exception base cause and detail message.
        Parameters:
        e - The exception to be encapsulated in a TransformerConfigurationException
        msg - The detail message.

      • TransformerConfigurationException

        public TransformerConfigurationException(String message,
                                         SourceLocator locator)
        Create a new TransformerConfigurationException from a message and a Locator.

        This constructor is especially useful when an application is creating its own exception from within a DocumentHandler callback.

        Parameters:
        message - The error or warning message.
        locator - The locator object for the error or warning.

      • TransformerConfigurationException

        public TransformerConfigurationException(String message,
                                         SourceLocator locator,
                                         Throwable e)
        Wrap an existing exception in a TransformerConfigurationException.
        Parameters:
        message - The error or warning message, or null to use the message from the embedded exception.
        locator - The locator object for the error or warning.
        e - Any exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformerException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class TransformerException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.transform.TransformerException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    TransformerConfigurationException

    public class TransformerException
extends Exception
    This class specifies an exceptional condition that occured during the transformation process.
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TransformerException(String message)
      Create a new TransformerException.
      TransformerException(String message, SourceLocator locator)
      Create a new TransformerException from a message and a Locator.
      TransformerException(String message, SourceLocator locator, Throwable e)
      Wrap an existing exception in a TransformerException.
      TransformerException(String message, Throwable e)
      Wrap an existing exception in a TransformerException.
      TransformerException(Throwable e)
      Create a new TransformerException wrapping an existing exception.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Returns the cause of this throwable or null if the cause is nonexistent or unknown.
      Throwable getException()
      This method retrieves an exception that this exception wraps.
      String getLocationAsString()
      Get the location information as a string.
      SourceLocator getLocator()
      Method getLocator retrieves an instance of a SourceLocator object that specifies where an error occured.
      String getMessageAndLocation()
      Get the error message with location information appended.
      Throwable initCause(Throwable cause)
      Initializes the cause of this throwable to the specified value.
      void printStackTrace()
      Print the the trace of methods from where the error originated.
      void printStackTrace(PrintStream s)
      Print the the trace of methods from where the error originated.
      void printStackTrace(PrintWriter s)
      Print the the trace of methods from where the error originated.
      void setLocator(SourceLocator location)
      Method setLocator sets an instance of a SourceLocator object that specifies where an error occured.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransformerException

        public TransformerException(String message)
        Create a new TransformerException.
        Parameters:
        message - The error or warning message.

      • TransformerException

        public TransformerException(Throwable e)
        Create a new TransformerException wrapping an existing exception.
        Parameters:
        e - The exception to be wrapped.

      • TransformerException

        public TransformerException(String message,
                            Throwable e)
        Wrap an existing exception in a TransformerException.

        This is used for throwing processor exceptions before the processing has started.

        Parameters:
        message - The error or warning message, or null to use the message from the embedded exception.
        e - Any exception

      • TransformerException

        public TransformerException(String message,
                            SourceLocator locator)
        Create a new TransformerException from a message and a Locator.

        This constructor is especially useful when an application is creating its own exception from within a DocumentHandler callback.

        Parameters:
        message - The error or warning message.
        locator - The locator object for the error or warning.

      • TransformerException

        public TransformerException(String message,
                            SourceLocator locator,
                            Throwable e)
        Wrap an existing exception in a TransformerException.
        Parameters:
        message - The error or warning message, or null to use the message from the embedded exception.
        locator - The locator object for the error or warning.
        e - Any exception

    • Method Detail

      • getLocator

        public SourceLocator getLocator()
        Method getLocator retrieves an instance of a SourceLocator object that specifies where an error occured.
        Returns:
        A SourceLocator object, or null if none was specified.

      • setLocator

        public void setLocator(SourceLocator location)
        Method setLocator sets an instance of a SourceLocator object that specifies where an error occured.
        Parameters:
        location - A SourceLocator object, or null to clear the location.

      • getException

        public Throwable getException()
        This method retrieves an exception that this exception wraps.
        Returns:
        An Throwable object, or null.
        See Also:
        getCause()

      • getCause

        public Throwable getCause()
        Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.

      • initCause

        public Throwable initCause(Throwable cause)
        Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

        This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with TransformerException(Throwable) or TransformerException(String,Throwable), this method cannot be called even once.

        Overrides:
        initCause in class Throwable
        Parameters:
        cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        Returns:
        a reference to this Throwable instance.
        Throws:
        IllegalArgumentException - if cause is this throwable. (A throwable cannot be its own cause.)
        IllegalStateException - if this throwable was created with TransformerException(Throwable) or TransformerException(String,Throwable), or this method has already been called on this throwable.

      • getMessageAndLocation

        public String getMessageAndLocation()
        Get the error message with location information appended.
        Returns:
        A String representing the error message with location information appended.

      • getLocationAsString

        public String getLocationAsString()
        Get the location information as a string.
        Returns:
        A string with location info, or null if there is no location information.

      • printStackTrace

        public void printStackTrace()
        Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.
        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintStream s)
        Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - The stream where the dump will be sent to.

      • printStackTrace

        public void printStackTrace(PrintWriter s)
        Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - The writer where the dump will be sent to.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformerFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class TransformerFactory

  • java.lang.Object
    • javax.xml.transform.TransformerFactory
  • Direct Known Subclasses:
    SAXTransformerFactory

    public abstract class TransformerFactory
extends Object

    A TransformerFactory instance can be used to create Transformer and Templates objects.

    The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory". This property names a concrete subclass of the TransformerFactory abstract class. If the property is not defined, a platform default is be used.

    Since:
    1.5

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TransformerFactory()
      Default constructor is protected on purpose.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Source getAssociatedStylesheet(Source source, String media, String title, String charset)
      Get the stylesheet specification(s) associated with the XML Source document via the xml-stylesheet processing instruction that match the given criteria.
      abstract Object getAttribute(String name)
      Allows the user to retrieve specific attributes on the underlying implementation.
      abstract ErrorListener getErrorListener()
      Get the error event handler for the TransformerFactory.
      abstract boolean getFeature(String name)
      Look up the value of a feature.
      abstract URIResolver getURIResolver()
      Get the object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.
      static TransformerFactory newInstance()
      Obtain a new instance of a TransformerFactory.
      static TransformerFactory newInstance(String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a TransformerFactory from factory class name.
      abstract Templates newTemplates(Source source)
      Process the Source into a Templates object, which is a a compiled representation of the source.
      abstract Transformer newTransformer()
      Create a new Transformer that performs a copy of the Source to the Result.
      abstract Transformer newTransformer(Source source)
      Process the Source into a Transformer Object.
      abstract void setAttribute(String name, Object value)
      Allows the user to set specific attributes on the underlying implementation.
      abstract void setErrorListener(ErrorListener listener)
      Set the error event listener for the TransformerFactory, which is used for the processing of transformation instructions, and not for the transformation itself.
      abstract void setFeature(String name, boolean value)
      Set a feature for this TransformerFactory and Transformers or Templates created by this factory.
      abstract void setURIResolver(URIResolver resolver)
      Set an object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TransformerFactory

        protected TransformerFactory()
        Default constructor is protected on purpose.

    • Method Detail

      • newInstance

        public static TransformerFactory newInstance()
                                      throws TransformerFactoryConfigurationError

        Obtain a new instance of a TransformerFactory. This static method creates a new factory instance.

        This method uses the following ordered lookup procedure to determine the TransformerFactory implementation class to load:

        • Use the javax.xml.transform.TransformerFactory system property.
        • Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
          The jaxp.properties file is read only once by the JAXP implementation and it's values are then cached for future use. If the file does not exist when the first attempt is made to read from it, no further attempts are made to check for its existence. It is not possible to change the value of any property in jaxp.properties after it has been read for the first time.
        • Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
        • Otherwise, the system-default implementation is returned.

        Once an application has obtained a reference to a TransformerFactory it can use the factory to configure and obtain transformer instances.

        Returns:
        new TransformerFactory instance, never null.
        Throws:
        TransformerFactoryConfigurationError - Thrown in case of service configuration error or if the implementation is not available or cannot be instantiated.

      • newInstance

        public static TransformerFactory newInstance(String factoryClassName,
                                             ClassLoader classLoader)
                                      throws TransformerFactoryConfigurationError

        Obtain a new instance of a TransformerFactory from factory class name. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Once an application has obtained a reference to a TransformerFactory it can use the factory to configure and obtain transformer instances.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.transform.TransformerFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        new TransformerFactory instance, never null.
        Throws:
        TransformerFactoryConfigurationError - if factoryClassName is null, or the factory class cannot be loaded, instantiated.
        Since:
        1.6
        See Also:
        newInstance()

      • newTransformer

        public abstract Transformer newTransformer(Source source)
                                    throws TransformerConfigurationException

        Process the Source into a Transformer Object. The Source is an XSLT document that conforms to XSL Transformations (XSLT) Version 1.0. Care must be taken not to use this Transformer in multiple Threads running concurrently. Different TransformerFactories can be used concurrently by different Threads.

        Parameters:
        source - Source of XSLT document used to create Transformer. Examples of XML Sources include DOMSource, SAXSource, and StreamSource.
        Returns:
        A Transformer object that may be used to perform a transformation in a single Thread, never null.
        Throws:
        TransformerConfigurationException - Thrown if there are errors when parsing the Source or it is not possible to create a Transformer instance.
        See Also:
        XSL Transformations (XSLT) Version 1.0

      • newTransformer

        public abstract Transformer newTransformer()
                                    throws TransformerConfigurationException

        Create a new Transformer that performs a copy of the Source to the Result. i.e. the "identity transform".

        Returns:
        A Transformer object that may be used to perform a transformation in a single thread, never null.
        Throws:
        TransformerConfigurationException - When it is not possible to create a Transformer instance.

      • newTemplates

        public abstract Templates newTemplates(Source source)
                                throws TransformerConfigurationException
        Process the Source into a Templates object, which is a a compiled representation of the source. This Templates object may then be used concurrently across multiple threads. Creating a Templates object allows the TransformerFactory to do detailed performance optimization of transformation instructions, without penalizing runtime transformation.
        Parameters:
        source - An object that holds a URL, input stream, etc.
        Returns:
        A Templates object capable of being used for transformation purposes, never null.
        Throws:
        TransformerConfigurationException - When parsing to construct the Templates object fails.

      • getAssociatedStylesheet

        public abstract Source getAssociatedStylesheet(Source source,
                                               String media,
                                               String title,
                                               String charset)
                                        throws TransformerConfigurationException

        Get the stylesheet specification(s) associated with the XML Source document via the xml-stylesheet processing instruction that match the given criteria. Note that it is possible to return several stylesheets, in which case they are applied as if they were a list of imports or cascades in a single stylesheet.

        Parameters:
        source - The XML source document.
        media - The media attribute to be matched. May be null, in which case the prefered templates will be used (i.e. alternate = no).
        title - The value of the title attribute to match. May be null.
        charset - The value of the charset attribute to match. May be null.
        Returns:
        A Source Object suitable for passing to the TransformerFactory.
        Throws:
        TransformerConfigurationException - An Exception is thrown if an error occurings during parsing of the source.
        See Also:
        Associating Style Sheets with XML documents Version 1.0

      • setURIResolver

        public abstract void setURIResolver(URIResolver resolver)
        Set an object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.
        Parameters:
        resolver - An object that implements the URIResolver interface, or null.

      • getURIResolver

        public abstract URIResolver getURIResolver()
        Get the object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include.
        Returns:
        The URIResolver that was set with setURIResolver.

      • setFeature

        public abstract void setFeature(String name,
                                boolean value)
                         throws TransformerConfigurationException

        Set a feature for this TransformerFactory and Transformers or Templates created by this factory.

        Feature names are fully qualified URIs. Implementations may define their own features. An TransformerConfigurationException is thrown if this TransformerFactory or the Transformers or Templates it creates cannot support the feature. It is possible for an TransformerFactory to expose a feature value but be unable to change its state.

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is:

        • true: the implementation will limit XML processing to conform to implementation limits and behave in a secure fashion as defined by the implementation. Examples include resolving user defined style sheets and functions. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorListener.fatalError(TransformerException exception). See setErrorListener(ErrorListener listener).
        • false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
        Parameters:
        name - Feature name.
        value - Is feature state true or false.
        Throws:
        TransformerConfigurationException - if this TransformerFactory or the Transformers or Templates it creates cannot support this feature.
        NullPointerException - If the name parameter is null.

      • getFeature

        public abstract boolean getFeature(String name)
        Look up the value of a feature.

        Feature names are fully qualified URIs. Implementations may define their own features. false is returned if this TransformerFactory or the Transformers or Templates it creates cannot support the feature. It is possible for an TransformerFactory to expose a feature value but be unable to change its state.

        Parameters:
        name - Feature name.
        Returns:
        The current state of the feature, true or false.
        Throws:
        NullPointerException - If the name parameter is null.

      • setAttribute

        public abstract void setAttribute(String name,
                                  Object value)
        Allows the user to set specific attributes on the underlying implementation. An attribute in this context is defined to be an option that the implementation provides. An IllegalArgumentException is thrown if the underlying implementation doesn't recognize the attribute.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD and XMLConstants.ACCESS_EXTERNAL_STYLESHEET properties.

        • Access to external DTDs in the source file is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_DTD property. If access is denied during transformation due to the restriction of this property, TransformerException will be thrown by Transformer.transform(Source, Result).

          Access to external DTDs in the stylesheet is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_DTD property. If access is denied during the creation of a new transformer due to the restriction of this property, TransformerConfigurationException will be thrown by the newTransformer(Source) method.

          Access to external reference set by the stylesheet processing instruction, Import and Include element is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_STYLESHEET property. If access is denied during the creation of a new transformer due to the restriction of this property, TransformerConfigurationException will be thrown by the newTransformer(Source) method.

          Access to external document through XSLT document function is restricted to the protocols specified by the property. If access is denied during the transformation due to the restriction of this property, TransformerException will be thrown by the Transformer.transform(Source, Result) method.

        Parameters:
        name - The name of the attribute.
        value - The value of the attribute.
        Throws:
        IllegalArgumentException - When implementation does not recognize the attribute.

      • getAttribute

        public abstract Object getAttribute(String name)
        Allows the user to retrieve specific attributes on the underlying implementation. An IllegalArgumentException is thrown if the underlying implementation doesn't recognize the attribute.
        Parameters:
        name - The name of the attribute.
        Returns:
        value The value of the attribute.
        Throws:
        IllegalArgumentException - When implementation does not recognize the attribute.

      • setErrorListener

        public abstract void setErrorListener(ErrorListener listener)
        Set the error event listener for the TransformerFactory, which is used for the processing of transformation instructions, and not for the transformation itself. An IllegalArgumentException is thrown if the ErrorListener listener is null.
        Parameters:
        listener - The new error listener.
        Throws:
        IllegalArgumentException - When listener is null

      • getErrorListener

        public abstract ErrorListener getErrorListener()
        Get the error event handler for the TransformerFactory.
        Returns:
        The current error handler, which should never be null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransformerFactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Class TransformerFactoryConfigurationError

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Error
        • javax.xml.transform.TransformerFactoryConfigurationError
  • All Implemented Interfaces:
    Serializable

    public class TransformerFactoryConfigurationError
extends Error
    Thrown when a problem with configuration with the Transformer Factories exists. This error will typically be thrown when the class of a transformation factory specified in the system properties cannot be found or instantiated.
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TransformerFactoryConfigurationError()
      Create a new TransformerFactoryConfigurationError with no detail mesage.
      TransformerFactoryConfigurationError(Exception e)
      Create a new TransformerFactoryConfigurationError with a given Exception base cause of the error.
      TransformerFactoryConfigurationError(Exception e, String msg)
      Create a new TransformerFactoryConfigurationError with the given Exception base cause and detail message.
      TransformerFactoryConfigurationError(String msg)
      Create a new TransformerFactoryConfigurationError with the String specified as an error message.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      use the exception chaining mechanism of JDK1.4
      Exception getException()
      Return the actual exception (if any) that caused this exception to be raised.
      String getMessage()
      Return the message (if any) for this error .

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransformerFactoryConfigurationError

        public TransformerFactoryConfigurationError()
        Create a new TransformerFactoryConfigurationError with no detail mesage.

      • TransformerFactoryConfigurationError

        public TransformerFactoryConfigurationError(String msg)
        Create a new TransformerFactoryConfigurationError with the String specified as an error message.
        Parameters:
        msg - The error message for the exception.

      • TransformerFactoryConfigurationError

        public TransformerFactoryConfigurationError(Exception e)
        Create a new TransformerFactoryConfigurationError with a given Exception base cause of the error.
        Parameters:
        e - The exception to be encapsulated in a TransformerFactoryConfigurationError.

      • TransformerFactoryConfigurationError

        public TransformerFactoryConfigurationError(Exception e,
                                            String msg)
        Create a new TransformerFactoryConfigurationError with the given Exception base cause and detail message.
        Parameters:
        e - The exception to be encapsulated in a TransformerFactoryConfigurationError
        msg - The detail message.

    • Method Detail

      • getMessage

        public String getMessage()
        Return the message (if any) for this error . If there is no message for the exception and there is an encapsulated exception then the message of that exception will be returned.
        Overrides:
        getMessage in class Throwable
        Returns:
        The error message.

      • getException

        public Exception getException()
        Return the actual exception (if any) that caused this exception to be raised.
        Returns:
        The encapsulated exception, or null if there is none.

      • getCause

        public Throwable getCause()
        use the exception chaining mechanism of JDK1.4
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


URIResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.transform

Interface URIResolver

  • public interface URIResolver

    An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Source resolve(String href, String base)
      Called by the processor when it encounters an xsl:include, xsl:import, or document() function.

    • Method Detail

      • resolve

        Source resolve(String href,
               String base)
        throws TransformerException
        Called by the processor when it encounters an xsl:include, xsl:import, or document() function.
        Parameters:
        href - An href attribute, which may be relative or absolute.
        base - The base URI against which the first argument will be made absolute if the absolute URI is required.
        Returns:
        A Source object, or null if the href cannot be resolved, and the processor should try to resolve the URI itself.
        Throws:
        TransformerException - if an error occurs when trying to resolve the URI.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


validation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.validation

This package provides an API for validation of XML documents.

See: Description

  • Class Summary
    Class Description
    Schema
    Immutable in-memory representation of grammar.
    SchemaFactory
    Factory that creates Schema objects. Entry-point to the validation API.
    SchemaFactoryLoader
    Factory that creates SchemaFactory.
    TypeInfoProvider
    This class provides access to the type information determined by ValidatorHandler.
    Validator
    A processor that checks an XML document against Schema.
    ValidatorHandler
    Streaming validator that works on SAX stream.
  • Error Summary
    Error Description
    SchemaFactoryConfigurationError
    Thrown when a problem with configuration with the Schema Factories exists.

Package javax.xml.validation Description

This package provides an API for validation of XML documents. Validation is the process of verifying that an XML document is an instance of a specified XML schema. An XML schema defines the content model (also called a grammar or vocabulary) that its instance documents will represent.

There are a number of popular technologies available for creating an XML schema. Some of the most popular include:

  • Document Type Definition (DTD) - XML's built-in schema language.
  • W3C XML Schema (WXS) - an object-oriented XML schema language. WXS also provides a type system for constraining the character data of an XML document. WXS is maintained by the World Wide Web Consortium (W3C) and is a W3C Recommendation (that is, a ratified W3C standard specification).
  • RELAX NG (RNG) - a pattern-based, user-friendly XML schema language. RNG schemas may also use types to constrain XML character data. RNG is maintained by the Organization for the Advancement of Structured Information Standards (OASIS) and is both an OASIS and an ISO (International Organization for Standardization) standard.
  • Schematron - a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model, Schematron is designed to enforce individual rules that are difficult or impossible to express with other schema languages. Schematron is intended to supplement a schema written in structural schema language such as the aforementioned. Schematron is in the process of becoming an ISO standard.

Previous versions of JAXP supported validation as a feature of an XML parser, represented by either a SAXParser or DocumentBuilder instance.

The JAXP validation API decouples the validation of an instance document from the parsing of an XML document. This is advantageous for several reasons, some of which are:

  • Support for additional schema langauges. As of JDK 1.5, the two most popular JAXP parser implementations, Crimson and Xerces, only support a subset of the available XML schema languages. The Validation API provides a standard mechanism through which applications may take of advantage of specialization validation libraries which support additional schema languages.
  • Easy runtime coupling of an XML instance and schema. Specifying the location of a schema to use for validation with JAXP parsers can be confusing. The Validation API makes this process simple (see example below).

Usage example. The following example demonstrates validating an XML document with the Validation API (for readability, some exception handling is not shown):

    // parse an XML document into a DOM tree
    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document document = parser.parse(new File("instance.xml"));

    // create a SchemaFactory capable of understanding WXS schemas
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

    // load a WXS schema, represented by a Schema instance
    Source schemaFile = new StreamSource(new File("mySchema.xsd"));
    Schema schema = factory.newSchema(schemaFile);

    // create a Validator instance, which can be used to validate an instance document
    Validator validator = schema.newValidator();

    // validate the DOM tree
    try {
        validator.validate(new DOMSource(document));
    } catch (SAXException e) {
        // instance document is invalid!
    }

The JAXP parsing API has been integrated with the Validation API. Applications may create a Schema with the validation API and associate it with a DocumentBuilderFactory or a SAXParserFactory instance by using the DocumentBuilderFactory.setSchema(Schema) and SAXParserFactory.setSchema(Schema) methods. You should not both set a schema and call setValidating(true) on a parser factory. The former technique will cause parsers to use the new validation API; the latter will cause parsers to use their own internal validation facilities. Turning on both of these options simultaneously will cause either redundant behavior or error conditions.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.validation Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.validation

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.validation.Schema
    • javax.xml.validation.SchemaFactory
    • javax.xml.validation.SchemaFactoryLoader
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • javax.xml.validation.SchemaFactoryConfigurationError
    • javax.xml.validation.TypeInfoProvider
    • javax.xml.validation.Validator
    • javax.xml.validation.ValidatorHandler (implements org.xml.sax.ContentHandler)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.validation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.validation

  • Packages that use javax.xml.validation
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.
  • Classes in javax.xml.validation used by javax.xml.bind
    Class and Description
    Schema
    Immutable in-memory representation of grammar.
  • Classes in javax.xml.validation used by javax.xml.bind.helpers
    Class and Description
    Schema
    Immutable in-memory representation of grammar.
  • Classes in javax.xml.validation used by javax.xml.parsers
    Class and Description
    Schema
    Immutable in-memory representation of grammar.
  • Classes in javax.xml.validation used by javax.xml.validation
    Class and Description
    Schema
    Immutable in-memory representation of grammar.
    SchemaFactory
    Factory that creates Schema objects. Entry-point to the validation API.
    TypeInfoProvider
    This class provides access to the type information determined by ValidatorHandler.
    Validator
    A processor that checks an XML document against Schema.
    ValidatorHandler
    Streaming validator that works on SAX stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.Schema

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.Schema

  • Packages that use Schema
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of Schema in javax.xml.bind

      Methods in javax.xml.bind that return Schema
      Modifier and Type Method and Description
      Schema Unmarshaller.getSchema()
      Get the JAXP 1.3 Schema object being used to perform unmarshal-time validation.
      Schema Marshaller.getSchema()
      Get the JAXP 1.3 Schema object being used to perform marshal-time validation.
      abstract Schema Binder.getSchema()
      Gets the last Schema object (including null) set by the Binder.setSchema(Schema) method.
      Methods in javax.xml.bind with parameters of type Schema
      Modifier and Type Method and Description
      void Unmarshaller.setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent unmarshal operations against.
      void Marshaller.setSchema(Schema schema)
      Specify the JAXP 1.3 Schema object that should be used to validate subsequent marshal operations against.
      abstract void Binder.setSchema(Schema schema)
      Specifies whether marshal, unmarshal and update methods performs validation on their XML content.

    • Uses of Schema in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return Schema
      Modifier and Type | Method and Description
      Schema | AbstractUnmarshallerImpl.getSchema()
      Schema | AbstractMarshallerImpl.getSchema()
      Methods in javax.xml.bind.helpers with parameters of type Schema
      Modifier and Type | Method and Description
      void | AbstractUnmarshallerImpl.setSchema(Schema schema)
      void | AbstractMarshallerImpl.setSchema(Schema schema)

    • Uses of Schema in javax.xml.parsers

      Methods in javax.xml.parsers that return Schema
      Modifier and Type Method and Description
      Schema DocumentBuilderFactory.getSchema()
      Gets the Schema object specified through the DocumentBuilderFactory.setSchema(Schema schema) method.
      Schema DocumentBuilder.getSchema()
      Get a reference to the the Schema being used by the XML processor.
      Schema SAXParserFactory.getSchema()
      Gets the Schema object specified through the SAXParserFactory.setSchema(Schema schema) method.
      Schema SAXParser.getSchema()
      Get a reference to the the Schema being used by the XML processor.
      Methods in javax.xml.parsers with parameters of type Schema
      Modifier and Type Method and Description
      void DocumentBuilderFactory.setSchema(Schema schema)
      Set the Schema to be used by parsers created from this factory.
      void SAXParserFactory.setSchema(Schema schema)
      Set the Schema to be used by parsers created from this factory.

    • Uses of Schema in javax.xml.validation

      Methods in javax.xml.validation that return Schema
      Modifier and Type Method and Description
      abstract Schema SchemaFactory.newSchema()
      Creates a special Schema object.
      Schema SchemaFactory.newSchema(File schema)
      Parses the specified File as a schema and returns it as a Schema.
      Schema SchemaFactory.newSchema(Source schema)
      Parses the specified source as a schema and returns it as a schema.
      abstract Schema SchemaFactory.newSchema(Source[] schemas)
      Parses the specified source(s) as a schema and returns it as a schema.
      Schema SchemaFactory.newSchema(URL schema)
      Parses the specified URL as a schema and returns it as a Schema.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.SchemaFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.SchemaFactory

  • Packages that use SchemaFactory
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of SchemaFactory in javax.xml.validation

      Methods in javax.xml.validation that return SchemaFactory
      Modifier and Type Method and Description
      abstract SchemaFactory SchemaFactoryLoader.newFactory(String schemaLanguage)
      Creates a new SchemaFactory object for the specified schema language.
      static SchemaFactory SchemaFactory.newInstance(String schemaLanguage)
      Lookup an implementation of the SchemaFactory that supports the specified schema language and return it.
      static SchemaFactory SchemaFactory.newInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a SchemaFactory from class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.SchemaFactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.SchemaFactoryConfigurationError

No usage of javax.xml.validation.SchemaFactoryConfigurationError
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.SchemaFactoryLoader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.SchemaFactoryLoader

No usage of javax.xml.validation.SchemaFactoryLoader
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.TypeInfoProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.TypeInfoProvider

  • Packages that use TypeInfoProvider
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of TypeInfoProvider in javax.xml.validation

      Methods in javax.xml.validation that return TypeInfoProvider
      Modifier and Type Method and Description
      abstract TypeInfoProvider ValidatorHandler.getTypeInfoProvider()
      Obtains the TypeInfoProvider implementation of this ValidatorHandler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.Validator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.Validator

  • Packages that use Validator
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of Validator in javax.xml.validation

      Methods in javax.xml.validation that return Validator
      Modifier and Type Method and Description
      abstract Validator Schema.newValidator()
      Creates a new Validator for this Schema.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.validation.ValidatorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.validation.ValidatorHandler

  • Packages that use ValidatorHandler
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of ValidatorHandler in javax.xml.validation

      Methods in javax.xml.validation that return ValidatorHandler
      Modifier and Type Method and Description
      abstract ValidatorHandler Schema.newValidatorHandler()
      Creates a new ValidatorHandler for this Schema.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Schema

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class Schema

  • java.lang.Object
    • javax.xml.validation.Schema

  • public abstract class Schema
extends Object
    Immutable in-memory representation of grammar.

    This object represents a set of constraints that can be checked/ enforced against an XML document.

    A Schema object is thread safe and applications are encouraged to share it across many parsers in many threads.

    A Schema object is immutable in the sense that it shouldn't change the set of constraints once it is created. In other words, if an application validates the same document twice against the same Schema, it must always produce the same result.

    A Schema object is usually created from SchemaFactory.

    Two kinds of validators can be created from a Schema object. One is Validator, which provides highly-level validation operations that cover typical use cases. The other is ValidatorHandler, which works on top of SAX for better modularity.

    This specification does not refine the Object.equals(java.lang.Object) method. In other words, if you parse the same schema twice, you may still get !schemaA.equals(schemaB).

    Since:
    1.5
    See Also:
    XML Schema Part 1: Structures, Extensible Markup Language (XML) 1.1, Extensible Markup Language (XML) 1.0 (Second Edition)

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected Schema()
      Constructor for the derived class.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Validator newValidator()
      Creates a new Validator for this Schema.
      abstract ValidatorHandler newValidatorHandler()
      Creates a new ValidatorHandler for this Schema.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Schema

        protected Schema()
        Constructor for the derived class.

        The constructor does nothing.

    • Method Detail

      • newValidator

        public abstract Validator newValidator()
        Creates a new Validator for this Schema.

        A validator enforces/checks the set of constraints this object represents.

        Implementors should assure that the properties set on the SchemaFactory that created this Schema are also set on the Validator constructed.

        Returns:
        Always return a non-null valid object.

      • newValidatorHandler

        public abstract ValidatorHandler newValidatorHandler()
        Creates a new ValidatorHandler for this Schema.

        Implementors should assure that the properties set on the SchemaFactory that created this Schema are also set on the ValidatorHandler constructed.

        Returns:
        Always return a non-null valid object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SchemaFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class SchemaFactory

  • java.lang.Object
    • javax.xml.validation.SchemaFactory

  • public abstract class SchemaFactory
extends Object
    Factory that creates Schema objects. Entry-point to the validation API.

    SchemaFactory is a schema compiler. It reads external representations of schemas and prepares them for validation.

    The SchemaFactory class is not thread-safe. In other words, it is the application's responsibility to ensure that at most one thread is using a SchemaFactory object at any given moment. Implementations are encouraged to mark methods as synchronized to protect themselves from broken clients.

    SchemaFactory is not re-entrant. While one of the newSchema methods is being invoked, applications may not attempt to recursively invoke the newSchema method, even from the same thread.

    Schema Language

    This spec uses a namespace URI to designate a schema language. The following table shows the values defined by this specification.

    To be compliant with the spec, the implementation is only required to support W3C XML Schema 1.0. However, if it chooses to support other schema languages listed here, it must conform to the relevant behaviors described in this spec.

    Schema languages not listed here are expected to introduce their own URIs to represent themselves. The SchemaFactory class is capable of locating other implementations for other schema languages at run-time.

    Note that because the XML DTD is strongly tied to the parsing process and has a significant effect on the parsing process, it is impossible to define the DTD validation as a process independent from parsing. For this reason, this specification does not define the semantics for the XML DTD. This doesn't prohibit implementors from implementing it in a way they see fit, but users are warned that any DTD validation implemented on this interface necessarily deviate from the XML DTD semantics as defined in the XML 1.0.
    value | language
    XMLConstants.W3C_XML_SCHEMA_NS_URI ("http://www.w3.org/2001/XMLSchema") | W3C XML Schema 1.0
    XMLConstants.RELAXNG_NS_URI ("http://relaxng.org/ns/structure/1.0") | RELAX NG 1.0

    Since:
    1.5

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SchemaFactory()
      Constructor for derived classes.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract ErrorHandler getErrorHandler()
      Gets the current ErrorHandler set to this SchemaFactory.
      boolean getFeature(String name)
      Look up the value of a feature flag.
      Object getProperty(String name)
      Look up the value of a property.
      abstract LSResourceResolver getResourceResolver()
      Gets the current LSResourceResolver set to this SchemaFactory.
      abstract boolean isSchemaLanguageSupported(String schemaLanguage)
      Is specified schema supported by this SchemaFactory?
      static SchemaFactory newInstance(String schemaLanguage)
      Lookup an implementation of the SchemaFactory that supports the specified schema language and return it.
      static SchemaFactory newInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a SchemaFactory from class name.
      abstract Schema newSchema()
      Creates a special Schema object.
      Schema newSchema(File schema)
      Parses the specified File as a schema and returns it as a Schema.
      Schema newSchema(Source schema)
      Parses the specified source as a schema and returns it as a schema.
      abstract Schema newSchema(Source[] schemas)
      Parses the specified source(s) as a schema and returns it as a schema.
      Schema newSchema(URL schema)
      Parses the specified URL as a schema and returns it as a Schema.
      abstract void setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the newSchema method invocation.
      void setFeature(String name, boolean value)
      Set a feature for this SchemaFactory, Schemas created by this factory, and by extension, Validators and ValidatorHandlers created by those Schemas.
      void setProperty(String name, Object object)
      Set the value of a property.
      abstract void setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution when parsing schemas.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SchemaFactory

        protected SchemaFactory()

        Constructor for derived classes.

        The constructor does nothing.

        Derived classes must create SchemaFactory objects that have null ErrorHandler and null LSResourceResolver.

    • Method Detail

      • newInstance

        public static SchemaFactory newInstance(String schemaLanguage)

        Lookup an implementation of the SchemaFactory that supports the specified schema language and return it.

        To find a SchemaFactory object for a given schema language, this method looks the following places in the following order where "the class loader" refers to the context class loader:

        1. If the system property "javax.xml.validation.SchemaFactory:schemaLanguage" is present (where schemaLanguage is the parameter to this method), then its value is read as a class name. The method will try to create a new instance of this class by using the class loader, and returns it if it is successfully created.
        2. $java.home/lib/jaxp.properties is read and the value associated with the key being the system property above is looked for. If present, the value is processed just like above.
        3. Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
          Each potential service provider is required to implement the method isSchemaLanguageSupported(String schemaLanguage).
          The first service provider found that supports the specified schema language is returned.
          In case of ServiceConfigurationError a SchemaFactoryConfigurationError will be thrown.
        4. Platform default SchemaFactory is located in a implementation specific way. There must be a platform default SchemaFactory for W3C XML Schema.

        If everything fails, IllegalArgumentException will be thrown.

        Tip for Trouble-shooting:

        See Properties.load(java.io.InputStream) for exactly how a property file is parsed. In particular, colons ':' need to be escaped in a property file, so make sure schema language URIs are properly escaped in it. For example:

         http\://www.w3.org/2001/XMLSchema=org.acme.foo.XSSchemaFactory
        Parameters:
        schemaLanguage - Specifies the schema language which the returned SchemaFactory will understand. See the list of available schema languages for the possible values.
        Returns:
        New instance of a SchemaFactory
        Throws:
        IllegalArgumentException - If no implementation of the schema language is available.
        NullPointerException - If the schemaLanguage parameter is null.
        SchemaFactoryConfigurationError - If a configuration error is encountered.
        See Also:
        newInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader)

      • newInstance

        public static SchemaFactory newInstance(String schemaLanguage,
                                        String factoryClassName,
                                        ClassLoader classLoader)

        Obtain a new instance of a SchemaFactory from class name. SchemaFactory is returned if specified factory class name supports the specified schema language. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        schemaLanguage - Specifies the schema language which the returned SchemaFactory will understand. See the list of available schema languages for the possible values.
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.validation.SchemaFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        New instance of a SchemaFactory
        Throws:
        IllegalArgumentException - if factoryClassName is null, or the factory class cannot be loaded, instantiated or doesn't support the schema language specified in schemLanguage parameter.
        NullPointerException - If the schemaLanguage parameter is null.
        Since:
        1.6
        See Also:
        newInstance(String schemaLanguage)

      • isSchemaLanguageSupported

        public abstract boolean isSchemaLanguageSupported(String schemaLanguage)

        Is specified schema supported by this SchemaFactory?

        Parameters:
        schemaLanguage - Specifies the schema language which the returned SchemaFactory will understand. schemaLanguage must specify a valid schema language.
        Returns:
        true if SchemaFactory supports schemaLanguage, else false.
        Throws:
        NullPointerException - If schemaLanguage is null.
        IllegalArgumentException - If schemaLanguage.length() == 0 or schemaLanguage does not specify a valid schema language.

      • getFeature

        public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a feature flag.

        The feature name is any fully-qualified URI. It is possible for a SchemaFactory to recognize a feature name but temporarily be unable to return its value.

        Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the SchemaFactory recognizes the feature name but cannot determine its value at this time.
        NullPointerException - If name is null.
        See Also:
        setFeature(String, boolean)

      • setFeature

        public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException

        Set a feature for this SchemaFactory, Schemas created by this factory, and by extension, Validators and ValidatorHandlers created by those Schemas.

        Implementors and developers should pay particular attention to how the special Schema object returned by newSchema() is processed. In some cases, for example, when the SchemaFactory and the class actually loading the schema come from different implementations, it may not be possible for SchemaFactory features to be inherited automatically. Developers should make sure that features, such as secure processing, are explicitly set in both places.

        The feature name is any fully-qualified URI. It is possible for a SchemaFactory to expose a feature value but to be unable to change the current value.

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is:

        • true: the implementation will limit XML processing to conform to implementation limits. Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorHandler.fatalError(SAXParseException exception). See setErrorHandler(ErrorHandler errorHandler).
        • false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        value - The requested value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the SchemaFactory recognizes the feature name but cannot set the requested value.
        NullPointerException - If name is null.
        See Also:
        getFeature(String)

      • setProperty

        public void setProperty(String name,
                        Object object)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
        Set the value of a property.

        The property name is any fully-qualified URI. It is possible for a SchemaFactory to recognize a property name but to be unable to change the current value.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD and XMLConstants.ACCESS_EXTERNAL_SCHEMA properties.

        • Access to external DTDs in Schema files is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_DTD property. If access is denied during the creation of new Schema due to the restriction of this property, SAXException will be thrown by the newSchema(Source) or newSchema(File) or newSchema(URL) or or newSchema(Source[]) method.

          Access to external DTDs in xml source files is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_DTD property. If access is denied during validation due to the restriction of this property, SAXException will be thrown by the Validator.validate(Source) or Validator.validate(Source, Result) method.

          Access to external reference set by the schemaLocation attribute is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_SCHEMA property. If access is denied during validation due to the restriction of this property, SAXException will be thrown by the Validator.validate(Source) or Validator.validate(Source, Result) method.

          Access to external reference set by the Import and Include element is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_SCHEMA property. If access is denied during the creation of new Schema due to the restriction of this property, SAXException will be thrown by the newSchema(Source) or newSchema(File) or newSchema(URL) or newSchema(Source[]) method.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        object - The requested value for the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the SchemaFactory recognizes the property name but cannot set the requested value.
        NullPointerException - If name is null.

      • getProperty

        public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a property.

        The property name is any fully-qualified URI. It is possible for a SchemaFactory to recognize a property name but temporarily be unable to return its value.

        SchemaFactorys are not required to recognize any specific property names.

        Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the property name but cannot determine its value at this time.
        NullPointerException - If name is null.
        See Also:
        setProperty(String, Object)

      • setErrorHandler

        public abstract void setErrorHandler(ErrorHandler errorHandler)
        Sets the ErrorHandler to receive errors encountered during the newSchema method invocation.

        Error handler can be used to customize the error handling process during schema parsing. When an ErrorHandler is set, errors found during the parsing of schemas will be first sent to the ErrorHandler.

        The error handler can abort the parsing of a schema immediately by throwing SAXException from the handler. Or for example it can print an error to the screen and try to continue the processing by returning normally from the ErrorHandler

        If any Throwable (or instances of its derived classes) is thrown from an ErrorHandler, the caller of the newSchema method will be thrown the same Throwable object.

        SchemaFactory is not allowed to throw SAXException without first reporting it to ErrorHandler.

        Applications can call this method even during a Schema is being parsed.

        When the ErrorHandler is null, the implementation will behave as if the following ErrorHandler is set:

         class DraconianErrorHandler implements ErrorHandler {
     public void fatalError( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void error( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void warning( SAXParseException e ) throws SAXException {
         // noop
     }
 }

        When a new SchemaFactory object is created, initially this field is set to null. This field will NOT be inherited to Schemas, Validators, or ValidatorHandlers that are created from this SchemaFactory.

        Parameters:
        errorHandler - A new error handler to be set. This parameter can be null.

      • getErrorHandler

        public abstract ErrorHandler getErrorHandler()
        Gets the current ErrorHandler set to this SchemaFactory.
        Returns:
        This method returns the object that was last set through the setErrorHandler(ErrorHandler) method, or null if that method has never been called since this SchemaFactory has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • setResourceResolver

        public abstract void setResourceResolver(LSResourceResolver resourceResolver)
        Sets the LSResourceResolver to customize resource resolution when parsing schemas.

        SchemaFactory uses a LSResourceResolver when it needs to locate external resources while parsing schemas, although exactly what constitutes "locating external resources" is up to each schema language. For example, for W3C XML Schema, this includes files <include>d or <import>ed, and DTD referenced from schema files, etc.

        Applications can call this method even during a Schema is being parsed.

        When the LSResourceResolver is null, the implementation will behave as if the following LSResourceResolver is set:

         class DumbDOMResourceResolver implements LSResourceResolver {
     public LSInput resolveResource(
         String publicId, String systemId, String baseURI) {

         return null; // always return null
     }
 }

        If a LSResourceResolver throws a RuntimeException (or instances of its derived classes), then the SchemaFactory will abort the parsing and the caller of the newSchema method will receive the same RuntimeException.

        When a new SchemaFactory object is created, initially this field is set to null. This field will NOT be inherited to Schemas, Validators, or ValidatorHandlers that are created from this SchemaFactory.

        Parameters:
        resourceResolver - A new resource resolver to be set. This parameter can be null.

      • getResourceResolver

        public abstract LSResourceResolver getResourceResolver()
        Gets the current LSResourceResolver set to this SchemaFactory.
        Returns:
        This method returns the object that was last set through the setResourceResolver(LSResourceResolver) method, or null if that method has never been called since this SchemaFactory has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • newSchema

        public Schema newSchema(Source schema)
                 throws SAXException

        Parses the specified source as a schema and returns it as a schema.

        This is a convenience method for newSchema(Source[] schemas).

        Parameters:
        schema - Source that represents a schema.
        Returns:
        New Schema from parsing schema.
        Throws:
        SAXException - If a SAX error occurs during parsing.
        NullPointerException - if schema is null.

      • newSchema

        public Schema newSchema(File schema)
                 throws SAXException

        Parses the specified File as a schema and returns it as a Schema.

        This is a convenience method for newSchema(Source schema).

        Parameters:
        schema - File that represents a schema.
        Returns:
        New Schema from parsing schema.
        Throws:
        SAXException - If a SAX error occurs during parsing.
        NullPointerException - if schema is null.

      • newSchema

        public Schema newSchema(URL schema)
                 throws SAXException

        Parses the specified URL as a schema and returns it as a Schema.

        This is a convenience method for newSchema(Source schema).

        Parameters:
        schema - URL that represents a schema.
        Returns:
        New Schema from parsing schema.
        Throws:
        SAXException - If a SAX error occurs during parsing.
        NullPointerException - if schema is null.

      • newSchema

        public abstract Schema newSchema(Source[] schemas)
                          throws SAXException
        Parses the specified source(s) as a schema and returns it as a schema.

        The callee will read all the Sources and combine them into a single schema. The exact semantics of the combination depends on the schema language that this SchemaFactory object is created for.

        When an ErrorHandler is set, the callee will report all the errors found in sources to the handler. If the handler throws an exception, it will abort the schema compilation and the same exception will be thrown from this method. Also, after an error is reported to a handler, the callee is allowed to abort the further processing by throwing it. If an error handler is not set, the callee will throw the first error it finds in the sources.

        W3C XML Schema 1.0

        The resulting schema contains components from the specified sources. The same result would be achieved if all these sources were imported, using appropriate values for schemaLocation and namespace, into a single schema document with a different targetNamespace and no components of its own, if the import elements were given in the same order as the sources. Section 4.2.3 of the XML Schema recommendation describes the options processors have in this regard. While a processor should be consistent in its treatment of JAXP schema sources and XML Schema imports, the behaviour between JAXP-compliant parsers may vary; in particular, parsers may choose to ignore all but the first <import> for a given namespace, regardless of information provided in schemaLocation.

        If the parsed set of schemas includes error(s) as specified in the section 5.1 of the XML Schema spec, then the error must be reported to the ErrorHandler.

        RELAX NG

        For RELAX NG, this method must throw UnsupportedOperationException if schemas.length!=1.

        Parameters:
        schemas - inputs to be parsed. SchemaFactory is required to recognize SAXSource, StreamSource, StAXSource, and DOMSource. Input schemas must be XML documents or XML elements and must not be null. For backwards compatibility, the results of passing anything other than a document or element are implementation-dependent. Implementations must either recognize and process the input or thrown an IllegalArgumentException.
        Returns:
        Always return a non-null valid Schema object. Note that when an error has been reported, there is no guarantee that the returned Schema object is meaningful.
        Throws:
        SAXException - If an error is found during processing the specified inputs. When an ErrorHandler is set, errors are reported to there first. See setErrorHandler(ErrorHandler).
        NullPointerException - If the schemas parameter itself is null or any item in the array is null.
        IllegalArgumentException - If any item in the array is not recognized by this method.
        UnsupportedOperationException - If the schema language doesn't support this operation.

      • newSchema

        public abstract Schema newSchema()
                          throws SAXException
        Creates a special Schema object.

        The exact semantics of the returned Schema object depend on the schema language for which this SchemaFactory is created.

        Also, implementations are allowed to use implementation-specific property/feature to alter the semantics of this method.

        Implementors and developers should pay particular attention to how the features set on this SchemaFactory are processed by this special Schema. In some cases, for example, when the SchemaFactory and the class actually loading the schema come from different implementations, it may not be possible for SchemaFactory features to be inherited automatically. Developers should make sure that features, such as secure processing, are explicitly set in both places.

        W3C XML Schema 1.0

        For XML Schema, this method creates a Schema object that performs validation by using location hints specified in documents.

        The returned Schema object assumes that if documents refer to the same URL in the schema location hints, they will always resolve to the same schema document. This asusmption allows implementations to reuse parsed results of schema documents so that multiple validations against the same schema will run faster.

        Note that the use of schema location hints introduces a vulnerability to denial-of-service attacks.

        RELAX NG

        RELAX NG does not support this operation.

        Returns:
        Always return non-null valid Schema object.
        Throws:
        UnsupportedOperationException - If this operation is not supported by the callee.
        SAXException - If this operation is supported but failed for some reason.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SchemaFactoryConfigurationError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class SchemaFactoryConfigurationError

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Error
        • javax.xml.validation.SchemaFactoryConfigurationError
  • All Implemented Interfaces:
    Serializable

    public final class SchemaFactoryConfigurationError
extends Error
    Thrown when a problem with configuration with the Schema Factories exists. This error will typically be thrown when the class of a schema factory specified in the system properties cannot be found or instantiated.
    Since:
    1.8
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SchemaFactoryConfigurationError()
      Create a new SchemaFactoryConfigurationError with no detail message.
      SchemaFactoryConfigurationError(String message)
      Create a new SchemaFactoryConfigurationError with the String specified as an error message.
      SchemaFactoryConfigurationError(String message, Throwable cause)
      Create a new SchemaFactoryConfigurationError with the given Throwable base cause and detail message.
      SchemaFactoryConfigurationError(Throwable cause)
      Create a new SchemaFactoryConfigurationError with the given Throwable base cause.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SchemaFactoryConfigurationError

        public SchemaFactoryConfigurationError()
        Create a new SchemaFactoryConfigurationError with no detail message.

      • SchemaFactoryConfigurationError

        public SchemaFactoryConfigurationError(String message)
        Create a new SchemaFactoryConfigurationError with the String specified as an error message.
        Parameters:
        message - The error message for the exception.

      • SchemaFactoryConfigurationError

        public SchemaFactoryConfigurationError(Throwable cause)
        Create a new SchemaFactoryConfigurationError with the given Throwable base cause.
        Parameters:
        cause - The exception or error to be encapsulated in a SchemaFactoryConfigurationError.

      • SchemaFactoryConfigurationError

        public SchemaFactoryConfigurationError(String message,
                                       Throwable cause)
        Create a new SchemaFactoryConfigurationError with the given Throwable base cause and detail message.
        Parameters:
        cause - The exception or error to be encapsulated in a SchemaFactoryConfigurationError.
        message - The detail message.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SchemaFactoryLoader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class SchemaFactoryLoader

  • java.lang.Object
    • javax.xml.validation.SchemaFactoryLoader

  • public abstract class SchemaFactoryLoader
extends Object

    Factory that creates SchemaFactory.

    DO NOT USE THIS CLASS

    This class was introduced as a part of an early proposal during the JSR-206 standardization process. The proposal was eventually abandoned but this class accidentally remained in the source tree, and made its way into the final version.

    This class does not participate in any JAXP 1.3 or JAXP 1.4 processing. It must not be used by users or JAXP implementations.

    Since:
    1.5

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SchemaFactoryLoader()
      A do-nothing constructor.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract SchemaFactory newFactory(String schemaLanguage)
      Creates a new SchemaFactory object for the specified schema language.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SchemaFactoryLoader

        protected SchemaFactoryLoader()
        A do-nothing constructor.

    • Method Detail

      • newFactory

        public abstract SchemaFactory newFactory(String schemaLanguage)
        Creates a new SchemaFactory object for the specified schema language.
        Parameters:
        schemaLanguage - See the list of available schema languages.
        Returns:
        null if the callee fails to create one.
        Throws:
        NullPointerException - If the schemaLanguage parameter is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeInfoProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class TypeInfoProvider

  • java.lang.Object
    • javax.xml.validation.TypeInfoProvider

  • public abstract class TypeInfoProvider
extends Object
    This class provides access to the type information determined by ValidatorHandler.

    Some schema languages, such as W3C XML Schema, encourages a validator to report the "type" it assigns to each attribute/element. Those applications who wish to access this type information can invoke methods defined on this "interface" to access such type information.

    Implementation of this "interface" can be obtained through the ValidatorHandler.getTypeInfoProvider() method.

    Since:
    1.5
    See Also:
    TypeInfo

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TypeInfoProvider()
      Constructor for the derived class.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract TypeInfo getAttributeTypeInfo(int index)
      Returns the immutable TypeInfo object for the specified attribute of the current element.
      abstract TypeInfo getElementTypeInfo()
      Returns the immutable TypeInfo object for the current element.
      abstract boolean isIdAttribute(int index)
      Returns true if the specified attribute is determined to be ID.
      abstract boolean isSpecified(int index)
      Returns false if the attribute was added by the validator.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TypeInfoProvider

        protected TypeInfoProvider()
        Constructor for the derived class.

        The constructor does nothing.

    • Method Detail

      • getElementTypeInfo

        public abstract TypeInfo getElementTypeInfo()

        Returns the immutable TypeInfo object for the current element.

        The method may only be called by the startElement event or the endElement event of the ContentHandler that the application sets to the ValidatorHandler.

        When W3C XML Schema validation is being performed, in the case where an element has a union type, the TypeInfo returned by a call to getElementTypeInfo() from the startElement event will be the union type. The TypeInfo returned by a call from the endElement event will be the actual member type used to validate the element.

        Returns:
        An immutable TypeInfo object that represents the type of the current element. Note that the caller can keep references to the obtained TypeInfo longer than the callback scope. Otherwise, this method returns null if the validator is unable to determine the type of the current element for some reason (for example, if the validator is recovering from an earlier error.)
        Throws:
        IllegalStateException - If this method is called from other ContentHandler methods.

      • getAttributeTypeInfo

        public abstract TypeInfo getAttributeTypeInfo(int index)
        Returns the immutable TypeInfo object for the specified attribute of the current element.

        The method may only be called by the startElement event of the ContentHandler that the application sets to the ValidatorHandler.

        Parameters:
        index - The index of the attribute. The same index for the Attributes object passed to the startElement callback.
        Returns:
        An immutable TypeInfo object that represents the type of the specified attribute. Note that the caller can keep references to the obtained TypeInfo longer than the callback scope. Otherwise, this method returns null if the validator is unable to determine the type.
        Throws:
        IndexOutOfBoundsException - If the index is invalid.
        IllegalStateException - If this method is called from other ContentHandler methods.

      • isIdAttribute

        public abstract boolean isIdAttribute(int index)
        Returns true if the specified attribute is determined to be ID.

        Exacly how an attribute is "determined to be ID" is up to the schema language. In case of W3C XML Schema, this means that the actual type of the attribute is the built-in ID type or its derived type.

        A DocumentBuilder uses this information to properly implement Attr.isId().

        The method may only be called by the startElement event of the ContentHandler that the application sets to the ValidatorHandler.

        Parameters:
        index - The index of the attribute. The same index for the Attributes object passed to the startElement callback.
        Returns:
        true if the type of the specified attribute is ID.
        Throws:
        IndexOutOfBoundsException - If the index is invalid.
        IllegalStateException - If this method is called from other ContentHandler methods.

      • isSpecified

        public abstract boolean isSpecified(int index)
        Returns false if the attribute was added by the validator.

        This method provides information necessary for a DocumentBuilder to determine what the DOM tree should return from the Attr.getSpecified() method.

        The method may only be called by the startElement event of the ContentHandler that the application sets to the ValidatorHandler.

        A general guideline for validators is to return true if the attribute was originally present in the pipeline, and false if it was added by the validator.

        Parameters:
        index - The index of the attribute. The same index for the Attributes object passed to the startElement callback.
        Returns:
        true if the attribute was present before the validator processes input. false if the attribute was added by the validator.
        Throws:
        IndexOutOfBoundsException - If the index is invalid.
        IllegalStateException - If this method is called from other ContentHandler methods.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Validator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class Validator

  • java.lang.Object
    • javax.xml.validation.Validator

  • public abstract class Validator
extends Object

    A processor that checks an XML document against Schema.

    A validator object is not thread-safe and not reentrant. In other words, it is the application's responsibility to make sure that one Validator object is not used from more than one thread at any given time, and while the validate method is invoked, applications may not recursively call the validate method.

    Since:
    1.5

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected Validator()
      Constructor for derived classes.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract ErrorHandler getErrorHandler()
      Gets the current ErrorHandler set to this Validator.
      boolean getFeature(String name)
      Look up the value of a feature flag.
      Object getProperty(String name)
      Look up the value of a property.
      abstract LSResourceResolver getResourceResolver()
      Gets the current LSResourceResolver set to this Validator.
      abstract void reset()
      Reset this Validator to its original configuration.
      abstract void setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the validate method invocation.
      void setFeature(String name, boolean value)
      Set the value of a feature flag.
      void setProperty(String name, Object object)
      Set the value of a property.
      abstract void setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution while in a validation episode.
      void validate(Source source)
      Validates the specified input.
      abstract void validate(Source source, Result result)
      Validates the specified input and send the augmented validation result to the specified output.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Validator

        protected Validator()
        Constructor for derived classes.

        The constructor does nothing.

        Derived classes must create Validator objects that have null ErrorHandler and null LSResourceResolver.

    • Method Detail

      • reset

        public abstract void reset()

        Reset this Validator to its original configuration.

        Validator is reset to the same state as when it was created with Schema.newValidator(). reset() is designed to allow the reuse of existing Validators thus saving resources associated with the creation of new Validators.

        The reset Validator is not guaranteed to have the same LSResourceResolver or ErrorHandler Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal LSResourceResolver and ErrorHandler.

      • validate

        public void validate(Source source)
              throws SAXException,
                     IOException
        Validates the specified input.

        This is just a convenience method for validate(Source source, Result result) with result of null.

        Parameters:
        source - XML to be validated. Must be an XML document or XML element and must not be null. For backwards compatibility, the results of attempting to validate anything other than a document or element are implementation-dependent. Implementations must either recognize and process the input or throw an IllegalArgumentException.
        Throws:
        IllegalArgumentException - If the Source is an XML artifact that the implementation cannot validate (for example, a processing instruction).
        SAXException - If the ErrorHandler throws a SAXException or if a fatal error is found and the ErrorHandler returns normally.
        IOException - If the validator is processing a SAXSource and the underlying XMLReader throws an IOException.
        NullPointerException - If source is null.
        See Also:
        validate(Source source, Result result)

      • validate

        public abstract void validate(Source source,
                              Result result)
                       throws SAXException,
                              IOException

        Validates the specified input and send the augmented validation result to the specified output.

        This method places the following restrictions on the types of the Source/Result accepted.

        Source / Result Accepted
        StreamSource SAXSource DOMSource StAXSource
        null | OK | OK | OK | OK
        StreamResult | OK | IllegalArgumentException | IllegalArgumentException | IllegalArgumentException
        SAXResult | IllegalArgumentException | OK | IllegalArgumentException | IllegalArgumentException
        DOMResult | IllegalArgumentException | IllegalArgumentException | OK | IllegalArgumentException
        StAXResult | IllegalArgumentException | IllegalArgumentException | IllegalArgumentException | OK

        To validate one Source into another kind of Result, use the identity transformer (see TransformerFactory.newTransformer()).

        Errors found during the validation is sent to the specified ErrorHandler.

        If a document is valid, or if a document contains some errors but none of them were fatal and the ErrorHandler didn't throw any exception, then the method returns normally.

        Parameters:
        source - XML to be validated. Must be an XML document or XML element and must not be null. For backwards compatibility, the results of attempting to validate anything other than a document or element are implementation-dependent. Implementations must either recognize and process the input or throw an IllegalArgumentException.
        result - The Result object that receives (possibly augmented) XML. This parameter can be null if the caller is not interested in it. Note that when a DOMResult is used, a validator might just pass the same DOM node from DOMSource to DOMResult (in which case source.getNode()==result.getNode()), it might copy the entire DOM tree, or it might alter the node given by the source.
        Throws:
        IllegalArgumentException - If the Result type doesn't match the Source type of if the Source is an XML artifact that the implementation cannot validate (for example, a processing instruction).
        SAXException - If the ErrorHandler throws a SAXException or if a fatal error is found and the ErrorHandler returns normally.
        IOException - If the validator is processing a SAXSource and the underlying XMLReader throws an IOException.
        NullPointerException - If the source parameter is null.
        See Also:
        validate(Source source)

      • setErrorHandler

        public abstract void setErrorHandler(ErrorHandler errorHandler)
        Sets the ErrorHandler to receive errors encountered during the validate method invocation.

        Error handler can be used to customize the error handling process during a validation. When an ErrorHandler is set, errors found during the validation will be first sent to the ErrorHandler.

        The error handler can abort further validation immediately by throwing SAXException from the handler. Or for example it can print an error to the screen and try to continue the validation by returning normally from the ErrorHandler

        If any Throwable is thrown from an ErrorHandler, the caller of the validate method will be thrown the same Throwable object.

        Validator is not allowed to throw SAXException without first reporting it to ErrorHandler.

        When the ErrorHandler is null, the implementation will behave as if the following ErrorHandler is set:

         class DraconianErrorHandler implements ErrorHandler {
     public void fatalError( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void error( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void warning( SAXParseException e ) throws SAXException {
         // noop
     }
 }

        When a new Validator object is created, initially this field is set to null.

        Parameters:
        errorHandler - A new error handler to be set. This parameter can be null.

      • getErrorHandler

        public abstract ErrorHandler getErrorHandler()
        Gets the current ErrorHandler set to this Validator.
        Returns:
        This method returns the object that was last set through the setErrorHandler(ErrorHandler) method, or null if that method has never been called since this Validator has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • setResourceResolver

        public abstract void setResourceResolver(LSResourceResolver resourceResolver)
        Sets the LSResourceResolver to customize resource resolution while in a validation episode.

        Validator uses a LSResourceResolver when it needs to locate external resources while a validation, although exactly what constitutes "locating external resources" is up to each schema language.

        When the LSResourceResolver is null, the implementation will behave as if the following LSResourceResolver is set:

         class DumbLSResourceResolver implements LSResourceResolver {
     public LSInput resolveResource(
         String publicId, String systemId, String baseURI) {

         return null; // always return null
     }
 }

        If a LSResourceResolver throws a RuntimeException (or instances of its derived classes), then the Validator will abort the parsing and the caller of the validate method will receive the same RuntimeException.

        When a new Validator object is created, initially this field is set to null.

        Parameters:
        resourceResolver - A new resource resolver to be set. This parameter can be null.

      • getResourceResolver

        public abstract LSResourceResolver getResourceResolver()
        Gets the current LSResourceResolver set to this Validator.
        Returns:
        This method returns the object that was last set through the setResourceResolver(LSResourceResolver) method, or null if that method has never been called since this Validator has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • getFeature

        public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a feature flag.

        The feature name is any fully-qualified URI. It is possible for a Validator to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a validation.

        Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the Validator recognizes the feature name but cannot determine its value at this time.
        NullPointerException - When the name parameter is null.
        See Also:
        setFeature(String, boolean)

      • setFeature

        public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
        Set the value of a feature flag.

        Feature can be used to control the way a Validator parses schemas, although Validators are not required to recognize any specific feature names.

        The feature name is any fully-qualified URI. It is possible for a Validator to expose a feature value but to be unable to change the current value. Some feature values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.

        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        value - The requested value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the Validator recognizes the feature name but cannot set the requested value.
        NullPointerException - When the name parameter is null.
        See Also:
        getFeature(String)

      • setProperty

        public void setProperty(String name,
                        Object object)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
        Set the value of a property.

        The property name is any fully-qualified URI. It is possible for a Validator to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.

        All implementations that implement JAXP 1.5 or newer are required to support the XMLConstants.ACCESS_EXTERNAL_DTD and XMLConstants.ACCESS_EXTERNAL_SCHEMA properties.

        • Access to external DTDs in source or Schema file is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_DTD property. If access is denied during validation due to the restriction of this property, SAXException will be thrown by the validate(Source) method.

          Access to external reference set by the schemaLocation attribute is restricted to the protocols specified by the XMLConstants.ACCESS_EXTERNAL_SCHEMA property. If access is denied during validation due to the restriction of this property, SAXException will be thrown by the validate(Source) method.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        object - The requested value for the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the Validator recognizes the property name but cannot set the requested value.
        NullPointerException - When the name parameter is null.

      • getProperty

        public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a property.

        The property name is any fully-qualified URI. It is possible for a Validator to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a validation.

        Validators are not required to recognize any specific property names.

        Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the property name but cannot determine its value at this time.
        NullPointerException - When the name parameter is null.
        See Also:
        setProperty(String, Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValidatorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.validation

Class ValidatorHandler

  • java.lang.Object
    • javax.xml.validation.ValidatorHandler
  • All Implemented Interfaces:
    ContentHandler

    public abstract class ValidatorHandler
extends Object
implements ContentHandler
    Streaming validator that works on SAX stream.

    A ValidatorHandler object is not thread-safe and not reentrant. In other words, it is the application's responsibility to make sure that one ValidatorHandler object is not used from more than one thread at any given time.

    ValidatorHandler checks if the SAX events follow the set of constraints described in the associated Schema, and additionally it may modify the SAX events (for example by adding default values, etc.)

    ValidatorHandler extends from ContentHandler, but it refines the underlying ContentHandler in the following way:

    1. startElement/endElement events must receive non-null String for uri, localName, and qname, even though SAX allows some of them to be null. Similarly, the user-specified ContentHandler will receive non-null Strings for all three parameters.
    2. Applications must ensure that ValidatorHandler's ContentHandler.startPrefixMapping(String,String) and ContentHandler.endPrefixMapping(String) are invoked properly. Similarly, the user-specified ContentHandler will receive startPrefixMapping/endPrefixMapping events. If the ValidatorHandler introduces additional namespace bindings, the user-specified ContentHandler will receive additional startPrefixMapping/endPrefixMapping events.
    3. Attributes for the ContentHandler.startElement(String,String,String,Attributes) method may or may not include xmlns* attributes.

    A ValidatorHandler is automatically reset every time the startDocument method is invoked.

    Recognized Properties and Features

    This spec defines the following feature that must be recognized by all ValidatorHandler implementations.

    http://xml.org/sax/features/namespace-prefixes

    This feature controls how a ValidatorHandler introduces namespace bindings that were not present in the original SAX event stream. When this feature is set to true, it must make sure that the user's ContentHandler will see the corresponding xmlns* attribute in the Attributes object of the ContentHandler.startElement(String,String,String,Attributes) callback. Otherwise, xmlns* attributes must not be added to Attributes that's passed to the user-specified ContentHandler.

    (Note that regardless of this switch, namespace bindings are always notified to applications through ContentHandler.startPrefixMapping(String,String) and ContentHandler.endPrefixMapping(String) methods of the ContentHandler specified by the user.)

    Note that this feature does NOT affect the way a ValidatorHandler receives SAX events. It merely changes the way it augments SAX events.

    This feature is set to false by default.

    Since:
    1.5

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected ValidatorHandler()
      Constructor for derived classes.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract ContentHandler getContentHandler()
      Gets the ContentHandler which receives the augmented validation result.
      abstract ErrorHandler getErrorHandler()
      Gets the current ErrorHandler set to this ValidatorHandler.
      boolean getFeature(String name)
      Look up the value of a feature flag.
      Object getProperty(String name)
      Look up the value of a property.
      abstract LSResourceResolver getResourceResolver()
      Gets the current LSResourceResolver set to this ValidatorHandler.
      abstract TypeInfoProvider getTypeInfoProvider()
      Obtains the TypeInfoProvider implementation of this ValidatorHandler.
      abstract void setContentHandler(ContentHandler receiver)
      Sets the ContentHandler which receives the augmented validation result.
      abstract void setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the validation.
      void setFeature(String name, boolean value)
      Set a feature for this ValidatorHandler.
      void setProperty(String name, Object object)
      Set the value of a property.
      abstract void setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution while in a validation episode.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.xml.sax.ContentHandler

        characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

    • Constructor Detail

      • ValidatorHandler

        protected ValidatorHandler()

        Constructor for derived classes.

        The constructor does nothing.

        Derived classes must create ValidatorHandler objects that have null ErrorHandler and null LSResourceResolver.

    • Method Detail

      • setContentHandler

        public abstract void setContentHandler(ContentHandler receiver)
        Sets the ContentHandler which receives the augmented validation result.

        When a ContentHandler is specified, a ValidatorHandler will work as a filter and basically copy the incoming events to the specified ContentHandler.

        In doing so, a ValidatorHandler may modify the events, for example by adding defaulted attributes.

        A ValidatorHandler may buffer events to certain extent, but to allow ValidatorHandler to be used by a parser, the following requirement has to be met.

        1. When ContentHandler.startElement(String, String, String, Attributes), ContentHandler.endElement(String, String, String), ContentHandler.startDocument(), or ContentHandler.endDocument() are invoked on a ValidatorHandler, the same method on the user-specified ContentHandler must be invoked for the same event before the callback returns.
        2. ValidatorHandler may not introduce new elements that were not present in the input.
        3. ValidatorHandler may not remove attributes that were present in the input.

        When a callback method on the specified ContentHandler throws an exception, the same exception object must be thrown from the ValidatorHandler. The ErrorHandler should not be notified of such an exception.

        This method can be called even during a middle of a validation.

        Parameters:
        receiver - A ContentHandler or a null value.

      • getContentHandler

        public abstract ContentHandler getContentHandler()
        Gets the ContentHandler which receives the augmented validation result.
        Returns:
        This method returns the object that was last set through the getContentHandler() method, or null if that method has never been called since this ValidatorHandler has created.
        See Also:
        setContentHandler(ContentHandler)

      • setErrorHandler

        public abstract void setErrorHandler(ErrorHandler errorHandler)
        Sets the ErrorHandler to receive errors encountered during the validation.

        Error handler can be used to customize the error handling process during a validation. When an ErrorHandler is set, errors found during the validation will be first sent to the ErrorHandler.

        The error handler can abort further validation immediately by throwing SAXException from the handler. Or for example it can print an error to the screen and try to continue the validation by returning normally from the ErrorHandler

        If any Throwable is thrown from an ErrorHandler, the same Throwable object will be thrown toward the root of the call stack.

        ValidatorHandler is not allowed to throw SAXException without first reporting it to ErrorHandler.

        When the ErrorHandler is null, the implementation will behave as if the following ErrorHandler is set:

         class DraconianErrorHandler implements ErrorHandler {
     public void fatalError( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void error( SAXParseException e ) throws SAXException {
         throw e;
     }
     public void warning( SAXParseException e ) throws SAXException {
         // noop
     }
 }

        When a new ValidatorHandler object is created, initially this field is set to null.

        Parameters:
        errorHandler - A new error handler to be set. This parameter can be null.

      • getErrorHandler

        public abstract ErrorHandler getErrorHandler()
        Gets the current ErrorHandler set to this ValidatorHandler.
        Returns:
        This method returns the object that was last set through the setErrorHandler(ErrorHandler) method, or null if that method has never been called since this ValidatorHandler has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • setResourceResolver

        public abstract void setResourceResolver(LSResourceResolver resourceResolver)
        Sets the LSResourceResolver to customize resource resolution while in a validation episode.

        ValidatorHandler uses a LSResourceResolver when it needs to locate external resources while a validation, although exactly what constitutes "locating external resources" is up to each schema language.

        When the LSResourceResolver is null, the implementation will behave as if the following LSResourceResolver is set:

         class DumbLSResourceResolver implements LSResourceResolver {
     public LSInput resolveResource(
         String publicId, String systemId, String baseURI) {

         return null; // always return null
     }
 }

        If a LSResourceResolver throws a RuntimeException (or instances of its derived classes), then the ValidatorHandler will abort the parsing and the caller of the validate method will receive the same RuntimeException.

        When a new ValidatorHandler object is created, initially this field is set to null.

        Parameters:
        resourceResolver - A new resource resolver to be set. This parameter can be null.

      • getResourceResolver

        public abstract LSResourceResolver getResourceResolver()
        Gets the current LSResourceResolver set to this ValidatorHandler.
        Returns:
        This method returns the object that was last set through the setResourceResolver(LSResourceResolver) method, or null if that method has never been called since this ValidatorHandler has created.
        See Also:
        setErrorHandler(ErrorHandler)

      • getTypeInfoProvider

        public abstract TypeInfoProvider getTypeInfoProvider()
        Obtains the TypeInfoProvider implementation of this ValidatorHandler.

        The obtained TypeInfoProvider can be queried during a parse to access the type information determined by the validator.

        Some schema languages do not define the notion of type, for those languages, this method may not be supported. However, to be compliant with this specification, implementations for W3C XML Schema 1.0 must support this operation.

        Returns:
        null if the validator / schema language does not support the notion of TypeInfo. Otherwise a non-null valid TypeInfoProvider.

      • getFeature

        public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a feature flag.

        The feature name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a validation.

        Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the ValidatorHandler recognizes the feature name but cannot determine its value at this time.
        NullPointerException - When name is null.
        See Also:
        setFeature(String, boolean)

      • setFeature

        public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException

        Set a feature for this ValidatorHandler.

        Feature can be used to control the way a ValidatorHandler parses schemas. The feature name is any fully-qualified URI. It is possible for a SchemaFactory to expose a feature value but to be unable to change the current value. Some feature values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is:

        • true: the implementation will limit XML processing to conform to implementation limits. Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorHandler.fatalError(SAXParseException exception). See setErrorHandler(ErrorHandler errorHandler).
        • false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
        Parameters:
        name - The feature name, which is a non-null fully-qualified URI.
        value - The requested value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the ValidatorHandler recognizes the feature name but cannot set the requested value.
        NullPointerException - When name is null.
        See Also:
        getFeature(String)

      • setProperty

        public void setProperty(String name,
                        Object object)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
        Set the value of a property.

        The property name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.

        ValidatorHandlers are not required to recognize setting any specific property names.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        object - The requested value for the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the ValidatorHandler recognizes the property name but cannot set the requested value.
        NullPointerException - When name is null.

      • getProperty

        public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a property.

        The property name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a validation.

        ValidatorHandlers are not required to recognize any specific property names.

        Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

        Parameters:
        name - The property name, which is a non-null fully-qualified URI.
        Returns:
        The current value of the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the property name but cannot determine its value at this time.
        NullPointerException - When name is null.
        See Also:
        setProperty(String, Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ws

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws

This package contains the core JAX-WS APIs.

See: Description

  • Interface Summary
    Interface Description
    AsyncHandler<T>
    The AsyncHandler interface is implemented by clients that wish to receive callback notification of the completion of service endpoint operations invoked asynchronously.
    Binding
    The Binding interface is the base interface for JAX-WS protocol bindings.
    BindingProvider
    The BindingProvider interface provides access to the protocol binding and associated context objects for request and response message processing.
    Dispatch<T>
    The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
    LogicalMessage
    The LogicalMessage interface represents a protocol agnostic XML message and contains methods that provide access to the payload of the message.
    Provider<T>
    Service endpoints may implement the Provider interface as a dynamic alternative to an SEI.
    Response<T>
    The Response interface provides methods used to obtain the payload and context of a message sent in response to an operation invocation.
    WebServiceContext
    A WebServiceContext makes it possible for a web service endpoint implementation class to access message context and security information relative to a request being served.
  • Class Summary
    Class Description
    Endpoint
    A Web service endpoint.
    EndpointContext
    EndpointContext allows multiple endpoints in an application to share any information.
    EndpointReference
    This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint.
    Holder<T>
    Holds a value of type T.
    RespectBindingFeature
    This feature clarifies the use of the wsdl:binding in a JAX-WS runtime.
    Service
    Service objects provide the client view of a Web service.
    WebServiceFeature
    A WebServiceFeature is used to represent a feature that can be enabled or disabled for a web service.
    WebServicePermission
    This class defines web service permissions.
  • Enum Summary
    Enum Description
    Service.Mode
    The orientation of a dynamic client or service.
  • Exception Summary
    Exception Description
    ProtocolException
    The ProtocolException class is a base class for exceptions related to a specific protocol binding.
    WebServiceException
    The WebServiceException class is the base exception class for all JAX-WS API runtime exceptions.
  • Annotation Types Summary
    Annotation Type Description
    Action
    The Action annotation allows explicit association of a WS-Addressing Action message addressing property with input, output, and fault messages of the mapped WSDL operation.
    BindingType
    The BindingType annotation is used to specify the binding to use for a web service endpoint implementation class.
    FaultAction
    The FaultAction annotation is used inside an Action annotation to allow an explicit association of a WS-Addressing Action message addressing property with the fault messages of the WSDL operation mapped from the exception class.
    RequestWrapper
    Used to annotate methods in the Service Endpoint Interface with the request wrapper bean to be used at runtime.
    RespectBinding
    This feature clarifies the use of the wsdl:binding in a JAX-WS runtime.
    ResponseWrapper
    Used to annotate methods in the Service Endpoint Interface with the response wrapper bean to be used at runtime.
    ServiceMode
    Used to indicate whether a Provider implementation wishes to work with entire protocol messages or just with protocol message payloads.
    WebEndpoint
    Used to annotate the getPortName() methods of a generated service interface.
    WebFault
    Used to annotate service specific exception classes to customize to the local and namespace name of the fault element and the name of the fault bean.
    WebServiceClient
    Used to annotate a generated service interface.
    WebServiceProvider
    Used to annotate a Provider implementation class.
    WebServiceRef
    The WebServiceRef annotation is used to define a reference to a web service and (optionally) an injection target for it.
    WebServiceRefs
    The WebServiceRefs annotation allows multiple web service references to be declared at the class level.

Package javax.xml.ws Description

This package contains the core JAX-WS APIs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.ws.Endpoint
    • javax.xml.ws.EndpointContext
    • javax.xml.ws.EndpointReference
    • javax.xml.ws.Holder<T> (implements java.io.Serializable)
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • javax.xml.ws.WebServicePermission
    • javax.xml.ws.Service
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
    • javax.xml.ws.WebServiceFeature
      • javax.xml.ws.RespectBindingFeature

Interface Hierarchy

  • javax.xml.ws.AsyncHandler<T>
  • javax.xml.ws.Binding
  • javax.xml.ws.BindingProvider
    • javax.xml.ws.Dispatch<T>
  • java.util.concurrent.Future<V>
    • javax.xml.ws.Response<T>
  • javax.xml.ws.LogicalMessage
  • javax.xml.ws.Provider<T>
  • javax.xml.ws.WebServiceContext

Annotation Type Hierarchy

  • javax.xml.ws.WebServiceClient (implements java.lang.annotation.Annotation)
  • javax.xml.ws.WebEndpoint (implements java.lang.annotation.Annotation)
  • javax.xml.ws.BindingType (implements java.lang.annotation.Annotation)
  • javax.xml.ws.WebServiceProvider (implements java.lang.annotation.Annotation)
  • javax.xml.ws.RespectBinding (implements java.lang.annotation.Annotation)
  • javax.xml.ws.ServiceMode (implements java.lang.annotation.Annotation)
  • javax.xml.ws.Action (implements java.lang.annotation.Annotation)
  • javax.xml.ws.WebServiceRef (implements java.lang.annotation.Annotation)
  • javax.xml.ws.FaultAction (implements java.lang.annotation.Annotation)
  • javax.xml.ws.WebServiceRefs (implements java.lang.annotation.Annotation)
  • javax.xml.ws.WebFault (implements java.lang.annotation.Annotation)
  • javax.xml.ws.ResponseWrapper (implements java.lang.annotation.Annotation)
  • javax.xml.ws.RequestWrapper (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • javax.xml.ws.Service.Mode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws

  • Packages that use javax.xml.ws
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.http
    This package defines APIs specific to the HTTP binding.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
  • Classes in javax.xml.ws used by javax.xml.ws
    Class and Description
    AsyncHandler
    The AsyncHandler interface is implemented by clients that wish to receive callback notification of the completion of service endpoint operations invoked asynchronously.
    Binding
    The Binding interface is the base interface for JAX-WS protocol bindings.
    BindingProvider
    The BindingProvider interface provides access to the protocol binding and associated context objects for request and response message processing.
    Dispatch
    The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
    Endpoint
    A Web service endpoint.
    EndpointContext
    EndpointContext allows multiple endpoints in an application to share any information.
    EndpointReference
    This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint.
    Response
    The Response interface provides methods used to obtain the payload and context of a message sent in response to an operation invocation.
    Service
    Service objects provide the client view of a Web service.
    Service.Mode
    The orientation of a dynamic client or service.
    WebServiceException
    The WebServiceException class is the base exception class for all JAX-WS API runtime exceptions.
    WebServiceFeature
    A WebServiceFeature is used to represent a feature that can be enabled or disabled for a web service.
  • Classes in javax.xml.ws used by javax.xml.ws.handler
    Class and Description
    LogicalMessage
    The LogicalMessage interface represents a protocol agnostic XML message and contains methods that provide access to the payload of the message.
  • Classes in javax.xml.ws used by javax.xml.ws.http
    Class and Description
    Binding
    The Binding interface is the base interface for JAX-WS protocol bindings.
    ProtocolException
    The ProtocolException class is a base class for exceptions related to a specific protocol binding.
    WebServiceException
    The WebServiceException class is the base exception class for all JAX-WS API runtime exceptions.
  • Classes in javax.xml.ws used by javax.xml.ws.soap
    Class and Description
    Binding
    The Binding interface is the base interface for JAX-WS protocol bindings.
    ProtocolException
    The ProtocolException class is a base class for exceptions related to a specific protocol binding.
    WebServiceException
    The WebServiceException class is the base exception class for all JAX-WS API runtime exceptions.
    WebServiceFeature
    A WebServiceFeature is used to represent a feature that can be enabled or disabled for a web service.
  • Classes in javax.xml.ws used by javax.xml.ws.spi
    Class and Description
    Dispatch
    The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
    Endpoint
    A Web service endpoint.
    EndpointReference
    This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint.
    Service
    Service objects provide the client view of a Web service.
    Service.Mode
    The orientation of a dynamic client or service.
    WebServiceContext
    A WebServiceContext makes it possible for a web service endpoint implementation class to access message context and security information relative to a request being served.
    WebServiceFeature
    A WebServiceFeature is used to represent a feature that can be enabled or disabled for a web service.
  • Classes in javax.xml.ws used by javax.xml.ws.wsaddressing
    Class and Description
    EndpointReference
    This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Action

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type Action

  • @Documented
 @Retention(value=RUNTIME)
 @Target(value=METHOD)
public @interface Action
    The Action annotation allows explicit association of a WS-Addressing Action message addressing property with input, output, and fault messages of the mapped WSDL operation.

    This annotation can be specified on each method of a service endpoint interface. For such a method, the mapped operation in the generated WSDL's wsam:Action attribute on the WSDL input, output and fault messages of the WSDL operation is based upon which attributes of the Action annotation have been specified. For the exact computation of wsam:Action values for the messages, refer to the algorithm in the JAX-WS specification.

    Example 1: Specify explicit values for Action message addressing property for input and output messages.

     @WebService(targetNamespace="http://example.com/numbers")
 public class AddNumbersImpl {
     @Action(
         input="http://example.com/inputAction",
         output="http://example.com/outputAction")
     public int addNumbers(int number1, int number2) {
         return number1 + number2;
     }
 }
    The generated WSDL looks like:
       <definitions targetNamespace="http://example.com/numbers" ...>
     ...
     <portType name="AddNumbersPortType">
       <operation name="AddNumbers">
         <input message="tns:AddNumbersInput" name="foo"
           wsam:Action="http://example.com/inputAction"/>
         <output message="tns:AddNumbersOutput" name="bar"
           wsam:Action="http://example.com/outputAction"/>
       </operation>
     </portType>
     ...
   </definitions>

    Example 2: Specify explicit value for Action message addressing property for only the input message. The wsam:Action values for the WSDL output message are computed using the algorithm in the JAX-WS specification.

     @WebService(targetNamespace="http://example.com/numbers")
 public class AddNumbersImpl {
     @Action(input="http://example.com/inputAction")
     public int addNumbers(int number1, int number2) {
         return number1 + number2;
     }
 }
    The generated WSDL looks like:
       <definitions targetNamespace="http://example.com/numbers" ...>
     ...
     <portType name="AddNumbersPortType">
       <operation name="AddNumbers">
         <input message="tns:AddNumbersInput" name="foo"
           wsam:Action="http://example.com/inputAction" />
         <output message="tns:AddNumbersOutput" name="bar"
           wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbersResponse"/>
       </operation>
     </portType>
     ...
   </definitions>
    It is legitimate to specify an explicit value for Action message addressing property for output message only. In this case, wsam:Action value for the WSDL input message is computed using the algorithm in the JAX-WS specification.

    Example 3: See FaultAction annotation for an example of how to specify an explicit value for Action message addressing property for the fault message.

    Since:
    JAX-WS 2.1
    See Also:
    FaultAction

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      FaultAction[] fault
      Explicit value of the WS-Addressing Action message addressing property for the fault message(s) of the operation.
      String input
      Explicit value of the WS-Addressing Action message addressing property for the input message of the operation.
      String output
      Explicit value of the WS-Addressing Action message addressing property for the output message of the operation.

    • Element Detail

      • input

        public abstract String input
        Explicit value of the WS-Addressing Action message addressing property for the input message of the operation.
        Default:
        ""

      • output

        public abstract String output
        Explicit value of the WS-Addressing Action message addressing property for the output message of the operation.
        Default:
        ""

      • fault

        public abstract FaultAction[] fault
        Explicit value of the WS-Addressing Action message addressing property for the fault message(s) of the operation. Each exception that is mapped to a fault and requires an explicit WS-Addressing Action message addressing property, needs to be specified as a value in this property using FaultAction annotation.
        Default:
        {}
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AsyncHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface AsyncHandler<T>

  • public interface AsyncHandler<T>
    The AsyncHandler interface is implemented by clients that wish to receive callback notification of the completion of service endpoint operations invoked asynchronously.
    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void handleResponse(Response<T> res)
      Called when the response to an asynchronous operation is available.

    • Method Detail

      • handleResponse

        void handleResponse(Response<T> res)
        Called when the response to an asynchronous operation is available.
        Parameters:
        res - The response to the operation invocation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Binding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface Binding

  • All Known Subinterfaces:
    HTTPBinding, SOAPBinding

    public interface Binding
    The Binding interface is the base interface for JAX-WS protocol bindings.
    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBindingID()
      Get the URI for this binding instance.
      List<Handler> getHandlerChain()
      Gets a copy of the handler chain for a protocol binding instance.
      void setHandlerChain(List<Handler> chain)
      Sets the handler chain for the protocol binding instance.

    • Method Detail

      • getHandlerChain

        List<Handler> getHandlerChain()
        Gets a copy of the handler chain for a protocol binding instance. If the returned chain is modified a call to setHandlerChain is required to configure the binding instance with the new chain.
        Returns:
        java.util.List<Handler> Handler chain

      • setHandlerChain

        void setHandlerChain(List<Handler> chain)
        Sets the handler chain for the protocol binding instance.
        Parameters:
        chain - A List of handler configuration entries
        Throws:
        WebServiceException - On an error in the configuration of the handler chain
        UnsupportedOperationException - If this operation is not supported. This may be done to avoid any overriding of a pre-configured handler chain.

      • getBindingID

        String getBindingID()
        Get the URI for this binding instance.
        Returns:
        String The binding identifier for the port. Never returns null
        Since:
        JAX-WS 2.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface BindingProvider

  • All Known Subinterfaces:
    Dispatch<T>

    public interface BindingProvider
    The BindingProvider interface provides access to the protocol binding and associated context objects for request and response message processing.
    Since:
    JAX-WS 2.0
    See Also:
    Binding

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ENDPOINT_ADDRESS_PROPERTY
      Standard property: Target service endpoint address.
      static String PASSWORD_PROPERTY
      Standard property: Password for authentication.
      static String SESSION_MAINTAIN_PROPERTY
      Standard property: This boolean property is used by a service client to indicate whether or not it wants to participate in a session with a service endpoint.
      static String SOAPACTION_URI_PROPERTY
      Standard property for SOAPAction.
      static String SOAPACTION_USE_PROPERTY
      Standard property for SOAPAction.
      static String USERNAME_PROPERTY
      Standard property: User name for authentication.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Binding getBinding()
      Get the Binding for this binding provider.
      EndpointReference getEndpointReference()
      Returns the EndpointReference associated with this BindingProvider instance.
      <T extends EndpointReference>
      T             		getEndpointReference(Class<T> clazz)
      Returns the EndpointReference associated with this BindingProvider instance.
      Map<String,Object> getRequestContext()
      Get the context that is used to initialize the message context for request messages.
      Map<String,Object> getResponseContext()
      Get the context that resulted from processing a response message.

    • Field Detail

      • USERNAME_PROPERTY

        static final String USERNAME_PROPERTY
        Standard property: User name for authentication.

        Type: java.lang.String

        See Also:
        Constant Field Values

      • PASSWORD_PROPERTY

        static final String PASSWORD_PROPERTY
        Standard property: Password for authentication.

        Type: java.lang.String

        See Also:
        Constant Field Values

      • ENDPOINT_ADDRESS_PROPERTY

        static final String ENDPOINT_ADDRESS_PROPERTY
        Standard property: Target service endpoint address. The URI scheme for the endpoint address specification MUST correspond to the protocol/transport binding for the binding in use.

        Type: java.lang.String

        See Also:
        Constant Field Values

      • SESSION_MAINTAIN_PROPERTY

        static final String SESSION_MAINTAIN_PROPERTY
        Standard property: This boolean property is used by a service client to indicate whether or not it wants to participate in a session with a service endpoint. If this property is set to true, the service client indicates that it wants the session to be maintained. If set to false, the session is not maintained. The default value for this property is false.

        Type: java.lang.Boolean

        See Also:
        Constant Field Values

      • SOAPACTION_USE_PROPERTY

        static final String SOAPACTION_USE_PROPERTY
        Standard property for SOAPAction. This boolean property indicates whether or not the value of the javax.xml.ws.soap.http.soapaction.uri property is used for the value of the SOAPAction. The default value of this property is false indicating that the javax.xml.ws.soap.http.soapaction.uri property is not used for the value of the SOAPAction, however, if WS-Addressing is enabled, the default value is true.

        Type: java.lang.Boolean

        See Also:
        Constant Field Values

      • SOAPACTION_URI_PROPERTY

        static final String SOAPACTION_URI_PROPERTY
        Standard property for SOAPAction. Indicates the SOAPAction URI if the javax.xml.ws.soap.http.soapaction.use property is set to true. If WS-Addressing is enabled, this value will also be used for the value of the WS-Addressing Action header. If this property is not set, the default SOAPAction and WS-Addressing Action will be sent.

        Type: java.lang.String

        See Also:
        Constant Field Values

    • Method Detail

      • getRequestContext

        Map<String,Object> getRequestContext()
        Get the context that is used to initialize the message context for request messages. Modifications to the request context do not affect the message context of either synchronous or asynchronous operations that have already been started.
        Returns:
        The context that is used in processing request messages.

      • getResponseContext

        Map<String,Object> getResponseContext()
        Get the context that resulted from processing a response message. The returned context is for the most recently completed synchronous operation. Subsequent synchronous operation invocations overwrite the response context. Asynchronous operations return their response context via the Response interface.
        Returns:
        The context that resulted from processing the latest response messages.

      • getBinding

        Binding getBinding()
        Get the Binding for this binding provider.
        Returns:
        The Binding for this binding provider.

      • getEndpointReference

        EndpointReference getEndpointReference()
        Returns the EndpointReference associated with this BindingProvider instance.

        If the Binding for this bindingProvider is either SOAP1.1/HTTP or SOAP1.2/HTTP, then a W3CEndpointReference MUST be returned.

        Returns:
        EndpointReference of the target endpoint associated with this BindingProvider instance.
        Throws:
        UnsupportedOperationException - If this BindingProvider uses the XML/HTTP binding.
        Since:
        JAX-WS 2.1
        See Also:
        W3CEndpointReference

      • getEndpointReference

        <T extends EndpointReference> T getEndpointReference(Class<T> clazz)
        Returns the EndpointReference associated with this BindingProvider instance. The instance returned will be of type clazz.
        Parameters:
        clazz - Specifies the type of EndpointReference that MUST be returned.
        Returns:
        EndpointReference of the target endpoint associated with this BindingProvider instance. MUST be of type clazz.
        Throws:
        WebServiceException - If the Class clazz is not supported by this implementation.
        UnsupportedOperationException - If this BindingProvider uses the XML/HTTP binding.
        Since:
        JAX-WS 2.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type BindingType

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
 @Documented
public @interface BindingType
    The BindingType annotation is used to specify the binding to use for a web service endpoint implementation class.

    This annotation may be overriden programmatically or via deployment descriptors, depending on the platform in use.

    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String value
      A binding identifier (a URI).

    • Element Detail

      • value

        public abstract String value
        A binding identifier (a URI). If not specified, the default is the SOAP 1.1 / HTTP binding.

        See the SOAPBinding and HTTPBinding for the definition of the standard binding identifiers.

        See Also:
        Binding, SOAPBinding.SOAP11HTTP_BINDING, SOAPBinding.SOAP12HTTP_BINDING, HTTPBinding.HTTP_BINDING
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.Action

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.Action

No usage of javax.xml.ws.Action
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.BindingType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.BindingType

No usage of javax.xml.ws.BindingType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.Endpoint

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.Endpoint

  • Packages that use Endpoint
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Endpoint in javax.xml.ws

      Methods in javax.xml.ws that return Endpoint
      Modifier and Type Method and Description
      static Endpoint Endpoint.create(Object implementor)
      Creates an endpoint with the specified implementor object.
      static Endpoint Endpoint.create(Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified implementor object and web service features.
      static Endpoint Endpoint.create(String bindingId, Object implementor)
      Creates an endpoint with the specified binding type and implementor object.
      static Endpoint Endpoint.create(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified binding type, implementor object, and web service features.
      static Endpoint Endpoint.publish(String address, Object implementor)
      Creates and publishes an endpoint for the specified implementor object at the given address.
      static Endpoint Endpoint.publish(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint for the specified implementor object at the given address.
      Methods in javax.xml.ws that return types with arguments of type Endpoint
      Modifier and Type Method and Description
      abstract Set<Endpoint> EndpointContext.getEndpoints()
      This gives list of endpoints in an application.

    • Uses of Endpoint in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return Endpoint
      Modifier and Type Method and Description
      abstract Endpoint Provider.createAndPublishEndpoint(String address, Object implementor)
      Creates and publishes an endpoint object with the specified address and implementation object.
      Endpoint Provider.createAndPublishEndpoint(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint object with the specified address, implementation object and web service features.
      Endpoint Provider.createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation class, invoker and web service features.
      abstract Endpoint Provider.createEndpoint(String bindingId, Object implementor)
      Creates an endpoint object with the provided binding and implementation object.
      Endpoint Provider.createEndpoint(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation object and web service features.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.EndpointContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.EndpointContext

  • Packages that use EndpointContext
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.

    • Uses of EndpointContext in javax.xml.ws

      Methods in javax.xml.ws with parameters of type EndpointContext
      Modifier and Type Method and Description
      void Endpoint.setEndpointContext(EndpointContext ctxt)
      By settng a EndpointContext, JAX-WS runtime knows about addresses of other endpoints in an application.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.EndpointReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.EndpointReference

  • Packages that use EndpointReference
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of EndpointReference in javax.xml.ws

      Methods in javax.xml.ws with type parameters of type EndpointReference
      Modifier and Type Method and Description
      <T extends EndpointReference>
      T             		BindingProvider.getEndpointReference(Class<T> clazz)
      Returns the EndpointReference associated with this BindingProvider instance.
      <T extends EndpointReference>
      T             		WebServiceContext.getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this endpoint.
      abstract <T extends EndpointReference>
      T             		Endpoint.getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.
      Methods in javax.xml.ws that return EndpointReference
      Modifier and Type Method and Description
      EndpointReference BindingProvider.getEndpointReference()
      Returns the EndpointReference associated with this BindingProvider instance.
      EndpointReference WebServiceContext.getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference for this endpoint.
      abstract EndpointReference Endpoint.getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.
      static EndpointReference EndpointReference.readFrom(Source eprInfoset)
      Factory method to read an EndpointReference from the infoset contained in eprInfoset.
      Methods in javax.xml.ws with parameters of type EndpointReference
      Modifier and Type Method and Description
      <T> Dispatch<T> Service.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> T Service.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.

    • Uses of EndpointReference in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return EndpointReference
      Modifier and Type Method and Description
      abstract EndpointReference Provider.readEndpointReference(Source eprInfoset)
      read an EndpointReference from the infoset contained in eprInfoset.
      Methods in javax.xml.ws.spi with parameters of type EndpointReference
      Modifier and Type Method and Description
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract <T> T Provider.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T ServiceDelegate.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.

    • Uses of EndpointReference in javax.xml.ws.wsaddressing

      Subclasses of EndpointReference in javax.xml.ws.wsaddressing
      Modifier and Type Class and Description
      class  W3CEndpointReference
      This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.FaultAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.FaultAction

No usage of javax.xml.ws.FaultAction
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.Holder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.Holder

No usage of javax.xml.ws.Holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.ProtocolException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.ProtocolException

  • Packages that use ProtocolException
    Package Description
    javax.xml.ws.http
    This package defines APIs specific to the HTTP binding.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of ProtocolException in javax.xml.ws.http

      Subclasses of ProtocolException in javax.xml.ws.http
      Modifier and Type Class and Description
      class  HTTPException
      The HTTPException exception represents a XML/HTTP fault.

    • Uses of ProtocolException in javax.xml.ws.soap

      Subclasses of ProtocolException in javax.xml.ws.soap
      Modifier and Type Class and Description
      class  SOAPFaultException
      The SOAPFaultException exception represents a SOAP 1.1 or 1.2 fault.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.RequestWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.RequestWrapper

No usage of javax.xml.ws.RequestWrapper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.RespectBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.RespectBinding

No usage of javax.xml.ws.RespectBinding
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.RespectBindingFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.RespectBindingFeature

No usage of javax.xml.ws.RespectBindingFeature
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.ResponseWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.ResponseWrapper

No usage of javax.xml.ws.ResponseWrapper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.Service

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.Service

  • Packages that use Service
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Service in javax.xml.ws

      Methods in javax.xml.ws that return Service
      Modifier and Type Method and Description
      static Service Service.create(QName serviceName)
      Creates a Service instance.
      static Service Service.create(QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      static Service Service.create(URL wsdlDocumentLocation, QName serviceName)
      Creates a Service instance.
      static Service Service.create(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)
      Creates a Service instance.

    • Uses of Service in javax.xml.ws.spi

      Method parameters in javax.xml.ws.spi with type arguments of type Service
      Modifier and Type Method and Description
      abstract ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass)
      Creates a service delegate object.
      ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features)
      Creates a service delegate object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.Service.Mode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.Service.Mode

  • Packages that use Service.Mode
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Service.Mode in javax.xml.ws

      Methods in javax.xml.ws that return Service.Mode
      Modifier and Type Method and Description
      static Service.Mode Service.Mode.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Service.Mode[] Service.Mode.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Methods in javax.xml.ws with parameters of type Service.Mode
      Modifier and Type Method and Description
      <T> Dispatch<T> Service.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the client's choosing.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.

    • Uses of Service.Mode in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type Service.Mode
      Modifier and Type Method and Description
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.ServiceMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.ServiceMode

No usage of javax.xml.ws.ServiceMode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebEndpoint

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebEndpoint

No usage of javax.xml.ws.WebEndpoint
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebFault

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebFault

No usage of javax.xml.ws.WebFault
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceClient

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceClient

No usage of javax.xml.ws.WebServiceClient
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceException

  • Packages that use WebServiceException
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.http
    This package defines APIs specific to the HTTP binding.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of WebServiceException in javax.xml.ws

      Subclasses of WebServiceException in javax.xml.ws
      Modifier and Type Class and Description
      class  ProtocolException
      The ProtocolException class is a base class for exceptions related to a specific protocol binding.

    • Uses of WebServiceException in javax.xml.ws.http

      Subclasses of WebServiceException in javax.xml.ws.http
      Modifier and Type Class and Description
      class  HTTPException
      The HTTPException exception represents a XML/HTTP fault.

    • Uses of WebServiceException in javax.xml.ws.soap

      Subclasses of WebServiceException in javax.xml.ws.soap
      Modifier and Type Class and Description
      class  SOAPFaultException
      The SOAPFaultException exception represents a SOAP 1.1 or 1.2 fault.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceFeature

  • Packages that use WebServiceFeature
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of WebServiceFeature in javax.xml.ws

      Subclasses of WebServiceFeature in javax.xml.ws
      Modifier and Type Class and Description
      class  RespectBindingFeature
      This feature clarifies the use of the wsdl:binding in a JAX-WS runtime.
      Methods in javax.xml.ws with parameters of type WebServiceFeature
      Modifier and Type Method and Description
      static Endpoint Endpoint.create(Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified implementor object and web service features.
      static Service Service.create(QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      static Endpoint Endpoint.create(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified binding type, implementor object, and web service features.
      static Service Service.create(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      <T> Dispatch<T> Service.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> T Service.getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      <T> T EndpointReference.getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      <T> T Service.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      <T> T Service.getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      static Endpoint Endpoint.publish(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint for the specified implementor object at the given address.
      Constructors in javax.xml.ws with parameters of type WebServiceFeature
      Constructor and Description
      Service(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)

    • Uses of WebServiceFeature in javax.xml.ws.soap

      Subclasses of WebServiceFeature in javax.xml.ws.soap
      Modifier and Type Class and Description
      class  AddressingFeature
      AddressingFeature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding.
      class  MTOMFeature
      This feature represents the use of MTOM with a web service.

    • Uses of WebServiceFeature in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type WebServiceFeature
      Modifier and Type Method and Description
      Endpoint Provider.createAndPublishEndpoint(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint object with the specified address, implementation object and web service features.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      Endpoint Provider.createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation class, invoker and web service features.
      Endpoint Provider.createEndpoint(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation object and web service features.
      ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features)
      Creates a service delegate object.
      abstract <T> T ServiceDelegate.getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T Provider.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T ServiceDelegate.getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T ServiceDelegate.getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServicePermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServicePermission

No usage of javax.xml.ws.WebServicePermission
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceProvider

No usage of javax.xml.ws.WebServiceProvider
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceRef

No usage of javax.xml.ws.WebServiceRef
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.WebServiceRefs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.WebServiceRefs

No usage of javax.xml.ws.WebServiceRefs
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.AsyncHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.AsyncHandler

  • Packages that use AsyncHandler
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.

    • Uses of AsyncHandler in javax.xml.ws

      Methods in javax.xml.ws with parameters of type AsyncHandler
      Modifier and Type Method and Description
      Future<?> Dispatch.invokeAsync(T msg, AsyncHandler<T> handler)
      Invoke a service operation asynchronously.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.Binding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.Binding

  • Packages that use Binding
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.http
    This package defines APIs specific to the HTTP binding.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of Binding in javax.xml.ws

      Methods in javax.xml.ws that return Binding
      Modifier and Type Method and Description
      abstract Binding Endpoint.getBinding()
      Returns the binding for this endpoint.
      Binding BindingProvider.getBinding()
      Get the Binding for this binding provider.

    • Uses of Binding in javax.xml.ws.http

      Subinterfaces of Binding in javax.xml.ws.http
      Modifier and Type Interface and Description
      interface  HTTPBinding
      The HTTPBinding interface is an abstraction for the XML/HTTP binding.

    • Uses of Binding in javax.xml.ws.soap

      Subinterfaces of Binding in javax.xml.ws.soap
      Modifier and Type Interface and Description
      interface  SOAPBinding
      The SOAPBinding interface is an abstraction for the SOAP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.BindingProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.BindingProvider

  • Packages that use BindingProvider
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.

    • Uses of BindingProvider in javax.xml.ws

      Subinterfaces of BindingProvider in javax.xml.ws
      Modifier and Type Interface and Description
      interface  Dispatch<T>
      The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.Dispatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.Dispatch

  • Packages that use Dispatch
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Dispatch in javax.xml.ws

      Methods in javax.xml.ws that return Dispatch
      Modifier and Type Method and Description
      <T> Dispatch<T> Service.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the client's choosing.
      <T> Dispatch<T> Service.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> Service.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.

    • Uses of Dispatch in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return Dispatch
      Modifier and Type Method and Description
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract <T> Dispatch<T> ServiceDelegate.createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> ServiceDelegate.createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.LogicalMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.LogicalMessage

  • Packages that use LogicalMessage
    Package Description
    javax.xml.ws.handler
    This package defines APIs for message handlers.

    • Uses of LogicalMessage in javax.xml.ws.handler

      Methods in javax.xml.ws.handler that return LogicalMessage
      Modifier and Type Method and Description
      LogicalMessage LogicalMessageContext.getMessage()
      Gets the message from this message context
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.Provider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.Provider

No usage of javax.xml.ws.Provider
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.Response

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.Response

  • Packages that use Response
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.

    • Uses of Response in javax.xml.ws

      Methods in javax.xml.ws that return Response
      Modifier and Type Method and Description
      Response<T> Dispatch.invokeAsync(T msg)
      Invoke a service operation asynchronously.
      Methods in javax.xml.ws with parameters of type Response
      Modifier and Type Method and Description
      void AsyncHandler.handleResponse(Response<T> res)
      Called when the response to an asynchronous operation is available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.WebServiceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.WebServiceContext

  • Packages that use WebServiceContext
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of WebServiceContext in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type WebServiceContext
      Modifier and Type Method and Description
      abstract void Invoker.inject(WebServiceContext webServiceContext)
      JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Dispatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface Dispatch<T>

  • All Superinterfaces:
    BindingProvider

    public interface Dispatch<T>
extends BindingProvider
    The Dispatch interface provides support for the dynamic invocation of a service endpoint operations. The javax.xml.ws.Service class acts as a factory for the creation of Dispatch instances.
    Since:
    JAX-WS 2.0

    • Field Summary

      • Fields inherited from interface javax.xml.ws.BindingProvider

        ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, SOAPACTION_URI_PROPERTY, SOAPACTION_USE_PROPERTY, USERNAME_PROPERTY

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      T invoke(T msg)
      Invoke a service operation synchronously.
      Response<T> invokeAsync(T msg)
      Invoke a service operation asynchronously.
      Future<?> invokeAsync(T msg, AsyncHandler<T> handler)
      Invoke a service operation asynchronously.
      void invokeOneWay(T msg)
      Invokes a service operation using the one-way interaction mode.

      • Methods inherited from interface javax.xml.ws.BindingProvider

        getBinding, getEndpointReference, getEndpointReference, getRequestContext, getResponseContext

    • Method Detail

      • invoke

        T invoke(T msg)
        Invoke a service operation synchronously. The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.
        Parameters:
        msg - An object that will form the message or payload of the message used to invoke the operation.
        Returns:
        The response message or message payload to the operation invocation.
        Throws:
        WebServiceException - If a fault occurs during communication with the service
        WebServiceException - If there is any error in the configuration of the Dispatch instance

      • invokeAsync

        Response<T> invokeAsync(T msg)
        Invoke a service operation asynchronously. The method returns without waiting for the response to the operation invocation, the results of the operation are obtained by polling the returned Response.

        The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.

        Parameters:
        msg - An object that will form the message or payload of the message used to invoke the operation.
        Returns:
        The response message or message payload to the operation invocation.
        Throws:
        WebServiceException - If there is any error in the configuration of the Dispatch instance

      • invokeAsync

        Future<?> invokeAsync(T msg,
                      AsyncHandler<T> handler)
        Invoke a service operation asynchronously. The method returns without waiting for the response to the operation invocation, the results of the operation are communicated to the client via the passed in handler.

        The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.

        Parameters:
        msg - An object that will form the message or payload of the message used to invoke the operation.
        handler - The handler object that will receive the response to the operation invocation.
        Returns:
        A Future object that may be used to check the status of the operation invocation. This object MUST NOT be used to try to obtain the results of the operation - the object returned from Future<?>.get() is implementation dependent and any use of it will result in non-portable behaviour.
        Throws:
        WebServiceException - If there is any error in the configuration of the Dispatch instance

      • invokeOneWay

        void invokeOneWay(T msg)
        Invokes a service operation using the one-way interaction mode. The operation invocation is logically non-blocking, subject to the capabilities of the underlying protocol, no results are returned. When the protocol in use is SOAP/HTTP, this method MUST block until an HTTP response code has been received or an error occurs.

        The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.

        Parameters:
        msg - An object that will form the message or payload of the message used to invoke the operation.
        Throws:
        WebServiceException - If there is any error in the configuration of the Dispatch instance or if an error occurs during the invocation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Endpoint

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class Endpoint

  • java.lang.Object
    • javax.xml.ws.Endpoint

  • public abstract class Endpoint
extends Object
    A Web service endpoint.

    Endpoints are created using the static methods defined in this class. An endpoint is always tied to one Binding and one implementor, both set at endpoint creation time.

    An endpoint is either in a published or an unpublished state. The publish methods can be used to start publishing an endpoint, at which point it starts accepting incoming requests. Conversely, the stop method can be used to stop accepting incoming requests and take the endpoint down. Once stopped, an endpoint cannot be published again.

    An Executor may be set on the endpoint in order to gain better control over the threads used to dispatch incoming requests. For instance, thread pooling with certain parameters can be enabled by creating a ThreadPoolExecutor and registering it with the endpoint.

    Handler chains can be set using the contained Binding.

    An endpoint may have a list of metadata documents, such as WSDL and XMLSchema documents, bound to it. At publishing time, the JAX-WS implementation will try to reuse as much of that metadata as possible instead of generating new ones based on the annotations present on the implementor.

    Since:
    JAX-WS 2.0
    See Also:
    Binding, BindingType, SOAPBinding, Executor

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String WSDL_PORT
      Standard property: name of WSDL port.
      static String WSDL_SERVICE
      Standard property: name of WSDL service.

    • Constructor Summary

      Constructors
      Constructor and Description
      Endpoint()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      static Endpoint create(Object implementor)
      Creates an endpoint with the specified implementor object.
      static Endpoint create(Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified implementor object and web service features.
      static Endpoint create(String bindingId, Object implementor)
      Creates an endpoint with the specified binding type and implementor object.
      static Endpoint create(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint with the specified binding type, implementor object, and web service features.
      abstract Binding getBinding()
      Returns the binding for this endpoint.
      abstract <T extends EndpointReference>
      T             		getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.
      abstract EndpointReference getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.
      abstract Executor getExecutor()
      Returns the executor for this Endpointinstance.
      abstract Object getImplementor()
      Returns the implementation object for this endpoint.
      abstract List<Source> getMetadata()
      Returns a list of metadata documents for the service.
      abstract Map<String,Object> getProperties()
      Returns the property bag for this Endpoint instance.
      abstract boolean isPublished()
      Returns true if the endpoint is in the published state.
      void publish(HttpContext serverContext)
      Publishes this endpoint at the provided server context.
      abstract void publish(Object serverContext)
      Publishes this endpoint at the provided server context.
      abstract void publish(String address)
      Publishes this endpoint at the given address.
      static Endpoint publish(String address, Object implementor)
      Creates and publishes an endpoint for the specified implementor object at the given address.
      static Endpoint publish(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint for the specified implementor object at the given address.
      void setEndpointContext(EndpointContext ctxt)
      By settng a EndpointContext, JAX-WS runtime knows about addresses of other endpoints in an application.
      abstract void setExecutor(Executor executor)
      Sets the executor for this Endpoint instance.
      abstract void setMetadata(List<Source> metadata)
      Sets the metadata for this endpoint.
      abstract void setProperties(Map<String,Object> properties)
      Sets the property bag for this Endpoint instance.
      abstract void stop()
      Stops publishing this endpoint.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • WSDL_SERVICE

        public static final String WSDL_SERVICE
        Standard property: name of WSDL service.

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

      • WSDL_PORT

        public static final String WSDL_PORT
        Standard property: name of WSDL port.

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

    • Constructor Detail

      • Endpoint

        public Endpoint()

    • Method Detail

      • create

        public static Endpoint create(Object implementor)
        Creates an endpoint with the specified implementor object. If there is a binding specified via a BindingType annotation then it MUST be used else a default of SOAP 1.1 / HTTP binding MUST be used.

        The newly created endpoint may be published by calling one of the publish(String) and publish(Object) methods.

        Parameters:
        implementor - The endpoint implementor.
        Returns:
        The newly created endpoint.

      • create

        public static Endpoint create(Object implementor,
                              WebServiceFeature... features)
        Creates an endpoint with the specified implementor object and web service features. If there is a binding specified via a BindingType annotation then it MUST be used else a default of SOAP 1.1 / HTTP binding MUST be used.

        The newly created endpoint may be published by calling one of the publish(String) and publish(Object) methods.

        Parameters:
        implementor - The endpoint implementor.
        features - A list of WebServiceFeature to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Since:
        JAX-WS 2.2

      • create

        public static Endpoint create(String bindingId,
                              Object implementor)
        Creates an endpoint with the specified binding type and implementor object.

        The newly created endpoint may be published by calling one of the publish(String) and publish(Object) methods.

        Parameters:
        bindingId - A URI specifying the binding to use. If the bindingID is null and no binding is specified via a BindingType annotation then a default SOAP 1.1 / HTTP binding MUST be used.
        implementor - The endpoint implementor.
        Returns:
        The newly created endpoint.

      • create

        public static Endpoint create(String bindingId,
                              Object implementor,
                              WebServiceFeature... features)
        Creates an endpoint with the specified binding type, implementor object, and web service features.

        The newly created endpoint may be published by calling one of the publish(String) and publish(Object) methods.

        Parameters:
        bindingId - A URI specifying the binding to use. If the bindingID is null and no binding is specified via a BindingType annotation then a default SOAP 1.1 / HTTP binding MUST be used.
        implementor - The endpoint implementor.
        features - A list of WebServiceFeature to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Since:
        JAX-WS 2.2

      • getBinding

        public abstract Binding getBinding()
        Returns the binding for this endpoint.
        Returns:
        The binding for this endpoint

      • getImplementor

        public abstract Object getImplementor()
        Returns the implementation object for this endpoint.
        Returns:
        The implementor for this endpoint

      • publish

        public abstract void publish(String address)
        Publishes this endpoint at the given address. The necessary server infrastructure will be created and configured by the JAX-WS implementation using some default configuration. In order to get more control over the server configuration, please use the publish(Object) method instead.
        Parameters:
        address - A URI specifying the address to use. The address MUST be compatible with the binding specified at the time the endpoint was created.
        Throws:
        IllegalArgumentException - If the provided address URI is not usable in conjunction with the endpoint's binding.
        IllegalStateException - If the endpoint has been published already or it has been stopped.
        SecurityException - If a java.lang.SecurityManger is being used and the application doesn't have the WebServicePermission("publishEndpoint") permission.

      • publish

        public static Endpoint publish(String address,
                               Object implementor)
        Creates and publishes an endpoint for the specified implementor object at the given address.

        The necessary server infrastructure will be created and configured by the JAX-WS implementation using some default configuration. In order to get more control over the server configuration, please use the create(String,Object) and publish(Object) methods instead.

        Parameters:
        address - A URI specifying the address and transport/protocol to use. A http: URI MUST result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
        implementor - The endpoint implementor.
        Returns:
        The newly created endpoint.
        Throws:
        SecurityException - If a java.lang.SecurityManger is being used and the application doesn't have the WebServicePermission("publishEndpoint") permission.

      • publish

        public static Endpoint publish(String address,
                               Object implementor,
                               WebServiceFeature... features)
        Creates and publishes an endpoint for the specified implementor object at the given address. The created endpoint is configured with the web service features.

        The necessary server infrastructure will be created and configured by the JAX-WS implementation using some default configuration. In order to get more control over the server configuration, please use the create(String,Object) and publish(Object) methods instead.

        Parameters:
        address - A URI specifying the address and transport/protocol to use. A http: URI MUST result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
        implementor - The endpoint implementor.
        features - A list of WebServiceFeature to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Throws:
        SecurityException - If a java.lang.SecurityManger is being used and the application doesn't have the WebServicePermission("publishEndpoint") permission.
        Since:
        JAX-WS 2.2

      • publish

        public abstract void publish(Object serverContext)
        Publishes this endpoint at the provided server context. A server context encapsulates the server infrastructure and addressing information for a particular transport. For a call to this method to succeed, the server context passed as an argument to it MUST be compatible with the endpoint's binding.
        Parameters:
        serverContext - An object representing a server context to be used for publishing the endpoint.
        Throws:
        IllegalArgumentException - If the provided server context is not supported by the implementation or turns out to be unusable in conjunction with the endpoint's binding.
        IllegalStateException - If the endpoint has been published already or it has been stopped.
        SecurityException - If a java.lang.SecurityManger is being used and the application doesn't have the WebServicePermission("publishEndpoint") permission.

      • publish

        public void publish(HttpContext serverContext)
        Publishes this endpoint at the provided server context. A server context encapsulates the server infrastructure and addressing information for a particular transport. For a call to this method to succeed, the server context passed as an argument to it MUST be compatible with the endpoint's binding.

        This is meant for container developers to publish the the endpoints portably and not intended for the end developers.

        Parameters:
        serverContext - An object representing a server context to be used for publishing the endpoint.
        Throws:
        IllegalArgumentException - If the provided server context is not supported by the implementation or turns out to be unusable in conjunction with the endpoint's binding.
        IllegalStateException - If the endpoint has been published already or it has been stopped.
        SecurityException - If a java.lang.SecurityManger is being used and the application doesn't have the WebServicePermission("publishEndpoint") permission.
        Since:
        JAX-WS 2.2

      • stop

        public abstract void stop()
        Stops publishing this endpoint. If the endpoint is not in a published state, this method has no effect.

      • isPublished

        public abstract boolean isPublished()
        Returns true if the endpoint is in the published state.
        Returns:
        true if the endpoint is in the published state.

      • getMetadata

        public abstract List<Source> getMetadata()
        Returns a list of metadata documents for the service.
        Returns:
        List<javax.xml.transform.Source> A list of metadata documents for the service

      • setMetadata

        public abstract void setMetadata(List<Source> metadata)
        Sets the metadata for this endpoint.
        Parameters:
        metadata - A list of XML document sources containing metadata information for the endpoint (e.g. WSDL or XML Schema documents)
        Throws:
        IllegalStateException - If the endpoint has already been published.

      • getExecutor

        public abstract Executor getExecutor()
        Returns the executor for this Endpointinstance. The executor is used to dispatch an incoming request to the implementor object.
        Returns:
        The java.util.concurrent.Executor to be used to dispatch a request.
        See Also:
        Executor

      • setExecutor

        public abstract void setExecutor(Executor executor)
        Sets the executor for this Endpoint instance. The executor is used to dispatch an incoming request to the implementor object. If this Endpoint is published using the publish(Object) method and the specified server context defines its own threading behavior, the executor may be ignored.
        Parameters:
        executor - The java.util.concurrent.Executor to be used to dispatch a request.
        Throws:
        SecurityException - If the instance does not support setting an executor for security reasons (e.g. the necessary permissions are missing).
        See Also:
        Executor

      • getProperties

        public abstract Map<String,Object> getProperties()
        Returns the property bag for this Endpoint instance.
        Returns:
        Map<String,Object> The property bag associated with this instance.

      • setProperties

        public abstract void setProperties(Map<String,Object> properties)
        Sets the property bag for this Endpoint instance.
        Parameters:
        properties - The property bag associated with this instance.

      • getEndpointReference

        public abstract EndpointReference getEndpointReference(Element... referenceParameters)
        Returns the EndpointReference associated with this Endpoint instance.

        If the Binding for this bindingProvider is either SOAP1.1/HTTP or SOAP1.2/HTTP, then a W3CEndpointReference MUST be returned.

        Parameters:
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        Returns:
        EndpointReference of this Endpoint instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.
        Throws:
        WebServiceException - If any error in the creation of the EndpointReference or if the Endpoint is not in the published state.
        UnsupportedOperationException - If this BindingProvider uses the XML/HTTP binding.
        Since:
        JAX-WS 2.1
        See Also:
        W3CEndpointReference

      • getEndpointReference

        public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
                                                                     Element... referenceParameters)
        Returns the EndpointReference associated with this Endpoint instance.
        Parameters:
        clazz - Specifies the type of EndpointReference that MUST be returned.
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        Returns:
        EndpointReference of type clazz of this Endpoint instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.
        Throws:
        WebServiceException - If any error in the creation of the EndpointReference or if the Endpoint is not in the published state or if the clazz is not a supported EndpointReference type.
        UnsupportedOperationException - If this BindingProvider uses the XML/HTTP binding.
        Since:
        JAX-WS 2.1

      • setEndpointContext

        public void setEndpointContext(EndpointContext ctxt)
        By settng a EndpointContext, JAX-WS runtime knows about addresses of other endpoints in an application. If multiple endpoints share different ports of a WSDL, then the multiple port addresses are patched when the WSDL is accessed.

        This needs to be set before publishing the endpoints.

        Parameters:
        ctxt - that is shared for multiple endpoints
        Throws:
        IllegalStateException - If the endpoint has been published already or it has been stopped.
        Since:
        JAX-WS 2.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EndpointContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class EndpointContext

  • java.lang.Object
    • javax.xml.ws.EndpointContext

  • public abstract class EndpointContext
extends Object
    EndpointContext allows multiple endpoints in an application to share any information. For example, servlet application's war may contain multiple endpoints and these endpoints can get addresses of each other by sharing this context. If multiple endpoints share different ports of a WSDL, then the multiple port addresses can be patched when the WSDL is accessed. It also allows all endpoints to share any other runtime information.

    This needs to be set by using Endpoint.setEndpointContext(javax.xml.ws.EndpointContext) before Endpoint.publish(java.lang.String) methods.

    Since:
    JAX-WS 2.2

    • Constructor Summary

      Constructors
      Constructor and Description
      EndpointContext()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Set<Endpoint> getEndpoints()
      This gives list of endpoints in an application.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • EndpointContext

        public EndpointContext()

    • Method Detail

      • getEndpoints

        public abstract Set<Endpoint> getEndpoints()
        This gives list of endpoints in an application. For e.g in servlet container, a war file may contain multiple endpoints. In case of http, these endpoints are hosted on the same http server.
        Returns:
        list of all endpoints in an application
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EndpointReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class EndpointReference

  • java.lang.Object
    • javax.xml.ws.EndpointReference
  • Direct Known Subclasses:
    W3CEndpointReference

    public abstract class EndpointReference
extends Object
    This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint. See Web Services Addressing 1.0 - Core for more information on WS-Addressing EndpointReferences.

    This class is immutable as the typical web service developer need not be concerned with its contents. The web service developer should use this class strictly as a mechanism to reference a remote web service endpoint. See the Service APIs that clients can use to that utilize an EndpointReference. See the Endpoint, and BindingProvider APIs on how EndpointReferences can be created for published endpoints.

    Concrete implementations of this class will represent an EndpointReference for a particular version of Addressing. For example the W3CEndpointReference is for use with W3C Web Services Addressing 1.0 - Core Recommendation. If JAX-WS implementors need to support different versions of addressing, they should write their own EndpointReference subclass for that version. This will allow a JAX-WS implementation to create a vendor specific EndpointReferences that the vendor can use to flag a different version of addressing.

    Web service developers that wish to pass or return EndpointReference in Java methods in an SEI should use concrete instances of an EndpointReference such as the W3CEndpointReference. This way the schema mapped from the SEI will be more descriptive of the type of endpoint reference being passed.

    JAX-WS implementors are expected to extract the XML infoset from an EndpointReferece using the writeTo(javax.xml.transform.Result) method.

    JAXB will bind this class to xs:anyType. If a better binding is desired, web services developers should use a concrete subclass such as W3CEndpointReference.

    Since:
    JAX-WS 2.1
    See Also:
    W3CEndpointReference, Service

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | EndpointReference()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      static EndpointReference readFrom(Source eprInfoset)
      Factory method to read an EndpointReference from the infoset contained in eprInfoset.
      String toString()
      Displays EPR infoset for debugging convenience.
      abstract void writeTo(Result result)
      write this EndpointReference to the specified infoset format

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • EndpointReference

        protected EndpointReference()

    • Method Detail

      • readFrom

        public static EndpointReference readFrom(Source eprInfoset)
        Factory method to read an EndpointReference from the infoset contained in eprInfoset. This method delegates to the vendor specific implementation of the Provider.readEndpointReference(javax.xml.transform.Source) method.
        Parameters:
        eprInfoset - The EndpointReference infoset to be unmarshalled
        Returns:
        the EndpointReference unmarshalled from eprInfoset never null
        Throws:
        WebServiceException - if an error occurs while creating the EndpointReference from the eprInfoset
        IllegalArgumentException - if the null eprInfoset value is given.

      • writeTo

        public abstract void writeTo(Result result)
        write this EndpointReference to the specified infoset format
        Parameters:
        result - for writing infoset
        Throws:
        WebServiceException - if there is an error writing the EndpointReference to the specified result.
        IllegalArgumentException - If the null result value is given.

      • getPort

        public <T> T getPort(Class<T> serviceEndpointInterface,
                     WebServiceFeature... features)
        The getPort method returns a proxy. If there are any reference parameters in the EndpointReference instance, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. The EndpointReference instance specifies the endpoint that will be invoked by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly from the WSDL Metadata from this EndpointReference or from annotations on the serviceEndpointInterface. For this method to successfully return a proxy, WSDL metadata MUST be available and the EndpointReference instance MUST contain an implementation understood serviceName metadata.

        Because this port is not created from a Service object, handlers will not automatically be configured, and the HandlerResolver and Executor cannot be get or set for this port. The BindingProvider().getBinding().setHandlerChain() method can be used to manually configure handlers for this port.

        Parameters:
        serviceEndpointInterface - Service endpoint interface
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy
        • If there is any missing WSDL metadata as required by this method
        • If this endpointReference is invalid
        • If an illegal serviceEndpointInterface is specified
        • If a feature is enabled that is not compatible with this port or is unsupported.
        See Also:
        Proxy, WebServiceFeature

      • toString

        public String toString()
        Displays EPR infoset for debugging convenience.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FaultAction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type FaultAction

  • @Documented
 @Retention(value=RUNTIME)
 @Target(value=METHOD)
public @interface FaultAction
    The FaultAction annotation is used inside an Action annotation to allow an explicit association of a WS-Addressing Action message addressing property with the fault messages of the WSDL operation mapped from the exception class.

    The wsam:Action attribute value in the fault message in the generated WSDL operation mapped for className class is equal to the corresponding value in the FaultAction. For the exact computation of wsam:Action values for the fault messages, refer to the algorithm in the JAX-WS specification.

    Example 1: Specify explicit values for Action message addressing property for the input, output and fault message if the Java method throws only one service specific exception.

     @WebService(targetNamespace="http://example.com/numbers")
 public class AddNumbersImpl {
     @Action(
         fault = {
             @FaultAction(className=AddNumbersException.class, value="http://example.com/faultAction")
         })
     public int addNumbers(int number1, int number2)
         throws AddNumbersException {
         return number1 + number2;
     }
 }
    The generated WSDL looks like:
       <definitions targetNamespace="http://example.com/numbers" ...>
     ...
     <portType name="AddNumbersPortType">
       <operation name="AddNumbers">
         ...
         <fault message="tns:AddNumbersException" name="AddNumbersException"
           wsam:Action="http://example.com/faultAction"/>
       </operation>
     </portType>
     ...
   </definitions>

    Example 2: Here is an example that shows if the explicit value for Action message addressing property for the service specific exception is not present.

     @WebService(targetNamespace="http://example.com/numbers")
 public class AddNumbersImpl {
     public int addNumbers(int number1, int number2)
         throws AddNumbersException {
         return number1 + number2;
     }
 }
    The generated WSDL looks like:
       <definitions targetNamespace="http://example.com/numbers" ...>
     ...
     <portType name="AddNumbersPortType">
       <operation name="AddNumbers">
         ...
         <fault message="tns:addNumbersFault" name="InvalidNumbers"
           wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbers/Fault/AddNumbersException"/>
       </operation>
     </portType>
     ...
   </definitions>

    Example 3: Here is an example that shows how to specify explicit values for Action message addressing property if the Java method throws more than one service specific exception.

     @WebService(targetNamespace="http://example.com/numbers")
 public class AddNumbersImpl {
     @Action(
         fault = {
             @FaultAction(className=AddNumbersException.class, value="http://example.com/addFaultAction"),
             @FaultAction(className=TooBigNumbersException.class, value="http://example.com/toobigFaultAction")
         })
     public int addNumbers(int number1, int number2)
         throws AddNumbersException, TooBigNumbersException {
         return number1 + number2;
     }
 }
    The generated WSDL looks like:
       <definitions targetNamespace="http://example.com/numbers" ...>
     ...
     <portType name="AddNumbersPortType">
       <operation name="AddNumbers">
         ...
         <fault message="tns:addNumbersFault" name="AddNumbersException"
           wsam:Action="http://example.com/addFaultAction"/>
         <fault message="tns:tooBigNumbersFault" name="TooBigNumbersException"
           wsam:Action="http://example.com/toobigFaultAction"/>
       </operation>
     </portType>
     ...
   </definitions>
    Since:
    JAX-WS 2.1

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      Class<? extends Exception> className
      Name of the exception class

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String value
      Value of WS-Addressing Action message addressing property for the exception

    • Element Detail

      • className

        public abstract Class<? extends Exception> className
        Name of the exception class

      • value

        public abstract String value
        Value of WS-Addressing Action message addressing property for the exception
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


handler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.handler

This package defines APIs for message handlers.

See: Description

  • Interface Summary
    Interface Description
    Handler<C extends MessageContext>
    The Handler interface is the base interface for JAX-WS handlers.
    HandlerResolver
    HandlerResolver is an interface implemented by an application to get control over the handler chain set on proxy/dispatch objects at the time of their creation.
    LogicalHandler<C extends LogicalMessageContext>
    The LogicalHandler extends Handler to provide typesafety for the message context parameter.
    LogicalMessageContext
    The LogicalMessageContext interface extends MessageContext to provide access to a the contained message as a protocol neutral LogicalMessage
    MessageContext
    The interface MessageContext abstracts the message context that is processed by a handler in the handle method.
    PortInfo
    The PortInfo interface is used by a HandlerResolver to query information about the port it is being asked to create a handler chain for.
  • Enum Summary
    Enum Description
    MessageContext.Scope
    Property scope.

Package javax.xml.ws.handler Description

This package defines APIs for message handlers.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.handler Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.handler

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • javax.xml.ws.handler.Handler<C>
    • javax.xml.ws.handler.LogicalHandler<C>
  • javax.xml.ws.handler.HandlerResolver
  • java.util.Map<K,V>
    • javax.xml.ws.handler.MessageContext
      • javax.xml.ws.handler.LogicalMessageContext
  • javax.xml.ws.handler.PortInfo

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • javax.xml.ws.handler.MessageContext.Scope
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LogicalHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface LogicalHandler<C extends LogicalMessageContext>

  • All Superinterfaces:
    Handler<C>

    public interface LogicalHandler<C extends LogicalMessageContext>
extends Handler<C>
    The LogicalHandler extends Handler to provide typesafety for the message context parameter.
    Since:
    JAX-WS 2.0

    • Method Summary

      • Methods inherited from interface javax.xml.ws.handler.Handler

        close, handleFault, handleMessage
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.handler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.handler

  • Packages that use javax.xml.ws.handler
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
  • Classes in javax.xml.ws.handler used by javax.xml.ws
    Class and Description
    Handler
    The Handler interface is the base interface for JAX-WS handlers.
    HandlerResolver
    HandlerResolver is an interface implemented by an application to get control over the handler chain set on proxy/dispatch objects at the time of their creation.
    MessageContext
    The interface MessageContext abstracts the message context that is processed by a handler in the handle method.
  • Classes in javax.xml.ws.handler used by javax.xml.ws.handler
    Class and Description
    Handler
    The Handler interface is the base interface for JAX-WS handlers.
    LogicalMessageContext
    The LogicalMessageContext interface extends MessageContext to provide access to a the contained message as a protocol neutral LogicalMessage
    MessageContext
    The interface MessageContext abstracts the message context that is processed by a handler in the handle method.
    MessageContext.Scope
    Property scope.
    PortInfo
    The PortInfo interface is used by a HandlerResolver to query information about the port it is being asked to create a handler chain for.
  • Classes in javax.xml.ws.handler used by javax.xml.ws.handler.soap
    Class and Description
    Handler
    The Handler interface is the base interface for JAX-WS handlers.
    MessageContext
    The interface MessageContext abstracts the message context that is processed by a handler in the handle method.
  • Classes in javax.xml.ws.handler used by javax.xml.ws.spi
    Class and Description
    HandlerResolver
    HandlerResolver is an interface implemented by an application to get control over the handler chain set on proxy/dispatch objects at the time of their creation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.handler.MessageContext.Scope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.handler.MessageContext.Scope

  • Packages that use MessageContext.Scope
    Package Description
    javax.xml.ws.handler
    This package defines APIs for message handlers.

    • Uses of MessageContext.Scope in javax.xml.ws.handler

      Methods in javax.xml.ws.handler that return MessageContext.Scope
      Modifier and Type Method and Description
      MessageContext.Scope MessageContext.getScope(String name)
      Gets the scope of a property.
      static MessageContext.Scope MessageContext.Scope.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static MessageContext.Scope[] MessageContext.Scope.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Methods in javax.xml.ws.handler with parameters of type MessageContext.Scope
      Modifier and Type Method and Description
      void MessageContext.setScope(String name, MessageContext.Scope scope)
      Sets the scope of a property.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.Handler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.Handler

  • Packages that use Handler
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.

    • Uses of Handler in javax.xml.ws

      Methods in javax.xml.ws that return types with arguments of type Handler
      Modifier and Type Method and Description
      List<Handler> Binding.getHandlerChain()
      Gets a copy of the handler chain for a protocol binding instance.
      Method parameters in javax.xml.ws with type arguments of type Handler
      Modifier and Type Method and Description
      void Binding.setHandlerChain(List<Handler> chain)
      Sets the handler chain for the protocol binding instance.

    • Uses of Handler in javax.xml.ws.handler

      Subinterfaces of Handler in javax.xml.ws.handler
      Modifier and Type Interface and Description
      interface  LogicalHandler<C extends LogicalMessageContext>
      The LogicalHandler extends Handler to provide typesafety for the message context parameter.
      Methods in javax.xml.ws.handler that return types with arguments of type Handler
      Modifier and Type Method and Description
      List<Handler> HandlerResolver.getHandlerChain(PortInfo portInfo)
      Gets the handler chain for the specified port.

    • Uses of Handler in javax.xml.ws.handler.soap

      Subinterfaces of Handler in javax.xml.ws.handler.soap
      Modifier and Type Interface and Description
      interface  SOAPHandler<T extends SOAPMessageContext>
      The SOAPHandler class extends Handler to provide typesafety for the message context parameter and add a method to obtain access to the headers that may be processed by the handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.HandlerResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.HandlerResolver

  • Packages that use HandlerResolver
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of HandlerResolver in javax.xml.ws

      Methods in javax.xml.ws that return HandlerResolver
      Modifier and Type Method and Description
      HandlerResolver Service.getHandlerResolver()
      Returns the configured handler resolver.
      Methods in javax.xml.ws with parameters of type HandlerResolver
      Modifier and Type Method and Description
      void Service.setHandlerResolver(HandlerResolver handlerResolver)
      Sets the HandlerResolver for this Service instance.

    • Uses of HandlerResolver in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return HandlerResolver
      Modifier and Type Method and Description
      abstract HandlerResolver ServiceDelegate.getHandlerResolver()
      Returns the configured handler resolver.
      Methods in javax.xml.ws.spi with parameters of type HandlerResolver
      Modifier and Type Method and Description
      abstract void ServiceDelegate.setHandlerResolver(HandlerResolver handlerResolver)
      Sets the HandlerResolver for this Service instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.LogicalHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.LogicalHandler

No usage of javax.xml.ws.handler.LogicalHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.LogicalMessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.LogicalMessageContext

  • Packages that use LogicalMessageContext
    Package Description
    javax.xml.ws.handler
    This package defines APIs for message handlers.

    • Uses of LogicalMessageContext in javax.xml.ws.handler

      Classes in javax.xml.ws.handler with type parameters of type LogicalMessageContext
      Modifier and Type Interface and Description
      interface  LogicalHandler<C extends LogicalMessageContext>
      The LogicalHandler extends Handler to provide typesafety for the message context parameter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.MessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.MessageContext

  • Packages that use MessageContext
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.handler
    This package defines APIs for message handlers.
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.

    • Uses of MessageContext in javax.xml.ws

      Methods in javax.xml.ws that return MessageContext
      Modifier and Type Method and Description
      MessageContext WebServiceContext.getMessageContext()
      Returns the MessageContext for the request being served at the time this method is called.

    • Uses of MessageContext in javax.xml.ws.handler

      Classes in javax.xml.ws.handler with type parameters of type MessageContext
      Modifier and Type Interface and Description
      interface  Handler<C extends MessageContext>
      The Handler interface is the base interface for JAX-WS handlers.
      Subinterfaces of MessageContext in javax.xml.ws.handler
      Modifier and Type Interface and Description
      interface  LogicalMessageContext
      The LogicalMessageContext interface extends MessageContext to provide access to a the contained message as a protocol neutral LogicalMessage
      Methods in javax.xml.ws.handler with parameters of type MessageContext
      Modifier and Type Method and Description
      void Handler.close(MessageContext context)
      Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime dispatching a message, fault or exception.

    • Uses of MessageContext in javax.xml.ws.handler.soap

      Subinterfaces of MessageContext in javax.xml.ws.handler.soap
      Modifier and Type Interface and Description
      interface  SOAPMessageContext
      The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.PortInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.PortInfo

  • Packages that use PortInfo
    Package Description
    javax.xml.ws.handler
    This package defines APIs for message handlers.

    • Uses of PortInfo in javax.xml.ws.handler

      Methods in javax.xml.ws.handler with parameters of type PortInfo
      Modifier and Type Method and Description
      List<Handler> HandlerResolver.getHandlerChain(PortInfo portInfo)
      Gets the handler chain for the specified port.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Handler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface Handler<C extends MessageContext>

  • All Known Subinterfaces:
    LogicalHandler<C>, SOAPHandler<T>

    public interface Handler<C extends MessageContext>
    The Handler interface is the base interface for JAX-WS handlers.
    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void close(MessageContext context)
      Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime dispatching a message, fault or exception.
      boolean handleFault(C context)
      The handleFault method is invoked for fault message processing.
      boolean handleMessage(C context)
      The handleMessage method is invoked for normal processing of inbound and outbound messages.

    • Method Detail

      • handleMessage

        boolean handleMessage(C context)
        The handleMessage method is invoked for normal processing of inbound and outbound messages. Refer to the description of the handler framework in the JAX-WS specification for full details.
        Parameters:
        context - the message context.
        Returns:
        An indication of whether handler processing should continue for the current message
        • Return true to continue processing.
        • Return false to block processing.
        Throws:
        RuntimeException - Causes the JAX-WS runtime to cease handler processing and generate a fault.
        ProtocolException - Causes the JAX-WS runtime to switch to fault message processing.

      • handleFault

        boolean handleFault(C context)
        The handleFault method is invoked for fault message processing. Refer to the description of the handler framework in the JAX-WS specification for full details.
        Parameters:
        context - the message context
        Returns:
        An indication of whether handler fault processing should continue for the current message
        • Return true to continue processing.
        • Return false to block processing.
        Throws:
        RuntimeException - Causes the JAX-WS runtime to cease handler fault processing and dispatch the fault.
        ProtocolException - Causes the JAX-WS runtime to cease handler fault processing and dispatch the fault.

      • close

        void close(MessageContext context)
        Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime dispatching a message, fault or exception. Refer to the description of the handler framework in the JAX-WS specification for full details.
        Parameters:
        context - the message context
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HandlerResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface HandlerResolver

  • public interface HandlerResolver
    HandlerResolver is an interface implemented by an application to get control over the handler chain set on proxy/dispatch objects at the time of their creation.

    A HandlerResolver may be set on a Service using the setHandlerResolver method.

    When the runtime invokes a HandlerResolver, it will pass it a PortInfo object containing information about the port that the proxy/dispatch object will be accessing.

    Since:
    JAX-WS 2.0
    See Also:
    Service.setHandlerResolver(javax.xml.ws.handler.HandlerResolver)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<Handler> getHandlerChain(PortInfo portInfo)
      Gets the handler chain for the specified port.

    • Method Detail

      • getHandlerChain

        List<Handler> getHandlerChain(PortInfo portInfo)
        Gets the handler chain for the specified port.
        Parameters:
        portInfo - Contains information about the port being accessed.
        Returns:
        java.util.List<Handler> chain
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LogicalMessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface LogicalMessageContext

  • All Superinterfaces:
    Map<String,Object>, MessageContext

    public interface LogicalMessageContext
extends MessageContext
    The LogicalMessageContext interface extends MessageContext to provide access to a the contained message as a protocol neutral LogicalMessage
    Since:
    JAX-WS 2.0

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.xml.ws.handler.MessageContext

        MessageContext.Scope

      • Nested classes/interfaces inherited from interface java.util.Map

        Map.Entry<K,V>

    • Field Summary

      • Fields inherited from interface javax.xml.ws.handler.MessageContext

        HTTP_REQUEST_HEADERS, HTTP_REQUEST_METHOD, HTTP_RESPONSE_CODE, HTTP_RESPONSE_HEADERS, INBOUND_MESSAGE_ATTACHMENTS, MESSAGE_OUTBOUND_PROPERTY, OUTBOUND_MESSAGE_ATTACHMENTS, PATH_INFO, QUERY_STRING, REFERENCE_PARAMETERS, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE, WSDL_DESCRIPTION, WSDL_INTERFACE, WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LogicalMessage getMessage()
      Gets the message from this message context

      • Methods inherited from interface javax.xml.ws.handler.MessageContext

        getScope, setScope

      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values

    • Method Detail

      • getMessage

        LogicalMessage getMessage()
        Gets the message from this message context
        Returns:
        The contained message; returns null if no message is present in this message context
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface MessageContext

  • All Superinterfaces:
    Map<String,Object>
    All Known Subinterfaces:
    LogicalMessageContext, SOAPMessageContext

    public interface MessageContext
extends Map<String,Object>
    The interface MessageContext abstracts the message context that is processed by a handler in the handle method.

    The MessageContext interface provides methods to manage a property set. MessageContext properties enable handlers in a handler chain to share processing related state.

    Since:
    JAX-WS 2.0

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  MessageContext.Scope
      Property scope.

      • Nested classes/interfaces inherited from interface java.util.Map

        Map.Entry<K,V>

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String HTTP_REQUEST_HEADERS
      Standard property: HTTP request headers.
      static String HTTP_REQUEST_METHOD
      Standard property: HTTP request method.
      static String HTTP_RESPONSE_CODE
      Standard property: HTTP response status code.
      static String HTTP_RESPONSE_HEADERS
      Standard property: HTTP response headers.
      static String INBOUND_MESSAGE_ATTACHMENTS
      Standard property: Map of attachments to a message for the inbound message, key is the MIME Content-ID, value is a DataHandler.
      static String MESSAGE_OUTBOUND_PROPERTY
      Standard property: message direction, true for outbound messages, false for inbound.
      static String OUTBOUND_MESSAGE_ATTACHMENTS
      Standard property: Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler.
      static String PATH_INFO
      Standard property: Request Path Info
      static String QUERY_STRING
      Standard property: Query string for request.
      static String REFERENCE_PARAMETERS
      Standard property: WS Addressing Reference Parameters.
      static String SERVLET_CONTEXT
      Standard property: servlet context object.
      static String SERVLET_REQUEST
      Standard property: servlet request object.
      static String SERVLET_RESPONSE
      Standard property: servlet response object.
      static String WSDL_DESCRIPTION
      Standard property: input source for WSDL document.
      static String WSDL_INTERFACE
      Standard property: name of wsdl interface (2.0) or port type (1.1).
      static String WSDL_OPERATION
      Standard property: name of WSDL operation.
      static String WSDL_PORT
      Standard property: name of WSDL port.
      static String WSDL_SERVICE
      Standard property: name of WSDL service.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      MessageContext.Scope getScope(String name)
      Gets the scope of a property.
      void setScope(String name, MessageContext.Scope scope)
      Sets the scope of a property.

      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values

    • Field Detail

      • MESSAGE_OUTBOUND_PROPERTY

        static final String MESSAGE_OUTBOUND_PROPERTY
        Standard property: message direction, true for outbound messages, false for inbound.

        Type: boolean

        See Also:
        Constant Field Values

      • INBOUND_MESSAGE_ATTACHMENTS

        static final String INBOUND_MESSAGE_ATTACHMENTS
        Standard property: Map of attachments to a message for the inbound message, key is the MIME Content-ID, value is a DataHandler.

        Type: java.util.Map<String,DataHandler>

        See Also:
        Constant Field Values

      • OUTBOUND_MESSAGE_ATTACHMENTS

        static final String OUTBOUND_MESSAGE_ATTACHMENTS
        Standard property: Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler.

        Type: java.util.Map<String,DataHandler>

        See Also:
        Constant Field Values

      • WSDL_DESCRIPTION

        static final String WSDL_DESCRIPTION
        Standard property: input source for WSDL document.

        Type: org.xml.sax.InputSource

        See Also:
        Constant Field Values

      • WSDL_SERVICE

        static final String WSDL_SERVICE
        Standard property: name of WSDL service.

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

      • WSDL_PORT

        static final String WSDL_PORT
        Standard property: name of WSDL port.

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

      • WSDL_INTERFACE

        static final String WSDL_INTERFACE
        Standard property: name of wsdl interface (2.0) or port type (1.1).

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

      • WSDL_OPERATION

        static final String WSDL_OPERATION
        Standard property: name of WSDL operation.

        Type: javax.xml.namespace.QName

        See Also:
        Constant Field Values

      • HTTP_RESPONSE_CODE

        static final String HTTP_RESPONSE_CODE
        Standard property: HTTP response status code.

        Type: java.lang.Integer

        See Also:
        Constant Field Values

      • HTTP_REQUEST_HEADERS

        static final String HTTP_REQUEST_HEADERS
        Standard property: HTTP request headers.

        Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>

        See Also:
        Constant Field Values

      • HTTP_RESPONSE_HEADERS

        static final String HTTP_RESPONSE_HEADERS
        Standard property: HTTP response headers.

        Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>

        See Also:
        Constant Field Values

      • HTTP_REQUEST_METHOD

        static final String HTTP_REQUEST_METHOD
        Standard property: HTTP request method.

        Type: java.lang.String

        See Also:
        Constant Field Values

      • SERVLET_REQUEST

        static final String SERVLET_REQUEST
        Standard property: servlet request object.

        Type: javax.servlet.http.HttpServletRequest

        See Also:
        Constant Field Values

      • SERVLET_RESPONSE

        static final String SERVLET_RESPONSE
        Standard property: servlet response object.

        Type: javax.servlet.http.HttpServletResponse

        See Also:
        Constant Field Values

      • SERVLET_CONTEXT

        static final String SERVLET_CONTEXT
        Standard property: servlet context object.

        Type: javax.servlet.ServletContext

        See Also:
        Constant Field Values

      • QUERY_STRING

        static final String QUERY_STRING
        Standard property: Query string for request.

        Type: String

        See Also:
        Constant Field Values

      • PATH_INFO

        static final String PATH_INFO
        Standard property: Request Path Info

        Type: String

        See Also:
        Constant Field Values

      • REFERENCE_PARAMETERS

        static final String REFERENCE_PARAMETERS
        Standard property: WS Addressing Reference Parameters. The list MUST include all SOAP headers marked with the wsa:IsReferenceParameter="true" attribute.

        Type: List<Element>

        Since:
        JAX-WS 2.1
        See Also:
        Constant Field Values

    • Method Detail

      • setScope

        void setScope(String name,
              MessageContext.Scope scope)
        Sets the scope of a property.
        Parameters:
        name - Name of the property associated with the MessageContext
        scope - Desired scope of the property
        Throws:
        IllegalArgumentException - if an illegal property name is specified

      • getScope

        MessageContext.Scope getScope(String name)
        Gets the scope of a property.
        Parameters:
        name - Name of the property
        Returns:
        Scope of the property
        Throws:
        IllegalArgumentException - if a non-existant property name is specified
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MessageContext.Scope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.ws.handler

Enum MessageContext.Scope

  • java.lang.Object
    • java.lang.Enum<MessageContext.Scope>
      • javax.xml.ws.handler.MessageContext.Scope
  • All Implemented Interfaces:
    Serializable, Comparable<MessageContext.Scope>
    Enclosing interface:
    MessageContext

    public static enum MessageContext.Scope
extends Enum<MessageContext.Scope>
    Property scope. Properties scoped as APPLICATION are visible to handlers, client applications and service endpoints; properties scoped as HANDLER are only normally visible to handlers.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      APPLICATION
      HANDLER

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static MessageContext.Scope valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static MessageContext.Scope[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • APPLICATION

        public static final MessageContext.Scope APPLICATION

      • HANDLER

        public static final MessageContext.Scope HANDLER

    • Method Detail

      • values

        public static MessageContext.Scope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MessageContext.Scope c : MessageContext.Scope.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static MessageContext.Scope valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PortInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler

Interface PortInfo

  • public interface PortInfo
    The PortInfo interface is used by a HandlerResolver to query information about the port it is being asked to create a handler chain for.

    This interface is never implemented by an application, only by a JAX-WS implementation.

    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBindingID()
      Gets the URI identifying the binding used by the port being accessed.
      QName getPortName()
      Gets the qualified name of the WSDL port being accessed.
      QName getServiceName()
      Gets the qualified name of the WSDL service name containing the port being accessed.

    • Method Detail

      • getServiceName

        QName getServiceName()
        Gets the qualified name of the WSDL service name containing the port being accessed.
        Returns:
        javax.xml.namespace.QName The qualified name of the WSDL service.

      • getPortName

        QName getPortName()
        Gets the qualified name of the WSDL port being accessed.
        Returns:
        javax.xml.namespace.QName The qualified name of the WSDL port.

      • getBindingID

        String getBindingID()
        Gets the URI identifying the binding used by the port being accessed.
        Returns:
        String The binding identifier for the port.
        See Also:
        Binding
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.handler.soap

This package defines APIs for SOAP message handlers.

See: Description

  • Interface Summary
    Interface Description
    SOAPHandler<T extends SOAPMessageContext>
    The SOAPHandler class extends Handler to provide typesafety for the message context parameter and add a method to obtain access to the headers that may be processed by the handler.
    SOAPMessageContext
    The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response.

Package javax.xml.ws.handler.soap Description

This package defines APIs for SOAP message handlers.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.handler.soap Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.handler.soap

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • javax.xml.ws.handler.Handler<C>
    • javax.xml.ws.handler.soap.SOAPHandler<T>
  • java.util.Map<K,V>
    • javax.xml.ws.handler.MessageContext
      • javax.xml.ws.handler.soap.SOAPMessageContext
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.handler.soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.handler.soap

  • Packages that use javax.xml.ws.handler.soap
    Package Description
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.
  • Classes in javax.xml.ws.handler.soap used by javax.xml.ws.handler.soap
    Class and Description
    SOAPMessageContext
    The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.soap.SOAPHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.soap.SOAPHandler

No usage of javax.xml.ws.handler.soap.SOAPHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.handler.soap.SOAPMessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.handler.soap.SOAPMessageContext

  • Packages that use SOAPMessageContext
    Package Description
    javax.xml.ws.handler.soap
    This package defines APIs for SOAP message handlers.

    • Uses of SOAPMessageContext in javax.xml.ws.handler.soap

      Classes in javax.xml.ws.handler.soap with type parameters of type SOAPMessageContext
      Modifier and Type Interface and Description
      interface  SOAPHandler<T extends SOAPMessageContext>
      The SOAPHandler class extends Handler to provide typesafety for the message context parameter and add a method to obtain access to the headers that may be processed by the handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler.soap

Interface SOAPHandler<T extends SOAPMessageContext>

  • All Superinterfaces:
    Handler<T>

    public interface SOAPHandler<T extends SOAPMessageContext>
extends Handler<T>
    The SOAPHandler class extends Handler to provide typesafety for the message context parameter and add a method to obtain access to the headers that may be processed by the handler.
    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Set<QName> getHeaders()
      Gets the header blocks that can be processed by this Handler instance.

      • Methods inherited from interface javax.xml.ws.handler.Handler

        close, handleFault, handleMessage

    • Method Detail

      • getHeaders

        Set<QName> getHeaders()
        Gets the header blocks that can be processed by this Handler instance.
        Returns:
        Set of QNames of header blocks processed by this handler instance. QName is the qualified name of the outermost element of the Header block.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPMessageContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.handler.soap

Interface SOAPMessageContext

  • All Superinterfaces:
    Map<String,Object>, MessageContext

    public interface SOAPMessageContext
extends MessageContext
    The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response. The javax.xml.soap.SOAPMessage specifies the standard Java API for the representation of a SOAP 1.1 message with attachments.
    Since:
    JAX-WS 2.0
    See Also:
    SOAPMessage

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.xml.ws.handler.MessageContext

        MessageContext.Scope

      • Nested classes/interfaces inherited from interface java.util.Map

        Map.Entry<K,V>

    • Field Summary

      • Fields inherited from interface javax.xml.ws.handler.MessageContext

        HTTP_REQUEST_HEADERS, HTTP_REQUEST_METHOD, HTTP_RESPONSE_CODE, HTTP_RESPONSE_HEADERS, INBOUND_MESSAGE_ATTACHMENTS, MESSAGE_OUTBOUND_PROPERTY, OUTBOUND_MESSAGE_ATTACHMENTS, PATH_INFO, QUERY_STRING, REFERENCE_PARAMETERS, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE, WSDL_DESCRIPTION, WSDL_INTERFACE, WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object[] getHeaders(QName header, JAXBContext context, boolean allRoles)
      Gets headers that have a particular qualified name from the message in the message context.
      SOAPMessage getMessage()
      Gets the SOAPMessage from this message context.
      Set<String> getRoles()
      Gets the SOAP actor roles associated with an execution of the handler chain.
      void setMessage(SOAPMessage message)
      Sets the SOAPMessage in this message context

      • Methods inherited from interface javax.xml.ws.handler.MessageContext

        getScope, setScope

      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values

    • Method Detail

      • getMessage

        SOAPMessage getMessage()
        Gets the SOAPMessage from this message context. Modifications to the returned SOAPMessage change the message in-place, there is no need to subsequently call setMessage.
        Returns:
        Returns the SOAPMessage; returns null if no SOAPMessage is present in this message context

      • setMessage

        void setMessage(SOAPMessage message)
        Sets the SOAPMessage in this message context
        Parameters:
        message - SOAP message
        Throws:
        WebServiceException - If any error during the setting of the SOAPMessage in this message context
        UnsupportedOperationException - If this operation is not supported

      • getHeaders

        Object[] getHeaders(QName header,
                    JAXBContext context,
                    boolean allRoles)
        Gets headers that have a particular qualified name from the message in the message context. Note that a SOAP message can contain multiple headers with the same qualified name.
        Parameters:
        header - The XML qualified name of the SOAP header(s).
        context - The JAXBContext that should be used to unmarshall the header
        allRoles - If true then returns headers for all SOAP roles, if false then only returns headers targetted at the roles currently being played by this SOAP node, see getRoles.
        Returns:
        An array of unmarshalled headers; returns an empty array if no message is present in this message context or no headers match the supplied qualified name.
        Throws:
        WebServiceException - If an error occurs when using the supplied JAXBContext to unmarshall. The cause of the WebServiceException is the original JAXBException.

      • getRoles

        Set<String> getRoles()
        Gets the SOAP actor roles associated with an execution of the handler chain. Note that SOAP actor roles apply to the SOAP node and are managed using SOAPBinding.setRoles(java.util.Set<java.lang.String>) and SOAPBinding.getRoles(). Handler instances in the handler chain use this information about the SOAP actor roles to process the SOAP header blocks. Note that the SOAP actor roles are invariant during the processing of SOAP message through the handler chain.
        Returns:
        Array of String for SOAP actor roles
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Holder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class Holder<T>

  • java.lang.Object
    • javax.xml.ws.Holder<T>
  • All Implemented Interfaces:
    Serializable

    public final class Holder<T>
extends Object
implements Serializable
    Holds a value of type T.
    Since:
    JAX-WS 2.0
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type Field and Description
      T value
      The value contained in the holder.

    • Constructor Summary

      Constructors
      Constructor and Description
      Holder()
      Creates a new holder with a null value.
      Holder(T value)
      Create a new holder with the specified value.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public T value
        The value contained in the holder.

    • Constructor Detail

      • Holder

        public Holder()
        Creates a new holder with a null value.

      • Holder

        public Holder(T value)
        Create a new holder with the specified value.
        Parameters:
        value - The value to be stored in the holder.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


http

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.http

This package defines APIs specific to the HTTP binding.

See: Description

  • Interface Summary
    Interface Description
    HTTPBinding
    The HTTPBinding interface is an abstraction for the XML/HTTP binding.
  • Exception Summary
    Exception Description
    HTTPException
    The HTTPException exception represents a XML/HTTP fault.

Package javax.xml.ws.http Description

This package defines APIs specific to the HTTP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.http Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.http

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
              • javax.xml.ws.http.HTTPException

Interface Hierarchy

  • javax.xml.ws.Binding
    • javax.xml.ws.http.HTTPBinding
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.http

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.http

No usage of javax.xml.ws.http
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.http.HTTPException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.http.HTTPException

No usage of javax.xml.ws.http.HTTPException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.http.HTTPBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.http.HTTPBinding

No usage of javax.xml.ws.http.HTTPBinding
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HTTPBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.http

Interface HTTPBinding

  • All Superinterfaces:
    Binding

    public interface HTTPBinding
extends Binding
    The HTTPBinding interface is an abstraction for the XML/HTTP binding.
    Since:
    JAX-WS 2.0

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String HTTP_BINDING
      A constant representing the identity of the XML/HTTP binding.

    • Method Summary

      • Methods inherited from interface javax.xml.ws.Binding

        getBindingID, getHandlerChain, setHandlerChain

    • Field Detail

      • HTTP_BINDING

        static final String HTTP_BINDING
        A constant representing the identity of the XML/HTTP binding.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HTTPException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.http

Class HTTPException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
              • javax.xml.ws.http.HTTPException
  • All Implemented Interfaces:
    Serializable

    public class HTTPException
extends ProtocolException
    The HTTPException exception represents a XML/HTTP fault.

    Since there is no standard format for faults or exceptions in XML/HTTP messaging, only the HTTP status code is captured.

    Since:
    JAX-WS 2.0
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      HTTPException(int statusCode)
      Constructor for the HTTPException

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getStatusCode()
      Gets the HTTP status code.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • HTTPException

        public HTTPException(int statusCode)
        Constructor for the HTTPException
        Parameters:
        statusCode - int for the HTTP status code

    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Gets the HTTP status code.
        Returns:
        HTTP status code
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LogicalMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface LogicalMessage

  • public interface LogicalMessage
    The LogicalMessage interface represents a protocol agnostic XML message and contains methods that provide access to the payload of the message.
    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Source getPayload()
      Gets the message payload as an XML source, may be called multiple times on the same LogicalMessage instance, always returns a new Source that may be used to retrieve the entire message payload.
      Object getPayload(JAXBContext context)
      Gets the message payload as a JAXB object.
      void setPayload(Object payload, JAXBContext context)
      Sets the message payload
      void setPayload(Source payload)
      Sets the message payload

    • Method Detail

      • getPayload

        Source getPayload()
        Gets the message payload as an XML source, may be called multiple times on the same LogicalMessage instance, always returns a new Source that may be used to retrieve the entire message payload.

        If the returned Source is an instance of DOMSource, then modifications to the encapsulated DOM tree change the message payload in-place, there is no need to susequently call setPayload. Other types of Source provide only read access to the message payload.

        Returns:
        The contained message payload; returns null if no payload is present in this message.

      • setPayload

        void setPayload(Source payload)
        Sets the message payload
        Parameters:
        payload - message payload
        Throws:
        WebServiceException - If any error during the setting of the payload in this message
        UnsupportedOperationException - If this operation is not supported

      • getPayload

        Object getPayload(JAXBContext context)
        Gets the message payload as a JAXB object. Note that there is no connection between the returned object and the message payload, changes to the payload require calling setPayload.
        Parameters:
        context - The JAXBContext that should be used to unmarshall the message payload
        Returns:
        The contained message payload; returns null if no payload is present in this message
        Throws:
        WebServiceException - If an error occurs when using a supplied JAXBContext to unmarshall the payload. The cause of the WebServiceException is the original JAXBException.

      • setPayload

        void setPayload(Object payload,
                JAXBContext context)
        Sets the message payload
        Parameters:
        payload - message payload
        context - The JAXBContext that should be used to marshall the payload
        Throws:
        UnsupportedOperationException - If this operation is not supported
        WebServiceException - If an error occurs when using the supplied JAXBContext to marshall the payload. The cause of the WebServiceException is the original JAXBException.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ProtocolException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class ProtocolException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    HTTPException, SOAPFaultException

    public class ProtocolException
extends WebServiceException
    The ProtocolException class is a base class for exceptions related to a specific protocol binding. Subclasses are used to communicate protocol level fault information to clients and may be used on the server to control the protocol specific fault representation.
    Since:
    JAX-WS 2.0
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ProtocolException()
      Constructs a new protocol exception with null as its detail message.
      ProtocolException(String message)
      Constructs a new protocol exception with the specified detail message.
      ProtocolException(String message, Throwable cause)
      Constructs a new runtime exception with the specified detail message and cause.
      ProtocolException(Throwable cause)
      Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ProtocolException

        public ProtocolException()
        Constructs a new protocol exception with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).

      • ProtocolException

        public ProtocolException(String message)
        Constructs a new protocol exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

      • ProtocolException

        public ProtocolException(String message,
                         Throwable cause)
        Constructs a new runtime exception with the specified detail message and cause. Note that the detail message associated with cause is not automatically incorporated in this runtime exception's detail message.
        Parameters:
        message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
        cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

      • ProtocolException

        public ProtocolException(Throwable cause)
        Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for runtime exceptions that are little more than wrappers for other throwables.
        Parameters:
        cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Provider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface Provider<T>

  • public interface Provider<T>

    Service endpoints may implement the Provider interface as a dynamic alternative to an SEI.

    Implementations are required to support Provider<Source>, Provider<SOAPMessage> and Provider<DataSource>, depending on the binding in use and the service mode.

    The ServiceMode annotation can be used to control whether the Provider instance will receive entire protocol messages or just message payloads.

    Since:
    JAX-WS 2.0
    See Also:
    Source, SOAPMessage, ServiceMode

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      T invoke(T request)
      Invokes an operation occording to the contents of the request message.

    • Method Detail

      • invoke

        T invoke(T request)
        Invokes an operation occording to the contents of the request message.
        Parameters:
        request - The request message or message payload.
        Returns:
        The response message or message payload. May be null if there is no response.
        Throws:
        WebServiceException - If there is an error processing request. The cause of the WebServiceException may be set to a subclass of ProtocolException to control the protocol level representation of the exception.
        See Also:
        MessageContext, ProtocolException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type RequestWrapper

  • @Target(value=METHOD)
 @Retention(value=RUNTIME)
 @Documented
public @interface RequestWrapper
    Used to annotate methods in the Service Endpoint Interface with the request wrapper bean to be used at runtime. The default value of the localName is the operationName, as defined in WebMethod annotation and the targetNamespace is the target namespace of the SEI.

    When starting from Java this annotation is used resolve overloading conflicts in document literal mode. Only the className is required in this case.

    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String className
      Request wrapper bean name.
      String localName
      Element's local name.
      String partName
      wsdl:part name for the wrapper part
      String targetNamespace
      Element's namespace name.

    • Element Detail

      • localName

        public abstract String localName
        Element's local name.
        Default:
        ""

      • targetNamespace

        public abstract String targetNamespace
        Element's namespace name.
        Default:
        ""

      • className

        public abstract String className
        Request wrapper bean name.
        Default:
        ""

      • partName

        public abstract String partName
        wsdl:part name for the wrapper part
        Since:
        JAX-WS 2.2
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RespectBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type RespectBinding

  • @Target(value={TYPE,METHOD,FIELD})
 @Retention(value=RUNTIME)
 @Documented
 @WebServiceFeatureAnnotation(id="javax.xml.ws.RespectBindingFeature",
                             bean=RespectBindingFeature.class)
public @interface RespectBinding
    This feature clarifies the use of the wsdl:binding in a JAX-WS runtime.

    This annotation MUST only be used in conjunction the javax.jws.WebService, WebServiceProvider, WebServiceRef annotations. When used with the javax.jws.WebService annotation this annotation MUST only be used on the service endpoint implementation class. When used with a WebServiceRef annotation, this annotation MUST only be used when a proxy instance is created. The injected SEI proxy, and endpoint MUST honor the values of the RespectBinding annotation.

    This annotation's behaviour is defined by the corresponding feature RespectBindingFeature.

    Since:
    JAX-WS 2.1
    See Also:
    RespectBindingFeature

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      boolean enabled
      Specifies if this feature is enabled or disabled.

    • Element Detail

      • enabled

        public abstract boolean enabled
        Specifies if this feature is enabled or disabled.
        Default:
        true
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RespectBindingFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class RespectBindingFeature

  • java.lang.Object
    • javax.xml.ws.WebServiceFeature
      • javax.xml.ws.RespectBindingFeature

  • public final class RespectBindingFeature
extends WebServiceFeature
    This feature clarifies the use of the wsdl:binding in a JAX-WS runtime. This feature can be used during the creation of SEI proxy, and Dispatch instances on the client side and Endpoint instances on the server side. This feature cannot be used for Service instance creation on the client side.

    This feature is only useful with web services that have an associated WSDL. Enabling this feature requires that a JAX-WS implementation inspect the wsdl:binding for an endpoint at runtime to make sure that all wsdl:extensions that have the required attribute set to true are understood and are being used.

    The following describes the affects of this feature with respect to be enabled or disabled:

    • ENABLED: In this Mode, a JAX-WS runtime MUST assure that all required wsdl:binding extensions(including policies) are either understood and used by the runtime, or explicitly disabled by the web service application. A web service can disable a particular extension if there is a corresponding WebServiceFeature or annotation. Similarly, a web service client can disable particular extension using the corresponding WebServiceFeature while creating a proxy or Dispatch instance. The runtime MUST also make sure that binding of SEI parameters/return values respect the wsdl:binding. With this feature enabled, if a required (wsdl:required="true") wsdl:binding extension is in the WSDL and it is not supported by a JAX-WS runtime and it has not been explicitly turned off by the web service developer, then that JAX-WS runtime MUST behave appropriately based on whether it is on the client or server:
      • Client: runtime MUST throw a WebServiceException no sooner than when one of the methods above is invoked but no later than the first invocation of an endpoint operation.
      • Server: throw a WebServiceException and the endpoint MUST fail to deploy
    • DISABLED: In this Mode, an implementation may choose whether to inspect the wsdl:binding or not and to what degree the wsdl:binding will be inspected. For example, one implementation may choose to behave as if this feature is enabled, another implementation may only choose to verify the SEI's parameter/return type bindings.
    Since:
    JAX-WS 2.1
    See Also:
    AddressingFeature

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ID
      Constant value identifying the RespectBindingFeature

      • Fields inherited from class javax.xml.ws.WebServiceFeature

        enabled

    • Constructor Summary

      Constructors
      Constructor and Description
      RespectBindingFeature()
      Creates an RespectBindingFeature.
      RespectBindingFeature(boolean enabled)
      Creates an RespectBindingFeature

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getID()
      Get the unique identifier for this WebServiceFeature.

      • Methods inherited from class javax.xml.ws.WebServiceFeature

        isEnabled

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • ID

        public static final String ID
        Constant value identifying the RespectBindingFeature
        See Also:
        Constant Field Values

    • Constructor Detail

      • RespectBindingFeature

        public RespectBindingFeature()
        Creates an RespectBindingFeature. The instance created will be enabled.

      • RespectBindingFeature

        public RespectBindingFeature(boolean enabled)
        Creates an RespectBindingFeature
        Parameters:
        enabled - specifies whether this feature should be enabled or not.

    • Method Detail

      • getID

        public String getID()
        Get the unique identifier for this WebServiceFeature.
        Specified by:
        getID in class WebServiceFeature
        Returns:
        the unique identifier for this feature.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Response

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface Response<T>

  • All Superinterfaces:
    Future<T>

    public interface Response<T>
extends Future<T>
    The Response interface provides methods used to obtain the payload and context of a message sent in response to an operation invocation.

    For asynchronous operation invocations it provides additional methods to check the status of the request. The get(...) methods may throw the standard set of exceptions and their cause may be a RemoteException or a WebServiceException that represents the error that occured during the asynchronous method invocation.

    Since:
    JAX-WS 2.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Map<String,Object> getContext()
      Gets the contained response context.

      • Methods inherited from interface java.util.concurrent.Future

        cancel, get, get, isCancelled, isDone

    • Method Detail

      • getContext

        Map<String,Object> getContext()
        Gets the contained response context.
        Returns:
        The contained response context. May be null if a response is not yet available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ResponseWrapper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type ResponseWrapper

  • @Target(value=METHOD)
 @Retention(value=RUNTIME)
 @Documented
public @interface ResponseWrapper
    Used to annotate methods in the Service Endpoint Interface with the response wrapper bean to be used at runtime. The default value of the localName is the operationName as defined in WebMethod annotation appended with Response and the targetNamespace is the target namespace of the SEI.

    When starting from Java this annotation is used resolve overloading conflicts in document literal mode. Only the className is required in this case.

    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String className
      Response wrapper bean name.
      String localName
      Element's local name.
      String partName
      wsdl:part name for the wrapper part
      String targetNamespace
      Element's namespace name.

    • Element Detail

      • localName

        public abstract String localName
        Element's local name.
        Default:
        ""

      • targetNamespace

        public abstract String targetNamespace
        Element's namespace name.
        Default:
        ""

      • className

        public abstract String className
        Response wrapper bean name.
        Default:
        ""

      • partName

        public abstract String partName
        wsdl:part name for the wrapper part
        Since:
        JAX-WS 2.2
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Service

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class Service

  • java.lang.Object
    • javax.xml.ws.Service

  • public class Service
extends Object
    Service objects provide the client view of a Web service.

    Service acts as a factory of the following:

    • Proxies for a target service endpoint.
    • Instances of Dispatch for dynamic message-oriented invocation of a remote operation.

    The ports available on a service can be enumerated using the getPorts method. Alternatively, you can pass a service endpoint interface to the unary getPort method and let the runtime select a compatible port.

    Handler chains for all the objects created by a Service can be set by means of a HandlerResolver.

    An Executor may be set on the service in order to gain better control over the threads used to dispatch asynchronous callbacks. For instance, thread pooling with certain parameters can be enabled by creating a ThreadPoolExecutor and registering it with the service.

    Since:
    JAX-WS 2.0
    See Also:
    Provider, HandlerResolver, Executor

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  Service.Mode
      The orientation of a dynamic client or service.

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | Service(URL wsdlDocumentLocation, QName serviceName)
      protected | Service(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addPort(QName portName, String bindingId, String endpointAddress)
      Creates a new port for the service.
      static Service create(QName serviceName)
      Creates a Service instance.
      static Service create(QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      static Service create(URL wsdlDocumentLocation, QName serviceName)
      Creates a Service instance.
      static Service create(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features)
      Creates a Service instance.
      <T> Dispatch<T> createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the client's choosing.
      <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the client's choosing.
      Dispatch<Object> createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      Dispatch<Object> createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      Executor getExecutor()
      Returns the executor for this Serviceinstance.
      HandlerResolver getHandlerResolver()
      Returns the configured handler resolver.
      <T> T getPort(Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      <T> T getPort(QName portName, Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      Iterator<QName> getPorts()
      Returns an Iterator for the list of QNames of service endpoints grouped by this service
      QName getServiceName()
      Gets the name of this service.
      URL getWSDLDocumentLocation()
      Gets the location of the WSDL document for this Service.
      void setExecutor(Executor executor)
      Sets the executor for this Service instance.
      void setHandlerResolver(HandlerResolver handlerResolver)
      Sets the HandlerResolver for this Service instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Service

        protected Service(URL wsdlDocumentLocation,
                  QName serviceName)

      • Service

        protected Service(URL wsdlDocumentLocation,
                  QName serviceName,
                  WebServiceFeature... features)

    • Method Detail

      • getPort

        public <T> T getPort(QName portName,
                     Class<T> serviceEndpointInterface)
        The getPort method returns a proxy. A service client uses this proxy to invoke operations on the target service endpoint. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy instance.
        Parameters:
        portName - Qualified name of the service endpoint in the WSDL service description.
        serviceEndpointInterface - Service endpoint interface supported by the dynamic proxy instance.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException - This exception is thrown in the following cases:
        • If there is an error in creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If an illegal serviceEndpointInterface or portName is specified.
        See Also:
        Proxy, InvocationHandler

      • getPort

        public <T> T getPort(QName portName,
                     Class<T> serviceEndpointInterface,
                     WebServiceFeature... features)
        The getPort method returns a proxy. A service client uses this proxy to invoke operations on the target service endpoint. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy instance.
        Parameters:
        portName - Qualified name of the service endpoint in the WSDL service description.
        serviceEndpointInterface - Service endpoint interface supported by the dynamic proxy instance.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException - This exception is thrown in the following cases:
        • If there is an error in creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If an illegal serviceEndpointInterface or portName is specified.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Proxy, InvocationHandler, WebServiceFeature

      • getPort

        public <T> T getPort(Class<T> serviceEndpointInterface)
        The getPort method returns a proxy. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly. The returned proxy should not be reconfigured by the client.
        Parameters:
        serviceEndpointInterface - Service endpoint interface.
        Returns:
        Object instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If an illegal serviceEndpointInterface is specified.

      • getPort

        public <T> T getPort(Class<T> serviceEndpointInterface,
                     WebServiceFeature... features)
        The getPort method returns a proxy. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly. The returned proxy should not be reconfigured by the client.
        Parameters:
        serviceEndpointInterface - Service endpoint interface.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If an illegal serviceEndpointInterface is specified.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        WebServiceFeature

      • getPort

        public <T> T getPort(EndpointReference endpointReference,
                     Class<T> serviceEndpointInterface,
                     WebServiceFeature... features)
        The getPort method returns a proxy. The parameter endpointReference specifies the endpoint that will be invoked by the returned proxy. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference metadata also has a WSDL, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. The returned proxy should not be reconfigured by the client. If this Service instance has a known proxy port that matches the information contained in the WSDL, then that proxy is returned, otherwise a WebServiceException is thrown.

        Calling this method has the same behavior as the following

         port = service.getPort(portName, serviceEndpointInterface);
        where the portName is retrieved from the metadata of the endpointReference or from the serviceEndpointInterface and the WSDL associated with this Service instance.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned proxy.
        serviceEndpointInterface - Service endpoint interface.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName of this Service instance.
        • If a portName cannot be extracted from the WSDL or endpointReference metadata.
        • If an invalid endpointReference is specified.
        • If an invalid serviceEndpointInterface is specified.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1

      • addPort

        public void addPort(QName portName,
                    String bindingId,
                    String endpointAddress)
        Creates a new port for the service. Ports created in this way contain no WSDL port type information and can only be used for creating Dispatchinstances.
        Parameters:
        portName - Qualified name for the target service endpoint.
        bindingId - A String identifier of a binding.
        endpointAddress - Address of the target service endpoint as a URI.
        Throws:
        WebServiceException - If any error in the creation of the port.
        See Also:
        SOAPBinding.SOAP11HTTP_BINDING, SOAPBinding.SOAP12HTTP_BINDING, HTTPBinding.HTTP_BINDING

      • createDispatch

        public <T> Dispatch<T> createDispatch(QName portName,
                                      Class<T> type,
                                      Service.Mode mode)
        Creates a Dispatch instance for use with objects of the client's choosing.
        Parameters:
        portName - Qualified name for the target service endpoint
        type - The class of object used for messages or message payloads. Implementations are required to support javax.xml.transform.Source, javax.xml.soap.SOAPMessage and javax.activation.DataSource, depending on the binding in use.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        Returns:
        Dispatch instance.
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object.
        See Also:
        Source, SOAPMessage

      • createDispatch

        public <T> Dispatch<T> createDispatch(QName portName,
                                      Class<T> type,
                                      Service.Mode mode,
                                      WebServiceFeature... features)
        Creates a Dispatch instance for use with objects of the client's choosing.
        Parameters:
        portName - Qualified name for the target service endpoint
        type - The class of object used for messages or message payloads. Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance.
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object or if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Source, SOAPMessage, WebServiceFeature

      • createDispatch

        public <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
                                      Class<T> type,
                                      Service.Mode mode,
                                      WebServiceFeature... features)
        Creates a Dispatch instance for use with objects of the client's choosing. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the dispatch accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference also has a WSDL in its metadata, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. An implementation MUST be able to retrieve the portName from the endpointReference metadata.

        This method behaves the same as calling

         dispatch = service.createDispatch(portName, type, mode, features);
        where the portName is retrieved from the WSDL or EndpointReference metadata.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned Dispatch object.
        type - The class of object used to messages or message payloads. Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException -
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName or portName of a WSDL associated with this Service instance.
        • If the portName cannot be determined from the EndpointReference metadata.
        • If any error in the creation of the Dispatch object.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Source, SOAPMessage, WebServiceFeature

      • createDispatch

        public Dispatch<Object> createDispatch(QName portName,
                                       JAXBContext context,
                                       Service.Mode mode)
        Creates a Dispatch instance for use with JAXB generated objects.
        Parameters:
        portName - Qualified name for the target service endpoint
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body.
        Returns:
        Dispatch instance.
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object.
        See Also:
        JAXBContext

      • createDispatch

        public Dispatch<Object> createDispatch(QName portName,
                                       JAXBContext context,
                                       Service.Mode mode,
                                       WebServiceFeature... features)
        Creates a Dispatch instance for use with JAXB generated objects.
        Parameters:
        portName - Qualified name for the target service endpoint
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance.
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object or if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        JAXBContext, WebServiceFeature

      • createDispatch

        public Dispatch<Object> createDispatch(EndpointReference endpointReference,
                                       JAXBContext context,
                                       Service.Mode mode,
                                       WebServiceFeature... features)
        Creates a Dispatch instance for use with JAXB generated objects. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the dispatch accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference also has a WSDL in its metadata, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. An implementation MUST be able to retrieve the portName from the endpointReference metadata.

        This method behavies the same as calling

         dispatch = service.createDispatch(portName, context, mode, features);
        where the portName is retrieved from the WSDL or endpointReference metadata.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned Dispatch object.
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the client will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the client will work with SOAP messages or the contents of a SOAP body.
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException -
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName or portName of a WSDL associated with this Service instance.
        • If the portName cannot be determined from the EndpointReference metadata.
        • If any error in the creation of the Dispatch object.
        • if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        JAXBContext, WebServiceFeature

      • getServiceName

        public QName getServiceName()
        Gets the name of this service.
        Returns:
        Qualified name of this service

      • getPorts

        public Iterator<QName> getPorts()
        Returns an Iterator for the list of QNames of service endpoints grouped by this service
        Returns:
        Returns java.util.Iterator with elements of type javax.xml.namespace.QName.
        Throws:
        WebServiceException - If this Service class does not have access to the required WSDL metadata.

      • getWSDLDocumentLocation

        public URL getWSDLDocumentLocation()
        Gets the location of the WSDL document for this Service.
        Returns:
        URL for the location of the WSDL document for this service.

      • getHandlerResolver

        public HandlerResolver getHandlerResolver()
        Returns the configured handler resolver.
        Returns:
        HandlerResolver The HandlerResolver being used by this Service instance, or null if there isn't one.

      • setHandlerResolver

        public void setHandlerResolver(HandlerResolver handlerResolver)
        Sets the HandlerResolver for this Service instance.

        The handler resolver, if present, will be called once for each proxy or dispatch instance that is created, and the handler chain returned by the resolver will be set on the instance.

        Parameters:
        handlerResolver - The HandlerResolver to use for all subsequently created proxy/dispatch objects.
        See Also:
        HandlerResolver

      • getExecutor

        public Executor getExecutor()
        Returns the executor for this Serviceinstance. The executor is used for all asynchronous invocations that require callbacks.
        Returns:
        The java.util.concurrent.Executor to be used to invoke a callback.
        See Also:
        Executor

      • setExecutor

        public void setExecutor(Executor executor)
        Sets the executor for this Service instance. The executor is used for all asynchronous invocations that require callbacks.
        Parameters:
        executor - The java.util.concurrent.Executor to be used to invoke a callback.
        Throws:
        SecurityException - If the instance does not support setting an executor for security reasons (e.g. the necessary permissions are missing).
        See Also:
        Executor

      • create

        public static Service create(URL wsdlDocumentLocation,
                             QName serviceName)
        Creates a Service instance. The specified WSDL document location and service qualified name MUST uniquely identify a wsdl:service element.
        Parameters:
        wsdlDocumentLocation - URL for the WSDL document location for the service
        serviceName - QName for the service
        Throws:
        WebServiceException - If any error in creation of the specified service.

      • create

        public static Service create(URL wsdlDocumentLocation,
                             QName serviceName,
                             WebServiceFeature... features)
        Creates a Service instance. The created instance is configured with the web service features. The specified WSDL document location and service qualified name MUST uniquely identify a wsdl:service element.
        Parameters:
        wsdlDocumentLocation - URL for the WSDL document location for the service
        serviceName - QName for the service
        features - Web Service features that must be configured on the service. If the provider doesn't understand a feature, it must throw a WebServiceException.
        Throws:
        WebServiceException - If any error in creation of the specified service.
        Since:
        JAX-WS 2.2

      • create

        public static Service create(QName serviceName)
        Creates a Service instance.
        Parameters:
        serviceName - QName for the service
        Throws:
        WebServiceException - If any error in creation of the specified service

      • create

        public static Service create(QName serviceName,
                             WebServiceFeature... features)
        Creates a Service instance. The created instance is configured with the web service features.
        Parameters:
        serviceName - QName for the service
        features - Web Service features that must be configured on the service. If the provider doesn't understand a feature, it must throw a WebServiceException.
        Throws:
        WebServiceException - If any error in creation of the specified service
        Since:
        JAX-WS 2.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Service.Mode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.ws

Enum Service.Mode

  • java.lang.Object
    • java.lang.Enum<Service.Mode>
      • javax.xml.ws.Service.Mode
  • All Implemented Interfaces:
    Serializable, Comparable<Service.Mode>
    Enclosing class:
    Service

    public static enum Service.Mode
extends Enum<Service.Mode>
    The orientation of a dynamic client or service. MESSAGE provides access to entire protocol message, PAYLOAD to protocol message payload only.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      MESSAGE
      PAYLOAD

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static Service.Mode valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Service.Mode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • MESSAGE

        public static final Service.Mode MESSAGE

      • PAYLOAD

        public static final Service.Mode PAYLOAD

    • Method Detail

      • values

        public static Service.Mode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Service.Mode c : Service.Mode.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static Service.Mode valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type ServiceMode

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
 @Inherited
 @Documented
public @interface ServiceMode
    Used to indicate whether a Provider implementation wishes to work with entire protocol messages or just with protocol message payloads.
    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      Service.Mode value
      Service mode.

    • Element Detail

      • value

        public abstract Service.Mode value
        Service mode. PAYLOAD indicates that the Provider implementation wishes to work with protocol message payloads only. MESSAGE indicates that the Provider implementation wishes to work with entire protocol messages.
        Default:
        javax.xml.ws.Service.Mode.PAYLOAD
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.soap

This package defines APIs specific to the SOAP binding.

See: Description

  • Interface Summary
    Interface Description
    SOAPBinding
    The SOAPBinding interface is an abstraction for the SOAP binding.
  • Class Summary
    Class Description
    AddressingFeature
    AddressingFeature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding.
    MTOMFeature
    This feature represents the use of MTOM with a web service.
  • Enum Summary
    Enum Description
    AddressingFeature.Responses
    If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all.
  • Exception Summary
    Exception Description
    SOAPFaultException
    The SOAPFaultException exception represents a SOAP 1.1 or 1.2 fault.
  • Annotation Types Summary
    Annotation Type Description
    Addressing
    This annotation represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding.
    MTOM
    This feature represents the use of MTOM with a web service.

Package javax.xml.ws.soap Description

This package defines APIs specific to the SOAP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.soap Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.soap

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
              • javax.xml.ws.soap.SOAPFaultException
    • javax.xml.ws.WebServiceFeature
      • javax.xml.ws.soap.AddressingFeature
      • javax.xml.ws.soap.MTOMFeature

Interface Hierarchy

  • javax.xml.ws.Binding
    • javax.xml.ws.soap.SOAPBinding

Annotation Type Hierarchy

  • javax.xml.ws.soap.MTOM (implements java.lang.annotation.Annotation)
  • javax.xml.ws.soap.Addressing (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • javax.xml.ws.soap.AddressingFeature.Responses
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.soap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.soap

  • Packages that use javax.xml.ws.soap
    Package Description
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.
  • Classes in javax.xml.ws.soap used by javax.xml.ws.soap
    Class and Description
    AddressingFeature.Responses
    If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Addressing

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws.soap

Annotation Type Addressing

  • @Target(value={TYPE,METHOD,FIELD})
 @Retention(value=RUNTIME)
 @Documented
 @WebServiceFeatureAnnotation(id="http://www.w3.org/2005/08/addressing/module",
                             bean=AddressingFeature.class)
public @interface Addressing
    This annotation represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this annotation with any other binding is undefined.

    This annotation MUST only be used in conjunction with the WebService, WebServiceProvider, and WebServiceRef annotations. When used with a javax.jws.WebService annotation, this annotation MUST only be used on the service endpoint implementation class. When used with a WebServiceRef annotation, this annotation MUST only be used when a proxy instance is created. The injected SEI proxy, and endpoint MUST honor the values of the Addressing annotation.

    This annotation's behaviour is defined by the corresponding feature AddressingFeature.

    Since:
    JAX-WS 2.1

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      boolean enabled
      Specifies if this feature is enabled or disabled.
      boolean required
      If addressing is enabled, this property determines whether the endpoint requires WS-Addressing.
      AddressingFeature.Responses responses
      If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all.

    • Element Detail

      • enabled

        public abstract boolean enabled
        Specifies if this feature is enabled or disabled. If enabled, it means the endpoint supports WS-Addressing but does not require its use. Corresponding 3.1.1 Addressing Assertion must be generated in the generated WSDL.
        Default:
        true

      • required

        public abstract boolean required
        If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, the endpoint requires WS-Addressing and WS-Addressing headers MUST be present on incoming messages. A corresponding 3.1.1 Addressing Assertion must be generated in the WSDL.
        Default:
        false

      • responses

        public abstract AddressingFeature.Responses responses
        If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all.

        AddressingFeature.Responses.ALL supports all response types and this is the default value.

        AddressingFeature.Responses.ANONYMOUS requires the use of only anonymous responses. It will result into wsam:AnonymousResponses nested assertion as specified in 3.1.2 AnonymousResponses Assertion in the generated WSDL.

        AddressingFeature.Responses.NON_ANONYMOUS requires the use of only non-anonymous responses. It will result into wsam:NonAnonymousResponses nested assertion as specified in 3.1.3 NonAnonymousResponses Assertion in the generated WSDL.

        Since:
        JAX-WS 2.2
        Default:
        javax.xml.ws.soap.AddressingFeature.Responses.ALL
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AddressingFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.soap

Class AddressingFeature

  • java.lang.Object
    • javax.xml.ws.WebServiceFeature
      • javax.xml.ws.soap.AddressingFeature

  • public final class AddressingFeature
extends WebServiceFeature
    AddressingFeature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature with any other binding is undefined.

    This feature can be used during the creation of SEI proxy, and Dispatch instances on the client side and Endpoint instances on the server side. This feature cannot be used for Service instance creation on the client side.

    The following describes the effects of this feature with respect to be enabled or disabled:

    • ENABLED: In this Mode, WS-Addressing will be enabled. It means the endpoint supports WS-Addressing but does not require its use. A sender could send messages with WS-Addressing headers or without WS-Addressing headers. But a receiver MUST consume both types of messages.
    • DISABLED: In this Mode, WS-Addressing will be disabled. At runtime, WS-Addressing headers MUST NOT be used by a sender or receiver.

    If the feature is enabled, the required property determines whether the endpoint requires WS-Addressing. If it is set true, WS-Addressing headers MUST be present on incoming and outgoing messages. By default the required property is false.

    If the web service developer has not explicitly enabled this feature, WSDL's wsam:Addressing policy assertion is used to find the use of WS-Addressing. By using the feature explicitly, an application overrides WSDL's indication of the use of WS-Addressing. In some cases, this is really required. For example, if an application has implemented WS-Addressing itself, it can use this feature to disable addressing. That means a JAX-WS implementation doesn't consume or produce WS-Addressing headers.

    If addressing is enabled, a corresponding wsam:Addressing policy assertion must be generated in the WSDL as per 3.1 WS-Policy Assertions

    Example 1: Possible Policy Assertion in the generated WSDL for @Addressing

       <wsam:Addressing wsp:Optional="true">
     <wsp:Policy/>
   </wsam:Addressing>

    Example 2: Possible Policy Assertion in the generated WSDL for @Addressing(required=true)

       <wsam:Addressing>
     <wsp:Policy/>
   </wsam:Addressing>

    Example 3: Possible Policy Assertion in the generated WSDL for @Addressing(required=true, responses=Responses.ANONYMOUS)

       <wsam:Addressing>
      <wsp:Policy>
        <wsam:AnonymousResponses/>
      </wsp:Policy>
   </wsam:Addressing>

    See Web Services Addressing - Core, Web Services Addressing 1.0 - SOAP Binding, and Web Services Addressing 1.0 - Metadata for more information on WS-Addressing.

    Since:
    JAX-WS 2.1
    See Also:
    Addressing

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  AddressingFeature.Responses
      If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ID
      Constant value identifying the AddressingFeature
      protected boolean required
      If addressing is enabled, this property determines whether the endpoint requires WS-Addressing.

      • Fields inherited from class javax.xml.ws.WebServiceFeature

        enabled

    • Constructor Summary

      Constructors
      Constructor and Description
      AddressingFeature()
      Creates and configures an AddressingFeature with the use of addressing requirements.
      AddressingFeature(boolean enabled)
      Creates and configures an AddressingFeature with the use of addressing requirements.
      AddressingFeature(boolean enabled, boolean required)
      Creates and configures an AddressingFeature with the use of addressing requirements.
      AddressingFeature(boolean enabled, boolean required, AddressingFeature.Responses responses)
      Creates and configures an AddressingFeature with the use of addressing requirements.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getID()
      Get the unique identifier for this WebServiceFeature.
      AddressingFeature.Responses getResponses()
      If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.
      boolean isRequired()
      If addressing is enabled, this property determines whether the endpoint requires WS-Addressing.

      • Methods inherited from class javax.xml.ws.WebServiceFeature

        isEnabled

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • ID

        public static final String ID
        Constant value identifying the AddressingFeature
        See Also:
        Constant Field Values

      • required

        protected boolean required
        If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages.

    • Constructor Detail

      • AddressingFeature

        public AddressingFeature()
        Creates and configures an AddressingFeature with the use of addressing requirements. The created feature enables ws-addressing i.e. supports ws-addressing but doesn't require its use. It is also configured to accept all the response types.

      • AddressingFeature

        public AddressingFeature(boolean enabled)
        Creates and configures an AddressingFeature with the use of addressing requirements. If enabled is true, it enables ws-addressing i.e. supports ws-addressing but doesn't require its use. It also configures to accept all the response types.
        Parameters:
        enabled - true enables ws-addressing i.e.ws-addressing is supported but doesn't require its use

      • AddressingFeature

        public AddressingFeature(boolean enabled,
                         boolean required)
        Creates and configures an AddressingFeature with the use of addressing requirements. If enabled and required are true, it enables ws-addressing and requires its use. It also configures to accept all the response types.
        Parameters:
        enabled - true enables ws-addressing i.e.ws-addressing is supported but doesn't require its use
        required - true means requires the use of ws-addressing .

      • AddressingFeature

        public AddressingFeature(boolean enabled,
                         boolean required,
                         AddressingFeature.Responses responses)
        Creates and configures an AddressingFeature with the use of addressing requirements. If enabled and required are true, it enables ws-addressing and requires its use. Also, the response types can be configured using responses parameter.
        Parameters:
        enabled - true enables ws-addressing i.e.ws-addressing is supported but doesn't require its use
        required - true means requires the use of ws-addressing .
        responses - specifies what type of responses are required
        Since:
        JAX-WS 2.2

    • Method Detail

      • getID

        public String getID()
        Get the unique identifier for this WebServiceFeature.
        Specified by:
        getID in class WebServiceFeature
        Returns:
        the unique identifier for this feature.

      • isRequired

        public boolean isRequired()
        If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages.
        Returns:
        the current required value

      • getResponses

        public AddressingFeature.Responses getResponses()
        If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.

        Returns:
        AddressingFeature.Responses.ALL when endpoint supports all types of responses, AddressingFeature.Responses.ANONYMOUS when endpoint requires the use of only anonymous responses, AddressingFeature.Responses.NON_ANONYMOUS when endpoint requires the use of only non-anonymous responses
        Since:
        JAX-WS 2.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AddressingFeature.Responses

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
javax.xml.ws.soap

Enum AddressingFeature.Responses

  • java.lang.Object
    • java.lang.Enum<AddressingFeature.Responses>
      • javax.xml.ws.soap.AddressingFeature.Responses
  • All Implemented Interfaces:
    Serializable, Comparable<AddressingFeature.Responses>
    Enclosing class:
    AddressingFeature

    public static enum AddressingFeature.Responses
extends Enum<AddressingFeature.Responses>
    If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all.

    ALL supports all response types and this is the default value.

    ANONYMOUS requires the use of only anonymous responses. It will result into wsam:AnonymousResponses nested assertion as specified in 3.1.2 AnonymousResponses Assertion in the generated WSDL.

    NON_ANONYMOUS requires the use of only non-anonymous responses. It will result into wsam:NonAnonymousResponses nested assertion as specified in 3.1.3 NonAnonymousResponses Assertion in the generated WSDL.

    Since:
    JAX-WS 2.2

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ALL
      Supports all response types and this is the default
      ANONYMOUS
      Specifies the use of only anonymous responses.
      NON_ANONYMOUS
      Specifies the use of only non-anonymous responses.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static AddressingFeature.Responses valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static AddressingFeature.Responses[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • ANONYMOUS

        public static final AddressingFeature.Responses ANONYMOUS
        Specifies the use of only anonymous responses. It will result into wsam:AnonymousResponses nested assertion as specified in 3.1.2 AnonymousResponses Assertion in the generated WSDL.

      • NON_ANONYMOUS

        public static final AddressingFeature.Responses NON_ANONYMOUS
        Specifies the use of only non-anonymous responses. It will result into wsam:NonAnonymousResponses nested assertion as specified in 3.1.3 NonAnonymousResponses Assertion in the generated WSDL.

      • ALL

        public static final AddressingFeature.Responses ALL
        Supports all response types and this is the default

    • Method Detail

      • values

        public static AddressingFeature.Responses[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AddressingFeature.Responses c : AddressingFeature.Responses.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static AddressingFeature.Responses valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.Addressing

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.Addressing

No usage of javax.xml.ws.soap.Addressing
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.AddressingFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.AddressingFeature

No usage of javax.xml.ws.soap.AddressingFeature
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.AddressingFeature.Responses

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.AddressingFeature.Responses

  • Packages that use AddressingFeature.Responses
    Package Description
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of AddressingFeature.Responses in javax.xml.ws.soap

      Methods in javax.xml.ws.soap that return AddressingFeature.Responses
      Modifier and Type Method and Description
      AddressingFeature.Responses AddressingFeature.getResponses()
      If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.
      static AddressingFeature.Responses AddressingFeature.Responses.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static AddressingFeature.Responses[] AddressingFeature.Responses.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Constructors in javax.xml.ws.soap with parameters of type AddressingFeature.Responses
      Constructor and Description
      AddressingFeature(boolean enabled, boolean required, AddressingFeature.Responses responses)
      Creates and configures an AddressingFeature with the use of addressing requirements.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.MTOM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.MTOM

No usage of javax.xml.ws.soap.MTOM
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.MTOMFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.MTOMFeature

No usage of javax.xml.ws.soap.MTOMFeature
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.soap.SOAPFaultException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.soap.SOAPFaultException

No usage of javax.xml.ws.soap.SOAPFaultException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.ws.soap.SOAPBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.ws.soap.SOAPBinding

No usage of javax.xml.ws.soap.SOAPBinding
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MTOM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws.soap

Annotation Type MTOM

  • @Target(value={TYPE,METHOD,FIELD})
 @Retention(value=RUNTIME)
 @Documented
 @WebServiceFeatureAnnotation(id="http://www.w3.org/2004/08/soap/features/http-optimization",
                             bean=MTOMFeature.class)
public @interface MTOM
    This feature represents the use of MTOM with a web service.

    This annotation MUST only be used in conjunction the javax.jws.WebService, WebServiceProvider, WebServiceRef annotations. When used with the javax.jws.WebService annotation this annotation MUST only be used on the service endpoint implementation class. When used with a WebServiceRef annotation, this annotation MUST only be used when a proxy instance is created. The injected SEI proxy, and endpoint MUST honor the values of the MTOM annotation.

    This annotation's behaviour is defined by the corresponding feature MTOMFeature.

    Since:
    JAX-WS 2.1

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      boolean enabled
      Specifies if this feature is enabled or disabled.
      int threshold
      Property for MTOM threshold value.

    • Element Detail

      • enabled

        public abstract boolean enabled
        Specifies if this feature is enabled or disabled.
        Default:
        true

      • threshold

        public abstract int threshold
        Property for MTOM threshold value. When MTOM is enabled, binary data above this size in bytes will be XOP encoded or sent as attachment. The value of this property MUST always be >= 0. Default value is 0.
        Default:
        0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MTOMFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.soap

Class MTOMFeature

  • java.lang.Object
    • javax.xml.ws.WebServiceFeature
      • javax.xml.ws.soap.MTOMFeature

  • public final class MTOMFeature
extends WebServiceFeature
    This feature represents the use of MTOM with a web service. This feature can be used during the creation of SEI proxy, and Dispatch instances on the client side and Endpoint instances on the server side. This feature cannot be used for Service instance creation on the client side.

    The following describes the affects of this feature with respect to being enabled or disabled:

    • ENABLED: In this Mode, MTOM will be enabled. A receiver MUST accept both a non-optimized and an optimized message, and a sender MAY send an optimized message, or a non-optimized message. The heuristics used by a sender to determine whether to use optimization or not are implementation-specific.
    • DISABLED: In this Mode, MTOM will be disabled

    The threshold property can be used to set the threshold value used to determine when binary data should be XOP encoded.

    Since:
    JAX-WS 2.1

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ID
      Constant value identifying the MTOMFeature
      protected int threshold
      Property for MTOM threshold value.

      • Fields inherited from class javax.xml.ws.WebServiceFeature

        enabled

    • Constructor Summary

      Constructors
      Constructor and Description
      MTOMFeature()
      Create an MTOMFeature.
      MTOMFeature(boolean enabled)
      Creates an MTOMFeature.
      MTOMFeature(boolean enabled, int threshold)
      Creates an MTOMFeature.
      MTOMFeature(int threshold)
      Creates an MTOMFeature.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getID()
      Get the unique identifier for this WebServiceFeature.
      int getThreshold()
      Gets the threshold value used to determine when binary data should be sent as an attachment.

      • Methods inherited from class javax.xml.ws.WebServiceFeature

        isEnabled

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • ID

        public static final String ID
        Constant value identifying the MTOMFeature
        See Also:
        Constant Field Values

      • threshold

        protected int threshold
        Property for MTOM threshold value. This property serves as a hint when MTOM is enabled, binary data above this size in bytes SHOULD be sent as attachment. The value of this property MUST always be >= 0. Default value is 0.

    • Constructor Detail

      • MTOMFeature

        public MTOMFeature()
        Create an MTOMFeature. The instance created will be enabled.

      • MTOMFeature

        public MTOMFeature(boolean enabled)
        Creates an MTOMFeature.
        Parameters:
        enabled - specifies if this feature should be enabled or not

      • MTOMFeature

        public MTOMFeature(int threshold)
        Creates an MTOMFeature. The instance created will be enabled.
        Parameters:
        threshold - the size in bytes that binary data SHOULD be before being sent as an attachment.
        Throws:
        WebServiceException - if threshold is < 0

      • MTOMFeature

        public MTOMFeature(boolean enabled,
                   int threshold)
        Creates an MTOMFeature.
        Parameters:
        enabled - specifies if this feature should be enabled or not
        threshold - the size in bytes that binary data SHOULD be before being sent as an attachment.
        Throws:
        WebServiceException - if threshold is < 0

    • Method Detail

      • getID

        public String getID()
        Get the unique identifier for this WebServiceFeature.
        Specified by:
        getID in class WebServiceFeature
        Returns:
        the unique identifier for this feature.

      • getThreshold

        public int getThreshold()
        Gets the threshold value used to determine when binary data should be sent as an attachment.
        Returns:
        the current threshold size in bytes
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.soap

Interface SOAPBinding

  • All Superinterfaces:
    Binding

    public interface SOAPBinding
extends Binding
    The SOAPBinding interface is an abstraction for the SOAP binding.
    Since:
    JAX-WS 2.0

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String SOAP11HTTP_BINDING
      A constant representing the identity of the SOAP 1.1 over HTTP binding.
      static String SOAP11HTTP_MTOM_BINDING
      A constant representing the identity of the SOAP 1.1 over HTTP binding with MTOM enabled by default.
      static String SOAP12HTTP_BINDING
      A constant representing the identity of the SOAP 1.2 over HTTP binding.
      static String SOAP12HTTP_MTOM_BINDING
      A constant representing the identity of the SOAP 1.2 over HTTP binding with MTOM enabled by default.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      MessageFactory getMessageFactory()
      Gets the SAAJ MessageFactory instance used by this SOAP binding.
      Set<String> getRoles()
      Gets the roles played by the SOAP binding instance.
      SOAPFactory getSOAPFactory()
      Gets the SAAJ SOAPFactory instance used by this SOAP binding.
      boolean isMTOMEnabled()
      Returns true if the use of MTOM is enabled.
      void setMTOMEnabled(boolean flag)
      Enables or disables use of MTOM.
      void setRoles(Set<String> roles)
      Sets the roles played by the SOAP binding instance.

      • Methods inherited from interface javax.xml.ws.Binding

        getBindingID, getHandlerChain, setHandlerChain

    • Field Detail

      • SOAP11HTTP_BINDING

        static final String SOAP11HTTP_BINDING
        A constant representing the identity of the SOAP 1.1 over HTTP binding.
        See Also:
        Constant Field Values

      • SOAP12HTTP_BINDING

        static final String SOAP12HTTP_BINDING
        A constant representing the identity of the SOAP 1.2 over HTTP binding.
        See Also:
        Constant Field Values

      • SOAP11HTTP_MTOM_BINDING

        static final String SOAP11HTTP_MTOM_BINDING
        A constant representing the identity of the SOAP 1.1 over HTTP binding with MTOM enabled by default.
        See Also:
        Constant Field Values

      • SOAP12HTTP_MTOM_BINDING

        static final String SOAP12HTTP_MTOM_BINDING
        A constant representing the identity of the SOAP 1.2 over HTTP binding with MTOM enabled by default.
        See Also:
        Constant Field Values

    • Method Detail

      • getRoles

        Set<String> getRoles()
        Gets the roles played by the SOAP binding instance.
        Returns:
        Set<String> The set of roles played by the binding instance.

      • setRoles

        void setRoles(Set<String> roles)
        Sets the roles played by the SOAP binding instance.
        Parameters:
        roles - The set of roles played by the binding instance.
        Throws:
        WebServiceException - On an error in the configuration of the list of roles.

      • isMTOMEnabled

        boolean isMTOMEnabled()
        Returns true if the use of MTOM is enabled.
        Returns:
        true if and only if the use of MTOM is enabled.

      • setMTOMEnabled

        void setMTOMEnabled(boolean flag)
        Enables or disables use of MTOM.
        Parameters:
        flag - A boolean specifying whether the use of MTOM should be enabled or disabled.
        Throws:
        WebServiceException - If the specified setting is not supported by this binding instance.

      • getSOAPFactory

        SOAPFactory getSOAPFactory()
        Gets the SAAJ SOAPFactory instance used by this SOAP binding.
        Returns:
        SOAPFactory instance used by this SOAP binding.

      • getMessageFactory

        MessageFactory getMessageFactory()
        Gets the SAAJ MessageFactory instance used by this SOAP binding.
        Returns:
        MessageFactory instance used by this SOAP binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SOAPFaultException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.soap

Class SOAPFaultException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
            • javax.xml.ws.ProtocolException
              • javax.xml.ws.soap.SOAPFaultException
  • All Implemented Interfaces:
    Serializable

    public class SOAPFaultException
extends ProtocolException
    The SOAPFaultException exception represents a SOAP 1.1 or 1.2 fault.

    A SOAPFaultException wraps a SAAJ SOAPFault that manages the SOAP-specific representation of faults. The createFault method of javax.xml.soap.SOAPFactory may be used to create an instance of javax.xml.soap.SOAPFault for use with the constructor. SOAPBinding contains an accessor for the SOAPFactory used by the binding instance.

    Note that the value of getFault is the only part of the exception used when searializing a SOAP fault.

    Refer to the SOAP specification for a complete description of SOAP faults.

    Since:
    JAX-WS 2.0
    See Also:
    SOAPFault, SOAPBinding.getSOAPFactory(), ProtocolException, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SOAPFaultException(SOAPFault fault)
      Constructor for SOAPFaultException

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      SOAPFault getFault()
      Gets the embedded SOAPFault instance.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SOAPFaultException

        public SOAPFaultException(SOAPFault fault)
        Constructor for SOAPFaultException
        Parameters:
        fault - SOAPFault representing the fault
        See Also:
        SOAPFactory.createFault(java.lang.String, javax.xml.namespace.QName)

    • Method Detail

      • getFault

        public SOAPFault getFault()
        Gets the embedded SOAPFault instance.
        Returns:
        javax.xml.soap.SOAPFault SOAP fault element
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.spi

This package defines SPIs for JAX-WS.

See: Description

  • Class Summary
    Class Description
    Invoker
    Invoker hides the detail of calling into application endpoint implementation.
    Provider
    Service provider for ServiceDelegate and Endpoint objects.
    ServiceDelegate
    Service delegates are used internally by Service objects to allow pluggability of JAX-WS implementations.
  • Annotation Types Summary
    Annotation Type Description
    WebServiceFeatureAnnotation
    Annotation used to identify other annotations as a WebServiceFeature.

Package javax.xml.ws.spi Description

This package defines SPIs for JAX-WS.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.spi Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.spi

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.ws.spi.Invoker
    • javax.xml.ws.spi.Provider
    • javax.xml.ws.spi.ServiceDelegate

Annotation Type Hierarchy

  • javax.xml.ws.spi.WebServiceFeatureAnnotation (implements java.lang.annotation.Annotation)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.spi

  • Packages that use javax.xml.ws.spi
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
  • Classes in javax.xml.ws.spi used by javax.xml.ws
    Class and Description
    WebServiceFeatureAnnotation
    Annotation used to identify other annotations as a WebServiceFeature.
  • Classes in javax.xml.ws.spi used by javax.xml.ws.soap
    Class and Description
    WebServiceFeatureAnnotation
    Annotation used to identify other annotations as a WebServiceFeature.
  • Classes in javax.xml.ws.spi used by javax.xml.ws.spi
    Class and Description
    Invoker
    Invoker hides the detail of calling into application endpoint implementation.
    Provider
    Service provider for ServiceDelegate and Endpoint objects.
    ServiceDelegate
    Service delegates are used internally by Service objects to allow pluggability of JAX-WS implementations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.Invoker

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.Invoker

  • Packages that use Invoker
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Invoker in javax.xml.ws.spi

      Methods in javax.xml.ws.spi with parameters of type Invoker
      Modifier and Type Method and Description
      Endpoint Provider.createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation class, invoker and web service features.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.Provider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.Provider

  • Packages that use Provider
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of Provider in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return Provider
      Modifier and Type Method and Description
      static Provider Provider.provider()
      Creates a new provider object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.ServiceDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.ServiceDelegate

  • Packages that use ServiceDelegate
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.

    • Uses of ServiceDelegate in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return ServiceDelegate
      Modifier and Type Method and Description
      abstract ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass)
      Creates a service delegate object.
      ServiceDelegate Provider.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features)
      Creates a service delegate object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.WebServiceFeatureAnnotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.WebServiceFeatureAnnotation

  • Packages that use WebServiceFeatureAnnotation
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.soap
    This package defines APIs specific to the SOAP binding.

    • Uses of WebServiceFeatureAnnotation in javax.xml.ws

      Classes in javax.xml.ws with annotations of type WebServiceFeatureAnnotation
      Modifier and Type Class and Description
      interface  RespectBinding
      This feature clarifies the use of the wsdl:binding in a JAX-WS runtime.

    • Uses of WebServiceFeatureAnnotation in javax.xml.ws.soap

      Classes in javax.xml.ws.soap with annotations of type WebServiceFeatureAnnotation
      Modifier and Type Class and Description
      interface  Addressing
      This annotation represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding.
      interface  MTOM
      This feature represents the use of MTOM with a web service.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


http

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.spi.http

Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.

See: Description

  • Class Summary
    Class Description
    HttpContext
    HttpContext represents a mapping between the root URI path of a web service to a HttpHandler which is invoked to handle requests destined for that path on the associated container.
    HttpExchange
    This class encapsulates a HTTP request received and a response to be generated in one exchange.
    HttpHandler
    A handler which is invoked to process HTTP requests.

Package javax.xml.ws.spi.http Description

Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g. servlet containers). This SPI is not for end developers but provides a way for the container developers to deploy JAX-WS services portably.

The portable deployment is done as below:

  1. Container creates Endpoint objects for an application. The necessary information to create Endpoint objects may be got from web service deployment descriptor files.
  2. Container needs to create HttpContext objects for the deployment. For example, a HttpContext could be created using servlet configuration(for e.g url-pattern) for the web service in servlet container case.
  3. Then publishes all the endpoints using Endpoint.publish(HttpContext). During publish(), JAX-WS runtime registers a HttpHandler callback to handle incoming requests or HttpExchange objects. The HttpExchange object encapsulates a HTTP request and a response.
  Container                               JAX-WS runtime
  ---------                               --------------
  1. Creates Invoker1, ... InvokerN
  2. Provider.createEndpoint(...)     --> 3. creates Endpoint1
     configures Endpoint1
     ...
  4. Provider.createEndpoint(...)     --> 5. creates EndpointN
     configures EndpointN
  6. Creates ApplicationContext
  7. creates HttpContext1, ... HttpContextN
  8. Endpoint1.publish(HttpContext1)  --> 9. creates HttpHandler1
                                          HttpContext1.setHandler(HttpHandler1)
     ...
 10. EndpointN.publish(HttpContextN)  --> 11. creates HttpHandlerN
                                         HttpContextN.setHandler(HttpHandlerN)
The request processing is done as below(for every request):
  Container                               JAX-WS runtime
  ---------                               --------------
  1. Creates a HttpExchange
  2. Gets handler from HttpContext
  3. HttpHandler.handle(HttpExchange) --> 4. reads request from HttpExchange
                                      <-- 5.="5." Calls="Calls" Invoker="Invoker" 6.="6." Invokes="Invokes" the="the" actual="actual" instance="instance" 7.="7." Writes="Writes" the="the" response="response" to="to" HttpExchange="HttpExchange"

  The portable undeployment is done as below:

  Container
  ---------
  1. @preDestroy on instances
  2. Endpoint1.stop()
  ...
  3. EndpointN.stop()
Since:
JAX-WS 2.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.spi.http Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.spi.http

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.ws.spi.http.HttpContext
    • javax.xml.ws.spi.http.HttpExchange
    • javax.xml.ws.spi.http.HttpHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.spi.http

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.spi.http

  • Packages that use javax.xml.ws.spi.http
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi.http
    Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.
  • Classes in javax.xml.ws.spi.http used by javax.xml.ws
    Class and Description
    HttpContext
    HttpContext represents a mapping between the root URI path of a web service to a HttpHandler which is invoked to handle requests destined for that path on the associated container.
  • Classes in javax.xml.ws.spi.http used by javax.xml.ws.spi.http
    Class and Description
    HttpContext
    HttpContext represents a mapping between the root URI path of a web service to a HttpHandler which is invoked to handle requests destined for that path on the associated container.
    HttpExchange
    This class encapsulates a HTTP request received and a response to be generated in one exchange.
    HttpHandler
    A handler which is invoked to process HTTP requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.http.HttpContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.http.HttpContext

  • Packages that use HttpContext
    Package Description
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi.http
    Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.

    • Uses of HttpContext in javax.xml.ws

      Methods in javax.xml.ws with parameters of type HttpContext
      Modifier and Type Method and Description
      void Endpoint.publish(HttpContext serverContext)
      Publishes this endpoint at the provided server context.

    • Uses of HttpContext in javax.xml.ws.spi.http

      Methods in javax.xml.ws.spi.http that return HttpContext
      Modifier and Type Method and Description
      abstract HttpContext HttpExchange.getHttpContext()
      Returns a HttpContext for this exchange.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.http.HttpExchange

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.http.HttpExchange

  • Packages that use HttpExchange
    Package Description
    javax.xml.ws.spi.http
    Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.

    • Uses of HttpExchange in javax.xml.ws.spi.http

      Methods in javax.xml.ws.spi.http with parameters of type HttpExchange
      Modifier and Type Method and Description
      abstract void HttpHandler.handle(HttpExchange exchange)
      Handles a given request and generates an appropriate response.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.spi.http.HttpHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.spi.http.HttpHandler

  • Packages that use HttpHandler
    Package Description
    javax.xml.ws.spi.http
    Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.

    • Uses of HttpHandler in javax.xml.ws.spi.http

      Fields in javax.xml.ws.spi.http declared as HttpHandler
      Modifier and Type | Field and Description
      protected HttpHandler | HttpContext.handler
      Methods in javax.xml.ws.spi.http with parameters of type HttpHandler
      Modifier and Type Method and Description
      void HttpContext.setHandler(HttpHandler handler)
      JAX-WS runtime sets its handler during Endpoint.publish(HttpContext) to handle HTTP requests for this context.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HttpContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi.http

Class HttpContext

  • java.lang.Object
    • javax.xml.ws.spi.http.HttpContext

  • public abstract class HttpContext
extends Object
    HttpContext represents a mapping between the root URI path of a web service to a HttpHandler which is invoked to handle requests destined for that path on the associated container.

    Container provides the implementation for this and it matches web service requests to corresponding HttpContext objects.

    Since:
    JAX-WS 2.2

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected HttpHandler | handler

    • Constructor Summary

      Constructors
      Constructor and Description
      HttpContext()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Object getAttribute(String name)
      Returns an attribute value for container's configuration and other data that can be used by jax-ws runtime.
      abstract Set<String> getAttributeNames()
      Returns all attribute names for container's configuration and other data that can be used by jax-ws runtime.
      abstract String getPath()
      Returns the path for this context.
      void setHandler(HttpHandler handler)
      JAX-WS runtime sets its handler during Endpoint.publish(HttpContext) to handle HTTP requests for this context.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • handler

        protected HttpHandler handler

    • Constructor Detail

      • HttpContext

        public HttpContext()

    • Method Detail

      • setHandler

        public void setHandler(HttpHandler handler)
        JAX-WS runtime sets its handler during Endpoint.publish(HttpContext) to handle HTTP requests for this context. Container or its extensions use this handler to process the requests.
        Parameters:
        handler - the handler to set for this context

      • getPath

        public abstract String getPath()
        Returns the path for this context. This path uniquely identifies an endpoint inside an application and the path is relative to application's context path. Container should give this path based on how it matches request URIs to this HttpContext object.

        For servlet container, this is typically a url-pattern for an endpoint.

        Endpoint's address for this context can be computed as follows:

          HttpExchange exch = ...;
  String endpointAddress =
      exch.getScheme() + "://"
      + exch.getLocalAddress().getHostName()
      + ":" + exch.getLocalAddress().getPort()
      + exch.getContextPath() + getPath();
        Returns:
        this context's path

      • getAttribute

        public abstract Object getAttribute(String name)
        Returns an attribute value for container's configuration and other data that can be used by jax-ws runtime.
        Parameters:
        name - attribute name
        Returns:
        attribute value

      • getAttributeNames

        public abstract Set<String> getAttributeNames()
        Returns all attribute names for container's configuration and other data that can be used by jax-ws runtime.
        Returns:
        set of all attribute names
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HttpExchange

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi.http

Class HttpExchange

  • java.lang.Object
    • javax.xml.ws.spi.http.HttpExchange

  • public abstract class HttpExchange
extends Object
    This class encapsulates a HTTP request received and a response to be generated in one exchange. It provides methods for examining the request from the client, and for building and sending the response.

    A HttpExchange must be closed to free or reuse underlying resources. The effect of failing to close an exchange is undefined.

    Since:
    JAX-WS 2.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String REQUEST_CIPHER_SUITE
      Standard property: cipher suite value when the request is received over HTTPS
      static String REQUEST_KEY_SIZE
      Standard property: bit size of the algorithm when the request is received over HTTPS
      static String REQUEST_X509CERTIFICATE
      Standard property: A SSL certificate, if any, associated with the request

    • Constructor Summary

      Constructors
      Constructor and Description
      HttpExchange()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void addResponseHeader(String name, String value)
      Adds a response header with the given name and value.
      abstract void close()
      This must be called to end an exchange.
      abstract Object getAttribute(String name)
      Returns an attribute that is associated with this HttpExchange.
      abstract Set<String> getAttributeNames()
      Gives all the attribute names that are associated with this HttpExchange.
      abstract String getContextPath()
      Returns the context path of all the endpoints in an application.
      abstract HttpContext getHttpContext()
      Returns a HttpContext for this exchange.
      abstract InetSocketAddress getLocalAddress()
      Returns the unresolved local address on which the request was received.
      abstract String getPathInfo()
      Returns the extra path information that follows the web service path but precedes the query string in the request URI and will start with a "/" character.
      abstract String getProtocol()
      Returns the protocol string from the request in the form protocol/majorVersion.minorVersion.
      abstract String getQueryString()
      Returns the query string that is contained in the request URI after the path.
      abstract InetSocketAddress getRemoteAddress()
      Returns the unresolved address of the remote entity invoking this request.
      abstract InputStream getRequestBody()
      Returns a stream from which the request body can be read.
      abstract String getRequestHeader(String name)
      Returns the value of the specified request header.
      abstract Map<String,List<String>> getRequestHeaders()
      Returns an immutable Map containing the HTTP headers that were included with this request.
      abstract String getRequestMethod()
      Get the HTTP request method
      abstract String getRequestURI()
      Returns the part of the request's URI from the protocol name up to the query string in the first line of the HTTP request.
      abstract OutputStream getResponseBody()
      Returns a stream to which the response body must be written.
      abstract Map<String,List<String>> getResponseHeaders()
      Returns a mutable Map into which the HTTP response headers can be stored and which will be transmitted as part of this response.
      abstract String getScheme()
      Returns the name of the scheme used to make this request, for example: http, or https.
      abstract Principal getUserPrincipal()
      Returns the Principal that represents the authenticated user for this HttpExchange.
      abstract boolean isUserInRole(String role)
      Indicates whether an authenticated user is included in the specified logical "role".
      abstract void setStatus(int status)
      Sets the HTTP status code for the response.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • REQUEST_CIPHER_SUITE

        public static final String REQUEST_CIPHER_SUITE
        Standard property: cipher suite value when the request is received over HTTPS

        Type: String

        See Also:
        Constant Field Values

      • REQUEST_KEY_SIZE

        public static final String REQUEST_KEY_SIZE
        Standard property: bit size of the algorithm when the request is received over HTTPS

        Type: Integer

        See Also:
        Constant Field Values

      • REQUEST_X509CERTIFICATE

        public static final String REQUEST_X509CERTIFICATE
        Standard property: A SSL certificate, if any, associated with the request

        Type: java.security.cert.X509Certificate[] The order of this array is defined as being in ascending order of trust. The first certificate in the chain is the one set by the client, the next is the one used to authenticate the first, and so on.

        See Also:
        Constant Field Values

    • Constructor Detail

      • HttpExchange

        public HttpExchange()

    • Method Detail

      • getRequestHeaders

        public abstract Map<String,List<String>> getRequestHeaders()
        Returns an immutable Map containing the HTTP headers that were included with this request. The keys in this Map will be the header names, while the values will be a List of Strings containing each value that was included (either for a header that was listed several times, or one that accepts a comma-delimited list of values on a single line). In either of these cases, the values for the header name will be presented in the order that they were included in the request.

        The keys in Map are case-insensitive.

        Returns:
        an immutable Map which can be used to access request headers

      • getRequestHeader

        public abstract String getRequestHeader(String name)
        Returns the value of the specified request header. If the request did not include a header of the specified name, this method returns null. If there are multiple headers with the same name, this method returns the first header in the request. The header name is case-insensitive. This is a convienence method to get a header (instead of using the getRequestHeaders()).
        Parameters:
        name - the name of the request header
        Returns:
        returns the value of the requested header, or null if the request does not have a header of that name

      • getResponseHeaders

        public abstract Map<String,List<String>> getResponseHeaders()
        Returns a mutable Map into which the HTTP response headers can be stored and which will be transmitted as part of this response. The keys in the Map will be the header names, while the values must be a List of Strings containing each value that should be included multiple times (in the order that they should be included).

        The keys in Map are case-insensitive.

        Returns:
        a mutable Map which can be used to set response headers.

      • addResponseHeader

        public abstract void addResponseHeader(String name,
                                       String value)
        Adds a response header with the given name and value. This method allows a response header to have multiple values. This is a convenience method to add a response header(instead of using the getResponseHeaders()).
        Parameters:
        name - the name of the header
        value - the additional header value. If it contains octet string, it should be encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
        See Also:
        getResponseHeaders()

      • getRequestURI

        public abstract String getRequestURI()
        Returns the part of the request's URI from the protocol name up to the query string in the first line of the HTTP request. Container doesn't decode this string.
        Returns:
        the request URI

      • getContextPath

        public abstract String getContextPath()
        Returns the context path of all the endpoints in an application. This path is the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. If this method returns "", the request is for default context. The container does not decode this string.

        Context path is used in computing the endpoint address. See HttpContext.getPath()

        Returns:
        context path of all the endpoints in an application
        See Also:
        HttpContext.getPath()

      • getRequestMethod

        public abstract String getRequestMethod()
        Get the HTTP request method
        Returns:
        the request method

      • getHttpContext

        public abstract HttpContext getHttpContext()
        Returns a HttpContext for this exchange. Container matches the request with the associated Endpoint's HttpContext
        Returns:
        the HttpContext for this exchange

      • close

        public abstract void close()
                    throws IOException
        This must be called to end an exchange. Container takes care of closing request and response streams. This must be called so that the container can free or reuse underlying resources.
        Throws:
        IOException - if any i/o error

      • getRequestBody

        public abstract InputStream getRequestBody()
                                    throws IOException
        Returns a stream from which the request body can be read. Multiple calls to this method will return the same stream.
        Returns:
        the stream from which the request body can be read.
        Throws:
        IOException - if any i/o error during request processing

      • getResponseBody

        public abstract OutputStream getResponseBody()
                                      throws IOException
        Returns a stream to which the response body must be written. setStatus(int)) must be called prior to calling this method. Multiple calls to this method (for the same exchange) will return the same stream.
        Returns:
        the stream to which the response body is written
        Throws:
        IOException - if any i/o error during response processing

      • setStatus

        public abstract void setStatus(int status)
        Sets the HTTP status code for the response.

        This method must be called prior to calling getResponseBody().

        Parameters:
        status - the response code to send
        See Also:
        getResponseBody()

      • getRemoteAddress

        public abstract InetSocketAddress getRemoteAddress()
        Returns the unresolved address of the remote entity invoking this request.
        Returns:
        the InetSocketAddress of the caller

      • getLocalAddress

        public abstract InetSocketAddress getLocalAddress()
        Returns the unresolved local address on which the request was received.
        Returns:
        the InetSocketAddress of the local interface

      • getProtocol

        public abstract String getProtocol()
        Returns the protocol string from the request in the form protocol/majorVersion.minorVersion. For example, "HTTP/1.1"
        Returns:
        the protocol string from the request

      • getScheme

        public abstract String getScheme()
        Returns the name of the scheme used to make this request, for example: http, or https.
        Returns:
        name of the scheme used to make this request

      • getPathInfo

        public abstract String getPathInfo()
        Returns the extra path information that follows the web service path but precedes the query string in the request URI and will start with a "/" character.

        This can be used for MessageContext.PATH_INFO

        Returns:
        decoded extra path information of web service. It is the path that comes after the web service path but before the query string in the request URI null if there is no extra path in the request URI

      • getQueryString

        public abstract String getQueryString()
        Returns the query string that is contained in the request URI after the path.

        This can be used for MessageContext.QUERY_STRING

        Returns:
        undecoded query string of request URI, or null if the request URI doesn't have one

      • getAttribute

        public abstract Object getAttribute(String name)
        Returns an attribute that is associated with this HttpExchange. JAX-WS handlers and endpoints may then access the attribute via MessageContext.

        Servlet containers must expose MessageContext.SERVLET_CONTEXT, MessageContext.SERVLET_REQUEST, and MessageContext.SERVLET_RESPONSE as attributes.

        If the request has been received by the container using HTTPS, the following information must be exposed as attributes. These attributes are REQUEST_CIPHER_SUITE, and REQUEST_KEY_SIZE. If there is a SSL certificate associated with the request, it must be exposed using REQUEST_X509CERTIFICATE

        Parameters:
        name - attribute name
        Returns:
        the attribute value, or null if the attribute doesn't exist

      • getAttributeNames

        public abstract Set<String> getAttributeNames()
        Gives all the attribute names that are associated with this HttpExchange.
        Returns:
        set of all attribute names
        See Also:
        getAttribute(String)

      • getUserPrincipal

        public abstract Principal getUserPrincipal()
        Returns the Principal that represents the authenticated user for this HttpExchange.
        Returns:
        Principal for an authenticated user, or null if not authenticated

      • isUserInRole

        public abstract boolean isUserInRole(String role)
        Indicates whether an authenticated user is included in the specified logical "role".
        Parameters:
        role - specifies the name of the role
        Returns:
        true if the user making this request belongs to a given role
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HttpHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi.http

Class HttpHandler

  • java.lang.Object
    • javax.xml.ws.spi.http.HttpHandler

  • public abstract class HttpHandler
extends Object
    A handler which is invoked to process HTTP requests.

    JAX-WS runtime provides the implementation for this and sets it using HttpContext.setHandler(HttpHandler) during Endpoint.publish(HttpContext)

    Since:
    JAX-WS 2.2

    • Constructor Summary

      Constructors
      Constructor and Description
      HttpHandler()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void handle(HttpExchange exchange)
      Handles a given request and generates an appropriate response.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • HttpHandler

        public HttpHandler()

    • Method Detail

      • handle

        public abstract void handle(HttpExchange exchange)
                     throws IOException
        Handles a given request and generates an appropriate response. See HttpExchange for a description of the steps involved in handling an exchange. Container invokes this method when it receives an incoming request.
        Parameters:
        exchange - the exchange containing the request from the client and used to send the response
        Throws:
        IOException - when an I/O error happens during request handling
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Invoker

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi

Class Invoker

  • java.lang.Object
    • javax.xml.ws.spi.Invoker

  • public abstract class Invoker
extends Object
    Invoker hides the detail of calling into application endpoint implementation. Container hands over an implementation of Invoker to JAX-WS runtime, and jax-ws runtime calls invoke(java.lang.reflect.Method, java.lang.Object...) for a web service invocation. Finally, Invoker does the actual invocation of web service on endpoint instance. Container also injects the provided WebServiceContext and takes care of invoking javax.annotation.PostConstruct methods, if present, on the endpoint implementation.
    Since:
    JAX-WS 2.2
    See Also:
    Provider.createEndpoint(String, Class, Invoker, WebServiceFeature...)

    • Constructor Summary

      Constructors
      Constructor and Description
      Invoker()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void inject(WebServiceContext webServiceContext)
      JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance.
      abstract Object invoke(Method m, Object... args)
      JAX-WS runtime calls this method to do the actual web service invocation on endpoint instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Invoker

        public Invoker()

    • Method Detail

      • inject

        public abstract void inject(WebServiceContext webServiceContext)
                     throws IllegalAccessException,
                            IllegalArgumentException,
                            InvocationTargetException
        JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance. The WebServiceContext object uses thread-local information to return the correct information during the actual endpoint invocation regardless of how many threads are concurrently being used to serve requests.
        Parameters:
        webServiceContext - a holder for MessageContext
        Throws:
        IllegalAccessException - if the injection done by reflection API throws this exception
        IllegalArgumentException - if the injection done by reflection API throws this exception
        InvocationTargetException - if the injection done by reflection API throws this exception

      • invoke

        public abstract Object invoke(Method m,
                              Object... args)
                       throws IllegalAccessException,
                              IllegalArgumentException,
                              InvocationTargetException
        JAX-WS runtime calls this method to do the actual web service invocation on endpoint instance. The injected WebServiceContext.getMessageContext() gives the correct information for this invocation.
        Parameters:
        m - Method to be invoked on the service
        args - Method arguments
        Returns:
        return value of the method
        Throws:
        IllegalAccessException - if the invocation done by reflection API throws this exception
        IllegalArgumentException - if the invocation done by reflection API throws this exception
        InvocationTargetException - if the invocation done by reflection API throws this exception
        See Also:
        Method.invoke(java.lang.Object, java.lang.Object...)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Provider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi

Class Provider

  • java.lang.Object
    • javax.xml.ws.spi.Provider

  • public abstract class Provider
extends Object
    Service provider for ServiceDelegate and Endpoint objects.

    Since:
    JAX-WS 2.0

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String JAXWSPROVIDER_PROPERTY
      A constant representing the property used to lookup the name of a Provider implementation class.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected Provider()
      Creates a new instance of Provider

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Endpoint createAndPublishEndpoint(String address, Object implementor)
      Creates and publishes an endpoint object with the specified address and implementation object.
      Endpoint createAndPublishEndpoint(String address, Object implementor, WebServiceFeature... features)
      Creates and publishes an endpoint object with the specified address, implementation object and web service features.
      Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation class, invoker and web service features.
      abstract Endpoint createEndpoint(String bindingId, Object implementor)
      Creates an endpoint object with the provided binding and implementation object.
      Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features)
      Creates an endpoint object with the provided binding, implementation object and web service features.
      abstract ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass)
      Creates a service delegate object.
      ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features)
      Creates a service delegate object.
      abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.
      abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      static Provider provider()
      Creates a new provider object.
      abstract EndpointReference readEndpointReference(Source eprInfoset)
      read an EndpointReference from the infoset contained in eprInfoset.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • JAXWSPROVIDER_PROPERTY

        public static final String JAXWSPROVIDER_PROPERTY
        A constant representing the property used to lookup the name of a Provider implementation class.
        See Also:
        Constant Field Values

    • Constructor Detail

      • Provider

        protected Provider()
        Creates a new instance of Provider

    • Method Detail

      • provider

        public static Provider provider()
        Creates a new provider object.

        The algorithm used to locate the provider subclass to use consists of the following steps:

        • If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class.
        • If the $java.home/lib/jaxws.properties file exists and it is readable by the java.util.Properties.load(InputStream) method and it contains an entry whose key is javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
        • If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used as the name of the implementation class.
        • Finally, a default implementation class name is used.

      • createServiceDelegate

        public abstract ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation,
                                                      QName serviceName,
                                                      Class<? extends Service> serviceClass)
        Creates a service delegate object.

        Parameters:
        wsdlDocumentLocation - A URL pointing to the WSDL document for the service, or null if there isn't one.
        serviceName - The qualified name of the service.
        serviceClass - The service class, which MUST be either javax.xml.ws.Service or a subclass thereof.
        Returns:
        The newly created service delegate.

      • createServiceDelegate

        public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation,
                                             QName serviceName,
                                             Class<? extends Service> serviceClass,
                                             WebServiceFeature... features)
        Creates a service delegate object.

        Parameters:
        wsdlDocumentLocation - A URL pointing to the WSDL document for the service, or null if there isn't one.
        serviceName - The qualified name of the service.
        serviceClass - The service class, which MUST be either javax.xml.ws.Service or a subclass thereof.
        features - Web Service features that must be configured on the service. If the provider doesn't understand a feature, it must throw a WebServiceException.
        Returns:
        The newly created service delegate.
        Since:
        JAX-WS 2.2

      • createEndpoint

        public abstract Endpoint createEndpoint(String bindingId,
                                        Object implementor)
        Creates an endpoint object with the provided binding and implementation object.
        Parameters:
        bindingId - A URI specifying the desired binding (e.g. SOAP/HTTP)
        implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.
        Returns:
        The newly created endpoint.

      • createAndPublishEndpoint

        public abstract Endpoint createAndPublishEndpoint(String address,
                                                  Object implementor)
        Creates and publishes an endpoint object with the specified address and implementation object.
        Parameters:
        address - A URI specifying the address and transport/protocol to use. A http: URI MUST result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
        implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.
        Returns:
        The newly created endpoint.

      • readEndpointReference

        public abstract EndpointReference readEndpointReference(Source eprInfoset)
        read an EndpointReference from the infoset contained in eprInfoset.
        Parameters:
        eprInfoset - infoset for EndpointReference
        Returns:
        the EndpointReference unmarshalled from eprInfoset. This method never returns null.
        Throws:
        WebServiceException - If there is an error creating the EndpointReference from the specified eprInfoset.
        NullPointerException - If the null eprInfoset value is given.
        Since:
        JAX-WS 2.1

      • getPort

        public abstract <T> T getPort(EndpointReference endpointReference,
                              Class<T> serviceEndpointInterface,
                              WebServiceFeature... features)
        The getPort method returns a proxy. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. The parameter endpointReference specifies the endpoint that will be invoked by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly from the WSDL metadata of the serviceEndpointInterface and the EndpointReference. For this method to successfully return a proxy, WSDL metadata MUST be available and the endpointReference MUST contain an implementation understood serviceName metadata.
        Parameters:
        endpointReference - the EndpointReference that will be invoked by the returned proxy.
        serviceEndpointInterface - Service endpoint interface
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy
        • If there is any missing WSDL metadata as required by this method}
        • If this endpointReference is illegal
        • If an illegal serviceEndpointInterface is specified
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        WebServiceFeature

      • createW3CEndpointReference

        public abstract W3CEndpointReference createW3CEndpointReference(String address,
                                                                QName serviceName,
                                                                QName portName,
                                                                List<Element> metadata,
                                                                String wsdlDocumentLocation,
                                                                List<Element> referenceParameters)
        Factory method to create a W3CEndpointReference.

        This method can be used to create a W3CEndpointReference for any endpoint by specifying the address property along with any other desired properties. This method can also be used to create a W3CEndpointReference for an endpoint that is published by the same Java EE application. To do so the address property can be provided or this method can automatically determine the address of an endpoint that is published by the same Java EE application and is identified by the serviceName and portName propeties. If the address is null and the serviceName and portName do not identify an endpoint published by the same Java EE application, a javax.lang.IllegalStateException MUST be thrown.

        Parameters:
        address - Specifies the address of the target endpoint
        serviceName - Qualified name of the service in the WSDL.
        portName - Qualified name of the endpoint in the WSDL.
        metadata - A list of elements that should be added to the W3CEndpointReference instances wsa:metadata element.
        wsdlDocumentLocation - URL for the WSDL document location for the service.
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        Returns:
        the W3CEndpointReference created from serviceName, portName, metadata, wsdlDocumentLocation and referenceParameters. This method never returns null.
        Throws:
        IllegalStateException -
        • If the address, serviceName and portName are all null.
        • If the serviceName service is null and the portName is NOT null.
        • If the address property is null and the serviceName and portName do not specify a valid endpoint published by the same Java EE application.
        • If the serviceNameis NOT null and is not present in the specified WSDL.
        • If the portName port is not null and it is not present in serviceName service in the WSDL.
        • If the wsdlDocumentLocation is NOT null and does not represent a valid WSDL.
        WebServiceException - If an error occurs while creating the W3CEndpointReference.
        Since:
        JAX-WS 2.1

      • createW3CEndpointReference

        public W3CEndpointReference createW3CEndpointReference(String address,
                                                       QName interfaceName,
                                                       QName serviceName,
                                                       QName portName,
                                                       List<Element> metadata,
                                                       String wsdlDocumentLocation,
                                                       List<Element> referenceParameters,
                                                       List<Element> elements,
                                                       Map<QName,String> attributes)
        Factory method to create a W3CEndpointReference. Using this method, a W3CEndpointReference instance can be created with extension elements, and attributes. Provider implementations must override the default implementation.

        This method can be used to create a W3CEndpointReference for any endpoint by specifying the address property along with any other desired properties. This method can also be used to create a W3CEndpointReference for an endpoint that is published by the same Java EE application. To do so the address property can be provided or this method can automatically determine the address of an endpoint that is published by the same Java EE application and is identified by the serviceName and portName propeties. If the address is null and the serviceName and portName do not identify an endpoint published by the same Java EE application, a javax.lang.IllegalStateException MUST be thrown.

        Parameters:
        address - Specifies the address of the target endpoint
        interfaceName - the wsam:InterfaceName element in the wsa:Metadata element.
        serviceName - Qualified name of the service in the WSDL.
        portName - Qualified name of the endpoint in the WSDL.
        metadata - A list of elements that should be added to the W3CEndpointReference instances wsa:metadata element.
        wsdlDocumentLocation - URL for the WSDL document location for the service.
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        elements - extension elements to be associated with the returned EndpointReference instance.
        attributes - extension attributes to be associated with the returned EndpointReference instance.
        Returns:
        the W3CEndpointReference created from serviceName, portName, metadata, wsdlDocumentLocation and referenceParameters. This method never returns null.
        Throws:
        IllegalStateException -
        • If the address, serviceName and portName are all null.
        • If the serviceName service is null and the portName is NOT null.
        • If the address property is null and the serviceName and portName do not specify a valid endpoint published by the same Java EE application.
        • If the serviceNameis NOT null and is not present in the specified WSDL.
        • If the portName port is not null and it is not present in serviceName service in the WSDL.
        • If the wsdlDocumentLocation is NOT null and does not represent a valid WSDL.
        • If the wsdlDocumentLocation is NOT null but wsdli:wsdlLocation's namespace name cannot be got from the available metadata.
        WebServiceException - If an error occurs while creating the W3CEndpointReference.
        Since:
        JAX-WS 2.2

      • createAndPublishEndpoint

        public Endpoint createAndPublishEndpoint(String address,
                                         Object implementor,
                                         WebServiceFeature... features)
        Creates and publishes an endpoint object with the specified address, implementation object and web service features. Provider implementations must override the default implementation.
        Parameters:
        address - A URI specifying the address and transport/protocol to use. A http: URI MUST result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
        implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.
        features - A list of WebServiceFeatures to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Since:
        JAX-WS 2.2

      • createEndpoint

        public Endpoint createEndpoint(String bindingId,
                               Object implementor,
                               WebServiceFeature... features)
        Creates an endpoint object with the provided binding, implementation object and web service features. Provider implementations must override the default implementation.
        Parameters:
        bindingId - A URI specifying the desired binding (e.g. SOAP/HTTP)
        implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.
        features - A list of WebServiceFeatures to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Since:
        JAX-WS 2.2

      • createEndpoint

        public Endpoint createEndpoint(String bindingId,
                               Class<?> implementorClass,
                               Invoker invoker,
                               WebServiceFeature... features)
        Creates an endpoint object with the provided binding, implementation class, invoker and web service features. Containers typically use this to create Endpoint objects. Provider implementations must override the default implementation.
        Parameters:
        bindingId - A URI specifying the desired binding (e.g. SOAP/HTTP). Can be null.
        implementorClass - A service implementation class that MUST be annotated with all the necessary Web service annotations.
        invoker - that does the actual invocation on the service instance.
        features - A list of WebServiceFeatures to configure on the endpoint. Supported features not in the features parameter will have their default values.
        Returns:
        The newly created endpoint.
        Since:
        JAX-WS 2.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceDelegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.spi

Class ServiceDelegate

  • java.lang.Object
    • javax.xml.ws.spi.ServiceDelegate

  • public abstract class ServiceDelegate
extends Object
    Service delegates are used internally by Service objects to allow pluggability of JAX-WS implementations.

    Every Service object has its own delegate, created using the Provider.createServiceDelegate(java.net.URL, javax.xml.namespace.QName, java.lang.Class<? extends javax.xml.ws.Service>) method. A Service object delegates all of its instance methods to its delegate.

    Since:
    JAX-WS 2.0
    See Also:
    Service, Provider

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | ServiceDelegate()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void addPort(QName portName, String bindingId, String endpointAddress)
      Creates a new port for the service.
      abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with objects of the user's choosing.
      abstract Dispatch<Object> createDispatch(QName portName, JAXBContext context, Service.Mode mode)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Dispatch<Object> createDispatch(QName portName, JAXBContext context, Service.Mode mode, WebServiceFeature... features)
      Creates a Dispatch instance for use with JAXB generated objects.
      abstract Executor getExecutor()
      Returns the executor for this Serviceinstance.
      abstract HandlerResolver getHandlerResolver()
      Returns the configured handler resolver.
      abstract <T> T getPort(Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      abstract <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract <T> T getPort(QName portName, Class<T> serviceEndpointInterface)
      The getPort method returns a proxy.
      abstract <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
      The getPort method returns a proxy.
      abstract Iterator<QName> getPorts()
      Returns an Iterator for the list of QNames of service endpoints grouped by this service
      abstract QName getServiceName()
      Gets the name of this service.
      abstract URL getWSDLDocumentLocation()
      Gets the location of the WSDL document for this Service.
      abstract void setExecutor(Executor executor)
      Sets the executor for this Service instance.
      abstract void setHandlerResolver(HandlerResolver handlerResolver)
      Sets the HandlerResolver for this Service instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceDelegate

        protected ServiceDelegate()

    • Method Detail

      • getPort

        public abstract <T> T getPort(QName portName,
                              Class<T> serviceEndpointInterface)
        The getPort method returns a proxy. A service client uses this proxy to invoke operations on the target service endpoint. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy instance.
        Parameters:
        portName - Qualified name of the service endpoint in the WSDL service description
        serviceEndpointInterface - Service endpoint interface supported by the dynamic proxy
        Returns:
        Object Proxy instance that supports the specified service endpoint interface
        Throws:
        WebServiceException - This exception is thrown in the following cases:
        • If there is an error in creation of the proxy
        • If there is any missing WSDL metadata as required by this method
        • If an illegal serviceEndpointInterface or portName is specified
        See Also:
        Proxy, InvocationHandler

      • getPort

        public abstract <T> T getPort(QName portName,
                              Class<T> serviceEndpointInterface,
                              WebServiceFeature... features)
        The getPort method returns a proxy. A service client uses this proxy to invoke operations on the target service endpoint. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy instance.
        Parameters:
        portName - Qualified name of the service endpoint in the WSDL service description
        serviceEndpointInterface - Service endpoint interface supported by the dynamic proxy or instance
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface
        Throws:
        WebServiceException - This exception is thrown in the following cases:
        • If there is an error in creation of the proxy
        • If there is any missing WSDL metadata as required by this method
        • If an illegal serviceEndpointInterface or portName is specified
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Proxy, InvocationHandler, WebServiceFeature

      • getPort

        public abstract <T> T getPort(EndpointReference endpointReference,
                              Class<T> serviceEndpointInterface,
                              WebServiceFeature... features)
        The getPort method returns a proxy. The parameter endpointReference specifies the endpoint that will be invoked by the returned proxy. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference metadata also has a WSDL, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. The returned proxy should not be reconfigured by the client. If this Service instance has a known proxy port that matches the information contained in the WSDL, then that proxy is returned, otherwise a WebServiceException is thrown.

        Calling this method has the same behavior as the following

         port = service.getPort(portName, serviceEndpointInterface);
        where the portName is retrieved from the metadata of the endpointReference or from the serviceEndpointInterface and the WSDL associated with this Service instance.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned proxy.
        serviceEndpointInterface - Service endpoint interface.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object Proxy instance that supports the specified service endpoint interface.
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy.
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName of this Service instance.
        • If a portName cannot be extracted from the WSDL or endpointReference metadata.
        • If an invalid endpointReference is specified.
        • If an invalid serviceEndpointInterface is specified.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1

      • getPort

        public abstract <T> T getPort(Class<T> serviceEndpointInterface)
        The getPort method returns a proxy. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly. The returned proxy should not be reconfigured by the client.
        Parameters:
        serviceEndpointInterface - Service endpoint interface
        Returns:
        Object instance that supports the specified service endpoint interface
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy
        • If there is any missing WSDL metadata as required by this method
        • If an illegal serviceEndpointInterface is specified

      • getPort

        public abstract <T> T getPort(Class<T> serviceEndpointInterface,
                              WebServiceFeature... features)
        The getPort method returns a proxy. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly. The returned proxy should not be reconfigured by the client.
        Parameters:
        serviceEndpointInterface - Service endpoint interface
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Object instance that supports the specified service endpoint interface
        Throws:
        WebServiceException -
        • If there is an error during creation of the proxy
        • If there is any missing WSDL metadata as required by this method
        • If an illegal serviceEndpointInterface is specified
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        WebServiceFeature

      • addPort

        public abstract void addPort(QName portName,
                             String bindingId,
                             String endpointAddress)
        Creates a new port for the service. Ports created in this way contain no WSDL port type information and can only be used for creating Dispatchinstances.
        Parameters:
        portName - Qualified name for the target service endpoint
        bindingId - A URI identifier of a binding.
        endpointAddress - Address of the target service endpoint as a URI
        Throws:
        WebServiceException - If any error in the creation of the port
        See Also:
        SOAPBinding.SOAP11HTTP_BINDING, SOAPBinding.SOAP12HTTP_BINDING, HTTPBinding.HTTP_BINDING

      • createDispatch

        public abstract <T> Dispatch<T> createDispatch(QName portName,
                                               Class<T> type,
                                               Service.Mode mode)
        Creates a Dispatch instance for use with objects of the user's choosing.
        Parameters:
        portName - Qualified name for the target service endpoint
        type - The class of object used for messages or message payloads. Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object
        See Also:
        Source, SOAPMessage

      • createDispatch

        public abstract <T> Dispatch<T> createDispatch(QName portName,
                                               Class<T> type,
                                               Service.Mode mode,
                                               WebServiceFeature... features)
        Creates a Dispatch instance for use with objects of the user's choosing.
        Parameters:
        portName - Qualified name for the target service endpoint
        type - The class of object used for messages or message payloads. Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object or if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Source, SOAPMessage, WebServiceFeature

      • createDispatch

        public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
                                               Class<T> type,
                                               Service.Mode mode,
                                               WebServiceFeature... features)
        Creates a Dispatch instance for use with objects of the user's choosing. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the dispatch accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference also has a WSDL in its metadata, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. An implementation MUST be able to retrieve the portName from the endpointReference metadata.

        This method behaves the same as calling

         dispatch = service.createDispatch(portName, type, mode, features);
        where the portName is retrieved from the WSDL or EndpointReference metadata.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned Dispatch object.
        type - The class of object used to messages or message payloads. Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE when type is SOAPMessage.
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException -
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName or portName of a WSDL associated with this Service instance.
        • If the portName cannot be determined from the EndpointReference metadata.
        • If any error in the creation of the Dispatch object.
        • If a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        Source, SOAPMessage, WebServiceFeature

      • createDispatch

        public abstract Dispatch<Object> createDispatch(QName portName,
                                                JAXBContext context,
                                                Service.Mode mode)
        Creates a Dispatch instance for use with JAXB generated objects.
        Parameters:
        portName - Qualified name for the target service endpoint
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object
        See Also:
        JAXBContext

      • createDispatch

        public abstract Dispatch<Object> createDispatch(QName portName,
                                                JAXBContext context,
                                                Service.Mode mode,
                                                WebServiceFeature... features)
        Creates a Dispatch instance for use with JAXB generated objects.
        Parameters:
        portName - Qualified name for the target service endpoint
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body.
        features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException - If any error in the creation of the Dispatch object or if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        JAXBContext, WebServiceFeature

      • createDispatch

        public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
                                                JAXBContext context,
                                                Service.Mode mode,
                                                WebServiceFeature... features)
        Creates a Dispatch instance for use with JAXB generated objects. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The endpointReference's address MUST be used for invocations on the endpoint. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the dispatch accordingly from the WSDL associated with this Service instance or from the metadata from the endpointReference. If this Service instance has a WSDL and the endpointReference also has a WSDL in its metadata, then the WSDL from this instance MUST be used. If this Service instance does not have a WSDL and the endpointReference does have a WSDL, then the WSDL from the endpointReference MAY be used. An implementation MUST be able to retrieve the portName from the endpointReference metadata.

        This method behavies the same as calling

         dispatch = service.createDispatch(portName, context, mode, features);
        where the portName is retrieved from the WSDL or endpointReference metadata.
        Parameters:
        endpointReference - The EndpointReference for the target service endpoint that will be invoked by the returned Dispatch object.
        context - The JAXB context used to marshall and unmarshall messages or message payloads.
        mode - Controls whether the created dispatch instance is message or payload oriented, i.e. whether the user will work with complete protocol messages or message payloads. E.g. when using the SOAP protocol, this parameter controls whether the user will work with SOAP messages or the contents of a SOAP body.
        features - An array of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
        Returns:
        Dispatch instance
        Throws:
        WebServiceException -
        • If there is any missing WSDL metadata as required by this method.
        • If the endpointReference metadata does not match the serviceName or portName of a WSDL associated with this Service instance.
        • If the portName cannot be determined from the EndpointReference metadata.
        • If any error in the creation of the Dispatch object.
        • if a feature is enabled that is not compatible with this port or is unsupported.
        Since:
        JAX-WS 2.1
        See Also:
        JAXBContext, WebServiceFeature

      • getServiceName

        public abstract QName getServiceName()
        Gets the name of this service.
        Returns:
        Qualified name of this service

      • getPorts

        public abstract Iterator<QName> getPorts()
        Returns an Iterator for the list of QNames of service endpoints grouped by this service
        Returns:
        Returns java.util.Iterator with elements of type javax.xml.namespace.QName
        Throws:
        WebServiceException - If this Service class does not have access to the required WSDL metadata

      • getWSDLDocumentLocation

        public abstract URL getWSDLDocumentLocation()
        Gets the location of the WSDL document for this Service.
        Returns:
        URL for the location of the WSDL document for this service

      • getHandlerResolver

        public abstract HandlerResolver getHandlerResolver()
        Returns the configured handler resolver.
        Returns:
        HandlerResolver The HandlerResolver being used by this Service instance, or null if there isn't one.

      • setHandlerResolver

        public abstract void setHandlerResolver(HandlerResolver handlerResolver)
        Sets the HandlerResolver for this Service instance.

        The handler resolver, if present, will be called once for each proxy or dispatch instance that is created, and the handler chain returned by the resolver will be set on the instance.

        Parameters:
        handlerResolver - The HandlerResolver to use for all subsequently created proxy/dispatch objects.
        See Also:
        HandlerResolver

      • getExecutor

        public abstract Executor getExecutor()
        Returns the executor for this Serviceinstance. The executor is used for all asynchronous invocations that require callbacks.
        Returns:
        The java.util.concurrent.Executor to be used to invoke a callback.
        See Also:
        Executor

      • setExecutor

        public abstract void setExecutor(Executor executor)
        Sets the executor for this Service instance. The executor is used for all asynchronous invocations that require callbacks.
        Parameters:
        executor - The java.util.concurrent.Executor to be used to invoke a callback.
        Throws:
        SecurityException - If the instance does not support setting an executor for security reasons (e.g. the necessary permissions are missing).
        See Also:
        Executor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceFeatureAnnotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws.spi

Annotation Type WebServiceFeatureAnnotation

  • @Target(value=ANNOTATION_TYPE)
 @Retention(value=RUNTIME)
 @Documented
public @interface WebServiceFeatureAnnotation
    Annotation used to identify other annotations as a WebServiceFeature.

    Each WebServiceFeature annotation annotated with this annotation MUST contain an enabled property of type boolean with a default value of true.

    JAX-WS defines the following WebServiceFeature annotations (Addressing, MTOM, RespectBinding), however, an implementation may define vendors specific annotations for other features.

    Annotations annotated with WebServiceFeatureAnnotation MUST have the same @Target of WebServiceRef annotation, so that the resulting feature annotation can be used in conjunction with the WebServiceRef annotation if necessary.

    If a JAX-WS implementation encounters an annotation annotated with the WebServiceFeatureAnnotation that it does not recognize/support an error MUST be given.

    Since:
    JAX-WS 2.1
    See Also:
    Addressing, MTOM, RespectBinding

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      Class<? extends WebServiceFeature> bean
      The WebServiceFeature bean that is associated with the WebServiceFeature annotation
      String id
      Unique identifier for the WebServiceFeature.

    • Element Detail

      • id

        public abstract String id
        Unique identifier for the WebServiceFeature. This identifier MUST be unique across all implementations of JAX-WS.

      • bean

        public abstract Class<? extends WebServiceFeature> bean
        The WebServiceFeature bean that is associated with the WebServiceFeature annotation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebEndpoint

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebEndpoint

  • @Target(value=METHOD)
 @Retention(value=RUNTIME)
 @Documented
public @interface WebEndpoint
    Used to annotate the getPortName() methods of a generated service interface.

    The information specified in this annotation is sufficient to uniquely identify a wsdl:port element inside a wsdl:service. The latter is determined based on the value of the WebServiceClient annotation on the generated service interface itself.

    Since:
    JAX-WS 2.0
    See Also:
    WebServiceClient

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      The local name of the endpoint.

    • Element Detail

      • name

        public abstract String name
        The local name of the endpoint.
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebFault

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebFault

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
 @Documented
public @interface WebFault
    Used to annotate service specific exception classes to customize to the local and namespace name of the fault element and the name of the fault bean.
    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String faultBean
      Fault bean name.
      String messageName
      wsdl:Message's name.
      String name
      Element's local name.
      String targetNamespace
      Element's namespace name.

    • Element Detail

      • name

        public abstract String name
        Element's local name.
        Default:
        ""

      • targetNamespace

        public abstract String targetNamespace
        Element's namespace name.
        Default:
        ""

      • faultBean

        public abstract String faultBean
        Fault bean name.
        Default:
        ""

      • messageName

        public abstract String messageName
        wsdl:Message's name. Default name is the exception's class name.
        Since:
        JAX-WS 2.2
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceClient

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebServiceClient

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
 @Documented
public @interface WebServiceClient
    Used to annotate a generated service interface.

    The information specified in this annotation is sufficient to uniquely identify a wsdl:service element inside a WSDL document. This wsdl:service element represents the Web service for which the generated service interface provides a client view.

    Since:
    JAX-WS 2.0

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String name
      The local name of the Web service.
      String targetNamespace
      The namespace for the Web service.
      String wsdlLocation
      The location of the WSDL document for the service (a URL).

    • Element Detail

      • name

        public abstract String name
        The local name of the Web service.
        Default:
        ""

      • targetNamespace

        public abstract String targetNamespace
        The namespace for the Web service.
        Default:
        ""

      • wsdlLocation

        public abstract String wsdlLocation
        The location of the WSDL document for the service (a URL).
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Interface WebServiceContext

  • public interface WebServiceContext
    A WebServiceContext makes it possible for a web service endpoint implementation class to access message context and security information relative to a request being served. Typically a WebServiceContext is injected into an endpoint implementation class using the Resource annotation.
    Since:
    JAX-WS 2.0
    See Also:
    Resource

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      <T extends EndpointReference>
      T             		getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this endpoint.
      EndpointReference getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference for this endpoint.
      MessageContext getMessageContext()
      Returns the MessageContext for the request being served at the time this method is called.
      Principal getUserPrincipal()
      Returns the Principal that identifies the sender of the request currently being serviced.
      boolean isUserInRole(String role)
      Returns a boolean indicating whether the authenticated user is included in the specified logical role.

    • Method Detail

      • getMessageContext

        MessageContext getMessageContext()
        Returns the MessageContext for the request being served at the time this method is called. Only properties with APPLICATION scope will be visible to the application.
        Returns:
        MessageContext The message context.
        Throws:
        IllegalStateException - This exception is thrown if the method is called while no request is being serviced.
        See Also:
        MessageContext, MessageContext.Scope, IllegalStateException

      • getUserPrincipal

        Principal getUserPrincipal()
        Returns the Principal that identifies the sender of the request currently being serviced. If the sender has not been authenticated, the method returns null.
        Returns:
        Principal The principal object.
        Throws:
        IllegalStateException - This exception is thrown if the method is called while no request is being serviced.
        See Also:
        Principal, IllegalStateException

      • isUserInRole

        boolean isUserInRole(String role)
        Returns a boolean indicating whether the authenticated user is included in the specified logical role. If the user has not been authenticated, the method returns false.
        Parameters:
        role - A String specifying the name of the role
        Returns:
        a boolean indicating whether the sender of the request belongs to a given role
        Throws:
        IllegalStateException - This exception is thrown if the method is called while no request is being serviced.

      • getEndpointReference

        EndpointReference getEndpointReference(Element... referenceParameters)
        Returns the EndpointReference for this endpoint.

        If the Binding for this bindingProvider is either SOAP1.1/HTTP or SOAP1.2/HTTP, then a W3CEndpointReference MUST be returned.

        Parameters:
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        Returns:
        EndpointReference of the endpoint associated with this WebServiceContext. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.
        Throws:
        IllegalStateException - This exception is thrown if the method is called while no request is being serviced.
        Since:
        JAX-WS 2.1
        See Also:
        W3CEndpointReference

      • getEndpointReference

        <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
                                                     Element... referenceParameters)
        Returns the EndpointReference associated with this endpoint.
        Parameters:
        clazz - The type of EndpointReference that MUST be returned.
        referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
        Returns:
        EndpointReference of type clazz of the endpoint associated with this WebServiceContext instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.
        Throws:
        IllegalStateException - This exception is thrown if the method is called while no request is being serviced.
        WebServiceException - If the clazz type of EndpointReference is not supported.
        Since:
        JAX-WS 2.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class WebServiceException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • javax.xml.ws.WebServiceException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    ProtocolException

    public class WebServiceException
extends RuntimeException
    The WebServiceException class is the base exception class for all JAX-WS API runtime exceptions.
    Since:
    JAX-WS 2.0
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      WebServiceException()
      Constructs a new exception with null as its detail message.
      WebServiceException(String message)
      Constructs a new exception with the specified detail message.
      WebServiceException(String message, Throwable cause)
      Constructs a new exception with the specified detail message and cause.
      WebServiceException(Throwable cause)
      Constructs a new WebServiceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • WebServiceException

        public WebServiceException()
        Constructs a new exception with null as its detail message. The cause is not initialized.

      • WebServiceException

        public WebServiceException(String message)
        Constructs a new exception with the specified detail message. The cause is not initialized.
        Parameters:
        message - The detail message which is later retrieved using the getMessage method

      • WebServiceException

        public WebServiceException(String message,
                           Throwable cause)
        Constructs a new exception with the specified detail message and cause.
        Parameters:
        message - The detail message which is later retrieved using the getMessage method
        cause - The cause which is saved for the later retrieval throw by the getCause method

      • WebServiceException

        public WebServiceException(Throwable cause)
        Constructs a new WebServiceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
        Parameters:
        cause - The cause which is saved for the later retrieval throw by the getCause method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceFeature

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class WebServiceFeature

  • java.lang.Object
    • javax.xml.ws.WebServiceFeature
  • Direct Known Subclasses:
    AddressingFeature, MTOMFeature, RespectBindingFeature

    public abstract class WebServiceFeature
extends Object
    A WebServiceFeature is used to represent a feature that can be enabled or disabled for a web service.

    The JAX-WS specification will define some standard features and JAX-WS implementors are free to define additional features if necessary. Vendor specific features may not be portable so caution should be used when using them. Each Feature definition MUST define a public static final String ID that can be used in the Feature annotation to refer to the feature. This ID MUST be unique across all features of all vendors. When defining a vendor specific feature ID, use a vendor specific namespace in the ID string.

    Since:
    2.1
    See Also:
    RespectBindingFeature, AddressingFeature, MTOMFeature

    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected boolean enabled
      Specifies if the feature is enabled or disabled

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | WebServiceFeature()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract String getID()
      Get the unique identifier for this WebServiceFeature.
      boolean isEnabled()
      Returns true if this feature is enabled.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • enabled

        protected boolean enabled
        Specifies if the feature is enabled or disabled

    • Constructor Detail

      • WebServiceFeature

        protected WebServiceFeature()

    • Method Detail

      • getID

        public abstract String getID()
        Get the unique identifier for this WebServiceFeature.
        Returns:
        the unique identifier for this feature.

      • isEnabled

        public boolean isEnabled()
        Returns true if this feature is enabled.
        Returns:
        true if and only if the feature is enabled .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServicePermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws

Class WebServicePermission

  • java.lang.Object
    • java.security.Permission
      • java.security.BasicPermission
        • javax.xml.ws.WebServicePermission
  • All Implemented Interfaces:
    Serializable, Guard

    public final class WebServicePermission
extends BasicPermission
    This class defines web service permissions.

    Web service Permissions are identified by name (also referred to as a "target name") alone. There are no actions associated with them.

    The following permission target name is defined:

    publishEndpoint

    The publishEndpoint permission allows publishing a web service endpoint using the publish methods defined by the javax.xml.ws.Endpoint class.

    Granting publishEndpoint allows the application to be exposed as a network service. Depending on the security of the runtime and the security of the application, this may introduce a security hole that is remotely exploitable.

    See Also:
    Endpoint, BasicPermission, Permission, Permissions, SecurityManager, SocketPermission, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      WebServicePermission(String name)
      Creates a new permission with the specified name.
      WebServicePermission(String name, String actions)
      Creates a new permission with the specified name and actions.

    • Method Summary

      • Methods inherited from class java.security.BasicPermission

        equals, getActions, hashCode, implies, newPermissionCollection

      • Methods inherited from class java.security.Permission

        checkGuard, getName, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • WebServicePermission

        public WebServicePermission(String name)
        Creates a new permission with the specified name.
        Parameters:
        name - the name of the WebServicePermission

      • WebServicePermission

        public WebServicePermission(String name,
                            String actions)
        Creates a new permission with the specified name and actions. The actions parameter is currently unused and it should be null.
        Parameters:
        name - the name of the WebServicePermission
        actions - should be null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebServiceProvider

  • @Target(value=TYPE)
 @Retention(value=RUNTIME)
 @Documented
public @interface WebServiceProvider
    Used to annotate a Provider implementation class.
    Since:
    JAX-WS 2.0
    See Also:
    Provider

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String portName
      Port name.
      String serviceName
      Service name.
      String targetNamespace
      Target namespace for the service
      String wsdlLocation
      Location of the WSDL description for the service.

    • Element Detail

      • wsdlLocation

        public abstract String wsdlLocation
        Location of the WSDL description for the service.
        Default:
        ""

      • serviceName

        public abstract String serviceName
        Service name.
        Default:
        ""

      • targetNamespace

        public abstract String targetNamespace
        Target namespace for the service
        Default:
        ""

      • portName

        public abstract String portName
        Port name.
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceRef

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebServiceRef

  • @Target(value={TYPE,METHOD,FIELD})
 @Retention(value=RUNTIME)
 @Documented
public @interface WebServiceRef
    The WebServiceRef annotation is used to define a reference to a web service and (optionally) an injection target for it. It can be used to inject both service and proxy instances. These injected references are not thread safe. If the references are accessed by multiple threads, usual synchronization techinques can be used to support multiple threads.

    Web service references are resources in the Java EE 5 sense. The annotations (for example, Addressing) annotated with meta-annotation WebServiceFeatureAnnotation can be used in conjunction with WebServiceRef. The created reference MUST be configured with annotation's web service feature.

    For example, in the code below, the injected StockQuoteProvider proxy MUST have WS-Addressing enabled as specifed by the Addressing annotation.

    public class MyClient {
       @Addressing
       @WebServiceRef(StockQuoteService.class)
       private StockQuoteProvider stockQuoteProvider;
       ...
    }

    If a JAX-WS implementation encounters an unsupported or unrecognized annotation annotated with the WebServiceFeatureAnnotation that is specified with WebServiceRef, an ERROR MUST be given.

    Since:
    JAX-WS 2.0
    See Also:
    Resource, WebServiceFeatureAnnotation

    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      String lookup
      A portable JNDI lookup name that resolves to the target web service reference.
      String mappedName
      A product specific name that this resource should be mapped to.
      String name
      The JNDI name of the resource.
      Class<?> type
      The Java type of the resource.
      Class<? extends Service> value
      The service class, alwiays a type extending javax.xml.ws.Service.
      String wsdlLocation
      A URL pointing to the WSDL document for the web service.

    • Element Detail

      • name

        public abstract String name
        The JNDI name of the resource. For field annotations, the default is the field name. For method annotations, the default is the JavaBeans property name corresponding to the method. For class annotations, there is no default and this MUST be specified. The JNDI name can be absolute(with any logical namespace) or relative to JNDI java:comp/env namespace.
        Default:
        ""

      • type

        public abstract Class<?> type
        The Java type of the resource. For field annotations, the default is the type of the field. For method annotations, the default is the type of the JavaBeans property. For class annotations, there is no default and this MUST be specified.
        Default:
        java.lang.Object.class

      • mappedName

        public abstract String mappedName
        A product specific name that this resource should be mapped to. The name of this resource, as defined by the name element or defaulted, is a name that is local to the application component using the resource. (When a relative JNDI name is specified, then it's a name in the JNDI java:comp/env namespace.) Many application servers provide a way to map these local names to names of resources known to the application server. This mapped name is often a global JNDI name, but may be a name of any form.

        Application servers are not required to support any particular form or type of mapped name, nor the ability to use mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is portable.

        Default:
        ""

      • value

        public abstract Class<? extends Service> value
        The service class, alwiays a type extending javax.xml.ws.Service. This element MUST be specified whenever the type of the reference is a service endpoint interface.
        Default:
        javax.xml.ws.Service.class

      • wsdlLocation

        public abstract String wsdlLocation
        A URL pointing to the WSDL document for the web service. If not specified, the WSDL location specified by annotations on the resource type is used instead.
        Default:
        ""

      • lookup

        public abstract String lookup
        A portable JNDI lookup name that resolves to the target web service reference.
        Since:
        JAX-WS 2.2
        Default:
        ""
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WebServiceRefs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element
javax.xml.ws

Annotation Type WebServiceRefs

  • @Documented
 @Retention(value=RUNTIME)
 @Target(value=TYPE)
public @interface WebServiceRefs
    The WebServiceRefs annotation allows multiple web service references to be declared at the class level.

    It can be used to inject both service and proxy instances. These injected references are not thread safe. If the references are accessed by multiple threads, usual synchronization techniques can be used to support multiple threads.

    There is no way to associate web service features with the injected instances. If an instance needs to be configured with web service features, use @WebServiceRef to inject the resource along with its features.

    Example: The StockQuoteProvider proxy instance, and the StockQuoteService service instance are injected using @WebServiceRefs.

    @WebServiceRefs({@WebServiceRef(name="service/stockquoteservice", value=StockQuoteService.class),
                     @WebServiceRef(name="service/stockquoteprovider", type=StockQuoteProvider.class, value=StockQuoteService.class})
    public class MyClient {
        void init() {
            Context ic = new InitialContext();
            StockQuoteService service = (StockQuoteService) ic.lookup("java:comp/env/service/stockquoteservice");
            StockQuoteProvider port = (StockQuoteProvider) ic.lookup("java:comp/env/service/stockquoteprovider");
            ...
       }
       ...
    }
    Since:
    2.0
    See Also:
    WebServiceRef

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element and Description
      WebServiceRef[] value
      Array used for multiple web service reference declarations.

    • Element Detail

      • value

        public abstract WebServiceRef[] value
        Array used for multiple web service reference declarations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Field |
  • Required |
  • Optional
  • Detail:
  • Field |
  • Element

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


wsaddressing

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.ws.wsaddressing

This package defines APIs related to WS-Addressing.

See: Description

  • Class Summary
    Class Description
    W3CEndpointReference
    This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
    W3CEndpointReferenceBuilder
    This class is used to build W3CEndpointReference instances.

Package javax.xml.ws.wsaddressing Description

This package defines APIs related to WS-Addressing.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.ws.wsaddressing Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.ws.wsaddressing

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • javax.xml.ws.EndpointReference
      • javax.xml.ws.wsaddressing.W3CEndpointReference
    • javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.ws.wsaddressing

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.ws.wsaddressing

  • Packages that use javax.xml.ws.wsaddressing
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
  • Classes in javax.xml.ws.wsaddressing used by javax.xml.ws.spi
    Class and Description
    W3CEndpointReference
    This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
  • Classes in javax.xml.ws.wsaddressing used by javax.xml.ws.wsaddressing
    Class and Description
    W3CEndpointReference
    This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.
    W3CEndpointReferenceBuilder
    This class is used to build W3CEndpointReference instances.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.wsaddressing.W3CEndpointReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.wsaddressing.W3CEndpointReference

  • Packages that use W3CEndpointReference
    Package Description
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of W3CEndpointReference in javax.xml.ws.spi

      Methods in javax.xml.ws.spi that return W3CEndpointReference
      Modifier and Type Method and Description
      abstract W3CEndpointReference Provider.createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.

    • Uses of W3CEndpointReference in javax.xml.ws.wsaddressing

      Methods in javax.xml.ws.wsaddressing that return W3CEndpointReference
      Modifier and Type Method and Description
      W3CEndpointReference W3CEndpointReferenceBuilder.build()
      Builds a W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder

  • Packages that use W3CEndpointReferenceBuilder
    Package Description
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.

    • Uses of W3CEndpointReferenceBuilder in javax.xml.ws.wsaddressing

      Methods in javax.xml.ws.wsaddressing that return W3CEndpointReferenceBuilder
      Modifier and Type Method and Description
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.address(String address)
      Sets the address to the W3CEndpointReference instance's wsa:Address.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.attribute(QName name, String value)
      Adds an extension attribute to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.element(Element element)
      Adds an extension element to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.endpointName(QName endpointName)
      Sets the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.interfaceName(QName interfaceName)
      Sets the interfaceName as the wsam:InterfaceName element in the wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.metadata(Element metadataElement)
      Adds the metadataElement to the W3CEndpointReference instance's wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.referenceParameter(Element referenceParameter)
      Adds the referenceParameter to the W3CEndpointReference instance wsa:ReferenceParameters element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.serviceName(QName serviceName)
      Sets the serviceName as the wsam:ServiceName element in the wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.wsdlDocumentLocation(String wsdlDocumentLocation)
      Sets the wsdlDocumentLocation that will be referenced as wsa:Metadata/@wsdli:wsdlLocation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


W3CEndpointReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.wsaddressing

Class W3CEndpointReference

  • java.lang.Object
    • javax.xml.ws.EndpointReference
      • javax.xml.ws.wsaddressing.W3CEndpointReference

  • public final class W3CEndpointReference
extends EndpointReference
    This class represents a W3C Addressing EndpointReferece which is a remote reference to a web service endpoint that supports the W3C WS-Addressing 1.0 - Core Recommendation.

    Developers should use this class in their SEIs if they want to pass/return endpoint references that represent the W3C WS-Addressing recommendation.

    JAXB will use the JAXB annotations and bind this class to XML infoset that is consistent with that defined by WS-Addressing. See WS-Addressing for more information on WS-Addressing EndpointReferences.

    Since:
    JAX-WS 2.1

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected static String | NS

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | W3CEndpointReference()
        W3CEndpointReference(Source source)
      Creates an EPR from infoset representation

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void writeTo(Result result)
      write this EndpointReference to the specified infoset format

      • Methods inherited from class javax.xml.ws.EndpointReference

        getPort, readFrom, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • NS

        protected static final String NS
        See Also:
        Constant Field Values

    • Constructor Detail

      • W3CEndpointReference

        protected W3CEndpointReference()

      • W3CEndpointReference

        public W3CEndpointReference(Source source)
        Creates an EPR from infoset representation
        Parameters:
        source - A source object containing valid XmlInfoset instance consistent with the W3C WS-Addressing Core recommendation.
        Throws:
        WebServiceException - If the source does NOT contain a valid W3C WS-Addressing EndpointReference.
        NullPointerException - If the null source value is given

    • Method Detail

      • writeTo

        public void writeTo(Result result)
        write this EndpointReference to the specified infoset format
        Specified by:
        writeTo in class EndpointReference
        Parameters:
        result - for writing infoset
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


W3CEndpointReferenceBuilder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.xml.ws.wsaddressing

Class W3CEndpointReferenceBuilder

  • java.lang.Object
    • javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder

  • public final class W3CEndpointReferenceBuilder
extends Object
    This class is used to build W3CEndpointReference instances. The intended use of this clsss is for an application component, for example a factory component, to create an W3CEndpointReference for a web service endpoint published by the same Java EE application. It can also be used to create W3CEndpointReferences for an Java SE based endpoint by providing the address property.

    When creating a W3CEndpointReference for an endpoint that is not published by the same Java EE application, the address property MUST be specified.

    When creating a W3CEndpointReference for an endpoint published by the same Java EE application, the address property MAY be null but then the serviceName and endpointName MUST specify an endpoint published by the same Java EE application.

    When the wsdlDocumentLocation is specified it MUST refer to a valid WSDL document and the serviceName and endpointName (if specified) MUST match a service and port in the WSDL document.

    Since:
    JAX-WS 2.1

    • Constructor Summary

      Constructors
      Constructor and Description
      W3CEndpointReferenceBuilder()
      Creates a new W3CEndpointReferenceBuilder instance.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      W3CEndpointReferenceBuilder address(String address)
      Sets the address to the W3CEndpointReference instance's wsa:Address.
      W3CEndpointReferenceBuilder attribute(QName name, String value)
      Adds an extension attribute to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReference build()
      Builds a W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance.
      W3CEndpointReferenceBuilder element(Element element)
      Adds an extension element to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReferenceBuilder endpointName(QName endpointName)
      Sets the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element.
      W3CEndpointReferenceBuilder interfaceName(QName interfaceName)
      Sets the interfaceName as the wsam:InterfaceName element in the wsa:Metadata element.
      W3CEndpointReferenceBuilder metadata(Element metadataElement)
      Adds the metadataElement to the W3CEndpointReference instance's wsa:Metadata element.
      W3CEndpointReferenceBuilder referenceParameter(Element referenceParameter)
      Adds the referenceParameter to the W3CEndpointReference instance wsa:ReferenceParameters element.
      W3CEndpointReferenceBuilder serviceName(QName serviceName)
      Sets the serviceName as the wsam:ServiceName element in the wsa:Metadata element.
      W3CEndpointReferenceBuilder wsdlDocumentLocation(String wsdlDocumentLocation)
      Sets the wsdlDocumentLocation that will be referenced as wsa:Metadata/@wsdli:wsdlLocation.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • W3CEndpointReferenceBuilder

        public W3CEndpointReferenceBuilder()
        Creates a new W3CEndpointReferenceBuilder instance.

    • Method Detail

      • address

        public W3CEndpointReferenceBuilder address(String address)
        Sets the address to the W3CEndpointReference instance's wsa:Address.

        The address MUST be set to a non-null value when building a W3CEndpointReference for a web service endpoint that is not published by the same Java EE application or when running on Java SE.

        Parameters:
        address - The address of the endpoint to be targeted by the returned W3CEndpointReference.
        Returns:
        A W3CEndpointReferenceBuilder instance with the address set to the wsa:Address.

      • interfaceName

        public W3CEndpointReferenceBuilder interfaceName(QName interfaceName)
        Sets the interfaceName as the wsam:InterfaceName element in the wsa:Metadata element. See 2.1 Referencing WSDL Metadata from an EPR for more details.
        Parameters:
        interfaceName - The port type name of the endpoint to be targeted by the returned W3CEndpointReference.
        Returns:
        A W3CEndpointReferenceBuilder instance with the interfaceName as wsam:InterfaceName element added to the wsa:Metadata element

      • serviceName

        public W3CEndpointReferenceBuilder serviceName(QName serviceName)
        Sets the serviceName as the wsam:ServiceName element in the wsa:Metadata element. See 2.1 Referencing WSDL Metadata from an EPR for more details.
        Parameters:
        serviceName - The service name of the endpoint to be targeted by the returned W3CEndpointReference. This property may also be used with the endpointName (portName) property to lookup the address of a web service endpoint that is published by the same Java EE application.
        Returns:
        A W3CEndpointReferenceBuilder instance with the serviceName as wsam:ServiceName element added to the wsa:Metadata element

      • endpointName

        public W3CEndpointReferenceBuilder endpointName(QName endpointName)
        Sets the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element. This method can only be called after the serviceName method has been called.

        See 2.1 Referencing WSDL Metadata from an EPR for more details.

        Parameters:
        endpointName - The name of the endpoint to be targeted by the returned W3CEndpointReference. The endpointName (portName) property may also be used with the serviceName property to lookup the address of a web service endpoint published by the same Java EE application.
        Returns:
        A W3CEndpointReferenceBuilder instance with the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element.
        Throws:
        IllegalStateException, - if the serviceName has not been set.
        IllegalArgumentException, - if the endpointName's Namespace URI doesn't match serviceName's Namespace URI

      • wsdlDocumentLocation

        public W3CEndpointReferenceBuilder wsdlDocumentLocation(String wsdlDocumentLocation)
        Sets the wsdlDocumentLocation that will be referenced as wsa:Metadata/@wsdli:wsdlLocation. The namespace name for the wsdli:wsdlLocation's value can be taken from the WSDL itself.

        See 2.1 Referencing WSDL Metadata from an EPR for more details.

        Parameters:
        wsdlDocumentLocation - The location of the WSDL document to be referenced in the wsa:Metadata of the W3CEndpointReference.
        Returns:
        A W3CEndpointReferenceBuilder instance with the wsdlDocumentLocation that is to be referenced.

      • referenceParameter

        public W3CEndpointReferenceBuilder referenceParameter(Element referenceParameter)
        Adds the referenceParameter to the W3CEndpointReference instance wsa:ReferenceParameters element.
        Parameters:
        referenceParameter - The element to be added to the wsa:ReferenceParameters element.
        Returns:
        A W3CEndpointReferenceBuilder instance with the referenceParameter added to the wsa:ReferenceParameters element.
        Throws:
        IllegalArgumentException - if referenceParameter is null.

      • metadata

        public W3CEndpointReferenceBuilder metadata(Element metadataElement)
        Adds the metadataElement to the W3CEndpointReference instance's wsa:Metadata element.
        Parameters:
        metadataElement - The element to be added to the wsa:Metadata element.
        Returns:
        A W3CEndpointReferenceBuilder instance with the metadataElement added to the wsa:Metadata element.
        Throws:
        IllegalArgumentException - if metadataElement is null.

      • element

        public W3CEndpointReferenceBuilder element(Element element)
        Adds an extension element to the W3CEndpointReference instance's wsa:EndpointReference element.
        Parameters:
        element - The extension element to be added to the W3CEndpointReference
        Returns:
        A W3CEndpointReferenceBuilder instance with the extension element added to the W3CEndpointReference instance.
        Throws:
        IllegalArgumentException - if element is null.
        Since:
        JAX-WS 2.2

      • attribute

        public W3CEndpointReferenceBuilder attribute(QName name,
                                             String value)
        Adds an extension attribute to the W3CEndpointReference instance's wsa:EndpointReference element.
        Parameters:
        name - The name of the extension attribute to be added to the W3CEndpointReference
        value - extension attribute value
        Returns:
        A W3CEndpointReferenceBuilder instance with the extension attribute added to the W3CEndpointReference instance.
        Throws:
        IllegalArgumentException - if name or value is null.
        Since:
        JAX-WS 2.2

      • build

        public W3CEndpointReference build()
        Builds a W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance.

        This method can be used to create a W3CEndpointReference for any endpoint by specifying the address property along with any other desired properties. This method can also be used to create a W3CEndpointReference for an endpoint that is published by the same Java EE application. This method can automatically determine the address of an endpoint published by the same Java EE application that is identified by the serviceName and endpointName properties. If the address is null and the serviceName and endpointName do not identify an endpoint published by the same Java EE application, a java.lang.IllegalStateException MUST be thrown.

        Returns:
        W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance. This method never returns null.
        Throws:
        IllegalStateException -
        • If the address, serviceName and endpointName are all null.
        • If the serviceName service is null and the endpointName is NOT null.
        • If the address property is null and the serviceName and endpointName do not specify a valid endpoint published by the same Java EE application.
        • If the serviceName is NOT null and is not present in the specified WSDL.
        • If the endpointName port is not null and it is not present in serviceName service in the WSDL.
        • If the wsdlDocumentLocation is NOT null and does not represent a valid WSDL.
        WebServiceException - If an error occurs while creating the W3CEndpointReference.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml

Class XMLConstants

  • java.lang.Object
    • javax.xml.XMLConstants

  • public final class XMLConstants
extends Object

    Utility class to contain basic XML values as constants.

    Since:
    1.5
    Version:
    $Revision: 1.8 $, $Date: 2010/05/25 16:19:45 $
    See Also:
    Extensible Markup Language (XML) 1.1, Extensible Markup Language (XML) 1.0 (Second Edition), XML 1.0 Second Edition Specification Errata, Namespaces in XML 1.1, Namespaces in XML, Namespaces in XML Errata, XML Schema Part 1: Structures

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String ACCESS_EXTERNAL_DTD
      Property: accessExternalDTD
      static String ACCESS_EXTERNAL_SCHEMA
      Property: accessExternalSchema
      static String ACCESS_EXTERNAL_STYLESHEET
      Property: accessExternalStylesheet
      static String DEFAULT_NS_PREFIX
      Prefix to use to represent the default XML Namespace.
      static String FEATURE_SECURE_PROCESSING
      Feature for secure processing.
      static String NULL_NS_URI
      Namespace URI to use to represent that there is no Namespace.
      static String RELAXNG_NS_URI
      RELAX NG Namespace URI.
      static String W3C_XML_SCHEMA_INSTANCE_NS_URI
      W3C XML Schema Instance Namespace URI.
      static String W3C_XML_SCHEMA_NS_URI
      W3C XML Schema Namespace URI.
      static String W3C_XPATH_DATATYPE_NS_URI
      W3C XPath Datatype Namespace URI.
      static String XML_DTD_NS_URI
      XML Document Type Declaration Namespace URI as an arbitrary value.
      static String XML_NS_PREFIX
      The official XML Namespace prefix.
      static String XML_NS_URI
      The official XML Namespace name URI.
      static String XMLNS_ATTRIBUTE
      The official XML attribute used for specifying XML Namespace declarations.
      static String XMLNS_ATTRIBUTE_NS_URI
      The official XML attribute used for specifying XML Namespace declarations, XMLConstants.XMLNS_ATTRIBUTE, Namespace name URI.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • NULL_NS_URI

        public static final String NULL_NS_URI

        Namespace URI to use to represent that there is no Namespace.

        Defined by the Namespace specification to be "".

        See Also:
        Namespaces in XML, 5.2 Namespace Defaulting, Constant Field Values

      • DEFAULT_NS_PREFIX

        public static final String DEFAULT_NS_PREFIX

        Prefix to use to represent the default XML Namespace.

        Defined by the XML specification to be "".

        See Also:
        Namespaces in XML, 3. Qualified Names, Constant Field Values

      • XML_NS_URI

        public static final String XML_NS_URI

        The official XML Namespace name URI.

        Defined by the XML specification to be "http://www.w3.org/XML/1998/namespace".

        See Also:
        Namespaces in XML, 3. Qualified Names, Constant Field Values

      • XML_NS_PREFIX

        public static final String XML_NS_PREFIX

        The official XML Namespace prefix.

        Defined by the XML specification to be "xml".

        See Also:
        Namespaces in XML, 3. Qualified Names<</a>, Constant Field Values

      • XMLNS_ATTRIBUTE_NS_URI

        public static final String XMLNS_ATTRIBUTE_NS_URI

        The official XML attribute used for specifying XML Namespace declarations, XMLConstants.XMLNS_ATTRIBUTE, Namespace name URI.

        Defined by the XML specification to be "http://www.w3.org/2000/xmlns/".

        See Also:
        Namespaces in XML, 3. Qualified Names, Namespaces in XML Errata, Constant Field Values

      • XMLNS_ATTRIBUTE

        public static final String XMLNS_ATTRIBUTE

        The official XML attribute used for specifying XML Namespace declarations.

        It is NOT valid to use as a prefix. Defined by the XML specification to be "xmlns".

        See Also:
        Namespaces in XML, 3. Qualified Names, Constant Field Values

      • W3C_XML_SCHEMA_NS_URI

        public static final String W3C_XML_SCHEMA_NS_URI

        W3C XML Schema Namespace URI.

        Defined to be "http://www.w3.org/2001/XMLSchema".

        See Also:
        XML Schema Part 1: Structures, 2.6 Schema-Related Markup in Documents Being Validated, Constant Field Values

      • W3C_XML_SCHEMA_INSTANCE_NS_URI

        public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI

        W3C XML Schema Instance Namespace URI.

        Defined to be "http://www.w3.org/2001/XMLSchema-instance".

        See Also:
        XML Schema Part 1: Structures, 2.6 Schema-Related Markup in Documents Being Validated, Constant Field Values

      • W3C_XPATH_DATATYPE_NS_URI

        public static final String W3C_XPATH_DATATYPE_NS_URI

        W3C XPath Datatype Namespace URI.

        Defined to be "http://www.w3.org/2003/11/xpath-datatypes".

        See Also:
        XQuery 1.0 and XPath 2.0 Data Model, Constant Field Values

      • XML_DTD_NS_URI

        public static final String XML_DTD_NS_URI

        XML Document Type Declaration Namespace URI as an arbitrary value.

        Since not formally defined by any existing standard, arbitrarily define to be "http://www.w3.org/TR/REC-xml".

        See Also:
        Constant Field Values

      • RELAXNG_NS_URI

        public static final String RELAXNG_NS_URI

        RELAX NG Namespace URI.

        Defined to be "http://relaxng.org/ns/structure/1.0".

        See Also:
        RELAX NG Specification, Constant Field Values

      • FEATURE_SECURE_PROCESSING

        public static final String FEATURE_SECURE_PROCESSING

        Feature for secure processing.

        • true instructs the implementation to process XML securely. This may set limits on XML constructs to avoid conditions such as denial of service attacks.
        • false instructs the implementation to process XML in accordance with the XML specifications ignoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
        See Also:
        Constant Field Values

      • ACCESS_EXTERNAL_DTD

        public static final String ACCESS_EXTERNAL_DTD

        Property: accessExternalDTD

        Restrict access to external DTDs and external Entity References to the protocols specified. If access is denied due to the restriction of this property, a runtime exception that is specific to the context is thrown. In the case of SAXParser for example, SAXException is thrown.

        Value: a list of protocols separated by comma. A protocol is the scheme portion of a URI, or in the case of the JAR protocol, "jar" plus the scheme portion separated by colon. A scheme is defined as:

        scheme = alpha *( alpha | digit | "+" | "-" | "." )
        where alpha = a-z and A-Z.

        And the JAR protocol:
        jar[:scheme]

        Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined by Character.isSpaceChar(char) in the value will be ignored. Examples of protocols are file, http, jar:file.

        Default value: The default value is implementation specific and therefore not specified. The following options are provided for consideration:

        • an empty string to deny all access to external references;
        • a specific protocol, such as file, to give permission to only the protocol;
        • the keyword "all" to grant permission to all protocols.

        When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.

        Granting all access: the keyword "all" grants permission to all protocols.

        System Property: The value of this property can be set or overridden by system property javax.xml.accessExternalDTD.

        ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard Properties format. If the file exists and the system property is specified, its value will be used to override the default of the property.

        Since:
        1.7
        See Also:
        Constant Field Values

      • ACCESS_EXTERNAL_SCHEMA

        public static final String ACCESS_EXTERNAL_SCHEMA

        Property: accessExternalSchema

        Restrict access to the protocols specified for external reference set by the schemaLocation attribute, Import and Include element. If access is denied due to the restriction of this property, a runtime exception that is specific to the context is thrown. In the case of SchemaFactory for example, org.xml.sax.SAXException is thrown.

        Value: a list of protocols separated by comma. A protocol is the scheme portion of a URI, or in the case of the JAR protocol, "jar" plus the scheme portion separated by colon. A scheme is defined as:

        scheme = alpha *( alpha | digit | "+" | "-" | "." )
        where alpha = a-z and A-Z.

        And the JAR protocol:
        jar[:scheme]

        Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined by Character.isSpaceChar(char) in the value will be ignored. Examples of protocols are file, http, jar:file.

        Default value: The default value is implementation specific and therefore not specified. The following options are provided for consideration:

        • an empty string to deny all access to external references;
        • a specific protocol, such as file, to give permission to only the protocol;
        • the keyword "all" to grant permission to all protocols.

        When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.

        Granting all access: the keyword "all" grants permission to all protocols.

        System Property: The value of this property can be set or overridden by system property javax.xml.accessExternalSchema

        ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard java.util.Properties format. If the file exists and the system property is specified, its value will be used to override the default of the property.

        Since:
        1.7

        See Also:
        Constant Field Values

      • ACCESS_EXTERNAL_STYLESHEET

        public static final String ACCESS_EXTERNAL_STYLESHEET

        Property: accessExternalStylesheet

        Restrict access to the protocols specified for external references set by the stylesheet processing instruction, Import and Include element, and document function. If access is denied due to the restriction of this property, a runtime exception that is specific to the context is thrown. In the case of constructing new Transformer for example, TransformerConfigurationException will be thrown by the TransformerFactory.

        Value: a list of protocols separated by comma. A protocol is the scheme portion of a URI, or in the case of the JAR protocol, "jar" plus the scheme portion separated by colon. A scheme is defined as:

        scheme = alpha *( alpha | digit | "+" | "-" | "." )
        where alpha = a-z and A-Z.

        And the JAR protocol:
        jar[:scheme]

        Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined by Character.isSpaceChar(char) in the value will be ignored. Examples of protocols are file, http, jar:file.

        Default value: The default value is implementation specific and therefore not specified. The following options are provided for consideration:

        • an empty string to deny all access to external references;
        • a specific protocol, such as file, to give permission to only the protocol;
        • the keyword "all" to grant permission to all protocols.

        When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.

        Granting all access: the keyword "all" grants permission to all protocols.

        System Property: The value of this property can be set or overridden by system property javax.xml.accessExternalStylesheet

        ${JAVA_HOME}/lib/jaxp.properties: This configuration file is in standard java.util.Properties format. If the file exists and the system property is specified, its value will be used to override the default of the property.

        Since:
        1.7
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


xpath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package javax.xml.xpath

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

See: Description

  • Interface Summary
    Interface Description
    XPath
    XPath provides access to the XPath evaluation environment and expressions.
    XPathExpression
    XPathExpression provides access to compiled XPath expressions.
    XPathFunction
    XPathFunction provides access to XPath functions.
    XPathFunctionResolver
    XPathFunctionResolver provides access to the set of user defined XPathFunctions.
    XPathVariableResolver
    XPathVariableResolver provides access to the set of user defined XPath variables.
  • Class Summary
    Class Description
    XPathConstants
    XPath constants.
    XPathFactory
    An XPathFactory instance can be used to create XPath objects.
  • Exception Summary
    Exception Description
    XPathException
    XPathException represents a generic XPath exception.
    XPathExpressionException
    XPathExpressionException represents an error in an XPath expression.
    XPathFactoryConfigurationException
    XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.
    XPathFunctionException
    XPathFunctionException represents an error with an XPath function.

Package javax.xml.xpath Description

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

The following XML standards apply:

  • XML Path Language (XPath) Version 1.0

XPath Overview

The XPath language provides a simple, concise syntax for selecting nodes from an XML document. XPath also provides rules for converting a node in an XML document object model (DOM) tree to a boolean, double, or string value. XPath is a W3C-defined language and an official W3C recommendation; the W3C hosts the XML Path Language (XPath) Version 1.0 specification.

XPath started in life in 1999 as a supplement to the XSLT and XPointer languages, but has more recently become popular as a stand-alone language, as a single XPath expression can be used to replace many lines of DOM API code.

XPath Expressions

An XPath expression is composed of a location path and one or more optional predicates. Expressions may also include XPath variables.

The following is an example of a simple XPath expression:

/foo/bar

This example would select the <bar> element in an XML document such as the following:

<foo>
<bar/>
</foo>

The expression /foo/bar is an example of a location path. While XPath location paths resemble Unix-style file system paths, an important distinction is that XPath expressions return all nodes that match the expression. Thus, all three <bar> elements in the following document would be selected by the /foo/bar expression:

<foo>
<bar/>
<bar/>
<bar/>
</foo>

A special location path operator, //, selects nodes at any depth in an XML document. The following example selects all <bar> elements regardless of their location in a document:

//bar

A wildcard operator, *, causes all element nodes to be selected. The following example selects all children elements of a <foo> element:

/foo/*

In addition to element nodes, XPath location paths may also address attribute nodes, text nodes, comment nodes, and processing instruction nodes. The following table gives examples of location paths for each of these node types:

Location Path | Description
/foo/bar/@id | Selects the attribute id of the <bar> element
/foo/bar/text() | Selects the text nodes of the <bar> element. No distinction is made between escaped and non-escaped character data.
/foo/bar/comment() | Selects all comment nodes contained in the <bar> element.
/foo/bar/processing-instruction() | Selects all processing-instruction nodes contained in the <bar> element.

Predicates allow for refining the nodes selected by an XPath location path. Predicates are of the form [expression]. The following example selects all <foo> elements that contain an include attribute with the value of true:

//foo[@include='true']

Predicates may be appended to each other to further refine an expression, such as:

//foo[@include='true'][@mode='bar']

Using the XPath API

The following example demonstrates using the XPath API to select one or more nodes from an XML document:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);

XPath Expressions and Types

While XPath expressions select nodes in the XML document, the XPath API allows the selected nodes to be coalesced into one of the following other data types:

  • Boolean
  • Number
  • String

The desired return type is specified by a QName parameter in method call used to evaluate the expression, which is either a call to XPathExpression.evalute(...) or to one of the XPath.evaluate(...) convenience methods. The allowed QName values are specified as constants in the XPathConstants class; they are:

  • XPathConstants.NODESET
  • XPathConstants.NODE
  • XPathConstants.STRING
  • XPathConstants.BOOLEAN
  • XPathConstants.NUMBER

When a Boolean return type is requested, Boolean.TRUE is returned if one or more nodes were selected; otherwise, Boolean.FALSE is returned.

The String return type is a convenience for retrieving the character data from a text node, attribute node, comment node, or processing-instruction node. When used on an element node, the value of the child text nodes is returned.

The Number return type attempts to coalesce the text of a node to a double data type.

XPath Context

XPath location paths may be relative to a particular node in the document, known as the context. Consider the following XML document:

<widgets>
<widget>
<manufacturer/>
<dimensions/>
</widget>
</widgets>

The <widget> element can be selected with the following XPath API code:

// parse the XML as a W3C Document
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new File("/widgets.xml"));

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);

With a reference to the <widget> element, a relative XPath expression can now written to select the <manufacturer> child element:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "manufacturer";
Node manufacturerNode = (Node) xpath.evaluate(expression, widgetNode, XPathConstants.NODE);
  • Author Ben Galbraith
  • Author Norman Walsh
  • Author Jeff Suttor
  • See XML Path Language (XPath) Version 1.0
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.xpath Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package javax.xml.xpath

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • javax.xml.xpath.XPathException
          • javax.xml.xpath.XPathExpressionException
            • javax.xml.xpath.XPathFunctionException
          • javax.xml.xpath.XPathFactoryConfigurationException
    • javax.xml.xpath.XPathConstants
    • javax.xml.xpath.XPathFactory

Interface Hierarchy

  • javax.xml.xpath.XPath
  • javax.xml.xpath.XPathExpression
  • javax.xml.xpath.XPathFunction
  • javax.xml.xpath.XPathFunctionResolver
  • javax.xml.xpath.XPathVariableResolver
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package javax.xml.xpath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
javax.xml.xpath

  • Packages that use javax.xml.xpath
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.
  • Classes in javax.xml.xpath used by javax.xml.xpath
    Class and Description
    XPath
    XPath provides access to the XPath evaluation environment and expressions.
    XPathException
    XPathException represents a generic XPath exception.
    XPathExpression
    XPathExpression provides access to compiled XPath expressions.
    XPathExpressionException
    XPathExpressionException represents an error in an XPath expression.
    XPathFactory
    An XPathFactory instance can be used to create XPath objects.
    XPathFactoryConfigurationException
    XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.
    XPathFunction
    XPathFunction provides access to XPath functions.
    XPathFunctionException
    XPathFunctionException represents an error with an XPath function.
    XPathFunctionResolver
    XPathFunctionResolver provides access to the set of user defined XPathFunctions.
    XPathVariableResolver
    XPathVariableResolver provides access to the set of user defined XPath variables.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathConstants

No usage of javax.xml.xpath.XPathConstants
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathException

  • Packages that use XPathException
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathException in javax.xml.xpath

      Subclasses of XPathException in javax.xml.xpath
      Modifier and Type Class and Description
      class  XPathExpressionException
      XPathExpressionException represents an error in an XPath expression.
      class  XPathFactoryConfigurationException
      XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.
      class  XPathFunctionException
      XPathFunctionException represents an error with an XPath function.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathExpressionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathExpressionException

  • Packages that use XPathExpressionException
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathExpressionException in javax.xml.xpath

      Subclasses of XPathExpressionException in javax.xml.xpath
      Modifier and Type Class and Description
      class  XPathFunctionException
      XPathFunctionException represents an error with an XPath function.
      Methods in javax.xml.xpath that throw XPathExpressionException
      Modifier and Type Method and Description
      XPathExpression XPath.compile(String expression)
      Compile an XPath expression for later evaluation.
      String XPathExpression.evaluate(InputSource source)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.
      Object XPathExpression.evaluate(InputSource source, QName returnType)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.
      String XPathExpression.evaluate(Object item)
      Evaluate the compiled XPath expression in the specified context and return the result as a String.
      Object XPathExpression.evaluate(Object item, QName returnType)
      Evaluate the compiled XPath expression in the specified context and return the result as the specified type.
      String XPath.evaluate(String expression, InputSource source)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as a String.
      Object XPath.evaluate(String expression, InputSource source, QName returnType)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as the specified type.
      String XPath.evaluate(String expression, Object item)
      Evaluate an XPath expression in the specified context and return the result as a String.
      Object XPath.evaluate(String expression, Object item, QName returnType)
      Evaluate an XPath expression in the specified context and return the result as the specified type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathFactory

  • Packages that use XPathFactory
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathFactory in javax.xml.xpath

      Methods in javax.xml.xpath that return XPathFactory
      Modifier and Type Method and Description
      static XPathFactory XPathFactory.newInstance()
      Get a new XPathFactory instance using the default object model, DEFAULT_OBJECT_MODEL_URI, the W3C DOM.
      static XPathFactory XPathFactory.newInstance(String uri)
      Get a new XPathFactory instance using the specified object model.
      static XPathFactory XPathFactory.newInstance(String uri, String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a XPathFactory from a factory class name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathFactoryConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathFactoryConfigurationException

  • Packages that use XPathFactoryConfigurationException
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathFactoryConfigurationException in javax.xml.xpath

      Methods in javax.xml.xpath that throw XPathFactoryConfigurationException
      Modifier and Type Method and Description
      abstract boolean XPathFactory.getFeature(String name)
      Get the state of the named feature.
      static XPathFactory XPathFactory.newInstance(String uri)
      Get a new XPathFactory instance using the specified object model.
      static XPathFactory XPathFactory.newInstance(String uri, String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a XPathFactory from a factory class name.
      abstract void XPathFactory.setFeature(String name, boolean value)
      Set a feature for this XPathFactory and XPaths created by this factory.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class javax.xml.xpath.XPathFunctionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
javax.xml.xpath.XPathFunctionException

  • Packages that use XPathFunctionException
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathFunctionException in javax.xml.xpath

      Methods in javax.xml.xpath that throw XPathFunctionException
      Modifier and Type Method and Description
      Object XPathFunction.evaluate(List args)
      Evaluate the function with the specified arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.xpath.XPath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.xpath.XPath

  • Packages that use XPath
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPath in javax.xml.xpath

      Methods in javax.xml.xpath that return XPath
      Modifier and Type Method and Description
      abstract XPath XPathFactory.newXPath()
      Return a new XPath using the underlying object model determined when the XPathFactory was instantiated.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.xpath.XPathExpression

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.xpath.XPathExpression

  • Packages that use XPathExpression
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathExpression in javax.xml.xpath

      Methods in javax.xml.xpath that return XPathExpression
      Modifier and Type Method and Description
      XPathExpression XPath.compile(String expression)
      Compile an XPath expression for later evaluation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.xpath.XPathFunction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.xpath.XPathFunction

  • Packages that use XPathFunction
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathFunction in javax.xml.xpath

      Methods in javax.xml.xpath that return XPathFunction
      Modifier and Type Method and Description
      XPathFunction XPathFunctionResolver.resolveFunction(QName functionName, int arity)
      Find a function in the set of available functions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.xpath.XPathFunctionResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.xpath.XPathFunctionResolver

  • Packages that use XPathFunctionResolver
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathFunctionResolver in javax.xml.xpath

      Methods in javax.xml.xpath that return XPathFunctionResolver
      Modifier and Type Method and Description
      XPathFunctionResolver XPath.getXPathFunctionResolver()
      Return the current function resolver.
      Methods in javax.xml.xpath with parameters of type XPathFunctionResolver
      Modifier and Type Method and Description
      abstract void XPathFactory.setXPathFunctionResolver(XPathFunctionResolver resolver)
      Establish a default function resolver.
      void XPath.setXPathFunctionResolver(XPathFunctionResolver resolver)
      Establish a function resolver.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface javax.xml.xpath.XPathVariableResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
javax.xml.xpath.XPathVariableResolver

  • Packages that use XPathVariableResolver
    Package Description
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

    • Uses of XPathVariableResolver in javax.xml.xpath

      Methods in javax.xml.xpath that return XPathVariableResolver
      Modifier and Type Method and Description
      XPathVariableResolver XPath.getXPathVariableResolver()
      Return the current variable resolver.
      Methods in javax.xml.xpath with parameters of type XPathVariableResolver
      Modifier and Type Method and Description
      abstract void XPathFactory.setXPathVariableResolver(XPathVariableResolver resolver)
      Establish a default variable resolver.
      void XPath.setXPathVariableResolver(XPathVariableResolver resolver)
      Establish a variable resolver.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Interface XPath

  • public interface XPath

    XPath provides access to the XPath evaluation environment and expressions.

    Evaluation of XPath Expressions.
    context | If a request is made to evaluate the expression in the absence of a context item, an empty document node will be used for the context. For the purposes of evaluating XPath expressions, a DocumentFragment is treated like a Document node.
    variables If the expression contains a variable reference, its value will be found through the XPathVariableResolver set with setXPathVariableResolver(XPathVariableResolver resolver). An XPathExpressionException is raised if the variable resolver is undefined or the resolver returns null for the variable. The value of a variable must be immutable through the course of any single evaluation.
    functions If the expression contains a function reference, the function will be found through the XPathFunctionResolver set with setXPathFunctionResolver(XPathFunctionResolver resolver). An XPathExpressionException is raised if the function resolver is undefined or the function resolver returns null for the function.
    QNames | QNames in the expression are resolved against the XPath namespace context set with setNamespaceContext(NamespaceContext nsContext).
    result This result of evaluating an expression is converted to an instance of the desired return type. Valid return types are defined in XPathConstants. Conversion to the return type follows XPath conversion rules.

    An XPath object is not thread-safe and not reentrant. In other words, it is the application's responsibility to make sure that one XPath object is not used from more than one thread at any given time, and while the evaluate method is invoked, applications may not recursively call the evaluate method.

    Since:
    1.5
    See Also:
    XML Path Language (XPath) Version 1.0

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      XPathExpression compile(String expression)
      Compile an XPath expression for later evaluation.
      String evaluate(String expression, InputSource source)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as a String.
      Object evaluate(String expression, InputSource source, QName returnType)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as the specified type.
      String evaluate(String expression, Object item)
      Evaluate an XPath expression in the specified context and return the result as a String.
      Object evaluate(String expression, Object item, QName returnType)
      Evaluate an XPath expression in the specified context and return the result as the specified type.
      NamespaceContext getNamespaceContext()
      Return the current namespace context.
      XPathFunctionResolver getXPathFunctionResolver()
      Return the current function resolver.
      XPathVariableResolver getXPathVariableResolver()
      Return the current variable resolver.
      void reset()
      Reset this XPath to its original configuration.
      void setNamespaceContext(NamespaceContext nsContext)
      Establish a namespace context.
      void setXPathFunctionResolver(XPathFunctionResolver resolver)
      Establish a function resolver.
      void setXPathVariableResolver(XPathVariableResolver resolver)
      Establish a variable resolver.

    • Method Detail

      • reset

        void reset()

        Reset this XPath to its original configuration.

        XPath is reset to the same state as when it was created with XPathFactory.newXPath(). reset() is designed to allow the reuse of existing XPaths thus saving resources associated with the creation of new XPaths.

        The reset XPath is not guaranteed to have the same XPathFunctionResolver, XPathVariableResolver or NamespaceContext Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal XPathFunctionResolver, XPathVariableResolver and NamespaceContext.

      • setXPathVariableResolver

        void setXPathVariableResolver(XPathVariableResolver resolver)

        Establish a variable resolver.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - Variable resolver.
        Throws:
        NullPointerException - If resolver is null.

      • getXPathVariableResolver

        XPathVariableResolver getXPathVariableResolver()

        Return the current variable resolver.

        null is returned in no variable resolver is in effect.

        Returns:
        Current variable resolver.

      • setXPathFunctionResolver

        void setXPathFunctionResolver(XPathFunctionResolver resolver)

        Establish a function resolver.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - XPath function resolver.
        Throws:
        NullPointerException - If resolver is null.

      • getXPathFunctionResolver

        XPathFunctionResolver getXPathFunctionResolver()

        Return the current function resolver.

        null is returned in no function resolver is in effect.

        Returns:
        Current function resolver.

      • setNamespaceContext

        void setNamespaceContext(NamespaceContext nsContext)

        Establish a namespace context.

        A NullPointerException is thrown if nsContext is null.

        Parameters:
        nsContext - Namespace context to use.
        Throws:
        NullPointerException - If nsContext is null.

      • getNamespaceContext

        NamespaceContext getNamespaceContext()

        Return the current namespace context.

        null is returned in no namespace context is in effect.

        Returns:
        Current Namespace context.

      • compile

        XPathExpression compile(String expression)
                 throws XPathExpressionException

        Compile an XPath expression for later evaluation.

        If expression contains any XPathFunctions, they must be available via the XPathFunctionResolver. An XPathExpressionException will be thrown if the XPathFunction cannot be resovled with the XPathFunctionResolver.

        If expression contains any variables, the XPathVariableResolver in effect at compile time will be used to resolve them.

        If expression is null, a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        Returns:
        Compiled XPath expression.
        Throws:
        XPathExpressionException - If expression cannot be compiled.
        NullPointerException - If expression is null.

      • evaluate

        Object evaluate(String expression,
                Object item,
                QName returnType)
         throws XPathExpressionException

        Evaluate an XPath expression in the specified context and return the result as the specified type.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If returnType is not one of the types defined in XPathConstants ( NUMBER, STRING, BOOLEAN, NODE or NODESET) then an IllegalArgumentException is thrown.

        If a null value is provided for item, an empty document will be used for the context. If expression or returnType is null, then a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        item - The starting context (a node, for example).
        returnType - The desired return type.
        Returns:
        Result of evaluating an XPath expression as an Object of returnType.
        Throws:
        XPathExpressionException - If expression cannot be evaluated.
        IllegalArgumentException - If returnType is not one of the types defined in XPathConstants.
        NullPointerException - If expression or returnType is null.

      • evaluate

        String evaluate(String expression,
                Object item)
         throws XPathExpressionException

        Evaluate an XPath expression in the specified context and return the result as a String.

        This method calls evaluate(String expression, Object item, QName returnType) with a returnType of XPathConstants.STRING.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If a null value is provided for item, an empty document will be used for the context. If expression is null, then a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        item - The starting context (a node, for example).
        Returns:
        The String that is the result of evaluating the expression and converting the result to a String.
        Throws:
        XPathExpressionException - If expression cannot be evaluated.
        NullPointerException - If expression is null.

      • evaluate

        Object evaluate(String expression,
                InputSource source,
                QName returnType)
         throws XPathExpressionException

        Evaluate an XPath expression in the context of the specified InputSource and return the result as the specified type.

        This method builds a data model for the InputSource and calls evaluate(String expression, Object item, QName returnType) on the resulting document object.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If returnType is not one of the types defined in XPathConstants, then an IllegalArgumentException is thrown.

        If expression, source or returnType is null, then a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        source - The input source of the document to evaluate over.
        returnType - The desired return type.
        Returns:
        The Object that encapsulates the result of evaluating the expression.
        Throws:
        XPathExpressionException - If expression cannot be evaluated.
        IllegalArgumentException - If returnType is not one of the types defined in XPathConstants.
        NullPointerException - If expression, source or returnType is null.

      • evaluate

        String evaluate(String expression,
                InputSource source)
         throws XPathExpressionException

        Evaluate an XPath expression in the context of the specified InputSource and return the result as a String.

        This method calls evaluate(String expression, InputSource source, QName returnType) with a returnType of XPathConstants.STRING.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If expression or source is null, then a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        source - The InputSource of the document to evaluate over.
        Returns:
        The String that is the result of evaluating the expression and converting the result to a String.
        Throws:
        XPathExpressionException - If expression cannot be evaluated.
        NullPointerException - If expression or source is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathConstants

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathConstants

  • java.lang.Object
    • javax.xml.xpath.XPathConstants

  • public class XPathConstants
extends Object

    XPath constants.

    Since:
    1.5
    See Also:
    XML Path Language (XPath) Version 1.0

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static QName BOOLEAN
      The XPath 1.0 boolean data type.
      static String DOM_OBJECT_MODEL
      The URI for the DOM object model, "http://java.sun.com/jaxp/xpath/dom".
      static QName NODE
      The XPath 1.0 NodeSet data type.
      static QName NODESET
      The XPath 1.0 NodeSet data type.
      static QName NUMBER
      The XPath 1.0 number data type.
      static QName STRING
      The XPath 1.0 string data type.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • NUMBER

        public static final QName NUMBER

        The XPath 1.0 number data type.

        Maps to Java Double.

      • STRING

        public static final QName STRING

        The XPath 1.0 string data type.

        Maps to Java String.

      • BOOLEAN

        public static final QName BOOLEAN

        The XPath 1.0 boolean data type.

        Maps to Java Boolean.

      • NODESET

        public static final QName NODESET

        The XPath 1.0 NodeSet data type.

        Maps to Java NodeList.

      • NODE

        public static final QName NODE

        The XPath 1.0 NodeSet data type.

        Maps to Java Node.

      • DOM_OBJECT_MODEL

        public static final String DOM_OBJECT_MODEL

        The URI for the DOM object model, "http://java.sun.com/jaxp/xpath/dom".

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.xpath.XPathException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    XPathExpressionException, XPathFactoryConfigurationException

    public class XPathException
extends Exception
    XPathException represents a generic XPath exception.

    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathException(String message)
      Constructs a new XPathException with the specified detail message.
      XPathException(Throwable cause)
      Constructs a new XPathException with the specified cause.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Get the cause of this XPathException.
      void printStackTrace()
      Print stack trace to System.err.
      void printStackTrace(PrintStream s)
      Print stack trace to specified PrintStream.
      void printStackTrace(PrintWriter s)
      Print stack trace to specified PrintWriter.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XPathException

        public XPathException(String message)

        Constructs a new XPathException with the specified detail message.

        The cause is not initialized.

        If message is null, then a NullPointerException is thrown.

        Parameters:
        message - The detail message.
        Throws:
        NullPointerException - When message is null.

      • XPathException

        public XPathException(Throwable cause)

        Constructs a new XPathException with the specified cause.

        If cause is null, then a NullPointerException is thrown.

        Parameters:
        cause - The cause.
        Throws:
        NullPointerException - if cause is null.

    • Method Detail

      • getCause

        public Throwable getCause()

        Get the cause of this XPathException.

        Overrides:
        getCause in class Throwable
        Returns:
        Cause of this XPathException.

      • printStackTrace

        public void printStackTrace(PrintStream s)

        Print stack trace to specified PrintStream.

        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - Print stack trace to this PrintStream.

      • printStackTrace

        public void printStackTrace()

        Print stack trace to System.err.

        Overrides:
        printStackTrace in class Throwable

      • printStackTrace

        public void printStackTrace(PrintWriter s)

        Print stack trace to specified PrintWriter.

        Overrides:
        printStackTrace in class Throwable
        Parameters:
        s - Print stack trace to this PrintWriter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathExpression

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Interface XPathExpression

  • public interface XPathExpression

    XPathExpression provides access to compiled XPath expressions.

    Evaluation of XPath Expressions.
    context | If a request is made to evaluate the expression in the absence of a context item, an empty document node will be used for the context. For the purposes of evaluating XPath expressions, a DocumentFragment is treated like a Document node.
    variables If the expression contains a variable reference, its value will be found through the XPathVariableResolver. An XPathExpressionException is raised if the variable resolver is undefined or the resolver returns null for the variable. The value of a variable must be immutable through the course of any single evaluation.
    functions If the expression contains a function reference, the function will be found through the XPathFunctionResolver. An XPathExpressionException is raised if the function resolver is undefined or the function resolver returns null for the function.
    QNames | QNames in the expression are resolved against the XPath namespace context.
    result This result of evaluating an expression is converted to an instance of the desired return type. Valid return types are defined in XPathConstants. Conversion to the return type follows XPath conversion rules.

    An XPath expression is not thread-safe and not reentrant. In other words, it is the application's responsibility to make sure that one XPathExpression object is not used from more than one thread at any given time, and while the evaluate method is invoked, applications may not recursively call the evaluate method.

    Since:
    1.5
    See Also:
    XML Path Language (XPath) Version 1.0, Expressions

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String evaluate(InputSource source)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.
      Object evaluate(InputSource source, QName returnType)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.
      String evaluate(Object item)
      Evaluate the compiled XPath expression in the specified context and return the result as a String.
      Object evaluate(Object item, QName returnType)
      Evaluate the compiled XPath expression in the specified context and return the result as the specified type.

    • Method Detail

      • evaluate

        Object evaluate(Object item,
                QName returnType)
         throws XPathExpressionException

        Evaluate the compiled XPath expression in the specified context and return the result as the specified type.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If returnType is not one of the types defined in XPathConstants, then an IllegalArgumentException is thrown.

        If a null value is provided for item, an empty document will be used for the context. If returnType is null, then a NullPointerException is thrown.

        Parameters:
        item - The starting context (a node, for example).
        returnType - The desired return type.
        Returns:
        The Object that is the result of evaluating the expression and converting the result to returnType.
        Throws:
        XPathExpressionException - If the expression cannot be evaluated.
        IllegalArgumentException - If returnType is not one of the types defined in XPathConstants.
        NullPointerException - If returnType is null.

      • evaluate

        String evaluate(Object item)
         throws XPathExpressionException

        Evaluate the compiled XPath expression in the specified context and return the result as a String.

        This method calls evaluate(Object item, QName returnType) with a returnType of XPathConstants.STRING.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If a null value is provided for item, an empty document will be used for the context.

        Parameters:
        item - The starting context (a node, for example).
        Returns:
        The String that is the result of evaluating the expression and converting the result to a String.
        Throws:
        XPathExpressionException - If the expression cannot be evaluated.

      • evaluate

        Object evaluate(InputSource source,
                QName returnType)
         throws XPathExpressionException

        Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.

        This method builds a data model for the InputSource and calls evaluate(Object item, QName returnType) on the resulting document object.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If returnType is not one of the types defined in XPathConstants, then an IllegalArgumentException is thrown.

        If source or returnType is null, then a NullPointerException is thrown.

        Parameters:
        source - The InputSource of the document to evaluate over.
        returnType - The desired return type.
        Returns:
        The Object that is the result of evaluating the expression and converting the result to returnType.
        Throws:
        XPathExpressionException - If the expression cannot be evaluated.
        IllegalArgumentException - If returnType is not one of the types defined in XPathConstants.
        NullPointerException - If source or returnType is null.

      • evaluate

        String evaluate(InputSource source)
         throws XPathExpressionException

        Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.

        This method calls evaluate(InputSource source, QName returnType) with a returnType of XPathConstants.STRING.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If source is null, then a NullPointerException is thrown.

        Parameters:
        source - The InputSource of the document to evaluate over.
        Returns:
        The String that is the result of evaluating the expression and converting the result to a String.
        Throws:
        XPathExpressionException - If the expression cannot be evaluated.
        NullPointerException - If source is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathExpressionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathExpressionException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.xpath.XPathException
          • javax.xml.xpath.XPathExpressionException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    XPathFunctionException

    public class XPathExpressionException
extends XPathException
    XPathExpressionException represents an error in an XPath expression.

    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathExpressionException(String message)
      Constructs a new XPathExpressionException with the specified detail message.
      XPathExpressionException(Throwable cause)
      Constructs a new XPathExpressionException with the specified cause.

    • Method Summary

      • Methods inherited from class javax.xml.xpath.XPathException

        getCause, printStackTrace, printStackTrace, printStackTrace

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XPathExpressionException

        public XPathExpressionException(String message)

        Constructs a new XPathExpressionException with the specified detail message.

        The cause is not initialized.

        If message is null, then a NullPointerException is thrown.

        Parameters:
        message - The detail message.
        Throws:
        NullPointerException - When message is null.

      • XPathExpressionException

        public XPathExpressionException(Throwable cause)

        Constructs a new XPathExpressionException with the specified cause.

        If cause is null, then a NullPointerException is thrown.

        Parameters:
        cause - The cause.
        Throws:
        NullPointerException - if cause is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathFactory

  • java.lang.Object
    • javax.xml.xpath.XPathFactory

  • public abstract class XPathFactory
extends Object

    An XPathFactory instance can be used to create XPath objects.

    See newInstance(String uri) for lookup mechanism.

    The XPathFactory class is not thread-safe. In other words, it is the application's responsibility to ensure that at most one thread is using a XPathFactory object at any given moment. Implementations are encouraged to mark methods as synchronized to protect themselves from broken clients.

    XPathFactory is not re-entrant. While one of the newInstance methods is being invoked, applications may not attempt to recursively invoke a newInstance method, even from the same thread.

    Since:
    1.5

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String DEFAULT_OBJECT_MODEL_URI
      Default Object Model URI.
      static String DEFAULT_PROPERTY_NAME
      The default property name according to the JAXP spec.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected XPathFactory()
      Protected constructor as newInstance() or newInstance(String uri) or newInstance(String uri, String factoryClassName, ClassLoader classLoader) should be used to create a new instance of an XPathFactory.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract boolean getFeature(String name)
      Get the state of the named feature.
      abstract boolean isObjectModelSupported(String objectModel)
      Is specified object model supported by this XPathFactory?
      static XPathFactory newInstance()
      Get a new XPathFactory instance using the default object model, DEFAULT_OBJECT_MODEL_URI, the W3C DOM.
      static XPathFactory newInstance(String uri)
      Get a new XPathFactory instance using the specified object model.
      static XPathFactory newInstance(String uri, String factoryClassName, ClassLoader classLoader)
      Obtain a new instance of a XPathFactory from a factory class name.
      abstract XPath newXPath()
      Return a new XPath using the underlying object model determined when the XPathFactory was instantiated.
      abstract void setFeature(String name, boolean value)
      Set a feature for this XPathFactory and XPaths created by this factory.
      abstract void setXPathFunctionResolver(XPathFunctionResolver resolver)
      Establish a default function resolver.
      abstract void setXPathVariableResolver(XPathVariableResolver resolver)
      Establish a default variable resolver.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • DEFAULT_PROPERTY_NAME

        public static final String DEFAULT_PROPERTY_NAME

        The default property name according to the JAXP spec.

        See Also:
        Constant Field Values

      • DEFAULT_OBJECT_MODEL_URI

        public static final String DEFAULT_OBJECT_MODEL_URI

        Default Object Model URI.

        See Also:
        Constant Field Values

    • Constructor Detail

      • XPathFactory

        protected XPathFactory()

        Protected constructor as newInstance() or newInstance(String uri) or newInstance(String uri, String factoryClassName, ClassLoader classLoader) should be used to create a new instance of an XPathFactory.

    • Method Detail

      • newInstance

        public static XPathFactory newInstance()

        Get a new XPathFactory instance using the default object model, DEFAULT_OBJECT_MODEL_URI, the W3C DOM.

        This method is functionally equivalent to:

           newInstance(DEFAULT_OBJECT_MODEL_URI)

        Since the implementation for the W3C DOM is always available, this method will never fail.

        Returns:
        Instance of an XPathFactory.
        Throws:
        RuntimeException - When there is a failure in creating an XPathFactory for the default object model.

      • newInstance

        public static XPathFactory newInstance(String uri)
                                throws XPathFactoryConfigurationException

        Get a new XPathFactory instance using the specified object model.

        To find a XPathFactory object, this method looks the following places in the following order where "the class loader" refers to the context class loader:

        1. If the system property DEFAULT_PROPERTY_NAME + ":uri" is present, where uri is the parameter to this method, then its value is read as a class name. The method will try to create a new instance of this class by using the class loader, and returns it if it is successfully created.
        2. ${java.home}/lib/jaxp.properties is read and the value associated with the key being the system property above is looked for. If present, the value is processed just like above.
        3. Use the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility will use the current thread's context class loader to attempt to load the service. If the context class loader is null, the system class loader will be used.
          Each potential service provider is required to implement the method isObjectModelSupported(String objectModel). The first service provider found that supports the specified object model is returned.
          In case of ServiceConfigurationError an XPathFactoryConfigurationException will be thrown.
        4. Platform default XPathFactory is located in a platform specific way. There must be a platform default XPathFactory for the W3C DOM, i.e. DEFAULT_OBJECT_MODEL_URI.

        If everything fails, an XPathFactoryConfigurationException will be thrown.

        Tip for Trouble-shooting:

        See Properties.load(java.io.InputStream) for exactly how a property file is parsed. In particular, colons ':' need to be escaped in a property file, so make sure the URIs are properly escaped in it. For example:

           http\://java.sun.com/jaxp/xpath/dom=org.acme.DomXPathFactory
        Parameters:
        uri - Identifies the underlying object model. The specification only defines the URI DEFAULT_OBJECT_MODEL_URI, http://java.sun.com/jaxp/xpath/dom for the W3C DOM, the org.w3c.dom package, and implementations are free to introduce other URIs for other object models.
        Returns:
        Instance of an XPathFactory.
        Throws:
        XPathFactoryConfigurationException - If the specified object model is unavailable, or if there is a configuration error.
        NullPointerException - If uri is null.
        IllegalArgumentException - If uri is null or uri.length() == 0.

      • newInstance

        public static XPathFactory newInstance(String uri,
                                       String factoryClassName,
                                       ClassLoader classLoader)
                                throws XPathFactoryConfigurationException

        Obtain a new instance of a XPathFactory from a factory class name. XPathFactory is returned if specified factory class supports the specified object model. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

        Tip for Trouble-shooting

        Setting the jaxp.debug system property will cause this method to print a lot of debug messages to System.err about what it is doing and where it is looking at.

        If you have problems try:

         java -Djaxp.debug=1 YourProgram ....
        Parameters:
        uri - Identifies the underlying object model. The specification only defines the URI DEFAULT_OBJECT_MODEL_URI,http://java.sun.com/jaxp/xpath/dom for the W3C DOM, the org.w3c.dom package, and implementations are free to introduce other URIs for other object models.
        factoryClassName - fully qualified factory class name that provides implementation of javax.xml.xpath.XPathFactory.
        classLoader - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
        Returns:
        New instance of a XPathFactory
        Throws:
        XPathFactoryConfigurationException - if factoryClassName is null, or the factory class cannot be loaded, instantiated or the factory class does not support the object model specified in the uri parameter.
        NullPointerException - If uri is null.
        IllegalArgumentException - If uri is null or uri.length() == 0.
        Since:
        1.6
        See Also:
        newInstance(), newInstance(String uri)

      • isObjectModelSupported

        public abstract boolean isObjectModelSupported(String objectModel)

        Is specified object model supported by this XPathFactory?

        Parameters:
        objectModel - Specifies the object model which the returned XPathFactory will understand.
        Returns:
        true if XPathFactory supports objectModel, else false.
        Throws:
        NullPointerException - If objectModel is null.
        IllegalArgumentException - If objectModel.length() == 0.

      • setFeature

        public abstract void setFeature(String name,
                                boolean value)
                         throws XPathFactoryConfigurationException

        Set a feature for this XPathFactory and XPaths created by this factory.

        Feature names are fully qualified URIs. Implementations may define their own features. An XPathFactoryConfigurationException is thrown if this XPathFactory or the XPaths it creates cannot support the feature. It is possible for an XPathFactory to expose a feature value but be unable to change its state.

        All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is true, any reference to an external function is an error. Under these conditions, the implementation must not call the XPathFunctionResolver and must throw an XPathFunctionException.

        Parameters:
        name - Feature name.
        value - Is feature state true or false.
        Throws:
        XPathFactoryConfigurationException - if this XPathFactory or the XPaths it creates cannot support this feature.
        NullPointerException - if name is null.

      • getFeature

        public abstract boolean getFeature(String name)
                            throws XPathFactoryConfigurationException

        Get the state of the named feature.

        Feature names are fully qualified URIs. Implementations may define their own features. An XPathFactoryConfigurationException is thrown if this XPathFactory or the XPaths it creates cannot support the feature. It is possible for an XPathFactory to expose a feature value but be unable to change its state.

        Parameters:
        name - Feature name.
        Returns:
        State of the named feature.
        Throws:
        XPathFactoryConfigurationException - if this XPathFactory or the XPaths it creates cannot support this feature.
        NullPointerException - if name is null.

      • setXPathVariableResolver

        public abstract void setXPathVariableResolver(XPathVariableResolver resolver)

        Establish a default variable resolver.

        Any XPath objects constructed from this factory will use the specified resolver by default.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - Variable resolver.
        Throws:
        NullPointerException - If resolver is null.

      • setXPathFunctionResolver

        public abstract void setXPathFunctionResolver(XPathFunctionResolver resolver)

        Establish a default function resolver.

        Any XPath objects constructed from this factory will use the specified resolver by default.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - XPath function resolver.
        Throws:
        NullPointerException - If resolver is null.

      • newXPath

        public abstract XPath newXPath()

        Return a new XPath using the underlying object model determined when the XPathFactory was instantiated.

        Returns:
        New instance of an XPath.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFactoryConfigurationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathFactoryConfigurationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.xpath.XPathException
          • javax.xml.xpath.XPathFactoryConfigurationException
  • All Implemented Interfaces:
    Serializable

    public class XPathFactoryConfigurationException
extends XPathException
    XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.

    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathFactoryConfigurationException(String message)
      Constructs a new XPathFactoryConfigurationException with the specified detail message.
      XPathFactoryConfigurationException(Throwable cause)
      Constructs a new XPathFactoryConfigurationException with the specified cause.

    • Method Summary

      • Methods inherited from class javax.xml.xpath.XPathException

        getCause, printStackTrace, printStackTrace, printStackTrace

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XPathFactoryConfigurationException

        public XPathFactoryConfigurationException(String message)

        Constructs a new XPathFactoryConfigurationException with the specified detail message.

        The cause is not initialized.

        If message is null, then a NullPointerException is thrown.

        Parameters:
        message - The detail message.
        Throws:
        NullPointerException - When message is null.

      • XPathFactoryConfigurationException

        public XPathFactoryConfigurationException(Throwable cause)

        Constructs a new XPathFactoryConfigurationException with the specified cause.

        If cause is null, then a NullPointerException is thrown.

        Parameters:
        cause - The cause.
        Throws:
        NullPointerException - if cause is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFunction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Interface XPathFunction

  • public interface XPathFunction

    XPathFunction provides access to XPath functions.

    Functions are identified by QName and arity in XPath.

    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object evaluate(List args)
      Evaluate the function with the specified arguments.

    • Method Detail

      • evaluate

        Object evaluate(List args)
         throws XPathFunctionException

        Evaluate the function with the specified arguments.

        To the greatest extent possible, side-effects should be avoided in the definition of extension functions. The implementation evaluating an XPath expression is under no obligation to call extension functions in any particular order or any particular number of times.

        Parameters:
        args - The arguments, null is a valid value.
        Returns:
        The result of evaluating the XPath function as an Object.
        Throws:
        XPathFunctionException - If args cannot be evaluated with this XPath function.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFunctionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Class XPathFunctionException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • javax.xml.xpath.XPathException
          • javax.xml.xpath.XPathExpressionException
            • javax.xml.xpath.XPathFunctionException
  • All Implemented Interfaces:
    Serializable

    public class XPathFunctionException
extends XPathExpressionException
    XPathFunctionException represents an error with an XPath function.

    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      XPathFunctionException(String message)
      Constructs a new XPathFunctionException with the specified detail message.
      XPathFunctionException(Throwable cause)
      Constructs a new XPathFunctionException with the specified cause.

    • Method Summary

      • Methods inherited from class javax.xml.xpath.XPathException

        getCause, printStackTrace, printStackTrace, printStackTrace

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • XPathFunctionException

        public XPathFunctionException(String message)

        Constructs a new XPathFunctionException with the specified detail message.

        The cause is not initialized.

        If message is null, then a NullPointerException is thrown.

        Parameters:
        message - The detail message.
        Throws:
        NullPointerException - When message is null.

      • XPathFunctionException

        public XPathFunctionException(Throwable cause)

        Constructs a new XPathFunctionException with the specified cause.

        If cause is null, then a NullPointerException is thrown.

        Parameters:
        cause - The cause.
        Throws:
        NullPointerException - if cause is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathFunctionResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Interface XPathFunctionResolver

  • public interface XPathFunctionResolver

    XPathFunctionResolver provides access to the set of user defined XPathFunctions.

    XPath functions are resolved by name and arity. The resolver is not needed for XPath built-in functions and the resolver cannot be used to override those functions.

    In particular, the resolver is only called for functions in an another namespace (functions with an explicit prefix). This means that you cannot use the XPathFunctionResolver to implement specifications like XML-Signature Syntax and Processing which extend the function library of XPath 1.0 in the same namespace. This is a consequence of the design of the resolver.

    If you wish to implement additional built-in functions, you will have to extend the underlying implementation directly.

    Since:
    1.5
    See Also:
    XML Path Language (XPath) Version 1.0, Core Function Library

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      XPathFunction resolveFunction(QName functionName, int arity)
      Find a function in the set of available functions.

    • Method Detail

      • resolveFunction

        XPathFunction resolveFunction(QName functionName,
                              int arity)

        Find a function in the set of available functions.

        If functionName or arity is null, then a NullPointerException is thrown.

        Parameters:
        functionName - The function name.
        arity - The number of arguments that the returned function must accept.
        Returns:
        The function or null if no function named functionName with arity arguments exists.
        Throws:
        NullPointerException - If functionName or arity is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XPathVariableResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
javax.xml.xpath

Interface XPathVariableResolver

  • public interface XPathVariableResolver

    XPathVariableResolver provides access to the set of user defined XPath variables.

    The XPathVariableResolver and the XPath evaluator must adhere to a contract that cannot be directly enforced by the API. Although variables may be mutable, that is, an application may wish to evaluate the same XPath expression more than once with different variable values, in the course of evaluating any single XPath expression, a variable's value must not change.

    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object resolveVariable(QName variableName)
      Find a variable in the set of available variables.

    • Method Detail

      • resolveVariable

        Object resolveVariable(QName variableName)

        Find a variable in the set of available variables.

        If variableName is null, then a NullPointerException is thrown.

        Parameters:
        variableName - The QName of the variable name.
        Returns:
        The variables value, or null if no variable named variableName exists. The value returned must be of a type appropriate for the underlying object model.
        Throws:
        NullPointerException - If variableName is null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


jgss

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.ietf.jgss

This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

See: Description

  • Interface Summary
    Interface Description
    GSSContext
    This interface encapsulates the GSS-API security context and provides the security services that are available over the context.
    GSSCredential
    This interface encapsulates the GSS-API credentials for an entity.
    GSSName
    This interface encapsulates a single GSS-API principal entity.
  • Class Summary
    Class Description
    ChannelBinding
    This class encapsulates the concept of caller-provided channel binding information.
    GSSManager
    This class serves as a factory for other important GSS-API classes and also provides information about the mechanisms that are supported.
    MessageProp
    This is a utility class used within the per-message GSSContext methods to convey per-message properties.
    Oid
    This class represents Universal Object Identifiers (Oids) and their associated operations.
  • Exception Summary
    Exception Description
    GSSException
    This exception is thrown whenever a GSS-API error occurs, including any mechanism specific error.

Package org.ietf.jgss Description

This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API. The security mechanisms that an application can chose to use are identified with unique object identifiers. One example of such a mechanism is the Kerberos v5 GSS-API mechanism (object identifier 1.2.840.113554.1.2.2). This mechanism is available through the default instance of the GSSManager class.

The GSS-API is defined in a language independent way in RFC 2743. The Java language bindings are defined in RFC 2853

An application starts out by instantiating a GSSManager which then serves as a factory for a security context. An application can use specific principal names and credentials that are also created using the GSSManager; or it can instantiate a context with system defaults. It then goes through a context establishment loop. Once a context is established with the peer, authentication is complete. Data protection such as integrity and confidentiality can then be obtained from this context.

The GSS-API does not perform any communication with the peer. It merely produces tokens that the application must somehow transport to the other end.

Credential Acquisition

The GSS-API itself does not dictate how an underlying mechanism obtains the credentials that are needed for authentication. It is assumed that prior to calling the GSS-API, these credentials are obtained and stored in a location that the mechanism provider is aware of. However, the default model in the Java platform will be that mechanism providers must obtain credentials only from the private or public credential sets associated with the Subject in the current access control context. The Kerberos v5 mechanism will search for the required INITIATE and ACCEPT credentials (KerberosTicket and KerberosKey) in the private credential set where as some other mechanism might look in the public set or in both. If the desired credential is not present in the appropriate sets of the current Subject, the GSS-API call must fail.

This model has the advantage that credential management is simple and predictable from the applications point of view. An application, given the right permissions, can purge the credentials in the Subject or renew them using standard Java API's. If it purged the credentials, it would be sure that the JGSS mechanism would fail, or if it renewed a time based credential it would be sure that a JGSS mechanism would succeed.

This model does require that a JAAS login be performed in order to authenticate and populate a Subject that the JGSS mechanism can later utilize. However, applications have the ability to relax this restriction by means of a system property: javax.security.auth.useSubjectCredsOnly. By default this system property will be assumed to be true (even when it is unset) indicating that providers must only use the credentials that are present in the current Subject. However, if this property is explicitly set to false by the application, then it indicates that the provider is free to use any credentials cache of its choice. Such a credential cache might be a disk cache, an in-memory cache, or even just the current Subject itself.

Related Documentation

For an online tutorial on using Java GSS-API, please see Introduction to JAAS and Java GSS-API.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.ietf.jgss Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.ietf.jgss

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.ietf.jgss.ChannelBinding
    • org.ietf.jgss.GSSManager
    • org.ietf.jgss.MessageProp
    • org.ietf.jgss.Oid
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.ietf.jgss.GSSException

Interface Hierarchy

  • java.lang.Cloneable
    • org.ietf.jgss.GSSCredential
  • org.ietf.jgss.GSSContext
  • org.ietf.jgss.GSSName
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.ietf.jgss

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.ietf.jgss

  • Packages that use org.ietf.jgss
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.
  • Classes in org.ietf.jgss used by org.ietf.jgss
    Class and Description
    ChannelBinding
    This class encapsulates the concept of caller-provided channel binding information.
    GSSContext
    This interface encapsulates the GSS-API security context and provides the security services that are available over the context.
    GSSCredential
    This interface encapsulates the GSS-API credentials for an entity.
    GSSException
    This exception is thrown whenever a GSS-API error occurs, including any mechanism specific error.
    GSSManager
    This class serves as a factory for other important GSS-API classes and also provides information about the mechanisms that are supported.
    GSSName
    This interface encapsulates a single GSS-API principal entity.
    MessageProp
    This is a utility class used within the per-message GSSContext methods to convey per-message properties.
    Oid
    This class represents Universal Object Identifiers (Oids) and their associated operations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ChannelBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Class ChannelBinding

  • java.lang.Object
    • org.ietf.jgss.ChannelBinding

  • public class ChannelBinding
extends Object
    This class encapsulates the concept of caller-provided channel binding information. Channel bindings are used to strengthen the quality with which peer entity authentication is provided during context establishment. They enable the GSS-API callers to bind the establishment of the security context to relevant characteristics like addresses or to application specific data.

    The caller initiating the security context must determine the appropriate channel binding values to set in the GSSContext object. The acceptor must provide an identical binding in order to validate that received tokens possess correct channel-related characteristics.

    Use of channel bindings is optional in GSS-API. ChannelBinding can be set for the GSSContext using the setChannelBinding method before the first call to initSecContext or acceptSecContext has been performed. Unless the setChannelBinding method has been used to set the ChannelBinding for a GSSContext object, null ChannelBinding will be assumed.

    Conceptually, the GSS-API concatenates the initiator and acceptor address information, and the application supplied byte array to form an octet string. The mechanism calculates a MIC over this octet string and binds the MIC to the context establishment token emitted by initSecContext method of the GSSContext interface. The same bindings are set by the context acceptor for its GSSContext object and during processing of the acceptSecContext method a MIC is calculated in the same way. The calculated MIC is compared with that found in the token, and if the MICs differ, accept will throw a GSSException with the major code set to BAD_BINDINGS, and the context will not be established. Some mechanisms may include the actual channel binding data in the token (rather than just a MIC); applications should therefore not use confidential data as channel-binding components.

    Individual mechanisms may impose additional constraints on addresses that may appear in channel bindings. For example, a mechanism may verify that the initiator address field of the channel binding contains the correct network address of the host system. Portable applications should therefore ensure that they either provide correct information for the address fields, or omit setting of the addressing information.

    Since:
    1.4

    • Constructor Summary

      Constructors
      Constructor and Description
      ChannelBinding(byte[] appData)
      Creates a ChannelBinding object without any addressing information.
      ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData)
      Create a ChannelBinding object with user supplied address information and data.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares two instances of ChannelBinding.
      InetAddress getAcceptorAddress()
      Get the acceptor's address for this channel binding.
      byte[] getApplicationData()
      Get the application specified data for this channel binding.
      InetAddress getInitiatorAddress()
      Get the initiator's address for this channel binding.
      int hashCode()
      Returns a hashcode value for this ChannelBinding object.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ChannelBinding

        public ChannelBinding(InetAddress initAddr,
                      InetAddress acceptAddr,
                      byte[] appData)
        Create a ChannelBinding object with user supplied address information and data. null values can be used for any fields which the application does not want to specify.
        Parameters:
        initAddr - the address of the context initiator. null value can be supplied to indicate that the application does not want to set this value.
        acceptAddr - the address of the context acceptor. null value can be supplied to indicate that the application does not want to set this value.
        appData - application supplied data to be used as part of the channel bindings. null value can be supplied to indicate that the application does not want to set this value.

      • ChannelBinding

        public ChannelBinding(byte[] appData)
        Creates a ChannelBinding object without any addressing information.
        Parameters:
        appData - application supplied data to be used as part of the channel bindings.

    • Method Detail

      • getInitiatorAddress

        public InetAddress getInitiatorAddress()
        Get the initiator's address for this channel binding.
        Returns:
        the initiator's address. null is returned if the address has not been set.

      • getAcceptorAddress

        public InetAddress getAcceptorAddress()
        Get the acceptor's address for this channel binding.
        Returns:
        the acceptor's address. null is returned if the address has not been set.

      • getApplicationData

        public byte[] getApplicationData()
        Get the application specified data for this channel binding.
        Returns:
        the application data being used as part of the ChannelBinding. null is returned if no application data has been specified for the channel binding.

      • equals

        public boolean equals(Object obj)
        Compares two instances of ChannelBinding.
        Overrides:
        equals in class Object
        Parameters:
        obj - another ChannelBinding to compare this one with
        Returns:
        true if the two ChannelBinding's contain the same values for the initiator and acceptor addresses and the application data.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        public int hashCode()
        Returns a hashcode value for this ChannelBinding object.
        Overrides:
        hashCode in class Object
        Returns:
        a hashCode value
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.ietf.jgss.ChannelBinding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.ietf.jgss.ChannelBinding

  • Packages that use ChannelBinding
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of ChannelBinding in org.ietf.jgss

      Methods in org.ietf.jgss with parameters of type ChannelBinding
      Modifier and Type Method and Description
      void GSSContext.setChannelBinding(ChannelBinding cb)
      Sets the channel bindings to be used during context establishment.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.ietf.jgss.GSSException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.ietf.jgss.GSSException

  • Packages that use GSSException
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of GSSException in org.ietf.jgss

      Methods in org.ietf.jgss that throw GSSException
      Modifier and Type Method and Description
      byte[] GSSContext.acceptSecContext(byte[] inToken, int offset, int len)
      Called by the context acceptor upon receiving a token from the peer.
      void GSSContext.acceptSecContext(InputStream inStream, OutputStream outStream)
      Called by the context acceptor to process a token from the peer using streams.
      void GSSCredential.add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
      Adds a mechanism specific credential-element to an existing credential.
      abstract void GSSManager.addProviderAtEnd(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism.
      abstract void GSSManager.addProviderAtFront(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism.
      GSSName GSSName.canonicalize(Oid mech)
      Creates a name that is canonicalized for some mechanism.
      abstract GSSContext GSSManager.createContext(byte[] interProcessToken)
      Factory method for creating a previously exported context.
      abstract GSSContext GSSManager.createContext(GSSCredential myCred)
      Factory method for creating a context on the acceptor' side.
      abstract GSSContext GSSManager.createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid[] mechs, int usage)
      Factory method for acquiring credentials over a set of mechanisms.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid mech, int usage)
      Factory method for acquiring a single mechanism credential.
      abstract GSSCredential GSSManager.createCredential(int usage)
      Factory method for acquiring default credentials.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType, Oid mech)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType)
      Factory method to convert a string name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType, Oid mech)
      Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      void GSSContext.dispose()
      Releases any system resources and cryptographic information stored in the context object and invalidates the context.
      void GSSCredential.dispose()
      Releases any sensitive information that the GSSCredential object may be containing.
      boolean GSSName.equals(GSSName another)
      Compares two GSSName objects to determine if they refer to the same entity.
      byte[] GSSName.export()
      Returns a canonical contiguous byte representation of a mechanism name (MN), suitable for direct, byte by byte comparison by authorization functions.
      byte[] GSSContext.export()
      Exports this context so that another process may import it..
      GSSCredential GSSContext.getDelegCred()
      Obtains the credentials delegated by the context initiator to the context acceptor.
      byte[] Oid.getDER()
      Returns the full ASN.1 DER encoding for this oid object, which includes the tag and length.
      Oid GSSContext.getMech()
      Determines what mechanism is being used for this context.
      Oid[] GSSCredential.getMechs()
      Returns a list of mechanisms supported by this credential.
      byte[] GSSContext.getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
      Returns a token containing a cryptographic Message Integrity Code (MIC) for the supplied message, for transfer to the peer application.
      void GSSContext.getMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to produce a token containing a cryptographic MIC for the supplied message, for transfer to the peer application.
      GSSName GSSCredential.getName()
      Retrieves the name of the entity that the credential asserts.
      GSSName GSSCredential.getName(Oid mech)
      Retrieves a Mechanism Name of the entity that the credential asserts.
      abstract Oid[] GSSManager.getNamesForMech(Oid mech)
      Returns then name types supported by the indicated mechanism.
      int GSSCredential.getRemainingAcceptLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of accepting security contexts using the specified mechanism.
      int GSSCredential.getRemainingInitLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of initiating security contexts using the specified mechanism.
      int GSSCredential.getRemainingLifetime()
      Returns the remaining lifetime in seconds for a credential.
      GSSName GSSContext.getSrcName()
      Returns the name of the context initiator.
      Oid GSSName.getStringNameType()
      Returns the name type of the printable representation of this name that can be obtained from the toString method.
      GSSName GSSContext.getTargName()
      Returns the name of the context acceptor.
      int GSSCredential.getUsage()
      Returns the credential usage mode.
      int GSSCredential.getUsage(Oid mech)
      Returns the credential usage mode for a specific mechanism.
      int GSSContext.getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize)
      Used to determine limits on the size of the message that can be passed to wrap.
      byte[] GSSContext.initSecContext(byte[] inputBuf, int offset, int len)
      Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method.
      int GSSContext.initSecContext(InputStream inStream, OutputStream outStream)
      Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method using streams.
      boolean GSSContext.isInitiator()
      Determines if this is the context initiator.
      boolean GSSContext.isTransferable()
      Determines if the context is transferable to other processes through the use of the export method.
      void GSSContext.requestAnonymity(boolean state)
      Requests that the initiator's identity not be disclosed to the acceptor.
      void GSSContext.requestConf(boolean state)
      Requests that data confidentiality be enabled for the wrap method.
      void GSSContext.requestCredDeleg(boolean state)
      Requests that the initiator's credentials be delegated to the acceptor during context establishment.
      void GSSContext.requestInteg(boolean state)
      Requests that data integrity be enabled for the wrap and getMICmethods.
      void GSSContext.requestLifetime(int lifetime)
      Requests a lifetime in seconds for the context.
      void GSSContext.requestMutualAuth(boolean state)
      Requests that mutual authentication be done during context establishment.
      void GSSContext.requestReplayDet(boolean state)
      Requests that replay detection be enabled for the per-message security services after context establishment.
      void GSSContext.requestSequenceDet(boolean state)
      Requests that sequence checking be enabled for the per-message security services after context establishment.
      void GSSContext.setChannelBinding(ChannelBinding cb)
      Sets the channel bindings to be used during context establishment.
      byte[] GSSContext.unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Used to process tokens generated by the wrap method on the other side of the context.
      void GSSContext.unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to process tokens generated by the wrap method on the other side of the context.
      void GSSContext.verifyMIC(byte[] inToken, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp)
      Verifies the cryptographic MIC, contained in the token parameter, over the supplied message.
      void GSSContext.verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
      Uses streams to verify the cryptographic MIC, contained in the token parameter, over the supplied message.
      byte[] GSSContext.wrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Applies per-message security services over the established security context.
      void GSSContext.wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Applies per-message security services over the established security context using streams.
      Constructors in org.ietf.jgss that throw GSSException
      Constructor and Description
      Oid(byte[] data)
      Creates an Oid object from its ASN.1 DER encoding.
      Oid(InputStream derOid)
      Creates an Oid object from its ASN.1 DER encoding.
      Oid(String strOid)
      Constructs an Oid object from a string representation of its integer components.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.ietf.jgss.GSSManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.ietf.jgss.GSSManager

  • Packages that use GSSManager
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of GSSManager in org.ietf.jgss

      Methods in org.ietf.jgss that return GSSManager
      Modifier and Type Method and Description
      static GSSManager GSSManager.getInstance()
      Returns the default GSSManager implementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.ietf.jgss.MessageProp

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.ietf.jgss.MessageProp

  • Packages that use MessageProp
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of MessageProp in org.ietf.jgss

      Methods in org.ietf.jgss with parameters of type MessageProp
      Modifier and Type Method and Description
      byte[] GSSContext.getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
      Returns a token containing a cryptographic Message Integrity Code (MIC) for the supplied message, for transfer to the peer application.
      void GSSContext.getMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to produce a token containing a cryptographic MIC for the supplied message, for transfer to the peer application.
      byte[] GSSContext.unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Used to process tokens generated by the wrap method on the other side of the context.
      void GSSContext.unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to process tokens generated by the wrap method on the other side of the context.
      void GSSContext.verifyMIC(byte[] inToken, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp)
      Verifies the cryptographic MIC, contained in the token parameter, over the supplied message.
      void GSSContext.verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
      Uses streams to verify the cryptographic MIC, contained in the token parameter, over the supplied message.
      byte[] GSSContext.wrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Applies per-message security services over the established security context.
      void GSSContext.wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Applies per-message security services over the established security context using streams.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.ietf.jgss.Oid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.ietf.jgss.Oid

  • Packages that use Oid
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of Oid in org.ietf.jgss

      Fields in org.ietf.jgss declared as Oid
      Modifier and Type Field and Description
      static Oid GSSName.NT_ANONYMOUS
      Name type for representing an anonymous entity.
      static Oid GSSName.NT_EXPORT_NAME
      Name type used to indicate an exported name produced by the export method.
      static Oid GSSName.NT_HOSTBASED_SERVICE
      Oid indicating a host-based service name form.
      static Oid GSSName.NT_MACHINE_UID_NAME
      Name type to indicate a numeric user identifier corresponding to a user on a local system.
      static Oid GSSName.NT_STRING_UID_NAME
      Name type to indicate a string of digits representing the numeric user identifier of a user on a local system.
      static Oid GSSName.NT_USER_NAME
      Name type to indicate a named user on a local system.
      Methods in org.ietf.jgss that return Oid
      Modifier and Type Method and Description
      Oid GSSContext.getMech()
      Determines what mechanism is being used for this context.
      abstract Oid[] GSSManager.getMechs()
      Returns a list of mechanisms that are available to GSS-API callers through this GSSManager.
      Oid[] GSSCredential.getMechs()
      Returns a list of mechanisms supported by this credential.
      abstract Oid[] GSSManager.getMechsForName(Oid nameType)
      Returns a list of mechanisms that support the indicated name type.
      abstract Oid[] GSSManager.getNamesForMech(Oid mech)
      Returns then name types supported by the indicated mechanism.
      Oid GSSName.getStringNameType()
      Returns the name type of the printable representation of this name that can be obtained from the toString method.
      Methods in org.ietf.jgss with parameters of type Oid
      Modifier and Type Method and Description
      void GSSCredential.add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
      Adds a mechanism specific credential-element to an existing credential.
      abstract void GSSManager.addProviderAtEnd(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism.
      abstract void GSSManager.addProviderAtFront(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism.
      GSSName GSSName.canonicalize(Oid mech)
      Creates a name that is canonicalized for some mechanism.
      boolean Oid.containedIn(Oid[] oids)
      A utility method to test if this Oid value is contained within the supplied Oid array.
      abstract GSSContext GSSManager.createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid[] mechs, int usage)
      Factory method for acquiring credentials over a set of mechanisms.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid mech, int usage)
      Factory method for acquiring a single mechanism credential.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType, Oid mech)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType)
      Factory method to convert a string name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType, Oid mech)
      Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      abstract Oid[] GSSManager.getMechsForName(Oid nameType)
      Returns a list of mechanisms that support the indicated name type.
      GSSName GSSCredential.getName(Oid mech)
      Retrieves a Mechanism Name of the entity that the credential asserts.
      abstract Oid[] GSSManager.getNamesForMech(Oid mech)
      Returns then name types supported by the indicated mechanism.
      int GSSCredential.getRemainingAcceptLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of accepting security contexts using the specified mechanism.
      int GSSCredential.getRemainingInitLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of initiating security contexts using the specified mechanism.
      int GSSCredential.getUsage(Oid mech)
      Returns the credential usage mode for a specific mechanism.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.ietf.jgss.GSSContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.ietf.jgss.GSSContext

  • Packages that use GSSContext
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of GSSContext in org.ietf.jgss

      Methods in org.ietf.jgss that return GSSContext
      Modifier and Type Method and Description
      abstract GSSContext GSSManager.createContext(byte[] interProcessToken)
      Factory method for creating a previously exported context.
      abstract GSSContext GSSManager.createContext(GSSCredential myCred)
      Factory method for creating a context on the acceptor' side.
      abstract GSSContext GSSManager.createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.ietf.jgss.GSSCredential

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.ietf.jgss.GSSCredential

  • Packages that use GSSCredential
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of GSSCredential in org.ietf.jgss

      Methods in org.ietf.jgss that return GSSCredential
      Modifier and Type Method and Description
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid[] mechs, int usage)
      Factory method for acquiring credentials over a set of mechanisms.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid mech, int usage)
      Factory method for acquiring a single mechanism credential.
      abstract GSSCredential GSSManager.createCredential(int usage)
      Factory method for acquiring default credentials.
      GSSCredential GSSContext.getDelegCred()
      Obtains the credentials delegated by the context initiator to the context acceptor.
      Methods in org.ietf.jgss with parameters of type GSSCredential
      Modifier and Type Method and Description
      abstract GSSContext GSSManager.createContext(GSSCredential myCred)
      Factory method for creating a context on the acceptor' side.
      abstract GSSContext GSSManager.createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.ietf.jgss.GSSName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.ietf.jgss.GSSName

  • Packages that use GSSName
    Package Description
    org.ietf.jgss
    This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

    • Uses of GSSName in org.ietf.jgss

      Methods in org.ietf.jgss that return GSSName
      Modifier and Type Method and Description
      GSSName GSSName.canonicalize(Oid mech)
      Creates a name that is canonicalized for some mechanism.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(byte[] name, Oid nameType, Oid mech)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType)
      Factory method to convert a string name from the specified namespace to a GSSName object.
      abstract GSSName GSSManager.createName(String nameStr, Oid nameType, Oid mech)
      Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      GSSName GSSCredential.getName()
      Retrieves the name of the entity that the credential asserts.
      GSSName GSSCredential.getName(Oid mech)
      Retrieves a Mechanism Name of the entity that the credential asserts.
      GSSName GSSContext.getSrcName()
      Returns the name of the context initiator.
      GSSName GSSContext.getTargName()
      Returns the name of the context acceptor.
      Methods in org.ietf.jgss with parameters of type GSSName
      Modifier and Type Method and Description
      void GSSCredential.add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
      Adds a mechanism specific credential-element to an existing credential.
      abstract GSSContext GSSManager.createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid[] mechs, int usage)
      Factory method for acquiring credentials over a set of mechanisms.
      abstract GSSCredential GSSManager.createCredential(GSSName name, int lifetime, Oid mech, int usage)
      Factory method for acquiring a single mechanism credential.
      boolean GSSName.equals(GSSName another)
      Compares two GSSName objects to determine if they refer to the same entity.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


GSSContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Interface GSSContext

  • public interface GSSContext
    This interface encapsulates the GSS-API security context and provides the security services that are available over the context. Security contexts are established between peers using locally acquired credentials. Multiple contexts may exist simultaneously between a pair of peers, using the same or different set of credentials. GSS-API functions in a manner independent of the underlying transport protocol and depends on its calling application to transport the tokens that are generated by the security context between the peers.

    If the caller instantiates the context using the default GSSManager instance, then the Kerberos v5 GSS-API mechanism is guaranteed to be available for context establishment. This mechanism is identified by the Oid "1.2.840.113554.1.2.2" and is defined in RFC 1964.

    Before the context establishment phase is initiated, the context initiator may request specific characteristics desired of the established context. Not all underlying mechanisms support all characteristics that a caller might desire. After the context is established, the caller can check the actual characteristics and services offered by that context by means of various query methods. When using the Kerberos v5 GSS-API mechanism offered by the default GSSManager instance, all optional services will be available locally. They are mutual authentication, credential delegation, confidentiality and integrity protection, and per-message replay detection and sequencing. Note that in the GSS-API, message integrity is a prerequisite for message confidentiality.

    The context establishment occurs in a loop where the initiator calls initSecContext and the acceptor calls acceptSecContext until the context is established. While in this loop the initSecContext and acceptSecContext methods produce tokens that the application sends over to the peer. The peer passes any such token as input to its acceptSecContext or initSecContext as the case may be.

    During the context establishment phase, the isProtReady method may be called to determine if the context can be used for the per-message operations of wrap and getMIC. This allows applications to use per-message operations on contexts which aren't yet fully established.

    After the context has been established or the isProtReady method returns true, the query routines can be invoked to determine the actual characteristics and services of the established context. The application can also start using the per-message methods of wrap and getMIC to obtain cryptographic operations on application supplied data.

    When the context is no longer needed, the application should call dispose to release any system resources the context may be using.

    A security context typically maintains sequencing and replay detection information about the tokens it processes. Therefore, the sequence in which any tokens are presented to this context for processing can be important. Also note that none of the methods in this interface are synchronized. Therefore, it is not advisable to share a GSSContext among several threads unless some application level synchronization is in place.

    Finally, different mechanism providers might place different security restrictions on using GSS-API contexts. These will be documented by the mechanism provider. The application will need to ensure that it has the appropriate permissions if such checks are made in the mechanism layer.

    The example code presented below demonstrates the usage of the GSSContext interface for the initiating peer. Different operations on the GSSContext object are presented, including: object instantiation, setting of desired flags, context establishment, query of actual context flags, per-message operations on application data, and finally context deletion.

        // Create a context using default credentials
    // and the implementation specific default mechanism
    GSSManager manager ...
    GSSName targetName ...
    GSSContext context = manager.createContext(targetName, null, null,
                                           GSSContext.INDEFINITE_LIFETIME);

    // set desired context options prior to context establishment
    context.requestConf(true);
    context.requestMutualAuth(true);
    context.requestReplayDet(true);
    context.requestSequenceDet(true);

    // establish a context between peers

    byte []inToken = new byte[0];

    // Loop while there still is a token to be processed

    while (!context.isEstablished()) {

        byte[] outToken
            = context.initSecContext(inToken, 0, inToken.length);

        // send the output token if generated
        if (outToken != null)
            sendToken(outToken);

        if (!context.isEstablished()) {
            inToken = readToken();
    }

     // display context information
     System.out.println("Remaining lifetime in seconds = "
                                          + context.getLifetime());
     System.out.println("Context mechanism = " + context.getMech());
     System.out.println("Initiator = " + context.getSrcName());
     System.out.println("Acceptor = " + context.getTargName());

     if (context.getConfState())
             System.out.println("Confidentiality (i.e., privacy) is available");

     if (context.getIntegState())
             System.out.println("Integrity is available");

     // perform wrap on an application supplied message, appMsg,
     // using QOP = 0, and requesting privacy service
     byte [] appMsg ...

     MessageProp mProp = new MessageProp(0, true);

     byte []tok = context.wrap(appMsg, 0, appMsg.length, mProp);

     sendToken(tok);

     // release the local-end of the context
     context.dispose();
    Since:
    1.4

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int DEFAULT_LIFETIME
      A lifetime constant representing the default context lifetime.
      static int INDEFINITE_LIFETIME
      A lifetime constant representing indefinite context lifetime.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      byte[] acceptSecContext(byte[] inToken, int offset, int len)
      Called by the context acceptor upon receiving a token from the peer.
      void acceptSecContext(InputStream inStream, OutputStream outStream)
      Called by the context acceptor to process a token from the peer using streams.
      void dispose()
      Releases any system resources and cryptographic information stored in the context object and invalidates the context.
      byte[] export()
      Exports this context so that another process may import it..
      boolean getAnonymityState()
      Determines if the context initiator is anonymously authenticated to the context acceptor.
      boolean getConfState()
      Determines if data confidentiality is available over the context.
      boolean getCredDelegState()
      Determines if credential delegation is enabled on this context.
      GSSCredential getDelegCred()
      Obtains the credentials delegated by the context initiator to the context acceptor.
      boolean getIntegState()
      Determines if data integrity is available over the context.
      int getLifetime()
      Determines what the remaining lifetime for this context is.
      Oid getMech()
      Determines what mechanism is being used for this context.
      byte[] getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
      Returns a token containing a cryptographic Message Integrity Code (MIC) for the supplied message, for transfer to the peer application.
      void getMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to produce a token containing a cryptographic MIC for the supplied message, for transfer to the peer application.
      boolean getMutualAuthState()
      Determines if mutual authentication is enabled on this context.
      boolean getReplayDetState()
      Determines if replay detection is enabled for the per-message security services from this context.
      boolean getSequenceDetState()
      Determines if sequence checking is enabled for the per-message security services from this context.
      GSSName getSrcName()
      Returns the name of the context initiator.
      GSSName getTargName()
      Returns the name of the context acceptor.
      int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize)
      Used to determine limits on the size of the message that can be passed to wrap.
      byte[] initSecContext(byte[] inputBuf, int offset, int len)
      Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method.
      int initSecContext(InputStream inStream, OutputStream outStream)
      Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method using streams.
      boolean isEstablished()
      Used during context establishment to determine the state of the context.
      boolean isInitiator()
      Determines if this is the context initiator.
      boolean isProtReady()
      Determines if the context is ready for per message operations to be used over it.
      boolean isTransferable()
      Determines if the context is transferable to other processes through the use of the export method.
      void requestAnonymity(boolean state)
      Requests that the initiator's identity not be disclosed to the acceptor.
      void requestConf(boolean state)
      Requests that data confidentiality be enabled for the wrap method.
      void requestCredDeleg(boolean state)
      Requests that the initiator's credentials be delegated to the acceptor during context establishment.
      void requestInteg(boolean state)
      Requests that data integrity be enabled for the wrap and getMICmethods.
      void requestLifetime(int lifetime)
      Requests a lifetime in seconds for the context.
      void requestMutualAuth(boolean state)
      Requests that mutual authentication be done during context establishment.
      void requestReplayDet(boolean state)
      Requests that replay detection be enabled for the per-message security services after context establishment.
      void requestSequenceDet(boolean state)
      Requests that sequence checking be enabled for the per-message security services after context establishment.
      void setChannelBinding(ChannelBinding cb)
      Sets the channel bindings to be used during context establishment.
      byte[] unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Used to process tokens generated by the wrap method on the other side of the context.
      void unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Uses streams to process tokens generated by the wrap method on the other side of the context.
      void verifyMIC(byte[] inToken, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp)
      Verifies the cryptographic MIC, contained in the token parameter, over the supplied message.
      void verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
      Uses streams to verify the cryptographic MIC, contained in the token parameter, over the supplied message.
      byte[] wrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
      Applies per-message security services over the established security context.
      void wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
      Applies per-message security services over the established security context using streams.

    • Field Detail

      • DEFAULT_LIFETIME

        static final int DEFAULT_LIFETIME
        A lifetime constant representing the default context lifetime. This value is set to 0.
        See Also:
        Constant Field Values

      • INDEFINITE_LIFETIME

        static final int INDEFINITE_LIFETIME
        A lifetime constant representing indefinite context lifetime. This value must is set to the maximum integer value in Java - Integer.MAX_VALUE.
        See Also:
        Constant Field Values

    • Method Detail

      • initSecContext

        byte[] initSecContext(byte[] inputBuf,
                      int offset,
                      int len)
               throws GSSException
        Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method. This method may return an output token which the application will need to send to the peer for processing by its acceptSecContext method. The application can call isEstablished to determine if the context establishment phase is complete on this side of the context. A return value of false from isEstablished indicates that more tokens are expected to be supplied to initSecContext. Upon completion of the context establishment, the available context options may be queried through the get methods.

        Note that it is possible that the initSecContext method return a token for the peer, and isEstablished return true also. This indicates that the token needs to be sent to the peer, but the local end of the context is now fully established.

        Some mechanism providers might require that the caller be granted permission to initiate a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        Parameters:
        inputBuf - token generated by the peer. This parameter is ignored on the first call since no token has been received from the peer.
        offset - the offset within the inputBuf where the token begins.
        len - the length of the token.
        Returns:
        a byte[] containing the token to be sent to the peer. null indicates that no token is generated.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.NO_CRED, GSSException.CREDENTIALS_EXPIRED, GSSException.BAD_BINDINGS, GSSException.OLD_TOKEN, GSSException.DUPLICATE_TOKEN, GSSException.BAD_NAMETYPE, GSSException.BAD_MECH, GSSException.FAILURE

      • initSecContext

        int initSecContext(InputStream inStream,
                   OutputStream outStream)
            throws GSSException
        Called by the context initiator to start the context creation phase and process any tokens generated by the peer's acceptSecContext method using streams. This method may write an output token to the OutpuStream, which the application will need to send to the peer for processing by its acceptSecContext call. Typically, the application would ensure this by calling the flush method on an OutputStream that encapsulates the connection between the two peers. The application can determine if a token is written to the OutputStream from the return value of this method. A return value of 0 indicates that no token was written. The application can call isEstablished to determine if the context establishment phase is complete on this side of the context. A return value of false from isEstablished indicates that more tokens are expected to be supplied to initSecContext. Upon completion of the context establishment, the available context options may be queried through the get methods.

        Note that it is possible that the initSecContext method return a token for the peer, and isEstablished return true also. This indicates that the token needs to be sent to the peer, but the local end of the context is now fully established.

        The GSS-API authentication tokens contain a definitive start and end. This method will attempt to read one of these tokens per invocation, and may block on the stream if only part of the token is available. In all other respects this method is equivalent to the byte array based initSecContext.

        Some mechanism providers might require that the caller be granted permission to initiate a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        The following example code demonstrates how this method might be used:

             InputStream is ...
     OutputStream os ...
     GSSContext context ...

     // Loop while there is still a token to be processed

     while (!context.isEstablished()) {

         context.initSecContext(is, os);

         // send output token if generated
         os.flush();
     }
        Parameters:
        inStream - an InputStream that contains the token generated by the peer. This parameter is ignored on the first call since no token has been or will be received from the peer at that point.
        outStream - an OutputStream where the output token will be written. During the final stage of context establishment, there may be no bytes written.
        Returns:
        the number of bytes written to the OutputStream as part of the token to be sent to the peer. A value of 0 indicates that no token needs to be sent.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.NO_CRED, GSSException.CREDENTIALS_EXPIRED, GSSException.BAD_BINDINGS, GSSException.OLD_TOKEN, GSSException.DUPLICATE_TOKEN, GSSException.BAD_NAMETYPE, GSSException.BAD_MECH, GSSException.FAILURE

      • acceptSecContext

        byte[] acceptSecContext(byte[] inToken,
                        int offset,
                        int len)
                 throws GSSException
        Called by the context acceptor upon receiving a token from the peer. This method may return an output token which the application will need to send to the peer for further processing by its initSecContext call.

        The application can call isEstablished to determine if the context establishment phase is complete for this peer. A return value of false from isEstablished indicates that more tokens are expected to be supplied to this method. Upon completion of the context establishment, the available context options may be queried through the get methods.

        Note that it is possible that acceptSecContext return a token for the peer, and isEstablished return true also. This indicates that the token needs to be sent to the peer, but the local end of the context is now fully established.

        Some mechanism providers might require that the caller be granted permission to accept a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        The following example code demonstrates how this method might be used:

             byte[] inToken;
     byte[] outToken;
     GSSContext context ...

     // Loop while there is still a token to be processed

     while (!context.isEstablished()) {
         inToken = readToken();
         outToken = context.acceptSecContext(inToken, 0,
                                             inToken.length);
         // send output token if generated
         if (outToken != null)
             sendToken(outToken);
     }
        Parameters:
        inToken - token generated by the peer.
        offset - the offset within the inToken where the token begins.
        len - the length of the token.
        Returns:
        a byte[] containing the token to be sent to the peer. null indicates that no token is generated.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.NO_CRED, GSSException.CREDENTIALS_EXPIRED, GSSException.BAD_BINDINGS, GSSException.OLD_TOKEN, GSSException.DUPLICATE_TOKEN, GSSException.BAD_MECH, GSSException.FAILURE

      • acceptSecContext

        void acceptSecContext(InputStream inStream,
                      OutputStream outStream)
               throws GSSException
        Called by the context acceptor to process a token from the peer using streams. It may write an output token to the OutputStream, which the application will need to send to the peer for processing by its initSecContext method. Typically, the application would ensure this by calling the flush method on an OutputStream that encapsulates the connection between the two peers. The application can call isEstablished to determine if the context establishment phase is complete on this side of the context. A return value of false from isEstablished indicates that more tokens are expected to be supplied to acceptSecContext. Upon completion of the context establishment, the available context options may be queried through the get methods.

        Note that it is possible that acceptSecContext return a token for the peer, and isEstablished return true also. This indicates that the token needs to be sent to the peer, but the local end of the context is now fully established.

        The GSS-API authentication tokens contain a definitive start and end. This method will attempt to read one of these tokens per invocation, and may block on the stream if only part of the token is available. In all other respects this method is equivalent to the byte array based acceptSecContext.

        Some mechanism providers might require that the caller be granted permission to accept a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        The following example code demonstrates how this method might be used:

             InputStream is ...
     OutputStream os ...
     GSSContext context ...

     // Loop while there is still a token to be processed

     while (!context.isEstablished()) {

         context.acceptSecContext(is, os);

         // send output token if generated
         os.flush();
     }
        Parameters:
        inStream - an InputStream that contains the token generated by the peer.
        outStream - an OutputStream where the output token will be written. During the final stage of context establishment, there may be no bytes written.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.NO_CRED, GSSException.CREDENTIALS_EXPIRED, GSSException.BAD_BINDINGS, GSSException.OLD_TOKEN, GSSException.DUPLICATE_TOKEN, GSSException.BAD_MECH, GSSException.FAILURE

      • isEstablished

        boolean isEstablished()
        Used during context establishment to determine the state of the context.
        Returns:
        true if this is a fully established context on the caller's side and no more tokens are needed from the peer.

      • dispose

        void dispose()
      throws GSSException
        Releases any system resources and cryptographic information stored in the context object and invalidates the context.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getWrapSizeLimit

        int getWrapSizeLimit(int qop,
                     boolean confReq,
                     int maxTokenSize)
              throws GSSException
        Used to determine limits on the size of the message that can be passed to wrap. Returns the maximum message size that, if presented to the wrap method with the same confReq and qop parameters, will result in an output token containing no more than maxTokenSize bytes.

        This call is intended for use by applications that communicate over protocols that impose a maximum message size. It enables the application to fragment messages prior to applying protection.

        GSS-API implementations are recommended but not required to detect invalid QOP values when getWrapSizeLimit is called. This routine guarantees only a maximum message size, not the availability of specific QOP values for message protection.

        Parameters:
        qop - the level of protection wrap will be asked to provide.
        confReq - true if wrap will be asked to provide privacy, false otherwise.
        maxTokenSize - the desired maximum size of the token emitted by wrap.
        Returns:
        the maximum size of the input token for the given output token size
        Throws:
        GSSException - containing the following major error codes: GSSException.CONTEXT_EXPIRED, GSSException.BAD_QOP, GSSException.FAILURE

      • wrap

        byte[] wrap(byte[] inBuf,
            int offset,
            int len,
            MessageProp msgProp)
     throws GSSException
        Applies per-message security services over the established security context. The method will return a token with the application supplied data and a cryptographic MIC over it. The data may be encrypted if confidentiality (privacy) was requested.

        The MessageProp object is instantiated by the application and used to specify a QOP value which selects cryptographic algorithms, and a privacy service to optionally encrypt the message. The underlying mechanism that is used in the call may not be able to provide the privacy service. It sets the actual privacy service that it does provide in this MessageProp object which the caller should then query upon return. If the mechanism is not able to provide the requested QOP, it throws a GSSException with the BAD_QOP code.

        Since some application-level protocols may wish to use tokens emitted by wrap to provide "secure framing", implementations should support the wrapping of zero-length messages.

        The application will be responsible for sending the token to the peer.

        Parameters:
        inBuf - application data to be protected.
        offset - the offset within the inBuf where the data begins.
        len - the length of the data
        msgProp - instance of MessageProp that is used by the application to set the desired QOP and privacy state. Set the desired QOP to 0 to request the default QOP. Upon return from this method, this object will contain the the actual privacy state that was applied to the message by the underlying mechanism.
        Returns:
        a byte[] containing the token to be sent to the peer.
        Throws:
        GSSException - containing the following major error codes: GSSException.CONTEXT_EXPIRED, GSSException.BAD_QOP, GSSException.FAILURE

      • wrap

        void wrap(InputStream inStream,
          OutputStream outStream,
          MessageProp msgProp)
   throws GSSException
        Applies per-message security services over the established security context using streams. The method will return a token with the application supplied data and a cryptographic MIC over it. The data may be encrypted if confidentiality (privacy) was requested. This method is equivalent to the byte array based wrap method.

        The application will be responsible for sending the token to the peer. Typically, the application would ensure this by calling the flush method on an OutputStream that encapsulates the connection between the two peers.

        The MessageProp object is instantiated by the application and used to specify a QOP value which selects cryptographic algorithms, and a privacy service to optionally encrypt the message. The underlying mechanism that is used in the call may not be able to provide the privacy service. It sets the actual privacy service that it does provide in this MessageProp object which the caller should then query upon return. If the mechanism is not able to provide the requested QOP, it throws a GSSException with the BAD_QOP code.

        Since some application-level protocols may wish to use tokens emitted by wrap to provide "secure framing", implementations should support the wrapping of zero-length messages.

        Parameters:
        inStream - an InputStream containing the application data to be protected. All of the data that is available in inStream is used.
        outStream - an OutputStream to write the protected message to.
        msgProp - instance of MessageProp that is used by the application to set the desired QOP and privacy state. Set the desired QOP to 0 to request the default QOP. Upon return from this method, this object will contain the the actual privacy state that was applied to the message by the underlying mechanism.
        Throws:
        GSSException - containing the following major error codes: GSSException.CONTEXT_EXPIRED, GSSException.BAD_QOP, GSSException.FAILURE

      • unwrap

        byte[] unwrap(byte[] inBuf,
              int offset,
              int len,
              MessageProp msgProp)
       throws GSSException
        Used to process tokens generated by the wrap method on the other side of the context. The method will return the message supplied by the peer application to its wrap call, while at the same time verifying the embedded MIC for that message.

        The MessageProp object is instantiated by the application and is used by the underlying mechanism to return information to the caller such as the QOP, whether confidentiality was applied to the message, and other supplementary message state information.

        Since some application-level protocols may wish to use tokens emitted by wrap to provide "secure framing", implementations should support the wrapping and unwrapping of zero-length messages.

        Parameters:
        inBuf - a byte array containing the wrap token received from peer.
        offset - the offset where the token begins.
        len - the length of the token
        msgProp - upon return from the method, this object will contain the applied QOP, the privacy state of the message, and supplementary information stating if the token was a duplicate, old, out of sequence or arriving after a gap.
        Returns:
        a byte[] containing the message unwrapped from the input token.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.CONTEXT_EXPIRED, GSSException.FAILURE

      • unwrap

        void unwrap(InputStream inStream,
            OutputStream outStream,
            MessageProp msgProp)
     throws GSSException
        Uses streams to process tokens generated by the wrap method on the other side of the context. The method will return the message supplied by the peer application to its wrap call, while at the same time verifying the embedded MIC for that message.

        The MessageProp object is instantiated by the application and is used by the underlying mechanism to return information to the caller such as the QOP, whether confidentiality was applied to the message, and other supplementary message state information.

        Since some application-level protocols may wish to use tokens emitted by wrap to provide "secure framing", implementations should support the wrapping and unwrapping of zero-length messages.

        The format of the input token that this method reads is defined in the specification for the underlying mechanism that will be used. This method will attempt to read one of these tokens per invocation. If the mechanism token contains a definitive start and end this method may block on the InputStream if only part of the token is available. If the start and end of the token are not definitive then the method will attempt to treat all available bytes as part of the token.

        Other than the possible blocking behavior described above, this method is equivalent to the byte array based unwrap method.

        Parameters:
        inStream - an InputStream that contains the wrap token generated by the peer.
        outStream - an OutputStream to write the application message to.
        msgProp - upon return from the method, this object will contain the applied QOP, the privacy state of the message, and supplementary information stating if the token was a duplicate, old, out of sequence or arriving after a gap.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN, GSSException.BAD_MIC, GSSException.CONTEXT_EXPIRED, GSSException.FAILURE

      • getMIC

        byte[] getMIC(byte[] inMsg,
              int offset,
              int len,
              MessageProp msgProp)
       throws GSSException
        Returns a token containing a cryptographic Message Integrity Code (MIC) for the supplied message, for transfer to the peer application. Unlike wrap, which encapsulates the user message in the returned token, only the message MIC is returned in the output token.

        Note that privacy can only be applied through the wrap call.

        Since some application-level protocols may wish to use tokens emitted by getMIC to provide "secure framing", implementations should support derivation of MICs from zero-length messages.

        Parameters:
        inMsg - the message to generate the MIC over.
        offset - offset within the inMsg where the message begins.
        len - the length of the message
        msgProp - an instance of MessageProp that is used by the application to set the desired QOP. Set the desired QOP to 0 in msgProp to request the default QOP. Alternatively pass in null for msgProp to request the default QOP.
        Returns:
        a byte[] containing the token to be sent to the peer.
        Throws:
        GSSException - containing the following major error codes: GSSException.CONTEXT_EXPIRED, GSSException.BAD_QOP, GSSException.FAILURE

      • getMIC

        void getMIC(InputStream inStream,
            OutputStream outStream,
            MessageProp msgProp)
     throws GSSException
        Uses streams to produce a token containing a cryptographic MIC for the supplied message, for transfer to the peer application. Unlike wrap, which encapsulates the user message in the returned token, only the message MIC is produced in the output token. This method is equivalent to the byte array based getMIC method. Note that privacy can only be applied through the wrap call.

        Since some application-level protocols may wish to use tokens emitted by getMIC to provide "secure framing", implementations should support derivation of MICs from zero-length messages.

        Parameters:
        inStream - an InputStream containing the message to generate the MIC over. All of the data that is available in inStream is used.
        outStream - an OutputStream to write the output token to.
        msgProp - an instance of MessageProp that is used by the application to set the desired QOP. Set the desired QOP to 0 in msgProp to request the default QOP. Alternatively pass in null for msgProp to request the default QOP.
        Throws:
        GSSException - containing the following major error codes: GSSException.CONTEXT_EXPIRED, GSSException.BAD_QOP, GSSException.FAILURE

      • verifyMIC

        void verifyMIC(byte[] inToken,
               int tokOffset,
               int tokLen,
               byte[] inMsg,
               int msgOffset,
               int msgLen,
               MessageProp msgProp)
        throws GSSException
        Verifies the cryptographic MIC, contained in the token parameter, over the supplied message.

        The MessageProp object is instantiated by the application and is used by the underlying mechanism to return information to the caller such as the QOP indicating the strength of protection that was applied to the message and other supplementary message state information.

        Since some application-level protocols may wish to use tokens emitted by getMIC to provide "secure framing", implementations should support the calculation and verification of MICs over zero-length messages.

        Parameters:
        inToken - the token generated by peer's getMIC method.
        tokOffset - the offset within the inToken where the token begins.
        tokLen - the length of the token.
        inMsg - the application message to verify the cryptographic MIC over.
        msgOffset - the offset in inMsg where the message begins.
        msgLen - the length of the message.
        msgProp - upon return from the method, this object will contain the applied QOP and supplementary information stating if the token was a duplicate, old, out of sequence or arriving after a gap.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN GSSException.BAD_MIC GSSException.CONTEXT_EXPIRED GSSException.FAILURE

      • verifyMIC

        void verifyMIC(InputStream tokStream,
               InputStream msgStream,
               MessageProp msgProp)
        throws GSSException
        Uses streams to verify the cryptographic MIC, contained in the token parameter, over the supplied message. This method is equivalent to the byte array based verifyMIC method. The MessageProp object is instantiated by the application and is used by the underlying mechanism to return information to the caller such as the QOP indicating the strength of protection that was applied to the message and other supplementary message state information.

        Since some application-level protocols may wish to use tokens emitted by getMIC to provide "secure framing", implementations should support the calculation and verification of MICs over zero-length messages.

        The format of the input token that this method reads is defined in the specification for the underlying mechanism that will be used. This method will attempt to read one of these tokens per invocation. If the mechanism token contains a definitive start and end this method may block on the InputStream if only part of the token is available. If the start and end of the token are not definitive then the method will attempt to treat all available bytes as part of the token.

        Other than the possible blocking behavior described above, this method is equivalent to the byte array based verifyMIC method.

        Parameters:
        tokStream - an InputStream containing the token generated by the peer's getMIC method.
        msgStream - an InputStream containing the application message to verify the cryptographic MIC over. All of the data that is available in msgStream is used.
        msgProp - upon return from the method, this object will contain the applied QOP and supplementary information stating if the token was a duplicate, old, out of sequence or arriving after a gap.
        Throws:
        GSSException - containing the following major error codes: GSSException.DEFECTIVE_TOKEN GSSException.BAD_MIC GSSException.CONTEXT_EXPIRED GSSException.FAILURE

      • export

        byte[] export()
       throws GSSException
        Exports this context so that another process may import it.. Provided to support the sharing of work between multiple processes. This routine will typically be used by the context-acceptor, in an application where a single process receives incoming connection requests and accepts security contexts over them, then passes the established context to one or more other processes for message exchange.

        This method deactivates the security context and creates an interprocess token which, when passed to GSSManager.createContext in another process, will re-activate the context in the second process. Only a single instantiation of a given context may be active at any one time; a subsequent attempt by a context exporter to access the exported security context will fail.

        The implementation may constrain the set of processes by which the interprocess token may be imported, either as a function of local security policy, or as a result of implementation decisions. For example, some implementations may constrain contexts to be passed only between processes that run under the same account, or which are part of the same process group.

        The interprocess token may contain security-sensitive information (for example cryptographic keys). While mechanisms are encouraged to either avoid placing such sensitive information within interprocess tokens, or to encrypt the token before returning it to the application, in a typical GSS-API implementation this may not be possible. Thus the application must take care to protect the interprocess token, and ensure that any process to which the token is transferred is trustworthy.

        Implementations are not required to support the inter-process transfer of security contexts. Calling the isTransferable method will indicate if the context object is transferable.

        Calling this method on a context that is not exportable will result in this exception being thrown with the error code GSSException.UNAVAILABLE.

        Returns:
        a byte[] containing the exported context
        Throws:
        GSSException - containing the following major error codes: GSSException.UNAVAILABLE, GSSException.CONTEXT_EXPIRED, GSSException.NO_CONTEXT, GSSException.FAILURE
        See Also:
        GSSManager.createContext(byte[])

      • requestMutualAuth

        void requestMutualAuth(boolean state)
                throws GSSException
        Requests that mutual authentication be done during context establishment. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext.

        Not all mechanisms support mutual authentication and some mechanisms might require mutual authentication even if the application doesn't. Therefore, the application should check to see if the request was honored with the getMutualAuthState method.

        Parameters:
        state - a boolean value indicating whether mutual authentication should be used or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getMutualAuthState()

      • requestReplayDet

        void requestReplayDet(boolean state)
               throws GSSException
        Requests that replay detection be enabled for the per-message security services after context establishment. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. During context establishment replay detection is not an option and is a function of the underlying mechanism's capabilities.

        Not all mechanisms support replay detection and some mechanisms might require replay detection even if the application doesn't. Therefore, the application should check to see if the request was honored with the getReplayDetState method. If replay detection is enabled then the MessageProp.isDuplicateToken and MessageProp.isOldToken methods will return valid results for the MessageProp object that is passed in to the unwrap method or the verifyMIC method.

        Parameters:
        state - a boolean value indicating whether replay detection should be enabled over the established context or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getReplayDetState()

      • requestSequenceDet

        void requestSequenceDet(boolean state)
                 throws GSSException
        Requests that sequence checking be enabled for the per-message security services after context establishment. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. During context establishment sequence checking is not an option and is a function of the underlying mechanism's capabilities.

        Not all mechanisms support sequence checking and some mechanisms might require sequence checking even if the application doesn't. Therefore, the application should check to see if the request was honored with the getSequenceDetState method. If sequence checking is enabled then the MessageProp.isDuplicateToken, MessageProp.isOldToken, MessageProp.isUnseqToken, and MessageProp.isGapToken methods will return valid results for the MessageProp object that is passed in to the unwrap method or the verifyMIC method.

        Parameters:
        state - a boolean value indicating whether sequence checking should be enabled over the established context or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getSequenceDetState()

      • requestCredDeleg

        void requestCredDeleg(boolean state)
               throws GSSException
        Requests that the initiator's credentials be delegated to the acceptor during context establishment. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. Not all mechanisms support credential delegation. Therefore, an application that desires delegation should check to see if the request was honored with the getCredDelegState method. If the application indicates that delegation must not be used, then the mechanism will honor the request and delegation will not occur. This is an exception to the general rule that a mechanism may enable a service even if it is not requested.

        Parameters:
        state - a boolean value indicating whether the credentials should be delegated or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getCredDelegState()

      • requestAnonymity

        void requestAnonymity(boolean state)
               throws GSSException
        Requests that the initiator's identity not be disclosed to the acceptor. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. Not all mechanisms support anonymity for the initiator. Therefore, the application should check to see if the request was honored with the getAnonymityState method.

        Parameters:
        state - a boolean value indicating if the initiator should be authenticated to the acceptor as an anonymous principal.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getAnonymityState()

      • requestConf

        void requestConf(boolean state)
          throws GSSException
        Requests that data confidentiality be enabled for the wrap method. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. Not all mechanisms support confidentiality and other mechanisms might enable it even if the application doesn't request it. The application may check to see if the request was honored with the getConfState method. If confidentiality is enabled, only then will the mechanism honor a request for privacy in the MessageProp object that is passed in to the wrap method.

        Enabling confidentiality will also automatically enable integrity.

        Parameters:
        state - a boolean value indicating whether confidentiality should be enabled or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getConfState(), getIntegState(), requestInteg(boolean), MessageProp

      • requestInteg

        void requestInteg(boolean state)
           throws GSSException
        Requests that data integrity be enabled for the wrap and getMICmethods. This request can only be made on the context initiator's side and it has to be done prior to the first call to initSecContext. Not all mechanisms support integrity and other mechanisms might enable it even if the application doesn't request it. The application may check to see if the request was honored with the getIntegState method.

        Disabling integrity will also automatically disable confidentiality.

        Parameters:
        state - a boolean value indicating whether integrity should be enabled or not.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getIntegState()

      • requestLifetime

        void requestLifetime(int lifetime)
              throws GSSException
        Requests a lifetime in seconds for the context. This method can only be called on the context initiator's side and it has to be done prior to the first call to initSecContext.

        The actual lifetime of the context will depend on the capabilities of the underlying mechanism and the application should call the getLifetime method to determine this.

        Parameters:
        lifetime - the desired context lifetime in seconds. Use INDEFINITE_LIFETIME to request an indefinite lifetime and DEFAULT_LIFETIME to request a default lifetime.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getLifetime()

      • setChannelBinding

        void setChannelBinding(ChannelBinding cb)
                throws GSSException
        Sets the channel bindings to be used during context establishment. This method can be called on both the context initiator's and the context acceptor's side, but it must be called before context establishment begins. This means that an initiator must call it before the first call to initSecContext and the acceptor must call it before the first call to acceptSecContext.
        Parameters:
        cb - the channel bindings to use.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getCredDelegState

        boolean getCredDelegState()
        Determines if credential delegation is enabled on this context. It can be called by both the context initiator and the context acceptor. For a definitive answer this method must be called only after context establishment is complete. Note that if an initiator requests that delegation not be allowed the requestCredDeleg method will honor that request and this method will return false on the initiator's side from that point onwards.

        Returns:
        true if delegation is enabled, false otherwise.
        See Also:
        requestCredDeleg(boolean)

      • getMutualAuthState

        boolean getMutualAuthState()
        Determines if mutual authentication is enabled on this context. It can be called by both the context initiator and the context acceptor. For a definitive answer this method must be called only after context establishment is complete. An initiator that requests mutual authentication can call this method after context completion and dispose the context if its request was not honored.

        Returns:
        true if mutual authentication is enabled, false otherwise.
        See Also:
        requestMutualAuth(boolean)

      • getReplayDetState

        boolean getReplayDetState()
        Determines if replay detection is enabled for the per-message security services from this context. It can be called by both the context initiator and the context acceptor. For a definitive answer this method must be called only after context establishment is complete. An initiator that requests replay detection can call this method after context completion and dispose the context if its request was not honored.

        Returns:
        true if replay detection is enabled, false otherwise.
        See Also:
        requestReplayDet(boolean)

      • getSequenceDetState

        boolean getSequenceDetState()
        Determines if sequence checking is enabled for the per-message security services from this context. It can be called by both the context initiator and the context acceptor. For a definitive answer this method must be called only after context establishment is complete. An initiator that requests sequence checking can call this method after context completion and dispose the context if its request was not honored.

        Returns:
        true if sequence checking is enabled, false otherwise.
        See Also:
        requestSequenceDet(boolean)

      • getAnonymityState

        boolean getAnonymityState()
        Determines if the context initiator is anonymously authenticated to the context acceptor. It can be called by both the context initiator and the context acceptor, and at any time. On the initiator side, a call to this method determines if the identity of the initiator has been disclosed in any of the context establishment tokens that might have been generated thus far by initSecContext. An initiator that absolutely must be authenticated anonymously should call this method after each call to initSecContext to determine if the generated token should be sent to the peer or the context aborted. On the acceptor side, a call to this method determines if any of the tokens processed by acceptSecContext thus far have divulged the identity of the initiator.

        Returns:
        true if the context initiator is still anonymous, false otherwise.
        See Also:
        requestAnonymity(boolean)

      • isTransferable

        boolean isTransferable()
                throws GSSException
        Determines if the context is transferable to other processes through the use of the export method. This call is only valid on fully established contexts.
        Returns:
        true if this context can be exported, false otherwise.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • isProtReady

        boolean isProtReady()
        Determines if the context is ready for per message operations to be used over it. Some mechanisms may allow the usage of the per-message operations before the context is fully established.
        Returns:
        true if methods like wrap, unwrap, getMIC, and verifyMIC can be used with this context at the current stage of context establishment, false otherwise.

      • getConfState

        boolean getConfState()
        Determines if data confidentiality is available over the context. This method can be called by both the context initiator and the context acceptor, but only after one of isProtReady or isEstablished return true. If this method returns true, so will getIntegState

        Returns:
        true if confidentiality services are available, false otherwise.
        See Also:
        requestConf(boolean)

      • getIntegState

        boolean getIntegState()
        Determines if data integrity is available over the context. This method can be called by both the context initiator and the context acceptor, but only after one of isProtReady or isEstablished return true. This method will always return true if getConfState returns true.

        Returns:
        true if integrity services are available, false otherwise.
        See Also:
        requestInteg(boolean)

      • getLifetime

        int getLifetime()
        Determines what the remaining lifetime for this context is. It can be called by both the context initiator and the context acceptor, but for a definitive answer it should be called only after isEstablished returns true.

        Returns:
        the remaining lifetime in seconds
        See Also:
        requestLifetime(int)

      • getSrcName

        GSSName getSrcName()
            throws GSSException
        Returns the name of the context initiator. This call is valid only after one of isProtReady or isEstablished return true.
        Returns:
        a GSSName that is an MN containing the name of the context initiator.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        GSSName

      • getTargName

        GSSName getTargName()
             throws GSSException
        Returns the name of the context acceptor. This call is valid only after one of isProtReady or isEstablished return true.
        Returns:
        a GSSName that is an MN containing the name of the context acceptor.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getMech

        Oid getMech()
     throws GSSException
        Determines what mechanism is being used for this context. This method may be called before the context is fully established, but the mechanism returned may change on successive calls in the negotiated mechanism case.
        Returns:
        the Oid of the mechanism being used
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getDelegCred

        GSSCredential getDelegCred()
                    throws GSSException
        Obtains the credentials delegated by the context initiator to the context acceptor. It should be called only on the context acceptor's side, and once the context is fully established. The caller can use the method getCredDelegState to determine if there are any delegated credentials.
        Returns:
        a GSSCredential containing the initiator's delegated credentials, or null is no credentials were delegated.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • isInitiator

        boolean isInitiator()
             throws GSSException
        Determines if this is the context initiator. This can be called on both the context initiator's and context acceptor's side.
        Returns:
        true if this is the context initiator, false if it is the context acceptor.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


GSSCredential

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Interface GSSCredential

  • All Superinterfaces:
    Cloneable

    public interface GSSCredential
extends Cloneable
    This interface encapsulates the GSS-API credentials for an entity. A credential contains all the necessary cryptographic information to enable the creation of a context on behalf of the entity that it represents. It may contain multiple, distinct, mechanism specific credential elements, each containing information for a specific security mechanism, but all referring to the same entity. A credential may be used to perform context initiation, acceptance, or both.

    Credentials are instantiated using one of the createCredential methods in the GSSManager class. GSS-API credential creation is not intended to provide a "login to the network" function, as such a function would involve the creation of new credentials rather than merely acquiring a handle to existing credentials. The section on credential acquisition in the package level description describes how existing credentials are acquired in the Java platform. GSS-API implementations must impose a local access-control policy on callers to prevent unauthorized callers from acquiring credentials to which they are not entitled.

    Applications will create a credential object passing the desired parameters. The application can then use the query methods to obtain specific information about the instantiated credential object. When the credential is no longer needed, the application should call the dispose method to release any resources held by the credential object and to destroy any cryptographically sensitive information.

    This example code demonstrates the creation of a GSSCredential implementation for a specific entity, querying of its fields, and its release when it is no longer needed:

        GSSManager manager = GSSManager.getInstance();

    // start by creating a name object for the entity
    GSSName name = manager.createName("myusername", GSSName.NT_USER_NAME);

    // now acquire credentials for the entity
    GSSCredential cred = manager.createCredential(name,
                    GSSCredential.ACCEPT_ONLY);

    // display credential information - name, remaining lifetime,
    // and the mechanisms it has been acquired over
    System.out.println(cred.getName().toString());
    System.out.println(cred.getRemainingLifetime());

    Oid [] mechs = cred.getMechs();
    if (mechs != null) {
            for (int i = 0; i < mechs.length; i++)
                    System.out.println(mechs[i].toString());
    }

    // release system resources held by the credential
    cred.dispose();
    Since:
    1.4
    See Also:
    GSSManager.createCredential(int),
GSSManager.createCredential(GSSName, int, Oid, int),
GSSManager.createCredential(GSSName, int, Oid[], int),
dispose()

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int ACCEPT_ONLY
      Credential usage flag requesting that it be usable for context acceptance only.
      static int DEFAULT_LIFETIME
      A lifetime constant representing the default credential lifetime.
      static int INDEFINITE_LIFETIME
      A lifetime constant representing indefinite credential lifetime.
      static int INITIATE_AND_ACCEPT
      Credential usage flag requesting that it be usable for both context initiation and acceptance.
      static int INITIATE_ONLY
      Credential usage flag requesting that it be usable for context initiation only.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
      Adds a mechanism specific credential-element to an existing credential.
      void dispose()
      Releases any sensitive information that the GSSCredential object may be containing.
      boolean equals(Object another)
      Tests if this GSSCredential asserts the same entity as the supplied object.
      Oid[] getMechs()
      Returns a list of mechanisms supported by this credential.
      GSSName getName()
      Retrieves the name of the entity that the credential asserts.
      GSSName getName(Oid mech)
      Retrieves a Mechanism Name of the entity that the credential asserts.
      int getRemainingAcceptLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of accepting security contexts using the specified mechanism.
      int getRemainingInitLifetime(Oid mech)
      Returns the lifetime in seconds for the credential to remain capable of initiating security contexts using the specified mechanism.
      int getRemainingLifetime()
      Returns the remaining lifetime in seconds for a credential.
      int getUsage()
      Returns the credential usage mode.
      int getUsage(Oid mech)
      Returns the credential usage mode for a specific mechanism.
      int hashCode()
      Returns a hashcode value for this GSSCredential.

    • Field Detail

      • INITIATE_AND_ACCEPT

        static final int INITIATE_AND_ACCEPT
        Credential usage flag requesting that it be usable for both context initiation and acceptance.
        See Also:
        Constant Field Values

      • INITIATE_ONLY

        static final int INITIATE_ONLY
        Credential usage flag requesting that it be usable for context initiation only.
        See Also:
        Constant Field Values

      • ACCEPT_ONLY

        static final int ACCEPT_ONLY
        Credential usage flag requesting that it be usable for context acceptance only.
        See Also:
        Constant Field Values

      • DEFAULT_LIFETIME

        static final int DEFAULT_LIFETIME
        A lifetime constant representing the default credential lifetime. This value it set to 0.
        See Also:
        Constant Field Values

      • INDEFINITE_LIFETIME

        static final int INDEFINITE_LIFETIME
        A lifetime constant representing indefinite credential lifetime. This value must is set to the maximum integer value in Java - Integer.MAX_VALUE.
        See Also:
        Constant Field Values

    • Method Detail

      • dispose

        void dispose()
      throws GSSException
        Releases any sensitive information that the GSSCredential object may be containing. Applications should call this method as soon as the credential is no longer needed to minimize the time any sensitive information is maintained.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getName

        GSSName getName()
         throws GSSException
        Retrieves the name of the entity that the credential asserts.
        Returns:
        a GSSName representing the entity
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getName

        GSSName getName(Oid mech)
         throws GSSException
        Retrieves a Mechanism Name of the entity that the credential asserts. This is equivalent to calling canonicalize on the value returned by the other form of getName.
        Parameters:
        mech - the Oid of the mechanism for which the Mechanism Name should be returned.
        Returns:
        a GSSName representing the entity canonicalized for the desired mechanism
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.FAILURE

      • getRemainingLifetime

        int getRemainingLifetime()
                  throws GSSException
        Returns the remaining lifetime in seconds for a credential. The remaining lifetime is the minimum lifetime amongst all of the underlying mechanism specific credential elements.
        Returns:
        the minimum remaining lifetime in seconds for this credential. A return value of INDEFINITE_LIFETIME indicates that the credential does not expire. A return value of 0 indicates that the credential is already expired.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE
        See Also:
        getRemainingInitLifetime(Oid), getRemainingAcceptLifetime(Oid)

      • getRemainingInitLifetime

        int getRemainingInitLifetime(Oid mech)
                      throws GSSException
        Returns the lifetime in seconds for the credential to remain capable of initiating security contexts using the specified mechanism. This method queries the initiator credential element that belongs to the specified mechanism.
        Parameters:
        mech - the Oid of the mechanism whose initiator credential element should be queried.
        Returns:
        the number of seconds remaining in the life of this credential element. A return value of INDEFINITE_LIFETIME indicates that the credential element does not expire. A return value of 0 indicates that the credential element is already expired.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.FAILURE

      • getRemainingAcceptLifetime

        int getRemainingAcceptLifetime(Oid mech)
                        throws GSSException
        Returns the lifetime in seconds for the credential to remain capable of accepting security contexts using the specified mechanism. This method queries the acceptor credential element that belongs to the specified mechanism.
        Parameters:
        mech - the Oid of the mechanism whose acceptor credential element should be queried.
        Returns:
        the number of seconds remaining in the life of this credential element. A return value of INDEFINITE_LIFETIME indicates that the credential element does not expire. A return value of 0 indicates that the credential element is already expired.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.FAILURE

      • getUsage

        int getUsage()
      throws GSSException
        Returns the credential usage mode. In other words, it tells us if this credential can be used for initiating or accepting security contexts. It does not tell us which mechanism(s) has to be used in order to do so. It is expected that an application will allow the GSS-API to pick a default mechanism after calling this method.
        Returns:
        The return value will be one of INITIATE_ONLY, ACCEPT_ONLY, and INITIATE_AND_ACCEPT.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • getUsage

        int getUsage(Oid mech)
      throws GSSException
        Returns the credential usage mode for a specific mechanism. In other words, it tells us if this credential can be used for initiating or accepting security contexts with a given underlying mechanism.
        Parameters:
        mech - the Oid of the mechanism whose credentials usage mode is to be determined.
        Returns:
        The return value will be one of INITIATE_ONLY, ACCEPT_ONLY, and INITIATE_AND_ACCEPT.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.FAILURE

      • getMechs

        Oid[] getMechs()
        throws GSSException
        Returns a list of mechanisms supported by this credential. It does not tell us which ones can be used to initiate contexts and which ones can be used to accept contexts. The application must call the getUsage method with each of the returned Oid's to determine the possible modes of usage.
        Returns:
        an array of Oid's corresponding to the supported mechanisms.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • add

        void add(GSSName name,
         int initLifetime,
         int acceptLifetime,
         Oid mech,
         int usage)
  throws GSSException
        Adds a mechanism specific credential-element to an existing credential. This method allows the construction of credentials, one mechanism at a time.

        This routine is envisioned to be used mainly by context acceptors during the creation of acceptor credentials which are to be used with a variety of clients using different security mechanisms.

        This routine adds the new credential element "in-place". To add the element in a new credential, first call clone to obtain a copy of this credential, then call its add method.

        As always, GSS-API implementations must impose a local access-control policy on callers to prevent unauthorized callers from acquiring credentials to which they are not entitled. Non-default values for initLifetime and acceptLifetime cannot always be honored by the underlying mechanisms, thus callers should be prepared to call getRemainingInitLifetime and getRemainingAcceptLifetime on the credential.

        Parameters:
        name - the name of the principal for whom this credential is to be acquired. Use null to specify the default principal.
        initLifetime - the number of seconds that the credential element should remain valid for initiating of security contexts. Use GSSCredential.INDEFINITE_LIFETIME to request that the credentials have the maximum permitted lifetime for this. Use GSSCredential.DEFAULT_LIFETIME to request default credential lifetime for this.
        acceptLifetime - the number of seconds that the credential element should remain valid for accepting security contexts. Use GSSCredential.INDEFINITE_LIFETIME to request that the credentials have the maximum permitted lifetime for this. Use GSSCredential.DEFAULT_LIFETIME to request default credential lifetime for this.
        mech - the mechanism over which the credential is to be acquired.
        usage - the usage mode that this credential element should add to the credential. The value of this parameter must be one of: INITIATE_AND_ACCEPT, ACCEPT_ONLY, and INITIATE_ONLY.
        Throws:
        GSSException - containing the following major error codes: GSSException.DUPLICATE_ELEMENT, GSSException.BAD_MECH, GSSException.BAD_NAMETYPE, GSSException.NO_CRED, GSSException.CREDENTIALS_EXPIRED, GSSException.FAILURE

      • equals

        boolean equals(Object another)
        Tests if this GSSCredential asserts the same entity as the supplied object. The two credentials must be acquired over the same mechanisms and must refer to the same principal.
        Overrides:
        equals in class Object
        Parameters:
        another - another GSSCredential for comparison to this one
        Returns:
        true if the two GSSCredentials assert the same entity; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns a hashcode value for this GSSCredential.
        Overrides:
        hashCode in class Object
        Returns:
        a hashCode value
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


GSSException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Class GSSException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.ietf.jgss.GSSException
  • All Implemented Interfaces:
    Serializable

    public class GSSException
extends Exception
    This exception is thrown whenever a GSS-API error occurs, including any mechanism specific error. It may contain both the major and the minor GSS-API status codes. Major error codes are those defined at the GSS-API level in this class. Minor error codes are mechanism specific error codes that can provide additional information. The underlying mechanism implementation is responsible for setting appropriate minor status codes when throwing this exception. Aside from delivering the numeric error codes to the caller, this class performs the mapping from their numeric values to textual representations.

    Since:
    1.4
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int BAD_BINDINGS
      Channel bindings mismatch.
      static int BAD_MECH
      Unsupported mechanism requested.
      static int BAD_MIC
      Token had invalid integrity check.
      static int BAD_NAME
      Invalid name provided.
      static int BAD_NAMETYPE
      Name of unsupported type provided.
      static int BAD_QOP
      Unsupported QOP value.
      static int BAD_STATUS
      Invalid status code.
      static int CONTEXT_EXPIRED
      Security context expired.
      static int CREDENTIALS_EXPIRED
      Expired credentials.
      static int DEFECTIVE_CREDENTIAL
      Defective credentials.
      static int DEFECTIVE_TOKEN
      Defective token.
      static int DUPLICATE_ELEMENT
      Duplicate credential element requested.
      static int DUPLICATE_TOKEN
      The token was a duplicate of an earlier token.
      static int FAILURE
      General failure, unspecified at GSS-API level.
      static int GAP_TOKEN
      An expected per-message token was not received.
      static int NAME_NOT_MN
      Name contains multi-mechanism elements.
      static int NO_CONTEXT
      Invalid security context.
      static int NO_CRED
      Invalid credentials.
      static int OLD_TOKEN
      The token's validity period has expired.
      static int UNAUTHORIZED
      Operation unauthorized.
      static int UNAVAILABLE
      Operation unavailable.
      static int UNSEQ_TOKEN
      A later token has already been processed.

    • Constructor Summary

      Constructors
      Constructor and Description
      GSSException(int majorCode)
      Creates a GSSException object with a specified major code.
      GSSException(int majorCode, int minorCode, String minorString)
      Creates a GSSException object with the specified major code, minor code, and minor code textual explanation.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getMajor()
      Returns the GSS-API level major error code for the problem causing this exception to be thrown.
      String getMajorString()
      Returns a string explaining the GSS-API level major error code in this exception.
      String getMessage()
      Returns a textual representation of both the major and the minor status codes.
      int getMinor()
      Returns the mechanism level error code for the problem causing this exception to be thrown.
      String getMinorString()
      Returns a string explaining the mechanism specific error code.
      void setMinor(int minorCode, String message)
      Used by the exception thrower to set the mechanism level minor error code and its string explanation.
      String toString()
      Returns a textual representation of both the major and the minor status codes.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • BAD_BINDINGS

        public static final int BAD_BINDINGS
        Channel bindings mismatch.
        See Also:
        Constant Field Values

      • BAD_MECH

        public static final int BAD_MECH
        Unsupported mechanism requested.
        See Also:
        Constant Field Values

      • BAD_NAME

        public static final int BAD_NAME
        Invalid name provided.
        See Also:
        Constant Field Values

      • BAD_NAMETYPE

        public static final int BAD_NAMETYPE
        Name of unsupported type provided.
        See Also:
        Constant Field Values

      • BAD_STATUS

        public static final int BAD_STATUS
        Invalid status code.
        See Also:
        Constant Field Values

      • BAD_MIC

        public static final int BAD_MIC
        Token had invalid integrity check.
        See Also:
        Constant Field Values

      • CONTEXT_EXPIRED

        public static final int CONTEXT_EXPIRED
        Security context expired.
        See Also:
        Constant Field Values

      • CREDENTIALS_EXPIRED

        public static final int CREDENTIALS_EXPIRED
        Expired credentials.
        See Also:
        Constant Field Values

      • DEFECTIVE_CREDENTIAL

        public static final int DEFECTIVE_CREDENTIAL
        Defective credentials.
        See Also:
        Constant Field Values

      • DEFECTIVE_TOKEN

        public static final int DEFECTIVE_TOKEN
        Defective token.
        See Also:
        Constant Field Values

      • FAILURE

        public static final int FAILURE
        General failure, unspecified at GSS-API level.
        See Also:
        Constant Field Values

      • NO_CONTEXT

        public static final int NO_CONTEXT
        Invalid security context.
        See Also:
        Constant Field Values

      • NO_CRED

        public static final int NO_CRED
        Invalid credentials.
        See Also:
        Constant Field Values

      • BAD_QOP

        public static final int BAD_QOP
        Unsupported QOP value.
        See Also:
        Constant Field Values

      • UNAUTHORIZED

        public static final int UNAUTHORIZED
        Operation unauthorized.
        See Also:
        Constant Field Values

      • UNAVAILABLE

        public static final int UNAVAILABLE
        Operation unavailable.
        See Also:
        Constant Field Values

      • DUPLICATE_ELEMENT

        public static final int DUPLICATE_ELEMENT
        Duplicate credential element requested.
        See Also:
        Constant Field Values

      • NAME_NOT_MN

        public static final int NAME_NOT_MN
        Name contains multi-mechanism elements.
        See Also:
        Constant Field Values

      • DUPLICATE_TOKEN

        public static final int DUPLICATE_TOKEN
        The token was a duplicate of an earlier token. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.
        See Also:
        Constant Field Values

      • OLD_TOKEN

        public static final int OLD_TOKEN
        The token's validity period has expired. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.
        See Also:
        Constant Field Values

      • UNSEQ_TOKEN

        public static final int UNSEQ_TOKEN
        A later token has already been processed. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.
        See Also:
        Constant Field Values

      • GAP_TOKEN

        public static final int GAP_TOKEN
        An expected per-message token was not received. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.
        See Also:
        Constant Field Values

    • Constructor Detail

      • GSSException

        public GSSException(int majorCode)
        Creates a GSSException object with a specified major code.
        Parameters:
        majorCode - the The GSS error code for the problem causing this exception to be thrown.

      • GSSException

        public GSSException(int majorCode,
                    int minorCode,
                    String minorString)
        Creates a GSSException object with the specified major code, minor code, and minor code textual explanation. This constructor is to be used when the exception is originating from the underlying mechanism level. It allows the setting of both the GSS code and the mechanism code.
        Parameters:
        majorCode - the GSS error code for the problem causing this exception to be thrown.
        minorCode - the mechanism level error code for the problem causing this exception to be thrown.
        minorString - the textual explanation of the mechanism error code.

    • Method Detail

      • getMajor

        public int getMajor()
        Returns the GSS-API level major error code for the problem causing this exception to be thrown. Major error codes are defined at the mechanism independent GSS-API level in this class. Mechanism specific error codes that might provide more information are set as the minor error code.
        Returns:
        int the GSS-API level major error code causing this exception
        See Also:
        getMajorString(),
getMinor(),
getMinorString()

      • getMinor

        public int getMinor()
        Returns the mechanism level error code for the problem causing this exception to be thrown. The minor code is set by the underlying mechanism.
        Returns:
        int the mechanism error code; 0 indicates that it has not been set.
        See Also:
        getMinorString(), setMinor(int, java.lang.String)

      • getMajorString

        public String getMajorString()
        Returns a string explaining the GSS-API level major error code in this exception.
        Returns:
        String explanation string for the major error code
        See Also:
        getMajor(), toString()

      • getMinorString

        public String getMinorString()
        Returns a string explaining the mechanism specific error code. If the minor status code is 0, then no mechanism level error details will be available.
        Returns:
        String a textual explanation of mechanism error code
        See Also:
        getMinor(),
getMajorString(),
toString()

      • setMinor

        public void setMinor(int minorCode,
                     String message)
        Used by the exception thrower to set the mechanism level minor error code and its string explanation. This is used by mechanism providers to indicate error details.
        Parameters:
        minorCode - the mechanism specific error code
        message - textual explanation of the mechanism error code
        See Also:
        getMinor()

      • toString

        public String toString()
        Returns a textual representation of both the major and the minor status codes.
        Overrides:
        toString in class Throwable
        Returns:
        a String with the error descriptions

      • getMessage

        public String getMessage()
        Returns a textual representation of both the major and the minor status codes.
        Overrides:
        getMessage in class Throwable
        Returns:
        a String with the error descriptions
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


GSSManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Class GSSManager

  • java.lang.Object
    • org.ietf.jgss.GSSManager

  • public abstract class GSSManager
extends Object
    This class serves as a factory for other important GSS-API classes and also provides information about the mechanisms that are supported. It can create instances of classes implementing the following three GSS-API interfaces: GSSName, GSSCredential, and GSSContext. It also has methods to query for the list of available mechanisms and the nametypes that each mechanism supports.

    An instance of the default GSSManager subclass may be obtained through the static method getInstance, but applications are free to instantiate other subclasses of GSSManager. The default GSSManager instance will support the Kerberos v5 GSS-API mechanism in addition to any others. This mechanism is identified by the Oid "1.2.840.113554.1.2.2" and is defined in RFC 1964.

    A subclass extending the GSSManager abstract class may be implemented as a modular provider based layer that utilizes some well known service provider specification. The GSSManager API allows the application to set provider preferences on such an implementation. These methods also allow the implementation to throw a well-defined exception in case provider based configuration is not supported. Applications that expect to be portable should be aware of this and recover cleanly by catching the exception.

    It is envisioned that there will be three most common ways in which providers will be used:

    1. The application does not care about what provider is used (the default case).
    2. The application wants a particular provider to be used preferentially, either for a particular mechanism or all the time, irrespective of mechanism.
    3. The application wants to use the locally configured providers as far as possible but if support is missing for one or more mechanisms then it wants to fall back on its own provider.

    The GSSManager class has two methods that enable these modes of usage: addProviderAtFront and addProviderAtEnd. These methods have the effect of creating an ordered list of <provider, oid> pairs where each pair indicates a preference of provider for a given oid.

    It is important to note that there are certain interactions between the different GSS-API objects that are created by a GSSManager, where the provider that is used for a particular mechanism might need to be consistent across all objects. For instance, if a GSSCredential contains elements from a provider p for a mechanism m, it should generally be passed in to a GSSContext that will use provider p for the mechanism m. A simple rule of thumb that will maximize portability is that objects created from different GSSManager's should not be mixed, and if possible, a different GSSManager instance should be created if the application wants to invoke the addProviderAtFront method on a GSSManager that has already created an object.

    Here is some sample code showing how the GSSManager might be used:

         GSSManager manager = GSSManager.getInstance();

     Oid krb5Mechanism = new Oid("1.2.840.113554.1.2.2");
     Oid krb5PrincipalNameType = new Oid("1.2.840.113554.1.2.2.1");

     // Identify who the client wishes to be
     GSSName userName = manager.createName("duke", GSSName.NT_USER_NAME);

     // Identify the name of the server. This uses a Kerberos specific
     // name format.
     GSSName serverName = manager.createName("nfs/foo.sun.com",
                                             krb5PrincipalNameType);

     // Acquire credentials for the user
     GSSCredential userCreds = manager.createCredential(userName,
                                             GSSCredential.DEFAULT_LIFETIME,
                                             krb5Mechanism,
                                             GSSCredential.INITIATE_ONLY);

     // Instantiate and initialize a security context that will be
     // established with the server
     GSSContext context = manager.createContext(serverName,
                                                krb5Mechanism,
                                                userCreds,
                                                GSSContext.DEFAULT_LIFETIME);

    The server side might use the following variation of this source:

         // Acquire credentials for the server
     GSSCredential serverCreds = manager.createCredential(serverName,
                                             GSSCredential.DEFAULT_LIFETIME,
                                             krb5Mechanism,
                                             GSSCredential.ACCEPT_ONLY);

     // Instantiate and initialize a security context that will
     // wait for an establishment request token from the client
     GSSContext context = manager.createContext(serverCreds);
    Since:
    1.4
    See Also:
    GSSName, GSSCredential, GSSContext

    • Constructor Summary

      Constructors
      Constructor and Description
      GSSManager()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void addProviderAtEnd(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism.
      abstract void addProviderAtFront(Provider p, Oid mech)
      This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism.
      abstract GSSContext createContext(byte[] interProcessToken)
      Factory method for creating a previously exported context.
      abstract GSSContext createContext(GSSCredential myCred)
      Factory method for creating a context on the acceptor' side.
      abstract GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
      Factory method for creating a context on the initiator's side.
      abstract GSSCredential createCredential(GSSName name, int lifetime, Oid[] mechs, int usage)
      Factory method for acquiring credentials over a set of mechanisms.
      abstract GSSCredential createCredential(GSSName name, int lifetime, Oid mech, int usage)
      Factory method for acquiring a single mechanism credential.
      abstract GSSCredential createCredential(int usage)
      Factory method for acquiring default credentials.
      abstract GSSName createName(byte[] name, Oid nameType)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object.
      abstract GSSName createName(byte[] name, Oid nameType, Oid mech)
      Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      abstract GSSName createName(String nameStr, Oid nameType)
      Factory method to convert a string name from the specified namespace to a GSSName object.
      abstract GSSName createName(String nameStr, Oid nameType, Oid mech)
      Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism.
      static GSSManager getInstance()
      Returns the default GSSManager implementation.
      abstract Oid[] getMechs()
      Returns a list of mechanisms that are available to GSS-API callers through this GSSManager.
      abstract Oid[] getMechsForName(Oid nameType)
      Returns a list of mechanisms that support the indicated name type.
      abstract Oid[] getNamesForMech(Oid mech)
      Returns then name types supported by the indicated mechanism.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • GSSManager

        public GSSManager()

    • Method Detail

      • getInstance

        public static GSSManager getInstance()
        Returns the default GSSManager implementation.
        Returns:
        a GSSManager implementation

      • getMechs

        public abstract Oid[] getMechs()
        Returns a list of mechanisms that are available to GSS-API callers through this GSSManager. The default GSSManager obtained from the getInstance() method includes the Oid "1.2.840.113554.1.2.2" in its list. This Oid identifies the Kerberos v5 GSS-API mechanism that is defined in RFC 1964.
        Returns:
        an array of Oid objects corresponding to the mechanisms that are available. A null value is returned when no mechanism are available (an example of this would be when mechanism are dynamically configured, and currently no mechanisms are installed).

      • getNamesForMech

        public abstract Oid[] getNamesForMech(Oid mech)
                               throws GSSException
        Returns then name types supported by the indicated mechanism.

        The default GSSManager instance includes support for the Kerberos v5 mechanism. When this mechanism ("1.2.840.113554.1.2.2") is indicated, the returned list will contain at least the following nametypes: GSSName.NT_HOSTBASED_SERVICE, GSSName.NT_EXPORT_NAME, and the Kerberos v5 specific Oid "1.2.840.113554.1.2.2.1". The namespace for the Oid "1.2.840.113554.1.2.2.1" is defined in RFC 1964.

        Parameters:
        mech - the Oid of the mechanism to query
        Returns:
        an array of Oid objects corresponding to the name types that the mechanism supports.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH GSSException.FAILURE
        See Also:
        getMechsForName(Oid)

      • getMechsForName

        public abstract Oid[] getMechsForName(Oid nameType)
        Returns a list of mechanisms that support the indicated name type.

        The Kerberos v5 mechanism ("1.2.840.113554.1.2.2") will always be returned in this list when the indicated nametype is one of GSSName.NT_HOSTBASED_SERVICE, GSSName.NT_EXPORT_NAME, or "1.2.840.113554.1.2.2.1".

        Parameters:
        nameType - the Oid of the name type to look for
        Returns:
        an array of Oid objects corresponding to the mechanisms that support the specified name type. null is returned when no mechanisms are found to support the specified name type.
        See Also:
        getNamesForMech(Oid)

      • createName

        public abstract GSSName createName(String nameStr,
                                   Oid nameType)
                            throws GSSException
        Factory method to convert a string name from the specified namespace to a GSSName object. In general, the GSSName object created will contain multiple representations of the name, one for each mechanism that is supported; two examples that are exceptions to this are when the namespace type parameter indicates NT_EXPORT_NAME or when the GSS-API implementation is not multi-mechanism. It is not recommended to use this method with a NT_EXPORT_NAME type because representing a previously exported name consisting of arbitrary bytes as a String might cause problems with character encoding schemes. In such cases it is recommended that the bytes be passed in directly to the overloaded form of this method createName.
        Parameters:
        nameStr - the string representing a printable form of the name to create.
        nameType - the Oid specifying the namespace of the printable name supplied. null can be used to specify that a mechanism specific default printable syntax should be assumed by each mechanism that examines nameStr. It is not advisable to use the nametype NT_EXPORT_NAME with this method.
        Returns:
        a GSSName representing the indicated principal
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.BAD_MECH, GSSException.FAILURE
        See Also:
        GSSName, GSSName.NT_EXPORT_NAME

      • createName

        public abstract GSSName createName(byte[] name,
                                   Oid nameType)
                            throws GSSException
        Factory method to convert a byte array containing a name from the specified namespace to a GSSName object. In general, the GSSName object created will contain multiple representations of the name, one for each mechanism that is supported; two examples that are exceptions to this are when the namespace type parameter indicates NT_EXPORT_NAME or when the GSS-API implementation is not multi-mechanism. The bytes that are passed in are interpreted by each underlying mechanism according to some encoding scheme of its choice for the given nametype.
        Parameters:
        name - the byte array containing the name to create
        nameType - the Oid specifying the namespace of the name supplied in the byte array. null can be used to specify that a mechanism specific default syntax should be assumed by each mechanism that examines the byte array.
        Returns:
        a GSSName representing the indicated principal
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.BAD_MECH, GSSException.FAILURE
        See Also:
        GSSName, GSSName.NT_EXPORT_NAME

      • createName

        public abstract GSSName createName(String nameStr,
                                   Oid nameType,
                                   Oid mech)
                            throws GSSException
        Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism. In other words, this method is a utility that does the equivalent of two steps: the createName and then also the GSSName.canonicalize.
        Parameters:
        nameStr - the string representing a printable form of the name to create.
        nameType - the Oid specifying the namespace of the printable name supplied. null can be used to specify that a mechanism specific default printable syntax should be assumed by each mechanism that examines nameStr. It is not advisable to use the nametype NT_EXPORT_NAME with this method.
        mech - Oid specifying the mechanism for which the name should be canonicalized
        Returns:
        a GSSName representing the indicated principal
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.BAD_MECH, GSSException.FAILURE
        See Also:
        GSSName.canonicalize(Oid), GSSName.NT_EXPORT_NAME

      • createName

        public abstract GSSName createName(byte[] name,
                                   Oid nameType,
                                   Oid mech)
                            throws GSSException
        Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism. In other words, this method is a utility that does the equivalent of two steps: the createName and then also GSSName.canonicalize.
        Parameters:
        name - the byte array containing the name to create
        nameType - the Oid specifying the namespace of the name supplied in the byte array. null can be used to specify that a mechanism specific default syntax should be assumed by each mechanism that examines the byte array.
        mech - Oid specifying the mechanism for which the name should be canonicalized
        Returns:
        a GSSName representing the indicated principal
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.BAD_MECH, GSSException.FAILURE
        See Also:
        GSSName.canonicalize(Oid), GSSName.NT_EXPORT_NAME

      • createCredential

        public abstract GSSCredential createCredential(int usage)
                                        throws GSSException
        Factory method for acquiring default credentials. This will cause the GSS-API to use system specific defaults for the set of mechanisms, name, and lifetime.

        GSS-API mechanism providers must impose a local access-control policy on callers to prevent unauthorized callers from acquiring credentials to which they are not entitled. The kinds of permissions needed by different mechanism providers will be documented on a per-mechanism basis. A failed permission check might cause a SecurityException to be thrown from this method.

        Parameters:
        usage - The intended usage for this credential object. The value of this parameter must be one of: GSSCredential.INITIATE_AND_ACCEPT, GSSCredential.ACCEPT_ONLY, and GSSCredential.INITIATE_ONLY.
        Returns:
        a GSSCredential of the requested type.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.CREDENTIALS_EXPIRED, GSSException.NO_CRED, GSSException.FAILURE
        See Also:
        GSSCredential

      • createCredential

        public abstract GSSCredential createCredential(GSSName name,
                                               int lifetime,
                                               Oid mech,
                                               int usage)
                                        throws GSSException
        Factory method for acquiring a single mechanism credential.

        GSS-API mechanism providers must impose a local access-control policy on callers to prevent unauthorized callers from acquiring credentials to which they are not entitled. The kinds of permissions needed by different mechanism providers will be documented on a per-mechanism basis. A failed permission check might cause a SecurityException to be thrown from this method.

        Non-default values for lifetime cannot always be honored by the underlying mechanisms, thus applications should be prepared to call getRemainingLifetime on the returned credential.

        Parameters:
        name - the name of the principal for whom this credential is to be acquired. Use null to specify the default principal.
        lifetime - The number of seconds that credentials should remain valid. Use GSSCredential.INDEFINITE_LIFETIME to request that the credentials have the maximum permitted lifetime. Use GSSCredential.DEFAULT_LIFETIME to request default credential lifetime.
        mech - the Oid of the desired mechanism. Use (Oid) null to request the default mechanism.
        usage - The intended usage for this credential object. The value of this parameter must be one of: GSSCredential.INITIATE_AND_ACCEPT, GSSCredential.ACCEPT_ONLY, and GSSCredential.INITIATE_ONLY.
        Returns:
        a GSSCredential of the requested type.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.CREDENTIALS_EXPIRED, GSSException.NO_CRED, GSSException.FAILURE
        See Also:
        GSSCredential

      • createCredential

        public abstract GSSCredential createCredential(GSSName name,
                                               int lifetime,
                                               Oid[] mechs,
                                               int usage)
                                        throws GSSException
        Factory method for acquiring credentials over a set of mechanisms. This method attempts to acquire credentials for each of the mechanisms specified in the array called mechs. To determine the list of mechanisms for which the acquisition of credentials succeeded, the caller should use the GSSCredential.getMechs method.

        GSS-API mechanism providers must impose a local access-control policy on callers to prevent unauthorized callers from acquiring credentials to which they are not entitled. The kinds of permissions needed by different mechanism providers will be documented on a per-mechanism basis. A failed permission check might cause a SecurityException to be thrown from this method.

        Non-default values for lifetime cannot always be honored by the underlying mechanisms, thus applications should be prepared to call getRemainingLifetime on the returned credential.

        Parameters:
        name - the name of the principal for whom this credential is to be acquired. Use null to specify the default principal.
        lifetime - The number of seconds that credentials should remain valid. Use GSSCredential.INDEFINITE_LIFETIME to request that the credentials have the maximum permitted lifetime. Use GSSCredential.DEFAULT_LIFETIME to request default credential lifetime.
        mechs - an array of Oid's indicating the mechanisms over which the credential is to be acquired. Use (Oid[]) null for requesting a system specific default set of mechanisms.
        usage - The intended usage for this credential object. The value of this parameter must be one of: GSSCredential.INITIATE_AND_ACCEPT, GSSCredential.ACCEPT_ONLY, and GSSCredential.INITIATE_ONLY.
        Returns:
        a GSSCredential of the requested type.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.CREDENTIALS_EXPIRED, GSSException.NO_CRED, GSSException.FAILURE
        See Also:
        GSSCredential

      • createContext

        public abstract GSSContext createContext(GSSName peer,
                                         Oid mech,
                                         GSSCredential myCred,
                                         int lifetime)
                                  throws GSSException
        Factory method for creating a context on the initiator's side. Some mechanism providers might require that the caller be granted permission to initiate a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        Non-default values for lifetime cannot always be honored by the underlying mechanism, thus applications should be prepared to call getLifetime on the returned context.

        Parameters:
        peer - the name of the target peer.
        mech - the Oid of the desired mechanism. Use null to request the default mechanism.
        myCred - the credentials of the initiator. Use null to act as the default initiator principal.
        lifetime - the lifetime, in seconds, requested for the context. Use GSSContext.INDEFINITE_LIFETIME to request that the context have the maximum permitted lifetime. Use GSSContext.DEFAULT_LIFETIME to request a default lifetime for the context.
        Returns:
        an unestablished GSSContext
        Throws:
        GSSException - containing the following major error codes: GSSException.NO_CRED GSSException.CREDENTIALS_EXPIRED GSSException.BAD_NAMETYPE GSSException.BAD_MECH GSSException.FAILURE
        See Also:
        GSSContext

      • createContext

        public abstract GSSContext createContext(GSSCredential myCred)
                                  throws GSSException
        Factory method for creating a context on the acceptor' side. The context's properties will be determined from the input token supplied to the accept method. Some mechanism providers might require that the caller be granted permission to accept a security context. A failed permission check might cause a SecurityException to be thrown from this method.
        Parameters:
        myCred - the credentials for the acceptor. Use null to act as a default acceptor principal.
        Returns:
        an unestablished GSSContext
        Throws:
        GSSException - containing the following major error codes: GSSException.NO_CRED GSSException.CREDENTIALS_EXPIRED GSSException.BAD_MECH GSSException.FAILURE
        See Also:
        GSSContext

      • createContext

        public abstract GSSContext createContext(byte[] interProcessToken)
                                  throws GSSException
        Factory method for creating a previously exported context. The context properties will be determined from the input token and cannot be modified through the set methods.

        Implementations are not required to support the inter-process transfer of security contexts. Before exporting a context, calling the GSSContext.isTransferable will indicate if the context is transferable. Calling this method in an implementation that does not support it will result in a GSSException with the error code GSSException.UNAVAILABLE. Some mechanism providers might require that the caller be granted permission to initiate or accept a security context. A failed permission check might cause a SecurityException to be thrown from this method.

        Parameters:
        interProcessToken - the token previously emitted from the export method.
        Returns:
        the previously established GSSContext
        Throws:
        GSSException - containing the following major error codes: GSSException.NO_CONTEXT, GSSException.DEFECTIVE_TOKEN, GSSException.UNAVAILABLE, GSSException.UNAUTHORIZED, GSSException.FAILURE
        See Also:
        GSSContext

      • addProviderAtFront

        public abstract void addProviderAtFront(Provider p,
                                        Oid mech)
                                 throws GSSException
        This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism. When a value of null is used instead of an Oid for the mechanism, the GSSManager must use the indicated provider ahead of all others no matter what the mechanism is. Only when the indicated provider does not support the needed mechanism should the GSSManager move on to a different provider.

        Calling this method repeatedly preserves the older settings but lowers them in preference thus forming an ordered list of provider and Oid pairs that grows at the top.

        Calling addProviderAtFront with a null Oid will remove all previous preferences that were set for this provider in the GSSManager instance. Calling addProviderAtFront with a non-null Oid will remove any previous preference that was set using this mechanism and this provider together.

        If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.

        Suppose an application desired that the provider A always be checked first when any mechanism is needed, it would call:

                 GSSManager mgr = GSSManager.getInstance();
         // mgr may at this point have its own pre-configured list
         // of provider preferences. The following will prepend to
         // any such list:

         mgr.addProviderAtFront(A, null);
        Now if it also desired that the mechanism of Oid m1 always be obtained from the provider B before the previously set A was checked, it would call:

                 mgr.addProviderAtFront(B, m1);
        The GSSManager would then first check with B if m1 was needed. In case B did not provide support for m1, the GSSManager would continue on to check with A. If any mechanism m2 is needed where m2 is different from m1 then the GSSManager would skip B and check with A directly.

        Suppose at a later time the following call is made to the same GSSManager instance:

                 mgr.addProviderAtFront(B, null)
        then the previous setting with the pair (B, m1) is subsumed by this and should be removed. Effectively the list of preferences now becomes {(B, null), (A, null), ... //followed by the pre-configured list.

        Please note, however, that the following call:

                 mgr.addProviderAtFront(A, m3)
        does not subsume the previous setting of (A, null) and the list will effectively become {(A, m3), (B, null), (A, null), ...}
        Parameters:
        p - the provider instance that should be used whenever support is needed for mech.
        mech - the mechanism for which the provider is being set
        Throws:
        GSSException - containing the following major error codes: GSSException.UNAVAILABLE, GSSException.FAILURE

      • addProviderAtEnd

        public abstract void addProviderAtEnd(Provider p,
                                      Oid mech)
                               throws GSSException
        This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism. When a value of null is used instead of an Oid for the mechanism, the GSSManager must use the indicated provider for any mechanism.

        Calling this method repeatedly preserves the older settings but raises them above newer ones in preference thus forming an ordered list of providers and Oid pairs that grows at the bottom. Thus the older provider settings will be utilized first before this one is.

        If there are any previously existing preferences that conflict with the preference being set here, then the GSSManager should ignore this request.

        If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.

        Suppose an application desired that when a mechanism of Oid m1 is needed the system default providers always be checked first, and only when they do not support m1 should a provider A be checked. It would then make the call:

                 GSSManager mgr = GSSManager.getInstance();
         mgr.addProviderAtEnd(A, m1);
        Now, if it also desired that for all mechanisms the provider B be checked after all configured providers have been checked, it would then call:

                 mgr.addProviderAtEnd(B, null);
        Effectively the list of preferences now becomes {..., (A, m1), (B, null)}.

        Suppose at a later time the following call is made to the same GSSManager instance:

                 mgr.addProviderAtEnd(B, m2)
        then the previous setting with the pair (B, null) subsumes this and therefore this request should be ignored. The same would happen if a request is made for the already existing pairs of (A, m1) or (B, null).

        Please note, however, that the following call:

                 mgr.addProviderAtEnd(A, null)
        is not subsumed by the previous setting of (A, m1) and the list will effectively become {..., (A, m1), (B, null), (A, null)}
        Parameters:
        p - the provider instance that should be used whenever support is needed for mech.
        mech - the mechanism for which the provider is being set
        Throws:
        GSSException - containing the following major error codes: GSSException.UNAVAILABLE, GSSException.FAILURE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


GSSName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Interface GSSName

  • public interface GSSName
    This interface encapsulates a single GSS-API principal entity. The application obtains an implementation of this interface through one of the createName methods that exist in the GSSManager class. Conceptually a GSSName contains many representations of the entity or many primitive name elements, one for each supported underlying mechanism. In GSS terminology, a GSSName that contains an element from just one mechanism is called a Mechanism Name (MN)

    Since different authentication mechanisms may employ different namespaces for identifying their principals, GSS-API's naming support is necessarily complex in multi-mechanism environments (or even in some single-mechanism environments where the underlying mechanism supports multiple namespaces). Different name formats and their definitions are identified with Oid's and some standard types are defined in this interface. The format of the names can be derived based on the unique Oid of its name type.

    Included below are code examples utilizing the GSSName interface. The code below creates a GSSName, converts it to an MN, performs a comparison, obtains a printable representation of the name, exports it to a byte array and then re-imports to obtain a new GSSName.

          GSSManager manager = GSSManager.getInstance();

      // create a host based service name
      GSSName name = manager.createName("service@host",
                   GSSName.NT_HOSTBASED_SERVICE);

      Oid krb5 = new Oid("1.2.840.113554.1.2.2");

      GSSName mechName = name.canonicalize(krb5);

      // the above two steps are equivalent to the following
      GSSName mechName = manager.createName("service@host",
                      GSSName.NT_HOSTBASED_SERVICE, krb5);

      // perform name comparison
      if (name.equals(mechName))
              print("Names are equals.");

      // obtain textual representation of name and its printable
      // name type
      print(mechName.toString() +
                      mechName.getStringNameType().toString());

      // export and re-import the name
      byte [] exportName = mechName.export();

      // create a new name object from the exported buffer
      GSSName newName = manager.createName(exportName,
                      GSSName.NT_EXPORT_NAME);
    Since:
    1.4
    See Also:
    export(),
equals(GSSName),
GSSManager.createName(String, Oid),
GSSManager.createName(String, Oid, Oid),
GSSManager.createName(byte[], Oid)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static Oid NT_ANONYMOUS
      Name type for representing an anonymous entity.
      static Oid NT_EXPORT_NAME
      Name type used to indicate an exported name produced by the export method.
      static Oid NT_HOSTBASED_SERVICE
      Oid indicating a host-based service name form.
      static Oid NT_MACHINE_UID_NAME
      Name type to indicate a numeric user identifier corresponding to a user on a local system.
      static Oid NT_STRING_UID_NAME
      Name type to indicate a string of digits representing the numeric user identifier of a user on a local system.
      static Oid NT_USER_NAME
      Name type to indicate a named user on a local system.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      GSSName canonicalize(Oid mech)
      Creates a name that is canonicalized for some mechanism.
      boolean equals(GSSName another)
      Compares two GSSName objects to determine if they refer to the same entity.
      boolean equals(Object another)
      Compares this GSSName object to another Object that might be a GSSName.
      byte[] export()
      Returns a canonical contiguous byte representation of a mechanism name (MN), suitable for direct, byte by byte comparison by authorization functions.
      Oid getStringNameType()
      Returns the name type of the printable representation of this name that can be obtained from the toString method.
      int hashCode()
      Returns a hashcode value for this GSSName.
      boolean isAnonymous()
      Tests if this name object represents an anonymous entity.
      boolean isMN()
      Tests if this name object represents a Mechanism Name (MN).
      String toString()
      Returns a textual representation of the GSSName object.

    • Field Detail

      • NT_HOSTBASED_SERVICE

        static final Oid NT_HOSTBASED_SERVICE
        Oid indicating a host-based service name form. It is used to represent services associated with host computers. This name form is constructed using two elements, "service" and "hostname", as follows: service@hostname.

         It represents the following Oid value:
{ iso(1) member-body(2) United
 States(840) mit(113554) infosys(1) gssapi(2) generic(1) service_name(4)
 }

      • NT_USER_NAME

        static final Oid NT_USER_NAME
        Name type to indicate a named user on a local system.

         It represents the following Oid value:
{ iso(1) member-body(2) United
 States(840) mit(113554) infosys(1) gssapi(2) generic(1) user_name(1)
 }

      • NT_MACHINE_UID_NAME

        static final Oid NT_MACHINE_UID_NAME
        Name type to indicate a numeric user identifier corresponding to a user on a local system. (e.g. Uid).

        It represents the following Oid value:
        { iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) generic(1) machine_uid_name(2) }

      • NT_STRING_UID_NAME

        static final Oid NT_STRING_UID_NAME
        Name type to indicate a string of digits representing the numeric user identifier of a user on a local system.

         It represents the following Oid value:
{ iso(1) member-body(2) United
 States(840) mit(113554) infosys(1) gssapi(2) generic(1)
 string_uid_name(3) }

      • NT_ANONYMOUS

        static final Oid NT_ANONYMOUS
        Name type for representing an anonymous entity.

        It represents the following Oid value:
        { 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3(gss-anonymous-name) }

      • NT_EXPORT_NAME

        static final Oid NT_EXPORT_NAME
        Name type used to indicate an exported name produced by the export method.

        It represents the following Oid value:
        { 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 4(gss-api-exported-name) }

    • Method Detail

      • equals

        boolean equals(GSSName another)
        throws GSSException
        Compares two GSSName objects to determine if they refer to the same entity.
        Parameters:
        another - the GSSName to compare this name with
        Returns:
        true if the two names contain at least one primitive element in common. If either of the names represents an anonymous entity, the method will return false.
        Throws:
        GSSException - when the names cannot be compared, containing the following major error codes: GSSException.BAD_NAMETYPE, GSSException.FAILURE

      • equals

        boolean equals(Object another)
        Compares this GSSName object to another Object that might be a GSSName. The behaviour is exactly the same as in equals except that no GSSException is thrown; instead, false will be returned in the situation where an error occurs.
        Overrides:
        equals in class Object
        Parameters:
        another - the object to compare this name to
        Returns:
        true if the object to compare to is also a GSSName and the two names refer to the same entity.
        See Also:
        equals(GSSName)

      • hashCode

        int hashCode()
        Returns a hashcode value for this GSSName.
        Overrides:
        hashCode in class Object
        Returns:
        a hashCode value
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • canonicalize

        GSSName canonicalize(Oid mech)
              throws GSSException
        Creates a name that is canonicalized for some mechanism.
        Parameters:
        mech - the oid for the mechanism for which the canonical form of the name is requested.
        Returns:
        a GSSName that contains just one primitive element representing this name in a canonicalized form for the desired mechanism.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_MECH, GSSException.BAD_NAMETYPE, GSSException.BAD_NAME, GSSException.FAILURE

      • export

        byte[] export()
       throws GSSException
        Returns a canonical contiguous byte representation of a mechanism name (MN), suitable for direct, byte by byte comparison by authorization functions. If the name is not an MN, implementations may throw a GSSException with the NAME_NOT_MN status code. If an implementation chooses not to throw an exception, it should use some system specific default mechanism to canonicalize the name and then export it. Structurally, an exported name object consists of a header containing an OID identifying the mechanism that authenticated the name, and a trailer containing the name itself, where the syntax of the trailer is defined by the individual mechanism specification. The format of the header of the output buffer is specified in RFC 2743.

        The exported name is useful when used in large access control lists where the overhead of creating a GSSName object on each name and invoking the equals method on each name from the ACL may be prohibitive.

        Exported names may be re-imported by using the byte array factory method GSSManager.createName and specifying the NT_EXPORT_NAME as the name type object identifier. The resulting GSSName name will also be a MN.

        Returns:
        a byte[] containing the exported name. RFC 2743 defines the "Mechanism-Independent Exported Name Object Format" for these bytes.
        Throws:
        GSSException - containing the following major error codes: GSSException.BAD_NAME, GSSException.BAD_NAMETYPE, GSSException.FAILURE

      • toString

        String toString()
        Returns a textual representation of the GSSName object. To retrieve the printed name format, which determines the syntax of the returned string, use the getStringNameType method.
        Overrides:
        toString in class Object
        Returns:
        a String representing this name in printable form.

      • getStringNameType

        Oid getStringNameType()
               throws GSSException
        Returns the name type of the printable representation of this name that can be obtained from the toString method.
        Returns:
        an Oid representing the namespace of the name returned from the toString method.
        Throws:
        GSSException - containing the following major error codes: GSSException.FAILURE

      • isAnonymous

        boolean isAnonymous()
        Tests if this name object represents an anonymous entity.
        Returns:
        true if this is an anonymous name, false otherwise.

      • isMN

        boolean isMN()
        Tests if this name object represents a Mechanism Name (MN). An MN is a GSSName the contains exactly one mechanism's primitive name element.
        Returns:
        true if this is an MN, false otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MessageProp

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Class MessageProp

  • java.lang.Object
    • org.ietf.jgss.MessageProp

  • public class MessageProp
extends Object
    This is a utility class used within the per-message GSSContext methods to convey per-message properties.

    When used with the GSSContext interface's wrap and getMIC methods, an instance of this class is used to indicate the desired Quality-of-Protection (QOP) and to request if confidentiality services are to be applied to caller supplied data (wrap only). To request default QOP, the value of 0 should be used for QOP.

    When used with the unwrap and verifyMIC methods of the GSSContext interface, an instance of this class will be used to indicate the applied QOP and confidentiality services over the supplied message. In the case of verifyMIC, the confidentiality state will always be false. Upon return from these methods, this object will also contain any supplementary status values applicable to the processed token. The supplementary status values can indicate old tokens, out of sequence tokens, gap tokens or duplicate tokens.

    Since:
    1.4
    See Also:
    GSSContext.wrap(byte[], int, int, org.ietf.jgss.MessageProp),
GSSContext.unwrap(byte[], int, int, org.ietf.jgss.MessageProp),
GSSContext.getMIC(byte[], int, int, org.ietf.jgss.MessageProp),
GSSContext.verifyMIC(byte[], int, int, byte[], int, int, org.ietf.jgss.MessageProp)

    • Constructor Summary

      Constructors
      Constructor and Description
      MessageProp(boolean privState)
      Constructor which sets the desired privacy state.
      MessageProp(int qop, boolean privState)
      Constructor which sets the values for the qop and privacy state.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getMinorStatus()
      Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.
      String getMinorString()
      Retrieves a string explaining the minor status code.
      boolean getPrivacy()
      Retrieves the privacy state.
      int getQOP()
      Retrieves the QOP value.
      boolean isDuplicateToken()
      Tests if this is a duplicate of an earlier token.
      boolean isGapToken()
      Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.
      boolean isOldToken()
      Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.
      boolean isUnseqToken()
      Tests if a later token had already been processed.
      void setPrivacy(boolean privState)
      Sets the privacy state.
      void setQOP(int qop)
      Sets the QOP value.
      void setSupplementaryStates(boolean duplicate, boolean old, boolean unseq, boolean gap, int minorStatus, String minorString)
      This method sets the state for the supplementary information flags and the minor status in MessageProp.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • MessageProp

        public MessageProp(boolean privState)
        Constructor which sets the desired privacy state. The QOP value used is 0.
        Parameters:
        privState - the privacy (i.e. confidentiality) state

      • MessageProp

        public MessageProp(int qop,
                   boolean privState)
        Constructor which sets the values for the qop and privacy state.
        Parameters:
        qop - the QOP value
        privState - the privacy (i.e. confidentiality) state

    • Method Detail

      • getQOP

        public int getQOP()
        Retrieves the QOP value.
        Returns:
        an int representing the QOP value
        See Also:
        setQOP(int)

      • getPrivacy

        public boolean getPrivacy()
        Retrieves the privacy state.
        Returns:
        true if the privacy (i.e., confidentiality) state is true, false otherwise.
        See Also:
        setPrivacy(boolean)

      • setQOP

        public void setQOP(int qop)
        Sets the QOP value.
        Parameters:
        qop - the int value to set the QOP to
        See Also:
        getQOP()

      • setPrivacy

        public void setPrivacy(boolean privState)
        Sets the privacy state.
        Parameters:
        privState - true is the privacy (i.e., confidentiality) state is true, false otherwise.
        See Also:
        getPrivacy()

      • isDuplicateToken

        public boolean isDuplicateToken()
        Tests if this is a duplicate of an earlier token.
        Returns:
        true if this is a duplicate, false otherwise.

      • isOldToken

        public boolean isOldToken()
        Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.
        Returns:
        true if the token's validity period has expired, false otherwise.

      • isUnseqToken

        public boolean isUnseqToken()
        Tests if a later token had already been processed.
        Returns:
        true if a later token had already been processed, false otherwise.

      • isGapToken

        public boolean isGapToken()
        Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.
        Returns:
        true if an expected per-message token was not received, false otherwise.

      • getMinorStatus

        public int getMinorStatus()
        Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.
        Returns:
        the int minor status

      • getMinorString

        public String getMinorString()
        Retrieves a string explaining the minor status code.
        Returns:
        a String corresponding to the minor status code. null will be returned when no minor status code has been set.

      • setSupplementaryStates

        public void setSupplementaryStates(boolean duplicate,
                                   boolean old,
                                   boolean unseq,
                                   boolean gap,
                                   int minorStatus,
                                   String minorString)
        This method sets the state for the supplementary information flags and the minor status in MessageProp. It is not used by the application but by the GSS implementation to return this information to the caller of a per-message context method.
        Parameters:
        duplicate - true if the token was a duplicate of an earlier token, false otherwise
        old - true if the token's validity period has expired, false otherwise
        unseq - true if a later token has already been processed, false otherwise
        gap - true if one or more predecessor tokens have not yet been successfully processed, false otherwise
        minorStatus - the int minor status code for the per-message operation
        minorString - the textual representation of the minorStatus value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Oid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact3
org.ietf.jgss

Class Oid

  • java.lang.Object
    • org.ietf.jgss.Oid

  • public class Oid
extends Object
    This class represents Universal Object Identifiers (Oids) and their associated operations.

    Oids are hierarchically globally-interpretable identifiers used within the GSS-API framework to identify mechanisms and name formats.

    The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. For example the Oid representation of Kerberos V5 mechanism is "1.2.840.113554.1.2.2"

    The GSSName name class contains public static Oid objects representing the standard name types defined in GSS-API.

    Since:
    1.4

    • Constructor Summary

      Constructors
      Constructor and Description
      Oid(byte[] data)
      Creates an Oid object from its ASN.1 DER encoding.
      Oid(InputStream derOid)
      Creates an Oid object from its ASN.1 DER encoding.
      Oid(String strOid)
      Constructs an Oid object from a string representation of its integer components.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean containedIn(Oid[] oids)
      A utility method to test if this Oid value is contained within the supplied Oid array.
      boolean equals(Object other)
      Tests if two Oid objects represent the same Object identifier value.
      byte[] getDER()
      Returns the full ASN.1 DER encoding for this oid object, which includes the tag and length.
      int hashCode()
      Returns a hashcode value for this Oid.
      String toString()
      Returns a string representation of the oid's integer components in dot separated notation.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • Oid

        public Oid(String strOid)
    throws GSSException
        Constructs an Oid object from a string representation of its integer components.
        Parameters:
        strOid - the dot separated string representation of the oid. For instance, "1.2.840.113554.1.2.2".
        Throws:
        GSSException - may be thrown when the string is incorrectly formatted

      • Oid

        public Oid(InputStream derOid)
    throws GSSException
        Creates an Oid object from its ASN.1 DER encoding. This refers to the full encoding including tag and length. The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is identical in functionality to its byte array counterpart.
        Parameters:
        derOid - stream containing the DER encoded oid
        Throws:
        GSSException - may be thrown when the DER encoding does not follow the prescribed format.

      • Oid

        public Oid(byte[] data)
    throws GSSException
        Creates an Oid object from its ASN.1 DER encoding. This refers to the full encoding including tag and length. The structure and encoding of Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is identical in functionality to its InputStream conterpart.
        Parameters:
        data - byte array containing the DER encoded oid
        Throws:
        GSSException - may be thrown when the DER encoding does not follow the prescribed format.

    • Method Detail

      • toString

        public String toString()
        Returns a string representation of the oid's integer components in dot separated notation.
        Overrides:
        toString in class Object
        Returns:
        string representation in the following format: "1.2.3.4.5"

      • equals

        public boolean equals(Object other)
        Tests if two Oid objects represent the same Object identifier value.
        Overrides:
        equals in class Object
        Parameters:
        other - the Oid object that has to be compared to this one
        Returns:
        true if the two Oid objects represent the same value, false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • getDER

        public byte[] getDER()
              throws GSSException
        Returns the full ASN.1 DER encoding for this oid object, which includes the tag and length.
        Returns:
        byte array containing the DER encoding of this oid object.
        Throws:
        GSSException - may be thrown when the oid can't be encoded

      • containedIn

        public boolean containedIn(Oid[] oids)
        A utility method to test if this Oid value is contained within the supplied Oid array.
        Parameters:
        oids - the array of Oid's to search
        Returns:
        true if the array contains this Oid value, false otherwise

      • hashCode

        public int hashCode()
        Returns a hashcode value for this Oid.
        Overrides:
        hashCode in class Object
        Returns:
        a hashCode value
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CORBA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA

Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

See: Description

  • Interface Summary
    Interface Description
    ARG_IN
    Signifies an "input" argument to an invocation, meaning that the argument is being passed from the client to the server.
    ARG_INOUT
    Signifies an argument used for both input and output in an invocation, meaning that the argument is being passed from the client to the server and then back from the server to the client.
    ARG_OUT
    A constant that signifies an "output" argument to an invocation, meaning that the argument is being passed from the server to the client.
    BAD_POLICY
    A PolicyErrorCode which would be filled in the PolicyError exception.
    BAD_POLICY_TYPE
    A PolicyErrorCode which would be filled in the PolicyError exception.
    BAD_POLICY_VALUE
    Contains the value used to indicate a policy value that is incorrect for a valid policy type in a call to the create_policy method defined in the ORB class.
    CTX_RESTRICT_SCOPE
    A flag that can be used as the second parameter to the method Context.get_values to restrict the search scope.
    Current
    Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.
    CurrentOperations
    The interface for Current.
    CustomMarshal
    An abstract value type that is meant to be used by the ORB, not the user.
    DataInputStream
    Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
    DataOutputStream
    Defines the methods used to write primitive data types to output streams for marshalling custom value types.
    DomainManager
    Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
    DomainManagerOperations
    Provides the DomainManager with the means to access policies.
    DynAny Deprecated
    Use the new DynAny instead
    DynArray Deprecated
    Use the new DynArray instead
    DynEnum Deprecated
    Use the new DynEnum instead
    DynFixed Deprecated
    Use the new DynFixed instead
    DynSequence Deprecated
    Use the new DynSequence instead
    DynStruct Deprecated
    Use the new DynStruct instead
    DynUnion Deprecated
    Use the new DynUnion instead
    DynValue Deprecated
    Use the new DynValue instead
    IDLType
    An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
    IDLTypeOperations
    This interface must be implemented by all IDLType objects.
    IRObject
    An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
    IRObjectOperations
    This is the Operations interface for the mapping from IRObject.
    Object
    The definition for a CORBA object reference.
    OMGVMCID
    The vendor minor code ID reserved for OMG.
    Policy
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
    PolicyOperations
    Provides the operations for a Policy object.
    PRIVATE_MEMBER
    Constant to define a private member in the ValueMember class.
    PUBLIC_MEMBER
    Constant to define a public member in the ValueMember class.
    UNSUPPORTED_POLICY
    One of the PolicyErrorCodes which would be filled if the requested Policy is understood to be valid by the ORB, but is not currently supported.
    UNSUPPORTED_POLICY_VALUE
    A PolicyErrorCode which would be filled if the value requested for the Policy is of a valid type and within the valid range for that type, but this valid value is not currently supported.
    VM_ABSTRACT
    Defines the code used to represent an Abstract interface in a typecode.
    VM_CUSTOM
    Defines the code used to represent a custom marshalled value type in a typecode.
    VM_NONE
    Defines the code used to represent the one of the values of a value type in a typecode.
    VM_TRUNCATABLE
    Defines the code used to represent a truncatable value type in a typecode.
  • Class Summary
    Class Description
    _IDLTypeStub
    The Stub for IDLType.
    _PolicyStub
    The Stub for Policy.
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    AnyHolder
    The Holder for Any.
    AnySeqHelper
    The Helper for AnySeq.
    AnySeqHolder
    The Holder for AnySeq.
    BooleanHolder
    The Holder for Boolean.
    BooleanSeqHelper
    The Helper for BooleanSeq.
    BooleanSeqHolder
    The Holder for BooleanSeq.
    ByteHolder
    The Holder for Byte.
    CharHolder
    The Holder for Char.
    CharSeqHelper
    The Helper for CharSeq.
    CharSeqHolder
    The Holder for CharSeq.
    CompletionStatus
    An object that indicates whether a method had completed running when a SystemException was thrown.
    CompletionStatusHelper
    The Helper for CompletionStatus.
    Context
    An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
    ContextList
    An object containing a modifiable list of String objects that represent property names.
    CurrentHelper
    The Helper for Current.
    CurrentHolder
    The Holder for Current.
    DefinitionKind
    The class that provides the constants used to identify the type of an Interface Repository object.
    DefinitionKindHelper
    The Helper for DefinitionKind.
    DoubleHolder
    The Holder for Double.
    DoubleSeqHelper
    The Helper for DoubleSeq.
    DoubleSeqHolder
    The Holder for DoubleSeq.
    DynamicImplementation Deprecated
    org.omg.CORBA.DynamicImplementation
    Environment
    A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
    ExceptionList
    An object used in Request operations to describe the exceptions that can be thrown by a method.
    FieldNameHelper
    The Helper for FieldName.
    FixedHolder
    The Holder for Fixed.
    FloatHolder
    The Holder for Float.
    FloatSeqHelper
    The Helper for FloatSeq.
    FloatSeqHolder
    The Holder for FloatSeq.
    IdentifierHelper
    The Helper for Identifier.
    IDLTypeHelper
    The Helper for IDLType.
    IntHolder
    The Holder for Int.
    LocalObject
    Used as a base class for implementation of a local IDL interface in the Java language mapping.
    LongHolder
    The Holder for Long.
    LongLongSeqHelper
    The Helper for LongLongSeq.
    LongLongSeqHolder
    The Holder for LongLongSeq.
    LongSeqHelper
    The Helper for LongSeqHelper.
    LongSeqHolder
    The Holder for LongSeq.
    NamedValue
    An object used in the DII and DSI to describe arguments and return values.
    NameValuePair
    Associates a name with a value that is an attribute of an IDL struct, and is used in the DynStruct APIs.
    NameValuePairHelper
    The Helper for NameValuePair.
    NVList
    A modifiable list containing NamedValue objects.
    ObjectHelper
    ObjectHolder
    The Holder for Object.
    OctetSeqHelper
    The Helper for OctetSeq.
    OctetSeqHolder
    The Holder for OctetSeq.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    ParameterMode
    Enumeration of parameter modes for Parameter.
    ParameterModeHelper
    Enumeration of parameter modes for Parameter.
    ParameterModeHolder
    Enumeration of parameter modes for Parameter.
    PolicyErrorCodeHelper
    Encapsulates a reason a Policy may be invalid.
    PolicyErrorHelper
    Thrown to indicate problems with parameter values passed to the ORB.create_policy operation.
    PolicyErrorHolder
    Thrown to indicate problems with parameter values passed to the ORB.create_policy operation.
    PolicyHelper
    The Helper for Policy.
    PolicyHolder
    The Holder for Policy.
    PolicyListHelper
    The Helper for PolicyList.
    PolicyListHolder
    The Holder for PolicyList.
    PolicyTypeHelper
    The Helper for PolicyType.
    Principal Deprecated
    Deprecated by CORBA 2.2.
    PrincipalHolder Deprecated
    Deprecated by CORBA 2.2.
    RepositoryIdHelper
    The Helper for RepositoryId.
    Request
    An object containing the information necessary for invoking a method.
    ServerRequest
    An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
    ServiceDetail
    An object that represents an ORB service: its service_detail_type field contains the type of the ORB service, and its service_detail field contains a description of the ORB service.
    ServiceDetailHelper
    ServiceInformation
    An IDL struct in the CORBA module that stores information about a CORBA service available in the ORB implementation and is obtained from the ORB.get_service_information method.
    ServiceInformationHelper
    ServiceInformationHolder
    The Holder for ServiceInformation.
    SetOverrideType
    The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
    SetOverrideTypeHelper
    The Helper for SetOverrideType.
    ShortHolder
    The Holder for Short.
    ShortSeqHelper
    The Helper for ShortSeqHelper.
    ShortSeqHolder
    The Holder for ShortSeq.
    StringHolder
    The Holder for String.
    StringSeqHelper
    An array of Strings
    StringSeqHolder
    An array of Strings
    StringValueHelper
    The Helper for StringValue.
    StructMember
    Describes a member of an IDL struct in the Interface Repository, including the name of the struct member, the type of the struct member, and the typedef that represents the IDL type of the struct member described the struct member object.
    StructMemberHelper
    The Helper for StructMember.
    TCKind
    The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
    TypeCode
    A container for information about a specific CORBA data type.
    TypeCodeHolder
    The Holder for TypeCode.
    ULongLongSeqHelper
    The Helper for ULongLongSeq.
    ULongLongSeqHolder
    The Holder for ULongLongSeq.
    ULongSeqHelper
    The Helper for ULongSeq.
    ULongSeqHolder
    The Holder for ULongSeq.
    UnionMember
    A description in the Interface Repository of a member of an IDL union.
    UnionMemberHelper
    The Helper for UnionMember.
    UnknownUserExceptionHelper
    The Helper for UnknownUserException.
    UnknownUserExceptionHolder
    The Holder for UnknownUserException.
    UShortSeqHelper
    The Helper for UShortSeq.
    UShortSeqHolder
    The Holder for UShortSeq.
    ValueBaseHelper
    ValueBaseHolder
    The Holder for ValueBase.
    ValueMember
    A description in the Interface Repository of a member of a value object.
    ValueMemberHelper
    The Helper for ValueMember.
    VersionSpecHelper
    The Helper for VersionSpec.
    VisibilityHelper
    The Helper for Visibility.
    WCharSeqHelper
    The Helper for WCharSeq.
    WCharSeqHolder
    The Holder for WCharSeq.
    WrongTransactionHelper
    The Helper for WrongTransaction.
    WrongTransactionHolder
    The Holder for WrongTransaction.
    WStringSeqHelper
    An array of WStrings
    WStringSeqHolder
    An array of WStrings
    WStringValueHelper
    org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications : ORB core as defined by CORBA 2.3.1 (formal/99-10-07) IDL/Java Language Mapping as defined in ptc/00-01-08
  • Exception Summary
    Exception Description
    ACTIVITY_COMPLETED
    The ACTIVITY_COMPLETED system exception may be raised on any method for which Activity context is accessed.
    ACTIVITY_REQUIRED
    The ACTIVITY_REQUIRED system exception may be raised on any method for which an Activity context is required.
    BAD_CONTEXT
    Exception thrown when an operation is invoked by a client but the passed context does not contain the context values required by the operation.
    BAD_INV_ORDER
    This exception indicates that the caller has invoked operations in the wrong order.
    BAD_OPERATION
    Exception thrown when an object reference denotes an existing object, but that the object does not support the operation that was invoked.
    BAD_PARAM
    Exception thrown when a parameter passed to a call is out of range or otherwise considered illegal.
    BAD_QOS
    The BAD_QOS exception is raised whenever an object cannot support the quality of service required by an invocation parameter that has a quality of service semantics associated with it.
    BAD_TYPECODE
    Exception thrown when the ORB has encountered a malformed type code (for example, a type code with an invalid TCKind value).
    Bounds
    A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
    CODESET_INCOMPATIBLE
    This exception is raised whenever meaningful communication is not possible between client and server native code sets.
    COMM_FAILURE
    This exception is raised if communication is lost while an operation is in progress, after the request was sent by the client, but before the reply from the server has been returned to the client.
    DATA_CONVERSION
    This exception is raised if an ORB cannot convert the representation of data as marshaled into its native representation or vice-versa.
    FREE_MEM
    Exception thrown when the ORB failed in an attempt to free dynamic memory, for example because of heap corruption or memory segments being locked.
    IMP_LIMIT
    This exception indicates that an implementation limit was exceeded in the ORB run time.
    INITIALIZE
    Exception thrown when an ORB has encountered a failure during its initialization, such as failure to acquire networking resources or detecting a configuration error.
    INTERNAL
    This exception indicates an internal failure in an ORB, for example, if an ORB has detected corruption of its internal data structures.
    INTF_REPOS
    Exception raised when an ORB cannot reach the interface repository, or some other failure relating to the interface repository is detected.
    INV_FLAG
    Exception thrown when an invalid flag was passed to an operation (for example, when creating a DII request).
    INV_IDENT
    This exception indicates that an IDL identifier is syntactically invalid.
    INV_OBJREF
    This exception indicates that an object reference is internally malformed.
    INV_POLICY
    Standard exception thrown when an invocation cannot be made because of an incompatibility between Policy overrides that apply to the particular invocation.
    INVALID_ACTIVITY
    The INVALID_ACTIVITY system exception may be raised on the Activity or Transaction services' resume methods if a transaction or Activity is resumed in a context different to that from which it was suspended.
    INVALID_TRANSACTION
    Exception thrown when the request carried an invalid transaction context.
    MARSHAL
    A request or reply from the network is structurally invalid.
    NO_IMPLEMENT
    This exception indicates that even though the operation that was invoked exists (it has an IDL definition), no implementation for that operation exists.
    NO_MEMORY
    Exception thrown when the ORB run time has run out of memory.
    NO_PERMISSION
    Exception thrown when an invocation failed because the caller has insufficient privileges.
    NO_RESOURCES
    Exception thrown when the ORB has encountered some general resource limitation.
    NO_RESPONSE
    This exception is raised if a client attempts to retrieve the result of a deferred synchronous call, but the response for the request is not yet available.
    OBJ_ADAPTER
    This exception typically indicates an administrative mismatch, for example, a server may have made an attempt to register itself with an implementation repository under a name that is already in use, or is unknown to the repository.
    OBJECT_NOT_EXIST
    Exception raised whenever an invocation on a deleted object was performed.
    PERSIST_STORE
    This exception indicates a persistent storage failure, for example, failure to establish a database connection or corruption of a database.
    PolicyError
    A user exception thrown when a policy error occurs.
    REBIND
    REBIND is raised when the current effective RebindPolicy, has a value of NO_REBIND or NO_RECONNECT and an invocation on a bound object reference results in a LocateReply message with status OBJECT_FORWARD or a Reply message with status LOCATION_FORWARD.
    SystemException
    The root class for all CORBA standard exceptions.
    TIMEOUT
    TIMEOUT is raised when no delivery has been made and the specified time-to-live period has been exceeded.
    TRANSACTION_MODE
    The CORBA TRANSACTION_MODE exception is thrown by the client ORB if it detects a mismatch between the InvocationPolicy in the IOR and the chosen invocation path (i.e, direct or routed invocation).
    TRANSACTION_REQUIRED
    Exception indicates that the request carried a null transaction context, but an active transaction is required.
    TRANSACTION_ROLLEDBACK
    Exception thrown when the transaction associated with the request has already been rolled back or marked to roll back.
    TRANSACTION_UNAVAILABLE
    The CORBA TRANSACTION_UNAVAILABLE exception is thrown by the ORB when it cannot process a transaction service context because its connection to the Transaction Service has been abnormally terminated.
    TRANSIENT
    Exception thrown when the ORB attempted to reach an object and failed.
    UNKNOWN
    This exception is raised if an operation implementation throws a non-CORBA exception (such as an exception specific to the implementation's programming language), or if an operation raises a user exception that does not appear in the operation's raises expression.
    UnknownUserException
    A class that contains user exceptions returned by the server.
    UserException
    The root class for CORBA IDL-defined user exceptions.
    WrongTransaction
    The CORBA WrongTransaction user-defined exception.

Package org.omg.CORBA Description

Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

For a precise list of supported sections of official CORBA specifications with which the Java[TM] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in Java[TM] SE 6.

General Information

The information in this section is information relevant to someone who compiles Interface Definition Language (IDL) files and uses the ORB to write clients and servers.

The classes and interfaces described in this section can be put into four groups: ORB classes, Exceptions, Helper classes, and Holder classes.

The ORB Class

An ORB handles (or brokers) method invocations between a client and the method's implementation on a server. Because the client and server may be anywhere on a network, and because the invocation and implementation may be written in different programming languages, an ORB does a great deal of work behind the scenes to accomplish this communication.

Most of what an ORB does is completely transparent to the user, and a major portion of the CORBA package consists of classes used by the ORB behind the scenes. The result is that most programmers will use only a small part of this package directly. In fact, most programmers will use only a few methods from the ORB class, some exceptions, and occasionally, a holder class.

ORB Methods

Before an application can enter the CORBA environment, it must first:

  • Be initialized into the ORB and possibly the object adapter (POA) environments.
  • Get references to ORB object (for use in future ORB operations) and perhaps other objects (including the root POA or some Object Adapter objects).

The following operations are provided to initialize applications and obtain the appropriate object references:

  • Operations providing access to the ORB, which are discussed in this section.
  • Operations providing access to Object Adapters, Interface Repository, Naming Service, and other Object Services. These operations are described in Other Classes.

When an application requires a CORBA environment it needs a mechanism to get an ORB object reference and possibly an OA object reference (such as the root POA). This serves two purposes. First, it initializes an application into the ORB and OA environments. Second, it returns the ORB object reference and the OA object reference to the application for use in future ORB and OA operations.

In order to obtain an ORB object reference, applications call the ORB.init operation. The parameters to the call can comprise an identifier for the ORB for which the object reference is required, and an arg_list, which is used to allow environment-specific data to be passed into the call.

These are the ORB methods that provide access to the ORB:

  • init()
  • init(String [] args, Properties props)
  • init(Applet app, Properties props)

Using the init() method without parameters initiates a singleton ORB, which can only give typecode creation anys needed in code generated in Helper classes by idlj.

Applications require a portable means by which to obtain their initial object references. References are required for the root POA, POA Current, Interface Repository, and various Object Services instances. The functionality required by the application is similar to that provided by the Naming Service. However, the OMG does not want to mandate that the Naming Service be made available to all applications in order that they may be portably initialized. Consequently, the operations shown in this section provide a simplified, local version of the Naming Service that applications can use to obtain a small, defined set of object references which are essential to its operation. Because only a small well-defined set of objects are expected with this mechanism, the naming context can be flattened to be a single-level name space. This simplification results in only two operations being defined to achieve the functionality required.

Initial references are obtained via two operations provided in the ORB object interface, providing facilities to list and resolve initial object references. These are:

  • resolve_initial_references(String name)
  • list_initial_services()
  • register_initial_reference(String id, org.omg.CORBA.Object obj)

An example that uses some of these methods is Getting Started with Java IDL.

Exceptions

Exceptions in Java IDL are similar to those in any code written in the Java programming language. If a method is defined to throw an exception, then any code using that method must have a try/catch block and handle that exception when it is thrown.

The documentation on Java IDL exceptions has more information and explains the difference between system exceptions and user-defined exceptions.

The following is a list of the system exceptions (which are unchecked exceptions inheriting through org.omg.CORBA.SystemException from java.lang.RuntimeException) that are defined in the package org.omg.CORBA:

        BAD_CONTEXT
        BAD_INV_ORDER
        BAD_OPERATION
        BAD_PARAM
        BAD_TYPECODE
        COMM_FAILURE
        DATA_CONVERSION
        FREE_MEM
        IMP_LIMIT
        INITIALIZE
        INTERNAL
        INTF_REPOS
        INVALID_TRANSACTION
        INV_FLAG
        INV_IDENT
        INV_OBJREF
        INV_POLICY
        MARSHAL
        NO_IMPLEMENT
        NO_MEMORY
        NO_PERMISSION
        NO_RESOURCES
        NO_RESPONSE
        OBJECT_NOT_EXIST
        OBJ_ADAPTER
        PERSIST_STORE
        TRANSACTION_REQUIRED
        TRANSACTION_ROLLEDBACK
        TRANSIENT
        UNKNOWN

The following is a list of user-defined exceptions defined in the package org.omg.CORBA.

        Bounds
        UnknownUserException
        WrongTransaction
        PolicyError

Subpackages

There are some packages inside the CORBA package with "Package" as part of their names. These packages are generally quite small because all they do is provide exceptions or classes for use by interfaces and classes in the CORBA package.

For example, the package org.omg.CORBA.TypeCodePackage contains two exceptions thrown by methods in the class TypeCode. These exceptions are:

  • BadKind
  • Bounds
The package org.omg.CORBA.ORBPackage contains two exceptions:
  • InvalidName
  • InconsistentTypeCode

Another package that is a subpackage of CORBA is the portable package. It provides a set of ORB APIs that makes it possible for code generated by one vendor's IDL compiler to run on another vendor's ORB.

Holder classes

Support for out and inout parameter passing modes requires the use of additional holder classes. Because the Java programming language does not support out or inout parameters, holder classes are needed as a means of passing a parameter that can be modified. To support portable stubs and skeletons, holder classes also implement the org.omg.CORBA.portable.Streamable interface.

Holder classes are named by appending "Holder" to the name of the type. The name of the type refers to its name in the Java programming language. For example, a holder class for the interface named Account in the Java programming language would be named AccountHolder.

Holder classes are available for all of the basic IDL datatypes in the org.omg.CORBA package. So, for example, there are already-defined classes for LongHolder, ShortHolder, FloatHolder, and so on. Classes are also generated for all named user-defined IDL types except those defined by typedefs. (Note that in this context user defined includes types that are defined in OMG specifications such as those for the Interface Repository, and other OMG services.)

Each holder class has:

  • a constructor from an instance
  • a default constructor
  • a public instance member, value which is the typed value.
  • a method for reading an input stream and assigning the contents to the type's value field
  • a method for writing the value of the value field to an output stream
  • a method for getting the typecode of the type

The default constructor sets the value field to the default value for the type as defined by the Java language:

  • false for boolean
  • 0 for numeric and char types
  • null for strings and object references

As an example, if the interface Account, defined in OMG IDL, were mapped to the Java programming language, the following holder class would be generated:

public final class AccountHolder implements
    org.omg.CORBA.portable.Streamable
{
  // field that holds an Account object
  public Account value = null;

  // default constructor
  public AccountHolder ()
  {
  }

  // creates a new AccountHolder from initialValue
  public AccountHolder (Account initialValue)
  {
    value = initialValue;
  }

  // reads the contents of i and assigns the contents to value
  public void _read (org.omg.CORBA.portable.InputStream i)
  {
    value = AccountHelper.read (i);
  }

  // writes value to o
  public void _write (org.omg.CORBA.portable.OutputStream o)
  {
    AccountHelper.write (o, value);
  }

  // returns the typecode for Account
  public org.omg.CORBA.TypeCode _type ()
  {
    return AccountHelper.type ();
  }

}

For more information on Holder classes, see Chapter 1.4, Mapping for Basic Types in the OMG IDL to Java Language Mapping. The Holder classes defined in the package org.omg.CORBA are:

     AnyHolder
     AnySeqHolder
     BooleanHolder
     BooleanSeqHolder
     ByteHolder
     CharHolder
     CharSeqHolder
     CurrentHolder
     DoubleHolder
     DoubleSeqHolder
     FixedHolder
     FloatHolder
     FloatSeqHolder
     IntHolder
     LongHolder
     LongLongSeqHolder
     LongSeqHolder
     ObjectHolder
     OctetSeqHolder
     ParameterModeHolder
     PolicyErrorHolder
     PolicyListHolder
     PrincipalHolder
     ServiceInformationHolder
     ShortHolder
     ShortSeqHolder
     StringHolder
     StringSeqHolder
     TypeCodeHolder
     ULongLongSeqHolder
     ULongSeqHolder
     UnknownUserExceptionHolder
     UShortSeqHolder
     ValueBaseHolder
     WCharSeqHolder
     WrongTransactionHolder
     WStringSeqHolder

Helper Classes

Helper files supply several static methods needed to manipulate the type. These include:

  • Any insert and extract operations for the type
  • getting the repository id
  • getting the typecode
  • reading and writing the type from and to a stream
  • implement the ValueHelper interface (if it is a user-defined value type)

The helper class for a mapped IDL interface or abstract interface also include narrow operation(s). The static narrow method allows an org.omg.CORBA.Object to be narrowed to the object reference of a more specific type. The IDL exception CORBA.BAD_PARAM is thrown if the narrow fails because the object reference does not support the requested type. A different system exception is raised to indicate other kinds of errors. Trying to narrow a null will always succeed with a return value of null. Generally, the only helper method an application programmer uses is the narrow method. The other methods are normally used behind the scenes and are transparent to the programmer.

Helper classes fall into two broad categories, helpers for value types and helpers for non value types. Because all of the helper classes in one category provide the same methods, one generic explanation of each category of helper classes is presented here.

When OMG IDL is mapped to the Java programming language, a "helper" class is generated for each user-defined type. This generated class will have the name of the user-defined type with the suffix Helper appended. For example, if the interface Account is defined in OMG IDL, the idlj compiler will automatically generate a class named AccountHelper. The AccountHelper class will contain the static methods needed for manipulating instances of the type, in this case, Account objects.

The narrow Method

When an object is the return value for a method, it is returned in the form of a generic object, either an org.omg.CORBA.Object object or a java.lang.Object object. This object must be cast to its more specific type before it can be operated on. For example, an Account object will be returned as a generic object and must be narrowed to an Account object so that Account methods may be called on it.

The narrow method has two forms, one that takes an org.omg.CORBA.Object object and one that takes a java.lang.Object object. Whether the interface is abstract or not determines which narrow method its helper class will provide. The helper class for an interface that is not abstract will have a narrow method that takes a CORBA object, whereas the narrow method for an interface that is abstract will take an object in the Java programming language. The helper class for a non-abstract interface that has at least one abstract base interface will provide both versions of the narrow method.

The Hello World tutorial uses a narrow method that looks like this:

        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // get the root naming context
        org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");
        // Use NamingContextExt instead of NamingContext. This is
        // part of latest Inter-Operable naming Service.
        NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

        // resolve the Object Reference in Naming
        String name = "Hello";
        helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

Example of a Basic Helper Class

A basic helper class, for purposes of this explanation, is one with the methods that are provided by every helper class, plus a narrow method if the type defined in OMG IDL maps to an interface in the Java programming language. Types that are not value types will have a basic helper class generated for them.

For example, assuming that the interface Account is not a value type IDL type and is also not an abstract interface and has no abstract base interfaces, its AccountHelper class will look like this:

abstract public class AccountHelper
{
  private static String  _id = "IDL:Account:1.0";

  // inserts an Account object into an Any object
  public static void insert (org.omg.CORBA.Any a, Account that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  // extracts an Account object from an Any object
  public static Account extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  // gets the typecode for this type
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (AccountHelper.id (), "Account");
    }
    return __typeCode;
  }

  // gets the repository id for this type
  public static String id ()
  {
    return _id;
  }

  // reads an Account object from an input stream
  public static Account read (org.omg.CORBA.portable.InputStream istream)
  {
    return narrow (istream.read_Object (_AccountStub.class));
  }

  // writes an Account object to an outputstream
  public static void write (org.omg.CORBA.portable.OutputStream ostream, Account value)
  {
    ostream.write_Object ((org.omg.CORBA.Object) value);
  }

  // converts (narrows) an Object to an Account object
  public static Account narrow (org.omg.CORBA.Object obj)
  {
    if (obj == null)
      return null;
    else if (obj instanceof Account)
      return (Account)obj;
    else if (!obj._is_a (id ()))
      throw new org.omg.CORBA.BAD_PARAM ();
    else
    {
      org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
      _AccountStub stub = new _AccountStub ();
      stub._set_delegate(delegate);
      return stub;
    }
  }

}

Value Type Helper Classes

A helper class for a value type includes different renderings of the same methods generated for non-value type methods. The main difference is that value types are types that can be passed by value as parameters or return values of a method, which means that they must be serializable.

Assuming that Address is a value type, the AddressHelper class will look like this:

abstract public class AddressHelper
{
  private static String  _id = "IDL:Address:1.0";

  // same as for non-value type
  public static void insert (org.omg.CORBA.Any a, Address that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  // same as for non-value type
  public static Address extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  private static boolean __active = false;

  // getting the typecode for the type
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      synchronized (org.omg.CORBA.TypeCode.class)
      {
        if (__typeCode == null)
        {
          if (__active)
          {
            return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
          }
          __active = true;
          org.omg.CORBA.ValueMember[] _members0 = new org.omg.CORBA.ValueMember[0];
          org.omg.CORBA.TypeCode _tcOf_members0 = null;
          __typeCode = org.omg.CORBA.ORB.init ().create_value_tc (_id, "Address", org.omg.CORBA.VM_NONE.value, null, _members0);
          __active = false;
        }
      }
    }
    return __typeCode;
  }

  // same as for non-value type
  public static String id ()
  {
    return _id;
  }

  // reads a serializable instance of Address from the given input stream
  public static Address read (org.omg.CORBA.portable.InputStream istream)
  {
    return (Address)((org.omg.CORBA_2_3.portable.InputStream) istream).read_value (id ());
  }

  // writes a serializable instance of Address to the given output stream
  public static void write (org.omg.CORBA.portable.OutputStream ostream, Address value)
  {
    ((org.omg.CORBA_2_3.portable.OutputStream) ostream).write_value (value, id ());
  }

}

The Helper classes defined in the package org.omg.CORBA are:

     AnySeqHelper
     BooleanSeqHelper
     CharSeqHelper
     CompletionStatusHelper
     CurrentHelper
     DefinitionKindHelper
     DoubleSeqHelper
     FieldNameHelper
     FloatSeqHelper
     IdentifierHelper
     IDLTypeHelper
     LongLongSeqHelper
     LongSeqHelper
     NameValuePairHelper
     ObjectHelper
     OctetSeqHelper
     ParameterModeHelper
     PolicyErrorCodeHelper
     PolicyErrorHelper
     PolicyHelper
     PolicyListHelper
     PolicyTypeHelper
     RepositoryIdHelper
     ServiceDetailHelper
     ServiceInformationHelper
     SetOverrideTypeHelper
     ShortSeqHelper
     StringSeqHelper
     StringValueHelper
     StructMemberHelper
     ULongLongSeqHelper
     ULongSeqHelper
     UnionMemberHelper
     UnknownUserExceptionHelper
     UShortSeqHelper
     ValueBaseHelper
     ValueMemberHelper
     VersionSpecHelper
     VisibilityHelper
     WCharSeqHelper
     WrongTransactionHelper
     WStringSeqHelper
     WStringValueHelper

Other Classes

The other classes and interfaces in the CORBA package, which are used behind the scenes, can be put into four groups. Three of the groups are used with requests in some capacity, and the fourth group, concerning the Interface Repository, is a category by itself.

Classes Created by an ORB

The first group contains classes that are created by an ORB and contain information used in request operations.
  • TCKind -- indicates the kind (datatype) for a TypeCode object
  • TypeCode -- indicates a datatype and possibly other information
  • Any -- contains a value and its typecode
  • NamedValue -- contains a name, an Any object, and an argument mode flag. NamedValue objects contain information about method arguments, method return values, or a context.
  • ContextList -- a list of strings that describe the contexts that need to be resolved and sent with an invocation
  • ExceptionList -- a list of TypeCodes for exceptions that may be thrown by a method
  • Environment -- a container for the exception thrown during a method invocation
  • Context -- a list of NamedValue objects used to pass auxiliary information from client to server
  • NVList -- a list of NamedValue objects, used to pass arguments or get results

Classes That Deal with Requests

The second group of classes deals with requests:
  • Object -- the base class for all CORBA object references
  • Request -- the main class in the DII, which contains methods for adding arguments to the request, for accessing information about the method being invoked (the method name, its arguments, exceptions it throws, and so on), and for making invocations on the request
  • DynamicImplementation -- the base class for server implementations using the DSI. It has the method invoke, which is used by an implementation of this class to determine the state of a ServerRequest object and to set its result or exception
  • ServerRequest -- captures the explicit state of a request for the Dynamic Skeleton Interface

Interfaces That Serve as Constants

The third group contains interfaces that serve as constants. The IDL-to-Java mapping mandates that IDL enums are mapped to a Java class with the enumerated values represented as public static final fields in that class (e.g. DefinitionKind). On the other hand IDL constants defined outside of an IDL interface are mapped to a Java interface for each constant.

This is why several interfaces in the org.omg.CORBA package consist of a single field, value, which is a short. This field is a constant used for such things as an error code or value modifier. For example, the value field of the interface BAD_POLICY is one of the possible reasons for the exception PolicyError to be thrown. To specify this error code, you would use BAD_POLICY.value.

The exception PolicyError uses the value field of the following interfaces as its possible error codes.

  • BAD_POLICY
  • BAD_POLICY_TYPE
  • BAD_POLICY_VALUE
  • UNSUPPORTED_POLICY
  • UNSUPPORTED_POLICY_VALUE
The method TypeCode.type_modifier returns the value field of one of the following interfaces. The VM in the names of these interfaces stands for "value modifier."
  • VM_NONE
  • VM_ABSTRACT
  • VM_CUSTOM
  • VM_TRUNCATABLE
The following constants are returned by a ValueMember object's access method to denote the visibility of the ValueMember object.
  • PRIVATE_MEMBER
  • PUBLIC_MEMBER
These flags, used in NamedValue objects or as parameters to methods, are defined in the following interfaces:
  • ARG_IN
  • ARG_INOUT
  • ARG_OUT
  • CTX_RESTRICT_SCOPE

Interface Repository Interfaces and Classes

A fourth group contains the Interface Repository interfaces and classes, which are generated by the idlj compiler from the OMG IDL interface ir.idl. The purpose of the Interface Repository is to identify the interfaces stored in it so that they can be accessed by an ORB. Each module, type, interface, attribute, operation, parameter, exception, constant, and so on is described completely by the Interface Repository API.

An ORB does not require that there be an interface repository, and Java IDL does not include one. Even though this release does not include an implementation of an interface repository, the following IR classes and interfaces have been included for the purpose of creating typecodes (see create_value_tc, create_struct_tc, create_union_tc and create_exception_tc methods in interface org.omg.CORBA.ORB):
&nbs

  • IRObject
  • IDLType
  • DefinitionKind
  • StructMember
  • UnionMember
  • ValueMember

Related Documentation

For overviews, guides, and a tutorial, please see:
  • Java IDL home page

CORBA Features Not Implemented in Java IDL

Some of the API included in org.omg subpackages is provided for conformance with the current OMG CORBA specification but is not implemented in Sun's release of the JDKTM. This enables other JDK licensees to provide implementations of this API in standard extensions and products.

Features That Throw NO_IMPLEMENT

Some of the API included in org.omg subpackages throw NO_IMPLEMENT exceptions for various reasons. Among these reasons are:

  • In some cases, for example LocalObject, the complete implementation according to the specification indicates that these API should throw NO_IMPLEMENT.

  • In most cases, for example methods in ORB.java, methods that throw NO_IMPLEMENT are actually implemented in subclasses elsewhere in the ORB code.

  • In some cases, for example _get_interface_def() and _get_interface, API are really not yet implemented.

General Summary of Features or API Not Implemented in This Release:

  • Interface Repository. An Interface Repository is not required for normal operation of Java IDL.
  • Java IDL does not support long double.
  • Policies (org.omg.CORBA.Policy) and methods for getting them are not implemented.
  • Domain managers (org.omg.CORBA.DomainManager) and methods for getting them are not implemented.
  • Service Information org.omg.CORBA.ServiceInformation and ORB method public boolean get_service_information(short service_type, ServiceInformationHolder service_info) are not implemented.
  • ORB methods for supporting single-threading (perform_work, work_pending) are not implemented.
  • IDL contexts.

Specific List of Unimplemented Features in Package org.omg.CORBA

Unimplemented Methods in package org.omg.CORBA:

  • ORB
    • public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    • public void perform_work()
    • public boolean work_pending()
    • public org.omg.CORBA.Current get_current()
    • create_operation_list
    • get_default_context
    • get_service_information
    • obsolete DynAnys (deprecated in favor of DynamicAny package)
Since:
JDK1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_PolicyStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class _PolicyStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA._PolicyStub
  • All Implemented Interfaces:
    Serializable, Object, Policy, PolicyOperations, IDLEntity

    public class _PolicyStub
extends ObjectImpl
implements Policy
    The Stub for Policy. For more information on Stub files, see "Generated Files: Stubs".

    org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl. Saturday, July 17, 1999 12:26:20 AM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      _PolicyStub()
      Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.
      _PolicyStub(Delegate delegate)
      Constructs a _PolicyStub object initialized with the given Delegate object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      Policy copy()
      Copies the policy object.
      void destroy()
      Destroys the policy object.
      int policy_type()
      Returns the constant value that corresponds to the type of the policy object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _PolicyStub

        public _PolicyStub()
        Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.

      • _PolicyStub

        public _PolicyStub(Delegate delegate)
        Constructs a _PolicyStub object initialized with the given Delegate object.
        Parameters:
        delegate - a Delegate Object

    • Method Detail

      • policy_type

        public int policy_type()
        Returns the constant value that corresponds to the type of the policy object. The values of the polivy objectys are allocated by the OMG. New values for PolicyType should be obtained from the OMG by sending mail to request@omg.org. In general the constant values that are allocated are defined in conjunction with the definition of the corresponding policy object.
        Specified by:
        policy_type in interface PolicyOperations
        Returns:
        the constant value that corresponds to the type of the policy object.

      • copy

        public Policy copy()
        Copies the policy object. The copy does not retain any relationships that the policy had with any domain or object.
        Specified by:
        copy in interface PolicyOperations
        Returns:
        the copy of the policy object.

      • destroy

        public void destroy()
        Destroys the policy object. It is the responsibility of the policy object to determine whether it can be destroyed.
        Specified by:
        destroy in interface PolicyOperations

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface Current

  • All Superinterfaces:
    CurrentOperations, IDLEntity, Object, Serializable
    All Known Subinterfaces:
    Current, Current

    public interface Current
extends CurrentOperations, Object, IDLEntity
    Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running. This information is accessed in a structured manner using interfaces derived from the Current interface defined in the CORBA module.

    Each ORB or CORBA service that needs its own context derives an interface from the CORBA module's Current. Users of the service can obtain an instance of the appropriate Current interface by invoking ORB::resolve_initial_references.

    org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface CurrentOperations

  • All Known Subinterfaces:
    Current, Current, Current, CurrentOperations, CurrentOperations

    public interface CurrentOperations
    The interface for Current. For more information on Operations interfaces, see "Generated Files". org/omg/CORBA/CurrentOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_IDLTypeStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class _IDLTypeStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA._IDLTypeStub
  • All Implemented Interfaces:
    Serializable, IDLType, IDLTypeOperations, IRObject, IRObjectOperations, Object, IDLEntity

    public class _IDLTypeStub
extends ObjectImpl
implements IDLType
    The Stub for IDLType. For more information on Stub files, see "Generated Files: Stubs".

    org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl. 03 June 1999 11:33:44 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      _IDLTypeStub()
      Constructs a default _IDLTypeStub object.
      _IDLTypeStub(Delegate delegate)
      Constructs an _IDLTypeStub object initialized with the given Delegate object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      DefinitionKind def_kind()
      Returns the DefinitionKind corresponding to this Interface Repository object.
      void destroy()
      Destroys this object.
      TypeCode type()
      The type attribute describes the type defined by an object derived from IDLType.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _IDLTypeStub

        public _IDLTypeStub()
        Constructs a default _IDLTypeStub object. NOTE: If the default constructor is used, the object is useless until the method _set_delegate has been called.

      • _IDLTypeStub

        public _IDLTypeStub(Delegate delegate)
        Constructs an _IDLTypeStub object initialized with the given Delegate object.
        Parameters:
        delegate - a Delegate object

    • Method Detail

      • type

        public TypeCode type()
        Description copied from interface: IDLTypeOperations
        The type attribute describes the type defined by an object derived from IDLType.
        Specified by:
        type in interface IDLTypeOperations
        Returns:
        the TypeCode defined by this object.

      • def_kind

        public DefinitionKind def_kind()
        Description copied from interface: IRObjectOperations
        Returns the DefinitionKind corresponding to this Interface Repository object.
        Specified by:
        def_kind in interface IRObjectOperations
        Returns:
        the DefinitionKind corresponding to this Interface Repository object.

      • destroy

        public void destroy()
        Description copied from interface: IRObjectOperations
        Destroys this object. If the object is a Container, this method is applied to all its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed. If the method is invoked on a Repository or on a PrimitiveDef then the BAD_INV_ORDER exception is raised with minor value 2. An attempt to destroy an object that would leave the repository in an incoherent state causes BAD_INV_ORDER exception to be raised with the minor code 1.
        Specified by:
        destroy in interface IRObjectOperations

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DomainManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DomainManager

  • All Superinterfaces:
    DomainManagerOperations, IDLEntity, Object, Serializable

    public interface DomainManager
extends DomainManagerOperations, Object, IDLEntity
    Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies. The DomainManager has associated with it the policy objects for a particular domain. The domain manager also records the membership of the domain and provides the means to add and remove members. The domain manager is itself a member of a domain, possibly the domain it manages. The domain manager provides mechanisms for establishing and navigating relationships to superior and subordinate domains and creating and accessing policies.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.DomainManagerOperations

        get_domain_policy

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IDLType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface IDLType

  • All Superinterfaces:
    IDLEntity, IDLTypeOperations, IRObject, IRObjectOperations, Object, Serializable
    All Known Implementing Classes:
    _IDLTypeStub

    public interface IDLType
extends IDLTypeOperations, IRObject, IDLEntity
    An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types. It provides access to the TypeCode object describing the type and is used in defining the other interfaces wherever definitions of IDLType must be referenced.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.IDLTypeOperations

        type

      • Methods inherited from interface org.omg.CORBA.IRObjectOperations

        def_kind, destroy

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IRObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface IRObject

  • All Superinterfaces:
    IDLEntity, IRObjectOperations, Object, Serializable
    All Known Subinterfaces:
    IDLType
    All Known Implementing Classes:
    _IDLTypeStub

    public interface IRObject
extends IRObjectOperations, Object, IDLEntity
    An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.IRObjectOperations

        def_kind, destroy

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CORBA.Any (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.AnyHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.AnySeqHelper
    • org.omg.CORBA.AnySeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.BooleanHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.BooleanSeqHelper
    • org.omg.CORBA.BooleanSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ByteHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.CharHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.CharSeqHelper
    • org.omg.CORBA.CharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.CompletionStatus (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.CompletionStatusHelper
    • org.omg.CORBA.Context
    • org.omg.CORBA.ContextList
    • org.omg.CORBA.CurrentHelper
    • org.omg.CORBA.CurrentHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.DefinitionKind (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.DefinitionKindHelper
    • org.omg.CORBA.DoubleHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.DoubleSeqHelper
    • org.omg.CORBA.DoubleSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.Environment
    • org.omg.CORBA.ExceptionList
    • org.omg.CORBA.FieldNameHelper
    • org.omg.CORBA.FixedHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.FloatHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.FloatSeqHelper
    • org.omg.CORBA.FloatSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.IdentifierHelper
    • org.omg.CORBA.IDLTypeHelper
    • org.omg.CORBA.IntHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.LocalObject (implements org.omg.CORBA.Object)
    • org.omg.CORBA.LongHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.LongLongSeqHelper
    • org.omg.CORBA.LongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.LongSeqHelper
    • org.omg.CORBA.LongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.NamedValue
    • org.omg.CORBA.NameValuePair (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.NameValuePairHelper
    • org.omg.CORBA.NVList
    • org.omg.CORBA.ObjectHelper
    • org.omg.CORBA.ObjectHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.CORBA._IDLTypeStub (implements org.omg.CORBA.IDLType)
      • org.omg.CORBA._PolicyStub (implements org.omg.CORBA.Policy)
      • org.omg.CORBA.DynamicImplementation
    • org.omg.CORBA.OctetSeqHelper
    • org.omg.CORBA.OctetSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ORB
    • org.omg.CORBA.ParameterMode (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.ParameterModeHelper
    • org.omg.CORBA.ParameterModeHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.PolicyErrorCodeHelper
    • org.omg.CORBA.PolicyErrorHelper
    • org.omg.CORBA.PolicyErrorHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.PolicyHelper
    • org.omg.CORBA.PolicyHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.PolicyListHelper
    • org.omg.CORBA.PolicyListHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.PolicyTypeHelper
    • org.omg.CORBA.Principal
    • org.omg.CORBA.PrincipalHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.RepositoryIdHelper
    • org.omg.CORBA.Request
    • org.omg.CORBA.ServerRequest
    • org.omg.CORBA.ServiceDetail (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.ServiceDetailHelper
    • org.omg.CORBA.ServiceInformation (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.ServiceInformationHelper
    • org.omg.CORBA.ServiceInformationHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.SetOverrideType (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.SetOverrideTypeHelper
    • org.omg.CORBA.ShortHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ShortSeqHelper
    • org.omg.CORBA.ShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.StringHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.StringSeqHelper
    • org.omg.CORBA.StringSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.StringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)
    • org.omg.CORBA.StructMember (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.StructMemberHelper
    • org.omg.CORBA.TCKind
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.ACTIVITY_COMPLETED
            • org.omg.CORBA.ACTIVITY_REQUIRED
            • org.omg.CORBA.BAD_CONTEXT
            • org.omg.CORBA.BAD_INV_ORDER
            • org.omg.CORBA.BAD_OPERATION
            • org.omg.CORBA.BAD_PARAM
            • org.omg.CORBA.BAD_QOS
            • org.omg.CORBA.BAD_TYPECODE
            • org.omg.CORBA.CODESET_INCOMPATIBLE
            • org.omg.CORBA.COMM_FAILURE
            • org.omg.CORBA.DATA_CONVERSION
            • org.omg.CORBA.FREE_MEM
            • org.omg.CORBA.IMP_LIMIT
            • org.omg.CORBA.INITIALIZE
            • org.omg.CORBA.INTERNAL
            • org.omg.CORBA.INTF_REPOS
            • org.omg.CORBA.INV_FLAG
            • org.omg.CORBA.INV_IDENT
            • org.omg.CORBA.INV_OBJREF
            • org.omg.CORBA.INV_POLICY
            • org.omg.CORBA.INVALID_ACTIVITY
            • org.omg.CORBA.INVALID_TRANSACTION
            • org.omg.CORBA.MARSHAL
            • org.omg.CORBA.NO_IMPLEMENT
            • org.omg.CORBA.NO_MEMORY
            • org.omg.CORBA.NO_PERMISSION
            • org.omg.CORBA.NO_RESOURCES
            • org.omg.CORBA.NO_RESPONSE
            • org.omg.CORBA.OBJ_ADAPTER
            • org.omg.CORBA.OBJECT_NOT_EXIST
            • org.omg.CORBA.PERSIST_STORE
            • org.omg.CORBA.REBIND
            • org.omg.CORBA.TIMEOUT
            • org.omg.CORBA.TRANSACTION_MODE
            • org.omg.CORBA.TRANSACTION_REQUIRED
            • org.omg.CORBA.TRANSACTION_ROLLEDBACK
            • org.omg.CORBA.TRANSACTION_UNAVAILABLE
            • org.omg.CORBA.TRANSIENT
            • org.omg.CORBA.UNKNOWN
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CORBA.Bounds
          • org.omg.CORBA.PolicyError
          • org.omg.CORBA.UnknownUserException
          • org.omg.CORBA.WrongTransaction
    • org.omg.CORBA.TypeCode (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.TypeCodeHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ULongLongSeqHelper
    • org.omg.CORBA.ULongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ULongSeqHelper
    • org.omg.CORBA.ULongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.UnionMember (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.UnionMemberHelper
    • org.omg.CORBA.UnknownUserExceptionHelper
    • org.omg.CORBA.UnknownUserExceptionHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.UShortSeqHelper
    • org.omg.CORBA.UShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ValueBaseHelper
    • org.omg.CORBA.ValueBaseHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.ValueMember (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.ValueMemberHelper
    • org.omg.CORBA.VersionSpecHelper
    • org.omg.CORBA.VisibilityHelper
    • org.omg.CORBA.WCharSeqHelper
    • org.omg.CORBA.WCharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.WrongTransactionHelper
    • org.omg.CORBA.WrongTransactionHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.WStringSeqHelper
    • org.omg.CORBA.WStringSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.WStringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)

Interface Hierarchy

  • org.omg.CORBA.ARG_IN
  • org.omg.CORBA.ARG_INOUT
  • org.omg.CORBA.ARG_OUT
  • org.omg.CORBA.BAD_POLICY
  • org.omg.CORBA.BAD_POLICY_TYPE
  • org.omg.CORBA.BAD_POLICY_VALUE
  • org.omg.CORBA.CTX_RESTRICT_SCOPE
  • org.omg.CORBA.CurrentOperations
    • org.omg.CORBA.Current (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CORBA.CustomMarshal
  • org.omg.CORBA.DomainManagerOperations
    • org.omg.CORBA.DomainManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CORBA.IRObjectOperations
    • org.omg.CORBA.IDLTypeOperations
      • org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObject)
    • org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
  • org.omg.CORBA.Object
    • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.DynAny
      • org.omg.CORBA.DynArray (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynEnum (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynFixed (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynSequence (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynStruct (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynUnion (also extends org.omg.CORBA.Object)
      • org.omg.CORBA.DynValue (also extends org.omg.CORBA.Object)
    • org.omg.CORBA.DynArray (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynEnum (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynFixed (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynSequence (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynStruct (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynUnion (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.DynValue (also extends org.omg.CORBA.DynAny)
    • org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObjectOperations)
      • org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
    • org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.PolicyOperations)
  • org.omg.CORBA.OMGVMCID
  • org.omg.CORBA.PolicyOperations
    • org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CORBA.PRIVATE_MEMBER
  • org.omg.CORBA.PUBLIC_MEMBER
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.Object)
      • org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.Object)
      • org.omg.CORBA.IDLType (also extends org.omg.CORBA.IDLTypeOperations, org.omg.CORBA.IRObject)
      • org.omg.CORBA.IRObject (also extends org.omg.CORBA.IRObjectOperations, org.omg.CORBA.Object)
        • org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
      • org.omg.CORBA.Policy (also extends org.omg.CORBA.Object, org.omg.CORBA.PolicyOperations)
      • org.omg.CORBA.portable.ValueBase
        • org.omg.CORBA.DataInputStream
        • org.omg.CORBA.DataOutputStream
  • org.omg.CORBA.UNSUPPORTED_POLICY
  • org.omg.CORBA.UNSUPPORTED_POLICY_VALUE
  • org.omg.CORBA.VM_ABSTRACT
  • org.omg.CORBA.VM_CUSTOM
  • org.omg.CORBA.VM_NONE
  • org.omg.CORBA.VM_TRUNCATABLE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Policy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface Policy

  • All Superinterfaces:
    IDLEntity, Object, PolicyOperations, Serializable
    All Known Subinterfaces:
    IdAssignmentPolicy, IdUniquenessPolicy, ImplicitActivationPolicy, LifespanPolicy, RequestProcessingPolicy, ServantRetentionPolicy, ThreadPolicy
    All Known Implementing Classes:
    _PolicyStub

    public interface Policy
extends PolicyOperations, Object, IDLEntity
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation. This information is accessed in a structured manner using interfaces derived from the Policy interface defined in the CORBA module. A CORBA service does not have to use this method of accessing operating options, but may choose to do so. The Security Service in particular uses this technique for associating Security Policy with objects in the system. An interface generated by the IDL-to-Java compiler. org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA

  • Packages that use org.omg.CORBA
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.DynAnyPackage
    Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
    org.omg.CORBA.ORBPackage
    Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
    org.omg.CORBA.TypeCodePackage
    Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.Dynamic
    This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.
    org.omg.SendingContext
    Provides support for the marshalling of value types.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.
  • Classes in org.omg.CORBA used by javax.rmi.CORBA
    Class and Description
    Object
    The definition for a CORBA object reference.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    SystemException
    The root class for all CORBA standard exceptions.
  • Classes in org.omg.CORBA used by org.omg.CORBA
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    AnySeqHolder
    The Holder for AnySeq.
    BAD_INV_ORDER
    This exception indicates that the caller has invoked operations in the wrong order.
    BAD_OPERATION
    Exception thrown when an object reference denotes an existing object, but that the object does not support the operation that was invoked.
    BAD_PARAM
    Exception thrown when a parameter passed to a call is out of range or otherwise considered illegal.
    BooleanSeqHolder
    The Holder for BooleanSeq.
    Bounds
    A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
    CharSeqHolder
    The Holder for CharSeq.
    CompletionStatus
    An object that indicates whether a method had completed running when a SystemException was thrown.
    Context
    An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
    ContextList
    An object containing a modifiable list of String objects that represent property names.
    Current
    Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.
    CurrentOperations
    The interface for Current.
    DATA_CONVERSION
    This exception is raised if an ORB cannot convert the representation of data as marshaled into its native representation or vice-versa.
    DataInputStream
    Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
    DataOutputStream
    Defines the methods used to write primitive data types to output streams for marshalling custom value types.
    DefinitionKind
    The class that provides the constants used to identify the type of an Interface Repository object.
    DomainManager
    Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
    DomainManagerOperations
    Provides the DomainManager with the means to access policies.
    DoubleSeqHolder
    The Holder for DoubleSeq.
    DynAny
    Deprecated.
    Use the new DynAny instead
    DynArray
    Deprecated.
    Use the new DynArray instead
    DynEnum
    Deprecated.
    Use the new DynEnum instead
    DynSequence
    Deprecated.
    Use the new DynSequence instead
    DynStruct
    Deprecated.
    Use the new DynStruct instead
    DynUnion
    Deprecated.
    Use the new DynUnion instead
    Environment
    A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
    ExceptionList
    An object used in Request operations to describe the exceptions that can be thrown by a method.
    FloatSeqHolder
    The Holder for FloatSeq.
    IDLType
    An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
    IDLTypeOperations
    This interface must be implemented by all IDLType objects.
    IRObject
    An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
    IRObjectOperations
    This is the Operations interface for the mapping from IRObject.
    LongLongSeqHolder
    The Holder for LongLongSeq.
    LongSeqHolder
    The Holder for LongSeq.
    MARSHAL
    A request or reply from the network is structurally invalid.
    NamedValue
    An object used in the DII and DSI to describe arguments and return values.
    NameValuePair
    Associates a name with a value that is an attribute of an IDL struct, and is used in the DynStruct APIs.
    NVList
    A modifiable list containing NamedValue objects.
    Object
    The definition for a CORBA object reference.
    OctetSeqHolder
    The Holder for OctetSeq.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    ParameterMode
    Enumeration of parameter modes for Parameter.
    Policy
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
    PolicyError
    A user exception thrown when a policy error occurs.
    PolicyOperations
    Provides the operations for a Policy object.
    Principal
    Deprecated.
    Deprecated by CORBA 2.2.
    Request
    An object containing the information necessary for invoking a method.
    ServerRequest
    An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
    ServiceDetail
    An object that represents an ORB service: its service_detail_type field contains the type of the ORB service, and its service_detail field contains a description of the ORB service.
    ServiceInformation
    An IDL struct in the CORBA module that stores information about a CORBA service available in the ORB implementation and is obtained from the ORB.get_service_information method.
    ServiceInformationHolder
    The Holder for ServiceInformation.
    SetOverrideType
    The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
    ShortSeqHolder
    The Holder for ShortSeq.
    StructMember
    Describes a member of an IDL struct in the Interface Repository, including the name of the struct member, the type of the struct member, and the typedef that represents the IDL type of the struct member described the struct member object.
    SystemException
    The root class for all CORBA standard exceptions.
    TCKind
    The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
    TypeCode
    A container for information about a specific CORBA data type.
    ULongLongSeqHolder
    The Holder for ULongLongSeq.
    ULongSeqHolder
    The Holder for ULongSeq.
    UnionMember
    A description in the Interface Repository of a member of an IDL union.
    UnknownUserException
    A class that contains user exceptions returned by the server.
    UserException
    The root class for CORBA IDL-defined user exceptions.
    UShortSeqHolder
    The Holder for UShortSeq.
    ValueMember
    A description in the Interface Repository of a member of a value object.
    WCharSeqHolder
    The Holder for WCharSeq.
    WrongTransaction
    The CORBA WrongTransaction user-defined exception.
  • Classes in org.omg.CORBA used by org.omg.CORBA.DynAnyPackage
    Class and Description
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.CORBA.ORBPackage
    Class and Description
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.CORBA.TypeCodePackage
    Class and Description
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.CORBA.portable
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    Context
    An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
    ContextList
    An object containing a modifiable list of String objects that represent property names.
    CustomMarshal
    An abstract value type that is meant to be used by the ORB, not the user.
    DomainManager
    Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
    ExceptionList
    An object used in Request operations to describe the exceptions that can be thrown by a method.
    NamedValue
    An object used in the DII and DSI to describe arguments and return values.
    NVList
    A modifiable list containing NamedValue objects.
    Object
    The definition for a CORBA object reference.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    Policy
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
    Principal
    Deprecated.
    Deprecated by CORBA 2.2.
    Request
    An object containing the information necessary for invoking a method.
    SetOverrideType
    The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
    SystemException
    The root class for all CORBA standard exceptions.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.CORBA_2_3
    Class and Description
    BAD_PARAM
    Exception thrown when a parameter passed to a call is out of range or otherwise considered illegal.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
  • Classes in org.omg.CORBA used by org.omg.CosNaming
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    DynamicImplementation
    Deprecated.
    org.omg.CORBA.DynamicImplementation
    Object
    The definition for a CORBA object reference.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    ServerRequest
    An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.CosNaming.NamingContextExtPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.CosNaming.NamingContextPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.Dynamic
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    ParameterMode
    Enumeration of parameter modes for Parameter.
  • Classes in org.omg.CORBA used by org.omg.DynamicAny
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    Object
    The definition for a CORBA object reference.
    TCKind
    The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.DynamicAny.DynAnyFactoryPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.DynamicAny.DynAnyPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.IOP
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    Object
    The definition for a CORBA object reference.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.IOP.CodecFactoryPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.IOP.CodecPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.Messaging
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.PortableInterceptor
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    Object
    The definition for a CORBA object reference.
    Policy
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
    PolicyError
    A user exception thrown when a policy error occurs.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableInterceptor.ORBInitInfoPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableServer
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    Current
    Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.
    CurrentOperations
    The interface for Current.
    Object
    The definition for a CORBA object reference.
    ORB
    A class providing APIs for the CORBA Object Request Broker features.
    Policy
    Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
    PolicyOperations
    Provides the operations for a Policy object.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableServer.CurrentPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableServer.POAManagerPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableServer.POAPackage
    Class and Description
    Any
    Serves as a container for any data that can be described in IDL or for any IDL primitive type.
    TypeCode
    A container for information about a specific CORBA data type.
    UserException
    The root class for CORBA IDL-defined user exceptions.
  • Classes in org.omg.CORBA used by org.omg.PortableServer.ServantLocatorPackage
    Class and Description
    TypeCode
    A container for information about a specific CORBA data type.
  • Classes in org.omg.CORBA used by org.omg.SendingContext
    Class and Description
    Object
    The definition for a CORBA object reference.
  • Classes in org.omg.CORBA used by org.omg.stub.java.rmi
    Class and Description
    Object
    The definition for a CORBA object reference.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ACTIVITY_COMPLETED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ACTIVITY_COMPLETED

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.ACTIVITY_COMPLETED
  • All Implemented Interfaces:
    Serializable

    public final class ACTIVITY_COMPLETED
extends SystemException
    The ACTIVITY_COMPLETED system exception may be raised on any method for which Activity context is accessed. It indicates that the Activity context in which the method call was made has been completed due to a timeout of either the Activity itself or a transaction that encompasses the Activity, or that the Activity completed in a manner other than that originally requested.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      ACTIVITY_COMPLETED()
      Constructs an ACTIVITY_COMPLETED exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      ACTIVITY_COMPLETED(int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_COMPLETED exception with the specified minor code and completion status.
      ACTIVITY_COMPLETED(String detailMessage)
      Constructs an ACTIVITY_COMPLETED exception with the specified message.
      ACTIVITY_COMPLETED(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_COMPLETED exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ACTIVITY_COMPLETED

        public ACTIVITY_COMPLETED()
        Constructs an ACTIVITY_COMPLETED exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • ACTIVITY_COMPLETED

        public ACTIVITY_COMPLETED(String detailMessage)
        Constructs an ACTIVITY_COMPLETED exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • ACTIVITY_COMPLETED

        public ACTIVITY_COMPLETED(int minorCode,
                          CompletionStatus completionStatus)
        Constructs an ACTIVITY_COMPLETED exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • ACTIVITY_COMPLETED

        public ACTIVITY_COMPLETED(String detailMessage,
                          int minorCode,
                          CompletionStatus completionStatus)
        Constructs an ACTIVITY_COMPLETED exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ACTIVITY_REQUIRED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ACTIVITY_REQUIRED

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.ACTIVITY_REQUIRED
  • All Implemented Interfaces:
    Serializable

    public final class ACTIVITY_REQUIRED
extends SystemException
    The ACTIVITY_REQUIRED system exception may be raised on any method for which an Activity context is required. It indicates that an Activity context was necessary to perform the invoked operation, but one was not found associated with the calling thread.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      ACTIVITY_REQUIRED()
      Constructs an ACTIVITY_REQUIRED exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      ACTIVITY_REQUIRED(int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_REQUIRED exception with the specified minor code and completion status.
      ACTIVITY_REQUIRED(String detailMessage)
      Constructs an ACTIVITY_REQUIRED exception with the specified message.
      ACTIVITY_REQUIRED(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_REQUIRED exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ACTIVITY_REQUIRED

        public ACTIVITY_REQUIRED()
        Constructs an ACTIVITY_REQUIRED exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • ACTIVITY_REQUIRED

        public ACTIVITY_REQUIRED(String detailMessage)
        Constructs an ACTIVITY_REQUIRED exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • ACTIVITY_REQUIRED

        public ACTIVITY_REQUIRED(int minorCode,
                         CompletionStatus completionStatus)
        Constructs an ACTIVITY_REQUIRED exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • ACTIVITY_REQUIRED

        public ACTIVITY_REQUIRED(String detailMessage,
                         int minorCode,
                         CompletionStatus completionStatus)
        Constructs an ACTIVITY_REQUIRED exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Any

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Any

  • java.lang.Object
    • org.omg.CORBA.Any
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public abstract class Any
extends Object
implements IDLEntity
    Serves as a container for any data that can be described in IDL or for any IDL primitive type. An Any object is used as a component of a NamedValue object, which provides information about arguments or return values in requests, and which is used to define name/value pairs in Context objects.

    An Any object consists of two parts:

    1. a data value
    2. a TypeCode object describing the type of the data value contained in the Any object. For example, a TypeCode object for an array contains a field for the length of the array and a field for the type of elements in the array. (Note that in this case, the second field of the TypeCode object is itself a TypeCode object.)

    A large part of the Any class consists of pairs of methods for inserting values into and extracting values from an Any object.

    For a given primitive type X, these methods are:

    void insert_X(X x)
    This method allows the insertion of an instance x of primitive type X into the value field of the Any object. Note that the method insert_X also resets the Any object's type field if necessary.
    X extract_X()
    This method allows the extraction of an instance of type X from the Any object.

    This method throws the exception BAD_OPERATION under two conditions:

    1. the type of the element contained in the Any object is not X
    2. the method extract_X is called before the value field of the Any object has been set

    There are distinct method pairs for each primitive IDL data type (insert_long and extract_long, insert_string and extract_string, and so on).

    The class Any also has methods for getting and setting the type code, for testing two Any objects for equality, and for reading an Any object from a stream or writing it to a stream.

    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      Any()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      abstract InputStream create_input_stream()
      Creates an input stream from which this Any object's value can be unmarshalled.
      abstract OutputStream create_output_stream()
      Creates an output stream into which this Any object's value can be marshalled.
      abstract boolean equal(Any a)
      Checks for equality between this Any object and the given Any object.
      abstract Any extract_any()
      Extracts the Any object in this Any object's value field.
      abstract boolean extract_boolean()
      Extracts the boolean in this Any object's value field.
      abstract char extract_char()
      Extracts the char in this Any object's value field.
      abstract double extract_double()
      Extracts the double in this Any object's value field.
      BigDecimal extract_fixed()
      Extracts the java.math.BigDecimal object in this Any object's value field.
      abstract float extract_float()
      Extracts the float in this Any object's value field.
      abstract int extract_long()
      Extracts the int in this Any object's value field.
      abstract long extract_longlong()
      Extracts the long in this Any object's value field.
      abstract Object extract_Object()
      Extracts the org.omg.CORBA.Object in this Any object's value field.
      abstract byte extract_octet()
      Extracts the byte in this Any object's value field.
      Principal extract_Principal()
      Deprecated.
      Deprecated by CORBA 2.2.
      abstract short extract_short()
      Extracts the short in this Any object's value field.
      Streamable extract_Streamable()
      Extracts a Streamable from this Any object's value field.
      abstract String extract_string()
      Extracts the String object in this Any object's value field.
      abstract TypeCode extract_TypeCode()
      Extracts the TypeCode object in this Any object's value field.
      abstract int extract_ulong()
      Extracts the int in this Any object's value field.
      abstract long extract_ulonglong()
      Extracts the long in this Any object's value field.
      abstract short extract_ushort()
      Extracts the short in this Any object's value field.
      abstract Serializable extract_Value()
      Extracts the java.io.Serializable object in this Any object's value field.
      abstract char extract_wchar()
      Extracts the char in this Any object's value field.
      abstract String extract_wstring()
      Extracts the String object in this Any object's value field.
      abstract void insert_any(Any a)
      Inserts the given Any object into this Any object's value field.
      abstract void insert_boolean(boolean b)
      Inserts the given boolean into this Any object's value field.
      abstract void insert_char(char c)
      Inserts the given char into this Any object's value field.
      abstract void insert_double(double d)
      Inserts the given double into this Any object's value field.
      void insert_fixed(BigDecimal value)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      void insert_fixed(BigDecimal value, TypeCode type)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      abstract void insert_float(float f)
      Inserts the given float into this Any object's value field.
      abstract void insert_long(int l)
      Inserts the given int into this Any object's value field.
      abstract void insert_longlong(long l)
      Inserts the given long into this Any object's value field.
      abstract void insert_Object(Object o)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.
      abstract void insert_Object(Object o, TypeCode t)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.
      abstract void insert_octet(byte b)
      Inserts the given byte into this Any object's value field.
      void insert_Principal(Principal p)
      Deprecated.
      Deprecated by CORBA 2.2.
      abstract void insert_short(short s)
      Inserts the given short into this Any object's value field.
      void insert_Streamable(Streamable s)
      Inserts the given Streamable object into this Any object's value field.
      abstract void insert_string(String s)
      Inserts the given String object into this Any object's value field.
      abstract void insert_TypeCode(TypeCode t)
      Inserts the given TypeCode object into this Any object's value field.
      abstract void insert_ulong(int l)
      Inserts the given int into this Any object's value field.
      abstract void insert_ulonglong(long l)
      Inserts the given long into this Any object's value field.
      abstract void insert_ushort(short s)
      Inserts the given short into this Any object's value field.
      abstract void insert_Value(Serializable v)
      Inserts the given java.io.Serializable object into this Any object's value field.
      abstract void insert_Value(Serializable v, TypeCode t)
      Inserts the given java.io.Serializable object into this Any object's value field.
      abstract void insert_wchar(char c)
      Inserts the given char into this Any object's value field.
      abstract void insert_wstring(String s)
      Inserts the given String object into this Any object's value field.
      abstract void read_value(InputStream is, TypeCode t)
      Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
      abstract TypeCode type()
      Returns type information for the element contained in this Any object.
      abstract void type(TypeCode t)
      Sets this Any object's type field to the given TypeCode object and clears its value.
      abstract void write_value(OutputStream os)
      Writes out the value of this Any object to the given output stream.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Any

        public Any()

    • Method Detail

      • equal

        public abstract boolean equal(Any a)
        Checks for equality between this Any object and the given Any object. Two Any objects are equal if both their values and type codes are equal.
        Parameters:
        a - the Any object to test for equality
        Returns:
        true if the Any objects are equal; false otherwise
        See Also:
        CORBA package comments for unimplemented features

      • type

        public abstract TypeCode type()
        Returns type information for the element contained in this Any object.
        Returns:
        the TypeCode object containing type information about the value contained in this Any object

      • type

        public abstract void type(TypeCode t)
        Sets this Any object's type field to the given TypeCode object and clears its value.

        Note that using this method to set the type code wipes out the value if there is one. The method is provided primarily so that the type may be set properly for IDL out parameters. Generally, setting the type is done by the insert_X methods, which will set the type to X if it is not already set to X.

        Parameters:
        t - the TypeCode object giving information for the value in this Any object

      • read_value

        public abstract void read_value(InputStream is,
                                TypeCode t)
                         throws MARSHAL
        Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
        Parameters:
        is - the org.omg.CORBA.portable.InputStream object from which to read the value contained in this Any object
        t - a TypeCode object containing type information about the value to be read
        Throws:
        MARSHAL - when the given TypeCode object is not consistent with the value that was contained in the input stream

      • write_value

        public abstract void write_value(OutputStream os)
        Writes out the value of this Any object to the given output stream. If both typecode and value need to be written, use create_output_stream() to create an OutputStream, then use write_any on the OutputStream.

        If this method is called on an Any object that has not had a value inserted into its value field, it will throw the exception java.lang.NullPointerException.

        Parameters:
        os - the org.omg.CORBA.portable.OutputStream object into which to marshal the value of this Any object

      • create_output_stream

        public abstract OutputStream create_output_stream()
        Creates an output stream into which this Any object's value can be marshalled.
        Returns:
        the newly-created OutputStream

      • create_input_stream

        public abstract InputStream create_input_stream()
        Creates an input stream from which this Any object's value can be unmarshalled.
        Returns:
        the newly-created InputStream

      • extract_short

        public abstract short extract_short()
                             throws BAD_OPERATION
        Extracts the short in this Any object's value field.
        Returns:
        the short stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

      • insert_short

        public abstract void insert_short(short s)
        Inserts the given short into this Any object's value field.
        Parameters:
        s - the short to insert into this Any object

      • extract_long

        public abstract int extract_long()
                          throws BAD_OPERATION
        Extracts the int in this Any object's value field.
        Returns:
        the int stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

      • insert_long

        public abstract void insert_long(int l)
        Inserts the given int into this Any object's value field.
        Parameters:
        l - the int to insert into this Any object

      • extract_longlong

        public abstract long extract_longlong()
                               throws BAD_OPERATION
        Extracts the long in this Any object's value field.
        Returns:
        the long stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

      • insert_longlong

        public abstract void insert_longlong(long l)
        Inserts the given long into this Any object's value field.
        Parameters:
        l - the long to insert into this Any object

      • extract_ushort

        public abstract short extract_ushort()
                              throws BAD_OPERATION
        Extracts the short in this Any object's value field.
        Returns:
        the short stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

      • insert_ushort

        public abstract void insert_ushort(short s)
        Inserts the given short into this Any object's value field.
        Parameters:
        s - the short to insert into this Any object

      • extract_ulong

        public abstract int extract_ulong()
                           throws BAD_OPERATION
        Extracts the int in this Any object's value field.
        Returns:
        the int stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

      • insert_ulong

        public abstract void insert_ulong(int l)
        Inserts the given int into this Any object's value field.
        Parameters:
        l - the int to insert into this Any object

      • extract_ulonglong

        public abstract long extract_ulonglong()
                                throws BAD_OPERATION
        Extracts the long in this Any object's value field.
        Returns:
        the long stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

      • insert_ulonglong

        public abstract void insert_ulonglong(long l)
        Inserts the given long into this Any object's value field.
        Parameters:
        l - the long to insert into this Any object

      • extract_float

        public abstract float extract_float()
                             throws BAD_OPERATION
        Extracts the float in this Any object's value field.
        Returns:
        the float stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a float or the value field has not yet been set

      • insert_float

        public abstract void insert_float(float f)
        Inserts the given float into this Any object's value field.
        Parameters:
        f - the float to insert into this Any object

      • extract_double

        public abstract double extract_double()
                               throws BAD_OPERATION
        Extracts the double in this Any object's value field.
        Returns:
        the double stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a double or the value field has not yet been set

      • insert_double

        public abstract void insert_double(double d)
        Inserts the given double into this Any object's value field.
        Parameters:
        d - the double to insert into this Any object

      • extract_boolean

        public abstract boolean extract_boolean()
                                 throws BAD_OPERATION
        Extracts the boolean in this Any object's value field.
        Returns:
        the boolean stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a boolean or the value field has not yet been set

      • insert_boolean

        public abstract void insert_boolean(boolean b)
        Inserts the given boolean into this Any object's value field.
        Parameters:
        b - the boolean to insert into this Any object

      • extract_char

        public abstract char extract_char()
                           throws BAD_OPERATION
        Extracts the char in this Any object's value field.
        Returns:
        the char stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

      • insert_char

        public abstract void insert_char(char c)
                          throws DATA_CONVERSION
        Inserts the given char into this Any object's value field.
        Parameters:
        c - the char to insert into this Any object
        Throws:
        DATA_CONVERSION - if there is a data conversion error

      • extract_wchar

        public abstract char extract_wchar()
                            throws BAD_OPERATION
        Extracts the char in this Any object's value field.
        Returns:
        the char stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

      • insert_wchar

        public abstract void insert_wchar(char c)
        Inserts the given char into this Any object's value field.
        Parameters:
        c - the char to insert into this Any object

      • extract_octet

        public abstract byte extract_octet()
                            throws BAD_OPERATION
        Extracts the byte in this Any object's value field.
        Returns:
        the byte stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a byte or the value field has not yet been set

      • insert_octet

        public abstract void insert_octet(byte b)
        Inserts the given byte into this Any object's value field.
        Parameters:
        b - the byte to insert into this Any object

      • extract_any

        public abstract Any extract_any()
                         throws BAD_OPERATION
        Extracts the Any object in this Any object's value field.
        Returns:
        the Any object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than an Any object or the value field has not yet been set

      • insert_any

        public abstract void insert_any(Any a)
        Inserts the given Any object into this Any object's value field.
        Parameters:
        a - the Any object to insert into this Any object

      • extract_Object

        public abstract Object extract_Object()
                               throws BAD_OPERATION
        Extracts the org.omg.CORBA.Object in this Any object's value field.
        Returns:
        the org.omg.CORBA.Object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than an org.omg.CORBA.Object or the value field has not yet been set

      • insert_Object

        public abstract void insert_Object(Object o)
        Inserts the given org.omg.CORBA.Object object into this Any object's value field.
        Parameters:
        o - the org.omg.CORBA.Object object to insert into this Any object

      • extract_Value

        public abstract Serializable extract_Value()
                                    throws BAD_OPERATION
        Extracts the java.io.Serializable object in this Any object's value field.
        Returns:
        the java.io.Serializable object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a java.io.Serializable object or the value field has not yet been set

      • insert_Value

        public abstract void insert_Value(Serializable v)
        Inserts the given java.io.Serializable object into this Any object's value field.
        Parameters:
        v - the java.io.Serializable object to insert into this Any object

      • insert_Value

        public abstract void insert_Value(Serializable v,
                                  TypeCode t)
                           throws MARSHAL
        Inserts the given java.io.Serializable object into this Any object's value field.
        Parameters:
        v - the java.io.Serializable object to insert into this Any object
        t - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.io.Serializable object being inserted
        Throws:
        MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

      • insert_Object

        public abstract void insert_Object(Object o,
                                   TypeCode t)
                            throws BAD_PARAM
        Inserts the given org.omg.CORBA.Object object into this Any object's value field.
        Parameters:
        o - the org.omg.CORBA.Object instance to insert into this Any object
        t - the TypeCode object that is to be inserted into this Any object and that describes the Object being inserted
        Throws:
        BAD_OPERATION - if this method is invalid for this Any object
        BAD_PARAM

      • extract_string

        public abstract String extract_string()
                               throws BAD_OPERATION
        Extracts the String object in this Any object's value field.
        Returns:
        the String object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

      • insert_string

        public abstract void insert_string(String s)
                            throws DATA_CONVERSION,
                                   MARSHAL
        Inserts the given String object into this Any object's value field.
        Parameters:
        s - the String object to insert into this Any object
        Throws:
        DATA_CONVERSION - if there is a data conversion error
        MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

      • extract_wstring

        public abstract String extract_wstring()
                                throws BAD_OPERATION
        Extracts the String object in this Any object's value field.
        Returns:
        the String object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

      • insert_wstring

        public abstract void insert_wstring(String s)
                             throws MARSHAL
        Inserts the given String object into this Any object's value field.
        Parameters:
        s - the String object to insert into this Any object
        Throws:
        MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

      • extract_TypeCode

        public abstract TypeCode extract_TypeCode()
                                   throws BAD_OPERATION
        Extracts the TypeCode object in this Any object's value field.
        Returns:
        the TypeCode object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a TypeCode object or the value field has not yet been set

      • insert_TypeCode

        public abstract void insert_TypeCode(TypeCode t)
        Inserts the given TypeCode object into this Any object's value field.
        Parameters:
        t - the TypeCode object to insert into this Any object

      • extract_Principal

        @Deprecated
public Principal extract_Principal()
                                        throws BAD_OPERATION
        Deprecated. Deprecated by CORBA 2.2.
        Extracts the Principal object in this Any object's value field. Note that the class Principal has been deprecated.
        Returns:
        the Principal object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a Principal object or the value field has not yet been set
        See Also:
        CORBA package comments for unimplemented features

      • insert_Principal

        @Deprecated
public void insert_Principal(Principal p)
        Deprecated. Deprecated by CORBA 2.2.
        Inserts the given Principal object into this Any object's value field. Note that the class Principal has been deprecated.
        Parameters:
        p - the Principal object to insert into this Any object
        See Also:
        CORBA package comments for unimplemented features

      • extract_Streamable

        public Streamable extract_Streamable()
                              throws BAD_INV_ORDER
        Extracts a Streamable from this Any object's value field. This method allows the extraction of non-primitive IDL types.
        Returns:
        the Streamable stored in the Any object.
        Throws:
        BAD_INV_ORDER - if the caller has invoked operations in the wrong order
        See Also:
        CORBA package comments for unimplemented features

      • insert_Streamable

        public void insert_Streamable(Streamable s)
        Inserts the given Streamable object into this Any object's value field. This method allows the insertion of non-primitive IDL types.
        Parameters:
        s - the Streamable object to insert into this Any object; may be a non-primitive IDL type
        See Also:
        CORBA package comments for unimplemented features

      • extract_fixed

        public BigDecimal extract_fixed()
        Extracts the java.math.BigDecimal object in this Any object's value field.
        Returns:
        the java.math.BigDecimal object stored in this Any object
        Throws:
        BAD_OPERATION - if this Any object contains something other than a java.math.BigDecimal object or the value field has not yet been set
        See Also:
        CORBA package comments for unimplemented features

      • insert_fixed

        public void insert_fixed(BigDecimal value)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Inserts the given java.math.BigDecimal object into this Any object's value field.

        Parameters:
        value - the java.math.BigDecimal object to insert into this Any object
        See Also:
        CORBA package comments for unimplemented features

      • insert_fixed

        public void insert_fixed(BigDecimal value,
                         TypeCode type)
                  throws BAD_INV_ORDER
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Inserts the given java.math.BigDecimal object into this Any object's value field.

        Parameters:
        value - the java.math.BigDecimal object to insert into this Any object
        type - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.math.BigDecimal object being inserted
        Throws:
        BAD_INV_ORDER - if this method is invoked improperly
        See Also:
        CORBA package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AnyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class AnyHolder

  • java.lang.Object
    • org.omg.CORBA.AnyHolder
  • All Implemented Interfaces:
    Streamable

    public final class AnyHolder
extends Object
implements Streamable
    The Holder for Any. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL any as an "out" or "inout" parameter, the programmer must pass an instance of AnyHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myAnyHolder is an instance of AnyHolder, the value stored in its value field can be accessed with myAnyHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Any value
      The Any value held by this AnyHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      AnyHolder()
      Constructs a new AnyHolder object with its value field initialized to null.
      AnyHolder(Any initial)
      Constructs a new AnyHolder object for the given Any object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode object corresponding to the value held in this AnyHolder object.
      void _write(OutputStream output)
      Marshals to output the value in this AnyHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Any value
        The Any value held by this AnyHolder object.

    • Constructor Detail

      • AnyHolder

        public AnyHolder()
        Constructs a new AnyHolder object with its value field initialized to null.

      • AnyHolder

        public AnyHolder(Any initial)
        Constructs a new AnyHolder object for the given Any object.
        Parameters:
        initial - the Any object with which to initialize the value field of the new AnyHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire.

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this AnyHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data.

      • _type

        public TypeCode _type()
        Returns the TypeCode object corresponding to the value held in this AnyHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this AnyHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class AnySeqHelper

  • java.lang.Object
    • org.omg.CORBA.AnySeqHelper

  • public abstract class AnySeqHelper
extends Object
    The Helper for AnySeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/AnySeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      AnySeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Any[] | extract(Any a)
      static String | id()
      static void | insert(Any a, Any[] that)
      static Any[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Any[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AnySeqHelper

        public AnySeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Any[] that)

      • extract

        public static Any[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Any[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Any[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AnySeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class AnySeqHolder

  • java.lang.Object
    • org.omg.CORBA.AnySeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class AnySeqHolder
extends Object
implements Streamable
    The Holder for AnySeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Any[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      AnySeqHolder()
      AnySeqHolder(Any[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Any[] value

    • Constructor Detail

      • AnySeqHolder

        public AnySeqHolder()

      • AnySeqHolder

        public AnySeqHolder(Any[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ARG_IN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface ARG_IN

  • public interface ARG_IN
    Signifies an "input" argument to an invocation, meaning that the argument is being passed from the client to the server. ARG_IN.value is one of the possible values used to indicate the direction in which a parameter is being passed during an invocation performed using the Dynamic Invocation Interface (DII).

    The code fragment below shows a typical usage:

        ORB orb = ORB.init(args, null);
    org.omg.CORBA.NamedValue nv = orb.create_named_value(
         "IDLArgumentIdentifier", myAny, org.omg.CORBA.ARG_IN.value);
    Since:
    JDK1.2
    See Also:
    NamedValue

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value indicating an input argument.

    • Field Detail

      • value

        static final int value
        The value indicating an input argument.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ARG_INOUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface ARG_INOUT

  • public interface ARG_INOUT
    Signifies an argument used for both input and output in an invocation, meaning that the argument is being passed from the client to the server and then back from the server to the client. ARG_INOUT.value is one of the possible values used to indicate the direction in which a parameter is being passed during a dynamic invocation using the Dynamic Invocation Interface (DII).

    The code fragment below shows a typical usage:

      ORB orb = ORB.init(args, null);
  org.omg.CORBA.NamedValue nv = orb.create_named_value(
        "argumentIdentifier", myAny, org.omg.CORBA.ARG_INOUT.value);
    Since:
    JDK1.2
    See Also:
    NamedValue

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The constant value indicating an argument used for both input and output.

    • Field Detail

      • value

        static final int value
        The constant value indicating an argument used for both input and output.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ARG_OUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface ARG_OUT

  • public interface ARG_OUT
    A constant that signifies an "output" argument to an invocation, meaning that the argument is being passed from the server to the client. ARG_OUT.value is one of the possible values used to indicate the direction in which a parameter is being passed during a dynamic invocation using the Dynamic Invocation Interface (DII).

    The code fragment below shows a typical usage:

      ORB orb = ORB.init(args, null);
  org.omg.CORBA.NamedValue nv = orb.create_named_value(
        "argumentIdentifier", myAny, org.omg.CORBA.ARG_OUT.value);
    Since:
    JDK1.2
    See Also:
    NamedValue

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The constant value indicating an output argument.

    • Field Detail

      • value

        static final int value
        The constant value indicating an output argument.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_CONTEXT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_CONTEXT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_CONTEXT
  • All Implemented Interfaces:
    Serializable

    public final class BAD_CONTEXT
extends SystemException
    Exception thrown when an operation is invoked by a client but the passed context does not contain the context values required by the operation.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_CONTEXT()
      Constructs a BAD_CONTEXT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      BAD_CONTEXT(int minor, CompletionStatus completed)
      Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
      BAD_CONTEXT(String s)
      Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
      BAD_CONTEXT(String s, int minor, CompletionStatus completed)
      Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_CONTEXT

        public BAD_CONTEXT()
        Constructs a BAD_CONTEXT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • BAD_CONTEXT

        public BAD_CONTEXT(String s)
        Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
        Parameters:
        s - a String object containing a detail message

      • BAD_CONTEXT

        public BAD_CONTEXT(int minor,
                   CompletionStatus completed)
        Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status

      • BAD_CONTEXT

        public BAD_CONTEXT(String s,
                   int minor,
                   CompletionStatus completed)
        Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_INV_ORDER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_INV_ORDER

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_INV_ORDER
  • All Implemented Interfaces:
    Serializable

    public final class BAD_INV_ORDER
extends SystemException
    This exception indicates that the caller has invoked operations in the wrong order. For example, it can be raised by an ORB if an application makes an ORB-related call without having correctly initialized the ORB first.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_INV_ORDER()
      Constructs a BAD_INV_ORDER exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      BAD_INV_ORDER(int minor, CompletionStatus completed)
      Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
      BAD_INV_ORDER(String s)
      Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      BAD_INV_ORDER(String s, int minor, CompletionStatus completed)
      Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_INV_ORDER

        public BAD_INV_ORDER()
        Constructs a BAD_INV_ORDER exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • BAD_INV_ORDER

        public BAD_INV_ORDER(String s)
        Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • BAD_INV_ORDER

        public BAD_INV_ORDER(int minor,
                     CompletionStatus completed)
        Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status

      • BAD_INV_ORDER

        public BAD_INV_ORDER(String s,
                     int minor,
                     CompletionStatus completed)
        Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_OPERATION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_OPERATION

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_OPERATION
  • All Implemented Interfaces:
    Serializable

    public final class BAD_OPERATION
extends SystemException
    Exception thrown when an object reference denotes an existing object, but that the object does not support the operation that was invoked.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_OPERATION()
      Constructs a BAD_OPERATION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      BAD_OPERATION(int minor, CompletionStatus completed)
      Constructs a BAD_OPERATION exception with the specified minor code and completion status.
      BAD_OPERATION(String s)
      Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      BAD_OPERATION(String s, int minor, CompletionStatus completed)
      Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_OPERATION

        public BAD_OPERATION()
        Constructs a BAD_OPERATION exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • BAD_OPERATION

        public BAD_OPERATION(String s)
        Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • BAD_OPERATION

        public BAD_OPERATION(int minor,
                     CompletionStatus completed)
        Constructs a BAD_OPERATION exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status

      • BAD_OPERATION

        public BAD_OPERATION(String s,
                     int minor,
                     CompletionStatus completed)
        Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_PARAM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_PARAM

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_PARAM
  • All Implemented Interfaces:
    Serializable

    public final class BAD_PARAM
extends SystemException
    Exception thrown when a parameter passed to a call is out of range or otherwise considered illegal. An ORB may raise this exception if null values or null pointers are passed to an operation (for language mappings where the concept of a null pointers or null values applies). BAD_PARAM can also be raised as a result of a client generating requests with incorrect parameters using the DII.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions, meaning of minor codes

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_PARAM()
      Constructs a BAD_PARAM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      BAD_PARAM(int minor, CompletionStatus completed)
      Constructs a BAD_PARAM exception with the specified minor code and completion status.
      BAD_PARAM(String s)
      Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      BAD_PARAM(String s, int minor, CompletionStatus completed)
      Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_PARAM

        public BAD_PARAM()
        Constructs a BAD_PARAM exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • BAD_PARAM

        public BAD_PARAM(String s)
        Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message describing this exception

      • BAD_PARAM

        public BAD_PARAM(int minor,
                 CompletionStatus completed)
        Constructs a BAD_PARAM exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • BAD_PARAM

        public BAD_PARAM(String s,
                 int minor,
                 CompletionStatus completed)
        Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface BAD_POLICY

  • public interface BAD_POLICY
    A PolicyErrorCode which would be filled in the PolicyError exception.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The Error code in PolicyError exception.

    • Field Detail

      • value

        static final short value
        The Error code in PolicyError exception.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_POLICY_TYPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface BAD_POLICY_TYPE

  • public interface BAD_POLICY_TYPE
    A PolicyErrorCode which would be filled in the PolicyError exception.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The Error code in PolicyError exception.

    • Field Detail

      • value

        static final short value
        The Error code in PolicyError exception.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_POLICY_VALUE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface BAD_POLICY_VALUE

  • public interface BAD_POLICY_VALUE
    Contains the value used to indicate a policy value that is incorrect for a valid policy type in a call to the create_policy method defined in the ORB class.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The value used to represent a bad policy value error in a PolicyError exception.

    • Field Detail

      • value

        static final short value
        The value used to represent a bad policy value error in a PolicyError exception.
        See Also:
        PolicyError, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_QOS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_QOS

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_QOS
  • All Implemented Interfaces:
    Serializable

    public final class BAD_QOS
extends SystemException
    The BAD_QOS exception is raised whenever an object cannot support the quality of service required by an invocation parameter that has a quality of service semantics associated with it.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_QOS()
      Constructs an BAD_QOS exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      BAD_QOS(int minorCode, CompletionStatus completionStatus)
      Constructs an BAD_QOS exception with the specified minor code and completion status.
      BAD_QOS(String detailMessage)
      Constructs an BAD_QOS exception with the specified message.
      BAD_QOS(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an BAD_QOS exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_QOS

        public BAD_QOS()
        Constructs an BAD_QOS exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • BAD_QOS

        public BAD_QOS(String detailMessage)
        Constructs an BAD_QOS exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • BAD_QOS

        public BAD_QOS(int minorCode,
               CompletionStatus completionStatus)
        Constructs an BAD_QOS exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • BAD_QOS

        public BAD_QOS(String detailMessage,
               int minorCode,
               CompletionStatus completionStatus)
        Constructs an BAD_QOS exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BAD_TYPECODE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BAD_TYPECODE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.BAD_TYPECODE
  • All Implemented Interfaces:
    Serializable

    public final class BAD_TYPECODE
extends SystemException
    Exception thrown when the ORB has encountered a malformed type code (for example, a type code with an invalid TCKind value).

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      BAD_TYPECODE()
      Constructs a BAD_TYPECODE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      BAD_TYPECODE(int minor, CompletionStatus completed)
      Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
      BAD_TYPECODE(String s)
      Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
      BAD_TYPECODE(String s, int minor, CompletionStatus completed)
      Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BAD_TYPECODE

        public BAD_TYPECODE()
        Constructs a BAD_TYPECODE exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • BAD_TYPECODE

        public BAD_TYPECODE(String s)
        Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • BAD_TYPECODE

        public BAD_TYPECODE(int minor,
                    CompletionStatus completed)
        Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status

      • BAD_TYPECODE

        public BAD_TYPECODE(String s,
                    int minor,
                    CompletionStatus completed)
        Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BooleanHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BooleanHolder

  • java.lang.Object
    • org.omg.CORBA.BooleanHolder
  • All Implemented Interfaces:
    Streamable

    public final class BooleanHolder
extends Object
implements Streamable
    The Holder for Boolean. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL boolean as an "out" or "inout" parameter, the programmer must pass an instance of BooleanHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myBooleanHolder is an instance of BooleanHolder, the value stored in its value field can be accessed with myBooleanHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      boolean value
      The boolean value held by this BooleanHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      BooleanHolder()
      Constructs a new BooleanHolder object with its value field initialized to false.
      BooleanHolder(boolean initial)
      Constructs a new BooleanHolder object with its value field initialized with the given boolean.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
      TypeCode _type()
      Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
      void _write(OutputStream output)
      Marshals the value in this BooleanHolder object's value field to the output stream output.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public boolean value
        The boolean value held by this BooleanHolder object.

    • Constructor Detail

      • BooleanHolder

        public BooleanHolder()
        Constructs a new BooleanHolder object with its value field initialized to false.

      • BooleanHolder

        public BooleanHolder(boolean initial)
        Constructs a new BooleanHolder object with its value field initialized with the given boolean.
        Parameters:
        initial - the boolean with which to initialize the value field of the newly-created BooleanHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream object containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals the value in this BooleanHolder object's value field to the output stream output.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode for the value held in this BooleanHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BooleanSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BooleanSeqHelper

  • java.lang.Object
    • org.omg.CORBA.BooleanSeqHelper

  • public abstract class BooleanSeqHelper
extends Object
    The Helper for BooleanSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/BooleanSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      BooleanSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static boolean[] | extract(Any a)
      static String | id()
      static void | insert(Any a, boolean[] that)
      static boolean[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, boolean[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • BooleanSeqHelper

        public BooleanSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          boolean[] that)

      • extract

        public static boolean[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static boolean[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         boolean[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BooleanSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class BooleanSeqHolder

  • java.lang.Object
    • org.omg.CORBA.BooleanSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class BooleanSeqHolder
extends Object
implements Streamable
    The Holder for BooleanSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      boolean[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      BooleanSeqHolder()
      BooleanSeqHolder(boolean[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public boolean[] value

    • Constructor Detail

      • BooleanSeqHolder

        public BooleanSeqHolder()

      • BooleanSeqHolder

        public BooleanSeqHolder(boolean[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Bounds

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Bounds

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.Bounds
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Bounds
extends UserException
    A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
    See Also:
    documentation on Java IDL exceptions

    • Constructor Summary

      Constructors
      Constructor and Description
      Bounds()
      Constructs an Bounds with no specified detail message.
      Bounds(String reason)
      Constructs an Bounds with the specified detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • Bounds

        public Bounds()
        Constructs an Bounds with no specified detail message.

      • Bounds

        public Bounds(String reason)
        Constructs an Bounds with the specified detail message.
        Parameters:
        reason - the detail message.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ByteHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ByteHolder

  • java.lang.Object
    • org.omg.CORBA.ByteHolder
  • All Implemented Interfaces:
    Streamable

    public final class ByteHolder
extends Object
implements Streamable
    The Holder for Byte. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL octet as an "out" or "inout" parameter, the programmer must pass an instance of ByteHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myByteHolder is an instance of ByteHolder, the value stored in its value field can be accessed with myByteHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte value
      The byte value held by this ByteHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      ByteHolder()
      Constructs a new ByteHolder object with its value field initialized to 0.
      ByteHolder(byte initial)
      Constructs a new ByteHolder object for the given byte.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode corresponding to the value held in this ByteHolder object.
      void _write(OutputStream output)
      Marshals to output the value in this ByteHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public byte value
        The byte value held by this ByteHolder object.

    • Constructor Detail

      • ByteHolder

        public ByteHolder()
        Constructs a new ByteHolder object with its value field initialized to 0.

      • ByteHolder

        public ByteHolder(byte initial)
        Constructs a new ByteHolder object for the given byte.
        Parameters:
        initial - the byte with which to initialize the value field of the new ByteHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire.

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this ByteHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data.

      • _type

        public TypeCode _type()
        Returns the TypeCode corresponding to the value held in this ByteHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this ByteHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CharHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CharHolder

  • java.lang.Object
    • org.omg.CORBA.CharHolder
  • All Implemented Interfaces:
    Streamable

    public final class CharHolder
extends Object
implements Streamable
    The Holder for Char. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL char as an "out" or "inout" parameter, the programmer must pass an instance of CharHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myCharHolder is an instance of CharHolder, the value stored in its value field can be accessed with myCharHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      char value
      The char value held by this CharHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      CharHolder()
      Constructs a new CharHolder object with its value field initialized to 0.
      CharHolder(char initial)
      Constructs a new CharHolder object for the given char.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode object corresponding to the value held in this CharHolder object.
      void _write(OutputStream output)
      Marshals to output the value in this CharHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public char value
        The char value held by this CharHolder object.

    • Constructor Detail

      • CharHolder

        public CharHolder()
        Constructs a new CharHolder object with its value field initialized to 0.

      • CharHolder

        public CharHolder(char initial)
        Constructs a new CharHolder object for the given char.
        Parameters:
        initial - the char with which to initialize the value field of the new CharHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this CharHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Returns the TypeCode object corresponding to the value held in this CharHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this CharHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CharSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CharSeqHelper

  • java.lang.Object
    • org.omg.CORBA.CharSeqHelper

  • public abstract class CharSeqHelper
extends Object
    The Helper for CharSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/CharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      CharSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static char[] | extract(Any a)
      static String | id()
      static void | insert(Any a, char[] that)
      static char[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, char[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CharSeqHelper

        public CharSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          char[] that)

      • extract

        public static char[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static char[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         char[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CharSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CharSeqHolder

  • java.lang.Object
    • org.omg.CORBA.CharSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class CharSeqHolder
extends Object
implements Streamable
    The Holder for CharSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      char[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      CharSeqHolder()
      CharSeqHolder(char[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public char[] value

    • Constructor Detail

      • CharSeqHolder

        public CharSeqHolder()

      • CharSeqHolder

        public CharSeqHolder(char[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ACTIVITY_COMPLETED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ACTIVITY_COMPLETED

No usage of org.omg.CORBA.ACTIVITY_COMPLETED
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ACTIVITY_REQUIRED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ACTIVITY_REQUIRED

No usage of org.omg.CORBA.ACTIVITY_REQUIRED
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Any

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Any

  • Packages that use Any
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.Dynamic
    This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of Any in org.omg.CORBA

      Fields in org.omg.CORBA declared as Any
      Modifier and Type | Field and Description
      Any UnknownUserException.except
      The Any instance that contains the actual user exception thrown by the server.
      Any UnionMember.label
      The label of the union member described by this UnionMember object.
      Any NameValuePair.value
      The value to be associated with a name by this NameValuePair object.
      Any AnyHolder.value
      The Any value held by this AnyHolder object.
      Any[] | AnySeqHolder.value
      Methods in org.omg.CORBA that return Any
      Modifier and Type | Method and Description
      abstract Any Request.add_in_arg()
      Creates an input argument and adds it to this Request object.
      abstract Any Request.add_inout_arg()
      Adds an input/output argument to this Request object.
      abstract Any Request.add_named_in_arg(String name)
      Creates an input argument with the given name and adds it to this Request object.
      abstract Any Request.add_named_inout_arg(String name)
      Adds an input/output argument with the given name to this Request object.
      abstract Any Request.add_named_out_arg(String name)
      Adds an output argument with the given name to this Request object.
      abstract Any Request.add_out_arg()
      Adds an output argument to this Request object.
      abstract Any ORB.create_any()
      Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
      abstract Any Any.extract_any()
      Extracts the Any object in this Any object's value field.
      static Any[] | AnySeqHelper.extract(Any a)
      Any DynAny.get_any()
      Deprecated.
      Retrieves the org.omg.CORBA.Any contained in this DynAny object.
      Any[] DynSequence.get_elements()
      Deprecated.
      Returns the value of every element in this sequence.
      Any[] DynArray.get_elements()
      Deprecated.
      Returns the value of all the elements of this array.
      abstract Any TypeCode.member_label(int index)
      Retrieves the label of the union member identified by the given index.
      Any DataInputStream.read_any()
      Reads an IDL Any value from the input stream.
      static Any[] | AnySeqHelper.read(InputStream istream)
      abstract Any Request.return_value()
      Returns the Any object that contains the value for the result of the method.
      Any DynAny.to_any()
      Deprecated.
      Convert a DynAny object to an Any object.
      abstract Any NamedValue.value()
      Retrieves the value for this NamedValue object.
      Methods in org.omg.CORBA with parameters of type Any
      Modifier and Type | Method and Description
      abstract NamedValue NVList.add_value(String item_name, Any val, int flags)
      Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
      DynAny ORB.create_dyn_any(Any value)
      Deprecated.
      Use the new DynAnyFactory API instead
      abstract NamedValue ORB.create_named_value(String s, Any any, int flags)
      Creates a NamedValue object using the given name, value, and argument mode flags.
      Policy ORB.create_policy(int type, Any val)
      Can be invoked to create new instances of policy objects of a specific type with specified initial state.
      abstract boolean Any.equal(Any a)
      Checks for equality between this Any object and the given Any object.
      void ServerRequest.except(Any any)
      Deprecated.
      use set_exception()
      static NameValuePair | NameValuePairHelper.extract(Any a)
      static int | PolicyTypeHelper.extract(Any a)
      static ServiceDetail | ServiceDetailHelper.extract(Any a)
      static SetOverrideType | SetOverrideTypeHelper.extract(Any a)
      static CompletionStatus | CompletionStatusHelper.extract(Any a)
      static byte[] | OctetSeqHelper.extract(Any a)
      static String | RepositoryIdHelper.extract(Any a)
      static Policy[] | PolicyListHelper.extract(Any a)
      static Current | CurrentHelper.extract(Any a)
      static ParameterMode | ParameterModeHelper.extract(Any a)
      static String | FieldNameHelper.extract(Any a)
      static StructMember | StructMemberHelper.extract(Any a)
      static Policy | PolicyHelper.extract(Any a)
      static String | WStringValueHelper.extract(Any a)
      static String[] | WStringSeqHelper.extract(Any a)
      static short | PolicyErrorCodeHelper.extract(Any a)
      static int[] | LongSeqHelper.extract(Any a)
      static long[] | LongLongSeqHelper.extract(Any a)
      static double[] | DoubleSeqHelper.extract(Any a)
      static UnionMember | UnionMemberHelper.extract(Any a)
      static Object | ObjectHelper.extract(Any a)
      static IDLType | IDLTypeHelper.extract(Any a)
      static Any[] | AnySeqHelper.extract(Any a)
      static ValueMember | ValueMemberHelper.extract(Any a)
      static UnknownUserException | UnknownUserExceptionHelper.extract(Any a)
      static long[] | ULongLongSeqHelper.extract(Any a)
      static char[] | CharSeqHelper.extract(Any a)
      static short | VisibilityHelper.extract(Any a)
      static String[] | StringSeqHelper.extract(Any a)
      static boolean[] | BooleanSeqHelper.extract(Any a)
      static PolicyError | PolicyErrorHelper.extract(Any a)
      static WrongTransaction | WrongTransactionHelper.extract(Any a)
      static String | VersionSpecHelper.extract(Any a)
      static Serializable | ValueBaseHelper.extract(Any a)
      static int[] | ULongSeqHelper.extract(Any a)
      static float[] | FloatSeqHelper.extract(Any a)
      static char[] | WCharSeqHelper.extract(Any a)
      static ServiceInformation | ServiceInformationHelper.extract(Any a)
      static String | StringValueHelper.extract(Any a)
      static short[] | UShortSeqHelper.extract(Any a)
      static short[] | ShortSeqHelper.extract(Any a)
      static String | IdentifierHelper.extract(Any a)
      static DefinitionKind | DefinitionKindHelper.extract(Any a)
      void DynAny.from_any(Any value)
      Deprecated.
      Make a DynAny object from an Any object.
      abstract void Any.insert_any(Any a)
      Inserts the given Any object into this Any object's value field.
      void DynAny.insert_any(Any value)
      Deprecated.
      Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
      static void | AnySeqHelper.insert(Any a, Any[] that)
      static void | AnySeqHelper.insert(Any a, Any[] that)
      static void | BooleanSeqHelper.insert(Any a, boolean[] that)
      static void | OctetSeqHelper.insert(Any a, byte[] that)
      static void | CharSeqHelper.insert(Any a, char[] that)
      static void | WCharSeqHelper.insert(Any a, char[] that)
      static void | CompletionStatusHelper.insert(Any a, CompletionStatus that)
      static void | CurrentHelper.insert(Any a, Current that)
      static void | DefinitionKindHelper.insert(Any a, DefinitionKind that)
      static void | DoubleSeqHelper.insert(Any a, double[] that)
      static void | FloatSeqHelper.insert(Any a, float[] that)
      static void | IDLTypeHelper.insert(Any a, IDLType that)
      static void | PolicyTypeHelper.insert(Any a, int that)
      static void | LongSeqHelper.insert(Any a, int[] that)
      static void | ULongSeqHelper.insert(Any a, int[] that)
      static void | LongLongSeqHelper.insert(Any a, long[] that)
      static void | ULongLongSeqHelper.insert(Any a, long[] that)
      static void | NameValuePairHelper.insert(Any a, NameValuePair that)
      static void | ObjectHelper.insert(Any a, Object that)
      static void | ParameterModeHelper.insert(Any a, ParameterMode that)
      static void | PolicyHelper.insert(Any a, Policy that)
      static void | PolicyListHelper.insert(Any a, Policy[] that)
      static void | PolicyErrorHelper.insert(Any a, PolicyError that)
      static void | ValueBaseHelper.insert(Any a, Serializable that)
      static void | ServiceDetailHelper.insert(Any a, ServiceDetail that)
      static void | ServiceInformationHelper.insert(Any a, ServiceInformation that)
      static void | SetOverrideTypeHelper.insert(Any a, SetOverrideType that)
      static void | PolicyErrorCodeHelper.insert(Any a, short that)
      static void | VisibilityHelper.insert(Any a, short that)
      static void | UShortSeqHelper.insert(Any a, short[] that)
      static void | ShortSeqHelper.insert(Any a, short[] that)
      static void | RepositoryIdHelper.insert(Any a, String that)
      static void | FieldNameHelper.insert(Any a, String that)
      static void | WStringValueHelper.insert(Any a, String that)
      static void | VersionSpecHelper.insert(Any a, String that)
      static void | StringValueHelper.insert(Any a, String that)
      static void | IdentifierHelper.insert(Any a, String that)
      static void | WStringSeqHelper.insert(Any a, String[] that)
      static void | StringSeqHelper.insert(Any a, String[] that)
      static void | StructMemberHelper.insert(Any a, StructMember that)
      static void | UnionMemberHelper.insert(Any a, UnionMember that)
      static void | UnknownUserExceptionHelper.insert(Any a, UnknownUserException that)
      static void | ValueMemberHelper.insert(Any a, ValueMember that)
      static void | WrongTransactionHelper.insert(Any a, WrongTransaction that)
      void ServerRequest.result(Any any)
      Deprecated.
      use the method set_result
      void DynSequence.set_elements(Any[] value)
      Deprecated.
      Sets the values of all elements in this sequence with the given array.
      void DynArray.set_elements(Any[] value)
      Deprecated.
      Sets the value of this DynArray object to the given array.
      void ServerRequest.set_exception(Any any)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      abstract void Context.set_one_value(String propname, Any propvalue)
      Creates a NamedValue object and adds it to this Context object.
      void ServerRequest.set_result(Any any)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      void DataOutputStream.write_any_array(Any[] seq, int offset, int length)
      Writes the array of IDL Anys from offset for length elements to the output stream.
      void DataOutputStream.write_any(Any value)
      Writes the Any value to the output stream.
      static void | AnySeqHelper.write(OutputStream ostream, Any[] value)
      Constructors in org.omg.CORBA with parameters of type Any
      Constructor and Description
      AnyHolder(Any initial)
      Constructs a new AnyHolder object for the given Any object.
      AnySeqHolder(Any[] initialValue)
      NameValuePair(String __id, Any __value)
      Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
      UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
      Constructs a new UnionMember object with its fields initialized to the given values.
      UnknownUserException(Any a)
      Constructs an UnknownUserException object that contains the given Any object.

    • Uses of Any in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Any
      Modifier and Type Method and Description
      abstract Any InputStream.read_any()
      Reads an Any from this input stream.
      Methods in org.omg.CORBA.portable with parameters of type Any
      Modifier and Type Method and Description
      abstract void OutputStream.write_any(Any value)
      Writes an Any on this output stream.

    • Uses of Any in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type Any
      Modifier and Type | Method and Description
      static Binding[] | BindingListHelper.extract(Any a)
      static NameComponent | NameComponentHelper.extract(Any a)
      static NamingContext | NamingContextHelper.extract(Any a)
      static NameComponent[] | NameHelper.extract(Any a)
      static BindingIterator | BindingIteratorHelper.extract(Any a)
      static Binding | BindingHelper.extract(Any a)
      static String | IstringHelper.extract(Any a)
      static NamingContextExt | NamingContextExtHelper.extract(Any a)
      static BindingType | BindingTypeHelper.extract(Any a)
      static void | BindingHelper.insert(Any a, Binding that)
      static void | BindingListHelper.insert(Any a, Binding[] that)
      static void | BindingIteratorHelper.insert(Any a, BindingIterator that)
      static void | BindingTypeHelper.insert(Any a, BindingType that)
      static void | NameComponentHelper.insert(Any a, NameComponent that)
      static void | NameHelper.insert(Any a, NameComponent[] that)
      static void | NamingContextHelper.insert(Any a, NamingContext that)
      static void | NamingContextExtHelper.insert(Any a, NamingContextExt that)
      static void | IstringHelper.insert(Any a, String that)

    • Uses of Any in org.omg.CosNaming.NamingContextExtPackage

      Methods in org.omg.CosNaming.NamingContextExtPackage with parameters of type Any
      Modifier and Type | Method and Description
      static InvalidAddress | InvalidAddressHelper.extract(Any a)
      static String | StringNameHelper.extract(Any a)
      static String | URLStringHelper.extract(Any a)
      static String | AddressHelper.extract(Any a)
      static void | InvalidAddressHelper.insert(Any a, InvalidAddress that)
      static void | StringNameHelper.insert(Any a, String that)
      static void | URLStringHelper.insert(Any a, String that)
      static void | AddressHelper.insert(Any a, String that)

    • Uses of Any in org.omg.CosNaming.NamingContextPackage

      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type Any
      Modifier and Type | Method and Description
      static CannotProceed | CannotProceedHelper.extract(Any a)
      static AlreadyBound | AlreadyBoundHelper.extract(Any a)
      static InvalidName | InvalidNameHelper.extract(Any a)
      static NotFoundReason | NotFoundReasonHelper.extract(Any a)
      static NotEmpty | NotEmptyHelper.extract(Any a)
      static NotFound | NotFoundHelper.extract(Any a)
      static void | AlreadyBoundHelper.insert(Any a, AlreadyBound that)
      static void | CannotProceedHelper.insert(Any a, CannotProceed that)
      static void | InvalidNameHelper.insert(Any a, InvalidName that)
      static void | NotEmptyHelper.insert(Any a, NotEmpty that)
      static void | NotFoundHelper.insert(Any a, NotFound that)
      static void | NotFoundReasonHelper.insert(Any a, NotFoundReason that)

    • Uses of Any in org.omg.Dynamic

      Fields in org.omg.Dynamic declared as Any
      Modifier and Type | Field and Description
      Any | Parameter.argument
      Constructors in org.omg.Dynamic with parameters of type Any
      Constructor and Description
      Parameter(Any _argument, ParameterMode _mode)

    • Uses of Any in org.omg.DynamicAny

      Fields in org.omg.DynamicAny declared as Any
      Modifier and Type Field and Description
      Any NameValuePair.value
      The Any value associated with the name.
      Methods in org.omg.DynamicAny that return Any
      Modifier and Type | Method and Description
      static Any[] | AnySeqHelper.extract(Any a)
      Any _DynSequenceStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any DynAnyOperations.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynEnumStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynValueStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynArrayStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynStructStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynAnyStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynFixedStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynUnionStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any DynValueBoxOperations.get_boxed_value()
      Returns the boxed value as an Any.
      Any[] _DynSequenceStub.get_elements()
      Returns the elements of the sequence.
      Any[] DynArrayOperations.get_elements()
      Returns the elements of the DynArray.
      Any[] _DynArrayStub.get_elements()
      Returns the elements of the DynArray.
      Any[] DynSequenceOperations.get_elements()
      Returns the elements of the sequence.
      static Any[] | AnySeqHelper.read(InputStream istream)
      Any _DynSequenceStub.to_any()
      Creates an any value from a DynAny object.
      Any DynAnyOperations.to_any()
      Creates an any value from a DynAny object.
      Any _DynEnumStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynValueStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynArrayStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynStructStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynAnyStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynFixedStub.to_any()
      Creates an any value from a DynAny object.
      Any _DynUnionStub.to_any()
      Creates an any value from a DynAny object.
      Methods in org.omg.DynamicAny with parameters of type Any
      Modifier and Type | Method and Description
      DynAny DynAnyFactoryOperations.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.
      DynAny _DynAnyFactoryStub.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.
      static NameValuePair | NameValuePairHelper.extract(Any a)
      static DynUnion | DynUnionHelper.extract(Any a)
      static DynSequence | DynSequenceHelper.extract(Any a)
      static DynEnum | DynEnumHelper.extract(Any a)
      static DynArray | DynArrayHelper.extract(Any a)
      static DynAny[] | DynAnySeqHelper.extract(Any a)
      static String | FieldNameHelper.extract(Any a)
      static DynFixed | DynFixedHelper.extract(Any a)
      static DynAny | DynAnyHelper.extract(Any a)
      static Any[] | AnySeqHelper.extract(Any a)
      static NameDynAnyPair[] | NameDynAnyPairSeqHelper.extract(Any a)
      static DynValue | DynValueHelper.extract(Any a)
      static NameDynAnyPair | NameDynAnyPairHelper.extract(Any a)
      static NameValuePair[] | NameValuePairSeqHelper.extract(Any a)
      static DynStruct | DynStructHelper.extract(Any a)
      static DynAnyFactory | DynAnyFactoryHelper.extract(Any a)
      void _DynSequenceStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void DynAnyOperations.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynEnumStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynValueStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynArrayStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynStructStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynAnyStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynFixedStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynUnionStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynSequenceStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void DynAnyOperations.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynEnumStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynValueStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynArrayStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynStructStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynAnyStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynFixedStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynUnionStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      static void | AnySeqHelper.insert(Any a, Any[] that)
      static void | AnySeqHelper.insert(Any a, Any[] that)
      static void | DynAnyHelper.insert(Any a, DynAny that)
      static void | DynAnySeqHelper.insert(Any a, DynAny[] that)
      static void | DynAnyFactoryHelper.insert(Any a, DynAnyFactory that)
      static void | DynArrayHelper.insert(Any a, DynArray that)
      static void | DynEnumHelper.insert(Any a, DynEnum that)
      static void | DynFixedHelper.insert(Any a, DynFixed that)
      static void | DynSequenceHelper.insert(Any a, DynSequence that)
      static void | DynStructHelper.insert(Any a, DynStruct that)
      static void | DynUnionHelper.insert(Any a, DynUnion that)
      static void | DynValueHelper.insert(Any a, DynValue that)
      static void | NameDynAnyPairHelper.insert(Any a, NameDynAnyPair that)
      static void | NameDynAnyPairSeqHelper.insert(Any a, NameDynAnyPair[] that)
      static void | NameValuePairHelper.insert(Any a, NameValuePair that)
      static void | NameValuePairSeqHelper.insert(Any a, NameValuePair[] that)
      static void | FieldNameHelper.insert(Any a, String that)
      void DynValueBoxOperations.set_boxed_value(Any boxed)
      Replaces the boxed value with the specified value.
      void _DynSequenceStub.set_elements(Any[] value)
      Sets the elements of a sequence.
      void DynArrayOperations.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements(Any[] value)
      Sets the elements of a sequence.
      static void | AnySeqHelper.write(OutputStream ostream, Any[] value)
      Constructors in org.omg.DynamicAny with parameters of type Any
      Constructor and Description
      NameValuePair(String _id, Any _value)

    • Uses of Any in org.omg.DynamicAny.DynAnyFactoryPackage

      Methods in org.omg.DynamicAny.DynAnyFactoryPackage with parameters of type Any
      Modifier and Type | Method and Description
      static InconsistentTypeCode | InconsistentTypeCodeHelper.extract(Any a)
      static void | InconsistentTypeCodeHelper.insert(Any a, InconsistentTypeCode that)

    • Uses of Any in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage with parameters of type Any
      Modifier and Type | Method and Description
      static InvalidValue | InvalidValueHelper.extract(Any a)
      static TypeMismatch | TypeMismatchHelper.extract(Any a)
      static void | InvalidValueHelper.insert(Any a, InvalidValue that)
      static void | TypeMismatchHelper.insert(Any a, TypeMismatch that)

    • Uses of Any in org.omg.IOP

      Methods in org.omg.IOP that return Any
      Modifier and Type Method and Description
      Any CodecOperations.decode_value(byte[] data, TypeCode tc)
      Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.
      Any CodecOperations.decode(byte[] data)
      Decodes the given byte array into an Any based on the encoding format effective for this Codec.
      Methods in org.omg.IOP with parameters of type Any
      Modifier and Type | Method and Description
      byte[] CodecOperations.encode_value(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.
      byte[] CodecOperations.encode(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.
      static int | ComponentIdHelper.extract(Any a)
      static CodecFactory | CodecFactoryHelper.extract(Any a)
      static ServiceContext[] | ServiceContextListHelper.extract(Any a)
      static int | ServiceIdHelper.extract(Any a)
      static IOR | IORHelper.extract(Any a)
      static int | ProfileIdHelper.extract(Any a)
      static ServiceContext | ServiceContextHelper.extract(Any a)
      static TaggedComponent | TaggedComponentHelper.extract(Any a)
      static TaggedProfile | TaggedProfileHelper.extract(Any a)
      static TaggedComponent[] | MultipleComponentProfileHelper.extract(Any a)
      static void | CodecFactoryHelper.insert(Any a, CodecFactory that)
      static void | ComponentIdHelper.insert(Any a, int that)
      static void | ServiceIdHelper.insert(Any a, int that)
      static void | ProfileIdHelper.insert(Any a, int that)
      static void | IORHelper.insert(Any a, IOR that)
      static void | ServiceContextHelper.insert(Any a, ServiceContext that)
      static void | ServiceContextListHelper.insert(Any a, ServiceContext[] that)
      static void | TaggedComponentHelper.insert(Any a, TaggedComponent that)
      static void | MultipleComponentProfileHelper.insert(Any a, TaggedComponent[] that)
      static void | TaggedProfileHelper.insert(Any a, TaggedProfile that)

    • Uses of Any in org.omg.IOP.CodecFactoryPackage

      Methods in org.omg.IOP.CodecFactoryPackage with parameters of type Any
      Modifier and Type | Method and Description
      static UnknownEncoding | UnknownEncodingHelper.extract(Any a)
      static void | UnknownEncodingHelper.insert(Any a, UnknownEncoding that)

    • Uses of Any in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage with parameters of type Any
      Modifier and Type | Method and Description
      static InvalidTypeForEncoding | InvalidTypeForEncodingHelper.extract(Any a)
      static FormatMismatch | FormatMismatchHelper.extract(Any a)
      static TypeMismatch | TypeMismatchHelper.extract(Any a)
      static void | FormatMismatchHelper.insert(Any a, FormatMismatch that)
      static void | InvalidTypeForEncodingHelper.insert(Any a, InvalidTypeForEncoding that)
      static void | TypeMismatchHelper.insert(Any a, TypeMismatch that)

    • Uses of Any in org.omg.Messaging

      Methods in org.omg.Messaging with parameters of type Any
      Modifier and Type | Method and Description
      static short | SyncScopeHelper.extract(Any a)
      static void | SyncScopeHelper.insert(Any a, short that)

    • Uses of Any in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return Any
      Modifier and Type Method and Description
      Any CurrentOperations.get_slot(int id)
      Retrieves the slot data the application set in PICurrent via get_slot.
      Any RequestInfoOperations.get_slot(int id)
      Returns the data from the given slot of the PortableInterceptor.Current that is in the scope of the request.
      Any ClientRequestInfoOperations.received_exception()
      Returns an any which contains the exception to be returned to the client.
      Any RequestInfoOperations.result()
      Returns an any containing the result of the operation invocation.
      Any ServerRequestInfoOperations.sending_exception()
      Returns an any which contains the exception to be returned to the client.
      Methods in org.omg.PortableInterceptor with parameters of type Any
      Modifier and Type | Method and Description
      Policy PolicyFactoryOperations.create_policy(int type, Any value)
      Returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any.
      static ObjectReferenceTemplate | ObjectReferenceTemplateHelper.extract(Any a)
      static String[] | AdapterNameHelper.extract(Any a)
      static Current | CurrentHelper.extract(Any a)
      static ForwardRequest | ForwardRequestHelper.extract(Any a)
      static ObjectReferenceTemplate[] | ObjectReferenceTemplateSeqHelper.extract(Any a)
      static String | ServerIdHelper.extract(Any a)
      static String | ORBIdHelper.extract(Any a)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.extract(Any a)
      static short | AdapterStateHelper.extract(Any a)
      static byte[] | ObjectIdHelper.extract(Any a)
      static int | AdapterManagerIdHelper.extract(Any a)
      static InvalidSlot | InvalidSlotHelper.extract(Any a)
      static ObjectReferenceFactory | ObjectReferenceFactoryHelper.extract(Any a)
      static void | ObjectIdHelper.insert(Any a, byte[] that)
      static void | CurrentHelper.insert(Any a, Current that)
      static void | ForwardRequestHelper.insert(Any a, ForwardRequest that)
      static void | AdapterManagerIdHelper.insert(Any a, int that)
      static void | InvalidSlotHelper.insert(Any a, InvalidSlot that)
      static void | IORInterceptor_3_0Helper.insert(Any a, IORInterceptor_3_0 that)
      static void | ObjectReferenceFactoryHelper.insert(Any a, ObjectReferenceFactory that)
      static void | ObjectReferenceTemplateHelper.insert(Any a, ObjectReferenceTemplate that)
      static void | ObjectReferenceTemplateSeqHelper.insert(Any a, ObjectReferenceTemplate[] that)
      static void | AdapterStateHelper.insert(Any a, short that)
      static void | ServerIdHelper.insert(Any a, String that)
      static void | ORBIdHelper.insert(Any a, String that)
      static void | AdapterNameHelper.insert(Any a, String[] that)
      void CurrentOperations.set_slot(int id, Any data)
      Sets data in a slot.
      void ServerRequestInfoOperations.set_slot(int id, Any data)
      Allows an Interceptor to set a slot in the PortableInterceptor.Current that is in the scope of the request.

    • Uses of Any in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage with parameters of type Any
      Modifier and Type | Method and Description
      static DuplicateName | DuplicateNameHelper.extract(Any a)
      static InvalidName | InvalidNameHelper.extract(Any a)
      static String | ObjectIdHelper.extract(Any a)
      static void | DuplicateNameHelper.insert(Any a, DuplicateName that)
      static void | InvalidNameHelper.insert(Any a, InvalidName that)
      static void | ObjectIdHelper.insert(Any a, String that)

    • Uses of Any in org.omg.PortableServer

      Methods in org.omg.PortableServer with parameters of type Any
      Modifier and Type | Method and Description
      static POA | POAHelper.extract(Any a)
      static Current | CurrentHelper.extract(Any a)
      static ForwardRequest | ForwardRequestHelper.extract(Any a)
      static ServantLocator | ServantLocatorHelper.extract(Any a)
      static ServantActivator | ServantActivatorHelper.extract(Any a)
      static void | CurrentHelper.insert(Any a, Current that)
      static void | ForwardRequestHelper.insert(Any a, ForwardRequest that)
      static void | POAHelper.insert(Any a, POA that)
      static void | ServantActivatorHelper.insert(Any a, ServantActivator that)
      static void | ServantLocatorHelper.insert(Any a, ServantLocator that)

    • Uses of Any in org.omg.PortableServer.CurrentPackage

      Methods in org.omg.PortableServer.CurrentPackage with parameters of type Any
      Modifier and Type | Method and Description
      static NoContext | NoContextHelper.extract(Any a)
      static void | NoContextHelper.insert(Any a, NoContext that)

    • Uses of Any in org.omg.PortableServer.POAManagerPackage

      Methods in org.omg.PortableServer.POAManagerPackage with parameters of type Any
      Modifier and Type | Method and Description
      static AdapterInactive | AdapterInactiveHelper.extract(Any a)
      static void | AdapterInactiveHelper.insert(Any a, AdapterInactive that)

    • Uses of Any in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage with parameters of type Any
      Modifier and Type | Method and Description
      static ServantAlreadyActive | ServantAlreadyActiveHelper.extract(Any a)
      static ObjectAlreadyActive | ObjectAlreadyActiveHelper.extract(Any a)
      static NoServant | NoServantHelper.extract(Any a)
      static WrongPolicy | WrongPolicyHelper.extract(Any a)
      static ServantNotActive | ServantNotActiveHelper.extract(Any a)
      static AdapterNonExistent | AdapterNonExistentHelper.extract(Any a)
      static InvalidPolicy | InvalidPolicyHelper.extract(Any a)
      static ObjectNotActive | ObjectNotActiveHelper.extract(Any a)
      static AdapterAlreadyExists | AdapterAlreadyExistsHelper.extract(Any a)
      static WrongAdapter | WrongAdapterHelper.extract(Any a)
      static void | AdapterAlreadyExistsHelper.insert(Any a, AdapterAlreadyExists that)
      static void | AdapterNonExistentHelper.insert(Any a, AdapterNonExistent that)
      static void | InvalidPolicyHelper.insert(Any a, InvalidPolicy that)
      static void | NoServantHelper.insert(Any a, NoServant that)
      static void | ObjectAlreadyActiveHelper.insert(Any a, ObjectAlreadyActive that)
      static void | ObjectNotActiveHelper.insert(Any a, ObjectNotActive that)
      static void | ServantAlreadyActiveHelper.insert(Any a, ServantAlreadyActive that)
      static void | ServantNotActiveHelper.insert(Any a, ServantNotActive that)
      static void | WrongAdapterHelper.insert(Any a, WrongAdapter that)
      static void | WrongPolicyHelper.insert(Any a, WrongPolicy that)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.AnyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.AnyHolder

No usage of org.omg.CORBA.AnyHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.AnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.AnySeqHelper

No usage of org.omg.CORBA.AnySeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.AnySeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.AnySeqHolder

  • Packages that use AnySeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of AnySeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type AnySeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_any_array(AnySeqHolder seq, int offset, int length)
      Reads array of IDL Anys from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_CONTEXT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_CONTEXT

No usage of org.omg.CORBA.BAD_CONTEXT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_INV_ORDER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_INV_ORDER

  • Packages that use BAD_INV_ORDER
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of BAD_INV_ORDER in org.omg.CORBA

      Methods in org.omg.CORBA that throw BAD_INV_ORDER
      Modifier and Type Method and Description
      Streamable Any.extract_Streamable()
      Extracts a Streamable from this Any object's value field.
      void Any.insert_fixed(BigDecimal value, TypeCode type)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_OPERATION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_OPERATION

  • Packages that use BAD_OPERATION
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of BAD_OPERATION in org.omg.CORBA

      Methods in org.omg.CORBA that throw BAD_OPERATION
      Modifier and Type Method and Description
      abstract Any Any.extract_any()
      Extracts the Any object in this Any object's value field.
      abstract boolean Any.extract_boolean()
      Extracts the boolean in this Any object's value field.
      abstract char Any.extract_char()
      Extracts the char in this Any object's value field.
      abstract double Any.extract_double()
      Extracts the double in this Any object's value field.
      abstract float Any.extract_float()
      Extracts the float in this Any object's value field.
      abstract int Any.extract_long()
      Extracts the int in this Any object's value field.
      abstract long Any.extract_longlong()
      Extracts the long in this Any object's value field.
      abstract Object Any.extract_Object()
      Extracts the org.omg.CORBA.Object in this Any object's value field.
      abstract byte Any.extract_octet()
      Extracts the byte in this Any object's value field.
      Principal Any.extract_Principal()
      Deprecated.
      Deprecated by CORBA 2.2.
      abstract short Any.extract_short()
      Extracts the short in this Any object's value field.
      abstract String Any.extract_string()
      Extracts the String object in this Any object's value field.
      abstract TypeCode Any.extract_TypeCode()
      Extracts the TypeCode object in this Any object's value field.
      abstract int Any.extract_ulong()
      Extracts the int in this Any object's value field.
      abstract long Any.extract_ulonglong()
      Extracts the long in this Any object's value field.
      abstract short Any.extract_ushort()
      Extracts the short in this Any object's value field.
      abstract Serializable Any.extract_Value()
      Extracts the java.io.Serializable object in this Any object's value field.
      abstract char Any.extract_wchar()
      Extracts the char in this Any object's value field.
      abstract String Any.extract_wstring()
      Extracts the String object in this Any object's value field.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_PARAM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_PARAM

  • Packages that use BAD_PARAM
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

    • Uses of BAD_PARAM in org.omg.CORBA

      Methods in org.omg.CORBA that throw BAD_PARAM
      Modifier and Type Method and Description
      abstract void Any.insert_Object(Object o, TypeCode t)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.

    • Uses of BAD_PARAM in org.omg.CORBA_2_3

      Methods in org.omg.CORBA_2_3 that throw BAD_PARAM
      Modifier and Type | Method and Description
      Object | ORB.get_value_def(String repid)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_QOS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_QOS

No usage of org.omg.CORBA.BAD_QOS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BAD_TYPECODE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BAD_TYPECODE

No usage of org.omg.CORBA.BAD_TYPECODE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BooleanHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BooleanHolder

No usage of org.omg.CORBA.BooleanHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BooleanSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BooleanSeqHelper

No usage of org.omg.CORBA.BooleanSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.BooleanSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.BooleanSeqHolder

  • Packages that use BooleanSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of BooleanSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type BooleanSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_boolean_array(BooleanSeqHolder seq, int offset, int length)
      Reads array of IDL booleans from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Bounds

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Bounds

  • Packages that use Bounds
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of Bounds in org.omg.CORBA

      Methods in org.omg.CORBA that throw Bounds
      Modifier and Type Method and Description
      abstract TypeCode ExceptionList.item(int index)
      Returns the TypeCode object at the given index.
      abstract String ContextList.item(int index)
      Returns the String object at the given index.
      abstract NamedValue NVList.item(int index)
      Retrieves the NamedValue object at the given index.
      abstract void ExceptionList.remove(int index)
      Removes the TypeCode object at the given index.
      abstract void ContextList.remove(int index)
      Removes the String object at the given index.
      abstract void NVList.remove(int index)
      Removes the NamedValue object at the given index.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ByteHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ByteHolder

No usage of org.omg.CORBA.ByteHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CharHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CharHolder

No usage of org.omg.CORBA.CharHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CharSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CharSeqHelper

No usage of org.omg.CORBA.CharSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CharSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CharSeqHolder

  • Packages that use CharSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of CharSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type CharSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_char_array(CharSeqHolder seq, int offset, int length)
      Reads array of IDL characters from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CODESET_INCOMPATIBLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CODESET_INCOMPATIBLE

No usage of org.omg.CORBA.CODESET_INCOMPATIBLE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.COMM_FAILURE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.COMM_FAILURE

No usage of org.omg.CORBA.COMM_FAILURE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CompletionStatus

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CompletionStatus

  • Packages that use CompletionStatus
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of CompletionStatus in org.omg.CORBA

      Fields in org.omg.CORBA declared as CompletionStatus
      Modifier and Type Field and Description
      CompletionStatus SystemException.completed
      The status of the operation that threw this exception.
      static CompletionStatus CompletionStatus.COMPLETED_MAYBE
      An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.
      static CompletionStatus CompletionStatus.COMPLETED_NO
      An instance of CompletionStatus initialized with the constant _COMPLETED_NO.
      static CompletionStatus CompletionStatus.COMPLETED_YES
      An instance of CompletionStatus initialized with the constant _COMPLETED_YES.
      Methods in org.omg.CORBA that return CompletionStatus
      Modifier and Type | Method and Description
      static CompletionStatus | CompletionStatusHelper.extract(Any a)
      static CompletionStatus CompletionStatus.from_int(int i)
      Creates a CompletionStatus object from the given int.
      static CompletionStatus | CompletionStatusHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type CompletionStatus
      Modifier and Type | Method and Description
      static void | CompletionStatusHelper.insert(Any a, CompletionStatus that)
      static void | CompletionStatusHelper.write(OutputStream ostream, CompletionStatus value)
      Constructors in org.omg.CORBA with parameters of type CompletionStatus
      Constructor and Description
      ACTIVITY_COMPLETED(int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_COMPLETED exception with the specified minor code and completion status.
      ACTIVITY_COMPLETED(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_COMPLETED exception with the specified message, minor code, and completion status.
      ACTIVITY_REQUIRED(int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_REQUIRED exception with the specified minor code and completion status.
      ACTIVITY_REQUIRED(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an ACTIVITY_REQUIRED exception with the specified message, minor code, and completion status.
      BAD_CONTEXT(int minor, CompletionStatus completed)
      Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
      BAD_CONTEXT(String s, int minor, CompletionStatus completed)
      Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.
      BAD_INV_ORDER(int minor, CompletionStatus completed)
      Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
      BAD_INV_ORDER(String s, int minor, CompletionStatus completed)
      Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.
      BAD_OPERATION(int minor, CompletionStatus completed)
      Constructs a BAD_OPERATION exception with the specified minor code and completion status.
      BAD_OPERATION(String s, int minor, CompletionStatus completed)
      Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.
      BAD_PARAM(int minor, CompletionStatus completed)
      Constructs a BAD_PARAM exception with the specified minor code and completion status.
      BAD_PARAM(String s, int minor, CompletionStatus completed)
      Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.
      BAD_QOS(int minorCode, CompletionStatus completionStatus)
      Constructs an BAD_QOS exception with the specified minor code and completion status.
      BAD_QOS(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an BAD_QOS exception with the specified message, minor code, and completion status.
      BAD_TYPECODE(int minor, CompletionStatus completed)
      Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
      BAD_TYPECODE(String s, int minor, CompletionStatus completed)
      Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.
      CODESET_INCOMPATIBLE(int minorCode, CompletionStatus completionStatus)
      Constructs an CODESET_INCOMPATIBLE exception with the specified minor code and completion status.
      CODESET_INCOMPATIBLE(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an CODESET_INCOMPATIBLE exception with the specified message, minor code, and completion status.
      COMM_FAILURE(int minor, CompletionStatus completed)
      Constructs a COMM_FAILURE exception with the specified minor code and completion status.
      COMM_FAILURE(String s, int minor, CompletionStatus completed)
      Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.
      DATA_CONVERSION(int minor, CompletionStatus completed)
      Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
      DATA_CONVERSION(String s, int minor, CompletionStatus completed)
      Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.
      FREE_MEM(int minor, CompletionStatus completed)
      Constructs a FREE_MEM exception with the specified minor code and completion status.
      FREE_MEM(String s, int minor, CompletionStatus completed)
      Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.
      IMP_LIMIT(int minor, CompletionStatus completed)
      Constructs an IMP_LIMIT exception with the specified minor code and completion status.
      IMP_LIMIT(String s, int minor, CompletionStatus completed)
      Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.
      INITIALIZE(int minor, CompletionStatus completed)
      Constructs an INITIALIZE exception with the specified minor code and completion status.
      INITIALIZE(String s, int minor, CompletionStatus completed)
      Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.
      INTERNAL(int minor, CompletionStatus completed)
      Constructs an INTERNAL exception with the specified minor code and completion status.
      INTERNAL(String s, int minor, CompletionStatus completed)
      Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.
      INTF_REPOS(int minor, CompletionStatus completed)
      Constructs an INTF_REPOS exception with the specified minor code and completion status.
      INTF_REPOS(String s, int minor, CompletionStatus completed)
      Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.
      INV_FLAG(int minor, CompletionStatus completed)
      Constructs an INV_FLAG exception with the specified minor code and completion status.
      INV_FLAG(String s, int minor, CompletionStatus completed)
      Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.
      INV_IDENT(int minor, CompletionStatus completed)
      Constructs an INV_IDENT exception with the specified minor code and completion status.
      INV_IDENT(String s, int minor, CompletionStatus completed)
      Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.
      INV_OBJREF(int minor, CompletionStatus completed)
      Constructs an INV_OBJREF exception with the specified minor code and completion status.
      INV_OBJREF(String s, int minor, CompletionStatus completed)
      Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.
      INV_POLICY(int minor, CompletionStatus completed)
      Constructs a INV_POLICY exception with the specified minor code and completion status.
      INV_POLICY(String s, int minor, CompletionStatus completed)
      Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
      INVALID_ACTIVITY(int minorCode, CompletionStatus completionStatus)
      Constructs an INVALID_ACTIVITY exception with the specified minor code and completion status.
      INVALID_ACTIVITY(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an INVALID_ACTIVITY exception with the specified message, minor code, and completion status.
      INVALID_TRANSACTION(int minor, CompletionStatus completed)
      Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
      INVALID_TRANSACTION(String s, int minor, CompletionStatus completed)
      Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.
      MARSHAL(int minor, CompletionStatus completed)
      Constructs a MARSHAL exception with the specified minor code and completion status.
      MARSHAL(String s, int minor, CompletionStatus completed)
      Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
      NO_IMPLEMENT(int minor, CompletionStatus completed)
      Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
      NO_IMPLEMENT(String s, int minor, CompletionStatus completed)
      Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
      NO_MEMORY(int minor, CompletionStatus completed)
      Constructs a NO_MEMORY exception with the specified minor code and completion status.
      NO_MEMORY(String s, int minor, CompletionStatus completed)
      Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
      NO_PERMISSION(int minor, CompletionStatus completed)
      Constructs a NO_PERMISSION exception with the specified minor code and completion status.
      NO_PERMISSION(String s, int minor, CompletionStatus completed)
      Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
      NO_RESOURCES(int minor, CompletionStatus completed)
      Constructs a NO_RESOURCES exception with the specified minor code and completion status.
      NO_RESOURCES(String s, int minor, CompletionStatus completed)
      Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
      NO_RESPONSE(int minor, CompletionStatus completed)
      Constructs a NO_RESPONSE exception with the specified minor code and completion status.
      NO_RESPONSE(String s, int minor, CompletionStatus completed)
      Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
      OBJ_ADAPTER(int minor, CompletionStatus completed)
      Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
      OBJ_ADAPTER(String s, int minor, CompletionStatus completed)
      Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
      OBJECT_NOT_EXIST(int minor, CompletionStatus completed)
      Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
      OBJECT_NOT_EXIST(String s, int minor, CompletionStatus completed)
      Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
      PERSIST_STORE(int minor, CompletionStatus completed)
      Constructs a PERSIST_STORE exception with the specified minor code and completion status.
      PERSIST_STORE(String s, int minor, CompletionStatus completed)
      Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
      REBIND(int minorCode, CompletionStatus completionStatus)
      Constructs an REBIND exception with the specified minor code and completion status.
      REBIND(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an REBIND exception with the specified message, minor code, and completion status.
      SystemException(String reason, int minor, CompletionStatus completed)
      Constructs a SystemException exception with the specified detail message, minor code, and completion status.
      TIMEOUT(int minorCode, CompletionStatus completionStatus)
      Constructs an TIMEOUT exception with the specified minor code and completion status.
      TIMEOUT(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an TIMEOUT exception with the specified message, minor code, and completion status.
      TRANSACTION_MODE(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_MODE exception with the specified minor code and completion status.
      TRANSACTION_MODE(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_MODE exception with the specified description message, minor code, and completion status.
      TRANSACTION_REQUIRED(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
      TRANSACTION_REQUIRED(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
      TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
      TRANSACTION_ROLLEDBACK(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
      TRANSACTION_UNAVAILABLE(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_UNAVAILABLE exception with the specified minor code and completion status.
      TRANSACTION_UNAVAILABLE(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_UNAVAILABLE exception with the specified description message, minor code, and completion status.
      TRANSIENT(int minor, CompletionStatus completed)
      Constructs a TRANSIENT exception with the specified minor code and completion status.
      TRANSIENT(String s, int minor, CompletionStatus completed)
      Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
      UNKNOWN(int minor, CompletionStatus completed)
      Constructs an UNKNOWN exception with the specified minor code and completion status.
      UNKNOWN(String s, int minor, CompletionStatus completed)
      Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CompletionStatusHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CompletionStatusHelper

No usage of org.omg.CORBA.CompletionStatusHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Context

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Context

  • Packages that use Context
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of Context in org.omg.CORBA

      Methods in org.omg.CORBA that return Context
      Modifier and Type Method and Description
      abstract Context Context.create_child(String child_ctx_name)
      Creates a Context object with the given string as its name and with this Context object set as its parent.
      abstract Context Request.ctx()
      Retrieves the Context object for this request.
      abstract Context ServerRequest.ctx()
      Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference.
      abstract Context ORB.get_default_context()
      Gets the default Context object.
      abstract Context Context.parent()
      Retrieves the parent of this Context object.
      Methods in org.omg.CORBA with parameters of type Context
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      abstract void Request.ctx(Context c)
      Sets this request's Context object to the one given.

    • Uses of Context in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Context
      Modifier and Type Method and Description
      Context InputStream.read_Context()
      Reads a CORBA context from the stream.
      Methods in org.omg.CORBA.portable with parameters of type Context
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request object that contains the given context, method, argument list, and container for the result.
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      void OutputStream.write_Context(Context ctx, ContextList contexts)
      Writes a CORBA context on this stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ContextList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ContextList

  • Packages that use ContextList
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of ContextList in org.omg.CORBA

      Methods in org.omg.CORBA that return ContextList
      Modifier and Type Method and Description
      abstract ContextList Request.contexts()
      Retrieves the ContextList object for this request.
      abstract ContextList ORB.create_context_list()
      Creates an empty ContextList object.
      Methods in org.omg.CORBA with parameters of type ContextList
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of ContextList in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type ContextList
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      void OutputStream.write_Context(Context ctx, ContextList contexts)
      Writes a CORBA context on this stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CurrentHelper

No usage of org.omg.CORBA.CurrentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.CurrentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.CurrentHolder

No usage of org.omg.CORBA.CurrentHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DATA_CONVERSION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DATA_CONVERSION

  • Packages that use DATA_CONVERSION
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DATA_CONVERSION in org.omg.CORBA

      Methods in org.omg.CORBA that throw DATA_CONVERSION
      Modifier and Type Method and Description
      abstract void Any.insert_char(char c)
      Inserts the given char into this Any object's value field.
      abstract void Any.insert_string(String s)
      Inserts the given String object into this Any object's value field.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DefinitionKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DefinitionKind

  • Packages that use DefinitionKind
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DefinitionKind in org.omg.CORBA

      Fields in org.omg.CORBA declared as DefinitionKind
      Modifier and Type Field and Description
      static DefinitionKind DefinitionKind.dk_AbstractInterface
      The static instance of DefinitionKind indicating that an Interface Repository object represents an abstract interface.
      static DefinitionKind DefinitionKind.dk_Alias
      The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.
      static DefinitionKind DefinitionKind.dk_all
      The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate.
      static DefinitionKind DefinitionKind.dk_Array
      The static instance of DefinitionKind indicating that an Interface Repository object is an Array.
      static DefinitionKind DefinitionKind.dk_Attribute
      The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.
      static DefinitionKind DefinitionKind.dk_Constant
      The static instance of DefinitionKind indicating that an Interface Repository object is a constant.
      static DefinitionKind DefinitionKind.dk_Enum
      The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.
      static DefinitionKind DefinitionKind.dk_Exception
      The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.
      static DefinitionKind DefinitionKind.dk_Fixed
      The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.
      static DefinitionKind DefinitionKind.dk_Interface
      The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.
      static DefinitionKind DefinitionKind.dk_Module
      The static instance of DefinitionKind indicating that an Interface Repository object is a Module.
      static DefinitionKind DefinitionKind.dk_Native
      The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.
      static DefinitionKind DefinitionKind.dk_none
      The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.
      static DefinitionKind DefinitionKind.dk_Operation
      The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.
      static DefinitionKind DefinitionKind.dk_Primitive
      The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.
      static DefinitionKind DefinitionKind.dk_Repository
      The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.
      static DefinitionKind DefinitionKind.dk_Sequence
      The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.
      static DefinitionKind DefinitionKind.dk_String
      The static instance of DefinitionKind indicating that an Interface Repository object is a String.
      static DefinitionKind DefinitionKind.dk_Struct
      The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.
      static DefinitionKind DefinitionKind.dk_Typedef
      The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.
      static DefinitionKind DefinitionKind.dk_Union
      The static instance of DefinitionKind indicating that an Interface Repository object is a Union.
      static DefinitionKind DefinitionKind.dk_Value
      The static instance of DefinitionKind indicating that an Interface Repository object is a Value.
      static DefinitionKind DefinitionKind.dk_ValueBox
      The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.
      static DefinitionKind DefinitionKind.dk_ValueMember
      The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.
      static DefinitionKind DefinitionKind.dk_Wstring
      The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.
      Methods in org.omg.CORBA that return DefinitionKind
      Modifier and Type | Method and Description
      DefinitionKind IRObjectOperations.def_kind()
      Returns the DefinitionKind corresponding to this Interface Repository object.
      DefinitionKind | _IDLTypeStub.def_kind()
      static DefinitionKind | DefinitionKindHelper.extract(Any a)
      static DefinitionKind DefinitionKind.from_int(int i)
      Creates a DefinitionKind instance corresponding to the given code .
      static DefinitionKind | DefinitionKindHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type DefinitionKind
      Modifier and Type | Method and Description
      static void | DefinitionKindHelper.insert(Any a, DefinitionKind that)
      static void | DefinitionKindHelper.write(OutputStream ostream, DefinitionKind value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DefinitionKindHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DefinitionKindHelper

No usage of org.omg.CORBA.DefinitionKindHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DoubleHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DoubleHolder

No usage of org.omg.CORBA.DoubleHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DoubleSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DoubleSeqHelper

No usage of org.omg.CORBA.DoubleSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DoubleSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DoubleSeqHolder

  • Packages that use DoubleSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DoubleSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type DoubleSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_double_array(DoubleSeqHolder seq, int offset, int length)
      Reads array of IDL doubles from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DynamicImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DynamicImplementation

  • Packages that use DynamicImplementation
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of DynamicImplementation in org.omg.CosNaming

      Subclasses of DynamicImplementation in org.omg.CosNaming
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  | _NamingContextImplBase
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Environment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Environment

  • Packages that use Environment
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of Environment in org.omg.CORBA

      Methods in org.omg.CORBA that return Environment
      Modifier and Type Method and Description
      abstract Environment ORB.create_environment()
      Creates an Environment object.
      abstract Environment Request.env()
      Retrieves the Environment object for this request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ExceptionList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ExceptionList

  • Packages that use ExceptionList
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of ExceptionList in org.omg.CORBA

      Methods in org.omg.CORBA that return ExceptionList
      Modifier and Type Method and Description
      abstract ExceptionList ORB.create_exception_list()
      Creates an empty ExceptionList object.
      abstract ExceptionList Request.exceptions()
      Retrieves the ExceptionList object for this request.
      Methods in org.omg.CORBA with parameters of type ExceptionList
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of ExceptionList in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type ExceptionList
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FieldNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FieldNameHelper

No usage of org.omg.CORBA.FieldNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FixedHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FixedHolder

No usage of org.omg.CORBA.FixedHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FloatHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FloatHolder

No usage of org.omg.CORBA.FloatHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FloatSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FloatSeqHelper

No usage of org.omg.CORBA.FloatSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FloatSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FloatSeqHolder

  • Packages that use FloatSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of FloatSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type FloatSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_float_array(FloatSeqHolder seq, int offset, int length)
      Reads array of IDL floats from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.FREE_MEM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.FREE_MEM

No usage of org.omg.CORBA.FREE_MEM
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.IdentifierHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.IdentifierHelper

No usage of org.omg.CORBA.IdentifierHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.IDLTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.IDLTypeHelper

No usage of org.omg.CORBA.IDLTypeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.IMP_LIMIT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.IMP_LIMIT

No usage of org.omg.CORBA.IMP_LIMIT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INITIALIZE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INITIALIZE

No usage of org.omg.CORBA.INITIALIZE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INTERNAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INTERNAL

No usage of org.omg.CORBA.INTERNAL
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INTF_REPOS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INTF_REPOS

No usage of org.omg.CORBA.INTF_REPOS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.IntHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.IntHolder

No usage of org.omg.CORBA.IntHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INVALID_ACTIVITY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INVALID_ACTIVITY

No usage of org.omg.CORBA.INVALID_ACTIVITY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INVALID_TRANSACTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INVALID_TRANSACTION

No usage of org.omg.CORBA.INVALID_TRANSACTION
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INV_FLAG

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INV_FLAG

No usage of org.omg.CORBA.INV_FLAG
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INV_IDENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INV_IDENT

No usage of org.omg.CORBA.INV_IDENT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INV_OBJREF

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INV_OBJREF

No usage of org.omg.CORBA.INV_OBJREF
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.INV_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.INV_POLICY

No usage of org.omg.CORBA.INV_POLICY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LocalObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LocalObject

No usage of org.omg.CORBA.LocalObject
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LongHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LongHolder

No usage of org.omg.CORBA.LongHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LongLongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LongLongSeqHelper

No usage of org.omg.CORBA.LongLongSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LongLongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LongLongSeqHolder

  • Packages that use LongLongSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of LongLongSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type LongLongSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_longlong_array(LongLongSeqHolder seq, int offset, int length)
      Reads array of IDL long longs from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LongSeqHelper

No usage of org.omg.CORBA.LongSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.LongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.LongSeqHolder

  • Packages that use LongSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of LongSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type LongSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_long_array(LongSeqHolder seq, int offset, int length)
      Reads array of IDL longs from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.MARSHAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.MARSHAL

  • Packages that use MARSHAL
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of MARSHAL in org.omg.CORBA

      Methods in org.omg.CORBA that throw MARSHAL
      Modifier and Type Method and Description
      abstract void Any.insert_string(String s)
      Inserts the given String object into this Any object's value field.
      abstract void Any.insert_Value(Serializable v, TypeCode t)
      Inserts the given java.io.Serializable object into this Any object's value field.
      abstract void Any.insert_wstring(String s)
      Inserts the given String object into this Any object's value field.
      abstract void Any.read_value(InputStream is, TypeCode t)
      Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NamedValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NamedValue

  • Packages that use NamedValue
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of NamedValue in org.omg.CORBA

      Methods in org.omg.CORBA that return NamedValue
      Modifier and Type Method and Description
      abstract NamedValue NVList.add_item(String item_name, int flags)
      Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
      abstract NamedValue NVList.add_value(String item_name, Any val, int flags)
      Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
      abstract NamedValue NVList.add(int flags)
      Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
      abstract NamedValue ORB.create_named_value(String s, Any any, int flags)
      Creates a NamedValue object using the given name, value, and argument mode flags.
      abstract NamedValue NVList.item(int index)
      Retrieves the NamedValue object at the given index.
      abstract NamedValue Request.result()
      Retrieves the NamedValue object containing the return value for the method.
      Methods in org.omg.CORBA with parameters of type NamedValue
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of NamedValue in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type NamedValue
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request object that contains the given context, method, argument list, and container for the result.
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NameValuePair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NameValuePair

  • Packages that use NameValuePair
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of NameValuePair in org.omg.CORBA

      Methods in org.omg.CORBA that return NameValuePair
      Modifier and Type | Method and Description
      static NameValuePair | NameValuePairHelper.extract(Any a)
      NameValuePair[] DynValue.get_members()
      Deprecated.
      Returns an array containing all the members of the value object stored in this DynValue.
      NameValuePair[] DynStruct.get_members()
      Deprecated.
      Returns an array containing all the members of the stored struct.
      static NameValuePair | NameValuePairHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type NameValuePair
      Modifier and Type | Method and Description
      static void | NameValuePairHelper.insert(Any a, NameValuePair that)
      void DynValue.set_members(NameValuePair[] value)
      Deprecated.
      Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
      void DynStruct.set_members(NameValuePair[] value)
      Deprecated.
      Set the members of the struct.
      static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NameValuePairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NameValuePairHelper

No usage of org.omg.CORBA.NameValuePairHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NO_IMPLEMENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NO_IMPLEMENT

No usage of org.omg.CORBA.NO_IMPLEMENT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NO_MEMORY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NO_MEMORY

No usage of org.omg.CORBA.NO_MEMORY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NO_PERMISSION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NO_PERMISSION

No usage of org.omg.CORBA.NO_PERMISSION
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NO_RESOURCES

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NO_RESOURCES

No usage of org.omg.CORBA.NO_RESOURCES
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NO_RESPONSE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NO_RESPONSE

No usage of org.omg.CORBA.NO_RESPONSE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.NVList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.NVList

  • Packages that use NVList
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of NVList in org.omg.CORBA

      Methods in org.omg.CORBA that return NVList
      Modifier and Type Method and Description
      abstract NVList Request.arguments()
      Retrieves the NVList object containing the arguments to the method being invoked.
      abstract NVList ORB.create_list(int count)
      Allocates an NVList with (probably) enough space for the specified number of NamedValue objects.
      NVList ORB.create_operation_list(Object oper)
      Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
      abstract NVList Context.get_values(String start_scope, int op_flags, String pattern)
      Retrieves the NamedValue objects whose name field matches the given name or name pattern.
      Methods in org.omg.CORBA with parameters of type NVList
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      void ServerRequest.arguments(NVList args)
      Specifies method parameter types and retrieves "in" and "inout" argument values.
      void ServerRequest.params(NVList params)
      Deprecated.
      use the method arguments
      abstract void Context.set_values(NVList values)
      I Sets one or more property values in this Context object.

    • Uses of NVList in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type NVList
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request object that contains the given context, method, argument list, and container for the result.
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ObjectHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ObjectHelper

No usage of org.omg.CORBA.ObjectHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ObjectHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ObjectHolder

No usage of org.omg.CORBA.ObjectHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.OBJECT_NOT_EXIST

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.OBJECT_NOT_EXIST

No usage of org.omg.CORBA.OBJECT_NOT_EXIST
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.OBJ_ADAPTER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.OBJ_ADAPTER

No usage of org.omg.CORBA.OBJ_ADAPTER
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.OctetSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.OctetSeqHelper

No usage of org.omg.CORBA.OctetSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.OctetSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.OctetSeqHolder

  • Packages that use OctetSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of OctetSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type OctetSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_octet_array(OctetSeqHolder seq, int offset, int length)
      Reads array of IDL octets from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ORB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ORB

  • Packages that use ORB
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.portable
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ORB in javax.rmi.CORBA

      Methods in javax.rmi.CORBA that return ORB
      Modifier and Type Method and Description
      ORB Tie.orb()
      Returns the ORB for this tie.
      Methods in javax.rmi.CORBA with parameters of type ORB
      Modifier and Type Method and Description
      void Stub.connect(ORB orb)
      Connects this stub to an ORB.
      void StubDelegate.connect(Stub self, ORB orb)
      Delegation call for Stub.connect(org.omg.CORBA.ORB).
      static Object Util.copyObject(Object obj, ORB orb)
      Copies or connects an object.
      Object UtilDelegate.copyObject(Object obj, ORB orb)
      Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
      static Object[] Util.copyObjects(Object[] obj, ORB orb)
      Copies or connects an array of objects.
      Object[] UtilDelegate.copyObjects(Object[] obj, ORB orb)
      Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).
      void Tie.orb(ORB orb)
      Sets the ORB for this tie.

    • Uses of ORB in org.omg.CORBA

      Methods in org.omg.CORBA that return ORB
      Modifier and Type Method and Description
      ORB LocalObject._orb()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      static ORB ORB.init()
      Returns the ORB singleton object.
      static ORB ORB.init(Applet app, Properties props)
      Creates a new ORB instance for an applet.
      static ORB ORB.init(String[] args, Properties props)
      Creates a new ORB instance for a standalone application.

    • Uses of ORB in org.omg.CORBA_2_3

      Subclasses of ORB in org.omg.CORBA_2_3
      Modifier and Type Class and Description
      class  ORB
      A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

    • Uses of ORB in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return ORB
      Modifier and Type Method and Description
      ORB ObjectImpl._orb()
      Returns a reference to the ORB associated with this object and its delegate.
      ORB InputStream.orb()
      Returns the ORB that created this InputStream.
      ORB OutputStream.orb()
      Returns the ORB that created this OutputStream.
      ORB Delegate.orb(Object obj)
      Provides a reference to the orb associated with its parameter.

    • Uses of ORB in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type ORB
      Modifier and Type | Method and Description
      NamingContext | NamingContextPOA._this(ORB orb)
      BindingIterator | BindingIteratorPOA._this(ORB orb)
      NamingContextExt | NamingContextExtPOA._this(ORB orb)

    • Uses of ORB in org.omg.PortableServer

      Methods in org.omg.PortableServer that return ORB
      Modifier and Type Method and Description
      ORB Servant._orb()
      Returns the instance of the ORB currently associated with the Servant (convenience method).
      Methods in org.omg.PortableServer with parameters of type ORB
      Modifier and Type | Method and Description
      Object Servant._this_object(ORB orb)
      Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
      ServantLocator | ServantLocatorPOA._this(ORB orb)
      ServantActivator | ServantActivatorPOA._this(ORB orb)

    • Uses of ORB in org.omg.PortableServer.portable

      Methods in org.omg.PortableServer.portable that return ORB
      Modifier and Type Method and Description
      ORB Delegate.orb(Servant Self)
      Convenience method that returns the instance of the ORB currently associated with the Servant.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ParameterMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ParameterMode

  • Packages that use ParameterMode
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.Dynamic
    This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.

    • Uses of ParameterMode in org.omg.CORBA

      Fields in org.omg.CORBA declared as ParameterMode
      Modifier and Type | Field and Description
      static ParameterMode | ParameterMode.PARAM_IN
      static ParameterMode | ParameterMode.PARAM_INOUT
      static ParameterMode | ParameterMode.PARAM_OUT
      ParameterMode | ParameterModeHolder.value
      Methods in org.omg.CORBA that return ParameterMode
      Modifier and Type | Method and Description
      static ParameterMode | ParameterModeHelper.extract(Any a)
      static ParameterMode | ParameterMode.from_int(int value)
      static ParameterMode | ParameterModeHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type ParameterMode
      Modifier and Type | Method and Description
      static void | ParameterModeHelper.insert(Any a, ParameterMode that)
      static void | ParameterModeHelper.write(OutputStream ostream, ParameterMode value)
      Constructors in org.omg.CORBA with parameters of type ParameterMode
      Constructor and Description
      ParameterModeHolder(ParameterMode initialValue)

    • Uses of ParameterMode in org.omg.Dynamic

      Fields in org.omg.Dynamic declared as ParameterMode
      Modifier and Type | Field and Description
      ParameterMode | Parameter.mode
      Constructors in org.omg.Dynamic with parameters of type ParameterMode
      Constructor and Description
      Parameter(Any _argument, ParameterMode _mode)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ParameterModeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ParameterModeHelper

No usage of org.omg.CORBA.ParameterModeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ParameterModeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ParameterModeHolder

No usage of org.omg.CORBA.ParameterModeHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PERSIST_STORE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PERSIST_STORE

No usage of org.omg.CORBA.PERSIST_STORE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyError

  • Packages that use PolicyError
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of PolicyError in org.omg.CORBA

      Fields in org.omg.CORBA declared as PolicyError
      Modifier and Type | Field and Description
      PolicyError | PolicyErrorHolder.value
      Methods in org.omg.CORBA that return PolicyError
      Modifier and Type | Method and Description
      static PolicyError | PolicyErrorHelper.extract(Any a)
      static PolicyError | PolicyErrorHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type PolicyError
      Modifier and Type | Method and Description
      static void | PolicyErrorHelper.insert(Any a, PolicyError that)
      static void | PolicyErrorHelper.write(OutputStream ostream, PolicyError value)
      Methods in org.omg.CORBA that throw PolicyError
      Modifier and Type Method and Description
      Policy ORB.create_policy(int type, Any val)
      Can be invoked to create new instances of policy objects of a specific type with specified initial state.
      Constructors in org.omg.CORBA with parameters of type PolicyError
      Constructor and Description
      PolicyErrorHolder(PolicyError initialValue)

    • Uses of PolicyError in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that throw PolicyError
      Modifier and Type Method and Description
      Policy PolicyFactoryOperations.create_policy(int type, Any value)
      Returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyErrorCodeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyErrorCodeHelper

No usage of org.omg.CORBA.PolicyErrorCodeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyErrorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyErrorHelper

No usage of org.omg.CORBA.PolicyErrorHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyErrorHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyErrorHolder

No usage of org.omg.CORBA.PolicyErrorHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyHelper

No usage of org.omg.CORBA.PolicyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyHolder

No usage of org.omg.CORBA.PolicyHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyListHelper

No usage of org.omg.CORBA.PolicyListHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyListHolder

No usage of org.omg.CORBA.PolicyListHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PolicyTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PolicyTypeHelper

No usage of org.omg.CORBA.PolicyTypeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Principal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Principal

  • Packages that use Principal
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of Principal in org.omg.CORBA

      Fields in org.omg.CORBA declared as Principal
      Modifier and Type Field and Description
      Principal PrincipalHolder.value
      Deprecated.
      The Principal value held by this PrincipalHolder object.
      Methods in org.omg.CORBA that return Principal
      Modifier and Type Method and Description
      Principal Any.extract_Principal()
      Deprecated.
      Deprecated by CORBA 2.2.
      Methods in org.omg.CORBA with parameters of type Principal
      Modifier and Type Method and Description
      void Any.insert_Principal(Principal p)
      Deprecated.
      Deprecated by CORBA 2.2.
      Constructors in org.omg.CORBA with parameters of type Principal
      Constructor and Description
      PrincipalHolder(Principal initial)
      Deprecated.
      Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.

    • Uses of Principal in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Principal
      Modifier and Type Method and Description
      Principal InputStream.read_Principal()
      Deprecated.
      Deprecated by CORBA 2.2.
      Methods in org.omg.CORBA.portable with parameters of type Principal
      Modifier and Type Method and Description
      void OutputStream.write_Principal(Principal value)
      Deprecated.
      Deprecated by CORBA 2.2.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.PrincipalHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.PrincipalHolder

No usage of org.omg.CORBA.PrincipalHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.REBIND

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.REBIND

No usage of org.omg.CORBA.REBIND
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.RepositoryIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.RepositoryIdHelper

No usage of org.omg.CORBA.RepositoryIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.Request

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.Request

  • Packages that use Request
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of Request in org.omg.CORBA

      Methods in org.omg.CORBA that return Request
      Modifier and Type Method and Description
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Request LocalObject._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request Object._request(String operation)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      Request LocalObject._request(String operation)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      abstract Request ORB.get_next_response()
      Gets the next Request instance for which a response has been received.
      Methods in org.omg.CORBA with parameters of type Request
      Modifier and Type Method and Description
      abstract void ORB.send_multiple_requests_deferred(Request[] req)
      Sends multiple dynamic (DII) requests asynchronously.
      abstract void ORB.send_multiple_requests_oneway(Request[] req)
      Sends multiple dynamic (DII) requests asynchronously without expecting any responses.

    • Uses of Request in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Request
      Modifier and Type Method and Description
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request object that contains the given context, method, argument list, and container for the result.
      Request ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      Request ObjectImpl._request(String operation)
      Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.request(Object obj, String operation)
      Creates a Request instance for use in the Dynamic Invocation Interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServerRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServerRequest

  • Packages that use ServerRequest
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServerRequest in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type ServerRequest
      Modifier and Type Method and Description
      void DynamicImplementation.invoke(ServerRequest request)
      Deprecated.
      Deprecated by Portable Object Adapter

    • Uses of ServerRequest in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type ServerRequest
      Modifier and Type | Method and Description
      void | _NamingContextImplBase.invoke(ServerRequest r)
      void | _BindingIteratorImplBase.invoke(ServerRequest r)

    • Uses of ServerRequest in org.omg.PortableServer

      Methods in org.omg.PortableServer with parameters of type ServerRequest
      Modifier and Type Method and Description
      abstract void DynamicImplementation.invoke(ServerRequest request)
      Receives requests issued to any CORBA object incarnated by the DSI servant and performs the processing necessary to execute the request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServiceDetail

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServiceDetail

  • Packages that use ServiceDetail
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ServiceDetail in org.omg.CORBA

      Fields in org.omg.CORBA declared as ServiceDetail
      Modifier and Type Field and Description
      ServiceDetail[] ServiceInformation.service_details
      Array of ServiceDetails giving more details about the service.
      Methods in org.omg.CORBA that return ServiceDetail
      Modifier and Type | Method and Description
      static ServiceDetail | ServiceDetailHelper.extract(Any a)
      static ServiceDetail | ServiceDetailHelper.read(InputStream in)
      Methods in org.omg.CORBA with parameters of type ServiceDetail
      Modifier and Type | Method and Description
      static void | ServiceDetailHelper.insert(Any a, ServiceDetail that)
      static void | ServiceDetailHelper.write(OutputStream out, ServiceDetail that)
      Constructors in org.omg.CORBA with parameters of type ServiceDetail
      Constructor and Description
      ServiceInformation(int[] __service_options, ServiceDetail[] __service_details)
      Constructs a ServiceInformation object with the given service_options and service_details.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServiceDetailHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServiceDetailHelper

No usage of org.omg.CORBA.ServiceDetailHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServiceInformation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServiceInformation

  • Packages that use ServiceInformation
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ServiceInformation in org.omg.CORBA

      Fields in org.omg.CORBA declared as ServiceInformation
      Modifier and Type Field and Description
      ServiceInformation ServiceInformationHolder.value
      The ServiceInformation value held by this ServiceInformationHolder object in its value field.
      Methods in org.omg.CORBA that return ServiceInformation
      Modifier and Type | Method and Description
      static ServiceInformation | ServiceInformationHelper.extract(Any a)
      static ServiceInformation | ServiceInformationHelper.read(InputStream in)
      Methods in org.omg.CORBA with parameters of type ServiceInformation
      Modifier and Type | Method and Description
      static void | ServiceInformationHelper.insert(Any a, ServiceInformation that)
      static void | ServiceInformationHelper.write(OutputStream out, ServiceInformation that)
      Constructors in org.omg.CORBA with parameters of type ServiceInformation
      Constructor and Description
      ServiceInformationHolder(ServiceInformation arg)
      Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServiceInformationHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServiceInformationHelper

No usage of org.omg.CORBA.ServiceInformationHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ServiceInformationHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ServiceInformationHolder

  • Packages that use ServiceInformationHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ServiceInformationHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type ServiceInformationHolder
      Modifier and Type Method and Description
      boolean ORB.get_service_information(short service_type, ServiceInformationHolder service_info)
      Used to obtain information about CORBA facilities and services that are supported by this ORB.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.SetOverrideType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.SetOverrideType

  • Packages that use SetOverrideType
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of SetOverrideType in org.omg.CORBA

      Fields in org.omg.CORBA declared as SetOverrideType
      Modifier and Type Field and Description
      static SetOverrideType SetOverrideType.ADD_OVERRIDE
      The SetOverrideType constant for the enum value ADD_OVERRIDE.
      static SetOverrideType SetOverrideType.SET_OVERRIDE
      The SetOverrideType constant for the enum value SET_OVERRIDE.
      Methods in org.omg.CORBA that return SetOverrideType
      Modifier and Type | Method and Description
      static SetOverrideType | SetOverrideTypeHelper.extract(Any a)
      static SetOverrideType SetOverrideType.from_int(int i)
      Converts the given int to the corresponding SetOverrideType instance.
      static SetOverrideType | SetOverrideTypeHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type SetOverrideType
      Modifier and Type | Method and Description
      Object Object._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
      Object LocalObject._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      static void | SetOverrideTypeHelper.insert(Any a, SetOverrideType that)
      static void | SetOverrideTypeHelper.write(OutputStream ostream, SetOverrideType value)

    • Uses of SetOverrideType in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type SetOverrideType
      Modifier and Type Method and Description
      Object ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
      Object Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
      Associates the policies passed in with a newly created object reference that it returns.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.SetOverrideTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.SetOverrideTypeHelper

No usage of org.omg.CORBA.SetOverrideTypeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ShortHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ShortHolder

No usage of org.omg.CORBA.ShortHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ShortSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ShortSeqHelper

No usage of org.omg.CORBA.ShortSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ShortSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ShortSeqHolder

  • Packages that use ShortSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ShortSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type ShortSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_short_array(ShortSeqHolder seq, int offset, int length)
      Reads array of IDL shorts from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StringHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StringHolder

No usage of org.omg.CORBA.StringHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StringSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StringSeqHelper

No usage of org.omg.CORBA.StringSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StringSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StringSeqHolder

No usage of org.omg.CORBA.StringSeqHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StringValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StringValueHelper

No usage of org.omg.CORBA.StringValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StructMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StructMember

  • Packages that use StructMember
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of StructMember in org.omg.CORBA

      Methods in org.omg.CORBA that return StructMember
      Modifier and Type | Method and Description
      static StructMember | StructMemberHelper.extract(Any a)
      static StructMember | StructMemberHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type StructMember
      Modifier and Type | Method and Description
      abstract TypeCode ORB.create_exception_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL exception.
      abstract TypeCode ORB.create_struct_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL struct.
      static void | StructMemberHelper.insert(Any a, StructMember that)
      static void | StructMemberHelper.write(OutputStream ostream, StructMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.StructMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.StructMemberHelper

No usage of org.omg.CORBA.StructMemberHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.SystemException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.SystemException

  • Packages that use SystemException
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of SystemException in javax.rmi.CORBA

      Methods in javax.rmi.CORBA with parameters of type SystemException
      Modifier and Type Method and Description
      static RemoteException Util.mapSystemException(SystemException ex)
      Maps a SystemException to a RemoteException.
      RemoteException UtilDelegate.mapSystemException(SystemException ex)
      Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).

    • Uses of SystemException in org.omg.CORBA

      Subclasses of SystemException in org.omg.CORBA
      Modifier and Type Class and Description
      class  ACTIVITY_COMPLETED
      The ACTIVITY_COMPLETED system exception may be raised on any method for which Activity context is accessed.
      class  ACTIVITY_REQUIRED
      The ACTIVITY_REQUIRED system exception may be raised on any method for which an Activity context is required.
      class  BAD_CONTEXT
      Exception thrown when an operation is invoked by a client but the passed context does not contain the context values required by the operation.
      class  BAD_INV_ORDER
      This exception indicates that the caller has invoked operations in the wrong order.
      class  BAD_OPERATION
      Exception thrown when an object reference denotes an existing object, but that the object does not support the operation that was invoked.
      class  BAD_PARAM
      Exception thrown when a parameter passed to a call is out of range or otherwise considered illegal.
      class  BAD_QOS
      The BAD_QOS exception is raised whenever an object cannot support the quality of service required by an invocation parameter that has a quality of service semantics associated with it.
      class  BAD_TYPECODE
      Exception thrown when the ORB has encountered a malformed type code (for example, a type code with an invalid TCKind value).
      class  CODESET_INCOMPATIBLE
      This exception is raised whenever meaningful communication is not possible between client and server native code sets.
      class  COMM_FAILURE
      This exception is raised if communication is lost while an operation is in progress, after the request was sent by the client, but before the reply from the server has been returned to the client.
      class  DATA_CONVERSION
      This exception is raised if an ORB cannot convert the representation of data as marshaled into its native representation or vice-versa.
      class  FREE_MEM
      Exception thrown when the ORB failed in an attempt to free dynamic memory, for example because of heap corruption or memory segments being locked.
      class  IMP_LIMIT
      This exception indicates that an implementation limit was exceeded in the ORB run time.
      class  INITIALIZE
      Exception thrown when an ORB has encountered a failure during its initialization, such as failure to acquire networking resources or detecting a configuration error.
      class  INTERNAL
      This exception indicates an internal failure in an ORB, for example, if an ORB has detected corruption of its internal data structures.
      class  INTF_REPOS
      Exception raised when an ORB cannot reach the interface repository, or some other failure relating to the interface repository is detected.
      class  INV_FLAG
      Exception thrown when an invalid flag was passed to an operation (for example, when creating a DII request).
      class  INV_IDENT
      This exception indicates that an IDL identifier is syntactically invalid.
      class  INV_OBJREF
      This exception indicates that an object reference is internally malformed.
      class  INV_POLICY
      Standard exception thrown when an invocation cannot be made because of an incompatibility between Policy overrides that apply to the particular invocation.
      class  INVALID_ACTIVITY
      The INVALID_ACTIVITY system exception may be raised on the Activity or Transaction services' resume methods if a transaction or Activity is resumed in a context different to that from which it was suspended.
      class  INVALID_TRANSACTION
      Exception thrown when the request carried an invalid transaction context.
      class  MARSHAL
      A request or reply from the network is structurally invalid.
      class  NO_IMPLEMENT
      This exception indicates that even though the operation that was invoked exists (it has an IDL definition), no implementation for that operation exists.
      class  NO_MEMORY
      Exception thrown when the ORB run time has run out of memory.
      class  NO_PERMISSION
      Exception thrown when an invocation failed because the caller has insufficient privileges.
      class  NO_RESOURCES
      Exception thrown when the ORB has encountered some general resource limitation.
      class  NO_RESPONSE
      This exception is raised if a client attempts to retrieve the result of a deferred synchronous call, but the response for the request is not yet available.
      class  OBJ_ADAPTER
      This exception typically indicates an administrative mismatch, for example, a server may have made an attempt to register itself with an implementation repository under a name that is already in use, or is unknown to the repository.
      class  OBJECT_NOT_EXIST
      Exception raised whenever an invocation on a deleted object was performed.
      class  PERSIST_STORE
      This exception indicates a persistent storage failure, for example, failure to establish a database connection or corruption of a database.
      class  REBIND
      REBIND is raised when the current effective RebindPolicy, has a value of NO_REBIND or NO_RECONNECT and an invocation on a bound object reference results in a LocateReply message with status OBJECT_FORWARD or a Reply message with status LOCATION_FORWARD.
      class  TIMEOUT
      TIMEOUT is raised when no delivery has been made and the specified time-to-live period has been exceeded.
      class  TRANSACTION_MODE
      The CORBA TRANSACTION_MODE exception is thrown by the client ORB if it detects a mismatch between the InvocationPolicy in the IOR and the chosen invocation path (i.e, direct or routed invocation).
      class  TRANSACTION_REQUIRED
      Exception indicates that the request carried a null transaction context, but an active transaction is required.
      class  TRANSACTION_ROLLEDBACK
      Exception thrown when the transaction associated with the request has already been rolled back or marked to roll back.
      class  TRANSACTION_UNAVAILABLE
      The CORBA TRANSACTION_UNAVAILABLE exception is thrown by the ORB when it cannot process a transaction service context because its connection to the Transaction Service has been abnormally terminated.
      class  TRANSIENT
      Exception thrown when the ORB attempted to reach an object and failed.
      class  UNKNOWN
      This exception is raised if an operation implementation throws a non-CORBA exception (such as an exception specific to the implementation's programming language), or if an operation raises a user exception that does not appear in the operation's raises expression.

    • Uses of SystemException in org.omg.CORBA.portable

      Subclasses of SystemException in org.omg.CORBA.portable
      Modifier and Type Class and Description
      class  IndirectionException
      The Indirection exception is a Java specific system exception.
      class  UnknownException
      The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.
      Methods in org.omg.CORBA.portable that throw SystemException
      Modifier and Type Method and Description
      OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
      Invoked by the ORB to dispatch a request to the servant.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TCKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TCKind

  • Packages that use TCKind
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of TCKind in org.omg.CORBA

      Fields in org.omg.CORBA declared as TCKind
      Modifier and Type Field and Description
      static TCKind TCKind.tk_abstract_interface
      The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.
      static TCKind TCKind.tk_alias
      The TCKind constant whose value field is initialized with TCKind._tk_alias.
      static TCKind TCKind.tk_any
      The TCKind constant whose value field is initialized with TCKind._tk_any.
      static TCKind TCKind.tk_array
      The TCKind constant whose value field is initialized with TCKind._tk_array.
      static TCKind TCKind.tk_boolean
      The TCKind constant whose value field is initialized with TCKind._tk_boolean.
      static TCKind TCKind.tk_char
      The TCKind constant whose value field is initialized with TCKind._tk_char.
      static TCKind TCKind.tk_double
      The TCKind constant whose value field is initialized with TCKind._tk_double.
      static TCKind TCKind.tk_enum
      The TCKind constant whose value field is initialized with TCKind._tk_enum.
      static TCKind TCKind.tk_except
      The TCKind constant whose value field is initialized with TCKind._tk_except.
      static TCKind TCKind.tk_fixed
      The TCKind constant whose value field is initialized with TCKind._tk_fixed.
      static TCKind TCKind.tk_float
      The TCKind constant whose value field is initialized with TCKind._tk_float.
      static TCKind TCKind.tk_long
      The TCKind constant whose value field is initialized with TCKind._tk_long.
      static TCKind TCKind.tk_longdouble
      The TCKind constant whose value field is initialized with TCKind._tk_longdouble.
      static TCKind TCKind.tk_longlong
      The TCKind constant whose value field is initialized with TCKind._tk_longlong.
      static TCKind TCKind.tk_native
      The TCKind constant whose value field is initialized with TCKind._tk_native.
      static TCKind TCKind.tk_null
      The TCKind constant whose value field is initialized with TCKind._tk_null.
      static TCKind TCKind.tk_objref
      The TCKind constant whose value field is initialized with TCKind._tk_objref.
      static TCKind TCKind.tk_octet
      The TCKind constant whose value field is initialized with TCKind._tk_octet.
      static TCKind TCKind.tk_Principal
      The TCKind constant whose value field is initialized with TCKind._tk_Principal.
      static TCKind TCKind.tk_sequence
      The TCKind constant whose value field is initialized with TCKind._tk_sequence.
      static TCKind TCKind.tk_short
      The TCKind constant whose value field is initialized with TCKind._tk_short.
      static TCKind TCKind.tk_string
      The TCKind constant whose value field is initialized with TCKind._tk_string.
      static TCKind TCKind.tk_struct
      The TCKind constant whose value field is initialized with TCKind._tk_struct.
      static TCKind TCKind.tk_TypeCode
      The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.
      static TCKind TCKind.tk_ulong
      The TCKind constant whose value field is initialized with TCKind._tk_ulong.
      static TCKind TCKind.tk_ulonglong
      The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.
      static TCKind TCKind.tk_union
      The TCKind constant whose value field is initialized with TCKind._tk_union.
      static TCKind TCKind.tk_ushort
      The TCKind constant whose value field is initialized with TCKind._tk_ushort.
      static TCKind TCKind.tk_value
      The TCKind constant whose value field is initialized with TCKind._tk_value.
      static TCKind TCKind.tk_value_box
      The TCKind constant whose value field is initialized with TCKind._tk_value_box.
      static TCKind TCKind.tk_void
      The TCKind constant whose value field is initialized with TCKind._tk_void.
      static TCKind TCKind.tk_wchar
      The TCKind constant whose value field is initialized with TCKind._tk_wchar.
      static TCKind TCKind.tk_wstring
      The TCKind constant whose value field is initialized with TCKind._tk_wstring.
      Methods in org.omg.CORBA that return TCKind
      Modifier and Type Method and Description
      TCKind DynValue.current_member_kind()
      Deprecated.
      Returns the TCKind object that describes the current member.
      TCKind DynStruct.current_member_kind()
      Deprecated.
      Returns the TCKind object that describes the kind of the current member.
      TCKind DynUnion.discriminator_kind()
      Deprecated.
      Returns the TCKind object associated with the discriminator of this union.
      static TCKind TCKind.from_int(int i)
      Converts the given int to the corresponding TCKind instance.
      abstract TCKind TypeCode.kind()
      Retrieves the kind of this TypeCode object.
      TCKind DynUnion.member_kind()
      Deprecated.
      Returns the TCKind associated with the member of this union.
      Methods in org.omg.CORBA with parameters of type TCKind
      Modifier and Type Method and Description
      abstract TypeCode ORB.get_primitive_tc(TCKind tcKind)
      Retrieves the TypeCode object that represents the given primitive IDL type.

    • Uses of TCKind in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that return TCKind
      Modifier and Type Method and Description
      TCKind _DynValueStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind _DynStructStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynStructOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynValueOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynUnionOperations.discriminator_kind()
      Returns the TCKind value of the discriminators TypeCode.
      TCKind _DynUnionStub.discriminator_kind()
      Returns the TCKind value of the discriminators TypeCode.
      TCKind DynUnionOperations.member_kind()
      Returns the TCKind value of the currently active members TypeCode.
      TCKind _DynUnionStub.member_kind()
      Returns the TCKind value of the currently active members TypeCode.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TIMEOUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TIMEOUT

No usage of org.omg.CORBA.TIMEOUT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TRANSACTION_MODE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TRANSACTION_MODE

No usage of org.omg.CORBA.TRANSACTION_MODE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TRANSACTION_REQUIRED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TRANSACTION_REQUIRED

No usage of org.omg.CORBA.TRANSACTION_REQUIRED
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TRANSACTION_ROLLEDBACK

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TRANSACTION_ROLLEDBACK

No usage of org.omg.CORBA.TRANSACTION_ROLLEDBACK
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TRANSACTION_UNAVAILABLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TRANSACTION_UNAVAILABLE

No usage of org.omg.CORBA.TRANSACTION_UNAVAILABLE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TRANSIENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TRANSIENT

No usage of org.omg.CORBA.TRANSIENT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TypeCode

  • Packages that use TypeCode
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.

    • Uses of TypeCode in org.omg.CORBA

      Fields in org.omg.CORBA declared as TypeCode
      Modifier and Type Field and Description
      TypeCode UnionMember.type
      The type of the union member described by this UnionMember object.
      TypeCode ValueMember.type
      The type of of this value member.
      TypeCode StructMember.type
      The type of the struct member described by this StructMember object.
      TypeCode TypeCodeHolder.value
      The TypeCode value held by this TypeCodeHolder object.
      Methods in org.omg.CORBA that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | BooleanSeqHolder._type()
      TypeCode DoubleHolder._type()
      Return the TypeCode of this holder object.
      TypeCode | OctetSeqHolder._type()
      TypeCode ValueBaseHolder._type()
      Returns the TypeCode object corresponding to the value held in the Holder.
      TypeCode | ULongSeqHolder._type()
      TypeCode | CharSeqHolder._type()
      TypeCode | PolicyListHolder._type()
      TypeCode | PolicyHolder._type()
      TypeCode | LongSeqHolder._type()
      TypeCode | FloatSeqHolder._type()
      TypeCode | UShortSeqHolder._type()
      TypeCode | ULongLongSeqHolder._type()
      TypeCode | StringSeqHolder._type()
      TypeCode FloatHolder._type()
      Return the TypeCode of this Streamable.
      TypeCode StringHolder._type()
      Retrieves the TypeCode object that corresponds to the value held in this StringHolder object.
      TypeCode | UnknownUserExceptionHolder._type()
      TypeCode | WStringSeqHolder._type()
      TypeCode AnyHolder._type()
      Returns the TypeCode object corresponding to the value held in this AnyHolder object.
      TypeCode ByteHolder._type()
      Returns the TypeCode corresponding to the value held in this ByteHolder object.
      TypeCode | LongLongSeqHolder._type()
      TypeCode ServiceInformationHolder._type()
      Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
      TypeCode ObjectHolder._type()
      Returns the TypeCode corresponding to the value held in this ObjectHolder object
      TypeCode TypeCodeHolder._type()
      Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
      TypeCode PrincipalHolder._type()
      Deprecated.
      TypeCode | ShortSeqHolder._type()
      TypeCode | DoubleSeqHolder._type()
      TypeCode BooleanHolder._type()
      Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
      TypeCode CharHolder._type()
      Returns the TypeCode object corresponding to the value held in this CharHolder object.
      TypeCode ShortHolder._type()
      Returns the TypeCode corresponding to the value held in this ShortHolder object.
      TypeCode | WrongTransactionHolder._type()
      TypeCode | PolicyErrorHolder._type()
      TypeCode | ParameterModeHolder._type()
      TypeCode FixedHolder._type()
      Return the TypeCode of this holder object.
      TypeCode LongHolder._type()
      Returns the TypeCode object corresponding to the value held in the Holder.
      TypeCode | AnySeqHolder._type()
      TypeCode | CurrentHolder._type()
      TypeCode IntHolder._type()
      Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
      TypeCode | WCharSeqHolder._type()
      abstract TypeCode TypeCode.concrete_base_type()
      Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
      abstract TypeCode TypeCode.content_type()
      Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
      TypeCode ORB.create_abstract_interface_tc(String id, String name)
      Create a TypeCode object for an IDL abstract interface.
      abstract TypeCode ORB.create_alias_tc(String id, String name, TypeCode original_type)
      Creates a TypeCode object representing an IDL alias (typedef).
      abstract TypeCode ORB.create_array_tc(int length, TypeCode element_type)
      Creates a TypeCode object representing an IDL array.
      abstract TypeCode ORB.create_enum_tc(String id, String name, String[] members)
      Creates a TypeCode object representing an IDL enum.
      abstract TypeCode ORB.create_exception_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL exception.
      TypeCode ORB.create_fixed_tc(short digits, short scale)
      Create a TypeCode object for an IDL fixed type.
      abstract TypeCode ORB.create_interface_tc(String id, String name)
      Creates a TypeCode object representing an IDL interface.
      TypeCode ORB.create_native_tc(String id, String name)
      Create a TypeCode object for an IDL native type.
      abstract TypeCode ORB.create_recursive_sequence_tc(int bound, int offset)
      Deprecated.
      Use a combination of create_recursive_tc and create_sequence_tc instead
      TypeCode ORB.create_recursive_tc(String id)
      Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
      abstract TypeCode ORB.create_sequence_tc(int bound, TypeCode element_type)
      Creates a TypeCode object representing an IDL sequence.
      abstract TypeCode ORB.create_string_tc(int bound)
      Creates a TypeCode object representing a bounded IDL string.
      abstract TypeCode ORB.create_struct_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL struct.
      abstract TypeCode ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members)
      Creates a TypeCode object representing an IDL union.
      TypeCode ORB.create_value_box_tc(String id, String name, TypeCode boxed_type)
      Creates a TypeCode object for an IDL value box.
      TypeCode ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
      Create a TypeCode object for an IDL value type.
      abstract TypeCode ORB.create_wstring_tc(int bound)
      Creates a TypeCode object representing a bounded IDL wstring (wide string).
      abstract TypeCode TypeCode.discriminator_type()
      Returns a TypeCode object describing all non-default member labels.
      abstract TypeCode Any.extract_TypeCode()
      Extracts the TypeCode object in this Any object's value field.
      abstract TypeCode TypeCode.get_compact_typecode()
      Strips out all optional name and member name fields, but leaves all alias typecodes intact.
      abstract TypeCode ORB.get_primitive_tc(TCKind tcKind)
      Retrieves the TypeCode object that represents the given primitive IDL type.
      TypeCode DynAny.get_typecode()
      Deprecated.
      Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
      abstract TypeCode ExceptionList.item(int index)
      Returns the TypeCode object at the given index.
      abstract TypeCode TypeCode.member_type(int index)
      Retrieves the TypeCode object describing the type of the member identified by the given index.
      TypeCode DataInputStream.read_TypeCode()
      Reads an IDL typecode from the input stream.
      static TypeCode | NameValuePairHelper.type()
      static TypeCode | PolicyTypeHelper.type()
      static TypeCode | ServiceDetailHelper.type()
      static TypeCode | SetOverrideTypeHelper.type()
      static TypeCode | CompletionStatusHelper.type()
      static TypeCode | OctetSeqHelper.type()
      static TypeCode | RepositoryIdHelper.type()
      static TypeCode | PolicyListHelper.type()
      static TypeCode | CurrentHelper.type()
      static TypeCode | ParameterModeHelper.type()
      static TypeCode | FieldNameHelper.type()
      static TypeCode | StructMemberHelper.type()
      static TypeCode | PolicyHelper.type()
      static TypeCode | WStringValueHelper.type()
      static TypeCode | WStringSeqHelper.type()
      static TypeCode | PolicyErrorCodeHelper.type()
      static TypeCode | LongSeqHelper.type()
      static TypeCode | LongLongSeqHelper.type()
      static TypeCode | DoubleSeqHelper.type()
      static TypeCode | UnionMemberHelper.type()
      static TypeCode | ObjectHelper.type()
      static TypeCode | IDLTypeHelper.type()
      static TypeCode | AnySeqHelper.type()
      static TypeCode | ValueMemberHelper.type()
      TypeCode IDLTypeOperations.type()
      The type attribute describes the type defined by an object derived from IDLType.
      static TypeCode | UnknownUserExceptionHelper.type()
      static TypeCode | ULongLongSeqHelper.type()
      static TypeCode | CharSeqHelper.type()
      static TypeCode | VisibilityHelper.type()
      static TypeCode | StringSeqHelper.type()
      abstract TypeCode Any.type()
      Returns type information for the element contained in this Any object.
      static TypeCode | BooleanSeqHelper.type()
      static TypeCode | PolicyErrorHelper.type()
      static TypeCode | WrongTransactionHelper.type()
      static TypeCode | VersionSpecHelper.type()
      static TypeCode | ValueBaseHelper.type()
      static TypeCode | ULongSeqHelper.type()
      static TypeCode | FloatSeqHelper.type()
      static TypeCode | WCharSeqHelper.type()
      static TypeCode | ServiceInformationHelper.type()
      static TypeCode | StringValueHelper.type()
      static TypeCode | UShortSeqHelper.type()
      static TypeCode | ShortSeqHelper.type()
      static TypeCode | IdentifierHelper.type()
      TypeCode | _IDLTypeStub.type()
      static TypeCode | DefinitionKindHelper.type()
      TypeCode DynAny.type()
      Deprecated.
      Returns the TypeCode of the object inserted into this DynAny.
      Methods in org.omg.CORBA with parameters of type TypeCode
      Modifier and Type Method and Description
      abstract void ExceptionList.add(TypeCode exc)
      Adds a TypeCode object describing an exception to this ExceptionList object.
      abstract TypeCode ORB.create_alias_tc(String id, String name, TypeCode original_type)
      Creates a TypeCode object representing an IDL alias (typedef).
      abstract TypeCode ORB.create_array_tc(int length, TypeCode element_type)
      Creates a TypeCode object representing an IDL array.
      DynAny ORB.create_basic_dyn_any(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynArray ORB.create_dyn_array(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynEnum ORB.create_dyn_enum(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynSequence ORB.create_dyn_sequence(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynStruct ORB.create_dyn_struct(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynUnion ORB.create_dyn_union(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      abstract TypeCode ORB.create_sequence_tc(int bound, TypeCode element_type)
      Creates a TypeCode object representing an IDL sequence.
      abstract TypeCode ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members)
      Creates a TypeCode object representing an IDL union.
      TypeCode ORB.create_value_box_tc(String id, String name, TypeCode boxed_type)
      Creates a TypeCode object for an IDL value box.
      TypeCode ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
      Create a TypeCode object for an IDL value type.
      abstract boolean TypeCode.equal(TypeCode tc)
      Compares this TypeCode object with the given one, testing for equality.
      abstract boolean TypeCode.equivalent(TypeCode tc)
      Tests to see if the given TypeCode object is equivalent to this TypeCode object.
      void Any.insert_fixed(BigDecimal value, TypeCode type)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      abstract void Any.insert_Object(Object o, TypeCode t)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.
      void DynAny.insert_typecode(TypeCode value)
      Deprecated.
      Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
      abstract void Any.insert_TypeCode(TypeCode t)
      Inserts the given TypeCode object into this Any object's value field.
      abstract void Any.insert_Value(Serializable v, TypeCode t)
      Inserts the given java.io.Serializable object into this Any object's value field.
      abstract void Any.read_value(InputStream is, TypeCode t)
      Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
      abstract void Request.set_return_type(TypeCode tc)
      Sets the typecode for the return value of the method.
      abstract void Any.type(TypeCode t)
      Sets this Any object's type field to the given TypeCode object and clears its value.
      void DataOutputStream.write_TypeCode(TypeCode value)
      Writes the typecode to the output stream.
      Constructors in org.omg.CORBA with parameters of type TypeCode
      Constructor and Description
      StructMember(String __name, TypeCode __type, IDLType __type_def)
      Constructs a StructMember object initialized with the given values.
      TypeCodeHolder(TypeCode initial)
      Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
      UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
      Constructs a new UnionMember object with its fields initialized to the given values.
      ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
      Constructs a ValueMember object initialized with the given values.

    • Uses of TypeCode in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return TypeCode
      Modifier and Type Method and Description
      TypeCode Streamable._type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      abstract TypeCode InputStream.read_TypeCode()
      Reads a TypeCode from this input stream.
      Methods in org.omg.CORBA.portable with parameters of type TypeCode
      Modifier and Type Method and Description
      abstract void OutputStream.write_TypeCode(TypeCode value)
      Writes a TypeCode on this output stream.

    • Uses of TypeCode in org.omg.CosNaming

      Methods in org.omg.CosNaming that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | BindingIteratorHolder._type()
      TypeCode | BindingListHolder._type()
      TypeCode | NameHolder._type()
      TypeCode | NamingContextExtHolder._type()
      TypeCode | NameComponentHolder._type()
      TypeCode | BindingHolder._type()
      TypeCode | NamingContextHolder._type()
      TypeCode | BindingTypeHolder._type()
      static TypeCode | BindingListHelper.type()
      static TypeCode | NameComponentHelper.type()
      static TypeCode | NamingContextHelper.type()
      static TypeCode | NameHelper.type()
      static TypeCode | BindingIteratorHelper.type()
      static TypeCode | BindingHelper.type()
      static TypeCode | IstringHelper.type()
      static TypeCode | NamingContextExtHelper.type()
      static TypeCode | BindingTypeHelper.type()

    • Uses of TypeCode in org.omg.CosNaming.NamingContextExtPackage

      Methods in org.omg.CosNaming.NamingContextExtPackage that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | InvalidAddressHolder._type()
      static TypeCode | InvalidAddressHelper.type()
      static TypeCode | StringNameHelper.type()
      static TypeCode | URLStringHelper.type()
      static TypeCode | AddressHelper.type()

    • Uses of TypeCode in org.omg.CosNaming.NamingContextPackage

      Methods in org.omg.CosNaming.NamingContextPackage that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | CannotProceedHolder._type()
      TypeCode | NotEmptyHolder._type()
      TypeCode | NotFoundReasonHolder._type()
      TypeCode | NotFoundHolder._type()
      TypeCode | InvalidNameHolder._type()
      TypeCode | AlreadyBoundHolder._type()
      static TypeCode | CannotProceedHelper.type()
      static TypeCode | AlreadyBoundHelper.type()
      static TypeCode | InvalidNameHelper.type()
      static TypeCode | NotFoundReasonHelper.type()
      static TypeCode | NotEmptyHelper.type()
      static TypeCode | NotFoundHelper.type()

    • Uses of TypeCode in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that return TypeCode
      Modifier and Type | Method and Description
      TypeCode _DynSequenceStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode DynAnyOperations.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynEnumStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynValueStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynArrayStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynStructStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynAnyStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynFixedStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynUnionStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynSequenceStub.type()
      Returns the TypeCode associated with this DynAny object.
      static TypeCode | NameValuePairHelper.type()
      TypeCode DynAnyOperations.type()
      Returns the TypeCode associated with this DynAny object.
      TypeCode _DynEnumStub.type()
      Returns the TypeCode associated with this DynAny object.
      static TypeCode | DynUnionHelper.type()
      static TypeCode | DynSequenceHelper.type()
      static TypeCode | DynEnumHelper.type()
      static TypeCode | DynArrayHelper.type()
      static TypeCode | DynAnySeqHelper.type()
      static TypeCode | FieldNameHelper.type()
      static TypeCode | DynFixedHelper.type()
      TypeCode _DynValueStub.type()
      Returns the TypeCode associated with this DynAny object.
      TypeCode _DynArrayStub.type()
      Returns the TypeCode associated with this DynAny object.
      static TypeCode | DynAnyHelper.type()
      TypeCode _DynStructStub.type()
      Returns the TypeCode associated with this DynAny object.
      TypeCode _DynAnyStub.type()
      Returns the TypeCode associated with this DynAny object.
      static TypeCode | AnySeqHelper.type()
      static TypeCode | NameDynAnyPairSeqHelper.type()
      static TypeCode | DynValueHelper.type()
      static TypeCode | NameDynAnyPairHelper.type()
      static TypeCode | NameValuePairSeqHelper.type()
      static TypeCode | DynStructHelper.type()
      static TypeCode | DynAnyFactoryHelper.type()
      TypeCode _DynFixedStub.type()
      Returns the TypeCode associated with this DynAny object.
      TypeCode _DynUnionStub.type()
      Returns the TypeCode associated with this DynAny object.
      Methods in org.omg.DynamicAny with parameters of type TypeCode
      Modifier and Type Method and Description
      DynAny DynAnyFactoryOperations.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny _DynAnyFactoryStub.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      void _DynSequenceStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void DynAnyOperations.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynEnumStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynValueStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynArrayStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynStructStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynAnyStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynFixedStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynUnionStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.

    • Uses of TypeCode in org.omg.DynamicAny.DynAnyFactoryPackage

      Methods in org.omg.DynamicAny.DynAnyFactoryPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | InconsistentTypeCodeHelper.type()

    • Uses of TypeCode in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | InvalidValueHelper.type()
      static TypeCode | TypeMismatchHelper.type()

    • Uses of TypeCode in org.omg.IOP

      Methods in org.omg.IOP that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | ServiceContextHolder._type()
      TypeCode | TaggedProfileHolder._type()
      TypeCode | TaggedComponentHolder._type()
      TypeCode | IORHolder._type()
      TypeCode | ServiceContextListHolder._type()
      TypeCode | MultipleComponentProfileHolder._type()
      static TypeCode | ComponentIdHelper.type()
      static TypeCode | CodecFactoryHelper.type()
      static TypeCode | ServiceContextListHelper.type()
      static TypeCode | ServiceIdHelper.type()
      static TypeCode | IORHelper.type()
      static TypeCode | ProfileIdHelper.type()
      static TypeCode | ServiceContextHelper.type()
      static TypeCode | TaggedComponentHelper.type()
      static TypeCode | TaggedProfileHelper.type()
      static TypeCode | MultipleComponentProfileHelper.type()
      Methods in org.omg.IOP with parameters of type TypeCode
      Modifier and Type Method and Description
      Any CodecOperations.decode_value(byte[] data, TypeCode tc)
      Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.

    • Uses of TypeCode in org.omg.IOP.CodecFactoryPackage

      Methods in org.omg.IOP.CodecFactoryPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | UnknownEncodingHelper.type()

    • Uses of TypeCode in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | InvalidTypeForEncodingHelper.type()
      static TypeCode | FormatMismatchHelper.type()
      static TypeCode | TypeMismatchHelper.type()

    • Uses of TypeCode in org.omg.Messaging

      Methods in org.omg.Messaging that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | SyncScopeHelper.type()

    • Uses of TypeCode in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | ObjectReferenceTemplateHolder._type()
      TypeCode | ObjectReferenceTemplateSeqHolder._type()
      TypeCode | IORInterceptor_3_0Holder._type()
      TypeCode | ObjectReferenceFactoryHolder._type()
      TypeCode[] RequestInfoOperations.exceptions()
      Returns an array of TypeCode objects describing the TypeCodes of the user exceptions that this operation invocation may throw.
      static TypeCode | ObjectReferenceTemplateHelper.type()
      static TypeCode | AdapterNameHelper.type()
      static TypeCode | CurrentHelper.type()
      static TypeCode | ForwardRequestHelper.type()
      static TypeCode | ObjectReferenceTemplateSeqHelper.type()
      static TypeCode | ServerIdHelper.type()
      static TypeCode | ORBIdHelper.type()
      static TypeCode | IORInterceptor_3_0Helper.type()
      static TypeCode | AdapterStateHelper.type()
      static TypeCode | ObjectIdHelper.type()
      static TypeCode | AdapterManagerIdHelper.type()
      static TypeCode | InvalidSlotHelper.type()
      static TypeCode | ObjectReferenceFactoryHelper.type()

    • Uses of TypeCode in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | DuplicateNameHelper.type()
      static TypeCode | InvalidNameHelper.type()
      static TypeCode | ObjectIdHelper.type()

    • Uses of TypeCode in org.omg.PortableServer

      Methods in org.omg.PortableServer that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | POAHelper.type()
      static TypeCode | CurrentHelper.type()
      static TypeCode | ForwardRequestHelper.type()
      static TypeCode | ServantLocatorHelper.type()
      static TypeCode | ServantActivatorHelper.type()

    • Uses of TypeCode in org.omg.PortableServer.CurrentPackage

      Methods in org.omg.PortableServer.CurrentPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | NoContextHelper.type()

    • Uses of TypeCode in org.omg.PortableServer.POAManagerPackage

      Methods in org.omg.PortableServer.POAManagerPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | AdapterInactiveHelper.type()

    • Uses of TypeCode in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return TypeCode
      Modifier and Type | Method and Description
      static TypeCode | ServantAlreadyActiveHelper.type()
      static TypeCode | ObjectAlreadyActiveHelper.type()
      static TypeCode | NoServantHelper.type()
      static TypeCode | WrongPolicyHelper.type()
      static TypeCode | ServantNotActiveHelper.type()
      static TypeCode | AdapterNonExistentHelper.type()
      static TypeCode | InvalidPolicyHelper.type()
      static TypeCode | ObjectNotActiveHelper.type()
      static TypeCode | AdapterAlreadyExistsHelper.type()
      static TypeCode | WrongAdapterHelper.type()

    • Uses of TypeCode in org.omg.PortableServer.ServantLocatorPackage

      Methods in org.omg.PortableServer.ServantLocatorPackage that return TypeCode
      Modifier and Type | Method and Description
      TypeCode | CookieHolder._type()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TypeCodeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TypeCodeHolder

No usage of org.omg.CORBA.TypeCodeHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ULongLongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ULongLongSeqHelper

No usage of org.omg.CORBA.ULongLongSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ULongLongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ULongLongSeqHolder

  • Packages that use ULongLongSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ULongLongSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type ULongLongSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned long longs from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ULongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ULongSeqHelper

No usage of org.omg.CORBA.ULongSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ULongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ULongSeqHolder

  • Packages that use ULongSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ULongSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type ULongSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_ulong_array(ULongSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned longs from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UnionMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UnionMember

  • Packages that use UnionMember
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of UnionMember in org.omg.CORBA

      Methods in org.omg.CORBA that return UnionMember
      Modifier and Type | Method and Description
      static UnionMember | UnionMemberHelper.extract(Any a)
      static UnionMember | UnionMemberHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type UnionMember
      Modifier and Type | Method and Description
      abstract TypeCode ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members)
      Creates a TypeCode object representing an IDL union.
      static void | UnionMemberHelper.insert(Any a, UnionMember that)
      static void | UnionMemberHelper.write(OutputStream ostream, UnionMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UnionMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UnionMemberHelper

No usage of org.omg.CORBA.UnionMemberHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UNKNOWN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UNKNOWN

No usage of org.omg.CORBA.UNKNOWN
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UnknownUserException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UnknownUserException

  • Packages that use UnknownUserException
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of UnknownUserException in org.omg.CORBA

      Fields in org.omg.CORBA declared as UnknownUserException
      Modifier and Type | Field and Description
      UnknownUserException | UnknownUserExceptionHolder.value
      Methods in org.omg.CORBA that return UnknownUserException
      Modifier and Type | Method and Description
      static UnknownUserException | UnknownUserExceptionHelper.extract(Any a)
      static UnknownUserException | UnknownUserExceptionHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type UnknownUserException
      Modifier and Type | Method and Description
      static void | UnknownUserExceptionHelper.insert(Any a, UnknownUserException that)
      static void | UnknownUserExceptionHelper.write(OutputStream ostream, UnknownUserException value)
      Constructors in org.omg.CORBA with parameters of type UnknownUserException
      Constructor and Description
      UnknownUserExceptionHolder(UnknownUserException initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UnknownUserExceptionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UnknownUserExceptionHelper

No usage of org.omg.CORBA.UnknownUserExceptionHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UnknownUserExceptionHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UnknownUserExceptionHolder

No usage of org.omg.CORBA.UnknownUserExceptionHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UserException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UserException

  • Packages that use UserException
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.DynAnyPackage
    Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
    org.omg.CORBA.ORBPackage
    Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
    org.omg.CORBA.TypeCodePackage
    Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of UserException in org.omg.CORBA

      Subclasses of UserException in org.omg.CORBA
      Modifier and Type Class and Description
      class  Bounds
      A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
      class  PolicyError
      A user exception thrown when a policy error occurs.
      class  UnknownUserException
      A class that contains user exceptions returned by the server.
      class  WrongTransaction
      The CORBA WrongTransaction user-defined exception.

    • Uses of UserException in org.omg.CORBA.DynAnyPackage

      Subclasses of UserException in org.omg.CORBA.DynAnyPackage
      Modifier and Type | Class and Description
      class  Invalid
      Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
      class  InvalidSeq
      The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
      class  | InvalidValue
      class  TypeMismatch
      TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

    • Uses of UserException in org.omg.CORBA.ORBPackage

      Subclasses of UserException in org.omg.CORBA.ORBPackage
      Modifier and Type Class and Description
      class  InconsistentTypeCode
      InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
      class  InvalidName
      The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

    • Uses of UserException in org.omg.CORBA.TypeCodePackage

      Subclasses of UserException in org.omg.CORBA.TypeCodePackage
      Modifier and Type Class and Description
      class  BadKind
      The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

    • Uses of UserException in org.omg.CosNaming.NamingContextExtPackage

      Subclasses of UserException in org.omg.CosNaming.NamingContextExtPackage
      Modifier and Type Class and Description
      class  InvalidAddress
      org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java .

    • Uses of UserException in org.omg.CosNaming.NamingContextPackage

      Subclasses of UserException in org.omg.CosNaming.NamingContextPackage
      Modifier and Type Class and Description
      class  AlreadyBound
      org/omg/CosNaming/NamingContextPackage/AlreadyBound.java .
      class  CannotProceed
      org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
      class  NotEmpty
      org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
      class  NotFound
      org/omg/CosNaming/NamingContextPackage/NotFound.java .

    • Uses of UserException in org.omg.IOP.CodecFactoryPackage

      Subclasses of UserException in org.omg.IOP.CodecFactoryPackage
      Modifier and Type Class and Description
      class  UnknownEncoding
      org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java .

    • Uses of UserException in org.omg.IOP.CodecPackage

      Subclasses of UserException in org.omg.IOP.CodecPackage
      Modifier and Type Class and Description
      class  FormatMismatch
      org/omg/IOP/CodecPackage/FormatMismatch.java .
      class  InvalidTypeForEncoding
      org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java .

    • Uses of UserException in org.omg.PortableInterceptor

      Subclasses of UserException in org.omg.PortableInterceptor
      Modifier and Type Class and Description
      class  InvalidSlot
      org/omg/PortableInterceptor/InvalidSlot.java .

    • Uses of UserException in org.omg.PortableInterceptor.ORBInitInfoPackage

      Subclasses of UserException in org.omg.PortableInterceptor.ORBInitInfoPackage
      Modifier and Type Class and Description
      class  DuplicateName
      org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .

    • Uses of UserException in org.omg.PortableServer

      Subclasses of UserException in org.omg.PortableServer
      Modifier and Type Class and Description
      class  ForwardRequest
      org/omg/PortableServer/ForwardRequest.java .

    • Uses of UserException in org.omg.PortableServer.CurrentPackage

      Subclasses of UserException in org.omg.PortableServer.CurrentPackage
      Modifier and Type Class and Description
      class  NoContext
      org/omg/PortableServer/CurrentPackage/NoContext.java .

    • Uses of UserException in org.omg.PortableServer.POAManagerPackage

      Subclasses of UserException in org.omg.PortableServer.POAManagerPackage
      Modifier and Type Class and Description
      class  AdapterInactive
      org/omg/PortableServer/POAManagerPackage/AdapterInactive.java .

    • Uses of UserException in org.omg.PortableServer.POAPackage

      Subclasses of UserException in org.omg.PortableServer.POAPackage
      Modifier and Type Class and Description
      class  AdapterAlreadyExists
      org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java .
      class  AdapterNonExistent
      org/omg/PortableServer/POAPackage/AdapterNonExistent.java .
      class  InvalidPolicy
      org/omg/PortableServer/POAPackage/InvalidPolicy.java .
      class  NoServant
      org/omg/PortableServer/POAPackage/NoServant.java .
      class  ObjectAlreadyActive
      org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java .
      class  ObjectNotActive
      org/omg/PortableServer/POAPackage/ObjectNotActive.java .
      class  ServantAlreadyActive
      org/omg/PortableServer/POAPackage/ServantAlreadyActive.java .
      class  ServantNotActive
      org/omg/PortableServer/POAPackage/ServantNotActive.java .
      class  WrongAdapter
      org/omg/PortableServer/POAPackage/WrongAdapter.java .
      class  WrongPolicy
      org/omg/PortableServer/POAPackage/WrongPolicy.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UShortSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UShortSeqHelper

No usage of org.omg.CORBA.UShortSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.UShortSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.UShortSeqHolder

  • Packages that use UShortSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of UShortSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type UShortSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_ushort_array(UShortSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned shorts from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ValueBaseHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ValueBaseHelper

No usage of org.omg.CORBA.ValueBaseHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ValueBaseHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ValueBaseHolder

No usage of org.omg.CORBA.ValueBaseHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ValueMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ValueMember

  • Packages that use ValueMember
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of ValueMember in org.omg.CORBA

      Methods in org.omg.CORBA that return ValueMember
      Modifier and Type | Method and Description
      static ValueMember | ValueMemberHelper.extract(Any a)
      static ValueMember | ValueMemberHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type ValueMember
      Modifier and Type | Method and Description
      TypeCode ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
      Create a TypeCode object for an IDL value type.
      static void | ValueMemberHelper.insert(Any a, ValueMember that)
      static void | ValueMemberHelper.write(OutputStream ostream, ValueMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ValueMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ValueMemberHelper

No usage of org.omg.CORBA.ValueMemberHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.VersionSpecHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.VersionSpecHelper

No usage of org.omg.CORBA.VersionSpecHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.VisibilityHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.VisibilityHelper

No usage of org.omg.CORBA.VisibilityHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WCharSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WCharSeqHelper

No usage of org.omg.CORBA.WCharSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WCharSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WCharSeqHolder

  • Packages that use WCharSeqHolder
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of WCharSeqHolder in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type WCharSeqHolder
      Modifier and Type Method and Description
      void DataInputStream.read_wchar_array(WCharSeqHolder seq, int offset, int length)
      Reads array of IDL wide characters from offset for length elements from the input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WrongTransaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WrongTransaction

  • Packages that use WrongTransaction
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of WrongTransaction in org.omg.CORBA

      Fields in org.omg.CORBA declared as WrongTransaction
      Modifier and Type | Field and Description
      WrongTransaction | WrongTransactionHolder.value
      Methods in org.omg.CORBA that return WrongTransaction
      Modifier and Type | Method and Description
      static WrongTransaction | WrongTransactionHelper.extract(Any a)
      static WrongTransaction | WrongTransactionHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type WrongTransaction
      Modifier and Type | Method and Description
      static void | WrongTransactionHelper.insert(Any a, WrongTransaction that)
      static void | WrongTransactionHelper.write(OutputStream ostream, WrongTransaction value)
      Methods in org.omg.CORBA that throw WrongTransaction
      Modifier and Type Method and Description
      abstract Request ORB.get_next_response()
      Gets the next Request instance for which a response has been received.
      abstract void Request.get_response()
      Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
      Constructors in org.omg.CORBA with parameters of type WrongTransaction
      Constructor and Description
      WrongTransactionHolder(WrongTransaction initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WrongTransactionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WrongTransactionHelper

No usage of org.omg.CORBA.WrongTransactionHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WrongTransactionHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WrongTransactionHolder

No usage of org.omg.CORBA.WrongTransactionHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WStringSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WStringSeqHelper

No usage of org.omg.CORBA.WStringSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WStringSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WStringSeqHolder

No usage of org.omg.CORBA.WStringSeqHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.WStringValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.WStringValueHelper

No usage of org.omg.CORBA.WStringValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA._IDLTypeStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA._IDLTypeStub

No usage of org.omg.CORBA._IDLTypeStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA._PolicyStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA._PolicyStub

No usage of org.omg.CORBA._PolicyStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.ARG_IN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.ARG_IN

No usage of org.omg.CORBA.ARG_IN
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.ARG_INOUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.ARG_INOUT

No usage of org.omg.CORBA.ARG_INOUT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.ARG_OUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.ARG_OUT

No usage of org.omg.CORBA.ARG_OUT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.BAD_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.BAD_POLICY

No usage of org.omg.CORBA.BAD_POLICY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.BAD_POLICY_TYPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.BAD_POLICY_TYPE

No usage of org.omg.CORBA.BAD_POLICY_TYPE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.BAD_POLICY_VALUE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.BAD_POLICY_VALUE

No usage of org.omg.CORBA.BAD_POLICY_VALUE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.CTX_RESTRICT_SCOPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.CTX_RESTRICT_SCOPE

No usage of org.omg.CORBA.CTX_RESTRICT_SCOPE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.Current

  • Packages that use Current
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of Current in org.omg.CORBA

      Fields in org.omg.CORBA declared as Current
      Modifier and Type | Field and Description
      Current | CurrentHolder.value
      Methods in org.omg.CORBA that return Current
      Modifier and Type | Method and Description
      static Current | CurrentHelper.extract(Any a)
      Current ORB.get_current()
      Deprecated.
      use resolve_initial_references.
      static Current | CurrentHelper.narrow(Object obj)
      static Current | CurrentHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type Current
      Modifier and Type | Method and Description
      static void | CurrentHelper.insert(Any a, Current that)
      static void | CurrentHelper.write(OutputStream ostream, Current value)
      Constructors in org.omg.CORBA with parameters of type Current
      Constructor and Description
      CurrentHolder(Current initialValue)

    • Uses of Current in org.omg.PortableServer

      Subinterfaces of Current in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  Current
      The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.CurrentOperations

  • Packages that use CurrentOperations
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of CurrentOperations in org.omg.CORBA

      Subinterfaces of CurrentOperations in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  Current
      Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.

    • Uses of CurrentOperations in org.omg.PortableServer

      Subinterfaces of CurrentOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  CurrentOperations
      The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.CustomMarshal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.CustomMarshal

  • Packages that use CustomMarshal
    Package Description
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of CustomMarshal in org.omg.CORBA.portable

      Subinterfaces of CustomMarshal in org.omg.CORBA.portable
      Modifier and Type Interface and Description
      interface  CustomValue
      An extension of ValueBase that is implemented by custom value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DataInputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DataInputStream

  • Packages that use DataInputStream
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DataInputStream in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type DataInputStream
      Modifier and Type Method and Description
      void CustomMarshal.unmarshal(DataInputStream is)
      Unmarshal method has to be implemented by the Customized Marshal class.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DataOutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DataOutputStream

  • Packages that use DataOutputStream
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DataOutputStream in org.omg.CORBA

      Methods in org.omg.CORBA with parameters of type DataOutputStream
      Modifier and Type Method and Description
      void CustomMarshal.marshal(DataOutputStream os)
      Marshal method has to be implemented by the Customized Marshal class.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DomainManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DomainManager

  • Packages that use DomainManager
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of DomainManager in org.omg.CORBA

      Methods in org.omg.CORBA that return DomainManager
      Modifier and Type Method and Description
      DomainManager[] Object._get_domain_managers()
      Retrieves the DomainManagers of this object.
      DomainManager[] LocalObject._get_domain_managers()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.

    • Uses of DomainManager in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return DomainManager
      Modifier and Type Method and Description
      DomainManager[] ObjectImpl._get_domain_managers()
      Retrieves a list of the domain managers for this ObjectImpl object.
      DomainManager[] Delegate.get_domain_managers(Object self)
      Retrieves the DomainManagers of this object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DomainManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DomainManagerOperations

  • Packages that use DomainManagerOperations
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DomainManagerOperations in org.omg.CORBA

      Subinterfaces of DomainManagerOperations in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  DomainManager
      Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynAny

  • Packages that use DynAny
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynAny in org.omg.CORBA

      Subinterfaces of DynAny in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  DynArray
      Deprecated.
      Use the new DynArray instead
      interface  DynEnum
      Deprecated.
      Use the new DynEnum instead
      interface  DynFixed
      Deprecated.
      Use the new DynFixed instead
      interface  DynSequence
      Deprecated.
      Use the new DynSequence instead
      interface  DynStruct
      Deprecated.
      Use the new DynStruct instead
      interface  DynUnion
      Deprecated.
      Use the new DynUnion instead
      interface  DynValue
      Deprecated.
      Use the new DynValue instead
      Methods in org.omg.CORBA that return DynAny
      Modifier and Type Method and Description
      DynAny DynAny.copy()
      Deprecated.
      Clones this DynAny object.
      DynAny ORB.create_basic_dyn_any(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynAny ORB.create_dyn_any(Any value)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynAny DynAny.current_component()
      Deprecated.
      Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
      DynAny DynUnion.discriminator()
      Deprecated.
      Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
      DynAny DynUnion.member()
      Deprecated.
      Returns a DynAny object reference that is used in order to insert/get a member of this union.
      Methods in org.omg.CORBA with parameters of type DynAny
      Modifier and Type Method and Description
      void DynAny.assign(DynAny dyn_any)
      Deprecated.
      Copy the contents from one Dynamic Any into another.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynArray

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynArray

  • Packages that use DynArray
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynArray in org.omg.CORBA

      Methods in org.omg.CORBA that return DynArray
      Modifier and Type Method and Description
      DynArray ORB.create_dyn_array(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynEnum

  • Packages that use DynEnum
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynEnum in org.omg.CORBA

      Methods in org.omg.CORBA that return DynEnum
      Modifier and Type Method and Description
      DynEnum ORB.create_dyn_enum(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynFixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynFixed

No usage of org.omg.CORBA.DynFixed
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynSequence

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynSequence

  • Packages that use DynSequence
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynSequence in org.omg.CORBA

      Methods in org.omg.CORBA that return DynSequence
      Modifier and Type Method and Description
      DynSequence ORB.create_dyn_sequence(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynStruct

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynStruct

  • Packages that use DynStruct
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynStruct in org.omg.CORBA

      Methods in org.omg.CORBA that return DynStruct
      Modifier and Type Method and Description
      DynStruct ORB.create_dyn_struct(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynUnion

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynUnion

  • Packages that use DynUnion
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of DynUnion in org.omg.CORBA

      Methods in org.omg.CORBA that return DynUnion
      Modifier and Type Method and Description
      DynUnion ORB.create_dyn_union(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.DynValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.DynValue

No usage of org.omg.CORBA.DynValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.IDLType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.IDLType

  • Packages that use IDLType
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of IDLType in org.omg.CORBA

      Classes in org.omg.CORBA that implement IDLType
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
      Fields in org.omg.CORBA declared as IDLType
      Modifier and Type Field and Description
      IDLType UnionMember.type_def
      The typedef that represents the IDL type of the union member described by this UnionMember object.
      IDLType ValueMember.type_def
      The typedef that represents the IDL type of the value member described by this ValueMember object.
      IDLType StructMember.type_def
      The typedef that represents the IDL type of the struct member described by this StructMember object.
      Methods in org.omg.CORBA that return IDLType
      Modifier and Type | Method and Description
      static IDLType | IDLTypeHelper.extract(Any a)
      static IDLType | IDLTypeHelper.narrow(Object obj)
      static IDLType | IDLTypeHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type IDLType
      Modifier and Type | Method and Description
      static void | IDLTypeHelper.insert(Any a, IDLType that)
      static void | IDLTypeHelper.write(OutputStream ostream, IDLType value)
      Constructors in org.omg.CORBA with parameters of type IDLType
      Constructor and Description
      StructMember(String __name, TypeCode __type, IDLType __type_def)
      Constructs a StructMember object initialized with the given values.
      UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
      Constructs a new UnionMember object with its fields initialized to the given values.
      ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
      Constructs a ValueMember object initialized with the given values.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.IDLTypeOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.IDLTypeOperations

  • Packages that use IDLTypeOperations
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of IDLTypeOperations in org.omg.CORBA

      Subinterfaces of IDLTypeOperations in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  IDLType
      An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
      Classes in org.omg.CORBA that implement IDLTypeOperations
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.IRObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.IRObject

  • Packages that use IRObject
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of IRObject in org.omg.CORBA

      Subinterfaces of IRObject in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  IDLType
      An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
      Classes in org.omg.CORBA that implement IRObject
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.IRObjectOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.IRObjectOperations

  • Packages that use IRObjectOperations
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of IRObjectOperations in org.omg.CORBA

      Subinterfaces of IRObjectOperations in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  IDLType
      An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
      interface  IDLTypeOperations
      This interface must be implemented by all IDLType objects.
      interface  IRObject
      An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
      Classes in org.omg.CORBA that implement IRObjectOperations
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.Object

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.Object

  • Packages that use Object
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.portable
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.SendingContext
    Provides support for the marshalling of value types.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

    • Uses of Object in javax.rmi.CORBA

      Classes in javax.rmi.CORBA that implement Object
      Modifier and Type Class and Description
      class  Stub
      Base class from which all RMI-IIOP stubs must inherit.
      Methods in javax.rmi.CORBA that return Object
      Modifier and Type Method and Description
      Object Tie.thisObject()
      Returns an object reference for the target object represented by this tie.

    • Uses of Object in org.omg.CORBA

      Subinterfaces of Object in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  Current
      Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.
      interface  DomainManager
      Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
      interface  DynAny
      Deprecated.
      Use the new DynAny instead
      interface  DynArray
      Deprecated.
      Use the new DynArray instead
      interface  DynEnum
      Deprecated.
      Use the new DynEnum instead
      interface  DynFixed
      Deprecated.
      Use the new DynFixed instead
      interface  DynSequence
      Deprecated.
      Use the new DynSequence instead
      interface  DynStruct
      Deprecated.
      Use the new DynStruct instead
      interface  DynUnion
      Deprecated.
      Use the new DynUnion instead
      interface  DynValue
      Deprecated.
      Use the new DynValue instead
      interface  IDLType
      An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
      interface  IRObject
      An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
      interface  Policy
      Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
      Classes in org.omg.CORBA that implement Object
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
      class  _PolicyStub
      The Stub for Policy.
      class  DynamicImplementation
      Deprecated.
      org.omg.CORBA.DynamicImplementation
      class  LocalObject
      Used as a base class for implementation of a local IDL interface in the Java language mapping.
      Fields in org.omg.CORBA declared as Object
      Modifier and Type Field and Description
      Object ObjectHolder.value
      The Object value held by this ObjectHolder object.
      Methods in org.omg.CORBA that return Object
      Modifier and Type | Method and Description
      Object Object._duplicate()
      Returns a duplicate of this CORBA object reference.
      Object LocalObject._duplicate()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Object Object._get_interface_def()
      Obtains an InterfaceDef for the object implementation referenced by this object reference.
      Object LocalObject._get_interface_def()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Object LocalObject._get_interface()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      Object Object._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
      Object LocalObject._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      abstract Object Any.extract_Object()
      Extracts the org.omg.CORBA.Object in this Any object's value field.
      static Object | ObjectHelper.extract(Any a)
      Object DynAny.get_reference()
      Deprecated.
      Retrieves the org.omg.CORBA.Other contained in this DynAny object.
      Object DataInputStream.read_Object()
      Reads an IDL CORBA::Object from the input stream.
      static Object | ObjectHelper.read(InputStream istream)
      abstract Object ORB.resolve_initial_references(String object_name)
      Resolves a specific object reference from the set of available initial service names.
      abstract Object ORB.string_to_object(String str)
      Converts a string produced by the method object_to_string back to a CORBA object reference.
      abstract Object Request.target()
      Retrieves the the target object reference.
      Methods in org.omg.CORBA with parameters of type Object
      Modifier and Type | Method and Description
      boolean Object._is_equivalent(Object other)
      Determines whether the two object references are equivalent, so far as the ORB can easily determine.
      boolean LocalObject._is_equivalent(Object that)
      Determines whether the two object references are equivalent, so far as the ORB can easily determine.
      void ORB.connect(Object obj)
      Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.
      NVList ORB.create_operation_list(Object oper)
      Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
      void ORB.disconnect(Object obj)
      Disconnects the given servant object from the ORB.
      abstract void Any.insert_Object(Object o)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.
      abstract void Any.insert_Object(Object o, TypeCode t)
      Inserts the given org.omg.CORBA.Object object into this Any object's value field.
      void DynAny.insert_reference(Object value)
      Deprecated.
      Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
      static void | ObjectHelper.insert(Any a, Object that)
      static Current | CurrentHelper.narrow(Object obj)
      static Policy | PolicyHelper.narrow(Object obj)
      static IDLType | IDLTypeHelper.narrow(Object obj)
      abstract String ORB.object_to_string(Object obj)
      Converts the given CORBA object reference to a string.
      void DataOutputStream.write_Object(Object value)
      Writes the IDL CORBA::Object value to the output stream.
      static void | ObjectHelper.write(OutputStream ostream, Object value)
      Constructors in org.omg.CORBA with parameters of type Object
      Constructor and Description
      ObjectHolder(Object initial)
      Constructs a new ObjectHolder object with its value field initialized to the given Object.

    • Uses of Object in org.omg.CORBA_2_3

      Methods in org.omg.CORBA_2_3 that return Object
      Modifier and Type | Method and Description
      Object | ORB.get_value_def(String repid)

    • Uses of Object in org.omg.CORBA_2_3.portable

      Methods in org.omg.CORBA_2_3.portable with parameters of type Object
      Modifier and Type Method and Description
      String Delegate.get_codebase(Object self)
      Returns the codebase for object reference provided.

    • Uses of Object in org.omg.CORBA.portable

      Classes in org.omg.CORBA.portable that implement Object
      Modifier and Type Class and Description
      class  ObjectImpl
      The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
      Methods in org.omg.CORBA.portable that return Object
      Modifier and Type Method and Description
      Object ObjectImpl._duplicate()
      Returns a duplicate of this ObjectImpl object.
      Object ObjectImpl._get_interface_def()
      Retrieves the interface definition for this ObjectImpl object.
      Object ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
      abstract Object Delegate.duplicate(Object obj)
      Returns a duplicate of the object reference provided.
      abstract Object Delegate.get_interface_def(Object self)
      Return an InterfaceDef for the object reference provided.
      abstract Object InputStream.read_Object()
      Reads a CORBA object from this input stream.
      Object InputStream.read_Object(Class clz)
      Unmarshals an object and returns a CORBA Object, which is an instance of the class passed as its argument.
      Object Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
      Associates the policies passed in with a newly created object reference that it returns.
      Methods in org.omg.CORBA.portable with parameters of type Object
      Modifier and Type Method and Description
      boolean ObjectImpl._is_equivalent(Object that)
      Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Object Delegate.duplicate(Object obj)
      Returns a duplicate of the object reference provided.
      boolean Delegate.equals(Object self, Object obj)
      Provides the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
      DomainManager[] Delegate.get_domain_managers(Object self)
      Retrieves the DomainManagers of this object.
      abstract Object Delegate.get_interface_def(Object self)
      Return an InterfaceDef for the object reference provided.
      Policy Delegate.get_policy(Object self, int policy_type)
      Returns the Policy object of the specified type which applies to this object.
      abstract int Delegate.hash(Object obj, int max)
      Returns an ORB-internal identifier (hashcode) for this object reference.
      int Delegate.hashCode(Object self)
      Provides the implementation to override the hashCode() method of the delegating CORBA object.
      InputStream Delegate.invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
      abstract boolean Delegate.is_a(Object obj, String repository_id)
      Checks if the object reference is an instance of the given interface.
      abstract boolean Delegate.is_equivalent(Object obj, Object other)
      Determines if the two object references are equivalent.
      boolean Delegate.is_local(Object self)
      Returns true if this object is implemented by a local servant.
      abstract boolean Delegate.non_existent(Object obj)
      Determines whether the server object for the object reference has been destroyed.
      ORB Delegate.orb(Object obj)
      Provides a reference to the orb associated with its parameter.
      abstract void Delegate.release(Object obj)
      Releases resources associated with the object reference provided.
      void Delegate.releaseReply(Object self, InputStream input)
      releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
      abstract Request Delegate.request(Object obj, String operation)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      OutputStream Delegate.request(Object self, String operation, boolean responseExpected)
      request is called by a stub to obtain an OutputStream for marshaling arguments.
      void Delegate.servant_postinvoke(Object self, ServantObject servant)
      servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
      ServantObject Delegate.servant_preinvoke(Object self, String operation, Class expectedType)
      Returns a Java reference to the servant which should be used for this request.
      Object Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
      Associates the policies passed in with a newly created object reference that it returns.
      String Delegate.toString(Object self)
      Provides the implementation to override the toString() method of the delegating CORBA object.
      abstract void OutputStream.write_Object(Object value)
      Writes a CORBA Object on this output stream.

    • Uses of Object in org.omg.CosNaming

      Subinterfaces of Object in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  BindingIterator
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      interface  NamingContext
      A naming context is an object that contains a set of name bindings in which each name is unique.
      interface  NamingContextExt
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Classes in org.omg.CosNaming that implement Object
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  _BindingIteratorStub
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  | _NamingContextImplBase
      class  _NamingContextStub
      A naming context is an object that contains a set of name bindings in which each name is unique.
      Methods in org.omg.CosNaming that return Object
      Modifier and Type Method and Description
      Object _NamingContextExtStub.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object NamingContextExtOperations.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object _NamingContextExtStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object NamingContextOperations.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object _NamingContextStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Methods in org.omg.CosNaming with parameters of type Object
      Modifier and Type | Method and Description
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      static NamingContext | NamingContextHelper.narrow(Object obj)
      static BindingIterator | BindingIteratorHelper.narrow(Object obj)
      static NamingContextExt | NamingContextExtHelper.narrow(Object obj)
      void _NamingContextExtStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      static NamingContext | NamingContextHelper.unchecked_narrow(Object obj)
      static BindingIterator | BindingIteratorHelper.unchecked_narrow(Object obj)
      static NamingContextExt | NamingContextExtHelper.unchecked_narrow(Object obj)

    • Uses of Object in org.omg.DynamicAny

      Subinterfaces of Object in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynAnyFactory
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueCommon
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      Classes in org.omg.DynamicAny that implement Object
      Modifier and Type Class and Description
      class  _DynAnyFactoryStub
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      class  _DynAnyStub
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
      Methods in org.omg.DynamicAny that return Object
      Modifier and Type Method and Description
      Object _DynSequenceStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object DynAnyOperations.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynEnumStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynValueStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynArrayStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynStructStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynAnyStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynFixedStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynUnionStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Methods in org.omg.DynamicAny with parameters of type Object
      Modifier and Type | Method and Description
      void _DynSequenceStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void DynAnyOperations.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynEnumStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynValueStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynArrayStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynStructStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynAnyStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynFixedStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynUnionStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      static DynUnion | DynUnionHelper.narrow(Object obj)
      static DynSequence | DynSequenceHelper.narrow(Object obj)
      static DynEnum | DynEnumHelper.narrow(Object obj)
      static DynArray | DynArrayHelper.narrow(Object obj)
      static DynFixed | DynFixedHelper.narrow(Object obj)
      static DynAny | DynAnyHelper.narrow(Object obj)
      static DynValue | DynValueHelper.narrow(Object obj)
      static DynStruct | DynStructHelper.narrow(Object obj)
      static DynAnyFactory | DynAnyFactoryHelper.narrow(Object obj)
      static DynUnion | DynUnionHelper.unchecked_narrow(Object obj)
      static DynSequence | DynSequenceHelper.unchecked_narrow(Object obj)
      static DynEnum | DynEnumHelper.unchecked_narrow(Object obj)
      static DynArray | DynArrayHelper.unchecked_narrow(Object obj)
      static DynFixed | DynFixedHelper.unchecked_narrow(Object obj)
      static DynAny | DynAnyHelper.unchecked_narrow(Object obj)
      static DynValue | DynValueHelper.unchecked_narrow(Object obj)
      static DynStruct | DynStructHelper.unchecked_narrow(Object obj)
      static DynAnyFactory | DynAnyFactoryHelper.unchecked_narrow(Object obj)

    • Uses of Object in org.omg.IOP

      Subinterfaces of Object in org.omg.IOP
      Modifier and Type Interface and Description
      interface  Codec
      The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
      interface  CodecFactory
      Codecs are obtained from the CodecFactory.
      Methods in org.omg.IOP with parameters of type Object
      Modifier and Type | Method and Description
      static CodecFactory | CodecFactoryHelper.narrow(Object obj)
      static CodecFactory | CodecFactoryHelper.unchecked_narrow(Object obj)

    • Uses of Object in org.omg.PortableInterceptor

      Subinterfaces of Object in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInfo
      Request Information, accessible to client-side request interceptors.
      interface  ClientRequestInterceptor
      Client-side request interceptor.
      interface  Interceptor
      All Portable Interceptors implement Interceptor.
      interface  IORInfo
      Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
      interface  IORInterceptor
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      interface  ORBInitializer
      Facilitates interceptor registration and ORB initialization.
      interface  ORBInitInfo
      Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
      interface  PolicyFactory
      Enables policy types to be constructed using CORBA.ORB.create_policy.
      interface  RequestInfo
      Request Information, accessible to Interceptors.
      interface  ServerRequestInfo
      Request Information, accessible to server-side request interceptors.
      interface  ServerRequestInterceptor
      Server-side request interceptor.
      Fields in org.omg.PortableInterceptor declared as Object
      Modifier and Type Field and Description
      Object ForwardRequest.forward
      The new object to forward the request to.
      Methods in org.omg.PortableInterceptor that return Object
      Modifier and Type Method and Description
      Object ClientRequestInfoOperations.effective_target()
      Returns the actual object on which the operation will be invoked.
      Object RequestInfoOperations.forward_reference()
      Contains the object to which the request will be forwarded, if the reply_status attribute is LOCATION_FORWARD.
      Object ObjectReferenceFactory.make_object(String repositoryId, byte[] object_id)
      make_object creates a CORBA object reference according to the data in this template, with the given repository ID and object ID.
      Object ORBInitInfoOperations.resolve_initial_references(String id)
      Identical to ORB.resolve_initial_references.
      Object ClientRequestInfoOperations.target()
      Returns the object which the client called to perform the operation.
      Methods in org.omg.PortableInterceptor with parameters of type Object
      Modifier and Type | Method and Description
      static Current | CurrentHelper.narrow(Object obj)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.narrow(Object obj)
      void ORBInitInfoOperations.register_initial_reference(String id, Object obj)
      Identical to ORB.register_initial_reference.
      static Current | CurrentHelper.unchecked_narrow(Object obj)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.unchecked_narrow(Object obj)
      Constructors in org.omg.PortableInterceptor with parameters of type Object
      Constructor and Description
      ForwardRequest(Object _forward)
      ForwardRequest(String $reason, Object _forward)

    • Uses of Object in org.omg.PortableServer

      Subinterfaces of Object in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  AdapterActivator
      An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
      interface  IdAssignmentPolicy
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
      interface  IdUniquenessPolicy
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
      interface  ImplicitActivationPolicy
      This policy specifies whether implicit activation of servants is supported in the created POA.
      interface  LifespanPolicy
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
      interface  POA
      A POA object manages the implementation of a collection of objects.
      interface  POAManager
      Each POA object has an associated POAManager object.
      interface  RequestProcessingPolicy
      This policy specifies how requests are processed by the created POA.
      interface  ServantActivator
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      interface  ServantLocator
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      interface  ServantManager
      A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
      interface  ServantRetentionPolicy
      This policy specifies whether the created POA retains active servants in an Active Object Map.
      interface  ThreadPolicy
      The ThreadPolicy specifies the threading model used with the created POA.
      Classes in org.omg.PortableServer that implement Object
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Fields in org.omg.PortableServer declared as Object
      Modifier and Type | Field and Description
      Object | ForwardRequest.forward_reference
      Methods in org.omg.PortableServer that return Object
      Modifier and Type Method and Description
      Object Servant._get_interface_def()
      Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.
      Object Servant._this_object()
      Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.
      Object Servant._this_object(ORB orb)
      Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
      Object POAOperations.create_reference_with_id(byte[] oid, String intf)
      This operation creates an object reference that encapsulates the specified Object Id and interface repository Id values.
      Object POAOperations.create_reference(String intf)
      This operation creates an object reference that encapsulates a POA-generated Object Id value and the specified interface repository id.
      Object POAOperations.id_to_reference(byte[] oid)
      If an object with the specified Object Id value is currently active, a reference encapsulating the information used to activate the object is returned.
      Object POAOperations.servant_to_reference(Servant p_servant)
      This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA.
      Methods in org.omg.PortableServer with parameters of type Object
      Modifier and Type | Method and Description
      static POA | POAHelper.narrow(Object obj)
      static Current | CurrentHelper.narrow(Object obj)
      static ServantLocator | ServantLocatorHelper.narrow(Object obj)
      static ServantActivator | ServantActivatorHelper.narrow(Object obj)
      byte[] POAOperations.reference_to_id(Object reference)
      This operation returns the Object Id value encapsulated by the specified reference.
      Servant POAOperations.reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      static ServantLocator | ServantLocatorHelper.unchecked_narrow(Object obj)
      static ServantActivator | ServantActivatorHelper.unchecked_narrow(Object obj)
      Constructors in org.omg.PortableServer with parameters of type Object
      Constructor and Description
      ForwardRequest(Object _forward_reference)
      ForwardRequest(String $reason, Object _forward_reference)

    • Uses of Object in org.omg.PortableServer.portable

      Methods in org.omg.PortableServer.portable that return Object
      Modifier and Type Method and Description
      Object Delegate.get_interface_def(Servant self)
      This operation returns an object in the Interface Repository which provides type information that may be useful to a program.
      Object Delegate.this_object(Servant Self)
      This allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.

    • Uses of Object in org.omg.SendingContext

      Subinterfaces of Object in org.omg.SendingContext
      Modifier and Type Interface and Description
      interface  RunTime
      Defines the base class that represents the Sending Context of a request.

    • Uses of Object in org.omg.stub.java.rmi

      Classes in org.omg.stub.java.rmi that implement Object
      Modifier and Type Class and Description
      class  _Remote_Stub
      This class provides the Stub for the Remote Type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.OMGVMCID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.OMGVMCID

No usage of org.omg.CORBA.OMGVMCID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.Policy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.Policy

  • Packages that use Policy
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of Policy in org.omg.CORBA

      Classes in org.omg.CORBA that implement Policy
      Modifier and Type Class and Description
      class  _PolicyStub
      The Stub for Policy.
      Fields in org.omg.CORBA declared as Policy
      Modifier and Type | Field and Description
      Policy[] | PolicyListHolder.value
      Policy | PolicyHolder.value
      Methods in org.omg.CORBA that return Policy
      Modifier and Type | Method and Description
      Policy Object._get_policy(int policy_type)
      Returns the Policy object of the specified type which applies to this object.
      Policy LocalObject._get_policy(int policy_type)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      Policy PolicyOperations.copy()
      Returns a copy of the Policy object.
      Policy _PolicyStub.copy()
      Copies the policy object.
      Policy ORB.create_policy(int type, Any val)
      Can be invoked to create new instances of policy objects of a specific type with specified initial state.
      static Policy[] | PolicyListHelper.extract(Any a)
      static Policy | PolicyHelper.extract(Any a)
      Policy DomainManagerOperations.get_domain_policy(int policy_type)
      This returns the policy of the specified type for objects in this domain.
      static Policy | PolicyHelper.narrow(Object obj)
      static Policy[] | PolicyListHelper.read(InputStream istream)
      static Policy | PolicyHelper.read(InputStream istream)
      Methods in org.omg.CORBA with parameters of type Policy
      Modifier and Type | Method and Description
      Object Object._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
      Object LocalObject._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      static void | PolicyHelper.insert(Any a, Policy that)
      static void | PolicyListHelper.insert(Any a, Policy[] that)
      static void | PolicyHelper.write(OutputStream ostream, Policy value)
      static void | PolicyListHelper.write(OutputStream ostream, Policy[] value)
      Constructors in org.omg.CORBA with parameters of type Policy
      Constructor and Description
      PolicyHolder(Policy initialValue)
      PolicyListHolder(Policy[] initialValue)

    • Uses of Policy in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Policy
      Modifier and Type Method and Description
      Policy ObjectImpl._get_policy(int policy_type)
      Retrieves the Policy object for this ObjectImpl object that has the given policy type.
      Policy Delegate.get_policy(Object self, int policy_type)
      Returns the Policy object of the specified type which applies to this object.
      Methods in org.omg.CORBA.portable with parameters of type Policy
      Modifier and Type Method and Description
      Object ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add)
      Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
      Object Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
      Associates the policies passed in with a newly created object reference that it returns.

    • Uses of Policy in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return Policy
      Modifier and Type Method and Description
      Policy PolicyFactoryOperations.create_policy(int type, Any value)
      Returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any.
      Policy IORInfoOperations.get_effective_policy(int type)
      Allows an ORB service implementation to determine what server side policy of a particular type is in effect for an IOR being constructed.
      Policy ClientRequestInfoOperations.get_request_policy(int type)
      Returns the given policy in effect for this operation.
      Policy ServerRequestInfoOperations.get_server_policy(int type)
      Returns the policy in effect for this operation for the given policy type.

    • Uses of Policy in org.omg.PortableServer

      Subinterfaces of Policy in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  IdAssignmentPolicy
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
      interface  IdUniquenessPolicy
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
      interface  ImplicitActivationPolicy
      This policy specifies whether implicit activation of servants is supported in the created POA.
      interface  LifespanPolicy
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
      interface  RequestProcessingPolicy
      This policy specifies how requests are processed by the created POA.
      interface  ServantRetentionPolicy
      This policy specifies whether the created POA retains active servants in an Active Object Map.
      interface  ThreadPolicy
      The ThreadPolicy specifies the threading model used with the created POA.
      Methods in org.omg.PortableServer with parameters of type Policy
      Modifier and Type Method and Description
      POA POAOperations.create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.PolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.PolicyOperations

  • Packages that use PolicyOperations
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of PolicyOperations in org.omg.CORBA

      Subinterfaces of PolicyOperations in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  Policy
      Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
      Classes in org.omg.CORBA that implement PolicyOperations
      Modifier and Type Class and Description
      class  _PolicyStub
      The Stub for Policy.

    • Uses of PolicyOperations in org.omg.PortableServer

      Subinterfaces of PolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  IdAssignmentPolicy
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
      interface  IdAssignmentPolicyOperations
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
      interface  IdUniquenessPolicy
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
      interface  IdUniquenessPolicyOperations
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
      interface  ImplicitActivationPolicy
      This policy specifies whether implicit activation of servants is supported in the created POA.
      interface  ImplicitActivationPolicyOperations
      This policy specifies whether implicit activation of servants is supported in the created POA.
      interface  LifespanPolicy
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
      interface  LifespanPolicyOperations
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
      interface  RequestProcessingPolicy
      This policy specifies how requests are processed by the created POA.
      interface  RequestProcessingPolicyOperations
      This policy specifies how requests are processed by the created POA.
      interface  ServantRetentionPolicy
      This policy specifies whether the created POA retains active servants in an Active Object Map.
      interface  ServantRetentionPolicyOperations
      This policy specifies whether the created POA retains active servants in an Active Object Map.
      interface  ThreadPolicy
      The ThreadPolicy specifies the threading model used with the created POA.
      interface  ThreadPolicyOperations
      The ThreadPolicy specifies the threading model used with the created POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.PRIVATE_MEMBER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.PRIVATE_MEMBER

No usage of org.omg.CORBA.PRIVATE_MEMBER
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.PUBLIC_MEMBER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.PUBLIC_MEMBER

No usage of org.omg.CORBA.PUBLIC_MEMBER
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.UNSUPPORTED_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.UNSUPPORTED_POLICY

No usage of org.omg.CORBA.UNSUPPORTED_POLICY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.UNSUPPORTED_POLICY_VALUE

No usage of org.omg.CORBA.UNSUPPORTED_POLICY_VALUE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.VM_ABSTRACT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.VM_ABSTRACT

No usage of org.omg.CORBA.VM_ABSTRACT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.VM_CUSTOM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.VM_CUSTOM

No usage of org.omg.CORBA.VM_CUSTOM
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.VM_NONE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.VM_NONE

No usage of org.omg.CORBA.VM_NONE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.VM_TRUNCATABLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.VM_TRUNCATABLE

No usage of org.omg.CORBA.VM_TRUNCATABLE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CODESET_INCOMPATIBLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CODESET_INCOMPATIBLE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.CODESET_INCOMPATIBLE
  • All Implemented Interfaces:
    Serializable

    public final class CODESET_INCOMPATIBLE
extends SystemException
    This exception is raised whenever meaningful communication is not possible between client and server native code sets.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      CODESET_INCOMPATIBLE()
      Constructs an CODESET_INCOMPATIBLE exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      CODESET_INCOMPATIBLE(int minorCode, CompletionStatus completionStatus)
      Constructs an CODESET_INCOMPATIBLE exception with the specified minor code and completion status.
      CODESET_INCOMPATIBLE(String detailMessage)
      Constructs an CODESET_INCOMPATIBLE exception with the specified message.
      CODESET_INCOMPATIBLE(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an CODESET_INCOMPATIBLE exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • CODESET_INCOMPATIBLE

        public CODESET_INCOMPATIBLE()
        Constructs an CODESET_INCOMPATIBLE exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • CODESET_INCOMPATIBLE

        public CODESET_INCOMPATIBLE(String detailMessage)
        Constructs an CODESET_INCOMPATIBLE exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • CODESET_INCOMPATIBLE

        public CODESET_INCOMPATIBLE(int minorCode,
                            CompletionStatus completionStatus)
        Constructs an CODESET_INCOMPATIBLE exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • CODESET_INCOMPATIBLE

        public CODESET_INCOMPATIBLE(String detailMessage,
                            int minorCode,
                            CompletionStatus completionStatus)
        Constructs an CODESET_INCOMPATIBLE exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


COMM_FAILURE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class COMM_FAILURE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.COMM_FAILURE
  • All Implemented Interfaces:
    Serializable

    public final class COMM_FAILURE
extends SystemException
    This exception is raised if communication is lost while an operation is in progress, after the request was sent by the client, but before the reply from the server has been returned to the client.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section meaning of minor codes to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    meaning of minor codes

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      COMM_FAILURE()
      Constructs a COMM_FAILURE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      COMM_FAILURE(int minor, CompletionStatus completed)
      Constructs a COMM_FAILURE exception with the specified minor code and completion status.
      COMM_FAILURE(String s)
      Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      COMM_FAILURE(String s, int minor, CompletionStatus completed)
      Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • COMM_FAILURE

        public COMM_FAILURE()
        Constructs a COMM_FAILURE exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • COMM_FAILURE

        public COMM_FAILURE(String s)
        Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message describing this exception

      • COMM_FAILURE

        public COMM_FAILURE(int minor,
                    CompletionStatus completed)
        Constructs a COMM_FAILURE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status, which must be one of COMPLETED_YES, COMPLETED_NO, or COMPLETED_MAYBE.

      • COMM_FAILURE

        public COMM_FAILURE(String s,
                    int minor,
                    CompletionStatus completed)
        Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status, which must be one of COMPLETED_YES, COMPLETED_NO, or COMPLETED_MAYBE.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CompletionStatus

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CompletionStatus

  • java.lang.Object
    • org.omg.CORBA.CompletionStatus
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class CompletionStatus
extends Object
implements IDLEntity
    An object that indicates whether a method had completed running when a SystemException was thrown.

    The class CompletionStatus contains three CompletionStatus instances, which are constants representing each possible completion status: COMPLETED_MAYBE, COMPLETED_NO, and COMPLETED_YES. It also contains three int members, each a constant corresponding to one of the CompletionStatus instances. These int members make it possible to use a switch statement.

    The class also contains two methods:

    • public int value() -- which accesses the value field of a CompletionStatus object
    • public static CompletionStatus from_int(int i) -- for creating an instance from one of the int members
    Since:
    JDK1.2
    See Also:
    SystemException

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int _COMPLETED_MAYBE
      The constant indicating that a method completed running before a SystemException was thrown.
      static int _COMPLETED_NO
      The constant indicating that a method completed running before a SystemException was thrown.
      static int _COMPLETED_YES
      The constant indicating that a method completed running before a SystemException was thrown.
      static CompletionStatus COMPLETED_MAYBE
      An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.
      static CompletionStatus COMPLETED_NO
      An instance of CompletionStatus initialized with the constant _COMPLETED_NO.
      static CompletionStatus COMPLETED_YES
      An instance of CompletionStatus initialized with the constant _COMPLETED_YES.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      static CompletionStatus from_int(int i)
      Creates a CompletionStatus object from the given int.
      int value()
      Retrieves the value of this CompletionStatus object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _COMPLETED_YES

        public static final int _COMPLETED_YES
        The constant indicating that a method completed running before a SystemException was thrown.
        See Also:
        Constant Field Values

      • _COMPLETED_NO

        public static final int _COMPLETED_NO
        The constant indicating that a method completed running before a SystemException was thrown.
        See Also:
        Constant Field Values

      • _COMPLETED_MAYBE

        public static final int _COMPLETED_MAYBE
        The constant indicating that a method completed running before a SystemException was thrown.
        See Also:
        Constant Field Values

      • COMPLETED_YES

        public static final CompletionStatus COMPLETED_YES
        An instance of CompletionStatus initialized with the constant _COMPLETED_YES.

      • COMPLETED_NO

        public static final CompletionStatus COMPLETED_NO
        An instance of CompletionStatus initialized with the constant _COMPLETED_NO.

      • COMPLETED_MAYBE

        public static final CompletionStatus COMPLETED_MAYBE
        An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.

    • Method Detail

      • value

        public int value()
        Retrieves the value of this CompletionStatus object.
        Returns:
        one of the possible CompletionStatus values: _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE

      • from_int

        public static CompletionStatus from_int(int i)
        Creates a CompletionStatus object from the given int.
        Parameters:
        i - one of _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE
        Returns:
        one of the possible CompletionStatus objects with values: _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE
        Throws:
        BAD_PARAM - if the argument given is not one of the int constants defined in CompletionStatus
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CompletionStatusHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CompletionStatusHelper

  • java.lang.Object
    • org.omg.CORBA.CompletionStatusHelper

  • public abstract class CompletionStatusHelper
extends Object
    The Helper for CompletionStatus. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/CompletionStatusHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      CompletionStatusHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static CompletionStatus | extract(Any a)
      static String | id()
      static void | insert(Any a, CompletionStatus that)
      static CompletionStatus | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, CompletionStatus value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CompletionStatusHelper

        public CompletionStatusHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          CompletionStatus that)

      • extract

        public static CompletionStatus extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static CompletionStatus read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         CompletionStatus value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Context

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Context

  • java.lang.Object
    • org.omg.CORBA.Context

  • public abstract class Context
extends Object
    An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation. A Context object contains a list of properties in the form of NamedValue objects. These properties represent information about the client, the environment, or the circumstances of a request and generally are properties that might be inconvenient to pass as parameters.

    A Context object is created by first calling the ORB method get_default_context and then calling the method create_child on the default context.

    Each property in a Context object is represented by a NamedValue object. The property name is contained in the NamedValue object's name field, and the value associated with the name is contained in the Any object that was assigned to the NamedValue object's value field.

    Context properties can represent a portion of a client's or application's environment that is meant to be propagated to (and made implicitly part of) a server's environment. (Examples might be a window identifier or user preference information). Once a server has been invoked (that is, after the properties are propagated), the server may query its Context object for these properties using the method get_values.

    When an operation declaration includes a context clause, the stubs and skeletons will have an additional argument added for the context. When an operation invocation occurs, the ORB causes the properties that were named in the operation definition in IDL and that are present in the client's Context object to be provided in the Context object parameter to the invoked method.

    Context property names (which are strings) typically have the form of an OMG IDL identifier or a series of OMG IDL identifiers separated by periods. A context property name pattern is either a property name or a property name followed by a single "*". A property name pattern without a trailing "*" is said to match only itself. A property name pattern of the form "<name>*" matches any property name that starts with <name> and continues with zero or more additional characters.

    Property name patterns are used in the context clause of an operation definition and as a parameter for the method Context.get_values.

    Context objects may be "chained" together to achieve a particular defaulting behavior. A Context object created with the method create_child will be chained to its parent (the Context object that created it), and that means that the parent will be searched after the child in a search for property names.

    Properties defined in a particular Context object effectively override those properties in the next higher level. The scope used in a search for properties may be restricted by specifying a starting scope and by using the flag CTX_RESTRICT_SCOPE when invoking the method get_values.

    A Context object may be named for purposes of specifying a starting search scope.

    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      Context()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract String context_name()
      Retrieves the name of this Context object.
      abstract Context create_child(String child_ctx_name)
      Creates a Context object with the given string as its name and with this Context object set as its parent.
      abstract void delete_values(String propname)
      Deletes from this Context object the NamedValue object(s) whose name field matches the given property name.
      abstract NVList get_values(String start_scope, int op_flags, String pattern)
      Retrieves the NamedValue objects whose name field matches the given name or name pattern.
      abstract Context parent()
      Retrieves the parent of this Context object.
      abstract void set_one_value(String propname, Any propvalue)
      Creates a NamedValue object and adds it to this Context object.
      abstract void set_values(NVList values)
      I Sets one or more property values in this Context object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Context

        public Context()

    • Method Detail

      • context_name

        public abstract String context_name()
        Retrieves the name of this Context object.
        Returns:
        the name of this Context object

      • parent

        public abstract Context parent()
        Retrieves the parent of this Context object.
        Returns:
        the Context object that is the parent of this Context object

      • create_child

        public abstract Context create_child(String child_ctx_name)
        Creates a Context object with the given string as its name and with this Context object set as its parent.

        The new Context object is chained into its parent Context object. This means that in a search for matching property names, if a match is not found in this context, the search will continue in the parent. If that is not successful, the search will continue in the grandparent, if there is one, and so on.

        Parameters:
        child_ctx_name - the String object to be set as the name of the new Context object
        Returns:
        the newly-created child Context object initialized with the specified name

      • set_one_value

        public abstract void set_one_value(String propname,
                                   Any propvalue)
        Creates a NamedValue object and adds it to this Context object. The name field of the new NamedValue object is set to the given string, the value field is set to the given Any object, and the flags field is set to zero.
        Parameters:
        propname - the name of the property to be set
        propvalue - the Any object to which the value of the property will be set. The Any object's value field contains the value to be associated with the given propname; the kind field must be set to TCKind.tk_string.

      • set_values

        public abstract void set_values(NVList values)
        I Sets one or more property values in this Context object. The NVList supplied to this method contains one or more NamedValue objects. In each NamedValue object, the name field holds the name of the property, and the flags field must be set to zero. The NamedValue object's value field contains an Any object, which, in turn, contains the value for the property. Since the value is always a string, the Any object must have the kind field of its TypeCode set to TCKind.tk_string.
        Parameters:
        values - an NVList containing the property names and associated values to be set
        See Also:
        get_values(java.lang.String, int, java.lang.String), NamedValue, Any

      • delete_values

        public abstract void delete_values(String propname)
        Deletes from this Context object the NamedValue object(s) whose name field matches the given property name. If the String object supplied for propname has a trailing wildcard character ("*"), then all NamedValue objects whose name fields match will be deleted. The search scope is always limited to this Context object.

        If no matching property is found, an exception is returned.

        Parameters:
        propname - name of the property to be deleted

      • get_values

        public abstract NVList get_values(String start_scope,
                                  int op_flags,
                                  String pattern)
        Retrieves the NamedValue objects whose name field matches the given name or name pattern. This method allows for wildcard searches, which means that there can be multiple matches and therefore multiple values returned. If the property is not found at the indicated level, the search continues up the context object tree until a match is found or all Context objects in the chain have been exhausted.

        If no match is found, an error is returned and no property list is returned.

        Parameters:
        start_scope - a String object indicating the context object level at which to initiate the search for the specified properties (for example, "_USER", "_GROUP", "_SYSTEM"). Valid scope names are implementation-specific. If a scope name is omitted, the search begins with the specified context object. If the specified scope name is not found, an exception is returned.
        op_flags - an operation flag. The one flag that may be specified is CTX_RESTRICT_SCOPE. If this flag is specified, searching is limited to the specified start_scope or this Context object.
        pattern - the property name whose values are to be retrieved. pattern may be a name or a name with a trailing wildcard character ("*").
        Returns:
        an NVList containing all the property values (in the form of NamedValue objects) whose associated property name matches the given name or name pattern
        See Also:
        set_values(org.omg.CORBA.NVList), NamedValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ContextList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ContextList

  • java.lang.Object
    • org.omg.CORBA.ContextList

  • public abstract class ContextList
extends Object
    An object containing a modifiable list of String objects that represent property names. This class is used in Request operations to describe the contexts that need to be resolved and sent with the invocation. (A context is resolved by giving a property name and getting back the value associated with it.) This is done by calling the Context method get_values and supplying a string from a ContextList object as the third parameter. The method get_values returns an NVList object containing the NamedValue objects that hold the value(s) identified by the given string.

    A ContextList object is created by the ORB, as illustrated here:

       ORB orb = ORB.init(args, null);
   org.omg.CORBA.ContextList ctxList = orb.create_context_list();
    The variable ctxList represents an empty ContextList object. Strings are added to the list with the method add, accessed with the method item, and removed with the method remove.
    Since:
    JDK1.2
    See Also:
    Context

    • Constructor Summary

      Constructors
      Constructor and Description
      ContextList()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void add(String ctx)
      Adds a String object to this ContextList object.
      abstract int count()
      Returns the number of String objects in this ContextList object.
      abstract String item(int index)
      Returns the String object at the given index.
      abstract void remove(int index)
      Removes the String object at the given index.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ContextList

        public ContextList()

    • Method Detail

      • count

        public abstract int count()
        Returns the number of String objects in this ContextList object.
        Returns:
        an int representing the number of Strings in this ContextList object

      • add

        public abstract void add(String ctx)
        Adds a String object to this ContextList object.
        Parameters:
        ctx - the String object to be added

      • item

        public abstract String item(int index)
                     throws Bounds
        Returns the String object at the given index.
        Parameters:
        index - the index of the string desired, with 0 being the index of the first string
        Returns:
        the string at the given index
        Throws:
        Bounds - if the index is greater than or equal to the number of strings in this ContextList object

      • remove

        public abstract void remove(int index)
                     throws Bounds
        Removes the String object at the given index. Note that the indices of all strings following the one removed are shifted down by one.
        Parameters:
        index - the index of the String object to be removed, with 0 designating the first string
        Throws:
        Bounds - if the index is greater than or equal to the number of String objects in this ContextList object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CTX_RESTRICT_SCOPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface CTX_RESTRICT_SCOPE

  • public interface CTX_RESTRICT_SCOPE
    A flag that can be used as the second parameter to the method Context.get_values to restrict the search scope. When this flag is used, it restricts the search for context values to this particular Context object or to the scope specified in the first parameter to Context.get_values.

    Usage:

         NVList props = myContext.get_values("_USER",
                     CTX_RESTRICT_SCOPE.value, "id*");
    Since:
    JDK1.2
    See Also:
    Context.get_values(String, int, String)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The field containing the int value of a CTX_RESTRICT_SCOPE flag.

    • Field Detail

      • value

        static final int value
        The field containing the int value of a CTX_RESTRICT_SCOPE flag.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CurrentHelper

  • java.lang.Object
    • org.omg.CORBA.CurrentHelper

  • public abstract class CurrentHelper
extends Object
    The Helper for Current. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/CurrentHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      CurrentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Current | extract(Any a)
      static String | id()
      static void | insert(Any a, Current that)
      static Current | narrow(Object obj)
      static Current | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Current value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CurrentHelper

        public CurrentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Current that)

      • extract

        public static Current extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Current read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Current value)

      • narrow

        public static Current narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class CurrentHolder

  • java.lang.Object
    • org.omg.CORBA.CurrentHolder
  • All Implemented Interfaces:
    Streamable

    public final class CurrentHolder
extends Object
implements Streamable
    The Holder for Current. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Current value

    • Constructor Summary

      Constructors
      Constructor and Description
      CurrentHolder()
      CurrentHolder(Current initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Current value

    • Constructor Detail

      • CurrentHolder

        public CurrentHolder()

      • CurrentHolder

        public CurrentHolder(Current initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CustomMarshal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface CustomMarshal

  • All Known Subinterfaces:
    CustomValue

    public interface CustomMarshal
    An abstract value type that is meant to be used by the ORB, not the user. Semantically it is treated as a custom value type's implicit base class, although the custom valuetype does not actually inherit it in IDL. The implementer of a custom value type shall provide an implementation of the CustomMarshal operations. The manner in which this is done is specified in the IDL to Java langauge mapping. Each custom marshaled value type shall have its own implementation.
    See Also:
    DataInputStream

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void marshal(DataOutputStream os)
      Marshal method has to be implemented by the Customized Marshal class.
      void unmarshal(DataInputStream is)
      Unmarshal method has to be implemented by the Customized Marshal class.

    • Method Detail

      • marshal

        void marshal(DataOutputStream os)
        Marshal method has to be implemented by the Customized Marshal class. This is the method invoked for Marshalling.
        Parameters:
        os - a DataOutputStream

      • unmarshal

        void unmarshal(DataInputStream is)
        Unmarshal method has to be implemented by the Customized Marshal class. This is the method invoked for Unmarshalling.
        Parameters:
        is - a DataInputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DataInputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DataInputStream

  • All Superinterfaces:
    IDLEntity, Serializable, ValueBase

    public interface DataInputStream
extends ValueBase
    Defines the methods used to read primitive data types from input streams for unmarshaling custom value types. This interface is used by user written custom unmarshaling code for custom value types.
    See Also:
    DataOutputStream, CustomMarshal

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object read_Abstract()
      Reads an IDL Abstract interface from the input stream.
      void read_any_array(AnySeqHolder seq, int offset, int length)
      Reads array of IDL Anys from offset for length elements from the input stream.
      Any read_any()
      Reads an IDL Any value from the input stream.
      void read_boolean_array(BooleanSeqHolder seq, int offset, int length)
      Reads array of IDL booleans from offset for length elements from the input stream.
      boolean read_boolean()
      Reads an IDL boolean value from the input stream.
      void read_char_array(CharSeqHolder seq, int offset, int length)
      Reads array of IDL characters from offset for length elements from the input stream.
      char read_char()
      Reads an IDL character value from the input stream.
      void read_double_array(DoubleSeqHolder seq, int offset, int length)
      Reads array of IDL doubles from offset for length elements from the input stream.
      double read_double()
      Reads an IDL double from the input stream.
      void read_float_array(FloatSeqHolder seq, int offset, int length)
      Reads array of IDL floats from offset for length elements from the input stream.
      float read_float()
      Reads an IDL float from the input stream.
      void read_long_array(LongSeqHolder seq, int offset, int length)
      Reads array of IDL longs from offset for length elements from the input stream.
      int read_long()
      Reads an IDL long from the input stream.
      void read_longlong_array(LongLongSeqHolder seq, int offset, int length)
      Reads array of IDL long longs from offset for length elements from the input stream.
      long read_longlong()
      Reads an IDL long long from the input stream.
      Object read_Object()
      Reads an IDL CORBA::Object from the input stream.
      void read_octet_array(OctetSeqHolder seq, int offset, int length)
      Reads array of IDL octets from offset for length elements from the input stream.
      byte read_octet()
      Reads an IDL octet value from the input stream.
      void read_short_array(ShortSeqHolder seq, int offset, int length)
      Reads array of IDL shorts from offset for length elements from the input stream.
      short read_short()
      Reads an IDL short from the input stream.
      String read_string()
      Reads an IDL string from the input stream.
      TypeCode read_TypeCode()
      Reads an IDL typecode from the input stream.
      void read_ulong_array(ULongSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned longs from offset for length elements from the input stream.
      int read_ulong()
      Reads an IDL unsigned long from the input stream.
      void read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned long longs from offset for length elements from the input stream.
      long read_ulonglong()
      Reads an unsigned IDL long long from the input stream.
      void read_ushort_array(UShortSeqHolder seq, int offset, int length)
      Reads array of IDL unsigned shorts from offset for length elements from the input stream.
      short read_ushort()
      Reads an IDL unsigned short from the input stream.
      Serializable read_Value()
      Reads an IDL value type from the input stream.
      void read_wchar_array(WCharSeqHolder seq, int offset, int length)
      Reads array of IDL wide characters from offset for length elements from the input stream.
      char read_wchar()
      Reads an IDL wide character value from the input stream.
      String read_wstring()
      Reads an IDL wide string from the input stream.

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids

    • Method Detail

      • read_any

        Any read_any()
        Reads an IDL Any value from the input stream.
        Returns:
        the Any read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_boolean

        boolean read_boolean()
        Reads an IDL boolean value from the input stream.
        Returns:
        the boolean read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_char

        char read_char()
        Reads an IDL character value from the input stream.
        Returns:
        the character read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_wchar

        char read_wchar()
        Reads an IDL wide character value from the input stream.
        Returns:
        the wide character read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_octet

        byte read_octet()
        Reads an IDL octet value from the input stream.
        Returns:
        the octet value read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_short

        short read_short()
        Reads an IDL short from the input stream.
        Returns:
        the short read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ushort

        short read_ushort()
        Reads an IDL unsigned short from the input stream.
        Returns:
        the unsigned short read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_long

        int read_long()
        Reads an IDL long from the input stream.
        Returns:
        the long read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ulong

        int read_ulong()
        Reads an IDL unsigned long from the input stream.
        Returns:
        the unsigned long read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_longlong

        long read_longlong()
        Reads an IDL long long from the input stream.
        Returns:
        the long long read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ulonglong

        long read_ulonglong()
        Reads an unsigned IDL long long from the input stream.
        Returns:
        the unsigned long long read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_float

        float read_float()
        Reads an IDL float from the input stream.
        Returns:
        the float read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_double

        double read_double()
        Reads an IDL double from the input stream.
        Returns:
        the double read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_string

        String read_string()
        Reads an IDL string from the input stream.
        Returns:
        the string read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_wstring

        String read_wstring()
        Reads an IDL wide string from the input stream.
        Returns:
        the wide string read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_Object

        Object read_Object()
        Reads an IDL CORBA::Object from the input stream.
        Returns:
        the CORBA::Object read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_Abstract

        Object read_Abstract()
        Reads an IDL Abstract interface from the input stream.
        Returns:
        the Abstract interface read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_Value

        Serializable read_Value()
        Reads an IDL value type from the input stream.
        Returns:
        the value type read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_TypeCode

        TypeCode read_TypeCode()
        Reads an IDL typecode from the input stream.
        Returns:
        the typecode read.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_any_array

        void read_any_array(AnySeqHolder seq,
                    int offset,
                    int length)
        Reads array of IDL Anys from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_boolean_array

        void read_boolean_array(BooleanSeqHolder seq,
                        int offset,
                        int length)
        Reads array of IDL booleans from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_char_array

        void read_char_array(CharSeqHolder seq,
                     int offset,
                     int length)
        Reads array of IDL characters from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_wchar_array

        void read_wchar_array(WCharSeqHolder seq,
                      int offset,
                      int length)
        Reads array of IDL wide characters from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_octet_array

        void read_octet_array(OctetSeqHolder seq,
                      int offset,
                      int length)
        Reads array of IDL octets from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_short_array

        void read_short_array(ShortSeqHolder seq,
                      int offset,
                      int length)
        Reads array of IDL shorts from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ushort_array

        void read_ushort_array(UShortSeqHolder seq,
                       int offset,
                       int length)
        Reads array of IDL unsigned shorts from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_long_array

        void read_long_array(LongSeqHolder seq,
                     int offset,
                     int length)
        Reads array of IDL longs from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ulong_array

        void read_ulong_array(ULongSeqHolder seq,
                      int offset,
                      int length)
        Reads array of IDL unsigned longs from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_ulonglong_array

        void read_ulonglong_array(ULongLongSeqHolder seq,
                          int offset,
                          int length)
        Reads array of IDL unsigned long longs from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_longlong_array

        void read_longlong_array(LongLongSeqHolder seq,
                         int offset,
                         int length)
        Reads array of IDL long longs from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_float_array

        void read_float_array(FloatSeqHolder seq,
                      int offset,
                      int length)
        Reads array of IDL floats from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

      • read_double_array

        void read_double_array(DoubleSeqHolder seq,
                       int offset,
                       int length)
        Reads array of IDL doubles from offset for length elements from the input stream.
        Parameters:
        seq - The out parameter holder for the array to be read.
        offset - The index into seq of the first element to read from the input stream.
        length - The number of elements to read from the input stream.
        Throws:
        org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DataOutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DataOutputStream

  • All Superinterfaces:
    IDLEntity, Serializable, ValueBase

    public interface DataOutputStream
extends ValueBase
    Defines the methods used to write primitive data types to output streams for marshalling custom value types. This interface is used by user written custom marshalling code for custom value types.
    See Also:
    DataInputStream, CustomMarshal

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void write_Abstract(Object value)
      Writes the IDL Abstract interface type to the output stream.
      void write_any_array(Any[] seq, int offset, int length)
      Writes the array of IDL Anys from offset for length elements to the output stream.
      void write_any(Any value)
      Writes the Any value to the output stream.
      void write_boolean_array(boolean[] seq, int offset, int length)
      Writes the array of IDL booleans from offset for length elements to the output stream.
      void write_boolean(boolean value)
      Writes the boolean value to the output stream.
      void write_char_array(char[] seq, int offset, int length)
      Writes the array of IDL characters from offset for length elements to the output stream.
      void write_char(char value)
      Writes the IDL character value to the output stream.
      void write_double_array(double[] seq, int offset, int length)
      Writes the array of IDL doubles from offset for length elements to the output stream.
      void write_double(double value)
      Writes the IDL double value to the output stream.
      void write_float_array(float[] seq, int offset, int length)
      Writes the array of IDL floats from offset for length elements to the output stream.
      void write_float(float value)
      Writes the IDL float value to the output stream.
      void write_long_array(int[] seq, int offset, int length)
      Writes the array of IDL longs from offset for length elements to the output stream.
      void write_long(int value)
      Writes the IDL long value (represented as a Java int) to the output stream.
      void write_longlong_array(long[] seq, int offset, int length)
      Writes the array of IDL long longs from offset for length elements to the output stream.
      void write_longlong(long value)
      Writes the IDL long long value (represented as a Java long) to the output stream.
      void write_Object(Object value)
      Writes the IDL CORBA::Object value to the output stream.
      void write_octet_array(byte[] seq, int offset, int length)
      Writes the array of IDL octets from offset for length elements to the output stream.
      void write_octet(byte value)
      Writes the IDL octet value (represented as a Java byte) to the output stream.
      void write_short_array(short[] seq, int offset, int length)
      Writes the array of IDL shorts from offset for length elements to the output stream.
      void write_short(short value)
      Writes the IDL short value to the output stream.
      void write_string(String value)
      Writes the IDL string value to the output stream.
      void write_TypeCode(TypeCode value)
      Writes the typecode to the output stream.
      void write_ulong_array(int[] seq, int offset, int length)
      Writes the array of IDL unsigned longs (represented as Java ints) from offset for length elements to the output stream.
      void write_ulong(int value)
      Writes the IDL unsigned long value (represented as a Java int) to the output stream.
      void write_ulonglong_array(long[] seq, int offset, int length)
      Writes the array of IDL unsigned long longs (represented as Java longs) from offset for length elements to the output stream.
      void write_ulonglong(long value)
      Writes the IDL unsigned long long value (represented as a Java long) to the output stream.
      void write_ushort_array(short[] seq, int offset, int length)
      Writes the array of IDL unsigned shorts (represented as Java shorts) from offset for length elements to the output stream.
      void write_ushort(short value)
      Writes the IDL unsigned short value (represented as a Java short value) to the output stream.
      void write_Value(Serializable value)
      Writes the IDL value type value to the output stream.
      void write_wchar_array(char[] seq, int offset, int length)
      Writes the array of IDL wide characters from offset for length elements to the output stream.
      void write_wchar(char value)
      Writes the IDL wide character value to the output stream.
      void write_wstring(String value)
      Writes the IDL wide string value (represented as a Java String) to the output stream.

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids

    • Method Detail

      • write_any

        void write_any(Any value)
        Writes the Any value to the output stream.
        Parameters:
        value - The value to be written.

      • write_boolean

        void write_boolean(boolean value)
        Writes the boolean value to the output stream.
        Parameters:
        value - The value to be written.

      • write_char

        void write_char(char value)
        Writes the IDL character value to the output stream.
        Parameters:
        value - The value to be written.

      • write_wchar

        void write_wchar(char value)
        Writes the IDL wide character value to the output stream.
        Parameters:
        value - The value to be written.

      • write_octet

        void write_octet(byte value)
        Writes the IDL octet value (represented as a Java byte) to the output stream.
        Parameters:
        value - The value to be written.

      • write_short

        void write_short(short value)
        Writes the IDL short value to the output stream.
        Parameters:
        value - The value to be written.

      • write_ushort

        void write_ushort(short value)
        Writes the IDL unsigned short value (represented as a Java short value) to the output stream.
        Parameters:
        value - The value to be written.

      • write_long

        void write_long(int value)
        Writes the IDL long value (represented as a Java int) to the output stream.
        Parameters:
        value - The value to be written.

      • write_ulong

        void write_ulong(int value)
        Writes the IDL unsigned long value (represented as a Java int) to the output stream.
        Parameters:
        value - The value to be written.

      • write_longlong

        void write_longlong(long value)
        Writes the IDL long long value (represented as a Java long) to the output stream.
        Parameters:
        value - The value to be written.

      • write_ulonglong

        void write_ulonglong(long value)
        Writes the IDL unsigned long long value (represented as a Java long) to the output stream.
        Parameters:
        value - The value to be written.

      • write_float

        void write_float(float value)
        Writes the IDL float value to the output stream.
        Parameters:
        value - The value to be written.

      • write_double

        void write_double(double value)
        Writes the IDL double value to the output stream.
        Parameters:
        value - The value to be written.

      • write_string

        void write_string(String value)
        Writes the IDL string value to the output stream.
        Parameters:
        value - The value to be written.

      • write_wstring

        void write_wstring(String value)
        Writes the IDL wide string value (represented as a Java String) to the output stream.
        Parameters:
        value - The value to be written.

      • write_Object

        void write_Object(Object value)
        Writes the IDL CORBA::Object value to the output stream.
        Parameters:
        value - The value to be written.

      • write_Abstract

        void write_Abstract(Object value)
        Writes the IDL Abstract interface type to the output stream.
        Parameters:
        value - The value to be written.

      • write_Value

        void write_Value(Serializable value)
        Writes the IDL value type value to the output stream.
        Parameters:
        value - The value to be written.

      • write_TypeCode

        void write_TypeCode(TypeCode value)
        Writes the typecode to the output stream.
        Parameters:
        value - The value to be written.

      • write_any_array

        void write_any_array(Any[] seq,
                     int offset,
                     int length)
        Writes the array of IDL Anys from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_boolean_array

        void write_boolean_array(boolean[] seq,
                         int offset,
                         int length)
        Writes the array of IDL booleans from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_char_array

        void write_char_array(char[] seq,
                      int offset,
                      int length)
        Writes the array of IDL characters from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_wchar_array

        void write_wchar_array(char[] seq,
                       int offset,
                       int length)
        Writes the array of IDL wide characters from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_octet_array

        void write_octet_array(byte[] seq,
                       int offset,
                       int length)
        Writes the array of IDL octets from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_short_array

        void write_short_array(short[] seq,
                       int offset,
                       int length)
        Writes the array of IDL shorts from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_ushort_array

        void write_ushort_array(short[] seq,
                        int offset,
                        int length)
        Writes the array of IDL unsigned shorts (represented as Java shorts) from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_long_array

        void write_long_array(int[] seq,
                      int offset,
                      int length)
        Writes the array of IDL longs from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_ulong_array

        void write_ulong_array(int[] seq,
                       int offset,
                       int length)
        Writes the array of IDL unsigned longs (represented as Java ints) from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_ulonglong_array

        void write_ulonglong_array(long[] seq,
                           int offset,
                           int length)
        Writes the array of IDL unsigned long longs (represented as Java longs) from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_longlong_array

        void write_longlong_array(long[] seq,
                          int offset,
                          int length)
        Writes the array of IDL long longs from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_float_array

        void write_float_array(float[] seq,
                       int offset,
                       int length)
        Writes the array of IDL floats from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.

      • write_double_array

        void write_double_array(double[] seq,
                        int offset,
                        int length)
        Writes the array of IDL doubles from offset for length elements to the output stream.
        Parameters:
        seq - The array to be written.
        offset - The index into seq of the first element to write to the output stream.
        length - The number of elements to write to the output stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DATA_CONVERSION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DATA_CONVERSION

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.DATA_CONVERSION
  • All Implemented Interfaces:
    Serializable

    public final class DATA_CONVERSION
extends SystemException
    This exception is raised if an ORB cannot convert the representation of data as marshaled into its native representation or vice-versa. For example, DATA_CONVERSION can be raised if wide character codeset conversion fails, or if an ORB cannot convert floating point values between different representations.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section meaning of minor codes to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      DATA_CONVERSION()
      Constructs a DATA_CONVERSION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      DATA_CONVERSION(int minor, CompletionStatus completed)
      Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
      DATA_CONVERSION(String s)
      Constructs a DATA_CONVERSION exception with the specified detail.
      DATA_CONVERSION(String s, int minor, CompletionStatus completed)
      Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DATA_CONVERSION

        public DATA_CONVERSION()
        Constructs a DATA_CONVERSION exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • DATA_CONVERSION

        public DATA_CONVERSION(String s)
        Constructs a DATA_CONVERSION exception with the specified detail.
        Parameters:
        s - the String containing a detail message

      • DATA_CONVERSION

        public DATA_CONVERSION(int minor,
                       CompletionStatus completed)
        Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • DATA_CONVERSION

        public DATA_CONVERSION(String s,
                       int minor,
                       CompletionStatus completed)
        Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefinitionKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DefinitionKind

  • java.lang.Object
    • org.omg.CORBA.DefinitionKind
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class DefinitionKind
extends Object
implements IDLEntity
    The class that provides the constants used to identify the type of an Interface Repository object. This class contains two kinds of constants, those that are an int and those that are an instance of the class DefinitionKind. This class provides the method from_int, which given one of the int constants, creates the corresponding DefinitionKind instance. It also provides the method value, which returns the int constant that is the value for a DefinitionKind instance.
    See Also:
    IRObject

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int _dk_AbstractInterface
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Alias
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_all
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Array
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Attribute
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Constant
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Enum
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Exception
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Fixed
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Interface
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Module
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Native
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_none
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Operation
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Primitive
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Repository
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Sequence
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_String
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Struct
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Typedef
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Union
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Value
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_ValueBox
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_ValueMember
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static int _dk_Wstring
      The constant that indicates that an Interface Repository object does not have a definition kind.
      static DefinitionKind dk_AbstractInterface
      The static instance of DefinitionKind indicating that an Interface Repository object represents an abstract interface.
      static DefinitionKind dk_Alias
      The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.
      static DefinitionKind dk_all
      The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate.
      static DefinitionKind dk_Array
      The static instance of DefinitionKind indicating that an Interface Repository object is an Array.
      static DefinitionKind dk_Attribute
      The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.
      static DefinitionKind dk_Constant
      The static instance of DefinitionKind indicating that an Interface Repository object is a constant.
      static DefinitionKind dk_Enum
      The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.
      static DefinitionKind dk_Exception
      The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.
      static DefinitionKind dk_Fixed
      The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.
      static DefinitionKind dk_Interface
      The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.
      static DefinitionKind dk_Module
      The static instance of DefinitionKind indicating that an Interface Repository object is a Module.
      static DefinitionKind dk_Native
      The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.
      static DefinitionKind dk_none
      The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.
      static DefinitionKind dk_Operation
      The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.
      static DefinitionKind dk_Primitive
      The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.
      static DefinitionKind dk_Repository
      The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.
      static DefinitionKind dk_Sequence
      The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.
      static DefinitionKind dk_String
      The static instance of DefinitionKind indicating that an Interface Repository object is a String.
      static DefinitionKind dk_Struct
      The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.
      static DefinitionKind dk_Typedef
      The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.
      static DefinitionKind dk_Union
      The static instance of DefinitionKind indicating that an Interface Repository object is a Union.
      static DefinitionKind dk_Value
      The static instance of DefinitionKind indicating that an Interface Repository object is a Value.
      static DefinitionKind dk_ValueBox
      The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.
      static DefinitionKind dk_ValueMember
      The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.
      static DefinitionKind dk_Wstring
      The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected DefinitionKind(int _value)
      Constructs a DefinitionKind object with its _value field initialized with the given value.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      static DefinitionKind from_int(int i)
      Creates a DefinitionKind instance corresponding to the given code .
      int value()
      Returns the int constant identifying the type of an IR object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _dk_none

        public static final int _dk_none
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_all

        public static final int _dk_all
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Attribute

        public static final int _dk_Attribute
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Constant

        public static final int _dk_Constant
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Exception

        public static final int _dk_Exception
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Interface

        public static final int _dk_Interface
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Module

        public static final int _dk_Module
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Operation

        public static final int _dk_Operation
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Typedef

        public static final int _dk_Typedef
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Alias

        public static final int _dk_Alias
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Struct

        public static final int _dk_Struct
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Union

        public static final int _dk_Union
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Enum

        public static final int _dk_Enum
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Primitive

        public static final int _dk_Primitive
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_String

        public static final int _dk_String
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Sequence

        public static final int _dk_Sequence
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Array

        public static final int _dk_Array
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Repository

        public static final int _dk_Repository
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Wstring

        public static final int _dk_Wstring
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Fixed

        public static final int _dk_Fixed
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Value

        public static final int _dk_Value
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_ValueBox

        public static final int _dk_ValueBox
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_ValueMember

        public static final int _dk_ValueMember
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_Native

        public static final int _dk_Native
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • _dk_AbstractInterface

        public static final int _dk_AbstractInterface
        The constant that indicates that an Interface Repository object does not have a definition kind.
        See Also:
        Constant Field Values

      • dk_none

        public static final DefinitionKind dk_none
        The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.

      • dk_all

        public static final DefinitionKind dk_all
        The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate. The Container's contents method makes use of this constant to return all contained definitions of any kind.

      • dk_Attribute

        public static final DefinitionKind dk_Attribute
        The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.

      • dk_Constant

        public static final DefinitionKind dk_Constant
        The static instance of DefinitionKind indicating that an Interface Repository object is a constant.

      • dk_Exception

        public static final DefinitionKind dk_Exception
        The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.

      • dk_Interface

        public static final DefinitionKind dk_Interface
        The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.

      • dk_Module

        public static final DefinitionKind dk_Module
        The static instance of DefinitionKind indicating that an Interface Repository object is a Module.

      • dk_Operation

        public static final DefinitionKind dk_Operation
        The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.

      • dk_Typedef

        public static final DefinitionKind dk_Typedef
        The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.

      • dk_Alias

        public static final DefinitionKind dk_Alias
        The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.

      • dk_Struct

        public static final DefinitionKind dk_Struct
        The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.

      • dk_Union

        public static final DefinitionKind dk_Union
        The static instance of DefinitionKind indicating that an Interface Repository object is a Union.

      • dk_Enum

        public static final DefinitionKind dk_Enum
        The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.

      • dk_Primitive

        public static final DefinitionKind dk_Primitive
        The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.

      • dk_String

        public static final DefinitionKind dk_String
        The static instance of DefinitionKind indicating that an Interface Repository object is a String.

      • dk_Sequence

        public static final DefinitionKind dk_Sequence
        The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.

      • dk_Array

        public static final DefinitionKind dk_Array
        The static instance of DefinitionKind indicating that an Interface Repository object is an Array.

      • dk_Repository

        public static final DefinitionKind dk_Repository
        The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.

      • dk_Wstring

        public static final DefinitionKind dk_Wstring
        The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.

      • dk_Fixed

        public static final DefinitionKind dk_Fixed
        The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.

      • dk_Value

        public static final DefinitionKind dk_Value
        The static instance of DefinitionKind indicating that an Interface Repository object is a Value.

      • dk_ValueBox

        public static final DefinitionKind dk_ValueBox
        The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.

      • dk_ValueMember

        public static final DefinitionKind dk_ValueMember
        The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.

      • dk_Native

        public static final DefinitionKind dk_Native
        The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.

      • dk_AbstractInterface

        public static final DefinitionKind dk_AbstractInterface
        The static instance of DefinitionKind indicating that an Interface Repository object represents an abstract interface.

    • Constructor Detail

      • DefinitionKind

        protected DefinitionKind(int _value)
        Constructs a DefinitionKind object with its _value field initialized with the given value.
        Parameters:
        _value - one of the int constants defined in the class DefinitionKind

    • Method Detail

      • value

        public int value()
        Returns the int constant identifying the type of an IR object.
        Returns:
        the int constant from the class DefinitionKind that is the value of this DefinitionKind instance

      • from_int

        public static DefinitionKind from_int(int i)
        Creates a DefinitionKind instance corresponding to the given code .
        Parameters:
        i - one of the int constants from the class DefinitionKind
        Returns:
        the DefinitionKind instance corresponding to the given code
        Throws:
        BAD_PARAM - if the given parameter is not one of the int constants from the class DefinitionKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefinitionKindHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DefinitionKindHelper

  • java.lang.Object
    • org.omg.CORBA.DefinitionKindHelper

  • public abstract class DefinitionKindHelper
extends Object
    The Helper for DefinitionKind. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/DefinitionKindHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      DefinitionKindHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DefinitionKind | extract(Any a)
      static String | id()
      static void | insert(Any a, DefinitionKind that)
      static DefinitionKind | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, DefinitionKind value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DefinitionKindHelper

        public DefinitionKindHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DefinitionKind that)

      • extract

        public static DefinitionKind extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DefinitionKind read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DefinitionKind value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IDL-to-Java Generated Files

The files that are generated by the IDL-to-Java compiler, in accordance with the IDL-to-Java Language Mapping Specification, which is implemented in JavaTM SE 6 according the compliance document.

In general IDL names and identifiers are mapped to Java names and identifiers with no change. Because of the nature of the Java language, a single IDL construct may be mapped to several (differently named) Java constructs. The additional names are constructed by appending a descriptive suffix. For example, the IDL interface foo is mapped to the Java interfaces foo and fooOperations, and additional Java classes fooHelper, fooHolder, fooPOA, and optionally fooPOATie.

The mapping in effect reserves the use of several names for its own purposes. These are:

  • The Java class <type>Helper, where <type> is the name of an IDL defined type.
  • The Java class <type>Holder, where <type> is the name of an IDL defined type (with certain exceptions such as typedef aliases).
  • The Java classes <basicJavaType>Holder, where <basicJavaType> is one of the Java primitive datatypes that is used by one of the IDL basic datatypes.
  • The Java classes <interface>Operations, <interface>POA, and <interface>POATie, where <interface> is the name of an IDL interface type.
  • The nested scope Java package name <interface>Package, where <interface> is the name of an IDL interface.

    Helper Files

    Helper files supply several static methods needed to manipulate the type. These include Any insert and extract operations for the type, getting the repository id, getting the typecode, and reading and writing the type from and to a stream.

    The helper class for a mapped IDL interface or abstract interface also include narrow operation(s). The static narrow method allows an org.omg.CORBA.Object to be narrowed to the object reference of a more specific type. The IDL exception CORBA::BAD_PARAM is thrown if the narrow fails because the object reference does not support the requested type. A different system exception is raised to indicate other kinds of errors. Trying to narrow a null will always succeed with a return value of null.

    Holder Files

    Support for out and inout parameter passing modes requires the use of additional holder classes. These classes are available for all of the basic IDL datatypes in the org.omg.CORBA package and are generated for all named user defined IDL types except those defined by typedefs. (Note that in this context user defined includes types that are defined in OMG specifications such as those for the Interface Repository, and other OMG services.)

    Each holder class has a constructor from an instance, a default constructor, and has a public instance member, value which is the typed value. The default constructor sets the value field to the default value for the type as defined by the Java language: false for boolean, 0 for numeric and char types, null for strings, null for object references.

    To support portable stubs and skeletons, holder classes also implement the org.omg.CORBA.portable.Streamable interface.

    Operations Files

    A non abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. The signature interface, which extends IDLEntity, has the same name as the IDL interface name and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. The operations interface has the same name as the IDL interface with the suffix Operations appended to the end and is used in the server-side mapping and as a mechanism for providing optimized calls for collocated client and servers.

    The Java operations interface contains the mapped operation signatures. The Java signature interface extends the operations interface, the (mapped) base org.omg.CORBA.Object, as well as org.omg.portable.IDLEntity. Methods can be invoked on the signature interface. Interface inheritance expressed in IDL is reflected in both the Java signature interface and operations interface hierarchies.

    Stubs

    For the mapping of a non-object-oriented language, there will be a programming interface to the stubs for each interface type. Generally, the stubs will present access to the OMG IDL-defined operations on an object in a way that is easy for programmers to predict once they are familiar with OMG IDL and the language mapping for the particular programming language. The stubs make calls on the rest of the ORB using interfaces that are private to, and presumably optimized for, the particular ORB Core. If more than one ORB is available, there may be different stubs corresponding to the different ORBs. In this case, it is necessary for the ORB and language mapping to cooperate to associate the correct stubs with the particular object reference.

    Object-oriented programming languages, such as Java, C++, and Smalltalk, do not require stub interfaces.


Official Specifications for CORBA support in Java[tm] SE 6

Specification References

The specifications with which the Java[tm] Platform, Standard Edition (Java SE) v.1.6.0 ORB complies are as follows. If these links do not take you to the referenced specification, the OMG may have changed the URL, and you can link to www.omg.org to search for the correct specification.
  • CORBA 2.3.1 (formal/99-10-07)
  • IDL to Java language mapping (ptc/00-01-08)
  • Revised IDL to Java language mapping (ptc/00-11-03)
  • Java to IDL language mapping (ptc/00-01-06)
  • Interoperable Naming Service (ptc/00-08-07)
  • Portable Interceptors (ptc/2001-03-04)
These are the only specifications referenced by this document.

Supported Specification Details

Not all of the above specifications are currently implemented in the ORB in Java[tm] SE 6. The precise list of supported sections is as follows:
  • CORBA 2.3.1 chapters 1-3 and 6-9
  • Revised IDL to Java language mapping, section 1.21.8.2, the orb.properties file.
  • CORBA 2.3.1 chapter 4 with the following replacements from the Portable Interceptors specification:
    • section 4.2.3.5 destroy
    • section 4.5.2 CodeFactory and PICurrent are required
    • Section 4.5.3.4 as updated for register_initial_reference
  • CORBA 2.3.1 chapter 5 with the following update from the Portable Interceptors specification:
    • 5.5.2 StringSeq and WStringSeq are required. This adds the following classes to org.omg.CORBA:
      • StringSeqHolder
      • StringSeqHelper
      • WStringSeqHolder
      • WStringSeqHelper
  • CORBA 2.3.1 sections 10.6.1 and 10.6.2 are supported for repository IDs.
  • CORBA 2.3.1 section 10.7 for TypeCode APIs.
  • CORBA 2.3.1 chapter 11, Portable Object Adapter (POA), with the following updates from the Portable Interceptors specification:
    • Section 11.3.7 POAs must preserve all policies
    • Section 11.3.8.2 again states that POAs must preserve all policies
    • Section 11.3.8.26 POA::id is required.
  • CORBA 2.3.1 chapters 13 and 15 define GIOP 1.0, 1.1, and 1.2. The Java SE 6 ORB fully supports all versions of GIOP, with the exception that the bi-directional GIOP feature defined in sections 15.8 and 15.9 is not supported.
  • All of the Interoperable Naming Service is supported.
  • Portable Interceptors section 13.8 (the new Coder/Decoder interfaces) and all of chapter 21 (the interceptor specification).
  • Section 1.21.8 of the Revised IDL to Java Language Mapping Specification (ptc/00-11-03) has been changed from the version in the IDL to Java Language Mapping Specification (ptc/00-01-08).

Tools

  • The IDL to Java compiler (idlj) complies with:
    • CORBA 2.3.1 chapter 3 (IDL definition)
    • CORBA 2.3.1 chapters 5 and 6 (semantics of Value types)
    • CORBA 2.3.1 section 10.6.5 (pragmas)
    • The IDL to Java mapping specification
    • The Revised IDL to Java language mapping specification section 1.12.1 "local interfaces"
  • The Java to IDL compiler (the IIOP backend for rmic) complies with:
    • CORBA 2.3.1 chapters 5 and 6 (value types)
    • The Java to IDL language mapping. Note that this implicitly references section 1.21 of the IDL to Java language mapping
    • IDL generated by the -idl flag complies with CORBA 2.3.1 chapter 3.


DomainManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DomainManagerOperations

  • All Known Subinterfaces:
    DomainManager

    public interface DomainManagerOperations
    Provides the DomainManager with the means to access policies.

    The DomainManager has associated with it the policy objects for a particular domain. The domain manager also records the membership of the domain and provides the means to add and remove members. The domain manager is itself a member of a domain, possibly the domain it manages. The domain manager provides mechanisms for establishing and navigating relationships to superior and subordinate domains and creating and accessing policies.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Policy get_domain_policy(int policy_type)
      This returns the policy of the specified type for objects in this domain.

    • Method Detail

      • get_domain_policy

        Policy get_domain_policy(int policy_type)
        This returns the policy of the specified type for objects in this domain. The types of policies available are domain specific. See the CORBA specification for a list of standard ORB policies.
        Parameters:
        policy_type - Type of policy to request
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DoubleHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DoubleHolder

  • java.lang.Object
    • org.omg.CORBA.DoubleHolder
  • All Implemented Interfaces:
    Streamable

    public final class DoubleHolder
extends Object
implements Streamable
    The Holder for Double. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL double as an "out" or "inout" parameter, the programmer must pass an instance of DoubleHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myDoubleHolder is an instance of DoubleHolder, the value stored in its value field can be accessed with myDoubleHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      double value
      The double value held by this DoubleHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      DoubleHolder()
      Constructs a new DoubleHolder object with its value field initialized to 0.0.
      DoubleHolder(double initial)
      Constructs a new DoubleHolder object for the given double.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Read a double value from the input stream and store it in the value member.
      TypeCode _type()
      Return the TypeCode of this holder object.
      void _write(OutputStream output)
      Write the double value stored in this holder to an OutputStream.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public double value
        The double value held by this DoubleHolder object.

    • Constructor Detail

      • DoubleHolder

        public DoubleHolder()
        Constructs a new DoubleHolder object with its value field initialized to 0.0.

      • DoubleHolder

        public DoubleHolder(double initial)
        Constructs a new DoubleHolder object for the given double.
        Parameters:
        initial - the double with which to initialize the value field of the new DoubleHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Read a double value from the input stream and store it in the value member.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream to read from.

      • _write

        public void _write(OutputStream output)
        Write the double value stored in this holder to an OutputStream.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream to write into.

      • _type

        public TypeCode _type()
        Return the TypeCode of this holder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DoubleSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DoubleSeqHelper

  • java.lang.Object
    • org.omg.CORBA.DoubleSeqHelper

  • public abstract class DoubleSeqHelper
extends Object
    The Helper for DoubleSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/DoubleSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      DoubleSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static double[] | extract(Any a)
      static String | id()
      static void | insert(Any a, double[] that)
      static double[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, double[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DoubleSeqHelper

        public DoubleSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          double[] that)

      • extract

        public static double[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static double[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         double[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DoubleSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DoubleSeqHolder

  • java.lang.Object
    • org.omg.CORBA.DoubleSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class DoubleSeqHolder
extends Object
implements Streamable
    The Holder for DoubleSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      double[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      DoubleSeqHolder()
      DoubleSeqHolder(double[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public double[] value

    • Constructor Detail

      • DoubleSeqHolder

        public DoubleSeqHolder()

      • DoubleSeqHolder

        public DoubleSeqHolder(double[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynamicImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class DynamicImplementation

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA.DynamicImplementation
  • All Implemented Interfaces:
    Object
    Direct Known Subclasses:
    _BindingIteratorImplBase, _NamingContextImplBase
    Deprecated.
    org.omg.CORBA.DynamicImplementation

    @Deprecated
public class DynamicImplementation
extends ObjectImpl

    • Constructor Summary

      Constructors
      Constructor and Description
      DynamicImplementation()
      Deprecated.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      String[] _ids()
      Deprecated.
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void invoke(ServerRequest request)
      Deprecated.
      Deprecated by Portable Object Adapter

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DynamicImplementation

        public DynamicImplementation()
        Deprecated.

    • Method Detail

      • invoke

        @Deprecated
public void invoke(ServerRequest request)
        Deprecated. Deprecated by Portable Object Adapter

      • _ids

        public String[] _ids()
        Deprecated.
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynAny

  • All Superinterfaces:
    Object
    All Known Subinterfaces:
    DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue
    Deprecated.
    Use the new DynAny instead

    @Deprecated
public interface DynAny
extends Object
    Enables org.omg.CORBA.Any values to be dynamically interpreted (traversed) and constructed. A DynAny object is associated with a data value which may correspond to a copy of the value inserted into an Any. The DynAny APIs enable traversal of the data value associated with an Any at runtime and extraction of the primitive constituents of the data value.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      void assign(DynAny dyn_any)
      Deprecated.
      Copy the contents from one Dynamic Any into another.
      DynAny copy()
      Deprecated.
      Clones this DynAny object.
      DynAny current_component()
      Deprecated.
      Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
      void destroy()
      Deprecated.
      Destroys this DynAny object and frees any resources used to represent the data value associated with it.
      void from_any(Any value)
      Deprecated.
      Make a DynAny object from an Any object.
      Any get_any()
      Deprecated.
      Retrieves the org.omg.CORBA.Any contained in this DynAny object.
      boolean get_boolean()
      Deprecated.
      Retrieves the boolean contained in this DynAny object.
      char get_char()
      Deprecated.
      Retrieves the char contained in this DynAny object.
      double get_double()
      Deprecated.
      Retrieves the double contained in this DynAny object.
      float get_float()
      Deprecated.
      Retrieves the float contained in this DynAny object.
      int get_long()
      Deprecated.
      Retrieves the int contained in this DynAny object.
      long get_longlong()
      Deprecated.
      Retrieves the long contained in this DynAny object.
      byte get_octet()
      Deprecated.
      Retrieves the byte contained in this DynAny object.
      Object get_reference()
      Deprecated.
      Retrieves the org.omg.CORBA.Other contained in this DynAny object.
      short get_short()
      Deprecated.
      Retrieves the short contained in this DynAny object.
      String get_string()
      Deprecated.
      Retrieves the String contained in this DynAny object.
      TypeCode get_typecode()
      Deprecated.
      Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
      int get_ulong()
      Deprecated.
      Retrieves the int contained in this DynAny object.
      long get_ulonglong()
      Deprecated.
      Retrieves the long contained in this DynAny object.
      short get_ushort()
      Deprecated.
      Retrieves the short contained in this DynAny object.
      Serializable get_val()
      Deprecated.
      Retrieves the java.io.Serializable object contained in this DynAny object.
      char get_wchar()
      Deprecated.
      Retrieves the char contained in this DynAny object.
      String get_wstring()
      Deprecated.
      Retrieves the String contained in this DynAny object.
      void insert_any(Any value)
      Deprecated.
      Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
      void insert_boolean(boolean value)
      Deprecated.
      Inserts the given boolean as the value for this DynAny object.
      void insert_char(char value)
      Deprecated.
      Inserts the given char as the value for this DynAny object.
      void insert_double(double value)
      Deprecated.
      Inserts the given double as the value for this DynAny object.
      void insert_float(float value)
      Deprecated.
      Inserts the given float as the value for this DynAny object.
      void insert_long(int value)
      Deprecated.
      Inserts the given int as the value for this DynAny object.
      void insert_longlong(long value)
      Deprecated.
      Inserts the given long as the value for this DynAny object.
      void insert_octet(byte value)
      Deprecated.
      Inserts the given byte as the value for this DynAny object.
      void insert_reference(Object value)
      Deprecated.
      Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
      void insert_short(short value)
      Deprecated.
      Inserts the given short as the value for this DynAny object.
      void insert_string(String value)
      Deprecated.
      Inserts the given String object as the value for this DynAny object.
      void insert_typecode(TypeCode value)
      Deprecated.
      Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
      void insert_ulong(int value)
      Deprecated.
      Inserts the given int as the value for this DynAny object.
      void insert_ulonglong(long value)
      Deprecated.
      Inserts the given long as the value for this DynAny object.
      void insert_ushort(short value)
      Deprecated.
      Inserts the given short as the value for this DynAny object.
      void insert_val(Serializable value)
      Deprecated.
      Inserts the given java.io.Serializable object as the value for this DynAny object.
      void insert_wchar(char value)
      Deprecated.
      Inserts the given char as the value for this DynAny object.
      void insert_wstring(String value)
      Deprecated.
      Inserts the given String as the value for this DynAny object.
      boolean next()
      Deprecated.
      Moves to the next component of this DynAny object.
      void rewind()
      Deprecated.
      Moves the internal pointer to the first component.
      boolean seek(int index)
      Deprecated.
      Moves the internal pointer to the given index.
      Any to_any()
      Deprecated.
      Convert a DynAny object to an Any object.
      TypeCode type()
      Deprecated.
      Returns the TypeCode of the object inserted into this DynAny.

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • type

        TypeCode type()
        Deprecated.
        Returns the TypeCode of the object inserted into this DynAny.
        Returns:
        the TypeCode object.

      • assign

        void assign(DynAny dyn_any)
     throws Invalid
        Deprecated.
        Copy the contents from one Dynamic Any into another.
        Parameters:
        dyn_any - the DynAny object whose contents are assigned to this DynAny.
        Throws:
        Invalid - if the source DynAny is invalid

      • from_any

        void from_any(Any value)
       throws Invalid
        Deprecated.
        Make a DynAny object from an Any object.
        Parameters:
        value - the Any object.
        Throws:
        Invalid - if the source Any object is empty or bad

      • to_any

        Any to_any()
    throws Invalid
        Deprecated.
        Convert a DynAny object to an Any object.
        Returns:
        the Any object.
        Throws:
        Invalid - if this DynAny is empty or bad. created or does not contain a meaningful value

      • destroy

        void destroy()
        Deprecated.
        Destroys this DynAny object and frees any resources used to represent the data value associated with it. This method also destroys all DynAny objects obtained from it.

        Destruction of DynAny objects should be handled with care, taking into account issues dealing with the representation of data values associated with DynAny objects. A programmer who wants to destroy a DynAny object but still be able to manipulate some component of the data value associated with it, should first create a DynAny object for the component and then make a copy of the created DynAny object.

      • copy

        DynAny copy()
        Deprecated.
        Clones this DynAny object.
        Returns:
        a copy of this DynAny object

      • insert_boolean

        void insert_boolean(boolean value)
             throws InvalidValue
        Deprecated.
        Inserts the given boolean as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the boolean to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_octet

        void insert_octet(byte value)
           throws InvalidValue
        Deprecated.
        Inserts the given byte as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the byte to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_char

        void insert_char(char value)
          throws InvalidValue
        Deprecated.
        Inserts the given char as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the char to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_short

        void insert_short(short value)
           throws InvalidValue
        Deprecated.
        Inserts the given short as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the short to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_ushort

        void insert_ushort(short value)
            throws InvalidValue
        Deprecated.
        Inserts the given short as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the short to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_long

        void insert_long(int value)
          throws InvalidValue
        Deprecated.
        Inserts the given int as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the int to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_ulong

        void insert_ulong(int value)
           throws InvalidValue
        Deprecated.
        Inserts the given int as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the int to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_float

        void insert_float(float value)
           throws InvalidValue
        Deprecated.
        Inserts the given float as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the float to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_double

        void insert_double(double value)
            throws InvalidValue
        Deprecated.
        Inserts the given double as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the double to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_string

        void insert_string(String value)
            throws InvalidValue
        Deprecated.
        Inserts the given String object as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the String to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_reference

        void insert_reference(Object value)
               throws InvalidValue
        Deprecated.
        Inserts the given org.omg.CORBA.Object as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the org.omg.CORBA.Object to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_typecode

        void insert_typecode(TypeCode value)
              throws InvalidValue
        Deprecated.
        Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the org.omg.CORBA.TypeCode to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_longlong

        void insert_longlong(long value)
              throws InvalidValue
        Deprecated.
        Inserts the given long as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the long to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_ulonglong

        void insert_ulonglong(long value)
               throws InvalidValue
        Deprecated.
        Inserts the given long as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the long to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_wchar

        void insert_wchar(char value)
           throws InvalidValue
        Deprecated.
        Inserts the given char as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the char to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_wstring

        void insert_wstring(String value)
             throws InvalidValue
        Deprecated.
        Inserts the given String as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the String to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_any

        void insert_any(Any value)
         throws InvalidValue
        Deprecated.
        Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the org.omg.CORBA.Any object to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • insert_val

        void insert_val(Serializable value)
         throws InvalidValue
        Deprecated.
        Inserts the given java.io.Serializable object as the value for this DynAny object.

        If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

        Parameters:
        value - the java.io.Serializable object to insert into this DynAny object
        Throws:
        InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

      • get_val

        Serializable get_val()
              throws TypeMismatch
        Deprecated.
        Retrieves the java.io.Serializable object contained in this DynAny object.
        Returns:
        the java.io.Serializable object that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a java.io.Serializable object

      • get_boolean

        boolean get_boolean()
             throws TypeMismatch
        Deprecated.
        Retrieves the boolean contained in this DynAny object.
        Returns:
        the boolean that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a boolean

      • get_octet

        byte get_octet()
        throws TypeMismatch
        Deprecated.
        Retrieves the byte contained in this DynAny object.
        Returns:
        the byte that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a byte

      • get_char

        char get_char()
       throws TypeMismatch
        Deprecated.
        Retrieves the char contained in this DynAny object.
        Returns:
        the char that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

      • get_short

        short get_short()
         throws TypeMismatch
        Deprecated.
        Retrieves the short contained in this DynAny object.
        Returns:
        the short that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

      • get_ushort

        short get_ushort()
          throws TypeMismatch
        Deprecated.
        Retrieves the short contained in this DynAny object.
        Returns:
        the short that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

      • get_long

        int get_long()
      throws TypeMismatch
        Deprecated.
        Retrieves the int contained in this DynAny object.
        Returns:
        the int that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

      • get_ulong

        int get_ulong()
       throws TypeMismatch
        Deprecated.
        Retrieves the int contained in this DynAny object.
        Returns:
        the int that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

      • get_float

        float get_float()
         throws TypeMismatch
        Deprecated.
        Retrieves the float contained in this DynAny object.
        Returns:
        the float that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a float

      • get_double

        double get_double()
           throws TypeMismatch
        Deprecated.
        Retrieves the double contained in this DynAny object.
        Returns:
        the double that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a double

      • get_string

        String get_string()
           throws TypeMismatch
        Deprecated.
        Retrieves the String contained in this DynAny object.
        Returns:
        the String that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

      • get_reference

        Object get_reference()
              throws TypeMismatch
        Deprecated.
        Retrieves the org.omg.CORBA.Other contained in this DynAny object.
        Returns:
        the org.omg.CORBA.Other that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Other

      • get_typecode

        TypeCode get_typecode()
               throws TypeMismatch
        Deprecated.
        Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
        Returns:
        the org.omg.CORBA.TypeCode that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a org.omg.CORBA.TypeCode

      • get_longlong

        long get_longlong()
           throws TypeMismatch
        Deprecated.
        Retrieves the long contained in this DynAny object.
        Returns:
        the long that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

      • get_ulonglong

        long get_ulonglong()
            throws TypeMismatch
        Deprecated.
        Retrieves the long contained in this DynAny object.
        Returns:
        the long that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

      • get_wchar

        char get_wchar()
        throws TypeMismatch
        Deprecated.
        Retrieves the char contained in this DynAny object.
        Returns:
        the char that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

      • get_wstring

        String get_wstring()
            throws TypeMismatch
        Deprecated.
        Retrieves the String contained in this DynAny object.
        Returns:
        the String that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

      • get_any

        Any get_any()
     throws TypeMismatch
        Deprecated.
        Retrieves the org.omg.CORBA.Any contained in this DynAny object.
        Returns:
        the org.omg.CORBA.Any that is the value for this DynAny object
        Throws:
        TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Any

      • current_component

        DynAny current_component()
        Deprecated.
        Returns a DynAny object reference that can be used to get/set the value of the component currently accessed. The appropriate insert method can be called on the resulting DynAny object to initialize the component. The appropriate get method can be called on the resulting DynAny object to extract the value of the component.
        Returns:
        a DynAny object reference that can be used to retrieve or set the value of the component currently accessed

      • next

        boolean next()
        Deprecated.
        Moves to the next component of this DynAny object. This method is used for iterating through the components of a constructed type, effectively moving a pointer from one component to the next. The pointer starts out on the first component when a DynAny object is created.
        Returns:
        true if the pointer points to a component; false if there are no more components or this DynAny is associated with a basic type rather than a constructed type

      • seek

        boolean seek(int index)
        Deprecated.
        Moves the internal pointer to the given index. Logically, this method sets a new offset for this pointer.
        Parameters:
        index - an int indicating the position to which the pointer should move. The first position is 0.
        Returns:
        true if the pointer points to a component; false if there is no component at the designated index. If this DynAny object is associated with a basic type, this method returns false for any index other than 0.

      • rewind

        void rewind()
        Deprecated.
        Moves the internal pointer to the first component.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA.DynAnyPackage

Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).

See: Description

  • Exception Summary
    Exception Description
    Invalid
    Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
    InvalidSeq
    The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
    InvalidValue
    TypeMismatch
    TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Package org.omg.CORBA.DynAnyPackage Description

Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
Since:
JDK1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA.DynAnyPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA.DynAnyPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CORBA.DynAnyPackage.Invalid
          • org.omg.CORBA.DynAnyPackage.InvalidSeq
          • org.omg.CORBA.DynAnyPackage.InvalidValue
          • org.omg.CORBA.DynAnyPackage.TypeMismatch
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA.DynAnyPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA.DynAnyPackage

  • Packages that use org.omg.CORBA.DynAnyPackage
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
  • Classes in org.omg.CORBA.DynAnyPackage used by org.omg.CORBA
    Class and Description
    Invalid
    Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
    InvalidSeq
    The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
    InvalidValue
    TypeMismatch
    TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DynAnyPackage.Invalid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DynAnyPackage.Invalid

  • Packages that use Invalid
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of Invalid in org.omg.CORBA

      Methods in org.omg.CORBA that throw Invalid
      Modifier and Type Method and Description
      void DynAny.assign(DynAny dyn_any)
      Deprecated.
      Copy the contents from one Dynamic Any into another.
      void DynAny.from_any(Any value)
      Deprecated.
      Make a DynAny object from an Any object.
      Any DynAny.to_any()
      Deprecated.
      Convert a DynAny object to an Any object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DynAnyPackage.InvalidSeq

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DynAnyPackage.InvalidSeq

  • Packages that use InvalidSeq
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of InvalidSeq in org.omg.CORBA

      Methods in org.omg.CORBA that throw InvalidSeq
      Modifier and Type Method and Description
      void DynSequence.set_elements(Any[] value)
      Deprecated.
      Sets the values of all elements in this sequence with the given array.
      void DynArray.set_elements(Any[] value)
      Deprecated.
      Sets the value of this DynArray object to the given array.
      void DynValue.set_members(NameValuePair[] value)
      Deprecated.
      Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
      void DynStruct.set_members(NameValuePair[] value)
      Deprecated.
      Set the members of the struct.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DynAnyPackage.InvalidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DynAnyPackage.InvalidValue

  • Packages that use InvalidValue
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of InvalidValue in org.omg.CORBA

      Methods in org.omg.CORBA that throw InvalidValue
      Modifier and Type Method and Description
      void DynAny.insert_any(Any value)
      Deprecated.
      Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
      void DynAny.insert_boolean(boolean value)
      Deprecated.
      Inserts the given boolean as the value for this DynAny object.
      void DynAny.insert_char(char value)
      Deprecated.
      Inserts the given char as the value for this DynAny object.
      void DynAny.insert_double(double value)
      Deprecated.
      Inserts the given double as the value for this DynAny object.
      void DynAny.insert_float(float value)
      Deprecated.
      Inserts the given float as the value for this DynAny object.
      void DynAny.insert_long(int value)
      Deprecated.
      Inserts the given int as the value for this DynAny object.
      void DynAny.insert_longlong(long value)
      Deprecated.
      Inserts the given long as the value for this DynAny object.
      void DynAny.insert_octet(byte value)
      Deprecated.
      Inserts the given byte as the value for this DynAny object.
      void DynAny.insert_reference(Object value)
      Deprecated.
      Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
      void DynAny.insert_short(short value)
      Deprecated.
      Inserts the given short as the value for this DynAny object.
      void DynAny.insert_string(String value)
      Deprecated.
      Inserts the given String object as the value for this DynAny object.
      void DynAny.insert_typecode(TypeCode value)
      Deprecated.
      Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
      void DynAny.insert_ulong(int value)
      Deprecated.
      Inserts the given int as the value for this DynAny object.
      void DynAny.insert_ulonglong(long value)
      Deprecated.
      Inserts the given long as the value for this DynAny object.
      void DynAny.insert_ushort(short value)
      Deprecated.
      Inserts the given short as the value for this DynAny object.
      void DynAny.insert_val(Serializable value)
      Deprecated.
      Inserts the given java.io.Serializable object as the value for this DynAny object.
      void DynAny.insert_wchar(char value)
      Deprecated.
      Inserts the given char as the value for this DynAny object.
      void DynAny.insert_wstring(String value)
      Deprecated.
      Inserts the given String as the value for this DynAny object.
      void DynFixed.set_value(byte[] val)
      Deprecated.
      Sets the given fixed type instance as the value for this DynFixed object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.DynAnyPackage.TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.DynAnyPackage.TypeMismatch

  • Packages that use TypeMismatch
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of TypeMismatch in org.omg.CORBA

      Methods in org.omg.CORBA that throw TypeMismatch
      Modifier and Type Method and Description
      Any DynAny.get_any()
      Deprecated.
      Retrieves the org.omg.CORBA.Any contained in this DynAny object.
      boolean DynAny.get_boolean()
      Deprecated.
      Retrieves the boolean contained in this DynAny object.
      char DynAny.get_char()
      Deprecated.
      Retrieves the char contained in this DynAny object.
      double DynAny.get_double()
      Deprecated.
      Retrieves the double contained in this DynAny object.
      float DynAny.get_float()
      Deprecated.
      Retrieves the float contained in this DynAny object.
      int DynAny.get_long()
      Deprecated.
      Retrieves the int contained in this DynAny object.
      long DynAny.get_longlong()
      Deprecated.
      Retrieves the long contained in this DynAny object.
      byte DynAny.get_octet()
      Deprecated.
      Retrieves the byte contained in this DynAny object.
      Object DynAny.get_reference()
      Deprecated.
      Retrieves the org.omg.CORBA.Other contained in this DynAny object.
      short DynAny.get_short()
      Deprecated.
      Retrieves the short contained in this DynAny object.
      String DynAny.get_string()
      Deprecated.
      Retrieves the String contained in this DynAny object.
      TypeCode DynAny.get_typecode()
      Deprecated.
      Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
      int DynAny.get_ulong()
      Deprecated.
      Retrieves the int contained in this DynAny object.
      long DynAny.get_ulonglong()
      Deprecated.
      Retrieves the long contained in this DynAny object.
      short DynAny.get_ushort()
      Deprecated.
      Retrieves the short contained in this DynAny object.
      Serializable DynAny.get_val()
      Deprecated.
      Retrieves the java.io.Serializable object contained in this DynAny object.
      char DynAny.get_wchar()
      Deprecated.
      Retrieves the char contained in this DynAny object.
      String DynAny.get_wstring()
      Deprecated.
      Retrieves the String contained in this DynAny object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Invalid

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.DynAnyPackage

Class Invalid

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.DynAnyPackage.Invalid
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Invalid
extends UserException
    Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.

    • Constructor Summary

      Constructors
      Constructor and Description
      Invalid()
      Constructs an Invalid object.
      Invalid(String reason)
      Constructs an Invalid object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • Invalid

        public Invalid()
        Constructs an Invalid object.

      • Invalid

        public Invalid(String reason)
        Constructs an Invalid object.
        Parameters:
        reason - a String giving more information regarding the bad parameter passed to a dynamic any operation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidSeq

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.DynAnyPackage

Class InvalidSeq

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.DynAnyPackage.InvalidSeq
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidSeq
extends UserException
    The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidSeq()
      Constructs an InvalidSeq object.
      InvalidSeq(String reason)
      Constructs an InvalidSeq object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidSeq

        public InvalidSeq()
        Constructs an InvalidSeq object.

      • InvalidSeq

        public InvalidSeq(String reason)
        Constructs an InvalidSeq object.
        Parameters:
        reason - a String giving more information regarding the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.DynAnyPackage

Class InvalidValue

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.DynAnyPackage.InvalidValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidValue
extends UserException

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidValue()
      Constructs an InvalidValue object.
      InvalidValue(String reason)
      Constructs an InvalidValue object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidValue

        public InvalidValue()
        Constructs an InvalidValue object.

      • InvalidValue

        public InvalidValue(String reason)
        Constructs an InvalidValue object.
        Parameters:
        reason - a String giving more information regarding the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.DynAnyPackage

Class TypeMismatch

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.DynAnyPackage.TypeMismatch
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class TypeMismatch
extends UserException
    TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeMismatch()
      Constructs a TypeMismatch object.
      TypeMismatch(String reason)
      Constructs a TypeMismatch object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TypeMismatch

        public TypeMismatch()
        Constructs a TypeMismatch object.

      • TypeMismatch

        public TypeMismatch(String reason)
        Constructs a TypeMismatch object.
        Parameters:
        reason - a String giving more information regarding the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynArray

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynArray

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynArray instead

    @Deprecated
public interface DynArray
extends Object, DynAny
    Represents a DynAny object associated with an array.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      Any[] get_elements()
      Deprecated.
      Returns the value of all the elements of this array.
      void set_elements(Any[] value)
      Deprecated.
      Sets the value of this DynArray object to the given array.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • get_elements

        Any[] get_elements()
        Deprecated.
        Returns the value of all the elements of this array.
        Returns:
        the array of Any objects that is the value for this DynArray object
        See Also:
        set_elements(org.omg.CORBA.Any[])

      • set_elements

        void set_elements(Any[] value)
           throws InvalidSeq
        Deprecated.
        Sets the value of this DynArray object to the given array.
        Parameters:
        value - the array of Any objects
        Throws:
        InvalidSeq - if the sequence is bad
        See Also:
        get_elements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynEnum

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynEnum instead

    @Deprecated
public interface DynEnum
extends Object, DynAny
    Represents a DynAny object associated with an IDL enum.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      String value_as_string()
      Deprecated.
      Return the value of the IDL enum stored in this DynEnum as a string.
      void value_as_string(String arg)
      Deprecated.
      Set a particular enum in this DynEnum.
      int value_as_ulong()
      Deprecated.
      Return the value of the IDL enum as a Java int.
      void value_as_ulong(int arg)
      Deprecated.
      Set the value of the IDL enum.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • value_as_string

        String value_as_string()
        Deprecated.
        Return the value of the IDL enum stored in this DynEnum as a string.
        Returns:
        the stringified value.

      • value_as_string

        void value_as_string(String arg)
        Deprecated.
        Set a particular enum in this DynEnum.
        Parameters:
        arg - the string corresponding to the value.

      • value_as_ulong

        int value_as_ulong()
        Deprecated.
        Return the value of the IDL enum as a Java int.
        Returns:
        the integer value.

      • value_as_ulong

        void value_as_ulong(int arg)
        Deprecated.
        Set the value of the IDL enum.
        Parameters:
        arg - the int value of the enum.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynFixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynFixed

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynFixed instead

    @Deprecated
public interface DynFixed
extends Object, DynAny
    Represents a DynAny object that is associated with an IDL fixed type.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      byte[] get_value()
      Deprecated.
      Returns the value of the fixed type represented in this DynFixed object.
      void set_value(byte[] val)
      Deprecated.
      Sets the given fixed type instance as the value for this DynFixed object.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • get_value

        byte[] get_value()
        Deprecated.
        Returns the value of the fixed type represented in this DynFixed object.
        Returns:
        the value as a byte array
        See Also:
        set_value(byte[])

      • set_value

        void set_value(byte[] val)
        throws InvalidValue
        Deprecated.
        Sets the given fixed type instance as the value for this DynFixed object.
        Parameters:
        val - the value of the fixed type as a byte array
        Throws:
        InvalidValue - if the given argument is bad
        See Also:
        get_value()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynSequence

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynSequence

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynSequence instead

    @Deprecated
public interface DynSequence
extends Object, DynAny
    The representation of a DynAny object that is associated with an IDL sequence.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      Any[] get_elements()
      Deprecated.
      Returns the value of every element in this sequence.
      int length()
      Deprecated.
      Returns the length of the sequence represented by this DynFixed object.
      void length(int arg)
      Deprecated.
      Sets the length of the sequence represented by this DynFixed object to the given argument.
      void set_elements(Any[] value)
      Deprecated.
      Sets the values of all elements in this sequence with the given array.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • length

        int length()
        Deprecated.
        Returns the length of the sequence represented by this DynFixed object.
        Returns:
        the length of the sequence

      • length

        void length(int arg)
        Deprecated.
        Sets the length of the sequence represented by this DynFixed object to the given argument.
        Parameters:
        arg - the length of the sequence

      • get_elements

        Any[] get_elements()
        Deprecated.
        Returns the value of every element in this sequence.
        Returns:
        an array of Any objects containing the values in the sequence
        See Also:
        set_elements(org.omg.CORBA.Any[])

      • set_elements

        void set_elements(Any[] value)
           throws InvalidSeq
        Deprecated.
        Sets the values of all elements in this sequence with the given array.
        Parameters:
        value - the array of Any objects to be set
        Throws:
        InvalidSeq - if the array of values is bad
        See Also:
        get_elements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynStruct

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynStruct

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynStruct instead

    @Deprecated
public interface DynStruct
extends Object, DynAny
    The representation of a DynAny object that is associated with an IDL struct.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      TCKind current_member_kind()
      Deprecated.
      Returns the TCKind object that describes the kind of the current member.
      String current_member_name()
      Deprecated.
      During a traversal, returns the name of the current member.
      NameValuePair[] get_members()
      Deprecated.
      Returns an array containing all the members of the stored struct.
      void set_members(NameValuePair[] value)
      Deprecated.
      Set the members of the struct.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • current_member_name

        String current_member_name()
        Deprecated.
        During a traversal, returns the name of the current member.
        Returns:
        the string name of the current member

      • current_member_kind

        TCKind current_member_kind()
        Deprecated.
        Returns the TCKind object that describes the kind of the current member.
        Returns:
        the TCKind object that describes the current member

      • get_members

        NameValuePair[] get_members()
        Deprecated.
        Returns an array containing all the members of the stored struct.
        Returns:
        the array of name-value pairs
        See Also:
        set_members(org.omg.CORBA.NameValuePair[])

      • set_members

        void set_members(NameValuePair[] value)
          throws InvalidSeq
        Deprecated.
        Set the members of the struct.
        Parameters:
        value - the array of name-value pairs.
        Throws:
        InvalidSeq - if the given argument is invalid
        See Also:
        get_members()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynUnion

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynUnion

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynUnion instead

    @Deprecated
public interface DynUnion
extends Object, DynAny
    The DynUnion interface represents a DynAny object that is associated with an IDL union. Union values can be traversed using the operations defined in DynAny. The first component in the union corresponds to the discriminator; the second corresponds to the actual value of the union. Calling the method next() twice allows you to access both components.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      TCKind discriminator_kind()
      Deprecated.
      Returns the TCKind object associated with the discriminator of this union.
      DynAny discriminator()
      Deprecated.
      Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
      TCKind member_kind()
      Deprecated.
      Returns the TCKind associated with the member of this union.
      String member_name()
      Deprecated.
      Allows for the inspection of the name of this union member without checking the value of the discriminator.
      void member_name(String arg)
      Deprecated.
      Allows for the assignment of the name of this union member.
      DynAny member()
      Deprecated.
      Returns a DynAny object reference that is used in order to insert/get a member of this union.
      boolean set_as_default()
      Deprecated.
      Determines whether the discriminator associated with this union has been assigned a valid default value.
      void set_as_default(boolean arg)
      Deprecated.
      Determines whether the discriminator associated with this union gets assigned a valid default value.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • set_as_default

        boolean set_as_default()
        Deprecated.
        Determines whether the discriminator associated with this union has been assigned a valid default value.
        Returns:
        true if the discriminator has a default value; false otherwise

      • set_as_default

        void set_as_default(boolean arg)
        Deprecated.
        Determines whether the discriminator associated with this union gets assigned a valid default value.
        Parameters:
        arg - true if the discriminator gets assigned a default value

      • discriminator

        DynAny discriminator()
        Deprecated.
        Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
        Returns:
        a DynAny object reference representing the discriminator value

      • discriminator_kind

        TCKind discriminator_kind()
        Deprecated.
        Returns the TCKind object associated with the discriminator of this union.
        Returns:
        the TCKind object associated with the discriminator of this union

      • member

        DynAny member()
        Deprecated.
        Returns a DynAny object reference that is used in order to insert/get a member of this union.
        Returns:
        the DynAny object representing a member of this union

      • member_name

        String member_name()
        Deprecated.
        Allows for the inspection of the name of this union member without checking the value of the discriminator.
        Returns:
        the name of this union member

      • member_name

        void member_name(String arg)
        Deprecated.
        Allows for the assignment of the name of this union member.
        Parameters:
        arg - the new name of this union member

      • member_kind

        TCKind member_kind()
        Deprecated.
        Returns the TCKind associated with the member of this union.
        Returns:
        the TCKind object associated with the member of this union
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface DynValue

  • All Superinterfaces:
    DynAny, Object
    Deprecated.
    Use the new DynValue instead

    @Deprecated
public interface DynValue
extends Object, DynAny
    The representation of a DynAny object that is associated with an IDL value type.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      TCKind current_member_kind()
      Deprecated.
      Returns the TCKind object that describes the current member.
      String current_member_name()
      Deprecated.
      Returns the name of the current member while traversing a DynAny object that represents a Value object.
      NameValuePair[] get_members()
      Deprecated.
      Returns an array containing all the members of the value object stored in this DynValue.
      void set_members(NameValuePair[] value)
      Deprecated.
      Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.

      • Methods inherited from interface org.omg.CORBA.DynAny

        assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Method Detail

      • current_member_name

        String current_member_name()
        Deprecated.
        Returns the name of the current member while traversing a DynAny object that represents a Value object.
        Returns:
        the name of the current member

      • current_member_kind

        TCKind current_member_kind()
        Deprecated.
        Returns the TCKind object that describes the current member.
        Returns:
        the TCKind object corresponding to the current member

      • get_members

        NameValuePair[] get_members()
        Deprecated.
        Returns an array containing all the members of the value object stored in this DynValue.
        Returns:
        an array of name-value pairs.
        See Also:
        set_members(org.omg.CORBA.NameValuePair[])

      • set_members

        void set_members(NameValuePair[] value)
          throws InvalidSeq
        Deprecated.
        Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
        Parameters:
        value - the array of name-value pairs to be set
        Throws:
        InvalidSeq - if an inconsistent value is part of the given array
        See Also:
        get_members()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Environment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Environment

  • java.lang.Object
    • org.omg.CORBA.Environment

  • public abstract class Environment
extends Object
    A container (holder) for an exception that is used in Request operations to make exceptions available to the client. An Environment object is created with the ORB method create_environment.
    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      Environment()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void clear()
      Clears this Environment object of its exception.
      abstract Exception exception()
      Retrieves the exception in this Environment object.
      abstract void exception(Exception except)
      Inserts the given exception into this Environment object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Environment

        public Environment()

    • Method Detail

      • exception

        public abstract Exception exception()
        Retrieves the exception in this Environment object.
        Returns:
        the exception in this Environment object

      • exception

        public abstract void exception(Exception except)
        Inserts the given exception into this Environment object.
        Parameters:
        except - the exception to be set

      • clear

        public abstract void clear()
        Clears this Environment object of its exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ExceptionList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ExceptionList

  • java.lang.Object
    • org.omg.CORBA.ExceptionList

  • public abstract class ExceptionList
extends Object
    An object used in Request operations to describe the exceptions that can be thrown by a method. It maintains a modifiable list of TypeCodes of the exceptions.

    The following code fragment demonstrates creating an ExceptionList object:

        ORB orb = ORB.init(args, null);
    org.omg.CORBA.ExceptionList excList = orb.create_exception_list();
    The variable excList represents an ExceptionList object with no TypeCode objects in it.

    To add items to the list, you first create a TypeCode object for the exception you want to include, using the ORB method create_exception_tc. Then you use the ExceptionList method add to add it to the list. The class ExceptionList has a method for getting the number of TypeCode objects in the list, and after items have been added, it is possible to call methods for accessing or deleting an item at a designated index.

    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      ExceptionList()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void add(TypeCode exc)
      Adds a TypeCode object describing an exception to this ExceptionList object.
      abstract int count()
      Retrieves the number of TypeCode objects in this ExceptionList object.
      abstract TypeCode item(int index)
      Returns the TypeCode object at the given index.
      abstract void remove(int index)
      Removes the TypeCode object at the given index.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ExceptionList

        public ExceptionList()

    • Method Detail

      • count

        public abstract int count()
        Retrieves the number of TypeCode objects in this ExceptionList object.
        Returns:
        the number of TypeCode objects in this ExceptionList object

      • add

        public abstract void add(TypeCode exc)
        Adds a TypeCode object describing an exception to this ExceptionList object.
        Parameters:
        exc - the TypeCode object to be added

      • item

        public abstract TypeCode item(int index)
                       throws Bounds
        Returns the TypeCode object at the given index. The first item is at index 0.
        Parameters:
        index - the index of the TypeCode object desired. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
        Returns:
        the TypeCode object at the given index
        Throws:
        Bounds - if the index given is greater than or equal to the number of TypeCode objects in this ExceptionList object

      • remove

        public abstract void remove(int index)
                     throws Bounds
        Removes the TypeCode object at the given index. Note that the indices of all the TypeCoded objects following the one deleted are shifted down by one.
        Parameters:
        index - the index of the TypeCode object to be removed. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
        Throws:
        Bounds - if the index is greater than or equal to the number of TypeCode objects in this ExceptionList object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FieldNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FieldNameHelper

  • java.lang.Object
    • org.omg.CORBA.FieldNameHelper

  • public abstract class FieldNameHelper
extends Object
    The Helper for FieldName. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/FieldNameHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      FieldNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • FieldNameHelper

        public FieldNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FixedHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FixedHolder

  • java.lang.Object
    • org.omg.CORBA.FixedHolder
  • All Implemented Interfaces:
    Streamable

    public final class FixedHolder
extends Object
implements Streamable
    The Holder for Fixed. For more information on Holder files, see "Generated Files: Holder Files".

    FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal. It is usually used to store "out" and "inout" IDL method parameters. If an IDL method signature has a fixed as an "out" or "inout" parameter, the programmer must pass an instance of FixedHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the contained value corresponding to the "out" value returned from the server.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      BigDecimal value
      The value held by the FixedHolder

    • Constructor Summary

      Constructors
      Constructor and Description
      FixedHolder()
      Construct the FixedHolder without initializing the contained value.
      FixedHolder(BigDecimal initial)
      Construct the FixedHolder and initialize it with the given value.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Read a fixed point value from the input stream and store it in the value member.
      TypeCode _type()
      Return the TypeCode of this holder object.
      void _write(OutputStream output)
      Write the fixed point value stored in this holder to an OutputStream.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public BigDecimal value
        The value held by the FixedHolder

    • Constructor Detail

      • FixedHolder

        public FixedHolder()
        Construct the FixedHolder without initializing the contained value.

      • FixedHolder

        public FixedHolder(BigDecimal initial)
        Construct the FixedHolder and initialize it with the given value.
        Parameters:
        initial - the value used to initialize the FixedHolder

    • Method Detail

      • _read

        public void _read(InputStream input)
        Read a fixed point value from the input stream and store it in the value member.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream to read from.

      • _write

        public void _write(OutputStream output)
        Write the fixed point value stored in this holder to an OutputStream.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream to write into.

      • _type

        public TypeCode _type()
        Return the TypeCode of this holder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FloatHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FloatHolder

  • java.lang.Object
    • org.omg.CORBA.FloatHolder
  • All Implemented Interfaces:
    Streamable

    public final class FloatHolder
extends Object
implements Streamable
    The Holder for Float. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL float as an "out" or "inout" parameter, the programmer must pass an instance of FloatHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myFloatHolder is an instance of FloatHolder, the value stored in its value field can be accessed with myFloatHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      float value
      The float value held by this FloatHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      FloatHolder()
      Constructs a new FloatHolder object with its value field initialized to 0.0.
      FloatHolder(float initial)
      Constructs a new FloatHolder object for the given float.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Read a float from an input stream and initialize the value member with the float value.
      TypeCode _type()
      Return the TypeCode of this Streamable.
      void _write(OutputStream output)
      Write the float value into an output stream.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public float value
        The float value held by this FloatHolder object.

    • Constructor Detail

      • FloatHolder

        public FloatHolder()
        Constructs a new FloatHolder object with its value field initialized to 0.0.

      • FloatHolder

        public FloatHolder(float initial)
        Constructs a new FloatHolder object for the given float.
        Parameters:
        initial - the float with which to initialize the value field of the new FloatHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Read a float from an input stream and initialize the value member with the float value.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream to read from.

      • _write

        public void _write(OutputStream output)
        Write the float value into an output stream.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream to write into.

      • _type

        public TypeCode _type()
        Return the TypeCode of this Streamable.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FloatSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FloatSeqHelper

  • java.lang.Object
    • org.omg.CORBA.FloatSeqHelper

  • public abstract class FloatSeqHelper
extends Object
    The Helper for FloatSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/FloatSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      FloatSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static float[] | extract(Any a)
      static String | id()
      static void | insert(Any a, float[] that)
      static float[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, float[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • FloatSeqHelper

        public FloatSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          float[] that)

      • extract

        public static float[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static float[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         float[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FloatSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FloatSeqHolder

  • java.lang.Object
    • org.omg.CORBA.FloatSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class FloatSeqHolder
extends Object
implements Streamable
    The Holder for FloatSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      float[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      FloatSeqHolder()
      FloatSeqHolder(float[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public float[] value

    • Constructor Detail

      • FloatSeqHolder

        public FloatSeqHolder()

      • FloatSeqHolder

        public FloatSeqHolder(float[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FREE_MEM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class FREE_MEM

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.FREE_MEM
  • All Implemented Interfaces:
    Serializable

    public final class FREE_MEM
extends SystemException
    Exception thrown when the ORB failed in an attempt to free dynamic memory, for example because of heap corruption or memory segments being locked.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      FREE_MEM()
      Constructs a FREE_MEM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      FREE_MEM(int minor, CompletionStatus completed)
      Constructs a FREE_MEM exception with the specified minor code and completion status.
      FREE_MEM(String s)
      Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      FREE_MEM(String s, int minor, CompletionStatus completed)
      Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • FREE_MEM

        public FREE_MEM()
        Constructs a FREE_MEM exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • FREE_MEM

        public FREE_MEM(String s)
        Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • FREE_MEM

        public FREE_MEM(int minor,
                CompletionStatus completed)
        Constructs a FREE_MEM exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • FREE_MEM

        public FREE_MEM(String s,
                int minor,
                CompletionStatus completed)
        Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdentifierHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class IdentifierHelper

  • java.lang.Object
    • org.omg.CORBA.IdentifierHelper

  • public abstract class IdentifierHelper
extends Object
    The Helper for Identifier. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/IdentifierHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:42 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      IdentifierHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • IdentifierHelper

        public IdentifierHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IDLTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class IDLTypeHelper

  • java.lang.Object
    • org.omg.CORBA.IDLTypeHelper

  • public abstract class IDLTypeHelper
extends Object
    The Helper for IDLType. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/IDLTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      IDLTypeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static IDLType | extract(Any a)
      static String | id()
      static void | insert(Any a, IDLType that)
      static IDLType | narrow(Object obj)
      static IDLType | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, IDLType value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • IDLTypeHelper

        public IDLTypeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          IDLType that)

      • extract

        public static IDLType extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static IDLType read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         IDLType value)

      • narrow

        public static IDLType narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IDLTypeOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface IDLTypeOperations

  • All Superinterfaces:
    IRObjectOperations
    All Known Subinterfaces:
    IDLType
    All Known Implementing Classes:
    _IDLTypeStub

    public interface IDLTypeOperations
extends IRObjectOperations
    This interface must be implemented by all IDLType objects. The IDLType is inherited by all IR objects that represent IDL types, including interfaces, typedefs, and anonymous types.
    See Also:
    IDLType, IRObject, IRObjectOperations

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TypeCode type()
      The type attribute describes the type defined by an object derived from IDLType.

      • Methods inherited from interface org.omg.CORBA.IRObjectOperations

        def_kind, destroy

    • Method Detail

      • type

        TypeCode type()
        The type attribute describes the type defined by an object derived from IDLType.
        Returns:
        the TypeCode defined by this object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IMP_LIMIT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class IMP_LIMIT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.IMP_LIMIT
  • All Implemented Interfaces:
    Serializable

    public final class IMP_LIMIT
extends SystemException
    This exception indicates that an implementation limit was exceeded in the ORB run time. For example, an ORB may reach the maximum number of references it can hold simultaneously in an address space, the size of a parameter may have exceeded the allowed maximum, or an ORB may impose a maximum on the number of clients or servers that can run simultaneously.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      IMP_LIMIT()
      Constructs an IMP_LIMIT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      IMP_LIMIT(int minor, CompletionStatus completed)
      Constructs an IMP_LIMIT exception with the specified minor code and completion status.
      IMP_LIMIT(String s)
      Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      IMP_LIMIT(String s, int minor, CompletionStatus completed)
      Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • IMP_LIMIT

        public IMP_LIMIT()
        Constructs an IMP_LIMIT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • IMP_LIMIT

        public IMP_LIMIT(String s)
        Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • IMP_LIMIT

        public IMP_LIMIT(int minor,
                 CompletionStatus completed)
        Constructs an IMP_LIMIT exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • IMP_LIMIT

        public IMP_LIMIT(String s,
                 int minor,
                 CompletionStatus completed)
        Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INITIALIZE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INITIALIZE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INITIALIZE
  • All Implemented Interfaces:
    Serializable

    public final class INITIALIZE
extends SystemException
    Exception thrown when an ORB has encountered a failure during its initialization, such as failure to acquire networking resources or detecting a configuration error.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INITIALIZE()
      Constructs an INITIALIZE exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO.
      INITIALIZE(int minor, CompletionStatus completed)
      Constructs an INITIALIZE exception with the specified minor code and completion status.
      INITIALIZE(String s)
      Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
      INITIALIZE(String s, int minor, CompletionStatus completed)
      Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INITIALIZE

        public INITIALIZE()
        Constructs an INITIALIZE exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO.

      • INITIALIZE

        public INITIALIZE(String s)
        Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INITIALIZE

        public INITIALIZE(int minor,
                  CompletionStatus completed)
        Constructs an INITIALIZE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status of the method that threw this exception

      • INITIALIZE

        public INITIALIZE(String s,
                  int minor,
                  CompletionStatus completed)
        Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status of the method that threw this exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INTERNAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INTERNAL

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INTERNAL
  • All Implemented Interfaces:
    Serializable

    public final class INTERNAL
extends SystemException
    This exception indicates an internal failure in an ORB, for example, if an ORB has detected corruption of its internal data structures.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section meaning of minor codes to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INTERNAL()
      Constructs an INTERNAL exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INTERNAL(int minor, CompletionStatus completed)
      Constructs an INTERNAL exception with the specified minor code and completion status.
      INTERNAL(String s)
      Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      INTERNAL(String s, int minor, CompletionStatus completed)
      Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INTERNAL

        public INTERNAL()
        Constructs an INTERNAL exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INTERNAL

        public INTERNAL(String s)
        Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INTERNAL

        public INTERNAL(int minor,
                CompletionStatus completed)
        Constructs an INTERNAL exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus that indicates the completion status of the method that threw this exception

      • INTERNAL

        public INTERNAL(String s,
                int minor,
                CompletionStatus completed)
        Constructs an INTERNAL exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus that indicates the completion status of the method that threw this exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INTF_REPOS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INTF_REPOS

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INTF_REPOS
  • All Implemented Interfaces:
    Serializable

    public final class INTF_REPOS
extends SystemException
    Exception raised when an ORB cannot reach the interface repository, or some other failure relating to the interface repository is detected.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INTF_REPOS()
      Constructs an INTF_REPOS exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INTF_REPOS(int minor, CompletionStatus completed)
      Constructs an INTF_REPOS exception with the specified minor code and completion status.
      INTF_REPOS(String s)
      Constructs an INTF_REPOS exception with the specified detail.
      INTF_REPOS(String s, int minor, CompletionStatus completed)
      Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INTF_REPOS

        public INTF_REPOS()
        Constructs an INTF_REPOS exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INTF_REPOS

        public INTF_REPOS(String s)
        Constructs an INTF_REPOS exception with the specified detail.
        Parameters:
        s - the String containing a detail message

      • INTF_REPOS

        public INTF_REPOS(int minor,
                  CompletionStatus completed)
        Constructs an INTF_REPOS exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • INTF_REPOS

        public INTF_REPOS(String s,
                  int minor,
                  CompletionStatus completed)
        Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IntHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class IntHolder

  • java.lang.Object
    • org.omg.CORBA.IntHolder
  • All Implemented Interfaces:
    Streamable

    public final class IntHolder
extends Object
implements Streamable
    The Holder for Int. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL long as an "out" or "inout" parameter, the programmer must pass an instance of IntHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myIntHolder is an instance of IntHolder, the value stored in its value field can be accessed with myIntHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      int value
      The int value held by this IntHolder object in its value field.

    • Constructor Summary

      Constructors
      Constructor and Description
      IntHolder()
      Constructs a new IntHolder object with its value field initialized to 0.
      IntHolder(int initial)
      Constructs a new IntHolder object with its value field initialized to the given int.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
      TypeCode _type()
      Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
      void _write(OutputStream output)
      Marshals the value in this IntHolder object's value field to the output stream output.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public int value
        The int value held by this IntHolder object in its value field.

    • Constructor Detail

      • IntHolder

        public IntHolder()
        Constructs a new IntHolder object with its value field initialized to 0.

      • IntHolder

        public IntHolder(int initial)
        Constructs a new IntHolder object with its value field initialized to the given int.
        Parameters:
        initial - the int with which to initialize the value field of the newly-created IntHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream object containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals the value in this IntHolder object's value field to the output stream output.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream object that will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
        Specified by:
        _type in interface Streamable
        Returns:
        the type code for the value held in this IntHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INVALID_ACTIVITY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INVALID_ACTIVITY

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INVALID_ACTIVITY
  • All Implemented Interfaces:
    Serializable

    public final class INVALID_ACTIVITY
extends SystemException
    The INVALID_ACTIVITY system exception may be raised on the Activity or Transaction services' resume methods if a transaction or Activity is resumed in a context different to that from which it was suspended. It is also raised when an attempted invocation is made that is incompatible with the Activity's current state.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INVALID_ACTIVITY()
      Constructs an INVALID_ACTIVITY exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      INVALID_ACTIVITY(int minorCode, CompletionStatus completionStatus)
      Constructs an INVALID_ACTIVITY exception with the specified minor code and completion status.
      INVALID_ACTIVITY(String detailMessage)
      Constructs an INVALID_ACTIVITY exception with the specified message.
      INVALID_ACTIVITY(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an INVALID_ACTIVITY exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INVALID_ACTIVITY

        public INVALID_ACTIVITY()
        Constructs an INVALID_ACTIVITY exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • INVALID_ACTIVITY

        public INVALID_ACTIVITY(String detailMessage)
        Constructs an INVALID_ACTIVITY exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • INVALID_ACTIVITY

        public INVALID_ACTIVITY(int minorCode,
                        CompletionStatus completionStatus)
        Constructs an INVALID_ACTIVITY exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • INVALID_ACTIVITY

        public INVALID_ACTIVITY(String detailMessage,
                        int minorCode,
                        CompletionStatus completionStatus)
        Constructs an INVALID_ACTIVITY exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INVALID_TRANSACTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INVALID_TRANSACTION

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INVALID_TRANSACTION
  • All Implemented Interfaces:
    Serializable

    public final class INVALID_TRANSACTION
extends SystemException
    Exception thrown when the request carried an invalid transaction context. For example, this exception could be raised if an error occurred when trying to register a resource.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INVALID_TRANSACTION()
      Constructs an INVALID_TRANSACTION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INVALID_TRANSACTION(int minor, CompletionStatus completed)
      Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
      INVALID_TRANSACTION(String s)
      Constructs an INVALID_TRANSACTION exception with the specified detail message.
      INVALID_TRANSACTION(String s, int minor, CompletionStatus completed)
      Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INVALID_TRANSACTION

        public INVALID_TRANSACTION()
        Constructs an INVALID_TRANSACTION exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INVALID_TRANSACTION

        public INVALID_TRANSACTION(String s)
        Constructs an INVALID_TRANSACTION exception with the specified detail message.
        Parameters:
        s - the String containing a detail message

      • INVALID_TRANSACTION

        public INVALID_TRANSACTION(int minor,
                           CompletionStatus completed)
        Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • INVALID_TRANSACTION

        public INVALID_TRANSACTION(String s,
                           int minor,
                           CompletionStatus completed)
        Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INV_FLAG

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INV_FLAG

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INV_FLAG
  • All Implemented Interfaces:
    Serializable

    public final class INV_FLAG
extends SystemException
    Exception thrown when an invalid flag was passed to an operation (for example, when creating a DII request).

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INV_FLAG()
      Constructs an INV_FLAG exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INV_FLAG(int minor, CompletionStatus completed)
      Constructs an INV_FLAG exception with the specified minor code and completion status.
      INV_FLAG(String s)
      Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      INV_FLAG(String s, int minor, CompletionStatus completed)
      Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INV_FLAG

        public INV_FLAG()
        Constructs an INV_FLAG exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INV_FLAG

        public INV_FLAG(String s)
        Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INV_FLAG

        public INV_FLAG(int minor,
                CompletionStatus completed)
        Constructs an INV_FLAG exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status

      • INV_FLAG

        public INV_FLAG(String s,
                int minor,
                CompletionStatus completed)
        Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - an instance of CompletionStatus indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INV_IDENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INV_IDENT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INV_IDENT
  • All Implemented Interfaces:
    Serializable

    public final class INV_IDENT
extends SystemException
    This exception indicates that an IDL identifier is syntactically invalid. It may be raised if, for example, an identifier passed to the interface repository does not conform to IDL identifier syntax, or if an illegal operation name is used with the DII.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INV_IDENT()
      Constructs an INV_IDENT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INV_IDENT(int minor, CompletionStatus completed)
      Constructs an INV_IDENT exception with the specified minor code and completion status.
      INV_IDENT(String s)
      Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      INV_IDENT(String s, int minor, CompletionStatus completed)
      Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INV_IDENT

        public INV_IDENT()
        Constructs an INV_IDENT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INV_IDENT

        public INV_IDENT(String s)
        Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INV_IDENT

        public INV_IDENT(int minor,
                 CompletionStatus completed)
        Constructs an INV_IDENT exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - a CompletionStatus object indicating the completion status

      • INV_IDENT

        public INV_IDENT(String s,
                 int minor,
                 CompletionStatus completed)
        Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - a CompletionStatus object indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INV_OBJREF

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INV_OBJREF

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INV_OBJREF
  • All Implemented Interfaces:
    Serializable

    public final class INV_OBJREF
extends SystemException
    This exception indicates that an object reference is internally malformed. For example, the repository ID may have incorrect syntax or the addressing information may be invalid. This exception is raised by ORB::string_to_object if the passed string does not decode correctly. An ORB may choose to detect calls via nil references (but is not obliged to do detect them). INV_OBJREF is used to indicate this.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INV_OBJREF()
      Constructs an INV_OBJREF exception with a default minor code of 0 and a completion state of COMPLETED_NO.
      INV_OBJREF(int minor, CompletionStatus completed)
      Constructs an INV_OBJREF exception with the specified minor code and completion status.
      INV_OBJREF(String s)
      Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
      INV_OBJREF(String s, int minor, CompletionStatus completed)
      Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INV_OBJREF

        public INV_OBJREF()
        Constructs an INV_OBJREF exception with a default minor code of 0 and a completion state of COMPLETED_NO.

      • INV_OBJREF

        public INV_OBJREF(String s)
        Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INV_OBJREF

        public INV_OBJREF(int minor,
                  CompletionStatus completed)
        Constructs an INV_OBJREF exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - a CompletionStatus instance indicating the completion status

      • INV_OBJREF

        public INV_OBJREF(String s,
                  int minor,
                  CompletionStatus completed)
        Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        s - the String containing a detail message
        minor - the minor code
        completed - a CompletionStatus instance indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INV_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class INV_POLICY

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.INV_POLICY
  • All Implemented Interfaces:
    Serializable

    public final class INV_POLICY
extends SystemException
    Standard exception thrown when an invocation cannot be made because of an incompatibility between Policy overrides that apply to the particular invocation. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      INV_POLICY()
      Constructs a INV_POLICY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      INV_POLICY(int minor, CompletionStatus completed)
      Constructs a INV_POLICY exception with the specified minor code and completion status.
      INV_POLICY(String s)
      Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      INV_POLICY(String s, int minor, CompletionStatus completed)
      Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • INV_POLICY

        public INV_POLICY()
        Constructs a INV_POLICY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • INV_POLICY

        public INV_POLICY(String s)
        Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • INV_POLICY

        public INV_POLICY(int minor,
                  CompletionStatus completed)
        Constructs a INV_POLICY exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • INV_POLICY

        public INV_POLICY(String s,
                  int minor,
                  CompletionStatus completed)
        Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IRObjectOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface IRObjectOperations

  • All Known Subinterfaces:
    IDLType, IDLTypeOperations, IRObject
    All Known Implementing Classes:
    _IDLTypeStub

    public interface IRObjectOperations
    This is the Operations interface for the mapping from IRObject. Several interfaces are used as base interfaces for objects in the Interface Repository (IR). These base interfaces are not instantiable. A common set of operations is used to locate objects within the Interface Repository. Some of these operations are defined in the IRObject. All IR objects inherit from the IRObject interface, which provides an operation for identifying the actual type of the object. (The IDL base interface IRObject represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.) All java implementations of IR objects must implement the IRObjectOperations interface.
    See Also:
    IDLTypeOperations, IDLType, IRObject

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DefinitionKind def_kind()
      Returns the DefinitionKind corresponding to this Interface Repository object.
      void destroy()
      Destroys this object.

    • Method Detail

      • def_kind

        DefinitionKind def_kind()
        Returns the DefinitionKind corresponding to this Interface Repository object.
        Returns:
        the DefinitionKind corresponding to this Interface Repository object.

      • destroy

        void destroy()
        Destroys this object. If the object is a Container, this method is applied to all its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed. If the method is invoked on a Repository or on a PrimitiveDef then the BAD_INV_ORDER exception is raised with minor value 2. An attempt to destroy an object that would leave the repository in an incoherent state causes BAD_INV_ORDER exception to be raised with the minor code 1.
        Throws:
        BAD_INV_ORDER - if this method is invoked on a repository or PrimitiveDef, or if an attempt to destroy an object would leave the repository in an incoherent state
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LocalObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LocalObject

  • java.lang.Object
    • org.omg.CORBA.LocalObject
  • All Implemented Interfaces:
    Object

    public class LocalObject
extends Object
implements Object

    Used as a base class for implementation of a local IDL interface in the Java language mapping. It is a class which implements all the operations in the org.omg.CORBA.Object interface.

    Local interfaces are implemented by using CORBA::LocalObject to provide implementations of Object pseudo operations and any other ORB-specific support mechanisms that are appropriate for such objects. Object implementation techniques are inherently language-mapping specific. Therefore, the LocalObject type is not defined in IDL, but is specified in each language mapping.

    Methods that do not apply to local objects throw an org.omg.CORBA.NO_IMPLEMENT exception with the message, "This is a locally contrained object." Attempting to use a LocalObject to create a DII request results in NO_IMPLEMENT system exception. Attempting to marshal or stringify a LocalObject results in a MARSHAL system exception. Narrowing and widening references to LocalObjects must work as for regular object references.

    LocalObject is to be used as the base class of locally constrained objects, such as those in the PortableServer module. The specification here is based on the CORBA Components Volume I - orbos/99-07-01

    See Also:
    CORBA package comments for unimplemented features

    • Constructor Summary

      Constructors
      Constructor and Description
      LocalObject()
      Constructs a default LocalObject instance.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Object _duplicate()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      DomainManager[] _get_domain_managers()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      Object _get_interface_def()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Object _get_interface()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      Policy _get_policy(int policy_type)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      int _hash(int maximum)
      Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum.
      InputStream _invoke(OutputStream output)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      boolean _is_a(String repository_id)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      boolean _is_equivalent(Object that)
      Determines whether the two object references are equivalent, so far as the ORB can easily determine.
      boolean _is_local()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      boolean _non_existent()
      Always returns false.
      ORB _orb()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      void _release()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      void _releaseReply(InputStream input)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Request _request(String operation)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      OutputStream _request(String operation, boolean responseExpected)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      void _servant_postinvoke(ServantObject servant)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      ServantObject _servant_preinvoke(String operation, Class expectedType)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Object _set_policy_override(Policy[] policies, SetOverrideType set_add)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
      boolean validate_connection()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • LocalObject

        public LocalObject()
        Constructs a default LocalObject instance.

    • Method Detail

      • _is_equivalent

        public boolean _is_equivalent(Object that)

        Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive.

        Default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _is_equivalent in interface Object
        Parameters:
        that - the object reference with which to check for equivalence
        Returns:
        true if this object reference is known to be equivalent to the given object reference. Note that false indicates only that the two object references are distinct, not necessarily that they reference distinct objects.

      • _non_existent

        public boolean _non_existent()
        Always returns false. This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _non_existent in interface Object
        Returns:
        false

      • _hash

        public int _hash(int maximum)
        Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum. This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _hash in interface Object
        Parameters:
        maximum - an int identifying maximum value of the hashcode
        Returns:
        this instance's hashcode

      • _is_a

        public boolean _is_a(String repository_id)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _is_a in interface Object
        Parameters:
        repository_id - a String
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _duplicate

        public Object _duplicate()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _duplicate in interface Object
        Returns:
        a duplicate of this LocalObject instance.
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _release

        public void _release()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _release in interface Object
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _request

        public Request _request(String operation)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _request in interface Object
        Parameters:
        operation - a String giving the name of an operation to be performed by the request that is returned
        Returns:
        a Request object with the given operation
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _create_request

        public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _create_request in interface Object
        Parameters:
        ctx - a Context object containing a list of properties
        operation - the String representing the name of the method to be invoked
        arg_list - an NVList containing the actual arguments to the method being invoked
        result - a NamedValue object to serve as a container for the method's return value
        Returns:
        a new Request object initialized with the given arguments
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _create_request

        public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result,
                               ExceptionList exceptions,
                               ContextList contexts)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _create_request in interface Object
        Parameters:
        ctx - a Context object containing a list of properties
        operation - the name of the method to be invoked
        arg_list - an NVList containing the actual arguments to the method being invoked
        result - a NamedValue object to serve as a container for the method's return value
        exceptions - an ExceptionList object containing a list of possible exceptions the method can throw
        contexts - a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
        Returns:
        the new Request object initialized with the given arguments
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _get_interface

        public Object _get_interface()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _get_interface_def

        public Object _get_interface_def()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _get_interface_def in interface Object
        Returns:
        the InterfaceDef object in the Interface Repository which provides type information about the object referred to by this object reference
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _orb

        public ORB _orb()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Returns:
        the ORB instance that created the Delegate contained in this ObjectImpl
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _get_policy

        public Policy _get_policy(int policy_type)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _get_policy in interface Object
        Parameters:
        policy_type - an int
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _get_domain_managers

        public DomainManager[] _get_domain_managers()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

        Specified by:
        _get_domain_managers in interface Object
        Returns:
        the list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _set_policy_override

        public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.
        Specified by:
        _set_policy_override in interface Object
        Parameters:
        policies - an array
        set_add - a flag
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _is_local

        public boolean _is_local()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Returns true for this LocalObject instance.

        Returns:
        true always
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _servant_preinvoke

        public ServantObject _servant_preinvoke(String operation,
                                        Class expectedType)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Parameters:
        operation - a String indicating which operation to preinvoke
        expectedType - the class of the type of operation mentioned above
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local object
        See Also:
        CORBA package comments for unimplemented features

      • _servant_postinvoke

        public void _servant_postinvoke(ServantObject servant)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Parameters:
        servant - the servant object on which to post-invoke
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • _request

        public OutputStream _request(String operation,
                             boolean responseExpected)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).

        Parameters:
        operation - the name of the operation being requested
        responseExpected - true if a response is expected, false if it is a one-way call
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _invoke

        public InputStream _invoke(OutputStream output)
                    throws ApplicationException,
                           RemarshalException
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        Called to invoke an operation. The stub provides an OutputStream that was previously returned by a _request() call. _invoke returns an InputStream which contains the marshaled reply. If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.

        Parameters:
        output - the OutputStream to invoke
        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        ApplicationException - If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
        RemarshalException - If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features

      • _releaseReply

        public void _releaseReply(InputStream input)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

        May optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. The stub passes the InputStream returned by _invoke() or ApplicationException.getInputStream(). A null value may also be passed to _releaseReply, in which case the method is a no-op.

        Parameters:
        input - the reply stream back to the ORB or null
        Throws:
        NO_IMPLEMENT
        See Also:
        CORBA package comments for unimplemented features

      • validate_connection

        public boolean validate_connection()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

        Returns:
        NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
        Throws:
        NO_IMPLEMENT - because this is a locally constrained object and this method does not apply to local objects
        See Also:
        CORBA package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LongHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LongHolder

  • java.lang.Object
    • org.omg.CORBA.LongHolder
  • All Implemented Interfaces:
    Streamable

    public final class LongHolder
extends Object
implements Streamable
    The Holder for Long. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL long long as an "out" or "inout" parameter, the programmer must pass an instance of LongHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myLongHolder is an instance of LongHolder, the value stored in its value field can be accessed with myLongHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      long value
      The long value held by this LongHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      LongHolder()
      Constructs a new LongHolder object with its value field initialized to 0.
      LongHolder(long initial)
      Constructs a new LongHolder object with its value field initialized to the given long.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode object corresponding to the value held in the Holder.
      void _write(OutputStream output)
      Marshals to output the value in the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public long value
        The long value held by this LongHolder object.

    • Constructor Detail

      • LongHolder

        public LongHolder()
        Constructs a new LongHolder object with its value field initialized to 0.

      • LongHolder

        public LongHolder(long initial)
        Constructs a new LongHolder object with its value field initialized to the given long.
        Parameters:
        initial - the long with which to initialize the value field of the newly-created LongHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Returns the TypeCode object corresponding to the value held in the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LongLongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LongLongSeqHelper

  • java.lang.Object
    • org.omg.CORBA.LongLongSeqHelper

  • public abstract class LongLongSeqHelper
extends Object
    The Helper for LongLongSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/LongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      LongLongSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static long[] | extract(Any a)
      static String | id()
      static void | insert(Any a, long[] that)
      static long[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, long[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • LongLongSeqHelper

        public LongLongSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          long[] that)

      • extract

        public static long[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static long[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         long[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LongLongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LongLongSeqHolder

  • java.lang.Object
    • org.omg.CORBA.LongLongSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class LongLongSeqHolder
extends Object
implements Streamable
    The Holder for LongLongSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      long[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      LongLongSeqHolder()
      LongLongSeqHolder(long[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public long[] value

    • Constructor Detail

      • LongLongSeqHolder

        public LongLongSeqHolder()

      • LongLongSeqHolder

        public LongLongSeqHolder(long[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LongSeqHelper

  • java.lang.Object
    • org.omg.CORBA.LongSeqHelper

  • public abstract class LongSeqHelper
extends Object
    The Helper for LongSeqHelper. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/LongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      LongSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int[] | extract(Any a)
      static String | id()
      static void | insert(Any a, int[] that)
      static int[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • LongSeqHelper

        public LongSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int[] that)

      • extract

        public static int[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class LongSeqHolder

  • java.lang.Object
    • org.omg.CORBA.LongSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class LongSeqHolder
extends Object
implements Streamable
    The Holder for LongSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      int[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      LongSeqHolder()
      LongSeqHolder(int[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public int[] value

    • Constructor Detail

      • LongSeqHolder

        public LongSeqHolder()

      • LongSeqHolder

        public LongSeqHolder(int[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MARSHAL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class MARSHAL

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.MARSHAL
  • All Implemented Interfaces:
    Serializable

    public final class MARSHAL
extends SystemException
    A request or reply from the network is structurally invalid. This error typically indicates a bug in either the client-side or server-side run time. For example, if a reply from the server indicates that the message contains 1000 bytes, but the actual message is shorter or longer than 1000 bytes, the ORB raises this exception. MARSHAL can also be caused by using the DII or DSI incorrectly, for example, if the type of the actual parameters sent does not agree with IDL signature of an operation.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    Since:
    JDK1.2

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      MARSHAL()
      Constructs a MARSHAL exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      MARSHAL(int minor, CompletionStatus completed)
      Constructs a MARSHAL exception with the specified minor code and completion status.
      MARSHAL(String s)
      Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      MARSHAL(String s, int minor, CompletionStatus completed)
      Constructs a MARSHAL exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • MARSHAL

        public MARSHAL()
        Constructs a MARSHAL exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • MARSHAL

        public MARSHAL(String s)
        Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description of the exception

      • MARSHAL

        public MARSHAL(int minor,
               CompletionStatus completed)
        Constructs a MARSHAL exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • MARSHAL

        public MARSHAL(String s,
               int minor,
               CompletionStatus completed)
        Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamedValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NamedValue

  • java.lang.Object
    • org.omg.CORBA.NamedValue

  • public abstract class NamedValue
extends Object
    An object used in the DII and DSI to describe arguments and return values. NamedValue objects are also used in the Context object routines to pass lists of property names and values.

    A NamedValue object contains:

    • a name -- If the NamedValue object is used to describe arguments to a request, the name will be an argument identifier specified in the OMG IDL interface definition for the operation being described.
    • a value -- an Any object
    • an argument mode flag -- one of the following:
      • ARG_IN.value
      • ARG_OUT.value
      • ARG_INOUT.value
      • zero -- if this NamedValue object represents a property in a Context object rather than a parameter or return value

    The class NamedValue has three methods, which access its fields. The following code fragment demonstrates creating a NamedValue object and then accessing its fields:

        ORB orb = ORB.init(args, null);
    String s = "argument_1";
    org.omg.CORBA.Any myAny = orb.create_any();
    myAny.insert_long(12345);
    int in = org.omg.CORBA.ARG_IN.value;

    org.omg.CORBA.NamedValue nv = orb.create_named_value(
        s, myAny, in);
    System.out.println("This nv name is " + nv.name());
    try {
        System.out.println("This nv value is " + nv.value().extract_long());
        System.out.println("This nv flag is " + nv.flags());
    } catch (org.omg.CORBA.BAD_OPERATION b) {
      System.out.println("extract failed");
    }

    If this code fragment were put into a main method, the output would be something like the following:

        This nv name is argument_1
    This nv value is 12345
    This nv flag is 1

    Note that the method value returns an Any object. In order to access the long contained in the Any object, we used the method extract_long.

    Since:
    JDK1.2
    See Also:
    Any, ARG_IN, ARG_INOUT, ARG_OUT

    • Constructor Summary

      Constructors
      Constructor and Description
      NamedValue()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract int flags()
      Retrieves the argument mode flag for this NamedValue object.
      abstract String name()
      Retrieves the name for this NamedValue object.
      abstract Any value()
      Retrieves the value for this NamedValue object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NamedValue

        public NamedValue()

    • Method Detail

      • name

        public abstract String name()
        Retrieves the name for this NamedValue object.
        Returns:
        a String object representing the name of this NamedValue object

      • value

        public abstract Any value()
        Retrieves the value for this NamedValue object.
        Returns:
        an Any object containing the value of this NamedValue object

      • flags

        public abstract int flags()
        Retrieves the argument mode flag for this NamedValue object.
        Returns:
        an int representing the argument mode for this NamedValue object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameValuePair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NameValuePair

  • java.lang.Object
    • org.omg.CORBA.NameValuePair
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NameValuePair
extends Object
implements IDLEntity
    Associates a name with a value that is an attribute of an IDL struct, and is used in the DynStruct APIs.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String id
      The name to be associated with a value by this NameValuePair object.
      Any value
      The value to be associated with a name by this NameValuePair object.

    • Constructor Summary

      Constructors
      Constructor and Description
      NameValuePair()
      Constructs an empty NameValuePair object.
      NameValuePair(String __id, Any __value)
      Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • id

        public String id
        The name to be associated with a value by this NameValuePair object.

      • value

        public Any value
        The value to be associated with a name by this NameValuePair object.

    • Constructor Detail

      • NameValuePair

        public NameValuePair()
        Constructs an empty NameValuePair object. To associate a name with a value after using this constructor, the fields of this object have to be accessed individually.

      • NameValuePair

        public NameValuePair(String __id,
                     Any __value)
        Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
        Parameters:
        __id - the name to be associated with the given Any object
        __value - the Any object to be associated with the given name
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameValuePairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NameValuePairHelper

  • java.lang.Object
    • org.omg.CORBA.NameValuePairHelper

  • public abstract class NameValuePairHelper
extends Object
    The Helper for NameValuePair. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/NameValuePairHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      NameValuePairHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameValuePair | extract(Any a)
      static String | id()
      static void | insert(Any a, NameValuePair that)
      static NameValuePair | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameValuePair value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameValuePairHelper

        public NameValuePairHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameValuePair that)

      • extract

        public static NameValuePair extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameValuePair read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameValuePair value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NO_IMPLEMENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NO_IMPLEMENT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.NO_IMPLEMENT
  • All Implemented Interfaces:
    Serializable

    public final class NO_IMPLEMENT
extends SystemException
    This exception indicates that even though the operation that was invoked exists (it has an IDL definition), no implementation for that operation exists. NO_IMPLEMENT can, for example, be raised by an ORB if a client asks for an object's type definition from the interface repository, but no interface repository is provided by the ORB.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    Since:
    JDK1.2

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      NO_IMPLEMENT()
      Constructs a NO_IMPLEMENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      NO_IMPLEMENT(int minor, CompletionStatus completed)
      Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
      NO_IMPLEMENT(String s)
      Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      NO_IMPLEMENT(String s, int minor, CompletionStatus completed)
      Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NO_IMPLEMENT

        public NO_IMPLEMENT()
        Constructs a NO_IMPLEMENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • NO_IMPLEMENT

        public NO_IMPLEMENT(String s)
        Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description of the exception

      • NO_IMPLEMENT

        public NO_IMPLEMENT(int minor,
                    CompletionStatus completed)
        Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
        Parameters:
        minor - an int specifying the minor code
        completed - a CompletionStatus instance indicating the completion status

      • NO_IMPLEMENT

        public NO_IMPLEMENT(String s,
                    int minor,
                    CompletionStatus completed)
        Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - an int specifying the minor code
        completed - a CompletionStatus instance indicating the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NO_MEMORY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NO_MEMORY

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.NO_MEMORY
  • All Implemented Interfaces:
    Serializable

    public final class NO_MEMORY
extends SystemException
    Exception thrown when the ORB run time has run out of memory.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      NO_MEMORY()
      Constructs a NO_MEMORY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      NO_MEMORY(int minor, CompletionStatus completed)
      Constructs a NO_MEMORY exception with the specified minor code and completion status.
      NO_MEMORY(String s)
      Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      NO_MEMORY(String s, int minor, CompletionStatus completed)
      Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NO_MEMORY

        public NO_MEMORY()
        Constructs a NO_MEMORY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • NO_MEMORY

        public NO_MEMORY(String s)
        Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • NO_MEMORY

        public NO_MEMORY(int minor,
                 CompletionStatus completed)
        Constructs a NO_MEMORY exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • NO_MEMORY

        public NO_MEMORY(String s,
                 int minor,
                 CompletionStatus completed)
        Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NO_PERMISSION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NO_PERMISSION

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.NO_PERMISSION
  • All Implemented Interfaces:
    Serializable

    public final class NO_PERMISSION
extends SystemException
    Exception thrown when an invocation failed because the caller has insufficient privileges.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      NO_PERMISSION()
      Constructs a NO_PERMISSION exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      NO_PERMISSION(int minor, CompletionStatus completed)
      Constructs a NO_PERMISSION exception with the specified minor code and completion status.
      NO_PERMISSION(String s)
      Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
      NO_PERMISSION(String s, int minor, CompletionStatus completed)
      Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NO_PERMISSION

        public NO_PERMISSION()
        Constructs a NO_PERMISSION exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • NO_PERMISSION

        public NO_PERMISSION(String s)
        Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • NO_PERMISSION

        public NO_PERMISSION(int minor,
                     CompletionStatus completed)
        Constructs a NO_PERMISSION exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • NO_PERMISSION

        public NO_PERMISSION(String s,
                     int minor,
                     CompletionStatus completed)
        Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NO_RESOURCES

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NO_RESOURCES

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.NO_RESOURCES
  • All Implemented Interfaces:
    Serializable

    public final class NO_RESOURCES
extends SystemException
    Exception thrown when the ORB has encountered some general resource limitation. For example, the run time may have reached the maximum permissible number of open connections.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      NO_RESOURCES()
      Constructs a NO_RESOURCES exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      NO_RESOURCES(int minor, CompletionStatus completed)
      Constructs a NO_RESOURCES exception with the specified minor code and completion status.
      NO_RESOURCES(String s)
      Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
      NO_RESOURCES(String s, int minor, CompletionStatus completed)
      Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NO_RESOURCES

        public NO_RESOURCES()
        Constructs a NO_RESOURCES exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • NO_RESOURCES

        public NO_RESOURCES(String s)
        Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • NO_RESOURCES

        public NO_RESOURCES(int minor,
                    CompletionStatus completed)
        Constructs a NO_RESOURCES exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • NO_RESOURCES

        public NO_RESOURCES(String s,
                    int minor,
                    CompletionStatus completed)
        Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NO_RESPONSE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NO_RESPONSE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.NO_RESPONSE
  • All Implemented Interfaces:
    Serializable

    public final class NO_RESPONSE
extends SystemException
    This exception is raised if a client attempts to retrieve the result of a deferred synchronous call, but the response for the request is not yet available.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      NO_RESPONSE()
      Constructs a NO_RESPONSE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      NO_RESPONSE(int minor, CompletionStatus completed)
      Constructs a NO_RESPONSE exception with the specified minor code and completion status.
      NO_RESPONSE(String s)
      Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      NO_RESPONSE(String s, int minor, CompletionStatus completed)
      Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NO_RESPONSE

        public NO_RESPONSE()
        Constructs a NO_RESPONSE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • NO_RESPONSE

        public NO_RESPONSE(String s)
        Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • NO_RESPONSE

        public NO_RESPONSE(int minor,
                   CompletionStatus completed)
        Constructs a NO_RESPONSE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • NO_RESPONSE

        public NO_RESPONSE(String s,
                   int minor,
                   CompletionStatus completed)
        Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NVList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class NVList

  • java.lang.Object
    • org.omg.CORBA.NVList

  • public abstract class NVList
extends Object
    A modifiable list containing NamedValue objects.

    The class NVList is used as follows:

    • to describe arguments for a Request object in the Dynamic Invocation Interface and the Dynamic Skeleton Interface
    • to describe context values in a Context object

    Each NamedValue object consists of the following:

    • a name, which is a String object
    • a value, as an Any object
    • an argument mode flag

    An NVList object may be created using one of the following ORB methods:

    1. org.omg.CORBA.ORB.create_list
          org.omg.CORBA.NVList nv = orb.create_list(3);
      The variable nv represents a newly-created NVList object. The argument is a memory-management hint to the orb and does not imply the actual length of the list. If, for example, you want to use an NVList object in a request, and the method being invoked takes three parameters, you might optimize by supplying 3 to the method create_list. Note that the new NVList will not necessarily have a length of 3; it could have a length of 2 or 4, for instance. Note also that you can add any number of NamedValue objects to this list regardless of its original length.

    2. org.omg.CORBA.ORB.create_operation_list
          org.omg.CORBA.NVList nv = orb.create_operation_list(myOperationDef);
      The variable nv represents a newly-created NVList object that contains descriptions of the arguments to the method described in the given OperationDef object.

    The methods in the class NVList all deal with the NamedValue objects in the list. There are three methods for adding a NamedValue object, a method for getting the count of NamedValue objects in the list, a method for retrieving a NamedValue object at a given index, and a method for removing a NamedValue object at a given index.

    Since:
    JDK1.2
    See Also:
    Request, ServerRequest, NamedValue, Context

    • Constructor Summary

      Constructors
      Constructor and Description
      NVList()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract NamedValue add_item(String item_name, int flags)
      Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
      abstract NamedValue add_value(String item_name, Any val, int flags)
      Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
      abstract NamedValue add(int flags)
      Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
      abstract int count()
      Returns the number of NamedValue objects that have been added to this NVList object.
      abstract NamedValue item(int index)
      Retrieves the NamedValue object at the given index.
      abstract void remove(int index)
      Removes the NamedValue object at the given index.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NVList

        public NVList()

    • Method Detail

      • count

        public abstract int count()
        Returns the number of NamedValue objects that have been added to this NVList object.
        Returns:
        an int indicating the number of NamedValue objects in this NVList.

      • add

        public abstract NamedValue add(int flags)
        Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
        Parameters:
        flags - one of the argument mode flags
        Returns:
        the newly-created NamedValue object

      • add_item

        public abstract NamedValue add_item(String item_name,
                                    int flags)
        Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
        Parameters:
        item_name - the name for the new NamedValue object
        flags - one of the argument mode flags
        Returns:
        the newly-created NamedValue object

      • add_value

        public abstract NamedValue add_value(String item_name,
                                     Any val,
                                     int flags)
        Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
        Parameters:
        item_name - the name for the new NamedValue object
        val - an Any object containing the value for the new NamedValue object
        flags - one of the following argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value
        Returns:
        the newly created NamedValue object

      • item

        public abstract NamedValue item(int index)
                         throws Bounds
        Retrieves the NamedValue object at the given index.
        Parameters:
        index - the index of the desired NamedValue object, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.
        Returns:
        the NamedValue object at the given index
        Throws:
        Bounds - if the index is greater than or equal to number of NamedValue objects

      • remove

        public abstract void remove(int index)
                     throws Bounds
        Removes the NamedValue object at the given index. Note that the indices of all NamedValue objects following the one removed are shifted down by one.
        Parameters:
        index - the index of the NamedValue object to be removed, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.
        Throws:
        Bounds - if the index is greater than or equal to number of NamedValue objects in the list
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Object

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface Object

  • All Known Subinterfaces:
    AdapterActivator, BindingIterator, ClientRequestInfo, ClientRequestInterceptor, Codec, CodecFactory, Current, Current, Current, DomainManager, DynAny, DynAny, DynAnyFactory, DynArray, DynArray, DynEnum, DynEnum, DynFixed, DynFixed, DynSequence, DynSequence, DynStruct, DynStruct, DynUnion, DynUnion, DynValue, DynValue, DynValueBox, DynValueCommon, IdAssignmentPolicy, IDLType, IdUniquenessPolicy, ImplicitActivationPolicy, Interceptor, IORInfo, IORInterceptor, IORInterceptor_3_0, IRObject, LifespanPolicy, NamingContext, NamingContextExt, ORBInitializer, ORBInitInfo, POA, POAManager, Policy, PolicyFactory, RequestInfo, RequestProcessingPolicy, RunTime, ServantActivator, ServantLocator, ServantManager, ServantRetentionPolicy, ServerRequestInfo, ServerRequestInterceptor, ThreadPolicy
    All Known Implementing Classes:
    _BindingIteratorImplBase, _BindingIteratorStub, _DynAnyFactoryStub, _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub, _IDLTypeStub, _NamingContextExtStub, _NamingContextImplBase, _NamingContextStub, _PolicyStub, _Remote_Stub, _ServantActivatorStub, _ServantLocatorStub, DynamicImplementation, LocalObject, ObjectImpl, ObjectImpl, Stub

    public interface Object
    The definition for a CORBA object reference.

    A CORBA object reference is a handle for a particular CORBA object implemented by a server. A CORBA object reference identifies the same CORBA object each time the reference is used to invoke a method on the object. A CORBA object may have multiple, distinct object references.

    The org.omg.CORBA.Object interface is the root of the inheritance hierarchy for all CORBA object references in the Java programming language, analogous to java.rmi.Remote for RMI remote objects.

    A CORBA object may be either local or remote. If it is a local object (that is, running in the same VM as the client), invocations may be directly serviced by the object instance, and the object reference could point to the actual instance of the object implementation class. If a CORBA object is a remote object (that is, running in a different VM from the client), the object reference points to a stub (proxy) which uses the ORB machinery to make a remote invocation on the server where the object implementation resides.

    Default implementations of the methods in the interface org.omg.CORBA.Object are provided in the class org.omg.CORBA.portable.ObjectImpl, which is the base class for stubs and object implementations.

    See Also:
    ObjectImpl

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
      Object _duplicate()
      Returns a duplicate of this CORBA object reference.
      DomainManager[] _get_domain_managers()
      Retrieves the DomainManagers of this object.
      Object _get_interface_def()
      Obtains an InterfaceDef for the object implementation referenced by this object reference.
      Policy _get_policy(int policy_type)
      Returns the Policy object of the specified type which applies to this object.
      int _hash(int maximum)
      Returns an ORB-internal identifier for this object reference.
      boolean _is_a(String repositoryIdentifier)
      Checks whether this object is an instance of a class that implements the given interface.
      boolean _is_equivalent(Object other)
      Determines whether the two object references are equivalent, so far as the ORB can easily determine.
      boolean _non_existent()
      Determines whether the server object for this object reference has been destroyed.
      void _release()
      Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released.
      Request _request(String operation)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      Object _set_policy_override(Policy[] policies, SetOverrideType set_add)
      Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.

    • Method Detail

      • _is_a

        boolean _is_a(String repositoryIdentifier)
        Checks whether this object is an instance of a class that implements the given interface.
        Parameters:
        repositoryIdentifier - the interface to check against
        Returns:
        true if this object reference is an instance of a class that implements the interface; false otherwise

      • _is_equivalent

        boolean _is_equivalent(Object other)
        Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive.
        Parameters:
        other - the other object reference with which to check for equivalence
        Returns:
        true if this object reference is known to be equivalent to the given object reference. Note that false indicates only that the two object references are distinct, not necessarily that they reference distinct objects.

      • _non_existent

        boolean _non_existent()
        Determines whether the server object for this object reference has been destroyed.
        Returns:
        true if the ORB knows authoritatively that the server object does not exist; false otherwise

      • _hash

        int _hash(int maximum)
        Returns an ORB-internal identifier for this object reference. This is a hash identifier, which does not change during the lifetime of the object reference, and so neither will any hash function of that identifier change. The value returned is not guaranteed to be unique; in other words, another object reference may have the same hash value. If two object references hash differently, then they are distinct object references; however, both may still refer to the same CORBA object.
        Parameters:
        maximum - the upper bound on the hash value returned by the ORB
        Returns:
        the ORB-internal hash identifier for this object reference

      • _duplicate

        Object _duplicate()
        Returns a duplicate of this CORBA object reference. The server object implementation is not involved in creating the duplicate, and the implementation cannot distinguish whether the original object reference or a duplicate was used to make a request.

        Note that this method is not very useful in the Java platform, since memory management is handled by the VM. It is included for compliance with the CORBA APIs.

        The method _duplicate may return this object reference itself.

        Returns:
        a duplicate of this object reference or this object reference itself

      • _release

        void _release()
        Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released. Note that the object implementation is not involved in this operation, and other references to the same object are not affected.

      • _get_interface_def

        Object _get_interface_def()
        Obtains an InterfaceDef for the object implementation referenced by this object reference. The InterfaceDef object may be used to introspect on the methods, attributes, and other type information for the object referred to by this object reference.
        Returns:
        the InterfaceDef object in the Interface Repository which provides type information about the object referred to by this object reference

      • _request

        Request _request(String operation)
        Creates a Request instance for use in the Dynamic Invocation Interface.
        Parameters:
        operation - the name of the method to be invoked using the Request instance
        Returns:
        the newly-created Request instance

      • _create_request

        Request _create_request(Context ctx,
                        String operation,
                        NVList arg_list,
                        NamedValue result)
        Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
        Parameters:
        ctx - a Context object containing a list of properties
        operation - the name of the method to be invoked
        arg_list - an NVList containing the actual arguments to the method being invoked
        result - a NamedValue object to serve as a container for the method's return value
        Returns:
        the newly-created Request object
        See Also:
        Request, NVList, NamedValue

      • _create_request

        Request _create_request(Context ctx,
                        String operation,
                        NVList arg_list,
                        NamedValue result,
                        ExceptionList exclist,
                        ContextList ctxlist)
        Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
        Parameters:
        ctx - a Context object containing a list of properties
        operation - the name of the method to be invoked
        arg_list - an NVList containing the actual arguments to the method being invoked
        result - a NamedValue object to serve as a container for the method's return value
        exclist - an ExceptionList object containing a list of possible exceptions the method can throw
        ctxlist - a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
        Returns:
        the newly-created Request object
        See Also:
        Request, NVList, NamedValue, ExceptionList, ContextList

      • _get_policy

        Policy _get_policy(int policy_type)
        Returns the Policy object of the specified type which applies to this object.
        Parameters:
        policy_type - the type of policy to be obtained
        Returns:
        A Policy object of the type specified by the policy_type parameter
        Throws:
        BAD_PARAM - when the value of policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object

      • _get_domain_managers

        DomainManager[] _get_domain_managers()
        Retrieves the DomainManagers of this object. This allows administration services (and applications) to retrieve the domain managers, and hence the security and other policies applicable to individual objects that are members of the domain.
        Returns:
        the list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.

      • _set_policy_override

        Object _set_policy_override(Policy[] policies,
                            SetOverrideType set_add)
        Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
        Parameters:
        policies - an array of Policy objects containing the policies to be added or to be used as replacements
        set_add - either SetOverrideType.SET_OVERRIDE, indicating that the given policies will replace any existing ones, or SetOverrideType.ADD_OVERRIDE, indicating that the given policies should be added to any existing ones
        Returns:
        a new Object with the given policies replacing or added to those in this Object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ObjectHelper

  • java.lang.Object
    • org.omg.CORBA.ObjectHelper

  • public abstract class ObjectHelper
extends Object

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Object | extract(Any a)
      static String | id()
      static void | insert(Any a, Object that)
      static Object | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Object value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectHelper

        public ObjectHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Object that)

      • extract

        public static Object extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Object read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Object value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ObjectHolder

  • java.lang.Object
    • org.omg.CORBA.ObjectHolder
  • All Implemented Interfaces:
    Streamable

    public final class ObjectHolder
extends Object
implements Streamable
    The Holder for Object. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object). It is usually used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has a CORBA Object reference as an "out" or "inout" parameter, the programmer must pass an instance of ObjectHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myObjectHolder is an instance of ObjectHolder, the value stored in its value field can be accessed with myObjectHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Object value
      The Object value held by this ObjectHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectHolder()
      Constructs a new ObjectHolder object with its value field initialized to null.
      ObjectHolder(Object initial)
      Constructs a new ObjectHolder object with its value field initialized to the given Object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode corresponding to the value held in this ObjectHolder object
      void _write(OutputStream output)
      Marshals to output the value in this ObjectHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Object value
        The Object value held by this ObjectHolder object.

    • Constructor Detail

      • ObjectHolder

        public ObjectHolder()
        Constructs a new ObjectHolder object with its value field initialized to null.

      • ObjectHolder

        public ObjectHolder(Object initial)
        Constructs a new ObjectHolder object with its value field initialized to the given Object.
        Parameters:
        initial - the Object with which to initialize the value field of the newly-created ObjectHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire.

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this ObjectHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data.

      • _type

        public TypeCode _type()
        Returns the TypeCode corresponding to the value held in this ObjectHolder object
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this ObjectHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OBJECT_NOT_EXIST

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class OBJECT_NOT_EXIST

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.OBJECT_NOT_EXIST
  • All Implemented Interfaces:
    Serializable

    public final class OBJECT_NOT_EXIST
extends SystemException
    Exception raised whenever an invocation on a deleted object was performed. It is an authoritative "hard" fault report. Anyone receiving it is allowed (even expected) to delete all copies of this object reference and to perform other appropriate "final recovery" style procedures. Bridges forward this exception to clients, also destroying any records they may hold (for example, proxy objects used in reference translation). The clients could in turn purge any of their own data structures.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      OBJECT_NOT_EXIST()
      Constructs an OBJECT_NOT_EXIST exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      OBJECT_NOT_EXIST(int minor, CompletionStatus completed)
      Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
      OBJECT_NOT_EXIST(String s)
      Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
      OBJECT_NOT_EXIST(String s, int minor, CompletionStatus completed)
      Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • OBJECT_NOT_EXIST

        public OBJECT_NOT_EXIST()
        Constructs an OBJECT_NOT_EXIST exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • OBJECT_NOT_EXIST

        public OBJECT_NOT_EXIST(String s)
        Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • OBJECT_NOT_EXIST

        public OBJECT_NOT_EXIST(int minor,
                        CompletionStatus completed)
        Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • OBJECT_NOT_EXIST

        public OBJECT_NOT_EXIST(String s,
                        int minor,
                        CompletionStatus completed)
        Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OBJ_ADAPTER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class OBJ_ADAPTER

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.OBJ_ADAPTER
  • All Implemented Interfaces:
    Serializable

    public final class OBJ_ADAPTER
extends SystemException
    This exception typically indicates an administrative mismatch, for example, a server may have made an attempt to register itself with an implementation repository under a name that is already in use, or is unknown to the repository.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    Since:
    JDK1.2
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      OBJ_ADAPTER()
      Constructs an OBJ_ADAPTER exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      OBJ_ADAPTER(int minor, CompletionStatus completed)
      Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
      OBJ_ADAPTER(String s)
      Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
      OBJ_ADAPTER(String s, int minor, CompletionStatus completed)
      Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • OBJ_ADAPTER

        public OBJ_ADAPTER()
        Constructs an OBJ_ADAPTER exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • OBJ_ADAPTER

        public OBJ_ADAPTER(String s)
        Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a description message

      • OBJ_ADAPTER

        public OBJ_ADAPTER(int minor,
                   CompletionStatus completed)
        Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • OBJ_ADAPTER

        public OBJ_ADAPTER(String s,
                   int minor,
                   CompletionStatus completed)
        Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OctetSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class OctetSeqHelper

  • java.lang.Object
    • org.omg.CORBA.OctetSeqHelper

  • public abstract class OctetSeqHelper
extends Object
    The Helper for OctetSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/OctetSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      OctetSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static byte[] | extract(Any a)
      static String | id()
      static void | insert(Any a, byte[] that)
      static byte[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, byte[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • OctetSeqHelper

        public OctetSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          byte[] that)

      • extract

        public static byte[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static byte[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         byte[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OctetSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class OctetSeqHolder

  • java.lang.Object
    • org.omg.CORBA.OctetSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class OctetSeqHolder
extends Object
implements Streamable
    The Holder for OctetSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      byte[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      OctetSeqHolder()
      OctetSeqHolder(byte[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public byte[] value

    • Constructor Detail

      • OctetSeqHolder

        public OctetSeqHolder()

      • OctetSeqHolder

        public OctetSeqHolder(byte[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OMGVMCID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface OMGVMCID

  • public interface OMGVMCID
    The vendor minor code ID reserved for OMG. Minor codes for the standard exceptions are prefaced by the VMCID assigned to OMG, defined as the constant OMGVMCID, which, like all VMCIDs, occupies the high order 20 bits.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The vendor minor code ID reserved for OMG.

    • Field Detail

      • value

        static final int value
        The vendor minor code ID reserved for OMG. This value is or'd with the high order 20 bits of the minor code to produce the minor value in a system exception.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ORB

  • java.lang.Object
    • org.omg.CORBA.ORB
  • Direct Known Subclasses:
    ORB

    public abstract class ORB
extends Object
    A class providing APIs for the CORBA Object Request Broker features. The ORB class also provides "pluggable ORB implementation" APIs that allow another vendor's ORB implementation to be used.

    An ORB makes it possible for CORBA objects to communicate with each other by connecting objects making requests (clients) with objects servicing requests (servers).

    The ORB class, which encapsulates generic CORBA functionality, does the following: (Note that items 5 and 6, which include most of the methods in the class ORB, are typically used with the Dynamic Invocation Interface (DII) and the Dynamic Skeleton Interface (DSI). These interfaces may be used by a developer directly, but most commonly they are used by the ORB internally and are not seen by the general programmer.)

    1. initializes the ORB implementation by supplying values for predefined properties and environmental parameters
    2. obtains initial object references to services such as the NameService using the method resolve_initial_references
    3. converts object references to strings and back
    4. connects the ORB to a servant (an instance of a CORBA object implementation) and disconnects the ORB from a servant
    5. creates objects such as
      • TypeCode
      • Any
      • NamedValue
      • Context
      • Environment
      • lists (such as NVList) containing these objects
    6. sends multiple messages in the DII

    The ORB class can be used to obtain references to objects implemented anywhere on the network.

    An application or applet gains access to the CORBA environment by initializing itself into an ORB using one of three init methods. Two of the three methods use the properties (associations of a name with a value) shown in the table below.
    Property Name | Property Value
    Standard Java CORBA Properties:
    org.omg.CORBA.ORBClass | class name of an ORB implementation
    org.omg.CORBA.ORBSingletonClass | class name of the ORB returned by init()

    These properties allow a different vendor's ORB implementation to be "plugged in."

    When an ORB instance is being created, the class name of the ORB implementation is located using the following standard search order:

    1. check in Applet parameter or application string array, if any
    2. check in properties parameter, if any
    3. check in the System properties
    4. check in the orb.properties file located in the user.home directory (if any)
    5. check in the orb.properties file located in the java.home/lib directory (if any)
    6. fall back on a hardcoded default behavior (use the Java IDL implementation)

    Note that Java IDL provides a default implementation for the fully-functional ORB and for the Singleton ORB. When the method init is given no parameters, the default Singleton ORB is returned. When the method init is given parameters but no ORB class is specified, the Java IDL ORB implementation is returned.

    The following code fragment creates an ORB object initialized with the default ORB Singleton. This ORB has a restricted implementation to prevent malicious applets from doing anything beyond creating typecodes. It is called a singleton because there is only one instance for an entire virtual machine.

        ORB orb = ORB.init();

    The following code fragment creates an ORB object for an application. The parameter args represents the arguments supplied to the application's main method. Since the property specifies the ORB class to be "SomeORBImplementation", the new ORB will be initialized with that ORB implementation. If p had been null, and the arguments had not specified an ORB class, the new ORB would have been initialized with the default Java IDL implementation.

        Properties p = new Properties();
    p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation");
    ORB orb = ORB.init(args, p);

    The following code fragment creates an ORB object for the applet supplied as the first parameter. If the given applet does not specify an ORB class, the new ORB will be initialized with the default Java IDL implementation.

        ORB orb = ORB.init(myApplet, null);

    An application or applet can be initialized in one or more ORBs. ORB initialization is a bootstrap call into the CORBA world.

    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      ORB()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void connect(Object obj)
      Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.
      TypeCode create_abstract_interface_tc(String id, String name)
      Create a TypeCode object for an IDL abstract interface.
      abstract TypeCode create_alias_tc(String id, String name, TypeCode original_type)
      Creates a TypeCode object representing an IDL alias (typedef).
      abstract Any create_any()
      Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
      abstract TypeCode create_array_tc(int length, TypeCode element_type)
      Creates a TypeCode object representing an IDL array.
      DynAny create_basic_dyn_any(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      abstract ContextList create_context_list()
      Creates an empty ContextList object.
      DynAny create_dyn_any(Any value)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynArray create_dyn_array(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynEnum create_dyn_enum(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynSequence create_dyn_sequence(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynStruct create_dyn_struct(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynUnion create_dyn_union(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      abstract TypeCode create_enum_tc(String id, String name, String[] members)
      Creates a TypeCode object representing an IDL enum.
      abstract Environment create_environment()
      Creates an Environment object.
      abstract ExceptionList create_exception_list()
      Creates an empty ExceptionList object.
      abstract TypeCode create_exception_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL exception.
      TypeCode create_fixed_tc(short digits, short scale)
      Create a TypeCode object for an IDL fixed type.
      abstract TypeCode create_interface_tc(String id, String name)
      Creates a TypeCode object representing an IDL interface.
      abstract NVList create_list(int count)
      Allocates an NVList with (probably) enough space for the specified number of NamedValue objects.
      abstract NamedValue create_named_value(String s, Any any, int flags)
      Creates a NamedValue object using the given name, value, and argument mode flags.
      TypeCode create_native_tc(String id, String name)
      Create a TypeCode object for an IDL native type.
      NVList create_operation_list(Object oper)
      Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
      abstract OutputStream create_output_stream()
      Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
      Policy create_policy(int type, Any val)
      Can be invoked to create new instances of policy objects of a specific type with specified initial state.
      abstract TypeCode create_recursive_sequence_tc(int bound, int offset)
      Deprecated.
      Use a combination of create_recursive_tc and create_sequence_tc instead
      TypeCode create_recursive_tc(String id)
      Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
      abstract TypeCode create_sequence_tc(int bound, TypeCode element_type)
      Creates a TypeCode object representing an IDL sequence.
      abstract TypeCode create_string_tc(int bound)
      Creates a TypeCode object representing a bounded IDL string.
      abstract TypeCode create_struct_tc(String id, String name, StructMember[] members)
      Creates a TypeCode object representing an IDL struct.
      abstract TypeCode create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members)
      Creates a TypeCode object representing an IDL union.
      TypeCode create_value_box_tc(String id, String name, TypeCode boxed_type)
      Creates a TypeCode object for an IDL value box.
      TypeCode create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
      Create a TypeCode object for an IDL value type.
      abstract TypeCode create_wstring_tc(int bound)
      Creates a TypeCode object representing a bounded IDL wstring (wide string).
      void destroy()
      Destroys the ORB so that its resources can be reclaimed.
      void disconnect(Object obj)
      Disconnects the given servant object from the ORB.
      Current get_current()
      Deprecated.
      use resolve_initial_references.
      abstract Context get_default_context()
      Gets the default Context object.
      abstract Request get_next_response()
      Gets the next Request instance for which a response has been received.
      abstract TypeCode get_primitive_tc(TCKind tcKind)
      Retrieves the TypeCode object that represents the given primitive IDL type.
      boolean get_service_information(short service_type, ServiceInformationHolder service_info)
      Used to obtain information about CORBA facilities and services that are supported by this ORB.
      static ORB init()
      Returns the ORB singleton object.
      static ORB init(Applet app, Properties props)
      Creates a new ORB instance for an applet.
      static ORB init(String[] args, Properties props)
      Creates a new ORB instance for a standalone application.
      abstract String[] list_initial_services()
      Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
      abstract String object_to_string(Object obj)
      Converts the given CORBA object reference to a string.
      void perform_work()
      Performs an implementation-dependent unit of work if called by the main thread.
      abstract boolean poll_next_response()
      Finds out if any of the deferred (asynchronous) invocations have a response yet.
      abstract Object resolve_initial_references(String object_name)
      Resolves a specific object reference from the set of available initial service names.
      void run()
      This operation blocks the current thread until the ORB has completed the shutdown process, initiated when some thread calls shutdown.
      abstract void send_multiple_requests_deferred(Request[] req)
      Sends multiple dynamic (DII) requests asynchronously.
      abstract void send_multiple_requests_oneway(Request[] req)
      Sends multiple dynamic (DII) requests asynchronously without expecting any responses.
      protected abstract void set_parameters(Applet app, Properties props)
      Allows the ORB implementation to be initialized with the given applet and parameters.
      protected abstract void set_parameters(String[] args, Properties props)
      Allows the ORB implementation to be initialized with the given parameters and properties.
      void shutdown(boolean wait_for_completion)
      Instructs the ORB to shut down, which causes all object adapters to shut down, in preparation for destruction.
      If the wait_for_completion parameter is true, this operation blocks until all ORB processing (including processing of currently executing requests, object deactivation, and other object adapter operations) has completed.
      abstract Object string_to_object(String str)
      Converts a string produced by the method object_to_string back to a CORBA object reference.
      boolean work_pending()
      Returns true if the ORB needs the main thread to perform some work, and false if the ORB does not need the main thread.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ORB

        public ORB()

    • Method Detail

      • init

        public static ORB init()
        Returns the ORB singleton object. This method always returns the same ORB instance, which is an instance of the class described by the org.omg.CORBA.ORBSingletonClass system property.

        This no-argument version of the method init is used primarily as a factory for TypeCode objects, which are used by Helper classes to implement the method type. It is also used to create Any objects that are used to describe union labels (as part of creating a TypeCode object for a union).

        This method is not intended to be used by applets, and in the event that it is called in an applet environment, the ORB it returns is restricted so that it can be used only as a factory for TypeCode objects. Any TypeCode objects it produces can be safely shared among untrusted applets.

        If an ORB is created using this method from an applet, a system exception will be thrown if methods other than those for creating TypeCode objects are invoked.

        Returns:
        the singleton ORB

      • init

        public static ORB init(String[] args,
                       Properties props)
        Creates a new ORB instance for a standalone application. This method may be called from applications only and returns a new fully functional ORB object each time it is called.
        Parameters:
        args - command-line arguments for the application's main method; may be null
        props - application-specific properties; may be null
        Returns:
        the newly-created ORB instance

      • init

        public static ORB init(Applet app,
                       Properties props)
        Creates a new ORB instance for an applet. This method may be called from applets only and returns a new fully-functional ORB object each time it is called.
        Parameters:
        app - the applet; may be null
        props - applet-specific properties; may be null
        Returns:
        the newly-created ORB instance

      • set_parameters

        protected abstract void set_parameters(String[] args,
                                       Properties props)
        Allows the ORB implementation to be initialized with the given parameters and properties. This method, used in applications only, is implemented by subclass ORB implementations and called by the appropriate init method to pass in its parameters.
        Parameters:
        args - command-line arguments for the application's main method; may be null
        props - application-specific properties; may be null

      • set_parameters

        protected abstract void set_parameters(Applet app,
                                       Properties props)
        Allows the ORB implementation to be initialized with the given applet and parameters. This method, used in applets only, is implemented by subclass ORB implementations and called by the appropriate init method to pass in its parameters.
        Parameters:
        app - the applet; may be null
        props - applet-specific properties; may be null

      • connect

        public void connect(Object obj)
        Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB. The servant class must extend the ImplBase class corresponding to the interface that is supported by the server. The servant must thus be a CORBA object reference, and inherit from org.omg.CORBA.Object. Servants created by the user can start receiving remote invocations after the method connect has been called. A servant may also be automatically and implicitly connected to the ORB if it is passed as an IDL parameter in an IDL method invocation on a non-local object, that is, if the servant object has to be marshalled and sent outside of the process address space.

        Calling the method connect has no effect when the servant object is already connected to the ORB.

        Deprecated by the OMG in favor of the Portable Object Adapter APIs.

        Parameters:
        obj - The servant object reference

      • destroy

        public void destroy()
        Destroys the ORB so that its resources can be reclaimed. Any operation invoked on a destroyed ORB reference will throw the OBJECT_NOT_EXIST exception. Once an ORB has been destroyed, another call to init with the same ORBid will return a reference to a newly constructed ORB.

        If destroy is called on an ORB that has not been shut down, it will start the shut down process and block until the ORB has shut down before it destroys the ORB.
        If an application calls destroy in a thread that is currently servicing an invocation, the BAD_INV_ORDER system exception will be thrown with the OMG minor code 3, since blocking would result in a deadlock.

        For maximum portability and to avoid resource leaks, an application should always call shutdown and destroy on all ORB instances before exiting.

        Throws:
        BAD_INV_ORDER - if the current thread is servicing an invocation

      • disconnect

        public void disconnect(Object obj)
        Disconnects the given servant object from the ORB. After this method returns, the ORB will reject incoming remote requests for the disconnected servant and will send the exception org.omg.CORBA.OBJECT_NOT_EXIST back to the remote client. Thus the object appears to be destroyed from the point of view of remote clients. Note, however, that local requests issued using the servant directly do not pass through the ORB; hence, they will continue to be processed by the servant.

        Calling the method disconnect has no effect if the servant is not connected to the ORB.

        Deprecated by the OMG in favor of the Portable Object Adapter APIs.

        Parameters:
        obj - The servant object to be disconnected from the ORB

      • list_initial_services

        public abstract String[] list_initial_services()
        Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
        Returns:
        an array of String objects that represent the object references for CORBA services that are initially available with this ORB

      • resolve_initial_references

        public abstract Object resolve_initial_references(String object_name)
                                           throws InvalidName
        Resolves a specific object reference from the set of available initial service names.
        Parameters:
        object_name - the name of the initial service as a string
        Returns:
        the object reference associated with the given name
        Throws:
        InvalidName - if the given name is not associated with a known service

      • object_to_string

        public abstract String object_to_string(Object obj)
        Converts the given CORBA object reference to a string. Note that the format of this string is predefined by IIOP, allowing strings generated by a different ORB to be converted back into an object reference.

        The resulting String object may be stored or communicated in any way that a String object can be manipulated.

        Parameters:
        obj - the object reference to stringify
        Returns:
        the string representing the object reference

      • string_to_object

        public abstract Object string_to_object(String str)
        Converts a string produced by the method object_to_string back to a CORBA object reference.
        Parameters:
        str - the string to be converted back to an object reference. It must be the result of converting an object reference to a string using the method object_to_string.
        Returns:
        the object reference

      • create_list

        public abstract NVList create_list(int count)
        Allocates an NVList with (probably) enough space for the specified number of NamedValue objects. Note that the specified size is only a hint to help with storage allocation and does not imply the maximum size of the list.
        Parameters:
        count - suggested number of NamedValue objects for which to allocate space
        Returns:
        the newly-created NVList
        See Also:
        NVList

      • create_operation_list

        public NVList create_operation_list(Object oper)
        Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object. This OperationDef object is obtained from an Interface Repository. The arguments in the returned NVList object are in the same order as in the original IDL operation definition, which makes it possible for the list to be used in dynamic invocation requests.
        Parameters:
        oper - the OperationDef object to use to create the list
        Returns:
        a newly-created NVList object containing descriptions of the arguments to the method described in the given OperationDef object
        See Also:
        NVList

      • create_named_value

        public abstract NamedValue create_named_value(String s,
                                              Any any,
                                              int flags)
        Creates a NamedValue object using the given name, value, and argument mode flags.

        A NamedValue object serves as (1) a parameter or return value or (2) a context property. It may be used by itself or as an element in an NVList object.

        Parameters:
        s - the name of the NamedValue object
        any - the Any value to be inserted into the NamedValue object
        flags - the argument mode flags for the NamedValue: one of ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
        Returns:
        the newly-created NamedValue object
        See Also:
        NamedValue

      • create_exception_list

        public abstract ExceptionList create_exception_list()
        Creates an empty ExceptionList object.
        Returns:
        the newly-created ExceptionList object

      • create_context_list

        public abstract ContextList create_context_list()
        Creates an empty ContextList object.
        Returns:
        the newly-created ContextList object
        See Also:
        ContextList, Context

      • get_default_context

        public abstract Context get_default_context()
        Gets the default Context object.
        Returns:
        the default Context object
        See Also:
        Context

      • create_environment

        public abstract Environment create_environment()
        Creates an Environment object.
        Returns:
        the newly-created Environment object
        See Also:
        Environment

      • create_output_stream

        public abstract OutputStream create_output_stream()
        Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
        Returns:
        the newly-created org.omg.CORBA.portable.OutputStream object

      • send_multiple_requests_oneway

        public abstract void send_multiple_requests_oneway(Request[] req)
        Sends multiple dynamic (DII) requests asynchronously without expecting any responses. Note that oneway invocations are not guaranteed to reach the server.
        Parameters:
        req - an array of request objects

      • send_multiple_requests_deferred

        public abstract void send_multiple_requests_deferred(Request[] req)
        Sends multiple dynamic (DII) requests asynchronously.
        Parameters:
        req - an array of Request objects

      • poll_next_response

        public abstract boolean poll_next_response()
        Finds out if any of the deferred (asynchronous) invocations have a response yet.
        Returns:
        true if there is a response available; false otherwise

      • get_next_response

        public abstract Request get_next_response()
                                   throws WrongTransaction
        Gets the next Request instance for which a response has been received.
        Returns:
        the next Request object ready with a response
        Throws:
        WrongTransaction - if the method get_next_response is called from a transaction scope different from the one from which the original request was sent. See the OMG Transaction Service specification for details.

      • get_primitive_tc

        public abstract TypeCode get_primitive_tc(TCKind tcKind)
        Retrieves the TypeCode object that represents the given primitive IDL type.
        Parameters:
        tcKind - the TCKind instance corresponding to the desired primitive type
        Returns:
        the requested TypeCode object

      • create_struct_tc

        public abstract TypeCode create_struct_tc(String id,
                                          String name,
                                          StructMember[] members)
        Creates a TypeCode object representing an IDL struct. The TypeCode object is initialized with the given id, name, and members.
        Parameters:
        id - the repository id for the struct
        name - the name of the struct
        members - an array describing the members of the struct
        Returns:
        a newly-created TypeCode object describing an IDL struct

      • create_union_tc

        public abstract TypeCode create_union_tc(String id,
                                         String name,
                                         TypeCode discriminator_type,
                                         UnionMember[] members)
        Creates a TypeCode object representing an IDL union. The TypeCode object is initialized with the given id, name, discriminator type, and members.
        Parameters:
        id - the repository id of the union
        name - the name of the union
        discriminator_type - the type of the union discriminator
        members - an array describing the members of the union
        Returns:
        a newly-created TypeCode object describing an IDL union

      • create_enum_tc

        public abstract TypeCode create_enum_tc(String id,
                                        String name,
                                        String[] members)
        Creates a TypeCode object representing an IDL enum. The TypeCode object is initialized with the given id, name, and members.
        Parameters:
        id - the repository id for the enum
        name - the name for the enum
        members - an array describing the members of the enum
        Returns:
        a newly-created TypeCode object describing an IDL enum

      • create_alias_tc

        public abstract TypeCode create_alias_tc(String id,
                                         String name,
                                         TypeCode original_type)
        Creates a TypeCode object representing an IDL alias (typedef). The TypeCode object is initialized with the given id, name, and original type.
        Parameters:
        id - the repository id for the alias
        name - the name for the alias
        original_type - the TypeCode object describing the original type for which this is an alias
        Returns:
        a newly-created TypeCode object describing an IDL alias

      • create_exception_tc

        public abstract TypeCode create_exception_tc(String id,
                                             String name,
                                             StructMember[] members)
        Creates a TypeCode object representing an IDL exception. The TypeCode object is initialized with the given id, name, and members.
        Parameters:
        id - the repository id for the exception
        name - the name for the exception
        members - an array describing the members of the exception
        Returns:
        a newly-created TypeCode object describing an IDL exception

      • create_interface_tc

        public abstract TypeCode create_interface_tc(String id,
                                             String name)
        Creates a TypeCode object representing an IDL interface. The TypeCode object is initialized with the given id and name.
        Parameters:
        id - the repository id for the interface
        name - the name for the interface
        Returns:
        a newly-created TypeCode object describing an IDL interface

      • create_string_tc

        public abstract TypeCode create_string_tc(int bound)
        Creates a TypeCode object representing a bounded IDL string. The TypeCode object is initialized with the given bound, which represents the maximum length of the string. Zero indicates that the string described by this type code is unbounded.
        Parameters:
        bound - the bound for the string; cannot be negative
        Returns:
        a newly-created TypeCode object describing a bounded IDL string
        Throws:
        BAD_PARAM - if bound is a negative value

      • create_wstring_tc

        public abstract TypeCode create_wstring_tc(int bound)
        Creates a TypeCode object representing a bounded IDL wstring (wide string). The TypeCode object is initialized with the given bound, which represents the maximum length of the wide string. Zero indicates that the string described by this type code is unbounded.
        Parameters:
        bound - the bound for the wstring; cannot be negative
        Returns:
        a newly-created TypeCode object describing a bounded IDL wstring
        Throws:
        BAD_PARAM - if bound is a negative value

      • create_sequence_tc

        public abstract TypeCode create_sequence_tc(int bound,
                                            TypeCode element_type)
        Creates a TypeCode object representing an IDL sequence. The TypeCode object is initialized with the given bound and element type.
        Parameters:
        bound - the bound for the sequence, 0 if unbounded
        element_type - the TypeCode object describing the elements contained in the sequence
        Returns:
        a newly-created TypeCode object describing an IDL sequence

      • create_recursive_sequence_tc

        @Deprecated
public abstract TypeCode create_recursive_sequence_tc(int bound,
                                                                  int offset)
        Deprecated. Use a combination of create_recursive_tc and create_sequence_tc instead
        Creates a TypeCode object representing a a recursive IDL sequence.

        For the IDL struct Node in following code fragment, the offset parameter for creating its sequence would be 1:

            Struct Node {
        long value;
        Sequence <Node> subnodes;
    };
        Parameters:
        bound - the bound for the sequence, 0 if unbounded
        offset - the index to the enclosing TypeCode object that describes the elements of this sequence
        Returns:
        a newly-created TypeCode object describing a recursive sequence
        See Also:
        create_recursive_tc, create_sequence_tc

      • create_array_tc

        public abstract TypeCode create_array_tc(int length,
                                         TypeCode element_type)
        Creates a TypeCode object representing an IDL array. The TypeCode object is initialized with the given length and element type.
        Parameters:
        length - the length of the array
        element_type - a TypeCode object describing the type of element contained in the array
        Returns:
        a newly-created TypeCode object describing an IDL array

      • create_native_tc

        public TypeCode create_native_tc(String id,
                                 String name)
        Create a TypeCode object for an IDL native type.
        Parameters:
        id - the logical id for the native type.
        name - the name of the native type.
        Returns:
        the requested TypeCode.

      • create_abstract_interface_tc

        public TypeCode create_abstract_interface_tc(String id,
                                             String name)
        Create a TypeCode object for an IDL abstract interface.
        Parameters:
        id - the logical id for the abstract interface type.
        name - the name of the abstract interface type.
        Returns:
        the requested TypeCode.

      • create_fixed_tc

        public TypeCode create_fixed_tc(short digits,
                                short scale)
        Create a TypeCode object for an IDL fixed type.
        Parameters:
        digits - specifies the total number of decimal digits in the number and must be from 1 to 31 inclusive.
        scale - specifies the position of the decimal point.
        Returns:
        the requested TypeCode.

      • create_value_tc

        public TypeCode create_value_tc(String id,
                                String name,
                                short type_modifier,
                                TypeCode concrete_base,
                                ValueMember[] members)
        Create a TypeCode object for an IDL value type. The concrete_base parameter is the TypeCode for the immediate concrete valuetype base of the valuetype for which the TypeCode is being created. It may be null if the valuetype does not have a concrete base.
        Parameters:
        id - the logical id for the value type.
        name - the name of the value type.
        type_modifier - one of the value type modifier constants: VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE
        concrete_base - a TypeCode object describing the concrete valuetype base
        members - an array containing the members of the value type
        Returns:
        the requested TypeCode

      • create_recursive_tc

        public TypeCode create_recursive_tc(String id)
        Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion. The id parameter specifies the repository id of the type for which the recursive TypeCode is serving as a placeholder. Once the recursive TypeCode has been properly embedded in the enclosing TypeCode which corresponds to the specified repository id, it will function as a normal TypeCode. Invoking operations on the recursive TypeCode before it has been embedded in the enclosing TypeCode will result in a BAD_TYPECODE exception.

        For example, the following IDL type declaration contains recursion:

            Struct Node {
        Sequence<Node> subnodes;
    };

        To create a TypeCode for struct Node, you would invoke the TypeCode creation operations as shown below:

         String nodeID = "IDL:Node:1.0";
 TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID));
 StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) };
 TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);

        Also note that the following is an illegal IDL type declaration:

            Struct Node {
        Node next;
    };

        Recursive types can only appear within sequences which can be empty. That way marshaling problems, when transmitting the struct in an Any, are avoided.

        Parameters:
        id - the logical id of the referenced type
        Returns:
        the requested TypeCode

      • create_value_box_tc

        public TypeCode create_value_box_tc(String id,
                                    String name,
                                    TypeCode boxed_type)
        Creates a TypeCode object for an IDL value box.
        Parameters:
        id - the logical id for the value type
        name - the name of the value type
        boxed_type - the TypeCode for the type
        Returns:
        the requested TypeCode

      • create_any

        public abstract Any create_any()
        Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
        Returns:
        a newly-created Any object

      • get_current

        @Deprecated
public Current get_current()
        Deprecated. use resolve_initial_references.
        Retrieves a Current object. The Current interface is used to manage thread-specific information for use by services such as transactions and security.
        Returns:
        a newly-created Current object
        See Also:
        CORBA package comments for unimplemented features

      • run

        public void run()
        This operation blocks the current thread until the ORB has completed the shutdown process, initiated when some thread calls shutdown. It may be used by multiple threads which get all notified when the ORB shuts down.

      • shutdown

        public void shutdown(boolean wait_for_completion)
        Instructs the ORB to shut down, which causes all object adapters to shut down, in preparation for destruction.
        If the wait_for_completion parameter is true, this operation blocks until all ORB processing (including processing of currently executing requests, object deactivation, and other object adapter operations) has completed. If an application does this in a thread that is currently servicing an invocation, the BAD_INV_ORDER system exception will be thrown with the OMG minor code 3, since blocking would result in a deadlock.
        If the wait_for_completion parameter is FALSE, then shutdown may not have completed upon return.

        While the ORB is in the process of shutting down, the ORB operates as normal, servicing incoming and outgoing requests until all requests have been completed. Once an ORB has shutdown, only object reference management operations may be invoked on the ORB or any object reference obtained from it. An application may also invoke the destroy operation on the ORB itself. Invoking any other operation will throw the BAD_INV_ORDER system exception with the OMG minor code 4.

        The ORB.run method will return after shutdown has been called.

        Parameters:
        wait_for_completion - true if the call should block until the shutdown is complete; false if it should return immediately
        Throws:
        BAD_INV_ORDER - if the current thread is servicing an invocation

      • work_pending

        public boolean work_pending()
        Returns true if the ORB needs the main thread to perform some work, and false if the ORB does not need the main thread.
        Returns:
        true if there is work pending, meaning that the ORB needs the main thread to perform some work; false if there is no work pending and thus the ORB does not need the main thread

      • perform_work

        public void perform_work()
        Performs an implementation-dependent unit of work if called by the main thread. Otherwise it does nothing. The methods work_pending and perform_work can be used in conjunction to implement a simple polling loop that multiplexes the main thread among the ORB and other activities.

      • get_service_information

        public boolean get_service_information(short service_type,
                                       ServiceInformationHolder service_info)
        Used to obtain information about CORBA facilities and services that are supported by this ORB. The service type for which information is being requested is passed in as the in parameter service_type, the values defined by constants in the CORBA module. If service information is available for that type, that is returned in the out parameter service_info, and the operation returns the value true. If no information for the requested services type is available, the operation returns false (i.e., the service is not supported by this ORB).

        Parameters:
        service_type - a short indicating the service type for which information is being requested
        service_info - a ServiceInformationHolder object that will hold the ServiceInformation object produced by this method
        Returns:
        true if service information is available for the service_type; false if no information for the requested services type is available
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_any

        @Deprecated
public DynAny create_dyn_any(Any value)
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynAny object from the given Any object.

        Parameters:
        value - the Any object from which to create a new DynAny object
        Returns:
        the new DynAny object created from the given Any object
        See Also:
        CORBA package comments for unimplemented features

      • create_basic_dyn_any

        @Deprecated
public DynAny create_basic_dyn_any(TypeCode type)
                                        throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a basic DynAny object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynAny object
        Returns:
        the new DynAny object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_struct

        @Deprecated
public DynStruct create_dyn_struct(TypeCode type)
                                        throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynStruct object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynStruct object
        Returns:
        the new DynStruct object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_sequence

        @Deprecated
public DynSequence create_dyn_sequence(TypeCode type)
                                            throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynSequence object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynSequence object
        Returns:
        the new DynSequence object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_array

        @Deprecated
public DynArray create_dyn_array(TypeCode type)
                                      throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynArray object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynArray object
        Returns:
        the new DynArray object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_union

        @Deprecated
public DynUnion create_dyn_union(TypeCode type)
                                      throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynUnion object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynUnion object
        Returns:
        the new DynUnion object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_dyn_enum

        @Deprecated
public DynEnum create_dyn_enum(TypeCode type)
                                    throws InconsistentTypeCode
        Deprecated. Use the new DynAnyFactory API instead
        Creates a new DynEnum object from the given TypeCode object.

        Parameters:
        type - the TypeCode object from which to create a new DynEnum object
        Returns:
        the new DynEnum object created from the given TypeCode object
        Throws:
        InconsistentTypeCode - if the given TypeCode object is not consistent with the operation.
        See Also:
        CORBA package comments for unimplemented features

      • create_policy

        public Policy create_policy(int type,
                            Any val)
                     throws PolicyError
        Can be invoked to create new instances of policy objects of a specific type with specified initial state. If create_policy fails to instantiate a new Policy object due to its inability to interpret the requested type and content of the policy, it raises the PolicyError exception with the appropriate reason.
        Parameters:
        type - the PolicyType of the policy object to be created
        val - the value that will be used to set the initial state of the Policy object that is created
        Returns:
        Reference to a newly created Policy object of type specified by the type parameter and initialized to a state specified by the val parameter
        Throws:
        org.omg.CORBA.PolicyError - when the requested policy is not supported or a requested initial state for the policy is not supported.
        PolicyError
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA.ORBPackage

Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.

See: Description

  • Exception Summary
    Exception Description
    InconsistentTypeCode
    InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
    InvalidName
    The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Package org.omg.CORBA.ORBPackage Description

Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.

Related Documentation

For an overview, please see:
  • comments on the CORBA package
Since:
JDK1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA.ORBPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA.ORBPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CORBA.ORBPackage.InconsistentTypeCode
          • org.omg.CORBA.ORBPackage.InvalidName
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA.ORBPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA.ORBPackage

  • Packages that use org.omg.CORBA.ORBPackage
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
  • Classes in org.omg.CORBA.ORBPackage used by org.omg.CORBA
    Class and Description
    InconsistentTypeCode
    InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
    InvalidName
    The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ORBPackage.InconsistentTypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ORBPackage.InconsistentTypeCode

  • Packages that use InconsistentTypeCode
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of InconsistentTypeCode in org.omg.CORBA

      Methods in org.omg.CORBA that throw InconsistentTypeCode
      Modifier and Type Method and Description
      DynAny ORB.create_basic_dyn_any(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynArray ORB.create_dyn_array(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynEnum ORB.create_dyn_enum(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynSequence ORB.create_dyn_sequence(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynStruct ORB.create_dyn_struct(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
      DynUnion ORB.create_dyn_union(TypeCode type)
      Deprecated.
      Use the new DynAnyFactory API instead
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.ORBPackage.InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.ORBPackage.InvalidName

  • Packages that use InvalidName
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of InvalidName in org.omg.CORBA

      Methods in org.omg.CORBA that throw InvalidName
      Modifier and Type Method and Description
      abstract Object ORB.resolve_initial_references(String object_name)
      Resolves a specific object reference from the set of available initial service names.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InconsistentTypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.ORBPackage

Class InconsistentTypeCode

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.ORBPackage.InconsistentTypeCode
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InconsistentTypeCode
extends UserException
    InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.

    • Constructor Summary

      Constructors
      Constructor and Description
      InconsistentTypeCode()
      Constructs an InconsistentTypeCode user exception with no reason message.
      InconsistentTypeCode(String reason)
      Constructs an InconsistentTypeCode user exception with the specified reason message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InconsistentTypeCode

        public InconsistentTypeCode()
        Constructs an InconsistentTypeCode user exception with no reason message.

      • InconsistentTypeCode

        public InconsistentTypeCode(String reason)
        Constructs an InconsistentTypeCode user exception with the specified reason message.
        Parameters:
        reason - The String containing a reason message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.ORBPackage

Class InvalidName

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.ORBPackage.InvalidName
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidName
extends UserException
    The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.
    Since:
    JDK1.2
    See Also:
    ORB.resolve_initial_references(String)

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidName()
      Constructs an InvalidName exception with no reason message.
      InvalidName(String reason)
      Constructs an InvalidName exception with the specified reason message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidName

        public InvalidName()
        Constructs an InvalidName exception with no reason message.

      • InvalidName

        public InvalidName(String reason)
        Constructs an InvalidName exception with the specified reason message.
        Parameters:
        reason - the String containing a reason message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParameterMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ParameterMode

  • java.lang.Object
    • org.omg.CORBA.ParameterMode
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class ParameterMode
extends Object
implements IDLEntity
    Enumeration of parameter modes for Parameter. Possible vaues:
    • PARAM_IN - Represents an "in" parameter.
    • PARAM_OUT - Represents an "out" parameter.
    • PARAM_INOUT - Represents an "inout" parameter.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _PARAM_IN
      static int | _PARAM_INOUT
      static int | _PARAM_OUT
      static ParameterMode | PARAM_IN
      static ParameterMode | PARAM_INOUT
      static ParameterMode | PARAM_OUT

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | ParameterMode(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static ParameterMode | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _PARAM_IN

        public static final int _PARAM_IN
        See Also:
        Constant Field Values

      • PARAM_IN

        public static final ParameterMode PARAM_IN

      • _PARAM_OUT

        public static final int _PARAM_OUT
        See Also:
        Constant Field Values

      • PARAM_OUT

        public static final ParameterMode PARAM_OUT

      • _PARAM_INOUT

        public static final int _PARAM_INOUT
        See Also:
        Constant Field Values

      • PARAM_INOUT

        public static final ParameterMode PARAM_INOUT

    • Constructor Detail

      • ParameterMode

        protected ParameterMode(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static ParameterMode from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParameterModeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ParameterModeHelper

  • java.lang.Object
    • org.omg.CORBA.ParameterModeHelper

  • public abstract class ParameterModeHelper
extends Object
    Enumeration of parameter modes for Parameter. Possible vaues:
    • PARAM_IN - Represents an "in" parameter.
    • PARAM_OUT - Represents an "out" parameter.
    • PARAM_INOUT - Represents an "inout" parameter.

    • Constructor Summary

      Constructors
      Constructor and Description
      ParameterModeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ParameterMode | extract(Any a)
      static String | id()
      static void | insert(Any a, ParameterMode that)
      static ParameterMode | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ParameterMode value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ParameterModeHelper

        public ParameterModeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ParameterMode that)

      • extract

        public static ParameterMode extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ParameterMode read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ParameterMode value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParameterModeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ParameterModeHolder

  • java.lang.Object
    • org.omg.CORBA.ParameterModeHolder
  • All Implemented Interfaces:
    Streamable

    public final class ParameterModeHolder
extends Object
implements Streamable
    Enumeration of parameter modes for Parameter. Possible vaues:
    • PARAM_IN - Represents an "in" parameter.
    • PARAM_OUT - Represents an "out" parameter.
    • PARAM_INOUT - Represents an "inout" parameter.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ParameterMode value

    • Constructor Summary

      Constructors
      Constructor and Description
      ParameterModeHolder()
      ParameterModeHolder(ParameterMode initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ParameterMode value

    • Constructor Detail

      • ParameterModeHolder

        public ParameterModeHolder()

      • ParameterModeHolder

        public ParameterModeHolder(ParameterMode initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PERSIST_STORE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PERSIST_STORE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.PERSIST_STORE
  • All Implemented Interfaces:
    Serializable

    public final class PERSIST_STORE
extends SystemException
    This exception indicates a persistent storage failure, for example, failure to establish a database connection or corruption of a database.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      PERSIST_STORE()
      Constructs a PERSIST_STORE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      PERSIST_STORE(int minor, CompletionStatus completed)
      Constructs a PERSIST_STORE exception with the specified minor code and completion status.
      PERSIST_STORE(String s)
      Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      PERSIST_STORE(String s, int minor, CompletionStatus completed)
      Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • PERSIST_STORE

        public PERSIST_STORE()
        Constructs a PERSIST_STORE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • PERSIST_STORE

        public PERSIST_STORE(String s)
        Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • PERSIST_STORE

        public PERSIST_STORE(int minor,
                     CompletionStatus completed)
        Constructs a PERSIST_STORE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • PERSIST_STORE

        public PERSIST_STORE(String s,
                     int minor,
                     CompletionStatus completed)
        Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyError

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.PolicyError
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class PolicyError
extends UserException
    A user exception thrown when a policy error occurs. A PolicyError exception may include one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      short reason
      The reason for the PolicyError exception being thrown.

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyError()
      Constructs a default PolicyError user exception with no reason code and an empty reason detail message.
      PolicyError(short __reason)
      Constructs a PolicyError user exception initialized with the given reason code and an empty reason detail message.
      PolicyError(String reason_string, short __reason)
      Constructs a PolicyError user exception initialized with the given reason detail message and reason code.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • reason

        public short reason
        The reason for the PolicyError exception being thrown.

    • Constructor Detail

      • PolicyError

        public PolicyError()
        Constructs a default PolicyError user exception with no reason code and an empty reason detail message.

      • PolicyError

        public PolicyError(short __reason)
        Constructs a PolicyError user exception initialized with the given reason code and an empty reason detail message.
        Parameters:
        __reason - the reason code.

      • PolicyError

        public PolicyError(String reason_string,
                   short __reason)
        Constructs a PolicyError user exception initialized with the given reason detail message and reason code.
        Parameters:
        reason_string - the reason detail message.
        __reason - the reason code.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyErrorCodeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyErrorCodeHelper

  • java.lang.Object
    • org.omg.CORBA.PolicyErrorCodeHelper

  • public abstract class PolicyErrorCodeHelper
extends Object
    Encapsulates a reason a Policy may be invalid.
    See Also:
    PolicyError

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyErrorCodeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short | extract(Any a)
      static String | id()
      static void | insert(Any a, short that)
      static short | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • PolicyErrorCodeHelper

        public PolicyErrorCodeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short that)

      • extract

        public static short extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyErrorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyErrorHelper

  • java.lang.Object
    • org.omg.CORBA.PolicyErrorHelper

  • public abstract class PolicyErrorHelper
extends Object
    Thrown to indicate problems with parameter values passed to the ORB.create_policy operation.

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyErrorHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static PolicyError | extract(Any a)
      static String | id()
      static void | insert(Any a, PolicyError that)
      static PolicyError | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, PolicyError value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • PolicyErrorHelper

        public PolicyErrorHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          PolicyError that)

      • extract

        public static PolicyError extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static PolicyError read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         PolicyError value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyErrorHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyErrorHolder

  • java.lang.Object
    • org.omg.CORBA.PolicyErrorHolder
  • All Implemented Interfaces:
    Streamable

    public final class PolicyErrorHolder
extends Object
implements Streamable
    Thrown to indicate problems with parameter values passed to the ORB.create_policy operation.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      PolicyError value

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyErrorHolder()
      PolicyErrorHolder(PolicyError initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public PolicyError value

    • Constructor Detail

      • PolicyErrorHolder

        public PolicyErrorHolder()

      • PolicyErrorHolder

        public PolicyErrorHolder(PolicyError initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyHelper

  • java.lang.Object
    • org.omg.CORBA.PolicyHelper

  • public abstract class PolicyHelper
extends Object
    The Helper for Policy. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/PolicyHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Policy | extract(Any a)
      static String | id()
      static void | insert(Any a, Policy that)
      static Policy | narrow(Object obj)
      static Policy | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Policy value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • PolicyHelper

        public PolicyHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Policy that)

      • extract

        public static Policy extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Policy read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Policy value)

      • narrow

        public static Policy narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyHolder

  • java.lang.Object
    • org.omg.CORBA.PolicyHolder
  • All Implemented Interfaces:
    Streamable

    public final class PolicyHolder
extends Object
implements Streamable
    The Holder for Policy. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Policy value

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyHolder()
      PolicyHolder(Policy initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Policy value

    • Constructor Detail

      • PolicyHolder

        public PolicyHolder()

      • PolicyHolder

        public PolicyHolder(Policy initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyListHelper

  • java.lang.Object
    • org.omg.CORBA.PolicyListHelper

  • public abstract class PolicyListHelper
extends Object
    The Helper for PolicyList. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/PolicyListHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyListHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Policy[] | extract(Any a)
      static String | id()
      static void | insert(Any a, Policy[] that)
      static Policy[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Policy[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • PolicyListHelper

        public PolicyListHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Policy[] that)

      • extract

        public static Policy[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Policy[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Policy[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyListHolder

  • java.lang.Object
    • org.omg.CORBA.PolicyListHolder
  • All Implemented Interfaces:
    Streamable

    public final class PolicyListHolder
extends Object
implements Streamable
    The Holder for PolicyList. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Policy[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyListHolder()
      PolicyListHolder(Policy[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Policy[] value

    • Constructor Detail

      • PolicyListHolder

        public PolicyListHolder()

      • PolicyListHolder

        public PolicyListHolder(Policy[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface PolicyOperations

  • All Known Subinterfaces:
    IdAssignmentPolicy, IdAssignmentPolicyOperations, IdUniquenessPolicy, IdUniquenessPolicyOperations, ImplicitActivationPolicy, ImplicitActivationPolicyOperations, LifespanPolicy, LifespanPolicyOperations, Policy, RequestProcessingPolicy, RequestProcessingPolicyOperations, ServantRetentionPolicy, ServantRetentionPolicyOperations, ThreadPolicy, ThreadPolicyOperations
    All Known Implementing Classes:
    _PolicyStub

    public interface PolicyOperations
    Provides the operations for a Policy object.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Policy copy()
      Returns a copy of the Policy object.
      void destroy()
      Destroys the Policy object.
      int policy_type()
      Returns the constant value that corresponds to the type of the policy object.

    • Method Detail

      • policy_type

        int policy_type()
        Returns the constant value that corresponds to the type of the policy object. The values of the policy objects are allocated by the OMG. New values for PolicyType should be obtained from the OMG by sending mail to request@omg.org. In general the constant values that are allocated are defined in conjunction with the definition of the corresponding policy object.
        Returns:
        the constant value that corresponds to the type of the policy object

      • copy

        Policy copy()
        Returns a copy of the Policy object. The copy does not retain any relationships that the policy had with any domain or object.
        Returns:
        a copy of the Policy object

      • destroy

        void destroy()
        Destroys the Policy object. It is the responsibility of the Policy object to determine whether it can be destroyed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PolicyTypeHelper

  • java.lang.Object
    • org.omg.CORBA.PolicyTypeHelper

  • public abstract class PolicyTypeHelper
extends Object
    The Helper for PolicyType. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/PolicyTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      PolicyTypeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int | extract(Any a)
      static String | id()
      static void | insert(Any a, int that)
      static int | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • PolicyTypeHelper

        public PolicyTypeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int that)

      • extract

        public static int extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA.portable

Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

See: Description

  • Interface Summary
    Interface Description
    BoxedValueHelper
    CustomValue
    An extension of ValueBase that is implemented by custom value types.
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InvokeHandler
    This interface provides a dispatching mechanism for an incoming call.
    ResponseHandler
    This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
    Streamable
    The base class for the Holder classess of all complex IDL types.
    StreamableValue
    Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
    ValueBase
    The generated Java classes corresponding to valuetype IDL types implement this interface.
    ValueFactory
    The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory.
    ValueInputStream
    Java to IDL ptc 02-01-12 1.5.1.4 ValueInputStream is used for implementing RMI-IIOP stream format version 2.
    ValueOutputStream
    Java to IDL ptc 02-01-12 1.5.1.3 ValueOutputStream is used for implementing RMI-IIOP stream format version 2.
  • Class Summary
    Class Description
    Delegate
    Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    ServantObject
    This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
  • Exception Summary
    Exception Description
    ApplicationException
    This class is used for reporting application level exceptions between ORBs and stubs.
    IndirectionException
    The Indirection exception is a Java specific system exception.
    RemarshalException
    This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
    UnknownException
    The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Package org.omg.CORBA.portable Description

Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB. Stubs and other code, generated either from IDL or interfaces written in the Java programming language, can call into these ORB APIs.

CORBA Features Throwing NO_IMPLEMENT() Exceptions

Some methods throw NO_IMPLEMENT() exceptions by default, but ORB vendors can override them to provide real implementations. The ORB included in Sun's release of the Java[tm] Platform, Standard Edition 6, includes implementations for the following methods.

List of Unimplemented Features in Package org.omg.CORBA.portable

Unimplemented Interfaces in package org.omg.CORBA.portable

  • InvokeHandler
  • ResponseHandler

Unimplemented Methods in package org.omg.CORBA.portable

  • InputStream
    • public int read()
    • public.math.BigDecimal read_fixed()
    • public org.omg.CORBA.Context read_Context()
    • public org.omg.CORBA.Object read_Object(java.lang.Class clz)
    • public org.omg.CORBA.ORB orb()
  • OutputStream
    • public org.omg.CORBA.ORB orb()
    • public void write_Context(org.omg.CORBA.Context ctx, org.omg.CORBA.ContextList contexts)
    • public void write_fixed(java.math.BigDecimal value)
    • public void write(int b)
  • Delegate
    • public void releaseReply(org.omg.CORBA.Object self, InputStream input)
    • public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    • public OutputStream request(org.omg.CORBA.Object self, String operation, boolean responseExpected)
    • public org.omg.CORBA.Object set_policy_override(org.omg.CORBA.Object self, org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)
    • public org.omg.CORBA.DomainManager[] get_domain_managers( org.omg.CORBA.Object self)
    • public org.omg.CORBA.Policy get_policy(org.omg.CORBA.Object self, int policy_type)
Since:
JDK1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CustomValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface CustomValue

  • All Superinterfaces:
    CustomMarshal, IDLEntity, Serializable, ValueBase

    public interface CustomValue
extends ValueBase, CustomMarshal
    An extension of ValueBase that is implemented by custom value types.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids

      • Methods inherited from interface org.omg.CORBA.CustomMarshal

        marshal, unmarshal
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IDLEntity

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface IDLEntity

  • All Superinterfaces:
    Serializable
    All Known Subinterfaces:
    AdapterActivator, BindingIterator, ClientRequestInfo, ClientRequestInterceptor, Codec, CodecFactory, Current, Current, Current, CustomValue, DataInputStream, DataOutputStream, DomainManager, DynAny, DynAnyFactory, DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue, DynValueBox, DynValueCommon, IdAssignmentPolicy, IDLType, IdUniquenessPolicy, ImplicitActivationPolicy, Interceptor, IORInfo, IORInterceptor, IORInterceptor_3_0, IRObject, LifespanPolicy, NamingContext, NamingContextExt, ObjectReferenceFactory, ObjectReferenceTemplate, ORBInitializer, ORBInitInfo, POA, POAManager, Policy, PolicyFactory, RequestInfo, RequestProcessingPolicy, RunTime, ServantActivator, ServantLocator, ServantManager, ServantRetentionPolicy, ServerRequestInfo, ServerRequestInterceptor, StreamableValue, ThreadPolicy, ValueBase
    All Known Implementing Classes:
    _BindingIteratorImplBase, _BindingIteratorStub, _DynAnyFactoryStub, _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub, _IDLTypeStub, _NamingContextExtStub, _NamingContextImplBase, _NamingContextStub, _PolicyStub, _ServantActivatorStub, _ServantLocatorStub, AdapterAlreadyExists, AdapterInactive, AdapterNonExistent, AlreadyBound, Any, BadKind, Binding, BindingType, Bounds, Bounds, CannotProceed, CompletionStatus, DefinitionKind, DuplicateName, Encoding, FormatMismatch, ForwardRequest, ForwardRequest, IdAssignmentPolicyValue, IdUniquenessPolicyValue, ImplicitActivationPolicyValue, InconsistentTypeCode, InconsistentTypeCode, Invalid, InvalidAddress, InvalidName, InvalidName, InvalidName, InvalidPolicy, InvalidSeq, InvalidSlot, InvalidTypeForEncoding, InvalidValue, InvalidValue, IOR, LifespanPolicyValue, NameComponent, NameDynAnyPair, NameValuePair, NameValuePair, NoContext, NoServant, NotEmpty, NotFound, NotFoundReason, ObjectAlreadyActive, ObjectNotActive, Parameter, ParameterMode, PolicyError, RequestProcessingPolicyValue, ServantAlreadyActive, ServantNotActive, ServantRetentionPolicyValue, ServiceContext, ServiceDetail, ServiceInformation, SetOverrideType, State, StructMember, TaggedComponent, TaggedProfile, ThreadPolicyValue, TypeCode, TypeMismatch, TypeMismatch, TypeMismatch, UnionMember, UnknownEncoding, UnknownUserException, UserException, ValueMember, WrongAdapter, WrongPolicy, WrongTransaction

    public interface IDLEntity
extends Serializable
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class. RMI IIOP serialization looks for such a marker to perform marshalling/unmarshalling.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA.portable Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA.portable

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CORBA.portable.Delegate
    • java.io.InputStream (implements java.io.Closeable)
      • org.omg.CORBA.portable.InputStream
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
    • java.io.OutputStream (implements java.io.Closeable, java.io.Flushable)
      • org.omg.CORBA.portable.OutputStream
    • org.omg.CORBA.portable.ServantObject
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.portable.ApplicationException
        • org.omg.CORBA.portable.RemarshalException
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.portable.IndirectionException
            • org.omg.CORBA.portable.UnknownException

Interface Hierarchy

  • org.omg.CORBA.portable.BoxedValueHelper
  • org.omg.CORBA.CustomMarshal
    • org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.portable.ValueBase)
  • org.omg.CORBA.portable.InvokeHandler
  • org.omg.CORBA.portable.ResponseHandler
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.CORBA.portable.ValueBase
        • org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.CustomMarshal)
        • org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.Streamable)
  • org.omg.CORBA.portable.Streamable
    • org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.ValueBase)
  • org.omg.CORBA.portable.ValueFactory
  • org.omg.CORBA.portable.ValueInputStream
  • org.omg.CORBA.portable.ValueOutputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StreamableValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface StreamableValue

  • All Superinterfaces:
    IDLEntity, Serializable, Streamable, ValueBase

    public interface StreamableValue
extends Streamable, ValueBase
    Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled. All value types implement ValueBase either directly or indirectly by implementing either the StreamableValue or CustomValue interface.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.portable.Streamable

        _read, _type, _write

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA.portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA.portable

  • Packages that use org.omg.CORBA.portable
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.DynAnyPackage
    Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
    org.omg.CORBA.ORBPackage
    Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
    org.omg.CORBA.TypeCodePackage
    Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.Dynamic
    This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.
    org.omg.SendingContext
    Provides support for the marshalling of value types.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.
  • Classes in org.omg.CORBA.portable used by javax.rmi.CORBA
    Class and Description
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    InvokeHandler
    This interface provides a dispatching mechanism for an incoming call.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA
    Class and Description
    ApplicationException
    This class is used for reporting application level exceptions between ORBs and stubs.
    BoxedValueHelper
    Delegate
    Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    RemarshalException
    This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
    ServantObject
    This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
    Streamable
    The base class for the Holder classess of all complex IDL types.
    ValueBase
    The generated Java classes corresponding to valuetype IDL types implement this interface.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA.DynAnyPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA.ORBPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA.TypeCodePackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA.portable
    Class and Description
    ApplicationException
    This class is used for reporting application level exceptions between ORBs and stubs.
    Delegate
    Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    RemarshalException
    This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
    ResponseHandler
    This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
    ServantObject
    This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
    Streamable
    The base class for the Holder classess of all complex IDL types.
    ValueBase
    The generated Java classes corresponding to valuetype IDL types implement this interface.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA_2_3
    Class and Description
    ValueFactory
    The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory.
  • Classes in org.omg.CORBA.portable used by org.omg.CORBA_2_3.portable
    Class and Description
    BoxedValueHelper
    Delegate
    Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.CosNaming
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    InvokeHandler
    This interface provides a dispatching mechanism for an incoming call.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    ResponseHandler
    This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
    Streamable
    The base class for the Holder classess of all complex IDL types.
  • Classes in org.omg.CORBA.portable used by org.omg.CosNaming.NamingContextExtPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    Streamable
    The base class for the Holder classess of all complex IDL types.
  • Classes in org.omg.CORBA.portable used by org.omg.CosNaming.NamingContextPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    Streamable
    The base class for the Holder classess of all complex IDL types.
  • Classes in org.omg.CORBA.portable used by org.omg.Dynamic
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
  • Classes in org.omg.CORBA.portable used by org.omg.DynamicAny
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.DynamicAny.DynAnyFactoryPackage
    Class and Description
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.DynamicAny.DynAnyPackage
    Class and Description
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.IOP
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    Streamable
    The base class for the Holder classess of all complex IDL types.
  • Classes in org.omg.CORBA.portable used by org.omg.IOP.CodecFactoryPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.IOP.CodecPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.Messaging
    Class and Description
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableInterceptor
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    Streamable
    The base class for the Holder classess of all complex IDL types.
    ValueBase
    The generated Java classes corresponding to valuetype IDL types implement this interface.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableInterceptor.ORBInitInfoPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableServer
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    InvokeHandler
    This interface provides a dispatching mechanism for an incoming call.
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    ResponseHandler
    This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableServer.CurrentPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableServer.POAManagerPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableServer.POAPackage
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
  • Classes in org.omg.CORBA.portable used by org.omg.PortableServer.ServantLocatorPackage
    Class and Description
    InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams.
    OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams.
    Streamable
    The base class for the Holder classess of all complex IDL types.
  • Classes in org.omg.CORBA.portable used by org.omg.SendingContext
    Class and Description
    IDLEntity
    An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
  • Classes in org.omg.CORBA.portable used by org.omg.stub.java.rmi
    Class and Description
    ObjectImpl
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ApplicationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class ApplicationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.portable.ApplicationException
  • All Implemented Interfaces:
    Serializable

    public class ApplicationException
extends Exception
    This class is used for reporting application level exceptions between ORBs and stubs.

    • Constructor Summary

      Constructors
      Constructor and Description
      ApplicationException(String id, InputStream ins)
      Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getId()
      Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.
      InputStream getInputStream()
      Returns the input stream from which the exception data can be read as its parameters.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ApplicationException

        public ApplicationException(String id,
                            InputStream ins)
        Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.
        Parameters:
        id - the repository id of the user exception
        ins - the stream which contains the user exception data

    • Method Detail

      • getId

        public String getId()
        Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.
        Returns:
        The CORBA repository ID of this exception

      • getInputStream

        public InputStream getInputStream()
        Returns the input stream from which the exception data can be read as its parameters.
        Returns:
        The stream which contains the user exception data
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BoxedValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface BoxedValueHelper

  • All Known Implementing Classes:
    StringValueHelper, WStringValueHelper

    public interface BoxedValueHelper

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      String get_id()
      Serializable | read_value(InputStream is)
      void | write_value(OutputStream os, Serializable value)

    • Method Detail

      • read_value

        Serializable read_value(InputStream is)

      • write_value

        void write_value(OutputStream os,
                 Serializable value)

      • get_id

        String get_id()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.ApplicationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.ApplicationException

  • Packages that use ApplicationException
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of ApplicationException in org.omg.CORBA

      Methods in org.omg.CORBA that throw ApplicationException
      Modifier and Type Method and Description
      InputStream LocalObject._invoke(OutputStream output)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of ApplicationException in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that throw ApplicationException
      Modifier and Type Method and Description
      InputStream ObjectImpl._invoke(OutputStream output)
      Invokes an operation and returns an InputStream object for reading the response.
      InputStream Delegate.invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.Delegate

  • Packages that use Delegate
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of Delegate in org.omg.CORBA

      Constructors in org.omg.CORBA with parameters of type Delegate
      Constructor and Description
      _IDLTypeStub(Delegate delegate)
      Constructs an _IDLTypeStub object initialized with the given Delegate object.
      _PolicyStub(Delegate delegate)
      Constructs a _PolicyStub object initialized with the given Delegate object.

    • Uses of Delegate in org.omg.CORBA_2_3.portable

      Subclasses of Delegate in org.omg.CORBA_2_3.portable
      Modifier and Type Class and Description
      class  Delegate
      Delegate class provides the ORB vendor specific implementation of CORBA object.

    • Uses of Delegate in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return Delegate
      Modifier and Type Method and Description
      Delegate ObjectImpl._get_delegate()
      Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
      Methods in org.omg.CORBA.portable with parameters of type Delegate
      Modifier and Type Method and Description
      void ObjectImpl._set_delegate(Delegate delegate)
      Sets the Delegate for this ObjectImpl instance to the given Delegate object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.IndirectionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.IndirectionException

No usage of org.omg.CORBA.portable.IndirectionException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.InputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.InputStream

  • Packages that use InputStream
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.

    • Uses of InputStream in javax.rmi.CORBA

      Methods in javax.rmi.CORBA with parameters of type InputStream
      Modifier and Type Method and Description
      static Object Util.readAny(InputStream in)
      Reads a java.lang.Object as a CORBA any.
      Object UtilDelegate.readAny(InputStream in)
      Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).
      Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
      Reads a value from the stream using Java semantics.

    • Uses of InputStream in org.omg.CORBA

      Methods in org.omg.CORBA that return InputStream
      Modifier and Type Method and Description
      InputStream LocalObject._invoke(OutputStream output)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      abstract InputStream Any.create_input_stream()
      Creates an input stream from which this Any object's value can be unmarshalled.
      Methods in org.omg.CORBA with parameters of type InputStream
      Modifier and Type | Method and Description
      void | BooleanSeqHolder._read(InputStream i)
      void DoubleHolder._read(InputStream input)
      Read a double value from the input stream and store it in the value member.
      void | OctetSeqHolder._read(InputStream i)
      void ValueBaseHolder._read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      void | ULongSeqHolder._read(InputStream i)
      void | CharSeqHolder._read(InputStream i)
      void | PolicyListHolder._read(InputStream i)
      void | PolicyHolder._read(InputStream i)
      void | LongSeqHolder._read(InputStream i)
      void | FloatSeqHolder._read(InputStream i)
      void | UShortSeqHolder._read(InputStream i)
      void | ULongLongSeqHolder._read(InputStream i)
      void | StringSeqHolder._read(InputStream i)
      void FloatHolder._read(InputStream input)
      Read a float from an input stream and initialize the value member with the float value.
      void StringHolder._read(InputStream input)
      Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
      void | UnknownUserExceptionHolder._read(InputStream i)
      void | WStringSeqHolder._read(InputStream i)
      void AnyHolder._read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      void ByteHolder._read(InputStream input)
      Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
      void | LongLongSeqHolder._read(InputStream i)
      void ServiceInformationHolder._read(InputStream in)
      Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
      void ObjectHolder._read(InputStream input)
      Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
      void TypeCodeHolder._read(InputStream input)
      Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
      void PrincipalHolder._read(InputStream input)
      Deprecated.
      void | ShortSeqHolder._read(InputStream i)
      void | DoubleSeqHolder._read(InputStream i)
      void BooleanHolder._read(InputStream input)
      Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
      void CharHolder._read(InputStream input)
      Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
      void ShortHolder._read(InputStream input)
      Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
      void | WrongTransactionHolder._read(InputStream i)
      void | PolicyErrorHolder._read(InputStream i)
      void | ParameterModeHolder._read(InputStream i)
      void FixedHolder._read(InputStream input)
      Read a fixed point value from the input stream and store it in the value member.
      void LongHolder._read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      void | AnySeqHolder._read(InputStream i)
      void | CurrentHolder._read(InputStream i)
      void IntHolder._read(InputStream input)
      Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
      void | WCharSeqHolder._read(InputStream i)
      void LocalObject._releaseReply(InputStream input)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Serializable | WStringValueHelper.read_value(InputStream istream)
      Serializable | StringValueHelper.read_value(InputStream istream)
      abstract void Any.read_value(InputStream is, TypeCode t)
      Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
      static NameValuePair | NameValuePairHelper.read(InputStream istream)
      static int | PolicyTypeHelper.read(InputStream istream)
      static ServiceDetail | ServiceDetailHelper.read(InputStream in)
      static SetOverrideType | SetOverrideTypeHelper.read(InputStream istream)
      static CompletionStatus | CompletionStatusHelper.read(InputStream istream)
      static byte[] | OctetSeqHelper.read(InputStream istream)
      static String | RepositoryIdHelper.read(InputStream istream)
      static Policy[] | PolicyListHelper.read(InputStream istream)
      static Current | CurrentHelper.read(InputStream istream)
      static ParameterMode | ParameterModeHelper.read(InputStream istream)
      static String | FieldNameHelper.read(InputStream istream)
      static StructMember | StructMemberHelper.read(InputStream istream)
      static Policy | PolicyHelper.read(InputStream istream)
      static String | WStringValueHelper.read(InputStream istream)
      static String[] | WStringSeqHelper.read(InputStream istream)
      static short | PolicyErrorCodeHelper.read(InputStream istream)
      static int[] | LongSeqHelper.read(InputStream istream)
      static long[] | LongLongSeqHelper.read(InputStream istream)
      static double[] | DoubleSeqHelper.read(InputStream istream)
      static UnionMember | UnionMemberHelper.read(InputStream istream)
      static Object | ObjectHelper.read(InputStream istream)
      static IDLType | IDLTypeHelper.read(InputStream istream)
      static Any[] | AnySeqHelper.read(InputStream istream)
      static ValueMember | ValueMemberHelper.read(InputStream istream)
      static UnknownUserException | UnknownUserExceptionHelper.read(InputStream istream)
      static long[] | ULongLongSeqHelper.read(InputStream istream)
      static char[] | CharSeqHelper.read(InputStream istream)
      static short | VisibilityHelper.read(InputStream istream)
      static String[] | StringSeqHelper.read(InputStream istream)
      static boolean[] | BooleanSeqHelper.read(InputStream istream)
      static PolicyError | PolicyErrorHelper.read(InputStream istream)
      static WrongTransaction | WrongTransactionHelper.read(InputStream istream)
      static String | VersionSpecHelper.read(InputStream istream)
      static Serializable | ValueBaseHelper.read(InputStream istream)
      static int[] | ULongSeqHelper.read(InputStream istream)
      static float[] | FloatSeqHelper.read(InputStream istream)
      static char[] | WCharSeqHelper.read(InputStream istream)
      static ServiceInformation | ServiceInformationHelper.read(InputStream in)
      static String | StringValueHelper.read(InputStream istream)
      static short[] | UShortSeqHelper.read(InputStream istream)
      static short[] | ShortSeqHelper.read(InputStream istream)
      static String | IdentifierHelper.read(InputStream istream)
      static DefinitionKind | DefinitionKindHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.CORBA_2_3.portable

      Subclasses of InputStream in org.omg.CORBA_2_3.portable
      Modifier and Type Class and Description
      class  InputStream
      InputStream provides for the reading of all of the mapped IDL types from the stream.

    • Uses of InputStream in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return InputStream
      Modifier and Type Method and Description
      InputStream ObjectImpl._invoke(OutputStream output)
      Invokes an operation and returns an InputStream object for reading the response.
      abstract InputStream OutputStream.create_input_stream()
      Returns an input stream with the same buffer.
      InputStream ApplicationException.getInputStream()
      Returns the input stream from which the exception data can be read as its parameters.
      InputStream Delegate.invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
      Methods in org.omg.CORBA.portable with parameters of type InputStream
      Modifier and Type | Method and Description
      OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
      Invoked by the ORB to dispatch a request to the servant.
      void Streamable._read(InputStream istream)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      void ObjectImpl._releaseReply(InputStream input)
      Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
      Serializable | BoxedValueHelper.read_value(InputStream is)
      void Delegate.releaseReply(Object self, InputStream input)
      releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
      Constructors in org.omg.CORBA.portable with parameters of type InputStream
      Constructor and Description
      ApplicationException(String id, InputStream ins)
      Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.

    • Uses of InputStream in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type InputStream
      Modifier and Type | Method and Description
      OutputStream | NamingContextPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | BindingIteratorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | NamingContextExtPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      void | BindingIteratorHolder._read(InputStream i)
      void | BindingListHolder._read(InputStream i)
      void | NameHolder._read(InputStream i)
      void | NamingContextExtHolder._read(InputStream i)
      void | NameComponentHolder._read(InputStream i)
      void | BindingHolder._read(InputStream i)
      void | NamingContextHolder._read(InputStream i)
      void | BindingTypeHolder._read(InputStream i)
      static Binding[] | BindingListHelper.read(InputStream istream)
      static NameComponent | NameComponentHelper.read(InputStream istream)
      static NamingContext | NamingContextHelper.read(InputStream istream)
      static NameComponent[] | NameHelper.read(InputStream istream)
      static BindingIterator | BindingIteratorHelper.read(InputStream istream)
      static Binding | BindingHelper.read(InputStream istream)
      static String | IstringHelper.read(InputStream istream)
      static NamingContextExt | NamingContextExtHelper.read(InputStream istream)
      static BindingType | BindingTypeHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.CosNaming.NamingContextExtPackage

      Methods in org.omg.CosNaming.NamingContextExtPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      void | InvalidAddressHolder._read(InputStream i)
      static InvalidAddress | InvalidAddressHelper.read(InputStream istream)
      static String | StringNameHelper.read(InputStream istream)
      static String | URLStringHelper.read(InputStream istream)
      static String | AddressHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.CosNaming.NamingContextPackage

      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      void | CannotProceedHolder._read(InputStream i)
      void | NotEmptyHolder._read(InputStream i)
      void | NotFoundReasonHolder._read(InputStream i)
      void | NotFoundHolder._read(InputStream i)
      void | InvalidNameHolder._read(InputStream i)
      void | AlreadyBoundHolder._read(InputStream i)
      static CannotProceed | CannotProceedHelper.read(InputStream istream)
      static AlreadyBound | AlreadyBoundHelper.read(InputStream istream)
      static InvalidName | InvalidNameHelper.read(InputStream istream)
      static NotFoundReason | NotFoundReasonHelper.read(InputStream istream)
      static NotEmpty | NotEmptyHelper.read(InputStream istream)
      static NotFound | NotFoundHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.DynamicAny

      Methods in org.omg.DynamicAny with parameters of type InputStream
      Modifier and Type | Method and Description
      static NameValuePair | NameValuePairHelper.read(InputStream istream)
      static DynUnion | DynUnionHelper.read(InputStream istream)
      static DynSequence | DynSequenceHelper.read(InputStream istream)
      static DynEnum | DynEnumHelper.read(InputStream istream)
      static DynArray | DynArrayHelper.read(InputStream istream)
      static DynAny[] | DynAnySeqHelper.read(InputStream istream)
      static String | FieldNameHelper.read(InputStream istream)
      static DynFixed | DynFixedHelper.read(InputStream istream)
      static DynAny | DynAnyHelper.read(InputStream istream)
      static Any[] | AnySeqHelper.read(InputStream istream)
      static NameDynAnyPair[] | NameDynAnyPairSeqHelper.read(InputStream istream)
      static DynValue | DynValueHelper.read(InputStream istream)
      static NameDynAnyPair | NameDynAnyPairHelper.read(InputStream istream)
      static NameValuePair[] | NameValuePairSeqHelper.read(InputStream istream)
      static DynStruct | DynStructHelper.read(InputStream istream)
      static DynAnyFactory | DynAnyFactoryHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.DynamicAny.DynAnyFactoryPackage

      Methods in org.omg.DynamicAny.DynAnyFactoryPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static InconsistentTypeCode | InconsistentTypeCodeHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static InvalidValue | InvalidValueHelper.read(InputStream istream)
      static TypeMismatch | TypeMismatchHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.IOP

      Methods in org.omg.IOP with parameters of type InputStream
      Modifier and Type | Method and Description
      void | ServiceContextHolder._read(InputStream i)
      void | TaggedProfileHolder._read(InputStream i)
      void | TaggedComponentHolder._read(InputStream i)
      void | IORHolder._read(InputStream i)
      void | ServiceContextListHolder._read(InputStream i)
      void | MultipleComponentProfileHolder._read(InputStream i)
      static int | ComponentIdHelper.read(InputStream istream)
      static CodecFactory | CodecFactoryHelper.read(InputStream istream)
      static ServiceContext[] | ServiceContextListHelper.read(InputStream istream)
      static int | ServiceIdHelper.read(InputStream istream)
      static IOR | IORHelper.read(InputStream istream)
      static int | ProfileIdHelper.read(InputStream istream)
      static ServiceContext | ServiceContextHelper.read(InputStream istream)
      static TaggedComponent | TaggedComponentHelper.read(InputStream istream)
      static TaggedProfile | TaggedProfileHelper.read(InputStream istream)
      static TaggedComponent[] | MultipleComponentProfileHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.IOP.CodecFactoryPackage

      Methods in org.omg.IOP.CodecFactoryPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static UnknownEncoding | UnknownEncodingHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static InvalidTypeForEncoding | InvalidTypeForEncodingHelper.read(InputStream istream)
      static FormatMismatch | FormatMismatchHelper.read(InputStream istream)
      static TypeMismatch | TypeMismatchHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.Messaging

      Methods in org.omg.Messaging with parameters of type InputStream
      Modifier and Type | Method and Description
      static short | SyncScopeHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type InputStream
      Modifier and Type | Method and Description
      void | ObjectReferenceTemplateHolder._read(InputStream i)
      void | ObjectReferenceTemplateSeqHolder._read(InputStream i)
      void | IORInterceptor_3_0Holder._read(InputStream i)
      void | ObjectReferenceFactoryHolder._read(InputStream i)
      static ObjectReferenceTemplate | ObjectReferenceTemplateHelper.read(InputStream istream)
      static String[] | AdapterNameHelper.read(InputStream istream)
      static Current | CurrentHelper.read(InputStream istream)
      static ForwardRequest | ForwardRequestHelper.read(InputStream istream)
      static ObjectReferenceTemplate[] | ObjectReferenceTemplateSeqHelper.read(InputStream istream)
      static String | ServerIdHelper.read(InputStream istream)
      static String | ORBIdHelper.read(InputStream istream)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.read(InputStream istream)
      static short | AdapterStateHelper.read(InputStream istream)
      static byte[] | ObjectIdHelper.read(InputStream istream)
      static int | AdapterManagerIdHelper.read(InputStream istream)
      static InvalidSlot | InvalidSlotHelper.read(InputStream istream)
      static ObjectReferenceFactory | ObjectReferenceFactoryHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static DuplicateName | DuplicateNameHelper.read(InputStream istream)
      static InvalidName | InvalidNameHelper.read(InputStream istream)
      static String | ObjectIdHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableServer

      Methods in org.omg.PortableServer with parameters of type InputStream
      Modifier and Type | Method and Description
      OutputStream | ServantLocatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | ServantActivatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      static POA | POAHelper.read(InputStream istream)
      static Current | CurrentHelper.read(InputStream istream)
      static ForwardRequest | ForwardRequestHelper.read(InputStream istream)
      static ServantLocator | ServantLocatorHelper.read(InputStream istream)
      static ServantActivator | ServantActivatorHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableServer.CurrentPackage

      Methods in org.omg.PortableServer.CurrentPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static NoContext | NoContextHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableServer.POAManagerPackage

      Methods in org.omg.PortableServer.POAManagerPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static AdapterInactive | AdapterInactiveHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      static ServantAlreadyActive | ServantAlreadyActiveHelper.read(InputStream istream)
      static ObjectAlreadyActive | ObjectAlreadyActiveHelper.read(InputStream istream)
      static NoServant | NoServantHelper.read(InputStream istream)
      static WrongPolicy | WrongPolicyHelper.read(InputStream istream)
      static ServantNotActive | ServantNotActiveHelper.read(InputStream istream)
      static AdapterNonExistent | AdapterNonExistentHelper.read(InputStream istream)
      static InvalidPolicy | InvalidPolicyHelper.read(InputStream istream)
      static ObjectNotActive | ObjectNotActiveHelper.read(InputStream istream)
      static AdapterAlreadyExists | AdapterAlreadyExistsHelper.read(InputStream istream)
      static WrongAdapter | WrongAdapterHelper.read(InputStream istream)

    • Uses of InputStream in org.omg.PortableServer.ServantLocatorPackage

      Methods in org.omg.PortableServer.ServantLocatorPackage with parameters of type InputStream
      Modifier and Type | Method and Description
      void | CookieHolder._read(InputStream is)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.ObjectImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.ObjectImpl

  • Packages that use ObjectImpl
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

    • Uses of ObjectImpl in javax.rmi.CORBA

      Subclasses of ObjectImpl in javax.rmi.CORBA
      Modifier and Type Class and Description
      class  Stub
      Base class from which all RMI-IIOP stubs must inherit.

    • Uses of ObjectImpl in org.omg.CORBA

      Subclasses of ObjectImpl in org.omg.CORBA
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
      class  _PolicyStub
      The Stub for Policy.
      class  DynamicImplementation
      Deprecated.
      org.omg.CORBA.DynamicImplementation

    • Uses of ObjectImpl in org.omg.CORBA_2_3.portable

      Subclasses of ObjectImpl in org.omg.CORBA_2_3.portable
      Modifier and Type Class and Description
      class  ObjectImpl
      ObjectImpl class is the base class for all stubs.

    • Uses of ObjectImpl in org.omg.CosNaming

      Subclasses of ObjectImpl in org.omg.CosNaming
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  _BindingIteratorStub
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  | _NamingContextImplBase
      class  _NamingContextStub
      A naming context is an object that contains a set of name bindings in which each name is unique.

    • Uses of ObjectImpl in org.omg.DynamicAny

      Subclasses of ObjectImpl in org.omg.DynamicAny
      Modifier and Type Class and Description
      class  _DynAnyFactoryStub
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      class  _DynAnyStub
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.

    • Uses of ObjectImpl in org.omg.PortableServer

      Subclasses of ObjectImpl in org.omg.PortableServer
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.

    • Uses of ObjectImpl in org.omg.stub.java.rmi

      Subclasses of ObjectImpl in org.omg.stub.java.rmi
      Modifier and Type Class and Description
      class  _Remote_Stub
      This class provides the Stub for the Remote Type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.OutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.OutputStream

  • Packages that use OutputStream
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.Messaging
    This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.

    • Uses of OutputStream in javax.rmi.CORBA

      Methods in javax.rmi.CORBA with parameters of type OutputStream
      Modifier and Type Method and Description
      static void Util.writeAbstractObject(OutputStream out, Object obj)
      Writes a java.lang.Object as either a value or a CORBA Object.
      void UtilDelegate.writeAbstractObject(OutputStream out, Object obj)
      Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
      static void Util.writeAny(OutputStream out, Object obj)
      Writes any java.lang.Object as a CORBA any.
      void UtilDelegate.writeAny(OutputStream out, Object obj)
      Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).
      static void Util.writeRemoteObject(OutputStream out, Object obj)
      Writes a java.lang.Object as a CORBA Object.
      void UtilDelegate.writeRemoteObject(OutputStream out, Object obj)
      Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
      void ValueHandler.writeValue(OutputStream out, Serializable value)
      Writes a value to the stream using Java semantics.
      void ValueHandlerMultiFormat.writeValue(OutputStream out, Serializable value, byte streamFormatVersion)
      Allows the ORB to pass the stream format version for RMI/IDL custom value types.

    • Uses of OutputStream in org.omg.CORBA

      Methods in org.omg.CORBA that return OutputStream
      Modifier and Type Method and Description
      OutputStream LocalObject._request(String operation, boolean responseExpected)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      abstract OutputStream ORB.create_output_stream()
      Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
      abstract OutputStream Any.create_output_stream()
      Creates an output stream into which this Any object's value can be marshalled.
      Methods in org.omg.CORBA with parameters of type OutputStream
      Modifier and Type | Method and Description
      InputStream LocalObject._invoke(OutputStream output)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      void | BooleanSeqHolder._write(OutputStream o)
      void DoubleHolder._write(OutputStream output)
      Write the double value stored in this holder to an OutputStream.
      void | OctetSeqHolder._write(OutputStream o)
      void ValueBaseHolder._write(OutputStream output)
      Marshals to output the value in the Holder.
      void | ULongSeqHolder._write(OutputStream o)
      void | CharSeqHolder._write(OutputStream o)
      void | PolicyListHolder._write(OutputStream o)
      void | PolicyHolder._write(OutputStream o)
      void | LongSeqHolder._write(OutputStream o)
      void | FloatSeqHolder._write(OutputStream o)
      void | UShortSeqHolder._write(OutputStream o)
      void | ULongLongSeqHolder._write(OutputStream o)
      void | StringSeqHolder._write(OutputStream o)
      void FloatHolder._write(OutputStream output)
      Write the float value into an output stream.
      void StringHolder._write(OutputStream output)
      Marshals the value held by this StringHolder object to the output stream output.
      void | UnknownUserExceptionHolder._write(OutputStream o)
      void | WStringSeqHolder._write(OutputStream o)
      void AnyHolder._write(OutputStream output)
      Marshals to output the value in this AnyHolder object.
      void ByteHolder._write(OutputStream output)
      Marshals to output the value in this ByteHolder object.
      void | LongLongSeqHolder._write(OutputStream o)
      void ServiceInformationHolder._write(OutputStream out)
      Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
      void ObjectHolder._write(OutputStream output)
      Marshals to output the value in this ObjectHolder object.
      void TypeCodeHolder._write(OutputStream output)
      Marshals to output the value in this TypeCodeHolder object.
      void PrincipalHolder._write(OutputStream output)
      Deprecated.
      void | ShortSeqHolder._write(OutputStream o)
      void | DoubleSeqHolder._write(OutputStream o)
      void BooleanHolder._write(OutputStream output)
      Marshals the value in this BooleanHolder object's value field to the output stream output.
      void CharHolder._write(OutputStream output)
      Marshals to output the value in this CharHolder object.
      void ShortHolder._write(OutputStream output)
      Marshals to output the value in this ShortHolder object.
      void | WrongTransactionHolder._write(OutputStream o)
      void | PolicyErrorHolder._write(OutputStream o)
      void | ParameterModeHolder._write(OutputStream o)
      void FixedHolder._write(OutputStream output)
      Write the fixed point value stored in this holder to an OutputStream.
      void LongHolder._write(OutputStream output)
      Marshals to output the value in the Holder.
      void | AnySeqHolder._write(OutputStream o)
      void | CurrentHolder._write(OutputStream o)
      void IntHolder._write(OutputStream output)
      Marshals the value in this IntHolder object's value field to the output stream output.
      void | WCharSeqHolder._write(OutputStream o)
      abstract void Any.write_value(OutputStream os)
      Writes out the value of this Any object to the given output stream.
      void | WStringValueHelper.write_value(OutputStream ostream, Serializable value)
      void | StringValueHelper.write_value(OutputStream ostream, Serializable value)
      static void | AnySeqHelper.write(OutputStream ostream, Any[] value)
      static void | BooleanSeqHelper.write(OutputStream ostream, boolean[] value)
      static void | OctetSeqHelper.write(OutputStream ostream, byte[] value)
      static void | CharSeqHelper.write(OutputStream ostream, char[] value)
      static void | WCharSeqHelper.write(OutputStream ostream, char[] value)
      static void | CompletionStatusHelper.write(OutputStream ostream, CompletionStatus value)
      static void | CurrentHelper.write(OutputStream ostream, Current value)
      static void | DefinitionKindHelper.write(OutputStream ostream, DefinitionKind value)
      static void | DoubleSeqHelper.write(OutputStream ostream, double[] value)
      static void | FloatSeqHelper.write(OutputStream ostream, float[] value)
      static void | IDLTypeHelper.write(OutputStream ostream, IDLType value)
      static void | PolicyTypeHelper.write(OutputStream ostream, int value)
      static void | LongSeqHelper.write(OutputStream ostream, int[] value)
      static void | ULongSeqHelper.write(OutputStream ostream, int[] value)
      static void | LongLongSeqHelper.write(OutputStream ostream, long[] value)
      static void | ULongLongSeqHelper.write(OutputStream ostream, long[] value)
      static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
      static void | ObjectHelper.write(OutputStream ostream, Object value)
      static void | ParameterModeHelper.write(OutputStream ostream, ParameterMode value)
      static void | PolicyHelper.write(OutputStream ostream, Policy value)
      static void | PolicyListHelper.write(OutputStream ostream, Policy[] value)
      static void | PolicyErrorHelper.write(OutputStream ostream, PolicyError value)
      static void | ValueBaseHelper.write(OutputStream ostream, Serializable value)
      static void | ServiceDetailHelper.write(OutputStream out, ServiceDetail that)
      static void | ServiceInformationHelper.write(OutputStream out, ServiceInformation that)
      static void | SetOverrideTypeHelper.write(OutputStream ostream, SetOverrideType value)
      static void | PolicyErrorCodeHelper.write(OutputStream ostream, short value)
      static void | VisibilityHelper.write(OutputStream ostream, short value)
      static void | UShortSeqHelper.write(OutputStream ostream, short[] value)
      static void | ShortSeqHelper.write(OutputStream ostream, short[] value)
      static void | RepositoryIdHelper.write(OutputStream ostream, String value)
      static void | FieldNameHelper.write(OutputStream ostream, String value)
      static void | WStringValueHelper.write(OutputStream ostream, String value)
      static void | VersionSpecHelper.write(OutputStream ostream, String value)
      static void | StringValueHelper.write(OutputStream ostream, String value)
      static void | IdentifierHelper.write(OutputStream ostream, String value)
      static void | WStringSeqHelper.write(OutputStream ostream, String[] value)
      static void | StringSeqHelper.write(OutputStream ostream, String[] value)
      static void | StructMemberHelper.write(OutputStream ostream, StructMember value)
      static void | UnionMemberHelper.write(OutputStream ostream, UnionMember value)
      static void | UnknownUserExceptionHelper.write(OutputStream ostream, UnknownUserException value)
      static void | ValueMemberHelper.write(OutputStream ostream, ValueMember value)
      static void | WrongTransactionHelper.write(OutputStream ostream, WrongTransaction value)

    • Uses of OutputStream in org.omg.CORBA_2_3.portable

      Subclasses of OutputStream in org.omg.CORBA_2_3.portable
      Modifier and Type Class and Description
      class  OutputStream
      OutputStream provides interface for writing of all of the mapped IDL type to the stream.

    • Uses of OutputStream in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return OutputStream
      Modifier and Type Method and Description
      OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
      Invoked by the ORB to dispatch a request to the servant.
      OutputStream ObjectImpl._request(String operation, boolean responseExpected)
      Returns an OutputStream object to use for marshalling the arguments of the given method.
      OutputStream ResponseHandler.createExceptionReply()
      Called by the servant during a method invocation.
      OutputStream ResponseHandler.createReply()
      Called by the servant during a method invocation.
      OutputStream Delegate.request(Object self, String operation, boolean responseExpected)
      request is called by a stub to obtain an OutputStream for marshaling arguments.
      Methods in org.omg.CORBA.portable with parameters of type OutputStream
      Modifier and Type | Method and Description
      InputStream ObjectImpl._invoke(OutputStream output)
      Invokes an operation and returns an InputStream object for reading the response.
      void Streamable._write(OutputStream ostream)
      Marshals to ostream the value in the value field of the Holder.
      InputStream Delegate.invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
      void | BoxedValueHelper.write_value(OutputStream os, Serializable value)

    • Uses of OutputStream in org.omg.CosNaming

      Methods in org.omg.CosNaming that return OutputStream
      Modifier and Type | Method and Description
      OutputStream | NamingContextPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | BindingIteratorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | NamingContextExtPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      Methods in org.omg.CosNaming with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | BindingIteratorHolder._write(OutputStream o)
      void | BindingListHolder._write(OutputStream o)
      void | NameHolder._write(OutputStream o)
      void | NamingContextExtHolder._write(OutputStream o)
      void | NameComponentHolder._write(OutputStream o)
      void | BindingHolder._write(OutputStream o)
      void | NamingContextHolder._write(OutputStream o)
      void | BindingTypeHolder._write(OutputStream o)
      static void | BindingHelper.write(OutputStream ostream, Binding value)
      static void | BindingListHelper.write(OutputStream ostream, Binding[] value)
      static void | BindingIteratorHelper.write(OutputStream ostream, BindingIterator value)
      static void | BindingTypeHelper.write(OutputStream ostream, BindingType value)
      static void | NameComponentHelper.write(OutputStream ostream, NameComponent value)
      static void | NameHelper.write(OutputStream ostream, NameComponent[] value)
      static void | NamingContextHelper.write(OutputStream ostream, NamingContext value)
      static void | NamingContextExtHelper.write(OutputStream ostream, NamingContextExt value)
      static void | IstringHelper.write(OutputStream ostream, String value)

    • Uses of OutputStream in org.omg.CosNaming.NamingContextExtPackage

      Methods in org.omg.CosNaming.NamingContextExtPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | InvalidAddressHolder._write(OutputStream o)
      static void | InvalidAddressHelper.write(OutputStream ostream, InvalidAddress value)
      static void | StringNameHelper.write(OutputStream ostream, String value)
      static void | URLStringHelper.write(OutputStream ostream, String value)
      static void | AddressHelper.write(OutputStream ostream, String value)

    • Uses of OutputStream in org.omg.CosNaming.NamingContextPackage

      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | CannotProceedHolder._write(OutputStream o)
      void | NotEmptyHolder._write(OutputStream o)
      void | NotFoundReasonHolder._write(OutputStream o)
      void | NotFoundHolder._write(OutputStream o)
      void | InvalidNameHolder._write(OutputStream o)
      void | AlreadyBoundHolder._write(OutputStream o)
      static void | AlreadyBoundHelper.write(OutputStream ostream, AlreadyBound value)
      static void | CannotProceedHelper.write(OutputStream ostream, CannotProceed value)
      static void | InvalidNameHelper.write(OutputStream ostream, InvalidName value)
      static void | NotEmptyHelper.write(OutputStream ostream, NotEmpty value)
      static void | NotFoundHelper.write(OutputStream ostream, NotFound value)
      static void | NotFoundReasonHelper.write(OutputStream ostream, NotFoundReason value)

    • Uses of OutputStream in org.omg.DynamicAny

      Methods in org.omg.DynamicAny with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | AnySeqHelper.write(OutputStream ostream, Any[] value)
      static void | DynAnyHelper.write(OutputStream ostream, DynAny value)
      static void | DynAnySeqHelper.write(OutputStream ostream, DynAny[] value)
      static void | DynAnyFactoryHelper.write(OutputStream ostream, DynAnyFactory value)
      static void | DynArrayHelper.write(OutputStream ostream, DynArray value)
      static void | DynEnumHelper.write(OutputStream ostream, DynEnum value)
      static void | DynFixedHelper.write(OutputStream ostream, DynFixed value)
      static void | DynSequenceHelper.write(OutputStream ostream, DynSequence value)
      static void | DynStructHelper.write(OutputStream ostream, DynStruct value)
      static void | DynUnionHelper.write(OutputStream ostream, DynUnion value)
      static void | DynValueHelper.write(OutputStream ostream, DynValue value)
      static void | NameDynAnyPairHelper.write(OutputStream ostream, NameDynAnyPair value)
      static void | NameDynAnyPairSeqHelper.write(OutputStream ostream, NameDynAnyPair[] value)
      static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
      static void | NameValuePairSeqHelper.write(OutputStream ostream, NameValuePair[] value)
      static void | FieldNameHelper.write(OutputStream ostream, String value)

    • Uses of OutputStream in org.omg.DynamicAny.DynAnyFactoryPackage

      Methods in org.omg.DynamicAny.DynAnyFactoryPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | InconsistentTypeCodeHelper.write(OutputStream ostream, InconsistentTypeCode value)

    • Uses of OutputStream in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | InvalidValueHelper.write(OutputStream ostream, InvalidValue value)
      static void | TypeMismatchHelper.write(OutputStream ostream, TypeMismatch value)

    • Uses of OutputStream in org.omg.IOP

      Methods in org.omg.IOP with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | ServiceContextHolder._write(OutputStream o)
      void | TaggedProfileHolder._write(OutputStream o)
      void | TaggedComponentHolder._write(OutputStream o)
      void | IORHolder._write(OutputStream o)
      void | ServiceContextListHolder._write(OutputStream o)
      void | MultipleComponentProfileHolder._write(OutputStream o)
      static void | CodecFactoryHelper.write(OutputStream ostream, CodecFactory value)
      static void | ComponentIdHelper.write(OutputStream ostream, int value)
      static void | ServiceIdHelper.write(OutputStream ostream, int value)
      static void | ProfileIdHelper.write(OutputStream ostream, int value)
      static void | IORHelper.write(OutputStream ostream, IOR value)
      static void | ServiceContextHelper.write(OutputStream ostream, ServiceContext value)
      static void | ServiceContextListHelper.write(OutputStream ostream, ServiceContext[] value)
      static void | TaggedComponentHelper.write(OutputStream ostream, TaggedComponent value)
      static void | MultipleComponentProfileHelper.write(OutputStream ostream, TaggedComponent[] value)
      static void | TaggedProfileHelper.write(OutputStream ostream, TaggedProfile value)

    • Uses of OutputStream in org.omg.IOP.CodecFactoryPackage

      Methods in org.omg.IOP.CodecFactoryPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | UnknownEncodingHelper.write(OutputStream ostream, UnknownEncoding value)

    • Uses of OutputStream in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | FormatMismatchHelper.write(OutputStream ostream, FormatMismatch value)
      static void | InvalidTypeForEncodingHelper.write(OutputStream ostream, InvalidTypeForEncoding value)
      static void | TypeMismatchHelper.write(OutputStream ostream, TypeMismatch value)

    • Uses of OutputStream in org.omg.Messaging

      Methods in org.omg.Messaging with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | SyncScopeHelper.write(OutputStream ostream, short value)

    • Uses of OutputStream in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | ObjectReferenceTemplateHolder._write(OutputStream o)
      void | ObjectReferenceTemplateSeqHolder._write(OutputStream o)
      void | IORInterceptor_3_0Holder._write(OutputStream o)
      void | ObjectReferenceFactoryHolder._write(OutputStream o)
      static void | ObjectIdHelper.write(OutputStream ostream, byte[] value)
      static void | CurrentHelper.write(OutputStream ostream, Current value)
      static void | ForwardRequestHelper.write(OutputStream ostream, ForwardRequest value)
      static void | AdapterManagerIdHelper.write(OutputStream ostream, int value)
      static void | InvalidSlotHelper.write(OutputStream ostream, InvalidSlot value)
      static void | IORInterceptor_3_0Helper.write(OutputStream ostream, IORInterceptor_3_0 value)
      static void | ObjectReferenceFactoryHelper.write(OutputStream ostream, ObjectReferenceFactory value)
      static void | ObjectReferenceTemplateHelper.write(OutputStream ostream, ObjectReferenceTemplate value)
      static void | ObjectReferenceTemplateSeqHelper.write(OutputStream ostream, ObjectReferenceTemplate[] value)
      static void | AdapterStateHelper.write(OutputStream ostream, short value)
      static void | ServerIdHelper.write(OutputStream ostream, String value)
      static void | ORBIdHelper.write(OutputStream ostream, String value)
      static void | AdapterNameHelper.write(OutputStream ostream, String[] value)

    • Uses of OutputStream in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | DuplicateNameHelper.write(OutputStream ostream, DuplicateName value)
      static void | InvalidNameHelper.write(OutputStream ostream, InvalidName value)
      static void | ObjectIdHelper.write(OutputStream ostream, String value)

    • Uses of OutputStream in org.omg.PortableServer

      Methods in org.omg.PortableServer that return OutputStream
      Modifier and Type | Method and Description
      OutputStream | ServantLocatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | ServantActivatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      Methods in org.omg.PortableServer with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | CurrentHelper.write(OutputStream ostream, Current value)
      static void | ForwardRequestHelper.write(OutputStream ostream, ForwardRequest value)
      static void | POAHelper.write(OutputStream ostream, POA value)
      static void | ServantActivatorHelper.write(OutputStream ostream, ServantActivator value)
      static void | ServantLocatorHelper.write(OutputStream ostream, ServantLocator value)

    • Uses of OutputStream in org.omg.PortableServer.CurrentPackage

      Methods in org.omg.PortableServer.CurrentPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | NoContextHelper.write(OutputStream ostream, NoContext value)

    • Uses of OutputStream in org.omg.PortableServer.POAManagerPackage

      Methods in org.omg.PortableServer.POAManagerPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | AdapterInactiveHelper.write(OutputStream ostream, AdapterInactive value)

    • Uses of OutputStream in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      static void | AdapterAlreadyExistsHelper.write(OutputStream ostream, AdapterAlreadyExists value)
      static void | AdapterNonExistentHelper.write(OutputStream ostream, AdapterNonExistent value)
      static void | InvalidPolicyHelper.write(OutputStream ostream, InvalidPolicy value)
      static void | NoServantHelper.write(OutputStream ostream, NoServant value)
      static void | ObjectAlreadyActiveHelper.write(OutputStream ostream, ObjectAlreadyActive value)
      static void | ObjectNotActiveHelper.write(OutputStream ostream, ObjectNotActive value)
      static void | ServantAlreadyActiveHelper.write(OutputStream ostream, ServantAlreadyActive value)
      static void | ServantNotActiveHelper.write(OutputStream ostream, ServantNotActive value)
      static void | WrongAdapterHelper.write(OutputStream ostream, WrongAdapter value)
      static void | WrongPolicyHelper.write(OutputStream ostream, WrongPolicy value)

    • Uses of OutputStream in org.omg.PortableServer.ServantLocatorPackage

      Methods in org.omg.PortableServer.ServantLocatorPackage with parameters of type OutputStream
      Modifier and Type | Method and Description
      void | CookieHolder._write(OutputStream os)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.RemarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.RemarshalException

  • Packages that use RemarshalException
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of RemarshalException in org.omg.CORBA

      Methods in org.omg.CORBA that throw RemarshalException
      Modifier and Type Method and Description
      InputStream LocalObject._invoke(OutputStream output)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of RemarshalException in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that throw RemarshalException
      Modifier and Type Method and Description
      InputStream ObjectImpl._invoke(OutputStream output)
      Invokes an operation and returns an InputStream object for reading the response.
      InputStream Delegate.invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.ServantObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.ServantObject

  • Packages that use ServantObject
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of ServantObject in org.omg.CORBA

      Methods in org.omg.CORBA that return ServantObject
      Modifier and Type Method and Description
      ServantObject LocalObject._servant_preinvoke(String operation, Class expectedType)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
      Methods in org.omg.CORBA with parameters of type ServantObject
      Modifier and Type Method and Description
      void LocalObject._servant_postinvoke(ServantObject servant)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

    • Uses of ServantObject in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable that return ServantObject
      Modifier and Type Method and Description
      ServantObject ObjectImpl._servant_preinvoke(String operation, Class expectedType)
      Returns a Java reference to the local servant that should be used for sending a request for the method specified.
      ServantObject Delegate.servant_preinvoke(Object self, String operation, Class expectedType)
      Returns a Java reference to the servant which should be used for this request.
      Methods in org.omg.CORBA.portable with parameters of type ServantObject
      Modifier and Type Method and Description
      void ObjectImpl._servant_postinvoke(ServantObject servant)
      Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
      void Delegate.servant_postinvoke(Object self, ServantObject servant)
      servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.portable.UnknownException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.portable.UnknownException

No usage of org.omg.CORBA.portable.UnknownException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.BoxedValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.BoxedValueHelper

  • Packages that use BoxedValueHelper
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA_2_3.portable
    Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

    • Uses of BoxedValueHelper in org.omg.CORBA

      Classes in org.omg.CORBA that implement BoxedValueHelper
      Modifier and Type Class and Description
      class  StringValueHelper
      The Helper for StringValue.
      class  WStringValueHelper
      org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications : ORB core as defined by CORBA 2.3.1 (formal/99-10-07) IDL/Java Language Mapping as defined in ptc/00-01-08

    • Uses of BoxedValueHelper in org.omg.CORBA_2_3.portable

      Methods in org.omg.CORBA_2_3.portable with parameters of type BoxedValueHelper
      Modifier and Type Method and Description
      Serializable InputStream.read_value(BoxedValueHelper factory)
      Unmarshalls a value type from the input stream.
      void OutputStream.write_value(Serializable value, BoxedValueHelper factory)
      Marshals a value type to the output stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.CustomValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.CustomValue

No usage of org.omg.CORBA.portable.CustomValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.IDLEntity

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.IDLEntity

  • Packages that use IDLEntity
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.DynAnyPackage
    Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
    org.omg.CORBA.ORBPackage
    Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CORBA.TypeCodePackage
    Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.Dynamic
    This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
    org.omg.SendingContext
    Provides support for the marshalling of value types.

    • Uses of IDLEntity in org.omg.CORBA

      Subinterfaces of IDLEntity in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  Current
      Interfaces derived from the Current interface enable ORB and CORBA services to provide access to information (context) associated with the thread of execution in which they are running.
      interface  DataInputStream
      Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
      interface  DataOutputStream
      Defines the methods used to write primitive data types to output streams for marshalling custom value types.
      interface  DomainManager
      Provides mechanisms for establishing and navigating relationships to superior and subordinate domains, as well as for creating and accessing policies.
      interface  IDLType
      An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
      interface  IRObject
      An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
      interface  Policy
      Interfaces derived from the Policy interface allow an ORB or CORBA service access to certain choices that affect its operation.
      Classes in org.omg.CORBA that implement IDLEntity
      Modifier and Type Class and Description
      class  _IDLTypeStub
      The Stub for IDLType.
      class  _PolicyStub
      The Stub for Policy.
      class  Any
      Serves as a container for any data that can be described in IDL or for any IDL primitive type.
      class  Bounds
      A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
      class  CompletionStatus
      An object that indicates whether a method had completed running when a SystemException was thrown.
      class  DefinitionKind
      The class that provides the constants used to identify the type of an Interface Repository object.
      class  NameValuePair
      Associates a name with a value that is an attribute of an IDL struct, and is used in the DynStruct APIs.
      class  ParameterMode
      Enumeration of parameter modes for Parameter.
      class  PolicyError
      A user exception thrown when a policy error occurs.
      class  ServiceDetail
      An object that represents an ORB service: its service_detail_type field contains the type of the ORB service, and its service_detail field contains a description of the ORB service.
      class  ServiceInformation
      An IDL struct in the CORBA module that stores information about a CORBA service available in the ORB implementation and is obtained from the ORB.get_service_information method.
      class  SetOverrideType
      The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
      class  StructMember
      Describes a member of an IDL struct in the Interface Repository, including the name of the struct member, the type of the struct member, and the typedef that represents the IDL type of the struct member described the struct member object.
      class  TypeCode
      A container for information about a specific CORBA data type.
      class  UnionMember
      A description in the Interface Repository of a member of an IDL union.
      class  UnknownUserException
      A class that contains user exceptions returned by the server.
      class  UserException
      The root class for CORBA IDL-defined user exceptions.
      class  ValueMember
      A description in the Interface Repository of a member of a value object.
      class  WrongTransaction
      The CORBA WrongTransaction user-defined exception.

    • Uses of IDLEntity in org.omg.CORBA.DynAnyPackage

      Classes in org.omg.CORBA.DynAnyPackage that implement IDLEntity
      Modifier and Type | Class and Description
      class  Invalid
      Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
      class  InvalidSeq
      The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
      class  | InvalidValue
      class  TypeMismatch
      TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

    • Uses of IDLEntity in org.omg.CORBA.ORBPackage

      Classes in org.omg.CORBA.ORBPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  InconsistentTypeCode
      InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
      class  InvalidName
      The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

    • Uses of IDLEntity in org.omg.CORBA.portable

      Subinterfaces of IDLEntity in org.omg.CORBA.portable
      Modifier and Type Interface and Description
      interface  CustomValue
      An extension of ValueBase that is implemented by custom value types.
      interface  StreamableValue
      Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
      interface  ValueBase
      The generated Java classes corresponding to valuetype IDL types implement this interface.

    • Uses of IDLEntity in org.omg.CORBA.TypeCodePackage

      Classes in org.omg.CORBA.TypeCodePackage that implement IDLEntity
      Modifier and Type Class and Description
      class  BadKind
      The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

    • Uses of IDLEntity in org.omg.CosNaming

      Subinterfaces of IDLEntity in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  BindingIterator
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      interface  NamingContext
      A naming context is an object that contains a set of name bindings in which each name is unique.
      interface  NamingContextExt
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Classes in org.omg.CosNaming that implement IDLEntity
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  _BindingIteratorStub
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  | _NamingContextImplBase
      class  _NamingContextStub
      A naming context is an object that contains a set of name bindings in which each name is unique.
      class  Binding
      org/omg/CosNaming/Binding.java .
      class  BindingType
      Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
      class  NameComponent
      org/omg/CosNaming/NameComponent.java .

    • Uses of IDLEntity in org.omg.CosNaming.NamingContextExtPackage

      Classes in org.omg.CosNaming.NamingContextExtPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  InvalidAddress
      org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java .

    • Uses of IDLEntity in org.omg.CosNaming.NamingContextPackage

      Classes in org.omg.CosNaming.NamingContextPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  AlreadyBound
      org/omg/CosNaming/NamingContextPackage/AlreadyBound.java .
      class  CannotProceed
      org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
      class  NotEmpty
      org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
      class  NotFound
      org/omg/CosNaming/NamingContextPackage/NotFound.java .
      class  NotFoundReason
      Indicates the reason for not able to resolve.

    • Uses of IDLEntity in org.omg.Dynamic

      Classes in org.omg.Dynamic that implement IDLEntity
      Modifier and Type Class and Description
      class  Parameter
      org/omg/Dynamic/Parameter.java .

    • Uses of IDLEntity in org.omg.DynamicAny

      Subinterfaces of IDLEntity in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynAny
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      interface  DynAnyFactory
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      interface  DynArray
      DynArray objects support the manipulation of IDL arrays.
      interface  DynEnum
      DynEnum objects support the manipulation of IDL enumerated values.
      interface  DynFixed
      DynFixed objects support the manipulation of IDL fixed values.
      interface  DynSequence
      DynSequence objects support the manipulation of IDL sequences.
      interface  DynStruct
      DynStruct objects support the manipulation of IDL struct and exception values.
      interface  DynUnion
      DynUnion objects support the manipulation of IDL unions.
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueCommon
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      Classes in org.omg.DynamicAny that implement IDLEntity
      Modifier and Type Class and Description
      class  _DynAnyFactoryStub
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      class  _DynAnyStub
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
      class  NameDynAnyPair
      org/omg/DynamicAny/NameDynAnyPair.java .

    • Uses of IDLEntity in org.omg.IOP

      Subinterfaces of IDLEntity in org.omg.IOP
      Modifier and Type Interface and Description
      interface  Codec
      The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
      interface  CodecFactory
      Codecs are obtained from the CodecFactory.
      Classes in org.omg.IOP that implement IDLEntity
      Modifier and Type Class and Description
      class  Encoding
      org/omg/IOP/Encoding.java .
      class  IOR
      org/omg/IOP/IOR.java .
      class  ServiceContext
      org/omg/IOP/ServiceContext.java .
      class  TaggedComponent
      org/omg/IOP/TaggedComponent.java .
      class  TaggedProfile
      org/omg/IOP/TaggedProfile.java .

    • Uses of IDLEntity in org.omg.IOP.CodecFactoryPackage

      Classes in org.omg.IOP.CodecFactoryPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  UnknownEncoding
      org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java .

    • Uses of IDLEntity in org.omg.IOP.CodecPackage

      Classes in org.omg.IOP.CodecPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  FormatMismatch
      org/omg/IOP/CodecPackage/FormatMismatch.java .
      class  InvalidTypeForEncoding
      org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java .

    • Uses of IDLEntity in org.omg.PortableInterceptor

      Subinterfaces of IDLEntity in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInfo
      Request Information, accessible to client-side request interceptors.
      interface  ClientRequestInterceptor
      Client-side request interceptor.
      interface  Interceptor
      All Portable Interceptors implement Interceptor.
      interface  IORInfo
      Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
      interface  IORInterceptor
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      interface  ObjectReferenceFactory
      The object reference factory.
      interface  ObjectReferenceTemplate
      The object reference template.
      interface  ORBInitializer
      Facilitates interceptor registration and ORB initialization.
      interface  ORBInitInfo
      Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
      interface  PolicyFactory
      Enables policy types to be constructed using CORBA.ORB.create_policy.
      interface  RequestInfo
      Request Information, accessible to Interceptors.
      interface  ServerRequestInfo
      Request Information, accessible to server-side request interceptors.
      interface  ServerRequestInterceptor
      Server-side request interceptor.
      Classes in org.omg.PortableInterceptor that implement IDLEntity
      Modifier and Type Class and Description
      class  InvalidSlot
      org/omg/PortableInterceptor/InvalidSlot.java .

    • Uses of IDLEntity in org.omg.PortableInterceptor.ORBInitInfoPackage

      Classes in org.omg.PortableInterceptor.ORBInitInfoPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  DuplicateName
      org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .

    • Uses of IDLEntity in org.omg.PortableServer

      Subinterfaces of IDLEntity in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  AdapterActivator
      An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
      interface  IdAssignmentPolicy
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
      interface  IdUniquenessPolicy
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
      interface  ImplicitActivationPolicy
      This policy specifies whether implicit activation of servants is supported in the created POA.
      interface  LifespanPolicy
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
      interface  POA
      A POA object manages the implementation of a collection of objects.
      interface  POAManager
      Each POA object has an associated POAManager object.
      interface  RequestProcessingPolicy
      This policy specifies how requests are processed by the created POA.
      interface  ServantActivator
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      interface  ServantLocator
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      interface  ServantManager
      A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
      interface  ServantRetentionPolicy
      This policy specifies whether the created POA retains active servants in an Active Object Map.
      interface  ThreadPolicy
      The ThreadPolicy specifies the threading model used with the created POA.
      Classes in org.omg.PortableServer that implement IDLEntity
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      class  ForwardRequest
      org/omg/PortableServer/ForwardRequest.java .
      class  IdAssignmentPolicyValue
      The IdAssignmentPolicyValue can have the following values.
      class  IdUniquenessPolicyValue
      IdUniquenessPolicyValue can have the following values.
      class  ImplicitActivationPolicyValue
      ImplicitActivationPolicyValue has the following semantics.
      class  LifespanPolicyValue
      The LifespanPolicyValue can have the following values.
      class  RequestProcessingPolicyValue
      The RequestProcessingPolicyValue can have the following values.
      class  ServantRetentionPolicyValue
      ServantRetentionPolicyValue can have the following values.
      class  ThreadPolicyValue
      The ThreadPolicyValue can have the following values.

    • Uses of IDLEntity in org.omg.PortableServer.CurrentPackage

      Classes in org.omg.PortableServer.CurrentPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  NoContext
      org/omg/PortableServer/CurrentPackage/NoContext.java .

    • Uses of IDLEntity in org.omg.PortableServer.POAManagerPackage

      Classes in org.omg.PortableServer.POAManagerPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  AdapterInactive
      org/omg/PortableServer/POAManagerPackage/AdapterInactive.java .
      class  State
      Specifies the states for the POAManager

    • Uses of IDLEntity in org.omg.PortableServer.POAPackage

      Classes in org.omg.PortableServer.POAPackage that implement IDLEntity
      Modifier and Type Class and Description
      class  AdapterAlreadyExists
      org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java .
      class  AdapterNonExistent
      org/omg/PortableServer/POAPackage/AdapterNonExistent.java .
      class  InvalidPolicy
      org/omg/PortableServer/POAPackage/InvalidPolicy.java .
      class  NoServant
      org/omg/PortableServer/POAPackage/NoServant.java .
      class  ObjectAlreadyActive
      org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java .
      class  ObjectNotActive
      org/omg/PortableServer/POAPackage/ObjectNotActive.java .
      class  ServantAlreadyActive
      org/omg/PortableServer/POAPackage/ServantAlreadyActive.java .
      class  ServantNotActive
      org/omg/PortableServer/POAPackage/ServantNotActive.java .
      class  WrongAdapter
      org/omg/PortableServer/POAPackage/WrongAdapter.java .
      class  WrongPolicy
      org/omg/PortableServer/POAPackage/WrongPolicy.java .

    • Uses of IDLEntity in org.omg.SendingContext

      Subinterfaces of IDLEntity in org.omg.SendingContext
      Modifier and Type Interface and Description
      interface  RunTime
      Defines the base class that represents the Sending Context of a request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.InvokeHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.InvokeHandler

  • Packages that use InvokeHandler
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of InvokeHandler in javax.rmi.CORBA

      Subinterfaces of InvokeHandler in javax.rmi.CORBA
      Modifier and Type Interface and Description
      interface  Tie
      Defines methods which all RMI-IIOP server side ties must implement.

    • Uses of InvokeHandler in org.omg.CosNaming

      Classes in org.omg.CosNaming that implement InvokeHandler
      Modifier and Type Class and Description
      class  BindingIteratorPOA
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  NamingContextExtPOA
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  NamingContextPOA
      A naming context is an object that contains a set of name bindings in which each name is unique.

    • Uses of InvokeHandler in org.omg.PortableServer

      Classes in org.omg.PortableServer that implement InvokeHandler
      Modifier and Type Class and Description
      class  ServantActivatorPOA
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  ServantLocatorPOA
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.ResponseHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.ResponseHandler

  • Packages that use ResponseHandler
    Package Description
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ResponseHandler in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type ResponseHandler
      Modifier and Type Method and Description
      OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
      Invoked by the ORB to dispatch a request to the servant.

    • Uses of ResponseHandler in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type ResponseHandler
      Modifier and Type | Method and Description
      OutputStream | NamingContextPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | BindingIteratorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | NamingContextExtPOA._invoke(String $method, InputStream in, ResponseHandler $rh)

    • Uses of ResponseHandler in org.omg.PortableServer

      Methods in org.omg.PortableServer with parameters of type ResponseHandler
      Modifier and Type | Method and Description
      OutputStream | ServantLocatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
      OutputStream | ServantActivatorPOA._invoke(String $method, InputStream in, ResponseHandler $rh)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.Streamable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.Streamable

  • Packages that use Streamable
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableServer.ServantLocatorPackage
    Provides classes and interfaces for locating the servant.

    • Uses of Streamable in org.omg.CORBA

      Classes in org.omg.CORBA that implement Streamable
      Modifier and Type Class and Description
      class  AnyHolder
      The Holder for Any.
      class  AnySeqHolder
      The Holder for AnySeq.
      class  BooleanHolder
      The Holder for Boolean.
      class  BooleanSeqHolder
      The Holder for BooleanSeq.
      class  ByteHolder
      The Holder for Byte.
      class  CharHolder
      The Holder for Char.
      class  CharSeqHolder
      The Holder for CharSeq.
      class  CurrentHolder
      The Holder for Current.
      class  DoubleHolder
      The Holder for Double.
      class  DoubleSeqHolder
      The Holder for DoubleSeq.
      class  FixedHolder
      The Holder for Fixed.
      class  FloatHolder
      The Holder for Float.
      class  FloatSeqHolder
      The Holder for FloatSeq.
      class  IntHolder
      The Holder for Int.
      class  LongHolder
      The Holder for Long.
      class  LongLongSeqHolder
      The Holder for LongLongSeq.
      class  LongSeqHolder
      The Holder for LongSeq.
      class  ObjectHolder
      The Holder for Object.
      class  OctetSeqHolder
      The Holder for OctetSeq.
      class  ParameterModeHolder
      Enumeration of parameter modes for Parameter.
      class  PolicyErrorHolder
      Thrown to indicate problems with parameter values passed to the ORB.create_policy operation.
      class  PolicyHolder
      The Holder for Policy.
      class  PolicyListHolder
      The Holder for PolicyList.
      class  PrincipalHolder
      Deprecated.
      Deprecated by CORBA 2.2.
      class  ServiceInformationHolder
      The Holder for ServiceInformation.
      class  ShortHolder
      The Holder for Short.
      class  ShortSeqHolder
      The Holder for ShortSeq.
      class  StringHolder
      The Holder for String.
      class  StringSeqHolder
      An array of Strings
      class  TypeCodeHolder
      The Holder for TypeCode.
      class  ULongLongSeqHolder
      The Holder for ULongLongSeq.
      class  ULongSeqHolder
      The Holder for ULongSeq.
      class  UnknownUserExceptionHolder
      The Holder for UnknownUserException.
      class  UShortSeqHolder
      The Holder for UShortSeq.
      class  ValueBaseHolder
      The Holder for ValueBase.
      class  WCharSeqHolder
      The Holder for WCharSeq.
      class  WrongTransactionHolder
      The Holder for WrongTransaction.
      class  WStringSeqHolder
      An array of WStrings
      Methods in org.omg.CORBA that return Streamable
      Modifier and Type Method and Description
      Streamable Any.extract_Streamable()
      Extracts a Streamable from this Any object's value field.
      Methods in org.omg.CORBA with parameters of type Streamable
      Modifier and Type Method and Description
      void Any.insert_Streamable(Streamable s)
      Inserts the given Streamable object into this Any object's value field.

    • Uses of Streamable in org.omg.CORBA.portable

      Subinterfaces of Streamable in org.omg.CORBA.portable
      Modifier and Type Interface and Description
      interface  StreamableValue
      Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.

    • Uses of Streamable in org.omg.CosNaming

      Classes in org.omg.CosNaming that implement Streamable
      Modifier and Type Class and Description
      class  BindingHolder
      org/omg/CosNaming/BindingHolder.java .
      class  BindingIteratorHolder
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  BindingListHolder
      List of Bindings.
      class  BindingTypeHolder
      Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
      class  NameComponentHolder
      org/omg/CosNaming/NameComponentHolder.java .
      class  NameHolder
      A name is a sequence of name components.
      class  NamingContextExtHolder
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  NamingContextHolder
      A naming context is an object that contains a set of name bindings in which each name is unique.

    • Uses of Streamable in org.omg.CosNaming.NamingContextExtPackage

      Classes in org.omg.CosNaming.NamingContextExtPackage that implement Streamable
      Modifier and Type Class and Description
      class  InvalidAddressHolder
      org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java .

    • Uses of Streamable in org.omg.CosNaming.NamingContextPackage

      Classes in org.omg.CosNaming.NamingContextPackage that implement Streamable
      Modifier and Type Class and Description
      class  AlreadyBoundHolder
      org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java .
      class  CannotProceedHolder
      org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java .
      class  InvalidNameHolder
      org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java .
      class  NotEmptyHolder
      org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java .
      class  NotFoundHolder
      org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java .
      class  NotFoundReasonHolder
      Indicates the reason for not able to resolve.

    • Uses of Streamable in org.omg.IOP

      Classes in org.omg.IOP that implement Streamable
      Modifier and Type Class and Description
      class  IORHolder
      org/omg/IOP/IORHolder.java .
      class  MultipleComponentProfileHolder
      An array of tagged components, forming a multiple component profile.
      class  ServiceContextHolder
      org/omg/IOP/ServiceContextHolder.java .
      class  ServiceContextListHolder
      An array of service contexts, forming a service context list.
      class  TaggedComponentHolder
      org/omg/IOP/TaggedComponentHolder.java .
      class  TaggedProfileHolder
      org/omg/IOP/TaggedProfileHolder.java .

    • Uses of Streamable in org.omg.PortableInterceptor

      Classes in org.omg.PortableInterceptor that implement Streamable
      Modifier and Type Class and Description
      class  IORInterceptor_3_0Holder
      org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java .
      class  ObjectReferenceFactoryHolder
      The object reference factory.
      class  ObjectReferenceTemplateHolder
      The object reference template.
      class  ObjectReferenceTemplateSeqHolder
      Sequence of object reference templates is used for reporting state changes that do not occur on the adapter manager.

    • Uses of Streamable in org.omg.PortableServer.ServantLocatorPackage

      Classes in org.omg.PortableServer.ServantLocatorPackage that implement Streamable
      Modifier and Type Class and Description
      class  CookieHolder
      The native type PortableServer::ServantLocator::Cookie is mapped to java.lang.Object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.StreamableValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.StreamableValue

No usage of org.omg.CORBA.portable.StreamableValue
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.ValueBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.ValueBase

  • Packages that use ValueBase
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ValueBase in org.omg.CORBA

      Subinterfaces of ValueBase in org.omg.CORBA
      Modifier and Type Interface and Description
      interface  DataInputStream
      Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
      interface  DataOutputStream
      Defines the methods used to write primitive data types to output streams for marshalling custom value types.

    • Uses of ValueBase in org.omg.CORBA.portable

      Subinterfaces of ValueBase in org.omg.CORBA.portable
      Modifier and Type Interface and Description
      interface  CustomValue
      An extension of ValueBase that is implemented by custom value types.
      interface  StreamableValue
      Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.

    • Uses of ValueBase in org.omg.PortableInterceptor

      Subinterfaces of ValueBase in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ObjectReferenceFactory
      The object reference factory.
      interface  ObjectReferenceTemplate
      The object reference template.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.ValueFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.ValueFactory

  • Packages that use ValueFactory
    Package Description
    org.omg.CORBA_2_3
    The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

    • Uses of ValueFactory in org.omg.CORBA_2_3

      Methods in org.omg.CORBA_2_3 that return ValueFactory
      Modifier and Type | Method and Description
      ValueFactory | ORB.lookup_value_factory(String id)
      ValueFactory | ORB.register_value_factory(String id, ValueFactory factory)
      Methods in org.omg.CORBA_2_3 with parameters of type ValueFactory
      Modifier and Type | Method and Description
      ValueFactory | ORB.register_value_factory(String id, ValueFactory factory)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.ValueInputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.ValueInputStream

No usage of org.omg.CORBA.portable.ValueInputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CORBA.portable.ValueOutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CORBA.portable.ValueOutputStream

No usage of org.omg.CORBA.portable.ValueOutputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class Delegate

  • java.lang.Object
    • org.omg.CORBA.portable.Delegate
  • Direct Known Subclasses:
    Delegate

    public abstract class Delegate
extends Object
    Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods. Each stub (proxy) contains a delegate object, to which all org.omg.CORBA.Object methods are forwarded. This allows a stub generated by one vendor's ORB to work with the delegate from another vendor's ORB.
    See Also:
    Object

    • Constructor Summary

      Constructors
      Constructor and Description
      Delegate()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      abstract Object duplicate(Object obj)
      Returns a duplicate of the object reference provided.
      boolean equals(Object self, Object obj)
      Provides the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
      DomainManager[] get_domain_managers(Object self)
      Retrieves the DomainManagers of this object.
      abstract Object get_interface_def(Object self)
      Return an InterfaceDef for the object reference provided.
      Policy get_policy(Object self, int policy_type)
      Returns the Policy object of the specified type which applies to this object.
      abstract int hash(Object obj, int max)
      Returns an ORB-internal identifier (hashcode) for this object reference.
      int hashCode(Object self)
      Provides the implementation to override the hashCode() method of the delegating CORBA object.
      InputStream invoke(Object self, OutputStream output)
      invoke is called by a stub to invoke an operation.
      abstract boolean is_a(Object obj, String repository_id)
      Checks if the object reference is an instance of the given interface.
      abstract boolean is_equivalent(Object obj, Object other)
      Determines if the two object references are equivalent.
      boolean is_local(Object self)
      Returns true if this object is implemented by a local servant.
      abstract boolean non_existent(Object obj)
      Determines whether the server object for the object reference has been destroyed.
      ORB orb(Object obj)
      Provides a reference to the orb associated with its parameter.
      abstract void release(Object obj)
      Releases resources associated with the object reference provided.
      void releaseReply(Object self, InputStream input)
      releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
      abstract Request request(Object obj, String operation)
      Creates a Request instance for use in the Dynamic Invocation Interface.
      OutputStream request(Object self, String operation, boolean responseExpected)
      request is called by a stub to obtain an OutputStream for marshaling arguments.
      void servant_postinvoke(Object self, ServantObject servant)
      servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
      ServantObject servant_preinvoke(Object self, String operation, Class expectedType)
      Returns a Java reference to the servant which should be used for this request.
      Object set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
      Associates the policies passed in with a newly created object reference that it returns.
      String toString(Object self)
      Provides the implementation to override the toString() method of the delegating CORBA object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Delegate

        public Delegate()

    • Method Detail

      • get_interface_def

        public abstract Object get_interface_def(Object self)
        Return an InterfaceDef for the object reference provided.
        Parameters:
        self - The object reference whose InterfaceDef needs to be returned
        Returns:
        the InterfaceDef

      • duplicate

        public abstract Object duplicate(Object obj)
        Returns a duplicate of the object reference provided.
        Parameters:
        obj - The object reference whose duplicate needs to be returned
        Returns:
        the duplicate object reference

      • release

        public abstract void release(Object obj)
        Releases resources associated with the object reference provided.
        Parameters:
        obj - The object reference whose resources need to be released

      • is_a

        public abstract boolean is_a(Object obj,
                             String repository_id)
        Checks if the object reference is an instance of the given interface.
        Parameters:
        obj - The object reference to be checked.
        repository_id - The repository identifier of the interface to check against.
        Returns:
        true if the object reference supports the interface

      • non_existent

        public abstract boolean non_existent(Object obj)
        Determines whether the server object for the object reference has been destroyed.
        Parameters:
        obj - The object reference which delegated to this delegate.
        Returns:
        true if the ORB knows authoritatively that the server object does not exist, false otherwise

      • is_equivalent

        public abstract boolean is_equivalent(Object obj,
                                      Object other)
        Determines if the two object references are equivalent.
        Parameters:
        obj - The object reference which delegated to this delegate.
        other - The object reference to check equivalence against.
        Returns:
        true if the objects are CORBA-equivalent.

      • hash

        public abstract int hash(Object obj,
                         int max)
        Returns an ORB-internal identifier (hashcode) for this object reference.
        Parameters:
        obj - The object reference which delegated to this delegate.
        max - specifies an upper bound on the hash value returned by the ORB.
        Returns:
        ORB-internal hash identifier for object reference

      • request

        public abstract Request request(Object obj,
                                String operation)
        Creates a Request instance for use in the Dynamic Invocation Interface.
        Parameters:
        obj - The object reference which delegated to this delegate.
        operation - The name of the operation to be invoked using the Request instance.
        Returns:
        the created Request instance

      • create_request

        public abstract Request create_request(Object obj,
                                       Context ctx,
                                       String operation,
                                       NVList arg_list,
                                       NamedValue result)
        Creates a Request instance for use in the Dynamic Invocation Interface.
        Parameters:
        obj - The object reference which delegated to this delegate.
        ctx - The context to be used.
        operation - The name of the operation to be invoked.
        arg_list - The arguments to the operation in the form of an NVList.
        result - A container for the result as a NamedValue.
        Returns:
        The created Request object.

      • create_request

        public abstract Request create_request(Object obj,
                                       Context ctx,
                                       String operation,
                                       NVList arg_list,
                                       NamedValue result,
                                       ExceptionList exclist,
                                       ContextList ctxlist)
        Creates a Request instance for use in the Dynamic Invocation Interface.
        Parameters:
        obj - The object reference which delegated to this delegate.
        ctx - The context to be used.
        operation - The name of the operation to be invoked.
        arg_list - The arguments to the operation in the form of an NVList.
        result - A container for the result as a NamedValue.
        exclist - A list of possible exceptions the operation can throw.
        ctxlist - A list of context strings that need to be resolved and sent with the Request.
        Returns:
        The created Request object.

      • orb

        public ORB orb(Object obj)
        Provides a reference to the orb associated with its parameter.
        Parameters:
        obj - the object reference which delegated to this delegate.
        Returns:
        the associated orb.
        See Also:
        portable package comments for unimplemented features

      • get_policy

        public Policy get_policy(Object self,
                         int policy_type)
        Returns the Policy object of the specified type which applies to this object.
        Parameters:
        self - The object reference which delegated to this delegate.
        policy_type - The type of policy to be obtained.
        Returns:
        A Policy object of the type specified by the policy_type parameter.
        Throws:
        BAD_PARAM - raised when the value of policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object.
        See Also:
        portable package comments for unimplemented features

      • get_domain_managers

        public DomainManager[] get_domain_managers(Object self)
        Retrieves the DomainManagers of this object. This allows administration services (and applications) to retrieve the domain managers, and hence the security and other policies applicable to individual objects that are members of the domain.
        Parameters:
        self - The object reference which delegated to this delegate.
        Returns:
        The list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.
        See Also:
        portable package comments for unimplemented features

      • set_policy_override

        public Object set_policy_override(Object self,
                                  Policy[] policies,
                                  SetOverrideType set_add)
        Associates the policies passed in with a newly created object reference that it returns. Only certain policies that pertain to the invocation of an operation at the client end can be overridden using this operation. Attempts to override any other policy will result in the raising of the CORBA::NO_PERMISSION exception.
        Parameters:
        self - The object reference which delegated to this delegate.
        policies - A sequence of references to Policy objects.
        set_add - Indicates whether these policies should be added onto any otheroverrides that already exist (ADD_OVERRIDE) in the object reference, or they should be added to a clean override free object reference (SET_OVERRIDE).
        Returns:
        A new object reference with the new policies associated with it.
        See Also:
        portable package comments for unimplemented features

      • is_local

        public boolean is_local(Object self)
        Returns true if this object is implemented by a local servant.
        Parameters:
        self - The object reference which delegated to this delegate.
        Returns:
        true only if the servant incarnating this object is located in this Java VM. Return false if the servant is not local or the ORB does not support local stubs for this particular servant. The default behavior of is_local() is to return false.

      • servant_preinvoke

        public ServantObject servant_preinvoke(Object self,
                                       String operation,
                                       Class expectedType)
        Returns a Java reference to the servant which should be used for this request. servant_preinvoke() is invoked by a local stub. If a ServantObject object is returned, then its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation, and cannot be used for more than one invocation.
        Parameters:
        self - The object reference which delegated to this delegate.
        operation - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.
        expectedType - a Class object representing the expected type of the servant. The expected type is the Class object associated with the operations class of the stub's interface (e.g. A stub for an interface Foo, would pass the Class object for the FooOperations interface).
        Returns:
        a ServantObject object. The method may return a null value if it does not wish to support this optimization (e.g. due to security, transactions, etc). The method must return null if the servant is not of the expected type.

      • servant_postinvoke

        public void servant_postinvoke(Object self,
                               ServantObject servant)
        servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant. This method must be called if servant_preinvoke() returned a non-null value, even if an exception was thrown by the servant's method. For this reason, the call to servant_postinvoke() should be placed in a Java finally clause.
        Parameters:
        self - The object reference which delegated to this delegate.
        servant - the instance of the ServantObject returned from the servant_preinvoke() method.

      • request

        public OutputStream request(Object self,
                            String operation,
                            boolean responseExpected)
        request is called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).
        Parameters:
        self - The object reference which delegated to this delegate.
        operation - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.
        responseExpected - false if the operation is a one way operation, and true otherwise.
        Returns:
        OutputStream the OutputStream into which request arguments can be marshaled.
        See Also:
        portable package comments for unimplemented features

      • invoke

        public InputStream invoke(Object self,
                          OutputStream output)
                   throws ApplicationException,
                          RemarshalException
        invoke is called by a stub to invoke an operation. The stub provides an OutputStream that was previously returned by a request() call. invoke returns an InputStream which contains the marshaled reply. If an exception occurs, invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
        Parameters:
        self - The object reference which delegated to this delegate.
        output - the OutputStream which contains marshaled arguments
        Returns:
        input the InputStream from which reply parameters can be unmarshaled.
        Throws:
        ApplicationException - thrown when implementation throws (upon invocation) an exception defined as part of its remote method definition.
        RemarshalException - thrown when remarshalling fails.
        See Also:
        portable package comments for unimplemented features

      • releaseReply

        public void releaseReply(Object self,
                         InputStream input)
        releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. The stub passes the InputStream returned by invoke() or ApplicationException.getInputStream(). A null value may also be passed to releaseReply, in which case the method is a noop.
        Parameters:
        self - The object reference which delegated to this delegate.
        input - the InputStream returned from invoke().
        See Also:
        portable package comments for unimplemented features

      • toString

        public String toString(Object self)
        Provides the implementation to override the toString() method of the delegating CORBA object.
        Parameters:
        self - the object reference that delegated to this delegate
        Returns:
        a String object that represents the object reference that delegated to this Delegate object

      • hashCode

        public int hashCode(Object self)
        Provides the implementation to override the hashCode() method of the delegating CORBA object.
        Parameters:
        self - the object reference that delegated to this delegate
        Returns:
        an int that represents the hashcode for the object reference that delegated to this Delegate object

      • equals

        public boolean equals(Object self,
                      Object obj)
        Provides the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
        Parameters:
        self - the object reference that delegated to this delegate
        obj - the Object with which to compare
        Returns:
        true if obj equals self; false otherwise
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IndirectionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class IndirectionException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.portable.IndirectionException
  • All Implemented Interfaces:
    Serializable

    public class IndirectionException
extends SystemException
    The Indirection exception is a Java specific system exception. It is thrown when the ORB's input stream is called to demarshal a value that is encoded as an indirection that is in the process of being demarshaled. This can occur when the ORB input stream calls the ValueHandler to demarshal an RMI value whose state contains a recursive reference to itself. Because the top-level ValueHandler.read_value() call has not yet returned a value, the ORB input stream's indirection table does not contain an entry for an object with the stream offset specified by the indirection tag. The stream offset is returned in the exception's offset field.
    See Also:
    InputStream, OutputStream

    • Field Summary

      Fields
      Modifier and Type Field and Description
      int offset
      Points to the stream's offset.

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      IndirectionException(int offset)
      Creates an IndirectionException with the right offset value.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • offset

        public int offset
        Points to the stream's offset.

    • Constructor Detail

      • IndirectionException

        public IndirectionException(int offset)
        Creates an IndirectionException with the right offset value. The stream offset is returned in the exception's offset field. This exception is constructed and thrown during reading recursively defined values off of a stream.
        Parameters:
        offset - the stream offset where recursion is detected.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class InputStream

  • java.lang.Object
    • java.io.InputStream
      • org.omg.CORBA.portable.InputStream
  • All Implemented Interfaces:
    Closeable, AutoCloseable
    Direct Known Subclasses:
    InputStream

    public abstract class InputStream
extends InputStream
    InputStream is the Java API for reading IDL types from CDR marshal streams. These methods are used by the ORB to unmarshal IDL types as well as to extract IDL types out of Anys. The _array versions of the methods can be directly used to read sequences and arrays of IDL types.
    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      InputStream()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      ORB orb()
      Returns the ORB that created this InputStream.
      abstract Any read_any()
      Reads an Any from this input stream.
      abstract void read_boolean_array(boolean[] value, int offset, int length)
      Reads an array of booleans from this input stream.
      abstract boolean read_boolean()
      Reads a boolean value from this input stream.
      abstract void read_char_array(char[] value, int offset, int length)
      Reads an array of chars from this input stream.
      abstract char read_char()
      Reads a char value from this input stream.
      Context read_Context()
      Reads a CORBA context from the stream.
      abstract void read_double_array(double[] value, int offset, int length)
      Reads an array of doubles from this input stream.
      abstract double read_double()
      Reads a double value from this input stream.
      BigDecimal read_fixed()
      Reads a BigDecimal number.
      abstract void read_float_array(float[] value, int offset, int length)
      Reads an array of floats from this input stream.
      abstract float read_float()
      Reads a float value from this input stream.
      abstract void read_long_array(int[] value, int offset, int length)
      Reads an array of CORBA longs (that is, Java ints) from this input stream.
      abstract int read_long()
      Reads a CORBA long (that is, Java int) value from this input stream.
      abstract void read_longlong_array(long[] value, int offset, int length)
      Reads an array of CORBA longlongs (that is, Java longs) from this input stream.
      abstract long read_longlong()
      Reads a CORBA longlong (that is, Java long) value from this input stream.
      abstract Object read_Object()
      Reads a CORBA object from this input stream.
      Object read_Object(Class clz)
      Unmarshals an object and returns a CORBA Object, which is an instance of the class passed as its argument.
      abstract void read_octet_array(byte[] value, int offset, int length)
      Reads an array of octets (that is, bytes) from this input stream.
      abstract byte read_octet()
      Reads an octet (that is, a byte) value from this input stream.
      Principal read_Principal()
      Deprecated.
      Deprecated by CORBA 2.2.
      abstract void read_short_array(short[] value, int offset, int length)
      Reads an array of shorts from this input stream.
      abstract short read_short()
      Reads a short value from this input stream.
      abstract String read_string()
      Reads a string value from this input stream.
      abstract TypeCode read_TypeCode()
      Reads a TypeCode from this input stream.
      abstract void read_ulong_array(int[] value, int offset, int length)
      Reads an array of unsigned CORBA longs (that is, Java ints) from this input stream.
      abstract int read_ulong()
      Reads an unsigned CORBA long (that is, Java int) value from this input stream.
      abstract void read_ulonglong_array(long[] value, int offset, int length)
      Reads an array of unsigned CORBA longlongs (that is, Java longs) from this input stream.
      abstract long read_ulonglong()
      Reads a CORBA unsigned longlong (that is, Java long) value from this input stream.
      abstract void read_ushort_array(short[] value, int offset, int length)
      Reads an array of unsigned shorts from this input stream.
      abstract short read_ushort()
      Reads a unsigned short value from this input stream.
      abstract void read_wchar_array(char[] value, int offset, int length)
      Reads an array of wide chars from this input stream.
      abstract char read_wchar()
      Reads a wide char value from this input stream.
      abstract String read_wstring()
      Reads a wide string value from this input stream.
      int read()
      Reads the next byte of data from the input stream.

      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, read, read, reset, skip

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InputStream

        public InputStream()

    • Method Detail

      • read_boolean

        public abstract boolean read_boolean()
        Reads a boolean value from this input stream.
        Returns:
        the boolean value read from this input stream

      • read_char

        public abstract char read_char()
        Reads a char value from this input stream.
        Returns:
        the char value read from this input stream

      • read_wchar

        public abstract char read_wchar()
        Reads a wide char value from this input stream.
        Returns:
        the char value read from this input stream

      • read_octet

        public abstract byte read_octet()
        Reads an octet (that is, a byte) value from this input stream.
        Returns:
        the byte value read from this input stream

      • read_short

        public abstract short read_short()
        Reads a short value from this input stream.
        Returns:
        the short value read from this input stream

      • read_ushort

        public abstract short read_ushort()
        Reads a unsigned short value from this input stream.
        Returns:
        the short value read from this input stream

      • read_long

        public abstract int read_long()
        Reads a CORBA long (that is, Java int) value from this input stream.
        Returns:
        the int value read from this input stream

      • read_ulong

        public abstract int read_ulong()
        Reads an unsigned CORBA long (that is, Java int) value from this input stream.
        Returns:
        the int value read from this input stream

      • read_longlong

        public abstract long read_longlong()
        Reads a CORBA longlong (that is, Java long) value from this input stream.
        Returns:
        the long value read from this input stream

      • read_ulonglong

        public abstract long read_ulonglong()
        Reads a CORBA unsigned longlong (that is, Java long) value from this input stream.
        Returns:
        the long value read from this input stream

      • read_float

        public abstract float read_float()
        Reads a float value from this input stream.
        Returns:
        the float value read from this input stream

      • read_double

        public abstract double read_double()
        Reads a double value from this input stream.
        Returns:
        the double value read from this input stream

      • read_string

        public abstract String read_string()
        Reads a string value from this input stream.
        Returns:
        the String value read from this input stream

      • read_wstring

        public abstract String read_wstring()
        Reads a wide string value from this input stream.
        Returns:
        the String value read from this input stream

      • read_boolean_array

        public abstract void read_boolean_array(boolean[] value,
                                        int offset,
                                        int length)
        Reads an array of booleans from this input stream.
        Parameters:
        value - returned array of booleans.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_char_array

        public abstract void read_char_array(char[] value,
                                     int offset,
                                     int length)
        Reads an array of chars from this input stream.
        Parameters:
        value - returned array of chars.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_wchar_array

        public abstract void read_wchar_array(char[] value,
                                      int offset,
                                      int length)
        Reads an array of wide chars from this input stream.
        Parameters:
        value - returned array of wide chars.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_octet_array

        public abstract void read_octet_array(byte[] value,
                                      int offset,
                                      int length)
        Reads an array of octets (that is, bytes) from this input stream.
        Parameters:
        value - returned array of octets (that is, bytes).
        offset - offset on the stream.
        length - length of buffer to read.

      • read_short_array

        public abstract void read_short_array(short[] value,
                                      int offset,
                                      int length)
        Reads an array of shorts from this input stream.
        Parameters:
        value - returned array of shorts.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_ushort_array

        public abstract void read_ushort_array(short[] value,
                                       int offset,
                                       int length)
        Reads an array of unsigned shorts from this input stream.
        Parameters:
        value - returned array of shorts.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_long_array

        public abstract void read_long_array(int[] value,
                                     int offset,
                                     int length)
        Reads an array of CORBA longs (that is, Java ints) from this input stream.
        Parameters:
        value - returned array of CORBA longs (that is, Java ints).
        offset - offset on the stream.
        length - length of buffer to read.

      • read_ulong_array

        public abstract void read_ulong_array(int[] value,
                                      int offset,
                                      int length)
        Reads an array of unsigned CORBA longs (that is, Java ints) from this input stream.
        Parameters:
        value - returned array of CORBA longs (that is, Java ints).
        offset - offset on the stream.
        length - length of buffer to read.

      • read_longlong_array

        public abstract void read_longlong_array(long[] value,
                                         int offset,
                                         int length)
        Reads an array of CORBA longlongs (that is, Java longs) from this input stream.
        Parameters:
        value - returned array of CORBA longs (that is, Java longs).
        offset - offset on the stream.
        length - length of buffer to read.

      • read_ulonglong_array

        public abstract void read_ulonglong_array(long[] value,
                                          int offset,
                                          int length)
        Reads an array of unsigned CORBA longlongs (that is, Java longs) from this input stream.
        Parameters:
        value - returned array of CORBA longs (that is, Java longs).
        offset - offset on the stream.
        length - length of buffer to read.

      • read_float_array

        public abstract void read_float_array(float[] value,
                                      int offset,
                                      int length)
        Reads an array of floats from this input stream.
        Parameters:
        value - returned array of floats.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_double_array

        public abstract void read_double_array(double[] value,
                                       int offset,
                                       int length)
        Reads an array of doubles from this input stream.
        Parameters:
        value - returned array of doubles.
        offset - offset on the stream.
        length - length of buffer to read.

      • read_Object

        public abstract Object read_Object()
        Reads a CORBA object from this input stream.
        Returns:
        the Object instance read from this input stream.

      • read_TypeCode

        public abstract TypeCode read_TypeCode()
        Reads a TypeCode from this input stream.
        Returns:
        the TypeCode instance read from this input stream.

      • read_any

        public abstract Any read_any()
        Reads an Any from this input stream.
        Returns:
        the Any instance read from this input stream.

      • read_Principal

        @Deprecated
public Principal read_Principal()
        Deprecated. Deprecated by CORBA 2.2.
        Returns principal for invocation.
        Returns:
        Principal for invocation.

      • read

        public int read()
         throws IOException
        Description copied from class: InputStream
        Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

        A subclass must provide an implementation of this method.

        Specified by:
        read in class InputStream
        Returns:
        the next byte of data, or -1 if the end of the stream is reached.
        Throws:
        IOException - if an I/O error occurs.
        See Also:
        portable package comments for unimplemented features

      • read_fixed

        public BigDecimal read_fixed()
        Reads a BigDecimal number.
        Returns:
        a java.math.BigDecimal number

      • read_Context

        public Context read_Context()
        Reads a CORBA context from the stream.
        Returns:
        a CORBA context
        See Also:
        portable package comments for unimplemented features

      • read_Object

        public Object read_Object(Class clz)
        Unmarshals an object and returns a CORBA Object, which is an instance of the class passed as its argument. This class is the stub class of the expected type.
        Parameters:
        clz - The Class object for the stub class which corresponds to the type that is statistically expected, or the Class object for the RMI/IDL interface type that is statistically expected.
        Returns:
        an Object instance of clz read from this stream
        See Also:
        portable package comments for unimplemented features

      • orb

        public ORB orb()
        Returns the ORB that created this InputStream.
        Returns:
        the ORB object that created this stream
        See Also:
        portable package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvokeHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface InvokeHandler

  • All Known Subinterfaces:
    Tie
    All Known Implementing Classes:
    BindingIteratorPOA, NamingContextExtPOA, NamingContextPOA, ServantActivatorPOA, ServantLocatorPOA

    public interface InvokeHandler
    This interface provides a dispatching mechanism for an incoming call. It is invoked by the ORB to dispatch a request to a servant.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      OutputStream _invoke(String method, InputStream input, ResponseHandler handler)
      Invoked by the ORB to dispatch a request to the servant.

    • Method Detail

      • _invoke

        OutputStream _invoke(String method,
                     InputStream input,
                     ResponseHandler handler)
              throws SystemException
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Parameters:
        method - The method name.
        input - The InputStream containing the marshalled arguments.
        handler - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply
        Throws:
        SystemException - is thrown when invocation fails due to a CORBA system exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class ObjectImpl

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
  • All Implemented Interfaces:
    Object
    Direct Known Subclasses:
    _BindingIteratorStub, _DynAnyFactoryStub, _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub, _IDLTypeStub, _NamingContextExtStub, _NamingContextStub, _PolicyStub, _ServantActivatorStub, _ServantLocatorStub, DynamicImplementation, ObjectImpl

    public abstract class ObjectImpl
extends Object
implements Object
    The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods. All method implementations are forwarded to a Delegate object stored in the ObjectImpl instance. ObjectImpl allows for portable stubs because the Delegate can be implemented by a different vendor-specific ORB.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectImpl()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
      Creates a Request object that contains the given context, method, argument list, and container for the result.
      Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
      Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
      Object _duplicate()
      Returns a duplicate of this ObjectImpl object.
      Delegate _get_delegate()
      Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
      DomainManager[] _get_domain_managers()
      Retrieves a list of the domain managers for this ObjectImpl object.
      Object _get_interface_def()
      Retrieves the interface definition for this ObjectImpl object.
      Policy _get_policy(int policy_type)
      Retrieves the Policy object for this ObjectImpl object that has the given policy type.
      int _hash(int maximum)
      Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
      abstract String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      InputStream _invoke(OutputStream output)
      Invokes an operation and returns an InputStream object for reading the response.
      boolean _is_a(String repository_id)
      Checks whether the object identified by the given repository identifier is an ObjectImpl object.
      boolean _is_equivalent(Object that)
      Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
      boolean _is_local()
      Checks whether this ObjectImpl object is implemented by a local servant.
      boolean _non_existent()
      Checks whether the server object for this ObjectImpl object has been destroyed.
      ORB _orb()
      Returns a reference to the ORB associated with this object and its delegate.
      void _release()
      Releases the resources associated with this ObjectImpl object.
      void _releaseReply(InputStream input)
      Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
      Request _request(String operation)
      Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
      OutputStream _request(String operation, boolean responseExpected)
      Returns an OutputStream object to use for marshalling the arguments of the given method.
      void _servant_postinvoke(ServantObject servant)
      Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
      ServantObject _servant_preinvoke(String operation, Class expectedType)
      Returns a Java reference to the local servant that should be used for sending a request for the method specified.
      void _set_delegate(Delegate delegate)
      Sets the Delegate for this ObjectImpl instance to the given Delegate object.
      Object _set_policy_override(Policy[] policies, SetOverrideType set_add)
      Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
      boolean equals(Object obj)
      Compares this ObjectImpl object with the given one for equality.
      int hashCode()
      Returns the hash code for this ObjectImpl object.
      String toString()
      Returns a String object that represents this ObjectImpl object.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ObjectImpl

        public ObjectImpl()

    • Method Detail

      • _get_delegate

        public Delegate _get_delegate()
        Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
        Returns:
        the Delegate contained in this ObjectImpl instance
        Throws:
        BAD_OPERATION - if the delegate has not been set
        See Also:
        _set_delegate(org.omg.CORBA.portable.Delegate)

      • _set_delegate

        public void _set_delegate(Delegate delegate)
        Sets the Delegate for this ObjectImpl instance to the given Delegate object. All method invocations on this ObjectImpl object will be forwarded to this delegate.
        Parameters:
        delegate - the Delegate instance to which all method calls on this ObjectImpl object will be delegated; may be implemented by a third-party ORB
        See Also:
        _get_delegate()

      • _ids

        public abstract String[] _ids()
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance

      • _duplicate

        public Object _duplicate()
        Returns a duplicate of this ObjectImpl object.
        Specified by:
        _duplicate in interface Object
        Returns:
        an orb.omg.CORBA.Object object that is a duplicate of this object

      • _release

        public void _release()
        Releases the resources associated with this ObjectImpl object.
        Specified by:
        _release in interface Object

      • _is_a

        public boolean _is_a(String repository_id)
        Checks whether the object identified by the given repository identifier is an ObjectImpl object.
        Specified by:
        _is_a in interface Object
        Parameters:
        repository_id - a String object with the repository identifier to check
        Returns:
        true if the object identified by the given repository id is an instance of ObjectImpl; false otherwise

      • _is_equivalent

        public boolean _is_equivalent(Object that)
        Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
        Specified by:
        _is_equivalent in interface Object
        Parameters:
        that - an instance of ObjectImpl to compare with this ObjectImpl object
        Returns:
        true if the given object is equivalent to this ObjectImpl object; false otherwise

      • _non_existent

        public boolean _non_existent()
        Checks whether the server object for this ObjectImpl object has been destroyed.
        Specified by:
        _non_existent in interface Object
        Returns:
        true if the ORB knows authoritatively that the server object does not exist; false otherwise

      • _hash

        public int _hash(int maximum)
        Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
        Specified by:
        _hash in interface Object
        Parameters:
        maximum - an int indicating the upper bound on the hash value returned by the ORB
        Returns:
        an int representing the hash code for this ObjectImpl object

      • _request

        public Request _request(String operation)
        Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
        Specified by:
        _request in interface Object
        Parameters:
        operation - the method to be invoked by the new Request object
        Returns:
        a new Request object initialized with the given method

      • _create_request

        public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
        Creates a Request object that contains the given context, method, argument list, and container for the result.
        Specified by:
        _create_request in interface Object
        Parameters:
        ctx - the Context for the request
        operation - the method that the new Request object will invoke
        arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
        result - a NamedValue object to be used for returning the result of executing the request's method
        Returns:
        a new Request object initialized with the given context, method, argument list, and container for the return value
        See Also:
        Request, NVList, NamedValue

      • _create_request

        public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result,
                               ExceptionList exceptions,
                               ContextList contexts)
        Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings. This Request object is for use in the Dynamic Invocation Interface.
        Specified by:
        _create_request in interface Object
        Parameters:
        ctx - the Context object that contains the context strings that must be resolved before they are sent along with the request
        operation - the method that the new Request object will invoke
        arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
        result - a NamedValue object to be used for returning the result of executing the request's method
        exceptions - a list of the exceptions that the given method throws
        contexts - a list of the properties that are needed to resolve the contexts in ctx; the strings in contexts are used as arguments to the method Context.get_values, which returns the value associated with the given property
        Returns:
        a new Request object initialized with the given context strings to resolve, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings
        See Also:
        Request, NVList, NamedValue, ExceptionList, ContextList

      • _get_interface_def

        public Object _get_interface_def()
        Retrieves the interface definition for this ObjectImpl object.
        Specified by:
        _get_interface_def in interface Object
        Returns:
        the org.omg.CORBA.Object instance that is the interface definition for this ObjectImpl object

      • _orb

        public ORB _orb()
        Returns a reference to the ORB associated with this object and its delegate. This is the ORB object that created the delegate.
        Returns:
        the ORB instance that created the Delegate object contained in this ObjectImpl object

      • _get_policy

        public Policy _get_policy(int policy_type)
        Retrieves the Policy object for this ObjectImpl object that has the given policy type.
        Specified by:
        _get_policy in interface Object
        Parameters:
        policy_type - an int indicating the policy type
        Returns:
        the Policy object that is the specified policy type and that applies to this ObjectImpl object
        See Also:
        PolicyOperations.policy_type()

      • _get_domain_managers

        public DomainManager[] _get_domain_managers()
        Retrieves a list of the domain managers for this ObjectImpl object.
        Specified by:
        _get_domain_managers in interface Object
        Returns:
        an array containing the DomainManager objects for this instance of ObjectImpl

      • _set_policy_override

        public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
        Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
        Specified by:
        _set_policy_override in interface Object
        Parameters:
        policies - an array of Policy objects with the policies that will replace the current policies or be added to the current policies
        set_add - either SetOverrideType.SET_OVERRIDE, indicating that the given policies will replace any existing ones, or SetOverrideType.ADD_OVERRIDE, indicating that the given policies should be added to any existing ones
        Returns:
        an Object with the given policies replacing or added to its previous policies

      • _is_local

        public boolean _is_local()
        Checks whether this ObjectImpl object is implemented by a local servant. If so, local invocation API's may be used.
        Returns:
        true if this object is implemented by a local servant; false otherwise

      • _servant_preinvoke

        public ServantObject _servant_preinvoke(String operation,
                                        Class expectedType)
        Returns a Java reference to the local servant that should be used for sending a request for the method specified. If this ObjectImpl object is a local stub, it will invoke the _servant_preinvoke method before sending a request in order to obtain the ServantObject instance to use.

        If a ServantObject object is returned, its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation and cannot be used for more than one invocation.

        Parameters:
        operation - a String containing the name of the method to be invoked. This name should correspond to the method name as it would be encoded in a GIOP request.
        expectedType - a Class object representing the expected type of the servant that is returned. This expected type is the Class object associated with the operations class for the stub's interface. For example, a stub for an interface Foo would pass the Class object for the FooOperations interface.
        Returns:
        (1) a ServantObject object, which may or may not be the actual servant instance, or (2) null if (a) the servant is not local or (b) the servant has ceased to be local due to a ForwardRequest from a POA ServantManager
        Throws:
        BAD_PARAM - if the servant is not the expected type

      • _servant_postinvoke

        public void _servant_postinvoke(ServantObject servant)
        Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke. The _servant_postinvoke method must be called if the _servant_preinvoke method returned a non-null value, even if an exception was thrown by the method invoked by the servant. For this reason, the call to the method _servant_postinvoke should be placed in a Java finally clause.
        Parameters:
        servant - the instance of the ServantObject returned by the _servant_preinvoke method

      • _request

        public OutputStream _request(String operation,
                             boolean responseExpected)
        Returns an OutputStream object to use for marshalling the arguments of the given method. This method is called by a stub, which must indicate if a response is expected, that is, whether or not the call is oneway.
        Parameters:
        operation - a String giving the name of the method.
        responseExpected - a boolean -- true if the request is not one way, that is, a response is expected
        Returns:
        an OutputStream object for dispatching the request

      • _invoke

        public InputStream _invoke(OutputStream output)
                    throws ApplicationException,
                           RemarshalException
        Invokes an operation and returns an InputStream object for reading the response. The stub provides the OutputStream object that was previously returned by a call to the _request method. The method specified as an argument to _request when it was called previously is the method that this method invokes.

        If an exception occurs, the _invoke method may throw an ApplicationException object that contains an InputStream from which the user exception state may be unmarshalled.

        Parameters:
        output - an OutputStream object for dispatching the request
        Returns:
        an InputStream object containing the marshalled response to the method invoked
        Throws:
        ApplicationException - if the invocation meets application-defined exception
        RemarshalException - if the invocation leads to a remarshalling error
        See Also:
        _request(java.lang.String)

      • _releaseReply

        public void _releaseReply(InputStream input)
        Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke. Calling this method is optional for the stub.
        Parameters:
        input - the InputStream object that was returned by the _invoke method or the ApplicationException.getInputStream method; may be null, in which case this method does nothing
        See Also:
        _invoke(org.omg.CORBA.portable.OutputStream)

      • toString

        public String toString()
        Returns a String object that represents this ObjectImpl object.
        Overrides:
        toString in class Object
        Returns:
        the String representation of this object

      • hashCode

        public int hashCode()
        Returns the hash code for this ObjectImpl object.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code for this object
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • equals

        public boolean equals(Object obj)
        Compares this ObjectImpl object with the given one for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object with which to compare this object
        Returns:
        true if the two objects are equal; false otherwise
        See Also:
        Object.hashCode(), HashMap
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class OutputStream

  • java.lang.Object
    • java.io.OutputStream
      • org.omg.CORBA.portable.OutputStream
  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable
    Direct Known Subclasses:
    OutputStream

    public abstract class OutputStream
extends OutputStream
    OuputStream is the Java API for writing IDL types to CDR marshal streams. These methods are used by the ORB to marshal IDL types as well as to insert IDL types into Anys. The _array versions of the methods can be directly used to write sequences and arrays of IDL types.
    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      OutputStream()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      abstract InputStream create_input_stream()
      Returns an input stream with the same buffer.
      ORB orb()
      Returns the ORB that created this OutputStream.
      abstract void write_any(Any value)
      Writes an Any on this output stream.
      abstract void write_boolean_array(boolean[] value, int offset, int length)
      Writes an array of booleans on this output stream.
      abstract void write_boolean(boolean value)
      Writes a boolean value to this stream.
      abstract void write_char_array(char[] value, int offset, int length)
      Writes an array of chars on this output stream.
      abstract void write_char(char value)
      Writes a char value to this stream.
      void write_Context(Context ctx, ContextList contexts)
      Writes a CORBA context on this stream.
      abstract void write_double_array(double[] value, int offset, int length)
      Writes an array of doubles on this output stream.
      abstract void write_double(double value)
      Writes a double value to this stream.
      void write_fixed(BigDecimal value)
      Writes a BigDecimal number.
      abstract void write_float_array(float[] value, int offset, int length)
      Writes an array of floats on this output stream.
      abstract void write_float(float value)
      Writes a float value to this stream.
      abstract void write_long_array(int[] value, int offset, int length)
      Writes an array of CORBA longs (i.e.
      abstract void write_long(int value)
      Writes a CORBA long (i.e.
      abstract void write_longlong_array(long[] value, int offset, int length)
      Writes an array of CORBA longlongs (i.e.
      abstract void write_longlong(long value)
      Writes a CORBA longlong (i.e.
      abstract void write_Object(Object value)
      Writes a CORBA Object on this output stream.
      abstract void write_octet_array(byte[] value, int offset, int length)
      Writes an array of CORBA octets (bytes) on this output stream.
      abstract void write_octet(byte value)
      Writes a CORBA octet (i.e.
      void write_Principal(Principal value)
      Deprecated.
      Deprecated by CORBA 2.2.
      abstract void write_short_array(short[] value, int offset, int length)
      Writes an array of shorts on this output stream.
      abstract void write_short(short value)
      Writes a short value to this stream.
      abstract void write_string(String value)
      Writes a string value to this stream.
      abstract void write_TypeCode(TypeCode value)
      Writes a TypeCode on this output stream.
      abstract void write_ulong_array(int[] value, int offset, int length)
      Writes an array of unsigned CORBA longs (i.e.
      abstract void write_ulong(int value)
      Writes an unsigned CORBA long (i.e.
      abstract void write_ulonglong_array(long[] value, int offset, int length)
      Writes an array of unsigned CORBA longlongs (i.e.
      abstract void write_ulonglong(long value)
      Writes an unsigned CORBA longlong (i.e.
      abstract void write_ushort_array(short[] value, int offset, int length)
      Writes an array of unsigned shorts on this output stream.
      abstract void write_ushort(short value)
      Writes an unsigned short value to this stream.
      abstract void write_wchar_array(char[] value, int offset, int length)
      Writes an array of wide chars on this output stream.
      abstract void write_wchar(char value)
      Writes a wide char value to this stream.
      abstract void write_wstring(String value)
      Writes a wide string value to this stream.
      void write(int b)
      Writes an integer (length of arrays) onto this stream.

      • Methods inherited from class java.io.OutputStream

        close, flush, write, write

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • OutputStream

        public OutputStream()

    • Method Detail

      • create_input_stream

        public abstract InputStream create_input_stream()
        Returns an input stream with the same buffer.
        Returns:
        an input stream with the same buffer.

      • write_boolean

        public abstract void write_boolean(boolean value)
        Writes a boolean value to this stream.
        Parameters:
        value - the value to be written.

      • write_char

        public abstract void write_char(char value)
        Writes a char value to this stream.
        Parameters:
        value - the value to be written.

      • write_wchar

        public abstract void write_wchar(char value)
        Writes a wide char value to this stream.
        Parameters:
        value - the value to be written.

      • write_octet

        public abstract void write_octet(byte value)
        Writes a CORBA octet (i.e. byte) value to this stream.
        Parameters:
        value - the value to be written.

      • write_short

        public abstract void write_short(short value)
        Writes a short value to this stream.
        Parameters:
        value - the value to be written.

      • write_ushort

        public abstract void write_ushort(short value)
        Writes an unsigned short value to this stream.
        Parameters:
        value - the value to be written.

      • write_long

        public abstract void write_long(int value)
        Writes a CORBA long (i.e. Java int) value to this stream.
        Parameters:
        value - the value to be written.

      • write_ulong

        public abstract void write_ulong(int value)
        Writes an unsigned CORBA long (i.e. Java int) value to this stream.
        Parameters:
        value - the value to be written.

      • write_longlong

        public abstract void write_longlong(long value)
        Writes a CORBA longlong (i.e. Java long) value to this stream.
        Parameters:
        value - the value to be written.

      • write_ulonglong

        public abstract void write_ulonglong(long value)
        Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
        Parameters:
        value - the value to be written.

      • write_float

        public abstract void write_float(float value)
        Writes a float value to this stream.
        Parameters:
        value - the value to be written.

      • write_double

        public abstract void write_double(double value)
        Writes a double value to this stream.
        Parameters:
        value - the value to be written.

      • write_string

        public abstract void write_string(String value)
        Writes a string value to this stream.
        Parameters:
        value - the value to be written.

      • write_wstring

        public abstract void write_wstring(String value)
        Writes a wide string value to this stream.
        Parameters:
        value - the value to be written.

      • write_boolean_array

        public abstract void write_boolean_array(boolean[] value,
                                         int offset,
                                         int length)
        Writes an array of booleans on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_char_array

        public abstract void write_char_array(char[] value,
                                      int offset,
                                      int length)
        Writes an array of chars on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_wchar_array

        public abstract void write_wchar_array(char[] value,
                                       int offset,
                                       int length)
        Writes an array of wide chars on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_octet_array

        public abstract void write_octet_array(byte[] value,
                                       int offset,
                                       int length)
        Writes an array of CORBA octets (bytes) on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_short_array

        public abstract void write_short_array(short[] value,
                                       int offset,
                                       int length)
        Writes an array of shorts on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_ushort_array

        public abstract void write_ushort_array(short[] value,
                                        int offset,
                                        int length)
        Writes an array of unsigned shorts on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_long_array

        public abstract void write_long_array(int[] value,
                                      int offset,
                                      int length)
        Writes an array of CORBA longs (i.e. Java ints) on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_ulong_array

        public abstract void write_ulong_array(int[] value,
                                       int offset,
                                       int length)
        Writes an array of unsigned CORBA longs (i.e. Java ints) on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_longlong_array

        public abstract void write_longlong_array(long[] value,
                                          int offset,
                                          int length)
        Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_ulonglong_array

        public abstract void write_ulonglong_array(long[] value,
                                           int offset,
                                           int length)
        Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_float_array

        public abstract void write_float_array(float[] value,
                                       int offset,
                                       int length)
        Writes an array of floats on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_double_array

        public abstract void write_double_array(double[] value,
                                        int offset,
                                        int length)
        Writes an array of doubles on this output stream.
        Parameters:
        value - the array to be written.
        offset - offset on the stream.
        length - length of buffer to write.

      • write_Object

        public abstract void write_Object(Object value)
        Writes a CORBA Object on this output stream.
        Parameters:
        value - the value to be written.

      • write_TypeCode

        public abstract void write_TypeCode(TypeCode value)
        Writes a TypeCode on this output stream.
        Parameters:
        value - the value to be written.

      • write_any

        public abstract void write_any(Any value)
        Writes an Any on this output stream.
        Parameters:
        value - the value to be written.

      • write_Principal

        @Deprecated
public void write_Principal(Principal value)
        Deprecated. Deprecated by CORBA 2.2.
        Writes a Principle on this output stream.
        Parameters:
        value - the value to be written.

      • write

        public void write(int b)
           throws IOException
        Writes an integer (length of arrays) onto this stream.
        Specified by:
        write in class OutputStream
        Parameters:
        b - the value to be written.
        Throws:
        IOException - if there is an input/output error
        See Also:
        portable package comments for unimplemented features

      • write_fixed

        public void write_fixed(BigDecimal value)
        Writes a BigDecimal number.
        Parameters:
        value - a BidDecimal--value to be written.

      • write_Context

        public void write_Context(Context ctx,
                          ContextList contexts)
        Writes a CORBA context on this stream. The Context is marshaled as a sequence of strings. Only those Context values specified in the contexts parameter are actually written.
        Parameters:
        ctx - a CORBA context
        contexts - a ContextList object containing the list of contexts to be written
        See Also:
        portable package comments for unimplemented features

      • orb

        public ORB orb()
        Returns the ORB that created this OutputStream.
        Returns:
        the ORB that created this OutputStream
        See Also:
        portable package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RemarshalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class RemarshalException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.portable.RemarshalException
  • All Implemented Interfaces:
    Serializable

    public final class RemarshalException
extends Exception
    This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB. In this case the ORB must remarshal the request before trying again. Stubs which use the stream-based model shall catch the RemarshalException which is potentially thrown from the _invoke() method of ObjectImpl. Upon catching the exception, the stub shall immediately remarshal the request by calling _request(), marshalling the arguments (if any), and then calling _invoke(). The stub shall repeat this process until _invoke() returns normally or raises some exception other than RemarshalException.

    • Constructor Summary

      Constructors
      Constructor and Description
      RemarshalException()
      Constructs a RemarshalException.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • RemarshalException

        public RemarshalException()
        Constructs a RemarshalException.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ResponseHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface ResponseHandler

  • public interface ResponseHandler
    This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      OutputStream createExceptionReply()
      Called by the servant during a method invocation.
      OutputStream createReply()
      Called by the servant during a method invocation.

    • Method Detail

      • createReply

        OutputStream createReply()
        Called by the servant during a method invocation. The servant should call this method to create a reply marshal buffer if no exception occurred.
        Returns:
        an OutputStream suitable for marshalling the reply.
        See Also:
        portable package comments for unimplemented features

      • createExceptionReply

        OutputStream createExceptionReply()
        Called by the servant during a method invocation. The servant should call this method to create a reply marshal buffer if a user exception occurred.
        Returns:
        an OutputStream suitable for marshalling the exception ID and the user exception body.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantObject

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class ServantObject

  • java.lang.Object
    • org.omg.CORBA.portable.ServantObject

  • public class ServantObject
extends Object
    This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e. clients and servers residing in the same Java VM). The local stub API is supported via three additional methods on ObjectImpl and Delegate. ORB vendors may subclass this class to return additional request state that may be required by their implementations.
    See Also:
    ObjectImpl, Delegate

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Object servant
      The real servant.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantObject()

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • servant

        public Object servant
        The real servant. The local stub may cast this field to the expected type, and then invoke the operation directly. Note, the object may or may not be the actual servant instance.

    • Constructor Detail

      • ServantObject

        public ServantObject()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Streamable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface Streamable

  • All Known Subinterfaces:
    StreamableValue
    All Known Implementing Classes:
    AlreadyBoundHolder, AnyHolder, AnySeqHolder, BindingHolder, BindingIteratorHolder, BindingListHolder, BindingTypeHolder, BooleanHolder, BooleanSeqHolder, ByteHolder, CannotProceedHolder, CharHolder, CharSeqHolder, CookieHolder, CurrentHolder, DoubleHolder, DoubleSeqHolder, FixedHolder, FloatHolder, FloatSeqHolder, IntHolder, InvalidAddressHolder, InvalidNameHolder, IORHolder, IORInterceptor_3_0Holder, LongHolder, LongLongSeqHolder, LongSeqHolder, MultipleComponentProfileHolder, NameComponentHolder, NameHolder, NamingContextExtHolder, NamingContextHolder, NotEmptyHolder, NotFoundHolder, NotFoundReasonHolder, ObjectHolder, ObjectReferenceFactoryHolder, ObjectReferenceTemplateHolder, ObjectReferenceTemplateSeqHolder, OctetSeqHolder, ParameterModeHolder, PolicyErrorHolder, PolicyHolder, PolicyListHolder, PrincipalHolder, ServiceContextHolder, ServiceContextListHolder, ServiceInformationHolder, ShortHolder, ShortSeqHolder, StringHolder, StringSeqHolder, TaggedComponentHolder, TaggedProfileHolder, TypeCodeHolder, ULongLongSeqHolder, ULongSeqHolder, UnknownUserExceptionHolder, UShortSeqHolder, ValueBaseHolder, WCharSeqHolder, WrongTransactionHolder, WStringSeqHolder

    public interface Streamable
    The base class for the Holder classess of all complex IDL types. The ORB treats all generated Holders as Streamable to invoke the methods for marshalling and unmarshalling.
    Since:
    JDK1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void _read(InputStream istream)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream ostream)
      Marshals to ostream the value in the value field of the Holder.

    • Method Detail

      • _read

        void _read(InputStream istream)
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Parameters:
        istream - the InputStream that represents the CDR data from the wire.

      • _write

        void _write(OutputStream ostream)
        Marshals to ostream the value in the value field of the Holder.
        Parameters:
        ostream - the CDR OutputStream

      • _type

        TypeCode _type()
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Class UnknownException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.portable.UnknownException
  • All Implemented Interfaces:
    Serializable

    public class UnknownException
extends SystemException
    The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs. It provides a Java representation of an UNKNOWN system exception that has an UnknownExceptionInfo service context. If the CORBA system exception org.omg.CORBA.portable.UnknownException is thrown, then the stub does one of the following: (1) Translates it to org.omg.CORBA.UNKNOWN. (2) Translates it to the nested exception that the UnknownException contains. (3) Passes it on directly to the user.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Throwable originalEx
      A throwable--the original exception that was wrapped in a CORBA UnknownException.

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownException(Throwable ex)
      Constructs an UnknownException object.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • originalEx

        public Throwable originalEx
        A throwable--the original exception that was wrapped in a CORBA UnknownException.

    • Constructor Detail

      • UnknownException

        public UnknownException(Throwable ex)
        Constructs an UnknownException object.
        Parameters:
        ex - a Throwable object--to be wrapped in this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface ValueBase

  • All Superinterfaces:
    IDLEntity, Serializable
    All Known Subinterfaces:
    CustomValue, DataInputStream, DataOutputStream, ObjectReferenceFactory, ObjectReferenceTemplate, StreamableValue

    public interface ValueBase
extends IDLEntity
    The generated Java classes corresponding to valuetype IDL types implement this interface. In other words, the Java mapping of valuetype objects implement the ValueBase interface. The generated Java class for valuetype's shall provide an implementation of the ValueBase interface for the corresponding value type. For value types that are streamable (i.e. non-custom), the generated Java class shall also provide an implementation for the org.omg.CORBA.portable.Streamable interface. (CORBA::ValueBase is mapped to java.io.Serializable.)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String[] _truncatable_ids()
      Provides truncatable repository ids.

    • Method Detail

      • _truncatable_ids

        String[] _truncatable_ids()
        Provides truncatable repository ids.
        Returns:
        a String array--list of truncatable repository ids.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface ValueFactory

  • public interface ValueFactory
    The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory. The read_value() method is called by the ORB runtime while in the process of unmarshaling a value type. A user shall implement this method as part of implementing a type specific value factory. In the implementation, the user shall call is.read_value(java.io.Serializable) with a uninitialized valuetype to use for unmarshaling. The value returned by the stream is the same value passed in, with all the data unmarshaled.
    See Also:
    ORB

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Serializable read_value(InputStream is)
      Is called by the ORB runtime while in the process of unmarshaling a value type.

    • Method Detail

      • read_value

        Serializable read_value(InputStream is)
        Is called by the ORB runtime while in the process of unmarshaling a value type. A user shall implement this method as part of implementing a type specific value factory.
        Parameters:
        is - an InputStream object--from which the value will be read.
        Returns:
        a Serializable object--the value read off of "is" Input stream.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueInputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface ValueInputStream

  • public interface ValueInputStream
    Java to IDL ptc 02-01-12 1.5.1.4 ValueInputStream is used for implementing RMI-IIOP stream format version 2.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void end_value()
      The end_value method reads the end tag for the nested custom valuetype (after skipping any data that precedes the end tag) and decrements the valuetype nesting depth.
      void start_value()
      The start_value method reads a valuetype header for a nested custom valuetype and increments the valuetype nesting depth.

    • Method Detail

      • start_value

        void start_value()
        The start_value method reads a valuetype header for a nested custom valuetype and increments the valuetype nesting depth.

      • end_value

        void end_value()
        The end_value method reads the end tag for the nested custom valuetype (after skipping any data that precedes the end tag) and decrements the valuetype nesting depth.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueOutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.portable

Interface ValueOutputStream

  • public interface ValueOutputStream
    Java to IDL ptc 02-01-12 1.5.1.3 ValueOutputStream is used for implementing RMI-IIOP stream format version 2.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void end_value()
      The end_value method ends any currently open chunk, writes the end tag for the nested custom valuetype, and decrements the valuetype nesting depth.
      void start_value(String rep_id)
      The start_value method ends any currently open chunk, writes a valuetype header for a nested custom valuetype (with a null codebase and the specified repository ID), and increments the valuetype nesting depth.

    • Method Detail

      • start_value

        void start_value(String rep_id)
        The start_value method ends any currently open chunk, writes a valuetype header for a nested custom valuetype (with a null codebase and the specified repository ID), and increments the valuetype nesting depth.

      • end_value

        void end_value()
        The end_value method ends any currently open chunk, writes the end tag for the nested custom valuetype, and decrements the valuetype nesting depth.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Principal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Principal

  • java.lang.Object
    • org.omg.CORBA.Principal
  • Deprecated.
    Deprecated by CORBA 2.2.

    @Deprecated
public class Principal
extends Object
    A class that contains information about the identity of the client, for access control and other purposes. It contains a single attribute, the name of the Principal, encoded as a sequence of bytes.

    • Constructor Summary

      Constructors
      Constructor and Description
      Principal()
      Deprecated.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      byte[] name()
      Deprecated.
      Deprecated by CORBA 2.2.
      void name(byte[] value)
      Deprecated.
      Deprecated by CORBA 2.2.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Principal

        public Principal()
        Deprecated.

    • Method Detail

      • name

        @Deprecated
public void name(byte[] value)
        Deprecated. Deprecated by CORBA 2.2.
        Sets the name of this Principal object to the given value.
        Parameters:
        value - the value to be set in the Principal

      • name

        @Deprecated
public byte[] name()
        Deprecated. Deprecated by CORBA 2.2.
        Gets the name of this Principal object.
        Returns:
        the name of this Principal object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PrincipalHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class PrincipalHolder

  • java.lang.Object
    • org.omg.CORBA.PrincipalHolder
  • All Implemented Interfaces:
    Streamable
    Deprecated.
    Deprecated by CORBA 2.2.

    @Deprecated
public final class PrincipalHolder
extends Object
implements Streamable
    The Holder for Principal. For more information on Holder files, see "Generated Files: Holder Files".

    A container class for values of type Principal that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL Principal as an "out" or "inout" parameter, the programmer must pass an instance of PrincipalHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myPrincipalHolder is an instance of PrincipalHolder, the value stored in its value field can be accessed with myPrincipalHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Principal value
      Deprecated.
      The Principal value held by this PrincipalHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      PrincipalHolder()
      Deprecated.
      Constructs a new PrincipalHolder object with its value field initialized to null.
      PrincipalHolder(Principal initial)
      Deprecated.
      Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Deprecated.
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Deprecated.
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream output)
      Deprecated.
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Principal value
        Deprecated.
        The Principal value held by this PrincipalHolder object.

    • Constructor Detail

      • PrincipalHolder

        public PrincipalHolder()
        Deprecated.
        Constructs a new PrincipalHolder object with its value field initialized to null.

      • PrincipalHolder

        public PrincipalHolder(Principal initial)
        Deprecated.
        Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.
        Parameters:
        initial - the Principal with which to initialize the value field of the newly-created PrincipalHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Deprecated.
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream output)
        Deprecated.
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the CDR OutputStream

      • _type

        public TypeCode _type()
        Deprecated.
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PRIVATE_MEMBER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface PRIVATE_MEMBER

  • public interface PRIVATE_MEMBER
    Constant to define a private member in the ValueMember class.

    PRIVATE_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type. The other constant is PUBLIC_MEMBER.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static short | value

    • Field Detail

      • value

        static final short value
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PUBLIC_MEMBER

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface PUBLIC_MEMBER

  • public interface PUBLIC_MEMBER
    Constant to define a public member in the ValueMember class.

    PUBLIC_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type. The other constant is PRIVATE_MEMBER.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static short | value

    • Field Detail

      • value

        static final short value
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


REBIND

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class REBIND

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.REBIND
  • All Implemented Interfaces:
    Serializable

    public final class REBIND
extends SystemException
    REBIND is raised when the current effective RebindPolicy, has a value of NO_REBIND or NO_RECONNECT and an invocation on a bound object reference results in a LocateReply message with status OBJECT_FORWARD or a Reply message with status LOCATION_FORWARD. This exception is also raised if the current effective RebindPolicy has a value of NO_RECONNECT and a connection must be reopened.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      REBIND()
      Constructs an REBIND exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      REBIND(int minorCode, CompletionStatus completionStatus)
      Constructs an REBIND exception with the specified minor code and completion status.
      REBIND(String detailMessage)
      Constructs an REBIND exception with the specified message.
      REBIND(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an REBIND exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • REBIND

        public REBIND()
        Constructs an REBIND exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • REBIND

        public REBIND(String detailMessage)
        Constructs an REBIND exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • REBIND

        public REBIND(int minorCode,
              CompletionStatus completionStatus)
        Constructs an REBIND exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • REBIND

        public REBIND(String detailMessage,
              int minorCode,
              CompletionStatus completionStatus)
        Constructs an REBIND exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RepositoryIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class RepositoryIdHelper

  • java.lang.Object
    • org.omg.CORBA.RepositoryIdHelper

  • public abstract class RepositoryIdHelper
extends Object
    The Helper for RepositoryId. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/RepositoryIdHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      RepositoryIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • RepositoryIdHelper

        public RepositoryIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Request

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class Request

  • java.lang.Object
    • org.omg.CORBA.Request

  • public abstract class Request
extends Object
    An object containing the information necessary for invoking a method. This class is the cornerstone of the ORB Dynamic Invocation Interface (DII), which allows dynamic creation and invocation of requests. A server cannot tell the difference between a client invocation using a client stub and a request using the DII.

    A Request object consists of:

    • the name of the operation to be invoked
    • an NVList containing arguments for the operation.
      Each item in the list is a NamedValue object, which has three parts:
      1. the name of the argument
      2. the value of the argument (as an Any object)
      3. the argument mode flag indicating whether the argument is for input, output, or both

    Request objects may also contain additional information, depending on how an operation was defined in the original IDL interface definition. For example, where appropriate, they may contain a NamedValue object to hold the return value or exception, a context, a list of possible exceptions, and a list of context strings that need to be resolved.

    New Request objects are created using one of the create_request methods in the Object class. In other words, a create_request method is performed on the object which is to be invoked.

    See Also:
    NamedValue

    • Constructor Summary

      Constructors
      Constructor and Description
      Request()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Any add_in_arg()
      Creates an input argument and adds it to this Request object.
      abstract Any add_inout_arg()
      Adds an input/output argument to this Request object.
      abstract Any add_named_in_arg(String name)
      Creates an input argument with the given name and adds it to this Request object.
      abstract Any add_named_inout_arg(String name)
      Adds an input/output argument with the given name to this Request object.
      abstract Any add_named_out_arg(String name)
      Adds an output argument with the given name to this Request object.
      abstract Any add_out_arg()
      Adds an output argument to this Request object.
      abstract NVList arguments()
      Retrieves the NVList object containing the arguments to the method being invoked.
      abstract ContextList contexts()
      Retrieves the ContextList object for this request.
      abstract Context ctx()
      Retrieves the Context object for this request.
      abstract void ctx(Context c)
      Sets this request's Context object to the one given.
      abstract Environment env()
      Retrieves the Environment object for this request.
      abstract ExceptionList exceptions()
      Retrieves the ExceptionList object for this request.
      abstract void get_response()
      Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
      abstract void invoke()
      Makes a synchronous invocation using the information in the Request object.
      abstract String operation()
      Retrieves the name of the method to be invoked.
      abstract boolean poll_response()
      Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
      abstract NamedValue result()
      Retrieves the NamedValue object containing the return value for the method.
      abstract Any return_value()
      Returns the Any object that contains the value for the result of the method.
      abstract void send_deferred()
      Makes an asynchronous invocation on the request.
      abstract void send_oneway()
      Makes a oneway invocation on the request.
      abstract void set_return_type(TypeCode tc)
      Sets the typecode for the return value of the method.
      abstract Object target()
      Retrieves the the target object reference.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Request

        public Request()

    • Method Detail

      • target

        public abstract Object target()
        Retrieves the the target object reference.
        Returns:
        the object reference that points to the object implementation for the method to be invoked

      • operation

        public abstract String operation()
        Retrieves the name of the method to be invoked.
        Returns:
        the name of the method to be invoked

      • arguments

        public abstract NVList arguments()
        Retrieves the NVList object containing the arguments to the method being invoked. The elements in the list are NamedValue objects, with each one describing an argument to the method.
        Returns:
        the NVList object containing the arguments for the method

      • result

        public abstract NamedValue result()
        Retrieves the NamedValue object containing the return value for the method.
        Returns:
        the NamedValue object containing the result of the method

      • env

        public abstract Environment env()
        Retrieves the Environment object for this request. It contains the exception that the method being invoked has thrown (after the invocation returns).
        Returns:
        the Environment object for this request

      • exceptions

        public abstract ExceptionList exceptions()
        Retrieves the ExceptionList object for this request. This list contains TypeCode objects describing the exceptions that may be thrown by the method being invoked.
        Returns:
        the ExceptionList object describing the exceptions that may be thrown by the method being invoked

      • contexts

        public abstract ContextList contexts()
        Retrieves the ContextList object for this request. This list contains context Strings that need to be resolved and sent with the invocation.
        Returns:
        the list of context strings whose values need to be resolved and sent with the invocation.

      • ctx

        public abstract Context ctx()
        Retrieves the Context object for this request. This is a list of properties giving information about the client, the environment, or the circumstances of this request.
        Returns:
        the Context object that is to be used to resolve any context strings whose values need to be sent with the invocation

      • ctx

        public abstract void ctx(Context c)
        Sets this request's Context object to the one given.
        Parameters:
        c - the new Context object to be used for resolving context strings

      • add_in_arg

        public abstract Any add_in_arg()
        Creates an input argument and adds it to this Request object.
        Returns:
        an Any object that contains the value and typecode for the input argument added

      • add_named_in_arg

        public abstract Any add_named_in_arg(String name)
        Creates an input argument with the given name and adds it to this Request object.
        Parameters:
        name - the name of the argument being added
        Returns:
        an Any object that contains the value and typecode for the input argument added

      • add_inout_arg

        public abstract Any add_inout_arg()
        Adds an input/output argument to this Request object.
        Returns:
        an Any object that contains the value and typecode for the input/output argument added

      • add_named_inout_arg

        public abstract Any add_named_inout_arg(String name)
        Adds an input/output argument with the given name to this Request object.
        Parameters:
        name - the name of the argument being added
        Returns:
        an Any object that contains the value and typecode for the input/output argument added

      • add_out_arg

        public abstract Any add_out_arg()
        Adds an output argument to this Request object.
        Returns:
        an Any object that contains the value and typecode for the output argument added

      • add_named_out_arg

        public abstract Any add_named_out_arg(String name)
        Adds an output argument with the given name to this Request object.
        Parameters:
        name - the name of the argument being added
        Returns:
        an Any object that contains the value and typecode for the output argument added

      • set_return_type

        public abstract void set_return_type(TypeCode tc)
        Sets the typecode for the return value of the method.
        Parameters:
        tc - the TypeCode object containing type information for the return value

      • return_value

        public abstract Any return_value()
        Returns the Any object that contains the value for the result of the method.
        Returns:
        an Any object containing the value and typecode for the return value

      • invoke

        public abstract void invoke()
        Makes a synchronous invocation using the information in the Request object. Exception information is placed into the Request object's environment object.

      • send_oneway

        public abstract void send_oneway()
        Makes a oneway invocation on the request. In other words, it does not expect or wait for a response. Note that this can be used even if the operation was not declared as oneway in the IDL declaration. No response or exception information is returned.

      • send_deferred

        public abstract void send_deferred()
        Makes an asynchronous invocation on the request. In other words, it does not wait for a response before it returns to the user. The user can then later use the methods poll_response and get_response to get the result or exception information for the invocation.

      • poll_response

        public abstract boolean poll_response()
        Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
        Returns:
        true if the method response has been received; false otherwise

      • get_response

        public abstract void get_response()
                           throws WrongTransaction
        Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
        Throws:
        WrongTransaction - if the method get_response was invoked from a different transaction's scope than the one from which the request was originally sent. See the OMG Transaction Service specification for details.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServerRequest

  • java.lang.Object
    • org.omg.CORBA.ServerRequest

  • public abstract class ServerRequest
extends Object
    An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI). This class, the cornerstone of the DSI, is analogous to the Request object in the DII.

    The ORB is responsible for creating this embodiment of a request, and delivering it to a Dynamic Implementation Routine (DIR). A dynamic servant (a DIR) is created by implementing the DynamicImplementation class, which has a single invoke method. This method accepts a ServerRequest object. The abstract class ServerRequest defines methods for accessing the method name, the arguments and the context of the request, as well as methods for setting the result of the request either as a return value or an exception.

    A subtlety with accessing the arguments of the request is that the DIR needs to provide type information about the expected arguments, since there is no compiled information about these. This information is provided through an NVList, which is a list of NamedValue objects. Each NamedValue object contains an Any object, which in turn has a TypeCode object representing the type of the argument.

    Similarly, type information needs to be provided for the response, for either the expected result or for an exception, so the methods result and except take an Any object as a parameter.

    See Also:
    DynamicImplementation, NVList, NamedValue

    • Constructor Summary

      Constructors
      Constructor and Description
      ServerRequest()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void arguments(NVList args)
      Specifies method parameter types and retrieves "in" and "inout" argument values.
      abstract Context ctx()
      Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference.
      void except(Any any)
      Deprecated.
      use set_exception()
      String op_name()
      Deprecated.
      use operation()
      String operation()
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      void params(NVList params)
      Deprecated.
      use the method arguments
      void result(Any any)
      Deprecated.
      use the method set_result
      void set_exception(Any any)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.
      void set_result(Any any)
      Throws an org.omg.CORBA.NO_IMPLEMENT exception.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServerRequest

        public ServerRequest()

    • Method Detail

      • op_name

        @Deprecated
public String op_name()
        Deprecated. use operation()
        Retrieves the name of the operation being invoked. According to OMG IDL's rules, these names must be unique among all operations supported by this object's "most-derived" interface. Note that the operation names for getting and setting attributes are _get_<attribute_name> and _set_<attribute_name>, respectively.
        Returns:
        the name of the operation to be invoked

      • operation

        public String operation()
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Retrieves the name of the operation being invoked. According to OMG IDL's rules, these names must be unique among all operations supported by this object's "most-derived" interface. Note that the operation names for getting and setting attributes are _get_<attribute_name> and _set_<attribute_name>, respectively.

        Returns:
        the name of the operation to be invoked
        See Also:
        CORBA package comments for unimplemented features

      • params

        @Deprecated
public void params(NVList params)
        Deprecated. use the method arguments
        Specifies method parameter types and retrieves "in" and "inout" argument values.

        Note that this method is deprecated; use the method arguments in its place.

        Unless it calls the method set_exception, the DIR must call this method exactly once, even if the method signature contains no parameters. Once the method arguments or set_exception has been called, calling arguments on the same ServerRequest object will result in a BAD_INV_ORDER system exception. The DIR must pass in to the method arguments an NVList initialized with TypeCodes and Flags describing the parameter types for the operation, in the order in which they appear in the IDL specification (left to right). A potentially-different NVList will be returned from arguments, with the "in" and "inout" argument values supplied. If it does not call the method set_exception, the DIR must supply the returned NVList with return values for any "out" arguments before returning, and may also change the return values for any "inout" arguments.

        Parameters:
        params - the arguments of the method, in the form of an NVList object

      • arguments

        public void arguments(NVList args)
        Specifies method parameter types and retrieves "in" and "inout" argument values. Unless it calls the method set_exception, the DIR must call this method exactly once, even if the method signature contains no parameters. Once the method arguments or set_exception has been called, calling arguments on the same ServerRequest object will result in a BAD_INV_ORDER system exception. The DIR must pass in to the method arguments an NVList initialized with TypeCodes and Flags describing the parameter types for the operation, in the order in which they appear in the IDL specification (left to right). A potentially-different NVList will be returned from arguments, with the "in" and "inout" argument values supplied. If it does not call the method set_exception, the DIR must supply the returned NVList with return values for any "out" arguments before returning, and it may also change the return values for any "inout" arguments.
        Parameters:
        args - the arguments of the method, in the form of an NVList
        See Also:
        CORBA package comments for unimplemented features

      • result

        @Deprecated
public void result(Any any)
        Deprecated. use the method set_result
        Specifies any return value for the call.

        Note that this method is deprecated; use the method set_result in its place.

        Unless the method set_exception is called, if the invoked method has a non-void result type, the method set_result must be called exactly once before the DIR returns. If the operation has a void result type, the method set_result may optionally be called once with an Any object whose type is tk_void. Calling the method set_result before the method arguments has been called or after the method set_result or set_exception has been called will result in a BAD_INV_ORDER exception. Calling the method set_result without having previously called the method ctx when the IDL operation contains a context expression, or when the NVList passed to arguments did not describe all parameters passed by the client, may result in a MARSHAL system exception.

        Parameters:
        any - an Any object containing the return value to be set

      • set_result

        public void set_result(Any any)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Specifies any return value for the call. Unless the method set_exception is called, if the invoked method has a non-void result type, the method set_result must be called exactly once before the DIR returns. If the operation has a void result type, the method set_result may optionally be called once with an Any object whose type is tk_void. Calling the method set_result before the method arguments has been called or after the method set_result or set_exception has been called will result in a BAD_INV_ORDER exception. Calling the method set_result without having previously called the method ctx when the IDL operation contains a context expression, or when the NVList passed to arguments did not describe all parameters passed by the client, may result in a MARSHAL system exception.

        Parameters:
        any - an Any object containing the return value to be set
        See Also:
        CORBA package comments for unimplemented features

      • except

        @Deprecated
public void except(Any any)
        Deprecated. use set_exception()
        The DIR may call set_exception at any time to return an exception to the client. The Any passed to set_exception must contain either a system exception or a user exception specified in the raises expression of the invoked operation's IDL definition. Passing in an Any that does not contain an exception will result in a BAD_PARAM system exception. Passing in an unlisted user exception will result in either the DIR receiving a BAD_PARAM system exception or in the client receiving an UNKNOWN_EXCEPTION system exception.
        Parameters:
        any - the Any object containing the exception

      • set_exception

        public void set_exception(Any any)
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Returns the given exception to the client. This method is invoked by the DIR, which may call it at any time. The Any object passed to this method must contain either a system exception or one of the user exceptions specified in the invoked operation's IDL definition. Passing in an Any object that does not contain an exception will cause a BAD_PARAM system exception to be thrown. Passing in an unlisted user exception will result in either the DIR receiving a BAD_PARAM system exception or in the client receiving an UNKNOWN_EXCEPTION system exception.

        Parameters:
        any - the Any object containing the exception
        Throws:
        BAD_PARAM - if the given Any object does not contain an exception or the exception is an unlisted user exception
        UNKNOWN_EXCEPTION - if the given exception is an unlisted user exception and the DIR did not receive a BAD_PARAM exception
        See Also:
        CORBA package comments for unimplemented features

      • ctx

        public abstract Context ctx()
        Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference. Calling the method ctx before the method arguments has been called or after the method ctx, set_result, or set_exception has been called will result in a BAD_INV_ORDER system exception.
        Returns:
        the context object that is to be used to resolve any context strings whose values need to be sent with the invocation.
        Throws:
        BAD_INV_ORDER - if (1) the method ctx is called before the method arguments or (2) the method ctx is called after calling set_result or set_exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceDetail

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServiceDetail

  • java.lang.Object
    • org.omg.CORBA.ServiceDetail
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ServiceDetail
extends Object
implements IDLEntity
    An object that represents an ORB service: its service_detail_type field contains the type of the ORB service, and its service_detail field contains a description of the ORB service.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte[] service_detail
      The data describing the ORB service that this ServiceDetail object represents.
      int service_detail_type
      The type of the ORB service that this ServiceDetail object represents.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceDetail()
      Constructs a ServiceDetail object with 0 for the type of ORB service and an empty description.
      ServiceDetail(int service_detail_type, byte[] service_detail)
      Constructs a ServiceDetail object with the given ORB service type and the given description.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • service_detail_type

        public int service_detail_type
        The type of the ORB service that this ServiceDetail object represents.

      • service_detail

        public byte[] service_detail
        The data describing the ORB service that this ServiceDetail object represents.

    • Constructor Detail

      • ServiceDetail

        public ServiceDetail()
        Constructs a ServiceDetail object with 0 for the type of ORB service and an empty description.

      • ServiceDetail

        public ServiceDetail(int service_detail_type,
                     byte[] service_detail)
        Constructs a ServiceDetail object with the given ORB service type and the given description.
        Parameters:
        service_detail_type - an int specifying the type of ORB service
        service_detail - a byte array describing the ORB service
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceDetailHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServiceDetailHelper

  • java.lang.Object
    • org.omg.CORBA.ServiceDetailHelper

  • public abstract class ServiceDetailHelper
extends Object

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceDetailHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServiceDetail | extract(Any a)
      static String | id()
      static void | insert(Any a, ServiceDetail that)
      static ServiceDetail | read(InputStream in)
      static TypeCode | type()
      static void | write(OutputStream out, ServiceDetail that)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceDetailHelper

        public ServiceDetailHelper()

    • Method Detail

      • write

        public static void write(OutputStream out,
                         ServiceDetail that)

      • read

        public static ServiceDetail read(InputStream in)

      • extract

        public static ServiceDetail extract(Any a)

      • insert

        public static void insert(Any a,
                          ServiceDetail that)

      • type

        public static TypeCode type()

      • id

        public static String id()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceInformation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServiceInformation

  • java.lang.Object
    • org.omg.CORBA.ServiceInformation
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ServiceInformation
extends Object
implements IDLEntity
    An IDL struct in the CORBA module that stores information about a CORBA service available in the ORB implementation and is obtained from the ORB.get_service_information method.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ServiceDetail[] service_details
      Array of ServiceDetails giving more details about the service.
      int[] service_options
      Array of ints representing service options.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceInformation()
      Constructs a ServiceInformation object with empty service_options and service_details.
      ServiceInformation(int[] __service_options, ServiceDetail[] __service_details)
      Constructs a ServiceInformation object with the given service_options and service_details.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • service_options

        public int[] service_options
        Array of ints representing service options.

      • service_details

        public ServiceDetail[] service_details
        Array of ServiceDetails giving more details about the service.

    • Constructor Detail

      • ServiceInformation

        public ServiceInformation()
        Constructs a ServiceInformation object with empty service_options and service_details.

      • ServiceInformation

        public ServiceInformation(int[] __service_options,
                          ServiceDetail[] __service_details)
        Constructs a ServiceInformation object with the given service_options and service_details.
        Parameters:
        __service_options - An array of ints describing the service options.
        __service_details - An array of ServiceDetails describing the service details.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceInformationHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServiceInformationHelper

  • java.lang.Object
    • org.omg.CORBA.ServiceInformationHelper

  • public abstract class ServiceInformationHelper
extends Object

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceInformationHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServiceInformation | extract(Any a)
      static String | id()
      static void | insert(Any a, ServiceInformation that)
      static ServiceInformation | read(InputStream in)
      static TypeCode | type()
      static void | write(OutputStream out, ServiceInformation that)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceInformationHelper

        public ServiceInformationHelper()

    • Method Detail

      • write

        public static void write(OutputStream out,
                         ServiceInformation that)

      • read

        public static ServiceInformation read(InputStream in)

      • extract

        public static ServiceInformation extract(Any a)

      • insert

        public static void insert(Any a,
                          ServiceInformation that)

      • type

        public static TypeCode type()

      • id

        public static String id()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceInformationHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ServiceInformationHolder

  • java.lang.Object
    • org.omg.CORBA.ServiceInformationHolder
  • All Implemented Interfaces:
    Streamable

    public final class ServiceInformationHolder
extends Object
implements Streamable
    The Holder for ServiceInformation. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL xxx as an "out" or "inout" parameter, the programmer must pass an instance of ServiceInformationHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myServiceInformationHolder is an instance of ServiceInformationHolder, the value stored in its value field can be accessed with myServiceInformationHolder.value.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ServiceInformation value
      The ServiceInformation value held by this ServiceInformationHolder object in its value field.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceInformationHolder()
      Constructs a new ServiceInformationHolder object with its value field initialized to null.
      ServiceInformationHolder(ServiceInformation arg)
      Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream in)
      Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
      TypeCode _type()
      Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
      void _write(OutputStream out)
      Marshals the value in this ServiceInformationHolder object's value field to the output stream out.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ServiceInformation value
        The ServiceInformation value held by this ServiceInformationHolder object in its value field.

    • Constructor Detail

      • ServiceInformationHolder

        public ServiceInformationHolder()
        Constructs a new ServiceInformationHolder object with its value field initialized to null.

      • ServiceInformationHolder

        public ServiceInformationHolder(ServiceInformation arg)
        Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.
        Parameters:
        arg - the ServiceInformation object with which to initialize the value field of the newly-created ServiceInformationHolder object

    • Method Detail

      • _write

        public void _write(OutputStream out)
        Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
        Specified by:
        _write in interface Streamable
        Parameters:
        out - the OutputStream object that will contain the CDR formatted data

      • _read

        public void _read(InputStream in)
        Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
        Specified by:
        _read in interface Streamable
        Parameters:
        in - the InputStream object containing CDR formatted data from the wire

      • _type

        public TypeCode _type()
        Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
        Specified by:
        _type in interface Streamable
        Returns:
        the type code for the value held in this ServiceInformationHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SetOverrideType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class SetOverrideType

  • java.lang.Object
    • org.omg.CORBA.SetOverrideType
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class SetOverrideType
extends Object
implements IDLEntity
    The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.

    The method Object._set_policy_override(org.omg.CORBA.Policy[], org.omg.CORBA.SetOverrideType) takes either SetOverrideType.SET_OVERRIDE or SetOverrideType.ADD_OVERRIDE as its second argument. The method _set_policy_override creates a new Object initialized with the Policy objects supplied as the first argument. If the second argument is ADD_OVERRIDE, the new policies are added to those of the Object instance that is calling the _set_policy_override method. If SET_OVERRIDE is given instead, the existing policies are replaced with the given ones.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int _ADD_OVERRIDE
      The int constant for the enum value ADD_OVERRIDE.
      static int _SET_OVERRIDE
      The int constant for the enum value SET_OVERRIDE.
      static SetOverrideType ADD_OVERRIDE
      The SetOverrideType constant for the enum value ADD_OVERRIDE.
      static SetOverrideType SET_OVERRIDE
      The SetOverrideType constant for the enum value SET_OVERRIDE.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SetOverrideType(int _value)
      Constructs a SetOverrideType instance from an int.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      static SetOverrideType from_int(int i)
      Converts the given int to the corresponding SetOverrideType instance.
      int value()
      Retrieves the value of this SetOverrideType instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _SET_OVERRIDE

        public static final int _SET_OVERRIDE
        The int constant for the enum value SET_OVERRIDE.
        See Also:
        Constant Field Values

      • _ADD_OVERRIDE

        public static final int _ADD_OVERRIDE
        The int constant for the enum value ADD_OVERRIDE.
        See Also:
        Constant Field Values

      • SET_OVERRIDE

        public static final SetOverrideType SET_OVERRIDE
        The SetOverrideType constant for the enum value SET_OVERRIDE.

      • ADD_OVERRIDE

        public static final SetOverrideType ADD_OVERRIDE
        The SetOverrideType constant for the enum value ADD_OVERRIDE.

    • Constructor Detail

      • SetOverrideType

        protected SetOverrideType(int _value)
        Constructs a SetOverrideType instance from an int.
        Parameters:
        _value - must be either SET_OVERRIDE or ADD_OVERRIDE

    • Method Detail

      • value

        public int value()
        Retrieves the value of this SetOverrideType instance.
        Returns:
        the int for this SetOverrideType instance.

      • from_int

        public static SetOverrideType from_int(int i)
        Converts the given int to the corresponding SetOverrideType instance.
        Parameters:
        i - the int to convert; must be either SetOverrideType._SET_OVERRIDE or SetOverrideType._ADD_OVERRIDE
        Returns:
        the SetOverrideType instance whose value matches the given int
        Throws:
        BAD_PARAM - if the given int does not match the value of any SetOverrideType instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SetOverrideTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class SetOverrideTypeHelper

  • java.lang.Object
    • org.omg.CORBA.SetOverrideTypeHelper

  • public abstract class SetOverrideTypeHelper
extends Object
    The Helper for SetOverrideType. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/SetOverrideTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      SetOverrideTypeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static SetOverrideType | extract(Any a)
      static String | id()
      static void | insert(Any a, SetOverrideType that)
      static SetOverrideType | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, SetOverrideType value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SetOverrideTypeHelper

        public SetOverrideTypeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          SetOverrideType that)

      • extract

        public static SetOverrideType extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static SetOverrideType read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         SetOverrideType value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ShortHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ShortHolder

  • java.lang.Object
    • org.omg.CORBA.ShortHolder
  • All Implemented Interfaces:
    Streamable

    public final class ShortHolder
extends Object
implements Streamable
    The Holder for Short. For more information on Holder files, see "Generated Files: Holder Files".

    short that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL short as an "out" or "inout" parameter, the programmer must pass an instance of ShortHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myShortHolder is an instance of ShortHolder, the value stored in its value field can be accessed with myShortHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      short value
      The short value held by this ShortHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      ShortHolder()
      Constructs a new ShortHolder object with its value field initialized to 0.
      ShortHolder(short initial)
      Constructs a new ShortHolder object with its value field initialized to the given short.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode corresponding to the value held in this ShortHolder object.
      void _write(OutputStream output)
      Marshals to output the value in this ShortHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public short value
        The short value held by this ShortHolder object.

    • Constructor Detail

      • ShortHolder

        public ShortHolder()
        Constructs a new ShortHolder object with its value field initialized to 0.

      • ShortHolder

        public ShortHolder(short initial)
        Constructs a new ShortHolder object with its value field initialized to the given short.
        Parameters:
        initial - the short with which to initialize the value field of the newly-created ShortHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire.

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this ShortHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data.

      • _type

        public TypeCode _type()
        Returns the TypeCode corresponding to the value held in this ShortHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this ShortHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ShortSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ShortSeqHelper

  • java.lang.Object
    • org.omg.CORBA.ShortSeqHelper

  • public abstract class ShortSeqHelper
extends Object
    The Helper for ShortSeqHelper. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/ShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      ShortSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short[] | extract(Any a)
      static String | id()
      static void | insert(Any a, short[] that)
      static short[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ShortSeqHelper

        public ShortSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short[] that)

      • extract

        public static short[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ShortSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ShortSeqHolder

  • java.lang.Object
    • org.omg.CORBA.ShortSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class ShortSeqHolder
extends Object
implements Streamable
    The Holder for ShortSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      ShortSeqHolder()
      ShortSeqHolder(short[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public short[] value

    • Constructor Detail

      • ShortSeqHolder

        public ShortSeqHolder()

      • ShortSeqHolder

        public ShortSeqHolder(short[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StringHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StringHolder

  • java.lang.Object
    • org.omg.CORBA.StringHolder
  • All Implemented Interfaces:
    Streamable

    public final class StringHolder
extends Object
implements Streamable
    The Holder for String. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL string as an "out" or "inout" parameter, the programmer must pass an instance of StringHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myStringHolder is an instance of StringHolder, the value stored in its value field can be accessed with myStringHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String value
      The String value held by this StringHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      StringHolder()
      Constructs a new StringHolder object with its value field initialized to null.
      StringHolder(String initial)
      Constructs a new StringHolder object with its value field initialized to the given String.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
      TypeCode _type()
      Retrieves the TypeCode object that corresponds to the value held in this StringHolder object.
      void _write(OutputStream output)
      Marshals the value held by this StringHolder object to the output stream output.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public String value
        The String value held by this StringHolder object.

    • Constructor Detail

      • StringHolder

        public StringHolder()
        Constructs a new StringHolder object with its value field initialized to null.

      • StringHolder

        public StringHolder(String initial)
        Constructs a new StringHolder object with its value field initialized to the given String.
        Parameters:
        initial - the String with which to initialize the value field of the newly-created StringHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire.

      • _write

        public void _write(OutputStream output)
        Marshals the value held by this StringHolder object to the output stream output.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data.

      • _type

        public TypeCode _type()
        Retrieves the TypeCode object that corresponds to the value held in this StringHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the type code of the value held in this StringHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StringSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StringSeqHelper

  • java.lang.Object
    • org.omg.CORBA.StringSeqHelper

  • public abstract class StringSeqHelper
extends Object
    An array of Strings

    • Constructor Summary

      Constructors
      Constructor and Description
      StringSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String[] | extract(Any a)
      static String | id()
      static void | insert(Any a, String[] that)
      static String[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • StringSeqHelper

        public StringSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String[] that)

      • extract

        public static String[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StringSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StringSeqHolder

  • java.lang.Object
    • org.omg.CORBA.StringSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class StringSeqHolder
extends Object
implements Streamable
    An array of Strings

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      StringSeqHolder()
      StringSeqHolder(String[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public String[] value

    • Constructor Detail

      • StringSeqHolder

        public StringSeqHolder()

      • StringSeqHolder

        public StringSeqHolder(String[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StringValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StringValueHelper

  • java.lang.Object
    • org.omg.CORBA.StringValueHelper
  • All Implemented Interfaces:
    BoxedValueHelper

    public class StringValueHelper
extends Object
implements BoxedValueHelper
    The Helper for StringValue. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      StringValueHelper()

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      String get_id()
      static String | id()
      static void | insert(Any a, String that)
      Serializable | read_value(InputStream istream)
      static String | read(InputStream istream)
      static TypeCode | type()
      void | write_value(OutputStream ostream, Serializable value)
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • StringValueHelper

        public StringValueHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • read_value

        public Serializable read_value(InputStream istream)
        Specified by:
        read_value in interface BoxedValueHelper

      • write

        public static void write(OutputStream ostream,
                         String value)

      • write_value

        public void write_value(OutputStream ostream,
                        Serializable value)
        Specified by:
        write_value in interface BoxedValueHelper

      • get_id

        public String get_id()
        Specified by:
        get_id in interface BoxedValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StructMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StructMember

  • java.lang.Object
    • org.omg.CORBA.StructMember
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class StructMember
extends Object
implements IDLEntity
    Describes a member of an IDL struct in the Interface Repository, including the name of the struct member, the type of the struct member, and the typedef that represents the IDL type of the struct member described the struct member object.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String name
      The name of the struct member described by this StructMember object.
      TypeCode type
      The type of the struct member described by this StructMember object.
      IDLType type_def
      The typedef that represents the IDL type of the struct member described by this StructMember object.

    • Constructor Summary

      Constructors
      Constructor and Description
      StructMember()
      Constructs a default StructMember object.
      StructMember(String __name, TypeCode __type, IDLType __type_def)
      Constructs a StructMember object initialized with the given values.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • name

        public String name
        The name of the struct member described by this StructMember object.

      • type

        public TypeCode type
        The type of the struct member described by this StructMember object.

      • type_def

        public IDLType type_def
        The typedef that represents the IDL type of the struct member described by this StructMember object.

    • Constructor Detail

      • StructMember

        public StructMember()
        Constructs a default StructMember object.

      • StructMember

        public StructMember(String __name,
                    TypeCode __type,
                    IDLType __type_def)
        Constructs a StructMember object initialized with the given values.
        Parameters:
        __name - a String object with the name of the struct member
        __type - a TypeCode object describing the type of the struct member
        __type_def - an IDLType object representing the IDL type of the struct member
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StructMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class StructMemberHelper

  • java.lang.Object
    • org.omg.CORBA.StructMemberHelper

  • public abstract class StructMemberHelper
extends Object
    The Helper for StructMember. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/StructMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      StructMemberHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static StructMember | extract(Any a)
      static String | id()
      static void | insert(Any a, StructMember that)
      static StructMember | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, StructMember value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • StructMemberHelper

        public StructMemberHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          StructMember that)

      • extract

        public static StructMember extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static StructMember read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         StructMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SystemException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class SystemException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    ACTIVITY_COMPLETED, ACTIVITY_REQUIRED, BAD_CONTEXT, BAD_INV_ORDER, BAD_OPERATION, BAD_PARAM, BAD_QOS, BAD_TYPECODE, CODESET_INCOMPATIBLE, COMM_FAILURE, DATA_CONVERSION, FREE_MEM, IMP_LIMIT, IndirectionException, INITIALIZE, INTERNAL, INTF_REPOS, INV_FLAG, INV_IDENT, INV_OBJREF, INV_POLICY, INVALID_ACTIVITY, INVALID_TRANSACTION, MARSHAL, NO_IMPLEMENT, NO_MEMORY, NO_PERMISSION, NO_RESOURCES, NO_RESPONSE, OBJ_ADAPTER, OBJECT_NOT_EXIST, PERSIST_STORE, REBIND, TIMEOUT, TRANSACTION_MODE, TRANSACTION_REQUIRED, TRANSACTION_ROLLEDBACK, TRANSACTION_UNAVAILABLE, TRANSIENT, UNKNOWN, UnknownException

    public abstract class SystemException
extends RuntimeException
    The root class for all CORBA standard exceptions. These exceptions may be thrown as a result of any CORBA operation invocation and may also be returned by many standard CORBA API methods. The standard exceptions contain a minor code, allowing more detailed specification, and a completion status. This class is subclassed to generate each one of the set of standard ORB exceptions. SystemException extends java.lang.RuntimeException; thus none of the SystemException exceptions need to be declared in signatures of the Java methods mapped from operations in IDL interfaces.
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      Fields
      Modifier and Type Field and Description
      CompletionStatus completed
      The status of the operation that threw this exception.
      int minor
      The CORBA Exception minor code.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected SystemException(String reason, int minor, CompletionStatus completed)
      Constructs a SystemException exception with the specified detail message, minor code, and completion status.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String toString()
      Converts this exception to a representative string.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • minor

        public int minor
        The CORBA Exception minor code.

      • completed

        public CompletionStatus completed
        The status of the operation that threw this exception.

    • Constructor Detail

      • SystemException

        protected SystemException(String reason,
                          int minor,
                          CompletionStatus completed)
        Constructs a SystemException exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
        Parameters:
        reason - the String containing a detail message
        minor - the minor code
        completed - the completion status

    • Method Detail

      • toString

        public String toString()
        Converts this exception to a representative string.
        Overrides:
        toString in class Throwable
        Returns:
        a string representation of this throwable.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TCKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TCKind

  • java.lang.Object
    • org.omg.CORBA.TCKind

  • public class TCKind
extends Object
    The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object. There is one kind for each primitive and essential IDL data type.

    The class TCKind consists of:

    • a set of int constants, one for each kind of IDL data type. These int constants make it possible to use a switch statement.
    • a set of TCKind constants, one for each kind of IDL data type. The value field for each TCKind instance is initialized with the int constant that corresponds with the IDL data type that the instance represents.
    • the method from_intfor converting an int to its corresponding TCKind instance

      Example:

            org.omg.CORBA.TCKind k = org.omg.CORBA.TCKind.from_int(
                         org.omg.CORBA.TCKind._tk_string);
      The variable k represents the TCKind instance for the IDL type string, which is tk_string.

    • the method value for accessing the _value field of a TCKind constant

      Example:

         int i = org.omg.CORBA.TCKind.tk_char.value();
      The variable i represents 9, the value for the IDL data type char.

    The value field of a TCKind instance is the CDR encoding used for a TypeCode object in an IIOP message.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int _tk_abstract_interface
      The int constant for the IDL data type abstract interface.
      static int _tk_alias
      The int constant for the IDL data type alias.
      static int _tk_any
      The int constant for the IDL data type any.
      static int _tk_array
      The int constant for the IDL data type array.
      static int _tk_boolean
      The int constant for the IDL data type boolean.
      static int _tk_char
      The int constant for the IDL data type char.
      static int _tk_double
      The int constant for the IDL data type double.
      static int _tk_enum
      The int constant for the IDL data type enum.
      static int _tk_except
      The int constant for the IDL data type except.
      static int _tk_fixed
      The int constant for the IDL data type fixed.
      static int _tk_float
      The int constant for the IDL data type float.
      static int _tk_long
      The int constant for the IDL data type long.
      static int _tk_longdouble
      The int constant for the IDL data type longdouble.
      static int _tk_longlong
      The int constant for the IDL data type longlong.
      static int _tk_native
      The int constant for the IDL data type native.
      static int _tk_null
      The int constant for a null IDL data type.
      static int _tk_objref
      The int constant for the IDL data type objref.
      static int _tk_octet
      The int constant for the IDL data type octet.
      static int _tk_Principal
      The int constant for the IDL data type Principal.
      static int _tk_sequence
      The int constant for the IDL data type sequence.
      static int _tk_short
      The int constant for the IDL data type short.
      static int _tk_string
      The int constant for the IDL data type string.
      static int _tk_struct
      The int constant for the IDL data type struct.
      static int _tk_TypeCode
      The int constant for the IDL data type TypeCode.
      static int _tk_ulong
      The int constant for the IDL data type ulong.
      static int _tk_ulonglong
      The int constant for the IDL data type ulonglong.
      static int _tk_union
      The int constant for the IDL data type union.
      static int _tk_ushort
      The int constant for the IDL data type ushort.
      static int _tk_value
      The int constant for the IDL data type value.
      static int _tk_value_box
      The int constant for the IDL data type value_box.
      static int _tk_void
      The int constant for the IDL data type void.
      static int _tk_wchar
      The int constant for the IDL data type wchar.
      static int _tk_wstring
      The int constant for the IDL data type wstring.
      static TCKind tk_abstract_interface
      The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.
      static TCKind tk_alias
      The TCKind constant whose value field is initialized with TCKind._tk_alias.
      static TCKind tk_any
      The TCKind constant whose value field is initialized with TCKind._tk_any.
      static TCKind tk_array
      The TCKind constant whose value field is initialized with TCKind._tk_array.
      static TCKind tk_boolean
      The TCKind constant whose value field is initialized with TCKind._tk_boolean.
      static TCKind tk_char
      The TCKind constant whose value field is initialized with TCKind._tk_char.
      static TCKind tk_double
      The TCKind constant whose value field is initialized with TCKind._tk_double.
      static TCKind tk_enum
      The TCKind constant whose value field is initialized with TCKind._tk_enum.
      static TCKind tk_except
      The TCKind constant whose value field is initialized with TCKind._tk_except.
      static TCKind tk_fixed
      The TCKind constant whose value field is initialized with TCKind._tk_fixed.
      static TCKind tk_float
      The TCKind constant whose value field is initialized with TCKind._tk_float.
      static TCKind tk_long
      The TCKind constant whose value field is initialized with TCKind._tk_long.
      static TCKind tk_longdouble
      The TCKind constant whose value field is initialized with TCKind._tk_longdouble.
      static TCKind tk_longlong
      The TCKind constant whose value field is initialized with TCKind._tk_longlong.
      static TCKind tk_native
      The TCKind constant whose value field is initialized with TCKind._tk_native.
      static TCKind tk_null
      The TCKind constant whose value field is initialized with TCKind._tk_null.
      static TCKind tk_objref
      The TCKind constant whose value field is initialized with TCKind._tk_objref.
      static TCKind tk_octet
      The TCKind constant whose value field is initialized with TCKind._tk_octet.
      static TCKind tk_Principal
      The TCKind constant whose value field is initialized with TCKind._tk_Principal.
      static TCKind tk_sequence
      The TCKind constant whose value field is initialized with TCKind._tk_sequence.
      static TCKind tk_short
      The TCKind constant whose value field is initialized with TCKind._tk_short.
      static TCKind tk_string
      The TCKind constant whose value field is initialized with TCKind._tk_string.
      static TCKind tk_struct
      The TCKind constant whose value field is initialized with TCKind._tk_struct.
      static TCKind tk_TypeCode
      The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.
      static TCKind tk_ulong
      The TCKind constant whose value field is initialized with TCKind._tk_ulong.
      static TCKind tk_ulonglong
      The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.
      static TCKind tk_union
      The TCKind constant whose value field is initialized with TCKind._tk_union.
      static TCKind tk_ushort
      The TCKind constant whose value field is initialized with TCKind._tk_ushort.
      static TCKind tk_value
      The TCKind constant whose value field is initialized with TCKind._tk_value.
      static TCKind tk_value_box
      The TCKind constant whose value field is initialized with TCKind._tk_value_box.
      static TCKind tk_void
      The TCKind constant whose value field is initialized with TCKind._tk_void.
      static TCKind tk_wchar
      The TCKind constant whose value field is initialized with TCKind._tk_wchar.
      static TCKind tk_wstring
      The TCKind constant whose value field is initialized with TCKind._tk_wstring.

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected TCKind(int _value)
      Deprecated.
      Do not use this constructor as this method should be private according to the OMG specification. Use from_int(int) instead.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      static TCKind from_int(int i)
      Converts the given int to the corresponding TCKind instance.
      int value()
      Retrieves the value of this TCKind instance.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _tk_null

        public static final int _tk_null
        The int constant for a null IDL data type.
        See Also:
        Constant Field Values

      • _tk_void

        public static final int _tk_void
        The int constant for the IDL data type void.
        See Also:
        Constant Field Values

      • _tk_short

        public static final int _tk_short
        The int constant for the IDL data type short.
        See Also:
        Constant Field Values

      • _tk_long

        public static final int _tk_long
        The int constant for the IDL data type long.
        See Also:
        Constant Field Values

      • _tk_ushort

        public static final int _tk_ushort
        The int constant for the IDL data type ushort.
        See Also:
        Constant Field Values

      • _tk_ulong

        public static final int _tk_ulong
        The int constant for the IDL data type ulong.
        See Also:
        Constant Field Values

      • _tk_float

        public static final int _tk_float
        The int constant for the IDL data type float.
        See Also:
        Constant Field Values

      • _tk_double

        public static final int _tk_double
        The int constant for the IDL data type double.
        See Also:
        Constant Field Values

      • _tk_boolean

        public static final int _tk_boolean
        The int constant for the IDL data type boolean.
        See Also:
        Constant Field Values

      • _tk_char

        public static final int _tk_char
        The int constant for the IDL data type char.
        See Also:
        Constant Field Values

      • _tk_octet

        public static final int _tk_octet
        The int constant for the IDL data type octet.
        See Also:
        Constant Field Values

      • _tk_any

        public static final int _tk_any
        The int constant for the IDL data type any.
        See Also:
        Constant Field Values

      • _tk_TypeCode

        public static final int _tk_TypeCode
        The int constant for the IDL data type TypeCode.
        See Also:
        Constant Field Values

      • _tk_Principal

        public static final int _tk_Principal
        The int constant for the IDL data type Principal.
        See Also:
        Constant Field Values

      • _tk_objref

        public static final int _tk_objref
        The int constant for the IDL data type objref.
        See Also:
        Constant Field Values

      • _tk_struct

        public static final int _tk_struct
        The int constant for the IDL data type struct.
        See Also:
        Constant Field Values

      • _tk_union

        public static final int _tk_union
        The int constant for the IDL data type union.
        See Also:
        Constant Field Values

      • _tk_enum

        public static final int _tk_enum
        The int constant for the IDL data type enum.
        See Also:
        Constant Field Values

      • _tk_string

        public static final int _tk_string
        The int constant for the IDL data type string.
        See Also:
        Constant Field Values

      • _tk_sequence

        public static final int _tk_sequence
        The int constant for the IDL data type sequence.
        See Also:
        Constant Field Values

      • _tk_array

        public static final int _tk_array
        The int constant for the IDL data type array.
        See Also:
        Constant Field Values

      • _tk_alias

        public static final int _tk_alias
        The int constant for the IDL data type alias.
        See Also:
        Constant Field Values

      • _tk_except

        public static final int _tk_except
        The int constant for the IDL data type except.
        See Also:
        Constant Field Values

      • _tk_longlong

        public static final int _tk_longlong
        The int constant for the IDL data type longlong.
        See Also:
        Constant Field Values

      • _tk_ulonglong

        public static final int _tk_ulonglong
        The int constant for the IDL data type ulonglong.
        See Also:
        Constant Field Values

      • _tk_longdouble

        public static final int _tk_longdouble
        The int constant for the IDL data type longdouble.
        See Also:
        Constant Field Values

      • _tk_wchar

        public static final int _tk_wchar
        The int constant for the IDL data type wchar.
        See Also:
        Constant Field Values

      • _tk_wstring

        public static final int _tk_wstring
        The int constant for the IDL data type wstring.
        See Also:
        Constant Field Values

      • _tk_fixed

        public static final int _tk_fixed
        The int constant for the IDL data type fixed.
        See Also:
        Constant Field Values

      • _tk_value

        public static final int _tk_value
        The int constant for the IDL data type value.
        See Also:
        Constant Field Values

      • _tk_value_box

        public static final int _tk_value_box
        The int constant for the IDL data type value_box.
        See Also:
        Constant Field Values

      • _tk_native

        public static final int _tk_native
        The int constant for the IDL data type native.
        See Also:
        Constant Field Values

      • _tk_abstract_interface

        public static final int _tk_abstract_interface
        The int constant for the IDL data type abstract interface.
        See Also:
        Constant Field Values

      • tk_null

        public static final TCKind tk_null
        The TCKind constant whose value field is initialized with TCKind._tk_null.

      • tk_void

        public static final TCKind tk_void
        The TCKind constant whose value field is initialized with TCKind._tk_void.

      • tk_short

        public static final TCKind tk_short
        The TCKind constant whose value field is initialized with TCKind._tk_short.

      • tk_long

        public static final TCKind tk_long
        The TCKind constant whose value field is initialized with TCKind._tk_long.

      • tk_ushort

        public static final TCKind tk_ushort
        The TCKind constant whose value field is initialized with TCKind._tk_ushort.

      • tk_ulong

        public static final TCKind tk_ulong
        The TCKind constant whose value field is initialized with TCKind._tk_ulong.

      • tk_float

        public static final TCKind tk_float
        The TCKind constant whose value field is initialized with TCKind._tk_float.

      • tk_double

        public static final TCKind tk_double
        The TCKind constant whose value field is initialized with TCKind._tk_double.

      • tk_boolean

        public static final TCKind tk_boolean
        The TCKind constant whose value field is initialized with TCKind._tk_boolean.

      • tk_char

        public static final TCKind tk_char
        The TCKind constant whose value field is initialized with TCKind._tk_char.

      • tk_octet

        public static final TCKind tk_octet
        The TCKind constant whose value field is initialized with TCKind._tk_octet.

      • tk_any

        public static final TCKind tk_any
        The TCKind constant whose value field is initialized with TCKind._tk_any.

      • tk_TypeCode

        public static final TCKind tk_TypeCode
        The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.

      • tk_Principal

        public static final TCKind tk_Principal
        The TCKind constant whose value field is initialized with TCKind._tk_Principal.

      • tk_objref

        public static final TCKind tk_objref
        The TCKind constant whose value field is initialized with TCKind._tk_objref.

      • tk_struct

        public static final TCKind tk_struct
        The TCKind constant whose value field is initialized with TCKind._tk_struct.

      • tk_union

        public static final TCKind tk_union
        The TCKind constant whose value field is initialized with TCKind._tk_union.

      • tk_enum

        public static final TCKind tk_enum
        The TCKind constant whose value field is initialized with TCKind._tk_enum.

      • tk_string

        public static final TCKind tk_string
        The TCKind constant whose value field is initialized with TCKind._tk_string.

      • tk_sequence

        public static final TCKind tk_sequence
        The TCKind constant whose value field is initialized with TCKind._tk_sequence.

      • tk_array

        public static final TCKind tk_array
        The TCKind constant whose value field is initialized with TCKind._tk_array.

      • tk_alias

        public static final TCKind tk_alias
        The TCKind constant whose value field is initialized with TCKind._tk_alias.

      • tk_except

        public static final TCKind tk_except
        The TCKind constant whose value field is initialized with TCKind._tk_except.

      • tk_longlong

        public static final TCKind tk_longlong
        The TCKind constant whose value field is initialized with TCKind._tk_longlong.

      • tk_ulonglong

        public static final TCKind tk_ulonglong
        The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.

      • tk_longdouble

        public static final TCKind tk_longdouble
        The TCKind constant whose value field is initialized with TCKind._tk_longdouble.

      • tk_wchar

        public static final TCKind tk_wchar
        The TCKind constant whose value field is initialized with TCKind._tk_wchar.

      • tk_wstring

        public static final TCKind tk_wstring
        The TCKind constant whose value field is initialized with TCKind._tk_wstring.

      • tk_fixed

        public static final TCKind tk_fixed
        The TCKind constant whose value field is initialized with TCKind._tk_fixed.

      • tk_value

        public static final TCKind tk_value
        The TCKind constant whose value field is initialized with TCKind._tk_value.

      • tk_value_box

        public static final TCKind tk_value_box
        The TCKind constant whose value field is initialized with TCKind._tk_value_box.

      • tk_native

        public static final TCKind tk_native
        The TCKind constant whose value field is initialized with TCKind._tk_native.

      • tk_abstract_interface

        public static final TCKind tk_abstract_interface
        The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.

    • Constructor Detail

      • TCKind

        @Deprecated
protected TCKind(int _value)
        Deprecated. Do not use this constructor as this method should be private according to the OMG specification. Use from_int(int) instead.
        Creates a new TCKind instance initialized with the given int.
        Parameters:
        _value - the int to convert. It must be one of the int constants in the class TCKind.

    • Method Detail

      • value

        public int value()
        Retrieves the value of this TCKind instance.
        Returns:
        the int that represents the kind of IDL data type for this TCKind instance

      • from_int

        public static TCKind from_int(int i)
        Converts the given int to the corresponding TCKind instance.
        Parameters:
        i - the int to convert. It must be one of the int constants in the class TCKind.
        Returns:
        the TCKind instance whose value field matches the given int
        Throws:
        BAD_PARAM - if the given int does not match the _value field of any TCKind instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TIMEOUT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TIMEOUT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TIMEOUT
  • All Implemented Interfaces:
    Serializable

    public final class TIMEOUT
extends SystemException
    TIMEOUT is raised when no delivery has been made and the specified time-to-live period has been exceeded. It is a standard system exception because time-to-live QoS can be applied to any invocation.
    Since:
    J2SE 1.5
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TIMEOUT()
      Constructs an TIMEOUT exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.
      TIMEOUT(int minorCode, CompletionStatus completionStatus)
      Constructs an TIMEOUT exception with the specified minor code and completion status.
      TIMEOUT(String detailMessage)
      Constructs an TIMEOUT exception with the specified message.
      TIMEOUT(String detailMessage, int minorCode, CompletionStatus completionStatus)
      Constructs an TIMEOUT exception with the specified message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TIMEOUT

        public TIMEOUT()
        Constructs an TIMEOUT exception with minor code set to 0 and CompletionStatus set to COMPLETED_NO.

      • TIMEOUT

        public TIMEOUT(String detailMessage)
        Constructs an TIMEOUT exception with the specified message.
        Parameters:
        detailMessage - string containing a detailed message.

      • TIMEOUT

        public TIMEOUT(int minorCode,
               CompletionStatus completionStatus)
        Constructs an TIMEOUT exception with the specified minor code and completion status.
        Parameters:
        minorCode - minor code.
        completionStatus - completion status.

      • TIMEOUT

        public TIMEOUT(String detailMessage,
               int minorCode,
               CompletionStatus completionStatus)
        Constructs an TIMEOUT exception with the specified message, minor code, and completion status.
        Parameters:
        detailMessage - string containing a detailed message.
        minorCode - minor code.
        completionStatus - completion status.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSACTION_MODE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TRANSACTION_MODE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TRANSACTION_MODE
  • All Implemented Interfaces:
    Serializable

    public final class TRANSACTION_MODE
extends SystemException
    The CORBA TRANSACTION_MODE exception is thrown by the client ORB if it detects a mismatch between the InvocationPolicy in the IOR and the chosen invocation path (i.e, direct or routed invocation). It contains a minor code, which gives information about what caused the exception, and a completion status. It may also contain a string describing the exception. The OMG CORBA core 2.4 specification has details.
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TRANSACTION_MODE()
      Constructs a TRANSACTION_MODE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      TRANSACTION_MODE(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_MODE exception with the specified minor code and completion status.
      TRANSACTION_MODE(String s)
      Constructs a TRANSACTION_MODE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      TRANSACTION_MODE(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_MODE exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TRANSACTION_MODE

        public TRANSACTION_MODE()
        Constructs a TRANSACTION_MODE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • TRANSACTION_MODE

        public TRANSACTION_MODE(String s)
        Constructs a TRANSACTION_MODE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • TRANSACTION_MODE

        public TRANSACTION_MODE(int minor,
                        CompletionStatus completed)
        Constructs a TRANSACTION_MODE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • TRANSACTION_MODE

        public TRANSACTION_MODE(String s,
                        int minor,
                        CompletionStatus completed)
        Constructs a TRANSACTION_MODE exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSACTION_REQUIRED

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TRANSACTION_REQUIRED

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TRANSACTION_REQUIRED
  • All Implemented Interfaces:
    Serializable

    public final class TRANSACTION_REQUIRED
extends SystemException
    Exception indicates that the request carried a null transaction context, but an active transaction is required.

    It contains a minor code, which gives information about what caused the exception, and a completion status. It may also contain a string describing the exception. The OMG Transaction Service specfication has details.

    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TRANSACTION_REQUIRED()
      Constructs a TRANSACTION_REQUIRED exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      TRANSACTION_REQUIRED(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
      TRANSACTION_REQUIRED(String s)
      Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      TRANSACTION_REQUIRED(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TRANSACTION_REQUIRED

        public TRANSACTION_REQUIRED()
        Constructs a TRANSACTION_REQUIRED exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • TRANSACTION_REQUIRED

        public TRANSACTION_REQUIRED(String s)
        Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • TRANSACTION_REQUIRED

        public TRANSACTION_REQUIRED(int minor,
                            CompletionStatus completed)
        Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • TRANSACTION_REQUIRED

        public TRANSACTION_REQUIRED(String s,
                            int minor,
                            CompletionStatus completed)
        Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSACTION_ROLLEDBACK

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TRANSACTION_ROLLEDBACK

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TRANSACTION_ROLLEDBACK
  • All Implemented Interfaces:
    Serializable

    public final class TRANSACTION_ROLLEDBACK
extends SystemException
    Exception thrown when the transaction associated with the request has already been rolled back or marked to roll back. Thus, the requested operation either could not be performed or was not performed because further computation on behalf of the transaction would be fruitless.

    See the OMG Transaction Service specification for details. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TRANSACTION_ROLLEDBACK()
      Constructs a TRANSACTION_ROLLEDBACK exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
      TRANSACTION_ROLLEDBACK(String s)
      Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      TRANSACTION_ROLLEDBACK(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TRANSACTION_ROLLEDBACK

        public TRANSACTION_ROLLEDBACK()
        Constructs a TRANSACTION_ROLLEDBACK exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • TRANSACTION_ROLLEDBACK

        public TRANSACTION_ROLLEDBACK(String s)
        Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • TRANSACTION_ROLLEDBACK

        public TRANSACTION_ROLLEDBACK(int minor,
                              CompletionStatus completed)
        Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • TRANSACTION_ROLLEDBACK

        public TRANSACTION_ROLLEDBACK(String s,
                              int minor,
                              CompletionStatus completed)
        Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSACTION_UNAVAILABLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TRANSACTION_UNAVAILABLE

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TRANSACTION_UNAVAILABLE
  • All Implemented Interfaces:
    Serializable

    public final class TRANSACTION_UNAVAILABLE
extends SystemException
    The CORBA TRANSACTION_UNAVAILABLE exception is thrown by the ORB when it cannot process a transaction service context because its connection to the Transaction Service has been abnormally terminated. It contains a minor code, which gives information about what caused the exception, and a completion status. It may also contain a string describing the exception. The OMG CORBA core 2.4 specification has details.
    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TRANSACTION_UNAVAILABLE()
      Constructs a TRANSACTION_UNAVAILABLE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      TRANSACTION_UNAVAILABLE(int minor, CompletionStatus completed)
      Constructs a TRANSACTION_UNAVAILABLE exception with the specified minor code and completion status.
      TRANSACTION_UNAVAILABLE(String s)
      Constructs a TRANSACTION_UNAVAILABLE exception with the specifieddescription message, a minor code of 0, and a completion state of COMPLETED_NO.
      TRANSACTION_UNAVAILABLE(String s, int minor, CompletionStatus completed)
      Constructs a TRANSACTION_UNAVAILABLE exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TRANSACTION_UNAVAILABLE

        public TRANSACTION_UNAVAILABLE()
        Constructs a TRANSACTION_UNAVAILABLE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • TRANSACTION_UNAVAILABLE

        public TRANSACTION_UNAVAILABLE(String s)
        Constructs a TRANSACTION_UNAVAILABLE exception with the specifieddescription message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • TRANSACTION_UNAVAILABLE

        public TRANSACTION_UNAVAILABLE(int minor,
                               CompletionStatus completed)
        Constructs a TRANSACTION_UNAVAILABLE exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • TRANSACTION_UNAVAILABLE

        public TRANSACTION_UNAVAILABLE(String s,
                               int minor,
                               CompletionStatus completed)
        Constructs a TRANSACTION_UNAVAILABLE exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSIENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TRANSIENT

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.TRANSIENT
  • All Implemented Interfaces:
    Serializable

    public final class TRANSIENT
extends SystemException
    Exception thrown when the ORB attempted to reach an object and failed. It is not an indication that an object does not exist. Instead, it simply means that no further determination of an object's status was possible because it could not be reached. This exception is raised if an attempt to establish a connection fails, for example, because the server or the implementation repository is down.

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      TRANSIENT()
      Constructs a TRANSIENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      TRANSIENT(int minor, CompletionStatus completed)
      Constructs a TRANSIENT exception with the specified minor code and completion status.
      TRANSIENT(String s)
      Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      TRANSIENT(String s, int minor, CompletionStatus completed)
      Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TRANSIENT

        public TRANSIENT()
        Constructs a TRANSIENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • TRANSIENT

        public TRANSIENT(String s)
        Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • TRANSIENT

        public TRANSIENT(int minor,
                 CompletionStatus completed)
        Constructs a TRANSIENT exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • TRANSIENT

        public TRANSIENT(String s,
                 int minor,
                 CompletionStatus completed)
        Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TypeCode

  • java.lang.Object
    • org.omg.CORBA.TypeCode
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public abstract class TypeCode
extends Object
implements IDLEntity
    A container for information about a specific CORBA data type.

    TypeCode objects are used:

    • in the Dynamic Invocation Interface -- to indicate the types of the actual arguments or the type of the return value.
      NamedValue objects are used to represent arguments and return values. One of their components is an Any object, which in turn has as one of its components a TypeCode object.
    • by an Interface Repository to represent the type specifications that are part of many OMG IDL declarations

    The representation of a TypeCode object is opaque, but abstractly, a TypeCode object consists of:

    • a kind field, which is set to an instance of the class TCKind
    • zero or more additional fields appropriate for the particular kind. For example, the TypeCode object describing the OMG IDL type 1ong has kind TCKind.tk_long and no additional fields. The TypeCode describing OMG IDL type sequence<boolean, 10> has a kind field with the value TCKind.tk_sequence and also fields with the values boolean and 10 for the type of sequence elements and the length of the sequence.

    TypeCode objects can be obtained in various ways:
    1. from a call to the method Any.insert_X, where X is a basic IDL type. This method creates a TypeCode object for type X and assigns it to the Any object's type field.
    2. from invocations of methods in the ORB class

      For example, the following creates a TypeCode object for a string with a maximum of 30 characters:

         org.omg.CORBA.TypeCode tcString = orb.create_string_tc(30);

      The following creates a TypeCode object for an array of five strings:

         org.omg.CORBA.TypeCode tcArray = orb.create_array_tc(
                                       5, TCKind.tk_string);

      The following creates a TypeCode object for an interface named "Account":

         org.omg.CORBA.TypeCode tcInterface = orb.create_interface_tc(
                                                 "thisId", "Account");
    3. as the return value from the _type method in Holder classes for user-defined IDL types. These Holder classes are generated by the idltojava compiler.
    4. from a CORBA Interface Repository

    Most of the methods in the class TypeCode are accessors, and the information contained in a TypeCode object is specific to a particular type. Therefore, methods must be invoked only on the kind of type codes to which they apply. If an accessor method tries to access information from an inappropriate kind of type code, it will throw the exception TypeCodePackage.BadKind. For example, if the method discriminator_type is called on anything other than a union, it will throw BadKind because only unions have a discriminator. The following list shows which methods apply to which kinds of type codes:

    These methods may be invoked on all TypeCode kinds:

    • equal
    • kind

    These methods may be invoked on objref, struct, union, enum, alias, exception, value, value_box, native, and abstract_interface:

    • id
    • name

    These methods may be invoked on struct, union, enum, and exception:

    • member_count
    • member_name

    These methods may be invoked on struct, union, and exception:

    • member_type(int index)

    These methods may be invoked on union:

    • member_label
    • discriminator_type
    • default_index

    These methods may be invoked on string, sequence, and array:

    • length

    These methods may be invoked on alias, sequence, array, and value_box:

    • content_type

    Unlike other CORBA pseudo-objects, TypeCode objects can be passed as general IDL parameters.

    The methods parameter and param_count, which are deprecated, are not mapped.

    Java IDL extends the CORBA specification to allow all operations permitted on a struct TypeCode to be permitted on an exception TypeCode as well.

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeCode()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract TypeCode concrete_base_type()
      Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
      abstract TypeCode content_type()
      Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
      abstract int default_index()
      Returns the index of the default member, or -1 if there is no default member.
      abstract TypeCode discriminator_type()
      Returns a TypeCode object describing all non-default member labels.
      abstract boolean equal(TypeCode tc)
      Compares this TypeCode object with the given one, testing for equality.
      abstract boolean equivalent(TypeCode tc)
      Tests to see if the given TypeCode object is equivalent to this TypeCode object.
      abstract short fixed_digits()
      Returns the number of digits in the fixed type described by this TypeCode object.
      abstract short fixed_scale()
      Returns the scale of the fixed type described by this TypeCode object.
      abstract TypeCode get_compact_typecode()
      Strips out all optional name and member name fields, but leaves all alias typecodes intact.
      abstract String id()
      Retrieves the RepositoryId globally identifying the type of this TypeCode object.
      abstract TCKind kind()
      Retrieves the kind of this TypeCode object.
      abstract int length()
      Returns the number of elements in the type described by this TypeCode object.
      abstract int member_count()
      Retrieves the number of members in the type described by this TypeCode object.
      abstract Any member_label(int index)
      Retrieves the label of the union member identified by the given index.
      abstract String member_name(int index)
      Retrieves the simple name of the member identified by the given index.
      abstract TypeCode member_type(int index)
      Retrieves the TypeCode object describing the type of the member identified by the given index.
      abstract short member_visibility(int index)
      Returns the constant that indicates the visibility of the member at the given index.
      abstract String name()
      Retrieves the simple name identifying this TypeCode object within its enclosing scope.
      abstract short type_modifier()
      Returns a constant indicating the modifier of the value type that this TypeCode object describes.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TypeCode

        public TypeCode()

    • Method Detail

      • equal

        public abstract boolean equal(TypeCode tc)
        Compares this TypeCode object with the given one, testing for equality. TypeCode objects are equal if they are interchangeable and give identical results when TypeCode operations are applied to them.
        Parameters:
        tc - the TypeCode object to compare against
        Returns:
        true if the type codes are equal; false otherwise

      • equivalent

        public abstract boolean equivalent(TypeCode tc)
        Tests to see if the given TypeCode object is equivalent to this TypeCode object.

        Parameters:
        tc - the typecode to compare with this typecode
        Returns:
        true if the given typecode is equivalent to this typecode; false otherwise

      • get_compact_typecode

        public abstract TypeCode get_compact_typecode()
        Strips out all optional name and member name fields, but leaves all alias typecodes intact.
        Returns:
        a TypeCode object with optional name and member name fields stripped out, except for alias typecodes, which are left intact
        See Also:
        CORBA package comments for unimplemented features

      • kind

        public abstract TCKind kind()
        Retrieves the kind of this TypeCode object. The kind of a type code determines which TypeCode methods may legally be invoked on it.

        The method kind may be invoked on any TypeCode object.

        Returns:
        the TCKind instance indicating the value of the kind field of this TypeCode object

      • id

        public abstract String id()
                   throws BadKind
        Retrieves the RepositoryId globally identifying the type of this TypeCode object.

        The method id can be invoked on object reference, structure, union, enumeration, alias, exception, valuetype, boxed valuetype, native, and abstract interface type codes. Object reference, exception, valuetype, boxed valuetype, native, and abstract interface TypeCode objects always have a RepositoryId. Structure, union, enumeration, and alias TypeCode objects obtained from the Interface Repository or the method ORB.create_operation_list also always have a RepositoryId. If there is no RepositoryId, the method can return an empty string.

        Returns:
        the RepositoryId for this TypeCode object or an empty string if there is no RepositoryID
        Throws:
        BadKind - if the method is invoked on an inappropriate kind ofTypeCode object

      • name

        public abstract String name()
                     throws BadKind
        Retrieves the simple name identifying this TypeCode object within its enclosing scope. Since names are local to a Repository, the name returned from a TypeCode object may not match the name of the type in any particular Repository, and may even be an empty string.

        The method name can be invoked on object reference, structure, union, enumeration, alias, exception, valuetype, boxed valuetype, native, and abstract interface TypeCode objects.

        Returns:
        the name identifying this TypeCode object or an empty string
        Throws:
        BadKind - if the method is invoked on an inappropriate kind ofTypeCode object

      • member_count

        public abstract int member_count()
                          throws BadKind
        Retrieves the number of members in the type described by this TypeCode object.

        The method member_count can be invoked on structure, union, and enumeration TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

        Returns:
        the number of members constituting the type described by this TypeCode object
        Throws:
        BadKind - if the method is invoked on an inappropriate kind of TypeCode object

      • member_name

        public abstract String member_name(int index)
                            throws BadKind,
                                   Bounds
        Retrieves the simple name of the member identified by the given index. Since names are local to a Repository, the name returned from a TypeCode object may not match the name of the member in any particular Repository, and may even be an empty string.

        The method member_name can be invoked on structure, union, and enumeration TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

        Parameters:
        index - index of the member for which a name is being reqested
        Returns:
        simple name of the member identified by the index or an empty string
        Throws:
        Bounds - if the index is equal to or greater than the number of members constituting the type
        BadKind - if the method is invoked on an inappropriate kind of TypeCode object

      • member_type

        public abstract TypeCode member_type(int index)
                              throws BadKind,
                                     Bounds
        Retrieves the TypeCode object describing the type of the member identified by the given index.

        The method member_type can be invoked on structure and union TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

        Parameters:
        index - index of the member for which type information is begin requested
        Returns:
        the TypeCode object describing the member at the given index
        Throws:
        Bounds - if the index is equal to or greater than the number of members constituting the type
        BadKind - if the method is invoked on an inappropriate kind of TypeCode object

      • member_label

        public abstract Any member_label(int index)
                          throws BadKind,
                                 Bounds
        Retrieves the label of the union member identified by the given index. For the default member, the label is the zero octet.

        The method member_label can only be invoked on union TypeCode objects.

        Parameters:
        index - index of the union member for which the label is being requested
        Returns:
        an Any object describing the label of the requested union member or the zero octet for the default member
        Throws:
        Bounds - if the index is equal to or greater than the number of members constituting the union
        BadKind - if the method is invoked on a non-union TypeCode object

      • discriminator_type

        public abstract TypeCode discriminator_type()
                                     throws BadKind
        Returns a TypeCode object describing all non-default member labels. The method discriminator_type can be invoked only on union TypeCode objects.
        Returns:
        the TypeCode object describing the non-default member labels
        Throws:
        BadKind - if the method is invoked on a non-union TypeCode object

      • default_index

        public abstract int default_index()
                           throws BadKind
        Returns the index of the default member, or -1 if there is no default member.

        The method default_index can be invoked only on union TypeCode objects.

        Returns:
        the index of the default member, or -1 if there is no default member
        Throws:
        BadKind - if the method is invoked on a non-union TypeCode object

      • length

        public abstract int length()
                    throws BadKind
        Returns the number of elements in the type described by this TypeCode object. For strings and sequences, it returns the bound, with zero indicating an unbounded string or sequence. For arrays, it returns the number of elements in the array.

        The method length can be invoked on string, sequence, and array TypeCode objects.

        Returns:
        the bound for strings and sequences, or the number of elements for arrays
        Throws:
        BadKind - if the method is invoked on an inappropriate kind of TypeCode object

      • content_type

        public abstract TypeCode content_type()
                               throws BadKind
        Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object. For sequences and arrays, it returns the element type. For aliases, it returns the original type. Note that multidimensional arrays are represented by nesting TypeCode objects, one per dimension. For boxed valuetypes, it returns the boxed type.

        The method content_type can be invoked on sequence, array, alias, and boxed valuetype TypeCode objects.

        Returns:
        a TypeCode object representing the element type for sequences and arrays, the original type for aliases, or the boxed type for boxed valuetypes.
        Throws:
        BadKind - if the method is invoked on an inappropriate kind of TypeCode object

      • fixed_digits

        public abstract short fixed_digits()
                            throws BadKind
        Returns the number of digits in the fixed type described by this TypeCode object. For example, the typecode for the number 3000.275d could be fixed<7,3>, where 7 is the precision and 3 is the scale.
        Returns:
        the total number of digits
        Throws:
        BadKind - if this method is invoked on an inappropriate kind of TypeCode object

      • fixed_scale

        public abstract short fixed_scale()
                           throws BadKind
        Returns the scale of the fixed type described by this TypeCode object. A positive number indicates the number of digits to the right of the decimal point. For example, the number 3000d could have the typecode fixed<4,0>, where the first number is the precision and the second number is the scale. A negative number is also possible and adds zeroes to the left of the decimal point. In this case, fixed<1,-3>, could be the typecode for the number 3000d.
        Returns:
        the scale of the fixed type that this TypeCode object describes
        Throws:
        BadKind - if this method is invoked on an inappropriate kind of TypeCode object

      • member_visibility

        public abstract short member_visibility(int index)
                                 throws BadKind,
                                        Bounds
        Returns the constant that indicates the visibility of the member at the given index. This operation can only be invoked on non-boxed value TypeCode objects.
        Parameters:
        index - an int indicating the index into the value
        Returns:
        either PRIVATE_MEMBER.value or PUBLIC_MEMBER.value
        Throws:
        BadKind - if this method is invoked on a non-value type TypeCode object
        Bounds - if the given index is out of bounds
        See Also:
        CORBA package comments for unimplemented features

      • type_modifier

        public abstract short type_modifier()
                             throws BadKind
        Returns a constant indicating the modifier of the value type that this TypeCode object describes. The constant returned must be one of the following: VM_NONE.value, VM_ABSTRACT.value, VM_CUSTOM.value, or VM_TRUNCATABLE.value,
        Returns:
        a constant describing the value type that this TypeCode object describes
        Throws:
        BadKind - if this method is invoked on a non-value type TypeCode object
        See Also:
        CORBA package comments for unimplemented features

      • concrete_base_type

        public abstract TypeCode concrete_base_type()
                                     throws BadKind
        Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes. Returns null if it doesn't have a concrete base type.
        Returns:
        the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes
        Throws:
        BadKind - if this method is invoked on a non-boxed value type TypeCode object
        See Also:
        CORBA package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeCodeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class TypeCodeHolder

  • java.lang.Object
    • org.omg.CORBA.TypeCodeHolder
  • All Implemented Interfaces:
    Streamable

    public final class TypeCodeHolder
extends Object
implements Streamable
    The Holder for TypeCode. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL TypeCode as an "out" or "inout" parameter, the programmer must pass an instance of TypeCodeHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myTypeCodeHolder is an instance of TypeCodeHolder, the value stored in its value field can be accessed with myTypeCodeHolder.value.

    Since:
    JDK1.2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      TypeCode value
      The TypeCode value held by this TypeCodeHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeCodeHolder()
      Constructs a new TypeCodeHolder object with its value field initialized to null.
      TypeCodeHolder(TypeCode initial)
      Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
      void _write(OutputStream output)
      Marshals to output the value in this TypeCodeHolder object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public TypeCode value
        The TypeCode value held by this TypeCodeHolder object.

    • Constructor Detail

      • TypeCodeHolder

        public TypeCodeHolder()
        Constructs a new TypeCodeHolder object with its value field initialized to null.

      • TypeCodeHolder

        public TypeCodeHolder(TypeCode initial)
        Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
        Parameters:
        initial - the TypeCode object with which to initialize the value field of the newly-created TypeCodeHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in this TypeCodeHolder object.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in this TypeCodeHolder object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeCodePackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA.TypeCodePackage

Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.

See: Description

  • Exception Summary
    Exception Description
    BadKind
    The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.
    Bounds
    Provides the TypeCode operations member_name(), member_type(), and member_label.

Package org.omg.CORBA.TypeCodePackage Description

Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.

Related Documentation

For an overview, please see:
  • comments on the CORBA package
Since:
JDK1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA.TypeCodePackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA.TypeCodePackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CORBA.TypeCodePackage.BadKind
          • org.omg.CORBA.TypeCodePackage.Bounds
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA.TypeCodePackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA.TypeCodePackage

  • Packages that use org.omg.CORBA.TypeCodePackage
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
  • Classes in org.omg.CORBA.TypeCodePackage used by org.omg.CORBA
    Class and Description
    BadKind
    The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.
    Bounds
    Provides the TypeCode operations member_name(), member_type(), and member_label.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BadKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.TypeCodePackage

Class BadKind

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.TypeCodePackage.BadKind
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class BadKind
extends UserException
    The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object. For example, invoking the method discriminator_type() on an instance of TypeCode that does not represent an IDL union will cause the exception BadKind to be thrown.
    Since:
    JDK1.2
    See Also:
    TypeCode

    • Constructor Summary

      Constructors
      Constructor and Description
      BadKind()
      Constructs a BadKind exception with no reason message.
      BadKind(String reason)
      Constructs a BadKind exception with the specified reason message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • BadKind

        public BadKind()
        Constructs a BadKind exception with no reason message.

      • BadKind

        public BadKind(String reason)
        Constructs a BadKind exception with the specified reason message.
        Parameters:
        reason - the String containing a reason message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Bounds

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA.TypeCodePackage

Class Bounds

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.TypeCodePackage.Bounds
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Bounds
extends UserException
    Provides the TypeCode operations member_name(), member_type(), and member_label. These methods raise Bounds when the index parameter is greater than or equal to the number of members constituting the type.
    Since:
    JDK1.2

    • Constructor Summary

      Constructors
      Constructor and Description
      Bounds()
      Constructs a Bounds exception with no reason message.
      Bounds(String reason)
      Constructs a Bounds exception with the specified reason message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • Bounds

        public Bounds()
        Constructs a Bounds exception with no reason message.

      • Bounds

        public Bounds(String reason)
        Constructs a Bounds exception with the specified reason message.
        Parameters:
        reason - the String containing a reason message
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TypeCodePackage.BadKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TypeCodePackage.BadKind

  • Packages that use BadKind
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of BadKind in org.omg.CORBA

      Methods in org.omg.CORBA that throw BadKind
      Modifier and Type Method and Description
      abstract TypeCode TypeCode.concrete_base_type()
      Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
      abstract TypeCode TypeCode.content_type()
      Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
      abstract int TypeCode.default_index()
      Returns the index of the default member, or -1 if there is no default member.
      abstract TypeCode TypeCode.discriminator_type()
      Returns a TypeCode object describing all non-default member labels.
      abstract short TypeCode.fixed_digits()
      Returns the number of digits in the fixed type described by this TypeCode object.
      abstract short TypeCode.fixed_scale()
      Returns the scale of the fixed type described by this TypeCode object.
      abstract String TypeCode.id()
      Retrieves the RepositoryId globally identifying the type of this TypeCode object.
      abstract int TypeCode.length()
      Returns the number of elements in the type described by this TypeCode object.
      abstract int TypeCode.member_count()
      Retrieves the number of members in the type described by this TypeCode object.
      abstract Any TypeCode.member_label(int index)
      Retrieves the label of the union member identified by the given index.
      abstract String TypeCode.member_name(int index)
      Retrieves the simple name of the member identified by the given index.
      abstract TypeCode TypeCode.member_type(int index)
      Retrieves the TypeCode object describing the type of the member identified by the given index.
      abstract short TypeCode.member_visibility(int index)
      Returns the constant that indicates the visibility of the member at the given index.
      abstract String TypeCode.name()
      Retrieves the simple name identifying this TypeCode object within its enclosing scope.
      abstract short TypeCode.type_modifier()
      Returns a constant indicating the modifier of the value type that this TypeCode object describes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA.TypeCodePackage.Bounds

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA.TypeCodePackage.Bounds

  • Packages that use Bounds
    Package Description
    org.omg.CORBA
    Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

    • Uses of Bounds in org.omg.CORBA

      Methods in org.omg.CORBA that throw Bounds
      Modifier and Type Method and Description
      abstract Any TypeCode.member_label(int index)
      Retrieves the label of the union member identified by the given index.
      abstract String TypeCode.member_name(int index)
      Retrieves the simple name of the member identified by the given index.
      abstract TypeCode TypeCode.member_type(int index)
      Retrieves the TypeCode object describing the type of the member identified by the given index.
      abstract short TypeCode.member_visibility(int index)
      Returns the constant that indicates the visibility of the member at the given index.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ULongLongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ULongLongSeqHelper

  • java.lang.Object
    • org.omg.CORBA.ULongLongSeqHelper

  • public abstract class ULongLongSeqHelper
extends Object
    The Helper for ULongLongSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/ULongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      ULongLongSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static long[] | extract(Any a)
      static String | id()
      static void | insert(Any a, long[] that)
      static long[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, long[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ULongLongSeqHelper

        public ULongLongSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          long[] that)

      • extract

        public static long[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static long[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         long[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ULongLongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ULongLongSeqHolder

  • java.lang.Object
    • org.omg.CORBA.ULongLongSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class ULongLongSeqHolder
extends Object
implements Streamable
    The Holder for ULongLongSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      long[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      ULongLongSeqHolder()
      ULongLongSeqHolder(long[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public long[] value

    • Constructor Detail

      • ULongLongSeqHolder

        public ULongLongSeqHolder()

      • ULongLongSeqHolder

        public ULongLongSeqHolder(long[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ULongSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ULongSeqHelper

  • java.lang.Object
    • org.omg.CORBA.ULongSeqHelper

  • public abstract class ULongSeqHelper
extends Object
    The Helper for ULongSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/ULongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      ULongSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int[] | extract(Any a)
      static String | id()
      static void | insert(Any a, int[] that)
      static int[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ULongSeqHelper

        public ULongSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int[] that)

      • extract

        public static int[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ULongSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ULongSeqHolder

  • java.lang.Object
    • org.omg.CORBA.ULongSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class ULongSeqHolder
extends Object
implements Streamable
    The Holder for ULongSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      int[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      ULongSeqHolder()
      ULongSeqHolder(int[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public int[] value

    • Constructor Detail

      • ULongSeqHolder

        public ULongSeqHolder()

      • ULongSeqHolder

        public ULongSeqHolder(int[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnionMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UnionMember

  • java.lang.Object
    • org.omg.CORBA.UnionMember
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class UnionMember
extends Object
implements IDLEntity
    A description in the Interface Repository of a member of an IDL union.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Any label
      The label of the union member described by this UnionMember object.
      String name
      The name of the union member described by this UnionMember object.
      TypeCode type
      The type of the union member described by this UnionMember object.
      IDLType type_def
      The typedef that represents the IDL type of the union member described by this UnionMember object.

    • Constructor Summary

      Constructors
      Constructor and Description
      UnionMember()
      Constructs a new UnionMember object with its fields initialized to null.
      UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
      Constructs a new UnionMember object with its fields initialized to the given values.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • name

        public String name
        The name of the union member described by this UnionMember object.

      • label

        public Any label
        The label of the union member described by this UnionMember object.

      • type

        public TypeCode type
        The type of the union member described by this UnionMember object.

      • type_def

        public IDLType type_def
        The typedef that represents the IDL type of the union member described by this UnionMember object.

    • Constructor Detail

      • UnionMember

        public UnionMember()
        Constructs a new UnionMember object with its fields initialized to null.

      • UnionMember

        public UnionMember(String __name,
                   Any __label,
                   TypeCode __type,
                   IDLType __type_def)
        Constructs a new UnionMember object with its fields initialized to the given values.
        Parameters:
        __name - a String object with the name of this UnionMember object
        __label - an Any object with the label of this UnionMember object
        __type - a TypeCode object describing the type of this UnionMember object
        __type_def - an IDLType object that represents the IDL type of this UnionMember object
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnionMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UnionMemberHelper

  • java.lang.Object
    • org.omg.CORBA.UnionMemberHelper

  • public abstract class UnionMemberHelper
extends Object
    The Helper for UnionMember. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/UnionMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      UnionMemberHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static UnionMember | extract(Any a)
      static String | id()
      static void | insert(Any a, UnionMember that)
      static UnionMember | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, UnionMember value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • UnionMemberHelper

        public UnionMemberHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          UnionMember that)

      • extract

        public static UnionMember extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static UnionMember read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         UnionMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UNKNOWN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UNKNOWN

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.omg.CORBA.SystemException
            • org.omg.CORBA.UNKNOWN
  • All Implemented Interfaces:
    Serializable

    public final class UNKNOWN
extends SystemException
    This exception is raised if an operation implementation throws a non-CORBA exception (such as an exception specific to the implementation's programming language), or if an operation raises a user exception that does not appear in the operation's raises expression. UNKNOWN is also raised if the server returns a system exception that is unknown to the client. (This can happen if the server uses a later version of CORBA than the client and new system exceptions have been added to the later version.)

    It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

    See the section Minor Code Meanings to see the minor codes for this exception.

    See Also:
    documentation on Java IDL exceptions

    • Field Summary

      • Fields inherited from class org.omg.CORBA.SystemException

        completed, minor

    • Constructor Summary

      Constructors
      Constructor and Description
      UNKNOWN()
      Constructs an UNKNOWN exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
      UNKNOWN(int minor, CompletionStatus completed)
      Constructs an UNKNOWN exception with the specified minor code and completion status.
      UNKNOWN(String s)
      Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
      UNKNOWN(String s, int minor, CompletionStatus completed)
      Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.

    • Method Summary

      • Methods inherited from class org.omg.CORBA.SystemException

        toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UNKNOWN

        public UNKNOWN()
        Constructs an UNKNOWN exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

      • UNKNOWN

        public UNKNOWN(String s)
        Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
        Parameters:
        s - the String containing a detail message

      • UNKNOWN

        public UNKNOWN(int minor,
               CompletionStatus completed)
        Constructs an UNKNOWN exception with the specified minor code and completion status.
        Parameters:
        minor - the minor code
        completed - the completion status

      • UNKNOWN

        public UNKNOWN(String s,
               int minor,
               CompletionStatus completed)
        Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
        Parameters:
        s - the String containing a description message
        minor - the minor code
        completed - the completion status
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownUserException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UnknownUserException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.UnknownUserException
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class UnknownUserException
extends UserException
    A class that contains user exceptions returned by the server. When the client uses the DII to make an invocation, any user exception returned from the server is enclosed in an Any object contained in the UnknownUserException object. This is available from the Environment object returned by the method Request.env.
    See Also:
    documentation on Java IDL exceptions, Request

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Any except
      The Any instance that contains the actual user exception thrown by the server.

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownUserException()
      Constructs an UnknownUserException object.
      UnknownUserException(Any a)
      Constructs an UnknownUserException object that contains the given Any object.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • except

        public Any except
        The Any instance that contains the actual user exception thrown by the server.

    • Constructor Detail

      • UnknownUserException

        public UnknownUserException()
        Constructs an UnknownUserException object.

      • UnknownUserException

        public UnknownUserException(Any a)
        Constructs an UnknownUserException object that contains the given Any object.
        Parameters:
        a - an Any object that contains a user exception returned by the server
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownUserExceptionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UnknownUserExceptionHelper

  • java.lang.Object
    • org.omg.CORBA.UnknownUserExceptionHelper

  • public abstract class UnknownUserExceptionHelper
extends Object
    The Helper for UnknownUserException. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/UnknownUserExceptionHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from CORBA.idl Thursday, August 24, 2000 5:52:22 PM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownUserExceptionHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static UnknownUserException | extract(Any a)
      static String | id()
      static void | insert(Any a, UnknownUserException that)
      static UnknownUserException | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, UnknownUserException value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • UnknownUserExceptionHelper

        public UnknownUserExceptionHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          UnknownUserException that)

      • extract

        public static UnknownUserException extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static UnknownUserException read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         UnknownUserException value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownUserExceptionHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UnknownUserExceptionHolder

  • java.lang.Object
    • org.omg.CORBA.UnknownUserExceptionHolder
  • All Implemented Interfaces:
    Streamable

    public final class UnknownUserExceptionHolder
extends Object
implements Streamable
    The Holder for UnknownUserException. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/UnknownUserExceptionHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from CORBA.idl Thursday, August 24, 2000 5:52:22 PM PDT

    • Field Summary

      Fields
      Modifier and Type Field and Description
      UnknownUserException value

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownUserExceptionHolder()
      UnknownUserExceptionHolder(UnknownUserException initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public UnknownUserException value

    • Constructor Detail

      • UnknownUserExceptionHolder

        public UnknownUserExceptionHolder()

      • UnknownUserExceptionHolder

        public UnknownUserExceptionHolder(UnknownUserException initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UNSUPPORTED_POLICY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface UNSUPPORTED_POLICY

  • public interface UNSUPPORTED_POLICY
    One of the PolicyErrorCodes which would be filled if the requested Policy is understood to be valid by the ORB, but is not currently supported.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The Error code for PolicyError exception.

    • Field Detail

      • value

        static final short value
        The Error code for PolicyError exception.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UNSUPPORTED_POLICY_VALUE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface UNSUPPORTED_POLICY_VALUE

  • public interface UNSUPPORTED_POLICY_VALUE
    A PolicyErrorCode which would be filled if the value requested for the Policy is of a valid type and within the valid range for that type, but this valid value is not currently supported.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The Error code for PolicyError exception.

    • Field Detail

      • value

        static final short value
        The Error code for PolicyError exception.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UserException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UserException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
  • All Implemented Interfaces:
    Serializable, IDLEntity
    Direct Known Subclasses:
    AdapterAlreadyExists, AdapterInactive, AdapterNonExistent, AlreadyBound, BadKind, Bounds, Bounds, CannotProceed, DuplicateName, FormatMismatch, ForwardRequest, ForwardRequest, InconsistentTypeCode, InconsistentTypeCode, Invalid, InvalidAddress, InvalidName, InvalidName, InvalidName, InvalidPolicy, InvalidSeq, InvalidSlot, InvalidTypeForEncoding, InvalidValue, InvalidValue, NoContext, NoServant, NotEmpty, NotFound, ObjectAlreadyActive, ObjectNotActive, PolicyError, ServantAlreadyActive, ServantNotActive, TypeMismatch, TypeMismatch, TypeMismatch, UnknownEncoding, UnknownUserException, WrongAdapter, WrongPolicy, WrongTransaction

    public abstract class UserException
extends Exception
implements IDLEntity
    The root class for CORBA IDL-defined user exceptions. All CORBA user exceptions are checked exceptions, which means that they need to be declared in method signatures.
    See Also:
    documentation on Java IDL exceptions

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected UserException()
      Constructs a UserException object.
      protected UserException(String reason)
      Constructs a UserException object with a detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UserException

        protected UserException()
        Constructs a UserException object. This method is called only by subclasses.

      • UserException

        protected UserException(String reason)
        Constructs a UserException object with a detail message. This method is called only by subclasses.
        Parameters:
        reason - a String object giving the reason for this exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UShortSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UShortSeqHelper

  • java.lang.Object
    • org.omg.CORBA.UShortSeqHelper

  • public abstract class UShortSeqHelper
extends Object
    The Helper for UShortSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/UShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      UShortSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short[] | extract(Any a)
      static String | id()
      static void | insert(Any a, short[] that)
      static short[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • UShortSeqHelper

        public UShortSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short[] that)

      • extract

        public static short[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UShortSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class UShortSeqHolder

  • java.lang.Object
    • org.omg.CORBA.UShortSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class UShortSeqHolder
extends Object
implements Streamable
    The Holder for UShortSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      UShortSeqHolder()
      UShortSeqHolder(short[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public short[] value

    • Constructor Detail

      • UShortSeqHolder

        public UShortSeqHolder()

      • UShortSeqHolder

        public UShortSeqHolder(short[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueBaseHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ValueBaseHelper

  • java.lang.Object
    • org.omg.CORBA.ValueBaseHelper

  • public abstract class ValueBaseHelper
extends Object

    • Constructor Summary

      Constructors
      Constructor and Description
      ValueBaseHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Serializable | extract(Any a)
      static String | id()
      static void | insert(Any a, Serializable that)
      static Serializable | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Serializable value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ValueBaseHelper

        public ValueBaseHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Serializable that)

      • extract

        public static Serializable extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Serializable read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Serializable value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueBaseHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ValueBaseHolder

  • java.lang.Object
    • org.omg.CORBA.ValueBaseHolder
  • All Implemented Interfaces:
    Streamable

    public final class ValueBaseHolder
extends Object
implements Streamable
    The Holder for ValueBase. For more information on Holder files, see "Generated Files: Holder Files".

    A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL ValueBase as an "out" or "inout" parameter, the programmer must pass an instance of ValueBaseHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

    If myValueBaseHolder is an instance of ValueBaseHolder, the value stored in its value field can be accessed with myValueBaseHolder.value.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Serializable value
      The java.io.Serializable value held by this ValueBaseHolder object.

    • Constructor Summary

      Constructors
      Constructor and Description
      ValueBaseHolder()
      Constructs a new ValueBaseHolder object with its value field initialized to 0.
      ValueBaseHolder(Serializable initial)
      Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream input)
      Reads from input and initalizes the value in the Holder with the unmarshalled data.
      TypeCode _type()
      Returns the TypeCode object corresponding to the value held in the Holder.
      void _write(OutputStream output)
      Marshals to output the value in the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Serializable value
        The java.io.Serializable value held by this ValueBaseHolder object.

    • Constructor Detail

      • ValueBaseHolder

        public ValueBaseHolder()
        Constructs a new ValueBaseHolder object with its value field initialized to 0.

      • ValueBaseHolder

        public ValueBaseHolder(Serializable initial)
        Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.
        Parameters:
        initial - the java.io.Serializable with which to initialize the value field of the newly-created ValueBaseHolder object

    • Method Detail

      • _read

        public void _read(InputStream input)
        Reads from input and initalizes the value in the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        input - the InputStream containing CDR formatted data from the wire

      • _write

        public void _write(OutputStream output)
        Marshals to output the value in the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        output - the OutputStream which will contain the CDR formatted data

      • _type

        public TypeCode _type()
        Returns the TypeCode object corresponding to the value held in the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode of the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueMember

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ValueMember

  • java.lang.Object
    • org.omg.CORBA.ValueMember
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ValueMember
extends Object
implements IDLEntity
    A description in the Interface Repository of a member of a value object.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      short access
      The type of access (public, private) for the value member described by this ValueMember object.
      String defined_in
      The repository ID of the value in which this member is defined.
      String id
      The repository ID of the value member described by this ValueMember object;
      String name
      The name of the value member described by this ValueMember object.
      TypeCode type
      The type of of this value member.
      IDLType type_def
      The typedef that represents the IDL type of the value member described by this ValueMember object.
      String version
      The version of the value in which this member is defined.

    • Constructor Summary

      Constructors
      Constructor and Description
      ValueMember()
      Constructs a default ValueMember object.
      ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
      Constructs a ValueMember object initialized with the given values.

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • name

        public String name
        The name of the value member described by this ValueMember object.

      • id

        public String id
        The repository ID of the value member described by this ValueMember object;

      • defined_in

        public String defined_in
        The repository ID of the value in which this member is defined.

      • version

        public String version
        The version of the value in which this member is defined.

      • type

        public TypeCode type
        The type of of this value member.

      • type_def

        public IDLType type_def
        The typedef that represents the IDL type of the value member described by this ValueMember object.

      • access

        public short access
        The type of access (public, private) for the value member described by this ValueMember object.

    • Constructor Detail

      • ValueMember

        public ValueMember()
        Constructs a default ValueMember object.

      • ValueMember

        public ValueMember(String __name,
                   String __id,
                   String __defined_in,
                   String __version,
                   TypeCode __type,
                   IDLType __type_def,
                   short __access)
        Constructs a ValueMember object initialized with the given values.
        Parameters:
        __name - The name of the value member described by this ValueMember object.
        __id - The repository ID of the value member described by this ValueMember object;
        __defined_in - The repository ID of the value in which this member is defined.
        __version - The version of the value in which this member is defined.
        __type - The type of of this value member.
        __type_def - The typedef that represents the IDL type of the value member described by this ValueMember object.
        __access - The type of access (public, private) for the value member described by this ValueMember object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ValueMemberHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class ValueMemberHelper

  • java.lang.Object
    • org.omg.CORBA.ValueMemberHelper

  • public abstract class ValueMemberHelper
extends Object
    The Helper for ValueMember. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/ValueMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      ValueMemberHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ValueMember | extract(Any a)
      static String | id()
      static void | insert(Any a, ValueMember that)
      static ValueMember | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ValueMember value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ValueMemberHelper

        public ValueMemberHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ValueMember that)

      • extract

        public static ValueMember extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ValueMember read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ValueMember value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VersionSpecHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class VersionSpecHelper

  • java.lang.Object
    • org.omg.CORBA.VersionSpecHelper

  • public abstract class VersionSpecHelper
extends Object
    The Helper for VersionSpec. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/VersionSpecHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      VersionSpecHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • VersionSpecHelper

        public VersionSpecHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VisibilityHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class VisibilityHelper

  • java.lang.Object
    • org.omg.CORBA.VisibilityHelper

  • public abstract class VisibilityHelper
extends Object
    The Helper for Visibility. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/VisibilityHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

    • Constructor Summary

      Constructors
      Constructor and Description
      VisibilityHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short | extract(Any a)
      static String | id()
      static void | insert(Any a, short that)
      static short | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • VisibilityHelper

        public VisibilityHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short that)

      • extract

        public static short extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VM_ABSTRACT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface VM_ABSTRACT

  • public interface VM_ABSTRACT
    Defines the code used to represent an Abstract interface in a typecode. This is one of the possible results of the type_modified method on the TypeCode interface.
    See Also:
    TypeCode

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The value representing an abstract interface value type in a typecode.

    • Field Detail

      • value

        static final short value
        The value representing an abstract interface value type in a typecode.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VM_CUSTOM

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface VM_CUSTOM

  • public interface VM_CUSTOM
    Defines the code used to represent a custom marshalled value type in a typecode. This is one of the possible results of the type_modifier method on the TypeCode interface.
    See Also:
    TypeCode

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The value representing a custom marshalled value type in a typecode.

    • Field Detail

      • value

        static final short value
        The value representing a custom marshalled value type in a typecode.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VM_NONE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface VM_NONE

  • public interface VM_NONE
    Defines the code used to represent the one of the values of a value type in a typecode.
    Since:
    JDK1.2
    See Also:
    TypeCode

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The value representing the value type in a typecode as per CORBA 2.3 spec.

    • Field Detail

      • value

        static final short value
        The value representing the value type in a typecode as per CORBA 2.3 spec.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


VM_TRUNCATABLE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Interface VM_TRUNCATABLE

  • public interface VM_TRUNCATABLE
    Defines the code used to represent a truncatable value type in a typecode. A value type is truncatable if it inherits "safely" from another value type, which means it can be cast to a more general inherited type. This is one of the possible results of the type_modifier method on the TypeCode interface.
    See Also:
    TypeCode

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The value representing a truncatable value type in a typecode.

    • Field Detail

      • value

        static final short value
        The value representing a truncatable value type in a typecode.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WCharSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WCharSeqHelper

  • java.lang.Object
    • org.omg.CORBA.WCharSeqHelper

  • public abstract class WCharSeqHelper
extends Object
    The Helper for WCharSeq. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/WCharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :

    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      WCharSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static char[] | extract(Any a)
      static String | id()
      static void | insert(Any a, char[] that)
      static char[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, char[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WCharSeqHelper

        public WCharSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          char[] that)

      • extract

        public static char[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static char[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         char[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WCharSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WCharSeqHolder

  • java.lang.Object
    • org.omg.CORBA.WCharSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class WCharSeqHolder
extends Object
implements Streamable
    The Holder for WCharSeq. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      char[] | value

    • Constructor Summary

      Constructors
      Constructor and Description
      WCharSeqHolder()
      WCharSeqHolder(char[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public char[] value

    • Constructor Detail

      • WCharSeqHolder

        public WCharSeqHolder()

      • WCharSeqHolder

        public WCharSeqHolder(char[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongTransaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WrongTransaction

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CORBA.WrongTransaction
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class WrongTransaction
extends UserException
    The CORBA WrongTransaction user-defined exception. This exception is thrown only by the methods Request.get_response and ORB.get_next_response when they are invoked from a transaction scope that is different from the one in which the client originally sent the request. See the OMG Transaction Service Specification for details.
    See Also:
    documentation on Java IDL exceptions

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongTransaction()
      Constructs a WrongTransaction object with an empty detail message.
      WrongTransaction(String reason)
      Constructs a WrongTransaction object with the given detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • WrongTransaction

        public WrongTransaction()
        Constructs a WrongTransaction object with an empty detail message.

      • WrongTransaction

        public WrongTransaction(String reason)
        Constructs a WrongTransaction object with the given detail message.
        Parameters:
        reason - The detail message explaining what caused this exception to be thrown.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongTransactionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WrongTransactionHelper

  • java.lang.Object
    • org.omg.CORBA.WrongTransactionHelper

  • public abstract class WrongTransactionHelper
extends Object
    The Helper for WrongTransaction. For more information on Helper files, see "Generated Files: Helper Files".

    org/omg/CORBA/WrongTransactionHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from CORBA.idl Thursday, August 24, 2000 5:32:50 PM PDT

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongTransactionHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static WrongTransaction | extract(Any a)
      static String | id()
      static void | insert(Any a, WrongTransaction that)
      static WrongTransaction | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, WrongTransaction value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WrongTransactionHelper

        public WrongTransactionHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          WrongTransaction that)

      • extract

        public static WrongTransaction extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static WrongTransaction read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         WrongTransaction value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongTransactionHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WrongTransactionHolder

  • java.lang.Object
    • org.omg.CORBA.WrongTransactionHolder
  • All Implemented Interfaces:
    Streamable

    public final class WrongTransactionHolder
extends Object
implements Streamable
    The Holder for WrongTransaction. For more information on Holder files, see "Generated Files: Holder Files".

    org/omg/CORBA/WrongTransactionHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from CORBA.idl Thursday, August 24, 2000 5:32:50 PM PDT

    • Field Summary

      Fields
      Modifier and Type Field and Description
      WrongTransaction value

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongTransactionHolder()
      WrongTransactionHolder(WrongTransaction initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public WrongTransaction value

    • Constructor Detail

      • WrongTransactionHolder

        public WrongTransactionHolder()

      • WrongTransactionHolder

        public WrongTransactionHolder(WrongTransaction initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WStringSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WStringSeqHelper

  • java.lang.Object
    • org.omg.CORBA.WStringSeqHelper

  • public abstract class WStringSeqHelper
extends Object
    An array of WStrings

    • Constructor Summary

      Constructors
      Constructor and Description
      WStringSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String[] | extract(Any a)
      static String | id()
      static void | insert(Any a, String[] that)
      static String[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WStringSeqHelper

        public WStringSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String[] that)

      • extract

        public static String[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WStringSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WStringSeqHolder

  • java.lang.Object
    • org.omg.CORBA.WStringSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class WStringSeqHolder
extends Object
implements Streamable
    An array of WStrings

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      WStringSeqHolder()
      WStringSeqHolder(String[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public String[] value

    • Constructor Detail

      • WStringSeqHolder

        public WStringSeqHolder()

      • WStringSeqHolder

        public WStringSeqHolder(String[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WStringValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA

Class WStringValueHelper

  • java.lang.Object
    • org.omg.CORBA.WStringValueHelper
  • All Implemented Interfaces:
    BoxedValueHelper

    public class WStringValueHelper
extends Object
implements BoxedValueHelper
    org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00 The class definition has been modified to conform to the following OMG specifications :
    • ORB core as defined by CORBA 2.3.1 (formal/99-10-07)
    • IDL/Java Language Mapping as defined in ptc/00-01-08

    • Constructor Summary

      Constructors
      Constructor and Description
      WStringValueHelper()

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      String get_id()
      static String | id()
      static void | insert(Any a, String that)
      Serializable | read_value(InputStream istream)
      static String | read(InputStream istream)
      static TypeCode | type()
      void | write_value(OutputStream ostream, Serializable value)
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WStringValueHelper

        public WStringValueHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • read_value

        public Serializable read_value(InputStream istream)
        Specified by:
        read_value in interface BoxedValueHelper

      • write

        public static void write(OutputStream ostream,
                         String value)

      • write_value

        public void write_value(OutputStream ostream,
                        Serializable value)
        Specified by:
        write_value in interface BoxedValueHelper

      • get_id

        public String get_id()
        Specified by:
        get_id in interface BoxedValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CORBA_2_3

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA_2_3

The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

See: Description

  • Class Summary
    Class Description
    ORB
    A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

Package org.omg.CORBA_2_3 Description

The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6, ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

The following methods in the abstract class org.omg.CORBA_2_3.ORB are unimplemented:

  • public org.omg.CORBA.portable.ValueFactory register_value_factory(String id, org.omg.CORBA.portable.ValueFactory factory)
  • public void unregister_value_factory(String id)
  • public org.omg.CORBA.portable.ValueFactory lookup_value_factory(String id)
  • public org.omg.CORBA.Object get_value_def(String repid)
  • public void set_delegate(java.lang.Object wrapper)
Since:
JDK 1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA_2_3 Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA_2_3

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CORBA.ORB
      • org.omg.CORBA_2_3.ORB
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA_2_3

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA_2_3

No usage of org.omg.CORBA_2_3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA_2_3.ORB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA_2_3.ORB

No usage of org.omg.CORBA_2_3.ORB
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORB

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA_2_3

Class ORB

  • java.lang.Object
    • org.omg.CORBA.ORB
      • org.omg.CORBA_2_3.ORB

  • public abstract class ORB
extends ORB
    A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

    • Constructor Summary

      Constructors
      Constructor and Description
      ORB()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      Object | get_value_def(String repid)
      ValueFactory | lookup_value_factory(String id)
      ValueFactory | register_value_factory(String id, ValueFactory factory)
      void | set_delegate(Object wrapper)
      void | unregister_value_factory(String id)

      • Methods inherited from class org.omg.CORBA.ORB

        connect, create_abstract_interface_tc, create_alias_tc, create_any, create_array_tc, create_basic_dyn_any, create_context_list, create_dyn_any, create_dyn_array, create_dyn_enum, create_dyn_sequence, create_dyn_struct, create_dyn_union, create_enum_tc, create_environment, create_exception_list, create_exception_tc, create_fixed_tc, create_interface_tc, create_list, create_named_value, create_native_tc, create_operation_list, create_output_stream, create_policy, create_recursive_sequence_tc, create_recursive_tc, create_sequence_tc, create_string_tc, create_struct_tc, create_union_tc, create_value_box_tc, create_value_tc, create_wstring_tc, destroy, disconnect, get_current, get_default_context, get_next_response, get_primitive_tc, get_service_information, init, init, init, list_initial_services, object_to_string, perform_work, poll_next_response, resolve_initial_references, run, send_multiple_requests_deferred, send_multiple_requests_oneway, set_parameters, set_parameters, shutdown, string_to_object, work_pending

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ORB

        public ORB()

    • Method Detail

      • register_value_factory

        public ValueFactory register_value_factory(String id,
                                           ValueFactory factory)

      • unregister_value_factory

        public void unregister_value_factory(String id)

      • lookup_value_factory

        public ValueFactory lookup_value_factory(String id)

      • get_value_def

        public Object get_value_def(String repid)
                     throws BAD_PARAM
        Throws:
        BAD_PARAM
        See Also:
        CORBA_2_3 package comments for unimplemented features

      • set_delegate

        public void set_delegate(Object wrapper)
        See Also:
        CORBA_2_3 package comments for unimplemented features
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CORBA_2_3.portable

Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

See: Description

  • Class Summary
    Class Description
    Delegate
    Delegate class provides the ORB vendor specific implementation of CORBA object.
    InputStream
    InputStream provides for the reading of all of the mapped IDL types from the stream.
    ObjectImpl
    ObjectImpl class is the base class for all stubs.
    OutputStream
    OutputStream provides interface for writing of all of the mapped IDL type to the stream.

Package org.omg.CORBA_2_3.portable Description

Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CORBA_2_3.portable Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CORBA_2_3.portable

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CORBA.portable.Delegate
      • org.omg.CORBA_2_3.portable.Delegate
    • java.io.InputStream (implements java.io.Closeable)
      • org.omg.CORBA.portable.InputStream
        • org.omg.CORBA_2_3.portable.InputStream
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.CORBA_2_3.portable.ObjectImpl
    • java.io.OutputStream (implements java.io.Closeable, java.io.Flushable)
      • org.omg.CORBA.portable.OutputStream
        • org.omg.CORBA_2_3.portable.OutputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CORBA_2_3.portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CORBA_2_3.portable

  • Packages that use org.omg.CORBA_2_3.portable
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.
  • Classes in org.omg.CORBA_2_3.portable used by javax.rmi.CORBA
    Class and Description
    ObjectImpl
    ObjectImpl class is the base class for all stubs.
  • Classes in org.omg.CORBA_2_3.portable used by org.omg.CORBA.portable
    Class and Description
    InputStream
    InputStream provides for the reading of all of the mapped IDL types from the stream.
  • Classes in org.omg.CORBA_2_3.portable used by org.omg.stub.java.rmi
    Class and Description
    ObjectImpl
    ObjectImpl class is the base class for all stubs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA_2_3.portable.Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA_2_3.portable.Delegate

No usage of org.omg.CORBA_2_3.portable.Delegate
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA_2_3.portable.InputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA_2_3.portable.InputStream

  • Packages that use InputStream
    Package Description
    org.omg.CORBA.portable
    Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

    • Uses of InputStream in org.omg.CORBA.portable

      Methods in org.omg.CORBA.portable with parameters of type InputStream
      Modifier and Type Method and Description
      Serializable ValueFactory.read_value(InputStream is)
      Is called by the ORB runtime while in the process of unmarshaling a value type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA_2_3.portable.ObjectImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA_2_3.portable.ObjectImpl

  • Packages that use ObjectImpl
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.stub.java.rmi
    Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

    • Uses of ObjectImpl in javax.rmi.CORBA

      Subclasses of ObjectImpl in javax.rmi.CORBA
      Modifier and Type Class and Description
      class  Stub
      Base class from which all RMI-IIOP stubs must inherit.

    • Uses of ObjectImpl in org.omg.stub.java.rmi

      Subclasses of ObjectImpl in org.omg.stub.java.rmi
      Modifier and Type Class and Description
      class  _Remote_Stub
      This class provides the Stub for the Remote Type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CORBA_2_3.portable.OutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CORBA_2_3.portable.OutputStream

No usage of org.omg.CORBA_2_3.portable.OutputStream
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA_2_3.portable

Class Delegate

  • java.lang.Object
    • org.omg.CORBA.portable.Delegate
      • org.omg.CORBA_2_3.portable.Delegate

  • public abstract class Delegate
extends Delegate
    Delegate class provides the ORB vendor specific implementation of CORBA object. It extends org.omg.CORBA.portable.Delegate and provides new methods that were defined by CORBA 2.3.
    Since:
    JDK1.2
    See Also:
    Delegate

    • Constructor Summary

      Constructors
      Constructor and Description
      Delegate()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String get_codebase(Object self)
      Returns the codebase for object reference provided.

      • Methods inherited from class org.omg.CORBA.portable.Delegate

        create_request, create_request, duplicate, equals, get_domain_managers, get_interface_def, get_policy, hash, hashCode, invoke, is_a, is_equivalent, is_local, non_existent, orb, release, releaseReply, request, request, servant_postinvoke, servant_preinvoke, set_policy_override, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Delegate

        public Delegate()

    • Method Detail

      • get_codebase

        public String get_codebase(Object self)
        Returns the codebase for object reference provided.
        Parameters:
        self - the object reference whose codebase needs to be returned.
        Returns:
        the codebase as a space delimited list of url strings or null if none.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA_2_3.portable

Class InputStream

  • java.lang.Object
    • java.io.InputStream
      • org.omg.CORBA.portable.InputStream
        • org.omg.CORBA_2_3.portable.InputStream
  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public abstract class InputStream
extends InputStream
    InputStream provides for the reading of all of the mapped IDL types from the stream. It extends org.omg.CORBA.portable.InputStream. This class defines new methods that were added for CORBA 2.3.
    Since:
    JDK1.2
    See Also:
    InputStream

    • Constructor Summary

      Constructors
      Constructor and Description
      InputStream()
      Create a new instance of this class.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Object read_abstract_interface()
      Unmarshal the value object or a suitable stub object.
      Object read_abstract_interface(Class clz)
      Unmarshal the class object or the stub class corresponding to the passed type.
      Serializable read_value()
      Unmarshalls a value type from the input stream.
      Serializable read_value(BoxedValueHelper factory)
      Unmarshalls a value type from the input stream.
      Serializable read_value(Class clz)
      Unmarshalls a value type from the input stream.
      Serializable read_value(Serializable value)
      Unmarshalls a value type from the input stream.
      Serializable read_value(String rep_id)
      Unmarshalls a value type from the input stream.

      • Methods inherited from class org.omg.CORBA.portable.InputStream

        orb, read_any, read_boolean_array, read_boolean, read_char_array, read_char, read_Context, read_double_array, read_double, read_fixed, read_float_array, read_float, read_long_array, read_long, read_longlong_array, read_longlong, read_Object, read_Object, read_octet_array, read_octet, read_Principal, read_short_array, read_short, read_string, read_TypeCode, read_ulong_array, read_ulong, read_ulonglong_array, read_ulonglong, read_ushort_array, read_ushort, read_wchar_array, read_wchar, read_wstring, read

      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, read, read, reset, skip

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InputStream

        public InputStream()
        Create a new instance of this class. throw SecurityException if SecurityManager is installed and enableSubclassImplementation SerializablePermission is not granted or jdk.corba.allowOutputStreamSubclass system property is either not set or is set to 'false'

    • Method Detail

      • read_value

        public Serializable read_value()
        Unmarshalls a value type from the input stream.
        Returns:
        the value type unmarshalled from the input stream

      • read_value

        public Serializable read_value(Class clz)
        Unmarshalls a value type from the input stream.
        Parameters:
        clz - is the declared type of the value to be unmarshalled
        Returns:
        the value unmarshalled from the input stream

      • read_value

        public Serializable read_value(BoxedValueHelper factory)
        Unmarshalls a value type from the input stream.
        Parameters:
        factory - is the instance fo the helper to be used for unmarshalling the value type
        Returns:
        the value unmarshalled from the input stream

      • read_value

        public Serializable read_value(String rep_id)
        Unmarshalls a value type from the input stream.
        Parameters:
        rep_id - identifies the type of the value to be unmarshalled
        Returns:
        value type unmarshalled from the input stream

      • read_value

        public Serializable read_value(Serializable value)
        Unmarshalls a value type from the input stream.
        Parameters:
        value - is an uninitialized value which is added to the orb's indirection table before calling Streamable._read() or CustomMarshal.unmarshal() to unmarshal the value.
        Returns:
        value type unmarshalled from the input stream

      • read_abstract_interface

        public Object read_abstract_interface()
        Unmarshal the value object or a suitable stub object.
        Returns:
        ORB runtime returns the value object or a suitable stub object.

      • read_abstract_interface

        public Object read_abstract_interface(Class clz)
        Unmarshal the class object or the stub class corresponding to the passed type.
        Parameters:
        clz - is the Class object for the stub class which corresponds to the type that is statically expected.
        Returns:
        ORB runtime returns the value object or a suitable stub object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA_2_3.portable

Class ObjectImpl

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA_2_3.portable.ObjectImpl
  • All Implemented Interfaces:
    Object
    Direct Known Subclasses:
    Stub

    public abstract class ObjectImpl
extends ObjectImpl
    ObjectImpl class is the base class for all stubs. It provides the basic delegation mechanism. It extends org.omg.CORBA.portable.ObjectImpl and provides new methods defined by CORBA 2.3.
    Since:
    JDK1.2
    See Also:
    ObjectImpl

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectImpl()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String _get_codebase()
      Returns the codebase for this object reference.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ObjectImpl

        public ObjectImpl()

    • Method Detail

      • _get_codebase

        public String _get_codebase()
        Returns the codebase for this object reference.
        Returns:
        the codebase as a space delimited list of url strings or null if none.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


OutputStream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CORBA_2_3.portable

Class OutputStream

  • java.lang.Object
    • java.io.OutputStream
      • org.omg.CORBA.portable.OutputStream
        • org.omg.CORBA_2_3.portable.OutputStream
  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public abstract class OutputStream
extends OutputStream
    OutputStream provides interface for writing of all of the mapped IDL type to the stream. It extends org.omg.CORBA.portable.OutputStream, and defines new methods defined by CORBA 2.3.
    Since:
    JDK1.2
    See Also:
    OutputStream

    • Constructor Summary

      Constructors
      Constructor and Description
      OutputStream()
      Create a new instance of this class.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void write_abstract_interface(Object obj)
      Marshals a value object or a stub object.
      void write_value(Serializable value)
      Marshals a value type to the output stream.
      void write_value(Serializable value, BoxedValueHelper factory)
      Marshals a value type to the output stream.
      void write_value(Serializable value, Class clz)
      Marshals a value type to the output stream.
      void write_value(Serializable value, String repository_id)
      Marshals a value type to the output stream.

      • Methods inherited from class org.omg.CORBA.portable.OutputStream

        create_input_stream, orb, write_any, write_boolean_array, write_boolean, write_char_array, write_char, write_Context, write_double_array, write_double, write_fixed, write_float_array, write_float, write_long_array, write_long, write_longlong_array, write_longlong, write_Object, write_octet_array, write_octet, write_Principal, write_short_array, write_short, write_string, write_TypeCode, write_ulong_array, write_ulong, write_ulonglong_array, write_ulonglong, write_ushort_array, write_ushort, write_wchar_array, write_wchar, write_wstring, write

      • Methods inherited from class java.io.OutputStream

        close, flush, write, write

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • OutputStream

        public OutputStream()
        Create a new instance of this class. throw SecurityException if SecurityManager is installed and enableSubclassImplementation SerializablePermission is not granted or jdk.corba.allowOutputStreamSubclass system property is either not set or is set to 'false'

    • Method Detail

      • write_value

        public void write_value(Serializable value)
        Marshals a value type to the output stream.
        Parameters:
        value - is the acutal value to write

      • write_value

        public void write_value(Serializable value,
                        Class clz)
        Marshals a value type to the output stream.
        Parameters:
        value - is the acutal value to write
        clz - is the declared type of the value to be marshaled

      • write_value

        public void write_value(Serializable value,
                        String repository_id)
        Marshals a value type to the output stream.
        Parameters:
        value - is the acutal value to write
        repository_id - identifies the type of the value type to be marshaled

      • write_value

        public void write_value(Serializable value,
                        BoxedValueHelper factory)
        Marshals a value type to the output stream.
        Parameters:
        value - is the acutal value to write
        factory - is the instance of the helper to be used for marshaling the boxed value

      • write_abstract_interface

        public void write_abstract_interface(Object obj)
        Marshals a value object or a stub object.
        Parameters:
        obj - the actual value object to marshal or the stub to be marshalled
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CosNaming

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CosNaming

Provides a naming service for Java IDL.

See: Description

  • Interface Summary
    Interface Description
    BindingIterator
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingIteratorOperations
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    NamingContext
    A naming context is an object that contains a set of name bindings in which each name is unique.
    NamingContextExt
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextExtOperations
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextOperations
    A naming context is an object that contains a set of name bindings in which each name is unique.
  • Class Summary
    Class Description
    _BindingIteratorImplBase
    _BindingIteratorStub
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    _NamingContextExtStub
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    _NamingContextImplBase
    _NamingContextStub
    A naming context is an object that contains a set of name bindings in which each name is unique.
    Binding
    org/omg/CosNaming/Binding.java .
    BindingHelper
    org/omg/CosNaming/BindingHelper.java .
    BindingHolder
    org/omg/CosNaming/BindingHolder.java .
    BindingIteratorHelper
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingIteratorHolder
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingIteratorPOA
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingListHelper
    List of Bindings.
    BindingListHolder
    List of Bindings.
    BindingType
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
    BindingTypeHelper
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
    BindingTypeHolder
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
    IstringHelper
    org/omg/CosNaming/IstringHelper.java .
    NameComponent
    org/omg/CosNaming/NameComponent.java .
    NameComponentHelper
    org/omg/CosNaming/NameComponentHelper.java .
    NameComponentHolder
    org/omg/CosNaming/NameComponentHolder.java .
    NameHelper
    A name is a sequence of name components.
    NameHolder
    A name is a sequence of name components.
    NamingContextExtHelper
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextExtHolder
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextExtPOA
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextHelper
    A naming context is an object that contains a set of name bindings in which each name is unique.
    NamingContextHolder
    A naming context is an object that contains a set of name bindings in which each name is unique.
    NamingContextPOA
    A naming context is an object that contains a set of name bindings in which each name is unique.

Package org.omg.CosNaming Description

Provides a naming service for Java IDL. The Object Request Broker Daemon (ORBD) also includes both a transient and persistent naming service.

The package and all its classes and interfaces were generated by running the tool idlj on the file nameservice.idl, which is a module written in OMG IDL.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6, ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Interfaces

The package org.omg.CosNaming contains two public interfaces and several auxiliary classes.

The interfaces are:

  • NamingContext
  • BindingIterator

These two interfaces provide the means to bind/unbind names and object references, to retrieve bound object references, and to iterate through a list of bindings. The NamingContext interface supplies the main functionality for the naming service, and BindingIterator provides a means of iterating through a list of name/object reference bindings.

Auxiliary Classes

In order to map an OMG IDL interface to the Java programming language, the idlj compiler creates Java classes that can be thought of as auxiliary classes. Comments for the generated auxiliary classes used by the interfaces NamingContext and BindingIterator are included here.

Classes Used by NamingContext and BindingIterator

The following are classes used by the naming service. (Helper and holder classes, which are generated for each of the classes listed here, are discussed below.)
  • public final class NameComponent -- a building block for names. (Names are bound to object references in a naming context.)

    A name is an array of one or more NameComponent objects. A name with a single NameComponent is called a simple name; a name with multiple NameComponent objects is called a compound name.

    A NameComponent object consists of two fields:

    1. id -- a String used as an identifier
    2. kind -- a String that can be used for any descriptive purpose. Its importance is that it can be used to describe an object without affecting syntax. The C programming language, for example, uses the the syntactic convention of appending the extension ".c" to a file name to indicate that it is a source code file. In a NameComponent object, the kind field can be used to describe the type of object rather than a file extension or some other syntactic convention. Examples of the value of the kind field include the strings "c_source", "object_code", "executable", "postscript", and "". It is not unusual for the kind field to be the empty string.

    In a name, each NameComponent object except the last denotes a NamingContext object; the last NameComponent object denotes the bound object reference. This is similar to a path name, in which the last name is the file name, and all names before it are directory names.

  • public final class Binding -- an object that associates a name with an object reference or a naming context. A Binding object has two fields:
    1. binding_name - an array of one or more NameComponent objects that represents the bound name
    2. binding_type - a BindingType object indicating whether the binding is between a name and an object reference or between a name and a naming context

    The interface NamingContext has methods for binding/unbinding names with object references or naming contexts, for listing bindings, and for resolving bindings (given a name, the method resolve returns the object reference bound to it).

  • public final class BindingType -- an object that specifies whether the given Binding object is a binding between a name and an object reference (that is, not a naming context) or between a name and a naming context.

    The classBindingType consists of two methods and four constants. Two of these constants are BindingType objects, and two are ints.

    The BindingType objects can be passed to the constructor for the class Binding or used as parameters or return values. These BindingType objects are:

    • public static final BindingType nobject -- to indicate that the binding is with an object reference
    • public static final BindingType ncontext -- to indicate that the binding is with a naming context

    The int constants can be supplied to the method from_int to create BindingType objects, or they can be return values for the method value. These constants are:

    • public static final int _nobject
    • public static final int _ncontext
    If the method from_int is supplied with anything other than _nobject or _ncontext, it will throw the exception org.omg.CORBA.BAD_PARAM.

    Usage is as follows:

           BindingType btObject = from_int(_nobject);
       BindingType btContext = from_int(_ncontext);
    The variable btObject refers to a BindingType object initialized to represent a binding with an object reference. The variable btContext refers to a BindingType object initialized to represent a binding with a NamingContex object.

    The method value returns either _nobject or _ncontext, so in the following line of code, the variable bt will contain _nobject or _ncontext:

           int bt = BindingType.value();

Holder Classes

OMG IDL uses OUT and INOUT parameters for returning values from operations. The mapping to the Java programming language, which does not have OUT and INOUT parameters, creates a special class for each type, called a holder class. An instance of a holder class can be passed to a Java method as a parameter, and a value can be assigned to its value field. This allows it to perform the function of an OUT or INOUT parameter.

The following holder classes are generated for the package org.omg.CosNaming:

  • NamingContextHolder
  • BindingIteratorHolder
  • BindingHolder
  • BindingListHolder
  • BindingTypeHolder
  • NameComponentHolder
  • NameHolder

Note that in the org.omg.CORBA package, there is a holder class for each of the basic Java types: IntHolder, ShortHolder, StringHolder, and so on.

Note also that there is a NameHolder class even though there is no Name class; similarly, there is a BindingListHolder class even though there is no BindingList class. This is true because in the OMG IDL interface, Name and BindingList are typedefs. There is no mapping from an IDL typedef to a Java construct, but holder classes are generated if the typedef is for a sequence or an array. As mapped to the Java programming language, Name is an array of NameComponent objects, and a BindingList is an array of Binding objects. All holder classes have at least two constructors and one field:

  • value field -- an instance of the type being used as an OUT or INOUT parameter. For example, the value field of a NamingContextHolder will be a NamingContext object.
  • default constructor -- a constructor that creates a new holder object initialized with the default value for the type. For example, a new BindingHolder object created with the default constructor will have its value field set to null because that is the default value for an object. Other defaults are false for boolean, 0 for numeric and char types, and null for object references.
  • constructor from an instance -- a constructor that creates a new holder object whose value field is initialized with the instance supplied

A holder class for a user-defined type (a Java class) has three more methods, but application developers do not use them directly.

Helper Classes

Helper classes, which are generated for all user-defined types in an OMG IDL interface, supply static methods needed to manipulate those types.

There is only one method in a helper class that an application programmer uses: the method narrow. Only Java interfaces mapped from IDL interfaces will have a helper class that includes a narrow method, so in the CosNaming package, only the classes NamingContextHelper and BindingIteratorHelper have a narrow method.

  • public static NamingContext narrow(org.omg.CORBA.Object obj) -- converts the given CORBA object to a NamingContext object
  • public static BindingIterator narrow(org.omg.CORBA.Object obj) -- converts the given CORBA object to a BindingIterator object

Package org.omg.CosNaming.NamingContextPackage

This package supplies Helper and Holder classes for the exceptions used in the package org.omg.CosNaming and also for the class NotFoundReason, which supplies a reason for the exception NotFound.

There are Helper and Holder classes for the following exceptions:

  • AlreadyBound
  • CannotProceed
  • InvalidName
  • NotEmpty
  • NotFound

Naming Service Compatibility

Sun's implementation of the CosNaming package complies with the OMG COSNaming specification. In other words, the APIs in Sun's naming service are implemented according to the guidelines for a naming service provided by OMG. Therefore, if a third-party vendor has implemented a naming service that is OMG compliant, it is possible to switch between Sun's implementation of CosNaming and the third-party vendor's implementation. However, it is important to understand that there can be minor variations in the way different vendors implement the naming service, such as differences in the exception strings.

Instructions for Using a Third Party's Naming Service

Although we encourage using an ORB and ORB services that are both from one vendor, it is possible to plug in a third party's COSNaming implementation with Sun's RMI-IIOP ORB. Here are the steps to follow:
  1. Create a properties file for the Bootstrap server and give it two entries. For example, you could call this properties file /tmp/services and put the following in it: NameService, <Stringified IOR of the Root Naming Context>.

    This associates NameService with the Root Naming Context of the CosNaming implementation that you want to use.

  2. Start the standalone Bootstrap server using the following command:

      java -classpath $(CLASSPATH)
      com.sun.corba.ee.internal.CosNaming.BootstrapServer -InitialServicesFile
      "/tmp/services" [-ORBInitialPort port]

    Note that the square brackets at the end of the command indicate that specifying a port number is optional.

Now when an application calls the method org.omg.CORBA.ORB.resolve_initial_references, CORBA processes will contact the Bootstrap Server to get the Root Naming Context.

Package Specification

  • Interoperable Naming Service (ptc/00-08-07)

Related Documentation

For an overview and examples of how to use the CosNaming API, please see:
  • Naming Service

For an overview of Java IDL, please see:

  • Java IDL home page
Since:
JDK1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_NamingContextExtStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class _NamingContextExtStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CosNaming._NamingContextExtStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, NamingContext, NamingContextExt, NamingContextExtOperations, NamingContextOperations

    public class _NamingContextExtStub
extends ObjectImpl
implements NamingContextExt
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      _NamingContextExtStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void destroy()
      The destroy operation deletes a naming context.
      void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      NamingContext new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      void rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      NameComponent[] to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      String to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      String to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
      void unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _NamingContextExtStub

        public _NamingContextExtStub()

    • Method Detail

      • to_string

        public String to_string(NameComponent[] n)
                 throws InvalidName
        This operation creates a stringified name from the array of Name components.
        Specified by:
        to_string in interface NamingContextExtOperations
        Parameters:
        n - Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName

      • to_name

        public NameComponent[] to_name(String sn)
                        throws InvalidName
        This operation converts a Stringified Name into an equivalent array of Name Components.
        Specified by:
        to_name in interface NamingContextExtOperations
        Parameters:
        sn - Stringified Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName

      • to_url

        public String to_url(String addr,
                     String sn)
              throws InvalidAddress,
                     InvalidName
        This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
        Specified by:
        to_url in interface NamingContextExtOperations
        Parameters:
        addr - internet based address of the host machine where Name Service is running

        sn - Stringified Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        org.omg.CosNaming.NamingContextPackage.InvalidAddress - Indicates the internet based address of the host machine is incorrect

        InvalidAddress
        InvalidName

      • resolve_str

        public Object resolve_str(String sn)
                   throws NotFound,
                          CannotProceed,
                          InvalidName
        This operation resolves the Stringified name into the object reference.
        Specified by:
        resolve_str in interface NamingContextExtOperations
        Parameters:
        sn - Stringified Name of the object

        Throws:
        NotFound - Indicates there is no object reference for the given name.

        CannotProceed - Indicates that the given compound name is incorrect

        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName

      • bind

        public void bind(NameComponent[] n,
                 Object obj)
          throws NotFound,
                 CannotProceed,
                 InvalidName,
                 AlreadyBound
        Creates a binding of a name and an object in the naming context. Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved.
        Specified by:
        bind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        obj - The Object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • bind_context

        public void bind_context(NameComponent[] n,
                         NamingContext nc)
                  throws NotFound,
                         CannotProceed,
                         InvalidName,
                         AlreadyBound
        Names an object that is a naming context. Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved.
        Specified by:
        bind_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        nc - NamingContect object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • rebind

        public void rebind(NameComponent[] n,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
        Creates a binding of a name and an object in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.
        Specified by:
        rebind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        obj - The Object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • rebind_context

        public void rebind_context(NameComponent[] n,
                           NamingContext nc)
                    throws NotFound,
                           CannotProceed,
                           InvalidName
        Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.
        Specified by:
        rebind_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        nc - NamingContect object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • resolve

        public Object resolve(NameComponent[] n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
        The resolve operation is the process of retrieving an object bound to a name in a given context. The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface.
        Specified by:
        resolve in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • unbind

        public void unbind(NameComponent[] n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
        The unbind operation removes a name binding from a context.
        Specified by:
        unbind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • list

        public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
        The list operation allows a client to iterate through a set of bindings in a naming context.

        The list operation returns at most the requested number of bindings in BindingList bl.

        • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
        • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
        Specified by:
        list in interface NamingContextOperations
        Parameters:
        how_many - the maximum number of bindings to return

        bl - the returned list of bindings

        bi - the returned binding iterator

      • new_context

        public NamingContext new_context()
        This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. The new context is not bound to any name.
        Specified by:
        new_context in interface NamingContextOperations

      • bind_new_context

        public NamingContext bind_new_context(NameComponent[] n)
                               throws NotFound,
                                      AlreadyBound,
                                      CannotProceed,
                                      InvalidName
        This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component).
        Specified by:
        bind_new_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        AlreadyBound - Indicates an object is already bound to the specified name.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • destroy

        public void destroy()
             throws NotEmpty
        The destroy operation deletes a naming context. If the naming context contains bindings, the NotEmpty exception is raised.
        Specified by:
        destroy in interface NamingContextOperations
        Throws:
        NotEmpty - Indicates that the Naming Context contains bindings.

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_NamingContextStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class _NamingContextStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CosNaming._NamingContextStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, NamingContext, NamingContextOperations

    public class _NamingContextStub
extends ObjectImpl
implements NamingContext
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      _NamingContextStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void destroy()
      The destroy operation deletes a naming context.
      void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      NamingContext new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      void rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      void unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _NamingContextStub

        public _NamingContextStub()

    • Method Detail

      • bind

        public void bind(NameComponent[] n,
                 Object obj)
          throws NotFound,
                 CannotProceed,
                 InvalidName,
                 AlreadyBound
        Creates a binding of a name and an object in the naming context. Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved.
        Specified by:
        bind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        obj - The Object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • bind_context

        public void bind_context(NameComponent[] n,
                         NamingContext nc)
                  throws NotFound,
                         CannotProceed,
                         InvalidName,
                         AlreadyBound
        Names an object that is a naming context. Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved.
        Specified by:
        bind_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        nc - NamingContect object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • rebind

        public void rebind(NameComponent[] n,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
        Creates a binding of a name and an object in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.
        Specified by:
        rebind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        obj - The Object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • rebind_context

        public void rebind_context(NameComponent[] n,
                           NamingContext nc)
                    throws NotFound,
                           CannotProceed,
                           InvalidName
        Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.
        Specified by:
        rebind_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        nc - NamingContect object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • resolve

        public Object resolve(NameComponent[] n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
        The resolve operation is the process of retrieving an object bound to a name in a given context. The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface.
        Specified by:
        resolve in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • unbind

        public void unbind(NameComponent[] n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
        The unbind operation removes a name binding from a context.
        Specified by:
        unbind in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • list

        public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
        The list operation allows a client to iterate through a set of bindings in a naming context.

        The list operation returns at most the requested number of bindings in BindingList bl.

        • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
        • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
        Specified by:
        list in interface NamingContextOperations
        Parameters:
        how_many - the maximum number of bindings to return

        bl - the returned list of bindings

        bi - the returned binding iterator

      • new_context

        public NamingContext new_context()
        This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. The new context is not bound to any name.
        Specified by:
        new_context in interface NamingContextOperations

      • bind_new_context

        public NamingContext bind_new_context(NameComponent[] n)
                               throws NotFound,
                                      AlreadyBound,
                                      CannotProceed,
                                      InvalidName
        This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component).
        Specified by:
        bind_new_context in interface NamingContextOperations
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        AlreadyBound - Indicates an object is already bound to the specified name.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • destroy

        public void destroy()
             throws NotEmpty
        The destroy operation deletes a naming context. If the naming context contains bindings, the NotEmpty exception is raised.
        Specified by:
        destroy in interface NamingContextOperations
        Throws:
        NotEmpty - Indicates that the Naming Context contains bindings.

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingIterator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface BindingIterator

  • All Superinterfaces:
    BindingIteratorOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _BindingIteratorImplBase, _BindingIteratorStub

    public interface BindingIterator
extends BindingIteratorOperations, Object, IDLEntity
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

    • Method Summary

      • Methods inherited from interface org.omg.CosNaming.BindingIteratorOperations

        destroy, next_n, next_one

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_BindingIteratorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class _BindingIteratorStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CosNaming._BindingIteratorStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, BindingIterator, BindingIteratorOperations

    public class _BindingIteratorStub
extends ObjectImpl
implements BindingIterator
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder), Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      _BindingIteratorStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void destroy()
      This operation destroys the iterator.
      boolean next_n(int how_many, BindingListHolder bl)
      This operation returns at most the requested number of bindings.
      boolean next_one(BindingHolder b)
      This operation returns the next binding.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _BindingIteratorStub

        public _BindingIteratorStub()

    • Method Detail

      • next_one

        public boolean next_one(BindingHolder b)
        This operation returns the next binding. If there are no more bindings, false is returned.
        Specified by:
        next_one in interface BindingIteratorOperations
        Parameters:
        b - the returned binding

      • next_n

        public boolean next_n(int how_many,
                      BindingListHolder bl)
        This operation returns at most the requested number of bindings.
        Specified by:
        next_n in interface BindingIteratorOperations
        Parameters:
        how_many - the maximum number of bindings tro return

        bl - the returned bindings

      • destroy

        public void destroy()
        This operation destroys the iterator.
        Specified by:
        destroy in interface BindingIteratorOperations

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_BindingIteratorImplBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class _BindingIteratorImplBase

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA.DynamicImplementation
        • org.omg.CosNaming._BindingIteratorImplBase
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, BindingIterator, BindingIteratorOperations

    public abstract class _BindingIteratorImplBase
extends DynamicImplementation
implements BindingIterator
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      _BindingIteratorImplBase()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void | invoke(ServerRequest r)

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CosNaming.BindingIteratorOperations

        destroy, next_n, next_one

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _BindingIteratorImplBase

        public _BindingIteratorImplBase()

    • Method Detail

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Overrides:
        _ids in class DynamicImplementation
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance

      • invoke

        public void invoke(ServerRequest r)
        Overrides:
        invoke in class DynamicImplementation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_NamingContextImplBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class _NamingContextImplBase

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA.DynamicImplementation
        • org.omg.CosNaming._NamingContextImplBase
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, NamingContext, NamingContextOperations

    public abstract class _NamingContextImplBase
extends DynamicImplementation
implements NamingContext
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      _NamingContextImplBase()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void | invoke(ServerRequest r)

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Constructor Detail

      • _NamingContextImplBase

        public _NamingContextImplBase()

    • Method Detail

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Overrides:
        _ids in class DynamicImplementation
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance

      • invoke

        public void invoke(ServerRequest r)
        Overrides:
        invoke in class DynamicImplementation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface NamingContext

  • All Superinterfaces:
    IDLEntity, NamingContextOperations, Object, Serializable
    All Known Subinterfaces:
    NamingContextExt
    All Known Implementing Classes:
    _NamingContextExtStub, _NamingContextImplBase, _NamingContextStub

    public interface NamingContext
extends NamingContextOperations, Object, IDLEntity
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    • Method Summary

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExt

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface NamingContextExt

  • All Superinterfaces:
    IDLEntity, NamingContext, NamingContextExtOperations, NamingContextOperations, Object, Serializable
    All Known Implementing Classes:
    _NamingContextExtStub

    public interface NamingContextExt
extends NamingContextExtOperations, NamingContext, IDLEntity
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    • Method Summary

      • Methods inherited from interface org.omg.CosNaming.NamingContextExtOperations

        resolve_str, to_name, to_string, to_url

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CosNaming Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CosNaming

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CosNaming.Binding (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CosNaming.BindingHelper
    • org.omg.CosNaming.BindingHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.BindingIteratorHelper
    • org.omg.CosNaming.BindingIteratorHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.BindingListHelper
    • org.omg.CosNaming.BindingListHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.BindingType (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CosNaming.BindingTypeHelper
    • org.omg.CosNaming.BindingTypeHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.IstringHelper
    • org.omg.CosNaming.NameComponent (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CosNaming.NameComponentHelper
    • org.omg.CosNaming.NameComponentHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NameHelper
    • org.omg.CosNaming.NameHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextExtHelper
    • org.omg.CosNaming.NamingContextExtHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextHelper
    • org.omg.CosNaming.NamingContextHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.CosNaming._BindingIteratorStub (implements org.omg.CosNaming.BindingIterator)
      • org.omg.CosNaming._NamingContextExtStub (implements org.omg.CosNaming.NamingContextExt)
      • org.omg.CosNaming._NamingContextStub (implements org.omg.CosNaming.NamingContext)
      • org.omg.CORBA.DynamicImplementation
        • org.omg.CosNaming._BindingIteratorImplBase (implements org.omg.CosNaming.BindingIterator)
        • org.omg.CosNaming._NamingContextImplBase (implements org.omg.CosNaming.NamingContext)
    • org.omg.PortableServer.Servant
      • org.omg.CosNaming.BindingIteratorPOA (implements org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.portable.InvokeHandler)
      • org.omg.CosNaming.NamingContextExtPOA (implements org.omg.CORBA.portable.InvokeHandler, org.omg.CosNaming.NamingContextExtOperations)
      • org.omg.CosNaming.NamingContextPOA (implements org.omg.CORBA.portable.InvokeHandler, org.omg.CosNaming.NamingContextOperations)

Interface Hierarchy

  • org.omg.CosNaming.BindingIteratorOperations
    • org.omg.CosNaming.BindingIterator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CosNaming.NamingContextOperations
    • org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.CosNaming.NamingContextExt (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextExtOperations)
    • org.omg.CosNaming.NamingContextExtOperations
      • org.omg.CosNaming.NamingContextExt (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContext)
  • org.omg.CORBA.Object
    • org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextOperations)
      • org.omg.CosNaming.NamingContextExt (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextExtOperations)
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.Object)
      • org.omg.CosNaming.NamingContext (also extends org.omg.CosNaming.NamingContextOperations, org.omg.CORBA.Object)
        • org.omg.CosNaming.NamingContextExt (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextExtOperations)
      • org.omg.CosNaming.NamingContextExt (also extends org.omg.CosNaming.NamingContext, org.omg.CosNaming.NamingContextExtOperations)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CosNaming

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CosNaming

  • Packages that use org.omg.CosNaming
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
  • Classes in org.omg.CosNaming used by org.omg.CosNaming
    Class and Description
    Binding
    org/omg/CosNaming/Binding.java .
    BindingHolder
    org/omg/CosNaming/BindingHolder.java .
    BindingIterator
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingIteratorHolder
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingIteratorOperations
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
    BindingListHolder
    List of Bindings.
    BindingType
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
    NameComponent
    org/omg/CosNaming/NameComponent.java .
    NamingContext
    A naming context is an object that contains a set of name bindings in which each name is unique.
    NamingContextExt
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextExtOperations
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
    NamingContextOperations
    A naming context is an object that contains a set of name bindings in which each name is unique.
  • Classes in org.omg.CosNaming used by org.omg.CosNaming.NamingContextPackage
    Class and Description
    NameComponent
    org/omg/CosNaming/NameComponent.java .
    NamingContext
    A naming context is an object that contains a set of name bindings in which each name is unique.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Binding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class Binding

  • java.lang.Object
    • org.omg.CosNaming.Binding
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Binding
extends Object
implements IDLEntity
    org/omg/CosNaming/Binding.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NameComponent[] binding_name
      BindingType binding_type

    • Constructor Summary

      Constructors
      Constructor and Description
      Binding()
      Binding(NameComponent[] _binding_name, BindingType _binding_type)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • binding_name

        public NameComponent[] binding_name

      • binding_type

        public BindingType binding_type

    • Constructor Detail

      • Binding

        public Binding()

      • Binding

        public Binding(NameComponent[] _binding_name,
               BindingType _binding_type)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingHelper

  • java.lang.Object
    • org.omg.CosNaming.BindingHelper

  • public abstract class BindingHelper
extends Object
    org/omg/CosNaming/BindingHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Binding | extract(Any a)
      static String | id()
      static void | insert(Any a, Binding that)
      static Binding | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Binding value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • BindingHelper

        public BindingHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Binding that)

      • extract

        public static Binding extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Binding read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Binding value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingHolder

  • java.lang.Object
    • org.omg.CosNaming.BindingHolder
  • All Implemented Interfaces:
    Streamable

    public final class BindingHolder
extends Object
implements Streamable
    org/omg/CosNaming/BindingHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Binding value

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingHolder()
      BindingHolder(Binding initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Binding value

    • Constructor Detail

      • BindingHolder

        public BindingHolder()

      • BindingHolder

        public BindingHolder(Binding initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingIteratorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingIteratorHelper

  • java.lang.Object
    • org.omg.CosNaming.BindingIteratorHelper

  • public abstract class BindingIteratorHelper
extends Object
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingIteratorHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static BindingIterator | extract(Any a)
      static String | id()
      static void | insert(Any a, BindingIterator that)
      static BindingIterator | narrow(Object obj)
      static BindingIterator | read(InputStream istream)
      static TypeCode | type()
      static BindingIterator | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, BindingIterator value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • BindingIteratorHelper

        public BindingIteratorHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          BindingIterator that)

      • extract

        public static BindingIterator extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static BindingIterator read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         BindingIterator value)

      • narrow

        public static BindingIterator narrow(Object obj)

      • unchecked_narrow

        public static BindingIterator unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingIteratorHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingIteratorHolder

  • java.lang.Object
    • org.omg.CosNaming.BindingIteratorHolder
  • All Implemented Interfaces:
    Streamable

    public final class BindingIteratorHolder
extends Object
implements Streamable
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

    • Field Summary

      Fields
      Modifier and Type Field and Description
      BindingIterator value

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingIteratorHolder()
      BindingIteratorHolder(BindingIterator initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public BindingIterator value

    • Constructor Detail

      • BindingIteratorHolder

        public BindingIteratorHolder()

      • BindingIteratorHolder

        public BindingIteratorHolder(BindingIterator initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingIteratorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface BindingIteratorOperations

  • All Known Subinterfaces:
    BindingIterator
    All Known Implementing Classes:
    _BindingIteratorImplBase, _BindingIteratorStub, BindingIteratorPOA

    public interface BindingIteratorOperations
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void destroy()
      This operation destroys the iterator.
      boolean next_n(int how_many, BindingListHolder bl)
      This operation returns at most the requested number of bindings.
      boolean next_one(BindingHolder b)
      This operation returns the next binding.

    • Method Detail

      • next_one

        boolean next_one(BindingHolder b)
        This operation returns the next binding. If there are no more bindings, false is returned.
        Parameters:
        b - the returned binding

      • next_n

        boolean next_n(int how_many,
               BindingListHolder bl)
        This operation returns at most the requested number of bindings.
        Parameters:
        how_many - the maximum number of bindings tro return

        bl - the returned bindings

      • destroy

        void destroy()
        This operation destroys the iterator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingIteratorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingIteratorPOA

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.CosNaming.BindingIteratorPOA
  • All Implemented Interfaces:
    InvokeHandler, BindingIteratorOperations

    public abstract class BindingIteratorPOA
extends Servant
implements BindingIteratorOperations, InvokeHandler
    The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.
    See Also:
    NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingIteratorPOA()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      OutputStream _invoke(String $method, InputStream in, ResponseHandler $rh)
      Invoked by the ORB to dispatch a request to the servant.
      BindingIterator _this()
      BindingIterator | _this(ORB orb)

      • Methods inherited from class org.omg.PortableServer.Servant

        _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.omg.CosNaming.BindingIteratorOperations

        destroy, next_n, next_one

    • Constructor Detail

      • BindingIteratorPOA

        public BindingIteratorPOA()

    • Method Detail

      • _invoke

        public OutputStream _invoke(String $method,
                            InputStream in,
                            ResponseHandler $rh)
        Description copied from interface: InvokeHandler
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Specified by:
        _invoke in interface InvokeHandler
        Parameters:
        $method - The method name.
        in - The InputStream containing the marshalled arguments.
        $rh - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply

      • _all_interfaces

        public String[] _all_interfaces(POA poa,
                                byte[] objectId)
        Description copied from class: Servant
        Used by the ORB to obtain complete type information from the servant.
        Specified by:
        _all_interfaces in class Servant
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.

      • _this

        public BindingIterator _this()

      • _this

        public BindingIterator _this(ORB orb)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingListHelper

  • java.lang.Object
    • org.omg.CosNaming.BindingListHelper

  • public abstract class BindingListHelper
extends Object
    List of Bindings.

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingListHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Binding[] | extract(Any a)
      static String | id()
      static void | insert(Any a, Binding[] that)
      static Binding[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Binding[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • BindingListHelper

        public BindingListHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Binding[] that)

      • extract

        public static Binding[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Binding[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Binding[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingListHolder

  • java.lang.Object
    • org.omg.CosNaming.BindingListHolder
  • All Implemented Interfaces:
    Streamable

    public final class BindingListHolder
extends Object
implements Streamable
    List of Bindings.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Binding[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingListHolder()
      BindingListHolder(Binding[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Binding[] value

    • Constructor Detail

      • BindingListHolder

        public BindingListHolder()

      • BindingListHolder

        public BindingListHolder(Binding[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingType

  • java.lang.Object
    • org.omg.CosNaming.BindingType
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class BindingType
extends Object
implements IDLEntity
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _ncontext
      static int | _nobject
      static BindingType | ncontext
      static BindingType | nobject

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | BindingType(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static BindingType | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _nobject

        public static final int _nobject
        See Also:
        Constant Field Values

      • nobject

        public static final BindingType nobject

      • _ncontext

        public static final int _ncontext
        See Also:
        Constant Field Values

      • ncontext

        public static final BindingType ncontext

    • Constructor Detail

      • BindingType

        protected BindingType(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static BindingType from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingTypeHelper

  • java.lang.Object
    • org.omg.CosNaming.BindingTypeHelper

  • public abstract class BindingTypeHelper
extends Object
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingTypeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static BindingType | extract(Any a)
      static String | id()
      static void | insert(Any a, BindingType that)
      static BindingType | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, BindingType value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • BindingTypeHelper

        public BindingTypeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          BindingType that)

      • extract

        public static BindingType extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static BindingType read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         BindingType value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


BindingTypeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class BindingTypeHolder

  • java.lang.Object
    • org.omg.CosNaming.BindingTypeHolder
  • All Implemented Interfaces:
    Streamable

    public final class BindingTypeHolder
extends Object
implements Streamable
    Specifies whether the given binding is for a object (that is not a naming context) or for a naming context.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      BindingType value

    • Constructor Summary

      Constructors
      Constructor and Description
      BindingTypeHolder()
      BindingTypeHolder(BindingType initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public BindingType value

    • Constructor Detail

      • BindingTypeHolder

        public BindingTypeHolder()

      • BindingTypeHolder

        public BindingTypeHolder(BindingType initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.Binding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.Binding

  • Packages that use Binding
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of Binding in org.omg.CosNaming

      Fields in org.omg.CosNaming declared as Binding
      Modifier and Type | Field and Description
      Binding[] | BindingListHolder.value
      Binding | BindingHolder.value
      Methods in org.omg.CosNaming that return Binding
      Modifier and Type | Method and Description
      static Binding[] | BindingListHelper.extract(Any a)
      static Binding | BindingHelper.extract(Any a)
      static Binding[] | BindingListHelper.read(InputStream istream)
      static Binding | BindingHelper.read(InputStream istream)
      Methods in org.omg.CosNaming with parameters of type Binding
      Modifier and Type | Method and Description
      static void | BindingHelper.insert(Any a, Binding that)
      static void | BindingListHelper.insert(Any a, Binding[] that)
      static void | BindingHelper.write(OutputStream ostream, Binding value)
      static void | BindingListHelper.write(OutputStream ostream, Binding[] value)
      Constructors in org.omg.CosNaming with parameters of type Binding
      Constructor and Description
      BindingHolder(Binding initialValue)
      BindingListHolder(Binding[] initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingHelper

No usage of org.omg.CosNaming.BindingHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingHolder

  • Packages that use BindingHolder
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingHolder in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type BindingHolder
      Modifier and Type Method and Description
      boolean BindingIteratorOperations.next_one(BindingHolder b)
      This operation returns the next binding.
      boolean _BindingIteratorStub.next_one(BindingHolder b)
      This operation returns the next binding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingIteratorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingIteratorHelper

No usage of org.omg.CosNaming.BindingIteratorHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingIteratorHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingIteratorHolder

  • Packages that use BindingIteratorHolder
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingIteratorHolder in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type BindingIteratorHolder
      Modifier and Type Method and Description
      void _NamingContextExtStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      void NamingContextOperations.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      void _NamingContextStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingIteratorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingIteratorPOA

No usage of org.omg.CosNaming.BindingIteratorPOA
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingListHelper

No usage of org.omg.CosNaming.BindingListHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingListHolder

  • Packages that use BindingListHolder
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingListHolder in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type BindingListHolder
      Modifier and Type Method and Description
      void _NamingContextExtStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      void NamingContextOperations.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      void _NamingContextStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      boolean BindingIteratorOperations.next_n(int how_many, BindingListHolder bl)
      This operation returns at most the requested number of bindings.
      boolean _BindingIteratorStub.next_n(int how_many, BindingListHolder bl)
      This operation returns at most the requested number of bindings.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingType

  • Packages that use BindingType
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingType in org.omg.CosNaming

      Fields in org.omg.CosNaming declared as BindingType
      Modifier and Type | Field and Description
      BindingType | Binding.binding_type
      static BindingType | BindingType.ncontext
      static BindingType | BindingType.nobject
      BindingType | BindingTypeHolder.value
      Methods in org.omg.CosNaming that return BindingType
      Modifier and Type | Method and Description
      static BindingType | BindingTypeHelper.extract(Any a)
      static BindingType | BindingType.from_int(int value)
      static BindingType | BindingTypeHelper.read(InputStream istream)
      Methods in org.omg.CosNaming with parameters of type BindingType
      Modifier and Type | Method and Description
      static void | BindingTypeHelper.insert(Any a, BindingType that)
      static void | BindingTypeHelper.write(OutputStream ostream, BindingType value)
      Constructors in org.omg.CosNaming with parameters of type BindingType
      Constructor and Description
      Binding(NameComponent[] _binding_name, BindingType _binding_type)
      BindingTypeHolder(BindingType initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingTypeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingTypeHelper

No usage of org.omg.CosNaming.BindingTypeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.BindingTypeHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.BindingTypeHolder

No usage of org.omg.CosNaming.BindingTypeHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.IstringHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.IstringHelper

No usage of org.omg.CosNaming.IstringHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NameComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NameComponent

  • Packages that use NameComponent
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of NameComponent in org.omg.CosNaming

      Fields in org.omg.CosNaming declared as NameComponent
      Modifier and Type | Field and Description
      NameComponent[] | Binding.binding_name
      NameComponent[] | NameHolder.value
      NameComponent | NameComponentHolder.value
      Methods in org.omg.CosNaming that return NameComponent
      Modifier and Type | Method and Description
      static NameComponent | NameComponentHelper.extract(Any a)
      static NameComponent[] | NameHelper.extract(Any a)
      static NameComponent | NameComponentHelper.read(InputStream istream)
      static NameComponent[] | NameHelper.read(InputStream istream)
      NameComponent[] _NamingContextExtStub.to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      NameComponent[] NamingContextExtOperations.to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      Methods in org.omg.CosNaming with parameters of type NameComponent
      Modifier and Type | Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      static void | NameComponentHelper.insert(Any a, NameComponent that)
      static void | NameHelper.insert(Any a, NameComponent[] that)
      void _NamingContextExtStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextExtStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object _NamingContextExtStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object NamingContextOperations.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object _NamingContextStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      String _NamingContextExtStub.to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      String NamingContextExtOperations.to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      void _NamingContextExtStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void NamingContextOperations.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void _NamingContextStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      static void | NameComponentHelper.write(OutputStream ostream, NameComponent value)
      static void | NameHelper.write(OutputStream ostream, NameComponent[] value)
      Constructors in org.omg.CosNaming with parameters of type NameComponent
      Constructor and Description
      Binding(NameComponent[] _binding_name, BindingType _binding_type)
      NameComponentHolder(NameComponent initialValue)
      NameHolder(NameComponent[] initialValue)

    • Uses of NameComponent in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as NameComponent
      Modifier and Type | Field and Description
      NameComponent[] | NotFound.rest_of_name
      NameComponent[] | CannotProceed.rest_of_name
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NameComponent
      Constructor and Description
      CannotProceed(NamingContext _cxt, NameComponent[] _rest_of_name)
      CannotProceed(String $reason, NamingContext _cxt, NameComponent[] _rest_of_name)
      NotFound(NotFoundReason _why, NameComponent[] _rest_of_name)
      NotFound(String $reason, NotFoundReason _why, NameComponent[] _rest_of_name)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NameComponentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NameComponentHelper

No usage of org.omg.CosNaming.NameComponentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NameComponentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NameComponentHolder

No usage of org.omg.CosNaming.NameComponentHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NameHelper

No usage of org.omg.CosNaming.NameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NameHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NameHolder

No usage of org.omg.CosNaming.NameHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtHelper

No usage of org.omg.CosNaming.NamingContextExtHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtHolder

No usage of org.omg.CosNaming.NamingContextExtHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPOA

No usage of org.omg.CosNaming.NamingContextExtPOA
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextHelper

No usage of org.omg.CosNaming.NamingContextHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextHolder

No usage of org.omg.CosNaming.NamingContextHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPOA

No usage of org.omg.CosNaming.NamingContextPOA
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming._BindingIteratorImplBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming._BindingIteratorImplBase

No usage of org.omg.CosNaming._BindingIteratorImplBase
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming._BindingIteratorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming._BindingIteratorStub

No usage of org.omg.CosNaming._BindingIteratorStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming._NamingContextExtStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming._NamingContextExtStub

No usage of org.omg.CosNaming._NamingContextExtStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming._NamingContextImplBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming._NamingContextImplBase

No usage of org.omg.CosNaming._NamingContextImplBase
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming._NamingContextStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming._NamingContextStub

No usage of org.omg.CosNaming._NamingContextStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.BindingIterator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.BindingIterator

  • Packages that use BindingIterator
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingIterator in org.omg.CosNaming

      Classes in org.omg.CosNaming that implement BindingIterator
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  _BindingIteratorStub
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      Fields in org.omg.CosNaming declared as BindingIterator
      Modifier and Type | Field and Description
      BindingIterator | BindingIteratorHolder.value
      Methods in org.omg.CosNaming that return BindingIterator
      Modifier and Type | Method and Description
      BindingIterator | BindingIteratorPOA._this()
      BindingIterator | BindingIteratorPOA._this(ORB orb)
      static BindingIterator | BindingIteratorHelper.extract(Any a)
      static BindingIterator | BindingIteratorHelper.narrow(Object obj)
      static BindingIterator | BindingIteratorHelper.read(InputStream istream)
      static BindingIterator | BindingIteratorHelper.unchecked_narrow(Object obj)
      Methods in org.omg.CosNaming with parameters of type BindingIterator
      Modifier and Type | Method and Description
      static void | BindingIteratorHelper.insert(Any a, BindingIterator that)
      static void | BindingIteratorHelper.write(OutputStream ostream, BindingIterator value)
      Constructors in org.omg.CosNaming with parameters of type BindingIterator
      Constructor and Description
      BindingIteratorHolder(BindingIterator initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.BindingIteratorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.BindingIteratorOperations

  • Packages that use BindingIteratorOperations
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of BindingIteratorOperations in org.omg.CosNaming

      Subinterfaces of BindingIteratorOperations in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  BindingIterator
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      Classes in org.omg.CosNaming that implement BindingIteratorOperations
      Modifier and Type | Class and Description
      class  | _BindingIteratorImplBase
      class  _BindingIteratorStub
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  BindingIteratorPOA
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.NamingContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.NamingContext

  • Packages that use NamingContext
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of NamingContext in org.omg.CosNaming

      Subinterfaces of NamingContext in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  NamingContextExt
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Classes in org.omg.CosNaming that implement NamingContext
      Modifier and Type | Class and Description
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  | _NamingContextImplBase
      class  _NamingContextStub
      A naming context is an object that contains a set of name bindings in which each name is unique.
      Fields in org.omg.CosNaming declared as NamingContext
      Modifier and Type | Field and Description
      NamingContext | NamingContextHolder.value
      Methods in org.omg.CosNaming that return NamingContext
      Modifier and Type | Method and Description
      NamingContext | NamingContextPOA._this()
      NamingContext | NamingContextPOA._this(ORB orb)
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      static NamingContext | NamingContextHelper.extract(Any a)
      static NamingContext | NamingContextHelper.narrow(Object obj)
      NamingContext _NamingContextExtStub.new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      NamingContext NamingContextOperations.new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      NamingContext _NamingContextStub.new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      static NamingContext | NamingContextHelper.read(InputStream istream)
      static NamingContext | NamingContextHelper.unchecked_narrow(Object obj)
      Methods in org.omg.CosNaming with parameters of type NamingContext
      Modifier and Type | Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      static void | NamingContextHelper.insert(Any a, NamingContext that)
      void _NamingContextExtStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      static void | NamingContextHelper.write(OutputStream ostream, NamingContext value)
      Constructors in org.omg.CosNaming with parameters of type NamingContext
      Constructor and Description
      NamingContextHolder(NamingContext initialValue)

    • Uses of NamingContext in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as NamingContext
      Modifier and Type | Field and Description
      NamingContext | CannotProceed.cxt
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NamingContext
      Constructor and Description
      CannotProceed(NamingContext _cxt, NameComponent[] _rest_of_name)
      CannotProceed(String $reason, NamingContext _cxt, NameComponent[] _rest_of_name)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.NamingContextExt

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.NamingContextExt

  • Packages that use NamingContextExt
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of NamingContextExt in org.omg.CosNaming

      Classes in org.omg.CosNaming that implement NamingContextExt
      Modifier and Type Class and Description
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Fields in org.omg.CosNaming declared as NamingContextExt
      Modifier and Type | Field and Description
      NamingContextExt | NamingContextExtHolder.value
      Methods in org.omg.CosNaming that return NamingContextExt
      Modifier and Type | Method and Description
      NamingContextExt | NamingContextExtPOA._this()
      NamingContextExt | NamingContextExtPOA._this(ORB orb)
      static NamingContextExt | NamingContextExtHelper.extract(Any a)
      static NamingContextExt | NamingContextExtHelper.narrow(Object obj)
      static NamingContextExt | NamingContextExtHelper.read(InputStream istream)
      static NamingContextExt | NamingContextExtHelper.unchecked_narrow(Object obj)
      Methods in org.omg.CosNaming with parameters of type NamingContextExt
      Modifier and Type | Method and Description
      static void | NamingContextExtHelper.insert(Any a, NamingContextExt that)
      static void | NamingContextExtHelper.write(OutputStream ostream, NamingContextExt value)
      Constructors in org.omg.CosNaming with parameters of type NamingContextExt
      Constructor and Description
      NamingContextExtHolder(NamingContextExt initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.NamingContextExtOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.NamingContextExtOperations

  • Packages that use NamingContextExtOperations
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of NamingContextExtOperations in org.omg.CosNaming

      Subinterfaces of NamingContextExtOperations in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  NamingContextExt
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Classes in org.omg.CosNaming that implement NamingContextExtOperations
      Modifier and Type Class and Description
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  NamingContextExtPOA
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.CosNaming.NamingContextOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.CosNaming.NamingContextOperations

  • Packages that use NamingContextOperations
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.

    • Uses of NamingContextOperations in org.omg.CosNaming

      Subinterfaces of NamingContextOperations in org.omg.CosNaming
      Modifier and Type Interface and Description
      interface  NamingContext
      A naming context is an object that contains a set of name bindings in which each name is unique.
      interface  NamingContextExt
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      interface  NamingContextExtOperations
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      Classes in org.omg.CosNaming that implement NamingContextOperations
      Modifier and Type | Class and Description
      class  _NamingContextExtStub
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  | _NamingContextImplBase
      class  _NamingContextStub
      A naming context is an object that contains a set of name bindings in which each name is unique.
      class  NamingContextExtPOA
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  NamingContextPOA
      A naming context is an object that contains a set of name bindings in which each name is unique.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IstringHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class IstringHelper

  • java.lang.Object
    • org.omg.CosNaming.IstringHelper

  • public abstract class IstringHelper
extends Object
    org/omg/CosNaming/IstringHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      IstringHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • IstringHelper

        public IstringHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NameComponent

  • java.lang.Object
    • org.omg.CosNaming.NameComponent
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NameComponent
extends Object
implements IDLEntity
    org/omg/CosNaming/NameComponent.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String id
      String kind

    • Constructor Summary

      Constructors
      Constructor and Description
      NameComponent()
      NameComponent(String _id, String _kind)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • id

        public String id

      • kind

        public String kind

    • Constructor Detail

      • NameComponent

        public NameComponent()

      • NameComponent

        public NameComponent(String _id,
                     String _kind)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameComponentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NameComponentHelper

  • java.lang.Object
    • org.omg.CosNaming.NameComponentHelper

  • public abstract class NameComponentHelper
extends Object
    org/omg/CosNaming/NameComponentHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NameComponentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameComponent | extract(Any a)
      static String | id()
      static void | insert(Any a, NameComponent that)
      static NameComponent | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameComponent value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameComponentHelper

        public NameComponentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameComponent that)

      • extract

        public static NameComponent extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameComponent read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameComponent value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameComponentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NameComponentHolder

  • java.lang.Object
    • org.omg.CosNaming.NameComponentHolder
  • All Implemented Interfaces:
    Streamable

    public final class NameComponentHolder
extends Object
implements Streamable
    org/omg/CosNaming/NameComponentHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NameComponent value

    • Constructor Summary

      Constructors
      Constructor and Description
      NameComponentHolder()
      NameComponentHolder(NameComponent initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NameComponent value

    • Constructor Detail

      • NameComponentHolder

        public NameComponentHolder()

      • NameComponentHolder

        public NameComponentHolder(NameComponent initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NameHelper

  • java.lang.Object
    • org.omg.CosNaming.NameHelper

  • public abstract class NameHelper
extends Object
    A name is a sequence of name components.

    • Constructor Summary

      Constructors
      Constructor and Description
      NameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameComponent[] | extract(Any a)
      static String | id()
      static void | insert(Any a, NameComponent[] that)
      static NameComponent[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameComponent[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameHelper

        public NameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameComponent[] that)

      • extract

        public static NameComponent[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameComponent[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameComponent[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NameHolder

  • java.lang.Object
    • org.omg.CosNaming.NameHolder
  • All Implemented Interfaces:
    Streamable

    public final class NameHolder
extends Object
implements Streamable
    A name is a sequence of name components.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NameComponent[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      NameHolder()
      NameHolder(NameComponent[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NameComponent[] value

    • Constructor Detail

      • NameHolder

        public NameHolder()

      • NameHolder

        public NameHolder(NameComponent[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExtHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextExtHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtHelper

  • public abstract class NamingContextExtHelper
extends Object
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextExtHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NamingContextExt | extract(Any a)
      static String | id()
      static void | insert(Any a, NamingContextExt that)
      static NamingContextExt | narrow(Object obj)
      static NamingContextExt | read(InputStream istream)
      static TypeCode | type()
      static NamingContextExt | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, NamingContextExt value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NamingContextExtHelper

        public NamingContextExtHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NamingContextExt that)

      • extract

        public static NamingContextExt extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NamingContextExt read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NamingContextExt value)

      • narrow

        public static NamingContextExt narrow(Object obj)

      • unchecked_narrow

        public static NamingContextExt unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExtHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextExtHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtHolder
  • All Implemented Interfaces:
    Streamable

    public final class NamingContextExtHolder
extends Object
implements Streamable
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NamingContextExt value

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextExtHolder()
      NamingContextExtHolder(NamingContextExt initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NamingContextExt value

    • Constructor Detail

      • NamingContextExtHolder

        public NamingContextExtHolder()

      • NamingContextExtHolder

        public NamingContextExtHolder(NamingContextExt initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExtOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface NamingContextExtOperations

  • All Superinterfaces:
    NamingContextOperations
    All Known Subinterfaces:
    NamingContextExt
    All Known Implementing Classes:
    _NamingContextExtStub, NamingContextExtPOA

    public interface NamingContextExtOperations
extends NamingContextOperations
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      NameComponent[] to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      String to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      String to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

    • Method Detail

      • to_string

        String to_string(NameComponent[] n)
          throws InvalidName
        This operation creates a stringified name from the array of Name components.
        Parameters:
        n - Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName

      • to_name

        NameComponent[] to_name(String sn)
                 throws InvalidName
        This operation converts a Stringified Name into an equivalent array of Name Components.
        Parameters:
        sn - Stringified Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName

      • to_url

        String to_url(String addr,
              String sn)
       throws InvalidAddress,
              InvalidName
        This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
        Parameters:
        addr - internet based address of the host machine where Name Service is running

        sn - Stringified Name of the object

        Throws:
        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        org.omg.CosNaming.NamingContextPackage.InvalidAddress - Indicates the internet based address of the host machine is incorrect

        InvalidAddress
        InvalidName

      • resolve_str

        Object resolve_str(String sn)
            throws NotFound,
                   CannotProceed,
                   InvalidName
        This operation resolves the Stringified name into the object reference.
        Parameters:
        sn - Stringified Name of the object

        Throws:
        NotFound - Indicates there is no object reference for the given name.

        CannotProceed - Indicates that the given compound name is incorrect

        org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.

        InvalidName
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExtPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CosNaming.NamingContextExtPackage

This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:

See: Description

  • Class Summary
    Class Description
    AddressHelper
    Address is the Host and Port information represented as a String.
    InvalidAddressHelper
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java .
    InvalidAddressHolder
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java .
    StringNameHelper
    StringName is the Stringified Name, Array of Name Components represented as a String.
    URLStringHelper
    URLString is the URL address (corbaloc: or corbaname:) represented as a String.
  • Exception Summary
    Exception Description
    InvalidAddress
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java .

Package org.omg.CosNaming.NamingContextExtPackage Description

This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:

  • AddressHelper
  • StringNameHelper
  • URLStringHelper
  • InvalidAddress

    Package Specification

    For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CosNaming.NamingContextExtPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CosNaming.NamingContextExtPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.AddressHelper
    • org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper
    • org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextExtPackage.StringNameHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CosNaming.NamingContextExtPackage.InvalidAddress
    • org.omg.CosNaming.NamingContextExtPackage.URLStringHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CosNaming.NamingContextExtPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CosNaming.NamingContextExtPackage

  • Packages that use org.omg.CosNaming.NamingContextExtPackage
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:
  • Classes in org.omg.CosNaming.NamingContextExtPackage used by org.omg.CosNaming
    Class and Description
    InvalidAddress
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java .
  • Classes in org.omg.CosNaming.NamingContextExtPackage used by org.omg.CosNaming.NamingContextExtPackage
    Class and Description
    InvalidAddress
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AddressHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class AddressHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.AddressHelper

  • public abstract class AddressHelper
extends Object
    Address is the Host and Port information represented as a String.

    • Constructor Summary

      Constructors
      Constructor and Description
      AddressHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AddressHelper

        public AddressHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.AddressHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.AddressHelper

No usage of org.omg.CosNaming.NamingContextExtPackage.AddressHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.InvalidAddress

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.InvalidAddress

  • Packages that use InvalidAddress
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextExtPackage
    This package contains the following classes, which are used in org.omg.CosNaming.NamingContextExt:

    • Uses of InvalidAddress in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw InvalidAddress
      Modifier and Type Method and Description
      String _NamingContextExtStub.to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
      String NamingContextExtOperations.to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.

    • Uses of InvalidAddress in org.omg.CosNaming.NamingContextExtPackage

      Fields in org.omg.CosNaming.NamingContextExtPackage declared as InvalidAddress
      Modifier and Type | Field and Description
      InvalidAddress | InvalidAddressHolder.value
      Methods in org.omg.CosNaming.NamingContextExtPackage that return InvalidAddress
      Modifier and Type | Method and Description
      static InvalidAddress | InvalidAddressHelper.extract(Any a)
      static InvalidAddress | InvalidAddressHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextExtPackage with parameters of type InvalidAddress
      Modifier and Type | Method and Description
      static void | InvalidAddressHelper.insert(Any a, InvalidAddress that)
      static void | InvalidAddressHelper.write(OutputStream ostream, InvalidAddress value)
      Constructors in org.omg.CosNaming.NamingContextExtPackage with parameters of type InvalidAddress
      Constructor and Description
      InvalidAddressHolder(InvalidAddress initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper

No usage of org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder

No usage of org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.StringNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper

No usage of org.omg.CosNaming.NamingContextExtPackage.StringNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextExtPackage.URLStringHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper

No usage of org.omg.CosNaming.NamingContextExtPackage.URLStringHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidAddress

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class InvalidAddress

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextExtPackage.InvalidAddress
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidAddress
extends UserException
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidAddress()
      InvalidAddress(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidAddress

        public InvalidAddress()

      • InvalidAddress

        public InvalidAddress(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidAddressHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class InvalidAddressHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper

  • public abstract class InvalidAddressHelper
extends Object
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidAddressHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidAddress | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidAddress that)
      static InvalidAddress | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidAddress value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidAddressHelper

        public InvalidAddressHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidAddress that)

      • extract

        public static InvalidAddress extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidAddress read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidAddress value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidAddressHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class InvalidAddressHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder
  • All Implemented Interfaces:
    Streamable

    public final class InvalidAddressHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      InvalidAddress value

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidAddressHolder()
      InvalidAddressHolder(InvalidAddress initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public InvalidAddress value

    • Constructor Detail

      • InvalidAddressHolder

        public InvalidAddressHolder()

      • InvalidAddressHolder

        public InvalidAddressHolder(InvalidAddress initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


StringNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class StringNameHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.StringNameHelper

  • public abstract class StringNameHelper
extends Object
    StringName is the Stringified Name, Array of Name Components represented as a String.

    • Constructor Summary

      Constructors
      Constructor and Description
      StringNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • StringNameHelper

        public StringNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


URLStringHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextExtPackage

Class URLStringHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextExtPackage.URLStringHelper

  • public abstract class URLStringHelper
extends Object
    URLString is the URL address (corbaloc: or corbaname:) represented as a String.

    • Constructor Summary

      Constructors
      Constructor and Description
      URLStringHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • URLStringHelper

        public URLStringHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextExtPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextExtPOA

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.CosNaming.NamingContextExtPOA
  • All Implemented Interfaces:
    InvokeHandler, NamingContextExtOperations, NamingContextOperations

    public abstract class NamingContextExtPOA
extends Servant
implements NamingContextExtOperations, InvokeHandler
    NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve.

    See CORBA COS Naming Specification.

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextExtPOA()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      OutputStream _invoke(String $method, InputStream in, ResponseHandler $rh)
      Invoked by the ORB to dispatch a request to the servant.
      NamingContextExt _this()
      NamingContextExt | _this(ORB orb)

      • Methods inherited from class org.omg.PortableServer.Servant

        _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.omg.CosNaming.NamingContextExtOperations

        resolve_str, to_name, to_string, to_url

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

    • Constructor Detail

      • NamingContextExtPOA

        public NamingContextExtPOA()

    • Method Detail

      • _invoke

        public OutputStream _invoke(String $method,
                            InputStream in,
                            ResponseHandler $rh)
        Description copied from interface: InvokeHandler
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Specified by:
        _invoke in interface InvokeHandler
        Parameters:
        $method - The method name.
        in - The InputStream containing the marshalled arguments.
        $rh - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply

      • _all_interfaces

        public String[] _all_interfaces(POA poa,
                                byte[] objectId)
        Description copied from class: Servant
        Used by the ORB to obtain complete type information from the servant.
        Specified by:
        _all_interfaces in class Servant
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.

      • _this

        public NamingContextExt _this()

      • _this

        public NamingContextExt _this(ORB orb)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextHelper

  • public abstract class NamingContextHelper
extends Object
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NamingContext | extract(Any a)
      static String | id()
      static void | insert(Any a, NamingContext that)
      static NamingContext | narrow(Object obj)
      static NamingContext | read(InputStream istream)
      static TypeCode | type()
      static NamingContext | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, NamingContext value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NamingContextHelper

        public NamingContextHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NamingContext that)

      • extract

        public static NamingContext extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NamingContext read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NamingContext value)

      • narrow

        public static NamingContext narrow(Object obj)

      • unchecked_narrow

        public static NamingContext unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextHolder
  • All Implemented Interfaces:
    Streamable

    public final class NamingContextHolder
extends Object
implements Streamable
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NamingContext value

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextHolder()
      NamingContextHolder(NamingContext initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NamingContext value

    • Constructor Detail

      • NamingContextHolder

        public NamingContextHolder()

      • NamingContextHolder

        public NamingContextHolder(NamingContext initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Interface NamingContextOperations

  • All Known Subinterfaces:
    NamingContext, NamingContextExt, NamingContextExtOperations
    All Known Implementing Classes:
    _NamingContextExtStub, _NamingContextImplBase, _NamingContextStub, NamingContextExtPOA, NamingContextPOA

    public interface NamingContextOperations
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void destroy()
      The destroy operation deletes a naming context.
      void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
      The list operation allows a client to iterate through a set of bindings in a naming context.
      NamingContext new_context()
      This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
      void rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      void unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

    • Method Detail

      • bind

        void bind(NameComponent[] n,
          Object obj)
   throws NotFound,
          CannotProceed,
          InvalidName,
          AlreadyBound
        Creates a binding of a name and an object in the naming context. Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved.
        Parameters:
        n - Name of the object

        obj - The Object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • bind_context

        void bind_context(NameComponent[] n,
                  NamingContext nc)
           throws NotFound,
                  CannotProceed,
                  InvalidName,
                  AlreadyBound
        Names an object that is a naming context. Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved.
        Parameters:
        n - Name of the object

        nc - NamingContect object to bind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

        AlreadyBound - Indicates an object is already bound to the specified name.

      • rebind

        void rebind(NameComponent[] n,
            Object obj)
     throws NotFound,
            CannotProceed,
            InvalidName
        Creates a binding of a name and an object in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.
        Parameters:
        n - Name of the object

        obj - The Object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • rebind_context

        void rebind_context(NameComponent[] n,
                    NamingContext nc)
             throws NotFound,
                    CannotProceed,
                    InvalidName
        Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.
        Parameters:
        n - Name of the object

        nc - NamingContect object to rebind with the given name

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • resolve

        Object resolve(NameComponent[] n)
        throws NotFound,
               CannotProceed,
               InvalidName
        The resolve operation is the process of retrieving an object bound to a name in a given context. The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface.
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • unbind

        void unbind(NameComponent[] n)
     throws NotFound,
            CannotProceed,
            InvalidName
        The unbind operation removes a name binding from a context.
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • list

        void list(int how_many,
          BindingListHolder bl,
          BindingIteratorHolder bi)
        The list operation allows a client to iterate through a set of bindings in a naming context.

        The list operation returns at most the requested number of bindings in BindingList bl.

        • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
        • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
        Parameters:
        how_many - the maximum number of bindings to return

        bl - the returned list of bindings

        bi - the returned binding iterator

      • new_context

        NamingContext new_context()
        This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. The new context is not bound to any name.

      • bind_new_context

        NamingContext bind_new_context(NameComponent[] n)
                        throws NotFound,
                               AlreadyBound,
                               CannotProceed,
                               InvalidName
        This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component).
        Parameters:
        n - Name of the object

        Throws:
        NotFound - Indicates the name does not identify a binding.

        AlreadyBound - Indicates an object is already bound to the specified name.

        CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

        InvalidName - Indicates that the name is invalid.

      • destroy

        void destroy()
      throws NotEmpty
        The destroy operation deletes a naming context. If the naming context contains bindings, the NotEmpty exception is raised.
        Throws:
        NotEmpty - Indicates that the Naming Context contains bindings.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.CosNaming.NamingContextPackage

This package contains Exception classes for the org.omg.CosNaming package.

See: Description

  • Class Summary
    Class Description
    AlreadyBoundHelper
    org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java .
    AlreadyBoundHolder
    org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java .
    CannotProceedHelper
    org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java .
    CannotProceedHolder
    org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java .
    InvalidNameHelper
    org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java .
    InvalidNameHolder
    org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java .
    NotEmptyHelper
    org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java .
    NotEmptyHolder
    org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java .
    NotFoundHelper
    org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java .
    NotFoundHolder
    org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java .
    NotFoundReason
    Indicates the reason for not able to resolve.
    NotFoundReasonHelper
    Indicates the reason for not able to resolve.
    NotFoundReasonHolder
    Indicates the reason for not able to resolve.
  • Exception Summary
    Exception Description
    AlreadyBound
    org/omg/CosNaming/NamingContextPackage/AlreadyBound.java .
    CannotProceed
    org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
    InvalidName
    org/omg/CosNaming/NamingContextPackage/InvalidName.java .
    NotEmpty
    org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
    NotFound
    org/omg/CosNaming/NamingContextPackage/NotFound.java .

Package org.omg.CosNaming.NamingContextPackage Description

This package contains Exception classes for the org.omg.CosNaming package. The list of exception classes are:

  • AlreadyBound
  • CannotProceed
  • InvalidName
  • NotEmpty
  • NotFound
  • NotFoundReason

    Package Specification

    For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.CosNaming.NamingContextPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.CosNaming.NamingContextPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
    • org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
    • org.omg.CosNaming.NamingContextPackage.CannotProceedHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
    • org.omg.CosNaming.NamingContextPackage.InvalidNameHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
    • org.omg.CosNaming.NamingContextPackage.NotEmptyHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextPackage.NotFoundHelper
    • org.omg.CosNaming.NamingContextPackage.NotFoundHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.CosNaming.NamingContextPackage.NotFoundReason (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
    • org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder (implements org.omg.CORBA.portable.Streamable)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.CosNaming.NamingContextPackage.AlreadyBound
          • org.omg.CosNaming.NamingContextPackage.CannotProceed
          • org.omg.CosNaming.NamingContextPackage.InvalidName
          • org.omg.CosNaming.NamingContextPackage.NotEmpty
          • org.omg.CosNaming.NamingContextPackage.NotFound
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.CosNaming.NamingContextPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.CosNaming.NamingContextPackage

  • Packages that use org.omg.CosNaming.NamingContextPackage
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.
  • Classes in org.omg.CosNaming.NamingContextPackage used by org.omg.CosNaming
    Class and Description
    AlreadyBound
    org/omg/CosNaming/NamingContextPackage/AlreadyBound.java .
    CannotProceed
    org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
    InvalidName
    org/omg/CosNaming/NamingContextPackage/InvalidName.java .
    NotEmpty
    org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
    NotFound
    org/omg/CosNaming/NamingContextPackage/NotFound.java .
  • Classes in org.omg.CosNaming.NamingContextPackage used by org.omg.CosNaming.NamingContextPackage
    Class and Description
    AlreadyBound
    org/omg/CosNaming/NamingContextPackage/AlreadyBound.java .
    CannotProceed
    org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
    InvalidName
    org/omg/CosNaming/NamingContextPackage/InvalidName.java .
    NotEmpty
    org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
    NotFound
    org/omg/CosNaming/NamingContextPackage/NotFound.java .
    NotFoundReason
    Indicates the reason for not able to resolve.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AlreadyBound

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class AlreadyBound

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextPackage.AlreadyBound
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class AlreadyBound
extends UserException
    org/omg/CosNaming/NamingContextPackage/AlreadyBound.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AlreadyBound()
      AlreadyBound(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AlreadyBound

        public AlreadyBound()

      • AlreadyBound

        public AlreadyBound(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AlreadyBoundHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class AlreadyBoundHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

  • public abstract class AlreadyBoundHelper
extends Object
    org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AlreadyBoundHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static AlreadyBound | extract(Any a)
      static String | id()
      static void | insert(Any a, AlreadyBound that)
      static AlreadyBound | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, AlreadyBound value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AlreadyBoundHelper

        public AlreadyBoundHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          AlreadyBound that)

      • extract

        public static AlreadyBound extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static AlreadyBound read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         AlreadyBound value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AlreadyBoundHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class AlreadyBoundHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
  • All Implemented Interfaces:
    Streamable

    public final class AlreadyBoundHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      AlreadyBound value

    • Constructor Summary

      Constructors
      Constructor and Description
      AlreadyBoundHolder()
      AlreadyBoundHolder(AlreadyBound initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public AlreadyBound value

    • Constructor Detail

      • AlreadyBoundHolder

        public AlreadyBoundHolder()

      • AlreadyBoundHolder

        public AlreadyBoundHolder(AlreadyBound initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CannotProceed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class CannotProceed

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextPackage.CannotProceed
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class CannotProceed
extends UserException
    org/omg/CosNaming/NamingContextPackage/CannotProceed.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NamingContext cxt
      NameComponent[] rest_of_name

    • Constructor Summary

      Constructors
      Constructor and Description
      CannotProceed()
      CannotProceed(NamingContext _cxt, NameComponent[] _rest_of_name)
      CannotProceed(String $reason, NamingContext _cxt, NameComponent[] _rest_of_name)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • cxt

        public NamingContext cxt

      • rest_of_name

        public NameComponent[] rest_of_name

    • Constructor Detail

      • CannotProceed

        public CannotProceed()

      • CannotProceed

        public CannotProceed(NamingContext _cxt,
                     NameComponent[] _rest_of_name)

      • CannotProceed

        public CannotProceed(String $reason,
                     NamingContext _cxt,
                     NameComponent[] _rest_of_name)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CannotProceedHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class CannotProceedHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

  • public abstract class CannotProceedHelper
extends Object
    org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      CannotProceedHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static CannotProceed | extract(Any a)
      static String | id()
      static void | insert(Any a, CannotProceed that)
      static CannotProceed | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, CannotProceed value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CannotProceedHelper

        public CannotProceedHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          CannotProceed that)

      • extract

        public static CannotProceed extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static CannotProceed read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         CannotProceed value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CannotProceedHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class CannotProceedHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
  • All Implemented Interfaces:
    Streamable

    public final class CannotProceedHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      CannotProceed value

    • Constructor Summary

      Constructors
      Constructor and Description
      CannotProceedHolder()
      CannotProceedHolder(CannotProceed initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public CannotProceed value

    • Constructor Detail

      • CannotProceedHolder

        public CannotProceedHolder()

      • CannotProceedHolder

        public CannotProceedHolder(CannotProceed initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBound

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBound

  • Packages that use AlreadyBound
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of AlreadyBound in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw AlreadyBound
      Modifier and Type Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.

    • Uses of AlreadyBound in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as AlreadyBound
      Modifier and Type | Field and Description
      AlreadyBound | AlreadyBoundHolder.value
      Methods in org.omg.CosNaming.NamingContextPackage that return AlreadyBound
      Modifier and Type | Method and Description
      static AlreadyBound | AlreadyBoundHelper.extract(Any a)
      static AlreadyBound | AlreadyBoundHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type AlreadyBound
      Modifier and Type | Method and Description
      static void | AlreadyBoundHelper.insert(Any a, AlreadyBound that)
      static void | AlreadyBoundHelper.write(OutputStream ostream, AlreadyBound value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type AlreadyBound
      Constructor and Description
      AlreadyBoundHolder(AlreadyBound initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

No usage of org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder

No usage of org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceed

  • Packages that use CannotProceed
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of CannotProceed in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw CannotProceed
      Modifier and Type Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextExtStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextExtStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object _NamingContextExtStub.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object NamingContextExtOperations.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object _NamingContextExtStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object NamingContextOperations.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object _NamingContextStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      void _NamingContextExtStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void NamingContextOperations.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void _NamingContextStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

    • Uses of CannotProceed in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as CannotProceed
      Modifier and Type | Field and Description
      CannotProceed | CannotProceedHolder.value
      Methods in org.omg.CosNaming.NamingContextPackage that return CannotProceed
      Modifier and Type | Method and Description
      static CannotProceed | CannotProceedHelper.extract(Any a)
      static CannotProceed | CannotProceedHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type CannotProceed
      Modifier and Type | Method and Description
      static void | CannotProceedHelper.insert(Any a, CannotProceed that)
      static void | CannotProceedHelper.write(OutputStream ostream, CannotProceed value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type CannotProceed
      Constructor and Description
      CannotProceedHolder(CannotProceed initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

No usage of org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder

No usage of org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidName

  • Packages that use InvalidName
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of InvalidName in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw InvalidName
      Modifier and Type Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextExtStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextExtStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object _NamingContextExtStub.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object NamingContextExtOperations.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object _NamingContextExtStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object NamingContextOperations.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object _NamingContextStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      NameComponent[] _NamingContextExtStub.to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      NameComponent[] NamingContextExtOperations.to_name(String sn)
      This operation converts a Stringified Name into an equivalent array of Name Components.
      String _NamingContextExtStub.to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      String NamingContextExtOperations.to_string(NameComponent[] n)
      This operation creates a stringified name from the array of Name components.
      String _NamingContextExtStub.to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
      String NamingContextExtOperations.to_url(String addr, String sn)
      This operation creates a URL based "iiopname://" format name from the Stringified Name of the object.
      void _NamingContextExtStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void NamingContextOperations.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void _NamingContextStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

    • Uses of InvalidName in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as InvalidName
      Modifier and Type | Field and Description
      InvalidName | InvalidNameHolder.value
      Methods in org.omg.CosNaming.NamingContextPackage that return InvalidName
      Modifier and Type | Method and Description
      static InvalidName | InvalidNameHelper.extract(Any a)
      static InvalidName | InvalidNameHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type InvalidName
      Modifier and Type | Method and Description
      static void | InvalidNameHelper.insert(Any a, InvalidName that)
      static void | InvalidNameHelper.write(OutputStream ostream, InvalidName value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type InvalidName
      Constructor and Description
      InvalidNameHolder(InvalidName initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

No usage of org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder

No usage of org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmpty

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmpty

  • Packages that use NotEmpty
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of NotEmpty in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw NotEmpty
      Modifier and Type Method and Description
      void _NamingContextExtStub.destroy()
      The destroy operation deletes a naming context.
      void NamingContextOperations.destroy()
      The destroy operation deletes a naming context.
      void _NamingContextStub.destroy()
      The destroy operation deletes a naming context.

    • Uses of NotEmpty in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as NotEmpty
      Modifier and Type | Field and Description
      NotEmpty | NotEmptyHolder.value
      Methods in org.omg.CosNaming.NamingContextPackage that return NotEmpty
      Modifier and Type | Method and Description
      static NotEmpty | NotEmptyHelper.extract(Any a)
      static NotEmpty | NotEmptyHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotEmpty
      Modifier and Type | Method and Description
      static void | NotEmptyHelper.insert(Any a, NotEmpty that)
      static void | NotEmptyHelper.write(OutputStream ostream, NotEmpty value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotEmpty
      Constructor and Description
      NotEmptyHolder(NotEmpty initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFound

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFound

  • Packages that use NotFound
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of NotFound in org.omg.CosNaming

      Methods in org.omg.CosNaming that throw NotFound
      Modifier and Type Method and Description
      void _NamingContextExtStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      void _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
      Names an object that is a naming context.
      NamingContext _NamingContextExtStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext NamingContextOperations.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      NamingContext _NamingContextStub.bind_new_context(NameComponent[] n)
      This operation creates a new context and binds it to the name supplied as an argument.
      void _NamingContextExtStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void NamingContextOperations.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextStub.bind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context.
      void _NamingContextExtStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
      Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
      void _NamingContextExtStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void NamingContextOperations.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      void _NamingContextStub.rebind(NameComponent[] n, Object obj)
      Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
      Object _NamingContextExtStub.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object NamingContextExtOperations.resolve_str(String sn)
      This operation resolves the Stringified name into the object reference.
      Object _NamingContextExtStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object NamingContextOperations.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      Object _NamingContextStub.resolve(NameComponent[] n)
      The resolve operation is the process of retrieving an object bound to a name in a given context.
      void _NamingContextExtStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void NamingContextOperations.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.
      void _NamingContextStub.unbind(NameComponent[] n)
      The unbind operation removes a name binding from a context.

    • Uses of NotFound in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as NotFound
      Modifier and Type | Field and Description
      NotFound | NotFoundHolder.value
      Methods in org.omg.CosNaming.NamingContextPackage that return NotFound
      Modifier and Type | Method and Description
      static NotFound | NotFoundHelper.extract(Any a)
      static NotFound | NotFoundHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotFound
      Modifier and Type | Method and Description
      static void | NotFoundHelper.insert(Any a, NotFound that)
      static void | NotFoundHelper.write(OutputStream ostream, NotFound value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotFound
      Constructor and Description
      NotFoundHolder(NotFound initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReason

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReason

  • Packages that use NotFoundReason
    Package Description
    org.omg.CosNaming.NamingContextPackage
    This package contains Exception classes for the org.omg.CosNaming package.

    • Uses of NotFoundReason in org.omg.CosNaming.NamingContextPackage

      Fields in org.omg.CosNaming.NamingContextPackage declared as NotFoundReason
      Modifier and Type | Field and Description
      static NotFoundReason | NotFoundReason.missing_node
      static NotFoundReason | NotFoundReason.not_context
      static NotFoundReason | NotFoundReason.not_object
      NotFoundReason | NotFoundReasonHolder.value
      NotFoundReason | NotFound.why
      Methods in org.omg.CosNaming.NamingContextPackage that return NotFoundReason
      Modifier and Type | Method and Description
      static NotFoundReason | NotFoundReasonHelper.extract(Any a)
      static NotFoundReason | NotFoundReason.from_int(int value)
      static NotFoundReason | NotFoundReasonHelper.read(InputStream istream)
      Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotFoundReason
      Modifier and Type | Method and Description
      static void | NotFoundReasonHelper.insert(Any a, NotFoundReason that)
      static void | NotFoundReasonHelper.write(OutputStream ostream, NotFoundReason value)
      Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotFoundReason
      Constructor and Description
      NotFound(NotFoundReason _why, NameComponent[] _rest_of_name)
      NotFound(String $reason, NotFoundReason _why, NameComponent[] _rest_of_name)
      NotFoundReasonHolder(NotFoundReason initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class InvalidName

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextPackage.InvalidName
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidName
extends UserException
    org/omg/CosNaming/NamingContextPackage/InvalidName.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidName()
      InvalidName(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidName

        public InvalidName()

      • InvalidName

        public InvalidName(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class InvalidNameHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

  • public abstract class InvalidNameHelper
extends Object
    org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidName | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidName that)
      static InvalidName | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidName value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidNameHelper

        public InvalidNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidName that)

      • extract

        public static InvalidName extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidName read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidName value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidNameHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class InvalidNameHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
  • All Implemented Interfaces:
    Streamable

    public final class InvalidNameHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      InvalidName value

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidNameHolder()
      InvalidNameHolder(InvalidName initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public InvalidName value

    • Constructor Detail

      • InvalidNameHolder

        public InvalidNameHolder()

      • InvalidNameHolder

        public InvalidNameHolder(InvalidName initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotEmpty

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotEmpty

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextPackage.NotEmpty
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NotEmpty
extends UserException
    org/omg/CosNaming/NamingContextPackage/NotEmpty.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NotEmpty()
      NotEmpty(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NotEmpty

        public NotEmpty()

      • NotEmpty

        public NotEmpty(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotEmptyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotEmptyHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

  • public abstract class NotEmptyHelper
extends Object
    org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NotEmptyHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NotEmpty | extract(Any a)
      static String | id()
      static void | insert(Any a, NotEmpty that)
      static NotEmpty | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NotEmpty value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NotEmptyHelper

        public NotEmptyHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NotEmpty that)

      • extract

        public static NotEmpty extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NotEmpty read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NotEmpty value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotEmptyHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotEmptyHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
  • All Implemented Interfaces:
    Streamable

    public final class NotEmptyHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NotEmpty value

    • Constructor Summary

      Constructors
      Constructor and Description
      NotEmptyHolder()
      NotEmptyHolder(NotEmpty initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NotEmpty value

    • Constructor Detail

      • NotEmptyHolder

        public NotEmptyHolder()

      • NotEmptyHolder

        public NotEmptyHolder(NotEmpty initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFound

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFound

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.CosNaming.NamingContextPackage.NotFound
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NotFound
extends UserException
    org/omg/CosNaming/NamingContextPackage/NotFound.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NameComponent[] rest_of_name
      NotFoundReason why

    • Constructor Summary

      Constructors
      Constructor and Description
      NotFound()
      NotFound(NotFoundReason _why, NameComponent[] _rest_of_name)
      NotFound(String $reason, NotFoundReason _why, NameComponent[] _rest_of_name)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • why

        public NotFoundReason why

      • rest_of_name

        public NameComponent[] rest_of_name

    • Constructor Detail

      • NotFound

        public NotFound()

      • NotFound

        public NotFound(NotFoundReason _why,
                NameComponent[] _rest_of_name)

      • NotFound

        public NotFound(String $reason,
                NotFoundReason _why,
                NameComponent[] _rest_of_name)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFoundHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFoundHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotFoundHelper

  • public abstract class NotFoundHelper
extends Object
    org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NotFoundHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NotFound | extract(Any a)
      static String | id()
      static void | insert(Any a, NotFound that)
      static NotFound | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NotFound value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NotFoundHelper

        public NotFoundHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NotFound that)

      • extract

        public static NotFound extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NotFound read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NotFound value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFoundHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFoundHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotFoundHolder
  • All Implemented Interfaces:
    Streamable

    public final class NotFoundHolder
extends Object
implements Streamable
    org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/CosNaming/nameservice.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NotFound value

    • Constructor Summary

      Constructors
      Constructor and Description
      NotFoundHolder()
      NotFoundHolder(NotFound initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NotFound value

    • Constructor Detail

      • NotFoundHolder

        public NotFoundHolder()

      • NotFoundHolder

        public NotFoundHolder(NotFound initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFoundReason

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFoundReason

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotFoundReason
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class NotFoundReason
extends Object
implements IDLEntity
    Indicates the reason for not able to resolve.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _missing_node
      static int | _not_context
      static int | _not_object
      static NotFoundReason | missing_node
      static NotFoundReason | not_context
      static NotFoundReason | not_object

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | NotFoundReason(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static NotFoundReason | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _missing_node

        public static final int _missing_node
        See Also:
        Constant Field Values

      • missing_node

        public static final NotFoundReason missing_node

      • _not_context

        public static final int _not_context
        See Also:
        Constant Field Values

      • not_context

        public static final NotFoundReason not_context

      • _not_object

        public static final int _not_object
        See Also:
        Constant Field Values

      • not_object

        public static final NotFoundReason not_object

    • Constructor Detail

      • NotFoundReason

        protected NotFoundReason(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static NotFoundReason from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFoundReasonHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFoundReasonHelper

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

  • public abstract class NotFoundReasonHelper
extends Object
    Indicates the reason for not able to resolve.

    • Constructor Summary

      Constructors
      Constructor and Description
      NotFoundReasonHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NotFoundReason | extract(Any a)
      static String | id()
      static void | insert(Any a, NotFoundReason that)
      static NotFoundReason | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NotFoundReason value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NotFoundReasonHelper

        public NotFoundReasonHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NotFoundReason that)

      • extract

        public static NotFoundReason extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NotFoundReason read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NotFoundReason value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NotFoundReasonHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming.NamingContextPackage

Class NotFoundReasonHolder

  • java.lang.Object
    • org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
  • All Implemented Interfaces:
    Streamable

    public final class NotFoundReasonHolder
extends Object
implements Streamable
    Indicates the reason for not able to resolve.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      NotFoundReason value

    • Constructor Summary

      Constructors
      Constructor and Description
      NotFoundReasonHolder()
      NotFoundReasonHolder(NotFoundReason initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public NotFoundReason value

    • Constructor Detail

      • NotFoundReasonHolder

        public NotFoundReasonHolder()

      • NotFoundReasonHolder

        public NotFoundReasonHolder(NotFoundReason initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamingContextPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.CosNaming

Class NamingContextPOA

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.CosNaming.NamingContextPOA
  • All Implemented Interfaces:
    InvokeHandler, NamingContextOperations

    public abstract class NamingContextPOA
extends Servant
implements NamingContextOperations, InvokeHandler
    A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

    See CORBA COS Naming Specification.

    • Constructor Summary

      Constructors
      Constructor and Description
      NamingContextPOA()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      OutputStream _invoke(String $method, InputStream in, ResponseHandler $rh)
      Invoked by the ORB to dispatch a request to the servant.
      NamingContext _this()
      NamingContext | _this(ORB orb)

      • Methods inherited from class org.omg.PortableServer.Servant

        _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.omg.CosNaming.NamingContextOperations

        bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind

    • Constructor Detail

      • NamingContextPOA

        public NamingContextPOA()

    • Method Detail

      • _invoke

        public OutputStream _invoke(String $method,
                            InputStream in,
                            ResponseHandler $rh)
        Description copied from interface: InvokeHandler
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Specified by:
        _invoke in interface InvokeHandler
        Parameters:
        $method - The method name.
        in - The InputStream containing the marshalled arguments.
        $rh - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply

      • _all_interfaces

        public String[] _all_interfaces(POA poa,
                                byte[] objectId)
        Description copied from class: Servant
        Used by the ORB to obtain complete type information from the servant.
        Specified by:
        _all_interfaces in class Servant
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.

      • _this

        public NamingContext _this()

      • _this

        public NamingContext _this(ORB orb)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Dynamic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.Dynamic

This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9.

See: Description

  • Class Summary
    Class Description
    Parameter
    org/omg/Dynamic/Parameter.java .

Package org.omg.Dynamic Description

This package contains the Dynamic module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.9. Please refer to that OMG specification for further details.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.Dynamic Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.Dynamic

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.Dynamic.Parameter (implements org.omg.CORBA.portable.IDLEntity)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.Dynamic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.Dynamic

  • Packages that use org.omg.Dynamic
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
  • Classes in org.omg.Dynamic used by org.omg.PortableInterceptor
    Class and Description
    Parameter
    org/omg/Dynamic/Parameter.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.Dynamic.Parameter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.Dynamic.Parameter

  • Packages that use Parameter
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of Parameter in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return Parameter
      Modifier and Type Method and Description
      Parameter[] RequestInfoOperations.arguments()
      Returns an array of Parameter objects, containing the arguments on the operation being invoked.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Parameter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.Dynamic

Class Parameter

  • java.lang.Object
    • org.omg.Dynamic.Parameter
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Parameter
extends Object
implements IDLEntity
    org/omg/Dynamic/Parameter.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Any argument
      ParameterMode mode

    • Constructor Summary

      Constructors
      Constructor and Description
      Parameter()
      Parameter(Any _argument, ParameterMode _mode)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • argument

        public Any argument

      • mode

        public ParameterMode mode

    • Constructor Detail

      • Parameter

        public Parameter()

      • Parameter

        public Parameter(Any _argument,
                 ParameterMode _mode)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynamicAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.DynamicAny

Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

See: Description

  • Interface Summary
    Interface Description
    DynAny
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    DynAnyFactory
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    DynAnyFactoryOperations
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    DynAnyOperations
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    DynArray
    DynArray objects support the manipulation of IDL arrays.
    DynArrayOperations
    DynArray objects support the manipulation of IDL arrays.
    DynEnum
    DynEnum objects support the manipulation of IDL enumerated values.
    DynEnumOperations
    DynEnum objects support the manipulation of IDL enumerated values.
    DynFixed
    DynFixed objects support the manipulation of IDL fixed values.
    DynFixedOperations
    DynFixed objects support the manipulation of IDL fixed values.
    DynSequence
    DynSequence objects support the manipulation of IDL sequences.
    DynSequenceOperations
    DynSequence objects support the manipulation of IDL sequences.
    DynStruct
    DynStruct objects support the manipulation of IDL struct and exception values.
    DynStructOperations
    DynStruct objects support the manipulation of IDL struct and exception values.
    DynUnion
    DynUnion objects support the manipulation of IDL unions.
    DynUnionOperations
    DynUnion objects support the manipulation of IDL unions.
    DynValue
    DynValue objects support the manipulation of IDL non-boxed value types.
    DynValueBox
    DynValueBox objects support the manipulation of IDL boxed value types.
    DynValueBoxOperations
    DynValueBox objects support the manipulation of IDL boxed value types.
    DynValueCommon
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
    DynValueCommonOperations
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
    DynValueOperations
    DynValue objects support the manipulation of IDL non-boxed value types.
  • Class Summary
    Class Description
    _DynAnyFactoryStub
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    _DynAnyStub
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    _DynArrayStub
    DynArray objects support the manipulation of IDL arrays.
    _DynEnumStub
    DynEnum objects support the manipulation of IDL enumerated values.
    _DynFixedStub
    DynFixed objects support the manipulation of IDL fixed values.
    _DynSequenceStub
    DynSequence objects support the manipulation of IDL sequences.
    _DynStructStub
    DynStruct objects support the manipulation of IDL struct and exception values.
    _DynUnionStub
    DynUnion objects support the manipulation of IDL unions.
    _DynValueStub
    DynValue objects support the manipulation of IDL non-boxed value types.
    AnySeqHelper
    org/omg/DynamicAny/AnySeqHelper.java .
    DynAnyFactoryHelper
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    DynAnyHelper
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    DynAnySeqHelper
    org/omg/DynamicAny/DynAnySeqHelper.java .
    DynArrayHelper
    DynArray objects support the manipulation of IDL arrays.
    DynEnumHelper
    DynEnum objects support the manipulation of IDL enumerated values.
    DynFixedHelper
    DynFixed objects support the manipulation of IDL fixed values.
    DynSequenceHelper
    DynSequence objects support the manipulation of IDL sequences.
    DynStructHelper
    DynStruct objects support the manipulation of IDL struct and exception values.
    DynUnionHelper
    DynUnion objects support the manipulation of IDL unions.
    DynValueHelper
    DynValue objects support the manipulation of IDL non-boxed value types.
    FieldNameHelper
    org/omg/DynamicAny/FieldNameHelper.java .
    NameDynAnyPair
    org/omg/DynamicAny/NameDynAnyPair.java .
    NameDynAnyPairHelper
    org/omg/DynamicAny/NameDynAnyPairHelper.java .
    NameDynAnyPairSeqHelper
    org/omg/DynamicAny/NameDynAnyPairSeqHelper.java .
    NameValuePair
    org/omg/DynamicAny/NameValuePair.java .
    NameValuePairHelper
    org/omg/DynamicAny/NameValuePairHelper.java .
    NameValuePairSeqHelper
    org/omg/DynamicAny/NameValuePairSeqHelper.java .

Package org.omg.DynamicAny Description

Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

An any can be passed to a program that doesn't have any static information for the type of the any (code generated for the type by an IDL compiler has not been compiled with the object implementation). As a result, the object receiving the any does not have a portable method of using it.

DynAnys enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value. This is especially helpful for writing powerful generic servers (bridges, event channels supporting filtering). Similarly, this facility enables the construction of an any at runtime, without having static knowledge of its type. This is especially helpful for writing generic clients (bridges, browsers, debuggers, user interface tools).

Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an Any. A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty.

Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type). A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

Handling DynAny objects

Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

Basic operations include:

  • insert_boolean, get_boolean
  • insert_char, get_char
  • insert_short, get_short
  • insert_ushort, get_ushort
  • insert_long, get_long
  • insert_ulong, get_ulong
  • insert_double, get_double
  • insert_string, get_string
  • insert_reference, get_reference
  • insert_typecode, get_typecode
  • insert_longlong, get_longlong
  • insert_ulonglong, get_ulonglong
  • insert_longdouble, get_longdouble
  • insert_wchar, get_wchar
  • insert_wstring, get_wstring
  • insert_any, get_any
  • insert_dyn_any, get_dyn_any
  • insert_val, get_val
  • insert_octet, get_octet
  • insert_float, get_float
  • get_value
  • get_as_string
  • get_as_ulong
  • get_members
  • get_members_as_dyn_any
  • get_discriminator
  • get_length
  • get_elements
  • get_elements_as_dyn_any
  • get_boxed_value
  • get_boxed_value_as_dyn_any

DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynFixedStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynFixedStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynFixedStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynFixed, DynFixedOperations

    public class _DynFixedStub
extends ObjectImpl
implements DynFixed
    DynFixed objects support the manipulation of IDL fixed values. Because IDL does not have a generic type that can represent fixed types with arbitrary number of digits and arbitrary scale, the operations use the IDL string type.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynFixedStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      String get_value()
      Returns the value of a DynFixed.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      boolean set_value(String val)
      Sets the value of the DynFixed.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynFixedStub

        public _DynFixedStub()

    • Method Detail

      • get_value

        public String get_value()
        Returns the value of a DynFixed.
        Specified by:
        get_value in interface DynFixedOperations

      • set_value

        public boolean set_value(String val)
                  throws TypeMismatch,
                         InvalidValue
        Sets the value of the DynFixed. The val string must contain a fixed string constant in the same format as used for IDL fixed-point literals. However, the trailing d or D is optional. The return value is true if val can be represented as the DynFixed without loss of precision. If val has more fractional digits than can be represented in the DynFixed, fractional digits are truncated and the return value is false.
        Specified by:
        set_value in interface DynFixedOperations
        Throws:
        TypeMismatch - If val does not contain a valid fixed-point literal or contains extraneous characters other than leading or trailing white space
        InvalidValue - If val contains a value whose scale exceeds that of the DynFixed or is not initialized

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynEnumStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynEnumStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynEnumStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynEnum, DynEnumOperations

    public class _DynEnumStub
extends ObjectImpl
implements DynEnum
    DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynEnumStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      String get_as_string()
      Returns the value of the DynEnum as an IDL identifier.
      int get_as_ulong()
      Returns the value of the DynEnum as the enumerated value's ordinal value.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_as_string(String value)
      Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
      void set_as_ulong(int value)
      Sets the value of the DynEnum as the enumerated value's ordinal value.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynEnumStub

        public _DynEnumStub()

    • Method Detail

      • get_as_string

        public String get_as_string()
        Returns the value of the DynEnum as an IDL identifier.
        Specified by:
        get_as_string in interface DynEnumOperations

      • set_as_string

        public void set_as_string(String value)
                   throws InvalidValue
        Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
        Specified by:
        set_as_string in interface DynEnumOperations
        Throws:
        InvalidValue - If value contains a string that is not a valid IDL identifier for the corresponding enumerated type

      • get_as_ulong

        public int get_as_ulong()
        Returns the value of the DynEnum as the enumerated value's ordinal value. Enumerators have ordinal values 0 to n-1, as they appear from left to right in the corresponding IDL definition.
        Specified by:
        get_as_ulong in interface DynEnumOperations

      • set_as_ulong

        public void set_as_ulong(int value)
                  throws InvalidValue
        Sets the value of the DynEnum as the enumerated value's ordinal value.
        Specified by:
        set_as_ulong in interface DynEnumOperations
        Throws:
        InvalidValue - If value contains a value that is outside the range of ordinal values for the corresponding enumerated type

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynValueStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynValueStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynValueStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynValue, DynValueCommon, DynValueCommonOperations, DynValueOperations

    public class _DynValueStub
extends ObjectImpl
implements DynValue
    DynValue objects support the manipulation of IDL non-boxed value types. The DynValue interface can represent both null and non-null value types. For a DynValue representing a non-null value type, the DynValue's components comprise the public and private members of the value type, including those inherited from concrete base value types, in the order of definition. A DynValue representing a null value type has no components and a current position of -1.

    Warning: Indiscriminantly changing the contents of private value type members can cause the value type implementation to break by violating internal constraints. Access to private members is provided to support such activities as ORB bridging and debugging and should not be used to arbitrarily violate the encapsulation of the value type.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynValueStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      TCKind current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String current_member_name()
      Returns the name of the member at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      NameDynAnyPair[] get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      NameValuePair[] get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean is_null()
      Returns true if the DynValueCommon represents a null value type.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      void set_to_null()
      Changes the representation of a DynValueCommon to a null value type.
      void set_to_value()
      Replaces a null value type with a newly constructed value.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynValueStub

        public _DynValueStub()

    • Method Detail

      • current_member_name

        public String current_member_name()
                           throws TypeMismatch,
                                  InvalidValue
        Returns the name of the member at the current position. This operation may return an empty string since the TypeCode of the value being manipulated may not contain the names of members.
        Specified by:
        current_member_name in interface DynValueOperations
        Throws:
        TypeMismatch - if the DynValue represents a null value type.
        InvalidValue - if the current position does not indicate a member

      • current_member_kind

        public TCKind current_member_kind()
                           throws TypeMismatch,
                                  InvalidValue
        Returns the TCKind associated with the member at the current position.
        Specified by:
        current_member_kind in interface DynValueOperations
        Throws:
        TypeMismatch - if the DynValue represents a null value type.
        InvalidValue - if the current position does not indicate a member

      • get_members

        public NameValuePair[] get_members()
                            throws InvalidValue
        Returns a sequence of NameValuePairs describing the name and the value of each member in the value type. The sequence contains members in the same order as the declaration order of members as indicated by the DynValue's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynValue's TypeCode does not contain member names.
        Specified by:
        get_members in interface DynValueOperations
        Throws:
        InvalidValue - if this object represents a null value type

      • set_members

        public void set_members(NameValuePair[] value)
                 throws TypeMismatch,
                        InvalidValue
        Initializes the value type's members from a sequence of NameValuePairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1. A null value type can be initialized to a non-null value type using this method.

        Members must appear in the NameValuePairs in the order in which they appear in the IDL specification of the value type as indicated by the DynValue's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Specified by:
        set_members in interface DynValueOperations
        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynValue's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynValue's TypeCode

      • get_members_as_dyn_any

        public NameDynAnyPair[] get_members_as_dyn_any()
                                        throws InvalidValue
        Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type. The sequence contains members in the same order as the declaration order of members as indicated by the DynValue's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynValue's TypeCode does not contain member names.
        Specified by:
        get_members_as_dyn_any in interface DynValueOperations
        Throws:
        InvalidValue - if this object represents a null value type

      • set_members_as_dyn_any

        public void set_members_as_dyn_any(NameDynAnyPair[] value)
                            throws TypeMismatch,
                                   InvalidValue
        Initializes the value type's members from a sequence of NameDynAnyPairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1. A null value type can be initialized to a non-null value type using this method.

        Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification of the value type as indicated by the DynValue's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Specified by:
        set_members_as_dyn_any in interface DynValueOperations
        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynValue's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynValue's TypeCode

      • is_null

        public boolean is_null()
        Returns true if the DynValueCommon represents a null value type.
        Specified by:
        is_null in interface DynValueCommonOperations

      • set_to_null

        public void set_to_null()
        Changes the representation of a DynValueCommon to a null value type.
        Specified by:
        set_to_null in interface DynValueCommonOperations

      • set_to_value

        public void set_to_value()
        Replaces a null value type with a newly constructed value. Its components are initialized to default values as in DynAnyFactory.create_dyn_any_from_type_code. If the DynValueCommon represents a non-null value type, then this operation has no effect.
        Specified by:
        set_to_value in interface DynValueCommonOperations

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynAnyStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynAnyStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynAnyStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations

    public class _DynAnyStub
extends ObjectImpl
implements DynAny
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an any.

    A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty. Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

    The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

    A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type).

    A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

    If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

    The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

    Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

    DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynAnyStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynAnyStub

        public _DynAnyStub()

    • Method Detail

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynSequenceStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynSequenceStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynSequenceStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynSequence, DynSequenceOperations

    public class _DynSequenceStub
extends ObjectImpl
implements DynSequence
    DynSequence objects support the manipulation of IDL sequences.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynSequenceStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny[] get_elements_as_dyn_any()
      Returns the DynAnys representing the elements of the sequence.
      Any[] get_elements()
      Returns the elements of the sequence.
      float get_float()
      Extracts the float value from this DynAny.
      int get_length()
      Returns the current length of the sequence.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void set_elements(Any[] value)
      Sets the elements of a sequence.
      void set_length(int len)
      Sets the length of the sequence.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynSequenceStub

        public _DynSequenceStub()

    • Method Detail

      • get_length

        public int get_length()
        Returns the current length of the sequence.
        Specified by:
        get_length in interface DynSequenceOperations

      • set_length

        public void set_length(int len)
                throws InvalidValue
        Sets the length of the sequence. Increasing the length of a sequence adds new elements at the tail without affecting the values of already existing elements. Newly added elements are default-initialized. Increasing the length of a sequence sets the current position to the first newly-added element if the previous current position was -1. Otherwise, if the previous current position was not -1, the current position is not affected. Decreasing the length of a sequence removes elements from the tail without affecting the value of those elements that remain. The new current position after decreasing the length of a sequence is determined as follows:
        • If the length of the sequence is set to zero, the current position is set to -1.
        • If the current position is -1 before decreasing the length, it remains at -1.
        • If the current position indicates a valid element and that element is not removed when the length is decreased, the current position remains unaffected.
        • If the current position indicates a valid element and that element is removed, the current position is set to -1.
        Specified by:
        set_length in interface DynSequenceOperations
        Throws:
        InvalidValue - if this is a bounded sequence and len is larger than the bound

      • get_elements

        public Any[] get_elements()
        Returns the elements of the sequence.
        Specified by:
        get_elements in interface DynSequenceOperations

      • set_elements

        public void set_elements(Any[] value)
                  throws TypeMismatch,
                         InvalidValue
        Sets the elements of a sequence. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.
        Specified by:
        set_elements in interface DynSequenceOperations
        Throws:
        TypeMismatch - if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
        InvalidValue - if the length of value exceeds the bound of a bounded sequence

      • get_elements_as_dyn_any

        public DynAny[] get_elements_as_dyn_any()
        Returns the DynAnys representing the elements of the sequence.
        Specified by:
        get_elements_as_dyn_any in interface DynSequenceOperations

      • set_elements_as_dyn_any

        public void set_elements_as_dyn_any(DynAny[] value)
                             throws TypeMismatch,
                                    InvalidValue
        Sets the elements of a sequence using DynAnys. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.
        Specified by:
        set_elements_as_dyn_any in interface DynSequenceOperations
        Throws:
        TypeMismatch - if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
        InvalidValue - if the length of value exceeds the bound of a bounded sequence

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynUnionStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynUnionStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynUnionStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynUnion, DynUnionOperations

    public class _DynUnionStub
extends ObjectImpl
implements DynUnion
    DynUnion objects support the manipulation of IDL unions. A union can have only two valid current positions:
    • zero, which denotes the discriminator
    • one, which denotes the active member
    The component_count value for a union depends on the current discriminator: it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynUnionStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      TCKind discriminator_kind()
      Returns the TCKind value of the discriminators TypeCode.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      DynAny get_discriminator()
      Returns the current discriminator value.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      boolean has_no_active_member()
      Returns true if the union has no active member, that is, the unions value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      TCKind member_kind()
      Returns the TCKind value of the currently active members TypeCode.
      String member_name()
      Returns the name of the currently active member.
      DynAny member()
      Returns the currently active member.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void set_to_default_member()
      Sets the discriminator to a value that is consistent with the value of the default case of a union.
      void set_to_no_active_member()
      Sets the discriminator to a value that does not correspond to any of the unions case labels.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynUnionStub

        public _DynUnionStub()

    • Method Detail

      • get_discriminator

        public DynAny get_discriminator()
        Returns the current discriminator value.
        Specified by:
        get_discriminator in interface DynUnionOperations

      • set_discriminator

        public void set_discriminator(DynAny d)
                       throws TypeMismatch
        Sets the discriminator of the DynUnion to the specified value. Setting the discriminator to a value that is consistent with the currently active union member does not affect the currently active member. Setting the discriminator to a value that is inconsistent with the currently active member deactivates the member and activates the member that is consistent with the new discriminator value (if there is a member for that value) by initializing the member to its default value. Setting the discriminator of a union sets the current position to 0 if the discriminator value indicates a non-existent union member (has_no_active_member returns true in this case). Otherwise, if the discriminator value indicates a named union member, the current position is set to 1 (has_no_active_member returns false and component_count returns 2 in this case).
        Specified by:
        set_discriminator in interface DynUnionOperations
        Throws:
        TypeMismatch - if the TypeCode of the parameter is not equivalent to the TypeCode of the union's discriminator

      • set_to_default_member

        public void set_to_default_member()
                           throws TypeMismatch
        Sets the discriminator to a value that is consistent with the value of the default case of a union. It sets the current position to zero and causes component_count to return 2.
        Specified by:
        set_to_default_member in interface DynUnionOperations
        Throws:
        TypeMismatch - if the union does not have an explicit default case

      • set_to_no_active_member

        public void set_to_no_active_member()
                             throws TypeMismatch
        Sets the discriminator to a value that does not correspond to any of the unions case labels. It sets the current position to zero and causes component_count to return 1.
        Specified by:
        set_to_no_active_member in interface DynUnionOperations
        Throws:
        TypeMismatch - if the union has an explicit default case or if it uses the entire range of discriminator values for explicit case labels

      • has_no_active_member

        public boolean has_no_active_member()
        Returns true if the union has no active member, that is, the unions value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label. Calling this operation on a union that has a default case returns false. Calling this operation on a union that uses the entire range of discriminator values for explicit case labels returns false.
        Specified by:
        has_no_active_member in interface DynUnionOperations

      • discriminator_kind

        public TCKind discriminator_kind()
        Returns the TCKind value of the discriminators TypeCode.
        Specified by:
        discriminator_kind in interface DynUnionOperations

      • member_kind

        public TCKind member_kind()
                   throws InvalidValue
        Returns the TCKind value of the currently active members TypeCode.
        Specified by:
        member_kind in interface DynUnionOperations
        Throws:
        InvalidValue - if the union does not have a currently active member

      • member

        public DynAny member()
              throws InvalidValue
        Returns the currently active member. Note that the returned reference remains valid only for as long as the currently active member does not change. Using the returned reference beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
        Specified by:
        member in interface DynUnionOperations
        Throws:
        InvalidValue - if the union has no active member

      • member_name

        public String member_name()
                   throws InvalidValue
        Returns the name of the currently active member. If the unions TypeCode does not contain a member name for the currently active member, the operation returns an empty string.
        Specified by:
        member_name in interface DynUnionOperations
        Throws:
        InvalidValue - if the union has no active member

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynStructStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynStructStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynStructStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynStruct, DynStructOperations

    public class _DynStructStub
extends ObjectImpl
implements DynStruct
    DynStruct objects support the manipulation of IDL struct and exception values. Members of the exceptions are handled in the same way as members of a struct.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynStructStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      TCKind current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String current_member_name()
      Returns the name of the member at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      NameDynAnyPair[] get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameValuePair[] get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynStructStub

        public _DynStructStub()

    • Method Detail

      • current_member_name

        public String current_member_name()
                           throws TypeMismatch,
                                  InvalidValue
        Returns the name of the member at the current position. This operation may return an empty string since the TypeCode of the value being manipulated may not contain the names of members.
        Specified by:
        current_member_name in interface DynStructOperations
        Throws:
        TypeMismatch - if the DynStruct represents an empty exception.
        InvalidValue - if the current position does not indicate a member

      • current_member_kind

        public TCKind current_member_kind()
                           throws TypeMismatch,
                                  InvalidValue
        Returns the TCKind associated with the member at the current position.
        Specified by:
        current_member_kind in interface DynStructOperations
        Throws:
        TypeMismatch - if the DynStruct represents an empty exception.
        InvalidValue - if the current position does not indicate a member

      • get_members

        public NameValuePair[] get_members()
        Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object. The sequence contains members in the same order as the declaration order of members as indicated by the DynStruct's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynStruct's TypeCode does not contain member names.
        Specified by:
        get_members in interface DynStructOperations

      • set_members

        public void set_members(NameValuePair[] value)
                 throws TypeMismatch,
                        InvalidValue
        Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1.

        Members must appear in the NameValuePairs in the order in which they appear in the IDL specification of the struct as indicated by the DynStruct's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Specified by:
        set_members in interface DynStructOperations
        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynStruct's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynStruct's TypeCode

      • get_members_as_dyn_any

        public NameDynAnyPair[] get_members_as_dyn_any()
        Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object. The sequence contains members in the same order as the declaration order of members as indicated by the DynStruct's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynStruct's TypeCode does not contain member names.
        Specified by:
        get_members_as_dyn_any in interface DynStructOperations

      • set_members_as_dyn_any

        public void set_members_as_dyn_any(NameDynAnyPair[] value)
                            throws TypeMismatch,
                                   InvalidValue
        Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1.

        Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification of the struct as indicated by the DynStruct's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Specified by:
        set_members_as_dyn_any in interface DynStructOperations
        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynStruct's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynStruct's TypeCode

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynArrayStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynArrayStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynArrayStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynArray, DynArrayOperations

    public class _DynArrayStub
extends ObjectImpl
implements DynArray
    DynArray objects support the manipulation of IDL arrays. Note that the dimension of the array is contained in the TypeCode which is accessible through the type attribute. It can also be obtained by calling the component_count operation.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynArrayStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny[] get_elements_as_dyn_any()
      Returns the elements of the DynArray as DynAnys.
      Any[] get_elements()
      Returns the elements of the DynArray.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      void set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynArrayStub

        public _DynArrayStub()

    • Method Detail

      • get_elements

        public Any[] get_elements()
        Returns the elements of the DynArray.
        Specified by:
        get_elements in interface DynArrayOperations

      • set_elements

        public void set_elements(Any[] value)
                  throws TypeMismatch,
                         InvalidValue
        Sets the DynArray to contain the passed elements.
        Specified by:
        set_elements in interface DynArrayOperations
        Throws:
        TypeMismatch - if one or more elements have a type that is inconsistent with the DynArrays TypeCode
        InvalidValue - if the sequence does not contain the same number of elements as the array dimension

      • get_elements_as_dyn_any

        public DynAny[] get_elements_as_dyn_any()
        Returns the elements of the DynArray as DynAnys.
        Specified by:
        get_elements_as_dyn_any in interface DynArrayOperations

      • set_elements_as_dyn_any

        public void set_elements_as_dyn_any(DynAny[] value)
                             throws TypeMismatch,
                                    InvalidValue
        Sets the DynArray to contain the passed elements.
        Specified by:
        set_elements_as_dyn_any in interface DynArrayOperations
        Throws:
        TypeMismatch - if one or more elements have a type that is inconsistent with the DynArrays TypeCode
        InvalidValue - if the sequence does not contain the same number of elements as the array dimension

      • type

        public TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Specified by:
        type in interface DynAnyOperations
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        public void assign(DynAny dyn_any)
            throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        assign in interface DynAnyOperations
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        public void from_any(Any value)
              throws TypeMismatch,
                     InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Specified by:
        from_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        public Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Specified by:
        to_any in interface DynAnyOperations
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        public boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Specified by:
        equal in interface DynAnyOperations
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        public void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
        Specified by:
        destroy in interface DynAnyOperations

      • copy

        public DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Specified by:
        copy in interface DynAnyOperations
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        public void insert_boolean(boolean value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a boolean value into the DynAny.
        Specified by:
        insert_boolean in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        public void insert_octet(byte value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        insert_octet in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        public void insert_char(char value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts a char value into the DynAny.
        Specified by:
        insert_char in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        public void insert_short(short value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a short value into the DynAny.
        Specified by:
        insert_short in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        public void insert_ushort(short value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        insert_ushort in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        public void insert_long(int value)
                 throws TypeMismatch,
                        InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        insert_long in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        public void insert_ulong(int value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        insert_ulong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        public void insert_float(float value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a float value into the DynAny.
        Specified by:
        insert_float in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        public void insert_double(double value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a double value into the DynAny.
        Specified by:
        insert_double in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        public void insert_string(String value)
                   throws TypeMismatch,
                          InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_string in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        public void insert_reference(Object value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Specified by:
        insert_reference in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        public void insert_typecode(TypeCode value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a TypeCode object into the DynAny.
        Specified by:
        insert_typecode in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        public void insert_longlong(long value)
                     throws TypeMismatch,
                            InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        insert_longlong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        public void insert_ulonglong(long value)
                      throws TypeMismatch,
                             InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        insert_ulonglong in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        public void insert_wchar(char value)
                  throws TypeMismatch,
                         InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        insert_wchar in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        public void insert_wstring(String value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Specified by:
        insert_wstring in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        public void insert_any(Any value)
                throws TypeMismatch,
                       InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Specified by:
        insert_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        public void insert_dyn_any(DynAny value)
                    throws TypeMismatch,
                           InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Specified by:
        insert_dyn_any in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        public void insert_val(Serializable value)
                throws TypeMismatch,
                       InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        insert_val in interface DynAnyOperations
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        public boolean get_boolean()
                    throws TypeMismatch,
                           InvalidValue
        Extracts the boolean value from this DynAny.
        Specified by:
        get_boolean in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        public byte get_octet()
               throws TypeMismatch,
                      InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Specified by:
        get_octet in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        public char get_char()
              throws TypeMismatch,
                     InvalidValue
        Extracts the char value from this DynAny.
        Specified by:
        get_char in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        public short get_short()
                throws TypeMismatch,
                       InvalidValue
        Extracts the short value from this DynAny.
        Specified by:
        get_short in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        public short get_ushort()
                 throws TypeMismatch,
                        InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Specified by:
        get_ushort in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        public int get_long()
             throws TypeMismatch,
                    InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Specified by:
        get_long in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        public int get_ulong()
              throws TypeMismatch,
                     InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Specified by:
        get_ulong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        public float get_float()
                throws TypeMismatch,
                       InvalidValue
        Extracts the float value from this DynAny.
        Specified by:
        get_float in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        public double get_double()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the double value from this DynAny.
        Specified by:
        get_double in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        public String get_string()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_string in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        public Object get_reference()
                     throws TypeMismatch,
                            InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Specified by:
        get_reference in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        public TypeCode get_typecode()
                      throws TypeMismatch,
                             InvalidValue
        Extracts the TypeCode object from this DynAny.
        Specified by:
        get_typecode in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        public long get_longlong()
                  throws TypeMismatch,
                         InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Specified by:
        get_longlong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        public long get_ulonglong()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Specified by:
        get_ulonglong in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        public char get_wchar()
               throws TypeMismatch,
                      InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Specified by:
        get_wchar in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        public String get_wstring()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Specified by:
        get_wstring in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        public Any get_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Specified by:
        get_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        public DynAny get_dyn_any()
                   throws TypeMismatch,
                          InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Specified by:
        get_dyn_any in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        public Serializable get_val()
                     throws TypeMismatch,
                            InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Specified by:
        get_val in interface DynAnyOperations
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        public boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
        Specified by:
        seek in interface DynAnyOperations

      • rewind

        public void rewind()
        Is equivalent to seek(0).
        Specified by:
        rewind in interface DynAnyOperations

      • next

        public boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
        Specified by:
        next in interface DynAnyOperations

      • component_count

        public int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.
        Specified by:
        component_count in interface DynAnyOperations

      • current_component

        public DynAny current_component()
                         throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Specified by:
        current_component in interface DynAnyOperations
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_DynAnyFactoryStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class _DynAnyFactoryStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.DynamicAny._DynAnyFactoryStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, DynAnyFactory, DynAnyFactoryOperations

    public class _DynAnyFactoryStub
extends ObjectImpl
implements DynAnyFactory
    DynAny objects can be created by invoking operations on the DynAnyFactory object. Generally there are only two ways to create a DynAny object:
    • invoking an operation on an existing DynAny object
    • invoking an operation on a DynAnyFactory object
    A constructed DynAny object supports operations that enable the creation of new DynAny objects encapsulating access to the value of some constituent. DynAny objects also support the copy operation for creating new DynAny objects. A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references() with the identifier parameter set to the string constant "DynAnyFactory".

    Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any() as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.

    Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(), passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of invoking operations on the resulting object. Finally, the to_any operation can be invoked to create an any value from the constructed DynAny.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _DynAnyFactoryStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      DynAny create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny create_dyn_any(Any value)
      Creates a new DynAny object from an any value.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _DynAnyFactoryStub

        public _DynAnyFactoryStub()

    • Method Detail

      • create_dyn_any

        public DynAny create_dyn_any(Any value)
                      throws InconsistentTypeCode
        Creates a new DynAny object from an any value. A copy of the TypeCode associated with the any value is assigned to the resulting DynAny object. The value associated with the DynAny object is a copy of the value in the original any. The current position of the created DynAny is set to zero if the passed value has components, to -1 otherwise
        Specified by:
        create_dyn_any in interface DynAnyFactoryOperations
        Throws:
        InconsistentTypeCode - if value has a TypeCode with a TCKind of tk_Principal, tk_native, or tk_abstract_interface

      • create_dyn_any_from_type_code

        public DynAny create_dyn_any_from_type_code(TypeCode type)
                                     throws InconsistentTypeCode
        Creates a DynAny from a TypeCode. Depending on the TypeCode, the created object may be of type DynAny, or one of its derived types, such as DynStruct. The returned reference can be narrowed to the derived type. In all cases, a DynAny constructed from a TypeCode has an initial default value. The default values of basic types are:
        • false for boolean
        • zero for numeric types
        • zero for types octet, char, and wchar
        • the empty string for string and wstring
        • null for object references
        • a type code with a TCKind value of tk_null for type codes
        • for any values, an any containing a type code with a TCKind value of tk_null type and no value
        For complex types, creation of the corresponding DynAny assigns a default value as follows:
        • For DynSequence it sets the current position to -1 and creates an empty sequence.
        • For DynEnum it sets the current position to -1 and sets the value of the enumerator to the first enumerator value indicated by the TypeCode.
        • For DynFixed it sets the current position to -1 and sets the value zero.
        • For DynStruct it sets the current position to -1 for empty exceptions and to zero for all other TypeCodes. The members (if any) are (recursively) initialized to their default values.
        • For DynArray sets the current position to zero and (recursively) initializes elements to their default value.
        • For DynUnion sets the current position to zero. The discriminator value is set to a value consistent with the first named member of the union. That member is activated and (recursively) initialized to its default value.
        • For DynValue and DynValueBox it initializes to a null value.
        Specified by:
        create_dyn_any_from_type_code in interface DynAnyFactoryOperations
        Throws:
        InconsistentTypeCode

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynAny

  • All Superinterfaces:
    DynAnyOperations, IDLEntity, Object, Serializable
    All Known Subinterfaces:
    DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue, DynValueBox, DynValueCommon
    All Known Implementing Classes:
    _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub

    public interface DynAny
extends DynAnyOperations, Object, IDLEntity
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an any.

    A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty. Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

    The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

    A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type).

    A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

    If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

    The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

    Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

    DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynAnyFactory

  • All Superinterfaces:
    DynAnyFactoryOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynAnyFactoryStub

    public interface DynAnyFactory
extends DynAnyFactoryOperations, Object, IDLEntity
    DynAny objects can be created by invoking operations on the DynAnyFactory object. Generally there are only two ways to create a DynAny object:
    • invoking an operation on an existing DynAny object
    • invoking an operation on a DynAnyFactory object
    A constructed DynAny object supports operations that enable the creation of new DynAny objects encapsulating access to the value of some constituent. DynAny objects also support the copy operation for creating new DynAny objects. A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references() with the identifier parameter set to the string constant "DynAnyFactory".

    Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any() as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.

    Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(), passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of invoking operations on the resulting object. Finally, the to_any operation can be invoked to create an any value from the constructed DynAny.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynAnyFactoryOperations

        create_dyn_any_from_type_code, create_dyn_any

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynArray

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynArray

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynArrayOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynArrayStub

    public interface DynArray
extends DynArrayOperations, DynAny, IDLEntity
    DynArray objects support the manipulation of IDL arrays. Note that the dimension of the array is contained in the TypeCode which is accessible through the type attribute. It can also be obtained by calling the component_count operation.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynArrayOperations

        get_elements_as_dyn_any, get_elements, set_elements_as_dyn_any, set_elements

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynEnum

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynEnumOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynEnumStub

    public interface DynEnum
extends DynEnumOperations, DynAny, IDLEntity
    DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynEnumOperations

        get_as_string, get_as_ulong, set_as_string, set_as_ulong

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynFixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynFixed

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynFixedOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynFixedStub

    public interface DynFixed
extends DynFixedOperations, DynAny, IDLEntity
    DynFixed objects support the manipulation of IDL fixed values. Because IDL does not have a generic type that can represent fixed types with arbitrary number of digits and arbitrary scale, the operations use the IDL string type.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynFixedOperations

        get_value, set_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynSequence

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynSequence

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynSequenceOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynSequenceStub

    public interface DynSequence
extends DynSequenceOperations, DynAny, IDLEntity
    DynSequence objects support the manipulation of IDL sequences.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynSequenceOperations

        get_elements_as_dyn_any, get_elements, get_length, set_elements_as_dyn_any, set_elements, set_length

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynStruct

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynStruct

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynStructOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynStructStub

    public interface DynStruct
extends DynStructOperations, DynAny, IDLEntity
    DynStruct objects support the manipulation of IDL struct and exception values. Members of the exceptions are handled in the same way as members of a struct.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynStructOperations

        current_member_kind, current_member_name, get_members_as_dyn_any, get_members, set_members_as_dyn_any, set_members

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynUnion

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynUnion

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynUnionOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynUnionStub

    public interface DynUnion
extends DynUnionOperations, DynAny, IDLEntity
    DynUnion objects support the manipulation of IDL unions. A union can have only two valid current positions:
    • zero, which denotes the discriminator
    • one, which denotes the active member
    The component_count value for a union depends on the current discriminator: it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynUnionOperations

        discriminator_kind, get_discriminator, has_no_active_member, member_kind, member_name, member, set_discriminator, set_to_default_member, set_to_no_active_member

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValue

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynValueCommon, DynValueCommonOperations, DynValueOperations, IDLEntity, Object, Serializable
    All Known Implementing Classes:
    _DynValueStub

    public interface DynValue
extends DynValueOperations, DynValueCommon, IDLEntity
    DynValue objects support the manipulation of IDL non-boxed value types. The DynValue interface can represent both null and non-null value types. For a DynValue representing a non-null value type, the DynValue's components comprise the public and private members of the value type, including those inherited from concrete base value types, in the order of definition. A DynValue representing a null value type has no components and a current position of -1.

    Warning: Indiscriminantly changing the contents of private value type members can cause the value type implementation to break by violating internal constraints. Access to private members is provided to support such activities as ORB bridging and debugging and should not be used to arbitrarily violate the encapsulation of the value type.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynValueOperations

        current_member_kind, current_member_name, get_members_as_dyn_any, get_members, set_members_as_dyn_any, set_members

      • Methods inherited from interface org.omg.DynamicAny.DynValueCommonOperations

        is_null, set_to_null, set_to_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueBox

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValueBox

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynValueBoxOperations, DynValueCommon, DynValueCommonOperations, IDLEntity, Object, Serializable

    public interface DynValueBox
extends DynValueBoxOperations, DynValueCommon, IDLEntity
    DynValueBox objects support the manipulation of IDL boxed value types. The DynValueBox interface can represent both null and non-null value types. For a DynValueBox representing a non-null value type, the DynValueBox has a single component of the boxed type. A DynValueBox representing a null value type has no components and a current position of -1.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynValueBoxOperations

        get_boxed_value_as_dyn_any, get_boxed_value, set_boxed_value_as_dyn_any, set_boxed_value

      • Methods inherited from interface org.omg.DynamicAny.DynValueCommonOperations

        is_null, set_to_null, set_to_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueCommon

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValueCommon

  • All Superinterfaces:
    DynAny, DynAnyOperations, DynValueCommonOperations, IDLEntity, Object, Serializable
    All Known Subinterfaces:
    DynValue, DynValueBox
    All Known Implementing Classes:
    _DynValueStub

    public interface DynValueCommon
extends DynValueCommonOperations, DynAny, IDLEntity
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.

    • Method Summary

      • Methods inherited from interface org.omg.DynamicAny.DynValueCommonOperations

        is_null, set_to_null, set_to_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.DynamicAny Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.DynamicAny

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.DynamicAny.AnySeqHelper
    • org.omg.DynamicAny.DynAnyFactoryHelper
    • org.omg.DynamicAny.DynAnyHelper
    • org.omg.DynamicAny.DynAnySeqHelper
    • org.omg.DynamicAny.DynArrayHelper
    • org.omg.DynamicAny.DynEnumHelper
    • org.omg.DynamicAny.DynFixedHelper
    • org.omg.DynamicAny.DynSequenceHelper
    • org.omg.DynamicAny.DynStructHelper
    • org.omg.DynamicAny.DynUnionHelper
    • org.omg.DynamicAny.DynValueHelper
    • org.omg.DynamicAny.FieldNameHelper
    • org.omg.DynamicAny.NameDynAnyPair (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.NameDynAnyPairHelper
    • org.omg.DynamicAny.NameDynAnyPairSeqHelper
    • org.omg.DynamicAny.NameValuePair (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.NameValuePairHelper
    • org.omg.DynamicAny.NameValuePairSeqHelper
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.DynamicAny._DynAnyFactoryStub (implements org.omg.DynamicAny.DynAnyFactory)
      • org.omg.DynamicAny._DynAnyStub (implements org.omg.DynamicAny.DynAny)
      • org.omg.DynamicAny._DynArrayStub (implements org.omg.DynamicAny.DynArray)
      • org.omg.DynamicAny._DynEnumStub (implements org.omg.DynamicAny.DynEnum)
      • org.omg.DynamicAny._DynFixedStub (implements org.omg.DynamicAny.DynFixed)
      • org.omg.DynamicAny._DynSequenceStub (implements org.omg.DynamicAny.DynSequence)
      • org.omg.DynamicAny._DynStructStub (implements org.omg.DynamicAny.DynStruct)
      • org.omg.DynamicAny._DynUnionStub (implements org.omg.DynamicAny.DynUnion)
      • org.omg.DynamicAny._DynValueStub (implements org.omg.DynamicAny.DynValue)

Interface Hierarchy

  • org.omg.DynamicAny.DynAnyFactoryOperations
    • org.omg.DynamicAny.DynAnyFactory (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.DynamicAny.DynAnyOperations
    • org.omg.DynamicAny.DynAny (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.DynamicAny.DynArray (also extends org.omg.DynamicAny.DynArrayOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynEnum (also extends org.omg.DynamicAny.DynEnumOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynFixed (also extends org.omg.DynamicAny.DynFixedOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynSequence (also extends org.omg.DynamicAny.DynSequenceOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynStruct (also extends org.omg.DynamicAny.DynStructOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynUnion (also extends org.omg.DynamicAny.DynUnionOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynValueCommon (also extends org.omg.DynamicAny.DynValueCommonOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynArrayOperations
      • org.omg.DynamicAny.DynArray (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynEnumOperations
      • org.omg.DynamicAny.DynEnum (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynFixedOperations
      • org.omg.DynamicAny.DynFixed (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynSequenceOperations
      • org.omg.DynamicAny.DynSequence (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynStructOperations
      • org.omg.DynamicAny.DynStruct (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynUnionOperations
      • org.omg.DynamicAny.DynUnion (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynValueCommonOperations
      • org.omg.DynamicAny.DynValueBoxOperations
        • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueCommon, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynValueCommon (also extends org.omg.DynamicAny.DynAny, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynValueOperations
        • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueCommon, org.omg.CORBA.portable.IDLEntity)
  • org.omg.CORBA.Object
    • org.omg.DynamicAny.DynAny (also extends org.omg.DynamicAny.DynAnyOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynArray (also extends org.omg.DynamicAny.DynArrayOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynEnum (also extends org.omg.DynamicAny.DynEnumOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynFixed (also extends org.omg.DynamicAny.DynFixedOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynSequence (also extends org.omg.DynamicAny.DynSequenceOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynStruct (also extends org.omg.DynamicAny.DynStructOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynUnion (also extends org.omg.DynamicAny.DynUnionOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynValueCommon (also extends org.omg.DynamicAny.DynValueCommonOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.DynamicAny.DynAnyFactory (also extends org.omg.DynamicAny.DynAnyFactoryOperations, org.omg.CORBA.portable.IDLEntity)
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.DynamicAny.DynAny (also extends org.omg.DynamicAny.DynAnyOperations, org.omg.CORBA.Object)
        • org.omg.DynamicAny.DynArray (also extends org.omg.DynamicAny.DynArrayOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynEnum (also extends org.omg.DynamicAny.DynEnumOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynFixed (also extends org.omg.DynamicAny.DynFixedOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynSequence (also extends org.omg.DynamicAny.DynSequenceOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynStruct (also extends org.omg.DynamicAny.DynStructOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynUnion (also extends org.omg.DynamicAny.DynUnionOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValueCommon (also extends org.omg.DynamicAny.DynValueCommonOperations, org.omg.CORBA.portable.IDLEntity)
          • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueOperations, org.omg.CORBA.portable.IDLEntity)
          • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.DynamicAny.DynAnyFactory (also extends org.omg.DynamicAny.DynAnyFactoryOperations, org.omg.CORBA.Object)
      • org.omg.DynamicAny.DynArray (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynArrayOperations)
      • org.omg.DynamicAny.DynEnum (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynEnumOperations)
      • org.omg.DynamicAny.DynFixed (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynFixedOperations)
      • org.omg.DynamicAny.DynSequence (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynSequenceOperations)
      • org.omg.DynamicAny.DynStruct (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynStructOperations)
      • org.omg.DynamicAny.DynUnion (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynUnionOperations)
      • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueCommon, org.omg.DynamicAny.DynValueOperations)
      • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.DynamicAny.DynValueCommon)
      • org.omg.DynamicAny.DynValueCommon (also extends org.omg.DynamicAny.DynAny, org.omg.DynamicAny.DynValueCommonOperations)
        • org.omg.DynamicAny.DynValue (also extends org.omg.DynamicAny.DynValueOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.DynamicAny.DynValueBox (also extends org.omg.DynamicAny.DynValueBoxOperations, org.omg.CORBA.portable.IDLEntity)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.DynamicAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.DynamicAny

  • Packages that use org.omg.DynamicAny
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
  • Classes in org.omg.DynamicAny used by org.omg.DynamicAny
    Class and Description
    DynAny
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    DynAnyFactory
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    DynAnyFactoryOperations
    DynAny objects can be created by invoking operations on the DynAnyFactory object.
    DynAnyOperations
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
    DynArray
    DynArray objects support the manipulation of IDL arrays.
    DynArrayOperations
    DynArray objects support the manipulation of IDL arrays.
    DynEnum
    DynEnum objects support the manipulation of IDL enumerated values.
    DynEnumOperations
    DynEnum objects support the manipulation of IDL enumerated values.
    DynFixed
    DynFixed objects support the manipulation of IDL fixed values.
    DynFixedOperations
    DynFixed objects support the manipulation of IDL fixed values.
    DynSequence
    DynSequence objects support the manipulation of IDL sequences.
    DynSequenceOperations
    DynSequence objects support the manipulation of IDL sequences.
    DynStruct
    DynStruct objects support the manipulation of IDL struct and exception values.
    DynStructOperations
    DynStruct objects support the manipulation of IDL struct and exception values.
    DynUnion
    DynUnion objects support the manipulation of IDL unions.
    DynUnionOperations
    DynUnion objects support the manipulation of IDL unions.
    DynValue
    DynValue objects support the manipulation of IDL non-boxed value types.
    DynValueBoxOperations
    DynValueBox objects support the manipulation of IDL boxed value types.
    DynValueCommon
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
    DynValueCommonOperations
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
    DynValueOperations
    DynValue objects support the manipulation of IDL non-boxed value types.
    NameDynAnyPair
    org/omg/DynamicAny/NameDynAnyPair.java .
    NameValuePair
    org/omg/DynamicAny/NameValuePair.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class AnySeqHelper

  • java.lang.Object
    • org.omg.DynamicAny.AnySeqHelper

  • public abstract class AnySeqHelper
extends Object
    org/omg/DynamicAny/AnySeqHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AnySeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Any[] | extract(Any a)
      static String | id()
      static void | insert(Any a, Any[] that)
      static Any[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Any[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AnySeqHelper

        public AnySeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Any[] that)

      • extract

        public static Any[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Any[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Any[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.AnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.AnySeqHelper

No usage of org.omg.DynamicAny.AnySeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyFactoryHelper

No usage of org.omg.DynamicAny.DynAnyFactoryHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyHelper

No usage of org.omg.DynamicAny.DynAnyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnySeqHelper

No usage of org.omg.DynamicAny.DynAnySeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynArrayHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynArrayHelper

No usage of org.omg.DynamicAny.DynArrayHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynEnumHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynEnumHelper

No usage of org.omg.DynamicAny.DynEnumHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynFixedHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynFixedHelper

No usage of org.omg.DynamicAny.DynFixedHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynSequenceHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynSequenceHelper

No usage of org.omg.DynamicAny.DynSequenceHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynStructHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynStructHelper

No usage of org.omg.DynamicAny.DynStructHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynUnionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynUnionHelper

No usage of org.omg.DynamicAny.DynUnionHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynValueHelper

No usage of org.omg.DynamicAny.DynValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.FieldNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.FieldNameHelper

No usage of org.omg.DynamicAny.FieldNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameDynAnyPair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameDynAnyPair

  • Packages that use NameDynAnyPair
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of NameDynAnyPair in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that return NameDynAnyPair
      Modifier and Type | Method and Description
      static NameDynAnyPair[] | NameDynAnyPairSeqHelper.extract(Any a)
      static NameDynAnyPair | NameDynAnyPairHelper.extract(Any a)
      NameDynAnyPair[] _DynValueStub.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      NameDynAnyPair[] _DynStructStub.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameDynAnyPair[] DynStructOperations.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameDynAnyPair[] DynValueOperations.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      static NameDynAnyPair[] | NameDynAnyPairSeqHelper.read(InputStream istream)
      static NameDynAnyPair | NameDynAnyPairHelper.read(InputStream istream)
      Methods in org.omg.DynamicAny with parameters of type NameDynAnyPair
      Modifier and Type | Method and Description
      static void | NameDynAnyPairHelper.insert(Any a, NameDynAnyPair that)
      static void | NameDynAnyPairSeqHelper.insert(Any a, NameDynAnyPair[] that)
      void _DynValueStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void _DynStructStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynStructOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynValueOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      static void | NameDynAnyPairHelper.write(OutputStream ostream, NameDynAnyPair value)
      static void | NameDynAnyPairSeqHelper.write(OutputStream ostream, NameDynAnyPair[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameDynAnyPairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameDynAnyPairHelper

No usage of org.omg.DynamicAny.NameDynAnyPairHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameDynAnyPairSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameDynAnyPairSeqHelper

No usage of org.omg.DynamicAny.NameDynAnyPairSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameValuePair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameValuePair

  • Packages that use NameValuePair
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of NameValuePair in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that return NameValuePair
      Modifier and Type | Method and Description
      static NameValuePair | NameValuePairHelper.extract(Any a)
      static NameValuePair[] | NameValuePairSeqHelper.extract(Any a)
      NameValuePair[] _DynValueStub.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      NameValuePair[] _DynStructStub.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameValuePair[] DynStructOperations.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameValuePair[] DynValueOperations.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      static NameValuePair | NameValuePairHelper.read(InputStream istream)
      static NameValuePair[] | NameValuePairSeqHelper.read(InputStream istream)
      Methods in org.omg.DynamicAny with parameters of type NameValuePair
      Modifier and Type | Method and Description
      static void | NameValuePairHelper.insert(Any a, NameValuePair that)
      static void | NameValuePairSeqHelper.insert(Any a, NameValuePair[] that)
      void _DynValueStub.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      void _DynStructStub.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynStructOperations.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynValueOperations.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
      static void | NameValuePairSeqHelper.write(OutputStream ostream, NameValuePair[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameValuePairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameValuePairHelper

No usage of org.omg.DynamicAny.NameValuePairHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.NameValuePairSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.NameValuePairSeqHelper

No usage of org.omg.DynamicAny.NameValuePairSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynAnyFactoryStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynAnyFactoryStub

No usage of org.omg.DynamicAny._DynAnyFactoryStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynAnyStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynAnyStub

No usage of org.omg.DynamicAny._DynAnyStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynArrayStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynArrayStub

No usage of org.omg.DynamicAny._DynArrayStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynEnumStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynEnumStub

No usage of org.omg.DynamicAny._DynEnumStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynFixedStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynFixedStub

No usage of org.omg.DynamicAny._DynFixedStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynSequenceStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynSequenceStub

No usage of org.omg.DynamicAny._DynSequenceStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynStructStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynStructStub

No usage of org.omg.DynamicAny._DynStructStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynUnionStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynUnionStub

No usage of org.omg.DynamicAny._DynUnionStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny._DynValueStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny._DynValueStub

No usage of org.omg.DynamicAny._DynValueStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynAny

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynAny

  • Packages that use DynAny
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynAny in org.omg.DynamicAny

      Subinterfaces of DynAny in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynArray
      DynArray objects support the manipulation of IDL arrays.
      interface  DynEnum
      DynEnum objects support the manipulation of IDL enumerated values.
      interface  DynFixed
      DynFixed objects support the manipulation of IDL fixed values.
      interface  DynSequence
      DynSequence objects support the manipulation of IDL sequences.
      interface  DynStruct
      DynStruct objects support the manipulation of IDL struct and exception values.
      interface  DynUnion
      DynUnion objects support the manipulation of IDL unions.
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueCommon
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      Classes in org.omg.DynamicAny that implement DynAny
      Modifier and Type Class and Description
      class  _DynAnyStub
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
      Fields in org.omg.DynamicAny declared as DynAny
      Modifier and Type Field and Description
      DynAny NameDynAnyPair.value
      The DynAny value associated with the name.
      Methods in org.omg.DynamicAny that return DynAny
      Modifier and Type | Method and Description
      DynAny _DynSequenceStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny DynAnyOperations.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynEnumStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynValueStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynArrayStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynStructStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynAnyStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynFixedStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny _DynUnionStub.copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny DynAnyFactoryOperations.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny _DynAnyFactoryStub.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny DynAnyFactoryOperations.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.
      DynAny _DynAnyFactoryStub.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.
      DynAny _DynSequenceStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny DynAnyOperations.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynEnumStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynValueStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynArrayStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynStructStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynAnyStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynFixedStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynUnionStub.current_component()
      Returns the DynAny for the component at the current position.
      static DynAny[] | DynAnySeqHelper.extract(Any a)
      static DynAny | DynAnyHelper.extract(Any a)
      DynAny DynValueBoxOperations.get_boxed_value_as_dyn_any()
      Returns the boxed value as a DynAny.
      DynAny DynUnionOperations.get_discriminator()
      Returns the current discriminator value.
      DynAny _DynUnionStub.get_discriminator()
      Returns the current discriminator value.
      DynAny _DynSequenceStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny DynAnyOperations.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynEnumStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynValueStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynArrayStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynStructStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynAnyStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynFixedStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynUnionStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny[] _DynSequenceStub.get_elements_as_dyn_any()
      Returns the DynAnys representing the elements of the sequence.
      DynAny[] DynArrayOperations.get_elements_as_dyn_any()
      Returns the elements of the DynArray as DynAnys.
      DynAny[] _DynArrayStub.get_elements_as_dyn_any()
      Returns the elements of the DynArray as DynAnys.
      DynAny[] DynSequenceOperations.get_elements_as_dyn_any()
      Returns the DynAnys representing the elements of the sequence.
      DynAny DynUnionOperations.member()
      Returns the currently active member.
      DynAny _DynUnionStub.member()
      Returns the currently active member.
      static DynAny | DynAnyHelper.narrow(Object obj)
      static DynAny[] | DynAnySeqHelper.read(InputStream istream)
      static DynAny | DynAnyHelper.read(InputStream istream)
      static DynAny | DynAnyHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynAny
      Modifier and Type | Method and Description
      void _DynSequenceStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void DynAnyOperations.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynEnumStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynValueStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynArrayStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynStructStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynAnyStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynFixedStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynUnionStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      boolean _DynSequenceStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean DynAnyOperations.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynEnumStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynValueStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynArrayStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynStructStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynAnyStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynFixedStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      boolean _DynUnionStub.equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void _DynSequenceStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void DynAnyOperations.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynEnumStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynValueStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynArrayStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynStructStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynAnyStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynFixedStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynUnionStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      static void | DynAnyHelper.insert(Any a, DynAny that)
      static void | DynAnySeqHelper.insert(Any a, DynAny[] that)
      void DynValueBoxOperations.set_boxed_value_as_dyn_any(DynAny boxed)
      Replaces the boxed value with the value contained in the parameter.
      void DynUnionOperations.set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void _DynUnionStub.set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void _DynSequenceStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void DynArrayOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      static void | DynAnyHelper.write(OutputStream ostream, DynAny value)
      static void | DynAnySeqHelper.write(OutputStream ostream, DynAny[] value)
      Constructors in org.omg.DynamicAny with parameters of type DynAny
      Constructor and Description
      NameDynAnyPair(String _id, DynAny _value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynAnyFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynAnyFactory

  • Packages that use DynAnyFactory
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynAnyFactory in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynAnyFactory
      Modifier and Type Class and Description
      class  _DynAnyFactoryStub
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      Methods in org.omg.DynamicAny that return DynAnyFactory
      Modifier and Type | Method and Description
      static DynAnyFactory | DynAnyFactoryHelper.extract(Any a)
      static DynAnyFactory | DynAnyFactoryHelper.narrow(Object obj)
      static DynAnyFactory | DynAnyFactoryHelper.read(InputStream istream)
      static DynAnyFactory | DynAnyFactoryHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynAnyFactory
      Modifier and Type | Method and Description
      static void | DynAnyFactoryHelper.insert(Any a, DynAnyFactory that)
      static void | DynAnyFactoryHelper.write(OutputStream ostream, DynAnyFactory value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynAnyFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynAnyFactoryOperations

  • Packages that use DynAnyFactoryOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynAnyFactoryOperations in org.omg.DynamicAny

      Subinterfaces of DynAnyFactoryOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynAnyFactory
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
      Classes in org.omg.DynamicAny that implement DynAnyFactoryOperations
      Modifier and Type Class and Description
      class  _DynAnyFactoryStub
      DynAny objects can be created by invoking operations on the DynAnyFactory object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynAnyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynAnyOperations

  • Packages that use DynAnyOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynAnyOperations in org.omg.DynamicAny

      Subinterfaces of DynAnyOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynAny
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      interface  DynArray
      DynArray objects support the manipulation of IDL arrays.
      interface  DynArrayOperations
      DynArray objects support the manipulation of IDL arrays.
      interface  DynEnum
      DynEnum objects support the manipulation of IDL enumerated values.
      interface  DynEnumOperations
      DynEnum objects support the manipulation of IDL enumerated values.
      interface  DynFixed
      DynFixed objects support the manipulation of IDL fixed values.
      interface  DynFixedOperations
      DynFixed objects support the manipulation of IDL fixed values.
      interface  DynSequence
      DynSequence objects support the manipulation of IDL sequences.
      interface  DynSequenceOperations
      DynSequence objects support the manipulation of IDL sequences.
      interface  DynStruct
      DynStruct objects support the manipulation of IDL struct and exception values.
      interface  DynStructOperations
      DynStruct objects support the manipulation of IDL struct and exception values.
      interface  DynUnion
      DynUnion objects support the manipulation of IDL unions.
      interface  DynUnionOperations
      DynUnion objects support the manipulation of IDL unions.
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueBoxOperations
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueCommon
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      interface  DynValueCommonOperations
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      interface  DynValueOperations
      DynValue objects support the manipulation of IDL non-boxed value types.
      Classes in org.omg.DynamicAny that implement DynAnyOperations
      Modifier and Type Class and Description
      class  _DynAnyStub
      Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynArray

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynArray

  • Packages that use DynArray
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynArray in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynArray
      Modifier and Type Class and Description
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
      Methods in org.omg.DynamicAny that return DynArray
      Modifier and Type | Method and Description
      static DynArray | DynArrayHelper.extract(Any a)
      static DynArray | DynArrayHelper.narrow(Object obj)
      static DynArray | DynArrayHelper.read(InputStream istream)
      static DynArray | DynArrayHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynArray
      Modifier and Type | Method and Description
      static void | DynArrayHelper.insert(Any a, DynArray that)
      static void | DynArrayHelper.write(OutputStream ostream, DynArray value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynArrayOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynArrayOperations

  • Packages that use DynArrayOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynArrayOperations in org.omg.DynamicAny

      Subinterfaces of DynArrayOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynArray
      DynArray objects support the manipulation of IDL arrays.
      Classes in org.omg.DynamicAny that implement DynArrayOperations
      Modifier and Type Class and Description
      class  _DynArrayStub
      DynArray objects support the manipulation of IDL arrays.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynEnum

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynEnum

  • Packages that use DynEnum
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynEnum in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynEnum
      Modifier and Type Class and Description
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
      Methods in org.omg.DynamicAny that return DynEnum
      Modifier and Type | Method and Description
      static DynEnum | DynEnumHelper.extract(Any a)
      static DynEnum | DynEnumHelper.narrow(Object obj)
      static DynEnum | DynEnumHelper.read(InputStream istream)
      static DynEnum | DynEnumHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynEnum
      Modifier and Type | Method and Description
      static void | DynEnumHelper.insert(Any a, DynEnum that)
      static void | DynEnumHelper.write(OutputStream ostream, DynEnum value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynEnumOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynEnumOperations

  • Packages that use DynEnumOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynEnumOperations in org.omg.DynamicAny

      Subinterfaces of DynEnumOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynEnum
      DynEnum objects support the manipulation of IDL enumerated values.
      Classes in org.omg.DynamicAny that implement DynEnumOperations
      Modifier and Type Class and Description
      class  _DynEnumStub
      DynEnum objects support the manipulation of IDL enumerated values.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynFixed

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynFixed

  • Packages that use DynFixed
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynFixed in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynFixed
      Modifier and Type Class and Description
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
      Methods in org.omg.DynamicAny that return DynFixed
      Modifier and Type | Method and Description
      static DynFixed | DynFixedHelper.extract(Any a)
      static DynFixed | DynFixedHelper.narrow(Object obj)
      static DynFixed | DynFixedHelper.read(InputStream istream)
      static DynFixed | DynFixedHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynFixed
      Modifier and Type | Method and Description
      static void | DynFixedHelper.insert(Any a, DynFixed that)
      static void | DynFixedHelper.write(OutputStream ostream, DynFixed value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynFixedOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynFixedOperations

  • Packages that use DynFixedOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynFixedOperations in org.omg.DynamicAny

      Subinterfaces of DynFixedOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynFixed
      DynFixed objects support the manipulation of IDL fixed values.
      Classes in org.omg.DynamicAny that implement DynFixedOperations
      Modifier and Type Class and Description
      class  _DynFixedStub
      DynFixed objects support the manipulation of IDL fixed values.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynSequence

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynSequence

  • Packages that use DynSequence
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynSequence in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynSequence
      Modifier and Type Class and Description
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
      Methods in org.omg.DynamicAny that return DynSequence
      Modifier and Type | Method and Description
      static DynSequence | DynSequenceHelper.extract(Any a)
      static DynSequence | DynSequenceHelper.narrow(Object obj)
      static DynSequence | DynSequenceHelper.read(InputStream istream)
      static DynSequence | DynSequenceHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynSequence
      Modifier and Type | Method and Description
      static void | DynSequenceHelper.insert(Any a, DynSequence that)
      static void | DynSequenceHelper.write(OutputStream ostream, DynSequence value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynSequenceOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynSequenceOperations

  • Packages that use DynSequenceOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynSequenceOperations in org.omg.DynamicAny

      Subinterfaces of DynSequenceOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynSequence
      DynSequence objects support the manipulation of IDL sequences.
      Classes in org.omg.DynamicAny that implement DynSequenceOperations
      Modifier and Type Class and Description
      class  _DynSequenceStub
      DynSequence objects support the manipulation of IDL sequences.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynStruct

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynStruct

  • Packages that use DynStruct
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynStruct in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynStruct
      Modifier and Type Class and Description
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
      Methods in org.omg.DynamicAny that return DynStruct
      Modifier and Type | Method and Description
      static DynStruct | DynStructHelper.extract(Any a)
      static DynStruct | DynStructHelper.narrow(Object obj)
      static DynStruct | DynStructHelper.read(InputStream istream)
      static DynStruct | DynStructHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynStruct
      Modifier and Type | Method and Description
      static void | DynStructHelper.insert(Any a, DynStruct that)
      static void | DynStructHelper.write(OutputStream ostream, DynStruct value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynStructOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynStructOperations

  • Packages that use DynStructOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynStructOperations in org.omg.DynamicAny

      Subinterfaces of DynStructOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynStruct
      DynStruct objects support the manipulation of IDL struct and exception values.
      Classes in org.omg.DynamicAny that implement DynStructOperations
      Modifier and Type Class and Description
      class  _DynStructStub
      DynStruct objects support the manipulation of IDL struct and exception values.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynUnion

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynUnion

  • Packages that use DynUnion
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynUnion in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynUnion
      Modifier and Type Class and Description
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
      Methods in org.omg.DynamicAny that return DynUnion
      Modifier and Type | Method and Description
      static DynUnion | DynUnionHelper.extract(Any a)
      static DynUnion | DynUnionHelper.narrow(Object obj)
      static DynUnion | DynUnionHelper.read(InputStream istream)
      static DynUnion | DynUnionHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynUnion
      Modifier and Type | Method and Description
      static void | DynUnionHelper.insert(Any a, DynUnion that)
      static void | DynUnionHelper.write(OutputStream ostream, DynUnion value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynUnionOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynUnionOperations

  • Packages that use DynUnionOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynUnionOperations in org.omg.DynamicAny

      Subinterfaces of DynUnionOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynUnion
      DynUnion objects support the manipulation of IDL unions.
      Classes in org.omg.DynamicAny that implement DynUnionOperations
      Modifier and Type Class and Description
      class  _DynUnionStub
      DynUnion objects support the manipulation of IDL unions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValue

  • Packages that use DynValue
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynValue in org.omg.DynamicAny

      Classes in org.omg.DynamicAny that implement DynValue
      Modifier and Type Class and Description
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
      Methods in org.omg.DynamicAny that return DynValue
      Modifier and Type | Method and Description
      static DynValue | DynValueHelper.extract(Any a)
      static DynValue | DynValueHelper.narrow(Object obj)
      static DynValue | DynValueHelper.read(InputStream istream)
      static DynValue | DynValueHelper.unchecked_narrow(Object obj)
      Methods in org.omg.DynamicAny with parameters of type DynValue
      Modifier and Type | Method and Description
      static void | DynValueHelper.insert(Any a, DynValue that)
      static void | DynValueHelper.write(OutputStream ostream, DynValue value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValueBox

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValueBox

No usage of org.omg.DynamicAny.DynValueBox
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValueBoxOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValueBoxOperations

  • Packages that use DynValueBoxOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynValueBoxOperations in org.omg.DynamicAny

      Subinterfaces of DynValueBoxOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValueCommon

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValueCommon

  • Packages that use DynValueCommon
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynValueCommon in org.omg.DynamicAny

      Subinterfaces of DynValueCommon in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      Classes in org.omg.DynamicAny that implement DynValueCommon
      Modifier and Type Class and Description
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValueCommonOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValueCommonOperations

  • Packages that use DynValueCommonOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynValueCommonOperations in org.omg.DynamicAny

      Subinterfaces of DynValueCommonOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      interface  DynValueBox
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueBoxOperations
      DynValueBox objects support the manipulation of IDL boxed value types.
      interface  DynValueCommon
      DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
      interface  DynValueOperations
      DynValue objects support the manipulation of IDL non-boxed value types.
      Classes in org.omg.DynamicAny that implement DynValueCommonOperations
      Modifier and Type Class and Description
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.DynamicAny.DynValueOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.DynamicAny.DynValueOperations

  • Packages that use DynValueOperations
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

    • Uses of DynValueOperations in org.omg.DynamicAny

      Subinterfaces of DynValueOperations in org.omg.DynamicAny
      Modifier and Type Interface and Description
      interface  DynValue
      DynValue objects support the manipulation of IDL non-boxed value types.
      Classes in org.omg.DynamicAny that implement DynValueOperations
      Modifier and Type Class and Description
      class  _DynValueStub
      DynValue objects support the manipulation of IDL non-boxed value types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynAnyFactoryHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyFactoryHelper

  • public abstract class DynAnyFactoryHelper
extends Object
    DynAny objects can be created by invoking operations on the DynAnyFactory object. Generally there are only two ways to create a DynAny object:
    • invoking an operation on an existing DynAny object
    • invoking an operation on a DynAnyFactory object
    A constructed DynAny object supports operations that enable the creation of new DynAny objects encapsulating access to the value of some constituent. DynAny objects also support the copy operation for creating new DynAny objects. A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references() with the identifier parameter set to the string constant "DynAnyFactory".

    Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any() as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.

    Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(), passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of invoking operations on the resulting object. Finally, the to_any operation can be invoked to create an any value from the constructed DynAny.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynAnyFactoryHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynAnyFactory | extract(Any a)
      static String | id()
      static void | insert(Any a, DynAnyFactory that)
      static DynAnyFactory | narrow(Object obj)
      static DynAnyFactory | read(InputStream istream)
      static TypeCode | type()
      static DynAnyFactory | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynAnyFactory value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynAnyFactoryHelper

        public DynAnyFactoryHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynAnyFactory that)

      • extract

        public static DynAnyFactory extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynAnyFactory read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynAnyFactory value)

      • narrow

        public static DynAnyFactory narrow(Object obj)

      • unchecked_narrow

        public static DynAnyFactory unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynAnyFactoryOperations

  • All Known Subinterfaces:
    DynAnyFactory
    All Known Implementing Classes:
    _DynAnyFactoryStub

    public interface DynAnyFactoryOperations
    DynAny objects can be created by invoking operations on the DynAnyFactory object. Generally there are only two ways to create a DynAny object:
    • invoking an operation on an existing DynAny object
    • invoking an operation on a DynAnyFactory object
    A constructed DynAny object supports operations that enable the creation of new DynAny objects encapsulating access to the value of some constituent. DynAny objects also support the copy operation for creating new DynAny objects. A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references() with the identifier parameter set to the string constant "DynAnyFactory".

    Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any() as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.

    Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(), passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of invoking operations on the resulting object. Finally, the to_any operation can be invoked to create an any value from the constructed DynAny.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DynAny create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny create_dyn_any(Any value)
      Creates a new DynAny object from an any value.

    • Method Detail

      • create_dyn_any

        DynAny create_dyn_any(Any value)
               throws InconsistentTypeCode
        Creates a new DynAny object from an any value. A copy of the TypeCode associated with the any value is assigned to the resulting DynAny object. The value associated with the DynAny object is a copy of the value in the original any. The current position of the created DynAny is set to zero if the passed value has components, to -1 otherwise
        Throws:
        InconsistentTypeCode - if value has a TypeCode with a TCKind of tk_Principal, tk_native, or tk_abstract_interface

      • create_dyn_any_from_type_code

        DynAny create_dyn_any_from_type_code(TypeCode type)
                              throws InconsistentTypeCode
        Creates a DynAny from a TypeCode. Depending on the TypeCode, the created object may be of type DynAny, or one of its derived types, such as DynStruct. The returned reference can be narrowed to the derived type. In all cases, a DynAny constructed from a TypeCode has an initial default value. The default values of basic types are:
        • false for boolean
        • zero for numeric types
        • zero for types octet, char, and wchar
        • the empty string for string and wstring
        • null for object references
        • a type code with a TCKind value of tk_null for type codes
        • for any values, an any containing a type code with a TCKind value of tk_null type and no value
        For complex types, creation of the corresponding DynAny assigns a default value as follows:
        • For DynSequence it sets the current position to -1 and creates an empty sequence.
        • For DynEnum it sets the current position to -1 and sets the value of the enumerator to the first enumerator value indicated by the TypeCode.
        • For DynFixed it sets the current position to -1 and sets the value zero.
        • For DynStruct it sets the current position to -1 for empty exceptions and to zero for all other TypeCodes. The members (if any) are (recursively) initialized to their default values.
        • For DynArray sets the current position to zero and (recursively) initializes elements to their default value.
        • For DynUnion sets the current position to zero. The discriminator value is set to a value consistent with the first named member of the union. That member is activated and (recursively) initialized to its default value.
        • For DynValue and DynValueBox it initializes to a null value.
        Throws:
        InconsistentTypeCode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyFactoryPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.DynamicAny.DynAnyFactoryPackage

This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.

See: Description

  • Class Summary
    Class Description
    InconsistentTypeCodeHelper
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java .
  • Exception Summary
    Exception Description
    InconsistentTypeCode
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java .

Package org.omg.DynamicAny.DynAnyFactoryPackage Description

This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2. Please refer to that OMG specification for further details.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.DynamicAny.DynAnyFactoryPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.DynamicAny.DynAnyFactoryPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.DynamicAny.DynAnyFactoryPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.DynamicAny.DynAnyFactoryPackage

  • Packages that use org.omg.DynamicAny.DynAnyFactoryPackage
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.
  • Classes in org.omg.DynamicAny.DynAnyFactoryPackage used by org.omg.DynamicAny
    Class and Description
    InconsistentTypeCode
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java .
  • Classes in org.omg.DynamicAny.DynAnyFactoryPackage used by org.omg.DynamicAny.DynAnyFactoryPackage
    Class and Description
    InconsistentTypeCode
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode

  • Packages that use InconsistentTypeCode
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyFactoryPackage
    This package contains classes and exceptions from the DynAnyFactory interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.2.

    • Uses of InconsistentTypeCode in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that throw InconsistentTypeCode
      Modifier and Type Method and Description
      DynAny DynAnyFactoryOperations.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny _DynAnyFactoryStub.create_dyn_any_from_type_code(TypeCode type)
      Creates a DynAny from a TypeCode.
      DynAny DynAnyFactoryOperations.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.
      DynAny _DynAnyFactoryStub.create_dyn_any(Any value)
      Creates a new DynAny object from an any value.

    • Uses of InconsistentTypeCode in org.omg.DynamicAny.DynAnyFactoryPackage

      Methods in org.omg.DynamicAny.DynAnyFactoryPackage that return InconsistentTypeCode
      Modifier and Type | Method and Description
      static InconsistentTypeCode | InconsistentTypeCodeHelper.extract(Any a)
      static InconsistentTypeCode | InconsistentTypeCodeHelper.read(InputStream istream)
      Methods in org.omg.DynamicAny.DynAnyFactoryPackage with parameters of type InconsistentTypeCode
      Modifier and Type | Method and Description
      static void | InconsistentTypeCodeHelper.insert(Any a, InconsistentTypeCode that)
      static void | InconsistentTypeCodeHelper.write(OutputStream ostream, InconsistentTypeCode value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper

No usage of org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InconsistentTypeCode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyFactoryPackage

Class InconsistentTypeCode

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InconsistentTypeCode
extends UserException
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InconsistentTypeCode()
      InconsistentTypeCode(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InconsistentTypeCode

        public InconsistentTypeCode()

      • InconsistentTypeCode

        public InconsistentTypeCode(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InconsistentTypeCodeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyFactoryPackage

Class InconsistentTypeCodeHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper

  • public abstract class InconsistentTypeCodeHelper
extends Object
    org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InconsistentTypeCodeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InconsistentTypeCode | extract(Any a)
      static String | id()
      static void | insert(Any a, InconsistentTypeCode that)
      static InconsistentTypeCode | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InconsistentTypeCode value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InconsistentTypeCodeHelper

        public InconsistentTypeCodeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InconsistentTypeCode that)

      • extract

        public static InconsistentTypeCode extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InconsistentTypeCode read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InconsistentTypeCode value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynAnyHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyHelper

  • public abstract class DynAnyHelper
extends Object
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an any.

    A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty. Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

    The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

    A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type).

    A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

    If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

    The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

    Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

    DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynAnyHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynAny | extract(Any a)
      static String | id()
      static void | insert(Any a, DynAny that)
      static DynAny | narrow(Object obj)
      static DynAny | read(InputStream istream)
      static TypeCode | type()
      static DynAny | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynAny value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynAnyHelper

        public DynAnyHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynAny that)

      • extract

        public static DynAny extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynAny read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynAny value)

      • narrow

        public static DynAny narrow(Object obj)

      • unchecked_narrow

        public static DynAny unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynAnyOperations

  • All Known Subinterfaces:
    DynAny, DynArray, DynArrayOperations, DynEnum, DynEnumOperations, DynFixed, DynFixedOperations, DynSequence, DynSequenceOperations, DynStruct, DynStructOperations, DynUnion, DynUnionOperations, DynValue, DynValueBox, DynValueBoxOperations, DynValueCommon, DynValueCommonOperations, DynValueOperations
    All Known Implementing Classes:
    _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub

    public interface DynAnyOperations
    Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an any.

    A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty. Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

    The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

    A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type).

    A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

    If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

    The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

    Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

    DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      int component_count()
      Returns the number of components of a DynAny.
      DynAny copy()
      Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
      DynAny current_component()
      Returns the DynAny for the component at the current position.
      void destroy()
      Destroys a DynAny object.
      boolean equal(DynAny dyn_any)
      Compares two DynAny values for equality.
      void from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean get_boolean()
      Extracts the boolean value from this DynAny.
      char get_char()
      Extracts the char value from this DynAny.
      double get_double()
      Extracts the double value from this DynAny.
      DynAny get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float get_float()
      Extracts the float value from this DynAny.
      int get_long()
      Extracts the integer value from this DynAny.
      long get_longlong()
      Extracts the long value from this DynAny.
      byte get_octet()
      Extracts the byte value from this DynAny.
      Object get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short get_short()
      Extracts the short value from this DynAny.
      String get_string()
      Extracts the string value from this DynAny.
      TypeCode get_typecode()
      Extracts the TypeCode object from this DynAny.
      int get_ulong()
      Extracts the integer value from this DynAny.
      long get_ulonglong()
      Extracts the long value from this DynAny.
      short get_ushort()
      Extracts the short value from this DynAny.
      Serializable get_val()
      Extracts a Serializable object from this DynAny.
      char get_wchar()
      Extracts the long value from this DynAny.
      String get_wstring()
      Extracts the string value from this DynAny.
      void insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void insert_char(char value)
      Inserts a char value into the DynAny.
      void insert_double(double value)
      Inserts a double value into the DynAny.
      void insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void insert_float(float value)
      Inserts a float value into the DynAny.
      void insert_long(int value)
      Inserts an integer value into the DynAny.
      void insert_longlong(long value)
      Inserts a long value into the DynAny.
      void insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void insert_short(short value)
      Inserts a short value into the DynAny.
      void insert_string(String value)
      Inserts a string value into the DynAny.
      void insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void insert_ushort(short value)
      Inserts a short value into the DynAny.
      void insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void insert_wchar(char value)
      Inserts a char value into the DynAny.
      void insert_wstring(String value)
      Inserts a string value into the DynAny.
      boolean next()
      Advances the current position to the next component.
      void rewind()
      Is equivalent to seek(0).
      boolean seek(int index)
      Sets the current position to index.
      Any to_any()
      Creates an any value from a DynAny object.
      TypeCode type()
      Returns the TypeCode associated with this DynAny object.

    • Method Detail

      • type

        TypeCode type()
        Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
        Returns:
        The TypeCode associated with this DynAny object

      • assign

        void assign(DynAny dyn_any)
     throws TypeMismatch
        Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Parameters:
        dyn_any -
        Throws:
        TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny

      • from_any

        void from_any(Any value)
       throws TypeMismatch,
              InvalidValue
        Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
        Throws:
        TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny
        InvalidValue - if the passed Any does not contain a legal value (such as a null string)

      • to_any

        Any to_any()
        Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
        Returns:
        a new Any object with the same value and TypeCode

      • equal

        boolean equal(DynAny dyn_any)
        Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
        Returns:
        true of the DynAnys are equal, false otherwise

      • destroy

        void destroy()
        Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.

      • copy

        DynAny copy()
        Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
        Returns:
        a deep copy of the DynAny object

      • insert_boolean

        void insert_boolean(boolean value)
             throws TypeMismatch,
                    InvalidValue
        Inserts a boolean value into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_octet

        void insert_octet(byte value)
           throws TypeMismatch,
                  InvalidValue
        Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_char

        void insert_char(char value)
          throws TypeMismatch,
                 InvalidValue
        Inserts a char value into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_short

        void insert_short(short value)
           throws TypeMismatch,
                  InvalidValue
        Inserts a short value into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ushort

        void insert_ushort(short value)
            throws TypeMismatch,
                   InvalidValue
        Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_long

        void insert_long(int value)
          throws TypeMismatch,
                 InvalidValue
        Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulong

        void insert_ulong(int value)
           throws TypeMismatch,
                  InvalidValue
        Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_float

        void insert_float(float value)
           throws TypeMismatch,
                  InvalidValue
        Inserts a float value into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_double

        void insert_double(double value)
            throws TypeMismatch,
                   InvalidValue
        Inserts a double value into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_string

        void insert_string(String value)
            throws TypeMismatch,
                   InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_reference

        void insert_reference(Object value)
               throws TypeMismatch,
                      InvalidValue
        Inserts a reference to a CORBA object into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_typecode

        void insert_typecode(TypeCode value)
              throws TypeMismatch,
                     InvalidValue
        Inserts a TypeCode object into the DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_longlong

        void insert_longlong(long value)
              throws TypeMismatch,
                     InvalidValue
        Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_ulonglong

        void insert_ulonglong(long value)
               throws TypeMismatch,
                      InvalidValue
        Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wchar

        void insert_wchar(char value)
           throws TypeMismatch,
                  InvalidValue
        Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_wstring

        void insert_wstring(String value)
             throws TypeMismatch,
                    InvalidValue
        Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        InvalidValue - if the string inserted is longer than the bound of a bounded string
        TypeMismatch

      • insert_any

        void insert_any(Any value)
         throws TypeMismatch,
                InvalidValue
        Inserts an Any value into the Any represented by this DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_dyn_any

        void insert_dyn_any(DynAny value)
             throws TypeMismatch,
                    InvalidValue
        Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • insert_val

        void insert_val(Serializable value)
         throws TypeMismatch,
                InvalidValue
        Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Throws:
        InvalidValue - if this DynAny has components but has a current position of -1
        TypeMismatch - if called on a DynAny whose current component itself has components

      • get_boolean

        boolean get_boolean()
             throws TypeMismatch,
                    InvalidValue
        Extracts the boolean value from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_octet

        byte get_octet()
        throws TypeMismatch,
               InvalidValue
        Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_char

        char get_char()
       throws TypeMismatch,
              InvalidValue
        Extracts the char value from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_short

        short get_short()
         throws TypeMismatch,
                InvalidValue
        Extracts the short value from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ushort

        short get_ushort()
          throws TypeMismatch,
                 InvalidValue
        Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_long

        int get_long()
      throws TypeMismatch,
             InvalidValue
        Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulong

        int get_ulong()
       throws TypeMismatch,
              InvalidValue
        Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_float

        float get_float()
         throws TypeMismatch,
                InvalidValue
        Extracts the float value from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_double

        double get_double()
           throws TypeMismatch,
                  InvalidValue
        Extracts the double value from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_string

        String get_string()
           throws TypeMismatch,
                  InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_reference

        Object get_reference()
              throws TypeMismatch,
                     InvalidValue
        Extracts the reference to a CORBA Object from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_typecode

        TypeCode get_typecode()
               throws TypeMismatch,
                      InvalidValue
        Extracts the TypeCode object from this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_longlong

        long get_longlong()
           throws TypeMismatch,
                  InvalidValue
        Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_ulonglong

        long get_ulonglong()
            throws TypeMismatch,
                   InvalidValue
        Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wchar

        char get_wchar()
        throws TypeMismatch,
               InvalidValue
        Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_wstring

        String get_wstring()
            throws TypeMismatch,
                   InvalidValue
        Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue

      • get_any

        Any get_any()
     throws TypeMismatch,
            InvalidValue
        Extracts an Any value contained in the Any represented by this DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_dyn_any

        DynAny get_dyn_any()
            throws TypeMismatch,
                   InvalidValue
        Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • get_val

        Serializable get_val()
              throws TypeMismatch,
                     InvalidValue
        Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
        Throws:
        TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type.
        TypeMismatch - if called on a DynAny whose current component itself has components
        InvalidValue - if this DynAny has components but has a current position of -1

      • seek

        boolean seek(int index)
        Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.

      • rewind

        void rewind()
        Is equivalent to seek(0).

      • next

        boolean next()
        Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.

      • component_count

        int component_count()
        Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
        • For sequences, the operation returns the current number of elements.
        • For structures, exceptions, and value types, the operation returns the number of members.
        • For arrays, the operation returns the number of elements.
        • For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1.
        • For DynFixed and DynEnum, the operation returns zero.

      • current_component

        DynAny current_component()
                  throws TypeMismatch
        Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
        Throws:
        TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnyPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.DynamicAny.DynAnyPackage

This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.

See: Description

  • Class Summary
    Class Description
    InvalidValueHelper
    org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java .
    TypeMismatchHelper
    org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java .
  • Exception Summary
    Exception Description
    InvalidValue
    org/omg/DynamicAny/DynAnyPackage/InvalidValue.java .
    TypeMismatch
    org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java .

Package org.omg.DynamicAny.DynAnyPackage Description

This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2. Please refer to that OMG specification for further details.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.DynamicAny.DynAnyPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.DynamicAny.DynAnyPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.DynamicAny.DynAnyPackage.InvalidValue
          • org.omg.DynamicAny.DynAnyPackage.TypeMismatch
    • org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.DynamicAny.DynAnyPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.DynamicAny.DynAnyPackage

  • Packages that use org.omg.DynamicAny.DynAnyPackage
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.
  • Classes in org.omg.DynamicAny.DynAnyPackage used by org.omg.DynamicAny
    Class and Description
    InvalidValue
    org/omg/DynamicAny/DynAnyPackage/InvalidValue.java .
    TypeMismatch
    org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java .
  • Classes in org.omg.DynamicAny.DynAnyPackage used by org.omg.DynamicAny.DynAnyPackage
    Class and Description
    InvalidValue
    org/omg/DynamicAny/DynAnyPackage/InvalidValue.java .
    TypeMismatch
    org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyPackage.InvalidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyPackage.InvalidValue

  • Packages that use InvalidValue
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.

    • Uses of InvalidValue in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that throw InvalidValue
      Modifier and Type Method and Description
      TCKind _DynValueStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind _DynStructStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynStructOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynValueOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String _DynValueStub.current_member_name()
      Returns the name of the member at the current position.
      String _DynStructStub.current_member_name()
      Returns the name of the member at the current position.
      String DynStructOperations.current_member_name()
      Returns the name of the member at the current position.
      String DynValueOperations.current_member_name()
      Returns the name of the member at the current position.
      void _DynSequenceStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void DynAnyOperations.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynEnumStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynValueStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynArrayStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynStructStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynAnyStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynFixedStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynUnionStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any _DynSequenceStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any DynAnyOperations.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynEnumStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynValueStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynArrayStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynStructStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynAnyStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynFixedStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynUnionStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean _DynSequenceStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean DynAnyOperations.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynEnumStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynValueStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynArrayStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynStructStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynAnyStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynFixedStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynUnionStub.get_boolean()
      Extracts the boolean value from this DynAny.
      DynAny DynValueBoxOperations.get_boxed_value_as_dyn_any()
      Returns the boxed value as a DynAny.
      Any DynValueBoxOperations.get_boxed_value()
      Returns the boxed value as an Any.
      char _DynSequenceStub.get_char()
      Extracts the char value from this DynAny.
      char DynAnyOperations.get_char()
      Extracts the char value from this DynAny.
      char _DynEnumStub.get_char()
      Extracts the char value from this DynAny.
      char _DynValueStub.get_char()
      Extracts the char value from this DynAny.
      char _DynArrayStub.get_char()
      Extracts the char value from this DynAny.
      char _DynStructStub.get_char()
      Extracts the char value from this DynAny.
      char _DynAnyStub.get_char()
      Extracts the char value from this DynAny.
      char _DynFixedStub.get_char()
      Extracts the char value from this DynAny.
      char _DynUnionStub.get_char()
      Extracts the char value from this DynAny.
      double _DynSequenceStub.get_double()
      Extracts the double value from this DynAny.
      double DynAnyOperations.get_double()
      Extracts the double value from this DynAny.
      double _DynEnumStub.get_double()
      Extracts the double value from this DynAny.
      double _DynValueStub.get_double()
      Extracts the double value from this DynAny.
      double _DynArrayStub.get_double()
      Extracts the double value from this DynAny.
      double _DynStructStub.get_double()
      Extracts the double value from this DynAny.
      double _DynAnyStub.get_double()
      Extracts the double value from this DynAny.
      double _DynFixedStub.get_double()
      Extracts the double value from this DynAny.
      double _DynUnionStub.get_double()
      Extracts the double value from this DynAny.
      DynAny _DynSequenceStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny DynAnyOperations.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynEnumStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynValueStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynArrayStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynStructStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynAnyStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynFixedStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynUnionStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float _DynSequenceStub.get_float()
      Extracts the float value from this DynAny.
      float DynAnyOperations.get_float()
      Extracts the float value from this DynAny.
      float _DynEnumStub.get_float()
      Extracts the float value from this DynAny.
      float _DynValueStub.get_float()
      Extracts the float value from this DynAny.
      float _DynArrayStub.get_float()
      Extracts the float value from this DynAny.
      float _DynStructStub.get_float()
      Extracts the float value from this DynAny.
      float _DynAnyStub.get_float()
      Extracts the float value from this DynAny.
      float _DynFixedStub.get_float()
      Extracts the float value from this DynAny.
      float _DynUnionStub.get_float()
      Extracts the float value from this DynAny.
      int _DynSequenceStub.get_long()
      Extracts the integer value from this DynAny.
      int DynAnyOperations.get_long()
      Extracts the integer value from this DynAny.
      int _DynEnumStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynValueStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynArrayStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynStructStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynAnyStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynFixedStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynUnionStub.get_long()
      Extracts the integer value from this DynAny.
      long _DynSequenceStub.get_longlong()
      Extracts the long value from this DynAny.
      long DynAnyOperations.get_longlong()
      Extracts the long value from this DynAny.
      long _DynEnumStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynValueStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynArrayStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynStructStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynAnyStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynFixedStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynUnionStub.get_longlong()
      Extracts the long value from this DynAny.
      NameDynAnyPair[] _DynValueStub.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      NameDynAnyPair[] DynValueOperations.get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      NameValuePair[] _DynValueStub.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      NameValuePair[] DynValueOperations.get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      byte _DynSequenceStub.get_octet()
      Extracts the byte value from this DynAny.
      byte DynAnyOperations.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynEnumStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynValueStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynArrayStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynStructStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynAnyStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynFixedStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynUnionStub.get_octet()
      Extracts the byte value from this DynAny.
      Object _DynSequenceStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object DynAnyOperations.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynEnumStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynValueStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynArrayStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynStructStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynAnyStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynFixedStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynUnionStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short _DynSequenceStub.get_short()
      Extracts the short value from this DynAny.
      short DynAnyOperations.get_short()
      Extracts the short value from this DynAny.
      short _DynEnumStub.get_short()
      Extracts the short value from this DynAny.
      short _DynValueStub.get_short()
      Extracts the short value from this DynAny.
      short _DynArrayStub.get_short()
      Extracts the short value from this DynAny.
      short _DynStructStub.get_short()
      Extracts the short value from this DynAny.
      short _DynAnyStub.get_short()
      Extracts the short value from this DynAny.
      short _DynFixedStub.get_short()
      Extracts the short value from this DynAny.
      short _DynUnionStub.get_short()
      Extracts the short value from this DynAny.
      String _DynSequenceStub.get_string()
      Extracts the string value from this DynAny.
      String DynAnyOperations.get_string()
      Extracts the string value from this DynAny.
      String _DynEnumStub.get_string()
      Extracts the string value from this DynAny.
      String _DynValueStub.get_string()
      Extracts the string value from this DynAny.
      String _DynArrayStub.get_string()
      Extracts the string value from this DynAny.
      String _DynStructStub.get_string()
      Extracts the string value from this DynAny.
      String _DynAnyStub.get_string()
      Extracts the string value from this DynAny.
      String _DynFixedStub.get_string()
      Extracts the string value from this DynAny.
      String _DynUnionStub.get_string()
      Extracts the string value from this DynAny.
      TypeCode _DynSequenceStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode DynAnyOperations.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynEnumStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynValueStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynArrayStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynStructStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynAnyStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynFixedStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynUnionStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      int _DynSequenceStub.get_ulong()
      Extracts the integer value from this DynAny.
      int DynAnyOperations.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynEnumStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynValueStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynArrayStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynStructStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynAnyStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynFixedStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynUnionStub.get_ulong()
      Extracts the integer value from this DynAny.
      long _DynSequenceStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long DynAnyOperations.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynEnumStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynValueStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynArrayStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynStructStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynAnyStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynFixedStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynUnionStub.get_ulonglong()
      Extracts the long value from this DynAny.
      short _DynSequenceStub.get_ushort()
      Extracts the short value from this DynAny.
      short DynAnyOperations.get_ushort()
      Extracts the short value from this DynAny.
      short _DynEnumStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynValueStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynArrayStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynStructStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynAnyStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynFixedStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynUnionStub.get_ushort()
      Extracts the short value from this DynAny.
      Serializable _DynSequenceStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable DynAnyOperations.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynEnumStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynValueStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynArrayStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynStructStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynAnyStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynFixedStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynUnionStub.get_val()
      Extracts a Serializable object from this DynAny.
      char _DynSequenceStub.get_wchar()
      Extracts the long value from this DynAny.
      char DynAnyOperations.get_wchar()
      Extracts the long value from this DynAny.
      char _DynEnumStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynValueStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynArrayStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynStructStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynAnyStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynFixedStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynUnionStub.get_wchar()
      Extracts the long value from this DynAny.
      String _DynSequenceStub.get_wstring()
      Extracts the string value from this DynAny.
      String DynAnyOperations.get_wstring()
      Extracts the string value from this DynAny.
      String _DynEnumStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynValueStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynArrayStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynStructStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynAnyStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynFixedStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynUnionStub.get_wstring()
      Extracts the string value from this DynAny.
      void _DynSequenceStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void DynAnyOperations.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynEnumStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynValueStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynArrayStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynStructStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynAnyStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynFixedStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynUnionStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynSequenceStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void DynAnyOperations.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynEnumStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynValueStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynArrayStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynStructStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynAnyStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynFixedStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynUnionStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynSequenceStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void DynAnyOperations.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynEnumStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynValueStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynArrayStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynStructStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynAnyStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynFixedStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynUnionStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynSequenceStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void DynAnyOperations.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynEnumStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynValueStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynArrayStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynStructStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynAnyStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynFixedStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynUnionStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynSequenceStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void DynAnyOperations.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynEnumStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynValueStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynArrayStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynStructStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynAnyStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynFixedStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynUnionStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynSequenceStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void DynAnyOperations.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynEnumStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynValueStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynArrayStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynStructStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynAnyStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynFixedStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynUnionStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynSequenceStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void DynAnyOperations.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynEnumStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynValueStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynArrayStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynStructStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynAnyStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynFixedStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynUnionStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynSequenceStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void DynAnyOperations.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynEnumStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynValueStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynArrayStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynStructStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynAnyStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynFixedStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynUnionStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynSequenceStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void DynAnyOperations.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynEnumStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynValueStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynArrayStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynStructStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynAnyStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynFixedStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynUnionStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynSequenceStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void DynAnyOperations.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynEnumStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynValueStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynArrayStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynStructStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynAnyStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynFixedStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynUnionStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynSequenceStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void DynAnyOperations.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynEnumStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynValueStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynArrayStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynStructStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynAnyStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynFixedStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynUnionStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynSequenceStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void DynAnyOperations.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynEnumStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynValueStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynArrayStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynStructStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynAnyStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynFixedStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynUnionStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynSequenceStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void DynAnyOperations.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynEnumStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynValueStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynArrayStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynStructStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynAnyStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynFixedStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynUnionStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynSequenceStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void DynAnyOperations.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynEnumStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynValueStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynArrayStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynStructStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynAnyStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynFixedStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynUnionStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynSequenceStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void DynAnyOperations.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynEnumStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynValueStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynArrayStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynStructStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynAnyStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynFixedStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynUnionStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynSequenceStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void DynAnyOperations.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynEnumStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynValueStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynArrayStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynStructStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynAnyStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynFixedStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynUnionStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynSequenceStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void DynAnyOperations.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynEnumStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynValueStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynArrayStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynStructStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynAnyStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynFixedStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynUnionStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynSequenceStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void DynAnyOperations.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynEnumStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynValueStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynArrayStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynStructStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynAnyStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynFixedStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynUnionStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynSequenceStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void DynAnyOperations.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynEnumStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynValueStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynArrayStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynStructStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynAnyStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynFixedStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynUnionStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      TCKind DynUnionOperations.member_kind()
      Returns the TCKind value of the currently active members TypeCode.
      TCKind _DynUnionStub.member_kind()
      Returns the TCKind value of the currently active members TypeCode.
      String DynUnionOperations.member_name()
      Returns the name of the currently active member.
      String _DynUnionStub.member_name()
      Returns the name of the currently active member.
      DynAny DynUnionOperations.member()
      Returns the currently active member.
      DynAny _DynUnionStub.member()
      Returns the currently active member.
      void _DynEnumStub.set_as_string(String value)
      Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
      void DynEnumOperations.set_as_string(String value)
      Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
      void _DynEnumStub.set_as_ulong(int value)
      Sets the value of the DynEnum as the enumerated value's ordinal value.
      void DynEnumOperations.set_as_ulong(int value)
      Sets the value of the DynEnum as the enumerated value's ordinal value.
      void _DynSequenceStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void DynArrayOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void _DynSequenceStub.set_elements(Any[] value)
      Sets the elements of a sequence.
      void DynArrayOperations.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements(Any[] value)
      Sets the elements of a sequence.
      void _DynSequenceStub.set_length(int len)
      Sets the length of the sequence.
      void DynSequenceOperations.set_length(int len)
      Sets the length of the sequence.
      void _DynValueStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void _DynStructStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynStructOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynValueOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void _DynValueStub.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      void _DynStructStub.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynStructOperations.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynValueOperations.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      boolean DynFixedOperations.set_value(String val)
      Sets the value of the DynFixed.
      boolean _DynFixedStub.set_value(String val)
      Sets the value of the DynFixed.

    • Uses of InvalidValue in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage that return InvalidValue
      Modifier and Type | Method and Description
      static InvalidValue | InvalidValueHelper.extract(Any a)
      static InvalidValue | InvalidValueHelper.read(InputStream istream)
      Methods in org.omg.DynamicAny.DynAnyPackage with parameters of type InvalidValue
      Modifier and Type | Method and Description
      static void | InvalidValueHelper.insert(Any a, InvalidValue that)
      static void | InvalidValueHelper.write(OutputStream ostream, InvalidValue value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper

No usage of org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyPackage.TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyPackage.TypeMismatch

  • Packages that use TypeMismatch
    Package Description
    org.omg.DynamicAny
    Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.
    org.omg.DynamicAny.DynAnyPackage
    This package contains classes and exceptions from the DynAny interface of the DynamicAny module specified in the OMG The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 9.2.

    • Uses of TypeMismatch in org.omg.DynamicAny

      Methods in org.omg.DynamicAny that throw TypeMismatch
      Modifier and Type Method and Description
      void _DynSequenceStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void DynAnyOperations.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynEnumStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynValueStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynArrayStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynStructStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynAnyStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynFixedStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      void _DynUnionStub.assign(DynAny dyn_any)
      Initializes the value associated with a DynAny object with the value associated with another DynAny object.
      DynAny _DynSequenceStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny DynAnyOperations.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynEnumStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynValueStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynArrayStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynStructStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynAnyStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynFixedStub.current_component()
      Returns the DynAny for the component at the current position.
      DynAny _DynUnionStub.current_component()
      Returns the DynAny for the component at the current position.
      TCKind _DynValueStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind _DynStructStub.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynStructOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      TCKind DynValueOperations.current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String _DynValueStub.current_member_name()
      Returns the name of the member at the current position.
      String _DynStructStub.current_member_name()
      Returns the name of the member at the current position.
      String DynStructOperations.current_member_name()
      Returns the name of the member at the current position.
      String DynValueOperations.current_member_name()
      Returns the name of the member at the current position.
      void _DynSequenceStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void DynAnyOperations.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynEnumStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynValueStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynArrayStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynStructStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynAnyStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynFixedStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      void _DynUnionStub.from_any(Any value)
      Initializes the value associated with a DynAny object with the value contained in an any.
      Any _DynSequenceStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any DynAnyOperations.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynEnumStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynValueStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynArrayStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynStructStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynAnyStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynFixedStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      Any _DynUnionStub.get_any()
      Extracts an Any value contained in the Any represented by this DynAny.
      boolean _DynSequenceStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean DynAnyOperations.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynEnumStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynValueStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynArrayStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynStructStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynAnyStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynFixedStub.get_boolean()
      Extracts the boolean value from this DynAny.
      boolean _DynUnionStub.get_boolean()
      Extracts the boolean value from this DynAny.
      char _DynSequenceStub.get_char()
      Extracts the char value from this DynAny.
      char DynAnyOperations.get_char()
      Extracts the char value from this DynAny.
      char _DynEnumStub.get_char()
      Extracts the char value from this DynAny.
      char _DynValueStub.get_char()
      Extracts the char value from this DynAny.
      char _DynArrayStub.get_char()
      Extracts the char value from this DynAny.
      char _DynStructStub.get_char()
      Extracts the char value from this DynAny.
      char _DynAnyStub.get_char()
      Extracts the char value from this DynAny.
      char _DynFixedStub.get_char()
      Extracts the char value from this DynAny.
      char _DynUnionStub.get_char()
      Extracts the char value from this DynAny.
      double _DynSequenceStub.get_double()
      Extracts the double value from this DynAny.
      double DynAnyOperations.get_double()
      Extracts the double value from this DynAny.
      double _DynEnumStub.get_double()
      Extracts the double value from this DynAny.
      double _DynValueStub.get_double()
      Extracts the double value from this DynAny.
      double _DynArrayStub.get_double()
      Extracts the double value from this DynAny.
      double _DynStructStub.get_double()
      Extracts the double value from this DynAny.
      double _DynAnyStub.get_double()
      Extracts the double value from this DynAny.
      double _DynFixedStub.get_double()
      Extracts the double value from this DynAny.
      double _DynUnionStub.get_double()
      Extracts the double value from this DynAny.
      DynAny _DynSequenceStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny DynAnyOperations.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynEnumStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynValueStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynArrayStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynStructStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynAnyStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynFixedStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      DynAny _DynUnionStub.get_dyn_any()
      Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
      float _DynSequenceStub.get_float()
      Extracts the float value from this DynAny.
      float DynAnyOperations.get_float()
      Extracts the float value from this DynAny.
      float _DynEnumStub.get_float()
      Extracts the float value from this DynAny.
      float _DynValueStub.get_float()
      Extracts the float value from this DynAny.
      float _DynArrayStub.get_float()
      Extracts the float value from this DynAny.
      float _DynStructStub.get_float()
      Extracts the float value from this DynAny.
      float _DynAnyStub.get_float()
      Extracts the float value from this DynAny.
      float _DynFixedStub.get_float()
      Extracts the float value from this DynAny.
      float _DynUnionStub.get_float()
      Extracts the float value from this DynAny.
      int _DynSequenceStub.get_long()
      Extracts the integer value from this DynAny.
      int DynAnyOperations.get_long()
      Extracts the integer value from this DynAny.
      int _DynEnumStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynValueStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynArrayStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynStructStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynAnyStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynFixedStub.get_long()
      Extracts the integer value from this DynAny.
      int _DynUnionStub.get_long()
      Extracts the integer value from this DynAny.
      long _DynSequenceStub.get_longlong()
      Extracts the long value from this DynAny.
      long DynAnyOperations.get_longlong()
      Extracts the long value from this DynAny.
      long _DynEnumStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynValueStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynArrayStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynStructStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynAnyStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynFixedStub.get_longlong()
      Extracts the long value from this DynAny.
      long _DynUnionStub.get_longlong()
      Extracts the long value from this DynAny.
      byte _DynSequenceStub.get_octet()
      Extracts the byte value from this DynAny.
      byte DynAnyOperations.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynEnumStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynValueStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynArrayStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynStructStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynAnyStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynFixedStub.get_octet()
      Extracts the byte value from this DynAny.
      byte _DynUnionStub.get_octet()
      Extracts the byte value from this DynAny.
      Object _DynSequenceStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object DynAnyOperations.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynEnumStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynValueStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynArrayStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynStructStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynAnyStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynFixedStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      Object _DynUnionStub.get_reference()
      Extracts the reference to a CORBA Object from this DynAny.
      short _DynSequenceStub.get_short()
      Extracts the short value from this DynAny.
      short DynAnyOperations.get_short()
      Extracts the short value from this DynAny.
      short _DynEnumStub.get_short()
      Extracts the short value from this DynAny.
      short _DynValueStub.get_short()
      Extracts the short value from this DynAny.
      short _DynArrayStub.get_short()
      Extracts the short value from this DynAny.
      short _DynStructStub.get_short()
      Extracts the short value from this DynAny.
      short _DynAnyStub.get_short()
      Extracts the short value from this DynAny.
      short _DynFixedStub.get_short()
      Extracts the short value from this DynAny.
      short _DynUnionStub.get_short()
      Extracts the short value from this DynAny.
      String _DynSequenceStub.get_string()
      Extracts the string value from this DynAny.
      String DynAnyOperations.get_string()
      Extracts the string value from this DynAny.
      String _DynEnumStub.get_string()
      Extracts the string value from this DynAny.
      String _DynValueStub.get_string()
      Extracts the string value from this DynAny.
      String _DynArrayStub.get_string()
      Extracts the string value from this DynAny.
      String _DynStructStub.get_string()
      Extracts the string value from this DynAny.
      String _DynAnyStub.get_string()
      Extracts the string value from this DynAny.
      String _DynFixedStub.get_string()
      Extracts the string value from this DynAny.
      String _DynUnionStub.get_string()
      Extracts the string value from this DynAny.
      TypeCode _DynSequenceStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode DynAnyOperations.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynEnumStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynValueStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynArrayStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynStructStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynAnyStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynFixedStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      TypeCode _DynUnionStub.get_typecode()
      Extracts the TypeCode object from this DynAny.
      int _DynSequenceStub.get_ulong()
      Extracts the integer value from this DynAny.
      int DynAnyOperations.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynEnumStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynValueStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynArrayStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynStructStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynAnyStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynFixedStub.get_ulong()
      Extracts the integer value from this DynAny.
      int _DynUnionStub.get_ulong()
      Extracts the integer value from this DynAny.
      long _DynSequenceStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long DynAnyOperations.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynEnumStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynValueStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynArrayStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynStructStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynAnyStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynFixedStub.get_ulonglong()
      Extracts the long value from this DynAny.
      long _DynUnionStub.get_ulonglong()
      Extracts the long value from this DynAny.
      short _DynSequenceStub.get_ushort()
      Extracts the short value from this DynAny.
      short DynAnyOperations.get_ushort()
      Extracts the short value from this DynAny.
      short _DynEnumStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynValueStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynArrayStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynStructStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynAnyStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynFixedStub.get_ushort()
      Extracts the short value from this DynAny.
      short _DynUnionStub.get_ushort()
      Extracts the short value from this DynAny.
      Serializable _DynSequenceStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable DynAnyOperations.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynEnumStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynValueStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynArrayStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynStructStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynAnyStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynFixedStub.get_val()
      Extracts a Serializable object from this DynAny.
      Serializable _DynUnionStub.get_val()
      Extracts a Serializable object from this DynAny.
      char _DynSequenceStub.get_wchar()
      Extracts the long value from this DynAny.
      char DynAnyOperations.get_wchar()
      Extracts the long value from this DynAny.
      char _DynEnumStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynValueStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynArrayStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynStructStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynAnyStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynFixedStub.get_wchar()
      Extracts the long value from this DynAny.
      char _DynUnionStub.get_wchar()
      Extracts the long value from this DynAny.
      String _DynSequenceStub.get_wstring()
      Extracts the string value from this DynAny.
      String DynAnyOperations.get_wstring()
      Extracts the string value from this DynAny.
      String _DynEnumStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynValueStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynArrayStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynStructStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynAnyStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynFixedStub.get_wstring()
      Extracts the string value from this DynAny.
      String _DynUnionStub.get_wstring()
      Extracts the string value from this DynAny.
      void _DynSequenceStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void DynAnyOperations.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynEnumStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynValueStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynArrayStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynStructStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynAnyStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynFixedStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynUnionStub.insert_any(Any value)
      Inserts an Any value into the Any represented by this DynAny.
      void _DynSequenceStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void DynAnyOperations.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynEnumStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynValueStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynArrayStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynStructStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynAnyStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynFixedStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynUnionStub.insert_boolean(boolean value)
      Inserts a boolean value into the DynAny.
      void _DynSequenceStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void DynAnyOperations.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynEnumStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynValueStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynArrayStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynStructStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynAnyStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynFixedStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynUnionStub.insert_char(char value)
      Inserts a char value into the DynAny.
      void _DynSequenceStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void DynAnyOperations.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynEnumStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynValueStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynArrayStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynStructStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynAnyStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynFixedStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynUnionStub.insert_double(double value)
      Inserts a double value into the DynAny.
      void _DynSequenceStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void DynAnyOperations.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynEnumStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynValueStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynArrayStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynStructStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynAnyStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynFixedStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynUnionStub.insert_dyn_any(DynAny value)
      Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
      void _DynSequenceStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void DynAnyOperations.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynEnumStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynValueStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynArrayStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynStructStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynAnyStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynFixedStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynUnionStub.insert_float(float value)
      Inserts a float value into the DynAny.
      void _DynSequenceStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void DynAnyOperations.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynEnumStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynValueStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynArrayStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynStructStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynAnyStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynFixedStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynUnionStub.insert_long(int value)
      Inserts an integer value into the DynAny.
      void _DynSequenceStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void DynAnyOperations.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynEnumStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynValueStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynArrayStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynStructStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynAnyStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynFixedStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynUnionStub.insert_longlong(long value)
      Inserts a long value into the DynAny.
      void _DynSequenceStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void DynAnyOperations.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynEnumStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynValueStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynArrayStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynStructStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynAnyStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynFixedStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynUnionStub.insert_octet(byte value)
      Inserts a byte value into the DynAny.
      void _DynSequenceStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void DynAnyOperations.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynEnumStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynValueStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynArrayStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynStructStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynAnyStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynFixedStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynUnionStub.insert_reference(Object value)
      Inserts a reference to a CORBA object into the DynAny.
      void _DynSequenceStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void DynAnyOperations.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynEnumStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynValueStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynArrayStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynStructStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynAnyStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynFixedStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynUnionStub.insert_short(short value)
      Inserts a short value into the DynAny.
      void _DynSequenceStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void DynAnyOperations.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynEnumStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynValueStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynArrayStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynStructStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynAnyStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynFixedStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynUnionStub.insert_string(String value)
      Inserts a string value into the DynAny.
      void _DynSequenceStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void DynAnyOperations.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynEnumStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynValueStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynArrayStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynStructStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynAnyStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynFixedStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynUnionStub.insert_typecode(TypeCode value)
      Inserts a TypeCode object into the DynAny.
      void _DynSequenceStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void DynAnyOperations.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynEnumStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynValueStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynArrayStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynStructStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynAnyStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynFixedStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynUnionStub.insert_ulong(int value)
      Inserts an integer value into the DynAny.
      void _DynSequenceStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void DynAnyOperations.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynEnumStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynValueStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynArrayStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynStructStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynAnyStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynFixedStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynUnionStub.insert_ulonglong(long value)
      Inserts a long value into the DynAny.
      void _DynSequenceStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void DynAnyOperations.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynEnumStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynValueStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynArrayStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynStructStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynAnyStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynFixedStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynUnionStub.insert_ushort(short value)
      Inserts a short value into the DynAny.
      void _DynSequenceStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void DynAnyOperations.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynEnumStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynValueStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynArrayStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynStructStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynAnyStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynFixedStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynUnionStub.insert_val(Serializable value)
      Inserts a reference to a Serializable object into this DynAny.
      void _DynSequenceStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void DynAnyOperations.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynEnumStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynValueStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynArrayStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynStructStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynAnyStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynFixedStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynUnionStub.insert_wchar(char value)
      Inserts a char value into the DynAny.
      void _DynSequenceStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void DynAnyOperations.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynEnumStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynValueStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynArrayStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynStructStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynAnyStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynFixedStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void _DynUnionStub.insert_wstring(String value)
      Inserts a string value into the DynAny.
      void DynValueBoxOperations.set_boxed_value_as_dyn_any(DynAny boxed)
      Replaces the boxed value with the value contained in the parameter.
      void DynValueBoxOperations.set_boxed_value(Any boxed)
      Replaces the boxed value with the specified value.
      void DynUnionOperations.set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void _DynUnionStub.set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void _DynSequenceStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void DynArrayOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void _DynSequenceStub.set_elements(Any[] value)
      Sets the elements of a sequence.
      void DynArrayOperations.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void _DynArrayStub.set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.
      void DynSequenceOperations.set_elements(Any[] value)
      Sets the elements of a sequence.
      void _DynValueStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void _DynStructStub.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynStructOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void DynValueOperations.set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void _DynValueStub.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      void _DynStructStub.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynStructOperations.set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
      void DynValueOperations.set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.
      void DynUnionOperations.set_to_default_member()
      Sets the discriminator to a value that is consistent with the value of the default case of a union.
      void _DynUnionStub.set_to_default_member()
      Sets the discriminator to a value that is consistent with the value of the default case of a union.
      void DynUnionOperations.set_to_no_active_member()
      Sets the discriminator to a value that does not correspond to any of the unions case labels.
      void _DynUnionStub.set_to_no_active_member()
      Sets the discriminator to a value that does not correspond to any of the unions case labels.
      boolean DynFixedOperations.set_value(String val)
      Sets the value of the DynFixed.
      boolean _DynFixedStub.set_value(String val)
      Sets the value of the DynFixed.

    • Uses of TypeMismatch in org.omg.DynamicAny.DynAnyPackage

      Methods in org.omg.DynamicAny.DynAnyPackage that return TypeMismatch
      Modifier and Type | Method and Description
      static TypeMismatch | TypeMismatchHelper.extract(Any a)
      static TypeMismatch | TypeMismatchHelper.read(InputStream istream)
      Methods in org.omg.DynamicAny.DynAnyPackage with parameters of type TypeMismatch
      Modifier and Type | Method and Description
      static void | TypeMismatchHelper.insert(Any a, TypeMismatch that)
      static void | TypeMismatchHelper.write(OutputStream ostream, TypeMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper

No usage of org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyPackage

Class InvalidValue

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.DynamicAny.DynAnyPackage.InvalidValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidValue
extends UserException
    org/omg/DynamicAny/DynAnyPackage/InvalidValue.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidValue()
      InvalidValue(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidValue

        public InvalidValue()

      • InvalidValue

        public InvalidValue(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyPackage

Class InvalidValueHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper

  • public abstract class InvalidValueHelper
extends Object
    org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidValueHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidValue | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidValue that)
      static InvalidValue | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidValue value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidValueHelper

        public InvalidValueHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidValue that)

      • extract

        public static InvalidValue extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidValue read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidValue value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyPackage

Class TypeMismatch

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.DynamicAny.DynAnyPackage.TypeMismatch
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class TypeMismatch
extends UserException
    org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeMismatch()
      TypeMismatch(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TypeMismatch

        public TypeMismatch()

      • TypeMismatch

        public TypeMismatch(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny.DynAnyPackage

Class TypeMismatchHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper

  • public abstract class TypeMismatchHelper
extends Object
    org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:55 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeMismatchHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static TypeMismatch | extract(Any a)
      static String | id()
      static void | insert(Any a, TypeMismatch that)
      static TypeMismatch | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, TypeMismatch value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TypeMismatchHelper

        public TypeMismatchHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          TypeMismatch that)

      • extract

        public static TypeMismatch extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static TypeMismatch read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         TypeMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynAnySeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynAnySeqHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynAnySeqHelper

  • public abstract class DynAnySeqHelper
extends Object
    org/omg/DynamicAny/DynAnySeqHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      DynAnySeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynAny[] | extract(Any a)
      static String | id()
      static void | insert(Any a, DynAny[] that)
      static DynAny[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, DynAny[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynAnySeqHelper

        public DynAnySeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynAny[] that)

      • extract

        public static DynAny[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynAny[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynAny[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynArrayHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynArrayHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynArrayHelper

  • public abstract class DynArrayHelper
extends Object
    DynArray objects support the manipulation of IDL arrays. Note that the dimension of the array is contained in the TypeCode which is accessible through the type attribute. It can also be obtained by calling the component_count operation.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynArrayHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynArray | extract(Any a)
      static String | id()
      static void | insert(Any a, DynArray that)
      static DynArray | narrow(Object obj)
      static DynArray | read(InputStream istream)
      static TypeCode | type()
      static DynArray | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynArray value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynArrayHelper

        public DynArrayHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynArray that)

      • extract

        public static DynArray extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynArray read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynArray value)

      • narrow

        public static DynArray narrow(Object obj)

      • unchecked_narrow

        public static DynArray unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynArrayOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynArrayOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynArray
    All Known Implementing Classes:
    _DynArrayStub

    public interface DynArrayOperations
extends DynAnyOperations
    DynArray objects support the manipulation of IDL arrays. Note that the dimension of the array is contained in the TypeCode which is accessible through the type attribute. It can also be obtained by calling the component_count operation.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DynAny[] get_elements_as_dyn_any()
      Returns the elements of the DynArray as DynAnys.
      Any[] get_elements()
      Returns the elements of the DynArray.
      void set_elements_as_dyn_any(DynAny[] value)
      Sets the DynArray to contain the passed elements.
      void set_elements(Any[] value)
      Sets the DynArray to contain the passed elements.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_elements

        Any[] get_elements()
        Returns the elements of the DynArray.

      • set_elements

        void set_elements(Any[] value)
           throws TypeMismatch,
                  InvalidValue
        Sets the DynArray to contain the passed elements.
        Throws:
        TypeMismatch - if one or more elements have a type that is inconsistent with the DynArrays TypeCode
        InvalidValue - if the sequence does not contain the same number of elements as the array dimension

      • get_elements_as_dyn_any

        DynAny[] get_elements_as_dyn_any()
        Returns the elements of the DynArray as DynAnys.

      • set_elements_as_dyn_any

        void set_elements_as_dyn_any(DynAny[] value)
                      throws TypeMismatch,
                             InvalidValue
        Sets the DynArray to contain the passed elements.
        Throws:
        TypeMismatch - if one or more elements have a type that is inconsistent with the DynArrays TypeCode
        InvalidValue - if the sequence does not contain the same number of elements as the array dimension
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynEnumHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynEnumHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynEnumHelper

  • public abstract class DynEnumHelper
extends Object
    DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynEnumHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynEnum | extract(Any a)
      static String | id()
      static void | insert(Any a, DynEnum that)
      static DynEnum | narrow(Object obj)
      static DynEnum | read(InputStream istream)
      static TypeCode | type()
      static DynEnum | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynEnum value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynEnumHelper

        public DynEnumHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynEnum that)

      • extract

        public static DynEnum extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynEnum read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynEnum value)

      • narrow

        public static DynEnum narrow(Object obj)

      • unchecked_narrow

        public static DynEnum unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynEnumOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynEnumOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynEnum
    All Known Implementing Classes:
    _DynEnumStub

    public interface DynEnumOperations
extends DynAnyOperations
    DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String get_as_string()
      Returns the value of the DynEnum as an IDL identifier.
      int get_as_ulong()
      Returns the value of the DynEnum as the enumerated value's ordinal value.
      void set_as_string(String value)
      Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
      void set_as_ulong(int value)
      Sets the value of the DynEnum as the enumerated value's ordinal value.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_as_string

        String get_as_string()
        Returns the value of the DynEnum as an IDL identifier.

      • set_as_string

        void set_as_string(String value)
            throws InvalidValue
        Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
        Throws:
        InvalidValue - If value contains a string that is not a valid IDL identifier for the corresponding enumerated type

      • get_as_ulong

        int get_as_ulong()
        Returns the value of the DynEnum as the enumerated value's ordinal value. Enumerators have ordinal values 0 to n-1, as they appear from left to right in the corresponding IDL definition.

      • set_as_ulong

        void set_as_ulong(int value)
           throws InvalidValue
        Sets the value of the DynEnum as the enumerated value's ordinal value.
        Throws:
        InvalidValue - If value contains a value that is outside the range of ordinal values for the corresponding enumerated type
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynFixedHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynFixedHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynFixedHelper

  • public abstract class DynFixedHelper
extends Object
    DynFixed objects support the manipulation of IDL fixed values. Because IDL does not have a generic type that can represent fixed types with arbitrary number of digits and arbitrary scale, the operations use the IDL string type.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynFixedHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynFixed | extract(Any a)
      static String | id()
      static void | insert(Any a, DynFixed that)
      static DynFixed | narrow(Object obj)
      static DynFixed | read(InputStream istream)
      static TypeCode | type()
      static DynFixed | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynFixed value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynFixedHelper

        public DynFixedHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynFixed that)

      • extract

        public static DynFixed extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynFixed read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynFixed value)

      • narrow

        public static DynFixed narrow(Object obj)

      • unchecked_narrow

        public static DynFixed unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynFixedOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynFixedOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynFixed
    All Known Implementing Classes:
    _DynFixedStub

    public interface DynFixedOperations
extends DynAnyOperations
    DynFixed objects support the manipulation of IDL fixed values. Because IDL does not have a generic type that can represent fixed types with arbitrary number of digits and arbitrary scale, the operations use the IDL string type.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String get_value()
      Returns the value of a DynFixed.
      boolean set_value(String val)
      Sets the value of the DynFixed.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_value

        String get_value()
        Returns the value of a DynFixed.

      • set_value

        boolean set_value(String val)
           throws TypeMismatch,
                  InvalidValue
        Sets the value of the DynFixed. The val string must contain a fixed string constant in the same format as used for IDL fixed-point literals. However, the trailing d or D is optional. The return value is true if val can be represented as the DynFixed without loss of precision. If val has more fractional digits than can be represented in the DynFixed, fractional digits are truncated and the return value is false.
        Throws:
        TypeMismatch - If val does not contain a valid fixed-point literal or contains extraneous characters other than leading or trailing white space
        InvalidValue - If val contains a value whose scale exceeds that of the DynFixed or is not initialized
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynSequenceHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynSequenceHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynSequenceHelper

  • public abstract class DynSequenceHelper
extends Object
    DynSequence objects support the manipulation of IDL sequences.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynSequenceHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynSequence | extract(Any a)
      static String | id()
      static void | insert(Any a, DynSequence that)
      static DynSequence | narrow(Object obj)
      static DynSequence | read(InputStream istream)
      static TypeCode | type()
      static DynSequence | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynSequence value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynSequenceHelper

        public DynSequenceHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynSequence that)

      • extract

        public static DynSequence extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynSequence read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynSequence value)

      • narrow

        public static DynSequence narrow(Object obj)

      • unchecked_narrow

        public static DynSequence unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynSequenceOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynSequenceOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynSequence
    All Known Implementing Classes:
    _DynSequenceStub

    public interface DynSequenceOperations
extends DynAnyOperations
    DynSequence objects support the manipulation of IDL sequences.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DynAny[] get_elements_as_dyn_any()
      Returns the DynAnys representing the elements of the sequence.
      Any[] get_elements()
      Returns the elements of the sequence.
      int get_length()
      Returns the current length of the sequence.
      void set_elements_as_dyn_any(DynAny[] value)
      Sets the elements of a sequence using DynAnys.
      void set_elements(Any[] value)
      Sets the elements of a sequence.
      void set_length(int len)
      Sets the length of the sequence.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_length

        int get_length()
        Returns the current length of the sequence.

      • set_length

        void set_length(int len)
         throws InvalidValue
        Sets the length of the sequence. Increasing the length of a sequence adds new elements at the tail without affecting the values of already existing elements. Newly added elements are default-initialized. Increasing the length of a sequence sets the current position to the first newly-added element if the previous current position was -1. Otherwise, if the previous current position was not -1, the current position is not affected. Decreasing the length of a sequence removes elements from the tail without affecting the value of those elements that remain. The new current position after decreasing the length of a sequence is determined as follows:
        • If the length of the sequence is set to zero, the current position is set to -1.
        • If the current position is -1 before decreasing the length, it remains at -1.
        • If the current position indicates a valid element and that element is not removed when the length is decreased, the current position remains unaffected.
        • If the current position indicates a valid element and that element is removed, the current position is set to -1.
        Throws:
        InvalidValue - if this is a bounded sequence and len is larger than the bound

      • get_elements

        Any[] get_elements()
        Returns the elements of the sequence.

      • set_elements

        void set_elements(Any[] value)
           throws TypeMismatch,
                  InvalidValue
        Sets the elements of a sequence. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.
        Throws:
        TypeMismatch - if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
        InvalidValue - if the length of value exceeds the bound of a bounded sequence

      • get_elements_as_dyn_any

        DynAny[] get_elements_as_dyn_any()
        Returns the DynAnys representing the elements of the sequence.

      • set_elements_as_dyn_any

        void set_elements_as_dyn_any(DynAny[] value)
                      throws TypeMismatch,
                             InvalidValue
        Sets the elements of a sequence using DynAnys. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.
        Throws:
        TypeMismatch - if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
        InvalidValue - if the length of value exceeds the bound of a bounded sequence
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynStructHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynStructHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynStructHelper

  • public abstract class DynStructHelper
extends Object
    DynStruct objects support the manipulation of IDL struct and exception values. Members of the exceptions are handled in the same way as members of a struct.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynStructHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynStruct | extract(Any a)
      static String | id()
      static void | insert(Any a, DynStruct that)
      static DynStruct | narrow(Object obj)
      static DynStruct | read(InputStream istream)
      static TypeCode | type()
      static DynStruct | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynStruct value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynStructHelper

        public DynStructHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynStruct that)

      • extract

        public static DynStruct extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynStruct read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynStruct value)

      • narrow

        public static DynStruct narrow(Object obj)

      • unchecked_narrow

        public static DynStruct unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynStructOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynStructOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynStruct
    All Known Implementing Classes:
    _DynStructStub

    public interface DynStructOperations
extends DynAnyOperations
    DynStruct objects support the manipulation of IDL struct and exception values. Members of the exceptions are handled in the same way as members of a struct.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TCKind current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String current_member_name()
      Returns the name of the member at the current position.
      NameDynAnyPair[] get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object.
      NameValuePair[] get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object.
      void set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
      void set_members(NameValuePair[] value)
      Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • current_member_name

        String current_member_name()
                    throws TypeMismatch,
                           InvalidValue
        Returns the name of the member at the current position. This operation may return an empty string since the TypeCode of the value being manipulated may not contain the names of members.
        Throws:
        TypeMismatch - if the DynStruct represents an empty exception.
        InvalidValue - if the current position does not indicate a member

      • current_member_kind

        TCKind current_member_kind()
                    throws TypeMismatch,
                           InvalidValue
        Returns the TCKind associated with the member at the current position.
        Throws:
        TypeMismatch - if the DynStruct represents an empty exception.
        InvalidValue - if the current position does not indicate a member

      • get_members

        NameValuePair[] get_members()
        Returns a sequence of NameValuePairs describing the name and the value of each member in the struct associated with a DynStruct object. The sequence contains members in the same order as the declaration order of members as indicated by the DynStruct's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynStruct's TypeCode does not contain member names.

      • set_members

        void set_members(NameValuePair[] value)
          throws TypeMismatch,
                 InvalidValue
        Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1.

        Members must appear in the NameValuePairs in the order in which they appear in the IDL specification of the struct as indicated by the DynStruct's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynStruct's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynStruct's TypeCode

      • get_members_as_dyn_any

        NameDynAnyPair[] get_members_as_dyn_any()
        Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the struct associated with a DynStruct object. The sequence contains members in the same order as the declaration order of members as indicated by the DynStruct's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynStruct's TypeCode does not contain member names.

      • set_members_as_dyn_any

        void set_members_as_dyn_any(NameDynAnyPair[] value)
                     throws TypeMismatch,
                            InvalidValue
        Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1.

        Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification of the struct as indicated by the DynStruct's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynStruct's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynStruct's TypeCode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynUnionHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynUnionHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynUnionHelper

  • public abstract class DynUnionHelper
extends Object
    DynUnion objects support the manipulation of IDL unions. A union can have only two valid current positions:
    • zero, which denotes the discriminator
    • one, which denotes the active member
    The component_count value for a union depends on the current discriminator: it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynUnionHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynUnion | extract(Any a)
      static String | id()
      static void | insert(Any a, DynUnion that)
      static DynUnion | narrow(Object obj)
      static DynUnion | read(InputStream istream)
      static TypeCode | type()
      static DynUnion | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynUnion value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynUnionHelper

        public DynUnionHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynUnion that)

      • extract

        public static DynUnion extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynUnion read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynUnion value)

      • narrow

        public static DynUnion narrow(Object obj)

      • unchecked_narrow

        public static DynUnion unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynUnionOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynUnionOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynUnion
    All Known Implementing Classes:
    _DynUnionStub

    public interface DynUnionOperations
extends DynAnyOperations
    DynUnion objects support the manipulation of IDL unions. A union can have only two valid current positions:
    • zero, which denotes the discriminator
    • one, which denotes the active member
    The component_count value for a union depends on the current discriminator: it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TCKind discriminator_kind()
      Returns the TCKind value of the discriminators TypeCode.
      DynAny get_discriminator()
      Returns the current discriminator value.
      boolean has_no_active_member()
      Returns true if the union has no active member, that is, the unions value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label.
      TCKind member_kind()
      Returns the TCKind value of the currently active members TypeCode.
      String member_name()
      Returns the name of the currently active member.
      DynAny member()
      Returns the currently active member.
      void set_discriminator(DynAny d)
      Sets the discriminator of the DynUnion to the specified value.
      void set_to_default_member()
      Sets the discriminator to a value that is consistent with the value of the default case of a union.
      void set_to_no_active_member()
      Sets the discriminator to a value that does not correspond to any of the unions case labels.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_discriminator

        DynAny get_discriminator()
        Returns the current discriminator value.

      • set_discriminator

        void set_discriminator(DynAny d)
                throws TypeMismatch
        Sets the discriminator of the DynUnion to the specified value. Setting the discriminator to a value that is consistent with the currently active union member does not affect the currently active member. Setting the discriminator to a value that is inconsistent with the currently active member deactivates the member and activates the member that is consistent with the new discriminator value (if there is a member for that value) by initializing the member to its default value. Setting the discriminator of a union sets the current position to 0 if the discriminator value indicates a non-existent union member (has_no_active_member returns true in this case). Otherwise, if the discriminator value indicates a named union member, the current position is set to 1 (has_no_active_member returns false and component_count returns 2 in this case).
        Throws:
        TypeMismatch - if the TypeCode of the parameter is not equivalent to the TypeCode of the union's discriminator

      • set_to_default_member

        void set_to_default_member()
                    throws TypeMismatch
        Sets the discriminator to a value that is consistent with the value of the default case of a union. It sets the current position to zero and causes component_count to return 2.
        Throws:
        TypeMismatch - if the union does not have an explicit default case

      • set_to_no_active_member

        void set_to_no_active_member()
                      throws TypeMismatch
        Sets the discriminator to a value that does not correspond to any of the unions case labels. It sets the current position to zero and causes component_count to return 1.
        Throws:
        TypeMismatch - if the union has an explicit default case or if it uses the entire range of discriminator values for explicit case labels

      • has_no_active_member

        boolean has_no_active_member()
        Returns true if the union has no active member, that is, the unions value consists solely of its discriminator because the discriminator has a value that is not listed as an explicit case label. Calling this operation on a union that has a default case returns false. Calling this operation on a union that uses the entire range of discriminator values for explicit case labels returns false.

      • discriminator_kind

        TCKind discriminator_kind()
        Returns the TCKind value of the discriminators TypeCode.

      • member_kind

        TCKind member_kind()
            throws InvalidValue
        Returns the TCKind value of the currently active members TypeCode.
        Throws:
        InvalidValue - if the union does not have a currently active member

      • member

        DynAny member()
       throws InvalidValue
        Returns the currently active member. Note that the returned reference remains valid only for as long as the currently active member does not change. Using the returned reference beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
        Throws:
        InvalidValue - if the union has no active member

      • member_name

        String member_name()
            throws InvalidValue
        Returns the name of the currently active member. If the unions TypeCode does not contain a member name for the currently active member, the operation returns an empty string.
        Throws:
        InvalidValue - if the union has no active member
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueBoxOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValueBoxOperations

  • All Superinterfaces:
    DynAnyOperations, DynValueCommonOperations
    All Known Subinterfaces:
    DynValueBox

    public interface DynValueBoxOperations
extends DynValueCommonOperations
    DynValueBox objects support the manipulation of IDL boxed value types. The DynValueBox interface can represent both null and non-null value types. For a DynValueBox representing a non-null value type, the DynValueBox has a single component of the boxed type. A DynValueBox representing a null value type has no components and a current position of -1.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DynAny get_boxed_value_as_dyn_any()
      Returns the boxed value as a DynAny.
      Any get_boxed_value()
      Returns the boxed value as an Any.
      void set_boxed_value_as_dyn_any(DynAny boxed)
      Replaces the boxed value with the value contained in the parameter.
      void set_boxed_value(Any boxed)
      Replaces the boxed value with the specified value.

      • Methods inherited from interface org.omg.DynamicAny.DynValueCommonOperations

        is_null, set_to_null, set_to_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • get_boxed_value

        Any get_boxed_value()
             throws InvalidValue
        Returns the boxed value as an Any.
        Throws:
        InvalidValue - if this object represents a null value box type

      • set_boxed_value

        void set_boxed_value(Any boxed)
              throws TypeMismatch
        Replaces the boxed value with the specified value. If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
        Throws:
        TypeMismatch - if this object represents a non-null value box type and the type of the parameter is not matching the current boxed value type.

      • get_boxed_value_as_dyn_any

        DynAny get_boxed_value_as_dyn_any()
                           throws InvalidValue
        Returns the boxed value as a DynAny.
        Throws:
        InvalidValue - if this object represents a null value box type

      • set_boxed_value_as_dyn_any

        void set_boxed_value_as_dyn_any(DynAny boxed)
                         throws TypeMismatch
        Replaces the boxed value with the value contained in the parameter. If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
        Throws:
        TypeMismatch - if this object represents a non-null value box type and the type of the parameter is not matching the current boxed value type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueCommonOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValueCommonOperations

  • All Superinterfaces:
    DynAnyOperations
    All Known Subinterfaces:
    DynValue, DynValueBox, DynValueBoxOperations, DynValueCommon, DynValueOperations
    All Known Implementing Classes:
    _DynValueStub

    public interface DynValueCommonOperations
extends DynAnyOperations
    DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean is_null()
      Returns true if the DynValueCommon represents a null value type.
      void set_to_null()
      Changes the representation of a DynValueCommon to a null value type.
      void set_to_value()
      Replaces a null value type with a newly constructed value.

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • is_null

        boolean is_null()
        Returns true if the DynValueCommon represents a null value type.

      • set_to_null

        void set_to_null()
        Changes the representation of a DynValueCommon to a null value type.

      • set_to_value

        void set_to_value()
        Replaces a null value type with a newly constructed value. Its components are initialized to default values as in DynAnyFactory.create_dyn_any_from_type_code. If the DynValueCommon represents a non-null value type, then this operation has no effect.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class DynValueHelper

  • java.lang.Object
    • org.omg.DynamicAny.DynValueHelper

  • public abstract class DynValueHelper
extends Object
    DynValue objects support the manipulation of IDL non-boxed value types. The DynValue interface can represent both null and non-null value types. For a DynValue representing a non-null value type, the DynValue's components comprise the public and private members of the value type, including those inherited from concrete base value types, in the order of definition. A DynValue representing a null value type has no components and a current position of -1.

    Warning: Indiscriminantly changing the contents of private value type members can cause the value type implementation to break by violating internal constraints. Access to private members is provided to support such activities as ORB bridging and debugging and should not be used to arbitrarily violate the encapsulation of the value type.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynValueHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DynValue | extract(Any a)
      static String | id()
      static void | insert(Any a, DynValue that)
      static DynValue | narrow(Object obj)
      static DynValue | read(InputStream istream)
      static TypeCode | type()
      static DynValue | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, DynValue value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynValueHelper

        public DynValueHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DynValue that)

      • extract

        public static DynValue extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DynValue read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DynValue value)

      • narrow

        public static DynValue narrow(Object obj)

      • unchecked_narrow

        public static DynValue unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynValueOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Interface DynValueOperations

  • All Superinterfaces:
    DynAnyOperations, DynValueCommonOperations
    All Known Subinterfaces:
    DynValue
    All Known Implementing Classes:
    _DynValueStub

    public interface DynValueOperations
extends DynValueCommonOperations
    DynValue objects support the manipulation of IDL non-boxed value types. The DynValue interface can represent both null and non-null value types. For a DynValue representing a non-null value type, the DynValue's components comprise the public and private members of the value type, including those inherited from concrete base value types, in the order of definition. A DynValue representing a null value type has no components and a current position of -1.

    Warning: Indiscriminantly changing the contents of private value type members can cause the value type implementation to break by violating internal constraints. Access to private members is provided to support such activities as ORB bridging and debugging and should not be used to arbitrarily violate the encapsulation of the value type.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TCKind current_member_kind()
      Returns the TCKind associated with the member at the current position.
      String current_member_name()
      Returns the name of the member at the current position.
      NameDynAnyPair[] get_members_as_dyn_any()
      Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type.
      NameValuePair[] get_members()
      Returns a sequence of NameValuePairs describing the name and the value of each member in the value type.
      void set_members_as_dyn_any(NameDynAnyPair[] value)
      Initializes the value type's members from a sequence of NameDynAnyPairs.
      void set_members(NameValuePair[] value)
      Initializes the value type's members from a sequence of NameValuePairs.

      • Methods inherited from interface org.omg.DynamicAny.DynValueCommonOperations

        is_null, set_to_null, set_to_value

      • Methods inherited from interface org.omg.DynamicAny.DynAnyOperations

        assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

    • Method Detail

      • current_member_name

        String current_member_name()
                    throws TypeMismatch,
                           InvalidValue
        Returns the name of the member at the current position. This operation may return an empty string since the TypeCode of the value being manipulated may not contain the names of members.
        Throws:
        TypeMismatch - if the DynValue represents a null value type.
        InvalidValue - if the current position does not indicate a member

      • current_member_kind

        TCKind current_member_kind()
                    throws TypeMismatch,
                           InvalidValue
        Returns the TCKind associated with the member at the current position.
        Throws:
        TypeMismatch - if the DynValue represents a null value type.
        InvalidValue - if the current position does not indicate a member

      • get_members

        NameValuePair[] get_members()
                     throws InvalidValue
        Returns a sequence of NameValuePairs describing the name and the value of each member in the value type. The sequence contains members in the same order as the declaration order of members as indicated by the DynValue's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynValue's TypeCode does not contain member names.
        Throws:
        InvalidValue - if this object represents a null value type

      • set_members

        void set_members(NameValuePair[] value)
          throws TypeMismatch,
                 InvalidValue
        Initializes the value type's members from a sequence of NameValuePairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1. A null value type can be initialized to a non-null value type using this method.

        Members must appear in the NameValuePairs in the order in which they appear in the IDL specification of the value type as indicated by the DynValue's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynValue's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynValue's TypeCode

      • get_members_as_dyn_any

        NameDynAnyPair[] get_members_as_dyn_any()
                                 throws InvalidValue
        Returns a sequence of NameDynAnyPairs describing the name and the value of each member in the value type. The sequence contains members in the same order as the declaration order of members as indicated by the DynValue's TypeCode. The current position is not affected. The member names in the returned sequence will be empty strings if the DynValue's TypeCode does not contain member names.
        Throws:
        InvalidValue - if this object represents a null value type

      • set_members_as_dyn_any

        void set_members_as_dyn_any(NameDynAnyPair[] value)
                     throws TypeMismatch,
                            InvalidValue
        Initializes the value type's members from a sequence of NameDynAnyPairs. The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise, if an empty sequence is passed, the current position is set to -1. A null value type can be initialized to a non-null value type using this method.

        Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification of the value type as indicated by the DynValue's TypeCode or they must be empty strings. The operation makes no attempt to assign member values based on member names.

        Throws:
        TypeMismatch - if the member names supplied in the passed sequence do not match the corresponding member name in the DynValue's TypeCode and they are not empty strings
        InvalidValue - if the passed sequence has a number of elements that disagrees with the number of members as indicated by the DynValue's TypeCode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FieldNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class FieldNameHelper

  • java.lang.Object
    • org.omg.DynamicAny.FieldNameHelper

  • public abstract class FieldNameHelper
extends Object
    org/omg/DynamicAny/FieldNameHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      FieldNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • FieldNameHelper

        public FieldNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameDynAnyPair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameDynAnyPair

  • java.lang.Object
    • org.omg.DynamicAny.NameDynAnyPair
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NameDynAnyPair
extends Object
implements IDLEntity
    org/omg/DynamicAny/NameDynAnyPair.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String id
      The name associated with the DynAny.
      DynAny value
      The DynAny value associated with the name.

    • Constructor Summary

      Constructors
      Constructor and Description
      NameDynAnyPair()
      NameDynAnyPair(String _id, DynAny _value)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • id

        public String id
        The name associated with the DynAny.

      • value

        public DynAny value
        The DynAny value associated with the name.

    • Constructor Detail

      • NameDynAnyPair

        public NameDynAnyPair()

      • NameDynAnyPair

        public NameDynAnyPair(String _id,
                      DynAny _value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameDynAnyPairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameDynAnyPairHelper

  • java.lang.Object
    • org.omg.DynamicAny.NameDynAnyPairHelper

  • public abstract class NameDynAnyPairHelper
extends Object
    org/omg/DynamicAny/NameDynAnyPairHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NameDynAnyPairHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameDynAnyPair | extract(Any a)
      static String | id()
      static void | insert(Any a, NameDynAnyPair that)
      static NameDynAnyPair | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameDynAnyPair value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameDynAnyPairHelper

        public NameDynAnyPairHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameDynAnyPair that)

      • extract

        public static NameDynAnyPair extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameDynAnyPair read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameDynAnyPair value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameDynAnyPairSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameDynAnyPairSeqHelper

  • java.lang.Object
    • org.omg.DynamicAny.NameDynAnyPairSeqHelper

  • public abstract class NameDynAnyPairSeqHelper
extends Object
    org/omg/DynamicAny/NameDynAnyPairSeqHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NameDynAnyPairSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameDynAnyPair[] | extract(Any a)
      static String | id()
      static void | insert(Any a, NameDynAnyPair[] that)
      static NameDynAnyPair[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameDynAnyPair[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameDynAnyPairSeqHelper

        public NameDynAnyPairSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameDynAnyPair[] that)

      • extract

        public static NameDynAnyPair[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameDynAnyPair[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameDynAnyPair[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameValuePair

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameValuePair

  • java.lang.Object
    • org.omg.DynamicAny.NameValuePair
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NameValuePair
extends Object
implements IDLEntity
    org/omg/DynamicAny/NameValuePair.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String id
      The name associated with the Any.
      Any value
      The Any value associated with the name.

    • Constructor Summary

      Constructors
      Constructor and Description
      NameValuePair()
      NameValuePair(String _id, Any _value)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • id

        public String id
        The name associated with the Any.

      • value

        public Any value
        The Any value associated with the name.

    • Constructor Detail

      • NameValuePair

        public NameValuePair()

      • NameValuePair

        public NameValuePair(String _id,
                     Any _value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameValuePairHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameValuePairHelper

  • java.lang.Object
    • org.omg.DynamicAny.NameValuePairHelper

  • public abstract class NameValuePairHelper
extends Object
    org/omg/DynamicAny/NameValuePairHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NameValuePairHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameValuePair | extract(Any a)
      static String | id()
      static void | insert(Any a, NameValuePair that)
      static NameValuePair | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameValuePair value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameValuePairHelper

        public NameValuePairHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameValuePair that)

      • extract

        public static NameValuePair extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameValuePair read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameValuePair value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameValuePairSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.DynamicAny

Class NameValuePairSeqHelper

  • java.lang.Object
    • org.omg.DynamicAny.NameValuePairSeqHelper

  • public abstract class NameValuePairSeqHelper
extends Object
    org/omg/DynamicAny/NameValuePairSeqHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NameValuePairSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NameValuePair[] | extract(Any a)
      static String | id()
      static void | insert(Any a, NameValuePair[] that)
      static NameValuePair[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NameValuePair[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NameValuePairSeqHelper

        public NameValuePairSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NameValuePair[] that)

      • extract

        public static NameValuePair[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NameValuePair[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NameValuePair[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IOP

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.IOP

This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

See: Description

  • Interface Summary
    Interface Description
    Codec
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
    CodecFactory
    Codecs are obtained from the CodecFactory.
    CodecFactoryOperations
    Codecs are obtained from the CodecFactory.
    CodecOperations
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
    CodeSets
    org/omg/IOP/CodeSets.java .
    ENCODING_CDR_ENCAPS
    org/omg/IOP/ENCODING_CDR_ENCAPS.java .
    ExceptionDetailMessage
    org/omg/IOP/ExceptionDetailMessage.java .
    RMICustomMaxStreamFormat
    org/omg/IOP/RMICustomMaxStreamFormat.java .
    TAG_ALTERNATE_IIOP_ADDRESS
    org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java .
    TAG_CODE_SETS
    org/omg/IOP/TAG_CODE_SETS.java .
    TAG_INTERNET_IOP
    org/omg/IOP/TAG_INTERNET_IOP.java .
    TAG_JAVA_CODEBASE
    org/omg/IOP/TAG_JAVA_CODEBASE.java .
    TAG_MULTIPLE_COMPONENTS
    org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java .
    TAG_ORB_TYPE
    org/omg/IOP/TAG_ORB_TYPE.java .
    TAG_POLICIES
    org/omg/IOP/TAG_POLICIES.java .
    TAG_RMI_CUSTOM_MAX_STREAM_FORMAT
    org/omg/IOP/TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.java .
    TransactionService
    org/omg/IOP/TransactionService.java .
  • Class Summary
    Class Description
    CodecFactoryHelper
    Codecs are obtained from the CodecFactory.
    ComponentIdHelper
    Standard way of representing multicomponent profiles.
    Encoding
    org/omg/IOP/Encoding.java .
    IOR
    org/omg/IOP/IOR.java .
    IORHelper
    org/omg/IOP/IORHelper.java .
    IORHolder
    org/omg/IOP/IORHolder.java .
    MultipleComponentProfileHelper
    An array of tagged components, forming a multiple component profile.
    MultipleComponentProfileHolder
    An array of tagged components, forming a multiple component profile.
    ProfileIdHelper
    Profile ID
    ServiceContext
    org/omg/IOP/ServiceContext.java .
    ServiceContextHelper
    org/omg/IOP/ServiceContextHelper.java .
    ServiceContextHolder
    org/omg/IOP/ServiceContextHolder.java .
    ServiceContextListHelper
    An array of service contexts, forming a service context list.
    ServiceContextListHolder
    An array of service contexts, forming a service context list.
    ServiceIdHelper
    A service id, represented as an int
    TaggedComponent
    org/omg/IOP/TaggedComponent.java .
    TaggedComponentHelper
    org/omg/IOP/TaggedComponentHelper.java .
    TaggedComponentHolder
    org/omg/IOP/TaggedComponentHolder.java .
    TaggedProfile
    org/omg/IOP/TaggedProfile.java .
    TaggedProfileHelper
    org/omg/IOP/TaggedProfileHelper.java .
    TaggedProfileHolder
    org/omg/IOP/TaggedProfileHolder.java .

Package org.omg.IOP Description

This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6. Please refer to that OMG specification for further details.

Please note that we do not provide all parts of the IOP module from the specification. We only provide those parts that are referenced as return values or parameter types in public APIs, most notably, Portable Interceptors.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Codec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface Codec

  • All Superinterfaces:
    CodecOperations, IDLEntity, Object, Serializable

    public interface Codec
extends CodecOperations, Object, IDLEntity
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types. The Codec provides a mechanism to transfer these components between their IDL data types and their CDR encapsulation representations.

    A Codec is obtained from the CodecFactory. The CodecFactory is obtained through a call to ORB.resolve_initial_references( "CodecFactory" ).

    • Method Summary

      • Methods inherited from interface org.omg.IOP.CodecOperations

        decode_value, decode, encode_value, encode

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface CodecFactory

  • All Superinterfaces:
    CodecFactoryOperations, IDLEntity, Object, Serializable

    public interface CodecFactory
extends CodecFactoryOperations, Object, IDLEntity
    Codecs are obtained from the CodecFactory. The CodecFactory is obtained through a call to ORB.resolve_initial_references( "CodecFactory" ).

    • Method Summary

      • Methods inherited from interface org.omg.IOP.CodecFactoryOperations

        create_codec

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.IOP Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.IOP

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.IOP.CodecFactoryHelper
    • org.omg.IOP.ComponentIdHelper
    • org.omg.IOP.Encoding (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.IOR (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.IORHelper
    • org.omg.IOP.IORHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.IOP.MultipleComponentProfileHelper
    • org.omg.IOP.MultipleComponentProfileHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.IOP.ProfileIdHelper
    • org.omg.IOP.ServiceContext (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.ServiceContextHelper
    • org.omg.IOP.ServiceContextHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.IOP.ServiceContextListHelper
    • org.omg.IOP.ServiceContextListHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.IOP.ServiceIdHelper
    • org.omg.IOP.TaggedComponent (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.TaggedComponentHelper
    • org.omg.IOP.TaggedComponentHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.IOP.TaggedProfile (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.TaggedProfileHelper
    • org.omg.IOP.TaggedProfileHolder (implements org.omg.CORBA.portable.Streamable)

Interface Hierarchy

  • org.omg.IOP.CodecFactoryOperations
    • org.omg.IOP.CodecFactory (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.IOP.CodecOperations
    • org.omg.IOP.Codec (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.IOP.CodeSets
  • org.omg.IOP.ENCODING_CDR_ENCAPS
  • org.omg.IOP.ExceptionDetailMessage
  • org.omg.CORBA.Object
    • org.omg.IOP.Codec (also extends org.omg.IOP.CodecOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.IOP.CodecFactory (also extends org.omg.IOP.CodecFactoryOperations, org.omg.CORBA.portable.IDLEntity)
  • org.omg.IOP.RMICustomMaxStreamFormat
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.IOP.Codec (also extends org.omg.IOP.CodecOperations, org.omg.CORBA.Object)
      • org.omg.IOP.CodecFactory (also extends org.omg.IOP.CodecFactoryOperations, org.omg.CORBA.Object)
  • org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS
  • org.omg.IOP.TAG_CODE_SETS
  • org.omg.IOP.TAG_INTERNET_IOP
  • org.omg.IOP.TAG_JAVA_CODEBASE
  • org.omg.IOP.TAG_MULTIPLE_COMPONENTS
  • org.omg.IOP.TAG_ORB_TYPE
  • org.omg.IOP.TAG_POLICIES
  • org.omg.IOP.TAG_RMI_CUSTOM_MAX_STREAM_FORMAT
  • org.omg.IOP.TransactionService
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.IOP

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.IOP

  • Packages that use org.omg.IOP
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
  • Classes in org.omg.IOP used by org.omg.IOP
    Class and Description
    Codec
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
    CodecFactory
    Codecs are obtained from the CodecFactory.
    CodecFactoryOperations
    Codecs are obtained from the CodecFactory.
    CodecOperations
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
    Encoding
    org/omg/IOP/Encoding.java .
    IOR
    org/omg/IOP/IOR.java .
    ServiceContext
    org/omg/IOP/ServiceContext.java .
    TaggedComponent
    org/omg/IOP/TaggedComponent.java .
    TaggedProfile
    org/omg/IOP/TaggedProfile.java .
  • Classes in org.omg.IOP used by org.omg.PortableInterceptor
    Class and Description
    CodecFactory
    Codecs are obtained from the CodecFactory.
    ServiceContext
    org/omg/IOP/ServiceContext.java .
    TaggedComponent
    org/omg/IOP/TaggedComponent.java .
    TaggedProfile
    org/omg/IOP/TaggedProfile.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecFactoryHelper

No usage of org.omg.IOP.CodecFactoryHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ComponentIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ComponentIdHelper

No usage of org.omg.IOP.ComponentIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.Encoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.Encoding

  • Packages that use Encoding
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

    • Uses of Encoding in org.omg.IOP

      Methods in org.omg.IOP with parameters of type Encoding
      Modifier and Type Method and Description
      Codec CodecFactoryOperations.create_codec(Encoding enc)
      Create a Codec of the given encoding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.IOR

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.IOR

  • Packages that use IOR
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

    • Uses of IOR in org.omg.IOP

      Fields in org.omg.IOP declared as IOR
      Modifier and Type | Field and Description
      IOR | IORHolder.value
      Methods in org.omg.IOP that return IOR
      Modifier and Type | Method and Description
      static IOR | IORHelper.extract(Any a)
      static IOR | IORHelper.read(InputStream istream)
      Methods in org.omg.IOP with parameters of type IOR
      Modifier and Type | Method and Description
      static void | IORHelper.insert(Any a, IOR that)
      static void | IORHelper.write(OutputStream ostream, IOR value)
      Constructors in org.omg.IOP with parameters of type IOR
      Constructor and Description
      IORHolder(IOR initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.IORHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.IORHelper

No usage of org.omg.IOP.IORHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.IORHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.IORHolder

No usage of org.omg.IOP.IORHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.MultipleComponentProfileHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.MultipleComponentProfileHelper

No usage of org.omg.IOP.MultipleComponentProfileHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.MultipleComponentProfileHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.MultipleComponentProfileHolder

No usage of org.omg.IOP.MultipleComponentProfileHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ProfileIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ProfileIdHelper

No usage of org.omg.IOP.ProfileIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceContext

  • Packages that use ServiceContext
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ServiceContext in org.omg.IOP

      Fields in org.omg.IOP declared as ServiceContext
      Modifier and Type | Field and Description
      ServiceContext | ServiceContextHolder.value
      ServiceContext[] | ServiceContextListHolder.value
      Methods in org.omg.IOP that return ServiceContext
      Modifier and Type | Method and Description
      static ServiceContext[] | ServiceContextListHelper.extract(Any a)
      static ServiceContext | ServiceContextHelper.extract(Any a)
      static ServiceContext[] | ServiceContextListHelper.read(InputStream istream)
      static ServiceContext | ServiceContextHelper.read(InputStream istream)
      Methods in org.omg.IOP with parameters of type ServiceContext
      Modifier and Type | Method and Description
      static void | ServiceContextHelper.insert(Any a, ServiceContext that)
      static void | ServiceContextListHelper.insert(Any a, ServiceContext[] that)
      static void | ServiceContextHelper.write(OutputStream ostream, ServiceContext value)
      static void | ServiceContextListHelper.write(OutputStream ostream, ServiceContext[] value)
      Constructors in org.omg.IOP with parameters of type ServiceContext
      Constructor and Description
      ServiceContextHolder(ServiceContext initialValue)
      ServiceContextListHolder(ServiceContext[] initialValue)

    • Uses of ServiceContext in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return ServiceContext
      Modifier and Type Method and Description
      ServiceContext RequestInfoOperations.get_reply_service_context(int id)
      Returns a copy of the service context with the given ID that is associated with the reply.
      ServiceContext RequestInfoOperations.get_request_service_context(int id)
      Returns a copy of the service context with the given ID that is associated with the request.
      Methods in org.omg.PortableInterceptor with parameters of type ServiceContext
      Modifier and Type Method and Description
      void ServerRequestInfoOperations.add_reply_service_context(ServiceContext service_context, boolean replace)
      Allows Interceptors to add service contexts to the request.
      void ClientRequestInfoOperations.add_request_service_context(ServiceContext service_context, boolean replace)
      Allows Interceptors to add service contexts to the request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceContextHelper

No usage of org.omg.IOP.ServiceContextHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceContextHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceContextHolder

No usage of org.omg.IOP.ServiceContextHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceContextListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceContextListHelper

No usage of org.omg.IOP.ServiceContextListHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceContextListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceContextListHolder

No usage of org.omg.IOP.ServiceContextListHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.ServiceIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.ServiceIdHelper

No usage of org.omg.IOP.ServiceIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedComponent

  • Packages that use TaggedComponent
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of TaggedComponent in org.omg.IOP

      Fields in org.omg.IOP declared as TaggedComponent
      Modifier and Type | Field and Description
      TaggedComponent | TaggedComponentHolder.value
      TaggedComponent[] | MultipleComponentProfileHolder.value
      Methods in org.omg.IOP that return TaggedComponent
      Modifier and Type | Method and Description
      static TaggedComponent | TaggedComponentHelper.extract(Any a)
      static TaggedComponent[] | MultipleComponentProfileHelper.extract(Any a)
      static TaggedComponent | TaggedComponentHelper.read(InputStream istream)
      static TaggedComponent[] | MultipleComponentProfileHelper.read(InputStream istream)
      Methods in org.omg.IOP with parameters of type TaggedComponent
      Modifier and Type | Method and Description
      static void | TaggedComponentHelper.insert(Any a, TaggedComponent that)
      static void | MultipleComponentProfileHelper.insert(Any a, TaggedComponent[] that)
      static void | TaggedComponentHelper.write(OutputStream ostream, TaggedComponent value)
      static void | MultipleComponentProfileHelper.write(OutputStream ostream, TaggedComponent[] value)
      Constructors in org.omg.IOP with parameters of type TaggedComponent
      Constructor and Description
      MultipleComponentProfileHolder(TaggedComponent[] initialValue)
      TaggedComponentHolder(TaggedComponent initialValue)

    • Uses of TaggedComponent in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return TaggedComponent
      Modifier and Type Method and Description
      TaggedComponent ClientRequestInfoOperations.get_effective_component(int id)
      Returns the IOP.TaggedComponent with the given ID from the profile selected for this request.
      TaggedComponent[] ClientRequestInfoOperations.get_effective_components(int id)
      Returns an array of all tagged components with the given ID from the profile selected for this request.
      Methods in org.omg.PortableInterceptor with parameters of type TaggedComponent
      Modifier and Type Method and Description
      void IORInfoOperations.add_ior_component_to_profile(TaggedComponent tagged_component, int profile_id)
      A portable ORB service implementation calls add_ior_component_to_profile from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.
      void IORInfoOperations.add_ior_component(TaggedComponent tagged_component)
      A portable ORB service implementation calls add_ior_component from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedComponentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedComponentHelper

No usage of org.omg.IOP.TaggedComponentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedComponentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedComponentHolder

No usage of org.omg.IOP.TaggedComponentHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedProfile

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedProfile

  • Packages that use TaggedProfile
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of TaggedProfile in org.omg.IOP

      Fields in org.omg.IOP declared as TaggedProfile
      Modifier and Type | Field and Description
      TaggedProfile[] IOR.profiles
      An array of tagged profiles associated with this object reference.
      TaggedProfile | TaggedProfileHolder.value
      Methods in org.omg.IOP that return TaggedProfile
      Modifier and Type | Method and Description
      static TaggedProfile | TaggedProfileHelper.extract(Any a)
      static TaggedProfile | TaggedProfileHelper.read(InputStream istream)
      Methods in org.omg.IOP with parameters of type TaggedProfile
      Modifier and Type | Method and Description
      static void | TaggedProfileHelper.insert(Any a, TaggedProfile that)
      static void | TaggedProfileHelper.write(OutputStream ostream, TaggedProfile value)
      Constructors in org.omg.IOP with parameters of type TaggedProfile
      Constructor and Description
      IOR(String _type_id, TaggedProfile[] _profiles)
      TaggedProfileHolder(TaggedProfile initialValue)

    • Uses of TaggedProfile in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return TaggedProfile
      Modifier and Type Method and Description
      TaggedProfile ClientRequestInfoOperations.effective_profile()
      Returns the profile that will be used to send the request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedProfileHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedProfileHelper

No usage of org.omg.IOP.TaggedProfileHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.TaggedProfileHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.TaggedProfileHolder

No usage of org.omg.IOP.TaggedProfileHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.Codec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.Codec

  • Packages that use Codec
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

    • Uses of Codec in org.omg.IOP

      Methods in org.omg.IOP that return Codec
      Modifier and Type Method and Description
      Codec CodecFactoryOperations.create_codec(Encoding enc)
      Create a Codec of the given encoding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.CodecFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.CodecFactory

  • Packages that use CodecFactory
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of CodecFactory in org.omg.IOP

      Methods in org.omg.IOP that return CodecFactory
      Modifier and Type | Method and Description
      static CodecFactory | CodecFactoryHelper.extract(Any a)
      static CodecFactory | CodecFactoryHelper.narrow(Object obj)
      static CodecFactory | CodecFactoryHelper.read(InputStream istream)
      static CodecFactory | CodecFactoryHelper.unchecked_narrow(Object obj)
      Methods in org.omg.IOP with parameters of type CodecFactory
      Modifier and Type | Method and Description
      static void | CodecFactoryHelper.insert(Any a, CodecFactory that)
      static void | CodecFactoryHelper.write(OutputStream ostream, CodecFactory value)

    • Uses of CodecFactory in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return CodecFactory
      Modifier and Type Method and Description
      CodecFactory ORBInitInfoOperations.codec_factory()
      Returns the IOP.CodecFactory.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.CodecFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.CodecFactoryOperations

  • Packages that use CodecFactoryOperations
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

    • Uses of CodecFactoryOperations in org.omg.IOP

      Subinterfaces of CodecFactoryOperations in org.omg.IOP
      Modifier and Type Interface and Description
      interface  CodecFactory
      Codecs are obtained from the CodecFactory.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.CodecOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.CodecOperations

  • Packages that use CodecOperations
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.

    • Uses of CodecOperations in org.omg.IOP

      Subinterfaces of CodecOperations in org.omg.IOP
      Modifier and Type Interface and Description
      interface  Codec
      The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.CodeSets

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.CodeSets

No usage of org.omg.IOP.CodeSets
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.ENCODING_CDR_ENCAPS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.ENCODING_CDR_ENCAPS

No usage of org.omg.IOP.ENCODING_CDR_ENCAPS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.ExceptionDetailMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.ExceptionDetailMessage

No usage of org.omg.IOP.ExceptionDetailMessage
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.RMICustomMaxStreamFormat

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.RMICustomMaxStreamFormat

No usage of org.omg.IOP.RMICustomMaxStreamFormat
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS

No usage of org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_CODE_SETS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_CODE_SETS

No usage of org.omg.IOP.TAG_CODE_SETS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_INTERNET_IOP

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_INTERNET_IOP

No usage of org.omg.IOP.TAG_INTERNET_IOP
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_JAVA_CODEBASE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_JAVA_CODEBASE

No usage of org.omg.IOP.TAG_JAVA_CODEBASE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_MULTIPLE_COMPONENTS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_MULTIPLE_COMPONENTS

No usage of org.omg.IOP.TAG_MULTIPLE_COMPONENTS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_ORB_TYPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_ORB_TYPE

No usage of org.omg.IOP.TAG_ORB_TYPE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_POLICIES

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_POLICIES

No usage of org.omg.IOP.TAG_POLICIES
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TAG_RMI_CUSTOM_MAX_STREAM_FORMAT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TAG_RMI_CUSTOM_MAX_STREAM_FORMAT

No usage of org.omg.IOP.TAG_RMI_CUSTOM_MAX_STREAM_FORMAT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.IOP.TransactionService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.IOP.TransactionService

No usage of org.omg.IOP.TransactionService
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class CodecFactoryHelper

  • java.lang.Object
    • org.omg.IOP.CodecFactoryHelper

  • public abstract class CodecFactoryHelper
extends Object
    Codecs are obtained from the CodecFactory. The CodecFactory is obtained through a call to ORB.resolve_initial_references( "CodecFactory" ).

    • Constructor Summary

      Constructors
      Constructor and Description
      CodecFactoryHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static CodecFactory | extract(Any a)
      static String | id()
      static void | insert(Any a, CodecFactory that)
      static CodecFactory | narrow(Object obj)
      static CodecFactory | read(InputStream istream)
      static TypeCode | type()
      static CodecFactory | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, CodecFactory value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CodecFactoryHelper

        public CodecFactoryHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          CodecFactory that)

      • extract

        public static CodecFactory extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static CodecFactory read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         CodecFactory value)

      • narrow

        public static CodecFactory narrow(Object obj)

      • unchecked_narrow

        public static CodecFactory unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface CodecFactoryOperations

  • All Known Subinterfaces:
    CodecFactory

    public interface CodecFactoryOperations
    Codecs are obtained from the CodecFactory. The CodecFactory is obtained through a call to ORB.resolve_initial_references( "CodecFactory" ).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Codec create_codec(Encoding enc)
      Create a Codec of the given encoding.

    • Method Detail

      • create_codec

        Codec create_codec(Encoding enc)
            throws UnknownEncoding
        Create a Codec of the given encoding.

        Parameters:
        enc - The encoding for which to create a Codec.
        Returns:
        A Codec obtained with the given encoding.
        Throws:
        UnknownEncoding - thrown if this factory cannot create a Codec of the given encoding.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecFactoryPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.IOP.CodecFactoryPackage

This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).

See: Description

  • Class Summary
    Class Description
    UnknownEncodingHelper
    org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java .
  • Exception Summary
    Exception Description
    UnknownEncoding
    org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java .

Package org.omg.IOP.CodecFactoryPackage Description

This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.IOP.CodecFactoryPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.IOP.CodecFactoryPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.IOP.CodecFactoryPackage.UnknownEncoding
    • org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.IOP.CodecFactoryPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.IOP.CodecFactoryPackage

  • Packages that use org.omg.IOP.CodecFactoryPackage
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).
  • Classes in org.omg.IOP.CodecFactoryPackage used by org.omg.IOP
    Class and Description
    UnknownEncoding
    org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java .
  • Classes in org.omg.IOP.CodecFactoryPackage used by org.omg.IOP.CodecFactoryPackage
    Class and Description
    UnknownEncoding
    org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecFactoryPackage.UnknownEncoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecFactoryPackage.UnknownEncoding

  • Packages that use UnknownEncoding
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecFactoryPackage
    This package contains the exceptions specified in the IOP::CodeFactory interface (as part of the Portable Interceptors spec).

    • Uses of UnknownEncoding in org.omg.IOP

      Methods in org.omg.IOP that throw UnknownEncoding
      Modifier and Type Method and Description
      Codec CodecFactoryOperations.create_codec(Encoding enc)
      Create a Codec of the given encoding.

    • Uses of UnknownEncoding in org.omg.IOP.CodecFactoryPackage

      Methods in org.omg.IOP.CodecFactoryPackage that return UnknownEncoding
      Modifier and Type | Method and Description
      static UnknownEncoding | UnknownEncodingHelper.extract(Any a)
      static UnknownEncoding | UnknownEncodingHelper.read(InputStream istream)
      Methods in org.omg.IOP.CodecFactoryPackage with parameters of type UnknownEncoding
      Modifier and Type | Method and Description
      static void | UnknownEncodingHelper.insert(Any a, UnknownEncoding that)
      static void | UnknownEncodingHelper.write(OutputStream ostream, UnknownEncoding value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper

No usage of org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownEncoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecFactoryPackage

Class UnknownEncoding

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.IOP.CodecFactoryPackage.UnknownEncoding
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class UnknownEncoding
extends UserException
    org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownEncoding()
      UnknownEncoding(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • UnknownEncoding

        public UnknownEncoding()

      • UnknownEncoding

        public UnknownEncoding(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownEncodingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecFactoryPackage

Class UnknownEncodingHelper

  • java.lang.Object
    • org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper

  • public abstract class UnknownEncodingHelper
extends Object
    org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      UnknownEncodingHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static UnknownEncoding | extract(Any a)
      static String | id()
      static void | insert(Any a, UnknownEncoding that)
      static UnknownEncoding | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, UnknownEncoding value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • UnknownEncodingHelper

        public UnknownEncodingHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          UnknownEncoding that)

      • extract

        public static UnknownEncoding extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static UnknownEncoding read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         UnknownEncoding value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface CodecOperations

  • All Known Subinterfaces:
    Codec

    public interface CodecOperations
    The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types. The Codec provides a mechanism to transfer these components between their IDL data types and their CDR encapsulation representations.

    A Codec is obtained from the CodecFactory. The CodecFactory is obtained through a call to ORB.resolve_initial_references( "CodecFactory" ).

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Any decode_value(byte[] data, TypeCode tc)
      Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.
      Any decode(byte[] data)
      Decodes the given byte array into an Any based on the encoding format effective for this Codec.
      byte[] encode_value(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.
      byte[] encode(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.

    • Method Detail

      • encode

        byte[] encode(Any data)
       throws InvalidTypeForEncoding
        Converts the given any into a byte array based on the encoding format effective for this Codec.
        Parameters:
        data - The data, in the form of an any, to be encoded into a byte array.
        Returns:
        A byte array containing the encoded Any. This byte array contains both the TypeCode and the data of the type.
        Throws:
        InvalidTypeForEncoding - thrown if the type is not valid for the encoding format effective for this Codec.

      • decode

        Any decode(byte[] data)
    throws FormatMismatch
        Decodes the given byte array into an Any based on the encoding format effective for this Codec.
        Parameters:
        data - The data, in the form of a byte array, to be decoded into an Any.
        Returns:
        An Any containing the data from the decoded byte array.
        Throws:
        FormatMismatch - is thrown if the byte array cannot be decoded into an Any.

      • encode_value

        byte[] encode_value(Any data)
             throws InvalidTypeForEncoding
        Converts the given any into a byte array based on the encoding format effective for this Codec. Only the data from the Any is encoded, not the TypeCode.
        Parameters:
        data - The data, in the form of an Any, to be encoded into a byte array.
        Returns:
        A byte array containing the data from the encoded any.
        Throws:
        InvalidTypeForEncoding - thrown if the type is not valid for the encoding format effective for this Codec.

      • decode_value

        Any decode_value(byte[] data,
                 TypeCode tc)
          throws FormatMismatch,
                 TypeMismatch
        Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.
        Parameters:
        data - The data, in the form of a byte array, to be decoded into an Any.
        tc - The TypeCode to be used to decode the data.
        Returns:
        An Any containing the data from the decoded byte array.
        Throws:
        FormatMismatch - thrown if the byte array cannot be decoded into an Any.
        TypeMismatch
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodecPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.IOP.CodecPackage

This package is generated from the IOP::Codec IDL interface definition.

See: Description

  • Class Summary
    Class Description
    FormatMismatchHelper
    org/omg/IOP/CodecPackage/FormatMismatchHelper.java .
    InvalidTypeForEncodingHelper
    org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java .
    TypeMismatchHelper
    org/omg/IOP/CodecPackage/TypeMismatchHelper.java .
  • Exception Summary
    Exception Description
    FormatMismatch
    org/omg/IOP/CodecPackage/FormatMismatch.java .
    InvalidTypeForEncoding
    org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java .
    TypeMismatch
    org/omg/IOP/CodecPackage/TypeMismatch.java .

Package org.omg.IOP.CodecPackage Description

This package is generated from the IOP::Codec IDL interface definition. It contains the Java representations of the IDL exceptions specified in IOP::Codec (as part of the Portable Interceptors specification). Please refer to that OMG specification for further details.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.IOP.CodecPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.IOP.CodecPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.IOP.CodecPackage.FormatMismatchHelper
    • org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.IOP.CodecPackage.FormatMismatch
          • org.omg.IOP.CodecPackage.InvalidTypeForEncoding
          • org.omg.IOP.CodecPackage.TypeMismatch
    • org.omg.IOP.CodecPackage.TypeMismatchHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.IOP.CodecPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.IOP.CodecPackage

  • Packages that use org.omg.IOP.CodecPackage
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.
  • Classes in org.omg.IOP.CodecPackage used by org.omg.IOP
    Class and Description
    FormatMismatch
    org/omg/IOP/CodecPackage/FormatMismatch.java .
    InvalidTypeForEncoding
    org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java .
    TypeMismatch
    org/omg/IOP/CodecPackage/TypeMismatch.java .
  • Classes in org.omg.IOP.CodecPackage used by org.omg.IOP.CodecPackage
    Class and Description
    FormatMismatch
    org/omg/IOP/CodecPackage/FormatMismatch.java .
    InvalidTypeForEncoding
    org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java .
    TypeMismatch
    org/omg/IOP/CodecPackage/TypeMismatch.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.FormatMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.FormatMismatch

  • Packages that use FormatMismatch
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.

    • Uses of FormatMismatch in org.omg.IOP

      Methods in org.omg.IOP that throw FormatMismatch
      Modifier and Type Method and Description
      Any CodecOperations.decode_value(byte[] data, TypeCode tc)
      Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.
      Any CodecOperations.decode(byte[] data)
      Decodes the given byte array into an Any based on the encoding format effective for this Codec.

    • Uses of FormatMismatch in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage that return FormatMismatch
      Modifier and Type | Method and Description
      static FormatMismatch | FormatMismatchHelper.extract(Any a)
      static FormatMismatch | FormatMismatchHelper.read(InputStream istream)
      Methods in org.omg.IOP.CodecPackage with parameters of type FormatMismatch
      Modifier and Type | Method and Description
      static void | FormatMismatchHelper.insert(Any a, FormatMismatch that)
      static void | FormatMismatchHelper.write(OutputStream ostream, FormatMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.FormatMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.FormatMismatchHelper

No usage of org.omg.IOP.CodecPackage.FormatMismatchHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.InvalidTypeForEncoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.InvalidTypeForEncoding

  • Packages that use InvalidTypeForEncoding
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.

    • Uses of InvalidTypeForEncoding in org.omg.IOP

      Methods in org.omg.IOP that throw InvalidTypeForEncoding
      Modifier and Type Method and Description
      byte[] CodecOperations.encode_value(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.
      byte[] CodecOperations.encode(Any data)
      Converts the given any into a byte array based on the encoding format effective for this Codec.

    • Uses of InvalidTypeForEncoding in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage that return InvalidTypeForEncoding
      Modifier and Type | Method and Description
      static InvalidTypeForEncoding | InvalidTypeForEncodingHelper.extract(Any a)
      static InvalidTypeForEncoding | InvalidTypeForEncodingHelper.read(InputStream istream)
      Methods in org.omg.IOP.CodecPackage with parameters of type InvalidTypeForEncoding
      Modifier and Type | Method and Description
      static void | InvalidTypeForEncodingHelper.insert(Any a, InvalidTypeForEncoding that)
      static void | InvalidTypeForEncodingHelper.write(OutputStream ostream, InvalidTypeForEncoding value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper

No usage of org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.TypeMismatch

  • Packages that use TypeMismatch
    Package Description
    org.omg.IOP
    This package contains the IOP module specified in the OMG document The Common Object Request Broker: Architecture and Specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07, section 13.6.
    org.omg.IOP.CodecPackage
    This package is generated from the IOP::Codec IDL interface definition.

    • Uses of TypeMismatch in org.omg.IOP

      Methods in org.omg.IOP that throw TypeMismatch
      Modifier and Type Method and Description
      Any CodecOperations.decode_value(byte[] data, TypeCode tc)
      Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.

    • Uses of TypeMismatch in org.omg.IOP.CodecPackage

      Methods in org.omg.IOP.CodecPackage that return TypeMismatch
      Modifier and Type | Method and Description
      static TypeMismatch | TypeMismatchHelper.extract(Any a)
      static TypeMismatch | TypeMismatchHelper.read(InputStream istream)
      Methods in org.omg.IOP.CodecPackage with parameters of type TypeMismatch
      Modifier and Type | Method and Description
      static void | TypeMismatchHelper.insert(Any a, TypeMismatch that)
      static void | TypeMismatchHelper.write(OutputStream ostream, TypeMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.IOP.CodecPackage.TypeMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.IOP.CodecPackage.TypeMismatchHelper

No usage of org.omg.IOP.CodecPackage.TypeMismatchHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FormatMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class FormatMismatch

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.IOP.CodecPackage.FormatMismatch
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class FormatMismatch
extends UserException
    org/omg/IOP/CodecPackage/FormatMismatch.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      FormatMismatch()
      FormatMismatch(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • FormatMismatch

        public FormatMismatch()

      • FormatMismatch

        public FormatMismatch(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


FormatMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class FormatMismatchHelper

  • java.lang.Object
    • org.omg.IOP.CodecPackage.FormatMismatchHelper

  • public abstract class FormatMismatchHelper
extends Object
    org/omg/IOP/CodecPackage/FormatMismatchHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      FormatMismatchHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static FormatMismatch | extract(Any a)
      static String | id()
      static void | insert(Any a, FormatMismatch that)
      static FormatMismatch | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, FormatMismatch value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • FormatMismatchHelper

        public FormatMismatchHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          FormatMismatch that)

      • extract

        public static FormatMismatch extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static FormatMismatch read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         FormatMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidTypeForEncoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class InvalidTypeForEncoding

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.IOP.CodecPackage.InvalidTypeForEncoding
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidTypeForEncoding
extends UserException
    org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidTypeForEncoding()
      InvalidTypeForEncoding(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidTypeForEncoding

        public InvalidTypeForEncoding()

      • InvalidTypeForEncoding

        public InvalidTypeForEncoding(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidTypeForEncodingHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class InvalidTypeForEncodingHelper

  • java.lang.Object
    • org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper

  • public abstract class InvalidTypeForEncodingHelper
extends Object
    org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidTypeForEncodingHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidTypeForEncoding | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidTypeForEncoding that)
      static InvalidTypeForEncoding | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidTypeForEncoding value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidTypeForEncodingHelper

        public InvalidTypeForEncodingHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidTypeForEncoding that)

      • extract

        public static InvalidTypeForEncoding extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidTypeForEncoding read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidTypeForEncoding value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeMismatch

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class TypeMismatch

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.IOP.CodecPackage.TypeMismatch
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class TypeMismatch
extends UserException
    org/omg/IOP/CodecPackage/TypeMismatch.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeMismatch()
      TypeMismatch(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TypeMismatch

        public TypeMismatch()

      • TypeMismatch

        public TypeMismatch(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeMismatchHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP.CodecPackage

Class TypeMismatchHelper

  • java.lang.Object
    • org.omg.IOP.CodecPackage.TypeMismatchHelper

  • public abstract class TypeMismatchHelper
extends Object
    org/omg/IOP/CodecPackage/TypeMismatchHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TypeMismatchHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static TypeMismatch | extract(Any a)
      static String | id()
      static void | insert(Any a, TypeMismatch that)
      static TypeMismatch | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, TypeMismatch value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TypeMismatchHelper

        public TypeMismatchHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          TypeMismatch that)

      • extract

        public static TypeMismatch extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static TypeMismatch read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         TypeMismatch value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CodeSets

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface CodeSets

  • public interface CodeSets
    org/omg/IOP/CodeSets.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Identifies a CDR encapsulation of the CONV_FRAME.CodeSetContext defined in Section 13.10.2.5, "GIOP Code Set Service Context," on page 13-43.

    • Field Detail

      • value

        static final int value
        Identifies a CDR encapsulation of the CONV_FRAME.CodeSetContext defined in Section 13.10.2.5, "GIOP Code Set Service Context," on page 13-43.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ComponentIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ComponentIdHelper

  • java.lang.Object
    • org.omg.IOP.ComponentIdHelper

  • public abstract class ComponentIdHelper
extends Object
    Standard way of representing multicomponent profiles. This would be encapsulated in a TaggedProfile.

    • Constructor Summary

      Constructors
      Constructor and Description
      ComponentIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int | extract(Any a)
      static String | id()
      static void | insert(Any a, int that)
      static int | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ComponentIdHelper

        public ComponentIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int that)

      • extract

        public static int extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Encoding

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class Encoding

  • java.lang.Object
    • org.omg.IOP.Encoding
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class Encoding
extends Object
implements IDLEntity
    org/omg/IOP/Encoding.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      short format
      The encoding format.
      byte major_version
      The major version of this Encoding format.
      byte minor_version
      The minor version of this Encoding format.

    • Constructor Summary

      Constructors
      Constructor and Description
      Encoding()
      Encoding(short _format, byte _major_version, byte _minor_version)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • format

        public short format
        The encoding format.

      • major_version

        public byte major_version
        The major version of this Encoding format.

      • minor_version

        public byte minor_version
        The minor version of this Encoding format.

    • Constructor Detail

      • Encoding

        public Encoding()

      • Encoding

        public Encoding(short _format,
                byte _major_version,
                byte _minor_version)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ENCODING_CDR_ENCAPS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface ENCODING_CDR_ENCAPS

  • public interface ENCODING_CDR_ENCAPS
    org/omg/IOP/ENCODING_CDR_ENCAPS.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      The CDR Encapsulation encoding.

    • Field Detail

      • value

        static final short value
        The CDR Encapsulation encoding.
        See Also:
        CodecFactory, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ExceptionDetailMessage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface ExceptionDetailMessage

  • public interface ExceptionDetailMessage
    org/omg/IOP/ExceptionDetailMessage.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      CORBA formal/02-06-01: 13.7.1: ExceptionDetailMessage identifies a CDR encapsulation of a wstring, encoded using GIOP 1.2 with a TCS-W of UTF-16.

    • Field Detail

      • value

        static final int value
        CORBA formal/02-06-01: 13.7.1: ExceptionDetailMessage identifies a CDR encapsulation of a wstring, encoded using GIOP 1.2 with a TCS-W of UTF-16. This service context may be sent on Reply messages with a reply_status of SYSTEM_EXCEPTION or USER_EXCEPTION. The usage of this service context is defined by language mappings.

        IDL/Java: ptc/02-01-22: 1.15.2: When a System Exception is marshaled, its GIOP Reply message shall include an associated ExceptionDetailMessage service context. The callee's stack trace is often very valuable debugging information but may contain sensitive or unwanted information. The wstring within the service context will therefore contain additional information relating to the exception, for example the result of calling either printStackTrace(PrintWriter) or getMessage() on the exception. When unmarshaling a System Exception on the client side, the wstring from any ExceptionDetailMessage service context shall become the Java error message in the unmarshaled exception object.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IOR

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class IOR

  • java.lang.Object
    • org.omg.IOP.IOR
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class IOR
extends Object
implements IDLEntity
    org/omg/IOP/IOR.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      TaggedProfile[] profiles
      An array of tagged profiles associated with this object reference.
      String type_id
      The type id, represented as a String.

    • Constructor Summary

      Constructors
      Constructor and Description
      IOR()
      IOR(String _type_id, TaggedProfile[] _profiles)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • type_id

        public String type_id
        The type id, represented as a String.

      • profiles

        public TaggedProfile[] profiles
        An array of tagged profiles associated with this object reference.

    • Constructor Detail

      • IOR

        public IOR()

      • IOR

        public IOR(String _type_id,
           TaggedProfile[] _profiles)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class IORHelper

  • java.lang.Object
    • org.omg.IOP.IORHelper

  • public abstract class IORHelper
extends Object
    org/omg/IOP/IORHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      IORHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static IOR | extract(Any a)
      static String | id()
      static void | insert(Any a, IOR that)
      static IOR | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, IOR value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • IORHelper

        public IORHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          IOR that)

      • extract

        public static IOR extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static IOR read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         IOR value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class IORHolder

  • java.lang.Object
    • org.omg.IOP.IORHolder
  • All Implemented Interfaces:
    Streamable

    public final class IORHolder
extends Object
implements Streamable
    org/omg/IOP/IORHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      IOR value

    • Constructor Summary

      Constructors
      Constructor and Description
      IORHolder()
      IORHolder(IOR initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public IOR value

    • Constructor Detail

      • IORHolder

        public IORHolder()

      • IORHolder

        public IORHolder(IOR initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MultipleComponentProfileHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class MultipleComponentProfileHelper

  • java.lang.Object
    • org.omg.IOP.MultipleComponentProfileHelper

  • public abstract class MultipleComponentProfileHelper
extends Object
    An array of tagged components, forming a multiple component profile.

    • Constructor Summary

      Constructors
      Constructor and Description
      MultipleComponentProfileHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static TaggedComponent[] | extract(Any a)
      static String | id()
      static void | insert(Any a, TaggedComponent[] that)
      static TaggedComponent[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, TaggedComponent[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • MultipleComponentProfileHelper

        public MultipleComponentProfileHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          TaggedComponent[] that)

      • extract

        public static TaggedComponent[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static TaggedComponent[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         TaggedComponent[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MultipleComponentProfileHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class MultipleComponentProfileHolder

  • java.lang.Object
    • org.omg.IOP.MultipleComponentProfileHolder
  • All Implemented Interfaces:
    Streamable

    public final class MultipleComponentProfileHolder
extends Object
implements Streamable
    An array of tagged components, forming a multiple component profile.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      TaggedComponent[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      MultipleComponentProfileHolder()
      MultipleComponentProfileHolder(TaggedComponent[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public TaggedComponent[] value

    • Constructor Detail

      • MultipleComponentProfileHolder

        public MultipleComponentProfileHolder()

      • MultipleComponentProfileHolder

        public MultipleComponentProfileHolder(TaggedComponent[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ProfileIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ProfileIdHelper

  • java.lang.Object
    • org.omg.IOP.ProfileIdHelper

  • public abstract class ProfileIdHelper
extends Object
    Profile ID

    • Constructor Summary

      Constructors
      Constructor and Description
      ProfileIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int | extract(Any a)
      static String | id()
      static void | insert(Any a, int that)
      static int | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ProfileIdHelper

        public ProfileIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int that)

      • extract

        public static int extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RMICustomMaxStreamFormat

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface RMICustomMaxStreamFormat

  • public interface RMICustomMaxStreamFormat
    org/omg/IOP/RMICustomMaxStreamFormat.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Identifies a CDR encapsulation of the RMICustomMaxStreamFormat service context which contains a single byte specifying the client's maximum RMI-IIOP stream format version.

    • Field Detail

      • value

        static final int value
        Identifies a CDR encapsulation of the RMICustomMaxStreamFormat service context which contains a single byte specifying the client's maximum RMI-IIOP stream format version. See Java to IDL ptc/02-01-12 1.4.12.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceContext

  • java.lang.Object
    • org.omg.IOP.ServiceContext
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ServiceContext
extends Object
implements IDLEntity
    org/omg/IOP/ServiceContext.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte[] context_data
      The data associated with this service context
      int context_id
      The service context id

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceContext()
      ServiceContext(int _context_id, byte[] _context_data)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • context_id

        public int context_id
        The service context id

      • context_data

        public byte[] context_data
        The data associated with this service context

    • Constructor Detail

      • ServiceContext

        public ServiceContext()

      • ServiceContext

        public ServiceContext(int _context_id,
                      byte[] _context_data)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceContextHelper

  • java.lang.Object
    • org.omg.IOP.ServiceContextHelper

  • public abstract class ServiceContextHelper
extends Object
    org/omg/IOP/ServiceContextHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceContextHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServiceContext | extract(Any a)
      static String | id()
      static void | insert(Any a, ServiceContext that)
      static ServiceContext | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ServiceContext value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceContextHelper

        public ServiceContextHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServiceContext that)

      • extract

        public static ServiceContext extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServiceContext read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServiceContext value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceContextHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceContextHolder

  • java.lang.Object
    • org.omg.IOP.ServiceContextHolder
  • All Implemented Interfaces:
    Streamable

    public final class ServiceContextHolder
extends Object
implements Streamable
    org/omg/IOP/ServiceContextHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ServiceContext value

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceContextHolder()
      ServiceContextHolder(ServiceContext initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ServiceContext value

    • Constructor Detail

      • ServiceContextHolder

        public ServiceContextHolder()

      • ServiceContextHolder

        public ServiceContextHolder(ServiceContext initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceContextListHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceContextListHelper

  • java.lang.Object
    • org.omg.IOP.ServiceContextListHelper

  • public abstract class ServiceContextListHelper
extends Object
    An array of service contexts, forming a service context list.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceContextListHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServiceContext[] | extract(Any a)
      static String | id()
      static void | insert(Any a, ServiceContext[] that)
      static ServiceContext[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ServiceContext[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceContextListHelper

        public ServiceContextListHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServiceContext[] that)

      • extract

        public static ServiceContext[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServiceContext[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServiceContext[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceContextListHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceContextListHolder

  • java.lang.Object
    • org.omg.IOP.ServiceContextListHolder
  • All Implemented Interfaces:
    Streamable

    public final class ServiceContextListHolder
extends Object
implements Streamable
    An array of service contexts, forming a service context list.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ServiceContext[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceContextListHolder()
      ServiceContextListHolder(ServiceContext[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ServiceContext[] value

    • Constructor Detail

      • ServiceContextListHolder

        public ServiceContextListHolder()

      • ServiceContextListHolder

        public ServiceContextListHolder(ServiceContext[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServiceIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class ServiceIdHelper

  • java.lang.Object
    • org.omg.IOP.ServiceIdHelper

  • public abstract class ServiceIdHelper
extends Object
    A service id, represented as an int

    • Constructor Summary

      Constructors
      Constructor and Description
      ServiceIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int | extract(Any a)
      static String | id()
      static void | insert(Any a, int that)
      static int | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServiceIdHelper

        public ServiceIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int that)

      • extract

        public static int extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedComponent

  • java.lang.Object
    • org.omg.IOP.TaggedComponent
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class TaggedComponent
extends Object
implements IDLEntity
    org/omg/IOP/TaggedComponent.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte[] component_data
      The component data associated with the component id.
      int tag
      The tag, represented as a component id.

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedComponent()
      TaggedComponent(int _tag, byte[] _component_data)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • tag

        public int tag
        The tag, represented as a component id.

      • component_data

        public byte[] component_data
        The component data associated with the component id.

    • Constructor Detail

      • TaggedComponent

        public TaggedComponent()

      • TaggedComponent

        public TaggedComponent(int _tag,
                       byte[] _component_data)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedComponentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedComponentHelper

  • java.lang.Object
    • org.omg.IOP.TaggedComponentHelper

  • public abstract class TaggedComponentHelper
extends Object
    org/omg/IOP/TaggedComponentHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedComponentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static TaggedComponent | extract(Any a)
      static String | id()
      static void | insert(Any a, TaggedComponent that)
      static TaggedComponent | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, TaggedComponent value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TaggedComponentHelper

        public TaggedComponentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          TaggedComponent that)

      • extract

        public static TaggedComponent extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static TaggedComponent read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         TaggedComponent value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedComponentHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedComponentHolder

  • java.lang.Object
    • org.omg.IOP.TaggedComponentHolder
  • All Implemented Interfaces:
    Streamable

    public final class TaggedComponentHolder
extends Object
implements Streamable
    org/omg/IOP/TaggedComponentHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      TaggedComponent value

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedComponentHolder()
      TaggedComponentHolder(TaggedComponent initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public TaggedComponent value

    • Constructor Detail

      • TaggedComponentHolder

        public TaggedComponentHolder()

      • TaggedComponentHolder

        public TaggedComponentHolder(TaggedComponent initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedProfile

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedProfile

  • java.lang.Object
    • org.omg.IOP.TaggedProfile
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class TaggedProfile
extends Object
implements IDLEntity
    org/omg/IOP/TaggedProfile.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte[] profile_data
      The associated profile data.
      int tag
      The tag, represented as a profile id.

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedProfile()
      TaggedProfile(int _tag, byte[] _profile_data)

    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • tag

        public int tag
        The tag, represented as a profile id.

      • profile_data

        public byte[] profile_data
        The associated profile data.

    • Constructor Detail

      • TaggedProfile

        public TaggedProfile()

      • TaggedProfile

        public TaggedProfile(int _tag,
                     byte[] _profile_data)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedProfileHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedProfileHelper

  • java.lang.Object
    • org.omg.IOP.TaggedProfileHelper

  • public abstract class TaggedProfileHelper
extends Object
    org/omg/IOP/TaggedProfileHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedProfileHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static TaggedProfile | extract(Any a)
      static String | id()
      static void | insert(Any a, TaggedProfile that)
      static TaggedProfile | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, TaggedProfile value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TaggedProfileHelper

        public TaggedProfileHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          TaggedProfile that)

      • extract

        public static TaggedProfile extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static TaggedProfile read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         TaggedProfile value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TaggedProfileHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Class TaggedProfileHolder

  • java.lang.Object
    • org.omg.IOP.TaggedProfileHolder
  • All Implemented Interfaces:
    Streamable

    public final class TaggedProfileHolder
extends Object
implements Streamable
    org/omg/IOP/TaggedProfileHolder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      TaggedProfile value

    • Constructor Summary

      Constructors
      Constructor and Description
      TaggedProfileHolder()
      TaggedProfileHolder(TaggedProfile initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public TaggedProfile value

    • Constructor Detail

      • TaggedProfileHolder

        public TaggedProfileHolder()

      • TaggedProfileHolder

        public TaggedProfileHolder(TaggedProfile initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_ALTERNATE_IIOP_ADDRESS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_ALTERNATE_IIOP_ADDRESS

  • public interface TAG_ALTERNATE_IIOP_ADDRESS
    org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      In cases where the same object key is used for more than one internet location, the following standard IOR Component is defined for support in IIOP version 1.2.

    • Field Detail

      • value

        static final int value
        In cases where the same object key is used for more than one internet location, the following standard IOR Component is defined for support in IIOP version 1.2.

        The TAG_ALTERNATE_IIOP_ADDRESS component has an associated value of type:

             struct {
         string HostID,
         short Port
     };
        encoded as a CDR encapsulation.

        Zero or more instances of the TAG_ALTERNATE_IIOP_ADDRESS component type may be included in a version 1.2 TAG_INTERNET_IOP Profile. Each of these alternative addresses may be used by the client orb, in addition to the host and port address expressed in the body of the Profile. In cases where one or more TAG_ALTERNATE_IIOP_ADDRESS components are present in a TAG_INTERNET_IOP Profile, no order of use is prescribed by Version 1.2 of IIOP.

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_CODE_SETS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_CODE_SETS

  • public interface TAG_CODE_SETS
    org/omg/IOP/TAG_CODE_SETS.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The code set component of the IOR multi-component profile structure contains: server's native char code set and conversion code sets, and server's native wchar code set and conversion code sets. Both char and wchar conversion code sets are listed in order of preference.

    • Field Detail

      • value

        static final int value
        The code set component of the IOR multi-component profile structure contains:
        • server's native char code set and conversion code sets, and
        • server's native wchar code set and conversion code sets.
        Both char and wchar conversion code sets are listed in order of preference.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_INTERNET_IOP

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_INTERNET_IOP

  • public interface TAG_INTERNET_IOP
    org/omg/IOP/TAG_INTERNET_IOP.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Identifies profiles that support the Internet Inter-ORB Protocol.

    • Field Detail

      • value

        static final int value
        Identifies profiles that support the Internet Inter-ORB Protocol. The ProfileBody of this profile contains a CDR encapsulation of a structure containing addressing and object identification information used by IIOP. Version 1.1 of the TAG_INTERNET_IOP profile also includes an array of TaggedComponent objects that can contain additional information supporting optional IIOP features, ORB services such as security, and future protocol extensions.

        Protocols other than IIOP (such as ESIOPs and other GIOPs) can share profile information (such as object identity or security information) with IIOP by encoding their additional profile information as components in the TAG_INTERNET_IOP profile. All TAG_INTERNET_IOP profiles support IIOP, regardless of whether they also support additional protocols. Interoperable ORBs are not required to create or understand any other profile, nor are they required to create or understand any of the components defined for other protocols that might share the TAG_INTERNET_IOP profile with IIOP.

        The profile_data for the TAG_INTERNET_IOP profile is a CDR encapsulation of the IIOP.ProfileBody_1_1 type.

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_JAVA_CODEBASE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_JAVA_CODEBASE

  • public interface TAG_JAVA_CODEBASE
    org/omg/IOP/TAG_JAVA_CODEBASE.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Class downloading is supported for stubs, ties, values, and value helpers.

    • Field Detail

      • value

        static final int value
        Class downloading is supported for stubs, ties, values, and value helpers. The specification allows transmission of codebase information on the wire for stubs and ties, and enables usage of pre-existing ClassLoaders when relevant.

        For values and value helpers, the codebase is transmitted after the value tag. For stubs and ties, the codebase is transmitted as the TaggedComponent TAG_JAVA_CODEBASE in the IOR profile, where the component_data is a CDR encapsulation of the codebase written as an IDL string. The codebase is a space-separated list of one or more URLs.

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_MULTIPLE_COMPONENTS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_MULTIPLE_COMPONENTS

  • public interface TAG_MULTIPLE_COMPONENTS
    org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Indicates that the value encapsulated is of type MultipleComponentProfile.

    • Field Detail

      • value

        static final int value
        Indicates that the value encapsulated is of type MultipleComponentProfile. In this case, the profile consists of a list of protocol components, the use of which must be specified by the protocol using this profile. This profile may be used to carry IOR components.

        The profile_data for the TAG_MULTIPLE_COMPONENTS profile is a CDR encapsulation of the MultipleComponentProfile type shown above.

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_ORB_TYPE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_ORB_TYPE

  • public interface TAG_ORB_TYPE
    org/omg/IOP/TAG_ORB_TYPE.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      It is often useful in the real world to be able to identify the particular kind of ORB an object reference is coming from, to work around problems with that particular ORB, or exploit shared efficiencies.

    • Field Detail

      • value

        static final int value
        It is often useful in the real world to be able to identify the particular kind of ORB an object reference is coming from, to work around problems with that particular ORB, or exploit shared efficiencies.

        The TAG_ORB_TYPE component has an associated value of type unsigned long (Java long), encoded as a CDR encapsulation, designating an ORB type ID allocated by the OMG for the ORB type of the originating ORB. Anyone may register any ORB types by submitting a short (one-paragraph) description of the ORB type to the OMG, and will receive a new ORB type ID in return. A list of ORB type descriptions and values will be made available on the OMG web server.

        The TAG_ORB_TYPE component can appear at most once in any IOR profile. For profiles supporting IIOP 1.1 or greater, it is optionally present.

        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_POLICIES

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_POLICIES

  • public interface TAG_POLICIES
    org/omg/IOP/TAG_POLICIES.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      A profile component containing the sequence of QoS policies exported with the object reference by an object adapter.

    • Field Detail

      • value

        static final int value
        A profile component containing the sequence of QoS policies exported with the object reference by an object adapter.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TAG_RMI_CUSTOM_MAX_STREAM_FORMAT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TAG_RMI_CUSTOM_MAX_STREAM_FORMAT

  • public interface TAG_RMI_CUSTOM_MAX_STREAM_FORMAT
    org/omg/IOP/TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      RMI-IIOP has multiple stream format versions.

    • Field Detail

      • value

        static final int value
        RMI-IIOP has multiple stream format versions. A server can specify its maximum version by including the TAG_RMI_CUSTOM_MAX_STREAM_FORMAT tagged component or rely on the default of version 1 for GIOP 1.2 and less and version 2 for GIOP 1.3 and higher. See Java to IDL ptc/02-01-12 1.4.11.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TransactionService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.IOP

Interface TransactionService

  • public interface TransactionService
    org/omg/IOP/TransactionService.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      Identifies a CDR encapsulation of the CosTSInteroperation.PropogationContext defined in CORBAservices: Common Object Services Specifications.

    • Field Detail

      • value

        static final int value
        Identifies a CDR encapsulation of the CosTSInteroperation.PropogationContext defined in CORBAservices: Common Object Services Specifications.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Messaging

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.Messaging

This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07.

See: Description

  • Interface Summary
    Interface Description
    SYNC_WITH_TRANSPORT
    org/omg/Messaging/SYNC_WITH_TRANSPORT.java .
  • Class Summary
    Class Description
    SyncScopeHelper
    Synchronization scope

Package org.omg.Messaging Description

This package contains the Messaging module specified in the OMG CORBA Messaging specification, http://cgi.omg.org/cgi-bin/doc?formal/99-10-07. Please refer to that OMG specification for further details.

Please note that we do not provide all parts of the Messaging module from the specification. We only provide those parts that are referenced as return values or parameter types in public APIs, most notably, Portable Interceptors.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.Messaging Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.Messaging

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.Messaging.SyncScopeHelper

Interface Hierarchy

  • org.omg.Messaging.SYNC_WITH_TRANSPORT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.Messaging

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.Messaging

No usage of org.omg.Messaging
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.Messaging.SyncScopeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.Messaging.SyncScopeHelper

No usage of org.omg.Messaging.SyncScopeHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.Messaging.SYNC_WITH_TRANSPORT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.Messaging.SYNC_WITH_TRANSPORT

No usage of org.omg.Messaging.SYNC_WITH_TRANSPORT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SyncScopeHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.Messaging

Class SyncScopeHelper

  • java.lang.Object
    • org.omg.Messaging.SyncScopeHelper

  • public abstract class SyncScopeHelper
extends Object
    Synchronization scope

    • Constructor Summary

      Constructors
      Constructor and Description
      SyncScopeHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short | extract(Any a)
      static String | id()
      static void | insert(Any a, short that)
      static short | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • SyncScopeHelper

        public SyncScopeHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short that)

      • extract

        public static short extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SYNC_WITH_TRANSPORT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.Messaging

Interface SYNC_WITH_TRANSPORT

  • public interface SYNC_WITH_TRANSPORT
    org/omg/Messaging/SYNC_WITH_TRANSPORT.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Messaging.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Constant, defined in the Messaging spec, to define how far the request shall progress before control is returned to the client.

    • Field Detail

      • value

        static final short value
        Constant, defined in the Messaging spec, to define how far the request shall progress before control is returned to the client.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PortableInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableInterceptor

Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

See: Description

  • Interface Summary
    Interface Description
    ACTIVE
    org/omg/PortableInterceptor/ACTIVE.java .
    ClientRequestInfo
    Request Information, accessible to client-side request interceptors.
    ClientRequestInfoOperations
    Request Information, accessible to client-side request interceptors.
    ClientRequestInterceptor
    Client-side request interceptor.
    ClientRequestInterceptorOperations
    Client-side request interceptor.
    Current
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
    CurrentOperations
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
    DISCARDING
    org/omg/PortableInterceptor/DISCARDING.java .
    HOLDING
    org/omg/PortableInterceptor/HOLDING.java .
    INACTIVE
    org/omg/PortableInterceptor/INACTIVE.java .
    Interceptor
    All Portable Interceptors implement Interceptor.
    InterceptorOperations
    All Portable Interceptors implement Interceptor.
    IORInfo
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
    IORInfoOperations
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
    IORInterceptor
    Interceptor used to establish tagged components in the profiles within an IOR.
    IORInterceptor_3_0
    org/omg/PortableInterceptor/IORInterceptor_3_0.java .
    IORInterceptor_3_0Operations
    org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java .
    IORInterceptorOperations
    Interceptor used to establish tagged components in the profiles within an IOR.
    LOCATION_FORWARD
    org/omg/PortableInterceptor/LOCATION_FORWARD.java .
    NON_EXISTENT
    org/omg/PortableInterceptor/NON_EXISTENT.java .
    ObjectReferenceFactory
    The object reference factory.
    ObjectReferenceTemplate
    The object reference template.
    ORBInitializer
    Facilitates interceptor registration and ORB initialization.
    ORBInitializerOperations
    Facilitates interceptor registration and ORB initialization.
    ORBInitInfo
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
    ORBInitInfoOperations
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
    PolicyFactory
    Enables policy types to be constructed using CORBA.ORB.create_policy.
    PolicyFactoryOperations
    Enables policy types to be constructed using CORBA.ORB.create_policy.
    RequestInfo
    Request Information, accessible to Interceptors.
    RequestInfoOperations
    Request Information, accessible to Interceptors.
    ServerRequestInfo
    Request Information, accessible to server-side request interceptors.
    ServerRequestInfoOperations
    Request Information, accessible to server-side request interceptors.
    ServerRequestInterceptor
    Server-side request interceptor.
    ServerRequestInterceptorOperations
    Server-side request interceptor.
    SUCCESSFUL
    org/omg/PortableInterceptor/SUCCESSFUL.java .
    SYSTEM_EXCEPTION
    org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java .
    TRANSPORT_RETRY
    org/omg/PortableInterceptor/TRANSPORT_RETRY.java .
    UNKNOWN
    org/omg/PortableInterceptor/UNKNOWN.java .
    USER_EXCEPTION
    org/omg/PortableInterceptor/USER_EXCEPTION.java .
  • Class Summary
    Class Description
    AdapterManagerIdHelper
    Adapter manager identifier.
    AdapterNameHelper
    The name of an object adapter.
    AdapterStateHelper
    Type of object adapter state.
    CurrentHelper
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
    ForwardRequestHelper
    org/omg/PortableInterceptor/ForwardRequestHelper.java .
    InvalidSlotHelper
    org/omg/PortableInterceptor/InvalidSlotHelper.java .
    IORInterceptor_3_0Helper
    org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java .
    IORInterceptor_3_0Holder
    org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java .
    ObjectIdHelper
    Type of an object id.
    ObjectReferenceFactoryHelper
    The object reference factory.
    ObjectReferenceFactoryHolder
    The object reference factory.
    ObjectReferenceTemplateHelper
    The object reference template.
    ObjectReferenceTemplateHolder
    The object reference template.
    ObjectReferenceTemplateSeqHelper
    Sequence of object reference templates is used for reporting state changes that do not occur on the adapter manager.
    ObjectReferenceTemplateSeqHolder
    Sequence of object reference templates is used for reporting state changes that do not occur on the adapter manager.
    ORBIdHelper
    org/omg/PortableInterceptor/ORBIdHelper.java .
    ServerIdHelper
    org/omg/PortableInterceptor/ServerIdHelper.java .
  • Exception Summary
    Exception Description
    ForwardRequest
    org/omg/PortableInterceptor/ForwardRequest.java .
    InvalidSlot
    org/omg/PortableInterceptor/InvalidSlot.java .

Package org.omg.PortableInterceptor Description

Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

Interceptor Types

There are currently three types of interceptors that can be registered:
  • IORInterceptor - Used to establish tagged components in the profiles within an IOR.
  • ClientRequestInterceptor - Intercepts the flow of a request/reply sequence through the ORB on the client side.
  • ServerRequestInterceptor - Intercepts the flow of a request/reply sequence through the ORB on the server side.
See the javadocs for class ORBInitializer for how to go about registering interceptors.

Known limitations / unimplemented methods in package org.omg.PortableInterceptor

  • RequestInfo
    • sync_scope(): Always returns SYNC_WITH_TRANSPORT
    • arguments(): Only supported for DII/DSI calls
    • exceptions(): Only supported for DII calls on client side. Not supported on server-side.
    • contexts(): Only supported for DII calls on client side. Not supported on server-side since our ORB does not send contexts.
    • operation_context(): Only supported for DII calls on client side. Not supported on server-side since ORB does not send contexts.
    • result(): Only supported for DII/DSI calls
  • ClientRequestInfo
    • received_exception_id(): Always returns null in the DII case
    • get_request_policy(int type): Not implemented.
  • ServerRequestInfo
    • sending_exception(): Does not support user exceptions on the server side in non-DSI case.

Package Specification

For a precise list of supported sections of official OMG specifications with which the Java[tm] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in Java SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ClientRequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ClientRequestInfo

  • All Superinterfaces:
    ClientRequestInfoOperations, IDLEntity, Object, RequestInfo, RequestInfoOperations, Serializable

    public interface ClientRequestInfo
extends ClientRequestInfoOperations, RequestInfo, IDLEntity
    Request Information, accessible to client-side request interceptors.

    Some attributes and operations on ClientRequestInfo are not valid at all interception points. The following table shows the validity of each attribute or operation. If it is not valid, attempting to access it will result in a BAD_INV_ORDER being thrown with a standard minor code of 14.

    send_request send_poll receive_reply receive_exception receive_other
    Inherited from RequestInfo:

    request_id

             yes yes yes yes yes

    operation

             yes yes yes yes yes

    arguments

             yes1 no yes no no

    exceptions

             yes no yes yes yes

    contexts

             yes no yes yes yes

    operation_context

             yes no yes yes yes

    result

             no no yes no no

    response_expected

             yes yes yes yes yes

    sync_scope

             yes no yes yes yes

    reply_status

             no no yes yes yes

    forward_reference

             no no no no yes2

    get_slot

             yes yes yes yes yes

    get_request_service_context

             yes no yes yes yes

    get_reply_service_context

             no no yes yes yes
    ClientRequestInfo-specific:

    target

             yes yes yes yes yes

    effective_target

             yes yes yes yes yes

    effective_profile

             yes yes yes yes yes

    received_exception

             no no no yes no

    received_exception_id

             no no no yes no

    get_effective_component

             yes no yes yes yes

    get_effective_components

             yes no yes yes yes

    get_request_policy

             yes no yes yes yes

    add_request_service_context

             yes no no no no

    1. When ClientRequestInfo is passed to send_request, there is an entry in the list for every argument, whether in, inout, or out. But only the in and inout arguments will be available.
    2. If the reply_status atribute is not LOCATION_FORWARD, accessing this attribute will throw BAD_INV_ORDER with a standard minor code of 14.
    See Also:
    ClientRequestInterceptor

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ClientRequestInfoOperations

        add_request_service_context, effective_profile, effective_target, get_effective_component, get_effective_components, get_request_policy, received_exception_id, received_exception, target

      • Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations

        arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ClientRequestInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ClientRequestInterceptor

  • All Superinterfaces:
    ClientRequestInterceptorOperations, IDLEntity, Interceptor, InterceptorOperations, Object, Serializable

    public interface ClientRequestInterceptor
extends ClientRequestInterceptorOperations, Interceptor, IDLEntity
    Client-side request interceptor.

    A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers. There are two types of request Interceptors: client-side and server-side.

    To write a client-side Interceptor, implement the ClientRequestInterceptor interface.

    See Also:
    ClientRequestInfo

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ClientRequestInterceptorOperations

        receive_exception, receive_other, receive_reply, send_poll, send_request

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface Current

  • All Superinterfaces:
    Current, CurrentOperations, IDLEntity, Object, Serializable

    public interface Current
extends CurrentOperations, Current, IDLEntity
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context. Each service which wishes to use PICurrent reserves a slot or slots at initialization time and uses those slots during the processing of requests and replies.

    Before an invocation is made, PICurrent is obtained via a call to ORB.resolve_initial_references( "PICurrent" ). From within the interception points, the data on PICurrent that has moved from the thread scope to the request scope is available via the get_slot operation on the RequestInfo object. A PICurrent can still be obtained via resolve_initial_references, but that is the Interceptor's thread scope PICurrent.

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.CurrentOperations

        get_slot, set_slot

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Interceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface Interceptor

  • All Superinterfaces:
    IDLEntity, InterceptorOperations, Object, Serializable
    All Known Subinterfaces:
    ClientRequestInterceptor, IORInterceptor, IORInterceptor_3_0, ServerRequestInterceptor

    public interface Interceptor
extends InterceptorOperations, Object, IDLEntity
    All Portable Interceptors implement Interceptor.

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInfo

  • All Superinterfaces:
    IDLEntity, IORInfoOperations, Object, Serializable

    public interface IORInfo
extends IORInfoOperations, Object, IDLEntity
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components. The ORB passes an instance of its implementation of this interface as a parameter to IORInterceptor.establish_components.
    See Also:
    IORInterceptor

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.IORInfoOperations

        adapter_template, add_ior_component_to_profile, add_ior_component, current_factory, current_factory, get_effective_policy, manager_id, state

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInterceptor

  • All Superinterfaces:
    IDLEntity, Interceptor, InterceptorOperations, IORInterceptorOperations, Object, Serializable
    All Known Subinterfaces:
    IORInterceptor_3_0

    public interface IORInterceptor
extends IORInterceptorOperations, Interceptor, IDLEntity
    Interceptor used to establish tagged components in the profiles within an IOR.

    In some cases, a portable ORB service implementation may need to add information describing the server's or object's ORB service related capabilities to object references in order to enable the ORB service implementation in the client to function properly.

    This is supported through the IORInterceptor and IORInfo interfaces.

    See Also:
    IORInfo

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.IORInterceptorOperations

        establish_components

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptor_3_0

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInterceptor_3_0

  • All Superinterfaces:
    IDLEntity, Interceptor, InterceptorOperations, IORInterceptor, IORInterceptor_3_0Operations, IORInterceptorOperations, Object, Serializable

    public interface IORInterceptor_3_0
extends IORInterceptor_3_0Operations, IORInterceptor, IDLEntity
    org/omg/PortableInterceptor/IORInterceptor_3_0.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.IORInterceptor_3_0Operations

        adapter_manager_state_changed, adapter_state_changed, components_established

      • Methods inherited from interface org.omg.PortableInterceptor.IORInterceptorOperations

        establish_components

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBInitializer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ORBInitializer

  • All Superinterfaces:
    IDLEntity, Object, ORBInitializerOperations, Serializable

    public interface ORBInitializer
extends ORBInitializerOperations, Object, IDLEntity
    Facilitates interceptor registration and ORB initialization.

    Interceptors are intended to be a means by which ORB services gain access to ORB processing, effectively becoming part of the ORB. Since Interceptors are part of the ORB, when ORB.init returns an ORB, the Interceptors shall have been registered. Interceptors cannot be registered on an ORB after it has been returned by a call to ORB.init.

    An Interceptor is registered by registering an associated ORBInitializer object which implements the ORBInitializer interface. When an ORB is initializing, it shall call each registered ORBInitializer, passing it an ORBInitInfo object which is used to register its Interceptor.

    Registering ORB Initializers in Java

    ORBInitializers are registered via Java ORB properties.

    The property names are of the form:

    org.omg.PortableInterceptor.ORBInitializerClass.<Service>
    where <Service> is the string name of a class which implements
    org.omg.PortableInterceptor.ORBInitializer
    To avoid name collisions, the reverse DNS name convention should be used. For example, if company X has three initializers, it could define the following properties:
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3
    During ORB.init, these ORB properties which begin with org.omg.PortableInterceptor.ORBInitializerClass shall be collected, the <Service> portion of each property shall be extracted, an object shall be instantiated with the <Service> string as its class name, and the pre_init and post_init methods shall be called on that object. If there are any exceptions, the ORB shall ignore them and proceed.

    Example

    A client-side logging service written by company X, for example, may have the following ORBInitializer implementation:

     package com.x.logging;

 import org.omg.PortableInterceptor.Interceptor;
 import org.omg.PortableInterceptor.ORBInitializer;
 import org.omg.PortableInterceptor.ORBInitInfo;

 public class LoggingService implements ORBInitializer {
     void pre_init( ORBInitInfo info ) {
         // Instantiate the Logging Service s Interceptor.
         Interceptor interceptor = new LoggingInterceptor();

         // Register the Logging Service s Interceptor.
         info.add_client_request_interceptor( interceptor );
     }

     void post_init( ORBInitInfo info ) {
         // This service does not need two init points.
     }
 }
    To run a program called MyApp using this logging service, the user could type:
    java -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService MyApp

    Notes about Registering Interceptors

    Request Interceptors are registered on a per-ORB basis.

    To achieve virtual per-object Interceptors, query the policies on the target from within the interception points to determine whether they should do any work.

    To achieve virtual per-POA Interceptors, instantiate each POA with a different ORB. While Interceptors may be ordered administratively, there is no concept of order with respect to the registration of Interceptors. Request Interceptors are concerned with service contexts. Service contexts have no order, so there is no purpose for request Interceptors to have an order. IOR Interceptors are concerned with tagged components. Tagged components also have no order, so there is no purpose for IOR Interceptors to have an order.

    Registration code should avoid using the ORB (i.e., calling ORB.init with the provided orb_id). Since registration occurs during ORB initialization, results of invocations on this ORB while it is in this state are undefined.

    See Also:
    ORBInitInfo

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ORBInitializerOperations

        post_init, pre_init

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBInitInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ORBInitInfo

  • All Superinterfaces:
    IDLEntity, Object, ORBInitInfoOperations, Serializable

    public interface ORBInitInfo
extends ORBInitInfoOperations, Object, IDLEntity
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.

    The ORBInitInfo object is only valid during ORB.init. If a service keeps a reference to its ORBInitInfo object and tries to use it after ORB.init returns, the object no longer exists and an OBJECT_NOT_EXIST exception shall be thrown.

    See Also:
    ORBInitializer

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ORBInitInfoOperations

        add_client_request_interceptor, add_ior_interceptor, add_server_request_interceptor, allocate_slot_id, arguments, codec_factory, orb_id, register_initial_reference, register_policy_factory, resolve_initial_references

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableInterceptor Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableInterceptor

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableInterceptor.AdapterManagerIdHelper
    • org.omg.PortableInterceptor.AdapterNameHelper
    • org.omg.PortableInterceptor.AdapterStateHelper
    • org.omg.PortableInterceptor.CurrentHelper
    • org.omg.PortableInterceptor.ForwardRequestHelper
    • org.omg.PortableInterceptor.InvalidSlotHelper
    • org.omg.PortableInterceptor.IORInterceptor_3_0Helper
    • org.omg.PortableInterceptor.IORInterceptor_3_0Holder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.PortableInterceptor.ObjectIdHelper
    • org.omg.PortableInterceptor.ObjectReferenceFactoryHelper
    • org.omg.PortableInterceptor.ObjectReferenceFactoryHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.PortableInterceptor.ObjectReferenceTemplateHelper
    • org.omg.PortableInterceptor.ObjectReferenceTemplateHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper
    • org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • org.omg.PortableInterceptor.ORBIdHelper
    • org.omg.PortableInterceptor.ServerIdHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableInterceptor.ForwardRequest
          • org.omg.PortableInterceptor.InvalidSlot

Interface Hierarchy

  • org.omg.PortableInterceptor.ACTIVE
  • org.omg.CORBA.CurrentOperations
    • org.omg.CORBA.Current (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableInterceptor.Current (also extends org.omg.PortableInterceptor.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableInterceptor.CurrentOperations
      • org.omg.PortableInterceptor.Current (also extends org.omg.CORBA.Current, org.omg.CORBA.portable.IDLEntity)
  • org.omg.PortableInterceptor.DISCARDING
  • org.omg.PortableInterceptor.HOLDING
  • org.omg.PortableInterceptor.INACTIVE
  • org.omg.PortableInterceptor.InterceptorOperations
    • org.omg.PortableInterceptor.ClientRequestInterceptorOperations
      • org.omg.PortableInterceptor.ClientRequestInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.Interceptor)
    • org.omg.PortableInterceptor.Interceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableInterceptor.ClientRequestInterceptor (also extends org.omg.PortableInterceptor.ClientRequestInterceptorOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.IORInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptorOperations)
        • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
      • org.omg.PortableInterceptor.ServerRequestInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInterceptorOperations)
    • org.omg.PortableInterceptor.IORInterceptorOperations
      • org.omg.PortableInterceptor.IORInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.Interceptor)
        • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
      • org.omg.PortableInterceptor.IORInterceptor_3_0Operations
        • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor)
    • org.omg.PortableInterceptor.ServerRequestInterceptorOperations
      • org.omg.PortableInterceptor.ServerRequestInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.Interceptor)
  • org.omg.PortableInterceptor.IORInfoOperations
    • org.omg.PortableInterceptor.IORInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.PortableInterceptor.LOCATION_FORWARD
  • org.omg.PortableInterceptor.NON_EXISTENT
  • org.omg.CORBA.Object
    • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.Current (also extends org.omg.PortableInterceptor.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableInterceptor.Interceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.InterceptorOperations)
      • org.omg.PortableInterceptor.ClientRequestInterceptor (also extends org.omg.PortableInterceptor.ClientRequestInterceptorOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.IORInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptorOperations)
        • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
      • org.omg.PortableInterceptor.ServerRequestInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInterceptorOperations)
    • org.omg.PortableInterceptor.IORInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInfoOperations)
    • org.omg.PortableInterceptor.ORBInitializer (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ORBInitializerOperations)
    • org.omg.PortableInterceptor.ORBInitInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ORBInitInfoOperations)
    • org.omg.PortableInterceptor.PolicyFactory (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.PolicyFactoryOperations)
    • org.omg.PortableInterceptor.RequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.RequestInfoOperations)
      • org.omg.PortableInterceptor.ClientRequestInfo (also extends org.omg.PortableInterceptor.ClientRequestInfoOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.ServerRequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInfoOperations)
  • org.omg.PortableInterceptor.ORBInitializerOperations
    • org.omg.PortableInterceptor.ORBInitializer (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.PortableInterceptor.ORBInitInfoOperations
    • org.omg.PortableInterceptor.ORBInitInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.PortableInterceptor.PolicyFactoryOperations
    • org.omg.PortableInterceptor.PolicyFactory (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.PortableInterceptor.RequestInfoOperations
    • org.omg.PortableInterceptor.ClientRequestInfoOperations
      • org.omg.PortableInterceptor.ClientRequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.RequestInfo)
    • org.omg.PortableInterceptor.RequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableInterceptor.ClientRequestInfo (also extends org.omg.PortableInterceptor.ClientRequestInfoOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.ServerRequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInfoOperations)
    • org.omg.PortableInterceptor.ServerRequestInfoOperations
      • org.omg.PortableInterceptor.ServerRequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.RequestInfo)
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.PortableInterceptor.ClientRequestInfo (also extends org.omg.PortableInterceptor.ClientRequestInfoOperations, org.omg.PortableInterceptor.RequestInfo)
      • org.omg.PortableInterceptor.ClientRequestInterceptor (also extends org.omg.PortableInterceptor.ClientRequestInterceptorOperations, org.omg.PortableInterceptor.Interceptor)
      • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.Object)
        • org.omg.PortableInterceptor.Current (also extends org.omg.PortableInterceptor.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableInterceptor.Current (also extends org.omg.CORBA.Current, org.omg.PortableInterceptor.CurrentOperations)
      • org.omg.PortableInterceptor.Interceptor (also extends org.omg.PortableInterceptor.InterceptorOperations, org.omg.CORBA.Object)
        • org.omg.PortableInterceptor.ClientRequestInterceptor (also extends org.omg.PortableInterceptor.ClientRequestInterceptorOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.PortableInterceptor.IORInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptorOperations)
          • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
        • org.omg.PortableInterceptor.ServerRequestInterceptor (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInterceptorOperations)
      • org.omg.PortableInterceptor.IORInfo (also extends org.omg.PortableInterceptor.IORInfoOperations, org.omg.CORBA.Object)
      • org.omg.PortableInterceptor.IORInterceptor (also extends org.omg.PortableInterceptor.Interceptor, org.omg.PortableInterceptor.IORInterceptorOperations)
        • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
      • org.omg.PortableInterceptor.IORInterceptor_3_0 (also extends org.omg.PortableInterceptor.IORInterceptor, org.omg.PortableInterceptor.IORInterceptor_3_0Operations)
      • org.omg.PortableInterceptor.ORBInitializer (also extends org.omg.CORBA.Object, org.omg.PortableInterceptor.ORBInitializerOperations)
      • org.omg.PortableInterceptor.ORBInitInfo (also extends org.omg.CORBA.Object, org.omg.PortableInterceptor.ORBInitInfoOperations)
      • org.omg.PortableInterceptor.PolicyFactory (also extends org.omg.CORBA.Object, org.omg.PortableInterceptor.PolicyFactoryOperations)
      • org.omg.PortableInterceptor.RequestInfo (also extends org.omg.CORBA.Object, org.omg.PortableInterceptor.RequestInfoOperations)
        • org.omg.PortableInterceptor.ClientRequestInfo (also extends org.omg.PortableInterceptor.ClientRequestInfoOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.PortableInterceptor.ServerRequestInfo (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableInterceptor.ServerRequestInfoOperations)
      • org.omg.PortableInterceptor.ServerRequestInfo (also extends org.omg.PortableInterceptor.RequestInfo, org.omg.PortableInterceptor.ServerRequestInfoOperations)
      • org.omg.PortableInterceptor.ServerRequestInterceptor (also extends org.omg.PortableInterceptor.Interceptor, org.omg.PortableInterceptor.ServerRequestInterceptorOperations)
      • org.omg.CORBA.portable.ValueBase
        • org.omg.PortableInterceptor.ObjectReferenceFactory
          • org.omg.PortableInterceptor.ObjectReferenceTemplate
  • org.omg.PortableInterceptor.SUCCESSFUL
  • org.omg.PortableInterceptor.SYSTEM_EXCEPTION
  • org.omg.PortableInterceptor.TRANSPORT_RETRY
  • org.omg.PortableInterceptor.UNKNOWN
  • org.omg.PortableInterceptor.USER_EXCEPTION
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface PolicyFactory

  • All Superinterfaces:
    IDLEntity, Object, PolicyFactoryOperations, Serializable

    public interface PolicyFactory
extends PolicyFactoryOperations, Object, IDLEntity
    Enables policy types to be constructed using CORBA.ORB.create_policy.

    A portable ORB service implementation registers an instance of the PolicyFactory interface during ORB initialization in order to enable its policy types to be constructed using CORBA.ORB.create_policy. The POA is required to preserve any policy which is registered with ORBInitInfo in this manner.

    See Also:
    ORBInitInfoOperations.register_policy_factory(int, org.omg.PortableInterceptor.PolicyFactory)

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.PolicyFactoryOperations

        create_policy

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface RequestInfo

  • All Superinterfaces:
    IDLEntity, Object, RequestInfoOperations, Serializable
    All Known Subinterfaces:
    ClientRequestInfo, ServerRequestInfo

    public interface RequestInfo
extends RequestInfoOperations, Object, IDLEntity
    Request Information, accessible to Interceptors.

    Each interception point is given an object through which the Interceptor can access request information. Client-side and server-side interception points are concerned with different information, so there are two information objects: ClientRequestInfo is passed to the client-side interception points and ServerRequestInfo is passed to the server-side interception points. But there is information that is common to both, so they both inherit from a common interface: RequestInfo.

    See Also:
    ClientRequestInfo, ServerRequestInfo

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations

        arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerRequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ServerRequestInfo

  • All Superinterfaces:
    IDLEntity, Object, RequestInfo, RequestInfoOperations, Serializable, ServerRequestInfoOperations

    public interface ServerRequestInfo
extends ServerRequestInfoOperations, RequestInfo, IDLEntity
    Request Information, accessible to server-side request interceptors.

    Some attributes and operations on ServerRequestInfo are not valid at all interception points. The following table shows the validity of each attribute or operation. If it is not valid, attempting to access it will result in a BAD_INV_ORDER being thrown with a standard minor code of 14.

    receive_request_
    service_contexts     		receive_request send_reply send_exception send_other
    Inherited from RequestInfo:

    request_id

             yes yes yes yes yes

    operation

             yes yes yes yes yes

    arguments

             no yes1 yes no2 no2

    exceptions

             no yes yes yes yes

    contexts

             no yes yes yes yes

    operation_context

             no yes yes no no

    result

             no no yes no no

    response_expected

             yes yes yes yes yes

    sync_scope

             yes yes yes yes yes
    request_id | yes | yes | yes | yes | yes
    operation | yes | yes | yes | yes | yes
    arguments | no | yes1 | yes | no2 | no2
    exceptions | no | yes | yes | yes | yes
    contexts | no | yes | yes | yes | yes
    operation_context | no | yes | yes | no | no
    result | no | no | yes | no | no
    response_expected | yes | yes | yes | yes | yes
    sync_scope | yes | yes | yes | yes | yes
    reply_status | no | no | yes | yes | yes
    forward_reference | no | no | no | no | yes2
    get_slot | yes | yes | yes | yes | yes
    get_request_service_context | yes | no | yes | yes | yes
    get_reply_service_context | no | no | yes | yes | yes
    ServerRequestInfo-specific:
    sending_exception | no | no | no | yes | no
    object_id | no | yes | yes | yes3 | yes3
    adapter_id | no | yes | yes | yes3 | yes3
    server_id | no | yes | yes | yes | yes
    orb_id | no | yes | yes | yes | yes
    adapter_name | no | yes | yes | yes | yes
    target_most_derived_interface | no | yes | no4 | no4 | no4
    get_server_policy | yes | yes | yes | yes | yes
    set_slot | yes | yes | yes | yes | yes
    target_is_a | no | yes | no4 | no4 | no4
    add_reply_service_context | yes | yes | yes | yes | yes

    1. When ServerRequestInfo is passed to receive_request, there is an entry in the list for every argument, whether in, inout, or out. But only the in and inout arguments will be available.
    2. If the reply_status attribute is not LOCATION_FORWARD, accessing this attribute will throw BAD_INV_ORDER with a standard minor code of 14.
    3. If the servant locator caused a location forward, or thrown an exception, this attribute/operation may not be available in this interception point. NO_RESOURCES with a standard minor code of 1 will be thrown if it is not available.
    4. The operation is not available in this interception point because the necessary information requires access to the target object's servant, which may no longer be available to the ORB. For example, if the object's adapter is a POA that uses a ServantLocator, then the ORB invokes the interception point after it calls ServantLocator.postinvoke()
      5. .
    See Also:
    ServerRequestInterceptor

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ServerRequestInfoOperations

        adapter_id, adapter_name, add_reply_service_context, get_server_policy, object_id, orb_id, sending_exception, server_id, set_slot, target_is_a, target_most_derived_interface

      • Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations

        arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerRequestInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ServerRequestInterceptor

  • All Superinterfaces:
    IDLEntity, Interceptor, InterceptorOperations, Object, Serializable, ServerRequestInterceptorOperations

    public interface ServerRequestInterceptor
extends ServerRequestInterceptorOperations, Interceptor, IDLEntity
    Server-side request interceptor.

    A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers. There are two types of request Interceptors: client-side and server-side.

    To write a server-side Interceptor, implement the ServerRequestInterceptor interface.

    See Also:
    ServerRequestInfo

    • Method Summary

      • Methods inherited from interface org.omg.PortableInterceptor.ServerRequestInterceptorOperations

        receive_request_service_contexts, receive_request, send_exception, send_other, send_reply

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableInterceptor

  • Packages that use org.omg.PortableInterceptor
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
  • Classes in org.omg.PortableInterceptor used by org.omg.PortableInterceptor
    Class and Description
    ClientRequestInfo
    Request Information, accessible to client-side request interceptors.
    ClientRequestInfoOperations
    Request Information, accessible to client-side request interceptors.
    ClientRequestInterceptor
    Client-side request interceptor.
    ClientRequestInterceptorOperations
    Client-side request interceptor.
    Current
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
    CurrentOperations
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
    ForwardRequest
    org/omg/PortableInterceptor/ForwardRequest.java .
    Interceptor
    All Portable Interceptors implement Interceptor.
    InterceptorOperations
    All Portable Interceptors implement Interceptor.
    InvalidSlot
    org/omg/PortableInterceptor/InvalidSlot.java .
    IORInfo
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
    IORInfoOperations
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
    IORInterceptor
    Interceptor used to establish tagged components in the profiles within an IOR.
    IORInterceptor_3_0
    org/omg/PortableInterceptor/IORInterceptor_3_0.java .
    IORInterceptor_3_0Operations
    org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java .
    IORInterceptorOperations
    Interceptor used to establish tagged components in the profiles within an IOR.
    ObjectReferenceFactory
    The object reference factory.
    ObjectReferenceTemplate
    The object reference template.
    ORBInitializerOperations
    Facilitates interceptor registration and ORB initialization.
    ORBInitInfo
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
    ORBInitInfoOperations
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
    PolicyFactory
    Enables policy types to be constructed using CORBA.ORB.create_policy.
    PolicyFactoryOperations
    Enables policy types to be constructed using CORBA.ORB.create_policy.
    RequestInfo
    Request Information, accessible to Interceptors.
    RequestInfoOperations
    Request Information, accessible to Interceptors.
    ServerRequestInfo
    Request Information, accessible to server-side request interceptors.
    ServerRequestInfoOperations
    Request Information, accessible to server-side request interceptors.
    ServerRequestInterceptor
    Server-side request interceptor.
    ServerRequestInterceptorOperations
    Server-side request interceptor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ACTIVE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ACTIVE

  • public interface ACTIVE
    org/omg/PortableInterceptor/ACTIVE.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Object adapter state that indicates normal request processing.

    • Field Detail

      • value

        static final short value
        Object adapter state that indicates normal request processing.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterManagerIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class AdapterManagerIdHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.AdapterManagerIdHelper

  • public abstract class AdapterManagerIdHelper
extends Object
    Adapter manager identifier. Every object adapter has an adapter manager, indicated in this API only through the ID. A group of object adapter instances may share the same adapter manager, in which case state transitions reported for the adapter manager are observed by all object adapters with the same adapter manager ID.

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterManagerIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static int | extract(Any a)
      static String | id()
      static void | insert(Any a, int that)
      static int | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, int value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterManagerIdHelper

        public AdapterManagerIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          int that)

      • extract

        public static int extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static int read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class AdapterNameHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.AdapterNameHelper

  • public abstract class AdapterNameHelper
extends Object
    The name of an object adapter. This is unique only within the scope of the ORB that created the object adapter.

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String[] | extract(Any a)
      static String | id()
      static void | insert(Any a, String[] that)
      static String[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterNameHelper

        public AdapterNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String[] that)

      • extract

        public static String[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterStateHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class AdapterStateHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.AdapterStateHelper

  • public abstract class AdapterStateHelper
extends Object
    Type of object adapter state. State changes are reported either to the object adapter or to the adapter manager.

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterStateHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static short | extract(Any a)
      static String | id()
      static void | insert(Any a, short that)
      static short | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, short value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterStateHelper

        public AdapterStateHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          short that)

      • extract

        public static short extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static short read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         short value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.AdapterManagerIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.AdapterManagerIdHelper

No usage of org.omg.PortableInterceptor.AdapterManagerIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.AdapterNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.AdapterNameHelper

No usage of org.omg.PortableInterceptor.AdapterNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.AdapterStateHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.AdapterStateHelper

No usage of org.omg.PortableInterceptor.AdapterStateHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.CurrentHelper

No usage of org.omg.PortableInterceptor.CurrentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ForwardRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ForwardRequest

  • Packages that use ForwardRequest
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ForwardRequest in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return ForwardRequest
      Modifier and Type | Method and Description
      static ForwardRequest | ForwardRequestHelper.extract(Any a)
      static ForwardRequest | ForwardRequestHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor with parameters of type ForwardRequest
      Modifier and Type | Method and Description
      static void | ForwardRequestHelper.insert(Any a, ForwardRequest that)
      static void | ForwardRequestHelper.write(OutputStream ostream, ForwardRequest value)
      Methods in org.omg.PortableInterceptor that throw ForwardRequest
      Modifier and Type Method and Description
      void ClientRequestInterceptorOperations.receive_exception(ClientRequestInfo ri)
      Indicates to the interceptor that an exception occurred.
      void ClientRequestInterceptorOperations.receive_other(ClientRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void ServerRequestInterceptorOperations.receive_request_service_contexts(ServerRequestInfo ri)
      Allows the interceptor to process service context information.
      void ServerRequestInterceptorOperations.receive_request(ServerRequestInfo ri)
      Allows an Interceptor to query request information after all the information, including operation parameters, are available.
      void ServerRequestInterceptorOperations.send_exception(ServerRequestInfo ri)
      Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client.
      void ServerRequestInterceptorOperations.send_other(ServerRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void ClientRequestInterceptorOperations.send_request(ClientRequestInfo ri)
      Allows an Interceptor to query request information and modify the service context before the request is sent to the server.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ForwardRequestHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ForwardRequestHelper

No usage of org.omg.PortableInterceptor.ForwardRequestHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.InvalidSlot

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.InvalidSlot

  • Packages that use InvalidSlot
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of InvalidSlot in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return InvalidSlot
      Modifier and Type | Method and Description
      static InvalidSlot | InvalidSlotHelper.extract(Any a)
      static InvalidSlot | InvalidSlotHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor with parameters of type InvalidSlot
      Modifier and Type | Method and Description
      static void | InvalidSlotHelper.insert(Any a, InvalidSlot that)
      static void | InvalidSlotHelper.write(OutputStream ostream, InvalidSlot value)
      Methods in org.omg.PortableInterceptor that throw InvalidSlot
      Modifier and Type Method and Description
      Any CurrentOperations.get_slot(int id)
      Retrieves the slot data the application set in PICurrent via get_slot.
      Any RequestInfoOperations.get_slot(int id)
      Returns the data from the given slot of the PortableInterceptor.Current that is in the scope of the request.
      void CurrentOperations.set_slot(int id, Any data)
      Sets data in a slot.
      void ServerRequestInfoOperations.set_slot(int id, Any data)
      Allows an Interceptor to set a slot in the PortableInterceptor.Current that is in the scope of the request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.InvalidSlotHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.InvalidSlotHelper

No usage of org.omg.PortableInterceptor.InvalidSlotHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.IORInterceptor_3_0Helper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.IORInterceptor_3_0Helper

No usage of org.omg.PortableInterceptor.IORInterceptor_3_0Helper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.IORInterceptor_3_0Holder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.IORInterceptor_3_0Holder

No usage of org.omg.PortableInterceptor.IORInterceptor_3_0Holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectIdHelper

No usage of org.omg.PortableInterceptor.ObjectIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper

No usage of org.omg.PortableInterceptor.ObjectReferenceFactoryHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceFactoryHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder

No usage of org.omg.PortableInterceptor.ObjectReferenceFactoryHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceTemplateHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper

No usage of org.omg.PortableInterceptor.ObjectReferenceTemplateHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceTemplateHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder

No usage of org.omg.PortableInterceptor.ObjectReferenceTemplateHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper

No usage of org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder

No usage of org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBIdHelper

No usage of org.omg.PortableInterceptor.ORBIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ServerIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ServerIdHelper

No usage of org.omg.PortableInterceptor.ServerIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ACTIVE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ACTIVE

No usage of org.omg.PortableInterceptor.ACTIVE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ClientRequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ClientRequestInfo

  • Packages that use ClientRequestInfo
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ClientRequestInfo in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type ClientRequestInfo
      Modifier and Type Method and Description
      void ClientRequestInterceptorOperations.receive_exception(ClientRequestInfo ri)
      Indicates to the interceptor that an exception occurred.
      void ClientRequestInterceptorOperations.receive_other(ClientRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void ClientRequestInterceptorOperations.receive_reply(ClientRequestInfo ri)
      Allows an Interceptor to query the information on a reply after it is returned from the server and before control is returned to the client.
      void ClientRequestInterceptorOperations.send_poll(ClientRequestInfo ri)
      Allows an Interceptor to query information during a Time-Independent Invocation (TII) polling get reply sequence.
      void ClientRequestInterceptorOperations.send_request(ClientRequestInfo ri)
      Allows an Interceptor to query request information and modify the service context before the request is sent to the server.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ClientRequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ClientRequestInfoOperations

  • Packages that use ClientRequestInfoOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ClientRequestInfoOperations in org.omg.PortableInterceptor

      Subinterfaces of ClientRequestInfoOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInfo
      Request Information, accessible to client-side request interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ClientRequestInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ClientRequestInterceptor

  • Packages that use ClientRequestInterceptor
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ClientRequestInterceptor in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type ClientRequestInterceptor
      Modifier and Type Method and Description
      void ORBInitInfoOperations.add_client_request_interceptor(ClientRequestInterceptor interceptor)
      Used to add a client-side request Interceptor to the list of client-side request Interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ClientRequestInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ClientRequestInterceptorOperations

  • Packages that use ClientRequestInterceptorOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ClientRequestInterceptorOperations in org.omg.PortableInterceptor

      Subinterfaces of ClientRequestInterceptorOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInterceptor
      Client-side request interceptor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.Current

  • Packages that use Current
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of Current in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that return Current
      Modifier and Type | Method and Description
      static Current | CurrentHelper.extract(Any a)
      static Current | CurrentHelper.narrow(Object obj)
      static Current | CurrentHelper.read(InputStream istream)
      static Current | CurrentHelper.unchecked_narrow(Object obj)
      Methods in org.omg.PortableInterceptor with parameters of type Current
      Modifier and Type | Method and Description
      static void | CurrentHelper.insert(Any a, Current that)
      static void | CurrentHelper.write(OutputStream ostream, Current value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.CurrentOperations

  • Packages that use CurrentOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of CurrentOperations in org.omg.PortableInterceptor

      Subinterfaces of CurrentOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  Current
      Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.DISCARDING

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.DISCARDING

No usage of org.omg.PortableInterceptor.DISCARDING
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.HOLDING

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.HOLDING

No usage of org.omg.PortableInterceptor.HOLDING
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.INACTIVE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.INACTIVE

No usage of org.omg.PortableInterceptor.INACTIVE
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.Interceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.Interceptor

  • Packages that use Interceptor
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of Interceptor in org.omg.PortableInterceptor

      Subinterfaces of Interceptor in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInterceptor
      Client-side request interceptor.
      interface  IORInterceptor
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      interface  ServerRequestInterceptor
      Server-side request interceptor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.InterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.InterceptorOperations

  • Packages that use InterceptorOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of InterceptorOperations in org.omg.PortableInterceptor

      Subinterfaces of InterceptorOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInterceptor
      Client-side request interceptor.
      interface  ClientRequestInterceptorOperations
      Client-side request interceptor.
      interface  Interceptor
      All Portable Interceptors implement Interceptor.
      interface  IORInterceptor
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      interface  IORInterceptor_3_0Operations
      org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java .
      interface  IORInterceptorOperations
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  ServerRequestInterceptor
      Server-side request interceptor.
      interface  ServerRequestInterceptorOperations
      Server-side request interceptor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInfo

  • Packages that use IORInfo
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInfo in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type IORInfo
      Modifier and Type Method and Description
      void IORInterceptor_3_0Operations.components_established(IORInfo info)
      The components_established method is invoked on all registered IORInterceptor_3_0 instances after establish_components has been invoked on all registered IORInterceptor instances.
      void IORInterceptorOperations.establish_components(IORInfo info)
      A server side ORB calls the establish_components operation on all registered IORInterceptor instances when it is assembling the list of components that will be included in the profile or profiles of an object reference.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInfoOperations

  • Packages that use IORInfoOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInfoOperations in org.omg.PortableInterceptor

      Subinterfaces of IORInfoOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  IORInfo
      Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInterceptor

  • Packages that use IORInterceptor
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInterceptor in org.omg.PortableInterceptor

      Subinterfaces of IORInterceptor in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      Methods in org.omg.PortableInterceptor with parameters of type IORInterceptor
      Modifier and Type Method and Description
      void ORBInitInfoOperations.add_ior_interceptor(IORInterceptor interceptor)
      Used to add an IOR Interceptor to the list of IOR Interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInterceptorOperations

  • Packages that use IORInterceptorOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInterceptorOperations in org.omg.PortableInterceptor

      Subinterfaces of IORInterceptorOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  IORInterceptor
      Interceptor used to establish tagged components in the profiles within an IOR.
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
      interface  IORInterceptor_3_0Operations
      org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInterceptor_3_0

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInterceptor_3_0

  • Packages that use IORInterceptor_3_0
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInterceptor_3_0 in org.omg.PortableInterceptor

      Fields in org.omg.PortableInterceptor declared as IORInterceptor_3_0
      Modifier and Type | Field and Description
      IORInterceptor_3_0 | IORInterceptor_3_0Holder.value
      Methods in org.omg.PortableInterceptor that return IORInterceptor_3_0
      Modifier and Type | Method and Description
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.extract(Any a)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.narrow(Object obj)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.read(InputStream istream)
      static IORInterceptor_3_0 | IORInterceptor_3_0Helper.unchecked_narrow(Object obj)
      Methods in org.omg.PortableInterceptor with parameters of type IORInterceptor_3_0
      Modifier and Type | Method and Description
      static void | IORInterceptor_3_0Helper.insert(Any a, IORInterceptor_3_0 that)
      static void | IORInterceptor_3_0Helper.write(OutputStream ostream, IORInterceptor_3_0 value)
      Constructors in org.omg.PortableInterceptor with parameters of type IORInterceptor_3_0
      Constructor and Description
      IORInterceptor_3_0Holder(IORInterceptor_3_0 initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.IORInterceptor_3_0Operations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.IORInterceptor_3_0Operations

  • Packages that use IORInterceptor_3_0Operations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of IORInterceptor_3_0Operations in org.omg.PortableInterceptor

      Subinterfaces of IORInterceptor_3_0Operations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  IORInterceptor_3_0
      org/omg/PortableInterceptor/IORInterceptor_3_0.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.LOCATION_FORWARD

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.LOCATION_FORWARD

No usage of org.omg.PortableInterceptor.LOCATION_FORWARD
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.NON_EXISTENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.NON_EXISTENT

No usage of org.omg.PortableInterceptor.NON_EXISTENT
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ObjectReferenceFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ObjectReferenceFactory

  • Packages that use ObjectReferenceFactory
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ObjectReferenceFactory in org.omg.PortableInterceptor

      Subinterfaces of ObjectReferenceFactory in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ObjectReferenceTemplate
      The object reference template.
      Fields in org.omg.PortableInterceptor declared as ObjectReferenceFactory
      Modifier and Type | Field and Description
      ObjectReferenceFactory | ObjectReferenceFactoryHolder.value
      Methods in org.omg.PortableInterceptor that return ObjectReferenceFactory
      Modifier and Type | Method and Description
      ObjectReferenceFactory IORInfoOperations.current_factory()
      On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.
      static ObjectReferenceFactory | ObjectReferenceFactoryHelper.extract(Any a)
      static ObjectReferenceFactory | ObjectReferenceFactoryHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor with parameters of type ObjectReferenceFactory
      Modifier and Type | Method and Description
      void IORInfoOperations.current_factory(ObjectReferenceFactory newCurrent_factory)
      On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.
      static void | ObjectReferenceFactoryHelper.insert(Any a, ObjectReferenceFactory that)
      static void | ObjectReferenceFactoryHelper.write(OutputStream ostream, ObjectReferenceFactory value)
      Constructors in org.omg.PortableInterceptor with parameters of type ObjectReferenceFactory
      Constructor and Description
      ObjectReferenceFactoryHolder(ObjectReferenceFactory initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ObjectReferenceTemplate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ObjectReferenceTemplate

  • Packages that use ObjectReferenceTemplate
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ObjectReferenceTemplate in org.omg.PortableInterceptor

      Fields in org.omg.PortableInterceptor declared as ObjectReferenceTemplate
      Modifier and Type | Field and Description
      ObjectReferenceTemplate | ObjectReferenceTemplateHolder.value
      ObjectReferenceTemplate[] | ObjectReferenceTemplateSeqHolder.value
      Methods in org.omg.PortableInterceptor that return ObjectReferenceTemplate
      Modifier and Type | Method and Description
      ObjectReferenceTemplate IORInfoOperations.adapter_template()
      Return the object reference template of the object adapter that was just created and is running IOR interceptors.
      static ObjectReferenceTemplate | ObjectReferenceTemplateHelper.extract(Any a)
      static ObjectReferenceTemplate[] | ObjectReferenceTemplateSeqHelper.extract(Any a)
      static ObjectReferenceTemplate | ObjectReferenceTemplateHelper.read(InputStream istream)
      static ObjectReferenceTemplate[] | ObjectReferenceTemplateSeqHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor with parameters of type ObjectReferenceTemplate
      Modifier and Type | Method and Description
      void IORInterceptor_3_0Operations.adapter_state_changed(ObjectReferenceTemplate[] templates, short state)
      Called whenever the state of an object adapter changes, and the state change is not caused by an adapter manager.
      static void | ObjectReferenceTemplateHelper.insert(Any a, ObjectReferenceTemplate that)
      static void | ObjectReferenceTemplateSeqHelper.insert(Any a, ObjectReferenceTemplate[] that)
      static void | ObjectReferenceTemplateHelper.write(OutputStream ostream, ObjectReferenceTemplate value)
      static void | ObjectReferenceTemplateSeqHelper.write(OutputStream ostream, ObjectReferenceTemplate[] value)
      Constructors in org.omg.PortableInterceptor with parameters of type ObjectReferenceTemplate
      Constructor and Description
      ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue)
      ObjectReferenceTemplateSeqHolder(ObjectReferenceTemplate[] initialValue)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ORBInitializer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ORBInitializer

No usage of org.omg.PortableInterceptor.ORBInitializer
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ORBInitializerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ORBInitializerOperations

  • Packages that use ORBInitializerOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ORBInitializerOperations in org.omg.PortableInterceptor

      Subinterfaces of ORBInitializerOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ORBInitializer
      Facilitates interceptor registration and ORB initialization.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ORBInitInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ORBInitInfo

  • Packages that use ORBInitInfo
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ORBInitInfo in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type ORBInitInfo
      Modifier and Type Method and Description
      void ORBInitializerOperations.post_init(ORBInitInfo info)
      Called during ORB initialization.
      void ORBInitializerOperations.pre_init(ORBInitInfo info)
      Called during ORB initialization.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ORBInitInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ORBInitInfoOperations

  • Packages that use ORBInitInfoOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ORBInitInfoOperations in org.omg.PortableInterceptor

      Subinterfaces of ORBInitInfoOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ORBInitInfo
      Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.PolicyFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.PolicyFactory

  • Packages that use PolicyFactory
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of PolicyFactory in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type PolicyFactory
      Modifier and Type Method and Description
      void ORBInitInfoOperations.register_policy_factory(int type, PolicyFactory policy_factory)
      Registers a PolicyFactory for the given PolicyType.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.PolicyFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.PolicyFactoryOperations

  • Packages that use PolicyFactoryOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of PolicyFactoryOperations in org.omg.PortableInterceptor

      Subinterfaces of PolicyFactoryOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  PolicyFactory
      Enables policy types to be constructed using CORBA.ORB.create_policy.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.RequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.RequestInfo

  • Packages that use RequestInfo
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of RequestInfo in org.omg.PortableInterceptor

      Subinterfaces of RequestInfo in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInfo
      Request Information, accessible to client-side request interceptors.
      interface  ServerRequestInfo
      Request Information, accessible to server-side request interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.RequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.RequestInfoOperations

  • Packages that use RequestInfoOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of RequestInfoOperations in org.omg.PortableInterceptor

      Subinterfaces of RequestInfoOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ClientRequestInfo
      Request Information, accessible to client-side request interceptors.
      interface  ClientRequestInfoOperations
      Request Information, accessible to client-side request interceptors.
      interface  RequestInfo
      Request Information, accessible to Interceptors.
      interface  ServerRequestInfo
      Request Information, accessible to server-side request interceptors.
      interface  ServerRequestInfoOperations
      Request Information, accessible to server-side request interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ServerRequestInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ServerRequestInfo

  • Packages that use ServerRequestInfo
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ServerRequestInfo in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type ServerRequestInfo
      Modifier and Type Method and Description
      void ServerRequestInterceptorOperations.receive_request_service_contexts(ServerRequestInfo ri)
      Allows the interceptor to process service context information.
      void ServerRequestInterceptorOperations.receive_request(ServerRequestInfo ri)
      Allows an Interceptor to query request information after all the information, including operation parameters, are available.
      void ServerRequestInterceptorOperations.send_exception(ServerRequestInfo ri)
      Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client.
      void ServerRequestInterceptorOperations.send_other(ServerRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void ServerRequestInterceptorOperations.send_reply(ServerRequestInfo ri)
      Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ServerRequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ServerRequestInfoOperations

  • Packages that use ServerRequestInfoOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ServerRequestInfoOperations in org.omg.PortableInterceptor

      Subinterfaces of ServerRequestInfoOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ServerRequestInfo
      Request Information, accessible to server-side request interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ServerRequestInterceptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ServerRequestInterceptor

  • Packages that use ServerRequestInterceptor
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ServerRequestInterceptor in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor with parameters of type ServerRequestInterceptor
      Modifier and Type Method and Description
      void ORBInitInfoOperations.add_server_request_interceptor(ServerRequestInterceptor interceptor)
      Used to add a server-side request Interceptor to the list of server-side request Interceptors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.ServerRequestInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.ServerRequestInterceptorOperations

  • Packages that use ServerRequestInterceptorOperations
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.

    • Uses of ServerRequestInterceptorOperations in org.omg.PortableInterceptor

      Subinterfaces of ServerRequestInterceptorOperations in org.omg.PortableInterceptor
      Modifier and Type Interface and Description
      interface  ServerRequestInterceptor
      Server-side request interceptor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.SUCCESSFUL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.SUCCESSFUL

No usage of org.omg.PortableInterceptor.SUCCESSFUL
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.SYSTEM_EXCEPTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.SYSTEM_EXCEPTION

No usage of org.omg.PortableInterceptor.SYSTEM_EXCEPTION
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.TRANSPORT_RETRY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.TRANSPORT_RETRY

No usage of org.omg.PortableInterceptor.TRANSPORT_RETRY
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.UNKNOWN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.UNKNOWN

No usage of org.omg.PortableInterceptor.UNKNOWN
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableInterceptor.USER_EXCEPTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableInterceptor.USER_EXCEPTION

No usage of org.omg.PortableInterceptor.USER_EXCEPTION
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ClientRequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ClientRequestInfoOperations

  • All Superinterfaces:
    RequestInfoOperations
    All Known Subinterfaces:
    ClientRequestInfo

    public interface ClientRequestInfoOperations
extends RequestInfoOperations
    Request Information, accessible to client-side request interceptors.

    Some attributes and operations on ClientRequestInfo are not valid at all interception points. The following table shows the validity of each attribute or operation. If it is not valid, attempting to access it will result in a BAD_INV_ORDER being thrown with a standard minor code of 14.

    send_request send_poll receive_reply receive_exception receive_other
    Inherited from RequestInfo:

    request_id

             yes yes yes yes yes

    operation

             yes yes yes yes yes

    arguments

             yes1 no yes no no

    exceptions

             yes no yes yes yes

    contexts

             yes no yes yes yes

    operation_context

             yes no yes yes yes

    result

             no no yes no no

    response_expected

             yes yes yes yes yes

    sync_scope

             yes no yes yes yes

    reply_status

             no no yes yes yes

    forward_reference

             no no no no yes2

    get_slot

             yes yes yes yes yes

    get_request_service_context

             yes no yes yes yes

    get_reply_service_context

             no no yes yes yes
    ClientRequestInfo-specific:

    target

             yes yes yes yes yes

    effective_target

             yes yes yes yes yes

    effective_profile

             yes yes yes yes yes

    received_exception

             no no no yes no

    received_exception_id

             no no no yes no

    get_effective_component

             yes no yes yes yes

    get_effective_components

             yes no yes yes yes

    get_request_policy

             yes no yes yes yes

    add_request_service_context

             yes no no no no

    1. When ClientRequestInfo is passed to send_request, there is an entry in the list for every argument, whether in, inout, or out. But only the in and inout arguments will be available.
    2. If the reply_status atribute is not LOCATION_FORWARD, accessing this attribute will throw BAD_INV_ORDER with a standard minor code of 14.
    See Also:
    ClientRequestInterceptor

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void add_request_service_context(ServiceContext service_context, boolean replace)
      Allows Interceptors to add service contexts to the request.
      TaggedProfile effective_profile()
      Returns the profile that will be used to send the request.
      Object effective_target()
      Returns the actual object on which the operation will be invoked.
      TaggedComponent get_effective_component(int id)
      Returns the IOP.TaggedComponent with the given ID from the profile selected for this request.
      TaggedComponent[] get_effective_components(int id)
      Returns an array of all tagged components with the given ID from the profile selected for this request.
      Policy get_request_policy(int type)
      Returns the given policy in effect for this operation.
      String received_exception_id()
      Returns the repository id of the exception to be returned to the client.
      Any received_exception()
      Returns an any which contains the exception to be returned to the client.
      Object target()
      Returns the object which the client called to perform the operation.

      • Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations

        arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope

    • Method Detail

      • target

        Object target()
        Returns the object which the client called to perform the operation.
        See Also:
        effective_target()

      • effective_target

        Object effective_target()
        Returns the actual object on which the operation will be invoked. If the reply_status is LOCATION_FORWARD, then on subsequent requests, effective_target will contain the forwarded IOR while target will remain unchanged.
        See Also:
        target()

      • effective_profile

        TaggedProfile effective_profile()
        Returns the profile that will be used to send the request. If a location forward has occurred for this operation's object and that object's profile changed accordingly, then this profile will be that located profile.

      • received_exception

        Any received_exception()
        Returns an any which contains the exception to be returned to the client.

        If the exception is a user exception which cannot be inserted into an any (e.g., it is unknown or the bindings don t provide the TypeCode), then this attribute will be an any containing the system exception UNKNOWN with a standard minor code of 1. However, the repository id of the exception is available in the received_exception_id attribute.

        See Also:
        received_exception_id()

      • received_exception_id

        String received_exception_id()
        Returns the repository id of the exception to be returned to the client.
        See Also:
        received_exception(), PortableInterceptor package comments for limitations / unimplemented features

      • get_effective_component

        TaggedComponent get_effective_component(int id)
        Returns the IOP.TaggedComponent with the given ID from the profile selected for this request.

        If there is more than one component for a given component ID, it is undefined which component this operation returns. If there is more than one component for a given component ID, get_effective_components should be called instead.

        Parameters:
        id - The component id of the component which is to be returned.
        Returns:
        The IOP.TaggedComponent obtained with the given identifier.
        Throws:
        BAD_PARAM - thrown, with a standard minor code of 28, if no component exists for the given component ID.
        See Also:
        get_effective_components(int)

      • get_effective_components

        TaggedComponent[] get_effective_components(int id)
        Returns an array of all tagged components with the given ID from the profile selected for this request.
        Parameters:
        id - The component id of the components which are to be returned.
        Returns:
        An array of TaggedComponent objects, each of which contains the given identifier.
        Throws:
        BAD_PARAM - thrown, with a standard minor code of 28, if no component exists for the given component ID.
        See Also:
        get_effective_component(int)

      • get_request_policy

        Policy get_request_policy(int type)
        Returns the given policy in effect for this operation.
        Parameters:
        type - The policy type which specifies the policy to be returned.
        Returns:
        The CORBA.Policy obtained with the given type.
        Throws:
        INV_POLICY - thrown, with a standard minor code of 1, if the policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • add_request_service_context

        void add_request_service_context(ServiceContext service_context,
                                 boolean replace)
        Allows Interceptors to add service contexts to the request.

        There is no declaration of the order of the service contexts. They may or may not appear in the order that they are added.

        Parameters:
        service_context - The IOP.ServiceContext to be added to the request.
        replace - Indicates the behavior of this operation when a service context already exists with the given ID. If false, then BAD_INV_ORDER with a standard minor code of 15 is thrown. If true, then the existing service context is replaced by the new one.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ClientRequestInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ClientRequestInterceptorOperations

  • All Superinterfaces:
    InterceptorOperations
    All Known Subinterfaces:
    ClientRequestInterceptor

    public interface ClientRequestInterceptorOperations
extends InterceptorOperations
    Client-side request interceptor.

    A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers. There are two types of request Interceptors: client-side and server-side.

    To write a client-side Interceptor, implement the ClientRequestInterceptor interface.

    See Also:
    ClientRequestInfo

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void receive_exception(ClientRequestInfo ri)
      Indicates to the interceptor that an exception occurred.
      void receive_other(ClientRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void receive_reply(ClientRequestInfo ri)
      Allows an Interceptor to query the information on a reply after it is returned from the server and before control is returned to the client.
      void send_poll(ClientRequestInfo ri)
      Allows an Interceptor to query information during a Time-Independent Invocation (TII) polling get reply sequence.
      void send_request(ClientRequestInfo ri)
      Allows an Interceptor to query request information and modify the service context before the request is sent to the server.

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

    • Method Detail

      • send_request

        void send_request(ClientRequestInfo ri)
           throws ForwardRequest
        Allows an Interceptor to query request information and modify the service context before the request is sent to the server.

        This interception point may throw a system exception. If it does, no other Interceptors' send_request operations are called. Those Interceptors on the Flow Stack are popped and their receive_exception interception points are called. This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, no other Interceptors' send_request operations are called. Those Interceptors on the Flow Stack are popped and their receive_other interception points are called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.

      • send_poll

        void send_poll(ClientRequestInfo ri)
        Allows an Interceptor to query information during a Time-Independent Invocation (TII) polling get reply sequence.

        With TII, an application may poll for a response to a request sent previously by the polling client or some other client. This poll is reported to Interceptors through the send_poll interception point and the response is returned through the receive_reply or receive_exception interception points. If the response is not available before the poll time-out expires, the system exception TIMEOUT is thrown and receive_exception is called with this exception.

        This interception point may throw a system exception. If it does, no other Interceptors' send_poll operations are called. Those Interceptors on the Flow Stack are popped and their receive_exception interception points are called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        TIMEOUT - thrown if the response is not available before the poll time-out expires

      • receive_reply

        void receive_reply(ClientRequestInfo ri)
        Allows an Interceptor to query the information on a reply after it is returned from the server and before control is returned to the client.

        This interception point may throw a system exception. If it does, no other Interceptors' receive_reply operations are called. The remaining Interceptors in the Flow Stack shall have their receive_exception interception point called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_YES.

        Parameters:
        ri - Information about the current request being intercepted.

      • receive_exception

        void receive_exception(ClientRequestInfo ri)
                throws ForwardRequest
        Indicates to the interceptor that an exception occurred. Allows an Interceptor to query the exception's information before it is thrown to the client.

        This interception point may throw a system exception. This has the effect of changing the exception which successive Interceptors popped from the Flow Stack receive on their calls to receive_exception. The exception thrown to the client will be the last exception thrown by an Interceptor, or the original exception if no Interceptor changes the exception.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, no other Interceptors' receive_exception operations are called. The remaining Interceptors in the Flow Stack are popped and have their receive_other interception point called.

        If the completion_status of the exception is not COMPLETED_NO, then it is inappropriate for this interception point to throw a ForwardRequest exception. The request s at-most-once semantics would be lost.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. If the original exception is a system exception, the completion_status of the new exception shall be the same as on the original. If the original exception is a user exception, then the completion_status of the new exception shall be COMPLETED_YES.

        Under some conditions, depending on what policies are in effect, an exception (such as COMM_FAILURE) may result in a retry of the request. While this retry is a new request with respect to Interceptors, there is one point of correlation between the original request and the retry: because control has not returned to the client, the PortableInterceptor.Current for both the original request and the retrying request is the same.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.

      • receive_other

        void receive_other(ClientRequestInfo ri)
            throws ForwardRequest
        Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception. For example, a request could result in a retry (e.g., a GIOP Reply with a LOCATION_FORWARD status was received); or on asynchronous calls, the reply does not immediately follow the request, but control shall return to the client and an ending interception point shall be called.

        For retries, depending on the policies in effect, a new request may or may not follow when a retry has been indicated. If a new request does follow, while this request is a new request, with respect to Interceptors, there is one point of correlation between the original request and the retry: because control has not returned to the client, the request scoped PortableInterceptor.Current for both the original request and the retrying request is the same.

        This interception point may throw a system exception. If it does, no other Interceptors' receive_other operations are called. The remaining Interceptors in the Flow Stack are popped and have their receive_exception interception point called.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, successive Interceptors' receive_other operations are called with the new information provided by the ForwardRequest exception.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO. If the target invocation had completed, this interception point would not be called.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class CurrentHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.CurrentHelper

  • public abstract class CurrentHelper
extends Object
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context. Each service which wishes to use PICurrent reserves a slot or slots at initialization time and uses those slots during the processing of requests and replies.

    Before an invocation is made, PICurrent is obtained via a call to ORB.resolve_initial_references( "PICurrent" ). From within the interception points, the data on PICurrent that has moved from the thread scope to the request scope is available via the get_slot operation on the RequestInfo object. A PICurrent can still be obtained via resolve_initial_references, but that is the Interceptor's thread scope PICurrent.

    • Constructor Summary

      Constructors
      Constructor and Description
      CurrentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Current | extract(Any a)
      static String | id()
      static void | insert(Any a, Current that)
      static Current | narrow(Object obj)
      static Current | read(InputStream istream)
      static TypeCode | type()
      static Current | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, Current value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CurrentHelper

        public CurrentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Current that)

      • extract

        public static Current extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Current read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Current value)

      • narrow

        public static Current narrow(Object obj)

      • unchecked_narrow

        public static Current unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface CurrentOperations

  • All Superinterfaces:
    CurrentOperations
    All Known Subinterfaces:
    Current

    public interface CurrentOperations
extends CurrentOperations
    Portable Interceptors Current (also known as PICurrent) is merely a slot table, the slots of which are used by each service to transfer their context data between their context and the request's or reply's service context. Each service which wishes to use PICurrent reserves a slot or slots at initialization time and uses those slots during the processing of requests and replies.

    Before an invocation is made, PICurrent is obtained via a call to ORB.resolve_initial_references( "PICurrent" ). From within the interception points, the data on PICurrent that has moved from the thread scope to the request scope is available via the get_slot operation on the RequestInfo object. A PICurrent can still be obtained via resolve_initial_references, but that is the Interceptor's thread scope PICurrent.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Any get_slot(int id)
      Retrieves the slot data the application set in PICurrent via get_slot.
      void set_slot(int id, Any data)
      Sets data in a slot.

    • Method Detail

      • get_slot

        Any get_slot(int id)
      throws InvalidSlot
        Retrieves the slot data the application set in PICurrent via get_slot. The data is in the form of an Any.

        If the given slot has not been set, an Any containing a type code with a TCKind value of tk_null and no value is returned.

        Parameters:
        id - The SlotId of the slot from which the data will be returned.
        Returns:
        The data, in the form of an Any, of the given slot identifier.
        Throws:
        InvalidSlot - thrown if get_slot is called on a slot that has not been allocated.
        BAD_INV_ORDER - thrown if get_slot is called from within an ORB initializer

      • set_slot

        void set_slot(int id,
              Any data)
       throws InvalidSlot
        Sets data in a slot. The data is in the form of an Any. If data already exists in that slot, it is overridden.
        Parameters:
        id - The SlotId of the slot to which the data will be set.
        data - The data, in the form of an Any, which will be set to the identified slot.
        Throws:
        InvalidSlot - thrown if set_slot is called on a slot that has not been allocated.
        BAD_INV_ORDER - thrown if set_slot is called from within an ORB initializer.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DISCARDING

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface DISCARDING

  • public interface DISCARDING
    org/omg/PortableInterceptor/DISCARDING.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Object adapter state that causes all requests to be discarded.

    • Field Detail

      • value

        static final short value
        Object adapter state that causes all requests to be discarded.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ForwardRequest

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableInterceptor.ForwardRequest
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ForwardRequest
extends UserException
    org/omg/PortableInterceptor/ForwardRequest.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Object forward
      The new object to forward the request to.

    • Constructor Summary

      Constructors
      Constructor and Description
      ForwardRequest()
      ForwardRequest(Object _forward)
      ForwardRequest(String $reason, Object _forward)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • forward

        public Object forward
        The new object to forward the request to.

    • Constructor Detail

      • ForwardRequest

        public ForwardRequest()

      • ForwardRequest

        public ForwardRequest(Object _forward)

      • ForwardRequest

        public ForwardRequest(String $reason,
                      Object _forward)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardRequestHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ForwardRequestHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ForwardRequestHelper

  • public abstract class ForwardRequestHelper
extends Object
    org/omg/PortableInterceptor/ForwardRequestHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ForwardRequestHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ForwardRequest | extract(Any a)
      static String | id()
      static void | insert(Any a, ForwardRequest that)
      static ForwardRequest | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ForwardRequest value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ForwardRequestHelper

        public ForwardRequestHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ForwardRequest that)

      • extract

        public static ForwardRequest extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ForwardRequest read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ForwardRequest value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HOLDING

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface HOLDING

  • public interface HOLDING
    org/omg/PortableInterceptor/HOLDING.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Object adapter state that holds requests temporarily until the state is changed.

    • Field Detail

      • value

        static final short value
        Object adapter state that holds requests temporarily until the state is changed.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


INACTIVE

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface INACTIVE

  • public interface INACTIVE
    org/omg/PortableInterceptor/INACTIVE.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Object adapter state that causes all requests to be discarded.

    • Field Detail

      • value

        static final short value
        Object adapter state that causes all requests to be discarded. This state indicates that the adapter is shutting down.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface InterceptorOperations

  • All Known Subinterfaces:
    ClientRequestInterceptor, ClientRequestInterceptorOperations, Interceptor, IORInterceptor, IORInterceptor_3_0, IORInterceptor_3_0Operations, IORInterceptorOperations, ServerRequestInterceptor, ServerRequestInterceptorOperations

    public interface InterceptorOperations
    All Portable Interceptors implement Interceptor.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void destroy()
      Provides an opportunity to destroy this interceptor.
      String name()
      Returns the name of the interceptor.

    • Method Detail

      • name

        String name()
        Returns the name of the interceptor.

        Each Interceptor may have a name that may be used administratively to order the lists of Interceptors. Only one Interceptor of a given name can be registered with the ORB for each Interceptor type. An Interceptor may be anonymous, i.e., have an empty string as the name attribute. Any number of anonymous Interceptors may be registered with the ORB.

        Returns:
        the name of the interceptor.

      • destroy

        void destroy()
        Provides an opportunity to destroy this interceptor. The destroy method is called during ORB.destroy. When an application calls ORB.destroy, the ORB:
        1. waits for all requests in progress to complete
        2. calls the Interceptor.destroy operation for each interceptor
        3. completes destruction of the ORB
        Method invocations from within Interceptor.destroy on object references for objects implemented on the ORB being destroyed result in undefined behavior. However, method invocations on objects implemented on an ORB other than the one being destroyed are permitted. (This means that the ORB being destroyed is still capable of acting as a client, but not as a server.)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidSlot

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class InvalidSlot

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableInterceptor.InvalidSlot
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidSlot
extends UserException
    org/omg/PortableInterceptor/InvalidSlot.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidSlot()
      InvalidSlot(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidSlot

        public InvalidSlot()

      • InvalidSlot

        public InvalidSlot(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidSlotHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class InvalidSlotHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.InvalidSlotHelper

  • public abstract class InvalidSlotHelper
extends Object
    org/omg/PortableInterceptor/InvalidSlotHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidSlotHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidSlot | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidSlot that)
      static InvalidSlot | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidSlot value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidSlotHelper

        public InvalidSlotHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidSlot that)

      • extract

        public static InvalidSlot extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidSlot read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidSlot value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInfoOperations

  • All Known Subinterfaces:
    IORInfo

    public interface IORInfoOperations
    Provides the server-side ORB service with access to the applicable policies during IOR construction and the ability to add components. The ORB passes an instance of its implementation of this interface as a parameter to IORInterceptor.establish_components.
    See Also:
    IORInterceptor

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReferenceTemplate adapter_template()
      Return the object reference template of the object adapter that was just created and is running IOR interceptors.
      void add_ior_component_to_profile(TaggedComponent tagged_component, int profile_id)
      A portable ORB service implementation calls add_ior_component_to_profile from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.
      void add_ior_component(TaggedComponent tagged_component)
      A portable ORB service implementation calls add_ior_component from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.
      ObjectReferenceFactory current_factory()
      On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.
      void current_factory(ObjectReferenceFactory newCurrent_factory)
      On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.
      Policy get_effective_policy(int type)
      Allows an ORB service implementation to determine what server side policy of a particular type is in effect for an IOR being constructed.
      int manager_id()
      Return the adapter manager id of the object adapter that was just created and is running IOR interceptors.
      short state()
      Return the adapter state of the object adapter that was just created and is running IOR interceptors.

    • Method Detail

      • get_effective_policy

        Policy get_effective_policy(int type)
        Allows an ORB service implementation to determine what server side policy of a particular type is in effect for an IOR being constructed. When the IOR being constructed is for an object implemented using a POA, all Policy objects passed to the PortableServer.POA.create_POA call that created that POA are accessable via get_effective_policy.

        If a policy for the given type is not known to the ORB, then this operation will throw INV_POLICY with a standard minor code of 2.

        Parameters:
        type - an int specifying the type of policy to return.
        Returns:
        The effective CORBA.Policy object of the requested type. If the given policy type is known, but no policy of that type is in effect, then this operation will return a nil object reference.

      • add_ior_component

        void add_ior_component(TaggedComponent tagged_component)
        A portable ORB service implementation calls add_ior_component from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs. The components in this set will be included in all profiles.

        Any number of components may exist with the same component ID.

        Parameters:
        tagged_component - The IOP.TaggedComponent to add.

      • add_ior_component_to_profile

        void add_ior_component_to_profile(TaggedComponent tagged_component,
                                  int profile_id)
        A portable ORB service implementation calls add_ior_component_to_profile from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs. The components in this set will be included in the specified profile.

        Any number of components may exist with the same component ID.

        Parameters:
        tagged_component - The IOP.TaggedComponent to add.
        profile_id - The profile id of the profile to which this component will be added.
        Throws:
        BAD_PARAM - thrown, with a standard minor code of 29, if the given profile ID does not define a known profile or it is impossible to add components to that profile.

      • manager_id

        int manager_id()
        Return the adapter manager id of the object adapter that was just created and is running IOR interceptors.

      • state

        short state()
        Return the adapter state of the object adapter that was just created and is running IOR interceptors.

      • adapter_template

        ObjectReferenceTemplate adapter_template()
        Return the object reference template of the object adapter that was just created and is running IOR interceptors.

      • current_factory

        ObjectReferenceFactory current_factory()
        On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors. By default, this factory is the same as the value of the adapter_template attribute. The current_factory may also be set to another object reference template inside an IORInterceptor_3_0.

      • current_factory

        void current_factory(ObjectReferenceFactory newCurrent_factory)
        On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors. By default, this factory is the same as the value of the adapter_template attribute. The current_factory may also be set to another object reference template inside an IORInterceptor_3_0.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInterceptorOperations

  • All Superinterfaces:
    InterceptorOperations
    All Known Subinterfaces:
    IORInterceptor, IORInterceptor_3_0, IORInterceptor_3_0Operations

    public interface IORInterceptorOperations
extends InterceptorOperations
    Interceptor used to establish tagged components in the profiles within an IOR.

    In some cases, a portable ORB service implementation may need to add information describing the server's or object's ORB service related capabilities to object references in order to enable the ORB service implementation in the client to function properly.

    This is supported through the IORInterceptor and IORInfo interfaces.

    See Also:
    IORInfo

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void establish_components(IORInfo info)
      A server side ORB calls the establish_components operation on all registered IORInterceptor instances when it is assembling the list of components that will be included in the profile or profiles of an object reference.

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

    • Method Detail

      • establish_components

        void establish_components(IORInfo info)
        A server side ORB calls the establish_components operation on all registered IORInterceptor instances when it is assembling the list of components that will be included in the profile or profiles of an object reference. This operation is not necessarily called for each individual object reference. In the case of the POA, this operation is called each time POA::create_POA is called. In any case, establish_components is guaranteed to be called at least once for each distinct set of server policies.

        An implementation of establish_components must not throw exceptions. If it does, the ORB shall ignore the exception and proceed to call the next IOR Interceptor's establish_components operation.

        Parameters:
        info - The IORInfo instance used by the ORB service to query applicable policies and add components to be included in the generated IORs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptor_3_0Helper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class IORInterceptor_3_0Helper

  • java.lang.Object
    • org.omg.PortableInterceptor.IORInterceptor_3_0Helper

  • public abstract class IORInterceptor_3_0Helper
extends Object
    org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      IORInterceptor_3_0Helper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static IORInterceptor_3_0 | extract(Any a)
      static String | id()
      static void | insert(Any a, IORInterceptor_3_0 that)
      static IORInterceptor_3_0 | narrow(Object obj)
      static IORInterceptor_3_0 | read(InputStream istream)
      static TypeCode | type()
      static IORInterceptor_3_0 | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, IORInterceptor_3_0 value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • IORInterceptor_3_0Helper

        public IORInterceptor_3_0Helper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          IORInterceptor_3_0 that)

      • extract

        public static IORInterceptor_3_0 extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static IORInterceptor_3_0 read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         IORInterceptor_3_0 value)

      • narrow

        public static IORInterceptor_3_0 narrow(Object obj)

      • unchecked_narrow

        public static IORInterceptor_3_0 unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptor_3_0Holder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class IORInterceptor_3_0Holder

  • java.lang.Object
    • org.omg.PortableInterceptor.IORInterceptor_3_0Holder
  • All Implemented Interfaces:
    Streamable

    public final class IORInterceptor_3_0Holder
extends Object
implements Streamable
    org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      IORInterceptor_3_0 value

    • Constructor Summary

      Constructors
      Constructor and Description
      IORInterceptor_3_0Holder()
      IORInterceptor_3_0Holder(IORInterceptor_3_0 initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public IORInterceptor_3_0 value

    • Constructor Detail

      • IORInterceptor_3_0Holder

        public IORInterceptor_3_0Holder()

      • IORInterceptor_3_0Holder

        public IORInterceptor_3_0Holder(IORInterceptor_3_0 initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IORInterceptor_3_0Operations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface IORInterceptor_3_0Operations

  • All Superinterfaces:
    InterceptorOperations, IORInterceptorOperations
    All Known Subinterfaces:
    IORInterceptor_3_0

    public interface IORInterceptor_3_0Operations
extends IORInterceptorOperations
    org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void adapter_manager_state_changed(int id, short state)
      Called whenever the state of an adapter manager changes.
      void adapter_state_changed(ObjectReferenceTemplate[] templates, short state)
      Called whenever the state of an object adapter changes, and the state change is not caused by an adapter manager.
      void components_established(IORInfo info)
      The components_established method is invoked on all registered IORInterceptor_3_0 instances after establish_components has been invoked on all registered IORInterceptor instances.

      • Methods inherited from interface org.omg.PortableInterceptor.IORInterceptorOperations

        establish_components

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

    • Method Detail

      • components_established

        void components_established(IORInfo info)
        The components_established method is invoked on all registered IORInterceptor_3_0 instances after establish_components has been invoked on all registered IORInterceptor instances. The adapter_template is available in info during this call. The current_factory may be get or set in info during this call.

        Any exception thrown from this method is handled by the Object Adapter that called this interceptor. In the case of the POA, an exception results in a OBJ_ADAPTER exception with an OMG standard minor code of 6.

        Parameters:
        info - The IORInfo for the object adapter being created.

      • adapter_manager_state_changed

        void adapter_manager_state_changed(int id,
                                   short state)
        Called whenever the state of an adapter manager changes. For the POA, that is the POAManager. If the state change is reported through adapter_manager_state_changed, it is not reported through adapter_state_changed.
        Parameters:
        id - the adapter manager id of the adapter manager that changed state
        state - the new state of the adapter manager

      • adapter_state_changed

        void adapter_state_changed(ObjectReferenceTemplate[] templates,
                           short state)
        Called whenever the state of an object adapter changes, and the state change is not caused by an adapter manager. Such changes are reported to all registered IORInterceptor_3_0 instances.
        Parameters:
        templates - the sequence of ObjectReferenceTemplate instances on which this state change occurred.
        state - the new AdapterState shared by all of the templates.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LOCATION_FORWARD

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface LOCATION_FORWARD

  • public interface LOCATION_FORWARD
    org/omg/PortableInterceptor/LOCATION_FORWARD.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Indicates a LocationForward reply status.

    • Field Detail

      • value

        static final short value
        Indicates a LocationForward reply status. One possible value for RequestInfo.reply_status.
        See Also:
        RequestInfoOperations.reply_status(), SUCCESSFUL, SYSTEM_EXCEPTION, USER_EXCEPTION, TRANSPORT_RETRY, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NON_EXISTENT

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface NON_EXISTENT

  • public interface NON_EXISTENT
    org/omg/PortableInterceptor/NON_EXISTENT.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Object adapter state indicating that the adapter has been destroyed.

    • Field Detail

      • value

        static final short value
        Object adapter state indicating that the adapter has been destroyed.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectIdHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectIdHelper

  • public abstract class ObjectIdHelper
extends Object
    Type of an object id. This provides the identity of a particular object that was created by an object adapter.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static byte[] | extract(Any a)
      static String | id()
      static void | insert(Any a, byte[] that)
      static byte[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, byte[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectIdHelper

        public ObjectIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          byte[] that)

      • extract

        public static byte[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static byte[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         byte[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ObjectReferenceFactory

  • All Superinterfaces:
    IDLEntity, Serializable, ValueBase
    All Known Subinterfaces:
    ObjectReferenceTemplate

    public interface ObjectReferenceFactory
extends ValueBase
    The object reference factory. This provides the capability of creating an object reference.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object make_object(String repositoryId, byte[] object_id)
      make_object creates a CORBA object reference according to the data in this template, with the given repository ID and object ID.

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids

    • Method Detail

      • make_object

        Object make_object(String repositoryId,
                   byte[] object_id)
        make_object creates a CORBA object reference according to the data in this template, with the given repository ID and object ID.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceFactoryHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceFactoryHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceFactoryHelper

  • public abstract class ObjectReferenceFactoryHelper
extends Object
    The object reference factory. This provides the capability of creating an object reference.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceFactoryHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ObjectReferenceFactory | extract(Any a)
      static String | id()
      static void | insert(Any a, ObjectReferenceFactory that)
      static ObjectReferenceFactory | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ObjectReferenceFactory value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectReferenceFactoryHelper

        public ObjectReferenceFactoryHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ObjectReferenceFactory that)

      • extract

        public static ObjectReferenceFactory extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ObjectReferenceFactory read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ObjectReferenceFactory value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceFactoryHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceFactoryHolder

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceFactoryHolder
  • All Implemented Interfaces:
    Streamable

    public final class ObjectReferenceFactoryHolder
extends Object
implements Streamable
    The object reference factory. This provides the capability of creating an object reference.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ObjectReferenceFactory value

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceFactoryHolder()
      ObjectReferenceFactoryHolder(ObjectReferenceFactory initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ObjectReferenceFactory value

    • Constructor Detail

      • ObjectReferenceFactoryHolder

        public ObjectReferenceFactoryHolder()

      • ObjectReferenceFactoryHolder

        public ObjectReferenceFactoryHolder(ObjectReferenceFactory initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceTemplate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ObjectReferenceTemplate

  • All Superinterfaces:
    IDLEntity, ObjectReferenceFactory, Serializable, ValueBase

    public interface ObjectReferenceTemplate
extends ObjectReferenceFactory
    The object reference template. An instance of this must exist for each object adapter created in an ORB. The server_id, orb_id, and adapter_name attributes uniquely identify this template within the scope of an IMR. Note that adapter_id is similarly unique within the same scope, but it is opaque, and less useful in many cases.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String[] adapter_name()
      String orb_id()
      String server_id()

      • Methods inherited from interface org.omg.PortableInterceptor.ObjectReferenceFactory

        make_object

      • Methods inherited from interface org.omg.CORBA.portable.ValueBase

        _truncatable_ids

    • Method Detail

      • server_id

        String server_id()

      • orb_id

        String orb_id()

      • adapter_name

        String[] adapter_name()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceTemplateHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceTemplateHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceTemplateHelper

  • public abstract class ObjectReferenceTemplateHelper
extends Object
    The object reference template. An instance of this must exist for each object adapter created in an ORB. The server_id, orb_id, and adapter_name attributes uniquely identify this template within the scope of an IMR. Note that adapter_id is similarly unique within the same scope, but it is opaque, and less useful in many cases.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceTemplateHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ObjectReferenceTemplate | extract(Any a)
      static String | id()
      static void | insert(Any a, ObjectReferenceTemplate that)
      static ObjectReferenceTemplate | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ObjectReferenceTemplate value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectReferenceTemplateHelper

        public ObjectReferenceTemplateHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ObjectReferenceTemplate that)

      • extract

        public static ObjectReferenceTemplate extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ObjectReferenceTemplate read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ObjectReferenceTemplate value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceTemplateHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceTemplateHolder

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceTemplateHolder
  • All Implemented Interfaces:
    Streamable

    public final class ObjectReferenceTemplateHolder
extends Object
implements Streamable
    The object reference template. An instance of this must exist for each object adapter created in an ORB. The server_id, orb_id, and adapter_name attributes uniquely identify this template within the scope of an IMR. Note that adapter_id is similarly unique within the same scope, but it is opaque, and less useful in many cases.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ObjectReferenceTemplate value

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceTemplateHolder()
      ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ObjectReferenceTemplate value

    • Constructor Detail

      • ObjectReferenceTemplateHolder

        public ObjectReferenceTemplateHolder()

      • ObjectReferenceTemplateHolder

        public ObjectReferenceTemplateHolder(ObjectReferenceTemplate initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceTemplateSeqHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceTemplateSeqHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper

  • public abstract class ObjectReferenceTemplateSeqHelper
extends Object
    Sequence of object reference templates is used for reporting state changes that do not occur on the adapter manager.

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceTemplateSeqHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ObjectReferenceTemplate[] | extract(Any a)
      static String | id()
      static void | insert(Any a, ObjectReferenceTemplate[] that)
      static ObjectReferenceTemplate[] | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ObjectReferenceTemplate[] value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectReferenceTemplateSeqHelper

        public ObjectReferenceTemplateSeqHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ObjectReferenceTemplate[] that)

      • extract

        public static ObjectReferenceTemplate[] extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ObjectReferenceTemplate[] read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ObjectReferenceTemplate[] value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReferenceTemplateSeqHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ObjectReferenceTemplateSeqHolder

  • java.lang.Object
    • org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder
  • All Implemented Interfaces:
    Streamable

    public final class ObjectReferenceTemplateSeqHolder
extends Object
implements Streamable
    Sequence of object reference templates is used for reporting state changes that do not occur on the adapter manager.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      ObjectReferenceTemplate[] value

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectReferenceTemplateSeqHolder()
      ObjectReferenceTemplateSeqHolder(ObjectReferenceTemplate[] initialValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream i)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream o)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public ObjectReferenceTemplate[] value

    • Constructor Detail

      • ObjectReferenceTemplateSeqHolder

        public ObjectReferenceTemplateSeqHolder()

      • ObjectReferenceTemplateSeqHolder

        public ObjectReferenceTemplateSeqHolder(ObjectReferenceTemplate[] initialValue)

    • Method Detail

      • _read

        public void _read(InputStream i)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        i - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream o)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        o - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ORBIdHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ORBIdHelper

  • public abstract class ORBIdHelper
extends Object
    org/omg/PortableInterceptor/ORBIdHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ORBIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ORBIdHelper

        public ORBIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBInitializerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ORBInitializerOperations

  • All Known Subinterfaces:
    ORBInitializer

    public interface ORBInitializerOperations
    Facilitates interceptor registration and ORB initialization.

    Interceptors are intended to be a means by which ORB services gain access to ORB processing, effectively becoming part of the ORB. Since Interceptors are part of the ORB, when ORB.init returns an ORB, the Interceptors shall have been registered. Interceptors cannot be registered on an ORB after it has been returned by a call to ORB.init.

    An Interceptor is registered by registering an associated ORBInitializer object which implements the ORBInitializer interface. When an ORB is initializing, it shall call each registered ORBInitializer, passing it an ORBInitInfo object which is used to register its Interceptor.

    Registering ORB Initializers in Java

    ORBInitializers are registered via Java ORB properties.

    The property names are of the form:

    org.omg.PortableInterceptor.ORBInitializerClass.<Service>
    where <Service> is the string name of a class which implements
    org.omg.PortableInterceptor.ORBInitializer
    To avoid name collisions, the reverse DNS name convention should be used. For example, if company X has three initializers, it could define the following properties:
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3
    During ORB.init, these ORB properties which begin with org.omg.PortableInterceptor.ORBInitializerClass shall be collected, the <Service> portion of each property shall be extracted, an object shall be instantiated with the <Service> string as its class name, and the pre_init and post_init methods shall be called on that object. If there are any exceptions, the ORB shall ignore them and proceed.

    Example

    A client-side logging service written by company X, for example, may have the following ORBInitializer implementation:

     package com.x.logging;

 import org.omg.PortableInterceptor.Interceptor;
 import org.omg.PortableInterceptor.ORBInitializer;
 import org.omg.PortableInterceptor.ORBInitInfo;

 public class LoggingService implements ORBInitializer {
     void pre_init( ORBInitInfo info ) {
         // Instantiate the Logging Service s Interceptor.
         Interceptor interceptor = new LoggingInterceptor();

         // Register the Logging Service s Interceptor.
         info.add_client_request_interceptor( interceptor );
     }

     void post_init( ORBInitInfo info ) {
         // This service does not need two init points.
     }
 }
    To run a program called MyApp using this logging service, the user could type:
    java -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService MyApp

    Notes about Registering Interceptors

    Request Interceptors are registered on a per-ORB basis.

    To achieve virtual per-object Interceptors, query the policies on the target from within the interception points to determine whether they should do any work.

    To achieve virtual per-POA Interceptors, instantiate each POA with a different ORB. While Interceptors may be ordered administratively, there is no concept of order with respect to the registration of Interceptors. Request Interceptors are concerned with service contexts. Service contexts have no order, so there is no purpose for request Interceptors to have an order. IOR Interceptors are concerned with tagged components. Tagged components also have no order, so there is no purpose for IOR Interceptors to have an order.

    Registration code should avoid using the ORB (i.e., calling ORB.init with the provided orb_id). Since registration occurs during ORB initialization, results of invocations on this ORB while it is in this state are undefined.

    See Also:
    ORBInitInfo

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void post_init(ORBInitInfo info)
      Called during ORB initialization.
      void pre_init(ORBInitInfo info)
      Called during ORB initialization.

    • Method Detail

      • pre_init

        void pre_init(ORBInitInfo info)
        Called during ORB initialization. If it is expected that initial services registered by an interceptor will be used by other interceptors, then those initial services shall be registered at this point via calls to ORBInitInfo.register_initial_reference.
        Parameters:
        info - provides initialization attributes and operations by which Interceptors can be registered.

      • post_init

        void post_init(ORBInitInfo info)
        Called during ORB initialization. If a service must resolve initial references as part of its initialization, it can assume that all initial references will be available at this point.

        Calling the post_init operations is not the final task of ORB initialization. The final task, following the post_init calls, is attaching the lists of registered interceptors to the ORB. Therefore, the ORB does not contain the interceptors during calls to post_init. If an ORB-mediated call is made from within post_init, no request interceptors will be invoked on that call. Likewise, if an operation is performed which causes an IOR to be created, no IOR interceptors will be invoked.

        Parameters:
        info - provides initialization attributes and operations by which Interceptors can be registered.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBInitInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ORBInitInfoOperations

  • All Known Subinterfaces:
    ORBInitInfo

    public interface ORBInitInfoOperations
    Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing.

    The ORBInitInfo object is only valid during ORB.init. If a service keeps a reference to its ORBInitInfo object and tries to use it after ORB.init returns, the object no longer exists and an OBJECT_NOT_EXIST exception shall be thrown.

    See Also:
    ORBInitializer

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void add_client_request_interceptor(ClientRequestInterceptor interceptor)
      Used to add a client-side request Interceptor to the list of client-side request Interceptors.
      void add_ior_interceptor(IORInterceptor interceptor)
      Used to add an IOR Interceptor to the list of IOR Interceptors.
      void add_server_request_interceptor(ServerRequestInterceptor interceptor)
      Used to add a server-side request Interceptor to the list of server-side request Interceptors.
      int allocate_slot_id()
      Called to allocate a slot on PortableInterceptor.Current.
      String[] arguments()
      Returns the arguments passed to ORB.init.
      CodecFactory codec_factory()
      Returns the IOP.CodecFactory.
      String orb_id()
      Returns the ID of the ORB being initialized.
      void register_initial_reference(String id, Object obj)
      Identical to ORB.register_initial_reference.
      void register_policy_factory(int type, PolicyFactory policy_factory)
      Registers a PolicyFactory for the given PolicyType.
      Object resolve_initial_references(String id)
      Identical to ORB.resolve_initial_references.

    • Method Detail

      • arguments

        String[] arguments()
        Returns the arguments passed to ORB.init. They may or may not contain the ORB's arguments.

      • orb_id

        String orb_id()
        Returns the ID of the ORB being initialized.

      • codec_factory

        CodecFactory codec_factory()
        Returns the IOP.CodecFactory. The CodecFactory is normally obtained via a call to ORB.resolve_initial_references( "CodecFactory" ), but since the ORB is not yet available and Interceptors, particularly when processing service contexts, will require a Codec, a means of obtaining a Codec is necessary during ORB initialization.

      • register_initial_reference

        void register_initial_reference(String id,
                                Object obj)
                         throws InvalidName
        Identical to ORB.register_initial_reference. This same functionality exists here because the ORB, not yet fully initialized, is not yet available but initial references may need to be registered as part of Interceptor registration. The only difference is that the version of this operation on the ORB uses PIDL (CORBA.ORB.ObjectId) and (CORBA.ORB.InvalidName) whereas the version in this interface uses IDL defined in this interface; the semantics are identical.
        Throws:
        InvalidName

      • resolve_initial_references

        Object resolve_initial_references(String id)
                           throws InvalidName
        Identical to ORB.resolve_initial_references. This same functionality exists here because the ORB, not yet fully initialized, is not yet available but initial references may be required from the ORB as part of Interceptor registration. The only difference is that the version of this operation on the ORB uses PIDL (CORBA::ORB::ObjectId and CORBA::ORB::InvalidName) whereas the version in this interface uses IDL defined in this interface; the semantics are identical.

        This operation is only valid during post_init.

        Throws:
        InvalidName

      • add_client_request_interceptor

        void add_client_request_interceptor(ClientRequestInterceptor interceptor)
                             throws DuplicateName
        Used to add a client-side request Interceptor to the list of client-side request Interceptors.
        Parameters:
        interceptor - The ClientRequestInterceptor to be added.
        Throws:
        DuplicateName - thrown if a client-side request Interceptor has already been registered with this Interceptor's name.

      • add_server_request_interceptor

        void add_server_request_interceptor(ServerRequestInterceptor interceptor)
                             throws DuplicateName
        Used to add a server-side request Interceptor to the list of server-side request Interceptors.
        Parameters:
        interceptor - The ServerRequestInterceptor to be added.
        Throws:
        DuplicateName - thrown if a server-side request Interceptor has already been registered with this Interceptor's name

      • add_ior_interceptor

        void add_ior_interceptor(IORInterceptor interceptor)
                  throws DuplicateName
        Used to add an IOR Interceptor to the list of IOR Interceptors.
        Parameters:
        interceptor - The IORInterceptor to be added.
        Throws:
        DuplicateName - thrown if an IOR Interceptor has already been registered with this Interceptor's name.

      • allocate_slot_id

        int allocate_slot_id()
        Called to allocate a slot on PortableInterceptor.Current.

        Note that while slot id's can be allocated within an ORB initializer, the slots themselves cannot be initialized.

        Returns:
        The index to the slot which has been allocated.
        Throws:
        BAD_INV_ORDER - thrown, with a standard minor code of 14, if set_slot or get_slot is called on the PICurrent within an ORB initializer.
        See Also:
        Current

      • register_policy_factory

        void register_policy_factory(int type,
                             PolicyFactory policy_factory)
        Registers a PolicyFactory for the given PolicyType.
        Parameters:
        type - The policy type that the given PolicyFactory serves.
        policy_factory - The factory for the given policy type.
        Throws:
        BAD_INV_ORDER - thrown, with a standard minor code of 16, if a PolicyFactory already exists for the given PolicyType.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ORBInitInfoPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableInterceptor.ORBInitInfoPackage

This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.

See: Description

  • Class Summary
    Class Description
    DuplicateNameHelper
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java .
    InvalidNameHelper
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java .
    ObjectIdHelper
    Object id, represented as a String
  • Exception Summary
    Exception Description
    DuplicateName
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .
    InvalidName
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java .

Package org.omg.PortableInterceptor.ORBInitInfoPackage Description

This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2. Please refer to that OMG specification for further details.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableInterceptor.ORBInitInfoPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableInterceptor.ORBInitInfoPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper
    • org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper
    • org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName
          • org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableInterceptor.ORBInitInfoPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableInterceptor.ORBInitInfoPackage

  • Packages that use org.omg.PortableInterceptor.ORBInitInfoPackage
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.
  • Classes in org.omg.PortableInterceptor.ORBInitInfoPackage used by org.omg.PortableInterceptor
    Class and Description
    DuplicateName
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .
    InvalidName
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java .
  • Classes in org.omg.PortableInterceptor.ORBInitInfoPackage used by org.omg.PortableInterceptor.ORBInitInfoPackage
    Class and Description
    DuplicateName
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .
    InvalidName
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName

  • Packages that use DuplicateName
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.

    • Uses of DuplicateName in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that throw DuplicateName
      Modifier and Type Method and Description
      void ORBInitInfoOperations.add_client_request_interceptor(ClientRequestInterceptor interceptor)
      Used to add a client-side request Interceptor to the list of client-side request Interceptors.
      void ORBInitInfoOperations.add_ior_interceptor(IORInterceptor interceptor)
      Used to add an IOR Interceptor to the list of IOR Interceptors.
      void ORBInitInfoOperations.add_server_request_interceptor(ServerRequestInterceptor interceptor)
      Used to add a server-side request Interceptor to the list of server-side request Interceptors.

    • Uses of DuplicateName in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage that return DuplicateName
      Modifier and Type | Method and Description
      static DuplicateName | DuplicateNameHelper.extract(Any a)
      static DuplicateName | DuplicateNameHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage with parameters of type DuplicateName
      Modifier and Type | Method and Description
      static void | DuplicateNameHelper.insert(Any a, DuplicateName that)
      static void | DuplicateNameHelper.write(OutputStream ostream, DuplicateName value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper

No usage of org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName

  • Packages that use InvalidName
    Package Description
    org.omg.PortableInterceptor
    Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB.
    org.omg.PortableInterceptor.ORBInitInfoPackage
    This package contains the exceptions and typedefs from the ORBInitInfo local interface of the PortableInterceptor module specified in the OMG Portable Interceptor specification, http://cgi.omg.org/cgi-bin/doc?ptc/2000-08-06, section 21.7.2.

    • Uses of InvalidName in org.omg.PortableInterceptor

      Methods in org.omg.PortableInterceptor that throw InvalidName
      Modifier and Type Method and Description
      void ORBInitInfoOperations.register_initial_reference(String id, Object obj)
      Identical to ORB.register_initial_reference.
      Object ORBInitInfoOperations.resolve_initial_references(String id)
      Identical to ORB.resolve_initial_references.

    • Uses of InvalidName in org.omg.PortableInterceptor.ORBInitInfoPackage

      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage that return InvalidName
      Modifier and Type | Method and Description
      static InvalidName | InvalidNameHelper.extract(Any a)
      static InvalidName | InvalidNameHelper.read(InputStream istream)
      Methods in org.omg.PortableInterceptor.ORBInitInfoPackage with parameters of type InvalidName
      Modifier and Type | Method and Description
      static void | InvalidNameHelper.insert(Any a, InvalidName that)
      static void | InvalidNameHelper.write(OutputStream ostream, InvalidName value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper

No usage of org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper

No usage of org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DuplicateName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor.ORBInitInfoPackage

Class DuplicateName

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class DuplicateName
extends UserException
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String name
      The name for which there was already an interceptor registered.

    • Constructor Summary

      Constructors
      Constructor and Description
      DuplicateName()
      DuplicateName(String _name)
      DuplicateName(String $reason, String _name)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • name

        public String name
        The name for which there was already an interceptor registered.

    • Constructor Detail

      • DuplicateName

        public DuplicateName()

      • DuplicateName

        public DuplicateName(String _name)

      • DuplicateName

        public DuplicateName(String $reason,
                     String _name)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DuplicateNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor.ORBInitInfoPackage

Class DuplicateNameHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper

  • public abstract class DuplicateNameHelper
extends Object
    org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      DuplicateNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static DuplicateName | extract(Any a)
      static String | id()
      static void | insert(Any a, DuplicateName that)
      static DuplicateName | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, DuplicateName value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DuplicateNameHelper

        public DuplicateNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          DuplicateName that)

      • extract

        public static DuplicateName extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static DuplicateName read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         DuplicateName value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidName

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor.ORBInitInfoPackage

Class InvalidName

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidName
extends UserException
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidName()
      InvalidName(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidName

        public InvalidName()

      • InvalidName

        public InvalidName(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidNameHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor.ORBInitInfoPackage

Class InvalidNameHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper

  • public abstract class InvalidNameHelper
extends Object
    org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidNameHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidName | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidName that)
      static InvalidName | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidName value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidNameHelper

        public InvalidNameHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidName that)

      • extract

        public static InvalidName extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidName read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidName value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor.ORBInitInfoPackage

Class ObjectIdHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper

  • public abstract class ObjectIdHelper
extends Object
    Object id, represented as a String

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectIdHelper

        public ObjectIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PolicyFactoryOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface PolicyFactoryOperations

  • All Known Subinterfaces:
    PolicyFactory

    public interface PolicyFactoryOperations
    Enables policy types to be constructed using CORBA.ORB.create_policy.

    A portable ORB service implementation registers an instance of the PolicyFactory interface during ORB initialization in order to enable its policy types to be constructed using CORBA.ORB.create_policy. The POA is required to preserve any policy which is registered with ORBInitInfo in this manner.

    See Also:
    ORBInitInfoOperations.register_policy_factory(int, org.omg.PortableInterceptor.PolicyFactory)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Policy create_policy(int type, Any value)
      Returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any.

    • Method Detail

      • create_policy

        Policy create_policy(int type,
                     Any value)
              throws PolicyError
        Returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any.

        The ORB calls create_policy on a registered PolicyFactory instance when CORBA.ORB.create_policy is called for the PolicyType under which the PolicyFactory has been registered. The create_policy operation then returns an instance of the appropriate interface derived from CORBA.Policy whose value corresponds to the specified any. If it cannot, it shall throw an exception as described for CORBA.ORB.create_policy.

        Parameters:
        type - An int specifying the type of policy being created.
        value - An any containing data with which to construct the CORBA.Policy.
        Returns:
        A CORBA.Policy object of the specified type and value.
        Throws:
        PolicyError
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface RequestInfoOperations

  • All Known Subinterfaces:
    ClientRequestInfo, ClientRequestInfoOperations, RequestInfo, ServerRequestInfo, ServerRequestInfoOperations

    public interface RequestInfoOperations
    Request Information, accessible to Interceptors.

    Each interception point is given an object through which the Interceptor can access request information. Client-side and server-side interception points are concerned with different information, so there are two information objects: ClientRequestInfo is passed to the client-side interception points and ServerRequestInfo is passed to the server-side interception points. But there is information that is common to both, so they both inherit from a common interface: RequestInfo.

    See Also:
    ClientRequestInfo, ServerRequestInfo

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Parameter[] arguments()
      Returns an array of Parameter objects, containing the arguments on the operation being invoked.
      String[] contexts()
      Returns an array of String objects describing the contexts that may be passed on this operation invocation.
      TypeCode[] exceptions()
      Returns an array of TypeCode objects describing the TypeCodes of the user exceptions that this operation invocation may throw.
      Object forward_reference()
      Contains the object to which the request will be forwarded, if the reply_status attribute is LOCATION_FORWARD.
      ServiceContext get_reply_service_context(int id)
      Returns a copy of the service context with the given ID that is associated with the reply.
      ServiceContext get_request_service_context(int id)
      Returns a copy of the service context with the given ID that is associated with the request.
      Any get_slot(int id)
      Returns the data from the given slot of the PortableInterceptor.Current that is in the scope of the request.
      String[] operation_context()
      Returns an array of String objects containing the contexts being sent on the request.
      String operation()
      Returns the name of the operation being invoked.
      short reply_status()
      Describes the state of the result of the operation invocation.
      int request_id()
      Returns an id that uniquely identifies an active request/reply sequence.
      boolean response_expected()
      Indicates whether a response is expected.
      Any result()
      Returns an any containing the result of the operation invocation.
      short sync_scope()
      Defines how far the request shall progress before control is returned to the client.

    • Method Detail

      • request_id

        int request_id()
        Returns an id that uniquely identifies an active request/reply sequence. Once a request/reply sequence is concluded this ID may be reused. Note that this id is not the same as the GIOP request_id. If GIOP is the transport mechanism used, then these IDs may very well be the same, but this is not guaranteed nor required.

      • operation

        String operation()
        Returns the name of the operation being invoked.

      • arguments

        Parameter[] arguments()
        Returns an array of Parameter objects, containing the arguments on the operation being invoked. If there are no arguments, this attribute will be a zero length array.

        Not all environments provide access to the arguments. With the Java portable bindings, for example, the arguments are not available. In these environments, when this attribute is accessed, NO_RESOURCES will be thrown with a standard minor code of 1.

        Note: Arguments are available for DSI/DII calls.

        Throws:
        NO_RESOURCES - thrown if arguments are not available.
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • exceptions

        TypeCode[] exceptions()
        Returns an array of TypeCode objects describing the TypeCodes of the user exceptions that this operation invocation may throw. If there are no user exceptions, this will return a zero length array.

        Not all environments provide access to the exception list. With the Java portable bindings, for example, the exception list is not available. In these environments, when this attribute is accessed, NO_RESOURCES will be thrown with a standard minor code of 1.

        Note: Exceptions are available for DSI/DII calls.

        Throws:
        NO_RESOURCES - thrown if exceptions are not available.
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • contexts

        String[] contexts()
        Returns an array of String objects describing the contexts that may be passed on this operation invocation. If there are no contexts, this will return a zero length array.

        Not all environments provide access to the context list. With the Java portable bindings, for example, the context list is not available. In these environments, when this attribute is accessed, NO_RESOURCES will be thrown with a standard minor code of 1.

        Note: Contexts are available for DSI/DII calls.

        Throws:
        NO_RESOURCES - thrown if contexts are not available.
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • operation_context

        String[] operation_context()
        Returns an array of String objects containing the contexts being sent on the request.

        Not all environments provide access to the context. With the Java portable bindings, for example, the context is not available. In these environments, when this attribute is accessed, NO_RESOURCES will be thrown with standard minor code of 1.

        Note: operation_context is available for DSI/DII calls.

        Throws:
        NO_RESOURCES - thrown if operation context is not available.
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • result

        Any result()
        Returns an any containing the result of the operation invocation. If the operation return type is void, this attribute will be an any containing a type code with a TCKind value of tk_void and no value.

        Not all environments provide access to the result. With the Java portable bindings, for example, the result is not available. In these environments, when this attribute is accessed, NO_RESOURCES will be thrown with a standard minor code of 1.

        Note: Result is available for DSI/DII calls.

        Throws:
        NO_RESOURCES - thrown if result is not available.
        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • response_expected

        boolean response_expected()
        Indicates whether a response is expected.

        On the client, a reply is not returned when response_expected is false, so receive_reply cannot be called. receive_other is called unless an exception occurs, in which case receive_exception is called.

        On the client, within send_poll, this attribute is true.

      • sync_scope

        short sync_scope()
        Defines how far the request shall progress before control is returned to the client. This is defined in the Messaging specification, and is pertinent only when response_expected is false. If response_expected is true, the value of sync_scope is undefined. This attribute may have one of the following values:
        • Messaging.SYNC_NONE
        • Messaging.SYNC_WITH_TRANSPORT
        • Messaging.SYNC_WITH_SERVER
        • Messaging.SYNC_WITH_TARGET
        On the server, for all scopes, a reply will be created from the return of the target operation call, but the reply will not return to the client. Although it does not return to the client, it does occur, so the normal server-side interception points are followed (i.e., receive_request_service_contexts, receive_request, send_reply or send_exception).

        For SYNC_WITH_SERVER and SYNC_WITH_TARGET, the server does send an empty reply back to the client before the target is invoked. This reply is not intercepted by server-side Interceptors.

        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • reply_status

        short reply_status()
        Describes the state of the result of the operation invocation. The return value can be one of the following:
        • PortableInterceptor.SUCCESSFUL
        • PortableInterceptor.SYSTEM_EXCEPTION
        • PortableInterceptor.USER_EXCEPTION
        • PortableInterceptor.LOCATION_FORWARD
        • PortableInterceptor.TRANSPORT_RETRY
        On the client:
        • Within the receive_reply interception point, this will only return SUCCESSFUL
          • .
        • Within the receive_exception interception point, this will be either SYSTEM_EXCEPTION or USER_EXCEPTION.
        • Within the receive_other interception point, this will be any of: SUCCESSFUL, LOCATION_FORWARD, or TRANSPORT_RETRY. SUCCESSFUL means an asynchronous request returned successfully. LOCATION_FORWARD means that a reply came back with LOCATION_FORWARD as its status. TRANSPORT_RETRY means that the transport mechanism indicated a retry - a GIOP reply with a status of NEEDS_ADDRESSING_MODE, for instance.
        On the server:
        • Within the send_reply interception point, this will only be SUCCESSFUL.
        • Within the send_exception interception point, this will be either SYSTEM_EXCEPTION or USER_EXCEPTION.
        • Within the send_other interception point, this attribute will be any of: SUCCESSFUL, or LOCATION_FORWARD. SUCCESSFUL means an asynchronous request returned successfully. LOCATION_FORWARD means that a reply came back with LOCATION_FORWARD as its status.
        See Also:
        SUCCESSFUL, SYSTEM_EXCEPTION, USER_EXCEPTION, LOCATION_FORWARD, TRANSPORT_RETRY

      • forward_reference

        Object forward_reference()
        Contains the object to which the request will be forwarded, if the reply_status attribute is LOCATION_FORWARD. It is indeterminate whether a forwarded request will actually occur.

      • get_slot

        Any get_slot(int id)
      throws InvalidSlot
        Returns the data from the given slot of the PortableInterceptor.Current that is in the scope of the request.

        If the given slot has not been set, then an any containing a type code with a TCKind value of tk_null is returned.

        Parameters:
        id - The SlotId of the slot which is to be returned.
        Returns:
        The slot data, in the form of an any, obtained with the given identifier.
        Throws:
        InvalidSlot - thrown if the ID does not define an allocated slot.
        See Also:
        Current

      • get_request_service_context

        ServiceContext get_request_service_context(int id)
        Returns a copy of the service context with the given ID that is associated with the request.

        Parameters:
        id - The IOP.ServiceId of the service context which is to be returned.
        Returns:
        The IOP.ServiceContext obtained with the given identifier.
        Throws:
        BAD_PARAM - thrown with a standard minor code of 26, if the request's service context does not contain an entry for that ID.

      • get_reply_service_context

        ServiceContext get_reply_service_context(int id)
        Returns a copy of the service context with the given ID that is associated with the reply.
        Parameters:
        id - The IOP.ServiceId of the service context which is to be returned.
        Returns:
        The IOP.ServiceContext obtained with the given identifier.
        Throws:
        BAD_PARAM - thrown with a standard minor code of 26 if the request's service context does not contain an entry for that ID.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerIdHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Class ServerIdHelper

  • java.lang.Object
    • org.omg.PortableInterceptor.ServerIdHelper

  • public abstract class ServerIdHelper
extends Object
    org/omg/PortableInterceptor/ServerIdHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServerIdHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static String | extract(Any a)
      static String | id()
      static void | insert(Any a, String that)
      static String | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, String value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServerIdHelper

        public ServerIdHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          String that)

      • extract

        public static String extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static String read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         String value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerRequestInfoOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ServerRequestInfoOperations

  • All Superinterfaces:
    RequestInfoOperations
    All Known Subinterfaces:
    ServerRequestInfo

    public interface ServerRequestInfoOperations
extends RequestInfoOperations
    Request Information, accessible to server-side request interceptors.

    Some attributes and operations on ServerRequestInfo are not valid at all interception points. The following table shows the validity of each attribute or operation. If it is not valid, attempting to access it will result in a BAD_INV_ORDER being thrown with a standard minor code of 14.

    receive_request_
    service_contexts     		receive_request send_reply send_exception send_other
    Inherited from RequestInfo:

    request_id

             yes yes yes yes yes

    operation

             yes yes yes yes yes

    arguments

             no yes1 yes no2 no2

    exceptions

             no yes yes yes yes

    contexts

             no yes yes yes yes

    operation_context

             no yes yes no no

    result

             no no yes no no

    response_expected

             yes yes yes yes yes

    sync_scope

             yes yes yes yes yes
    request_id | yes | yes | yes | yes | yes
    operation | yes | yes | yes | yes | yes
    arguments | no | yes1 | yes | no2 | no2
    exceptions | no | yes | yes | yes | yes
    contexts | no | yes | yes | yes | yes
    operation_context | no | yes | yes | no | no
    result | no | no | yes | no | no
    response_expected | yes | yes | yes | yes | yes
    sync_scope | yes | yes | yes | yes | yes
    reply_status | no | no | yes | yes | yes
    forward_reference | no | no | no | no | yes2
    get_slot | yes | yes | yes | yes | yes
    get_request_service_context | yes | no | yes | yes | yes
    get_reply_service_context | no | no | yes | yes | yes
    ServerRequestInfo-specific:
    sending_exception | no | no | no | yes | no
    object_id | no | yes | yes | yes3 | yes3
    adapter_id | no | yes | yes | yes3 | yes3
    server_id | no | yes | yes | yes | yes
    orb_id | no | yes | yes | yes | yes
    adapter_name | no | yes | yes | yes | yes
    target_most_derived_interface | no | yes | no4 | no4 | no4
    get_server_policy | yes | yes | yes | yes | yes
    set_slot | yes | yes | yes | yes | yes
    target_is_a | no | yes | no4 | no4 | no4
    add_reply_service_context | yes | yes | yes | yes | yes

    1. When ServerRequestInfo is passed to receive_request, there is an entry in the list for every argument, whether in, inout, or out. But only the in and inout arguments will be available.
    2. If the reply_status attribute is not LOCATION_FORWARD, accessing this attribute will throw BAD_INV_ORDER with a standard minor code of 14.
    3. If the servant locator caused a location forward, or thrown an exception, this attribute/operation may not be available in this interception point. NO_RESOURCES with a standard minor code of 1 will be thrown if it is not available.
    4. The operation is not available in this interception point because the necessary information requires access to the target object's servant, which may no longer be available to the ORB. For example, if the object's adapter is a POA that uses a ServantLocator, then the ORB invokes the interception point after it calls ServantLocator.postinvoke()
      5. .
    See Also:
    ServerRequestInterceptor

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      byte[] adapter_id()
      Returns the opaque identifier for the object adapter.
      String[] adapter_name()
      Returns the sequence of strings that identifies the object adapter instance that is handling this request.
      void add_reply_service_context(ServiceContext service_context, boolean replace)
      Allows Interceptors to add service contexts to the request.
      Policy get_server_policy(int type)
      Returns the policy in effect for this operation for the given policy type.
      byte[] object_id()
      Returns the opaque object_id describing the target of the operation invocation.
      String orb_id()
      Returns the ID that was used to create the ORB.
      Any sending_exception()
      Returns an any which contains the exception to be returned to the client.
      String server_id()
      Returns the server ID that was specified on ORB::init using the -ORBServerId argument.
      void set_slot(int id, Any data)
      Allows an Interceptor to set a slot in the PortableInterceptor.Current that is in the scope of the request.
      boolean target_is_a(String id)
      Returns true if the servant is the given repository id, false if it is not.
      String target_most_derived_interface()
      Returns the repository id for the most derived interface of the servant.

      • Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations

        arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope

    • Method Detail

      • sending_exception

        Any sending_exception()
        Returns an any which contains the exception to be returned to the client.

        If the exception is a user exception which cannot be inserted into an any (e.g., it is unknown or the bindings don't provide the TypeCode), then this attribute will be an any containing the system exception UNKNOWN with a standard minor code of 1.

        See Also:
        PortableInterceptor package comments for limitations / unimplemented features

      • object_id

        byte[] object_id()
        Returns the opaque object_id describing the target of the operation invocation.

      • adapter_id

        byte[] adapter_id()
        Returns the opaque identifier for the object adapter.

      • server_id

        String server_id()
        Returns the server ID that was specified on ORB::init using the -ORBServerId argument.

      • orb_id

        String orb_id()
        Returns the ID that was used to create the ORB.

      • adapter_name

        String[] adapter_name()
        Returns the sequence of strings that identifies the object adapter instance that is handling this request.

      • target_most_derived_interface

        String target_most_derived_interface()
        Returns the repository id for the most derived interface of the servant.

      • get_server_policy

        Policy get_server_policy(int type)
        Returns the policy in effect for this operation for the given policy type. The returned CORBA.Policy object shall only be a policy whose type was registered via register_policy_factory.
        Parameters:
        type - The CORBA.PolicyType which specifies the policy to be returned.
        Returns:
        The CORBA.Policy obtained with the given policy type.
        Throws:
        INV_POLICY - thrown, with a standard minor code of 2, if a policy for the given type was not registered via register_policy_factory.
        See Also:
        ORBInitInfoOperations.register_policy_factory(int, org.omg.PortableInterceptor.PolicyFactory)

      • set_slot

        void set_slot(int id,
              Any data)
       throws InvalidSlot
        Allows an Interceptor to set a slot in the PortableInterceptor.Current that is in the scope of the request. If data already exists in that slot, it will be overwritten.
        Parameters:
        id - The id of the slot.
        data - The data, in the form of an any, to store in that slot.
        Throws:
        InvalidSlot - thrown if the ID does not define an allocated slot.
        See Also:
        Current

      • target_is_a

        boolean target_is_a(String id)
        Returns true if the servant is the given repository id, false if it is not.
        Parameters:
        id - The caller wants to know if the servant is this repository id.
        Returns:
        Is the servant the given RepositoryId?

      • add_reply_service_context

        void add_reply_service_context(ServiceContext service_context,
                               boolean replace)
        Allows Interceptors to add service contexts to the request.

        There is no declaration of the order of the service contexts. They may or may not appear in the order that they are added.

        Parameters:
        service_context - The IOP.ServiceContext to add to the reply.
        replace - Indicates the behavior of this operation when a service context already exists with the given ID. If false, then BAD_INV_ORDER with a standard minor code of 15 is thrown. If true, then the existing service context is replaced by the new one.
        Throws:
        BAD_INV_ORDER - thrown, with a standard minor code of 15, if replace is false and a service context already exists with the given ID.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServerRequestInterceptorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface ServerRequestInterceptorOperations

  • All Superinterfaces:
    InterceptorOperations
    All Known Subinterfaces:
    ServerRequestInterceptor

    public interface ServerRequestInterceptorOperations
extends InterceptorOperations
    Server-side request interceptor.

    A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers. There are two types of request Interceptors: client-side and server-side.

    To write a server-side Interceptor, implement the ServerRequestInterceptor interface.

    See Also:
    ServerRequestInfo

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void receive_request_service_contexts(ServerRequestInfo ri)
      Allows the interceptor to process service context information.
      void receive_request(ServerRequestInfo ri)
      Allows an Interceptor to query request information after all the information, including operation parameters, are available.
      void send_exception(ServerRequestInfo ri)
      Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client.
      void send_other(ServerRequestInfo ri)
      Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.
      void send_reply(ServerRequestInfo ri)
      Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client.

      • Methods inherited from interface org.omg.PortableInterceptor.InterceptorOperations

        destroy, name

    • Method Detail

      • receive_request_service_contexts

        void receive_request_service_contexts(ServerRequestInfo ri)
                               throws ForwardRequest
        Allows the interceptor to process service context information.

        At this interception point, Interceptors must get their service context information from the incoming request transfer it to PortableInterceptor.Current's slots.

        This interception point is called before the servant manager is called. Operation parameters are not yet available at this point. This interception point may or may not execute in the same thread as the target invocation.

        This interception point may throw a system exception. If it does, no other Interceptors' receive_request_service_contexts operations are called. Those Interceptors on the Flow Stack are popped and their send_exception interception points are called.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, no other Interceptors' receive_request_service_contexts operations are called. Those Interceptors on the Flow Stack are popped and their send_other interception points are called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.

      • receive_request

        void receive_request(ServerRequestInfo ri)
              throws ForwardRequest
        Allows an Interceptor to query request information after all the information, including operation parameters, are available. This interception point shall execute in the same thread as the target invocation.

        In the DSI model, since the parameters are first available when the user code calls arguments, receive_request is called from within arguments. It is possible that arguments is not called in the DSI model. The target may call set_exception before calling arguments. The ORB shall guarantee that receive_request is called once, either through arguments or through set_exception. If it is called through set_exception, requesting the arguments will result in NO_RESOURCES being thrown with a standard minor code of 1.

        This interception point may throw a system exception. If it does, no other Interceptors' receive_request operations are called. Those Interceptors on the Flow Stack are popped and their send_exception interception points are called.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, no other Interceptors' receive_request operations are called. Those Interceptors on the Flow Stack are popped and their send_other interception points are called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.

      • send_reply

        void send_reply(ServerRequestInfo ri)
        Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client. This interception point shall execute in the same thread as the target invocation.

        This interception point may throw a system exception. If it does, no other Interceptors' send_reply operations are called. The remaining Interceptors in the Flow Stack shall have their send_exception interception point called.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_YES.

        Parameters:
        ri - Information about the current request being intercepted.

      • send_exception

        void send_exception(ServerRequestInfo ri)
             throws ForwardRequest
        Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client. When an exception occurs, this interception point is called. This interception point shall execute in the same thread as the target invocation.

        This interception point may throw a system exception. This has the effect of changing the exception which successive Interceptors popped from the Flow Stack receive on their calls to send_exception. The exception thrown to the client will be the last exception thrown by an Interceptor, or the original exception if no Interceptor changes the exception.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, no other Interceptors' send_exception operations are called. The remaining Interceptors in the Flow Stack shall have their send_other interception points called.

        If the completion_status of the exception is not COMPLETED_NO, then it is inappropriate for this interception point to throw a ForwardRequest exception. The request's at-most-once semantics would be lost.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. If the original exception is a system exception, the completion_status of the new exception shall be the same as on the original. If the original exception is a user exception, then the completion_status of the new exception shall be COMPLETED_YES.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.

      • send_other

        void send_other(ServerRequestInfo ri)
         throws ForwardRequest
        Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception. For example, a request could result in a retry (e.g., a GIOP Reply with a LOCATION_FORWARD status was received). This interception point shall execute in the same thread as the target invocation.

        This interception point may throw a system exception. If it does, no other Interceptors' send_other operations are called. The remaining Interceptors in the Flow Stack shall have their send_exception interception points called.

        This interception point may also throw a ForwardRequest exception. If an Interceptor throws this exception, successive Interceptors' send_other operations are called with the new information provided by the ForwardRequest exception.

        Compliant Interceptors shall properly follow completion_status semantics if they throw a system exception from this interception point. The completion_status shall be COMPLETED_NO.

        Parameters:
        ri - Information about the current request being intercepted.
        Throws:
        ForwardRequest - If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SUCCESSFUL

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface SUCCESSFUL

  • public interface SUCCESSFUL
    org/omg/PortableInterceptor/SUCCESSFUL.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Indicates a successful Reply Status.

    • Field Detail

      • value

        static final short value
        Indicates a successful Reply Status. One possible value for RequestInfo.reply_status.
        See Also:
        RequestInfoOperations.reply_status(), SYSTEM_EXCEPTION, USER_EXCEPTION, LOCATION_FORWARD, TRANSPORT_RETRY, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SYSTEM_EXCEPTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface SYSTEM_EXCEPTION

  • public interface SYSTEM_EXCEPTION
    org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Indicates a SystemException reply status.

    • Field Detail

      • value

        static final short value
        Indicates a SystemException reply status. One possible value for RequestInfo.reply_status.
        See Also:
        RequestInfoOperations.reply_status(), SUCCESSFUL, USER_EXCEPTION, LOCATION_FORWARD, TRANSPORT_RETRY, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TRANSPORT_RETRY

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface TRANSPORT_RETRY

  • public interface TRANSPORT_RETRY
    org/omg/PortableInterceptor/TRANSPORT_RETRY.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Indicates a Transport Retry reply status.

    • Field Detail

      • value

        static final short value
        Indicates a Transport Retry reply status. One possible value for RequestInfo.reply_status.
        See Also:
        RequestInfoOperations.reply_status(), SUCCESSFUL, SYSTEM_EXCEPTION, USER_EXCEPTION, LOCATION_FORWARD, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UNKNOWN

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface UNKNOWN

  • public interface UNKNOWN
    org/omg/PortableInterceptor/UNKNOWN.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      XXX

    • Field Detail

      • value

        static final short value
        XXX
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


USER_EXCEPTION

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableInterceptor

Interface USER_EXCEPTION

  • public interface USER_EXCEPTION
    org/omg/PortableInterceptor/USER_EXCEPTION.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short value
      Indicates a UserException reply status.

    • Field Detail

      • value

        static final short value
        Indicates a UserException reply status. One possible value for RequestInfo.reply_status.
        See Also:
        RequestInfoOperations.reply_status(), SUCCESSFUL, SYSTEM_EXCEPTION, LOCATION_FORWARD, TRANSPORT_RETRY, Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


PortableServer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

See: Description

  • Interface Summary
    Interface Description
    AdapterActivator
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
    AdapterActivatorOperations
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
    Current
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
    CurrentOperations
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
    ID_ASSIGNMENT_POLICY_ID
    org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java .
    ID_UNIQUENESS_POLICY_ID
    org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java .
    IdAssignmentPolicy
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
    IdAssignmentPolicyOperations
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
    IdUniquenessPolicy
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
    IdUniquenessPolicyOperations
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
    IMPLICIT_ACTIVATION_POLICY_ID
    org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java .
    ImplicitActivationPolicy
    This policy specifies whether implicit activation of servants is supported in the created POA.
    ImplicitActivationPolicyOperations
    This policy specifies whether implicit activation of servants is supported in the created POA.
    LIFESPAN_POLICY_ID
    org/omg/PortableServer/LIFESPAN_POLICY_ID.java .
    LifespanPolicy
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
    LifespanPolicyOperations
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
    POA
    A POA object manages the implementation of a collection of objects.
    POAManager
    Each POA object has an associated POAManager object.
    POAManagerOperations
    Each POA object has an associated POAManager object.
    POAOperations
    A POA object manages the implementation of a collection of objects.
    REQUEST_PROCESSING_POLICY_ID
    org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java .
    RequestProcessingPolicy
    This policy specifies how requests are processed by the created POA.
    RequestProcessingPolicyOperations
    This policy specifies how requests are processed by the created POA.
    SERVANT_RETENTION_POLICY_ID
    org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java .
    ServantActivator
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantActivatorOperations
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantLocator
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantLocatorOperations
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantManager
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
    ServantManagerOperations
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
    ServantRetentionPolicy
    This policy specifies whether the created POA retains active servants in an Active Object Map.
    ServantRetentionPolicyOperations
    This policy specifies whether the created POA retains active servants in an Active Object Map.
    THREAD_POLICY_ID
    org/omg/PortableServer/THREAD_POLICY_ID.java .
    ThreadPolicy
    The ThreadPolicy specifies the threading model used with the created POA.
    ThreadPolicyOperations
    The ThreadPolicy specifies the threading model used with the created POA.
  • Class Summary
    Class Description
    _ServantActivatorStub
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    _ServantLocatorStub
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    CurrentHelper
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
    DynamicImplementation
    Allows dynamic handling of object invocations.
    ForwardRequestHelper
    org/omg/PortableServer/ForwardRequestHelper.java .
    IdAssignmentPolicyValue
    The IdAssignmentPolicyValue can have the following values.
    IdUniquenessPolicyValue
    IdUniquenessPolicyValue can have the following values.
    ImplicitActivationPolicyValue
    ImplicitActivationPolicyValue has the following semantics.
    LifespanPolicyValue
    The LifespanPolicyValue can have the following values.
    POAHelper
    A POA object manages the implementation of a collection of objects.
    RequestProcessingPolicyValue
    The RequestProcessingPolicyValue can have the following values.
    Servant
    Defines the native Servant type.
    ServantActivatorHelper
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantActivatorPOA
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantLocatorHelper
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantLocatorPOA
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantRetentionPolicyValue
    ServantRetentionPolicyValue can have the following values.
    ThreadPolicyValue
    The ThreadPolicyValue can have the following values.
  • Exception Summary
    Exception Description
    ForwardRequest
    org/omg/PortableServer/ForwardRequest.java .

Package org.omg.PortableServer Description

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

In Java, Portable Object Adaptor (POA)-based Dynamic Skeleton Interface (DSI) servants inherit from the standard DynamicImplementation class, which inherits from the Servant class. The native Servant type is defined by the PortableServer module for the POA. In Java, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior.

Package Specification

For a precise list of supported sections of official OMG specifications with which the Java[tm] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in Java[tm] SE 6.

POA-related Interfaces

The PortableServer module defines the following POA-related interfaces:

  • POA
  • POAManager
  • ServantManager
  • ServantActivator
  • ServantLocator
  • AdapterActivator
  • ThreadPolicy
  • LifespanPolicy
  • IdUniquenessPolicy
  • IdAssignmentPolicy
  • ImplicitActivationPolicy
  • ServantRetentionPolicy
  • RequestProcessingPolicy
  • Current

In addition, the POA defines the Servant native type.

Operations classes

Each of the interfaces listed above has an associated Operations interface. The Operations interface is generated by the idlj compiler and contains the method signatures for methods defined in its associated interface. The Operations interface can be accessed by both the client and the server, while its associated interface can only be called by the client.

Value Classes

Classes ending in the suffix PolicyValue provide the values used for the create_POA call, which sets the policy for the POA. See the sample code below for a demonstration. PolicyValue files include the following:

  • IdAssignmentPolicyValue
  • IdUniquenessPolicyValue
  • ImplicitActivationPolicyValue
  • LifespanPolicyValue
  • RequestProcessingPolicyValue
  • ServantRetentionPolicyValue
  • ThreadPolicyValue

Helper Classes

Helper classes, which are generated for all user-defined types in an OMG IDL interface, supply static methods needed to manipulate those types. There is only one method in a helper class that an application programmer uses: the narrow method. Only Java interfaces mapped from IDL interfaces will have a helper class that includes a narrow method, so in the PortableServer package, only the following classes have a narrow method:

  • ForwardRequestHelper
  • ServantActivatorHelper
  • ServantLocatorHelper

POA Classes

POA classes are used to implement the ServantActivator or ServantLocator.

Exceptions

The ForwardRequest exception indicates to the ORB that it is responsible for delivering the current request and subsequent ForwardRequest requests to the object denoted in the forward_reference member of the exception.

Interfaces Implemented by the Application Programmer

Most of what PortableServer does is transparent to the user. The result is that programmers will use only a few of the interfaces mentioned above. The remaining interfaces will be provided by the ORB implementation. The interfaces of interest to application programmers are the following:

  • AdapterActivator

    Adapter activators are associated with POAs. An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE. An application server that creates all its needed POAs at the beginning of execution does not need to use or provide an adapter activator; it is necessary only for the case in which POAs need to be created during request processing.

  • ServantLocator

    When the POA has the NON_RETAIN policy, it uses servant managers that are ServantLocators.

  • ServantActivator

    When the POA has the RETAIN policy, it uses servant managers that are ServantActivators.

Package org.omg.PortableServer.ServantLocatorPackage

This package supplies a CookieHolder class for passing the Cookie type as an out parameter. The CookieHolder class follows exactly the same pattern as the other holder classes for basic types.

Related Documentation

For an overview of Java IDL, please see:

  • Java IDL home page.

    Example Code

    Example Server Code

    import javax.naming.InitialContext;
import javax.naming.Context;
import javax.rmi.PortableRemoteObject ;
import com.sun.corba.se.impl.poa.POAORB;
import org.omg.PortableServer.*;
import java.util.*;
import org.omg.CORBA.*;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;

public class HelloServer {
    public HelloServer(String[] args) {
        try {
            Properties p = System.getProperties();
         //   p.put("org.omg.CORBA.ORBClass", "com.sun.corba.ee.internal.POA.POAORB");
            ORB orb = ORB.init( args, p );

            POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");

            Policy[] tpolicy = new Policy[3];
            tpolicy[0] = rootPOA.create_lifespan_policy(
                LifespanPolicyValue.TRANSIENT );
            tpolicy[1] = rootPOA.create_request_processing_policy(
                RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY );
            tpolicy[2] = rootPOA.create_servant_retention_policy(
                ServantRetentionPolicyValue.RETAIN);
            POA tpoa = rootPOA.create_POA("MyTransientPOA", null, tpolicy);

            String  ObjectId = "MyObjectId";
            byte[] oid = ObjectId.getBytes();

            org.omg.CORBA.Object obj = tpoa.create_reference_with_id(oid,
                new _HelloImpl_Tie()._all_interfaces(tpoa, oid)[0]);
            HelloInterface helloRef = (HelloInterface)PortableRemoteObject.narrow(
                obj, HelloInterface.class );

            Context initialNamingContext = new InitialContext();
            initialNamingContext.rebind("HelloService", helloRef);
            System.out.println("Hello Server: Ready...");
            orb.run();
         } catch (Exception e) {
            System.out.println("Trouble: " + e);
            e.printStackTrace();
         }
     }

     public static void main(String args[]) {
         new HelloServer( args );
     }
}

    • Since:
    1.4
    Skip navigation links
    • Overview
    • Package
    • Class
    • Use
    • Tree
    • Deprecated
    • Index
    • Help
    Java™ Platform
    Standard Ed. 8
    • Prev Package
    • Next Package
    • Frames
    • No Frames
    • All Classes

    Submit a bug or feature
    For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
    Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterActivator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface AdapterActivator

  • All Superinterfaces:
    AdapterActivatorOperations, IDLEntity, Object, Serializable

    public interface AdapterActivator
extends AdapterActivatorOperations, Object, IDLEntity
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.AdapterActivatorOperations

        unknown_adapter

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface Current

  • All Superinterfaces:
    Current, CurrentOperations, IDLEntity, Object, Serializable

    public interface Current
extends CurrentOperations, Current, IDLEntity
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked. The Current interface is provided to support servants that implement multiple objects, but can be used within the context of POA-dispatched method invocations on any servant. To provide location transparency, ORBs are required to support use of Current in the context of both locally and remotely invoked operations. An instance of Current can be obtained by the application by issuing the CORBA::ORB::resolve_initial_references("POACurrent") operation. Thereafter, it can be used within the context of a method dispatched by the POA to obtain the POA and ObjectId that identify the object on which that operation was invoked.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.CurrentOperations

        get_object_id, get_POA

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_ServantActivatorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class _ServantActivatorStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.PortableServer._ServantActivatorStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, ServantActivator, ServantActivatorOperations, ServantManager, ServantManagerOperations

    public class _ServantActivatorStub
extends ObjectImpl
implements ServantActivator
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _ServantActivatorStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _ServantActivatorStub

        public _ServantActivatorStub()

    • Method Detail

      • incarnate

        public Servant incarnate(byte[] oid,
                         POA adapter)
                  throws ForwardRequest
        This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
        Specified by:
        incarnate in interface ServantActivatorOperations
        Parameters:
        oid - object Id associated with the object on the request was made.
        adapter - object reference for the POA in which the object is being activated.
        Returns:
        Servant corresponding to oid is created or located by the user supplied servant manager.
        Throws:
        ForwardRequest - to indicate to the ORB that it is responsible for delivering the current request and subsequent requests to the object denoted in the forward_reference member of the exception.

      • etherealize

        public void etherealize(byte[] oid,
                        POA adapter,
                        Servant serv,
                        boolean cleanup_in_progress,
                        boolean remaining_activations)
        This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
        Specified by:
        etherealize in interface ServantActivatorOperations
        Parameters:
        oid - object Id associated with the object being deactivated.
        adapter - object reference for the POA in which the object was active.
        serv - contains reference to the servant associated with the object being deactivated.
        cleanup_in_progress - if TRUE indicates that destroy or deactivate is called with etherealize_objects param of TRUE. FALSE indicates that etherealize was called due to other reasons.
        remaining_activations - indicates whether the Servant Manager can destroy a servant. If set to TRUE, the Servant Manager should wait until all invocations in progress have completed.

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdAssignmentPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface IdAssignmentPolicy

  • All Superinterfaces:
    IdAssignmentPolicyOperations, IDLEntity, Object, Policy, PolicyOperations, Serializable

    public interface IdAssignmentPolicy
extends IdAssignmentPolicyOperations, Policy, IDLEntity
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB. The default is SYSTEM_ID.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.IdAssignmentPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdUniquenessPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface IdUniquenessPolicy

  • All Superinterfaces:
    IDLEntity, IdUniquenessPolicyOperations, Object, Policy, PolicyOperations, Serializable

    public interface IdUniquenessPolicy
extends IdUniquenessPolicyOperations, Policy, IDLEntity
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities. The default is UNIQUE_ID.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.IdUniquenessPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ImplicitActivationPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ImplicitActivationPolicy

  • All Superinterfaces:
    IDLEntity, ImplicitActivationPolicyOperations, Object, Policy, PolicyOperations, Serializable

    public interface ImplicitActivationPolicy
extends ImplicitActivationPolicyOperations, Policy, IDLEntity
    This policy specifies whether implicit activation of servants is supported in the created POA.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.ImplicitActivationPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LifespanPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface LifespanPolicy

  • All Superinterfaces:
    IDLEntity, LifespanPolicyOperations, Object, Policy, PolicyOperations, Serializable

    public interface LifespanPolicy
extends LifespanPolicyOperations, Policy, IDLEntity
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA. The default is TRANSIENT.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.LifespanPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableServer.CurrentHelper
    • org.omg.PortableServer.ForwardRequestHelper
    • org.omg.PortableServer.IdAssignmentPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.IdUniquenessPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.ImplicitActivationPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.LifespanPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.PortableServer._ServantActivatorStub (implements org.omg.PortableServer.ServantActivator)
      • org.omg.PortableServer._ServantLocatorStub (implements org.omg.PortableServer.ServantLocator)
    • org.omg.PortableServer.POAHelper
    • org.omg.PortableServer.RequestProcessingPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.Servant
      • org.omg.PortableServer.DynamicImplementation
      • org.omg.PortableServer.ServantActivatorPOA (implements org.omg.CORBA.portable.InvokeHandler, org.omg.PortableServer.ServantActivatorOperations)
      • org.omg.PortableServer.ServantLocatorPOA (implements org.omg.CORBA.portable.InvokeHandler, org.omg.PortableServer.ServantLocatorOperations)
    • org.omg.PortableServer.ServantActivatorHelper
    • org.omg.PortableServer.ServantLocatorHelper
    • org.omg.PortableServer.ServantRetentionPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.ThreadPolicyValue (implements org.omg.CORBA.portable.IDLEntity)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableServer.ForwardRequest

Interface Hierarchy

  • org.omg.PortableServer.AdapterActivatorOperations
    • org.omg.PortableServer.AdapterActivator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CORBA.CurrentOperations
    • org.omg.CORBA.Current (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableServer.Current (also extends org.omg.PortableServer.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.CurrentOperations
      • org.omg.PortableServer.Current (also extends org.omg.CORBA.Current, org.omg.CORBA.portable.IDLEntity)
  • org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID
  • org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID
  • org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID
  • org.omg.PortableServer.LIFESPAN_POLICY_ID
  • org.omg.CORBA.Object
    • org.omg.PortableServer.AdapterActivator (also extends org.omg.PortableServer.AdapterActivatorOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableServer.Current (also extends org.omg.PortableServer.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • org.omg.PortableServer.POA (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.POAOperations)
    • org.omg.PortableServer.POAManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.POAManagerOperations)
    • org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.PolicyOperations)
      • org.omg.PortableServer.IdAssignmentPolicy (also extends org.omg.PortableServer.IdAssignmentPolicyOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableServer.IdUniquenessPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.IdUniquenessPolicyOperations)
      • org.omg.PortableServer.ImplicitActivationPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ImplicitActivationPolicyOperations)
      • org.omg.PortableServer.LifespanPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.LifespanPolicyOperations)
      • org.omg.PortableServer.RequestProcessingPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.RequestProcessingPolicyOperations)
      • org.omg.PortableServer.ServantRetentionPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantRetentionPolicyOperations)
      • org.omg.PortableServer.ThreadPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ThreadPolicyOperations)
    • org.omg.PortableServer.ServantManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantManagerOperations)
      • org.omg.PortableServer.ServantActivator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantActivatorOperations)
      • org.omg.PortableServer.ServantLocator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantLocatorOperations)
  • org.omg.PortableServer.POAManagerOperations
    • org.omg.PortableServer.POAManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.PortableServer.POAOperations
    • org.omg.PortableServer.POA (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • org.omg.CORBA.PolicyOperations
    • org.omg.PortableServer.IdAssignmentPolicyOperations
      • org.omg.PortableServer.IdAssignmentPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.PortableServer.IdUniquenessPolicyOperations
      • org.omg.PortableServer.IdUniquenessPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.PortableServer.ImplicitActivationPolicyOperations
      • org.omg.PortableServer.ImplicitActivationPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.PortableServer.LifespanPolicyOperations
      • org.omg.PortableServer.LifespanPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableServer.IdAssignmentPolicy (also extends org.omg.PortableServer.IdAssignmentPolicyOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableServer.IdUniquenessPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.IdUniquenessPolicyOperations)
      • org.omg.PortableServer.ImplicitActivationPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ImplicitActivationPolicyOperations)
      • org.omg.PortableServer.LifespanPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.LifespanPolicyOperations)
      • org.omg.PortableServer.RequestProcessingPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.RequestProcessingPolicyOperations)
      • org.omg.PortableServer.ServantRetentionPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantRetentionPolicyOperations)
      • org.omg.PortableServer.ThreadPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ThreadPolicyOperations)
    • org.omg.PortableServer.RequestProcessingPolicyOperations
      • org.omg.PortableServer.RequestProcessingPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.PortableServer.ServantRetentionPolicyOperations
      • org.omg.PortableServer.ServantRetentionPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
    • org.omg.PortableServer.ThreadPolicyOperations
      • org.omg.PortableServer.ThreadPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Policy)
  • org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.PortableServer.AdapterActivator (also extends org.omg.PortableServer.AdapterActivatorOperations, org.omg.CORBA.Object)
      • org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.Object)
        • org.omg.PortableServer.Current (also extends org.omg.PortableServer.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
      • org.omg.PortableServer.Current (also extends org.omg.CORBA.Current, org.omg.PortableServer.CurrentOperations)
      • org.omg.PortableServer.IdAssignmentPolicy (also extends org.omg.PortableServer.IdAssignmentPolicyOperations, org.omg.CORBA.Policy)
      • org.omg.PortableServer.IdUniquenessPolicy (also extends org.omg.PortableServer.IdUniquenessPolicyOperations, org.omg.CORBA.Policy)
      • org.omg.PortableServer.ImplicitActivationPolicy (also extends org.omg.PortableServer.ImplicitActivationPolicyOperations, org.omg.CORBA.Policy)
      • org.omg.PortableServer.LifespanPolicy (also extends org.omg.PortableServer.LifespanPolicyOperations, org.omg.CORBA.Policy)
      • org.omg.PortableServer.POA (also extends org.omg.CORBA.Object, org.omg.PortableServer.POAOperations)
      • org.omg.PortableServer.POAManager (also extends org.omg.CORBA.Object, org.omg.PortableServer.POAManagerOperations)
      • org.omg.CORBA.Policy (also extends org.omg.CORBA.Object, org.omg.CORBA.PolicyOperations)
        • org.omg.PortableServer.IdAssignmentPolicy (also extends org.omg.PortableServer.IdAssignmentPolicyOperations, org.omg.CORBA.portable.IDLEntity)
        • org.omg.PortableServer.IdUniquenessPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.IdUniquenessPolicyOperations)
        • org.omg.PortableServer.ImplicitActivationPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ImplicitActivationPolicyOperations)
        • org.omg.PortableServer.LifespanPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.LifespanPolicyOperations)
        • org.omg.PortableServer.RequestProcessingPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.RequestProcessingPolicyOperations)
        • org.omg.PortableServer.ServantRetentionPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantRetentionPolicyOperations)
        • org.omg.PortableServer.ThreadPolicy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ThreadPolicyOperations)
      • org.omg.PortableServer.RequestProcessingPolicy (also extends org.omg.CORBA.Policy, org.omg.PortableServer.RequestProcessingPolicyOperations)
      • org.omg.PortableServer.ServantActivator (also extends org.omg.PortableServer.ServantActivatorOperations, org.omg.PortableServer.ServantManager)
      • org.omg.PortableServer.ServantLocator (also extends org.omg.PortableServer.ServantLocatorOperations, org.omg.PortableServer.ServantManager)
      • org.omg.PortableServer.ServantManager (also extends org.omg.CORBA.Object, org.omg.PortableServer.ServantManagerOperations)
        • org.omg.PortableServer.ServantActivator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantActivatorOperations)
        • org.omg.PortableServer.ServantLocator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantLocatorOperations)
      • org.omg.PortableServer.ServantRetentionPolicy (also extends org.omg.CORBA.Policy, org.omg.PortableServer.ServantRetentionPolicyOperations)
      • org.omg.PortableServer.ThreadPolicy (also extends org.omg.CORBA.Policy, org.omg.PortableServer.ThreadPolicyOperations)
  • org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID
  • org.omg.PortableServer.ServantManagerOperations
    • org.omg.PortableServer.ServantActivatorOperations
      • org.omg.PortableServer.ServantActivator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantManager)
    • org.omg.PortableServer.ServantLocatorOperations
      • org.omg.PortableServer.ServantLocator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantManager)
    • org.omg.PortableServer.ServantManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • org.omg.PortableServer.ServantActivator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantActivatorOperations)
      • org.omg.PortableServer.ServantLocator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantLocatorOperations)
  • org.omg.PortableServer.THREAD_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface POA

  • All Superinterfaces:
    IDLEntity, Object, POAOperations, Serializable

    public interface POA
extends POAOperations, Object, IDLEntity
    A POA object manages the implementation of a collection of objects. The POA supports a name space for the objects, which are identified by Object Ids. A POA also provides a name space for POAs. A POA is created as a child of an existing POA, which forms a hierarchy starting with the root POA. A POA object must not be exported to other processes, or externalized with ORB::object_to_string.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.POAOperations

        activate_object_with_id, activate_object, create_id_assignment_policy, create_id_uniqueness_policy, create_implicit_activation_policy, create_lifespan_policy, create_POA, create_reference_with_id, create_reference, create_request_processing_policy, create_servant_retention_policy, create_thread_policy, deactivate_object, destroy, find_POA, get_servant_manager, get_servant, id_to_reference, id_to_servant, id, reference_to_id, reference_to_servant, servant_to_id, servant_to_reference, set_servant_manager, set_servant, the_activator, the_activator, the_children, the_name, the_parent, the_POAManager

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface POAManager

  • All Superinterfaces:
    IDLEntity, Object, POAManagerOperations, Serializable

    public interface POAManager
extends POAManagerOperations, Object, IDLEntity
    Each POA object has an associated POAManager object. A POA manager may be associated with one or more POA objects. A POA manager encapsulates the processing state of the POAs it is associated with.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.POAManagerOperations

        activate, deactivate, discard_requests, get_state, hold_requests

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_ServantLocatorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class _ServantLocatorStub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.PortableServer._ServantLocatorStub
  • All Implemented Interfaces:
    Serializable, Object, IDLEntity, ServantLocator, ServantLocatorOperations, ServantManager, ServantManagerOperations

    public class _ServantLocatorStub
extends ObjectImpl
implements ServantLocator
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static Class | _opsClass

    • Constructor Summary

      Constructors
      Constructor and Description
      _ServantLocatorStub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
      void postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

    • Field Detail

      • _opsClass

        public static final Class _opsClass

    • Constructor Detail

      • _ServantLocatorStub

        public _ServantLocatorStub()

    • Method Detail

      • preinvoke

        public Servant preinvoke(byte[] oid,
                         POA adapter,
                         String operation,
                         CookieHolder the_cookie)
                  throws ForwardRequest
        This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
        Specified by:
        preinvoke in interface ServantLocatorOperations
        Parameters:
        oid - the object id associated with object on which the request was made.
        adapter - the reference for POA in which the object is being activated.
        operation - the operation name.
        the_cookie - an opaque value that can be set by the servant manager to be used during postinvoke.
        Returns:
        Servant used to process incoming request.
        Throws:
        ForwardRequest - to indicate to the ORB that it is responsible for delivering the current request and subsequent requests to the object denoted in the forward_reference member of the exception.

      • postinvoke

        public void postinvoke(byte[] oid,
                       POA adapter,
                       String operation,
                       Object the_cookie,
                       Servant the_servant)
        This operation is invoked whenener a servant completes a request.
        Specified by:
        postinvoke in interface ServantLocatorOperations
        Parameters:
        oid - the object id ssociated with object on which the request was made.
        adapter - the reference for POA in which the object was active.
        the_cookie - an opaque value that contains the data set by preinvoke.
        the_servant - reference to the servant that is associated with the object.

      • _ids

        public String[] _ids()
        Description copied from class: ObjectImpl
        Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        the array of all repository identifiers supported by this ObjectImpl instance
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestProcessingPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface RequestProcessingPolicy

  • All Superinterfaces:
    IDLEntity, Object, Policy, PolicyOperations, RequestProcessingPolicyOperations, Serializable

    public interface RequestProcessingPolicy
extends RequestProcessingPolicyOperations, Policy, IDLEntity
    This policy specifies how requests are processed by the created POA. The default is USE_ACTIVE_OBJECT_MAP_ONLY.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.RequestProcessingPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantActivator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantActivator

  • All Superinterfaces:
    IDLEntity, Object, Serializable, ServantActivatorOperations, ServantManager, ServantManagerOperations
    All Known Implementing Classes:
    _ServantActivatorStub

    public interface ServantActivator
extends ServantActivatorOperations, ServantManager, IDLEntity
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.ServantActivatorOperations

        etherealize, incarnate

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantLocator

  • All Superinterfaces:
    IDLEntity, Object, Serializable, ServantLocatorOperations, ServantManager, ServantManagerOperations
    All Known Implementing Classes:
    _ServantLocatorStub

    public interface ServantLocator
extends ServantLocatorOperations, ServantManager, IDLEntity
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.ServantLocatorOperations

        postinvoke, preinvoke

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantManager

  • All Superinterfaces:
    IDLEntity, Object, Serializable, ServantManagerOperations
    All Known Subinterfaces:
    ServantActivator, ServantLocator
    All Known Implementing Classes:
    _ServantActivatorStub, _ServantLocatorStub

    public interface ServantManager
extends ServantManagerOperations, Object, IDLEntity
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object. A servant manager is registered with a POA as a callback object, to be invoked by the POA when necessary. ServantManagers can either be ServantActivators or ServantLocators. A ServantManager object must be local to the process containing the POA objects it is registered with.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantManagerOperations

  • All Known Subinterfaces:
    ServantActivator, ServantActivatorOperations, ServantLocator, ServantLocatorOperations, ServantManager
    All Known Implementing Classes:
    _ServantActivatorStub, _ServantLocatorStub, ServantActivatorPOA, ServantLocatorPOA

    public interface ServantManagerOperations
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object. A servant manager is registered with a POA as a callback object, to be invoked by the POA when necessary. ServantManagers can either be ServantActivators or ServantLocators. A ServantManager object must be local to the process containing the POA objects it is registered with.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantRetentionPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantRetentionPolicy

  • All Superinterfaces:
    IDLEntity, Object, Policy, PolicyOperations, Serializable, ServantRetentionPolicyOperations

    public interface ServantRetentionPolicy
extends ServantRetentionPolicyOperations, Policy, IDLEntity
    This policy specifies whether the created POA retains active servants in an Active Object Map.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.ServantRetentionPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ThreadPolicy

  • All Superinterfaces:
    IDLEntity, Object, Policy, PolicyOperations, Serializable, ThreadPolicyOperations

    public interface ThreadPolicy
extends ThreadPolicyOperations, Policy, IDLEntity
    The ThreadPolicy specifies the threading model used with the created POA. The default is ORB_CTRL_MODEL.

    • Method Summary

      • Methods inherited from interface org.omg.PortableServer.ThreadPolicyOperations

        value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer

  • Packages that use org.omg.PortableServer
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.portable
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
  • Classes in org.omg.PortableServer used by org.omg.CosNaming
    Class and Description
    POA
    A POA object manages the implementation of a collection of objects.
    Servant
    Defines the native Servant type.
  • Classes in org.omg.PortableServer used by org.omg.PortableServer
    Class and Description
    AdapterActivator
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
    AdapterActivatorOperations
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
    Current
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
    CurrentOperations
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
    ForwardRequest
    org/omg/PortableServer/ForwardRequest.java .
    IdAssignmentPolicy
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
    IdAssignmentPolicyOperations
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
    IdAssignmentPolicyValue
    The IdAssignmentPolicyValue can have the following values.
    IdUniquenessPolicy
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
    IdUniquenessPolicyOperations
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
    IdUniquenessPolicyValue
    IdUniquenessPolicyValue can have the following values.
    ImplicitActivationPolicy
    This policy specifies whether implicit activation of servants is supported in the created POA.
    ImplicitActivationPolicyOperations
    This policy specifies whether implicit activation of servants is supported in the created POA.
    ImplicitActivationPolicyValue
    ImplicitActivationPolicyValue has the following semantics.
    LifespanPolicy
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
    LifespanPolicyOperations
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
    LifespanPolicyValue
    The LifespanPolicyValue can have the following values.
    POA
    A POA object manages the implementation of a collection of objects.
    POAManager
    Each POA object has an associated POAManager object.
    POAManagerOperations
    Each POA object has an associated POAManager object.
    POAOperations
    A POA object manages the implementation of a collection of objects.
    RequestProcessingPolicy
    This policy specifies how requests are processed by the created POA.
    RequestProcessingPolicyOperations
    This policy specifies how requests are processed by the created POA.
    RequestProcessingPolicyValue
    The RequestProcessingPolicyValue can have the following values.
    Servant
    Defines the native Servant type.
    ServantActivator
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantActivatorOperations
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
    ServantLocator
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantLocatorOperations
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
    ServantManager
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
    ServantManagerOperations
    A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
    ServantRetentionPolicy
    This policy specifies whether the created POA retains active servants in an Active Object Map.
    ServantRetentionPolicyOperations
    This policy specifies whether the created POA retains active servants in an Active Object Map.
    ServantRetentionPolicyValue
    ServantRetentionPolicyValue can have the following values.
    ThreadPolicy
    The ThreadPolicy specifies the threading model used with the created POA.
    ThreadPolicyOperations
    The ThreadPolicy specifies the threading model used with the created POA.
    ThreadPolicyValue
    The ThreadPolicyValue can have the following values.
  • Classes in org.omg.PortableServer used by org.omg.PortableServer.portable
    Class and Description
    POA
    A POA object manages the implementation of a collection of objects.
    Servant
    Defines the native Servant type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterActivatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface AdapterActivatorOperations

  • All Known Subinterfaces:
    AdapterActivator

    public interface AdapterActivatorOperations
    An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean unknown_adapter(POA parent, String name)
      This operation is invoked when the ORB receives a request for an object reference that identifies a target POA that does not exist.

    • Method Detail

      • unknown_adapter

        boolean unknown_adapter(POA parent,
                        String name)
        This operation is invoked when the ORB receives a request for an object reference that identifies a target POA that does not exist. The ORB invokes this operation once for each POA that must be created in order for the target POA to exist.
        Parameters:
        parent - indicates the parent POA for the POA that needs to be created.
        name - identifies the name of the POA relative to the parent.
        Returns:
        returns TRUE if the POA was created or FALSE otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.CurrentHelper

No usage of org.omg.PortableServer.CurrentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.DynamicImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.DynamicImplementation

No usage of org.omg.PortableServer.DynamicImplementation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ForwardRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ForwardRequest

  • Packages that use ForwardRequest
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ForwardRequest in org.omg.PortableServer

      Methods in org.omg.PortableServer that return ForwardRequest
      Modifier and Type | Method and Description
      static ForwardRequest | ForwardRequestHelper.extract(Any a)
      static ForwardRequest | ForwardRequestHelper.read(InputStream istream)
      Methods in org.omg.PortableServer with parameters of type ForwardRequest
      Modifier and Type | Method and Description
      static void | ForwardRequestHelper.insert(Any a, ForwardRequest that)
      static void | ForwardRequestHelper.write(OutputStream ostream, ForwardRequest value)
      Methods in org.omg.PortableServer that throw ForwardRequest
      Modifier and Type Method and Description
      Servant _ServantActivatorStub.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant ServantActivatorOperations.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant ServantLocatorOperations.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      Servant _ServantLocatorStub.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ForwardRequestHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ForwardRequestHelper

No usage of org.omg.PortableServer.ForwardRequestHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.IdAssignmentPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.IdAssignmentPolicyValue

  • Packages that use IdAssignmentPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdAssignmentPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as IdAssignmentPolicyValue
      Modifier and Type | Field and Description
      static IdAssignmentPolicyValue | IdAssignmentPolicyValue.SYSTEM_ID
      static IdAssignmentPolicyValue | IdAssignmentPolicyValue.USER_ID
      Methods in org.omg.PortableServer that return IdAssignmentPolicyValue
      Modifier and Type | Method and Description
      static IdAssignmentPolicyValue | IdAssignmentPolicyValue.from_int(int value)
      IdAssignmentPolicyValue IdAssignmentPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type IdAssignmentPolicyValue
      Modifier and Type Method and Description
      IdAssignmentPolicy POAOperations.create_id_assignment_policy(IdAssignmentPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.IdUniquenessPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.IdUniquenessPolicyValue

  • Packages that use IdUniquenessPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdUniquenessPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as IdUniquenessPolicyValue
      Modifier and Type | Field and Description
      static IdUniquenessPolicyValue | IdUniquenessPolicyValue.MULTIPLE_ID
      static IdUniquenessPolicyValue | IdUniquenessPolicyValue.UNIQUE_ID
      Methods in org.omg.PortableServer that return IdUniquenessPolicyValue
      Modifier and Type | Method and Description
      static IdUniquenessPolicyValue | IdUniquenessPolicyValue.from_int(int value)
      IdUniquenessPolicyValue IdUniquenessPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type IdUniquenessPolicyValue
      Modifier and Type Method and Description
      IdUniquenessPolicy POAOperations.create_id_uniqueness_policy(IdUniquenessPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ImplicitActivationPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ImplicitActivationPolicyValue

  • Packages that use ImplicitActivationPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ImplicitActivationPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as ImplicitActivationPolicyValue
      Modifier and Type | Field and Description
      static ImplicitActivationPolicyValue | ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION
      static ImplicitActivationPolicyValue | ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION
      Methods in org.omg.PortableServer that return ImplicitActivationPolicyValue
      Modifier and Type | Method and Description
      static ImplicitActivationPolicyValue | ImplicitActivationPolicyValue.from_int(int value)
      ImplicitActivationPolicyValue ImplicitActivationPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type ImplicitActivationPolicyValue
      Modifier and Type Method and Description
      ImplicitActivationPolicy POAOperations.create_implicit_activation_policy(ImplicitActivationPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.LifespanPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.LifespanPolicyValue

  • Packages that use LifespanPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of LifespanPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as LifespanPolicyValue
      Modifier and Type | Field and Description
      static LifespanPolicyValue | LifespanPolicyValue.PERSISTENT
      static LifespanPolicyValue | LifespanPolicyValue.TRANSIENT
      Methods in org.omg.PortableServer that return LifespanPolicyValue
      Modifier and Type | Method and Description
      static LifespanPolicyValue | LifespanPolicyValue.from_int(int value)
      LifespanPolicyValue LifespanPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type LifespanPolicyValue
      Modifier and Type Method and Description
      LifespanPolicy POAOperations.create_lifespan_policy(LifespanPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAHelper

No usage of org.omg.PortableServer.POAHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.RequestProcessingPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.RequestProcessingPolicyValue

  • Packages that use RequestProcessingPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of RequestProcessingPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as RequestProcessingPolicyValue
      Modifier and Type | Field and Description
      static RequestProcessingPolicyValue | RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY
      static RequestProcessingPolicyValue | RequestProcessingPolicyValue.USE_DEFAULT_SERVANT
      static RequestProcessingPolicyValue | RequestProcessingPolicyValue.USE_SERVANT_MANAGER
      Methods in org.omg.PortableServer that return RequestProcessingPolicyValue
      Modifier and Type | Method and Description
      static RequestProcessingPolicyValue | RequestProcessingPolicyValue.from_int(int value)
      RequestProcessingPolicyValue RequestProcessingPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type RequestProcessingPolicyValue
      Modifier and Type Method and Description
      RequestProcessingPolicy POAOperations.create_request_processing_policy(RequestProcessingPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.Servant

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.Servant

  • Packages that use Servant
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.portable
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of Servant in org.omg.CosNaming

      Subclasses of Servant in org.omg.CosNaming
      Modifier and Type Class and Description
      class  BindingIteratorPOA
      The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
      class  NamingContextExtPOA
      NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
      class  NamingContextPOA
      A naming context is an object that contains a set of name bindings in which each name is unique.

    • Uses of Servant in org.omg.PortableServer

      Subclasses of Servant in org.omg.PortableServer
      Modifier and Type Class and Description
      class  DynamicImplementation
      Allows dynamic handling of object invocations.
      class  ServantActivatorPOA
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  ServantLocatorPOA
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Methods in org.omg.PortableServer that return Servant
      Modifier and Type Method and Description
      Servant POAOperations.get_servant()
      This operation returns the default servant associated with the POA.
      Servant POAOperations.id_to_servant(byte[] oid)
      If the POA has the RETAIN policy and the specified ObjectId is in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      Servant _ServantActivatorStub.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant ServantActivatorOperations.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant ServantLocatorOperations.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      Servant _ServantLocatorStub.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      Servant POAOperations.reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      Methods in org.omg.PortableServer with parameters of type Servant
      Modifier and Type Method and Description
      void POAOperations.activate_object_with_id(byte[] id, Servant p_servant)
      This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.
      byte[] POAOperations.activate_object(Servant p_servant)
      This operation generates an Object Id and enters the Object Id and the specified servant in the Active Object Map.
      void _ServantActivatorStub.etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      void ServantActivatorOperations.etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      void ServantLocatorOperations.postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      void _ServantLocatorStub.postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      byte[] POAOperations.servant_to_id(Servant p_servant)
      This operation has four possible behaviors.
      Object POAOperations.servant_to_reference(Servant p_servant)
      This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA.
      void POAOperations.set_servant(Servant p_servant)
      This operation registers the specified servant with the POA as the default servant.

    • Uses of Servant in org.omg.PortableServer.portable

      Methods in org.omg.PortableServer.portable with parameters of type Servant
      Modifier and Type Method and Description
      POA Delegate.default_POA(Servant Self)
      The default behavior of this function is to return the root POA from the ORB instance associated with the servant.
      Object Delegate.get_interface_def(Servant self)
      This operation returns an object in the Interface Repository which provides type information that may be useful to a program.
      boolean Delegate.is_a(Servant Self, String Repository_Id)
      This method checks to see if the specified repid is present on the list returned by _all_interfaces() or is the repository id for the generic CORBA Object.
      boolean Delegate.non_existent(Servant Self)
      This operation is used to check for the existence of the Object.
      byte[] Delegate.object_id(Servant Self)
      The method _object_id() is equivalent to calling PortableServer::Current::get_object_id.
      ORB Delegate.orb(Servant Self)
      Convenience method that returns the instance of the ORB currently associated with the Servant.
      POA Delegate.poa(Servant Self)
      The method _poa() is equivalent to calling PortableServer::Current:get_POA.
      Object Delegate.this_object(Servant Self)
      This allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantActivatorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantActivatorHelper

No usage of org.omg.PortableServer.ServantActivatorHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantActivatorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantActivatorPOA

No usage of org.omg.PortableServer.ServantActivatorPOA
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantLocatorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantLocatorHelper

No usage of org.omg.PortableServer.ServantLocatorHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantLocatorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantLocatorPOA

No usage of org.omg.PortableServer.ServantLocatorPOA
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantRetentionPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantRetentionPolicyValue

  • Packages that use ServantRetentionPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantRetentionPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as ServantRetentionPolicyValue
      Modifier and Type | Field and Description
      static ServantRetentionPolicyValue | ServantRetentionPolicyValue.NON_RETAIN
      static ServantRetentionPolicyValue | ServantRetentionPolicyValue.RETAIN
      Methods in org.omg.PortableServer that return ServantRetentionPolicyValue
      Modifier and Type | Method and Description
      static ServantRetentionPolicyValue | ServantRetentionPolicyValue.from_int(int value)
      ServantRetentionPolicyValue ServantRetentionPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type ServantRetentionPolicyValue
      Modifier and Type Method and Description
      ServantRetentionPolicy POAOperations.create_servant_retention_policy(ServantRetentionPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ThreadPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ThreadPolicyValue

  • Packages that use ThreadPolicyValue
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ThreadPolicyValue in org.omg.PortableServer

      Fields in org.omg.PortableServer declared as ThreadPolicyValue
      Modifier and Type | Field and Description
      static ThreadPolicyValue | ThreadPolicyValue.ORB_CTRL_MODEL
      static ThreadPolicyValue | ThreadPolicyValue.SINGLE_THREAD_MODEL
      Methods in org.omg.PortableServer that return ThreadPolicyValue
      Modifier and Type | Method and Description
      static ThreadPolicyValue | ThreadPolicyValue.from_int(int value)
      ThreadPolicyValue ThreadPolicyOperations.value()
      specifies the policy value
      Methods in org.omg.PortableServer with parameters of type ThreadPolicyValue
      Modifier and Type Method and Description
      ThreadPolicy POAOperations.create_thread_policy(ThreadPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer._ServantActivatorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer._ServantActivatorStub

No usage of org.omg.PortableServer._ServantActivatorStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer._ServantLocatorStub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer._ServantLocatorStub

No usage of org.omg.PortableServer._ServantLocatorStub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.AdapterActivator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.AdapterActivator

  • Packages that use AdapterActivator
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of AdapterActivator in org.omg.PortableServer

      Methods in org.omg.PortableServer that return AdapterActivator
      Modifier and Type Method and Description
      AdapterActivator POAOperations.the_activator()
      This attribute identifies the adapter activator associated with the POA.
      Methods in org.omg.PortableServer with parameters of type AdapterActivator
      Modifier and Type Method and Description
      void POAOperations.the_activator(AdapterActivator newThe_activator)
      This attribute identifies the adapter activator associated with the POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.AdapterActivatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.AdapterActivatorOperations

  • Packages that use AdapterActivatorOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of AdapterActivatorOperations in org.omg.PortableServer

      Subinterfaces of AdapterActivatorOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  AdapterActivator
      An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.Current

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.Current

  • Packages that use Current
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of Current in org.omg.PortableServer

      Methods in org.omg.PortableServer that return Current
      Modifier and Type | Method and Description
      static Current | CurrentHelper.extract(Any a)
      static Current | CurrentHelper.narrow(Object obj)
      static Current | CurrentHelper.read(InputStream istream)
      Methods in org.omg.PortableServer with parameters of type Current
      Modifier and Type | Method and Description
      static void | CurrentHelper.insert(Any a, Current that)
      static void | CurrentHelper.write(OutputStream ostream, Current value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.CurrentOperations

  • Packages that use CurrentOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of CurrentOperations in org.omg.PortableServer

      Subinterfaces of CurrentOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  Current
      The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.IdAssignmentPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.IdAssignmentPolicy

  • Packages that use IdAssignmentPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdAssignmentPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return IdAssignmentPolicy
      Modifier and Type Method and Description
      IdAssignmentPolicy POAOperations.create_id_assignment_policy(IdAssignmentPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.IdAssignmentPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.IdAssignmentPolicyOperations

  • Packages that use IdAssignmentPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdAssignmentPolicyOperations in org.omg.PortableServer

      Subinterfaces of IdAssignmentPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  IdAssignmentPolicy
      IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.IdUniquenessPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.IdUniquenessPolicy

  • Packages that use IdUniquenessPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdUniquenessPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return IdUniquenessPolicy
      Modifier and Type Method and Description
      IdUniquenessPolicy POAOperations.create_id_uniqueness_policy(IdUniquenessPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.IdUniquenessPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.IdUniquenessPolicyOperations

  • Packages that use IdUniquenessPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of IdUniquenessPolicyOperations in org.omg.PortableServer

      Subinterfaces of IdUniquenessPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  IdUniquenessPolicy
      The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID

No usage of org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID

No usage of org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ImplicitActivationPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ImplicitActivationPolicy

  • Packages that use ImplicitActivationPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ImplicitActivationPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return ImplicitActivationPolicy
      Modifier and Type Method and Description
      ImplicitActivationPolicy POAOperations.create_implicit_activation_policy(ImplicitActivationPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ImplicitActivationPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ImplicitActivationPolicyOperations

  • Packages that use ImplicitActivationPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ImplicitActivationPolicyOperations in org.omg.PortableServer

      Subinterfaces of ImplicitActivationPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ImplicitActivationPolicy
      This policy specifies whether implicit activation of servants is supported in the created POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID

No usage of org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.LifespanPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.LifespanPolicy

  • Packages that use LifespanPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of LifespanPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return LifespanPolicy
      Modifier and Type Method and Description
      LifespanPolicy POAOperations.create_lifespan_policy(LifespanPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.LifespanPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.LifespanPolicyOperations

  • Packages that use LifespanPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of LifespanPolicyOperations in org.omg.PortableServer

      Subinterfaces of LifespanPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  LifespanPolicy
      The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.LIFESPAN_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.LIFESPAN_POLICY_ID

No usage of org.omg.PortableServer.LIFESPAN_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.POA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.POA

  • Packages that use POA
    Package Description
    org.omg.CosNaming
    Provides a naming service for Java IDL.
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.portable
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of POA in org.omg.CosNaming

      Methods in org.omg.CosNaming with parameters of type POA
      Modifier and Type | Method and Description
      String[] | NamingContextPOA._all_interfaces(POA poa, byte[] objectId)
      String[] | BindingIteratorPOA._all_interfaces(POA poa, byte[] objectId)
      String[] | NamingContextExtPOA._all_interfaces(POA poa, byte[] objectId)

    • Uses of POA in org.omg.PortableServer

      Methods in org.omg.PortableServer that return POA
      Modifier and Type | Method and Description
      POA Servant._default_POA()
      Returns the root POA from the ORB instance associated with the servant.
      POA Servant._poa()
      Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.
      POA POAOperations.create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.
      static POA | POAHelper.extract(Any a)
      POA POAOperations.find_POA(String adapter_name, boolean activate_it)
      If the target POA is the parent of a child POA with the specified name (relative to the target POA), that child POA is returned.
      POA CurrentOperations.get_POA()
      Returns reference to the POA implementing the object in whose context it is called.
      static POA | POAHelper.narrow(Object obj)
      static POA | POAHelper.read(InputStream istream)
      POA[] POAOperations.the_children()
      This attribute identifies the current set of all child POAs of the POA.
      POA POAOperations.the_parent()
      This attribute identifies the parent of the POA.
      Methods in org.omg.PortableServer with parameters of type POA
      Modifier and Type | Method and Description
      String[] | ServantLocatorPOA._all_interfaces(POA poa, byte[] objectId)
      String[] | ServantActivatorPOA._all_interfaces(POA poa, byte[] objectId)
      abstract String[] Servant._all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      void _ServantActivatorStub.etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      void ServantActivatorOperations.etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant _ServantActivatorStub.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant ServantActivatorOperations.incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      static void | POAHelper.insert(Any a, POA that)
      void ServantLocatorOperations.postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      void _ServantLocatorStub.postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      Servant ServantLocatorOperations.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      Servant _ServantLocatorStub.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      boolean AdapterActivatorOperations.unknown_adapter(POA parent, String name)
      This operation is invoked when the ORB receives a request for an object reference that identifies a target POA that does not exist.
      static void | POAHelper.write(OutputStream ostream, POA value)

    • Uses of POA in org.omg.PortableServer.portable

      Methods in org.omg.PortableServer.portable that return POA
      Modifier and Type Method and Description
      POA Delegate.default_POA(Servant Self)
      The default behavior of this function is to return the root POA from the ORB instance associated with the servant.
      POA Delegate.poa(Servant Self)
      The method _poa() is equivalent to calling PortableServer::Current:get_POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.POAManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.POAManager

  • Packages that use POAManager
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of POAManager in org.omg.PortableServer

      Methods in org.omg.PortableServer that return POAManager
      Modifier and Type Method and Description
      POAManager POAOperations.the_POAManager()
      This attribute identifies the POA manager associated with the POA.
      Methods in org.omg.PortableServer with parameters of type POAManager
      Modifier and Type Method and Description
      POA POAOperations.create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.POAManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.POAManagerOperations

  • Packages that use POAManagerOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of POAManagerOperations in org.omg.PortableServer

      Subinterfaces of POAManagerOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  POAManager
      Each POA object has an associated POAManager object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.POAOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.POAOperations

  • Packages that use POAOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of POAOperations in org.omg.PortableServer

      Subinterfaces of POAOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  POA
      A POA object manages the implementation of a collection of objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.RequestProcessingPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.RequestProcessingPolicy

  • Packages that use RequestProcessingPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of RequestProcessingPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return RequestProcessingPolicy
      Modifier and Type Method and Description
      RequestProcessingPolicy POAOperations.create_request_processing_policy(RequestProcessingPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.RequestProcessingPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.RequestProcessingPolicyOperations

  • Packages that use RequestProcessingPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of RequestProcessingPolicyOperations in org.omg.PortableServer

      Subinterfaces of RequestProcessingPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  RequestProcessingPolicy
      This policy specifies how requests are processed by the created POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID

No usage of org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantActivator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantActivator

  • Packages that use ServantActivator
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantActivator in org.omg.PortableServer

      Classes in org.omg.PortableServer that implement ServantActivator
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      Methods in org.omg.PortableServer that return ServantActivator
      Modifier and Type | Method and Description
      ServantActivator | ServantActivatorPOA._this()
      ServantActivator | ServantActivatorPOA._this(ORB orb)
      static ServantActivator | ServantActivatorHelper.extract(Any a)
      static ServantActivator | ServantActivatorHelper.narrow(Object obj)
      static ServantActivator | ServantActivatorHelper.read(InputStream istream)
      static ServantActivator | ServantActivatorHelper.unchecked_narrow(Object obj)
      Methods in org.omg.PortableServer with parameters of type ServantActivator
      Modifier and Type | Method and Description
      static void | ServantActivatorHelper.insert(Any a, ServantActivator that)
      static void | ServantActivatorHelper.write(OutputStream ostream, ServantActivator value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantActivatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantActivatorOperations

  • Packages that use ServantActivatorOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantActivatorOperations in org.omg.PortableServer

      Subinterfaces of ServantActivatorOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ServantActivator
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      Classes in org.omg.PortableServer that implement ServantActivatorOperations
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  ServantActivatorPOA
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantLocator

  • Packages that use ServantLocator
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantLocator in org.omg.PortableServer

      Classes in org.omg.PortableServer that implement ServantLocator
      Modifier and Type Class and Description
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Methods in org.omg.PortableServer that return ServantLocator
      Modifier and Type | Method and Description
      ServantLocator | ServantLocatorPOA._this()
      ServantLocator | ServantLocatorPOA._this(ORB orb)
      static ServantLocator | ServantLocatorHelper.extract(Any a)
      static ServantLocator | ServantLocatorHelper.narrow(Object obj)
      static ServantLocator | ServantLocatorHelper.read(InputStream istream)
      static ServantLocator | ServantLocatorHelper.unchecked_narrow(Object obj)
      Methods in org.omg.PortableServer with parameters of type ServantLocator
      Modifier and Type | Method and Description
      static void | ServantLocatorHelper.insert(Any a, ServantLocator that)
      static void | ServantLocatorHelper.write(OutputStream ostream, ServantLocator value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantLocatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantLocatorOperations

  • Packages that use ServantLocatorOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantLocatorOperations in org.omg.PortableServer

      Subinterfaces of ServantLocatorOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ServantLocator
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Classes in org.omg.PortableServer that implement ServantLocatorOperations
      Modifier and Type Class and Description
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      class  ServantLocatorPOA
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantManager

  • Packages that use ServantManager
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantManager in org.omg.PortableServer

      Subinterfaces of ServantManager in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ServantActivator
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      interface  ServantLocator
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Classes in org.omg.PortableServer that implement ServantManager
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      Methods in org.omg.PortableServer that return ServantManager
      Modifier and Type Method and Description
      ServantManager POAOperations.get_servant_manager()
      If the ServantRetentionPolicy of the POA is RETAIN, then the ServantManager argument (imgr) shall support the ServantActivator interface.
      Methods in org.omg.PortableServer with parameters of type ServantManager
      Modifier and Type Method and Description
      void POAOperations.set_servant_manager(ServantManager imgr)
      This operation sets the default servant manager associated with the POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantManagerOperations

  • Packages that use ServantManagerOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantManagerOperations in org.omg.PortableServer

      Subinterfaces of ServantManagerOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ServantActivator
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      interface  ServantActivatorOperations
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      interface  ServantLocator
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      interface  ServantLocatorOperations
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      interface  ServantManager
      A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
      Classes in org.omg.PortableServer that implement ServantManagerOperations
      Modifier and Type Class and Description
      class  _ServantActivatorStub
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  _ServantLocatorStub
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
      class  ServantActivatorPOA
      When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
      class  ServantLocatorPOA
      When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantRetentionPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantRetentionPolicy

  • Packages that use ServantRetentionPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantRetentionPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return ServantRetentionPolicy
      Modifier and Type Method and Description
      ServantRetentionPolicy POAOperations.create_servant_retention_policy(ServantRetentionPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ServantRetentionPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ServantRetentionPolicyOperations

  • Packages that use ServantRetentionPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ServantRetentionPolicyOperations in org.omg.PortableServer

      Subinterfaces of ServantRetentionPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ServantRetentionPolicy
      This policy specifies whether the created POA retains active servants in an Active Object Map.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID

No usage of org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ThreadPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ThreadPolicy

  • Packages that use ThreadPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ThreadPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that return ThreadPolicy
      Modifier and Type Method and Description
      ThreadPolicy POAOperations.create_thread_policy(ThreadPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.ThreadPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.ThreadPolicyOperations

  • Packages that use ThreadPolicyOperations
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of ThreadPolicyOperations in org.omg.PortableServer

      Subinterfaces of ThreadPolicyOperations in org.omg.PortableServer
      Modifier and Type Interface and Description
      interface  ThreadPolicy
      The ThreadPolicy specifies the threading model used with the created POA.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.THREAD_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.THREAD_POLICY_ID

No usage of org.omg.PortableServer.THREAD_POLICY_ID
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class CurrentHelper

  • java.lang.Object
    • org.omg.PortableServer.CurrentHelper

  • public abstract class CurrentHelper
extends Object
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked. The Current interface is provided to support servants that implement multiple objects, but can be used within the context of POA-dispatched method invocations on any servant. To provide location transparency, ORBs are required to support use of Current in the context of both locally and remotely invoked operations. An instance of Current can be obtained by the application by issuing the CORBA::ORB::resolve_initial_references("POACurrent") operation. Thereafter, it can be used within the context of a method dispatched by the POA to obtain the POA and ObjectId that identify the object on which that operation was invoked.

    • Constructor Summary

      Constructors
      Constructor and Description
      CurrentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static Current | extract(Any a)
      static String | id()
      static void | insert(Any a, Current that)
      static Current | narrow(Object obj)
      static Current | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, Current value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • CurrentHelper

        public CurrentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          Current that)

      • extract

        public static Current extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static Current read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         Current value)

      • narrow

        public static Current narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface CurrentOperations

  • All Superinterfaces:
    CurrentOperations
    All Known Subinterfaces:
    Current

    public interface CurrentOperations
extends CurrentOperations
    The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked. The Current interface is provided to support servants that implement multiple objects, but can be used within the context of POA-dispatched method invocations on any servant. To provide location transparency, ORBs are required to support use of Current in the context of both locally and remotely invoked operations. An instance of Current can be obtained by the application by issuing the CORBA::ORB::resolve_initial_references("POACurrent") operation. Thereafter, it can be used within the context of a method dispatched by the POA to obtain the POA and ObjectId that identify the object on which that operation was invoked.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      byte[] get_object_id()
      Returns the ObjectId identifying the object in whose context it is called.
      POA get_POA()
      Returns reference to the POA implementing the object in whose context it is called.

    • Method Detail

      • get_POA

        POA get_POA()
     throws NoContext
        Returns reference to the POA implementing the object in whose context it is called.
        Returns:
        The poa implementing the object
        Throws:
        NoContext - is raised when the operation is outside the context of a POA-dispatched operation

      • get_object_id

        byte[] get_object_id()
              throws NoContext
        Returns the ObjectId identifying the object in whose context it is called.
        Returns:
        the ObjectId of the object
        Throws:
        NoContext - is raised when the operation is called outside the context of a POA-dispatched operation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CurrentPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer.CurrentPackage

Provides method implementations with access to the identity of the object on which the method was invoked.

See: Description

  • Class Summary
    Class Description
    NoContextHelper
    org/omg/PortableServer/CurrentPackage/NoContextHelper.java .
  • Exception Summary
    Exception Description
    NoContext
    org/omg/PortableServer/CurrentPackage/NoContext.java .

Package org.omg.PortableServer.CurrentPackage Description

Provides method implementations with access to the identity of the object on which the method was invoked. The Current package supports servants that implement multiple objects, but can be used within the context of POA-dispatched method invocations on any servant. To provide location transparency, ORBs are required to support use of Current in the context of both locally and remotely invoked operations. An instance of Current can be obtained by the application by issuing the CORBA::ORB::resolve_initial_references("POACurrent") operation. Thereafter, it can be used within the context of a method dispatched by the POA to obtain the POA and ObjectId that identify the object on which that operation was invoked.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer.CurrentPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer.CurrentPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableServer.CurrentPackage.NoContextHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableServer.CurrentPackage.NoContext
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer.CurrentPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer.CurrentPackage

  • Packages that use org.omg.PortableServer.CurrentPackage
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.
  • Classes in org.omg.PortableServer.CurrentPackage used by org.omg.PortableServer
    Class and Description
    NoContext
    org/omg/PortableServer/CurrentPackage/NoContext.java .
  • Classes in org.omg.PortableServer.CurrentPackage used by org.omg.PortableServer.CurrentPackage
    Class and Description
    NoContext
    org/omg/PortableServer/CurrentPackage/NoContext.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.CurrentPackage.NoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.CurrentPackage.NoContext

  • Packages that use NoContext
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.CurrentPackage
    Provides method implementations with access to the identity of the object on which the method was invoked.

    • Uses of NoContext in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw NoContext
      Modifier and Type Method and Description
      byte[] CurrentOperations.get_object_id()
      Returns the ObjectId identifying the object in whose context it is called.
      POA CurrentOperations.get_POA()
      Returns reference to the POA implementing the object in whose context it is called.

    • Uses of NoContext in org.omg.PortableServer.CurrentPackage

      Methods in org.omg.PortableServer.CurrentPackage that return NoContext
      Modifier and Type | Method and Description
      static NoContext | NoContextHelper.extract(Any a)
      static NoContext | NoContextHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.CurrentPackage with parameters of type NoContext
      Modifier and Type | Method and Description
      static void | NoContextHelper.insert(Any a, NoContext that)
      static void | NoContextHelper.write(OutputStream ostream, NoContext value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.CurrentPackage.NoContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.CurrentPackage.NoContextHelper

No usage of org.omg.PortableServer.CurrentPackage.NoContextHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NoContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.CurrentPackage

Class NoContext

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.CurrentPackage.NoContext
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NoContext
extends UserException
    org/omg/PortableServer/CurrentPackage/NoContext.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NoContext()
      NoContext(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NoContext

        public NoContext()

      • NoContext

        public NoContext(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NoContextHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.CurrentPackage

Class NoContextHelper

  • java.lang.Object
    • org.omg.PortableServer.CurrentPackage.NoContextHelper

  • public abstract class NoContextHelper
extends Object
    org/omg/PortableServer/CurrentPackage/NoContextHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NoContextHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NoContext | extract(Any a)
      static String | id()
      static void | insert(Any a, NoContext that)
      static NoContext | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NoContext value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NoContextHelper

        public NoContextHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NoContext that)

      • extract

        public static NoContext extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NoContext read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NoContext value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DynamicImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class DynamicImplementation

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.PortableServer.DynamicImplementation

  • public abstract class DynamicImplementation
extends Servant
    Allows dynamic handling of object invocations. POA-based DSI servants inherit from the standard DynamicImplementation class, this class inherits from the Servant class. Based on IDL to Java spec. CORBA V 2.3.1 ptc/00-01-08.pdf.

    • Constructor Summary

      Constructors
      Constructor and Description
      DynamicImplementation()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void invoke(ServerRequest request)
      Receives requests issued to any CORBA object incarnated by the DSI servant and performs the processing necessary to execute the request.

      • Methods inherited from class org.omg.PortableServer.Servant

        _all_interfaces, _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DynamicImplementation

        public DynamicImplementation()

    • Method Detail

      • invoke

        public abstract void invoke(ServerRequest request)
        Receives requests issued to any CORBA object incarnated by the DSI servant and performs the processing necessary to execute the request.
        Parameters:
        request - the request issued to the CORBA object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ForwardRequest

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.ForwardRequest
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ForwardRequest
extends UserException
    org/omg/PortableServer/ForwardRequest.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Object forward_reference

    • Constructor Summary

      Constructors
      Constructor and Description
      ForwardRequest()
      ForwardRequest(Object _forward_reference)
      ForwardRequest(String $reason, Object _forward_reference)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • forward_reference

        public Object forward_reference

    • Constructor Detail

      • ForwardRequest

        public ForwardRequest()

      • ForwardRequest

        public ForwardRequest(Object _forward_reference)

      • ForwardRequest

        public ForwardRequest(String $reason,
                      Object _forward_reference)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ForwardRequestHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ForwardRequestHelper

  • java.lang.Object
    • org.omg.PortableServer.ForwardRequestHelper

  • public abstract class ForwardRequestHelper
extends Object
    org/omg/PortableServer/ForwardRequestHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ForwardRequestHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ForwardRequest | extract(Any a)
      static String | id()
      static void | insert(Any a, ForwardRequest that)
      static ForwardRequest | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ForwardRequest value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ForwardRequestHelper

        public ForwardRequestHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ForwardRequest that)

      • extract

        public static ForwardRequest extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ForwardRequest read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ForwardRequest value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdAssignmentPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface IdAssignmentPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    IdAssignmentPolicy

    public interface IdAssignmentPolicyOperations
extends PolicyOperations
    IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB. The default is SYSTEM_ID.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      IdAssignmentPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        IdAssignmentPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdAssignmentPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class IdAssignmentPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.IdAssignmentPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class IdAssignmentPolicyValue
extends Object
implements IDLEntity
    The IdAssignmentPolicyValue can have the following values. USER_ID - Objects created with that POA are assigned Object Ids only by the application. SYSTEM_ID - Objects created with that POA are assigned Object Ids only by the POA. If the POA also has the PERSISTENT policy, assigned Object Ids must be unique across all instantiations of the same POA.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _SYSTEM_ID
      static int | _USER_ID
      static IdAssignmentPolicyValue | SYSTEM_ID
      static IdAssignmentPolicyValue | USER_ID

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | IdAssignmentPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static IdAssignmentPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _USER_ID

        public static final int _USER_ID
        See Also:
        Constant Field Values

      • USER_ID

        public static final IdAssignmentPolicyValue USER_ID

      • _SYSTEM_ID

        public static final int _SYSTEM_ID
        See Also:
        Constant Field Values

      • SYSTEM_ID

        public static final IdAssignmentPolicyValue SYSTEM_ID

    • Constructor Detail

      • IdAssignmentPolicyValue

        protected IdAssignmentPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static IdAssignmentPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdUniquenessPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface IdUniquenessPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    IdUniquenessPolicy

    public interface IdUniquenessPolicyOperations
extends PolicyOperations
    The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities. The default is UNIQUE_ID.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      IdUniquenessPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        IdUniquenessPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IdUniquenessPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class IdUniquenessPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.IdUniquenessPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class IdUniquenessPolicyValue
extends Object
implements IDLEntity
    IdUniquenessPolicyValue can have the following values. UNIQUE_ID - Servants activated with that POA support exactly one Object Id. MULTIPLE_ID - a servant activated with that POA may support one or more Object Ids.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _MULTIPLE_ID
      static int | _UNIQUE_ID
      static IdUniquenessPolicyValue | MULTIPLE_ID
      static IdUniquenessPolicyValue | UNIQUE_ID

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | IdUniquenessPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static IdUniquenessPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _UNIQUE_ID

        public static final int _UNIQUE_ID
        See Also:
        Constant Field Values

      • UNIQUE_ID

        public static final IdUniquenessPolicyValue UNIQUE_ID

      • _MULTIPLE_ID

        public static final int _MULTIPLE_ID
        See Also:
        Constant Field Values

      • MULTIPLE_ID

        public static final IdUniquenessPolicyValue MULTIPLE_ID

    • Constructor Detail

      • IdUniquenessPolicyValue

        protected IdUniquenessPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static IdUniquenessPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ID_ASSIGNMENT_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ID_ASSIGNMENT_POLICY_ID

  • public interface ID_ASSIGNMENT_POLICY_ID
    org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing ID_ASSIGNMENT_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing ID_ASSIGNMENT_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ID_UNIQUENESS_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ID_UNIQUENESS_POLICY_ID

  • public interface ID_UNIQUENESS_POLICY_ID
    org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing ID_UNIQUENESS_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing ID_UNIQUENESS_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ImplicitActivationPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ImplicitActivationPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    ImplicitActivationPolicy

    public interface ImplicitActivationPolicyOperations
extends PolicyOperations
    This policy specifies whether implicit activation of servants is supported in the created POA.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ImplicitActivationPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        ImplicitActivationPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ImplicitActivationPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ImplicitActivationPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.ImplicitActivationPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class ImplicitActivationPolicyValue
extends Object
implements IDLEntity
    ImplicitActivationPolicyValue has the following semantics. IMPLICIT_ACTIVATION to indicate implicit activation of servants. This requires SYSTEM_ID and RETAIN policies to be set. NO_IMPLICIT_ACTIVATION to indicate no implicit servant activation.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _IMPLICIT_ACTIVATION
      static int | _NO_IMPLICIT_ACTIVATION
      static ImplicitActivationPolicyValue | IMPLICIT_ACTIVATION
      static ImplicitActivationPolicyValue | NO_IMPLICIT_ACTIVATION

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | ImplicitActivationPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static ImplicitActivationPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _IMPLICIT_ACTIVATION

        public static final int _IMPLICIT_ACTIVATION
        See Also:
        Constant Field Values

      • IMPLICIT_ACTIVATION

        public static final ImplicitActivationPolicyValue IMPLICIT_ACTIVATION

      • _NO_IMPLICIT_ACTIVATION

        public static final int _NO_IMPLICIT_ACTIVATION
        See Also:
        Constant Field Values

      • NO_IMPLICIT_ACTIVATION

        public static final ImplicitActivationPolicyValue NO_IMPLICIT_ACTIVATION

    • Constructor Detail

      • ImplicitActivationPolicyValue

        protected ImplicitActivationPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static ImplicitActivationPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


IMPLICIT_ACTIVATION_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface IMPLICIT_ACTIVATION_POLICY_ID

  • public interface IMPLICIT_ACTIVATION_POLICY_ID
    org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing IMPLICIT_ACTIVATION_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing IMPLICIT_ACTIVATION_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LifespanPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface LifespanPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    LifespanPolicy

    public interface LifespanPolicyOperations
extends PolicyOperations
    The LifespanPolicy specifies the lifespan of the objects implemented in the created POA. The default is TRANSIENT.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LifespanPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        LifespanPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LifespanPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class LifespanPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.LifespanPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class LifespanPolicyValue
extends Object
implements IDLEntity
    The LifespanPolicyValue can have the following values. TRANSIENT - The objects implemented in the POA cannot outlive the POA instance in which they are first created. PERSISTENT - The objects implemented in the POA can outlive the process in which they are first created.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _PERSISTENT
      static int | _TRANSIENT
      static LifespanPolicyValue | PERSISTENT
      static LifespanPolicyValue | TRANSIENT

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | LifespanPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static LifespanPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _TRANSIENT

        public static final int _TRANSIENT
        See Also:
        Constant Field Values

      • TRANSIENT

        public static final LifespanPolicyValue TRANSIENT

      • _PERSISTENT

        public static final int _PERSISTENT
        See Also:
        Constant Field Values

      • PERSISTENT

        public static final LifespanPolicyValue PERSISTENT

    • Constructor Detail

      • LifespanPolicyValue

        protected LifespanPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static LifespanPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LIFESPAN_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface LIFESPAN_POLICY_ID

  • public interface LIFESPAN_POLICY_ID
    org/omg/PortableServer/LIFESPAN_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing LIFESPAN_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing LIFESPAN_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class POAHelper

  • java.lang.Object
    • org.omg.PortableServer.POAHelper

  • public abstract class POAHelper
extends Object
    A POA object manages the implementation of a collection of objects. The POA supports a name space for the objects, which are identified by Object Ids. A POA also provides a name space for POAs. A POA is created as a child of an existing POA, which forms a hierarchy starting with the root POA. A POA object must not be exported to other processes, or externalized with ORB::object_to_string.

    • Constructor Summary

      Constructors
      Constructor and Description
      POAHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static POA | extract(Any a)
      static String | id()
      static void | insert(Any a, POA that)
      static POA | narrow(Object obj)
      static POA | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, POA value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • POAHelper

        public POAHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          POA that)

      • extract

        public static POA extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static POA read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         POA value)

      • narrow

        public static POA narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAManagerOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface POAManagerOperations

  • All Known Subinterfaces:
    POAManager

    public interface POAManagerOperations
    Each POA object has an associated POAManager object. A POA manager may be associated with one or more POA objects. A POA manager encapsulates the processing state of the POAs it is associated with.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void activate()
      This operation changes the state of the POA manager to active, causing associated POAs to start processing requests.
      void deactivate(boolean etherealize_objects, boolean wait_for_completion)
      This operation changes the state of the POA manager to inactive, causing associated POAs to reject the requests that have not begun executing as well as as any new requests.
      void discard_requests(boolean wait_for_completion)
      This operation changes the state of the POA manager to discarding.
      State get_state()
      This operation returns the state of the POA manager.
      void hold_requests(boolean wait_for_completion)
      This operation changes the state of the POA manager to holding, causing associated POAs to queue incoming requests.

    • Method Detail

      • activate

        void activate()
       throws AdapterInactive
        This operation changes the state of the POA manager to active, causing associated POAs to start processing requests.
        Throws:
        AdapterInactive - is raised if the operation is invoked on the POAManager in inactive state.

      • hold_requests

        void hold_requests(boolean wait_for_completion)
            throws AdapterInactive
        This operation changes the state of the POA manager to holding, causing associated POAs to queue incoming requests.
        Parameters:
        wait_for_completion - if FALSE, the operation returns immediately after changing state. If TRUE, it waits for all active requests to complete.
        Throws:
        AdapterInactive - is raised if the operation is invoked on the POAManager in inactive state.

      • discard_requests

        void discard_requests(boolean wait_for_completion)
               throws AdapterInactive
        This operation changes the state of the POA manager to discarding. This causes associated POAs to discard incoming requests.
        Parameters:
        wait_for_completion - if FALSE, the operation returns immediately after changing state. If TRUE, it waits for all active requests to complete.
        Throws:
        AdapterInactive - is raised if the operation is invoked on the POAManager in inactive state.

      • deactivate

        void deactivate(boolean etherealize_objects,
                boolean wait_for_completion)
         throws AdapterInactive
        This operation changes the state of the POA manager to inactive, causing associated POAs to reject the requests that have not begun executing as well as as any new requests.
        Parameters:
        etherealize_objects - a flag to indicate whether to invoke the etherealize operation of the associated servant manager for all active objects.
        wait_for_completion - if FALSE, the operation returns immediately after changing state. If TRUE, it waits for all active requests to complete.
        Throws:
        AdapterInactive - is raised if the operation is invoked on the POAManager in inactive state.

      • get_state

        State get_state()
        This operation returns the state of the POA manager.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAManagerPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer.POAManagerPackage

Encapsulates the processing state of the POAs it is associated with.

See: Description

  • Class Summary
    Class Description
    AdapterInactiveHelper
    org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java .
    State
    Specifies the states for the POAManager
  • Exception Summary
    Exception Description
    AdapterInactive
    org/omg/PortableServer/POAManagerPackage/AdapterInactive.java .

Package org.omg.PortableServer.POAManagerPackage Description

Encapsulates the processing state of the POAs it is associated with. Each POA object has an associated POAManager object. A POA manager may be associated with one or more POA objects.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer.POAManagerPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer.POAManagerPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper
    • org.omg.PortableServer.POAManagerPackage.State (implements org.omg.CORBA.portable.IDLEntity)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableServer.POAManagerPackage.AdapterInactive
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer.POAManagerPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer.POAManagerPackage

  • Packages that use org.omg.PortableServer.POAManagerPackage
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.
  • Classes in org.omg.PortableServer.POAManagerPackage used by org.omg.PortableServer
    Class and Description
    AdapterInactive
    org/omg/PortableServer/POAManagerPackage/AdapterInactive.java .
    State
    Specifies the states for the POAManager
  • Classes in org.omg.PortableServer.POAManagerPackage used by org.omg.PortableServer.POAManagerPackage
    Class and Description
    AdapterInactive
    org/omg/PortableServer/POAManagerPackage/AdapterInactive.java .
    State
    Specifies the states for the POAManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterInactive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAManagerPackage

Class AdapterInactive

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAManagerPackage.AdapterInactive
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class AdapterInactive
extends UserException
    org/omg/PortableServer/POAManagerPackage/AdapterInactive.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterInactive()
      AdapterInactive(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AdapterInactive

        public AdapterInactive()

      • AdapterInactive

        public AdapterInactive(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterInactiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAManagerPackage

Class AdapterInactiveHelper

  • java.lang.Object
    • org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper

  • public abstract class AdapterInactiveHelper
extends Object
    org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterInactiveHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static AdapterInactive | extract(Any a)
      static String | id()
      static void | insert(Any a, AdapterInactive that)
      static AdapterInactive | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, AdapterInactive value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterInactiveHelper

        public AdapterInactiveHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          AdapterInactive that)

      • extract

        public static AdapterInactive extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static AdapterInactive read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         AdapterInactive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAManagerPackage.AdapterInactive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAManagerPackage.AdapterInactive

  • Packages that use AdapterInactive
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.

    • Uses of AdapterInactive in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw AdapterInactive
      Modifier and Type Method and Description
      void POAManagerOperations.activate()
      This operation changes the state of the POA manager to active, causing associated POAs to start processing requests.
      void POAManagerOperations.deactivate(boolean etherealize_objects, boolean wait_for_completion)
      This operation changes the state of the POA manager to inactive, causing associated POAs to reject the requests that have not begun executing as well as as any new requests.
      void POAManagerOperations.discard_requests(boolean wait_for_completion)
      This operation changes the state of the POA manager to discarding.
      void POAManagerOperations.hold_requests(boolean wait_for_completion)
      This operation changes the state of the POA manager to holding, causing associated POAs to queue incoming requests.

    • Uses of AdapterInactive in org.omg.PortableServer.POAManagerPackage

      Methods in org.omg.PortableServer.POAManagerPackage that return AdapterInactive
      Modifier and Type | Method and Description
      static AdapterInactive | AdapterInactiveHelper.extract(Any a)
      static AdapterInactive | AdapterInactiveHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAManagerPackage with parameters of type AdapterInactive
      Modifier and Type | Method and Description
      static void | AdapterInactiveHelper.insert(Any a, AdapterInactive that)
      static void | AdapterInactiveHelper.write(OutputStream ostream, AdapterInactive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper

No usage of org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAManagerPackage.State

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAManagerPackage.State

  • Packages that use State
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAManagerPackage
    Encapsulates the processing state of the POAs it is associated with.

    • Uses of State in org.omg.PortableServer

      Methods in org.omg.PortableServer that return State
      Modifier and Type Method and Description
      State POAManagerOperations.get_state()
      This operation returns the state of the POA manager.

    • Uses of State in org.omg.PortableServer.POAManagerPackage

      Fields in org.omg.PortableServer.POAManagerPackage declared as State
      Modifier and Type | Field and Description
      static State | State.ACTIVE
      static State | State.DISCARDING
      static State | State.HOLDING
      static State | State.INACTIVE
      Methods in org.omg.PortableServer.POAManagerPackage that return State
      Modifier and Type | Method and Description
      static State | State.from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


State

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAManagerPackage

Class State

  • java.lang.Object
    • org.omg.PortableServer.POAManagerPackage.State
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class State
extends Object
implements IDLEntity
    Specifies the states for the POAManager

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _ACTIVE
      static int | _DISCARDING
      static int | _HOLDING
      static int | _INACTIVE
      static State | ACTIVE
      static State | DISCARDING
      static State | HOLDING
      static State | INACTIVE

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | State(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static State | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _HOLDING

        public static final int _HOLDING
        See Also:
        Constant Field Values

      • HOLDING

        public static final State HOLDING

      • _ACTIVE

        public static final int _ACTIVE
        See Also:
        Constant Field Values

      • ACTIVE

        public static final State ACTIVE

      • _DISCARDING

        public static final int _DISCARDING
        See Also:
        Constant Field Values

      • DISCARDING

        public static final State DISCARDING

      • _INACTIVE

        public static final int _INACTIVE
        See Also:
        Constant Field Values

      • INACTIVE

        public static final State INACTIVE

    • Constructor Detail

      • State

        protected State(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static State from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface POAOperations

  • All Known Subinterfaces:
    POA

    public interface POAOperations
    A POA object manages the implementation of a collection of objects. The POA supports a name space for the objects, which are identified by Object Ids. A POA also provides a name space for POAs. A POA is created as a child of an existing POA, which forms a hierarchy starting with the root POA. A POA object must not be exported to other processes, or externalized with ORB::object_to_string.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void activate_object_with_id(byte[] id, Servant p_servant)
      This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.
      byte[] activate_object(Servant p_servant)
      This operation generates an Object Id and enters the Object Id and the specified servant in the Active Object Map.
      IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      LifespanPolicy create_lifespan_policy(LifespanPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      POA create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.
      Object create_reference_with_id(byte[] oid, String intf)
      This operation creates an object reference that encapsulates the specified Object Id and interface repository Id values.
      Object create_reference(String intf)
      This operation creates an object reference that encapsulates a POA-generated Object Id value and the specified interface repository id.
      RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      ThreadPolicy create_thread_policy(ThreadPolicyValue value)
      These operations each return a reference to a policy object with the specified value.
      void deactivate_object(byte[] oid)
      This operation causes the ObjectId specified in the oid parameter to be deactivated.
      void destroy(boolean etherealize_objects, boolean wait_for_completion)
      This operation destroys the POA and all descendant POAs.
      POA find_POA(String adapter_name, boolean activate_it)
      If the target POA is the parent of a child POA with the specified name (relative to the target POA), that child POA is returned.
      ServantManager get_servant_manager()
      If the ServantRetentionPolicy of the POA is RETAIN, then the ServantManager argument (imgr) shall support the ServantActivator interface.
      Servant get_servant()
      This operation returns the default servant associated with the POA.
      Object id_to_reference(byte[] oid)
      If an object with the specified Object Id value is currently active, a reference encapsulating the information used to activate the object is returned.
      Servant id_to_servant(byte[] oid)
      If the POA has the RETAIN policy and the specified ObjectId is in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      byte[] id()
      This returns the unique id of the POA in the process in which it is created.
      byte[] reference_to_id(Object reference)
      This operation returns the Object Id value encapsulated by the specified reference.
      Servant reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      byte[] servant_to_id(Servant p_servant)
      This operation has four possible behaviors.
      Object servant_to_reference(Servant p_servant)
      This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA.
      void set_servant_manager(ServantManager imgr)
      This operation sets the default servant manager associated with the POA.
      void set_servant(Servant p_servant)
      This operation registers the specified servant with the POA as the default servant.
      AdapterActivator the_activator()
      This attribute identifies the adapter activator associated with the POA.
      void the_activator(AdapterActivator newThe_activator)
      This attribute identifies the adapter activator associated with the POA.
      POA[] the_children()
      This attribute identifies the current set of all child POAs of the POA.
      String the_name()
      This attribute identifies the POA relative to its parent.
      POA the_parent()
      This attribute identifies the parent of the POA.
      POAManager the_POAManager()
      This attribute identifies the POA manager associated with the POA.

    • Method Detail

      • create_POA

        POA create_POA(String adapter_name,
               POAManager a_POAManager,
               Policy[] policies)
        throws AdapterAlreadyExists,
               InvalidPolicy
        This operation creates a new POA as a child of the target POA.
        Parameters:
        adapter_name - identifies the new POA with respect to other POAs with the same parent POA.
        a_POAManager - specifies the POA Manager to be associated with the new POA.
        policies - specifies policy objects to be associated with the POA to control its behavior.
        Throws:
        AdapterAlreadyExists - specifies that the target POA already has a child POA with the specified name.
        InvalidPolicy - is raised if any of the policy objects are not valid for the ORB, or are in conflict, or require an administrative action that has not been performed.

      • find_POA

        POA find_POA(String adapter_name,
             boolean activate_it)
      throws AdapterNonExistent
        If the target POA is the parent of a child POA with the specified name (relative to the target POA), that child POA is returned.
        Parameters:
        adapter_name - POA name to be found.
        activate_it - if a POA with the specified name does not exist and the value of the activate_it parameter is TRUE, the target POA's AdapterActivator, if one exists, is invoked.
        Returns:
        POA if one exists or is activated by the AdapterActivator.
        Throws:
        AdapterNonExistent

      • destroy

        void destroy(boolean etherealize_objects,
             boolean wait_for_completion)
        This operation destroys the POA and all descendant POAs. All descendant POAs are destroyed (recursively) before the destruction of the containing POA. The POA so destroyed (that is, the POA with its name) may be re-created later in the same process.
        Parameters:
        etherealize_objects - flag to indicate whether etherealize operation on servant manager needs to be called.
        wait_for_completion - flag to indicate whether POA and its children need to wait for active requests and the etherealization to complete.

      • create_thread_policy

        ThreadPolicy create_thread_policy(ThreadPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        ThreadPolcy Object

      • create_lifespan_policy

        LifespanPolicy create_lifespan_policy(LifespanPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        LifespanPolicy Object.

      • create_id_uniqueness_policy

        IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        IdUniquenessPolicy Object.

      • create_id_assignment_policy

        IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        IdAssignmentPolicy Object.

      • create_implicit_activation_policy

        ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        ImplicitActivationPolicy Object.

      • create_servant_retention_policy

        ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        ServantRetentionPolicy Object.

      • create_request_processing_policy

        RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue value)
        These operations each return a reference to a policy object with the specified value.
        Parameters:
        value - policy type
        Returns:
        RequestProcessingPolicy Object.

      • the_name

        String the_name()
        This attribute identifies the POA relative to its parent. This name is assigned when the POA is created.

      • the_parent

        POA the_parent()
        This attribute identifies the parent of the POA. The parent of the root POA is null.

      • the_children

        POA[] the_children()
        This attribute identifies the current set of all child POAs of the POA. The set of child POAs includes only the POA's immediate children, and not their descendants.

      • the_POAManager

        POAManager the_POAManager()
        This attribute identifies the POA manager associated with the POA.

      • the_activator

        AdapterActivator the_activator()
        This attribute identifies the adapter activator associated with the POA.

      • the_activator

        void the_activator(AdapterActivator newThe_activator)
        This attribute identifies the adapter activator associated with the POA.

      • get_servant_manager

        ServantManager get_servant_manager()
                            throws WrongPolicy
        If the ServantRetentionPolicy of the POA is RETAIN, then the ServantManager argument (imgr) shall support the ServantActivator interface. For a NON_RETAIN policy, the ServantManager shall support the ServantLocator interface. If the argument is nil, or does not support the required interface, then the OBJ_ADAPTER exception is raised.
        Returns:
        ServantManager associated with a POA or null if none exists.
        Throws:
        WrongPolicy - raised if the USE_SERVANT_MANAGER policy is not specified.

      • set_servant_manager

        void set_servant_manager(ServantManager imgr)
                  throws WrongPolicy
        This operation sets the default servant manager associated with the POA. This operation may only be invoked once after a POA has been created. Attempting to set the servant manager after one has already been set will result in the BAD_INV_ORDER exception being raised.
        Parameters:
        imgr - servant manager to be used as a default.
        Throws:
        WrongPolicy - raised if the USE_SERVANT_MANAGER policy is not specified.

      • get_servant

        Servant get_servant()
             throws NoServant,
                    WrongPolicy
        This operation returns the default servant associated with the POA.
        Returns:
        p_servant default servant associated with a POA.
        Throws:
        NoServant - raised if no default servant is associated with the POA.
        WrongPolicy - raised if the USE_DEFAULT_SERVANT policy is not specified.

      • set_servant

        void set_servant(Servant p_servant)
          throws WrongPolicy
        This operation registers the specified servant with the POA as the default servant. This servant will be used for all requests for which no servant is found in the Active Object Map.
        Parameters:
        p_servant - servant to be used as a default.
        Throws:
        WrongPolicy - raised if the USE_DEFAULT_SERVANT policy is not specified.

      • activate_object

        byte[] activate_object(Servant p_servant)
                throws ServantAlreadyActive,
                       WrongPolicy
        This operation generates an Object Id and enters the Object Id and the specified servant in the Active Object Map.
        Parameters:
        p_servant - servant to be associated with an object to be activated.
        Returns:
        POA generated object id.
        Throws:
        ServantAlreadyActive - is raised if the POA has UNIQUE_ID policy and servant is is already in the Active Object Map.
        WrongPolicy - raised if the SYSTEM_ID and RETAIN policies are not specified.

      • activate_object_with_id

        void activate_object_with_id(byte[] id,
                             Servant p_servant)
                      throws ServantAlreadyActive,
                             ObjectAlreadyActive,
                             WrongPolicy
        This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.
        Parameters:
        id - object id for the object to be activated.
        p_servant - servant to be associated with the object.
        Throws:
        ServantAlreadyActive - raised if the POA has the UNIQUE_ID policy and the servant is already in the Active Object Map.
        ObjectAlreadyActive - raised if the object is already active in the POA.
        WrongPolicy - raised if the RETAIN policy is is not specified.

      • deactivate_object

        void deactivate_object(byte[] oid)
                throws ObjectNotActive,
                       WrongPolicy
        This operation causes the ObjectId specified in the oid parameter to be deactivated. An ObjectId which has been deactivated continues to process requests until there are no active requests for that ObjectId. A deactivated ObjectId is removed from the Active Object Map when all requests executing for that ObjectId have completed.
        Parameters:
        oid - Object Id for the object to be deactivated.
        Throws:
        ObjectNotActive - if the object with the specified oid is not in the Active Object Map.
        WrongPolicy - raised if the RETAIN policy is is not specified.

      • create_reference

        Object create_reference(String intf)
                 throws WrongPolicy
        This operation creates an object reference that encapsulates a POA-generated Object Id value and the specified interface repository id.
        Parameters:
        intf - rep id for creating an object reference.
        Returns:
        object reference created using intf.
        Throws:
        WrongPolicy - if SYSTEM_ID policy is not specified.

      • create_reference_with_id

        Object create_reference_with_id(byte[] oid,
                                String intf)
        This operation creates an object reference that encapsulates the specified Object Id and interface repository Id values. It does not cause an activation to take place. The resulting reference may be passed to clients, so that subsequent requests on those references will cause the object to be activated if necessary, or the default servant used, depending on the applicable policies.
        Parameters:
        oid - object id for creating an objref
        intf - rep id for creating an objref
        Returns:
        object reference created using oid and intf
        Throws:
        BAD_PARAM - is raised if the POA has the SYSTEM_ID policy and it detects that the Object Id value was not generated by the system or for this POA.

      • servant_to_id

        byte[] servant_to_id(Servant p_servant)
              throws ServantNotActive,
                     WrongPolicy
        This operation has four possible behaviors. 1. If the POA has the UNIQUE_ID policy and the specified servant is active, the Object Id associated with that servant is returned. 2. If the POA has the IMPLICIT_ACTIVATION policy and either the POA has the MULTIPLE_ID policy or the specified servant is not active, the servant is activated using a POA-generated Object Id and the Interface Id associated with the servant, and that Object Id is returned. 3. If the POA has the USE_DEFAULT_SERVANT policy, the servant specified is the default servant, and the operation is being invoked in the context of executing a request on the default servant, then the ObjectId associated with the current invocation is returned. 4. Otherwise, the ServantNotActive exception is raised.
        Parameters:
        p_servant - servant for which the object disi returned.
        Returns:
        object id associated with the servant.
        Throws:
        ServantNotActive - if the above rules and policy combination is not met.
        WrongPolicy - if the USE_DEFAULT_SERVANT policy or a combination of the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies are not present.

      • servant_to_reference

        Object servant_to_reference(Servant p_servant)
                     throws ServantNotActive,
                            WrongPolicy
        This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA. It has four possible behaviors. 1. If the POA has both the RETAIN and the UNIQUE_ID policy and the specified servant is active, an object reference encapsulating the information used to activate the servant is returned. 2. If the POA has both the RETAIN and the IMPLICIT_ACTIVATION policy and either the POA has the MULTIPLE_ID policy or the specified servant is not active, the servant is activated using a POA-generated Object Id and the Interface Id associated with the servant, and a corresponding object reference is returned. 3. If the operation was invoked in the context of executing a request on the specified servant, the reference associated with the current invocation is returned. 4. Otherwise, the ServantNotActive exception is raised.
        Parameters:
        p_servant - servant for which the object reference needs to be obtained.
        Returns:
        object reference associated with the servant.
        Throws:
        WrongPolicy - if the operation is not invoked in the context of executing a request on the specified servant and the required policies are not present.
        ServantNotActive - if the above specified policies and rules are not met.

      • reference_to_servant

        Servant reference_to_servant(Object reference)
                      throws ObjectNotActive,
                             WrongPolicy,
                             WrongAdapter
        If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map. Otherwise, if the POA has the USE_DEFAULT_SERVANT policy and a default servant has been registered with the POA, this operation returns the default servant. If the object reference was not created by this POA, the WrongAdapter exception is raised. (OMG Issue on inconsistency with the POA.IDL.
        Parameters:
        reference - object reference for which the servant is returned.
        Returns:
        servant associated with the reference.
        Throws:
        WrongPolicy - if neither the RETAIN policy or the USE_DEFAULT_SERVANT policy is present.
        ObjectNotActive - if the servant is not present in the Active Object Map (for RETAIN) or no default servant is registered (for USE_DEFAULT_POLICY).
        WrongAdapter - if reference was not created by this POA instance.

      • reference_to_id

        byte[] reference_to_id(Object reference)
                throws WrongAdapter,
                       WrongPolicy
        This operation returns the Object Id value encapsulated by the specified reference. This operation is valid only if the reference was created by the POA on which the operation is being performed. The object denoted by the reference does not have to be active for this operation to succeed.
        Parameters:
        reference - the object reference from which the object id needs to be returned.
        Returns:
        object id encapsulated in the reference.
        Throws:
        WrongAdapter - if the reference was not created by the POA specified in the reference.
        WrongPolicy - declared to allow future extensions.

      • id_to_servant

        Servant id_to_servant(byte[] oid)
               throws ObjectNotActive,
                      WrongPolicy
        If the POA has the RETAIN policy and the specified ObjectId is in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map. Otherwise, if the POA has the USE_DEFAULT_SERVANT policy and a default servant has been registered with the POA, this operation returns the default servant.
        Parameters:
        oid - object id for the which the servant is returned.
        Returns:
        servant associated with oid.
        Throws:
        ObjectNotActive - is raised if ObjectId is is not in the Active Object Map (for RETAIN policy), or no default servant is registered (for USE_DEFAULT_SERVANT policy).
        WrongPolicy - is raised if the RETAIN policy or the USE_DEFAULT_SERVANT policy is not present.

      • id_to_reference

        Object id_to_reference(byte[] oid)
                throws ObjectNotActive,
                       WrongPolicy
        If an object with the specified Object Id value is currently active, a reference encapsulating the information used to activate the object is returned.
        Parameters:
        oid - id of the object for which the reference is returned.
        Returns:
        the object reference
        Throws:
        ObjectNotActive - if the Object Id value is not active in the POA.
        WrongPolicy - if the RETAIN policy is not present.

      • id

        byte[] id()
        This returns the unique id of the POA in the process in which it is created. It is for use by portable interceptors.

        This id is guaranteed unique for the life span of the POA in the process. For persistent POAs, this means that if a POA is created in the same path with the same name as another POA, these POAs are identical and, therefore, have the same id. For transient POAs, each POA is unique.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


POAPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer.POAPackage

Allows programmers to construct object implementations that are portable between different ORB products.

See: Description

  • Class Summary
    Class Description
    AdapterAlreadyExistsHelper
    org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java .
    AdapterNonExistentHelper
    org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java .
    InvalidPolicyHelper
    org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java .
    NoServantHelper
    org/omg/PortableServer/POAPackage/NoServantHelper.java .
    ObjectAlreadyActiveHelper
    org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java .
    ObjectNotActiveHelper
    org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java .
    ServantAlreadyActiveHelper
    org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java .
    ServantNotActiveHelper
    org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java .
    WrongAdapterHelper
    org/omg/PortableServer/POAPackage/WrongAdapterHelper.java .
    WrongPolicyHelper
    org/omg/PortableServer/POAPackage/WrongPolicyHelper.java .
  • Exception Summary
    Exception Description
    AdapterAlreadyExists
    org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java .
    AdapterNonExistent
    org/omg/PortableServer/POAPackage/AdapterNonExistent.java .
    InvalidPolicy
    org/omg/PortableServer/POAPackage/InvalidPolicy.java .
    NoServant
    org/omg/PortableServer/POAPackage/NoServant.java .
    ObjectAlreadyActive
    org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java .
    ObjectNotActive
    org/omg/PortableServer/POAPackage/ObjectNotActive.java .
    ServantAlreadyActive
    org/omg/PortableServer/POAPackage/ServantAlreadyActive.java .
    ServantNotActive
    org/omg/PortableServer/POAPackage/ServantNotActive.java .
    WrongAdapter
    org/omg/PortableServer/POAPackage/WrongAdapter.java .
    WrongPolicy
    org/omg/PortableServer/POAPackage/WrongPolicy.java .

Package org.omg.PortableServer.POAPackage Description

Allows programmers to construct object implementations that are portable between different ORB products.

The Portable Object Adaptor (POA) is designed to meet the following goals:

  • Allow programmers to construct object implementations that are portable between different ORB products.
  • Provide support for objects with persistent identities.
  • Provide support for transparent activation of objects.
  • Allow a single servant to support multiple object identities simultaneously.

Given an interface My defined in My.idl, the file MyPOA.java is generated by the idlj compiler. You must provide the implementation for My and it must inherit from MyPOA.

MyPOA.java is a stream-based skeleton that extends org.omg.PortableServer.Servant and implements the InvokeHandler interface and the operations interface associated with the IDL interface the skeleton implements.

The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior.

All Mapping corresponds to the Chapter 11 of CORBA V2.3.1 specified by OMG document formal/99-10-07.pdf. The exception to this is the id attribute, which is added in ptc/00-08-06, section 11.3.8.26.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6, ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer.POAPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer.POAPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper
    • org.omg.PortableServer.POAPackage.AdapterNonExistentHelper
    • org.omg.PortableServer.POAPackage.InvalidPolicyHelper
    • org.omg.PortableServer.POAPackage.NoServantHelper
    • org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper
    • org.omg.PortableServer.POAPackage.ObjectNotActiveHelper
    • org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper
    • org.omg.PortableServer.POAPackage.ServantNotActiveHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • org.omg.PortableServer.POAPackage.AdapterAlreadyExists
          • org.omg.PortableServer.POAPackage.AdapterNonExistent
          • org.omg.PortableServer.POAPackage.InvalidPolicy
          • org.omg.PortableServer.POAPackage.NoServant
          • org.omg.PortableServer.POAPackage.ObjectAlreadyActive
          • org.omg.PortableServer.POAPackage.ObjectNotActive
          • org.omg.PortableServer.POAPackage.ServantAlreadyActive
          • org.omg.PortableServer.POAPackage.ServantNotActive
          • org.omg.PortableServer.POAPackage.WrongAdapter
          • org.omg.PortableServer.POAPackage.WrongPolicy
    • org.omg.PortableServer.POAPackage.WrongAdapterHelper
    • org.omg.PortableServer.POAPackage.WrongPolicyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer.POAPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer.POAPackage

  • Packages that use org.omg.PortableServer.POAPackage
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.
  • Classes in org.omg.PortableServer.POAPackage used by org.omg.PortableServer
    Class and Description
    AdapterAlreadyExists
    org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java .
    AdapterNonExistent
    org/omg/PortableServer/POAPackage/AdapterNonExistent.java .
    InvalidPolicy
    org/omg/PortableServer/POAPackage/InvalidPolicy.java .
    NoServant
    org/omg/PortableServer/POAPackage/NoServant.java .
    ObjectAlreadyActive
    org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java .
    ObjectNotActive
    org/omg/PortableServer/POAPackage/ObjectNotActive.java .
    ServantAlreadyActive
    org/omg/PortableServer/POAPackage/ServantAlreadyActive.java .
    ServantNotActive
    org/omg/PortableServer/POAPackage/ServantNotActive.java .
    WrongAdapter
    org/omg/PortableServer/POAPackage/WrongAdapter.java .
    WrongPolicy
    org/omg/PortableServer/POAPackage/WrongPolicy.java .
  • Classes in org.omg.PortableServer.POAPackage used by org.omg.PortableServer.POAPackage
    Class and Description
    AdapterAlreadyExists
    org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java .
    AdapterNonExistent
    org/omg/PortableServer/POAPackage/AdapterNonExistent.java .
    InvalidPolicy
    org/omg/PortableServer/POAPackage/InvalidPolicy.java .
    NoServant
    org/omg/PortableServer/POAPackage/NoServant.java .
    ObjectAlreadyActive
    org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java .
    ObjectNotActive
    org/omg/PortableServer/POAPackage/ObjectNotActive.java .
    ServantAlreadyActive
    org/omg/PortableServer/POAPackage/ServantAlreadyActive.java .
    ServantNotActive
    org/omg/PortableServer/POAPackage/ServantNotActive.java .
    WrongAdapter
    org/omg/PortableServer/POAPackage/WrongAdapter.java .
    WrongPolicy
    org/omg/PortableServer/POAPackage/WrongPolicy.java .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterAlreadyExists

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class AdapterAlreadyExists

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.AdapterAlreadyExists
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class AdapterAlreadyExists
extends UserException
    org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterAlreadyExists()
      AdapterAlreadyExists(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AdapterAlreadyExists

        public AdapterAlreadyExists()

      • AdapterAlreadyExists

        public AdapterAlreadyExists(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterAlreadyExistsHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class AdapterAlreadyExistsHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper

  • public abstract class AdapterAlreadyExistsHelper
extends Object
    org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterAlreadyExistsHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static AdapterAlreadyExists | extract(Any a)
      static String | id()
      static void | insert(Any a, AdapterAlreadyExists that)
      static AdapterAlreadyExists | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, AdapterAlreadyExists value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterAlreadyExistsHelper

        public AdapterAlreadyExistsHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          AdapterAlreadyExists that)

      • extract

        public static AdapterAlreadyExists extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static AdapterAlreadyExists read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         AdapterAlreadyExists value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterNonExistent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class AdapterNonExistent

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.AdapterNonExistent
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class AdapterNonExistent
extends UserException
    org/omg/PortableServer/POAPackage/AdapterNonExistent.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterNonExistent()
      AdapterNonExistent(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AdapterNonExistent

        public AdapterNonExistent()

      • AdapterNonExistent

        public AdapterNonExistent(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AdapterNonExistentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class AdapterNonExistentHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.AdapterNonExistentHelper

  • public abstract class AdapterNonExistentHelper
extends Object
    org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      AdapterNonExistentHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static AdapterNonExistent | extract(Any a)
      static String | id()
      static void | insert(Any a, AdapterNonExistent that)
      static AdapterNonExistent | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, AdapterNonExistent value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AdapterNonExistentHelper

        public AdapterNonExistentHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          AdapterNonExistent that)

      • extract

        public static AdapterNonExistent extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static AdapterNonExistent read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         AdapterNonExistent value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.AdapterAlreadyExists

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.AdapterAlreadyExists

  • Packages that use AdapterAlreadyExists
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of AdapterAlreadyExists in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw AdapterAlreadyExists
      Modifier and Type Method and Description
      POA POAOperations.create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.

    • Uses of AdapterAlreadyExists in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return AdapterAlreadyExists
      Modifier and Type | Method and Description
      static AdapterAlreadyExists | AdapterAlreadyExistsHelper.extract(Any a)
      static AdapterAlreadyExists | AdapterAlreadyExistsHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type AdapterAlreadyExists
      Modifier and Type | Method and Description
      static void | AdapterAlreadyExistsHelper.insert(Any a, AdapterAlreadyExists that)
      static void | AdapterAlreadyExistsHelper.write(OutputStream ostream, AdapterAlreadyExists value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper

No usage of org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.AdapterNonExistent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.AdapterNonExistent

  • Packages that use AdapterNonExistent
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of AdapterNonExistent in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw AdapterNonExistent
      Modifier and Type Method and Description
      POA POAOperations.find_POA(String adapter_name, boolean activate_it)
      If the target POA is the parent of a child POA with the specified name (relative to the target POA), that child POA is returned.

    • Uses of AdapterNonExistent in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return AdapterNonExistent
      Modifier and Type | Method and Description
      static AdapterNonExistent | AdapterNonExistentHelper.extract(Any a)
      static AdapterNonExistent | AdapterNonExistentHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type AdapterNonExistent
      Modifier and Type | Method and Description
      static void | AdapterNonExistentHelper.insert(Any a, AdapterNonExistent that)
      static void | AdapterNonExistentHelper.write(OutputStream ostream, AdapterNonExistent value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.AdapterNonExistentHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper

No usage of org.omg.PortableServer.POAPackage.AdapterNonExistentHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.InvalidPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.InvalidPolicy

  • Packages that use InvalidPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of InvalidPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw InvalidPolicy
      Modifier and Type Method and Description
      POA POAOperations.create_POA(String adapter_name, POAManager a_POAManager, Policy[] policies)
      This operation creates a new POA as a child of the target POA.

    • Uses of InvalidPolicy in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return InvalidPolicy
      Modifier and Type | Method and Description
      static InvalidPolicy | InvalidPolicyHelper.extract(Any a)
      static InvalidPolicy | InvalidPolicyHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type InvalidPolicy
      Modifier and Type | Method and Description
      static void | InvalidPolicyHelper.insert(Any a, InvalidPolicy that)
      static void | InvalidPolicyHelper.write(OutputStream ostream, InvalidPolicy value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.InvalidPolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.InvalidPolicyHelper

No usage of org.omg.PortableServer.POAPackage.InvalidPolicyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.NoServant

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.NoServant

  • Packages that use NoServant
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of NoServant in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw NoServant
      Modifier and Type Method and Description
      Servant POAOperations.get_servant()
      This operation returns the default servant associated with the POA.

    • Uses of NoServant in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return NoServant
      Modifier and Type | Method and Description
      static NoServant | NoServantHelper.extract(Any a)
      static NoServant | NoServantHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type NoServant
      Modifier and Type | Method and Description
      static void | NoServantHelper.insert(Any a, NoServant that)
      static void | NoServantHelper.write(OutputStream ostream, NoServant value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.NoServantHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.NoServantHelper

No usage of org.omg.PortableServer.POAPackage.NoServantHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ObjectAlreadyActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ObjectAlreadyActive

  • Packages that use ObjectAlreadyActive
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of ObjectAlreadyActive in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw ObjectAlreadyActive
      Modifier and Type Method and Description
      void POAOperations.activate_object_with_id(byte[] id, Servant p_servant)
      This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.

    • Uses of ObjectAlreadyActive in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return ObjectAlreadyActive
      Modifier and Type | Method and Description
      static ObjectAlreadyActive | ObjectAlreadyActiveHelper.extract(Any a)
      static ObjectAlreadyActive | ObjectAlreadyActiveHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type ObjectAlreadyActive
      Modifier and Type | Method and Description
      static void | ObjectAlreadyActiveHelper.insert(Any a, ObjectAlreadyActive that)
      static void | ObjectAlreadyActiveHelper.write(OutputStream ostream, ObjectAlreadyActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper

No usage of org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ObjectNotActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ObjectNotActive

  • Packages that use ObjectNotActive
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of ObjectNotActive in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw ObjectNotActive
      Modifier and Type Method and Description
      void POAOperations.deactivate_object(byte[] oid)
      This operation causes the ObjectId specified in the oid parameter to be deactivated.
      Object POAOperations.id_to_reference(byte[] oid)
      If an object with the specified Object Id value is currently active, a reference encapsulating the information used to activate the object is returned.
      Servant POAOperations.id_to_servant(byte[] oid)
      If the POA has the RETAIN policy and the specified ObjectId is in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      Servant POAOperations.reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.

    • Uses of ObjectNotActive in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return ObjectNotActive
      Modifier and Type | Method and Description
      static ObjectNotActive | ObjectNotActiveHelper.extract(Any a)
      static ObjectNotActive | ObjectNotActiveHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type ObjectNotActive
      Modifier and Type | Method and Description
      static void | ObjectNotActiveHelper.insert(Any a, ObjectNotActive that)
      static void | ObjectNotActiveHelper.write(OutputStream ostream, ObjectNotActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ObjectNotActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper

No usage of org.omg.PortableServer.POAPackage.ObjectNotActiveHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ServantAlreadyActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ServantAlreadyActive

  • Packages that use ServantAlreadyActive
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of ServantAlreadyActive in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw ServantAlreadyActive
      Modifier and Type Method and Description
      void POAOperations.activate_object_with_id(byte[] id, Servant p_servant)
      This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.
      byte[] POAOperations.activate_object(Servant p_servant)
      This operation generates an Object Id and enters the Object Id and the specified servant in the Active Object Map.

    • Uses of ServantAlreadyActive in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return ServantAlreadyActive
      Modifier and Type | Method and Description
      static ServantAlreadyActive | ServantAlreadyActiveHelper.extract(Any a)
      static ServantAlreadyActive | ServantAlreadyActiveHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type ServantAlreadyActive
      Modifier and Type | Method and Description
      static void | ServantAlreadyActiveHelper.insert(Any a, ServantAlreadyActive that)
      static void | ServantAlreadyActiveHelper.write(OutputStream ostream, ServantAlreadyActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper

No usage of org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ServantNotActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ServantNotActive

  • Packages that use ServantNotActive
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of ServantNotActive in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw ServantNotActive
      Modifier and Type Method and Description
      byte[] POAOperations.servant_to_id(Servant p_servant)
      This operation has four possible behaviors.
      Object POAOperations.servant_to_reference(Servant p_servant)
      This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA.

    • Uses of ServantNotActive in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return ServantNotActive
      Modifier and Type | Method and Description
      static ServantNotActive | ServantNotActiveHelper.extract(Any a)
      static ServantNotActive | ServantNotActiveHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type ServantNotActive
      Modifier and Type | Method and Description
      static void | ServantNotActiveHelper.insert(Any a, ServantNotActive that)
      static void | ServantNotActiveHelper.write(OutputStream ostream, ServantNotActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.ServantNotActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.ServantNotActiveHelper

No usage of org.omg.PortableServer.POAPackage.ServantNotActiveHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.WrongAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.WrongAdapter

  • Packages that use WrongAdapter
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of WrongAdapter in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw WrongAdapter
      Modifier and Type Method and Description
      byte[] POAOperations.reference_to_id(Object reference)
      This operation returns the Object Id value encapsulated by the specified reference.
      Servant POAOperations.reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.

    • Uses of WrongAdapter in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return WrongAdapter
      Modifier and Type | Method and Description
      static WrongAdapter | WrongAdapterHelper.extract(Any a)
      static WrongAdapter | WrongAdapterHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type WrongAdapter
      Modifier and Type | Method and Description
      static void | WrongAdapterHelper.insert(Any a, WrongAdapter that)
      static void | WrongAdapterHelper.write(OutputStream ostream, WrongAdapter value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.WrongAdapterHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.WrongAdapterHelper

No usage of org.omg.PortableServer.POAPackage.WrongAdapterHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.WrongPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.WrongPolicy

  • Packages that use WrongPolicy
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
    org.omg.PortableServer.POAPackage
    Allows programmers to construct object implementations that are portable between different ORB products.

    • Uses of WrongPolicy in org.omg.PortableServer

      Methods in org.omg.PortableServer that throw WrongPolicy
      Modifier and Type Method and Description
      void POAOperations.activate_object_with_id(byte[] id, Servant p_servant)
      This operation enters an association between the specified Object Id and the specified servant in the Active Object Map.
      byte[] POAOperations.activate_object(Servant p_servant)
      This operation generates an Object Id and enters the Object Id and the specified servant in the Active Object Map.
      Object POAOperations.create_reference(String intf)
      This operation creates an object reference that encapsulates a POA-generated Object Id value and the specified interface repository id.
      void POAOperations.deactivate_object(byte[] oid)
      This operation causes the ObjectId specified in the oid parameter to be deactivated.
      ServantManager POAOperations.get_servant_manager()
      If the ServantRetentionPolicy of the POA is RETAIN, then the ServantManager argument (imgr) shall support the ServantActivator interface.
      Servant POAOperations.get_servant()
      This operation returns the default servant associated with the POA.
      Object POAOperations.id_to_reference(byte[] oid)
      If an object with the specified Object Id value is currently active, a reference encapsulating the information used to activate the object is returned.
      Servant POAOperations.id_to_servant(byte[] oid)
      If the POA has the RETAIN policy and the specified ObjectId is in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      byte[] POAOperations.reference_to_id(Object reference)
      This operation returns the Object Id value encapsulated by the specified reference.
      Servant POAOperations.reference_to_servant(Object reference)
      If the POA has the RETAIN policy and the specified object is present in the Active Object Map, this operation returns the servant associated with that object in the Active Object Map.
      byte[] POAOperations.servant_to_id(Servant p_servant)
      This operation has four possible behaviors.
      Object POAOperations.servant_to_reference(Servant p_servant)
      This operation requires the RETAIN policy and either the UNIQUE_ID or IMPLICIT_ACTIVATION policies if invoked outside the context of an operation dispatched by this POA.
      void POAOperations.set_servant_manager(ServantManager imgr)
      This operation sets the default servant manager associated with the POA.
      void POAOperations.set_servant(Servant p_servant)
      This operation registers the specified servant with the POA as the default servant.

    • Uses of WrongPolicy in org.omg.PortableServer.POAPackage

      Methods in org.omg.PortableServer.POAPackage that return WrongPolicy
      Modifier and Type | Method and Description
      static WrongPolicy | WrongPolicyHelper.extract(Any a)
      static WrongPolicy | WrongPolicyHelper.read(InputStream istream)
      Methods in org.omg.PortableServer.POAPackage with parameters of type WrongPolicy
      Modifier and Type | Method and Description
      static void | WrongPolicyHelper.insert(Any a, WrongPolicy that)
      static void | WrongPolicyHelper.write(OutputStream ostream, WrongPolicy value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.POAPackage.WrongPolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.POAPackage.WrongPolicyHelper

No usage of org.omg.PortableServer.POAPackage.WrongPolicyHelper
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class InvalidPolicy

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.InvalidPolicy
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class InvalidPolicy
extends UserException
    org/omg/PortableServer/POAPackage/InvalidPolicy.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short | index

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidPolicy()
      InvalidPolicy(short _index)
      InvalidPolicy(String $reason, short _index)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • index

        public short index

    • Constructor Detail

      • InvalidPolicy

        public InvalidPolicy()

      • InvalidPolicy

        public InvalidPolicy(short _index)

      • InvalidPolicy

        public InvalidPolicy(String $reason,
                     short _index)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidPolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class InvalidPolicyHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.InvalidPolicyHelper

  • public abstract class InvalidPolicyHelper
extends Object
    org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidPolicyHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static InvalidPolicy | extract(Any a)
      static String | id()
      static void | insert(Any a, InvalidPolicy that)
      static InvalidPolicy | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, InvalidPolicy value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InvalidPolicyHelper

        public InvalidPolicyHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          InvalidPolicy that)

      • extract

        public static InvalidPolicy extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static InvalidPolicy read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         InvalidPolicy value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NoServant

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class NoServant

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.NoServant
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class NoServant
extends UserException
    org/omg/PortableServer/POAPackage/NoServant.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NoServant()
      NoServant(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NoServant

        public NoServant()

      • NoServant

        public NoServant(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NoServantHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class NoServantHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.NoServantHelper

  • public abstract class NoServantHelper
extends Object
    org/omg/PortableServer/POAPackage/NoServantHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      NoServantHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static NoServant | extract(Any a)
      static String | id()
      static void | insert(Any a, NoServant that)
      static NoServant | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, NoServant value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NoServantHelper

        public NoServantHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          NoServant that)

      • extract

        public static NoServant extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static NoServant read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         NoServant value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectAlreadyActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ObjectAlreadyActive

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.ObjectAlreadyActive
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ObjectAlreadyActive
extends UserException
    org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectAlreadyActive()
      ObjectAlreadyActive(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ObjectAlreadyActive

        public ObjectAlreadyActive()

      • ObjectAlreadyActive

        public ObjectAlreadyActive(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectAlreadyActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ObjectAlreadyActiveHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper

  • public abstract class ObjectAlreadyActiveHelper
extends Object
    org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectAlreadyActiveHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ObjectAlreadyActive | extract(Any a)
      static String | id()
      static void | insert(Any a, ObjectAlreadyActive that)
      static ObjectAlreadyActive | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ObjectAlreadyActive value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectAlreadyActiveHelper

        public ObjectAlreadyActiveHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ObjectAlreadyActive that)

      • extract

        public static ObjectAlreadyActive extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ObjectAlreadyActive read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ObjectAlreadyActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectNotActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ObjectNotActive

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.ObjectNotActive
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ObjectNotActive
extends UserException
    org/omg/PortableServer/POAPackage/ObjectNotActive.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectNotActive()
      ObjectNotActive(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ObjectNotActive

        public ObjectNotActive()

      • ObjectNotActive

        public ObjectNotActive(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectNotActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ObjectNotActiveHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.ObjectNotActiveHelper

  • public abstract class ObjectNotActiveHelper
extends Object
    org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectNotActiveHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ObjectNotActive | extract(Any a)
      static String | id()
      static void | insert(Any a, ObjectNotActive that)
      static ObjectNotActive | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ObjectNotActive value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ObjectNotActiveHelper

        public ObjectNotActiveHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ObjectNotActive that)

      • extract

        public static ObjectNotActive extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ObjectNotActive read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ObjectNotActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantAlreadyActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ServantAlreadyActive

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.ServantAlreadyActive
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ServantAlreadyActive
extends UserException
    org/omg/PortableServer/POAPackage/ServantAlreadyActive.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantAlreadyActive()
      ServantAlreadyActive(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ServantAlreadyActive

        public ServantAlreadyActive()

      • ServantAlreadyActive

        public ServantAlreadyActive(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantAlreadyActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ServantAlreadyActiveHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper

  • public abstract class ServantAlreadyActiveHelper
extends Object
    org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantAlreadyActiveHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServantAlreadyActive | extract(Any a)
      static String | id()
      static void | insert(Any a, ServantAlreadyActive that)
      static ServantAlreadyActive | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ServantAlreadyActive value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServantAlreadyActiveHelper

        public ServantAlreadyActiveHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServantAlreadyActive that)

      • extract

        public static ServantAlreadyActive extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServantAlreadyActive read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServantAlreadyActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantNotActive

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ServantNotActive

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.ServantNotActive
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class ServantNotActive
extends UserException
    org/omg/PortableServer/POAPackage/ServantNotActive.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantNotActive()
      ServantNotActive(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ServantNotActive

        public ServantNotActive()

      • ServantNotActive

        public ServantNotActive(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantNotActiveHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class ServantNotActiveHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.ServantNotActiveHelper

  • public abstract class ServantNotActiveHelper
extends Object
    org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantNotActiveHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServantNotActive | extract(Any a)
      static String | id()
      static void | insert(Any a, ServantNotActive that)
      static ServantNotActive | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, ServantNotActive value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServantNotActiveHelper

        public ServantNotActiveHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServantNotActive that)

      • extract

        public static ServantNotActive extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServantNotActive read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServantNotActive value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class WrongAdapter

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.WrongAdapter
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class WrongAdapter
extends UserException
    org/omg/PortableServer/POAPackage/WrongAdapter.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongAdapter()
      WrongAdapter(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • WrongAdapter

        public WrongAdapter()

      • WrongAdapter

        public WrongAdapter(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongAdapterHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class WrongAdapterHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.WrongAdapterHelper

  • public abstract class WrongAdapterHelper
extends Object
    org/omg/PortableServer/POAPackage/WrongAdapterHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongAdapterHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static WrongAdapter | extract(Any a)
      static String | id()
      static void | insert(Any a, WrongAdapter that)
      static WrongAdapter | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, WrongAdapter value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WrongAdapterHelper

        public WrongAdapterHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          WrongAdapter that)

      • extract

        public static WrongAdapter extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static WrongAdapter read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         WrongAdapter value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongPolicy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class WrongPolicy

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.omg.CORBA.UserException
          • org.omg.PortableServer.POAPackage.WrongPolicy
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public final class WrongPolicy
extends UserException
    org/omg/PortableServer/POAPackage/WrongPolicy.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongPolicy()
      WrongPolicy(String $reason)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • WrongPolicy

        public WrongPolicy()

      • WrongPolicy

        public WrongPolicy(String $reason)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


WrongPolicyHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.POAPackage

Class WrongPolicyHelper

  • java.lang.Object
    • org.omg.PortableServer.POAPackage.WrongPolicyHelper

  • public abstract class WrongPolicyHelper
extends Object
    org/omg/PortableServer/POAPackage/WrongPolicyHelper.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Constructor Summary

      Constructors
      Constructor and Description
      WrongPolicyHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static WrongPolicy | extract(Any a)
      static String | id()
      static void | insert(Any a, WrongPolicy that)
      static WrongPolicy | read(InputStream istream)
      static TypeCode | type()
      static void | write(OutputStream ostream, WrongPolicy value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • WrongPolicyHelper

        public WrongPolicyHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          WrongPolicy that)

      • extract

        public static WrongPolicy extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static WrongPolicy read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         WrongPolicy value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer.portable

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

See: Description

  • Interface Summary
    Interface Description
    Delegate
    The portability package contains interfaces and classes that are designed for and intended to be used by ORB implementor.

Package org.omg.PortableServer.portable Description

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

The portable package contains interfaces and classes that are designed for and intended to be used by an ORB implementor. It exposes the publicly defined APIs that are used to connect stubs and skeletons to the ORB. The Delegate interface provides the ORB-vendor-specific implementation of PortableServer::Servant. This package conforms CORBA Specification V2.3.1, ptc/00-01-08.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer.portable Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer.portable

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • org.omg.PortableServer.portable.Delegate
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer.portable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer.portable

  • Packages that use org.omg.PortableServer.portable
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
  • Classes in org.omg.PortableServer.portable used by org.omg.PortableServer
    Class and Description
    Delegate
    The portability package contains interfaces and classes that are designed for and intended to be used by ORB implementor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.PortableServer.portable.Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.PortableServer.portable.Delegate

  • Packages that use Delegate
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of Delegate in org.omg.PortableServer

      Methods in org.omg.PortableServer that return Delegate
      Modifier and Type Method and Description
      Delegate Servant._get_delegate()
      Gets the ORB vendor-specific implementation of PortableServer::Servant.
      Methods in org.omg.PortableServer with parameters of type Delegate
      Modifier and Type Method and Description
      void Servant._set_delegate(Delegate delegate)
      Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Delegate

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.portable

Interface Delegate

  • public interface Delegate
    The portability package contains interfaces and classes that are designed for and intended to be used by ORB implementor. It exposes the publicly defined APIs that are used to connect stubs and skeletons to the ORB. The Delegate interface provides the ORB vendor specific implementation of PortableServer::Servant. Conformant to spec CORBA V2.3.1, ptc/00-01-08.pdf

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      POA default_POA(Servant Self)
      The default behavior of this function is to return the root POA from the ORB instance associated with the servant.
      Object get_interface_def(Servant self)
      This operation returns an object in the Interface Repository which provides type information that may be useful to a program.
      boolean is_a(Servant Self, String Repository_Id)
      This method checks to see if the specified repid is present on the list returned by _all_interfaces() or is the repository id for the generic CORBA Object.
      boolean non_existent(Servant Self)
      This operation is used to check for the existence of the Object.
      byte[] object_id(Servant Self)
      The method _object_id() is equivalent to calling PortableServer::Current::get_object_id.
      ORB orb(Servant Self)
      Convenience method that returns the instance of the ORB currently associated with the Servant.
      POA poa(Servant Self)
      The method _poa() is equivalent to calling PortableServer::Current:get_POA.
      Object this_object(Servant Self)
      This allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.

    • Method Detail

      • orb

        ORB orb(Servant Self)
        Convenience method that returns the instance of the ORB currently associated with the Servant.
        Parameters:
        Self - the servant.
        Returns:
        ORB associated with the Servant.

      • this_object

        Object this_object(Servant Self)
        This allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
        Parameters:
        Self - the servant.
        Returns:
        Object reference associated with the request.

      • poa

        POA poa(Servant Self)
        The method _poa() is equivalent to calling PortableServer::Current:get_POA.
        Parameters:
        Self - the servant.
        Returns:
        POA associated with the servant.

      • object_id

        byte[] object_id(Servant Self)
        The method _object_id() is equivalent to calling PortableServer::Current::get_object_id.
        Parameters:
        Self - the servant.
        Returns:
        ObjectId associated with this servant.

      • default_POA

        POA default_POA(Servant Self)
        The default behavior of this function is to return the root POA from the ORB instance associated with the servant.
        Parameters:
        Self - the servant.
        Returns:
        POA associated with the servant class.

      • is_a

        boolean is_a(Servant Self,
             String Repository_Id)
        This method checks to see if the specified repid is present on the list returned by _all_interfaces() or is the repository id for the generic CORBA Object.
        Parameters:
        Self - the servant.
        Repository_Id - the repository_id to be checked in the repository list or against the id of generic CORBA object.
        Returns:
        boolean indicating whether the specified repid is in the list or is same as that got generic CORBA object.

      • non_existent

        boolean non_existent(Servant Self)
        This operation is used to check for the existence of the Object.
        Parameters:
        Self - the servant.
        Returns:
        boolean true to indicate that object does not exist, and false otherwise.

      • get_interface_def

        Object get_interface_def(Servant self)
        This operation returns an object in the Interface Repository which provides type information that may be useful to a program.
        Parameters:
        self - the servant.
        Returns:
        type information corresponding to the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestProcessingPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface RequestProcessingPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    RequestProcessingPolicy

    public interface RequestProcessingPolicyOperations
extends PolicyOperations
    This policy specifies how requests are processed by the created POA. The default is USE_ACTIVE_OBJECT_MAP_ONLY.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      RequestProcessingPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        RequestProcessingPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RequestProcessingPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class RequestProcessingPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.RequestProcessingPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class RequestProcessingPolicyValue
extends Object
implements IDLEntity
    The RequestProcessingPolicyValue can have the following values. USE_ACTIVE_OBJECT_MAP_ONLY - If the Object Id is not found in the Active Object Map, an OBJECT_NOT_EXIST exception is returned to the client. The RETAIN policy is also required. USE_DEFAULT_SERVANT - If the Object Id is not found in the Active Object Map or the NON_RETAIN policy is present, and a default servant has been registered with the POA using the set_servant operation, the request is dispatched to the default servant. USE_SERVANT_MANAGER - If the Object Id is not found in the Active Object Map or the NON_RETAIN policy is present, and a servant manager has been registered with the POA using the set_servant_manager operation, the servant manager is given the opportunity to locate a servant or raise an exception.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _USE_ACTIVE_OBJECT_MAP_ONLY
      static int | _USE_DEFAULT_SERVANT
      static int | _USE_SERVANT_MANAGER
      static RequestProcessingPolicyValue | USE_ACTIVE_OBJECT_MAP_ONLY
      static RequestProcessingPolicyValue | USE_DEFAULT_SERVANT
      static RequestProcessingPolicyValue | USE_SERVANT_MANAGER

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | RequestProcessingPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static RequestProcessingPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _USE_ACTIVE_OBJECT_MAP_ONLY

        public static final int _USE_ACTIVE_OBJECT_MAP_ONLY
        See Also:
        Constant Field Values

      • USE_ACTIVE_OBJECT_MAP_ONLY

        public static final RequestProcessingPolicyValue USE_ACTIVE_OBJECT_MAP_ONLY

      • _USE_DEFAULT_SERVANT

        public static final int _USE_DEFAULT_SERVANT
        See Also:
        Constant Field Values

      • USE_DEFAULT_SERVANT

        public static final RequestProcessingPolicyValue USE_DEFAULT_SERVANT

      • _USE_SERVANT_MANAGER

        public static final int _USE_SERVANT_MANAGER
        See Also:
        Constant Field Values

      • USE_SERVANT_MANAGER

        public static final RequestProcessingPolicyValue USE_SERVANT_MANAGER

    • Constructor Detail

      • RequestProcessingPolicyValue

        protected RequestProcessingPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static RequestProcessingPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


REQUEST_PROCESSING_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface REQUEST_PROCESSING_POLICY_ID

  • public interface REQUEST_PROCESSING_POLICY_ID
    org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing REQUEST_PROCESSING_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing REQUEST_PROCESSING_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Servant

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class Servant

  • java.lang.Object
    • org.omg.PortableServer.Servant
  • Direct Known Subclasses:
    BindingIteratorPOA, DynamicImplementation, NamingContextExtPOA, NamingContextPOA, ServantActivatorPOA, ServantLocatorPOA

    public abstract class Servant
extends Object
    Defines the native Servant type. In Java, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on IDL to Java spec. (CORBA V2.3.1) ptc/00-01-08.pdf.

    • Constructor Summary

      Constructors
      Constructor and Description
      Servant()

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      POA _default_POA()
      Returns the root POA from the ORB instance associated with the servant.
      Delegate _get_delegate()
      Gets the ORB vendor-specific implementation of PortableServer::Servant.
      Object _get_interface_def()
      Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.
      boolean _is_a(String repository_id)
      Checks to see if the specified repository_id is present on the list returned by _all_interfaces() or is the repository_id for the generic CORBA Object.
      boolean _non_existent()
      Checks for the existence of an Object.
      byte[] _object_id()
      Allows easy execution of common methods, equivalent to calling PortableServer::Current::get_object_id.
      ORB _orb()
      Returns the instance of the ORB currently associated with the Servant (convenience method).
      POA _poa()
      Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.
      void _set_delegate(Delegate delegate)
      Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.
      Object _this_object()
      Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.
      Object _this_object(ORB orb)
      Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Servant

        public Servant()

    • Method Detail

      • _get_delegate

        public final Delegate _get_delegate()
        Gets the ORB vendor-specific implementation of PortableServer::Servant.
        Returns:
        _delegate the ORB vendor-specific implementation of PortableServer::Servant.

      • _set_delegate

        public final void _set_delegate(Delegate delegate)
        Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.
        Parameters:
        delegate - ORB vendor-specific implementation of the PortableServer::Servant.

      • _this_object

        public final Object _this_object()
        Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.
        Returns:
        this_object Object reference associated with the request.

      • _this_object

        public final Object _this_object(ORB orb)
        Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
        Parameters:
        orb - ORB with which the servant is associated.
        Returns:
        _this_object reference associated with the request.

      • _orb

        public final ORB _orb()
        Returns the instance of the ORB currently associated with the Servant (convenience method).
        Returns:
        orb the instance of the ORB currently associated with the Servant.

      • _poa

        public final POA _poa()
        Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.
        Returns:
        poa POA associated with the servant.

      • _object_id

        public final byte[] _object_id()
        Allows easy execution of common methods, equivalent to calling PortableServer::Current::get_object_id.
        Returns:
        object_id the Object ID associated with this servant.

      • _default_POA

        public POA _default_POA()
        Returns the root POA from the ORB instance associated with the servant. Subclasses may override this method to return a different POA.
        Returns:
        default_POA the POA associated with the Servant.

      • _is_a

        public boolean _is_a(String repository_id)
        Checks to see if the specified repository_id is present on the list returned by _all_interfaces() or is the repository_id for the generic CORBA Object.
        Parameters:
        repository_id - the repository_id to be checked in the repository list or against the id of generic CORBA objects.
        Returns:
        is_a boolean indicating whether the specified repository_id is in the repository list or is same as a generic CORBA object.

      • _non_existent

        public boolean _non_existent()
        Checks for the existence of an Object. The Servant provides a default implementation of _non_existent() that can be overridden by derived servants.
        Returns:
        non_existent true if that object does not exist, false otherwise.

      • _get_interface_def

        public Object _get_interface_def()
        Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant. The invoker of _get_interface_def must narrow the result to an InterfaceDef in order to use it.

        This default implementation of _get_interface_def() can be overridden by derived servants if the default behavior is not adequate. As defined in the CORBA 2.3.1 specification, section 11.3.1, the default behavior of _get_interface_def() is to use the most derived interface of a static servant or the most derived interface retrieved from a dynamic servant to obtain the InterfaceDef. This behavior must be supported by the Delegate that implements the Servant.

        Returns:
        get_interface_def an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.

      • _all_interfaces

        public abstract String[] _all_interfaces(POA poa,
                                         byte[] objectId)
        Used by the ORB to obtain complete type information from the servant.
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantActivatorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ServantActivatorHelper

  • java.lang.Object
    • org.omg.PortableServer.ServantActivatorHelper

  • public abstract class ServantActivatorHelper
extends Object
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantActivatorHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServantActivator | extract(Any a)
      static String | id()
      static void | insert(Any a, ServantActivator that)
      static ServantActivator | narrow(Object obj)
      static ServantActivator | read(InputStream istream)
      static TypeCode | type()
      static ServantActivator | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, ServantActivator value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServantActivatorHelper

        public ServantActivatorHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServantActivator that)

      • extract

        public static ServantActivator extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServantActivator read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServantActivator value)

      • narrow

        public static ServantActivator narrow(Object obj)

      • unchecked_narrow

        public static ServantActivator unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantActivatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantActivatorOperations

  • All Superinterfaces:
    ServantManagerOperations
    All Known Subinterfaces:
    ServantActivator
    All Known Implementing Classes:
    _ServantActivatorStub, ServantActivatorPOA

    public interface ServantActivatorOperations
extends ServantManagerOperations
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
      This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
      Servant incarnate(byte[] oid, POA adapter)
      This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.

    • Method Detail

      • incarnate

        Servant incarnate(byte[] oid,
                  POA adapter)
           throws ForwardRequest
        This operation is invoked by the POA whenever the POA receives a request for an object that is not currently active, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
        Parameters:
        oid - object Id associated with the object on the request was made.
        adapter - object reference for the POA in which the object is being activated.
        Returns:
        Servant corresponding to oid is created or located by the user supplied servant manager.
        Throws:
        ForwardRequest - to indicate to the ORB that it is responsible for delivering the current request and subsequent requests to the object denoted in the forward_reference member of the exception.

      • etherealize

        void etherealize(byte[] oid,
                 POA adapter,
                 Servant serv,
                 boolean cleanup_in_progress,
                 boolean remaining_activations)
        This operation is invoked whenever a servant for an object is deactivated, assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
        Parameters:
        oid - object Id associated with the object being deactivated.
        adapter - object reference for the POA in which the object was active.
        serv - contains reference to the servant associated with the object being deactivated.
        cleanup_in_progress - if TRUE indicates that destroy or deactivate is called with etherealize_objects param of TRUE. FALSE indicates that etherealize was called due to other reasons.
        remaining_activations - indicates whether the Servant Manager can destroy a servant. If set to TRUE, the Servant Manager should wait until all invocations in progress have completed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantActivatorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ServantActivatorPOA

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.PortableServer.ServantActivatorPOA
  • All Implemented Interfaces:
    InvokeHandler, ServantActivatorOperations, ServantManagerOperations

    public abstract class ServantActivatorPOA
extends Servant
implements ServantActivatorOperations, InvokeHandler
    When the POA has the RETAIN policy it uses servant managers that are ServantActivators.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantActivatorPOA()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      OutputStream _invoke(String $method, InputStream in, ResponseHandler $rh)
      Invoked by the ORB to dispatch a request to the servant.
      ServantActivator _this()
      ServantActivator | _this(ORB orb)

      • Methods inherited from class org.omg.PortableServer.Servant

        _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.omg.PortableServer.ServantActivatorOperations

        etherealize, incarnate

    • Constructor Detail

      • ServantActivatorPOA

        public ServantActivatorPOA()

    • Method Detail

      • _invoke

        public OutputStream _invoke(String $method,
                            InputStream in,
                            ResponseHandler $rh)
        Description copied from interface: InvokeHandler
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Specified by:
        _invoke in interface InvokeHandler
        Parameters:
        $method - The method name.
        in - The InputStream containing the marshalled arguments.
        $rh - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply

      • _all_interfaces

        public String[] _all_interfaces(POA poa,
                                byte[] objectId)
        Description copied from class: Servant
        Used by the ORB to obtain complete type information from the servant.
        Specified by:
        _all_interfaces in class Servant
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.

      • _this

        public ServantActivator _this()

      • _this

        public ServantActivator _this(ORB orb)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantLocatorHelper

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ServantLocatorHelper

  • java.lang.Object
    • org.omg.PortableServer.ServantLocatorHelper

  • public abstract class ServantLocatorHelper
extends Object
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantLocatorHelper()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServantLocator | extract(Any a)
      static String | id()
      static void | insert(Any a, ServantLocator that)
      static ServantLocator | narrow(Object obj)
      static ServantLocator | read(InputStream istream)
      static TypeCode | type()
      static ServantLocator | unchecked_narrow(Object obj)
      static void | write(OutputStream ostream, ServantLocator value)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ServantLocatorHelper

        public ServantLocatorHelper()

    • Method Detail

      • insert

        public static void insert(Any a,
                          ServantLocator that)

      • extract

        public static ServantLocator extract(Any a)

      • type

        public static TypeCode type()

      • id

        public static String id()

      • read

        public static ServantLocator read(InputStream istream)

      • write

        public static void write(OutputStream ostream,
                         ServantLocator value)

      • narrow

        public static ServantLocator narrow(Object obj)

      • unchecked_narrow

        public static ServantLocator unchecked_narrow(Object obj)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantLocatorOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantLocatorOperations

  • All Superinterfaces:
    ServantManagerOperations
    All Known Subinterfaces:
    ServantLocator
    All Known Implementing Classes:
    _ServantLocatorStub, ServantLocatorPOA

    public interface ServantLocatorOperations
extends ServantManagerOperations
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
      This operation is invoked whenener a servant completes a request.
      Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.

    • Method Detail

      • preinvoke

        Servant preinvoke(byte[] oid,
                  POA adapter,
                  String operation,
                  CookieHolder the_cookie)
           throws ForwardRequest
        This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
        Parameters:
        oid - the object id associated with object on which the request was made.
        adapter - the reference for POA in which the object is being activated.
        operation - the operation name.
        the_cookie - an opaque value that can be set by the servant manager to be used during postinvoke.
        Returns:
        Servant used to process incoming request.
        Throws:
        ForwardRequest - to indicate to the ORB that it is responsible for delivering the current request and subsequent requests to the object denoted in the forward_reference member of the exception.

      • postinvoke

        void postinvoke(byte[] oid,
                POA adapter,
                String operation,
                Object the_cookie,
                Servant the_servant)
        This operation is invoked whenener a servant completes a request.
        Parameters:
        oid - the object id ssociated with object on which the request was made.
        adapter - the reference for POA in which the object was active.
        the_cookie - an opaque value that contains the data set by preinvoke.
        the_servant - reference to the servant that is associated with the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantLocatorPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.PortableServer.ServantLocatorPackage

Provides classes and interfaces for locating the servant.

See: Description

  • Class Summary
    Class Description
    CookieHolder
    The native type PortableServer::ServantLocator::Cookie is mapped to java.lang.Object.

Package org.omg.PortableServer.ServantLocatorPackage Description

Provides classes and interfaces for locating the servant.

This package supplies a CookieHolder class for passing the Cookie type as an out parameter. The CookieHolder class follows exactly the same pattern as the other holder classes for basic types.

Package Specification

For a precise list of supported sections of official OMG specifications with which the Java[tm] Platform, Standard Edition 6 complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.PortableServer.ServantLocatorPackage Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.PortableServer.ServantLocatorPackage

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.PortableServer.ServantLocatorPackage.CookieHolder (implements org.omg.CORBA.portable.Streamable)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.PortableServer.ServantLocatorPackage

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.PortableServer.ServantLocatorPackage

  • Packages that use org.omg.PortableServer.ServantLocatorPackage
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.
  • Classes in org.omg.PortableServer.ServantLocatorPackage used by org.omg.PortableServer
    Class and Description
    CookieHolder
    The native type PortableServer::ServantLocator::Cookie is mapped to java.lang.Object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.PortableServer.ServantLocatorPackage.CookieHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.PortableServer.ServantLocatorPackage.CookieHolder

  • Packages that use CookieHolder
    Package Description
    org.omg.PortableServer
    Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

    • Uses of CookieHolder in org.omg.PortableServer

      Methods in org.omg.PortableServer with parameters of type CookieHolder
      Modifier and Type Method and Description
      Servant ServantLocatorOperations.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
      Servant _ServantLocatorStub.preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
      This operations is used to get a servant that will be used to process the request that caused preinvoke to be called.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CookieHolder

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer.ServantLocatorPackage

Class CookieHolder

  • java.lang.Object
    • org.omg.PortableServer.ServantLocatorPackage.CookieHolder
  • All Implemented Interfaces:
    Streamable

    public final class CookieHolder
extends Object
implements Streamable
    The native type PortableServer::ServantLocator::Cookie is mapped to java.lang.Object. A CookieHolder class is provided for passing the Cookie type as an out parameter. The CookieHolder class follows exactly the same pattern as the other holder classes for basic types.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      Object value

    • Constructor Summary

      Constructors
      Constructor and Description
      CookieHolder()
      CookieHolder(Object initial)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void _read(InputStream is)
      Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
      TypeCode _type()
      Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
      void _write(OutputStream os)
      Marshals to ostream the value in the value field of the Holder.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • value

        public Object value

    • Constructor Detail

      • CookieHolder

        public CookieHolder()

      • CookieHolder

        public CookieHolder(Object initial)

    • Method Detail

      • _read

        public void _read(InputStream is)
        Description copied from interface: Streamable
        Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
        Specified by:
        _read in interface Streamable
        Parameters:
        is - the InputStream that represents the CDR data from the wire.

      • _write

        public void _write(OutputStream os)
        Description copied from interface: Streamable
        Marshals to ostream the value in the value field of the Holder.
        Specified by:
        _write in interface Streamable
        Parameters:
        os - the CDR OutputStream

      • _type

        public TypeCode _type()
        Description copied from interface: Streamable
        Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
        Specified by:
        _type in interface Streamable
        Returns:
        the TypeCode object for the value held in the holder
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantLocatorPOA

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ServantLocatorPOA

  • java.lang.Object
    • org.omg.PortableServer.Servant
      • org.omg.PortableServer.ServantLocatorPOA
  • All Implemented Interfaces:
    InvokeHandler, ServantLocatorOperations, ServantManagerOperations

    public abstract class ServantLocatorPOA
extends Servant
implements ServantLocatorOperations, InvokeHandler
    When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • Constructor Summary

      Constructors
      Constructor and Description
      ServantLocatorPOA()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      String[] _all_interfaces(POA poa, byte[] objectId)
      Used by the ORB to obtain complete type information from the servant.
      OutputStream _invoke(String $method, InputStream in, ResponseHandler $rh)
      Invoked by the ORB to dispatch a request to the servant.
      ServantLocator _this()
      ServantLocator | _this(ORB orb)

      • Methods inherited from class org.omg.PortableServer.Servant

        _default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.omg.PortableServer.ServantLocatorOperations

        postinvoke, preinvoke

    • Constructor Detail

      • ServantLocatorPOA

        public ServantLocatorPOA()

    • Method Detail

      • _invoke

        public OutputStream _invoke(String $method,
                            InputStream in,
                            ResponseHandler $rh)
        Description copied from interface: InvokeHandler
        Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

        1. Determine correct method, and unmarshal parameters from InputStream.

        2. Invoke method implementation.

        3. If no user exception, create a normal reply using ResponseHandler.

        4. If user exception occurred, create exception reply using ResponseHandler.

        5. Marshal reply into OutputStream returned by ResponseHandler.

        6. Return OutputStream to ORB.

        Specified by:
        _invoke in interface InvokeHandler
        Parameters:
        $method - The method name.
        in - The InputStream containing the marshalled arguments.
        $rh - The ResponseHandler which the servant uses to construct a proper reply
        Returns:
        The OutputStream created by the ResponseHandler which contains the marshalled reply

      • _all_interfaces

        public String[] _all_interfaces(POA poa,
                                byte[] objectId)
        Description copied from class: Servant
        Used by the ORB to obtain complete type information from the servant.
        Specified by:
        _all_interfaces in class Servant
        Parameters:
        poa - POA with which the servant is associated.
        objectId - is the id corresponding to the object associated with this servant.
        Returns:
        list of type information for the object.

      • _this

        public ServantLocator _this()

      • _this

        public ServantLocator _this(ORB orb)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantRetentionPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ServantRetentionPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    ServantRetentionPolicy

    public interface ServantRetentionPolicyOperations
extends PolicyOperations
    This policy specifies whether the created POA retains active servants in an Active Object Map.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ServantRetentionPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        ServantRetentionPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ServantRetentionPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ServantRetentionPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.ServantRetentionPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class ServantRetentionPolicyValue
extends Object
implements IDLEntity
    ServantRetentionPolicyValue can have the following values. RETAIN - to indicate that the POA will retain active servants in its Active Object Map. NON_RETAIN - to indicate Servants are not retained by the POA. If no ServantRetentionPolicy is specified at POA creation, the default is RETAIN.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _NON_RETAIN
      static int | _RETAIN
      static ServantRetentionPolicyValue | NON_RETAIN
      static ServantRetentionPolicyValue | RETAIN

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | ServantRetentionPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static ServantRetentionPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _RETAIN

        public static final int _RETAIN
        See Also:
        Constant Field Values

      • RETAIN

        public static final ServantRetentionPolicyValue RETAIN

      • _NON_RETAIN

        public static final int _NON_RETAIN
        See Also:
        Constant Field Values

      • NON_RETAIN

        public static final ServantRetentionPolicyValue NON_RETAIN

    • Constructor Detail

      • ServantRetentionPolicyValue

        protected ServantRetentionPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static ServantRetentionPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SERVANT_RETENTION_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface SERVANT_RETENTION_POLICY_ID

  • public interface SERVANT_RETENTION_POLICY_ID
    org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing SERVANT_RETENTION_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing SERVANT_RETENTION_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadPolicyOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface ThreadPolicyOperations

  • All Superinterfaces:
    PolicyOperations
    All Known Subinterfaces:
    ThreadPolicy

    public interface ThreadPolicyOperations
extends PolicyOperations
    The ThreadPolicy specifies the threading model used with the created POA. The default is ORB_CTRL_MODEL.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ThreadPolicyValue value()
      specifies the policy value

      • Methods inherited from interface org.omg.CORBA.PolicyOperations

        copy, destroy, policy_type

    • Method Detail

      • value

        ThreadPolicyValue value()
        specifies the policy value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadPolicyValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Class ThreadPolicyValue

  • java.lang.Object
    • org.omg.PortableServer.ThreadPolicyValue
  • All Implemented Interfaces:
    Serializable, IDLEntity

    public class ThreadPolicyValue
extends Object
implements IDLEntity
    The ThreadPolicyValue can have the following values. ORB_CTRL_MODEL - The ORB is responsible for assigning requests for an ORB- controlled POA to threads. SINGLE_THREAD_MODEL - Requests for a single-threaded POA are processed sequentially.

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      static int | _ORB_CTRL_MODEL
      static int | _SINGLE_THREAD_MODEL
      static ThreadPolicyValue | ORB_CTRL_MODEL
      static ThreadPolicyValue | SINGLE_THREAD_MODEL

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | ThreadPolicyValue(int value)

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      static ThreadPolicyValue | from_int(int value)
      int | value()

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • _ORB_CTRL_MODEL

        public static final int _ORB_CTRL_MODEL
        See Also:
        Constant Field Values

      • ORB_CTRL_MODEL

        public static final ThreadPolicyValue ORB_CTRL_MODEL

      • _SINGLE_THREAD_MODEL

        public static final int _SINGLE_THREAD_MODEL
        See Also:
        Constant Field Values

      • SINGLE_THREAD_MODEL

        public static final ThreadPolicyValue SINGLE_THREAD_MODEL

    • Constructor Detail

      • ThreadPolicyValue

        protected ThreadPolicyValue(int value)

    • Method Detail

      • value

        public int value()

      • from_int

        public static ThreadPolicyValue from_int(int value)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


THREAD_POLICY_ID

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.PortableServer

Interface THREAD_POLICY_ID

  • public interface THREAD_POLICY_ID
    org/omg/PortableServer/THREAD_POLICY_ID.java . Generated by the IDL-to-Java compiler (portable), version "3.2" from /HUDSON/workspace/8-2-build-linux-amd64/jdk8/2238/corba/src/share/classes/org/omg/PortableServer/poa.idl Tuesday, March 4, 2014 3:07:56 AM PST

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int value
      The value representing THREAD_POLICY_ID.

    • Field Detail

      • value

        static final int value
        The value representing THREAD_POLICY_ID.
        See Also:
        Constant Field Values
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SendingContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.SendingContext

Provides support for the marshalling of value types.

See: Description

  • Interface Summary
    Interface Description
    RunTime
    Defines the base class that represents the Sending Context of a request.
    RunTimeOperations
    Defines operations on the base class that represents the Sending Context of a request.

Package org.omg.SendingContext Description

Provides support for the marshalling of value types. Value type marshalling may require access to an implementation of the value type or to meta information about the value type. This information is passed between the sending context and the receiving context using a particular service context containing an instance of the SendingContext.RunTime interface.

A sending context may be either the client side or the server side of an invocation, depending on which contains a value type. The sending context is the client side of an invocation if the request contains a value type. It is the server side if the reply contains a value type. The other party in the communication is the receiving context.

The service context marshalled for SendingContext consists of an encapsulated IOR for the SendingContext.RunTime interface. RunTime is just a marker interface defined to allow extensibility in the future. There is currently only one subinterface of RunTime defined: the SendingContext.CodeBase interface. The interface CodeBase defines operations to obtain code URLs and meta-information about a value type received from the sending context.

Note that these classes are currently defined in the com.sun.org.omg.SendingContext package rather than in the package org.omg.SendingContext. This has been done to avoid including large parts of the interface repository in the JDK core, since the interface repository is still evolving in response to the needs of the CORBA Components work.

Package Specification

For a precise list of supported sections of official specifications with which the Java[tm] Platform, Standard Edition 6 ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.SendingContext Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.SendingContext

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • org.omg.CORBA.Object
    • org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.SendingContext.RunTimeOperations)
  • org.omg.SendingContext.RunTimeOperations
    • org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • java.io.Serializable
    • org.omg.CORBA.portable.IDLEntity
      • org.omg.SendingContext.RunTime (also extends org.omg.CORBA.Object, org.omg.SendingContext.RunTimeOperations)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RunTime

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.SendingContext

Interface RunTime

  • All Superinterfaces:
    IDLEntity, Object, RunTimeOperations, Serializable

    public interface RunTime
extends RunTimeOperations, Object, IDLEntity
    Defines the base class that represents the Sending Context of a request. The sending context provides access to information about the runtime environment of the originator of a GIOP message. For example, when a value type is marshalled on a GIOP Request message, the receiver of the value type may need to ask the sender about the CodeBase for the implementation of the value type.

    • Method Summary

      • Methods inherited from interface org.omg.CORBA.Object

        _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


RunTimeOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.SendingContext

Interface RunTimeOperations

  • All Known Subinterfaces:
    RunTime

    public interface RunTimeOperations
    Defines operations on the base class that represents the Sending Context of a request. The sending context provides access to information about the runtime environment of the originator of a GIOP message. For example, when a value type is marshalled on a GIOP Request message, the receiver of the value type may need to ask the sender about the CodeBase for the implementation of the value type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.SendingContext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.SendingContext

  • Packages that use org.omg.SendingContext
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.
    org.omg.SendingContext
    Provides support for the marshalling of value types.
  • Classes in org.omg.SendingContext used by javax.rmi.CORBA
    Class and Description
    RunTime
    Defines the base class that represents the Sending Context of a request.
  • Classes in org.omg.SendingContext used by org.omg.SendingContext
    Class and Description
    RunTimeOperations
    Defines operations on the base class that represents the Sending Context of a request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.SendingContext.RunTime

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.SendingContext.RunTime

  • Packages that use RunTime
    Package Description
    javax.rmi.CORBA
    Contains portability APIs for RMI-IIOP.

    • Uses of RunTime in javax.rmi.CORBA

      Methods in javax.rmi.CORBA that return RunTime
      Modifier and Type Method and Description
      RunTime ValueHandler.getRunTimeCodeBase()
      Returns the CodeBase for this ValueHandler.
      Methods in javax.rmi.CORBA with parameters of type RunTime
      Modifier and Type Method and Description
      Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
      Reads a value from the stream using Java semantics.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.omg.SendingContext.RunTimeOperations

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.omg.SendingContext.RunTimeOperations

  • Packages that use RunTimeOperations
    Package Description
    org.omg.SendingContext
    Provides support for the marshalling of value types.

    • Uses of RunTimeOperations in org.omg.SendingContext

      Subinterfaces of RunTimeOperations in org.omg.SendingContext
      Modifier and Type Interface and Description
      interface  RunTime
      Defines the base class that represents the Sending Context of a request.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


rmi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.omg.stub.java.rmi

Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

See: Description

  • Class Summary
    Class Description
    _Remote_Stub
    This class provides the Stub for the Remote Type.

Package org.omg.stub.java.rmi Description

Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.omg.stub.java.rmi Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.omg.stub.java.rmi

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • org.omg.CORBA_2_3.portable.ObjectImpl
        • javax.rmi.CORBA.Stub (implements java.io.Serializable)
          • org.omg.stub.java.rmi._Remote_Stub (implements java.rmi.Remote)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.omg.stub.java.rmi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.omg.stub.java.rmi

No usage of org.omg.stub.java.rmi
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


_Remote_Stub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.omg.stub.java.rmi

Class _Remote_Stub

  • java.lang.Object
    • org.omg.CORBA.portable.ObjectImpl
      • org.omg.CORBA_2_3.portable.ObjectImpl
        • javax.rmi.CORBA.Stub
          • org.omg.stub.java.rmi._Remote_Stub
  • All Implemented Interfaces:
    Serializable, Remote, Object

    public final class _Remote_Stub
extends Stub
implements Remote
    This class provides the Stub for the Remote Type. The class is generated by the rmic compiler, and is still under works at OMG. It's contents are subject to change without notice as the specification evolves.

    • Constructor Summary

      Constructors
      Constructor and Description
      _Remote_Stub()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String[] _ids()
      Returns an array of repository ids that an object implements.

      • Methods inherited from class javax.rmi.CORBA.Stub

        connect, equals, hashCode, toString

      • Methods inherited from class org.omg.CORBA_2_3.portable.ObjectImpl

        _get_codebase

      • Methods inherited from class org.omg.CORBA.portable.ObjectImpl

        _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • _Remote_Stub

        public _Remote_Stub()

    • Method Detail

      • _ids

        public String[] _ids()
        Returns an array of repository ids that an object implements. The string at index zero represents the most derived interface. The last id, for the generic CORBA object is (i.e., IDL:omg.org/CORBA/Object:1.0") is implied and not present.
        Specified by:
        _ids in class ObjectImpl
        Returns:
        an array of repository ids that an object implements.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.omg.stub.java.rmi._Remote_Stub

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.omg.stub.java.rmi._Remote_Stub

No usage of org.omg.stub.java.rmi._Remote_Stub
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.w3c.dom

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

See: Description

  • Interface Summary
    Interface Description
    Attr
    The Attr interface represents an attribute in an Element object.
    CDATASection
    CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
    CharacterData
    The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
    Comment
    This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
    Document
    The Document interface represents the entire HTML or XML document.
    DocumentFragment
    DocumentFragment is a "lightweight" or "minimal" Document object.
    DocumentType
    Each Document has a doctype attribute whose value is either null or a DocumentType object.
    DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters.
    DOMError
    DOMError is an interface that describes an error.
    DOMErrorHandler
    DOMErrorHandler is a callback interface that the DOM implementation can call when reporting errors that happens while processing XML data, or when doing some other processing (e.g.
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
    DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented.
    DOMImplementationSource
    This interface permits a DOM implementer to supply one or more implementations, based upon requested features and versions, as specified in DOM Features.
    DOMLocator
    DOMLocator is an interface that describes a location (e.g.
    DOMStringList
    The DOMStringList interface provides the abstraction of an ordered collection of DOMString values, without defining or constraining how this collection is implemented.
    Element
    The Element interface represents an element in an HTML or XML document.
    Entity
    This interface represents a known entity, either parsed or unparsed, in an XML document.
    EntityReference
    EntityReference nodes may be used to represent an entity reference in the tree.
    NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
    NameList
    The NameList interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
    Notation
    This interface represents a notation declared in the DTD.
    ProcessingInstruction
    The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
    Text
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
    UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed.
  • Exception Summary
    Exception Description
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).

Package org.w3c.dom Description

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing. The Document Object Model Level 2 Core API allows programs to dynamically access and update the content and structure of documents. See the specification for more information.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CDATASection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface CDATASection

  • All Superinterfaces:
    CharacterData, Node, Text

    public interface CDATASection
extends Text
    CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup. The only delimiter that is recognized in a CDATA section is the "]]>" string that ends the CDATA section. CDATA sections cannot be nested. Their primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.

    The CharacterData.data attribute holds the text that is contained by the CDATA section. Note that this may contain characters that need to be escaped outside of CDATA sections and that, depending on the character encoding ("charset") chosen for serialization, it may be impossible to write out some characters as part of a CDATA section.

    The CDATASection interface inherits from the CharacterData interface through the Text interface. Adjacent CDATASection nodes are not merged by use of the normalize method of the Node interface.

    No lexical check is done on the content of a CDATA section and it is therefore possible to have the character sequence "]]>" in the content, which is illegal in a CDATA section per section 2.7 of [XML 1.0]. The presence of this character sequence must generate a fatal error during serialization or the cdata section must be splitted before the serialization (see also the parameter "split-cdata-sections" in the DOMConfiguration interface).

    Note: Because no markup is recognized within a CDATASection, character numeric references cannot be used as an escape mechanism when serializing. Therefore, action needs to be taken when serializing a CDATASection with a character encoding where some of the contained characters cannot be represented. Failure to do so would not produce well-formed XML.

    Note: One potential solution in the serialization process is to end the CDATA section before the character, output the character using a character reference or entity reference, and open a new CDATA section for any further characters in the text node. Note, however, that some code conversion libraries at the time of writing do not return an error or exception when a character is missing from the encoding, making the task of ensuring that data is not corrupted on serialization more difficult.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface org.w3c.dom.Text

        getWholeText, isElementContentWhitespace, replaceWholeText, splitText

      • Methods inherited from interface org.w3c.dom.CharacterData

        appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Comment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Comment

  • All Superinterfaces:
    CharacterData, Node

    public interface Comment
extends CharacterData
    This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'. Note that this is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.

    No lexical check is done on the content of a comment and it is therefore possible to have the character sequence "--" (double-hyphen) in the content, which is illegal in a comment per section 2.5 of [XML 1.0]. The presence of this character sequence must generate a fatal error during serialization.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface org.w3c.dom.CharacterData

        appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentFragment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DocumentFragment

  • All Superinterfaces:
    Node

    public interface DocumentFragment
extends Node
    DocumentFragment is a "lightweight" or "minimal" Document object. It is very common to want to be able to extract a portion of a document's tree or to create a new fragment of a document. Imagine implementing a user command like cut or rearranging a document by moving fragments around. It is desirable to have an object which can hold such fragments and it is quite natural to use a Node for this purpose. While it is true that a Document object could fulfill this role, a Document object can potentially be a heavyweight object, depending on the underlying implementation. What is really needed for this is a very lightweight object. DocumentFragment is such an object.

    Furthermore, various operations -- such as inserting nodes as children of another Node -- may take DocumentFragment objects as arguments; this results in all the child nodes of the DocumentFragment being moved to the child list of this node.

    The children of a DocumentFragment node are zero or more nodes representing the tops of any sub-trees defining the structure of the document. DocumentFragment nodes do not need to be well-formed XML documents (although they do need to follow the rules imposed upon well-formed XML parsed entities, which can have multiple top nodes). For example, a DocumentFragment might have only one child and that child node could be a Text node. Such a structure model represents neither an HTML document nor a well-formed XML document.

    When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the DocumentFragment and not the DocumentFragment itself are inserted into the Node. This makes the DocumentFragment very useful when the user wishes to create nodes that are siblings; the DocumentFragment acts as the parent of these nodes so that the user can use the standard methods from the Node interface, such as Node.insertBefore and Node.appendChild.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EntityReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface EntityReference

  • All Superinterfaces:
    Node

    public interface EntityReference
extends Node
    EntityReference nodes may be used to represent an entity reference in the tree. Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference. Moreover, the XML processor may completely expand references to entities while building the Document, instead of providing EntityReference nodes. If it does provide such nodes, then for an EntityReference node that represents a reference to a known entity an Entity exists, and the subtree of the EntityReference node is a copy of the Entity node subtree. However, the latter may not be true when an entity contains an unbound namespace prefix. In such a case, because the namespace prefix resolution depends on where the entity reference is, the descendants of the EntityReference node may be bound to different namespace URIs. When an EntityReference node represents a reference to an unknown entity, the node has no children and its replacement value, when used by Attr.value for example, is empty.

    As for Entity nodes, EntityReference nodes and all their descendants are readonly.

    Note: EntityReference nodes may cause element content and attribute value normalization problems when, such as in XML 1.0 and XML Schema, the normalization is performed after entity reference are expanded.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.w3c.dom

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.DOMException

Interface Hierarchy

  • org.w3c.dom.DOMConfiguration
  • org.w3c.dom.DOMError
  • org.w3c.dom.DOMErrorHandler
  • org.w3c.dom.DOMImplementation
  • org.w3c.dom.DOMImplementationList
  • org.w3c.dom.DOMImplementationSource
  • org.w3c.dom.DOMLocator
  • org.w3c.dom.DOMStringList
  • org.w3c.dom.NamedNodeMap
  • org.w3c.dom.NameList
  • org.w3c.dom.Node
    • org.w3c.dom.Attr
    • org.w3c.dom.CharacterData
      • org.w3c.dom.Comment
      • org.w3c.dom.Text
        • org.w3c.dom.CDATASection
    • org.w3c.dom.Document
    • org.w3c.dom.DocumentFragment
    • org.w3c.dom.DocumentType
    • org.w3c.dom.Element
    • org.w3c.dom.Entity
    • org.w3c.dom.EntityReference
    • org.w3c.dom.Notation
    • org.w3c.dom.ProcessingInstruction
  • org.w3c.dom.NodeList
  • org.w3c.dom.TypeInfo
  • org.w3c.dom.UserDataHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.w3c.dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.w3c.dom

  • Packages that use org.w3c.dom
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.bootstrap
    org.w3c.dom.events
    org.w3c.dom.ls
  • Classes in org.w3c.dom used by javax.imageio.metadata
    Class and Description
    Attr
    The Attr interface represents an attribute in an Element object.
    Document
    The Document interface represents the entire HTML or XML document.
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
    Element
    The Element interface represents an element in an HTML or XML document.
    NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
    UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed.
  • Classes in org.w3c.dom used by javax.xml.bind
    Class and Description
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by javax.xml.bind.annotation
    Class and Description
    Element
    The Element interface represents an element in an HTML or XML document.
  • Classes in org.w3c.dom used by javax.xml.bind.helpers
    Class and Description
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by javax.xml.crypto.dom
    Class and Description
    Element
    The Element interface represents an element in an HTML or XML document.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by javax.xml.crypto.dsig.dom
    Class and Description
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by javax.xml.parsers
    Class and Description
    Document
    The Document interface represents the entire HTML or XML document.
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
  • Classes in org.w3c.dom used by javax.xml.soap
    Class and Description
    Document
    The Document interface represents the entire HTML or XML document.
    Element
    The Element interface represents an element in an HTML or XML document.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    Text
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
  • Classes in org.w3c.dom used by javax.xml.transform.dom
    Class and Description
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by javax.xml.validation
    Class and Description
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
  • Classes in org.w3c.dom used by javax.xml.ws
    Class and Description
    Element
    The Element interface represents an element in an HTML or XML document.
  • Classes in org.w3c.dom used by javax.xml.ws.spi
    Class and Description
    Element
    The Element interface represents an element in an HTML or XML document.
  • Classes in org.w3c.dom used by javax.xml.ws.wsaddressing
    Class and Description
    Element
    The Element interface represents an element in an HTML or XML document.
  • Classes in org.w3c.dom used by org.w3c.dom
    Class and Description
    Attr
    The Attr interface represents an attribute in an Element object.
    CDATASection
    CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
    CharacterData
    The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
    Comment
    This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
    Document
    The Document interface represents the entire HTML or XML document.
    DocumentFragment
    DocumentFragment is a "lightweight" or "minimal" Document object.
    DocumentType
    Each Document has a doctype attribute whose value is either null or a DocumentType object.
    DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters.
    DOMError
    DOMError is an interface that describes an error.
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
    DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented.
    DOMLocator
    DOMLocator is an interface that describes a location (e.g.
    DOMStringList
    The DOMStringList interface provides the abstraction of an ordered collection of DOMString values, without defining or constraining how this collection is implemented.
    Element
    The Element interface represents an element in an HTML or XML document.
    EntityReference
    EntityReference nodes may be used to represent an entity reference in the tree.
    NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
    ProcessingInstruction
    The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
    Text
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
    UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed.
  • Classes in org.w3c.dom used by org.w3c.dom.bootstrap
    Class and Description
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
    DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented.
    DOMImplementationSource
    This interface permits a DOM implementer to supply one or more implementations, based upon requested features and versions, as specified in DOM Features.
  • Classes in org.w3c.dom used by org.w3c.dom.events
    Class and Description
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
  • Classes in org.w3c.dom used by org.w3c.dom.ls
    Class and Description
    Document
    The Document interface represents the entire HTML or XML document.
    DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters.
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
    Element
    The Element interface represents an element in an HTML or XML document.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Attr

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Attr

  • All Superinterfaces:
    Node

    public interface Attr
extends Node
    The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a schema associated with the document.

    Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a null value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type. Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.

    The attribute's effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attribute's effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attribute's effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the Node.nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attribute's value(s).

    If the attribute was not explicitly given a value in the instance document but has a default value provided by the schema associated with the document, an attribute node will be created with specified set to false. Removing attribute nodes for which a default value is defined in the schema generates a new attribute node with the default value and specified set to false. If validation occurred while invoking Document.normalizeDocument(), attribute nodes with specified equals to false are recomputed according to the default attribute values provided by the schema. If no default value is associate with this attribute in the schema, the attribute node is discarded.

    In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node may be either Text or EntityReference nodes (when these are in use; see the description of EntityReference for discussion).

    The DOM Core represents all attribute values as simple strings, even if the DTD or schema associated with the document declares them of some specific type such as tokenized.

    The way attribute value normalization is performed by the DOM implementation depends on how much the implementation knows about the schema in use. Typically, the value and nodeValue attributes of an Attr node initially returns the normalized value given by the parser. It is also the case after Document.normalizeDocument() is called (assuming the right options have been set). But this may not be the case after mutation, independently of whether the mutation is performed by setting the string value directly or by changing the Attr child nodes. In particular, this is true when character references are involved, given that they are not represented in the DOM and they impact attribute value normalization. On the other hand, if the implementation knows about the schema in use when the attribute value is changed, and it is of a different type than CDATA, it may normalize it again at that time. This is especially true of specialized DOM implementations, such as SVG DOM implementations, which store attribute values in an internal form different from a string.

    The following table gives some examples of the relations between the attribute value in the original document (parsed attribute), the value as exposed in the DOM, and the serialization of the value:
    Examples Parsed attribute value Initial Attr.value Serialized attribute value
    Character reference
    "x&#178;=5"

    "x²=5"

    "x&#178;=5"
    Built-in character entity
    "y&lt;6"

    "y<6"

    "y&lt;6"
    Literal newline between
     "x=5&#10;y=6"

    "x=5 y=6"

    "x=5&#10;y=6"
    Normalized newline between
    "x=5
 y=6"

    "x=5 y=6"

    "x=5 y=6"
    Entity e with literal newline
     <!ENTITY e '...&#10;...'> [...]> "x=5&e;y=6"
             Dependent on Implementation and Load Options Dependent on Implementation and Load/Save Options

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      Returns the name of this attribute.
      Element getOwnerElement()
      The Element node this attribute is attached to or null if this attribute is not in use.
      TypeInfo getSchemaTypeInfo()
      The type information associated with this attribute.
      boolean getSpecified()
      True if this attribute was explicitly given a value in the instance document, false otherwise.
      String getValue()
      On retrieval, the value of the attribute is returned as a string.
      boolean isId()
      Returns whether this attribute is known to be of type ID (i.e.
      void setValue(String value)
      On retrieval, the value of the attribute is returned as a string.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getName

        String getName()
        Returns the name of this attribute. If Node.localName is different from null, this attribute is a qualified name.

      • getSpecified

        boolean getSpecified()
        True if this attribute was explicitly given a value in the instance document, false otherwise. If the application changed the value of this attribute node (even if it ends up having the same value as the default value) then it is set to true. The implementation may handle attributes with default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.

      • getValue

        String getValue()
        On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
        On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
        Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.

      • setValue

        void setValue(String value)
       throws DOMException
        On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
        On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
        Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

      • getOwnerElement

        Element getOwnerElement()
        The Element node this attribute is attached to or null if this attribute is not in use.
        Since:
        DOM Level 2

      • getSchemaTypeInfo

        TypeInfo getSchemaTypeInfo()
        The type information associated with this attribute. While the type information contained in this attribute is guarantee to be correct after loading the document or invoking Document.normalizeDocument(), schemaTypeInfo may not be reliable if the node was moved.
        Since:
        DOM Level 3

      • isId

        boolean isId()
        Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. When it is and its value is unique, the ownerElement of this attribute can be retrieved using the method Document.getElementById . The implementation could use several ways to determine if an attribute node is known to contain an identifier:
        • If validation occurred using an XML Schema [XML Schema Part 1] while loading the document or while invoking Document.normalizeDocument(), the post-schema-validation infoset contributions (PSVI contributions) values are used to determine if this attribute is a schema-determined ID attribute using the schema-determined ID definition in [XPointer] .
        • If validation occurred using a DTD while loading the document or while invoking Document.normalizeDocument(), the infoset [type definition] value is used to determine if this attribute is a DTD-determined ID attribute using the DTD-determined ID definition in [XPointer] .
        • from the use of the methods Element.setIdAttribute(), Element.setIdAttributeNS(), or Element.setIdAttributeNode(), i.e. it is an user-determined ID attribute;

          Note: XPointer framework (see section 3.2 in [XPointer] ) consider the DOM user-determined ID attribute as being part of the XPointer externally-determined ID definition.

        • using mechanisms that are outside the scope of this specification, it is then an externally-determined ID attribute. This includes using schema languages different from XML schema and DTD.

        If validation occurred while invoking Document.normalizeDocument(), all user-determined ID attributes are reset and all attribute nodes ID information are then reevaluated in accordance to the schema used. As a consequence, if the Attr.schemaTypeInfo attribute contains an ID type, isId will always return true.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.w3c.dom.bootstrap

  • Class Summary
    Class Description
    DOMImplementationRegistry
    A factory that enables applications to obtain instances of DOMImplementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.bootstrap Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.w3c.dom.bootstrap

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.w3c.dom.bootstrap.DOMImplementationRegistry
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.w3c.dom.bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.w3c.dom.bootstrap

  • Packages that use org.w3c.dom.bootstrap
    Package Description
    org.w3c.dom.bootstrap
  • Classes in org.w3c.dom.bootstrap used by org.w3c.dom.bootstrap
    Class and Description
    DOMImplementationRegistry
    A factory that enables applications to obtain instances of DOMImplementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.w3c.dom.bootstrap.DOMImplementationRegistry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.w3c.dom.bootstrap.DOMImplementationRegistry

  • Packages that use DOMImplementationRegistry
    Package Description
    org.w3c.dom.bootstrap

    • Uses of DOMImplementationRegistry in org.w3c.dom.bootstrap

      Methods in org.w3c.dom.bootstrap that return DOMImplementationRegistry
      Modifier and Type Method and Description
      static DOMImplementationRegistry DOMImplementationRegistry.newInstance()
      Obtain a new instance of a DOMImplementationRegistry.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMImplementationRegistry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.bootstrap

Class DOMImplementationRegistry

  • java.lang.Object
    • org.w3c.dom.bootstrap.DOMImplementationRegistry

  • public final class DOMImplementationRegistry
extends Object
    A factory that enables applications to obtain instances of DOMImplementation.

    Example:

      // get an instance of the DOMImplementation registry
  DOMImplementationRegistry registry =
       DOMImplementationRegistry.newInstance();
  // get a DOM implementation the Level 3 XML module
  DOMImplementation domImpl =
       registry.getDOMImplementation("XML 3.0");

    This provides an application with an implementation-independent starting point. DOM implementations may modify this class to meet new security standards or to provide *additional* fallbacks for the list of DOMImplementationSources.

    Since:
    DOM Level 3
    See Also:
    DOMImplementation, DOMImplementationSource

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String PROPERTY
      The system property to specify the DOMImplementationSource class names.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addSource(DOMImplementationSource s)
      Register an implementation.
      DOMImplementation getDOMImplementation(String features)
      Return the first implementation that has the desired features, or null if none is found.
      DOMImplementationList getDOMImplementationList(String features)
      Return a list of implementations that support the desired features.
      static DOMImplementationRegistry newInstance()
      Obtain a new instance of a DOMImplementationRegistry.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • PROPERTY

        public static final String PROPERTY
        The system property to specify the DOMImplementationSource class names.
        See Also:
        Constant Field Values

    • Method Detail

      • newInstance

        public static DOMImplementationRegistry newInstance()
                                             throws ClassNotFoundException,
                                                    InstantiationException,
                                                    IllegalAccessException,
                                                    ClassCastException
        Obtain a new instance of a DOMImplementationRegistry. The DOMImplementationRegistry is initialized by the application or the implementation, depending on the context, by first checking the value of the Java system property org.w3c.dom.DOMImplementationSourceList and the service provider whose contents are at "META_INF/services/org.w3c.dom.DOMImplementationSourceList". The value of this property is a white-space separated list of names of availables classes implementing the DOMImplementationSource interface. Each class listed in the class name list is instantiated and any exceptions encountered are thrown to the application.
        Returns:
        an initialized instance of DOMImplementationRegistry
        Throws:
        ClassNotFoundException - If any specified class can not be found
        InstantiationException - If any specified class is an interface or abstract class
        IllegalAccessException - If the default constructor of a specified class is not accessible
        ClassCastException - If any specified class does not implement DOMImplementationSource

      • getDOMImplementation

        public DOMImplementation getDOMImplementation(String features)
        Return the first implementation that has the desired features, or null if none is found.
        Parameters:
        features - A string that specifies which features are required. This is a space separated list in which each feature is specified by its name optionally followed by a space and a version number. This is something like: "XML 1.0 Traversal +Events 2.0"
        Returns:
        An implementation that has the desired features, or null if none found.

      • getDOMImplementationList

        public DOMImplementationList getDOMImplementationList(String features)
        Return a list of implementations that support the desired features.
        Parameters:
        features - A string that specifies which features are required. This is a space separated list in which each feature is specified by its name optionally followed by a space and a version number. This is something like: "XML 1.0 Traversal +Events 2.0"
        Returns:
        A list of DOMImplementations that support the desired features.

      • addSource

        public void addSource(DOMImplementationSource s)
        Register an implementation.
        Parameters:
        s - The source to be registered, may not be null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


CharacterData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface CharacterData

  • All Superinterfaces:
    Node
    All Known Subinterfaces:
    CDATASection, Comment, Text, Text

    public interface CharacterData
extends Node
    The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM. For clarity this set is defined here rather than on each object that uses these attributes and methods. No DOM objects correspond directly to CharacterData, though Text and others do inherit the interface from it. All offsets in this interface start from 0.

    As explained in the DOMString interface, text strings in the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In the following, the term 16-bit units is used whenever necessary to indicate that indexing on CharacterData is done in 16-bit units.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void appendData(String arg)
      Append the string to the end of the character data of the node.
      void deleteData(int offset, int count)
      Remove a range of 16-bit units from the node.
      String getData()
      The character data of the node that implements this interface.
      int getLength()
      The number of 16-bit units that are available through data and the substringData method below.
      void insertData(int offset, String arg)
      Insert a string at the specified 16-bit unit offset.
      void replaceData(int offset, int count, String arg)
      Replace the characters starting at the specified 16-bit unit offset with the specified string.
      void setData(String data)
      The character data of the node that implements this interface.
      String substringData(int offset, int count)
      Extracts a range of data from the node.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getData

        String getData()
        throws DOMException
        The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.
        Throws:
        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

      • setData

        void setData(String data)
      throws DOMException
        The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

      • getLength

        int getLength()
        The number of 16-bit units that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.

      • substringData

        String substringData(int offset,
                     int count)
              throws DOMException
        Extracts a range of data from the node.
        Parameters:
        offset - Start offset of substring to extract.
        count - The number of 16-bit units to extract.
        Returns:
        The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.
        Throws:
        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
        DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString.

      • appendData

        void appendData(String arg)
         throws DOMException
        Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the DOMString specified.
        Parameters:
        arg - The DOMString to append.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • insertData

        void insertData(int offset,
                String arg)
         throws DOMException
        Insert a string at the specified 16-bit unit offset.
        Parameters:
        offset - The character offset at which to insert.
        arg - The DOMString to insert.
        Throws:
        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • deleteData

        void deleteData(int offset,
                int count)
         throws DOMException
        Remove a range of 16-bit units from the node. Upon success, data and length reflect the change.
        Parameters:
        offset - The offset from which to start removing.
        count - The number of 16-bit units to delete. If the sum of offset and count exceeds length then all 16-bit units from offset to the end of the data are deleted.
        Throws:
        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • replaceData

        void replaceData(int offset,
                 int count,
                 String arg)
          throws DOMException
        Replace the characters starting at the specified 16-bit unit offset with the specified string.
        Parameters:
        offset - The offset from which to start replacing.
        count - The number of 16-bit units to replace. If the sum of offset and count exceeds length, then all 16-bit units to the end of the data are replaced; (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).
        arg - The DOMString with which the range must be replaced.
        Throws:
        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.w3c.dom.DOMException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.w3c.dom.DOMException

  • Packages that use DOMException
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.events
    org.w3c.dom.ls

    • Uses of DOMException in javax.imageio.metadata

      Methods in javax.imageio.metadata that throw DOMException
      Modifier and Type | Method and Description
      short IIOMetadataNode.compareDocumentPosition(Node other)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      String IIOMetadataNode.getBaseURI()
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      Object IIOMetadataNode.getFeature(String feature, String version)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      String IIOMetadataNode.getNamespaceURI()
      Returns null, since namespaces are not supported.
      TypeInfo IIOMetadataNode.getSchemaTypeInfo()
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      String IIOMetadataNode.getTextContent()
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      Object IIOMetadataNode.getUserData(String key)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      boolean IIOMetadataNode.isDefaultNamespace(String namespaceURI)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      boolean IIOMetadataNode.isEqualNode(Node node)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      boolean IIOMetadataNode.isSameNode(Node node)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      String IIOMetadataNode.lookupNamespaceURI(String prefix)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      String IIOMetadataNode.lookupPrefix(String namespaceURI)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      Attr | IIOMetadataNode.setAttributeNode(Attr newAttr)
      void IIOMetadataNode.setIdAttribute(String name, boolean isId)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      void IIOMetadataNode.setIdAttributeNode(Attr idAttr, boolean isId)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      void IIOMetadataNode.setIdAttributeNS(String namespaceURI, String localName, boolean isId)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      void IIOMetadataNode.setTextContent(String textContent)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      Object IIOMetadataNode.setUserData(String key, Object data, UserDataHandler handler)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.

    • Uses of DOMException in org.w3c.dom

      Methods in org.w3c.dom that throw DOMException
      Modifier and Type Method and Description
      Node Document.adoptNode(Node source)
      Attempts to adopt a node from another document to this document.
      Node Node.appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      void CharacterData.appendData(String arg)
      Append the string to the end of the character data of the node.
      short Node.compareDocumentPosition(Node other)
      Compares the reference node, i.e.
      Attr Document.createAttribute(String name)
      Creates an Attr of the given name.
      Attr Document.createAttributeNS(String namespaceURI, String qualifiedName)
      Creates an attribute of the given qualified name and namespace URI.
      CDATASection Document.createCDATASection(String data)
      Creates a CDATASection node whose value is the specified string.
      Document DOMImplementation.createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
      Creates a DOM Document object of the specified type with its document element.
      DocumentType DOMImplementation.createDocumentType(String qualifiedName, String publicId, String systemId)
      Creates an empty DocumentType node.
      Element Document.createElement(String tagName)
      Creates an element of the type specified.
      Element Document.createElementNS(String namespaceURI, String qualifiedName)
      Creates an element of the given qualified name and namespace URI.
      EntityReference Document.createEntityReference(String name)
      Creates an EntityReference object.
      ProcessingInstruction Document.createProcessingInstruction(String target, String data)
      Creates a ProcessingInstruction node given the specified name and data strings.
      void CharacterData.deleteData(int offset, int count)
      Remove a range of 16-bit units from the node.
      Attr Element.getAttributeNodeNS(String namespaceURI, String localName)
      Retrieves an Attr node by local name and namespace URI.
      String Element.getAttributeNS(String namespaceURI, String localName)
      Retrieves an attribute value by local name and namespace URI.
      String CharacterData.getData()
      The character data of the node that implements this interface.
      NodeList Element.getElementsByTagNameNS(String namespaceURI, String localName)
      Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
      Node NamedNodeMap.getNamedItemNS(String namespaceURI, String localName)
      Retrieves a node specified by local name and namespace URI.
      String Node.getNodeValue()
      The value of this node, depending on its type; see the table above.
      Object DOMConfiguration.getParameter(String name)
      Return the value of a parameter if known.
      String Node.getTextContent()
      This attribute returns the text content of this node and its descendants.
      boolean Element.hasAttributeNS(String namespaceURI, String localName)
      Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
      Node Document.importNode(Node importedNode, boolean deep)
      Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
      Node Node.insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      void CharacterData.insertData(int offset, String arg)
      Insert a string at the specified 16-bit unit offset.
      void Element.removeAttribute(String name)
      Removes an attribute by name.
      Attr Element.removeAttributeNode(Attr oldAttr)
      Removes the specified attribute node.
      void Element.removeAttributeNS(String namespaceURI, String localName)
      Removes an attribute by local name and namespace URI.
      Node Node.removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node NamedNodeMap.removeNamedItem(String name)
      Removes a node specified by name.
      Node NamedNodeMap.removeNamedItemNS(String namespaceURI, String localName)
      Removes a node specified by local name and namespace URI.
      Node Document.renameNode(Node n, String namespaceURI, String qualifiedName)
      Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
      Node Node.replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      void CharacterData.replaceData(int offset, int count, String arg)
      Replace the characters starting at the specified 16-bit unit offset with the specified string.
      Text Text.replaceWholeText(String content)
      Replaces the text of the current node and all logically-adjacent text nodes with the specified text.
      void Element.setAttribute(String name, String value)
      Adds a new attribute.
      Attr Element.setAttributeNode(Attr newAttr)
      Adds a new attribute node.
      Attr Element.setAttributeNodeNS(Attr newAttr)
      Adds a new attribute.
      void Element.setAttributeNS(String namespaceURI, String qualifiedName, String value)
      Adds a new attribute.
      void CharacterData.setData(String data)
      The character data of the node that implements this interface.
      void ProcessingInstruction.setData(String data)
      The content of this processing instruction.
      void Element.setIdAttribute(String name, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
      void Element.setIdAttributeNode(Attr idAttr, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
      void Element.setIdAttributeNS(String namespaceURI, String localName, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
      Node NamedNodeMap.setNamedItem(Node arg)
      Adds a node using its nodeName attribute.
      Node NamedNodeMap.setNamedItemNS(Node arg)
      Adds a node using its namespaceURI and localName.
      void Node.setNodeValue(String nodeValue)
      The value of this node, depending on its type; see the table above.
      void DOMConfiguration.setParameter(String name, Object value)
      Set the value of a parameter.
      void Node.setPrefix(String prefix)
      The namespace prefix of this node, or null if it is unspecified.
      void Node.setTextContent(String textContent)
      This attribute returns the text content of this node and its descendants.
      void Attr.setValue(String value)
      On retrieval, the value of the attribute is returned as a string.
      void Document.setXmlStandalone(boolean xmlStandalone)
      An attribute specifying, as part of the XML declaration, whether this document is standalone.
      void Document.setXmlVersion(String xmlVersion)
      An attribute specifying, as part of the XML declaration, the version number of this document.
      Text Text.splitText(int offset)
      Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.
      String CharacterData.substringData(int offset, int count)
      Extracts a range of data from the node.

    • Uses of DOMException in org.w3c.dom.events

      Methods in org.w3c.dom.events that throw DOMException
      Modifier and Type | Method and Description
      Event | DocumentEvent.createEvent(String eventType)

    • Uses of DOMException in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that throw DOMException
      Modifier and Type Method and Description
      LSParser DOMImplementationLS.createLSParser(short mode, String schemaType)
      Create a new LSParser.
      Document LSParser.parse(LSInput input)
      Parse an XML document from a resource identified by a LSInput.
      Document LSParser.parseURI(String uri)
      Parse an XML document from a location identified by a URI reference [IETF RFC 2396].
      Node LSParser.parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
      String LSSerializer.writeToString(Node nodeArg)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Attr

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Attr

  • Packages that use Attr
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of Attr in javax.imageio.metadata

      Methods in javax.imageio.metadata that return Attr
      Modifier and Type | Method and Description
      Attr | IIOMetadataNode.getAttributeNode(String name)
      Attr IIOMetadataNode.getAttributeNodeNS(String namespaceURI, String localName)
      Equivalent to getAttributeNode(localName).
      Attr | IIOMetadataNode.removeAttributeNode(Attr oldAttr)
      Attr | IIOMetadataNode.setAttributeNode(Attr newAttr)
      Attr IIOMetadataNode.setAttributeNodeNS(Attr newAttr)
      Equivalent to setAttributeNode(newAttr).
      Methods in javax.imageio.metadata with parameters of type Attr
      Modifier and Type | Method and Description
      Attr | IIOMetadataNode.removeAttributeNode(Attr oldAttr)
      Attr | IIOMetadataNode.setAttributeNode(Attr newAttr)
      Attr IIOMetadataNode.setAttributeNodeNS(Attr newAttr)
      Equivalent to setAttributeNode(newAttr).
      void IIOMetadataNode.setIdAttributeNode(Attr idAttr, boolean isId)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.

    • Uses of Attr in org.w3c.dom

      Methods in org.w3c.dom that return Attr
      Modifier and Type Method and Description
      Attr Document.createAttribute(String name)
      Creates an Attr of the given name.
      Attr Document.createAttributeNS(String namespaceURI, String qualifiedName)
      Creates an attribute of the given qualified name and namespace URI.
      Attr Element.getAttributeNode(String name)
      Retrieves an attribute node by name.
      Attr Element.getAttributeNodeNS(String namespaceURI, String localName)
      Retrieves an Attr node by local name and namespace URI.
      Attr Element.removeAttributeNode(Attr oldAttr)
      Removes the specified attribute node.
      Attr Element.setAttributeNode(Attr newAttr)
      Adds a new attribute node.
      Attr Element.setAttributeNodeNS(Attr newAttr)
      Adds a new attribute.
      Methods in org.w3c.dom with parameters of type Attr
      Modifier and Type Method and Description
      Attr Element.removeAttributeNode(Attr oldAttr)
      Removes the specified attribute node.
      Attr Element.setAttributeNode(Attr newAttr)
      Adds a new attribute node.
      Attr Element.setAttributeNodeNS(Attr newAttr)
      Adds a new attribute.
      void Element.setIdAttributeNode(Attr idAttr, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.CDATASection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.CDATASection

  • Packages that use CDATASection
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of CDATASection in org.w3c.dom

      Methods in org.w3c.dom that return CDATASection
      Modifier and Type Method and Description
      CDATASection Document.createCDATASection(String data)
      Creates a CDATASection node whose value is the specified string.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.CharacterData

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.CharacterData

  • Packages that use CharacterData
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of CharacterData in org.w3c.dom

      Subinterfaces of CharacterData in org.w3c.dom
      Modifier and Type Interface and Description
      interface  CDATASection
      CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
      interface  Comment
      This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
      interface  Text
      The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Comment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Comment

  • Packages that use Comment
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of Comment in org.w3c.dom

      Methods in org.w3c.dom that return Comment
      Modifier and Type Method and Description
      Comment Document.createComment(String data)
      Creates a Comment node given the specified string.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Document

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Document

  • Packages that use Document
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.ls

    • Uses of Document in javax.imageio.metadata

      Methods in javax.imageio.metadata that return Document
      Modifier and Type Method and Description
      Document IIOMetadataNode.getOwnerDocument()
      Returns null, since IIOMetadataNodes do not belong to any Document.

    • Uses of Document in javax.xml.parsers

      Methods in javax.xml.parsers that return Document
      Modifier and Type Method and Description
      abstract Document DocumentBuilder.newDocument()
      Obtain a new instance of a DOM Document object to build a DOM tree with.
      Document DocumentBuilder.parse(File f)
      Parse the content of the given file as an XML document and return a new DOM Document object.
      abstract Document DocumentBuilder.parse(InputSource is)
      Parse the content of the given input source as an XML document and return a new DOM Document object.
      Document DocumentBuilder.parse(InputStream is)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      Document DocumentBuilder.parse(InputStream is, String systemId)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      Document DocumentBuilder.parse(String uri)
      Parse the content of the given URI as an XML document and return a new DOM Document object.

    • Uses of Document in javax.xml.soap

      Classes in javax.xml.soap that implement Document
      Modifier and Type Class and Description
      class  SOAPPart
      The container for the SOAP-specific portion of a SOAPMessage object.
      Methods in javax.xml.soap that return Document
      Modifier and Type Method and Description
      Document SOAPBody.extractContentAsDocument()
      Creates a new DOM Document and sets the first child of this SOAPBody as it's document element.
      Methods in javax.xml.soap with parameters of type Document
      Modifier and Type Method and Description
      SOAPBodyElement SOAPBody.addDocument(Document document)
      Adds the root node of the DOM Document to this SOAPBody object.

    • Uses of Document in org.w3c.dom

      Methods in org.w3c.dom that return Document
      Modifier and Type Method and Description
      Document DOMImplementation.createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
      Creates a DOM Document object of the specified type with its document element.
      Document Node.getOwnerDocument()
      The Document object associated with this node.

    • Uses of Document in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return Document
      Modifier and Type Method and Description
      Document LSLoadEvent.getNewDocument()
      The document that finished loading.
      Document LSParser.parse(LSInput input)
      Parse an XML document from a resource identified by a LSInput.
      Document LSParser.parseURI(String uri)
      Parse an XML document from a location identified by a URI reference [IETF RFC 2396].
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DocumentFragment

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DocumentFragment

  • Packages that use DocumentFragment
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of DocumentFragment in org.w3c.dom

      Methods in org.w3c.dom that return DocumentFragment
      Modifier and Type Method and Description
      DocumentFragment Document.createDocumentFragment()
      Creates an empty DocumentFragment object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DocumentType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DocumentType

  • Packages that use DocumentType
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of DocumentType in org.w3c.dom

      Methods in org.w3c.dom that return DocumentType
      Modifier and Type Method and Description
      DocumentType DOMImplementation.createDocumentType(String qualifiedName, String publicId, String systemId)
      Creates an empty DocumentType node.
      DocumentType Document.getDoctype()
      The Document Type Declaration (see DocumentType) associated with this document.
      Methods in org.w3c.dom with parameters of type DocumentType
      Modifier and Type Method and Description
      Document DOMImplementation.createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
      Creates a DOM Document object of the specified type with its document element.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMConfiguration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMConfiguration

  • Packages that use DOMConfiguration
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.ls

    • Uses of DOMConfiguration in org.w3c.dom

      Methods in org.w3c.dom that return DOMConfiguration
      Modifier and Type Method and Description
      DOMConfiguration Document.getDomConfig()
      The configuration used when Document.normalizeDocument() is invoked.

    • Uses of DOMConfiguration in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return DOMConfiguration
      Modifier and Type Method and Description
      DOMConfiguration LSSerializer.getDomConfig()
      The DOMConfiguration object used by the LSSerializer when serializing a DOM node.
      DOMConfiguration LSParser.getDomConfig()
      The DOMConfiguration object used when parsing an input source.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMError

  • Packages that use DOMError
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of DOMError in org.w3c.dom

      Methods in org.w3c.dom with parameters of type DOMError
      Modifier and Type Method and Description
      boolean DOMErrorHandler.handleError(DOMError error)
      This method is called on the error handler when an error occurs.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMErrorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMErrorHandler

No usage of org.w3c.dom.DOMErrorHandler
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMImplementation

  • Packages that use DOMImplementation
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.bootstrap

    • Uses of DOMImplementation in javax.xml.parsers

      Methods in javax.xml.parsers that return DOMImplementation
      Modifier and Type Method and Description
      abstract DOMImplementation DocumentBuilder.getDOMImplementation()
      Obtain an instance of a DOMImplementation object.

    • Uses of DOMImplementation in org.w3c.dom

      Methods in org.w3c.dom that return DOMImplementation
      Modifier and Type Method and Description
      DOMImplementation DOMImplementationSource.getDOMImplementation(String features)
      A method to request the first DOM implementation that supports the specified features.
      DOMImplementation Document.getImplementation()
      The DOMImplementation object that handles this document.
      DOMImplementation DOMImplementationList.item(int index)
      Returns the indexth item in the collection.

    • Uses of DOMImplementation in org.w3c.dom.bootstrap

      Methods in org.w3c.dom.bootstrap that return DOMImplementation
      Modifier and Type Method and Description
      DOMImplementation DOMImplementationRegistry.getDOMImplementation(String features)
      Return the first implementation that has the desired features, or null if none is found.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMImplementationList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMImplementationList

  • Packages that use DOMImplementationList
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.bootstrap

    • Uses of DOMImplementationList in org.w3c.dom

      Methods in org.w3c.dom that return DOMImplementationList
      Modifier and Type Method and Description
      DOMImplementationList DOMImplementationSource.getDOMImplementationList(String features)
      A method to request a list of DOM implementations that support the specified features and versions, as specified in .

    • Uses of DOMImplementationList in org.w3c.dom.bootstrap

      Methods in org.w3c.dom.bootstrap that return DOMImplementationList
      Modifier and Type Method and Description
      DOMImplementationList DOMImplementationRegistry.getDOMImplementationList(String features)
      Return a list of implementations that support the desired features.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMImplementationSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMImplementationSource

  • Packages that use DOMImplementationSource
    Package Description
    org.w3c.dom.bootstrap

    • Uses of DOMImplementationSource in org.w3c.dom.bootstrap

      Methods in org.w3c.dom.bootstrap with parameters of type DOMImplementationSource
      Modifier and Type Method and Description
      void DOMImplementationRegistry.addSource(DOMImplementationSource s)
      Register an implementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMLocator

  • Packages that use DOMLocator
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of DOMLocator in org.w3c.dom

      Methods in org.w3c.dom that return DOMLocator
      Modifier and Type Method and Description
      DOMLocator DOMError.getLocation()
      The location of the error.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.DOMStringList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.DOMStringList

  • Packages that use DOMStringList
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of DOMStringList in org.w3c.dom

      Methods in org.w3c.dom that return DOMStringList
      Modifier and Type Method and Description
      DOMStringList DOMConfiguration.getParameterNames()
      The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Element

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Element

  • Packages that use Element
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    javax.xml.bind.annotation
    Defines annotations for customizing Java program elements to XML Schema mapping.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.ws
    This package contains the core JAX-WS APIs.
    javax.xml.ws.spi
    This package defines SPIs for JAX-WS.
    javax.xml.ws.wsaddressing
    This package defines APIs related to WS-Addressing.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.ls

    • Uses of Element in javax.imageio.metadata

      Classes in javax.imageio.metadata that implement Element
      Modifier and Type Class and Description
      class  IIOMetadataNode
      A class representing a node in a meta-data tree, which implements the org.w3c.dom.Element interface and additionally allows for the storage of non-textual objects via the getUserObject and setUserObject methods.

    • Uses of Element in javax.xml.bind.annotation

      Methods in javax.xml.bind.annotation that return Element
      Modifier and Type | Method and Description
      Element | W3CDomHandler.getElement(DOMResult r)
      Methods in javax.xml.bind.annotation with parameters of type Element
      Modifier and Type | Method and Description
      Source | W3CDomHandler.marshal(Element element, ValidationEventHandler errorHandler)

    • Uses of Element in javax.xml.crypto.dom

      Methods in javax.xml.crypto.dom that return Element
      Modifier and Type Method and Description
      Element DOMCryptoContext.getElementById(String idValue)
      Returns the Element with the specified ID attribute value.
      Methods in javax.xml.crypto.dom with parameters of type Element
      Modifier and Type Method and Description
      void DOMCryptoContext.setIdAttributeNS(Element element, String namespaceURI, String localName)
      Registers the element's attribute specified by the namespace URI and local name to be of type ID.

    • Uses of Element in javax.xml.soap

      Subinterfaces of Element in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Detail
      A container for DetailEntry objects.
      interface  DetailEntry
      The content for a Detail object, giving details for a SOAPFault object.
      interface  SOAPBody
      An object that represents the contents of the SOAP body element in a SOAP message.
      interface  SOAPBodyElement
      A SOAPBodyElement object represents the contents in a SOAPBody object.
      interface  SOAPElement
      An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
      interface  SOAPEnvelope
      The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
      interface  SOAPFault
      An element in the SOAPBody object that contains error and/or status information.
      interface  SOAPFaultElement
      A representation of the contents in a SOAPFault object.
      interface  SOAPHeader
      A representation of the SOAP header element.
      interface  SOAPHeaderElement
      An object representing the contents in the SOAP header part of the SOAP envelope.
      Methods in javax.xml.soap with parameters of type Element
      Modifier and Type Method and Description
      SOAPElement SOAPFactory.createElement(Element domElement)
      Creates a SOAPElement object from an existing DOM Element.

    • Uses of Element in javax.xml.ws

      Methods in javax.xml.ws with parameters of type Element
      Modifier and Type Method and Description
      <T extends EndpointReference>
      T             		WebServiceContext.getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this endpoint.
      abstract <T extends EndpointReference>
      T             		Endpoint.getEndpointReference(Class<T> clazz, Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.
      EndpointReference WebServiceContext.getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference for this endpoint.
      abstract EndpointReference Endpoint.getEndpointReference(Element... referenceParameters)
      Returns the EndpointReference associated with this Endpoint instance.

    • Uses of Element in javax.xml.ws.spi

      Method parameters in javax.xml.ws.spi with type arguments of type Element
      Modifier and Type Method and Description
      abstract W3CEndpointReference Provider.createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
      Factory method to create a W3CEndpointReference.
      abstract W3CEndpointReference Provider.createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.
      W3CEndpointReference Provider.createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters, List<Element> elements, Map<QName,String> attributes)
      Factory method to create a W3CEndpointReference.

    • Uses of Element in javax.xml.ws.wsaddressing

      Methods in javax.xml.ws.wsaddressing with parameters of type Element
      Modifier and Type Method and Description
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.element(Element element)
      Adds an extension element to the W3CEndpointReference instance's wsa:EndpointReference element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.metadata(Element metadataElement)
      Adds the metadataElement to the W3CEndpointReference instance's wsa:Metadata element.
      W3CEndpointReferenceBuilder W3CEndpointReferenceBuilder.referenceParameter(Element referenceParameter)
      Adds the referenceParameter to the W3CEndpointReference instance wsa:ReferenceParameters element.

    • Uses of Element in org.w3c.dom

      Methods in org.w3c.dom that return Element
      Modifier and Type Method and Description
      Element Document.createElement(String tagName)
      Creates an element of the type specified.
      Element Document.createElementNS(String namespaceURI, String qualifiedName)
      Creates an element of the given qualified name and namespace URI.
      Element Document.getDocumentElement()
      This is a convenience attribute that allows direct access to the child node that is the document element of the document.
      Element Document.getElementById(String elementId)
      Returns the Element that has an ID attribute with the given value.
      Element Attr.getOwnerElement()
      The Element node this attribute is attached to or null if this attribute is not in use.

    • Uses of Element in org.w3c.dom.ls

      Methods in org.w3c.dom.ls with parameters of type Element
      Modifier and Type Method and Description
      short LSParserFilter.startElement(Element elementArg)
      The parser will call this method after each Element start tag has been scanned, but before the remainder of the Element is processed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Entity

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Entity

No usage of org.w3c.dom.Entity
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.EntityReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.EntityReference

  • Packages that use EntityReference
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of EntityReference in org.w3c.dom

      Methods in org.w3c.dom that return EntityReference
      Modifier and Type Method and Description
      EntityReference Document.createEntityReference(String name)
      Creates an EntityReference object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.NamedNodeMap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.NamedNodeMap

  • Packages that use NamedNodeMap
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of NamedNodeMap in javax.imageio.metadata

      Methods in javax.imageio.metadata that return NamedNodeMap
      Modifier and Type Method and Description
      NamedNodeMap IIOMetadataNode.getAttributes()
      Returns a NamedNodeMap containing the attributes of this node.

    • Uses of NamedNodeMap in org.w3c.dom

      Methods in org.w3c.dom that return NamedNodeMap
      Modifier and Type Method and Description
      NamedNodeMap Node.getAttributes()
      A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
      NamedNodeMap DocumentType.getEntities()
      A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.
      NamedNodeMap DocumentType.getNotations()
      A NamedNodeMap containing the notations declared in the DTD.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.NameList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.NameList

No usage of org.w3c.dom.NameList
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Node

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Node

  • Packages that use Node
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.crypto.dom
    DOM-specific classes for the javax.xml.crypto package.
    javax.xml.crypto.dsig.dom
    DOM-specific classes for the javax.xml.crypto.dsig package.
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    javax.xml.transform.dom
    This package implements DOM-specific transformation APIs.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.
    org.w3c.dom.events
    org.w3c.dom.ls

    • Uses of Node in javax.imageio.metadata

      Classes in javax.imageio.metadata that implement Node
      Modifier and Type Class and Description
      class  IIOMetadataNode
      A class representing a node in a meta-data tree, which implements the org.w3c.dom.Element interface and additionally allows for the storage of non-textual objects via the getUserObject and setUserObject methods.
      Fields in javax.imageio.metadata declared as Node
      Modifier and Type Field and Description
      protected Node IIOInvalidTreeException.offendingNode
      The Node that led to the parsing error, or null.
      Methods in javax.imageio.metadata that return Node
      Modifier and Type | Method and Description
      Node IIOMetadataNode.appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      Node IIOMetadataNode.cloneNode(boolean deep)
      Returns a duplicate of this node.
      abstract Node IIOMetadata.getAsTree(String formatName)
      Returns an XML DOM Node object that represents the root of a tree of metadata contained within this object according to the conventions defined by a given metadata format.
      Node IIOMetadataNode.getFirstChild()
      Returns the first child of this node, or null if the node has no children.
      Node IIOMetadataNode.getLastChild()
      Returns the last child of this node, or null if the node has no children.
      Node IIOMetadataNode.getNextSibling()
      Returns the next sibling of this node, or null if the node has no next sibling.
      Node IIOInvalidTreeException.getOffendingNode()
      Returns the Node that caused the error in parsing.
      Node IIOMetadataNode.getParentNode()
      Returns the parent of this node.
      Node IIOMetadataNode.getPreviousSibling()
      Returns the previous sibling of this node, or null if this node has no previous sibling.
      Node IIOMetadataNode.insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      Node | IIOMetadataNode.item(int index)
      Node IIOMetadataNode.removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node IIOMetadataNode.replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      Methods in javax.imageio.metadata with parameters of type Node
      Modifier and Type Method and Description
      Node IIOMetadataNode.appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      short IIOMetadataNode.compareDocumentPosition(Node other)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      Node IIOMetadataNode.insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      boolean IIOMetadataNode.isEqualNode(Node node)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      boolean IIOMetadataNode.isSameNode(Node node)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.
      abstract void IIOMetadata.mergeTree(String formatName, Node root)
      Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
      Node IIOMetadataNode.removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node IIOMetadataNode.replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      void IIOMetadata.setFromTree(String formatName, Node root)
      Sets the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
      Constructors in javax.imageio.metadata with parameters of type Node
      Constructor and Description
      IIOInvalidTreeException(String message, Node offendingNode)
      Constructs an IIOInvalidTreeException with a message string and a reference to the Node that caused the parsing error.
      IIOInvalidTreeException(String message, Throwable cause, Node offendingNode)
      Constructs an IIOInvalidTreeException with a message string, a reference to an exception that caused this exception, and a reference to the Node that caused the parsing error.

    • Uses of Node in javax.xml.bind

      Methods in javax.xml.bind that return Node
      Modifier and Type Method and Description
      Node ValidationEventLocator.getNode()
      Return a reference to the DOM Node if available
      Node Marshaller.getNode(Object contentTree)
      Get a DOM tree view of the content tree(Optional).
      Methods in javax.xml.bind that return types with arguments of type Node
      Modifier and Type Method and Description
      Binder<Node> JAXBContext.createBinder()
      Creates a Binder for W3C DOM.
      Methods in javax.xml.bind with parameters of type Node
      Modifier and Type Method and Description
      void Marshaller.marshal(Object jaxbElement, Node node)
      Marshal the content tree rooted at jaxbElement into a DOM tree.
      Object Unmarshaller.unmarshal(Node node)
      Unmarshal global XML data from the specified DOM tree and return the resulting content tree.
      <T> JAXBElement<T> Unmarshaller.unmarshal(Node node, Class<T> declaredType)
      Unmarshal XML data by JAXB mapped declaredType and return the resulting content tree.

    • Uses of Node in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return Node
      Modifier and Type | Method and Description
      Node | ValidationEventLocatorImpl.getNode()
      Node AbstractMarshallerImpl.getNode(Object obj)
      By default, the getNode method is unsupported and throw an UnsupportedOperationException.
      Methods in javax.xml.bind.helpers with parameters of type Node
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.marshal(Object obj, Node node)
      void ValidationEventLocatorImpl.setNode(Node _node)
      Set the Node field on this event locator.
      <T> JAXBElement<T> | AbstractUnmarshallerImpl.unmarshal(Node node, Class<T> expectedType)
      Constructors in javax.xml.bind.helpers with parameters of type Node
      Constructor and Description
      ValidationEventLocatorImpl(Node _node)
      Constructs an object that points to a DOM Node.

    • Uses of Node in javax.xml.crypto.dom

      Methods in javax.xml.crypto.dom that return Node
      Modifier and Type Method and Description
      Node DOMURIReference.getHere()
      Returns the here node.
      Node DOMStructure.getNode()
      Returns the node contained in this DOMStructure.
      Constructors in javax.xml.crypto.dom with parameters of type Node
      Constructor and Description
      DOMStructure(Node node)
      Creates a DOMStructure containing the specified node.

    • Uses of Node in javax.xml.crypto.dsig.dom

      Methods in javax.xml.crypto.dsig.dom that return Node
      Modifier and Type Method and Description
      Node DOMSignContext.getNextSibling()
      Returns the nextSibling node.
      Node DOMValidateContext.getNode()
      Returns the node.
      Node DOMSignContext.getParent()
      Returns the parent node.
      Methods in javax.xml.crypto.dsig.dom with parameters of type Node
      Modifier and Type Method and Description
      void DOMSignContext.setNextSibling(Node nextSibling)
      Sets the next sibling node.
      void DOMValidateContext.setNode(Node node)
      Sets the node.
      void DOMSignContext.setParent(Node parent)
      Sets the parent node.
      Constructors in javax.xml.crypto.dsig.dom with parameters of type Node
      Constructor and Description
      DOMSignContext(Key signingKey, Node parent)
      Creates a DOMSignContext with the specified signing key and parent node.
      DOMSignContext(Key signingKey, Node parent, Node nextSibling)
      Creates a DOMSignContext with the specified signing key, parent and next sibling nodes.
      DOMSignContext(KeySelector ks, Node parent)
      Creates a DOMSignContext with the specified key selector and parent node.
      DOMSignContext(KeySelector ks, Node parent, Node nextSibling)
      Creates a DOMSignContext with the specified key selector, parent and next sibling nodes.
      DOMValidateContext(Key validatingKey, Node node)
      Creates a DOMValidateContext containing the specified key and node.
      DOMValidateContext(KeySelector ks, Node node)
      Creates a DOMValidateContext containing the specified key selector and node.

    • Uses of Node in javax.xml.soap

      Subinterfaces of Node in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Detail
      A container for DetailEntry objects.
      interface  DetailEntry
      The content for a Detail object, giving details for a SOAPFault object.
      interface  Node
      A representation of a node (element) in an XML document.
      interface  SOAPBody
      An object that represents the contents of the SOAP body element in a SOAP message.
      interface  SOAPBodyElement
      A SOAPBodyElement object represents the contents in a SOAPBody object.
      interface  SOAPElement
      An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
      interface  SOAPEnvelope
      The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
      interface  SOAPFault
      An element in the SOAPBody object that contains error and/or status information.
      interface  SOAPFaultElement
      A representation of the contents in a SOAPFault object.
      interface  SOAPHeader
      A representation of the SOAP header element.
      interface  SOAPHeaderElement
      An object representing the contents in the SOAP header part of the SOAP envelope.
      Classes in javax.xml.soap that implement Node
      Modifier and Type Class and Description
      class  SOAPPart
      The container for the SOAP-specific portion of a SOAPMessage object.

    • Uses of Node in javax.xml.transform.dom

      Methods in javax.xml.transform.dom that return Node
      Modifier and Type Method and Description
      Node DOMResult.getNextSibling()
      Get the child node before which the result nodes will be inserted.
      Node DOMSource.getNode()
      Get the node that represents a Source DOM tree.
      Node DOMResult.getNode()
      Get the node that will contain the result DOM tree.
      Node DOMLocator.getOriginatingNode()
      Return the node where the event occurred.
      Methods in javax.xml.transform.dom with parameters of type Node
      Modifier and Type Method and Description
      void DOMResult.setNextSibling(Node nextSibling)
      Set the child node before which the result nodes will be inserted.
      void DOMSource.setNode(Node node)
      Set the node that will represents a Source DOM tree.
      void DOMResult.setNode(Node node)
      Set the node that will contain the result DOM tree.
      Constructors in javax.xml.transform.dom with parameters of type Node
      Constructor and Description
      DOMResult(Node node)
      Use a DOM node to create a new output target.
      DOMResult(Node node, Node nextSibling)
      Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.
      DOMResult(Node node, Node nextSibling, String systemId)
      Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and the specified System ID.
      DOMResult(Node node, String systemId)
      Use a DOM node to create a new output target with the specified System ID.
      DOMSource(Node n)
      Create a new input source with a DOM node.
      DOMSource(Node node, String systemID)
      Create a new input source with a DOM node, and with the system ID also passed in as the base URI.

    • Uses of Node in org.w3c.dom

      Subinterfaces of Node in org.w3c.dom
      Modifier and Type Interface and Description
      interface  Attr
      The Attr interface represents an attribute in an Element object.
      interface  CDATASection
      CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
      interface  CharacterData
      The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
      interface  Comment
      This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
      interface  Document
      The Document interface represents the entire HTML or XML document.
      interface  DocumentFragment
      DocumentFragment is a "lightweight" or "minimal" Document object.
      interface  DocumentType
      Each Document has a doctype attribute whose value is either null or a DocumentType object.
      interface  Element
      The Element interface represents an element in an HTML or XML document.
      interface  Entity
      This interface represents a known entity, either parsed or unparsed, in an XML document.
      interface  EntityReference
      EntityReference nodes may be used to represent an entity reference in the tree.
      interface  Notation
      This interface represents a notation declared in the DTD.
      interface  ProcessingInstruction
      The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
      interface  Text
      The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
      Methods in org.w3c.dom that return Node
      Modifier and Type Method and Description
      Node Document.adoptNode(Node source)
      Attempts to adopt a node from another document to this document.
      Node Node.appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      Node Node.cloneNode(boolean deep)
      Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
      Node Node.getFirstChild()
      The first child of this node.
      Node Node.getLastChild()
      The last child of this node.
      Node NamedNodeMap.getNamedItem(String name)
      Retrieves a node specified by name.
      Node NamedNodeMap.getNamedItemNS(String namespaceURI, String localName)
      Retrieves a node specified by local name and namespace URI.
      Node Node.getNextSibling()
      The node immediately following this node.
      Node Node.getParentNode()
      The parent of this node.
      Node Node.getPreviousSibling()
      The node immediately preceding this node.
      Node DOMLocator.getRelatedNode()
      The node this locator is pointing to, or null if no node is available.
      Node Document.importNode(Node importedNode, boolean deep)
      Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
      Node Node.insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      Node NamedNodeMap.item(int index)
      Returns the indexth item in the map.
      Node NodeList.item(int index)
      Returns the indexth item in the collection.
      Node Node.removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node NamedNodeMap.removeNamedItem(String name)
      Removes a node specified by name.
      Node NamedNodeMap.removeNamedItemNS(String namespaceURI, String localName)
      Removes a node specified by local name and namespace URI.
      Node Document.renameNode(Node n, String namespaceURI, String qualifiedName)
      Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
      Node Node.replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      Node NamedNodeMap.setNamedItem(Node arg)
      Adds a node using its nodeName attribute.
      Node NamedNodeMap.setNamedItemNS(Node arg)
      Adds a node using its namespaceURI and localName.
      Methods in org.w3c.dom with parameters of type Node
      Modifier and Type Method and Description
      Node Document.adoptNode(Node source)
      Attempts to adopt a node from another document to this document.
      Node Node.appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      short Node.compareDocumentPosition(Node other)
      Compares the reference node, i.e.
      void UserDataHandler.handle(short operation, String key, Object data, Node src, Node dst)
      This method is called whenever the node for which this handler is registered is imported or cloned.
      Node Document.importNode(Node importedNode, boolean deep)
      Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
      Node Node.insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      boolean Node.isEqualNode(Node arg)
      Tests whether two nodes are equal.
      boolean Node.isSameNode(Node other)
      Returns whether this node is the same node as the given one.
      Node Node.removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node Document.renameNode(Node n, String namespaceURI, String qualifiedName)
      Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
      Node Node.replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      Node NamedNodeMap.setNamedItem(Node arg)
      Adds a node using its nodeName attribute.
      Node NamedNodeMap.setNamedItemNS(Node arg)
      Adds a node using its namespaceURI and localName.

    • Uses of Node in org.w3c.dom.events

      Methods in org.w3c.dom.events that return Node
      Modifier and Type Method and Description
      Node MutationEvent.getRelatedNode()
      relatedNode is used to identify a secondary node related to a mutation event.
      Methods in org.w3c.dom.events with parameters of type Node
      Modifier and Type Method and Description
      void MutationEvent.initMutationEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg, String prevValueArg, String newValueArg, String attrNameArg, short attrChangeArg)
      The initMutationEvent method is used to initialize the value of a MutationEvent created through the DocumentEvent interface.

    • Uses of Node in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return Node
      Modifier and Type Method and Description
      Node LSParser.parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
      Methods in org.w3c.dom.ls with parameters of type Node
      Modifier and Type Method and Description
      short LSParserFilter.acceptNode(Node nodeArg)
      This method will be called by the parser at the completion of the parsing of each node.
      Node LSParser.parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
      boolean LSSerializer.write(Node nodeArg, LSOutput destination)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      String LSSerializer.writeToString(Node nodeArg)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      boolean LSSerializer.writeToURI(Node nodeArg, String uri)
      A convenience method that acts as if LSSerializer.write was called with a LSOutput with no encoding specified and LSOutput.systemId set to the uri argument.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.NodeList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.NodeList

  • Packages that use NodeList
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of NodeList in javax.imageio.metadata

      Classes in javax.imageio.metadata that implement NodeList
      Modifier and Type Class and Description
      class  IIOMetadataNode
      A class representing a node in a meta-data tree, which implements the org.w3c.dom.Element interface and additionally allows for the storage of non-textual objects via the getUserObject and setUserObject methods.
      Methods in javax.imageio.metadata that return NodeList
      Modifier and Type | Method and Description
      NodeList IIOMetadataNode.getChildNodes()
      Returns a NodeList that contains all children of this node.
      NodeList | IIOMetadataNode.getElementsByTagName(String name)
      NodeList IIOMetadataNode.getElementsByTagNameNS(String namespaceURI, String localName)
      Equivalent to getElementsByTagName(localName).

    • Uses of NodeList in org.w3c.dom

      Methods in org.w3c.dom that return NodeList
      Modifier and Type Method and Description
      NodeList Node.getChildNodes()
      A NodeList that contains all children of this node.
      NodeList Element.getElementsByTagName(String name)
      Returns a NodeList of all descendant Elements with a given tag name, in document order.
      NodeList Document.getElementsByTagName(String tagname)
      Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
      NodeList Element.getElementsByTagNameNS(String namespaceURI, String localName)
      Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
      NodeList Document.getElementsByTagNameNS(String namespaceURI, String localName)
      Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Notation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Notation

No usage of org.w3c.dom.Notation
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ProcessingInstruction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ProcessingInstruction

  • Packages that use ProcessingInstruction
    Package Description
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of ProcessingInstruction in org.w3c.dom

      Methods in org.w3c.dom that return ProcessingInstruction
      Modifier and Type Method and Description
      ProcessingInstruction Document.createProcessingInstruction(String target, String data)
      Creates a ProcessingInstruction node given the specified name and data strings.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.Text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.Text

  • Packages that use Text
    Package Description
    javax.xml.soap
    Provides the API for creating and building SOAP messages.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of Text in javax.xml.soap

      Subinterfaces of Text in javax.xml.soap
      Modifier and Type Interface and Description
      interface  Text
      A representation of a node whose value is text.

    • Uses of Text in org.w3c.dom

      Subinterfaces of Text in org.w3c.dom
      Modifier and Type Interface and Description
      interface  CDATASection
      CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
      Methods in org.w3c.dom that return Text
      Modifier and Type Method and Description
      Text Document.createTextNode(String data)
      Creates a Text node given the specified string.
      Text Text.replaceWholeText(String content)
      Replaces the text of the current node and all logically-adjacent text nodes with the specified text.
      Text Text.splitText(int offset)
      Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.TypeInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.TypeInfo

  • Packages that use TypeInfo
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of TypeInfo in javax.imageio.metadata

      Methods in javax.imageio.metadata that return TypeInfo
      Modifier and Type Method and Description
      TypeInfo IIOMetadataNode.getSchemaTypeInfo()
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.

    • Uses of TypeInfo in javax.xml.validation

      Methods in javax.xml.validation that return TypeInfo
      Modifier and Type Method and Description
      abstract TypeInfo TypeInfoProvider.getAttributeTypeInfo(int index)
      Returns the immutable TypeInfo object for the specified attribute of the current element.
      abstract TypeInfo TypeInfoProvider.getElementTypeInfo()
      Returns the immutable TypeInfo object for the current element.

    • Uses of TypeInfo in org.w3c.dom

      Methods in org.w3c.dom that return TypeInfo
      Modifier and Type Method and Description
      TypeInfo Element.getSchemaTypeInfo()
      The type information associated with this element.
      TypeInfo Attr.getSchemaTypeInfo()
      The type information associated with this attribute.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.UserDataHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.UserDataHandler

  • Packages that use UserDataHandler
    Package Description
    javax.imageio.metadata
    A package of the Java Image I/O API dealing with reading and writing metadata.
    org.w3c.dom
    Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

    • Uses of UserDataHandler in javax.imageio.metadata

      Methods in javax.imageio.metadata with parameters of type UserDataHandler
      Modifier and Type Method and Description
      Object IIOMetadataNode.setUserData(String key, Object data, UserDataHandler handler)
      This DOM Level 3 method is not supported for IIOMetadataNode and will throw a DOMException.

    • Uses of UserDataHandler in org.w3c.dom

      Methods in org.w3c.dom with parameters of type UserDataHandler
      Modifier and Type Method and Description
      Object Node.setUserData(String key, Object data, UserDataHandler handler)
      Associate an object to a key on this node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Document

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Document

  • All Superinterfaces:
    Node
    All Known Implementing Classes:
    SOAPPart

    public interface Document
extends Node
    The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

    Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Node adoptNode(Node source)
      Attempts to adopt a node from another document to this document.
      Attr createAttribute(String name)
      Creates an Attr of the given name.
      Attr createAttributeNS(String namespaceURI, String qualifiedName)
      Creates an attribute of the given qualified name and namespace URI.
      CDATASection createCDATASection(String data)
      Creates a CDATASection node whose value is the specified string.
      Comment createComment(String data)
      Creates a Comment node given the specified string.
      DocumentFragment createDocumentFragment()
      Creates an empty DocumentFragment object.
      Element createElement(String tagName)
      Creates an element of the type specified.
      Element createElementNS(String namespaceURI, String qualifiedName)
      Creates an element of the given qualified name and namespace URI.
      EntityReference createEntityReference(String name)
      Creates an EntityReference object.
      ProcessingInstruction createProcessingInstruction(String target, String data)
      Creates a ProcessingInstruction node given the specified name and data strings.
      Text createTextNode(String data)
      Creates a Text node given the specified string.
      DocumentType getDoctype()
      The Document Type Declaration (see DocumentType) associated with this document.
      Element getDocumentElement()
      This is a convenience attribute that allows direct access to the child node that is the document element of the document.
      String getDocumentURI()
      The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
      DOMConfiguration getDomConfig()
      The configuration used when Document.normalizeDocument() is invoked.
      Element getElementById(String elementId)
      Returns the Element that has an ID attribute with the given value.
      NodeList getElementsByTagName(String tagname)
      Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
      NodeList getElementsByTagNameNS(String namespaceURI, String localName)
      Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
      DOMImplementation getImplementation()
      The DOMImplementation object that handles this document.
      String getInputEncoding()
      An attribute specifying the encoding used for this document at the time of the parsing.
      boolean getStrictErrorChecking()
      An attribute specifying whether error checking is enforced or not.
      String getXmlEncoding()
      An attribute specifying, as part of the XML declaration, the encoding of this document.
      boolean getXmlStandalone()
      An attribute specifying, as part of the XML declaration, whether this document is standalone.
      String getXmlVersion()
      An attribute specifying, as part of the XML declaration, the version number of this document.
      Node importNode(Node importedNode, boolean deep)
      Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
      void normalizeDocument()
      This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.
      Node renameNode(Node n, String namespaceURI, String qualifiedName)
      Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
      void setDocumentURI(String documentURI)
      The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
      void setStrictErrorChecking(boolean strictErrorChecking)
      An attribute specifying whether error checking is enforced or not.
      void setXmlStandalone(boolean xmlStandalone)
      An attribute specifying, as part of the XML declaration, whether this document is standalone.
      void setXmlVersion(String xmlVersion)
      An attribute specifying, as part of the XML declaration, the version number of this document.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getDoctype

        DocumentType getDoctype()
        The Document Type Declaration (see DocumentType) associated with this document. For XML documents without a document type declaration this returns null. For HTML documents, a DocumentType object may be returned, independently of the presence or absence of document type declaration in the HTML document.
        This provides direct access to the DocumentType node, child node of this Document. This node can be set at document creation time and later changed through the use of child nodes manipulation methods, such as Node.insertBefore, or Node.replaceChild. Note, however, that while some implementations may instantiate different types of Document objects supporting additional features than the "Core", such as "HTML" [DOM Level 2 HTML] , based on the DocumentType specified at creation time, changing it afterwards is very unlikely to result in a change of the features supported.
        Since:
        DOM Level 3

      • getImplementation

        DOMImplementation getImplementation()
        The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.

      • getDocumentElement

        Element getDocumentElement()
        This is a convenience attribute that allows direct access to the child node that is the document element of the document.

      • createElement

        Element createElement(String tagName)
               throws DOMException
        Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.
        In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.
        To create an element with a qualified name and namespace URI, use the createElementNS method.
        Parameters:
        tagName - The name of the element type to instantiate. For XML, this is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use. In that case, the name is mapped to the canonical form of that markup by the DOM implementation.
        Returns:
        A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.

      • createDocumentFragment

        DocumentFragment createDocumentFragment()
        Creates an empty DocumentFragment object.
        Returns:
        A new DocumentFragment.

      • createTextNode

        Text createTextNode(String data)
        Creates a Text node given the specified string.
        Parameters:
        data - The data for the node.
        Returns:
        The new Text object.

      • createComment

        Comment createComment(String data)
        Creates a Comment node given the specified string.
        Parameters:
        data - The data for the node.
        Returns:
        The new Comment object.

      • createCDATASection

        CDATASection createCDATASection(String data)
                         throws DOMException
        Creates a CDATASection node whose value is the specified string.
        Parameters:
        data - The data for the CDATASection contents.
        Returns:
        The new CDATASection object.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

      • createProcessingInstruction

        ProcessingInstruction createProcessingInstruction(String target,
                                                  String data)
                                           throws DOMException
        Creates a ProcessingInstruction node given the specified name and data strings.
        Parameters:
        target - The target part of the processing instruction.Unlike Document.createElementNS or Document.createAttributeNS, no namespace well-formed checking is done on the target name. Applications should invoke Document.normalizeDocument() with the parameter " namespaces" set to true in order to ensure that the target name is namespace well-formed.
        data - The data for the node.
        Returns:
        The new ProcessingInstruction object.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified target is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

      • createAttribute

        Attr createAttribute(String name)
              throws DOMException
        Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttributeNode method.
        To create an attribute with a qualified name and namespace URI, use the createAttributeNS method.
        Parameters:
        name - The name of the attribute.
        Returns:
        A new Attr object with the nodeName attribute set to name, and localName, prefix, and namespaceURI set to null. The value of the attribute is the empty string.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.

      • createEntityReference

        EntityReference createEntityReference(String name)
                               throws DOMException
        Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.

        Note: If any descendant of the Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 and 3 do not support any mechanism to resolve namespace prefixes in this case.

        Parameters:
        name - The name of the entity to reference.Unlike Document.createElementNS or Document.createAttributeNS, no namespace well-formed checking is done on the entity name. Applications should invoke Document.normalizeDocument() with the parameter " namespaces" set to true in order to ensure that the entity name is namespace well-formed.
        Returns:
        The new EntityReference object.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

      • getElementsByTagName

        NodeList getElementsByTagName(String tagname)
        Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
        Parameters:
        tagname - The name of the tag to match on. The special value "*" matches all tags. For XML, the tagname parameter is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use.
        Returns:
        A new NodeList object containing all the matched Elements.

      • importNode

        Node importNode(Node importedNode,
                boolean deep)
         throws DOMException
        Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node. The returned node has no parent; (parentNode is null).
        For all nodes, importing a node creates a node object owned by the importing document, with attribute values identical to the source node's nodeName and nodeType, plus the attributes related to namespaces (prefix, localName, and namespaceURI). As in the cloneNode operation, the source node is not altered. User data associated to the imported node is not carried over. However, if any UserDataHandlers has been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns.
        Additional information is copied as appropriate to the nodeType, attempting to mirror the behavior expected if a fragment of XML or HTML source was copied from one document to another, recognizing that the two documents may have different DTDs in the XML case. The following list describes the specifics for each type of node.
        ATTRIBUTE_NODE
        The ownerElement attribute is set to null and the specified flag is set to true on the generated Attr. The descendants of the source Attr are recursively imported and the resulting nodes reassembled to form the corresponding subtree. Note that the deep parameter has no effect on Attr nodes; they always carry their children with them when imported.
        DOCUMENT_FRAGMENT_NODE
        If the deep option was set to true, the descendants of the source DocumentFragment are recursively imported and the resulting nodes reassembled under the imported DocumentFragment to form the corresponding subtree. Otherwise, this simply generates an empty DocumentFragment.
        DOCUMENT_NODE
        Document nodes cannot be imported.
        DOCUMENT_TYPE_NODE
        DocumentType nodes cannot be imported.
        ELEMENT_NODE
        Specified attribute nodes of the source element are imported, and the generated Attr nodes are attached to the generated Element. Default attributes are not copied, though if the document being imported into defines default attributes for this element name, those are assigned. If the importNode deep parameter was set to true, the descendants of the source element are recursively imported and the resulting nodes reassembled to form the corresponding subtree.
        ENTITY_NODE
        Entity nodes can be imported, however in the current release of the DOM the DocumentType is readonly. Ability to add these imported nodes to a DocumentType will be considered for addition to a future release of the DOM.On import, the publicId, systemId, and notationName attributes are copied. If a deep import is requested, the descendants of the the source Entity are recursively imported and the resulting nodes reassembled to form the corresponding subtree.
        ENTITY_REFERENCE_NODE
        Only the EntityReference itself is copied, even if a deep import is requested, since the source and destination documents might have defined the entity differently. If the document being imported into provides a definition for this entity name, its value is assigned.
        NOTATION_NODE
        Notation nodes can be imported, however in the current release of the DOM the DocumentType is readonly. Ability to add these imported nodes to a DocumentType will be considered for addition to a future release of the DOM.On import, the publicId and systemId attributes are copied. Note that the deep parameter has no effect on this type of nodes since they cannot have any children.
        PROCESSING_INSTRUCTION_NODE
        The imported node copies its target and data values from those of the source node.Note that the deep parameter has no effect on this type of nodes since they cannot have any children.
        TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE
        These three types of nodes inheriting from CharacterData copy their data and length attributes from those of the source node.Note that the deep parameter has no effect on these types of nodes since they cannot have any children.
        Parameters:
        importedNode - The node to import.
        deep - If true, recursively import the subtree under the specified node; if false, import only the node itself, as explained above. This has no effect on nodes that cannot have any children, and on Attr, and EntityReference nodes.
        Returns:
        The imported node that belongs to this Document.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
        INVALID_CHARACTER_ERR: Raised if one of the imported names is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute. This may happen when importing an XML 1.1 [XML 1.1] element into an XML 1.0 document, for instance.
        Since:
        DOM Level 2

      • createElementNS

        Element createElementNS(String namespaceURI,
                        String qualifiedName)
                 throws DOMException
        Creates an element of the given qualified name and namespace URI.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the element to create.
        qualifiedName - The qualified name of the element type to instantiate.
        Returns:
        A new Element object with the following attributes:
        Attribute | Value
        Node.nodeName | qualifiedName
        Node.namespaceURI | namespaceURI
        Node.prefix | prefix, extracted from qualifiedName, or null if there is no prefix
        Node.localName | local name, extracted from qualifiedName
        Element.tagName | qualifiedName
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualifiedName is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NAMESPACE_ERR: Raised if the qualifiedName is a malformed qualified name, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" [XML Namespaces] , or if the qualifiedName or its prefix is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns".
        NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
        Since:
        DOM Level 2

      • createAttributeNS

        Attr createAttributeNS(String namespaceURI,
                       String qualifiedName)
                throws DOMException
        Creates an attribute of the given qualified name and namespace URI.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to create.
        qualifiedName - The qualified name of the attribute to instantiate.
        Returns:
        A new Attr object with the following attributes:
        Attribute | Value
        Node.nodeName | qualifiedName
        Node.namespaceURI | namespaceURI
        Node.prefix | prefix, extracted from qualifiedName, or null if there is no prefix
        Node.localName | local name, extracted from qualifiedName
        Attr.name | qualifiedName
        Node.nodeValue | the empty string
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualifiedName is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NAMESPACE_ERR: Raised if the qualifiedName is a malformed qualified name, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", if the qualifiedName or its prefix is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns".
        NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
        Since:
        DOM Level 2

      • getElementsByTagNameNS

        NodeList getElementsByTagNameNS(String namespaceURI,
                                String localName)
        Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
        Parameters:
        namespaceURI - The namespace URI of the elements to match on. The special value "*" matches all namespaces.
        localName - The local name of the elements to match on. The special value "*" matches all local names.
        Returns:
        A new NodeList object containing all the matched Elements.
        Since:
        DOM Level 2

      • getElementById

        Element getElementById(String elementId)
        Returns the Element that has an ID attribute with the given value. If no such element exists, this returns null . If more than one element has an ID attribute with that value, what is returned is undefined.
        The DOM implementation is expected to use the attribute Attr.isId to determine if an attribute is of type ID.

        Note: Attributes with the name "ID" or "id" are not of type ID unless so defined.

        Parameters:
        elementId - The unique id value for an element.
        Returns:
        The matching element or null if there is none.
        Since:
        DOM Level 2

      • getInputEncoding

        String getInputEncoding()
        An attribute specifying the encoding used for this document at the time of the parsing. This is null when it is not known, such as when the Document was created in memory.
        Since:
        DOM Level 3

      • getXmlEncoding

        String getXmlEncoding()
        An attribute specifying, as part of the XML declaration, the encoding of this document. This is null when unspecified or when it is not known, such as when the Document was created in memory.
        Since:
        DOM Level 3

      • getXmlStandalone

        boolean getXmlStandalone()
        An attribute specifying, as part of the XML declaration, whether this document is standalone. This is false when unspecified.

        Note: No verification is done on the value when setting this attribute. Applications should use Document.normalizeDocument() with the "validate" parameter to verify if the value matches the validity constraint for standalone document declaration as defined in [XML 1.0].

        Since:
        DOM Level 3

      • setXmlStandalone

        void setXmlStandalone(boolean xmlStandalone)
               throws DOMException
        An attribute specifying, as part of the XML declaration, whether this document is standalone. This is false when unspecified.

        Note: No verification is done on the value when setting this attribute. Applications should use Document.normalizeDocument() with the "validate" parameter to verify if the value matches the validity constraint for standalone document declaration as defined in [XML 1.0].

        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if this document does not support the "XML" feature.
        Since:
        DOM Level 3

      • getXmlVersion

        String getXmlVersion()
        An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is "1.0". If this document does not support the "XML" feature, the value is always null. Changing this attribute will affect methods that check for invalid characters in XML names. Application should invoke Document.normalizeDocument() in order to check for invalid characters in the Nodes that are already part of this Document.
        DOM applications may use the DOMImplementation.hasFeature(feature, version) method with parameter values "XMLVersion" and "1.0" (respectively) to determine if an implementation supports [XML 1.0]. DOM applications may use the same method with parameter values "XMLVersion" and "1.1" (respectively) to determine if an implementation supports [XML 1.1]. In both cases, in order to support XML, an implementation must also support the "XML" feature defined in this specification. Document objects supporting a version of the "XMLVersion" feature must not raise a NOT_SUPPORTED_ERR exception for the same version number when using Document.xmlVersion.
        Since:
        DOM Level 3

      • setXmlVersion

        void setXmlVersion(String xmlVersion)
            throws DOMException
        An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is "1.0". If this document does not support the "XML" feature, the value is always null. Changing this attribute will affect methods that check for invalid characters in XML names. Application should invoke Document.normalizeDocument() in order to check for invalid characters in the Nodes that are already part of this Document.
        DOM applications may use the DOMImplementation.hasFeature(feature, version) method with parameter values "XMLVersion" and "1.0" (respectively) to determine if an implementation supports [XML 1.0]. DOM applications may use the same method with parameter values "XMLVersion" and "1.1" (respectively) to determine if an implementation supports [XML 1.1]. In both cases, in order to support XML, an implementation must also support the "XML" feature defined in this specification. Document objects supporting a version of the "XMLVersion" feature must not raise a NOT_SUPPORTED_ERR exception for the same version number when using Document.xmlVersion.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if the version is set to a value that is not supported by this Document or if this document does not support the "XML" feature.
        Since:
        DOM Level 3

      • getStrictErrorChecking

        boolean getStrictErrorChecking()
        An attribute specifying whether error checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException on DOM operations or report errors while using Document.normalizeDocument(). In case of error, the behavior is undefined. This attribute is true by default.
        Since:
        DOM Level 3

      • setStrictErrorChecking

        void setStrictErrorChecking(boolean strictErrorChecking)
        An attribute specifying whether error checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException on DOM operations or report errors while using Document.normalizeDocument(). In case of error, the behavior is undefined. This attribute is true by default.
        Since:
        DOM Level 3

      • getDocumentURI

        String getDocumentURI()
        The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument. No lexical checking is performed when setting this attribute; this could result in a null value returned when using Node.baseURI .
        Beware that when the Document supports the feature "HTML" [DOM Level 2 HTML] , the href attribute of the HTML BASE element takes precedence over this attribute when computing Node.baseURI.
        Since:
        DOM Level 3

      • setDocumentURI

        void setDocumentURI(String documentURI)
        The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument. No lexical checking is performed when setting this attribute; this could result in a null value returned when using Node.baseURI .
        Beware that when the Document supports the feature "HTML" [DOM Level 2 HTML] , the href attribute of the HTML BASE element takes precedence over this attribute when computing Node.baseURI.
        Since:
        DOM Level 3

      • adoptNode

        Node adoptNode(Node source)
        throws DOMException
        Attempts to adopt a node from another document to this document. If supported, it changes the ownerDocument of the source node, its children, as well as the attached attribute nodes if there are any. If the source node has a parent it is first removed from the child list of its parent. This effectively allows moving a subtree from one document to another (unlike importNode() which create a copy of the source node instead of moving it). When it fails, applications should use Document.importNode() instead. Note that if the adopted node is already part of this document (i.e. the source and target document are the same), this method still has the effect of removing the source node from the child list of its parent, if any. The following list describes the specifics for each type of node.
        ATTRIBUTE_NODE
        The ownerElement attribute is set to null and the specified flag is set to true on the adopted Attr. The descendants of the source Attr are recursively adopted.
        DOCUMENT_FRAGMENT_NODE
        The descendants of the source node are recursively adopted.
        DOCUMENT_NODE
        Document nodes cannot be adopted.
        DOCUMENT_TYPE_NODE
        DocumentType nodes cannot be adopted.
        ELEMENT_NODE
        Specified attribute nodes of the source element are adopted. Default attributes are discarded, though if the document being adopted into defines default attributes for this element name, those are assigned. The descendants of the source element are recursively adopted.
        ENTITY_NODE
        Entity nodes cannot be adopted.
        ENTITY_REFERENCE_NODE
        Only the EntityReference node itself is adopted, the descendants are discarded, since the source and destination documents might have defined the entity differently. If the document being imported into provides a definition for this entity name, its value is assigned.
        NOTATION_NODE
        Notation nodes cannot be adopted.
        PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE
        These nodes can all be adopted. No specifics.

        Note: Since it does not create new nodes unlike the Document.importNode() method, this method does not raise an INVALID_CHARACTER_ERR exception, and applications should use the Document.normalizeDocument() method to check if an imported name is not an XML name according to the XML version in use.

        Parameters:
        source - The node to move into this document.
        Returns:
        The adopted node, or null if this operation fails, such as when the source node comes from a different implementation.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if the source node is of type DOCUMENT, DOCUMENT_TYPE.
        NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is readonly.
        Since:
        DOM Level 3

      • getDomConfig

        DOMConfiguration getDomConfig()
        The configuration used when Document.normalizeDocument() is invoked.
        Since:
        DOM Level 3

      • normalizeDocument

        void normalizeDocument()
        This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. As a consequence, this method updates the replacement tree of EntityReference nodes and normalizes Text nodes, as defined in the method Node.normalize().
        Otherwise, the actual result depends on the features being set on the Document.domConfig object and governing what operations actually take place. Noticeably this method could also make the document namespace well-formed according to the algorithm described in , check the character normalization, remove the CDATASection nodes, etc. See DOMConfiguration for details.
        // Keep in the document
 the information defined // in the XML Information Set (Java example)
 DOMConfiguration docConfig = myDocument.getDomConfig();
 docConfig.setParameter("infoset", Boolean.TRUE);
 myDocument.normalizeDocument();

        Mutation events, when supported, are generated to reflect the changes occurring on the document.
        If errors occur during the invocation of this method, such as an attempt to update a read-only node or a Node.nodeName contains an invalid character according to the XML version in use, errors or warnings (DOMError.SEVERITY_ERROR or DOMError.SEVERITY_WARNING) will be reported using the DOMErrorHandler object associated with the "error-handler " parameter. Note this method might also report fatal errors ( DOMError.SEVERITY_FATAL_ERROR) if an implementation cannot recover from an error.
        Since:
        DOM Level 3

      • renameNode

        Node renameNode(Node n,
                String namespaceURI,
                String qualifiedName)
         throws DOMException
        Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
        When possible this simply changes the name of the given node, otherwise this creates a new node with the specified name and replaces the existing node with the new node as described below.
        If simply changing the name of the given node is not possible, the following operations are performed: a new node is created, any registered event listener is registered on the new node, any user data attached to the old node is removed from that node, the old node is removed from its parent if it has one, the children are moved to the new node, if the renamed node is an Element its attributes are moved to the new node, the new node is inserted at the position the old node used to have in its parent's child nodes list if it has one, the user data that was attached to the old node is attached to the new node.
        When the node being renamed is an Element only the specified attributes are moved, default attributes originated from the DTD are updated according to the new element name. In addition, the implementation may update default attributes from other schemas. Applications should use Document.normalizeDocument() to guarantee these attributes are up-to-date.
        When the node being renamed is an Attr that is attached to an Element, the node is first removed from the Element attributes map. Then, once renamed, either by modifying the existing node or creating a new one as described above, it is put back.
        In addition,
        • a user data event NODE_RENAMED is fired,
        • when the implementation supports the feature "MutationNameEvents", each mutation operation involved in this method fires the appropriate event, and in the end the event { http://www.w3.org/2001/xml-events, DOMElementNameChanged} or { http://www.w3.org/2001/xml-events, DOMAttributeNameChanged} is fired.
        Parameters:
        n - The node to rename.
        namespaceURI - The new namespace URI.
        qualifiedName - The new qualified name.
        Returns:
        The renamed node. This is either the specified node or the new node that was created to replace the specified node.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised when the type of the specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE, or if the implementation does not support the renaming of the document element.
        INVALID_CHARACTER_ERR: Raised if the new qualified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document.
        NAMESPACE_ERR: Raised if the qualifiedName is a malformed qualified name, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" [XML Namespaces] . Also raised, when the node being renamed is an attribute, if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/".
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DocumentType

  • All Superinterfaces:
    Node

    public interface DocumentType
extends Node
    Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML schema efforts on DTD representation are not clearly understood as of this writing.

    DOM Level 3 doesn't support editing DocumentType nodes. DocumentType nodes are read-only.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      NamedNodeMap getEntities()
      A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.
      String getInternalSubset()
      The internal subset as a string, or null if there is none.
      String getName()
      The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
      NamedNodeMap getNotations()
      A NamedNodeMap containing the notations declared in the DTD.
      String getPublicId()
      The public identifier of the external subset.
      String getSystemId()
      The system identifier of the external subset.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getName

        String getName()
        The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

      • getEntities

        NamedNodeMap getEntities()
        A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Parameter entities are not contained. Duplicates are discarded. For example in:
        <!DOCTYPE
 ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
 "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
 ]> <ex/>
        the interface provides access to foo and the first declaration of bar but not the second declaration of bar or baz. Every node in this map also implements the Entity interface.
        The DOM Level 2 does not support editing entities, therefore entities cannot be altered in any way.

      • getNotations

        NamedNodeMap getNotations()
        A NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation interface.
        The DOM Level 2 does not support editing notations, therefore notations cannot be altered in any way.

      • getPublicId

        String getPublicId()
        The public identifier of the external subset.
        Since:
        DOM Level 2

      • getSystemId

        String getSystemId()
        The system identifier of the external subset. This may be an absolute URI or not.
        Since:
        DOM Level 2

      • getInternalSubset

        String getInternalSubset()
        The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets.

        Note: The actual content returned depends on how much information is available to the implementation. This may vary depending on various parameters, including the XML processor used to build the document.

        Since:
        DOM Level 2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMConfiguration

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMConfiguration

  • public interface DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters. Using the configuration, it is possible to change Document.normalizeDocument() behavior, such as replacing the CDATASection nodes with Text nodes or specifying the type of the schema that must be used when the validation of the Document is requested. DOMConfiguration objects are also used in [DOM Level 3 Load and Save] in the DOMParser and DOMSerializer interfaces.

    The parameter names used by the DOMConfiguration object are defined throughout the DOM Level 3 specifications. Names are case-insensitive. To avoid possible conflicts, as a convention, names referring to parameters defined outside the DOM specification should be made unique. Because parameters are exposed as properties in names are recommended to follow the section 5.16 Identifiers of [Unicode] with the addition of the character '-' (HYPHEN-MINUS) but it is not enforced by the DOM implementation. DOM Level 3 Core Implementations are required to recognize all parameters defined in this specification. Some parameter values may also be required to be supported by the implementation. Refer to the definition of the parameter to know if a value must be supported or not.

    Note: Parameters are similar to features and properties used in SAX2 [SAX].

    The following list of parameters defined in the DOM:

    "canonical-form"
    true
    [optional] Canonicalize the document according to the rules specified in [Canonical XML], such as removing the DocumentType node (if any) from the tree, or removing superfluous namespace declarations from each element. Note that this is limited to what can be represented in the DOM; in particular, there is no way to specify the order of the attributes in the DOM. In addition, Setting this parameter to true will also set the state of the parameters listed below. Later changes to the state of one of those parameters will revert "canonical-form" back to false. Parameters set to false: "entities", " normalize-characters", "cdata-sections". Parameters set to true: "namespaces", "namespace-declarations", "well-formed", "element-content-whitespace". Other parameters are not changed unless explicitly specified in the description of the parameters.
    false
    [required] (default)Do not canonicalize the document.
    "cdata-sections"
    true
    [required] (default)Keep CDATASection nodes in the document.
    false
    [required]Transform CDATASection nodes in the document into Text nodes. The new Text node is then combined with any adjacent Text node.
    "check-character-normalization"
    true
    [optional] Check if the characters in the document are fully normalized, as defined in appendix B of [XML 1.1]. When a sequence of characters is encountered that fails normalization checking, an error with the DOMError.type equals to "check-character-normalization-failure" is issued.
    false
    [required] (default)Do not check if characters are normalized.
    "comments"
    true
    [required] (default)Keep Comment nodes in the document.
    false
    [required]Discard Comment nodes in the document.
    "datatype-normalization"
    true
    [optional] Expose schema normalized values in the tree, such as XML Schema normalized values in the case of XML Schema. Since this parameter requires to have schema information, the "validate" parameter will also be set to true. Having this parameter activated when "validate" is false has no effect and no schema-normalization will happen.

    Note: Since the document contains the result of the XML 1.0 processing, this parameter does not apply to attribute value normalization as defined in section 3.3.3 of [XML 1.0] and is only meant for schema languages other than Document Type Definition (DTD).

    false
    [required] (default) Do not perform schema normalization on the tree.
    "element-content-whitespace"
    true
    [required] (default)Keep all whitespaces in the document.
    false
    [optional] Discard all Text nodes that contain whitespaces in element content, as described in [element content whitespace]. The implementation is expected to use the attribute Text.isElementContentWhitespace to determine if a Text node should be discarded or not.
    "entities"
    true
    [required] (default)Keep EntityReference nodes in the document.
    false
    [required] Remove all EntityReference nodes from the document, putting the entity expansions directly in their place. Text nodes are normalized, as defined in Node.normalize. Only unexpanded entity references are kept in the document.

    Note: This parameter does not affect Entity nodes.

    "error-handler"
    [required] Contains a DOMErrorHandler object. If an error is encountered in the document, the implementation will call back the DOMErrorHandler registered using this parameter. The implementation may provide a default DOMErrorHandler object. When called, DOMError.relatedData will contain the closest node to where the error occurred. If the implementation is unable to determine the node where the error occurs, DOMError.relatedData will contain the Document node. Mutations to the document from within an error handler will result in implementation dependent behavior.
    "infoset"
    true
    [required]Keep in the document the information defined in the XML Information Set [XML Information Set] .This forces the following parameters to false: " validate-if-schema", "entities", "datatype-normalization", "cdata-sections ".This forces the following parameters to true: " namespace-declarations", "well-formed", "element-content-whitespace", " comments", "namespaces".Other parameters are not changed unless explicitly specified in the description of the parameters. Note that querying this parameter with getParameter returns true only if the individual parameters specified above are appropriately set.
    false
    Setting infoset to false has no effect.
    "namespaces"
    true
    [required] (default) Perform the namespace processing as defined in .
    false
    [optional] Do not perform the namespace processing.
    "namespace-declarations"
    This parameter has no effect if the parameter "namespaces" is set to false.
    true
    [required] (default) Include namespace declaration attributes, specified or defaulted from the schema, in the document. See also the sections "Declaring Namespaces" in [XML Namespaces] and [XML Namespaces 1.1] .
    false
    [required]Discard all namespace declaration attributes. The namespace prefixes ( Node.prefix) are retained even if this parameter is set to false.
    "normalize-characters"
    true
    [optional] Fully normalized the characters in the document as defined in appendix B of [XML 1.1].
    false
    [required] (default)Do not perform character normalization.
    "schema-location"
    [optional] Represent a DOMString object containing a list of URIs, separated by whitespaces (characters matching the nonterminal production S defined in section 2.3 [XML 1.0]), that represents the schemas against which validation should occur, i.e. the current schema. The types of schemas referenced in this list must match the type specified with schema-type, otherwise the behavior of an implementation is undefined. The schemas specified using this property take precedence to the schema information specified in the document itself. For namespace aware schema, if a schema specified using this property and a schema specified in the document instance (i.e. using the schemaLocation attribute) in a schema document (i.e. using schema import mechanisms) share the same targetNamespace, the schema specified by the user using this property will be used. If two schemas specified using this property share the same targetNamespace or have no namespace, the behavior is implementation dependent. If no location has been provided, this parameter is null.

    Note: The "schema-location" parameter is ignored unless the "schema-type" parameter value is set. It is strongly recommended that Document.documentURI will be set so that an implementation can successfully resolve any external entities referenced.

    "schema-type"
    [optional] Represent a DOMString object containing an absolute URI and representing the type of the schema language used to validate a document against. Note that no lexical checking is done on the absolute URI. If this parameter is not set, a default value may be provided by the implementation, based on the schema languages supported and on the schema language used at load time. If no value is provided, this parameter is null.

    Note: For XML Schema [XML Schema Part 1] , applications must use the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], applications must use the value "http://www.w3.org/TR/REC-xml". Other schema languages are outside the scope of the W3C and therefore should recommend an absolute URI in order to use this method.

    "split-cdata-sections"
    true
    [required] (default)Split CDATA sections containing the CDATA section termination marker ']]>'. When a CDATA section is split a warning is issued with a DOMError.type equals to "cdata-sections-splitted" and DOMError.relatedData equals to the first CDATASection node in document order resulting from the split.
    false
    [required]Signal an error if a CDATASection contains an unrepresentable character.
    "validate"
    true
    [optional] Require the validation against a schema (i.e. XML schema, DTD, any other type or representation of schema) of the document as it is being normalized as defined by [XML 1.0]. If validation errors are found, or no schema was found, the error handler is notified. Schema-normalized values will not be exposed according to the schema in used unless the parameter "datatype-normalization" is true. This parameter will reevaluate:
    • Attribute nodes with Attr.specified equals to false, as specified in the description of the Attr interface;
    • The value of the attribute Text.isElementContentWhitespace for all Text nodes;
    • The value of the attribute Attr.isId for all Attr nodes;
    • The attributes Element.schemaTypeInfo and Attr.schemaTypeInfo.

    Note: "validate-if-schema" and "validate" are mutually exclusive, setting one of them to true will set the other one to false. Applications should also consider setting the parameter "well-formed" to true, which is the default for that option, when validating the document.

    false
    [required] (default) Do not accomplish schema processing, including the internal subset processing. Default attribute values information are kept. Note that validation might still happen if "validate-if-schema" is true .
    "validate-if-schema"
    true
    [optional]Enable validation only if a declaration for the document element can be found in a schema (independently of where it is found, i.e. XML schema, DTD, or any other type or representation of schema). If validation is enabled, this parameter has the same behavior as the parameter "validate" set to true.

    Note: "validate-if-schema" and "validate" are mutually exclusive, setting one of them to true will set the other one to false.

    false
    [required] (default) No schema processing should be performed if the document has a schema, including internal subset processing. Default attribute values information are kept. Note that validation must still happen if "validate " is true.
    "well-formed"
    true
    [required] (default) Check if all nodes are XML well formed according to the XML version in use in Document.xmlVersion:
    • check if the attribute Node.nodeName contains invalid characters according to its node type and generate a DOMError of type "wf-invalid-character-in-node-name", with a DOMError.SEVERITY_ERROR severity, if necessary;
    • check if the text content inside Attr, Element, Comment, Text, CDATASection nodes for invalid characters and generate a DOMError of type "wf-invalid-character", with a DOMError.SEVERITY_ERROR severity, if necessary;
    • check if the data inside ProcessingInstruction nodes for invalid characters and generate a DOMError of type "wf-invalid-character", with a DOMError.SEVERITY_ERROR severity, if necessary;
    false
    [optional] Do not check for XML well-formedness.

    The resolution of the system identifiers associated with entities is done using Document.documentURI. However, when the feature "LS" defined in [DOM Level 3 Load and Save] is supported by the DOM implementation, the parameter "resource-resolver" can also be used on DOMConfiguration objects attached to Document nodes. If this parameter is set, Document.normalizeDocument() will invoke the resource resolver instead of using Document.documentURI.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean canSetParameter(String name, Object value)
      Check if setting a parameter to a specific value is supported.
      Object getParameter(String name)
      Return the value of a parameter if known.
      DOMStringList getParameterNames()
      The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application.
      void setParameter(String name, Object value)
      Set the value of a parameter.

    • Method Detail

      • setParameter

        void setParameter(String name,
                  Object value)
           throws DOMException
        Set the value of a parameter.
        Parameters:
        name - The name of the parameter to set.
        value - The new value or null if the user wishes to unset the parameter. While the type of the value parameter is defined as DOMUserData, the object type must match the type defined by the definition of the parameter. For example, if the parameter is "error-handler", the value must be of type DOMErrorHandler.
        Throws:
        DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.
        NOT_SUPPORTED_ERR: Raised when the parameter name is recognized but the requested value cannot be set.
        TYPE_MISMATCH_ERR: Raised if the value type for this parameter name is incompatible with the expected value type.

      • getParameter

        Object getParameter(String name)
             throws DOMException
        Return the value of a parameter if known.
        Parameters:
        name - The name of the parameter.
        Returns:
        The current object associated with the specified parameter or null if no object has been associated or if the parameter is not supported.
        Throws:
        DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.

      • canSetParameter

        boolean canSetParameter(String name,
                        Object value)
        Check if setting a parameter to a specific value is supported.
        Parameters:
        name - The name of the parameter to check.
        value - An object. if null, the returned value is true.
        Returns:
        true if the parameter could be successfully set to the specified value, or false if the parameter is not recognized or the requested value is not supported. This does not change the current value of the parameter itself.

      • getParameterNames

        DOMStringList getParameterNames()
        The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application. Note that this list can also contain parameter names defined outside this specification.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMError

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMError

  • public interface DOMError
    DOMError is an interface that describes an error.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short SEVERITY_ERROR
      The severity of the error described by the DOMError is error.
      static short SEVERITY_FATAL_ERROR
      The severity of the error described by the DOMError is fatal error.
      static short SEVERITY_WARNING
      The severity of the error described by the DOMError is warning.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DOMLocator getLocation()
      The location of the error.
      String getMessage()
      An implementation specific string describing the error that occurred.
      Object getRelatedData()
      The related DOMError.type dependent data if any.
      Object getRelatedException()
      The related platform dependent exception if any.
      short getSeverity()
      The severity of the error, either SEVERITY_WARNING, SEVERITY_ERROR, or SEVERITY_FATAL_ERROR.
      String getType()
      A DOMString indicating which related data is expected in relatedData.

    • Field Detail

      • SEVERITY_WARNING

        static final short SEVERITY_WARNING
        The severity of the error described by the DOMError is warning. A SEVERITY_WARNING will not cause the processing to stop, unless DOMErrorHandler.handleError() returns false.
        See Also:
        Constant Field Values

      • SEVERITY_ERROR

        static final short SEVERITY_ERROR
        The severity of the error described by the DOMError is error. A SEVERITY_ERROR may not cause the processing to stop if the error can be recovered, unless DOMErrorHandler.handleError() returns false.
        See Also:
        Constant Field Values

      • SEVERITY_FATAL_ERROR

        static final short SEVERITY_FATAL_ERROR
        The severity of the error described by the DOMError is fatal error. A SEVERITY_FATAL_ERROR will cause the normal processing to stop. The return value of DOMErrorHandler.handleError() is ignored unless the implementation chooses to continue, in which case the behavior becomes undefined.
        See Also:
        Constant Field Values

    • Method Detail

      • getSeverity

        short getSeverity()
        The severity of the error, either SEVERITY_WARNING, SEVERITY_ERROR, or SEVERITY_FATAL_ERROR.

      • getMessage

        String getMessage()
        An implementation specific string describing the error that occurred.

      • getType

        String getType()
        A DOMString indicating which related data is expected in relatedData. Users should refer to the specification of the error in order to find its DOMString type and relatedData definitions if any.

        Note: As an example, Document.normalizeDocument() does generate warnings when the "split-cdata-sections" parameter is in use. Therefore, the method generates a SEVERITY_WARNING with type "cdata-sections-splitted" and the first CDATASection node in document order resulting from the split is returned by the relatedData attribute.

      • getRelatedException

        Object getRelatedException()
        The related platform dependent exception if any.

      • getRelatedData

        Object getRelatedData()
        The related DOMError.type dependent data if any.

      • getLocation

        DOMLocator getLocation()
        The location of the error.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMErrorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMErrorHandler

  • public interface DOMErrorHandler
    DOMErrorHandler is a callback interface that the DOM implementation can call when reporting errors that happens while processing XML data, or when doing some other processing (e.g. validating a document). A DOMErrorHandler object can be attached to a Document using the "error-handler" on the DOMConfiguration interface. If more than one error needs to be reported during an operation, the sequence and numbers of the errors passed to the error handler are implementation dependent.

    The application that is using the DOM implementation is expected to implement this interface.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean handleError(DOMError error)
      This method is called on the error handler when an error occurs.

    • Method Detail

      • handleError

        boolean handleError(DOMError error)
        This method is called on the error handler when an error occurs.
        If an exception is thrown from this method, it is considered to be equivalent of returning true.
        Parameters:
        error - The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to the handleError method.
        Returns:
        If the handleError method returns false, the DOM implementation should stop the current processing when possible. If the method returns true, the processing may continue depending on DOMError.severity.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Class DOMException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.DOMException
  • All Implemented Interfaces:
    Serializable

    public class DOMException
extends RuntimeException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable). In general, DOM methods return specific error values in ordinary processing situations, such as out-of-bound errors when using NodeList.

    Implementations should raise other exceptions under other circumstances. For example, implementations should raise an implementation-dependent exception if a null argument is passed when null was not expected.

    Some languages and object systems do not support the concept of exceptions. For such systems, error conditions may be indicated using native error reporting mechanisms. For some bindings, for example, methods may return error codes similar to those listed in the corresponding method descriptions.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short | code
      static short DOMSTRING_SIZE_ERR
      If the specified range of text does not fit into a DOMString.
      static short HIERARCHY_REQUEST_ERR
      If any Node is inserted somewhere it doesn't belong.
      static short INDEX_SIZE_ERR
      If index or size is negative, or greater than the allowed value.
      static short INUSE_ATTRIBUTE_ERR
      If an attempt is made to add an attribute that is already in use elsewhere.
      static short INVALID_ACCESS_ERR
      If a parameter or an operation is not supported by the underlying object.
      static short INVALID_CHARACTER_ERR
      If an invalid or illegal character is specified, such as in an XML name.
      static short INVALID_MODIFICATION_ERR
      If an attempt is made to modify the type of the underlying object.
      static short INVALID_STATE_ERR
      If an attempt is made to use an object that is not, or is no longer, usable.
      static short NAMESPACE_ERR
      If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
      static short NO_DATA_ALLOWED_ERR
      If data is specified for a Node which does not support data.
      static short NO_MODIFICATION_ALLOWED_ERR
      If an attempt is made to modify an object where modifications are not allowed.
      static short NOT_FOUND_ERR
      If an attempt is made to reference a Node in a context where it does not exist.
      static short NOT_SUPPORTED_ERR
      If the implementation does not support the requested type of object or operation.
      static short SYNTAX_ERR
      If an invalid or illegal string is specified.
      static short TYPE_MISMATCH_ERR
      If the type of an object is incompatible with the expected type of the parameter associated to the object.
      static short VALIDATION_ERR
      If a call to a method such as insertBefore or removeChild would make the Node invalid with respect to "partial validity", this exception would be raised and the operation would not be done.
      static short WRONG_DOCUMENT_ERR
      If a Node is used in a different document than the one that created it (that doesn't support it).

    • Constructor Summary

      Constructors
      Constructor and Description
      DOMException(short code, String message)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • code

        public short code

      • INDEX_SIZE_ERR

        public static final short INDEX_SIZE_ERR
        If index or size is negative, or greater than the allowed value.
        See Also:
        Constant Field Values

      • DOMSTRING_SIZE_ERR

        public static final short DOMSTRING_SIZE_ERR
        If the specified range of text does not fit into a DOMString.
        See Also:
        Constant Field Values

      • HIERARCHY_REQUEST_ERR

        public static final short HIERARCHY_REQUEST_ERR
        If any Node is inserted somewhere it doesn't belong.
        See Also:
        Constant Field Values

      • WRONG_DOCUMENT_ERR

        public static final short WRONG_DOCUMENT_ERR
        If a Node is used in a different document than the one that created it (that doesn't support it).
        See Also:
        Constant Field Values

      • INVALID_CHARACTER_ERR

        public static final short INVALID_CHARACTER_ERR
        If an invalid or illegal character is specified, such as in an XML name.
        See Also:
        Constant Field Values

      • NO_DATA_ALLOWED_ERR

        public static final short NO_DATA_ALLOWED_ERR
        If data is specified for a Node which does not support data.
        See Also:
        Constant Field Values

      • NO_MODIFICATION_ALLOWED_ERR

        public static final short NO_MODIFICATION_ALLOWED_ERR
        If an attempt is made to modify an object where modifications are not allowed.
        See Also:
        Constant Field Values

      • NOT_FOUND_ERR

        public static final short NOT_FOUND_ERR
        If an attempt is made to reference a Node in a context where it does not exist.
        See Also:
        Constant Field Values

      • NOT_SUPPORTED_ERR

        public static final short NOT_SUPPORTED_ERR
        If the implementation does not support the requested type of object or operation.
        See Also:
        Constant Field Values

      • INUSE_ATTRIBUTE_ERR

        public static final short INUSE_ATTRIBUTE_ERR
        If an attempt is made to add an attribute that is already in use elsewhere.
        See Also:
        Constant Field Values

      • INVALID_STATE_ERR

        public static final short INVALID_STATE_ERR
        If an attempt is made to use an object that is not, or is no longer, usable.
        Since:
        DOM Level 2
        See Also:
        Constant Field Values

      • SYNTAX_ERR

        public static final short SYNTAX_ERR
        If an invalid or illegal string is specified.
        Since:
        DOM Level 2
        See Also:
        Constant Field Values

      • INVALID_MODIFICATION_ERR

        public static final short INVALID_MODIFICATION_ERR
        If an attempt is made to modify the type of the underlying object.
        Since:
        DOM Level 2
        See Also:
        Constant Field Values

      • NAMESPACE_ERR

        public static final short NAMESPACE_ERR
        If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
        Since:
        DOM Level 2
        See Also:
        Constant Field Values

      • INVALID_ACCESS_ERR

        public static final short INVALID_ACCESS_ERR
        If a parameter or an operation is not supported by the underlying object.
        Since:
        DOM Level 2
        See Also:
        Constant Field Values

      • VALIDATION_ERR

        public static final short VALIDATION_ERR
        If a call to a method such as insertBefore or removeChild would make the Node invalid with respect to "partial validity", this exception would be raised and the operation would not be done. This code is used in [DOM Level 3 Validation] . Refer to this specification for further information.
        Since:
        DOM Level 3
        See Also:
        Constant Field Values

      • TYPE_MISMATCH_ERR

        public static final short TYPE_MISMATCH_ERR
        If the type of an object is incompatible with the expected type of the parameter associated to the object.
        Since:
        DOM Level 3
        See Also:
        Constant Field Values

    • Constructor Detail

      • DOMException

        public DOMException(short code,
                    String message)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMImplementation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMImplementation

  • public interface DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
      Creates a DOM Document object of the specified type with its document element.
      DocumentType createDocumentType(String qualifiedName, String publicId, String systemId)
      Creates an empty DocumentType node.
      Object getFeature(String feature, String version)
      This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in DOM Features.
      boolean hasFeature(String feature, String version)
      Test if the DOM implementation implements a specific feature and version, as specified in DOM Features.

    • Method Detail

      • hasFeature

        boolean hasFeature(String feature,
                   String version)
        Test if the DOM implementation implements a specific feature and version, as specified in DOM Features.
        Parameters:
        feature - The name of the feature to test.
        version - This is the version number of the feature to test.
        Returns:
        true if the feature is implemented in the specified version, false otherwise.

      • createDocumentType

        DocumentType createDocumentType(String qualifiedName,
                                String publicId,
                                String systemId)
                         throws DOMException
        Creates an empty DocumentType node. Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur..
        Parameters:
        qualifiedName - The qualified name of the document type to be created.
        publicId - The external subset public identifier.
        systemId - The external subset system identifier.
        Returns:
        A new DocumentType node with Node.ownerDocument set to null.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name is not an XML name according to [XML 1.0].
        NAMESPACE_ERR: Raised if the qualifiedName is malformed.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • createDocument

        Document createDocument(String namespaceURI,
                        String qualifiedName,
                        DocumentType doctype)
                 throws DOMException
        Creates a DOM Document object of the specified type with its document element.
        Note that based on the DocumentType given to create the document, the implementation may instantiate specialized Document objects that support additional features than the "Core", such as "HTML" [DOM Level 2 HTML] . On the other hand, setting the DocumentType after the document was created makes this very unlikely to happen. Alternatively, specialized Document creation methods, such as createHTMLDocument [DOM Level 2 HTML] , can be used to obtain specific types of Document objects.
        Parameters:
        namespaceURI - The namespace URI of the document element to create or null.
        qualifiedName - The qualified name of the document element to be created or null.
        doctype - The type of document to be created or null. When doctype is not null, its Node.ownerDocument attribute is set to the document being created.
        Returns:
        A new Document object with its document element. If the NamespaceURI, qualifiedName, and doctype are null, the returned Document is empty with no document element.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name is not an XML name according to [XML 1.0].
        NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName is null and the namespaceURI is different from null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" [XML Namespaces] , or if the DOM implementation does not support the "XML" feature but a non-null namespace URI was provided, since namespaces were defined by XML.
        WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or was created from a different implementation.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • getFeature

        Object getFeature(String feature,
                  String version)
        This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in DOM Features. The specialized object may also be obtained by using binding-specific casting methods but is not necessarily expected to, as discussed in . This method also allow the implementation to provide specialized objects which do not support the DOMImplementation interface.
        Parameters:
        feature - The name of the feature requested. Note that any plus sign "+" prepended to the name of the feature will be ignored since it is not significant in the context of this method.
        version - This is the version number of the feature to test.
        Returns:
        Returns an object which implements the specialized APIs of the specified feature and version, if any, or null if there is no object which implements interfaces associated with that feature. If the DOMObject returned by this method implements the DOMImplementation interface, it must delegate to the primary core DOMImplementation and not return results inconsistent with the primary core DOMImplementation such as hasFeature, getFeature, etc.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMImplementationList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMImplementationList

  • public interface DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented. The items in the DOMImplementationList are accessible via an integral index, starting from 0.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getLength()
      The number of DOMImplementations in the list.
      DOMImplementation item(int index)
      Returns the indexth item in the collection.

    • Method Detail

      • item

        DOMImplementation item(int index)
        Returns the indexth item in the collection. If index is greater than or equal to the number of DOMImplementations in the list, this returns null.
        Parameters:
        index - Index into the collection.
        Returns:
        The DOMImplementation at the index th position in the DOMImplementationList, or null if that is not a valid index.

      • getLength

        int getLength()
        The number of DOMImplementations in the list. The range of valid child node indices is 0 to length-1 inclusive.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMImplementationSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMImplementationSource

  • public interface DOMImplementationSource
    This interface permits a DOM implementer to supply one or more implementations, based upon requested features and versions, as specified in DOM Features. Each implemented DOMImplementationSource object is listed in the binding-specific list of available sources so that its DOMImplementation objects are made available.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DOMImplementation getDOMImplementation(String features)
      A method to request the first DOM implementation that supports the specified features.
      DOMImplementationList getDOMImplementationList(String features)
      A method to request a list of DOM implementations that support the specified features and versions, as specified in .

    • Method Detail

      • getDOMImplementation

        DOMImplementation getDOMImplementation(String features)
        A method to request the first DOM implementation that supports the specified features.
        Parameters:
        features - A string that specifies which features and versions are required. This is a space separated list in which each feature is specified by its name optionally followed by a space and a version number. This method returns the first item of the list returned by getDOMImplementationList. As an example, the string "XML 3.0 Traversal +Events 2.0" will request a DOM implementation that supports the module "XML" for its 3.0 version, a module that support of the "Traversal" module for any version, and the module "Events" for its 2.0 version. The module "Events" must be accessible using the method Node.getFeature() and DOMImplementation.getFeature().
        Returns:
        The first DOM implementation that support the desired features, or null if this source has none.

      • getDOMImplementationList

        DOMImplementationList getDOMImplementationList(String features)
        A method to request a list of DOM implementations that support the specified features and versions, as specified in .
        Parameters:
        features - A string that specifies which features and versions are required. This is a space separated list in which each feature is specified by its name optionally followed by a space and a version number. This is something like: "XML 3.0 Traversal +Events 2.0"
        Returns:
        A list of DOM implementations that support the desired features.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMLocator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMLocator

  • public interface DOMLocator
    DOMLocator is an interface that describes a location (e.g. where an error occurred).

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getByteOffset()
      The byte offset into the input source this locator is pointing to or -1 if there is no byte offset available.
      int getColumnNumber()
      The column number this locator is pointing to, or -1 if there is no column number available.
      int getLineNumber()
      The line number this locator is pointing to, or -1 if there is no column number available.
      Node getRelatedNode()
      The node this locator is pointing to, or null if no node is available.
      String getUri()
      The URI this locator is pointing to, or null if no URI is available.
      int getUtf16Offset()
      The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or -1 if there is no UTF-16 offset available.

    • Method Detail

      • getLineNumber

        int getLineNumber()
        The line number this locator is pointing to, or -1 if there is no column number available.

      • getColumnNumber

        int getColumnNumber()
        The column number this locator is pointing to, or -1 if there is no column number available.

      • getByteOffset

        int getByteOffset()
        The byte offset into the input source this locator is pointing to or -1 if there is no byte offset available.

      • getUtf16Offset

        int getUtf16Offset()
        The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or -1 if there is no UTF-16 offset available.

      • getRelatedNode

        Node getRelatedNode()
        The node this locator is pointing to, or null if no node is available.

      • getUri

        String getUri()
        The URI this locator is pointing to, or null if no URI is available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMStringList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface DOMStringList

  • public interface DOMStringList
    The DOMStringList interface provides the abstraction of an ordered collection of DOMString values, without defining or constraining how this collection is implemented. The items in the DOMStringList are accessible via an integral index, starting from 0.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean contains(String str)
      Test if a string is part of this DOMStringList.
      int getLength()
      The number of DOMStrings in the list.
      String item(int index)
      Returns the indexth item in the collection.

    • Method Detail

      • item

        String item(int index)
        Returns the indexth item in the collection. If index is greater than or equal to the number of DOMStrings in the list, this returns null.
        Parameters:
        index - Index into the collection.
        Returns:
        The DOMString at the indexth position in the DOMStringList, or null if that is not a valid index.

      • getLength

        int getLength()
        The number of DOMStrings in the list. The range of valid child node indices is 0 to length-1 inclusive.

      • contains

        boolean contains(String str)
        Test if a string is part of this DOMStringList.
        Parameters:
        str - The string to look for.
        Returns:
        true if the string has been found, false otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Element

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Element

  • All Superinterfaces:
    Node
    All Known Subinterfaces:
    Detail, DetailEntry, SOAPBody, SOAPBodyElement, SOAPElement, SOAPEnvelope, SOAPFault, SOAPFaultElement, SOAPHeader, SOAPHeaderElement
    All Known Implementing Classes:
    IIOMetadataNode

    public interface Element
extends Node
    The Element interface represents an element in an HTML or XML document. Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface attribute attributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.

    Note: In DOM Level 2, the method normalize is inherited from the Node interface where it was moved.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getAttribute(String name)
      Retrieves an attribute value by name.
      Attr getAttributeNode(String name)
      Retrieves an attribute node by name.
      Attr getAttributeNodeNS(String namespaceURI, String localName)
      Retrieves an Attr node by local name and namespace URI.
      String getAttributeNS(String namespaceURI, String localName)
      Retrieves an attribute value by local name and namespace URI.
      NodeList getElementsByTagName(String name)
      Returns a NodeList of all descendant Elements with a given tag name, in document order.
      NodeList getElementsByTagNameNS(String namespaceURI, String localName)
      Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
      TypeInfo getSchemaTypeInfo()
      The type information associated with this element.
      String getTagName()
      The name of the element.
      boolean hasAttribute(String name)
      Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
      boolean hasAttributeNS(String namespaceURI, String localName)
      Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
      void removeAttribute(String name)
      Removes an attribute by name.
      Attr removeAttributeNode(Attr oldAttr)
      Removes the specified attribute node.
      void removeAttributeNS(String namespaceURI, String localName)
      Removes an attribute by local name and namespace URI.
      void setAttribute(String name, String value)
      Adds a new attribute.
      Attr setAttributeNode(Attr newAttr)
      Adds a new attribute node.
      Attr setAttributeNodeNS(Attr newAttr)
      Adds a new attribute.
      void setAttributeNS(String namespaceURI, String qualifiedName, String value)
      Adds a new attribute.
      void setIdAttribute(String name, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
      void setIdAttributeNode(Attr idAttr, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .
      void setIdAttributeNS(String namespaceURI, String localName, boolean isId)
      If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute .

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getTagName

        String getTagName()
        The name of the element. If Node.localName is different from null, this attribute is a qualified name. For example, in:
         <elementExample id="demo"> ...
 </elementExample> ,
        tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.

      • getAttribute

        String getAttribute(String name)
        Retrieves an attribute value by name.
        Parameters:
        name - The name of the attribute to retrieve.
        Returns:
        The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

      • setAttribute

        void setAttribute(String name,
                  String value)
           throws DOMException
        Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.
        To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.
        Parameters:
        name - The name of the attribute to create or alter.
        value - Value to set in string form.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • removeAttribute

        void removeAttribute(String name)
              throws DOMException
        Removes an attribute by name. If a default value for the removed attribute is defined in the DTD, a new attribute immediately appears with the default value as well as the corresponding namespace URI, local name, and prefix when applicable. The implementation may handle default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.
        If no attribute with this name is found, this method has no effect.
        To remove an attribute by local name and namespace URI, use the removeAttributeNS method.
        Parameters:
        name - The name of the attribute to remove.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • getAttributeNode

        Attr getAttributeNode(String name)
        Retrieves an attribute node by name.
        To retrieve an attribute node by qualified name and namespace URI, use the getAttributeNodeNS method.
        Parameters:
        name - The name (nodeName) of the attribute to retrieve.
        Returns:
        The Attr node with the specified name ( nodeName) or null if there is no such attribute.

      • setAttributeNode

        Attr setAttributeNode(Attr newAttr)
               throws DOMException
        Adds a new attribute node. If an attribute with that name ( nodeName) is already present in the element, it is replaced by the new one. Replacing an attribute node by itself has no effect.
        To add a new attribute node with a qualified name and namespace URI, use the setAttributeNodeNS method.
        Parameters:
        newAttr - The Attr node to add to the attribute list.
        Returns:
        If the newAttr attribute replaces an existing attribute, the replaced Attr node is returned, otherwise null is returned.
        Throws:
        DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

      • removeAttributeNode

        Attr removeAttributeNode(Attr oldAttr)
                  throws DOMException
        Removes the specified attribute node. If a default value for the removed Attr node is defined in the DTD, a new node immediately appears with the default value as well as the corresponding namespace URI, local name, and prefix when applicable. The implementation may handle default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.
        Parameters:
        oldAttr - The Attr node to remove from the attribute list.
        Returns:
        The Attr node that was removed.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.

      • getElementsByTagName

        NodeList getElementsByTagName(String name)
        Returns a NodeList of all descendant Elements with a given tag name, in document order.
        Parameters:
        name - The name of the tag to match on. The special value "*" matches all tags.
        Returns:
        A list of matching Element nodes.

      • getAttributeNS

        String getAttributeNS(String namespaceURI,
                      String localName)
               throws DOMException
        Retrieves an attribute value by local name and namespace URI.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to retrieve.
        localName - The local name of the attribute to retrieve.
        Returns:
        The Attr value as a string, or the empty string if that attribute does not have a specified or default value.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • setAttributeNS

        void setAttributeNS(String namespaceURI,
                    String qualifiedName,
                    String value)
             throws DOMException
        Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNodeNS or setAttributeNode to assign it as the value of an attribute.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to create or alter.
        qualifiedName - The qualified name of the attribute to create or alter.
        value - The value to set in string form.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", if the qualifiedName or its prefix is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns".
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • removeAttributeNS

        void removeAttributeNS(String namespaceURI,
                       String localName)
                throws DOMException
        Removes an attribute by local name and namespace URI. If a default value for the removed attribute is defined in the DTD, a new attribute immediately appears with the default value as well as the corresponding namespace URI, local name, and prefix when applicable. The implementation may handle default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.
        If no attribute with this local name and namespace URI is found, this method has no effect.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to remove.
        localName - The local name of the attribute to remove.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • getAttributeNodeNS

        Attr getAttributeNodeNS(String namespaceURI,
                        String localName)
                 throws DOMException
        Retrieves an Attr node by local name and namespace URI.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to retrieve.
        localName - The local name of the attribute to retrieve.
        Returns:
        The Attr node with the specified attribute local name and namespace URI or null if there is no such attribute.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • setAttributeNodeNS

        Attr setAttributeNodeNS(Attr newAttr)
                 throws DOMException
        Adds a new attribute. If an attribute with that local name and that namespace URI is already present in the element, it is replaced by the new one. Replacing an attribute node by itself has no effect.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        newAttr - The Attr node to add to the attribute list.
        Returns:
        If the newAttr attribute replaces an existing attribute with the same local name and namespace URI, the replaced Attr node is returned, otherwise null is returned.
        Throws:
        DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • getElementsByTagNameNS

        NodeList getElementsByTagNameNS(String namespaceURI,
                                String localName)
                         throws DOMException
        Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
        Parameters:
        namespaceURI - The namespace URI of the elements to match on. The special value "*" matches all namespaces.
        localName - The local name of the elements to match on. The special value "*" matches all local names.
        Returns:
        A new NodeList object containing all the matched Elements.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • hasAttribute

        boolean hasAttribute(String name)
        Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
        Parameters:
        name - The name of the attribute to look for.
        Returns:
        true if an attribute with the given name is specified on this element or has a default value, false otherwise.
        Since:
        DOM Level 2

      • hasAttributeNS

        boolean hasAttributeNS(String namespaceURI,
                       String localName)
                throws DOMException
        Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the attribute to look for.
        localName - The local name of the attribute to look for.
        Returns:
        true if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • getSchemaTypeInfo

        TypeInfo getSchemaTypeInfo()
        The type information associated with this element.
        Since:
        DOM Level 3

      • setIdAttribute

        void setIdAttribute(String name,
                    boolean isId)
             throws DOMException
        If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute . This affects the value of Attr.isId and the behavior of Document.getElementById, but does not change any schema that may be in use, in particular this does not affect the Attr.schemaTypeInfo of the specified Attr node. Use the value false for the parameter isId to undeclare an attribute for being a user-determined ID attribute.
        To specify an attribute by local name and namespace URI, use the setIdAttributeNS method.
        Parameters:
        name - The name of the attribute.
        isId - Whether the attribute is a of type ID.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_FOUND_ERR: Raised if the specified node is not an attribute of this element.
        Since:
        DOM Level 3

      • setIdAttributeNS

        void setIdAttributeNS(String namespaceURI,
                      String localName,
                      boolean isId)
               throws DOMException
        If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute . This affects the value of Attr.isId and the behavior of Document.getElementById, but does not change any schema that may be in use, in particular this does not affect the Attr.schemaTypeInfo of the specified Attr node. Use the value false for the parameter isId to undeclare an attribute for being a user-determined ID attribute.
        Parameters:
        namespaceURI - The namespace URI of the attribute.
        localName - The local name of the attribute.
        isId - Whether the attribute is a of type ID.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_FOUND_ERR: Raised if the specified node is not an attribute of this element.
        Since:
        DOM Level 3

      • setIdAttributeNode

        void setIdAttributeNode(Attr idAttr,
                        boolean isId)
                 throws DOMException
        If the parameter isId is true, this method declares the specified attribute to be a user-determined ID attribute . This affects the value of Attr.isId and the behavior of Document.getElementById, but does not change any schema that may be in use, in particular this does not affect the Attr.schemaTypeInfo of the specified Attr node. Use the value false for the parameter isId to undeclare an attribute for being a user-determined ID attribute.
        Parameters:
        idAttr - The attribute node.
        isId - Whether the attribute is a of type ID.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_FOUND_ERR: Raised if the specified node is not an attribute of this element.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Entity

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Entity

  • All Superinterfaces:
    Node

    public interface Entity
extends Node
    This interface represents a known entity, either parsed or unparsed, in an XML document. Note that this models the entity itself not the entity declaration.

    The nodeName attribute that is inherited from Node contains the name of the entity.

    An XML processor may choose to completely expand entities before the structure model is passed to the DOM; in this case there will be no EntityReference nodes in the document tree.

    XML does not mandate that a non-validating XML processor read and process entity declarations made in the external subset or declared in parameter entities. This means that parsed entities declared in the external subset need not be expanded by some classes of applications, and that the replacement text of the entity may not be available. When the replacement text is available, the corresponding Entity node's child list represents the structure of that replacement value. Otherwise, the child list is empty.

    DOM Level 3 does not support editing Entity nodes; if a user wants to make changes to the contents of an Entity, every related EntityReference node has to be replaced in the structure model by a clone of the Entity's contents, and then the desired changes must be made to each of those clones instead. Entity nodes and all their descendants are readonly.

    An Entity node does not have any parent.

    Note: If the entity contains an unbound namespace prefix, the namespaceURI of the corresponding node in the Entity node subtree is null. The same is true for EntityReference nodes that refer to this entity, when they are created using the createEntityReference method of the Document interface.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getInputEncoding()
      An attribute specifying the encoding used for this entity at the time of parsing, when it is an external parsed entity.
      String getNotationName()
      For unparsed entities, the name of the notation for the entity.
      String getPublicId()
      The public identifier associated with the entity if specified, and null otherwise.
      String getSystemId()
      The system identifier associated with the entity if specified, and null otherwise.
      String getXmlEncoding()
      An attribute specifying, as part of the text declaration, the encoding of this entity, when it is an external parsed entity.
      String getXmlVersion()
      An attribute specifying, as part of the text declaration, the version number of this entity, when it is an external parsed entity.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getPublicId

        String getPublicId()
        The public identifier associated with the entity if specified, and null otherwise.

      • getSystemId

        String getSystemId()
        The system identifier associated with the entity if specified, and null otherwise. This may be an absolute URI or not.

      • getNotationName

        String getNotationName()
        For unparsed entities, the name of the notation for the entity. For parsed entities, this is null.

      • getInputEncoding

        String getInputEncoding()
        An attribute specifying the encoding used for this entity at the time of parsing, when it is an external parsed entity. This is null if it an entity from the internal subset or if it is not known.
        Since:
        DOM Level 3

      • getXmlEncoding

        String getXmlEncoding()
        An attribute specifying, as part of the text declaration, the encoding of this entity, when it is an external parsed entity. This is null otherwise.
        Since:
        DOM Level 3

      • getXmlVersion

        String getXmlVersion()
        An attribute specifying, as part of the text declaration, the version number of this entity, when it is an external parsed entity. This is null otherwise.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.w3c.dom.events

  • Interface Summary
    Interface Description
    DocumentEvent
    The DocumentEvent interface provides a mechanism by which the user can create an Event of a type supported by the implementation.
    Event
    The Event interface is used to provide contextual information about an event to the handler processing the event.
    EventListener
    The EventListener interface is the primary method for handling events.
    EventTarget
    The EventTarget interface is implemented by all Nodes in an implementation which supports the DOM Event Model.
    MouseEvent
    The MouseEvent interface provides specific contextual information associated with Mouse events.
    MutationEvent
    The MutationEvent interface provides specific contextual information associated with Mutation events.
    UIEvent
    The UIEvent interface provides specific contextual information associated with User Interface events.
  • Exception Summary
    Exception Description
    EventException
    Event operations may throw an EventException as specified in their method descriptions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.events Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.w3c.dom.events

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.events.EventException

Interface Hierarchy

  • org.w3c.dom.events.DocumentEvent
  • org.w3c.dom.events.Event
    • org.w3c.dom.events.MutationEvent
    • org.w3c.dom.events.UIEvent
      • org.w3c.dom.events.MouseEvent
  • org.w3c.dom.events.EventListener
  • org.w3c.dom.events.EventTarget
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.w3c.dom.events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.w3c.dom.events

  • Packages that use org.w3c.dom.events
    Package Description
    org.w3c.dom.events
    org.w3c.dom.ls
  • Classes in org.w3c.dom.events used by org.w3c.dom.events
    Class and Description
    Event
    The Event interface is used to provide contextual information about an event to the handler processing the event.
    EventException
    Event operations may throw an EventException as specified in their method descriptions.
    EventListener
    The EventListener interface is the primary method for handling events.
    EventTarget
    The EventTarget interface is implemented by all Nodes in an implementation which supports the DOM Event Model.
    UIEvent
    The UIEvent interface provides specific contextual information associated with User Interface events.
  • Classes in org.w3c.dom.events used by org.w3c.dom.ls
    Class and Description
    Event
    The Event interface is used to provide contextual information about an event to the handler processing the event.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.w3c.dom.events.EventException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.w3c.dom.events.EventException

  • Packages that use EventException
    Package Description
    org.w3c.dom.events

    • Uses of EventException in org.w3c.dom.events

      Methods in org.w3c.dom.events that throw EventException
      Modifier and Type Method and Description
      boolean EventTarget.dispatchEvent(Event evt)
      This method allows the dispatch of events into the implementations event model.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.DocumentEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.DocumentEvent

No usage of org.w3c.dom.events.DocumentEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.Event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.Event

  • Packages that use Event
    Package Description
    org.w3c.dom.events
    org.w3c.dom.ls

    • Uses of Event in org.w3c.dom.events

      Subinterfaces of Event in org.w3c.dom.events
      Modifier and Type Interface and Description
      interface  MouseEvent
      The MouseEvent interface provides specific contextual information associated with Mouse events.
      interface  MutationEvent
      The MutationEvent interface provides specific contextual information associated with Mutation events.
      interface  UIEvent
      The UIEvent interface provides specific contextual information associated with User Interface events.
      Methods in org.w3c.dom.events that return Event
      Modifier and Type | Method and Description
      Event | DocumentEvent.createEvent(String eventType)
      Methods in org.w3c.dom.events with parameters of type Event
      Modifier and Type Method and Description
      boolean EventTarget.dispatchEvent(Event evt)
      This method allows the dispatch of events into the implementations event model.
      void EventListener.handleEvent(Event evt)
      This method is called whenever an event occurs of the type for which the EventListener interface was registered.

    • Uses of Event in org.w3c.dom.ls

      Subinterfaces of Event in org.w3c.dom.ls
      Modifier and Type Interface and Description
      interface  LSLoadEvent
      This interface represents a load event object that signals the completion of a document load.
      interface  LSProgressEvent
      This interface represents a progress event object that notifies the application about progress as a document is parsed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.EventListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.EventListener

  • Packages that use EventListener
    Package Description
    org.w3c.dom.events

    • Uses of EventListener in org.w3c.dom.events

      Methods in org.w3c.dom.events with parameters of type EventListener
      Modifier and Type Method and Description
      void EventTarget.addEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the registration of event listeners on the event target.
      void EventTarget.removeEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the removal of event listeners from the event target.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.EventTarget

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.EventTarget

  • Packages that use EventTarget
    Package Description
    org.w3c.dom.events

    • Uses of EventTarget in org.w3c.dom.events

      Methods in org.w3c.dom.events that return EventTarget
      Modifier and Type Method and Description
      EventTarget Event.getCurrentTarget()
      Used to indicate the EventTarget whose EventListeners are currently being processed.
      EventTarget MouseEvent.getRelatedTarget()
      Used to identify a secondary EventTarget related to a UI event.
      EventTarget Event.getTarget()
      Used to indicate the EventTarget to which the event was originally dispatched.
      Methods in org.w3c.dom.events with parameters of type EventTarget
      Modifier and Type Method and Description
      void MouseEvent.initMouseEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget relatedTargetArg)
      The initMouseEvent method is used to initialize the value of a MouseEvent created through the DocumentEvent interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.MouseEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.MouseEvent

No usage of org.w3c.dom.events.MouseEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.MutationEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.MutationEvent

No usage of org.w3c.dom.events.MutationEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.events.UIEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.events.UIEvent

  • Packages that use UIEvent
    Package Description
    org.w3c.dom.events

    • Uses of UIEvent in org.w3c.dom.events

      Subinterfaces of UIEvent in org.w3c.dom.events
      Modifier and Type Interface and Description
      interface  MouseEvent
      The MouseEvent interface provides specific contextual information associated with Mouse events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface DocumentEvent

  • public interface DocumentEvent
    The DocumentEvent interface provides a mechanism by which the user can create an Event of a type supported by the implementation. It is expected that the DocumentEvent interface will be implemented on the same object which implements the Document interface in an implementation which supports the Event model.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Event | createEvent(String eventType)

    • Method Detail

      • createEvent

        Event createEvent(String eventType)
           throws DOMException
        Parameters:
        eventType - The eventType parameter specifies the type of Event interface to be created. If the Event interface specified is supported by the implementation this method will return a new Event of the interface type requested. If the Event is to be dispatched via the dispatchEvent method the appropriate event init method must be called after creation in order to initialize the Event's values. As an example, a user wishing to synthesize some kind of UIEvent would call createEvent with the parameter "UIEvents". The initUIEvent method could then be called on the newly created UIEvent to set the specific type of UIEvent to be dispatched and set its context information.The createEvent method is used in creating Events when it is either inconvenient or unnecessary for the user to create an Event themselves. In cases where the implementation provided Event is insufficient, users may supply their own Event implementations for use with the dispatchEvent method.
        Returns:
        The newly created Event
        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if the implementation does not support the type of Event interface requested
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface Event

  • All Known Subinterfaces:
    LSLoadEvent, LSProgressEvent, MouseEvent, MutationEvent, UIEvent

    public interface Event
    The Event interface is used to provide contextual information about an event to the handler processing the event. An object which implements the Event interface is generally passed as the first parameter to an event handler. More specific context information is passed to event handlers by deriving additional interfaces from Event which contain information directly relating to the type of event they accompany. These derived interfaces are also implemented by the object passed to the event listener.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short AT_TARGET
      The event is currently being evaluated at the target EventTarget.
      static short BUBBLING_PHASE
      The current event phase is the bubbling phase.
      static short CAPTURING_PHASE
      The current event phase is the capturing phase.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean getBubbles()
      Used to indicate whether or not an event is a bubbling event.
      boolean getCancelable()
      Used to indicate whether or not an event can have its default action prevented.
      EventTarget getCurrentTarget()
      Used to indicate the EventTarget whose EventListeners are currently being processed.
      short getEventPhase()
      Used to indicate which phase of event flow is currently being evaluated.
      EventTarget getTarget()
      Used to indicate the EventTarget to which the event was originally dispatched.
      long getTimeStamp()
      Used to specify the time (in milliseconds relative to the epoch) at which the event was created.
      String getType()
      The name of the event (case-insensitive).
      void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg)
      The initEvent method is used to initialize the value of an Event created through the DocumentEvent interface.
      void preventDefault()
      If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur.
      void stopPropagation()
      The stopPropagation method is used prevent further propagation of an event during event flow.

    • Field Detail

      • CAPTURING_PHASE

        static final short CAPTURING_PHASE
        The current event phase is the capturing phase.
        See Also:
        Constant Field Values

      • AT_TARGET

        static final short AT_TARGET
        The event is currently being evaluated at the target EventTarget.
        See Also:
        Constant Field Values

      • BUBBLING_PHASE

        static final short BUBBLING_PHASE
        The current event phase is the bubbling phase.
        See Also:
        Constant Field Values

    • Method Detail

      • getType

        String getType()
        The name of the event (case-insensitive). The name must be an XML name.

      • getTarget

        EventTarget getTarget()
        Used to indicate the EventTarget to which the event was originally dispatched.

      • getCurrentTarget

        EventTarget getCurrentTarget()
        Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.

      • getEventPhase

        short getEventPhase()
        Used to indicate which phase of event flow is currently being evaluated.

      • getBubbles

        boolean getBubbles()
        Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.

      • getCancelable

        boolean getCancelable()
        Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false.

      • getTimeStamp

        long getTimeStamp()
        Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value of timeStamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

      • stopPropagation

        void stopPropagation()
        The stopPropagation method is used prevent further propagation of an event during event flow. If this method is called by any EventListener the event will cease propagating through the tree. The event will complete dispatch to all listeners on the current EventTarget before event flow stops. This method may be used during any stage of event flow.

      • preventDefault

        void preventDefault()
        If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. If, during any stage of event flow, the preventDefault method is called the event is canceled. Any default action associated with the event will not occur. Calling this method for a non-cancelable event has no effect. Once preventDefault has been called it will remain in effect throughout the remainder of the event's propagation. This method may be used during any stage of event flow.

      • initEvent

        void initEvent(String eventTypeArg,
               boolean canBubbleArg,
               boolean cancelableArg)
        The initEvent method is used to initialize the value of an Event created through the DocumentEvent interface. This method may only be called before the Event has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass of Event interface only the values specified in the initEvent method are modified, all other attributes are left unchanged.
        Parameters:
        eventTypeArg - Specifies the event type. This type may be any event type currently defined in this specification or a new event type.. The string must be an XML name. Any new event type must not begin with any upper, lower, or mixed case version of the string "DOM". This prefix is reserved for future DOM event sets. It is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.
        canBubbleArg - Specifies whether or not the event can bubble.
        cancelableArg - Specifies whether or not the event's default action can be prevented.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EventException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Class EventException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.events.EventException
  • All Implemented Interfaces:
    Serializable

    public class EventException
extends RuntimeException
    Event operations may throw an EventException as specified in their method descriptions.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2
    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short | code
      static short UNSPECIFIED_EVENT_TYPE_ERR
      If the Event's type was not specified by initializing the event before the method was called.

    • Constructor Summary

      Constructors
      Constructor and Description
      EventException(short code, String message)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • code

        public short code

      • UNSPECIFIED_EVENT_TYPE_ERR

        public static final short UNSPECIFIED_EVENT_TYPE_ERR
        If the Event's type was not specified by initializing the event before the method was called. Specification of the Event's type as null or an empty string will also trigger this exception.
        See Also:
        Constant Field Values

    • Constructor Detail

      • EventException

        public EventException(short code,
                      String message)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EventListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface EventListener

  • public interface EventListener
    The EventListener interface is the primary method for handling events. Users implement the EventListener interface and register their listener on an EventTarget using the AddEventListener method. The users should also remove their EventListener from its EventTarget after they have completed using the listener.

    When a Node is copied using the cloneNode method the EventListeners attached to the source Node are not attached to the copied Node. If the user wishes the same EventListeners to be added to the newly created copy the user must add them manually.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void handleEvent(Event evt)
      This method is called whenever an event occurs of the type for which the EventListener interface was registered.

    • Method Detail

      • handleEvent

        void handleEvent(Event evt)
        This method is called whenever an event occurs of the type for which the EventListener interface was registered.
        Parameters:
        evt - The Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EventTarget

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface EventTarget

  • public interface EventTarget
    The EventTarget interface is implemented by all Nodes in an implementation which supports the DOM Event Model. Therefore, this interface can be obtained by using binding-specific casting methods on an instance of the Node interface. The interface allows registration and removal of EventListeners on an EventTarget and dispatch of events to that EventTarget.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the registration of event listeners on the event target.
      boolean dispatchEvent(Event evt)
      This method allows the dispatch of events into the implementations event model.
      void removeEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the removal of event listeners from the event target.

    • Method Detail

      • addEventListener

        void addEventListener(String type,
                      EventListener listener,
                      boolean useCapture)
        This method allows the registration of event listeners on the event target. If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
        If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.
        Parameters:
        type - The event type for which the user is registering
        listener - The listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
        useCapture - If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.

      • removeEventListener

        void removeEventListener(String type,
                         EventListener listener,
                         boolean useCapture)
        This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed.
        Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
        Parameters:
        type - Specifies the event type of the EventListener being removed.
        listener - The EventListener parameter indicates the EventListener to be removed.
        useCapture - Specifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

      • dispatchEvent

        boolean dispatchEvent(Event evt)
               throws EventException
        This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.
        Parameters:
        evt - Specifies the event type, behavior, and contextual information to be used in processing the event.
        Returns:
        The return value of dispatchEvent indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
        Throws:
        EventException - UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as null or an empty string will also trigger this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MouseEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface MouseEvent

  • All Superinterfaces:
    Event, UIEvent

    public interface MouseEvent
extends UIEvent
    The MouseEvent interface provides specific contextual information associated with Mouse events.

    The detail attribute inherited from UIEvent indicates the number of times a mouse button has been pressed and released over the same screen location during a user action. The attribute value is 1 when the user begins this action and increments by 1 for each full sequence of pressing and releasing. If the user moves the mouse between the mousedown and mouseup the value will be set to 0, indicating that no click is occurring.

    In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within its descendent elements.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Field Summary

      • Fields inherited from interface org.w3c.dom.events.Event

        AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean getAltKey()
      Used to indicate whether the 'alt' key was depressed during the firing of the event.
      short getButton()
      During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state.
      int getClientX()
      The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.
      int getClientY()
      The vertical coordinate at which the event occurred relative to the DOM implementation's client area.
      boolean getCtrlKey()
      Used to indicate whether the 'ctrl' key was depressed during the firing of the event.
      boolean getMetaKey()
      Used to indicate whether the 'meta' key was depressed during the firing of the event.
      EventTarget getRelatedTarget()
      Used to identify a secondary EventTarget related to a UI event.
      int getScreenX()
      The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.
      int getScreenY()
      The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.
      boolean getShiftKey()
      Used to indicate whether the 'shift' key was depressed during the firing of the event.
      void initMouseEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget relatedTargetArg)
      The initMouseEvent method is used to initialize the value of a MouseEvent created through the DocumentEvent interface.

      • Methods inherited from interface org.w3c.dom.events.UIEvent

        getDetail, getView, initUIEvent

      • Methods inherited from interface org.w3c.dom.events.Event

        getBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation

    • Method Detail

      • getScreenX

        int getScreenX()
        The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.

      • getScreenY

        int getScreenY()
        The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.

      • getClientX

        int getClientX()
        The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.

      • getClientY

        int getClientY()
        The vertical coordinate at which the event occurred relative to the DOM implementation's client area.

      • getCtrlKey

        boolean getCtrlKey()
        Used to indicate whether the 'ctrl' key was depressed during the firing of the event.

      • getShiftKey

        boolean getShiftKey()
        Used to indicate whether the 'shift' key was depressed during the firing of the event.

      • getAltKey

        boolean getAltKey()
        Used to indicate whether the 'alt' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

      • getMetaKey

        boolean getMetaKey()
        Used to indicate whether the 'meta' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

      • getButton

        short getButton()
        During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. The values for button range from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

      • getRelatedTarget

        EventTarget getRelatedTarget()
        Used to identify a secondary EventTarget related to a UI event. Currently this attribute is used with the mouseover event to indicate the EventTarget which the pointing device exited and with the mouseout event to indicate the EventTarget which the pointing device entered.

      • initMouseEvent

        void initMouseEvent(String typeArg,
                    boolean canBubbleArg,
                    boolean cancelableArg,
                    AbstractView viewArg,
                    int detailArg,
                    int screenXArg,
                    int screenYArg,
                    int clientXArg,
                    int clientYArg,
                    boolean ctrlKeyArg,
                    boolean altKeyArg,
                    boolean shiftKeyArg,
                    boolean metaKeyArg,
                    short buttonArg,
                    EventTarget relatedTargetArg)
        The initMouseEvent method is used to initialize the value of a MouseEvent created through the DocumentEvent interface. This method may only be called before the MouseEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
        Parameters:
        typeArg - Specifies the event type.
        canBubbleArg - Specifies whether or not the event can bubble.
        cancelableArg - Specifies whether or not the event's default action can be prevented.
        viewArg - Specifies the Event's AbstractView.
        detailArg - Specifies the Event's mouse click count.
        screenXArg - Specifies the Event's screen x coordinate
        screenYArg - Specifies the Event's screen y coordinate
        clientXArg - Specifies the Event's client x coordinate
        clientYArg - Specifies the Event's client y coordinate
        ctrlKeyArg - Specifies whether or not control key was depressed during the Event.
        altKeyArg - Specifies whether or not alt key was depressed during the Event.
        shiftKeyArg - Specifies whether or not shift key was depressed during the Event.
        metaKeyArg - Specifies whether or not meta key was depressed during the Event.
        buttonArg - Specifies the Event's mouse button.
        relatedTargetArg - Specifies the Event's related EventTarget.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


MutationEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface MutationEvent

  • All Superinterfaces:
    Event

    public interface MutationEvent
extends Event
    The MutationEvent interface provides specific contextual information associated with Mutation events.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short ADDITION
      The Attr was just added.
      static short MODIFICATION
      The Attr was modified in place.
      static short REMOVAL
      The Attr was just removed.

      • Fields inherited from interface org.w3c.dom.events.Event

        AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      short getAttrChange()
      attrChange indicates the type of change which triggered the DOMAttrModified event.
      String getAttrName()
      attrName indicates the name of the changed Attr node in a DOMAttrModified event.
      String getNewValue()
      newValue indicates the new value of the Attr node in DOMAttrModified events, and of the CharacterData node in DOMCharacterDataModified events.
      String getPrevValue()
      prevValue indicates the previous value of the Attr node in DOMAttrModified events, and of the CharacterData node in DOMCharacterDataModified events.
      Node getRelatedNode()
      relatedNode is used to identify a secondary node related to a mutation event.
      void initMutationEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg, String prevValueArg, String newValueArg, String attrNameArg, short attrChangeArg)
      The initMutationEvent method is used to initialize the value of a MutationEvent created through the DocumentEvent interface.

      • Methods inherited from interface org.w3c.dom.events.Event

        getBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation

    • Field Detail

      • MODIFICATION

        static final short MODIFICATION
        The Attr was modified in place.
        See Also:
        Constant Field Values

      • ADDITION

        static final short ADDITION
        The Attr was just added.
        See Also:
        Constant Field Values

      • REMOVAL

        static final short REMOVAL
        The Attr was just removed.
        See Also:
        Constant Field Values

    • Method Detail

      • getRelatedNode

        Node getRelatedNode()
        relatedNode is used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, the relatedNode is the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, the relatedNode is the changed node. In the case of the DOMAttrModified event it indicates the Attr node which was modified, added, or removed.

      • getPrevValue

        String getPrevValue()
        prevValue indicates the previous value of the Attr node in DOMAttrModified events, and of the CharacterData node in DOMCharacterDataModified events.

      • getNewValue

        String getNewValue()
        newValue indicates the new value of the Attr node in DOMAttrModified events, and of the CharacterData node in DOMCharacterDataModified events.

      • getAttrName

        String getAttrName()
        attrName indicates the name of the changed Attr node in a DOMAttrModified event.

      • getAttrChange

        short getAttrChange()
        attrChange indicates the type of change which triggered the DOMAttrModified event. The values can be MODIFICATION , ADDITION, or REMOVAL.

      • initMutationEvent

        void initMutationEvent(String typeArg,
                       boolean canBubbleArg,
                       boolean cancelableArg,
                       Node relatedNodeArg,
                       String prevValueArg,
                       String newValueArg,
                       String attrNameArg,
                       short attrChangeArg)
        The initMutationEvent method is used to initialize the value of a MutationEvent created through the DocumentEvent interface. This method may only be called before the MutationEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
        Parameters:
        typeArg - Specifies the event type.
        canBubbleArg - Specifies whether or not the event can bubble.
        cancelableArg - Specifies whether or not the event's default action can be prevented.
        relatedNodeArg - Specifies the Event's related Node.
        prevValueArg - Specifies the Event's prevValue attribute. This value may be null.
        newValueArg - Specifies the Event's newValue attribute. This value may be null.
        attrNameArg - Specifies the Event's attrName attribute. This value may be null.
        attrChangeArg - Specifies the Event's attrChange attribute
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UIEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.events

Interface UIEvent

  • All Superinterfaces:
    Event
    All Known Subinterfaces:
    MouseEvent

    public interface UIEvent
extends Event
    The UIEvent interface provides specific contextual information associated with User Interface events.

    See also the Document Object Model (DOM) Level 2 Events Specification.

    Since:
    DOM Level 2

    • Field Summary

      • Fields inherited from interface org.w3c.dom.events.Event

        AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getDetail()
      Specifies some detail information about the Event, depending on the type of event.
      AbstractView getView()
      The view attribute identifies the AbstractView from which the event was generated.
      void initUIEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg)
      The initUIEvent method is used to initialize the value of a UIEvent created through the DocumentEvent interface.

      • Methods inherited from interface org.w3c.dom.events.Event

        getBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation

    • Method Detail

      • getView

        AbstractView getView()
        The view attribute identifies the AbstractView from which the event was generated.

      • getDetail

        int getDetail()
        Specifies some detail information about the Event, depending on the type of event.

      • initUIEvent

        void initUIEvent(String typeArg,
                 boolean canBubbleArg,
                 boolean cancelableArg,
                 AbstractView viewArg,
                 int detailArg)
        The initUIEvent method is used to initialize the value of a UIEvent created through the DocumentEvent interface. This method may only be called before the UIEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
        Parameters:
        typeArg - Specifies the event type.
        canBubbleArg - Specifies whether or not the event can bubble.
        cancelableArg - Specifies whether or not the event's default action can be prevented.
        viewArg - Specifies the Event's AbstractView.
        detailArg - Specifies the Event's detail.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ls

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.w3c.dom.ls

  • Interface Summary
    Interface Description
    DOMImplementationLS
    DOMImplementationLS contains the factory methods for creating Load and Save objects.
    LSInput
    This interface represents an input source for data.
    LSLoadEvent
    This interface represents a load event object that signals the completion of a document load.
    LSOutput
    This interface represents an output destination for data.
    LSParser
    An interface to an object that is able to build, or augment, a DOM tree from various input sources.
    LSParserFilter
    LSParserFilters provide applications the ability to examine nodes as they are being constructed while parsing.
    LSProgressEvent
    This interface represents a progress event object that notifies the application about progress as a document is parsed.
    LSResourceResolver
    LSResourceResolver provides a way for applications to redirect references to external resources.
    LSSerializer
    A LSSerializer provides an API for serializing (writing) a DOM document out into XML.
    LSSerializerFilter
    LSSerializerFilters provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not.
  • Exception Summary
    Exception Description
    LSException
    Parser or write operations may throw an LSException if the processing is stopped.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.ls Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.w3c.dom.ls

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.ls.LSException

Interface Hierarchy

  • org.w3c.dom.ls.DOMImplementationLS
  • org.w3c.dom.events.Event
    • org.w3c.dom.ls.LSLoadEvent
    • org.w3c.dom.ls.LSProgressEvent
  • org.w3c.dom.ls.LSInput
  • org.w3c.dom.ls.LSOutput
  • org.w3c.dom.ls.LSParser
  • org.w3c.dom.ls.LSParserFilter
  • org.w3c.dom.ls.LSResourceResolver
  • org.w3c.dom.ls.LSSerializer
  • org.w3c.dom.traversal.NodeFilter
    • org.w3c.dom.ls.LSSerializerFilter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.w3c.dom.ls

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.w3c.dom.ls

  • Packages that use org.w3c.dom.ls
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.w3c.dom.ls
  • Classes in org.w3c.dom.ls used by javax.xml.validation
    Class and Description
    LSResourceResolver
    LSResourceResolver provides a way for applications to redirect references to external resources.
  • Classes in org.w3c.dom.ls used by org.w3c.dom.ls
    Class and Description
    LSException
    Parser or write operations may throw an LSException if the processing is stopped.
    LSInput
    This interface represents an input source for data.
    LSOutput
    This interface represents an output destination for data.
    LSParser
    An interface to an object that is able to build, or augment, a DOM tree from various input sources.
    LSParserFilter
    LSParserFilters provide applications the ability to examine nodes as they are being constructed while parsing.
    LSSerializer
    A LSSerializer provides an API for serializing (writing) a DOM document out into XML.
    LSSerializerFilter
    LSSerializerFilters provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.w3c.dom.ls.LSException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.w3c.dom.ls.LSException

  • Packages that use LSException
    Package Description
    org.w3c.dom.ls

    • Uses of LSException in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that throw LSException
      Modifier and Type Method and Description
      Document LSParser.parse(LSInput input)
      Parse an XML document from a resource identified by a LSInput.
      Document LSParser.parseURI(String uri)
      Parse an XML document from a location identified by a URI reference [IETF RFC 2396].
      Node LSParser.parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
      boolean LSSerializer.write(Node nodeArg, LSOutput destination)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      String LSSerializer.writeToString(Node nodeArg)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      boolean LSSerializer.writeToURI(Node nodeArg, String uri)
      A convenience method that acts as if LSSerializer.write was called with a LSOutput with no encoding specified and LSOutput.systemId set to the uri argument.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.DOMImplementationLS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.DOMImplementationLS

No usage of org.w3c.dom.ls.DOMImplementationLS
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSInput

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSInput

  • Packages that use LSInput
    Package Description
    org.w3c.dom.ls

    • Uses of LSInput in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSInput
      Modifier and Type Method and Description
      LSInput DOMImplementationLS.createLSInput()
      Create a new empty input source object where LSInput.characterStream, LSInput.byteStream , LSInput.stringData LSInput.systemId, LSInput.publicId, LSInput.baseURI, and LSInput.encoding are null, and LSInput.certifiedText is false.
      LSInput LSLoadEvent.getInput()
      The input source that was parsed.
      LSInput LSProgressEvent.getInput()
      The input source that is being parsed.
      LSInput LSResourceResolver.resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
      Allow the application to resolve external resources.
      Methods in org.w3c.dom.ls with parameters of type LSInput
      Modifier and Type Method and Description
      Document LSParser.parse(LSInput input)
      Parse an XML document from a resource identified by a LSInput.
      Node LSParser.parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSLoadEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSLoadEvent

No usage of org.w3c.dom.ls.LSLoadEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSOutput

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSOutput

  • Packages that use LSOutput
    Package Description
    org.w3c.dom.ls

    • Uses of LSOutput in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSOutput
      Modifier and Type Method and Description
      LSOutput DOMImplementationLS.createLSOutput()
      Create a new empty output destination object where LSOutput.characterStream, LSOutput.byteStream, LSOutput.systemId, LSOutput.encoding are null.
      Methods in org.w3c.dom.ls with parameters of type LSOutput
      Modifier and Type Method and Description
      boolean LSSerializer.write(Node nodeArg, LSOutput destination)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSParser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSParser

  • Packages that use LSParser
    Package Description
    org.w3c.dom.ls

    • Uses of LSParser in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSParser
      Modifier and Type Method and Description
      LSParser DOMImplementationLS.createLSParser(short mode, String schemaType)
      Create a new LSParser.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSParserFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSParserFilter

  • Packages that use LSParserFilter
    Package Description
    org.w3c.dom.ls

    • Uses of LSParserFilter in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSParserFilter
      Modifier and Type Method and Description
      LSParserFilter LSParser.getFilter()
      When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.
      Methods in org.w3c.dom.ls with parameters of type LSParserFilter
      Modifier and Type Method and Description
      void LSParser.setFilter(LSParserFilter filter)
      When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSProgressEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSProgressEvent

No usage of org.w3c.dom.ls.LSProgressEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSResourceResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSResourceResolver

  • Packages that use LSResourceResolver
    Package Description
    javax.xml.validation
    This package provides an API for validation of XML documents.

    • Uses of LSResourceResolver in javax.xml.validation

      Methods in javax.xml.validation that return LSResourceResolver
      Modifier and Type Method and Description
      abstract LSResourceResolver ValidatorHandler.getResourceResolver()
      Gets the current LSResourceResolver set to this ValidatorHandler.
      abstract LSResourceResolver Validator.getResourceResolver()
      Gets the current LSResourceResolver set to this Validator.
      abstract LSResourceResolver SchemaFactory.getResourceResolver()
      Gets the current LSResourceResolver set to this SchemaFactory.
      Methods in javax.xml.validation with parameters of type LSResourceResolver
      Modifier and Type Method and Description
      abstract void ValidatorHandler.setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution while in a validation episode.
      abstract void Validator.setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution while in a validation episode.
      abstract void SchemaFactory.setResourceResolver(LSResourceResolver resourceResolver)
      Sets the LSResourceResolver to customize resource resolution when parsing schemas.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSSerializer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSSerializer

  • Packages that use LSSerializer
    Package Description
    org.w3c.dom.ls

    • Uses of LSSerializer in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSSerializer
      Modifier and Type Method and Description
      LSSerializer DOMImplementationLS.createLSSerializer()
      Create a new LSSerializer object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.ls.LSSerializerFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.ls.LSSerializerFilter

  • Packages that use LSSerializerFilter
    Package Description
    org.w3c.dom.ls

    • Uses of LSSerializerFilter in org.w3c.dom.ls

      Methods in org.w3c.dom.ls that return LSSerializerFilter
      Modifier and Type Method and Description
      LSSerializerFilter LSSerializer.getFilter()
      When the application provides a filter, the serializer will call out to the filter before serializing each Node.
      Methods in org.w3c.dom.ls with parameters of type LSSerializerFilter
      Modifier and Type Method and Description
      void LSSerializer.setFilter(LSSerializerFilter filter)
      When the application provides a filter, the serializer will call out to the filter before serializing each Node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DOMImplementationLS

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface DOMImplementationLS

  • public interface DOMImplementationLS
    DOMImplementationLS contains the factory methods for creating Load and Save objects.

    The expectation is that an instance of the DOMImplementationLS interface can be obtained by using binding-specific casting methods on an instance of the DOMImplementation interface or, if the Document supports the feature "Core" version "3.0" defined in [DOM Level 3 Core] , by using the method DOMImplementation.getFeature with parameter values "LS" (or "LS-Async") and "3.0" (respectively).

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short MODE_ASYNCHRONOUS
      Create an asynchronous LSParser.
      static short MODE_SYNCHRONOUS
      Create a synchronous LSParser.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LSInput createLSInput()
      Create a new empty input source object where LSInput.characterStream, LSInput.byteStream , LSInput.stringData LSInput.systemId, LSInput.publicId, LSInput.baseURI, and LSInput.encoding are null, and LSInput.certifiedText is false.
      LSOutput createLSOutput()
      Create a new empty output destination object where LSOutput.characterStream, LSOutput.byteStream, LSOutput.systemId, LSOutput.encoding are null.
      LSParser createLSParser(short mode, String schemaType)
      Create a new LSParser.
      LSSerializer createLSSerializer()
      Create a new LSSerializer object.

    • Field Detail

      • MODE_SYNCHRONOUS

        static final short MODE_SYNCHRONOUS
        Create a synchronous LSParser.
        See Also:
        Constant Field Values

      • MODE_ASYNCHRONOUS

        static final short MODE_ASYNCHRONOUS
        Create an asynchronous LSParser.
        See Also:
        Constant Field Values

    • Method Detail

      • createLSParser

        LSParser createLSParser(short mode,
                        String schemaType)
                 throws DOMException
        Create a new LSParser. The newly constructed parser may then be configured by means of its DOMConfiguration object, and used to parse documents by means of its parse method.
        Parameters:
        mode - The mode argument is either MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS, if mode is MODE_SYNCHRONOUS then the LSParser that is created will operate in synchronous mode, if it's MODE_ASYNCHRONOUS then the LSParser that is created will operate in asynchronous mode.
        schemaType - An absolute URI representing the type of the schema language used during the load of a Document using the newly created LSParser. Note that no lexical checking is done on the absolute URI. In order to create a LSParser for any kind of schema types (i.e. the LSParser will be free to use any schema found), use the value null.

        Note: For W3C XML Schema [XML Schema Part 1] , applications must use the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], applications must use the value "http://www.w3.org/TR/REC-xml". Other Schema languages are outside the scope of the W3C and therefore should recommend an absolute URI in order to use this method.

        Returns:
        The newly created LSParser object. This LSParser is either synchronous or asynchronous depending on the value of the mode argument.

        Note: By default, the newly created LSParser does not contain a DOMErrorHandler, i.e. the value of the " error-handler" configuration parameter is null. However, implementations may provide a default error handler at creation time. In that case, the initial value of the "error-handler" configuration parameter on the new LSParser object contains a reference to the default error handler.

        Throws:
        DOMException - NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is not supported.

      • createLSSerializer

        LSSerializer createLSSerializer()
        Create a new LSSerializer object.
        Returns:
        The newly created LSSerializer object.

        Note: By default, the newly created LSSerializer has no DOMErrorHandler, i.e. the value of the "error-handler" configuration parameter is null. However, implementations may provide a default error handler at creation time. In that case, the initial value of the "error-handler" configuration parameter on the new LSSerializer object contains a reference to the default error handler.

      • createLSInput

        LSInput createLSInput()
        Create a new empty input source object where LSInput.characterStream, LSInput.byteStream , LSInput.stringData LSInput.systemId, LSInput.publicId, LSInput.baseURI, and LSInput.encoding are null, and LSInput.certifiedText is false.
        Returns:
        The newly created input object.

      • createLSOutput

        LSOutput createLSOutput()
        Create a new empty output destination object where LSOutput.characterStream, LSOutput.byteStream, LSOutput.systemId, LSOutput.encoding are null.
        Returns:
        The newly created output object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Class LSException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.w3c.dom.ls.LSException
  • All Implemented Interfaces:
    Serializable

    public class LSException
extends RuntimeException
    Parser or write operations may throw an LSException if the processing is stopped. The processing can be stopped due to a DOMError with a severity of DOMError.SEVERITY_FATAL_ERROR or a non recovered DOMError.SEVERITY_ERROR, or if DOMErrorHandler.handleError() returned false.

    Note: As suggested in the definition of the constants in the DOMError interface, a DOM implementation may choose to continue after a fatal error, but the resulting DOM tree is then implementation dependent.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    See Also:
    Serialized Form

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      short | code
      static short PARSE_ERR
      If an attempt was made to load a document, or an XML Fragment, using LSParser and the processing has been stopped.
      static short SERIALIZE_ERR
      If an attempt was made to serialize a Node using LSSerializer and the processing has been stopped.

    • Constructor Summary

      Constructors
      Constructor and Description
      LSException(short code, String message)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Field Detail

      • code

        public short code

      • PARSE_ERR

        public static final short PARSE_ERR
        If an attempt was made to load a document, or an XML Fragment, using LSParser and the processing has been stopped.
        See Also:
        Constant Field Values

      • SERIALIZE_ERR

        public static final short SERIALIZE_ERR
        If an attempt was made to serialize a Node using LSSerializer and the processing has been stopped.
        See Also:
        Constant Field Values

    • Constructor Detail

      • LSException

        public LSException(short code,
                   String message)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSInput

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSInput

  • public interface LSInput
    This interface represents an input source for data.

    This interface allows an application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, a byte stream (possibly with a specified encoding), a base URI, and/or a character stream.

    The exact definitions of a byte stream and a character stream are binding dependent.

    The application is expected to provide objects that implement this interface whenever such objects are needed. The application can either provide its own objects that implement this interface, or it can use the generic factory method DOMImplementationLS.createLSInput() to create objects that implement this interface.

    The LSParser will use the LSInput object to determine how to read data. The LSParser will look at the different inputs specified in the LSInput in the following order to know which one to read from, the first one that is not null and not an empty string will be used:

    1. LSInput.characterStream
    2. LSInput.byteStream
    3. LSInput.stringData
    4. LSInput.systemId
    5. LSInput.publicId

    If all inputs are null, the LSParser will report a DOMError with its DOMError.type set to "no-input-specified" and its DOMError.severity set to DOMError.SEVERITY_FATAL_ERROR.

    LSInput objects belong to the application. The DOM implementation will never modify them (though it may make copies and modify the copies, if necessary).

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBaseURI()
      The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI.
      InputStream getByteStream()
      An attribute of a language and binding dependent type that represents a stream of bytes.
      boolean getCertifiedText()
      If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
      Reader getCharacterStream()
      An attribute of a language and binding dependent type that represents a stream of 16-bit units.
      String getEncoding()
      The character encoding, if known.
      String getPublicId()
      The public identifier for this input source.
      String getStringData()
      String data to parse.
      String getSystemId()
      The system identifier, a URI reference [IETF RFC 2396], for this input source.
      void setBaseURI(String baseURI)
      The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI.
      void setByteStream(InputStream byteStream)
      An attribute of a language and binding dependent type that represents a stream of bytes.
      void setCertifiedText(boolean certifiedText)
      If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
      void setCharacterStream(Reader characterStream)
      An attribute of a language and binding dependent type that represents a stream of 16-bit units.
      void setEncoding(String encoding)
      The character encoding, if known.
      void setPublicId(String publicId)
      The public identifier for this input source.
      void setStringData(String stringData)
      String data to parse.
      void setSystemId(String systemId)
      The system identifier, a URI reference [IETF RFC 2396], for this input source.

    • Method Detail

      • getCharacterStream

        Reader getCharacterStream()
        An attribute of a language and binding dependent type that represents a stream of 16-bit units. The application must encode the stream using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when using character streams. If an XML declaration is present, the value of the encoding attribute will be ignored.

      • setCharacterStream

        void setCharacterStream(Reader characterStream)
        An attribute of a language and binding dependent type that represents a stream of 16-bit units. The application must encode the stream using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when using character streams. If an XML declaration is present, the value of the encoding attribute will be ignored.

      • getByteStream

        InputStream getByteStream()
        An attribute of a language and binding dependent type that represents a stream of bytes.
        If the application knows the character encoding of the byte stream, it should set the encoding attribute. Setting the encoding in this way will override any encoding specified in an XML declaration in the data.

      • setByteStream

        void setByteStream(InputStream byteStream)
        An attribute of a language and binding dependent type that represents a stream of bytes.
        If the application knows the character encoding of the byte stream, it should set the encoding attribute. Setting the encoding in this way will override any encoding specified in an XML declaration in the data.

      • getStringData

        String getStringData()
        String data to parse. If provided, this will always be treated as a sequence of 16-bit units (UTF-16 encoded characters). It is not a requirement to have an XML declaration when using stringData. If an XML declaration is present, the value of the encoding attribute will be ignored.

      • setStringData

        void setStringData(String stringData)
        String data to parse. If provided, this will always be treated as a sequence of 16-bit units (UTF-16 encoded characters). It is not a requirement to have an XML declaration when using stringData. If an XML declaration is present, the value of the encoding attribute will be ignored.

      • getSystemId

        String getSystemId()
        The system identifier, a URI reference [IETF RFC 2396], for this input source. The system identifier is optional if there is a byte stream, a character stream, or string data. It is still useful to provide one, since the application will use it to resolve any relative URIs and can include it in error messages and warnings. (The LSParser will only attempt to fetch the resource identified by the URI reference if there is no other input available in the input source.)
        If the application knows the character encoding of the object pointed to by the system identifier, it can set the encoding using the encoding attribute.
        If the specified system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the DOM implementation will attempt to resolve the relative URI with the baseURI as the base, if that fails, the behavior is implementation dependent.

      • setSystemId

        void setSystemId(String systemId)
        The system identifier, a URI reference [IETF RFC 2396], for this input source. The system identifier is optional if there is a byte stream, a character stream, or string data. It is still useful to provide one, since the application will use it to resolve any relative URIs and can include it in error messages and warnings. (The LSParser will only attempt to fetch the resource identified by the URI reference if there is no other input available in the input source.)
        If the application knows the character encoding of the object pointed to by the system identifier, it can set the encoding using the encoding attribute.
        If the specified system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the DOM implementation will attempt to resolve the relative URI with the baseURI as the base, if that fails, the behavior is implementation dependent.

      • getPublicId

        String getPublicId()
        The public identifier for this input source. This may be mapped to an input source using an implementation dependent mechanism (such as catalogues or other mappings). The public identifier, if specified, may also be reported as part of the location information when errors are reported.

      • setPublicId

        void setPublicId(String publicId)
        The public identifier for this input source. This may be mapped to an input source using an implementation dependent mechanism (such as catalogues or other mappings). The public identifier, if specified, may also be reported as part of the location information when errors are reported.

      • getBaseURI

        String getBaseURI()
        The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI.
        If, when used, the base URI is itself a relative URI, an empty string, or null, the behavior is implementation dependent.

      • setBaseURI

        void setBaseURI(String baseURI)
        The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI.
        If, when used, the base URI is itself a relative URI, an empty string, or null, the behavior is implementation dependent.

      • getEncoding

        String getEncoding()
        The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities").
        This attribute has no effect when the application provides a character stream or string data. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML declaration or the Text declaration, or an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616].

      • setEncoding

        void setEncoding(String encoding)
        The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities").
        This attribute has no effect when the application provides a character stream or string data. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML declaration or the Text declaration, or an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616].

      • getCertifiedText

        boolean getCertifiedText()
        If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].

      • setCertifiedText

        void setCertifiedText(boolean certifiedText)
        If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSLoadEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSLoadEvent

  • All Superinterfaces:
    Event

    public interface LSLoadEvent
extends Event
    This interface represents a load event object that signals the completion of a document load.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.events.Event

        AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LSInput getInput()
      The input source that was parsed.
      Document getNewDocument()
      The document that finished loading.

      • Methods inherited from interface org.w3c.dom.events.Event

        getBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation

    • Method Detail

      • getNewDocument

        Document getNewDocument()
        The document that finished loading.

      • getInput

        LSInput getInput()
        The input source that was parsed.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSOutput

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSOutput

  • public interface LSOutput
    This interface represents an output destination for data.

    This interface allows an application to encapsulate information about an output destination in a single object, which may include a URI, a byte stream (possibly with a specified encoding), a base URI, and/or a character stream.

    The exact definitions of a byte stream and a character stream are binding dependent.

    The application is expected to provide objects that implement this interface whenever such objects are needed. The application can either provide its own objects that implement this interface, or it can use the generic factory method DOMImplementationLS.createLSOutput() to create objects that implement this interface.

    The LSSerializer will use the LSOutput object to determine where to serialize the output to. The LSSerializer will look at the different outputs specified in the LSOutput in the following order to know which one to output to, the first one that is not null and not an empty string will be used:

    1. LSOutput.characterStream
    2. LSOutput.byteStream
    3. LSOutput.systemId

    LSOutput objects belong to the application. The DOM implementation will never modify them (though it may make copies and modify the copies, if necessary).

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      OutputStream getByteStream()
      An attribute of a language and binding dependent type that represents a writable stream of bytes.
      Writer getCharacterStream()
      An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.
      String getEncoding()
      The character encoding to use for the output.
      String getSystemId()
      The system identifier, a URI reference [IETF RFC 2396], for this output destination.
      void setByteStream(OutputStream byteStream)
      An attribute of a language and binding dependent type that represents a writable stream of bytes.
      void setCharacterStream(Writer characterStream)
      An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.
      void setEncoding(String encoding)
      The character encoding to use for the output.
      void setSystemId(String systemId)
      The system identifier, a URI reference [IETF RFC 2396], for this output destination.

    • Method Detail

      • getCharacterStream

        Writer getCharacterStream()
        An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.

      • setCharacterStream

        void setCharacterStream(Writer characterStream)
        An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.

      • getByteStream

        OutputStream getByteStream()
        An attribute of a language and binding dependent type that represents a writable stream of bytes.

      • setByteStream

        void setByteStream(OutputStream byteStream)
        An attribute of a language and binding dependent type that represents a writable stream of bytes.

      • getSystemId

        String getSystemId()
        The system identifier, a URI reference [IETF RFC 2396], for this output destination.
        If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the behavior is implementation dependent.

      • setSystemId

        void setSystemId(String systemId)
        The system identifier, a URI reference [IETF RFC 2396], for this output destination.
        If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the behavior is implementation dependent.

      • getEncoding

        String getEncoding()
        The character encoding to use for the output. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities"), it is recommended that character encodings registered (as charsets) with the Internet Assigned Numbers Authority [IANA-CHARSETS] should be referred to using their registered names.

      • setEncoding

        void setEncoding(String encoding)
        The character encoding to use for the output. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities"), it is recommended that character encodings registered (as charsets) with the Internet Assigned Numbers Authority [IANA-CHARSETS] should be referred to using their registered names.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSParser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSParser

  • public interface LSParser
    An interface to an object that is able to build, or augment, a DOM tree from various input sources.

    LSParser provides an API for parsing XML and building the corresponding DOM document structure. A LSParser instance can be obtained by invoking the DOMImplementationLS.createLSParser() method.

    As specified in [DOM Level 3 Core] , when a document is first made available via the LSParser:

    • there will never be two adjacent nodes of type NODE_TEXT, and there will never be empty text nodes.
    • it is expected that the value and nodeValue attributes of an Attr node initially return the XML 1.0 normalized value. However, if the parameters " validate-if-schema" and " datatype-normalization" are set to true, depending on the attribute normalization used, the attribute values may differ from the ones obtained by the XML 1.0 attribute normalization. If the parameters " datatype-normalization" is set to false, the XML 1.0 attribute normalization is guaranteed to occur, and if the attributes list does not contain namespace declarations, the attributes attribute on Element node represents the property [attributes] defined in [XML Information Set] .

    Asynchronous LSParser objects are expected to also implement the events::EventTarget interface so that event listeners can be registered on asynchronous LSParser objects.

    Events supported by asynchronous LSParser objects are:

    load
    The LSParser finishes to load the document. See also the definition of the LSLoadEvent interface.
    progress
    The LSParser signals progress as data is parsed. This specification does not attempt to define exactly when progress events should be dispatched. That is intentionally left as implementation-dependent. Here is one example of how an application might dispatch progress events: Once the parser starts receiving data, a progress event is dispatched to indicate that the parsing starts. From there on, a progress event is dispatched for every 4096 bytes of data that is received and processed. This is only one example, though, and implementations can choose to dispatch progress events at any time while parsing, or not dispatch them at all. See also the definition of the LSProgressEvent interface.

    Note: All events defined in this specification use the namespace URI "http://www.w3.org/2002/DOMLS".

    While parsing an input source, errors are reported to the application through the error handler (LSParser.domConfig's " error-handler" parameter). This specification does in no way try to define all possible errors that can occur while parsing XML, or any other markup, but some common error cases are defined. The types (DOMError.type) of errors and warnings defined by this specification are:

    "check-character-normalization-failure" [error]
    Raised if the parameter " check-character-normalization" is set to true and a string is encountered that fails normalization checking.
    "doctype-not-allowed" [fatal]
    Raised if the configuration parameter "disallow-doctype" is set to true and a doctype is encountered.
    "no-input-specified" [fatal]
    Raised when loading a document and no input is specified in the LSInput object.
    "pi-base-uri-not-preserved" [warning]
    Raised if a processing instruction is encountered in a location where the base URI of the processing instruction can not be preserved. One example of a case where this warning will be raised is if the configuration parameter " entities" is set to false and the following XML file is parsed:
     <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]>
 <root> &e; </root>
    And subdir/myentity.ent contains:
    <one> <two/> </one> <?pi 3.14159?>
 <more/>
    "unbound-prefix-in-entity" [warning]
    An implementation dependent warning that may be raised if the configuration parameter " namespaces" is set to true and an unbound namespace prefix is encountered in an entity's replacement text. Raising this warning is not enforced since some existing parsers may not recognize unbound namespace prefixes in the replacement text of entities.
    "unknown-character-denormalization" [fatal]
    Raised if the configuration parameter "ignore-unknown-character-denormalizations" is set to false and a character is encountered for which the processor cannot determine the normalization properties.
    "unsupported-encoding" [fatal]
    Raised if an unsupported encoding is encountered.
    "unsupported-media-type" [fatal]
    Raised if the configuration parameter "supported-media-types-only" is set to true and an unsupported media type is encountered.

    In addition to raising the defined errors and warnings, implementations are expected to raise implementation specific errors and warnings for any other error and warning cases such as IO errors (file not found, permission denied,...), XML well-formedness errors, and so on.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short ACTION_APPEND_AS_CHILDREN
      Append the result of the parse operation as children of the context node.
      static short ACTION_INSERT_AFTER
      Insert the result of the parse operation as the immediately following sibling of the context node.
      static short ACTION_INSERT_BEFORE
      Insert the result of the parse operation as the immediately preceding sibling of the context node.
      static short ACTION_REPLACE
      Replace the context node with the result of the parse operation.
      static short ACTION_REPLACE_CHILDREN
      Replace all the children of the context node with the result of the parse operation.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void abort()
      Abort the loading of the document that is currently being loaded by the LSParser.
      boolean getAsync()
      true if the LSParser is asynchronous, false if it is synchronous.
      boolean getBusy()
      true if the LSParser is currently busy loading a document, otherwise false.
      DOMConfiguration getDomConfig()
      The DOMConfiguration object used when parsing an input source.
      LSParserFilter getFilter()
      When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.
      Document parse(LSInput input)
      Parse an XML document from a resource identified by a LSInput.
      Document parseURI(String uri)
      Parse an XML document from a location identified by a URI reference [IETF RFC 2396].
      Node parseWithContext(LSInput input, Node contextArg, short action)
      Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments.
      void setFilter(LSParserFilter filter)
      When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.

    • Field Detail

      • ACTION_APPEND_AS_CHILDREN

        static final short ACTION_APPEND_AS_CHILDREN
        Append the result of the parse operation as children of the context node. For this action to work, the context node must be an Element or a DocumentFragment.
        See Also:
        Constant Field Values

      • ACTION_REPLACE_CHILDREN

        static final short ACTION_REPLACE_CHILDREN
        Replace all the children of the context node with the result of the parse operation. For this action to work, the context node must be an Element, a Document, or a DocumentFragment.
        See Also:
        Constant Field Values

      • ACTION_INSERT_BEFORE

        static final short ACTION_INSERT_BEFORE
        Insert the result of the parse operation as the immediately preceding sibling of the context node. For this action to work the context node's parent must be an Element or a DocumentFragment.
        See Also:
        Constant Field Values

      • ACTION_INSERT_AFTER

        static final short ACTION_INSERT_AFTER
        Insert the result of the parse operation as the immediately following sibling of the context node. For this action to work the context node's parent must be an Element or a DocumentFragment.
        See Also:
        Constant Field Values

      • ACTION_REPLACE

        static final short ACTION_REPLACE
        Replace the context node with the result of the parse operation. For this action to work, the context node must have a parent, and the parent must be an Element or a DocumentFragment.
        See Also:
        Constant Field Values

    • Method Detail

      • getDomConfig

        DOMConfiguration getDomConfig()
        The DOMConfiguration object used when parsing an input source. This DOMConfiguration is specific to the parse operation. No parameter values from this DOMConfiguration object are passed automatically to the DOMConfiguration object on the Document that is created, or used, by the parse operation. The DOM application is responsible for passing any needed parameter values from this DOMConfiguration object to the DOMConfiguration object referenced by the Document object.
        In addition to the parameters recognized in on the DOMConfiguration interface defined in [DOM Level 3 Core] , the DOMConfiguration objects for LSParser add or modify the following parameters:
        "charset-overrides-xml-encoding"
        true
        [optional] (default) If a higher level protocol such as HTTP [IETF RFC 2616] provides an indication of the character encoding of the input stream being processed, that will override any encoding specified in the XML declaration or the Text declaration (see also section 4.3.3, "Character Encoding in Entities", in [XML 1.0]). Explicitly setting an encoding in the LSInput overrides any encoding from the protocol.
        false
        [required] The parser ignores any character set encoding information from higher-level protocols.
        "disallow-doctype"
        true
        [optional] Throw a fatal "doctype-not-allowed" error if a doctype node is found while parsing the document. This is useful when dealing with things like SOAP envelopes where doctype nodes are not allowed.
        false
        [required] (default) Allow doctype nodes in the document.
        "ignore-unknown-character-denormalizations"
        true
        [required] (default) If, while verifying full normalization when [XML 1.1] is supported, a processor encounters characters for which it cannot determine the normalization properties, then the processor will ignore any possible denormalizations caused by these characters. This parameter is ignored for [XML 1.0].
        false
        [optional] Report an fatal "unknown-character-denormalization" error if a character is encountered for which the processor cannot determine the normalization properties.
        "infoset"
        See the definition of DOMConfiguration for a description of this parameter. Unlike in [DOM Level 3 Core] , this parameter will default to true for LSParser.
        "namespaces"
        true
        [required] (default) Perform the namespace processing as defined in [XML Namespaces] and [XML Namespaces 1.1] .
        false
        [optional] Do not perform the namespace processing.
        "resource-resolver"
        [required] A reference to a LSResourceResolver object, or null. If the value of this parameter is not null when an external resource (such as an external XML entity or an XML schema location) is encountered, the implementation will request that the LSResourceResolver referenced in this parameter resolves the resource.
        "supported-media-types-only"
        true
        [optional] Check that the media type of the parsed resource is a supported media type. If an unsupported media type is encountered, a fatal error of type "unsupported-media-type" will be raised. The media types defined in [IETF RFC 3023] must always be accepted.
        false
        [required] (default) Accept any media type.
        "validate"
        See the definition of DOMConfiguration for a description of this parameter. Unlike in [DOM Level 3 Core] , the processing of the internal subset is always accomplished, even if this parameter is set to false.
        "validate-if-schema"
        See the definition of DOMConfiguration for a description of this parameter. Unlike in [DOM Level 3 Core] , the processing of the internal subset is always accomplished, even if this parameter is set to false.
        "well-formed"
        See the definition of DOMConfiguration for a description of this parameter. Unlike in [DOM Level 3 Core] , this parameter cannot be set to false.

      • getFilter

        LSParserFilter getFilter()
        When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure. The filter can choose to remove elements from the document being constructed, or to terminate the parsing early.
        The filter is invoked after the operations requested by the DOMConfiguration parameters have been applied. For example, if " validate" is set to true, the validation is done before invoking the filter.

      • setFilter

        void setFilter(LSParserFilter filter)
        When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure. The filter can choose to remove elements from the document being constructed, or to terminate the parsing early.
        The filter is invoked after the operations requested by the DOMConfiguration parameters have been applied. For example, if " validate" is set to true, the validation is done before invoking the filter.

      • getAsync

        boolean getAsync()
        true if the LSParser is asynchronous, false if it is synchronous.

      • getBusy

        boolean getBusy()
        true if the LSParser is currently busy loading a document, otherwise false.

      • parse

        Document parse(LSInput input)
        throws DOMException,
               LSException
        Parse an XML document from a resource identified by a LSInput.
        Parameters:
        input - The LSInput from which the source of the document is to be read.
        Returns:
        If the LSParser is a synchronous LSParser, the newly created and populated Document is returned. If the LSParser is asynchronous, null is returned since the document object may not yet be constructed when this method returns.
        Throws:
        DOMException - INVALID_STATE_ERR: Raised if the LSParser's LSParser.busy attribute is true.
        LSException - PARSE_ERR: Raised if the LSParser was unable to load the XML document. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.

      • parseURI

        Document parseURI(String uri)
           throws DOMException,
                  LSException
        Parse an XML document from a location identified by a URI reference [IETF RFC 2396]. If the URI contains a fragment identifier (see section 4.1 in [IETF RFC 2396]), the behavior is not defined by this specification, future versions of this specification may define the behavior.
        Parameters:
        uri - The location of the XML document to be read.
        Returns:
        If the LSParser is a synchronous LSParser, the newly created and populated Document is returned, or null if an error occured. If the LSParser is asynchronous, null is returned since the document object may not yet be constructed when this method returns.
        Throws:
        DOMException - INVALID_STATE_ERR: Raised if the LSParser.busy attribute is true.
        LSException - PARSE_ERR: Raised if the LSParser was unable to load the XML document. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.

      • parseWithContext

        Node parseWithContext(LSInput input,
                      Node contextArg,
                      short action)
               throws DOMException,
                      LSException
        Parse an XML fragment from a resource identified by a LSInput and insert the content into an existing document at the position specified with the context and action arguments. When parsing the input stream, the context node (or its parent, depending on where the result will be inserted) is used for resolving unbound namespace prefixes. The context node's ownerDocument node (or the node itself if the node of type DOCUMENT_NODE) is used to resolve default attributes and entity references.
        As the new data is inserted into the document, at least one mutation event is fired per new immediate child or sibling of the context node.
        If the context node is a Document node and the action is ACTION_REPLACE_CHILDREN, then the document that is passed as the context node will be changed such that its xmlEncoding, documentURI, xmlVersion, inputEncoding, xmlStandalone, and all other such attributes are set to what they would be set to if the input source was parsed using LSParser.parse().
        This method is always synchronous, even if the LSParser is asynchronous (LSParser.async is true).
        If an error occurs while parsing, the caller is notified through the ErrorHandler instance associated with the " error-handler" parameter of the DOMConfiguration.
        When calling parseWithContext, the values of the following configuration parameters will be ignored and their default values will always be used instead: " validate", " validate-if-schema", and " element-content-whitespace". Other parameters will be treated normally, and the parser is expected to call the LSParserFilter just as if a whole document was parsed.
        Parameters:
        input - The LSInput from which the source document is to be read. The source document must be an XML fragment, i.e. anything except a complete XML document (except in the case where the context node of type DOCUMENT_NODE, and the action is ACTION_REPLACE_CHILDREN), a DOCTYPE (internal subset), entity declaration(s), notation declaration(s), or XML or text declaration(s).
        contextArg - The node that is used as the context for the data that is being parsed. This node must be a Document node, a DocumentFragment node, or a node of a type that is allowed as a child of an Element node, e.g. it cannot be an Attribute node.
        action - This parameter describes which action should be taken between the new set of nodes being inserted and the existing children of the context node. The set of possible actions is defined in ACTION_TYPES above.
        Returns:
        Return the node that is the result of the parse operation. If the result is more than one top-level node, the first one is returned.
        Throws:
        DOMException - HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be inserted before, after, or as a child of the context node (see also Node.insertBefore or Node.replaceChild in [DOM Level 3 Core] ).
        NOT_SUPPORTED_ERR: Raised if the LSParser doesn't support this method, or if the context node is of type Document and the DOM implementation doesn't support the replacement of the DocumentType child or Element child.
        NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a read only node and the content is being appended to its child list, or if the parent node of the context node is read only node and the content is being inserted in its child list.
        INVALID_STATE_ERR: Raised if the LSParser.busy attribute is true.
        LSException - PARSE_ERR: Raised if the LSParser was unable to load the XML fragment. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.

      • abort

        void abort()
        Abort the loading of the document that is currently being loaded by the LSParser. If the LSParser is currently not busy, a call to this method does nothing.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSParserFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSParserFilter

  • public interface LSParserFilter
    LSParserFilters provide applications the ability to examine nodes as they are being constructed while parsing. As each node is examined, it may be modified or removed, or the entire parse may be terminated early.

    At the time any of the filter methods are called by the parser, the owner Document and DOMImplementation objects exist and are accessible. The document element is never passed to the LSParserFilter methods, i.e. it is not possible to filter out the document element. Document, DocumentType, Notation, Entity, and Attr nodes are never passed to the acceptNode method on the filter. The child nodes of an EntityReference node are passed to the filter if the parameter " entities" is set to false. Note that, as described by the parameter " entities", unexpanded entity reference nodes are never discarded and are always passed to the filter.

    All validity checking while parsing a document occurs on the source document as it appears on the input stream, not on the DOM document as it is built in memory. With filters, the document in memory may be a subset of the document on the stream, and its validity may have been affected by the filtering.

    All default attributes must be present on elements when the elements are passed to the filter methods. All other default content must be passed to the filter methods.

    DOM applications must not raise exceptions in a filter. The effect of throwing exceptions from a filter is DOM implementation dependent.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short FILTER_ACCEPT
      Accept the node.
      static short FILTER_INTERRUPT
      Interrupt the normal processing of the document.
      static short FILTER_REJECT
      Reject the node and its children.
      static short FILTER_SKIP
      Skip this single node.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      short acceptNode(Node nodeArg)
      This method will be called by the parser at the completion of the parsing of each node.
      int getWhatToShow()
      Tells the LSParser what types of nodes to show to the method LSParserFilter.acceptNode.
      short startElement(Element elementArg)
      The parser will call this method after each Element start tag has been scanned, but before the remainder of the Element is processed.

    • Field Detail

      • FILTER_ACCEPT

        static final short FILTER_ACCEPT
        Accept the node.
        See Also:
        Constant Field Values

      • FILTER_REJECT

        static final short FILTER_REJECT
        Reject the node and its children.
        See Also:
        Constant Field Values

      • FILTER_SKIP

        static final short FILTER_SKIP
        Skip this single node. The children of this node will still be considered.
        See Also:
        Constant Field Values

      • FILTER_INTERRUPT

        static final short FILTER_INTERRUPT
        Interrupt the normal processing of the document.
        See Also:
        Constant Field Values

    • Method Detail

      • startElement

        short startElement(Element elementArg)
        The parser will call this method after each Element start tag has been scanned, but before the remainder of the Element is processed. The intent is to allow the element, including any children, to be efficiently skipped. Note that only element nodes are passed to the startElement function.
        The element node passed to startElement for filtering will include all of the Element's attributes, but none of the children nodes. The Element may not yet be in place in the document being constructed (it may not have a parent node.)
        A startElement filter function may access or change the attributes for the Element. Changing Namespace declarations will have no effect on namespace resolution by the parser.
        For efficiency, the Element node passed to the filter may not be the same one as is actually placed in the tree if the node is accepted. And the actual node (node object identity) may be reused during the process of reading in and filtering a document.
        Parameters:
        elementArg - The newly encountered element. At the time this method is called, the element is incomplete - it will have its attributes, but no children.
        Returns:
        • FILTER_ACCEPT if the Element should be included in the DOM document being built.
        • FILTER_REJECT if the Element and all of its children should be rejected.
        • FILTER_SKIP if the Element should be skipped. All of its children are inserted in place of the skipped Element node.
        • FILTER_INTERRUPT if the filter wants to stop the processing of the document. Interrupting the processing of the document does no longer guarantee that the resulting DOM tree is XML well-formed. The Element is rejected.
        Returning any other values will result in unspecified behavior.

      • acceptNode

        short acceptNode(Node nodeArg)
        This method will be called by the parser at the completion of the parsing of each node. The node and all of its descendants will exist and be complete. The parent node will also exist, although it may be incomplete, i.e. it may have additional children that have not yet been parsed. Attribute nodes are never passed to this function.
        From within this method, the new node may be freely modified - children may be added or removed, text nodes modified, etc. The state of the rest of the document outside this node is not defined, and the affect of any attempt to navigate to, or to modify any other part of the document is undefined.
        For validating parsers, the checks are made on the original document, before any modification by the filter. No validity checks are made on any document modifications made by the filter.
        If this new node is rejected, the parser might reuse the new node and any of its descendants.
        Parameters:
        nodeArg - The newly constructed element. At the time this method is called, the element is complete - it has all of its children (and their children, recursively) and attributes, and is attached as a child to its parent.
        Returns:
        • FILTER_ACCEPT if this Node should be included in the DOM document being built.
        • FILTER_REJECT if the Node and all of its children should be rejected.
        • FILTER_SKIP if the Node should be skipped and the Node should be replaced by all the children of the Node.
        • FILTER_INTERRUPT if the filter wants to stop the processing of the document. Interrupting the processing of the document does no longer guarantee that the resulting DOM tree is XML well-formed. The Node is accepted and will be the last completely parsed node.

      • getWhatToShow

        int getWhatToShow()
        Tells the LSParser what types of nodes to show to the method LSParserFilter.acceptNode. If a node is not shown to the filter using this attribute, it is automatically included in the DOM document being built. See NodeFilter for definition of the constants. The constants SHOW_ATTRIBUTE , SHOW_DOCUMENT, SHOW_DOCUMENT_TYPE, SHOW_NOTATION, SHOW_ENTITY, and SHOW_DOCUMENT_FRAGMENT are meaningless here. Those nodes will never be passed to LSParserFilter.acceptNode.
        The constants used here are defined in [DOM Level 2 Traversal and Range] .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSProgressEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSProgressEvent

  • All Superinterfaces:
    Event

    public interface LSProgressEvent
extends Event
    This interface represents a progress event object that notifies the application about progress as a document is parsed. It extends the Event interface defined in [DOM Level 3 Events] .

    The units used for the attributes position and totalSize are not specified and can be implementation and input dependent.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.events.Event

        AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LSInput getInput()
      The input source that is being parsed.
      int getPosition()
      The current position in the input source, including all external entities and other resources that have been read.
      int getTotalSize()
      The total size of the document including all external resources, this number might change as a document is being parsed if references to more external resources are seen.

      • Methods inherited from interface org.w3c.dom.events.Event

        getBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation

    • Method Detail

      • getInput

        LSInput getInput()
        The input source that is being parsed.

      • getPosition

        int getPosition()
        The current position in the input source, including all external entities and other resources that have been read.

      • getTotalSize

        int getTotalSize()
        The total size of the document including all external resources, this number might change as a document is being parsed if references to more external resources are seen. A value of 0 is returned if the total size cannot be determined or estimated.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSResourceResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSResourceResolver

  • public interface LSResourceResolver
    LSResourceResolver provides a way for applications to redirect references to external resources.

    Applications needing to implement custom handling for external resources can implement this interface and register their implementation by setting the "resource-resolver" parameter of DOMConfiguration objects attached to LSParser and LSSerializer. It can also be register on DOMConfiguration objects attached to Document if the "LS" feature is supported.

    The LSParser will then allow the application to intercept any external entities, including the external DTD subset and external parameter entities, before including them. The top-level document entity is never passed to the resolveResource method.

    Many DOM applications will not need to implement this interface, but it will be especially useful for applications that build XML documents from databases or other specialized input sources, or for applications that use URNs.

    Note: LSResourceResolver is based on the SAX2 [SAX] EntityResolver interface.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
      Allow the application to resolve external resources.

    • Method Detail

      • resolveResource

        LSInput resolveResource(String type,
                        String namespaceURI,
                        String publicId,
                        String systemId,
                        String baseURI)
        Allow the application to resolve external resources.
        The LSParser will call this method before opening any external resource, including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element (however, the top-level document entity is not passed to this method). The application may then request that the LSParser resolve the external resource itself, that it use an alternative URI, or that it use an entirely different input source.
        Application writers can use this method to redirect external system identifiers to secure and/or local URI, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box).
        Parameters:
        type - The type of the resource being resolved. For XML [XML 1.0] resources (i.e. entities), applications must use the value "http://www.w3.org/TR/REC-xml". For XML Schema [XML Schema Part 1] , applications must use the value "http://www.w3.org/2001/XMLSchema". Other types of resources are outside the scope of this specification and therefore should recommend an absolute URI in order to use this method.
        namespaceURI - The namespace of the resource being resolved, e.g. the target namespace of the XML Schema [XML Schema Part 1] when resolving XML Schema resources.
        publicId - The public identifier of the external entity being referenced, or null if no public identifier was supplied or if the resource is not an entity.
        systemId - The system identifier, a URI reference [IETF RFC 2396], of the external resource being referenced, or null if no system identifier was supplied.
        baseURI - The absolute base URI of the resource being parsed, or null if there is no base URI.
        Returns:
        A LSInput object describing the new input source, or null to request that the parser open a regular URI connection to the resource.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSSerializer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSSerializer

  • public interface LSSerializer
    A LSSerializer provides an API for serializing (writing) a DOM document out into XML. The XML data is written to a string or an output stream. Any changes or fixups made during the serialization affect only the serialized data. The Document object and its children are never altered by the serialization operation.

    During serialization of XML data, namespace fixup is done as defined in [DOM Level 3 Core] , Appendix B. [DOM Level 2 Core] allows empty strings as a real namespace URI. If the namespaceURI of a Node is empty string, the serialization will treat them as null, ignoring the prefix if any.

    LSSerializer accepts any node type for serialization. For nodes of type Document or Entity, well-formed XML will be created when possible (well-formedness is guaranteed if the document or entity comes from a parse operation and is unchanged since it was created). The serialized output for these node types is either as a XML document or an External XML Entity, respectively, and is acceptable input for an XML parser. For all other types of nodes the serialized form is implementation dependent.

    Within a Document, DocumentFragment, or Entity being serialized, Nodes are processed as follows

    • Document nodes are written, including the XML declaration (unless the parameter "xml-declaration" is set to false) and a DTD subset, if one exists in the DOM. Writing a Document node serializes the entire document.
    • Entity nodes, when written directly by LSSerializer.write, outputs the entity expansion but no namespace fixup is done. The resulting output will be valid as an external entity.
    • If the parameter " entities" is set to true, EntityReference nodes are serialized as an entity reference of the form " &entityName;" in the output. Child nodes (the expansion) of the entity reference are ignored. If the parameter " entities" is set to false, only the children of the entity reference are serialized. EntityReference nodes with no children (no corresponding Entity node or the corresponding Entity nodes have no children) are always serialized.
    • CDATAsections containing content characters that cannot be represented in the specified output encoding are handled according to the " split-cdata-sections" parameter. If the parameter is set to true, CDATAsections are split, and the unrepresentable characters are serialized as numeric character references in ordinary content. The exact position and number of splits is not specified. If the parameter is set to false, unrepresentable characters in a CDATAsection are reported as "wf-invalid-character" errors if the parameter " well-formed" is set to true. The error is not recoverable - there is no mechanism for supplying alternative characters and continuing with the serialization.
    • DocumentFragment nodes are serialized by serializing the children of the document fragment in the order they appear in the document fragment.
    • All other node types (Element, Text, etc.) are serialized to their corresponding XML source form.

    Note: The serialization of a Node does not always generate a well-formed XML document, i.e. a LSParser might throw fatal errors when parsing the resulting serialization.

    Within the character data of a document (outside of markup), any characters that cannot be represented directly are replaced with character references. Occurrences of '<' and '&' are replaced by the predefined entities &lt; and &amp;. The other predefined entities (&gt;, &apos;, and &quot;) might not be used, except where needed (e.g. using &gt; in cases such as ']]>'). Any characters that cannot be represented directly in the output character encoding are serialized as numeric character references (and since character encoding standards commonly use hexadecimal representations of characters, using the hexadecimal representation when serializing character references is encouraged).

    To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as "&apos;", and the double-quote character (") as "&quot;". New line characters and other characters that cannot be represented directly in attribute values in the output character encoding are serialized as a numeric character reference.

    Within markup, but outside of attributes, any occurrence of a character that cannot be represented in the output character encoding is reported as a DOMError fatal error. An example would be serializing the element <LaCañada/> with encoding="us-ascii". This will result with a generation of a DOMError "wf-invalid-character-in-node-name" (as proposed in " well-formed").

    When requested by setting the parameter " normalize-characters" on LSSerializer to true, character normalization is performed according to the definition of fully normalized characters included in appendix E of [XML 1.1] on all data to be serialized, both markup and character data. The character normalization process affects only the data as it is being written; it does not alter the DOM's view of the document after serialization has completed.

    Implementations are required to support the encodings "UTF-8", "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is serializable in all encodings that are required to be supported by all XML parsers. When the encoding is UTF-8, whether or not a byte order mark is serialized, or if the output is big-endian or little-endian, is implementation dependent. When the encoding is UTF-16, whether or not the output is big-endian or little-endian is implementation dependent, but a Byte Order Mark must be generated for non-character outputs, such as LSOutput.byteStream or LSOutput.systemId. If the Byte Order Mark is not generated, a "byte-order-mark-needed" warning is reported. When the encoding is UTF-16LE or UTF-16BE, the output is big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark is not be generated. In all cases, the encoding declaration, if generated, will correspond to the encoding used during the serialization (e.g. encoding="UTF-16" will appear if UTF-16 was requested).

    Namespaces are fixed up during serialization, the serialization process will verify that namespace declarations, namespace prefixes and the namespace URI associated with elements and attributes are consistent. If inconsistencies are found, the serialized form of the document will be altered to remove them. The method used for doing the namespace fixup while serializing a document is the algorithm defined in Appendix B.1, "Namespace normalization", of [DOM Level 3 Core] .

    While serializing a document, the parameter "discard-default-content" controls whether or not non-specified data is serialized.

    While serializing, errors and warnings are reported to the application through the error handler (LSSerializer.domConfig's " error-handler" parameter). This specification does in no way try to define all possible errors and warnings that can occur while serializing a DOM node, but some common error and warning cases are defined. The types ( DOMError.type) of errors and warnings defined by this specification are:

    "no-output-specified" [fatal]
    Raised when writing to a LSOutput if no output is specified in the LSOutput.
    "unbound-prefix-in-entity-reference" [fatal]
    Raised if the configuration parameter " namespaces" is set to true and an entity whose replacement text contains unbound namespace prefixes is referenced in a location where there are no bindings for the namespace prefixes.
    "unsupported-encoding" [fatal]
    Raised if an unsupported encoding is encountered.

    In addition to raising the defined errors and warnings, implementations are expected to raise implementation specific errors and warnings for any other error and warning cases such as IO errors (file not found, permission denied,...) and so on.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DOMConfiguration getDomConfig()
      The DOMConfiguration object used by the LSSerializer when serializing a DOM node.
      LSSerializerFilter getFilter()
      When the application provides a filter, the serializer will call out to the filter before serializing each Node.
      String getNewLine()
      The end-of-line sequence of characters to be used in the XML being written out.
      void setFilter(LSSerializerFilter filter)
      When the application provides a filter, the serializer will call out to the filter before serializing each Node.
      void setNewLine(String newLine)
      The end-of-line sequence of characters to be used in the XML being written out.
      boolean write(Node nodeArg, LSOutput destination)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      String writeToString(Node nodeArg)
      Serialize the specified node as described above in the general description of the LSSerializer interface.
      boolean writeToURI(Node nodeArg, String uri)
      A convenience method that acts as if LSSerializer.write was called with a LSOutput with no encoding specified and LSOutput.systemId set to the uri argument.

    • Method Detail

      • getDomConfig

        DOMConfiguration getDomConfig()
        The DOMConfiguration object used by the LSSerializer when serializing a DOM node.
        In addition to the parameters recognized by the DOMConfiguration interface defined in [DOM Level 3 Core] , the DOMConfiguration objects for LSSerializer adds, or modifies, the following parameters:
        "canonical-form"
        true
        [optional] Writes the document according to the rules specified in [Canonical XML]. In addition to the behavior described in " canonical-form" [DOM Level 3 Core] , setting this parameter to true will set the parameters "format-pretty-print", "discard-default-content", and "xml-declaration ", to false. Setting one of those parameters to true will set this parameter to false. Serializing an XML 1.1 document when "canonical-form" is true will generate a fatal error.
        false
        [required] (default) Do not canonicalize the output.
        "discard-default-content"
        true
        [required] (default) Use the Attr.specified attribute to decide what attributes should be discarded. Note that some implementations might use whatever information available to the implementation (i.e. XML schema, DTD, the Attr.specified attribute, and so on) to determine what attributes and content to discard if this parameter is set to true.
        false
        [required]Keep all attributes and all content.
        "format-pretty-print"
        true
        [optional] Formatting the output by adding whitespace to produce a pretty-printed, indented, human-readable form. The exact form of the transformations is not specified by this specification. Pretty-printing changes the content of the document and may affect the validity of the document, validating implementations should preserve validity.
        false
        [required] (default) Don't pretty-print the result.
        "ignore-unknown-character-denormalizations"
        true
        [required] (default) If, while verifying full normalization when [XML 1.1] is supported, a character is encountered for which the normalization properties cannot be determined, then raise a "unknown-character-denormalization" warning (instead of raising an error, if this parameter is not set) and ignore any possible denormalizations caused by these characters.
        false
        [optional] Report a fatal error if a character is encountered for which the processor cannot determine the normalization properties.
        "normalize-characters"
        This parameter is equivalent to the one defined by DOMConfiguration in [DOM Level 3 Core] . Unlike in the Core, the default value for this parameter is true. While DOM implementations are not required to support fully normalizing the characters in the document according to appendix E of [XML 1.1], this parameter must be activated by default if supported.
        "xml-declaration"
        true
        [required] (default) If a Document, Element, or Entity node is serialized, the XML declaration, or text declaration, should be included. The version (Document.xmlVersion if the document is a Level 3 document and the version is non-null, otherwise use the value "1.0"), and the output encoding (see LSSerializer.write for details on how to find the output encoding) are specified in the serialized XML declaration.
        false
        [required] Do not serialize the XML and text declarations. Report a "xml-declaration-needed" warning if this will cause problems (i.e. the serialized data is of an XML version other than [XML 1.0], or an encoding would be needed to be able to re-parse the serialized data).

      • getNewLine

        String getNewLine()
        The end-of-line sequence of characters to be used in the XML being written out. Any string is supported, but XML treats only a certain set of characters sequence as end-of-line (See section 2.11, "End-of-Line Handling" in [XML 1.0], if the serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" in [XML 1.1], if the serialized content is XML 1.1). Using other character sequences than the recommended ones can result in a document that is either not serializable or not well-formed).
        On retrieval, the default value of this attribute is the implementation specific default end-of-line sequence. DOM implementations should choose the default to match the usual convention for text files in the environment being used. Implementations must choose a default sequence that matches one of those allowed by XML 1.0 or XML 1.1, depending on the serialized content. Setting this attribute to null will reset its value to the default value.

      • setNewLine

        void setNewLine(String newLine)
        The end-of-line sequence of characters to be used in the XML being written out. Any string is supported, but XML treats only a certain set of characters sequence as end-of-line (See section 2.11, "End-of-Line Handling" in [XML 1.0], if the serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" in [XML 1.1], if the serialized content is XML 1.1). Using other character sequences than the recommended ones can result in a document that is either not serializable or not well-formed).
        On retrieval, the default value of this attribute is the implementation specific default end-of-line sequence. DOM implementations should choose the default to match the usual convention for text files in the environment being used. Implementations must choose a default sequence that matches one of those allowed by XML 1.0 or XML 1.1, depending on the serialized content. Setting this attribute to null will reset its value to the default value.

      • getFilter

        LSSerializerFilter getFilter()
        When the application provides a filter, the serializer will call out to the filter before serializing each Node. The filter implementation can choose to remove the node from the stream or to terminate the serialization early.
        The filter is invoked after the operations requested by the DOMConfiguration parameters have been applied. For example, CDATA sections won't be passed to the filter if " cdata-sections" is set to false.

      • setFilter

        void setFilter(LSSerializerFilter filter)
        When the application provides a filter, the serializer will call out to the filter before serializing each Node. The filter implementation can choose to remove the node from the stream or to terminate the serialization early.
        The filter is invoked after the operations requested by the DOMConfiguration parameters have been applied. For example, CDATA sections won't be passed to the filter if " cdata-sections" is set to false.

      • write

        boolean write(Node nodeArg,
              LSOutput destination)
       throws LSException
        Serialize the specified node as described above in the general description of the LSSerializer interface. The output is written to the supplied LSOutput.
        When writing to a LSOutput, the encoding is found by looking at the encoding information that is reachable through the LSOutput and the item to be written (or its owner document) in this order:
        1. LSOutput.encoding,
        2. Document.inputEncoding,
        3. Document.xmlEncoding.

        If no encoding is reachable through the above properties, a default encoding of "UTF-8" will be used. If the specified encoding is not supported an "unsupported-encoding" fatal error is raised.
        If no output is specified in the LSOutput, a "no-output-specified" fatal error is raised.
        The implementation is responsible of associating the appropriate media type with the serialized data.
        When writing to a HTTP URI, a HTTP PUT is performed. When writing to other types of URIs, the mechanism for writing the data to the URI is implementation dependent.
        Parameters:
        nodeArg - The node to serialize.
        destination - The destination for the serialized DOM.
        Returns:
        Returns true if node was successfully serialized. Return false in case the normal processing stopped but the implementation kept serializing the document; the result of the serialization being implementation dependent then.
        Throws:
        LSException - SERIALIZE_ERR: Raised if the LSSerializer was unable to serialize the node. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.

      • writeToURI

        boolean writeToURI(Node nodeArg,
                   String uri)
            throws LSException
        A convenience method that acts as if LSSerializer.write was called with a LSOutput with no encoding specified and LSOutput.systemId set to the uri argument.
        Parameters:
        nodeArg - The node to serialize.
        uri - The URI to write to.
        Returns:
        Returns true if node was successfully serialized. Return false in case the normal processing stopped but the implementation kept serializing the document; the result of the serialization being implementation dependent then.
        Throws:
        LSException - SERIALIZE_ERR: Raised if the LSSerializer was unable to serialize the node. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.

      • writeToString

        String writeToString(Node nodeArg)
              throws DOMException,
                     LSException
        Serialize the specified node as described above in the general description of the LSSerializer interface. The output is written to a DOMString that is returned to the caller. The encoding used is the encoding of the DOMString type, i.e. UTF-16. Note that no Byte Order Mark is generated in a DOMString object.
        Parameters:
        nodeArg - The node to serialize.
        Returns:
        Returns the serialized data.
        Throws:
        DOMException - DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to fit in a DOMString.
        LSException - SERIALIZE_ERR: Raised if the LSSerializer was unable to serialize the node. DOM applications should attach a DOMErrorHandler using the parameter " error-handler" if they wish to get details on the error.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LSSerializerFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.ls

Interface LSSerializerFilter

  • All Superinterfaces:
    org.w3c.dom.traversal.NodeFilter

    public interface LSSerializerFilter
extends org.w3c.dom.traversal.NodeFilter
    LSSerializerFilters provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not. The LSSerializerFilter interface is based on the NodeFilter interface defined in [DOM Level 2 Traversal and Range] .

    Document, DocumentType, DocumentFragment, Notation, Entity , and children of Attr nodes are not passed to the filter. The child nodes of an EntityReference node are only passed to the filter if the EntityReference node is skipped by the method LSParserFilter.acceptNode().

    When serializing an Element, the element is passed to the filter before any of its attributes are passed to the filter. Namespace declaration attributes, and default attributes (except in the case when " discard-default-content" is set to false), are never passed to the filter.

    The result of any attempt to modify a node passed to a LSSerializerFilter is implementation dependent.

    DOM applications must not raise exceptions in a filter. The effect of throwing exceptions from a filter is DOM implementation dependent.

    For efficiency, a node passed to the filter may not be the same as the one that is actually in the tree. And the actual node (node object identity) may be reused during the process of filtering and serializing a document.

    See also the Document Object Model (DOM) Level 3 Load and Save Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.traversal.NodeFilter

        FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getWhatToShow()
      Tells the LSSerializer what types of nodes to show to the filter.

      • Methods inherited from interface org.w3c.dom.traversal.NodeFilter

        acceptNode

    • Method Detail

      • getWhatToShow

        int getWhatToShow()
        Tells the LSSerializer what types of nodes to show to the filter. If a node is not shown to the filter using this attribute, it is automatically serialized. See NodeFilter for definition of the constants. The constants SHOW_DOCUMENT , SHOW_DOCUMENT_TYPE, SHOW_DOCUMENT_FRAGMENT , SHOW_NOTATION, and SHOW_ENTITY are meaningless here, such nodes will never be passed to a LSSerializerFilter.
        Unlike [DOM Level 2 Traversal and Range] , the SHOW_ATTRIBUTE constant indicates that the Attr nodes are shown and passed to the filter.
        The constants used here are defined in [DOM Level 2 Traversal and Range] .
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamedNodeMap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface NamedNodeMap

  • public interface NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.

    NamedNodeMap objects in the DOM are live.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getLength()
      The number of nodes in this map.
      Node getNamedItem(String name)
      Retrieves a node specified by name.
      Node getNamedItemNS(String namespaceURI, String localName)
      Retrieves a node specified by local name and namespace URI.
      Node item(int index)
      Returns the indexth item in the map.
      Node removeNamedItem(String name)
      Removes a node specified by name.
      Node removeNamedItemNS(String namespaceURI, String localName)
      Removes a node specified by local name and namespace URI.
      Node setNamedItem(Node arg)
      Adds a node using its nodeName attribute.
      Node setNamedItemNS(Node arg)
      Adds a node using its namespaceURI and localName.

    • Method Detail

      • getNamedItem

        Node getNamedItem(String name)
        Retrieves a node specified by name.
        Parameters:
        name - The nodeName of a node to retrieve.
        Returns:
        A Node (of any type) with the specified nodeName, or null if it does not identify any node in this map.

      • setNamedItem

        Node setNamedItem(Node arg)
           throws DOMException
        Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
        As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.
        Parameters:
        arg - A node to store in this map. The node will later be accessible using the value of its nodeName attribute.
        Returns:
        If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.
        Throws:
        DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
        INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
        HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.

      • removeNamedItem

        Node removeNamedItem(String name)
              throws DOMException
        Removes a node specified by name. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
        Parameters:
        name - The nodeName of the node to remove.
        Returns:
        The node removed from this map if a node with such a name exists.
        Throws:
        DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.

      • item

        Node item(int index)
        Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.
        Parameters:
        index - Index into this map.
        Returns:
        The node at the indexth position in the map, or null if that is not a valid index.

      • getLength

        int getLength()
        The number of nodes in this map. The range of valid child node indices is 0 to length-1 inclusive.

      • getNamedItemNS

        Node getNamedItemNS(String namespaceURI,
                    String localName)
             throws DOMException
        Retrieves a node specified by local name and namespace URI.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the node to retrieve.
        localName - The local name of the node to retrieve.
        Returns:
        A Node (of any type) with the specified local name and namespace URI, or null if they do not identify any node in this map.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • setNamedItemNS

        Node setNamedItemNS(Node arg)
             throws DOMException
        Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        arg - A node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes.
        Returns:
        If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.
        Throws:
        DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
        INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
        HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2

      • removeNamedItemNS

        Node removeNamedItemNS(String namespaceURI,
                       String localName)
                throws DOMException
        Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the Node interface. If so, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
        Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
        Parameters:
        namespaceURI - The namespace URI of the node to remove.
        localName - The local name of the node to remove.
        Returns:
        The node removed from this map if a node with such a local name and namespace URI exists.
        Throws:
        DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
        NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
        Since:
        DOM Level 2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NameList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface NameList

  • public interface NameList
    The NameList interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented. The items in the NameList are accessible via an integral index, starting from 0.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean contains(String str)
      Test if a name is part of this NameList.
      boolean containsNS(String namespaceURI, String name)
      Test if the pair namespaceURI/name is part of this NameList.
      int getLength()
      The number of pairs (name and namespaceURI) in the list.
      String getName(int index)
      Returns the indexth name item in the collection.
      String getNamespaceURI(int index)
      Returns the indexth namespaceURI item in the collection.

    • Method Detail

      • getName

        String getName(int index)
        Returns the indexth name item in the collection.
        Parameters:
        index - Index into the collection.
        Returns:
        The name at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range.

      • getNamespaceURI

        String getNamespaceURI(int index)
        Returns the indexth namespaceURI item in the collection.
        Parameters:
        index - Index into the collection.
        Returns:
        The namespace URI at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range.

      • getLength

        int getLength()
        The number of pairs (name and namespaceURI) in the list. The range of valid child node indices is 0 to length-1 inclusive.

      • contains

        boolean contains(String str)
        Test if a name is part of this NameList.
        Parameters:
        str - The name to look for.
        Returns:
        true if the name has been found, false otherwise.

      • containsNS

        boolean containsNS(String namespaceURI,
                   String name)
        Test if the pair namespaceURI/name is part of this NameList.
        Parameters:
        namespaceURI - The namespace URI to look for.
        name - The name to look for.
        Returns:
        true if the pair namespaceURI/name has been found, false otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Node

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Node

  • All Known Subinterfaces:
    Attr, CDATASection, CharacterData, Comment, Detail, DetailEntry, Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, Node, Notation, ProcessingInstruction, SOAPBody, SOAPBodyElement, SOAPElement, SOAPEnvelope, SOAPFault, SOAPFaultElement, SOAPHeader, SOAPHeaderElement, Text, Text
    All Known Implementing Classes:
    IIOMetadataNode, SOAPPart

    public interface Node
    The Node interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a DOMException being raised.

    The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment ), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.

    The values of nodeName, nodeValue, and attributes vary according to the node type as follows:
    Interface | nodeName | nodeValue | attributes
    Attr | same as Attr.name | same as Attr.value | null
    CDATASection | "#cdata-section" | same as CharacterData.data, the content of the CDATA Section | null
    Comment | "#comment" | same as CharacterData.data, the content of the comment | null
    Document | "#document" | null | null
    DocumentFragment | "#document-fragment" | null | null
    DocumentType | same as DocumentType.name | null | null
    Element | same as Element.tagName | null | NamedNodeMap
    Entity | entity name | null | null
    EntityReference | name of entity referenced | null | null
    Notation | notation name | null | null
    ProcessingInstruction | same as ProcessingInstruction.target | same as ProcessingInstruction.data | null
    Text | "#text" | same as CharacterData.data, the content of the text node | null

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short ATTRIBUTE_NODE
      The node is an Attr.
      static short CDATA_SECTION_NODE
      The node is a CDATASection.
      static short COMMENT_NODE
      The node is a Comment.
      static short DOCUMENT_FRAGMENT_NODE
      The node is a DocumentFragment.
      static short DOCUMENT_NODE
      The node is a Document.
      static short DOCUMENT_POSITION_CONTAINED_BY
      The node is contained by the reference node.
      static short DOCUMENT_POSITION_CONTAINS
      The node contains the reference node.
      static short DOCUMENT_POSITION_DISCONNECTED
      The two nodes are disconnected.
      static short DOCUMENT_POSITION_FOLLOWING
      The node follows the reference node.
      static short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
      The determination of preceding versus following is implementation-specific.
      static short DOCUMENT_POSITION_PRECEDING
      The second node precedes the reference node.
      static short DOCUMENT_TYPE_NODE
      The node is a DocumentType.
      static short ELEMENT_NODE
      The node is an Element.
      static short ENTITY_NODE
      The node is an Entity.
      static short ENTITY_REFERENCE_NODE
      The node is an EntityReference.
      static short NOTATION_NODE
      The node is a Notation.
      static short PROCESSING_INSTRUCTION_NODE
      The node is a ProcessingInstruction.
      static short TEXT_NODE
      The node is a Text node.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Node appendChild(Node newChild)
      Adds the node newChild to the end of the list of children of this node.
      Node cloneNode(boolean deep)
      Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
      short compareDocumentPosition(Node other)
      Compares the reference node, i.e.
      NamedNodeMap getAttributes()
      A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
      String getBaseURI()
      The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
      NodeList getChildNodes()
      A NodeList that contains all children of this node.
      Object getFeature(String feature, String version)
      This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .
      Node getFirstChild()
      The first child of this node.
      Node getLastChild()
      The last child of this node.
      String getLocalName()
      Returns the local part of the qualified name of this node.
      String getNamespaceURI()
      The namespace URI of this node, or null if it is unspecified (see ).
      Node getNextSibling()
      The node immediately following this node.
      String getNodeName()
      The name of this node, depending on its type; see the table above.
      short getNodeType()
      A code representing the type of the underlying object, as defined above.
      String getNodeValue()
      The value of this node, depending on its type; see the table above.
      Document getOwnerDocument()
      The Document object associated with this node.
      Node getParentNode()
      The parent of this node.
      String getPrefix()
      The namespace prefix of this node, or null if it is unspecified.
      Node getPreviousSibling()
      The node immediately preceding this node.
      String getTextContent()
      This attribute returns the text content of this node and its descendants.
      Object getUserData(String key)
      Retrieves the object associated to a key on a this node.
      boolean hasAttributes()
      Returns whether this node (if it is an element) has any attributes.
      boolean hasChildNodes()
      Returns whether this node has any children.
      Node insertBefore(Node newChild, Node refChild)
      Inserts the node newChild before the existing child node refChild.
      boolean isDefaultNamespace(String namespaceURI)
      This method checks if the specified namespaceURI is the default namespace or not.
      boolean isEqualNode(Node arg)
      Tests whether two nodes are equal.
      boolean isSameNode(Node other)
      Returns whether this node is the same node as the given one.
      boolean isSupported(String feature, String version)
      Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in .
      String lookupNamespaceURI(String prefix)
      Look up the namespace URI associated to the given prefix, starting from this node.
      String lookupPrefix(String namespaceURI)
      Look up the prefix associated to the given namespace URI, starting from this node.
      void normalize()
      Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
      Node removeChild(Node oldChild)
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Node replaceChild(Node newChild, Node oldChild)
      Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
      void setNodeValue(String nodeValue)
      The value of this node, depending on its type; see the table above.
      void setPrefix(String prefix)
      The namespace prefix of this node, or null if it is unspecified.
      void setTextContent(String textContent)
      This attribute returns the text content of this node and its descendants.
      Object setUserData(String key, Object data, UserDataHandler handler)
      Associate an object to a key on this node.

    • Field Detail

      • ELEMENT_NODE

        static final short ELEMENT_NODE
        The node is an Element.
        See Also:
        Constant Field Values

      • ATTRIBUTE_NODE

        static final short ATTRIBUTE_NODE
        The node is an Attr.
        See Also:
        Constant Field Values

      • TEXT_NODE

        static final short TEXT_NODE
        The node is a Text node.
        See Also:
        Constant Field Values

      • CDATA_SECTION_NODE

        static final short CDATA_SECTION_NODE
        The node is a CDATASection.
        See Also:
        Constant Field Values

      • ENTITY_REFERENCE_NODE

        static final short ENTITY_REFERENCE_NODE
        The node is an EntityReference.
        See Also:
        Constant Field Values

      • ENTITY_NODE

        static final short ENTITY_NODE
        The node is an Entity.
        See Also:
        Constant Field Values

      • PROCESSING_INSTRUCTION_NODE

        static final short PROCESSING_INSTRUCTION_NODE
        The node is a ProcessingInstruction.
        See Also:
        Constant Field Values

      • COMMENT_NODE

        static final short COMMENT_NODE
        The node is a Comment.
        See Also:
        Constant Field Values

      • DOCUMENT_NODE

        static final short DOCUMENT_NODE
        The node is a Document.
        See Also:
        Constant Field Values

      • DOCUMENT_TYPE_NODE

        static final short DOCUMENT_TYPE_NODE
        The node is a DocumentType.
        See Also:
        Constant Field Values

      • DOCUMENT_FRAGMENT_NODE

        static final short DOCUMENT_FRAGMENT_NODE
        The node is a DocumentFragment.
        See Also:
        Constant Field Values

      • NOTATION_NODE

        static final short NOTATION_NODE
        The node is a Notation.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_DISCONNECTED

        static final short DOCUMENT_POSITION_DISCONNECTED
        The two nodes are disconnected. Order between disconnected nodes is always implementation-specific.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_PRECEDING

        static final short DOCUMENT_POSITION_PRECEDING
        The second node precedes the reference node.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_FOLLOWING

        static final short DOCUMENT_POSITION_FOLLOWING
        The node follows the reference node.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_CONTAINS

        static final short DOCUMENT_POSITION_CONTAINS
        The node contains the reference node. A node which contains is always preceding, too.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_CONTAINED_BY

        static final short DOCUMENT_POSITION_CONTAINED_BY
        The node is contained by the reference node. A node which is contained is always following, too.
        See Also:
        Constant Field Values

      • DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

        static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
        The determination of preceding versus following is implementation-specific.
        See Also:
        Constant Field Values

    • Method Detail

      • getNodeName

        String getNodeName()
        The name of this node, depending on its type; see the table above.

      • getNodeValue

        String getNodeValue()
             throws DOMException
        The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Throws:
        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

      • setNodeValue

        void setNodeValue(String nodeValue)
           throws DOMException
        The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if it is not defined to be null.

      • getNodeType

        short getNodeType()
        A code representing the type of the underlying object, as defined above.

      • getParentNode

        Node getParentNode()
        The parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.

      • getChildNodes

        NodeList getChildNodes()
        A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes.

      • getFirstChild

        Node getFirstChild()
        The first child of this node. If there is no such node, this returns null.

      • getLastChild

        Node getLastChild()
        The last child of this node. If there is no such node, this returns null.

      • getPreviousSibling

        Node getPreviousSibling()
        The node immediately preceding this node. If there is no such node, this returns null.

      • getNextSibling

        Node getNextSibling()
        The node immediately following this node. If there is no such node, this returns null.

      • getAttributes

        NamedNodeMap getAttributes()
        A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

      • getOwnerDocument

        Document getOwnerDocument()
        The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.
        Since:
        DOM Level 2

      • insertBefore

        Node insertBefore(Node newChild,
                  Node refChild)
           throws DOMException
        Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
        If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.

        Note: Inserting a node before itself is implementation dependent.

        Parameters:
        newChild - The node to insert.
        refChild - The reference node, i.e., the node before which the new node must be inserted.
        Returns:
        The node being inserted.
        Throws:
        DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors or this node itself, or if this node is of type Document and the DOM application attempts to insert a second DocumentType or Element node.
        WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly.
        NOT_FOUND_ERR: Raised if refChild is not a child of this node.
        NOT_SUPPORTED_ERR: if this node is of type Document, this exception might be raised if the DOM implementation doesn't support the insertion of a DocumentType or Element node.
        Since:
        DOM Level 3

      • replaceChild

        Node replaceChild(Node newChild,
                  Node oldChild)
           throws DOMException
        Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
        If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.

        Note: Replacing a node with itself is implementation dependent.

        Parameters:
        newChild - The new node to put in the child list.
        oldChild - The node being replaced in the list.
        Returns:
        The node replaced.
        Throws:
        DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to put in is one of this node's ancestors or this node itself, or if this node is of type Document and the result of the replacement operation would add a second DocumentType or Element on the Document node.
        WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the new node is readonly.
        NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
        NOT_SUPPORTED_ERR: if this node is of type Document, this exception might be raised if the DOM implementation doesn't support the replacement of the DocumentType child or Element child.
        Since:
        DOM Level 3

      • removeChild

        Node removeChild(Node oldChild)
          throws DOMException
        Removes the child node indicated by oldChild from the list of children, and returns it.
        Parameters:
        oldChild - The node being removed.
        Returns:
        The node removed.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
        NOT_SUPPORTED_ERR: if this node is of type Document, this exception might be raised if the DOM implementation doesn't support the removal of the DocumentType child or the Element child.
        Since:
        DOM Level 3

      • appendChild

        Node appendChild(Node newChild)
          throws DOMException
        Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
        Parameters:
        newChild - The node to add.If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
        Returns:
        The node added.
        Throws:
        DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors or this node itself, or if this node is of type Document and the DOM application attempts to append a second DocumentType or Element node.
        WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the previous parent of the node being inserted is readonly.
        NOT_SUPPORTED_ERR: if the newChild node is a child of the Document node, this exception might be raised if the DOM implementation doesn't support the removal of the DocumentType child or Element child.
        Since:
        DOM Level 3

      • hasChildNodes

        boolean hasChildNodes()
        Returns whether this node has any children.
        Returns:
        Returns true if this node has any children, false otherwise.

      • cloneNode

        Node cloneNode(boolean deep)
        Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode is null) and no user data. User data associated to the imported node is not carried over. However, if any UserDataHandlers has been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns.
        Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any children it contains unless it is a deep clone. This includes text contained in an the Element since the text is contained in a child Text node. Cloning an Attr directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute (specified is true). Cloning an Attr always clones its children, since they represent its value, no matter whether this is a deep clone or not. Cloning an EntityReference automatically constructs its subtree if a corresponding Entity is available, no matter whether this is a deep clone or not. Cloning any other type of node simply returns a copy of this node.
        Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly . In addition, clones of unspecified Attr nodes are specified. And, cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent.
        Parameters:
        deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
        Returns:
        The duplicate node.

      • normalize

        void normalize()
        Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer [XPointer] lookups) that depend on a particular document tree structure are to be used. If the parameter "normalize-characters" of the DOMConfiguration object attached to the Node.ownerDocument is true, this method will also fully normalize the characters of the Text nodes.

        Note: In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.

        Since:
        DOM Level 3

      • isSupported

        boolean isSupported(String feature,
                    String version)
        Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in .
        Parameters:
        feature - The name of the feature to test.
        version - This is the version number of the feature to test.
        Returns:
        Returns true if the specified feature is supported on this node, false otherwise.
        Since:
        DOM Level 2

      • getNamespaceURI

        String getNamespaceURI()
        The namespace URI of this node, or null if it is unspecified (see ).
        This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

        Note: Per the Namespaces in XML Specification [XML Namespaces] an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.

        Since:
        DOM Level 2

      • getPrefix

        String getPrefix()
        The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
        Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent.
        Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
        Since:
        DOM Level 2

      • setPrefix

        void setPrefix(String prefix)
        throws DOMException
        The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
        Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent.
        Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
        Throws:
        DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character according to the XML version in use specified in the Document.xmlVersion attribute.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
        NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from " http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" [XML Namespaces] .
        Since:
        DOM Level 2

      • getLocalName

        String getLocalName()
        Returns the local part of the qualified name of this node.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.
        Since:
        DOM Level 2

      • hasAttributes

        boolean hasAttributes()
        Returns whether this node (if it is an element) has any attributes.
        Returns:
        Returns true if this node has any attributes, false otherwise.
        Since:
        DOM Level 2

      • getBaseURI

        String getBaseURI()
        The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI. This value is computed as described in . However, when the Document supports the feature "HTML" [DOM Level 2 HTML] , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute from the Document interface otherwise.
        Since:
        DOM Level 3

      • compareDocumentPosition

        short compareDocumentPosition(Node other)
                       throws DOMException
        Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order.
        Parameters:
        other - The node to compare against the reference node.
        Returns:
        Returns how the node is positioned relatively to the reference node.
        Throws:
        DOMException - NOT_SUPPORTED_ERR: when the compared nodes are from different DOM implementations that do not coordinate to return consistent implementation-specific results.
        Since:
        DOM Level 3

      • getTextContent

        String getTextContent()
               throws DOMException
        This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. On setting, any possible children this node may have are removed and, if it the new string is not empty or null, replaced by a single Text node containing the string this attribute is set to.
        On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed and the returned string does not contain the white spaces in element content (see the attribute Text.isElementContentWhitespace). Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
        The string returned is made of the text content of this node depending on its type, as defined below:
        Node type | Content
        ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children.
        TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue
        DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null
        Throws:
        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
        Since:
        DOM Level 3

      • setTextContent

        void setTextContent(String textContent)
             throws DOMException
        This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. On setting, any possible children this node may have are removed and, if it the new string is not empty or null, replaced by a single Text node containing the string this attribute is set to.
        On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed and the returned string does not contain the white spaces in element content (see the attribute Text.isElementContentWhitespace). Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
        The string returned is made of the text content of this node depending on its type, as defined below:
        Node type | Content
        ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children.
        TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue
        DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
        Since:
        DOM Level 3

      • isSameNode

        boolean isSameNode(Node other)
        Returns whether this node is the same node as the given one.
        This method provides a way to determine whether two Node references returned by the implementation reference the same object. When two Node references are references to the same object, even if through a proxy, the references may be used completely interchangeably, such that all attributes have the same values and calling the same DOM method on either reference always has exactly the same effect.
        Parameters:
        other - The node to test against.
        Returns:
        Returns true if the nodes are the same, false otherwise.
        Since:
        DOM Level 3

      • lookupPrefix

        String lookupPrefix(String namespaceURI)
        Look up the prefix associated to the given namespace URI, starting from this node. The default namespace declarations are ignored by this method.
        See for details on the algorithm used by this method.
        Parameters:
        namespaceURI - The namespace URI to look for.
        Returns:
        Returns an associated namespace prefix if found or null if none is found. If more than one prefix are associated to the namespace prefix, the returned namespace prefix is implementation dependent.
        Since:
        DOM Level 3

      • isDefaultNamespace

        boolean isDefaultNamespace(String namespaceURI)
        This method checks if the specified namespaceURI is the default namespace or not.
        Parameters:
        namespaceURI - The namespace URI to look for.
        Returns:
        Returns true if the specified namespaceURI is the default namespace, false otherwise.
        Since:
        DOM Level 3

      • lookupNamespaceURI

        String lookupNamespaceURI(String prefix)
        Look up the namespace URI associated to the given prefix, starting from this node.
        See for details on the algorithm used by this method.
        Parameters:
        prefix - The prefix to look for. If this parameter is null, the method will return the default namespace URI if any.
        Returns:
        Returns the associated namespace URI or null if none is found.
        Since:
        DOM Level 3

      • isEqualNode

        boolean isEqualNode(Node arg)
        Tests whether two nodes are equal.
        This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested with Node.isSameNode(). All nodes that are the same will also be equal, though the reverse may not be true.
        Two nodes are equal if and only if the following conditions are satisfied:
        • The two nodes are of the same type.
        • The following string attributes are equal: nodeName, localName, namespaceURI, prefix, nodeValue . This is: they are both null, or they have the same length and are character for character identical.
        • The attributes NamedNodeMaps are equal. This is: they are both null, or they have the same length and for each node that exists in one map there is a node that exists in the other map and is equal, although not necessarily at the same index.
        • The childNodes NodeLists are equal. This is: they are both null, or they have the same length and contain equal nodes at the same index. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.

        For two DocumentType nodes to be equal, the following conditions must also be satisfied:
        • The following string attributes are equal: publicId, systemId, internalSubset.
        • The entities NamedNodeMaps are equal.
        • The notations NamedNodeMaps are equal.

        On the other hand, the following do not affect equality: the ownerDocument, baseURI, and parentNode attributes, the specified attribute for Attr nodes, the schemaTypeInfo attribute for Attr and Element nodes, the Text.isElementContentWhitespace attribute for Text nodes, as well as any user data or event listeners registered on the nodes.

        Note: As a general rule, anything not mentioned in the description above is not significant in consideration of equality checking. Note that future versions of this specification may take into account more attributes and implementations conform to this specification are expected to be updated accordingly.

        Parameters:
        arg - The node to compare equality with.
        Returns:
        Returns true if the nodes are equal, false otherwise.
        Since:
        DOM Level 3

      • getFeature

        Object getFeature(String feature,
                  String version)
        This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in . The specialized object may also be obtained by using binding-specific casting methods but is not necessarily expected to, as discussed in . This method also allow the implementation to provide specialized objects which do not support the Node interface.
        Parameters:
        feature - The name of the feature requested. Note that any plus sign "+" prepended to the name of the feature will be ignored since it is not significant in the context of this method.
        version - This is the version number of the feature to test.
        Returns:
        Returns an object which implements the specialized APIs of the specified feature and version, if any, or null if there is no object which implements interfaces associated with that feature. If the DOMObject returned by this method implements the Node interface, it must delegate to the primary core Node and not return results inconsistent with the primary core Node such as attributes, childNodes, etc.
        Since:
        DOM Level 3

      • setUserData

        Object setUserData(String key,
                   Object data,
                   UserDataHandler handler)
        Associate an object to a key on this node. The object can later be retrieved from this node by calling getUserData with the same key.
        Parameters:
        key - The key to associate the object to.
        data - The object to associate to the given key, or null to remove any existing association to that key.
        handler - The handler to associate to that key, or null.
        Returns:
        Returns the DOMUserData previously associated to the given key on this node, or null if there was none.
        Since:
        DOM Level 3

      • getUserData

        Object getUserData(String key)
        Retrieves the object associated to a key on a this node. The object must first have been set to this node by calling setUserData with the same key.
        Parameters:
        key - The key the object is associated to.
        Returns:
        Returns the DOMUserData associated to the given key on this node, or null if there was none.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NodeList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface NodeList

  • All Known Implementing Classes:
    IIOMetadataNode

    public interface NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.

    The items in the NodeList are accessible via an integral index, starting from 0.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getLength()
      The number of nodes in the list.
      Node item(int index)
      Returns the indexth item in the collection.

    • Method Detail

      • item

        Node item(int index)
        Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
        Parameters:
        index - Index into the collection.
        Returns:
        The node at the indexth position in the NodeList, or null if that is not a valid index.

      • getLength

        int getLength()
        The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Notation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Notation

  • All Superinterfaces:
    Node

    public interface Notation
extends Node
    This interface represents a notation declared in the DTD. A notation either declares, by name, the format of an unparsed entity (see section 4.7 of the XML 1.0 specification [XML 1.0]), or is used for formal declaration of processing instruction targets (see section 2.6 of the XML 1.0 specification [XML 1.0]). The nodeName attribute inherited from Node is set to the declared name of the notation.

    The DOM Core does not support editing Notation nodes; they are therefore readonly.

    A Notation node does not have any parent.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getPublicId()
      The public identifier of this notation.
      String getSystemId()
      The system identifier of this notation.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getPublicId

        String getPublicId()
        The public identifier of this notation. If the public identifier was not specified, this is null.

      • getSystemId

        String getSystemId()
        The system identifier of this notation. If the system identifier was not specified, this is null. This may be an absolute URI or not.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ProcessingInstruction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface ProcessingInstruction

  • All Superinterfaces:
    Node

    public interface ProcessingInstruction
extends Node
    The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.

    No lexical check is done on the content of a processing instruction and it is therefore possible to have the character sequence "?>" in the content, which is illegal a processing instruction per section 2.6 of [XML 1.0]. The presence of this character sequence must generate a fatal error during serialization.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getData()
      The content of this processing instruction.
      String getTarget()
      The target of this processing instruction.
      void setData(String data)
      The content of this processing instruction.

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • getTarget

        String getTarget()
        The target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.

      • getData

        String getData()
        The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.

      • setData

        void setData(String data)
      throws DOMException
        The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface Text

  • All Superinterfaces:
    CharacterData, Node
    All Known Subinterfaces:
    CDATASection, Text

    public interface Text
extends CharacterData
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) and Text nodes that form the list of children of the element.

    When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The Node.normalize() method merges any such adjacent Text objects into a single node for each block of text.

    No lexical check is done on the content of a Text node and, depending on its position in the document, some characters must be escaped during serialization using character references; e.g. the characters "<&" if the textual content is part of an element or of an attribute, the character sequence "]]>" when part of an element, the quotation mark character " or the apostrophe character ' when part of an attribute.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    • Field Summary

      • Fields inherited from interface org.w3c.dom.Node

        ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getWholeText()
      Returns all text of Text nodes logically-adjacent text nodes to this node, concatenated in document order.
      boolean isElementContentWhitespace()
      Returns whether this text node contains element content whitespace, often abusively called "ignorable whitespace".
      Text replaceWholeText(String content)
      Replaces the text of the current node and all logically-adjacent text nodes with the specified text.
      Text splitText(int offset)
      Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.

      • Methods inherited from interface org.w3c.dom.CharacterData

        appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData

      • Methods inherited from interface org.w3c.dom.Node

        appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

    • Method Detail

      • splitText

        Text splitText(int offset)
        throws DOMException
        Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. After being split, this node will contain all the content up to the offset point. A new node of the same type, which contains all the content at and after the offset point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the offset is equal to the length of this node, the new node has no data.
        Parameters:
        offset - The 16-bit unit offset at which to split, starting from 0.
        Returns:
        The new node, of the same type as this node.
        Throws:
        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

      • isElementContentWhitespace

        boolean isElementContentWhitespace()
        Returns whether this text node contains element content whitespace, often abusively called "ignorable whitespace". The text node is determined to contain whitespace in element content during the load of the document or if validation occurs while using Document.normalizeDocument().
        Since:
        DOM Level 3

      • getWholeText

        String getWholeText()
        Returns all text of Text nodes logically-adjacent text nodes to this node, concatenated in document order.
        For instance, in the example below wholeText on the Text node that contains "bar" returns "barfoo", while on the Text node that contains "foo" it returns "barfoo".
                             +-----+
                     | <p> |
                     +-----+
                       /\
                      /  \
               /-----\    +-------+
               | bar |    | &ent; |
               \-----/    +-------+
                              |
                              |
                           /-----\
                           | foo |
                           \-----/
        Figure: barTextNode.wholeText value is "barfoo"
        Since:
        DOM Level 3

      • replaceWholeText

        Text replaceWholeText(String content)
               throws DOMException
        Replaces the text of the current node and all logically-adjacent text nodes with the specified text. All logically-adjacent text nodes are removed including the current node unless it was the recipient of the replacement text.

        This method returns the node which received the replacement text. The returned node is:

        • null, when the replacement text is the empty string;
        • the current node, except when the current node is read-only;
        • a new Text node of the same type ( Text or CDATASection) as the current node inserted at the location of the replacement.

        For instance, in the above example calling replaceWholeText on the Text node that contains "bar" with "yo" in argument results in the following:

                             +-----+
                     | <p> |
                     +-----+
                        |
                        |
                     /-----\
                     | yo  |
                     \-----/
        Figure: barTextNode.replaceWholeText("yo") modifies the textual content of barTextNode with "yo"

        Where the nodes to be removed are read-only descendants of an EntityReference, the EntityReference must be removed instead of the read-only nodes. If any EntityReference to be removed has descendants that are not EntityReference, Text, or CDATASection nodes, the replaceWholeText method must fail before performing any modification of the document, raising a DOMException with the code NO_MODIFICATION_ALLOWED_ERR.

        For instance, in the example below calling replaceWholeText on the Text node that contains "bar" fails, because the EntityReference node "ent" contains an Element node which cannot be removed.

        Parameters:
        content - The content of the replacing Text node.
        Returns:
        The Text node created with the specified content.
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if one of the Text nodes being replaced is readonly.
        Since:
        DOM Level 3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


TypeInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface TypeInfo

  • public interface TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document. The type is a pair of a namespace URI and name properties, and depends on the document's schema.

    If the document's schema is an XML DTD [XML 1.0], the values are computed as follows:

    • If this type is referenced from an Attr node, typeNamespace is "http://www.w3.org/TR/REC-xml" and typeName represents the [attribute type] property in the [XML Information Set] . If there is no declaration for the attribute, typeNamespace and typeName are null.
    • If this type is referenced from an Element node, typeNamespace and typeName are null.

    If the document's schema is an XML Schema [XML Schema Part 1] , the values are computed as follows using the post-schema-validation infoset contributions (also called PSVI contributions):

    • If the [validity] property exists AND is "invalid" or "notKnown": the {target namespace} and {name} properties of the declared type if available, otherwise null.

      Note: At the time of writing, the XML Schema specification does not require exposing the declared type. Thus, DOM implementations might choose not to provide type information if validity is not valid.

    • If the [validity] property exists and is "valid":
      1. If [member type definition] exists:
        1. If {name} is not absent, then expose {name} and {target namespace} properties of the [member type definition] property;
        2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
      2. If the [type definition] property exists:
        1. If {name} is not absent, then expose {name} and {target namespace} properties of the [type definition] property;
        2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
      3. If the [member type definition anonymous] exists:
        1. If it is false, then expose [member type definition name] and [member type definition namespace] properties;
        2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
      4. If the [type definition anonymous] exists:
        1. If it is false, then expose [type definition name] and [type definition namespace] properties;
        2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.

    Note: Other schema languages are outside the scope of the W3C and therefore should define how to represent their type systems using TypeInfo.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int DERIVATION_EXTENSION
      If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by extension.
      static int DERIVATION_LIST
      If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the list.
      static int DERIVATION_RESTRICTION
      If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved.
      static int DERIVATION_UNION
      If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the union if simple types are involved.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getTypeName()
      The name of a type declared for the associated element or attribute, or null if unknown.
      String getTypeNamespace()
      The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.
      boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)
      This method returns if there is a derivation between the reference type definition, i.e.

    • Field Detail

      • DERIVATION_RESTRICTION

        static final int DERIVATION_RESTRICTION
        If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved.
        The reference type definition is derived by restriction from the other type definition if the other type definition is the same as the reference type definition, or if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and all the derivation methods involved are restriction.
        See Also:
        Constant Field Values

      • DERIVATION_EXTENSION

        static final int DERIVATION_EXTENSION
        If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by extension.
        The reference type definition is derived by extension from the other type definition if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and at least one of the derivation methods involved is an extension.
        See Also:
        Constant Field Values

      • DERIVATION_UNION

        static final int DERIVATION_UNION
        If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the union if simple types are involved.
        The reference type definition is derived by union from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.
        See Also:
        Constant Field Values

      • DERIVATION_LIST

        static final int DERIVATION_LIST
        If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the list.
        The reference type definition is derived by list from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.
        See Also:
        Constant Field Values

    • Method Detail

      • getTypeName

        String getTypeName()
        The name of a type declared for the associated element or attribute, or null if unknown.

      • getTypeNamespace

        String getTypeNamespace()
        The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.

      • isDerivedFrom

        boolean isDerivedFrom(String typeNamespaceArg,
                      String typeNameArg,
                      int derivationMethod)
        This method returns if there is a derivation between the reference type definition, i.e. the TypeInfo on which the method is being called, and the other type definition, i.e. the one passed as parameters.
        Parameters:
        typeNamespaceArg - the namespace of the other type definition.
        typeNameArg - the name of the other type definition.
        derivationMethod - the type of derivation and conditions applied between two types, as described in the list of constants provided in this interface.
        Returns:
        If the document's schema is a DTD or no schema is associated with the document, this method will always return false . If the document's schema is an XML Schema, the method will return true if the reference type definition is derived from the other type definition according to the derivation parameter. If the value of the parameter is 0 (no bit is set to 1 for the derivationMethod parameter), the method will return true if the other type definition can be reached by recursing any combination of {base type definition}, {item type definition}, or {member type definitions} from the reference type definition.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


UserDataHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom

Interface UserDataHandler

  • public interface UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed. This can be used by the application to implement various behaviors regarding the data it associates to the DOM nodes. This interface defines that handler.

    See also the Document Object Model (DOM) Level 3 Core Specification.

    Since:
    DOM Level 3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static short NODE_ADOPTED
      The node is adopted, using Document.adoptNode().
      static short NODE_CLONED
      The node is cloned, using Node.cloneNode().
      static short NODE_DELETED
      The node is deleted.
      static short NODE_IMPORTED
      The node is imported, using Document.importNode().
      static short NODE_RENAMED
      The node is renamed, using Document.renameNode().

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void handle(short operation, String key, Object data, Node src, Node dst)
      This method is called whenever the node for which this handler is registered is imported or cloned.

    • Field Detail

      • NODE_CLONED

        static final short NODE_CLONED
        The node is cloned, using Node.cloneNode().
        See Also:
        Constant Field Values

      • NODE_IMPORTED

        static final short NODE_IMPORTED
        The node is imported, using Document.importNode().
        See Also:
        Constant Field Values

      • NODE_DELETED

        static final short NODE_DELETED
        The node is deleted.

        Note: This may not be supported or may not be reliable in certain environments, such as Java, where the implementation has no real control over when objects are actually deleted.

        See Also:
        Constant Field Values

      • NODE_RENAMED

        static final short NODE_RENAMED
        The node is renamed, using Document.renameNode().
        See Also:
        Constant Field Values

      • NODE_ADOPTED

        static final short NODE_ADOPTED
        The node is adopted, using Document.adoptNode().
        See Also:
        Constant Field Values

    • Method Detail

      • handle

        void handle(short operation,
            String key,
            Object data,
            Node src,
            Node dst)
        This method is called whenever the node for which this handler is registered is imported or cloned.
        DOM applications must not raise exceptions in a UserDataHandler. The effect of throwing exceptions from the handler is DOM implementation dependent.
        Parameters:
        operation - Specifies the type of operation that is being performed on the node.
        key - Specifies the key for which this handler is being called.
        data - Specifies the data for which this handler is being called.
        src - Specifies the node being cloned, adopted, imported, or renamed. This is null when the node is being deleted.
        dst - Specifies the node newly created if any, or null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


views

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.w3c.dom.views

  • Interface Summary
    Interface Description
    AbstractView
    A base interface that all views shall derive from.
    DocumentView
    The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.views Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.w3c.dom.views

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • org.w3c.dom.views.AbstractView
  • org.w3c.dom.views.DocumentView
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.w3c.dom.views

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.w3c.dom.views

  • Packages that use org.w3c.dom.views
    Package Description
    org.w3c.dom.events
    org.w3c.dom.views
  • Classes in org.w3c.dom.views used by org.w3c.dom.events
    Class and Description
    AbstractView
    A base interface that all views shall derive from.
  • Classes in org.w3c.dom.views used by org.w3c.dom.views
    Class and Description
    AbstractView
    A base interface that all views shall derive from.
    DocumentView
    The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AbstractView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.views

Interface AbstractView

  • public interface AbstractView
    A base interface that all views shall derive from.

    See also the Document Object Model (DOM) Level 2 Views Specification.

    Since:
    DOM Level 2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      DocumentView getDocument()
      The source DocumentView of which this is an AbstractView.

    • Method Detail

      • getDocument

        DocumentView getDocument()
        The source DocumentView of which this is an AbstractView.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.views.AbstractView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.views.AbstractView

  • Packages that use AbstractView
    Package Description
    org.w3c.dom.events
    org.w3c.dom.views

    • Uses of AbstractView in org.w3c.dom.events

      Methods in org.w3c.dom.events that return AbstractView
      Modifier and Type Method and Description
      AbstractView UIEvent.getView()
      The view attribute identifies the AbstractView from which the event was generated.
      Methods in org.w3c.dom.events with parameters of type AbstractView
      Modifier and Type Method and Description
      void MouseEvent.initMouseEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget relatedTargetArg)
      The initMouseEvent method is used to initialize the value of a MouseEvent created through the DocumentEvent interface.
      void UIEvent.initUIEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg)
      The initUIEvent method is used to initialize the value of a UIEvent created through the DocumentEvent interface.

    • Uses of AbstractView in org.w3c.dom.views

      Methods in org.w3c.dom.views that return AbstractView
      Modifier and Type Method and Description
      AbstractView DocumentView.getDefaultView()
      The default AbstractView for this Document, or null if none available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.w3c.dom.views.DocumentView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.w3c.dom.views.DocumentView

  • Packages that use DocumentView
    Package Description
    org.w3c.dom.views

    • Uses of DocumentView in org.w3c.dom.views

      Methods in org.w3c.dom.views that return DocumentView
      Modifier and Type Method and Description
      DocumentView AbstractView.getDocument()
      The source DocumentView of which this is an AbstractView.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentView

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.w3c.dom.views

Interface DocumentView

  • public interface DocumentView
    The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views. It provides an attribute to retrieve the default view of a document.

    See also the Document Object Model (DOM) Level 2 Views Specification.

    Since:
    DOM Level 2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AbstractView getDefaultView()
      The default AbstractView for this Document, or null if none available.

    • Method Detail

      • getDefaultView

        AbstractView getDefaultView()
        The default AbstractView for this Document, or null if none available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.xml.sax

This package provides the core SAX APIs.

See: Description

  • Interface Summary
    Interface Description
    AttributeList Deprecated
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DocumentHandler Deprecated
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    Locator
    Interface for associating a SAX event with a document location.
    Parser Deprecated
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.
    XMLFilter
    Interface for an XML filter.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Class Summary
    Class Description
    HandlerBase Deprecated
    This class works with the deprecated DocumentHandler interface.
    InputSource
    A single input source for an XML entity.
  • Exception Summary
    Exception Description
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    SAXParseException
    Encapsulate an XML parse error or warning.

Package org.xml.sax Description

This package provides the core SAX APIs. Some SAX1 APIs are deprecated to encourage integration of namespace-awareness into designs of new applications and into maintenance of existing infrastructure.

See http://www.saxproject.org for more information about SAX.

SAX2 Standard Feature Flags

One of the essential characteristics of SAX2 is that it added feature flags which can be used to examine and perhaps modify parser modes, in particular modes such as validation. Since features are identified by (absolute) URIs, anyone can define such features. Currently defined standard feature URIs have the prefix http://xml.org/sax/features/ before an identifier such as validation. Turn features on or off using setFeature. Those standard identifiers are:

Feature ID | Access | Default | Description
external-general-entities | read/write | unspecified | Reports whether this parser processes external general entities; always true if validating.
external-parameter-entities | read/write | unspecified | Reports whether this parser processes external parameter entities; always true if validating.
is-standalone | (parsing) read-only, (not parsing) none | not applicable | May be examined only during a parse, after the startDocument() callback has been completed; read-only. The value is true if the document specified standalone="yes" in its XML declaration, and otherwise is false.
lexical-handler/parameter-entities | read/write | unspecified | A value of "true" indicates that the LexicalHandler will report the beginning and end of parameter entities.
namespaces | read/write | true | A value of "true" indicates namespace URIs and unprefixed local names for element and attribute names will be available.
namespace-prefixes | read/write | false | A value of "true" indicates that XML qualified names (with prefixes) and attributes (including xmlns* attributes) will be available.
resolve-dtd-uris read/write true A value of "true" indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of "false" indicates those IDs will not be absolutized; parsers will provide the base URI from Locator.getSystemId(). This applies to system IDs passed in
  • DTDHandler.notationDecl(),
  • DTDHandler.unparsedEntityDecl(), and
  • DeclHandler.externalEntityDecl().
It does not apply to EntityResolver.resolveEntity(), which is not used to report declarations, or to LexicalHandler.startDTD(), which already provides the non-absolutized URI.
string-interning | read/write | unspecified | Has a value of "true" if all XML names (for elements, prefixes, attributes, entities, notations, and local names), as well as Namespace URIs, will have been interned using java.lang.String.intern. This supports fast testing of equality/inequality against string constants, rather than forcing slower calls to String.equals().
unicode-normalization-checking | read/write | false | Controls whether the parser reports Unicode normalization errors as described in section 2.13 and Appendix B of the XML 1.1 Recommendation. If true, Unicode normalization errors are reported using the ErrorHandler.error() callback. Such errors are not fatal in themselves (though, obviously, other Unicode-related encoding errors may be).
use-attributes2 | read-only | not applicable | Returns "true" if the Attributes objects passed by this parser in ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface. That interface exposes additional DTD-related information, such as whether the attribute was specified in the source text rather than defaulted.
use-locator2 | read-only | not applicable | Returns "true" if the Locator objects passed by this parser in ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface. That interface exposes additional entity information, such as the character encoding and XML version used.
use-entity-resolver2 | read/write | true | Returns "true" if, when setEntityResolver is given an object implementing the org.xml.sax.ext.EntityResolver2 interface, those new methods will be used. Returns "false" to indicate that those methods will not be used.
validation | read/write | unspecified | Controls whether the parser is reporting all validity errors; if true, all external entities will be read.
xmlns-uris | read/write | false | Controls whether, when the namespace-prefixes feature is set, the parser treats namespace declaration attributes as being in the http://www.w3.org/2000/xmlns/ namespace. By default, SAX2 conforms to the original "Namespaces in XML" Recommendation, which explicitly states that such attributes are not in any namespace. Setting this optional flag to "true" makes the SAX2 events conform to a later backwards-incompatible revision of that recommendation, placing those attributes in a namespace.
xml-1.1 | read-only | not applicable | Returns "true" if the parser supports both XML 1.1 and XML 1.0. Returns "false" if the parser supports only XML 1.0.

Support for the default values of the namespaces and namespace-prefixes properties is required. Support for any other feature flags is entirely optional.

For default values not specified by SAX2, each XMLReader implementation specifies its default, or may choose not to expose the feature flag. Unless otherwise specified here, implementations may support changing current values of these standard feature flags, but not while parsing.

SAX2 Standard Handler and Property IDs

For parser interface characteristics that are described as objects, a separate namespace is defined. The objects in this namespace are again identified by URI, and the standard property URIs have the prefix http://xml.org/sax/properties/ before an identifier such as lexical-handler or dom-node. Manage those properties using setProperty(). Those identifiers are:

Property ID | Description
declaration-handler | Used to see most DTD declarations except those treated as lexical ("document element name is ...") or which are mandatory for all SAX parsers (DTDHandler). The Object must implement org.xml.sax.ext.DeclHandler.
document-xml-version | May be examined only during a parse, after the startDocument() callback has been completed; read-only. This property is a literal string describing the actual XML version of the document, such as "1.0" or "1.1".
dom-node | For "DOM Walker" style parsers, which ignore their parser.parse() parameters, this is used to specify the DOM (sub)tree being walked by the parser. The Object must implement the org.w3c.dom.Node interface.
lexical-handler | Used to see some syntax events that are essential in some applications: comments, CDATA delimiters, selected general entity inclusions, and the start and end of the DTD (and declaration of document element name). The Object must implement org.xml.sax.ext.LexicalHandler.
xml-string | Readable only during a parser callback, this exposes a TBS chunk of characters responsible for the current event.

All of these standard properties are optional; XMLReader implementations need not support them.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.xml.sax

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.xml.sax.HandlerBase (implements org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler)
    • org.xml.sax.InputSource
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.xml.sax.SAXException
          • org.xml.sax.SAXNotRecognizedException
          • org.xml.sax.SAXNotSupportedException
          • org.xml.sax.SAXParseException

Interface Hierarchy

  • org.xml.sax.AttributeList
  • org.xml.sax.Attributes
  • org.xml.sax.ContentHandler
  • org.xml.sax.DocumentHandler
  • org.xml.sax.DTDHandler
  • org.xml.sax.EntityResolver
  • org.xml.sax.ErrorHandler
  • org.xml.sax.Locator
  • org.xml.sax.Parser
  • org.xml.sax.XMLReader
    • org.xml.sax.XMLFilter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.xml.sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.xml.sax

  • Packages that use org.xml.sax
    Package Description
    java.beans
    Contains classes related to developing beans -- components based on the JavaBeans™ architecture.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.
  • Classes in org.xml.sax used by java.beans
    Class and Description
    InputSource
    A single input source for an XML entity.
  • Classes in org.xml.sax used by javax.xml.bind
    Class and Description
    ContentHandler
    Receive notification of the logical content of a document.
    InputSource
    A single input source for an XML entity.
  • Classes in org.xml.sax used by javax.xml.bind.helpers
    Class and Description
    ContentHandler
    Receive notification of the logical content of a document.
    InputSource
    A single input source for an XML entity.
    Locator
    Interface for associating a SAX event with a document location.
    SAXException
    Encapsulate a general SAX error or warning.
    SAXParseException
    Encapsulate an XML parse error or warning.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Classes in org.xml.sax used by javax.xml.parsers
    Class and Description
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    HandlerBase
    Deprecated.
    This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.
    InputSource
    A single input source for an XML entity.
    Parser
    Deprecated.
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Classes in org.xml.sax used by javax.xml.transform.sax
    Class and Description
    ContentHandler
    Receive notification of the logical content of a document.
    DTDHandler
    Receive notification of basic DTD-related events.
    InputSource
    A single input source for an XML entity.
    XMLFilter
    Interface for an XML filter.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Classes in org.xml.sax used by javax.xml.validation
    Class and Description
    ContentHandler
    Receive notification of the logical content of a document.
    ErrorHandler
    Basic interface for SAX error handlers.
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
  • Classes in org.xml.sax used by javax.xml.xpath
    Class and Description
    InputSource
    A single input source for an XML entity.
  • Classes in org.xml.sax used by org.xml.sax
    Class and Description
    AttributeList
    Deprecated.
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DocumentHandler
    Deprecated.
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    InputSource
    A single input source for an XML entity.
    Locator
    Interface for associating a SAX event with a document location.
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    SAXParseException
    Encapsulate an XML parse error or warning.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Classes in org.xml.sax used by org.xml.sax.ext
    Class and Description
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    InputSource
    A single input source for an XML entity.
    Locator
    Interface for associating a SAX event with a document location.
    SAXException
    Encapsulate a general SAX error or warning.
  • Classes in org.xml.sax used by org.xml.sax.helpers
    Class and Description
    AttributeList
    Deprecated.
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DocumentHandler
    Deprecated.
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    InputSource
    A single input source for an XML entity.
    Locator
    Interface for associating a SAX event with a document location.
    Parser
    Deprecated.
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    SAXParseException
    Encapsulate an XML parse error or warning.
    XMLFilter
    Interface for an XML filter.
    XMLReader
    Interface for reading an XML document using callbacks.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttributeList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface AttributeList

  • All Known Implementing Classes:
    AttributeListImpl
    Deprecated.
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.

    public interface AttributeList
    Interface for an element's attribute specifications.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This is the original SAX1 interface for reporting an element's attributes. Unlike the new Attributes interface, it does not support Namespace-related information.

    When an attribute list is supplied as part of a startElement event, the list will return valid results only during the scope of the event; once the event handler returns control to the parser, the attribute list is invalid. To save a persistent copy of the attribute list, use the SAX1 AttributeListImpl helper class.

    An attribute list includes only attributes that have been specified or defaulted: #IMPLIED attributes will not be included.

    There are two ways for the SAX application to obtain information from the AttributeList. First, it can iterate through the entire list:

     public void startElement (String name, AttributeList atts) {
   for (int i = 0; i < atts.getLength(); i++) {
     String name = atts.getName(i);
     String type = atts.getType(i);
     String value = atts.getValue(i);
     [...]
   }
 }

    (Note that the result of getLength() will be zero if there are no attributes.)

    As an alternative, the application can request the value or type of specific attributes:

     public void startElement (String name, AttributeList atts) {
   String identifier = atts.getValue("id");
   String label = atts.getValue("label");
   [...]
 }
    Since:
    SAX 1.0
    See Also:
    startElement, AttributeListImpl

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      int getLength()
      Deprecated.
      Return the number of attributes in this list.
      String getName(int i)
      Deprecated.
      Return the name of an attribute in this list (by position).
      String getType(int i)
      Deprecated.
      Return the type of an attribute in the list (by position).
      String getType(String name)
      Deprecated.
      Return the type of an attribute in the list (by name).
      String getValue(int i)
      Deprecated.
      Return the value of an attribute in the list (by position).
      String getValue(String name)
      Deprecated.
      Return the value of an attribute in the list (by name).

    • Method Detail

      • getLength

        int getLength()
        Deprecated.
        Return the number of attributes in this list.

        The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified. The number of attributes may be zero.

        Returns:
        The number of attributes in the list.

      • getName

        String getName(int i)
        Deprecated.
        Return the name of an attribute in this list (by position).

        The names must be unique: the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list.

        If the attribute name has a namespace prefix, the prefix will still be attached.

        Parameters:
        i - The index of the attribute in the list (starting at 0).
        Returns:
        The name of the indexed attribute, or null if the index is out of range.
        See Also:
        getLength()

      • getType

        String getType(int i)
        Deprecated.
        Return the type of an attribute in the list (by position).

        The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

        If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").

        For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

        Parameters:
        i - The index of the attribute in the list (starting at 0).
        Returns:
        The attribute type as a string, or null if the index is out of range.
        See Also:
        getLength(), getType(java.lang.String)

      • getValue

        String getValue(int i)
        Deprecated.
        Return the value of an attribute in the list (by position).

        If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.

        Parameters:
        i - The index of the attribute in the list (starting at 0).
        Returns:
        The attribute value as a string, or null if the index is out of range.
        See Also:
        getLength(), getValue(java.lang.String)

      • getType

        String getType(String name)
        Deprecated.
        Return the type of an attribute in the list (by name).

        The return value is the same as the return value for getType(int).

        If the attribute name has a namespace prefix in the document, the application must include the prefix here.

        Parameters:
        name - The name of the attribute.
        Returns:
        The attribute type as a string, or null if no such attribute exists.
        See Also:
        getType(int)

      • getValue

        String getValue(String name)
        Deprecated.
        Return the value of an attribute in the list (by name).

        The return value is the same as the return value for getValue(int).

        If the attribute name has a namespace prefix in the document, the application must include the prefix here.

        Parameters:
        name - the name of the attribute to return
        Returns:
        The attribute value as a string, or null if no such attribute exists.
        See Also:
        getValue(int)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Attributes

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface Attributes

  • All Known Subinterfaces:
    Attributes2
    All Known Implementing Classes:
    Attributes2Impl, AttributesImpl

    public interface Attributes
    Interface for a list of XML attributes.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This interface allows access to a list of attributes in three different ways:

    1. by attribute index;
    2. by Namespace-qualified name; or
    3. by qualified (prefixed) name.

    The list will not contain attributes that were declared #IMPLIED but not specified in the start tag. It will also not contain attributes used as Namespace declarations (xmlns*) unless the http://xml.org/sax/features/namespace-prefixes feature is set to true (it is false by default). Because SAX2 conforms to the original "Namespaces in XML" recommendation, it normally does not give namespace declaration attributes a namespace URI.

    Some SAX2 parsers may support using an optional feature flag (http://xml.org/sax/features/xmlns-uris) to request that those attributes be given URIs, conforming to a later backwards-incompatible revision of that recommendation. (The attribute's "local name" will be the prefix, or "xmlns" when defining a default element namespace.) For portability, handler code should always resolve that conflict, rather than requiring parsers that can change the setting of that feature flag.

    If the namespace-prefixes feature (see above) is false, access by qualified name may not be available; if the http://xml.org/sax/features/namespaces feature is false, access by Namespace-qualified names may not be available.

    This interface replaces the now-deprecated SAX1 AttributeList interface, which does not contain Namespace support. In addition to Namespace support, it adds the getIndex methods (below).

    The order of attributes in the list is unspecified, and will vary from implementation to implementation.

    Since:
    SAX 2.0
    See Also:
    AttributesImpl, DeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getIndex(String qName)
      Look up the index of an attribute by XML qualified (prefixed) name.
      int getIndex(String uri, String localName)
      Look up the index of an attribute by Namespace name.
      int getLength()
      Return the number of attributes in the list.
      String getLocalName(int index)
      Look up an attribute's local name by index.
      String getQName(int index)
      Look up an attribute's XML qualified (prefixed) name by index.
      String getType(int index)
      Look up an attribute's type by index.
      String getType(String qName)
      Look up an attribute's type by XML qualified (prefixed) name.
      String getType(String uri, String localName)
      Look up an attribute's type by Namespace name.
      String getURI(int index)
      Look up an attribute's Namespace URI by index.
      String getValue(int index)
      Look up an attribute's value by index.
      String getValue(String qName)
      Look up an attribute's value by XML qualified (prefixed) name.
      String getValue(String uri, String localName)
      Look up an attribute's value by Namespace name.

    • Method Detail

      • getLength

        int getLength()
        Return the number of attributes in the list.

        Once you know the number of attributes, you can iterate through the list.

        Returns:
        The number of attributes in the list.
        See Also:
        getURI(int), getLocalName(int), getQName(int), getType(int), getValue(int)

      • getURI

        String getURI(int index)
        Look up an attribute's Namespace URI by index.
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        The Namespace URI, or the empty string if none is available, or null if the index is out of range.
        See Also:
        getLength()

      • getLocalName

        String getLocalName(int index)
        Look up an attribute's local name by index.
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        The local name, or the empty string if Namespace processing is not being performed, or null if the index is out of range.
        See Also:
        getLength()

      • getQName

        String getQName(int index)
        Look up an attribute's XML qualified (prefixed) name by index.
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        The XML qualified name, or the empty string if none is available, or null if the index is out of range.
        See Also:
        getLength()

      • getType

        String getType(int index)
        Look up an attribute's type by index.

        The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

        If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, "Attribute-Value Normalization").

        For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

        Parameters:
        index - The attribute index (zero-based).
        Returns:
        The attribute's type as a string, or null if the index is out of range.
        See Also:
        getLength()

      • getValue

        String getValue(int index)
        Look up an attribute's value by index.

        If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string with each token separated by a single space.

        Parameters:
        index - The attribute index (zero-based).
        Returns:
        The attribute's value as a string, or null if the index is out of range.
        See Also:
        getLength()

      • getIndex

        int getIndex(String uri,
             String localName)
        Look up the index of an attribute by Namespace name.
        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        The index of the attribute, or -1 if it does not appear in the list.

      • getIndex

        int getIndex(String qName)
        Look up the index of an attribute by XML qualified (prefixed) name.
        Parameters:
        qName - The qualified (prefixed) name.
        Returns:
        The index of the attribute, or -1 if it does not appear in the list.

      • getType

        String getType(String uri,
               String localName)
        Look up an attribute's type by Namespace name.

        See getType(int) for a description of the possible types.

        Parameters:
        uri - The Namespace URI, or the empty String if the name has no Namespace URI.
        localName - The local name of the attribute.
        Returns:
        The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed.

      • getType

        String getType(String qName)
        Look up an attribute's type by XML qualified (prefixed) name.

        See getType(int) for a description of the possible types.

        Parameters:
        qName - The XML qualified name.
        Returns:
        The attribute type as a string, or null if the attribute is not in the list or if qualified names are not available.

      • getValue

        String getValue(String uri,
                String localName)
        Look up an attribute's value by Namespace name.

        See getValue(int) for a description of the possible values.

        Parameters:
        uri - The Namespace URI, or the empty String if the name has no Namespace URI.
        localName - The local name of the attribute.
        Returns:
        The attribute value as a string, or null if the attribute is not in the list.

      • getValue

        String getValue(String qName)
        Look up an attribute's value by XML qualified (prefixed) name.

        See getValue(int) for a description of the possible values.

        Parameters:
        qName - The XML qualified name.
        Returns:
        The attribute value as a string, or null if the attribute is not in the list or if qualified names are not available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.HandlerBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.HandlerBase

  • Packages that use HandlerBase
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.

    • Uses of HandlerBase in javax.xml.parsers

      Methods in javax.xml.parsers with parameters of type HandlerBase
      Modifier and Type Method and Description
      void SAXParser.parse(File f, HandlerBase hb)
      Parse the content of the file specified as XML using the specified HandlerBase.
      void SAXParser.parse(InputSource is, HandlerBase hb)
      Parse the content given InputSource as XML using the specified HandlerBase.
      void SAXParser.parse(InputStream is, HandlerBase hb)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      void SAXParser.parse(InputStream is, HandlerBase hb, String systemId)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      void SAXParser.parse(String uri, HandlerBase hb)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified HandlerBase.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.InputSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.InputSource

  • Packages that use InputSource
    Package Description
    java.beans
    Contains classes related to developing beans -- components based on the JavaBeans™ architecture.
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.xpath
    This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of InputSource in java.beans

      Constructors in java.beans with parameters of type InputSource
      Constructor and Description
      XMLDecoder(InputSource is)
      Creates a new decoder to parse XML archives created by the XMLEncoder class.

    • Uses of InputSource in javax.xml.bind

      Methods in javax.xml.bind with parameters of type InputSource
      Modifier and Type Method and Description
      Object Unmarshaller.unmarshal(InputSource source)
      Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.

    • Uses of InputSource in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type InputSource
      Modifier and Type | Method and Description
      Object | AbstractUnmarshallerImpl.unmarshal(InputSource source)
      protected abstract Object AbstractUnmarshallerImpl.unmarshal(XMLReader reader, InputSource source)
      Unmarshals an object by using the specified XMLReader and the InputSource.

    • Uses of InputSource in javax.xml.parsers

      Methods in javax.xml.parsers with parameters of type InputSource
      Modifier and Type Method and Description
      abstract Document DocumentBuilder.parse(InputSource is)
      Parse the content of the given input source as an XML document and return a new DOM Document object.
      void SAXParser.parse(InputSource is, DefaultHandler dh)
      Parse the content given InputSource as XML using the specified DefaultHandler.
      void SAXParser.parse(InputSource is, HandlerBase hb)
      Parse the content given InputSource as XML using the specified HandlerBase.

    • Uses of InputSource in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return InputSource
      Modifier and Type Method and Description
      InputSource SAXSource.getInputSource()
      Get the SAX InputSource to be used for the Source.
      static InputSource SAXSource.sourceToInputSource(Source source)
      Attempt to obtain a SAX InputSource object from a Source object.
      Methods in javax.xml.transform.sax with parameters of type InputSource
      Modifier and Type Method and Description
      void SAXSource.setInputSource(InputSource inputSource)
      Set the SAX InputSource to be used for the Source.
      Constructors in javax.xml.transform.sax with parameters of type InputSource
      Constructor and Description
      SAXSource(InputSource inputSource)
      Create a SAXSource, using a SAX InputSource.
      SAXSource(XMLReader reader, InputSource inputSource)
      Create a SAXSource, using an XMLReader and a SAX InputSource.

    • Uses of InputSource in javax.xml.xpath

      Methods in javax.xml.xpath with parameters of type InputSource
      Modifier and Type Method and Description
      String XPathExpression.evaluate(InputSource source)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.
      Object XPathExpression.evaluate(InputSource source, QName returnType)
      Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.
      String XPath.evaluate(String expression, InputSource source)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as a String.
      Object XPath.evaluate(String expression, InputSource source, QName returnType)
      Evaluate an XPath expression in the context of the specified InputSource and return the result as the specified type.

    • Uses of InputSource in org.xml.sax

      Methods in org.xml.sax that return InputSource
      Modifier and Type Method and Description
      InputSource HandlerBase.resolveEntity(String publicId, String systemId)
      Deprecated.
      Resolve an external entity.
      InputSource EntityResolver.resolveEntity(String publicId, String systemId)
      Allow the application to resolve external entities.
      Methods in org.xml.sax with parameters of type InputSource
      Modifier and Type Method and Description
      void XMLReader.parse(InputSource input)
      Parse an XML document.
      void Parser.parse(InputSource source)
      Deprecated.
      Parse an XML document.

    • Uses of InputSource in org.xml.sax.ext

      Methods in org.xml.sax.ext that return InputSource
      Modifier and Type Method and Description
      InputSource DefaultHandler2.getExternalSubset(String name, String baseURI)
      Tells the parser that if no external subset has been declared in the document text, none should be used.
      InputSource EntityResolver2.getExternalSubset(String name, String baseURI)
      Allows applications to provide an external subset for documents that don't explicitly define one.
      InputSource DefaultHandler2.resolveEntity(String publicId, String systemId)
      Invokes EntityResolver2.resolveEntity() with null entity name and base URI.
      InputSource DefaultHandler2.resolveEntity(String name, String publicId, String baseURI, String systemId)
      Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI.
      InputSource EntityResolver2.resolveEntity(String name, String publicId, String baseURI, String systemId)
      Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution.

    • Uses of InputSource in org.xml.sax.helpers

      Methods in org.xml.sax.helpers that return InputSource
      Modifier and Type Method and Description
      InputSource XMLFilterImpl.resolveEntity(String publicId, String systemId)
      Filter an external entity resolution.
      InputSource DefaultHandler.resolveEntity(String publicId, String systemId)
      Resolve an external entity.
      Methods in org.xml.sax.helpers with parameters of type InputSource
      Modifier and Type Method and Description
      void ParserAdapter.parse(InputSource input)
      Parse an XML document.
      void XMLFilterImpl.parse(InputSource input)
      Parse a document.
      void XMLReaderAdapter.parse(InputSource input)
      Parse the document.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.SAXException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.SAXException

  • Packages that use SAXException
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of SAXException in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type SAXException
      Modifier and Type Method and Description
      protected UnmarshalException AbstractUnmarshallerImpl.createUnmarshalException(SAXException e)
      Creates an UnmarshalException from a SAXException.

    • Uses of SAXException in javax.xml.parsers

      Methods in javax.xml.parsers that throw SAXException
      Modifier and Type Method and Description
      abstract Parser SAXParser.getParser()
      Returns the SAX parser that is encapsultated by the implementation of this class.
      abstract XMLReader SAXParser.getXMLReader()
      Returns the XMLReader that is encapsulated by the implementation of this class.
      abstract SAXParser SAXParserFactory.newSAXParser()
      Creates a new instance of a SAXParser using the currently configured factory parameters.
      Document DocumentBuilder.parse(File f)
      Parse the content of the given file as an XML document and return a new DOM Document object.
      void SAXParser.parse(File f, DefaultHandler dh)
      Parse the content of the file specified as XML using the specified DefaultHandler.
      void SAXParser.parse(File f, HandlerBase hb)
      Parse the content of the file specified as XML using the specified HandlerBase.
      abstract Document DocumentBuilder.parse(InputSource is)
      Parse the content of the given input source as an XML document and return a new DOM Document object.
      void SAXParser.parse(InputSource is, DefaultHandler dh)
      Parse the content given InputSource as XML using the specified DefaultHandler.
      void SAXParser.parse(InputSource is, HandlerBase hb)
      Parse the content given InputSource as XML using the specified HandlerBase.
      Document DocumentBuilder.parse(InputStream is)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      void SAXParser.parse(InputStream is, DefaultHandler dh)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void SAXParser.parse(InputStream is, DefaultHandler dh, String systemId)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void SAXParser.parse(InputStream is, HandlerBase hb)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      void SAXParser.parse(InputStream is, HandlerBase hb, String systemId)
      Parse the content of the given InputStream instance as XML using the specified HandlerBase.
      Document DocumentBuilder.parse(InputStream is, String systemId)
      Parse the content of the given InputStream as an XML document and return a new DOM Document object.
      Document DocumentBuilder.parse(String uri)
      Parse the content of the given URI as an XML document and return a new DOM Document object.
      void SAXParser.parse(String uri, DefaultHandler dh)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified DefaultHandler.
      void SAXParser.parse(String uri, HandlerBase hb)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified HandlerBase.

    • Uses of SAXException in javax.xml.validation

      Methods in javax.xml.validation that throw SAXException
      Modifier and Type Method and Description
      abstract Schema SchemaFactory.newSchema()
      Creates a special Schema object.
      Schema SchemaFactory.newSchema(File schema)
      Parses the specified File as a schema and returns it as a Schema.
      Schema SchemaFactory.newSchema(Source schema)
      Parses the specified source as a schema and returns it as a schema.
      abstract Schema SchemaFactory.newSchema(Source[] schemas)
      Parses the specified source(s) as a schema and returns it as a schema.
      Schema SchemaFactory.newSchema(URL schema)
      Parses the specified URL as a schema and returns it as a Schema.
      void Validator.validate(Source source)
      Validates the specified input.
      abstract void Validator.validate(Source source, Result result)
      Validates the specified input and send the augmented validation result to the specified output.

    • Uses of SAXException in org.xml.sax

      Subclasses of SAXException in org.xml.sax
      Modifier and Type Class and Description
      class  SAXNotRecognizedException
      Exception class for an unrecognized identifier.
      class  SAXNotSupportedException
      Exception class for an unsupported operation.
      class  SAXParseException
      Encapsulate an XML parse error or warning.
      Methods in org.xml.sax that throw SAXException
      Modifier and Type Method and Description
      void HandlerBase.characters(char[] ch, int start, int length)
      Deprecated.
      Receive notification of character data inside an element.
      void ContentHandler.characters(char[] ch, int start, int length)
      Receive notification of character data.
      void DocumentHandler.characters(char[] ch, int start, int length)
      Deprecated.
      Receive notification of character data.
      void HandlerBase.endDocument()
      Deprecated.
      Receive notification of the end of the document.
      void ContentHandler.endDocument()
      Receive notification of the end of a document.
      void DocumentHandler.endDocument()
      Deprecated.
      Receive notification of the end of a document.
      void HandlerBase.endElement(String name)
      Deprecated.
      Receive notification of the end of an element.
      void DocumentHandler.endElement(String name)
      Deprecated.
      Receive notification of the end of an element.
      void ContentHandler.endElement(String uri, String localName, String qName)
      Receive notification of the end of an element.
      void ContentHandler.endPrefixMapping(String prefix)
      End the scope of a prefix-URI mapping.
      void HandlerBase.error(SAXParseException e)
      Deprecated.
      Receive notification of a recoverable parser error.
      void ErrorHandler.error(SAXParseException exception)
      Receive notification of a recoverable error.
      void HandlerBase.fatalError(SAXParseException e)
      Deprecated.
      Report a fatal XML parsing error.
      void ErrorHandler.fatalError(SAXParseException exception)
      Receive notification of a non-recoverable error.
      void HandlerBase.ignorableWhitespace(char[] ch, int start, int length)
      Deprecated.
      Receive notification of ignorable whitespace in element content.
      void ContentHandler.ignorableWhitespace(char[] ch, int start, int length)
      Receive notification of ignorable whitespace in element content.
      void DocumentHandler.ignorableWhitespace(char[] ch, int start, int length)
      Deprecated.
      Receive notification of ignorable whitespace in element content.
      void DTDHandler.notationDecl(String name, String publicId, String systemId)
      Receive notification of a notation declaration event.
      void XMLReader.parse(InputSource input)
      Parse an XML document.
      void Parser.parse(InputSource source)
      Deprecated.
      Parse an XML document.
      void XMLReader.parse(String systemId)
      Parse an XML document from a system identifier (URI).
      void Parser.parse(String systemId)
      Deprecated.
      Parse an XML document from a system identifier (URI).
      void HandlerBase.processingInstruction(String target, String data)
      Deprecated.
      Receive notification of a processing instruction.
      void ContentHandler.processingInstruction(String target, String data)
      Receive notification of a processing instruction.
      void DocumentHandler.processingInstruction(String target, String data)
      Deprecated.
      Receive notification of a processing instruction.
      InputSource HandlerBase.resolveEntity(String publicId, String systemId)
      Deprecated.
      Resolve an external entity.
      InputSource EntityResolver.resolveEntity(String publicId, String systemId)
      Allow the application to resolve external entities.
      void Parser.setLocale(Locale locale)
      Deprecated.
      Allow an application to request a locale for errors and warnings.
      void ContentHandler.skippedEntity(String name)
      Receive notification of a skipped entity.
      void HandlerBase.startDocument()
      Deprecated.
      Receive notification of the beginning of the document.
      void ContentHandler.startDocument()
      Receive notification of the beginning of a document.
      void DocumentHandler.startDocument()
      Deprecated.
      Receive notification of the beginning of a document.
      void HandlerBase.startElement(String name, AttributeList attributes)
      Deprecated.
      Receive notification of the start of an element.
      void DocumentHandler.startElement(String name, AttributeList atts)
      Deprecated.
      Receive notification of the beginning of an element.
      void ContentHandler.startElement(String uri, String localName, String qName, Attributes atts)
      Receive notification of the beginning of an element.
      void ContentHandler.startPrefixMapping(String prefix, String uri)
      Begin the scope of a prefix-URI Namespace mapping.
      void DTDHandler.unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Receive notification of an unparsed entity declaration event.
      void HandlerBase.warning(SAXParseException e)
      Deprecated.
      Receive notification of a parser warning.
      void ErrorHandler.warning(SAXParseException exception)
      Receive notification of a warning.

    • Uses of SAXException in org.xml.sax.ext

      Methods in org.xml.sax.ext that throw SAXException
      Modifier and Type | Method and Description
      void DeclHandler.attributeDecl(String eName, String aName, String type, String mode, String value)
      Report an attribute type declaration.
      void | DefaultHandler2.attributeDecl(String eName, String aName, String type, String mode, String value)
      void | DefaultHandler2.comment(char[] ch, int start, int length)
      void LexicalHandler.comment(char[] ch, int start, int length)
      Report an XML comment anywhere in the document.
      void DeclHandler.elementDecl(String name, String model)
      Report an element type declaration.
      void | DefaultHandler2.elementDecl(String name, String model)
      void | DefaultHandler2.endCDATA()
      void LexicalHandler.endCDATA()
      Report the end of a CDATA section.
      void | DefaultHandler2.endDTD()
      void LexicalHandler.endDTD()
      Report the end of DTD declarations.
      void | DefaultHandler2.endEntity(String name)
      void LexicalHandler.endEntity(String name)
      Report the end of an entity.
      void DeclHandler.externalEntityDecl(String name, String publicId, String systemId)
      Report a parsed external entity declaration.
      void | DefaultHandler2.externalEntityDecl(String name, String publicId, String systemId)
      InputSource DefaultHandler2.getExternalSubset(String name, String baseURI)
      Tells the parser that if no external subset has been declared in the document text, none should be used.
      InputSource EntityResolver2.getExternalSubset(String name, String baseURI)
      Allows applications to provide an external subset for documents that don't explicitly define one.
      void DeclHandler.internalEntityDecl(String name, String value)
      Report an internal entity declaration.
      void | DefaultHandler2.internalEntityDecl(String name, String value)
      InputSource DefaultHandler2.resolveEntity(String publicId, String systemId)
      Invokes EntityResolver2.resolveEntity() with null entity name and base URI.
      InputSource DefaultHandler2.resolveEntity(String name, String publicId, String baseURI, String systemId)
      Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI.
      InputSource EntityResolver2.resolveEntity(String name, String publicId, String baseURI, String systemId)
      Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution.
      void | DefaultHandler2.startCDATA()
      void LexicalHandler.startCDATA()
      Report the start of a CDATA section.
      void | DefaultHandler2.startDTD(String name, String publicId, String systemId)
      void LexicalHandler.startDTD(String name, String publicId, String systemId)
      Report the start of DTD declarations, if any.
      void | DefaultHandler2.startEntity(String name)
      void LexicalHandler.startEntity(String name)
      Report the beginning of some internal and external XML entities.

    • Uses of SAXException in org.xml.sax.helpers

      Methods in org.xml.sax.helpers that throw SAXException
      Modifier and Type Method and Description
      void ParserAdapter.characters(char[] ch, int start, int length)
      Adapter implementation method; do not call.
      void XMLFilterImpl.characters(char[] ch, int start, int length)
      Filter a character data event.
      void DefaultHandler.characters(char[] ch, int start, int length)
      Receive notification of character data inside an element.
      void XMLReaderAdapter.characters(char[] ch, int start, int length)
      Adapt a SAX2 characters event.
      static XMLReader XMLReaderFactory.createXMLReader()
      Attempt to create an XMLReader from system defaults.
      static XMLReader XMLReaderFactory.createXMLReader(String className)
      Attempt to create an XML reader from a class name.
      void ParserAdapter.endDocument()
      Adapter implementation method; do not call.
      void XMLFilterImpl.endDocument()
      Filter an end document event.
      void DefaultHandler.endDocument()
      Receive notification of the end of the document.
      void XMLReaderAdapter.endDocument()
      End document event.
      void ParserAdapter.endElement(String qName)
      Adapter implementation method; do not call.
      void XMLFilterImpl.endElement(String uri, String localName, String qName)
      Filter an end element event.
      void DefaultHandler.endElement(String uri, String localName, String qName)
      Receive notification of the end of an element.
      void XMLReaderAdapter.endElement(String uri, String localName, String qName)
      Adapt a SAX2 end element event.
      void XMLFilterImpl.endPrefixMapping(String prefix)
      Filter an end Namespace prefix mapping event.
      void DefaultHandler.endPrefixMapping(String prefix)
      Receive notification of the end of a Namespace mapping.
      void XMLFilterImpl.error(SAXParseException e)
      Filter an error event.
      void DefaultHandler.error(SAXParseException e)
      Receive notification of a recoverable parser error.
      void XMLFilterImpl.fatalError(SAXParseException e)
      Filter a fatal error event.
      void DefaultHandler.fatalError(SAXParseException e)
      Report a fatal XML parsing error.
      void ParserAdapter.ignorableWhitespace(char[] ch, int start, int length)
      Adapter implementation method; do not call.
      void XMLFilterImpl.ignorableWhitespace(char[] ch, int start, int length)
      Filter an ignorable whitespace event.
      void DefaultHandler.ignorableWhitespace(char[] ch, int start, int length)
      Receive notification of ignorable whitespace in element content.
      void XMLReaderAdapter.ignorableWhitespace(char[] ch, int start, int length)
      Adapt a SAX2 ignorable whitespace event.
      void XMLFilterImpl.notationDecl(String name, String publicId, String systemId)
      Filter a notation declaration event.
      void DefaultHandler.notationDecl(String name, String publicId, String systemId)
      Receive notification of a notation declaration.
      void ParserAdapter.parse(InputSource input)
      Parse an XML document.
      void XMLFilterImpl.parse(InputSource input)
      Parse a document.
      void XMLReaderAdapter.parse(InputSource input)
      Parse the document.
      void ParserAdapter.parse(String systemId)
      Parse an XML document.
      void XMLFilterImpl.parse(String systemId)
      Parse a document.
      void XMLReaderAdapter.parse(String systemId)
      Parse the document.
      void ParserAdapter.processingInstruction(String target, String data)
      Adapter implementation method; do not call.
      void XMLFilterImpl.processingInstruction(String target, String data)
      Filter a processing instruction event.
      void DefaultHandler.processingInstruction(String target, String data)
      Receive notification of a processing instruction.
      void XMLReaderAdapter.processingInstruction(String target, String data)
      Adapt a SAX2 processing instruction event.
      InputSource XMLFilterImpl.resolveEntity(String publicId, String systemId)
      Filter an external entity resolution.
      InputSource DefaultHandler.resolveEntity(String publicId, String systemId)
      Resolve an external entity.
      void XMLReaderAdapter.setLocale(Locale locale)
      Set the locale for error reporting.
      void XMLFilterImpl.skippedEntity(String name)
      Filter a skipped entity event.
      void DefaultHandler.skippedEntity(String name)
      Receive notification of a skipped entity.
      void XMLReaderAdapter.skippedEntity(String name)
      Adapt a SAX2 skipped entity event.
      void ParserAdapter.startDocument()
      Adapter implementation method; do not call.
      void XMLFilterImpl.startDocument()
      Filter a start document event.
      void DefaultHandler.startDocument()
      Receive notification of the beginning of the document.
      void XMLReaderAdapter.startDocument()
      Start document event.
      void ParserAdapter.startElement(String qName, AttributeList qAtts)
      Adapter implementation method; do not call.
      void XMLFilterImpl.startElement(String uri, String localName, String qName, Attributes atts)
      Filter a start element event.
      void DefaultHandler.startElement(String uri, String localName, String qName, Attributes attributes)
      Receive notification of the start of an element.
      void XMLReaderAdapter.startElement(String uri, String localName, String qName, Attributes atts)
      Adapt a SAX2 start element event.
      void XMLFilterImpl.startPrefixMapping(String prefix, String uri)
      Filter a start Namespace prefix mapping event.
      void DefaultHandler.startPrefixMapping(String prefix, String uri)
      Receive notification of the start of a Namespace mapping.
      void XMLFilterImpl.unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Filter an unparsed entity declaration event.
      void DefaultHandler.unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Receive notification of an unparsed entity declaration.
      void XMLFilterImpl.warning(SAXParseException e)
      Filter a warning event.
      void DefaultHandler.warning(SAXParseException e)
      Receive notification of a parser warning.
      Constructors in org.xml.sax.helpers that throw SAXException
      Constructor and Description
      ParserAdapter()
      Construct a new parser adapter.
      XMLReaderAdapter()
      Create a new adapter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.SAXNotRecognizedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.SAXNotRecognizedException

  • Packages that use SAXNotRecognizedException
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of SAXNotRecognizedException in javax.xml.parsers

      Methods in javax.xml.parsers that throw SAXNotRecognizedException
      Modifier and Type Method and Description
      abstract boolean SAXParserFactory.getFeature(String name)
      Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
      abstract Object SAXParser.getProperty(String name)
      Returns the particular property requested for in the underlying implementation of XMLReader.
      abstract void SAXParserFactory.setFeature(String name, boolean value)
      Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.
      abstract void SAXParser.setProperty(String name, Object value)
      Sets the particular property in the underlying implementation of XMLReader.

    • Uses of SAXNotRecognizedException in javax.xml.validation

      Methods in javax.xml.validation that throw SAXNotRecognizedException
      Modifier and Type Method and Description
      boolean ValidatorHandler.getFeature(String name)
      Look up the value of a feature flag.
      boolean Validator.getFeature(String name)
      Look up the value of a feature flag.
      boolean SchemaFactory.getFeature(String name)
      Look up the value of a feature flag.
      Object ValidatorHandler.getProperty(String name)
      Look up the value of a property.
      Object Validator.getProperty(String name)
      Look up the value of a property.
      Object SchemaFactory.getProperty(String name)
      Look up the value of a property.
      void ValidatorHandler.setFeature(String name, boolean value)
      Set a feature for this ValidatorHandler.
      void Validator.setFeature(String name, boolean value)
      Set the value of a feature flag.
      void SchemaFactory.setFeature(String name, boolean value)
      Set a feature for this SchemaFactory, Schemas created by this factory, and by extension, Validators and ValidatorHandlers created by those Schemas.
      void ValidatorHandler.setProperty(String name, Object object)
      Set the value of a property.
      void Validator.setProperty(String name, Object object)
      Set the value of a property.
      void SchemaFactory.setProperty(String name, Object object)
      Set the value of a property.

    • Uses of SAXNotRecognizedException in org.xml.sax

      Methods in org.xml.sax that throw SAXNotRecognizedException
      Modifier and Type Method and Description
      boolean XMLReader.getFeature(String name)
      Look up the value of a feature flag.
      Object XMLReader.getProperty(String name)
      Look up the value of a property.
      void XMLReader.setFeature(String name, boolean value)
      Set the value of a feature flag.
      void XMLReader.setProperty(String name, Object value)
      Set the value of a property.

    • Uses of SAXNotRecognizedException in org.xml.sax.helpers

      Methods in org.xml.sax.helpers that throw SAXNotRecognizedException
      Modifier and Type Method and Description
      boolean ParserAdapter.getFeature(String name)
      Check a parser feature flag.
      boolean XMLFilterImpl.getFeature(String name)
      Look up the value of a feature.
      Object ParserAdapter.getProperty(String name)
      Get a parser property.
      Object XMLFilterImpl.getProperty(String name)
      Look up the value of a property.
      void ParserAdapter.setFeature(String name, boolean value)
      Set a feature flag for the parser.
      void XMLFilterImpl.setFeature(String name, boolean value)
      Set the value of a feature.
      void ParserAdapter.setProperty(String name, Object value)
      Set a parser property.
      void XMLFilterImpl.setProperty(String name, Object value)
      Set the value of a property.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.SAXNotSupportedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.SAXNotSupportedException

  • Packages that use SAXNotSupportedException
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of SAXNotSupportedException in javax.xml.parsers

      Methods in javax.xml.parsers that throw SAXNotSupportedException
      Modifier and Type Method and Description
      abstract boolean SAXParserFactory.getFeature(String name)
      Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
      abstract Object SAXParser.getProperty(String name)
      Returns the particular property requested for in the underlying implementation of XMLReader.
      abstract void SAXParserFactory.setFeature(String name, boolean value)
      Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.
      abstract void SAXParser.setProperty(String name, Object value)
      Sets the particular property in the underlying implementation of XMLReader.

    • Uses of SAXNotSupportedException in javax.xml.validation

      Methods in javax.xml.validation that throw SAXNotSupportedException
      Modifier and Type Method and Description
      boolean ValidatorHandler.getFeature(String name)
      Look up the value of a feature flag.
      boolean Validator.getFeature(String name)
      Look up the value of a feature flag.
      boolean SchemaFactory.getFeature(String name)
      Look up the value of a feature flag.
      Object ValidatorHandler.getProperty(String name)
      Look up the value of a property.
      Object Validator.getProperty(String name)
      Look up the value of a property.
      Object SchemaFactory.getProperty(String name)
      Look up the value of a property.
      void ValidatorHandler.setFeature(String name, boolean value)
      Set a feature for this ValidatorHandler.
      void Validator.setFeature(String name, boolean value)
      Set the value of a feature flag.
      void SchemaFactory.setFeature(String name, boolean value)
      Set a feature for this SchemaFactory, Schemas created by this factory, and by extension, Validators and ValidatorHandlers created by those Schemas.
      void ValidatorHandler.setProperty(String name, Object object)
      Set the value of a property.
      void Validator.setProperty(String name, Object object)
      Set the value of a property.
      void SchemaFactory.setProperty(String name, Object object)
      Set the value of a property.

    • Uses of SAXNotSupportedException in org.xml.sax

      Methods in org.xml.sax that throw SAXNotSupportedException
      Modifier and Type Method and Description
      boolean XMLReader.getFeature(String name)
      Look up the value of a feature flag.
      Object XMLReader.getProperty(String name)
      Look up the value of a property.
      void XMLReader.setFeature(String name, boolean value)
      Set the value of a feature flag.
      void XMLReader.setProperty(String name, Object value)
      Set the value of a property.

    • Uses of SAXNotSupportedException in org.xml.sax.helpers

      Methods in org.xml.sax.helpers that throw SAXNotSupportedException
      Modifier and Type Method and Description
      boolean ParserAdapter.getFeature(String name)
      Check a parser feature flag.
      boolean XMLFilterImpl.getFeature(String name)
      Look up the value of a feature.
      Object ParserAdapter.getProperty(String name)
      Get a parser property.
      Object XMLFilterImpl.getProperty(String name)
      Look up the value of a property.
      void ParserAdapter.setFeature(String name, boolean value)
      Set a feature flag for the parser.
      void XMLFilterImpl.setFeature(String name, boolean value)
      Set the value of a feature.
      void ParserAdapter.setProperty(String name, Object value)
      Set a parser property.
      void XMLFilterImpl.setProperty(String name, Object value)
      Set the value of a property.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.SAXParseException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.SAXParseException

  • Packages that use SAXParseException
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of SAXParseException in javax.xml.bind.helpers

      Constructors in javax.xml.bind.helpers with parameters of type SAXParseException
      Constructor and Description
      ValidationEventLocatorImpl(SAXParseException e)
      Constructs an object from the location information of a SAXParseException.

    • Uses of SAXParseException in org.xml.sax

      Methods in org.xml.sax with parameters of type SAXParseException
      Modifier and Type Method and Description
      void HandlerBase.error(SAXParseException e)
      Deprecated.
      Receive notification of a recoverable parser error.
      void ErrorHandler.error(SAXParseException exception)
      Receive notification of a recoverable error.
      void HandlerBase.fatalError(SAXParseException e)
      Deprecated.
      Report a fatal XML parsing error.
      void ErrorHandler.fatalError(SAXParseException exception)
      Receive notification of a non-recoverable error.
      void HandlerBase.warning(SAXParseException e)
      Deprecated.
      Receive notification of a parser warning.
      void ErrorHandler.warning(SAXParseException exception)
      Receive notification of a warning.

    • Uses of SAXParseException in org.xml.sax.helpers

      Methods in org.xml.sax.helpers with parameters of type SAXParseException
      Modifier and Type Method and Description
      void XMLFilterImpl.error(SAXParseException e)
      Filter an error event.
      void DefaultHandler.error(SAXParseException e)
      Receive notification of a recoverable parser error.
      void XMLFilterImpl.fatalError(SAXParseException e)
      Filter a fatal error event.
      void DefaultHandler.fatalError(SAXParseException e)
      Report a fatal XML parsing error.
      void XMLFilterImpl.warning(SAXParseException e)
      Filter a warning event.
      void DefaultHandler.warning(SAXParseException e)
      Receive notification of a parser warning.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.AttributeList

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.AttributeList

  • Packages that use AttributeList
    Package Description
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of AttributeList in org.xml.sax

      Methods in org.xml.sax with parameters of type AttributeList
      Modifier and Type Method and Description
      void HandlerBase.startElement(String name, AttributeList attributes)
      Deprecated.
      Receive notification of the start of an element.
      void DocumentHandler.startElement(String name, AttributeList atts)
      Deprecated.
      Receive notification of the beginning of an element.

    • Uses of AttributeList in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement AttributeList
      Modifier and Type Class and Description
      class  AttributeListImpl
      Deprecated.
      This class implements a deprecated interface, AttributeList; that interface has been replaced by Attributes, which is implemented in the AttributesImpl helper class.
      Methods in org.xml.sax.helpers with parameters of type AttributeList
      Modifier and Type Method and Description
      void AttributeListImpl.setAttributeList(AttributeList atts)
      Deprecated.
      Set the attribute list, discarding previous contents.
      void ParserAdapter.startElement(String qName, AttributeList qAtts)
      Adapter implementation method; do not call.
      Constructors in org.xml.sax.helpers with parameters of type AttributeList
      Constructor and Description
      AttributeListImpl(AttributeList atts)
      Deprecated.
      Construct a persistent copy of an existing attribute list.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.Attributes

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.Attributes

  • Packages that use Attributes
    Package Description
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of Attributes in org.xml.sax

      Methods in org.xml.sax with parameters of type Attributes
      Modifier and Type Method and Description
      void ContentHandler.startElement(String uri, String localName, String qName, Attributes atts)
      Receive notification of the beginning of an element.

    • Uses of Attributes in org.xml.sax.ext

      Subinterfaces of Attributes in org.xml.sax.ext
      Modifier and Type Interface and Description
      interface  Attributes2
      SAX2 extension to augment the per-attribute information provided though Attributes.
      Classes in org.xml.sax.ext that implement Attributes
      Modifier and Type Class and Description
      class  Attributes2Impl
      SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
      Methods in org.xml.sax.ext with parameters of type Attributes
      Modifier and Type Method and Description
      void Attributes2Impl.setAttributes(Attributes atts)
      Copy an entire Attributes object.
      Constructors in org.xml.sax.ext with parameters of type Attributes
      Constructor and Description
      Attributes2Impl(Attributes atts)
      Copy an existing Attributes or Attributes2 object.

    • Uses of Attributes in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement Attributes
      Modifier and Type Class and Description
      class  AttributesImpl
      Default implementation of the Attributes interface.
      Methods in org.xml.sax.helpers with parameters of type Attributes
      Modifier and Type Method and Description
      void AttributesImpl.setAttributes(Attributes atts)
      Copy an entire Attributes object.
      void XMLFilterImpl.startElement(String uri, String localName, String qName, Attributes atts)
      Filter a start element event.
      void DefaultHandler.startElement(String uri, String localName, String qName, Attributes attributes)
      Receive notification of the start of an element.
      void XMLReaderAdapter.startElement(String uri, String localName, String qName, Attributes atts)
      Adapt a SAX2 start element event.
      Constructors in org.xml.sax.helpers with parameters of type Attributes
      Constructor and Description
      AttributesImpl(Attributes atts)
      Copy an existing Attributes object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ContentHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ContentHandler

  • Packages that use ContentHandler
    Package Description
    javax.xml.bind
    Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of ContentHandler in javax.xml.bind

      Subinterfaces of ContentHandler in javax.xml.bind
      Modifier and Type Interface and Description
      interface  UnmarshallerHandler
      Unmarshaller implemented as SAX ContentHandler.
      Methods in javax.xml.bind with parameters of type ContentHandler
      Modifier and Type Method and Description
      void Marshaller.marshal(Object jaxbElement, ContentHandler handler)
      Marshal the content tree rooted at jaxbElement into SAX2 events.

    • Uses of ContentHandler in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers with parameters of type ContentHandler
      Modifier and Type | Method and Description
      void | AbstractMarshallerImpl.marshal(Object obj, ContentHandler handler)

    • Uses of ContentHandler in javax.xml.transform.sax

      Subinterfaces of ContentHandler in javax.xml.transform.sax
      Modifier and Type Interface and Description
      interface  TemplatesHandler
      A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
      interface  TransformerHandler
      A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
      Methods in javax.xml.transform.sax that return ContentHandler
      Modifier and Type Method and Description
      ContentHandler SAXResult.getHandler()
      Get the ContentHandler that is the Result.
      Methods in javax.xml.transform.sax with parameters of type ContentHandler
      Modifier and Type Method and Description
      void SAXResult.setHandler(ContentHandler handler)
      Set the target to be a SAX2 ContentHandler.
      Constructors in javax.xml.transform.sax with parameters of type ContentHandler
      Constructor and Description
      SAXResult(ContentHandler handler)
      Create a SAXResult that targets a SAX2 ContentHandler.

    • Uses of ContentHandler in javax.xml.validation

      Classes in javax.xml.validation that implement ContentHandler
      Modifier and Type Class and Description
      class  ValidatorHandler
      Streaming validator that works on SAX stream.
      Methods in javax.xml.validation that return ContentHandler
      Modifier and Type Method and Description
      abstract ContentHandler ValidatorHandler.getContentHandler()
      Gets the ContentHandler which receives the augmented validation result.
      Methods in javax.xml.validation with parameters of type ContentHandler
      Modifier and Type Method and Description
      abstract void ValidatorHandler.setContentHandler(ContentHandler receiver)
      Sets the ContentHandler which receives the augmented validation result.

    • Uses of ContentHandler in org.xml.sax

      Methods in org.xml.sax that return ContentHandler
      Modifier and Type Method and Description
      ContentHandler XMLReader.getContentHandler()
      Return the current content handler.
      Methods in org.xml.sax with parameters of type ContentHandler
      Modifier and Type Method and Description
      void XMLReader.setContentHandler(ContentHandler handler)
      Allow an application to register a content event handler.

    • Uses of ContentHandler in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement ContentHandler
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.

    • Uses of ContentHandler in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement ContentHandler
      Modifier and Type Class and Description
      class  DefaultHandler
      Default base class for SAX2 event handlers.
      class  XMLFilterImpl
      Base class for deriving an XML filter.
      class  XMLReaderAdapter
      Adapt a SAX2 XMLReader as a SAX1 Parser.
      Methods in org.xml.sax.helpers that return ContentHandler
      Modifier and Type Method and Description
      ContentHandler ParserAdapter.getContentHandler()
      Return the current content handler.
      ContentHandler XMLFilterImpl.getContentHandler()
      Get the content event handler.
      Methods in org.xml.sax.helpers with parameters of type ContentHandler
      Modifier and Type Method and Description
      void ParserAdapter.setContentHandler(ContentHandler handler)
      Set the content handler.
      void XMLFilterImpl.setContentHandler(ContentHandler handler)
      Set the content event handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.DocumentHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.DocumentHandler

  • Packages that use DocumentHandler
    Package Description
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of DocumentHandler in org.xml.sax

      Classes in org.xml.sax that implement DocumentHandler
      Modifier and Type Class and Description
      class  HandlerBase
      Deprecated.
      This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.
      Methods in org.xml.sax with parameters of type DocumentHandler
      Modifier and Type Method and Description
      void Parser.setDocumentHandler(DocumentHandler handler)
      Deprecated.
      Allow an application to register a document event handler.

    • Uses of DocumentHandler in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement DocumentHandler
      Modifier and Type Class and Description
      class  ParserAdapter
      Adapt a SAX1 Parser as a SAX2 XMLReader.
      Methods in org.xml.sax.helpers with parameters of type DocumentHandler
      Modifier and Type Method and Description
      void XMLReaderAdapter.setDocumentHandler(DocumentHandler handler)
      Register the SAX1 document event handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.DTDHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.DTDHandler

  • Packages that use DTDHandler
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of DTDHandler in javax.xml.transform.sax

      Subinterfaces of DTDHandler in javax.xml.transform.sax
      Modifier and Type Interface and Description
      interface  TransformerHandler
      A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.

    • Uses of DTDHandler in org.xml.sax

      Classes in org.xml.sax that implement DTDHandler
      Modifier and Type Class and Description
      class  HandlerBase
      Deprecated.
      This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.
      Methods in org.xml.sax that return DTDHandler
      Modifier and Type Method and Description
      DTDHandler XMLReader.getDTDHandler()
      Return the current DTD handler.
      Methods in org.xml.sax with parameters of type DTDHandler
      Modifier and Type Method and Description
      void XMLReader.setDTDHandler(DTDHandler handler)
      Allow an application to register a DTD event handler.
      void Parser.setDTDHandler(DTDHandler handler)
      Deprecated.
      Allow an application to register a DTD event handler.

    • Uses of DTDHandler in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement DTDHandler
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.

    • Uses of DTDHandler in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement DTDHandler
      Modifier and Type Class and Description
      class  DefaultHandler
      Default base class for SAX2 event handlers.
      class  XMLFilterImpl
      Base class for deriving an XML filter.
      Methods in org.xml.sax.helpers that return DTDHandler
      Modifier and Type Method and Description
      DTDHandler ParserAdapter.getDTDHandler()
      Return the current DTD handler.
      DTDHandler XMLFilterImpl.getDTDHandler()
      Get the current DTD event handler.
      Methods in org.xml.sax.helpers with parameters of type DTDHandler
      Modifier and Type Method and Description
      void ParserAdapter.setDTDHandler(DTDHandler handler)
      Set the DTD handler.
      void XMLFilterImpl.setDTDHandler(DTDHandler handler)
      Set the DTD event handler.
      void XMLReaderAdapter.setDTDHandler(DTDHandler handler)
      Register the DTD event handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.EntityResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.EntityResolver

  • Packages that use EntityResolver
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of EntityResolver in javax.xml.parsers

      Methods in javax.xml.parsers with parameters of type EntityResolver
      Modifier and Type Method and Description
      abstract void DocumentBuilder.setEntityResolver(EntityResolver er)
      Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.

    • Uses of EntityResolver in org.xml.sax

      Classes in org.xml.sax that implement EntityResolver
      Modifier and Type Class and Description
      class  HandlerBase
      Deprecated.
      This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.
      Methods in org.xml.sax that return EntityResolver
      Modifier and Type Method and Description
      EntityResolver XMLReader.getEntityResolver()
      Return the current entity resolver.
      Methods in org.xml.sax with parameters of type EntityResolver
      Modifier and Type Method and Description
      void XMLReader.setEntityResolver(EntityResolver resolver)
      Allow an application to register an entity resolver.
      void Parser.setEntityResolver(EntityResolver resolver)
      Deprecated.
      Allow an application to register a custom entity resolver.

    • Uses of EntityResolver in org.xml.sax.ext

      Subinterfaces of EntityResolver in org.xml.sax.ext
      Modifier and Type Interface and Description
      interface  EntityResolver2
      Extended interface for mapping external entity references to input sources, or providing a missing external subset.
      Classes in org.xml.sax.ext that implement EntityResolver
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.

    • Uses of EntityResolver in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement EntityResolver
      Modifier and Type Class and Description
      class  DefaultHandler
      Default base class for SAX2 event handlers.
      class  XMLFilterImpl
      Base class for deriving an XML filter.
      Methods in org.xml.sax.helpers that return EntityResolver
      Modifier and Type Method and Description
      EntityResolver ParserAdapter.getEntityResolver()
      Return the current entity resolver.
      EntityResolver XMLFilterImpl.getEntityResolver()
      Get the current entity resolver.
      Methods in org.xml.sax.helpers with parameters of type EntityResolver
      Modifier and Type Method and Description
      void ParserAdapter.setEntityResolver(EntityResolver resolver)
      Set the entity resolver.
      void XMLFilterImpl.setEntityResolver(EntityResolver resolver)
      Set the entity resolver.
      void XMLReaderAdapter.setEntityResolver(EntityResolver resolver)
      Register the entity resolver.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ErrorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ErrorHandler

  • Packages that use ErrorHandler
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.validation
    This package provides an API for validation of XML documents.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of ErrorHandler in javax.xml.parsers

      Methods in javax.xml.parsers with parameters of type ErrorHandler
      Modifier and Type Method and Description
      abstract void DocumentBuilder.setErrorHandler(ErrorHandler eh)
      Specify the ErrorHandler to be used by the parser.

    • Uses of ErrorHandler in javax.xml.validation

      Methods in javax.xml.validation that return ErrorHandler
      Modifier and Type Method and Description
      abstract ErrorHandler ValidatorHandler.getErrorHandler()
      Gets the current ErrorHandler set to this ValidatorHandler.
      abstract ErrorHandler Validator.getErrorHandler()
      Gets the current ErrorHandler set to this Validator.
      abstract ErrorHandler SchemaFactory.getErrorHandler()
      Gets the current ErrorHandler set to this SchemaFactory.
      Methods in javax.xml.validation with parameters of type ErrorHandler
      Modifier and Type Method and Description
      abstract void ValidatorHandler.setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the validation.
      abstract void Validator.setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the validate method invocation.
      abstract void SchemaFactory.setErrorHandler(ErrorHandler errorHandler)
      Sets the ErrorHandler to receive errors encountered during the newSchema method invocation.

    • Uses of ErrorHandler in org.xml.sax

      Classes in org.xml.sax that implement ErrorHandler
      Modifier and Type Class and Description
      class  HandlerBase
      Deprecated.
      This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.
      Methods in org.xml.sax that return ErrorHandler
      Modifier and Type Method and Description
      ErrorHandler XMLReader.getErrorHandler()
      Return the current error handler.
      Methods in org.xml.sax with parameters of type ErrorHandler
      Modifier and Type Method and Description
      void XMLReader.setErrorHandler(ErrorHandler handler)
      Allow an application to register an error event handler.
      void Parser.setErrorHandler(ErrorHandler handler)
      Deprecated.
      Allow an application to register an error event handler.

    • Uses of ErrorHandler in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement ErrorHandler
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.

    • Uses of ErrorHandler in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement ErrorHandler
      Modifier and Type Class and Description
      class  DefaultHandler
      Default base class for SAX2 event handlers.
      class  XMLFilterImpl
      Base class for deriving an XML filter.
      Methods in org.xml.sax.helpers that return ErrorHandler
      Modifier and Type Method and Description
      ErrorHandler ParserAdapter.getErrorHandler()
      Return the current error handler.
      ErrorHandler XMLFilterImpl.getErrorHandler()
      Get the current error event handler.
      Methods in org.xml.sax.helpers with parameters of type ErrorHandler
      Modifier and Type Method and Description
      void ParserAdapter.setErrorHandler(ErrorHandler handler)
      Set the error handler.
      void XMLFilterImpl.setErrorHandler(ErrorHandler handler)
      Set the error event handler.
      void XMLReaderAdapter.setErrorHandler(ErrorHandler handler)
      Register the error event handler.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.Locator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.Locator

  • Packages that use Locator
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of Locator in javax.xml.bind.helpers

      Constructors in javax.xml.bind.helpers with parameters of type Locator
      Constructor and Description
      ValidationEventLocatorImpl(Locator loc)
      Constructs an object from an org.xml.sax.Locator.

    • Uses of Locator in org.xml.sax

      Methods in org.xml.sax with parameters of type Locator
      Modifier and Type Method and Description
      void HandlerBase.setDocumentLocator(Locator locator)
      Deprecated.
      Receive a Locator object for document events.
      void ContentHandler.setDocumentLocator(Locator locator)
      Receive an object for locating the origin of SAX document events.
      void DocumentHandler.setDocumentLocator(Locator locator)
      Deprecated.
      Receive an object for locating the origin of SAX document events.
      Constructors in org.xml.sax with parameters of type Locator
      Constructor and Description
      SAXParseException(String message, Locator locator)
      Create a new SAXParseException from a message and a Locator.
      SAXParseException(String message, Locator locator, Exception e)
      Wrap an existing exception in a SAXParseException.

    • Uses of Locator in org.xml.sax.ext

      Subinterfaces of Locator in org.xml.sax.ext
      Modifier and Type Interface and Description
      interface  Locator2
      SAX2 extension to augment the entity information provided though a Locator.
      Classes in org.xml.sax.ext that implement Locator
      Modifier and Type Class and Description
      class  Locator2Impl
      SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.
      Constructors in org.xml.sax.ext with parameters of type Locator
      Constructor and Description
      Locator2Impl(Locator locator)
      Copy an existing Locator or Locator2 object.

    • Uses of Locator in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement Locator
      Modifier and Type Class and Description
      class  LocatorImpl
      Provide an optional convenience implementation of Locator.
      Methods in org.xml.sax.helpers with parameters of type Locator
      Modifier and Type Method and Description
      void ParserAdapter.setDocumentLocator(Locator locator)
      Adapter implementation method; do not call.
      void XMLFilterImpl.setDocumentLocator(Locator locator)
      Filter a new document locator event.
      void DefaultHandler.setDocumentLocator(Locator locator)
      Receive a Locator object for document events.
      void XMLReaderAdapter.setDocumentLocator(Locator locator)
      Set a document locator.
      Constructors in org.xml.sax.helpers with parameters of type Locator
      Constructor and Description
      LocatorImpl(Locator locator)
      Copy constructor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.Parser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.Parser

  • Packages that use Parser
    Package Description
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of Parser in javax.xml.parsers

      Methods in javax.xml.parsers that return Parser
      Modifier and Type Method and Description
      abstract Parser SAXParser.getParser()
      Returns the SAX parser that is encapsultated by the implementation of this class.

    • Uses of Parser in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement Parser
      Modifier and Type Class and Description
      class  XMLReaderAdapter
      Adapt a SAX2 XMLReader as a SAX1 Parser.
      Methods in org.xml.sax.helpers that return Parser
      Modifier and Type Method and Description
      static Parser ParserFactory.makeParser()
      Deprecated.
      Create a new SAX parser using the `org.xml.sax.parser' system property.
      static Parser ParserFactory.makeParser(String className)
      Deprecated.
      Create a new SAX parser object using the class name provided.
      Constructors in org.xml.sax.helpers with parameters of type Parser
      Constructor and Description
      ParserAdapter(Parser parser)
      Construct a new parser adapter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.XMLFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.XMLFilter

  • Packages that use XMLFilter
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of XMLFilter in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return XMLFilter
      Modifier and Type Method and Description
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Source src)
      Create an XMLFilter that uses the given Source as the transformation instructions.
      abstract XMLFilter SAXTransformerFactory.newXMLFilter(Templates templates)
      Create an XMLFilter, based on the Templates argument..

    • Uses of XMLFilter in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement XMLFilter
      Modifier and Type Class and Description
      class  XMLFilterImpl
      Base class for deriving an XML filter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.XMLReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.XMLReader

  • Packages that use XMLReader
    Package Description
    javax.xml.bind.helpers
    JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    org.xml.sax
    This package provides the core SAX APIs.
    org.xml.sax.helpers
    This package contains "helper" classes, including support for bootstrapping SAX-based applications.

    • Uses of XMLReader in javax.xml.bind.helpers

      Methods in javax.xml.bind.helpers that return XMLReader
      Modifier and Type Method and Description
      protected XMLReader AbstractUnmarshallerImpl.getXMLReader()
      Obtains a configured XMLReader.
      Methods in javax.xml.bind.helpers with parameters of type XMLReader
      Modifier and Type Method and Description
      protected abstract Object AbstractUnmarshallerImpl.unmarshal(XMLReader reader, InputSource source)
      Unmarshals an object by using the specified XMLReader and the InputSource.

    • Uses of XMLReader in javax.xml.parsers

      Methods in javax.xml.parsers that return XMLReader
      Modifier and Type Method and Description
      abstract XMLReader SAXParser.getXMLReader()
      Returns the XMLReader that is encapsulated by the implementation of this class.

    • Uses of XMLReader in javax.xml.transform.sax

      Methods in javax.xml.transform.sax that return XMLReader
      Modifier and Type Method and Description
      XMLReader SAXSource.getXMLReader()
      Get the XMLReader to be used for the Source.
      Methods in javax.xml.transform.sax with parameters of type XMLReader
      Modifier and Type Method and Description
      void SAXSource.setXMLReader(XMLReader reader)
      Set the XMLReader to be used for the Source.
      Constructors in javax.xml.transform.sax with parameters of type XMLReader
      Constructor and Description
      SAXSource(XMLReader reader, InputSource inputSource)
      Create a SAXSource, using an XMLReader and a SAX InputSource.

    • Uses of XMLReader in org.xml.sax

      Subinterfaces of XMLReader in org.xml.sax
      Modifier and Type Interface and Description
      interface  XMLFilter
      Interface for an XML filter.
      Methods in org.xml.sax that return XMLReader
      Modifier and Type Method and Description
      XMLReader XMLFilter.getParent()
      Get the parent reader.
      Methods in org.xml.sax with parameters of type XMLReader
      Modifier and Type Method and Description
      void XMLFilter.setParent(XMLReader parent)
      Set the parent reader.

    • Uses of XMLReader in org.xml.sax.helpers

      Classes in org.xml.sax.helpers that implement XMLReader
      Modifier and Type Class and Description
      class  ParserAdapter
      Adapt a SAX1 Parser as a SAX2 XMLReader.
      class  XMLFilterImpl
      Base class for deriving an XML filter.
      Methods in org.xml.sax.helpers that return XMLReader
      Modifier and Type Method and Description
      static XMLReader XMLReaderFactory.createXMLReader()
      Attempt to create an XMLReader from system defaults.
      static XMLReader XMLReaderFactory.createXMLReader(String className)
      Attempt to create an XML reader from a class name.
      XMLReader XMLFilterImpl.getParent()
      Get the parent reader.
      Methods in org.xml.sax.helpers with parameters of type XMLReader
      Modifier and Type Method and Description
      void XMLFilterImpl.setParent(XMLReader parent)
      Set the parent reader.
      Constructors in org.xml.sax.helpers with parameters of type XMLReader
      Constructor and Description
      XMLFilterImpl(XMLReader parent)
      Construct an XML filter with the specified parent.
      XMLReaderAdapter(XMLReader xmlReader)
      Create a new adapter.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ContentHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface ContentHandler

  • All Known Subinterfaces:
    TemplatesHandler, TransformerHandler, UnmarshallerHandler
    All Known Implementing Classes:
    DefaultHandler, DefaultHandler2, ValidatorHandler, XMLFilterImpl, XMLReaderAdapter

    public interface ContentHandler
    Receive notification of the logical content of a document.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This is the main interface that most SAX applications implement: if the application needs to be informed of basic parsing events, it implements this interface and registers an instance with the SAX parser using the setContentHandler method. The parser uses the instance to report basic document-related events like the start and end of elements and character data.

    The order of events in this interface is very important, and mirrors the order of information in the document itself. For example, all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event.

    This interface is similar to the now-deprecated SAX 1.0 DocumentHandler interface, but it adds support for Namespaces and for reporting skipped entities (in non-validating XML processors).

    Implementors should note that there is also a ContentHandler class in the java.net package; that means that it's probably a bad idea to do

    import java.net.*;
 import org.xml.sax.*;

    In fact, "import ...*" is usually a sign of sloppy programming anyway, so the user should consider this a feature rather than a bug.

    Since:
    SAX 2.0
    See Also:
    XMLReader, DTDHandler, ErrorHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Receive notification of character data.
      void endDocument()
      Receive notification of the end of a document.
      void endElement(String uri, String localName, String qName)
      Receive notification of the end of an element.
      void endPrefixMapping(String prefix)
      End the scope of a prefix-URI mapping.
      void ignorableWhitespace(char[] ch, int start, int length)
      Receive notification of ignorable whitespace in element content.
      void processingInstruction(String target, String data)
      Receive notification of a processing instruction.
      void setDocumentLocator(Locator locator)
      Receive an object for locating the origin of SAX document events.
      void skippedEntity(String name)
      Receive notification of a skipped entity.
      void startDocument()
      Receive notification of the beginning of a document.
      void startElement(String uri, String localName, String qName, Attributes atts)
      Receive notification of the beginning of an element.
      void startPrefixMapping(String prefix, String uri)
      Begin the scope of a prefix-URI Namespace mapping.

    • Method Detail

      • setDocumentLocator

        void setDocumentLocator(Locator locator)
        Receive an object for locating the origin of SAX document events.

        SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ContentHandler interface.

        The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

        Note that the locator will return correct information only during the invocation SAX event callbacks after startDocument returns and before endDocument is called. The application should not attempt to use it at any other time.

        Parameters:
        locator - an object that can return the location of any SAX document event
        See Also:
        Locator

      • startDocument

        void startDocument()
            throws SAXException
        Receive notification of the beginning of a document.

        The SAX parser will invoke this method only once, before any other event callbacks (except for setDocumentLocator).

        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
        See Also:
        endDocument()

      • endDocument

        void endDocument()
          throws SAXException
        Receive notification of the end of a document.

        There is an apparent contradiction between the documentation for this method and the documentation for ErrorHandler.fatalError(org.xml.sax.SAXParseException). Until this ambiguity is resolved in a future major release, clients should make no assumptions about whether endDocument() will or will not be invoked when the parser has reported a fatalError() or thrown an exception.

        The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
        See Also:
        startDocument()

      • startPrefixMapping

        void startPrefixMapping(String prefix,
                        String uri)
                 throws SAXException
        Begin the scope of a prefix-URI Namespace mapping.

        The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the http://xml.org/sax/features/namespaces feature is true (the default).

        There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary.

        Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each other: all startPrefixMapping events will occur immediately before the corresponding startElement event, and all endPrefixMapping events will occur immediately after the corresponding endElement event, but their order is not otherwise guaranteed.

        There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.

        Parameters:
        prefix - the Namespace prefix being declared. An empty string is used for the default element namespace, which has no prefix.
        uri - the Namespace URI the prefix is mapped to
        Throws:
        SAXException - the client may throw an exception during processing
        See Also:
        endPrefixMapping(java.lang.String), startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

      • endPrefixMapping

        void endPrefixMapping(String prefix)
               throws SAXException
        End the scope of a prefix-URI mapping.

        See startPrefixMapping for details. These events will always occur immediately after the corresponding endElement event, but the order of endPrefixMapping events is not otherwise guaranteed.

        Parameters:
        prefix - the prefix that was being mapped. This is the empty string when a default mapping scope ends.
        Throws:
        SAXException - the client may throw an exception during processing
        See Also:
        startPrefixMapping(java.lang.String, java.lang.String), endElement(java.lang.String, java.lang.String, java.lang.String)

      • startElement

        void startElement(String uri,
                  String localName,
                  String qName,
                  Attributes atts)
           throws SAXException
        Receive notification of the beginning of an element.

        The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

        This event allows up to three name components for each element:

        1. the Namespace URI;
        2. the local name; and
        3. the qualified (prefixed) name.

        Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

        • the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
        • the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

        Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations (xmlns* attributes) only if the http://xml.org/sax/features/namespace-prefixes property is true (it is false by default, and support for a true value is optional).

        Like characters(), attribute values may have characters that need more than one char value.

        Parameters:
        uri - the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
        localName - the local name (without prefix), or the empty string if Namespace processing is not being performed
        qName - the qualified name (with prefix), or the empty string if qualified names are not available
        atts - the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
        See Also:
        endElement(java.lang.String, java.lang.String, java.lang.String), Attributes, AttributesImpl

      • endElement

        void endElement(String uri,
                String localName,
                String qName)
         throws SAXException
        Receive notification of the end of an element.

        The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement event for every endElement event (even when the element is empty).

        For information on the names, see startElement.

        Parameters:
        uri - the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
        localName - the local name (without prefix), or the empty string if Namespace processing is not being performed
        qName - the qualified XML name (with prefix), or the empty string if qualified names are not available
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception

      • characters

        void characters(char[] ch,
                int start,
                int length)
         throws SAXException
        Receive notification of character data.

        The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

        The application must not attempt to read from the array outside of the specified range.

        Individual characters may consist of more than one Java char value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. In one case, characters are represented in a Surrogate Pair, using two special Unicode values. Such characters are in the so-called "Astral Planes", with a code point above U+FFFF. A second case involves composite characters, such as a base character combining with one or more accent characters.

        Your code should not assume that algorithms using char-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML.

        Note that some parsers will report whitespace in element content using the ignorableWhitespace method rather than this one (validating parsers must do so).

        Parameters:
        ch - the characters from the XML document
        start - the start position in the array
        length - the number of characters to read from the array
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
        See Also:
        ignorableWhitespace(char[], int, int), Locator

      • ignorableWhitespace

        void ignorableWhitespace(char[] ch,
                         int start,
                         int length)
                  throws SAXException
        Receive notification of ignorable whitespace in element content.

        Validating Parsers must use this method to report each chunk of whitespace in element content (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

        SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

        The application must not attempt to read from the array outside of the specified range.

        Parameters:
        ch - the characters from the XML document
        start - the start position in the array
        length - the number of characters to read from the array
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
        See Also:
        characters(char[], int, int)

      • processingInstruction

        void processingInstruction(String target,
                           String data)
                    throws SAXException
        Receive notification of a processing instruction.

        The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

        A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

        Like characters(), processing instruction data may have characters that need more than one char value.

        Parameters:
        target - the processing instruction target
        data - the processing instruction data, or null if none was supplied. The data does not include any whitespace separating it from the target
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception

      • skippedEntity

        void skippedEntity(String name)
            throws SAXException
        Receive notification of a skipped entity. This is not called for entity references within markup constructs such as element start tags or markup declarations. (The XML recommendation requires reporting skipped external entities. SAX also reports internal entity expansion/non-expansion, except within markup constructs.)

        The Parser will invoke this method each time the entity is skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the http://xml.org/sax/features/external-general-entities and the http://xml.org/sax/features/external-parameter-entities properties.

        Parameters:
        name - the name of the skipped entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be the string "[dtd]"
        Throws:
        SAXException - any SAX exception, possibly wrapping another exception
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DocumentHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface DocumentHandler

  • All Known Implementing Classes:
    HandlerBase, ParserAdapter
    Deprecated.
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.

    public interface DocumentHandler
    Receive notification of general document events.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This was the main event-handling interface for SAX1; in SAX2, it has been replaced by ContentHandler, which provides Namespace support and reporting of skipped entities. This interface is included in SAX2 only to support legacy SAX1 applications.

    The order of events in this interface is very important, and mirrors the order of information in the document itself. For example, all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event.

    Application writers who do not want to implement the entire interface can derive a class from HandlerBase, which implements the default functionality; parser writers can instantiate HandlerBase to obtain a default handler. The application can find the location of any document event using the Locator interface supplied by the Parser through the setDocumentLocator method.

    Since:
    SAX 1.0
    See Also:
    Parser.setDocumentHandler(org.xml.sax.DocumentHandler), Locator, HandlerBase

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Deprecated.
      Receive notification of character data.
      void endDocument()
      Deprecated.
      Receive notification of the end of a document.
      void endElement(String name)
      Deprecated.
      Receive notification of the end of an element.
      void ignorableWhitespace(char[] ch, int start, int length)
      Deprecated.
      Receive notification of ignorable whitespace in element content.
      void processingInstruction(String target, String data)
      Deprecated.
      Receive notification of a processing instruction.
      void setDocumentLocator(Locator locator)
      Deprecated.
      Receive an object for locating the origin of SAX document events.
      void startDocument()
      Deprecated.
      Receive notification of the beginning of a document.
      void startElement(String name, AttributeList atts)
      Deprecated.
      Receive notification of the beginning of an element.

    • Method Detail

      • setDocumentLocator

        void setDocumentLocator(Locator locator)
        Deprecated.
        Receive an object for locating the origin of SAX document events.

        SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface.

        The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

        Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.

        Parameters:
        locator - An object that can return the location of any SAX document event.
        See Also:
        Locator

      • startDocument

        void startDocument()
            throws SAXException
        Deprecated.
        Receive notification of the beginning of a document.

        The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).

        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.

      • endDocument

        void endDocument()
          throws SAXException
        Deprecated.
        Receive notification of the end of a document.

        The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.

      • startElement

        void startElement(String name,
                  AttributeList atts)
           throws SAXException
        Deprecated.
        Receive notification of the beginning of an element.

        The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.

        If the element name has a namespace prefix, the prefix will still be attached. Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted.

        Parameters:
        name - The element type name.
        atts - The attributes attached to the element, if any.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(java.lang.String), AttributeList

      • endElement

        void endElement(String name)
         throws SAXException
        Deprecated.
        Receive notification of the end of an element.

        The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

        If the element name has a namespace prefix, the prefix will still be attached to the name.

        Parameters:
        name - The element type name
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.

      • characters

        void characters(char[] ch,
                int start,
                int length)
         throws SAXException
        Deprecated.
        Receive notification of character data.

        The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

        The application must not attempt to read from the array outside of the specified range.

        Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).

        Parameters:
        ch - The characters from the XML document.
        start - The start position in the array.
        length - The number of characters to read from the array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ignorableWhitespace(char[], int, int), Locator

      • ignorableWhitespace

        void ignorableWhitespace(char[] ch,
                         int start,
                         int length)
                  throws SAXException
        Deprecated.
        Receive notification of ignorable whitespace in element content.

        Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

        SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

        The application must not attempt to read from the array outside of the specified range.

        Parameters:
        ch - The characters from the XML document.
        start - The start position in the array.
        length - The number of characters to read from the array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        characters(char[], int, int)

      • processingInstruction

        void processingInstruction(String target,
                           String data)
                    throws SAXException
        Deprecated.
        Receive notification of a processing instruction.

        The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

        A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

        Parameters:
        target - The processing instruction target.
        data - The processing instruction data, or null if none was supplied.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DTDHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface DTDHandler

  • All Known Subinterfaces:
    TransformerHandler
    All Known Implementing Classes:
    DefaultHandler, DefaultHandler2, HandlerBase, XMLFilterImpl

    public interface DTDHandler
    Receive notification of basic DTD-related events.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    If a SAX application needs information about notations and unparsed entities, then the application implements this interface and registers an instance with the SAX parser using the parser's setDTDHandler method. The parser uses the instance to report notation and unparsed entity declarations to the application.

    Note that this interface includes only those DTD events that the XML recommendation requires processors to report: notation and unparsed entity declarations.

    The SAX parser may report these events in any order, regardless of the order in which the notations and unparsed entities were declared; however, all DTD events must be reported after the document handler's startDocument event, and before the first startElement event. (If the LexicalHandler is used, these events must also be reported before the endDTD event.)

    It is up to the application to store the information for future use (perhaps in a hash table or object tree). If the application encounters attributes of type "NOTATION", "ENTITY", or "ENTITIES", it can use the information that it obtained through this interface to find the entity and/or notation corresponding with the attribute value.

    Since:
    SAX 1.0
    See Also:
    XMLReader.setDTDHandler(org.xml.sax.DTDHandler)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void notationDecl(String name, String publicId, String systemId)
      Receive notification of a notation declaration event.
      void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Receive notification of an unparsed entity declaration event.

    • Method Detail

      • notationDecl

        void notationDecl(String name,
                  String publicId,
                  String systemId)
           throws SAXException
        Receive notification of a notation declaration event.

        It is up to the application to record the notation for later reference, if necessary; notations may appear as attribute values and in unparsed entity declarations, and are sometime used with processing instruction target names.

        At least one of publicId and systemId must be non-null. If a system identifier is present, and it is a URL, the SAX parser must resolve it fully before passing it to the application through this event.

        There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.

        Parameters:
        name - The notation name.
        publicId - The notation's public identifier, or null if none was given.
        systemId - The notation's system identifier, or null if none was given.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String), Attributes

      • unparsedEntityDecl

        void unparsedEntityDecl(String name,
                        String publicId,
                        String systemId,
                        String notationName)
                 throws SAXException
        Receive notification of an unparsed entity declaration event.

        Note that the notation name corresponds to a notation reported by the notationDecl event. It is up to the application to record the entity for later reference, if necessary; unparsed entities may appear as attribute values.

        If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

        Parameters:
        name - The unparsed entity's name.
        publicId - The entity's public identifier, or null if none was given.
        systemId - The entity's system identifier.
        notationName - The name of the associated notation.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        notationDecl(java.lang.String, java.lang.String, java.lang.String), Attributes
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EntityResolver

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface EntityResolver

  • All Known Subinterfaces:
    EntityResolver2
    All Known Implementing Classes:
    DefaultHandler, DefaultHandler2, HandlerBase, XMLFilterImpl

    public interface EntityResolver
    Basic interface for resolving entities.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    If a SAX application needs to implement customized handling for external entities, it must implement this interface and register an instance with the SAX driver using the setEntityResolver method.

    The XML reader will then allow the application to intercept any external entities (including the external DTD subset and external parameter entities, if any) before including them.

    Many SAX applications will not need to implement this interface, but it will be especially useful for applications that build XML documents from databases or other specialised input sources, or for applications that use URI types other than URLs.

    The following resolver would provide the application with a special character stream for the entity with the system identifier "http://www.myhost.com/today":

     import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;

 public class MyResolver implements EntityResolver {
   public InputSource resolveEntity (String publicId, String systemId)
   {
     if (systemId.equals("http://www.myhost.com/today")) {
              // return a special input source
       MyReader reader = new MyReader();
       return new InputSource(reader);
     } else {
              // use the default behaviour
       return null;
     }
   }
 }

    The application can also use this interface to redirect system identifiers to local URIs or to look up replacements in a catalog (possibly by using the public identifier).

    Since:
    SAX 1.0
    See Also:
    XMLReader.setEntityResolver(org.xml.sax.EntityResolver), InputSource

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      InputSource resolveEntity(String publicId, String systemId)
      Allow the application to resolve external entities.

    • Method Detail

      • resolveEntity

        InputSource resolveEntity(String publicId,
                          String systemId)
                   throws SAXException,
                          IOException
        Allow the application to resolve external entities.

        The parser will call this method before opening any external entity except the top-level document entity. Such entities include the external DTD subset and external parameter entities referenced within the DTD (in either case, only if the parser reads external parameter entities), and external general entities referenced within the document element (if the parser reads external general entities). The application may request that the parser locate the entity itself, that it use an alternative URI, or that it use data provided by the application (as a character or byte input stream).

        Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box). Neither XML nor SAX specifies a preferred policy for using public or system IDs to resolve resources. However, SAX specifies how to interpret any InputSource returned by this method, and that if none is returned, then the system ID will be dereferenced as a URL.

        If the system identifier is a URL, the SAX parser must resolve it fully before reporting it to the application.

        Parameters:
        publicId - The public identifier of the external entity being referenced, or null if none was supplied.
        systemId - The system identifier of the external entity being referenced.
        Returns:
        An InputSource object describing the new input source, or null to request that the parser open a regular URI connection to the system identifier.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - A Java-specific IO exception, possibly the result of creating a new InputStream or Reader for the InputSource.
        See Also:
        InputSource
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ErrorHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface ErrorHandler

  • All Known Implementing Classes:
    DefaultHandler, DefaultHandler2, HandlerBase, XMLFilterImpl

    public interface ErrorHandler
    Basic interface for SAX error handlers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    If a SAX application needs to implement customized error handling, it must implement this interface and then register an instance with the XML reader using the setErrorHandler method. The parser will then report all errors and warnings through this interface.

    WARNING: If an application does not register an ErrorHandler, XML parsing errors will go unreported, except that SAXParseExceptions will be thrown for fatal errors. In order to detect validity errors, an ErrorHandler that does something with error() calls must be registered.

    For XML processing errors, a SAX driver must use this interface in preference to throwing an exception: it is up to the application to decide whether to throw an exception for different types of errors and warnings. Note, however, that there is no requirement that the parser continue to report additional errors after a call to fatalError. In other words, a SAX driver class may throw an exception after reporting any fatalError. Also parsers may throw appropriate exceptions for non-XML errors. For example, XMLReader.parse() would throw an IOException for errors accessing entities or the document.

    Since:
    SAX 1.0
    See Also:
    XMLReader.setErrorHandler(org.xml.sax.ErrorHandler), SAXParseException

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void error(SAXParseException exception)
      Receive notification of a recoverable error.
      void fatalError(SAXParseException exception)
      Receive notification of a non-recoverable error.
      void warning(SAXParseException exception)
      Receive notification of a warning.

    • Method Detail

      • warning

        void warning(SAXParseException exception)
      throws SAXException
        Receive notification of a warning.

        SAX parsers will use this method to report conditions that are not errors or fatal errors as defined by the XML recommendation. The default behaviour is to take no action.

        The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end.

        Filters may use this method to report other, non-XML warnings as well.

        Parameters:
        exception - The warning information encapsulated in a SAX parse exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        SAXParseException

      • error

        void error(SAXParseException exception)
    throws SAXException
        Receive notification of a recoverable error.

        This corresponds to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a validating parser would use this callback to report the violation of a validity constraint. The default behaviour is to take no action.

        The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end. If the application cannot do so, then the parser should report a fatal error even if the XML recommendation does not require it to do so.

        Filters may use this method to report other, non-XML errors as well.

        Parameters:
        exception - The error information encapsulated in a SAX parse exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        SAXParseException

      • fatalError

        void fatalError(SAXParseException exception)
         throws SAXException
        Receive notification of a non-recoverable error.

        There is an apparent contradiction between the documentation for this method and the documentation for ContentHandler.endDocument(). Until this ambiguity is resolved in a future major release, clients should make no assumptions about whether endDocument() will or will not be invoked when the parser has reported a fatalError() or thrown an exception.

        This corresponds to the definition of "fatal error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a parser would use this callback to report the violation of a well-formedness constraint.

        The application must assume that the document is unusable after the parser has invoked this method, and should continue (if at all) only for the sake of collecting additional error messages: in fact, SAX parsers are free to stop reporting any other events once this method has been invoked.

        Parameters:
        exception - The error information encapsulated in a SAX parse exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        SAXParseException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.xml.sax.ext

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See: Description

  • Interface Summary
    Interface Description
    Attributes2
    SAX2 extension to augment the per-attribute information provided though Attributes.
    DeclHandler
    SAX2 extension handler for DTD declaration events.
    EntityResolver2
    Extended interface for mapping external entity references to input sources, or providing a missing external subset.
    LexicalHandler
    SAX2 extension handler for lexical events.
    Locator2
    SAX2 extension to augment the entity information provided though a Locator.
  • Class Summary
    Class Description
    Attributes2Impl
    SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
    DefaultHandler2
    This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
    Locator2Impl
    SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.

Package org.xml.sax.ext Description

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See http://www.saxproject.org for more information about SAX.

This package is independent of the SAX2 core, though the functionality exposed generally needs to be implemented within a parser core. That independence has several consequences:

  • SAX2 drivers are not required to recognize these handlers.
  • You cannot assume that the class files will be present in every SAX2 installation.
  • This package may be updated independently of SAX2 (i.e. new handlers and classes may be added without updating SAX2 itself).
  • The new handlers are not implemented by the SAX2 org.xml.sax.helpers.DefaultHandler or org.xml.sax.helpers.XMLFilterImpl classes. You can subclass these if you need such behavior, or use the helper classes found here.
  • The handlers need to be registered differently than core SAX2 handlers.

This package, SAX2-ext, is a standardized extension to SAX2. It is designed both to allow SAX parsers to pass certain types of information to applications, and to serve as a simple model for other SAX2 parser extension packages. Not all such extension packages should need to be recognized directly by parsers, however. As an example, most validation systems can be cleanly layered on top of parsers supporting the standardized SAX2 interfaces.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax.ext Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.xml.sax.ext

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.xml.sax.helpers.AttributesImpl (implements org.xml.sax.Attributes)
      • org.xml.sax.ext.Attributes2Impl (implements org.xml.sax.ext.Attributes2)
    • org.xml.sax.helpers.DefaultHandler (implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler)
      • org.xml.sax.ext.DefaultHandler2 (implements org.xml.sax.ext.DeclHandler, org.xml.sax.ext.EntityResolver2, org.xml.sax.ext.LexicalHandler)
    • org.xml.sax.helpers.LocatorImpl (implements org.xml.sax.Locator)
      • org.xml.sax.ext.Locator2Impl (implements org.xml.sax.ext.Locator2)

Interface Hierarchy

  • org.xml.sax.Attributes
    • org.xml.sax.ext.Attributes2
  • org.xml.sax.ext.DeclHandler
  • org.xml.sax.EntityResolver
    • org.xml.sax.ext.EntityResolver2
  • org.xml.sax.ext.LexicalHandler
  • org.xml.sax.Locator
    • org.xml.sax.ext.Locator2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.xml.sax.ext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.xml.sax.ext

  • Packages that use org.xml.sax.ext
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
  • Classes in org.xml.sax.ext used by javax.xml.transform.sax
    Class and Description
    LexicalHandler
    SAX2 extension handler for lexical events.
  • Classes in org.xml.sax.ext used by org.xml.sax.ext
    Class and Description
    Attributes2
    SAX2 extension to augment the per-attribute information provided though Attributes.
    DeclHandler
    SAX2 extension handler for DTD declaration events.
    EntityResolver2
    Extended interface for mapping external entity references to input sources, or providing a missing external subset.
    LexicalHandler
    SAX2 extension handler for lexical events.
    Locator2
    SAX2 extension to augment the entity information provided though a Locator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Attributes2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Interface Attributes2

  • All Superinterfaces:
    Attributes
    All Known Implementing Classes:
    Attributes2Impl

    public interface Attributes2
extends Attributes
    SAX2 extension to augment the per-attribute information provided though Attributes. If an implementation supports this extension, the attributes provided in ContentHandler.startElement() will implement this interface, and the http://xml.org/sax/features/use-attributes2 feature flag will have the value true.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    XMLReader implementations are not required to support this information, and it is not part of core-only SAX2 distributions.

    Note that if an attribute was defaulted (!isSpecified()) it will of necessity also have been declared (isDeclared()) in the DTD. Similarly if an attribute's type is anything except CDATA, then it must have been declared.

    Since:
    SAX 2.0 (extensions 1.1 alpha)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isDeclared(int index)
      Returns false unless the attribute was declared in the DTD.
      boolean isDeclared(String qName)
      Returns false unless the attribute was declared in the DTD.
      boolean isDeclared(String uri, String localName)
      Returns false unless the attribute was declared in the DTD.
      boolean isSpecified(int index)
      Returns true unless the attribute value was provided by DTD defaulting.
      boolean isSpecified(String qName)
      Returns true unless the attribute value was provided by DTD defaulting.
      boolean isSpecified(String uri, String localName)
      Returns true unless the attribute value was provided by DTD defaulting.

      • Methods inherited from interface org.xml.sax.Attributes

        getIndex, getIndex, getLength, getLocalName, getQName, getType, getType, getType, getURI, getValue, getValue, getValue

    • Method Detail

      • isDeclared

        boolean isDeclared(int index)
        Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.

      • isDeclared

        boolean isDeclared(String qName)
        Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
        Throws:
        IllegalArgumentException - When the supplied name does not identify an attribute.

      • isDeclared

        boolean isDeclared(String uri,
                   String localName)
        Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

        Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
        Throws:
        IllegalArgumentException - When the supplied names do not identify an attribute.

      • isSpecified

        boolean isSpecified(int index)
        Returns true unless the attribute value was provided by DTD defaulting.
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        true if the value was found in the XML text, false if the value was provided by DTD defaulting.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.

      • isSpecified

        boolean isSpecified(String uri,
                    String localName)
        Returns true unless the attribute value was provided by DTD defaulting.

        Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        true if the value was found in the XML text, false if the value was provided by DTD defaulting.
        Throws:
        IllegalArgumentException - When the supplied names do not identify an attribute.

      • isSpecified

        boolean isSpecified(String qName)
        Returns true unless the attribute value was provided by DTD defaulting.
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        true if the value was found in the XML text, false if the value was provided by DTD defaulting.
        Throws:
        IllegalArgumentException - When the supplied name does not identify an attribute.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Attributes2Impl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Class Attributes2Impl

  • java.lang.Object
    • org.xml.sax.helpers.AttributesImpl
      • org.xml.sax.ext.Attributes2Impl
  • All Implemented Interfaces:
    Attributes, Attributes2

    public class Attributes2Impl
extends AttributesImpl
implements Attributes2
    SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    This is not part of core-only SAX2 distributions.

    The specified flag for each attribute will always be true, unless it has been set to false in the copy constructor or using setSpecified(int, boolean). Similarly, the declared flag for each attribute will always be false, except for defaulted attributes (specified is false), non-CDATA attributes, or when it is set to true using setDeclared(int, boolean). If you change an attribute's type by hand, you may need to modify its declared flag to match.

    Since:
    SAX 2.0 (extensions 1.1 alpha)

    • Constructor Summary

      Constructors
      Constructor and Description
      Attributes2Impl()
      Construct a new, empty Attributes2Impl object.
      Attributes2Impl(Attributes atts)
      Copy an existing Attributes or Attributes2 object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addAttribute(String uri, String localName, String qName, String type, String value)
      Add an attribute to the end of the list, setting its "specified" flag to true.
      boolean isDeclared(int index)
      Returns the current value of the attribute's "declared" flag.
      boolean isDeclared(String qName)
      Returns the current value of the attribute's "declared" flag.
      boolean isDeclared(String uri, String localName)
      Returns the current value of the attribute's "declared" flag.
      boolean isSpecified(int index)
      Returns the current value of an attribute's "specified" flag.
      boolean isSpecified(String qName)
      Returns the current value of an attribute's "specified" flag.
      boolean isSpecified(String uri, String localName)
      Returns the current value of an attribute's "specified" flag.
      void removeAttribute(int index)
      Remove an attribute from the list.
      void setAttributes(Attributes atts)
      Copy an entire Attributes object.
      void setDeclared(int index, boolean value)
      Assign a value to the "declared" flag of a specific attribute.
      void setSpecified(int index, boolean value)
      Assign a value to the "specified" flag of a specific attribute.

      • Methods inherited from class org.xml.sax.helpers.AttributesImpl

        clear, getIndex, getIndex, getLength, getLocalName, getQName, getType, getType, getType, getURI, getValue, getValue, getValue, setAttribute, setLocalName, setQName, setType, setURI, setValue

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.xml.sax.Attributes

        getIndex, getIndex, getLength, getLocalName, getQName, getType, getType, getType, getURI, getValue, getValue, getValue

    • Constructor Detail

      • Attributes2Impl

        public Attributes2Impl()
        Construct a new, empty Attributes2Impl object.

      • Attributes2Impl

        public Attributes2Impl(Attributes atts)
        Copy an existing Attributes or Attributes2 object. If the object implements Attributes2, values of the specified and declared flags for each attribute are copied. Otherwise the flag values are defaulted to assume no DTD was used, unless there is evidence to the contrary (such as attributes with type other than CDATA, which must have been declared).

        This constructor is especially useful inside a startElement event.

        Parameters:
        atts - The existing Attributes object.

    • Method Detail

      • isDeclared

        public boolean isDeclared(int index)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        true if the attribute was declared in the DTD, false otherwise.

      • isDeclared

        public boolean isDeclared(String uri,
                          String localName)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.

      • isDeclared

        public boolean isDeclared(String qName)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.

      • isSpecified

        public boolean isSpecified(int index)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        current flag value
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.

      • isSpecified

        public boolean isSpecified(String uri,
                           String localName)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        current flag value
        Throws:
        IllegalArgumentException - When the supplied names do not identify an attribute.

      • isSpecified

        public boolean isSpecified(String qName)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        current flag value
        Throws:
        IllegalArgumentException - When the supplied name does not identify an attribute.

      • setAttributes

        public void setAttributes(Attributes atts)
        Copy an entire Attributes object. The "specified" flags are assigned as true, and "declared" flags as false (except when an attribute's type is not CDATA), unless the object is an Attributes2 object. In that case those flag values are all copied.
        Overrides:
        setAttributes in class AttributesImpl
        Parameters:
        atts - The attributes to copy.
        See Also:
        AttributesImpl.setAttributes(org.xml.sax.Attributes)

      • addAttribute

        public void addAttribute(String uri,
                         String localName,
                         String qName,
                         String type,
                         String value)
        Add an attribute to the end of the list, setting its "specified" flag to true. To set that flag's value to false, use setSpecified(int, boolean).

        Unless the attribute type is CDATA, this attribute is marked as being declared in the DTD. To set that flag's value to true for CDATA attributes, use setDeclared(int, boolean).

        Overrides:
        addAttribute in class AttributesImpl
        Parameters:
        uri - The Namespace URI, or the empty string if none is available or Namespace processing is not being performed.
        localName - The local name, or the empty string if Namespace processing is not being performed.
        qName - The qualified (prefixed) name, or the empty string if qualified names are not available.
        type - The attribute type as a string.
        value - The attribute value.
        See Also:
        AttributesImpl.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • removeAttribute

        public void removeAttribute(int index)
        Description copied from class: AttributesImpl
        Remove an attribute from the list.
        Overrides:
        removeAttribute in class AttributesImpl
        Parameters:
        index - The index of the attribute (zero-based).

      • setDeclared

        public void setDeclared(int index,
                        boolean value)
        Assign a value to the "declared" flag of a specific attribute. This is normally needed only for attributes of type CDATA, including attributes whose type is changed to or from CDATA.
        Parameters:
        index - The index of the attribute (zero-based).
        value - The desired flag value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.
        See Also:
        AttributesImpl.setType(int, java.lang.String)

      • setSpecified

        public void setSpecified(int index,
                         boolean value)
        Assign a value to the "specified" flag of a specific attribute. This is the only way this flag can be cleared, except clearing by initialization with the copy constructor.
        Parameters:
        index - The index of the attribute (zero-based).
        value - The desired flag value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.ext.Attributes2Impl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.ext.Attributes2Impl

No usage of org.xml.sax.ext.Attributes2Impl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.ext.DefaultHandler2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.ext.DefaultHandler2

No usage of org.xml.sax.ext.DefaultHandler2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.ext.Locator2Impl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.ext.Locator2Impl

No usage of org.xml.sax.ext.Locator2Impl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ext.Attributes2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ext.Attributes2

  • Packages that use Attributes2
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of Attributes2 in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement Attributes2
      Modifier and Type Class and Description
      class  Attributes2Impl
      SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ext.DeclHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ext.DeclHandler

  • Packages that use DeclHandler
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of DeclHandler in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement DeclHandler
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ext.EntityResolver2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ext.EntityResolver2

  • Packages that use EntityResolver2
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of EntityResolver2 in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement EntityResolver2
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ext.LexicalHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ext.LexicalHandler

  • Packages that use LexicalHandler
    Package Description
    javax.xml.transform.sax
    This package implements SAX2-specific transformation APIs.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of LexicalHandler in javax.xml.transform.sax

      Subinterfaces of LexicalHandler in javax.xml.transform.sax
      Modifier and Type Interface and Description
      interface  TransformerHandler
      A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
      Methods in javax.xml.transform.sax that return LexicalHandler
      Modifier and Type Method and Description
      LexicalHandler SAXResult.getLexicalHandler()
      Get a SAX2 LexicalHandler for the output.
      Methods in javax.xml.transform.sax with parameters of type LexicalHandler
      Modifier and Type Method and Description
      void SAXResult.setLexicalHandler(LexicalHandler handler)
      Set the SAX2 LexicalHandler for the output.

    • Uses of LexicalHandler in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement LexicalHandler
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface org.xml.sax.ext.Locator2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
org.xml.sax.ext.Locator2

  • Packages that use Locator2
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of Locator2 in org.xml.sax.ext

      Classes in org.xml.sax.ext that implement Locator2
      Modifier and Type Class and Description
      class  Locator2Impl
      SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DeclHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Interface DeclHandler

  • All Known Implementing Classes:
    DefaultHandler2

    public interface DeclHandler
    SAX2 extension handler for DTD declaration events.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This is an optional extension handler for SAX2 to provide more complete information about DTD declarations in an XML document. XML readers are not required to recognize this handler, and it is not part of core-only SAX2 distributions.

    Note that data-related DTD declarations (unparsed entities and notations) are already reported through the DTDHandler interface.

    If you are using the declaration handler together with a lexical handler, all of the events will occur between the startDTD and the endDTD events.

    To set the DeclHandler for an XML reader, use the setProperty method with the property name http://xml.org/sax/properties/declaration-handler and an object implementing this interface (or null) as the value. If the reader does not report declaration events, it will throw a SAXNotRecognizedException when you attempt to register the handler.

    Since:
    SAX 2.0 (extensions 1.0)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void attributeDecl(String eName, String aName, String type, String mode, String value)
      Report an attribute type declaration.
      void elementDecl(String name, String model)
      Report an element type declaration.
      void externalEntityDecl(String name, String publicId, String systemId)
      Report a parsed external entity declaration.
      void internalEntityDecl(String name, String value)
      Report an internal entity declaration.

    • Method Detail

      • elementDecl

        void elementDecl(String name,
                 String model)
          throws SAXException
        Report an element type declaration.

        The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all parameter entities are fully resolved and all whitespace is removed,and will include the enclosing parentheses. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) is at the discretion of the parser.

        Parameters:
        name - The element type name.
        model - The content model as a normalized string.
        Throws:
        SAXException - The application may raise an exception.

      • attributeDecl

        void attributeDecl(String eName,
                   String aName,
                   String type,
                   String mode,
                   String value)
            throws SAXException
        Report an attribute type declaration.

        Only the effective (first) declaration for an attribute will be reported. The type will be one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", a parenthesized token group with the separator "|" and all whitespace removed, or the word "NOTATION" followed by a space followed by a parenthesized token group with all whitespace removed.

        The value will be the value as reported to applications, appropriately normalized and with entity and character references expanded.

        Parameters:
        eName - The name of the associated element.
        aName - The name of the attribute.
        type - A string representing the attribute type.
        mode - A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
        value - A string representing the attribute's default value, or null if there is none.
        Throws:
        SAXException - The application may raise an exception.

      • internalEntityDecl

        void internalEntityDecl(String name,
                        String value)
                 throws SAXException
        Report an internal entity declaration.

        Only the effective (first) declaration for each entity will be reported. All parameter entities in the value will be expanded, but general entities will not.

        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
        value - The replacement text of the entity.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        externalEntityDecl(java.lang.String, java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • externalEntityDecl

        void externalEntityDecl(String name,
                        String publicId,
                        String systemId)
                 throws SAXException
        Report a parsed external entity declaration.

        Only the effective (first) declaration for each entity will be reported.

        If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
        publicId - The entity's public identifier, or null if none was given.
        systemId - The entity's system identifier.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        internalEntityDecl(java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultHandler2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Class DefaultHandler2

  • java.lang.Object
    • org.xml.sax.helpers.DefaultHandler
      • org.xml.sax.ext.DefaultHandler2
  • All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, EntityResolver2, LexicalHandler

    public class DefaultHandler2
extends DefaultHandler
implements LexicalHandler, DeclHandler, EntityResolver2
    This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions. Except for overriding the original SAX1 resolveEntity() method the added handler methods just return. Subclassers may override everything on a method-by-method basis.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    Note: this class might yet learn that the ContentHandler.setDocumentLocator() call might be passed a Locator2 object, and that the ContentHandler.startElement() call might be passed a Attributes2 object.

    Since:
    SAX 2.0 (extensions 1.1 alpha)

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultHandler2()
      Constructs a handler which ignores all parsing events.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void attributeDecl(String eName, String aName, String type, String mode, String value)
      Report an attribute type declaration.
      void comment(char[] ch, int start, int length)
      Report an XML comment anywhere in the document.
      void elementDecl(String name, String model)
      Report an element type declaration.
      void endCDATA()
      Report the end of a CDATA section.
      void endDTD()
      Report the end of DTD declarations.
      void endEntity(String name)
      Report the end of an entity.
      void externalEntityDecl(String name, String publicId, String systemId)
      Report a parsed external entity declaration.
      InputSource getExternalSubset(String name, String baseURI)
      Tells the parser that if no external subset has been declared in the document text, none should be used.
      void internalEntityDecl(String name, String value)
      Report an internal entity declaration.
      InputSource resolveEntity(String publicId, String systemId)
      Invokes EntityResolver2.resolveEntity() with null entity name and base URI.
      InputSource resolveEntity(String name, String publicId, String baseURI, String systemId)
      Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI.
      void startCDATA()
      Report the start of a CDATA section.
      void startDTD(String name, String publicId, String systemId)
      Report the start of DTD declarations, if any.
      void startEntity(String name)
      Report the beginning of some internal and external XML entities.

      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DefaultHandler2

        public DefaultHandler2()
        Constructs a handler which ignores all parsing events.

    • Method Detail

      • startCDATA

        public void startCDATA()
                throws SAXException
        Description copied from interface: LexicalHandler
        Report the start of a CDATA section.

        The contents of the CDATA section will be reported through the regular characters event; this event is intended only to report the boundary.

        Specified by:
        startCDATA in interface LexicalHandler
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.endCDATA()

      • endCDATA

        public void endCDATA()
              throws SAXException
        Description copied from interface: LexicalHandler
        Report the end of a CDATA section.
        Specified by:
        endCDATA in interface LexicalHandler
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.startCDATA()

      • startDTD

        public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
        Description copied from interface: LexicalHandler
        Report the start of DTD declarations, if any.

        This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

        All declarations reported through DTDHandler or DeclHandler events must appear between the startDTD and endDTD events. Declarations are assumed to belong to the internal DTD subset unless they appear between startEntity and endEntity events. Comments and processing instructions from the DTD should also be reported between the startDTD and endDTD events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to DTDHandler or DeclHandler events, however.

        Note that the start/endDTD events will appear within the start/endDocument events from ContentHandler and before the first startElement event.

        Specified by:
        startDTD in interface LexicalHandler
        Parameters:
        name - The document type name.
        publicId - The declared public identifier for the external DTD subset, or null if none was declared.
        systemId - The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.endDTD(), LexicalHandler.startEntity(java.lang.String)

      • endDTD

        public void endDTD()
            throws SAXException
        Description copied from interface: LexicalHandler
        Report the end of DTD declarations.

        This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

        Specified by:
        endDTD in interface LexicalHandler
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)

      • startEntity

        public void startEntity(String name)
                 throws SAXException
        Description copied from interface: LexicalHandler
        Report the beginning of some internal and external XML entities.

        The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that report LexicalHandler events may not implement it; you can use the http://xml.org/sax/features/lexical-handler/parameter-entities feature to query or control the reporting of parameter entities.

        General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]".

        When a SAX2 driver is providing these events, all other events must be properly nested within start/end entity events. There is no additional requirement that events from DeclHandler or DTDHandler be properly ordered.

        Note that skipped entities will be reported through the skippedEntity event, which is part of the ContentHandler interface.

        Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:

        • general entities within attribute values
        • parameter entities within declarations

        These will be silently expanded, with no indication of where the original entity boundaries were.

        Note also that the boundaries of character references (which are not really entities anyway) are not reported.

        All start/endEntity events must be properly nested.

        Specified by:
        startEntity in interface LexicalHandler
        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.endEntity(java.lang.String),
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String),
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)

      • endEntity

        public void endEntity(String name)
               throws SAXException
        Description copied from interface: LexicalHandler
        Report the end of an entity.
        Specified by:
        endEntity in interface LexicalHandler
        Parameters:
        name - The name of the entity that is ending.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        LexicalHandler.startEntity(java.lang.String)

      • comment

        public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
        Description copied from interface: LexicalHandler
        Report an XML comment anywhere in the document.

        This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).

        Specified by:
        comment in interface LexicalHandler
        Parameters:
        ch - An array holding the characters in the comment.
        start - The starting position in the array.
        length - The number of characters to use from the array.
        Throws:
        SAXException - The application may raise an exception.

      • attributeDecl

        public void attributeDecl(String eName,
                          String aName,
                          String type,
                          String mode,
                          String value)
                   throws SAXException
        Description copied from interface: DeclHandler
        Report an attribute type declaration.

        Only the effective (first) declaration for an attribute will be reported. The type will be one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", a parenthesized token group with the separator "|" and all whitespace removed, or the word "NOTATION" followed by a space followed by a parenthesized token group with all whitespace removed.

        The value will be the value as reported to applications, appropriately normalized and with entity and character references expanded.

        Specified by:
        attributeDecl in interface DeclHandler
        Parameters:
        eName - The name of the associated element.
        aName - The name of the attribute.
        type - A string representing the attribute type.
        mode - A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
        value - A string representing the attribute's default value, or null if there is none.
        Throws:
        SAXException - The application may raise an exception.

      • elementDecl

        public void elementDecl(String name,
                        String model)
                 throws SAXException
        Description copied from interface: DeclHandler
        Report an element type declaration.

        The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all parameter entities are fully resolved and all whitespace is removed,and will include the enclosing parentheses. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) is at the discretion of the parser.

        Specified by:
        elementDecl in interface DeclHandler
        Parameters:
        name - The element type name.
        model - The content model as a normalized string.
        Throws:
        SAXException - The application may raise an exception.

      • externalEntityDecl

        public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
                        throws SAXException
        Description copied from interface: DeclHandler
        Report a parsed external entity declaration.

        Only the effective (first) declaration for each entity will be reported.

        If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

        Specified by:
        externalEntityDecl in interface DeclHandler
        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
        publicId - The entity's public identifier, or null if none was given.
        systemId - The entity's system identifier.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        DeclHandler.internalEntityDecl(java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • internalEntityDecl

        public void internalEntityDecl(String name,
                               String value)
                        throws SAXException
        Description copied from interface: DeclHandler
        Report an internal entity declaration.

        Only the effective (first) declaration for each entity will be reported. All parameter entities in the value will be expanded, but general entities will not.

        Specified by:
        internalEntityDecl in interface DeclHandler
        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
        value - The replacement text of the entity.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • getExternalSubset

        public InputSource getExternalSubset(String name,
                                     String baseURI)
                              throws SAXException,
                                     IOException
        Tells the parser that if no external subset has been declared in the document text, none should be used.
        Specified by:
        getExternalSubset in interface EntityResolver2
        Parameters:
        name - Identifies the document root element. This name comes from a DOCTYPE declaration (where available) or from the actual root element.
        baseURI - The document's base URI, serving as an additional hint for selecting the external subset. This is always an absolute URI, unless it is null because the XMLReader was given an InputSource without one.
        Returns:
        An InputSource object describing the new external subset to be used by the parser, or null to indicate that no external subset is provided.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - Probably indicating a failure to create a new InputStream or Reader, or an illegal URL.

      • resolveEntity

        public InputSource resolveEntity(String name,
                                 String publicId,
                                 String baseURI,
                                 String systemId)
                          throws SAXException,
                                 IOException
        Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. Note that because the older DefaultHandler.resolveEntity(), method is overridden to call this one, this method may sometimes be invoked with null name and baseURI, and with the systemId already absolutized.
        Specified by:
        resolveEntity in interface EntityResolver2
        Parameters:
        name - Identifies the external entity being resolved. Either "[dtd]" for the external subset, or a name starting with "%" to indicate a parameter entity, or else the name of a general entity. This is never null when invoked by a SAX2 parser.
        publicId - The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied.
        baseURI - The URI with respect to which relative systemIDs are interpreted. This is always an absolute URI, unless it is null (likely because the XMLReader was given an InputSource without one). This URI is defined by the XML specification to be the one associated with the "<" starting the relevant declaration.
        systemId - The system identifier of the external entity being referenced; either a relative or absolute URI. This is never null when invoked by a SAX2 parser; only declared entities, and any external subset, are resolved by such parsers.
        Returns:
        An InputSource object describing the new input source to be used by the parser. Returning null directs the parser to resolve the system ID against the base URI and open a connection to resulting URI.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - Probably indicating a failure to create a new InputStream or Reader, or an illegal URL.

      • resolveEntity

        public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
        Invokes EntityResolver2.resolveEntity() with null entity name and base URI. You only need to override that method to use this class.
        Specified by:
        resolveEntity in interface EntityResolver
        Overrides:
        resolveEntity in class DefaultHandler
        Parameters:
        publicId - The public identifier, or null if none is available.
        systemId - The system identifier provided in the XML document.
        Returns:
        The new input source, or null to require the default behaviour.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - A Java-specific IO exception, possibly the result of creating a new InputStream or Reader for the InputSource.
        See Also:
        EntityResolver.resolveEntity(java.lang.String, java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


EntityResolver2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Interface EntityResolver2

  • All Superinterfaces:
    EntityResolver
    All Known Implementing Classes:
    DefaultHandler2

    public interface EntityResolver2
extends EntityResolver
    Extended interface for mapping external entity references to input sources, or providing a missing external subset. The XMLReader.setEntityResolver() method is used to provide implementations of this interface to parsers. When a parser uses the methods in this interface, the EntityResolver2.resolveEntity() method (in this interface) is used instead of the older (SAX 1.0) EntityResolver.resolveEntity() method.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    If a SAX application requires the customized handling which this interface defines for external entities, it must ensure that it uses an XMLReader with the http://xml.org/sax/features/use-entity-resolver2 feature flag set to true (which is its default value when the feature is recognized). If that flag is unrecognized, or its value is false, or the resolver does not implement this interface, then only the EntityResolver method will be used.

    That supports three categories of application that modify entity resolution. Old Style applications won't know about this interface; they will provide an EntityResolver. Transitional Mode provide an EntityResolver2 and automatically get the benefit of its methods in any systems (parsers or other tools) supporting it, due to polymorphism. Both Old Style and Transitional Mode applications will work with any SAX2 parser. New style applications will fail to run except on SAX2 parsers that support this particular feature. They will insist that feature flag have a value of "true", and the EntityResolver2 implementation they provide might throw an exception if the original SAX 1.0 style entity resolution method is invoked.

    Since:
    SAX 2.0 (extensions 1.1 alpha)
    See Also:
    XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      InputSource getExternalSubset(String name, String baseURI)
      Allows applications to provide an external subset for documents that don't explicitly define one.
      InputSource resolveEntity(String name, String publicId, String baseURI, String systemId)
      Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution.

      • Methods inherited from interface org.xml.sax.EntityResolver

        resolveEntity

    • Method Detail

      • getExternalSubset

        InputSource getExternalSubset(String name,
                              String baseURI)
                       throws SAXException,
                              IOException
        Allows applications to provide an external subset for documents that don't explicitly define one. Documents with DOCTYPE declarations that omit an external subset can thus augment the declarations available for validation, entity processing, and attribute processing (normalization, defaulting, and reporting types including ID). This augmentation is reported through the startDTD() method as if the document text had originally included the external subset; this callback is made before any internal subset data or errors are reported.

        This method can also be used with documents that have no DOCTYPE declaration. When the root element is encountered, but no DOCTYPE declaration has been seen, this method is invoked. If it returns a value for the external subset, that root element is declared to be the root element, giving the effect of splicing a DOCTYPE declaration at the end the prolog of a document that could not otherwise be valid. The sequence of parser callbacks in that case logically resembles this:

         ... comments and PIs from the prolog (as usual)
 startDTD ("rootName", source.getPublicId (), source.getSystemId ());
 startEntity ("[dtd]");
 ... declarations, comments, and PIs from the external subset
 endEntity ("[dtd]");
 endDTD ();
 ... then the rest of the document (as usual)
 startElement (..., "rootName", ...);

        Note that the InputSource gets no further resolution. Implementations of this method may wish to invoke resolveEntity() to gain benefits such as use of local caches of DTD entities. Also, this method will never be used by a (non-validating) processor that is not including external parameter entities.

        Uses for this method include facilitating data validation when interoperating with XML processors that would always require undesirable network accesses for external entities, or which for other reasons adopt a "no DTDs" policy. Non-validation motives include forcing documents to include DTDs so that attributes are handled consistently. For example, an XPath processor needs to know which attibutes have type "ID" before it can process a widely used type of reference.

        Warning: Returning an external subset modifies the input document. By providing definitions for general entities, it can make a malformed document appear to be well formed.

        Parameters:
        name - Identifies the document root element. This name comes from a DOCTYPE declaration (where available) or from the actual root element.
        baseURI - The document's base URI, serving as an additional hint for selecting the external subset. This is always an absolute URI, unless it is null because the XMLReader was given an InputSource without one.
        Returns:
        An InputSource object describing the new external subset to be used by the parser, or null to indicate that no external subset is provided.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - Probably indicating a failure to create a new InputStream or Reader, or an illegal URL.

      • resolveEntity

        InputSource resolveEntity(String name,
                          String publicId,
                          String baseURI,
                          String systemId)
                   throws SAXException,
                          IOException
        Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution. This method is only called for external entities which have been properly declared. This method provides more flexibility than the EntityResolver interface, supporting implementations of more complex catalogue schemes such as the one defined by the OASIS XML Catalogs specification.

        Parsers configured to use this resolver method will call it to determine the input source to use for any external entity being included because of a reference in the XML text. That excludes the document entity, and any external entity returned by getExternalSubset(). When a (non-validating) processor is configured not to include a class of entities (parameter or general) through use of feature flags, this method is not invoked for such entities.

        Note that the entity naming scheme used here is the same one used in the LexicalHandler, or in the ContentHandler.skippedEntity() method.

        Parameters:
        name - Identifies the external entity being resolved. Either "[dtd]" for the external subset, or a name starting with "%" to indicate a parameter entity, or else the name of a general entity. This is never null when invoked by a SAX2 parser.
        publicId - The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied.
        baseURI - The URI with respect to which relative systemIDs are interpreted. This is always an absolute URI, unless it is null (likely because the XMLReader was given an InputSource without one). This URI is defined by the XML specification to be the one associated with the "<" starting the relevant declaration.
        systemId - The system identifier of the external entity being referenced; either a relative or absolute URI. This is never null when invoked by a SAX2 parser; only declared entities, and any external subset, are resolved by such parsers.
        Returns:
        An InputSource object describing the new input source to be used by the parser. Returning null directs the parser to resolve the system ID against the base URI and open a connection to resulting URI.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - Probably indicating a failure to create a new InputStream or Reader, or an illegal URL.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LexicalHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Interface LexicalHandler

  • All Known Subinterfaces:
    TransformerHandler
    All Known Implementing Classes:
    DefaultHandler2

    public interface LexicalHandler
    SAX2 extension handler for lexical events.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This is an optional extension handler for SAX2 to provide lexical information about an XML document, such as comments and CDATA section boundaries. XML readers are not required to recognize this handler, and it is not part of core-only SAX2 distributions.

    The events in the lexical handler apply to the entire document, not just to the document element, and all lexical handler events must appear between the content handler's startDocument and endDocument events.

    To set the LexicalHandler for an XML reader, use the setProperty method with the property name http://xml.org/sax/properties/lexical-handler and an object implementing this interface (or null) as the value. If the reader does not report lexical events, it will throw a SAXNotRecognizedException when you attempt to register the handler.

    Since:
    SAX 2.0 (extensions 1.0)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void comment(char[] ch, int start, int length)
      Report an XML comment anywhere in the document.
      void endCDATA()
      Report the end of a CDATA section.
      void endDTD()
      Report the end of DTD declarations.
      void endEntity(String name)
      Report the end of an entity.
      void startCDATA()
      Report the start of a CDATA section.
      void startDTD(String name, String publicId, String systemId)
      Report the start of DTD declarations, if any.
      void startEntity(String name)
      Report the beginning of some internal and external XML entities.

    • Method Detail

      • startDTD

        void startDTD(String name,
              String publicId,
              String systemId)
       throws SAXException
        Report the start of DTD declarations, if any.

        This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

        All declarations reported through DTDHandler or DeclHandler events must appear between the startDTD and endDTD events. Declarations are assumed to belong to the internal DTD subset unless they appear between startEntity and endEntity events. Comments and processing instructions from the DTD should also be reported between the startDTD and endDTD events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to DTDHandler or DeclHandler events, however.

        Note that the start/endDTD events will appear within the start/endDocument events from ContentHandler and before the first startElement event.

        Parameters:
        name - The document type name.
        publicId - The declared public identifier for the external DTD subset, or null if none was declared.
        systemId - The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        endDTD(), startEntity(java.lang.String)

      • endDTD

        void endDTD()
     throws SAXException
        Report the end of DTD declarations.

        This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

        Throws:
        SAXException - The application may raise an exception.
        See Also:
        startDTD(java.lang.String, java.lang.String, java.lang.String)

      • startEntity

        void startEntity(String name)
          throws SAXException
        Report the beginning of some internal and external XML entities.

        The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that report LexicalHandler events may not implement it; you can use the http://xml.org/sax/features/lexical-handler/parameter-entities feature to query or control the reporting of parameter entities.

        General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]".

        When a SAX2 driver is providing these events, all other events must be properly nested within start/end entity events. There is no additional requirement that events from DeclHandler or DTDHandler be properly ordered.

        Note that skipped entities will be reported through the skippedEntity event, which is part of the ContentHandler interface.

        Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:

        • general entities within attribute values
        • parameter entities within declarations

        These will be silently expanded, with no indication of where the original entity boundaries were.

        Note also that the boundaries of character references (which are not really entities anyway) are not reported.

        All start/endEntity events must be properly nested.

        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        endEntity(java.lang.String),
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String),
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)

      • endEntity

        void endEntity(String name)
        throws SAXException
        Report the end of an entity.
        Parameters:
        name - The name of the entity that is ending.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        startEntity(java.lang.String)

      • startCDATA

        void startCDATA()
         throws SAXException
        Report the start of a CDATA section.

        The contents of the CDATA section will be reported through the regular characters event; this event is intended only to report the boundary.

        Throws:
        SAXException - The application may raise an exception.
        See Also:
        endCDATA()

      • endCDATA

        void endCDATA()
       throws SAXException
        Report the end of a CDATA section.
        Throws:
        SAXException - The application may raise an exception.
        See Also:
        startCDATA()

      • comment

        void comment(char[] ch,
             int start,
             int length)
      throws SAXException
        Report an XML comment anywhere in the document.

        This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).

        Parameters:
        ch - An array holding the characters in the comment.
        start - The starting position in the array.
        length - The number of characters to use from the array.
        Throws:
        SAXException - The application may raise an exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Locator2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Interface Locator2

  • All Superinterfaces:
    Locator
    All Known Implementing Classes:
    Locator2Impl

    public interface Locator2
extends Locator
    SAX2 extension to augment the entity information provided though a Locator. If an implementation supports this extension, the Locator provided in ContentHandler.setDocumentLocator() will implement this interface, and the http://xml.org/sax/features/use-locator2 feature flag will have the value true.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    XMLReader implementations are not required to support this information, and it is not part of core-only SAX2 distributions.

    Since:
    SAX 2.0 (extensions 1.1 alpha)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getEncoding()
      Returns the name of the character encoding for the entity.
      String getXMLVersion()
      Returns the version of XML used for the entity.

      • Methods inherited from interface org.xml.sax.Locator

        getColumnNumber, getLineNumber, getPublicId, getSystemId

    • Method Detail

      • getXMLVersion

        String getXMLVersion()
        Returns the version of XML used for the entity. This will normally be the identifier from the current entity's <?xml version='...' ...?> declaration, or be defaulted by the parser.
        Returns:
        Identifier for the XML version being used to interpret the entity's text, or null if that information is not yet available in the current parsing state.

      • getEncoding

        String getEncoding()
        Returns the name of the character encoding for the entity. If the encoding was declared externally (for example, in a MIME Content-Type header), that will be the name returned. Else if there was an <?xml ...encoding='...'?> declaration at the start of the document, that encoding name will be returned. Otherwise the encoding will been inferred (normally to be UTF-8, or some UTF-16 variant), and that inferred name will be returned.

        When an InputSource is used to provide an entity's character stream, this method returns the encoding provided in that input stream.

        Note that some recent W3C specifications require that text in some encodings be normalized, using Unicode Normalization Form C, before processing. Such normalization must be performed by applications, and would normally be triggered based on the value returned by this method.

        Encoding names may be those used by the underlying JVM, and comparisons should be case-insensitive.

        Returns:
        Name of the character encoding being used to interpret * the entity's text, or null if this was not provided for a * character stream passed through an InputSource or is otherwise not yet available in the current parsing state.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Locator2Impl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.ext

Class Locator2Impl

  • java.lang.Object
    • org.xml.sax.helpers.LocatorImpl
      • org.xml.sax.ext.Locator2Impl
  • All Implemented Interfaces:
    Locator2, Locator

    public class Locator2Impl
extends LocatorImpl
implements Locator2
    SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    This is not part of core-only SAX2 distributions.

    Since:
    SAX 2.0.2

    • Constructor Summary

      Constructors
      Constructor and Description
      Locator2Impl()
      Construct a new, empty Locator2Impl object.
      Locator2Impl(Locator locator)
      Copy an existing Locator or Locator2 object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String getEncoding()
      Returns the current value of the encoding property.
      String getXMLVersion()
      Returns the current value of the version property.
      void setEncoding(String encoding)
      Assigns the current value of the encoding property.
      void setXMLVersion(String version)
      Assigns the current value of the version property.

      • Methods inherited from class org.xml.sax.helpers.LocatorImpl

        getColumnNumber, getLineNumber, getPublicId, getSystemId, setColumnNumber, setLineNumber, setPublicId, setSystemId

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface org.xml.sax.Locator

        getColumnNumber, getLineNumber, getPublicId, getSystemId

    • Constructor Detail

      • Locator2Impl

        public Locator2Impl()
        Construct a new, empty Locator2Impl object. This will not normally be useful, since the main purpose of this class is to make a snapshot of an existing Locator.

      • Locator2Impl

        public Locator2Impl(Locator locator)
        Copy an existing Locator or Locator2 object. If the object implements Locator2, values of the encoding and versionstrings are copied, otherwise they set to null.
        Parameters:
        locator - The existing Locator object.

    • Method Detail

      • getXMLVersion

        public String getXMLVersion()
        Returns the current value of the version property.
        Specified by:
        getXMLVersion in interface Locator2
        Returns:
        Identifier for the XML version being used to interpret the entity's text, or null if that information is not yet available in the current parsing state.
        See Also:
        setXMLVersion(java.lang.String)

      • getEncoding

        public String getEncoding()
        Returns the current value of the encoding property.
        Specified by:
        getEncoding in interface Locator2
        Returns:
        Name of the character encoding being used to interpret * the entity's text, or null if this was not provided for a * character stream passed through an InputSource or is otherwise not yet available in the current parsing state.
        See Also:
        setEncoding(java.lang.String)

      • setXMLVersion

        public void setXMLVersion(String version)
        Assigns the current value of the version property.
        Parameters:
        version - the new "version" value
        See Also:
        getXMLVersion()

      • setEncoding

        public void setEncoding(String encoding)
        Assigns the current value of the encoding property.
        Parameters:
        encoding - the new "encoding" value
        See Also:
        getEncoding()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


HandlerBase

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class HandlerBase

  • java.lang.Object
    • org.xml.sax.HandlerBase
  • All Implemented Interfaces:
    DocumentHandler, DTDHandler, EntityResolver, ErrorHandler
    Deprecated.
    This class works with the deprecated DocumentHandler interface. It has been replaced by the SAX2 DefaultHandler class.

    public class HandlerBase
extends Object
implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
    Default base class for handlers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class implements the default behaviour for four SAX1 interfaces: EntityResolver, DTDHandler, DocumentHandler, and ErrorHandler. It is now obsolete, but is included in SAX2 to support legacy SAX1 applications. SAX2 applications should use the DefaultHandler class instead.

    Application writers can extend this class when they need to implement only part of an interface; parser writers can instantiate this class to provide default handlers when the application has not supplied its own.

    Note that the use of this class is optional.

    Since:
    SAX 1.0
    See Also:
    EntityResolver, DTDHandler, DocumentHandler, ErrorHandler

    • Constructor Summary

      Constructors
      Constructor and Description
      HandlerBase()
      Deprecated.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Deprecated.
      Receive notification of character data inside an element.
      void endDocument()
      Deprecated.
      Receive notification of the end of the document.
      void endElement(String name)
      Deprecated.
      Receive notification of the end of an element.
      void error(SAXParseException e)
      Deprecated.
      Receive notification of a recoverable parser error.
      void fatalError(SAXParseException e)
      Deprecated.
      Report a fatal XML parsing error.
      void ignorableWhitespace(char[] ch, int start, int length)
      Deprecated.
      Receive notification of ignorable whitespace in element content.
      void notationDecl(String name, String publicId, String systemId)
      Deprecated.
      Receive notification of a notation declaration.
      void processingInstruction(String target, String data)
      Deprecated.
      Receive notification of a processing instruction.
      InputSource resolveEntity(String publicId, String systemId)
      Deprecated.
      Resolve an external entity.
      void setDocumentLocator(Locator locator)
      Deprecated.
      Receive a Locator object for document events.
      void startDocument()
      Deprecated.
      Receive notification of the beginning of the document.
      void startElement(String name, AttributeList attributes)
      Deprecated.
      Receive notification of the start of an element.
      void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Deprecated.
      Receive notification of an unparsed entity declaration.
      void warning(SAXParseException e)
      Deprecated.
      Receive notification of a parser warning.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • HandlerBase

        public HandlerBase()
        Deprecated.

    • Method Detail

      • resolveEntity

        public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException
        Deprecated.
        Resolve an external entity.

        Always return null, so that the parser will use the system identifier provided in the XML document. This method implements the SAX default behaviour: application writers can override it in a subclass to do special translations such as catalog lookups or URI redirection.

        Specified by:
        resolveEntity in interface EntityResolver
        Parameters:
        publicId - The public identifer, or null if none is available.
        systemId - The system identifier provided in the XML document.
        Returns:
        The new input source, or null to require the default behaviour.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        EntityResolver.resolveEntity(java.lang.String, java.lang.String)

      • notationDecl

        public void notationDecl(String name,
                         String publicId,
                         String systemId)
        Deprecated.
        Receive notification of a notation declaration.

        By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document.

        Specified by:
        notationDecl in interface DTDHandler
        Parameters:
        name - The notation name.
        publicId - The notation public identifier, or null if not available.
        systemId - The notation system identifier.
        See Also:
        DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)

      • unparsedEntityDecl

        public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
        Deprecated.
        Receive notification of an unparsed entity declaration.

        By default, do nothing. Application writers may override this method in a subclass to keep track of the unparsed entities declared in a document.

        Specified by:
        unparsedEntityDecl in interface DTDHandler
        Parameters:
        name - The entity name.
        publicId - The entity public identifier, or null if not available.
        systemId - The entity system identifier.
        notationName - The name of the associated notation.
        See Also:
        DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • setDocumentLocator

        public void setDocumentLocator(Locator locator)
        Deprecated.
        Receive a Locator object for document events.

        By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events.

        Specified by:
        setDocumentLocator in interface DocumentHandler
        Parameters:
        locator - A locator for all SAX document events.
        See Also:
        DocumentHandler.setDocumentLocator(org.xml.sax.Locator), Locator

      • startDocument

        public void startDocument()
                   throws SAXException
        Deprecated.
        Receive notification of the beginning of the document.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

        Specified by:
        startDocument in interface DocumentHandler
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.startDocument()

      • endDocument

        public void endDocument()
                 throws SAXException
        Deprecated.
        Receive notification of the end of the document.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

        Specified by:
        endDocument in interface DocumentHandler
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.endDocument()

      • startElement

        public void startElement(String name,
                         AttributeList attributes)
                  throws SAXException
        Deprecated.
        Receive notification of the start of an element.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

        Specified by:
        startElement in interface DocumentHandler
        Parameters:
        name - The element type name.
        attributes - The specified or defaulted attributes.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

      • endElement

        public void endElement(String name)
                throws SAXException
        Deprecated.
        Receive notification of the end of an element.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

        Specified by:
        endElement in interface DocumentHandler
        Parameters:
        name - the element name
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.endElement(java.lang.String)

      • characters

        public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
        Deprecated.
        Receive notification of character data inside an element.

        By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

        Specified by:
        characters in interface DocumentHandler
        Parameters:
        ch - The characters.
        start - The start position in the character array.
        length - The number of characters to use from the character array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.characters(char[], int, int)

      • ignorableWhitespace

        public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
        Deprecated.
        Receive notification of ignorable whitespace in element content.

        By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).

        Specified by:
        ignorableWhitespace in interface DocumentHandler
        Parameters:
        ch - The whitespace characters.
        start - The start position in the character array.
        length - The number of characters to use from the character array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.ignorableWhitespace(char[], int, int)

      • processingInstruction

        public void processingInstruction(String target,
                                  String data)
                           throws SAXException
        Deprecated.
        Receive notification of a processing instruction.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

        Specified by:
        processingInstruction in interface DocumentHandler
        Parameters:
        target - The processing instruction target.
        data - The processing instruction data, or null if none is supplied.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DocumentHandler.processingInstruction(java.lang.String, java.lang.String)

      • warning

        public void warning(SAXParseException e)
             throws SAXException
        Deprecated.
        Receive notification of a parser warning.

        The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each warning, such as inserting the message in a log file or printing it to the console.

        Specified by:
        warning in interface ErrorHandler
        Parameters:
        e - The warning information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.warning(org.xml.sax.SAXParseException), SAXParseException

      • error

        public void error(SAXParseException e)
           throws SAXException
        Deprecated.
        Receive notification of a recoverable parser error.

        The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console.

        Specified by:
        error in interface ErrorHandler
        Parameters:
        e - The warning information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.warning(org.xml.sax.SAXParseException), SAXParseException

      • fatalError

        public void fatalError(SAXParseException e)
                throws SAXException
        Deprecated.
        Report a fatal XML parsing error.

        The default implementation throws a SAXParseException. Application writers may override this method in a subclass if they need to take specific actions for each fatal error (such as collecting all of the errors into a single report): in any case, the application must stop all regular processing when this method is invoked, since the document is no longer reliable, and the parser may no longer report parsing events.

        Specified by:
        fatalError in interface ErrorHandler
        Parameters:
        e - The error information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.fatalError(org.xml.sax.SAXParseException), SAXParseException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package org.xml.sax.helpers

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See: Description

  • Class Summary
    Class Description
    AttributeListImpl Deprecated
    This class implements a deprecated interface, AttributeList; that interface has been replaced by Attributes, which is implemented in the AttributesImpl helper class.
    AttributesImpl
    Default implementation of the Attributes interface.
    DefaultHandler
    Default base class for SAX2 event handlers.
    LocatorImpl
    Provide an optional convenience implementation of Locator.
    NamespaceSupport
    Encapsulate Namespace logic for use by applications using SAX, or internally by SAX drivers.
    ParserAdapter
    Adapt a SAX1 Parser as a SAX2 XMLReader.
    ParserFactory Deprecated
    This class works with the deprecated Parser interface.
    XMLFilterImpl
    Base class for deriving an XML filter.
    XMLReaderAdapter
    Adapt a SAX2 XMLReader as a SAX1 Parser.
    XMLReaderFactory
    Factory for creating an XML reader.

Package org.xml.sax.helpers Description

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See http://www.saxproject.org for more information about SAX.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax.helpers Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package org.xml.sax.helpers

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • org.xml.sax.helpers.AttributeListImpl (implements org.xml.sax.AttributeList)
    • org.xml.sax.helpers.AttributesImpl (implements org.xml.sax.Attributes)
    • org.xml.sax.helpers.DefaultHandler (implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler)
    • org.xml.sax.helpers.LocatorImpl (implements org.xml.sax.Locator)
    • org.xml.sax.helpers.NamespaceSupport
    • org.xml.sax.helpers.ParserAdapter (implements org.xml.sax.DocumentHandler, org.xml.sax.XMLReader)
    • org.xml.sax.helpers.ParserFactory
    • org.xml.sax.helpers.XMLFilterImpl (implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter)
    • org.xml.sax.helpers.XMLReaderAdapter (implements org.xml.sax.ContentHandler, org.xml.sax.Parser)
    • org.xml.sax.helpers.XMLReaderFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package org.xml.sax.helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
org.xml.sax.helpers

  • Packages that use org.xml.sax.helpers
    Package Description
    java.beans
    Contains classes related to developing beans -- components based on the JavaBeans™ architecture.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.
  • Classes in org.xml.sax.helpers used by java.beans
    Class and Description
    DefaultHandler
    Default base class for SAX2 event handlers.
  • Classes in org.xml.sax.helpers used by javax.xml.parsers
    Class and Description
    DefaultHandler
    Default base class for SAX2 event handlers.
  • Classes in org.xml.sax.helpers used by org.xml.sax.ext
    Class and Description
    AttributesImpl
    Default implementation of the Attributes interface.
    DefaultHandler
    Default base class for SAX2 event handlers.
    LocatorImpl
    Provide an optional convenience implementation of Locator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttributeListImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class AttributeListImpl

  • java.lang.Object
    • org.xml.sax.helpers.AttributeListImpl
  • All Implemented Interfaces:
    AttributeList
    Deprecated.
    This class implements a deprecated interface, AttributeList; that interface has been replaced by Attributes, which is implemented in the AttributesImpl helper class.

    public class AttributeListImpl
extends Object
implements AttributeList
    Default implementation for AttributeList.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    AttributeList implements the deprecated SAX1 AttributeList interface, and has been replaced by the new SAX2 AttributesImpl interface.

    This class provides a convenience implementation of the SAX AttributeList interface. This implementation is useful both for SAX parser writers, who can use it to provide attributes to the application, and for SAX application writers, who can use it to create a persistent copy of an element's attribute specifications:

     private AttributeList myatts;

 public void startElement (String name, AttributeList atts)
 {
              // create a persistent copy of the attribute list
              // for use outside this method
   myatts = new AttributeListImpl(atts);
   [...]
 }

    Please note that SAX parsers are not required to use this class to provide an implementation of AttributeList; it is supplied only as an optional convenience. In particular, parser writers are encouraged to invent more efficient implementations.

    Since:
    SAX 1.0
    See Also:
    AttributeList, DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

    • Constructor Summary

      Constructors
      Constructor and Description
      AttributeListImpl()
      Deprecated.
      Create an empty attribute list.
      AttributeListImpl(AttributeList atts)
      Deprecated.
      Construct a persistent copy of an existing attribute list.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      void addAttribute(String name, String type, String value)
      Deprecated.
      Add an attribute to an attribute list.
      void clear()
      Deprecated.
      Clear the attribute list.
      int getLength()
      Deprecated.
      Return the number of attributes in the list.
      String getName(int i)
      Deprecated.
      Get the name of an attribute (by position).
      String getType(int i)
      Deprecated.
      Get the type of an attribute (by position).
      String getType(String name)
      Deprecated.
      Get the type of an attribute (by name).
      String getValue(int i)
      Deprecated.
      Get the value of an attribute (by position).
      String getValue(String name)
      Deprecated.
      Get the value of an attribute (by name).
      void removeAttribute(String name)
      Deprecated.
      Remove an attribute from the list.
      void setAttributeList(AttributeList atts)
      Deprecated.
      Set the attribute list, discarding previous contents.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttributeListImpl

        public AttributeListImpl()
        Deprecated.
        Create an empty attribute list.

        This constructor is most useful for parser writers, who will use it to create a single, reusable attribute list that can be reset with the clear method between elements.

        See Also:
        addAttribute(java.lang.String, java.lang.String, java.lang.String), clear()

      • AttributeListImpl

        public AttributeListImpl(AttributeList atts)
        Deprecated.
        Construct a persistent copy of an existing attribute list.

        This constructor is most useful for application writers, who will use it to create a persistent copy of an existing attribute list.

        Parameters:
        atts - The attribute list to copy
        See Also:
        DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

    • Method Detail

      • setAttributeList

        public void setAttributeList(AttributeList atts)
        Deprecated.
        Set the attribute list, discarding previous contents.

        This method allows an application writer to reuse an attribute list easily.

        Parameters:
        atts - The attribute list to copy.

      • addAttribute

        public void addAttribute(String name,
                         String type,
                         String value)
        Deprecated.
        Add an attribute to an attribute list.

        This method is provided for SAX parser writers, to allow them to build up an attribute list incrementally before delivering it to the application.

        Parameters:
        name - The attribute name.
        type - The attribute type ("NMTOKEN" for an enumeration).
        value - The attribute value (must not be null).
        See Also:
        removeAttribute(java.lang.String), DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

      • removeAttribute

        public void removeAttribute(String name)
        Deprecated.
        Remove an attribute from the list.

        SAX application writers can use this method to filter an attribute out of an AttributeList. Note that invoking this method will change the length of the attribute list and some of the attribute's indices.

        If the requested attribute is not in the list, this is a no-op.

        Parameters:
        name - The attribute name.
        See Also:
        addAttribute(java.lang.String, java.lang.String, java.lang.String)

      • clear

        public void clear()
        Deprecated.
        Clear the attribute list.

        SAX parser writers can use this method to reset the attribute list between DocumentHandler.startElement events. Normally, it will make sense to reuse the same AttributeListImpl object rather than allocating a new one each time.

        See Also:
        DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

      • getLength

        public int getLength()
        Deprecated.
        Return the number of attributes in the list.
        Specified by:
        getLength in interface AttributeList
        Returns:
        The number of attributes in the list.
        See Also:
        AttributeList.getLength()

      • getName

        public String getName(int i)
        Deprecated.
        Get the name of an attribute (by position).
        Specified by:
        getName in interface AttributeList
        Parameters:
        i - The position of the attribute in the list.
        Returns:
        The attribute name as a string, or null if there is no attribute at that position.
        See Also:
        AttributeList.getName(int)

      • getType

        public String getType(int i)
        Deprecated.
        Get the type of an attribute (by position).
        Specified by:
        getType in interface AttributeList
        Parameters:
        i - The position of the attribute in the list.
        Returns:
        The attribute type as a string ("NMTOKEN" for an enumeration, and "CDATA" if no declaration was read), or null if there is no attribute at that position.
        See Also:
        AttributeList.getType(int)

      • getValue

        public String getValue(int i)
        Deprecated.
        Get the value of an attribute (by position).
        Specified by:
        getValue in interface AttributeList
        Parameters:
        i - The position of the attribute in the list.
        Returns:
        The attribute value as a string, or null if there is no attribute at that position.
        See Also:
        AttributeList.getValue(int)

      • getType

        public String getType(String name)
        Deprecated.
        Get the type of an attribute (by name).
        Specified by:
        getType in interface AttributeList
        Parameters:
        name - The attribute name.
        Returns:
        The attribute type as a string ("NMTOKEN" for an enumeration, and "CDATA" if no declaration was read).
        See Also:
        AttributeList.getType(java.lang.String)

      • getValue

        public String getValue(String name)
        Deprecated.
        Get the value of an attribute (by name).
        Specified by:
        getValue in interface AttributeList
        Parameters:
        name - The attribute name.
        Returns:
        The attribute value as a string, or null if no such attribute exists.
        See Also:
        AttributeList.getValue(java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


AttributesImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class AttributesImpl

  • java.lang.Object
    • org.xml.sax.helpers.AttributesImpl
  • All Implemented Interfaces:
    Attributes
    Direct Known Subclasses:
    Attributes2Impl

    public class AttributesImpl
extends Object
implements Attributes
    Default implementation of the Attributes interface.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class provides a default implementation of the SAX2 Attributes interface, with the addition of manipulators so that the list can be modified or reused.

    There are two typical uses of this class:

    1. to take a persistent snapshot of an Attributes object in a startElement event; or
    2. to construct or modify an Attributes object in a SAX2 driver or filter.

    This class replaces the now-deprecated SAX1 AttributeListImpl class; in addition to supporting the updated Attributes interface rather than the deprecated AttributeList interface, it also includes a much more efficient implementation using a single array rather than a set of Vectors.

    Since:
    SAX 2.0

    • Constructor Summary

      Constructors
      Constructor and Description
      AttributesImpl()
      Construct a new, empty AttributesImpl object.
      AttributesImpl(Attributes atts)
      Copy an existing Attributes object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void addAttribute(String uri, String localName, String qName, String type, String value)
      Add an attribute to the end of the list.
      void clear()
      Clear the attribute list for reuse.
      int getIndex(String qName)
      Look up an attribute's index by qualified (prefixed) name.
      int getIndex(String uri, String localName)
      Look up an attribute's index by Namespace name.
      int getLength()
      Return the number of attributes in the list.
      String getLocalName(int index)
      Return an attribute's local name.
      String getQName(int index)
      Return an attribute's qualified (prefixed) name.
      String getType(int index)
      Return an attribute's type by index.
      String getType(String qName)
      Look up an attribute's type by qualified (prefixed) name.
      String getType(String uri, String localName)
      Look up an attribute's type by Namespace-qualified name.
      String getURI(int index)
      Return an attribute's Namespace URI.
      String getValue(int index)
      Return an attribute's value by index.
      String getValue(String qName)
      Look up an attribute's value by qualified (prefixed) name.
      String getValue(String uri, String localName)
      Look up an attribute's value by Namespace-qualified name.
      void removeAttribute(int index)
      Remove an attribute from the list.
      void setAttribute(int index, String uri, String localName, String qName, String type, String value)
      Set an attribute in the list.
      void setAttributes(Attributes atts)
      Copy an entire Attributes object.
      void setLocalName(int index, String localName)
      Set the local name of a specific attribute.
      void setQName(int index, String qName)
      Set the qualified name of a specific attribute.
      void setType(int index, String type)
      Set the type of a specific attribute.
      void setURI(int index, String uri)
      Set the Namespace URI of a specific attribute.
      void setValue(int index, String value)
      Set the value of a specific attribute.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttributesImpl

        public AttributesImpl()
        Construct a new, empty AttributesImpl object.

      • AttributesImpl

        public AttributesImpl(Attributes atts)
        Copy an existing Attributes object.

        This constructor is especially useful inside a startElement event.

        Parameters:
        atts - The existing Attributes object.

    • Method Detail

      • getLength

        public int getLength()
        Return the number of attributes in the list.
        Specified by:
        getLength in interface Attributes
        Returns:
        The number of attributes in the list.
        See Also:
        Attributes.getLength()

      • getURI

        public String getURI(int index)
        Return an attribute's Namespace URI.
        Specified by:
        getURI in interface Attributes
        Parameters:
        index - The attribute's index (zero-based).
        Returns:
        The Namespace URI, the empty string if none is available, or null if the index is out of range.
        See Also:
        Attributes.getURI(int)

      • getLocalName

        public String getLocalName(int index)
        Return an attribute's local name.
        Specified by:
        getLocalName in interface Attributes
        Parameters:
        index - The attribute's index (zero-based).
        Returns:
        The attribute's local name, the empty string if none is available, or null if the index if out of range.
        See Also:
        Attributes.getLocalName(int)

      • getQName

        public String getQName(int index)
        Return an attribute's qualified (prefixed) name.
        Specified by:
        getQName in interface Attributes
        Parameters:
        index - The attribute's index (zero-based).
        Returns:
        The attribute's qualified name, the empty string if none is available, or null if the index is out of bounds.
        See Also:
        Attributes.getQName(int)

      • getType

        public String getType(int index)
        Return an attribute's type by index.
        Specified by:
        getType in interface Attributes
        Parameters:
        index - The attribute's index (zero-based).
        Returns:
        The attribute's type, "CDATA" if the type is unknown, or null if the index is out of bounds.
        See Also:
        Attributes.getType(int)

      • getValue

        public String getValue(int index)
        Return an attribute's value by index.
        Specified by:
        getValue in interface Attributes
        Parameters:
        index - The attribute's index (zero-based).
        Returns:
        The attribute's value or null if the index is out of bounds.
        See Also:
        Attributes.getValue(int)

      • getIndex

        public int getIndex(String uri,
                    String localName)
        Look up an attribute's index by Namespace name.

        In many cases, it will be more efficient to look up the name once and use the index query methods rather than using the name query methods repeatedly.

        Specified by:
        getIndex in interface Attributes
        Parameters:
        uri - The attribute's Namespace URI, or the empty string if none is available.
        localName - The attribute's local name.
        Returns:
        The attribute's index, or -1 if none matches.
        See Also:
        Attributes.getIndex(java.lang.String,java.lang.String)

      • getIndex

        public int getIndex(String qName)
        Look up an attribute's index by qualified (prefixed) name.
        Specified by:
        getIndex in interface Attributes
        Parameters:
        qName - The qualified name.
        Returns:
        The attribute's index, or -1 if none matches.
        See Also:
        Attributes.getIndex(java.lang.String)

      • getType

        public String getType(String uri,
                      String localName)
        Look up an attribute's type by Namespace-qualified name.
        Specified by:
        getType in interface Attributes
        Parameters:
        uri - The Namespace URI, or the empty string for a name with no explicit Namespace URI.
        localName - The local name.
        Returns:
        The attribute's type, or null if there is no matching attribute.
        See Also:
        Attributes.getType(java.lang.String,java.lang.String)

      • getType

        public String getType(String qName)
        Look up an attribute's type by qualified (prefixed) name.
        Specified by:
        getType in interface Attributes
        Parameters:
        qName - The qualified name.
        Returns:
        The attribute's type, or null if there is no matching attribute.
        See Also:
        Attributes.getType(java.lang.String)

      • getValue

        public String getValue(String uri,
                       String localName)
        Look up an attribute's value by Namespace-qualified name.
        Specified by:
        getValue in interface Attributes
        Parameters:
        uri - The Namespace URI, or the empty string for a name with no explicit Namespace URI.
        localName - The local name.
        Returns:
        The attribute's value, or null if there is no matching attribute.
        See Also:
        Attributes.getValue(java.lang.String,java.lang.String)

      • getValue

        public String getValue(String qName)
        Look up an attribute's value by qualified (prefixed) name.
        Specified by:
        getValue in interface Attributes
        Parameters:
        qName - The qualified name.
        Returns:
        The attribute's value, or null if there is no matching attribute.
        See Also:
        Attributes.getValue(java.lang.String)

      • clear

        public void clear()
        Clear the attribute list for reuse.

        Note that little memory is freed by this call: the current array is kept so it can be reused.

      • setAttributes

        public void setAttributes(Attributes atts)
        Copy an entire Attributes object.

        It may be more efficient to reuse an existing object rather than constantly allocating new ones.

        Parameters:
        atts - The attributes to copy.

      • addAttribute

        public void addAttribute(String uri,
                         String localName,
                         String qName,
                         String type,
                         String value)
        Add an attribute to the end of the list.

        For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.

        Parameters:
        uri - The Namespace URI, or the empty string if none is available or Namespace processing is not being performed.
        localName - The local name, or the empty string if Namespace processing is not being performed.
        qName - The qualified (prefixed) name, or the empty string if qualified names are not available.
        type - The attribute type as a string.
        value - The attribute value.

      • setAttribute

        public void setAttribute(int index,
                         String uri,
                         String localName,
                         String qName,
                         String type,
                         String value)
        Set an attribute in the list.

        For the sake of speed, this method does no checking for name conflicts or well-formedness: such checks are the responsibility of the application.

        Parameters:
        index - The index of the attribute (zero-based).
        uri - The Namespace URI, or the empty string if none is available or Namespace processing is not being performed.
        localName - The local name, or the empty string if Namespace processing is not being performed.
        qName - The qualified name, or the empty string if qualified names are not available.
        type - The attribute type as a string.
        value - The attribute value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • removeAttribute

        public void removeAttribute(int index)
        Remove an attribute from the list.
        Parameters:
        index - The index of the attribute (zero-based).
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • setURI

        public void setURI(int index,
                   String uri)
        Set the Namespace URI of a specific attribute.
        Parameters:
        index - The index of the attribute (zero-based).
        uri - The attribute's Namespace URI, or the empty string for none.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • setLocalName

        public void setLocalName(int index,
                         String localName)
        Set the local name of a specific attribute.
        Parameters:
        index - The index of the attribute (zero-based).
        localName - The attribute's local name, or the empty string for none.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • setQName

        public void setQName(int index,
                     String qName)
        Set the qualified name of a specific attribute.
        Parameters:
        index - The index of the attribute (zero-based).
        qName - The attribute's qualified name, or the empty string for none.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • setType

        public void setType(int index,
                    String type)
        Set the type of a specific attribute.
        Parameters:
        index - The index of the attribute (zero-based).
        type - The attribute's type.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.

      • setValue

        public void setValue(int index,
                     String value)
        Set the value of a specific attribute.
        Parameters:
        index - The index of the attribute (zero-based).
        value - The attribute's value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not point to an attribute in the list.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.AttributeListImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.AttributeListImpl

No usage of org.xml.sax.helpers.AttributeListImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.AttributesImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.AttributesImpl

  • Packages that use AttributesImpl
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of AttributesImpl in org.xml.sax.ext

      Subclasses of AttributesImpl in org.xml.sax.ext
      Modifier and Type Class and Description
      class  Attributes2Impl
      SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.DefaultHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.DefaultHandler

  • Packages that use DefaultHandler
    Package Description
    java.beans
    Contains classes related to developing beans -- components based on the JavaBeans™ architecture.
    javax.xml.parsers
    Provides classes allowing the processing of XML documents.
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of DefaultHandler in java.beans

      Methods in java.beans that return DefaultHandler
      Modifier and Type Method and Description
      static DefaultHandler XMLDecoder.createHandler(Object owner, ExceptionListener el, ClassLoader cl)
      Creates a new handler for SAX parser that can be used to parse embedded XML archives created by the XMLEncoder class.

    • Uses of DefaultHandler in javax.xml.parsers

      Methods in javax.xml.parsers with parameters of type DefaultHandler
      Modifier and Type Method and Description
      void SAXParser.parse(File f, DefaultHandler dh)
      Parse the content of the file specified as XML using the specified DefaultHandler.
      void SAXParser.parse(InputSource is, DefaultHandler dh)
      Parse the content given InputSource as XML using the specified DefaultHandler.
      void SAXParser.parse(InputStream is, DefaultHandler dh)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void SAXParser.parse(InputStream is, DefaultHandler dh, String systemId)
      Parse the content of the given InputStream instance as XML using the specified DefaultHandler.
      void SAXParser.parse(String uri, DefaultHandler dh)
      Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified DefaultHandler.

    • Uses of DefaultHandler in org.xml.sax.ext

      Subclasses of DefaultHandler in org.xml.sax.ext
      Modifier and Type Class and Description
      class  DefaultHandler2
      This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.LocatorImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.LocatorImpl

  • Packages that use LocatorImpl
    Package Description
    org.xml.sax.ext
    This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

    • Uses of LocatorImpl in org.xml.sax.ext

      Subclasses of LocatorImpl in org.xml.sax.ext
      Modifier and Type Class and Description
      class  Locator2Impl
      SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.NamespaceSupport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.NamespaceSupport

No usage of org.xml.sax.helpers.NamespaceSupport
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.ParserAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.ParserAdapter

No usage of org.xml.sax.helpers.ParserAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.ParserFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.ParserFactory

No usage of org.xml.sax.helpers.ParserFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.XMLFilterImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.XMLFilterImpl

No usage of org.xml.sax.helpers.XMLFilterImpl
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.XMLReaderAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.XMLReaderAdapter

No usage of org.xml.sax.helpers.XMLReaderAdapter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class org.xml.sax.helpers.XMLReaderFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
org.xml.sax.helpers.XMLReaderFactory

No usage of org.xml.sax.helpers.XMLReaderFactory
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


DefaultHandler

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class DefaultHandler

  • java.lang.Object
    • org.xml.sax.helpers.DefaultHandler
  • All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler
    Direct Known Subclasses:
    DefaultHandler2

    public class DefaultHandler
extends Object
implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler
    Default base class for SAX2 event handlers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class is available as a convenience base class for SAX2 applications: it provides default implementations for all of the callbacks in the four core SAX2 handler classes:

    • EntityResolver
    • DTDHandler
    • ContentHandler
    • ErrorHandler

    Application writers can extend this class when they need to implement only part of an interface; parser writers can instantiate this class to provide default handlers when the application has not supplied its own.

    This class replaces the deprecated SAX1 HandlerBase class.

    Since:
    SAX 2.0
    See Also:
    EntityResolver, DTDHandler, ContentHandler, ErrorHandler

    • Constructor Summary

      Constructors
      Constructor and Description
      DefaultHandler()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Receive notification of character data inside an element.
      void endDocument()
      Receive notification of the end of the document.
      void endElement(String uri, String localName, String qName)
      Receive notification of the end of an element.
      void endPrefixMapping(String prefix)
      Receive notification of the end of a Namespace mapping.
      void error(SAXParseException e)
      Receive notification of a recoverable parser error.
      void fatalError(SAXParseException e)
      Report a fatal XML parsing error.
      void ignorableWhitespace(char[] ch, int start, int length)
      Receive notification of ignorable whitespace in element content.
      void notationDecl(String name, String publicId, String systemId)
      Receive notification of a notation declaration.
      void processingInstruction(String target, String data)
      Receive notification of a processing instruction.
      InputSource resolveEntity(String publicId, String systemId)
      Resolve an external entity.
      void setDocumentLocator(Locator locator)
      Receive a Locator object for document events.
      void skippedEntity(String name)
      Receive notification of a skipped entity.
      void startDocument()
      Receive notification of the beginning of the document.
      void startElement(String uri, String localName, String qName, Attributes attributes)
      Receive notification of the start of an element.
      void startPrefixMapping(String prefix, String uri)
      Receive notification of the start of a Namespace mapping.
      void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Receive notification of an unparsed entity declaration.
      void warning(SAXParseException e)
      Receive notification of a parser warning.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DefaultHandler

        public DefaultHandler()

    • Method Detail

      • resolveEntity

        public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws IOException,
                                 SAXException
        Resolve an external entity.

        Always return null, so that the parser will use the system identifier provided in the XML document. This method implements the SAX default behaviour: application writers can override it in a subclass to do special translations such as catalog lookups or URI redirection.

        Specified by:
        resolveEntity in interface EntityResolver
        Parameters:
        publicId - The public identifier, or null if none is available.
        systemId - The system identifier provided in the XML document.
        Returns:
        The new input source, or null to require the default behaviour.
        Throws:
        IOException - If there is an error setting up the new input source.
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        EntityResolver.resolveEntity(java.lang.String, java.lang.String)

      • notationDecl

        public void notationDecl(String name,
                         String publicId,
                         String systemId)
                  throws SAXException
        Receive notification of a notation declaration.

        By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document.

        Specified by:
        notationDecl in interface DTDHandler
        Parameters:
        name - The notation name.
        publicId - The notation public identifier, or null if not available.
        systemId - The notation system identifier.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)

      • unparsedEntityDecl

        public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
                        throws SAXException
        Receive notification of an unparsed entity declaration.

        By default, do nothing. Application writers may override this method in a subclass to keep track of the unparsed entities declared in a document.

        Specified by:
        unparsedEntityDecl in interface DTDHandler
        Parameters:
        name - The entity name.
        publicId - The entity public identifier, or null if not available.
        systemId - The entity system identifier.
        notationName - The name of the associated notation.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

      • setDocumentLocator

        public void setDocumentLocator(Locator locator)
        Receive a Locator object for document events.

        By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events.

        Specified by:
        setDocumentLocator in interface ContentHandler
        Parameters:
        locator - A locator for all SAX document events.
        See Also:
        ContentHandler.setDocumentLocator(org.xml.sax.Locator), Locator

      • startDocument

        public void startDocument()
                   throws SAXException
        Receive notification of the beginning of the document.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

        Specified by:
        startDocument in interface ContentHandler
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.startDocument()

      • endDocument

        public void endDocument()
                 throws SAXException
        Receive notification of the end of the document.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

        Specified by:
        endDocument in interface ContentHandler
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.endDocument()

      • startPrefixMapping

        public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
        Receive notification of the start of a Namespace mapping.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each Namespace prefix scope (such as storing the prefix mapping).

        Specified by:
        startPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The Namespace prefix being declared.
        uri - The Namespace URI mapped to the prefix.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)

      • endPrefixMapping

        public void endPrefixMapping(String prefix)
                      throws SAXException
        Receive notification of the end of a Namespace mapping.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each prefix mapping.

        Specified by:
        endPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The Namespace prefix being declared.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.endPrefixMapping(java.lang.String)

      • startElement

        public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
        Receive notification of the start of an element.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

        Specified by:
        startElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        qName - The qualified name (with prefix), or the empty string if qualified names are not available.
        attributes - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

      • endElement

        public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
        Receive notification of the end of an element.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

        Specified by:
        endElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        qName - The qualified name (with prefix), or the empty string if qualified names are not available.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

      • characters

        public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
        Receive notification of character data inside an element.

        By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

        Specified by:
        characters in interface ContentHandler
        Parameters:
        ch - The characters.
        start - The start position in the character array.
        length - The number of characters to use from the character array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.characters(char[], int, int)

      • ignorableWhitespace

        public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
        Receive notification of ignorable whitespace in element content.

        By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).

        Specified by:
        ignorableWhitespace in interface ContentHandler
        Parameters:
        ch - The whitespace characters.
        start - The start position in the character array.
        length - The number of characters to use from the character array.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.ignorableWhitespace(char[], int, int)

      • processingInstruction

        public void processingInstruction(String target,
                                  String data)
                           throws SAXException
        Receive notification of a processing instruction.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

        Specified by:
        processingInstruction in interface ContentHandler
        Parameters:
        target - The processing instruction target.
        data - The processing instruction data, or null if none is supplied.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.processingInstruction(java.lang.String, java.lang.String)

      • skippedEntity

        public void skippedEntity(String name)
                   throws SAXException
        Receive notification of a skipped entity.

        By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

        Specified by:
        skippedEntity in interface ContentHandler
        Parameters:
        name - The name of the skipped entity.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ContentHandler.processingInstruction(java.lang.String, java.lang.String)

      • warning

        public void warning(SAXParseException e)
             throws SAXException
        Receive notification of a parser warning.

        The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each warning, such as inserting the message in a log file or printing it to the console.

        Specified by:
        warning in interface ErrorHandler
        Parameters:
        e - The warning information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.warning(org.xml.sax.SAXParseException), SAXParseException

      • error

        public void error(SAXParseException e)
           throws SAXException
        Receive notification of a recoverable parser error.

        The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console.

        Specified by:
        error in interface ErrorHandler
        Parameters:
        e - The error information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.warning(org.xml.sax.SAXParseException), SAXParseException

      • fatalError

        public void fatalError(SAXParseException e)
                throws SAXException
        Report a fatal XML parsing error.

        The default implementation throws a SAXParseException. Application writers may override this method in a subclass if they need to take specific actions for each fatal error (such as collecting all of the errors into a single report): in any case, the application must stop all regular processing when this method is invoked, since the document is no longer reliable, and the parser may no longer report parsing events.

        Specified by:
        fatalError in interface ErrorHandler
        Parameters:
        e - The error information encoded as an exception.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        ErrorHandler.fatalError(org.xml.sax.SAXParseException), SAXParseException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


LocatorImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class LocatorImpl

  • java.lang.Object
    • org.xml.sax.helpers.LocatorImpl
  • All Implemented Interfaces:
    Locator
    Direct Known Subclasses:
    Locator2Impl

    public class LocatorImpl
extends Object
implements Locator
    Provide an optional convenience implementation of Locator.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:

     Locator locator;
 Locator startloc;

 public void setLocator (Locator locator)
 {
         // note the locator
   this.locator = locator;
 }

 public void startDocument ()
 {
         // save the location of the start of the document
         // for future use.
   Locator startloc = new LocatorImpl(locator);
 }

    Normally, parser writers will not use this class, since it is more efficient to provide location information only when requested, rather than constantly updating a Locator object.

    Since:
    SAX 1.0
    See Also:
    Locator

    • Constructor Summary

      Constructors
      Constructor and Description
      LocatorImpl()
      Zero-argument constructor.
      LocatorImpl(Locator locator)
      Copy constructor.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      Return the saved column number (1-based).
      int getLineNumber()
      Return the saved line number (1-based).
      String getPublicId()
      Return the saved public identifier.
      String getSystemId()
      Return the saved system identifier.
      void setColumnNumber(int columnNumber)
      Set the column number for this locator (1-based).
      void setLineNumber(int lineNumber)
      Set the line number for this locator (1-based).
      void setPublicId(String publicId)
      Set the public identifier for this locator.
      void setSystemId(String systemId)
      Set the system identifier for this locator.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • LocatorImpl

        public LocatorImpl()
        Zero-argument constructor.

        This will not normally be useful, since the main purpose of this class is to make a snapshot of an existing Locator.

      • LocatorImpl

        public LocatorImpl(Locator locator)
        Copy constructor.

        Create a persistent copy of the current state of a locator. When the original locator changes, this copy will still keep the original values (and it can be used outside the scope of DocumentHandler methods).

        Parameters:
        locator - The locator to copy.

    • Method Detail

      • getPublicId

        public String getPublicId()
        Return the saved public identifier.
        Specified by:
        getPublicId in interface Locator
        Returns:
        The public identifier as a string, or null if none is available.
        See Also:
        Locator.getPublicId(), setPublicId(java.lang.String)

      • getSystemId

        public String getSystemId()
        Return the saved system identifier.
        Specified by:
        getSystemId in interface Locator
        Returns:
        The system identifier as a string, or null if none is available.
        See Also:
        Locator.getSystemId(), setSystemId(java.lang.String)

      • getLineNumber

        public int getLineNumber()
        Return the saved line number (1-based).
        Specified by:
        getLineNumber in interface Locator
        Returns:
        The line number as an integer, or -1 if none is available.
        See Also:
        Locator.getLineNumber(), setLineNumber(int)

      • getColumnNumber

        public int getColumnNumber()
        Return the saved column number (1-based).
        Specified by:
        getColumnNumber in interface Locator
        Returns:
        The column number as an integer, or -1 if none is available.
        See Also:
        Locator.getColumnNumber(), setColumnNumber(int)

      • setPublicId

        public void setPublicId(String publicId)
        Set the public identifier for this locator.
        Parameters:
        publicId - The new public identifier, or null if none is available.
        See Also:
        getPublicId()

      • setSystemId

        public void setSystemId(String systemId)
        Set the system identifier for this locator.
        Parameters:
        systemId - The new system identifier, or null if none is available.
        See Also:
        getSystemId()

      • setLineNumber

        public void setLineNumber(int lineNumber)
        Set the line number for this locator (1-based).
        Parameters:
        lineNumber - The line number, or -1 if none is available.
        See Also:
        getLineNumber()

      • setColumnNumber

        public void setColumnNumber(int columnNumber)
        Set the column number for this locator (1-based).
        Parameters:
        columnNumber - The column number, or -1 if none is available.
        See Also:
        getColumnNumber()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


NamespaceSupport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class NamespaceSupport

  • java.lang.Object
    • org.xml.sax.helpers.NamespaceSupport

  • public class NamespaceSupport
extends Object
    Encapsulate Namespace logic for use by applications using SAX, or internally by SAX drivers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class encapsulates the logic of Namespace processing: it tracks the declarations currently in force for each context and automatically processes qualified XML names into their Namespace parts; it can also be used in reverse for generating XML qnames from Namespaces.

    Namespace support objects are reusable, but the reset method must be invoked between each session.

    Here is a simple session:

     String parts[] = new String[3];
 NamespaceSupport support = new NamespaceSupport();

 support.pushContext();
 support.declarePrefix("", "http://www.w3.org/1999/xhtml");
 support.declarePrefix("dc", "http://www.purl.org/dc#");

 parts = support.processName("p", parts, false);
 System.out.println("Namespace URI: " + parts[0]);
 System.out.println("Local name: " + parts[1]);
 System.out.println("Raw name: " + parts[2]);

 parts = support.processName("dc:title", parts, false);
 System.out.println("Namespace URI: " + parts[0]);
 System.out.println("Local name: " + parts[1]);
 System.out.println("Raw name: " + parts[2]);

 support.popContext();

    Note that this class is optimized for the use case where most elements do not contain Namespace declarations: if the same prefix/URI mapping is repeated for each context (for example), this class will be somewhat less efficient.

    Although SAX drivers (parsers) may choose to use this class to implement namespace handling, they are not required to do so. Applications must track namespace information themselves if they want to use namespace information.

    Since:
    SAX 2.0

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String NSDECL
      The namespace declaration URI as a constant.
      static String XMLNS
      The XML Namespace URI as a constant.

    • Constructor Summary

      Constructors
      Constructor and Description
      NamespaceSupport()
      Create a new Namespace support object.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      boolean declarePrefix(String prefix, String uri)
      Declare a Namespace prefix.
      Enumeration getDeclaredPrefixes()
      Return an enumeration of all prefixes declared in this context.
      String getPrefix(String uri)
      Return one of the prefixes mapped to a Namespace URI.
      Enumeration getPrefixes()
      Return an enumeration of all prefixes whose declarations are active in the current context.
      Enumeration getPrefixes(String uri)
      Return an enumeration of all prefixes for a given URI whose declarations are active in the current context.
      String getURI(String prefix)
      Look up a prefix and get the currently-mapped Namespace URI.
      boolean isNamespaceDeclUris()
      Returns true if namespace declaration attributes are placed into a namespace.
      void popContext()
      Revert to the previous Namespace context.
      String[] processName(String qName, String[] parts, boolean isAttribute)
      Process a raw XML qualified name, after all declarations in the current context have been handled by declarePrefix().
      void pushContext()
      Start a new Namespace context.
      void reset()
      Reset this Namespace support object for reuse.
      void setNamespaceDeclUris(boolean value)
      Controls whether namespace declaration attributes are placed into the NSDECL namespace by processName().

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • XMLNS

        public static final String XMLNS
        The XML Namespace URI as a constant. The value is http://www.w3.org/XML/1998/namespace as defined in the "Namespaces in XML" * recommendation.

        This is the Namespace URI that is automatically mapped to the "xml" prefix.

        See Also:
        Constant Field Values

      • NSDECL

        public static final String NSDECL
        The namespace declaration URI as a constant. The value is http://www.w3.org/xmlns/2000/, as defined in a backwards-incompatible erratum to the "Namespaces in XML" recommendation. Because that erratum postdated SAX2, SAX2 defaults to the original recommendation, and does not normally use this URI.

        This is the Namespace URI that is optionally applied to xmlns and xmlns:* attributes, which are used to declare namespaces.

        Since:
        SAX 2.1alpha
        See Also:
        setNamespaceDeclUris(boolean), isNamespaceDeclUris(), Constant Field Values

    • Constructor Detail

      • NamespaceSupport

        public NamespaceSupport()
        Create a new Namespace support object.

    • Method Detail

      • reset

        public void reset()
        Reset this Namespace support object for reuse.

        It is necessary to invoke this method before reusing the Namespace support object for a new session. If namespace declaration URIs are to be supported, that flag must also be set to a non-default value.

        See Also:
        setNamespaceDeclUris(boolean)

      • pushContext

        public void pushContext()
        Start a new Namespace context. The new context will automatically inherit the declarations of its parent context, but it will also keep track of which declarations were made within this context.

        Event callback code should start a new context once per element. This means being ready to call this in either of two places. For elements that don't include namespace declarations, the ContentHandler.startElement() callback is the right place. For elements with such a declaration, it'd done in the first ContentHandler.startPrefixMapping() callback. A boolean flag can be used to track whether a context has been started yet. When either of those methods is called, it checks the flag to see if a new context needs to be started. If so, it starts the context and sets the flag. After ContentHandler.startElement() does that, it always clears the flag.

        Normally, SAX drivers would push a new context at the beginning of each XML element. Then they perform a first pass over the attributes to process all namespace declarations, making ContentHandler.startPrefixMapping() callbacks. Then a second pass is made, to determine the namespace-qualified names for all attributes and for the element name. Finally all the information for the ContentHandler.startElement() callback is available, so it can then be made.

        The Namespace support object always starts with a base context already in force: in this context, only the "xml" prefix is declared.

        See Also:
        ContentHandler, popContext()

      • popContext

        public void popContext()
        Revert to the previous Namespace context.

        Normally, you should pop the context at the end of each XML element. After popping the context, all Namespace prefix mappings that were previously in force are restored.

        You must not attempt to declare additional Namespace prefixes after popping a context, unless you push another context first.

        See Also:
        pushContext()

      • declarePrefix

        public boolean declarePrefix(String prefix,
                             String uri)
        Declare a Namespace prefix. All prefixes must be declared before they are referenced. For example, a SAX driver (parser) would scan an element's attributes in two passes: first for namespace declarations, then a second pass using processName() to interpret prefixes against (potentially redefined) prefixes.

        This method declares a prefix in the current Namespace context; the prefix will remain in force until this context is popped, unless it is shadowed in a descendant context.

        To declare the default element Namespace, use the empty string as the prefix.

        Note that there is an asymmetry in this library: getPrefix will not return the "" prefix, even if you have declared a default element namespace. To check for a default namespace, you have to look it up explicitly using getURI. This asymmetry exists to make it easier to look up prefixes for attribute names, where the default prefix is not allowed.

        Parameters:
        prefix - The prefix to declare, or the empty string to indicate the default element namespace. This may never have the value "xml" or "xmlns".
        uri - The Namespace URI to associate with the prefix.
        Returns:
        true if the prefix was legal, false otherwise
        See Also:
        processName(java.lang.String, java.lang.String[], boolean),
getURI(java.lang.String),
getPrefix(java.lang.String)

      • processName

        public String[] processName(String qName,
                            String[] parts,
                            boolean isAttribute)
        Process a raw XML qualified name, after all declarations in the current context have been handled by declarePrefix().

        This method processes a raw XML qualified name in the current context by removing the prefix and looking it up among the prefixes currently declared. The return value will be the array supplied by the caller, filled in as follows:

        parts[0]
        The Namespace URI, or an empty string if none is in use.
        parts[1]
        The local name (without prefix).
        parts[2]
        The original raw name.

        All of the strings in the array will be internalized. If the raw name has a prefix that has not been declared, then the return value will be null.

        Note that attribute names are processed differently than element names: an unprefixed element name will receive the default Namespace (if any), while an unprefixed attribute name will not.

        Parameters:
        qName - The XML qualified name to be processed.
        parts - An array supplied by the caller, capable of holding at least three members.
        isAttribute - A flag indicating whether this is an attribute name (true) or an element name (false).
        Returns:
        The supplied array holding three internalized strings representing the Namespace URI (or empty string), the local name, and the XML qualified name; or null if there is an undeclared prefix.
        See Also:
        declarePrefix(java.lang.String, java.lang.String), String.intern()

      • getURI

        public String getURI(String prefix)
        Look up a prefix and get the currently-mapped Namespace URI.

        This method looks up the prefix in the current context. Use the empty string ("") for the default Namespace.

        Parameters:
        prefix - The prefix to look up.
        Returns:
        The associated Namespace URI, or null if the prefix is undeclared in this context.
        See Also:
        getPrefix(java.lang.String), getPrefixes()

      • getPrefixes

        public Enumeration getPrefixes()
        Return an enumeration of all prefixes whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.

        Note: if there is a default prefix, it will not be returned in this enumeration; check for the default prefix using the getURI with an argument of "".

        Returns:
        An enumeration of prefixes (never empty).
        See Also:
        getDeclaredPrefixes(), getURI(java.lang.String)

      • getPrefix

        public String getPrefix(String uri)
        Return one of the prefixes mapped to a Namespace URI.

        If more than one prefix is currently mapped to the same URI, this method will make an arbitrary selection; if you want all of the prefixes, use the getPrefixes() method instead.

        Note: this will never return the empty (default) prefix; to check for a default prefix, use the getURI method with an argument of "".

        Parameters:
        uri - the namespace URI
        Returns:
        one of the prefixes currently mapped to the URI supplied, or null if none is mapped or if the URI is assigned to the default namespace
        See Also:
        getPrefixes(java.lang.String), getURI(java.lang.String)

      • getPrefixes

        public Enumeration getPrefixes(String uri)
        Return an enumeration of all prefixes for a given URI whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.

        This method returns prefixes mapped to a specific Namespace URI. The xml: prefix will be included. If you want only one prefix that's mapped to the Namespace URI, and you don't care which one you get, use the getPrefix method instead.

        Note: the empty (default) prefix is never included in this enumeration; to check for the presence of a default Namespace, use the getURI method with an argument of "".

        Parameters:
        uri - The Namespace URI.
        Returns:
        An enumeration of prefixes (never empty).
        See Also:
        getPrefix(java.lang.String),
getDeclaredPrefixes(),
getURI(java.lang.String)

      • getDeclaredPrefixes

        public Enumeration getDeclaredPrefixes()
        Return an enumeration of all prefixes declared in this context.

        The empty (default) prefix will be included in this enumeration; note that this behaviour differs from that of getPrefix(java.lang.String) and getPrefixes().

        Returns:
        An enumeration of all prefixes declared in this context.
        See Also:
        getPrefixes(), getURI(java.lang.String)

      • setNamespaceDeclUris

        public void setNamespaceDeclUris(boolean value)
        Controls whether namespace declaration attributes are placed into the NSDECL namespace by processName(). This may only be changed before any contexts have been pushed.
        Throws:
        IllegalStateException - when attempting to set this after any context has been pushed.
        Since:
        SAX 2.1alpha

      • isNamespaceDeclUris

        public boolean isNamespaceDeclUris()
        Returns true if namespace declaration attributes are placed into a namespace. This behavior is not the default.
        Since:
        SAX 2.1alpha
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParserAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class ParserAdapter

  • java.lang.Object
    • org.xml.sax.helpers.ParserAdapter
  • All Implemented Interfaces:
    DocumentHandler, XMLReader

    public class ParserAdapter
extends Object
implements XMLReader, DocumentHandler
    Adapt a SAX1 Parser as a SAX2 XMLReader.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class wraps a SAX1 Parser and makes it act as a SAX2 XMLReader, with feature, property, and Namespace support. Note that it is not possible to report skippedEntity events, since SAX1 does not make that information available.

    This adapter does not test for duplicate Namespace-qualified attribute names.

    Since:
    SAX 2.0
    Version:
    2.0.1 (sax2r2)
    See Also:
    XMLReaderAdapter, XMLReader, Parser

    • Constructor Summary

      Constructors
      Constructor and Description
      ParserAdapter()
      Construct a new parser adapter.
      ParserAdapter(Parser parser)
      Construct a new parser adapter.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Adapter implementation method; do not call.
      void endDocument()
      Adapter implementation method; do not call.
      void endElement(String qName)
      Adapter implementation method; do not call.
      ContentHandler getContentHandler()
      Return the current content handler.
      DTDHandler getDTDHandler()
      Return the current DTD handler.
      EntityResolver getEntityResolver()
      Return the current entity resolver.
      ErrorHandler getErrorHandler()
      Return the current error handler.
      boolean getFeature(String name)
      Check a parser feature flag.
      Object getProperty(String name)
      Get a parser property.
      void ignorableWhitespace(char[] ch, int start, int length)
      Adapter implementation method; do not call.
      void parse(InputSource input)
      Parse an XML document.
      void parse(String systemId)
      Parse an XML document.
      void processingInstruction(String target, String data)
      Adapter implementation method; do not call.
      void setContentHandler(ContentHandler handler)
      Set the content handler.
      void setDocumentLocator(Locator locator)
      Adapter implementation method; do not call.
      void setDTDHandler(DTDHandler handler)
      Set the DTD handler.
      void setEntityResolver(EntityResolver resolver)
      Set the entity resolver.
      void setErrorHandler(ErrorHandler handler)
      Set the error handler.
      void setFeature(String name, boolean value)
      Set a feature flag for the parser.
      void setProperty(String name, Object value)
      Set a parser property.
      void startDocument()
      Adapter implementation method; do not call.
      void startElement(String qName, AttributeList qAtts)
      Adapter implementation method; do not call.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ParserAdapter

        public ParserAdapter()
              throws SAXException
        Construct a new parser adapter.

        Use the "org.xml.sax.parser" property to locate the embedded SAX1 driver.

        Throws:
        SAXException - If the embedded driver cannot be instantiated or if the org.xml.sax.parser property is not specified.

      • ParserAdapter

        public ParserAdapter(Parser parser)
        Construct a new parser adapter.

        Note that the embedded parser cannot be changed once the adapter is created; to embed a different parser, allocate a new ParserAdapter.

        Parameters:
        parser - The SAX1 parser to embed.
        Throws:
        NullPointerException - If the parser parameter is null.

    • Method Detail

      • setFeature

        public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
        Set a feature flag for the parser.

        The only features recognized are namespaces and namespace-prefixes.

        Specified by:
        setFeature in interface XMLReader
        Parameters:
        name - The feature name, as a complete URI.
        value - The requested feature value.
        Throws:
        SAXNotRecognizedException - If the feature can't be assigned or retrieved.
        SAXNotSupportedException - If the feature can't be assigned that value.
        See Also:
        XMLReader.setFeature(java.lang.String, boolean)

      • getFeature

        public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Check a parser feature flag.

        The only features recognized are namespaces and namespace-prefixes.

        Specified by:
        getFeature in interface XMLReader
        Parameters:
        name - The feature name, as a complete URI.
        Returns:
        The current feature value.
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - If the feature is not currently readable.
        See Also:
        XMLReader.setFeature(java.lang.String, boolean)

      • setProperty

        public void setProperty(String name,
                        Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
        Set a parser property.

        No properties are currently recognized.

        Specified by:
        setProperty in interface XMLReader
        Parameters:
        name - The property name.
        value - The property value.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - If the property can't be assigned that value.
        See Also:
        XMLReader.setProperty(java.lang.String, java.lang.Object)

      • getProperty

        public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Get a parser property.

        No properties are currently recognized.

        Specified by:
        getProperty in interface XMLReader
        Parameters:
        name - The property name.
        Returns:
        The property value.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - If the property value is not currently readable.
        See Also:
        XMLReader.getProperty(java.lang.String)

      • setEntityResolver

        public void setEntityResolver(EntityResolver resolver)
        Set the entity resolver.
        Specified by:
        setEntityResolver in interface XMLReader
        Parameters:
        resolver - The new entity resolver.
        See Also:
        XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

      • getEntityResolver

        public EntityResolver getEntityResolver()
        Return the current entity resolver.
        Specified by:
        getEntityResolver in interface XMLReader
        Returns:
        The current entity resolver, or null if none was supplied.
        See Also:
        XMLReader.getEntityResolver()

      • setDTDHandler

        public void setDTDHandler(DTDHandler handler)
        Set the DTD handler.
        Specified by:
        setDTDHandler in interface XMLReader
        Parameters:
        handler - the new DTD handler
        See Also:
        XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

      • getDTDHandler

        public DTDHandler getDTDHandler()
        Return the current DTD handler.
        Specified by:
        getDTDHandler in interface XMLReader
        Returns:
        the current DTD handler, or null if none was supplied
        See Also:
        XMLReader.getEntityResolver()

      • setContentHandler

        public void setContentHandler(ContentHandler handler)
        Set the content handler.
        Specified by:
        setContentHandler in interface XMLReader
        Parameters:
        handler - the new content handler
        See Also:
        XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

      • getContentHandler

        public ContentHandler getContentHandler()
        Return the current content handler.
        Specified by:
        getContentHandler in interface XMLReader
        Returns:
        The current content handler, or null if none was supplied.
        See Also:
        XMLReader.getEntityResolver()

      • setErrorHandler

        public void setErrorHandler(ErrorHandler handler)
        Set the error handler.
        Specified by:
        setErrorHandler in interface XMLReader
        Parameters:
        handler - The new error handler.
        See Also:
        XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

      • getErrorHandler

        public ErrorHandler getErrorHandler()
        Return the current error handler.
        Specified by:
        getErrorHandler in interface XMLReader
        Returns:
        The current error handler, or null if none was supplied.
        See Also:
        XMLReader.getEntityResolver()

      • parse

        public void parse(String systemId)
           throws IOException,
                  SAXException
        Parse an XML document.
        Specified by:
        parse in interface XMLReader
        Parameters:
        systemId - The absolute URL of the document.
        Throws:
        IOException - If there is a problem reading the raw content of the document.
        SAXException - If there is a problem processing the document.
        See Also:
        parse(org.xml.sax.InputSource), Parser.parse(java.lang.String)

      • parse

        public void parse(InputSource input)
           throws IOException,
                  SAXException
        Parse an XML document.
        Specified by:
        parse in interface XMLReader
        Parameters:
        input - An input source for the document.
        Throws:
        IOException - If there is a problem reading the raw content of the document.
        SAXException - If there is a problem processing the document.
        See Also:
        parse(java.lang.String), Parser.parse(org.xml.sax.InputSource)

      • setDocumentLocator

        public void setDocumentLocator(Locator locator)
        Adapter implementation method; do not call. Adapt a SAX1 document locator event.
        Specified by:
        setDocumentLocator in interface DocumentHandler
        Parameters:
        locator - A document locator.
        See Also:
        ContentHandler.setDocumentLocator(org.xml.sax.Locator)

      • startDocument

        public void startDocument()
                   throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 start document event.
        Specified by:
        startDocument in interface DocumentHandler
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.startDocument()

      • endDocument

        public void endDocument()
                 throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 end document event.
        Specified by:
        endDocument in interface DocumentHandler
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.endDocument()

      • startElement

        public void startElement(String qName,
                         AttributeList qAtts)
                  throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 startElement event.

        If necessary, perform Namespace processing.

        Specified by:
        startElement in interface DocumentHandler
        Parameters:
        qName - The qualified (prefixed) name.
        qAtts - The XML attribute list (with qnames).
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.endElement(java.lang.String), AttributeList

      • endElement

        public void endElement(String qName)
                throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 end element event.
        Specified by:
        endElement in interface DocumentHandler
        Parameters:
        qName - The qualified (prefixed) name.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.endElement(java.lang.String)

      • characters

        public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 characters event.
        Specified by:
        characters in interface DocumentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.characters(char[], int, int)

      • ignorableWhitespace

        public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 ignorable whitespace event.
        Specified by:
        ignorableWhitespace in interface DocumentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.ignorableWhitespace(char[], int, int)

      • processingInstruction

        public void processingInstruction(String target,
                                  String data)
                           throws SAXException
        Adapter implementation method; do not call. Adapt a SAX1 processing instruction event.
        Specified by:
        processingInstruction in interface DocumentHandler
        Parameters:
        target - The processing instruction target.
        data - The remainder of the processing instruction
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


ParserFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class ParserFactory

  • java.lang.Object
    • org.xml.sax.helpers.ParserFactory
  • Deprecated.
    This class works with the deprecated Parser interface.

    public class ParserFactory
extends Object
    Java-specific class for dynamically loading SAX parsers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    Note: This class is designed to work with the now-deprecated SAX1 Parser class. SAX2 applications should use XMLReaderFactory instead.

    ParserFactory is not part of the platform-independent definition of SAX; it is an additional convenience class designed specifically for Java XML application writers. SAX applications can use the static methods in this class to allocate a SAX parser dynamically at run-time based either on the value of the `org.xml.sax.parser' system property or on a string containing the class name.

    Note that the application still requires an XML parser that implements SAX1.

    Since:
    SAX 1.0
    Version:
    2.0.1 (sax2r2)

    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods
      Modifier and Type Method and Description
      static Parser makeParser()
      Deprecated.
      Create a new SAX parser using the `org.xml.sax.parser' system property.
      static Parser makeParser(String className)
      Deprecated.
      Create a new SAX parser object using the class name provided.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • makeParser

        public static Parser makeParser()
                         throws ClassNotFoundException,
                                IllegalAccessException,
                                InstantiationException,
                                NullPointerException,
                                ClassCastException
        Deprecated.
        Create a new SAX parser using the `org.xml.sax.parser' system property.

        The named class must exist and must implement the Parser interface.

        Throws:
        NullPointerException - There is no value for the `org.xml.sax.parser' system property.
        ClassNotFoundException - The SAX parser class was not found (check your CLASSPATH).
        IllegalAccessException - The SAX parser class was found, but you do not have permission to load it.
        InstantiationException - The SAX parser class was found but could not be instantiated.
        ClassCastException - The SAX parser class was found and instantiated, but does not implement org.xml.sax.Parser.
        See Also:
        makeParser(java.lang.String), Parser

      • makeParser

        public static Parser makeParser(String className)
                         throws ClassNotFoundException,
                                IllegalAccessException,
                                InstantiationException,
                                ClassCastException
        Deprecated.
        Create a new SAX parser object using the class name provided.

        The named class must exist and must implement the Parser interface.

        Parameters:
        className - A string containing the name of the SAX parser class.
        Throws:
        ClassNotFoundException - The SAX parser class was not found (check your CLASSPATH).
        IllegalAccessException - The SAX parser class was found, but you do not have permission to load it.
        InstantiationException - The SAX parser class was found but could not be instantiated.
        ClassCastException - The SAX parser class was found and instantiated, but does not implement org.xml.sax.Parser.
        See Also:
        makeParser(), Parser
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLFilterImpl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class XMLFilterImpl

  • java.lang.Object
    • org.xml.sax.helpers.XMLFilterImpl
  • All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader

    public class XMLFilterImpl
extends Object
implements XMLFilter, EntityResolver, DTDHandler, ContentHandler, ErrorHandler
    Base class for deriving an XML filter.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class is designed to sit between an XMLReader and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.

    Since:
    SAX 2.0
    See Also:
    XMLFilter, XMLReader, EntityResolver, DTDHandler, ContentHandler, ErrorHandler

    • Constructor Summary

      Constructors
      Constructor and Description
      XMLFilterImpl()
      Construct an empty XML filter, with no parent.
      XMLFilterImpl(XMLReader parent)
      Construct an XML filter with the specified parent.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Filter a character data event.
      void endDocument()
      Filter an end document event.
      void endElement(String uri, String localName, String qName)
      Filter an end element event.
      void endPrefixMapping(String prefix)
      Filter an end Namespace prefix mapping event.
      void error(SAXParseException e)
      Filter an error event.
      void fatalError(SAXParseException e)
      Filter a fatal error event.
      ContentHandler getContentHandler()
      Get the content event handler.
      DTDHandler getDTDHandler()
      Get the current DTD event handler.
      EntityResolver getEntityResolver()
      Get the current entity resolver.
      ErrorHandler getErrorHandler()
      Get the current error event handler.
      boolean getFeature(String name)
      Look up the value of a feature.
      XMLReader getParent()
      Get the parent reader.
      Object getProperty(String name)
      Look up the value of a property.
      void ignorableWhitespace(char[] ch, int start, int length)
      Filter an ignorable whitespace event.
      void notationDecl(String name, String publicId, String systemId)
      Filter a notation declaration event.
      void parse(InputSource input)
      Parse a document.
      void parse(String systemId)
      Parse a document.
      void processingInstruction(String target, String data)
      Filter a processing instruction event.
      InputSource resolveEntity(String publicId, String systemId)
      Filter an external entity resolution.
      void setContentHandler(ContentHandler handler)
      Set the content event handler.
      void setDocumentLocator(Locator locator)
      Filter a new document locator event.
      void setDTDHandler(DTDHandler handler)
      Set the DTD event handler.
      void setEntityResolver(EntityResolver resolver)
      Set the entity resolver.
      void setErrorHandler(ErrorHandler handler)
      Set the error event handler.
      void setFeature(String name, boolean value)
      Set the value of a feature.
      void setParent(XMLReader parent)
      Set the parent reader.
      void setProperty(String name, Object value)
      Set the value of a property.
      void skippedEntity(String name)
      Filter a skipped entity event.
      void startDocument()
      Filter a start document event.
      void startElement(String uri, String localName, String qName, Attributes atts)
      Filter a start element event.
      void startPrefixMapping(String prefix, String uri)
      Filter a start Namespace prefix mapping event.
      void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
      Filter an unparsed entity declaration event.
      void warning(SAXParseException e)
      Filter a warning event.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XMLFilterImpl

        public XMLFilterImpl()
        Construct an empty XML filter, with no parent.

        This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty, unless you use this as a pure event consumer rather than as an XMLReader.

        See Also:
        XMLReader.setFeature(java.lang.String, boolean),
XMLReader.setProperty(java.lang.String, java.lang.Object),
setParent(org.xml.sax.XMLReader)

      • XMLFilterImpl

        public XMLFilterImpl(XMLReader parent)
        Construct an XML filter with the specified parent.
        See Also:
        setParent(org.xml.sax.XMLReader), getParent()

    • Method Detail

      • setParent

        public void setParent(XMLReader parent)
        Set the parent reader.

        This is the XMLReader from which this filter will obtain its events and to which it will pass its configuration requests. The parent may itself be another filter.

        If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.

        Specified by:
        setParent in interface XMLFilter
        Parameters:
        parent - The parent XML reader.
        See Also:
        getParent()

      • getParent

        public XMLReader getParent()
        Get the parent reader.
        Specified by:
        getParent in interface XMLFilter
        Returns:
        The parent XML reader, or null if none is set.
        See Also:
        setParent(org.xml.sax.XMLReader)

      • setFeature

        public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
        Set the value of a feature.

        This will always fail if the parent is null.

        Specified by:
        setFeature in interface XMLReader
        Parameters:
        name - The feature name.
        value - The requested feature value.
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved from the parent.
        SAXNotSupportedException - When the parent recognizes the feature name but cannot set the requested value.
        See Also:
        XMLReader.getFeature(java.lang.String)

      • getFeature

        public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a feature.

        This will always fail if the parent is null.

        Specified by:
        getFeature in interface XMLReader
        Parameters:
        name - The feature name.
        Returns:
        The current value of the feature.
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved from the parent.
        SAXNotSupportedException - When the parent recognizes the feature name but cannot determine its value at this time.
        See Also:
        XMLReader.setFeature(java.lang.String, boolean)

      • setProperty

        public void setProperty(String name,
                        Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
        Set the value of a property.

        This will always fail if the parent is null.

        Specified by:
        setProperty in interface XMLReader
        Parameters:
        name - The property name.
        value - The requested property value.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved from the parent.
        SAXNotSupportedException - When the parent recognizes the property name but cannot set the requested value.

      • getProperty

        public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
        Look up the value of a property.
        Specified by:
        getProperty in interface XMLReader
        Parameters:
        name - The property name.
        Returns:
        The current value of the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved from the parent.
        SAXNotSupportedException - When the parent recognizes the property name but cannot determine its value at this time.
        See Also:
        XMLReader.setProperty(java.lang.String, java.lang.Object)

      • setEntityResolver

        public void setEntityResolver(EntityResolver resolver)
        Set the entity resolver.
        Specified by:
        setEntityResolver in interface XMLReader
        Parameters:
        resolver - The new entity resolver.
        See Also:
        XMLReader.getEntityResolver()

      • getEntityResolver

        public EntityResolver getEntityResolver()
        Get the current entity resolver.
        Specified by:
        getEntityResolver in interface XMLReader
        Returns:
        The current entity resolver, or null if none was set.
        See Also:
        XMLReader.setEntityResolver(org.xml.sax.EntityResolver)

      • setDTDHandler

        public void setDTDHandler(DTDHandler handler)
        Set the DTD event handler.
        Specified by:
        setDTDHandler in interface XMLReader
        Parameters:
        handler - the new DTD handler
        See Also:
        XMLReader.getDTDHandler()

      • getDTDHandler

        public DTDHandler getDTDHandler()
        Get the current DTD event handler.
        Specified by:
        getDTDHandler in interface XMLReader
        Returns:
        The current DTD handler, or null if none was set.
        See Also:
        XMLReader.setDTDHandler(org.xml.sax.DTDHandler)

      • setContentHandler

        public void setContentHandler(ContentHandler handler)
        Set the content event handler.
        Specified by:
        setContentHandler in interface XMLReader
        Parameters:
        handler - the new content handler
        See Also:
        XMLReader.getContentHandler()

      • getContentHandler

        public ContentHandler getContentHandler()
        Get the content event handler.
        Specified by:
        getContentHandler in interface XMLReader
        Returns:
        The current content handler, or null if none was set.
        See Also:
        XMLReader.setContentHandler(org.xml.sax.ContentHandler)

      • setErrorHandler

        public void setErrorHandler(ErrorHandler handler)
        Set the error event handler.
        Specified by:
        setErrorHandler in interface XMLReader
        Parameters:
        handler - the new error handler
        See Also:
        XMLReader.getErrorHandler()

      • getErrorHandler

        public ErrorHandler getErrorHandler()
        Get the current error event handler.
        Specified by:
        getErrorHandler in interface XMLReader
        Returns:
        The current error handler, or null if none was set.
        See Also:
        XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        public void parse(InputSource input)
           throws SAXException,
                  IOException
        Parse a document.
        Specified by:
        parse in interface XMLReader
        Parameters:
        input - The input source for the document entity.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        InputSource,
XMLReader.parse(java.lang.String),
XMLReader.setEntityResolver(org.xml.sax.EntityResolver),
XMLReader.setDTDHandler(org.xml.sax.DTDHandler),
XMLReader.setContentHandler(org.xml.sax.ContentHandler),
XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        public void parse(String systemId)
           throws SAXException,
                  IOException
        Parse a document.
        Specified by:
        parse in interface XMLReader
        Parameters:
        systemId - The system identifier as a fully-qualified URI.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        XMLReader.parse(org.xml.sax.InputSource)

      • resolveEntity

        public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
        Filter an external entity resolution.
        Specified by:
        resolveEntity in interface EntityResolver
        Parameters:
        publicId - The entity's public identifier, or null.
        systemId - The entity's system identifier.
        Returns:
        A new InputSource or null for the default.
        Throws:
        SAXException - The client may throw an exception during processing.
        IOException - The client may throw an I/O-related exception while obtaining the new InputSource.
        See Also:
        InputSource

      • notationDecl

        public void notationDecl(String name,
                         String publicId,
                         String systemId)
                  throws SAXException
        Filter a notation declaration event.
        Specified by:
        notationDecl in interface DTDHandler
        Parameters:
        name - The notation name.
        publicId - The notation's public identifier, or null.
        systemId - The notation's system identifier, or null.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String), Attributes

      • unparsedEntityDecl

        public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
                        throws SAXException
        Filter an unparsed entity declaration event.
        Specified by:
        unparsedEntityDecl in interface DTDHandler
        Parameters:
        name - The entity name.
        publicId - The entity's public identifier, or null.
        systemId - The entity's system identifier, or null.
        notationName - The name of the associated notation.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String), Attributes

      • setDocumentLocator

        public void setDocumentLocator(Locator locator)
        Filter a new document locator event.
        Specified by:
        setDocumentLocator in interface ContentHandler
        Parameters:
        locator - The document locator.
        See Also:
        Locator

      • startDocument

        public void startDocument()
                   throws SAXException
        Filter a start document event.
        Specified by:
        startDocument in interface ContentHandler
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.endDocument()

      • endDocument

        public void endDocument()
                 throws SAXException
        Filter an end document event.
        Specified by:
        endDocument in interface ContentHandler
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.startDocument()

      • startPrefixMapping

        public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
        Filter a start Namespace prefix mapping event.
        Specified by:
        startPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The Namespace prefix.
        uri - The Namespace URI.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.endPrefixMapping(java.lang.String), ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

      • endPrefixMapping

        public void endPrefixMapping(String prefix)
                      throws SAXException
        Filter an end Namespace prefix mapping event.
        Specified by:
        endPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The Namespace prefix.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.startPrefixMapping(java.lang.String, java.lang.String), ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

      • startElement

        public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
        Filter a start element event.
        Specified by:
        startElement in interface ContentHandler
        Parameters:
        uri - The element's Namespace URI, or the empty string.
        localName - The element's local name, or the empty string.
        qName - The element's qualified (prefixed) name, or the empty string.
        atts - The element's attributes.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String), Attributes, AttributesImpl

      • endElement

        public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
        Filter an end element event.
        Specified by:
        endElement in interface ContentHandler
        Parameters:
        uri - The element's Namespace URI, or the empty string.
        localName - The element's local name, or the empty string.
        qName - The element's qualified (prefixed) name, or the empty string.
        Throws:
        SAXException - The client may throw an exception during processing.

      • characters

        public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
        Filter a character data event.
        Specified by:
        characters in interface ContentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use from the array.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.ignorableWhitespace(char[], int, int), Locator

      • ignorableWhitespace

        public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
        Filter an ignorable whitespace event.
        Specified by:
        ignorableWhitespace in interface ContentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use from the array.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        ContentHandler.characters(char[], int, int)

      • processingInstruction

        public void processingInstruction(String target,
                                  String data)
                           throws SAXException
        Filter a processing instruction event.
        Specified by:
        processingInstruction in interface ContentHandler
        Parameters:
        target - The processing instruction target.
        data - The text following the target.
        Throws:
        SAXException - The client may throw an exception during processing.

      • skippedEntity

        public void skippedEntity(String name)
                   throws SAXException
        Filter a skipped entity event.
        Specified by:
        skippedEntity in interface ContentHandler
        Parameters:
        name - The name of the skipped entity.
        Throws:
        SAXException - The client may throw an exception during processing.

      • warning

        public void warning(SAXParseException e)
             throws SAXException
        Filter a warning event.
        Specified by:
        warning in interface ErrorHandler
        Parameters:
        e - The warning as an exception.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        SAXParseException

      • error

        public void error(SAXParseException e)
           throws SAXException
        Filter an error event.
        Specified by:
        error in interface ErrorHandler
        Parameters:
        e - The error as an exception.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        SAXParseException

      • fatalError

        public void fatalError(SAXParseException e)
                throws SAXException
        Filter a fatal error event.
        Specified by:
        fatalError in interface ErrorHandler
        Parameters:
        e - The error as an exception.
        Throws:
        SAXException - The client may throw an exception during processing.
        See Also:
        SAXParseException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLReaderAdapter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class XMLReaderAdapter

  • java.lang.Object
    • org.xml.sax.helpers.XMLReaderAdapter
  • All Implemented Interfaces:
    ContentHandler, Parser

    public class XMLReaderAdapter
extends Object
implements Parser, ContentHandler
    Adapt a SAX2 XMLReader as a SAX1 Parser.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class wraps a SAX2 XMLReader and makes it act as a SAX1 Parser. The XMLReader must support a true value for the http://xml.org/sax/features/namespace-prefixes property or parsing will fail with a SAXException; if the XMLReader supports a false value for the http://xml.org/sax/features/namespaces property, that will also be used to improve efficiency.

    Since:
    SAX 2.0
    See Also:
    Parser, XMLReader

    • Constructor Summary

      Constructors
      Constructor and Description
      XMLReaderAdapter()
      Create a new adapter.
      XMLReaderAdapter(XMLReader xmlReader)
      Create a new adapter.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      void characters(char[] ch, int start, int length)
      Adapt a SAX2 characters event.
      void endDocument()
      End document event.
      void endElement(String uri, String localName, String qName)
      Adapt a SAX2 end element event.
      void endPrefixMapping(String prefix)
      Adapt a SAX2 end prefix mapping event.
      void ignorableWhitespace(char[] ch, int start, int length)
      Adapt a SAX2 ignorable whitespace event.
      void parse(InputSource input)
      Parse the document.
      void parse(String systemId)
      Parse the document.
      void processingInstruction(String target, String data)
      Adapt a SAX2 processing instruction event.
      void setDocumentHandler(DocumentHandler handler)
      Register the SAX1 document event handler.
      void setDocumentLocator(Locator locator)
      Set a document locator.
      void setDTDHandler(DTDHandler handler)
      Register the DTD event handler.
      void setEntityResolver(EntityResolver resolver)
      Register the entity resolver.
      void setErrorHandler(ErrorHandler handler)
      Register the error event handler.
      void setLocale(Locale locale)
      Set the locale for error reporting.
      void skippedEntity(String name)
      Adapt a SAX2 skipped entity event.
      void startDocument()
      Start document event.
      void startElement(String uri, String localName, String qName, Attributes atts)
      Adapt a SAX2 start element event.
      void startPrefixMapping(String prefix, String uri)
      Adapt a SAX2 start prefix mapping event.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • XMLReaderAdapter

        public XMLReaderAdapter()
                 throws SAXException
        Create a new adapter.

        Use the "org.xml.sax.driver" property to locate the SAX2 driver to embed.

        Throws:
        SAXException - If the embedded driver cannot be instantiated or if the org.xml.sax.driver property is not specified.

      • XMLReaderAdapter

        public XMLReaderAdapter(XMLReader xmlReader)
        Create a new adapter.

        Create a new adapter, wrapped around a SAX2 XMLReader. The adapter will make the XMLReader act like a SAX1 Parser.

        Parameters:
        xmlReader - The SAX2 XMLReader to wrap.
        Throws:
        NullPointerException - If the argument is null.

    • Method Detail

      • setLocale

        public void setLocale(Locale locale)
               throws SAXException
        Set the locale for error reporting.

        This is not supported in SAX2, and will always throw an exception.

        Specified by:
        setLocale in interface Parser
        Parameters:
        locale - the locale for error reporting.
        Throws:
        SAXException - Thrown unless overridden.
        See Also:
        Parser.setLocale(java.util.Locale)

      • setEntityResolver

        public void setEntityResolver(EntityResolver resolver)
        Register the entity resolver.
        Specified by:
        setEntityResolver in interface Parser
        Parameters:
        resolver - The new resolver.
        See Also:
        Parser.setEntityResolver(org.xml.sax.EntityResolver)

      • setDTDHandler

        public void setDTDHandler(DTDHandler handler)
        Register the DTD event handler.
        Specified by:
        setDTDHandler in interface Parser
        Parameters:
        handler - The new DTD event handler.
        See Also:
        Parser.setDTDHandler(org.xml.sax.DTDHandler)

      • setDocumentHandler

        public void setDocumentHandler(DocumentHandler handler)
        Register the SAX1 document event handler.

        Note that the SAX1 document handler has no Namespace support.

        Specified by:
        setDocumentHandler in interface Parser
        Parameters:
        handler - The new SAX1 document event handler.
        See Also:
        Parser.setDocumentHandler(org.xml.sax.DocumentHandler)

      • setErrorHandler

        public void setErrorHandler(ErrorHandler handler)
        Register the error event handler.
        Specified by:
        setErrorHandler in interface Parser
        Parameters:
        handler - The new error event handler.
        See Also:
        Parser.setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        public void parse(String systemId)
           throws IOException,
                  SAXException
        Parse the document.

        This method will throw an exception if the embedded XMLReader does not support the http://xml.org/sax/features/namespace-prefixes property.

        Specified by:
        parse in interface Parser
        Parameters:
        systemId - The absolute URL of the document.
        Throws:
        IOException - If there is a problem reading the raw content of the document.
        SAXException - If there is a problem processing the document.
        See Also:
        parse(org.xml.sax.InputSource), Parser.parse(java.lang.String)

      • parse

        public void parse(InputSource input)
           throws IOException,
                  SAXException
        Parse the document.

        This method will throw an exception if the embedded XMLReader does not support the http://xml.org/sax/features/namespace-prefixes property.

        Specified by:
        parse in interface Parser
        Parameters:
        input - An input source for the document.
        Throws:
        IOException - If there is a problem reading the raw content of the document.
        SAXException - If there is a problem processing the document.
        See Also:
        parse(java.lang.String), Parser.parse(org.xml.sax.InputSource)

      • setDocumentLocator

        public void setDocumentLocator(Locator locator)
        Set a document locator.
        Specified by:
        setDocumentLocator in interface ContentHandler
        Parameters:
        locator - The document locator.
        See Also:
        ContentHandler.setDocumentLocator(org.xml.sax.Locator)

      • startDocument

        public void startDocument()
                   throws SAXException
        Start document event.
        Specified by:
        startDocument in interface ContentHandler
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.startDocument()

      • endDocument

        public void endDocument()
                 throws SAXException
        End document event.
        Specified by:
        endDocument in interface ContentHandler
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.endDocument()

      • startPrefixMapping

        public void startPrefixMapping(String prefix,
                               String uri)
        Adapt a SAX2 start prefix mapping event.
        Specified by:
        startPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The prefix being mapped.
        uri - The Namespace URI being mapped to.
        See Also:
        ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)

      • endPrefixMapping

        public void endPrefixMapping(String prefix)
        Adapt a SAX2 end prefix mapping event.
        Specified by:
        endPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The prefix being mapped.
        See Also:
        ContentHandler.endPrefixMapping(java.lang.String)

      • startElement

        public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
        Adapt a SAX2 start element event.
        Specified by:
        startElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI.
        localName - The Namespace local name.
        qName - The qualified (prefixed) name.
        atts - The SAX2 attributes.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.endDocument()

      • endElement

        public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
        Adapt a SAX2 end element event.
        Specified by:
        endElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI.
        localName - The Namespace local name.
        qName - The qualified (prefixed) name.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

      • characters

        public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
        Adapt a SAX2 characters event.
        Specified by:
        characters in interface ContentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.characters(char[], int, int)

      • ignorableWhitespace

        public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
        Adapt a SAX2 ignorable whitespace event.
        Specified by:
        ignorableWhitespace in interface ContentHandler
        Parameters:
        ch - An array of characters.
        start - The starting position in the array.
        length - The number of characters to use.
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.ignorableWhitespace(char[], int, int)

      • processingInstruction

        public void processingInstruction(String target,
                                  String data)
                           throws SAXException
        Adapt a SAX2 processing instruction event.
        Specified by:
        processingInstruction in interface ContentHandler
        Parameters:
        target - The processing instruction target.
        data - The remainder of the processing instruction
        Throws:
        SAXException - The client may raise a processing exception.
        See Also:
        ContentHandler.processingInstruction(java.lang.String, java.lang.String)

      • skippedEntity

        public void skippedEntity(String name)
                   throws SAXException
        Adapt a SAX2 skipped entity event.
        Specified by:
        skippedEntity in interface ContentHandler
        Parameters:
        name - The name of the skipped entity.
        Throws:
        SAXException - Throwable by subclasses.
        See Also:
        ContentHandler.skippedEntity(java.lang.String)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLReaderFactory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax.helpers

Class XMLReaderFactory

  • java.lang.Object
    • org.xml.sax.helpers.XMLReaderFactory

  • public final class XMLReaderFactory
extends Object
    Factory for creating an XML reader.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class contains static methods for creating an XML reader from an explicit class name, or based on runtime defaults:

     try {
   XMLReader myReader = XMLReaderFactory.createXMLReader();
 } catch (SAXException e) {
   System.err.println(e.getMessage());
 }

    Note to Distributions bundled with parsers: You should modify the implementation of the no-arguments createXMLReader to handle cases where the external configuration mechanisms aren't set up. That method should do its best to return a parser when one is in the class path, even when nothing bound its class name to org.xml.sax.driver so those configuration mechanisms would see it.

    Since:
    SAX 2.0
    Version:
    2.0.1 (sax2r2)

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static XMLReader createXMLReader()
      Attempt to create an XMLReader from system defaults.
      static XMLReader createXMLReader(String className)
      Attempt to create an XML reader from a class name.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • createXMLReader

        public static XMLReader createXMLReader()
                                 throws SAXException
        Attempt to create an XMLReader from system defaults. In environments which can support it, the name of the XMLReader class is determined by trying each these options in order, and using the first one which succeeds:

        • If the system property org.xml.sax.driver has a value, that is used as an XMLReader class name.
        • The JAR "Services API" is used to look for a class name in the META-INF/services/org.xml.sax.driver file in jarfiles available to the runtime.
        • SAX parser distributions are strongly encouraged to provide a default XMLReader class name that will take effect only when previous options (on this list) are not successful.
        • Finally, if ParserFactory.makeParser() can return a system default SAX1 parser, that parser is wrapped in a ParserAdapter. (This is a migration aid for SAX1 environments, where the org.xml.sax.parser system property will often be usable.)

        In environments such as small embedded systems, which can not support that flexibility, other mechanisms to determine the default may be used.

        Note that many Java environments allow system properties to be initialized on a command line. This means that in most cases setting a good value for that property ensures that calls to this method will succeed, except when security policies intervene. This will also maximize application portability to older SAX environments, with less robust implementations of this method.

        Returns:
        A new XMLReader.
        Throws:
        SAXException - If no default XMLReader class can be identified and instantiated.
        See Also:
        createXMLReader(java.lang.String)

      • createXMLReader

        public static XMLReader createXMLReader(String className)
                                 throws SAXException
        Attempt to create an XML reader from a class name.

        Given a class name, this method attempts to load and instantiate the class as an XML reader.

        Note that this method will not be usable in environments where the caller (perhaps an applet) is not permitted to load classes dynamically.

        Returns:
        A new XML reader.
        Throws:
        SAXException - If the class cannot be loaded, instantiated, and cast to XMLReader.
        See Also:
        createXMLReader()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


InputSource

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class InputSource

  • java.lang.Object
    • org.xml.sax.InputSource

  • public class InputSource
extends Object
    A single input source for an XML entity.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class allows a SAX application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, a byte stream (possibly with a specified encoding), and/or a character stream.

    There are two places that the application can deliver an input source to the parser: as the argument to the Parser.parse method, or as the return value of the EntityResolver.resolveEntity method.

    The SAX parser will use the InputSource object to determine how to read XML input. If there is a character stream available, the parser will read that stream directly, disregarding any text encoding declaration found in that stream. If there is no character stream, but there is a byte stream, the parser will use that byte stream, using the encoding specified in the InputSource or else (if no encoding is specified) autodetecting the character encoding using an algorithm such as the one in the XML specification. If neither a character stream nor a byte stream is available, the parser will attempt to open a URI connection to the resource identified by the system identifier.

    An InputSource object belongs to the application: the SAX parser shall never modify it in any way (it may modify a copy if necessary). However, standard processing of both byte and character streams is to close them on as part of end-of-parse cleanup, so applications should not attempt to re-use such streams after they have been handed to a parser.

    Since:
    SAX 1.0
    See Also:
    XMLReader.parse(org.xml.sax.InputSource), EntityResolver.resolveEntity(java.lang.String, java.lang.String), InputStream, Reader

    • Constructor Summary

      Constructors
      Constructor and Description
      InputSource()
      Zero-argument default constructor.
      InputSource(InputStream byteStream)
      Create a new input source with a byte stream.
      InputSource(Reader characterStream)
      Create a new input source with a character stream.
      InputSource(String systemId)
      Create a new input source with a system identifier.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      InputStream getByteStream()
      Get the byte stream for this input source.
      Reader getCharacterStream()
      Get the character stream for this input source.
      String getEncoding()
      Get the character encoding for a byte stream or URI.
      String getPublicId()
      Get the public identifier for this input source.
      String getSystemId()
      Get the system identifier for this input source.
      void setByteStream(InputStream byteStream)
      Set the byte stream for this input source.
      void setCharacterStream(Reader characterStream)
      Set the character stream for this input source.
      void setEncoding(String encoding)
      Set the character encoding, if known.
      void setPublicId(String publicId)
      Set the public identifier for this input source.
      void setSystemId(String systemId)
      Set the system identifier for this input source.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • InputSource

        public InputSource()
        Zero-argument default constructor.
        See Also:
        setPublicId(java.lang.String),
setSystemId(java.lang.String),
setByteStream(java.io.InputStream),
setCharacterStream(java.io.Reader),
setEncoding(java.lang.String)

      • InputSource

        public InputSource(String systemId)
        Create a new input source with a system identifier.

        Applications may use setPublicId to include a public identifier as well, or setEncoding to specify the character encoding, if known.

        If the system identifier is a URL, it must be fully resolved (it may not be a relative URL).

        Parameters:
        systemId - The system identifier (URI).
        See Also:
        setPublicId(java.lang.String),
setSystemId(java.lang.String),
setByteStream(java.io.InputStream),
setEncoding(java.lang.String),
setCharacterStream(java.io.Reader)

      • InputSource

        public InputSource(InputStream byteStream)
        Create a new input source with a byte stream.

        Application writers should use setSystemId() to provide a base for resolving relative URIs, may use setPublicId to include a public identifier, and may use setEncoding to specify the object's character encoding.

        Parameters:
        byteStream - The raw byte stream containing the document.
        See Also:
        setPublicId(java.lang.String),
setSystemId(java.lang.String),
setEncoding(java.lang.String),
setByteStream(java.io.InputStream),
setCharacterStream(java.io.Reader)

      • InputSource

        public InputSource(Reader characterStream)
        Create a new input source with a character stream.

        Application writers should use setSystemId() to provide a base for resolving relative URIs, and may use setPublicId to include a public identifier.

        The character stream shall not include a byte order mark.

        See Also:
        setPublicId(java.lang.String),
setSystemId(java.lang.String),
setByteStream(java.io.InputStream),
setCharacterStream(java.io.Reader)

    • Method Detail

      • setPublicId

        public void setPublicId(String publicId)
        Set the public identifier for this input source.

        The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.

        Parameters:
        publicId - The public identifier as a string.
        See Also:
        getPublicId(),
Locator.getPublicId(),
SAXParseException.getPublicId()

      • getPublicId

        public String getPublicId()
        Get the public identifier for this input source.
        Returns:
        The public identifier, or null if none was supplied.
        See Also:
        setPublicId(java.lang.String)

      • setSystemId

        public void setSystemId(String systemId)
        Set the system identifier for this input source.

        The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if there is no byte stream or character stream specified).

        If the application knows the character encoding of the object pointed to by the system identifier, it can register the encoding using the setEncoding method.

        If the system identifier is a URL, it must be fully resolved (it may not be a relative URL).

        Parameters:
        systemId - The system identifier as a string.
        See Also:
        setEncoding(java.lang.String),
getSystemId(),
Locator.getSystemId(),
SAXParseException.getSystemId()

      • getSystemId

        public String getSystemId()
        Get the system identifier for this input source.

        The getEncoding method will return the character encoding of the object pointed to, or null if unknown.

        If the system ID is a URL, it will be fully resolved.

        Returns:
        The system identifier, or null if none was supplied.
        See Also:
        setSystemId(java.lang.String), getEncoding()

      • setByteStream

        public void setByteStream(InputStream byteStream)
        Set the byte stream for this input source.

        The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.

        If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.

        Parameters:
        byteStream - A byte stream containing an XML document or other entity.
        See Also:
        setEncoding(java.lang.String),
getByteStream(),
getEncoding(),
InputStream

      • getByteStream

        public InputStream getByteStream()
        Get the byte stream for this input source.

        The getEncoding method will return the character encoding for this byte stream, or null if unknown.

        Returns:
        The byte stream, or null if none was supplied.
        See Also:
        getEncoding(), setByteStream(java.io.InputStream)

      • setEncoding

        public void setEncoding(String encoding)
        Set the character encoding, if known.

        The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML 1.0 recommendation).

        This method has no effect when the application provides a character stream.

        Parameters:
        encoding - A string describing the character encoding.
        See Also:
        setSystemId(java.lang.String),
setByteStream(java.io.InputStream),
getEncoding()

      • getEncoding

        public String getEncoding()
        Get the character encoding for a byte stream or URI. This value will be ignored when the application provides a character stream.
        Returns:
        The encoding, or null if none was supplied.
        See Also:
        setByteStream(java.io.InputStream),
getSystemId(),
getByteStream()

      • setCharacterStream

        public void setCharacterStream(Reader characterStream)
        Set the character stream for this input source.

        If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.

        Parameters:
        characterStream - The character stream containing the XML document or other entity.
        See Also:
        getCharacterStream(), Reader

      • getCharacterStream

        public Reader getCharacterStream()
        Get the character stream for this input source.
        Returns:
        The character stream, or null if none was supplied.
        See Also:
        setCharacterStream(java.io.Reader)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Locator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface Locator

  • All Known Subinterfaces:
    Locator2
    All Known Implementing Classes:
    Locator2Impl, LocatorImpl

    public interface Locator
    Interface for associating a SAX event with a document location.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    If a SAX parser provides location information to the SAX application, it does so by implementing this interface and then passing an instance to the application using the content handler's setDocumentLocator method. The application can use the object to obtain the location of any other SAX event in the XML source document.

    Note that the results returned by the object will be valid only during the scope of each callback method: the application will receive unpredictable results if it attempts to use the locator at any other time, or after parsing completes.

    SAX parsers are not required to supply a locator, but they are very strongly encouraged to do so. If the parser supplies a locator, it must do so before reporting any other document events. If no locator has been set by the time the application receives the startDocument event, the application should assume that a locator is not available.

    Since:
    SAX 1.0
    See Also:
    ContentHandler.setDocumentLocator(org.xml.sax.Locator)

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      Return the column number where the current document event ends.
      int getLineNumber()
      Return the line number where the current document event ends.
      String getPublicId()
      Return the public identifier for the current document event.
      String getSystemId()
      Return the system identifier for the current document event.

    • Method Detail

      • getPublicId

        String getPublicId()
        Return the public identifier for the current document event.

        The return value is the public identifier of the document entity or of the external parsed entity in which the markup triggering the event appears.

        Returns:
        A string containing the public identifier, or null if none is available.
        See Also:
        getSystemId()

      • getSystemId

        String getSystemId()
        Return the system identifier for the current document event.

        The return value is the system identifier of the document entity or of the external parsed entity in which the markup triggering the event appears.

        If the system identifier is a URL, the parser must resolve it fully before passing it to the application. For example, a file name must always be provided as a file:... URL, and other kinds of relative URI are also resolved against their bases.

        Returns:
        A string containing the system identifier, or null if none is available.
        See Also:
        getPublicId()

      • getLineNumber

        int getLineNumber()
        Return the line number where the current document event ends. Lines are delimited by line ends, which are defined in the XML specification.

        Warning: The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. In some cases, these "line" numbers match what would be displayed as columns, and in others they may not match the source text due to internal entity expansion.

        The return value is an approximation of the line number in the document entity or external parsed entity where the markup triggering the event appears.

        If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first line is line 1.

        Returns:
        The line number, or -1 if none is available.
        See Also:
        getColumnNumber()

      • getColumnNumber

        int getColumnNumber()
        Return the column number where the current document event ends. This is one-based number of Java char values since the last line end.

        Warning: The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. For example, when lines contain combining character sequences, wide characters, surrogate pairs, or bi-directional text, the value may not correspond to the column in a text editor's display.

        The return value is an approximation of the column number in the document entity or external parsed entity where the markup triggering the event appears.

        If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first column in each line is column 1.

        Returns:
        The column number, or -1 if none is available.
        See Also:
        getLineNumber()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


Parser

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface Parser

  • All Known Implementing Classes:
    XMLReaderAdapter
    Deprecated.
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.

    public interface Parser
    Basic interface for SAX (Simple API for XML) parsers.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This was the main event supplier interface for SAX1; it has been replaced in SAX2 by XMLReader, which includes Namespace support and sophisticated configurability and extensibility.

    All SAX1 parsers must implement this basic interface: it allows applications to register handlers for different types of events and to initiate a parse from a URI, or a character stream.

    All SAX1 parsers must also implement a zero-argument constructor (though other constructors are also allowed).

    SAX1 parsers are reusable but not re-entrant: the application may reuse a parser object (possibly with a different input source) once the first parse has completed successfully, but it may not invoke the parse() methods recursively within a parse.

    Since:
    SAX 1.0
    See Also:
    EntityResolver, DTDHandler, DocumentHandler, ErrorHandler, HandlerBase, InputSource

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      void parse(InputSource source)
      Deprecated.
      Parse an XML document.
      void parse(String systemId)
      Deprecated.
      Parse an XML document from a system identifier (URI).
      void setDocumentHandler(DocumentHandler handler)
      Deprecated.
      Allow an application to register a document event handler.
      void setDTDHandler(DTDHandler handler)
      Deprecated.
      Allow an application to register a DTD event handler.
      void setEntityResolver(EntityResolver resolver)
      Deprecated.
      Allow an application to register a custom entity resolver.
      void setErrorHandler(ErrorHandler handler)
      Deprecated.
      Allow an application to register an error event handler.
      void setLocale(Locale locale)
      Deprecated.
      Allow an application to request a locale for errors and warnings.

    • Method Detail

      • setLocale

        void setLocale(Locale locale)
        throws SAXException
        Deprecated.
        Allow an application to request a locale for errors and warnings.

        SAX parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may not request a locale change in the middle of a parse.

        Parameters:
        locale - A Java Locale object.
        Throws:
        SAXException - Throws an exception (using the previous or default locale) if the requested locale is not supported.
        See Also:
        SAXException, SAXParseException

      • setEntityResolver

        void setEntityResolver(EntityResolver resolver)
        Deprecated.
        Allow an application to register a custom entity resolver.

        If the application does not register an entity resolver, the SAX parser will resolve system identifiers and open connections to entities itself (this is the default behaviour implemented in HandlerBase).

        Applications may register a new or different entity resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.

        Parameters:
        resolver - The object for resolving entities.
        See Also:
        EntityResolver, HandlerBase

      • setDTDHandler

        void setDTDHandler(DTDHandler handler)
        Deprecated.
        Allow an application to register a DTD event handler.

        If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The DTD handler.
        See Also:
        DTDHandler, HandlerBase

      • setDocumentHandler

        void setDocumentHandler(DocumentHandler handler)
        Deprecated.
        Allow an application to register a document event handler.

        If the application does not register a document handler, all document events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The document handler.
        See Also:
        DocumentHandler, HandlerBase

      • setErrorHandler

        void setErrorHandler(ErrorHandler handler)
        Deprecated.
        Allow an application to register an error event handler.

        If the application does not register an error event handler, all error events reported by the SAX parser will be silently ignored, except for fatalError, which will throw a SAXException (this is the default behaviour implemented by HandlerBase).

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The error handler.
        See Also:
        ErrorHandler, SAXException, HandlerBase

      • parse

        void parse(InputSource source)
    throws SAXException,
           IOException
        Deprecated.
        Parse an XML document.

        The application can use this method to instruct the SAX parser to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

        Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional XML document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.

        Parameters:
        source - The input source for the top-level of the XML document.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        InputSource,
parse(java.lang.String),
setEntityResolver(org.xml.sax.EntityResolver),
setDTDHandler(org.xml.sax.DTDHandler),
setDocumentHandler(org.xml.sax.DocumentHandler),
setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        void parse(String systemId)
    throws SAXException,
           IOException
        Deprecated.
        Parse an XML document from a system identifier (URI).

        This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:

         parse(new InputSource(systemId));

        If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.

        Parameters:
        systemId - The system identifier (URI).
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        parse(org.xml.sax.InputSource)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class SAXException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.xml.sax.SAXException
  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    SAXNotRecognizedException, SAXNotSupportedException, SAXParseException

    public class SAXException
extends Exception
    Encapsulate a general SAX error or warning.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This class can contain basic error or warning information from either the XML parser or the application: a parser writer or application writer can subclass it to provide additional functionality. SAX handlers may throw this exception or any exception subclassed from it.

    If the application needs to pass through other types of exceptions, it must wrap those exceptions in a SAXException or an exception derived from a SAXException.

    If the parser or application needs to include information about a specific location in an XML document, it should use the SAXParseException subclass.

    Since:
    SAX 1.0
    Version:
    2.0.1 (sax2r2)
    See Also:
    SAXParseException, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXException()
      Create a new SAXException.
      SAXException(Exception e)
      Create a new SAXException wrapping an existing exception.
      SAXException(String message)
      Create a new SAXException.
      SAXException(String message, Exception e)
      Create a new SAXException from an existing exception.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Throwable getCause()
      Return the cause of the exception
      Exception getException()
      Return the embedded exception, if any.
      String getMessage()
      Return a detail message for this exception.
      String toString()
      Override toString to pick up any embedded exception.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SAXException

        public SAXException()
        Create a new SAXException.

      • SAXException

        public SAXException(String message)
        Create a new SAXException.
        Parameters:
        message - The error or warning message.

      • SAXException

        public SAXException(Exception e)
        Create a new SAXException wrapping an existing exception.

        The existing exception will be embedded in the new one, and its message will become the default message for the SAXException.

        Parameters:
        e - The exception to be wrapped in a SAXException.

      • SAXException

        public SAXException(String message,
                    Exception e)
        Create a new SAXException from an existing exception.

        The existing exception will be embedded in the new one, but the new exception will have its own message.

        Parameters:
        message - The detail message.
        e - The exception to be wrapped in a SAXException.

    • Method Detail

      • getMessage

        public String getMessage()
        Return a detail message for this exception.

        If there is an embedded exception, and if the SAXException has no detail message of its own, this method will return the detail message from the embedded exception.

        Overrides:
        getMessage in class Throwable
        Returns:
        The error or warning message.

      • getException

        public Exception getException()
        Return the embedded exception, if any.
        Returns:
        The embedded exception, or null if there is none.

      • getCause

        public Throwable getCause()
        Return the cause of the exception
        Overrides:
        getCause in class Throwable
        Returns:
        Return the cause of the exception

      • toString

        public String toString()
        Override toString to pick up any embedded exception.
        Overrides:
        toString in class Throwable
        Returns:
        A string representation of this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXNotRecognizedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class SAXNotRecognizedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.xml.sax.SAXException
          • org.xml.sax.SAXNotRecognizedException
  • All Implemented Interfaces:
    Serializable

    public class SAXNotRecognizedException
extends SAXException
    Exception class for an unrecognized identifier.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    An XMLReader will throw this exception when it finds an unrecognized feature or property identifier; SAX applications and extensions may use this class for other, similar purposes.

    Since:
    SAX 2.0
    See Also:
    SAXNotSupportedException, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXNotRecognizedException()
      Default constructor.
      SAXNotRecognizedException(String message)
      Construct a new exception with the given message.

    • Method Summary

      • Methods inherited from class org.xml.sax.SAXException

        getCause, getException, getMessage, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SAXNotRecognizedException

        public SAXNotRecognizedException()
        Default constructor.

      • SAXNotRecognizedException

        public SAXNotRecognizedException(String message)
        Construct a new exception with the given message.
        Parameters:
        message - The text message of the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXNotSupportedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class SAXNotSupportedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.xml.sax.SAXException
          • org.xml.sax.SAXNotSupportedException
  • All Implemented Interfaces:
    Serializable

    public class SAXNotSupportedException
extends SAXException
    Exception class for an unsupported operation.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    An XMLReader will throw this exception when it recognizes a feature or property identifier, but cannot perform the requested operation (setting a state or value). Other SAX2 applications and extensions may use this class for similar purposes.

    Since:
    SAX 2.0
    See Also:
    SAXNotRecognizedException, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXNotSupportedException()
      Construct a new exception with no message.
      SAXNotSupportedException(String message)
      Construct a new exception with the given message.

    • Method Summary

      • Methods inherited from class org.xml.sax.SAXException

        getCause, getException, getMessage, toString

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SAXNotSupportedException

        public SAXNotSupportedException()
        Construct a new exception with no message.

      • SAXNotSupportedException

        public SAXNotSupportedException(String message)
        Construct a new exception with the given message.
        Parameters:
        message - The text message of the exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


SAXParseException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Class SAXParseException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • org.xml.sax.SAXException
          • org.xml.sax.SAXParseException
  • All Implemented Interfaces:
    Serializable

    public class SAXParseException
extends SAXException
    Encapsulate an XML parse error or warning.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    This exception may include information for locating the error in the original XML document, as if it came from a Locator object. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action.

    Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.

    Since:
    SAX 1.0
    Version:
    2.0.1 (sax2r2)
    See Also:
    SAXException, Locator, ErrorHandler, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      SAXParseException(String message, Locator locator)
      Create a new SAXParseException from a message and a Locator.
      SAXParseException(String message, Locator locator, Exception e)
      Wrap an existing exception in a SAXParseException.
      SAXParseException(String message, String publicId, String systemId, int lineNumber, int columnNumber)
      Create a new SAXParseException.
      SAXParseException(String message, String publicId, String systemId, int lineNumber, int columnNumber, Exception e)
      Create a new SAXParseException with an embedded exception.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int getColumnNumber()
      The column number of the end of the text where the exception occurred.
      int getLineNumber()
      The line number of the end of the text where the exception occurred.
      String getPublicId()
      Get the public identifier of the entity where the exception occurred.
      String getSystemId()
      Get the system identifier of the entity where the exception occurred.
      String toString()
      Override toString to provide more detailed error message.

      • Methods inherited from class org.xml.sax.SAXException

        getCause, getException, getMessage

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • SAXParseException

        public SAXParseException(String message,
                         Locator locator)
        Create a new SAXParseException from a message and a Locator.

        This constructor is especially useful when an application is creating its own exception from within a ContentHandler callback.

        Parameters:
        message - The error or warning message.
        locator - The locator object for the error or warning (may be null).
        See Also:
        Locator

      • SAXParseException

        public SAXParseException(String message,
                         Locator locator,
                         Exception e)
        Wrap an existing exception in a SAXParseException.

        This constructor is especially useful when an application is creating its own exception from within a ContentHandler callback, and needs to wrap an existing exception that is not a subclass of SAXException.

        Parameters:
        message - The error or warning message, or null to use the message from the embedded exception.
        locator - The locator object for the error or warning (may be null).
        e - Any exception.
        See Also:
        Locator

      • SAXParseException

        public SAXParseException(String message,
                         String publicId,
                         String systemId,
                         int lineNumber,
                         int columnNumber)
        Create a new SAXParseException.

        This constructor is most useful for parser writers.

        All parameters except the message are as if they were provided by a Locator. For example, if the system identifier is a URL (including relative filename), the caller must resolve it fully before creating the exception.

        Parameters:
        message - The error or warning message.
        publicId - The public identifier of the entity that generated the error or warning.
        systemId - The system identifier of the entity that generated the error or warning.
        lineNumber - The line number of the end of the text that caused the error or warning.
        columnNumber - The column number of the end of the text that cause the error or warning.

      • SAXParseException

        public SAXParseException(String message,
                         String publicId,
                         String systemId,
                         int lineNumber,
                         int columnNumber,
                         Exception e)
        Create a new SAXParseException with an embedded exception.

        This constructor is most useful for parser writers who need to wrap an exception that is not a subclass of SAXException.

        All parameters except the message and exception are as if they were provided by a Locator. For example, if the system identifier is a URL (including relative filename), the caller must resolve it fully before creating the exception.

        Parameters:
        message - The error or warning message, or null to use the message from the embedded exception.
        publicId - The public identifier of the entity that generated the error or warning.
        systemId - The system identifier of the entity that generated the error or warning.
        lineNumber - The line number of the end of the text that caused the error or warning.
        columnNumber - The column number of the end of the text that cause the error or warning.
        e - Another exception to embed in this one.

    • Method Detail

      • getPublicId

        public String getPublicId()
        Get the public identifier of the entity where the exception occurred.
        Returns:
        A string containing the public identifier, or null if none is available.
        See Also:
        Locator.getPublicId()

      • getSystemId

        public String getSystemId()
        Get the system identifier of the entity where the exception occurred.

        If the system identifier is a URL, it will have been resolved fully.

        Returns:
        A string containing the system identifier, or null if none is available.
        See Also:
        Locator.getSystemId()

      • getLineNumber

        public int getLineNumber()
        The line number of the end of the text where the exception occurred.

        The first line is line 1.

        Returns:
        An integer representing the line number, or -1 if none is available.
        See Also:
        Locator.getLineNumber()

      • getColumnNumber

        public int getColumnNumber()
        The column number of the end of the text where the exception occurred.

        The first column in a line is position 1.

        Returns:
        An integer representing the column number, or -1 if none is available.
        See Also:
        Locator.getColumnNumber()

      • toString

        public String toString()
        Override toString to provide more detailed error message.
        Overrides:
        toString in class SAXException
        Returns:
        A string representation of this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLFilter

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface XMLFilter

  • All Superinterfaces:
    XMLReader
    All Known Implementing Classes:
    XMLFilterImpl

    public interface XMLFilter
extends XMLReader
    Interface for an XML filter.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    An XML filter is like an XML reader, except that it obtains its events from another XML reader rather than a primary source like an XML document or database. Filters can modify a stream of events as they pass on to the final application.

    The XMLFilterImpl helper class provides a convenient base for creating SAX2 filters, by passing on all EntityResolver, DTDHandler, ContentHandler and ErrorHandler events automatically.

    Since:
    SAX 2.0
    See Also:
    XMLFilterImpl

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      XMLReader getParent()
      Get the parent reader.
      void setParent(XMLReader parent)
      Set the parent reader.

      • Methods inherited from interface org.xml.sax.XMLReader

        getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty

    • Method Detail

      • setParent

        void setParent(XMLReader parent)
        Set the parent reader.

        This method allows the application to link the filter to a parent reader (which may be another filter). The argument may not be null.

        Parameters:
        parent - The parent reader.

      • getParent

        XMLReader getParent()
        Get the parent reader.

        This method allows the application to query the parent reader (which may be another filter). It is generally a bad idea to perform any operations on the parent reader directly: they should all pass through this filter.

        Returns:
        The parent filter, or null if none has been set.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


XMLReader

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact2, compact3
org.xml.sax

Interface XMLReader

  • All Known Subinterfaces:
    XMLFilter
    All Known Implementing Classes:
    ParserAdapter, XMLFilterImpl

    public interface XMLReader
    Interface for reading an XML document using callbacks.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

    Note: despite its name, this interface does not extend the standard Java Reader interface, because reading XML is a fundamentally different activity than reading character data.

    XMLReader is the interface that an XML parser's SAX2 driver must implement. This interface allows an application to set and query features and properties in the parser, to register event handlers for document processing, and to initiate a document parse.

    All SAX interfaces are assumed to be synchronous: the parse methods must not return until parsing is complete, and readers must wait for an event-handler callback to return before reporting the next event.

    This interface replaces the (now deprecated) SAX 1.0 Parser interface. The XMLReader interface contains two important enhancements over the old Parser interface (as well as some minor ones):

    1. it adds a standard way to query and set features and properties; and
    2. it adds Namespace support, which is required for many higher-level XML standards.

    There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader and vice-versa.

    Since:
    SAX 2.0
    See Also:
    XMLFilter, ParserAdapter, XMLReaderAdapter

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ContentHandler getContentHandler()
      Return the current content handler.
      DTDHandler getDTDHandler()
      Return the current DTD handler.
      EntityResolver getEntityResolver()
      Return the current entity resolver.
      ErrorHandler getErrorHandler()
      Return the current error handler.
      boolean getFeature(String name)
      Look up the value of a feature flag.
      Object getProperty(String name)
      Look up the value of a property.
      void parse(InputSource input)
      Parse an XML document.
      void parse(String systemId)
      Parse an XML document from a system identifier (URI).
      void setContentHandler(ContentHandler handler)
      Allow an application to register a content event handler.
      void setDTDHandler(DTDHandler handler)
      Allow an application to register a DTD event handler.
      void setEntityResolver(EntityResolver resolver)
      Allow an application to register an entity resolver.
      void setErrorHandler(ErrorHandler handler)
      Allow an application to register an error event handler.
      void setFeature(String name, boolean value)
      Set the value of a feature flag.
      void setProperty(String name, Object value)
      Set the value of a property.

    • Method Detail

      • getFeature

        boolean getFeature(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException
        Look up the value of a feature flag.

        The feature name is any fully-qualified URI. It is possible for an XMLReader to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a parse. Also, some feature values may not be programmatically accessible. (In the case of an adapter for SAX1 Parser, there is no implementation-independent way to expose whether the underlying parser is performing validation, expanding external entities, and so forth.)

        All XMLReaders are required to recognize the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes feature names.

        Typical usage is something like this:

         XMLReader r = new MySAXDriver();

                         // try to activate validation
 try {
   r.setFeature("http://xml.org/sax/features/validation", true);
 } catch (SAXException e) {
   System.err.println("Cannot activate validation.");
 }

                         // register event handlers
 r.setContentHandler(new MyContentHandler());
 r.setErrorHandler(new MyErrorHandler());

                         // parse the first document
 try {
   r.parse("http://www.foo.com/mydoc.xml");
 } catch (IOException e) {
   System.err.println("I/O exception reading XML document");
 } catch (SAXException e) {
   System.err.println("XML exception reading document.");
 }

        Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

        Parameters:
        name - The feature name, which is a fully-qualified URI.
        Returns:
        The current value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the feature name but cannot determine its value at this time.
        See Also:
        setFeature(java.lang.String, boolean)

      • setFeature

        void setFeature(String name,
                boolean value)
         throws SAXNotRecognizedException,
                SAXNotSupportedException
        Set the value of a feature flag.

        The feature name is any fully-qualified URI. It is possible for an XMLReader to expose a feature value but to be unable to change the current value. Some feature values may be immutable or mutable only in specific contexts, such as before, during, or after a parse.

        All XMLReaders are required to support setting http://xml.org/sax/features/namespaces to true and http://xml.org/sax/features/namespace-prefixes to false.

        Parameters:
        name - The feature name, which is a fully-qualified URI.
        value - The requested value of the feature (true or false).
        Throws:
        SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the feature name but cannot set the requested value.
        See Also:
        getFeature(java.lang.String)

      • getProperty

        Object getProperty(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException
        Look up the value of a property.

        The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a parse.

        XMLReaders are not required to recognize any specific property names, though an initial core set is documented for SAX2.

        Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

        Parameters:
        name - The property name, which is a fully-qualified URI.
        Returns:
        The current value of the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the property name but cannot determine its value at this time.
        See Also:
        setProperty(java.lang.String, java.lang.Object)

      • setProperty

        void setProperty(String name,
                 Object value)
          throws SAXNotRecognizedException,
                 SAXNotSupportedException
        Set the value of a property.

        The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a parse.

        XMLReaders are not required to recognize setting any specific property names, though a core set is defined by SAX2.

        This method is also the standard mechanism for setting extended handlers.

        Parameters:
        name - The property name, which is a fully-qualified URI.
        value - The requested value for the property.
        Throws:
        SAXNotRecognizedException - If the property value can't be assigned or retrieved.
        SAXNotSupportedException - When the XMLReader recognizes the property name but cannot set the requested value.

      • setEntityResolver

        void setEntityResolver(EntityResolver resolver)
        Allow an application to register an entity resolver.

        If the application does not register an entity resolver, the XMLReader will perform its own default resolution.

        Applications may register a new or different resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.

        Parameters:
        resolver - The entity resolver.
        See Also:
        getEntityResolver()

      • getEntityResolver

        EntityResolver getEntityResolver()
        Return the current entity resolver.
        Returns:
        The current entity resolver, or null if none has been registered.
        See Also:
        setEntityResolver(org.xml.sax.EntityResolver)

      • setDTDHandler

        void setDTDHandler(DTDHandler handler)
        Allow an application to register a DTD event handler.

        If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The DTD handler.
        See Also:
        getDTDHandler()

      • getDTDHandler

        DTDHandler getDTDHandler()
        Return the current DTD handler.
        Returns:
        The current DTD handler, or null if none has been registered.
        See Also:
        setDTDHandler(org.xml.sax.DTDHandler)

      • setContentHandler

        void setContentHandler(ContentHandler handler)
        Allow an application to register a content event handler.

        If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The content handler.
        See Also:
        getContentHandler()

      • getContentHandler

        ContentHandler getContentHandler()
        Return the current content handler.
        Returns:
        The current content handler, or null if none has been registered.
        See Also:
        setContentHandler(org.xml.sax.ContentHandler)

      • setErrorHandler

        void setErrorHandler(ErrorHandler handler)
        Allow an application to register an error event handler.

        If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.

        Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

        Parameters:
        handler - The error handler.
        See Also:
        getErrorHandler()

      • getErrorHandler

        ErrorHandler getErrorHandler()
        Return the current error handler.
        Returns:
        The current error handler, or null if none has been registered.
        See Also:
        setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        void parse(InputSource input)
    throws IOException,
           SAXException
        Parse an XML document.

        The application can use this method to instruct the XML reader to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

        Applications may not invoke this method while a parse is in progress (they should create a new XMLReader instead for each nested XML document). Once a parse is complete, an application may reuse the same XMLReader object, possibly with a different input source. Configuration of the XMLReader object (such as handler bindings and values established for feature flags and properties) is unchanged by completion of a parse, unless the definition of that aspect of the configuration explicitly specifies other behavior. (For example, feature flags or properties exposing characteristics of the document being parsed.)

        During the parse, the XMLReader will provide information about the XML document through the registered event handlers.

        This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.

        Parameters:
        input - The input source for the top-level of the XML document.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        InputSource,
parse(java.lang.String),
setEntityResolver(org.xml.sax.EntityResolver),
setDTDHandler(org.xml.sax.DTDHandler),
setContentHandler(org.xml.sax.ContentHandler),
setErrorHandler(org.xml.sax.ErrorHandler)

      • parse

        void parse(String systemId)
    throws IOException,
           SAXException
        Parse an XML document from a system identifier (URI).

        This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:

         parse(new InputSource(systemId));

        If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.

        Parameters:
        systemId - The system identifier (URI).
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        See Also:
        parse(org.xml.sax.InputSource)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Attach API

Packages
Package | Description
com.sun.tools.attach | Provides the API to attach to a JavaTM virtual machine.
com.sun.tools.attach.spi | Only developers who are defining new attach providers should need to make direct use of this package.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


All Classes

  • AgentInitializationException
  • AgentLoadException
  • AttachNotSupportedException
  • AttachPermission
  • AttachProvider
  • VirtualMachine
  • VirtualMachineDescriptor


Attach API

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.


Constant Field Values

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Constant Field Values

Contents

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Help

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

  • Overview

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

  • Package

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    • Interfaces (italic)
    • Classes
    • Enums
    • Exceptions
    • Errors
    • Annotation Types

  • Class/Interface

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    • Class inheritance diagram
    • Direct Subclasses
    • All Known Subinterfaces
    • All Known Implementing Classes
    • Class/interface declaration
    • Class/interface description
    • Nested Class Summary
    • Field Summary
    • Constructor Summary
    • Method Summary
    • Field Detail
    • Constructor Detail
    • Method Detail

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

  • Annotation Type

    Each annotation type has its own separate page with the following sections:

    • Annotation Type declaration
    • Annotation Type description
    • Required Element Summary
    • Optional Element Summary
    • Element Detail

  • Enum

    Each enum has its own separate page with the following sections:

    • Enum declaration
    • Enum description
    • Enum Constant Summary
    • Enum Constant Detail

  • Use

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

  • Tree (Class Hierarchy)

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

  • Index

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

  • Prev/Next

    These links take you to the next or previous class, interface, package, or related page.

  • Frames/No Frames

    These links show and hide the HTML frames. All pages are available with or without frames.

  • All Classes

    The All Classes link shows all classes and interfaces except non-static nested types.

  • Serialized Form

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

  • Constant Field Values

    The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For All Packages

Package Hierarchies:
  • com.sun.tools.attach,
  • com.sun.tools.attach.spi

Class Hierarchy

  • java.lang.Object
    • com.sun.tools.attach.spi.AttachProvider
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • com.sun.tools.attach.AttachPermission
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • com.sun.tools.attach.AgentInitializationException
        • com.sun.tools.attach.AgentLoadException
        • com.sun.tools.attach.AttachNotSupportedException
    • com.sun.tools.attach.VirtualMachine
    • com.sun.tools.attach.VirtualMachineDescriptor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Index

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
A C D E G H I L N P R T V

A

AgentInitializationException - Exception in com.sun.tools.attach
The exception thrown when an agent fails to initialize in the target Java virtual machine.
AgentInitializationException() - Constructor for exception com.sun.tools.attach.AgentInitializationException
Constructs an AgentInitializationException with no detail message.
AgentInitializationException(String) - Constructor for exception com.sun.tools.attach.AgentInitializationException
Constructs an AgentInitializationException with the specified detail message.
AgentInitializationException(String, int) - Constructor for exception com.sun.tools.attach.AgentInitializationException
Constructs an AgentInitializationException with the specified detail message and the return value from the execution of the agent's Agent_OnAttach function.
AgentLoadException - Exception in com.sun.tools.attach
The exception thrown when an agent cannot be loaded into the target Java virtual machine.
AgentLoadException() - Constructor for exception com.sun.tools.attach.AgentLoadException
Constructs an AgentLoadException with no detail message.
AgentLoadException(String) - Constructor for exception com.sun.tools.attach.AgentLoadException
Constructs an AgentLoadException with the specified detail message.
attach(String) - Static method in class com.sun.tools.attach.VirtualMachine
Attaches to a Java virtual machine.
attach(VirtualMachineDescriptor) - Static method in class com.sun.tools.attach.VirtualMachine
Attaches to a Java virtual machine.
AttachNotSupportedException - Exception in com.sun.tools.attach
Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist.
AttachNotSupportedException() - Constructor for exception com.sun.tools.attach.AttachNotSupportedException
Constructs an AttachNotSupportedException with no detail message.
AttachNotSupportedException(String) - Constructor for exception com.sun.tools.attach.AttachNotSupportedException
Constructs an AttachNotSupportedException with the specified detail message.
AttachPermission - Class in com.sun.tools.attach
When a SecurityManager set, this is the permission which will be checked when code invokes VirtalMachine.attach to attach to a target virtual machine.
AttachPermission(String) - Constructor for class com.sun.tools.attach.AttachPermission
Constructs a new AttachPermission object.
AttachPermission(String, String) - Constructor for class com.sun.tools.attach.AttachPermission
Constructs a new AttachPermission object.
AttachProvider - Class in com.sun.tools.attach.spi
Attach provider class for attaching to a Java virtual machine.
AttachProvider() - Constructor for class com.sun.tools.attach.spi.AttachProvider
Initializes a new instance of this class.
attachVirtualMachine(String) - Method in class com.sun.tools.attach.spi.AttachProvider
Attaches to a Java virtual machine.
attachVirtualMachine(VirtualMachineDescriptor) - Method in class com.sun.tools.attach.spi.AttachProvider
Attaches to a Java virtual machine.

C

com.sun.tools.attach - package com.sun.tools.attach
Provides the API to attach to a JavaTM virtual machine.
com.sun.tools.attach.spi - package com.sun.tools.attach.spi
Only developers who are defining new attach providers should need to make direct use of this package.

D

detach() - Method in class com.sun.tools.attach.VirtualMachine
Detach from the virtual machine.
displayName() - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Return the display name component of this descriptor.

E

equals(Object) - Method in class com.sun.tools.attach.VirtualMachine
Tests this VirtualMachine for equality with another object.
equals(Object) - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Tests this VirtualMachineDescriptor for equality with another object.

G

getAgentProperties() - Method in class com.sun.tools.attach.VirtualMachine
Returns the current agent properties in the target virtual machine.
getSystemProperties() - Method in class com.sun.tools.attach.VirtualMachine
Returns the current system properties in the target virtual machine.

H

hashCode() - Method in class com.sun.tools.attach.VirtualMachine
Returns a hash-code value for this VirtualMachine.
hashCode() - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Returns a hash-code value for this VirtualMachineDescriptor.

I

id() - Method in class com.sun.tools.attach.VirtualMachine
Returns the identifier for this Java virtual machine.
id() - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Return the identifier component of this descriptor.

L

list() - Static method in class com.sun.tools.attach.VirtualMachine
Return a list of Java virtual machines.
listVirtualMachines() - Method in class com.sun.tools.attach.spi.AttachProvider
Lists the Java virtual machines known to this provider.
loadAgent(String, String) - Method in class com.sun.tools.attach.VirtualMachine
Loads an agent.
loadAgent(String) - Method in class com.sun.tools.attach.VirtualMachine
Loads an agent.
loadAgentLibrary(String, String) - Method in class com.sun.tools.attach.VirtualMachine
Loads an agent library.
loadAgentLibrary(String) - Method in class com.sun.tools.attach.VirtualMachine
Loads an agent library.
loadAgentPath(String, String) - Method in class com.sun.tools.attach.VirtualMachine
Load a native agent library by full pathname.
loadAgentPath(String) - Method in class com.sun.tools.attach.VirtualMachine
Load a native agent library by full pathname.

N

name() - Method in class com.sun.tools.attach.spi.AttachProvider
Return this provider's name.

P

provider() - Method in class com.sun.tools.attach.VirtualMachine
Returns the provider that created this virtual machine.
provider() - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Return the AttachProvider that this descriptor references.
providers() - Static method in class com.sun.tools.attach.spi.AttachProvider
Returns a list of the installed attach providers.

R

returnValue() - Method in exception com.sun.tools.attach.AgentInitializationException
If the exception was created with the return value from the agent Agent_OnAttach function then this returns that value, otherwise returns 0.

T

toString() - Method in class com.sun.tools.attach.VirtualMachine
Returns the string representation of the VirtualMachine.
toString() - Method in class com.sun.tools.attach.VirtualMachineDescriptor
Returns the string representation of the VirtualMachineDescriptor.
type() - Method in class com.sun.tools.attach.spi.AttachProvider
Return this provider's type.

V

VirtualMachine - Class in com.sun.tools.attach
A Java virtual machine.
VirtualMachine(AttachProvider, String) - Constructor for class com.sun.tools.attach.VirtualMachine
Initializes a new instance of this class.
VirtualMachineDescriptor - Class in com.sun.tools.attach
Describes a Java virtual machine.
VirtualMachineDescriptor(AttachProvider, String, String) - Constructor for class com.sun.tools.attach.VirtualMachineDescriptor
Creates a virtual machine descriptor from the given components.
VirtualMachineDescriptor(AttachProvider, String) - Constructor for class com.sun.tools.attach.VirtualMachineDescriptor
Creates a virtual machine descriptor from the given components.
A C D E G H I L N P R T V
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Serialized Form

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Serialized Form

  • Package com.sun.tools.attach

    • Class com.sun.tools.attach.AgentInitializationException extends Exception implements Serializable

      serialVersionUID:
      -1508756333332806353L

      • Serialized Fields

        • returnValue

          int returnValue

    • Class com.sun.tools.attach.AgentLoadException extends Exception implements Serializable

      serialVersionUID:
      688047862952114238L

    • Class com.sun.tools.attach.AttachNotSupportedException extends Exception implements Serializable

      serialVersionUID:
      3391824968260177264L

    • Class com.sun.tools.attach.AttachPermission extends BasicPermission implements Serializable

      serialVersionUID:
      -4619447669752976181L
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


attach

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.tools.attach

Provides the API to attach to a JavaTM virtual machine.

See: Description

  • Class Summary
    Class Description
    AttachPermission
    When a SecurityManager set, this is the permission which will be checked when code invokes VirtalMachine.attach to attach to a target virtual machine.
    VirtualMachine
    A Java virtual machine.
    VirtualMachineDescriptor
    Describes a Java virtual machine.
  • Exception Summary
    Exception Description
    AgentInitializationException
    The exception thrown when an agent fails to initialize in the target Java virtual machine.
    AgentLoadException
    The exception thrown when an agent cannot be loaded into the target Java virtual machine.
    AttachNotSupportedException
    Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist.

Package com.sun.tools.attach Description

Provides the API to attach to a JavaTM virtual machine.

A tool, written in the Java Language, uses this API to attach to a target virtual machine (VM) and load its tool agent into the target VM. For example, a management console might have a management agent which it uses to obtain management information from instrumented objects in a Java virtual machine. If the management console is required to manage an application that is running in a virtual machine that does not include the management agent, then this API can be used to attach to the target VM and load the agent.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.tools.attach Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.tools.attach

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • com.sun.tools.attach.AttachPermission
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • com.sun.tools.attach.AgentInitializationException
        • com.sun.tools.attach.AgentLoadException
        • com.sun.tools.attach.AttachNotSupportedException
    • com.sun.tools.attach.VirtualMachine
    • com.sun.tools.attach.VirtualMachineDescriptor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.tools.attach

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.tools.attach

  • Packages that use com.sun.tools.attach
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.
  • Classes in com.sun.tools.attach used by com.sun.tools.attach
    Class and Description
    AgentInitializationException
    The exception thrown when an agent fails to initialize in the target Java virtual machine.
    AgentLoadException
    The exception thrown when an agent cannot be loaded into the target Java virtual machine.
    AttachNotSupportedException
    Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist.
    VirtualMachine
    A Java virtual machine.
    VirtualMachineDescriptor
    Describes a Java virtual machine.
  • Classes in com.sun.tools.attach used by com.sun.tools.attach.spi
    Class and Description
    AttachNotSupportedException
    Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist.
    VirtualMachine
    A Java virtual machine.
    VirtualMachineDescriptor
    Describes a Java virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AgentInitializationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class AgentInitializationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.tools.attach.AgentInitializationException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class AgentInitializationException
extends Exception
    The exception thrown when an agent fails to initialize in the target Java virtual machine.

    This exception is thrown by VirtualMachine.loadAgent, VirtualMachine.loadAgentLibrary, VirtualMachine.loadAgentPath methods if an agent, or agent library, cannot be initialized. When thrown by VirtualMachine.loadAgentLibrary, or VirtualMachine.loadAgentPath then the exception encapsulates the error returned by the agent's Agent_OnAttach function. This error code can be obtained by invoking the returnValue method.

    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      AgentInitializationException()
      Constructs an AgentInitializationException with no detail message.
      AgentInitializationException(String s)
      Constructs an AgentInitializationException with the specified detail message.
      AgentInitializationException(String s, int returnValue)
      Constructs an AgentInitializationException with the specified detail message and the return value from the execution of the agent's Agent_OnAttach function.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      int returnValue()
      If the exception was created with the return value from the agent Agent_OnAttach function then this returns that value, otherwise returns 0.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AgentInitializationException

        public AgentInitializationException()
        Constructs an AgentInitializationException with no detail message.

      • AgentInitializationException

        public AgentInitializationException(String s)
        Constructs an AgentInitializationException with the specified detail message.
        Parameters:
        s - the detail message.

      • AgentInitializationException

        public AgentInitializationException(String s,
                                    int returnValue)
        Constructs an AgentInitializationException with the specified detail message and the return value from the execution of the agent's Agent_OnAttach function.
        Parameters:
        s - the detail message.
        returnValue - the return value

    • Method Detail

      • returnValue

        public int returnValue()
        If the exception was created with the return value from the agent Agent_OnAttach function then this returns that value, otherwise returns 0.

        Returns:
        the return value
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AgentLoadException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class AgentLoadException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.tools.attach.AgentLoadException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class AgentLoadException
extends Exception
    The exception thrown when an agent cannot be loaded into the target Java virtual machine.

    This exception is thrown by VirtualMachine.loadAgent or VirtualMachine.loadAgentLibrary, loadAgentPath methods if the agent, or agent library, cannot be loaded.

    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      AgentLoadException()
      Constructs an AgentLoadException with no detail message.
      AgentLoadException(String s)
      Constructs an AgentLoadException with the specified detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AgentLoadException

        public AgentLoadException()
        Constructs an AgentLoadException with no detail message.

      • AgentLoadException

        public AgentLoadException(String s)
        Constructs an AgentLoadException with the specified detail message.
        Parameters:
        s - the detail message.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AttachNotSupportedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class AttachNotSupportedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.tools.attach.AttachNotSupportedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class AttachNotSupportedException
extends Exception
    Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist. It is also thrown by AttachProvider.attachVirtualMachine if the provider attempts to attach to a Java virtual machine with which it not comptatible.
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      AttachNotSupportedException()
      Constructs an AttachNotSupportedException with no detail message.
      AttachNotSupportedException(String s)
      Constructs an AttachNotSupportedException with the specified detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AttachNotSupportedException

        public AttachNotSupportedException()
        Constructs an AttachNotSupportedException with no detail message.

      • AttachNotSupportedException

        public AttachNotSupportedException(String s)
        Constructs an AttachNotSupportedException with the specified detail message.
        Parameters:
        s - the detail message.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AttachPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class AttachPermission

  • java.lang.Object
    • java.security.Permission
      • java.security.BasicPermission
        • com.sun.tools.attach.AttachPermission
  • All Implemented Interfaces:
    Serializable, Guard

    @Exported
public final class AttachPermission
extends BasicPermission
    When a SecurityManager set, this is the permission which will be checked when code invokes VirtalMachine.attach to attach to a target virtual machine. This permission is also checked when an AttachProvider is created.

    An AttachPermission object contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't. The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

    Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
    attachVirtualMachine | Ability to attach to another Java virtual machine and load agents into that VM. | This allows an attacker to control the target VM which can potentially cause it to misbehave.
    createAttachProvider | Ability to create an AttachProvider instance. | This allows an attacker to create an AttachProvider which can potentially be used to attach to other Java virtual machines.

    Programmers do not normally create AttachPermission objects directly. Instead they are created by the security policy code based on reading the security policy file.

    See Also:
    VirtualMachine, AttachProvider, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      AttachPermission(String name)
      Constructs a new AttachPermission object.
      AttachPermission(String name, String actions)
      Constructs a new AttachPermission object.

    • Method Summary

      • Methods inherited from class java.security.BasicPermission

        equals, getActions, hashCode, implies, newPermissionCollection

      • Methods inherited from class java.security.Permission

        checkGuard, getName, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AttachPermission

        public AttachPermission(String name)
        Constructs a new AttachPermission object.
        Parameters:
        name - Permission name. Must be either "attachVirtualMachine", or "createAttachProvider".
        Throws:
        NullPointerException - if name is null.
        IllegalArgumentException - if the name is invalid.

      • AttachPermission

        public AttachPermission(String name,
                        String actions)
        Constructs a new AttachPermission object.
        Parameters:
        name - Permission name. Must be either "attachVirtualMachine", or "createAttachProvider".
        actions - Not used and should be null, or the empty string.
        Throws:
        NullPointerException - if name is null.
        IllegalArgumentException - if arguments are invalid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.AgentInitializationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.AgentInitializationException

  • Packages that use AgentInitializationException
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.

    • Uses of AgentInitializationException in com.sun.tools.attach

      Methods in com.sun.tools.attach that throw AgentInitializationException
      Modifier and Type Method and Description
      void VirtualMachine.loadAgent(String agent)
      Loads an agent.
      abstract void VirtualMachine.loadAgent(String agent, String options)
      Loads an agent.
      void VirtualMachine.loadAgentLibrary(String agentLibrary)
      Loads an agent library.
      abstract void VirtualMachine.loadAgentLibrary(String agentLibrary, String options)
      Loads an agent library.
      void VirtualMachine.loadAgentPath(String agentPath)
      Load a native agent library by full pathname.
      abstract void VirtualMachine.loadAgentPath(String agentPath, String options)
      Load a native agent library by full pathname.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.AgentLoadException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.AgentLoadException

  • Packages that use AgentLoadException
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.

    • Uses of AgentLoadException in com.sun.tools.attach

      Methods in com.sun.tools.attach that throw AgentLoadException
      Modifier and Type Method and Description
      void VirtualMachine.loadAgent(String agent)
      Loads an agent.
      abstract void VirtualMachine.loadAgent(String agent, String options)
      Loads an agent.
      void VirtualMachine.loadAgentLibrary(String agentLibrary)
      Loads an agent library.
      abstract void VirtualMachine.loadAgentLibrary(String agentLibrary, String options)
      Loads an agent library.
      void VirtualMachine.loadAgentPath(String agentPath)
      Load a native agent library by full pathname.
      abstract void VirtualMachine.loadAgentPath(String agentPath, String options)
      Load a native agent library by full pathname.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.AttachNotSupportedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.AttachNotSupportedException

  • Packages that use AttachNotSupportedException
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.

    • Uses of AttachNotSupportedException in com.sun.tools.attach

      Methods in com.sun.tools.attach that throw AttachNotSupportedException
      Modifier and Type Method and Description
      static VirtualMachine VirtualMachine.attach(String id)
      Attaches to a Java virtual machine.
      static VirtualMachine VirtualMachine.attach(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.

    • Uses of AttachNotSupportedException in com.sun.tools.attach.spi

      Methods in com.sun.tools.attach.spi that throw AttachNotSupportedException
      Modifier and Type Method and Description
      abstract VirtualMachine AttachProvider.attachVirtualMachine(String id)
      Attaches to a Java virtual machine.
      VirtualMachine AttachProvider.attachVirtualMachine(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.AttachPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.AttachPermission

No usage of com.sun.tools.attach.AttachPermission
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.VirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.VirtualMachine

  • Packages that use VirtualMachine
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.

    • Uses of VirtualMachine in com.sun.tools.attach

      Methods in com.sun.tools.attach that return VirtualMachine
      Modifier and Type Method and Description
      static VirtualMachine VirtualMachine.attach(String id)
      Attaches to a Java virtual machine.
      static VirtualMachine VirtualMachine.attach(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.

    • Uses of VirtualMachine in com.sun.tools.attach.spi

      Methods in com.sun.tools.attach.spi that return VirtualMachine
      Modifier and Type Method and Description
      abstract VirtualMachine AttachProvider.attachVirtualMachine(String id)
      Attaches to a Java virtual machine.
      VirtualMachine AttachProvider.attachVirtualMachine(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.VirtualMachineDescriptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.VirtualMachineDescriptor

  • Packages that use VirtualMachineDescriptor
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.

    • Uses of VirtualMachineDescriptor in com.sun.tools.attach

      Methods in com.sun.tools.attach that return types with arguments of type VirtualMachineDescriptor
      Modifier and Type Method and Description
      static List<VirtualMachineDescriptor> VirtualMachine.list()
      Return a list of Java virtual machines.
      Methods in com.sun.tools.attach with parameters of type VirtualMachineDescriptor
      Modifier and Type Method and Description
      static VirtualMachine VirtualMachine.attach(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.

    • Uses of VirtualMachineDescriptor in com.sun.tools.attach.spi

      Methods in com.sun.tools.attach.spi that return types with arguments of type VirtualMachineDescriptor
      Modifier and Type Method and Description
      abstract List<VirtualMachineDescriptor> AttachProvider.listVirtualMachines()
      Lists the Java virtual machines known to this provider.
      Methods in com.sun.tools.attach.spi with parameters of type VirtualMachineDescriptor
      Modifier and Type Method and Description
      VirtualMachine AttachProvider.attachVirtualMachine(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.tools.attach.spi

Only developers who are defining new attach providers should need to make direct use of this package.

See: Description

  • Class Summary
    Class Description
    AttachProvider
    Attach provider class for attaching to a Java virtual machine.

Package com.sun.tools.attach.spi Description

Only developers who are defining new attach providers should need to make direct use of this package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.tools.attach.spi Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.tools.attach.spi

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • com.sun.tools.attach.spi.AttachProvider
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.tools.attach.spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.tools.attach.spi

  • Packages that use com.sun.tools.attach.spi
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.
  • Classes in com.sun.tools.attach.spi used by com.sun.tools.attach
    Class and Description
    AttachProvider
    Attach provider class for attaching to a Java virtual machine.
  • Classes in com.sun.tools.attach.spi used by com.sun.tools.attach.spi
    Class and Description
    AttachProvider
    Attach provider class for attaching to a Java virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AttachProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach.spi

Class AttachProvider

  • java.lang.Object
    • com.sun.tools.attach.spi.AttachProvider

  • @Exported
public abstract class AttachProvider
extends Object
    Attach provider class for attaching to a Java virtual machine.

    An attach provider is a concrete subclass of this class that has a zero-argument constructor and implements the abstract methods specified below.

    An attach provider implementation is typically tied to a Java virtual machine implementation, version, or even mode of operation. That is, a specific provider implementation will typically only be capable of attaching to a specific Java virtual machine implementation or version. For example, Sun's JDK implementation ships with provider implementations that can only attach to Sun's HotSpot virtual machine. In general, if an environment consists of Java virtual machines of different versions and from different vendors then there will be an attach provider implementation for each family of implementations or versions.

    An attach provider is identified by its name and type. The name is typically, but not required to be, a name that corresponds to the VM vendor. The Sun JDK implementation, for example, ships with attach providers that use the name "sun". The type typically corresponds to the attach mechanism. For example, an implementation that uses the Doors inter-process communication mechanism might use the type "doors". The purpose of the name and type is to identify providers in environments where there are multiple providers installed.

    AttachProvider implementations are loaded and instantiated at the first invocation of the providers method. This method attempts to load all provider implementations that are installed on the platform.

    All of the methods in this class are safe for use by multiple concurrent threads.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected AttachProvider()
      Initializes a new instance of this class.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract VirtualMachine attachVirtualMachine(String id)
      Attaches to a Java virtual machine.
      VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.
      abstract List<VirtualMachineDescriptor> listVirtualMachines()
      Lists the Java virtual machines known to this provider.
      abstract String name()
      Return this provider's name.
      static List<AttachProvider> providers()
      Returns a list of the installed attach providers.
      abstract String type()
      Return this provider's type.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • AttachProvider

        protected AttachProvider()
        Initializes a new instance of this class.

        Throws:
        SecurityException - If a security manager has been installed and it denies AttachPermission ("createAttachProvider")

    • Method Detail

      • name

        public abstract String name()
        Return this provider's name.

        Returns:
        The name of this provider

      • type

        public abstract String type()
        Return this provider's type.

        Returns:
        The type of this provider

      • attachVirtualMachine

        public abstract VirtualMachine attachVirtualMachine(String id)
                                             throws AttachNotSupportedException,
                                                    IOException
        Attaches to a Java virtual machine.

        A Java virtual machine is identified by an abstract identifier. The nature of this identifier is platform dependent but in many cases it will be the string representation of the process identifier (or pid).

        This method parses the identifier and maps the identifier to a Java virtual machine (in an implementation dependent manner). If the identifier cannot be parsed by the provider then an AttachNotSupportedException is thrown. Once parsed this method attempts to attach to the Java virtual machine. If the provider detects that the identifier corresponds to a Java virtual machine that does not exist, or it corresponds to a Java virtual machine that does not support the attach mechanism implemented by this provider, or it detects that the Java virtual machine is a version to which this provider cannot attach, then an AttachNotSupportedException is thrown.

        Parameters:
        id - The abstract identifier that identifies the Java virtual machine.
        Returns:
        VirtualMachine representing the target virtual machine.
        Throws:
        SecurityException - If a security manager has been installed and it denies AttachPermission ("attachVirtualMachine"), or other permission required by the implementation.
        AttachNotSupportedException - If the identifier cannot be parsed, or it corresponds to to a Java virtual machine that does not exist, or it corresponds to a Java virtual machine which this provider cannot attach.
        IOException - If some other I/O error occurs
        NullPointerException - If id is null

      • attachVirtualMachine

        public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd)
                                    throws AttachNotSupportedException,
                                           IOException
        Attaches to a Java virtual machine.

        A Java virtual machine can be described using a VirtualMachineDescriptor. This method invokes the descriptor's provider() method to check that it is equal to this provider. It then attempts to attach to the Java virtual machine.

        Parameters:
        vmd - The virtual machine descriptor
        Returns:
        VirtualMachine representing the target virtual machine.
        Throws:
        SecurityException - If a security manager has been installed and it denies AttachPermission ("attachVirtualMachine"), or other permission required by the implementation.
        AttachNotSupportedException - If the descriptor's provider() method returns a provider that is not this provider, or it does not correspond to a Java virtual machine to which this provider can attach.
        IOException - If some other I/O error occurs
        NullPointerException - If vmd is null

      • listVirtualMachines

        public abstract List<VirtualMachineDescriptor> listVirtualMachines()
        Lists the Java virtual machines known to this provider.

        This method returns a list of VirtualMachineDescriptor elements. Each VirtualMachineDescriptor describes a Java virtual machine to which this provider can potentially attach. There isn't any guarantee that invoking attachVirtualMachine on each descriptor in the list will succeed.

        Returns:
        The list of virtual machine descriptors which describe the Java virtual machines known to this provider (may be empty).

      • providers

        public static List<AttachProvider> providers()
        Returns a list of the installed attach providers.

        An AttachProvider is installed on the platform if:

        • It is installed in a JAR file that is visible to the defining class loader of the AttachProvider type (usually, but not required to be, the system class loader).

        • The JAR file contains a provider configuration named com.sun.tools.attach.spi.AttachProvider in the resource directory META-INF/services.

        • The provider configuration file lists the full-qualified class name of the AttachProvider implementation.

        The format of the provider configuration file is one fully-qualified class name per line. Space and tab characters surrounding each class name, as well as blank lines are ignored. The comment character is '#' (0x23), and on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

        AttachProvider implementations are loaded and instantiated (using the zero-arg constructor) at the first invocation of this method. The list returned by the first invocation of this method is the list of providers. Subsequent invocations of this method return a list of the same providers. The list is unmodifable.

        Returns:
        A list of the installed attach providers.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.attach.spi.AttachProvider

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.attach.spi.AttachProvider

  • Packages that use AttachProvider
    Package Description
    com.sun.tools.attach
    Provides the API to attach to a JavaTM virtual machine.
    com.sun.tools.attach.spi
    Only developers who are defining new attach providers should need to make direct use of this package.

    • Uses of AttachProvider in com.sun.tools.attach

      Methods in com.sun.tools.attach that return AttachProvider
      Modifier and Type Method and Description
      AttachProvider VirtualMachine.provider()
      Returns the provider that created this virtual machine.
      AttachProvider VirtualMachineDescriptor.provider()
      Return the AttachProvider that this descriptor references.
      Constructors in com.sun.tools.attach with parameters of type AttachProvider
      Constructor and Description
      VirtualMachine(AttachProvider provider, String id)
      Initializes a new instance of this class.
      VirtualMachineDescriptor(AttachProvider provider, String id)
      Creates a virtual machine descriptor from the given components.
      VirtualMachineDescriptor(AttachProvider provider, String id, String displayName)
      Creates a virtual machine descriptor from the given components.

    • Uses of AttachProvider in com.sun.tools.attach.spi

      Methods in com.sun.tools.attach.spi that return types with arguments of type AttachProvider
      Modifier and Type Method and Description
      static List<AttachProvider> AttachProvider.providers()
      Returns a list of the installed attach providers.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


VirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class VirtualMachine

  • java.lang.Object
    • com.sun.tools.attach.VirtualMachine

  • @Exported
public abstract class VirtualMachine
extends Object
    A Java virtual machine.

    A VirtualMachine represents a Java virtual machine to which this Java virtual machine has attached. The Java virtual machine to which it is attached is sometimes called the target virtual machine, or target VM. An application (typically a tool such as a managemet console or profiler) uses a VirtualMachine to load an agent into the target VM. For example, a profiler tool written in the Java Language might attach to a running application and load its profiler agent to profile the running application.

    A VirtualMachine is obtained by invoking the attach method with an identifier that identifies the target virtual machine. The identifier is implementation-dependent but is typically the process identifier (or pid) in environments where each Java virtual machine runs in its own operating system process. Alternatively, a VirtualMachine instance is obtained by invoking the attach method with a VirtualMachineDescriptor obtained from the list of virtual machine descriptors returned by the list method. Once a reference to a virtual machine is obtained, the loadAgent, loadAgentLibrary, and loadAgentPath methods are used to load agents into target virtual machine. The loadAgent method is used to load agents that are written in the Java Language and deployed in a JAR file. (See java.lang.instrument for a detailed description on how these agents are loaded and started). The loadAgentLibrary and loadAgentPath methods are used to load agents that are deployed either in a dynamic library or statically linked into the VM and make use of the JVM Tools Interface.

    In addition to loading agents a VirtualMachine provides read access to the system properties in the target VM. This can be useful in some environments where properties such as java.home, os.name, or os.arch are used to construct the path to agent that will be loaded into the target VM.

    The following example demonstrates how VirtualMachine may be used:

      // attach to target VM
      VirtualMachine vm = VirtualMachine.attach("2177");

      // get system properties in target VM
      Properties props = vm.getSystemProperties();

      // construct path to management agent
      String home = props.getProperty("java.home");
      String agent = home + File.separator + "lib" + File.separator
          + "management-agent.jar";

      // load agent into target VM
      vm.loadAgent(agent, "com.sun.management.jmxremote.port=5000");

      // detach
      vm.detach();

    In this example we attach to a Java virtual machine that is identified by the process identifier 2177. The system properties from the target VM are then used to construct the path to a management agent which is then loaded into the target VM. Once loaded the client detaches from the target VM.

    A VirtualMachine is safe for use by multiple concurrent threads.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected VirtualMachine(AttachProvider provider, String id)
      Initializes a new instance of this class.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      static VirtualMachine attach(String id)
      Attaches to a Java virtual machine.
      static VirtualMachine attach(VirtualMachineDescriptor vmd)
      Attaches to a Java virtual machine.
      abstract void detach()
      Detach from the virtual machine.
      boolean equals(Object ob)
      Tests this VirtualMachine for equality with another object.
      abstract Properties getAgentProperties()
      Returns the current agent properties in the target virtual machine.
      abstract Properties getSystemProperties()
      Returns the current system properties in the target virtual machine.
      int hashCode()
      Returns a hash-code value for this VirtualMachine.
      String id()
      Returns the identifier for this Java virtual machine.
      static List<VirtualMachineDescriptor> list()
      Return a list of Java virtual machines.
      void loadAgent(String agent)
      Loads an agent.
      abstract void loadAgent(String agent, String options)
      Loads an agent.
      void loadAgentLibrary(String agentLibrary)
      Loads an agent library.
      abstract void loadAgentLibrary(String agentLibrary, String options)
      Loads an agent library.
      void loadAgentPath(String agentPath)
      Load a native agent library by full pathname.
      abstract void loadAgentPath(String agentPath, String options)
      Load a native agent library by full pathname.
      AttachProvider provider()
      Returns the provider that created this virtual machine.
      String toString()
      Returns the string representation of the VirtualMachine.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VirtualMachine

        protected VirtualMachine(AttachProvider provider,
                         String id)
        Initializes a new instance of this class.
        Parameters:
        provider - The attach provider creating this class.
        id - The abstract identifier that identifies the Java virtual machine.
        Throws:
        NullPointerException - If provider or id is null.

    • Method Detail

      • list

        public static List<VirtualMachineDescriptor> list()
        Return a list of Java virtual machines.

        This method returns a list of Java VirtualMachineDescriptor elements. The list is an aggregation of the virtual machine descriptor lists obtained by invoking the listVirtualMachines method of all installed attach providers. If there are no Java virtual machines known to any provider then an empty list is returned.

        Returns:
        The list of virtual machine descriptors.

      • attach

        public static VirtualMachine attach(String id)
                             throws AttachNotSupportedException,
                                    IOException
        Attaches to a Java virtual machine.

        This method obtains the list of attach providers by invoking the AttachProvider.providers() method. It then iterates overs the list and invokes each provider's attachVirtualMachine method in turn. If a provider successfully attaches then the iteration terminates, and the VirtualMachine created by the provider that successfully attached is returned by this method. If the attachVirtualMachine method of all providers throws AttachNotSupportedException then this method also throws AttachNotSupportedException. This means that AttachNotSupportedException is thrown when the identifier provided to this method is invalid, or the identifier corresponds to a Java virtual machine that does not exist, or none of the providers can attach to it. This exception is also thrown if AttachProvider.providers() returns an empty list.

        Parameters:
        id - The abstract identifier that identifies the Java virtual machine.
        Returns:
        A VirtualMachine representing the target VM.
        Throws:
        SecurityException - If a security manager has been installed and it denies AttachPermission ("attachVirtualMachine"), or another permission required by the implementation.
        AttachNotSupportedException - If the attachVirtualmachine method of all installed providers throws AttachNotSupportedException, or there aren't any providers installed.
        IOException - If an I/O error occurs
        NullPointerException - If id is null.

      • attach

        public static VirtualMachine attach(VirtualMachineDescriptor vmd)
                             throws AttachNotSupportedException,
                                    IOException
        Attaches to a Java virtual machine.

        This method first invokes the provider() method of the given virtual machine descriptor to obtain the attach provider. It then invokes the attach provider's attachVirtualMachine to attach to the target VM.

        Parameters:
        vmd - The virtual machine descriptor.
        Returns:
        A VirtualMachine representing the target VM.
        Throws:
        SecurityException - If a security manager has been installed and it denies AttachPermission ("attachVirtualMachine"), or another permission required by the implementation.
        AttachNotSupportedException - If the attach provider's attachVirtualmachine throws AttachNotSupportedException.
        IOException - If an I/O error occurs
        NullPointerException - If vmd is null.

      • detach

        public abstract void detach()
                     throws IOException
        Detach from the virtual machine.

        After detaching from the virtual machine, any further attempt to invoke operations on that virtual machine will cause an IOException to be thrown. If an operation (such as loadAgent for example) is in progress when this method is invoked then the behaviour is implementation dependent. In other words, it is implementation specific if the operation completes or throws IOException.

        If already detached from the virtual machine then invoking this method has no effect.

        Throws:
        IOException - If an I/O error occurs

      • provider

        public final AttachProvider provider()
        Returns the provider that created this virtual machine.
        Returns:
        The provider that created this virtual machine.

      • id

        public final String id()
        Returns the identifier for this Java virtual machine.
        Returns:
        The identifier for this Java virtual machine.

      • loadAgentLibrary

        public abstract void loadAgentLibrary(String agentLibrary,
                                      String options)
                               throws AgentLoadException,
                                      AgentInitializationException,
                                      IOException
        Loads an agent library.

        A JVM TI client is called an agent. It is developed in a native language. A JVM TI agent is deployed in a platform specific manner but it is typically the platform equivalent of a dynamic library. Alternatively, it may be statically linked into the VM. This method causes the given agent library to be loaded into the target VM (if not already loaded or if not statically linked into the VM). It then causes the target VM to invoke the Agent_OnAttach function or, for a statically linked agent named 'L', the Agent_OnAttach_L function as specified in the JVM Tools Interface specification. Note that the Agent_OnAttach[_L] function is invoked even if the agent library was loaded prior to invoking this method.

        The agent library provided is the name of the agent library. It is interpreted in the target virtual machine in an implementation-dependent manner. Typically an implementation will expand the library name into an operating system specific file name. For example, on UNIX systems, the name L might be expanded to libL.so, and located using the search path specified by the LD_LIBRARY_PATH environment variable. If the agent named 'L' is statically linked into the VM then the VM must export a function named Agent_OnAttach_L.

        If the Agent_OnAttach[_L] function in the agent library returns an error then an AgentInitializationException is thrown. The return value from the Agent_OnAttach[_L] can then be obtained by invoking the returnValue method on the exception.

        Parameters:
        agentLibrary - The name of the agent library.
        options - The options to provide to the Agent_OnAttach[_L] function (can be null).
        Throws:
        AgentLoadException - If the agent library does not exist, the agent library is not statically linked with the VM, or the agent library cannot be loaded for another reason.
        AgentInitializationException - If the Agent_OnAttach[_L] function returns an error.
        IOException - If an I/O error occurs
        NullPointerException - If agentLibrary is null.
        See Also:
        AgentInitializationException.returnValue()

      • loadAgentLibrary

        public void loadAgentLibrary(String agentLibrary)
                      throws AgentLoadException,
                             AgentInitializationException,
                             IOException
        Loads an agent library.

        This convenience method works as if by invoking:

        loadAgentLibrary(agentLibrary, null);
        Parameters:
        agentLibrary - The name of the agent library.
        Throws:
        AgentLoadException - If the agent library does not exist, the agent library is not statically linked with the VM, or the agent library cannot be loaded for another reason.
        AgentInitializationException - If the Agent_OnAttach[_L] function returns an error.
        IOException - If an I/O error occurs
        NullPointerException - If agentLibrary is null.

      • loadAgentPath

        public abstract void loadAgentPath(String agentPath,
                                   String options)
                            throws AgentLoadException,
                                   AgentInitializationException,
                                   IOException
        Load a native agent library by full pathname.

        A JVM TI client is called an agent. It is developed in a native language. A JVM TI agent is deployed in a platform specific manner but it is typically the platform equivalent of a dynamic library. Alternatively, the native library specified by the agentPath parameter may be statically linked with the VM. The parsing of the agentPath parameter into a statically linked library name is done in a platform specific manner in the VM. For example, in UNIX, an agentPath parameter of /a/b/libL.so would name a library 'L'. See the JVM TI Specification for more details. This method causes the given agent library to be loaded into the target VM (if not already loaded or if not statically linked into the VM). It then causes the target VM to invoke the Agent_OnAttach function or, for a statically linked agent named 'L', the Agent_OnAttach_L function as specified in the JVM Tools Interface specification. Note that the Agent_OnAttach[_L] function is invoked even if the agent library was loaded prior to invoking this method.

        The agent library provided is the absolute path from which to load the agent library. Unlike loadAgentLibrary, the library name is not expanded in the target virtual machine.

        If the Agent_OnAttach[_L] function in the agent library returns an error then an AgentInitializationException is thrown. The return value from the Agent_OnAttach[_L] can then be obtained by invoking the returnValue method on the exception.

        Parameters:
        agentPath - The full path of the agent library.
        options - The options to provide to the Agent_OnAttach[_L] function (can be null).
        Throws:
        AgentLoadException - If the agent library does not exist, the agent library is not statically linked with the VM, or the agent library cannot be loaded for another reason.
        AgentInitializationException - If the Agent_OnAttach[_L] function returns an error.
        IOException - If an I/O error occurs
        NullPointerException - If agentPath is null.
        See Also:
        AgentInitializationException.returnValue()

      • loadAgentPath

        public void loadAgentPath(String agentPath)
                   throws AgentLoadException,
                          AgentInitializationException,
                          IOException
        Load a native agent library by full pathname.

        This convenience method works as if by invoking:

        loadAgentPath(agentLibrary, null);
        Parameters:
        agentPath - The full path to the agent library.
        Throws:
        AgentLoadException - If the agent library does not exist, the agent library is not statically linked with the VM, or the agent library cannot be loaded for another reason.
        AgentInitializationException - If the Agent_OnAttach[_L] function returns an error.
        IOException - If an I/O error occurs
        NullPointerException - If agentPath is null.

      • loadAgent

        public abstract void loadAgent(String agent,
                               String options)
                        throws AgentLoadException,
                               AgentInitializationException,
                               IOException
        Loads an agent.

        The agent provided to this method is a path name to a JAR file on the file system of the target virtual machine. This path is passed to the target virtual machine where it is interpreted. The target virtual machine attempts to start the agent as specified by the java.lang.instrument specification. That is, the specified JAR file is added to the system class path (of the target virtual machine), and the agentmain method of the agent class, specified by the Agent-Class attribute in the JAR manifest, is invoked. This method completes when the agentmain method completes.

        Parameters:
        agent - Path to the JAR file containing the agent.
        options - The options to provide to the agent's agentmain method (can be null).
        Throws:
        AgentLoadException - If the agent does not exist, or cannot be started in the manner specified in the java.lang.instrument specification.
        AgentInitializationException - If the agentmain throws an exception
        IOException - If an I/O error occurs
        NullPointerException - If agent is null.

      • loadAgent

        public void loadAgent(String agent)
               throws AgentLoadException,
                      AgentInitializationException,
                      IOException
        Loads an agent.

        This convenience method works as if by invoking:

        loadAgent(agent, null);
        Parameters:
        agent - Path to the JAR file containing the agent.
        Throws:
        AgentLoadException - If the agent does not exist, or cannot be started in the manner specified in the java.lang.instrument specification.
        AgentInitializationException - If the agentmain throws an exception
        IOException - If an I/O error occurs
        NullPointerException - If agent is null.

      • getSystemProperties

        public abstract Properties getSystemProperties()
                                        throws IOException
        Returns the current system properties in the target virtual machine.

        This method returns the system properties in the target virtual machine. Properties whose key or value is not a String are omitted. The method is approximately equivalent to the invocation of the method System.getProperties in the target virtual machine except that properties with a key or value that is not a String are not included.

        This method is typically used to decide which agent to load into the target virtual machine with loadAgent, or loadAgentLibrary. For example, the java.home or user.dir properties might be use to create the path to the agent library or JAR file.

        Returns:
        The system properties
        Throws:
        IOException - If an I/O error occurs
        See Also:
        System.getProperties(),
loadAgentLibrary(java.lang.String, java.lang.String),
loadAgent(java.lang.String, java.lang.String)

      • getAgentProperties

        public abstract Properties getAgentProperties()
                                       throws IOException
        Returns the current agent properties in the target virtual machine.

        The target virtual machine can maintain a list of properties on behalf of agents. The manner in which this is done, the names of the properties, and the types of values that are allowed, is implementation specific. Agent properties are typically used to store communication end-points and other agent configuration details. For example, a debugger agent might create an agent property for its transport address.

        This method returns the agent properties whose key and value is a String. Properties whose key or value is not a String are omitted. If there are no agent properties maintained in the target virtual machine then an empty property list is returned.

        Returns:
        The agent properties
        Throws:
        IOException - If an I/O error occurs

      • hashCode

        public int hashCode()
        Returns a hash-code value for this VirtualMachine. The hash code is based upon the VirtualMachine's components, and satifies the general contract of the Object.hashCode method.
        Overrides:
        hashCode in class Object
        Returns:
        A hash-code value for this virtual machine
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • equals

        public boolean equals(Object ob)
        Tests this VirtualMachine for equality with another object.

        If the given object is not a VirtualMachine then this method returns false. For two VirtualMachines to be considered equal requires that they both reference the same provider, and their identifiers are equal.

        This method satisfies the general contract of the Object.equals method.

        Overrides:
        equals in class Object
        Parameters:
        ob - The object to which this object is to be compared
        Returns:
        true if, and only if, the given object is a VirtualMachine that is equal to this VirtualMachine.
        See Also:
        Object.hashCode(), HashMap

      • toString

        public String toString()
        Returns the string representation of the VirtualMachine.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


VirtualMachineDescriptor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.attach

Class VirtualMachineDescriptor

  • java.lang.Object
    • com.sun.tools.attach.VirtualMachineDescriptor

  • @Exported
public class VirtualMachineDescriptor
extends Object
    Describes a Java virtual machine.

    A VirtualMachineDescriptor is a container class used to describe a Java virtual machine. It encapsulates an identifier that identifies a target virtual machine, and a reference to the AttachProvider that should be used when attempting to attach to the virtual machine. The identifier is implementation-dependent but is typically the process identifier (or pid) environments where each Java virtual machine runs in its own operating system process.

    A VirtualMachineDescriptor also has a displayName. The display name is typically a human readable string that a tool might display to a user. For example, a tool that shows a list of Java virtual machines running on a system might use the display name rather than the identifier. A VirtualMachineDescriptor may be created without a display name. In that case the identifier is used as the display name.

    VirtualMachineDescriptor instances are typically created by invoking the VirtualMachine.list() method. This returns the complete list of descriptors to describe the Java virtual machines known to all installed attach providers.

    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      VirtualMachineDescriptor(AttachProvider provider, String id)
      Creates a virtual machine descriptor from the given components.
      VirtualMachineDescriptor(AttachProvider provider, String id, String displayName)
      Creates a virtual machine descriptor from the given components.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String displayName()
      Return the display name component of this descriptor.
      boolean equals(Object ob)
      Tests this VirtualMachineDescriptor for equality with another object.
      int hashCode()
      Returns a hash-code value for this VirtualMachineDescriptor.
      String id()
      Return the identifier component of this descriptor.
      AttachProvider provider()
      Return the AttachProvider that this descriptor references.
      String toString()
      Returns the string representation of the VirtualMachineDescriptor.

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VirtualMachineDescriptor

        public VirtualMachineDescriptor(AttachProvider provider,
                                String id,
                                String displayName)
        Creates a virtual machine descriptor from the given components.
        Parameters:
        provider - The AttachProvider to attach to the Java virtual machine.
        id - The virtual machine identifier.
        displayName - The display name.
        Throws:
        NullPointerException - If any of the arguments are null

      • VirtualMachineDescriptor

        public VirtualMachineDescriptor(AttachProvider provider,
                                String id)
        Creates a virtual machine descriptor from the given components.

        This convenience constructor works as if by invoking the three-argument constructor as follows:

        new VirtualMachineDescriptor(provider,  id,  id);

        That is, it creates a virtual machine descriptor such that the display name is the same as the virtual machine identifier.

        Parameters:
        provider - The AttachProvider to attach to the Java virtual machine.
        id - The virtual machine identifier.
        Throws:
        NullPointerException - If provider or id is null.

    • Method Detail

      • provider

        public AttachProvider provider()
        Return the AttachProvider that this descriptor references.
        Returns:
        The AttachProvider that this descriptor references.

      • id

        public String id()
        Return the identifier component of this descriptor.
        Returns:
        The identifier component of this descriptor.

      • displayName

        public String displayName()
        Return the display name component of this descriptor.
        Returns:
        The display name component of this descriptor.

      • hashCode

        public int hashCode()
        Returns a hash-code value for this VirtualMachineDescriptor. The hash code is based upon the descriptor's components, and satifies the general contract of the Object.hashCode method.
        Overrides:
        hashCode in class Object
        Returns:
        A hash-code value for this descriptor.
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • equals

        public boolean equals(Object ob)
        Tests this VirtualMachineDescriptor for equality with another object.

        If the given object is not a VirtualMachineDescriptor then this method returns false. For two VirtualMachineDescriptors to be considered equal requires that they both reference the same provider, and their identifiers are equal.

        This method satisfies the general contract of the Object.equals method.

        Overrides:
        equals in class Object
        Parameters:
        ob - The object to which this object is to be compared
        Returns:
        true if, and only if, the given object is a VirtualMachineDescriptor that is equal to this VirtualMachineDescriptor.
        See Also:
        Object.hashCode(), HashMap

      • toString

        public String toString()
        Returns the string representation of the VirtualMachineDescriptor.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
Attach API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Compiler Tree API

Profiles

  • compact1
  • compact2
  • compact3
Packages
Package | Description
com.sun.source.doctree | Provides interfaces to represent documentation comments as abstract syntax trees (AST).
com.sun.source.tree | Provides interfaces to represent source code as abstract syntax trees (AST).
com.sun.source.util | Provides utilities for operations on abstract syntax trees (AST).

Profiles

  • compact1
  • compact2
  • compact3
Other Packages
Package | Description
jdk |
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


All Classes

  • AnnotatedTypeTree
  • AnnotationTree
  • ArrayAccessTree
  • ArrayTypeTree
  • AssertTree
  • AssignmentTree
  • AttributeTree
  • AttributeTree.ValueKind
  • AuthorTree
  • BinaryTree
  • BlockTagTree
  • BlockTree
  • BreakTree
  • CaseTree
  • CatchTree
  • ClassTree
  • CommentTree
  • CompilationUnitTree
  • CompoundAssignmentTree
  • ConditionalExpressionTree
  • ContinueTree
  • DeprecatedTree
  • DocCommentTree
  • DocRootTree
  • DocSourcePositions
  • DocTree
  • DocTree.Kind
  • DocTreePath
  • DocTreePathScanner
  • DocTrees
  • DocTreeScanner
  • DocTreeVisitor
  • DoWhileLoopTree
  • EmptyStatementTree
  • EndElementTree
  • EnhancedForLoopTree
  • EntityTree
  • ErroneousTree
  • ErroneousTree
  • Exported
  • ExpressionStatementTree
  • ExpressionTree
  • ForLoopTree
  • IdentifierTree
  • IdentifierTree
  • IfTree
  • ImportTree
  • InheritDocTree
  • InlineTagTree
  • InstanceOfTree
  • IntersectionTypeTree
  • JavacTask
  • LabeledStatementTree
  • LambdaExpressionTree
  • LambdaExpressionTree.BodyKind
  • LineMap
  • LinkTree
  • LiteralTree
  • LiteralTree
  • MemberReferenceTree
  • MemberReferenceTree.ReferenceMode
  • MemberSelectTree
  • MethodInvocationTree
  • MethodTree
  • ModifiersTree
  • NewArrayTree
  • NewClassTree
  • ParameterizedTypeTree
  • ParamTree
  • ParenthesizedTree
  • Plugin
  • PrimitiveTypeTree
  • ReferenceTree
  • ReturnTree
  • ReturnTree
  • Scope
  • SeeTree
  • SerialDataTree
  • SerialFieldTree
  • SerialTree
  • SimpleDocTreeVisitor
  • SimpleTreeVisitor
  • SinceTree
  • SourcePositions
  • StartElementTree
  • StatementTree
  • SwitchTree
  • SynchronizedTree
  • TaskEvent
  • TaskEvent.Kind
  • TaskListener
  • TextTree
  • ThrowsTree
  • ThrowTree
  • Tree
  • Tree.Kind
  • TreePath
  • TreePathScanner
  • Trees
  • TreeScanner
  • TreeVisitor
  • TryTree
  • TypeCastTree
  • TypeParameterTree
  • UnaryTree
  • UnionTypeTree
  • UnknownBlockTagTree
  • UnknownInlineTagTree
  • ValueTree
  • VariableTree
  • VersionTree
  • WhileLoopTree
  • WildcardTree


compact1

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Profile compact1

    • jdk

      Annotation Types Summary
      Annotation Type Description
      Exported
      Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


compact2

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Profile compact2

    • jdk

      Annotation Types Summary
      Annotation Type Description
      Exported
      Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


compact3

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Profile compact3

    • jdk

      Annotation Types Summary
      Annotation Type Description
      Exported
      Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Profile
  • Next Profile
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Compiler Tree API

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.


Constant Field Values

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Constant Field Values

Contents

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Deprecated List

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Deprecated API

Contents

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Help

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

  • Overview

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

  • Package

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    • Interfaces (italic)
    • Classes
    • Enums
    • Exceptions
    • Errors
    • Annotation Types

  • Class/Interface

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    • Class inheritance diagram
    • Direct Subclasses
    • All Known Subinterfaces
    • All Known Implementing Classes
    • Class/interface declaration
    • Class/interface description
    • Nested Class Summary
    • Field Summary
    • Constructor Summary
    • Method Summary
    • Field Detail
    • Constructor Detail
    • Method Detail

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

  • Annotation Type

    Each annotation type has its own separate page with the following sections:

    • Annotation Type declaration
    • Annotation Type description
    • Required Element Summary
    • Optional Element Summary
    • Element Detail

  • Enum

    Each enum has its own separate page with the following sections:

    • Enum declaration
    • Enum description
    • Enum Constant Summary
    • Enum Constant Detail

  • Use

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

  • Tree (Class Hierarchy)

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

  • Deprecated API

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

  • Index

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

  • Prev/Next

    These links take you to the next or previous class, interface, package, or related page.

  • Frames/No Frames

    These links show and hide the HTML frames. All pages are available with or without frames.

  • All Classes

    The All Classes link shows all classes and interfaces except non-static nested types.

  • Serialized Form

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

  • Constant Field Values

    The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For All Packages

Package Hierarchies:
  • com.sun.source.doctree,
  • com.sun.source.tree,
  • com.sun.source.util,
  • jdk

Class Hierarchy

  • java.lang.Object
    • com.sun.source.util.DocTreePath (implements java.lang.Iterable<T>)
    • com.sun.source.util.DocTreeScanner<R,P> (implements com.sun.source.doctree.DocTreeVisitor<R,P>)
      • com.sun.source.util.DocTreePathScanner<R,P>
    • com.sun.source.util.JavacTask (implements javax.tools.JavaCompiler.CompilationTask)
    • com.sun.source.util.SimpleDocTreeVisitor<R,P> (implements com.sun.source.doctree.DocTreeVisitor<R,P>)
    • com.sun.source.util.SimpleTreeVisitor<R,P> (implements com.sun.source.tree.TreeVisitor<R,P>)
    • com.sun.source.util.TaskEvent
    • com.sun.source.util.TreePath (implements java.lang.Iterable<T>)
    • com.sun.source.util.Trees
      • com.sun.source.util.DocTrees
    • com.sun.source.util.TreeScanner<R,P> (implements com.sun.source.tree.TreeVisitor<R,P>)
      • com.sun.source.util.TreePathScanner<R,P>

Interface Hierarchy

  • com.sun.source.doctree.DocTree
    • com.sun.source.doctree.AttributeTree
    • com.sun.source.doctree.AuthorTree
    • com.sun.source.doctree.BlockTagTree
      • com.sun.source.doctree.AuthorTree
      • com.sun.source.doctree.DeprecatedTree
      • com.sun.source.doctree.ParamTree
      • com.sun.source.doctree.ReturnTree
      • com.sun.source.doctree.SeeTree
      • com.sun.source.doctree.SerialDataTree
      • com.sun.source.doctree.SerialFieldTree
      • com.sun.source.doctree.SerialTree
      • com.sun.source.doctree.SinceTree
      • com.sun.source.doctree.ThrowsTree
      • com.sun.source.doctree.UnknownBlockTagTree
      • com.sun.source.doctree.VersionTree
    • com.sun.source.doctree.CommentTree
    • com.sun.source.doctree.DeprecatedTree
    • com.sun.source.doctree.DocCommentTree
    • com.sun.source.doctree.DocRootTree
    • com.sun.source.doctree.EndElementTree
    • com.sun.source.doctree.EntityTree
    • com.sun.source.doctree.ErroneousTree
    • com.sun.source.doctree.IdentifierTree
    • com.sun.source.doctree.InheritDocTree
    • com.sun.source.doctree.InlineTagTree
      • com.sun.source.doctree.DocRootTree
      • com.sun.source.doctree.InheritDocTree
      • com.sun.source.doctree.LinkTree
      • com.sun.source.doctree.LiteralTree
      • com.sun.source.doctree.UnknownInlineTagTree
      • com.sun.source.doctree.ValueTree
    • com.sun.source.doctree.LinkTree
    • com.sun.source.doctree.LiteralTree
    • com.sun.source.doctree.ParamTree
    • com.sun.source.doctree.ReferenceTree
    • com.sun.source.doctree.ReturnTree
    • com.sun.source.doctree.SeeTree
    • com.sun.source.doctree.SerialDataTree
    • com.sun.source.doctree.SerialFieldTree
    • com.sun.source.doctree.SerialTree
    • com.sun.source.doctree.SinceTree
    • com.sun.source.doctree.StartElementTree
    • com.sun.source.doctree.TextTree
      • com.sun.source.doctree.ErroneousTree
    • com.sun.source.doctree.ThrowsTree
    • com.sun.source.doctree.UnknownBlockTagTree
    • com.sun.source.doctree.UnknownInlineTagTree
    • com.sun.source.doctree.ValueTree
    • com.sun.source.doctree.VersionTree
  • com.sun.source.doctree.DocTreeVisitor<R,P>
  • com.sun.source.tree.LineMap
  • com.sun.source.util.Plugin
  • com.sun.source.tree.Scope
  • com.sun.source.util.SourcePositions
    • com.sun.source.util.DocSourcePositions
  • com.sun.source.util.TaskListener
  • com.sun.source.tree.Tree
    • com.sun.source.tree.AnnotatedTypeTree
    • com.sun.source.tree.AnnotationTree
    • com.sun.source.tree.ArrayAccessTree
    • com.sun.source.tree.ArrayTypeTree
    • com.sun.source.tree.AssertTree
    • com.sun.source.tree.AssignmentTree
    • com.sun.source.tree.BinaryTree
    • com.sun.source.tree.BlockTree
    • com.sun.source.tree.BreakTree
    • com.sun.source.tree.CaseTree
    • com.sun.source.tree.CatchTree
    • com.sun.source.tree.ClassTree
    • com.sun.source.tree.CompilationUnitTree
    • com.sun.source.tree.CompoundAssignmentTree
    • com.sun.source.tree.ConditionalExpressionTree
    • com.sun.source.tree.ContinueTree
    • com.sun.source.tree.DoWhileLoopTree
    • com.sun.source.tree.EmptyStatementTree
    • com.sun.source.tree.EnhancedForLoopTree
    • com.sun.source.tree.ErroneousTree
    • com.sun.source.tree.ExpressionStatementTree
    • com.sun.source.tree.ExpressionTree
      • com.sun.source.tree.AnnotatedTypeTree
      • com.sun.source.tree.AnnotationTree
      • com.sun.source.tree.ArrayAccessTree
      • com.sun.source.tree.AssignmentTree
      • com.sun.source.tree.BinaryTree
      • com.sun.source.tree.CompoundAssignmentTree
      • com.sun.source.tree.ConditionalExpressionTree
      • com.sun.source.tree.ErroneousTree
      • com.sun.source.tree.IdentifierTree
      • com.sun.source.tree.InstanceOfTree
      • com.sun.source.tree.LambdaExpressionTree
      • com.sun.source.tree.LiteralTree
      • com.sun.source.tree.MemberReferenceTree
      • com.sun.source.tree.MemberSelectTree
      • com.sun.source.tree.MethodInvocationTree
      • com.sun.source.tree.NewArrayTree
      • com.sun.source.tree.NewClassTree
      • com.sun.source.tree.ParenthesizedTree
      • com.sun.source.tree.TypeCastTree
      • com.sun.source.tree.UnaryTree
    • com.sun.source.tree.ForLoopTree
    • com.sun.source.tree.IdentifierTree
    • com.sun.source.tree.IfTree
    • com.sun.source.tree.ImportTree
    • com.sun.source.tree.InstanceOfTree
    • com.sun.source.tree.IntersectionTypeTree
    • com.sun.source.tree.LabeledStatementTree
    • com.sun.source.tree.LambdaExpressionTree
    • com.sun.source.tree.LiteralTree
    • com.sun.source.tree.MemberReferenceTree
    • com.sun.source.tree.MemberSelectTree
    • com.sun.source.tree.MethodInvocationTree
    • com.sun.source.tree.MethodTree
    • com.sun.source.tree.ModifiersTree
    • com.sun.source.tree.NewArrayTree
    • com.sun.source.tree.NewClassTree
    • com.sun.source.tree.ParameterizedTypeTree
    • com.sun.source.tree.ParenthesizedTree
    • com.sun.source.tree.PrimitiveTypeTree
    • com.sun.source.tree.ReturnTree
    • com.sun.source.tree.StatementTree
      • com.sun.source.tree.AssertTree
      • com.sun.source.tree.BlockTree
      • com.sun.source.tree.BreakTree
      • com.sun.source.tree.ClassTree
      • com.sun.source.tree.ContinueTree
      • com.sun.source.tree.DoWhileLoopTree
      • com.sun.source.tree.EmptyStatementTree
      • com.sun.source.tree.EnhancedForLoopTree
      • com.sun.source.tree.ExpressionStatementTree
      • com.sun.source.tree.ForLoopTree
      • com.sun.source.tree.IfTree
      • com.sun.source.tree.LabeledStatementTree
      • com.sun.source.tree.ReturnTree
      • com.sun.source.tree.SwitchTree
      • com.sun.source.tree.SynchronizedTree
      • com.sun.source.tree.ThrowTree
      • com.sun.source.tree.TryTree
      • com.sun.source.tree.VariableTree
      • com.sun.source.tree.WhileLoopTree
    • com.sun.source.tree.SwitchTree
    • com.sun.source.tree.SynchronizedTree
    • com.sun.source.tree.ThrowTree
    • com.sun.source.tree.TryTree
    • com.sun.source.tree.TypeCastTree
    • com.sun.source.tree.TypeParameterTree
    • com.sun.source.tree.UnaryTree
    • com.sun.source.tree.UnionTypeTree
    • com.sun.source.tree.VariableTree
    • com.sun.source.tree.WhileLoopTree
    • com.sun.source.tree.WildcardTree
  • com.sun.source.tree.TreeVisitor<R,P>

Annotation Type Hierarchy

  • jdk.Exported (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.source.doctree.AttributeTree.ValueKind
      • com.sun.source.doctree.DocTree.Kind
      • com.sun.source.tree.Tree.Kind
      • com.sun.source.tree.LambdaExpressionTree.BodyKind
      • com.sun.source.tree.MemberReferenceTree.ReferenceMode
      • com.sun.source.util.TaskEvent.Kind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Index

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
A B C D E F G I J L M N P R S T U V W

A

accept(DocTreeVisitor<R, D>, D) - Method in interface com.sun.source.doctree.DocTree
Accept method used to implement the visitor pattern.
accept(TreeVisitor<R, D>, D) - Method in interface com.sun.source.tree.Tree
Accept method used to implement the visitor pattern.
addTaskListener(TaskListener) - Method in class com.sun.source.util.JavacTask
The specified listener will receive notification of events describing the progress of this compilation task.
analyze() - Method in class com.sun.source.util.JavacTask
Complete all analysis.
AnnotatedTypeTree - Interface in com.sun.source.tree
A tree node for an annotated type For example:
AnnotationTree - Interface in com.sun.source.tree
A tree node for an annotation.
ArrayAccessTree - Interface in com.sun.source.tree
A tree node for an array access expression.
ArrayTypeTree - Interface in com.sun.source.tree
A tree node for an array type.
asInterface() - Method in enum com.sun.source.tree.Tree.Kind
AssertTree - Interface in com.sun.source.tree
A tree node for an 'assert' statement.
AssignmentTree - Interface in com.sun.source.tree
A tree node for an assignment expression.
AttributeTree - Interface in com.sun.source.doctree
A tree node for an attribute in an HTML element.
AttributeTree.ValueKind - Enum in com.sun.source.doctree
AuthorTree - Interface in com.sun.source.doctree
A tree node for an @author block tag.

B

BinaryTree - Interface in com.sun.source.tree
A tree node for a binary expression.
BlockTagTree - Interface in com.sun.source.doctree
A tree node used as the base class for the different types of block tags.
BlockTree - Interface in com.sun.source.tree
A tree node for a statement block.
BreakTree - Interface in com.sun.source.tree
A tree node for a 'break' statement.

C

CaseTree - Interface in com.sun.source.tree
A tree node for a 'case' in a 'switch' statement.
CatchTree - Interface in com.sun.source.tree
A tree node for a 'catch' block in a 'try' statement.
ClassTree - Interface in com.sun.source.tree
A tree node for a class, interface, enum, or annotation type declaration.
com.sun.source.doctree - package com.sun.source.doctree
Provides interfaces to represent documentation comments as abstract syntax trees (AST).
com.sun.source.tree - package com.sun.source.tree
Provides interfaces to represent source code as abstract syntax trees (AST).
com.sun.source.util - package com.sun.source.util
Provides utilities for operations on abstract syntax trees (AST).
CommentTree - Interface in com.sun.source.doctree
An embedded HTML comment.
CompilationUnitTree - Interface in com.sun.source.tree
Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
CompoundAssignmentTree - Interface in com.sun.source.tree
A tree node for compound assignment operator.
ConditionalExpressionTree - Interface in com.sun.source.tree
A tree node for the conditional operator ? :.
ContinueTree - Interface in com.sun.source.tree
A tree node for a 'continue' statement.

D

DEFAULT_VALUE - Variable in class com.sun.source.util.SimpleDocTreeVisitor
DEFAULT_VALUE - Variable in class com.sun.source.util.SimpleTreeVisitor
defaultAction(DocTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
defaultAction(Tree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
DeprecatedTree - Interface in com.sun.source.doctree
A tree node for an @deprecated block tag.
DocCommentTree - Interface in com.sun.source.doctree
The top level representation of a documentation comment.
DocRootTree - Interface in com.sun.source.doctree
A tree node for an @docroot inline tag.
DocSourcePositions - Interface in com.sun.source.util
Provides methods to obtain the position of a DocTree within a javadoc comment.
DocTree - Interface in com.sun.source.doctree
Common interface for all nodes in a documentation syntax tree.
DocTree.Kind - Enum in com.sun.source.doctree
DocTreePath - Class in com.sun.source.util
A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level DocCommentTree node.
DocTreePath(TreePath, DocCommentTree) - Constructor for class com.sun.source.util.DocTreePath
Creates a DocTreePath for a root node.
DocTreePath(DocTreePath, DocTree) - Constructor for class com.sun.source.util.DocTreePath
Creates a DocTreePath for a child node.
DocTreePathScanner<R,P> - Class in com.sun.source.util
A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
DocTreePathScanner() - Constructor for class com.sun.source.util.DocTreePathScanner
DocTrees - Class in com.sun.source.util
Provides access to syntax trees for doc comments.
DocTrees() - Constructor for class com.sun.source.util.DocTrees
DocTreeScanner<R,P> - Class in com.sun.source.util
A TreeVisitor that visits all the child tree nodes.
DocTreeScanner() - Constructor for class com.sun.source.util.DocTreeScanner
DocTreeVisitor<R,P> - Interface in com.sun.source.doctree
A visitor of trees, in the style of the visitor design pattern.
DoWhileLoopTree - Interface in com.sun.source.tree
A tree node for a 'do' statement.

E

EmptyStatementTree - Interface in com.sun.source.tree
A tree node for an empty (skip) statement.
EndElementTree - Interface in com.sun.source.doctree
A tree node for the end of an HTML element.
EnhancedForLoopTree - Interface in com.sun.source.tree
A tree node for an "enhanced" 'for' loop statement.
EntityTree - Interface in com.sun.source.doctree
A tree node for an HTML entity.
ErroneousTree - Interface in com.sun.source.doctree
A tree node to stand in for a malformed text
ErroneousTree - Interface in com.sun.source.tree
A tree node to stand in for a malformed expression.
Exported - Annotation Type in jdk
Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
ExpressionStatementTree - Interface in com.sun.source.tree
A tree node for an expression statement.
ExpressionTree - Interface in com.sun.source.tree
A tree node used as the base class for the different types of expressions.

F

finished(TaskEvent) - Method in interface com.sun.source.util.TaskListener
ForLoopTree - Interface in com.sun.source.tree
A tree node for a basic 'for' loop statement.

G

generate() - Method in class com.sun.source.util.JavacTask
Generate code.
getAnnotations() - Method in interface com.sun.source.tree.AnnotatedTypeTree
getAnnotations() - Method in interface com.sun.source.tree.ModifiersTree
getAnnotations() - Method in interface com.sun.source.tree.NewArrayTree
getAnnotations() - Method in interface com.sun.source.tree.TypeParameterTree
Return annotations on the type parameter declaration.
getAnnotationType() - Method in interface com.sun.source.tree.AnnotationTree
getArguments() - Method in interface com.sun.source.tree.AnnotationTree
getArguments() - Method in interface com.sun.source.tree.MethodInvocationTree
getArguments() - Method in interface com.sun.source.tree.NewClassTree
getAttributes() - Method in interface com.sun.source.doctree.StartElementTree
getBlock() - Method in interface com.sun.source.tree.CatchTree
getBlock() - Method in interface com.sun.source.tree.SynchronizedTree
getBlock() - Method in interface com.sun.source.tree.TryTree
getBlockTags() - Method in interface com.sun.source.doctree.DocCommentTree
getBody() - Method in interface com.sun.source.doctree.CommentTree
getBody() - Method in interface com.sun.source.doctree.DeprecatedTree
getBody() - Method in interface com.sun.source.doctree.DocCommentTree
getBody() - Method in interface com.sun.source.doctree.LiteralTree
getBody() - Method in interface com.sun.source.doctree.SinceTree
getBody() - Method in interface com.sun.source.doctree.TextTree
getBody() - Method in interface com.sun.source.doctree.VersionTree
getBody() - Method in interface com.sun.source.tree.LambdaExpressionTree
getBody() - Method in interface com.sun.source.tree.MethodTree
getBodyKind() - Method in interface com.sun.source.tree.LambdaExpressionTree
getBound() - Method in interface com.sun.source.tree.WildcardTree
getBounds() - Method in interface com.sun.source.tree.IntersectionTypeTree
getBounds() - Method in interface com.sun.source.tree.TypeParameterTree
getCases() - Method in interface com.sun.source.tree.SwitchTree
getCatches() - Method in interface com.sun.source.tree.TryTree
getClassBody() - Method in interface com.sun.source.tree.NewClassTree
getColumnNumber(long) - Method in interface com.sun.source.tree.LineMap
Find the column for a character position.
getCompilationUnit() - Method in class com.sun.source.util.TaskEvent
getCompilationUnit() - Method in class com.sun.source.util.TreePath
Get the compilation unit associated with this path.
getCondition() - Method in interface com.sun.source.tree.AssertTree
getCondition() - Method in interface com.sun.source.tree.ConditionalExpressionTree
getCondition() - Method in interface com.sun.source.tree.DoWhileLoopTree
getCondition() - Method in interface com.sun.source.tree.ForLoopTree
getCondition() - Method in interface com.sun.source.tree.IfTree
getCondition() - Method in interface com.sun.source.tree.WhileLoopTree
getContent() - Method in interface com.sun.source.doctree.UnknownBlockTagTree
getContent() - Method in interface com.sun.source.doctree.UnknownInlineTagTree
getCurrentPath() - Method in class com.sun.source.util.DocTreePathScanner
Get the current path for the node, as built up by the currently active set of scan calls.
getCurrentPath() - Method in class com.sun.source.util.TreePathScanner
Get the current path for the node, as built up by the currently active set of scan calls.
getDefaultValue() - Method in interface com.sun.source.tree.MethodTree
getDescription() - Method in interface com.sun.source.doctree.ParamTree
getDescription() - Method in interface com.sun.source.doctree.ReturnTree
getDescription() - Method in interface com.sun.source.doctree.SerialDataTree
getDescription() - Method in interface com.sun.source.doctree.SerialFieldTree
getDescription() - Method in interface com.sun.source.doctree.SerialTree
getDescription() - Method in interface com.sun.source.doctree.ThrowsTree
getDetail() - Method in interface com.sun.source.tree.AssertTree
getDiagnostic() - Method in interface com.sun.source.doctree.ErroneousTree
Gets a diagnostic object giving details about the reason the body text is in error.
getDimAnnotations() - Method in interface com.sun.source.tree.NewArrayTree
getDimensions() - Method in interface com.sun.source.tree.NewArrayTree
getDocComment() - Method in class com.sun.source.util.DocTreePath
Get the DocCommentTree associated with this path.
getDocComment(TreePath) - Method in class com.sun.source.util.Trees
Gets the doc comment, if any, for the Tree node identified by a given TreePath.
getDocCommentTree(TreePath) - Method in class com.sun.source.util.DocTrees
Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
getElement(DocTreePath) - Method in class com.sun.source.util.DocTrees
Gets the language model element referred to by the leaf node of the given DocTreePath, or null if unknown.
getElement(TreePath) - Method in class com.sun.source.util.Trees
Gets the Element for the Tree node identified by a given TreePath.
getElements() - Method in class com.sun.source.util.JavacTask
Get a utility object for dealing with program elements.
getElseStatement() - Method in interface com.sun.source.tree.IfTree
getEnclosingClass() - Method in interface com.sun.source.tree.Scope
Returns the innermost type element containing the position of this scope
getEnclosingExpression() - Method in interface com.sun.source.tree.NewClassTree
getEnclosingMethod() - Method in interface com.sun.source.tree.Scope
Returns the innermost executable element containing the position of this scope.
getEnclosingScope() - Method in interface com.sun.source.tree.Scope
Returns the enclosing scope.
getEndPosition(CompilationUnitTree, DocCommentTree, DocTree) - Method in interface com.sun.source.util.DocSourcePositions
Gets the ending position of the tree within the comment within the file.
getEndPosition(CompilationUnitTree, Tree) - Method in interface com.sun.source.util.SourcePositions
Gets the ending position of tree within file.
getErrorTrees() - Method in interface com.sun.source.tree.ErroneousTree
getExceptionName() - Method in interface com.sun.source.doctree.ThrowsTree
getExpression() - Method in interface com.sun.source.tree.ArrayAccessTree
getExpression() - Method in interface com.sun.source.tree.AssignmentTree
getExpression() - Method in interface com.sun.source.tree.CaseTree
getExpression() - Method in interface com.sun.source.tree.CompoundAssignmentTree
getExpression() - Method in interface com.sun.source.tree.EnhancedForLoopTree
getExpression() - Method in interface com.sun.source.tree.ExpressionStatementTree
getExpression() - Method in interface com.sun.source.tree.InstanceOfTree
getExpression() - Method in interface com.sun.source.tree.MemberSelectTree
getExpression() - Method in interface com.sun.source.tree.ParenthesizedTree
getExpression() - Method in interface com.sun.source.tree.ReturnTree
getExpression() - Method in interface com.sun.source.tree.SwitchTree
getExpression() - Method in interface com.sun.source.tree.SynchronizedTree
getExpression() - Method in interface com.sun.source.tree.ThrowTree
getExpression() - Method in interface com.sun.source.tree.TypeCastTree
getExpression() - Method in interface com.sun.source.tree.UnaryTree
getExtendsClause() - Method in interface com.sun.source.tree.ClassTree
getFalseExpression() - Method in interface com.sun.source.tree.ConditionalExpressionTree
getFinallyBlock() - Method in interface com.sun.source.tree.TryTree
getFirstSentence() - Method in interface com.sun.source.doctree.DocCommentTree
getFlags() - Method in interface com.sun.source.tree.ModifiersTree
getIdentifier() - Method in interface com.sun.source.tree.MemberSelectTree
getIdentifier() - Method in interface com.sun.source.tree.NewClassTree
getImplementsClause() - Method in interface com.sun.source.tree.ClassTree
getImports() - Method in interface com.sun.source.tree.CompilationUnitTree
getIndex() - Method in interface com.sun.source.tree.ArrayAccessTree
getInitializer() - Method in interface com.sun.source.tree.ForLoopTree
getInitializer() - Method in interface com.sun.source.tree.VariableTree
getInitializers() - Method in interface com.sun.source.tree.NewArrayTree
getKind() - Method in interface com.sun.source.doctree.DocTree
Gets the kind of this tree.
getKind() - Method in interface com.sun.source.tree.Tree
Gets the kind of this tree.
getKind() - Method in class com.sun.source.util.TaskEvent
getLabel() - Method in interface com.sun.source.doctree.LinkTree
getLabel() - Method in interface com.sun.source.tree.BreakTree
getLabel() - Method in interface com.sun.source.tree.ContinueTree
getLabel() - Method in interface com.sun.source.tree.LabeledStatementTree
getLeaf() - Method in class com.sun.source.util.DocTreePath
Get the leaf node for this path.
getLeaf() - Method in class com.sun.source.util.TreePath
Get the leaf node for this path.
getLeftOperand() - Method in interface com.sun.source.tree.BinaryTree
getLineMap() - Method in interface com.sun.source.tree.CompilationUnitTree
Gets the line map for this compilation unit, if available.
getLineNumber(long) - Method in interface com.sun.source.tree.LineMap
Find the line containing a position; a line termination character is on the line it terminates.
getLocalElements() - Method in interface com.sun.source.tree.Scope
Returns the elements directly contained in this scope.
getLub(CatchTree) - Method in class com.sun.source.util.Trees
Gets the lub of an exception parameter declared in a catch clause.
getMembers() - Method in interface com.sun.source.tree.ClassTree
getMethodSelect() - Method in interface com.sun.source.tree.MethodInvocationTree
getMode() - Method in interface com.sun.source.tree.MemberReferenceTree
getModifiers() - Method in interface com.sun.source.tree.ClassTree
getModifiers() - Method in interface com.sun.source.tree.MethodTree
getModifiers() - Method in interface com.sun.source.tree.VariableTree
getName() - Method in interface com.sun.source.doctree.AttributeTree
getName() - Method in interface com.sun.source.doctree.AuthorTree
getName() - Method in interface com.sun.source.doctree.EndElementTree
getName() - Method in interface com.sun.source.doctree.EntityTree
getName() - Method in interface com.sun.source.doctree.IdentifierTree
getName() - Method in interface com.sun.source.doctree.ParamTree
getName() - Method in interface com.sun.source.doctree.SerialFieldTree
getName() - Method in interface com.sun.source.doctree.StartElementTree
getName() - Method in interface com.sun.source.tree.IdentifierTree
getName() - Method in interface com.sun.source.tree.MemberReferenceTree
getName() - Method in interface com.sun.source.tree.MethodTree
getName() - Method in interface com.sun.source.tree.TypeParameterTree
getName() - Method in interface com.sun.source.tree.VariableTree
getName() - Method in interface com.sun.source.util.Plugin
Get the user-friendly name of this plug-in.
getNameExpression() - Method in interface com.sun.source.tree.VariableTree
getOriginalType(ErrorType) - Method in class com.sun.source.util.Trees
Gets the original type from the ErrorType object.
getPackageAnnotations() - Method in interface com.sun.source.tree.CompilationUnitTree
getPackageName() - Method in interface com.sun.source.tree.CompilationUnitTree
getParameter() - Method in interface com.sun.source.tree.CatchTree
getParameters() - Method in interface com.sun.source.tree.LambdaExpressionTree
getParameters() - Method in interface com.sun.source.tree.MethodTree
getParentPath() - Method in class com.sun.source.util.DocTreePath
Get the path for the enclosing node, or null if there is no enclosing node.
getParentPath() - Method in class com.sun.source.util.TreePath
Get the path for the enclosing node, or null if there is no enclosing node.
getPath(TreePath, DocCommentTree, DocTree) - Static method in class com.sun.source.util.DocTreePath
Gets a documentation tree path for a tree node within a compilation unit.
getPath(DocTreePath, DocTree) - Static method in class com.sun.source.util.DocTreePath
Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
getPath(CompilationUnitTree, Tree) - Static method in class com.sun.source.util.TreePath
Gets a tree path for a tree node within a compilation unit.
getPath(TreePath, Tree) - Static method in class com.sun.source.util.TreePath
Gets a tree path for a tree node within a subtree identified by a TreePath object.
getPath(CompilationUnitTree, Tree) - Method in class com.sun.source.util.Trees
Gets the path to tree node within the specified compilation unit.
getPath(Element) - Method in class com.sun.source.util.Trees
Gets the TreePath node for a given Element.
getPath(Element, AnnotationMirror) - Method in class com.sun.source.util.Trees
Gets the TreePath node for an AnnotationMirror on a given Element.
getPath(Element, AnnotationMirror, AnnotationValue) - Method in class com.sun.source.util.Trees
Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element.
getPosition(long, long) - Method in interface com.sun.source.tree.LineMap
Find the position corresponding to a (line,column).
getPrimitiveTypeKind() - Method in interface com.sun.source.tree.PrimitiveTypeTree
getQualifiedIdentifier() - Method in interface com.sun.source.tree.ImportTree
getQualifierExpression() - Method in interface com.sun.source.tree.MemberReferenceTree
getReceiverParameter() - Method in interface com.sun.source.tree.MethodTree
Return an explicit receiver parameter ("this" parameter).
getReference() - Method in interface com.sun.source.doctree.LinkTree
getReference() - Method in interface com.sun.source.doctree.SeeTree
getReference() - Method in interface com.sun.source.doctree.ValueTree
getResources() - Method in interface com.sun.source.tree.TryTree
getReturnType() - Method in interface com.sun.source.tree.MethodTree
getRightOperand() - Method in interface com.sun.source.tree.BinaryTree
getScope(TreePath) - Method in class com.sun.source.util.Trees
Gets the Scope for the Tree node identified by a given TreePath.
getSignature() - Method in interface com.sun.source.doctree.ReferenceTree
getSimpleName() - Method in interface com.sun.source.tree.ClassTree
getSourceFile() - Method in interface com.sun.source.tree.CompilationUnitTree
getSourceFile() - Method in class com.sun.source.util.TaskEvent
getSourcePositions() - Method in class com.sun.source.util.DocTrees
getSourcePositions() - Method in class com.sun.source.util.Trees
Gets a utility object for obtaining source positions.
getStartPosition(long) - Method in interface com.sun.source.tree.LineMap
Find the start position of a line.
getStartPosition(CompilationUnitTree, DocCommentTree, DocTree) - Method in interface com.sun.source.util.DocSourcePositions
Gets the starting position of the tree within the comment within the file.
getStartPosition(CompilationUnitTree, Tree) - Method in interface com.sun.source.util.SourcePositions
Gets the starting position of tree within file.
getStatement() - Method in interface com.sun.source.tree.DoWhileLoopTree
getStatement() - Method in interface com.sun.source.tree.EnhancedForLoopTree
getStatement() - Method in interface com.sun.source.tree.ForLoopTree
getStatement() - Method in interface com.sun.source.tree.LabeledStatementTree
getStatement() - Method in interface com.sun.source.tree.WhileLoopTree
getStatements() - Method in interface com.sun.source.tree.BlockTree
getStatements() - Method in interface com.sun.source.tree.CaseTree
getTagName() - Method in interface com.sun.source.doctree.BlockTagTree
getTagName() - Method in interface com.sun.source.doctree.InlineTagTree
getThenStatement() - Method in interface com.sun.source.tree.IfTree
getThrows() - Method in interface com.sun.source.tree.MethodTree
getTree(Element) - Method in class com.sun.source.util.Trees
Gets the Tree node for a given Element.
getTree(TypeElement) - Method in class com.sun.source.util.Trees
Gets the ClassTree node for a given TypeElement.
getTree(ExecutableElement) - Method in class com.sun.source.util.Trees
Gets the MethodTree node for a given ExecutableElement.
getTree(Element, AnnotationMirror) - Method in class com.sun.source.util.Trees
Gets the Tree node for an AnnotationMirror on a given Element.
getTree(Element, AnnotationMirror, AnnotationValue) - Method in class com.sun.source.util.Trees
Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element.
getTreePath() - Method in class com.sun.source.util.DocTreePath
Get the TreePath associated with this path.
getTrueExpression() - Method in interface com.sun.source.tree.ConditionalExpressionTree
getType() - Method in interface com.sun.source.doctree.SerialFieldTree
getType() - Method in interface com.sun.source.tree.ArrayTypeTree
getType() - Method in interface com.sun.source.tree.InstanceOfTree
getType() - Method in interface com.sun.source.tree.NewArrayTree
getType() - Method in interface com.sun.source.tree.ParameterizedTypeTree
getType() - Method in interface com.sun.source.tree.TypeCastTree
getType() - Method in interface com.sun.source.tree.VariableTree
getTypeAlternatives() - Method in interface com.sun.source.tree.UnionTypeTree
getTypeArguments() - Method in interface com.sun.source.tree.MemberReferenceTree
getTypeArguments() - Method in interface com.sun.source.tree.MethodInvocationTree
getTypeArguments() - Method in interface com.sun.source.tree.NewClassTree
getTypeArguments() - Method in interface com.sun.source.tree.ParameterizedTypeTree
getTypeDecls() - Method in interface com.sun.source.tree.CompilationUnitTree
getTypeElement() - Method in class com.sun.source.util.TaskEvent
getTypeMirror(Iterable<? extends Tree>) - Method in class com.sun.source.util.JavacTask
Get a type mirror of the tree node determined by the specified path.
getTypeMirror(TreePath) - Method in class com.sun.source.util.Trees
Gets the TypeMirror for the Tree node identified by a given TreePath.
getTypeParameters() - Method in interface com.sun.source.tree.ClassTree
getTypeParameters() - Method in interface com.sun.source.tree.MethodTree
getTypes() - Method in class com.sun.source.util.JavacTask
Get a utility object for dealing with type mirrors.
getUnderlyingType() - Method in interface com.sun.source.tree.AnnotatedTypeTree
getUpdate() - Method in interface com.sun.source.tree.ForLoopTree
getValue() - Method in interface com.sun.source.doctree.AttributeTree
getValue() - Method in interface com.sun.source.tree.LiteralTree
getValueKind() - Method in interface com.sun.source.doctree.AttributeTree
getVariable() - Method in interface com.sun.source.tree.AssignmentTree
getVariable() - Method in interface com.sun.source.tree.CompoundAssignmentTree
getVariable() - Method in interface com.sun.source.tree.EnhancedForLoopTree

I

IdentifierTree - Interface in com.sun.source.doctree
An identifier in a documentation comment.
IdentifierTree - Interface in com.sun.source.tree
A tree node for an identifier expression.
IfTree - Interface in com.sun.source.tree
A tree node for an 'if' statement.
ImportTree - Interface in com.sun.source.tree
A tree node for an import statement.
InheritDocTree - Interface in com.sun.source.doctree
A tree node for an @inheritDoc inline tag.
init(JavacTask, String...) - Method in interface com.sun.source.util.Plugin
Initialize the plug-in for a given compilation task.
InlineTagTree - Interface in com.sun.source.doctree
A tree node used as the base class for the different types of inline tags.
instance(JavaCompiler.CompilationTask) - Static method in class com.sun.source.util.DocTrees
Gets a DocTrees object for a given CompilationTask.
instance(ProcessingEnvironment) - Static method in class com.sun.source.util.DocTrees
Gets a DocTrees object for a given ProcessingEnvironment.
instance(ProcessingEnvironment) - Static method in class com.sun.source.util.JavacTask
Get the JavacTask for a ProcessingEnvironment.
instance(JavaCompiler.CompilationTask) - Static method in class com.sun.source.util.Trees
Gets a Trees object for a given CompilationTask.
instance(ProcessingEnvironment) - Static method in class com.sun.source.util.Trees
Gets a Trees object for a given ProcessingEnvironment.
InstanceOfTree - Interface in com.sun.source.tree
A tree node for an 'instanceof' expression.
IntersectionTypeTree - Interface in com.sun.source.tree
A tree node for an intersection type in a cast expression.
isAccessible(Scope, TypeElement) - Method in class com.sun.source.util.Trees
Checks whether a given type is accessible in a given scope.
isAccessible(Scope, Element, DeclaredType) - Method in class com.sun.source.util.Trees
Checks whether the given element is accessible as a member of the given type in a given scope.
isSelfClosing() - Method in interface com.sun.source.doctree.StartElementTree
isStatic() - Method in interface com.sun.source.tree.BlockTree
isStatic() - Method in interface com.sun.source.tree.ImportTree
isTypeParameter() - Method in interface com.sun.source.doctree.ParamTree
iterator() - Method in class com.sun.source.util.DocTreePath
iterator() - Method in class com.sun.source.util.TreePath
Iterates from leaves to root.

J

JavacTask - Class in com.sun.source.util
Provides access to functionality specific to the JDK Java Compiler, javac.
JavacTask() - Constructor for class com.sun.source.util.JavacTask
jdk - package jdk

L

LabeledStatementTree - Interface in com.sun.source.tree
A tree node for a labeled statement.
LambdaExpressionTree - Interface in com.sun.source.tree
A tree node for a lambda expression.
LambdaExpressionTree.BodyKind - Enum in com.sun.source.tree
Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block
LineMap - Interface in com.sun.source.tree
Provides methods to convert between character positions and line numbers for a compilation unit.
LinkTree - Interface in com.sun.source.doctree
A tree node for an @link or @linkplain inline tag.
LiteralTree - Interface in com.sun.source.doctree
A tree node for an @literal or @code inline tag.
LiteralTree - Interface in com.sun.source.tree
A tree node for a literal expression.

M

MemberReferenceTree - Interface in com.sun.source.tree
A tree node for a member reference expression.
MemberReferenceTree.ReferenceMode - Enum in com.sun.source.tree
There are two kinds of member references: (i) method references and (ii) constructor references
MemberSelectTree - Interface in com.sun.source.tree
A tree node for a member access expression.
MethodInvocationTree - Interface in com.sun.source.tree
A tree node for a method invocation expression.
MethodTree - Interface in com.sun.source.tree
A tree node for a method or annotation type element declaration.
ModifiersTree - Interface in com.sun.source.tree
A tree node for the modifiers, including annotations, for a declaration.

N

NewArrayTree - Interface in com.sun.source.tree
A tree node for an expression to create a new instance of an array.
NewClassTree - Interface in com.sun.source.tree
A tree node to declare a new instance of a class.

P

ParameterizedTypeTree - Interface in com.sun.source.tree
A tree node for a type expression involving type parameters.
ParamTree - Interface in com.sun.source.doctree
A tree node for an @param block tag.
ParenthesizedTree - Interface in com.sun.source.tree
A tree node for a parenthesized expression.
parse() - Method in class com.sun.source.util.JavacTask
Parse the specified files returning a list of abstract syntax trees.
Plugin - Interface in com.sun.source.util
The interface for a javac plug-in.
PrimitiveTypeTree - Interface in com.sun.source.tree
A tree node for a primitive type.
printMessage(Diagnostic.Kind, CharSequence, DocTree, DocCommentTree, CompilationUnitTree) - Method in class com.sun.source.util.DocTrees
Prints a message of the specified kind at the location of the tree within the provided compilation unit
printMessage(Diagnostic.Kind, CharSequence, Tree, CompilationUnitTree) - Method in class com.sun.source.util.Trees
Prints a message of the specified kind at the location of the tree within the provided compilation unit

R

reduce(R, R) - Method in class com.sun.source.util.DocTreeScanner
Reduces two results into a combined result.
reduce(R, R) - Method in class com.sun.source.util.TreeScanner
Reduces two results into a combined result.
ReferenceTree - Interface in com.sun.source.doctree
A tree node to a reference to a Java language element.
removeTaskListener(TaskListener) - Method in class com.sun.source.util.JavacTask
The specified listener will no longer receive notification of events describing the progress of this compilation task.
ReturnTree - Interface in com.sun.source.doctree
A tree node for an @return block tag.
ReturnTree - Interface in com.sun.source.tree
A tree node for a 'return' statement.

S

scan(DocTreePath, P) - Method in class com.sun.source.util.DocTreePathScanner
Scan a tree from a position identified by a TreePath.
scan(DocTree, P) - Method in class com.sun.source.util.DocTreePathScanner
Scan a single node.
scan(DocTree, P) - Method in class com.sun.source.util.DocTreeScanner
Scan a single node.
scan(Iterable<? extends DocTree>, P) - Method in class com.sun.source.util.DocTreeScanner
Scan a list of nodes.
scan(TreePath, P) - Method in class com.sun.source.util.TreePathScanner
Scan a tree from a position identified by a TreePath.
scan(Tree, P) - Method in class com.sun.source.util.TreePathScanner
Scan a single node.
scan(Tree, P) - Method in class com.sun.source.util.TreeScanner
Scan a single node.
scan(Iterable<? extends Tree>, P) - Method in class com.sun.source.util.TreeScanner
Scan a list of nodes.
Scope - Interface in com.sun.source.tree
Interface for determining locally available program elements, such as local variables and imports.
SeeTree - Interface in com.sun.source.doctree
A tree node for an @see block tag.
SerialDataTree - Interface in com.sun.source.doctree
A tree node for an @serialData block tag.
SerialFieldTree - Interface in com.sun.source.doctree
A tree node for an @serialData block tag.
SerialTree - Interface in com.sun.source.doctree
A tree node for an @serial block tag.
setTaskListener(TaskListener) - Method in class com.sun.source.util.JavacTask
The specified listener will receive notification of events describing the progress of this compilation task.
SimpleDocTreeVisitor<R,P> - Class in com.sun.source.util
A simple visitor for tree nodes.
SimpleDocTreeVisitor() - Constructor for class com.sun.source.util.SimpleDocTreeVisitor
SimpleDocTreeVisitor(R) - Constructor for class com.sun.source.util.SimpleDocTreeVisitor
SimpleTreeVisitor<R,P> - Class in com.sun.source.util
A simple visitor for tree nodes.
SimpleTreeVisitor() - Constructor for class com.sun.source.util.SimpleTreeVisitor
SimpleTreeVisitor(R) - Constructor for class com.sun.source.util.SimpleTreeVisitor
SinceTree - Interface in com.sun.source.doctree
A tree node for an @since block tag.
SourcePositions - Interface in com.sun.source.util
Provides methods to obtain the position of a Tree within a CompilationUnit.
started(TaskEvent) - Method in interface com.sun.source.util.TaskListener
StartElementTree - Interface in com.sun.source.doctree
A tree node for the start of an HTML element.
StatementTree - Interface in com.sun.source.tree
A tree node used as the base class for the different kinds of statements.
SwitchTree - Interface in com.sun.source.tree
A tree node for a 'switch' statement.
SynchronizedTree - Interface in com.sun.source.tree
A tree node for a 'synchronized' statement.

T

tagName - Variable in enum com.sun.source.doctree.DocTree.Kind
TaskEvent - Class in com.sun.source.util
Provides details about work that has been done by the JDK Java Compiler, javac.
TaskEvent(TaskEvent.Kind) - Constructor for class com.sun.source.util.TaskEvent
TaskEvent(TaskEvent.Kind, JavaFileObject) - Constructor for class com.sun.source.util.TaskEvent
TaskEvent(TaskEvent.Kind, CompilationUnitTree) - Constructor for class com.sun.source.util.TaskEvent
TaskEvent(TaskEvent.Kind, CompilationUnitTree, TypeElement) - Constructor for class com.sun.source.util.TaskEvent
TaskEvent.Kind - Enum in com.sun.source.util
Kind of task event.
TaskListener - Interface in com.sun.source.util
Provides a listener to monitor the activity of the JDK Java Compiler, javac.
TextTree - Interface in com.sun.source.doctree
A tree node for plain text.
ThrowsTree - Interface in com.sun.source.doctree
A tree node for an @exception or @throws block tag.
ThrowTree - Interface in com.sun.source.tree
A tree node for a 'throw' statement.
toString() - Method in class com.sun.source.util.TaskEvent
Tree - Interface in com.sun.source.tree
Common interface for all nodes in an abstract syntax tree.
Tree.Kind - Enum in com.sun.source.tree
Enumerates all kinds of trees.
TreePath - Class in com.sun.source.util
A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level CompilationUnitTree node.
TreePath(CompilationUnitTree) - Constructor for class com.sun.source.util.TreePath
Creates a TreePath for a root node.
TreePath(TreePath, Tree) - Constructor for class com.sun.source.util.TreePath
Creates a TreePath for a child node.
TreePathScanner<R,P> - Class in com.sun.source.util
A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
TreePathScanner() - Constructor for class com.sun.source.util.TreePathScanner
Trees - Class in com.sun.source.util
Bridges JSR 199, JSR 269, and the Tree API.
Trees() - Constructor for class com.sun.source.util.Trees
TreeScanner<R,P> - Class in com.sun.source.util
A TreeVisitor that visits all the child tree nodes.
TreeScanner() - Constructor for class com.sun.source.util.TreeScanner
TreeVisitor<R,P> - Interface in com.sun.source.tree
A visitor of trees, in the style of the visitor design pattern.
TryTree - Interface in com.sun.source.tree
A tree node for a 'try' statement.
TypeCastTree - Interface in com.sun.source.tree
A tree node for a type cast expression.
TypeParameterTree - Interface in com.sun.source.tree
A tree node for a type parameter.

U

UnaryTree - Interface in com.sun.source.tree
A tree node for postfix and unary expressions.
UnionTypeTree - Interface in com.sun.source.tree
A tree node for a union type expression in a multicatch var declaration.
UnknownBlockTagTree - Interface in com.sun.source.doctree
A tree node for an unrecognized inline tag.
UnknownInlineTagTree - Interface in com.sun.source.doctree
A tree node for an unrecognized inline tag.

V

valueOf(String) - Static method in enum com.sun.source.doctree.AttributeTree.ValueKind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.sun.source.doctree.DocTree.Kind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.sun.source.tree.LambdaExpressionTree.BodyKind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.sun.source.tree.MemberReferenceTree.ReferenceMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.sun.source.tree.Tree.Kind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.sun.source.util.TaskEvent.Kind
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.sun.source.doctree.AttributeTree.ValueKind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.sun.source.doctree.DocTree.Kind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.sun.source.tree.LambdaExpressionTree.BodyKind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.sun.source.tree.MemberReferenceTree.ReferenceMode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.sun.source.tree.Tree.Kind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.sun.source.util.TaskEvent.Kind
Returns an array containing the constants of this enum type, in the order they are declared.
ValueTree - Interface in com.sun.source.doctree
A tree node for an @value inline tag.
VariableTree - Interface in com.sun.source.tree
A tree node for a variable declaration.
VersionTree - Interface in com.sun.source.doctree
A tree node for an @version block tag.
visit(DocTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visit(Iterable<? extends DocTree>, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visit(Tree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visit(Iterable<? extends Tree>, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitAnnotatedType(AnnotatedTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitAnnotatedType(AnnotatedTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitAnnotatedType(AnnotatedTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitAnnotation(AnnotationTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitAnnotation(AnnotationTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitAnnotation(AnnotationTree, P) - Method in class com.sun.source.util.TreeScanner
visitArrayAccess(ArrayAccessTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitArrayAccess(ArrayAccessTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitArrayAccess(ArrayAccessTree, P) - Method in class com.sun.source.util.TreeScanner
visitArrayType(ArrayTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitArrayType(ArrayTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitArrayType(ArrayTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitAssert(AssertTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitAssert(AssertTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitAssert(AssertTree, P) - Method in class com.sun.source.util.TreeScanner
visitAssignment(AssignmentTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitAssignment(AssignmentTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitAssignment(AssignmentTree, P) - Method in class com.sun.source.util.TreeScanner
visitAttribute(AttributeTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitAttribute(AttributeTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitAttribute(AttributeTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitAuthor(AuthorTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitAuthor(AuthorTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitAuthor(AuthorTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitBinary(BinaryTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitBinary(BinaryTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitBinary(BinaryTree, P) - Method in class com.sun.source.util.TreeScanner
visitBlock(BlockTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitBlock(BlockTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitBlock(BlockTree, P) - Method in class com.sun.source.util.TreeScanner
visitBreak(BreakTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitBreak(BreakTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitBreak(BreakTree, P) - Method in class com.sun.source.util.TreeScanner
visitCase(CaseTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitCase(CaseTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitCase(CaseTree, P) - Method in class com.sun.source.util.TreeScanner
visitCatch(CatchTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitCatch(CatchTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitCatch(CatchTree, P) - Method in class com.sun.source.util.TreeScanner
visitClass(ClassTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitClass(ClassTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitClass(ClassTree, P) - Method in class com.sun.source.util.TreeScanner
visitComment(CommentTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitComment(CommentTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitComment(CommentTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitCompilationUnit(CompilationUnitTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitCompilationUnit(CompilationUnitTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitCompilationUnit(CompilationUnitTree, P) - Method in class com.sun.source.util.TreeScanner
visitCompoundAssignment(CompoundAssignmentTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitCompoundAssignment(CompoundAssignmentTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitCompoundAssignment(CompoundAssignmentTree, P) - Method in class com.sun.source.util.TreeScanner
visitConditionalExpression(ConditionalExpressionTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitConditionalExpression(ConditionalExpressionTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitConditionalExpression(ConditionalExpressionTree, P) - Method in class com.sun.source.util.TreeScanner
visitContinue(ContinueTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitContinue(ContinueTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitContinue(ContinueTree, P) - Method in class com.sun.source.util.TreeScanner
visitDeprecated(DeprecatedTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitDeprecated(DeprecatedTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitDeprecated(DeprecatedTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitDocComment(DocCommentTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitDocComment(DocCommentTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitDocComment(DocCommentTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitDocRoot(DocRootTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitDocRoot(DocRootTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitDocRoot(DocRootTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitDoWhileLoop(DoWhileLoopTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitDoWhileLoop(DoWhileLoopTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitDoWhileLoop(DoWhileLoopTree, P) - Method in class com.sun.source.util.TreeScanner
visitEmptyStatement(EmptyStatementTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitEmptyStatement(EmptyStatementTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitEmptyStatement(EmptyStatementTree, P) - Method in class com.sun.source.util.TreeScanner
visitEndElement(EndElementTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitEndElement(EndElementTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitEndElement(EndElementTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitEnhancedForLoop(EnhancedForLoopTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitEnhancedForLoop(EnhancedForLoopTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitEnhancedForLoop(EnhancedForLoopTree, P) - Method in class com.sun.source.util.TreeScanner
visitEntity(EntityTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitEntity(EntityTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitEntity(EntityTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitErroneous(ErroneousTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitErroneous(ErroneousTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitErroneous(ErroneousTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitErroneous(ErroneousTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitErroneous(ErroneousTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitErroneous(ErroneousTree, P) - Method in class com.sun.source.util.TreeScanner
visitExpressionStatement(ExpressionStatementTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitExpressionStatement(ExpressionStatementTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitExpressionStatement(ExpressionStatementTree, P) - Method in class com.sun.source.util.TreeScanner
visitForLoop(ForLoopTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitForLoop(ForLoopTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitForLoop(ForLoopTree, P) - Method in class com.sun.source.util.TreeScanner
visitIdentifier(IdentifierTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitIdentifier(IdentifierTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitIdentifier(IdentifierTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitIdentifier(IdentifierTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitIdentifier(IdentifierTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitIdentifier(IdentifierTree, P) - Method in class com.sun.source.util.TreeScanner
visitIf(IfTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitIf(IfTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitIf(IfTree, P) - Method in class com.sun.source.util.TreeScanner
visitImport(ImportTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitImport(ImportTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitImport(ImportTree, P) - Method in class com.sun.source.util.TreeScanner
visitInheritDoc(InheritDocTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitInheritDoc(InheritDocTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitInheritDoc(InheritDocTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitInstanceOf(InstanceOfTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitInstanceOf(InstanceOfTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitInstanceOf(InstanceOfTree, P) - Method in class com.sun.source.util.TreeScanner
visitIntersectionType(IntersectionTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitIntersectionType(IntersectionTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitIntersectionType(IntersectionTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitLabeledStatement(LabeledStatementTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitLabeledStatement(LabeledStatementTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitLabeledStatement(LabeledStatementTree, P) - Method in class com.sun.source.util.TreeScanner
visitLambdaExpression(LambdaExpressionTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitLambdaExpression(LambdaExpressionTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitLambdaExpression(LambdaExpressionTree, P) - Method in class com.sun.source.util.TreeScanner
visitLink(LinkTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitLink(LinkTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitLink(LinkTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitLiteral(LiteralTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitLiteral(LiteralTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitLiteral(LiteralTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitLiteral(LiteralTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitLiteral(LiteralTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitLiteral(LiteralTree, P) - Method in class com.sun.source.util.TreeScanner
visitMemberReference(MemberReferenceTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitMemberReference(MemberReferenceTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitMemberReference(MemberReferenceTree, P) - Method in class com.sun.source.util.TreeScanner
visitMemberSelect(MemberSelectTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitMemberSelect(MemberSelectTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitMemberSelect(MemberSelectTree, P) - Method in class com.sun.source.util.TreeScanner
visitMethod(MethodTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitMethod(MethodTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitMethod(MethodTree, P) - Method in class com.sun.source.util.TreeScanner
visitMethodInvocation(MethodInvocationTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitMethodInvocation(MethodInvocationTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitMethodInvocation(MethodInvocationTree, P) - Method in class com.sun.source.util.TreeScanner
visitModifiers(ModifiersTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitModifiers(ModifiersTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitModifiers(ModifiersTree, P) - Method in class com.sun.source.util.TreeScanner
visitNewArray(NewArrayTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitNewArray(NewArrayTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitNewArray(NewArrayTree, P) - Method in class com.sun.source.util.TreeScanner
visitNewClass(NewClassTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitNewClass(NewClassTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitNewClass(NewClassTree, P) - Method in class com.sun.source.util.TreeScanner
visitOther(DocTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitOther(Tree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitOther(DocTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitOther(DocTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitOther(Tree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitOther(Tree, P) - Method in class com.sun.source.util.TreeScanner
visitParam(ParamTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitParam(ParamTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitParam(ParamTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitParameterizedType(ParameterizedTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitParameterizedType(ParameterizedTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitParameterizedType(ParameterizedTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitParenthesized(ParenthesizedTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitParenthesized(ParenthesizedTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitParenthesized(ParenthesizedTree, P) - Method in class com.sun.source.util.TreeScanner
visitPrimitiveType(PrimitiveTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitPrimitiveType(PrimitiveTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitPrimitiveType(PrimitiveTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitReference(ReferenceTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitReference(ReferenceTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitReference(ReferenceTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitReturn(ReturnTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitReturn(ReturnTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitReturn(ReturnTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitReturn(ReturnTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitReturn(ReturnTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitReturn(ReturnTree, P) - Method in class com.sun.source.util.TreeScanner
visitSee(SeeTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitSee(SeeTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitSee(SeeTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitSerial(SerialTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitSerial(SerialTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitSerial(SerialTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitSerialData(SerialDataTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitSerialData(SerialDataTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitSerialData(SerialDataTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitSerialField(SerialFieldTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitSerialField(SerialFieldTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitSerialField(SerialFieldTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitSince(SinceTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitSince(SinceTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitSince(SinceTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitStartElement(StartElementTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitStartElement(StartElementTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitStartElement(StartElementTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitSwitch(SwitchTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitSwitch(SwitchTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitSwitch(SwitchTree, P) - Method in class com.sun.source.util.TreeScanner
visitSynchronized(SynchronizedTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitSynchronized(SynchronizedTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitSynchronized(SynchronizedTree, P) - Method in class com.sun.source.util.TreeScanner
visitText(TextTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitText(TextTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitText(TextTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitThrow(ThrowTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitThrow(ThrowTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitThrow(ThrowTree, P) - Method in class com.sun.source.util.TreeScanner
visitThrows(ThrowsTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitThrows(ThrowsTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitThrows(ThrowsTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitTry(TryTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitTry(TryTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitTry(TryTree, P) - Method in class com.sun.source.util.TreeScanner
visitTypeCast(TypeCastTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitTypeCast(TypeCastTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitTypeCast(TypeCastTree, P) - Method in class com.sun.source.util.TreeScanner
visitTypeParameter(TypeParameterTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitTypeParameter(TypeParameterTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitTypeParameter(TypeParameterTree, P) - Method in class com.sun.source.util.TreeScanner
visitUnary(UnaryTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitUnary(UnaryTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitUnary(UnaryTree, P) - Method in class com.sun.source.util.TreeScanner
visitUnionType(UnionTypeTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitUnionType(UnionTypeTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitUnionType(UnionTypeTree, P) - Method in class com.sun.source.util.TreeScanner
visitUnknownBlockTag(UnknownBlockTagTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitUnknownBlockTag(UnknownBlockTagTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitUnknownBlockTag(UnknownBlockTagTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitUnknownInlineTag(UnknownInlineTagTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitUnknownInlineTag(UnknownInlineTagTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitUnknownInlineTag(UnknownInlineTagTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitValue(ValueTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitValue(ValueTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitValue(ValueTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitVariable(VariableTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitVariable(VariableTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitVariable(VariableTree, P) - Method in class com.sun.source.util.TreeScanner
visitVersion(VersionTree, P) - Method in interface com.sun.source.doctree.DocTreeVisitor
visitVersion(VersionTree, P) - Method in class com.sun.source.util.DocTreeScanner
visitVersion(VersionTree, P) - Method in class com.sun.source.util.SimpleDocTreeVisitor
visitWhileLoop(WhileLoopTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitWhileLoop(WhileLoopTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitWhileLoop(WhileLoopTree, P) - Method in class com.sun.source.util.TreeScanner
visitWildcard(WildcardTree, P) - Method in interface com.sun.source.tree.TreeVisitor
visitWildcard(WildcardTree, P) - Method in class com.sun.source.util.SimpleTreeVisitor
visitWildcard(WildcardTree, P) - Method in class com.sun.source.util.TreeScanner

W

WhileLoopTree - Interface in com.sun.source.tree
A tree node for a 'while' loop statement.
WildcardTree - Interface in com.sun.source.tree
A tree node for a wildcard type argument.
A B C D E F G I J L M N P R S T U V W
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Overview List

Compiler Tree API

All ClassesAll PackagesAll Profiles

compact3 Packages

  • jdk


Overview List

Compiler Tree API

All ClassesAll PackagesAll Profiles

compact1 Packages

  • jdk


Overview List

Compiler Tree API

All ClassesAll PackagesAll Profiles

compact2 Packages

  • jdk


doctree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.source.doctree

Provides interfaces to represent documentation comments as abstract syntax trees (AST).

See: Description

  • Interface Summary
    Interface Description
    AttributeTree
    A tree node for an attribute in an HTML element.
    AuthorTree
    A tree node for an @author block tag.
    BlockTagTree
    A tree node used as the base class for the different types of block tags.
    CommentTree
    An embedded HTML comment.
    DeprecatedTree
    A tree node for an @deprecated block tag.
    DocCommentTree
    The top level representation of a documentation comment.
    DocRootTree
    A tree node for an @docroot inline tag.
    DocTree
    Common interface for all nodes in a documentation syntax tree.
    DocTreeVisitor<R,P>
    A visitor of trees, in the style of the visitor design pattern.
    EndElementTree
    A tree node for the end of an HTML element.
    EntityTree
    A tree node for an HTML entity.
    ErroneousTree
    A tree node to stand in for a malformed text
    IdentifierTree
    An identifier in a documentation comment.
    InheritDocTree
    A tree node for an @inheritDoc inline tag.
    InlineTagTree
    A tree node used as the base class for the different types of inline tags.
    LinkTree
    A tree node for an @link or @linkplain inline tag.
    LiteralTree
    A tree node for an @literal or @code inline tag.
    ParamTree
    A tree node for an @param block tag.
    ReferenceTree
    A tree node to a reference to a Java language element.
    ReturnTree
    A tree node for an @return block tag.
    SeeTree
    A tree node for an @see block tag.
    SerialDataTree
    A tree node for an @serialData block tag.
    SerialFieldTree
    A tree node for an @serialData block tag.
    SerialTree
    A tree node for an @serial block tag.
    SinceTree
    A tree node for an @since block tag.
    StartElementTree
    A tree node for the start of an HTML element.
    TextTree
    A tree node for plain text.
    ThrowsTree
    A tree node for an @exception or @throws block tag.
    UnknownBlockTagTree
    A tree node for an unrecognized inline tag.
    UnknownInlineTagTree
    A tree node for an unrecognized inline tag.
    ValueTree
    A tree node for an @value inline tag.
    VersionTree
    A tree node for an @version block tag.
  • Enum Summary
    Enum Description
    AttributeTree.ValueKind
    DocTree.Kind

Package com.sun.source.doctree Description

Provides interfaces to represent documentation comments as abstract syntax trees (AST).
Since:
1.8
See Also:
http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.source.doctree Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.source.doctree

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • com.sun.source.doctree.DocTree
    • com.sun.source.doctree.AttributeTree
    • com.sun.source.doctree.BlockTagTree
      • com.sun.source.doctree.AuthorTree
      • com.sun.source.doctree.DeprecatedTree
      • com.sun.source.doctree.ParamTree
      • com.sun.source.doctree.ReturnTree
      • com.sun.source.doctree.SeeTree
      • com.sun.source.doctree.SerialDataTree
      • com.sun.source.doctree.SerialFieldTree
      • com.sun.source.doctree.SerialTree
      • com.sun.source.doctree.SinceTree
      • com.sun.source.doctree.ThrowsTree
      • com.sun.source.doctree.UnknownBlockTagTree
      • com.sun.source.doctree.VersionTree
    • com.sun.source.doctree.CommentTree
    • com.sun.source.doctree.DocCommentTree
    • com.sun.source.doctree.EndElementTree
    • com.sun.source.doctree.EntityTree
    • com.sun.source.doctree.IdentifierTree
    • com.sun.source.doctree.InlineTagTree
      • com.sun.source.doctree.DocRootTree
      • com.sun.source.doctree.InheritDocTree
      • com.sun.source.doctree.LinkTree
      • com.sun.source.doctree.LiteralTree
      • com.sun.source.doctree.UnknownInlineTagTree
      • com.sun.source.doctree.ValueTree
    • com.sun.source.doctree.ReferenceTree
    • com.sun.source.doctree.StartElementTree
    • com.sun.source.doctree.TextTree
      • com.sun.source.doctree.ErroneousTree
  • com.sun.source.doctree.DocTreeVisitor<R,P>

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.source.doctree.AttributeTree.ValueKind
      • com.sun.source.doctree.DocTree.Kind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocRootTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface DocRootTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface DocRootTree
extends InlineTagTree
    A tree node for an @docroot inline tag.

    {@docroot}

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


InheritDocTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface InheritDocTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface InheritDocTree
extends InlineTagTree
    A tree node for an @inheritDoc inline tag.

    {@inheritDoc}

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.source.doctree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.source.doctree

  • Packages that use com.sun.source.doctree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).
  • Classes in com.sun.source.doctree used by com.sun.source.doctree
    Class and Description
    AttributeTree
    A tree node for an attribute in an HTML element.
    AttributeTree.ValueKind
    AuthorTree
    A tree node for an @author block tag.
    BlockTagTree
    A tree node used as the base class for the different types of block tags.
    CommentTree
    An embedded HTML comment.
    DeprecatedTree
    A tree node for an @deprecated block tag.
    DocCommentTree
    The top level representation of a documentation comment.
    DocRootTree
    A tree node for an @docroot inline tag.
    DocTree
    Common interface for all nodes in a documentation syntax tree.
    DocTree.Kind
    DocTreeVisitor
    A visitor of trees, in the style of the visitor design pattern.
    EndElementTree
    A tree node for the end of an HTML element.
    EntityTree
    A tree node for an HTML entity.
    ErroneousTree
    A tree node to stand in for a malformed text
    IdentifierTree
    An identifier in a documentation comment.
    InheritDocTree
    A tree node for an @inheritDoc inline tag.
    InlineTagTree
    A tree node used as the base class for the different types of inline tags.
    LinkTree
    A tree node for an @link or @linkplain inline tag.
    LiteralTree
    A tree node for an @literal or @code inline tag.
    ParamTree
    A tree node for an @param block tag.
    ReferenceTree
    A tree node to a reference to a Java language element.
    ReturnTree
    A tree node for an @return block tag.
    SeeTree
    A tree node for an @see block tag.
    SerialDataTree
    A tree node for an @serialData block tag.
    SerialFieldTree
    A tree node for an @serialData block tag.
    SerialTree
    A tree node for an @serial block tag.
    SinceTree
    A tree node for an @since block tag.
    StartElementTree
    A tree node for the start of an HTML element.
    TextTree
    A tree node for plain text.
    ThrowsTree
    A tree node for an @exception or @throws block tag.
    UnknownBlockTagTree
    A tree node for an unrecognized inline tag.
    UnknownInlineTagTree
    A tree node for an unrecognized inline tag.
    ValueTree
    A tree node for an @value inline tag.
    VersionTree
    A tree node for an @version block tag.
  • Classes in com.sun.source.doctree used by com.sun.source.util
    Class and Description
    AttributeTree
    A tree node for an attribute in an HTML element.
    AuthorTree
    A tree node for an @author block tag.
    CommentTree
    An embedded HTML comment.
    DeprecatedTree
    A tree node for an @deprecated block tag.
    DocCommentTree
    The top level representation of a documentation comment.
    DocRootTree
    A tree node for an @docroot inline tag.
    DocTree
    Common interface for all nodes in a documentation syntax tree.
    DocTreeVisitor
    A visitor of trees, in the style of the visitor design pattern.
    EndElementTree
    A tree node for the end of an HTML element.
    EntityTree
    A tree node for an HTML entity.
    ErroneousTree
    A tree node to stand in for a malformed text
    IdentifierTree
    An identifier in a documentation comment.
    InheritDocTree
    A tree node for an @inheritDoc inline tag.
    LinkTree
    A tree node for an @link or @linkplain inline tag.
    LiteralTree
    A tree node for an @literal or @code inline tag.
    ParamTree
    A tree node for an @param block tag.
    ReferenceTree
    A tree node to a reference to a Java language element.
    ReturnTree
    A tree node for an @return block tag.
    SeeTree
    A tree node for an @see block tag.
    SerialDataTree
    A tree node for an @serialData block tag.
    SerialFieldTree
    A tree node for an @serialData block tag.
    SerialTree
    A tree node for an @serial block tag.
    SinceTree
    A tree node for an @since block tag.
    StartElementTree
    A tree node for the start of an HTML element.
    TextTree
    A tree node for plain text.
    ThrowsTree
    A tree node for an @exception or @throws block tag.
    UnknownBlockTagTree
    A tree node for an unrecognized inline tag.
    UnknownInlineTagTree
    A tree node for an unrecognized inline tag.
    ValueTree
    A tree node for an @value inline tag.
    VersionTree
    A tree node for an @version block tag.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AttributeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface AttributeTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface AttributeTree
extends DocTree
    A tree node for an attribute in an HTML element.
    Since:
    1.8

    • Nested Class Summary

      Nested Classes
      Modifier and Type | Interface and Description
      static class  | AttributeTree.ValueKind

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Name getName()
      List<? extends DocTree> | getValue()
      AttributeTree.ValueKind getValueKind()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        Name getName()

      • getValueKind

        AttributeTree.ValueKind getValueKind()

      • getValue

        List<? extends DocTree> getValue()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AttributeTree.ValueKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.doctree

Enum AttributeTree.ValueKind

  • java.lang.Object
    • java.lang.Enum<AttributeTree.ValueKind>
      • com.sun.source.doctree.AttributeTree.ValueKind
  • All Implemented Interfaces:
    Serializable, Comparable<AttributeTree.ValueKind>
    Enclosing interface:
    AttributeTree

    @Exported
public static enum AttributeTree.ValueKind
extends Enum<AttributeTree.ValueKind>

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      DOUBLE
      EMPTY
      SINGLE
      UNQUOTED

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static AttributeTree.ValueKind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static AttributeTree.ValueKind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • EMPTY

        public static final AttributeTree.ValueKind EMPTY

      • UNQUOTED

        public static final AttributeTree.ValueKind UNQUOTED

      • SINGLE

        public static final AttributeTree.ValueKind SINGLE

      • DOUBLE

        public static final AttributeTree.ValueKind DOUBLE

    • Method Detail

      • values

        public static AttributeTree.ValueKind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AttributeTree.ValueKind c : AttributeTree.ValueKind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static AttributeTree.ValueKind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AuthorTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface AuthorTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface AuthorTree
extends BlockTagTree
    A tree node for an @author block tag.

    @author name-text.

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getName()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        List<? extends DocTree> getName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


BlockTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface BlockTagTree

  • All Superinterfaces:
    DocTree
    All Known Subinterfaces:
    AuthorTree, DeprecatedTree, ParamTree, ReturnTree, SeeTree, SerialDataTree, SerialFieldTree, SerialTree, SinceTree, ThrowsTree, UnknownBlockTagTree, VersionTree

    @Exported
public interface BlockTagTree
extends DocTree
    A tree node used as the base class for the different types of block tags.
    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getTagName()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getTagName

        String getTagName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.doctree.AttributeTree.ValueKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.doctree.AttributeTree.ValueKind

  • Packages that use AttributeTree.ValueKind
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).

    • Uses of AttributeTree.ValueKind in com.sun.source.doctree

      Methods in com.sun.source.doctree that return AttributeTree.ValueKind
      Modifier and Type | Method and Description
      AttributeTree.ValueKind | AttributeTree.getValueKind()
      static AttributeTree.ValueKind AttributeTree.ValueKind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static AttributeTree.ValueKind[] AttributeTree.ValueKind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.doctree.DocTree.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.doctree.DocTree.Kind

  • Packages that use DocTree.Kind
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).

    • Uses of DocTree.Kind in com.sun.source.doctree

      Methods in com.sun.source.doctree that return DocTree.Kind
      Modifier and Type Method and Description
      DocTree.Kind DocTree.getKind()
      Gets the kind of this tree.
      static DocTree.Kind DocTree.Kind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static DocTree.Kind[] DocTree.Kind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.AttributeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.AttributeTree

  • Packages that use AttributeTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AttributeTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type AttributeTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitAttribute(AttributeTree node, P p)

    • Uses of AttributeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AttributeTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitAttribute(AttributeTree node, P p)
      R | SimpleDocTreeVisitor.visitAttribute(AttributeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.AuthorTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.AuthorTree

  • Packages that use AuthorTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AuthorTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type AuthorTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitAuthor(AuthorTree node, P p)

    • Uses of AuthorTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AuthorTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitAuthor(AuthorTree node, P p)
      R | SimpleDocTreeVisitor.visitAuthor(AuthorTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.BlockTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.BlockTagTree

  • Packages that use BlockTagTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).

    • Uses of BlockTagTree in com.sun.source.doctree

      Subinterfaces of BlockTagTree in com.sun.source.doctree
      Modifier and Type Interface and Description
      interface  AuthorTree
      A tree node for an @author block tag.
      interface  DeprecatedTree
      A tree node for an @deprecated block tag.
      interface  ParamTree
      A tree node for an @param block tag.
      interface  ReturnTree
      A tree node for an @return block tag.
      interface  SeeTree
      A tree node for an @see block tag.
      interface  SerialDataTree
      A tree node for an @serialData block tag.
      interface  SerialFieldTree
      A tree node for an @serialData block tag.
      interface  SerialTree
      A tree node for an @serial block tag.
      interface  SinceTree
      A tree node for an @since block tag.
      interface  ThrowsTree
      A tree node for an @exception or @throws block tag.
      interface  UnknownBlockTagTree
      A tree node for an unrecognized inline tag.
      interface  VersionTree
      A tree node for an @version block tag.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.CommentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.CommentTree

  • Packages that use CommentTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of CommentTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type CommentTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitComment(CommentTree node, P p)

    • Uses of CommentTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type CommentTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitComment(CommentTree node, P p)
      R | SimpleDocTreeVisitor.visitComment(CommentTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.DeprecatedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.DeprecatedTree

  • Packages that use DeprecatedTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DeprecatedTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type DeprecatedTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitDeprecated(DeprecatedTree node, P p)

    • Uses of DeprecatedTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type DeprecatedTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitDeprecated(DeprecatedTree node, P p)
      R | SimpleDocTreeVisitor.visitDeprecated(DeprecatedTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.DocCommentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.DocCommentTree

  • Packages that use DocCommentTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocCommentTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type DocCommentTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitDocComment(DocCommentTree node, P p)

    • Uses of DocCommentTree in com.sun.source.util

      Methods in com.sun.source.util that return DocCommentTree
      Modifier and Type Method and Description
      DocCommentTree DocTreePath.getDocComment()
      Get the DocCommentTree associated with this path.
      abstract DocCommentTree DocTrees.getDocCommentTree(TreePath path)
      Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
      Methods in com.sun.source.util with parameters of type DocCommentTree
      Modifier and Type | Method and Description
      long DocSourcePositions.getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the ending position of the tree within the comment within the file.
      static DocTreePath DocTreePath.getPath(TreePath treePath, DocCommentTree doc, DocTree target)
      Gets a documentation tree path for a tree node within a compilation unit.
      long DocSourcePositions.getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the starting position of the tree within the comment within the file.
      abstract void DocTrees.printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit
      R | DocTreeScanner.visitDocComment(DocCommentTree node, P p)
      R | SimpleDocTreeVisitor.visitDocComment(DocCommentTree node, P p)
      Constructors in com.sun.source.util with parameters of type DocCommentTree
      Constructor and Description
      DocTreePath(TreePath treePath, DocCommentTree t)
      Creates a DocTreePath for a root node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.DocRootTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.DocRootTree

  • Packages that use DocRootTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocRootTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type DocRootTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitDocRoot(DocRootTree node, P p)

    • Uses of DocRootTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type DocRootTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitDocRoot(DocRootTree node, P p)
      R | SimpleDocTreeVisitor.visitDocRoot(DocRootTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.DocTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.DocTree

  • Packages that use DocTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocTree in com.sun.source.doctree

      Subinterfaces of DocTree in com.sun.source.doctree
      Modifier and Type Interface and Description
      interface  AttributeTree
      A tree node for an attribute in an HTML element.
      interface  AuthorTree
      A tree node for an @author block tag.
      interface  BlockTagTree
      A tree node used as the base class for the different types of block tags.
      interface  CommentTree
      An embedded HTML comment.
      interface  DeprecatedTree
      A tree node for an @deprecated block tag.
      interface  DocCommentTree
      The top level representation of a documentation comment.
      interface  DocRootTree
      A tree node for an @docroot inline tag.
      interface  EndElementTree
      A tree node for the end of an HTML element.
      interface  EntityTree
      A tree node for an HTML entity.
      interface  ErroneousTree
      A tree node to stand in for a malformed text
      interface  IdentifierTree
      An identifier in a documentation comment.
      interface  InheritDocTree
      A tree node for an @inheritDoc inline tag.
      interface  InlineTagTree
      A tree node used as the base class for the different types of inline tags.
      interface  LinkTree
      A tree node for an @link or @linkplain inline tag.
      interface  LiteralTree
      A tree node for an @literal or @code inline tag.
      interface  ParamTree
      A tree node for an @param block tag.
      interface  ReferenceTree
      A tree node to a reference to a Java language element.
      interface  ReturnTree
      A tree node for an @return block tag.
      interface  SeeTree
      A tree node for an @see block tag.
      interface  SerialDataTree
      A tree node for an @serialData block tag.
      interface  SerialFieldTree
      A tree node for an @serialData block tag.
      interface  SerialTree
      A tree node for an @serial block tag.
      interface  SinceTree
      A tree node for an @since block tag.
      interface  StartElementTree
      A tree node for the start of an HTML element.
      interface  TextTree
      A tree node for plain text.
      interface  ThrowsTree
      A tree node for an @exception or @throws block tag.
      interface  UnknownBlockTagTree
      A tree node for an unrecognized inline tag.
      interface  UnknownInlineTagTree
      A tree node for an unrecognized inline tag.
      interface  ValueTree
      A tree node for an @value inline tag.
      interface  VersionTree
      A tree node for an @version block tag.
      Methods in com.sun.source.doctree that return types with arguments of type DocTree
      Modifier and Type | Method and Description
      List<? extends DocTree> | StartElementTree.getAttributes()
      List<? extends DocTree> | DocCommentTree.getBlockTags()
      List<? extends DocTree> | DocCommentTree.getBody()
      List<? extends DocTree> | VersionTree.getBody()
      List<? extends DocTree> | SinceTree.getBody()
      List<? extends DocTree> | DeprecatedTree.getBody()
      List<? extends DocTree> | UnknownInlineTagTree.getContent()
      List<? extends DocTree> | UnknownBlockTagTree.getContent()
      List<? extends DocTree> | ReturnTree.getDescription()
      List<? extends DocTree> | SerialDataTree.getDescription()
      List<? extends DocTree> | ParamTree.getDescription()
      List<? extends DocTree> | SerialFieldTree.getDescription()
      List<? extends DocTree> | ThrowsTree.getDescription()
      List<? extends DocTree> | SerialTree.getDescription()
      List<? extends DocTree> | DocCommentTree.getFirstSentence()
      List<? extends DocTree> | LinkTree.getLabel()
      List<? extends DocTree> | AuthorTree.getName()
      List<? extends DocTree> | SeeTree.getReference()
      List<? extends DocTree> | AttributeTree.getValue()
      Methods in com.sun.source.doctree with parameters of type DocTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitOther(DocTree node, P p)

    • Uses of DocTree in com.sun.source.util

      Methods in com.sun.source.util that return DocTree
      Modifier and Type Method and Description
      DocTree DocTreePath.getLeaf()
      Get the leaf node for this path.
      Methods in com.sun.source.util that return types with arguments of type DocTree
      Modifier and Type | Method and Description
      Iterator<DocTree> | DocTreePath.iterator()
      Methods in com.sun.source.util with parameters of type DocTree
      Modifier and Type | Method and Description
      protected R | SimpleDocTreeVisitor.defaultAction(DocTree node, P p)
      long DocSourcePositions.getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the ending position of the tree within the comment within the file.
      static DocTreePath DocTreePath.getPath(DocTreePath path, DocTree target)
      Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
      static DocTreePath DocTreePath.getPath(TreePath treePath, DocCommentTree doc, DocTree target)
      Gets a documentation tree path for a tree node within a compilation unit.
      long DocSourcePositions.getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the starting position of the tree within the comment within the file.
      abstract void DocTrees.printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit
      R DocTreeScanner.scan(DocTree node, P p)
      Scan a single node.
      R DocTreePathScanner.scan(DocTree tree, P p)
      Scan a single node.
      R | SimpleDocTreeVisitor.visit(DocTree node, P p)
      R | DocTreeScanner.visitOther(DocTree node, P p)
      R | SimpleDocTreeVisitor.visitOther(DocTree node, P p)
      Method parameters in com.sun.source.util with type arguments of type DocTree
      Modifier and Type | Method and Description
      R DocTreeScanner.scan(Iterable<? extends DocTree> nodes, P p)
      Scan a list of nodes.
      R | SimpleDocTreeVisitor.visit(Iterable<? extends DocTree> nodes, P p)
      Constructors in com.sun.source.util with parameters of type DocTree
      Constructor and Description
      DocTreePath(DocTreePath p, DocTree t)
      Creates a DocTreePath for a child node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.DocTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.DocTreeVisitor

  • Packages that use DocTreeVisitor
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocTreeVisitor in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type DocTreeVisitor
      Modifier and Type Method and Description
      <R,D> R DocTree.accept(DocTreeVisitor<R,D> visitor, D data)
      Accept method used to implement the visitor pattern.

    • Uses of DocTreeVisitor in com.sun.source.util

      Classes in com.sun.source.util that implement DocTreeVisitor
      Modifier and Type Class and Description
      class  DocTreePathScanner<R,P>
      A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
      class  DocTreeScanner<R,P>
      A TreeVisitor that visits all the child tree nodes.
      class  SimpleDocTreeVisitor<R,P>
      A simple visitor for tree nodes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.EndElementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.EndElementTree

  • Packages that use EndElementTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of EndElementTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type EndElementTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitEndElement(EndElementTree node, P p)

    • Uses of EndElementTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type EndElementTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitEndElement(EndElementTree node, P p)
      R | SimpleDocTreeVisitor.visitEndElement(EndElementTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.EntityTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.EntityTree

  • Packages that use EntityTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of EntityTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type EntityTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitEntity(EntityTree node, P p)

    • Uses of EntityTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type EntityTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitEntity(EntityTree node, P p)
      R | SimpleDocTreeVisitor.visitEntity(EntityTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ErroneousTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ErroneousTree

  • Packages that use ErroneousTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ErroneousTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type ErroneousTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitErroneous(ErroneousTree node, P p)

    • Uses of ErroneousTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ErroneousTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitErroneous(ErroneousTree node, P p)
      R | SimpleDocTreeVisitor.visitErroneous(ErroneousTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.IdentifierTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.IdentifierTree

  • Packages that use IdentifierTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of IdentifierTree in com.sun.source.doctree

      Methods in com.sun.source.doctree that return IdentifierTree
      Modifier and Type | Method and Description
      IdentifierTree | ParamTree.getName()
      IdentifierTree | SerialFieldTree.getName()
      Methods in com.sun.source.doctree with parameters of type IdentifierTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitIdentifier(IdentifierTree node, P p)

    • Uses of IdentifierTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type IdentifierTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitIdentifier(IdentifierTree node, P p)
      R | SimpleDocTreeVisitor.visitIdentifier(IdentifierTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.InheritDocTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.InheritDocTree

  • Packages that use InheritDocTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of InheritDocTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type InheritDocTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitInheritDoc(InheritDocTree node, P p)

    • Uses of InheritDocTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type InheritDocTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitInheritDoc(InheritDocTree node, P p)
      R | SimpleDocTreeVisitor.visitInheritDoc(InheritDocTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.InlineTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.InlineTagTree

  • Packages that use InlineTagTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).

    • Uses of InlineTagTree in com.sun.source.doctree

      Subinterfaces of InlineTagTree in com.sun.source.doctree
      Modifier and Type Interface and Description
      interface  DocRootTree
      A tree node for an @docroot inline tag.
      interface  InheritDocTree
      A tree node for an @inheritDoc inline tag.
      interface  LinkTree
      A tree node for an @link or @linkplain inline tag.
      interface  LiteralTree
      A tree node for an @literal or @code inline tag.
      interface  UnknownInlineTagTree
      A tree node for an unrecognized inline tag.
      interface  ValueTree
      A tree node for an @value inline tag.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.LinkTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.LinkTree

  • Packages that use LinkTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of LinkTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type LinkTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitLink(LinkTree node, P p)

    • Uses of LinkTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type LinkTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitLink(LinkTree node, P p)
      R | SimpleDocTreeVisitor.visitLink(LinkTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.LiteralTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.LiteralTree

  • Packages that use LiteralTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of LiteralTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type LiteralTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitLiteral(LiteralTree node, P p)

    • Uses of LiteralTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type LiteralTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitLiteral(LiteralTree node, P p)
      R | SimpleDocTreeVisitor.visitLiteral(LiteralTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ParamTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ParamTree

  • Packages that use ParamTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ParamTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type ParamTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitParam(ParamTree node, P p)

    • Uses of ParamTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ParamTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitParam(ParamTree node, P p)
      R | SimpleDocTreeVisitor.visitParam(ParamTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ReferenceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ReferenceTree

  • Packages that use ReferenceTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ReferenceTree in com.sun.source.doctree

      Methods in com.sun.source.doctree that return ReferenceTree
      Modifier and Type | Method and Description
      ReferenceTree | ThrowsTree.getExceptionName()
      ReferenceTree | LinkTree.getReference()
      ReferenceTree | ValueTree.getReference()
      ReferenceTree | SerialFieldTree.getType()
      Methods in com.sun.source.doctree with parameters of type ReferenceTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitReference(ReferenceTree node, P p)

    • Uses of ReferenceTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ReferenceTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitReference(ReferenceTree node, P p)
      R | SimpleDocTreeVisitor.visitReference(ReferenceTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ReturnTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ReturnTree

  • Packages that use ReturnTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ReturnTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type ReturnTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitReturn(ReturnTree node, P p)

    • Uses of ReturnTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ReturnTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitReturn(ReturnTree node, P p)
      R | SimpleDocTreeVisitor.visitReturn(ReturnTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.SeeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.SeeTree

  • Packages that use SeeTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SeeTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type SeeTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitSee(SeeTree node, P p)

    • Uses of SeeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SeeTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitSee(SeeTree node, P p)
      R | SimpleDocTreeVisitor.visitSee(SeeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.SerialDataTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.SerialDataTree

  • Packages that use SerialDataTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SerialDataTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type SerialDataTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitSerialData(SerialDataTree node, P p)

    • Uses of SerialDataTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SerialDataTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitSerialData(SerialDataTree node, P p)
      R | SimpleDocTreeVisitor.visitSerialData(SerialDataTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.SerialFieldTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.SerialFieldTree

  • Packages that use SerialFieldTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SerialFieldTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type SerialFieldTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitSerialField(SerialFieldTree node, P p)

    • Uses of SerialFieldTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SerialFieldTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitSerialField(SerialFieldTree node, P p)
      R | SimpleDocTreeVisitor.visitSerialField(SerialFieldTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.SerialTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.SerialTree

  • Packages that use SerialTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SerialTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type SerialTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitSerial(SerialTree node, P p)

    • Uses of SerialTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SerialTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitSerial(SerialTree node, P p)
      R | SimpleDocTreeVisitor.visitSerial(SerialTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.SinceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.SinceTree

  • Packages that use SinceTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SinceTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type SinceTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitSince(SinceTree node, P p)

    • Uses of SinceTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SinceTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitSince(SinceTree node, P p)
      R | SimpleDocTreeVisitor.visitSince(SinceTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.StartElementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.StartElementTree

  • Packages that use StartElementTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of StartElementTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type StartElementTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitStartElement(StartElementTree node, P p)

    • Uses of StartElementTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type StartElementTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitStartElement(StartElementTree node, P p)
      R | SimpleDocTreeVisitor.visitStartElement(StartElementTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.TextTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.TextTree

  • Packages that use TextTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TextTree in com.sun.source.doctree

      Subinterfaces of TextTree in com.sun.source.doctree
      Modifier and Type Interface and Description
      interface  ErroneousTree
      A tree node to stand in for a malformed text
      Methods in com.sun.source.doctree that return TextTree
      Modifier and Type | Method and Description
      TextTree | LiteralTree.getBody()
      Methods in com.sun.source.doctree with parameters of type TextTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitText(TextTree node, P p)

    • Uses of TextTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TextTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitText(TextTree node, P p)
      R | SimpleDocTreeVisitor.visitText(TextTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ThrowsTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ThrowsTree

  • Packages that use ThrowsTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ThrowsTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type ThrowsTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitThrows(ThrowsTree node, P p)

    • Uses of ThrowsTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ThrowsTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitThrows(ThrowsTree node, P p)
      R | SimpleDocTreeVisitor.visitThrows(ThrowsTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.UnknownBlockTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.UnknownBlockTagTree

  • Packages that use UnknownBlockTagTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of UnknownBlockTagTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type UnknownBlockTagTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitUnknownBlockTag(UnknownBlockTagTree node, P p)

    • Uses of UnknownBlockTagTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type UnknownBlockTagTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitUnknownBlockTag(UnknownBlockTagTree node, P p)
      R | SimpleDocTreeVisitor.visitUnknownBlockTag(UnknownBlockTagTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.UnknownInlineTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.UnknownInlineTagTree

  • Packages that use UnknownInlineTagTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of UnknownInlineTagTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type UnknownInlineTagTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitUnknownInlineTag(UnknownInlineTagTree node, P p)

    • Uses of UnknownInlineTagTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type UnknownInlineTagTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitUnknownInlineTag(UnknownInlineTagTree node, P p)
      R | SimpleDocTreeVisitor.visitUnknownInlineTag(UnknownInlineTagTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.ValueTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.ValueTree

  • Packages that use ValueTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ValueTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type ValueTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitValue(ValueTree node, P p)

    • Uses of ValueTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ValueTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitValue(ValueTree node, P p)
      R | SimpleDocTreeVisitor.visitValue(ValueTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.doctree.VersionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.doctree.VersionTree

  • Packages that use VersionTree
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of VersionTree in com.sun.source.doctree

      Methods in com.sun.source.doctree with parameters of type VersionTree
      Modifier and Type | Method and Description
      R | DocTreeVisitor.visitVersion(VersionTree node, P p)

    • Uses of VersionTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type VersionTree
      Modifier and Type | Method and Description
      R | DocTreeScanner.visitVersion(VersionTree node, P p)
      R | SimpleDocTreeVisitor.visitVersion(VersionTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


CommentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface CommentTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface CommentTree
extends DocTree
    An embedded HTML comment.

    <!-- text -->

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBody()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        String getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DeprecatedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface DeprecatedTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface DeprecatedTree
extends BlockTagTree
    A tree node for an @deprecated block tag.

    @deprecated deprecated text.

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getBody()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        List<? extends DocTree> getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocCommentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface DocCommentTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface DocCommentTree
extends DocTree
    The top level representation of a documentation comment.

    first-sentence body block-tags

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getBlockTags()
      List<? extends DocTree> | getBody()
      List<? extends DocTree> | getFirstSentence()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getFirstSentence

        List<? extends DocTree> getFirstSentence()

      • getBody

        List<? extends DocTree> getBody()

      • getBlockTags

        List<? extends DocTree> getBlockTags()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface DocTree

  • All Known Subinterfaces:
    AttributeTree, AuthorTree, BlockTagTree, CommentTree, DeprecatedTree, DocCommentTree, DocRootTree, EndElementTree, EntityTree, ErroneousTree, IdentifierTree, InheritDocTree, InlineTagTree, LinkTree, LiteralTree, ParamTree, ReferenceTree, ReturnTree, SeeTree, SerialDataTree, SerialFieldTree, SerialTree, SinceTree, StartElementTree, TextTree, ThrowsTree, UnknownBlockTagTree, UnknownInlineTagTree, ValueTree, VersionTree

    @Exported
public interface DocTree
    Common interface for all nodes in a documentation syntax tree.
    Since:
    1.8

    • Nested Class Summary

      Nested Classes
      Modifier and Type | Interface and Description
      static class  | DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      <R,D> R accept(DocTreeVisitor<R,D> visitor, D data)
      Accept method used to implement the visitor pattern.
      DocTree.Kind getKind()
      Gets the kind of this tree.

    • Method Detail

      • getKind

        DocTree.Kind getKind()
        Gets the kind of this tree.
        Returns:
        the kind of this tree.

      • accept

        <R,D> R accept(DocTreeVisitor<R,D> visitor,
               D data)
        Accept method used to implement the visitor pattern. The visitor pattern is used to implement operations on trees.
        Type Parameters:
        R - result type of this operation.
        D - type of additional data.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTree.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.doctree

Enum DocTree.Kind

  • java.lang.Object
    • java.lang.Enum<DocTree.Kind>
      • com.sun.source.doctree.DocTree.Kind
  • All Implemented Interfaces:
    Serializable, Comparable<DocTree.Kind>
    Enclosing interface:
    DocTree

    @Exported
public static enum DocTree.Kind
extends Enum<DocTree.Kind>

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ATTRIBUTE
      Used for instances of AttributeTree representing an HTML attribute.
      AUTHOR
      Used for instances of AuthorTree representing an @author tag.
      CODE
      Used for instances of LiteralTree representing an @code tag.
      COMMENT
      Used for instances of CommentTree representing an HTML comment.
      DEPRECATED
      Used for instances of DeprecatedTree representing an @deprecated tag.
      DOC_COMMENT
      Used for instances of DocCommentTree representing a complete doc comment.
      DOC_ROOT
      Used for instances of DocRootTree representing an @docRoot tag.
      END_ELEMENT
      Used for instances of EndElementTree representing the end of an HTML element.
      ENTITY
      Used for instances of EntityTree representing an HTML entity.
      ERRONEOUS
      Used for instances of ErroneousTree representing some invalid text.
      EXCEPTION
      Used for instances of ThrowsTree representing an @exception tag.
      IDENTIFIER
      Used for instances of IdentifierTree representing an identifier.
      INHERIT_DOC
      Used for instances of InheritDocTree representing an @inheritDoc tag.
      LINK
      Used for instances of LinkTree representing an @link tag.
      LINK_PLAIN
      Used for instances of LinkTree representing an @linkplain tag.
      LITERAL
      Used for instances of LiteralTree representing an @literal tag.
      OTHER
      An implementation-reserved node.
      PARAM
      Used for instances of ParamTree representing an @param tag.
      REFERENCE
      Used for instances of ReferenceTree representing a reference to a element in the Java programming language.
      RETURN
      Used for instances of ReturnTree representing an @return tag.
      SEE
      Used for instances of SeeTree representing an @see tag.
      SERIAL
      Used for instances of SerialTree representing an @serial tag.
      SERIAL_DATA
      Used for instances of SerialDataTree representing an @serialData tag.
      SERIAL_FIELD
      Used for instances of SerialFieldTree representing an @serialField tag.
      SINCE
      Used for instances of SinceTree representing an @since tag.
      START_ELEMENT
      Used for instances of EndElementTree representing the start of an HTML element.
      TEXT
      Used for instances of TextTree representing some documentation text.
      THROWS
      Used for instances of ThrowsTree representing an @throws tag.
      UNKNOWN_BLOCK_TAG
      Used for instances of UnknownBlockTagTree representing an unknown block tag.
      UNKNOWN_INLINE_TAG
      Used for instances of UnknownInlineTagTree representing an unknown inline tag.
      VALUE
      Used for instances of ValueTree representing an @value tag.
      VERSION
      Used for instances of VersionTree representing an @version tag.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      String tagName

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static DocTree.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static DocTree.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • ATTRIBUTE

        public static final DocTree.Kind ATTRIBUTE
        Used for instances of AttributeTree representing an HTML attribute.

      • AUTHOR

        public static final DocTree.Kind AUTHOR
        Used for instances of AuthorTree representing an @author tag.

      • CODE

        public static final DocTree.Kind CODE
        Used for instances of LiteralTree representing an @code tag.

      • COMMENT

        public static final DocTree.Kind COMMENT
        Used for instances of CommentTree representing an HTML comment.

      • DEPRECATED

        public static final DocTree.Kind DEPRECATED
        Used for instances of DeprecatedTree representing an @deprecated tag.

      • DOC_COMMENT

        public static final DocTree.Kind DOC_COMMENT
        Used for instances of DocCommentTree representing a complete doc comment.

      • DOC_ROOT

        public static final DocTree.Kind DOC_ROOT
        Used for instances of DocRootTree representing an @docRoot tag.

      • END_ELEMENT

        public static final DocTree.Kind END_ELEMENT
        Used for instances of EndElementTree representing the end of an HTML element.

      • ENTITY

        public static final DocTree.Kind ENTITY
        Used for instances of EntityTree representing an HTML entity.

      • ERRONEOUS

        public static final DocTree.Kind ERRONEOUS
        Used for instances of ErroneousTree representing some invalid text.

      • EXCEPTION

        public static final DocTree.Kind EXCEPTION
        Used for instances of ThrowsTree representing an @exception tag.

      • IDENTIFIER

        public static final DocTree.Kind IDENTIFIER
        Used for instances of IdentifierTree representing an identifier.

      • INHERIT_DOC

        public static final DocTree.Kind INHERIT_DOC
        Used for instances of InheritDocTree representing an @inheritDoc tag.

      • LINK

        public static final DocTree.Kind LINK
        Used for instances of LinkTree representing an @link tag.

      • LINK_PLAIN

        public static final DocTree.Kind LINK_PLAIN
        Used for instances of LinkTree representing an @linkplain tag.

      • LITERAL

        public static final DocTree.Kind LITERAL
        Used for instances of LiteralTree representing an @literal tag.

      • PARAM

        public static final DocTree.Kind PARAM
        Used for instances of ParamTree representing an @param tag.

      • REFERENCE

        public static final DocTree.Kind REFERENCE
        Used for instances of ReferenceTree representing a reference to a element in the Java programming language.

      • RETURN

        public static final DocTree.Kind RETURN
        Used for instances of ReturnTree representing an @return tag.

      • SEE

        public static final DocTree.Kind SEE
        Used for instances of SeeTree representing an @see tag.

      • SERIAL

        public static final DocTree.Kind SERIAL
        Used for instances of SerialTree representing an @serial tag.

      • SERIAL_DATA

        public static final DocTree.Kind SERIAL_DATA
        Used for instances of SerialDataTree representing an @serialData tag.

      • SERIAL_FIELD

        public static final DocTree.Kind SERIAL_FIELD
        Used for instances of SerialFieldTree representing an @serialField tag.

      • SINCE

        public static final DocTree.Kind SINCE
        Used for instances of SinceTree representing an @since tag.

      • START_ELEMENT

        public static final DocTree.Kind START_ELEMENT
        Used for instances of EndElementTree representing the start of an HTML element.

      • TEXT

        public static final DocTree.Kind TEXT
        Used for instances of TextTree representing some documentation text.

      • THROWS

        public static final DocTree.Kind THROWS
        Used for instances of ThrowsTree representing an @throws tag.

      • UNKNOWN_BLOCK_TAG

        public static final DocTree.Kind UNKNOWN_BLOCK_TAG
        Used for instances of UnknownBlockTagTree representing an unknown block tag.

      • UNKNOWN_INLINE_TAG

        public static final DocTree.Kind UNKNOWN_INLINE_TAG
        Used for instances of UnknownInlineTagTree representing an unknown inline tag.

      • VALUE

        public static final DocTree.Kind VALUE
        Used for instances of ValueTree representing an @value tag.

      • VERSION

        public static final DocTree.Kind VERSION
        Used for instances of VersionTree representing an @version tag.

      • OTHER

        public static final DocTree.Kind OTHER
        An implementation-reserved node. This is the not the node you are looking for.

    • Field Detail

      • tagName

        public final String tagName

    • Method Detail

      • values

        public static DocTree.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DocTree.Kind c : DocTree.Kind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static DocTree.Kind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface DocTreeVisitor<R,P>

  • Type Parameters:
    R - the return type of this visitor's methods. Use Void for visitors that do not need to return results.
    P - the type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.
    All Known Implementing Classes:
    DocTreePathScanner, DocTreeScanner, SimpleDocTreeVisitor

    @Exported
public interface DocTreeVisitor<R,P>
    A visitor of trees, in the style of the visitor design pattern. Classes implementing this interface are used to operate on a tree when the kind of tree is unknown at compile time. When a visitor is passed to an tree's accept method, the visitXYZ method most applicable to that tree is invoked.

    Classes implementing this interface may or may not throw a NullPointerException if the additional parameter p is null; see documentation of the implementing class for details.

    WARNING: It is possible that methods will be added to this interface to accommodate new, currently unknown, doc comment structures added to future versions of the Java™ programming language. Therefore, visitor classes directly implementing this interface may be source incompatible with future versions of the platform.

    Since:
    1.8

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      R | visitAttribute(AttributeTree node, P p)
      R | visitAuthor(AuthorTree node, P p)
      R | visitComment(CommentTree node, P p)
      R | visitDeprecated(DeprecatedTree node, P p)
      R | visitDocComment(DocCommentTree node, P p)
      R | visitDocRoot(DocRootTree node, P p)
      R | visitEndElement(EndElementTree node, P p)
      R | visitEntity(EntityTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitInheritDoc(InheritDocTree node, P p)
      R | visitLink(LinkTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitOther(DocTree node, P p)
      R | visitParam(ParamTree node, P p)
      R | visitReference(ReferenceTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSee(SeeTree node, P p)
      R | visitSerial(SerialTree node, P p)
      R | visitSerialData(SerialDataTree node, P p)
      R | visitSerialField(SerialFieldTree node, P p)
      R | visitSince(SinceTree node, P p)
      R | visitStartElement(StartElementTree node, P p)
      R | visitText(TextTree node, P p)
      R | visitThrows(ThrowsTree node, P p)
      R | visitUnknownBlockTag(UnknownBlockTagTree node, P p)
      R | visitUnknownInlineTag(UnknownInlineTagTree node, P p)
      R | visitValue(ValueTree node, P p)
      R | visitVersion(VersionTree node, P p)

    • Method Detail

      • visitAttribute

        R visitAttribute(AttributeTree node,
                 P p)

      • visitAuthor

        R visitAuthor(AuthorTree node,
              P p)

      • visitComment

        R visitComment(CommentTree node,
               P p)

      • visitDeprecated

        R visitDeprecated(DeprecatedTree node,
                  P p)

      • visitDocComment

        R visitDocComment(DocCommentTree node,
                  P p)

      • visitDocRoot

        R visitDocRoot(DocRootTree node,
               P p)

      • visitEndElement

        R visitEndElement(EndElementTree node,
                  P p)

      • visitEntity

        R visitEntity(EntityTree node,
              P p)

      • visitErroneous

        R visitErroneous(ErroneousTree node,
                 P p)

      • visitIdentifier

        R visitIdentifier(IdentifierTree node,
                  P p)

      • visitInheritDoc

        R visitInheritDoc(InheritDocTree node,
                  P p)

      • visitLink

        R visitLink(LinkTree node,
            P p)

      • visitLiteral

        R visitLiteral(LiteralTree node,
               P p)

      • visitParam

        R visitParam(ParamTree node,
             P p)

      • visitReference

        R visitReference(ReferenceTree node,
                 P p)

      • visitReturn

        R visitReturn(ReturnTree node,
              P p)

      • visitSee

        R visitSee(SeeTree node,
           P p)

      • visitSerial

        R visitSerial(SerialTree node,
              P p)

      • visitSerialData

        R visitSerialData(SerialDataTree node,
                  P p)

      • visitSerialField

        R visitSerialField(SerialFieldTree node,
                   P p)

      • visitSince

        R visitSince(SinceTree node,
             P p)

      • visitStartElement

        R visitStartElement(StartElementTree node,
                    P p)

      • visitText

        R visitText(TextTree node,
            P p)

      • visitThrows

        R visitThrows(ThrowsTree node,
              P p)

      • visitUnknownBlockTag

        R visitUnknownBlockTag(UnknownBlockTagTree node,
                       P p)

      • visitUnknownInlineTag

        R visitUnknownInlineTag(UnknownInlineTagTree node,
                        P p)

      • visitValue

        R visitValue(ValueTree node,
             P p)

      • visitVersion

        R visitVersion(VersionTree node,
               P p)

      • visitOther

        R visitOther(DocTree node,
             P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


EndElementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface EndElementTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface EndElementTree
extends DocTree
    A tree node for the end of an HTML element.

    </ name >

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getName()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        Name getName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


EntityTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface EntityTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface EntityTree
extends DocTree
    A tree node for an HTML entity.

    & name ;

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getName()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        Name getName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ErroneousTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ErroneousTree

  • All Superinterfaces:
    DocTree, TextTree

    @Exported
public interface ErroneousTree
extends TextTree
    A tree node to stand in for a malformed text
    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Diagnostic<JavaFileObject> getDiagnostic()
      Gets a diagnostic object giving details about the reason the body text is in error.

      • Methods inherited from interface com.sun.source.doctree.TextTree

        getBody

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getDiagnostic

        Diagnostic<JavaFileObject> getDiagnostic()
        Gets a diagnostic object giving details about the reason the body text is in error.
        Returns:
        a diagnostic
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


IdentifierTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface IdentifierTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface IdentifierTree
extends DocTree
    An identifier in a documentation comment.

    name

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getName()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        Name getName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


InlineTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface InlineTagTree

  • All Superinterfaces:
    DocTree
    All Known Subinterfaces:
    DocRootTree, InheritDocTree, LinkTree, LiteralTree, UnknownInlineTagTree, ValueTree

    @Exported
public interface InlineTagTree
extends DocTree
    A tree node used as the base class for the different types of inline tags.
    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getTagName()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getTagName

        String getTagName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LinkTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface LinkTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface LinkTree
extends InlineTagTree
    A tree node for an @link or @linkplain inline tag.

    {@link reference label}
    {@linkplain reference label }

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getLabel()
      ReferenceTree getReference()

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getReference

        ReferenceTree getReference()

      • getLabel

        List<? extends DocTree> getLabel()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LiteralTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface LiteralTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface LiteralTree
extends InlineTagTree
    A tree node for an @literal or @code inline tag.

    {@literal text}

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TextTree getBody()

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        TextTree getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ParamTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ParamTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface ParamTree
extends BlockTagTree
    A tree node for an @param block tag.

    @param parameter-name description

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()
      IdentifierTree getName()
      boolean | isTypeParameter()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • isTypeParameter

        boolean isTypeParameter()

      • getName

        IdentifierTree getName()

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ReferenceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ReferenceTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface ReferenceTree
extends DocTree
    A tree node to a reference to a Java language element.

    package.class#field

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getSignature()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getSignature

        String getSignature()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ReturnTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ReturnTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface ReturnTree
extends BlockTagTree
    A tree node for an @return block tag.

    @return description

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SeeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface SeeTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface SeeTree
extends BlockTagTree
    A tree node for an @see block tag.

    @see "string"
    @see <a href="URL#value"> label </a>
    @see reference

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getReference()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getReference

        List<? extends DocTree> getReference()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SerialDataTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface SerialDataTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface SerialDataTree
extends BlockTagTree
    A tree node for an @serialData block tag.

    @serialData data-description

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SerialFieldTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface SerialFieldTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface SerialFieldTree
extends BlockTagTree
    A tree node for an @serialData block tag.

    @serialField field-name field-type field-description

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()
      IdentifierTree getName()
      ReferenceTree getType()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        IdentifierTree getName()

      • getType

        ReferenceTree getType()

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SerialTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface SerialTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface SerialTree
extends BlockTagTree
    A tree node for an @serial block tag.

    @serial field-description | include | exclude

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SinceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface SinceTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface SinceTree
extends BlockTagTree
    A tree node for an @since block tag.

    @since since-text

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getBody()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        List<? extends DocTree> getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


StartElementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface StartElementTree

  • All Superinterfaces:
    DocTree

    @Exported
public interface StartElementTree
extends DocTree
    A tree node for the start of an HTML element.

    < name [attributes] [/]>

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getAttributes()
      Name getName()
      boolean | isSelfClosing()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getName

        Name getName()

      • getAttributes

        List<? extends DocTree> getAttributes()

      • isSelfClosing

        boolean isSelfClosing()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TextTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface TextTree

  • All Superinterfaces:
    DocTree
    All Known Subinterfaces:
    ErroneousTree

    @Exported
public interface TextTree
extends DocTree
    A tree node for plain text.
    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getBody()

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        String getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ThrowsTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ThrowsTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface ThrowsTree
extends BlockTagTree
    A tree node for an @exception or @throws block tag. @exception is a synonym for @throws.

    @exception class-name description
    @throws class-name description

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getDescription()
      ReferenceTree getExceptionName()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getExceptionName

        ReferenceTree getExceptionName()

      • getDescription

        List<? extends DocTree> getDescription()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownBlockTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface UnknownBlockTagTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface UnknownBlockTagTree
extends BlockTagTree
    A tree node for an unrecognized inline tag.

    @name content

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getContent()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getContent

        List<? extends DocTree> getContent()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


UnknownInlineTagTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface UnknownInlineTagTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface UnknownInlineTagTree
extends InlineTagTree
    A tree node for an unrecognized inline tag.

    {@name content}

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getContent()

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getContent

        List<? extends DocTree> getContent()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ValueTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface ValueTree

  • All Superinterfaces:
    DocTree, InlineTagTree

    @Exported
public interface ValueTree
extends InlineTagTree
    A tree node for an @value inline tag.

    { @value reference }

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ReferenceTree getReference()

      • Methods inherited from interface com.sun.source.doctree.InlineTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getReference

        ReferenceTree getReference()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


VersionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.doctree

Interface VersionTree

  • All Superinterfaces:
    BlockTagTree, DocTree

    @Exported
public interface VersionTree
extends BlockTagTree
    A tree node for an @version block tag.

    @version version-text

    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.doctree.DocTree

        DocTree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends DocTree> | getBody()

      • Methods inherited from interface com.sun.source.doctree.BlockTagTree

        getTagName

      • Methods inherited from interface com.sun.source.doctree.DocTree

        accept, getKind

    • Method Detail

      • getBody

        List<? extends DocTree> getBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.source.tree

Provides interfaces to represent source code as abstract syntax trees (AST).

See: Description

  • Interface Summary
    Interface Description
    AnnotatedTypeTree
    A tree node for an annotated type For example:
    AnnotationTree
    A tree node for an annotation.
    ArrayAccessTree
    A tree node for an array access expression.
    ArrayTypeTree
    A tree node for an array type.
    AssertTree
    A tree node for an 'assert' statement.
    AssignmentTree
    A tree node for an assignment expression.
    BinaryTree
    A tree node for a binary expression.
    BlockTree
    A tree node for a statement block.
    BreakTree
    A tree node for a 'break' statement.
    CaseTree
    A tree node for a 'case' in a 'switch' statement.
    CatchTree
    A tree node for a 'catch' block in a 'try' statement.
    ClassTree
    A tree node for a class, interface, enum, or annotation type declaration.
    CompilationUnitTree
    Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
    CompoundAssignmentTree
    A tree node for compound assignment operator.
    ConditionalExpressionTree
    A tree node for the conditional operator ? :.
    ContinueTree
    A tree node for a 'continue' statement.
    DoWhileLoopTree
    A tree node for a 'do' statement.
    EmptyStatementTree
    A tree node for an empty (skip) statement.
    EnhancedForLoopTree
    A tree node for an "enhanced" 'for' loop statement.
    ErroneousTree
    A tree node to stand in for a malformed expression.
    ExpressionStatementTree
    A tree node for an expression statement.
    ExpressionTree
    A tree node used as the base class for the different types of expressions.
    ForLoopTree
    A tree node for a basic 'for' loop statement.
    IdentifierTree
    A tree node for an identifier expression.
    IfTree
    A tree node for an 'if' statement.
    ImportTree
    A tree node for an import statement.
    InstanceOfTree
    A tree node for an 'instanceof' expression.
    IntersectionTypeTree
    A tree node for an intersection type in a cast expression.
    LabeledStatementTree
    A tree node for a labeled statement.
    LambdaExpressionTree
    A tree node for a lambda expression.
    LineMap
    Provides methods to convert between character positions and line numbers for a compilation unit.
    LiteralTree
    A tree node for a literal expression.
    MemberReferenceTree
    A tree node for a member reference expression.
    MemberSelectTree
    A tree node for a member access expression.
    MethodInvocationTree
    A tree node for a method invocation expression.
    MethodTree
    A tree node for a method or annotation type element declaration.
    ModifiersTree
    A tree node for the modifiers, including annotations, for a declaration.
    NewArrayTree
    A tree node for an expression to create a new instance of an array.
    NewClassTree
    A tree node to declare a new instance of a class.
    ParameterizedTypeTree
    A tree node for a type expression involving type parameters.
    ParenthesizedTree
    A tree node for a parenthesized expression.
    PrimitiveTypeTree
    A tree node for a primitive type.
    ReturnTree
    A tree node for a 'return' statement.
    Scope
    Interface for determining locally available program elements, such as local variables and imports.
    StatementTree
    A tree node used as the base class for the different kinds of statements.
    SwitchTree
    A tree node for a 'switch' statement.
    SynchronizedTree
    A tree node for a 'synchronized' statement.
    ThrowTree
    A tree node for a 'throw' statement.
    Tree
    Common interface for all nodes in an abstract syntax tree.
    TreeVisitor<R,P>
    A visitor of trees, in the style of the visitor design pattern.
    TryTree
    A tree node for a 'try' statement.
    TypeCastTree
    A tree node for a type cast expression.
    TypeParameterTree
    A tree node for a type parameter.
    UnaryTree
    A tree node for postfix and unary expressions.
    UnionTypeTree
    A tree node for a union type expression in a multicatch var declaration.
    VariableTree
    A tree node for a variable declaration.
    WhileLoopTree
    A tree node for a 'while' loop statement.
    WildcardTree
    A tree node for a wildcard type argument.
  • Enum Summary
    Enum Description
    LambdaExpressionTree.BodyKind
    Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block
    MemberReferenceTree.ReferenceMode
    There are two kinds of member references: (i) method references and (ii) constructor references
    Tree.Kind
    Enumerates all kinds of trees.

Package com.sun.source.tree Description

Provides interfaces to represent source code as abstract syntax trees (AST).
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.source.tree Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.source.tree

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • com.sun.source.tree.LineMap
  • com.sun.source.tree.Scope
  • com.sun.source.tree.Tree
    • com.sun.source.tree.ArrayTypeTree
    • com.sun.source.tree.CaseTree
    • com.sun.source.tree.CatchTree
    • com.sun.source.tree.CompilationUnitTree
    • com.sun.source.tree.ExpressionTree
      • com.sun.source.tree.AnnotatedTypeTree
      • com.sun.source.tree.AnnotationTree
      • com.sun.source.tree.ArrayAccessTree
      • com.sun.source.tree.AssignmentTree
      • com.sun.source.tree.BinaryTree
      • com.sun.source.tree.CompoundAssignmentTree
      • com.sun.source.tree.ConditionalExpressionTree
      • com.sun.source.tree.ErroneousTree
      • com.sun.source.tree.IdentifierTree
      • com.sun.source.tree.InstanceOfTree
      • com.sun.source.tree.LambdaExpressionTree
      • com.sun.source.tree.LiteralTree
      • com.sun.source.tree.MemberReferenceTree
      • com.sun.source.tree.MemberSelectTree
      • com.sun.source.tree.MethodInvocationTree
      • com.sun.source.tree.NewArrayTree
      • com.sun.source.tree.NewClassTree
      • com.sun.source.tree.ParenthesizedTree
      • com.sun.source.tree.TypeCastTree
      • com.sun.source.tree.UnaryTree
    • com.sun.source.tree.ImportTree
    • com.sun.source.tree.IntersectionTypeTree
    • com.sun.source.tree.MethodTree
    • com.sun.source.tree.ModifiersTree
    • com.sun.source.tree.ParameterizedTypeTree
    • com.sun.source.tree.PrimitiveTypeTree
    • com.sun.source.tree.StatementTree
      • com.sun.source.tree.AssertTree
      • com.sun.source.tree.BlockTree
      • com.sun.source.tree.BreakTree
      • com.sun.source.tree.ClassTree
      • com.sun.source.tree.ContinueTree
      • com.sun.source.tree.DoWhileLoopTree
      • com.sun.source.tree.EmptyStatementTree
      • com.sun.source.tree.EnhancedForLoopTree
      • com.sun.source.tree.ExpressionStatementTree
      • com.sun.source.tree.ForLoopTree
      • com.sun.source.tree.IfTree
      • com.sun.source.tree.LabeledStatementTree
      • com.sun.source.tree.ReturnTree
      • com.sun.source.tree.SwitchTree
      • com.sun.source.tree.SynchronizedTree
      • com.sun.source.tree.ThrowTree
      • com.sun.source.tree.TryTree
      • com.sun.source.tree.VariableTree
      • com.sun.source.tree.WhileLoopTree
    • com.sun.source.tree.TypeParameterTree
    • com.sun.source.tree.UnionTypeTree
    • com.sun.source.tree.WildcardTree
  • com.sun.source.tree.TreeVisitor<R,P>

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.source.tree.Tree.Kind
      • com.sun.source.tree.LambdaExpressionTree.BodyKind
      • com.sun.source.tree.MemberReferenceTree.ReferenceMode
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


EmptyStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface EmptyStatementTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface EmptyStatementTree
extends StatementTree
    A tree node for an empty (skip) statement. For example:
        ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ExpressionTree

  • All Superinterfaces:
    Tree
    All Known Subinterfaces:
    AnnotatedTypeTree, AnnotationTree, ArrayAccessTree, AssignmentTree, BinaryTree, CompoundAssignmentTree, ConditionalExpressionTree, ErroneousTree, IdentifierTree, InstanceOfTree, LambdaExpressionTree, LiteralTree, MemberReferenceTree, MemberSelectTree, MethodInvocationTree, NewArrayTree, NewClassTree, ParenthesizedTree, TypeCastTree, UnaryTree

    @Exported
public interface ExpressionTree
extends Tree
    A tree node used as the base class for the different types of expressions.
    Since:
    1.6
    See The Java™ Language Specification:
    chapter 15

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


StatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface StatementTree

  • All Superinterfaces:
    Tree
    All Known Subinterfaces:
    AssertTree, BlockTree, BreakTree, ClassTree, ContinueTree, DoWhileLoopTree, EmptyStatementTree, EnhancedForLoopTree, ExpressionStatementTree, ForLoopTree, IfTree, LabeledStatementTree, ReturnTree, SwitchTree, SynchronizedTree, ThrowTree, TryTree, VariableTree, WhileLoopTree

    @Exported
public interface StatementTree
extends Tree
    A tree node used as the base class for the different kinds of statements.
    Since:
    1.6
    See The Java™ Language Specification:
    chapter 14

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.source.tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.source.tree

  • Packages that use com.sun.source.tree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).
  • Classes in com.sun.source.tree used by com.sun.source.tree
    Class and Description
    AnnotatedTypeTree
    A tree node for an annotated type For example:
    AnnotationTree
    A tree node for an annotation.
    ArrayAccessTree
    A tree node for an array access expression.
    ArrayTypeTree
    A tree node for an array type.
    AssertTree
    A tree node for an 'assert' statement.
    AssignmentTree
    A tree node for an assignment expression.
    BinaryTree
    A tree node for a binary expression.
    BlockTree
    A tree node for a statement block.
    BreakTree
    A tree node for a 'break' statement.
    CaseTree
    A tree node for a 'case' in a 'switch' statement.
    CatchTree
    A tree node for a 'catch' block in a 'try' statement.
    ClassTree
    A tree node for a class, interface, enum, or annotation type declaration.
    CompilationUnitTree
    Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
    CompoundAssignmentTree
    A tree node for compound assignment operator.
    ConditionalExpressionTree
    A tree node for the conditional operator ? :.
    ContinueTree
    A tree node for a 'continue' statement.
    DoWhileLoopTree
    A tree node for a 'do' statement.
    EmptyStatementTree
    A tree node for an empty (skip) statement.
    EnhancedForLoopTree
    A tree node for an "enhanced" 'for' loop statement.
    ErroneousTree
    A tree node to stand in for a malformed expression.
    ExpressionStatementTree
    A tree node for an expression statement.
    ExpressionTree
    A tree node used as the base class for the different types of expressions.
    ForLoopTree
    A tree node for a basic 'for' loop statement.
    IdentifierTree
    A tree node for an identifier expression.
    IfTree
    A tree node for an 'if' statement.
    ImportTree
    A tree node for an import statement.
    InstanceOfTree
    A tree node for an 'instanceof' expression.
    IntersectionTypeTree
    A tree node for an intersection type in a cast expression.
    LabeledStatementTree
    A tree node for a labeled statement.
    LambdaExpressionTree
    A tree node for a lambda expression.
    LambdaExpressionTree.BodyKind
    Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block
    LineMap
    Provides methods to convert between character positions and line numbers for a compilation unit.
    LiteralTree
    A tree node for a literal expression.
    MemberReferenceTree
    A tree node for a member reference expression.
    MemberReferenceTree.ReferenceMode
    There are two kinds of member references: (i) method references and (ii) constructor references
    MemberSelectTree
    A tree node for a member access expression.
    MethodInvocationTree
    A tree node for a method invocation expression.
    MethodTree
    A tree node for a method or annotation type element declaration.
    ModifiersTree
    A tree node for the modifiers, including annotations, for a declaration.
    NewArrayTree
    A tree node for an expression to create a new instance of an array.
    NewClassTree
    A tree node to declare a new instance of a class.
    ParameterizedTypeTree
    A tree node for a type expression involving type parameters.
    ParenthesizedTree
    A tree node for a parenthesized expression.
    PrimitiveTypeTree
    A tree node for a primitive type.
    ReturnTree
    A tree node for a 'return' statement.
    Scope
    Interface for determining locally available program elements, such as local variables and imports.
    StatementTree
    A tree node used as the base class for the different kinds of statements.
    SwitchTree
    A tree node for a 'switch' statement.
    SynchronizedTree
    A tree node for a 'synchronized' statement.
    ThrowTree
    A tree node for a 'throw' statement.
    Tree
    Common interface for all nodes in an abstract syntax tree.
    Tree.Kind
    Enumerates all kinds of trees.
    TreeVisitor
    A visitor of trees, in the style of the visitor design pattern.
    TryTree
    A tree node for a 'try' statement.
    TypeCastTree
    A tree node for a type cast expression.
    TypeParameterTree
    A tree node for a type parameter.
    UnaryTree
    A tree node for postfix and unary expressions.
    UnionTypeTree
    A tree node for a union type expression in a multicatch var declaration.
    VariableTree
    A tree node for a variable declaration.
    WhileLoopTree
    A tree node for a 'while' loop statement.
    WildcardTree
    A tree node for a wildcard type argument.
  • Classes in com.sun.source.tree used by com.sun.source.util
    Class and Description
    AnnotatedTypeTree
    A tree node for an annotated type For example:
    AnnotationTree
    A tree node for an annotation.
    ArrayAccessTree
    A tree node for an array access expression.
    ArrayTypeTree
    A tree node for an array type.
    AssertTree
    A tree node for an 'assert' statement.
    AssignmentTree
    A tree node for an assignment expression.
    BinaryTree
    A tree node for a binary expression.
    BlockTree
    A tree node for a statement block.
    BreakTree
    A tree node for a 'break' statement.
    CaseTree
    A tree node for a 'case' in a 'switch' statement.
    CatchTree
    A tree node for a 'catch' block in a 'try' statement.
    ClassTree
    A tree node for a class, interface, enum, or annotation type declaration.
    CompilationUnitTree
    Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
    CompoundAssignmentTree
    A tree node for compound assignment operator.
    ConditionalExpressionTree
    A tree node for the conditional operator ? :.
    ContinueTree
    A tree node for a 'continue' statement.
    DoWhileLoopTree
    A tree node for a 'do' statement.
    EmptyStatementTree
    A tree node for an empty (skip) statement.
    EnhancedForLoopTree
    A tree node for an "enhanced" 'for' loop statement.
    ErroneousTree
    A tree node to stand in for a malformed expression.
    ExpressionStatementTree
    A tree node for an expression statement.
    ForLoopTree
    A tree node for a basic 'for' loop statement.
    IdentifierTree
    A tree node for an identifier expression.
    IfTree
    A tree node for an 'if' statement.
    ImportTree
    A tree node for an import statement.
    InstanceOfTree
    A tree node for an 'instanceof' expression.
    IntersectionTypeTree
    A tree node for an intersection type in a cast expression.
    LabeledStatementTree
    A tree node for a labeled statement.
    LambdaExpressionTree
    A tree node for a lambda expression.
    LiteralTree
    A tree node for a literal expression.
    MemberReferenceTree
    A tree node for a member reference expression.
    MemberSelectTree
    A tree node for a member access expression.
    MethodInvocationTree
    A tree node for a method invocation expression.
    MethodTree
    A tree node for a method or annotation type element declaration.
    ModifiersTree
    A tree node for the modifiers, including annotations, for a declaration.
    NewArrayTree
    A tree node for an expression to create a new instance of an array.
    NewClassTree
    A tree node to declare a new instance of a class.
    ParameterizedTypeTree
    A tree node for a type expression involving type parameters.
    ParenthesizedTree
    A tree node for a parenthesized expression.
    PrimitiveTypeTree
    A tree node for a primitive type.
    ReturnTree
    A tree node for a 'return' statement.
    Scope
    Interface for determining locally available program elements, such as local variables and imports.
    SwitchTree
    A tree node for a 'switch' statement.
    SynchronizedTree
    A tree node for a 'synchronized' statement.
    ThrowTree
    A tree node for a 'throw' statement.
    Tree
    Common interface for all nodes in an abstract syntax tree.
    TreeVisitor
    A visitor of trees, in the style of the visitor design pattern.
    TryTree
    A tree node for a 'try' statement.
    TypeCastTree
    A tree node for a type cast expression.
    TypeParameterTree
    A tree node for a type parameter.
    UnaryTree
    A tree node for postfix and unary expressions.
    UnionTypeTree
    A tree node for a union type expression in a multicatch var declaration.
    VariableTree
    A tree node for a variable declaration.
    WhileLoopTree
    A tree node for a 'while' loop statement.
    WildcardTree
    A tree node for a wildcard type argument.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AnnotatedTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface AnnotatedTypeTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface AnnotatedTypeTree
extends ExpressionTree
    A tree node for an annotated type For example:
         @annotationType String
     @annotationType ( arguments ) Date
    Since:
    1.8
    See Also:
    "JSR 308: Annotations on Java Types"

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends AnnotationTree> | getAnnotations()
      ExpressionTree getUnderlyingType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getAnnotations

        List<? extends AnnotationTree> getAnnotations()

      • getUnderlyingType

        ExpressionTree getUnderlyingType()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AnnotationTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface AnnotationTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface AnnotationTree
extends ExpressionTree
    A tree node for an annotation. For example:
         @annotationType
     @annotationType ( arguments )
    Since:
    1.6
    See The Java™ Language Specification:
    section 9.7

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Tree getAnnotationType()
      List<? extends ExpressionTree> | getArguments()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getAnnotationType

        Tree getAnnotationType()

      • getArguments

        List<? extends ExpressionTree> getArguments()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ArrayAccessTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ArrayAccessTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface ArrayAccessTree
extends ExpressionTree
    A tree node for an array access expression. For example:
       expression [ index ]
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.13

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      ExpressionTree getIndex()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()

      • getIndex

        ExpressionTree getIndex()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ArrayTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ArrayTypeTree

  • All Superinterfaces:
    Tree

    @Exported
public interface ArrayTypeTree
extends Tree
    A tree node for an array type. For example:
       type []
    Since:
    1.6
    See The Java™ Language Specification:
    section 10.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Tree getType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getType

        Tree getType()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AssertTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface AssertTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface AssertTree
extends StatementTree
    A tree node for an 'assert' statement. For example:
       assert condition ;

   assert condition : detail ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.10

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getCondition()
      ExpressionTree getDetail()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getCondition

        ExpressionTree getCondition()

      • getDetail

        ExpressionTree getDetail()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


AssignmentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface AssignmentTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface AssignmentTree
extends ExpressionTree
    A tree node for an assignment expression. For example:
       variable = expression
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.26.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      ExpressionTree getVariable()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getVariable

        ExpressionTree getVariable()

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


BinaryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface BinaryTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface BinaryTree
extends ExpressionTree
    A tree node for a binary expression. Use getKind to determine the kind of operator. For example:
       leftOperand operator rightOperand
    Since:
    1.6
    See The Java™ Language Specification:
    sections 15.17 to 15.24

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getLeftOperand()
      ExpressionTree getRightOperand()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getLeftOperand

        ExpressionTree getLeftOperand()

      • getRightOperand

        ExpressionTree getRightOperand()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


BlockTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface BlockTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface BlockTree
extends StatementTree
    A tree node for a statement block. For example:
       { }

   { statements }

   static { statements }
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.2

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends StatementTree> | getStatements()
      boolean | isStatic()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • isStatic

        boolean isStatic()

      • getStatements

        List<? extends StatementTree> getStatements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


BreakTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface BreakTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface BreakTree
extends StatementTree
    A tree node for a 'break' statement. For example:
       break;

   break label ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.15

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getLabel()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getLabel

        Name getLabel()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


CaseTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface CaseTree

  • All Superinterfaces:
    Tree

    @Exported
public interface CaseTree
extends Tree
    A tree node for a 'case' in a 'switch' statement. For example:
       case expression :
       statements

   default :
       statements
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.11

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      ExpressionTree getExpression()
      List<? extends StatementTree> | getStatements()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
        Returns:
        null if and only if this Case is default:

      • getStatements

        List<? extends StatementTree> getStatements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


CatchTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface CatchTree

  • All Superinterfaces:
    Tree

    @Exported
public interface CatchTree
extends Tree
    A tree node for a 'catch' block in a 'try' statement. For example:
       catch ( parameter )
       block
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.20

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      BlockTree getBlock()
      VariableTree getParameter()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getParameter

        VariableTree getParameter()

      • getBlock

        BlockTree getBlock()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.tree.LambdaExpressionTree.BodyKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.tree.LambdaExpressionTree.BodyKind

  • Packages that use LambdaExpressionTree.BodyKind
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of LambdaExpressionTree.BodyKind in com.sun.source.tree

      Methods in com.sun.source.tree that return LambdaExpressionTree.BodyKind
      Modifier and Type | Method and Description
      LambdaExpressionTree.BodyKind | LambdaExpressionTree.getBodyKind()
      static LambdaExpressionTree.BodyKind LambdaExpressionTree.BodyKind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static LambdaExpressionTree.BodyKind[] LambdaExpressionTree.BodyKind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.tree.MemberReferenceTree.ReferenceMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.tree.MemberReferenceTree.ReferenceMode

  • Packages that use MemberReferenceTree.ReferenceMode
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of MemberReferenceTree.ReferenceMode in com.sun.source.tree

      Methods in com.sun.source.tree that return MemberReferenceTree.ReferenceMode
      Modifier and Type | Method and Description
      MemberReferenceTree.ReferenceMode | MemberReferenceTree.getMode()
      static MemberReferenceTree.ReferenceMode MemberReferenceTree.ReferenceMode.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static MemberReferenceTree.ReferenceMode[] MemberReferenceTree.ReferenceMode.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.tree.Tree.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.tree.Tree.Kind

  • Packages that use Tree.Kind
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of Tree.Kind in com.sun.source.tree

      Methods in com.sun.source.tree that return Tree.Kind
      Modifier and Type Method and Description
      Tree.Kind Tree.getKind()
      Gets the kind of this tree.
      static Tree.Kind Tree.Kind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Tree.Kind[] Tree.Kind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.AnnotatedTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.AnnotatedTypeTree

  • Packages that use AnnotatedTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AnnotatedTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type AnnotatedTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitAnnotatedType(AnnotatedTypeTree node, P p)

    • Uses of AnnotatedTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AnnotatedTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitAnnotatedType(AnnotatedTypeTree node, P p)
      R | SimpleTreeVisitor.visitAnnotatedType(AnnotatedTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.AnnotationTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.AnnotationTree

  • Packages that use AnnotationTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AnnotationTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type AnnotationTree
      Modifier and Type | Method and Description
      List<? extends AnnotationTree> | AnnotatedTypeTree.getAnnotations()
      List<? extends AnnotationTree> TypeParameterTree.getAnnotations()
      Return annotations on the type parameter declaration.
      List<? extends AnnotationTree> | ModifiersTree.getAnnotations()
      List<? extends AnnotationTree> | NewArrayTree.getAnnotations()
      List<? extends List<? extends AnnotationTree>> | NewArrayTree.getDimAnnotations()
      List<? extends AnnotationTree> | CompilationUnitTree.getPackageAnnotations()
      Methods in com.sun.source.tree with parameters of type AnnotationTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitAnnotation(AnnotationTree node, P p)

    • Uses of AnnotationTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AnnotationTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitAnnotation(AnnotationTree node, P p)
      R | SimpleTreeVisitor.visitAnnotation(AnnotationTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ArrayAccessTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ArrayAccessTree

  • Packages that use ArrayAccessTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ArrayAccessTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ArrayAccessTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitArrayAccess(ArrayAccessTree node, P p)

    • Uses of ArrayAccessTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ArrayAccessTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitArrayAccess(ArrayAccessTree node, P p)
      R | SimpleTreeVisitor.visitArrayAccess(ArrayAccessTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ArrayTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ArrayTypeTree

  • Packages that use ArrayTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ArrayTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ArrayTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitArrayType(ArrayTypeTree node, P p)

    • Uses of ArrayTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ArrayTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitArrayType(ArrayTypeTree node, P p)
      R | SimpleTreeVisitor.visitArrayType(ArrayTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.AssertTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.AssertTree

  • Packages that use AssertTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AssertTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type AssertTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitAssert(AssertTree node, P p)

    • Uses of AssertTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AssertTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitAssert(AssertTree node, P p)
      R | SimpleTreeVisitor.visitAssert(AssertTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.AssignmentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.AssignmentTree

  • Packages that use AssignmentTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of AssignmentTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type AssignmentTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitAssignment(AssignmentTree node, P p)

    • Uses of AssignmentTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type AssignmentTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitAssignment(AssignmentTree node, P p)
      R | SimpleTreeVisitor.visitAssignment(AssignmentTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.BinaryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.BinaryTree

  • Packages that use BinaryTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of BinaryTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type BinaryTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitBinary(BinaryTree node, P p)

    • Uses of BinaryTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type BinaryTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitBinary(BinaryTree node, P p)
      R | SimpleTreeVisitor.visitBinary(BinaryTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.BlockTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.BlockTree

  • Packages that use BlockTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of BlockTree in com.sun.source.tree

      Methods in com.sun.source.tree that return BlockTree
      Modifier and Type | Method and Description
      BlockTree | TryTree.getBlock()
      BlockTree | SynchronizedTree.getBlock()
      BlockTree | CatchTree.getBlock()
      BlockTree | MethodTree.getBody()
      BlockTree | TryTree.getFinallyBlock()
      Methods in com.sun.source.tree with parameters of type BlockTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitBlock(BlockTree node, P p)

    • Uses of BlockTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type BlockTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitBlock(BlockTree node, P p)
      R | SimpleTreeVisitor.visitBlock(BlockTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.BreakTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.BreakTree

  • Packages that use BreakTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of BreakTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type BreakTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitBreak(BreakTree node, P p)

    • Uses of BreakTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type BreakTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitBreak(BreakTree node, P p)
      R | SimpleTreeVisitor.visitBreak(BreakTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.CaseTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.CaseTree

  • Packages that use CaseTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of CaseTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type CaseTree
      Modifier and Type | Method and Description
      List<? extends CaseTree> | SwitchTree.getCases()
      Methods in com.sun.source.tree with parameters of type CaseTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitCase(CaseTree node, P p)

    • Uses of CaseTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type CaseTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitCase(CaseTree node, P p)
      R | SimpleTreeVisitor.visitCase(CaseTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.CatchTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.CatchTree

  • Packages that use CatchTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of CatchTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type CatchTree
      Modifier and Type | Method and Description
      List<? extends CatchTree> | TryTree.getCatches()
      Methods in com.sun.source.tree with parameters of type CatchTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitCatch(CatchTree node, P p)

    • Uses of CatchTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type CatchTree
      Modifier and Type | Method and Description
      abstract TypeMirror Trees.getLub(CatchTree tree)
      Gets the lub of an exception parameter declared in a catch clause.
      R | TreeScanner.visitCatch(CatchTree node, P p)
      R | SimpleTreeVisitor.visitCatch(CatchTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ClassTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ClassTree

  • Packages that use ClassTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ClassTree in com.sun.source.tree

      Methods in com.sun.source.tree that return ClassTree
      Modifier and Type | Method and Description
      ClassTree | NewClassTree.getClassBody()
      Methods in com.sun.source.tree with parameters of type ClassTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitClass(ClassTree node, P p)

    • Uses of ClassTree in com.sun.source.util

      Methods in com.sun.source.util that return ClassTree
      Modifier and Type Method and Description
      abstract ClassTree Trees.getTree(TypeElement element)
      Gets the ClassTree node for a given TypeElement.
      Methods in com.sun.source.util with parameters of type ClassTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitClass(ClassTree node, P p)
      R | SimpleTreeVisitor.visitClass(ClassTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.CompilationUnitTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.CompilationUnitTree

  • Packages that use CompilationUnitTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of CompilationUnitTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type CompilationUnitTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitCompilationUnit(CompilationUnitTree node, P p)

    • Uses of CompilationUnitTree in com.sun.source.util

      Methods in com.sun.source.util that return CompilationUnitTree
      Modifier and Type | Method and Description
      CompilationUnitTree | TaskEvent.getCompilationUnit()
      CompilationUnitTree TreePath.getCompilationUnit()
      Get the compilation unit associated with this path.
      Methods in com.sun.source.util that return types with arguments of type CompilationUnitTree
      Modifier and Type Method and Description
      abstract Iterable<? extends CompilationUnitTree> JavacTask.parse()
      Parse the specified files returning a list of abstract syntax trees.
      Methods in com.sun.source.util with parameters of type CompilationUnitTree
      Modifier and Type | Method and Description
      long DocSourcePositions.getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the ending position of the tree within the comment within the file.
      long SourcePositions.getEndPosition(CompilationUnitTree file, Tree tree)
      Gets the ending position of tree within file.
      abstract TreePath Trees.getPath(CompilationUnitTree unit, Tree node)
      Gets the path to tree node within the specified compilation unit.
      static TreePath TreePath.getPath(CompilationUnitTree unit, Tree target)
      Gets a tree path for a tree node within a compilation unit.
      long DocSourcePositions.getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the starting position of the tree within the comment within the file.
      long SourcePositions.getStartPosition(CompilationUnitTree file, Tree tree)
      Gets the starting position of tree within file.
      abstract void DocTrees.printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit
      abstract void Trees.printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit
      R | TreeScanner.visitCompilationUnit(CompilationUnitTree node, P p)
      R | SimpleTreeVisitor.visitCompilationUnit(CompilationUnitTree node, P p)
      Constructors in com.sun.source.util with parameters of type CompilationUnitTree
      Constructor and Description
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit)
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit, TypeElement clazz)
      TreePath(CompilationUnitTree t)
      Creates a TreePath for a root node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.CompoundAssignmentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.CompoundAssignmentTree

  • Packages that use CompoundAssignmentTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of CompoundAssignmentTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type CompoundAssignmentTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitCompoundAssignment(CompoundAssignmentTree node, P p)

    • Uses of CompoundAssignmentTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type CompoundAssignmentTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitCompoundAssignment(CompoundAssignmentTree node, P p)
      R | SimpleTreeVisitor.visitCompoundAssignment(CompoundAssignmentTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ConditionalExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ConditionalExpressionTree

  • Packages that use ConditionalExpressionTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ConditionalExpressionTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ConditionalExpressionTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitConditionalExpression(ConditionalExpressionTree node, P p)

    • Uses of ConditionalExpressionTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ConditionalExpressionTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitConditionalExpression(ConditionalExpressionTree node, P p)
      R | SimpleTreeVisitor.visitConditionalExpression(ConditionalExpressionTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ContinueTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ContinueTree

  • Packages that use ContinueTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ContinueTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ContinueTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitContinue(ContinueTree node, P p)

    • Uses of ContinueTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ContinueTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitContinue(ContinueTree node, P p)
      R | SimpleTreeVisitor.visitContinue(ContinueTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.DoWhileLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.DoWhileLoopTree

  • Packages that use DoWhileLoopTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DoWhileLoopTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type DoWhileLoopTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitDoWhileLoop(DoWhileLoopTree node, P p)

    • Uses of DoWhileLoopTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type DoWhileLoopTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitDoWhileLoop(DoWhileLoopTree node, P p)
      R | SimpleTreeVisitor.visitDoWhileLoop(DoWhileLoopTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.EmptyStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.EmptyStatementTree

  • Packages that use EmptyStatementTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of EmptyStatementTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type EmptyStatementTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitEmptyStatement(EmptyStatementTree node, P p)

    • Uses of EmptyStatementTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type EmptyStatementTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitEmptyStatement(EmptyStatementTree node, P p)
      R | SimpleTreeVisitor.visitEmptyStatement(EmptyStatementTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.EnhancedForLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.EnhancedForLoopTree

  • Packages that use EnhancedForLoopTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of EnhancedForLoopTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type EnhancedForLoopTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitEnhancedForLoop(EnhancedForLoopTree node, P p)

    • Uses of EnhancedForLoopTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type EnhancedForLoopTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitEnhancedForLoop(EnhancedForLoopTree node, P p)
      R | SimpleTreeVisitor.visitEnhancedForLoop(EnhancedForLoopTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ErroneousTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ErroneousTree

  • Packages that use ErroneousTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ErroneousTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ErroneousTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitErroneous(ErroneousTree node, P p)

    • Uses of ErroneousTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ErroneousTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitErroneous(ErroneousTree node, P p)
      R | SimpleTreeVisitor.visitErroneous(ErroneousTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ExpressionStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ExpressionStatementTree

  • Packages that use ExpressionStatementTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ExpressionStatementTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type ExpressionStatementTree
      Modifier and Type | Method and Description
      List<? extends ExpressionStatementTree> | ForLoopTree.getUpdate()
      Methods in com.sun.source.tree with parameters of type ExpressionStatementTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitExpressionStatement(ExpressionStatementTree node, P p)

    • Uses of ExpressionStatementTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ExpressionStatementTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitExpressionStatement(ExpressionStatementTree node, P p)
      R | SimpleTreeVisitor.visitExpressionStatement(ExpressionStatementTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ExpressionTree

  • Packages that use ExpressionTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of ExpressionTree in com.sun.source.tree

      Subinterfaces of ExpressionTree in com.sun.source.tree
      Modifier and Type Interface and Description
      interface  AnnotatedTypeTree
      A tree node for an annotated type For example:
      interface  AnnotationTree
      A tree node for an annotation.
      interface  ArrayAccessTree
      A tree node for an array access expression.
      interface  AssignmentTree
      A tree node for an assignment expression.
      interface  BinaryTree
      A tree node for a binary expression.
      interface  CompoundAssignmentTree
      A tree node for compound assignment operator.
      interface  ConditionalExpressionTree
      A tree node for the conditional operator ? :.
      interface  ErroneousTree
      A tree node to stand in for a malformed expression.
      interface  IdentifierTree
      A tree node for an identifier expression.
      interface  InstanceOfTree
      A tree node for an 'instanceof' expression.
      interface  LambdaExpressionTree
      A tree node for a lambda expression.
      interface  LiteralTree
      A tree node for a literal expression.
      interface  MemberReferenceTree
      A tree node for a member reference expression.
      interface  MemberSelectTree
      A tree node for a member access expression.
      interface  MethodInvocationTree
      A tree node for a method invocation expression.
      interface  NewArrayTree
      A tree node for an expression to create a new instance of an array.
      interface  NewClassTree
      A tree node to declare a new instance of a class.
      interface  ParenthesizedTree
      A tree node for a parenthesized expression.
      interface  TypeCastTree
      A tree node for a type cast expression.
      interface  UnaryTree
      A tree node for postfix and unary expressions.
      Methods in com.sun.source.tree that return ExpressionTree
      Modifier and Type | Method and Description
      ExpressionTree | IfTree.getCondition()
      ExpressionTree | ConditionalExpressionTree.getCondition()
      ExpressionTree | WhileLoopTree.getCondition()
      ExpressionTree | AssertTree.getCondition()
      ExpressionTree | ForLoopTree.getCondition()
      ExpressionTree | DoWhileLoopTree.getCondition()
      ExpressionTree | AssertTree.getDetail()
      ExpressionTree | NewClassTree.getEnclosingExpression()
      ExpressionTree | TypeCastTree.getExpression()
      ExpressionTree | InstanceOfTree.getExpression()
      ExpressionTree | AssignmentTree.getExpression()
      ExpressionTree | CaseTree.getExpression()
      ExpressionTree | ExpressionStatementTree.getExpression()
      ExpressionTree | SwitchTree.getExpression()
      ExpressionTree | ThrowTree.getExpression()
      ExpressionTree | UnaryTree.getExpression()
      ExpressionTree | EnhancedForLoopTree.getExpression()
      ExpressionTree | ReturnTree.getExpression()
      ExpressionTree | CompoundAssignmentTree.getExpression()
      ExpressionTree | ArrayAccessTree.getExpression()
      ExpressionTree | SynchronizedTree.getExpression()
      ExpressionTree | MemberSelectTree.getExpression()
      ExpressionTree | ParenthesizedTree.getExpression()
      ExpressionTree | ConditionalExpressionTree.getFalseExpression()
      ExpressionTree | NewClassTree.getIdentifier()
      ExpressionTree | ArrayAccessTree.getIndex()
      ExpressionTree | VariableTree.getInitializer()
      ExpressionTree | BinaryTree.getLeftOperand()
      ExpressionTree | MethodInvocationTree.getMethodSelect()
      ExpressionTree | VariableTree.getNameExpression()
      ExpressionTree | CompilationUnitTree.getPackageName()
      ExpressionTree | MemberReferenceTree.getQualifierExpression()
      ExpressionTree | BinaryTree.getRightOperand()
      ExpressionTree | ConditionalExpressionTree.getTrueExpression()
      ExpressionTree | AnnotatedTypeTree.getUnderlyingType()
      ExpressionTree | AssignmentTree.getVariable()
      ExpressionTree | CompoundAssignmentTree.getVariable()
      Methods in com.sun.source.tree that return types with arguments of type ExpressionTree
      Modifier and Type | Method and Description
      List<? extends ExpressionTree> | AnnotationTree.getArguments()
      List<? extends ExpressionTree> | NewClassTree.getArguments()
      List<? extends ExpressionTree> | MethodInvocationTree.getArguments()
      List<? extends ExpressionTree> | NewArrayTree.getDimensions()
      List<? extends ExpressionTree> | NewArrayTree.getInitializers()
      List<? extends ExpressionTree> | MethodTree.getThrows()
      List<? extends ExpressionTree> | MemberReferenceTree.getTypeArguments()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ForLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ForLoopTree

  • Packages that use ForLoopTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ForLoopTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ForLoopTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitForLoop(ForLoopTree node, P p)

    • Uses of ForLoopTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ForLoopTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitForLoop(ForLoopTree node, P p)
      R | SimpleTreeVisitor.visitForLoop(ForLoopTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.IdentifierTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.IdentifierTree

  • Packages that use IdentifierTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of IdentifierTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type IdentifierTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitIdentifier(IdentifierTree node, P p)

    • Uses of IdentifierTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type IdentifierTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitIdentifier(IdentifierTree node, P p)
      R | SimpleTreeVisitor.visitIdentifier(IdentifierTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.IfTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.IfTree

  • Packages that use IfTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of IfTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type IfTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitIf(IfTree node, P p)

    • Uses of IfTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type IfTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitIf(IfTree node, P p)
      R | SimpleTreeVisitor.visitIf(IfTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ImportTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ImportTree

  • Packages that use ImportTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ImportTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type ImportTree
      Modifier and Type | Method and Description
      List<? extends ImportTree> | CompilationUnitTree.getImports()
      Methods in com.sun.source.tree with parameters of type ImportTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitImport(ImportTree node, P p)

    • Uses of ImportTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ImportTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitImport(ImportTree node, P p)
      R | SimpleTreeVisitor.visitImport(ImportTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.InstanceOfTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.InstanceOfTree

  • Packages that use InstanceOfTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of InstanceOfTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type InstanceOfTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitInstanceOf(InstanceOfTree node, P p)

    • Uses of InstanceOfTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type InstanceOfTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitInstanceOf(InstanceOfTree node, P p)
      R | SimpleTreeVisitor.visitInstanceOf(InstanceOfTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.IntersectionTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.IntersectionTypeTree

  • Packages that use IntersectionTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of IntersectionTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type IntersectionTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitIntersectionType(IntersectionTypeTree node, P p)

    • Uses of IntersectionTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type IntersectionTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitIntersectionType(IntersectionTypeTree node, P p)
      R | SimpleTreeVisitor.visitIntersectionType(IntersectionTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.LabeledStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.LabeledStatementTree

  • Packages that use LabeledStatementTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of LabeledStatementTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type LabeledStatementTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitLabeledStatement(LabeledStatementTree node, P p)

    • Uses of LabeledStatementTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type LabeledStatementTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitLabeledStatement(LabeledStatementTree node, P p)
      R | SimpleTreeVisitor.visitLabeledStatement(LabeledStatementTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.LambdaExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.LambdaExpressionTree

  • Packages that use LambdaExpressionTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of LambdaExpressionTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type LambdaExpressionTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitLambdaExpression(LambdaExpressionTree node, P p)

    • Uses of LambdaExpressionTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type LambdaExpressionTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitLambdaExpression(LambdaExpressionTree node, P p)
      R | SimpleTreeVisitor.visitLambdaExpression(LambdaExpressionTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.LineMap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.LineMap

  • Packages that use LineMap
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of LineMap in com.sun.source.tree

      Methods in com.sun.source.tree that return LineMap
      Modifier and Type Method and Description
      LineMap CompilationUnitTree.getLineMap()
      Gets the line map for this compilation unit, if available.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.LiteralTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.LiteralTree

  • Packages that use LiteralTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of LiteralTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type LiteralTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitLiteral(LiteralTree node, P p)

    • Uses of LiteralTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type LiteralTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitLiteral(LiteralTree node, P p)
      R | SimpleTreeVisitor.visitLiteral(LiteralTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.MemberReferenceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.MemberReferenceTree

  • Packages that use MemberReferenceTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of MemberReferenceTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type MemberReferenceTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitMemberReference(MemberReferenceTree node, P p)

    • Uses of MemberReferenceTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type MemberReferenceTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitMemberReference(MemberReferenceTree node, P p)
      R | SimpleTreeVisitor.visitMemberReference(MemberReferenceTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.MemberSelectTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.MemberSelectTree

  • Packages that use MemberSelectTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of MemberSelectTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type MemberSelectTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitMemberSelect(MemberSelectTree node, P p)

    • Uses of MemberSelectTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type MemberSelectTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitMemberSelect(MemberSelectTree node, P p)
      R | SimpleTreeVisitor.visitMemberSelect(MemberSelectTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.MethodInvocationTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.MethodInvocationTree

  • Packages that use MethodInvocationTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of MethodInvocationTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type MethodInvocationTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitMethodInvocation(MethodInvocationTree node, P p)

    • Uses of MethodInvocationTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type MethodInvocationTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitMethodInvocation(MethodInvocationTree node, P p)
      R | SimpleTreeVisitor.visitMethodInvocation(MethodInvocationTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.MethodTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.MethodTree

  • Packages that use MethodTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of MethodTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type MethodTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitMethod(MethodTree node, P p)

    • Uses of MethodTree in com.sun.source.util

      Methods in com.sun.source.util that return MethodTree
      Modifier and Type Method and Description
      abstract MethodTree Trees.getTree(ExecutableElement method)
      Gets the MethodTree node for a given ExecutableElement.
      Methods in com.sun.source.util with parameters of type MethodTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitMethod(MethodTree node, P p)
      R | SimpleTreeVisitor.visitMethod(MethodTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ModifiersTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ModifiersTree

  • Packages that use ModifiersTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ModifiersTree in com.sun.source.tree

      Methods in com.sun.source.tree that return ModifiersTree
      Modifier and Type | Method and Description
      ModifiersTree | MethodTree.getModifiers()
      ModifiersTree | ClassTree.getModifiers()
      ModifiersTree | VariableTree.getModifiers()
      Methods in com.sun.source.tree with parameters of type ModifiersTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitModifiers(ModifiersTree node, P p)

    • Uses of ModifiersTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ModifiersTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitModifiers(ModifiersTree node, P p)
      R | SimpleTreeVisitor.visitModifiers(ModifiersTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.NewArrayTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.NewArrayTree

  • Packages that use NewArrayTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of NewArrayTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type NewArrayTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitNewArray(NewArrayTree node, P p)

    • Uses of NewArrayTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type NewArrayTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitNewArray(NewArrayTree node, P p)
      R | SimpleTreeVisitor.visitNewArray(NewArrayTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.NewClassTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.NewClassTree

  • Packages that use NewClassTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of NewClassTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type NewClassTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitNewClass(NewClassTree node, P p)

    • Uses of NewClassTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type NewClassTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitNewClass(NewClassTree node, P p)
      R | SimpleTreeVisitor.visitNewClass(NewClassTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ParameterizedTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ParameterizedTypeTree

  • Packages that use ParameterizedTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ParameterizedTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ParameterizedTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitParameterizedType(ParameterizedTypeTree node, P p)

    • Uses of ParameterizedTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ParameterizedTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitParameterizedType(ParameterizedTypeTree node, P p)
      R | SimpleTreeVisitor.visitParameterizedType(ParameterizedTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ParenthesizedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ParenthesizedTree

  • Packages that use ParenthesizedTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ParenthesizedTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ParenthesizedTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitParenthesized(ParenthesizedTree node, P p)

    • Uses of ParenthesizedTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ParenthesizedTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitParenthesized(ParenthesizedTree node, P p)
      R | SimpleTreeVisitor.visitParenthesized(ParenthesizedTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.PrimitiveTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.PrimitiveTypeTree

  • Packages that use PrimitiveTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of PrimitiveTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type PrimitiveTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitPrimitiveType(PrimitiveTypeTree node, P p)

    • Uses of PrimitiveTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type PrimitiveTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitPrimitiveType(PrimitiveTypeTree node, P p)
      R | SimpleTreeVisitor.visitPrimitiveType(PrimitiveTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ReturnTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ReturnTree

  • Packages that use ReturnTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ReturnTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ReturnTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitReturn(ReturnTree node, P p)

    • Uses of ReturnTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ReturnTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitReturn(ReturnTree node, P p)
      R | SimpleTreeVisitor.visitReturn(ReturnTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.Scope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.Scope

  • Packages that use Scope
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of Scope in com.sun.source.tree

      Methods in com.sun.source.tree that return Scope
      Modifier and Type Method and Description
      Scope Scope.getEnclosingScope()
      Returns the enclosing scope.

    • Uses of Scope in com.sun.source.util

      Methods in com.sun.source.util that return Scope
      Modifier and Type Method and Description
      abstract Scope Trees.getScope(TreePath path)
      Gets the Scope for the Tree node identified by a given TreePath.
      Methods in com.sun.source.util with parameters of type Scope
      Modifier and Type Method and Description
      abstract boolean Trees.isAccessible(Scope scope, Element member, DeclaredType type)
      Checks whether the given element is accessible as a member of the given type in a given scope.
      abstract boolean Trees.isAccessible(Scope scope, TypeElement type)
      Checks whether a given type is accessible in a given scope.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.StatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.StatementTree

  • Packages that use StatementTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).

    • Uses of StatementTree in com.sun.source.tree

      Subinterfaces of StatementTree in com.sun.source.tree
      Modifier and Type Interface and Description
      interface  AssertTree
      A tree node for an 'assert' statement.
      interface  BlockTree
      A tree node for a statement block.
      interface  BreakTree
      A tree node for a 'break' statement.
      interface  ClassTree
      A tree node for a class, interface, enum, or annotation type declaration.
      interface  ContinueTree
      A tree node for a 'continue' statement.
      interface  DoWhileLoopTree
      A tree node for a 'do' statement.
      interface  EmptyStatementTree
      A tree node for an empty (skip) statement.
      interface  EnhancedForLoopTree
      A tree node for an "enhanced" 'for' loop statement.
      interface  ExpressionStatementTree
      A tree node for an expression statement.
      interface  ForLoopTree
      A tree node for a basic 'for' loop statement.
      interface  IfTree
      A tree node for an 'if' statement.
      interface  LabeledStatementTree
      A tree node for a labeled statement.
      interface  ReturnTree
      A tree node for a 'return' statement.
      interface  SwitchTree
      A tree node for a 'switch' statement.
      interface  SynchronizedTree
      A tree node for a 'synchronized' statement.
      interface  ThrowTree
      A tree node for a 'throw' statement.
      interface  TryTree
      A tree node for a 'try' statement.
      interface  VariableTree
      A tree node for a variable declaration.
      interface  WhileLoopTree
      A tree node for a 'while' loop statement.
      Methods in com.sun.source.tree that return StatementTree
      Modifier and Type | Method and Description
      StatementTree | IfTree.getElseStatement()
      StatementTree | EnhancedForLoopTree.getStatement()
      StatementTree | WhileLoopTree.getStatement()
      StatementTree | LabeledStatementTree.getStatement()
      StatementTree | ForLoopTree.getStatement()
      StatementTree | DoWhileLoopTree.getStatement()
      StatementTree | IfTree.getThenStatement()
      Methods in com.sun.source.tree that return types with arguments of type StatementTree
      Modifier and Type | Method and Description
      List<? extends StatementTree> | ForLoopTree.getInitializer()
      List<? extends StatementTree> | CaseTree.getStatements()
      List<? extends StatementTree> | BlockTree.getStatements()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.SwitchTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.SwitchTree

  • Packages that use SwitchTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SwitchTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type SwitchTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitSwitch(SwitchTree node, P p)

    • Uses of SwitchTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SwitchTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitSwitch(SwitchTree node, P p)
      R | SimpleTreeVisitor.visitSwitch(SwitchTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.SynchronizedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.SynchronizedTree

  • Packages that use SynchronizedTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SynchronizedTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type SynchronizedTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitSynchronized(SynchronizedTree node, P p)

    • Uses of SynchronizedTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type SynchronizedTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitSynchronized(SynchronizedTree node, P p)
      R | SimpleTreeVisitor.visitSynchronized(SynchronizedTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.ThrowTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.ThrowTree

  • Packages that use ThrowTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of ThrowTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type ThrowTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitThrow(ThrowTree node, P p)

    • Uses of ThrowTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type ThrowTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitThrow(ThrowTree node, P p)
      R | SimpleTreeVisitor.visitThrow(ThrowTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.Tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.Tree

  • Packages that use Tree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of Tree in com.sun.source.tree

      Subinterfaces of Tree in com.sun.source.tree
      Modifier and Type Interface and Description
      interface  AnnotatedTypeTree
      A tree node for an annotated type For example:
      interface  AnnotationTree
      A tree node for an annotation.
      interface  ArrayAccessTree
      A tree node for an array access expression.
      interface  ArrayTypeTree
      A tree node for an array type.
      interface  AssertTree
      A tree node for an 'assert' statement.
      interface  AssignmentTree
      A tree node for an assignment expression.
      interface  BinaryTree
      A tree node for a binary expression.
      interface  BlockTree
      A tree node for a statement block.
      interface  BreakTree
      A tree node for a 'break' statement.
      interface  CaseTree
      A tree node for a 'case' in a 'switch' statement.
      interface  CatchTree
      A tree node for a 'catch' block in a 'try' statement.
      interface  ClassTree
      A tree node for a class, interface, enum, or annotation type declaration.
      interface  CompilationUnitTree
      Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
      interface  CompoundAssignmentTree
      A tree node for compound assignment operator.
      interface  ConditionalExpressionTree
      A tree node for the conditional operator ? :.
      interface  ContinueTree
      A tree node for a 'continue' statement.
      interface  DoWhileLoopTree
      A tree node for a 'do' statement.
      interface  EmptyStatementTree
      A tree node for an empty (skip) statement.
      interface  EnhancedForLoopTree
      A tree node for an "enhanced" 'for' loop statement.
      interface  ErroneousTree
      A tree node to stand in for a malformed expression.
      interface  ExpressionStatementTree
      A tree node for an expression statement.
      interface  ExpressionTree
      A tree node used as the base class for the different types of expressions.
      interface  ForLoopTree
      A tree node for a basic 'for' loop statement.
      interface  IdentifierTree
      A tree node for an identifier expression.
      interface  IfTree
      A tree node for an 'if' statement.
      interface  ImportTree
      A tree node for an import statement.
      interface  InstanceOfTree
      A tree node for an 'instanceof' expression.
      interface  IntersectionTypeTree
      A tree node for an intersection type in a cast expression.
      interface  LabeledStatementTree
      A tree node for a labeled statement.
      interface  LambdaExpressionTree
      A tree node for a lambda expression.
      interface  LiteralTree
      A tree node for a literal expression.
      interface  MemberReferenceTree
      A tree node for a member reference expression.
      interface  MemberSelectTree
      A tree node for a member access expression.
      interface  MethodInvocationTree
      A tree node for a method invocation expression.
      interface  MethodTree
      A tree node for a method or annotation type element declaration.
      interface  ModifiersTree
      A tree node for the modifiers, including annotations, for a declaration.
      interface  NewArrayTree
      A tree node for an expression to create a new instance of an array.
      interface  NewClassTree
      A tree node to declare a new instance of a class.
      interface  ParameterizedTypeTree
      A tree node for a type expression involving type parameters.
      interface  ParenthesizedTree
      A tree node for a parenthesized expression.
      interface  PrimitiveTypeTree
      A tree node for a primitive type.
      interface  ReturnTree
      A tree node for a 'return' statement.
      interface  StatementTree
      A tree node used as the base class for the different kinds of statements.
      interface  SwitchTree
      A tree node for a 'switch' statement.
      interface  SynchronizedTree
      A tree node for a 'synchronized' statement.
      interface  ThrowTree
      A tree node for a 'throw' statement.
      interface  TryTree
      A tree node for a 'try' statement.
      interface  TypeCastTree
      A tree node for a type cast expression.
      interface  TypeParameterTree
      A tree node for a type parameter.
      interface  UnaryTree
      A tree node for postfix and unary expressions.
      interface  UnionTypeTree
      A tree node for a union type expression in a multicatch var declaration.
      interface  VariableTree
      A tree node for a variable declaration.
      interface  WhileLoopTree
      A tree node for a 'while' loop statement.
      interface  WildcardTree
      A tree node for a wildcard type argument.
      Methods in com.sun.source.tree that return Tree
      Modifier and Type | Method and Description
      Tree | AnnotationTree.getAnnotationType()
      Tree | LambdaExpressionTree.getBody()
      Tree | WildcardTree.getBound()
      Tree | MethodTree.getDefaultValue()
      Tree | ClassTree.getExtendsClause()
      Tree | ImportTree.getQualifiedIdentifier()
      Tree | MethodTree.getReturnType()
      Tree | ParameterizedTypeTree.getType()
      Tree | TypeCastTree.getType()
      Tree | InstanceOfTree.getType()
      Tree | VariableTree.getType()
      Tree | ArrayTypeTree.getType()
      Tree | NewArrayTree.getType()
      Methods in com.sun.source.tree that return types with arguments of type Tree
      Modifier and Type | Method and Description
      Class<? extends Tree> | Tree.Kind.asInterface()
      List<? extends Tree> | TypeParameterTree.getBounds()
      List<? extends Tree> | IntersectionTypeTree.getBounds()
      List<? extends Tree> | ErroneousTree.getErrorTrees()
      List<? extends Tree> | ClassTree.getImplementsClause()
      List<? extends Tree> | ClassTree.getMembers()
      List<? extends Tree> | TryTree.getResources()
      List<? extends Tree> | UnionTypeTree.getTypeAlternatives()
      List<? extends Tree> | ParameterizedTypeTree.getTypeArguments()
      List<? extends Tree> | NewClassTree.getTypeArguments()
      List<? extends Tree> | MethodInvocationTree.getTypeArguments()
      List<? extends Tree> | CompilationUnitTree.getTypeDecls()
      Methods in com.sun.source.tree with parameters of type Tree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitOther(Tree node, P p)

    • Uses of Tree in com.sun.source.util

      Methods in com.sun.source.util that return Tree
      Modifier and Type Method and Description
      Tree TreePath.getLeaf()
      Get the leaf node for this path.
      abstract Tree Trees.getTree(Element element)
      Gets the Tree node for a given Element.
      abstract Tree Trees.getTree(Element e, AnnotationMirror a)
      Gets the Tree node for an AnnotationMirror on a given Element.
      abstract Tree Trees.getTree(Element e, AnnotationMirror a, AnnotationValue v)
      Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element.
      Methods in com.sun.source.util that return types with arguments of type Tree
      Modifier and Type Method and Description
      Iterator<Tree> TreePath.iterator()
      Iterates from leaves to root.
      Methods in com.sun.source.util with parameters of type Tree
      Modifier and Type | Method and Description
      protected R | SimpleTreeVisitor.defaultAction(Tree node, P p)
      long SourcePositions.getEndPosition(CompilationUnitTree file, Tree tree)
      Gets the ending position of tree within file.
      abstract TreePath Trees.getPath(CompilationUnitTree unit, Tree node)
      Gets the path to tree node within the specified compilation unit.
      static TreePath TreePath.getPath(CompilationUnitTree unit, Tree target)
      Gets a tree path for a tree node within a compilation unit.
      static TreePath TreePath.getPath(TreePath path, Tree target)
      Gets a tree path for a tree node within a subtree identified by a TreePath object.
      long SourcePositions.getStartPosition(CompilationUnitTree file, Tree tree)
      Gets the starting position of tree within file.
      abstract void Trees.printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit
      R TreeScanner.scan(Tree node, P p)
      Scan a single node.
      R TreePathScanner.scan(Tree tree, P p)
      Scan a single node.
      R | SimpleTreeVisitor.visit(Tree node, P p)
      R | TreeScanner.visitOther(Tree node, P p)
      R | SimpleTreeVisitor.visitOther(Tree node, P p)
      Method parameters in com.sun.source.util with type arguments of type Tree
      Modifier and Type | Method and Description
      abstract TypeMirror JavacTask.getTypeMirror(Iterable<? extends Tree> path)
      Get a type mirror of the tree node determined by the specified path.
      R TreeScanner.scan(Iterable<? extends Tree> nodes, P p)
      Scan a list of nodes.
      R | SimpleTreeVisitor.visit(Iterable<? extends Tree> nodes, P p)
      Constructors in com.sun.source.util with parameters of type Tree
      Constructor and Description
      TreePath(TreePath p, Tree t)
      Creates a TreePath for a child node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.TreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.TreeVisitor

  • Packages that use TreeVisitor
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TreeVisitor in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type TreeVisitor
      Modifier and Type Method and Description
      <R,D> R Tree.accept(TreeVisitor<R,D> visitor, D data)
      Accept method used to implement the visitor pattern.

    • Uses of TreeVisitor in com.sun.source.util

      Classes in com.sun.source.util that implement TreeVisitor
      Modifier and Type Class and Description
      class  SimpleTreeVisitor<R,P>
      A simple visitor for tree nodes.
      class  TreePathScanner<R,P>
      A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
      class  TreeScanner<R,P>
      A TreeVisitor that visits all the child tree nodes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.TryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.TryTree

  • Packages that use TryTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TryTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type TryTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitTry(TryTree node, P p)

    • Uses of TryTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TryTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitTry(TryTree node, P p)
      R | SimpleTreeVisitor.visitTry(TryTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.TypeCastTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.TypeCastTree

  • Packages that use TypeCastTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TypeCastTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type TypeCastTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitTypeCast(TypeCastTree node, P p)

    • Uses of TypeCastTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TypeCastTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitTypeCast(TypeCastTree node, P p)
      R | SimpleTreeVisitor.visitTypeCast(TypeCastTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.TypeParameterTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.TypeParameterTree

  • Packages that use TypeParameterTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TypeParameterTree in com.sun.source.tree

      Methods in com.sun.source.tree that return types with arguments of type TypeParameterTree
      Modifier and Type | Method and Description
      List<? extends TypeParameterTree> | MethodTree.getTypeParameters()
      List<? extends TypeParameterTree> | ClassTree.getTypeParameters()
      Methods in com.sun.source.tree with parameters of type TypeParameterTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitTypeParameter(TypeParameterTree node, P p)

    • Uses of TypeParameterTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TypeParameterTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitTypeParameter(TypeParameterTree node, P p)
      R | SimpleTreeVisitor.visitTypeParameter(TypeParameterTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.UnaryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.UnaryTree

  • Packages that use UnaryTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of UnaryTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type UnaryTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitUnary(UnaryTree node, P p)

    • Uses of UnaryTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type UnaryTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitUnary(UnaryTree node, P p)
      R | SimpleTreeVisitor.visitUnary(UnaryTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.UnionTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.UnionTypeTree

  • Packages that use UnionTypeTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of UnionTypeTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type UnionTypeTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitUnionType(UnionTypeTree node, P p)

    • Uses of UnionTypeTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type UnionTypeTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitUnionType(UnionTypeTree node, P p)
      R | SimpleTreeVisitor.visitUnionType(UnionTypeTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.VariableTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.VariableTree

  • Packages that use VariableTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of VariableTree in com.sun.source.tree

      Methods in com.sun.source.tree that return VariableTree
      Modifier and Type | Method and Description
      VariableTree | CatchTree.getParameter()
      VariableTree MethodTree.getReceiverParameter()
      Return an explicit receiver parameter ("this" parameter).
      VariableTree | EnhancedForLoopTree.getVariable()
      Methods in com.sun.source.tree that return types with arguments of type VariableTree
      Modifier and Type | Method and Description
      List<? extends VariableTree> | LambdaExpressionTree.getParameters()
      List<? extends VariableTree> | MethodTree.getParameters()
      Methods in com.sun.source.tree with parameters of type VariableTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitVariable(VariableTree node, P p)

    • Uses of VariableTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type VariableTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitVariable(VariableTree node, P p)
      R | SimpleTreeVisitor.visitVariable(VariableTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.WhileLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.WhileLoopTree

  • Packages that use WhileLoopTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of WhileLoopTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type WhileLoopTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitWhileLoop(WhileLoopTree node, P p)

    • Uses of WhileLoopTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type WhileLoopTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitWhileLoop(WhileLoopTree node, P p)
      R | SimpleTreeVisitor.visitWhileLoop(WhileLoopTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.tree.WildcardTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.tree.WildcardTree

  • Packages that use WildcardTree
    Package Description
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of WildcardTree in com.sun.source.tree

      Methods in com.sun.source.tree with parameters of type WildcardTree
      Modifier and Type | Method and Description
      R | TreeVisitor.visitWildcard(WildcardTree node, P p)

    • Uses of WildcardTree in com.sun.source.util

      Methods in com.sun.source.util with parameters of type WildcardTree
      Modifier and Type | Method and Description
      R | TreeScanner.visitWildcard(WildcardTree node, P p)
      R | SimpleTreeVisitor.visitWildcard(WildcardTree node, P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ClassTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ClassTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ClassTree
extends StatementTree
    A tree node for a class, interface, enum, or annotation type declaration. For example:
       modifiers class simpleName typeParameters
       extends extendsClause
       implements implementsClause
   {
       members
   }
    Since:
    1.6
    See The Java™ Language Specification:
    sections 8.1, 8.9, 9.1, and 9.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Tree getExtendsClause()
      List<? extends Tree> | getImplementsClause()
      List<? extends Tree> | getMembers()
      ModifiersTree getModifiers()
      Name getSimpleName()
      List<? extends TypeParameterTree> | getTypeParameters()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getModifiers

        ModifiersTree getModifiers()

      • getSimpleName

        Name getSimpleName()

      • getTypeParameters

        List<? extends TypeParameterTree> getTypeParameters()

      • getExtendsClause

        Tree getExtendsClause()

      • getImplementsClause

        List<? extends Tree> getImplementsClause()

      • getMembers

        List<? extends Tree> getMembers()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


CompilationUnitTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface CompilationUnitTree

  • All Superinterfaces:
    Tree

    @Exported
public interface CompilationUnitTree
extends Tree
    Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
    Since:
    1.6
    See The Java™ Language Specification:
    sections 7.3, and 7.4

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends ImportTree> | getImports()
      LineMap getLineMap()
      Gets the line map for this compilation unit, if available.
      List<? extends AnnotationTree> | getPackageAnnotations()
      ExpressionTree getPackageName()
      JavaFileObject getSourceFile()
      List<? extends Tree> | getTypeDecls()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getPackageAnnotations

        List<? extends AnnotationTree> getPackageAnnotations()

      • getPackageName

        ExpressionTree getPackageName()

      • getImports

        List<? extends ImportTree> getImports()

      • getTypeDecls

        List<? extends Tree> getTypeDecls()

      • getSourceFile

        JavaFileObject getSourceFile()

      • getLineMap

        LineMap getLineMap()
        Gets the line map for this compilation unit, if available. Returns null if the line map is not available.
        Returns:
        the line map for this compilation unit
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


CompoundAssignmentTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface CompoundAssignmentTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface CompoundAssignmentTree
extends ExpressionTree
    A tree node for compound assignment operator. Use getKind to determine the kind of operator. For example:
       variable operator expression
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.26.2

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      ExpressionTree getVariable()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getVariable

        ExpressionTree getVariable()

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ConditionalExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ConditionalExpressionTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface ConditionalExpressionTree
extends ExpressionTree
    A tree node for the conditional operator ? :. For example:
       condition ? trueExpression : falseExpression
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.25

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getCondition()
      ExpressionTree getFalseExpression()
      ExpressionTree getTrueExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getCondition

        ExpressionTree getCondition()

      • getTrueExpression

        ExpressionTree getTrueExpression()

      • getFalseExpression

        ExpressionTree getFalseExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ContinueTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ContinueTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ContinueTree
extends StatementTree
    A tree node for a 'continue' statement. For example:
       continue;
   continue label ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.16

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getLabel()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getLabel

        Name getLabel()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DoWhileLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface DoWhileLoopTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface DoWhileLoopTree
extends StatementTree
    A tree node for a 'do' statement. For example:
       do
       statement
   while ( expression );
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.13

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getCondition()
      StatementTree getStatement()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getCondition

        ExpressionTree getCondition()

      • getStatement

        StatementTree getStatement()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


EnhancedForLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface EnhancedForLoopTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface EnhancedForLoopTree
extends StatementTree
    A tree node for an "enhanced" 'for' loop statement. For example:
       for ( variable : expression )
       statement
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.14.2

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      StatementTree getStatement()
      VariableTree getVariable()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getVariable

        VariableTree getVariable()

      • getExpression

        ExpressionTree getExpression()

      • getStatement

        StatementTree getStatement()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ErroneousTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ErroneousTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface ErroneousTree
extends ExpressionTree
    A tree node to stand in for a malformed expression.
    Since:
    1.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends Tree> | getErrorTrees()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getErrorTrees

        List<? extends Tree> getErrorTrees()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ExpressionStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ExpressionStatementTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ExpressionStatementTree
extends StatementTree
    A tree node for an expression statement. For example:
       expression ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ForLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ForLoopTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ForLoopTree
extends StatementTree
    A tree node for a basic 'for' loop statement. For example:
       for ( initializer ; condition ; update )
       statement
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.14.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      ExpressionTree getCondition()
      List<? extends StatementTree> | getInitializer()
      StatementTree getStatement()
      List<? extends ExpressionStatementTree> | getUpdate()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getInitializer

        List<? extends StatementTree> getInitializer()

      • getCondition

        ExpressionTree getCondition()

      • getUpdate

        List<? extends ExpressionStatementTree> getUpdate()

      • getStatement

        StatementTree getStatement()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


IdentifierTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface IdentifierTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface IdentifierTree
extends ExpressionTree
    A tree node for an identifier expression. For example:
       name
    Since:
    1.6
    See The Java™ Language Specification:
    section 6.5.6.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getName()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getName

        Name getName()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


IfTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface IfTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface IfTree
extends StatementTree
    A tree node for an 'if' statement. For example:
       if ( condition )
      thenStatement

   if ( condition )
       thenStatement
   else
       elseStatement
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.9

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getCondition()
      StatementTree getElseStatement()
      StatementTree getThenStatement()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getCondition

        ExpressionTree getCondition()

      • getThenStatement

        StatementTree getThenStatement()

      • getElseStatement

        StatementTree getElseStatement()
        Returns:
        null if this if statement has no else branch.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ImportTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ImportTree

  • All Superinterfaces:
    Tree

    @Exported
public interface ImportTree
extends Tree
    A tree node for an import statement. For example:
       import qualifiedIdentifier ;

   static import qualifiedIdentifier ;
    Since:
    1.6
    See The Java™ Language Specification:
    section 7.5

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Tree getQualifiedIdentifier()
      boolean | isStatic()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • isStatic

        boolean isStatic()

      • getQualifiedIdentifier

        Tree getQualifiedIdentifier()
        Returns:
        a qualified identifier ending in "*" if and only if this is an import-on-demand.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


InstanceOfTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface InstanceOfTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface InstanceOfTree
extends ExpressionTree
    A tree node for an 'instanceof' expression. For example:
       expression instanceof type
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.20.2

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      Tree getType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()

      • getType

        Tree getType()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


IntersectionTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface IntersectionTypeTree

  • All Superinterfaces:
    Tree

    @Exported
public interface IntersectionTypeTree
extends Tree
    A tree node for an intersection type in a cast expression.
    Since:
    1.8

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends Tree> | getBounds()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getBounds

        List<? extends Tree> getBounds()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LabeledStatementTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface LabeledStatementTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface LabeledStatementTree
extends StatementTree
    A tree node for a labeled statement. For example:
       label : statement
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.7

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Name getLabel()
      StatementTree getStatement()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getLabel

        Name getLabel()

      • getStatement

        StatementTree getStatement()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LambdaExpressionTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface LambdaExpressionTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface LambdaExpressionTree
extends ExpressionTree
    A tree node for a lambda expression. For example:

   ()->{}
   (List<String> ls)->ls.size()
   (x,y)-> { return x + y; }

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  LambdaExpressionTree.BodyKind
      Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Tree getBody()
      LambdaExpressionTree.BodyKind getBodyKind()
      List<? extends VariableTree> | getParameters()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getParameters

        List<? extends VariableTree> getParameters()

      • getBody

        Tree getBody()

      • getBodyKind

        LambdaExpressionTree.BodyKind getBodyKind()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LambdaExpressionTree.BodyKind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.tree

Enum LambdaExpressionTree.BodyKind

  • java.lang.Object
    • java.lang.Enum<LambdaExpressionTree.BodyKind>
      • com.sun.source.tree.LambdaExpressionTree.BodyKind
  • All Implemented Interfaces:
    Serializable, Comparable<LambdaExpressionTree.BodyKind>
    Enclosing interface:
    LambdaExpressionTree

    @Exported
public static enum LambdaExpressionTree.BodyKind
extends Enum<LambdaExpressionTree.BodyKind>
    Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      EXPRESSION
      enum constant for expression lambdas
      STATEMENT
      enum constant for statement lambdas

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static LambdaExpressionTree.BodyKind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static LambdaExpressionTree.BodyKind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • EXPRESSION

        public static final LambdaExpressionTree.BodyKind EXPRESSION
        enum constant for expression lambdas

      • STATEMENT

        public static final LambdaExpressionTree.BodyKind STATEMENT
        enum constant for statement lambdas

    • Method Detail

      • values

        public static LambdaExpressionTree.BodyKind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LambdaExpressionTree.BodyKind c : LambdaExpressionTree.BodyKind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static LambdaExpressionTree.BodyKind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LineMap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface LineMap

  • @Exported
public interface LineMap
    Provides methods to convert between character positions and line numbers for a compilation unit.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      long getColumnNumber(long pos)
      Find the column for a character position.
      long getLineNumber(long pos)
      Find the line containing a position; a line termination character is on the line it terminates.
      long getPosition(long line, long column)
      Find the position corresponding to a (line,column).
      long getStartPosition(long line)
      Find the start position of a line.

    • Method Detail

      • getStartPosition

        long getStartPosition(long line)
        Find the start position of a line.
        Parameters:
        line - line number (beginning at 1)
        Returns:
        position of first character in line
        Throws:
        IndexOutOfBoundsException - if lineNumber < 1 if lineNumber > no. of lines

      • getPosition

        long getPosition(long line,
                 long column)
        Find the position corresponding to a (line,column).
        Parameters:
        line - line number (beginning at 1)
        column - tab-expanded column number (beginning 1)
        Returns:
        position of character
        Throws:
        IndexOutOfBoundsException - if line < 1 if line > no. of lines

      • getLineNumber

        long getLineNumber(long pos)
        Find the line containing a position; a line termination character is on the line it terminates.
        Parameters:
        pos - character offset of the position
        Returns:
        the line number of pos (first line is 1)

      • getColumnNumber

        long getColumnNumber(long pos)
        Find the column for a character position. Tab characters preceding the position on the same line will be expanded when calculating the column number.
        Parameters:
        pos - character offset of the position
        Returns:
        the tab-expanded column number of pos (first column is 1)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


LiteralTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface LiteralTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface LiteralTree
extends ExpressionTree
    A tree node for a literal expression. Use getKind to determine the kind of literal. For example:
       value
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.28

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object getValue()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getValue

        Object getValue()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


MemberReferenceTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface MemberReferenceTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface MemberReferenceTree
extends ExpressionTree
    A tree node for a member reference expression. For example:
       expression # [ identifier | new ]
    Since:
    1.8

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  MemberReferenceTree.ReferenceMode
      There are two kinds of member references: (i) method references and (ii) constructor references

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      MemberReferenceTree.ReferenceMode getMode()
      Name getName()
      ExpressionTree getQualifierExpression()
      List<? extends ExpressionTree> | getTypeArguments()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getMode

        MemberReferenceTree.ReferenceMode getMode()

      • getQualifierExpression

        ExpressionTree getQualifierExpression()

      • getName

        Name getName()

      • getTypeArguments

        List<? extends ExpressionTree> getTypeArguments()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


MemberReferenceTree.ReferenceMode

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.tree

Enum MemberReferenceTree.ReferenceMode

  • java.lang.Object
    • java.lang.Enum<MemberReferenceTree.ReferenceMode>
      • com.sun.source.tree.MemberReferenceTree.ReferenceMode
  • All Implemented Interfaces:
    Serializable, Comparable<MemberReferenceTree.ReferenceMode>
    Enclosing interface:
    MemberReferenceTree

    @Exported
public static enum MemberReferenceTree.ReferenceMode
extends Enum<MemberReferenceTree.ReferenceMode>
    There are two kinds of member references: (i) method references and (ii) constructor references

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      INVOKE
      enum constant for method references
      NEW
      enum constant for constructor references

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static MemberReferenceTree.ReferenceMode valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static MemberReferenceTree.ReferenceMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • INVOKE

        public static final MemberReferenceTree.ReferenceMode INVOKE
        enum constant for method references

      • NEW

        public static final MemberReferenceTree.ReferenceMode NEW
        enum constant for constructor references

    • Method Detail

      • values

        public static MemberReferenceTree.ReferenceMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MemberReferenceTree.ReferenceMode c : MemberReferenceTree.ReferenceMode.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static MemberReferenceTree.ReferenceMode valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


MemberSelectTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface MemberSelectTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface MemberSelectTree
extends ExpressionTree
    A tree node for a member access expression. For example:
       expression . identifier
    Since:
    1.6
    See The Java™ Language Specification:
    sections 6.5, 15.11,and 15.12

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      Name getIdentifier()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()

      • getIdentifier

        Name getIdentifier()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


MethodInvocationTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface MethodInvocationTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface MethodInvocationTree
extends ExpressionTree
    A tree node for a method invocation expression. For example:
       identifier ( arguments )

   this . typeArguments identifier ( arguments )
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.12

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends ExpressionTree> | getArguments()
      ExpressionTree getMethodSelect()
      List<? extends Tree> | getTypeArguments()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getTypeArguments

        List<? extends Tree> getTypeArguments()

      • getMethodSelect

        ExpressionTree getMethodSelect()

      • getArguments

        List<? extends ExpressionTree> getArguments()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


MethodTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface MethodTree

  • All Superinterfaces:
    Tree

    @Exported
public interface MethodTree
extends Tree
    A tree node for a method or annotation type element declaration. For example:
       modifiers typeParameters type name
      ( parameters )
      body

   modifiers type name () default defaultValue
    Since:
    1.6
    See The Java™ Language Specification:
    sections 8.4, 8.6, 8.7, 9.4, and 9.6

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      BlockTree getBody()
      Tree getDefaultValue()
      ModifiersTree getModifiers()
      Name getName()
      List<? extends VariableTree> | getParameters()
      VariableTree getReceiverParameter()
      Return an explicit receiver parameter ("this" parameter).
      Tree getReturnType()
      List<? extends ExpressionTree> | getThrows()
      List<? extends TypeParameterTree> | getTypeParameters()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getModifiers

        ModifiersTree getModifiers()

      • getName

        Name getName()

      • getReturnType

        Tree getReturnType()

      • getTypeParameters

        List<? extends TypeParameterTree> getTypeParameters()

      • getParameters

        List<? extends VariableTree> getParameters()

      • getReceiverParameter

        VariableTree getReceiverParameter()
        Return an explicit receiver parameter ("this" parameter).
        Returns:
        an explicit receiver parameter ("this" parameter)
        Since:
        1.8

      • getThrows

        List<? extends ExpressionTree> getThrows()

      • getBody

        BlockTree getBody()

      • getDefaultValue

        Tree getDefaultValue()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ModifiersTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ModifiersTree

  • All Superinterfaces:
    Tree

    @Exported
public interface ModifiersTree
extends Tree
    A tree node for the modifiers, including annotations, for a declaration. For example:
       flags

   flags annotations
    Since:
    1.6
    See The Java™ Language Specification:
    sections 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends AnnotationTree> | getAnnotations()
      Set<Modifier> getFlags()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getFlags

        Set<Modifier> getFlags()

      • getAnnotations

        List<? extends AnnotationTree> getAnnotations()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


NewArrayTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface NewArrayTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface NewArrayTree
extends ExpressionTree
    A tree node for an expression to create a new instance of an array. For example:
       new type dimensions initializers

   new type dimensions [ ] initializers
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.10

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends AnnotationTree> | getAnnotations()
      List<? extends List<? extends AnnotationTree>> | getDimAnnotations()
      List<? extends ExpressionTree> | getDimensions()
      List<? extends ExpressionTree> | getInitializers()
      Tree getType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getType

        Tree getType()

      • getDimensions

        List<? extends ExpressionTree> getDimensions()

      • getInitializers

        List<? extends ExpressionTree> getInitializers()

      • getAnnotations

        List<? extends AnnotationTree> getAnnotations()

      • getDimAnnotations

        List<? extends List<? extends AnnotationTree>> getDimAnnotations()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


NewClassTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface NewClassTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface NewClassTree
extends ExpressionTree
    A tree node to declare a new instance of a class. For example:
       new identifier ( )

   new identifier ( arguments )

   new typeArguments identifier ( arguments )
       classBody

   enclosingExpression.new identifier ( arguments )
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.9

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends ExpressionTree> | getArguments()
      ClassTree getClassBody()
      ExpressionTree getEnclosingExpression()
      ExpressionTree getIdentifier()
      List<? extends Tree> | getTypeArguments()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getEnclosingExpression

        ExpressionTree getEnclosingExpression()

      • getTypeArguments

        List<? extends Tree> getTypeArguments()

      • getIdentifier

        ExpressionTree getIdentifier()

      • getArguments

        List<? extends ExpressionTree> getArguments()

      • getClassBody

        ClassTree getClassBody()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ParameterizedTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ParameterizedTypeTree

  • All Superinterfaces:
    Tree

    @Exported
public interface ParameterizedTypeTree
extends Tree
    A tree node for a type expression involving type parameters. For example:
       type < typeArguments >
    Since:
    1.6
    See The Java™ Language Specification:
    section 4.5.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      Tree getType()
      List<? extends Tree> | getTypeArguments()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getType

        Tree getType()

      • getTypeArguments

        List<? extends Tree> getTypeArguments()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ParenthesizedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ParenthesizedTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface ParenthesizedTree
extends ExpressionTree
    A tree node for a parenthesized expression. Note: parentheses not be preserved by the parser. For example:
       ( expression )
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.8.5

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


PrimitiveTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface PrimitiveTypeTree

  • All Superinterfaces:
    Tree

    @Exported
public interface PrimitiveTypeTree
extends Tree
    A tree node for a primitive type. For example:
       primitiveTypeKind
    Since:
    1.6
    See The Java™ Language Specification:
    section 4.2

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TypeKind getPrimitiveTypeKind()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getPrimitiveTypeKind

        TypeKind getPrimitiveTypeKind()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ReturnTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ReturnTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ReturnTree
extends StatementTree
    A tree node for a 'return' statement. For example:
       return;
   return expression;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.17

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Scope

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface Scope

  • @Exported
public interface Scope
    Interface for determining locally available program elements, such as local variables and imports. Upon creation, a Scope is associated with a given program position; for example, a tree node. This position may be used to infer an enclosing method and/or class.

    A Scope does not itself contain the details of the elements corresponding to the parameters, methods and fields of the methods and classes containing its position. However, these elements can be determined from the enclosing elements.

    Scopes may be contained in an enclosing scope. The outermost scope contains those elements available via "star import" declarations; the scope within that contains the top level elements of the compilation unit, including any named imports.

    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      TypeElement getEnclosingClass()
      Returns the innermost type element containing the position of this scope
      ExecutableElement getEnclosingMethod()
      Returns the innermost executable element containing the position of this scope.
      Scope getEnclosingScope()
      Returns the enclosing scope.
      Iterable<? extends Element> getLocalElements()
      Returns the elements directly contained in this scope.

    • Method Detail

      • getEnclosingScope

        Scope getEnclosingScope()
        Returns the enclosing scope.

      • getEnclosingClass

        TypeElement getEnclosingClass()
        Returns the innermost type element containing the position of this scope

      • getEnclosingMethod

        ExecutableElement getEnclosingMethod()
        Returns the innermost executable element containing the position of this scope.

      • getLocalElements

        Iterable<? extends Element> getLocalElements()
        Returns the elements directly contained in this scope.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SwitchTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface SwitchTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface SwitchTree
extends StatementTree
    A tree node for a 'switch' statement. For example:
       switch ( expression ) {
     cases
   }
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.11

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends CaseTree> | getCases()
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()

      • getCases

        List<? extends CaseTree> getCases()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SynchronizedTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface SynchronizedTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface SynchronizedTree
extends StatementTree
    A tree node for a 'synchronized' statement. For example:
       synchronized ( expression )
       block
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.19

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      BlockTree getBlock()
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()

      • getBlock

        BlockTree getBlock()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


ThrowTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface ThrowTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface ThrowTree
extends StatementTree
    A tree node for a 'throw' statement. For example:
       throw expression;
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.18

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Tree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface Tree

  • All Known Subinterfaces:
    AnnotatedTypeTree, AnnotationTree, ArrayAccessTree, ArrayTypeTree, AssertTree, AssignmentTree, BinaryTree, BlockTree, BreakTree, CaseTree, CatchTree, ClassTree, CompilationUnitTree, CompoundAssignmentTree, ConditionalExpressionTree, ContinueTree, DoWhileLoopTree, EmptyStatementTree, EnhancedForLoopTree, ErroneousTree, ExpressionStatementTree, ExpressionTree, ForLoopTree, IdentifierTree, IfTree, ImportTree, InstanceOfTree, IntersectionTypeTree, LabeledStatementTree, LambdaExpressionTree, LiteralTree, MemberReferenceTree, MemberSelectTree, MethodInvocationTree, MethodTree, ModifiersTree, NewArrayTree, NewClassTree, ParameterizedTypeTree, ParenthesizedTree, PrimitiveTypeTree, ReturnTree, StatementTree, SwitchTree, SynchronizedTree, ThrowTree, TryTree, TypeCastTree, TypeParameterTree, UnaryTree, UnionTypeTree, VariableTree, WhileLoopTree, WildcardTree

    @Exported
public interface Tree
    Common interface for all nodes in an abstract syntax tree.

    WARNING: This interface and its sub-interfaces are subject to change as the Java™ programming language evolves. These interfaces are implemented by the JDK Java compiler (javac) and should not be implemented either directly or indirectly by other applications.

    Since:
    1.6

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  Tree.Kind
      Enumerates all kinds of trees.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      <R,D> R accept(TreeVisitor<R,D> visitor, D data)
      Accept method used to implement the visitor pattern.
      Tree.Kind getKind()
      Gets the kind of this tree.

    • Method Detail

      • getKind

        Tree.Kind getKind()
        Gets the kind of this tree.
        Returns:
        the kind of this tree.

      • accept

        <R,D> R accept(TreeVisitor<R,D> visitor,
               D data)
        Accept method used to implement the visitor pattern. The visitor pattern is used to implement operations on trees.
        Type Parameters:
        R - result type of this operation.
        D - type of additional data.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Tree.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.tree

Enum Tree.Kind

  • java.lang.Object
    • java.lang.Enum<Tree.Kind>
      • com.sun.source.tree.Tree.Kind
  • All Implemented Interfaces:
    Serializable, Comparable<Tree.Kind>
    Enclosing interface:
    Tree

    @Exported
public static enum Tree.Kind
extends Enum<Tree.Kind>
    Enumerates all kinds of trees.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      AND
      Used for instances of BinaryTree representing bitwise and logical "and" &.
      AND_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing bitwise and logical "and" assignment &=.
      ANNOTATED_TYPE
      ANNOTATION
      Used for instances of AnnotationTree representing declaration annotations.
      ANNOTATION_TYPE
      Used for instances of ClassTree representing annotation types.
      ARRAY_ACCESS
      Used for instances of ArrayAccessTree.
      ARRAY_TYPE
      Used for instances of ArrayTypeTree.
      ASSERT
      Used for instances of AssertTree.
      ASSIGNMENT
      Used for instances of AssignmentTree.
      BITWISE_COMPLEMENT
      Used for instances of UnaryTree representing bitwise complement operator ~.
      BLOCK
      Used for instances of BlockTree.
      BOOLEAN_LITERAL
      Used for instances of LiteralTree representing a boolean literal expression of type boolean.
      BREAK
      Used for instances of BreakTree.
      CASE
      Used for instances of CaseTree.
      CATCH
      Used for instances of CatchTree.
      CHAR_LITERAL
      Used for instances of LiteralTree representing a character literal expression of type char.
      CLASS
      Used for instances of ClassTree representing classes.
      COMPILATION_UNIT
      Used for instances of CompilationUnitTree.
      CONDITIONAL_AND
      Used for instances of BinaryTree representing conditional-and &&.
      CONDITIONAL_EXPRESSION
      Used for instances of ConditionalExpressionTree.
      CONDITIONAL_OR
      Used for instances of BinaryTree representing conditional-or ||.
      CONTINUE
      Used for instances of ContinueTree.
      DIVIDE
      Used for instances of BinaryTree representing division /.
      DIVIDE_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing division assignment /=.
      DO_WHILE_LOOP
      Used for instances of DoWhileLoopTree.
      DOUBLE_LITERAL
      Used for instances of LiteralTree representing a floating-point literal expression of type double.
      EMPTY_STATEMENT
      Used for instances of EmptyStatementTree.
      ENHANCED_FOR_LOOP
      Used for instances of EnhancedForLoopTree.
      ENUM
      Used for instances of ClassTree representing enums.
      EQUAL_TO
      Used for instances of BinaryTree representing equal-to ==.
      ERRONEOUS
      Used for instances of ErroneousTree.
      EXPRESSION_STATEMENT
      Used for instances of ExpressionStatementTree.
      EXTENDS_WILDCARD
      Used for instances of WildcardTree representing an extends bounded wildcard type argument.
      FLOAT_LITERAL
      Used for instances of LiteralTree representing a floating-point literal expression of type float.
      FOR_LOOP
      Used for instances of ForLoopTree.
      GREATER_THAN
      Used for instances of BinaryTree representing greater-than >.
      GREATER_THAN_EQUAL
      Used for instances of BinaryTree representing greater-than-equal >=.
      IDENTIFIER
      Used for instances of IdentifierTree.
      IF
      Used for instances of IfTree.
      IMPORT
      Used for instances of ImportTree.
      INSTANCE_OF
      Used for instances of InstanceOfTree.
      INT_LITERAL
      Used for instances of LiteralTree representing an integral literal expression of type int.
      INTERFACE
      Used for instances of ClassTree representing interfaces.
      INTERSECTION_TYPE
      Used for instances of IntersectionTypeTree.
      LABELED_STATEMENT
      Used for instances of LabeledStatementTree.
      LAMBDA_EXPRESSION
      Used for instances of LambdaExpressionTree.
      LEFT_SHIFT
      Used for instances of BinaryTree representing left shift <<.
      LEFT_SHIFT_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing left shift assignment <<=.
      LESS_THAN
      Used for instances of BinaryTree representing less-than <.
      LESS_THAN_EQUAL
      Used for instances of BinaryTree representing less-than-equal <=.
      LOGICAL_COMPLEMENT
      Used for instances of UnaryTree representing logical complement operator !.
      LONG_LITERAL
      Used for instances of LiteralTree representing an integral literal expression of type long.
      MEMBER_REFERENCE
      Used for instances of MemberReferenceTree.
      MEMBER_SELECT
      Used for instances of MemberSelectTree.
      METHOD
      Used for instances of MethodTree.
      METHOD_INVOCATION
      Used for instances of MethodInvocationTree.
      MINUS
      Used for instances of BinaryTree representing subtraction -.
      MINUS_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing subtraction assignment -=.
      MODIFIERS
      Used for instances of ModifiersTree.
      MULTIPLY
      Used for instances of BinaryTree representing multiplication *.
      MULTIPLY_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing multiplication assignment *=.
      NEW_ARRAY
      Used for instances of NewArrayTree.
      NEW_CLASS
      Used for instances of NewClassTree.
      NOT_EQUAL_TO
      Used for instances of BinaryTree representing not-equal-to !=.
      NULL_LITERAL
      Used for instances of LiteralTree representing the use of null.
      OR
      Used for instances of BinaryTree representing bitwise and logical "or" |.
      OR_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing bitwise and logical "or" assignment |=.
      OTHER
      An implementation-reserved node.
      PARAMETERIZED_TYPE
      Used for instances of ParameterizedTypeTree.
      PARENTHESIZED
      Used for instances of ParenthesizedTree.
      PLUS
      Used for instances of BinaryTree representing addition or string concatenation +.
      PLUS_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing addition or string concatenation assignment +=.
      POSTFIX_DECREMENT
      Used for instances of UnaryTree representing postfix decrement operator --.
      POSTFIX_INCREMENT
      Used for instances of UnaryTree representing postfix increment operator ++.
      PREFIX_DECREMENT
      Used for instances of UnaryTree representing prefix decrement operator --.
      PREFIX_INCREMENT
      Used for instances of UnaryTree representing prefix increment operator ++.
      PRIMITIVE_TYPE
      Used for instances of PrimitiveTypeTree.
      REMAINDER
      Used for instances of BinaryTree representing remainder %.
      REMAINDER_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing remainder assignment %=.
      RETURN
      Used for instances of ReturnTree.
      RIGHT_SHIFT
      Used for instances of BinaryTree representing right shift >>.
      RIGHT_SHIFT_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing right shift assignment >>=.
      STRING_LITERAL
      Used for instances of LiteralTree representing a string literal expression of type String.
      SUPER_WILDCARD
      Used for instances of WildcardTree representing a super bounded wildcard type argument.
      SWITCH
      Used for instances of SwitchTree.
      SYNCHRONIZED
      Used for instances of SynchronizedTree.
      THROW
      Used for instances of ThrowTree.
      TRY
      Used for instances of TryTree.
      TYPE_ANNOTATION
      Used for instances of AnnotationTree representing type annotations.
      TYPE_CAST
      Used for instances of TypeCastTree.
      TYPE_PARAMETER
      Used for instances of TypeParameterTree.
      UNARY_MINUS
      Used for instances of UnaryTree representing unary minus operator -.
      UNARY_PLUS
      Used for instances of UnaryTree representing unary plus operator +.
      UNBOUNDED_WILDCARD
      Used for instances of WildcardTree representing an unbounded wildcard type argument.
      UNION_TYPE
      Used for instances of UnionTypeTree.
      UNSIGNED_RIGHT_SHIFT
      Used for instances of BinaryTree representing unsigned right shift >>>.
      UNSIGNED_RIGHT_SHIFT_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing unsigned right shift assignment >>>=.
      VARIABLE
      Used for instances of VariableTree.
      WHILE_LOOP
      Used for instances of WhileLoopTree.
      XOR
      Used for instances of BinaryTree representing bitwise and logical "xor" ^.
      XOR_ASSIGNMENT
      Used for instances of CompoundAssignmentTree representing bitwise and logical "xor" assignment ^=.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      Class<? extends Tree> | asInterface()
      static Tree.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static Tree.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • ANNOTATED_TYPE

        public static final Tree.Kind ANNOTATED_TYPE

      • ANNOTATION

        public static final Tree.Kind ANNOTATION
        Used for instances of AnnotationTree representing declaration annotations.

      • TYPE_ANNOTATION

        public static final Tree.Kind TYPE_ANNOTATION
        Used for instances of AnnotationTree representing type annotations.

      • ARRAY_ACCESS

        public static final Tree.Kind ARRAY_ACCESS
        Used for instances of ArrayAccessTree.

      • ARRAY_TYPE

        public static final Tree.Kind ARRAY_TYPE
        Used for instances of ArrayTypeTree.

      • ASSERT

        public static final Tree.Kind ASSERT
        Used for instances of AssertTree.

      • ASSIGNMENT

        public static final Tree.Kind ASSIGNMENT
        Used for instances of AssignmentTree.

      • BLOCK

        public static final Tree.Kind BLOCK
        Used for instances of BlockTree.

      • BREAK

        public static final Tree.Kind BREAK
        Used for instances of BreakTree.

      • CASE

        public static final Tree.Kind CASE
        Used for instances of CaseTree.

      • CATCH

        public static final Tree.Kind CATCH
        Used for instances of CatchTree.

      • CLASS

        public static final Tree.Kind CLASS
        Used for instances of ClassTree representing classes.

      • COMPILATION_UNIT

        public static final Tree.Kind COMPILATION_UNIT
        Used for instances of CompilationUnitTree.

      • CONDITIONAL_EXPRESSION

        public static final Tree.Kind CONDITIONAL_EXPRESSION
        Used for instances of ConditionalExpressionTree.

      • CONTINUE

        public static final Tree.Kind CONTINUE
        Used for instances of ContinueTree.

      • DO_WHILE_LOOP

        public static final Tree.Kind DO_WHILE_LOOP
        Used for instances of DoWhileLoopTree.

      • ENHANCED_FOR_LOOP

        public static final Tree.Kind ENHANCED_FOR_LOOP
        Used for instances of EnhancedForLoopTree.

      • EXPRESSION_STATEMENT

        public static final Tree.Kind EXPRESSION_STATEMENT
        Used for instances of ExpressionStatementTree.

      • MEMBER_SELECT

        public static final Tree.Kind MEMBER_SELECT
        Used for instances of MemberSelectTree.

      • MEMBER_REFERENCE

        public static final Tree.Kind MEMBER_REFERENCE
        Used for instances of MemberReferenceTree.

      • FOR_LOOP

        public static final Tree.Kind FOR_LOOP
        Used for instances of ForLoopTree.

      • IDENTIFIER

        public static final Tree.Kind IDENTIFIER
        Used for instances of IdentifierTree.

      • IF

        public static final Tree.Kind IF
        Used for instances of IfTree.

      • IMPORT

        public static final Tree.Kind IMPORT
        Used for instances of ImportTree.

      • INSTANCE_OF

        public static final Tree.Kind INSTANCE_OF
        Used for instances of InstanceOfTree.

      • LABELED_STATEMENT

        public static final Tree.Kind LABELED_STATEMENT
        Used for instances of LabeledStatementTree.

      • METHOD

        public static final Tree.Kind METHOD
        Used for instances of MethodTree.

      • METHOD_INVOCATION

        public static final Tree.Kind METHOD_INVOCATION
        Used for instances of MethodInvocationTree.

      • MODIFIERS

        public static final Tree.Kind MODIFIERS
        Used for instances of ModifiersTree.

      • NEW_ARRAY

        public static final Tree.Kind NEW_ARRAY
        Used for instances of NewArrayTree.

      • NEW_CLASS

        public static final Tree.Kind NEW_CLASS
        Used for instances of NewClassTree.

      • LAMBDA_EXPRESSION

        public static final Tree.Kind LAMBDA_EXPRESSION
        Used for instances of LambdaExpressionTree.

      • PARENTHESIZED

        public static final Tree.Kind PARENTHESIZED
        Used for instances of ParenthesizedTree.

      • PRIMITIVE_TYPE

        public static final Tree.Kind PRIMITIVE_TYPE
        Used for instances of PrimitiveTypeTree.

      • RETURN

        public static final Tree.Kind RETURN
        Used for instances of ReturnTree.

      • EMPTY_STATEMENT

        public static final Tree.Kind EMPTY_STATEMENT
        Used for instances of EmptyStatementTree.

      • SWITCH

        public static final Tree.Kind SWITCH
        Used for instances of SwitchTree.

      • SYNCHRONIZED

        public static final Tree.Kind SYNCHRONIZED
        Used for instances of SynchronizedTree.

      • THROW

        public static final Tree.Kind THROW
        Used for instances of ThrowTree.

      • TRY

        public static final Tree.Kind TRY
        Used for instances of TryTree.

      • PARAMETERIZED_TYPE

        public static final Tree.Kind PARAMETERIZED_TYPE
        Used for instances of ParameterizedTypeTree.

      • UNION_TYPE

        public static final Tree.Kind UNION_TYPE
        Used for instances of UnionTypeTree.

      • INTERSECTION_TYPE

        public static final Tree.Kind INTERSECTION_TYPE
        Used for instances of IntersectionTypeTree.

      • TYPE_CAST

        public static final Tree.Kind TYPE_CAST
        Used for instances of TypeCastTree.

      • TYPE_PARAMETER

        public static final Tree.Kind TYPE_PARAMETER
        Used for instances of TypeParameterTree.

      • VARIABLE

        public static final Tree.Kind VARIABLE
        Used for instances of VariableTree.

      • WHILE_LOOP

        public static final Tree.Kind WHILE_LOOP
        Used for instances of WhileLoopTree.

      • POSTFIX_INCREMENT

        public static final Tree.Kind POSTFIX_INCREMENT
        Used for instances of UnaryTree representing postfix increment operator ++.

      • POSTFIX_DECREMENT

        public static final Tree.Kind POSTFIX_DECREMENT
        Used for instances of UnaryTree representing postfix decrement operator --.

      • PREFIX_INCREMENT

        public static final Tree.Kind PREFIX_INCREMENT
        Used for instances of UnaryTree representing prefix increment operator ++.

      • PREFIX_DECREMENT

        public static final Tree.Kind PREFIX_DECREMENT
        Used for instances of UnaryTree representing prefix decrement operator --.

      • UNARY_PLUS

        public static final Tree.Kind UNARY_PLUS
        Used for instances of UnaryTree representing unary plus operator +.

      • UNARY_MINUS

        public static final Tree.Kind UNARY_MINUS
        Used for instances of UnaryTree representing unary minus operator -.

      • BITWISE_COMPLEMENT

        public static final Tree.Kind BITWISE_COMPLEMENT
        Used for instances of UnaryTree representing bitwise complement operator ~.

      • LOGICAL_COMPLEMENT

        public static final Tree.Kind LOGICAL_COMPLEMENT
        Used for instances of UnaryTree representing logical complement operator !.

      • MULTIPLY

        public static final Tree.Kind MULTIPLY
        Used for instances of BinaryTree representing multiplication *.

      • DIVIDE

        public static final Tree.Kind DIVIDE
        Used for instances of BinaryTree representing division /.

      • REMAINDER

        public static final Tree.Kind REMAINDER
        Used for instances of BinaryTree representing remainder %.

      • PLUS

        public static final Tree.Kind PLUS
        Used for instances of BinaryTree representing addition or string concatenation +.

      • MINUS

        public static final Tree.Kind MINUS
        Used for instances of BinaryTree representing subtraction -.

      • LEFT_SHIFT

        public static final Tree.Kind LEFT_SHIFT
        Used for instances of BinaryTree representing left shift <<.

      • RIGHT_SHIFT

        public static final Tree.Kind RIGHT_SHIFT
        Used for instances of BinaryTree representing right shift >>.

      • UNSIGNED_RIGHT_SHIFT

        public static final Tree.Kind UNSIGNED_RIGHT_SHIFT
        Used for instances of BinaryTree representing unsigned right shift >>>.

      • LESS_THAN

        public static final Tree.Kind LESS_THAN
        Used for instances of BinaryTree representing less-than <.

      • GREATER_THAN

        public static final Tree.Kind GREATER_THAN
        Used for instances of BinaryTree representing greater-than >.

      • LESS_THAN_EQUAL

        public static final Tree.Kind LESS_THAN_EQUAL
        Used for instances of BinaryTree representing less-than-equal <=.

      • GREATER_THAN_EQUAL

        public static final Tree.Kind GREATER_THAN_EQUAL
        Used for instances of BinaryTree representing greater-than-equal >=.

      • EQUAL_TO

        public static final Tree.Kind EQUAL_TO
        Used for instances of BinaryTree representing equal-to ==.

      • NOT_EQUAL_TO

        public static final Tree.Kind NOT_EQUAL_TO
        Used for instances of BinaryTree representing not-equal-to !=.

      • AND

        public static final Tree.Kind AND
        Used for instances of BinaryTree representing bitwise and logical "and" &.

      • XOR

        public static final Tree.Kind XOR
        Used for instances of BinaryTree representing bitwise and logical "xor" ^.

      • OR

        public static final Tree.Kind OR
        Used for instances of BinaryTree representing bitwise and logical "or" |.

      • CONDITIONAL_AND

        public static final Tree.Kind CONDITIONAL_AND
        Used for instances of BinaryTree representing conditional-and &&.

      • CONDITIONAL_OR

        public static final Tree.Kind CONDITIONAL_OR
        Used for instances of BinaryTree representing conditional-or ||.

      • MULTIPLY_ASSIGNMENT

        public static final Tree.Kind MULTIPLY_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing multiplication assignment *=.

      • DIVIDE_ASSIGNMENT

        public static final Tree.Kind DIVIDE_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing division assignment /=.

      • REMAINDER_ASSIGNMENT

        public static final Tree.Kind REMAINDER_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing remainder assignment %=.

      • PLUS_ASSIGNMENT

        public static final Tree.Kind PLUS_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing addition or string concatenation assignment +=.

      • MINUS_ASSIGNMENT

        public static final Tree.Kind MINUS_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing subtraction assignment -=.

      • LEFT_SHIFT_ASSIGNMENT

        public static final Tree.Kind LEFT_SHIFT_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing left shift assignment <<=.

      • RIGHT_SHIFT_ASSIGNMENT

        public static final Tree.Kind RIGHT_SHIFT_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing right shift assignment >>=.

      • UNSIGNED_RIGHT_SHIFT_ASSIGNMENT

        public static final Tree.Kind UNSIGNED_RIGHT_SHIFT_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing unsigned right shift assignment >>>=.

      • AND_ASSIGNMENT

        public static final Tree.Kind AND_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing bitwise and logical "and" assignment &=.

      • XOR_ASSIGNMENT

        public static final Tree.Kind XOR_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing bitwise and logical "xor" assignment ^=.

      • OR_ASSIGNMENT

        public static final Tree.Kind OR_ASSIGNMENT
        Used for instances of CompoundAssignmentTree representing bitwise and logical "or" assignment |=.

      • INT_LITERAL

        public static final Tree.Kind INT_LITERAL
        Used for instances of LiteralTree representing an integral literal expression of type int.

      • LONG_LITERAL

        public static final Tree.Kind LONG_LITERAL
        Used for instances of LiteralTree representing an integral literal expression of type long.

      • FLOAT_LITERAL

        public static final Tree.Kind FLOAT_LITERAL
        Used for instances of LiteralTree representing a floating-point literal expression of type float.

      • DOUBLE_LITERAL

        public static final Tree.Kind DOUBLE_LITERAL
        Used for instances of LiteralTree representing a floating-point literal expression of type double.

      • BOOLEAN_LITERAL

        public static final Tree.Kind BOOLEAN_LITERAL
        Used for instances of LiteralTree representing a boolean literal expression of type boolean.

      • CHAR_LITERAL

        public static final Tree.Kind CHAR_LITERAL
        Used for instances of LiteralTree representing a character literal expression of type char.

      • STRING_LITERAL

        public static final Tree.Kind STRING_LITERAL
        Used for instances of LiteralTree representing a string literal expression of type String.

      • NULL_LITERAL

        public static final Tree.Kind NULL_LITERAL
        Used for instances of LiteralTree representing the use of null.

      • UNBOUNDED_WILDCARD

        public static final Tree.Kind UNBOUNDED_WILDCARD
        Used for instances of WildcardTree representing an unbounded wildcard type argument.

      • EXTENDS_WILDCARD

        public static final Tree.Kind EXTENDS_WILDCARD
        Used for instances of WildcardTree representing an extends bounded wildcard type argument.

      • SUPER_WILDCARD

        public static final Tree.Kind SUPER_WILDCARD
        Used for instances of WildcardTree representing a super bounded wildcard type argument.

      • ERRONEOUS

        public static final Tree.Kind ERRONEOUS
        Used for instances of ErroneousTree.

      • INTERFACE

        public static final Tree.Kind INTERFACE
        Used for instances of ClassTree representing interfaces.

      • ENUM

        public static final Tree.Kind ENUM
        Used for instances of ClassTree representing enums.

      • ANNOTATION_TYPE

        public static final Tree.Kind ANNOTATION_TYPE
        Used for instances of ClassTree representing annotation types.

      • OTHER

        public static final Tree.Kind OTHER
        An implementation-reserved node. This is the not the node you are looking for.

    • Method Detail

      • values

        public static Tree.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Tree.Kind c : Tree.Kind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static Tree.Kind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null

      • asInterface

        public Class<? extends Tree> asInterface()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface TreeVisitor<R,P>

  • Type Parameters:
    R - the return type of this visitor's methods. Use Void for visitors that do not need to return results.
    P - the type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.
    All Known Implementing Classes:
    SimpleTreeVisitor, TreePathScanner, TreeScanner

    @Exported
public interface TreeVisitor<R,P>
    A visitor of trees, in the style of the visitor design pattern. Classes implementing this interface are used to operate on a tree when the kind of tree is unknown at compile time. When a visitor is passed to an tree's accept method, the visitXYZ method most applicable to that tree is invoked.

    Classes implementing this interface may or may not throw a NullPointerException if the additional parameter p is null; see documentation of the implementing class for details.

    WARNING: It is possible that methods will be added to this interface to accommodate new, currently unknown, language structures added to future versions of the Java™ programming language. Therefore, visitor classes directly implementing this interface may be source incompatible with future versions of the platform.

    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      R | visitAnnotatedType(AnnotatedTypeTree node, P p)
      R | visitAnnotation(AnnotationTree node, P p)
      R | visitArrayAccess(ArrayAccessTree node, P p)
      R | visitArrayType(ArrayTypeTree node, P p)
      R | visitAssert(AssertTree node, P p)
      R | visitAssignment(AssignmentTree node, P p)
      R | visitBinary(BinaryTree node, P p)
      R | visitBlock(BlockTree node, P p)
      R | visitBreak(BreakTree node, P p)
      R | visitCase(CaseTree node, P p)
      R | visitCatch(CatchTree node, P p)
      R | visitClass(ClassTree node, P p)
      R | visitCompilationUnit(CompilationUnitTree node, P p)
      R | visitCompoundAssignment(CompoundAssignmentTree node, P p)
      R | visitConditionalExpression(ConditionalExpressionTree node, P p)
      R | visitContinue(ContinueTree node, P p)
      R | visitDoWhileLoop(DoWhileLoopTree node, P p)
      R | visitEmptyStatement(EmptyStatementTree node, P p)
      R | visitEnhancedForLoop(EnhancedForLoopTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitExpressionStatement(ExpressionStatementTree node, P p)
      R | visitForLoop(ForLoopTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitIf(IfTree node, P p)
      R | visitImport(ImportTree node, P p)
      R | visitInstanceOf(InstanceOfTree node, P p)
      R | visitIntersectionType(IntersectionTypeTree node, P p)
      R | visitLabeledStatement(LabeledStatementTree node, P p)
      R | visitLambdaExpression(LambdaExpressionTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitMemberReference(MemberReferenceTree node, P p)
      R | visitMemberSelect(MemberSelectTree node, P p)
      R | visitMethod(MethodTree node, P p)
      R | visitMethodInvocation(MethodInvocationTree node, P p)
      R | visitModifiers(ModifiersTree node, P p)
      R | visitNewArray(NewArrayTree node, P p)
      R | visitNewClass(NewClassTree node, P p)
      R | visitOther(Tree node, P p)
      R | visitParameterizedType(ParameterizedTypeTree node, P p)
      R | visitParenthesized(ParenthesizedTree node, P p)
      R | visitPrimitiveType(PrimitiveTypeTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSwitch(SwitchTree node, P p)
      R | visitSynchronized(SynchronizedTree node, P p)
      R | visitThrow(ThrowTree node, P p)
      R | visitTry(TryTree node, P p)
      R | visitTypeCast(TypeCastTree node, P p)
      R | visitTypeParameter(TypeParameterTree node, P p)
      R | visitUnary(UnaryTree node, P p)
      R | visitUnionType(UnionTypeTree node, P p)
      R | visitVariable(VariableTree node, P p)
      R | visitWhileLoop(WhileLoopTree node, P p)
      R | visitWildcard(WildcardTree node, P p)

    • Method Detail

      • visitAnnotatedType

        R visitAnnotatedType(AnnotatedTypeTree node,
                     P p)

      • visitAnnotation

        R visitAnnotation(AnnotationTree node,
                  P p)

      • visitMethodInvocation

        R visitMethodInvocation(MethodInvocationTree node,
                        P p)

      • visitAssert

        R visitAssert(AssertTree node,
              P p)

      • visitAssignment

        R visitAssignment(AssignmentTree node,
                  P p)

      • visitCompoundAssignment

        R visitCompoundAssignment(CompoundAssignmentTree node,
                          P p)

      • visitBinary

        R visitBinary(BinaryTree node,
              P p)

      • visitBlock

        R visitBlock(BlockTree node,
             P p)

      • visitBreak

        R visitBreak(BreakTree node,
             P p)

      • visitCase

        R visitCase(CaseTree node,
            P p)

      • visitCatch

        R visitCatch(CatchTree node,
             P p)

      • visitClass

        R visitClass(ClassTree node,
             P p)

      • visitConditionalExpression

        R visitConditionalExpression(ConditionalExpressionTree node,
                             P p)

      • visitContinue

        R visitContinue(ContinueTree node,
                P p)

      • visitDoWhileLoop

        R visitDoWhileLoop(DoWhileLoopTree node,
                   P p)

      • visitErroneous

        R visitErroneous(ErroneousTree node,
                 P p)

      • visitExpressionStatement

        R visitExpressionStatement(ExpressionStatementTree node,
                           P p)

      • visitEnhancedForLoop

        R visitEnhancedForLoop(EnhancedForLoopTree node,
                       P p)

      • visitForLoop

        R visitForLoop(ForLoopTree node,
               P p)

      • visitIdentifier

        R visitIdentifier(IdentifierTree node,
                  P p)

      • visitIf

        R visitIf(IfTree node,
          P p)

      • visitImport

        R visitImport(ImportTree node,
              P p)

      • visitArrayAccess

        R visitArrayAccess(ArrayAccessTree node,
                   P p)

      • visitLabeledStatement

        R visitLabeledStatement(LabeledStatementTree node,
                        P p)

      • visitLiteral

        R visitLiteral(LiteralTree node,
               P p)

      • visitMethod

        R visitMethod(MethodTree node,
              P p)

      • visitModifiers

        R visitModifiers(ModifiersTree node,
                 P p)

      • visitNewArray

        R visitNewArray(NewArrayTree node,
                P p)

      • visitNewClass

        R visitNewClass(NewClassTree node,
                P p)

      • visitLambdaExpression

        R visitLambdaExpression(LambdaExpressionTree node,
                        P p)

      • visitParenthesized

        R visitParenthesized(ParenthesizedTree node,
                     P p)

      • visitReturn

        R visitReturn(ReturnTree node,
              P p)

      • visitMemberSelect

        R visitMemberSelect(MemberSelectTree node,
                    P p)

      • visitMemberReference

        R visitMemberReference(MemberReferenceTree node,
                       P p)

      • visitEmptyStatement

        R visitEmptyStatement(EmptyStatementTree node,
                      P p)

      • visitSwitch

        R visitSwitch(SwitchTree node,
              P p)

      • visitSynchronized

        R visitSynchronized(SynchronizedTree node,
                    P p)

      • visitThrow

        R visitThrow(ThrowTree node,
             P p)

      • visitCompilationUnit

        R visitCompilationUnit(CompilationUnitTree node,
                       P p)

      • visitTry

        R visitTry(TryTree node,
           P p)

      • visitParameterizedType

        R visitParameterizedType(ParameterizedTypeTree node,
                         P p)

      • visitUnionType

        R visitUnionType(UnionTypeTree node,
                 P p)

      • visitIntersectionType

        R visitIntersectionType(IntersectionTypeTree node,
                        P p)

      • visitArrayType

        R visitArrayType(ArrayTypeTree node,
                 P p)

      • visitTypeCast

        R visitTypeCast(TypeCastTree node,
                P p)

      • visitPrimitiveType

        R visitPrimitiveType(PrimitiveTypeTree node,
                     P p)

      • visitTypeParameter

        R visitTypeParameter(TypeParameterTree node,
                     P p)

      • visitInstanceOf

        R visitInstanceOf(InstanceOfTree node,
                  P p)

      • visitUnary

        R visitUnary(UnaryTree node,
             P p)

      • visitVariable

        R visitVariable(VariableTree node,
                P p)

      • visitWhileLoop

        R visitWhileLoop(WhileLoopTree node,
                 P p)

      • visitWildcard

        R visitWildcard(WildcardTree node,
                P p)

      • visitOther

        R visitOther(Tree node,
             P p)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface TryTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface TryTree
extends StatementTree
    A tree node for a 'try' statement. For example:
       try
       block
   catches
   finally
       finallyBlock
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.20

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      BlockTree getBlock()
      List<? extends CatchTree> | getCatches()
      BlockTree getFinallyBlock()
      List<? extends Tree> | getResources()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getBlock

        BlockTree getBlock()

      • getCatches

        List<? extends CatchTree> getCatches()

      • getFinallyBlock

        BlockTree getFinallyBlock()

      • getResources

        List<? extends Tree> getResources()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TypeCastTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface TypeCastTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface TypeCastTree
extends ExpressionTree
    A tree node for a type cast expression. For example:
       ( type ) expression
    Since:
    1.6
    See The Java™ Language Specification:
    section 15.16

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()
      Tree getType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getType

        Tree getType()

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TypeParameterTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface TypeParameterTree

  • All Superinterfaces:
    Tree

    @Exported
public interface TypeParameterTree
extends Tree
    A tree node for a type parameter. For example:
       name

   name extends bounds

   annotations name
    Since:
    1.6
    See The Java™ Language Specification:
    section 4.4

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends AnnotationTree> getAnnotations()
      Return annotations on the type parameter declaration.
      List<? extends Tree> | getBounds()
      Name getName()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getName

        Name getName()

      • getBounds

        List<? extends Tree> getBounds()

      • getAnnotations

        List<? extends AnnotationTree> getAnnotations()
        Return annotations on the type parameter declaration. Annotations need Target meta-annotations of ElementType.TYPE_PARAMETER or ElementType.TYPE_USE to appear in this position.
        Returns:
        annotations on the type parameter declaration
        Since:
        1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


UnaryTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface UnaryTree

  • All Superinterfaces:
    ExpressionTree, Tree

    @Exported
public interface UnaryTree
extends ExpressionTree
    A tree node for postfix and unary expressions. Use getKind to determine the kind of operator. For example:
       operator expression

   expression operator
    Since:
    1.6
    See The Java™ Language Specification:
    sections 15.14 and 15.15

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getExpression()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getExpression

        ExpressionTree getExpression()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


UnionTypeTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface UnionTypeTree

  • All Superinterfaces:
    Tree

    @Exported
public interface UnionTypeTree
extends Tree
    A tree node for a union type expression in a multicatch var declaration.
    Since:
    1.7

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      List<? extends Tree> | getTypeAlternatives()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getTypeAlternatives

        List<? extends Tree> getTypeAlternatives()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


VariableTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface VariableTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface VariableTree
extends StatementTree
    A tree node for a variable declaration. For example:
       modifiers type name initializer ;
   modifiers type qualified-name.this
    Since:
    1.6
    See The Java™ Language Specification:
    sections 8.3 and 14.4

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getInitializer()
      ModifiersTree getModifiers()
      Name getName()
      ExpressionTree getNameExpression()
      Tree getType()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getModifiers

        ModifiersTree getModifiers()

      • getName

        Name getName()

      • getNameExpression

        ExpressionTree getNameExpression()

      • getType

        Tree getType()

      • getInitializer

        ExpressionTree getInitializer()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


WhileLoopTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface WhileLoopTree

  • All Superinterfaces:
    StatementTree, Tree

    @Exported
public interface WhileLoopTree
extends StatementTree
    A tree node for a 'while' loop statement. For example:
       while ( condition )
     statement
    Since:
    1.6
    See The Java™ Language Specification:
    section 14.12

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ExpressionTree getCondition()
      StatementTree getStatement()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getCondition

        ExpressionTree getCondition()

      • getStatement

        StatementTree getStatement()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


WildcardTree

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.tree

Interface WildcardTree

  • All Superinterfaces:
    Tree

    @Exported
public interface WildcardTree
extends Tree
    A tree node for a wildcard type argument. Use getKind to determine the kind of bound. For example:
       ?

   ? extends bound

   ? super bound
    Since:
    1.6
    See The Java™ Language Specification:
    section 4.5.1

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

        Tree.Kind

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Tree getBound()

      • Methods inherited from interface com.sun.source.tree.Tree

        accept, getKind

    • Method Detail

      • getBound

        Tree getBound()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.source.util

Provides utilities for operations on abstract syntax trees (AST).

See: Description

  • Interface Summary
    Interface Description
    DocSourcePositions
    Provides methods to obtain the position of a DocTree within a javadoc comment.
    Plugin
    The interface for a javac plug-in.
    SourcePositions
    Provides methods to obtain the position of a Tree within a CompilationUnit.
    TaskListener
    Provides a listener to monitor the activity of the JDK Java Compiler, javac.
  • Class Summary
    Class Description
    DocTreePath
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level DocCommentTree node.
    DocTreePathScanner<R,P>
    A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
    DocTrees
    Provides access to syntax trees for doc comments.
    DocTreeScanner<R,P>
    A TreeVisitor that visits all the child tree nodes.
    JavacTask
    Provides access to functionality specific to the JDK Java Compiler, javac.
    SimpleDocTreeVisitor<R,P>
    A simple visitor for tree nodes.
    SimpleTreeVisitor<R,P>
    A simple visitor for tree nodes.
    TaskEvent
    Provides details about work that has been done by the JDK Java Compiler, javac.
    TreePath
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level CompilationUnitTree node.
    TreePathScanner<R,P>
    A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
    Trees
    Bridges JSR 199, JSR 269, and the Tree API.
    TreeScanner<R,P>
    A TreeVisitor that visits all the child tree nodes.
  • Enum Summary
    Enum Description
    TaskEvent.Kind
    Kind of task event.

Package com.sun.source.util Description

Provides utilities for operations on abstract syntax trees (AST).
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.source.util Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.source.util

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • com.sun.source.util.DocTreePath (implements java.lang.Iterable<T>)
    • com.sun.source.util.DocTreeScanner<R,P> (implements com.sun.source.doctree.DocTreeVisitor<R,P>)
      • com.sun.source.util.DocTreePathScanner<R,P>
    • com.sun.source.util.JavacTask (implements javax.tools.JavaCompiler.CompilationTask)
    • com.sun.source.util.SimpleDocTreeVisitor<R,P> (implements com.sun.source.doctree.DocTreeVisitor<R,P>)
    • com.sun.source.util.SimpleTreeVisitor<R,P> (implements com.sun.source.tree.TreeVisitor<R,P>)
    • com.sun.source.util.TaskEvent
    • com.sun.source.util.TreePath (implements java.lang.Iterable<T>)
    • com.sun.source.util.Trees
      • com.sun.source.util.DocTrees
    • com.sun.source.util.TreeScanner<R,P> (implements com.sun.source.tree.TreeVisitor<R,P>)
      • com.sun.source.util.TreePathScanner<R,P>

Interface Hierarchy

  • com.sun.source.util.Plugin
  • com.sun.source.util.SourcePositions
    • com.sun.source.util.DocSourcePositions
  • com.sun.source.util.TaskListener

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.source.util.TaskEvent.Kind
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.source.util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.source.util

  • Packages that use com.sun.source.util
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).
  • Classes in com.sun.source.util used by com.sun.source.util
    Class and Description
    DocSourcePositions
    Provides methods to obtain the position of a DocTree within a javadoc comment.
    DocTreePath
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level DocCommentTree node.
    DocTrees
    Provides access to syntax trees for doc comments.
    DocTreeScanner
    A TreeVisitor that visits all the child tree nodes.
    JavacTask
    Provides access to functionality specific to the JDK Java Compiler, javac.
    SourcePositions
    Provides methods to obtain the position of a Tree within a CompilationUnit.
    TaskEvent
    Provides details about work that has been done by the JDK Java Compiler, javac.
    TaskEvent.Kind
    Kind of task event.
    TaskListener
    Provides a listener to monitor the activity of the JDK Java Compiler, javac.
    TreePath
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level CompilationUnitTree node.
    Trees
    Bridges JSR 199, JSR 269, and the Tree API.
    TreeScanner
    A TreeVisitor that visits all the child tree nodes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.DocTreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.DocTreePath

  • Packages that use DocTreePath
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocTreePath in com.sun.source.util

      Methods in com.sun.source.util that return DocTreePath
      Modifier and Type Method and Description
      DocTreePath DocTreePathScanner.getCurrentPath()
      Get the current path for the node, as built up by the currently active set of scan calls.
      DocTreePath DocTreePath.getParentPath()
      Get the path for the enclosing node, or null if there is no enclosing node.
      static DocTreePath DocTreePath.getPath(DocTreePath path, DocTree target)
      Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
      static DocTreePath DocTreePath.getPath(TreePath treePath, DocCommentTree doc, DocTree target)
      Gets a documentation tree path for a tree node within a compilation unit.
      Methods in com.sun.source.util with parameters of type DocTreePath
      Modifier and Type Method and Description
      abstract Element DocTrees.getElement(DocTreePath path)
      Gets the language model element referred to by the leaf node of the given DocTreePath, or null if unknown.
      static DocTreePath DocTreePath.getPath(DocTreePath path, DocTree target)
      Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
      R DocTreePathScanner.scan(DocTreePath path, P p)
      Scan a tree from a position identified by a TreePath.
      Constructors in com.sun.source.util with parameters of type DocTreePath
      Constructor and Description
      DocTreePath(DocTreePath p, DocTree t)
      Creates a DocTreePath for a child node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.DocTreePathScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.DocTreePathScanner

No usage of com.sun.source.util.DocTreePathScanner
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.DocTrees

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.DocTrees

  • Packages that use DocTrees
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocTrees in com.sun.source.util

      Methods in com.sun.source.util that return DocTrees
      Modifier and Type Method and Description
      static DocTrees DocTrees.instance(JavaCompiler.CompilationTask task)
      Gets a DocTrees object for a given CompilationTask.
      static DocTrees DocTrees.instance(ProcessingEnvironment env)
      Gets a DocTrees object for a given ProcessingEnvironment.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.DocTreeScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.DocTreeScanner

  • Packages that use DocTreeScanner
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocTreeScanner in com.sun.source.util

      Subclasses of DocTreeScanner in com.sun.source.util
      Modifier and Type Class and Description
      class  DocTreePathScanner<R,P>
      A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.JavacTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.JavacTask

  • Packages that use JavacTask
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of JavacTask in com.sun.source.util

      Methods in com.sun.source.util that return JavacTask
      Modifier and Type Method and Description
      static JavacTask JavacTask.instance(ProcessingEnvironment processingEnvironment)
      Get the JavacTask for a ProcessingEnvironment.
      Methods in com.sun.source.util with parameters of type JavacTask
      Modifier and Type Method and Description
      void Plugin.init(JavacTask task, String... args)
      Initialize the plug-in for a given compilation task.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.SimpleDocTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.SimpleDocTreeVisitor

No usage of com.sun.source.util.SimpleDocTreeVisitor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.SimpleTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.SimpleTreeVisitor

No usage of com.sun.source.util.SimpleTreeVisitor
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.TaskEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.TaskEvent

  • Packages that use TaskEvent
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TaskEvent in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TaskEvent
      Modifier and Type | Method and Description
      void | TaskListener.finished(TaskEvent e)
      void | TaskListener.started(TaskEvent e)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.TaskEvent.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.TaskEvent.Kind

  • Packages that use TaskEvent.Kind
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TaskEvent.Kind in com.sun.source.util

      Methods in com.sun.source.util that return TaskEvent.Kind
      Modifier and Type | Method and Description
      TaskEvent.Kind | TaskEvent.getKind()
      static TaskEvent.Kind TaskEvent.Kind.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static TaskEvent.Kind[] TaskEvent.Kind.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Constructors in com.sun.source.util with parameters of type TaskEvent.Kind
      Constructor and Description
      TaskEvent(TaskEvent.Kind kind)
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit)
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit, TypeElement clazz)
      TaskEvent(TaskEvent.Kind kind, JavaFileObject sourceFile)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.TreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.TreePath

  • Packages that use TreePath
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TreePath in com.sun.source.util

      Methods in com.sun.source.util that return TreePath
      Modifier and Type Method and Description
      TreePath TreePathScanner.getCurrentPath()
      Get the current path for the node, as built up by the currently active set of scan calls.
      TreePath TreePath.getParentPath()
      Get the path for the enclosing node, or null if there is no enclosing node.
      abstract TreePath Trees.getPath(CompilationUnitTree unit, Tree node)
      Gets the path to tree node within the specified compilation unit.
      static TreePath TreePath.getPath(CompilationUnitTree unit, Tree target)
      Gets a tree path for a tree node within a compilation unit.
      abstract TreePath Trees.getPath(Element e)
      Gets the TreePath node for a given Element.
      abstract TreePath Trees.getPath(Element e, AnnotationMirror a)
      Gets the TreePath node for an AnnotationMirror on a given Element.
      abstract TreePath Trees.getPath(Element e, AnnotationMirror a, AnnotationValue v)
      Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element.
      static TreePath TreePath.getPath(TreePath path, Tree target)
      Gets a tree path for a tree node within a subtree identified by a TreePath object.
      TreePath DocTreePath.getTreePath()
      Get the TreePath associated with this path.
      Methods in com.sun.source.util with parameters of type TreePath
      Modifier and Type Method and Description
      abstract String Trees.getDocComment(TreePath path)
      Gets the doc comment, if any, for the Tree node identified by a given TreePath.
      abstract DocCommentTree DocTrees.getDocCommentTree(TreePath path)
      Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
      abstract Element Trees.getElement(TreePath path)
      Gets the Element for the Tree node identified by a given TreePath.
      static DocTreePath DocTreePath.getPath(TreePath treePath, DocCommentTree doc, DocTree target)
      Gets a documentation tree path for a tree node within a compilation unit.
      static TreePath TreePath.getPath(TreePath path, Tree target)
      Gets a tree path for a tree node within a subtree identified by a TreePath object.
      abstract Scope Trees.getScope(TreePath path)
      Gets the Scope for the Tree node identified by a given TreePath.
      abstract TypeMirror Trees.getTypeMirror(TreePath path)
      Gets the TypeMirror for the Tree node identified by a given TreePath.
      R TreePathScanner.scan(TreePath path, P p)
      Scan a tree from a position identified by a TreePath.
      Constructors in com.sun.source.util with parameters of type TreePath
      Constructor and Description
      DocTreePath(TreePath treePath, DocCommentTree t)
      Creates a DocTreePath for a root node.
      TreePath(TreePath p, Tree t)
      Creates a TreePath for a child node.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.TreePathScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.TreePathScanner

No usage of com.sun.source.util.TreePathScanner
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.Trees

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.Trees

  • Packages that use Trees
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of Trees in com.sun.source.util

      Subclasses of Trees in com.sun.source.util
      Modifier and Type Class and Description
      class  DocTrees
      Provides access to syntax trees for doc comments.
      Methods in com.sun.source.util that return Trees
      Modifier and Type Method and Description
      static Trees Trees.instance(JavaCompiler.CompilationTask task)
      Gets a Trees object for a given CompilationTask.
      static Trees Trees.instance(ProcessingEnvironment env)
      Gets a Trees object for a given ProcessingEnvironment.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.source.util.TreeScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.source.util.TreeScanner

  • Packages that use TreeScanner
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TreeScanner in com.sun.source.util

      Subclasses of TreeScanner in com.sun.source.util
      Modifier and Type Class and Description
      class  TreePathScanner<R,P>
      A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.util.DocSourcePositions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.util.DocSourcePositions

  • Packages that use DocSourcePositions
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of DocSourcePositions in com.sun.source.util

      Methods in com.sun.source.util that return DocSourcePositions
      Modifier and Type | Method and Description
      abstract DocSourcePositions | DocTrees.getSourcePositions()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.util.Plugin

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.util.Plugin

No usage of com.sun.source.util.Plugin
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.util.SourcePositions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.util.SourcePositions

  • Packages that use SourcePositions
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of SourcePositions in com.sun.source.util

      Subinterfaces of SourcePositions in com.sun.source.util
      Modifier and Type Interface and Description
      interface  DocSourcePositions
      Provides methods to obtain the position of a DocTree within a javadoc comment.
      Methods in com.sun.source.util that return SourcePositions
      Modifier and Type Method and Description
      abstract SourcePositions Trees.getSourcePositions()
      Gets a utility object for obtaining source positions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.source.util.TaskListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.source.util.TaskListener

  • Packages that use TaskListener
    Package Description
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of TaskListener in com.sun.source.util

      Methods in com.sun.source.util with parameters of type TaskListener
      Modifier and Type Method and Description
      abstract void JavacTask.addTaskListener(TaskListener taskListener)
      The specified listener will receive notification of events describing the progress of this compilation task.
      abstract void JavacTask.removeTaskListener(TaskListener taskListener)
      The specified listener will no longer receive notification of events describing the progress of this compilation task.
      abstract void JavacTask.setTaskListener(TaskListener taskListener)
      The specified listener will receive notification of events describing the progress of this compilation task.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocSourcePositions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Interface DocSourcePositions

  • All Superinterfaces:
    SourcePositions

    @Exported
public interface DocSourcePositions
extends SourcePositions
    Provides methods to obtain the position of a DocTree within a javadoc comment. A position is defined as a simple character offset from the start of a CompilationUnit where the first character is at offset 0.
    Since:
    1.8

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      long getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the ending position of the tree within the comment within the file.
      long getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree)
      Gets the starting position of the tree within the comment within the file.

      • Methods inherited from interface com.sun.source.util.SourcePositions

        getEndPosition, getStartPosition

    • Method Detail

      • getStartPosition

        long getStartPosition(CompilationUnitTree file,
                      DocCommentTree comment,
                      DocTree tree)
        Gets the starting position of the tree within the comment within the file. If tree is not found within file, or if the starting position is not available, return Diagnostic.NOPOS. The given tree should be under the given comment tree, and the given documentation comment tree should be returned from a DocTrees.getDocCommentTree(com.sun.source.util.TreePath) for a tree under the given file. The returned position must be at the start of the yield of this tree, that is for any sub-tree of this tree, the following must hold:

        tree.getStartPosition() <= subtree.getStartPosition() or
        tree.getStartPosition() == NOPOS or
        subtree.getStartPosition() == NOPOS

        Parameters:
        file - CompilationUnit in which to find tree.
        comment - the comment tree that encloses the tree for which the position is being sought
        tree - tree for which a position is sought.
        Returns:
        the start position of tree.

      • getEndPosition

        long getEndPosition(CompilationUnitTree file,
                    DocCommentTree comment,
                    DocTree tree)
        Gets the ending position of the tree within the comment within the file. If tree is not found within file, or if the ending position is not available, return Diagnostic.NOPOS. The given tree should be under the given comment tree, and the given documentation comment tree should be returned from a DocTrees.getDocCommentTree(com.sun.source.util.TreePath) for a tree under the given file. The returned position must be at the end of the yield of this tree, that is for any sub-tree of this tree, the following must hold:

        tree.getEndPosition() >= subtree.getEndPosition() or
        tree.getEndPosition() == NOPOS or
        subtree.getEndPosition() == NOPOS

        In addition, the following must hold:

        tree.getStartPosition() <= tree.getEndPosition() or
        tree.getStartPosition() == NOPOS or
        tree.getEndPosition() == NOPOS

        Parameters:
        file - CompilationUnit in which to find tree.
        comment - the comment tree that encloses the tree for which the position is being sought
        tree - tree for which a position is sought.
        Returns:
        the start position of tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class DocTreePath

  • java.lang.Object
    • com.sun.source.util.DocTreePath
  • All Implemented Interfaces:
    Iterable<DocTree>

    @Exported
public class DocTreePath
extends Object
implements Iterable<DocTree>
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level DocCommentTree node.
    Since:
    1.8

    • Constructor Summary

      Constructors
      Constructor and Description
      DocTreePath(DocTreePath p, DocTree t)
      Creates a DocTreePath for a child node.
      DocTreePath(TreePath treePath, DocCommentTree t)
      Creates a DocTreePath for a root node.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      DocCommentTree getDocComment()
      Get the DocCommentTree associated with this path.
      DocTree getLeaf()
      Get the leaf node for this path.
      DocTreePath getParentPath()
      Get the path for the enclosing node, or null if there is no enclosing node.
      static DocTreePath getPath(DocTreePath path, DocTree target)
      Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
      static DocTreePath getPath(TreePath treePath, DocCommentTree doc, DocTree target)
      Gets a documentation tree path for a tree node within a compilation unit.
      TreePath getTreePath()
      Get the TreePath associated with this path.
      Iterator<DocTree> iterator()
      Returns an iterator over elements of type T.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator

    • Constructor Detail

      • DocTreePath

        public DocTreePath(TreePath treePath,
                   DocCommentTree t)
        Creates a DocTreePath for a root node.
        Parameters:
        treePath - the TreePath from which the root node was created.
        t - the DocCommentTree to create the path for.

      • DocTreePath

        public DocTreePath(DocTreePath p,
                   DocTree t)
        Creates a DocTreePath for a child node.

    • Method Detail

      • getPath

        public static DocTreePath getPath(TreePath treePath,
                                  DocCommentTree doc,
                                  DocTree target)
        Gets a documentation tree path for a tree node within a compilation unit.
        Returns:
        null if the node is not found

      • getPath

        public static DocTreePath getPath(DocTreePath path,
                                  DocTree target)
        Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
        Returns:
        null if the node is not found

      • getTreePath

        public TreePath getTreePath()
        Get the TreePath associated with this path.
        Returns:
        TreePath for this DocTreePath

      • getDocComment

        public DocCommentTree getDocComment()
        Get the DocCommentTree associated with this path.
        Returns:
        DocCommentTree for this DocTreePath

      • getLeaf

        public DocTree getLeaf()
        Get the leaf node for this path.
        Returns:
        DocTree for this DocTreePath

      • getParentPath

        public DocTreePath getParentPath()
        Get the path for the enclosing node, or null if there is no enclosing node.
        Returns:
        DocTreePath of parent

      • iterator

        public Iterator<DocTree> iterator()
        Description copied from interface: java.lang.Iterable
        Returns an iterator over elements of type T.
        Specified by:
        iterator in interface Iterable<DocTree>
        Returns:
        an Iterator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTreePathScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class DocTreePathScanner<R,P>

  • java.lang.Object
    • com.sun.source.util.DocTreeScanner<R,P>
      • com.sun.source.util.DocTreePathScanner<R,P>
  • All Implemented Interfaces:
    DocTreeVisitor<R,P>

    @Exported
public class DocTreePathScanner<R,P>
extends DocTreeScanner<R,P>
    A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes. To visit nodes of a particular type, just override the corresponding visitorXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.
    Since:
    1.8

    • Constructor Summary

      Constructors
      Constructor and Description
      DocTreePathScanner()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      DocTreePath getCurrentPath()
      Get the current path for the node, as built up by the currently active set of scan calls.
      R scan(DocTree tree, P p)
      Scan a single node.
      R scan(DocTreePath path, P p)
      Scan a tree from a position identified by a TreePath.

      • Methods inherited from class com.sun.source.util.DocTreeScanner

        reduce, scan, visitAttribute, visitAuthor, visitComment, visitDeprecated, visitDocComment, visitDocRoot, visitEndElement, visitEntity, visitErroneous, visitIdentifier, visitInheritDoc, visitLink, visitLiteral, visitOther, visitParam, visitReference, visitReturn, visitSee, visitSerial, visitSerialData, visitSerialField, visitSince, visitStartElement, visitText, visitThrows, visitUnknownBlockTag, visitUnknownInlineTag, visitValue, visitVersion

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DocTreePathScanner

        public DocTreePathScanner()

    • Method Detail

      • scan

        public R scan(DocTreePath path,
              P p)
        Scan a tree from a position identified by a TreePath.

      • scan

        public R scan(DocTree tree,
              P p)
        Scan a single node. The current path is updated for the duration of the scan.
        Overrides:
        scan in class DocTreeScanner<R,P>

      • getCurrentPath

        public DocTreePath getCurrentPath()
        Get the current path for the node, as built up by the currently active set of scan calls.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTrees

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class DocTrees

  • java.lang.Object
    • com.sun.source.util.Trees
      • com.sun.source.util.DocTrees

  • @Exported
public abstract class DocTrees
extends Trees
    Provides access to syntax trees for doc comments.
    Since:
    1.8

    • Constructor Summary

      Constructors
      Constructor and Description
      DocTrees()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract DocCommentTree getDocCommentTree(TreePath path)
      Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
      abstract Element getElement(DocTreePath path)
      Gets the language model element referred to by the leaf node of the given DocTreePath, or null if unknown.
      abstract DocSourcePositions getSourcePositions()
      Gets a utility object for obtaining source positions.
      static DocTrees instance(JavaCompiler.CompilationTask task)
      Gets a DocTrees object for a given CompilationTask.
      static DocTrees instance(ProcessingEnvironment env)
      Gets a DocTrees object for a given ProcessingEnvironment.
      abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit

      • Methods inherited from class com.sun.source.util.Trees

        getDocComment, getElement, getLub, getOriginalType, getPath, getPath, getPath, getPath, getScope, getTree, getTree, getTree, getTree, getTree, getTypeMirror, isAccessible, isAccessible, printMessage

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DocTrees

        public DocTrees()

    • Method Detail

      • instance

        public static DocTrees instance(JavaCompiler.CompilationTask task)
        Gets a DocTrees object for a given CompilationTask.
        Parameters:
        task - the compilation task for which to get the Trees object
        Throws:
        IllegalArgumentException - if the task does not support the Trees API.

      • instance

        public static DocTrees instance(ProcessingEnvironment env)
        Gets a DocTrees object for a given ProcessingEnvironment.
        Parameters:
        env - the processing environment for which to get the Trees object
        Throws:
        IllegalArgumentException - if the env does not support the Trees API.

      • getDocCommentTree

        public abstract DocCommentTree getDocCommentTree(TreePath path)
        Gets the doc comment tree, if any, for the Tree node identified by a given TreePath. Returns null if no doc comment was found.

      • getElement

        public abstract Element getElement(DocTreePath path)
        Gets the language model element referred to by the leaf node of the given DocTreePath, or null if unknown.

      • getSourcePositions

        public abstract DocSourcePositions getSourcePositions()
        Description copied from class: Trees
        Gets a utility object for obtaining source positions.
        Specified by:
        getSourcePositions in class Trees

      • printMessage

        public abstract void printMessage(Diagnostic.Kind kind,
                                  CharSequence msg,
                                  DocTree t,
                                  DocCommentTree c,
                                  CompilationUnitTree root)
        Prints a message of the specified kind at the location of the tree within the provided compilation unit
        Parameters:
        kind - the kind of message
        msg - the message, or an empty string if none
        t - the tree to use as a position hint
        root - the compilation unit that contains tree
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


DocTreeScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class DocTreeScanner<R,P>

  • java.lang.Object
    • com.sun.source.util.DocTreeScanner<R,P>
  • All Implemented Interfaces:
    DocTreeVisitor<R,P>
    Direct Known Subclasses:
    DocTreePathScanner

    @Exported
public class DocTreeScanner<R,P>
extends Object
implements DocTreeVisitor<R,P>
    A TreeVisitor that visits all the child tree nodes. To visit nodes of a particular type, just override the corresponding visitXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.

    The default implementation of the visitXYZ methods will determine a result as follows:

    • If the node being visited has no children, the result will be null.
    • If the node being visited has one child, the result will be the result of calling scan on that child. The child may be a simple node or itself a list of nodes.
    • If the node being visited has more than one child, the result will be determined by calling scan each child in turn, and then combining the result of each scan after the first with the cumulative result so far, as determined by the reduce(R, R) method. Each child may be either a simple node of a list of nodes. The default behavior of the reduce method is such that the result of the visitXYZ method will be the result of the last child scanned.

    Here is an example to count the number of erroneous nodes in a tree:

       class CountErrors extends DocTreeScanner<Integer,Void> {
       @Override
      public Integer visitErroneous(ErroneousTree node, Void p) {
          return 1;
      }
       @Override
      public Integer reduce(Integer r1, Integer r2) {
          return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
      }
   }
    Since:
    1.8

    • Constructor Summary

      Constructors
      Constructor and Description
      DocTreeScanner()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      R reduce(R r1, R r2)
      Reduces two results into a combined result.
      R scan(DocTree node, P p)
      Scan a single node.
      R scan(Iterable<? extends DocTree> nodes, P p)
      Scan a list of nodes.
      R | visitAttribute(AttributeTree node, P p)
      R | visitAuthor(AuthorTree node, P p)
      R | visitComment(CommentTree node, P p)
      R | visitDeprecated(DeprecatedTree node, P p)
      R | visitDocComment(DocCommentTree node, P p)
      R | visitDocRoot(DocRootTree node, P p)
      R | visitEndElement(EndElementTree node, P p)
      R | visitEntity(EntityTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitInheritDoc(InheritDocTree node, P p)
      R | visitLink(LinkTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitOther(DocTree node, P p)
      R | visitParam(ParamTree node, P p)
      R | visitReference(ReferenceTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSee(SeeTree node, P p)
      R | visitSerial(SerialTree node, P p)
      R | visitSerialData(SerialDataTree node, P p)
      R | visitSerialField(SerialFieldTree node, P p)
      R | visitSince(SinceTree node, P p)
      R | visitStartElement(StartElementTree node, P p)
      R | visitText(TextTree node, P p)
      R | visitThrows(ThrowsTree node, P p)
      R | visitUnknownBlockTag(UnknownBlockTagTree node, P p)
      R | visitUnknownInlineTag(UnknownInlineTagTree node, P p)
      R | visitValue(ValueTree node, P p)
      R | visitVersion(VersionTree node, P p)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • DocTreeScanner

        public DocTreeScanner()

    • Method Detail

      • scan

        public R scan(DocTree node,
              P p)
        Scan a single node.

      • scan

        public R scan(Iterable<? extends DocTree> nodes,
              P p)
        Scan a list of nodes.

      • reduce

        public R reduce(R r1,
                R r2)
        Reduces two results into a combined result. The default implementation is to return the first parameter. The general contract of the method is that it may take any action whatsoever.

      • visitAttribute

        public R visitAttribute(AttributeTree node,
                        P p)
        Specified by:
        visitAttribute in interface DocTreeVisitor<R,P>

      • visitAuthor

        public R visitAuthor(AuthorTree node,
                     P p)
        Specified by:
        visitAuthor in interface DocTreeVisitor<R,P>

      • visitComment

        public R visitComment(CommentTree node,
                      P p)
        Specified by:
        visitComment in interface DocTreeVisitor<R,P>

      • visitDeprecated

        public R visitDeprecated(DeprecatedTree node,
                         P p)
        Specified by:
        visitDeprecated in interface DocTreeVisitor<R,P>

      • visitDocComment

        public R visitDocComment(DocCommentTree node,
                         P p)
        Specified by:
        visitDocComment in interface DocTreeVisitor<R,P>

      • visitDocRoot

        public R visitDocRoot(DocRootTree node,
                      P p)
        Specified by:
        visitDocRoot in interface DocTreeVisitor<R,P>

      • visitEndElement

        public R visitEndElement(EndElementTree node,
                         P p)
        Specified by:
        visitEndElement in interface DocTreeVisitor<R,P>

      • visitEntity

        public R visitEntity(EntityTree node,
                     P p)
        Specified by:
        visitEntity in interface DocTreeVisitor<R,P>

      • visitErroneous

        public R visitErroneous(ErroneousTree node,
                        P p)
        Specified by:
        visitErroneous in interface DocTreeVisitor<R,P>

      • visitIdentifier

        public R visitIdentifier(IdentifierTree node,
                         P p)
        Specified by:
        visitIdentifier in interface DocTreeVisitor<R,P>

      • visitInheritDoc

        public R visitInheritDoc(InheritDocTree node,
                         P p)
        Specified by:
        visitInheritDoc in interface DocTreeVisitor<R,P>

      • visitLink

        public R visitLink(LinkTree node,
                   P p)
        Specified by:
        visitLink in interface DocTreeVisitor<R,P>

      • visitLiteral

        public R visitLiteral(LiteralTree node,
                      P p)
        Specified by:
        visitLiteral in interface DocTreeVisitor<R,P>

      • visitParam

        public R visitParam(ParamTree node,
                    P p)
        Specified by:
        visitParam in interface DocTreeVisitor<R,P>

      • visitReference

        public R visitReference(ReferenceTree node,
                        P p)
        Specified by:
        visitReference in interface DocTreeVisitor<R,P>

      • visitReturn

        public R visitReturn(ReturnTree node,
                     P p)
        Specified by:
        visitReturn in interface DocTreeVisitor<R,P>

      • visitSee

        public R visitSee(SeeTree node,
                  P p)
        Specified by:
        visitSee in interface DocTreeVisitor<R,P>

      • visitSerial

        public R visitSerial(SerialTree node,
                     P p)
        Specified by:
        visitSerial in interface DocTreeVisitor<R,P>

      • visitSerialData

        public R visitSerialData(SerialDataTree node,
                         P p)
        Specified by:
        visitSerialData in interface DocTreeVisitor<R,P>

      • visitSerialField

        public R visitSerialField(SerialFieldTree node,
                          P p)
        Specified by:
        visitSerialField in interface DocTreeVisitor<R,P>

      • visitSince

        public R visitSince(SinceTree node,
                    P p)
        Specified by:
        visitSince in interface DocTreeVisitor<R,P>

      • visitStartElement

        public R visitStartElement(StartElementTree node,
                           P p)
        Specified by:
        visitStartElement in interface DocTreeVisitor<R,P>

      • visitText

        public R visitText(TextTree node,
                   P p)
        Specified by:
        visitText in interface DocTreeVisitor<R,P>

      • visitThrows

        public R visitThrows(ThrowsTree node,
                     P p)
        Specified by:
        visitThrows in interface DocTreeVisitor<R,P>

      • visitUnknownBlockTag

        public R visitUnknownBlockTag(UnknownBlockTagTree node,
                              P p)
        Specified by:
        visitUnknownBlockTag in interface DocTreeVisitor<R,P>

      • visitUnknownInlineTag

        public R visitUnknownInlineTag(UnknownInlineTagTree node,
                               P p)
        Specified by:
        visitUnknownInlineTag in interface DocTreeVisitor<R,P>

      • visitValue

        public R visitValue(ValueTree node,
                    P p)
        Specified by:
        visitValue in interface DocTreeVisitor<R,P>

      • visitVersion

        public R visitVersion(VersionTree node,
                      P p)
        Specified by:
        visitVersion in interface DocTreeVisitor<R,P>

      • visitOther

        public R visitOther(DocTree node,
                    P p)
        Specified by:
        visitOther in interface DocTreeVisitor<R,P>
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


JavacTask

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class JavacTask

  • java.lang.Object
    • com.sun.source.util.JavacTask
  • All Implemented Interfaces:
    Callable<Boolean>, JavaCompiler.CompilationTask

    @Exported
public abstract class JavacTask
extends Object
implements JavaCompiler.CompilationTask
    Provides access to functionality specific to the JDK Java Compiler, javac.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      JavacTask()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract void addTaskListener(TaskListener taskListener)
      The specified listener will receive notification of events describing the progress of this compilation task.
      abstract Iterable<? extends Element> analyze()
      Complete all analysis.
      abstract Iterable<? extends JavaFileObject> generate()
      Generate code.
      abstract Elements getElements()
      Get a utility object for dealing with program elements.
      abstract TypeMirror getTypeMirror(Iterable<? extends Tree> path)
      Get a type mirror of the tree node determined by the specified path.
      abstract Types getTypes()
      Get a utility object for dealing with type mirrors.
      static JavacTask instance(ProcessingEnvironment processingEnvironment)
      Get the JavacTask for a ProcessingEnvironment.
      abstract Iterable<? extends CompilationUnitTree> parse()
      Parse the specified files returning a list of abstract syntax trees.
      abstract void removeTaskListener(TaskListener taskListener)
      The specified listener will no longer receive notification of events describing the progress of this compilation task.
      abstract void setTaskListener(TaskListener taskListener)
      The specified listener will receive notification of events describing the progress of this compilation task.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface javax.tools.JavaCompiler.CompilationTask

        call, setLocale, setProcessors

    • Constructor Detail

      • JavacTask

        public JavacTask()

    • Method Detail

      • instance

        public static JavacTask instance(ProcessingEnvironment processingEnvironment)
        Get the JavacTask for a ProcessingEnvironment. If the compiler is being invoked using a CompilationTask, then that task will be returned.
        Parameters:
        processingEnvironment - the processing environment
        Returns:
        the JavacTask for a ProcessingEnvironment
        Since:
        1.8

      • parse

        public abstract Iterable<? extends CompilationUnitTree> parse()
                                                       throws IOException
        Parse the specified files returning a list of abstract syntax trees.
        Returns:
        a list of abstract syntax trees
        Throws:
        IOException - if an unhandled I/O error occurred in the compiler.
        IllegalStateException - if the operation cannot be performed at this time.

      • analyze

        public abstract Iterable<? extends Element> analyze()
                                             throws IOException
        Complete all analysis.
        Returns:
        a list of elements that were analyzed
        Throws:
        IOException - if an unhandled I/O error occurred in the compiler.
        IllegalStateException - if the operation cannot be performed at this time.

      • generate

        public abstract Iterable<? extends JavaFileObject> generate()
                                                     throws IOException
        Generate code.
        Returns:
        a list of files that were generated
        Throws:
        IOException - if an unhandled I/O error occurred in the compiler.
        IllegalStateException - if the operation cannot be performed at this time.

      • setTaskListener

        public abstract void setTaskListener(TaskListener taskListener)
        The specified listener will receive notification of events describing the progress of this compilation task. If another listener is receiving notifications as a result of a prior call of this method, then that listener will no longer receive notifications. Informally, this method is equivalent to calling removeTaskListener for any listener that has been previously set, followed by addTaskListener for the new listener.
        Throws:
        IllegalStateException - if the specified listener has already been added.

      • addTaskListener

        public abstract void addTaskListener(TaskListener taskListener)
        The specified listener will receive notification of events describing the progress of this compilation task. This method may be called at any time before or during the compilation.
        Throws:
        IllegalStateException - if the specified listener has already been added.
        Since:
        1.8

      • removeTaskListener

        public abstract void removeTaskListener(TaskListener taskListener)
        The specified listener will no longer receive notification of events describing the progress of this compilation task. This method may be called at any time before or during the compilation.
        Since:
        1.8

      • getTypeMirror

        public abstract TypeMirror getTypeMirror(Iterable<? extends Tree> path)
        Get a type mirror of the tree node determined by the specified path. This method has been superceded by methods on Trees.
        See Also:
        Trees.getTypeMirror(com.sun.source.util.TreePath)

      • getElements

        public abstract Elements getElements()
        Get a utility object for dealing with program elements.

      • getTypes

        public abstract Types getTypes()
        Get a utility object for dealing with type mirrors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Plugin

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Interface Plugin

  • @Exported
public interface Plugin
    The interface for a javac plug-in.

    The javac plug-in mechanism allows a user to specify one or more plug-ins on the javac command line, to be started soon after the compilation has begun. Plug-ins are identified by a user-friendly name. Each plug-in that is started will be passed an array of strings, which may be used to provide the plug-in with values for any desired options or other arguments.

    Plug-ins are located via a ServiceLoader, using the same class path as annotation processors (i.e. ANNOTATION_PROCESSOR_PATH or -processorpath).

    It is expected that a typical plug-in will simply register a TaskListener to be informed of events during the execution of the compilation, and that the rest of the work will be done by the task listener.

    Since:
    1.8

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      Get the user-friendly name of this plug-in.
      void init(JavacTask task, String... args)
      Initialize the plug-in for a given compilation task.

    • Method Detail

      • getName

        String getName()
        Get the user-friendly name of this plug-in.
        Returns:
        the user-friendly name of the plug-in

      • init

        void init(JavacTask task,
          String... args)
        Initialize the plug-in for a given compilation task.
        Parameters:
        task - The compilation task that has just been started
        args - Arguments, if any, for the plug-in
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SimpleDocTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class SimpleDocTreeVisitor<R,P>

  • java.lang.Object
    • com.sun.source.util.SimpleDocTreeVisitor<R,P>
  • All Implemented Interfaces:
    DocTreeVisitor<R,P>

    @Exported
public class SimpleDocTreeVisitor<R,P>
extends Object
implements DocTreeVisitor<R,P>
    A simple visitor for tree nodes.
    Since:
    1.8

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected R | DEFAULT_VALUE

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | SimpleDocTreeVisitor()
      protected | SimpleDocTreeVisitor(R defaultValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      protected R | defaultAction(DocTree node, P p)
      R | visit(DocTree node, P p)
      R | visit(Iterable<? extends DocTree> nodes, P p)
      R | visitAttribute(AttributeTree node, P p)
      R | visitAuthor(AuthorTree node, P p)
      R | visitComment(CommentTree node, P p)
      R | visitDeprecated(DeprecatedTree node, P p)
      R | visitDocComment(DocCommentTree node, P p)
      R | visitDocRoot(DocRootTree node, P p)
      R | visitEndElement(EndElementTree node, P p)
      R | visitEntity(EntityTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitInheritDoc(InheritDocTree node, P p)
      R | visitLink(LinkTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitOther(DocTree node, P p)
      R | visitParam(ParamTree node, P p)
      R | visitReference(ReferenceTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSee(SeeTree node, P p)
      R | visitSerial(SerialTree node, P p)
      R | visitSerialData(SerialDataTree node, P p)
      R | visitSerialField(SerialFieldTree node, P p)
      R | visitSince(SinceTree node, P p)
      R | visitStartElement(StartElementTree node, P p)
      R | visitText(TextTree node, P p)
      R | visitThrows(ThrowsTree node, P p)
      R | visitUnknownBlockTag(UnknownBlockTagTree node, P p)
      R | visitUnknownInlineTag(UnknownInlineTagTree node, P p)
      R | visitValue(ValueTree node, P p)
      R | visitVersion(VersionTree node, P p)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • DEFAULT_VALUE

        protected final R DEFAULT_VALUE

    • Constructor Detail

      • SimpleDocTreeVisitor

        protected SimpleDocTreeVisitor()

      • SimpleDocTreeVisitor

        protected SimpleDocTreeVisitor(R defaultValue)

    • Method Detail

      • defaultAction

        protected R defaultAction(DocTree node,
                          P p)

      • visit

        public final R visit(DocTree node,
                     P p)

      • visit

        public final R visit(Iterable<? extends DocTree> nodes,
                     P p)

      • visitAttribute

        public R visitAttribute(AttributeTree node,
                        P p)
        Specified by:
        visitAttribute in interface DocTreeVisitor<R,P>

      • visitAuthor

        public R visitAuthor(AuthorTree node,
                     P p)
        Specified by:
        visitAuthor in interface DocTreeVisitor<R,P>

      • visitComment

        public R visitComment(CommentTree node,
                      P p)
        Specified by:
        visitComment in interface DocTreeVisitor<R,P>

      • visitDeprecated

        public R visitDeprecated(DeprecatedTree node,
                         P p)
        Specified by:
        visitDeprecated in interface DocTreeVisitor<R,P>

      • visitDocComment

        public R visitDocComment(DocCommentTree node,
                         P p)
        Specified by:
        visitDocComment in interface DocTreeVisitor<R,P>

      • visitDocRoot

        public R visitDocRoot(DocRootTree node,
                      P p)
        Specified by:
        visitDocRoot in interface DocTreeVisitor<R,P>

      • visitEndElement

        public R visitEndElement(EndElementTree node,
                         P p)
        Specified by:
        visitEndElement in interface DocTreeVisitor<R,P>

      • visitEntity

        public R visitEntity(EntityTree node,
                     P p)
        Specified by:
        visitEntity in interface DocTreeVisitor<R,P>

      • visitErroneous

        public R visitErroneous(ErroneousTree node,
                        P p)
        Specified by:
        visitErroneous in interface DocTreeVisitor<R,P>

      • visitIdentifier

        public R visitIdentifier(IdentifierTree node,
                         P p)
        Specified by:
        visitIdentifier in interface DocTreeVisitor<R,P>

      • visitInheritDoc

        public R visitInheritDoc(InheritDocTree node,
                         P p)
        Specified by:
        visitInheritDoc in interface DocTreeVisitor<R,P>

      • visitLink

        public R visitLink(LinkTree node,
                   P p)
        Specified by:
        visitLink in interface DocTreeVisitor<R,P>

      • visitLiteral

        public R visitLiteral(LiteralTree node,
                      P p)
        Specified by:
        visitLiteral in interface DocTreeVisitor<R,P>

      • visitParam

        public R visitParam(ParamTree node,
                    P p)
        Specified by:
        visitParam in interface DocTreeVisitor<R,P>

      • visitReference

        public R visitReference(ReferenceTree node,
                        P p)
        Specified by:
        visitReference in interface DocTreeVisitor<R,P>

      • visitReturn

        public R visitReturn(ReturnTree node,
                     P p)
        Specified by:
        visitReturn in interface DocTreeVisitor<R,P>

      • visitSee

        public R visitSee(SeeTree node,
                  P p)
        Specified by:
        visitSee in interface DocTreeVisitor<R,P>

      • visitSerial

        public R visitSerial(SerialTree node,
                     P p)
        Specified by:
        visitSerial in interface DocTreeVisitor<R,P>

      • visitSerialData

        public R visitSerialData(SerialDataTree node,
                         P p)
        Specified by:
        visitSerialData in interface DocTreeVisitor<R,P>

      • visitSerialField

        public R visitSerialField(SerialFieldTree node,
                          P p)
        Specified by:
        visitSerialField in interface DocTreeVisitor<R,P>

      • visitSince

        public R visitSince(SinceTree node,
                    P p)
        Specified by:
        visitSince in interface DocTreeVisitor<R,P>

      • visitStartElement

        public R visitStartElement(StartElementTree node,
                           P p)
        Specified by:
        visitStartElement in interface DocTreeVisitor<R,P>

      • visitText

        public R visitText(TextTree node,
                   P p)
        Specified by:
        visitText in interface DocTreeVisitor<R,P>

      • visitThrows

        public R visitThrows(ThrowsTree node,
                     P p)
        Specified by:
        visitThrows in interface DocTreeVisitor<R,P>

      • visitUnknownBlockTag

        public R visitUnknownBlockTag(UnknownBlockTagTree node,
                              P p)
        Specified by:
        visitUnknownBlockTag in interface DocTreeVisitor<R,P>

      • visitUnknownInlineTag

        public R visitUnknownInlineTag(UnknownInlineTagTree node,
                               P p)
        Specified by:
        visitUnknownInlineTag in interface DocTreeVisitor<R,P>

      • visitValue

        public R visitValue(ValueTree node,
                    P p)
        Specified by:
        visitValue in interface DocTreeVisitor<R,P>

      • visitVersion

        public R visitVersion(VersionTree node,
                      P p)
        Specified by:
        visitVersion in interface DocTreeVisitor<R,P>

      • visitOther

        public R visitOther(DocTree node,
                    P p)
        Specified by:
        visitOther in interface DocTreeVisitor<R,P>
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SimpleTreeVisitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class SimpleTreeVisitor<R,P>

  • java.lang.Object
    • com.sun.source.util.SimpleTreeVisitor<R,P>
  • All Implemented Interfaces:
    TreeVisitor<R,P>

    @Exported
public class SimpleTreeVisitor<R,P>
extends Object
implements TreeVisitor<R,P>
    A simple visitor for tree nodes.
    Since:
    1.6

    • Field Summary

      Fields
      Modifier and Type | Field and Description
      protected R | DEFAULT_VALUE

    • Constructor Summary

      Constructors
      Modifier | Constructor and Description
      protected | SimpleTreeVisitor()
      protected | SimpleTreeVisitor(R defaultValue)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      protected R | defaultAction(Tree node, P p)
      R | visit(Iterable<? extends Tree> nodes, P p)
      R | visit(Tree node, P p)
      R | visitAnnotatedType(AnnotatedTypeTree node, P p)
      R | visitAnnotation(AnnotationTree node, P p)
      R | visitArrayAccess(ArrayAccessTree node, P p)
      R | visitArrayType(ArrayTypeTree node, P p)
      R | visitAssert(AssertTree node, P p)
      R | visitAssignment(AssignmentTree node, P p)
      R | visitBinary(BinaryTree node, P p)
      R | visitBlock(BlockTree node, P p)
      R | visitBreak(BreakTree node, P p)
      R | visitCase(CaseTree node, P p)
      R | visitCatch(CatchTree node, P p)
      R | visitClass(ClassTree node, P p)
      R | visitCompilationUnit(CompilationUnitTree node, P p)
      R | visitCompoundAssignment(CompoundAssignmentTree node, P p)
      R | visitConditionalExpression(ConditionalExpressionTree node, P p)
      R | visitContinue(ContinueTree node, P p)
      R | visitDoWhileLoop(DoWhileLoopTree node, P p)
      R | visitEmptyStatement(EmptyStatementTree node, P p)
      R | visitEnhancedForLoop(EnhancedForLoopTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitExpressionStatement(ExpressionStatementTree node, P p)
      R | visitForLoop(ForLoopTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitIf(IfTree node, P p)
      R | visitImport(ImportTree node, P p)
      R | visitInstanceOf(InstanceOfTree node, P p)
      R | visitIntersectionType(IntersectionTypeTree node, P p)
      R | visitLabeledStatement(LabeledStatementTree node, P p)
      R | visitLambdaExpression(LambdaExpressionTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitMemberReference(MemberReferenceTree node, P p)
      R | visitMemberSelect(MemberSelectTree node, P p)
      R | visitMethod(MethodTree node, P p)
      R | visitMethodInvocation(MethodInvocationTree node, P p)
      R | visitModifiers(ModifiersTree node, P p)
      R | visitNewArray(NewArrayTree node, P p)
      R | visitNewClass(NewClassTree node, P p)
      R | visitOther(Tree node, P p)
      R | visitParameterizedType(ParameterizedTypeTree node, P p)
      R | visitParenthesized(ParenthesizedTree node, P p)
      R | visitPrimitiveType(PrimitiveTypeTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSwitch(SwitchTree node, P p)
      R | visitSynchronized(SynchronizedTree node, P p)
      R | visitThrow(ThrowTree node, P p)
      R | visitTry(TryTree node, P p)
      R | visitTypeCast(TypeCastTree node, P p)
      R | visitTypeParameter(TypeParameterTree node, P p)
      R | visitUnary(UnaryTree node, P p)
      R | visitUnionType(UnionTypeTree node, P p)
      R | visitVariable(VariableTree node, P p)
      R | visitWhileLoop(WhileLoopTree node, P p)
      R | visitWildcard(WildcardTree node, P p)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Field Detail

      • DEFAULT_VALUE

        protected final R DEFAULT_VALUE

    • Constructor Detail

      • SimpleTreeVisitor

        protected SimpleTreeVisitor()

      • SimpleTreeVisitor

        protected SimpleTreeVisitor(R defaultValue)

    • Method Detail

      • defaultAction

        protected R defaultAction(Tree node,
                          P p)

      • visit

        public final R visit(Tree node,
                     P p)

      • visit

        public final R visit(Iterable<? extends Tree> nodes,
                     P p)

      • visitCompilationUnit

        public R visitCompilationUnit(CompilationUnitTree node,
                              P p)
        Specified by:
        visitCompilationUnit in interface TreeVisitor<R,P>

      • visitImport

        public R visitImport(ImportTree node,
                     P p)
        Specified by:
        visitImport in interface TreeVisitor<R,P>

      • visitClass

        public R visitClass(ClassTree node,
                    P p)
        Specified by:
        visitClass in interface TreeVisitor<R,P>

      • visitMethod

        public R visitMethod(MethodTree node,
                     P p)
        Specified by:
        visitMethod in interface TreeVisitor<R,P>

      • visitVariable

        public R visitVariable(VariableTree node,
                       P p)
        Specified by:
        visitVariable in interface TreeVisitor<R,P>

      • visitEmptyStatement

        public R visitEmptyStatement(EmptyStatementTree node,
                             P p)
        Specified by:
        visitEmptyStatement in interface TreeVisitor<R,P>

      • visitBlock

        public R visitBlock(BlockTree node,
                    P p)
        Specified by:
        visitBlock in interface TreeVisitor<R,P>

      • visitDoWhileLoop

        public R visitDoWhileLoop(DoWhileLoopTree node,
                          P p)
        Specified by:
        visitDoWhileLoop in interface TreeVisitor<R,P>

      • visitWhileLoop

        public R visitWhileLoop(WhileLoopTree node,
                        P p)
        Specified by:
        visitWhileLoop in interface TreeVisitor<R,P>

      • visitForLoop

        public R visitForLoop(ForLoopTree node,
                      P p)
        Specified by:
        visitForLoop in interface TreeVisitor<R,P>

      • visitEnhancedForLoop

        public R visitEnhancedForLoop(EnhancedForLoopTree node,
                              P p)
        Specified by:
        visitEnhancedForLoop in interface TreeVisitor<R,P>

      • visitLabeledStatement

        public R visitLabeledStatement(LabeledStatementTree node,
                               P p)
        Specified by:
        visitLabeledStatement in interface TreeVisitor<R,P>

      • visitSwitch

        public R visitSwitch(SwitchTree node,
                     P p)
        Specified by:
        visitSwitch in interface TreeVisitor<R,P>

      • visitCase

        public R visitCase(CaseTree node,
                   P p)
        Specified by:
        visitCase in interface TreeVisitor<R,P>

      • visitSynchronized

        public R visitSynchronized(SynchronizedTree node,
                           P p)
        Specified by:
        visitSynchronized in interface TreeVisitor<R,P>

      • visitTry

        public R visitTry(TryTree node,
                  P p)
        Specified by:
        visitTry in interface TreeVisitor<R,P>

      • visitCatch

        public R visitCatch(CatchTree node,
                    P p)
        Specified by:
        visitCatch in interface TreeVisitor<R,P>

      • visitConditionalExpression

        public R visitConditionalExpression(ConditionalExpressionTree node,
                                    P p)
        Specified by:
        visitConditionalExpression in interface TreeVisitor<R,P>

      • visitIf

        public R visitIf(IfTree node,
                 P p)
        Specified by:
        visitIf in interface TreeVisitor<R,P>

      • visitExpressionStatement

        public R visitExpressionStatement(ExpressionStatementTree node,
                                  P p)
        Specified by:
        visitExpressionStatement in interface TreeVisitor<R,P>

      • visitBreak

        public R visitBreak(BreakTree node,
                    P p)
        Specified by:
        visitBreak in interface TreeVisitor<R,P>

      • visitContinue

        public R visitContinue(ContinueTree node,
                       P p)
        Specified by:
        visitContinue in interface TreeVisitor<R,P>

      • visitReturn

        public R visitReturn(ReturnTree node,
                     P p)
        Specified by:
        visitReturn in interface TreeVisitor<R,P>

      • visitThrow

        public R visitThrow(ThrowTree node,
                    P p)
        Specified by:
        visitThrow in interface TreeVisitor<R,P>

      • visitAssert

        public R visitAssert(AssertTree node,
                     P p)
        Specified by:
        visitAssert in interface TreeVisitor<R,P>

      • visitMethodInvocation

        public R visitMethodInvocation(MethodInvocationTree node,
                               P p)
        Specified by:
        visitMethodInvocation in interface TreeVisitor<R,P>

      • visitNewClass

        public R visitNewClass(NewClassTree node,
                       P p)
        Specified by:
        visitNewClass in interface TreeVisitor<R,P>

      • visitNewArray

        public R visitNewArray(NewArrayTree node,
                       P p)
        Specified by:
        visitNewArray in interface TreeVisitor<R,P>

      • visitLambdaExpression

        public R visitLambdaExpression(LambdaExpressionTree node,
                               P p)
        Specified by:
        visitLambdaExpression in interface TreeVisitor<R,P>

      • visitParenthesized

        public R visitParenthesized(ParenthesizedTree node,
                            P p)
        Specified by:
        visitParenthesized in interface TreeVisitor<R,P>

      • visitAssignment

        public R visitAssignment(AssignmentTree node,
                         P p)
        Specified by:
        visitAssignment in interface TreeVisitor<R,P>

      • visitCompoundAssignment

        public R visitCompoundAssignment(CompoundAssignmentTree node,
                                 P p)
        Specified by:
        visitCompoundAssignment in interface TreeVisitor<R,P>

      • visitUnary

        public R visitUnary(UnaryTree node,
                    P p)
        Specified by:
        visitUnary in interface TreeVisitor<R,P>

      • visitBinary

        public R visitBinary(BinaryTree node,
                     P p)
        Specified by:
        visitBinary in interface TreeVisitor<R,P>

      • visitTypeCast

        public R visitTypeCast(TypeCastTree node,
                       P p)
        Specified by:
        visitTypeCast in interface TreeVisitor<R,P>

      • visitInstanceOf

        public R visitInstanceOf(InstanceOfTree node,
                         P p)
        Specified by:
        visitInstanceOf in interface TreeVisitor<R,P>

      • visitArrayAccess

        public R visitArrayAccess(ArrayAccessTree node,
                          P p)
        Specified by:
        visitArrayAccess in interface TreeVisitor<R,P>

      • visitMemberSelect

        public R visitMemberSelect(MemberSelectTree node,
                           P p)
        Specified by:
        visitMemberSelect in interface TreeVisitor<R,P>

      • visitMemberReference

        public R visitMemberReference(MemberReferenceTree node,
                              P p)
        Specified by:
        visitMemberReference in interface TreeVisitor<R,P>

      • visitIdentifier

        public R visitIdentifier(IdentifierTree node,
                         P p)
        Specified by:
        visitIdentifier in interface TreeVisitor<R,P>

      • visitLiteral

        public R visitLiteral(LiteralTree node,
                      P p)
        Specified by:
        visitLiteral in interface TreeVisitor<R,P>

      • visitPrimitiveType

        public R visitPrimitiveType(PrimitiveTypeTree node,
                            P p)
        Specified by:
        visitPrimitiveType in interface TreeVisitor<R,P>

      • visitArrayType

        public R visitArrayType(ArrayTypeTree node,
                        P p)
        Specified by:
        visitArrayType in interface TreeVisitor<R,P>

      • visitParameterizedType

        public R visitParameterizedType(ParameterizedTypeTree node,
                                P p)
        Specified by:
        visitParameterizedType in interface TreeVisitor<R,P>

      • visitUnionType

        public R visitUnionType(UnionTypeTree node,
                        P p)
        Specified by:
        visitUnionType in interface TreeVisitor<R,P>

      • visitIntersectionType

        public R visitIntersectionType(IntersectionTypeTree node,
                               P p)
        Specified by:
        visitIntersectionType in interface TreeVisitor<R,P>

      • visitTypeParameter

        public R visitTypeParameter(TypeParameterTree node,
                            P p)
        Specified by:
        visitTypeParameter in interface TreeVisitor<R,P>

      • visitWildcard

        public R visitWildcard(WildcardTree node,
                       P p)
        Specified by:
        visitWildcard in interface TreeVisitor<R,P>

      • visitModifiers

        public R visitModifiers(ModifiersTree node,
                        P p)
        Specified by:
        visitModifiers in interface TreeVisitor<R,P>

      • visitAnnotation

        public R visitAnnotation(AnnotationTree node,
                         P p)
        Specified by:
        visitAnnotation in interface TreeVisitor<R,P>

      • visitAnnotatedType

        public R visitAnnotatedType(AnnotatedTypeTree node,
                            P p)
        Specified by:
        visitAnnotatedType in interface TreeVisitor<R,P>

      • visitErroneous

        public R visitErroneous(ErroneousTree node,
                        P p)
        Specified by:
        visitErroneous in interface TreeVisitor<R,P>

      • visitOther

        public R visitOther(Tree node,
                    P p)
        Specified by:
        visitOther in interface TreeVisitor<R,P>
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


SourcePositions

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Interface SourcePositions

  • All Known Subinterfaces:
    DocSourcePositions

    @Exported
public interface SourcePositions
    Provides methods to obtain the position of a Tree within a CompilationUnit. A position is defined as a simple character offset from the start of a CompilationUnit where the first character is at offset 0.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      long getEndPosition(CompilationUnitTree file, Tree tree)
      Gets the ending position of tree within file.
      long getStartPosition(CompilationUnitTree file, Tree tree)
      Gets the starting position of tree within file.

    • Method Detail

      • getStartPosition

        long getStartPosition(CompilationUnitTree file,
                      Tree tree)
        Gets the starting position of tree within file. If tree is not found within file, or if the starting position is not available, return Diagnostic.NOPOS. The returned position must be at the start of the yield of this tree, that is for any sub-tree of this tree, the following must hold:

        tree.getStartPosition() <= subtree.getStartPosition() or
        tree.getStartPosition() == NOPOS or
        subtree.getStartPosition() == NOPOS

        Parameters:
        file - CompilationUnit in which to find tree.
        tree - tree for which a position is sought.
        Returns:
        the start position of tree.

      • getEndPosition

        long getEndPosition(CompilationUnitTree file,
                    Tree tree)
        Gets the ending position of tree within file. If tree is not found within file, or if the ending position is not available, return Diagnostic.NOPOS. The returned position must be at the end of the yield of this tree, that is for any sub-tree of this tree, the following must hold:

        tree.getEndPosition() >= subtree.getEndPosition() or
        tree.getEndPosition() == NOPOS or
        subtree.getEndPosition() == NOPOS

        In addition, the following must hold:

        tree.getStartPosition() <= tree.getEndPosition() or
        tree.getStartPosition() == NOPOS or
        tree.getEndPosition() == NOPOS

        Parameters:
        file - CompilationUnit in which to find tree.
        tree - tree for which a position is sought.
        Returns:
        the end position of tree.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TaskEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class TaskEvent

  • java.lang.Object
    • com.sun.source.util.TaskEvent

  • @Exported
public final class TaskEvent
extends Object
    Provides details about work that has been done by the JDK Java Compiler, javac.
    Since:
    1.6

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  TaskEvent.Kind
      Kind of task event.

    • Constructor Summary

      Constructors
      Constructor and Description
      TaskEvent(TaskEvent.Kind kind)
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit)
      TaskEvent(TaskEvent.Kind kind, CompilationUnitTree unit, TypeElement clazz)
      TaskEvent(TaskEvent.Kind kind, JavaFileObject sourceFile)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      CompilationUnitTree getCompilationUnit()
      TaskEvent.Kind getKind()
      JavaFileObject getSourceFile()
      TypeElement getTypeElement()
      String toString()
      Returns a string representation of the object.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TaskEvent

        public TaskEvent(TaskEvent.Kind kind)

      • TaskEvent

        public TaskEvent(TaskEvent.Kind kind,
                 JavaFileObject sourceFile)

      • TaskEvent

        public TaskEvent(TaskEvent.Kind kind,
                 CompilationUnitTree unit)

      • TaskEvent

        public TaskEvent(TaskEvent.Kind kind,
                 CompilationUnitTree unit,
                 TypeElement clazz)

    • Method Detail

      • getKind

        public TaskEvent.Kind getKind()

      • getSourceFile

        public JavaFileObject getSourceFile()

      • getCompilationUnit

        public CompilationUnitTree getCompilationUnit()

      • getTypeElement

        public TypeElement getTypeElement()

      • toString

        public String toString()
        Description copied from class: java.lang.Object
        Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

        The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

         getClass().getName() + '@' + Integer.toHexString(hashCode())
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TaskEvent.Kind

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.source.util

Enum TaskEvent.Kind

  • java.lang.Object
    • java.lang.Enum<TaskEvent.Kind>
      • com.sun.source.util.TaskEvent.Kind
  • All Implemented Interfaces:
    Serializable, Comparable<TaskEvent.Kind>
    Enclosing class:
    TaskEvent

    @Exported
public static enum TaskEvent.Kind
extends Enum<TaskEvent.Kind>
    Kind of task event.
    Since:
    1.6

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      ANALYZE
      For events relating to elements being analyzed for errors.
      ANNOTATION_PROCESSING
      For events relating to overall annotation processing.
      ANNOTATION_PROCESSING_ROUND
      For events relating to an individual annotation processing round.
      ENTER
      For events relating to elements being entered.
      GENERATE
      For events relating to class files being generated.
      PARSE
      For events related to the parsing of a file.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static TaskEvent.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static TaskEvent.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • PARSE

        public static final TaskEvent.Kind PARSE
        For events related to the parsing of a file.

      • ENTER

        public static final TaskEvent.Kind ENTER
        For events relating to elements being entered.

      • ANALYZE

        public static final TaskEvent.Kind ANALYZE
        For events relating to elements being analyzed for errors.

      • GENERATE

        public static final TaskEvent.Kind GENERATE
        For events relating to class files being generated.

      • ANNOTATION_PROCESSING

        public static final TaskEvent.Kind ANNOTATION_PROCESSING
        For events relating to overall annotation processing.

      • ANNOTATION_PROCESSING_ROUND

        public static final TaskEvent.Kind ANNOTATION_PROCESSING_ROUND
        For events relating to an individual annotation processing round.

    • Method Detail

      • values

        public static TaskEvent.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TaskEvent.Kind c : TaskEvent.Kind.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static TaskEvent.Kind valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TaskListener

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Interface TaskListener

  • @Exported
public interface TaskListener
    Provides a listener to monitor the activity of the JDK Java Compiler, javac.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      void | finished(TaskEvent e)
      void | started(TaskEvent e)

    • Method Detail

      • started

        void started(TaskEvent e)

      • finished

        void finished(TaskEvent e)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TreePath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class TreePath

  • java.lang.Object
    • com.sun.source.util.TreePath
  • All Implemented Interfaces:
    Iterable<Tree>

    @Exported
public class TreePath
extends Object
implements Iterable<Tree>
    A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level CompilationUnitTree node.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      TreePath(CompilationUnitTree t)
      Creates a TreePath for a root node.
      TreePath(TreePath p, Tree t)
      Creates a TreePath for a child node.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      CompilationUnitTree getCompilationUnit()
      Get the compilation unit associated with this path.
      Tree getLeaf()
      Get the leaf node for this path.
      TreePath getParentPath()
      Get the path for the enclosing node, or null if there is no enclosing node.
      static TreePath getPath(CompilationUnitTree unit, Tree target)
      Gets a tree path for a tree node within a compilation unit.
      static TreePath getPath(TreePath path, Tree target)
      Gets a tree path for a tree node within a subtree identified by a TreePath object.
      Iterator<Tree> iterator()
      Iterates from leaves to root.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator

    • Constructor Detail

      • TreePath

        public TreePath(CompilationUnitTree t)
        Creates a TreePath for a root node.

      • TreePath

        public TreePath(TreePath p,
                Tree t)
        Creates a TreePath for a child node.

    • Method Detail

      • getPath

        public static TreePath getPath(CompilationUnitTree unit,
                               Tree target)
        Gets a tree path for a tree node within a compilation unit.
        Returns:
        null if the node is not found

      • getPath

        public static TreePath getPath(TreePath path,
                               Tree target)
        Gets a tree path for a tree node within a subtree identified by a TreePath object.
        Returns:
        null if the node is not found

      • getCompilationUnit

        public CompilationUnitTree getCompilationUnit()
        Get the compilation unit associated with this path.

      • getLeaf

        public Tree getLeaf()
        Get the leaf node for this path.

      • getParentPath

        public TreePath getParentPath()
        Get the path for the enclosing node, or null if there is no enclosing node.

      • iterator

        public Iterator<Tree> iterator()
        Iterates from leaves to root.
        Specified by:
        iterator in interface Iterable<Tree>
        Returns:
        an Iterator.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TreePathScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class TreePathScanner<R,P>

  • java.lang.Object
    • com.sun.source.util.TreeScanner<R,P>
      • com.sun.source.util.TreePathScanner<R,P>
  • All Implemented Interfaces:
    TreeVisitor<R,P>

    @Exported
public class TreePathScanner<R,P>
extends TreeScanner<R,P>
    A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes. To visit nodes of a particular type, just override the corresponding visitorXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      TreePathScanner()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      TreePath getCurrentPath()
      Get the current path for the node, as built up by the currently active set of scan calls.
      R scan(Tree tree, P p)
      Scan a single node.
      R scan(TreePath path, P p)
      Scan a tree from a position identified by a TreePath.

      • Methods inherited from class com.sun.source.util.TreeScanner

        reduce, scan, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewArray, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitVariable, visitWhileLoop, visitWildcard

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TreePathScanner

        public TreePathScanner()

    • Method Detail

      • scan

        public R scan(TreePath path,
              P p)
        Scan a tree from a position identified by a TreePath.

      • scan

        public R scan(Tree tree,
              P p)
        Scan a single node. The current path is updated for the duration of the scan.
        Overrides:
        scan in class TreeScanner<R,P>

      • getCurrentPath

        public TreePath getCurrentPath()
        Get the current path for the node, as built up by the currently active set of scan calls.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Trees

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class Trees

  • java.lang.Object
    • com.sun.source.util.Trees
  • Direct Known Subclasses:
    DocTrees

    @Exported
public abstract class Trees
extends Object
    Bridges JSR 199, JSR 269, and the Tree API.

    • Constructor Summary

      Constructors
      Constructor and Description
      Trees()

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      abstract String getDocComment(TreePath path)
      Gets the doc comment, if any, for the Tree node identified by a given TreePath.
      abstract Element getElement(TreePath path)
      Gets the Element for the Tree node identified by a given TreePath.
      abstract TypeMirror getLub(CatchTree tree)
      Gets the lub of an exception parameter declared in a catch clause.
      abstract TypeMirror getOriginalType(ErrorType errorType)
      Gets the original type from the ErrorType object.
      abstract TreePath getPath(CompilationUnitTree unit, Tree node)
      Gets the path to tree node within the specified compilation unit.
      abstract TreePath getPath(Element e)
      Gets the TreePath node for a given Element.
      abstract TreePath getPath(Element e, AnnotationMirror a)
      Gets the TreePath node for an AnnotationMirror on a given Element.
      abstract TreePath getPath(Element e, AnnotationMirror a, AnnotationValue v)
      Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element.
      abstract Scope getScope(TreePath path)
      Gets the Scope for the Tree node identified by a given TreePath.
      abstract SourcePositions getSourcePositions()
      Gets a utility object for obtaining source positions.
      abstract Tree getTree(Element element)
      Gets the Tree node for a given Element.
      abstract Tree getTree(Element e, AnnotationMirror a)
      Gets the Tree node for an AnnotationMirror on a given Element.
      abstract Tree getTree(Element e, AnnotationMirror a, AnnotationValue v)
      Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element.
      abstract MethodTree getTree(ExecutableElement method)
      Gets the MethodTree node for a given ExecutableElement.
      abstract ClassTree getTree(TypeElement element)
      Gets the ClassTree node for a given TypeElement.
      abstract TypeMirror getTypeMirror(TreePath path)
      Gets the TypeMirror for the Tree node identified by a given TreePath.
      static Trees instance(JavaCompiler.CompilationTask task)
      Gets a Trees object for a given CompilationTask.
      static Trees instance(ProcessingEnvironment env)
      Gets a Trees object for a given ProcessingEnvironment.
      abstract boolean isAccessible(Scope scope, Element member, DeclaredType type)
      Checks whether the given element is accessible as a member of the given type in a given scope.
      abstract boolean isAccessible(Scope scope, TypeElement type)
      Checks whether a given type is accessible in a given scope.
      abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
      Prints a message of the specified kind at the location of the tree within the provided compilation unit

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Trees

        public Trees()

    • Method Detail

      • instance

        public static Trees instance(JavaCompiler.CompilationTask task)
        Gets a Trees object for a given CompilationTask.
        Parameters:
        task - the compilation task for which to get the Trees object
        Throws:
        IllegalArgumentException - if the task does not support the Trees API.

      • instance

        public static Trees instance(ProcessingEnvironment env)
        Gets a Trees object for a given ProcessingEnvironment.
        Parameters:
        env - the processing environment for which to get the Trees object
        Throws:
        IllegalArgumentException - if the env does not support the Trees API.

      • getSourcePositions

        public abstract SourcePositions getSourcePositions()
        Gets a utility object for obtaining source positions.

      • getTree

        public abstract Tree getTree(Element element)
        Gets the Tree node for a given Element. Returns null if the node can not be found.

      • getTree

        public abstract ClassTree getTree(TypeElement element)
        Gets the ClassTree node for a given TypeElement. Returns null if the node can not be found.

      • getTree

        public abstract MethodTree getTree(ExecutableElement method)
        Gets the MethodTree node for a given ExecutableElement. Returns null if the node can not be found.

      • getTree

        public abstract Tree getTree(Element e,
                             AnnotationMirror a)
        Gets the Tree node for an AnnotationMirror on a given Element. Returns null if the node can not be found.

      • getTree

        public abstract Tree getTree(Element e,
                             AnnotationMirror a,
                             AnnotationValue v)
        Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element. Returns null if the node can not be found.

      • getPath

        public abstract TreePath getPath(CompilationUnitTree unit,
                                 Tree node)
        Gets the path to tree node within the specified compilation unit.

      • getPath

        public abstract TreePath getPath(Element e)
        Gets the TreePath node for a given Element. Returns null if the node can not be found.

      • getPath

        public abstract TreePath getPath(Element e,
                                 AnnotationMirror a)
        Gets the TreePath node for an AnnotationMirror on a given Element. Returns null if the node can not be found.

      • getPath

        public abstract TreePath getPath(Element e,
                                 AnnotationMirror a,
                                 AnnotationValue v)
        Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element. Returns null if the node can not be found.

      • getElement

        public abstract Element getElement(TreePath path)
        Gets the Element for the Tree node identified by a given TreePath. Returns null if the element is not available.
        Throws:
        IllegalArgumentException - is the TreePath does not identify a Tree node that might have an associated Element.

      • getTypeMirror

        public abstract TypeMirror getTypeMirror(TreePath path)
        Gets the TypeMirror for the Tree node identified by a given TreePath. Returns null if the TypeMirror is not available.
        Throws:
        IllegalArgumentException - is the TreePath does not identify a Tree node that might have an associated TypeMirror.

      • getScope

        public abstract Scope getScope(TreePath path)
        Gets the Scope for the Tree node identified by a given TreePath. Returns null if the Scope is not available.

      • getDocComment

        public abstract String getDocComment(TreePath path)
        Gets the doc comment, if any, for the Tree node identified by a given TreePath. Returns null if no doc comment was found.
        See Also:
        DocTrees.getDocCommentTree(TreePath)

      • isAccessible

        public abstract boolean isAccessible(Scope scope,
                                     TypeElement type)
        Checks whether a given type is accessible in a given scope.
        Parameters:
        scope - the scope to be checked
        type - the type to be checked
        Returns:
        true if type is accessible

      • isAccessible

        public abstract boolean isAccessible(Scope scope,
                                     Element member,
                                     DeclaredType type)
        Checks whether the given element is accessible as a member of the given type in a given scope.
        Parameters:
        scope - the scope to be checked
        member - the member to be checked
        type - the type for which to check if the member is accessible
        Returns:
        true if member is accessible in type

      • getOriginalType

        public abstract TypeMirror getOriginalType(ErrorType errorType)
        Gets the original type from the ErrorType object.
        Parameters:
        errorType - The errorType for which we want to get the original type.
        Returns:
        javax.lang.model.type.TypeMirror corresponding to the original type, replaced by the ErrorType.

      • printMessage

        public abstract void printMessage(Diagnostic.Kind kind,
                                  CharSequence msg,
                                  Tree t,
                                  CompilationUnitTree root)
        Prints a message of the specified kind at the location of the tree within the provided compilation unit
        Parameters:
        kind - the kind of message
        msg - the message, or an empty string if none
        t - the tree to use as a position hint
        root - the compilation unit that contains tree

      • getLub

        public abstract TypeMirror getLub(CatchTree tree)
        Gets the lub of an exception parameter declared in a catch clause.
        Parameters:
        tree - the tree for the catch clause
        Returns:
        The lub of the exception parameter
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


TreeScanner

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.source.util

Class TreeScanner<R,P>

  • java.lang.Object
    • com.sun.source.util.TreeScanner<R,P>
  • All Implemented Interfaces:
    TreeVisitor<R,P>
    Direct Known Subclasses:
    TreePathScanner

    @Exported
public class TreeScanner<R,P>
extends Object
implements TreeVisitor<R,P>
    A TreeVisitor that visits all the child tree nodes. To visit nodes of a particular type, just override the corresponding visitXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.

    The default implementation of the visitXYZ methods will determine a result as follows:

    • If the node being visited has no children, the result will be null.
    • If the node being visited has one child, the result will be the result of calling scan on that child. The child may be a simple node or itself a list of nodes.
    • If the node being visited has more than one child, the result will be determined by calling scan each child in turn, and then combining the result of each scan after the first with the cumulative result so far, as determined by the reduce(R, R) method. Each child may be either a simple node of a list of nodes. The default behavior of the reduce method is such that the result of the visitXYZ method will be the result of the last child scanned.

    Here is an example to count the number of identifier nodes in a tree:

       class CountIdentifiers extends TreeScanner<Integer,Void> {
       @Override
      public Integer visitIdentifier(IdentifierTree node, Void p) {
          return 1;
      }
       @Override
      public Integer reduce(Integer r1, Integer r2) {
          return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
      }
   }
    Since:
    1.6

    • Constructor Summary

      Constructors
      Constructor and Description
      TreeScanner()

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      R reduce(R r1, R r2)
      Reduces two results into a combined result.
      R scan(Iterable<? extends Tree> nodes, P p)
      Scan a list of nodes.
      R scan(Tree node, P p)
      Scan a single node.
      R | visitAnnotatedType(AnnotatedTypeTree node, P p)
      R | visitAnnotation(AnnotationTree node, P p)
      R | visitArrayAccess(ArrayAccessTree node, P p)
      R | visitArrayType(ArrayTypeTree node, P p)
      R | visitAssert(AssertTree node, P p)
      R | visitAssignment(AssignmentTree node, P p)
      R | visitBinary(BinaryTree node, P p)
      R | visitBlock(BlockTree node, P p)
      R | visitBreak(BreakTree node, P p)
      R | visitCase(CaseTree node, P p)
      R | visitCatch(CatchTree node, P p)
      R | visitClass(ClassTree node, P p)
      R | visitCompilationUnit(CompilationUnitTree node, P p)
      R | visitCompoundAssignment(CompoundAssignmentTree node, P p)
      R | visitConditionalExpression(ConditionalExpressionTree node, P p)
      R | visitContinue(ContinueTree node, P p)
      R | visitDoWhileLoop(DoWhileLoopTree node, P p)
      R | visitEmptyStatement(EmptyStatementTree node, P p)
      R | visitEnhancedForLoop(EnhancedForLoopTree node, P p)
      R | visitErroneous(ErroneousTree node, P p)
      R | visitExpressionStatement(ExpressionStatementTree node, P p)
      R | visitForLoop(ForLoopTree node, P p)
      R | visitIdentifier(IdentifierTree node, P p)
      R | visitIf(IfTree node, P p)
      R | visitImport(ImportTree node, P p)
      R | visitInstanceOf(InstanceOfTree node, P p)
      R | visitIntersectionType(IntersectionTypeTree node, P p)
      R | visitLabeledStatement(LabeledStatementTree node, P p)
      R | visitLambdaExpression(LambdaExpressionTree node, P p)
      R | visitLiteral(LiteralTree node, P p)
      R | visitMemberReference(MemberReferenceTree node, P p)
      R | visitMemberSelect(MemberSelectTree node, P p)
      R | visitMethod(MethodTree node, P p)
      R | visitMethodInvocation(MethodInvocationTree node, P p)
      R | visitModifiers(ModifiersTree node, P p)
      R | visitNewArray(NewArrayTree node, P p)
      R | visitNewClass(NewClassTree node, P p)
      R | visitOther(Tree node, P p)
      R | visitParameterizedType(ParameterizedTypeTree node, P p)
      R | visitParenthesized(ParenthesizedTree node, P p)
      R | visitPrimitiveType(PrimitiveTypeTree node, P p)
      R | visitReturn(ReturnTree node, P p)
      R | visitSwitch(SwitchTree node, P p)
      R | visitSynchronized(SynchronizedTree node, P p)
      R | visitThrow(ThrowTree node, P p)
      R | visitTry(TryTree node, P p)
      R | visitTypeCast(TypeCastTree node, P p)
      R | visitTypeParameter(TypeParameterTree node, P p)
      R | visitUnary(UnaryTree node, P p)
      R | visitUnionType(UnionTypeTree node, P p)
      R | visitVariable(VariableTree node, P p)
      R | visitWhileLoop(WhileLoopTree node, P p)
      R | visitWildcard(WildcardTree node, P p)

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TreeScanner

        public TreeScanner()

    • Method Detail

      • scan

        public R scan(Tree node,
              P p)
        Scan a single node.

      • scan

        public R scan(Iterable<? extends Tree> nodes,
              P p)
        Scan a list of nodes.

      • reduce

        public R reduce(R r1,
                R r2)
        Reduces two results into a combined result. The default implementation is to return the first parameter. The general contract of the method is that it may take any action whatsoever.

      • visitCompilationUnit

        public R visitCompilationUnit(CompilationUnitTree node,
                              P p)
        Specified by:
        visitCompilationUnit in interface TreeVisitor<R,P>

      • visitImport

        public R visitImport(ImportTree node,
                     P p)
        Specified by:
        visitImport in interface TreeVisitor<R,P>

      • visitClass

        public R visitClass(ClassTree node,
                    P p)
        Specified by:
        visitClass in interface TreeVisitor<R,P>

      • visitMethod

        public R visitMethod(MethodTree node,
                     P p)
        Specified by:
        visitMethod in interface TreeVisitor<R,P>

      • visitVariable

        public R visitVariable(VariableTree node,
                       P p)
        Specified by:
        visitVariable in interface TreeVisitor<R,P>

      • visitEmptyStatement

        public R visitEmptyStatement(EmptyStatementTree node,
                             P p)
        Specified by:
        visitEmptyStatement in interface TreeVisitor<R,P>

      • visitBlock

        public R visitBlock(BlockTree node,
                    P p)
        Specified by:
        visitBlock in interface TreeVisitor<R,P>

      • visitDoWhileLoop

        public R visitDoWhileLoop(DoWhileLoopTree node,
                          P p)
        Specified by:
        visitDoWhileLoop in interface TreeVisitor<R,P>

      • visitWhileLoop

        public R visitWhileLoop(WhileLoopTree node,
                        P p)
        Specified by:
        visitWhileLoop in interface TreeVisitor<R,P>

      • visitForLoop

        public R visitForLoop(ForLoopTree node,
                      P p)
        Specified by:
        visitForLoop in interface TreeVisitor<R,P>

      • visitEnhancedForLoop

        public R visitEnhancedForLoop(EnhancedForLoopTree node,
                              P p)
        Specified by:
        visitEnhancedForLoop in interface TreeVisitor<R,P>

      • visitLabeledStatement

        public R visitLabeledStatement(LabeledStatementTree node,
                               P p)
        Specified by:
        visitLabeledStatement in interface TreeVisitor<R,P>

      • visitSwitch

        public R visitSwitch(SwitchTree node,
                     P p)
        Specified by:
        visitSwitch in interface TreeVisitor<R,P>

      • visitCase

        public R visitCase(CaseTree node,
                   P p)
        Specified by:
        visitCase in interface TreeVisitor<R,P>

      • visitSynchronized

        public R visitSynchronized(SynchronizedTree node,
                           P p)
        Specified by:
        visitSynchronized in interface TreeVisitor<R,P>

      • visitTry

        public R visitTry(TryTree node,
                  P p)
        Specified by:
        visitTry in interface TreeVisitor<R,P>

      • visitCatch

        public R visitCatch(CatchTree node,
                    P p)
        Specified by:
        visitCatch in interface TreeVisitor<R,P>

      • visitConditionalExpression

        public R visitConditionalExpression(ConditionalExpressionTree node,
                                    P p)
        Specified by:
        visitConditionalExpression in interface TreeVisitor<R,P>

      • visitIf

        public R visitIf(IfTree node,
                 P p)
        Specified by:
        visitIf in interface TreeVisitor<R,P>

      • visitExpressionStatement

        public R visitExpressionStatement(ExpressionStatementTree node,
                                  P p)
        Specified by:
        visitExpressionStatement in interface TreeVisitor<R,P>

      • visitBreak

        public R visitBreak(BreakTree node,
                    P p)
        Specified by:
        visitBreak in interface TreeVisitor<R,P>

      • visitContinue

        public R visitContinue(ContinueTree node,
                       P p)
        Specified by:
        visitContinue in interface TreeVisitor<R,P>

      • visitReturn

        public R visitReturn(ReturnTree node,
                     P p)
        Specified by:
        visitReturn in interface TreeVisitor<R,P>

      • visitThrow

        public R visitThrow(ThrowTree node,
                    P p)
        Specified by:
        visitThrow in interface TreeVisitor<R,P>

      • visitAssert

        public R visitAssert(AssertTree node,
                     P p)
        Specified by:
        visitAssert in interface TreeVisitor<R,P>

      • visitMethodInvocation

        public R visitMethodInvocation(MethodInvocationTree node,
                               P p)
        Specified by:
        visitMethodInvocation in interface TreeVisitor<R,P>

      • visitNewClass

        public R visitNewClass(NewClassTree node,
                       P p)
        Specified by:
        visitNewClass in interface TreeVisitor<R,P>

      • visitNewArray

        public R visitNewArray(NewArrayTree node,
                       P p)
        Specified by:
        visitNewArray in interface TreeVisitor<R,P>

      • visitLambdaExpression

        public R visitLambdaExpression(LambdaExpressionTree node,
                               P p)
        Specified by:
        visitLambdaExpression in interface TreeVisitor<R,P>

      • visitParenthesized

        public R visitParenthesized(ParenthesizedTree node,
                            P p)
        Specified by:
        visitParenthesized in interface TreeVisitor<R,P>

      • visitAssignment

        public R visitAssignment(AssignmentTree node,
                         P p)
        Specified by:
        visitAssignment in interface TreeVisitor<R,P>

      • visitCompoundAssignment

        public R visitCompoundAssignment(CompoundAssignmentTree node,
                                 P p)
        Specified by:
        visitCompoundAssignment in interface TreeVisitor<R,P>

      • visitUnary

        public R visitUnary(UnaryTree node,
                    P p)
        Specified by:
        visitUnary in interface TreeVisitor<R,P>

      • visitBinary

        public R visitBinary(BinaryTree node,
                     P p)
        Specified by:
        visitBinary in interface TreeVisitor<R,P>

      • visitTypeCast

        public R visitTypeCast(TypeCastTree node,
                       P p)
        Specified by:
        visitTypeCast in interface TreeVisitor<R,P>

      • visitInstanceOf

        public R visitInstanceOf(InstanceOfTree node,
                         P p)
        Specified by:
        visitInstanceOf in interface TreeVisitor<R,P>

      • visitArrayAccess

        public R visitArrayAccess(ArrayAccessTree node,
                          P p)
        Specified by:
        visitArrayAccess in interface TreeVisitor<R,P>

      • visitMemberSelect

        public R visitMemberSelect(MemberSelectTree node,
                           P p)
        Specified by:
        visitMemberSelect in interface TreeVisitor<R,P>

      • visitMemberReference

        public R visitMemberReference(MemberReferenceTree node,
                              P p)
        Specified by:
        visitMemberReference in interface TreeVisitor<R,P>

      • visitIdentifier

        public R visitIdentifier(IdentifierTree node,
                         P p)
        Specified by:
        visitIdentifier in interface TreeVisitor<R,P>

      • visitLiteral

        public R visitLiteral(LiteralTree node,
                      P p)
        Specified by:
        visitLiteral in interface TreeVisitor<R,P>

      • visitPrimitiveType

        public R visitPrimitiveType(PrimitiveTypeTree node,
                            P p)
        Specified by:
        visitPrimitiveType in interface TreeVisitor<R,P>

      • visitArrayType

        public R visitArrayType(ArrayTypeTree node,
                        P p)
        Specified by:
        visitArrayType in interface TreeVisitor<R,P>

      • visitParameterizedType

        public R visitParameterizedType(ParameterizedTypeTree node,
                                P p)
        Specified by:
        visitParameterizedType in interface TreeVisitor<R,P>

      • visitUnionType

        public R visitUnionType(UnionTypeTree node,
                        P p)
        Specified by:
        visitUnionType in interface TreeVisitor<R,P>

      • visitIntersectionType

        public R visitIntersectionType(IntersectionTypeTree node,
                               P p)
        Specified by:
        visitIntersectionType in interface TreeVisitor<R,P>

      • visitTypeParameter

        public R visitTypeParameter(TypeParameterTree node,
                            P p)
        Specified by:
        visitTypeParameter in interface TreeVisitor<R,P>

      • visitWildcard

        public R visitWildcard(WildcardTree node,
                       P p)
        Specified by:
        visitWildcard in interface TreeVisitor<R,P>

      • visitModifiers

        public R visitModifiers(ModifiersTree node,
                        P p)
        Specified by:
        visitModifiers in interface TreeVisitor<R,P>

      • visitAnnotation

        public R visitAnnotation(AnnotationTree node,
                         P p)
        Specified by:
        visitAnnotation in interface TreeVisitor<R,P>

      • visitAnnotatedType

        public R visitAnnotatedType(AnnotatedTypeTree node,
                            P p)
        Specified by:
        visitAnnotatedType in interface TreeVisitor<R,P>

      • visitOther

        public R visitOther(Tree node,
                    P p)
        Specified by:
        visitOther in interface TreeVisitor<R,P>

      • visitErroneous

        public R visitErroneous(ErroneousTree node,
                        P p)
        Specified by:
        visitErroneous in interface TreeVisitor<R,P>
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


jdk

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Package jdk

  • Annotation Types Summary
    Annotation Type Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


jdk Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package jdk

Package Hierarchies:
  • All Packages

Annotation Type Hierarchy

  • jdk.Exported (implements java.lang.annotation.Annotation)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package jdk

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
jdk

  • Packages that use jdk
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).
    jdk
  • Classes in jdk used by com.sun.source.doctree
    Class and Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
  • Classes in jdk used by com.sun.source.tree
    Class and Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
  • Classes in jdk used by com.sun.source.util
    Class and Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
  • Classes in jdk used by jdk
    Class and Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class jdk.Exported

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
jdk.Exported

  • Packages that use Exported
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).
    jdk
  • Packages with annotations of type Exported
    Package Description
    com.sun.source.doctree
    Provides interfaces to represent documentation comments as abstract syntax trees (AST).
    com.sun.source.tree
    Provides interfaces to represent source code as abstract syntax trees (AST).
    com.sun.source.util
    Provides utilities for operations on abstract syntax trees (AST).

    • Uses of Exported in com.sun.source.doctree

      Classes in com.sun.source.doctree with annotations of type Exported
      Modifier and Type | Interface and Description
      interface  AttributeTree
      A tree node for an attribute in an HTML element.
      static class  | AttributeTree.ValueKind
      interface  AuthorTree
      A tree node for an @author block tag.
      interface  BlockTagTree
      A tree node used as the base class for the different types of block tags.
      interface  CommentTree
      An embedded HTML comment.
      interface  DeprecatedTree
      A tree node for an @deprecated block tag.
      interface  DocCommentTree
      The top level representation of a documentation comment.
      interface  DocRootTree
      A tree node for an @docroot inline tag.
      interface  DocTree
      Common interface for all nodes in a documentation syntax tree.
      static class  | DocTree.Kind
      interface  DocTreeVisitor<R,P>
      A visitor of trees, in the style of the visitor design pattern.
      interface  EndElementTree
      A tree node for the end of an HTML element.
      interface  EntityTree
      A tree node for an HTML entity.
      interface  ErroneousTree
      A tree node to stand in for a malformed text
      interface  IdentifierTree
      An identifier in a documentation comment.
      interface  InheritDocTree
      A tree node for an @inheritDoc inline tag.
      interface  InlineTagTree
      A tree node used as the base class for the different types of inline tags.
      interface  LinkTree
      A tree node for an @link or @linkplain inline tag.
      interface  LiteralTree
      A tree node for an @literal or @code inline tag.
      interface  ParamTree
      A tree node for an @param block tag.
      interface  ReferenceTree
      A tree node to a reference to a Java language element.
      interface  ReturnTree
      A tree node for an @return block tag.
      interface  SeeTree
      A tree node for an @see block tag.
      interface  SerialDataTree
      A tree node for an @serialData block tag.
      interface  SerialFieldTree
      A tree node for an @serialData block tag.
      interface  SerialTree
      A tree node for an @serial block tag.
      interface  SinceTree
      A tree node for an @since block tag.
      interface  StartElementTree
      A tree node for the start of an HTML element.
      interface  TextTree
      A tree node for plain text.
      interface  ThrowsTree
      A tree node for an @exception or @throws block tag.
      interface  UnknownBlockTagTree
      A tree node for an unrecognized inline tag.
      interface  UnknownInlineTagTree
      A tree node for an unrecognized inline tag.
      interface  ValueTree
      A tree node for an @value inline tag.
      interface  VersionTree
      A tree node for an @version block tag.

    • Uses of Exported in com.sun.source.tree

      Classes in com.sun.source.tree with annotations of type Exported
      Modifier and Type Interface and Description
      interface  AnnotatedTypeTree
      A tree node for an annotated type For example:
      interface  AnnotationTree
      A tree node for an annotation.
      interface  ArrayAccessTree
      A tree node for an array access expression.
      interface  ArrayTypeTree
      A tree node for an array type.
      interface  AssertTree
      A tree node for an 'assert' statement.
      interface  AssignmentTree
      A tree node for an assignment expression.
      interface  BinaryTree
      A tree node for a binary expression.
      interface  BlockTree
      A tree node for a statement block.
      interface  BreakTree
      A tree node for a 'break' statement.
      interface  CaseTree
      A tree node for a 'case' in a 'switch' statement.
      interface  CatchTree
      A tree node for a 'catch' block in a 'try' statement.
      interface  ClassTree
      A tree node for a class, interface, enum, or annotation type declaration.
      interface  CompilationUnitTree
      Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).
      interface  CompoundAssignmentTree
      A tree node for compound assignment operator.
      interface  ConditionalExpressionTree
      A tree node for the conditional operator ? :.
      interface  ContinueTree
      A tree node for a 'continue' statement.
      interface  DoWhileLoopTree
      A tree node for a 'do' statement.
      interface  EmptyStatementTree
      A tree node for an empty (skip) statement.
      interface  EnhancedForLoopTree
      A tree node for an "enhanced" 'for' loop statement.
      interface  ErroneousTree
      A tree node to stand in for a malformed expression.
      interface  ExpressionStatementTree
      A tree node for an expression statement.
      interface  ExpressionTree
      A tree node used as the base class for the different types of expressions.
      interface  ForLoopTree
      A tree node for a basic 'for' loop statement.
      interface  IdentifierTree
      A tree node for an identifier expression.
      interface  IfTree
      A tree node for an 'if' statement.
      interface  ImportTree
      A tree node for an import statement.
      interface  InstanceOfTree
      A tree node for an 'instanceof' expression.
      interface  IntersectionTypeTree
      A tree node for an intersection type in a cast expression.
      interface  LabeledStatementTree
      A tree node for a labeled statement.
      interface  LambdaExpressionTree
      A tree node for a lambda expression.
      static class  LambdaExpressionTree.BodyKind
      Lambda expressions come in two forms: (i) expression lambdas, whose body is an expression, and (ii) statement lambdas, whose body is a block
      interface  LineMap
      Provides methods to convert between character positions and line numbers for a compilation unit.
      interface  LiteralTree
      A tree node for a literal expression.
      interface  MemberReferenceTree
      A tree node for a member reference expression.
      static class  MemberReferenceTree.ReferenceMode
      There are two kinds of member references: (i) method references and (ii) constructor references
      interface  MemberSelectTree
      A tree node for a member access expression.
      interface  MethodInvocationTree
      A tree node for a method invocation expression.
      interface  MethodTree
      A tree node for a method or annotation type element declaration.
      interface  ModifiersTree
      A tree node for the modifiers, including annotations, for a declaration.
      interface  NewArrayTree
      A tree node for an expression to create a new instance of an array.
      interface  NewClassTree
      A tree node to declare a new instance of a class.
      interface  ParameterizedTypeTree
      A tree node for a type expression involving type parameters.
      interface  ParenthesizedTree
      A tree node for a parenthesized expression.
      interface  PrimitiveTypeTree
      A tree node for a primitive type.
      interface  ReturnTree
      A tree node for a 'return' statement.
      interface  Scope
      Interface for determining locally available program elements, such as local variables and imports.
      interface  StatementTree
      A tree node used as the base class for the different kinds of statements.
      interface  SwitchTree
      A tree node for a 'switch' statement.
      interface  SynchronizedTree
      A tree node for a 'synchronized' statement.
      interface  ThrowTree
      A tree node for a 'throw' statement.
      interface  Tree
      Common interface for all nodes in an abstract syntax tree.
      static class  Tree.Kind
      Enumerates all kinds of trees.
      interface  TreeVisitor<R,P>
      A visitor of trees, in the style of the visitor design pattern.
      interface  TryTree
      A tree node for a 'try' statement.
      interface  TypeCastTree
      A tree node for a type cast expression.
      interface  TypeParameterTree
      A tree node for a type parameter.
      interface  UnaryTree
      A tree node for postfix and unary expressions.
      interface  UnionTypeTree
      A tree node for a union type expression in a multicatch var declaration.
      interface  VariableTree
      A tree node for a variable declaration.
      interface  WhileLoopTree
      A tree node for a 'while' loop statement.
      interface  WildcardTree
      A tree node for a wildcard type argument.

    • Uses of Exported in com.sun.source.util

      Classes in com.sun.source.util with annotations of type Exported
      Modifier and Type Interface and Description
      interface  DocSourcePositions
      Provides methods to obtain the position of a DocTree within a javadoc comment.
      class  DocTreePath
      A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level DocCommentTree node.
      class  DocTreePathScanner<R,P>
      A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
      class  DocTrees
      Provides access to syntax trees for doc comments.
      class  DocTreeScanner<R,P>
      A TreeVisitor that visits all the child tree nodes.
      class  JavacTask
      Provides access to functionality specific to the JDK Java Compiler, javac.
      interface  Plugin
      The interface for a javac plug-in.
      class  SimpleDocTreeVisitor<R,P>
      A simple visitor for tree nodes.
      class  SimpleTreeVisitor<R,P>
      A simple visitor for tree nodes.
      interface  SourcePositions
      Provides methods to obtain the position of a Tree within a CompilationUnit.
      class  TaskEvent
      Provides details about work that has been done by the JDK Java Compiler, javac.
      static class  TaskEvent.Kind
      Kind of task event.
      interface  TaskListener
      Provides a listener to monitor the activity of the JDK Java Compiler, javac.
      class  TreePath
      A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level CompilationUnitTree node.
      class  TreePathScanner<R,P>
      A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes.
      class  Trees
      Bridges JSR 199, JSR 269, and the Tree API.
      class  TreeScanner<R,P>
      A TreeVisitor that visits all the child tree nodes.

    • Uses of Exported in jdk

      Classes in jdk with annotations of type Exported
      Modifier and Type Class and Description
      interface  Exported
      Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


All Classes

  • AnnotatedType
  • AnnotationDesc
  • AnnotationDesc.ElementValuePair
  • AnnotationTypeDoc
  • AnnotationTypeElementDoc
  • AnnotationValue
  • ClassDoc
  • ConstructorDoc
  • Doc
  • DocErrorReporter
  • Doclet
  • ExecutableMemberDoc
  • FieldDoc
  • LanguageVersion
  • MemberDoc
  • MethodDoc
  • PackageDoc
  • Parameter
  • ParameterizedType
  • ParamTag
  • ProgramElementDoc
  • RootDoc
  • SeeTag
  • SerialFieldTag
  • SourcePosition
  • Tag
  • ThrowsTag
  • Type
  • TypeVariable
  • WildcardType


Constant Field Values

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Constant Field Values

Contents

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Deprecated List

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Deprecated API

Contents

  • Deprecated Methods
  • Deprecated Methods
    Method and Description
    com.sun.javadoc.ClassDoc.importedClasses()
    Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.
    com.sun.javadoc.ClassDoc.importedPackages()
    Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Doclet API

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.


Help

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

  • Package

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    • Interfaces (italic)
    • Classes
    • Enums
    • Exceptions
    • Errors
    • Annotation Types

  • Class/Interface

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    • Class inheritance diagram
    • Direct Subclasses
    • All Known Subinterfaces
    • All Known Implementing Classes
    • Class/interface declaration
    • Class/interface description
    • Nested Class Summary
    • Field Summary
    • Constructor Summary
    • Method Summary
    • Field Detail
    • Constructor Detail
    • Method Detail

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

  • Annotation Type

    Each annotation type has its own separate page with the following sections:

    • Annotation Type declaration
    • Annotation Type description
    • Required Element Summary
    • Optional Element Summary
    • Element Detail

  • Enum

    Each enum has its own separate page with the following sections:

    • Enum declaration
    • Enum description
    • Enum Constant Summary
    • Enum Constant Detail

  • Use

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

  • Tree (Class Hierarchy)

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

  • Deprecated API

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

  • Index

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

  • Prev/Next

    These links take you to the next or previous class, interface, package, or related page.

  • Frames/No Frames

    These links show and hide the HTML frames. All pages are available with or without frames.

  • All Classes

    The All Classes link shows all classes and interfaces except non-static nested types.

  • Serialized Form

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

  • Constant Field Values

    The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Hierarchy

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For All Packages

Package Hierarchies:
  • com.sun.javadoc

Class Hierarchy

  • java.lang.Object
    • com.sun.javadoc.Doclet

Interface Hierarchy

  • com.sun.javadoc.AnnotationDesc
  • com.sun.javadoc.AnnotationDesc.ElementValuePair
  • com.sun.javadoc.AnnotationValue
  • java.lang.Comparable<T>
    • com.sun.javadoc.AnnotationTypeDoc
    • com.sun.javadoc.AnnotationTypeElementDoc
    • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.ProgramElementDoc, com.sun.javadoc.Type)
      • com.sun.javadoc.AnnotationTypeDoc
    • com.sun.javadoc.ConstructorDoc
    • com.sun.javadoc.Doc
      • com.sun.javadoc.AnnotationTypeDoc
      • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.ProgramElementDoc, com.sun.javadoc.Type)
        • com.sun.javadoc.AnnotationTypeDoc
      • com.sun.javadoc.ConstructorDoc
      • com.sun.javadoc.ExecutableMemberDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.FieldDoc
      • com.sun.javadoc.MemberDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.ExecutableMemberDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.ConstructorDoc
          • com.sun.javadoc.MethodDoc
            • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.FieldDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.MethodDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.PackageDoc
      • com.sun.javadoc.ProgramElementDoc
        • com.sun.javadoc.AnnotationTypeDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.Type)
          • com.sun.javadoc.AnnotationTypeDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.ExecutableMemberDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.ConstructorDoc
          • com.sun.javadoc.MethodDoc
            • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.FieldDoc
        • com.sun.javadoc.MemberDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.ConstructorDoc
          • com.sun.javadoc.ExecutableMemberDoc
            • com.sun.javadoc.AnnotationTypeElementDoc
            • com.sun.javadoc.ConstructorDoc
            • com.sun.javadoc.MethodDoc
              • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.FieldDoc
          • com.sun.javadoc.MethodDoc
            • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.RootDoc (also extends com.sun.javadoc.DocErrorReporter)
    • com.sun.javadoc.ExecutableMemberDoc
      • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.ConstructorDoc
      • com.sun.javadoc.MethodDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
    • com.sun.javadoc.FieldDoc
    • com.sun.javadoc.MemberDoc
      • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.ConstructorDoc
      • com.sun.javadoc.ExecutableMemberDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.FieldDoc
      • com.sun.javadoc.MethodDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
    • com.sun.javadoc.MethodDoc
      • com.sun.javadoc.AnnotationTypeElementDoc
    • com.sun.javadoc.PackageDoc
    • com.sun.javadoc.ProgramElementDoc
      • com.sun.javadoc.AnnotationTypeDoc
      • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.Type)
        • com.sun.javadoc.AnnotationTypeDoc
      • com.sun.javadoc.ConstructorDoc
      • com.sun.javadoc.ExecutableMemberDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.FieldDoc
      • com.sun.javadoc.MemberDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.ConstructorDoc
        • com.sun.javadoc.ExecutableMemberDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.ConstructorDoc
          • com.sun.javadoc.MethodDoc
            • com.sun.javadoc.AnnotationTypeElementDoc
        • com.sun.javadoc.FieldDoc
        • com.sun.javadoc.MethodDoc
          • com.sun.javadoc.AnnotationTypeElementDoc
      • com.sun.javadoc.MethodDoc
        • com.sun.javadoc.AnnotationTypeElementDoc
    • com.sun.javadoc.RootDoc (also extends com.sun.javadoc.Doc, com.sun.javadoc.DocErrorReporter)
    • com.sun.javadoc.SerialFieldTag (also extends com.sun.javadoc.Tag)
  • com.sun.javadoc.DocErrorReporter
    • com.sun.javadoc.RootDoc (also extends com.sun.javadoc.Doc)
  • com.sun.javadoc.Parameter
  • com.sun.javadoc.SourcePosition
  • com.sun.javadoc.Tag
    • com.sun.javadoc.ParamTag
    • com.sun.javadoc.SeeTag
    • com.sun.javadoc.SerialFieldTag (also extends java.lang.Comparable<T>)
    • com.sun.javadoc.ThrowsTag
  • com.sun.javadoc.Type
    • com.sun.javadoc.AnnotatedType
    • com.sun.javadoc.AnnotationTypeDoc
    • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.ProgramElementDoc)
      • com.sun.javadoc.AnnotationTypeDoc
    • com.sun.javadoc.ParameterizedType
    • com.sun.javadoc.TypeVariable
    • com.sun.javadoc.WildcardType

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.javadoc.LanguageVersion
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Index

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
A B C D E F G H I K L M N O P Q R S T U V W

A

allClasses(boolean) - Method in interface com.sun.javadoc.PackageDoc
Get all classes and interfaces in the package, filtered to the specified access modifier option.
allClasses() - Method in interface com.sun.javadoc.PackageDoc
Get all included classes and interfaces in the package.
AnnotatedType - Interface in com.sun.javadoc
Represents an annotated type.
AnnotationDesc - Interface in com.sun.javadoc
Represents an annotation.
AnnotationDesc.ElementValuePair - Interface in com.sun.javadoc
Represents an association between an annotation type element and one of its values.
annotations() - Method in interface com.sun.javadoc.AnnotatedType
annotations() - Method in interface com.sun.javadoc.PackageDoc
Get the annotations of this package.
annotations() - Method in interface com.sun.javadoc.Parameter
Get the annotations of this parameter.
annotations() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the annotations of this program element.
annotations() - Method in interface com.sun.javadoc.TypeVariable
Get the annotations of this program element.
annotationType() - Method in interface com.sun.javadoc.AnnotationDesc
Returns the annotation type of this annotation.
AnnotationTypeDoc - Interface in com.sun.javadoc
Represents an annotation type.
AnnotationTypeElementDoc - Interface in com.sun.javadoc
Represents an element of an annotation type.
annotationTypes() - Method in interface com.sun.javadoc.PackageDoc
Get included annotation types in this package.
AnnotationValue - Interface in com.sun.javadoc
Represents a value of an annotation type element.
asAnnotatedType() - Method in interface com.sun.javadoc.Type
Returns this type as a AnnotatedType if it represents an annotated type.
asAnnotationTypeDoc() - Method in interface com.sun.javadoc.Type
Return this type as an AnnotationTypeDoc if it represents an annotation type.
asClassDoc() - Method in interface com.sun.javadoc.ParameterizedType
Return the generic class or interface that declared this type.
asClassDoc() - Method in interface com.sun.javadoc.Type
Return this type as a ClassDoc if it represents a class or interface.
asParameterizedType() - Method in interface com.sun.javadoc.Type
Return this type as a ParameterizedType if it represents an invocation of a generic class or interface.
asTypeVariable() - Method in interface com.sun.javadoc.Type
Return this type as a TypeVariable if it represents a type variable.
asWildcardType() - Method in interface com.sun.javadoc.Type
Return this type as a WildcardType if it represents a wildcard type.

B

bounds() - Method in interface com.sun.javadoc.TypeVariable
Return the bounds of this type variable.

C

ClassDoc - Interface in com.sun.javadoc
Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
classes() - Method in interface com.sun.javadoc.RootDoc
Return the included classes and interfaces in all packages.
classNamed(String) - Method in interface com.sun.javadoc.RootDoc
Return a ClassDoc for the specified class or interface name.
column() - Method in interface com.sun.javadoc.SourcePosition
The column in the source file.
com.sun.javadoc - package com.sun.javadoc
The Doclet API (also called the Javadoc API) provides a mechanism for clients to inspect the source-level structure of programs and libraries, including javadoc comments embedded in the source.
commentText() - Method in interface com.sun.javadoc.Doc
Return the text of the comment for this doc item.
compareTo(Object) - Method in interface com.sun.javadoc.Doc
Compares this doc object with the specified object for order.
compareTo(Object) - Method in interface com.sun.javadoc.SerialFieldTag
Compares this Object with the specified Object for order.
constantValue() - Method in interface com.sun.javadoc.FieldDoc
Get the value of a constant field.
constantValueExpression() - Method in interface com.sun.javadoc.FieldDoc
Get the value of a constant field.
ConstructorDoc - Interface in com.sun.javadoc
Represents a constructor of a java class.
constructors() - Method in interface com.sun.javadoc.ClassDoc
Return included constructors in this class.
constructors(boolean) - Method in interface com.sun.javadoc.ClassDoc
Return constructors in this class, filtered to the specified access modifier option.
containingClass() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the containing class or interface of this program element.
containingPackage() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the package that this program element is contained in.
containingType() - Method in interface com.sun.javadoc.ParameterizedType
Return the type that contains this type as a member.

D

defaultValue() - Method in interface com.sun.javadoc.AnnotationTypeElementDoc
Returns the default value of this element.
definesSerializableFields() - Method in interface com.sun.javadoc.ClassDoc
Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
description() - Method in interface com.sun.javadoc.SerialFieldTag
Return the field comment.
dimension() - Method in interface com.sun.javadoc.Type
Return the type's dimension information, as a string.
Doc - Interface in com.sun.javadoc
Represents Java language constructs (package, class, constructor, method, field) which have comments and have been processed by this run of javadoc.
DocErrorReporter - Interface in com.sun.javadoc
This interface provides error, warning and notice printing.
Doclet - Class in com.sun.javadoc
This is an example of a starting class for a doclet, showing the entry-point methods.
Doclet() - Constructor for class com.sun.javadoc.Doclet

E

element() - Method in interface com.sun.javadoc.AnnotationDesc.ElementValuePair
Returns the annotation type element.
elements() - Method in interface com.sun.javadoc.AnnotationTypeDoc
Returns the elements of this annotation type.
elementValues() - Method in interface com.sun.javadoc.AnnotationDesc
Returns this annotation's elements and their values.
enumConstants() - Method in interface com.sun.javadoc.ClassDoc
Return the enum constants if this is an enum type.
enums() - Method in interface com.sun.javadoc.PackageDoc
Get included enum types in this package.
errors() - Method in interface com.sun.javadoc.PackageDoc
Get included Error classes in this package.
exception() - Method in interface com.sun.javadoc.ThrowsTag
Return a ClassDoc that represents the exception.
exceptionComment() - Method in interface com.sun.javadoc.ThrowsTag
Return the exception comment associated with this ThrowsTag.
exceptionName() - Method in interface com.sun.javadoc.ThrowsTag
Return the name of the exception associated with this ThrowsTag.
exceptions() - Method in interface com.sun.javadoc.PackageDoc
Get included Exception classes in this package.
exceptionType() - Method in interface com.sun.javadoc.ThrowsTag
Return the type of the exception associated with this ThrowsTag.
ExecutableMemberDoc - Interface in com.sun.javadoc
Represents a method or constructor of a java class.
extendsBounds() - Method in interface com.sun.javadoc.WildcardType
Return the upper bounds of this wildcard type argument as given by the extends clause.

F

FieldDoc - Interface in com.sun.javadoc
Represents a field in a java class.
fieldName() - Method in interface com.sun.javadoc.SerialFieldTag
Return the serializable field name.
fields() - Method in interface com.sun.javadoc.ClassDoc
Return included fields in this class or interface.
fields(boolean) - Method in interface com.sun.javadoc.ClassDoc
Return fields in this class or interface, filtered to the specified access modifier option.
fieldType() - Method in interface com.sun.javadoc.SerialFieldTag
Return the field type string.
fieldTypeDoc() - Method in interface com.sun.javadoc.SerialFieldTag
Return the ClassDoc for field type.
file() - Method in interface com.sun.javadoc.SourcePosition
The source file.
findClass(String) - Method in interface com.sun.javadoc.ClassDoc
Find the specified class or interface within the context of this class doc.
findClass(String) - Method in interface com.sun.javadoc.PackageDoc
Lookup a class or interface within this package.
firstSentenceTags() - Method in interface com.sun.javadoc.Doc
Return the first sentence of the comment as an array of tags.
firstSentenceTags() - Method in interface com.sun.javadoc.Tag
Return the first sentence of the comment as an array of tags.
flatSignature() - Method in interface com.sun.javadoc.ExecutableMemberDoc
get flat signature.

G

getElementType() - Method in interface com.sun.javadoc.Type
If this type is an array type, return the element type of the array.
getRawCommentText() - Method in interface com.sun.javadoc.Doc
Return the full unprocessed text of the comment.

H

holder() - Method in interface com.sun.javadoc.Tag
Return the containing Doc of this Tag element.

I

importedClasses() - Method in interface com.sun.javadoc.ClassDoc
Deprecated.
Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.
importedPackages() - Method in interface com.sun.javadoc.ClassDoc
Deprecated.
Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.
inlineTags() - Method in interface com.sun.javadoc.Doc
Return comment as an array of tags.
inlineTags() - Method in interface com.sun.javadoc.Tag
For a documentation comment with embedded {@link} tags, return an array of Tag objects.
innerClasses() - Method in interface com.sun.javadoc.ClassDoc
Return included nested classes and interfaces within this class or interface.
innerClasses(boolean) - Method in interface com.sun.javadoc.ClassDoc
Return nested classes and interfaces within this class or interface filtered to the specified access modifier option.
interfaces() - Method in interface com.sun.javadoc.ClassDoc
Return interfaces implemented by this class or interfaces extended by this interface.
interfaces() - Method in interface com.sun.javadoc.PackageDoc
Get included interfaces in this package, omitting annotation types.
interfaceTypes() - Method in interface com.sun.javadoc.ClassDoc
Return interfaces implemented by this class or interfaces extended by this interface.
interfaceTypes() - Method in interface com.sun.javadoc.ParameterizedType
Return the interface types directly implemented by or extended by this parameterized type.
isAbstract() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class is abstract.
isAbstract() - Method in interface com.sun.javadoc.MethodDoc
Return true if this method is abstract
isAnnotationType() - Method in interface com.sun.javadoc.Doc
Is this Doc item an annotation type?
isAnnotationTypeElement() - Method in interface com.sun.javadoc.Doc
Is this Doc item an annotation type element?
isClass() - Method in interface com.sun.javadoc.Doc
Is this Doc item a class (and not an interface or annotation type)?
isConstructor() - Method in interface com.sun.javadoc.Doc
Is this Doc item a constructor?
isDefault() - Method in interface com.sun.javadoc.MethodDoc
Return true if this method is default
isEnum() - Method in interface com.sun.javadoc.Doc
Is this Doc item an enum type?
isEnumConstant() - Method in interface com.sun.javadoc.Doc
Is this Doc item an enum constant?
isError() - Method in interface com.sun.javadoc.Doc
Is this Doc item an error class?
isException() - Method in interface com.sun.javadoc.Doc
Is this Doc item an exception class?
isExternalizable() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class implements or interface extends java.io.Externalizable.
isField() - Method in interface com.sun.javadoc.Doc
Is this Doc item a field (but not an enum constant)?
isFinal() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is final.
isIncluded() - Method in interface com.sun.javadoc.Doc
Return true if this Doc item is included in the result set.
isInterface() - Method in interface com.sun.javadoc.Doc
Is this Doc item an interface (but not an annotation type)?
isMethod() - Method in interface com.sun.javadoc.Doc
Is this Doc item a method (but not a constructor or annotation type element)?
isNative() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return true if this method is native
isOrdinaryClass() - Method in interface com.sun.javadoc.Doc
Is this Doc item an ordinary class?
isPackagePrivate() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is package private.
isPrimitive() - Method in interface com.sun.javadoc.Type
Return true if this type represents a primitive type.
isPrivate() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is private.
isProtected() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is protected.
isPublic() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is public.
isSerializable() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class implements or interface extends java.io.Serializable.
isStatic() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is static.
isSynchronized() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return true if this method is synchronized
isSynthesized() - Method in interface com.sun.javadoc.AnnotationDesc
Check for the synthesized bit on the annotation.
isSynthetic() - Method in interface com.sun.javadoc.MemberDoc
Returns true if this member was synthesized by the compiler.
isTransient() - Method in interface com.sun.javadoc.FieldDoc
Return true if this field is transient
isTypeParameter() - Method in interface com.sun.javadoc.ParamTag
Return true if this ParamTag corresponds to a type parameter.
isVarArgs() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return true if this method was declared to take a variable number of arguments.
isVolatile() - Method in interface com.sun.javadoc.FieldDoc
Return true if this field is volatile

K

kind() - Method in interface com.sun.javadoc.Tag
Return the kind of this tag.

L

label() - Method in interface com.sun.javadoc.SeeTag
Get the label of the @see tag.
languageVersion() - Static method in class com.sun.javadoc.Doclet
Return the version of the Java Programming Language supported by this doclet.
LanguageVersion - Enum in com.sun.javadoc
Java Programming Language version.
line() - Method in interface com.sun.javadoc.SourcePosition
The line in the source file.

M

MemberDoc - Interface in com.sun.javadoc
Represents a member of a java class: field, constructor, or method.
MethodDoc - Interface in com.sun.javadoc
Represents a method of a java class.
methods() - Method in interface com.sun.javadoc.ClassDoc
Return included methods in this class or interface.
methods(boolean) - Method in interface com.sun.javadoc.ClassDoc
Return methods in this class or interface, filtered to the specified access modifier option.
modifiers() - Method in interface com.sun.javadoc.ProgramElementDoc
Get modifiers string.
modifierSpecifier() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the modifier specifier integer.

N

name() - Method in interface com.sun.javadoc.Doc
Returns the non-qualified name of this Doc item.
name() - Method in interface com.sun.javadoc.Parameter
Get local name of this parameter.
name() - Method in interface com.sun.javadoc.Tag
Return the name of this tag.

O

optionLength(String) - Static method in class com.sun.javadoc.Doclet
Check for doclet-added options.
options() - Method in interface com.sun.javadoc.RootDoc
Command line options.
ordinaryClasses() - Method in interface com.sun.javadoc.PackageDoc
Get included ordinary classes (that is, exclude exceptions, errors, enums, interfaces, and annotation types) in this package.
overriddenClass() - Method in interface com.sun.javadoc.MethodDoc
Return the class containing the method that this method overrides.
overriddenMethod() - Method in interface com.sun.javadoc.MethodDoc
Return the method that this method overrides.
overriddenType() - Method in interface com.sun.javadoc.MethodDoc
Return the type containing the method that this method overrides.
overrides(MethodDoc) - Method in interface com.sun.javadoc.MethodDoc
Tests whether this method overrides another.
owner() - Method in interface com.sun.javadoc.TypeVariable
Return the class, interface, method, or constructor within which this type variable is declared.

P

PackageDoc - Interface in com.sun.javadoc
Represents a java package.
packageNamed(String) - Method in interface com.sun.javadoc.RootDoc
Return a PackageDoc for the specified package name.
Parameter - Interface in com.sun.javadoc
Parameter information.
parameterComment() - Method in interface com.sun.javadoc.ParamTag
Return the parameter comment associated with this ParamTag.
ParameterizedType - Interface in com.sun.javadoc
Represents an invocation of a generic class or interface.
parameterName() - Method in interface com.sun.javadoc.ParamTag
Return the name of the parameter or type parameter associated with this ParamTag.
parameters() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Get argument information.
ParamTag - Interface in com.sun.javadoc
Represents an @param documentation tag.
paramTags() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the param tags in this method, excluding the type parameter tags.
position() - Method in interface com.sun.javadoc.Doc
Return the source position of the first line of the corresponding declaration, or null if no position is available.
position() - Method in interface com.sun.javadoc.Tag
Return the source position of this tag.
printError(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print error message and increment error count.
printError(SourcePosition, String) - Method in interface com.sun.javadoc.DocErrorReporter
Print an error message and increment error count.
printNotice(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print a message.
printNotice(SourcePosition, String) - Method in interface com.sun.javadoc.DocErrorReporter
Print a message.
printWarning(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print warning message and increment warning count.
printWarning(SourcePosition, String) - Method in interface com.sun.javadoc.DocErrorReporter
Print warning message and increment warning count.
ProgramElementDoc - Interface in com.sun.javadoc
Represents a java program element: class, interface, field, constructor, or method.

Q

qualifiedName() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the fully qualified name of this program element.
qualifiedTypeName() - Method in interface com.sun.javadoc.Type
Return qualified name of type excluding any dimension information.

R

receiverType() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Get the receiver type of this executable element.
referencedClass() - Method in interface com.sun.javadoc.SeeTag
Get the class doc referenced by the class name part of @see.
referencedClassName() - Method in interface com.sun.javadoc.SeeTag
Get the class or interface name of the @see reference.
referencedMember() - Method in interface com.sun.javadoc.SeeTag
Get the member doc for the field, constructor or method referenced by @see.
referencedMemberName() - Method in interface com.sun.javadoc.SeeTag
Get the field, constructor or method substring of the @see reference.
referencedPackage() - Method in interface com.sun.javadoc.SeeTag
Get the package doc when @see references only a package.
returnType() - Method in interface com.sun.javadoc.MethodDoc
Get return type.
RootDoc - Interface in com.sun.javadoc
Represents the root of the program structure information for one run of javadoc.

S

SeeTag - Interface in com.sun.javadoc
Represents a user-defined cross-reference to related documentation.
seeTags() - Method in interface com.sun.javadoc.Doc
Return the see also tags in this Doc item.
SerialFieldTag - Interface in com.sun.javadoc
Documents a Serializable field defined by an ObjectStreamField.
serialFieldTags() - Method in interface com.sun.javadoc.FieldDoc
Return the serialField tags in this FieldDoc item.
serializableFields() - Method in interface com.sun.javadoc.ClassDoc
Return the Serializable fields of this class or interface.
serializationMethods() - Method in interface com.sun.javadoc.ClassDoc
Return the serialization methods for this class or interface.
setRawCommentText(String) - Method in interface com.sun.javadoc.Doc
Set the full unprocessed text of the comment.
signature() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Get the signature.
simpleTypeName() - Method in interface com.sun.javadoc.Type
Return the simple name of this type excluding any dimension information.
SourcePosition - Interface in com.sun.javadoc
This interface describes a source position: filename, line number, and column number.
specifiedClasses() - Method in interface com.sun.javadoc.RootDoc
Return the classes and interfaces specified as source file names on the command line.
specifiedPackages() - Method in interface com.sun.javadoc.RootDoc
Return the packages specified on the command line.
start(RootDoc) - Static method in class com.sun.javadoc.Doclet
Generate documentation here.
subclassOf(ClassDoc) - Method in interface com.sun.javadoc.ClassDoc
Test whether this class is a subclass of the specified class.
superBounds() - Method in interface com.sun.javadoc.WildcardType
Return the lower bounds of this wildcard type argument as given by the super clause.
superclass() - Method in interface com.sun.javadoc.ClassDoc
Return the superclass of this class.
superclassType() - Method in interface com.sun.javadoc.ClassDoc
Return the superclass of this class.
superclassType() - Method in interface com.sun.javadoc.ParameterizedType
Return the class type that is a direct supertype of this one.

T

Tag - Interface in com.sun.javadoc
Represents a simple documentation tag, such as @since, @author, @version.
tags() - Method in interface com.sun.javadoc.Doc
Return all tags in this Doc item.
tags(String) - Method in interface com.sun.javadoc.Doc
Return tags of the specified kind in this Doc item.
text() - Method in interface com.sun.javadoc.Tag
Return the text of this tag, that is, the portion beyond tag name.
thrownExceptions() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return exceptions this method or constructor throws.
thrownExceptionTypes() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return exceptions this method or constructor throws.
ThrowsTag - Interface in com.sun.javadoc
Represents a @throws or @exception documentation tag.
throwsTags() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the throws tags in this method.
toString() - Method in interface com.sun.javadoc.AnnotationValue
Returns a string representation of the value.
toString() - Method in interface com.sun.javadoc.Parameter
Returns a string representation of the parameter.
toString() - Method in interface com.sun.javadoc.SourcePosition
Convert the source position to the form "Filename:line".
toString() - Method in interface com.sun.javadoc.Tag
Convert this object to a string.
toString() - Method in interface com.sun.javadoc.Type
Return a string representation of the type.
type() - Method in interface com.sun.javadoc.FieldDoc
Get type of this field.
type() - Method in interface com.sun.javadoc.Parameter
Get the type of this parameter.
Type - Interface in com.sun.javadoc
Represents a type.
typeArguments() - Method in interface com.sun.javadoc.ParameterizedType
Return the actual type arguments of this type.
typeName() - Method in interface com.sun.javadoc.Parameter
Get type name of this parameter.
typeName() - Method in interface com.sun.javadoc.Type
Return unqualified name of type excluding any dimension information.
typeParameters() - Method in interface com.sun.javadoc.ClassDoc
Return the formal type parameters of this class or interface.
typeParameters() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the formal type parameters of this method or constructor.
typeParamTags() - Method in interface com.sun.javadoc.ClassDoc
Return the type parameter tags of this class or interface.
typeParamTags() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the type parameter tags in this method.
TypeVariable - Interface in com.sun.javadoc
Represents a type variable.

U

underlyingType() - Method in interface com.sun.javadoc.AnnotatedType

V

validOptions(String[][], DocErrorReporter) - Static method in class com.sun.javadoc.Doclet
Check that options have the correct arguments.
value() - Method in interface com.sun.javadoc.AnnotationDesc.ElementValuePair
Returns the value associated with the annotation type element.
value() - Method in interface com.sun.javadoc.AnnotationValue
Returns the value.
valueOf(String) - Static method in enum com.sun.javadoc.LanguageVersion
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.sun.javadoc.LanguageVersion
Returns an array containing the constants of this enum type, in the order they are declared.

W

WildcardType - Interface in com.sun.javadoc
Represents a wildcard type argument.
A B C D E F G H I K L M N O P Q R S T U V W
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


javadoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.javadoc

The Doclet API (also called the Javadoc API) provides a mechanism for clients to inspect the source-level structure of programs and libraries, including javadoc comments embedded in the source.

See: Description

  • Interface Summary
    Interface Description
    AnnotatedType
    Represents an annotated type.
    AnnotationDesc
    Represents an annotation.
    AnnotationDesc.ElementValuePair
    Represents an association between an annotation type element and one of its values.
    AnnotationTypeDoc
    Represents an annotation type.
    AnnotationTypeElementDoc
    Represents an element of an annotation type.
    AnnotationValue
    Represents a value of an annotation type element.
    ClassDoc
    Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
    ConstructorDoc
    Represents a constructor of a java class.
    Doc
    Represents Java language constructs (package, class, constructor, method, field) which have comments and have been processed by this run of javadoc.
    DocErrorReporter
    This interface provides error, warning and notice printing.
    ExecutableMemberDoc
    Represents a method or constructor of a java class.
    FieldDoc
    Represents a field in a java class.
    MemberDoc
    Represents a member of a java class: field, constructor, or method.
    MethodDoc
    Represents a method of a java class.
    PackageDoc
    Represents a java package.
    Parameter
    Parameter information.
    ParameterizedType
    Represents an invocation of a generic class or interface.
    ParamTag
    Represents an @param documentation tag.
    ProgramElementDoc
    Represents a java program element: class, interface, field, constructor, or method.
    RootDoc
    Represents the root of the program structure information for one run of javadoc.
    SeeTag
    Represents a user-defined cross-reference to related documentation.
    SerialFieldTag
    Documents a Serializable field defined by an ObjectStreamField.
    SourcePosition
    This interface describes a source position: filename, line number, and column number.
    Tag
    Represents a simple documentation tag, such as @since, @author, @version.
    ThrowsTag
    Represents a @throws or @exception documentation tag.
    Type
    Represents a type.
    TypeVariable
    Represents a type variable.
    WildcardType
    Represents a wildcard type argument.
  • Class Summary
    Class Description
    Doclet
    This is an example of a starting class for a doclet, showing the entry-point methods.
  • Enum Summary
    Enum Description
    LanguageVersion
    Java Programming Language version.

Package com.sun.javadoc Description

The Doclet API (also called the Javadoc API) provides a mechanism for clients to inspect the source-level structure of programs and libraries, including javadoc comments embedded in the source. This is useful for documentation, program checking, automatic code generation and many other tools.

Doclets are invoked by javadoc and use this API to write out program information to files. For example, the standard doclet is called by default and writes out documentation to HTML files.

The invocation is defined by the abstract Doclet class -- the entry point is the start method:

    public static boolean start(RootDoc root)
The RootDoc instance holds the root of the program structure information. From this root all other program structure information can be extracted.

Terminology

When calling javadoc, you pass in package names and source file names -- these are called the specified packages and classes. You also pass in Javadoc options; the access control Javadoc options (-public, -protected, -package, and -private) filter program elements, producing a result set, called the included set, or "documented" set. (The unfiltered set is also available through allClasses(false).)

Throughout this API, the term class is normally a shorthand for "class or interface", as in: ClassDoc, allClasses(), and findClass(String). In only a couple of other places, it means "class, as opposed to interface", as in: Doc.isClass(). In the second sense, this API calls out four kinds of classes: ordinary classes, enums, errors and exceptions. Throughout the API, the detailed description of each program element describes explicitly which meaning is being used.

A qualified class or interface name is one that has its package name prepended to it, such as java.lang.String. A non-qualified name has no package name, such as String.

Example

The following is an example doclet that displays information in the @param tags of the processed classes:
import com.sun.javadoc.*;

public class ListParams extends Doclet {

    public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; ++i) {
            ClassDoc cd = classes[i];
            printMembers(cd.constructors());
            printMembers(cd.methods());
        }
        return true;
    }

    static void printMembers(ExecutableMemberDoc[] mems) {
        for (int i = 0; i < mems.length; ++i) {
            ParamTag[] params = mems[i].paramTags();
            System.out.println(mems[i].qualifiedName());
            for (int j = 0; j < params.length; ++j) {
                System.out.println("   " + params[j].parameterName()
                    + " - " + params[j].parameterComment());
            }
        }
    }
}
Interfaces and methods from the Javadoc API are marked in red. Doclet is an abstract class that specifies the invocation interface for doclets, Doclet holds class or interface information, ExecutableMemberDoc is a superinterface of MethodDoc and ConstructorDoc, and ParamTag holds information from "@param" tags.

This doclet when invoked with a command line like:

    javadoc -doclet ListParams -sourcepath <source-location> java.util
producing output like:
    ...
    java.util.ArrayList.add
       index - index at which the specified element is to be inserted.
       element - element to be inserted.
    java.util.ArrayList.remove
       index - the index of the element to removed.
    ...
See Also:
Doclet, RootDoc
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


com.sun.javadoc Class Hierarchy

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.javadoc

Class Hierarchy

  • java.lang.Object
    • com.sun.javadoc.Doclet

Interface Hierarchy

  • com.sun.javadoc.AnnotationDesc
  • com.sun.javadoc.AnnotationDesc.ElementValuePair
  • com.sun.javadoc.AnnotationValue
  • java.lang.Comparable<T>
    • com.sun.javadoc.Doc
      • com.sun.javadoc.PackageDoc
      • com.sun.javadoc.ProgramElementDoc
        • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.Type)
          • com.sun.javadoc.AnnotationTypeDoc
        • com.sun.javadoc.MemberDoc
          • com.sun.javadoc.ExecutableMemberDoc
            • com.sun.javadoc.ConstructorDoc
            • com.sun.javadoc.MethodDoc
              • com.sun.javadoc.AnnotationTypeElementDoc
          • com.sun.javadoc.FieldDoc
      • com.sun.javadoc.RootDoc (also extends com.sun.javadoc.DocErrorReporter)
    • com.sun.javadoc.SerialFieldTag (also extends com.sun.javadoc.Tag)
  • com.sun.javadoc.DocErrorReporter
    • com.sun.javadoc.RootDoc (also extends com.sun.javadoc.Doc)
  • com.sun.javadoc.Parameter
  • com.sun.javadoc.SourcePosition
  • com.sun.javadoc.Tag
    • com.sun.javadoc.ParamTag
    • com.sun.javadoc.SeeTag
    • com.sun.javadoc.SerialFieldTag (also extends java.lang.Comparable<T>)
    • com.sun.javadoc.ThrowsTag
  • com.sun.javadoc.Type
    • com.sun.javadoc.AnnotatedType
    • com.sun.javadoc.ClassDoc (also extends com.sun.javadoc.ProgramElementDoc)
      • com.sun.javadoc.AnnotationTypeDoc
    • com.sun.javadoc.ParameterizedType
    • com.sun.javadoc.TypeVariable
    • com.sun.javadoc.WildcardType

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.javadoc.LanguageVersion
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ConstructorDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ConstructorDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, ExecutableMemberDoc, MemberDoc, ProgramElementDoc

    public interface ConstructorDoc
extends ExecutableMemberDoc
    Represents a constructor of a java class.
    Since:
    1.2

    • Method Summary

      • Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc

        flatSignature, isNative, isSynchronized, isVarArgs, parameters, paramTags, receiverType, signature, thrownExceptions, thrownExceptionTypes, throwsTags, typeParameters, typeParamTags

      • Methods inherited from interface com.sun.javadoc.MemberDoc

        isSynthetic

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Package com.sun.javadoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.javadoc

  • Classes in com.sun.javadoc used by com.sun.javadoc
    Class and Description
    AnnotatedType
    Represents an annotated type.
    AnnotationDesc
    Represents an annotation.
    AnnotationDesc.ElementValuePair
    Represents an association between an annotation type element and one of its values.
    AnnotationTypeDoc
    Represents an annotation type.
    AnnotationTypeElementDoc
    Represents an element of an annotation type.
    AnnotationValue
    Represents a value of an annotation type element.
    ClassDoc
    Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
    ConstructorDoc
    Represents a constructor of a java class.
    Doc
    Represents Java language constructs (package, class, constructor, method, field) which have comments and have been processed by this run of javadoc.
    DocErrorReporter
    This interface provides error, warning and notice printing.
    ExecutableMemberDoc
    Represents a method or constructor of a java class.
    FieldDoc
    Represents a field in a java class.
    LanguageVersion
    Java Programming Language version.
    MemberDoc
    Represents a member of a java class: field, constructor, or method.
    MethodDoc
    Represents a method of a java class.
    PackageDoc
    Represents a java package.
    Parameter
    Parameter information.
    ParameterizedType
    Represents an invocation of a generic class or interface.
    ParamTag
    Represents an @param documentation tag.
    ProgramElementDoc
    Represents a java program element: class, interface, field, constructor, or method.
    RootDoc
    Represents the root of the program structure information for one run of javadoc.
    SeeTag
    Represents a user-defined cross-reference to related documentation.
    SerialFieldTag
    Documents a Serializable field defined by an ObjectStreamField.
    SourcePosition
    This interface describes a source position: filename, line number, and column number.
    Tag
    Represents a simple documentation tag, such as @since, @author, @version.
    ThrowsTag
    Represents a @throws or @exception documentation tag.
    Type
    Represents a type.
    TypeVariable
    Represents a type variable.
    WildcardType
    Represents a wildcard type argument.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotatedType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotatedType

  • All Superinterfaces:
    Type

    public interface AnnotatedType
extends Type
    Represents an annotated type. For example:
           @NonNull String
       @Positive int
    Since:
    1.8

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationDesc[] annotations()
      Type underlyingType()

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • annotations

        AnnotationDesc[] annotations()

      • underlyingType

        Type underlyingType()
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotationDesc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotationDesc

  • public interface AnnotationDesc
    Represents an annotation. An annotation associates a value with each element of an annotation type.
    Since:
    1.5

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  AnnotationDesc.ElementValuePair
      Represents an association between an annotation type element and one of its values.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationTypeDoc annotationType()
      Returns the annotation type of this annotation.
      AnnotationDesc.ElementValuePair[] elementValues()
      Returns this annotation's elements and their values.
      boolean isSynthesized()
      Check for the synthesized bit on the annotation.

    • Method Detail

      • annotationType

        AnnotationTypeDoc annotationType()
        Returns the annotation type of this annotation.
        Returns:
        the annotation type of this annotation.

      • elementValues

        AnnotationDesc.ElementValuePair[] elementValues()
        Returns this annotation's elements and their values. Only those explicitly present in the annotation are included, not those assuming their default values. Returns an empty array if there are none.
        Returns:
        this annotation's elements and their values.

      • isSynthesized

        boolean isSynthesized()
        Check for the synthesized bit on the annotation.
        Returns:
        true if the annotation is synthesized.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotationDesc.ElementValuePair

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotationDesc.ElementValuePair

  • Enclosing interface:
    AnnotationDesc

    public static interface AnnotationDesc.ElementValuePair
    Represents an association between an annotation type element and one of its values.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationTypeElementDoc element()
      Returns the annotation type element.
      AnnotationValue value()
      Returns the value associated with the annotation type element.

    • Method Detail

      • element

        AnnotationTypeElementDoc element()
        Returns the annotation type element.
        Returns:
        the annotation type element.

      • value

        AnnotationValue value()
        Returns the value associated with the annotation type element.
        Returns:
        the value associated with the annotation type element.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotationTypeDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotationTypeDoc

  • All Superinterfaces:
    ClassDoc, Comparable<Object>, Doc, ProgramElementDoc, Type

    public interface AnnotationTypeDoc
extends ClassDoc
    Represents an annotation type.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationTypeElementDoc[] elements()
      Returns the elements of this annotation type.

      • Methods inherited from interface com.sun.javadoc.ClassDoc

        constructors, constructors, definesSerializableFields, enumConstants, fields, fields, findClass, importedClasses, importedPackages, innerClasses, innerClasses, interfaces, interfaceTypes, isAbstract, isExternalizable, isSerializable, methods, methods, serializableFields, serializationMethods, subclassOf, superclass, superclassType, typeParameters, typeParamTags

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • elements

        AnnotationTypeElementDoc[] elements()
        Returns the elements of this annotation type. Returns an empty array if there are none.
        Returns:
        the elements of this annotation type.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotationTypeElementDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotationTypeElementDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, ExecutableMemberDoc, MemberDoc, MethodDoc, ProgramElementDoc

    public interface AnnotationTypeElementDoc
extends MethodDoc
    Represents an element of an annotation type.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationValue defaultValue()
      Returns the default value of this element.

      • Methods inherited from interface com.sun.javadoc.MethodDoc

        isAbstract, isDefault, overriddenClass, overriddenMethod, overriddenType, overrides, returnType

      • Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc

        flatSignature, isNative, isSynchronized, isVarArgs, parameters, paramTags, receiverType, signature, thrownExceptions, thrownExceptionTypes, throwsTags, typeParameters, typeParamTags

      • Methods inherited from interface com.sun.javadoc.MemberDoc

        isSynthetic

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • defaultValue

        AnnotationValue defaultValue()
        Returns the default value of this element. Returns null if this element has no default.
        Returns:
        the default value of this element.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


AnnotationValue

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface AnnotationValue

  • public interface AnnotationValue
    Represents a value of an annotation type element.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String toString()
      Returns a string representation of the value.
      Object value()
      Returns the value.

    • Method Detail

      • value

        Object value()
        Returns the value. The type of the returned object is one of the following:
        • a wrapper class for a primitive type
        • String
        • Type (representing a class literal)
        • FieldDoc (representing an enum constant)
        • AnnotationDesc
        • AnnotationValue[]
        Returns:
        the value.

      • toString

        String toString()
        Returns a string representation of the value.
        Overrides:
        toString in class Object
        Returns:
        the text of a Java language annotation value expression whose value is the value of this element.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Class com.sun.javadoc.Doclet

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.javadoc.Doclet

No usage of com.sun.javadoc.Doclet
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Class com.sun.javadoc.LanguageVersion

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.javadoc.LanguageVersion

    • Uses of LanguageVersion in com.sun.javadoc

      Methods in com.sun.javadoc that return LanguageVersion
      Modifier and Type Method and Description
      static LanguageVersion Doclet.languageVersion()
      Return the version of the Java Programming Language supported by this doclet.
      static LanguageVersion LanguageVersion.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static LanguageVersion[] LanguageVersion.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotatedType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotatedType

    • Uses of AnnotatedType in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotatedType
      Modifier and Type Method and Description
      AnnotatedType Type.asAnnotatedType()
      Returns this type as a AnnotatedType if it represents an annotated type.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotationDesc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotationDesc

    • Uses of AnnotationDesc in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotationDesc
      Modifier and Type | Method and Description
      AnnotationDesc[] TypeVariable.annotations()
      Get the annotations of this program element.
      AnnotationDesc[] ProgramElementDoc.annotations()
      Get the annotations of this program element.
      AnnotationDesc[] PackageDoc.annotations()
      Get the annotations of this package.
      AnnotationDesc[] Parameter.annotations()
      Get the annotations of this parameter.
      AnnotationDesc[] | AnnotatedType.annotations()
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotationDesc.ElementValuePair

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotationDesc.ElementValuePair

    • Uses of AnnotationDesc.ElementValuePair in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotationDesc.ElementValuePair
      Modifier and Type Method and Description
      AnnotationDesc.ElementValuePair[] AnnotationDesc.elementValues()
      Returns this annotation's elements and their values.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotationTypeDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotationTypeDoc

    • Uses of AnnotationTypeDoc in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotationTypeDoc
      Modifier and Type Method and Description
      AnnotationTypeDoc AnnotationDesc.annotationType()
      Returns the annotation type of this annotation.
      AnnotationTypeDoc[] PackageDoc.annotationTypes()
      Get included annotation types in this package.
      AnnotationTypeDoc Type.asAnnotationTypeDoc()
      Return this type as an AnnotationTypeDoc if it represents an annotation type.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotationTypeElementDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotationTypeElementDoc

    • Uses of AnnotationTypeElementDoc in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotationTypeElementDoc
      Modifier and Type Method and Description
      AnnotationTypeElementDoc AnnotationDesc.ElementValuePair.element()
      Returns the annotation type element.
      AnnotationTypeElementDoc[] AnnotationTypeDoc.elements()
      Returns the elements of this annotation type.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.AnnotationValue

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.AnnotationValue

    • Uses of AnnotationValue in com.sun.javadoc

      Methods in com.sun.javadoc that return AnnotationValue
      Modifier and Type Method and Description
      AnnotationValue AnnotationTypeElementDoc.defaultValue()
      Returns the default value of this element.
      AnnotationValue AnnotationDesc.ElementValuePair.value()
      Returns the value associated with the annotation type element.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ClassDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ClassDoc

    • Uses of ClassDoc in com.sun.javadoc

      Subinterfaces of ClassDoc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeDoc
      Represents an annotation type.
      Methods in com.sun.javadoc that return ClassDoc
      Modifier and Type Method and Description
      ClassDoc[] PackageDoc.allClasses()
      Get all included classes and interfaces in the package.
      ClassDoc[] PackageDoc.allClasses(boolean filter)
      Get all classes and interfaces in the package, filtered to the specified access modifier option.
      ClassDoc Type.asClassDoc()
      Return this type as a ClassDoc if it represents a class or interface.
      ClassDoc ParameterizedType.asClassDoc()
      Return the generic class or interface that declared this type.
      ClassDoc[] RootDoc.classes()
      Return the included classes and interfaces in all packages.
      ClassDoc RootDoc.classNamed(String qualifiedName)
      Return a ClassDoc for the specified class or interface name.
      ClassDoc ProgramElementDoc.containingClass()
      Get the containing class or interface of this program element.
      ClassDoc[] PackageDoc.enums()
      Get included enum types in this package.
      ClassDoc[] PackageDoc.errors()
      Get included Error classes in this package.
      ClassDoc ThrowsTag.exception()
      Return a ClassDoc that represents the exception.
      ClassDoc[] PackageDoc.exceptions()
      Get included Exception classes in this package.
      ClassDoc SerialFieldTag.fieldTypeDoc()
      Return the ClassDoc for field type.
      ClassDoc ClassDoc.findClass(String className)
      Find the specified class or interface within the context of this class doc.
      ClassDoc PackageDoc.findClass(String className)
      Lookup a class or interface within this package.
      ClassDoc[] ClassDoc.importedClasses()
      Deprecated.
      Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.
      ClassDoc[] ClassDoc.innerClasses()
      Return included nested classes and interfaces within this class or interface.
      ClassDoc[] ClassDoc.innerClasses(boolean filter)
      Return nested classes and interfaces within this class or interface filtered to the specified access modifier option.
      ClassDoc[] ClassDoc.interfaces()
      Return interfaces implemented by this class or interfaces extended by this interface.
      ClassDoc[] PackageDoc.interfaces()
      Get included interfaces in this package, omitting annotation types.
      ClassDoc[] PackageDoc.ordinaryClasses()
      Get included ordinary classes (that is, exclude exceptions, errors, enums, interfaces, and annotation types) in this package.
      ClassDoc MethodDoc.overriddenClass()
      Return the class containing the method that this method overrides.
      ClassDoc SeeTag.referencedClass()
      Get the class doc referenced by the class name part of @see.
      ClassDoc[] RootDoc.specifiedClasses()
      Return the classes and interfaces specified as source file names on the command line.
      ClassDoc ClassDoc.superclass()
      Return the superclass of this class.
      ClassDoc[] ExecutableMemberDoc.thrownExceptions()
      Return exceptions this method or constructor throws.
      Methods in com.sun.javadoc with parameters of type ClassDoc
      Modifier and Type Method and Description
      boolean ClassDoc.subclassOf(ClassDoc cd)
      Test whether this class is a subclass of the specified class.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ConstructorDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ConstructorDoc

    • Uses of ConstructorDoc in com.sun.javadoc

      Methods in com.sun.javadoc that return ConstructorDoc
      Modifier and Type Method and Description
      ConstructorDoc[] ClassDoc.constructors()
      Return included constructors in this class.
      ConstructorDoc[] ClassDoc.constructors(boolean filter)
      Return constructors in this class, filtered to the specified access modifier option.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.Doc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.Doc

    • Uses of Doc in com.sun.javadoc

      Subinterfaces of Doc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeDoc
      Represents an annotation type.
      interface  AnnotationTypeElementDoc
      Represents an element of an annotation type.
      interface  ClassDoc
      Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
      interface  ConstructorDoc
      Represents a constructor of a java class.
      interface  ExecutableMemberDoc
      Represents a method or constructor of a java class.
      interface  FieldDoc
      Represents a field in a java class.
      interface  MemberDoc
      Represents a member of a java class: field, constructor, or method.
      interface  MethodDoc
      Represents a method of a java class.
      interface  PackageDoc
      Represents a java package.
      interface  ProgramElementDoc
      Represents a java program element: class, interface, field, constructor, or method.
      interface  RootDoc
      Represents the root of the program structure information for one run of javadoc.
      Methods in com.sun.javadoc that return Doc
      Modifier and Type Method and Description
      Doc Tag.holder()
      Return the containing Doc of this Tag element.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.DocErrorReporter

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.DocErrorReporter

    • Uses of DocErrorReporter in com.sun.javadoc

      Subinterfaces of DocErrorReporter in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  RootDoc
      Represents the root of the program structure information for one run of javadoc.
      Methods in com.sun.javadoc with parameters of type DocErrorReporter
      Modifier and Type Method and Description
      static boolean Doclet.validOptions(String[][] options, DocErrorReporter reporter)
      Check that options have the correct arguments.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ExecutableMemberDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ExecutableMemberDoc

    • Uses of ExecutableMemberDoc in com.sun.javadoc

      Subinterfaces of ExecutableMemberDoc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeElementDoc
      Represents an element of an annotation type.
      interface  ConstructorDoc
      Represents a constructor of a java class.
      interface  MethodDoc
      Represents a method of a java class.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.FieldDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.FieldDoc

    • Uses of FieldDoc in com.sun.javadoc

      Methods in com.sun.javadoc that return FieldDoc
      Modifier and Type Method and Description
      FieldDoc[] ClassDoc.enumConstants()
      Return the enum constants if this is an enum type.
      FieldDoc[] ClassDoc.fields()
      Return included fields in this class or interface.
      FieldDoc[] ClassDoc.fields(boolean filter)
      Return fields in this class or interface, filtered to the specified access modifier option.
      FieldDoc[] ClassDoc.serializableFields()
      Return the Serializable fields of this class or interface.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.MemberDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.MemberDoc

    • Uses of MemberDoc in com.sun.javadoc

      Subinterfaces of MemberDoc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeElementDoc
      Represents an element of an annotation type.
      interface  ConstructorDoc
      Represents a constructor of a java class.
      interface  ExecutableMemberDoc
      Represents a method or constructor of a java class.
      interface  FieldDoc
      Represents a field in a java class.
      interface  MethodDoc
      Represents a method of a java class.
      Methods in com.sun.javadoc that return MemberDoc
      Modifier and Type Method and Description
      MemberDoc SeeTag.referencedMember()
      Get the member doc for the field, constructor or method referenced by @see.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.MethodDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.MethodDoc

    • Uses of MethodDoc in com.sun.javadoc

      Subinterfaces of MethodDoc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeElementDoc
      Represents an element of an annotation type.
      Methods in com.sun.javadoc that return MethodDoc
      Modifier and Type Method and Description
      MethodDoc[] ClassDoc.methods()
      Return included methods in this class or interface.
      MethodDoc[] ClassDoc.methods(boolean filter)
      Return methods in this class or interface, filtered to the specified access modifier option.
      MethodDoc MethodDoc.overriddenMethod()
      Return the method that this method overrides.
      MethodDoc[] ClassDoc.serializationMethods()
      Return the serialization methods for this class or interface.
      Methods in com.sun.javadoc with parameters of type MethodDoc
      Modifier and Type Method and Description
      boolean MethodDoc.overrides(MethodDoc meth)
      Tests whether this method overrides another.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.PackageDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.PackageDoc

    • Uses of PackageDoc in com.sun.javadoc

      Methods in com.sun.javadoc that return PackageDoc
      Modifier and Type Method and Description
      PackageDoc ProgramElementDoc.containingPackage()
      Get the package that this program element is contained in.
      PackageDoc[] ClassDoc.importedPackages()
      Deprecated.
      Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.
      PackageDoc RootDoc.packageNamed(String name)
      Return a PackageDoc for the specified package name.
      PackageDoc SeeTag.referencedPackage()
      Get the package doc when @see references only a package.
      PackageDoc[] RootDoc.specifiedPackages()
      Return the packages specified on the command line.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.Parameter

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.Parameter

    • Uses of Parameter in com.sun.javadoc

      Methods in com.sun.javadoc that return Parameter
      Modifier and Type Method and Description
      Parameter[] ExecutableMemberDoc.parameters()
      Get argument information.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ParameterizedType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ParameterizedType

    • Uses of ParameterizedType in com.sun.javadoc

      Methods in com.sun.javadoc that return ParameterizedType
      Modifier and Type Method and Description
      ParameterizedType Type.asParameterizedType()
      Return this type as a ParameterizedType if it represents an invocation of a generic class or interface.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ParamTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ParamTag

    • Uses of ParamTag in com.sun.javadoc

      Methods in com.sun.javadoc that return ParamTag
      Modifier and Type Method and Description
      ParamTag[] ExecutableMemberDoc.paramTags()
      Return the param tags in this method, excluding the type parameter tags.
      ParamTag[] ClassDoc.typeParamTags()
      Return the type parameter tags of this class or interface.
      ParamTag[] ExecutableMemberDoc.typeParamTags()
      Return the type parameter tags in this method.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ProgramElementDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ProgramElementDoc

    • Uses of ProgramElementDoc in com.sun.javadoc

      Subinterfaces of ProgramElementDoc in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotationTypeDoc
      Represents an annotation type.
      interface  AnnotationTypeElementDoc
      Represents an element of an annotation type.
      interface  ClassDoc
      Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
      interface  ConstructorDoc
      Represents a constructor of a java class.
      interface  ExecutableMemberDoc
      Represents a method or constructor of a java class.
      interface  FieldDoc
      Represents a field in a java class.
      interface  MemberDoc
      Represents a member of a java class: field, constructor, or method.
      interface  MethodDoc
      Represents a method of a java class.
      Methods in com.sun.javadoc that return ProgramElementDoc
      Modifier and Type Method and Description
      ProgramElementDoc TypeVariable.owner()
      Return the class, interface, method, or constructor within which this type variable is declared.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.RootDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.RootDoc

    • Uses of RootDoc in com.sun.javadoc

      Methods in com.sun.javadoc with parameters of type RootDoc
      Modifier and Type Method and Description
      static boolean Doclet.start(RootDoc root)
      Generate documentation here.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.SeeTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.SeeTag

    • Uses of SeeTag in com.sun.javadoc

      Methods in com.sun.javadoc that return SeeTag
      Modifier and Type Method and Description
      SeeTag[] Doc.seeTags()
      Return the see also tags in this Doc item.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.SerialFieldTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.SerialFieldTag

    • Uses of SerialFieldTag in com.sun.javadoc

      Methods in com.sun.javadoc that return SerialFieldTag
      Modifier and Type Method and Description
      SerialFieldTag[] FieldDoc.serialFieldTags()
      Return the serialField tags in this FieldDoc item.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.SourcePosition

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.SourcePosition

    • Uses of SourcePosition in com.sun.javadoc

      Methods in com.sun.javadoc that return SourcePosition
      Modifier and Type Method and Description
      SourcePosition Tag.position()
      Return the source position of this tag.
      SourcePosition Doc.position()
      Return the source position of the first line of the corresponding declaration, or null if no position is available.
      Methods in com.sun.javadoc with parameters of type SourcePosition
      Modifier and Type Method and Description
      void DocErrorReporter.printError(SourcePosition pos, String msg)
      Print an error message and increment error count.
      void DocErrorReporter.printNotice(SourcePosition pos, String msg)
      Print a message.
      void DocErrorReporter.printWarning(SourcePosition pos, String msg)
      Print warning message and increment warning count.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.Tag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.Tag

    • Uses of Tag in com.sun.javadoc

      Subinterfaces of Tag in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  ParamTag
      Represents an @param documentation tag.
      interface  SeeTag
      Represents a user-defined cross-reference to related documentation.
      interface  SerialFieldTag
      Documents a Serializable field defined by an ObjectStreamField.
      interface  ThrowsTag
      Represents a @throws or @exception documentation tag.
      Methods in com.sun.javadoc that return Tag
      Modifier and Type Method and Description
      Tag[] Tag.firstSentenceTags()
      Return the first sentence of the comment as an array of tags.
      Tag[] Doc.firstSentenceTags()
      Return the first sentence of the comment as an array of tags.
      Tag[] Tag.inlineTags()
      For a documentation comment with embedded {@link} tags, return an array of Tag objects.
      Tag[] Doc.inlineTags()
      Return comment as an array of tags.
      Tag[] Doc.tags()
      Return all tags in this Doc item.
      Tag[] Doc.tags(String tagname)
      Return tags of the specified kind in this Doc item.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.ThrowsTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.ThrowsTag

    • Uses of ThrowsTag in com.sun.javadoc

      Methods in com.sun.javadoc that return ThrowsTag
      Modifier and Type Method and Description
      ThrowsTag[] ExecutableMemberDoc.throwsTags()
      Return the throws tags in this method.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.Type

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.Type

    • Uses of Type in com.sun.javadoc

      Subinterfaces of Type in com.sun.javadoc
      Modifier and Type Interface and Description
      interface  AnnotatedType
      Represents an annotated type.
      interface  AnnotationTypeDoc
      Represents an annotation type.
      interface  ClassDoc
      Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class.
      interface  ParameterizedType
      Represents an invocation of a generic class or interface.
      interface  TypeVariable
      Represents a type variable.
      interface  WildcardType
      Represents a wildcard type argument.
      Methods in com.sun.javadoc that return Type
      Modifier and Type | Method and Description
      Type[] TypeVariable.bounds()
      Return the bounds of this type variable.
      Type ParameterizedType.containingType()
      Return the type that contains this type as a member.
      Type ThrowsTag.exceptionType()
      Return the type of the exception associated with this ThrowsTag.
      Type[] WildcardType.extendsBounds()
      Return the upper bounds of this wildcard type argument as given by the extends clause.
      Type Type.getElementType()
      If this type is an array type, return the element type of the array.
      Type[] ClassDoc.interfaceTypes()
      Return interfaces implemented by this class or interfaces extended by this interface.
      Type[] ParameterizedType.interfaceTypes()
      Return the interface types directly implemented by or extended by this parameterized type.
      Type MethodDoc.overriddenType()
      Return the type containing the method that this method overrides.
      Type ExecutableMemberDoc.receiverType()
      Get the receiver type of this executable element.
      Type MethodDoc.returnType()
      Get return type.
      Type[] WildcardType.superBounds()
      Return the lower bounds of this wildcard type argument as given by the super clause.
      Type ClassDoc.superclassType()
      Return the superclass of this class.
      Type ParameterizedType.superclassType()
      Return the class type that is a direct supertype of this one.
      Type[] ExecutableMemberDoc.thrownExceptionTypes()
      Return exceptions this method or constructor throws.
      Type Parameter.type()
      Get the type of this parameter.
      Type FieldDoc.type()
      Get type of this field.
      Type[] ParameterizedType.typeArguments()
      Return the actual type arguments of this type.
      Type | AnnotatedType.underlyingType()
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.TypeVariable

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.TypeVariable

    • Uses of TypeVariable in com.sun.javadoc

      Methods in com.sun.javadoc that return TypeVariable
      Modifier and Type Method and Description
      TypeVariable Type.asTypeVariable()
      Return this type as a TypeVariable if it represents a type variable.
      TypeVariable[] ClassDoc.typeParameters()
      Return the formal type parameters of this class or interface.
      TypeVariable[] ExecutableMemberDoc.typeParameters()
      Return the formal type parameters of this method or constructor.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.javadoc.WildcardType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.javadoc.WildcardType

    • Uses of WildcardType in com.sun.javadoc

      Methods in com.sun.javadoc that return WildcardType
      Modifier and Type Method and Description
      WildcardType Type.asWildcardType()
      Return this type as a WildcardType if it represents a wildcard type.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ClassDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ClassDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, ProgramElementDoc, Type
    All Known Subinterfaces:
    AnnotationTypeDoc

    public interface ClassDoc
extends ProgramElementDoc, Type
    Represents a java class or interface and provides access to information about the class, the class's comment and tags, and the members of the class. A ClassDoc only exists if it was processed in this run of javadoc. References to classes which may or may not have been processed in this run are referred to using Type (which can be converted to ClassDoc, if possible).
    Since:
    1.2
    See Also:
    Type

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods
      Modifier and Type Method and Description
      ConstructorDoc[] constructors()
      Return included constructors in this class.
      ConstructorDoc[] constructors(boolean filter)
      Return constructors in this class, filtered to the specified access modifier option.
      boolean definesSerializableFields()
      Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
      FieldDoc[] enumConstants()
      Return the enum constants if this is an enum type.
      FieldDoc[] fields()
      Return included fields in this class or interface.
      FieldDoc[] fields(boolean filter)
      Return fields in this class or interface, filtered to the specified access modifier option.
      ClassDoc findClass(String className)
      Find the specified class or interface within the context of this class doc.
      ClassDoc[] importedClasses()
      Deprecated.
      Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.
      PackageDoc[] importedPackages()
      Deprecated.
      Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.
      ClassDoc[] innerClasses()
      Return included nested classes and interfaces within this class or interface.
      ClassDoc[] innerClasses(boolean filter)
      Return nested classes and interfaces within this class or interface filtered to the specified access modifier option.
      ClassDoc[] interfaces()
      Return interfaces implemented by this class or interfaces extended by this interface.
      Type[] interfaceTypes()
      Return interfaces implemented by this class or interfaces extended by this interface.
      boolean isAbstract()
      Return true if this class is abstract.
      boolean isExternalizable()
      Return true if this class implements or interface extends java.io.Externalizable.
      boolean isSerializable()
      Return true if this class implements or interface extends java.io.Serializable.
      MethodDoc[] methods()
      Return included methods in this class or interface.
      MethodDoc[] methods(boolean filter)
      Return methods in this class or interface, filtered to the specified access modifier option.
      FieldDoc[] serializableFields()
      Return the Serializable fields of this class or interface.
      MethodDoc[] serializationMethods()
      Return the serialization methods for this class or interface.
      boolean subclassOf(ClassDoc cd)
      Test whether this class is a subclass of the specified class.
      ClassDoc superclass()
      Return the superclass of this class.
      Type superclassType()
      Return the superclass of this class.
      TypeVariable[] typeParameters()
      Return the formal type parameters of this class or interface.
      ParamTag[] typeParamTags()
      Return the type parameter tags of this class or interface.

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • isAbstract

        boolean isAbstract()
        Return true if this class is abstract. Return true for all interfaces.

      • isSerializable

        boolean isSerializable()
        Return true if this class implements or interface extends java.io.Serializable. Since java.io.Externalizable extends java.io.Serializable, Externalizable objects are also Serializable.

      • isExternalizable

        boolean isExternalizable()
        Return true if this class implements or interface extends java.io.Externalizable.

      • serializationMethods

        MethodDoc[] serializationMethods()
        Return the serialization methods for this class or interface.
        Returns:
        an array of MethodDoc objects that represents the serialization methods for this class or interface.

      • serializableFields

        FieldDoc[] serializableFields()
        Return the Serializable fields of this class or interface.

        Return either a list of default fields documented by serial tag
        or return a single FieldDoc for serialPersistentField member. There should be a serialField tag for each Serializable field defined by an ObjectStreamField array component of serialPersistentField.

        Returns:
        an array of FieldDoc objects for the Serializable fields of this class or interface.
        See Also:
        definesSerializableFields(), SerialFieldTag

      • definesSerializableFields

        boolean definesSerializableFields()
        Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
        See Also:
        serializableFields(), SerialFieldTag

      • superclass

        ClassDoc superclass()
        Return the superclass of this class. Return null if this is an interface.

        This method cannot accommodate certain generic type constructs. The superclassType method should be used instead.

        Returns:
        the ClassDoc for the superclass of this class, null if there is no superclass.
        See Also:
        superclassType()

      • superclassType

        Type superclassType()
        Return the superclass of this class. Return null if this is an interface. A superclass is represented by either a ClassDoc or a ParametrizedType.
        Returns:
        the superclass of this class, or null if there is no superclass.
        Since:
        1.5

      • subclassOf

        boolean subclassOf(ClassDoc cd)
        Test whether this class is a subclass of the specified class. If this is an interface, return false for all classes except java.lang.Object (we must keep this unexpected behavior for compatibility reasons).
        Parameters:
        cd - the candidate superclass.
        Returns:
        true if cd is a superclass of this class.

      • interfaces

        ClassDoc[] interfaces()
        Return interfaces implemented by this class or interfaces extended by this interface. Includes only directly-declared interfaces, not inherited interfaces. Return an empty array if there are no interfaces.

        This method cannot accommodate certain generic type constructs. The interfaceTypes method should be used instead.

        Returns:
        an array of ClassDoc objects representing the interfaces.
        See Also:
        interfaceTypes()

      • interfaceTypes

        Type[] interfaceTypes()
        Return interfaces implemented by this class or interfaces extended by this interface. Includes only directly-declared interfaces, not inherited interfaces. Return an empty array if there are no interfaces.
        Returns:
        an array of interfaces, each represented by a ClassDoc or a ParametrizedType.
        Since:
        1.5

      • typeParameters

        TypeVariable[] typeParameters()
        Return the formal type parameters of this class or interface. Return an empty array if there are none.
        Returns:
        the formal type parameters of this class or interface.
        Since:
        1.5

      • typeParamTags

        ParamTag[] typeParamTags()
        Return the type parameter tags of this class or interface. Return an empty array if there are none.
        Returns:
        the type parameter tags of this class or interface.
        Since:
        1.5

      • fields

        FieldDoc[] fields()
        Return included fields in this class or interface. Excludes enum constants if this is an enum type.
        Returns:
        an array of FieldDoc objects representing the included fields in this class or interface.

      • fields

        FieldDoc[] fields(boolean filter)
        Return fields in this class or interface, filtered to the specified access modifier option. Excludes enum constants if this is an enum type.
        Parameters:
        filter - Specify true to filter according to the specified access modifier option. Specify false to include all fields regardless of access modifier option.
        Returns:
        an array of FieldDoc objects representing the included fields in this class or interface.

      • enumConstants

        FieldDoc[] enumConstants()
        Return the enum constants if this is an enum type. Return an empty array if there are no enum constants, or if this is not an enum type.
        Returns:
        the enum constants if this is an enum type.

      • methods

        MethodDoc[] methods()
        Return included methods in this class or interface. Same as methods(true).
        Returns:
        an array of MethodDoc objects representing the included methods in this class or interface. Does not include constructors or annotation type elements.

      • methods

        MethodDoc[] methods(boolean filter)
        Return methods in this class or interface, filtered to the specified access modifier option. Does not include constructors or annotation type elements.
        Parameters:
        filter - Specify true to filter according to the specified access modifier option. Specify false to include all methods regardless of access modifier option.
        Returns:
        an array of MethodDoc objects representing the included methods in this class or interface.

      • constructors

        ConstructorDoc[] constructors()
        Return included constructors in this class. An array containing the default no-arg constructor is returned if no other constructors exist. Return empty array if this is an interface.
        Returns:
        an array of ConstructorDoc objects representing the included constructors in this class.

      • constructors

        ConstructorDoc[] constructors(boolean filter)
        Return constructors in this class, filtered to the specified access modifier option. Return an array containing the default no-arg constructor if no other constructors exist.
        Parameters:
        filter - Specify true to filter according to the specified access modifier option. Specify false to include all constructors regardless of access modifier option.
        Returns:
        an array of ConstructorDoc objects representing the included constructors in this class.

      • innerClasses

        ClassDoc[] innerClasses()
        Return included nested classes and interfaces within this class or interface. This includes both static and non-static nested classes. (This method should have been named nestedClasses(), as inner classes are technically non-static.) Anonymous and local classes or interfaces are not included.
        Returns:
        an array of ClassDoc objects representing the included classes and interfaces defined in this class or interface.

      • innerClasses

        ClassDoc[] innerClasses(boolean filter)
        Return nested classes and interfaces within this class or interface filtered to the specified access modifier option. This includes both static and non-static nested classes. Anonymous and local classes are not included.
        Parameters:
        filter - Specify true to filter according to the specified access modifier option. Specify false to include all nested classes regardless of access modifier option.
        Returns:
        a filtered array of ClassDoc objects representing the included classes and interfaces defined in this class or interface.

      • findClass

        ClassDoc findClass(String className)
        Find the specified class or interface within the context of this class doc. Search order: 1) qualified name, 2) nested in this class or interface, 3) in this package, 4) in the class imports, 5) in the package imports. Return the ClassDoc if found, null if not found.

      • importedClasses

        @Deprecated
ClassDoc[] importedClasses()
        Deprecated. Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.
        Get the list of classes and interfaces declared as imported. These are called "single-type-import declarations" in The Java™ Language Specification.
        Returns:
        an array of ClassDoc representing the imported classes.

      • importedPackages

        @Deprecated
PackageDoc[] importedPackages()
        Deprecated. Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.
        Get the list of packages declared as imported. These are called "type-import-on-demand declarations" in The Java™ Language Specification.
        Returns:
        an array of PackageDoc representing the imported packages.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Doc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface Doc

  • All Superinterfaces:
    Comparable<Object>
    All Known Subinterfaces:
    AnnotationTypeDoc, AnnotationTypeElementDoc, ClassDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MemberDoc, MethodDoc, PackageDoc, ProgramElementDoc, RootDoc

    public interface Doc
extends Comparable<Object>
    Represents Java language constructs (package, class, constructor, method, field) which have comments and have been processed by this run of javadoc. All Doc objects are unique, that is, they are == comparable.
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String commentText()
      Return the text of the comment for this doc item.
      int compareTo(Object obj)
      Compares this doc object with the specified object for order.
      Tag[] firstSentenceTags()
      Return the first sentence of the comment as an array of tags.
      String getRawCommentText()
      Return the full unprocessed text of the comment.
      Tag[] inlineTags()
      Return comment as an array of tags.
      boolean isAnnotationType()
      Is this Doc item an annotation type?
      boolean isAnnotationTypeElement()
      Is this Doc item an annotation type element?
      boolean isClass()
      Is this Doc item a class (and not an interface or annotation type)?
      boolean isConstructor()
      Is this Doc item a constructor?
      boolean isEnum()
      Is this Doc item an enum type?
      boolean isEnumConstant()
      Is this Doc item an enum constant?
      boolean isError()
      Is this Doc item an error class?
      boolean isException()
      Is this Doc item an exception class?
      boolean isField()
      Is this Doc item a field (but not an enum constant)?
      boolean isIncluded()
      Return true if this Doc item is included in the result set.
      boolean isInterface()
      Is this Doc item an interface (but not an annotation type)?
      boolean isMethod()
      Is this Doc item a method (but not a constructor or annotation type element)?
      boolean isOrdinaryClass()
      Is this Doc item an ordinary class?
      String name()
      Returns the non-qualified name of this Doc item.
      SourcePosition position()
      Return the source position of the first line of the corresponding declaration, or null if no position is available.
      SeeTag[] seeTags()
      Return the see also tags in this Doc item.
      void setRawCommentText(String rawDocumentation)
      Set the full unprocessed text of the comment.
      Tag[] tags()
      Return all tags in this Doc item.
      Tag[] tags(String tagname)
      Return tags of the specified kind in this Doc item.

    • Method Detail

      • commentText

        String commentText()
        Return the text of the comment for this doc item. Tags have been removed.

      • tags

        Tag[] tags()
        Return all tags in this Doc item.
        Returns:
        an array of Tag objects containing all tags on this Doc item.

      • tags

        Tag[] tags(String tagname)
        Return tags of the specified kind in this Doc item. For example, if 'tagname' has value "@serial", all tags in this Doc item of kind "@serial" will be returned.
        Parameters:
        tagname - name of the tag kind to search for.
        Returns:
        an array of Tag containing all tags whose 'kind()' matches 'tagname'.

      • seeTags

        SeeTag[] seeTags()
        Return the see also tags in this Doc item.
        Returns:
        an array of SeeTag containing all @see tags.

      • inlineTags

        Tag[] inlineTags()
        Return comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "@see" and name "@link".
        Returns:
        an array of Tags representing the comment

      • firstSentenceTags

        Tag[] firstSentenceTags()
        Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "@see" and name "@link".

        If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): "This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.", in addition a line will be terminated by block HTML tags: <p> </p> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <pre> or </pre>. If the locale is not English, the sentence end will be determined by BreakIterator.getSentenceInstance(Locale).

        Returns:
        an array of Tags representing the first sentence of the comment

      • getRawCommentText

        String getRawCommentText()
        Return the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

      • setRawCommentText

        void setRawCommentText(String rawDocumentation)
        Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

      • name

        String name()
        Returns the non-qualified name of this Doc item.
        Returns:
        the name

      • compareTo

        int compareTo(Object obj)
        Compares this doc object with the specified object for order. Returns a negative integer, zero, or a positive integer as this doc object is less than, equal to, or greater than the given object.

        This method satisfies the Comparable interface.

        Specified by:
        compareTo in interface Comparable<Object>
        Parameters:
        obj - the Object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
        Throws:
        ClassCastException - the specified Object's type prevents it from being compared to this Object.

      • isField

        boolean isField()
        Is this Doc item a field (but not an enum constant)?
        Returns:
        true if it represents a field

      • isEnumConstant

        boolean isEnumConstant()
        Is this Doc item an enum constant?
        Returns:
        true if it represents an enum constant
        Since:
        1.5

      • isConstructor

        boolean isConstructor()
        Is this Doc item a constructor?
        Returns:
        true if it represents a constructor

      • isMethod

        boolean isMethod()
        Is this Doc item a method (but not a constructor or annotation type element)?
        Returns:
        true if it represents a method

      • isAnnotationTypeElement

        boolean isAnnotationTypeElement()
        Is this Doc item an annotation type element?
        Returns:
        true if it represents an annotation type element
        Since:
        1.5

      • isInterface

        boolean isInterface()
        Is this Doc item an interface (but not an annotation type)?
        Returns:
        true if it represents an interface

      • isException

        boolean isException()
        Is this Doc item an exception class?
        Returns:
        true if it represents an exception

      • isError

        boolean isError()
        Is this Doc item an error class?
        Returns:
        true if it represents a error

      • isEnum

        boolean isEnum()
        Is this Doc item an enum type?
        Returns:
        true if it represents an enum type
        Since:
        1.5

      • isAnnotationType

        boolean isAnnotationType()
        Is this Doc item an annotation type?
        Returns:
        true if it represents an annotation type
        Since:
        1.5

      • isOrdinaryClass

        boolean isOrdinaryClass()
        Is this Doc item an ordinary class? (i.e. not an interface, annotation type, enum, exception, or error)?
        Returns:
        true if it represents an ordinary class

      • isClass

        boolean isClass()
        Is this Doc item a class (and not an interface or annotation type)? This includes ordinary classes, enums, errors and exceptions.
        Returns:
        true if it represents a class

      • isIncluded

        boolean isIncluded()
        Return true if this Doc item is included in the result set.

      • position

        SourcePosition position()
        Return the source position of the first line of the corresponding declaration, or null if no position is available. A default constructor returns null because it has no location in the source file.
        Since:
        1.4
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


DocErrorReporter

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface DocErrorReporter

  • All Known Subinterfaces:
    RootDoc

    public interface DocErrorReporter
    This interface provides error, warning and notice printing.
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void printError(SourcePosition pos, String msg)
      Print an error message and increment error count.
      void printError(String msg)
      Print error message and increment error count.
      void printNotice(SourcePosition pos, String msg)
      Print a message.
      void printNotice(String msg)
      Print a message.
      void printWarning(SourcePosition pos, String msg)
      Print warning message and increment warning count.
      void printWarning(String msg)
      Print warning message and increment warning count.

    • Method Detail

      • printError

        void printError(String msg)
        Print error message and increment error count.
        Parameters:
        msg - message to print

      • printError

        void printError(SourcePosition pos,
                String msg)
        Print an error message and increment error count.
        Parameters:
        pos - the position item where the error occurs
        msg - message to print
        Since:
        1.4

      • printWarning

        void printWarning(String msg)
        Print warning message and increment warning count.
        Parameters:
        msg - message to print

      • printWarning

        void printWarning(SourcePosition pos,
                  String msg)
        Print warning message and increment warning count.
        Parameters:
        pos - the position item where the warning occurs
        msg - message to print
        Since:
        1.4

      • printNotice

        void printNotice(String msg)
        Print a message.
        Parameters:
        msg - message to print

      • printNotice

        void printNotice(SourcePosition pos,
                 String msg)
        Print a message.
        Parameters:
        pos - the position item where the message occurs
        msg - message to print
        Since:
        1.4
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Doclet

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Class Doclet

  • java.lang.Object
    • com.sun.javadoc.Doclet

  • public abstract class Doclet
extends Object
    This is an example of a starting class for a doclet, showing the entry-point methods. A starting class must import com.sun.javadoc.* and implement the start(RootDoc) method, as described in the package description. If the doclet takes command line options, it must also implement optionLength and validOptions.

    A doclet supporting the language features added since 1.1 (such as generics and annotations) should indicate this by implementing languageVersion. In the absence of this the doclet should not invoke any of the Doclet API methods added since 1.5, and the results of several other methods are modified so as to conceal the new constructs (such as type parameters) from the doclet.

    To start the doclet, pass -doclet followed by the fully-qualified name of the starting class on the javadoc tool command line.

    • Constructor Summary

      Constructors
      Constructor and Description
      Doclet()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static LanguageVersion languageVersion()
      Return the version of the Java Programming Language supported by this doclet.
      static int optionLength(String option)
      Check for doclet-added options.
      static boolean start(RootDoc root)
      Generate documentation here.
      static boolean validOptions(String[][] options, DocErrorReporter reporter)
      Check that options have the correct arguments.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Doclet

        public Doclet()

    • Method Detail

      • start

        public static boolean start(RootDoc root)
        Generate documentation here. This method is required for all doclets.
        Returns:
        true on success.

      • optionLength

        public static int optionLength(String option)
        Check for doclet-added options. Returns the number of arguments you must specify on the command line for the given option. For example, "-d docs" would return 2.

        This method is required if the doclet contains any options. If this method is missing, Javadoc will print an invalid flag error for every option.

        Returns:
        number of arguments on the command line for an option including the option name itself. Zero return means option not known. Negative value means error occurred.

      • validOptions

        public static boolean validOptions(String[][] options,
                                   DocErrorReporter reporter)
        Check that options have the correct arguments.

        This method is not required, but is recommended, as every option will be considered valid if this method is not present. It will default gracefully (to true) if absent.

        Printing option related error messages (using the provided DocErrorReporter) is the responsibility of this method.

        Returns:
        true if the options are valid.

      • languageVersion

        public static LanguageVersion languageVersion()
        Return the version of the Java Programming Language supported by this doclet.

        This method is required by any doclet supporting a language version newer than 1.1.

        Returns:
        the language version supported by this doclet.
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ExecutableMemberDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ExecutableMemberDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, MemberDoc, ProgramElementDoc
    All Known Subinterfaces:
    AnnotationTypeElementDoc, ConstructorDoc, MethodDoc

    public interface ExecutableMemberDoc
extends MemberDoc
    Represents a method or constructor of a java class.
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String flatSignature()
      get flat signature.
      boolean isNative()
      Return true if this method is native
      boolean isSynchronized()
      Return true if this method is synchronized
      boolean isVarArgs()
      Return true if this method was declared to take a variable number of arguments.
      Parameter[] parameters()
      Get argument information.
      ParamTag[] paramTags()
      Return the param tags in this method, excluding the type parameter tags.
      Type receiverType()
      Get the receiver type of this executable element.
      String signature()
      Get the signature.
      ClassDoc[] thrownExceptions()
      Return exceptions this method or constructor throws.
      Type[] thrownExceptionTypes()
      Return exceptions this method or constructor throws.
      ThrowsTag[] throwsTags()
      Return the throws tags in this method.
      TypeVariable[] typeParameters()
      Return the formal type parameters of this method or constructor.
      ParamTag[] typeParamTags()
      Return the type parameter tags in this method.

      • Methods inherited from interface com.sun.javadoc.MemberDoc

        isSynthetic

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • thrownExceptions

        ClassDoc[] thrownExceptions()
        Return exceptions this method or constructor throws. If the type of the exception is a type variable, return the ClassDoc of its erasure.

        The thrownExceptions method cannot accommodate certain generic type constructs. The thrownExceptionTypes method should be used instead.

        Returns:
        an array of ClassDoc[] representing the exceptions thrown by this method.
        See Also:
        thrownExceptionTypes()

      • thrownExceptionTypes

        Type[] thrownExceptionTypes()
        Return exceptions this method or constructor throws.
        Returns:
        an array representing the exceptions thrown by this method. Each array element is either a ClassDoc or a TypeVariable.
        Since:
        1.5

      • isNative

        boolean isNative()
        Return true if this method is native

      • isSynchronized

        boolean isSynchronized()
        Return true if this method is synchronized

      • isVarArgs

        boolean isVarArgs()
        Return true if this method was declared to take a variable number of arguments.
        Since:
        1.5

      • parameters

        Parameter[] parameters()
        Get argument information.
        Returns:
        an array of Parameter, one element per argument in the order the arguments are present.
        See Also:
        Parameter

      • receiverType

        Type receiverType()
        Get the receiver type of this executable element.
        Returns:
        the receiver type of this executable element.
        Since:
        1.8

      • throwsTags

        ThrowsTag[] throwsTags()
        Return the throws tags in this method.
        Returns:
        an array of ThrowTag containing all @exception and @throws tags.

      • paramTags

        ParamTag[] paramTags()
        Return the param tags in this method, excluding the type parameter tags.
        Returns:
        an array of ParamTag containing all @param tags corresponding to the parameters of this method.

      • typeParamTags

        ParamTag[] typeParamTags()
        Return the type parameter tags in this method.
        Returns:
        an array of ParamTag containing all @param tags corresponding to the type parameters of this method.
        Since:
        1.5

      • signature

        String signature()
        Get the signature. It is the parameter list, type is qualified. For instance, for a method mymethod(String x, int y), it will return (java.lang.String,int).

      • flatSignature

        String flatSignature()
        get flat signature. all types are not qualified. return a String, which is the flat signiture of this member. It is the parameter list, type is not qualified. For instance, for a method mymethod(String x, int y), it will return (String, int).

      • typeParameters

        TypeVariable[] typeParameters()
        Return the formal type parameters of this method or constructor. Return an empty array if this method or constructor is not generic.
        Returns:
        the formal type parameters of this method or constructor.
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


FieldDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface FieldDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, MemberDoc, ProgramElementDoc

    public interface FieldDoc
extends MemberDoc
    Represents a field in a java class.
    Since:
    1.2
    See Also:
    MemberDoc

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Object constantValue()
      Get the value of a constant field.
      String constantValueExpression()
      Get the value of a constant field.
      boolean isTransient()
      Return true if this field is transient
      boolean isVolatile()
      Return true if this field is volatile
      SerialFieldTag[] serialFieldTags()
      Return the serialField tags in this FieldDoc item.
      Type type()
      Get type of this field.

      • Methods inherited from interface com.sun.javadoc.MemberDoc

        isSynthetic

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • type

        Type type()
        Get type of this field.

      • isTransient

        boolean isTransient()
        Return true if this field is transient

      • isVolatile

        boolean isVolatile()
        Return true if this field is volatile

      • serialFieldTags

        SerialFieldTag[] serialFieldTags()
        Return the serialField tags in this FieldDoc item.
        Returns:
        an array of SerialFieldTag objects containing all @serialField tags.

      • constantValue

        Object constantValue()
        Get the value of a constant field.
        Returns:
        the value of a constant field. The value is automatically wrapped in an object if it has a primitive type. If the field is not constant, returns null.

      • constantValueExpression

        String constantValueExpression()
        Get the value of a constant field.
        Returns:
        the text of a Java language expression whose value is the value of the constant. The expression uses no identifiers other than primitive literals. If the field is not constant, returns null.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


LanguageVersion

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.javadoc

Enum LanguageVersion

  • java.lang.Object
    • java.lang.Enum<LanguageVersion>
      • com.sun.javadoc.LanguageVersion
  • All Implemented Interfaces:
    Serializable, Comparable<LanguageVersion>

    public enum LanguageVersion
extends Enum<LanguageVersion>
    Java Programming Language version. The constants of this enum identify the JDK and J2SE releases containing language changes relevant to doclets.

    All doclets support at least the 1.1 language version. The first release subsequent to this with language changes affecting doclets is 1.5.

    Since:
    1.5

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      JAVA_1_1
      1.1 added nested classes and interfaces.
      JAVA_1_5
      1.5 added generic types, annotations, enums, and varArgs.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static LanguageVersion valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static LanguageVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • JAVA_1_1

        public static final LanguageVersion JAVA_1_1
        1.1 added nested classes and interfaces.

      • JAVA_1_5

        public static final LanguageVersion JAVA_1_5
        1.5 added generic types, annotations, enums, and varArgs.

    • Method Detail

      • values

        public static LanguageVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LanguageVersion c : LanguageVersion.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static LanguageVersion valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


MemberDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface MemberDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, ProgramElementDoc
    All Known Subinterfaces:
    AnnotationTypeElementDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MethodDoc

    public interface MemberDoc
extends ProgramElementDoc
    Represents a member of a java class: field, constructor, or method. This is an abstract class dealing with information common to method, constructor and field members. Class members of a class (innerclasses) are represented instead by ClassDoc.
    See Also:
    MethodDoc, FieldDoc, ClassDoc

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isSynthetic()
      Returns true if this member was synthesized by the compiler.

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • isSynthetic

        boolean isSynthetic()
        Returns true if this member was synthesized by the compiler.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


MethodDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface MethodDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, ExecutableMemberDoc, MemberDoc, ProgramElementDoc
    All Known Subinterfaces:
    AnnotationTypeElementDoc

    public interface MethodDoc
extends ExecutableMemberDoc
    Represents a method of a java class.
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isAbstract()
      Return true if this method is abstract
      boolean isDefault()
      Return true if this method is default
      ClassDoc overriddenClass()
      Return the class containing the method that this method overrides.
      MethodDoc overriddenMethod()
      Return the method that this method overrides.
      Type overriddenType()
      Return the type containing the method that this method overrides.
      boolean overrides(MethodDoc meth)
      Tests whether this method overrides another.
      Type returnType()
      Get return type.

      • Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc

        flatSignature, isNative, isSynchronized, isVarArgs, parameters, paramTags, receiverType, signature, thrownExceptions, thrownExceptionTypes, throwsTags, typeParameters, typeParamTags

      • Methods inherited from interface com.sun.javadoc.MemberDoc

        isSynthetic

      • Methods inherited from interface com.sun.javadoc.ProgramElementDoc

        annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • isAbstract

        boolean isAbstract()
        Return true if this method is abstract

      • isDefault

        boolean isDefault()
        Return true if this method is default

      • returnType

        Type returnType()
        Get return type.
        Returns:
        the return type of this method, null if it is a constructor.

      • overriddenClass

        ClassDoc overriddenClass()
        Return the class containing the method that this method overrides.

        The overriddenClass method cannot accommodate certain generic type constructs. The overriddenType method should be used instead.

        Returns:
        a ClassDoc representing the superclass defining a method that this method overrides, or null if this method does not override.

      • overriddenType

        Type overriddenType()
        Return the type containing the method that this method overrides. It may be a ClassDoc or a ParameterizedType.
        Returns:
        the supertype whose method is overridden, or null if this method does not override another in a superclass
        Since:
        1.5

      • overriddenMethod

        MethodDoc overriddenMethod()
        Return the method that this method overrides.
        Returns:
        a MethodDoc representing a method definition in a superclass this method overrides, null if this method does not override.

      • overrides

        boolean overrides(MethodDoc meth)
        Tests whether this method overrides another. The overridden method may be one declared in a superclass or a superinterface (unlike overriddenMethod()).

        When a non-abstract method overrides an abstract one, it is also said to implement the other.

        Parameters:
        meth - the other method to examine
        Returns:
        true if this method overrides the other
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


PackageDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface PackageDoc

  • All Superinterfaces:
    Comparable<Object>, Doc

    public interface PackageDoc
extends Doc
    Represents a java package. Provides access to information about the package, the package's comment and tags, and the classes in the package.

    Each method whose return type is an array will return an empty array (never null) when there are no objects in the result.

    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ClassDoc[] allClasses()
      Get all included classes and interfaces in the package.
      ClassDoc[] allClasses(boolean filter)
      Get all classes and interfaces in the package, filtered to the specified access modifier option.
      AnnotationDesc[] annotations()
      Get the annotations of this package.
      AnnotationTypeDoc[] annotationTypes()
      Get included annotation types in this package.
      ClassDoc[] enums()
      Get included enum types in this package.
      ClassDoc[] errors()
      Get included Error classes in this package.
      ClassDoc[] exceptions()
      Get included Exception classes in this package.
      ClassDoc findClass(String className)
      Lookup a class or interface within this package.
      ClassDoc[] interfaces()
      Get included interfaces in this package, omitting annotation types.
      ClassDoc[] ordinaryClasses()
      Get included ordinary classes (that is, exclude exceptions, errors, enums, interfaces, and annotation types) in this package.

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • allClasses

        ClassDoc[] allClasses(boolean filter)
        Get all classes and interfaces in the package, filtered to the specified access modifier option.
        Parameters:
        filter - Specifying true filters according to the specified access modifier option. Specifying false includes all classes and interfaces regardless of access modifier option.
        Returns:
        filtered classes and interfaces in this package
        Since:
        1.4

      • allClasses

        ClassDoc[] allClasses()
        Get all included classes and interfaces in the package. Same as allClasses(true).
        Returns:
        all included classes and interfaces in this package.

      • ordinaryClasses

        ClassDoc[] ordinaryClasses()
        Get included ordinary classes (that is, exclude exceptions, errors, enums, interfaces, and annotation types) in this package.
        Returns:
        included ordinary classes in this package.

      • exceptions

        ClassDoc[] exceptions()
        Get included Exception classes in this package.
        Returns:
        included Exceptions in this package.

      • errors

        ClassDoc[] errors()
        Get included Error classes in this package.
        Returns:
        included Errors in this package.

      • enums

        ClassDoc[] enums()
        Get included enum types in this package.
        Returns:
        included enum types in this package.
        Since:
        1.5

      • interfaces

        ClassDoc[] interfaces()
        Get included interfaces in this package, omitting annotation types.
        Returns:
        included interfaces in this package.

      • annotationTypes

        AnnotationTypeDoc[] annotationTypes()
        Get included annotation types in this package.
        Returns:
        included annotation types in this package.
        Since:
        1.5

      • annotations

        AnnotationDesc[] annotations()
        Get the annotations of this package. Return an empty array if there are none.
        Returns:
        the annotations of this package.
        Since:
        1.5

      • findClass

        ClassDoc findClass(String className)
        Lookup a class or interface within this package.
        Returns:
        ClassDoc of found class or interface, or null if not found.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Parameter

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface Parameter

  • public interface Parameter
    Parameter information. This includes a parameter type and parameter name.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationDesc[] annotations()
      Get the annotations of this parameter.
      String name()
      Get local name of this parameter.
      String toString()
      Returns a string representation of the parameter.
      Type type()
      Get the type of this parameter.
      String typeName()
      Get type name of this parameter.

    • Method Detail

      • type

        Type type()
        Get the type of this parameter.

      • name

        String name()
        Get local name of this parameter. For example if parameter is the short 'index', returns "index".

      • typeName

        String typeName()
        Get type name of this parameter. For example if parameter is the short 'index', returns "short".

        This method returns a complete string representation of the type, including the dimensions of arrays and the type arguments of parameterized types. Names are qualified.

      • toString

        String toString()
        Returns a string representation of the parameter.

        For example if parameter is the short 'index', returns "short index".

        Overrides:
        toString in class Object
        Returns:
        type and parameter name of this parameter.

      • annotations

        AnnotationDesc[] annotations()
        Get the annotations of this parameter. Return an empty array if there are none.
        Returns:
        the annotations of this parameter.
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ParameterizedType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ParameterizedType

  • All Superinterfaces:
    Type

    public interface ParameterizedType
extends Type
    Represents an invocation of a generic class or interface. For example, given the generic interface List<E>, possible invocations include:
           List<String>
       List<T extends Number>
       List<?>
    A generic inner class Outer<T>.Inner<S> might be invoked as:
           Outer<Number>.Inner<String>
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ClassDoc asClassDoc()
      Return the generic class or interface that declared this type.
      Type containingType()
      Return the type that contains this type as a member.
      Type[] interfaceTypes()
      Return the interface types directly implemented by or extended by this parameterized type.
      Type superclassType()
      Return the class type that is a direct supertype of this one.
      Type[] typeArguments()
      Return the actual type arguments of this type.

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • asClassDoc

        ClassDoc asClassDoc()
        Return the generic class or interface that declared this type.
        Specified by:
        asClassDoc in interface Type
        Returns:
        the generic class or interface that declared this type.

      • typeArguments

        Type[] typeArguments()
        Return the actual type arguments of this type. For a generic type that is nested within some other generic type (such as Outer<T>.Inner<S>), only the type arguments of the innermost type are included.
        Returns:
        the actual type arguments of this type.

      • superclassType

        Type superclassType()
        Return the class type that is a direct supertype of this one. This is the superclass of this type's declaring class, with type arguments substituted in. Return null if this is an interface type.

        For example, if this parameterized type is java.util.ArrayList<String>, the result will be java.util.AbstractList<String>.

        Returns:
        the class type that is a direct supertype of this one.

      • interfaceTypes

        Type[] interfaceTypes()
        Return the interface types directly implemented by or extended by this parameterized type. These are the interfaces directly implemented or extended by this type's declaring class or interface, with type arguments substituted in. Return an empty array if there are no interfaces.

        For example, the interface extended by java.util.Set<String> is java.util.Collection<String>.

        Returns:
        the interface types directly implemented by or extended by this parameterized type.

      • containingType

        Type containingType()
        Return the type that contains this type as a member. Return null is this is a top-level type.

        For example, the containing type of AnInterface.Nested<Number> is the ClassDoc representing AnInterface, and the containing type of Outer<String>.Inner<Number> is the ParameterizedType representing Outer<String>.

        Returns:
        the type that contains this type as a member.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ParamTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ParamTag

  • All Superinterfaces:
    Tag

    public interface ParamTag
extends Tag
    Represents an @param documentation tag. Stores the name and comment parts of the parameter tag. An @param tag may represent either a method or constructor parameter, or a type parameter.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isTypeParameter()
      Return true if this ParamTag corresponds to a type parameter.
      String parameterComment()
      Return the parameter comment associated with this ParamTag.
      String parameterName()
      Return the name of the parameter or type parameter associated with this ParamTag.

      • Methods inherited from interface com.sun.javadoc.Tag

        firstSentenceTags, holder, inlineTags, kind, name, position, text, toString

    • Method Detail

      • parameterName

        String parameterName()
        Return the name of the parameter or type parameter associated with this ParamTag. The angle brackets delimiting a type parameter are not part of its name.
        Returns:
        the parameter name.

      • parameterComment

        String parameterComment()
        Return the parameter comment associated with this ParamTag.
        Returns:
        the parameter comment.

      • isTypeParameter

        boolean isTypeParameter()
        Return true if this ParamTag corresponds to a type parameter. Return false if it corresponds to an ordinary parameter of a method or constructor.
        Returns:
        true if this ParamTag corresponds to a type parameter.
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ProgramElementDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ProgramElementDoc

  • All Superinterfaces:
    Comparable<Object>, Doc
    All Known Subinterfaces:
    AnnotationTypeDoc, AnnotationTypeElementDoc, ClassDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MemberDoc, MethodDoc

    public interface ProgramElementDoc
extends Doc
    Represents a java program element: class, interface, field, constructor, or method. This is an abstract class dealing with information common to these elements.
    See Also:
    MemberDoc, ClassDoc

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationDesc[] annotations()
      Get the annotations of this program element.
      ClassDoc containingClass()
      Get the containing class or interface of this program element.
      PackageDoc containingPackage()
      Get the package that this program element is contained in.
      boolean isFinal()
      Return true if this program element is final.
      boolean isPackagePrivate()
      Return true if this program element is package private.
      boolean isPrivate()
      Return true if this program element is private.
      boolean isProtected()
      Return true if this program element is protected.
      boolean isPublic()
      Return true if this program element is public.
      boolean isStatic()
      Return true if this program element is static.
      String modifiers()
      Get modifiers string.
      int modifierSpecifier()
      Get the modifier specifier integer.
      String qualifiedName()
      Get the fully qualified name of this program element.

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

    • Method Detail

      • containingClass

        ClassDoc containingClass()
        Get the containing class or interface of this program element.
        Returns:
        a ClassDoc for this element's containing class or interface. If this is a top-level class or interface, return null.

      • containingPackage

        PackageDoc containingPackage()
        Get the package that this program element is contained in.
        Returns:
        a PackageDoc for this element containing package. If in the unnamed package, this PackageDoc will have the name "".

      • qualifiedName

        String qualifiedName()
        Get the fully qualified name of this program element. For example, for the class java.util.Hashtable, return "java.util.Hashtable".

        For the method bar() in class Foo in the unnamed package, return "Foo.bar".

        Returns:
        the qualified name of the program element as a String.

      • modifierSpecifier

        int modifierSpecifier()
        Get the modifier specifier integer.
        See Also:
        Modifier

      • modifiers

        String modifiers()
        Get modifiers string. For example, for:
           public abstract int foo() { ... }
        return "public abstract". Annotations are not included.

      • annotations

        AnnotationDesc[] annotations()
        Get the annotations of this program element. Return an empty array if there are none.
        Returns:
        the annotations of this program element.
        Since:
        1.5

      • isPublic

        boolean isPublic()
        Return true if this program element is public.

      • isProtected

        boolean isProtected()
        Return true if this program element is protected.

      • isPrivate

        boolean isPrivate()
        Return true if this program element is private.

      • isPackagePrivate

        boolean isPackagePrivate()
        Return true if this program element is package private.

      • isStatic

        boolean isStatic()
        Return true if this program element is static.

      • isFinal

        boolean isFinal()
        Return true if this program element is final.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


RootDoc

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface RootDoc

  • All Superinterfaces:
    Comparable<Object>, Doc, DocErrorReporter

    public interface RootDoc
extends Doc, DocErrorReporter
    Represents the root of the program structure information for one run of javadoc. From this root all other program structure information can be extracted. Also represents the command line information -- the packages, classes and options specified by the user.
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ClassDoc[] classes()
      Return the included classes and interfaces in all packages.
      ClassDoc classNamed(String qualifiedName)
      Return a ClassDoc for the specified class or interface name.
      String[][] options()
      Command line options.
      PackageDoc packageNamed(String name)
      Return a PackageDoc for the specified package name.
      ClassDoc[] specifiedClasses()
      Return the classes and interfaces specified as source file names on the command line.
      PackageDoc[] specifiedPackages()
      Return the packages specified on the command line.

      • Methods inherited from interface com.sun.javadoc.Doc

        commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags

      • Methods inherited from interface com.sun.javadoc.DocErrorReporter

        printError, printError, printNotice, printNotice, printWarning, printWarning

    • Method Detail

      • options

        String[][] options()
        Command line options.

        For example, given:

             javadoc -foo this that -bar other ...
        this method will return:
              options()[0][0] = "-foo"
      options()[0][1] = "this"
      options()[0][2] = "that"
      options()[1][0] = "-bar"
      options()[1][1] = "other"
        Returns:
        an array of arrays of String.

      • specifiedPackages

        PackageDoc[] specifiedPackages()
        Return the packages specified on the command line. If -subpackages and -exclude options are used, return all the non-excluded packages.
        Returns:
        packages specified on the command line.

      • specifiedClasses

        ClassDoc[] specifiedClasses()
        Return the classes and interfaces specified as source file names on the command line.
        Returns:
        classes and interfaces specified on the command line.

      • classes

        ClassDoc[] classes()
        Return the included classes and interfaces in all packages.
        Returns:
        included classes and interfaces in all packages.

      • packageNamed

        PackageDoc packageNamed(String name)
        Return a PackageDoc for the specified package name.
        Parameters:
        name - package name
        Returns:
        a PackageDoc holding the specified package, null if this package is not referenced.

      • classNamed

        ClassDoc classNamed(String qualifiedName)
        Return a ClassDoc for the specified class or interface name.
        Parameters:
        qualifiedName - qualified class or package name
        Returns:
        a ClassDoc holding the specified class, null if this class is not referenced.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


SeeTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface SeeTag

  • All Superinterfaces:
    Tag

    public interface SeeTag
extends Tag
    Represents a user-defined cross-reference to related documentation. The tag can reference a package, class or member, or can hold plain text. (The plain text might be a reference to something not online, such as a printed book, or be a hard-coded HTML link.) The reference can either be inline with the comment, using {@link}, or a separate block comment, using @see. Method name() returns "@link" (no curly braces) or "@see", depending on the tag. Method kind() returns "@see" for both tags.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String label()
      Get the label of the @see tag.
      ClassDoc referencedClass()
      Get the class doc referenced by the class name part of @see.
      String referencedClassName()
      Get the class or interface name of the @see reference.
      MemberDoc referencedMember()
      Get the member doc for the field, constructor or method referenced by @see.
      String referencedMemberName()
      Get the field, constructor or method substring of the @see reference.
      PackageDoc referencedPackage()
      Get the package doc when @see references only a package.

      • Methods inherited from interface com.sun.javadoc.Tag

        firstSentenceTags, holder, inlineTags, kind, name, position, text, toString

    • Method Detail

      • label

        String label()
        Get the label of the @see tag. Return null if no label is present. For example, for:

        @see String#trim() the trim method

        return "the trim method".

      • referencedPackage

        PackageDoc referencedPackage()
        Get the package doc when @see references only a package. Return null if the package cannot be found, or if @see references any other element (class, interface, field, constructor, method) or non-element. For example, for:

        @see java.lang

        return the PackageDoc for java.lang.

      • referencedClassName

        String referencedClassName()
        Get the class or interface name of the @see reference. The name is fully qualified if the name specified in the original @see tag was fully qualified, or if the class or interface can be found; otherwise it is unqualified. If @see references only a package name, then return the package name instead. For example, for:

        @see String#valueOf(java.lang.Object)

        return "java.lang.String". For "@see java.lang", return "java.lang". Return null if @see references a non-element, such as @see <a href="java.sun.com">.

      • referencedClass

        ClassDoc referencedClass()
        Get the class doc referenced by the class name part of @see. Return null if the class cannot be found. For example, for:

        @see String#valueOf(java.lang.Object)

        return the ClassDoc for java.lang.String.

      • referencedMemberName

        String referencedMemberName()
        Get the field, constructor or method substring of the @see reference. Return null if the reference is to any other element or to any non-element. References to member classes (nested classes) return null. For example, for:

        @see String#startsWith(String)

        return "startsWith(String)".

      • referencedMember

        MemberDoc referencedMember()
        Get the member doc for the field, constructor or method referenced by @see. Return null if the member cannot be found or if the reference is to any other element or to any non-element. References to member classes (nested classes) return null. For example, for:

        @see String#startsWith(java.lang.String)

        return the MethodDoc for startsWith.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


SerialFieldTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface SerialFieldTag

  • All Superinterfaces:
    Comparable<Object>, Tag

    public interface SerialFieldTag
extends Tag, Comparable<Object>
    Documents a Serializable field defined by an ObjectStreamField.
     The class parses and stores the three serialField tag parameters:

 - field name
 - field type name
      (fully-qualified or visible from the current import context)
 - description of the valid values for the field
    This tag is only allowed in the javadoc for the special member serialPersistentFields.
    See Also:
    ObjectStreamField

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int compareTo(Object obj)
      Compares this Object with the specified Object for order.
      String description()
      Return the field comment.
      String fieldName()
      Return the serializable field name.
      String fieldType()
      Return the field type string.
      ClassDoc fieldTypeDoc()
      Return the ClassDoc for field type.

      • Methods inherited from interface com.sun.javadoc.Tag

        firstSentenceTags, holder, inlineTags, kind, name, position, text, toString

    • Method Detail

      • fieldName

        String fieldName()
        Return the serializable field name.

      • fieldType

        String fieldType()
        Return the field type string.

      • fieldTypeDoc

        ClassDoc fieldTypeDoc()
        Return the ClassDoc for field type.
        Returns:
        null if no ClassDoc for field type is visible from containingClass context.

      • description

        String description()
        Return the field comment. If there is no serialField comment, return javadoc comment of corresponding FieldDoc.

      • compareTo

        int compareTo(Object obj)
        Compares this Object with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.

        Included to make SerialFieldTag items java.lang.Comparable.

        Specified by:
        compareTo in interface Comparable<Object>
        Parameters:
        obj - the Object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
        Throws:
        ClassCastException - the specified Object's type prevents it from being compared to this Object.
        Since:
        1.2
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


SourcePosition

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface SourcePosition

  • public interface SourcePosition
    This interface describes a source position: filename, line number, and column number.
    Since:
    1.4

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int column()
      The column in the source file.
      File file()
      The source file.
      int line()
      The line in the source file.
      String toString()
      Convert the source position to the form "Filename:line".

    • Method Detail

      • file

        File file()
        The source file. Returns null if no file information is available.

      • line

        int line()
        The line in the source file. The first line is numbered 1; 0 means no line number information is available.

      • column

        int column()
        The column in the source file. The first column is numbered 1; 0 means no column information is available. Columns count characters in the input stream; a tab advances the column number to the next 8-column tab stop.

      • toString

        String toString()
        Convert the source position to the form "Filename:line".
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Tag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface Tag

  • All Known Subinterfaces:
    ParamTag, SeeTag, SerialFieldTag, ThrowsTag

    public interface Tag
    Represents a simple documentation tag, such as @since, @author, @version. Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since") and tag text (e.g. "1.2"). Tags with structure or which require special processing are handled by subclasses such as ParamTag (for @param), SeeTag (for @see and {@link}), and ThrowsTag (for @throws).
    See Also:
    SeeTag, ParamTag, ThrowsTag, SerialFieldTag, Doc.tags()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Tag[] firstSentenceTags()
      Return the first sentence of the comment as an array of tags.
      Doc holder()
      Return the containing Doc of this Tag element.
      Tag[] inlineTags()
      For a documentation comment with embedded {@link} tags, return an array of Tag objects.
      String kind()
      Return the kind of this tag.
      String name()
      Return the name of this tag.
      SourcePosition position()
      Return the source position of this tag.
      String text()
      Return the text of this tag, that is, the portion beyond tag name.
      String toString()
      Convert this object to a string.

    • Method Detail

      • name

        String name()
        Return the name of this tag. The name is the string starting with "@" that is used in a doc comment, such as @return. For inline tags, such as {@link}, the curly brackets are not part of the name, so in this example the name would be simply @link.
        Returns:
        the name of this tag

      • holder

        Doc holder()
        Return the containing Doc of this Tag element.
        Returns:
        the containing Doc of this Tag element

      • kind

        String kind()
        Return the kind of this tag. For most tags, kind() == name(); the following table lists those cases where there is more than one tag of a given kind:
        kind() | name()
        @throws | @throws
        @throws | @exception
        @see | @see
        @see | @link
        @see | @linkplain
        @serial | @serial
        @serial | @serialData
        Returns:
        the kind of this tag.

      • text

        String text()
        Return the text of this tag, that is, the portion beyond tag name.
        Returns:
        the text of this tag

      • toString

        String toString()
        Convert this object to a string.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.

      • inlineTags

        Tag[] inlineTags()
        For a documentation comment with embedded {@link} tags, return an array of Tag objects. The entire doc comment is broken down into strings separated by {@link} tags, where each successive element of the array represents either a string or {@link} tag, in order, from start to end. Each string is represented by a Tag object of name "Text", where text() returns the string. Each {@link} tag is represented by a SeeTag of name "@link" and kind "@see". For example, given the following comment tag:

        This is a {@link Doc commentlabel} example.

        return an array of Tag objects:

        • tags[0] is a Tag with name "Text" and text consisting of "This is a "
        • tags[1] is a SeeTag with name "@link", referenced class Doc and label "commentlabel"
        • tags[2] is a Tag with name "Text" and text consisting of " example."
        Returns:
        Tag[] array of tags
        See Also:
        ParamTag, ThrowsTag

      • firstSentenceTags

        Tag[] firstSentenceTags()
        Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "@link". If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): "This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.", in addition a line will be terminated by paragraph and section terminating HTML tags: <p> </p> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <pre> or </pre>. If the locale is not English, the sentence end will be determined by BreakIterator.getSentenceInstance(Locale).
        Returns:
        an array of Tag objects representing the first sentence of the comment

      • position

        SourcePosition position()
        Return the source position of this tag.
        Returns:
        the source position of this tag.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


ThrowsTag

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface ThrowsTag

  • All Superinterfaces:
    Tag

    public interface ThrowsTag
extends Tag
    Represents a @throws or @exception documentation tag. Parses and holds the exception name and exception comment. Note: @exception is a backwards compatible synonymy for @throws.
    See Also:
    ExecutableMemberDoc.throwsTags()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ClassDoc exception()
      Return a ClassDoc that represents the exception.
      String exceptionComment()
      Return the exception comment associated with this ThrowsTag.
      String exceptionName()
      Return the name of the exception associated with this ThrowsTag.
      Type exceptionType()
      Return the type of the exception associated with this ThrowsTag.

      • Methods inherited from interface com.sun.javadoc.Tag

        firstSentenceTags, holder, inlineTags, kind, name, position, text, toString

    • Method Detail

      • exceptionName

        String exceptionName()
        Return the name of the exception associated with this ThrowsTag.
        Returns:
        name of the exception.

      • exceptionComment

        String exceptionComment()
        Return the exception comment associated with this ThrowsTag.
        Returns:
        exception comment.

      • exception

        ClassDoc exception()
        Return a ClassDoc that represents the exception. If the type of the exception is a type variable, return the ClassDoc of its erasure.

        This method cannot accommodate certain generic type constructs. The exceptionType method should be used instead.

        Returns:
        ClassDoc that represents the exception.
        See Also:
        exceptionType()

      • exceptionType

        Type exceptionType()
        Return the type of the exception associated with this ThrowsTag. This may be a ClassDoc or a TypeVariable.
        Returns:
        the type of the exception.
        Since:
        1.5
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Type

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface Type

  • All Known Subinterfaces:
    AnnotatedType, AnnotationTypeDoc, ClassDoc, ParameterizedType, TypeVariable, WildcardType

    public interface Type
    Represents a type. A type can be a class or interface, an invocation (like List<String>) of a generic class or interface, a type variable, a wildcard type ("?"), or a primitive data type (like char).
    Since:
    1.2

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotatedType asAnnotatedType()
      Returns this type as a AnnotatedType if it represents an annotated type.
      AnnotationTypeDoc asAnnotationTypeDoc()
      Return this type as an AnnotationTypeDoc if it represents an annotation type.
      ClassDoc asClassDoc()
      Return this type as a ClassDoc if it represents a class or interface.
      ParameterizedType asParameterizedType()
      Return this type as a ParameterizedType if it represents an invocation of a generic class or interface.
      TypeVariable asTypeVariable()
      Return this type as a TypeVariable if it represents a type variable.
      WildcardType asWildcardType()
      Return this type as a WildcardType if it represents a wildcard type.
      String dimension()
      Return the type's dimension information, as a string.
      Type getElementType()
      If this type is an array type, return the element type of the array.
      boolean isPrimitive()
      Return true if this type represents a primitive type.
      String qualifiedTypeName()
      Return qualified name of type excluding any dimension information.
      String simpleTypeName()
      Return the simple name of this type excluding any dimension information.
      String toString()
      Return a string representation of the type.
      String typeName()
      Return unqualified name of type excluding any dimension information.

    • Method Detail

      • typeName

        String typeName()
        Return unqualified name of type excluding any dimension information.

        For example, a two dimensional array of String returns "String".

      • qualifiedTypeName

        String qualifiedTypeName()
        Return qualified name of type excluding any dimension information.

        For example, a two dimensional array of String returns "java.lang.String".

      • simpleTypeName

        String simpleTypeName()
        Return the simple name of this type excluding any dimension information. This is the unqualified name of the type, except that for nested types only the identifier of the innermost type is included.

        For example, the class Outer.Inner returns "Inner".

        Since:
        1.5

      • dimension

        String dimension()
        Return the type's dimension information, as a string.

        For example, a two dimensional array of String returns "[][]".

      • toString

        String toString()
        Return a string representation of the type. This includes any dimension information and type arguments.

        For example, a two dimensional array of String may return "java.lang.String[][]", and the parameterized type List<Integer> may return "java.util.List<java.lang.Integer>".

        Overrides:
        toString in class Object
        Returns:
        a string representation of the type.

      • isPrimitive

        boolean isPrimitive()
        Return true if this type represents a primitive type.
        Returns:
        true if this type represents a primitive type.
        Since:
        1.5

      • asClassDoc

        ClassDoc asClassDoc()
        Return this type as a ClassDoc if it represents a class or interface. Array dimensions are ignored. If this type is a ParameterizedType, TypeVariable, or WildcardType, return the ClassDoc of the type's erasure. If this is an AnnotationTypeDoc, return this as a ClassDoc (but see asAnnotationTypeDoc()). If this is a primitive type, return null.
        Returns:
        the ClassDoc of this type, or null if it is a primitive type.

      • asParameterizedType

        ParameterizedType asParameterizedType()
        Return this type as a ParameterizedType if it represents an invocation of a generic class or interface. Array dimensions are ignored.
        Returns:
        a ParameterizedType if the type is an invocation of a generic type, or null if it is not.
        Since:
        1.5

      • asTypeVariable

        TypeVariable asTypeVariable()
        Return this type as a TypeVariable if it represents a type variable. Array dimensions are ignored.
        Returns:
        a TypeVariable if the type is a type variable, or null if it is not.
        Since:
        1.5

      • asWildcardType

        WildcardType asWildcardType()
        Return this type as a WildcardType if it represents a wildcard type.
        Returns:
        a WildcardType if the type is a wildcard type, or null if it is not.
        Since:
        1.5

      • asAnnotatedType

        AnnotatedType asAnnotatedType()
        Returns this type as a AnnotatedType if it represents an annotated type.
        Returns:
        a AnnotatedType if the type if an annotated type, or null if it is not
        Since:
        1.8

      • asAnnotationTypeDoc

        AnnotationTypeDoc asAnnotationTypeDoc()
        Return this type as an AnnotationTypeDoc if it represents an annotation type. Array dimensions are ignored.
        Returns:
        an AnnotationTypeDoc if the type is an annotation type, or null if it is not.
        Since:
        1.5

      • getElementType

        Type getElementType()
        If this type is an array type, return the element type of the array. Otherwise, return null.
        Returns:
        a Type representing the element type or null.
        Since:
        1.8
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


TypeVariable

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface TypeVariable

  • All Superinterfaces:
    Type

    public interface TypeVariable
extends Type
    Represents a type variable. For example, the generic interface List<E> has a single type variable E. A type variable may have explicit bounds, as in C<R extends Remote>.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      AnnotationDesc[] annotations()
      Get the annotations of this program element.
      Type[] bounds()
      Return the bounds of this type variable.
      ProgramElementDoc owner()
      Return the class, interface, method, or constructor within which this type variable is declared.

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • bounds

        Type[] bounds()
        Return the bounds of this type variable. These are the types given by the extends clause. Return an empty array if there are no explicit bounds.
        Returns:
        the bounds of this type variable.

      • owner

        ProgramElementDoc owner()
        Return the class, interface, method, or constructor within which this type variable is declared.
        Returns:
        the class, interface, method, or constructor within which this type variable is declared.

      • annotations

        AnnotationDesc[] annotations()
        Get the annotations of this program element. Return an empty array if there are none.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


WildcardType

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.javadoc

Interface WildcardType

  • All Superinterfaces:
    Type

    public interface WildcardType
extends Type
    Represents a wildcard type argument. Examples include:
      <?>
  <? extends E>
  <? super T>
    A wildcard type can have explicit extends bounds or explicit super bounds or neither, but not both.
    Since:
    1.5

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Type[] extendsBounds()
      Return the upper bounds of this wildcard type argument as given by the extends clause.
      Type[] superBounds()
      Return the lower bounds of this wildcard type argument as given by the super clause.

      • Methods inherited from interface com.sun.javadoc.Type

        asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName

    • Method Detail

      • extendsBounds

        Type[] extendsBounds()
        Return the upper bounds of this wildcard type argument as given by the extends clause. Return an empty array if no such bounds are explicitly given.
        Returns:
        the extends bounds of this wildcard type argument

      • superBounds

        Type[] superBounds()
        Return the lower bounds of this wildcard type argument as given by the super clause. Return an empty array if no such bounds are explicitly given.
        Returns:
        the super bounds of this wildcard type argument
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Doclet API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


doclets

@Exported(value=false)

Package com.sun.tools.doclets

As of JDK version 1.5, replaced by com.sun.tools.doclets.internal.toolkit.util.

See: Description

  • Interface Summary
    Interface Description
    Taglet
    The interface for a custom tag used by Doclets.

Package com.sun.tools.doclets Description

As of JDK version 1.5, replaced by com.sun.tools.doclets.internal.toolkit.util.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


com.sun.tools.doclets Class Hierarchy

Hierarchy For Package com.sun.tools.doclets

Interface Hierarchy

  • com.sun.tools.doclets.Taglet

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Package com.sun.tools.doclets

Uses of Package
com.sun.tools.doclets

No usage of com.sun.tools.doclets

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Uses of Interface com.sun.tools.doclets.Taglet

Uses of Interface
com.sun.tools.doclets.Taglet

No usage of com.sun.tools.doclets.Taglet

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


Taglet

com.sun.tools.doclets

Interface Taglet

  • public interface Taglet
    The interface for a custom tag used by Doclets. A custom tag must implement this interface. To be loaded and used by doclets at run-time, the taglet must have a static method called register that accepts a Map as an argument with the following signature:
       public void register(Map map)
    This method should add an instance of the custom taglet to the map with the name of the taglet as the key. If overriding a taglet, to avoid a name conflict, the overridden taglet must be deleted from the map before an instance of the new taglet is added to the map.

    It is recommended that the taglet throw an exception when it fails to register itself. The exception that it throws is up to the user.

    Here are two sample taglets:

    • ToDoTaglet.java - Standalone taglet
    • UnderlineTaglet.java - Inline taglet

    For more information on how to create your own Taglets, please see the Taglet Overview.

    Since:
    1.4

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String getName()
      Return the name of this custom tag.
      boolean inConstructor()
      Return true if this Taglet is used in constructor documentation.
      boolean inField()
      Return true if this Taglet is used in field documentation.
      boolean inMethod()
      Return true if this Taglet is used in method documentation.
      boolean inOverview()
      Return true if this Taglet is used in overview documentation.
      boolean inPackage()
      Return true if this Taglet is used in package documentation.
      boolean inType()
      Return true if this Taglet is used in type documentation (classes or interfaces).
      boolean isInlineTag()
      Return true if this Taglet is an inline tag.
      String toString(com.sun.javadoc.Tag tag)
      Given the Tag representation of this custom tag, return its string representation, which is output to the generated page.
      String toString(com.sun.javadoc.Tag[] tags)
      Given an array of Tags representing this custom tag, return its string representation, which is output to the generated page.

    • Method Detail

      • inField

        boolean inField()
        Return true if this Taglet is used in field documentation. Set to false for inline tags.
        Returns:
        true if this Taglet is used in field documentation and false otherwise.

      • inConstructor

        boolean inConstructor()
        Return true if this Taglet is used in constructor documentation. Set to false for inline tags.
        Returns:
        true if this Taglet is used in constructor documentation and false otherwise.

      • inMethod

        boolean inMethod()
        Return true if this Taglet is used in method documentation. Set to false for inline tags.
        Returns:
        true if this Taglet is used in method documentation and false otherwise.

      • inOverview

        boolean inOverview()
        Return true if this Taglet is used in overview documentation. Set to false for inline tags.
        Returns:
        true if this Taglet is used in method documentation and false otherwise.

      • inPackage

        boolean inPackage()
        Return true if this Taglet is used in package documentation. Set to false for inline tags.
        Returns:
        true if this Taglet is used in package documentation and false otherwise.

      • inType

        boolean inType()
        Return true if this Taglet is used in type documentation (classes or interfaces). Set to false for inline tags.
        Returns:
        true if this Taglet is used in type documentation and false otherwise.

      • isInlineTag

        boolean isInlineTag()
        Return true if this Taglet is an inline tag. Return false otherwise.
        Returns:
        true if this Taglet is an inline tag and false otherwise.

      • getName

        String getName()
        Return the name of this custom tag.
        Returns:
        the name of this custom tag.

      • toString

        String toString(com.sun.javadoc.Tag tag)
        Given the Tag representation of this custom tag, return its string representation, which is output to the generated page.
        Parameters:
        tag - the Tag representation of this custom tag.
        Returns:
        the string representation of this Tag.

      • toString

        String toString(com.sun.javadoc.Tag[] tags)
        Given an array of Tags representing this custom tag, return its string representation, which is output to the generated page. This method should return null if this taglet represents an inline tag.
        Parameters:
        tags - the array of Tags representing of this custom tag.
        Returns:
        the string representation of this Tag.

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2014, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.


All Classes

  • JConsoleContext
  • JConsoleContext.ConnectionState
  • JConsolePlugin


Constant Field Values

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Constant Field Values

Contents

  • com.sun.*

com.sun.*

  • com.sun.tools.jconsole.JConsoleContext
    Modifier and Type | Constant Field | Value
    public static final String | CONNECTION_STATE_PROPERTY | "connectionState"
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Help

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

  • Package

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    • Interfaces (italic)
    • Classes
    • Enums
    • Exceptions
    • Errors
    • Annotation Types

  • Class/Interface

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    • Class inheritance diagram
    • Direct Subclasses
    • All Known Subinterfaces
    • All Known Implementing Classes
    • Class/interface declaration
    • Class/interface description
    • Nested Class Summary
    • Field Summary
    • Constructor Summary
    • Method Summary
    • Field Detail
    • Constructor Detail
    • Method Detail

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

  • Annotation Type

    Each annotation type has its own separate page with the following sections:

    • Annotation Type declaration
    • Annotation Type description
    • Required Element Summary
    • Optional Element Summary
    • Element Detail

  • Enum

    Each enum has its own separate page with the following sections:

    • Enum declaration
    • Enum description
    • Enum Constant Summary
    • Enum Constant Detail

  • Use

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

  • Tree (Class Hierarchy)

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

  • Index

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

  • Prev/Next

    These links take you to the next or previous class, interface, package, or related page.

  • Frames/No Frames

    These links show and hide the HTML frames. All pages are available with or without frames.

  • All Classes

    The All Classes link shows all classes and interfaces except non-static nested types.

  • Serialized Form

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

  • Constant Field Values

    The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Hierarchy

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For All Packages

Package Hierarchies:
  • com.sun.tools.jconsole

Class Hierarchy

  • java.lang.Object
    • com.sun.tools.jconsole.JConsolePlugin

Interface Hierarchy

  • com.sun.tools.jconsole.JConsoleContext

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.tools.jconsole.JConsoleContext.ConnectionState
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Index

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
A C D G J N R S V

A

addContextPropertyChangeListener(PropertyChangeListener) - Method in class com.sun.tools.jconsole.JConsolePlugin
Adds a PropertyChangeListener to the JConsoleContext object for this plugin.
addPropertyChangeListener(PropertyChangeListener) - Method in interface com.sun.tools.jconsole.JConsoleContext
Add a PropertyChangeListener to the listener list.

C

com.sun.tools.jconsole - package com.sun.tools.jconsole
This package contains the JConsole API.
CONNECTION_STATE_PROPERTY - Static variable in interface com.sun.tools.jconsole.JConsoleContext
The ConnectionState bound property name.

D

dispose() - Method in class com.sun.tools.jconsole.JConsolePlugin
Dispose this plugin.

G

getConnectionState() - Method in interface com.sun.tools.jconsole.JConsoleContext
Returns the current connection state.
getContext() - Method in class com.sun.tools.jconsole.JConsolePlugin
Returns the JConsoleContext object representing the connection to an application.
getMBeanServerConnection() - Method in interface com.sun.tools.jconsole.JConsoleContext
Returns the MBeanServerConnection for the connection to an application.
getTabs() - Method in class com.sun.tools.jconsole.JConsolePlugin
Returns the tabs to be added in JConsole window.

J

JConsoleContext - Interface in com.sun.tools.jconsole
JConsoleContext represents a JConsole connection to a target application.
JConsoleContext.ConnectionState - Enum in com.sun.tools.jconsole
Values for the ConnectionState bound property.
JConsolePlugin - Class in com.sun.tools.jconsole
A JConsole plugin class.
JConsolePlugin() - Constructor for class com.sun.tools.jconsole.JConsolePlugin
Constructor.

N

newSwingWorker() - Method in class com.sun.tools.jconsole.JConsolePlugin
Returns a SwingWorker to perform the GUI update for this plugin at the same interval as JConsole updates the GUI.

R

removeContextPropertyChangeListener(PropertyChangeListener) - Method in class com.sun.tools.jconsole.JConsolePlugin
Removes a PropertyChangeListener from the listener list of the JConsoleContext object for this plugin.
removePropertyChangeListener(PropertyChangeListener) - Method in interface com.sun.tools.jconsole.JConsoleContext
Removes a PropertyChangeListener from the listener list.

S

setContext(JConsoleContext) - Method in class com.sun.tools.jconsole.JConsolePlugin
Sets the JConsoleContext object representing the connection to an application.

V

valueOf(String) - Static method in enum com.sun.tools.jconsole.JConsoleContext.ConnectionState
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.sun.tools.jconsole.JConsoleContext.ConnectionState
Returns an array containing the constants of this enum type, in the order they are declared.
A C D G J N R S V
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


JConsole API

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.


jconsole

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.tools.jconsole

This package contains the JConsole API.

See: Description

  • Interface Summary
    Interface Description
    JConsoleContext
    JConsoleContext represents a JConsole connection to a target application.
  • Class Summary
    Class Description
    JConsolePlugin
    A JConsole plugin class.
  • Enum Summary
    Enum Description
    JConsoleContext.ConnectionState
    Values for the ConnectionState bound property.

Package com.sun.tools.jconsole Description

This package contains the JConsole API.
Since:
1.6
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.tools.jconsole Class Hierarchy

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.tools.jconsole

Class Hierarchy

  • java.lang.Object
    • com.sun.tools.jconsole.JConsolePlugin

Interface Hierarchy

  • com.sun.tools.jconsole.JConsoleContext

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • com.sun.tools.jconsole.JConsoleContext.ConnectionState
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.tools.jconsole

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.tools.jconsole

  • Classes in com.sun.tools.jconsole used by com.sun.tools.jconsole
    Class and Description
    JConsoleContext
    JConsoleContext represents a JConsole connection to a target application.
    JConsoleContext.ConnectionState
    Values for the ConnectionState bound property.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.jconsole.JConsoleContext.ConnectionState

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.jconsole.JConsoleContext.ConnectionState

    • Uses of JConsoleContext.ConnectionState in com.sun.tools.jconsole

      Methods in com.sun.tools.jconsole that return JConsoleContext.ConnectionState
      Modifier and Type Method and Description
      JConsoleContext.ConnectionState JConsoleContext.getConnectionState()
      Returns the current connection state.
      static JConsoleContext.ConnectionState JConsoleContext.ConnectionState.valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static JConsoleContext.ConnectionState[] JConsoleContext.ConnectionState.values()
      Returns an array containing the constants of this enum type, in the order they are declared.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.tools.jconsole.JConsolePlugin

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.tools.jconsole.JConsolePlugin

No usage of com.sun.tools.jconsole.JConsolePlugin
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.tools.jconsole.JConsoleContext

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.tools.jconsole.JConsoleContext

    • Uses of JConsoleContext in com.sun.tools.jconsole

      Methods in com.sun.tools.jconsole that return JConsoleContext
      Modifier and Type Method and Description
      JConsoleContext JConsolePlugin.getContext()
      Returns the JConsoleContext object representing the connection to an application.
      Methods in com.sun.tools.jconsole with parameters of type JConsoleContext
      Modifier and Type Method and Description
      void JConsolePlugin.setContext(JConsoleContext context)
      Sets the JConsoleContext object representing the connection to an application.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


JConsoleContext

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.jconsole

Interface JConsoleContext

  • @Exported
public interface JConsoleContext
    JConsoleContext represents a JConsole connection to a target application.

    JConsoleContext notifies any PropertyChangeListeners about the ConnectionState property change to CONNECTED and DISCONNECTED. The JConsoleContext instance will be the source for any generated events.

    Since:
    1.6

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static class  JConsoleContext.ConnectionState
      Values for the ConnectionState bound property.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static String CONNECTION_STATE_PROPERTY
      The ConnectionState bound property name.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list.
      JConsoleContext.ConnectionState getConnectionState()
      Returns the current connection state.
      MBeanServerConnection getMBeanServerConnection()
      Returns the MBeanServerConnection for the connection to an application.
      void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.

    • Field Detail

      • CONNECTION_STATE_PROPERTY

        static final String CONNECTION_STATE_PROPERTY
        The ConnectionState bound property name.
        See Also:
        Constant Field Values

    • Method Detail

      • getMBeanServerConnection

        MBeanServerConnection getMBeanServerConnection()
        Returns the MBeanServerConnection for the connection to an application. The returned MBeanServerConnection object becomes invalid when the connection state is changed to the DISCONNECTED state.
        Returns:
        the MBeanServerConnection for the connection to an application.

      • getConnectionState

        JConsoleContext.ConnectionState getConnectionState()
        Returns the current connection state.
        Returns:
        the current connection state.

      • addPropertyChangeListener

        void addPropertyChangeListener(PropertyChangeListener listener)
        Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.
        Parameters:
        listener - The PropertyChangeListener to be added

      • removePropertyChangeListener

        void removePropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.
        Parameters:
        listener - the PropertyChangeListener to be removed
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


JConsoleContext.ConnectionState

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method
com.sun.tools.jconsole

Enum JConsoleContext.ConnectionState

  • java.lang.Object
    • java.lang.Enum<JConsoleContext.ConnectionState>
      • com.sun.tools.jconsole.JConsoleContext.ConnectionState
  • All Implemented Interfaces:
    Serializable, Comparable<JConsoleContext.ConnectionState>
    Enclosing interface:
    JConsoleContext

    @Exported
public static enum JConsoleContext.ConnectionState
extends Enum<JConsoleContext.ConnectionState>
    Values for the ConnectionState bound property.

    • Enum Constant Summary

      Enum Constants
      Enum Constant and Description
      CONNECTED
      The connection has been successfully established.
      CONNECTING
      The connection is being attempted.
      DISCONNECTED
      No connection present.

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static JConsoleContext.ConnectionState valueOf(String name)
      Returns the enum constant of this type with the specified name.
      static JConsoleContext.ConnectionState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.

      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait

    • Enum Constant Detail

      • CONNECTED

        public static final JConsoleContext.ConnectionState CONNECTED
        The connection has been successfully established.

      • DISCONNECTED

        public static final JConsoleContext.ConnectionState DISCONNECTED
        No connection present.

      • CONNECTING

        public static final JConsoleContext.ConnectionState CONNECTING
        The connection is being attempted.

    • Method Detail

      • values

        public static JConsoleContext.ConnectionState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JConsoleContext.ConnectionState c : JConsoleContext.ConnectionState.values())
    System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static JConsoleContext.ConnectionState valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Enum Constants |
  • Field |
  • Method
  • Detail:
  • Enum Constants |
  • Field |
  • Method

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


JConsolePlugin

Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.tools.jconsole

Class JConsolePlugin

  • java.lang.Object
    • com.sun.tools.jconsole.JConsolePlugin

  • @Exported
public abstract class JConsolePlugin
extends Object
    A JConsole plugin class. JConsole uses the service provider mechanism to search the JConsole plugins. Users can provide their JConsole plugins in a jar file containing a file named
     META-INF/services/com.sun.tools.jconsole.JConsolePlugin

    This file contains one line for each plugin, for example,

     com.sun.example.JTop

    which is the fully qualified class name of the class implementing JConsolePlugin.

    To load the JConsole plugins in JConsole, run:

     jconsole -pluginpath <plugin-path>

    where <plugin-path> specifies the paths of JConsole plugins to look up which can be a directory or a jar file. Multiple paths are separated by the path separator character of the platform.

    When a new JConsole window is created for a connection, an instance of each JConsolePlugin will be created. The JConsoleContext object is not available at its construction time. JConsole will set the JConsoleContext object for a plugin after the plugin object is created. It will then call its getTabs method and add the returned tabs to the JConsole window.

    Since:
    1.6
    See Also:
    java.util.ServiceLoader

    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected JConsolePlugin()
      Constructor.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods
      Modifier and Type Method and Description
      void addContextPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the JConsoleContext object for this plugin.
      void dispose()
      Dispose this plugin.
      JConsoleContext getContext()
      Returns the JConsoleContext object representing the connection to an application.
      abstract Map<String,JPanel> getTabs()
      Returns the tabs to be added in JConsole window.
      abstract SwingWorker<?,?> newSwingWorker()
      Returns a SwingWorker to perform the GUI update for this plugin at the same interval as JConsole updates the GUI.
      void removeContextPropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list of the JConsoleContext object for this plugin.
      void setContext(JConsoleContext context)
      Sets the JConsoleContext object representing the connection to an application.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • JConsolePlugin

        protected JConsolePlugin()
        Constructor.

    • Method Detail

      • setContext

        public final void setContext(JConsoleContext context)
        Sets the JConsoleContext object representing the connection to an application. This method will be called only once after the plugin is created and before the getTabs() is called. The given context can be in any connection state when this method is called.
        Parameters:
        context - a JConsoleContext object

      • getContext

        public final JConsoleContext getContext()
        Returns the JConsoleContext object representing the connection to an application. This method may return null if it is called before the context is initialized.
        Returns:
        the JConsoleContext object representing the connection to an application.

      • getTabs

        public abstract Map<String,JPanel> getTabs()
        Returns the tabs to be added in JConsole window.

        The returned map contains one entry for each tab to be added in the tabbed pane in a JConsole window with the tab name as the key and the JPanel object as the value. This method returns an empty map if no tab is added by this plugin. This method will be called from the Event Dispatch Thread once at the new connection time.

        Returns:
        a map of a tab name and a JPanel object representing the tabs to be added in the JConsole window; or an empty map.

      • newSwingWorker

        public abstract SwingWorker<?,?> newSwingWorker()
        Returns a SwingWorker to perform the GUI update for this plugin at the same interval as JConsole updates the GUI.

        JConsole schedules the GUI update at an interval specified for a connection. This method will be called at every update to obtain a SwingWorker for each plugin.

        JConsole will invoke the execute() method to schedule the returned SwingWorker for execution if:

        • the SwingWorker object has not been executed (i.e. the SwingWorker.getState() method returns PENDING state); and
        • the SwingWorker object returned in the previous update has completed the task if it was not null (i.e. the SwingWorker.isDone method returns true).

        Otherwise, SwingWorker object will not be scheduled to work.

        A plugin can schedule its own GUI update and this method will return null.

        Returns:
        a SwingWorker to perform the GUI update; or null.

      • dispose

        public void dispose()
        Dispose this plugin. This method is called by JConsole to inform that this plugin will be discarded and that it should free any resources that it has allocated. The JConsoleContext can be in any connection state when this method is called.

      • addContextPropertyChangeListener

        public final void addContextPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener to the JConsoleContext object for this plugin. This method is a convenient method for this plugin to register a listener when the JConsoleContext object may or may not be available.

        For example, a plugin constructor can call this method to register a listener to listen to the connectionState property changes and the listener will be added to the JConsoleContext object when it is available.

        Parameters:
        listener - The PropertyChangeListener to be added
        Throws:
        NullPointerException - if listener is null.

      • removeContextPropertyChangeListener

        public final void removeContextPropertyChangeListener(PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list of the JConsoleContext object for this plugin. If listener was never added, no exception is thrown and no action is taken.
        Parameters:
        listener - the PropertyChangeListener to be removed
        Throws:
        NullPointerException - if listener is null.
Skip navigation links
  • Package
  • Class
  • Use
  • Tree
  • Index
  • Help
JConsole API
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2006, 2014, Oracle and/or its affiliates. All rights reserved.


jdi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Java™ Debug Interface

The JavaTM Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

See: Description

Packages
Package | Description
com.sun.jdi | This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect | This package defines connections between the virtual machine using the JDI and the target virtual machine.
com.sun.jdi.connect.spi | This package comprises the interfaces and classes used to develop new TransportService implementations.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.
The JavaTM Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

The JDI provides introspective access to a running virtual machine's state, Class, Array, Interface, and primitive types, and instances of those types.

The JDI also provides explicit control over a virtual machine's execution. The ability to suspend and resume threads, and to set breakpoints, watchpoints, ... Notification of exceptions, class loading, thread creation... The ability to inspect a suspended thread's state, local variables, stack backtrace...

JDI is the highest-layer of the Java Platform Debugger Architecture (JPDA). For more information on the Java Platform Debugger Architecture, see the Java Platform Debugger Architecture documentation for this release and the Java Platform Debugger Architecture website.

Global Exceptions:

This section documents exceptions which apply to the entire API and are thus not documented on individual methods.

VMMismatchException

Any method on a Mirror that takes a Mirror as an parameter directly or indirectly (e.g., as a element in a List) will throw VMMismatchException if the mirrors are from different virtual machines.

NullPointerException

Any method which takes a Object as an parameter will throw NullPointerException if null is passed directly or indirectly -- unless null is explicitly mentioned as a valid parameter.

NOTE: The exceptions below may be thrown whenever the specified conditions are met but a guarantee that they are thrown only exists when a valid result cannot be returned.

VMDisconnectedException

Any method on ObjectReference, ReferenceType, EventRequest, StackFrame, or VirtualMachine or which takes one of these directly or indirectly as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

VMOutOfMemoryException

Any method on ObjectReference, ReferenceType, EventRequest, StackFrame, or VirtualMachine or which takes one of these directly or indirectly as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

ObjectCollectedException

Any method on ObjectReference or which directly or indirectly takes ObjectReference as parameter may throw ObjectCollectedException if the mirrored object has been garbage collected.

Any method on ReferenceType or which directly or indirectly takes ReferenceType as parameter may throw ObjectCollectedException if the mirrored type has been unloaded.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


All Classes

  • AbsentInformationException
  • Accessible
  • AccessWatchpointEvent
  • AccessWatchpointRequest
  • ArrayReference
  • ArrayType
  • AttachingConnector
  • BooleanType
  • BooleanValue
  • Bootstrap
  • BreakpointEvent
  • BreakpointRequest
  • ByteType
  • ByteValue
  • CharType
  • CharValue
  • ClassLoaderReference
  • ClassNotLoadedException
  • ClassNotPreparedException
  • ClassObjectReference
  • ClassPrepareEvent
  • ClassPrepareRequest
  • ClassType
  • ClassUnloadEvent
  • ClassUnloadRequest
  • ClosedConnectionException
  • Connection
  • Connector
  • Connector.Argument
  • Connector.BooleanArgument
  • Connector.IntegerArgument
  • Connector.SelectedArgument
  • Connector.StringArgument
  • DoubleType
  • DoubleValue
  • DuplicateRequestException
  • Event
  • EventIterator
  • EventQueue
  • EventRequest
  • EventRequestManager
  • EventSet
  • ExceptionEvent
  • ExceptionRequest
  • Field
  • FloatType
  • FloatValue
  • IllegalConnectorArgumentsException
  • IncompatibleThreadStateException
  • InconsistentDebugInfoException
  • IntegerType
  • IntegerValue
  • InterfaceType
  • InternalException
  • InvalidCodeIndexException
  • InvalidLineNumberException
  • InvalidRequestStateException
  • InvalidStackFrameException
  • InvalidTypeException
  • InvocationException
  • JDIPermission
  • LaunchingConnector
  • ListeningConnector
  • LocalVariable
  • Locatable
  • LocatableEvent
  • Location
  • LongType
  • LongValue
  • Method
  • MethodEntryEvent
  • MethodEntryRequest
  • MethodExitEvent
  • MethodExitRequest
  • Mirror
  • ModificationWatchpointEvent
  • ModificationWatchpointRequest
  • MonitorContendedEnteredEvent
  • MonitorContendedEnteredRequest
  • MonitorContendedEnterEvent
  • MonitorContendedEnterRequest
  • MonitorInfo
  • MonitorWaitedEvent
  • MonitorWaitedRequest
  • MonitorWaitEvent
  • MonitorWaitRequest
  • NativeMethodException
  • ObjectCollectedException
  • ObjectReference
  • PathSearchingVirtualMachine
  • PrimitiveType
  • PrimitiveValue
  • ReferenceType
  • ShortType
  • ShortValue
  • StackFrame
  • StepEvent
  • StepRequest
  • StringReference
  • ThreadDeathEvent
  • ThreadDeathRequest
  • ThreadGroupReference
  • ThreadReference
  • ThreadStartEvent
  • ThreadStartRequest
  • Transport
  • TransportService
  • TransportService.Capabilities
  • TransportService.ListenKey
  • TransportTimeoutException
  • Type
  • TypeComponent
  • Value
  • VirtualMachine
  • VirtualMachineManager
  • VMCannotBeModifiedException
  • VMDeathEvent
  • VMDeathRequest
  • VMDisconnectedException
  • VMDisconnectEvent
  • VMMismatchException
  • VMOutOfMemoryException
  • VMStartEvent
  • VMStartException
  • VoidType
  • VoidValue
  • WatchpointEvent
  • WatchpointRequest


Constant Field Values

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Constant Field Values

Contents

  • com.sun.*

com.sun.*

  • com.sun.jdi.ClassType
    Modifier and Type | Constant Field | Value
    public static final int | INVOKE_SINGLE_THREADED | 1
  • com.sun.jdi.ObjectReference
    Modifier and Type | Constant Field | Value
    public static final int | INVOKE_NONVIRTUAL | 2
    public static final int | INVOKE_SINGLE_THREADED | 1
  • com.sun.jdi.ThreadReference
    Modifier and Type | Constant Field | Value
    public static final int | THREAD_STATUS_MONITOR | 3
    public static final int | THREAD_STATUS_NOT_STARTED | 5
    public static final int | THREAD_STATUS_RUNNING | 1
    public static final int | THREAD_STATUS_SLEEPING | 2
    public static final int | THREAD_STATUS_UNKNOWN | -1
    public static final int | THREAD_STATUS_WAIT | 4
    public static final int | THREAD_STATUS_ZOMBIE | 0
  • com.sun.jdi.VirtualMachine
    Modifier and Type | Constant Field | Value
    public static final int | TRACE_ALL | 16777215
    public static final int | TRACE_EVENTS | 4
    public static final int | TRACE_NONE | 0
    public static final int | TRACE_OBJREFS | 16
    public static final int | TRACE_RECEIVES | 2
    public static final int | TRACE_REFTYPES | 8
    public static final int | TRACE_SENDS | 1
  • com.sun.jdi.request.EventRequest
    Modifier and Type | Constant Field | Value
    public static final int | SUSPEND_ALL | 2
    public static final int | SUSPEND_EVENT_THREAD | 1
    public static final int | SUSPEND_NONE | 0
  • com.sun.jdi.request.StepRequest
    Modifier and Type | Constant Field | Value
    public static final int | STEP_INTO | 1
    public static final int | STEP_LINE | -2
    public static final int | STEP_MIN | -1
    public static final int | STEP_OUT | 3
    public static final int | STEP_OVER | 2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Deprecated List

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Deprecated API

Contents

  • Deprecated Exceptions
  • Deprecated Exceptions
    Exceptions and Description
    com.sun.jdi.InvalidCodeIndexException
    This exception is no longer thrown
    com.sun.jdi.InvalidLineNumberException
    This exception is no longer thrown
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Help

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

  • Overview

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

  • Package

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    • Interfaces (italic)
    • Classes
    • Enums
    • Exceptions
    • Errors
    • Annotation Types

  • Class/Interface

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    • Class inheritance diagram
    • Direct Subclasses
    • All Known Subinterfaces
    • All Known Implementing Classes
    • Class/interface declaration
    • Class/interface description
    • Nested Class Summary
    • Field Summary
    • Constructor Summary
    • Method Summary
    • Field Detail
    • Constructor Detail
    • Method Detail

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

  • Annotation Type

    Each annotation type has its own separate page with the following sections:

    • Annotation Type declaration
    • Annotation Type description
    • Required Element Summary
    • Optional Element Summary
    • Element Detail

  • Enum

    Each enum has its own separate page with the following sections:

    • Enum declaration
    • Enum description
    • Enum Constant Summary
    • Enum Constant Detail

  • Use

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

  • Tree (Class Hierarchy)

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

  • Deprecated API

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

  • Index

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

  • Prev/Next

    These links take you to the next or previous class, interface, package, or related page.

  • Frames/No Frames

    These links show and hide the HTML frames. All pages are available with or without frames.

  • All Classes

    The All Classes link shows all classes and interfaces except non-static nested types.

  • Serialized Form

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

  • Constant Field Values

    The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For All Packages

Package Hierarchies:
  • com.sun.jdi,
  • com.sun.jdi.connect,
  • com.sun.jdi.connect.spi,
  • com.sun.jdi.event,
  • com.sun.jdi.request

Class Hierarchy

  • java.lang.Object
    • com.sun.jdi.Bootstrap
    • com.sun.jdi.connect.spi.Connection
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • com.sun.jdi.JDIPermission
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • com.sun.jdi.AbsentInformationException
        • com.sun.jdi.ClassNotLoadedException
        • com.sun.jdi.connect.IllegalConnectorArgumentsException
        • com.sun.jdi.IncompatibleThreadStateException
        • com.sun.jdi.InvalidTypeException
        • com.sun.jdi.InvocationException
        • java.io.IOException
          • com.sun.jdi.connect.spi.ClosedConnectionException
          • com.sun.jdi.connect.TransportTimeoutException
        • java.lang.RuntimeException
          • com.sun.jdi.ClassNotPreparedException
          • com.sun.jdi.request.DuplicateRequestException
          • com.sun.jdi.InconsistentDebugInfoException
          • com.sun.jdi.InternalException
          • com.sun.jdi.InvalidCodeIndexException
          • com.sun.jdi.InvalidLineNumberException
          • com.sun.jdi.request.InvalidRequestStateException
          • com.sun.jdi.InvalidStackFrameException
          • com.sun.jdi.NativeMethodException
          • com.sun.jdi.ObjectCollectedException
          • java.lang.UnsupportedOperationException
            • com.sun.jdi.VMCannotBeModifiedException
          • com.sun.jdi.VMDisconnectedException
          • com.sun.jdi.VMMismatchException
          • com.sun.jdi.VMOutOfMemoryException
        • com.sun.jdi.connect.VMStartException
    • com.sun.jdi.connect.spi.TransportService
    • com.sun.jdi.connect.spi.TransportService.Capabilities
    • com.sun.jdi.connect.spi.TransportService.ListenKey

Interface Hierarchy

  • com.sun.jdi.Accessible
    • com.sun.jdi.ArrayType
    • com.sun.jdi.ClassType
    • com.sun.jdi.Field (also extends java.lang.Comparable<T>, com.sun.jdi.TypeComponent)
    • com.sun.jdi.InterfaceType
    • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • com.sun.jdi.ReferenceType (also extends java.lang.Comparable<T>, com.sun.jdi.Type)
      • com.sun.jdi.ArrayType
      • com.sun.jdi.ClassType
      • com.sun.jdi.InterfaceType
    • com.sun.jdi.TypeComponent (also extends com.sun.jdi.Mirror)
      • com.sun.jdi.Field (also extends java.lang.Comparable<T>)
      • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable)
  • java.lang.Comparable<T>
    • com.sun.jdi.ArrayType
    • com.sun.jdi.ByteValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.CharValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.ClassType
    • com.sun.jdi.DoubleValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.Field (also extends com.sun.jdi.TypeComponent)
    • com.sun.jdi.FloatValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.IntegerValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.InterfaceType
    • com.sun.jdi.LocalVariable (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.Location (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.LongValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.Method (also extends com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, com.sun.jdi.Type)
      • com.sun.jdi.ArrayType
      • com.sun.jdi.ClassType
      • com.sun.jdi.InterfaceType
    • com.sun.jdi.ShortValue (also extends com.sun.jdi.PrimitiveValue)
  • com.sun.jdi.connect.Connector
    • com.sun.jdi.connect.AttachingConnector
    • com.sun.jdi.connect.LaunchingConnector
    • com.sun.jdi.connect.ListeningConnector
  • java.lang.Iterable<T>
    • java.util.Collection<E>
      • com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror, java.util.Set<E>)
      • java.util.Set<E>
        • com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror, java.util.Set<E>)
    • java.util.Set<E>
      • com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror)
  • java.util.Iterator<E>
    • com.sun.jdi.event.EventIterator
  • com.sun.jdi.Locatable
    • com.sun.jdi.event.AccessWatchpointEvent
    • com.sun.jdi.event.BreakpointEvent
    • com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.request.EventRequest)
    • com.sun.jdi.event.ExceptionEvent
    • com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.event.Event)
      • com.sun.jdi.event.AccessWatchpointEvent
      • com.sun.jdi.event.BreakpointEvent
      • com.sun.jdi.event.ExceptionEvent
      • com.sun.jdi.event.MethodEntryEvent
      • com.sun.jdi.event.MethodExitEvent
      • com.sun.jdi.event.ModificationWatchpointEvent
      • com.sun.jdi.event.MonitorContendedEnteredEvent
      • com.sun.jdi.event.MonitorContendedEnterEvent
      • com.sun.jdi.event.MonitorWaitedEvent
      • com.sun.jdi.event.MonitorWaitEvent
      • com.sun.jdi.event.StepEvent
      • com.sun.jdi.event.WatchpointEvent
        • com.sun.jdi.event.AccessWatchpointEvent
        • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.TypeComponent)
    • com.sun.jdi.event.MethodEntryEvent
    • com.sun.jdi.event.MethodExitEvent
    • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.event.MonitorContendedEnteredEvent
    • com.sun.jdi.event.MonitorContendedEnterEvent
    • com.sun.jdi.event.MonitorWaitedEvent
    • com.sun.jdi.event.MonitorWaitEvent
    • com.sun.jdi.StackFrame (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.event.StepEvent
    • com.sun.jdi.event.WatchpointEvent
      • com.sun.jdi.event.AccessWatchpointEvent
      • com.sun.jdi.event.ModificationWatchpointEvent
  • com.sun.jdi.Mirror
    • com.sun.jdi.event.AccessWatchpointEvent
    • com.sun.jdi.request.AccessWatchpointRequest
    • com.sun.jdi.ArrayReference
    • com.sun.jdi.ArrayType
    • com.sun.jdi.BooleanType
    • com.sun.jdi.BooleanValue
    • com.sun.jdi.event.BreakpointEvent
    • com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.request.EventRequest, com.sun.jdi.Locatable)
    • com.sun.jdi.ByteType
    • com.sun.jdi.ByteValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.CharType
    • com.sun.jdi.CharValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.ClassLoaderReference
    • com.sun.jdi.ClassObjectReference
    • com.sun.jdi.event.ClassPrepareEvent
    • com.sun.jdi.request.ClassPrepareRequest
    • com.sun.jdi.ClassType
    • com.sun.jdi.event.ClassUnloadEvent
    • com.sun.jdi.request.ClassUnloadRequest
    • com.sun.jdi.DoubleType
    • com.sun.jdi.DoubleValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.event.Event
      • com.sun.jdi.event.AccessWatchpointEvent
      • com.sun.jdi.event.BreakpointEvent
      • com.sun.jdi.event.ClassPrepareEvent
      • com.sun.jdi.event.ClassUnloadEvent
      • com.sun.jdi.event.ExceptionEvent
      • com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.Locatable)
        • com.sun.jdi.event.AccessWatchpointEvent
        • com.sun.jdi.event.BreakpointEvent
        • com.sun.jdi.event.ExceptionEvent
        • com.sun.jdi.event.MethodEntryEvent
        • com.sun.jdi.event.MethodExitEvent
        • com.sun.jdi.event.ModificationWatchpointEvent
        • com.sun.jdi.event.MonitorContendedEnteredEvent
        • com.sun.jdi.event.MonitorContendedEnterEvent
        • com.sun.jdi.event.MonitorWaitedEvent
        • com.sun.jdi.event.MonitorWaitEvent
        • com.sun.jdi.event.StepEvent
        • com.sun.jdi.event.WatchpointEvent
          • com.sun.jdi.event.AccessWatchpointEvent
          • com.sun.jdi.event.ModificationWatchpointEvent
      • com.sun.jdi.event.MethodEntryEvent
      • com.sun.jdi.event.MethodExitEvent
      • com.sun.jdi.event.ModificationWatchpointEvent
      • com.sun.jdi.event.MonitorContendedEnteredEvent
      • com.sun.jdi.event.MonitorContendedEnterEvent
      • com.sun.jdi.event.MonitorWaitedEvent
      • com.sun.jdi.event.MonitorWaitEvent
      • com.sun.jdi.event.StepEvent
      • com.sun.jdi.event.ThreadDeathEvent
      • com.sun.jdi.event.ThreadStartEvent
      • com.sun.jdi.event.VMDeathEvent
      • com.sun.jdi.event.VMDisconnectEvent
      • com.sun.jdi.event.VMStartEvent
      • com.sun.jdi.event.WatchpointEvent
        • com.sun.jdi.event.AccessWatchpointEvent
        • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.event.EventQueue
    • com.sun.jdi.request.EventRequest
      • com.sun.jdi.request.AccessWatchpointRequest
      • com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.Locatable)
      • com.sun.jdi.request.ClassPrepareRequest
      • com.sun.jdi.request.ClassUnloadRequest
      • com.sun.jdi.request.ExceptionRequest
      • com.sun.jdi.request.MethodEntryRequest
      • com.sun.jdi.request.MethodExitRequest
      • com.sun.jdi.request.ModificationWatchpointRequest
      • com.sun.jdi.request.MonitorContendedEnteredRequest
      • com.sun.jdi.request.MonitorContendedEnterRequest
      • com.sun.jdi.request.MonitorWaitedRequest
      • com.sun.jdi.request.MonitorWaitRequest
      • com.sun.jdi.request.StepRequest
      • com.sun.jdi.request.ThreadDeathRequest
      • com.sun.jdi.request.ThreadStartRequest
      • com.sun.jdi.request.VMDeathRequest
      • com.sun.jdi.request.WatchpointRequest
        • com.sun.jdi.request.AccessWatchpointRequest
        • com.sun.jdi.request.ModificationWatchpointRequest
    • com.sun.jdi.request.EventRequestManager
    • com.sun.jdi.event.EventSet (also extends java.util.Set<E>)
    • com.sun.jdi.event.ExceptionEvent
    • com.sun.jdi.request.ExceptionRequest
    • com.sun.jdi.Field (also extends java.lang.Comparable<T>, com.sun.jdi.TypeComponent)
    • com.sun.jdi.FloatType
    • com.sun.jdi.FloatValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.IntegerType
    • com.sun.jdi.IntegerValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.InterfaceType
    • com.sun.jdi.LocalVariable (also extends java.lang.Comparable<T>)
    • com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.event.Event, com.sun.jdi.Locatable)
      • com.sun.jdi.event.AccessWatchpointEvent
      • com.sun.jdi.event.BreakpointEvent
      • com.sun.jdi.event.ExceptionEvent
      • com.sun.jdi.event.MethodEntryEvent
      • com.sun.jdi.event.MethodExitEvent
      • com.sun.jdi.event.ModificationWatchpointEvent
      • com.sun.jdi.event.MonitorContendedEnteredEvent
      • com.sun.jdi.event.MonitorContendedEnterEvent
      • com.sun.jdi.event.MonitorWaitedEvent
      • com.sun.jdi.event.MonitorWaitEvent
      • com.sun.jdi.event.StepEvent
      • com.sun.jdi.event.WatchpointEvent
        • com.sun.jdi.event.AccessWatchpointEvent
        • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.Location (also extends java.lang.Comparable<T>)
    • com.sun.jdi.LongType
    • com.sun.jdi.LongValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • com.sun.jdi.event.MethodEntryEvent
    • com.sun.jdi.request.MethodEntryRequest
    • com.sun.jdi.event.MethodExitEvent
    • com.sun.jdi.request.MethodExitRequest
    • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.request.ModificationWatchpointRequest
    • com.sun.jdi.event.MonitorContendedEnteredEvent
    • com.sun.jdi.request.MonitorContendedEnteredRequest
    • com.sun.jdi.event.MonitorContendedEnterEvent
    • com.sun.jdi.request.MonitorContendedEnterRequest
    • com.sun.jdi.MonitorInfo
    • com.sun.jdi.event.MonitorWaitedEvent
    • com.sun.jdi.request.MonitorWaitedRequest
    • com.sun.jdi.event.MonitorWaitEvent
    • com.sun.jdi.request.MonitorWaitRequest
    • com.sun.jdi.ObjectReference
      • com.sun.jdi.ArrayReference
      • com.sun.jdi.ClassLoaderReference
      • com.sun.jdi.ClassObjectReference
      • com.sun.jdi.StringReference
      • com.sun.jdi.ThreadGroupReference
      • com.sun.jdi.ThreadReference
    • com.sun.jdi.PathSearchingVirtualMachine
    • com.sun.jdi.PrimitiveType
      • com.sun.jdi.BooleanType
      • com.sun.jdi.ByteType
      • com.sun.jdi.CharType
      • com.sun.jdi.DoubleType
      • com.sun.jdi.FloatType
      • com.sun.jdi.IntegerType
      • com.sun.jdi.LongType
      • com.sun.jdi.ShortType
    • com.sun.jdi.PrimitiveValue
      • com.sun.jdi.BooleanValue
      • com.sun.jdi.ByteValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.CharValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.DoubleValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.FloatValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.IntegerValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.LongValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.ShortValue (also extends java.lang.Comparable<T>)
    • com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, java.lang.Comparable<T>, com.sun.jdi.Type)
      • com.sun.jdi.ArrayType
      • com.sun.jdi.ClassType
      • com.sun.jdi.InterfaceType
    • com.sun.jdi.ShortType
    • com.sun.jdi.ShortValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.StackFrame (also extends com.sun.jdi.Locatable)
    • com.sun.jdi.event.StepEvent
    • com.sun.jdi.request.StepRequest
    • com.sun.jdi.StringReference
    • com.sun.jdi.event.ThreadDeathEvent
    • com.sun.jdi.request.ThreadDeathRequest
    • com.sun.jdi.ThreadGroupReference
    • com.sun.jdi.ThreadReference
    • com.sun.jdi.event.ThreadStartEvent
    • com.sun.jdi.request.ThreadStartRequest
    • com.sun.jdi.Type
      • com.sun.jdi.ArrayType
      • com.sun.jdi.BooleanType
      • com.sun.jdi.ByteType
      • com.sun.jdi.CharType
      • com.sun.jdi.ClassType
      • com.sun.jdi.DoubleType
      • com.sun.jdi.FloatType
      • com.sun.jdi.IntegerType
      • com.sun.jdi.InterfaceType
      • com.sun.jdi.LongType
      • com.sun.jdi.PrimitiveType
        • com.sun.jdi.BooleanType
        • com.sun.jdi.ByteType
        • com.sun.jdi.CharType
        • com.sun.jdi.DoubleType
        • com.sun.jdi.FloatType
        • com.sun.jdi.IntegerType
        • com.sun.jdi.LongType
        • com.sun.jdi.ShortType
      • com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, java.lang.Comparable<T>)
        • com.sun.jdi.ArrayType
        • com.sun.jdi.ClassType
        • com.sun.jdi.InterfaceType
      • com.sun.jdi.ShortType
      • com.sun.jdi.VoidType
    • com.sun.jdi.TypeComponent (also extends com.sun.jdi.Accessible)
      • com.sun.jdi.Field (also extends java.lang.Comparable<T>)
      • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable)
    • com.sun.jdi.Value
      • com.sun.jdi.ArrayReference
      • com.sun.jdi.BooleanValue
      • com.sun.jdi.ByteValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.CharValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.ClassLoaderReference
      • com.sun.jdi.ClassObjectReference
      • com.sun.jdi.DoubleValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.FloatValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.IntegerValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.LongValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.ObjectReference
        • com.sun.jdi.ArrayReference
        • com.sun.jdi.ClassLoaderReference
        • com.sun.jdi.ClassObjectReference
        • com.sun.jdi.StringReference
        • com.sun.jdi.ThreadGroupReference
        • com.sun.jdi.ThreadReference
      • com.sun.jdi.PrimitiveValue
        • com.sun.jdi.BooleanValue
        • com.sun.jdi.ByteValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.CharValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.DoubleValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.FloatValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.IntegerValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.LongValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.ShortValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.ShortValue (also extends java.lang.Comparable<T>, com.sun.jdi.PrimitiveValue)
      • com.sun.jdi.StringReference
      • com.sun.jdi.ThreadGroupReference
      • com.sun.jdi.ThreadReference
      • com.sun.jdi.VoidValue
    • com.sun.jdi.VirtualMachine
      • com.sun.jdi.PathSearchingVirtualMachine
    • com.sun.jdi.event.VMDeathEvent
    • com.sun.jdi.request.VMDeathRequest
    • com.sun.jdi.event.VMDisconnectEvent
    • com.sun.jdi.event.VMStartEvent
    • com.sun.jdi.VoidType
    • com.sun.jdi.VoidValue
    • com.sun.jdi.event.WatchpointEvent
      • com.sun.jdi.event.AccessWatchpointEvent
      • com.sun.jdi.event.ModificationWatchpointEvent
    • com.sun.jdi.request.WatchpointRequest
      • com.sun.jdi.request.AccessWatchpointRequest
      • com.sun.jdi.request.ModificationWatchpointRequest
  • java.io.Serializable
    • com.sun.jdi.connect.Connector.Argument
      • com.sun.jdi.connect.Connector.BooleanArgument
      • com.sun.jdi.connect.Connector.IntegerArgument
      • com.sun.jdi.connect.Connector.SelectedArgument
      • com.sun.jdi.connect.Connector.StringArgument
    • com.sun.jdi.connect.Connector.BooleanArgument
    • com.sun.jdi.connect.Connector.IntegerArgument
    • com.sun.jdi.connect.Connector.SelectedArgument
    • com.sun.jdi.connect.Connector.StringArgument
  • com.sun.jdi.connect.Transport
  • com.sun.jdi.VirtualMachineManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Index

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
A B C D E F G H I J L M N O P R S T U V W

A

AbsentInformationException - Exception in com.sun.jdi
Thrown to indicate line number or variable information is not available.
AbsentInformationException() - Constructor for exception com.sun.jdi.AbsentInformationException
AbsentInformationException(String) - Constructor for exception com.sun.jdi.AbsentInformationException
accept(Map<String, ? extends Connector.Argument>) - Method in interface com.sun.jdi.connect.ListeningConnector
Waits for a target VM to attach to this connector.
accept(TransportService.ListenKey, long, long) - Method in class com.sun.jdi.connect.spi.TransportService
Accept a connection from a target VM.
Accessible - Interface in com.sun.jdi
Provides information on the accessibility of a type or type component.
AccessWatchpointEvent - Interface in com.sun.jdi.event
Notification of a field access in the target VM.
AccessWatchpointRequest - Interface in com.sun.jdi.request
Request for notification when the contents of a field are accessed in the target VM.
accessWatchpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled access watchpoint requests.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ClassUnloadRequest
Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MonitorContendedEnteredRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MonitorContendedEnterRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MonitorWaitedRequest
Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MonitorWaitRequest
Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.ClassUnloadRequest
Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MonitorContendedEnteredRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MonitorContendedEnteredRequest
Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MonitorContendedEnterRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MonitorContendedEnterRequest
Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MonitorWaitedRequest
Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MonitorWaitedRequest
Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MonitorWaitRequest
Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.MonitorWaitRequest
Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addCountFilter(int) - Method in interface com.sun.jdi.request.EventRequest
Limit the requested event to be reported at most once after a given number of occurrences.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.BreakpointRequest
Restricts the events generated by this request to those in which the currently executing instance is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MonitorContendedEnteredRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MonitorContendedEnterRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MonitorWaitedRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.MonitorWaitRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
addInstanceFilter(ObjectReference) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
address() - Method in class com.sun.jdi.connect.spi.TransportService.ListenKey
Returns a string representation of the listen key.
addSourceNameFilter(String) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to the preparation of reference types for which the restricted regular expression 'sourceNamePattern' matches one of the 'sourceNames' for the reference type being prepared.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.BreakpointRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MonitorContendedEnteredRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MonitorContendedEnterRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MonitorWaitedRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MonitorWaitRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ThreadDeathRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ThreadStartRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those in the given thread.
allClasses() - Method in interface com.sun.jdi.VirtualMachine
Returns all loaded types.
allConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of all known Connector objects.
allFields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
allInterfaces() - Method in interface com.sun.jdi.ClassType
Gets the interfaces directly and indirectly implemented by this class.
allLineLocations() - Method in interface com.sun.jdi.Method
Returns a list containing a Location object for each executable source line in this method.
allLineLocations(String, String) - Method in interface com.sun.jdi.Method
Returns a list containing a Location object for each executable source line in this method.
allLineLocations() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing a Location object for each executable source line in this reference type.
allLineLocations(String, String) - Method in interface com.sun.jdi.ReferenceType
Returns a list containing a Location object for each executable source line in this reference type.
allMethods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
allThreads() - Method in interface com.sun.jdi.VirtualMachine
Returns a list of the currently running threads.
argumentNames() - Method in exception com.sun.jdi.connect.IllegalConnectorArgumentsException
Return a List containing the names of the invalid or inconsistent arguments.
arguments() - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable that is declared as an argument of this method.
argumentTypeNames() - Method in interface com.sun.jdi.Method
Returns a list containing a text representation of the type of each formal parameter of this method.
argumentTypes() - Method in interface com.sun.jdi.Method
Returns a list containing the type of each formal parameter of this method.
ArrayReference - Interface in com.sun.jdi
Provides access to an array object and its components in the target VM.
ArrayType - Interface in com.sun.jdi
Provides access to the class of an array and the type of its components in the target VM.
attach(Map<String, ? extends Connector.Argument>) - Method in interface com.sun.jdi.connect.AttachingConnector
Attaches to a running application and and returns a mirror of its VM.
attach(String, long, long) - Method in class com.sun.jdi.connect.spi.TransportService
Attaches to the specified address.
AttachingConnector - Interface in com.sun.jdi.connect
A connector which attaches to a previously running target VM.
attachingConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known AttachingConnector objects.
availableStrata() - Method in interface com.sun.jdi.ReferenceType
Return the available strata for this reference type.

B

baseDirectory() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
Get the base directory used for path searching.
BooleanType - Interface in com.sun.jdi
The type of all primitive boolean values accessed in the target VM.
BooleanValue - Interface in com.sun.jdi
Provides access to a primitive boolean value in the target VM.
booleanValue() - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Return the value of the argument as a boolean.
booleanValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a BooleanValue and returns the result as a boolean.
bootClassPath() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
Get the boot class path for this virtual machine.
Bootstrap - Class in com.sun.jdi
Initial class that provides access to the default implementation of JDI interfaces.
Bootstrap() - Constructor for class com.sun.jdi.Bootstrap
BreakpointEvent - Interface in com.sun.jdi.event
Notification of a breakpoint in the target VM.
BreakpointRequest - Interface in com.sun.jdi.request
Identifies a Location in the target VM at which execution should be stopped.
breakpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled breakpoint requests.
bytecodes() - Method in interface com.sun.jdi.Method
Returns an array containing the bytecodes for this method.
ByteType - Interface in com.sun.jdi
The type of all primitive byte values accessed in the target VM.
ByteValue - Interface in com.sun.jdi
Provides access to a primitive byte value in the target VM.
byteValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a ByteValue and returns the result as a byte.

C

canAddMethod() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the addition of methods when performing class redefinition.
canBeModified() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM is a read-only VM.
canForceEarlyReturn() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the forcing of a method to return early.
canGetBytecodes() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the retrieval of a method's bytecodes.
canGetClassFileVersion() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports reading class file major and minor versions.
canGetConstantPool() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports getting constant pool information of a class.
canGetCurrentContendedMonitor() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the retrieval of the monitor for which a thread is currently waiting.
canGetInstanceInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the accessing of class instances, instance counts, and referring objects.
canGetMethodReturnValues() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the inclusion of return values in MethodExitEvents.
canGetMonitorFrameInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports getting which frame has acquired a monitor.
canGetMonitorInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the retrieval of the monitor information for an object.
canGetOwnedMonitorInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the retrieval of the monitors owned by a thread.
canGetSourceDebugExtension() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports getting the source debug extension.
canGetSyntheticAttribute() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the query of the synthetic attribute of a method or field.
canPopFrames() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports popping frames of a threads stack.
canRedefineClasses() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports any level of class redefinition.
canRequestMonitorEvents() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the creation of MonitorContendedEnterRequests.
canRequestVMDeathEvent() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the creation of VMDeathRequests.
canUnrestrictedlyRedefineClasses() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports unrestricted changes when performing class redefinition.
canUseInstanceFilters() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports filtering events by specific instance object.
canUseSourceNameFilters() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports the filtering of class prepare events by source name.
canWatchFieldAccess() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports watchpoints for field access.
canWatchFieldModification() - Method in interface com.sun.jdi.VirtualMachine
Determines if the target VM supports watchpoints for field modification.
capabilities() - Method in class com.sun.jdi.connect.spi.TransportService
Returns the capabilities of the transport service.
Capabilities() - Constructor for class com.sun.jdi.connect.spi.TransportService.Capabilities
catchLocation() - Method in interface com.sun.jdi.event.ExceptionEvent
Gets the location where the exception will be caught.
CharType - Interface in com.sun.jdi
The type of all primitive char values accessed in the target VM.
CharValue - Interface in com.sun.jdi
Provides access to a primitive char value in the target VM.
charValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a CharValue and returns the result as a char.
choices() - Method in interface com.sun.jdi.connect.Connector.SelectedArgument
Return the possible values for the argument
classesByName(String) - Method in interface com.sun.jdi.VirtualMachine
Returns the loaded reference types that match a given name.
classLoader() - Method in interface com.sun.jdi.ReferenceType
Gets the classloader object which loaded the class corresponding to this type.
ClassLoaderReference - Interface in com.sun.jdi
A class loader object from the target VM.
className() - Method in exception com.sun.jdi.ClassNotLoadedException
className() - Method in interface com.sun.jdi.event.ClassUnloadEvent
Returns the name of the class that has been unloaded.
ClassNotLoadedException - Exception in com.sun.jdi
Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
ClassNotLoadedException(String) - Constructor for exception com.sun.jdi.ClassNotLoadedException
ClassNotLoadedException(String, String) - Constructor for exception com.sun.jdi.ClassNotLoadedException
ClassNotPreparedException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.
ClassNotPreparedException() - Constructor for exception com.sun.jdi.ClassNotPreparedException
ClassNotPreparedException(String) - Constructor for exception com.sun.jdi.ClassNotPreparedException
classObject() - Method in interface com.sun.jdi.ReferenceType
Returns the class object that corresponds to this type in the target VM.
ClassObjectReference - Interface in com.sun.jdi
An instance of java.lang.Class from the target VM.
classPath() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
Get the class path for this virtual machine.
ClassPrepareEvent - Interface in com.sun.jdi.event
Notification of a class prepare in the target VM.
ClassPrepareRequest - Interface in com.sun.jdi.request
Request for notification when a class is prepared in the target VM.
classPrepareRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled class prepare requests.
classSignature() - Method in interface com.sun.jdi.event.ClassUnloadEvent
Returns the JNI-style signature of the class that has been unloaded.
ClassType - Interface in com.sun.jdi
A mirror of a class in the target VM.
ClassUnloadEvent - Interface in com.sun.jdi.event
Notification of a class unload in the target VM.
ClassUnloadRequest - Interface in com.sun.jdi.request
Request for notification when a class is unloaded in the target VM.
classUnloadRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled class unload requests.
close() - Method in class com.sun.jdi.connect.spi.Connection
Closes this connection.
ClosedConnectionException - Exception in com.sun.jdi.connect.spi
This exception may be thrown as a result of an asynchronous close of a Connection while an I/O operation is in progress.
ClosedConnectionException() - Constructor for exception com.sun.jdi.connect.spi.ClosedConnectionException
Constructs a ClosedConnectionException with no detail message.
ClosedConnectionException(String) - Constructor for exception com.sun.jdi.connect.spi.ClosedConnectionException
Constructs a ClosedConnectionException with the specified detail message.
codeIndex() - Method in interface com.sun.jdi.Location
Gets the code position within this location's method.
com.sun.jdi - package com.sun.jdi
This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect - package com.sun.jdi.connect
This package defines connections between the virtual machine using the JDI and the target virtual machine.
com.sun.jdi.connect.spi - package com.sun.jdi.connect.spi
This package comprises the interfaces and classes used to develop new TransportService implementations.
com.sun.jdi.event - package com.sun.jdi.event
This package defines JDI events and event processing.
com.sun.jdi.request - package com.sun.jdi.request
This package is used to request that a JDI event be sent under specified conditions.
componentSignature() - Method in interface com.sun.jdi.ArrayType
Gets the JNI signature of the components of this array class.
componentType() - Method in interface com.sun.jdi.ArrayType
Returns the component type of this array, as specified in the array declaration.
componentTypeName() - Method in interface com.sun.jdi.ArrayType
Returns a text representation of the component type of this array.
concreteMethodByName(String, String) - Method in interface com.sun.jdi.ClassType
Returns a the single non-abstract Method visible from this class that has the given name and signature.
connectedVirtualMachines() - Method in interface com.sun.jdi.VirtualMachineManager
Lists all target VMs which are connected to the debugger.
Connection - Class in com.sun.jdi.connect.spi
A connection between a debugger and a target VM which it debugs.
Connection() - Constructor for class com.sun.jdi.connect.spi.Connection
Connector - Interface in com.sun.jdi.connect
A method of connection between a debugger and a target VM.
Connector.Argument - Interface in com.sun.jdi.connect
Specification for and value of a Connector argument.
Connector.BooleanArgument - Interface in com.sun.jdi.connect
Specification for and value of a Connector argument, whose value is Boolean.
Connector.IntegerArgument - Interface in com.sun.jdi.connect
Specification for and value of a Connector argument, whose value is an integer.
Connector.SelectedArgument - Interface in com.sun.jdi.connect
Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
Connector.StringArgument - Interface in com.sun.jdi.connect
Specification for and value of a Connector argument, whose value is a String.
constantPool() - Method in interface com.sun.jdi.ReferenceType
Returns the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in the Java Virtual Machine Specification.
constantPoolCount() - Method in interface com.sun.jdi.ReferenceType
Returns the number of entries in the constant pool plus one.
createAccessWatchpointRequest(Field) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled watchpoint which watches accesses to the specified field.
createBreakpointRequest(Location) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled BreakpointRequest.
createClassPrepareRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ClassPrepareRequest.
createClassUnloadRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ClassUnloadRequest.
createExceptionRequest(ReferenceType, boolean, boolean) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ExceptionRequest.
createMethodEntryRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MethodEntryRequest.
createMethodExitRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MethodExitRequest.
createModificationWatchpointRequest(Field) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled watchpoint which watches accesses to the specified field.
createMonitorContendedEnteredRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MonitorContendedEnteredRequest.
createMonitorContendedEnterRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MonitorContendedEnterRequest.
createMonitorWaitedRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MonitorWaitedRequest.
createMonitorWaitRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MonitorWaitRequest.
createStepRequest(ThreadReference, int, int) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled StepRequest.
createThreadDeathRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ThreadDeathRequest.
createThreadStartRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ThreadStartRequest.
createVirtualMachine(Connection, Process) - Method in interface com.sun.jdi.VirtualMachineManager
Create a virtual machine mirror for a target VM.
createVirtualMachine(Connection) - Method in interface com.sun.jdi.VirtualMachineManager
Creates a new virtual machine.
createVMDeathRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled VMDeathRequest.
currentContendedMonitor() - Method in interface com.sun.jdi.ThreadReference
Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.

D

declaringType() - Method in interface com.sun.jdi.Location
Gets the type to which this Location belongs.
declaringType() - Method in interface com.sun.jdi.TypeComponent
Returns the type in which this component was declared.
defaultArguments() - Method in interface com.sun.jdi.connect.Connector
Returns the arguments accepted by this Connector and their default values.
defaultConnector() - Method in interface com.sun.jdi.VirtualMachineManager
Identifies the default connector.
defaultStratum() - Method in interface com.sun.jdi.ReferenceType
Returns the default stratum for this reference type.
definedClasses() - Method in interface com.sun.jdi.ClassLoaderReference
Returns a list of all loaded classes that were defined by this class loader.
deleteAllBreakpoints() - Method in interface com.sun.jdi.request.EventRequestManager
Remove all breakpoints managed by this EventRequestManager.
deleteEventRequest(EventRequest) - Method in interface com.sun.jdi.request.EventRequestManager
Removes an eventRequest.
deleteEventRequests(List<? extends EventRequest>) - Method in interface com.sun.jdi.request.EventRequestManager
Removes a list of EventRequests.
depth() - Method in interface com.sun.jdi.request.StepRequest
description() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a human-readable description of this argument and its purpose.
description() - Method in interface com.sun.jdi.connect.Connector
Returns a human-readable description of this connector and its purpose.
description() - Method in class com.sun.jdi.connect.spi.TransportService
Returns a description of the transport service.
description() - Method in interface com.sun.jdi.VirtualMachine
Returns text information on the target VM and the debugger support that mirrors it.
disable() - Method in interface com.sun.jdi.request.EventRequest
Same as setEnabled(false).
disableCollection() - Method in interface com.sun.jdi.ObjectReference
Prevents garbage collection for this object.
dispose() - Method in interface com.sun.jdi.VirtualMachine
Invalidates this virtual machine mirror.
DoubleType - Interface in com.sun.jdi
The type of all primitive double values accessed in the target VM.
DoubleValue - Interface in com.sun.jdi
Provides access to a primitive double value in the target VM.
doubleValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a DoubleValue and returns the result as a double.
DuplicateRequestException - Exception in com.sun.jdi.request
Thrown to indicate a duplicate event request.
DuplicateRequestException() - Constructor for exception com.sun.jdi.request.DuplicateRequestException
DuplicateRequestException(String) - Constructor for exception com.sun.jdi.request.DuplicateRequestException

E

enable() - Method in interface com.sun.jdi.request.EventRequest
Same as setEnabled(true).
enableCollection() - Method in interface com.sun.jdi.ObjectReference
Permits garbage collection for this object.
entryCount() - Method in interface com.sun.jdi.ObjectReference
Returns the number times this object's monitor has been entered by the current owning thread.
equals(Object) - Method in interface com.sun.jdi.BooleanValue
Compares the specified Object with this BooleanValue for equality.
equals(Object) - Method in interface com.sun.jdi.ByteValue
Compares the specified Object with this ByteValue for equality.
equals(Object) - Method in interface com.sun.jdi.CharValue
Compares the specified Object with this CharValue for equality.
equals(Object) - Method in interface com.sun.jdi.DoubleValue
Compares the specified Object with this DoubleValue for equality.
equals(Object) - Method in interface com.sun.jdi.Field
Compares the specified Object with this field for equality.
equals(Object) - Method in interface com.sun.jdi.FloatValue
Compares the specified Object with this FloatValue for equality.
equals(Object) - Method in interface com.sun.jdi.IntegerValue
Compares the specified Object with this IntegerValue for equality.
equals(Object) - Method in interface com.sun.jdi.LocalVariable
Compares the specified Object with this LocalVariable for equality.
equals(Object) - Method in interface com.sun.jdi.Location
Compares the specified Object with this Location for equality.
equals(Object) - Method in interface com.sun.jdi.LongValue
Compares the specified Object with this LongValue for equality.
equals(Object) - Method in interface com.sun.jdi.Method
Compares the specified Object with this method for equality.
equals(Object) - Method in interface com.sun.jdi.ObjectReference
Compares the specified Object with this ObjectReference for equality.
equals(Object) - Method in interface com.sun.jdi.ReferenceType
Compares the specified Object with this ReferenceType for equality.
equals(Object) - Method in interface com.sun.jdi.ShortValue
Compares the specified Object with this ShortValue for equality.
equals(Object) - Method in interface com.sun.jdi.VoidValue
Compares the specified Object with this VoidValue for equality.
errorCode() - Method in exception com.sun.jdi.InternalException
Event - Interface in com.sun.jdi.event
An occurrence in a target VM that is of interest to a debugger.
EventIterator - Interface in com.sun.jdi.event
EventIterators are unmodifiable.
eventIterator() - Method in interface com.sun.jdi.event.EventSet
Return an iterator specific to Event objects.
EventQueue - Interface in com.sun.jdi.event
Manager of incoming debugger events for a target VM.
eventQueue() - Method in interface com.sun.jdi.VirtualMachine
Returns the event queue for this virtual machine.
EventRequest - Interface in com.sun.jdi.request
Represents a request for notification of an event.
EventRequestManager - Interface in com.sun.jdi.request
Manages the creation and deletion of EventRequests.
eventRequestManager() - Method in interface com.sun.jdi.VirtualMachine
Returns the event request manager for this virtual machine.
EventSet - Interface in com.sun.jdi.event
Several Event objects may be created at a given time by the target VirtualMachine.
exception() - Method in interface com.sun.jdi.event.ExceptionEvent
Gets the thrown exception object.
exception() - Method in exception com.sun.jdi.InvocationException
exception() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns exception type for which exception events are requested.
ExceptionEvent - Interface in com.sun.jdi.event
Notification of an exception in the target VM.
ExceptionRequest - Interface in com.sun.jdi.request
Request for notification when an exception occurs in the target VM.
exceptionRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled exception requests.
exit(int) - Method in interface com.sun.jdi.VirtualMachine
Causes the mirrored VM to terminate with the given error code.

F

failedToInitialize() - Method in interface com.sun.jdi.ReferenceType
Determines if initialization failed for this class.
field() - Method in interface com.sun.jdi.event.WatchpointEvent
Returns the field that is about to be accessed/modified.
Field - Interface in com.sun.jdi
A class or instance variable in the target VM.
field() - Method in interface com.sun.jdi.request.WatchpointRequest
Gets the Field being watched by this WatchpointRequest.
fieldByName(String) - Method in interface com.sun.jdi.ReferenceType
Finds the visible Field with the given non-ambiguous name.
fields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Field declared in this type.
FloatType - Interface in com.sun.jdi
The type of all primitive float values accessed in the target VM.
FloatValue - Interface in com.sun.jdi
Provides access to a primitive float value in the target VM.
floatValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a FloatValue and returns the result as a float.
forceEarlyReturn(Value) - Method in interface com.sun.jdi.ThreadReference
Force a method to return before it reaches a return statement.
frame(int) - Method in interface com.sun.jdi.ThreadReference
Returns the StackFrame at the given index in the thread's current call stack.
frameCount() - Method in interface com.sun.jdi.ThreadReference
Returns the number of stack frames in the thread's current call stack.
frames() - Method in interface com.sun.jdi.ThreadReference
Returns a List containing each StackFrame in the thread's current call stack.
frames(int, int) - Method in interface com.sun.jdi.ThreadReference
Returns a List containing a range of StackFrame mirrors from the thread's current call stack.

G

genericSignature() - Method in interface com.sun.jdi.LocalVariable
Gets the generic signature for this variable if there is one.
genericSignature() - Method in interface com.sun.jdi.ReferenceType
Gets the generic signature for this type if there is one.
genericSignature() - Method in interface com.sun.jdi.TypeComponent
Gets the generic signature for this TypeComponent if there is one.
getArgumentValues() - Method in interface com.sun.jdi.StackFrame
Returns the values of all arguments in this frame.
getDefaultStratum() - Method in interface com.sun.jdi.VirtualMachine
Return this VM's default stratum.
getProperty(Object) - Method in interface com.sun.jdi.request.EventRequest
Returns the value of the property with the specified key.
getValue(int) - Method in interface com.sun.jdi.ArrayReference
Returns an array component value.
getValue(Field) - Method in interface com.sun.jdi.ObjectReference
Gets the value of a given instance or static field in this object.
getValue(Field) - Method in interface com.sun.jdi.ReferenceType
Gets the Value of a given static Field in this type.
getValue(LocalVariable) - Method in interface com.sun.jdi.StackFrame
Gets the Value of a LocalVariable in this frame.
getValues() - Method in interface com.sun.jdi.ArrayReference
Returns all of the components in this array.
getValues(int, int) - Method in interface com.sun.jdi.ArrayReference
Returns a range of array components.
getValues(List<? extends Field>) - Method in interface com.sun.jdi.ObjectReference
Gets the value of multiple instance and/or static fields in this object.
getValues(List<? extends Field>) - Method in interface com.sun.jdi.ReferenceType
Returns a map containing the Value of each static Field in the given list.
getValues(List<? extends LocalVariable>) - Method in interface com.sun.jdi.StackFrame
Returns the values of multiple local variables in this frame.

H

hashCode() - Method in interface com.sun.jdi.BooleanValue
Returns the hash code value for this BooleanValue.
hashCode() - Method in interface com.sun.jdi.ByteValue
Returns the hash code value for this BooleanValue.
hashCode() - Method in interface com.sun.jdi.CharValue
Returns the hash code value for this CharValue.
hashCode() - Method in interface com.sun.jdi.DoubleValue
Returns the hash code value for this DoubleValue.
hashCode() - Method in interface com.sun.jdi.Field
Returns the hash code value for this Field.
hashCode() - Method in interface com.sun.jdi.FloatValue
Returns the hash code value for this FloatValue.
hashCode() - Method in interface com.sun.jdi.IntegerValue
Returns the hash code value for this IntegerValue.
hashCode() - Method in interface com.sun.jdi.LocalVariable
Returns the hash code value for this LocalVariable.
hashCode() - Method in interface com.sun.jdi.Location
Returns the hash code value for this Location.
hashCode() - Method in interface com.sun.jdi.LongValue
Returns the hash code value for this LongValue.
hashCode() - Method in interface com.sun.jdi.Method
Returns the hash code value for this Method.
hashCode() - Method in interface com.sun.jdi.ObjectReference
Returns the hash code value for this ObjectReference.
hashCode() - Method in interface com.sun.jdi.ReferenceType
Returns the hash code value for this ObjectReference.
hashCode() - Method in interface com.sun.jdi.ShortValue
Returns the hash code value for this ShortValue.
hashCode() - Method in interface com.sun.jdi.VoidValue
Returns the hash code value for this VoidValue.

I

IllegalConnectorArgumentsException - Exception in com.sun.jdi.connect
Thrown to indicate an invalid argument or inconsistent passed to a Connector.
IllegalConnectorArgumentsException(String, String) - Constructor for exception com.sun.jdi.connect.IllegalConnectorArgumentsException
Construct an IllegalConnectorArgumentsException with the specified detail message and the name of the argument which is invalid or inconsistent.
IllegalConnectorArgumentsException(String, List<String>) - Constructor for exception com.sun.jdi.connect.IllegalConnectorArgumentsException
Construct an IllegalConnectorArgumentsException with the specified detail message and a List of names of arguments which are invalid or inconsistent.
implementors() - Method in interface com.sun.jdi.InterfaceType
Gets the currently prepared classes which directly implement this interface.
IncompatibleThreadStateException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
IncompatibleThreadStateException() - Constructor for exception com.sun.jdi.IncompatibleThreadStateException
IncompatibleThreadStateException(String) - Constructor for exception com.sun.jdi.IncompatibleThreadStateException
InconsistentDebugInfoException - Exception in com.sun.jdi
Thrown to indicate that there is an inconistency in the debug information provided by the target VM.
InconsistentDebugInfoException() - Constructor for exception com.sun.jdi.InconsistentDebugInfoException
InconsistentDebugInfoException(String) - Constructor for exception com.sun.jdi.InconsistentDebugInfoException
instanceCounts(List<? extends ReferenceType>) - Method in interface com.sun.jdi.VirtualMachine
Returns the number of instances of each ReferenceType in the 'refTypes' list.
instances(long) - Method in interface com.sun.jdi.ReferenceType
Returns instances of this ReferenceType.
IntegerType - Interface in com.sun.jdi
The type of all primitive int values accessed in the target VM.
IntegerValue - Interface in com.sun.jdi
Provides access to a primitive int value in the target VM.
interfaces() - Method in interface com.sun.jdi.ClassType
Gets the interfaces directly implemented by this class.
InterfaceType - Interface in com.sun.jdi
A mirror of an interface in the target VM.
InternalException - Exception in com.sun.jdi
Thrown to indicate that an unexpected internal error has occurred.
InternalException() - Constructor for exception com.sun.jdi.InternalException
InternalException(String) - Constructor for exception com.sun.jdi.InternalException
InternalException(int) - Constructor for exception com.sun.jdi.InternalException
InternalException(String, int) - Constructor for exception com.sun.jdi.InternalException
interrupt() - Method in interface com.sun.jdi.ThreadReference
Interrupts this thread unless the thread has been suspended by the debugger.
intValue() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Return the value of the argument as a int.
intValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to an IntegerValue and returns the result as an int.
InvalidCodeIndexException - Exception in com.sun.jdi
Deprecated.
This exception is no longer thrown
InvalidCodeIndexException() - Constructor for exception com.sun.jdi.InvalidCodeIndexException
Deprecated.
InvalidCodeIndexException(String) - Constructor for exception com.sun.jdi.InvalidCodeIndexException
Deprecated.
InvalidLineNumberException - Exception in com.sun.jdi
Deprecated.
This exception is no longer thrown
InvalidLineNumberException() - Constructor for exception com.sun.jdi.InvalidLineNumberException
Deprecated.
InvalidLineNumberException(String) - Constructor for exception com.sun.jdi.InvalidLineNumberException
Deprecated.
InvalidRequestStateException - Exception in com.sun.jdi.request
Thrown to indicate that the requested event cannot be modified because it is enabled.
InvalidRequestStateException() - Constructor for exception com.sun.jdi.request.InvalidRequestStateException
InvalidRequestStateException(String) - Constructor for exception com.sun.jdi.request.InvalidRequestStateException
InvalidStackFrameException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.
InvalidStackFrameException() - Constructor for exception com.sun.jdi.InvalidStackFrameException
InvalidStackFrameException(String) - Constructor for exception com.sun.jdi.InvalidStackFrameException
InvalidTypeException - Exception in com.sun.jdi
Thrown to indicate a type mismatch in setting the value of a field or variable, or in specifying the return value of a method.
InvalidTypeException() - Constructor for exception com.sun.jdi.InvalidTypeException
InvalidTypeException(String) - Constructor for exception com.sun.jdi.InvalidTypeException
InvocationException - Exception in com.sun.jdi
Thrown to indicate an exception occurred in an invoked method within the target VM.
InvocationException(ObjectReference) - Constructor for exception com.sun.jdi.InvocationException
INVOKE_NONVIRTUAL - Static variable in interface com.sun.jdi.ObjectReference
Perform non-virtual method invocation
INVOKE_SINGLE_THREADED - Static variable in interface com.sun.jdi.ClassType
Perform method invocation with only the invoking thread resumed
INVOKE_SINGLE_THREADED - Static variable in interface com.sun.jdi.ObjectReference
Perform method invocation with only the invoking thread resumed
invokeMethod(ThreadReference, Method, List<? extends Value>, int) - Method in interface com.sun.jdi.ClassType
Invokes the specified static Method in the target VM.
invokeMethod(ThreadReference, Method, List<? extends Value>, int) - Method in interface com.sun.jdi.ObjectReference
Invokes the specified Method on this object in the target VM.
isAbstract() - Method in interface com.sun.jdi.Method
Determine if this method is abstract.
isAbstract() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared abstract.
isArgument() - Method in interface com.sun.jdi.LocalVariable
Determines if this variable is an argument to its method.
isAtBreakpoint() - Method in interface com.sun.jdi.ThreadReference
Determines whether the thread is suspended at a breakpoint.
isBridge() - Method in interface com.sun.jdi.Method
Determine if this method is a bridge method.
isCollected() - Method in interface com.sun.jdi.ObjectReference
Determines if this object has been garbage collected in the target VM.
isConstructor() - Method in interface com.sun.jdi.Method
Determine if this method is a constructor.
isEnabled() - Method in interface com.sun.jdi.request.EventRequest
Determines if this event request is currently enabled.
isEnum() - Method in interface com.sun.jdi.ClassType
Determine if this class was declared as an enum.
isEnumConstant() - Method in interface com.sun.jdi.Field
Determine if this is a field that represents an enum constant.
isFinal() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared final.
isFinal() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is final.
isInitialized() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been initialized.
isNative() - Method in interface com.sun.jdi.Method
Determine if this method is native.
isObsolete() - Method in interface com.sun.jdi.Method
Determine if this method is obsolete.
isOpen() - Method in class com.sun.jdi.connect.spi.Connection
Tells whether or not this connection is open.
isPackagePrivate() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a package private item.
isPrepared() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been prepared.
isPrivate() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a private item.
isProtected() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a protected item.
isPublic() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a public item.
isStatic() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared static.
isStatic() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is static.
isStaticInitializer() - Method in interface com.sun.jdi.Method
Determine if this method is a static initializer.
isSuspended() - Method in interface com.sun.jdi.ThreadReference
Determines whether the thread has been suspended by the the debugger.
isSynchronized() - Method in interface com.sun.jdi.Method
Determine if this method is synchronized.
isSynthetic() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is synthetic.
isTransient() - Method in interface com.sun.jdi.Field
Determine if this is a transient field.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.Argument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Performs basic sanity check of argument.
isValid(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.SelectedArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.StringArgument
Performs basic sanity check of argument.
isVarArgs() - Method in interface com.sun.jdi.Method
Determine if this method accepts a variable number of arguments.
isVerified() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been verified.
isVisible(StackFrame) - Method in interface com.sun.jdi.LocalVariable
Determines whether this variable can be accessed from the given StackFrame.
isVolatile() - Method in interface com.sun.jdi.Field
Determine if this is a volatile field.

J

JDIPermission - Class in com.sun.jdi
The JDIPermission class represents access rights to the VirtualMachineManager.
JDIPermission(String) - Constructor for class com.sun.jdi.JDIPermission
The JDIPermission class represents access rights to the VirtualMachineManager
JDIPermission(String, String) - Constructor for class com.sun.jdi.JDIPermission
Constructs a new JDIPermission object.

L

label() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a short human-readable label for this argument.
launch(Map<String, ? extends Connector.Argument>) - Method in interface com.sun.jdi.connect.LaunchingConnector
Launches an application and connects to its VM.
LaunchingConnector - Interface in com.sun.jdi.connect
A connector which can launch a target VM before connecting to it.
launchingConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known LaunchingConnector objects.
length() - Method in interface com.sun.jdi.ArrayReference
Returns the number of components in this array.
lineNumber() - Method in interface com.sun.jdi.Location
Gets the line number of this Location.
lineNumber(String) - Method in interface com.sun.jdi.Location
The line number of this Location.
ListeningConnector - Interface in com.sun.jdi.connect
A connector which listens for a connection initiated by a target VM.
listeningConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known ListeningConnector objects.
ListenKey() - Constructor for class com.sun.jdi.connect.spi.TransportService.ListenKey
LocalVariable - Interface in com.sun.jdi
A local variable in the target VM.
Locatable - Interface in com.sun.jdi
A mirror that has a Location.
LocatableEvent - Interface in com.sun.jdi.event
Abstract superinterface of events which have both location and thread.
location() - Method in interface com.sun.jdi.Locatable
Returns the Location of this mirror, if there is executable code associated with it.
Location - Interface in com.sun.jdi
A point within the executing code of the target VM.
location() - Method in interface com.sun.jdi.Method
Returns the Location of this method, if there is executable code associated with it.
location() - Method in interface com.sun.jdi.request.BreakpointRequest
Returns the location of the requested breakpoint.
location() - Method in interface com.sun.jdi.StackFrame
Returns the Location of the current instruction in the frame.
locationOfCodeIndex(long) - Method in interface com.sun.jdi.Method
Returns a Location for the given code index.
locationsOfLine(int) - Method in interface com.sun.jdi.Method
Returns a List containing all Location objects that map to the given line number.
locationsOfLine(String, String, int) - Method in interface com.sun.jdi.Method
Returns a List containing all Location objects that map to the given line number and source name.
locationsOfLine(int) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing all Location objects that map to the given line number.
locationsOfLine(String, String, int) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing all Location objects that map to the given line number.
LongType - Interface in com.sun.jdi
The type of all primitive long values accessed in the target VM.
LongValue - Interface in com.sun.jdi
Provides access to a primitive long value in the target VM.
longValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a LongValue and returns the result as a long.

M

majorInterfaceVersion() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the major version number of the JDI interface.
majorVersion() - Method in interface com.sun.jdi.ReferenceType
Returns the class major version number, as defined in the class file format of the Java Virtual Machine Specification.
max() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
The upper bound for the value.
method() - Method in interface com.sun.jdi.event.MethodEntryEvent
Returns the method that was entered.
method() - Method in interface com.sun.jdi.event.MethodExitEvent
Returns the method that was exited.
method() - Method in interface com.sun.jdi.Location
Gets the method containing this Location.
Method - Interface in com.sun.jdi
A static or instance method in the target VM.
MethodEntryEvent - Interface in com.sun.jdi.event
Notification of a method invocation in the target VM.
MethodEntryRequest - Interface in com.sun.jdi.request
Request for notification when a method is invoked in the target VM.
methodEntryRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled method entry requests.
MethodExitEvent - Interface in com.sun.jdi.event
Notification of a method return in the target VM.
MethodExitRequest - Interface in com.sun.jdi.request
Request for notification when a method returns in the target VM.
methodExitRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled method exit requests.
methods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared directly in this type.
methodsByName(String) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing each visible Method that has the given name.
methodsByName(String, String) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing each visible Method that has the given name and signature.
min() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
The lower bound for the value.
minorInterfaceVersion() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the minor version number of the JDI interface.
minorVersion() - Method in interface com.sun.jdi.ReferenceType
Returns the class minor version number, as defined in the class file format of the Java Virtual Machine Specification.
Mirror - Interface in com.sun.jdi
A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
mirrorOf(boolean) - Method in interface com.sun.jdi.VirtualMachine
Creates a BooleanValue for the given value.
mirrorOf(byte) - Method in interface com.sun.jdi.VirtualMachine
Creates a ByteValue for the given value.
mirrorOf(char) - Method in interface com.sun.jdi.VirtualMachine
Creates a CharValue for the given value.
mirrorOf(short) - Method in interface com.sun.jdi.VirtualMachine
Creates a ShortValue for the given value.
mirrorOf(int) - Method in interface com.sun.jdi.VirtualMachine
Creates an IntegerValue for the given value.
mirrorOf(long) - Method in interface com.sun.jdi.VirtualMachine
Creates a LongValue for the given value.
mirrorOf(float) - Method in interface com.sun.jdi.VirtualMachine
Creates a FloatValue for the given value.
mirrorOf(double) - Method in interface com.sun.jdi.VirtualMachine
Creates a DoubleValue for the given value.
mirrorOf(String) - Method in interface com.sun.jdi.VirtualMachine
Creates a string in this virtual machine.
mirrorOfVoid() - Method in interface com.sun.jdi.VirtualMachine
Creates a VoidValue.
ModificationWatchpointEvent - Interface in com.sun.jdi.event
Notification of a field modification in the target VM.
ModificationWatchpointRequest - Interface in com.sun.jdi.request
Request for notification when a field is set.
modificationWatchpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled modification watchpoint requests.
modifiers() - Method in interface com.sun.jdi.Accessible
Returns the JavaTM programming language modifiers, encoded in an integer.
monitor() - Method in interface com.sun.jdi.event.MonitorContendedEnteredEvent
Returns the monitor that was entered.
monitor() - Method in interface com.sun.jdi.event.MonitorContendedEnterEvent
Returns the method that was entered.
monitor() - Method in interface com.sun.jdi.event.MonitorWaitedEvent
Returns the monitor object this thread waited on.
monitor() - Method in interface com.sun.jdi.event.MonitorWaitEvent
Returns the monitor object that the thread about to wait.
monitor() - Method in interface com.sun.jdi.MonitorInfo
Returns the ObjectReference object for the monitor.
MonitorContendedEnteredEvent - Interface in com.sun.jdi.event
Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
MonitorContendedEnteredRequest - Interface in com.sun.jdi.request
Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread.
monitorContendedEnteredRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled monitor contended entered requests.
MonitorContendedEnterEvent - Interface in com.sun.jdi.event
Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
MonitorContendedEnterRequest - Interface in com.sun.jdi.request
Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread.
monitorContendedEnterRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled monitor contended enter requests.
MonitorInfo - Interface in com.sun.jdi
Information about a monitor owned by a thread.
MonitorWaitedEvent - Interface in com.sun.jdi.event
Notification that a thread in the target VM has finished waiting on an monitor object.
MonitorWaitedRequest - Interface in com.sun.jdi.request
Request for notification when a thread in the target VM has finished waiting on a monitor object.
monitorWaitedRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled monitor waited requests.
MonitorWaitEvent - Interface in com.sun.jdi.event
Notification that a thread in the target VM is about to wait on a monitor object.
MonitorWaitRequest - Interface in com.sun.jdi.request
Request for notification when a thread in the target VM is about to wait on a monitor object.
monitorWaitRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled monitor wait requests.
mustSpecify() - Method in interface com.sun.jdi.connect.Connector.Argument
Indicates whether the argument must be specified.

N

name() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a short, unique identifier for the argument.
name() - Method in interface com.sun.jdi.connect.Connector
Returns a short identifier for the connector.
name() - Method in class com.sun.jdi.connect.spi.TransportService
Returns a name to identify the transport service.
name() - Method in interface com.sun.jdi.connect.Transport
Returns a short identifier for the transport.
name() - Method in interface com.sun.jdi.LocalVariable
Gets the name of the local variable.
name() - Method in interface com.sun.jdi.ReferenceType
Gets the fully qualified name of this type.
name() - Method in interface com.sun.jdi.ThreadGroupReference
Returns the name of this thread group.
name() - Method in interface com.sun.jdi.ThreadReference
Returns the name of this thread.
name() - Method in interface com.sun.jdi.Type
name() - Method in interface com.sun.jdi.TypeComponent
Gets the name of this type component.
name() - Method in interface com.sun.jdi.VirtualMachine
Returns the name of the target VM as reported by the property java.vm.name.
NativeMethodException - Exception in com.sun.jdi
Thrown to indicate an operation cannot be completed because it is not valid for a native method.
NativeMethodException() - Constructor for exception com.sun.jdi.NativeMethodException
NativeMethodException(String) - Constructor for exception com.sun.jdi.NativeMethodException
nestedTypes() - Method in interface com.sun.jdi.ReferenceType
Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine.
newInstance(int) - Method in interface com.sun.jdi.ArrayType
Creates a new instance of this array class in the target VM.
newInstance(ThreadReference, Method, List<? extends Value>, int) - Method in interface com.sun.jdi.ClassType
Constructs a new instance of this type, using the given constructor Method in the target VM.
nextEvent() - Method in interface com.sun.jdi.event.EventIterator
notifyCaught() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns whether caught exceptions of the requested type will generate events when they are thrown.
notifyUncaught() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns whether uncaught exceptions of the requested type will generate events when they are thrown.

O

object() - Method in interface com.sun.jdi.event.WatchpointEvent
Returns the object whose field is about to be accessed/modified.
ObjectCollectedException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.
ObjectCollectedException() - Constructor for exception com.sun.jdi.ObjectCollectedException
ObjectCollectedException(String) - Constructor for exception com.sun.jdi.ObjectCollectedException
ObjectReference - Interface in com.sun.jdi
An object that currently exists in the target VM.
ownedMonitors() - Method in interface com.sun.jdi.ThreadReference
Returns a List containing an ObjectReference for each monitor owned by the thread.
ownedMonitorsAndFrames() - Method in interface com.sun.jdi.ThreadReference
Returns a List containing a MonitorInfo object for each monitor owned by the thread.
owningThread() - Method in interface com.sun.jdi.ObjectReference
Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.

P

parent() - Method in interface com.sun.jdi.ThreadGroupReference
Returns the parent of this thread group.
PathSearchingVirtualMachine - Interface in com.sun.jdi
A virtual machine which searches for classes through paths
popFrames(StackFrame) - Method in interface com.sun.jdi.ThreadReference
Pop stack frames.
PrimitiveType - Interface in com.sun.jdi
The type associated with non-object values in a target VM.
PrimitiveValue - Interface in com.sun.jdi
The value assigned to a field or variable of primitive type in a target VM.
process() - Method in exception com.sun.jdi.connect.VMStartException
process() - Method in interface com.sun.jdi.VirtualMachine
Returns the Process object for this virtual machine if launched by a LaunchingConnector
putProperty(Object, Object) - Method in interface com.sun.jdi.request.EventRequest
Add an arbitrary key/value "property" to this request.

R

readPacket() - Method in class com.sun.jdi.connect.spi.Connection
Reads a packet from the target VM.
redefineClasses(Map<? extends ReferenceType, byte[]>) - Method in interface com.sun.jdi.VirtualMachine
All classes given are redefined according to the definitions supplied.
referenceType() - Method in interface com.sun.jdi.event.ClassPrepareEvent
Returns the reference type for which this event was generated.
referenceType() - Method in interface com.sun.jdi.ObjectReference
Gets the ReferenceType that mirrors the type of this object.
ReferenceType - Interface in com.sun.jdi
The type of an object in a target VM.
referringObjects(long) - Method in interface com.sun.jdi.ObjectReference
Returns objects that directly reference this object.
reflectedType() - Method in interface com.sun.jdi.ClassObjectReference
Returns the ReferenceType corresponding to this class object.
remove() - Method in interface com.sun.jdi.event.EventQueue
Waits forever for the next available event.
remove(long) - Method in interface com.sun.jdi.event.EventQueue
Waits a specified time for the next available event.
request() - Method in interface com.sun.jdi.event.Event
resume() - Method in interface com.sun.jdi.event.EventSet
Resumes threads suspended by this event set.
resume() - Method in interface com.sun.jdi.ThreadGroupReference
Resumes all threads in this thread group.
resume() - Method in interface com.sun.jdi.ThreadReference
Resumes this thread.
resume() - Method in interface com.sun.jdi.VirtualMachine
Continues the execution of the application running in this virtual machine.
returnType() - Method in interface com.sun.jdi.Method
Returns the return type, as specified in the declaration of this method.
returnTypeName() - Method in interface com.sun.jdi.Method
Returns a text representation of the return type, as specified in the declaration of this method.
returnValue() - Method in interface com.sun.jdi.event.MethodExitEvent
Returns the value that the method will return.

S

setDebugTraceMode(int) - Method in interface com.sun.jdi.VirtualMachine
Traces the activities performed by the com.sun.jdi implementation.
setDefaultStratum(String) - Method in interface com.sun.jdi.VirtualMachine
Set this VM's default stratum (see Location for a discussion of strata).
setEnabled(boolean) - Method in interface com.sun.jdi.request.EventRequest
Enables or disables this event request.
setSuspendPolicy(int) - Method in interface com.sun.jdi.request.EventRequest
Determines the threads to suspend when the requested event occurs in the target VM.
setValue(int, Value) - Method in interface com.sun.jdi.ArrayReference
Replaces an array component with another value.
setValue(Field, Value) - Method in interface com.sun.jdi.ClassType
Assigns a value to a static field.
setValue(String) - Method in interface com.sun.jdi.connect.Connector.Argument
Sets the value of the argument.
setValue(boolean) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Sets the value of the argument.
setValue(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Sets the value of the argument.
setValue(Field, Value) - Method in interface com.sun.jdi.ObjectReference
Sets the value of a given instance or static field in this object.
setValue(LocalVariable, Value) - Method in interface com.sun.jdi.StackFrame
Sets the Value of a LocalVariable in this frame.
setValues(List<? extends Value>) - Method in interface com.sun.jdi.ArrayReference
Replaces all array components with other values.
setValues(int, List<? extends Value>, int, int) - Method in interface com.sun.jdi.ArrayReference
Replaces a range of array components with other values.
ShortType - Interface in com.sun.jdi
The type of all primitive short values accessed in the target VM.
shortValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a ShortValue and returns the result as a short.
ShortValue - Interface in com.sun.jdi
Provides access to a primitive short value in the target VM.
signature() - Method in interface com.sun.jdi.LocalVariable
Gets the JNI signature of the local variable.
signature() - Method in interface com.sun.jdi.Type
Returns the JNI-style signature for this type.
signature() - Method in interface com.sun.jdi.TypeComponent
Gets the JNI-style signature for this type component.
size() - Method in interface com.sun.jdi.request.StepRequest
sourceDebugExtension() - Method in interface com.sun.jdi.ReferenceType
Get the source debug extension of this type.
sourceName() - Method in interface com.sun.jdi.Location
Gets an identifing name for the source corresponding to this location.
sourceName(String) - Method in interface com.sun.jdi.Location
Gets an identifing name for the source corresponding to this location.
sourceName() - Method in interface com.sun.jdi.ReferenceType
Gets an identifying name for the source corresponding to the declaration of this type.
sourceNames(String) - Method in interface com.sun.jdi.ReferenceType
Gets the identifying names for all the source corresponding to the declaration of this type.
sourcePath() - Method in interface com.sun.jdi.Location
Gets the path to the source corresponding to this location.
sourcePath(String) - Method in interface com.sun.jdi.Location
Gets the path to the source corresponding to this location.
sourcePaths(String) - Method in interface com.sun.jdi.ReferenceType
Gets the paths to the source corresponding to the declaration of this type.
stackDepth() - Method in interface com.sun.jdi.MonitorInfo
Returns the stack depth at which this monitor was acquired by the owning thread.
StackFrame - Interface in com.sun.jdi
The state of one method invocation on a thread's call stack.
startListening(Map<String, ? extends Connector.Argument>) - Method in interface com.sun.jdi.connect.ListeningConnector
Listens for one or more connections initiated by target VMs.
startListening(String) - Method in class com.sun.jdi.connect.spi.TransportService
Listens on the specified address for inbound connections.
startListening() - Method in class com.sun.jdi.connect.spi.TransportService
Listens on an address chosen by the transport service.
status() - Method in interface com.sun.jdi.ThreadReference
Returns the thread's status.
STEP_INTO - Static variable in interface com.sun.jdi.request.StepRequest
Step into any newly pushed frames
STEP_LINE - Static variable in interface com.sun.jdi.request.StepRequest
Step to the next location on a different line
STEP_MIN - Static variable in interface com.sun.jdi.request.StepRequest
Step to the next available location
STEP_OUT - Static variable in interface com.sun.jdi.request.StepRequest
Step out of the current frame
STEP_OVER - Static variable in interface com.sun.jdi.request.StepRequest
Step over any newly pushed frames
StepEvent - Interface in com.sun.jdi.event
Notification of step completion in the target VM.
StepRequest - Interface in com.sun.jdi.request
Request for notification when a step occurs in the target VM.
stepRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled step requests.
stop(ObjectReference) - Method in interface com.sun.jdi.ThreadReference
Stops this thread with an asynchronous exception.
stopListening(Map<String, ? extends Connector.Argument>) - Method in interface com.sun.jdi.connect.ListeningConnector
Cancels listening for connections.
stopListening(TransportService.ListenKey) - Method in class com.sun.jdi.connect.spi.TransportService
Stop listening for inbound connections.
StringReference - Interface in com.sun.jdi
A string object from the target VM.
stringValueOf(boolean) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Return the string representation of the value parameter.
stringValueOf(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Return the string representation of the value parameter.
subclasses() - Method in interface com.sun.jdi.ClassType
Gets the currently loaded, direct subclasses of this class.
subinterfaces() - Method in interface com.sun.jdi.InterfaceType
Gets the currently prepared interfaces which directly extend this interface.
superclass() - Method in interface com.sun.jdi.ClassType
Gets the superclass of this class.
superinterfaces() - Method in interface com.sun.jdi.InterfaceType
Gets the interfaces directly extended by this interface.
supportsAcceptTimeout() - Method in class com.sun.jdi.connect.spi.TransportService.Capabilities
Tell whether or not this transport service supports a timeout while waiting for a target VM to connect.
supportsAttachTimeout() - Method in class com.sun.jdi.connect.spi.TransportService.Capabilities
Tell whether or not this transport service supports a timeout when attaching to a target VM.
supportsHandshakeTimeout() - Method in class com.sun.jdi.connect.spi.TransportService.Capabilities
Tells whether or not this transport service supports a timeout when handshaking with the target VM.
supportsMultipleConnections() - Method in interface com.sun.jdi.connect.ListeningConnector
Indicates whether this listening connector supports multiple connections for a single argument map.
supportsMultipleConnections() - Method in class com.sun.jdi.connect.spi.TransportService.Capabilities
Tells whether or not this transport service can support multiple concurrent connections to a single address that it is listening on.
suspend() - Method in interface com.sun.jdi.ThreadGroupReference
Suspends all threads in this thread group.
suspend() - Method in interface com.sun.jdi.ThreadReference
Suspends this thread.
suspend() - Method in interface com.sun.jdi.VirtualMachine
Suspends the execution of the application running in this virtual machine.
SUSPEND_ALL - Static variable in interface com.sun.jdi.request.EventRequest
Suspend all threads when the event occurs
SUSPEND_EVENT_THREAD - Static variable in interface com.sun.jdi.request.EventRequest
Suspend only the thread which generated the event when the event occurs
SUSPEND_NONE - Static variable in interface com.sun.jdi.request.EventRequest
Suspend no threads when the event occurs
suspendCount() - Method in interface com.sun.jdi.ThreadReference
Returns the number of pending suspends for this thread.
suspendPolicy() - Method in interface com.sun.jdi.event.EventSet
Returns the policy used to suspend threads in the target VM for this event set.
suspendPolicy() - Method in interface com.sun.jdi.request.EventRequest
Returns a value which describes the threads to suspend when the requested event occurs in the target VM.

T

thisObject() - Method in interface com.sun.jdi.StackFrame
Returns the value of 'this' for the current frame.
thread() - Method in interface com.sun.jdi.event.ClassPrepareEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.LocatableEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.MonitorContendedEnteredEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.MonitorContendedEnterEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.MonitorWaitedEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.MonitorWaitEvent
Returns the thread in which monitor wait event has occurred.
thread() - Method in interface com.sun.jdi.event.ThreadDeathEvent
Returns the thread which is terminating.
thread() - Method in interface com.sun.jdi.event.ThreadStartEvent
Returns the thread which has started.
thread() - Method in interface com.sun.jdi.event.VMStartEvent
Returns the initial thread of the VM which has started.
thread() - Method in interface com.sun.jdi.MonitorInfo
Returns a ThreadReference object for the thread that owns the monitor.
thread() - Method in interface com.sun.jdi.request.StepRequest
thread() - Method in interface com.sun.jdi.StackFrame
Returns the thread under which this frame's method is running.
THREAD_STATUS_MONITOR - Static variable in interface com.sun.jdi.ThreadReference
Thread is waiting on a java monitor
THREAD_STATUS_NOT_STARTED - Static variable in interface com.sun.jdi.ThreadReference
Thread has not yet been started
THREAD_STATUS_RUNNING - Static variable in interface com.sun.jdi.ThreadReference
Thread is runnable
THREAD_STATUS_SLEEPING - Static variable in interface com.sun.jdi.ThreadReference
Thread is sleeping - Thread.sleep() or JVM_Sleep() was called
THREAD_STATUS_UNKNOWN - Static variable in interface com.sun.jdi.ThreadReference
Thread status is unknown
THREAD_STATUS_WAIT - Static variable in interface com.sun.jdi.ThreadReference
Thread is waiting - Object.wait() or JVM_MonitorWait() was called
THREAD_STATUS_ZOMBIE - Static variable in interface com.sun.jdi.ThreadReference
Thread has completed execution
ThreadDeathEvent - Interface in com.sun.jdi.event
Notification of a completed thread in the target VM.
ThreadDeathRequest - Interface in com.sun.jdi.request
Request for notification when a thread terminates in the target VM.
threadDeathRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled thread death requests.
threadGroup() - Method in interface com.sun.jdi.ThreadReference
Returns this thread's thread group.
ThreadGroupReference - Interface in com.sun.jdi
A thread group object from the target VM.
threadGroups() - Method in interface com.sun.jdi.ThreadGroupReference
Returns a List containing each active ThreadGroupReference in this thread group.
ThreadReference - Interface in com.sun.jdi
A thread object from the target VM.
threads() - Method in interface com.sun.jdi.ThreadGroupReference
Returns a List containing a ThreadReference for each live thread in this thread group.
ThreadStartEvent - Interface in com.sun.jdi.event
Notification of a new running thread in the target VM.
ThreadStartRequest - Interface in com.sun.jdi.request
Request for notification when a thread starts execution in the target VM.
threadStartRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled thread start requests.
timedout() - Method in interface com.sun.jdi.event.MonitorWaitedEvent
Returns whether the wait has timed out or been interrupted.
timeout() - Method in interface com.sun.jdi.event.MonitorWaitEvent
Returns the number of millisecond the thread will wait.
topLevelThreadGroups() - Method in interface com.sun.jdi.VirtualMachine
Returns each thread group which does not have a parent.
toString() - Method in interface com.sun.jdi.Mirror
Returns a String describing this mirror
TRACE_ALL - Static variable in interface com.sun.jdi.VirtualMachine
All tracing is enabled.
TRACE_EVENTS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal event handling.
TRACE_NONE - Static variable in interface com.sun.jdi.VirtualMachine
All tracing is disabled.
TRACE_OBJREFS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal management of object references.
TRACE_RECEIVES - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for JDWP packets received from target VM.
TRACE_REFTYPES - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal managment of reference types.
TRACE_SENDS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for JDWP packets sent to target VM.
transport() - Method in interface com.sun.jdi.connect.Connector
Returns the transport mechanism used by this connector to establish connections with a target VM.
Transport - Interface in com.sun.jdi.connect
A method of communication between a debugger and a target VM.
TransportService - Class in com.sun.jdi.connect.spi
A transport service for connections between a debugger and a target VM.
TransportService() - Constructor for class com.sun.jdi.connect.spi.TransportService
TransportService.Capabilities - Class in com.sun.jdi.connect.spi
The transport service capabilities.
TransportService.ListenKey - Class in com.sun.jdi.connect.spi
A listen key.
TransportTimeoutException - Exception in com.sun.jdi.connect
This exception may be thrown as a result of a timeout when attaching to a target VM, or waiting to accept a connection from a target VM.
TransportTimeoutException() - Constructor for exception com.sun.jdi.connect.TransportTimeoutException
Constructs a TransportTimeoutException with no detail message.
TransportTimeoutException(String) - Constructor for exception com.sun.jdi.connect.TransportTimeoutException
Constructs a TransportTimeoutException with the specified detail message.
type() - Method in interface com.sun.jdi.Field
Returns the type of this field.
type() - Method in interface com.sun.jdi.LocalVariable
Returns the type of this variable.
Type - Interface in com.sun.jdi
The mirror for a type in the target VM.
type() - Method in interface com.sun.jdi.Value
Returns the run-time type of this value.
TypeComponent - Interface in com.sun.jdi
An entity declared within a user defined type (class or interface).
typeName() - Method in interface com.sun.jdi.Field
Returns a text representation of the type of this field.
typeName() - Method in interface com.sun.jdi.LocalVariable
Returns a text representation of the type of this variable.

U

uniqueID() - Method in interface com.sun.jdi.ObjectReference
Returns a unique identifier for this ObjectReference.

V

value() - Method in interface com.sun.jdi.BooleanValue
Returns this BooleanValue as a boolean.
value() - Method in interface com.sun.jdi.ByteValue
Returns this ByteValue as a byte.
value() - Method in interface com.sun.jdi.CharValue
Returns this CharValue as a char.
value() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns the current value of the argument.
value() - Method in interface com.sun.jdi.DoubleValue
Returns this DoubleValue as a double.
value() - Method in interface com.sun.jdi.FloatValue
Returns this FloatValue as a float.
value() - Method in interface com.sun.jdi.IntegerValue
Returns this IntegerValue as an int.
value() - Method in interface com.sun.jdi.LongValue
Returns this LongValue as a long.
value() - Method in interface com.sun.jdi.ShortValue
Returns this ShortValue as a short.
value() - Method in interface com.sun.jdi.StringReference
Returns the StringReference as a String.
Value - Interface in com.sun.jdi
The mirror for a value in the target VM.
valueCurrent() - Method in interface com.sun.jdi.event.WatchpointEvent
Current value of the field.
valueToBe() - Method in interface com.sun.jdi.event.ModificationWatchpointEvent
Value that will be assigned to the field when the instruction completes.
variables() - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable declared in this method.
variablesByName(String) - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable of a given name in this method.
version() - Method in interface com.sun.jdi.VirtualMachine
Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version.
virtualMachine() - Method in interface com.sun.jdi.Mirror
Gets the VirtualMachine to which this Mirror belongs.
VirtualMachine - Interface in com.sun.jdi
A virtual machine targeted for debugging.
virtualMachineManager() - Static method in class com.sun.jdi.Bootstrap
Returns the virtual machine manager.
VirtualMachineManager - Interface in com.sun.jdi
A manager of connections to target virtual machines.
visibleClasses() - Method in interface com.sun.jdi.ClassLoaderReference
Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM.
visibleFields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each unhidden and unambiguous Field in this type.
visibleMethods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared or inherited by this type.
visibleVariableByName(String) - Method in interface com.sun.jdi.StackFrame
Finds a LocalVariable that matches the given name and is visible at the current frame location.
visibleVariables() - Method in interface com.sun.jdi.StackFrame
Returns a list containing each LocalVariable that can be accessed from this frame's location.
VMCannotBeModifiedException - Exception in com.sun.jdi
Thrown to indicate that the operation is invalid because it would modify the VM and the VM is read-only.
VMCannotBeModifiedException() - Constructor for exception com.sun.jdi.VMCannotBeModifiedException
VMCannotBeModifiedException(String) - Constructor for exception com.sun.jdi.VMCannotBeModifiedException
VMDeathEvent - Interface in com.sun.jdi.event
Notification of target VM termination.
VMDeathRequest - Interface in com.sun.jdi.request
Request for notification when the target VM terminates.
vmDeathRequests() - Method in interface com.sun.jdi.request.EventRequestManager
Return an unmodifiable list of the enabled and disabled VM death requests.
VMDisconnectedException - Exception in com.sun.jdi
Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.
VMDisconnectedException() - Constructor for exception com.sun.jdi.VMDisconnectedException
VMDisconnectedException(String) - Constructor for exception com.sun.jdi.VMDisconnectedException
VMDisconnectEvent - Interface in com.sun.jdi.event
Notification of disconnection from target VM.
VMMismatchException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.
VMMismatchException() - Constructor for exception com.sun.jdi.VMMismatchException
VMMismatchException(String) - Constructor for exception com.sun.jdi.VMMismatchException
VMOutOfMemoryException - Exception in com.sun.jdi
Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.
VMOutOfMemoryException() - Constructor for exception com.sun.jdi.VMOutOfMemoryException
VMOutOfMemoryException(String) - Constructor for exception com.sun.jdi.VMOutOfMemoryException
VMStartEvent - Interface in com.sun.jdi.event
Notification of initialization of a target VM.
VMStartException - Exception in com.sun.jdi.connect
A target VM was successfully launched, but terminated with an error before a connection could be established.
VMStartException(Process) - Constructor for exception com.sun.jdi.connect.VMStartException
VMStartException(String, Process) - Constructor for exception com.sun.jdi.connect.VMStartException
VoidType - Interface in com.sun.jdi
The type of all primitive void values accessed in the target VM.
VoidValue - Interface in com.sun.jdi
Provides access to a primitive void value in the target VM.

W

waitingThreads() - Method in interface com.sun.jdi.ObjectReference
Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
WatchpointEvent - Interface in com.sun.jdi.event
Notification of a field triggered event encountered by a thread in the target VM.
WatchpointRequest - Interface in com.sun.jdi.request
Identifies a Field in the target VM being watched.
writePacket(byte[]) - Method in class com.sun.jdi.connect.spi.Connection
Writes a packet to the target VM.
A B C D E F G H I J L M N O P R S T U V W
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Java Debug Interface

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.


Serialized Form

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Serialized Form

  • Package com.sun.jdi

    • Class com.sun.jdi.AbsentInformationException extends Exception implements Serializable

      serialVersionUID:
      4988939309582416373L

    • Class com.sun.jdi.ClassNotLoadedException extends Exception implements Serializable

      serialVersionUID:
      -6242978768444298722L

      • Serialized Fields

        • className

          String className

    • Class com.sun.jdi.ClassNotPreparedException extends RuntimeException implements Serializable

      serialVersionUID:
      -6120698967144079642L

    • Class com.sun.jdi.IncompatibleThreadStateException extends Exception implements Serializable

      serialVersionUID:
      6199174323414551389L

    • Class com.sun.jdi.InconsistentDebugInfoException extends RuntimeException implements Serializable

      serialVersionUID:
      7964236415376861808L

    • Class com.sun.jdi.InternalException extends RuntimeException implements Serializable

      serialVersionUID:
      -9171606393104480607L

      • Serialized Fields

        • errorCode

          int errorCode

    • Class com.sun.jdi.InvalidCodeIndexException extends RuntimeException implements Serializable

      serialVersionUID:
      7416010225133747805L

    • Class com.sun.jdi.InvalidLineNumberException extends RuntimeException implements Serializable

      serialVersionUID:
      4048709912372692875L

    • Class com.sun.jdi.InvalidStackFrameException extends RuntimeException implements Serializable

      serialVersionUID:
      -1919378296505827922L

    • Class com.sun.jdi.InvalidTypeException extends Exception implements Serializable

      serialVersionUID:
      2256667231949650806L

    • Class com.sun.jdi.InvocationException extends Exception implements Serializable

      serialVersionUID:
      6066780907971918568L

      • Serialized Fields

        • exception

          ObjectReference exception

    • Class com.sun.jdi.JDIPermission extends BasicPermission implements Serializable

      serialVersionUID:
      -6988461416938786271L

    • Class com.sun.jdi.NativeMethodException extends RuntimeException implements Serializable

      serialVersionUID:
      3924951669039469992L

    • Class com.sun.jdi.ObjectCollectedException extends RuntimeException implements Serializable

      serialVersionUID:
      -1928428056197269588L

    • Class com.sun.jdi.VMCannotBeModifiedException extends UnsupportedOperationException implements Serializable

      serialVersionUID:
      -4063879815130164009L

    • Class com.sun.jdi.VMDisconnectedException extends RuntimeException implements Serializable

      serialVersionUID:
      2892975269768351637L

    • Class com.sun.jdi.VMMismatchException extends RuntimeException implements Serializable

      serialVersionUID:
      289169358790459564L

    • Class com.sun.jdi.VMOutOfMemoryException extends RuntimeException implements Serializable

      serialVersionUID:
      71504228548910686L

  • Package com.sun.jdi.connect

    • Class com.sun.jdi.connect.IllegalConnectorArgumentsException extends Exception implements Serializable

      serialVersionUID:
      -3042212603611350941L

      • Serialized Fields

        • names

          List<E> names

    • Class com.sun.jdi.connect.TransportTimeoutException extends IOException implements Serializable

      serialVersionUID:
      4107035242623365074L

    • Class com.sun.jdi.connect.VMStartException extends Exception implements Serializable

      serialVersionUID:
      6408644824640801020L

      • Serialized Fields

        • process

          Process process

  • Package com.sun.jdi.connect.spi

    • Class com.sun.jdi.connect.spi.ClosedConnectionException extends IOException implements Serializable

      serialVersionUID:
      3877032124297204774L

  • Package com.sun.jdi.request

    • Class com.sun.jdi.request.DuplicateRequestException extends RuntimeException implements Serializable

      serialVersionUID:
      -3719784920313411060L

    • Class com.sun.jdi.request.InvalidRequestStateException extends RuntimeException implements Serializable

      serialVersionUID:
      -3774632428543322148L
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


jdi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.jdi

This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

See: Description

  • Interface Summary
    Interface Description
    Accessible
    Provides information on the accessibility of a type or type component.
    ArrayReference
    Provides access to an array object and its components in the target VM.
    ArrayType
    Provides access to the class of an array and the type of its components in the target VM.
    BooleanType
    The type of all primitive boolean values accessed in the target VM.
    BooleanValue
    Provides access to a primitive boolean value in the target VM.
    ByteType
    The type of all primitive byte values accessed in the target VM.
    ByteValue
    Provides access to a primitive byte value in the target VM.
    CharType
    The type of all primitive char values accessed in the target VM.
    CharValue
    Provides access to a primitive char value in the target VM.
    ClassLoaderReference
    A class loader object from the target VM.
    ClassObjectReference
    An instance of java.lang.Class from the target VM.
    ClassType
    A mirror of a class in the target VM.
    DoubleType
    The type of all primitive double values accessed in the target VM.
    DoubleValue
    Provides access to a primitive double value in the target VM.
    Field
    A class or instance variable in the target VM.
    FloatType
    The type of all primitive float values accessed in the target VM.
    FloatValue
    Provides access to a primitive float value in the target VM.
    IntegerType
    The type of all primitive int values accessed in the target VM.
    IntegerValue
    Provides access to a primitive int value in the target VM.
    InterfaceType
    A mirror of an interface in the target VM.
    LocalVariable
    A local variable in the target VM.
    Locatable
    A mirror that has a Location.
    Location
    A point within the executing code of the target VM.
    LongType
    The type of all primitive long values accessed in the target VM.
    LongValue
    Provides access to a primitive long value in the target VM.
    Method
    A static or instance method in the target VM.
    Mirror
    A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
    MonitorInfo
    Information about a monitor owned by a thread.
    ObjectReference
    An object that currently exists in the target VM.
    PathSearchingVirtualMachine
    A virtual machine which searches for classes through paths
    PrimitiveType
    The type associated with non-object values in a target VM.
    PrimitiveValue
    The value assigned to a field or variable of primitive type in a target VM.
    ReferenceType
    The type of an object in a target VM.
    ShortType
    The type of all primitive short values accessed in the target VM.
    ShortValue
    Provides access to a primitive short value in the target VM.
    StackFrame
    The state of one method invocation on a thread's call stack.
    StringReference
    A string object from the target VM.
    ThreadGroupReference
    A thread group object from the target VM.
    ThreadReference
    A thread object from the target VM.
    Type
    The mirror for a type in the target VM.
    TypeComponent
    An entity declared within a user defined type (class or interface).
    Value
    The mirror for a value in the target VM.
    VirtualMachine
    A virtual machine targeted for debugging.
    VirtualMachineManager
    A manager of connections to target virtual machines.
    VoidType
    The type of all primitive void values accessed in the target VM.
    VoidValue
    Provides access to a primitive void value in the target VM.
  • Class Summary
    Class Description
    Bootstrap
    Initial class that provides access to the default implementation of JDI interfaces.
    JDIPermission
    The JDIPermission class represents access rights to the VirtualMachineManager.
  • Exception Summary
    Exception Description
    AbsentInformationException
    Thrown to indicate line number or variable information is not available.
    ClassNotLoadedException
    Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
    ClassNotPreparedException
    Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.
    IncompatibleThreadStateException
    Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
    InconsistentDebugInfoException
    Thrown to indicate that there is an inconistency in the debug information provided by the target VM.
    InternalException
    Thrown to indicate that an unexpected internal error has occurred.
    InvalidCodeIndexException Deprecated
    This exception is no longer thrown
    InvalidLineNumberException Deprecated
    This exception is no longer thrown
    InvalidStackFrameException
    Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.
    InvalidTypeException
    Thrown to indicate a type mismatch in setting the value of a field or variable, or in specifying the return value of a method.
    InvocationException
    Thrown to indicate an exception occurred in an invoked method within the target VM.
    NativeMethodException
    Thrown to indicate an operation cannot be completed because it is not valid for a native method.
    ObjectCollectedException
    Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.
    VMCannotBeModifiedException
    Thrown to indicate that the operation is invalid because it would modify the VM and the VM is read-only.
    VMDisconnectedException
    Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.
    VMMismatchException
    Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.
    VMOutOfMemoryException
    Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.

Package com.sun.jdi Description

This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities. VirtualMachine mirrors the target virtual machine and is the origin of all information provided by the JDI. A VirtualMachine is typically created by using the VirtualMachineManager to create a connection to the target virtual machine (see the com.sun.jdi.connect package). In turn the VirtualMachineManager is typically created by calling Bootstrap.virtualMachineManager().

Most of the methods within this package can throw the unchecked exception VMDisconnectedException.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


BooleanType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface BooleanType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface BooleanType
extends PrimitiveType
    The type of all primitive boolean values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    BooleanValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ByteType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ByteType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface ByteType
extends PrimitiveType
    The type of all primitive byte values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    ByteValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


CharType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface CharType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface CharType
extends PrimitiveType
    The type of all primitive char values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    CharValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.jdi Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.jdi

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • com.sun.jdi.Bootstrap
    • java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • java.security.BasicPermission (implements java.io.Serializable)
        • com.sun.jdi.JDIPermission
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • com.sun.jdi.AbsentInformationException
        • com.sun.jdi.ClassNotLoadedException
        • com.sun.jdi.IncompatibleThreadStateException
        • com.sun.jdi.InvalidTypeException
        • com.sun.jdi.InvocationException
        • java.lang.RuntimeException
          • com.sun.jdi.ClassNotPreparedException
          • com.sun.jdi.InconsistentDebugInfoException
          • com.sun.jdi.InternalException
          • com.sun.jdi.InvalidCodeIndexException
          • com.sun.jdi.InvalidLineNumberException
          • com.sun.jdi.InvalidStackFrameException
          • com.sun.jdi.NativeMethodException
          • com.sun.jdi.ObjectCollectedException
          • java.lang.UnsupportedOperationException
            • com.sun.jdi.VMCannotBeModifiedException
          • com.sun.jdi.VMDisconnectedException
          • com.sun.jdi.VMMismatchException
          • com.sun.jdi.VMOutOfMemoryException

Interface Hierarchy

  • com.sun.jdi.Accessible
    • com.sun.jdi.ReferenceType (also extends java.lang.Comparable<T>, com.sun.jdi.Type)
      • com.sun.jdi.ArrayType
      • com.sun.jdi.ClassType
      • com.sun.jdi.InterfaceType
    • com.sun.jdi.TypeComponent (also extends com.sun.jdi.Mirror)
      • com.sun.jdi.Field (also extends java.lang.Comparable<T>)
      • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable)
  • java.lang.Comparable<T>
    • com.sun.jdi.ByteValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.CharValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.DoubleValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.Field (also extends com.sun.jdi.TypeComponent)
    • com.sun.jdi.FloatValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.IntegerValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.LocalVariable (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.Location (also extends com.sun.jdi.Mirror)
    • com.sun.jdi.LongValue (also extends com.sun.jdi.PrimitiveValue)
    • com.sun.jdi.Method (also extends com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, com.sun.jdi.Type)
      • com.sun.jdi.ArrayType
      • com.sun.jdi.ClassType
      • com.sun.jdi.InterfaceType
    • com.sun.jdi.ShortValue (also extends com.sun.jdi.PrimitiveValue)
  • com.sun.jdi.Locatable
    • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.TypeComponent)
    • com.sun.jdi.StackFrame (also extends com.sun.jdi.Mirror)
  • com.sun.jdi.Mirror
    • com.sun.jdi.LocalVariable (also extends java.lang.Comparable<T>)
    • com.sun.jdi.Location (also extends java.lang.Comparable<T>)
    • com.sun.jdi.MonitorInfo
    • com.sun.jdi.StackFrame (also extends com.sun.jdi.Locatable)
    • com.sun.jdi.Type
      • com.sun.jdi.PrimitiveType
        • com.sun.jdi.BooleanType
        • com.sun.jdi.ByteType
        • com.sun.jdi.CharType
        • com.sun.jdi.DoubleType
        • com.sun.jdi.FloatType
        • com.sun.jdi.IntegerType
        • com.sun.jdi.LongType
        • com.sun.jdi.ShortType
      • com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, java.lang.Comparable<T>)
        • com.sun.jdi.ArrayType
        • com.sun.jdi.ClassType
        • com.sun.jdi.InterfaceType
      • com.sun.jdi.VoidType
    • com.sun.jdi.TypeComponent (also extends com.sun.jdi.Accessible)
      • com.sun.jdi.Field (also extends java.lang.Comparable<T>)
      • com.sun.jdi.Method (also extends java.lang.Comparable<T>, com.sun.jdi.Locatable)
    • com.sun.jdi.Value
      • com.sun.jdi.ObjectReference
        • com.sun.jdi.ArrayReference
        • com.sun.jdi.ClassLoaderReference
        • com.sun.jdi.ClassObjectReference
        • com.sun.jdi.StringReference
        • com.sun.jdi.ThreadGroupReference
        • com.sun.jdi.ThreadReference
      • com.sun.jdi.PrimitiveValue
        • com.sun.jdi.BooleanValue
        • com.sun.jdi.ByteValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.CharValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.DoubleValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.FloatValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.IntegerValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.LongValue (also extends java.lang.Comparable<T>)
        • com.sun.jdi.ShortValue (also extends java.lang.Comparable<T>)
      • com.sun.jdi.VoidValue
    • com.sun.jdi.VirtualMachine
      • com.sun.jdi.PathSearchingVirtualMachine
  • com.sun.jdi.VirtualMachineManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


DoubleType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface DoubleType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface DoubleType
extends PrimitiveType
    The type of all primitive double values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    DoubleValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


FloatType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface FloatType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface FloatType
extends PrimitiveType
    The type of all primitive float values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    FloatValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


IntegerType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface IntegerType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface IntegerType
extends PrimitiveType
    The type of all primitive int values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    IntegerValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


LongType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface LongType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface LongType
extends PrimitiveType
    The type of all primitive long values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    LongValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


PrimitiveType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface PrimitiveType

  • All Superinterfaces:
    Mirror, Type
    All Known Subinterfaces:
    BooleanType, ByteType, CharType, DoubleType, FloatType, IntegerType, LongType, ShortType

    @Exported
public interface PrimitiveType
extends Type
    The type associated with non-object values in a target VM. Instances of one of the sub-interfaces of this interface will be returned from Value.type() for all PrimitiveValue objects.
    Since:
    1.3
    See Also:
    PrimitiveValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ShortType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ShortType

  • All Superinterfaces:
    Mirror, PrimitiveType, Type

    @Exported
public interface ShortType
extends PrimitiveType
    The type of all primitive short values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    LongValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.jdi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.jdi

  • Packages that use com.sun.jdi
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.
  • Classes in com.sun.jdi used by com.sun.jdi
    Class and Description
    AbsentInformationException
    Thrown to indicate line number or variable information is not available.
    Accessible
    Provides information on the accessibility of a type or type component.
    ArrayReference
    Provides access to an array object and its components in the target VM.
    BooleanValue
    Provides access to a primitive boolean value in the target VM.
    ByteValue
    Provides access to a primitive byte value in the target VM.
    CharValue
    Provides access to a primitive char value in the target VM.
    ClassLoaderReference
    A class loader object from the target VM.
    ClassNotLoadedException
    Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
    ClassObjectReference
    An instance of java.lang.Class from the target VM.
    ClassType
    A mirror of a class in the target VM.
    DoubleValue
    Provides access to a primitive double value in the target VM.
    Field
    A class or instance variable in the target VM.
    FloatValue
    Provides access to a primitive float value in the target VM.
    IncompatibleThreadStateException
    Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
    IntegerValue
    Provides access to a primitive int value in the target VM.
    InterfaceType
    A mirror of an interface in the target VM.
    InvalidTypeException
    Thrown to indicate a type mismatch in setting the value of a field or variable, or in specifying the return value of a method.
    InvocationException
    Thrown to indicate an exception occurred in an invoked method within the target VM.
    LocalVariable
    A local variable in the target VM.
    Locatable
    A mirror that has a Location.
    Location
    A point within the executing code of the target VM.
    LongValue
    Provides access to a primitive long value in the target VM.
    Method
    A static or instance method in the target VM.
    Mirror
    A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
    MonitorInfo
    Information about a monitor owned by a thread.
    ObjectReference
    An object that currently exists in the target VM.
    PrimitiveType
    The type associated with non-object values in a target VM.
    PrimitiveValue
    The value assigned to a field or variable of primitive type in a target VM.
    ReferenceType
    The type of an object in a target VM.
    ShortValue
    Provides access to a primitive short value in the target VM.
    StackFrame
    The state of one method invocation on a thread's call stack.
    StringReference
    A string object from the target VM.
    ThreadGroupReference
    A thread group object from the target VM.
    ThreadReference
    A thread object from the target VM.
    Type
    The mirror for a type in the target VM.
    TypeComponent
    An entity declared within a user defined type (class or interface).
    Value
    The mirror for a value in the target VM.
    VirtualMachine
    A virtual machine targeted for debugging.
    VirtualMachineManager
    A manager of connections to target virtual machines.
    VoidValue
    Provides access to a primitive void value in the target VM.
  • Classes in com.sun.jdi used by com.sun.jdi.connect
    Class and Description
    VirtualMachine
    A virtual machine targeted for debugging.
  • Classes in com.sun.jdi used by com.sun.jdi.event
    Class and Description
    Field
    A class or instance variable in the target VM.
    Locatable
    A mirror that has a Location.
    Location
    A point within the executing code of the target VM.
    Method
    A static or instance method in the target VM.
    Mirror
    A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
    ObjectReference
    An object that currently exists in the target VM.
    ReferenceType
    The type of an object in a target VM.
    ThreadReference
    A thread object from the target VM.
    Value
    The mirror for a value in the target VM.
  • Classes in com.sun.jdi used by com.sun.jdi.request
    Class and Description
    Field
    A class or instance variable in the target VM.
    Locatable
    A mirror that has a Location.
    Location
    A point within the executing code of the target VM.
    Mirror
    A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
    ObjectReference
    An object that currently exists in the target VM.
    ReferenceType
    The type of an object in a target VM.
    ThreadReference
    A thread object from the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VoidType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface VoidType

  • All Superinterfaces:
    Mirror, Type

    @Exported
public interface VoidType
extends Type
    The type of all primitive void values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.
    Since:
    1.3
    See Also:
    VoidValue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.Type

        name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


AbsentInformationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class AbsentInformationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.AbsentInformationException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class AbsentInformationException
extends Exception
    Thrown to indicate line number or variable information is not available.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      AbsentInformationException()
      AbsentInformationException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • AbsentInformationException

        public AbsentInformationException()

      • AbsentInformationException

        public AbsentInformationException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Accessible

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Accessible

  • All Known Subinterfaces:
    ArrayType, ClassType, Field, InterfaceType, Method, ReferenceType, TypeComponent

    @Exported
public interface Accessible
    Provides information on the accessibility of a type or type component. Mirrors for program elements which allow an an access specifier (private, protected, public) provide information on that part of the declaration through this interface.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isPackagePrivate()
      Determines if this object mirrors a package private item.
      boolean isPrivate()
      Determines if this object mirrors a private item.
      boolean isProtected()
      Determines if this object mirrors a protected item.
      boolean isPublic()
      Determines if this object mirrors a public item.
      int modifiers()
      Returns the JavaTM programming language modifiers, encoded in an integer.

    • Method Detail

      • modifiers

        int modifiers()
        Returns the JavaTM programming language modifiers, encoded in an integer.

        The modifier encodings are defined in The Java™ Virtual Machine Specification in the access_flag tables for classes(section 4.1), fields(section 4.5), and methods(section 4.6).

      • isPrivate

        boolean isPrivate()
        Determines if this object mirrors a private item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as Integer.TYPE, the return value is always false.
        Returns:
        true for items with private access; false otherwise.

      • isPackagePrivate

        boolean isPackagePrivate()
        Determines if this object mirrors a package private item. A package private item is declared with no access specifier. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as Integer.TYPE, the return value is always false.
        Returns:
        true for items with package private access; false otherwise.

      • isProtected

        boolean isProtected()
        Determines if this object mirrors a protected item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as Integer.TYPE, the return value is always false.
        Returns:
        true for items with private access; false otherwise.

      • isPublic

        boolean isPublic()
        Determines if this object mirrors a public item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always true. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as Integer.TYPE, the return value is always true.
        Returns:
        true for items with public access; false otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ArrayReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ArrayReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface ArrayReference
extends ObjectReference
    Provides access to an array object and its components in the target VM. Each array component is mirrored by a Value object. The array components, in aggregate, are placed in List objects instead of arrays for consistency with the rest of the API and for interoperability with other APIs.
    Since:
    1.3

    • Field Summary

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Value getValue(int index)
      Returns an array component value.
      List<Value> getValues()
      Returns all of the components in this array.
      List<Value> getValues(int index, int length)
      Returns a range of array components.
      int length()
      Returns the number of components in this array.
      void setValue(int index, Value value)
      Replaces an array component with another value.
      void setValues(int index, List<? extends Value> values, int srcIndex, int length)
      Replaces a range of array components with other values.
      void setValues(List<? extends Value> values)
      Replaces all array components with other values.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • length

        int length()
        Returns the number of components in this array.
        Returns:
        the integer count of components in this array.

      • getValue

        Value getValue(int index)
        Returns an array component value.
        Parameters:
        index - the index of the component to retrieve
        Returns:
        the Value at the given index.
        Throws:
        IndexOutOfBoundsException - if index is outside the range of this array, that is, if either of the following are true:
            index < 0
    index >= length()

      • getValues

        List<Value> getValues()
        Returns all of the components in this array.
        Returns:
        a list of Value objects, one for each array component ordered by array index. For zero length arrays, an empty list is returned.

      • getValues

        List<Value> getValues(int index,
                      int length)
        Returns a range of array components.
        Parameters:
        index - the index of the first component to retrieve
        length - the number of components to retrieve, or -1 to retrieve all components to the end of this array.
        Returns:
        a list of Value objects, one for each requested array component ordered by array index. When there are no elements in the specified range (e.g. length is zero) an empty list is returned
        Throws:
        IndexOutOfBoundsException - if the range specified with index and length is not within the range of the array, that is, if either of the following are true:
            index < 0
    index > length()
        or if length != -1 and either of the following are true:
            length < 0
    index + length >  length()

      • setValue

        void setValue(int index,
              Value value)
       throws InvalidTypeException,
              ClassNotLoadedException
        Replaces an array component with another value.

        Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the declaring class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Parameters:
        value - the new value
        index - the index of the component to set
        Throws:
        IndexOutOfBoundsException - if index is outside the range of this array, that is, if either of the following are true:
            index < 0
    index >= length()
        InvalidTypeException - if the type of value is not compatible with the declared type of array components.
        ClassNotLoadedException - if the array component type has not yet been loaded through the appropriate class loader.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        See Also:
        ArrayType.componentType()

      • setValues

        void setValues(List<? extends Value> values)
        throws InvalidTypeException,
               ClassNotLoadedException
        Replaces all array components with other values. If the given list is larger in size than the array, the values at the end of the list are ignored.

        Object values must be assignment compatible with the element type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Parameters:
        values - a list of Value objects to be placed in this array. If values.size() is less that the length of the array, the first values.size() elements are set.
        Throws:
        InvalidTypeException - if any of the new values is not compatible with the declared type of array components.
        ClassNotLoadedException - if the array component type has not yet been loaded through the appropriate class loader.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        See Also:
        ArrayType.componentType()

      • setValues

        void setValues(int index,
               List<? extends Value> values,
               int srcIndex,
               int length)
        throws InvalidTypeException,
               ClassNotLoadedException
        Replaces a range of array components with other values.

        Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Parameters:
        index - the index of the first component to set.
        values - a list of Value objects to be placed in this array.
        srcIndex - the index of the first source value to use.
        length - the number of components to set, or -1 to set all components to the end of this array or the end of values (whichever comes first).
        Throws:
        InvalidTypeException - if any element of values is not compatible with the declared type of array components.
        IndexOutOfBoundsException - if the array range specified with index and length is not within the range of the array, or if the source range specified with srcIndex and length is not within values, that is, if any of the following are true:
            index < 0
    index > length()
    srcIndex < 0
    srcIndex > values.size()
        or if length != -1 and any of the following are true:
            length < 0
    index + length > length()
    srcIndex + length > values.size()
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        ClassNotLoadedException
        See Also:
        ArrayType.componentType()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ArrayType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ArrayType

  • All Superinterfaces:
    Accessible, Comparable<ReferenceType>, Mirror, ReferenceType, Type

    @Exported
public interface ArrayType
extends ReferenceType
    Provides access to the class of an array and the type of its components in the target VM.
    Since:
    1.3
    See Also:
    ArrayReference

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String componentSignature()
      Gets the JNI signature of the components of this array class.
      Type componentType()
      Returns the component type of this array, as specified in the array declaration.
      String componentTypeName()
      Returns a text representation of the component type of this array.
      ArrayReference newInstance(int length)
      Creates a new instance of this array class in the target VM.

      • Methods inherited from interface com.sun.jdi.ReferenceType

        allFields, allLineLocations, allLineLocations, allMethods, availableStrata, classLoader, classObject, constantPool, constantPoolCount, defaultStratum, equals, failedToInitialize, fieldByName, fields, genericSignature, getValue, getValues, hashCode, instances, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, locationsOfLine, majorVersion, methods, methodsByName, methodsByName, minorVersion, name, nestedTypes, sourceDebugExtension, sourceName, sourceNames, sourcePaths, visibleFields, visibleMethods

      • Methods inherited from interface com.sun.jdi.Type

        signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

    • Method Detail

      • newInstance

        ArrayReference newInstance(int length)
        Creates a new instance of this array class in the target VM. The array is created with the given length and each component is initialized to is standard default value.
        Parameters:
        length - the number of components in the new array
        Returns:
        the newly created ArrayReference mirroring the new object in the target VM.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • componentSignature

        String componentSignature()
        Gets the JNI signature of the components of this array class. The signature describes the declared type of the components. If the components are objects, their actual type in a particular run-time context may be a subclass of the declared class.
        Returns:
        a string containing the JNI signature of array components.

      • componentTypeName

        String componentTypeName()
        Returns a text representation of the component type of this array.
        Returns:
        a text representation of the component type.

      • componentType

        Type componentType()
            throws ClassNotLoadedException
        Returns the component type of this array, as specified in the array declaration.

        Note: The component type of a array will always be created or loaded before the array - see The Java™ Virtual Machine Specification, section 5.3.3 - Creating Array Classes. However, although the component type will be loaded it may not yet be prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        the Type of this array's components.
        Throws:
        ClassNotLoadedException
        See Also:
        Type, Field.type() - for usage examples
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


BooleanValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface BooleanValue

  • All Superinterfaces:
    Mirror, PrimitiveValue, Value

    @Exported
public interface BooleanValue
extends PrimitiveValue
    Provides access to a primitive boolean value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this BooleanValue for equality.
      int hashCode()
      Returns the hash code value for this BooleanValue.
      boolean value()
      Returns this BooleanValue as a boolean.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • value

        boolean value()
        Returns this BooleanValue as a boolean.
        Returns:
        the boolean mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this BooleanValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a BooleanValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this BooleanValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class Bootstrap

  • java.lang.Object
    • com.sun.jdi.Bootstrap

  • @Exported
public class Bootstrap
extends Object
    Initial class that provides access to the default implementation of JDI interfaces. A debugger application uses this class to access the single instance of the VirtualMachineManager interface.
    Since:
    1.3

    • Constructor Summary

      Constructors
      Constructor and Description
      Bootstrap()

    • Method Summary

      All Methods Static Methods Concrete Methods
      Modifier and Type Method and Description
      static VirtualMachineManager virtualMachineManager()
      Returns the virtual machine manager.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Bootstrap

        public Bootstrap()

    • Method Detail

      • virtualMachineManager

        public static VirtualMachineManager virtualMachineManager()
        Returns the virtual machine manager.

        May throw an unspecified error if initialization of the VirtualMachineManager fails or if the virtual machine manager is unable to locate or create any Connectors.

        Throws:
        SecurityException - if a security manager has been installed and it denies JDIPermission ("virtualMachineManager") or other unspecified permissions required by the implementation.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ByteValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ByteValue

  • All Superinterfaces:
    Comparable<ByteValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface ByteValue
extends PrimitiveValue, Comparable<ByteValue>
    Provides access to a primitive byte value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this ByteValue for equality.
      int hashCode()
      Returns the hash code value for this BooleanValue.
      byte value()
      Returns this ByteValue as a byte.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        byte value()
        Returns this ByteValue as a byte.
        Returns:
        the byte mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this ByteValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a ByteValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this BooleanValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


CharValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface CharValue

  • All Superinterfaces:
    Comparable<CharValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface CharValue
extends PrimitiveValue, Comparable<CharValue>
    Provides access to a primitive char value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this CharValue for equality.
      int hashCode()
      Returns the hash code value for this CharValue.
      char value()
      Returns this CharValue as a char.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        char value()
        Returns this CharValue as a char.
        Returns:
        the char mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this CharValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a CharValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this CharValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.AbsentInformationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.AbsentInformationException

  • Packages that use AbsentInformationException
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of AbsentInformationException in com.sun.jdi

      Methods in com.sun.jdi that throw AbsentInformationException
      Modifier and Type Method and Description
      List<Location> Method.allLineLocations()
      Returns a list containing a Location object for each executable source line in this method.
      List<Location> ReferenceType.allLineLocations()
      Returns a list containing a Location object for each executable source line in this reference type.
      List<Location> Method.allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this method.
      List<Location> ReferenceType.allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this reference type.
      List<LocalVariable> Method.arguments()
      Returns a list containing each LocalVariable that is declared as an argument of this method.
      List<Location> Method.locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> ReferenceType.locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> Method.locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number and source name.
      List<Location> ReferenceType.locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      String ReferenceType.sourceDebugExtension()
      Get the source debug extension of this type.
      String Location.sourceName()
      Gets an identifing name for the source corresponding to this location.
      String ReferenceType.sourceName()
      Gets an identifying name for the source corresponding to the declaration of this type.
      String Location.sourceName(String stratum)
      Gets an identifing name for the source corresponding to this location.
      List<String> ReferenceType.sourceNames(String stratum)
      Gets the identifying names for all the source corresponding to the declaration of this type.
      String Location.sourcePath()
      Gets the path to the source corresponding to this location.
      String Location.sourcePath(String stratum)
      Gets the path to the source corresponding to this location.
      List<String> ReferenceType.sourcePaths(String stratum)
      Gets the paths to the source corresponding to the declaration of this type.
      List<LocalVariable> Method.variables()
      Returns a list containing each LocalVariable declared in this method.
      List<LocalVariable> Method.variablesByName(String name)
      Returns a list containing each LocalVariable of a given name in this method.
      LocalVariable StackFrame.visibleVariableByName(String name)
      Finds a LocalVariable that matches the given name and is visible at the current frame location.
      List<LocalVariable> StackFrame.visibleVariables()
      Returns a list containing each LocalVariable that can be accessed from this frame's location.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.Bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.Bootstrap

No usage of com.sun.jdi.Bootstrap
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.ClassNotLoadedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.ClassNotLoadedException

  • Packages that use ClassNotLoadedException
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ClassNotLoadedException in com.sun.jdi

      Methods in com.sun.jdi that throw ClassNotLoadedException
      Modifier and Type Method and Description
      List<Type> Method.argumentTypes()
      Returns a list containing the type of each formal parameter of this method.
      Type ArrayType.componentType()
      Returns the component type of this array, as specified in the array declaration.
      void ThreadReference.forceEarlyReturn(Value value)
      Force a method to return before it reaches a return statement.
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      Type Method.returnType()
      Returns the return type, as specified in the declaration of this method.
      void ObjectReference.setValue(Field field, Value value)
      Sets the value of a given instance or static field in this object.
      void ClassType.setValue(Field field, Value value)
      Assigns a value to a static field.
      void ArrayReference.setValue(int index, Value value)
      Replaces an array component with another value.
      void StackFrame.setValue(LocalVariable variable, Value value)
      Sets the Value of a LocalVariable in this frame.
      void ArrayReference.setValues(int index, List<? extends Value> values, int srcIndex, int length)
      Replaces a range of array components with other values.
      void ArrayReference.setValues(List<? extends Value> values)
      Replaces all array components with other values.
      Type Field.type()
      Returns the type of this field.
      Type LocalVariable.type()
      Returns the type of this variable.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.ClassNotPreparedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.ClassNotPreparedException

No usage of com.sun.jdi.ClassNotPreparedException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.IncompatibleThreadStateException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.IncompatibleThreadStateException

  • Packages that use IncompatibleThreadStateException
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of IncompatibleThreadStateException in com.sun.jdi

      Methods in com.sun.jdi that throw IncompatibleThreadStateException
      Modifier and Type Method and Description
      ObjectReference ThreadReference.currentContendedMonitor()
      Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
      int ObjectReference.entryCount()
      Returns the number times this object's monitor has been entered by the current owning thread.
      void ThreadReference.forceEarlyReturn(Value value)
      Force a method to return before it reaches a return statement.
      StackFrame ThreadReference.frame(int index)
      Returns the StackFrame at the given index in the thread's current call stack.
      int ThreadReference.frameCount()
      Returns the number of stack frames in the thread's current call stack.
      List<StackFrame> ThreadReference.frames()
      Returns a List containing each StackFrame in the thread's current call stack.
      List<StackFrame> ThreadReference.frames(int start, int length)
      Returns a List containing a range of StackFrame mirrors from the thread's current call stack.
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      List<ObjectReference> ThreadReference.ownedMonitors()
      Returns a List containing an ObjectReference for each monitor owned by the thread.
      List<MonitorInfo> ThreadReference.ownedMonitorsAndFrames()
      Returns a List containing a MonitorInfo object for each monitor owned by the thread.
      ThreadReference ObjectReference.owningThread()
      Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
      void ThreadReference.popFrames(StackFrame frame)
      Pop stack frames.
      List<ThreadReference> ObjectReference.waitingThreads()
      Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InconsistentDebugInfoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InconsistentDebugInfoException

No usage of com.sun.jdi.InconsistentDebugInfoException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InternalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InternalException

No usage of com.sun.jdi.InternalException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InvalidCodeIndexException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InvalidCodeIndexException

No usage of com.sun.jdi.InvalidCodeIndexException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InvalidLineNumberException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InvalidLineNumberException

No usage of com.sun.jdi.InvalidLineNumberException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InvalidStackFrameException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InvalidStackFrameException

No usage of com.sun.jdi.InvalidStackFrameException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InvalidTypeException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InvalidTypeException

  • Packages that use InvalidTypeException
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of InvalidTypeException in com.sun.jdi

      Methods in com.sun.jdi that throw InvalidTypeException
      Modifier and Type Method and Description
      void ThreadReference.forceEarlyReturn(Value value)
      Force a method to return before it reaches a return statement.
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      void ObjectReference.setValue(Field field, Value value)
      Sets the value of a given instance or static field in this object.
      void ClassType.setValue(Field field, Value value)
      Assigns a value to a static field.
      void ArrayReference.setValue(int index, Value value)
      Replaces an array component with another value.
      void StackFrame.setValue(LocalVariable variable, Value value)
      Sets the Value of a LocalVariable in this frame.
      void ArrayReference.setValues(int index, List<? extends Value> values, int srcIndex, int length)
      Replaces a range of array components with other values.
      void ArrayReference.setValues(List<? extends Value> values)
      Replaces all array components with other values.
      void ThreadReference.stop(ObjectReference throwable)
      Stops this thread with an asynchronous exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.InvocationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.InvocationException

  • Packages that use InvocationException
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of InvocationException in com.sun.jdi

      Methods in com.sun.jdi that throw InvocationException
      Modifier and Type Method and Description
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.JDIPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.JDIPermission

No usage of com.sun.jdi.JDIPermission
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.NativeMethodException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.NativeMethodException

No usage of com.sun.jdi.NativeMethodException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.ObjectCollectedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.ObjectCollectedException

No usage of com.sun.jdi.ObjectCollectedException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.VMCannotBeModifiedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.VMCannotBeModifiedException

No usage of com.sun.jdi.VMCannotBeModifiedException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.VMDisconnectedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.VMDisconnectedException

No usage of com.sun.jdi.VMDisconnectedException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.VMMismatchException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.VMMismatchException

No usage of com.sun.jdi.VMMismatchException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.VMOutOfMemoryException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.VMOutOfMemoryException

No usage of com.sun.jdi.VMOutOfMemoryException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Accessible

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Accessible

  • Packages that use Accessible
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of Accessible in com.sun.jdi

      Subinterfaces of Accessible in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayType
      Provides access to the class of an array and the type of its components in the target VM.
      interface  ClassType
      A mirror of a class in the target VM.
      interface  Field
      A class or instance variable in the target VM.
      interface  InterfaceType
      A mirror of an interface in the target VM.
      interface  Method
      A static or instance method in the target VM.
      interface  ReferenceType
      The type of an object in a target VM.
      interface  TypeComponent
      An entity declared within a user defined type (class or interface).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ArrayReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ArrayReference

  • Packages that use ArrayReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ArrayReference in com.sun.jdi

      Methods in com.sun.jdi that return ArrayReference
      Modifier and Type Method and Description
      ArrayReference ArrayType.newInstance(int length)
      Creates a new instance of this array class in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ArrayType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ArrayType

No usage of com.sun.jdi.ArrayType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.BooleanType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.BooleanType

No usage of com.sun.jdi.BooleanType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.BooleanValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.BooleanValue

  • Packages that use BooleanValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of BooleanValue in com.sun.jdi

      Methods in com.sun.jdi that return BooleanValue
      Modifier and Type Method and Description
      BooleanValue VirtualMachine.mirrorOf(boolean value)
      Creates a BooleanValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ByteType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ByteType

No usage of com.sun.jdi.ByteType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ByteValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ByteValue

  • Packages that use ByteValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ByteValue in com.sun.jdi

      Methods in com.sun.jdi that return ByteValue
      Modifier and Type Method and Description
      ByteValue VirtualMachine.mirrorOf(byte value)
      Creates a ByteValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.CharType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.CharType

No usage of com.sun.jdi.CharType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.CharValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.CharValue

  • Packages that use CharValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of CharValue in com.sun.jdi

      Methods in com.sun.jdi that return CharValue
      Modifier and Type Method and Description
      CharValue VirtualMachine.mirrorOf(char value)
      Creates a CharValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ClassLoaderReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ClassLoaderReference

  • Packages that use ClassLoaderReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ClassLoaderReference in com.sun.jdi

      Methods in com.sun.jdi that return ClassLoaderReference
      Modifier and Type Method and Description
      ClassLoaderReference ReferenceType.classLoader()
      Gets the classloader object which loaded the class corresponding to this type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ClassObjectReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ClassObjectReference

  • Packages that use ClassObjectReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ClassObjectReference in com.sun.jdi

      Methods in com.sun.jdi that return ClassObjectReference
      Modifier and Type Method and Description
      ClassObjectReference ReferenceType.classObject()
      Returns the class object that corresponds to this type in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ClassType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ClassType

  • Packages that use ClassType
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ClassType in com.sun.jdi

      Methods in com.sun.jdi that return ClassType
      Modifier and Type Method and Description
      ClassType ClassType.superclass()
      Gets the superclass of this class.
      Methods in com.sun.jdi that return types with arguments of type ClassType
      Modifier and Type Method and Description
      List<ClassType> InterfaceType.implementors()
      Gets the currently prepared classes which directly implement this interface.
      List<ClassType> ClassType.subclasses()
      Gets the currently loaded, direct subclasses of this class.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.DoubleType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.DoubleType

No usage of com.sun.jdi.DoubleType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.DoubleValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.DoubleValue

  • Packages that use DoubleValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of DoubleValue in com.sun.jdi

      Methods in com.sun.jdi that return DoubleValue
      Modifier and Type Method and Description
      DoubleValue VirtualMachine.mirrorOf(double value)
      Creates a DoubleValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Field

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Field

  • Packages that use Field
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of Field in com.sun.jdi

      Methods in com.sun.jdi that return Field
      Modifier and Type Method and Description
      Field ReferenceType.fieldByName(String fieldName)
      Finds the visible Field with the given non-ambiguous name.
      Methods in com.sun.jdi that return types with arguments of type Field
      Modifier and Type Method and Description
      List<Field> ReferenceType.allFields()
      Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
      List<Field> ReferenceType.fields()
      Returns a list containing each Field declared in this type.
      Map<Field,Value> ObjectReference.getValues(List<? extends Field> fields)
      Gets the value of multiple instance and/or static fields in this object.
      Map<Field,Value> ReferenceType.getValues(List<? extends Field> fields)
      Returns a map containing the Value of each static Field in the given list.
      List<Field> ReferenceType.visibleFields()
      Returns a list containing each unhidden and unambiguous Field in this type.
      Methods in com.sun.jdi with parameters of type Field
      Modifier and Type Method and Description
      Value ObjectReference.getValue(Field sig)
      Gets the value of a given instance or static field in this object.
      Value ReferenceType.getValue(Field field)
      Gets the Value of a given static Field in this type.
      void ObjectReference.setValue(Field field, Value value)
      Sets the value of a given instance or static field in this object.
      void ClassType.setValue(Field field, Value value)
      Assigns a value to a static field.
      Method parameters in com.sun.jdi with type arguments of type Field
      Modifier and Type Method and Description
      Map<Field,Value> ObjectReference.getValues(List<? extends Field> fields)
      Gets the value of multiple instance and/or static fields in this object.
      Map<Field,Value> ReferenceType.getValues(List<? extends Field> fields)
      Returns a map containing the Value of each static Field in the given list.

    • Uses of Field in com.sun.jdi.event

      Methods in com.sun.jdi.event that return Field
      Modifier and Type Method and Description
      Field WatchpointEvent.field()
      Returns the field that is about to be accessed/modified.

    • Uses of Field in com.sun.jdi.request

      Methods in com.sun.jdi.request that return Field
      Modifier and Type Method and Description
      Field WatchpointRequest.field()
      Gets the Field being watched by this WatchpointRequest.
      Methods in com.sun.jdi.request with parameters of type Field
      Modifier and Type Method and Description
      AccessWatchpointRequest EventRequestManager.createAccessWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
      ModificationWatchpointRequest EventRequestManager.createModificationWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.FloatType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.FloatType

No usage of com.sun.jdi.FloatType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.FloatValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.FloatValue

  • Packages that use FloatValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of FloatValue in com.sun.jdi

      Methods in com.sun.jdi that return FloatValue
      Modifier and Type Method and Description
      FloatValue VirtualMachine.mirrorOf(float value)
      Creates a FloatValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.IntegerType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.IntegerType

No usage of com.sun.jdi.IntegerType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.IntegerValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.IntegerValue

  • Packages that use IntegerValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of IntegerValue in com.sun.jdi

      Methods in com.sun.jdi that return IntegerValue
      Modifier and Type Method and Description
      IntegerValue VirtualMachine.mirrorOf(int value)
      Creates an IntegerValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.InterfaceType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.InterfaceType

  • Packages that use InterfaceType
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of InterfaceType in com.sun.jdi

      Methods in com.sun.jdi that return types with arguments of type InterfaceType
      Modifier and Type Method and Description
      List<InterfaceType> ClassType.allInterfaces()
      Gets the interfaces directly and indirectly implemented by this class.
      List<InterfaceType> ClassType.interfaces()
      Gets the interfaces directly implemented by this class.
      List<InterfaceType> InterfaceType.subinterfaces()
      Gets the currently prepared interfaces which directly extend this interface.
      List<InterfaceType> InterfaceType.superinterfaces()
      Gets the interfaces directly extended by this interface.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.LocalVariable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.LocalVariable

  • Packages that use LocalVariable
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of LocalVariable in com.sun.jdi

      Methods in com.sun.jdi that return LocalVariable
      Modifier and Type Method and Description
      LocalVariable StackFrame.visibleVariableByName(String name)
      Finds a LocalVariable that matches the given name and is visible at the current frame location.
      Methods in com.sun.jdi that return types with arguments of type LocalVariable
      Modifier and Type Method and Description
      List<LocalVariable> Method.arguments()
      Returns a list containing each LocalVariable that is declared as an argument of this method.
      Map<LocalVariable,Value> StackFrame.getValues(List<? extends LocalVariable> variables)
      Returns the values of multiple local variables in this frame.
      List<LocalVariable> Method.variables()
      Returns a list containing each LocalVariable declared in this method.
      List<LocalVariable> Method.variablesByName(String name)
      Returns a list containing each LocalVariable of a given name in this method.
      List<LocalVariable> StackFrame.visibleVariables()
      Returns a list containing each LocalVariable that can be accessed from this frame's location.
      Methods in com.sun.jdi with parameters of type LocalVariable
      Modifier and Type Method and Description
      Value StackFrame.getValue(LocalVariable variable)
      Gets the Value of a LocalVariable in this frame.
      void StackFrame.setValue(LocalVariable variable, Value value)
      Sets the Value of a LocalVariable in this frame.
      Method parameters in com.sun.jdi with type arguments of type LocalVariable
      Modifier and Type Method and Description
      Map<LocalVariable,Value> StackFrame.getValues(List<? extends LocalVariable> variables)
      Returns the values of multiple local variables in this frame.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Locatable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Locatable

  • Packages that use Locatable
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of Locatable in com.sun.jdi

      Subinterfaces of Locatable in com.sun.jdi
      Modifier and Type Interface and Description
      interface  Method
      A static or instance method in the target VM.
      interface  StackFrame
      The state of one method invocation on a thread's call stack.

    • Uses of Locatable in com.sun.jdi.event

      Subinterfaces of Locatable in com.sun.jdi.event
      Modifier and Type Interface and Description
      interface  AccessWatchpointEvent
      Notification of a field access in the target VM.
      interface  BreakpointEvent
      Notification of a breakpoint in the target VM.
      interface  ExceptionEvent
      Notification of an exception in the target VM.
      interface  LocatableEvent
      Abstract superinterface of events which have both location and thread.
      interface  MethodEntryEvent
      Notification of a method invocation in the target VM.
      interface  MethodExitEvent
      Notification of a method return in the target VM.
      interface  ModificationWatchpointEvent
      Notification of a field modification in the target VM.
      interface  MonitorContendedEnteredEvent
      Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterEvent
      Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
      interface  MonitorWaitedEvent
      Notification that a thread in the target VM has finished waiting on an monitor object.
      interface  MonitorWaitEvent
      Notification that a thread in the target VM is about to wait on a monitor object.
      interface  StepEvent
      Notification of step completion in the target VM.
      interface  WatchpointEvent
      Notification of a field triggered event encountered by a thread in the target VM.

    • Uses of Locatable in com.sun.jdi.request

      Subinterfaces of Locatable in com.sun.jdi.request
      Modifier and Type Interface and Description
      interface  BreakpointRequest
      Identifies a Location in the target VM at which execution should be stopped.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Location

  • Packages that use Location
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of Location in com.sun.jdi

      Methods in com.sun.jdi that return Location
      Modifier and Type Method and Description
      Location Method.location()
      Returns the Location of this method, if there is executable code associated with it.
      Location StackFrame.location()
      Returns the Location of the current instruction in the frame.
      Location Locatable.location()
      Returns the Location of this mirror, if there is executable code associated with it.
      Location Method.locationOfCodeIndex(long codeIndex)
      Returns a Location for the given code index.
      Methods in com.sun.jdi that return types with arguments of type Location
      Modifier and Type Method and Description
      List<Location> Method.allLineLocations()
      Returns a list containing a Location object for each executable source line in this method.
      List<Location> ReferenceType.allLineLocations()
      Returns a list containing a Location object for each executable source line in this reference type.
      List<Location> Method.allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this method.
      List<Location> ReferenceType.allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this reference type.
      List<Location> Method.locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> ReferenceType.locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> Method.locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number and source name.
      List<Location> ReferenceType.locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number.

    • Uses of Location in com.sun.jdi.event

      Methods in com.sun.jdi.event that return Location
      Modifier and Type Method and Description
      Location ExceptionEvent.catchLocation()
      Gets the location where the exception will be caught.

    • Uses of Location in com.sun.jdi.request

      Methods in com.sun.jdi.request that return Location
      Modifier and Type Method and Description
      Location BreakpointRequest.location()
      Returns the location of the requested breakpoint.
      Methods in com.sun.jdi.request with parameters of type Location
      Modifier and Type Method and Description
      BreakpointRequest EventRequestManager.createBreakpointRequest(Location location)
      Creates a new disabled BreakpointRequest.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.LongType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.LongType

No usage of com.sun.jdi.LongType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.LongValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.LongValue

  • Packages that use LongValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of LongValue in com.sun.jdi

      Methods in com.sun.jdi that return LongValue
      Modifier and Type Method and Description
      LongValue VirtualMachine.mirrorOf(long value)
      Creates a LongValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Method

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Method

  • Packages that use Method
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of Method in com.sun.jdi

      Methods in com.sun.jdi that return Method
      Modifier and Type Method and Description
      Method ClassType.concreteMethodByName(String name, String signature)
      Returns a the single non-abstract Method visible from this class that has the given name and signature.
      Method Location.method()
      Gets the method containing this Location.
      Methods in com.sun.jdi that return types with arguments of type Method
      Modifier and Type Method and Description
      List<Method> ReferenceType.allMethods()
      Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
      List<Method> ReferenceType.methods()
      Returns a list containing each Method declared directly in this type.
      List<Method> ReferenceType.methodsByName(String name)
      Returns a List containing each visible Method that has the given name.
      List<Method> ReferenceType.methodsByName(String name, String signature)
      Returns a List containing each visible Method that has the given name and signature.
      List<Method> ReferenceType.visibleMethods()
      Returns a list containing each Method declared or inherited by this type.
      Methods in com.sun.jdi with parameters of type Method
      Modifier and Type Method and Description
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.

    • Uses of Method in com.sun.jdi.event

      Methods in com.sun.jdi.event that return Method
      Modifier and Type Method and Description
      Method MethodEntryEvent.method()
      Returns the method that was entered.
      Method MethodExitEvent.method()
      Returns the method that was exited.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Mirror

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Mirror

  • Packages that use Mirror
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of Mirror in com.sun.jdi

      Subinterfaces of Mirror in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayReference
      Provides access to an array object and its components in the target VM.
      interface  ArrayType
      Provides access to the class of an array and the type of its components in the target VM.
      interface  BooleanType
      The type of all primitive boolean values accessed in the target VM.
      interface  BooleanValue
      Provides access to a primitive boolean value in the target VM.
      interface  ByteType
      The type of all primitive byte values accessed in the target VM.
      interface  ByteValue
      Provides access to a primitive byte value in the target VM.
      interface  CharType
      The type of all primitive char values accessed in the target VM.
      interface  CharValue
      Provides access to a primitive char value in the target VM.
      interface  ClassLoaderReference
      A class loader object from the target VM.
      interface  ClassObjectReference
      An instance of java.lang.Class from the target VM.
      interface  ClassType
      A mirror of a class in the target VM.
      interface  DoubleType
      The type of all primitive double values accessed in the target VM.
      interface  DoubleValue
      Provides access to a primitive double value in the target VM.
      interface  Field
      A class or instance variable in the target VM.
      interface  FloatType
      The type of all primitive float values accessed in the target VM.
      interface  FloatValue
      Provides access to a primitive float value in the target VM.
      interface  IntegerType
      The type of all primitive int values accessed in the target VM.
      interface  IntegerValue
      Provides access to a primitive int value in the target VM.
      interface  InterfaceType
      A mirror of an interface in the target VM.
      interface  LocalVariable
      A local variable in the target VM.
      interface  Location
      A point within the executing code of the target VM.
      interface  LongType
      The type of all primitive long values accessed in the target VM.
      interface  LongValue
      Provides access to a primitive long value in the target VM.
      interface  Method
      A static or instance method in the target VM.
      interface  MonitorInfo
      Information about a monitor owned by a thread.
      interface  ObjectReference
      An object that currently exists in the target VM.
      interface  PathSearchingVirtualMachine
      A virtual machine which searches for classes through paths
      interface  PrimitiveType
      The type associated with non-object values in a target VM.
      interface  PrimitiveValue
      The value assigned to a field or variable of primitive type in a target VM.
      interface  ReferenceType
      The type of an object in a target VM.
      interface  ShortType
      The type of all primitive short values accessed in the target VM.
      interface  ShortValue
      Provides access to a primitive short value in the target VM.
      interface  StackFrame
      The state of one method invocation on a thread's call stack.
      interface  StringReference
      A string object from the target VM.
      interface  ThreadGroupReference
      A thread group object from the target VM.
      interface  ThreadReference
      A thread object from the target VM.
      interface  Type
      The mirror for a type in the target VM.
      interface  TypeComponent
      An entity declared within a user defined type (class or interface).
      interface  Value
      The mirror for a value in the target VM.
      interface  VirtualMachine
      A virtual machine targeted for debugging.
      interface  VoidType
      The type of all primitive void values accessed in the target VM.
      interface  VoidValue
      Provides access to a primitive void value in the target VM.

    • Uses of Mirror in com.sun.jdi.event

      Subinterfaces of Mirror in com.sun.jdi.event
      Modifier and Type Interface and Description
      interface  AccessWatchpointEvent
      Notification of a field access in the target VM.
      interface  BreakpointEvent
      Notification of a breakpoint in the target VM.
      interface  ClassPrepareEvent
      Notification of a class prepare in the target VM.
      interface  ClassUnloadEvent
      Notification of a class unload in the target VM.
      interface  Event
      An occurrence in a target VM that is of interest to a debugger.
      interface  EventQueue
      Manager of incoming debugger events for a target VM.
      interface  EventSet
      Several Event objects may be created at a given time by the target VirtualMachine.
      interface  ExceptionEvent
      Notification of an exception in the target VM.
      interface  LocatableEvent
      Abstract superinterface of events which have both location and thread.
      interface  MethodEntryEvent
      Notification of a method invocation in the target VM.
      interface  MethodExitEvent
      Notification of a method return in the target VM.
      interface  ModificationWatchpointEvent
      Notification of a field modification in the target VM.
      interface  MonitorContendedEnteredEvent
      Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterEvent
      Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
      interface  MonitorWaitedEvent
      Notification that a thread in the target VM has finished waiting on an monitor object.
      interface  MonitorWaitEvent
      Notification that a thread in the target VM is about to wait on a monitor object.
      interface  StepEvent
      Notification of step completion in the target VM.
      interface  ThreadDeathEvent
      Notification of a completed thread in the target VM.
      interface  ThreadStartEvent
      Notification of a new running thread in the target VM.
      interface  VMDeathEvent
      Notification of target VM termination.
      interface  VMDisconnectEvent
      Notification of disconnection from target VM.
      interface  VMStartEvent
      Notification of initialization of a target VM.
      interface  WatchpointEvent
      Notification of a field triggered event encountered by a thread in the target VM.

    • Uses of Mirror in com.sun.jdi.request

      Subinterfaces of Mirror in com.sun.jdi.request
      Modifier and Type Interface and Description
      interface  AccessWatchpointRequest
      Request for notification when the contents of a field are accessed in the target VM.
      interface  BreakpointRequest
      Identifies a Location in the target VM at which execution should be stopped.
      interface  ClassPrepareRequest
      Request for notification when a class is prepared in the target VM.
      interface  ClassUnloadRequest
      Request for notification when a class is unloaded in the target VM.
      interface  EventRequest
      Represents a request for notification of an event.
      interface  EventRequestManager
      Manages the creation and deletion of EventRequests.
      interface  ExceptionRequest
      Request for notification when an exception occurs in the target VM.
      interface  MethodEntryRequest
      Request for notification when a method is invoked in the target VM.
      interface  MethodExitRequest
      Request for notification when a method returns in the target VM.
      interface  ModificationWatchpointRequest
      Request for notification when a field is set.
      interface  MonitorContendedEnteredRequest
      Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterRequest
      Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread.
      interface  MonitorWaitedRequest
      Request for notification when a thread in the target VM has finished waiting on a monitor object.
      interface  MonitorWaitRequest
      Request for notification when a thread in the target VM is about to wait on a monitor object.
      interface  StepRequest
      Request for notification when a step occurs in the target VM.
      interface  ThreadDeathRequest
      Request for notification when a thread terminates in the target VM.
      interface  ThreadStartRequest
      Request for notification when a thread starts execution in the target VM.
      interface  VMDeathRequest
      Request for notification when the target VM terminates.
      interface  WatchpointRequest
      Identifies a Field in the target VM being watched.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.MonitorInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.MonitorInfo

  • Packages that use MonitorInfo
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of MonitorInfo in com.sun.jdi

      Methods in com.sun.jdi that return types with arguments of type MonitorInfo
      Modifier and Type Method and Description
      List<MonitorInfo> ThreadReference.ownedMonitorsAndFrames()
      Returns a List containing a MonitorInfo object for each monitor owned by the thread.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ObjectReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ObjectReference

  • Packages that use ObjectReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ObjectReference in com.sun.jdi

      Subinterfaces of ObjectReference in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayReference
      Provides access to an array object and its components in the target VM.
      interface  ClassLoaderReference
      A class loader object from the target VM.
      interface  ClassObjectReference
      An instance of java.lang.Class from the target VM.
      interface  StringReference
      A string object from the target VM.
      interface  ThreadGroupReference
      A thread group object from the target VM.
      interface  ThreadReference
      A thread object from the target VM.
      Methods in com.sun.jdi that return ObjectReference
      Modifier and Type | Method and Description
      ObjectReference ThreadReference.currentContendedMonitor()
      Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
      ObjectReference | InvocationException.exception()
      ObjectReference MonitorInfo.monitor()
      Returns the ObjectReference object for the monitor.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      ObjectReference StackFrame.thisObject()
      Returns the value of 'this' for the current frame.
      Methods in com.sun.jdi that return types with arguments of type ObjectReference
      Modifier and Type Method and Description
      List<ObjectReference> ReferenceType.instances(long maxInstances)
      Returns instances of this ReferenceType.
      List<ObjectReference> ThreadReference.ownedMonitors()
      Returns a List containing an ObjectReference for each monitor owned by the thread.
      List<ObjectReference> ObjectReference.referringObjects(long maxReferrers)
      Returns objects that directly reference this object.
      Methods in com.sun.jdi with parameters of type ObjectReference
      Modifier and Type Method and Description
      void ThreadReference.stop(ObjectReference throwable)
      Stops this thread with an asynchronous exception.
      Constructors in com.sun.jdi with parameters of type ObjectReference
      Constructor and Description
      InvocationException(ObjectReference exception)

    • Uses of ObjectReference in com.sun.jdi.event

      Methods in com.sun.jdi.event that return ObjectReference
      Modifier and Type Method and Description
      ObjectReference ExceptionEvent.exception()
      Gets the thrown exception object.
      ObjectReference MonitorContendedEnterEvent.monitor()
      Returns the method that was entered.
      ObjectReference MonitorWaitedEvent.monitor()
      Returns the monitor object this thread waited on.
      ObjectReference MonitorContendedEnteredEvent.monitor()
      Returns the monitor that was entered.
      ObjectReference MonitorWaitEvent.monitor()
      Returns the monitor object that the thread about to wait.
      ObjectReference WatchpointEvent.object()
      Returns the object whose field is about to be accessed/modified.

    • Uses of ObjectReference in com.sun.jdi.request

      Methods in com.sun.jdi.request with parameters of type ObjectReference
      Modifier and Type Method and Description
      void MonitorContendedEnterRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void MonitorWaitedRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void BreakpointRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance is the object specified.
      void MethodEntryRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void MonitorContendedEnteredRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void MethodExitRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void WatchpointRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void ExceptionRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void MonitorWaitRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void StepRequest.addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.PathSearchingVirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.PathSearchingVirtualMachine

No usage of com.sun.jdi.PathSearchingVirtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.PrimitiveType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.PrimitiveType

  • Packages that use PrimitiveType
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of PrimitiveType in com.sun.jdi

      Subinterfaces of PrimitiveType in com.sun.jdi
      Modifier and Type Interface and Description
      interface  BooleanType
      The type of all primitive boolean values accessed in the target VM.
      interface  ByteType
      The type of all primitive byte values accessed in the target VM.
      interface  CharType
      The type of all primitive char values accessed in the target VM.
      interface  DoubleType
      The type of all primitive double values accessed in the target VM.
      interface  FloatType
      The type of all primitive float values accessed in the target VM.
      interface  IntegerType
      The type of all primitive int values accessed in the target VM.
      interface  LongType
      The type of all primitive long values accessed in the target VM.
      interface  ShortType
      The type of all primitive short values accessed in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.PrimitiveValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.PrimitiveValue

  • Packages that use PrimitiveValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of PrimitiveValue in com.sun.jdi

      Subinterfaces of PrimitiveValue in com.sun.jdi
      Modifier and Type Interface and Description
      interface  BooleanValue
      Provides access to a primitive boolean value in the target VM.
      interface  ByteValue
      Provides access to a primitive byte value in the target VM.
      interface  CharValue
      Provides access to a primitive char value in the target VM.
      interface  DoubleValue
      Provides access to a primitive double value in the target VM.
      interface  FloatValue
      Provides access to a primitive float value in the target VM.
      interface  IntegerValue
      Provides access to a primitive int value in the target VM.
      interface  LongValue
      Provides access to a primitive long value in the target VM.
      interface  ShortValue
      Provides access to a primitive short value in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ReferenceType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ReferenceType

  • Packages that use ReferenceType
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ReferenceType in com.sun.jdi

      Subinterfaces of ReferenceType in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayType
      Provides access to the class of an array and the type of its components in the target VM.
      interface  ClassType
      A mirror of a class in the target VM.
      interface  InterfaceType
      A mirror of an interface in the target VM.
      Methods in com.sun.jdi that return ReferenceType
      Modifier and Type Method and Description
      ReferenceType TypeComponent.declaringType()
      Returns the type in which this component was declared.
      ReferenceType Location.declaringType()
      Gets the type to which this Location belongs.
      ReferenceType ObjectReference.referenceType()
      Gets the ReferenceType that mirrors the type of this object.
      ReferenceType ClassObjectReference.reflectedType()
      Returns the ReferenceType corresponding to this class object.
      Methods in com.sun.jdi that return types with arguments of type ReferenceType
      Modifier and Type Method and Description
      List<ReferenceType> VirtualMachine.allClasses()
      Returns all loaded types.
      List<ReferenceType> VirtualMachine.classesByName(String className)
      Returns the loaded reference types that match a given name.
      List<ReferenceType> ClassLoaderReference.definedClasses()
      Returns a list of all loaded classes that were defined by this class loader.
      List<ReferenceType> ReferenceType.nestedTypes()
      Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine.
      List<ReferenceType> ClassLoaderReference.visibleClasses()
      Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM.
      Method parameters in com.sun.jdi with type arguments of type ReferenceType
      Modifier and Type Method and Description
      long[] VirtualMachine.instanceCounts(List<? extends ReferenceType> refTypes)
      Returns the number of instances of each ReferenceType in the 'refTypes' list.
      void VirtualMachine.redefineClasses(Map<? extends ReferenceType,byte[]> classToBytes)
      All classes given are redefined according to the definitions supplied.

    • Uses of ReferenceType in com.sun.jdi.event

      Methods in com.sun.jdi.event that return ReferenceType
      Modifier and Type Method and Description
      ReferenceType ClassPrepareEvent.referenceType()
      Returns the reference type for which this event was generated.

    • Uses of ReferenceType in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ReferenceType
      Modifier and Type Method and Description
      ReferenceType ExceptionRequest.exception()
      Returns exception type for which exception events are requested.
      Methods in com.sun.jdi.request with parameters of type ReferenceType
      Modifier and Type Method and Description
      void MonitorContendedEnterRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void MonitorWaitedRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
      void ClassPrepareRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
      void MethodEntryRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void MonitorContendedEnteredRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void MethodExitRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void WatchpointRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      void ExceptionRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      void MonitorWaitRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
      void StepRequest.addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      ExceptionRequest EventRequestManager.createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)
      Creates a new disabled ExceptionRequest.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ShortType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ShortType

No usage of com.sun.jdi.ShortType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ShortValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ShortValue

  • Packages that use ShortValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ShortValue in com.sun.jdi

      Methods in com.sun.jdi that return ShortValue
      Modifier and Type Method and Description
      ShortValue VirtualMachine.mirrorOf(short value)
      Creates a ShortValue for the given value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.StackFrame

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.StackFrame

  • Packages that use StackFrame
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of StackFrame in com.sun.jdi

      Methods in com.sun.jdi that return StackFrame
      Modifier and Type Method and Description
      StackFrame ThreadReference.frame(int index)
      Returns the StackFrame at the given index in the thread's current call stack.
      Methods in com.sun.jdi that return types with arguments of type StackFrame
      Modifier and Type Method and Description
      List<StackFrame> ThreadReference.frames()
      Returns a List containing each StackFrame in the thread's current call stack.
      List<StackFrame> ThreadReference.frames(int start, int length)
      Returns a List containing a range of StackFrame mirrors from the thread's current call stack.
      Methods in com.sun.jdi with parameters of type StackFrame
      Modifier and Type Method and Description
      boolean LocalVariable.isVisible(StackFrame frame)
      Determines whether this variable can be accessed from the given StackFrame.
      void ThreadReference.popFrames(StackFrame frame)
      Pop stack frames.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.StringReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.StringReference

  • Packages that use StringReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of StringReference in com.sun.jdi

      Methods in com.sun.jdi that return StringReference
      Modifier and Type Method and Description
      StringReference VirtualMachine.mirrorOf(String value)
      Creates a string in this virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ThreadGroupReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ThreadGroupReference

  • Packages that use ThreadGroupReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ThreadGroupReference in com.sun.jdi

      Methods in com.sun.jdi that return ThreadGroupReference
      Modifier and Type Method and Description
      ThreadGroupReference ThreadGroupReference.parent()
      Returns the parent of this thread group.
      ThreadGroupReference ThreadReference.threadGroup()
      Returns this thread's thread group.
      Methods in com.sun.jdi that return types with arguments of type ThreadGroupReference
      Modifier and Type Method and Description
      List<ThreadGroupReference> ThreadGroupReference.threadGroups()
      Returns a List containing each active ThreadGroupReference in this thread group.
      List<ThreadGroupReference> VirtualMachine.topLevelThreadGroups()
      Returns each thread group which does not have a parent.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.ThreadReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.ThreadReference

  • Packages that use ThreadReference
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ThreadReference in com.sun.jdi

      Methods in com.sun.jdi that return ThreadReference
      Modifier and Type Method and Description
      ThreadReference ObjectReference.owningThread()
      Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
      ThreadReference MonitorInfo.thread()
      Returns a ThreadReference object for the thread that owns the monitor.
      ThreadReference StackFrame.thread()
      Returns the thread under which this frame's method is running.
      Methods in com.sun.jdi that return types with arguments of type ThreadReference
      Modifier and Type Method and Description
      List<ThreadReference> VirtualMachine.allThreads()
      Returns a list of the currently running threads.
      List<ThreadReference> ThreadGroupReference.threads()
      Returns a List containing a ThreadReference for each live thread in this thread group.
      List<ThreadReference> ObjectReference.waitingThreads()
      Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
      Methods in com.sun.jdi with parameters of type ThreadReference
      Modifier and Type Method and Description
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.

    • Uses of ThreadReference in com.sun.jdi.event

      Methods in com.sun.jdi.event that return ThreadReference
      Modifier and Type Method and Description
      ThreadReference ThreadStartEvent.thread()
      Returns the thread which has started.
      ThreadReference LocatableEvent.thread()
      Returns the thread in which this event has occurred.
      ThreadReference ClassPrepareEvent.thread()
      Returns the thread in which this event has occurred.
      ThreadReference ThreadDeathEvent.thread()
      Returns the thread which is terminating.
      ThreadReference MonitorContendedEnterEvent.thread()
      Returns the thread in which this event has occurred.
      ThreadReference VMStartEvent.thread()
      Returns the initial thread of the VM which has started.
      ThreadReference MonitorWaitedEvent.thread()
      Returns the thread in which this event has occurred.
      ThreadReference MonitorContendedEnteredEvent.thread()
      Returns the thread in which this event has occurred.
      ThreadReference MonitorWaitEvent.thread()
      Returns the thread in which monitor wait event has occurred.

    • Uses of ThreadReference in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ThreadReference
      Modifier and Type | Method and Description
      ThreadReference | StepRequest.thread()
      Methods in com.sun.jdi.request with parameters of type ThreadReference
      Modifier and Type Method and Description
      void MonitorContendedEnterRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void MonitorWaitedRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void BreakpointRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void MethodEntryRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void ThreadDeathRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void MonitorContendedEnteredRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void MethodExitRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void ThreadStartRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void WatchpointRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void ExceptionRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      void MonitorWaitRequest.addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      StepRequest EventRequestManager.createStepRequest(ThreadReference thread, int size, int depth)
      Creates a new disabled StepRequest.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Type

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Type

  • Packages that use Type
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of Type in com.sun.jdi

      Subinterfaces of Type in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayType
      Provides access to the class of an array and the type of its components in the target VM.
      interface  BooleanType
      The type of all primitive boolean values accessed in the target VM.
      interface  ByteType
      The type of all primitive byte values accessed in the target VM.
      interface  CharType
      The type of all primitive char values accessed in the target VM.
      interface  ClassType
      A mirror of a class in the target VM.
      interface  DoubleType
      The type of all primitive double values accessed in the target VM.
      interface  FloatType
      The type of all primitive float values accessed in the target VM.
      interface  IntegerType
      The type of all primitive int values accessed in the target VM.
      interface  InterfaceType
      A mirror of an interface in the target VM.
      interface  LongType
      The type of all primitive long values accessed in the target VM.
      interface  PrimitiveType
      The type associated with non-object values in a target VM.
      interface  ReferenceType
      The type of an object in a target VM.
      interface  ShortType
      The type of all primitive short values accessed in the target VM.
      interface  VoidType
      The type of all primitive void values accessed in the target VM.
      Methods in com.sun.jdi that return Type
      Modifier and Type Method and Description
      Type ArrayType.componentType()
      Returns the component type of this array, as specified in the array declaration.
      Type Method.returnType()
      Returns the return type, as specified in the declaration of this method.
      Type Field.type()
      Returns the type of this field.
      Type Value.type()
      Returns the run-time type of this value.
      Type LocalVariable.type()
      Returns the type of this variable.
      Methods in com.sun.jdi that return types with arguments of type Type
      Modifier and Type Method and Description
      List<Type> Method.argumentTypes()
      Returns a list containing the type of each formal parameter of this method.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.TypeComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.TypeComponent

  • Packages that use TypeComponent
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of TypeComponent in com.sun.jdi

      Subinterfaces of TypeComponent in com.sun.jdi
      Modifier and Type Interface and Description
      interface  Field
      A class or instance variable in the target VM.
      interface  Method
      A static or instance method in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.Value

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.Value

  • Packages that use Value
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of Value in com.sun.jdi

      Subinterfaces of Value in com.sun.jdi
      Modifier and Type Interface and Description
      interface  ArrayReference
      Provides access to an array object and its components in the target VM.
      interface  BooleanValue
      Provides access to a primitive boolean value in the target VM.
      interface  ByteValue
      Provides access to a primitive byte value in the target VM.
      interface  CharValue
      Provides access to a primitive char value in the target VM.
      interface  ClassLoaderReference
      A class loader object from the target VM.
      interface  ClassObjectReference
      An instance of java.lang.Class from the target VM.
      interface  DoubleValue
      Provides access to a primitive double value in the target VM.
      interface  FloatValue
      Provides access to a primitive float value in the target VM.
      interface  IntegerValue
      Provides access to a primitive int value in the target VM.
      interface  LongValue
      Provides access to a primitive long value in the target VM.
      interface  ObjectReference
      An object that currently exists in the target VM.
      interface  PrimitiveValue
      The value assigned to a field or variable of primitive type in a target VM.
      interface  ShortValue
      Provides access to a primitive short value in the target VM.
      interface  StringReference
      A string object from the target VM.
      interface  ThreadGroupReference
      A thread group object from the target VM.
      interface  ThreadReference
      A thread object from the target VM.
      interface  VoidValue
      Provides access to a primitive void value in the target VM.
      Methods in com.sun.jdi that return Value
      Modifier and Type Method and Description
      Value ObjectReference.getValue(Field sig)
      Gets the value of a given instance or static field in this object.
      Value ReferenceType.getValue(Field field)
      Gets the Value of a given static Field in this type.
      Value ArrayReference.getValue(int index)
      Returns an array component value.
      Value StackFrame.getValue(LocalVariable variable)
      Gets the Value of a LocalVariable in this frame.
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      Methods in com.sun.jdi that return types with arguments of type Value
      Modifier and Type Method and Description
      List<Value> StackFrame.getArgumentValues()
      Returns the values of all arguments in this frame.
      List<Value> ArrayReference.getValues()
      Returns all of the components in this array.
      List<Value> ArrayReference.getValues(int index, int length)
      Returns a range of array components.
      Map<Field,Value> ObjectReference.getValues(List<? extends Field> fields)
      Gets the value of multiple instance and/or static fields in this object.
      Map<Field,Value> ReferenceType.getValues(List<? extends Field> fields)
      Returns a map containing the Value of each static Field in the given list.
      Map<LocalVariable,Value> StackFrame.getValues(List<? extends LocalVariable> variables)
      Returns the values of multiple local variables in this frame.
      Methods in com.sun.jdi with parameters of type Value
      Modifier and Type Method and Description
      void ThreadReference.forceEarlyReturn(Value value)
      Force a method to return before it reaches a return statement.
      void ObjectReference.setValue(Field field, Value value)
      Sets the value of a given instance or static field in this object.
      void ClassType.setValue(Field field, Value value)
      Assigns a value to a static field.
      void ArrayReference.setValue(int index, Value value)
      Replaces an array component with another value.
      void StackFrame.setValue(LocalVariable variable, Value value)
      Sets the Value of a LocalVariable in this frame.
      Method parameters in com.sun.jdi with type arguments of type Value
      Modifier and Type Method and Description
      Value ObjectReference.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      Value ClassType.invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      ObjectReference ClassType.newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      void ArrayReference.setValues(int index, List<? extends Value> values, int srcIndex, int length)
      Replaces a range of array components with other values.
      void ArrayReference.setValues(List<? extends Value> values)
      Replaces all array components with other values.

    • Uses of Value in com.sun.jdi.event

      Methods in com.sun.jdi.event that return Value
      Modifier and Type Method and Description
      Value MethodExitEvent.returnValue()
      Returns the value that the method will return.
      Value WatchpointEvent.valueCurrent()
      Current value of the field.
      Value ModificationWatchpointEvent.valueToBe()
      Value that will be assigned to the field when the instruction completes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.VirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.VirtualMachine

  • Packages that use VirtualMachine
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of VirtualMachine in com.sun.jdi

      Subinterfaces of VirtualMachine in com.sun.jdi
      Modifier and Type Interface and Description
      interface  PathSearchingVirtualMachine
      A virtual machine which searches for classes through paths
      Methods in com.sun.jdi that return VirtualMachine
      Modifier and Type Method and Description
      VirtualMachine VirtualMachineManager.createVirtualMachine(Connection connection)
      Creates a new virtual machine.
      VirtualMachine VirtualMachineManager.createVirtualMachine(Connection connection, Process process)
      Create a virtual machine mirror for a target VM.
      VirtualMachine Mirror.virtualMachine()
      Gets the VirtualMachine to which this Mirror belongs.
      Methods in com.sun.jdi that return types with arguments of type VirtualMachine
      Modifier and Type Method and Description
      List<VirtualMachine> VirtualMachineManager.connectedVirtualMachines()
      Lists all target VMs which are connected to the debugger.

    • Uses of VirtualMachine in com.sun.jdi.connect

      Methods in com.sun.jdi.connect that return VirtualMachine
      Modifier and Type Method and Description
      VirtualMachine ListeningConnector.accept(Map<String,? extends Connector.Argument> arguments)
      Waits for a target VM to attach to this connector.
      VirtualMachine AttachingConnector.attach(Map<String,? extends Connector.Argument> arguments)
      Attaches to a running application and and returns a mirror of its VM.
      VirtualMachine LaunchingConnector.launch(Map<String,? extends Connector.Argument> arguments)
      Launches an application and connects to its VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.VirtualMachineManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.VirtualMachineManager

  • Packages that use VirtualMachineManager
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of VirtualMachineManager in com.sun.jdi

      Methods in com.sun.jdi that return VirtualMachineManager
      Modifier and Type Method and Description
      static VirtualMachineManager Bootstrap.virtualMachineManager()
      Returns the virtual machine manager.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.VoidType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.VoidType

No usage of com.sun.jdi.VoidType
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.VoidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.VoidValue

  • Packages that use VoidValue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of VoidValue in com.sun.jdi

      Methods in com.sun.jdi that return VoidValue
      Modifier and Type Method and Description
      VoidValue VirtualMachine.mirrorOfVoid()
      Creates a VoidValue.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassLoaderReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ClassLoaderReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface ClassLoaderReference
extends ObjectReference
    A class loader object from the target VM. A ClassLoaderReference is an ObjectReference with additional access to classloader-specific information from the target VM. Instances ClassLoaderReference are obtained through calls to ReferenceType.classLoader()
    Since:
    1.3
    See Also:
    ObjectReference

    • Field Summary

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<ReferenceType> definedClasses()
      Returns a list of all loaded classes that were defined by this class loader.
      List<ReferenceType> visibleClasses()
      Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • definedClasses

        List<ReferenceType> definedClasses()
        Returns a list of all loaded classes that were defined by this class loader. No ordering of this list guaranteed.

        The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.

        Returns:
        a List of ReferenceType objects mirroring types loaded by this class loader. The list has length 0 if no types have been defined by this classloader.

      • visibleClasses

        List<ReferenceType> visibleClasses()
        Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM. The list contains ReferenceTypes defined directly by this loader (as returned by definedClasses()) and any types for which loading was delegated by this class loader to another class loader.

        The visible class list has useful properties with respect to the type namespace. A particular type name will occur at most once in the list. Each field or variable declared with that type name in a class defined by this class loader must be resolved to that single type.

        No ordering of the returned list is guaranteed.

        See The Java™ Virtual Machine Specification, section 5.3 - Creation and Loading for more information on the initiating classloader.

        Note that unlike definedClasses() and VirtualMachine.allClasses(), some of the returned reference types may not be prepared. Attempts to perform some operations on unprepared reference types (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        a List of ReferenceType objects mirroring classes initiated by this class loader. The list has length 0 if no classes are visible to this classloader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassNotLoadedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class ClassNotLoadedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.ClassNotLoadedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class ClassNotLoadedException
extends Exception
    Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.

    Due to the lazy class linking performed by many VMs, it is possible for a field or variable to be visible in a program before the associated class is loaded. Until the class is loaded all that is available is a signature string. If an attempt is made to set the value of such a field or variable from JDI, the appropriate type checking cannot be done because the destination class has not been loaded. The same is true for the element class of array elements.

    It is not advisable to solve this problem by attempting a class load on the fly in this case. There are two problems in having the debugger load a class instead of waiting for it to load over the normal course of events.

    • There can be no guarantee that running the appropriate class loader won't cause a deadlock in loading the class. Class loaders can consist of arbitrary JavaTM programming language code and the class loading methods are usually synchronized. Most of the work done by a debugger happens when threads are suspended. If another application thread is suspended within the same class loader, a deadlock is very possible.
    • Changing the order in which classes are normally loaded may either mask or reveal bugs in the application. An unintrusive debugger should strive to leave unchanged the behavior of the application being debugged.
    To avoid these potential problems, this exception is thrown.

    Note that this exception will be thrown until the class in question is visible to the class loader of enclosing class. (That is, the class loader of the enclosing class must be an initiating class loader for the class in question.) See The Java™ Virtual Machine Specification for more details.

    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ClassNotLoadedException(String className)
      ClassNotLoadedException(String className, String message)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      String className()

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ClassNotLoadedException

        public ClassNotLoadedException(String className)

      • ClassNotLoadedException

        public ClassNotLoadedException(String className,
                               String message)

    • Method Detail

      • className

        public String className()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassNotPreparedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class ClassNotPreparedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.ClassNotPreparedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class ClassNotPreparedException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ClassNotPreparedException()
      ClassNotPreparedException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ClassNotPreparedException

        public ClassNotPreparedException()

      • ClassNotPreparedException

        public ClassNotPreparedException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassObjectReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ClassObjectReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface ClassObjectReference
extends ObjectReference
    An instance of java.lang.Class from the target VM. Use this interface to access type information for the class, array, or interface that this object reflects.
    Since:
    1.3
    See Also:
    ReferenceType

    • Field Summary

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ReferenceType reflectedType()
      Returns the ReferenceType corresponding to this class object.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • reflectedType

        ReferenceType reflectedType()
        Returns the ReferenceType corresponding to this class object. The returned type can be used to obtain detailed information about the class.
        Returns:
        the ReferenceType reflected by this class object.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ClassType

  • All Superinterfaces:
    Accessible, Comparable<ReferenceType>, Mirror, ReferenceType, Type

    @Exported
public interface ClassType
extends ReferenceType
    A mirror of a class in the target VM. A ClassType is a refinement of ReferenceType that applies to true classes in the JLS sense of the definition (not an interface, not an array type). Any ObjectReference that mirrors an instance of such a class will have a ClassType as its type.
    Since:
    1.3
    See Also:
    ObjectReference

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int INVOKE_SINGLE_THREADED
      Perform method invocation with only the invoking thread resumed

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<InterfaceType> allInterfaces()
      Gets the interfaces directly and indirectly implemented by this class.
      Method concreteMethodByName(String name, String signature)
      Returns a the single non-abstract Method visible from this class that has the given name and signature.
      List<InterfaceType> interfaces()
      Gets the interfaces directly implemented by this class.
      Value invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified static Method in the target VM.
      boolean isEnum()
      Determine if this class was declared as an enum.
      ObjectReference newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Constructs a new instance of this type, using the given constructor Method in the target VM.
      void setValue(Field field, Value value)
      Assigns a value to a static field.
      List<ClassType> subclasses()
      Gets the currently loaded, direct subclasses of this class.
      ClassType superclass()
      Gets the superclass of this class.

      • Methods inherited from interface com.sun.jdi.ReferenceType

        allFields, allLineLocations, allLineLocations, allMethods, availableStrata, classLoader, classObject, constantPool, constantPoolCount, defaultStratum, equals, failedToInitialize, fieldByName, fields, genericSignature, getValue, getValues, hashCode, instances, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, locationsOfLine, majorVersion, methods, methodsByName, methodsByName, minorVersion, name, nestedTypes, sourceDebugExtension, sourceName, sourceNames, sourcePaths, visibleFields, visibleMethods

      • Methods inherited from interface com.sun.jdi.Type

        signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

    • Field Detail

      • INVOKE_SINGLE_THREADED

        static final int INVOKE_SINGLE_THREADED
        Perform method invocation with only the invoking thread resumed
        See Also:
        Constant Field Values

    • Method Detail

      • superclass

        ClassType superclass()
        Gets the superclass of this class.
        Returns:
        a ClassType that mirrors the superclass of this class in the target VM. If no such class exists, returns null

      • interfaces

        List<InterfaceType> interfaces()
        Gets the interfaces directly implemented by this class. Only the interfaces that are declared with the "implements" keyword in this class are included.
        Returns:
        a List of InterfaceType objects each mirroring a direct interface this ClassType in the target VM. If none exist, returns a zero length List.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • allInterfaces

        List<InterfaceType> allInterfaces()
        Gets the interfaces directly and indirectly implemented by this class. Interfaces returned by interfaces() are returned as well all superinterfaces.
        Returns:
        a List of InterfaceType objects each mirroring an interface of this ClassType in the target VM. If none exist, returns a zero length List.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • subclasses

        List<ClassType> subclasses()
        Gets the currently loaded, direct subclasses of this class. No ordering of this list is guaranteed.
        Returns:
        a List of ClassType objects each mirroring a loaded subclass of this class in the target VM. If no such classes exist, this method returns a zero-length list.

      • isEnum

        boolean isEnum()
        Determine if this class was declared as an enum.
        Returns:
        true if this class was declared as an enum; false otherwise.

      • setValue

        void setValue(Field field,
              Value value)
       throws InvalidTypeException,
              ClassNotLoadedException
        Assigns a value to a static field. The Field must be valid for this ClassType; that is, it must be from the mirrored object's class or a superclass of that class. The field must not be final.

        Object values must be assignment compatible with the field type (This implies that the field type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the field type or must be convertible to the field type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Parameters:
        field - the field to set.
        value - the value to be assigned.
        Throws:
        IllegalArgumentException - if the field is not static, the field is final, or the field does not exist in this class.
        ClassNotLoadedException - if the field type has not yet been loaded through the appropriate class loader.
        InvalidTypeException - if the value's type does not match the field's declared type.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • invokeMethod

        Value invokeMethod(ThreadReference thread,
                   Method method,
                   List<? extends Value> arguments,
                   int options)
            throws InvalidTypeException,
                   ClassNotLoadedException,
                   IncompatibleThreadStateException,
                   InvocationException
        Invokes the specified static Method in the target VM. The specified method can be defined in this class, or in a superclass. The method must be a static method but not a static initializer. Use newInstance(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List<? extends com.sun.jdi.Value>, int) to create a new object and run its constructor.

        The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event which occurred in that thread. Method invocation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

        The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; this method does not return until the invoked method returns in the target VM. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

        Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. If the method being called accepts a variable number of arguments, then the last argument type is an array of some component type. The argument in the matching position can be omitted, or can be null, an array of the same component type, or an argument of the component type followed by any number of other arguments of the same type. If the argument is omitted, then a 0 length array of the component type is passed. The component type can be a primitive type. Autoboxing is not supported. See Section 5.2 of The Java™ Language Specification for more information on assignment compatibility.

        By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation and thus a deadlock could still occur. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation. It is possible that breakpoints or other events might occur during the invocation. This can cause deadlocks as described above. It can also cause a deadlock if invokeMethod is called from the client's event handler thread. In this case, this thread will be waiting for the invokeMethod to complete and won't read the EventSet that comes in for the new event. If this new EventSet is SUSPEND_ALL, then a deadlock will occur because no one will resume the EventSet. To avoid this, all EventRequests should be disabled before doing the invokeMethod, or the invokeMethod should not be done from the client's event handler thread.

        The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

        If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

        Parameters:
        thread - the thread in which to invoke.
        method - the Method to invoke.
        arguments - the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.
        options - the integer bit flag options.
        Returns:
        a Value mirror of the invoked method's return value.
        Throws:
        IllegalArgumentException - if the method is not a member of this class or a superclass, if the size of the argument list does not match the number of declared arguemnts for the method, or if the method is an initializer, constructor or static intializer.
        {@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
        ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
        IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
        InvocationException - if the method invocation resulted in an exception in the target VM.
        InvalidTypeException - If the arguments do not meet this requirement -- Object arguments must be assignment compatible with the argument type. This implies that the argument type must be loaded through the enclosing class's class loader. Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • newInstance

        ObjectReference newInstance(ThreadReference thread,
                            Method method,
                            List<? extends Value> arguments,
                            int options)
                     throws InvalidTypeException,
                            ClassNotLoadedException,
                            IncompatibleThreadStateException,
                            InvocationException
        Constructs a new instance of this type, using the given constructor Method in the target VM. The specified constructor must be defined in this class.

        Instance creation will occur in the specified thread. Instance creation can occur only if the specified thread has been suspended by an event which occurred in that thread. Instance creation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

        The specified constructor is invoked with the arguments in the specified argument list. The invocation is synchronous; this method does not return until the constructor returns in the target VM. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

        Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. If the method being called accepts a variable number of arguments, then the last argument type is an array of some component type. The argument in the matching position can be omitted, or can be null, an array of the same component type, or an argument of the component type, followed by any number of other arguments of the same type. If the argument is omitted, then a 0 length array of the component type is passed. The component type can be a primitive type. Autoboxing is not supported. See section 5.2 of The Java™ Language Specification for more information on assignment compatibility.

        By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

        The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

        If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

        Parameters:
        thread - the thread in which to invoke.
        method - the constructor Method to invoke.
        arguments - the list of Value arguments bound to the invoked constructor. Values from the list are assigned to arguments in the order they appear in the constructor signature.
        options - the integer bit flag options.
        Returns:
        an ObjectReference mirror of the newly created object.
        Throws:
        IllegalArgumentException - if the method is not a member of this class, if the size of the argument list does not match the number of declared arguments for the constructor, or if the method is not a constructor.
        {@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
        ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
        IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
        InvocationException - if the method invocation resulted in an exception in the target VM.
        InvalidTypeException - If the arguments do not meet this requirement -- Object arguments must be assignment compatible with the argument type. This implies that the argument type must be loaded through the enclosing class's class loader. Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • concreteMethodByName

        Method concreteMethodByName(String name,
                            String signature)
        Returns a the single non-abstract Method visible from this class that has the given name and signature. See ReferenceType.methodsByName(java.lang.String, java.lang.String) for information on signature format.

        The returned method (if non-null) is a component of ClassType.

        Parameters:
        name - the name of the method to find.
        signature - the signature of the method to find
        Returns:
        the Method that matches the given name and signature or null if there is no match.
        Throws:
        ClassNotPreparedException - if methods are not yet available because the class has not yet been prepared.
        See Also:
        ReferenceType.visibleMethods(),
ReferenceType.methodsByName(java.lang.String name),
ReferenceType.methodsByName(java.lang.String name, java.lang.String signature)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


connect

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.jdi.connect

This package defines connections between the virtual machine using the JDI and the target virtual machine.

See: Description

  • Interface Summary
    Interface Description
    AttachingConnector
    A connector which attaches to a previously running target VM.
    Connector
    A method of connection between a debugger and a target VM.
    Connector.Argument
    Specification for and value of a Connector argument.
    Connector.BooleanArgument
    Specification for and value of a Connector argument, whose value is Boolean.
    Connector.IntegerArgument
    Specification for and value of a Connector argument, whose value is an integer.
    Connector.SelectedArgument
    Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
    Connector.StringArgument
    Specification for and value of a Connector argument, whose value is a String.
    LaunchingConnector
    A connector which can launch a target VM before connecting to it.
    ListeningConnector
    A connector which listens for a connection initiated by a target VM.
    Transport
    A method of communication between a debugger and a target VM.
  • Exception Summary
    Exception Description
    IllegalConnectorArgumentsException
    Thrown to indicate an invalid argument or inconsistent passed to a Connector.
    TransportTimeoutException
    This exception may be thrown as a result of a timeout when attaching to a target VM, or waiting to accept a connection from a target VM.
    VMStartException
    A target VM was successfully launched, but terminated with an error before a connection could be established.

Package com.sun.jdi.connect Description

This package defines connections between the virtual machine using the JDI and the target virtual machine. In concert with VirtualMachineManager it is the mechanism for launching, attaching, etc to target virtual machines.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.jdi.connect Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.jdi.connect

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • com.sun.jdi.connect.IllegalConnectorArgumentsException
        • java.io.IOException
          • com.sun.jdi.connect.TransportTimeoutException
        • com.sun.jdi.connect.VMStartException

Interface Hierarchy

  • com.sun.jdi.connect.Connector
    • com.sun.jdi.connect.AttachingConnector
    • com.sun.jdi.connect.LaunchingConnector
    • com.sun.jdi.connect.ListeningConnector
  • java.io.Serializable
    • com.sun.jdi.connect.Connector.Argument
      • com.sun.jdi.connect.Connector.BooleanArgument
      • com.sun.jdi.connect.Connector.IntegerArgument
      • com.sun.jdi.connect.Connector.SelectedArgument
      • com.sun.jdi.connect.Connector.StringArgument
  • com.sun.jdi.connect.Transport
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.jdi.connect

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.jdi.connect

  • Packages that use com.sun.jdi.connect
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.
  • Classes in com.sun.jdi.connect used by com.sun.jdi
    Class and Description
    AttachingConnector
    A connector which attaches to a previously running target VM.
    Connector
    A method of connection between a debugger and a target VM.
    LaunchingConnector
    A connector which can launch a target VM before connecting to it.
    ListeningConnector
    A connector which listens for a connection initiated by a target VM.
  • Classes in com.sun.jdi.connect used by com.sun.jdi.connect
    Class and Description
    Connector
    A method of connection between a debugger and a target VM.
    Connector.Argument
    Specification for and value of a Connector argument.
    IllegalConnectorArgumentsException
    Thrown to indicate an invalid argument or inconsistent passed to a Connector.
    Transport
    A method of communication between a debugger and a target VM.
    VMStartException
    A target VM was successfully launched, but terminated with an error before a connection could be established.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


AttachingConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface AttachingConnector

  • All Superinterfaces:
    Connector

    @Exported
public interface AttachingConnector
extends Connector
    A connector which attaches to a previously running target VM.
    Since:
    1.3

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jdi.connect.Connector

        Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      VirtualMachine attach(Map<String,? extends Connector.Argument> arguments)
      Attaches to a running application and and returns a mirror of its VM.

      • Methods inherited from interface com.sun.jdi.connect.Connector

        defaultArguments, description, name, transport

    • Method Detail

      • attach

        VirtualMachine attach(Map<String,? extends Connector.Argument> arguments)
               throws IOException,
                      IllegalConnectorArgumentsException
        Attaches to a running application and and returns a mirror of its VM.

        The connector uses the given argument map in attaching the application. These arguments will include addressing information that identifies the VM. The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

        Parameters:
        arguments - the argument map to be used in launching the VM.
        Returns:
        the VirtualMachine mirror of the target VM.
        Throws:
        TransportTimeoutException - when the Connector encapsulates a transport that supports a timeout when attaching, a Connector.Argument representing a timeout has been set in the argument map, and a timeout occurs when trying to attach to the target VM.
        IOException - when unable to attach. Specific exceptions are dependent on the Connector implementation in use.
        IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.IllegalConnectorArgumentsException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.IllegalConnectorArgumentsException

  • Packages that use IllegalConnectorArgumentsException
    Package Description
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of IllegalConnectorArgumentsException in com.sun.jdi.connect

      Methods in com.sun.jdi.connect that throw IllegalConnectorArgumentsException
      Modifier and Type Method and Description
      VirtualMachine ListeningConnector.accept(Map<String,? extends Connector.Argument> arguments)
      Waits for a target VM to attach to this connector.
      VirtualMachine AttachingConnector.attach(Map<String,? extends Connector.Argument> arguments)
      Attaches to a running application and and returns a mirror of its VM.
      VirtualMachine LaunchingConnector.launch(Map<String,? extends Connector.Argument> arguments)
      Launches an application and connects to its VM.
      String ListeningConnector.startListening(Map<String,? extends Connector.Argument> arguments)
      Listens for one or more connections initiated by target VMs.
      void ListeningConnector.stopListening(Map<String,? extends Connector.Argument> arguments)
      Cancels listening for connections.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.TransportTimeoutException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.TransportTimeoutException

No usage of com.sun.jdi.connect.TransportTimeoutException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.VMStartException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.VMStartException

  • Packages that use VMStartException
    Package Description
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of VMStartException in com.sun.jdi.connect

      Methods in com.sun.jdi.connect that throw VMStartException
      Modifier and Type Method and Description
      VirtualMachine LaunchingConnector.launch(Map<String,? extends Connector.Argument> arguments)
      Launches an application and connects to its VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.AttachingConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.AttachingConnector

  • Packages that use AttachingConnector
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of AttachingConnector in com.sun.jdi

      Methods in com.sun.jdi that return types with arguments of type AttachingConnector
      Modifier and Type Method and Description
      List<AttachingConnector> VirtualMachineManager.attachingConnectors()
      Returns the list of known AttachingConnector objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector

  • Packages that use Connector
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of Connector in com.sun.jdi

      Methods in com.sun.jdi that return types with arguments of type Connector
      Modifier and Type Method and Description
      List<Connector> VirtualMachineManager.allConnectors()
      Returns the list of all known Connector objects.

    • Uses of Connector in com.sun.jdi.connect

      Subinterfaces of Connector in com.sun.jdi.connect
      Modifier and Type Interface and Description
      interface  AttachingConnector
      A connector which attaches to a previously running target VM.
      interface  LaunchingConnector
      A connector which can launch a target VM before connecting to it.
      interface  ListeningConnector
      A connector which listens for a connection initiated by a target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector.Argument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector.Argument

  • Packages that use Connector.Argument
    Package Description
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of Connector.Argument in com.sun.jdi.connect

      Subinterfaces of Connector.Argument in com.sun.jdi.connect
      Modifier and Type Interface and Description
      static interface  Connector.BooleanArgument
      Specification for and value of a Connector argument, whose value is Boolean.
      static interface  Connector.IntegerArgument
      Specification for and value of a Connector argument, whose value is an integer.
      static interface  Connector.SelectedArgument
      Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
      static interface  Connector.StringArgument
      Specification for and value of a Connector argument, whose value is a String.
      Methods in com.sun.jdi.connect that return types with arguments of type Connector.Argument
      Modifier and Type Method and Description
      Map<String,Connector.Argument> Connector.defaultArguments()
      Returns the arguments accepted by this Connector and their default values.
      Method parameters in com.sun.jdi.connect with type arguments of type Connector.Argument
      Modifier and Type Method and Description
      VirtualMachine ListeningConnector.accept(Map<String,? extends Connector.Argument> arguments)
      Waits for a target VM to attach to this connector.
      VirtualMachine AttachingConnector.attach(Map<String,? extends Connector.Argument> arguments)
      Attaches to a running application and and returns a mirror of its VM.
      VirtualMachine LaunchingConnector.launch(Map<String,? extends Connector.Argument> arguments)
      Launches an application and connects to its VM.
      String ListeningConnector.startListening(Map<String,? extends Connector.Argument> arguments)
      Listens for one or more connections initiated by target VMs.
      void ListeningConnector.stopListening(Map<String,? extends Connector.Argument> arguments)
      Cancels listening for connections.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector.BooleanArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector.BooleanArgument

No usage of com.sun.jdi.connect.Connector.BooleanArgument
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector.IntegerArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector.IntegerArgument

No usage of com.sun.jdi.connect.Connector.IntegerArgument
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector.SelectedArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector.SelectedArgument

No usage of com.sun.jdi.connect.Connector.SelectedArgument
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Connector.StringArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Connector.StringArgument

No usage of com.sun.jdi.connect.Connector.StringArgument
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.LaunchingConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.LaunchingConnector

  • Packages that use LaunchingConnector
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of LaunchingConnector in com.sun.jdi

      Methods in com.sun.jdi that return LaunchingConnector
      Modifier and Type Method and Description
      LaunchingConnector VirtualMachineManager.defaultConnector()
      Identifies the default connector.
      Methods in com.sun.jdi that return types with arguments of type LaunchingConnector
      Modifier and Type Method and Description
      List<LaunchingConnector> VirtualMachineManager.launchingConnectors()
      Returns the list of known LaunchingConnector objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.ListeningConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.ListeningConnector

  • Packages that use ListeningConnector
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of ListeningConnector in com.sun.jdi

      Methods in com.sun.jdi that return types with arguments of type ListeningConnector
      Modifier and Type Method and Description
      List<ListeningConnector> VirtualMachineManager.listeningConnectors()
      Returns the list of known ListeningConnector objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.connect.Transport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.connect.Transport

  • Packages that use Transport
    Package Description
    com.sun.jdi.connect
    This package defines connections between the virtual machine using the JDI and the target virtual machine.

    • Uses of Transport in com.sun.jdi.connect

      Methods in com.sun.jdi.connect that return Transport
      Modifier and Type Method and Description
      Transport Connector.transport()
      Returns the transport mechanism used by this connector to establish connections with a target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector

  • All Known Subinterfaces:
    AttachingConnector, LaunchingConnector, ListeningConnector

    @Exported
public interface Connector
    A method of connection between a debugger and a target VM. A connector encapsulates exactly one Transport. used to establish the connection. Each connector has a set of arguments which controls its operation. The arguments are stored as a map, keyed by a string. Each implementation defines the string argument keys it accepts.
    Since:
    1.3
    See Also:
    LaunchingConnector, AttachingConnector, ListeningConnector, Connector.Argument

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface and Description
      static interface  Connector.Argument
      Specification for and value of a Connector argument.
      static interface  Connector.BooleanArgument
      Specification for and value of a Connector argument, whose value is Boolean.
      static interface  Connector.IntegerArgument
      Specification for and value of a Connector argument, whose value is an integer.
      static interface  Connector.SelectedArgument
      Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
      static interface  Connector.StringArgument
      Specification for and value of a Connector argument, whose value is a String.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Map<String,Connector.Argument> defaultArguments()
      Returns the arguments accepted by this Connector and their default values.
      String description()
      Returns a human-readable description of this connector and its purpose.
      String name()
      Returns a short identifier for the connector.
      Transport transport()
      Returns the transport mechanism used by this connector to establish connections with a target VM.

    • Method Detail

      • name

        String name()
        Returns a short identifier for the connector. Connector implementors should follow similar naming conventions as are used with packages to avoid name collisions. For example, the Sun connector implementations have names prefixed with "com.sun.jdi.". Not intended for exposure to end-user.
        Returns:
        the name of this connector.

      • description

        String description()
        Returns a human-readable description of this connector and its purpose.
        Returns:
        the description of this connector

      • transport

        Transport transport()
        Returns the transport mechanism used by this connector to establish connections with a target VM.
        Returns:
        the Transport used by this connector.

      • defaultArguments

        Map<String,Connector.Argument> defaultArguments()
        Returns the arguments accepted by this Connector and their default values. The keys of the returned map are string argument names. The values are Connector.Argument containing information about the argument and its default value.
        Returns:
        the map associating argument names with argument information and default value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector.Argument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector.Argument

  • All Superinterfaces:
    Serializable
    All Known Subinterfaces:
    Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
    Enclosing interface:
    Connector

    @Exported
public static interface Connector.Argument
extends Serializable
    Specification for and value of a Connector argument. Will always implement a subinterface of Argument: Connector.StringArgument, Connector.BooleanArgument, Connector.IntegerArgument, or Connector.SelectedArgument.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String description()
      Returns a human-readable description of this argument and its purpose.
      boolean isValid(String value)
      Performs basic sanity check of argument.
      String label()
      Returns a short human-readable label for this argument.
      boolean mustSpecify()
      Indicates whether the argument must be specified.
      String name()
      Returns a short, unique identifier for the argument.
      void setValue(String value)
      Sets the value of the argument.
      String value()
      Returns the current value of the argument.

    • Method Detail

      • name

        String name()
        Returns a short, unique identifier for the argument. Not intended for exposure to end-user.
        Returns:
        the name of this argument.

      • label

        String label()
        Returns a short human-readable label for this argument.
        Returns:
        a label for this argument

      • description

        String description()
        Returns a human-readable description of this argument and its purpose.
        Returns:
        the description of this argument

      • value

        String value()
        Returns the current value of the argument. Initially, the default value is returned. If the value is currently unspecified, null is returned.
        Returns:
        the current value of the argument.

      • setValue

        void setValue(String value)
        Sets the value of the argument. The value should be checked with isValid(String) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector.launch(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>)

      • isValid

        boolean isValid(String value)
        Performs basic sanity check of argument.
        Returns:
        true if the value is valid to be used in setValue(String)

      • mustSpecify

        boolean mustSpecify()
        Indicates whether the argument must be specified. If true, setValue(java.lang.String) must be used to set a non-null value before using this argument in establishing a connection.
        Returns:
        true if the argument must be specified; false otherwise.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector.BooleanArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector.BooleanArgument

  • All Superinterfaces:
    Connector.Argument, Serializable
    Enclosing interface:
    Connector

    @Exported
public static interface Connector.BooleanArgument
extends Connector.Argument
    Specification for and value of a Connector argument, whose value is Boolean. Boolean values are represented by the localized versions of the strings "true" and "false".

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean booleanValue()
      Return the value of the argument as a boolean.
      boolean isValid(String value)
      Performs basic sanity check of argument.
      void setValue(boolean value)
      Sets the value of the argument.
      String stringValueOf(boolean value)
      Return the string representation of the value parameter.

      • Methods inherited from interface com.sun.jdi.connect.Connector.Argument

        description, label, mustSpecify, name, setValue, value

    • Method Detail

      • setValue

        void setValue(boolean value)
        Sets the value of the argument.

      • isValid

        boolean isValid(String value)
        Performs basic sanity check of argument.
        Specified by:
        isValid in interface Connector.Argument
        Returns:
        true if value is a string representation of a boolean value.
        See Also:
        stringValueOf(boolean)

      • stringValueOf

        String stringValueOf(boolean value)
        Return the string representation of the value parameter. Does not set or examine the current value of this instance.
        Returns:
        the localized String representation of the boolean value.

      • booleanValue

        boolean booleanValue()
        Return the value of the argument as a boolean. Since the argument may not have been set or may have an invalid value isValid(String) should be called on Connector.Argument.value() to check its validity. If it is invalid the boolean returned by this method is undefined.
        Returns:
        the value of the argument as a boolean.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector.IntegerArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector.IntegerArgument

  • All Superinterfaces:
    Connector.Argument, Serializable
    Enclosing interface:
    Connector

    @Exported
public static interface Connector.IntegerArgument
extends Connector.Argument
    Specification for and value of a Connector argument, whose value is an integer. Integer values are represented by their corresponding strings.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      int intValue()
      Return the value of the argument as a int.
      boolean isValid(int value)
      Performs basic sanity check of argument.
      boolean isValid(String value)
      Performs basic sanity check of argument.
      int max()
      The upper bound for the value.
      int min()
      The lower bound for the value.
      void setValue(int value)
      Sets the value of the argument.
      String stringValueOf(int value)
      Return the string representation of the value parameter.

      • Methods inherited from interface com.sun.jdi.connect.Connector.Argument

        description, label, mustSpecify, name, setValue, value

    • Method Detail

      • setValue

        void setValue(int value)
        Sets the value of the argument. The value should be checked with isValid(int) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector.launch(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>)

      • isValid

        boolean isValid(String value)
        Performs basic sanity check of argument.
        Specified by:
        isValid in interface Connector.Argument
        Returns:
        true if value represents an int that is min() <= value <= max()

      • isValid

        boolean isValid(int value)
        Performs basic sanity check of argument.
        Returns:
        true if min() <= value <= max()

      • stringValueOf

        String stringValueOf(int value)
        Return the string representation of the value parameter. Does not set or examine the current value of this instance.
        Returns:
        the String representation of the int value.

      • intValue

        int intValue()
        Return the value of the argument as a int. Since the argument may not have been set or may have an invalid value isValid(String) should be called on Connector.Argument.value() to check its validity. If it is invalid the int returned by this method is undefined.
        Returns:
        the value of the argument as a int.

      • max

        int max()
        The upper bound for the value.
        Returns:
        the maximum allowed value for this argument.

      • min

        int min()
        The lower bound for the value.
        Returns:
        the minimum allowed value for this argument.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector.SelectedArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector.SelectedArgument

  • All Superinterfaces:
    Connector.Argument, Serializable
    Enclosing interface:
    Connector

    @Exported
public static interface Connector.SelectedArgument
extends Connector.Argument
    Specification for and value of a Connector argument, whose value is a String selected from a list of choices.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<String> choices()
      Return the possible values for the argument
      boolean isValid(String value)
      Performs basic sanity check of argument.

      • Methods inherited from interface com.sun.jdi.connect.Connector.Argument

        description, label, mustSpecify, name, setValue, value

    • Method Detail

      • choices

        List<String> choices()
        Return the possible values for the argument
        Returns:
        List of String

      • isValid

        boolean isValid(String value)
        Performs basic sanity check of argument.
        Specified by:
        isValid in interface Connector.Argument
        Returns:
        true if value is one of choices().
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connector.StringArgument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Connector.StringArgument

  • All Superinterfaces:
    Connector.Argument, Serializable
    Enclosing interface:
    Connector

    @Exported
public static interface Connector.StringArgument
extends Connector.Argument
    Specification for and value of a Connector argument, whose value is a String.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean isValid(String value)
      Performs basic sanity check of argument.

      • Methods inherited from interface com.sun.jdi.connect.Connector.Argument

        description, label, mustSpecify, name, setValue, value

    • Method Detail

      • isValid

        boolean isValid(String value)
        Performs basic sanity check of argument.
        Specified by:
        isValid in interface Connector.Argument
        Returns:
        true always
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


IllegalConnectorArgumentsException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Class IllegalConnectorArgumentsException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.connect.IllegalConnectorArgumentsException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class IllegalConnectorArgumentsException
extends Exception
    Thrown to indicate an invalid argument or inconsistent passed to a Connector.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      IllegalConnectorArgumentsException(String s, List<String> names)
      Construct an IllegalConnectorArgumentsException with the specified detail message and a List of names of arguments which are invalid or inconsistent.
      IllegalConnectorArgumentsException(String s, String name)
      Construct an IllegalConnectorArgumentsException with the specified detail message and the name of the argument which is invalid or inconsistent.

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      List<String> argumentNames()
      Return a List containing the names of the invalid or inconsistent arguments.

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • IllegalConnectorArgumentsException

        public IllegalConnectorArgumentsException(String s,
                                          String name)
        Construct an IllegalConnectorArgumentsException with the specified detail message and the name of the argument which is invalid or inconsistent.
        Parameters:
        s - the detailed message.
        name - the name of the invalid or inconsistent argument.

      • IllegalConnectorArgumentsException

        public IllegalConnectorArgumentsException(String s,
                                          List<String> names)
        Construct an IllegalConnectorArgumentsException with the specified detail message and a List of names of arguments which are invalid or inconsistent.
        Parameters:
        s - the detailed message.
        names - a List containing the names of the invalid or inconsistent argument.

    • Method Detail

      • argumentNames

        public List<String> argumentNames()
        Return a List containing the names of the invalid or inconsistent arguments.
        Returns:
        a List of argument names.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


LaunchingConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface LaunchingConnector

  • All Superinterfaces:
    Connector

    @Exported
public interface LaunchingConnector
extends Connector
    A connector which can launch a target VM before connecting to it.
    Since:
    1.3

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jdi.connect.Connector

        Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      VirtualMachine launch(Map<String,? extends Connector.Argument> arguments)
      Launches an application and connects to its VM.

      • Methods inherited from interface com.sun.jdi.connect.Connector

        defaultArguments, description, name, transport

    • Method Detail

      • launch

        VirtualMachine launch(Map<String,? extends Connector.Argument> arguments)
               throws IOException,
                      IllegalConnectorArgumentsException,
                      VMStartException
        Launches an application and connects to its VM. Properties of the launch (possibly including options, main class, and arguments) are specified in arguments. The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

        A target VM launched by a launching connector is not guaranteed to be stable until after the VMStartEvent has been received.

        Important note: If a target VM is launched through this funcctions, its output and error streams must be read as it executes. These streams are available through the Process object returned by VirtualMachine.process(). If the streams are not periodically read, the target VM will stop executing when the buffers for these streams are filled.

        Parameters:
        arguments - the argument map to be used in launching the VM.
        Returns:
        the VirtualMachine mirror of the target VM.
        Throws:
        IOException - when unable to launch. Specific exceptions are dependent on the Connector implementation in use.
        IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
        VMStartException - when the VM was successfully launched, but terminated with an error before a connection could be established.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ListeningConnector

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface ListeningConnector

  • All Superinterfaces:
    Connector

    @Exported
public interface ListeningConnector
extends Connector
    A connector which listens for a connection initiated by a target VM.
    Since:
    1.3

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jdi.connect.Connector

        Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      VirtualMachine accept(Map<String,? extends Connector.Argument> arguments)
      Waits for a target VM to attach to this connector.
      String startListening(Map<String,? extends Connector.Argument> arguments)
      Listens for one or more connections initiated by target VMs.
      void stopListening(Map<String,? extends Connector.Argument> arguments)
      Cancels listening for connections.
      boolean supportsMultipleConnections()
      Indicates whether this listening connector supports multiple connections for a single argument map.

      • Methods inherited from interface com.sun.jdi.connect.Connector

        defaultArguments, description, name, transport

    • Method Detail

      • supportsMultipleConnections

        boolean supportsMultipleConnections()
        Indicates whether this listening connector supports multiple connections for a single argument map. If so, a call to startListening(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>) may allow multiple target VM to become connected.
        Returns:
        true if multiple connections are supported; false otherwise.

      • startListening

        String startListening(Map<String,? extends Connector.Argument> arguments)
               throws IOException,
                      IllegalConnectorArgumentsException
        Listens for one or more connections initiated by target VMs. The connector uses the given argument map in determining the address at which to listen or else it generates an appropriate listen address. In either case, an address string is returned from this method which can be used in starting target VMs to identify this connector. The format of the address string is connector, transport, and, possibly, platform dependent.

        The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

        This method does not return a VirtualMachine, and, normally, returns before any target VM initiates a connection. The connected target is obtained through accept(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>) (using the same argument map as is passed to this method).

        If arguments contains addressing information. and only one connection will be accepted, the accept method can be called immediately without calling this method.

        Returns:
        the address at which the connector is listening for a connection.
        Throws:
        IOException - when unable to start listening. Specific exceptions are dependent on the Connector implementation in use.
        IllegalConnectorArgumentsException - when one of the connector arguments is invalid.

      • stopListening

        void stopListening(Map<String,? extends Connector.Argument> arguments)
            throws IOException,
                   IllegalConnectorArgumentsException
        Cancels listening for connections. The given argument map should match the argument map given for a previous startListening(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>) invocation.
        Throws:
        IOException - when unable to stop listening. Specific exceptions are dependent on the Connector implementation in use.
        IllegalConnectorArgumentsException - when one of the connector arguments is invalid.

      • accept

        VirtualMachine accept(Map<String,? extends Connector.Argument> arguments)
               throws IOException,
                      IllegalConnectorArgumentsException
        Waits for a target VM to attach to this connector.
        Throws:
        TransportTimeoutException - when the Connector encapsulates a transport that supports a timeout when accepting, a Connector.Argument representing a timeout has been set in the argument map, and a timeout occurs whilst waiting for the target VM to connect.
        IOException - when unable to accept. Specific exceptions are dependent on the Connector implementation in use.
        IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.jdi.connect.spi

This package comprises the interfaces and classes used to develop new TransportService implementations.

See: Description

  • Class Summary
    Class Description
    Connection
    A connection between a debugger and a target VM which it debugs.
    TransportService
    A transport service for connections between a debugger and a target VM.
    TransportService.Capabilities
    The transport service capabilities.
    TransportService.ListenKey
    A listen key.
  • Exception Summary
    Exception Description
    ClosedConnectionException
    This exception may be thrown as a result of an asynchronous close of a Connection while an I/O operation is in progress.

Package com.sun.jdi.connect.spi Description

This package comprises the interfaces and classes used to develop new TransportService implementations.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.jdi.connect.spi Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.jdi.connect.spi

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • com.sun.jdi.connect.spi.Connection
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • com.sun.jdi.connect.spi.ClosedConnectionException
    • com.sun.jdi.connect.spi.TransportService
    • com.sun.jdi.connect.spi.TransportService.Capabilities
    • com.sun.jdi.connect.spi.TransportService.ListenKey
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.jdi.connect.spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.jdi.connect.spi

  • Packages that use com.sun.jdi.connect.spi
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect.spi
    This package comprises the interfaces and classes used to develop new TransportService implementations.
  • Classes in com.sun.jdi.connect.spi used by com.sun.jdi
    Class and Description
    Connection
    A connection between a debugger and a target VM which it debugs.
  • Classes in com.sun.jdi.connect.spi used by com.sun.jdi.connect.spi
    Class and Description
    Connection
    A connection between a debugger and a target VM which it debugs.
    TransportService.Capabilities
    The transport service capabilities.
    TransportService.ListenKey
    A listen key.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.spi.ClosedConnectionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.spi.ClosedConnectionException

No usage of com.sun.jdi.connect.spi.ClosedConnectionException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.spi.Connection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.spi.Connection

  • Packages that use Connection
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.connect.spi
    This package comprises the interfaces and classes used to develop new TransportService implementations.

    • Uses of Connection in com.sun.jdi

      Methods in com.sun.jdi with parameters of type Connection
      Modifier and Type Method and Description
      VirtualMachine VirtualMachineManager.createVirtualMachine(Connection connection)
      Creates a new virtual machine.
      VirtualMachine VirtualMachineManager.createVirtualMachine(Connection connection, Process process)
      Create a virtual machine mirror for a target VM.

    • Uses of Connection in com.sun.jdi.connect.spi

      Methods in com.sun.jdi.connect.spi that return Connection
      Modifier and Type Method and Description
      abstract Connection TransportService.accept(TransportService.ListenKey listenKey, long acceptTimeout, long handshakeTimeout)
      Accept a connection from a target VM.
      abstract Connection TransportService.attach(String address, long attachTimeout, long handshakeTimeout)
      Attaches to the specified address.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.spi.TransportService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.spi.TransportService

No usage of com.sun.jdi.connect.spi.TransportService
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.spi.TransportService.Capabilities

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.spi.TransportService.Capabilities

  • Packages that use TransportService.Capabilities
    Package Description
    com.sun.jdi.connect.spi
    This package comprises the interfaces and classes used to develop new TransportService implementations.

    • Uses of TransportService.Capabilities in com.sun.jdi.connect.spi

      Methods in com.sun.jdi.connect.spi that return TransportService.Capabilities
      Modifier and Type Method and Description
      abstract TransportService.Capabilities TransportService.capabilities()
      Returns the capabilities of the transport service.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.connect.spi.TransportService.ListenKey

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.connect.spi.TransportService.ListenKey

  • Packages that use TransportService.ListenKey
    Package Description
    com.sun.jdi.connect.spi
    This package comprises the interfaces and classes used to develop new TransportService implementations.

    • Uses of TransportService.ListenKey in com.sun.jdi.connect.spi

      Methods in com.sun.jdi.connect.spi that return TransportService.ListenKey
      Modifier and Type Method and Description
      abstract TransportService.ListenKey TransportService.startListening()
      Listens on an address chosen by the transport service.
      abstract TransportService.ListenKey TransportService.startListening(String address)
      Listens on the specified address for inbound connections.
      Methods in com.sun.jdi.connect.spi with parameters of type TransportService.ListenKey
      Modifier and Type Method and Description
      abstract Connection TransportService.accept(TransportService.ListenKey listenKey, long acceptTimeout, long handshakeTimeout)
      Accept a connection from a target VM.
      abstract void TransportService.stopListening(TransportService.ListenKey listenKey)
      Stop listening for inbound connections.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClosedConnectionException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect.spi

Class ClosedConnectionException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • com.sun.jdi.connect.spi.ClosedConnectionException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class ClosedConnectionException
extends IOException
    This exception may be thrown as a result of an asynchronous close of a Connection while an I/O operation is in progress.

    When a thread is blocked in readPacket waiting for packet from a target VM the Connection may be closed asynchronous by another thread invokving the close method. When this arises the thread in readPacket will throw this exception. Similiarly when a thread is blocked in Connection.writePacket(byte[]) the Connection may be closed. When this occurs the thread in writePacket will throw this exception.

    Since:
    1.5
    See Also:
    Connection.readPacket(), Connection.writePacket(byte[]), Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ClosedConnectionException()
      Constructs a ClosedConnectionException with no detail message.
      ClosedConnectionException(String message)
      Constructs a ClosedConnectionException with the specified detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ClosedConnectionException

        public ClosedConnectionException()
        Constructs a ClosedConnectionException with no detail message.

      • ClosedConnectionException

        public ClosedConnectionException(String message)
        Constructs a ClosedConnectionException with the specified detail message.
        Parameters:
        message - the detail message pertaining to this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Connection

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect.spi

Class Connection

  • java.lang.Object
    • com.sun.jdi.connect.spi.Connection

  • @Exported
public abstract class Connection
extends Object
    A connection between a debugger and a target VM which it debugs.

    A Connection represents a bi-directional communication channel between a debugger and a target VM. A Connection is created when TransportService establishes a connection and successfully handshakes with a target VM. A TransportService implementation provides a reliable JDWP packet transportation service and consequently a Connection provides a reliable flow of JDWP packets between the debugger and the target VM. A Connection is stream oriented, that is, the JDWP packets written to a connection are read by the target VM in the order in which they were written. Similiarly packets written to a Connection by the target VM are read by the debugger in the order in which they were written.

    A connection is either open or closed. It is open upon creation, and remains open until it is closed. Once closed, it remains closed, and any attempt to invoke an I/O operation upon it will cause a ClosedConnectionException to be thrown. A connection can be tested by invoking the isOpen method.

    A Connection is safe for access by multiple concurrent threads, although at most one thread may be reading and at most one thread may be writing at any given time.

    Since:
    1.5

    • Constructor Summary

      Constructors
      Constructor and Description
      Connection()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract void close()
      Closes this connection.
      abstract boolean isOpen()
      Tells whether or not this connection is open.
      abstract byte[] readPacket()
      Reads a packet from the target VM.
      abstract void writePacket(byte[] pkt)
      Writes a packet to the target VM.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Connection

        public Connection()

    • Method Detail

      • readPacket

        public abstract byte[] readPacket()
                           throws IOException
        Reads a packet from the target VM.

        Attempts to read a JDWP packet from the target VM. A read operation may block indefinitely and only returns when it reads all bytes of a packet, or in the case of a transport service that is based on a stream-oriented communication protocol, the end of stream is encountered.

        Reading a packet does not do any integrity checking on the packet aside from a check that the length of the packet (as indicated by the value of the length field, the first four bytes of the packet) is 11 or more bytes. If the value of the length value is less then 11 then an IOException is thrown.

        Returns a byte array of a length equal to the length of the received packet, or a byte array of length 0 when an end of stream is encountered. If end of stream is encountered after some, but not all bytes of a packet, are read then it is considered an I/O error and an IOException is thrown. The first byte of the packet is stored in element 0 of the byte array, the second in element 1, and so on. The bytes in the byte array are laid out as per the JDWP specification. That is, all fields in the packet are in big endian order as per the JDWP specification.

        This method may be invoked at any time. If another thread has already initiated a readPacket on this connection then the invocation of this method will block until the first operation is complete.

        Returns:
        the packet read from the target VM
        Throws:
        ClosedConnectionException - If the connection is closed, or another thread closes the connection while the readPacket is in progress.
        IOException - If the length of the packet (as indictaed by the first 4 bytes) is less than 11 bytes, or an I/O error occurs.

      • writePacket

        public abstract void writePacket(byte[] pkt)
                          throws IOException
        Writes a packet to the target VM.

        Attempts to write, or send, a JDWP packet to the target VM. A write operation only returns after writing the entire packet to the target VM. Writing the entire packet does not mean the entire packet has been transmitted to the target VM but rather that all bytes have been written to the transport service. A transport service based on a TCP/IP connection may, for example, buffer some or all of the packet before transmission on the network.

        The byte array provided to this method should be laid out as per the JDWP specification. That is, all fields in the packet are in big endian order. The first byte, that is element pkt[0], is the first byte of the length field. pkt[1] is the second byte of the length field, and so on.

        Writing a packet does not do any integrity checking on the packet aside from checking the packet length. Checking the packet length requires checking that the value of the length field (as indicated by the first four bytes of the packet) is 11 or greater. Consequently the length of the byte array provided to this method, that is pkt.length, must be 11 or more, and must be equal or greater than the value of the length field. If the length of the byte array is greater than the value of the length field then all bytes from element pkt[length] onwards are ignored. In other words, any additional bytes that follow the packet in the byte array are ignored and will not be transmitted to the target VM.

        A write operation may block or may complete immediately. The exact circumstances when an operation blocks depends on the transport service. In the case of a TCP/IP connection to the target VM, the writePacket method may block if there is network congestion or there is insufficient space to buffer the packet in the underlying network system.

        This method may be invoked at any time. If another thread has already initiated a write operation upon this Connection then a subsequent invocation of this method will block until the first operation is complete.

        Parameters:
        pkt - The packet to write to the target VM.
        Throws:
        ClosedConnectionException - If the connection is closed, or another thread closes the connection while the write operation is in progress.
        IOException - If an I/O error occurs.
        IllegalArgumentException - If the value of the length field is invalid, or the byte array is of insufficient length.

      • close

        public abstract void close()
                    throws IOException
        Closes this connection.

        If the connection is already closed then invoking this method has no effect. After a connection is closed, any further attempt calls to readPacket or writePacket will throw a ClosedConnectionException.

        Any thread currently blocked in an I/O operation (readPacket or writePacket) will throw a ClosedConnectionException).

        This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.

        Throws:
        IOException - If an I/O error occurs

      • isOpen

        public abstract boolean isOpen()
        Tells whether or not this connection is open.

        Returns:
        true if, and only if, this connection is open
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


TransportService

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect.spi

Class TransportService

  • java.lang.Object
    • com.sun.jdi.connect.spi.TransportService

  • @Exported
public abstract class TransportService
extends Object
    A transport service for connections between a debugger and a target VM.

    A transport service is a concrete subclass of this class that has a zero-argument constructor and implements the abstract methods specified below. It is the underlying service used by a Transport for connections between a debugger and a target VM.

    A transport service is used to establish a connection between a debugger and a target VM, and to transport Java Debug Wire Protocol (JDWP) packets over an underlying communication protocol. In essence a transport service implementation binds JDWP (as specified in the JDWP specification) to an underlying communication protocol. A transport service implementation provides a reliable JDWP packet transportation service. JDWP packets are sent to and from the target VM without duplication or data loss. A transport service implementation may be based on an underlying communication protocol that is reliable or unreliable. If the underlying communication protocol is reliable then the transport service implementation may be relatively simple and may only need to transport JDWP packets as payloads of the underlying communication protocol. In the case of an unreliable communication protocol the transport service implementation may include additional protocol support in order to ensure that packets are not duplicated and that there is no data loss. The details of such protocols are specific to the implementation but may involve techniques such as the positive acknowledgment with retransmission technique used in protocols such as the Transmission Control Protocol (TCP) (see RFC 793 ).

    A transport service can be used to initiate a connection to a target VM. This is done by invoking the attach(java.lang.String, long, long) method. Alternatively, a transport service can listen and accept connections initiated by a target VM. This is done by invoking the startListening(String) method to put the transport into listen mode. Then the accept(com.sun.jdi.connect.spi.TransportService.ListenKey, long, long) method is used to accept a connection initiated by a target VM.

    Since:
    1.5

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class  TransportService.Capabilities
      The transport service capabilities.
      static class  TransportService.ListenKey
      A listen key.

    • Constructor Summary

      Constructors
      Constructor and Description
      TransportService()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract Connection accept(TransportService.ListenKey listenKey, long acceptTimeout, long handshakeTimeout)
      Accept a connection from a target VM.
      abstract Connection attach(String address, long attachTimeout, long handshakeTimeout)
      Attaches to the specified address.
      abstract TransportService.Capabilities capabilities()
      Returns the capabilities of the transport service.
      abstract String description()
      Returns a description of the transport service.
      abstract String name()
      Returns a name to identify the transport service.
      abstract TransportService.ListenKey startListening()
      Listens on an address chosen by the transport service.
      abstract TransportService.ListenKey startListening(String address)
      Listens on the specified address for inbound connections.
      abstract void stopListening(TransportService.ListenKey listenKey)
      Stop listening for inbound connections.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • TransportService

        public TransportService()

    • Method Detail

      • name

        public abstract String name()
        Returns a name to identify the transport service.
        Returns:
        The name of the transport service

      • description

        public abstract String description()
        Returns a description of the transport service.
        Returns:
        The description of the transport service

      • capabilities

        public abstract TransportService.Capabilities capabilities()
        Returns the capabilities of the transport service.
        Returns:
        the transport service capabilities

      • attach

        public abstract Connection attach(String address,
                                  long attachTimeout,
                                  long handshakeTimeout)
                           throws IOException
        Attaches to the specified address.

        Attaches to the specified address and returns a connection representing the bi-directional communication channel to the target VM.

        Attaching to the target VM involves two steps: First, a connection is established to specified address. This is followed by a handshake to ensure that the connection is to a target VM. The handshake involves the exchange of a string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.

        Parameters:
        address - The address of the target VM.
        attachTimeout - If this transport service supports an attach timeout, and if attachTimeout is positive, then it specifies the timeout, in milliseconds (more or less), to use when attaching to the target VM. If the transport service does not support an attach timeout, or if attachTimeout is specified as zero then attach without any timeout.
        handshakeTimeout - If this transport service supports a handshake timeout, and if handshakeTimeout is positive, then it specifies the timeout, in milliseconds (more or less), to use when handshaking with the target VM. The exact usage of the timeout are specific to the transport service. A transport service may, for example, use the handshake timeout as the inter-character timeout while waiting for the JDWP-Handshake message from the target VM. Alternatively, a transport service may, for example, use the handshakeTimeout as a timeout for the duration of the handshake exchange. If the transport service does not support a handshake timeout, or if handshakeTimeout is specified as zero then the handshake does not timeout if there isn't a response from the target VM.
        Returns:
        The Connection representing the bi-directional communication channel to the target VM.
        Throws:
        TransportTimeoutException - If a timeout occurs while establishing the connection.
        IOException - If an I/O error occurs (including a timeout when handshaking).
        IllegalArgumentException - If the address is invalid or the value of the attach timeout or handshake timeout is negative.
        See Also:
        TransportService.Capabilities.supportsAttachTimeout()

      • startListening

        public abstract TransportService.ListenKey startListening(String address)
                                                   throws IOException
        Listens on the specified address for inbound connections.

        This method starts the transport service listening on the specified address so that it can subsequently accept an inbound connection. It does not wait until an inbound connection is established.

        Parameters:
        address - The address to start listening for connections, or null to listen on an address chosen by the transport service.
        Returns:
        a listen key to be used in subsequent calls to be accept or stopListening methods.
        Throws:
        IOException - If an I/O error occurs.
        IllegalArgumentException - If the specific address is invalid

      • startListening

        public abstract TransportService.ListenKey startListening()
                                                   throws IOException
        Listens on an address chosen by the transport service.

        This convenience method works as if by invoking startListening(null).

        Returns:
        a listen key to be used in subsequent calls to be accept or stopListening methods.
        Throws:
        IOException - If an I/O error occurs.

      • stopListening

        public abstract void stopListening(TransportService.ListenKey listenKey)
                            throws IOException
        Stop listening for inbound connections.

        Invoking this method while another thread is blocked in accept, with the same listen key, waiting to accept a connection will cause that thread to throw an IOException. If the thread blocked in accept has already accepted a connection from a target VM and is in the process of handshaking with the target VM then invoking this method will not cause the thread to throw an exception.

        Parameters:
        listenKey - The listen key obtained from a previous call to startListening(String) or startListening().
        Throws:
        IllegalArgumentException - If the listen key is invalid
        IOException - If an I/O error occurs.

      • accept

        public abstract Connection accept(TransportService.ListenKey listenKey,
                                  long acceptTimeout,
                                  long handshakeTimeout)
                           throws IOException
        Accept a connection from a target VM.

        Waits (indefinitely or with timeout) to accept a connection from a target VM. Returns a connection representing the bi-directional communication channel to the target VM.

        Accepting a connection from a target VM involves two steps. First, the transport service waits to accept the connection from the target VM. Once the connection is established a handshake is performed to ensure that the connection is indeed to a target VM. The handshake involves the exchange of a string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.

        Parameters:
        listenKey - A listen key obtained from a previous call to startListening(String) or startListening().
        acceptTimeout - if this transport service supports an accept timeout, and if acceptTimeout is positive then block for up to acceptTimeout milliseconds, more or less, while waiting for the target VM to connect. If the transport service does not support an accept timeout or if acceptTimeout is zero then block indefinitely for a target VM to connect.
        handshakeTimeout - If this transport service supports a handshake timeout, and if handshakeTimeout is positive, then it specifies the timeout, in milliseconds (more or less), to use when handshaking with the target VM. The exact usage of the timeout is specific to the transport service. A transport service may, for example, use the handshake timeout as the inter-character timeout while waiting for the JDWP-Handshake message from the target VM. Alternatively, a transport service may, for example, use the timeout as a timeout for the duration of the handshake exchange. If the transport service does not support a handshake timeout, of if handshakeTimeout is specified as zero then the handshake does not timeout if there isn't a response from the target VM.
        Returns:
        The Connection representing the bi-directional communication channel to the target VM.
        Throws:
        TransportTimeoutException - If a timeout occurs while waiting for a target VM to connect.
        IOException - If an I/O error occurs (including a timeout when handshaking).
        IllegalArgumentException - If the value of the acceptTimeout argument, or handshakeTimeout is negative, or an invalid listen key is provided.
        IllegalStateException - If stopListening has already been called with this listen key and the transport service is no longer listening for inbound connections.
        See Also:
        TransportService.Capabilities.supportsAcceptTimeout()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


TransportService.Capabilities

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect.spi

Class TransportService.Capabilities

  • java.lang.Object
    • com.sun.jdi.connect.spi.TransportService.Capabilities
  • Enclosing class:
    TransportService

    @Exported
public abstract static class TransportService.Capabilities
extends Object
    The transport service capabilities.

    • Constructor Summary

      Constructors
      Constructor and Description
      Capabilities()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract boolean supportsAcceptTimeout()
      Tell whether or not this transport service supports a timeout while waiting for a target VM to connect.
      abstract boolean supportsAttachTimeout()
      Tell whether or not this transport service supports a timeout when attaching to a target VM.
      abstract boolean supportsHandshakeTimeout()
      Tells whether or not this transport service supports a timeout when handshaking with the target VM.
      abstract boolean supportsMultipleConnections()
      Tells whether or not this transport service can support multiple concurrent connections to a single address that it is listening on.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • Capabilities

        public Capabilities()

    • Method Detail

      • supportsMultipleConnections

        public abstract boolean supportsMultipleConnections()
        Tells whether or not this transport service can support multiple concurrent connections to a single address that it is listening on.
        Returns:
        true if, and only if, this transport service supports multiple connections.

      • supportsAttachTimeout

        public abstract boolean supportsAttachTimeout()
        Tell whether or not this transport service supports a timeout when attaching to a target VM.
        Returns:
        true if, and only if, this transport service supports attaching with a timeout.
        See Also:
        TransportService.attach(String,long,long)

      • supportsAcceptTimeout

        public abstract boolean supportsAcceptTimeout()
        Tell whether or not this transport service supports a timeout while waiting for a target VM to connect.
        Returns:
        true if, and only if, this transport service supports timeout while waiting for a target VM to connect.
        See Also:
        TransportService.accept(TransportService.ListenKey,long,long)

      • supportsHandshakeTimeout

        public abstract boolean supportsHandshakeTimeout()
        Tells whether or not this transport service supports a timeout when handshaking with the target VM.
        Returns:
        true if, and only if, this transport service supports a timeout while handshaking with the target VM.
        See Also:
        TransportService.attach(String,long,long), TransportService.accept(TransportService.ListenKey,long,long)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


TransportService.ListenKey

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect.spi

Class TransportService.ListenKey

  • java.lang.Object
    • com.sun.jdi.connect.spi.TransportService.ListenKey
  • Enclosing class:
    TransportService

    @Exported
public abstract static class TransportService.ListenKey
extends Object
    A listen key.

    A TransportService may listen on multiple, yet different, addresses at the same time. To uniquely identify each listener a listen key is created each time that startListening is called. The listen key is used in calls to the accept method to accept inbound connections to that listener. A listen key is valid until it is used as an argument to stopListening to stop the transport service from listening on an address.

    • Constructor Summary

      Constructors
      Constructor and Description
      ListenKey()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      abstract String address()
      Returns a string representation of the listen key.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • ListenKey

        public ListenKey()

    • Method Detail

      • address

        public abstract String address()
        Returns a string representation of the listen key.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Transport

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Interface Transport

  • @Exported
public interface Transport
    A method of communication between a debugger and a target VM.

    A Transport represents the transport mechanism used by a Connector to establish a connection with a target VM. It consists of a name which is obtained by invoking the name() method. Furthermore, a Transport encapsulates a TransportService which is the underlying service used to establish connections and exchange Java Debug Wire Protocol (JDWP) packets with a target VM.

    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String name()
      Returns a short identifier for the transport.

    • Method Detail

      • name

        String name()
        Returns a short identifier for the transport.
        Returns:
        the name of this transport.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


TransportTimeoutException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Class TransportTimeoutException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • com.sun.jdi.connect.TransportTimeoutException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class TransportTimeoutException
extends IOException
    This exception may be thrown as a result of a timeout when attaching to a target VM, or waiting to accept a connection from a target VM.

    When attaching to a target VM, using attach this exception may be thrown if the connector supports a timeout connector argument. Similiarly, when waiting to accept a connection from a target VM, using accept this exception may be thrown if the connector supports a timeout connector argument when accepting.

    In addition, for developers creating TransportService implementations this exception is thrown when attach times out when establishing a connection to a target VM, or accept times out while waiting for a target VM to connect.

    Since:
    1.5
    See Also:
    AttachingConnector.attach(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>),
ListeningConnector.accept(java.util.Map<java.lang.String, ? extends com.sun.jdi.connect.Connector.Argument>),
TransportService.attach(java.lang.String, long, long),
TransportService.accept(com.sun.jdi.connect.spi.TransportService.ListenKey, long, long),
Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      TransportTimeoutException()
      Constructs a TransportTimeoutException with no detail message.
      TransportTimeoutException(String message)
      Constructs a TransportTimeoutException with the specified detail message.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TransportTimeoutException

        public TransportTimeoutException()
        Constructs a TransportTimeoutException with no detail message.

      • TransportTimeoutException

        public TransportTimeoutException(String message)
        Constructs a TransportTimeoutException with the specified detail message.
        Parameters:
        message - the detail message pertaining to this exception.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMStartException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.connect

Class VMStartException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.connect.VMStartException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class VMStartException
extends Exception
    A target VM was successfully launched, but terminated with an error before a connection could be established. This exception provides the Process object for the launched target to help in diagnosing the problem.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      VMStartException(Process process)
      VMStartException(String message, Process process)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      Process process()

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VMStartException

        public VMStartException(Process process)

      • VMStartException

        public VMStartException(String message,
                        Process process)

    • Method Detail

      • process

        public Process process()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


JDI Type Signatures
Type Signature | Java Type
Z | boolean
B | byte
C | char
S | short
I | int
J | long
F | float
D | double
L fully-qualified-class ; | fully-qualified-class
[ type | type[]
( arg-types ) ret-type | method type (including constructors)

For example, the Java method:

    long f (int n, String s, int[] arr);
has the following type signature:

    (ILjava/lang/String;[I)J


DoubleValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface DoubleValue

  • All Superinterfaces:
    Comparable<DoubleValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface DoubleValue
extends PrimitiveValue, Comparable<DoubleValue>
    Provides access to a primitive double value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this DoubleValue for equality.
      int hashCode()
      Returns the hash code value for this DoubleValue.
      double value()
      Returns this DoubleValue as a double.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        double value()
        Returns this DoubleValue as a double.
        Returns:
        the double mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this DoubleValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a DoubleValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this DoubleValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.jdi.event

This package defines JDI events and event processing.

See: Description

  • Interface Summary
    Interface Description
    AccessWatchpointEvent
    Notification of a field access in the target VM.
    BreakpointEvent
    Notification of a breakpoint in the target VM.
    ClassPrepareEvent
    Notification of a class prepare in the target VM.
    ClassUnloadEvent
    Notification of a class unload in the target VM.
    Event
    An occurrence in a target VM that is of interest to a debugger.
    EventIterator
    EventIterators are unmodifiable.
    EventQueue
    Manager of incoming debugger events for a target VM.
    EventSet
    Several Event objects may be created at a given time by the target VirtualMachine.
    ExceptionEvent
    Notification of an exception in the target VM.
    LocatableEvent
    Abstract superinterface of events which have both location and thread.
    MethodEntryEvent
    Notification of a method invocation in the target VM.
    MethodExitEvent
    Notification of a method return in the target VM.
    ModificationWatchpointEvent
    Notification of a field modification in the target VM.
    MonitorContendedEnteredEvent
    Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
    MonitorContendedEnterEvent
    Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
    MonitorWaitedEvent
    Notification that a thread in the target VM has finished waiting on an monitor object.
    MonitorWaitEvent
    Notification that a thread in the target VM is about to wait on a monitor object.
    StepEvent
    Notification of step completion in the target VM.
    ThreadDeathEvent
    Notification of a completed thread in the target VM.
    ThreadStartEvent
    Notification of a new running thread in the target VM.
    VMDeathEvent
    Notification of target VM termination.
    VMDisconnectEvent
    Notification of disconnection from target VM.
    VMStartEvent
    Notification of initialization of a target VM.
    WatchpointEvent
    Notification of a field triggered event encountered by a thread in the target VM.

Package com.sun.jdi.event Description

This package defines JDI events and event processing. An Event is always a member of an EventSet, which is retrieved from the EventQueue. Examples of Events include "breakpoints events", "thread creation events" and "virtual machine death event". With the exception of termination events, all events received must be requested with an "EventRequest". The com.sun.jdi.request package defines event requests and event request management.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


AccessWatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface AccessWatchpointEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror, WatchpointEvent

    @Exported
public interface AccessWatchpointEvent
extends WatchpointEvent
    Notification of a field access in the target VM. Field modifications are not considered field accesses.
    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine

    • Method Summary

      • Methods inherited from interface com.sun.jdi.event.WatchpointEvent

        field, object, valueCurrent

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


BreakpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface BreakpointEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface BreakpointEvent
extends LocatableEvent
    Notification of a breakpoint in the target VM. The breakpoint event is generated before the code at its location is executed. When a location is reached which satisfies a currently enabled breakpoint request, an event set containing an instance of this class will be added to the VM's event queue.
    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine, BreakpointRequest

    • Method Summary

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.jdi.event Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.jdi.event

Package Hierarchies:
  • All Packages

Interface Hierarchy

  • java.lang.Iterable<T>
    • java.util.Collection<E>
      • java.util.Set<E>
        • com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror)
  • java.util.Iterator<E>
    • com.sun.jdi.event.EventIterator
  • com.sun.jdi.Locatable
    • com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.event.Event)
      • com.sun.jdi.event.BreakpointEvent
      • com.sun.jdi.event.ExceptionEvent
      • com.sun.jdi.event.MethodEntryEvent
      • com.sun.jdi.event.MethodExitEvent
      • com.sun.jdi.event.MonitorContendedEnteredEvent
      • com.sun.jdi.event.MonitorContendedEnterEvent
      • com.sun.jdi.event.MonitorWaitedEvent
      • com.sun.jdi.event.MonitorWaitEvent
      • com.sun.jdi.event.StepEvent
      • com.sun.jdi.event.WatchpointEvent
        • com.sun.jdi.event.AccessWatchpointEvent
        • com.sun.jdi.event.ModificationWatchpointEvent
  • com.sun.jdi.Mirror
    • com.sun.jdi.event.Event
      • com.sun.jdi.event.ClassPrepareEvent
      • com.sun.jdi.event.ClassUnloadEvent
      • com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.Locatable)
        • com.sun.jdi.event.BreakpointEvent
        • com.sun.jdi.event.ExceptionEvent
        • com.sun.jdi.event.MethodEntryEvent
        • com.sun.jdi.event.MethodExitEvent
        • com.sun.jdi.event.MonitorContendedEnteredEvent
        • com.sun.jdi.event.MonitorContendedEnterEvent
        • com.sun.jdi.event.MonitorWaitedEvent
        • com.sun.jdi.event.MonitorWaitEvent
        • com.sun.jdi.event.StepEvent
        • com.sun.jdi.event.WatchpointEvent
          • com.sun.jdi.event.AccessWatchpointEvent
          • com.sun.jdi.event.ModificationWatchpointEvent
      • com.sun.jdi.event.ThreadDeathEvent
      • com.sun.jdi.event.ThreadStartEvent
      • com.sun.jdi.event.VMDeathEvent
      • com.sun.jdi.event.VMDisconnectEvent
      • com.sun.jdi.event.VMStartEvent
    • com.sun.jdi.event.EventQueue
    • com.sun.jdi.event.EventSet (also extends java.util.Set<E>)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MethodEntryEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MethodEntryEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MethodEntryEvent
extends LocatableEvent
    Notification of a method invocation in the target VM. This event occurs after entry into the invoked method and before any code has executed. Method entry events are generated for both native and non-native methods.

    In some VMs method entry events can occur for a particular thread before its ThreadStartEvent occurs if methods are called as part of the thread's initialization.

    Since:
    1.3
    See Also:
    EventQueue

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Method method()
      Returns the method that was entered.

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • method

        Method method()
        Returns the method that was entered.
        Returns:
        a Method which mirrors the method that was entered.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


StepEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface StepEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface StepEvent
extends LocatableEvent
    Notification of step completion in the target VM. The step event is generated immediately before the code at its location is executed; thus, if the step is entering a new method (as might occur with StepRequest.STEP_INTO) the location of the event is the first instruction of the method. When a step leaves a method, the location of the event will be the first instruction after the call in the calling method; note that this location may not be at a line boundary, even if StepRequest.STEP_LINE was used.
    Since:
    1.3
    See Also:
    StepRequest, EventQueue

    • Method Summary

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.jdi.event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.jdi.event

  • Packages that use com.sun.jdi.event
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
  • Classes in com.sun.jdi.event used by com.sun.jdi
    Class and Description
    EventQueue
    Manager of incoming debugger events for a target VM.
  • Classes in com.sun.jdi.event used by com.sun.jdi.event
    Class and Description
    Event
    An occurrence in a target VM that is of interest to a debugger.
    EventIterator
    EventIterators are unmodifiable.
    EventSet
    Several Event objects may be created at a given time by the target VirtualMachine.
    LocatableEvent
    Abstract superinterface of events which have both location and thread.
    WatchpointEvent
    Notification of a field triggered event encountered by a thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMDeathEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface VMDeathEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface VMDeathEvent
extends Event
    Notification of target VM termination. This event occurs if the target VM terminates before the VM disconnects (VMDisconnectEvent). Thus, this event will NOT occur if external forces terminate the connection (e.g. a crash) or if the connection is intentionally terminated with VirtualMachine.dispose()

    On VM termination, a single unsolicited VMDeathEvent will always be sent with a suspend policy of SUSPEND_NONE. Additional VMDeathEvents will be sent in the same event set if they are requested with a VMDeathRequest.

    The VM is still intact and can be queried at the point this event was initiated but immediately thereafter it is not considered intact and cannot be queried. Note: If the enclosing EventSet has a suspend policy other than SUSPEND_ALL the initiating point may be long past.

    All VMDeathEvents will be in a single EventSet, no other events will be in the event set. A resume must occur to continue execution after any event set which performs suspensions - in this case to allow proper shutdown.

    Since:
    1.3
    See Also:
    VMDisconnectEvent, EventRequestManager.createVMDeathRequest(), VMDeathRequest, EventQueue, VirtualMachine

    • Method Summary

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMDisconnectEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface VMDisconnectEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface VMDisconnectEvent
extends Event
    Notification of disconnection from target VM. May be caused by normal termination of a VM, VM termination by uncaught exception or other error, debugger action ( VirtualMachine.dispose() or VirtualMachine.exit(int)) or by external events (for example, target process termination by the operating system, transport termination, etc).

    If the target VM terminates before the disconnection, this event will be preceded by a VMDeathEvent.

    This event is always sent. There is no corresponding EventRequest. The enclosing singleton EventSet always has a suspend policy of EventRequest.SUSPEND_NONE.

    Since:
    1.3
    See Also:
    VMDeathEvent, EventQueue, VirtualMachine

    • Method Summary

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.AccessWatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.AccessWatchpointEvent

No usage of com.sun.jdi.event.AccessWatchpointEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.BreakpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.BreakpointEvent

No usage of com.sun.jdi.event.BreakpointEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ClassPrepareEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ClassPrepareEvent

No usage of com.sun.jdi.event.ClassPrepareEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ClassUnloadEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ClassUnloadEvent

No usage of com.sun.jdi.event.ClassUnloadEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.Event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.Event

  • Packages that use Event
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of Event in com.sun.jdi.event

      Subinterfaces of Event in com.sun.jdi.event
      Modifier and Type Interface and Description
      interface  AccessWatchpointEvent
      Notification of a field access in the target VM.
      interface  BreakpointEvent
      Notification of a breakpoint in the target VM.
      interface  ClassPrepareEvent
      Notification of a class prepare in the target VM.
      interface  ClassUnloadEvent
      Notification of a class unload in the target VM.
      interface  ExceptionEvent
      Notification of an exception in the target VM.
      interface  LocatableEvent
      Abstract superinterface of events which have both location and thread.
      interface  MethodEntryEvent
      Notification of a method invocation in the target VM.
      interface  MethodExitEvent
      Notification of a method return in the target VM.
      interface  ModificationWatchpointEvent
      Notification of a field modification in the target VM.
      interface  MonitorContendedEnteredEvent
      Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterEvent
      Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
      interface  MonitorWaitedEvent
      Notification that a thread in the target VM has finished waiting on an monitor object.
      interface  MonitorWaitEvent
      Notification that a thread in the target VM is about to wait on a monitor object.
      interface  StepEvent
      Notification of step completion in the target VM.
      interface  ThreadDeathEvent
      Notification of a completed thread in the target VM.
      interface  ThreadStartEvent
      Notification of a new running thread in the target VM.
      interface  VMDeathEvent
      Notification of target VM termination.
      interface  VMDisconnectEvent
      Notification of disconnection from target VM.
      interface  VMStartEvent
      Notification of initialization of a target VM.
      interface  WatchpointEvent
      Notification of a field triggered event encountered by a thread in the target VM.
      Methods in com.sun.jdi.event that return Event
      Modifier and Type | Method and Description
      Event | EventIterator.nextEvent()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.EventIterator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.EventIterator

  • Packages that use EventIterator
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of EventIterator in com.sun.jdi.event

      Methods in com.sun.jdi.event that return EventIterator
      Modifier and Type Method and Description
      EventIterator EventSet.eventIterator()
      Return an iterator specific to Event objects.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.EventQueue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.EventQueue

  • Packages that use EventQueue
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of EventQueue in com.sun.jdi

      Methods in com.sun.jdi that return EventQueue
      Modifier and Type Method and Description
      EventQueue VirtualMachine.eventQueue()
      Returns the event queue for this virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.EventSet

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.EventSet

  • Packages that use EventSet
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of EventSet in com.sun.jdi.event

      Methods in com.sun.jdi.event that return EventSet
      Modifier and Type Method and Description
      EventSet EventQueue.remove()
      Waits forever for the next available event.
      EventSet EventQueue.remove(long timeout)
      Waits a specified time for the next available event.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ExceptionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ExceptionEvent

No usage of com.sun.jdi.event.ExceptionEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.LocatableEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.LocatableEvent

  • Packages that use LocatableEvent
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of LocatableEvent in com.sun.jdi.event

      Subinterfaces of LocatableEvent in com.sun.jdi.event
      Modifier and Type Interface and Description
      interface  AccessWatchpointEvent
      Notification of a field access in the target VM.
      interface  BreakpointEvent
      Notification of a breakpoint in the target VM.
      interface  ExceptionEvent
      Notification of an exception in the target VM.
      interface  MethodEntryEvent
      Notification of a method invocation in the target VM.
      interface  MethodExitEvent
      Notification of a method return in the target VM.
      interface  ModificationWatchpointEvent
      Notification of a field modification in the target VM.
      interface  MonitorContendedEnteredEvent
      Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterEvent
      Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.
      interface  MonitorWaitedEvent
      Notification that a thread in the target VM has finished waiting on an monitor object.
      interface  MonitorWaitEvent
      Notification that a thread in the target VM is about to wait on a monitor object.
      interface  StepEvent
      Notification of step completion in the target VM.
      interface  WatchpointEvent
      Notification of a field triggered event encountered by a thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MethodEntryEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MethodEntryEvent

No usage of com.sun.jdi.event.MethodEntryEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MethodExitEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MethodExitEvent

No usage of com.sun.jdi.event.MethodExitEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ModificationWatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ModificationWatchpointEvent

No usage of com.sun.jdi.event.ModificationWatchpointEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MonitorContendedEnteredEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MonitorContendedEnteredEvent

No usage of com.sun.jdi.event.MonitorContendedEnteredEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MonitorContendedEnterEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MonitorContendedEnterEvent

No usage of com.sun.jdi.event.MonitorContendedEnterEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MonitorWaitedEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MonitorWaitedEvent

No usage of com.sun.jdi.event.MonitorWaitedEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.MonitorWaitEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.MonitorWaitEvent

No usage of com.sun.jdi.event.MonitorWaitEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.StepEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.StepEvent

No usage of com.sun.jdi.event.StepEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ThreadDeathEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ThreadDeathEvent

No usage of com.sun.jdi.event.ThreadDeathEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.ThreadStartEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.ThreadStartEvent

No usage of com.sun.jdi.event.ThreadStartEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.VMDeathEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.VMDeathEvent

No usage of com.sun.jdi.event.VMDeathEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.VMDisconnectEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.VMDisconnectEvent

No usage of com.sun.jdi.event.VMDisconnectEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.VMStartEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.VMStartEvent

No usage of com.sun.jdi.event.VMStartEvent
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.event.WatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.event.WatchpointEvent

  • Packages that use WatchpointEvent
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.

    • Uses of WatchpointEvent in com.sun.jdi.event

      Subinterfaces of WatchpointEvent in com.sun.jdi.event
      Modifier and Type Interface and Description
      interface  AccessWatchpointEvent
      Notification of a field access in the target VM.
      interface  ModificationWatchpointEvent
      Notification of a field modification in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassPrepareEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ClassPrepareEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface ClassPrepareEvent
extends Event
    Notification of a class prepare in the target VM. See the JVM specification for a definition of class preparation. Class prepare events are not generated for primtiive classes (for example, java.lang.Integer.TYPE).
    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ReferenceType referenceType()
      Returns the reference type for which this event was generated.
      ThreadReference thread()
      Returns the thread in which this event has occurred.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which this event has occurred.

        In rare cases, this event may occur in a debugger system thread within the target VM. Debugger threads take precautions to prevent these events, but they cannot be avoided under some conditions, especially for some subclasses of Error. If the event was generated by a debugger system thread, the value returned by this method is null, and if the requested suspend policy for the event was EventRequest.SUSPEND_EVENT_THREAD, all threads will be suspended instead, and the EventSet.suspendPolicy() will reflect this change.

        Note that the discussion above does not apply to system threads created by the target VM during its normal (non-debug) operation.

        Returns:
        a ThreadReference which mirrors the event's thread in the target VM, or null in the rare cases described above.

      • referenceType

        ReferenceType referenceType()
        Returns the reference type for which this event was generated.
        Returns:
        a ReferenceType which mirrors the class, interface, or array which has been linked.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassUnloadEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ClassUnloadEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface ClassUnloadEvent
extends Event
    Notification of a class unload in the target VM.

    There are severe constraints on the debugger back-end during garbage collection, so unload information is greatly limited.

    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String className()
      Returns the name of the class that has been unloaded.
      String classSignature()
      Returns the JNI-style signature of the class that has been unloaded.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • className

        String className()
        Returns the name of the class that has been unloaded.

      • classSignature

        String classSignature()
        Returns the JNI-style signature of the class that has been unloaded.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface Event

  • All Superinterfaces:
    Mirror
    All Known Subinterfaces:
    AccessWatchpointEvent, BreakpointEvent, ClassPrepareEvent, ClassUnloadEvent, ExceptionEvent, LocatableEvent, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, MonitorContendedEnteredEvent, MonitorContendedEnterEvent, MonitorWaitedEvent, MonitorWaitEvent, StepEvent, ThreadDeathEvent, ThreadStartEvent, VMDeathEvent, VMDisconnectEvent, VMStartEvent, WatchpointEvent

    @Exported
public interface Event
extends Mirror
    An occurrence in a target VM that is of interest to a debugger. Event is the common superinterface for all events (examples include BreakpointEvent, ExceptionEvent, ClassPrepareEvent). When an event occurs, an instance of Event as a component of an EventSet is enqueued in the VirtualMachine's EventQueue.
    Since:
    1.3
    See Also:
    EventSet, EventQueue

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      EventRequest request()

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • request

        EventRequest request()
        Returns:
        The EventRequest that requested this event. Some events (eg. VMDeathEvent) may not have a cooresponding request and thus will return null.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


EventIterator

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface EventIterator

  • All Superinterfaces:
    Iterator<Event>

    @Exported
public interface EventIterator
extends Iterator<Event>
    EventIterators are unmodifiable.
    Since:
    1.3
    See Also:
    Event, EventSet, Set.iterator()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Event nextEvent()

      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove

    • Method Detail

      • nextEvent

        Event nextEvent()
        Returns:
        The next Event in an EventSet.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


EventQueue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface EventQueue

  • All Superinterfaces:
    Mirror

    @Exported
public interface EventQueue
extends Mirror
    Manager of incoming debugger events for a target VM. Events are always grouped in EventSets. EventSets generated by the debugger back end can be read here. There is one instance of EventQueue assigned to a particular VirtualMachine.

    Some events cause the suspension of the target VM - event requests (com.sun.jdi.request) with a suspend policy of SUSPEND_ALL or SUSPEND_EVENT_THREAD and sometimes VMStartEvent. If these suspensions are not resumed the target VM will hang. Thus, it is always good policy to remove() every EventSet from the event queue until an EventSet containing a VMDisconnectEvent is read. Unless resume is being handled in another way, each EventSet should invoke EventSet.resume().

    Since:
    1.3
    See Also:
    EventSet, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      EventSet remove()
      Waits forever for the next available event.
      EventSet remove(long timeout)
      Waits a specified time for the next available event.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • remove

        EventSet remove()
         throws InterruptedException
        Waits forever for the next available event.
        Returns:
        the next EventSet.
        Throws:
        InterruptedException - if any thread has interrupted this thread.
        VMDisconnectedException - if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.

      • remove

        EventSet remove(long timeout)
         throws InterruptedException
        Waits a specified time for the next available event.
        Parameters:
        timeout - Time in milliseconds to wait for the next event
        Returns:
        the next EventSet, or null if there is a timeout.
        Throws:
        InterruptedException - if any thread has interrupted this thread.
        VMDisconnectedException - if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.
        IllegalArgumentException - if the timeout argument contains an illegal value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


EventSet

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface EventSet

  • All Superinterfaces:
    Collection<Event>, Iterable<Event>, Mirror, Set<Event>

    @Exported
public interface EventSet
extends Mirror, Set<Event>
    Several Event objects may be created at a given time by the target VirtualMachine. For example, there may be more than one BreakpointRequest for a given Location or you might single step to the same location as a BreakpointRequest. These Event objects are delivered together as an EventSet. For uniformity, an EventSet is always used to deliver Event objects. EventSets are delivered by the EventQueue. EventSets are unmodifiable.

    Associated with the issuance of an event set, suspensions may have occurred in the target VM. These suspensions correspond with the suspend policy. To assure matching resumes occur, it is recommended, where possible, to complete the processing of an event set with EventSet.resume().

    The events that are grouped in an EventSet are restricted in the following ways:

    • Always singleton sets:
      • VMStartEvent
      • VMDisconnectEvent
    • Only with other VMDeathEvents:
      • VMDeathEvent
    • Only with other ThreadStartEvents for the same thread:
      • ThreadStartEvent
    • Only with other ThreadDeathEvents for the same thread:
      • ThreadDeathEvent
    • Only with other ClassPrepareEvents for the same class:
      • ClassPrepareEvent
    • Only with other ClassUnloadEvents for the same class:
      • ClassUnloadEvent
    • Only with other AccessWatchpointEvents for the same field access:
      • AccessWatchpointEvent
    • Only with other ModificationWatchpointEvents for the same field modification:
      • ModificationWatchpointEvent
    • Only with other ExceptionEvents for the same exception occurrance:
      • ExceptionEvent
    • Only with other MethodExitEvents for the same method exit:
      • MethodExitEvent
    • Only with other Monitor contended enter events for the same monitor object:
      • Monitor Contended Enter Event
    • Only with other Monitor contended entered events for the same monitor object:
      • Monitor Contended Entered Event
    • Only with other Monitor wait events for the same monitor object:
      • Monitor Wait Event
    • Only with other Monitor waited events for the same monitor object:
      • Monitor Waited Event
    • Only with other members of this group, at the same location and in the same thread:
      • BreakpointEvent
      • StepEvent
      • MethodEntryEvent
    Since:
    1.3
    See Also:
    Event, EventQueue

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      EventIterator eventIterator()
      Return an iterator specific to Event objects.
      void resume()
      Resumes threads suspended by this event set.
      int suspendPolicy()
      Returns the policy used to suspend threads in the target VM for this event set.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.util.Set

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray

      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream

      • Methods inherited from interface java.lang.Iterable

        forEach

    • Method Detail

      • suspendPolicy

        int suspendPolicy()
        Returns the policy used to suspend threads in the target VM for this event set. This policy is selected from the suspend policies for each event's request; the target VM chooses the policy which suspends the most threads. The target VM suspends threads according to that policy and that policy is returned here. See EventRequest for the possible policy values.

        In rare cases, the suspend policy may differ from the requested value if a ClassPrepareEvent has occurred in a debugger system thread. See ClassPrepareEvent.thread() for details.

        Returns:
        the suspendPolicy which is either SUSPEND_ALL, SUSPEND_EVENT_THREAD or SUSPEND_NONE.

      • eventIterator

        EventIterator eventIterator()
        Return an iterator specific to Event objects.

      • resume

        void resume()
        Resumes threads suspended by this event set. If the suspendPolicy() is EventRequest.SUSPEND_ALL, a call to this method is equivalent to VirtualMachine.resume(). If the suspend policy is EventRequest.SUSPEND_EVENT_THREAD, a call to this method is equivalent to ThreadReference.resume() for the event thread. Otherwise, a call to this method is a no-op.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ExceptionEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ExceptionEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface ExceptionEvent
extends LocatableEvent
    Notification of an exception in the target VM. When an exception is thrown which satisfies a currently enabled exception request, an event set containing an instance of this class will be added to the VM's event queue. If the exception is thrown from a non-native method, the exception event is generated at the location where the exception is thrown. If the exception is thrown from a native method, the exception event is generated at the first non-native location reached after the exception is thrown.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Location catchLocation()
      Gets the location where the exception will be caught.
      ObjectReference exception()
      Gets the thrown exception object.

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • exception

        ObjectReference exception()
        Gets the thrown exception object. The exception object is an instance of Throwable or a subclass in the target VM.
        Returns:
        an ObjectReference which mirrors the thrown object in the target VM.

      • catchLocation

        Location catchLocation()
        Gets the location where the exception will be caught. An exception is considered to be caught if, at the point of the throw, the current location is dynamically enclosed in a try statement that handles the exception. (See the JVM specification for details). If there is such a try statement, the catch location is the first code index of the appropriate catch clause.

        If there are native methods in the call stack at the time of the exception, there are important restrictions to note about the returned catch location. In such cases, it is not possible to predict whether an exception will be handled by some native method on the call stack. Thus, it is possible that exceptions considered uncaught here will, in fact, be handled by a native method and not cause termination of the target VM. Furthermore, it cannot be assumed that the catch location returned here will ever be reached by the throwing thread. If there is a native frame between the current location and the catch location, the exception might be handled and cleared in that native method instead.

        Note that the compiler can generate try-catch blocks in some cases where they are not explicit in the source code; for example, the code generated for synchronized and finally blocks can contain implicit try-catch blocks. If such an implicitly generated try-catch is present on the call stack at the time of the throw, the exception will be considered caught even though it appears to be uncaught from examination of the source code.

        Returns:
        the Location where the exception will be caught or null if the exception is uncaught.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


LocatableEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface LocatableEvent

  • All Superinterfaces:
    Event, Locatable, Mirror
    All Known Subinterfaces:
    AccessWatchpointEvent, BreakpointEvent, ExceptionEvent, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, MonitorContendedEnteredEvent, MonitorContendedEnterEvent, MonitorWaitedEvent, MonitorWaitEvent, StepEvent, WatchpointEvent

    @Exported
public interface LocatableEvent
extends Event, Locatable
    Abstract superinterface of events which have both location and thread.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ThreadReference thread()
      Returns the thread in which this event has occurred.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which this event has occurred.
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MethodExitEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MethodExitEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MethodExitEvent
extends LocatableEvent
    Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.
    Since:
    1.3
    See Also:
    EventQueue

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Method method()
      Returns the method that was exited.
      Value returnValue()
      Returns the value that the method will return.

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • method

        Method method()
        Returns the method that was exited.
        Returns:
        a Method which mirrors the method that was exited.
        Throws:
        ObjectCollectedException - may be thrown if class has been garbage collected.

      • returnValue

        Value returnValue()
        Returns the value that the method will return. Not all target virtual machines support this operation. Use canGetMethodReturnValues() to determine if this operation is supported.
        Returns:
        a Value which mirrors the value to be returned.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetMethodReturnValues()
        Since:
        1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ModificationWatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ModificationWatchpointEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror, WatchpointEvent

    @Exported
public interface ModificationWatchpointEvent
extends WatchpointEvent
    Notification of a field modification in the target VM.
    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine, ModificationWatchpointRequest

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Value valueToBe()
      Value that will be assigned to the field when the instruction completes.

      • Methods inherited from interface com.sun.jdi.event.WatchpointEvent

        field, object, valueCurrent

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • valueToBe

        Value valueToBe()
        Value that will be assigned to the field when the instruction completes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorContendedEnteredEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MonitorContendedEnteredEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MonitorContendedEnteredEvent
extends LocatableEvent
    Notification that a thread in the target VM is entering a monitor after waiting for it to be released by another thread.

    Since:
    1.6
    See Also:
    EventQueue, MonitorContendedEnterEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference monitor()
      Returns the monitor that was entered.
      ThreadReference thread()
      Returns the thread in which this event has occurred.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which this event has occurred.

        Specified by:
        thread in interface LocatableEvent
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.

      • monitor

        ObjectReference monitor()
        Returns the monitor that was entered.
        Returns:
        an ObjectReference for the monitor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorContendedEnterEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MonitorContendedEnterEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MonitorContendedEnterEvent
extends LocatableEvent
    Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread.

    Since:
    1.6
    See Also:
    EventQueue, MonitorContendedEnteredEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference monitor()
      Returns the method that was entered.
      ThreadReference thread()
      Returns the thread in which this event has occurred.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which this event has occurred.

        Specified by:
        thread in interface LocatableEvent
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.

      • monitor

        ObjectReference monitor()
        Returns the method that was entered.
        Returns:
        an ObjectReference for the monitor.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorWaitedEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MonitorWaitedEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MonitorWaitedEvent
extends LocatableEvent
    Notification that a thread in the target VM has finished waiting on an monitor object.

    Since:
    1.6
    See Also:
    EventQueue, MonitorWaitEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference monitor()
      Returns the monitor object this thread waited on.
      ThreadReference thread()
      Returns the thread in which this event has occurred.
      boolean timedout()
      Returns whether the wait has timed out or been interrupted.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which this event has occurred.

        Specified by:
        thread in interface LocatableEvent
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.

      • monitor

        ObjectReference monitor()
        Returns the monitor object this thread waited on.
        Returns:
        an ObjectReference for the monitor.

      • timedout

        boolean timedout()
        Returns whether the wait has timed out or been interrupted.
        Returns:
        true if the wait is timed out.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorWaitEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface MonitorWaitEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror

    @Exported
public interface MonitorWaitEvent
extends LocatableEvent
    Notification that a thread in the target VM is about to wait on a monitor object.

    Since:
    1.6
    See Also:
    EventQueue, MonitorWaitedEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference monitor()
      Returns the monitor object that the thread about to wait.
      ThreadReference thread()
      Returns the thread in which monitor wait event has occurred.
      long timeout()
      Returns the number of millisecond the thread will wait.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread in which monitor wait event has occurred.

        Specified by:
        thread in interface LocatableEvent
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.

      • monitor

        ObjectReference monitor()
        Returns the monitor object that the thread about to wait.
        Returns:
        an ObjectReference for the monitor.

      • timeout

        long timeout()
        Returns the number of millisecond the thread will wait.
        Returns:
        a jlong containing monitor wait time in milliseconds.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadDeathEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ThreadDeathEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface ThreadDeathEvent
extends Event
    Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for VirtualMachine.allThreads() to return this thread after this event is received.

    Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.

    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine, ThreadReference

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ThreadReference thread()
      Returns the thread which is terminating.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread which is terminating.
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadStartEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface ThreadStartEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface ThreadStartEvent
extends Event
    Notification of a new running thread in the target VM. The new thread can be the result of a call to Thread.start() or the result of attaching a new thread to the VM though JNI. The notification is generated by the new thread some time before its execution starts. Because of this timing, it is possible to receive other events for the thread before this event is received. (Notably, MethodEntryEvents and MethodExitEvents might occur during thread initialization.) It is also possible for VirtualMachine.allThreads() to return a new started thread before this event is received.

    Note that this event gives no information about the creation of the thread object which may have happened much earlier, depending on the VM being debugged.

    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine, ThreadReference

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ThreadReference thread()
      Returns the thread which has started.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the thread which has started.
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMStartEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface VMStartEvent

  • All Superinterfaces:
    Event, Mirror

    @Exported
public interface VMStartEvent
extends Event
    Notification of initialization of a target VM. This event is received before the main thread is started and before any application code has been executed. Before this event occurs a significant amount of system code has executed and a number of system classes have been loaded. This event is always generated by the target VM, even if not explicitly requested.
    Since:
    1.3
    See Also:
    VMDeathEvent, EventQueue, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ThreadReference thread()
      Returns the initial thread of the VM which has started.

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • thread

        ThreadReference thread()
        Returns the initial thread of the VM which has started.
        Returns:
        a ThreadReference which mirrors the event's thread in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


WatchpointEvent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.event

Interface WatchpointEvent

  • All Superinterfaces:
    Event, Locatable, LocatableEvent, Mirror
    All Known Subinterfaces:
    AccessWatchpointEvent, ModificationWatchpointEvent

    @Exported
public interface WatchpointEvent
extends LocatableEvent
    Notification of a field triggered event encountered by a thread in the target VM.
    Since:
    1.3
    See Also:
    EventQueue, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Field field()
      Returns the field that is about to be accessed/modified.
      ObjectReference object()
      Returns the object whose field is about to be accessed/modified.
      Value valueCurrent()
      Current value of the field.

      • Methods inherited from interface com.sun.jdi.event.LocatableEvent

        thread

      • Methods inherited from interface com.sun.jdi.event.Event

        request

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Locatable

        location

    • Method Detail

      • field

        Field field()
        Returns the field that is about to be accessed/modified.
        Returns:
        a Field which mirrors the field in the target VM.
        Throws:
        ObjectCollectedException - may be thrown if class has been garbage collected.

      • object

        ObjectReference object()
        Returns the object whose field is about to be accessed/modified. Return null is the access is to a static field.
        Returns:
        a ObjectReference which mirrors the event's object in the target VM.

      • valueCurrent

        Value valueCurrent()
        Current value of the field.
        Throws:
        ObjectCollectedException - if object or class have been garbage collected.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Field

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Field

  • All Superinterfaces:
    Accessible, Comparable<Field>, Mirror, TypeComponent

    @Exported
public interface Field
extends TypeComponent, Comparable<Field>
    A class or instance variable in the target VM. See TypeComponent for general information about Field and Method mirrors.
    Since:
    1.3
    See Also:
    ObjectReference, ReferenceType

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this field for equality.
      int hashCode()
      Returns the hash code value for this Field.
      boolean isEnumConstant()
      Determine if this is a field that represents an enum constant.
      boolean isTransient()
      Determine if this is a transient field.
      boolean isVolatile()
      Determine if this is a volatile field.
      Type type()
      Returns the type of this field.
      String typeName()
      Returns a text representation of the type of this field.

      • Methods inherited from interface com.sun.jdi.TypeComponent

        declaringType, genericSignature, isFinal, isStatic, isSynthetic, name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • typeName

        String typeName()
        Returns a text representation of the type of this field. Where the type is the type specified in the declaration of this field.

        This type name is always available even if the type has not yet been created or loaded.

        Returns:
        a String representing the type of this field.

      • type

        Type type()
   throws ClassNotLoadedException
        Returns the type of this field. Where the type is the type specified in the declaration of this field.

        For example, if a target class defines:

            short s;
    Date d;
    byte[] ba;
        And the JDI client defines these Field objects:
            Field sField = targetClass.fieldByName("s");
    Field dField = targetClass.fieldByName("d");
    Field baField = targetClass.fieldByName("ba");
        to mirror the corresponding fields, then sField.type() is a ShortType, dField.type() is the ReferenceType for java.util.Date and ((ArrayType)(baField.type())).componentType() is a ByteType.

        Note: if the type of this field is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType() .classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        the Type of this field.
        Throws:
        ClassNotLoadedException - if the type has not yet been loaded or created through the appropriate class loader.
        See Also:
        Type

      • isTransient

        boolean isTransient()
        Determine if this is a transient field.
        Returns:
        true if this field is transient; false otherwise.

      • isVolatile

        boolean isVolatile()
        Determine if this is a volatile field.
        Returns:
        true if this field is volatile; false otherwise.

      • isEnumConstant

        boolean isEnumConstant()
        Determine if this is a field that represents an enum constant.
        Returns:
        true if this field represents an enum constant; false otherwise.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this field for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a Field and if both mirror the same field (declared in the same class or interface, in the same VM).
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this Field.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


FloatValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface FloatValue

  • All Superinterfaces:
    Comparable<FloatValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface FloatValue
extends PrimitiveValue, Comparable<FloatValue>
    Provides access to a primitive float value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this FloatValue for equality.
      int hashCode()
      Returns the hash code value for this FloatValue.
      float value()
      Returns this FloatValue as a float.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        float value()
        Returns this FloatValue as a float.
        Returns:
        the float mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this FloatValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a FloatValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this FloatValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


IncompatibleThreadStateException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class IncompatibleThreadStateException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.IncompatibleThreadStateException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class IncompatibleThreadStateException
extends Exception
    Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      IncompatibleThreadStateException()
      IncompatibleThreadStateException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • IncompatibleThreadStateException

        public IncompatibleThreadStateException()

      • IncompatibleThreadStateException

        public IncompatibleThreadStateException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InconsistentDebugInfoException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InconsistentDebugInfoException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.InconsistentDebugInfoException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InconsistentDebugInfoException
extends RuntimeException
    Thrown to indicate that there is an inconistency in the debug information provided by the target VM. For example, this exception is thrown if there is a type mismatch between a retrieved value's runtime type and its declared type as reported by the target VM.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InconsistentDebugInfoException()
      InconsistentDebugInfoException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InconsistentDebugInfoException

        public InconsistentDebugInfoException()

      • InconsistentDebugInfoException

        public InconsistentDebugInfoException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


IntegerValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface IntegerValue

  • All Superinterfaces:
    Comparable<IntegerValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface IntegerValue
extends PrimitiveValue, Comparable<IntegerValue>
    Provides access to a primitive int value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this IntegerValue for equality.
      int hashCode()
      Returns the hash code value for this IntegerValue.
      int value()
      Returns this IntegerValue as an int.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        int value()
        Returns this IntegerValue as an int.
        Returns:
        the int mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this IntegerValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is an IntegerValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this IntegerValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InterfaceType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface InterfaceType

  • All Superinterfaces:
    Accessible, Comparable<ReferenceType>, Mirror, ReferenceType, Type

    @Exported
public interface InterfaceType
extends ReferenceType
    A mirror of an interface in the target VM. An InterfaceType is a refinement of ReferenceType that applies to true interfaces in the JLS sense of the definition (not a class, not an array type). An interface type will never be returned by ObjectReference.referenceType(), but it may be in the list of implemented interfaces for a ClassType that is returned by that method.
    Since:
    1.3
    See Also:
    ObjectReference

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<ClassType> implementors()
      Gets the currently prepared classes which directly implement this interface.
      List<InterfaceType> subinterfaces()
      Gets the currently prepared interfaces which directly extend this interface.
      List<InterfaceType> superinterfaces()
      Gets the interfaces directly extended by this interface.

      • Methods inherited from interface com.sun.jdi.ReferenceType

        allFields, allLineLocations, allLineLocations, allMethods, availableStrata, classLoader, classObject, constantPool, constantPoolCount, defaultStratum, equals, failedToInitialize, fieldByName, fields, genericSignature, getValue, getValues, hashCode, instances, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, locationsOfLine, majorVersion, methods, methodsByName, methodsByName, minorVersion, name, nestedTypes, sourceDebugExtension, sourceName, sourceNames, sourcePaths, visibleFields, visibleMethods

      • Methods inherited from interface com.sun.jdi.Type

        signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

    • Method Detail

      • superinterfaces

        List<InterfaceType> superinterfaces()
        Gets the interfaces directly extended by this interface. The returned list contains only those interfaces this interface has declared to be extended.
        Returns:
        a List of InterfaceType objects each mirroring an interface extended by this interface. If none exist, returns a zero length List.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • subinterfaces

        List<InterfaceType> subinterfaces()
        Gets the currently prepared interfaces which directly extend this interface. The returned list contains only those interfaces that declared this interface in their "extends" clause.
        Returns:
        a List of InterfaceType objects each mirroring an interface extending this interface. If none exist, returns a zero length List.

      • implementors

        List<ClassType> implementors()
        Gets the currently prepared classes which directly implement this interface. The returned list contains only those classes that declared this interface in their "implements" clause.
        Returns:
        a List of ClassType objects each mirroring a class implementing this interface. If none exist, returns a zero length List.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InternalException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InternalException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.InternalException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InternalException
extends RuntimeException
    Thrown to indicate that an unexpected internal error has occurred.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InternalException()
      InternalException(int errorCode)
      InternalException(String s)
      InternalException(String s, int errorCode)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type | Method and Description
      int | errorCode()

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InternalException

        public InternalException()

      • InternalException

        public InternalException(String s)

      • InternalException

        public InternalException(int errorCode)

      • InternalException

        public InternalException(String s,
                         int errorCode)

    • Method Detail

      • errorCode

        public int errorCode()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidCodeIndexException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InvalidCodeIndexException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.InvalidCodeIndexException
  • All Implemented Interfaces:
    Serializable
    Deprecated.
    This exception is no longer thrown

    @Exported
 @Deprecated
public class InvalidCodeIndexException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the specified code index is not valid.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidCodeIndexException()
      Deprecated.
      InvalidCodeIndexException(String s)
      Deprecated.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidCodeIndexException

        public InvalidCodeIndexException()
        Deprecated.

      • InvalidCodeIndexException

        public InvalidCodeIndexException(String s)
        Deprecated.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidLineNumberException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InvalidLineNumberException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.InvalidLineNumberException
  • All Implemented Interfaces:
    Serializable
    Deprecated.
    This exception is no longer thrown

    @Exported
 @Deprecated
public class InvalidLineNumberException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the specified line number is not valid.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidLineNumberException()
      Deprecated.
      InvalidLineNumberException(String s)
      Deprecated.

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidLineNumberException

        public InvalidLineNumberException()
        Deprecated.

      • InvalidLineNumberException

        public InvalidLineNumberException(String s)
        Deprecated.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidStackFrameException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InvalidStackFrameException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.InvalidStackFrameException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InvalidStackFrameException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidStackFrameException()
      InvalidStackFrameException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidStackFrameException

        public InvalidStackFrameException()

      • InvalidStackFrameException

        public InvalidStackFrameException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidTypeException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InvalidTypeException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.InvalidTypeException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InvalidTypeException
extends Exception
    Thrown to indicate a type mismatch in setting the value of a field or variable, or in specifying the return value of a method.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidTypeException()
      InvalidTypeException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidTypeException

        public InvalidTypeException()

      • InvalidTypeException

        public InvalidTypeException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvocationException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class InvocationException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.sun.jdi.InvocationException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InvocationException
extends Exception
    Thrown to indicate an exception occurred in an invoked method within the target VM.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvocationException(ObjectReference exception)

    • Method Summary

      All Methods Instance Methods Concrete Methods
      Modifier and Type Method and Description
      ObjectReference exception()

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvocationException

        public InvocationException(ObjectReference exception)

    • Method Detail

      • exception

        public ObjectReference exception()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


JDIPermission

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class JDIPermission

  • java.lang.Object
    • java.security.Permission
      • java.security.BasicPermission
        • com.sun.jdi.JDIPermission
  • All Implemented Interfaces:
    Serializable, Guard

    @Exported
public final class JDIPermission
extends BasicPermission
    The JDIPermission class represents access rights to the VirtualMachineManager. This is the permission which the SecurityManager will check when code that is running with a SecurityManager requests access to the VirtualMachineManager, as defined in the Java Debug Interface (JDI) for the Java platform.

    A JDIPermission object contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

    The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

    Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
    virtualMachineManager | Ability to inspect and modify the JDI objects in the VirtualMachineManager | This allows an attacker to control the VirtualMachineManager and cause the system to misbehave.

    Programmers do not normally create JDIPermission objects directly. Instead they are created by the security policy code based on reading the security policy file.

    Since:
    1.5
    See Also:
    Bootstrap, BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      JDIPermission(String name)
      The JDIPermission class represents access rights to the VirtualMachineManager
      JDIPermission(String name, String actions)
      Constructs a new JDIPermission object.

    • Method Summary

      • Methods inherited from class java.security.BasicPermission

        equals, getActions, hashCode, implies, newPermissionCollection

      • Methods inherited from class java.security.Permission

        checkGuard, getName, toString

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • JDIPermission

        public JDIPermission(String name)
        The JDIPermission class represents access rights to the VirtualMachineManager
        Parameters:
        name - Permission name. Must be "virtualMachineManager".
        Throws:
        IllegalArgumentException - if the name argument is invalid.

      • JDIPermission

        public JDIPermission(String name,
                     String actions)
              throws IllegalArgumentException
        Constructs a new JDIPermission object.
        Parameters:
        name - Permission name. Must be "virtualMachineManager".
        actions - Must be either null or the empty string.
        Throws:
        IllegalArgumentException - if arguments are invalid.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


LocalVariable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface LocalVariable

  • All Superinterfaces:
    Comparable<LocalVariable>, Mirror

    @Exported
public interface LocalVariable
extends Mirror, Comparable<LocalVariable>
    A local variable in the target VM. Each variable declared within a Method has its own LocalVariable object. Variables of the same name declared in different scopes have different LocalVariable objects. LocalVariables can be used alone to retrieve static information about their declaration, or can be used in conjunction with a StackFrame to set and get values.
    Since:
    1.3
    See Also:
    StackFrame, Method

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this LocalVariable for equality.
      String genericSignature()
      Gets the generic signature for this variable if there is one.
      int hashCode()
      Returns the hash code value for this LocalVariable.
      boolean isArgument()
      Determines if this variable is an argument to its method.
      boolean isVisible(StackFrame frame)
      Determines whether this variable can be accessed from the given StackFrame.
      String name()
      Gets the name of the local variable.
      String signature()
      Gets the JNI signature of the local variable.
      Type type()
      Returns the type of this variable.
      String typeName()
      Returns a text representation of the type of this variable.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • name

        String name()
        Gets the name of the local variable.
        Returns:
        a string containing the name.

      • typeName

        String typeName()
        Returns a text representation of the type of this variable. Where the type is the type specified in the declaration of this local variable.

        This type name is always available even if the type has not yet been created or loaded.

        Returns:
        a String representing the type of this local variable.

      • type

        Type type()
   throws ClassNotLoadedException
        Returns the type of this variable. Where the type is the type specified in the declaration of this local variable.

        Note: if the type of this variable is a reference type (class, interface, or array) and it has not been created or loaded by the class loader of the enclosing class, then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        the Type of this local variable.
        Throws:
        ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.
        See Also:
        Type, Field.type() - for usage examples

      • signature

        String signature()
        Gets the JNI signature of the local variable.
        Returns:
        a string containing the signature.
        See Also:
        Type Signatures

      • genericSignature

        String genericSignature()
        Gets the generic signature for this variable if there is one. Generic signatures are described in the The Java™ Virtual Machine Specification.
        Returns:
        a string containing the generic signature, or null if there is no generic signature.
        Since:
        1.5

      • isVisible

        boolean isVisible(StackFrame frame)
        Determines whether this variable can be accessed from the given StackFrame. See StackFrame.visibleVariables() for a complete description variable visibility in this interface.
        Parameters:
        frame - the StackFrame querying visibility
        Returns:
        true if this variable is visible; false otherwise.
        Throws:
        IllegalArgumentException - if the stack frame's method does not match this variable's method.

      • isArgument

        boolean isArgument()
        Determines if this variable is an argument to its method.
        Returns:
        true if this variable is an argument; false otherwise.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this LocalVariable for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a LocalVariable, if both LocalVariables are contained in the same method (as determined by Method.equals(java.lang.Object)), and if both LocalVariables mirror the same declaration within that method
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this LocalVariable.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Locatable

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Locatable

  • All Known Subinterfaces:
    AccessWatchpointEvent, BreakpointEvent, BreakpointRequest, ExceptionEvent, LocatableEvent, Method, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, MonitorContendedEnteredEvent, MonitorContendedEnterEvent, MonitorWaitedEvent, MonitorWaitEvent, StackFrame, StepEvent, WatchpointEvent

    @Exported
public interface Locatable
    A mirror that has a Location.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Location location()
      Returns the Location of this mirror, if there is executable code associated with it.

    • Method Detail

      • location

        Location location()
        Returns the Location of this mirror, if there is executable code associated with it. Note that both JavaTM programming language methods and native methods have executable code. Returns null for abstract methods, since abstract methods have no executable code.
        Returns:
        the Location of this mirror, or null if there is no executable code associated with it.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Location

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Location

  • All Superinterfaces:
    Comparable<Location>, Mirror

    @Exported
public interface Location
extends Mirror, Comparable<Location>
    A point within the executing code of the target VM. Locations are used to identify the current position of a suspended thread (analogous to an instruction pointer or program counter register in native programs). They are also used to identify the position at which to set a breakpoint.

    The availability of a line number for a location will depend on the level of debugging information available from the target VM.

    Several mirror interfaces have locations. Each such mirror extends a Locatable interface.

    Strata

    The source information for a Location is dependent on the stratum which is used. A stratum is a source code level within a sequence of translations. For example, say the baz program is written in the programming language "Foo" then translated to the language "Bar" and finally translated into the Java programming language. The Java programming language stratum is named "Java", let's say the other strata are named "Foo" and "Bar". A given location (as viewed by the sourceName() and lineNumber() methods) might be at line 14 of "baz.foo" in the "Foo" stratum, line 23 of "baz.bar" in the "Bar" stratum and line 71 of the "Java" stratum. Note that while the Java programming language may have only one source file for a reference type, this restriction does not apply to other strata - thus each Location should be consulted to determine its source path. Queries which do not specify a stratum (sourceName(), sourcePath() and lineNumber()) use the VM's default stratum (VirtualMachine.getDefaultStratum()). If the specified stratum (whether explicitly specified by a method parameter or implicitly as the VM's default) is null or is not available in the declaring type, the declaring type's default stratum is used (declaringType().defaultStratum()). Note that in the normal case, of code that originates as Java programming language source, there will be only one stratum ("Java") and it will be returned as the default. To determine the available strata use ReferenceType.availableStrata().

    Since:
    1.3
    See Also:
    EventRequestManager, StackFrame, BreakpointEvent, ExceptionEvent, Locatable

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      long codeIndex()
      Gets the code position within this location's method.
      ReferenceType declaringType()
      Gets the type to which this Location belongs.
      boolean equals(Object obj)
      Compares the specified Object with this Location for equality.
      int hashCode()
      Returns the hash code value for this Location.
      int lineNumber()
      Gets the line number of this Location.
      int lineNumber(String stratum)
      The line number of this Location.
      Method method()
      Gets the method containing this Location.
      String sourceName()
      Gets an identifing name for the source corresponding to this location.
      String sourceName(String stratum)
      Gets an identifing name for the source corresponding to this location.
      String sourcePath()
      Gets the path to the source corresponding to this location.
      String sourcePath(String stratum)
      Gets the path to the source corresponding to this location.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • declaringType

        ReferenceType declaringType()
        Gets the type to which this Location belongs. Normally the declaring type is a ClassType, but executable locations also may exist within the static initializer of an InterfaceType.
        Returns:
        the ReferenceType containing this Location.

      • method

        Method method()
        Gets the method containing this Location.
        Returns:
        the location's Method.

      • codeIndex

        long codeIndex()
        Gets the code position within this location's method.
        Returns:
        the long representing the position within the method or -1 if location is within a native method.

      • sourceName

        String sourceName()
           throws AbsentInformationException
        Gets an identifing name for the source corresponding to this location.

        This method is equivalent to sourceName(vm.getDefaultStratum()) - see sourceName(String) for more information.

        Returns:
        a string specifying the source
        Throws:
        AbsentInformationException - if the source name is not known

      • sourceName

        String sourceName(String stratum)
           throws AbsentInformationException
        Gets an identifing name for the source corresponding to this location. Interpretation of this string is the responsibility of the source repository mechanism.

        Returned name is for the specified stratum (see the class comment for a description of strata).

        The returned string is the unqualified name of the source file for this Location. For example, java.lang.Thread would return "Thread.java".

        Parameters:
        stratum - The stratum to retrieve information from or null for the declaring type's default stratum.
        Returns:
        a string specifying the source
        Throws:
        AbsentInformationException - if the source name is not known
        Since:
        1.4

      • sourcePath

        String sourcePath()
           throws AbsentInformationException
        Gets the path to the source corresponding to this location.

        This method is equivalent to sourcePath(vm.getDefaultStratum()) - see sourcePath(String) for more information.

        Returns:
        a string specifying the source
        Throws:
        AbsentInformationException - if the source name is not known

      • sourcePath

        String sourcePath(String stratum)
           throws AbsentInformationException
        Gets the path to the source corresponding to this location. Interpretation of this string is the responsibility of the source repository mechanism.

        Returned path is for the specified stratum (see the class comment for a description of strata).

        In the reference implementation, for strata which do not explicitly specify source path (the Java programming language stratum never does), the returned string is the package name of declaringType() converted to a platform dependent path followed by the unqualified name of the source file for this Location (sourceName(stratum)). For example, on a Windows platform, java.lang.Thread would return "java\lang\Thread.java".

        Parameters:
        stratum - The stratum to retrieve information from or null for the declaring type's default stratum.
        Returns:
        a string specifying the source
        Throws:
        AbsentInformationException - if the source name is not known
        Since:
        1.4

      • lineNumber

        int lineNumber()
        Gets the line number of this Location.

        This method is equivalent to lineNumber(vm.getDefaultStratum()) - see lineNumber(String) for more information.

        Returns:
        an int specifying the line in the source, returns -1 if the information is not available; specifically, always returns -1 for native methods.

      • lineNumber

        int lineNumber(String stratum)
        The line number of this Location. The line number is relative to the source specified by sourceName(stratum).

        Returned line number is for the specified stratum (see the class comment for a description of strata).

        Parameters:
        stratum - The stratum to retrieve information from or null for the declaring type's default stratum.
        Returns:
        an int specifying the line in the source, returns -1 if the information is not available; specifically, always returns -1 for native methods.
        Since:
        1.4

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this Location for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a Location and if it refers to the same point in the same VM as this Location.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this Location.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


LongValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface LongValue

  • All Superinterfaces:
    Comparable<LongValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface LongValue
extends PrimitiveValue, Comparable<LongValue>
    Provides access to a primitive long value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this LongValue for equality.
      int hashCode()
      Returns the hash code value for this LongValue.
      long value()
      Returns this LongValue as a long.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        long value()
        Returns this LongValue as a long.
        Returns:
        the long mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this LongValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a LongValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this LongValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Method

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Method

  • All Superinterfaces:
    Accessible, Comparable<Method>, Locatable, Mirror, TypeComponent

    @Exported
public interface Method
extends TypeComponent, Locatable, Comparable<Method>
    A static or instance method in the target VM. See TypeComponent for general information about Field and Method mirrors.
    Since:
    1.3
    See Also:
    ObjectReference, ReferenceType

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<Location> allLineLocations()
      Returns a list containing a Location object for each executable source line in this method.
      List<Location> allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this method.
      List<LocalVariable> arguments()
      Returns a list containing each LocalVariable that is declared as an argument of this method.
      List<String> argumentTypeNames()
      Returns a list containing a text representation of the type of each formal parameter of this method.
      List<Type> argumentTypes()
      Returns a list containing the type of each formal parameter of this method.
      byte[] bytecodes()
      Returns an array containing the bytecodes for this method.
      boolean equals(Object obj)
      Compares the specified Object with this method for equality.
      int hashCode()
      Returns the hash code value for this Method.
      boolean isAbstract()
      Determine if this method is abstract.
      boolean isBridge()
      Determine if this method is a bridge method.
      boolean isConstructor()
      Determine if this method is a constructor.
      boolean isNative()
      Determine if this method is native.
      boolean isObsolete()
      Determine if this method is obsolete.
      boolean isStaticInitializer()
      Determine if this method is a static initializer.
      boolean isSynchronized()
      Determine if this method is synchronized.
      boolean isVarArgs()
      Determine if this method accepts a variable number of arguments.
      Location location()
      Returns the Location of this method, if there is executable code associated with it.
      Location locationOfCodeIndex(long codeIndex)
      Returns a Location for the given code index.
      List<Location> locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number and source name.
      Type returnType()
      Returns the return type, as specified in the declaration of this method.
      String returnTypeName()
      Returns a text representation of the return type, as specified in the declaration of this method.
      List<LocalVariable> variables()
      Returns a list containing each LocalVariable declared in this method.
      List<LocalVariable> variablesByName(String name)
      Returns a list containing each LocalVariable of a given name in this method.

      • Methods inherited from interface com.sun.jdi.TypeComponent

        declaringType, genericSignature, isFinal, isStatic, isSynthetic, name, signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • returnTypeName

        String returnTypeName()
        Returns a text representation of the return type, as specified in the declaration of this method.

        This type name is always available even if the type has not yet been created or loaded.

        Returns:
        a String containing the return type name.

      • returnType

        Type returnType()
         throws ClassNotLoadedException
        Returns the return type, as specified in the declaration of this method.

        Note: if the return type of this method is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType() .classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        the return Type of this method.
        Throws:
        ClassNotLoadedException - if the type has not yet been created or loaded through the appropriate class loader.
        See Also:
        Type, Field.type() - for usage examples

      • argumentTypeNames

        List<String> argumentTypeNames()
        Returns a list containing a text representation of the type of each formal parameter of this method.

        This list is always available even if the types have not yet been created or loaded.

        Returns:
        a List of String, one List element for each parameter of this method. Each element represents the type of a formal parameter as specified at compile-time. If the formal parameter was declared with an ellipsis, then it is represented as an array of the type before the ellipsis.

      • argumentTypes

        List<Type> argumentTypes()
                  throws ClassNotLoadedException
        Returns a list containing the type of each formal parameter of this method.

        Note: if there is any parameter whose type is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType() .classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the list will be returned but attempts to perform some operations on the type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType.isPrepared() to determine if a reference type is prepared.

        Returns:
        return a List of Type, one List element for each parameter of this method. Each element represents the type of a formal parameter as specified at compile-time. If the formal parameter was declared with an ellipsis, then it is represented as an array of the type before the ellipsis.
        Throws:
        ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.
        See Also:
        Type

      • isAbstract

        boolean isAbstract()
        Determine if this method is abstract.
        Returns:
        true if the method is declared abstract; false otherwise.

      • isSynchronized

        boolean isSynchronized()
        Determine if this method is synchronized.
        Returns:
        true if the method is declared synchronized; false otherwise.

      • isNative

        boolean isNative()
        Determine if this method is native.
        Returns:
        true if the method is declared native; false otherwise.

      • isVarArgs

        boolean isVarArgs()
        Determine if this method accepts a variable number of arguments.
        Returns:
        true if the method accepts a variable number of arguments, false otherwise.
        Since:
        1.5

      • isBridge

        boolean isBridge()
        Determine if this method is a bridge method. Bridge methods are defined in The Java™ Language Specification.
        Returns:
        true if the method is a bridge method, false otherwise.
        Since:
        1.5

      • isConstructor

        boolean isConstructor()
        Determine if this method is a constructor.
        Returns:
        true if the method is a constructor; false otherwise.

      • isStaticInitializer

        boolean isStaticInitializer()
        Determine if this method is a static initializer.
        Returns:
        true if the method is a static initializer; false otherwise.

      • isObsolete

        boolean isObsolete()
        Determine if this method is obsolete.
        Returns:
        true if this method has been made obsolete by a VirtualMachine.redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>) operation.
        Since:
        1.4

      • allLineLocations

        List<Location> allLineLocations()
                         throws AbsentInformationException
        Returns a list containing a Location object for each executable source line in this method.

        This method is equivalent to allLineLocations(vm.getDefaultStratum(),null) - see allLineLocations(String,String) for more information.

        Returns:
        a List of all source line Location objects.
        Throws:
        AbsentInformationException - if there is no line number information for this (non-native, non-abstract) method.

      • allLineLocations

        List<Location> allLineLocations(String stratum,
                                String sourceName)
                         throws AbsentInformationException
        Returns a list containing a Location object for each executable source line in this method.

        Each location maps a source line to a range of code indices. The beginning of the range can be determined through Location.codeIndex(). The returned list is ordered by code index (from low to high).

        The returned list may contain multiple locations for a particular line number, if the compiler and/or VM has mapped that line to two or more disjoint code index ranges.

        If the method is native or abstract, an empty list is returned.

        Returned list is for the specified stratum (see Location for a description of strata).

        Parameters:
        stratum - The stratum to retrieve information from or null for the ReferenceType.defaultStratum()
        sourceName - Return locations only within this source file or null to return locations.
        Returns:
        a List of all source line Location objects.
        Throws:
        AbsentInformationException - if there is no line number information for this (non-native, non-abstract) method. Or if sourceName is non-null and source name information is not present.
        Since:
        1.4

      • locationsOfLine

        List<Location> locationsOfLine(int lineNumber)
                        throws AbsentInformationException
        Returns a List containing all Location objects that map to the given line number.

        This method is equivalent to locationsOfLine(vm.getDefaultStratum(), null, lineNumber) - see locationsOfLine(java.lang.String,java.lang.String,int) for more information.

        Parameters:
        lineNumber - the line number
        Returns:
        a List of Location objects that map to the given line number.
        Throws:
        AbsentInformationException - if there is no line number information for this method.

      • locationsOfLine

        List<Location> locationsOfLine(String stratum,
                               String sourceName,
                               int lineNumber)
                        throws AbsentInformationException
        Returns a List containing all Location objects that map to the given line number and source name.

        Returns a list containing each Location that maps to the given line. The returned list will contain a location for each disjoint range of code indices that have been assigned to the given line by the compiler and/or VM. Each returned location corresponds to the beginning of this range. An empty list will be returned if there is no executable code at the specified line number; specifically, native and abstract methods will always return an empty list.

        Returned list is for the specified stratum (see Location for a description of strata).

        Parameters:
        stratum - the stratum to use for comparing line number and source name, or null to use the default stratum
        sourceName - the source name containing the line number, or null to match all source names
        lineNumber - the line number
        Returns:
        a List of Location objects that map to the given line number.
        Throws:
        AbsentInformationException - if there is no line number information for this method. Or if sourceName is non-null and source name information is not present.
        Since:
        1.4

      • locationOfCodeIndex

        Location locationOfCodeIndex(long codeIndex)
        Returns a Location for the given code index.
        Returns:
        the Location corresponding to the given code index or null if the specified code index is not a valid code index for this method (native and abstract methods will always return null).

      • variables

        List<LocalVariable> variables()
                       throws AbsentInformationException
        Returns a list containing each LocalVariable declared in this method. The list includes any variable declared in any scope within the method. It may contain multiple variables of the same name declared within disjoint scopes. Arguments are considered local variables and will be present in the returned list. If local variable information is not available, values of actual arguments to method invocations can be obtained by using the method StackFrame.getArgumentValues()
        Returns:
        the list of LocalVariable objects which mirror local variables declared in this method in the target VM. If there are no local variables, a zero-length list is returned.
        Throws:
        AbsentInformationException - if there is no variable information for this method. Generally, local variable information is not available for native or abstract methods (that is, their argument name information is not available), thus they will throw this exception.

      • variablesByName

        List<LocalVariable> variablesByName(String name)
                             throws AbsentInformationException
        Returns a list containing each LocalVariable of a given name in this method. Multiple variables can be returned if the same variable name is used in disjoint scopes within the method.
        Returns:
        the list of LocalVariable objects of the given name. If there are no matching local variables, a zero-length list is returned.
        Throws:
        AbsentInformationException - if there is no variable information for this method. Generally, local variable information is not available for native or abstract methods (that is, their argument name information is not available), thus they will throw this exception.

      • arguments

        List<LocalVariable> arguments()
                       throws AbsentInformationException
        Returns a list containing each LocalVariable that is declared as an argument of this method. If local variable information is not available, values of actual arguments to method invocations can be obtained by using the method StackFrame.getArgumentValues()
        Returns:
        the list of LocalVariable arguments. If there are no arguments, a zero-length list is returned.
        Throws:
        AbsentInformationException - if there is no variable information for this method. Generally, local variable information is not available for native or abstract methods (that is, their argument name information is not available), thus they will throw this exception.

      • bytecodes

        byte[] bytecodes()
        Returns an array containing the bytecodes for this method.

        Not all target virtual machines support this operation. Use VirtualMachine.canGetBytecodes() to determine if the operation is supported.

        Returns:
        the array of bytecodes; abstract and native methods will return a zero-length array.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support the retrieval of bytecodes.

      • location

        Location location()
        Returns the Location of this method, if there is executable code associated with it.
        Specified by:
        location in interface Locatable
        Returns:
        the Location of this mirror, or null if this is an abstract method; native methods will return a Location object whose codeIndex is -1.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this method for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a method and if both mirror the same method (declared in the same class or interface, in the same VM).
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this Method.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Mirror

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Mirror

  • All Known Subinterfaces:
    AccessWatchpointEvent, AccessWatchpointRequest, ArrayReference, ArrayType, BooleanType, BooleanValue, BreakpointEvent, BreakpointRequest, ByteType, ByteValue, CharType, CharValue, ClassLoaderReference, ClassObjectReference, ClassPrepareEvent, ClassPrepareRequest, ClassType, ClassUnloadEvent, ClassUnloadRequest, DoubleType, DoubleValue, Event, EventQueue, EventRequest, EventRequestManager, EventSet, ExceptionEvent, ExceptionRequest, Field, FloatType, FloatValue, IntegerType, IntegerValue, InterfaceType, LocalVariable, LocatableEvent, Location, LongType, LongValue, Method, MethodEntryEvent, MethodEntryRequest, MethodExitEvent, MethodExitRequest, ModificationWatchpointEvent, ModificationWatchpointRequest, MonitorContendedEnteredEvent, MonitorContendedEnteredRequest, MonitorContendedEnterEvent, MonitorContendedEnterRequest, MonitorInfo, MonitorWaitedEvent, MonitorWaitedRequest, MonitorWaitEvent, MonitorWaitRequest, ObjectReference, PathSearchingVirtualMachine, PrimitiveType, PrimitiveValue, ReferenceType, ShortType, ShortValue, StackFrame, StepEvent, StepRequest, StringReference, ThreadDeathEvent, ThreadDeathRequest, ThreadGroupReference, ThreadReference, ThreadStartEvent, ThreadStartRequest, Type, TypeComponent, Value, VirtualMachine, VMDeathEvent, VMDeathRequest, VMDisconnectEvent, VMStartEvent, VoidType, VoidValue, WatchpointEvent, WatchpointRequest

    @Exported
public interface Mirror
    A proxy used by a debugger to examine or manipulate some entity in another virtual machine. Mirror is the root of the interface hierarchy for this package. Mirrors can be proxies for objects in the target VM (ObjectReference), primitive values (for example, IntegerValue), types (for example, ReferenceType), dynamic application state (for example, StackFrame), and even debugger-specific constructs (for example, BreakpointRequest). The VirtualMachine itself is also considered a mirror, representing the composite state of the target VM.

    There is no guarantee that a particular entity in the target VM will map to a single instance of Mirror. Implementors are free to decide whether a single mirror will be used for some or all mirrors. Clients of this interface should always use equals to compare two mirrors for equality.

    Any method on a Mirror that takes a Mirror as an parameter directly or indirectly (e.g., as a element in a List) will throw VMMismatchException if the mirrors are from different virtual machines.

    Since:
    1.3
    See Also:
    VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String toString()
      Returns a String describing this mirror
      VirtualMachine virtualMachine()
      Gets the VirtualMachine to which this Mirror belongs.

    • Method Detail

      • virtualMachine

        VirtualMachine virtualMachine()
        Gets the VirtualMachine to which this Mirror belongs. A Mirror must be associated with a VirtualMachine to have any meaning.
        Returns:
        the VirtualMachine for which this mirror is a proxy.

      • toString

        String toString()
        Returns a String describing this mirror
        Overrides:
        toString in class Object
        Returns:
        a string describing this mirror.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorInfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface MonitorInfo

  • All Superinterfaces:
    Mirror

    @Exported
public interface MonitorInfo
extends Mirror
    Information about a monitor owned by a thread.
    Since:
    1.6

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference monitor()
      Returns the ObjectReference object for the monitor.
      int stackDepth()
      Returns the stack depth at which this monitor was acquired by the owning thread.
      ThreadReference thread()
      Returns a ThreadReference object for the thread that owns the monitor.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • monitor

        ObjectReference monitor()
        Returns the ObjectReference object for the monitor.
        Returns:
        the ObjectReference object for the monitor.
        Throws:
        InvalidStackFrameException - if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        Since:
        1.6
        See Also:
        ThreadReference.ownedMonitorsAndFrames()

      • stackDepth

        int stackDepth()
        Returns the stack depth at which this monitor was acquired by the owning thread. Returns -1 if the implementation cannot determine the stack depth (e.g., for monitors acquired by JNI MonitorEnter).
        Returns:
        the stack depth at which this monitor was acquired by the owning thread.
        Throws:
        InvalidStackFrameException - if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        See Also:
        ThreadReference.ownedMonitorsAndFrames()

      • thread

        ThreadReference thread()
        Returns a ThreadReference object for the thread that owns the monitor.
        Returns:
        a ThreadReference object for the thread that owns the monitor.
        Throws:
        InvalidStackFrameException - if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        See Also:
        ThreadReference.frame(int)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


NativeMethodException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class NativeMethodException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.NativeMethodException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class NativeMethodException
extends RuntimeException
    Thrown to indicate an operation cannot be completed because it is not valid for a native method.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      NativeMethodException()
      NativeMethodException(String message)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • NativeMethodException

        public NativeMethodException()

      • NativeMethodException

        public NativeMethodException(String message)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectCollectedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class ObjectCollectedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.ObjectCollectedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class ObjectCollectedException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      ObjectCollectedException()
      ObjectCollectedException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • ObjectCollectedException

        public ObjectCollectedException()

      • ObjectCollectedException

        public ObjectCollectedException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ObjectReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ObjectReference

  • All Superinterfaces:
    Mirror, Value
    All Known Subinterfaces:
    ArrayReference, ClassLoaderReference, ClassObjectReference, StringReference, ThreadGroupReference, ThreadReference

    @Exported
public interface ObjectReference
extends Value
    An object that currently exists in the target VM. An ObjectReference mirrors only the object itself and is not specific to any Field or LocalVariable to which it is currently assigned. An ObjectReference can have 0 or more references from field(s) and/or variable(s).

    Any method on ObjectReference which directly or indirectly takes ObjectReference as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

    Any method on ObjectReference which directly or indirectly takes ObjectReference as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

    Any method on ObjectReference or which directly or indirectly takes ObjectReference as parameter may throw ObjectCollectedException if the mirrored object has been garbage collected.

    Since:
    1.3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int INVOKE_NONVIRTUAL
      Perform non-virtual method invocation
      static int INVOKE_SINGLE_THREADED
      Perform method invocation with only the invoking thread resumed

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void disableCollection()
      Prevents garbage collection for this object.
      void enableCollection()
      Permits garbage collection for this object.
      int entryCount()
      Returns the number times this object's monitor has been entered by the current owning thread.
      boolean equals(Object obj)
      Compares the specified Object with this ObjectReference for equality.
      Value getValue(Field sig)
      Gets the value of a given instance or static field in this object.
      Map<Field,Value> getValues(List<? extends Field> fields)
      Gets the value of multiple instance and/or static fields in this object.
      int hashCode()
      Returns the hash code value for this ObjectReference.
      Value invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options)
      Invokes the specified Method on this object in the target VM.
      boolean isCollected()
      Determines if this object has been garbage collected in the target VM.
      ThreadReference owningThread()
      Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
      ReferenceType referenceType()
      Gets the ReferenceType that mirrors the type of this object.
      List<ObjectReference> referringObjects(long maxReferrers)
      Returns objects that directly reference this object.
      void setValue(Field field, Value value)
      Sets the value of a given instance or static field in this object.
      long uniqueID()
      Returns a unique identifier for this ObjectReference.
      List<ThreadReference> waitingThreads()
      Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Field Detail

      • INVOKE_SINGLE_THREADED

        static final int INVOKE_SINGLE_THREADED
        Perform method invocation with only the invoking thread resumed
        See Also:
        Constant Field Values

      • INVOKE_NONVIRTUAL

        static final int INVOKE_NONVIRTUAL
        Perform non-virtual method invocation
        See Also:
        Constant Field Values

    • Method Detail

      • referenceType

        ReferenceType referenceType()
        Gets the ReferenceType that mirrors the type of this object. The type may be a subclass or implementor of the declared type of any field or variable which currently holds it. For example, right after the following statement.

        Object obj = new String("Hello, world!");

        The ReferenceType of obj will mirror java.lang.String and not java.lang.Object.

        The type of an object never changes, so this method will always return the same ReferenceType over the lifetime of the mirrored object.

        The returned ReferenceType will be a ClassType or ArrayType and never an InterfaceType.

        Returns:
        the ReferenceType for this object.

      • getValue

        Value getValue(Field sig)
        Gets the value of a given instance or static field in this object. The Field must be valid for this ObjectReference; that is, it must be from the mirrored object's class or a superclass of that class.
        Parameters:
        sig - the field containing the requested value
        Returns:
        the Value of the instance field.
        Throws:
        IllegalArgumentException - if the field is not valid for this object's class.

      • getValues

        Map<Field,Value> getValues(List<? extends Field> fields)
        Gets the value of multiple instance and/or static fields in this object. The Fields must be valid for this ObjectReference; that is, they must be from the mirrored object's class or a superclass of that class.
        Parameters:
        fields - a list of Field objects containing the requested values.
        Returns:
        a Map of the requested Field objects with their Value.
        Throws:
        IllegalArgumentException - if any field is not valid for this object's class.

      • setValue

        void setValue(Field field,
              Value value)
       throws InvalidTypeException,
              ClassNotLoadedException
        Sets the value of a given instance or static field in this object. The Field must be valid for this ObjectReference; that is, it must be from the mirrored object's class or a superclass of that class. If static, the field must not be final.

        Object values must be assignment compatible with the field type (This implies that the field type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the field type or must be convertible to the field type without loss of information. See section 5.2 of The Java™ Language Specification for more information on assignment compatibility.

        Parameters:
        field - the field containing the requested value
        value - the new value to assign
        Throws:
        IllegalArgumentException - if the field is not valid for this object's class.
        InvalidTypeException - if the value's type does not match the field's type.
        ClassNotLoadedException - if 'value' is not null, and the field type has not yet been loaded through the appropriate class loader.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • invokeMethod

        Value invokeMethod(ThreadReference thread,
                   Method method,
                   List<? extends Value> arguments,
                   int options)
            throws InvalidTypeException,
                   ClassNotLoadedException,
                   IncompatibleThreadStateException,
                   InvocationException
        Invokes the specified Method on this object in the target VM. The specified method can be defined in this object's class, in a superclass of this object's class, or in an interface implemented by this object. The method may be a static method or an instance method, but not a static initializer or constructor. Use ClassType.newInstance(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List<? extends com.sun.jdi.Value>, int) to create a new object and run its constructor.

        The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event which occurred in that thread. Method invocation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

        The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; this method does not return until the invoked method returns in the target VM. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

        Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. If the method being called accepts a variable number of arguments, then the last argument type is an array of some component type. The argument in the matching position can be omitted, or can be null, an array of the same component type, or an argument of the component type followed by any number of other arguments of the same type. If the argument is omitted, then a 0 length array of the component type is passed. The component type can be a primitive type. Autoboxing is not supported. See section 5.2 of The Java™ Language Specification for more information on assignment compatibility.

        By default, the method is invoked using dynamic lookup as documented in section 15.12.4.4 of The Java™ Language Specification in particular, overriding based on the runtime type of the object mirrored by this ObjectReference will occur. This behavior can be changed by specifying the INVOKE_NONVIRTUAL bit flag in the options argument. If this flag is set, the specified method is invoked whether or not it is overridden for this object's runtime type. The method, in this case, must not belong to an interface and must not be abstract. This option is useful for performing method invocations like those done with the super keyword in the Java programming language.

        By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation and thus a deadlock could still occur. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation. It is possible that breakpoints or other events might occur during the invocation. This can cause deadlocks as described above. It can also cause a deadlock if invokeMethod is called from the client's event handler thread. In this case, this thread will be waiting for the invokeMethod to complete and won't read the EventSet that comes in for the new event. If this new EventSet is SUSPEND_ALL, then a deadlock will occur because no one will resume the EventSet. To avoid this, all EventRequests should be disabled before doing the invokeMethod, or the invokeMethod should not be done from the client's event handler thread.

        The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

        If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

        Parameters:
        thread - the thread in which to invoke.
        method - the Method to invoke.
        arguments - the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.
        options - the integer bit flag options.
        Returns:
        a Value mirror of the invoked method's return value.
        Throws:
        IllegalArgumentException - if the method is not a member of this object's class, if the size of the argument list does not match the number of declared arguemnts for the method, if the method is a constructor or static intializer, or if INVOKE_NONVIRTUAL is specified and the method is either abstract or an interface member.
        {@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
        ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
        IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
        InvocationException - if the method invocation resulted in an exception in the target VM.
        InvalidTypeException - If the arguments do not meet this requirement -- Object arguments must be assignment compatible with the argument type. This implies that the argument type must be loaded through the enclosing class's class loader. Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • disableCollection

        void disableCollection()
        Prevents garbage collection for this object. By default all ObjectReference values returned by JDI may be collected at any time the target VM is running. A call to this method guarantees that the object will not be collected. enableCollection() can be used to allow collection once again.

        Calls to this method are counted. Every call to this method requires a corresponding call to enableCollection() before garbage collection is re-enabled.

        Note that while the target VM is suspended, no garbage collection will occur because all threads are suspended. The typical examination of variables, fields, and arrays during the suspension is safe without explicitly disabling garbage collection.

        This method should be used sparingly, as it alters the pattern of garbage collection in the target VM and, consequently, may result in application behavior under the debugger that differs from its non-debugged behavior.

        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only -see VirtualMachine.canBeModified().

      • enableCollection

        void enableCollection()
        Permits garbage collection for this object. By default all ObjectReference values returned by JDI may be collected at any time the target VM is running. A call to this method is necessary only if garbage collection was previously disabled with disableCollection().
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only -see VirtualMachine.canBeModified().

      • isCollected

        boolean isCollected()
        Determines if this object has been garbage collected in the target VM.
        Returns:
        true if this ObjectReference has been collected; false otherwise.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only -see VirtualMachine.canBeModified().

      • uniqueID

        long uniqueID()
        Returns a unique identifier for this ObjectReference. It is guaranteed to be unique among all ObjectReferences from the same VM that have not yet been disposed. The guarantee applies as long as this ObjectReference has not yet been disposed.
        Returns:
        a long unique ID

      • waitingThreads

        List<ThreadReference> waitingThreads()
                              throws IncompatibleThreadStateException
        Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor. See ThreadReference.currentContendedMonitor() for information about when a thread is considered to be waiting for a monitor.

        Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

        Returns:
        a List of ThreadReference objects. The list has zero length if no threads are waiting for the monitor.
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        IncompatibleThreadStateException - if any waiting thread is not suspended in the target VM

      • owningThread

        ThreadReference owningThread()
                      throws IncompatibleThreadStateException
        Returns an ThreadReference for the thread, if any, which currently owns this object's monitor. See ThreadReference.ownedMonitors() for a definition of ownership.

        Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

        Returns:
        the ThreadReference which currently owns the monitor, or null if it is unowned.
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        IncompatibleThreadStateException - if the owning thread is not suspended in the target VM

      • entryCount

        int entryCount()
        throws IncompatibleThreadStateException
        Returns the number times this object's monitor has been entered by the current owning thread. See ThreadReference.ownedMonitors() for a definition of ownership.

        Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

        Returns:
        the integer count of the number of entries.
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        IncompatibleThreadStateException - if the owning thread is not suspended in the target VM
        See Also:
        owningThread()

      • referringObjects

        List<ObjectReference> referringObjects(long maxReferrers)
        Returns objects that directly reference this object. Only objects that are reachable for the purposes of garbage collection are returned. Note that an object can also be referenced in other ways, such as from a local variable in a stack frame, or from a JNI global reference. Such non-object referrers are not returned by this method.

        Not all target virtual machines support this operation. Use VirtualMachine.canGetInstanceInfo() to determine if the operation is supported.

        Parameters:
        maxReferrers - The maximum number of referring objects to return. Must be non-negative. If zero, all referring objects are returned.
        Returns:
        a of List of ObjectReference objects. If there are no objects that reference this object, a zero-length list is returned..
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetInstanceInfo()
        IllegalArgumentException - if maxReferrers is less than zero.
        Since:
        1.6
        See Also:
        VirtualMachine.instanceCounts(List), ReferenceType.instances(long)

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this ObjectReference for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is an ObjectReference, if the ObjectReferences belong to the same VM, and if applying the "==" operator on the mirrored objects in that VM evaluates to true.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this ObjectReference.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


PathSearchingVirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface PathSearchingVirtualMachine

  • All Superinterfaces:
    Mirror, VirtualMachine

    @Exported
public interface PathSearchingVirtualMachine
extends VirtualMachine
    A virtual machine which searches for classes through paths
    Since:
    1.3

    • Field Summary

      • Fields inherited from interface com.sun.jdi.VirtualMachine

        TRACE_ALL, TRACE_EVENTS, TRACE_NONE, TRACE_OBJREFS, TRACE_RECEIVES, TRACE_REFTYPES, TRACE_SENDS

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String baseDirectory()
      Get the base directory used for path searching.
      List<String> bootClassPath()
      Get the boot class path for this virtual machine.
      List<String> classPath()
      Get the class path for this virtual machine.

      • Methods inherited from interface com.sun.jdi.VirtualMachine

        allClasses, allThreads, canAddMethod, canBeModified, canForceEarlyReturn, canGetBytecodes, canGetClassFileVersion, canGetConstantPool, canGetCurrentContendedMonitor, canGetInstanceInfo, canGetMethodReturnValues, canGetMonitorFrameInfo, canGetMonitorInfo, canGetOwnedMonitorInfo, canGetSourceDebugExtension, canGetSyntheticAttribute, canPopFrames, canRedefineClasses, canRequestMonitorEvents, canRequestVMDeathEvent, canUnrestrictedlyRedefineClasses, canUseInstanceFilters, canUseSourceNameFilters, canWatchFieldAccess, canWatchFieldModification, classesByName, description, dispose, eventQueue, eventRequestManager, exit, getDefaultStratum, instanceCounts, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOfVoid, name, process, redefineClasses, resume, setDebugTraceMode, setDefaultStratum, suspend, topLevelThreadGroups, version

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • classPath

        List<String> classPath()
        Get the class path for this virtual machine.
        Returns:
        List of components of the classpath, each represented by a String.

      • bootClassPath

        List<String> bootClassPath()
        Get the boot class path for this virtual machine.
        Returns:
        List of components of the boot class path, each represented by a String.

      • baseDirectory

        String baseDirectory()
        Get the base directory used for path searching. Relative directories in the class path and boot class path can be resolved through this directory name.
        Returns:
        the base directory.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


PrimitiveValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface PrimitiveValue

  • All Superinterfaces:
    Mirror, Value
    All Known Subinterfaces:
    BooleanValue, ByteValue, CharValue, DoubleValue, FloatValue, IntegerValue, LongValue, ShortValue

    @Exported
public interface PrimitiveValue
extends Value
    The value assigned to a field or variable of primitive type in a target VM. Each primitive values is accessed through a subinterface of this interface.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean booleanValue()
      Converts this value to a BooleanValue and returns the result as a boolean.
      byte byteValue()
      Converts this value to a ByteValue and returns the result as a byte.
      char charValue()
      Converts this value to a CharValue and returns the result as a char.
      double doubleValue()
      Converts this value to a DoubleValue and returns the result as a double.
      float floatValue()
      Converts this value to a FloatValue and returns the result as a float.
      int intValue()
      Converts this value to an IntegerValue and returns the result as an int.
      long longValue()
      Converts this value to a LongValue and returns the result as a long.
      short shortValue()
      Converts this value to a ShortValue and returns the result as a short.

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • booleanValue

        boolean booleanValue()
        Converts this value to a BooleanValue and returns the result as a boolean.
        Returns:
        true if this value is non-zero (or true if already a BooleanValue); false otherwise.

      • byteValue

        byte byteValue()
        Converts this value to a ByteValue and returns the result as a byte. The value will be narrowed as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a byte).
        Returns:
        the value, converted to byte

      • charValue

        char charValue()
        Converts this value to a CharValue and returns the result as a char. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a char, in the narrowing case).
        Returns:
        the value, converted to char

      • shortValue

        short shortValue()
        Converts this value to a ShortValue and returns the result as a short. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a short, in the narrowing case).
        Returns:
        the value, converted to short

      • intValue

        int intValue()
        Converts this value to an IntegerValue and returns the result as an int. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to an int, in the narrowing case).
        Returns:
        the value, converted to int

      • longValue

        long longValue()
        Converts this value to a LongValue and returns the result as a long. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a long, in the narrowing case).
        Returns:
        the value, converted to long

      • floatValue

        float floatValue()
        Converts this value to a FloatValue and returns the result as a float. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a float, in the narrowing case).
        Returns:
        the value, converted to float

      • doubleValue

        double doubleValue()
        Converts this value to a DoubleValue and returns the result as a double. The value will be widened as necessary, and precision information may be lost.
        Returns:
        the value, converted to double
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ReferenceType

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ReferenceType

  • All Superinterfaces:
    Accessible, Comparable<ReferenceType>, Mirror, Type
    All Known Subinterfaces:
    ArrayType, ClassType, InterfaceType

    @Exported
public interface ReferenceType
extends Type, Comparable<ReferenceType>, Accessible
    The type of an object in a target VM. ReferenceType encompasses classes, interfaces, and array types as defined in The Java™ Language Specification. All ReferenceType objects belong to one of the following subinterfaces: ClassType for classes, InterfaceType for interfaces, and ArrayType for arrays. Note that primitive classes (for example, the reflected type of Integer.TYPE) are represented as ClassType. The VM creates Class objects for all three, so from the VM perspective, each ReferenceType maps to a distinct Class object.

    ReferenceTypes can be obtained by querying a particular ObjectReference for its type or by getting a list of all reference types from the VirtualMachine.

    ReferenceType provides access to static type information such as methods and fields and provides access to dynamic type information such as the corresponding Class object and the classloader.

    Any method on ReferenceType which directly or indirectly takes ReferenceType as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

    Any method on ReferenceType which directly or indirectly takes ReferenceType as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

    Any method on ReferenceType or which directly or indirectly takes ReferenceType as parameter may throw ObjectCollectedException if the mirrored type has been unloaded.

    Since:
    1.3
    See Also:
    ObjectReference, ObjectReference.referenceType(), VirtualMachine, VirtualMachine.allClasses()

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<Field> allFields()
      Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
      List<Location> allLineLocations()
      Returns a list containing a Location object for each executable source line in this reference type.
      List<Location> allLineLocations(String stratum, String sourceName)
      Returns a list containing a Location object for each executable source line in this reference type.
      List<Method> allMethods()
      Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
      List<String> availableStrata()
      Return the available strata for this reference type.
      ClassLoaderReference classLoader()
      Gets the classloader object which loaded the class corresponding to this type.
      ClassObjectReference classObject()
      Returns the class object that corresponds to this type in the target VM.
      byte[] constantPool()
      Returns the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in the Java Virtual Machine Specification.
      int constantPoolCount()
      Returns the number of entries in the constant pool plus one.
      String defaultStratum()
      Returns the default stratum for this reference type.
      boolean equals(Object obj)
      Compares the specified Object with this ReferenceType for equality.
      boolean failedToInitialize()
      Determines if initialization failed for this class.
      Field fieldByName(String fieldName)
      Finds the visible Field with the given non-ambiguous name.
      List<Field> fields()
      Returns a list containing each Field declared in this type.
      String genericSignature()
      Gets the generic signature for this type if there is one.
      Value getValue(Field field)
      Gets the Value of a given static Field in this type.
      Map<Field,Value> getValues(List<? extends Field> fields)
      Returns a map containing the Value of each static Field in the given list.
      int hashCode()
      Returns the hash code value for this ObjectReference.
      List<ObjectReference> instances(long maxInstances)
      Returns instances of this ReferenceType.
      boolean isAbstract()
      Determines if this type was declared abstract.
      boolean isFinal()
      Determines if this type was declared final.
      boolean isInitialized()
      Determines if this type has been initialized.
      boolean isPrepared()
      Determines if this type has been prepared.
      boolean isStatic()
      Determines if this type was declared static.
      boolean isVerified()
      Determines if this type has been verified.
      List<Location> locationsOfLine(int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      List<Location> locationsOfLine(String stratum, String sourceName, int lineNumber)
      Returns a List containing all Location objects that map to the given line number.
      int majorVersion()
      Returns the class major version number, as defined in the class file format of the Java Virtual Machine Specification.
      List<Method> methods()
      Returns a list containing each Method declared directly in this type.
      List<Method> methodsByName(String name)
      Returns a List containing each visible Method that has the given name.
      List<Method> methodsByName(String name, String signature)
      Returns a List containing each visible Method that has the given name and signature.
      int minorVersion()
      Returns the class minor version number, as defined in the class file format of the Java Virtual Machine Specification.
      String name()
      Gets the fully qualified name of this type.
      List<ReferenceType> nestedTypes()
      Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine.
      String sourceDebugExtension()
      Get the source debug extension of this type.
      String sourceName()
      Gets an identifying name for the source corresponding to the declaration of this type.
      List<String> sourceNames(String stratum)
      Gets the identifying names for all the source corresponding to the declaration of this type.
      List<String> sourcePaths(String stratum)
      Gets the paths to the source corresponding to the declaration of this type.
      List<Field> visibleFields()
      Returns a list containing each unhidden and unambiguous Field in this type.
      List<Method> visibleMethods()
      Returns a list containing each Method declared or inherited by this type.

      • Methods inherited from interface com.sun.jdi.Type

        signature

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

    • Method Detail

      • name

        String name()
        Gets the fully qualified name of this type. The returned name is formatted as it might appear in a Java programming langauge declaration for objects of this type.

        For primitive classes the returned name is the name of the corresponding primitive type; for example, "int" is returned as the name of the class represented by Integer.TYPE.

        Specified by:
        name in interface Type
        Returns:
        a string containing the type name.

      • genericSignature

        String genericSignature()
        Gets the generic signature for this type if there is one. Generic signatures are described in the The Java™ Virtual Machine Specification.
        Returns:
        a string containing the generic signature, or null if there is no generic signature.
        Since:
        1.5

      • classLoader

        ClassLoaderReference classLoader()
        Gets the classloader object which loaded the class corresponding to this type.
        Returns:
        a ClassLoaderReference which mirrors the classloader, or null if the class was loaded through the bootstrap class loader.

      • sourceName

        String sourceName()
           throws AbsentInformationException
        Gets an identifying name for the source corresponding to the declaration of this type. Interpretation of this string is the responsibility of the source repository mechanism.

        The returned name is dependent on VM's default stratum (VirtualMachine.getDefaultStratum()). In the reference implementation, when using the base stratum, the returned string is the unqualified name of the source file containing the declaration of this type. In other strata the returned source name is the first source name for that stratum. Since other languages may have more than one source name for a reference type, the use of Location.sourceName() or sourceNames(String) is preferred.

        For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

        Returns:
        the string source file name
        Throws:
        AbsentInformationException - if the source name is not known

      • sourceNames

        List<String> sourceNames(String stratum)
                  throws AbsentInformationException
        Gets the identifying names for all the source corresponding to the declaration of this type. Interpretation of these names is the responsibility of the source repository mechanism.

        The returned names are for the specified stratum (see Location for a description of strata). In the reference implementation, when using the Java programming language stratum, the returned List contains one element: a String which is the unqualified name of the source file containing the declaration of this type. In other strata the returned source names are all the source names defined for that stratum.

        Parameters:
        stratum - The stratum to retrieve information from or null for the declaring type's default stratum.
        Returns:
        a List of String objects each representing a source name
        Throws:
        AbsentInformationException - if the source names are not known.

        For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

        Since:
        1.4

      • sourcePaths

        List<String> sourcePaths(String stratum)
                  throws AbsentInformationException
        Gets the paths to the source corresponding to the declaration of this type. Interpretation of these paths is the responsibility of the source repository mechanism.

        The returned paths are for the specified stratum (see Location for a description of strata). In the reference implementation, for strata which do not explicitly specify source path (the Java programming language stratum never does), the returned strings are the sourceNames(String) prefixed by the package name of this ReferenceType converted to a platform dependent path. For example, on a Windows platform, java.lang.Thread would return a List containing one element: "java\lang\Thread.java".

        Parameters:
        stratum - The stratum to retrieve information from or null for the declaring type's default stratum.
        Returns:
        a List of String objects each representing a source path
        Throws:
        AbsentInformationException - if the source names are not known.

        For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

        Since:
        1.4

      • sourceDebugExtension

        String sourceDebugExtension()
                     throws AbsentInformationException
        Get the source debug extension of this type.

        Not all target virtual machines support this operation. Use canGetSourceDebugExtension() to determine if the operation is supported.

        Returns:
        as a string the source debug extension attribute
        Throws:
        AbsentInformationException - if the extension is not specified
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetSourceDebugExtension(),

      • isStatic

        boolean isStatic()
        Determines if this type was declared static. Only nested types, can be declared static, so false is returned for any package-level type, array type, or primitive class.
        Returns:
        true if this type is static; false otherwise.

      • isAbstract

        boolean isAbstract()
        Determines if this type was declared abstract.

        For arrays (ArrayType) and primitive classes, the return value is undefined.

        Returns:
        true if this type is abstract; false otherwise.

      • isFinal

        boolean isFinal()
        Determines if this type was declared final.

        For arrays (ArrayType) and primitive classes, the return value is always true.

        Returns:
        true if this type is final; false otherwise.

      • isPrepared

        boolean isPrepared()
        Determines if this type has been prepared. See the JVM specification for a definition of class preparation.

        For arrays (ArrayType) and primitive classes, the return value is undefined.

        Returns:
        true if this type is prepared; false otherwise.

      • isVerified

        boolean isVerified()
        Determines if this type has been verified. See the JVM specification for a definition of class verification.

        For arrays (ArrayType) and primitive classes, the return value is undefined.

        Returns:
        true if this type is verified; false otherwise.

      • isInitialized

        boolean isInitialized()
        Determines if this type has been initialized. See the JVM specification for a definition of class verification. For InterfaceType, this method always returns the same value as isPrepared().

        For arrays (ArrayType) and primitive classes, the return value is undefined.

        Returns:
        true if this type is initialized; false otherwise.

      • failedToInitialize

        boolean failedToInitialize()
        Determines if initialization failed for this class. See the JVM specification for details on class initialization.

        For arrays (ArrayType) and primitive classes, the return value is undefined.

        Returns:
        true if initialization was attempted and failed; false otherwise.

      • fields

        List<Field> fields()
        Returns a list containing each Field declared in this type. Inherited fields are not included. Any synthetic fields created by the compiler are included in the list.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a list Field objects; the list has length 0 if no fields exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • visibleFields

        List<Field> visibleFields()
        Returns a list containing each unhidden and unambiguous Field in this type. Each field that can be accessed from the class or its instances with its simple name is included. Fields that are ambiguously multiply inherited or fields that are hidden by fields with the same name in a more recently inherited class cannot be accessed by their simple names and are not included in the returned list. All other inherited fields are included. See JLS section 8.3 for details.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a List of Field objects; the list has length 0 if no visible fields exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • allFields

        List<Field> allFields()
        Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited fields are included, regardless of whether they are hidden or multiply inherited.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a List of Field objects; the list has length 0 if no fields exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • fieldByName

        Field fieldByName(String fieldName)
        Finds the visible Field with the given non-ambiguous name. This method follows the inheritance rules specified in the JLS (8.3.3) to determine visibility.

        For arrays (ArrayType) and primitive classes, the returned value is always null.

        Parameters:
        fieldName - a String containing the name of desired field.
        Returns:
        a Field object which mirrors the found field, or null if there is no field with the given name or if the given name is ambiguous.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • methods

        List<Method> methods()
        Returns a list containing each Method declared directly in this type. Inherited methods are not included. Constructors, the initialization method if any, and any synthetic methods created by the compiler are included in the list.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a list Method objects; the list has length 0 if no methods exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • visibleMethods

        List<Method> visibleMethods()
        Returns a list containing each Method declared or inherited by this type. Methods from superclasses or superinterfaces that that have been hidden or overridden are not included.

        Note that despite this exclusion, multiple inherited methods with the same signature can be present in the returned list, but at most one can be a member of a ClassType. See JLS section 8.4.6 for details.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a List of Method objects; the list has length 0 if no visible methods exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • allMethods

        List<Method> allMethods()
        Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited methods are included, regardless of whether they are hidden or overridden.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a List of Method objects; the list has length 0 if no methods exist.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • methodsByName

        List<Method> methodsByName(String name)
        Returns a List containing each visible Method that has the given name. This is most commonly used to find overloaded methods.

        Overridden and hidden methods are not included. See JLS (8.4.6) for details.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Parameters:
        name - the name of the method to find.
        Returns:
        a List of Method objects that match the given name; the list has length 0 if no matching methods are found.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • methodsByName

        List<Method> methodsByName(String name,
                           String signature)
        Returns a List containing each visible Method that has the given name and signature. The signature string is the JNI signature for the target method:
        • ()V
        • ([Ljava/lang/String;)V
        • (IIII)Z
        This method follows the inheritance rules specified in the JLS (8.4.6) to determine visibility.

        At most one method in the list is a concrete method and a component of ClassType; any other methods in the list are abstract. Use ClassType.concreteMethodByName(java.lang.String, java.lang.String) to retrieve only the matching concrete method.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Parameters:
        name - the name of the method to find.
        signature - the signature of the method to find
        Returns:
        a List of Method objects that match the given name and signature; the list has length 0 if no matching methods are found.
        Throws:
        ClassNotPreparedException - if this class not yet been prepared.

      • nestedTypes

        List<ReferenceType> nestedTypes()
        Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine. Both static nested types and non-static nested types (that is, inner types) are included. Local inner types (declared within a code block somewhere in this reference type) are also included in the returned list.

        For arrays (ArrayType) and primitive classes, the returned list is always empty.

        Returns:
        a List of nested ReferenceType objects; the list has 0 length if there are no nested types.

      • getValue

        Value getValue(Field field)
        Gets the Value of a given static Field in this type. The Field must be valid for this type; that is, it must be declared in this type, a superclass, a superinterface, or an implemented interface.
        Parameters:
        field - the field containing the requested value
        Returns:
        the Value of the instance field.
        Throws:
        IllegalArgumentException - if the field is not valid for this object's class.

      • getValues

        Map<Field,Value> getValues(List<? extends Field> fields)
        Returns a map containing the Value of each static Field in the given list. The Fields must be valid for this type; that is, they must be declared in this type, a superclass, a superinterface, or an implemented interface.
        Parameters:
        fields - a list of Field objects containing the requested values.
        Returns:
        a Map of the requested Field objects with their Value.
        Throws:
        IllegalArgumentException - if any field is not valid for this object's class.
        VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

      • classObject

        ClassObjectReference classObject()
        Returns the class object that corresponds to this type in the target VM. The VM creates class objects for every kind of ReferenceType: classes, interfaces, and array types.
        Returns:
        the ClassObjectReference for this reference type in the target VM.

      • allLineLocations

        List<Location> allLineLocations()
                         throws AbsentInformationException
        Returns a list containing a Location object for each executable source line in this reference type.

        This method is equivalent to allLineLocations(vm.getDefaultStratum(),null) - see allLineLocations(String,String) for more information.

        Throws:
        AbsentInformationException - if there is no line number information for this class and there are non-native, non-abstract executable members of this class.
        ClassNotPreparedException - if this class not yet been prepared.

      • allLineLocations

        List<Location> allLineLocations(String stratum,
                                String sourceName)
                         throws AbsentInformationException
        Returns a list containing a Location object for each executable source line in this reference type. Each location maps a source line to a range of code indices. The beginning of the range can be determined through Location.codeIndex(). The returned list may contain multiple locations for a particular line number, if the compiler and/or VM has mapped that line to two or more disjoint code index ranges. Note that it is possible for the same source line to represent different code index ranges in different methods.

        For arrays (ArrayType) and primitive classes, the returned list is always empty. For interfaces (InterfaceType), the returned list will be non-empty only if the interface has executable code in its class initialization.

        Returned list is for the specified stratum (see Location for a description of strata).

        Parameters:
        stratum - The stratum to retrieve information from or null for the defaultStratum().
        sourceName - Return locations only within this source file or null to return locations.
        Returns:
        a List of all source line Location objects.
        Throws:
        AbsentInformationException - if there is no line number information for this class and there are non-native, non-abstract executable members of this class. Or if sourceName is non-null and source name information is not present.
        ClassNotPreparedException - if this class not yet been prepared.
        Since:
        1.4

      • locationsOfLine

        List<Location> locationsOfLine(int lineNumber)
                        throws AbsentInformationException
        Returns a List containing all Location objects that map to the given line number.

        This method is equivalent to locationsOfLine(vm.getDefaultStratum(), null, lineNumber) - see locationsOfLine(java.lang.String,java.lang.String,int) for more information.

        Parameters:
        lineNumber - the line number
        Returns:
        a List of all Location objects that map to the given line.
        Throws:
        AbsentInformationException - if there is no line number information for this class.
        ClassNotPreparedException - if this class not yet been prepared.
        See Also:
        VirtualMachine.getDefaultStratum()

      • locationsOfLine

        List<Location> locationsOfLine(String stratum,
                               String sourceName,
                               int lineNumber)
                        throws AbsentInformationException
        Returns a List containing all Location objects that map to the given line number.

        For arrays (ArrayType) and primitive classes, the returned list is always empty. For interfaces (InterfaceType), the returned list will be non-empty only if the interface has executable code in its class initialization at the specified line number. An empty list will be returned if there is no executable code at the specified line number.

        Returned list is for the specified stratum (see Location for a description of strata).

        Parameters:
        stratum - the stratum to use for comparing line number and source name, or null to use the defaultStratum().
        sourceName - the source name containing the line number, or null to match all source names
        lineNumber - the line number
        Returns:
        a List of all Location objects that map to the given line.
        Throws:
        AbsentInformationException - if there is no line number information for this class. Or if sourceName is non-null and source name information is not present.
        ClassNotPreparedException - if this class not yet been prepared.
        Since:
        1.4

      • availableStrata

        List<String> availableStrata()
        Return the available strata for this reference type.

        See the Location for a description of strata.

        Returns:
        List of java.lang.String, each representing a stratum
        Since:
        1.4

      • defaultStratum

        String defaultStratum()
        Returns the default stratum for this reference type. This value is specified in the class file and cannot be set by the user. If the class file does not specify a default stratum the base stratum ("Java") will be returned.

        See the Location for a description of strata.

        Since:
        1.4

      • instances

        List<ObjectReference> instances(long maxInstances)
        Returns instances of this ReferenceType. Only instances that are reachable for the purposes of garbage collection are returned.

        Not all target virtual machines support this operation. Use VirtualMachine.canGetInstanceInfo() to determine if the operation is supported.

        Parameters:
        maxInstances - the maximum number of instances to return. Must be non-negative. If zero, all instances are returned.
        Returns:
        a List of ObjectReference objects. If there are no instances of this ReferenceType, a zero-length list is returned.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetInstanceInfo()
        IllegalArgumentException - if maxInstances is less than zero.
        Since:
        1.6
        See Also:
        VirtualMachine.instanceCounts(List), ObjectReference.referringObjects(long)

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this ReferenceType for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a ReferenceType, if the ReferenceTypes belong to the same VM, and if they mirror classes which correspond to the same instance of java.lang.Class in that VM.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this ObjectReference.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

      • majorVersion

        int majorVersion()
        Returns the class major version number, as defined in the class file format of the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned major version number value is zero. Not all target virtual machines support this operation. Use VirtualMachine.canGetClassFileVersion() to determine if the operation is supported.
        Returns:
        the major version number of the class.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetClassFileVersion()
        Since:
        1.6

      • minorVersion

        int minorVersion()
        Returns the class minor version number, as defined in the class file format of the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned minor version number value is zero. Not all target virtual machines support this operation. Use VirtualMachine.canGetClassFileVersion() to determine if the operation is supported.
        Returns:
        the minor version number of the class.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetClassFileVersion()
        Since:
        1.6

      • constantPoolCount

        int constantPoolCount()
        Returns the number of entries in the constant pool plus one. This corresponds to the constant_pool_count item of the Class File Format in the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned constant pool count value is zero. Not all target virtual machines support this operation. Use VirtualMachine.canGetConstantPool() to determine if the operation is supported.
        Returns:
        total number of constant pool entries for a class plus one.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetConstantPool()
        Since:
        1.6
        See Also:
        constantPool()

      • constantPool

        byte[] constantPool()
        Returns the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in the Java Virtual Machine Specification. The format of the constant pool may differ between versions of the Class File Format, so, the minor and major class version numbers should be checked for compatibility. For arrays (ArrayType) and primitive classes, a zero length byte array is returned. Not all target virtual machines support this operation. Use VirtualMachine.canGetConstantPool() to determine if the operation is supported.
        Returns:
        the raw bytes of constant pool.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetConstantPool()
        Since:
        1.6
        See Also:
        constantPoolCount()
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


request

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

@Exported

Package com.sun.jdi.request

This package is used to request that a JDI event be sent under specified conditions.

See: Description

  • Interface Summary
    Interface Description
    AccessWatchpointRequest
    Request for notification when the contents of a field are accessed in the target VM.
    BreakpointRequest
    Identifies a Location in the target VM at which execution should be stopped.
    ClassPrepareRequest
    Request for notification when a class is prepared in the target VM.
    ClassUnloadRequest
    Request for notification when a class is unloaded in the target VM.
    EventRequest
    Represents a request for notification of an event.
    EventRequestManager
    Manages the creation and deletion of EventRequests.
    ExceptionRequest
    Request for notification when an exception occurs in the target VM.
    MethodEntryRequest
    Request for notification when a method is invoked in the target VM.
    MethodExitRequest
    Request for notification when a method returns in the target VM.
    ModificationWatchpointRequest
    Request for notification when a field is set.
    MonitorContendedEnteredRequest
    Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread.
    MonitorContendedEnterRequest
    Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread.
    MonitorWaitedRequest
    Request for notification when a thread in the target VM has finished waiting on a monitor object.
    MonitorWaitRequest
    Request for notification when a thread in the target VM is about to wait on a monitor object.
    StepRequest
    Request for notification when a step occurs in the target VM.
    ThreadDeathRequest
    Request for notification when a thread terminates in the target VM.
    ThreadStartRequest
    Request for notification when a thread starts execution in the target VM.
    VMDeathRequest
    Request for notification when the target VM terminates.
    WatchpointRequest
    Identifies a Field in the target VM being watched.
  • Exception Summary
    Exception Description
    DuplicateRequestException
    Thrown to indicate a duplicate event request.
    InvalidRequestStateException
    Thrown to indicate that the requested event cannot be modified because it is enabled.

Package com.sun.jdi.request Description

This package is used to request that a JDI event be sent under specified conditions. With the exception of termination events, which are always sent, there is one kind of EventRequest for each kind of Event - for example, BreakpointRequest is used to request a BreakpointEvent. Event requests are created by the EventRequestManager. Events and event processing are defined in the com.sun.jdi.event package.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


AccessWatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface AccessWatchpointRequest

  • All Superinterfaces:
    EventRequest, Mirror, WatchpointRequest

    @Exported
public interface AccessWatchpointRequest
extends WatchpointRequest
    Request for notification when the contents of a field are accessed in the target VM. This event will be triggered when the specified field is accessed by JavaTM programming language code or by a Java Native Interface (JNI) get function (Get<Type>Field, GetStatic<Type>Field). Access by JDI does not trigger this event. When an enabled AccessWatchpointRequest is satisfied, an event set containing an AccessWatchpointEvent will be placed on the EventQueue. The collection of existing ExceptionRequests is managed by the EventRequestManager The collection of existing watchpoints is managed by the EventRequestManager.

    Note that the modification of a Field is not considered an access.

    Since:
    1.3
    See Also:
    ModificationWatchpointRequest, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      • Methods inherited from interface com.sun.jdi.request.WatchpointRequest

        addClassExclusionFilter, addClassFilter, addClassFilter, addInstanceFilter, addThreadFilter, field

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


com.sun.jdi.request Class Hierarchy

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Hierarchy For Package com.sun.jdi.request

Package Hierarchies:
  • All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.request.DuplicateRequestException
          • com.sun.jdi.request.InvalidRequestStateException

Interface Hierarchy

  • com.sun.jdi.Locatable
    • com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.request.EventRequest)
  • com.sun.jdi.Mirror
    • com.sun.jdi.request.EventRequest
      • com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.Locatable)
      • com.sun.jdi.request.ClassPrepareRequest
      • com.sun.jdi.request.ClassUnloadRequest
      • com.sun.jdi.request.ExceptionRequest
      • com.sun.jdi.request.MethodEntryRequest
      • com.sun.jdi.request.MethodExitRequest
      • com.sun.jdi.request.MonitorContendedEnteredRequest
      • com.sun.jdi.request.MonitorContendedEnterRequest
      • com.sun.jdi.request.MonitorWaitedRequest
      • com.sun.jdi.request.MonitorWaitRequest
      • com.sun.jdi.request.StepRequest
      • com.sun.jdi.request.ThreadDeathRequest
      • com.sun.jdi.request.ThreadStartRequest
      • com.sun.jdi.request.VMDeathRequest
      • com.sun.jdi.request.WatchpointRequest
        • com.sun.jdi.request.AccessWatchpointRequest
        • com.sun.jdi.request.ModificationWatchpointRequest
    • com.sun.jdi.request.EventRequestManager
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ModificationWatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ModificationWatchpointRequest

  • All Superinterfaces:
    EventRequest, Mirror, WatchpointRequest

    @Exported
public interface ModificationWatchpointRequest
extends WatchpointRequest
    Request for notification when a field is set. This event will be triggered when a value is assigned to the specified field with a JavaTM programming language statement (assignment, increment, etc) or by a Java Native Interface (JNI) set function (Set<Type>Field, SetStatic<Type>Field). Setting a field to a value which is the same as the previous value still triggers this event. Modification by JDI does not trigger this event. When an enabled ModificationWatchpointRequest is satisfied, an event set containing a ModificationWatchpointEvent will be placed on the EventQueue. The collection of existing watchpoints is managed by the EventRequestManager.
    Since:
    1.3
    See Also:
    ModificationWatchpointEvent, AccessWatchpointRequest, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      • Methods inherited from interface com.sun.jdi.request.WatchpointRequest

        addClassExclusionFilter, addClassFilter, addClassFilter, addInstanceFilter, addThreadFilter, field

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Package com.sun.jdi.request

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Package
com.sun.jdi.request

  • Packages that use com.sun.jdi.request
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.
  • Classes in com.sun.jdi.request used by com.sun.jdi
    Class and Description
    EventRequestManager
    Manages the creation and deletion of EventRequests.
  • Classes in com.sun.jdi.request used by com.sun.jdi.event
    Class and Description
    EventRequest
    Represents a request for notification of an event.
  • Classes in com.sun.jdi.request used by com.sun.jdi.request
    Class and Description
    AccessWatchpointRequest
    Request for notification when the contents of a field are accessed in the target VM.
    BreakpointRequest
    Identifies a Location in the target VM at which execution should be stopped.
    ClassPrepareRequest
    Request for notification when a class is prepared in the target VM.
    ClassUnloadRequest
    Request for notification when a class is unloaded in the target VM.
    EventRequest
    Represents a request for notification of an event.
    ExceptionRequest
    Request for notification when an exception occurs in the target VM.
    MethodEntryRequest
    Request for notification when a method is invoked in the target VM.
    MethodExitRequest
    Request for notification when a method returns in the target VM.
    ModificationWatchpointRequest
    Request for notification when a field is set.
    MonitorContendedEnteredRequest
    Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread.
    MonitorContendedEnterRequest
    Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread.
    MonitorWaitedRequest
    Request for notification when a thread in the target VM has finished waiting on a monitor object.
    MonitorWaitRequest
    Request for notification when a thread in the target VM is about to wait on a monitor object.
    StepRequest
    Request for notification when a step occurs in the target VM.
    ThreadDeathRequest
    Request for notification when a thread terminates in the target VM.
    ThreadStartRequest
    Request for notification when a thread starts execution in the target VM.
    VMDeathRequest
    Request for notification when the target VM terminates.
    WatchpointRequest
    Identifies a Field in the target VM being watched.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMDeathRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface VMDeathRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface VMDeathRequest
extends EventRequest
    Request for notification when the target VM terminates. When an enabled VMDeathRequest is satisfied, an event set containing a VMDeathEvent will be placed on the EventQueue. The collection of existing VMDeathRequests is managed by the EventRequestManager

    Even without creating a VMDeathRequest, a single unsolicited VMDeathEvent will be sent with a suspend policy of SUSPEND_NONE. This request would typically be created so that a VMDeathEvent with a suspend policy of SUSPEND_ALL will be sent. This event can be used to assure completion of any processing which requires the VM to be alive (e.g. event processing). Note: the unsolicited VMDeathEvent will still be sent.

    Since:
    1.4
    See Also:
    VMDeathEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


BreakpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface BreakpointRequest

  • All Superinterfaces:
    EventRequest, Locatable, Mirror

    @Exported
public interface BreakpointRequest
extends EventRequest, Locatable
    Identifies a Location in the target VM at which execution should be stopped. When an enabled BreakpointRequest is satisfied, an event set containing an BreakpointEvent will be placed on the EventQueue and the application is interrupted. The collection of existing breakpoints is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    Location, BreakpointEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      Location location()
      Returns the location of the requested breakpoint.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • location

        Location location()
        Returns the location of the requested breakpoint.
        Specified by:
        location in interface Locatable
        Returns:
        the Location where this breakpoint has been set.

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.request.DuplicateRequestException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.request.DuplicateRequestException

No usage of com.sun.jdi.request.DuplicateRequestException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Class com.sun.jdi.request.InvalidRequestStateException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Class
com.sun.jdi.request.InvalidRequestStateException

No usage of com.sun.jdi.request.InvalidRequestStateException
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.AccessWatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.AccessWatchpointRequest

  • Packages that use AccessWatchpointRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of AccessWatchpointRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return AccessWatchpointRequest
      Modifier and Type Method and Description
      AccessWatchpointRequest EventRequestManager.createAccessWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
      Methods in com.sun.jdi.request that return types with arguments of type AccessWatchpointRequest
      Modifier and Type Method and Description
      List<AccessWatchpointRequest> EventRequestManager.accessWatchpointRequests()
      Return an unmodifiable list of the enabled and disabled access watchpoint requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.BreakpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.BreakpointRequest

  • Packages that use BreakpointRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of BreakpointRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return BreakpointRequest
      Modifier and Type Method and Description
      BreakpointRequest EventRequestManager.createBreakpointRequest(Location location)
      Creates a new disabled BreakpointRequest.
      Methods in com.sun.jdi.request that return types with arguments of type BreakpointRequest
      Modifier and Type Method and Description
      List<BreakpointRequest> EventRequestManager.breakpointRequests()
      Return an unmodifiable list of the enabled and disabled breakpoint requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ClassPrepareRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ClassPrepareRequest

  • Packages that use ClassPrepareRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ClassPrepareRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ClassPrepareRequest
      Modifier and Type Method and Description
      ClassPrepareRequest EventRequestManager.createClassPrepareRequest()
      Creates a new disabled ClassPrepareRequest.
      Methods in com.sun.jdi.request that return types with arguments of type ClassPrepareRequest
      Modifier and Type Method and Description
      List<ClassPrepareRequest> EventRequestManager.classPrepareRequests()
      Return an unmodifiable list of the enabled and disabled class prepare requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ClassUnloadRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ClassUnloadRequest

  • Packages that use ClassUnloadRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ClassUnloadRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ClassUnloadRequest
      Modifier and Type Method and Description
      ClassUnloadRequest EventRequestManager.createClassUnloadRequest()
      Creates a new disabled ClassUnloadRequest.
      Methods in com.sun.jdi.request that return types with arguments of type ClassUnloadRequest
      Modifier and Type Method and Description
      List<ClassUnloadRequest> EventRequestManager.classUnloadRequests()
      Return an unmodifiable list of the enabled and disabled class unload requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.EventRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.EventRequest

  • Packages that use EventRequest
    Package Description
    com.sun.jdi.event
    This package defines JDI events and event processing.
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of EventRequest in com.sun.jdi.event

      Methods in com.sun.jdi.event that return EventRequest
      Modifier and Type | Method and Description
      EventRequest | Event.request()

    • Uses of EventRequest in com.sun.jdi.request

      Subinterfaces of EventRequest in com.sun.jdi.request
      Modifier and Type Interface and Description
      interface  AccessWatchpointRequest
      Request for notification when the contents of a field are accessed in the target VM.
      interface  BreakpointRequest
      Identifies a Location in the target VM at which execution should be stopped.
      interface  ClassPrepareRequest
      Request for notification when a class is prepared in the target VM.
      interface  ClassUnloadRequest
      Request for notification when a class is unloaded in the target VM.
      interface  ExceptionRequest
      Request for notification when an exception occurs in the target VM.
      interface  MethodEntryRequest
      Request for notification when a method is invoked in the target VM.
      interface  MethodExitRequest
      Request for notification when a method returns in the target VM.
      interface  ModificationWatchpointRequest
      Request for notification when a field is set.
      interface  MonitorContendedEnteredRequest
      Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread.
      interface  MonitorContendedEnterRequest
      Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread.
      interface  MonitorWaitedRequest
      Request for notification when a thread in the target VM has finished waiting on a monitor object.
      interface  MonitorWaitRequest
      Request for notification when a thread in the target VM is about to wait on a monitor object.
      interface  StepRequest
      Request for notification when a step occurs in the target VM.
      interface  ThreadDeathRequest
      Request for notification when a thread terminates in the target VM.
      interface  ThreadStartRequest
      Request for notification when a thread starts execution in the target VM.
      interface  VMDeathRequest
      Request for notification when the target VM terminates.
      interface  WatchpointRequest
      Identifies a Field in the target VM being watched.
      Methods in com.sun.jdi.request with parameters of type EventRequest
      Modifier and Type Method and Description
      void EventRequestManager.deleteEventRequest(EventRequest eventRequest)
      Removes an eventRequest.
      Method parameters in com.sun.jdi.request with type arguments of type EventRequest
      Modifier and Type Method and Description
      void EventRequestManager.deleteEventRequests(List<? extends EventRequest> eventRequests)
      Removes a list of EventRequests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.EventRequestManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.EventRequestManager

  • Packages that use EventRequestManager
    Package Description
    com.sun.jdi
    This is the core package of the Java Debug Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

    • Uses of EventRequestManager in com.sun.jdi

      Methods in com.sun.jdi that return EventRequestManager
      Modifier and Type Method and Description
      EventRequestManager VirtualMachine.eventRequestManager()
      Returns the event request manager for this virtual machine.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ExceptionRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ExceptionRequest

  • Packages that use ExceptionRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ExceptionRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ExceptionRequest
      Modifier and Type Method and Description
      ExceptionRequest EventRequestManager.createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)
      Creates a new disabled ExceptionRequest.
      Methods in com.sun.jdi.request that return types with arguments of type ExceptionRequest
      Modifier and Type Method and Description
      List<ExceptionRequest> EventRequestManager.exceptionRequests()
      Return an unmodifiable list of the enabled and disabled exception requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MethodEntryRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MethodEntryRequest

  • Packages that use MethodEntryRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MethodEntryRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MethodEntryRequest
      Modifier and Type Method and Description
      MethodEntryRequest EventRequestManager.createMethodEntryRequest()
      Creates a new disabled MethodEntryRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MethodEntryRequest
      Modifier and Type Method and Description
      List<MethodEntryRequest> EventRequestManager.methodEntryRequests()
      Return an unmodifiable list of the enabled and disabled method entry requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MethodExitRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MethodExitRequest

  • Packages that use MethodExitRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MethodExitRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MethodExitRequest
      Modifier and Type Method and Description
      MethodExitRequest EventRequestManager.createMethodExitRequest()
      Creates a new disabled MethodExitRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MethodExitRequest
      Modifier and Type Method and Description
      List<MethodExitRequest> EventRequestManager.methodExitRequests()
      Return an unmodifiable list of the enabled and disabled method exit requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ModificationWatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ModificationWatchpointRequest

  • Packages that use ModificationWatchpointRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ModificationWatchpointRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ModificationWatchpointRequest
      Modifier and Type Method and Description
      ModificationWatchpointRequest EventRequestManager.createModificationWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
      Methods in com.sun.jdi.request that return types with arguments of type ModificationWatchpointRequest
      Modifier and Type Method and Description
      List<ModificationWatchpointRequest> EventRequestManager.modificationWatchpointRequests()
      Return an unmodifiable list of the enabled and disabled modification watchpoint requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MonitorContendedEnteredRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MonitorContendedEnteredRequest

  • Packages that use MonitorContendedEnteredRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MonitorContendedEnteredRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MonitorContendedEnteredRequest
      Modifier and Type Method and Description
      MonitorContendedEnteredRequest EventRequestManager.createMonitorContendedEnteredRequest()
      Creates a new disabled MonitorContendedEnteredRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MonitorContendedEnteredRequest
      Modifier and Type Method and Description
      List<MonitorContendedEnteredRequest> EventRequestManager.monitorContendedEnteredRequests()
      Return an unmodifiable list of the enabled and disabled monitor contended entered requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MonitorContendedEnterRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MonitorContendedEnterRequest

  • Packages that use MonitorContendedEnterRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MonitorContendedEnterRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MonitorContendedEnterRequest
      Modifier and Type Method and Description
      MonitorContendedEnterRequest EventRequestManager.createMonitorContendedEnterRequest()
      Creates a new disabled MonitorContendedEnterRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MonitorContendedEnterRequest
      Modifier and Type Method and Description
      List<MonitorContendedEnterRequest> EventRequestManager.monitorContendedEnterRequests()
      Return an unmodifiable list of the enabled and disabled monitor contended enter requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MonitorWaitedRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MonitorWaitedRequest

  • Packages that use MonitorWaitedRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MonitorWaitedRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MonitorWaitedRequest
      Modifier and Type Method and Description
      MonitorWaitedRequest EventRequestManager.createMonitorWaitedRequest()
      Creates a new disabled MonitorWaitedRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MonitorWaitedRequest
      Modifier and Type Method and Description
      List<MonitorWaitedRequest> EventRequestManager.monitorWaitedRequests()
      Return an unmodifiable list of the enabled and disabled monitor waited requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.MonitorWaitRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.MonitorWaitRequest

  • Packages that use MonitorWaitRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of MonitorWaitRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return MonitorWaitRequest
      Modifier and Type Method and Description
      MonitorWaitRequest EventRequestManager.createMonitorWaitRequest()
      Creates a new disabled MonitorWaitRequest.
      Methods in com.sun.jdi.request that return types with arguments of type MonitorWaitRequest
      Modifier and Type Method and Description
      List<MonitorWaitRequest> EventRequestManager.monitorWaitRequests()
      Return an unmodifiable list of the enabled and disabled monitor wait requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.StepRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.StepRequest

  • Packages that use StepRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of StepRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return StepRequest
      Modifier and Type Method and Description
      StepRequest EventRequestManager.createStepRequest(ThreadReference thread, int size, int depth)
      Creates a new disabled StepRequest.
      Methods in com.sun.jdi.request that return types with arguments of type StepRequest
      Modifier and Type Method and Description
      List<StepRequest> EventRequestManager.stepRequests()
      Return an unmodifiable list of the enabled and disabled step requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ThreadDeathRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ThreadDeathRequest

  • Packages that use ThreadDeathRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ThreadDeathRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ThreadDeathRequest
      Modifier and Type Method and Description
      ThreadDeathRequest EventRequestManager.createThreadDeathRequest()
      Creates a new disabled ThreadDeathRequest.
      Methods in com.sun.jdi.request that return types with arguments of type ThreadDeathRequest
      Modifier and Type Method and Description
      List<ThreadDeathRequest> EventRequestManager.threadDeathRequests()
      Return an unmodifiable list of the enabled and disabled thread death requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.ThreadStartRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.ThreadStartRequest

  • Packages that use ThreadStartRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of ThreadStartRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return ThreadStartRequest
      Modifier and Type Method and Description
      ThreadStartRequest EventRequestManager.createThreadStartRequest()
      Creates a new disabled ThreadStartRequest.
      Methods in com.sun.jdi.request that return types with arguments of type ThreadStartRequest
      Modifier and Type Method and Description
      List<ThreadStartRequest> EventRequestManager.threadStartRequests()
      Return an unmodifiable list of the enabled and disabled thread start requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.VMDeathRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.VMDeathRequest

  • Packages that use VMDeathRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of VMDeathRequest in com.sun.jdi.request

      Methods in com.sun.jdi.request that return VMDeathRequest
      Modifier and Type Method and Description
      VMDeathRequest EventRequestManager.createVMDeathRequest()
      Creates a new disabled VMDeathRequest.
      Methods in com.sun.jdi.request that return types with arguments of type VMDeathRequest
      Modifier and Type Method and Description
      List<VMDeathRequest> EventRequestManager.vmDeathRequests()
      Return an unmodifiable list of the enabled and disabled VM death requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Uses of Interface com.sun.jdi.request.WatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Uses of Interface
com.sun.jdi.request.WatchpointRequest

  • Packages that use WatchpointRequest
    Package Description
    com.sun.jdi.request
    This package is used to request that a JDI event be sent under specified conditions.

    • Uses of WatchpointRequest in com.sun.jdi.request

      Subinterfaces of WatchpointRequest in com.sun.jdi.request
      Modifier and Type Interface and Description
      interface  AccessWatchpointRequest
      Request for notification when the contents of a field are accessed in the target VM.
      interface  ModificationWatchpointRequest
      Request for notification when a field is set.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassPrepareRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ClassPrepareRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface ClassPrepareRequest
extends EventRequest
    Request for notification when a class is prepared in the target VM. When an enabled ClassPrepareRequest is satisfied, an event set containing a ClassPrepareEvent will be placed on the EventQueue. The collection of existing ClassPrepareRequests is managed by the EventRequestManager

    Class preparation is defined in the Java Virtual Machine Specification.

    Since:
    1.3
    See Also:
    ClassPrepareEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression.
      void addSourceNameFilter(String sourceNamePattern)
      Restricts the events generated by this request to the preparation of reference types for which the restricted regular expression 'sourceNamePattern' matches one of the 'sourceNames' for the reference type being prepared.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to be the preparation of the given reference type and any subtypes. An event will be generated for any prepared reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addSourceNameFilter

        void addSourceNameFilter(String sourceNamePattern)
        Restricts the events generated by this request to the preparation of reference types for which the restricted regular expression 'sourceNamePattern' matches one of the 'sourceNames' for the reference type being prepared. That is, if refType is the ReferenceType being prepared, then there exists at least one stratum, call it 'someStratum' on the list returned by refType.availableStrata(); such that a name on the list returned by refType.sourceNames(someStratam) matches 'sourceNamePattern'. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".

        Not all targets support this operation. Use VirtualMachine.canUseSourceNameFilters() to determine if the operation is supported.

        Parameters:
        sourceNamePattern - the pattern string to filter for.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ClassUnloadRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ClassUnloadRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface ClassUnloadRequest
extends EventRequest
    Request for notification when a class is unloaded in the target VM. When an enabled ClassUnloadRequest is satisfied, a event set containing an ClassUnloadEvent will be placed on the EventQueue. The collection of existing ClassUnloadRequests is managed by the EventRequestManager

    Refer to the Java Virtual Machine Specification for more information on class unloading.

    Since:
    1.3
    See Also:
    ClassUnloadEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


DuplicateRequestException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Class DuplicateRequestException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.request.DuplicateRequestException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class DuplicateRequestException
extends RuntimeException
    Thrown to indicate a duplicate event request.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      DuplicateRequestException()
      DuplicateRequestException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • DuplicateRequestException

        public DuplicateRequestException()

      • DuplicateRequestException

        public DuplicateRequestException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


EventRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface EventRequest

  • All Superinterfaces:
    Mirror
    All Known Subinterfaces:
    AccessWatchpointRequest, BreakpointRequest, ClassPrepareRequest, ClassUnloadRequest, ExceptionRequest, MethodEntryRequest, MethodExitRequest, ModificationWatchpointRequest, MonitorContendedEnteredRequest, MonitorContendedEnterRequest, MonitorWaitedRequest, MonitorWaitRequest, StepRequest, ThreadDeathRequest, ThreadStartRequest, VMDeathRequest, WatchpointRequest

    @Exported
public interface EventRequest
extends Mirror
    Represents a request for notification of an event. Examples include BreakpointRequest and ExceptionRequest. When an event occurs for which an enabled request is present, an EventSet will be placed on the EventQueue. The collection of existing event requests is managed by the EventRequestManager.

    The number of events generated for an event request can be controlled through filters. Filters provide additional constraints that an event must satisfy before it is placed on the event queue. Multiple filters can be used by making multiple calls to filter addition methods such as ExceptionRequest.addClassFilter(java.lang.String classPattern). Filters are added to an event one at a time only while the event is disabled. Multiple filters are applied with CUT-OFF AND, in the order it was added to the request. Only events that satisfy all filters are placed in the event queue.

    The set of available filters is dependent on the event request, some examples of filters are:

    • Thread filters allow control over the thread for which events are generated.
    • Class filters allow control over the class in which the event occurs.
    • Instance filters allow control over the instance in which the event occurs.
    • Count filters allow control over the number of times an event is reported.
    Filters can dramatically improve debugger performance by reducing the amount of event traffic sent from the target VM to the debugger VM.

    Any method on EventRequest which takes EventRequest as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

    Any method on EventRequest which takes EventRequest as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

    Since:
    1.3
    See Also:
    BreakpointEvent, EventQueue, EventRequestManager

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int SUSPEND_ALL
      Suspend all threads when the event occurs
      static int SUSPEND_EVENT_THREAD
      Suspend only the thread which generated the event when the event occurs
      static int SUSPEND_NONE
      Suspend no threads when the event occurs

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addCountFilter(int count)
      Limit the requested event to be reported at most once after a given number of occurrences.
      void disable()
      Same as setEnabled(false).
      void enable()
      Same as setEnabled(true).
      Object getProperty(Object key)
      Returns the value of the property with the specified key.
      boolean isEnabled()
      Determines if this event request is currently enabled.
      void putProperty(Object key, Object value)
      Add an arbitrary key/value "property" to this request.
      void setEnabled(boolean val)
      Enables or disables this event request.
      void setSuspendPolicy(int policy)
      Determines the threads to suspend when the requested event occurs in the target VM.
      int suspendPolicy()
      Returns a value which describes the threads to suspend when the requested event occurs in the target VM.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Field Detail

      • SUSPEND_NONE

        static final int SUSPEND_NONE
        Suspend no threads when the event occurs
        See Also:
        Constant Field Values

      • SUSPEND_EVENT_THREAD

        static final int SUSPEND_EVENT_THREAD
        Suspend only the thread which generated the event when the event occurs
        See Also:
        Constant Field Values

      • SUSPEND_ALL

        static final int SUSPEND_ALL
        Suspend all threads when the event occurs
        See Also:
        Constant Field Values

    • Method Detail

      • isEnabled

        boolean isEnabled()
        Determines if this event request is currently enabled.
        Returns:
        true if enabled; false otherwise.

      • setEnabled

        void setEnabled(boolean val)
        Enables or disables this event request. While this event request is disabled, the event request will be ignored and the target VM will not be stopped if any of its threads reaches the event request. Disabled event requests still exist, and are included in event request lists such as EventRequestManager.breakpointRequests().
        Parameters:
        val - true if the event request is to be enabled; false otherwise.
        Throws:
        InvalidRequestStateException - if this request has been deleted.
        IllegalThreadStateException - if this is a StepRequest, val is true, and the thread named in the request has died.

      • enable

        void enable()
        Same as setEnabled(true).
        Throws:
        InvalidRequestStateException - if this request has been deleted.
        IllegalThreadStateException - if this is a StepRequest and the thread named in the request has died.

      • disable

        void disable()
        Same as setEnabled(false).
        Throws:
        InvalidRequestStateException - if this request has been deleted.

      • addCountFilter

        void addCountFilter(int count)
        Limit the requested event to be reported at most once after a given number of occurrences. The event is not reported the first count - 1 times this filter is reached. To request a one-off event, call this method with a count of 1.

        Once the count reaches 0, any subsequent filters in this request are applied. If none of those filters cause the event to be suppressed, the event is reported. Otherwise, the event is not reported. In either case subsequent events are never reported for this request.

        Parameters:
        count - the number of ocurrences before generating an event.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        IllegalArgumentException - if count is less than one.

      • setSuspendPolicy

        void setSuspendPolicy(int policy)
        Determines the threads to suspend when the requested event occurs in the target VM. Use SUSPEND_ALL to suspend all threads in the target VM (the default). Use SUSPEND_EVENT_THREAD to suspend only the thread which generated the event. Use SUSPEND_NONE to suspend no threads.

        Thread suspensions through events have the same functionality as explicitly requested suspensions. See ThreadReference.suspend() and VirtualMachine.suspend() for details.

        Parameters:
        policy - the selected suspend policy.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Suspend policy may only be set in disabled requests.
        IllegalArgumentException - if the policy argument contains an illegal value.

      • suspendPolicy

        int suspendPolicy()
        Returns a value which describes the threads to suspend when the requested event occurs in the target VM. The returned value is SUSPEND_ALL, SUSPEND_EVENT_THREAD, or SUSPEND_NONE.
        Returns:
        the current suspend mode for this request

      • putProperty

        void putProperty(Object key,
                 Object value)
        Add an arbitrary key/value "property" to this request. The property can be used by a client of the JDI to associate application information with the request; These client-set properties are not used internally by the JDI.

        The get/putProperty methods provide access to a small per-instance map. This is not to be confused with Properties.

        If value is null this method will remove the property.

        See Also:
        getProperty(java.lang.Object)

      • getProperty

        Object getProperty(Object key)
        Returns the value of the property with the specified key. Only properties added with putProperty(java.lang.Object, java.lang.Object) will return a non-null value.
        Returns:
        the value of this property or null
        See Also:
        putProperty(java.lang.Object, java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


EventRequestManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface EventRequestManager

  • All Superinterfaces:
    Mirror

    @Exported
public interface EventRequestManager
extends Mirror
    Manages the creation and deletion of EventRequests. A single implementor of this interface exists in a particuar VM and is accessed through VirtualMachine.eventRequestManager()
    Since:
    1.3
    See Also:
    EventRequest, Event, BreakpointRequest, BreakpointEvent, VirtualMachine

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<AccessWatchpointRequest> accessWatchpointRequests()
      Return an unmodifiable list of the enabled and disabled access watchpoint requests.
      List<BreakpointRequest> breakpointRequests()
      Return an unmodifiable list of the enabled and disabled breakpoint requests.
      List<ClassPrepareRequest> classPrepareRequests()
      Return an unmodifiable list of the enabled and disabled class prepare requests.
      List<ClassUnloadRequest> classUnloadRequests()
      Return an unmodifiable list of the enabled and disabled class unload requests.
      AccessWatchpointRequest createAccessWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
      BreakpointRequest createBreakpointRequest(Location location)
      Creates a new disabled BreakpointRequest.
      ClassPrepareRequest createClassPrepareRequest()
      Creates a new disabled ClassPrepareRequest.
      ClassUnloadRequest createClassUnloadRequest()
      Creates a new disabled ClassUnloadRequest.
      ExceptionRequest createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)
      Creates a new disabled ExceptionRequest.
      MethodEntryRequest createMethodEntryRequest()
      Creates a new disabled MethodEntryRequest.
      MethodExitRequest createMethodExitRequest()
      Creates a new disabled MethodExitRequest.
      ModificationWatchpointRequest createModificationWatchpointRequest(Field field)
      Creates a new disabled watchpoint which watches accesses to the specified field.
      MonitorContendedEnteredRequest createMonitorContendedEnteredRequest()
      Creates a new disabled MonitorContendedEnteredRequest.
      MonitorContendedEnterRequest createMonitorContendedEnterRequest()
      Creates a new disabled MonitorContendedEnterRequest.
      MonitorWaitedRequest createMonitorWaitedRequest()
      Creates a new disabled MonitorWaitedRequest.
      MonitorWaitRequest createMonitorWaitRequest()
      Creates a new disabled MonitorWaitRequest.
      StepRequest createStepRequest(ThreadReference thread, int size, int depth)
      Creates a new disabled StepRequest.
      ThreadDeathRequest createThreadDeathRequest()
      Creates a new disabled ThreadDeathRequest.
      ThreadStartRequest createThreadStartRequest()
      Creates a new disabled ThreadStartRequest.
      VMDeathRequest createVMDeathRequest()
      Creates a new disabled VMDeathRequest.
      void deleteAllBreakpoints()
      Remove all breakpoints managed by this EventRequestManager.
      void deleteEventRequest(EventRequest eventRequest)
      Removes an eventRequest.
      void deleteEventRequests(List<? extends EventRequest> eventRequests)
      Removes a list of EventRequests.
      List<ExceptionRequest> exceptionRequests()
      Return an unmodifiable list of the enabled and disabled exception requests.
      List<MethodEntryRequest> methodEntryRequests()
      Return an unmodifiable list of the enabled and disabled method entry requests.
      List<MethodExitRequest> methodExitRequests()
      Return an unmodifiable list of the enabled and disabled method exit requests.
      List<ModificationWatchpointRequest> modificationWatchpointRequests()
      Return an unmodifiable list of the enabled and disabled modification watchpoint requests.
      List<MonitorContendedEnteredRequest> monitorContendedEnteredRequests()
      Return an unmodifiable list of the enabled and disabled monitor contended entered requests.
      List<MonitorContendedEnterRequest> monitorContendedEnterRequests()
      Return an unmodifiable list of the enabled and disabled monitor contended enter requests.
      List<MonitorWaitedRequest> monitorWaitedRequests()
      Return an unmodifiable list of the enabled and disabled monitor waited requests.
      List<MonitorWaitRequest> monitorWaitRequests()
      Return an unmodifiable list of the enabled and disabled monitor wait requests.
      List<StepRequest> stepRequests()
      Return an unmodifiable list of the enabled and disabled step requests.
      List<ThreadDeathRequest> threadDeathRequests()
      Return an unmodifiable list of the enabled and disabled thread death requests.
      List<ThreadStartRequest> threadStartRequests()
      Return an unmodifiable list of the enabled and disabled thread start requests.
      List<VMDeathRequest> vmDeathRequests()
      Return an unmodifiable list of the enabled and disabled VM death requests.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • createClassPrepareRequest

        ClassPrepareRequest createClassPrepareRequest()
        Creates a new disabled ClassPrepareRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created ClassPrepareRequest

      • createClassUnloadRequest

        ClassUnloadRequest createClassUnloadRequest()
        Creates a new disabled ClassUnloadRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created ClassUnloadRequest

      • createThreadStartRequest

        ThreadStartRequest createThreadStartRequest()
        Creates a new disabled ThreadStartRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created ThreadStartRequest

      • createThreadDeathRequest

        ThreadDeathRequest createThreadDeathRequest()
        Creates a new disabled ThreadDeathRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created ThreadDeathRequest

      • createExceptionRequest

        ExceptionRequest createExceptionRequest(ReferenceType refType,
                                        boolean notifyCaught,
                                        boolean notifyUncaught)
        Creates a new disabled ExceptionRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.

        A specific exception type and its subclasses can be selected for exception events. Caught exceptions, uncaught exceptions, or both can be selected. Note, however, that at the time an exception is thrown, it is not always possible to determine whether it is truly caught. See ExceptionEvent.catchLocation() for details.

        Parameters:
        refType - If non-null, specifies that exceptions which are instances of refType will be reported. Note: this will include instances of sub-types. If null, all instances will be reported
        notifyCaught - If true, caught exceptions will be reported.
        notifyUncaught - If true, uncaught exceptions will be reported.
        Returns:
        the created ExceptionRequest

      • createMethodEntryRequest

        MethodEntryRequest createMethodEntryRequest()
        Creates a new disabled MethodEntryRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created MethodEntryRequest

      • createMethodExitRequest

        MethodExitRequest createMethodExitRequest()
        Creates a new disabled MethodExitRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
        Returns:
        the created MethodExitRequest

      • createMonitorContendedEnterRequest

        MonitorContendedEnterRequest createMonitorContendedEnterRequest()
        Creates a new disabled MonitorContendedEnterRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.
        Returns:
        the created MonitorContendedEnterRequest
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        Since:
        1.6

      • createMonitorContendedEnteredRequest

        MonitorContendedEnteredRequest createMonitorContendedEnteredRequest()
        Creates a new disabled MonitorContendedEnteredRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.
        Returns:
        the created MonitorContendedEnteredRequest
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        Since:
        1.6

      • createMonitorWaitRequest

        MonitorWaitRequest createMonitorWaitRequest()
        Creates a new disabled MonitorWaitRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.
        Returns:
        the created MonitorWaitRequest
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        Since:
        1.6

      • createMonitorWaitedRequest

        MonitorWaitedRequest createMonitorWaitedRequest()
        Creates a new disabled MonitorWaitedRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request. Not all target virtual machines support this operation. Use VirtualMachine.canRequestMonitorEvents() to determine if the operation is supported.
        Returns:
        the created MonitorWaitedRequest
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        Since:
        1.6

      • createStepRequest

        StepRequest createStepRequest(ThreadReference thread,
                              int size,
                              int depth)
        Creates a new disabled StepRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.

        The returned request will control stepping only in the specified thread; all other threads will be unaffected. A sizevalue of StepRequest.STEP_MIN will generate a step event each time the code index changes. It represents the smallest step size available and often maps to the instruction level. A size value of StepRequest.STEP_LINE will generate a step event each time the source line changes unless line number information is not available, in which case a STEP_MIN will be done instead. For example, no line number information is available during the execution of a method that has been rendered obsolete by by a VirtualMachine.redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>) operation. A depth value of StepRequest.STEP_INTO will generate step events in any called methods. A depth value of StepRequest.STEP_OVER restricts step events to the current frame or caller frames. A depth value of StepRequest.STEP_OUT restricts step events to caller frames only. All depth restrictions are relative to the call stack immediately before the step takes place.

        Only one pending step request is allowed per thread.

        Note that a typical debugger will want to cancel stepping after the first step is detected. Thus a next line method would do the following:

             EventRequestManager mgr = myVM.eventRequestManager();
     StepRequest request = mgr.createStepRequest(myThread,
                                                 StepRequest.STEP_LINE,
                                                 StepRequest.STEP_OVER);
     request.addCountFilter(1);  // next step only
     request.enable();
     myVM.resume();
        Parameters:
        thread - the thread in which to step
        depth - the step depth
        size - the step size
        Returns:
        the created StepRequest
        Throws:
        DuplicateRequestException - if there is already a pending step request for the specified thread.
        IllegalArgumentException - if the size or depth arguments contain illegal values.

      • createBreakpointRequest

        BreakpointRequest createBreakpointRequest(Location location)
        Creates a new disabled BreakpointRequest. The given Location must have a valid (that is, non-negative) code index. The new breakpoint is added to the list managed by this EventRequestManager. Multiple breakpoints at the same location are permitted. Use EventRequest.enable() to activate this event request.
        Parameters:
        location - the location of the new breakpoint.
        Returns:
        the created BreakpointRequest
        Throws:
        NativeMethodException - if location is within a native method.

      • createAccessWatchpointRequest

        AccessWatchpointRequest createAccessWatchpointRequest(Field field)
        Creates a new disabled watchpoint which watches accesses to the specified field. The new watchpoint is added to the list managed by this EventRequestManager. Multiple watchpoints on the same field are permitted. Use EventRequest.enable() to activate this event request.

        Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldAccess() to determine if the operation is supported.

        Parameters:
        field - the field to watch
        Returns:
        the created watchpoint
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.

      • createModificationWatchpointRequest

        ModificationWatchpointRequest createModificationWatchpointRequest(Field field)
        Creates a new disabled watchpoint which watches accesses to the specified field. The new watchpoint is added to the list managed by this EventRequestManager. Multiple watchpoints on the same field are permitted. Use EventRequest.enable() to activate this event request.

        Not all target virtual machines support this operation. Use VirtualMachine.canWatchFieldModification() to determine if the operation is supported.

        Parameters:
        field - the field to watch
        Returns:
        the created watchpoint
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.

      • createVMDeathRequest

        VMDeathRequest createVMDeathRequest()
        Creates a new disabled VMDeathRequest. The new request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.

        This request (if enabled) will cause a VMDeathEvent to be sent on termination of the target VM.

        A VMDeathRequest with a suspend policy of SUSPEND_ALL can be used to assure processing of incoming SUSPEND_NONE or SUSPEND_EVENT_THREAD events before VM death. If all event processing is being done in the same thread as event sets are being read, enabling the request is all that is needed since the VM will be suspended until the EventSet containing the VMDeathEvent is resumed.

        Not all target virtual machines support this operation. Use VirtualMachine.canRequestVMDeathEvent() to determine if the operation is supported.

        Returns:
        the created request
        Throws:
        UnsupportedOperationException - if the target VM does not support this operation.
        Since:
        1.4

      • deleteEventRequest

        void deleteEventRequest(EventRequest eventRequest)
        Removes an eventRequest. The eventRequest is disabled and the removed from the requests managed by this EventRequestManager. Once the eventRequest is deleted, no operations (for example, EventRequest.setEnabled(boolean)) are permitted - attempts to do so will generally cause an InvalidRequestStateException. No other eventRequests are effected.

        Because this method changes the underlying lists of event requests, attempting to directly delete from a list returned by a request accessor (e.g. below):

           Iterator iter = requestManager.stepRequests().iterator();
   while (iter.hasNext()) {
      requestManager.deleteEventRequest(iter.next());
  }
        may cause a ConcurrentModificationException. Instead use deleteEventRequests(List) or copy the list before iterating.
        Parameters:
        eventRequest - the eventRequest to remove

      • deleteEventRequests

        void deleteEventRequests(List<? extends EventRequest> eventRequests)
        Removes a list of EventRequests.
        Parameters:
        eventRequests - the list of eventRequests to remove
        See Also:
        deleteEventRequest(EventRequest)

      • deleteAllBreakpoints

        void deleteAllBreakpoints()
        Remove all breakpoints managed by this EventRequestManager.
        See Also:
        deleteEventRequest(EventRequest)

      • stepRequests

        List<StepRequest> stepRequests()
        Return an unmodifiable list of the enabled and disabled step requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all StepRequest objects.

      • classPrepareRequests

        List<ClassPrepareRequest> classPrepareRequests()
        Return an unmodifiable list of the enabled and disabled class prepare requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ClassPrepareRequest objects.

      • classUnloadRequests

        List<ClassUnloadRequest> classUnloadRequests()
        Return an unmodifiable list of the enabled and disabled class unload requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ClassUnloadRequest objects.

      • threadStartRequests

        List<ThreadStartRequest> threadStartRequests()
        Return an unmodifiable list of the enabled and disabled thread start requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ThreadStartRequest objects.

      • threadDeathRequests

        List<ThreadDeathRequest> threadDeathRequests()
        Return an unmodifiable list of the enabled and disabled thread death requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ThreadDeathRequest objects.

      • exceptionRequests

        List<ExceptionRequest> exceptionRequests()
        Return an unmodifiable list of the enabled and disabled exception requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ExceptionRequest objects.

      • breakpointRequests

        List<BreakpointRequest> breakpointRequests()
        Return an unmodifiable list of the enabled and disabled breakpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all BreakpointRequest objects.

      • accessWatchpointRequests

        List<AccessWatchpointRequest> accessWatchpointRequests()
        Return an unmodifiable list of the enabled and disabled access watchpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all AccessWatchpointRequest objects.

      • modificationWatchpointRequests

        List<ModificationWatchpointRequest> modificationWatchpointRequests()
        Return an unmodifiable list of the enabled and disabled modification watchpoint requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the all ModificationWatchpointRequest objects.

      • methodEntryRequests

        List<MethodEntryRequest> methodEntryRequests()
        Return an unmodifiable list of the enabled and disabled method entry requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MethodEntryRequest objects.

      • methodExitRequests

        List<MethodExitRequest> methodExitRequests()
        Return an unmodifiable list of the enabled and disabled method exit requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MethodExitRequest objects.

      • monitorContendedEnterRequests

        List<MonitorContendedEnterRequest> monitorContendedEnterRequests()
        Return an unmodifiable list of the enabled and disabled monitor contended enter requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MonitorContendedEnterRequest objects.
        Since:
        1.6

      • monitorContendedEnteredRequests

        List<MonitorContendedEnteredRequest> monitorContendedEnteredRequests()
        Return an unmodifiable list of the enabled and disabled monitor contended entered requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MonitorContendedEnteredRequest objects.
        Since:
        1.6

      • monitorWaitRequests

        List<MonitorWaitRequest> monitorWaitRequests()
        Return an unmodifiable list of the enabled and disabled monitor wait requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MonitorWaitRequest objects.
        Since:
        1.6

      • monitorWaitedRequests

        List<MonitorWaitedRequest> monitorWaitedRequests()
        Return an unmodifiable list of the enabled and disabled monitor waited requests. This list is a live view of these requests and thus changes as requests are added and deleted.
        Returns:
        the list of all MonitorWaitedRequest objects.
        Since:
        1.6

      • vmDeathRequests

        List<VMDeathRequest> vmDeathRequests()
        Return an unmodifiable list of the enabled and disabled VM death requests. This list is a live view of these requests and thus changes as requests are added and deleted. Note: the unsolicited VMDeathEvent does not have a corresponding request.
        Returns:
        the list of all VMDeathRequest objects.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ExceptionRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ExceptionRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface ExceptionRequest
extends EventRequest
    Request for notification when an exception occurs in the target VM. When an enabled ExceptionRequest is satisfied, an event set containing an ExceptionEvent will be placed on the EventQueue. The collection of existing ExceptionRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    ExceptionEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      ReferenceType exception()
      Returns exception type for which exception events are requested.
      boolean notifyCaught()
      Returns whether caught exceptions of the requested type will generate events when they are thrown.
      boolean notifyUncaught()
      Returns whether uncaught exceptions of the requested type will generate events when they are thrown.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • exception

        ReferenceType exception()
        Returns exception type for which exception events are requested.
        Returns:
        The exception (and its subclasses) requested with EventRequestManager.createExceptionRequest(com.sun.jdi.ReferenceType, boolean, boolean), or null if, as by default, all exceptions are requested.

      • notifyCaught

        boolean notifyCaught()
        Returns whether caught exceptions of the requested type will generate events when they are thrown.

        Note that at the time an exception is thrown, it is not always possible to determine whether it is truly caught. See ExceptionEvent.catchLocation() for details.

        Returns:
        boolean true if caught exceptions will be reported, false otherwise.

      • notifyUncaught

        boolean notifyUncaught()
        Returns whether uncaught exceptions of the requested type will generate events when they are thrown.

        Note that at the time an exception is thrown, it is not always possible to determine whether it is truly uncaught. See ExceptionEvent.catchLocation() for details.

        Returns:
        boolean true if caught exceptions will be reported, false otherwise.

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


InvalidRequestStateException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Class InvalidRequestStateException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.request.InvalidRequestStateException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class InvalidRequestStateException
extends RuntimeException
    Thrown to indicate that the requested event cannot be modified because it is enabled. Filters can be added only to disabled event requests. Also thrown if an operation is attempted on a deleted request. See EventRequestManager.deleteEventRequest(EventRequest)
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      InvalidRequestStateException()
      InvalidRequestStateException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • InvalidRequestStateException

        public InvalidRequestStateException()

      • InvalidRequestStateException

        public InvalidRequestStateException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MethodEntryRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MethodEntryRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MethodEntryRequest
extends EventRequest
    Request for notification when a method is invoked in the target VM. When an enabled MethodEntryRequest is satisfied, an event set containing a MethodEntryEvent will be placed on the EventQueue. The collection of existing MethodEntryRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    MethodEntryEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g. "java.*" or "*.Foo".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MethodExitRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MethodExitRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MethodExitRequest
extends EventRequest
    Request for notification when a method returns in the target VM. When an enabled MethodExitRequest is hit, an event set containing a MethodExitEvent will be placed on the EventQueue. The collection of existing MethodExitRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    MethodExitEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorContendedEnteredRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MonitorContendedEnteredRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MonitorContendedEnteredRequest
extends EventRequest
    Request for notification of a thread in the target VM entering a monitor after waiting for it to be released by another thread. When an enabled MonitorContededEnteredRequest is satisfied, an event set containing a MonitorContendedEnteredEvent will be placed on the EventQueue. The collection of existing MonitorContendedEnteredEvents is managed by the EventRequestManager
    Since:
    1.6
    See Also:
    MonitorContendedEnteredEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g. "java.*" or "*.Foo".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorContendedEnterRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MonitorContendedEnterRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MonitorContendedEnterRequest
extends EventRequest
    Request for notification of a thread in the target VM attempting to enter a monitor already acquired by another thread. When an enabled MonitorContededEnterRequest is satisfied, an event set containing a MonitorContendedEnterEvent will be placed on the EventQueue. The collection of existing MonitorContendedEnterEvents is managed by the EventRequestManager
    Since:
    1.6
    See Also:
    MonitorContendedEnterEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression, e.g. "java.*" or "*.Foo".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorWaitedRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MonitorWaitedRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MonitorWaitedRequest
extends EventRequest
    Request for notification when a thread in the target VM has finished waiting on a monitor object. That is, a thread is leaving Object.wait(). " When an enabled MonitorWaitedRequest is satisfied, an event set containing a MonitorWaitedEvent will be placed on the EventQueue. The collection of existing MonitorWaitedEvents is managed by the EventRequestManager
    Since:
    1.6
    See Also:
    MonitorWaitedEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g. "java.*" or "*.Foo".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


MonitorWaitRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface MonitorWaitRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface MonitorWaitRequest
extends EventRequest
    Request for notification when a thread in the target VM is about to wait on a monitor object. That is, a thread is entering Object.wait(). When an enabled MonitorWaitRequest is satisfied, an event set containing a MonitorWaitEvent will be placed on the EventQueue. The collection of existing MonitorWaitEvents is managed by the EventRequestManager
    Since:
    1.6
    See Also:
    MonitorWaitEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those in which the name of the class of the monitor object matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those in which the name of the class of the monitor object does notmatch this restricted regular expression, e.g. "java.*" or "*.Foo".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


StepRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface StepRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface StepRequest
extends EventRequest
    Request for notification when a step occurs in the target VM. When an enabled StepRequest is satisfied, an event set containing a StepEvent will be placed on the EventQueue. The collection of existing StepRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    StepEvent, EventQueue, EventRequestManager

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int STEP_INTO
      Step into any newly pushed frames
      static int STEP_LINE
      Step to the next location on a different line
      static int STEP_MIN
      Step to the next available location
      static int STEP_OUT
      Step out of the current frame
      static int STEP_OVER
      Step over any newly pushed frames

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type | Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      int | depth()
      int | size()
      ThreadReference thread()

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Field Detail

      • STEP_INTO

        static final int STEP_INTO
        Step into any newly pushed frames
        See Also:
        Constant Field Values

      • STEP_OVER

        static final int STEP_OVER
        Step over any newly pushed frames
        See Also:
        Constant Field Values

      • STEP_OUT

        static final int STEP_OUT
        Step out of the current frame
        See Also:
        Constant Field Values

      • STEP_MIN

        static final int STEP_MIN
        Step to the next available location
        See Also:
        Constant Field Values

      • STEP_LINE

        static final int STEP_LINE
        Step to the next location on a different line
        See Also:
        Constant Field Values

    • Method Detail

      • thread

        ThreadReference thread()
        Returns:
        the thread on which the step event is being requested.

      • size

        int size()
        Returns:
        the step size

      • depth

        int depth()
        Returns:
        the step depth

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadDeathRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ThreadDeathRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface ThreadDeathRequest
extends EventRequest
    Request for notification when a thread terminates in the target VM. When an enabled ThreadDeathRequest is satisfied, an event set containing a ThreadDeathEvent will be placed on the EventQueue. The collection of existing ThreadDeathRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    ThreadDeathEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadStartRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface ThreadStartRequest

  • All Superinterfaces:
    EventRequest, Mirror

    @Exported
public interface ThreadStartRequest
extends EventRequest
    Request for notification when a thread starts execution in the target VM. When an enabled ThreadStartRequest is hit, an event set containing a ThreadStartEvent will be placed on the EventQueue. The collection of existing ThreadStartRequests is managed by the EventRequestManager
    Since:
    1.3
    See Also:
    ThreadStartEvent, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


WatchpointRequest

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi.request

Interface WatchpointRequest

  • All Superinterfaces:
    EventRequest, Mirror
    All Known Subinterfaces:
    AccessWatchpointRequest, ModificationWatchpointRequest

    @Exported
public interface WatchpointRequest
extends EventRequest
    Identifies a Field in the target VM being watched.
    Since:
    1.3
    See Also:
    AccessWatchpointRequest, ModificationWatchpointRequest, EventQueue, EventRequestManager

    • Field Summary

      • Fields inherited from interface com.sun.jdi.request.EventRequest

        SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      void addClassExclusionFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression.
      void addClassFilter(ReferenceType refType)
      Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
      void addClassFilter(String classPattern)
      Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
      void addInstanceFilter(ObjectReference instance)
      Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
      void addThreadFilter(ThreadReference thread)
      Restricts the events generated by this request to those in the given thread.
      Field field()
      Gets the Field being watched by this WatchpointRequest.

      • Methods inherited from interface com.sun.jdi.request.EventRequest

        addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • field

        Field field()
        Gets the Field being watched by this WatchpointRequest.
        Returns:
        the Field this Watchpoint is monitoring.

      • addThreadFilter

        void addThreadFilter(ThreadReference thread)
        Restricts the events generated by this request to those in the given thread.
        Parameters:
        thread - the thread to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(ReferenceType refType)
        Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
        Parameters:
        refType - the reference type to filter on.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassFilter

        void addClassFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter for.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addClassExclusionFilter

        void addClassExclusionFilter(String classPattern)
        Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
        Parameters:
        classPattern - the pattern String to filter against.
        Throws:
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

      • addInstanceFilter

        void addInstanceFilter(ObjectReference instance)
        Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

        Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

        Parameters:
        instance - the object which must be the current instance in order to pass this filter.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
        Since:
        1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ShortValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ShortValue

  • All Superinterfaces:
    Comparable<ShortValue>, Mirror, PrimitiveValue, Value

    @Exported
public interface ShortValue
extends PrimitiveValue, Comparable<ShortValue>
    Provides access to a primitive short value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this ShortValue for equality.
      int hashCode()
      Returns the hash code value for this ShortValue.
      short value()
      Returns this ShortValue as a short.

      • Methods inherited from interface com.sun.jdi.PrimitiveValue

        booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface java.lang.Comparable

        compareTo

    • Method Detail

      • value

        short value()
        Returns this ShortValue as a short.
        Returns:
        the short mirrored by this object.

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this ShortValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a ShortValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this ShortValue.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


StackFrame

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface StackFrame

  • All Superinterfaces:
    Locatable, Mirror

    @Exported
public interface StackFrame
extends Mirror, Locatable
    The state of one method invocation on a thread's call stack. As a thread executes, stack frames are pushed and popped from its call stack as methods are invoked and then return. A StackFrame mirrors one such frame from a target VM at some point in its thread's execution. The call stack is, then, simply a List of StackFrame objects. The call stack can be obtained any time a thread is suspended through a call to ThreadReference.frames()

    StackFrames provide access to a method's local variables and their current values.

    The lifetime of a StackFrame is very limited. It is available only for suspended threads and becomes invalid once its thread is resumed.

    Any method on StackFrame which takes StackFrame as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

    Any method on StackFrame which takes StackFrame as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<Value> getArgumentValues()
      Returns the values of all arguments in this frame.
      Value getValue(LocalVariable variable)
      Gets the Value of a LocalVariable in this frame.
      Map<LocalVariable,Value> getValues(List<? extends LocalVariable> variables)
      Returns the values of multiple local variables in this frame.
      Location location()
      Returns the Location of the current instruction in the frame.
      void setValue(LocalVariable variable, Value value)
      Sets the Value of a LocalVariable in this frame.
      ObjectReference thisObject()
      Returns the value of 'this' for the current frame.
      ThreadReference thread()
      Returns the thread under which this frame's method is running.
      LocalVariable visibleVariableByName(String name)
      Finds a LocalVariable that matches the given name and is visible at the current frame location.
      List<LocalVariable> visibleVariables()
      Returns a list containing each LocalVariable that can be accessed from this frame's location.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • location

        Location location()
        Returns the Location of the current instruction in the frame. The method for which this frame was created can also be accessed through the returned location. For the top frame in the stack, this location identifies the next instruction to be executed. For all other frames, this location identifies the instruction that caused the next frame's method to be invoked. If the frame represents a native method invocation, the returned location indicates the class and method, but the code index will not be valid (-1).
        Specified by:
        location in interface Locatable
        Returns:
        the Location of the current instruction.
        Throws:
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

      • thread

        ThreadReference thread()
        Returns the thread under which this frame's method is running.
        Returns:
        a ThreadReference which mirrors the frame's thread.
        Throws:
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

      • thisObject

        ObjectReference thisObject()
        Returns the value of 'this' for the current frame. The ObjectReference for 'this' is only available for non-native instance methods.
        Returns:
        an ObjectReference, or null if the frame represents a native or static method.
        Throws:
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

      • visibleVariables

        List<LocalVariable> visibleVariables()
                              throws AbsentInformationException
        Returns a list containing each LocalVariable that can be accessed from this frame's location.

        Visibility is based on the code index of the current instruction of this StackFrame. Each variable has a range of byte code indices in which it is accessible. If this stack frame's method matches this variable's method and if the code index of this StackFrame is within the variable's byte code range, the variable is visible.

        A variable's byte code range is at least as large as the scope of that variable, but can continue beyond the end of the scope under certain circumstances:

        • the compiler/VM does not immediately reuse the variable's slot.
        • the compiler/VM is implemented to report the extended range that would result from the item above.
        The advantage of an extended range is that variables from recently exited scopes may remain available for examination (this is especially useful for loop indices). If, as a result of the extensions above, the current frame location is contained within the range of multiple local variables of the same name, the variable with the highest-starting range is chosen for the returned list.
        Returns:
        the list of LocalVariable objects currently visible; the list will be empty if there are no visible variables; specifically, frames in native methods will always return a zero-length list.
        Throws:
        AbsentInformationException - if there is no local variable information for this method.
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        NativeMethodException - if the current method is native.

      • visibleVariableByName

        LocalVariable visibleVariableByName(String name)
                             throws AbsentInformationException
        Finds a LocalVariable that matches the given name and is visible at the current frame location. See visibleVariables() for more information on visibility.
        Parameters:
        name - the variable name to find
        Returns:
        the matching LocalVariable, or null if there is no visible variable with the given name; frames in native methods will always return null.
        Throws:
        AbsentInformationException - if there is no local variable information for this method.
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        NativeMethodException - if the current method is native.

      • getValue

        Value getValue(LocalVariable variable)
        Gets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables().
        Parameters:
        variable - the LocalVariable to be accessed
        Returns:
        the Value of the instance field.
        Throws:
        IllegalArgumentException - if the variable is either invalid for this frame's method or not visible.
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

      • getValues

        Map<LocalVariable,Value> getValues(List<? extends LocalVariable> variables)
        Returns the values of multiple local variables in this frame. Each variable must be valid for this frame's method and visible according to the rules described in visibleVariables().
        Parameters:
        variables - a list of LocalVariable objects to be accessed
        Returns:
        a map associating each LocalVariable with its Value
        Throws:
        IllegalArgumentException - if any variable is either invalid for this frame's method or not visible.
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

      • setValue

        void setValue(LocalVariable variable,
              Value value)
       throws InvalidTypeException,
              ClassNotLoadedException
        Sets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables().

        Object values must be assignment compatible with the variable type (This implies that the variable type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the variable type or must be convertible to the variable type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Parameters:
        variable - the field containing the requested value
        value - the new value to assign
        Throws:
        IllegalArgumentException - if the field is not valid for this object's class.
        InvalidTypeException - if the value's type does not match the variable's type.
        ClassNotLoadedException - if the variable type has not yet been loaded through the appropriate class loader.
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • getArgumentValues

        List<Value> getArgumentValues()
        Returns the values of all arguments in this frame. Values are returned even if no local variable information is present.
        Returns:
        a list containing a Value object for each argument to this frame, in the order in which the arguments were declared. If the method corresponding to this frame has no arguments, an empty list is returned.
        Throws:
        InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
        Since:
        1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


StringReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface StringReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface StringReference
extends ObjectReference
    A string object from the target VM. A StringReference is an ObjectReference with additional access to string-specific information from the target VM.
    Since:
    1.3

    • Field Summary

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String value()
      Returns the StringReference as a String.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • value

        String value()
        Returns the StringReference as a String. The returned string is the equivalent of the mirrored string, but is an entity in the client VM and can be manipulated like any other string.
        Returns:
        the string value.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadGroupReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ThreadGroupReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface ThreadGroupReference
extends ObjectReference
    A thread group object from the target VM. A ThreadGroupReference is an ObjectReference with additional access to threadgroup-specific information from the target VM.
    Since:
    1.3

    • Field Summary

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String name()
      Returns the name of this thread group.
      ThreadGroupReference parent()
      Returns the parent of this thread group.
      void resume()
      Resumes all threads in this thread group.
      void suspend()
      Suspends all threads in this thread group.
      List<ThreadGroupReference> threadGroups()
      Returns a List containing each active ThreadGroupReference in this thread group.
      List<ThreadReference> threads()
      Returns a List containing a ThreadReference for each live thread in this thread group.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • name

        String name()
        Returns the name of this thread group.
        Returns:
        the string containing the thread group name.

      • parent

        ThreadGroupReference parent()
        Returns the parent of this thread group.
        Returns:
        a ThreadGroupReference mirroring the parent of this thread group in the target VM, or null if this is a top-level thread group.

      • suspend

        void suspend()
        Suspends all threads in this thread group. Each thread in this group and in all of its subgroups will be suspended as described in ThreadReference.suspend(). This is not guaranteed to be an atomic operation; if the target VM is not interrupted at the time this method is called, it is possible that new threads will be created between the time that threads are enumerated and all of them have been suspended.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • resume

        void resume()
        Resumes all threads in this thread group. Each thread in this group and in all of its subgroups will be resumed as described in ThreadReference.resume().
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • threads

        List<ThreadReference> threads()
        Returns a List containing a ThreadReference for each live thread in this thread group. Only the live threads in this immediate thread group (and not its subgroups) are returned. A thread is alive if it has been started and has not yet been stopped.
        Returns:
        a List of ThreadReference objects mirroring the live threads from this thread group in the target VM.

      • threadGroups

        List<ThreadGroupReference> threadGroups()
        Returns a List containing each active ThreadGroupReference in this thread group. Only the active thread groups in this immediate thread group (and not its subgroups) are returned. See java.lang.ThreadGroup for information about 'active' ThreadGroups.
        Returns:
        a List of ThreadGroupReference objects mirroring the active thread groups from this thread group in the target VM.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


ThreadReference

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface ThreadReference

  • All Superinterfaces:
    Mirror, ObjectReference, Value

    @Exported
public interface ThreadReference
extends ObjectReference
    A thread object from the target VM. A ThreadReference is an ObjectReference with additional access to thread-specific information from the target VM.
    Since:
    1.3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int THREAD_STATUS_MONITOR
      Thread is waiting on a java monitor
      static int THREAD_STATUS_NOT_STARTED
      Thread has not yet been started
      static int THREAD_STATUS_RUNNING
      Thread is runnable
      static int THREAD_STATUS_SLEEPING
      Thread is sleeping - Thread.sleep() or JVM_Sleep() was called
      static int THREAD_STATUS_UNKNOWN
      Thread status is unknown
      static int THREAD_STATUS_WAIT
      Thread is waiting - Object.wait() or JVM_MonitorWait() was called
      static int THREAD_STATUS_ZOMBIE
      Thread has completed execution

      • Fields inherited from interface com.sun.jdi.ObjectReference

        INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ObjectReference currentContendedMonitor()
      Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
      void forceEarlyReturn(Value value)
      Force a method to return before it reaches a return statement.
      StackFrame frame(int index)
      Returns the StackFrame at the given index in the thread's current call stack.
      int frameCount()
      Returns the number of stack frames in the thread's current call stack.
      List<StackFrame> frames()
      Returns a List containing each StackFrame in the thread's current call stack.
      List<StackFrame> frames(int start, int length)
      Returns a List containing a range of StackFrame mirrors from the thread's current call stack.
      void interrupt()
      Interrupts this thread unless the thread has been suspended by the debugger.
      boolean isAtBreakpoint()
      Determines whether the thread is suspended at a breakpoint.
      boolean isSuspended()
      Determines whether the thread has been suspended by the the debugger.
      String name()
      Returns the name of this thread.
      List<ObjectReference> ownedMonitors()
      Returns a List containing an ObjectReference for each monitor owned by the thread.
      List<MonitorInfo> ownedMonitorsAndFrames()
      Returns a List containing a MonitorInfo object for each monitor owned by the thread.
      void popFrames(StackFrame frame)
      Pop stack frames.
      void resume()
      Resumes this thread.
      int status()
      Returns the thread's status.
      void stop(ObjectReference throwable)
      Stops this thread with an asynchronous exception.
      void suspend()
      Suspends this thread.
      int suspendCount()
      Returns the number of pending suspends for this thread.
      ThreadGroupReference threadGroup()
      Returns this thread's thread group.

      • Methods inherited from interface com.sun.jdi.ObjectReference

        disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, referringObjects, setValue, uniqueID, waitingThreads

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Field Detail

      • THREAD_STATUS_UNKNOWN

        static final int THREAD_STATUS_UNKNOWN
        Thread status is unknown
        See Also:
        Constant Field Values

      • THREAD_STATUS_ZOMBIE

        static final int THREAD_STATUS_ZOMBIE
        Thread has completed execution
        See Also:
        Constant Field Values

      • THREAD_STATUS_RUNNING

        static final int THREAD_STATUS_RUNNING
        Thread is runnable
        See Also:
        Constant Field Values

      • THREAD_STATUS_SLEEPING

        static final int THREAD_STATUS_SLEEPING
        Thread is sleeping - Thread.sleep() or JVM_Sleep() was called
        See Also:
        Constant Field Values

      • THREAD_STATUS_MONITOR

        static final int THREAD_STATUS_MONITOR
        Thread is waiting on a java monitor
        See Also:
        Constant Field Values

      • THREAD_STATUS_WAIT

        static final int THREAD_STATUS_WAIT
        Thread is waiting - Object.wait() or JVM_MonitorWait() was called
        See Also:
        Constant Field Values

      • THREAD_STATUS_NOT_STARTED

        static final int THREAD_STATUS_NOT_STARTED
        Thread has not yet been started
        See Also:
        Constant Field Values

    • Method Detail

      • name

        String name()
        Returns the name of this thread.
        Returns:
        the string containing the thread name.

      • suspend

        void suspend()
        Suspends this thread. The thread can be resumed through resume() or resumed with other threads through VirtualMachine.resume().

        Unlike Thread.suspend(), suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed (through resume() or resume()) the same number of times it has been suspended.

        Suspending single threads with this method has the same dangers as Thread.suspend(). If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again).

        The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through Thread.resume().

        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • resume

        void resume()
        Resumes this thread. If this thread was not previously suspended through suspend() or through VirtualMachine.suspend(), or because of a SUSPEND_ALL or SUSPEND_EVENT_THREAD event, then invoking this method has no effect. Otherwise, the count of pending suspends on this thread is decremented. If it is decremented to 0, the thread will continue to execute. Note: the normal way to resume from an event related suspension is via EventSet.resume().
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().

      • suspendCount

        int suspendCount()
        Returns the number of pending suspends for this thread. See suspend() for an explanation of counted suspends.
        Returns:
        pending suspend count as an integer

      • stop

        void stop(ObjectReference throwable)
   throws InvalidTypeException
        Stops this thread with an asynchronous exception. A debugger thread in the target VM will stop this thread with the given Throwable object.
        Parameters:
        throwable - the asynchronous exception to throw.
        Throws:
        InvalidTypeException - if throwable is not an instance of java.lang.Throwable in the target VM.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        See Also:
        Thread.stop(Throwable)

      • interrupt

        void interrupt()
        Interrupts this thread unless the thread has been suspended by the debugger.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        See Also:
        Thread.interrupt()

      • status

        int status()
        Returns the thread's status. If the thread is not suspended the thread's current status is returned. If the thread is suspended, the thread's status before the suspension is returned (or THREAD_STATUS_UNKNOWN if this information is not available. isSuspended() can be used to determine if the thread has been suspended.
        Returns:
        one of THREAD_STATUS_UNKNOWN, THREAD_STATUS_ZOMBIE, THREAD_STATUS_RUNNING, THREAD_STATUS_SLEEPING, THREAD_STATUS_MONITOR, THREAD_STATUS_WAIT, THREAD_STATUS_NOT_STARTED,

      • isSuspended

        boolean isSuspended()
        Determines whether the thread has been suspended by the the debugger.
        Returns:
        true if the thread is currently suspended; false otherwise.

      • isAtBreakpoint

        boolean isAtBreakpoint()
        Determines whether the thread is suspended at a breakpoint.
        Returns:
        true if the thread is currently stopped at a breakpoint; false otherwise.

      • threadGroup

        ThreadGroupReference threadGroup()
        Returns this thread's thread group.
        Returns:
        a ThreadGroupReference that mirrors this thread's thread group in the target VM.

      • frameCount

        int frameCount()
        throws IncompatibleThreadStateException
        Returns the number of stack frames in the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
        Returns:
        an integer frame count
        Throws:
        IncompatibleThreadStateException - if the thread is not suspended in the target VM

      • frames

        List<StackFrame> frames()
                 throws IncompatibleThreadStateException
        Returns a List containing each StackFrame in the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
        Returns:
        a List of StackFrame with the current frame first followed by each caller's frame.
        Throws:
        IncompatibleThreadStateException - if the thread is not suspended in the target VM

      • frame

        StackFrame frame(int index)
          throws IncompatibleThreadStateException
        Returns the StackFrame at the given index in the thread's current call stack. Index 0 retrieves the current frame; higher indices retrieve caller frames. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
        Parameters:
        index - the desired frame
        Returns:
        the requested StackFrame
        Throws:
        IncompatibleThreadStateException - if the thread is not suspended in the target VM
        IndexOutOfBoundsException - if the index is greater than or equal to frameCount() or is negative.

      • frames

        List<StackFrame> frames(int start,
                        int length)
                 throws IncompatibleThreadStateException
        Returns a List containing a range of StackFrame mirrors from the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
        Parameters:
        start - the index of the first frame to retrieve. Index 0 represents the current frame.
        length - the number of frames to retrieve
        Returns:
        a List of StackFrame with the current frame first followed by each caller's frame.
        Throws:
        IncompatibleThreadStateException - if the thread is not suspended in the target VM
        IndexOutOfBoundsException - if the specified range is not within the range of stack frame indicies. That is, the exception is thrown if any of the following are true:
            start < 0
    start >= frameCount()
    length < 0
    (start+length) > frameCount()

      • ownedMonitors

        List<ObjectReference> ownedMonitors()
                             throws IncompatibleThreadStateException
        Returns a List containing an ObjectReference for each monitor owned by the thread. A monitor is owned by a thread if it has been entered (via the synchronized statement or entry into a synchronized method) and has not been relinquished through Object.wait(long).

        Not all target virtual machines support this operation. Use VirtualMachine.canGetOwnedMonitorInfo() to determine if the operation is supported.

        Returns:
        a List of ObjectReference objects. The list has zero length if no monitors are owned by this thread.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        IncompatibleThreadStateException - if the thread is not suspended in the target VM

      • ownedMonitorsAndFrames

        List<MonitorInfo> ownedMonitorsAndFrames()
                                  throws IncompatibleThreadStateException
        Returns a List containing a MonitorInfo object for each monitor owned by the thread. A monitor is owned by a thread if it has been entered (via the synchronized statement or entry into a synchronized method) and has not been relinquished through Object.wait(long).

        Not all target virtual machines support this operation. Use VirtualMachine.canGetMonitorFrameInfo() to determine if the operation is supported.

        Returns:
        a List of MonitorInfo objects. The list has zero length if no monitors are owned by this thread.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        IncompatibleThreadStateException - if the thread is not suspended in the target VM
        Since:
        1.6

      • currentContendedMonitor

        ObjectReference currentContendedMonitor()
                                 throws IncompatibleThreadStateException
        Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting. The thread can be waiting for a monitor through entry into a synchronized method, the synchronized statement, or Object.wait(long). The status() method can be used to differentiate between the first two cases and the third.

        Not all target virtual machines support this operation. Use VirtualMachine.canGetCurrentContendedMonitor() to determine if the operation is supported.

        Returns:
        the ObjectReference corresponding to the contended monitor, or null if it is not waiting for a monitor.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        IncompatibleThreadStateException - if the thread is not suspended in the target VM

      • popFrames

        void popFrames(StackFrame frame)
        throws IncompatibleThreadStateException
        Pop stack frames.

        All frames up to and including the frame are popped off the stack. The frame previous to the parameter frame will become the current frame.

        After this operation, this thread will be suspended at the invoke instruction of the target method that created frame. The frame's method can be reentered with a step into the instruction.

        The operand stack is restored, however, any changes to the arguments that occurred in the called method, remain. For example, if the method foo:

            void foo(int x) {
        System.out.println("Foo: " + x);
        x = 4;
        System.out.println("pop here");
    }
        was called with foo(7) and foo is popped at the second println and resumed, it will print: Foo: 4.

        Locks acquired by a popped frame are released when it is popped. This applies to synchronized methods that are popped, and to any synchronized blocks within them.

        Finally blocks are not executed.

        No aspect of state, other than this thread's execution point and locks, is affected by this call. Specifically, the values of fields are unchanged, as are external resources such as I/O streams. Additionally, the target program might be placed in a state that is impossible with normal program flow; for example, order of lock acquisition might be perturbed. Thus the target program may proceed differently than the user would expect.

        The specified thread must be suspended.

        All StackFrame objects for this thread are invalidated.

        No events are generated by this method.

        None of the frames through and including the frame for the caller of frame may be native.

        Not all target virtual machines support this operation. Use VirtualMachine.canPopFrames() to determine if the operation is supported.

        Parameters:
        frame - Stack frame to pop. frame is on this thread's call stack.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see VirtualMachine.canPopFrames().
        IncompatibleThreadStateException - if this thread is not suspended.
        IllegalArgumentException - if frame is not on this thread's call stack.
        NativeMethodException - if one of the frames that would be popped is that of a native method or if the frame previous to frame is native.
        InvalidStackFrameException - if frame has become invalid. Once this thread is resumed, the stack frame is no longer valid. This exception is also thrown if there are no more frames.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        Since:
        1.4

      • forceEarlyReturn

        void forceEarlyReturn(Value value)
               throws InvalidTypeException,
                      ClassNotLoadedException,
                      IncompatibleThreadStateException
        Force a method to return before it reaches a return statement.

        The method which will return early is referred to as the called method. The called method is the current method (as defined by the Frames section in the Java Virtual Machine Specification) for the specified thread at the time this method is called.

        The thread must be suspended. The return occurs when execution of Java programming language code is resumed on this thread. Between the call to this method and resumption of thread execution, the state of the stack is undefined.

        No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application.

        A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to native locks or java.util.concurrent.locks locks.

        Events, such as MethodExit, are generated as they would be in a normal return.

        The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.

        The value argument is the value that the method is to return. If the return type of the method is void, then value must be a VoidValue. Object values must be assignment compatible with the method return type (This implies that the method return type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the method return type or must be convertible to the variable type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

        Not all target virtual machines support this operation. Use VirtualMachine.canForceEarlyReturn() to determine if the operation is supported.

        Parameters:
        value - the value the method is to return.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canForceEarlyReturn()
        IncompatibleThreadStateException - if this thread is not suspended.
        NativeMethodException - if the frame to be returned from is that of a native method.
        InvalidStackFrameException - if there are no frames.
        InvalidTypeException - if the value's type does not match the method's return type.
        ClassNotLoadedException - if the method's return type has not yet been loaded through the appropriate class loader.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see VirtualMachine.canBeModified().
        Since:
        1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Type

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Type

  • All Superinterfaces:
    Mirror
    All Known Subinterfaces:
    ArrayType, BooleanType, ByteType, CharType, ClassType, DoubleType, FloatType, IntegerType, InterfaceType, LongType, PrimitiveType, ReferenceType, ShortType, VoidType

    @Exported
public interface Type
extends Mirror
    The mirror for a type in the target VM. This interface is the root of a type hierarchy encompassing primitive types and reference types.

    A Type may be used to represent a run-time type:

    Value.type()
    or a compile-time type:
    Field.type()
    Method.returnType()
    Method.argumentTypes()
    LocalVariable.type()
    ArrayType.componentType()

    The following table illustrates which subinterfaces of Type are used to mirror types in the target VM --
    Subinterfaces of PrimitiveType
    Type declared in target as | Is mirrored as an instance of
    boolean | BooleanType
    byte | ByteType
    char | CharType
    double | DoubleType
    float | FloatType
    int | IntegerType
    long | LongType
    short | ShortType
    void | VoidType
    Subinterfaces of ReferenceType
    Type declared in target as | For example | Is mirrored as an instance of
    a class | Date | ClassType
    an interface | Runnable | InterfaceType
    an array | ArrayType
    an array | int[] | ArrayType whose componentType() is IntegerType
    an array | Date[] | ArrayType whose componentType() is ClassType
    an array | Runnable[] | ArrayType whose componentType() is InterfaceType

    Since:
    1.3
    See Also:
    Subinterface PrimitiveType, Subinterface ReferenceType, Value - for relationship between Type and Value, Field.type() - for usage examples

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      String name()
      String signature()
      Returns the JNI-style signature for this type.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • signature

        String signature()
        Returns the JNI-style signature for this type.

        For primitive classes the returned signature is the signature of the corresponding primitive type; for example, "I" is returned as the signature of the class represented by Integer.TYPE.

        Returns:
        the string containing the type signature.
        See Also:
        Type Signatures

      • name

        String name()
        Returns:
        a text representation of this type.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


TypeComponent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface TypeComponent

  • All Superinterfaces:
    Accessible, Mirror
    All Known Subinterfaces:
    Field, Method

    @Exported
public interface TypeComponent
extends Mirror, Accessible
    An entity declared within a user defined type (class or interface). This interface is the root of the type component hierarchy which includes Field and Method. Type components of the same name declared in different classes (including those related by inheritance) have different TypeComponent objects. TypeComponents can be used alone to retrieve static information about their declaration, or can be used in conjunction with a ReferenceType or ObjectReference to access values or invoke, as applicable.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      ReferenceType declaringType()
      Returns the type in which this component was declared.
      String genericSignature()
      Gets the generic signature for this TypeComponent if there is one.
      boolean isFinal()
      Determines if this TypeComponent is final.
      boolean isStatic()
      Determines if this TypeComponent is static.
      boolean isSynthetic()
      Determines if this TypeComponent is synthetic.
      String name()
      Gets the name of this type component.
      String signature()
      Gets the JNI-style signature for this type component.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

      • Methods inherited from interface com.sun.jdi.Accessible

        isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

    • Method Detail

      • name

        String name()
        Gets the name of this type component.

        Note: for fields, this is the field name; for methods, this is the method name; for constructors, this is <init>; for static initializers, this is <clinit>.

        Returns:
        a string containing the name.

      • signature

        String signature()
        Gets the JNI-style signature for this type component. The signature is encoded type information as defined in the JNI documentation. It is a convenient, compact format for for manipulating type information internally, not necessarily for display to an end user. See Field.typeName() and Method.returnTypeName() for ways to help get a more readable representation of the type.
        Returns:
        a string containing the signature
        See Also:
        Type Signatures

      • genericSignature

        String genericSignature()
        Gets the generic signature for this TypeComponent if there is one. Generic signatures are described in the The Java™ Virtual Machine Specification.
        Returns:
        a string containing the generic signature, or null if there is no generic signature.
        Since:
        1.5

      • declaringType

        ReferenceType declaringType()
        Returns the type in which this component was declared. The returned ReferenceType mirrors either a class or an interface in the target VM.
        Returns:
        a ReferenceType for the type that declared this type component.

      • isStatic

        boolean isStatic()
        Determines if this TypeComponent is static. Return value is undefined for constructors and static initializers.
        Returns:
        true if this type component was declared static; false otherwise.

      • isFinal

        boolean isFinal()
        Determines if this TypeComponent is final. Return value is undefined for constructors and static initializers.
        Returns:
        true if this type component was declared final; false otherwise.

      • isSynthetic

        boolean isSynthetic()
        Determines if this TypeComponent is synthetic. Synthetic members are generated by the compiler and are not present in the source code for the containing class.

        Not all target VMs support this query. See VirtualMachine.canGetSyntheticAttribute() to determine if the operation is supported.

        Returns:
        true if this type component is synthetic; false otherwise.
        Throws:
        UnsupportedOperationException - if the target VM cannot provide information on synthetic attributes.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Value

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface Value

  • All Superinterfaces:
    Mirror
    All Known Subinterfaces:
    ArrayReference, BooleanValue, ByteValue, CharValue, ClassLoaderReference, ClassObjectReference, DoubleValue, FloatValue, IntegerValue, LongValue, ObjectReference, PrimitiveValue, ShortValue, StringReference, ThreadGroupReference, ThreadReference, VoidValue

    @Exported
public interface Value
extends Mirror
    The mirror for a value in the target VM. This interface is the root of a value hierarchy encompassing primitive values and object values.

    Some examples of where values may be accessed:

    ObjectReference.getValue(Field) | - value of a field
    StackFrame.getValue(LocalVariable) | - value of a variable
    VirtualMachine.mirrorOf(double) | - created in the target VM by the JDI client
    ModificationWatchpointEvent.valueToBe() | - returned with an event

    The following table illustrates which subinterfaces of Value are used to mirror values in the target VM --
    Subinterfaces of PrimitiveValue
    Kind of value For example -
    expression in target     		Is mirrored as an
    instance of     		Type of value
    Value.type()
    a boolean | true | BooleanValue | BooleanType
    a byte | (byte)4 | ByteValue | ByteType
    a char | 'a' | CharValue | CharType
    a double | 3.1415926 | DoubleValue | DoubleType
    a float | 2.5f | FloatValue | FloatType
    an int | 22 | IntegerValue | IntegerType
    a long | 1024L | LongValue | LongType
    a short | (short)12 | ShortValue | ShortType
    a void   | VoidValue | VoidType
    Subinterfaces of ObjectReference
    Kind of value For example -
    expression in target     		Is mirrored as an
    instance of     		Type of value
    Value.type()
    a class instance | this | ObjectReference | ClassType
    an array | new int[5] | ArrayReference | ArrayType
    a string | "hello" | StringReference | ClassType
    a thread | Thread.currentThread() | ThreadReference | ClassType
    a thread group Thread.currentThread()
      .getThreadGroup()         		ThreadGroupReference ClassType
    a java.lang.Class
    instance     		this.getClass() ClassObjectReference ClassType
    a class loader this.getClass()
      .getClassLoader()     		ClassLoaderReference ClassType
    Other
    Kind of value For example -
    expression in target     		Is mirrored as Type of value
    null | null | null | n/a

    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      Type type()
      Returns the run-time type of this value.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • type

        Type type()
        Returns the run-time type of this value.
        Returns:
        a Type which mirrors the value's type in the target VM.
        See Also:
        Type
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VirtualMachine

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface VirtualMachine

  • All Superinterfaces:
    Mirror
    All Known Subinterfaces:
    PathSearchingVirtualMachine

    @Exported
public interface VirtualMachine
extends Mirror
    A virtual machine targeted for debugging. More precisely, a mirror representing the composite state of the target VM. All other mirrors are associated with an instance of this interface. Access to all other mirrors is achieved directly or indirectly through an instance of this interface. Access to global VM properties and control of VM execution are supported directly by this interface.

    Instances of this interface are created by instances of Connector. For example, an AttachingConnector attaches to a target VM and returns its virtual machine mirror. A Connector will typically create a VirtualMachine by invoking the VirtualMachineManager's VirtualMachineManager.createVirtualMachine(Connection) createVirtualMachine(Connection) method.

    Note that a target VM launched by a launching connector is not guaranteed to be stable until after the VMStartEvent has been received.

    Any method on VirtualMachine which takes VirtualMachine as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

    Any method on VirtualMachine which takes VirtualMachine as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

    Since:
    1.3

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int TRACE_ALL
      All tracing is enabled.
      static int TRACE_EVENTS
      Tracing enabled for internal event handling.
      static int TRACE_NONE
      All tracing is disabled.
      static int TRACE_OBJREFS
      Tracing enabled for internal management of object references.
      static int TRACE_RECEIVES
      Tracing enabled for JDWP packets received from target VM.
      static int TRACE_REFTYPES
      Tracing enabled for internal managment of reference types.
      static int TRACE_SENDS
      Tracing enabled for JDWP packets sent to target VM.

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<ReferenceType> allClasses()
      Returns all loaded types.
      List<ThreadReference> allThreads()
      Returns a list of the currently running threads.
      boolean canAddMethod()
      Determines if the target VM supports the addition of methods when performing class redefinition.
      boolean canBeModified()
      Determines if the target VM is a read-only VM.
      boolean canForceEarlyReturn()
      Determines if the target VM supports the forcing of a method to return early.
      boolean canGetBytecodes()
      Determines if the target VM supports the retrieval of a method's bytecodes.
      boolean canGetClassFileVersion()
      Determines if the target VM supports reading class file major and minor versions.
      boolean canGetConstantPool()
      Determines if the target VM supports getting constant pool information of a class.
      boolean canGetCurrentContendedMonitor()
      Determines if the target VM supports the retrieval of the monitor for which a thread is currently waiting.
      boolean canGetInstanceInfo()
      Determines if the target VM supports the accessing of class instances, instance counts, and referring objects.
      boolean canGetMethodReturnValues()
      Determines if the target VM supports the inclusion of return values in MethodExitEvents.
      boolean canGetMonitorFrameInfo()
      Determines if the target VM supports getting which frame has acquired a monitor.
      boolean canGetMonitorInfo()
      Determines if the target VM supports the retrieval of the monitor information for an object.
      boolean canGetOwnedMonitorInfo()
      Determines if the target VM supports the retrieval of the monitors owned by a thread.
      boolean canGetSourceDebugExtension()
      Determines if the target VM supports getting the source debug extension.
      boolean canGetSyntheticAttribute()
      Determines if the target VM supports the query of the synthetic attribute of a method or field.
      boolean canPopFrames()
      Determines if the target VM supports popping frames of a threads stack.
      boolean canRedefineClasses()
      Determines if the target VM supports any level of class redefinition.
      boolean canRequestMonitorEvents()
      Determines if the target VM supports the creation of MonitorContendedEnterRequests.
      boolean canRequestVMDeathEvent()
      Determines if the target VM supports the creation of VMDeathRequests.
      boolean canUnrestrictedlyRedefineClasses()
      Determines if the target VM supports unrestricted changes when performing class redefinition.
      boolean canUseInstanceFilters()
      Determines if the target VM supports filtering events by specific instance object.
      boolean canUseSourceNameFilters()
      Determines if the target VM supports the filtering of class prepare events by source name.
      boolean canWatchFieldAccess()
      Determines if the target VM supports watchpoints for field access.
      boolean canWatchFieldModification()
      Determines if the target VM supports watchpoints for field modification.
      List<ReferenceType> classesByName(String className)
      Returns the loaded reference types that match a given name.
      String description()
      Returns text information on the target VM and the debugger support that mirrors it.
      void dispose()
      Invalidates this virtual machine mirror.
      EventQueue eventQueue()
      Returns the event queue for this virtual machine.
      EventRequestManager eventRequestManager()
      Returns the event request manager for this virtual machine.
      void exit(int exitCode)
      Causes the mirrored VM to terminate with the given error code.
      String getDefaultStratum()
      Return this VM's default stratum.
      long[] instanceCounts(List<? extends ReferenceType> refTypes)
      Returns the number of instances of each ReferenceType in the 'refTypes' list.
      BooleanValue mirrorOf(boolean value)
      Creates a BooleanValue for the given value.
      ByteValue mirrorOf(byte value)
      Creates a ByteValue for the given value.
      CharValue mirrorOf(char value)
      Creates a CharValue for the given value.
      DoubleValue mirrorOf(double value)
      Creates a DoubleValue for the given value.
      FloatValue mirrorOf(float value)
      Creates a FloatValue for the given value.
      IntegerValue mirrorOf(int value)
      Creates an IntegerValue for the given value.
      LongValue mirrorOf(long value)
      Creates a LongValue for the given value.
      ShortValue mirrorOf(short value)
      Creates a ShortValue for the given value.
      StringReference mirrorOf(String value)
      Creates a string in this virtual machine.
      VoidValue mirrorOfVoid()
      Creates a VoidValue.
      String name()
      Returns the name of the target VM as reported by the property java.vm.name.
      Process process()
      Returns the Process object for this virtual machine if launched by a LaunchingConnector
      void redefineClasses(Map<? extends ReferenceType,byte[]> classToBytes)
      All classes given are redefined according to the definitions supplied.
      void resume()
      Continues the execution of the application running in this virtual machine.
      void setDebugTraceMode(int traceFlags)
      Traces the activities performed by the com.sun.jdi implementation.
      void setDefaultStratum(String stratum)
      Set this VM's default stratum (see Location for a discussion of strata).
      void suspend()
      Suspends the execution of the application running in this virtual machine.
      List<ThreadGroupReference> topLevelThreadGroups()
      Returns each thread group which does not have a parent.
      String version()
      Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version.

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Field Detail

      • TRACE_NONE

        static final int TRACE_NONE
        All tracing is disabled.
        See Also:
        Constant Field Values

      • TRACE_SENDS

        static final int TRACE_SENDS
        Tracing enabled for JDWP packets sent to target VM.
        See Also:
        Constant Field Values

      • TRACE_RECEIVES

        static final int TRACE_RECEIVES
        Tracing enabled for JDWP packets received from target VM.
        See Also:
        Constant Field Values

      • TRACE_EVENTS

        static final int TRACE_EVENTS
        Tracing enabled for internal event handling.
        See Also:
        Constant Field Values

      • TRACE_REFTYPES

        static final int TRACE_REFTYPES
        Tracing enabled for internal managment of reference types.
        See Also:
        Constant Field Values

      • TRACE_OBJREFS

        static final int TRACE_OBJREFS
        Tracing enabled for internal management of object references.
        See Also:
        Constant Field Values

      • TRACE_ALL

        static final int TRACE_ALL
        All tracing is enabled.
        See Also:
        Constant Field Values

    • Method Detail

      • classesByName

        List<ReferenceType> classesByName(String className)
        Returns the loaded reference types that match a given name. The name must be fully qualified (for example, java.lang.String). The returned list will contain a ReferenceType for each class or interface found with the given name. The search is confined to loaded classes only; no attempt is made to load a class of the given name.

        The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.

        Parameters:
        className - the class/interface name to search for
        Returns:
        a list of ReferenceType objects, each mirroring a type in the target VM with the given name.

      • allClasses

        List<ReferenceType> allClasses()
        Returns all loaded types. For each loaded type in the target VM a ReferenceType will be placed in the returned list. The list will include ReferenceTypes which mirror classes, interfaces, and array types.

        The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.

        Returns:
        a list of ReferenceType objects, each mirroring a loaded type in the target VM.

      • redefineClasses

        void redefineClasses(Map<? extends ReferenceType,byte[]> classToBytes)
        All classes given are redefined according to the definitions supplied. A method in a redefined class is called 'equivalent' (to the old version of the method) if
        • their bytecodes are the same except for indicies into the constant pool, and
        • the referenced constants are equal.
        Otherwise, the new method is called 'non-equivalent'. If a redefined method has active stack frames, those active frames continue to run the bytecodes of the previous version of the method. If the new version of such a method is non-equivalent, then a method from one of these active frames is called 'obsolete' and Method.isObsolete() will return true when called on one of these methods. If resetting such a frame is desired, use ThreadReference.popFrames(StackFrame) to pop the old obsolete method execution from the stack. New invocations of redefined methods will always invoke the new versions.

        This function does not cause any initialization except that which would occur under the customary JVM semantics. In other words, redefining a class does not cause its initializers to be run. The values of preexisting static variables will remain as they were prior to the call. However, completely uninitialized (new) static variables will be assigned their default value.

        If a redefined class has instances then all those instances will have the fields defined by the redefined class at the completion of the call. Preexisting fields will retain their previous values. Any new fields will have their default values; no instance initializers or constructors are run.

        Threads need not be suspended.

        No events are generated by this function.

        All breakpoints in the redefined classes are deleted.

        Not all target virtual machines support this operation. Use canRedefineClasses() to determine if the operation is supported. Use canAddMethod() to determine if the redefinition can add methods. Use canUnrestrictedlyRedefineClasses() to determine if the redefinition can change the schema, delete methods, change the class hierarchy, etc.

        Parameters:
        classToBytes - A map from ReferenceType to array of byte. The bytes represent the new class definition and are in Java Virtual Machine class file format.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        • If canRedefineClasses() is false any call of this method will throw this exception.
        • If canAddMethod() is false attempting to add a method will throw this exception.
        • If canUnrestrictedlyRedefineClasses() is false, attempting any of the following will throw this exception
          • changing the schema (the fields)
          • changing the hierarchy (subclasses, interfaces)
          • deleting a method
          • changing class modifiers
          • changing method modifiers
        NoClassDefFoundError - if the bytes don't correspond to the reference type (the names don't match).
        VerifyError - if a "verifier" detects that a class, though well formed, contains an internal inconsistency or security problem.
        ClassFormatError - if the bytes do not represent a valid class.
        ClassCircularityError - if a circularity has been detected while initializing a class.
        UnsupportedClassVersionError - if the major and minor version numbers in bytes are not supported by the VM.
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().
        Since:
        1.4
        See Also:
        Method.isObsolete(),
ThreadReference.popFrames(com.sun.jdi.StackFrame),
canRedefineClasses(),
canAddMethod(),
canUnrestrictedlyRedefineClasses()

      • allThreads

        List<ThreadReference> allThreads()
        Returns a list of the currently running threads. For each running thread in the target VM, a ThreadReference that mirrors it is placed in the list. The returned list contains threads created through java.lang.Thread, all native threads attached to the target VM through JNI, and system threads created by the target VM. Thread objects that have not yet been started (see Thread.start()) and thread objects that have completed their execution are not included in the returned list.
        Returns:
        a list of ThreadReference objects, one for each running thread in the mirrored VM.

      • suspend

        void suspend()
        Suspends the execution of the application running in this virtual machine. All threads currently running will be suspended.

        Unlike Thread.suspend(), suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed (through resume() or ThreadReference.resume()) the same number of times it has been suspended.

        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().

      • resume

        void resume()
        Continues the execution of the application running in this virtual machine. All threads are resumed as documented in ThreadReference.resume().
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().
        See Also:
        suspend()

      • topLevelThreadGroups

        List<ThreadGroupReference> topLevelThreadGroups()
        Returns each thread group which does not have a parent. For each top level thread group a ThreadGroupReference is placed in the returned list.

        This command may be used as the first step in building a tree (or trees) of the existing thread groups.

        Returns:
        a list of ThreadGroupReference objects, one for each top level thread group.

      • eventQueue

        EventQueue eventQueue()
        Returns the event queue for this virtual machine. A virtual machine has only one EventQueue object, this method will return the same instance each time it is invoked.
        Returns:
        the EventQueue for this virtual machine.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().

      • eventRequestManager

        EventRequestManager eventRequestManager()
        Returns the event request manager for this virtual machine. The EventRequestManager controls user settable events such as breakpoints. A virtual machine has only one EventRequestManager object, this method will return the same instance each time it is invoked.
        Returns:
        the EventRequestManager for this virtual machine.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().

      • mirrorOf

        BooleanValue mirrorOf(boolean value)
        Creates a BooleanValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a boolean for which to create the value
        Returns:
        the BooleanValue for the given boolean.

      • mirrorOf

        ByteValue mirrorOf(byte value)
        Creates a ByteValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a byte for which to create the value
        Returns:
        the ByteValue for the given byte.

      • mirrorOf

        CharValue mirrorOf(char value)
        Creates a CharValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a char for which to create the value
        Returns:
        the CharValue for the given char.

      • mirrorOf

        ShortValue mirrorOf(short value)
        Creates a ShortValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a short for which to create the value
        Returns:
        the ShortValue for the given short.

      • mirrorOf

        IntegerValue mirrorOf(int value)
        Creates an IntegerValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - an int for which to create the value
        Returns:
        the IntegerValue for the given int.

      • mirrorOf

        LongValue mirrorOf(long value)
        Creates a LongValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a long for which to create the value
        Returns:
        the LongValue for the given long.

      • mirrorOf

        FloatValue mirrorOf(float value)
        Creates a FloatValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a float for which to create the value
        Returns:
        the FloatValue for the given float.

      • mirrorOf

        DoubleValue mirrorOf(double value)
        Creates a DoubleValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - a double for which to create the value
        Returns:
        the DoubleValue for the given double.

      • mirrorOf

        StringReference mirrorOf(String value)
        Creates a string in this virtual machine. The created string can be used for setting and comparing against a string value retrieved from a variable or field in this virtual machine.
        Parameters:
        value - the string to be created
        Returns:
        a StringReference that mirrors the newly created string in the target VM.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only -see canBeModified().

      • mirrorOfVoid

        VoidValue mirrorOfVoid()
        Creates a VoidValue. This value can be passed to ThreadReference.forceEarlyReturn(com.sun.jdi.Value) when a void method is to be exited.
        Returns:
        the VoidValue.

      • process

        Process process()
        Returns the Process object for this virtual machine if launched by a LaunchingConnector
        Returns:
        the Process object for this virtual machine, or null if it was not launched by a LaunchingConnector.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only -see canBeModified().

      • dispose

        void dispose()
        Invalidates this virtual machine mirror. The communication channel to the target VM is closed, and the target VM prepares to accept another subsequent connection from this debugger or another debugger, including the following tasks:
        • All event requests are cancelled.
        • All threads suspended by suspend() or by ThreadReference.suspend() are resumed as many times as necessary for them to run.
        • Garbage collection is re-enabled in all cases where it was disabled through ObjectReference.disableCollection().
        Any current method invocations executing in the target VM are continued after the disconnection. Upon completion of any such method invocation, the invoking thread continues from the location where it was originally stopped.

        Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

      • exit

        void exit(int exitCode)
        Causes the mirrored VM to terminate with the given error code. All resources associated with this VirtualMachine are freed. If the mirrored VM is remote, the communication channel to it will be closed. Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

        Threads running in the mirrored VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.

        Parameters:
        exitCode - the exit code for the target VM. On some platforms, the exit code might be truncated, for example, to the lower order 8 bits.
        Throws:
        VMCannotBeModifiedException - if the VirtualMachine is read-only - see canBeModified().

      • canWatchFieldModification

        boolean canWatchFieldModification()
        Determines if the target VM supports watchpoints for field modification.
        Returns:
        true if the feature is supported, false otherwise.

      • canWatchFieldAccess

        boolean canWatchFieldAccess()
        Determines if the target VM supports watchpoints for field access.
        Returns:
        true if the feature is supported, false otherwise.

      • canGetBytecodes

        boolean canGetBytecodes()
        Determines if the target VM supports the retrieval of a method's bytecodes.
        Returns:
        true if the feature is supported, false otherwise.

      • canGetSyntheticAttribute

        boolean canGetSyntheticAttribute()
        Determines if the target VM supports the query of the synthetic attribute of a method or field.
        Returns:
        true if the feature is supported, false otherwise.

      • canGetOwnedMonitorInfo

        boolean canGetOwnedMonitorInfo()
        Determines if the target VM supports the retrieval of the monitors owned by a thread.
        Returns:
        true if the feature is supported, false otherwise.

      • canGetCurrentContendedMonitor

        boolean canGetCurrentContendedMonitor()
        Determines if the target VM supports the retrieval of the monitor for which a thread is currently waiting.
        Returns:
        true if the feature is supported, false otherwise.

      • canGetMonitorInfo

        boolean canGetMonitorInfo()
        Determines if the target VM supports the retrieval of the monitor information for an object.
        Returns:
        true if the feature is supported, false otherwise.

      • canUseInstanceFilters

        boolean canUseInstanceFilters()
        Determines if the target VM supports filtering events by specific instance object. For example, see BreakpointRequest.addInstanceFilter(com.sun.jdi.ObjectReference).
        Returns:
        true if the feature is supported, false otherwise.

      • canRedefineClasses

        boolean canRedefineClasses()
        Determines if the target VM supports any level of class redefinition.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>)

      • canAddMethod

        boolean canAddMethod()
        Determines if the target VM supports the addition of methods when performing class redefinition.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>)

      • canUnrestrictedlyRedefineClasses

        boolean canUnrestrictedlyRedefineClasses()
        Determines if the target VM supports unrestricted changes when performing class redefinition.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        redefineClasses(java.util.Map<? extends com.sun.jdi.ReferenceType, byte[]>)

      • canPopFrames

        boolean canPopFrames()
        Determines if the target VM supports popping frames of a threads stack.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        ThreadReference.popFrames(com.sun.jdi.StackFrame)

      • canGetSourceDebugExtension

        boolean canGetSourceDebugExtension()
        Determines if the target VM supports getting the source debug extension.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        ReferenceType.sourceDebugExtension()

      • canRequestVMDeathEvent

        boolean canRequestVMDeathEvent()
        Determines if the target VM supports the creation of VMDeathRequests.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.4
        See Also:
        EventRequestManager.createVMDeathRequest()

      • canGetMethodReturnValues

        boolean canGetMethodReturnValues()
        Determines if the target VM supports the inclusion of return values in MethodExitEvents.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        EventRequestManager.createMethodExitRequest()

      • canGetInstanceInfo

        boolean canGetInstanceInfo()
        Determines if the target VM supports the accessing of class instances, instance counts, and referring objects.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        instanceCounts(java.util.List<? extends com.sun.jdi.ReferenceType>),
ReferenceType.instances(long),
ObjectReference.referringObjects(long)

      • canUseSourceNameFilters

        boolean canUseSourceNameFilters()
        Determines if the target VM supports the filtering of class prepare events by source name. see ClassPrepareRequest.addSourceNameFilter(java.lang.String).
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6

      • canForceEarlyReturn

        boolean canForceEarlyReturn()
        Determines if the target VM supports the forcing of a method to return early.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        ThreadReference.forceEarlyReturn(Value)

      • canBeModified

        boolean canBeModified()
        Determines if the target VM is a read-only VM. If a method which would modify the state of the VM is called on a read-only VM, then VMCannotBeModifiedException is thrown.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.5

      • canRequestMonitorEvents

        boolean canRequestMonitorEvents()
        Determines if the target VM supports the creation of MonitorContendedEnterRequests. MonitorContendedEnteredRequests. MonitorWaitRequests. MonitorWaitedRequests.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        EventRequestManager.createMonitorContendedEnterRequest(),
EventRequestManager.createMonitorContendedEnteredRequest(),
EventRequestManager.createMonitorWaitRequest(),
EventRequestManager.createMonitorWaitedRequest()

      • canGetMonitorFrameInfo

        boolean canGetMonitorFrameInfo()
        Determines if the target VM supports getting which frame has acquired a monitor.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        ThreadReference.ownedMonitorsAndFrames()

      • canGetClassFileVersion

        boolean canGetClassFileVersion()
        Determines if the target VM supports reading class file major and minor versions.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        ReferenceType.majorVersion(), ReferenceType.minorVersion()

      • canGetConstantPool

        boolean canGetConstantPool()
        Determines if the target VM supports getting constant pool information of a class.
        Returns:
        true if the feature is supported, false otherwise.
        Since:
        1.6
        See Also:
        ReferenceType.constantPoolCount(), ReferenceType.constantPool()

      • setDefaultStratum

        void setDefaultStratum(String stratum)
        Set this VM's default stratum (see Location for a discussion of strata). Overrides the per-class default set in the class file.

        Affects location queries (such as, Location.sourceName()) and the line boundaries used in single stepping.

        Parameters:
        stratum - the stratum to set as VM default, or null to use per-class defaults.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation.
        Since:
        1.4

      • getDefaultStratum

        String getDefaultStratum()
        Return this VM's default stratum.
        Returns:
        null (meaning that the per-class default - ReferenceType.defaultStratum() - should be used) unless the default stratum has been set with setDefaultStratum(String).
        Since:
        1.4
        See Also:
        setDefaultStratum(String), ReferenceType.defaultStratum()

      • instanceCounts

        long[] instanceCounts(List<? extends ReferenceType> refTypes)
        Returns the number of instances of each ReferenceType in the 'refTypes' list. Only instances that are reachable for the purposes of garbage collection are counted.

        Not all target virtual machines support this operation. Use canGetInstanceInfo() to determine if the operation is supported.

        Parameters:
        refTypes - the list of ReferenceType objects for which counts are to be obtained.
        Returns:
        an array of long containing one element for each element in the 'refTypes' list. Element i of the array contains the number of instances in the target VM of the ReferenceType at position i in the 'refTypes' list. If the 'refTypes' list is empty, a zero-length array is returned. If a ReferenceType in refTypes has been garbage collected, zero is returned for its instance count.
        Throws:
        UnsupportedOperationException - if the target virtual machine does not support this operation - see canGetInstanceInfo()
        NullPointerException - if the 'refTypes' list is null.
        Since:
        1.6
        See Also:
        ReferenceType.instances(long), ObjectReference.referringObjects(long)

      • description

        String description()
        Returns text information on the target VM and the debugger support that mirrors it. No specific format for this information is guaranteed. Typically, this string contains version information for the target VM and debugger interfaces. More precise information on VM and JDI versions is available through version(), VirtualMachineManager.majorInterfaceVersion(), and VirtualMachineManager.minorInterfaceVersion()
        Returns:
        the description.

      • version

        String version()
        Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version. For obtaining the JDI interface version, use VirtualMachineManager.majorInterfaceVersion() and VirtualMachineManager.minorInterfaceVersion()
        Returns:
        the target VM version.

      • name

        String name()
        Returns the name of the target VM as reported by the property java.vm.name.
        Returns:
        the target VM name.

      • setDebugTraceMode

        void setDebugTraceMode(int traceFlags)
        Traces the activities performed by the com.sun.jdi implementation. All trace information is output to System.err. The given trace flags are used to limit the output to only the information desired. The given flags are in effect and the corresponding trace will continue until the next call to this method.

        Output is implementation dependent and trace mode may be ignored.

        Parameters:
        traceFlags - identifies which kinds of tracing to enable.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VirtualMachineManager

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface VirtualMachineManager

  • @Exported
public interface VirtualMachineManager
    A manager of connections to target virtual machines. The VirtualMachineManager allows one application to debug multiple target VMs. (Note that the converse is not supported; a target VM can be debugged by only one debugger application.) This interface contains methods to manage connections to remote target VMs and to obtain the VirtualMachine mirror for available target VMs.

    Connections can be made using one of several different Connector objects. Each connector encapsulates a different way of connecting the debugger with a target VM.

    The VirtualMachineManager supports many different scenarios for connecting a debugger to a virtual machine. Four examples are presented in the table below. The examples use the command line syntax in Sun's implementation. Some Connector implementations may require slightly different handling than presented below.

    Scenario Description
    Debugger launches target VM (simplest, most-common scenario) Debugger calls the LaunchingConnector.launch(java.util.Map) method of the default connector, obtained with defaultConnector(). The target VM is launched, and a connection between that VM and the debugger is established. A VirtualMachine mirror is returned.

    Or, for more control

    • Debugger selects a connector from the list returned by launchingConnectors() with desired characteristics (for example, transport type, etc.).
    • Debugger calls the LaunchingConnector.launch(java.util.Map) method of the selected connector. The target VM is launched, and a connection between that VM and the debugger is established. A VirtualMachine mirror is returned.
    Debugger attaches to previously-running VM
    • Target VM is launched using the options -agentlib:jdwp=transport=xxx,server=y
    • Target VM generates and outputs the tranport-specific address at which it will listen for a connection.
    • Debugger is launched. Debugger selects a connector in the list returned by attachingConnectors() matching the transport with the name "xxx".
    • Debugger presents the default connector parameters (obtained through Connector.defaultArguments()) to the end user, allowing the user to fill in the transport-specific address generated by the target VM.
    • Debugger calls the AttachingConnector.attach(java.util.Map) method of the selected to attach to the target VM. A VirtualMachine mirror is returned.
    Target VM attaches to previously-running debugger
  • At startup, debugger selects one or more connectors from the list returned by listeningConnectors() for one or more transports.
  • Debugger calls the ListeningConnector.startListening(java.util.Map) method for each selected connector. For each call, a transport-specific address string is generated and returned. The debugger makes the transport names and corresponding address strings available to the end user.
  • Debugger calls ListeningConnector.accept(java.util.Map) for each selected connector to wait for a target VM to connect.
  • Later, target VM is launched by end user with the options -agentlib:jdwp=transport=xxx,address=yyy where "xxx" the transport for one of the connectors selected by the the debugger and "yyy" is the address generated by ListeningConnector.accept(java.util.Map) for that transport.
  • Debugger's call to ListeningConnector.accept(java.util.Map) returns a VirtualMachine mirror.
            •
    Target VM launches debugger (sometimes called "Just-In-Time" debugging)
  • Target VM is launched with the options -agentlib:jdwp=launch=cmdline,onuncaught=y,transport=xxx,server=y
  • Later, an uncaught exception is thrown in the target VM. The target VM generates the tranport-specific address at which it will listen for a connection.
  • Target VM launches the debugger with the following items concatenated together (separated by spaces) to form the command line:
    • The launch= value
    • The transport= value
    • The generated transport-specific address at which VM is listening for debugger connection.
  • Upon launch, debugger selects a connector in the list returned by attachingConnectors() matching the transport with the name "xxx".
  • Debugger changes the default connector parameters (obtained through Connector.defaultArguments()) to specify the transport specific address at which the VM is listenig. Optionally, other connector arguments can be presented to the user.
  • Debugger calls the AttachingConnector.attach(java.util.Map) method of the selected to attach to the target VM. A VirtualMachine mirror is returned.

    • Connectors are created at start-up time. That is, they are created the first time that Bootstrap.virtualMachineManager() is invoked. The list of all Connectors created at start-up time can be obtained from the VirtualMachineManager by invoking the allConnectors method.

    Connectors are created at start-up time if they are installed on the platform. In addition, Connectors are created automatically by the VirtualMachineManager to encapsulate any TransportService implementations that are installed on the platform. These two mechanisms for creating Connectors are described here.

    A Connector is installed on the platform if it is installed in a jar file that is visible to the defining class loader of the Connector type, and that jar file contains a provider configuration file named com.sun.jdi.connect.Connector in the resource directory META-INF/services, and the provider configuration file lists the full-qualified class name of the Connector implementation. A Connector is a class that implements the Connector interface. More appropriately the class implements one of the specific Connector types, namely AttachingConnector, ListeningConnector, or LaunchingConnector. The format of the provider configuration file is one fully-qualified class name per line. Space and tab characters surrounding each class, as well as blank lines are ignored. The comment character is '#' (0x23), and on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

    At start-up time the VirtualMachineManager attempts to load and instantiate (using the no-arg constructor) each class listed in the provider configuration file. Exceptions thrown when loading or creating the Connector are caught and ignored. In other words, the start-up process continues despite of errors.

    In addition to Connectors installed on the platform the VirtualMachineManager will also create Connectors to encapsulate any TransportService implementations that are installed on the platform. A TransportService is installed on the platform if it installed in a jar file that is visible to the defining class loader for the TransportService type, and that jar file contains a provider configuration file named com.sun.jdi.connect.spi.TransportService in the resource directory META-INF/services, and the provider configuration file lists the the full-qualified class name of the TransportService implementation. A TransportService is a concrete sub-class of TransportService. The format of the provider configuration file is the same as the provider configuration file for Connectors except that each class listed must be the fully-qualified class name of a class that implements the TransportService interface.

    For each TransportService installed on the platform, the VirtualMachineManager creates a corresponding AttachingConnector and ListeningConnector. These Connectors are created to encapsulate a Transport that in turn encapsulates the TransportService. The AttachingConnector will be named based on the name of the transport service concatenated with the string Attach. For example, if the transport service name() method returns telepathic then the AttachingConnector will be named telepathicAttach. Similiarly the ListeningConnector will be named with the string Listen tagged onto the name of the transport service. The description() method of both the AttachingConnector, and the ListeningConnector, will delegate to the description() method of the underlying transport service. Both the AttachingConnector and the ListeningConnector will have two Connector Arguments. A StringArgument named address is the connector argument to specify the address to attach too, or to listen on. A IntegerArgument named timeout is the connector argument to specify the timeout when attaching, or accepting. The timeout connector may be ignored depending on if the transport service supports an attach timeout or accept timeout.

    Initialization of the virtual machine manager will fail, that is Bootstrap.virtualMachineManager() will throw an error if the virtual machine manager is unable to create any connectors.

    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      List<Connector> allConnectors()
      Returns the list of all known Connector objects.
      List<AttachingConnector> attachingConnectors()
      Returns the list of known AttachingConnector objects.
      List<VirtualMachine> connectedVirtualMachines()
      Lists all target VMs which are connected to the debugger.
      VirtualMachine createVirtualMachine(Connection connection)
      Creates a new virtual machine.
      VirtualMachine createVirtualMachine(Connection connection, Process process)
      Create a virtual machine mirror for a target VM.
      LaunchingConnector defaultConnector()
      Identifies the default connector.
      List<LaunchingConnector> launchingConnectors()
      Returns the list of known LaunchingConnector objects.
      List<ListeningConnector> listeningConnectors()
      Returns the list of known ListeningConnector objects.
      int majorInterfaceVersion()
      Returns the major version number of the JDI interface.
      int minorInterfaceVersion()
      Returns the minor version number of the JDI interface.

    • Method Detail

      • defaultConnector

        LaunchingConnector defaultConnector()
        Identifies the default connector. This connector should be used as the launching connector when selection of a connector with specific characteristics is unnecessary.
        Returns:
        the default LaunchingConnector

      • launchingConnectors

        List<LaunchingConnector> launchingConnectors()
        Returns the list of known LaunchingConnector objects. Any of the returned objects can be used to launch a new target VM and immediately create a VirtualMachine mirror for it. Note that a target VM launched by a launching connector is not guaranteed to be stable until after the VMStartEvent has been received.
        Returns:
        a list of LaunchingConnector objects.

      • attachingConnectors

        List<AttachingConnector> attachingConnectors()
        Returns the list of known AttachingConnector objects. Any of the returned objects can be used to attach to an existing target VM and create a VirtualMachine mirror for it.
        Returns:
        a list of AttachingConnector objects.

      • listeningConnectors

        List<ListeningConnector> listeningConnectors()
        Returns the list of known ListeningConnector objects. Any of the returned objects can be used to listen for a connection initiated by a target VM and create a VirtualMachine mirror for it.
        Returns:
        a list of ListeningConnector objects.

      • allConnectors

        List<Connector> allConnectors()
        Returns the list of all known Connector objects.
        Returns:
        a list of Connector objects.

      • connectedVirtualMachines

        List<VirtualMachine> connectedVirtualMachines()
        Lists all target VMs which are connected to the debugger. The list includes VirtualMachine instances for any target VMs which initiated a connection and any target VMs to which this manager has initiated a connection. A target VM will remain in this list until the VM is disconnected. VMDisconnectEvent is placed in the event queue after the VM is removed from the list.
        Returns:
        a list of VirtualMachine objects, each mirroring a target VM.

      • majorInterfaceVersion

        int majorInterfaceVersion()
        Returns the major version number of the JDI interface. See VirtualMachine.version() target VM version and information and VirtualMachine.description() more version information.
        Returns:
        the integer major version number.

      • minorInterfaceVersion

        int minorInterfaceVersion()
        Returns the minor version number of the JDI interface. See VirtualMachine.version() target VM version and information and VirtualMachine.description() more version information.
        Returns:
        the integer minor version number

      • createVirtualMachine

        VirtualMachine createVirtualMachine(Connection connection,
                                    Process process)
                             throws IOException
        Create a virtual machine mirror for a target VM.

        Creates a virtual machine mirror for a target VM for which a Connection already exists. A Connection is created when a Connector establishes a connection and successfully handshakes with a target VM. A Connector can then use this method to create a virtual machine mirror to represent the composite state of the target VM.

        The process argument specifies the Process object for the taget VM. It may be specified as null. If the target VM is launched by a LaunchingConnector the process argument should be specified, otherwise calling VirtualMachine.process() on the created virtual machine will return null.

        This method exists so that Connectors may create a virtual machine mirror when a connection is established to a target VM. Only developers creating new Connector implementations should need to make direct use of this method.

        Parameters:
        connection - The open connection to the target VM.
        process - If launched, the Process object for the target VM. null if not launched.
        Returns:
        new virtual machine representing the target VM.
        Throws:
        IOException - if an I/O error occurs
        IllegalStateException - if the connection is not open
        Since:
        1.5
        See Also:
        Connection.isOpen(), VirtualMachine.process()

      • createVirtualMachine

        VirtualMachine createVirtualMachine(Connection connection)
                             throws IOException
        Creates a new virtual machine.

        This convenience method works as if by invoking createVirtualMachine(Connection, Process) method and specifying null as the process argument.

        This method exists so that Connectors may create a virtual machine mirror when a connection is established to a target VM. Only developers creating new Connector implementations should need to make direct use of this method.

        Returns:
        the new virtual machine
        Throws:
        IOException - if an I/O error occurs
        IllegalStateException - if the connection is not open
        Since:
        1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMCannotBeModifiedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class VMCannotBeModifiedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • java.lang.UnsupportedOperationException
            • com.sun.jdi.VMCannotBeModifiedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class VMCannotBeModifiedException
extends UnsupportedOperationException
    Thrown to indicate that the operation is invalid because it would modify the VM and the VM is read-only. See VirtualMachine.canBeModified().
    Since:
    1.5
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      VMCannotBeModifiedException()
      VMCannotBeModifiedException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VMCannotBeModifiedException

        public VMCannotBeModifiedException()

      • VMCannotBeModifiedException

        public VMCannotBeModifiedException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMDisconnectedException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class VMDisconnectedException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.VMDisconnectedException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class VMDisconnectedException
extends RuntimeException
    Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      VMDisconnectedException()
      VMDisconnectedException(String message)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VMDisconnectedException

        public VMDisconnectedException()

      • VMDisconnectedException

        public VMDisconnectedException(String message)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMMismatchException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class VMMismatchException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.VMMismatchException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class VMMismatchException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      VMMismatchException()
      VMMismatchException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VMMismatchException

        public VMMismatchException()

      • VMMismatchException

        public VMMismatchException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VMOutOfMemoryException

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Class VMOutOfMemoryException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.sun.jdi.VMOutOfMemoryException
  • All Implemented Interfaces:
    Serializable

    @Exported
public class VMOutOfMemoryException
extends RuntimeException
    Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.
    Since:
    1.3
    See Also:
    Serialized Form

    • Constructor Summary

      Constructors
      Constructor and Description
      VMOutOfMemoryException()
      VMOutOfMemoryException(String s)

    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • VMOutOfMemoryException

        public VMOutOfMemoryException()

      • VMOutOfMemoryException

        public VMOutOfMemoryException(String s)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


VoidValue

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.sun.jdi

Interface VoidValue

  • All Superinterfaces:
    Mirror, Value

    @Exported
public interface VoidValue
extends Value
    Provides access to a primitive void value in the target VM.
    Since:
    1.3

    • Method Summary

      All Methods Instance Methods Abstract Methods
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Compares the specified Object with this VoidValue for equality.
      int hashCode()
      Returns the hash code value for this VoidValue.

      • Methods inherited from interface com.sun.jdi.Value

        type

      • Methods inherited from interface com.sun.jdi.Mirror

        toString, virtualMachine

    • Method Detail

      • equals

        boolean equals(Object obj)
        Compares the specified Object with this VoidValue for equality.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if the Object is a VoidValue; false otherwise.
        See Also:
        Object.hashCode(), HashMap

      • hashCode

        int hashCode()
        Returns the hash code value for this VoidValue.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java Debug Interface
  • Prev Class
  • Next Class
  • Frames
  • No Frames
  • All Classes
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.


Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/us/corporate/accessibility/index.html.

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/support/contact.html or visit http://www.oracle.com/accessibility/support.html if you are hearing impaired.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Legal Notices

See Legal Notices

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Oracle Legal Notices

Copyright Notice

Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Alpha and Beta Draft Documentation Notice

If this document is in preproduction status:

This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java(tm) Debug Wire Protocol

  • VirtualMachine Command Set (1)
    • Version (1)
    • ClassesBySignature (2)
    • AllClasses (3)
    • AllThreads (4)
    • TopLevelThreadGroups (5)
    • Dispose (6)
    • IDSizes (7)
    • Suspend (8)
    • Resume (9)
    • Exit (10)
    • CreateString (11)
    • Capabilities (12)
    • ClassPaths (13)
    • DisposeObjects (14)
    • HoldEvents (15)
    • ReleaseEvents (16)
    • CapabilitiesNew (17)
    • RedefineClasses (18)
    • SetDefaultStratum (19)
    • AllClassesWithGeneric (20)
    • InstanceCounts (21)
  • ReferenceType Command Set (2)
    • Signature (1)
    • ClassLoader (2)
    • Modifiers (3)
    • Fields (4)
    • Methods (5)
    • GetValues (6)
    • SourceFile (7)
    • NestedTypes (8)
    • Status (9)
    • Interfaces (10)
    • ClassObject (11)
    • SourceDebugExtension (12)
    • SignatureWithGeneric (13)
    • FieldsWithGeneric (14)
    • MethodsWithGeneric (15)
    • Instances (16)
    • ClassFileVersion (17)
    • ConstantPool (18)
  • ClassType Command Set (3)
    • Superclass (1)
    • SetValues (2)
    • InvokeMethod (3)
    • NewInstance (4)
  • ArrayType Command Set (4)
    • NewInstance (1)
  • InterfaceType Command Set (5)
  • Method Command Set (6)
    • LineTable (1)
    • VariableTable (2)
    • Bytecodes (3)
    • IsObsolete (4)
    • VariableTableWithGeneric (5)
  • Field Command Set (8)
  • ObjectReference Command Set (9)
    • ReferenceType (1)
    • GetValues (2)
    • SetValues (3)
    • MonitorInfo (5)
    • InvokeMethod (6)
    • DisableCollection (7)
    • EnableCollection (8)
    • IsCollected (9)
    • ReferringObjects (10)
  • StringReference Command Set (10)
    • Value (1)
  • ThreadReference Command Set (11)
    • Name (1)
    • Suspend (2)
    • Resume (3)
    • Status (4)
    • ThreadGroup (5)
    • Frames (6)
    • FrameCount (7)
    • OwnedMonitors (8)
    • CurrentContendedMonitor (9)
    • Stop (10)
    • Interrupt (11)
    • SuspendCount (12)
    • OwnedMonitorsStackDepthInfo (13)
    • ForceEarlyReturn (14)
  • ThreadGroupReference Command Set (12)
    • Name (1)
    • Parent (2)
    • Children (3)
  • ArrayReference Command Set (13)
    • Length (1)
    • GetValues (2)
    • SetValues (3)
  • ClassLoaderReference Command Set (14)
    • VisibleClasses (1)
  • EventRequest Command Set (15)
    • Set (1)
    • Clear (2)
    • ClearAllBreakpoints (3)
  • StackFrame Command Set (16)
    • GetValues (1)
    • SetValues (2)
    • ThisObject (3)
    • PopFrames (4)
  • ClassObjectReference Command Set (17)
    • ReflectedType (1)
  • Event Command Set (64)
    • Composite (100)
  • Error Constants
  • EventKind Constants
  • ThreadStatus Constants
  • SuspendStatus Constants
  • ClassStatus Constants
  • TypeTag Constants
  • Tag Constants
  • StepDepth Constants
  • StepSize Constants
  • SuspendPolicy Constants
  • InvokeOptions Constants

    VirtualMachine Command Set (1)

    Version Command (1)
    Returns the JDWP version implemented by the target VM. The version string format is implementation dependent.
    Out Data
    (None)
    Reply Data
    string | description | Text information on the VM version
    int | jdwpMajor | Major JDWP Version number
    int | jdwpMinor | Minor JDWP Version number
    string | vmVersion | Target VM JRE version, as in the java.version property
    string | vmName | Target VM name, as in the java.vm.name property
    Error Data
    VM_DEAD The virtual machine is not running.
    ClassesBySignature Command (2)
    Returns reference types for all the classes loaded by the target VM which match the given signature. Multple reference types will be returned if two or more class loaders have loaded a class of the same name. The search is confined to loaded classes only; no attempt is made to load a class of the given signature.
    Out Data
    string signature JNI signature of the class to find (for example, "Ljava/lang/String;").
    Reply Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | Matching loaded reference type
    int | status | The current class status.
    Error Data
    VM_DEAD The virtual machine is not running.
    AllClasses Command (3)
    Returns reference types for all classes currently loaded by the target VM.
    Out Data
    (None)
    Reply Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | Loaded reference type
    string | signature | The JNI signature of the loaded reference type
    int | status | The current class status.
    Error Data
    VM_DEAD The virtual machine is not running.
    AllThreads Command (4)
    Returns all threads currently running in the target VM . The returned list contains threads created through java.lang.Thread, all native threads attached to the target VM through JNI, and system threads created by the target VM. Threads that have not yet been started and threads that have completed their execution are not included in the returned list.
    Out Data
    (None)
    Reply Data
    int | threads | Number of threads that follow.
    Repeated threads times:
    threadID | thread | A running thread
    Error Data
    VM_DEAD The virtual machine is not running.
    TopLevelThreadGroups Command (5)
    Returns all thread groups that do not have a parent. This command may be used as the first step in building a tree (or trees) of the existing thread groups.
    Out Data
    (None)
    Reply Data
    int | groups | Number of thread groups that follow.
    Repeated groups times:
    threadGroupID | group | A top level thread group
    Error Data
    VM_DEAD The virtual machine is not running.
    Dispose Command (6)
    Invalidates this virtual machine mirror. The communication channel to the target VM is closed, and the target VM prepares to accept another subsequent connection from this debugger or another debugger, including the following tasks:
    • All event requests are cancelled.
    • All threads suspended by the thread-level resume command or the VM-level resume command are resumed as many times as necessary for them to run.
    • Garbage collection is re-enabled in all cases where it was disabled
    Any current method invocations executing in the target VM are continued after the disconnection. Upon completion of any such method invocation, the invoking thread continues from the location where it was originally stopped.

    Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    (None)
    IDSizes Command (7)
    Returns the sizes of variably-sized data types in the target VM.The returned values indicate the number of bytes used by the identifiers in command and reply packets.
    Out Data
    (None)
    Reply Data
    int | fieldIDSize | fieldID size in bytes
    int | methodIDSize | methodID size in bytes
    int | objectIDSize | objectID size in bytes
    int | referenceTypeIDSize | referenceTypeID size in bytes
    int | frameIDSize | frameID size in bytes
    Error Data
    VM_DEAD The virtual machine is not running.
    Suspend Command (8)
    Suspends the execution of the application running in the target VM. All Java threads currently running will be suspended.

    Unlike java.lang.Thread.suspend, suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed through the VM-level resume command or the thread-level resume command the same number of times it has been suspended.

    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    VM_DEAD The virtual machine is not running.
    Resume Command (9)
    Resumes execution of the application after the suspend command or an event has stopped it. Suspensions of the Virtual Machine and individual threads are counted. If a particular thread is suspended n times, it must resumed n times before it will continue.
    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    (None)
    Exit Command (10)
    Terminates the target VM with the given exit code. On some platforms, the exit code might be truncated, for example, to the low order 8 bits. All ids previously returned from the target VM become invalid. Threads running in the VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.
    Out Data
    int exitCode the exit code
    Reply Data
    (None)
    Error Data
    (None)
    CreateString Command (11)
    Creates a new string object in the target VM and returns its id.
    Out Data
    string utf UTF-8 characters to use in the created string.
    Reply Data
    stringID stringObject Created string (instance of java.lang.String)
    Error Data
    VM_DEAD The virtual machine is not running.
    Capabilities Command (12)
    Retrieve this VM's capabilities. The capabilities are returned as booleans, each indicating the presence or absence of a capability. The commands associated with each capability will return the NOT_IMPLEMENTED error if the cabability is not available.
    Out Data
    (None)
    Reply Data
    boolean | canWatchFieldModification | Can the VM watch field modification, and therefore can it send the Modification Watchpoint Event?
    boolean | canWatchFieldAccess | Can the VM watch field access, and therefore can it send the Access Watchpoint Event?
    boolean | canGetBytecodes | Can the VM get the bytecodes of a given method?
    boolean | canGetSyntheticAttribute | Can the VM determine whether a field or method is synthetic? (that is, can the VM determine if the method or the field was invented by the compiler?)
    boolean | canGetOwnedMonitorInfo | Can the VM get the owned monitors infornation for a thread?
    boolean | canGetCurrentContendedMonitor | Can the VM get the current contended monitor of a thread?
    boolean | canGetMonitorInfo | Can the VM get the monitor information for a given object?
    Error Data
    VM_DEAD The virtual machine is not running.
    ClassPaths Command (13)
    Retrieve the classpath and bootclasspath of the target VM. If the classpath is not defined, returns an empty list. If the bootclasspath is not defined returns an empty list.
    Out Data
    (None)
    Reply Data
    string | baseDir | Base directory used to resolve relative paths in either of the following lists.
    int | classpaths | Number of paths in classpath.
    Repeated classpaths times:
    string | path | One component of classpath
    int | bootclasspaths | Number of paths in bootclasspath.
    Repeated bootclasspaths times:
    string | path | One component of bootclasspath
    Error Data
    VM_DEAD The virtual machine is not running.
    DisposeObjects Command (14)
    Releases a list of object IDs. For each object in the list, the following applies. The count of references held by the back-end (the reference count) will be decremented by refCnt. If thereafter the reference count is less than or equal to zero, the ID is freed. Any back-end resources associated with the freed ID may be freed, and if garbage collection was disabled for the object, it will be re-enabled. The sender of this command promises that no further commands will be sent referencing a freed ID.

    Use of this command is not required. If it is not sent, resources associated with each ID will be freed by the back-end at some time after the corresponding object is garbage collected. It is most useful to use this command to reduce the load on the back-end if a very large number of objects has been retrieved from the back-end (a large array, for example) but may not be garbage collected any time soon.

    IDs may be re-used by the back-end after they have been freed with this command.This description assumes reference counting, a back-end may use any implementation which operates equivalently.

    Out Data
    int | requests | Number of object dispose requests that follow
    Repeated requests times:
    objectID | object | The object ID
    int | refCnt | The number of times this object ID has been part of a packet received from the back-end. An accurate count prevents the object ID from being freed on the back-end if it is part of an incoming packet, not yet handled by the front-end.
    Reply Data
    (None)
    Error Data
    (None)
    HoldEvents Command (15)
    Tells the target VM to stop sending events. Events are not discarded; they are held until a subsequent ReleaseEvents command is sent. This command is useful to control the number of events sent to the debugger VM in situations where very large numbers of events are generated. While events are held by the debugger back-end, application execution may be frozen by the debugger back-end to prevent buffer overflows on the back end.Responses to commands are never held and are not affected by thiscommand. If events are already being held, this command is ignored.
    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    (None)
    ReleaseEvents Command (16)
    Tells the target VM to continue sending events. This command is used to restore normal activity after a HoldEvents command. If there is no current HoldEvents command in effect, this command is ignored.
    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    (None)
    CapabilitiesNew Command (17)
    Retrieve all of this VM's capabilities. The capabilities are returned as booleans, each indicating the presence or absence of a capability. The commands associated with each capability will return the NOT_IMPLEMENTED error if the cabability is not available.Since JDWP version 1.4.
    Out Data
    (None)
    Reply Data
    boolean | canWatchFieldModification | Can the VM watch field modification, and therefore can it send the Modification Watchpoint Event?
    boolean | canWatchFieldAccess | Can the VM watch field access, and therefore can it send the Access Watchpoint Event?
    boolean | canGetBytecodes | Can the VM get the bytecodes of a given method?
    boolean | canGetSyntheticAttribute | Can the VM determine whether a field or method is synthetic? (that is, can the VM determine if the method or the field was invented by the compiler?)
    boolean | canGetOwnedMonitorInfo | Can the VM get the owned monitors infornation for a thread?
    boolean | canGetCurrentContendedMonitor | Can the VM get the current contended monitor of a thread?
    boolean | canGetMonitorInfo | Can the VM get the monitor information for a given object?
    boolean | canRedefineClasses | Can the VM redefine classes?
    boolean | canAddMethod | Can the VM add methods when redefining classes?
    boolean | canUnrestrictedlyRedefineClasses | Can the VM redefine classesin arbitrary ways?
    boolean | canPopFrames | Can the VM pop stack frames?
    boolean | canUseInstanceFilters | Can the VM filter events by specific object?
    boolean | canGetSourceDebugExtension | Can the VM get the source debug extension?
    boolean | canRequestVMDeathEvent | Can the VM request VM death events?
    boolean | canSetDefaultStratum | Can the VM set a default stratum?
    boolean | canGetInstanceInfo | Can the VM return instances, counts of instances of classes and referring objects?
    boolean | canRequestMonitorEvents | Can the VM request monitor events?
    boolean | canGetMonitorFrameInfo | Can the VM get monitors with frame depth info?
    boolean | canUseSourceNameFilters | Can the VM filter class prepare events by source name?
    boolean | canGetConstantPool | Can the VM return the constant pool information?
    boolean | canForceEarlyReturn | Can the VM force early return from a method?
    boolean | reserved22 | Reserved for future capability
    boolean | reserved23 | Reserved for future capability
    boolean | reserved24 | Reserved for future capability
    boolean | reserved25 | Reserved for future capability
    boolean | reserved26 | Reserved for future capability
    boolean | reserved27 | Reserved for future capability
    boolean | reserved28 | Reserved for future capability
    boolean | reserved29 | Reserved for future capability
    boolean | reserved30 | Reserved for future capability
    boolean | reserved31 | Reserved for future capability
    boolean | reserved32 | Reserved for future capability
    Error Data
    VM_DEAD The virtual machine is not running.
    RedefineClasses Command (18)
    Installs new class definitions. If there are active stack frames in methods of the redefined classes in the target VM then those active frames continue to run the bytecodes of the original method. These methods are considered obsolete - see IsObsolete. The methods in the redefined classes will be used for new invokes in the target VM. The original method ID refers to the redefined method. All breakpoints in the redefined classes are cleared.If resetting of stack frames is desired, the PopFrames command can be used to pop frames with obsolete methods.

    Requires canRedefineClasses capability - see CapabilitiesNew. In addition to the canRedefineClasses capability, the target VM must have the canAddMethod capability to add methods when redefining classes, or the canUnrestrictedlyRedefineClasses to redefine classes in arbitrary ways.

    Out Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    referenceTypeID | refType | The reference type.
    int | classfile | Number of bytes defining class (below)
    Repeated classfile times:
    byte | classbyte | byte in JVM class file format.
    Reply Data
    (None)
    Error Data
    INVALID_CLASS | One of the refTypes is not the ID of a reference type.
    INVALID_OBJECT | One of the refTypes is not a known ID.
    UNSUPPORTED_VERSION | A class file has a version number not supported by this VM.
    INVALID_CLASS_FORMAT | The virtual machine attempted to read a class file and determined that the file is malformed or otherwise cannot be interpreted as a class file.
    CIRCULAR_CLASS_DEFINITION | A circularity has been detected while initializing a class.
    FAILS_VERIFICATION | The verifier detected that a class file, though well formed, contained some sort of internal inconsistency or security problem.
    NAMES_DONT_MATCH | The class name defined in the new class file is different from the name in the old class object.
    NOT_IMPLEMENTED | No aspect of this functionality is implemented (CapabilitiesNew.canRedefineClasses is false)
    ADD_METHOD_NOT_IMPLEMENTED | Adding methods has not been implemented.
    SCHEMA_CHANGE_NOT_IMPLEMENTED | Schema change has not been implemented.
    HIERARCHY_CHANGE_NOT_IMPLEMENTED | A direct superclass is different for the new class version, or the set of directly implemented interfaces is different and canUnrestrictedlyRedefineClasses is false.
    DELETE_METHOD_NOT_IMPLEMENTED | The new class version does not declare a method declared in the old class version and canUnrestrictedlyRedefineClasses is false.
    CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED | The new class version has different modifiers and and canUnrestrictedlyRedefineClasses is false.
    METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED | A method in the new class version has different modifiers than its counterpart in the old class version and and canUnrestrictedlyRedefineClasses is false.
    VM_DEAD | The virtual machine is not running.
    SetDefaultStratum Command (19)
    Set the default stratum. Requires canSetDefaultStratum capability - see CapabilitiesNew.
    Out Data
    string stratumID default stratum, or empty string to use reference type default.
    Reply Data
    (None)
    Error Data
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    AllClassesWithGeneric Command (20)
    Returns reference types for all classes currently loaded by the target VM. Both the JNI signature and the generic signature are returned for each class. Generic signatures are described in the signature attribute section in The Java™ Virtual Machine Specification. Since JDWP version 1.5.
    Out Data
    (None)
    Reply Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | Loaded reference type
    string | signature | The JNI signature of the loaded reference type.
    string | genericSignature | The generic signature of the loaded reference type or an empty string if there is none.
    int | status | The current class status.
    Error Data
    VM_DEAD The virtual machine is not running.
    InstanceCounts Command (21)
    Returns the number of instances of each reference type in the input list. Only instances that are reachable for the purposes of garbage collection are counted. If a reference type is invalid, eg. it has been unloaded, zero is returned for its instance count.

    Since JDWP version 1.6. Requires canGetInstanceInfo capability - see CapabilitiesNew.

    Out Data
    int | refTypesCount | Number of reference types that follow. Must be non-negative.
    Repeated refTypesCount times:
    referenceTypeID | refType | A reference type ID.
    Reply Data
    int | counts | The number of counts that follow.
    Repeated counts times:
    long | instanceCount | The number of instances for the corresponding reference type in 'Out Data'.
    Error Data
    ILLEGAL_ARGUMENT | refTypesCount is less than zero.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.

    ReferenceType Command Set (2)

    Signature Command (1)
    Returns the JNI signature of a reference type. JNI signature formats are described in the Java Native Inteface Specification

    For primitive classes the returned signature is the signature of the corresponding primitive type; for example, "I" is returned as the signature of the class represented by java.lang.Integer.TYPE.

    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string signature The JNI signature for the reference type.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    ClassLoader Command (2)
    Returns the instance of java.lang.ClassLoader which loaded a given reference type. If the reference type was loaded by the system class loader, the returned object ID is null.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    classLoaderID classLoader The class loader for the reference type.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Modifiers Command (3)
    Returns the modifiers (also known as access flags) for a reference type. The returned bit mask contains information on the declaration of the reference type. If the reference type is an array or a primitive class (for example, java.lang.Integer.TYPE), the value of the returned bit mask is undefined.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int modBits Modifier bits as defined in Chapter 4 of The Java™ Virtual Machine Specification
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Fields Command (4)
    Returns information for each field in a reference type. Inherited fields are not included. The field list will include any synthetic fields created by the compiler. Fields are returned in the order they occur in the class file.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared fields.
    Repeated declared times:
    fieldID | fieldID | Field ID.
    string | name | Name of field.
    string | signature | JNI Signature of field.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the field declaration. Individual flag values are defined in Chapter 4 of The Java™ Virtual Machine Specification. In addition, The 0xf0000000 bit identifies the field as synthetic, if the synthetic attribute capability is available.
    Error Data
    CLASS_NOT_PREPARED | Class has been loaded but not yet prepared.
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Methods Command (5)
    Returns information for each method in a reference type. Inherited methods are not included. The list of methods will include constructors (identified with the name "<init>"), the initialization method (identified with the name "<clinit>") if present, and any synthetic methods created by the compiler. Methods are returned in the order they occur in the class file.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared methods.
    Repeated declared times:
    methodID | methodID | Method ID.
    string | name | Name of method.
    string | signature | JNI signature of method.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the method declaration. Individual flag values are defined in Chapter 4 of The Java™ Virtual Machine Specification. In addition, The 0xf0000000 bit identifies the method as synthetic, if the synthetic attribute capability is available.
    Error Data
    CLASS_NOT_PREPARED | Class has been loaded but not yet prepared.
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    GetValues Command (6)
    Returns the value of one or more static fields of the reference type. Each field must be member of the reference type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
    Out Data
    referenceTypeID | refType | The reference type ID.
    int | fields | The number of values to get
    Repeated fields times:
    fieldID | fieldID | A field to get
    Reply Data
    int | values | The number of values returned, always equal to fields, the number of values to get.
    Repeated values times:
    value | value | The field value
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_FIELDID | Invalid field.
    VM_DEAD | The virtual machine is not running.
    SourceFile Command (7)
    Returns the name of source file in which a reference type was declared.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string sourceFile The source file name. No path information for the file is included
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    ABSENT_INFORMATION | The source file attribute is absent.
    VM_DEAD | The virtual machine is not running.
    NestedTypes Command (8)
    Returns the classes and interfaces directly nested within this type.Types further nested within those types are not included.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | classes | The number of nested classes and interfaces
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | The nested class or interface ID.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Status Command (9)
    Returns the current status of the reference type. The status indicates the extent to which the reference type has been initialized, as described in section 2.1.6 of The Java™ Virtual Machine Specification. If the class is linked the PREPARED and VERIFIED bits in the returned status bits will be set. If the class is initialized the INITIALIZED bit in the returned status bits will be set. If an error occured during initialization then the ERROR bit in the returned status bits will be set. The returned status bits are undefined for array types and for primitive classes (such as java.lang.Integer.TYPE).
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int status Status bits:See JDWP.ClassStatus
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Interfaces Command (10)
    Returns the interfaces declared as implemented by this class. Interfaces indirectly implemented (extended by the implemented interface or implemented by a superclass) are not included.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | interfaces | The number of implemented interfaces
    Repeated interfaces times:
    interfaceID | interfaceType | implemented interface.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    ClassObject Command (11)
    Returns the class object corresponding to this type.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    classObjectID classObject class object.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    SourceDebugExtension Command (12)
    Returns the value of the SourceDebugExtension attribute. Since JDWP version 1.4. Requires canGetSourceDebugExtension capability - see CapabilitiesNew.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string extension extension attribute
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    ABSENT_INFORMATION | If the extension is not specified.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    SignatureWithGeneric Command (13)
    Returns the JNI signature of a reference type along with the generic signature if there is one. Generic signatures are described in the signature attribute section in The Java™ Virtual Machine Specification. Since JDWP version 1.5.

    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string | signature | The JNI signature for the reference type.
    string | genericSignature | The generic signature for the reference type or an empty string if there is none.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    FieldsWithGeneric Command (14)
    Returns information, including the generic signature if any, for each field in a reference type. Inherited fields are not included. The field list will include any synthetic fields created by the compiler. Fields are returned in the order they occur in the class file. Generic signatures are described in the signature attribute section in The Java™ Virtual Machine Specification. Since JDWP version 1.5.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared fields.
    Repeated declared times:
    fieldID | fieldID | Field ID.
    string | name | The name of the field.
    string | signature | The JNI signature of the field.
    string | genericSignature | The generic signature of the field, or an empty string if there is none.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the field declaration. Individual flag values are defined in Chapter 4 of The Java™ Virtual Machine Specification. In addition, The 0xf0000000 bit identifies the field as synthetic, if the synthetic attribute capability is available.
    Error Data
    CLASS_NOT_PREPARED | Class has been loaded but not yet prepared.
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    MethodsWithGeneric Command (15)
    Returns information, including the generic signature if any, for each method in a reference type. Inherited methodss are not included. The list of methods will include constructors (identified with the name "<init>"), the initialization method (identified with the name "<clinit>") if present, and any synthetic methods created by the compiler. Methods are returned in the order they occur in the class file. Generic signatures are described in the signature attribute section in The Java™ Virtual Machine Specification. Since JDWP version 1.5.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared methods.
    Repeated declared times:
    methodID | methodID | Method ID.
    string | name | The name of the method.
    string | signature | The JNI signature of the method.
    string | genericSignature | The generic signature of the method, or an empty string if there is none.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the method declaration. Individual flag values are defined in Chapter 4 of The Java™ Virtual Machine Specification. In addition, The 0xf0000000 bit identifies the method as synthetic, if the synthetic attribute capability is available.
    Error Data
    CLASS_NOT_PREPARED | Class has been loaded but not yet prepared.
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Instances Command (16)
    Returns instances of this reference type. Only instances that are reachable for the purposes of garbage collection are returned.

    Since JDWP version 1.6. Requires canGetInstanceInfo capability - see CapabilitiesNew.

    Out Data
    referenceTypeID | refType | The reference type ID.
    int | maxInstances | Maximum number of instances to return. Must be non-negative. If zero, all instances are returned.
    Reply Data
    int | instances | The number of instances that follow.
    Repeated instances times:
    tagged-objectID | instance | An instance of this reference type.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    ILLEGAL_ARGUMENT | maxInstances is less than zero.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    ClassFileVersion Command (17)
    Returns the class file major and minor version numbers, as defined in the class file format of the Java Virtual Machine specification.

    Since JDWP version 1.6.

    Out Data
    referenceTypeID refType The class.
    Reply Data
    int | majorVersion | Major version number
    int | minorVersion | Minor version number
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    ABSENT_INFORMATION | The class file version information is absent for primitive and array types.
    VM_DEAD | The virtual machine is not running.
    ConstantPool Command (18)
    Return the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in The Java™ Virtual Machine Specification.

    Since JDWP version 1.6. Requires canGetConstantPool capability - see CapabilitiesNew.

    Out Data
    referenceTypeID refType The class.
    Reply Data
    int | count | Total number of constant pool entries plus one. This corresponds to the constant_pool_count item of the Class File Format in The Java™ Virtual Machine Specification.
    int | bytes
    Repeated bytes times:
    byte | cpbytes | Raw bytes of constant pool
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    NOT_IMPLEMENTED | If the target virtual machine does not support the retrieval of constant pool information.
    ABSENT_INFORMATION | The Constant Pool information is absent for primitive and array types.
    VM_DEAD | The virtual machine is not running.

    ClassType Command Set (3)

    Superclass Command (1)
    Returns the immediate superclass of a class.
    Out Data
    classID clazz The class type ID.
    Reply Data
    classID superclass The superclass (null if the class ID for java.lang.Object is specified).
    Error Data
    INVALID_CLASS | clazz is not the ID of a class.
    INVALID_OBJECT | clazz is not a known ID.
    VM_DEAD | The virtual machine is not running.
    SetValues Command (2)
    Sets the value of one or more static fields. Each field must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. Final fields cannot be set.For primitive values, the value's type must match the field's type exactly. For object values, there must exist a widening reference conversion from the value's type to thefield's type and the field's type must be loaded.
    Out Data
    classID | clazz | The class type ID.
    int | values | The number of fields to set.
    Repeated values times:
    fieldID | fieldID | Field to set.
    untagged-value | value | Value to put in the field.
    Reply Data
    (None)
    Error Data
    INVALID_CLASS | clazz is not the ID of a class.
    CLASS_NOT_PREPARED | Class has been loaded but not yet prepared.
    INVALID_OBJECT | clazz is not a known ID or a value of an object field is not a known ID.
    INVALID_FIELDID | Invalid field.
    VM_DEAD | The virtual machine is not running.
    InvokeMethod Command (3)
    Invokes a static method. The method must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.

    The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    classID | clazz | The class type ID.
    threadID | thread | The thread in which to invoke.
    methodID | methodID | The method to invoke.
    int | arguments
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Invocation options
    Reply Data
    value | returnValue | The returned value.
    tagged-objectID | exception | The thrown exception.
    Error Data
    INVALID_CLASS | clazz is not the ID of a class.
    INVALID_OBJECT | clazz is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    THREAD_NOT_SUSPENDED | If the specified thread has not been suspended by an event.
    VM_DEAD | The virtual machine is not running.
    NewInstance Command (4)
    Creates a new object of this type, invoking the specified constructor. The constructor method ID must be a member of the class type.

    Instance creation will occur in the specified thread. Instance creation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified constructor is invoked with the arguments in the specified argument list. The constructor invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the constructor throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    classID | clazz | The class type ID.
    threadID | thread | The thread in which to invoke the constructor.
    methodID | methodID | The constructor to invoke.
    int | arguments
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Constructor invocation options
    Reply Data
    tagged-objectID | newObject | The newly created object, or null if the constructor threw an exception.
    tagged-objectID | exception | The thrown exception, if any; otherwise, null.
    Error Data
    INVALID_CLASS | clazz is not the ID of a class.
    INVALID_OBJECT | clazz is not a known ID or a value of an object parameter is not a known ID..
    INVALID_METHODID | methodID is not the ID of a method.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    THREAD_NOT_SUSPENDED | If the specified thread has not been suspended by an event.
    VM_DEAD | The virtual machine is not running.

    ArrayType Command Set (4)

    NewInstance Command (1)
    Creates a new array object of this type with a given length.
    Out Data
    arrayTypeID | arrType | The array type of the new instance.
    int | length | The length of the array.
    Reply Data
    tagged-objectID newArray The newly created array object.
    Error Data
    INVALID_ARRAY | The array is invalid.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.

    InterfaceType Command Set (5)

    Method Command Set (6)

    LineTable Command (1)
    Returns line number information for the method, if present. The line table maps source line numbers to the initial code index of the line. The line table is ordered by code index (from lowest to highest). The line number information is constant unless a new class definition is installed using RedefineClasses.
    Out Data
    referenceTypeID | refType | The class.
    methodID | methodID | The method.
    Reply Data
    long | start | Lowest valid code index for the method, >=0, or -1 if the method is native
    long | end | Highest valid code index for the method, >=0, or -1 if the method is native
    int | lines | The number of entries in the line table for this method.
    Repeated lines times:
    long | lineCodeIndex | Initial code index of the line, start <= lineCodeIndex="lineCodeIndex" <="<" end ="end " | int | lineNumber | Line number.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    VM_DEAD | The virtual machine is not running.
    VariableTable Command (2)
    Returns variable information for the method. The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table. Also, synthetic variables may be present.
    Out Data
    referenceTypeID | refType | The class.
    methodID | methodID | The method.
    Reply Data
    int | argCnt | The number of words in the frame used by arguments. Eight-byte arguments use two words; all others use one.
    int | slots | The number of variables.
    Repeated slots times:
    long | codeIndex | First code index at which the variable is visible (unsigned). Used in conjunction with length. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" codeIndex + length
    string | name | The variable's name.
    string | signature | The variable type's JNI signature.
    int | length | Unsigned value used in conjunction with codeIndex. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" code index + length
    int | slot | The local variable's index in its frame
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    ABSENT_INFORMATION | there is no variable information for the method.
    VM_DEAD | The virtual machine is not running.
    Bytecodes Command (3)
    Retrieve the method's bytecodes as defined in The Java™ Virtual Machine Specification. Requires canGetBytecodes capability - see CapabilitiesNew.
    Out Data
    referenceTypeID | refType | The class.
    methodID | methodID | The method.
    Reply Data
    int | bytes
    Repeated bytes times:
    byte | bytecode | A Java bytecode.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    NOT_IMPLEMENTED | If the target virtual machine does not support the retrieval of bytecodes.
    VM_DEAD | The virtual machine is not running.
    IsObsolete Command (4)
    Determine if this method is obsolete. A method is obsolete if it has been replaced by a non-equivalent method using the RedefineClasses command. The original and redefined methods are considered equivalent if their bytecodes are the same except for indices into the constant pool and the referenced constants are equal.
    Out Data
    referenceTypeID | refType | The class.
    methodID | methodID | The method.
    Reply Data
    boolean isObsolete true if this method has been replacedby a non-equivalent method usingthe RedefineClasses command.
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    NOT_IMPLEMENTED | If the target virtual machine does not support this query.
    VM_DEAD | The virtual machine is not running.
    VariableTableWithGeneric Command (5)
    Returns variable information for the method, including generic signatures for the variables. The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table. Also, synthetic variables may be present. Generic signatures are described in the signature attribute section in The Java™ Virtual Machine Specification. Since JDWP version 1.5.
    Out Data
    referenceTypeID | refType | The class.
    methodID | methodID | The method.
    Reply Data
    int | argCnt | The number of words in the frame used by arguments. Eight-byte arguments use two words; all others use one.
    int | slots | The number of variables.
    Repeated slots times:
    long | codeIndex | First code index at which the variable is visible (unsigned). Used in conjunction with length. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" codeIndex + length
    string | name | The variable's name.
    string | signature | The variable type's JNI signature.
    string | genericSignature | The variable type's generic signature or an empty string if there is none.
    int | length | Unsigned value used in conjunction with codeIndex. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" code index + length
    int | slot | The local variable's index in its frame
    Error Data
    INVALID_CLASS | refType is not the ID of a reference type.
    INVALID_OBJECT | refType is not a known ID.
    INVALID_METHODID | methodID is not the ID of a method.
    ABSENT_INFORMATION | there is no variable information for the method.
    VM_DEAD | The virtual machine is not running.

    Field Command Set (8)

    ObjectReference Command Set (9)

    ReferenceType Command (1)
    Returns the runtime type of the object. The runtime type will be a class or an array.
    Out Data
    objectID object The object ID
    Reply Data
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | The runtime reference type.
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.
    GetValues Command (2)
    Returns the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
    Out Data
    objectID | object | The object ID
    int | fields | The number of values to get
    Repeated fields times:
    fieldID | fieldID | Field to get.
    Reply Data
    int | values | The number of values returned, always equal to 'fields', the number of values to get. Field values are ordered in the reply in the same order as corresponding fieldIDs in the command.
    Repeated values times:
    value | value | The field value
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_FIELDID | Invalid field.
    VM_DEAD | The virtual machine is not running.
    SetValues Command (3)
    Sets the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. For primitive values, the value's type must match the field's type exactly. For object values, there must be a widening reference conversion from the value's type to thefield's type and the field's type must be loaded.
    Out Data
    objectID | object | The object ID
    int | values | The number of fields to set.
    Repeated values times:
    fieldID | fieldID | Field to set.
    untagged-value | value | Value to put in the field.
    Reply Data
    (None)
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_FIELDID | Invalid field.
    VM_DEAD | The virtual machine is not running.
    MonitorInfo Command (5)
    Returns monitor information for an object. All threads int the VM must be suspended.Requires canGetMonitorInfo capability - see CapabilitiesNew.
    Out Data
    objectID object The object ID
    Reply Data
    threadID | owner | The monitor owner, or null if it is not currently owned.
    int | entryCount | The number of times the monitor has been entered.
    int | waiters | The number of threads that are waiting for the monitor 0 if there is no current owner
    Repeated waiters times:
    threadID | thread | A thread waiting for this monitor.
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    InvokeMethod Command (6)
    Invokes a instance method. The method must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.

    The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must be a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    objectID | object | The object ID
    threadID | thread | The thread in which to invoke.
    classID | clazz | The class type.
    methodID | methodID | The method to invoke.
    int | arguments | The number of arguments.
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Invocation options
    Reply Data
    value | returnValue | The returned value, or null if an exception is thrown.
    tagged-objectID | exception | The thrown exception, if any.
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_CLASS | clazz is not the ID of a reference type.
    INVALID_METHODID | methodID is not the ID of a method.
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    THREAD_NOT_SUSPENDED | If the specified thread has not been suspended by an event.
    VM_DEAD | The virtual machine is not running.
    DisableCollection Command (7)
    Prevents garbage collection for the given object. By default all objects in back-end replies may be collected at any time the target VM is running. A call to this command guarantees that the object will not be collected. The EnableCollection command can be used to allow collection once again.

    Note that while the target VM is suspended, no garbage collection will occur because all threads are suspended. The typical examination of variables, fields, and arrays during the suspension is safe without explicitly disabling garbage collection.

    This method should be used sparingly, as it alters the pattern of garbage collection in the target VM and, consequently, may result in application behavior under the debugger that differs from its non-debugged behavior.

    Out Data
    objectID object The object ID
    Reply Data
    (None)
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.
    EnableCollection Command (8)
    Permits garbage collection for this object. By default all objects returned by JDWP may become unreachable in the target VM, and hence may be garbage collected. A call to this command is necessary only if garbage collection was previously disabled with the DisableCollection command.
    Out Data
    objectID object The object ID
    Reply Data
    (None)
    Error Data
    VM_DEAD The virtual machine is not running.
    IsCollected Command (9)
    Determines whether an object has been garbage collected in the target VM.
    Out Data
    objectID object The object ID
    Reply Data
    boolean isCollected true if the object has been collected; false otherwise
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.
    ReferringObjects Command (10)
    Returns objects that directly reference this object. Only objects that are reachable for the purposes of garbage collection are returned. Note that an object can also be referenced in other ways, such as from a local variable in a stack frame, or from a JNI global reference. Such non-object referrers are not returned by this command.

    Since JDWP version 1.6. Requires canGetInstanceInfo capability - see CapabilitiesNew.

    Out Data
    objectID | object | The object ID
    int | maxReferrers | Maximum number of referring objects to return. Must be non-negative. If zero, all referring objects are returned.
    Reply Data
    int | referringObjects | The number of objects that follow.
    Repeated referringObjects times:
    tagged-objectID | instance | An object that references this object.
    Error Data
    INVALID_OBJECT | object is not a known ID.
    ILLEGAL_ARGUMENT | maxReferrers is less than zero.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.

    StringReference Command Set (10)

    Value Command (1)
    Returns the characters contained in the string.
    Out Data
    objectID stringObject The String object ID.
    Reply Data
    string stringValue UTF-8 representation of the string value.
    Error Data
    INVALID_STRING | The string is invalid.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.

    ThreadReference Command Set (11)

    Name Command (1)
    Returns the thread name.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    string threadName The thread name.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Suspend Command (2)
    Suspends the thread.

    Unlike java.lang.Thread.suspend(), suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed the same number of times it has been suspended.

    Suspending single threads with command has the same dangers java.lang.Thread.suspend(). If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again).

    The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through {@link java.lang.Thread#resume}.

    Note that this doesn't change the status of the thread (see the ThreadStatus command.) For example, if it was Running, it will still appear running to other threads.

    Out Data
    threadID thread The thread object ID.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Resume Command (3)
    Resumes the execution of a given thread. If this thread was not previously suspended by the front-end, calling this command has no effect. Otherwise, the count of pending suspends on this thread is decremented. If it is decremented to 0, the thread will continue to execute.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Status Command (4)
    Returns the current status of a thread. The thread status reply indicates the thread status the last time it was running. the suspend status provides information on the thread's suspension, if any.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    int | threadStatus | One of the thread status codes See JDWP.ThreadStatus
    int | suspendStatus | One of the suspend status codes See JDWP.SuspendStatus
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    ThreadGroup Command (5)
    Returns the thread group that contains a given thread.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    threadGroupID group The thread group of this thread.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Frames Command (6)
    Returns the current call stack of a suspended thread. The sequence of frames starts with the currently executing frame, followed by its caller, and so on. The thread must be suspended, and the returned frameID is valid only while the thread is suspended.
    Out Data
    threadID | thread | The thread object ID.
    int | startFrame | The index of the first frame to retrieve.
    int | length | The count of frames to retrieve (-1 means all remaining).
    Reply Data
    int | frames | The number of frames retreived
    Repeated frames times:
    frameID | frameID | The ID of this frame.
    location | location | The current location of this frame
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    FrameCount Command (7)
    Returns the count of frames on this thread's stack. The thread must be suspended, and the returned count is valid only while the thread is suspended. Returns JDWP.Error.errorThreadNotSuspended if not suspended.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    int frameCount The count of frames on this thread's stack.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    OwnedMonitors Command (8)
    Returns the objects whose monitors have been entered by this thread. The thread must be suspended, and the returned information is relevant only while the thread is suspended. Requires canGetOwnedMonitorInfo capability - see CapabilitiesNew.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    int | owned | The number of owned monitors
    Repeated owned times:
    tagged-objectID | monitor | An owned monitor
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    CurrentContendedMonitor Command (9)
    Returns the object, if any, for which this thread is waiting. The thread may be waiting to enter a monitor, or it may be waiting, via the java.lang.Object.wait method, for another thread to invoke the notify method. The thread must be suspended, and the returned information is relevant only while the thread is suspended. Requires canGetCurrentContendedMonitor capability - see CapabilitiesNew.
    Out Data
    threadID thread The thread object ID.
    Reply Data
    tagged-objectID monitor The contended monitor, or null if there is no current contended monitor.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    Stop Command (10)
    Stops the thread with an asynchronous exception, as if done by java.lang.Thread.stop
    Out Data
    threadID | thread | The thread object ID.
    objectID | throwable | Asynchronous exception. This object must be an instance of java.lang.Throwable or a subclass
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | If thread is not a known ID or the asynchronous exception has been garbage collected.
    VM_DEAD | The virtual machine is not running.
    Interrupt Command (11)
    Interrupt the thread, as if done by java.lang.Thread.interrupt
    Out Data
    threadID thread The thread object ID.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    SuspendCount Command (12)
    Get the suspend count for this thread. The suspend count is the number of times the thread has been suspended through the thread-level or VM-level suspend commands without a corresponding resume
    Out Data
    threadID thread The thread object ID.
    Reply Data
    int suspendCount The number of outstanding suspends of this thread.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    VM_DEAD | The virtual machine is not running.
    OwnedMonitorsStackDepthInfo Command (13)
    Returns monitor objects owned by the thread, along with stack depth at which the monitor was acquired. Returns stack depth of -1 if the implementation cannot determine the stack depth (e.g., for monitors acquired by JNI MonitorEnter).The thread must be suspended, and the returned information is relevant only while the thread is suspended. Requires canGetMonitorFrameInfo capability - see CapabilitiesNew.

    Since JDWP version 1.6.

    Out Data
    threadID thread The thread object ID.
    Reply Data
    int | owned | The number of owned monitors
    Repeated owned times:
    tagged-objectID | monitor | An owned monitor
    int | stack_depth | Stack depth location where monitor was acquired
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    ForceEarlyReturn Command (14)
    Force a method to return before it reaches a return statement.

    The method which will return early is referred to as the called method. The called method is the current method (as defined by the Frames section in The Java™ Virtual Machine Specification) for the specified thread at the time this command is received.

    The specified thread must be suspended. The return occurs when execution of Java programming language code is resumed on this thread. Between sending this command and resumption of thread execution, the state of the stack is undefined.

    No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application.

    A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to JNI locks or java.util.concurrent.locks locks.

    Events, such as MethodExit, are generated as they would be in a normal return.

    The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.

    For void methods, the value must be a void value. For methods that return primitive values, the value's type must match the return type exactly. For object values, there must be a widening reference conversion from the value's type to the return type type and the return type must be loaded.

    Since JDWP version 1.6. Requires canForceEarlyReturn capability - see CapabilitiesNew.

    Out Data
    threadID | thread | The thread object ID.
    value | value | The value to return.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | Thread or value is not a known ID.
    THREAD_NOT_SUSPENDED | If the specified thread has not been suspended by an event.
    THREAD_NOT_ALIVE | Thread has not been started or is now dead.
    OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
    NO_MORE_FRAMES | There are no more Java or JNI frames on the call stack.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    TYPE_MISMATCH | Value is not an appropriate type for the return value of the method.
    VM_DEAD | The virtual machine is not running.

    ThreadGroupReference Command Set (12)

    Name Command (1)
    Returns the thread group name.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    string groupName The thread group's name.
    Error Data
    INVALID_THREAD_GROUP | Thread group invalid.
    INVALID_OBJECT | group is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Parent Command (2)
    Returns the thread group, if any, which contains a given thread group.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    threadGroupID parentGroup The parent thread group object, or null if the given thread group is a top-level thread group
    Error Data
    INVALID_THREAD_GROUP | Thread group invalid.
    INVALID_OBJECT | group is not a known ID.
    VM_DEAD | The virtual machine is not running.
    Children Command (3)
    Returns the live threads and active thread groups directly contained in this thread group. Threads and thread groups in child thread groups are not included. A thread is alive if it has been started and has not yet been stopped. See java.lang.ThreadGroup for information about active ThreadGroups.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    int | childThreads | The number of live child threads.
    Repeated childThreads times:
    threadID | childThread | A direct child thread ID.
    int | childGroups | The number of active child thread groups.
    Repeated childGroups times:
    threadGroupID | childGroup | A direct child thread group ID.
    Error Data
    INVALID_THREAD_GROUP | Thread group invalid.
    INVALID_OBJECT | group is not a known ID.
    VM_DEAD | The virtual machine is not running.

    ArrayReference Command Set (13)

    Length Command (1)
    Returns the number of components in a given array.
    Out Data
    arrayID arrayObject The array object ID.
    Reply Data
    int arrayLength The length of the array.
    Error Data
    INVALID_OBJECT | arrayObject is not a known ID.
    INVALID_ARRAY | The array is invalid.
    VM_DEAD | The virtual machine is not running.
    GetValues Command (2)
    Returns a range of array components. The specified range must be within the bounds of the array.
    Out Data
    arrayID | arrayObject | The array object ID.
    int | firstIndex | The first index to retrieve.
    int | length | The number of components to retrieve.
    Reply Data
    arrayregion values The retrieved values. If the values are objects, they are tagged-values; otherwise, they are untagged-values
    Error Data
    INVALID_LENGTH | If index is beyond the end of this array.
    INVALID_OBJECT | arrayObject is not a known ID.
    INVALID_ARRAY | The array is invalid.
    VM_DEAD | The virtual machine is not running.
    SetValues Command (3)
    Sets a range of array components. The specified range must be within the bounds of the array. For primitive values, each value's type must match the array component type exactly. For object values, there must be a widening reference conversion from the value's type to thearray component type and the array component type must be loaded.
    Out Data
    arrayID | arrayObject | The array object ID.
    int | firstIndex | The first index to set.
    int | values | The number of values to set.
    Repeated values times:
    untagged-value | value | A value to set.
    Reply Data
    (None)
    Error Data
    INVALID_LENGTH | If index is beyond the end of this array.
    INVALID_OBJECT | arrayObject is not a known ID.
    INVALID_ARRAY | The array is invalid.
    VM_DEAD | The virtual machine is not running.

    ClassLoaderReference Command Set (14)

    VisibleClasses Command (1)
    Returns a list of all classes which this class loader has been requested to load. This class loader is considered to be an initiating class loader for each class in the returned list. The list contains each reference type defined by this loader and any types for which loading was delegated by this class loader to another class loader.

    The visible class list has useful properties with respect to the type namespace. A particular type name will occur at most once in the list. Each field or variable declared with that type name in a class defined by this class loader must be resolved to that single type.

    No ordering of the returned list is guaranteed.

    Out Data
    classLoaderID classLoaderObject The class loader object ID.
    Reply Data
    int | classes | The number of visible classes.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | A class visible to this class loader.
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_CLASS_LOADER | The class loader is invalid.
    VM_DEAD | The virtual machine is not running.

    EventRequest Command Set (15)

    Set Command (1)
    Set an event request. When the event described by this request occurs, an event is sent from the target VM. If an event occurs that has not been requested then it is not sent from the target VM. The two exceptions to this are the VM Start Event and the VM Death Event which are automatically generated events - see Composite Command for further details.
    Out Data
    byte | eventKind | Event kind to request. See JDWP.EventKind for a complete list of events that can be requested; some events may require a capability in order to be requested.
    byte | suspendPolicy | What threads are suspended when this event occurs? Note that the order of events and command replies accurately reflects the order in which threads are suspended and resumed. For example, if a VM-wide resume is processed before an event occurs which suspends the VM, the reply to the resume command will be written to the transport before the suspending event.
    intmodifiersConstraints used to control the number of generated events.Modifiers specify additional tests that an event must satisfy before it is placed in the event queue. Events are filtered by applying each modifier to an event in the order they are specified in this collection Only events that satisfy all modifiers are reported. A value of 0 means there are no modifiers in the request.

    Filtering can improve debugger performance dramatically byreducing the amount of event traffic sent from the target VM to the debugger VM.

    Repeated modifiers times:
    byte | modKind | Modifier kind
    Case Count - if modKind is 1: Limit the requested event to be reported at most once after a given number of occurrences. The event is not reported the first count - 1 times this filter is reached. To request a one-off event, call this method with a count of 1.

    Once the count reaches 0, any subsequent filters in this request are applied. If none of those filters cause the event to be suppressed, the event is reported. Otherwise, the event is not reported. In either case subsequent events are never reported for this request. This modifier can be used with any event kind.

    int | count | Count before event. One for one-off.
    Case Conditional - if modKind is 2: Conditional on expression
    int | exprID | For the future
    Case ThreadOnly - if modKind is 3: Restricts reported events to those in the given thread. This modifier can be used with any event kind except for class unload.
    threadID | thread | Required thread
    Case ClassOnly - if modKind is 4: For class prepare events, restricts the events generated by this request to be the preparation of the given reference type and any subtypes. For monitor wait and waited events, restricts the events generated by this request to those whose monitor object is of the given reference type or any of its subtypes. For other events, restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type. This modifier can be used with any event kind except class unload, thread start, and thread end.
    referenceTypeID | clazz | Required class
    Case ClassMatch - if modKind is 5: Restricts reported events to those for classes whose name matches the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For monitor wait and waited events, the name of the class of the monitor object is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
    string | classPattern | Required class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
    Case ClassExclude - if modKind is 6: Restricts reported events to those for classes whose name does not match the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For monitor wait and waited events, the name of the class of the monitor object is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
    string | classPattern | Disallowed class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
    Case LocationOnly - if modKind is 7: Restricts reported events to those that occur at the given location. This modifier can be used with breakpoint, field access, field modification, step, and exception event kinds.
    location | loc | Required location
    Case ExceptionOnly - if modKind is 8: Restricts reported exceptions by their class and whether they are caught or uncaught. This modifier can be used with exception event kinds only.
    referenceTypeID | exceptionOrNull | Exception to report. Null (0) means report exceptions of all types. A non-null type restricts the reported exception events to exceptions of the given type or any of its subtypes.
    boolean | caught | Report caught exceptions
    boolean | uncaught | Report uncaught exceptions. Note that it is not always possible to determine whether an exception is caught or uncaught at the time it is thrown. See the exception event catch location under composite events for more information.
    Case FieldOnly - if modKind is 9: Restricts reported events to those that occur for a given field. This modifier can be used with field access and field modification event kinds only.
    referenceTypeID | declaring | Type in which field is declared.
    fieldID | fieldID | Required field
    Case Step - if modKind is 10: Restricts reported step events to those which satisfy depth and size constraints. This modifier can be used with step event kinds only.
    threadID | thread | Thread in which to step
    int | size | size of each step. See JDWP.StepSize
    int | depth | relative call stack limit. See JDWP.StepDepth
    Case InstanceOnly - if modKind is 11: Restricts reported events to those whose active 'this' object is the given object. Match value is the null object for static methods. This modifier can be used with any event kind except class prepare, class unload, thread start, and thread end. Introduced in JDWP version 1.4.
    objectID | instance | Required 'this' object
    Case SourceNameMatch - if modKind is 12: Restricts reported class prepare events to those for reference types which have a source name which matches the given restricted regular expression. The source names are determined by the reference type's SourceDebugExtension. This modifier can only be used with class prepare events. Since JDWP version 1.6. Requires the canUseSourceNameFilters capability - see CapabilitiesNew.
    string | sourceNamePattern | Required source name pattern. Matches are limited to exact matches of the given pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
    Reply Data
    int requestID ID of created request
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_CLASS | Invalid class.
    INVALID_STRING | The string is invalid.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_COUNT | The count is invalid.
    INVALID_FIELDID | Invalid field.
    INVALID_METHODID | Invalid method.
    INVALID_LOCATION | Invalid location.
    INVALID_EVENT_TYPE | The specified event type id is not recognized.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.
    Clear Command (2)
    Clear an event request. See JDWP.EventKind for a complete list of events that can be cleared. Only the event request matching the specified event kind and requestID is cleared. If there isn't a matching event request the command is a no-op and does not result in an error. Automatically generated events do not have a corresponding event request and may not be cleared using this command.
    Out Data
    byte | eventKind | Event kind to clear
    int | requestID | ID of request to clear
    Reply Data
    (None)
    Error Data
    VM_DEAD | The virtual machine is not running.
    INVALID_EVENT_TYPE | The specified event type id is not recognized.
    ClearAllBreakpoints Command (3)
    Removes all set breakpoints, a no-op if there are no breakpoints set.
    Out Data
    (None)
    Reply Data
    (None)
    Error Data
    VM_DEAD The virtual machine is not running.

    StackFrame Command Set (16)

    GetValues Command (1)
    Returns the value of one or more local variables in a given frame. Each variable must be visible at the frame's code index. Even if local variable information is not available, values can be retrieved if the front-end is able to determine the correct local variable index. (Typically, this index can be determined for method arguments from the method signature without access to the local variable table information.)
    Out Data
    threadID | thread | The frame's thread.
    frameID | frame | The frame ID.
    int | slots | The number of values to get.
    Repeated slots times:
    int | slot | The local variable's index in the frame.
    byte | sigbyte | A tag identifying the type of the variable
    Reply Data
    int | values | The number of values retrieved, always equal to slots, the number of values to get.
    Repeated values times:
    value | slotValue | The value of the local variable.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_FRAMEID | Invalid jframeID.
    INVALID_SLOT | Invalid slot.
    VM_DEAD | The virtual machine is not running.
    SetValues Command (2)
    Sets the value of one or more local variables. Each variable must be visible at the current frame code index. For primitive values, the value's type must match the variable's type exactly. For object values, there must be a widening reference conversion from the value's type to thevariable's type and the variable's type must be loaded.

    Even if local variable information is not available, values can be set, if the front-end is able to determine the correct local variable index. (Typically, thisindex can be determined for method arguments from the method signature without access to the local variable table information.)

    Out Data
    threadID | thread | The frame's thread.
    frameID | frame | The frame ID.
    int | slotValues | The number of values to set.
    Repeated slotValues times:
    int | slot | The slot ID.
    value | slotValue | The value to set.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_FRAMEID | Invalid jframeID.
    VM_DEAD | The virtual machine is not running.
    ThisObject Command (3)
    Returns the value of the 'this' reference for this frame. If the frame's method is static or native, the reply will contain the null object reference.
    Out Data
    threadID | thread | The frame's thread.
    frameID | frame | The frame ID.
    Reply Data
    tagged-objectID objectThis The 'this' object for this frame.
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    INVALID_FRAMEID | Invalid jframeID.
    VM_DEAD | The virtual machine is not running.
    PopFrames Command (4)
    Pop the top-most stack frames of the thread stack, up to, and including 'frame'. The thread must be suspended to perform this command. The top-most stack frames are discarded and the stack frame previous to 'frame' becomes the current frame. The operand stack is restored -- the argument values are added back and if the invoke was not invokestatic, objectref is added back as well. The Java virtual machine program counter is restored to the opcode of the invoke instruction.

    Since JDWP version 1.4. Requires canPopFrames capability - see CapabilitiesNew.

    Out Data
    threadID | thread | The thread object ID.
    frameID | frame | The frame ID.
    Reply Data
    (None)
    Error Data
    INVALID_THREAD | Passed thread is null, is not a valid thread or has exited.
    INVALID_OBJECT | thread is not a known ID.
    INVALID_FRAMEID | Invalid jframeID.
    THREAD_NOT_SUSPENDED | If the specified thread has not been suspended by an event.
    NO_MORE_FRAMES | There are no more Java or JNI frames on the call stack.
    INVALID_FRAMEID | Invalid jframeID.
    NOT_IMPLEMENTED | The functionality is not implemented in this virtual machine.
    VM_DEAD | The virtual machine is not running.

    ClassObjectReference Command Set (17)

    ReflectedType Command (1)
    Returns the reference type reflected by this class object.
    Out Data
    classObjectID classObject The class object.
    Reply Data
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | reflected reference type
    Error Data
    INVALID_OBJECT | If this reference type has been unloaded and garbage collected.
    VM_DEAD | The virtual machine is not running.

    Event Command Set (64)

    Composite Command (100)
    Several events may occur at a given time in the target VM. For example, there may be more than one breakpoint request for a given location or you might single step to the same location as a breakpoint request. These events are delivered together as a composite event. For uniformity, a composite event is always used to deliver events, even if there is only one event to report.

    The events that are grouped in a composite event are restricted in the following ways:

    • Only with other thread start events for the same thread:
      • Thread Start Event
    • Only with other thread death events for the same thread:
      • Thread Death Event
    • Only with other class prepare events for the same class:
      • Class Prepare Event
    • Only with other class unload events for the same class:
      • Class Unload Event
    • Only with other access watchpoint events for the same field access:
      • Access Watchpoint Event
    • Only with other modification watchpoint events for the same field modification:
      • Modification Watchpoint Event
    • Only with other Monitor contended enter events for the same monitor object:
      • Monitor Contended Enter Event
    • Only with other Monitor contended entered events for the same monitor object:
      • Monitor Contended Entered Event
    • Only with other Monitor wait events for the same monitor object:
      • Monitor Wait Event
    • Only with other Monitor waited events for the same monitor object:
      • Monitor Waited Event
    • Only with other ExceptionEvents for the same exception occurrance:
      • ExceptionEvent
    • Only with other members of this group, at the same location and in the same thread:
      • Breakpoint Event
      • Step Event
      • Method Entry Event
      • Method Exit Event

    The VM Start Event and VM Death Event are automatically generated events. This means they do not need to be requested using the EventRequest.Set command. The VM Start event signals the completion of VM initialization. The VM Death event signals the termination of the VM.If there is a debugger connected at the time when an automatically generated event occurs it is sent from the target VM. Automatically generated events may also be requested using the EventRequest.Set command and thus multiple events of the same event kind will be sent from the target VM when an event occurs.Automatically generated events are sent with the requestID field in the Event Data set to 0. The value of the suspendPolicy field in the Event Data depends on the event. For the automatically generated VM Start Event the value of suspendPolicy is not defined and is therefore implementation or configuration specific. In the Sun implementation, for example, the suspendPolicy is specified as an option to the JDWP agent at launch-time.The automatically generated VM Death Event will have the suspendPolicy set to NONE.

    Event Data
    byte | suspendPolicy | Which threads where suspended by this composite event?
    int | events | Events in set.
    Repeated events times:
    byte | eventKind | Event kind selector
    Case VMStart - if eventKind is JDWP.EventKind.VM_START: Notification of initialization of a target VM. This event is received before the main thread is started and before any application code has been executed. Before this event occurs a significant amount of system code has executed and a number of system classes have been loaded. This event is always generated by the target VM, even if not explicitly requested.
    int | requestID | Request that generated event (or 0 if this event is automatically generated.
    threadID | thread | Initial thread
    Case SingleStep - if eventKind is JDWP.EventKind.SINGLE_STEP: Notification of step completion in the target VM. The step event is generated before the code at its location is executed.
    int | requestID | Request that generated event
    threadID | thread | Stepped thread
    location | location | Location stepped to
    Case Breakpoint - if eventKind is JDWP.EventKind.BREAKPOINT: Notification of a breakpoint in the target VM. The breakpoint event is generated before the code at its location is executed.
    int | requestID | Request that generated event
    threadID | thread | Thread which hit breakpoint
    location | location | Location hit
    Case MethodEntry - if eventKind is JDWP.EventKind.METHOD_ENTRY: Notification of a method invocation in the target VM. This event is generated before any code in the invoked method has executed. Method entry events are generated for both native and non-native methods.

    In some VMs method entry events can occur for a particular thread before its thread start event occurs if methods are called as part of the thread's initialization.

    int | requestID | Request that generated event
    threadID | thread | Thread which entered method
    location | location | The initial executable location in the method.
    Case MethodExit - if eventKind is JDWP.EventKind.METHOD_EXIT: Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.
    int | requestID | Request that generated event
    threadID | thread | Thread which exited method
    location | location | Location of exit
    Case MethodExitWithReturnValue - if eventKind is JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE: Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.

    Since JDWP version 1.6.

    int | requestID | Request that generated event
    threadID | thread | Thread which exited method
    location | location | Location of exit
    value | value | Value that will be returned by the method
    Case MonitorContendedEnter - if eventKind is JDWP.EventKind.MONITOR_CONTENDED_ENTER: Notification that a thread in the target VM is attempting to enter a monitor that is already acquired by another thread. Requires canRequestMonitorEvents capability - see CapabilitiesNew.

    Since JDWP version 1.6.

    int | requestID | Request that generated event
    threadID | thread | Thread which is trying to enter the monitor
    tagged-objectID | object | Monitor object reference
    location | location | Location of contended monitor enter
    Case MonitorContendedEntered - if eventKind is JDWP.EventKind.MONITOR_CONTENDED_ENTERED: Notification of a thread in the target VM is entering a monitor after waiting for it to be released by another thread. Requires canRequestMonitorEvents capability - see CapabilitiesNew.

    Since JDWP version 1.6.

    int | requestID | Request that generated event
    threadID | thread | Thread which entered monitor
    tagged-objectID | object | Monitor object reference
    location | location | Location of contended monitor enter
    Case MonitorWait - if eventKind is JDWP.EventKind.MONITOR_WAIT: Notification of a thread about to wait on a monitor object. Requires canRequestMonitorEvents capability - see CapabilitiesNew.

    Since JDWP version 1.6.

    int | requestID | Request that generated event
    threadID | thread | Thread which is about to wait
    tagged-objectID | object | Monitor object reference
    location | location | Location at which the wait will occur
    long | timeout | Thread wait time in milliseconds
    Case MonitorWaited - if eventKind is JDWP.EventKind.MONITOR_WAITED: Notification that a thread in the target VM has finished waiting on Requires canRequestMonitorEvents capability - see CapabilitiesNew. a monitor object.

    Since JDWP version 1.6.

    int | requestID | Request that generated event
    threadID | thread | Thread which waited
    tagged-objectID | object | Monitor object reference
    location | location | Location at which the wait occured
    boolean | timed_out | True if timed out
    Case Exception - if eventKind is JDWP.EventKind.EXCEPTION: Notification of an exception in the target VM. If the exception is thrown from a non-native method, the exception event is generated at the location where the exception is thrown. If the exception is thrown from a native method, the exception event is generated at the first non-native location reached after the exception is thrown.
    int | requestID | Request that generated event
    threadID | thread | Thread with exception
    location | location | Location of exception throw (or first non-native location after throw if thrown from a native method)
    tagged-objectID | exception | Thrown exception
    locationcatchLocationLocation of catch, or 0 if not caught. An exception is considered to be caught if, at the point of the throw, the current location is dynamically enclosed in a try statement that handles the exception. (See the JVM specification for details). If there is such a try statement, the catch location is the first location in the appropriate catch clause.

    If there are native methods in the call stack at the time of the exception, there are important restrictions to note about the returned catch location. In such cases, it is not possible to predict whether an exception will be handled by some native method on the call stack. Thus, it is possible that exceptions considered uncaught here will, in fact, be handled by a native method and not cause termination of the target VM. Furthermore, it cannot be assumed that the catch location returned here will ever be reached by the throwing thread. If there is a native frame between the current location and the catch location, the exception might be handled and cleared in that native method instead.

    Note that compilers can generate try-catch blocks in some cases where they are not explicit in the source code; for example, the code generated for synchronized and finally blocks can contain implicit try-catch blocks. If such an implicitly generated try-catch is present on the call stack at the time of the throw, the exception will be considered caught even though it appears to be uncaught from examination of the source code.

    Case ThreadStart - if eventKind is JDWP.EventKind.THREAD_START: Notification of a new running thread in the target VM. The new thread can be the result of a call to java.lang.Thread.start or the result of attaching a new thread to the VM though JNI. The notification is generated by the new thread some time before its execution starts. Because of this timing, it is possible to receive other events for the thread before this event is received. (Notably, Method Entry Events and Method Exit Events might occur during thread initialization. It is also possible for the VirtualMachine AllThreads command to return a thread before its thread start event is received.

    Note that this event gives no information about the creation of the thread object which may have happened much earlier, depending on the VM being debugged.

    int | requestID | Request that generated event
    threadID | thread | Started thread
    Case ThreadDeath - if eventKind is JDWP.EventKind.THREAD_DEATH: Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for {@link VirtualMachine#allThreads} to return this thread after this event is received.

    Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.

    int | requestID | Request that generated event
    threadID | thread | Ending thread
    Case ClassPrepare - if eventKind is JDWP.EventKind.CLASS_PREPARE: Notification of a class prepare in the target VM. See the JVM specification for a definition of class preparation. Class prepare events are not generated for primtiive classes (for example, java.lang.Integer.TYPE).
    int | requestID | Request that generated event
    threadIDthreadPreparing thread. In rare cases, this event may occur in a debugger system thread within the target VM. Debugger threads take precautions to prevent these events, but they cannot be avoided under some conditions, especially for some subclasses of java.lang.Error. If the event was generated by a debugger system thread, the value returned by this method is null, and if the requested suspend policy for the event was EVENT_THREAD all threads will be suspended instead, and the composite event's suspend policy will reflect this change.

    Note that the discussion above does not apply to system threads created by the target VM during its normal (non-debug) operation.

    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type being prepared
    string | signature | Type signature
    int | status | Status of type. See JDWP.ClassStatus
    Case ClassUnload - if eventKind is JDWP.EventKind.CLASS_UNLOAD: Notification of a class unload in the target VM.

    There are severe constraints on the debugger back-end during garbage collection, so unload information is greatly limited.

    int | requestID | Request that generated event
    string | signature | Type signature
    Case FieldAccess - if eventKind is JDWP.EventKind.FIELD_ACCESS: Notification of a field access in the target VM. Field modifications are not considered field accesses. Requires canWatchFieldAccess capability - see CapabilitiesNew.
    int | requestID | Request that generated event
    threadID | thread | Accessing thread
    location | location | Location of access
    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type of field
    fieldID | fieldID | Field being accessed
    tagged-objectID | object | Object being accessed (null=0 for statics
    Case FieldModification - if eventKind is JDWP.EventKind.FIELD_MODIFICATION: Notification of a field modification in the target VM. Requires canWatchFieldModification capability - see CapabilitiesNew.
    int | requestID | Request that generated event
    threadID | thread | Modifying thread
    location | location | Location of modify
    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type of field
    fieldID | fieldID | Field being modified
    tagged-objectID | object | Object being modified (null=0 for statics
    value | valueToBe | Value to be assigned
    Case VMDeath - if eventKind is JDWP.EventKind.VM_DEATH:
    int | requestID | Request that generated event

    Error Constants

    NONE | 0 | No error has occurred.
    INVALID_THREAD | 10 | Passed thread is null, is not a valid thread or has exited.
    INVALID_THREAD_GROUP | 11 | Thread group invalid.
    INVALID_PRIORITY | 12 | Invalid priority.
    THREAD_NOT_SUSPENDED | 13 | If the specified thread has not been suspended by an event.
    THREAD_SUSPENDED | 14 | Thread already suspended.
    THREAD_NOT_ALIVE | 15 | Thread has not been started or is now dead.
    INVALID_OBJECT | 20 | If this reference type has been unloaded and garbage collected.
    INVALID_CLASS | 21 | Invalid class.
    CLASS_NOT_PREPARED | 22 | Class has been loaded but not yet prepared.
    INVALID_METHODID | 23 | Invalid method.
    INVALID_LOCATION | 24 | Invalid location.
    INVALID_FIELDID | 25 | Invalid field.
    INVALID_FRAMEID | 30 | Invalid jframeID.
    NO_MORE_FRAMES | 31 | There are no more Java or JNI frames on the call stack.
    OPAQUE_FRAME | 32 | Information about the frame is not available.
    NOT_CURRENT_FRAME | 33 | Operation can only be performed on current frame.
    TYPE_MISMATCH | 34 | The variable is not an appropriate type for the function used.
    INVALID_SLOT | 35 | Invalid slot.
    DUPLICATE | 40 | Item already set.
    NOT_FOUND | 41 | Desired element not found.
    INVALID_MONITOR | 50 | Invalid monitor.
    NOT_MONITOR_OWNER | 51 | This thread doesn't own the monitor.
    INTERRUPT | 52 | The call has been interrupted before completion.
    INVALID_CLASS_FORMAT | 60 | The virtual machine attempted to read a class file and determined that the file is malformed or otherwise cannot be interpreted as a class file.
    CIRCULAR_CLASS_DEFINITION | 61 | A circularity has been detected while initializing a class.
    FAILS_VERIFICATION | 62 | The verifier detected that a class file, though well formed, contained some sort of internal inconsistency or security problem.
    ADD_METHOD_NOT_IMPLEMENTED | 63 | Adding methods has not been implemented.
    SCHEMA_CHANGE_NOT_IMPLEMENTED | 64 | Schema change has not been implemented.
    INVALID_TYPESTATE | 65 | The state of the thread has been modified, and is now inconsistent.
    HIERARCHY_CHANGE_NOT_IMPLEMENTED | 66 | A direct superclass is different for the new class version, or the set of directly implemented interfaces is different and canUnrestrictedlyRedefineClasses is false.
    DELETE_METHOD_NOT_IMPLEMENTED | 67 | The new class version does not declare a method declared in the old class version and canUnrestrictedlyRedefineClasses is false.
    UNSUPPORTED_VERSION | 68 | A class file has a version number not supported by this VM.
    NAMES_DONT_MATCH | 69 | The class name defined in the new class file is different from the name in the old class object.
    CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED | 70 | The new class version has different modifiers and and canUnrestrictedlyRedefineClasses is false.
    METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED | 71 | A method in the new class version has different modifiers than its counterpart in the old class version and and canUnrestrictedlyRedefineClasses is false.
    NOT_IMPLEMENTED | 99 | The functionality is not implemented in this virtual machine.
    NULL_POINTER | 100 | Invalid pointer.
    ABSENT_INFORMATION | 101 | Desired information is not available.
    INVALID_EVENT_TYPE | 102 | The specified event type id is not recognized.
    ILLEGAL_ARGUMENT | 103 | Illegal argument.
    OUT_OF_MEMORY | 110 | The function needed to allocate memory and no more memory was available for allocation.
    ACCESS_DENIED | 111 | Debugging has not been enabled in this virtual machine. JVMTI cannot be used.
    VM_DEAD | 112 | The virtual machine is not running.
    INTERNAL | 113 | An unexpected internal error has occurred.
    UNATTACHED_THREAD | 115 | The thread being used to call this function is not attached to the virtual machine. Calls must be made from attached threads.
    INVALID_TAG | 500 | object type id or class tag.
    ALREADY_INVOKING | 502 | Previous invoke not complete.
    INVALID_INDEX | 503 | Index is invalid.
    INVALID_LENGTH | 504 | The length is invalid.
    INVALID_STRING | 506 | The string is invalid.
    INVALID_CLASS_LOADER | 507 | The class loader is invalid.
    INVALID_ARRAY | 508 | The array is invalid.
    TRANSPORT_LOAD | 509 | Unable to load the transport.
    TRANSPORT_INIT | 510 | Unable to initialize the transport.
    NATIVE_METHOD | 511
    INVALID_COUNT | 512 | The count is invalid.

    EventKind Constants

    SINGLE_STEP | 1
    BREAKPOINT | 2
    FRAME_POP | 3
    EXCEPTION | 4
    USER_DEFINED | 5
    THREAD_START | 6
    THREAD_DEATH | 7
    THREAD_END | 7 | obsolete - was used in jvmdi
    CLASS_PREPARE | 8
    CLASS_UNLOAD | 9
    CLASS_LOAD | 10
    FIELD_ACCESS | 20
    FIELD_MODIFICATION | 21
    EXCEPTION_CATCH | 30
    METHOD_ENTRY | 40
    METHOD_EXIT | 41
    METHOD_EXIT_WITH_RETURN_VALUE | 42
    MONITOR_CONTENDED_ENTER | 43
    MONITOR_CONTENDED_ENTERED | 44
    MONITOR_WAIT | 45
    MONITOR_WAITED | 46
    VM_START | 90
    VM_INIT | 90 | obsolete - was used in jvmdi
    VM_DEATH | 99
    VM_DISCONNECTED | 100 | Never sent across JDWP

    ThreadStatus Constants

    ZOMBIE | 0
    RUNNING | 1
    SLEEPING | 2
    MONITOR | 3
    WAIT | 4

    SuspendStatus Constants

    SUSPEND_STATUS_SUSPENDED 0x1

    ClassStatus Constants

    VERIFIED | 1
    PREPARED | 2
    INITIALIZED | 4
    ERROR | 8

    TypeTag Constants

    CLASS | 1 | ReferenceType is a class.
    INTERFACE | 2 | ReferenceType is an interface.
    ARRAY | 3 | ReferenceType is an array.

    Tag Constants

    ARRAY | 91 | '[' - an array object (objectID size).
    BYTE | 66 | 'B' - a byte value (1 byte).
    CHAR | 67 | 'C' - a character value (2 bytes).
    OBJECT | 76 | 'L' - an object (objectID size).
    FLOAT | 70 | 'F' - a float value (4 bytes).
    DOUBLE | 68 | 'D' - a double value (8 bytes).
    INT | 73 | 'I' - an int value (4 bytes).
    LONG | 74 | 'J' - a long value (8 bytes).
    SHORT | 83 | 'S' - a short value (2 bytes).
    VOID | 86 | 'V' - a void value (no bytes).
    BOOLEAN | 90 | 'Z' - a boolean value (1 byte).
    STRING | 115 | 's' - a String object (objectID size).
    THREAD | 116 | 't' - a Thread object (objectID size).
    THREAD_GROUP | 103 | 'g' - a ThreadGroup object (objectID size).
    CLASS_LOADER | 108 | 'l' - a ClassLoader object (objectID size).
    CLASS_OBJECT | 99 | 'c' - a class object object (objectID size).

    StepDepth Constants

    INTO | 0 | Step into any method calls that occur before the end of the step.
    OVER | 1 | Step over any method calls that occur before the end of the step.
    OUT | 2 | Step out of the current method.

    StepSize Constants

    MIN | 0 | Step by the minimum possible amount (often a bytecode instruction).
    LINE | 1 | Step to the next source line unless there is no line number information in which case a MIN step is done instead.

    SuspendPolicy Constants

    NONE | 0 | Suspend no threads when this event is encountered.
    EVENT_THREAD | 1 | Suspend the event thread when this event is encountered.
    ALL | 2 | Suspend all threads when this event is encountered.

    InvokeOptions Constants

    The invoke options are a combination of zero or more of the following bit flags:
    INVOKE_SINGLE_THREADED | 0x01 | otherwise, all threads started.
    INVOKE_NONVIRTUAL | 0x02 | otherwise, normal virtual invoke (instance methods only)


JVM(TM) Tool Interface 1.2.3

JVMTM Tool Interface

Version 1.2
  • Introduction
    • What is the JVM Tool Interface?
    • Architecture
    • Writing Agents
    • Deploying Agents
    • Statically Linked Agents (since version 1.2.3)
    • Agent Command Line Options
    • Agent Start-Up
    • Agent Start-Up (OnLoad phase)
    • Agent Start-Up (Live phase)
    • Agent Shutdown
    • JAVA_TOOL_OPTIONS
    • Environments
    • Bytecode Instrumentation
    • Modified UTF-8 String Encoding
    • Specification Context
  • Functions
    • Accessing Functions
    • Function Return Values
    • Managing JNI Object References
    • Prerequisite State for Calling Functions
    • Exceptions and Functions
    • Function Index
      • Memory Management
      • Thread
      • Thread Group
      • Stack Frame
      • Force Early Return
      • Heap
      • Heap (1.0)
      • Local Variable
      • Breakpoint
      • Watched Field
      • Class
      • Object
      • Field
      • Method
      • Raw Monitor
      • JNI Function Interception
      • Event Management
      • Extension Mechanism
      • Capability
      • Timers
      • Class Loader Search
      • System Properties
      • General
    • Error Codes
  • Events
    • Event Index
  • Data Types
    • JNI Types Used in the JVM Tool Interface
    • JVM Tool Interface Base Types
    • Structure Type Definitions
    • Function Type Definitions
    • Enumeration Definitions
    • Function Table
  • Constant Index
  • Change History

What is the JVM Tool Interface?

The JVMTM Tool Interface (JVM TI) is a programming interface used by development and monitoring tools. It provides both a way to inspect the state and to control the execution of applications running in the JavaTM virtual machine (VM).

JVM TI is intended to provide a VM interface for the full breadth of tools that need access to VM state, including but not limited to: profiling, debugging, monitoring, thread analysis, and coverage analysis tools.

JVM TI may not be available in all implementations of the JavaTM virtual machine.

JVM TI is a two-way interface. A client of JVM TI, hereafter called an agent, can be notified of interesting occurrences through events. JVM TI can query and control the application through many functions, either in response to events or independent of them.

Agents run in the same process with and communicate directly with the virtual machine executing the application being examined. This communication is through a native interface (JVM TI). The native in-process interface allows maximal control with minimal intrusion on the part of a tool. Typically, agents are relatively compact. They can be controlled by a separate process which implements the bulk of a tool's function without interfering with the target application's normal execution.

Architecture

Tools can be written directly to JVM TI or indirectly through higher level interfaces. The Java Platform Debugger Architecture includes JVM TI, but also contains higher-level, out-of-process debugger interfaces. The higher-level interfaces are more appropriate than JVM TI for many tools. For more information on the Java Platform Debugger Architecture, see the Java Platform Debugger Architecture website.

Writing Agents

Agents can be written in any native language that supports C language calling conventions and C or C++ definitions.

The function, event, data type, and constant definitions needed for using JVM TI are defined in the include file jvmti.h. To use these definitions add the J2SETM include directory to your include path and add
#include <jvmti.h>
to your source code.

Deploying Agents

An agent is deployed in a platform specific manner but is typically the platform equivalent of a dynamic library. On the WindowsTM operating system, for example, an agent library is a "Dynamic Linked Library" (DLL). On the SolarisTM Operating Environment, an agent library is a shared object (.so file).

An agent may be started at VM startup by specifying the agent library name using a command line option. Some implementations may support a mechanism to start agents in the live phase. The details of how this is initiated are implementation specific.

Statically Linked Agents (since version 1.2.3)

A native JVMTI Agent may be statically linked with the VM. The manner in which the library and VM image are combined is implementation-dependent. An agent L whose image has been combined with the VM is defined as statically linked if and only if the agent exports a function called Agent_OnLoad_L.

If a statically linked agent L exports a function called Agent_OnLoad_L and a function called Agent_OnLoad, the Agent_OnLoad function will be ignored. If an agent L is statically linked, an Agent_OnLoad_L function will be invoked with the same arguments and expected return value as specified for the Agent_OnLoad function. An agent L that is statically linked will prohibit an agent of the same name from being loaded dynamically.

The VM will invoke the Agent_OnUnload_L function of the agent, if such a function is exported, at the same point during VM execution as it would have called the dynamic entry point Agent_OnUnLoad. A statically loaded agent cannot be unloaded. The Agent_OnUnload_L function will still be called to do any other agent shutdown related tasks. If a statically linked agent L exports a function called Agent_OnUnLoad_L and a function called Agent_OnUnLoad, the Agent_OnUnLoad function will be ignored.

If an agent L is statically linked, an Agent_OnAttach_L function will be invoked with the same arguments and expected return value as specified for the Agent_OnAttach function. If a statically linked agent L exports a function called Agent_OnAttach_L and a function called Agent_OnAttach, the Agent_OnAttach function will be ignored.

Agent Command Line Options

The term "command-line option" is used below to mean options supplied in the JavaVMInitArgs argument to the JNI_CreateJavaVM function of the JNI Invocation API.

One of the two following command-line options is used on VM startup to properly load and run agents. These arguments identify the library containing the agent as well as an options string to be passed in at startup.
-agentlib:<agent-lib-name>=<options>
The name following -agentlib: is the name of the library to load. Lookup of the library, both its full name and location, proceeds in a platform-specific manner. Typically, the <agent-lib-name> is expanded to an operating system specific file name. The <options> will be passed to the agent on start-up. For example, if the option -agentlib:foo=opt1,opt2 is specified, the VM will attempt to load the shared library foo.dll from the system PATH under WindowsTM or libfoo.so from the LD_LIBRARY_PATH under the SolarisTM operating environment. If the agent library is statically linked into the executable then no actual loading takes place.

-agentpath:<path-to-agent>=<options>
The path following -agentpath: is the absolute path from which to load the library. No library name expansion will occur. The <options> will be passed to the agent on start-up. For example, if the option -agentpath:c:\myLibs\foo.dll=opt1,opt2 is specified, the VM will attempt to load the shared library c:\myLibs\foo.dll. If the agent library is statically linked into the executable then no actual loading takes place.

For a dynamic shared library agent, the start-up routine Agent_OnLoad in the library will be invoked. If the agent library is statically linked into the executable then the system will attempt to invoke the Agent_OnLoad_<agent-lib-name> entry point where <agent-lib-name> is the basename of the agent. In the above example -agentpath:c:\myLibs\foo.dll=opt1,opt2, the system will attempt to find and call the Agent_OnLoad_foo start-up routine.

Libraries loaded with -agentlib: or -agentpath: will be searched for JNI native method implementations to facilitate the use of Java programming language code in tools, as is needed for bytecode instrumentation.

The agent libraries will be searched after all other libraries have been searched (agents wishing to override or intercept the native method implementations of non-agent methods can use the NativeMethodBind event).

These switches do the above and nothing more - they do not change the state of the VM or JVM TI. No command line options are needed to enable JVM TI or aspects of JVM TI, this is handled programmatically by the use of capabilities.

Agent Start-Up

The VM starts each agent by invoking a start-up function. If the agent is started in the OnLoad phase the function Agent_OnLoad or Agent_OnLoad_L for statically linked agents will be invoked. If the agent is started in the live phase the function Agent_OnAttach or Agent_OnAttach_L for statically linked agents will be invoked. Exactly one call to a start-up function is made per agent.

Agent Start-Up (OnLoad phase)

If an agent is started during the OnLoad phase then its agent library must export a start-up function with the following prototype:
JNIEXPORT jint JNICALL
Agent_OnLoad(JavaVM *vm, char *options, void *reserved)
Or for a statically linked agent named 'L':
JNIEXPORT jint JNICALL
Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved)
The VM will start the agent by calling this function. It will be called early enough in VM initialization that:
  • system properties may be set before they have been used in the start-up of the VM
  • the full set of capabilities is still available (note that capabilities that configure the VM may only be available at this time--see the Capability function section)
  • no bytecodes have executed
  • no classes have been loaded
  • no objects have been created

The VM will call the Agent_OnLoad or Agent_OnLoad_<agent-lib-name> function with <options> as the second argument - that is, using the command-line option examples, "opt1,opt2" will be passed to the char *options argument of Agent_OnLoad. The options argument is encoded as a modified UTF-8 string. If =<options> is not specified, a zero length string is passed to options. The lifespan of the options string is the Agent_OnLoad or Agent_OnLoad_<agent-lib-name> call. If needed beyond this time the string or parts of the string must be copied. The period between when Agent_OnLoad is called and when it returns is called the OnLoad phase. Since the VM is not initialized during the OnLoad phase, the set of allowed operations inside Agent_OnLoad is restricted (see the function descriptions for the functionality available at this time). The agent can safely process the options and set event callbacks with SetEventCallbacks. Once the VM initialization event is received (that is, the VMInit callback is invoked), the agent can complete its initialization.

Rationale: Early startup is required so that agents can set the desired capabilities, many of which must be set before the VM is initialized. In JVMDI, the -Xdebug command-line option provided very coarse-grain control of capabilities. JVMPI implementations use various tricks to provide a single "JVMPI on" switch. No reasonable command-line option could provide the fine-grain of control required to balance needed capabilities vs performance impact. Early startup is also needed so that agents can control the execution environment - modifying the file system and system properties to install their functionality.

The return value from Agent_OnLoad or Agent_OnLoad_<agent-lib-name> is used to indicate an error. Any value other than zero indicates an error and causes termination of the VM.

Agent Start-Up (Live phase)

A VM may support a mechanism that allows agents to be started in the VM during the live phase. The details of how this is supported, are implementation specific. For example, a tool may use some platform specific mechanism, or implementation specific API, to attach to the running VM, and request it start a given agent.

If an agent is started during the live phase then its agent library must export a start-up function with the following prototype:
JNIEXPORT jint JNICALL
Agent_OnAttach(JavaVM* vm, char *options, void *reserved)
Or for a statically linked agent named 'L':
JNIEXPORT jint JNICALL
Agent_OnAttach_L(JavaVM* vm, char *options, void *reserved)

The VM will start the agent by calling this function. It will be called in the context of a thread that is attached to the VM. The first argument <vm> is the Java VM. The <options> argument is the startup options provided to the agent. <options> is encoded as a modified UTF-8 string. If startup options were not provided, a zero length string is passed to options. The lifespan of the options string is the Agent_OnAttach or Agent_OnAttach_<agent-lib-name> call. If needed beyond this time the string or parts of the string must be copied.

Note that some capabilities may not be available in the live phase.

The Agent_OnAttach or Agent_OnAttach_<agent-lib-name > function initializes the agent and returns a value to the VM to indicate if an error occurred. Any value other than zero indicates an error. An error does not cause the VM to terminate. Instead the VM ignores the error, or takes some implementation specific action -- for example it might print an error to standard error, or record the error in a system log.

Agent Shutdown

The library may optionally export a shutdown function with the following prototype:
JNIEXPORT void JNICALL
Agent_OnUnload(JavaVM *vm)
Or for a statically linked agent named 'L':
JNIEXPORT void JNICALL
Agent_OnUnload_L(JavaVM *vm)
This function will be called by the VM when the library is about to be unloaded. The library will be unloaded (unless it is statically linked into the executable) and this function will be called if some platform specific mechanism causes the unload (an unload mechanism is not specified in this document) or the library is (in effect) unloaded by the termination of the VM whether through normal termination or VM failure, including start-up failure. Uncontrolled shutdown is, of couse, an exception to this rule. Note the distinction between this function and the VM Death event: for the VM Death event to be sent, the VM must have run at least to the point of initialization and a valid JVM TI environment must exist which has set a callback for VMDeath and enabled the event. None of these are required for Agent_OnUnload or Agent_OnUnload_<agent-lib-name> and this function is also called if the library is unloaded for other reasons. In the case that a VM Death event is sent, it will be sent before this function is called (assuming this function is called due to VM termination). This function can be used to clean-up resources allocated by the agent.

JAVA_TOOL_OPTIONS

Since the command-line cannot always be accessed or modified, for example in embedded VMs or simply VMs launched deep within scripts, a JAVA_TOOL_OPTIONS variable is provided so that agents may be launched in these cases.

Platforms which support environment variables or other named strings, may support the JAVA_TOOL_OPTIONS variable. This variable will be broken into options at white-space boundaries. White-space characters include space, tab, carriage-return, new-line, vertical-tab, and form-feed. Sequences of white-space characters are considered equivalent to a single white-space character. No white-space is included in the options unless quoted. Quoting is as follows:
  • All characters enclosed between a pair of single quote marks (''), except a single quote, are quoted.
  • Double quote characters have no special meaning inside a pair of single quote marks.
  • All characters enclosed between a pair of double quote marks (""), except a double quote, are quoted.
  • Single quote characters have no special meaning inside a pair of double quote marks.
  • A quoted part can start or end anywhere in the variable.
  • White-space characters have no special meaning when quoted -- they are included in the option like any other character and do not mark white-space boundaries.
  • The pair of quote marks is not included in the option.
JNI_CreateJavaVM (in the JNI Invocation API) will prepend these options to the options supplied in its JavaVMInitArgs argument. Platforms may disable this feature in cases where security is a concern; for example, the Reference Implementation disables this feature on Unix systems when the effective user or group ID differs from the real ID. This feature is intended to support the initialization of tools -- specifically including the launching of native or Java programming language agents. Multiple tools may wish to use this feature, so the variable should not be overwritten, instead, options should be appended to the variable. Note that since the variable is processed at the time of the JNI Invocation API create VM call, options processed by a launcher (e.g., VM selection options) will not be handled.

Environments

The JVM TI specification supports the use of multiple simultaneous JVM TI agents. Each agent has its own JVM TI environment. That is, the JVM TI state is separate for each agent - changes to one environment do not affect the others. The state of a JVM TI environment includes:
  • the event callbacks
  • the set of events which are enabled
  • the capabilities
  • the memory allocation/deallocation hooks
Although their JVM TI state is separate, agents inspect and modify the shared state of the VM, they also share the native environment in which they execute. As such, an agent can perturb the results of other agents or cause them to fail. It is the responsibility of the agent writer to specify the level of compatibility with other agents. JVM TI implementations are not capable of preventing destructive interactions between agents. Techniques to reduce the likelihood of these occurrences are beyond the scope of this document.

An agent creates a JVM TI environment by passing a JVM TI version as the interface ID to the JNI Invocation API function GetEnv. See Accessing JVM TI Functions for more details on the creation and use of JVM TI environments. Typically, JVM TI environments are created by calling GetEnv from Agent_OnLoad.

Bytecode Instrumentation

This interface does not include some events that one might expect in an interface with profiling support. Some examples include object allocation events and full speed method enter and exit events. The interface instead provides support for bytecode instrumentation, the ability to alter the Java virtual machine bytecode instructions which comprise the target program. Typically, these alterations are to add "events" to the code of a method - for example, to add, at the beginning of a method, a call to MyProfiler.methodEntered(). Since the changes are purely additive, they do not modify application state or behavior. Because the inserted agent code is standard bytecodes, the VM can run at full speed, optimizing not only the target program but also the instrumentation. If the instrumentation does not involve switching from bytecode execution, no expensive state transitions are needed. The result is high performance events. This approach also provides complete control to the agent: instrumentation can be restricted to "interesting" portions of the code (e.g., the end user's code) and can be conditional. Instrumentation can run entirely in Java programming language code or can call into the native agent. Instrumentation can simply maintain counters or can statistically sample events.

Instrumentation can be inserted in one of three ways:
  • Static Instrumentation: The class file is instrumented before it is loaded into the VM - for example, by creating a duplicate directory of *.class files which have been modified to add the instrumentation. This method is extremely awkward and, in general, an agent cannot know the origin of the class files which will be loaded.
  • Load-Time Instrumentation: When a class file is loaded by the VM, the raw bytes of the class file are sent for instrumentation to the agent. The ClassFileLoadHook event, triggered by the class load, provides this functionality. This mechanism provides efficient and complete access to one-time instrumentation.
  • Dynamic Instrumentation: A class which is already loaded (and possibly even running) is modified. This optional feature is provided by the ClassFileLoadHook event, triggered by calling the RetransformClasses function. Classes can be modified multiple times and can be returned to their original state. The mechanism allows instrumentation which changes during the course of execution.

The class modification functionality provided in this interface is intended to provide a mechanism for instrumentation (the ClassFileLoadHook event and the RetransformClasses function) and, during development, for fix-and-continue debugging (the RedefineClasses function).

Care must be taken to avoid perturbing dependencies, especially when instrumenting core classes. For example, an approach to getting notification of every object allocation is to instrument the constructor on Object. Assuming that the constructor is initially empty, the constructor could be changed to:
      public Object() {
        MyProfiler.allocationTracker(this);
      }
However, if this change was made using the ClassFileLoadHook event then this might impact a typical VM as follows: the first created object will call the constructor causing a class load of MyProfiler; which will then cause object creation, and since MyProfiler isn't loaded yet, infinite recursion; resulting in a stack overflow. A refinement of this would be to delay invoking the tracking method until a safe time. For example, trackAllocations could be set in the handler for the VMInit event.
      static boolean trackAllocations = false;

      public Object() {
        if (trackAllocations) {
          MyProfiler.allocationTracker(this);
        }
      }

The SetNativeMethodPrefix allows native methods to be instrumented by the use of wrapper methods.

Modified UTF-8 String Encoding

JVM TI uses modified UTF-8 to encode character strings. This is the same encoding used by JNI. Modified UTF-8 differs from standard UTF-8 in the representation of supplementary characters and of the null character. See the Modified UTF-8 Strings section of the JNI specification for details.

Specification Context

Since this interface provides access to the state of applications running in the Java virtual machine; terminology refers to the Java platform and not the native platform (unless stated otherwise). For example:
  • "thread" means Java programming language thread.
  • "stack frame" means Java virtual machine stack frame.
  • "class" means Java programming language class.
  • "heap" means Java virtual machine heap.
  • "monitor" means Java programming language object monitor.

Sun, Sun Microsystems, the Sun logo, Java, and JVM are trademarks or registered trademarks of Oracle and/or its affiliates, in the U.S. and other countries.

Functions

Accessing Functions

Native code accesses JVM TI features by calling JVM TI functions. Access to JVM TI functions is by use of an interface pointer in the same manner as Java Native Interface (JNI) functions are accessed. The JVM TI interface pointer is called the environment pointer.

An environment pointer is a pointer to an environment and has the type jvmtiEnv*. An environment has information about its JVM TI connection. The first value in the environment is a pointer to the function table. The function table is an array of pointers to JVM TI functions. Every function pointer is at a predefined offset inside the array.

When used from the C language: double indirection is used to access the functions; the environment pointer provides context and is the first parameter of each function call; for example:
jvmtiEnv *jvmti;
...
jvmtiError err = (*jvmti)->GetLoadedClasses(jvmti, &class_count, &classes);

When used from the C++ language: functions are accessed as member functions of jvmtiEnv; the environment pointer is not passed to the function call; for example:
jvmtiEnv *jvmti;
...
jvmtiError err = jvmti->GetLoadedClasses(&class_count, &classes);
Unless otherwise stated, all examples and declarations in this specification use the C language.

A JVM TI environment can be obtained through the JNI Invocation API GetEnv function:
jvmtiEnv *jvmti;
...
(*jvm)->GetEnv(jvm, &jvmti, JVMTI_VERSION_1_0);
Each call to GetEnv creates a new JVM TI connection and thus a new JVM TI environment. The version argument of GetEnv must be a JVM TI version. The returned environment may have a different version than the requested version but the returned environment must be compatible. GetEnv will return JNI_EVERSION if a compatible version is not available, if JVM TI is not supported or JVM TI is not supported in the current VM configuration. Other interfaces may be added for creating JVM TI environments in specific contexts. Each environment has its own state (for example, desired events, event handling functions, and capabilities). An environment is released with DisposeEnvironment. Thus, unlike JNI which has one environment per thread, JVM TI environments work across threads and are created dynamically.

Function Return Values

JVM TI functions always return an error code via the jvmtiError function return value. Some functions can return additional values through pointers provided by the calling function. In some cases, JVM TI functions allocate memory that your program must explicitly deallocate. This is indicated in the individual JVM TI function descriptions. Empty lists, arrays, sequences, etc are returned as NULL.

In the event that the JVM TI function encounters an error (any return value other than JVMTI_ERROR_NONE) the values of memory referenced by argument pointers is undefined, but no memory will have been allocated and no global references will have been allocated. If the error occurs because of invalid input, no action will have occurred.

Managing JNI Object References

JVM TI functions identify objects with JNI references (jobject and jclass) and their derivatives (jthread and jthreadGroup). References passed to JVM TI functions can be either global or local, but they must be strong references. All references returned by JVM TI functions are local references--these local references are created during the JVM TI call. Local references are a resource that must be managed (see the JNI Documentation). When threads return from native code all local references are freed. Note that some threads, including typical agent threads, will never return from native code. A thread is ensured the ability to create sixteen local references without the need for any explicit management. For threads executing a limited number of JVM TI calls before returning from native code (for example, threads processing events), it may be determined that no explicit management is needed. However, long running agent threads will need explicit local reference management--usually with the JNI functions PushLocalFrame and PopLocalFrame. Conversely, to preserve references beyond the return from native code, they must be converted to global references. These rules do not apply to jmethodID and jfieldID as they are not jobjects.

Prerequisite State for Calling Functions

Unless the function explicitly states that the agent must bring a thread or the VM to a particular state (for example, suspended), the JVM TI implementation is responsible for bringing the VM to a safe and consistent state for performing the function.

Exceptions and Functions

JVM TI functions never throw exceptions; error conditions are communicated via the function return value. Any existing exception state is preserved across a call to a JVM TI function. See the Java Exceptions section of the JNI specification for information on handling exceptions.

Function Index

  • Memory Management
    • Allocate
    • Deallocate
  • Thread
    • Get Thread State
    • Get Current Thread
    • Get All Threads
    • Suspend Thread
    • Suspend Thread List
    • Resume Thread
    • Resume Thread List
    • Stop Thread
    • Interrupt Thread
    • Get Thread Info
    • Get Owned Monitor Info
    • Get Owned Monitor Stack Depth Info
    • Get Current Contended Monitor
    • Run Agent Thread
    • Set Thread Local Storage
    • Get Thread Local Storage
  • Thread Group
    • Get Top Thread Groups
    • Get Thread Group Info
    • Get Thread Group Children
  • Stack Frame
    • Get Stack Trace
    • Get All Stack Traces
    • Get Thread List Stack Traces
    • Get Frame Count
    • Pop Frame
    • Get Frame Location
    • Notify Frame Pop
  • Force Early Return
    • Force Early Return - Object
    • Force Early Return - Int
    • Force Early Return - Long
    • Force Early Return - Float
    • Force Early Return - Double
    • Force Early Return - Void
  • Heap
    • Follow References
    • Iterate Through Heap
    • Get Tag
    • Set Tag
    • Get Objects With Tags
    • Force Garbage Collection
  • Heap (1.0)
    • Iterate Over Objects Reachable From Object
    • Iterate Over Reachable Objects
    • Iterate Over Heap
    • Iterate Over Instances Of Class
  • Local Variable
    • Get Local Variable - Object
    • Get Local Instance
    • Get Local Variable - Int
    • Get Local Variable - Long
    • Get Local Variable - Float
    • Get Local Variable - Double
    • Set Local Variable - Object
    • Set Local Variable - Int
    • Set Local Variable - Long
    • Set Local Variable - Float
    • Set Local Variable - Double
  • Breakpoint
    • Set Breakpoint
    • Clear Breakpoint
  • Watched Field
    • Set Field Access Watch
    • Clear Field Access Watch
    • Set Field Modification Watch
    • Clear Field Modification Watch
  • Class
    • Get Loaded Classes
    • Get Classloader Classes
    • Get Class Signature
    • Get Class Status
    • Get Source File Name
    • Get Class Modifiers
    • Get Class Methods
    • Get Class Fields
    • Get Implemented Interfaces
    • Get Class Version Numbers
    • Get Constant Pool
    • Is Interface
    • Is Array Class
    • Is Modifiable Class
    • Get Class Loader
    • Get Source Debug Extension
    • Retransform Classes
    • Redefine Classes
  • Object
    • Get Object Size
    • Get Object Hash Code
    • Get Object Monitor Usage
  • Field
    • Get Field Name (and Signature)
    • Get Field Declaring Class
    • Get Field Modifiers
    • Is Field Synthetic
  • Method
    • Get Method Name (and Signature)
    • Get Method Declaring Class
    • Get Method Modifiers
    • Get Max Locals
    • Get Arguments Size
    • Get Line Number Table
    • Get Method Location
    • Get Local Variable Table
    • Get Bytecodes
    • Is Method Native
    • Is Method Synthetic
    • Is Method Obsolete
    • Set Native Method Prefix
    • Set Native Method Prefixes
  • Raw Monitor
    • Create Raw Monitor
    • Destroy Raw Monitor
    • Raw Monitor Enter
    • Raw Monitor Exit
    • Raw Monitor Wait
    • Raw Monitor Notify
    • Raw Monitor Notify All
  • JNI Function Interception
    • Set JNI Function Table
    • Get JNI Function Table
  • Event Management
    • Set Event Callbacks
    • Set Event Notification Mode
    • Generate Events
  • Extension Mechanism
    • Get Extension Functions
    • Get Extension Events
    • Set Extension Event Callback
  • Capability
    • Get Potential Capabilities
    • Add Capabilities
    • Relinquish Capabilities
    • Get Capabilities
  • Timers
    • Get Current Thread CPU Timer Information
    • Get Current Thread CPU Time
    • Get Thread CPU Timer Information
    • Get Thread CPU Time
    • Get Timer Information
    • Get Time
    • Get Available Processors
  • Class Loader Search
    • Add To Bootstrap Class Loader Search
    • Add To System Class Loader Search
  • System Properties
    • Get System Properties
    • Get System Property
    • Set System Property
  • General
    • Get Phase
    • Dispose Environment
    • Set Environment Local Storage
    • Get Environment Local Storage
    • Get Version Number
    • Get Error Name
    • Set Verbose Flag
    • Get JLocation Format

Memory Management

Memory Management functions:
  • Allocate
  • Deallocate
These functions provide for the allocation and deallocation of memory used by JVM TI functionality and can be used to provide working memory for agents. Memory managed by JVM TI is not compatible with other memory allocation libraries and mechanisms.

Allocate

jvmtiError
Allocate(jvmtiEnv* env,
            jlong size,
            unsigned char** mem_ptr)
Allocate an area of memory through the JVM TI allocator. The allocated memory should be freed with Deallocate.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 46 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
size | jlong | The number of bytes to allocate. Rationale: jlong is used for compatibility with JVMDI.
mem_ptr | unsigned char** | On return, a pointer to the beginning of the allocated memory. If size is zero, NULL is returned. Agent passes a pointer to a unsigned char*. On return, the unsigned char* points to a newly allocated array of size size. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_OUT_OF_MEMORY | Memory request cannot be honored.
JVMTI_ERROR_ILLEGAL_ARGUMENT | size is less than zero.
JVMTI_ERROR_NULL_POINTER | mem_ptr is NULL.

Deallocate

jvmtiError
Deallocate(jvmtiEnv* env,
            unsigned char* mem)
Deallocate mem using the JVM TI allocator. This function should be used to deallocate any memory allocated and returned by a JVM TI function (including memory allocated with Allocate). All allocated memory must be deallocated or the memory cannot be reclaimed.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 47 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
mem | unsigned char * | A pointer to the beginning of the allocated memory. Please ignore "On return, the elements are set." Agent passes an array of unsigned char. The incoming values of the elements of the array are ignored. On return, the elements are set. If mem is NULL, the call is ignored.

Errors
This function returns a universal error

Thread

Thread functions:
  • Get Thread State
  • Get Current Thread
  • Get All Threads
  • Suspend Thread
  • Suspend Thread List
  • Resume Thread
  • Resume Thread List
  • Stop Thread
  • Interrupt Thread
  • Get Thread Info
  • Get Owned Monitor Info
  • Get Owned Monitor Stack Depth Info
  • Get Current Contended Monitor
  • Run Agent Thread
  • Set Thread Local Storage
  • Get Thread Local Storage
Thread function types:
  • Agent Start Function
Thread types:
  • jvmtiThreadInfo - Thread information structure
  • jvmtiMonitorStackDepthInfo - Monitor stack depth information structure
Thread flags and constants:
  • Thread State Flags
  • java.lang.Thread.State Conversion Masks
  • Thread Priority Constants

Get Thread State

jvmtiError
GetThreadState(jvmtiEnv* env,
            jthread thread,
            jint* thread_state_ptr)
Get the state of a thread. The state of the thread is represented by the answers to the hierarchical set of questions below:
  • Alive?
    • Not alive.
      • Why not alive?
        • New.
        • Terminated (JVMTI_THREAD_STATE_TERMINATED)
    • Alive (JVMTI_THREAD_STATE_ALIVE)
      • Suspended?
        • Suspended (JVMTI_THREAD_STATE_SUSPENDED)
        • Not suspended
      • Interrupted?
        • Interrupted (JVMTI_THREAD_STATE_INTERRUPTED)
        • Not interrupted.
      • In native?
        • In native code (JVMTI_THREAD_STATE_IN_NATIVE)
        • In Java programming language code
      • What alive state?
        • Runnable (JVMTI_THREAD_STATE_RUNNABLE)
        • Blocked (JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER)
        • Waiting (JVMTI_THREAD_STATE_WAITING)
          • Timed wait?
            • Indefinite (JVMTI_THREAD_STATE_WAITING_INDEFINITELY
            • Timed (JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)
          • Why waiting?
            • Object.wait (JVMTI_THREAD_STATE_IN_OBJECT_WAIT)
            • LockSupport.park (JVMTI_THREAD_STATE_PARKED)
            • Sleeping (JVMTI_THREAD_STATE_SLEEPING)

The answers are represented by the following bit vector.
Thread State Flags
Constant | Value | Description
JVMTI_THREAD_STATE_ALIVE | 0x0001 | Thread is alive. Zero if thread is new (not started) or terminated.
JVMTI_THREAD_STATE_TERMINATED | 0x0002 | Thread has completed execution.
JVMTI_THREAD_STATE_RUNNABLE | 0x0004 | Thread is runnable.
JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | 0x0400 | Thread is waiting to enter a synchronization block/method or, after an Object.wait(), waiting to re-enter a synchronization block/method.
JVMTI_THREAD_STATE_WAITING | 0x0080 | Thread is waiting.
JVMTI_THREAD_STATE_WAITING_INDEFINITELY | 0x0010 | Thread is waiting without a timeout. For example, Object.wait().
JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT | 0x0020 | Thread is waiting with a maximum time to wait specified. For example, Object.wait(long).
JVMTI_THREAD_STATE_SLEEPING | 0x0040 | Thread is sleeping -- Thread.sleep(long).
JVMTI_THREAD_STATE_IN_OBJECT_WAIT | 0x0100 | Thread is waiting on an object monitor -- Object.wait.
JVMTI_THREAD_STATE_PARKED | 0x0200 | Thread is parked, for example: LockSupport.park, LockSupport.parkUtil and LockSupport.parkNanos.
JVMTI_THREAD_STATE_SUSPENDED | 0x100000 | Thread suspended. java.lang.Thread.suspend() or a JVM TI suspend function (such as SuspendThread) has been called on the thread. If this bit is set, the other bits refer to the thread state before suspension.
JVMTI_THREAD_STATE_INTERRUPTED | 0x200000 | Thread has been interrupted.
JVMTI_THREAD_STATE_IN_NATIVE 0x400000 Thread is in native code--that is, a native method is running which has not called back into the VM or Java programming language code.

This flag is not set when running VM compiled Java programming language code nor is it set when running VM code or VM support code. Native VM interface functions, such as JNI and JVM TI functions, may be implemented as VM code.
JVMTI_THREAD_STATE_VENDOR_1 | 0x10000000 | Defined by VM vendor.
JVMTI_THREAD_STATE_VENDOR_2 | 0x20000000 | Defined by VM vendor.
JVMTI_THREAD_STATE_VENDOR_3 | 0x40000000 | Defined by VM vendor.
The following definitions are used to convert JVM TI thread state to java.lang.Thread.State style states.
java.lang.Thread.State Conversion Masks
Constant | Value | Description
JVMTI_JAVA_LANG_THREAD_STATE_MASK | JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT | Mask the state with this before comparison
JVMTI_JAVA_LANG_THREAD_STATE_NEW | 0 | java.lang.Thread.State.NEW
JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_TERMINATED | java.lang.Thread.State.TERMINATED
JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | java.lang.Thread.State.RUNNABLE
JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | java.lang.Thread.State.BLOCKED
JVMTI_JAVA_LANG_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | java.lang.Thread.State.WAITING
JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT | java.lang.Thread.State.TIMED_WAITING
Rules

There can be no more than one answer to a question, although there can be no answer (because the answer is unknown, does not apply, or none of the answers is correct). An answer is set only when the enclosing answers match. That is, no more than one of
  • JVMTI_THREAD_STATE_RUNNABLE
  • JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
  • JVMTI_THREAD_STATE_WAITING
can be set (a J2SETM compliant implementation will always set one of these if JVMTI_THREAD_STATE_ALIVE is set). And if any of these are set, the enclosing answer JVMTI_THREAD_STATE_ALIVE is set. No more than one of
  • JVMTI_THREAD_STATE_WAITING_INDEFINITELY
  • JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
can be set (a J2SETM compliant implementation will always set one of these if JVMTI_THREAD_STATE_WAITING is set). And if either is set, the enclosing answers JVMTI_THREAD_STATE_ALIVE and JVMTI_THREAD_STATE_WAITING are set. No more than one of
  • JVMTI_THREAD_STATE_IN_OBJECT_WAIT
  • JVMTI_THREAD_STATE_PARKED
  • JVMTI_THREAD_STATE_SLEEPING
can be set. And if any of these is set, the enclosing answers JVMTI_THREAD_STATE_ALIVE and JVMTI_THREAD_STATE_WAITING are set. Also, if JVMTI_THREAD_STATE_SLEEPING is set, then JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT is set. If a state A is implemented using the mechanism of state B then it is state A which is returned by this function. For example, if Thread.sleep(long) is implemented using Object.wait(long) then it is still JVMTI_THREAD_STATE_SLEEPING which is returned. More than one of
  • JVMTI_THREAD_STATE_SUSPENDED
  • JVMTI_THREAD_STATE_INTERRUPTED
  • JVMTI_THREAD_STATE_IN_NATIVE
can be set, but if any is set, JVMTI_THREAD_STATE_ALIVE is set.

And finally, JVMTI_THREAD_STATE_TERMINATED cannot be set unless JVMTI_THREAD_STATE_ALIVE is not set.

The thread state representation is designed for extension in future versions of the specification; thread state values should be used accordingly, that is they should not be used as ordinals. Most queries can be made by testing a single bit, if use in a switch statement is desired, the state bits should be masked with the interesting bits. All bits not defined above are reserved for future use. A VM, compliant to the current specification, must set reserved bits to zero. An agent should ignore reserved bits -- they should not be assumed to be zero and thus should not be included in comparisons.

Examples

Note that the values below exclude reserved and vendor bits.

The state of a thread blocked at a synchronized-statement would be:
            JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
The state of a thread which hasn't started yet would be:
            0
The state of a thread at a Object.wait(3000) would be:
            JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING +
                JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT +
                JVMTI_THREAD_STATE_MONITOR_WAITING
The state of a thread suspended while runnable would be:
            JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_RUNNABLE + JVMTI_THREAD_STATE_SUSPENDED

Testing the State

In most cases, the thread state can be determined by testing the one bit corresponding to that question. For example, the code to test if a thread is sleeping:
    jint state;
    jvmtiError err;

    err = (*jvmti)->GetThreadState(jvmti, thread, &state);
    if (err == JVMTI_ERROR_NONE) {
       if (state & JVMTI_THREAD_STATE_SLEEPING) {  ...

For waiting (that is, in Object.wait, parked, or sleeping) it would be:
       if (state & JVMTI_THREAD_STATE_WAITING) {  ...
For some states, more than one bit will need to be tested as is the case when testing if a thread has not yet been started:
       if ((state & (JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_TERMINATED)) == 0)  {  ...
To distinguish timed from untimed Object.wait:
       if (state & JVMTI_THREAD_STATE_IN_OBJECT_WAIT)  {
             if (state & JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)  {
               printf("in Object.wait(long timeout)\n");
             } else {
               printf("in Object.wait()\n");
             }
           }

Relationship to java.lang.Thread.State

The thread state represented by java.lang.Thread.State returned from java.lang.Thread.getState() is a subset of the information returned from this function. The corresponding java.lang.Thread.State can be determined by using the provided conversion masks. For example, this returns the name of the java.lang.Thread.State thread state:
        err = (*jvmti)->GetThreadState(jvmti, thread, &state);
        abortOnError(err);
            switch (state & JVMTI_JAVA_LANG_THREAD_STATE_MASK) {
            case JVMTI_JAVA_LANG_THREAD_STATE_NEW:
              return "NEW";
            case JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED:
              return "TERMINATED";
            case JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE:
              return "RUNNABLE";
            case JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED:
              return "BLOCKED";
            case JVMTI_JAVA_LANG_THREAD_STATE_WAITING:
              return "WAITING";
            case JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING:
              return "TIMED_WAITING";
            }

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 17 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
thread_state_ptr | jint* | On return, points to state flags, as defined by the Thread State Flags. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_NULL_POINTER | thread_state_ptr is NULL.

Get Current Thread

jvmtiError
GetCurrentThread(jvmtiEnv* env,
            jthread* thread_ptr)
Get the current thread. The current thread is the Java programming language thread which has called the function.

Note that most JVM TI functions that take a thread as an argument will accept NULL to mean the current thread.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 18 | 1.1

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread_ptr | jthread* | On return, points to the current thread. Agent passes a pointer to a jthread. On return, the jthread has been set. The object returned by thread_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | thread_ptr is NULL.

Get All Threads

jvmtiError
GetAllThreads(jvmtiEnv* env,
            jint* threads_count_ptr,
            jthread** threads_ptr)
Get all live threads. The threads are Java programming language threads; that is, threads that are attached to the VM. A thread is live if java.lang.Thread.isAlive() would return true, that is, the thread has been started and has not yet died. The universe of threads is determined by the context of the JVM TI environment, which typically is all threads attached to the VM. Note that this includes JVM TI agent threads (see RunAgentThread).

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 4 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
threads_count_ptr | jint* | On return, points to the number of running threads. Agent passes a pointer to a jint. On return, the jint has been set.
threads_ptr | jthread** | On return, points to an array of references, one for each running thread. Agent passes a pointer to a jthread*. On return, the jthread* points to a newly allocated array of size *threads_count_ptr. The array should be freed with Deallocate. The objects returned by threads_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | threads_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | threads_ptr is NULL.

Suspend Thread

jvmtiError
SuspendThread(jvmtiEnv* env,
            jthread thread)
Suspend the specified thread. If the calling thread is specified, this function will not return until some other thread calls ResumeThread. If the thread is currently suspended, this function does nothing and returns an error.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 5 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_suspend | Can suspend and resume threads

Parameters
Name | Type | Description
thread | jthread | The thread to suspend. If thread is NULL, the current thread is used.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_suspend. Use AddCapabilities.
JVMTI_ERROR_THREAD_SUSPENDED | Thread already suspended.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Suspend Thread List

jvmtiError
SuspendThreadList(jvmtiEnv* env,
            jint request_count,
            const jthread* request_list,
            jvmtiError* results)
Suspend the request_count threads specified in the request_list array. Threads may be resumed with ResumeThreadList or ResumeThread. If the calling thread is specified in the request_list array, this function will not return until some other thread resumes it. Errors encountered in the suspension of a thread are returned in the results array, not in the return value of this function. Threads that are currently suspended do not change state.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 92 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_suspend | Can suspend and resume threads

Parameters
Name | Type | Description
request_count | jint | The number of threads to suspend.
request_list | const jthread* | The list of threads to suspend. Agent passes in an array of request_count elements of jthread.
results | jvmtiError* | An agent supplied array of request_count elements. On return, filled with the error code for the suspend of the corresponding thread. The error code will be JVMTI_ERROR_NONE if the thread was suspended by this call. Possible error codes are those specified for SuspendThread. Agent passes an array large enough to hold request_count elements of jvmtiError. The incoming values of the elements of the array are ignored. On return, the elements are set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_suspend. Use AddCapabilities.
JVMTI_ERROR_ILLEGAL_ARGUMENT | request_count is less than 0.
JVMTI_ERROR_NULL_POINTER | request_list is NULL.
JVMTI_ERROR_NULL_POINTER | results is NULL.

Resume Thread

jvmtiError
ResumeThread(jvmtiEnv* env,
            jthread thread)
Resume a suspended thread. Any threads currently suspended through a JVM TI suspend function (eg. SuspendThread) or java.lang.Thread.suspend() will resume execution; all other threads are unaffected.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 6 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_suspend | Can suspend and resume threads

Parameters
Name | Type | Description
thread | jthread | The thread to resume.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_suspend. Use AddCapabilities.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not suspended.
JVMTI_ERROR_INVALID_TYPESTATE | The state of the thread has been modified, and is now inconsistent.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Resume Thread List

jvmtiError
ResumeThreadList(jvmtiEnv* env,
            jint request_count,
            const jthread* request_list,
            jvmtiError* results)
Resume the request_count threads specified in the request_list array. Any thread suspended through a JVM TI suspend function (eg. SuspendThreadList) or java.lang.Thread.suspend() will resume execution.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 93 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_suspend | Can suspend and resume threads

Parameters
Name | Type | Description
request_count | jint | The number of threads to resume.
request_list | const jthread* | The threads to resume. Agent passes in an array of request_count elements of jthread.
results | jvmtiError* | An agent supplied array of request_count elements. On return, filled with the error code for the resume of the corresponding thread. The error code will be JVMTI_ERROR_NONE if the thread was suspended by this call. Possible error codes are those specified for ResumeThread. Agent passes an array large enough to hold request_count elements of jvmtiError. The incoming values of the elements of the array are ignored. On return, the elements are set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_suspend. Use AddCapabilities.
JVMTI_ERROR_ILLEGAL_ARGUMENT | request_count is less than 0.
JVMTI_ERROR_NULL_POINTER | request_list is NULL.
JVMTI_ERROR_NULL_POINTER | results is NULL.

Stop Thread

jvmtiError
StopThread(jvmtiEnv* env,
            jthread thread,
            jobject exception)
Send the specified asynchronous exception to the specified thread (similar to java.lang.Thread.stop). Normally, this function is used to kill the specified thread with an instance of the exception ThreadDeath.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 7 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_signal_thread | Can send stop or interrupt to threads

Parameters
Name | Type | Description
thread | jthread | The thread to stop.
exception | jobject | The asynchronous exception object.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_signal_thread. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_INVALID_OBJECT | exception is not an object.

Interrupt Thread

jvmtiError
InterruptThread(jvmtiEnv* env,
            jthread thread)
Interrupt the specified thread (similar to java.lang.Thread.interrupt).

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 8 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_signal_thread | Can send stop or interrupt to threads

Parameters
Name | Type | Description
thread | jthread | The thread to interrupt.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_signal_thread. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Get Thread Info

typedef struct {
    char* name;
    jint priority;
    jboolean is_daemon;
    jthreadGroup thread_group;
    jobject context_class_loader;
} jvmtiThreadInfo;
jvmtiError
GetThreadInfo(jvmtiEnv* env,
            jthread thread,
            jvmtiThreadInfo* info_ptr)
Get thread information. The fields of the jvmtiThreadInfo structure are filled in with details of the specified thread.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 9 | 1.0

Capabilities
Required Functionality

jvmtiThreadInfo - Thread information structure
Field | Type | Description
name | char* | The thread name, encoded as a modified UTF-8 string.
priority | jint | The thread priority. See the thread priority constants: jvmtiThreadPriority.
is_daemon | jboolean | Is this a daemon thread?
thread_group | jthreadGroup | The thread group to which this thread belongs. NULL if the thread has died.
context_class_loader | jobject | The context class loader associated with this thread.

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
info_ptr | jvmtiThreadInfo* | On return, filled with information describing the specified thread. For JDK 1.1 implementations that don't recognize context class loaders, the context_class_loader field will be NULL. Agent passes a pointer to a jvmtiThreadInfo. On return, the jvmtiThreadInfo has been set. The pointer returned in the field name of jvmtiThreadInfo is a newly allocated array. The array should be freed with Deallocate. The object returned in the field thread_group of jvmtiThreadInfo is a JNI local reference and must be managed. The object returned in the field context_class_loader of jvmtiThreadInfo is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Get Owned Monitor Info

jvmtiError
GetOwnedMonitorInfo(jvmtiEnv* env,
            jthread thread,
            jint* owned_monitor_count_ptr,
            jobject** owned_monitors_ptr)
Get information about the monitors owned by the specified thread.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 10 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_owned_monitor_info | Can get information about ownership of monitors - GetOwnedMonitorInfo

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
owned_monitor_count_ptr | jint* | The number of monitors returned. Agent passes a pointer to a jint. On return, the jint has been set.
owned_monitors_ptr | jobject** | The array of owned monitors. Agent passes a pointer to a jobject*. On return, the jobject* points to a newly allocated array of size *owned_monitor_count_ptr. The array should be freed with Deallocate. The objects returned by owned_monitors_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_owned_monitor_info. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | owned_monitor_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | owned_monitors_ptr is NULL.

Get Owned Monitor Stack Depth Info

typedef struct {
    jobject monitor;
    jint stack_depth;
} jvmtiMonitorStackDepthInfo;
jvmtiError
GetOwnedMonitorStackDepthInfo(jvmtiEnv* env,
            jthread thread,
            jint* monitor_info_count_ptr,
            jvmtiMonitorStackDepthInfo** monitor_info_ptr)
Get information about the monitors owned by the specified thread and the depth of the stack frame which locked them.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 153 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_owned_monitor_stack_depth_info | Can get information about owned monitors with stack depth - GetOwnedMonitorStackDepthInfo

jvmtiMonitorStackDepthInfo - Monitor stack depth information structure
Field | Type | Description
monitor | jobject | The owned monitor.
stack_depth | jint | The stack depth. Corresponds to the stack depth used in the Stack Frame functions. That is, zero is the current frame, one is the frame which called the current frame. And it is negative one if the implementation cannot determine the stack depth (e.g., for monitors acquired by JNI MonitorEnter).

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
monitor_info_count_ptr | jint* | The number of monitors returned. Agent passes a pointer to a jint. On return, the jint has been set.
monitor_info_ptr | jvmtiMonitorStackDepthInfo ** | The array of owned monitor depth information. Agent passes a pointer to a jvmtiMonitorStackDepthInfo*. On return, the jvmtiMonitorStackDepthInfo* points to a newly allocated array of size *monitor_info_count_ptr. The array should be freed with Deallocate. The objects returned in the field monitor of jvmtiMonitorStackDepthInfo are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_owned_monitor_stack_depth_info. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | monitor_info_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | monitor_info_ptr is NULL.

Get Current Contended Monitor

jvmtiError
GetCurrentContendedMonitor(jvmtiEnv* env,
            jthread thread,
            jobject* monitor_ptr)
Get the object, if any, whose monitor the specified thread is waiting to enter or waiting to regain through java.lang.Object.wait.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 11 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_current_contended_monitor | Can GetCurrentContendedMonitor

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
monitor_ptr | jobject* | On return, filled with the current contended monitor, or NULL if there is none. Agent passes a pointer to a jobject. On return, the jobject has been set. The object returned by monitor_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_current_contended_monitor. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | monitor_ptr is NULL.

Agent Start Function

typedef void (JNICALL *jvmtiStartFunction)
    (jvmtiEnv* jvmti_env,
     JNIEnv* jni_env,
     void* arg);
Agent supplied callback function. This function is the entry point for an agent thread started with RunAgentThread.

Parameters
Name | Type | Description
jvmti_env | jvmtiEnv * | The JVM TI environment.
jni_env | JNIEnv * | The JNI environment.
arg | void * | The arg parameter passed to RunAgentThread.

Run Agent Thread

jvmtiError
RunAgentThread(jvmtiEnv* env,
            jthread thread,
            jvmtiStartFunction proc,
            const void* arg,
            jint priority)
Starts the execution of an agent thread. with the specified native function. The parameter arg is forwarded on to the start function (specified with proc) as its single argument. This function allows the creation of agent threads for handling communication with another process or for handling events without the need to load a special subclass of java.lang.Thread or implementer of java.lang.Runnable. Instead, the created thread can run entirely in native code. However, the created thread does require a newly created instance of java.lang.Thread (referenced by the argument thread) to which it will be associated. The thread object can be created with JNI calls.

The following common thread priorities are provided for your convenience:
Thread Priority Constants
Constant | Value | Description
JVMTI_THREAD_MIN_PRIORITY | 1 | Minimum possible thread priority
JVMTI_THREAD_NORM_PRIORITY | 5 | Normal thread priority
JVMTI_THREAD_MAX_PRIORITY | 10 | Maximum possible thread priority

The new thread is started as a daemon thread with the specified priority. If enabled, a ThreadStart event will be sent.

Since the thread has been started, the thread will be live when this function returns, unless the thread has died immediately.

The thread group of the thread is ignored -- specifically, the thread is not added to the thread group and the thread is not seen on queries of the thread group at either the Java programming language or JVM TI levels.

The thread is not visible to Java programming language queries but is included in JVM TI queries (for example, GetAllThreads and GetAllStackTraces).

Upon execution of proc, the new thread will be attached to the VM--see the JNI documentation on Attaching to the VM.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 12 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | The thread to run.
proc | jvmtiStartFunction | The start function.
arg | const void * | The argument to the start function. Agent passes in a pointer. If arg is NULL, NULL is passed to the start function.
priority | jint | The priority of the started thread. Any thread priority allowed by java.lang.Thread.setPriority can be used including those in jvmtiThreadPriority.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_PRIORITY | priority is less than JVMTI_THREAD_MIN_PRIORITY or greater than JVMTI_THREAD_MAX_PRIORITY
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_NULL_POINTER | proc is NULL.

Set Thread Local Storage

jvmtiError
SetThreadLocalStorage(jvmtiEnv* env,
            jthread thread,
            const void* data)
The VM stores a pointer value associated with each environment-thread pair. This pointer value is called thread-local storage. This value is NULL unless set with this function. Agents can allocate memory in which they store thread specific information. By setting thread-local storage it can then be accessed with GetThreadLocalStorage.

This function is called by the agent to set the value of the JVM TI thread-local storage. JVM TI supplies to the agent a pointer-size thread-local storage that can be used to record per-thread information.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 103 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | Store to this thread. If thread is NULL, the current thread is used.
data | const void * | The value to be entered into the thread-local storage. Agent passes in a pointer. If data is NULL, value is set to NULL.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Get Thread Local Storage

jvmtiError
GetThreadLocalStorage(jvmtiEnv* env,
            jthread thread,
            void** data_ptr)
Called by the agent to get the value of the JVM TI thread-local storage.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 102 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | Retrieve from this thread. If thread is NULL, the current thread is used.
data_ptr | void** | Pointer through which the value of the thread local storage is returned. If thread-local storage has not been set with SetThreadLocalStorage the returned pointer is NULL.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | data_ptr is NULL.

Thread Group

Thread Group functions:
  • Get Top Thread Groups
  • Get Thread Group Info
  • Get Thread Group Children
Thread Group types:
  • jvmtiThreadGroupInfo - Thread group information structure

Get Top Thread Groups

jvmtiError
GetTopThreadGroups(jvmtiEnv* env,
            jint* group_count_ptr,
            jthreadGroup** groups_ptr)
Return all top-level (parentless) thread groups in the VM.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 13 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
group_count_ptr | jint* | On return, points to the number of top-level thread groups. Agent passes a pointer to a jint. On return, the jint has been set.
groups_ptr | jthreadGroup** | On return, refers to a pointer to the top-level thread group array. Agent passes a pointer to a jthreadGroup*. On return, the jthreadGroup* points to a newly allocated array of size *group_count_ptr. The array should be freed with Deallocate. The objects returned by groups_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | group_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | groups_ptr is NULL.

Get Thread Group Info

typedef struct {
    jthreadGroup parent;
    char* name;
    jint max_priority;
    jboolean is_daemon;
} jvmtiThreadGroupInfo;
jvmtiError
GetThreadGroupInfo(jvmtiEnv* env,
            jthreadGroup group,
            jvmtiThreadGroupInfo* info_ptr)
Get information about the thread group. The fields of the jvmtiThreadGroupInfo structure are filled in with details of the specified thread group.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 14 | 1.0

Capabilities
Required Functionality

jvmtiThreadGroupInfo - Thread group information structure
Field | Type | Description
parent | jthreadGroup | The parent thread group.
name | char* | The thread group's name, encoded as a modified UTF-8 string.
max_priority | jint | The maximum priority for this thread group.
is_daemon | jboolean | Is this a daemon thread group?

Parameters
Name | Type | Description
group | jthreadGroup | The thread group to query.
info_ptr | jvmtiThreadGroupInfo* | On return, filled with information describing the specified thread group. Agent passes a pointer to a jvmtiThreadGroupInfo. On return, the jvmtiThreadGroupInfo has been set. The object returned in the field parent of jvmtiThreadGroupInfo is a JNI local reference and must be managed. The pointer returned in the field name of jvmtiThreadGroupInfo is a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD_GROUP | group is not a thread group object.
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Get Thread Group Children

jvmtiError
GetThreadGroupChildren(jvmtiEnv* env,
            jthreadGroup group,
            jint* thread_count_ptr,
            jthread** threads_ptr,
            jint* group_count_ptr,
            jthreadGroup** groups_ptr)
Get the live threads and active subgroups in this thread group.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 15 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
group | jthreadGroup | The group to query.
thread_count_ptr | jint* | On return, points to the number of live threads in this thread group. Agent passes a pointer to a jint. On return, the jint has been set.
threads_ptr | jthread** | On return, points to an array of the live threads in this thread group. Agent passes a pointer to a jthread*. On return, the jthread* points to a newly allocated array of size *thread_count_ptr. The array should be freed with Deallocate. The objects returned by threads_ptr are JNI local references and must be managed.
group_count_ptr | jint* | On return, points to the number of active child thread groups Agent passes a pointer to a jint. On return, the jint has been set.
groups_ptr | jthreadGroup** | On return, points to an array of the active child thread groups. Agent passes a pointer to a jthreadGroup*. On return, the jthreadGroup* points to a newly allocated array of size *group_count_ptr. The array should be freed with Deallocate. The objects returned by groups_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD_GROUP | group is not a thread group object.
JVMTI_ERROR_NULL_POINTER | thread_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | threads_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | group_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | groups_ptr is NULL.

Stack Frame

Stack Frame functions:
  • Get Stack Trace
  • Get All Stack Traces
  • Get Thread List Stack Traces
  • Get Frame Count
  • Pop Frame
  • Get Frame Location
  • Notify Frame Pop
Stack Frame types:
  • jvmtiFrameInfo - Stack frame information structure
  • jvmtiStackInfo - Stack information structure
These functions provide information about the stack of a thread. Stack frames are referenced by depth. The frame at depth zero is the current frame.

Stack frames are as described in The Java™ Virtual Machine Specification, Chapter 3.6, That is, they correspond to method invocations (including native methods) but do not correspond to platform native or VM internal frames.

A JVM TI implementation may use method invocations to launch a thread and the corresponding frames may be included in the stack as presented by these functions -- that is, there may be frames shown deeper than main() and run(). However this presentation must be consistent across all JVM TI functionality which uses stack frames or stack depth.

Stack frame information structure

Information about a stack frame is returned in this structure.

typedef struct {
    jmethodID method;
    jlocation location;
} jvmtiFrameInfo;
jvmtiFrameInfo - Stack frame information structure
Field | Type | Description
method | jmethodID | The method executing in this frame.
location | jlocation | The index of the instruction executing in this frame. -1 if the frame is executing a native method.

Stack information structure

Information about a set of stack frames is returned in this structure.

typedef struct {
    jthread thread;
    jint state;
    jvmtiFrameInfo* frame_buffer;
    jint frame_count;
} jvmtiStackInfo;
jvmtiStackInfo - Stack information structure
Field | Type | Description
thread | jthread | On return, the thread traced.
state | jint | On return, the thread state. See GetThreadState.
frame_buffer | jvmtiFrameInfo * | On return, this agent allocated buffer is filled with stack frame information.
frame_count | jint | On return, the number of records filled into frame_buffer. This will be min(max_frame_count, stackDepth).

Get Stack Trace

jvmtiError
GetStackTrace(jvmtiEnv* env,
            jthread thread,
            jint start_depth,
            jint max_frame_count,
            jvmtiFrameInfo* frame_buffer,
            jint* count_ptr)
Get information about the stack of a thread. If max_frame_count is less than the depth of the stack, the max_frame_count topmost frames are returned, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

The following example causes up to five of the topmost frames to be returned and (if there are any frames) the currently executing method name to be printed.
jvmtiFrameInfo frames[5];
jint count;
jvmtiError err;

err = (*jvmti)->GetStackTrace(jvmti, aThread, 0, 5,
                               frames, &count);
if (err == JVMTI_ERROR_NONE && count >= 1) {
   char *methodName;
   err = (*jvmti)->GetMethodName(jvmti, frames[0].method,
                       &methodName, NULL, NULL);
   if (err == JVMTI_ERROR_NONE) {
      printf("Executing method: %s", methodName);
   }
}

The thread need not be suspended to call this function.

The GetLineNumberTable function can be used to map locations to line numbers. Note that this mapping can be done lazily.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 104 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | Fetch the stack trace of this thread. If thread is NULL, the current thread is used.
start_depth | jint | Begin retrieving frames at this depth. If non-negative, count from the current frame, the first frame retrieved is at depth start_depth. For example, if zero, start from the current frame; if one, start from the caller of the current frame; if two, start from the caller of the caller of the current frame; and so on. If negative, count from below the oldest frame, the first frame retrieved is at depth stackDepth + start_depth, where stackDepth is the count of frames on the stack. For example, if negative one, only the oldest frame is retrieved; if negative two, start from the frame called by the oldest frame.
max_frame_count | jint | The maximum number of jvmtiFrameInfo records to retrieve.
frame_buffer | jvmtiFrameInfo * | On return, this agent allocated buffer is filled with stack frame information. Agent passes an array large enough to hold max_frame_count elements of jvmtiFrameInfo. The incoming values of the elements of the array are ignored. On return, *count_ptr of the elements are set.
count_ptr | jint* | On return, points to the number of records filled in. For non-negative start_depth, this will be min(max_frame_count, stackDepth - start_depth). For negative start_depth, this will be min(max_frame_count, -start_depth). Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | start_depth is positive and greater than or equal to stackDepth. Or start_depth is negative and less than -stackDepth.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | max_frame_count is less than 0.
JVMTI_ERROR_NULL_POINTER | frame_buffer is NULL.
JVMTI_ERROR_NULL_POINTER | count_ptr is NULL.

Get All Stack Traces

jvmtiError
GetAllStackTraces(jvmtiEnv* env,
            jint max_frame_count,
            jvmtiStackInfo** stack_info_ptr,
            jint* thread_count_ptr)
Get information about the stacks of all live threads (including agent threads). If max_frame_count is less than the depth of a stack, the max_frame_count topmost frames are returned for that thread, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

All stacks are collected simultaneously, that is, no changes will occur to the thread state or stacks between the sampling of one thread and the next. The threads need not be suspended.
jvmtiStackInfo *stack_info;
jint thread_count;
int ti;
jvmtiError err;

err = (*jvmti)->GetAllStackTraces(jvmti, MAX_FRAMES, &stack_info, &thread_count);
if (err != JVMTI_ERROR_NONE) {
   ...
}
for (ti = 0; ti < thread_count; ++ti) {
   jvmtiStackInfo *infop = &stack_info[ti];
   jthread thread = infop->thread;
   jint state = infop->state;
   jvmtiFrameInfo *frames = infop->frame_buffer;
   int fi;

   myThreadAndStatePrinter(thread, state);
   for (fi = 0; fi < infop->frame_count; fi++) {
      myFramePrinter(frames[fi].method, frames[fi].location);
   }
}
/* this one Deallocate call frees all data allocated by GetAllStackTraces */
err = (*jvmti)->Deallocate(jvmti, stack_info);

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 100 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
max_frame_count | jint | The maximum number of jvmtiFrameInfo records to retrieve per thread.
stack_info_ptr | jvmtiStackInfo ** | On return, this buffer is filled with stack information for each thread. The number of jvmtiStackInfo records is determined by thread_count_ptr. Note that this buffer is allocated to include the jvmtiFrameInfo buffers pointed to by jvmtiStackInfo.frame_buffer. These buffers must not be separately deallocated. Agent passes a pointer to a jvmtiStackInfo*. On return, the jvmtiStackInfo* points to a newly allocated array. The array should be freed with Deallocate. The objects returned in the field thread of jvmtiStackInfo are JNI local references and must be managed.
thread_count_ptr | jint* | The number of threads traced. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | max_frame_count is less than 0.
JVMTI_ERROR_NULL_POINTER | stack_info_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | thread_count_ptr is NULL.

Get Thread List Stack Traces

jvmtiError
GetThreadListStackTraces(jvmtiEnv* env,
            jint thread_count,
            const jthread* thread_list,
            jint max_frame_count,
            jvmtiStackInfo** stack_info_ptr)
Get information about the stacks of the supplied threads. If max_frame_count is less than the depth of a stack, the max_frame_count topmost frames are returned for that thread, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

All stacks are collected simultaneously, that is, no changes will occur to the thread state or stacks between the sampling one thread and the next. The threads need not be suspended.

If a thread has not yet started or terminates before the stack information is collected, a zero length stack (jvmtiStackInfo.frame_count will be zero) will be returned and the thread jvmtiStackInfo.state can be checked.

See the example for the similar function GetAllStackTraces.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 101 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread_count | jint | The number of threads to trace.
thread_list | const jthread* | The list of threads to trace. Agent passes in an array of thread_count elements of jthread.
max_frame_count | jint | The maximum number of jvmtiFrameInfo records to retrieve per thread.
stack_info_ptr | jvmtiStackInfo ** | On return, this buffer is filled with stack information for each thread. The number of jvmtiStackInfo records is determined by thread_count. Note that this buffer is allocated to include the jvmtiFrameInfo buffers pointed to by jvmtiStackInfo.frame_buffer. These buffers must not be separately deallocated. Agent passes a pointer to a jvmtiStackInfo*. On return, the jvmtiStackInfo* points to a newly allocated array of size *thread_count. The array should be freed with Deallocate. The objects returned in the field thread of jvmtiStackInfo are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | An element in thread_list is not a thread object.
JVMTI_ERROR_ILLEGAL_ARGUMENT | thread_count is less than 0.
JVMTI_ERROR_NULL_POINTER | thread_list is NULL.
JVMTI_ERROR_ILLEGAL_ARGUMENT | max_frame_count is less than 0.
JVMTI_ERROR_NULL_POINTER | stack_info_ptr is NULL.

Get Frame Count

jvmtiError
GetFrameCount(jvmtiEnv* env,
            jthread thread,
            jint* count_ptr)
Get the number of frames currently in the specified thread's call stack.

If this function is called for a thread actively executing bytecodes (for example, not the current thread and not suspended), the information returned is transient.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 16 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
count_ptr | jint* | On return, points to the number of frames in the call stack. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | count_ptr is NULL.

Pop Frame

jvmtiError
PopFrame(jvmtiEnv* env,
            jthread thread)
Pop the current frame of thread's stack. Popping a frame takes you to the previous frame. When the thread is resumed, the execution state of the thread is reset to the state immediately before the called method was invoked. That is (using The Java™ Virtual Machine Specification terminology):
  • the current frame is discarded as the previous frame becomes the current one
  • the operand stack is restored--the argument values are added back and if the invoke was not invokestatic, objectref is added back as well
  • the Java virtual machine PC is restored to the opcode of the invoke instruction
Note however, that any changes to the arguments, which occurred in the called method, remain; when execution continues, the first instruction to execute will be the invoke.

Between calling PopFrame and resuming the thread the state of the stack is undefined. To pop frames beyond the first, these three steps must be repeated:
  • suspend the thread via an event (step, breakpoint, ...)
  • call PopFrame
  • resume the thread

A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to native locks or java.util.concurrent.locks locks.

Finally blocks are not executed.

Changes to global state are not addressed and thus remain changed.

The specified thread must be suspended (which implies it cannot be the current thread).

Both the called method and calling method must be non-native Java programming language methods.

No JVM TI events are generated by this function.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 80 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_pop_frame | Can pop frames off the stack - PopFrame

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to be popped.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_pop_frame. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Called or calling method is a native method. The implementation is unable to pop this frame.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are less than two stack frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Get Frame Location

jvmtiError
GetFrameLocation(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jmethodID* method_ptr,
            jlocation* location_ptr)

For a Java programming language frame, return the location of the instruction currently executing.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 19 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
thread | jthread | The thread of the frame to query. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame to query.
method_ptr | jmethodID* | On return, points to the method for the current location. Agent passes a pointer to a jmethodID. On return, the jmethodID has been set.
location_ptr | jlocation* | On return, points to the index of the currently executing instruction. Is set to -1 if the frame is executing a native method. Agent passes a pointer to a jlocation. On return, the jlocation has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | method_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | location_ptr is NULL.

Notify Frame Pop

jvmtiError
NotifyFramePop(jvmtiEnv* env,
            jthread thread,
            jint depth)
When the frame that is currently at depth is popped from the stack, generate a FramePop event. See the FramePop event for details. Only frames corresponding to non-native Java programming language methods can receive notification.

The specified thread must either be the current thread or the thread must be suspended.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 20 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_frame_pop_events | Can set and thus get FramePop events

Parameters
Name | Type | Description
thread | jthread | The thread of the frame for which the frame pop event will be generated. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame for which the frame pop event will be generated.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_frame_pop_events. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | The frame at depth is executing a native method.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not suspended and was not the current thread.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.

Force Early Return

Force Early Return functions:
  • Force Early Return - Object
  • Force Early Return - Int
  • Force Early Return - Long
  • Force Early Return - Float
  • Force Early Return - Double
  • Force Early Return - Void
These functions allow an agent to force a method to return at any point during its execution. The method which will return early is referred to as the called method. The called method is the current method (as defined by The Java™ Virtual Machine Specification, Chapter 3.6) for the specified thread at the time the function is called.

The specified thread must be suspended or must be the current thread. The return occurs when execution of Java programming language code is resumed on this thread. Between calling one of these functions and resumption of thread execution, the state of the stack is undefined.

No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application.

A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to native locks or java.util.concurrent.locks locks.

Events, such as MethodExit, are generated as they would be in a normal return.

The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.

Force Early Return - Object

jvmtiError
ForceEarlyReturnObject(jvmtiEnv* env,
            jthread thread,
            jobject value)
This function can be used to return from a method whose result type is Object or a subclass of Object.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 81 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.
value | jobject | The return value for the called frame. An object or NULL.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The result type of the called method is not Object or a subclass of Object.
JVMTI_ERROR_TYPE_MISMATCH | The supplied value is not compatible with the result type of the called method.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no more frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_INVALID_OBJECT | value is not an object.

Force Early Return - Int

jvmtiError
ForceEarlyReturnInt(jvmtiEnv* env,
            jthread thread,
            jint value)
This function can be used to return from a method whose result type is int, short, char, byte, or boolean.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 82 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.
value | jint | The return value for the called frame.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The result type of the called method is not int, short, char, byte, or boolean.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Force Early Return - Long

jvmtiError
ForceEarlyReturnLong(jvmtiEnv* env,
            jthread thread,
            jlong value)
This function can be used to return from a method whose result type is long.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 83 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.
value | jlong | The return value for the called frame.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The result type of the called method is not long.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Force Early Return - Float

jvmtiError
ForceEarlyReturnFloat(jvmtiEnv* env,
            jthread thread,
            jfloat value)
This function can be used to return from a method whose result type is float.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 84 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.
value | jfloat | The return value for the called frame.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The result type of the called method is not float.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Force Early Return - Double

jvmtiError
ForceEarlyReturnDouble(jvmtiEnv* env,
            jthread thread,
            jdouble value)
This function can be used to return from a method whose result type is double.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 85 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.
value | jdouble | The return value for the called frame.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The result type of the called method is not double.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Force Early Return - Void

jvmtiError
ForceEarlyReturnVoid(jvmtiEnv* env,
            jthread thread)
This function can be used to return from a method with no result type. That is, the called method must be declared void.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 86 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_force_early_return | Can return early from a method, as described in the Force Early Return category.

Parameters
Name | Type | Description
thread | jthread | The thread whose current frame is to return early. If thread is NULL, the current thread is used.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_force_early_return. Use AddCapabilities.
JVMTI_ERROR_OPAQUE_FRAME | Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame.
JVMTI_ERROR_TYPE_MISMATCH | The called method has a result type.
JVMTI_ERROR_THREAD_NOT_SUSPENDED | Thread was not the current thread and was not suspended.
JVMTI_ERROR_NO_MORE_FRAMES | There are no frames on the call stack.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).

Heap

Heap functions:
  • Follow References
  • Iterate Through Heap
  • Get Tag
  • Set Tag
  • Get Objects With Tags
  • Force Garbage Collection
Heap function types:
  • Heap Iteration Callback
  • Heap Reference Callback
  • Primitive Field Callback
  • Array Primitive Value Callback
  • String Primitive Value Callback
  • reserved for future use Callback
Heap types:
  • jvmtiHeapReferenceKind - Heap Reference Enumeration
  • jvmtiPrimitiveType - Primitive Type Enumeration
  • jvmtiHeapReferenceInfoField - Reference information structure for Field references
  • jvmtiHeapReferenceInfoArray - Reference information structure for Array references
  • jvmtiHeapReferenceInfoConstantPool - Reference information structure for Constant Pool references
  • jvmtiHeapReferenceInfoStackLocal - Reference information structure for Local Variable references
  • jvmtiHeapReferenceInfoJniLocal - Reference information structure for JNI local references
  • jvmtiHeapReferenceInfoReserved - Reference information structure for Other references
  • jvmtiHeapReferenceInfo - Reference information structure
  • jvmtiHeapCallbacks - Heap callback function structure
Heap flags and constants:
  • Heap Filter Flags
  • Heap Visit Control Flags
These functions are used to analyze the heap. Functionality includes the ability to view the objects in the heap and to tag these objects.

Object Tags

A tag is a value associated with an object. Tags are explicitly set by the agent using the SetTag function or by callback functions such as jvmtiHeapIterationCallback.

Tags are local to the environment; that is, the tags of one environment are not visible in another.

Tags are jlong values which can be used simply to mark an object or to store a pointer to more detailed information. Objects which have not been tagged have a tag of zero. Setting a tag to zero makes the object untagged.

Heap Callback Functions

Heap functions which iterate through the heap and recursively follow object references use agent supplied callback functions to deliver the information.

These heap callback functions must adhere to the following restrictions -- These callbacks must not use JNI functions. These callbacks must not use JVM TI functions except callback safe functions which specifically allow such use (see the raw monitor, memory management, and environment local storage functions).

An implementation may invoke a callback on an internal thread or the thread which called the iteration function. Heap callbacks are single threaded -- no more than one callback will be invoked at a time.

The Heap Filter Flags can be used to prevent reporting based on the tag status of an object or its class. If no flags are set (the jint is zero), objects will not be filtered out.
Heap Filter Flags
Constant | Value | Description
JVMTI_HEAP_FILTER_TAGGED | 0x4 | Filter out tagged objects. Objects which are tagged are not included.
JVMTI_HEAP_FILTER_UNTAGGED | 0x8 | Filter out untagged objects. Objects which are not tagged are not included.
JVMTI_HEAP_FILTER_CLASS_TAGGED | 0x10 | Filter out objects with tagged classes. Objects whose class is tagged are not included.
JVMTI_HEAP_FILTER_CLASS_UNTAGGED | 0x20 | Filter out objects with untagged classes. Objects whose class is not tagged are not included.

The Heap Visit Control Flags are returned by the heap callbacks and can be used to abort the iteration. For the Heap Reference Callback, it can also be used to prune the graph of traversed references (JVMTI_VISIT_OBJECTS is not set).
Heap Visit Control Flags
Constant | Value | Description
JVMTI_VISIT_OBJECTS | 0x100 | If we are visiting an object and if this callback was initiated by FollowReferences, traverse the references of this object. Otherwise ignored.
JVMTI_VISIT_ABORT | 0x8000 | Abort the iteration. Ignore all other bits.

The Heap Reference Enumeration is provided by the Heap Reference Callback and Primitive Field Callback to describe the kind of reference being reported.
Heap Reference Enumeration (jvmtiHeapReferenceKind)
Constant | Value | Description
JVMTI_HEAP_REFERENCE_CLASS | 1 | Reference from an object to its class.
JVMTI_HEAP_REFERENCE_FIELD | 2 | Reference from an object to the value of one of its instance fields.
JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT | 3 | Reference from an array to one of its elements.
JVMTI_HEAP_REFERENCE_CLASS_LOADER | 4 | Reference from a class to its class loader.
JVMTI_HEAP_REFERENCE_SIGNERS | 5 | Reference from a class to its signers array.
JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN | 6 | Reference from a class to its protection domain.
JVMTI_HEAP_REFERENCE_INTERFACE | 7 | Reference from a class to one of its interfaces. Note: interfaces are defined via a constant pool reference, so the referenced interfaces may also be reported with a JVMTI_HEAP_REFERENCE_CONSTANT_POOL reference kind.
JVMTI_HEAP_REFERENCE_STATIC_FIELD | 8 | Reference from a class to the value of one of its static fields.
JVMTI_HEAP_REFERENCE_CONSTANT_POOL | 9 | Reference from a class to a resolved entry in the constant pool.
JVMTI_HEAP_REFERENCE_SUPERCLASS | 10 | Reference from a class to its superclass. A callback is bot sent if the superclass is java.lang.Object. Note: loaded classes define superclasses via a constant pool reference, so the referenced superclass may also be reported with a JVMTI_HEAP_REFERENCE_CONSTANT_POOL reference kind.
JVMTI_HEAP_REFERENCE_JNI_GLOBAL | 21 | Heap root reference: JNI global reference.
JVMTI_HEAP_REFERENCE_SYSTEM_CLASS | 22 | Heap root reference: System class.
JVMTI_HEAP_REFERENCE_MONITOR | 23 | Heap root reference: monitor.
JVMTI_HEAP_REFERENCE_STACK_LOCAL | 24 | Heap root reference: local variable on the stack.
JVMTI_HEAP_REFERENCE_JNI_LOCAL | 25 | Heap root reference: JNI local reference.
JVMTI_HEAP_REFERENCE_THREAD | 26 | Heap root reference: Thread.
JVMTI_HEAP_REFERENCE_OTHER | 27 | Heap root reference: other heap root reference.

Definitions for the single character type descriptors of primitive types.
Primitive Type Enumeration (jvmtiPrimitiveType)
Constant | Value | Description
JVMTI_PRIMITIVE_TYPE_BOOLEAN | 90 | 'Z' - Java programming language boolean - JNI jboolean
JVMTI_PRIMITIVE_TYPE_BYTE | 66 | 'B' - Java programming language byte - JNI jbyte
JVMTI_PRIMITIVE_TYPE_CHAR | 67 | 'C' - Java programming language char - JNI jchar
JVMTI_PRIMITIVE_TYPE_SHORT | 83 | 'S' - Java programming language short - JNI jshort
JVMTI_PRIMITIVE_TYPE_INT | 73 | 'I' - Java programming language int - JNI jint
JVMTI_PRIMITIVE_TYPE_LONG | 74 | 'J' - Java programming language long - JNI jlong
JVMTI_PRIMITIVE_TYPE_FLOAT | 70 | 'F' - Java programming language float - JNI jfloat
JVMTI_PRIMITIVE_TYPE_DOUBLE | 68 | 'D' - Java programming language double - JNI jdouble

Reference information structure for Field references

Reference information returned for JVMTI_HEAP_REFERENCE_FIELD and JVMTI_HEAP_REFERENCE_STATIC_FIELD references.

typedef struct {
    jint index;
} jvmtiHeapReferenceInfoField;
jvmtiHeapReferenceInfoField - Reference information structure for Field references
Field Type Description
index jint For JVMTI_HEAP_REFERENCE_FIELD, the referrer object is not a class or an inteface. In this case, index is the index of the field in the class of the referrer object. This class is referred to below as C.

For JVMTI_HEAP_REFERENCE_STATIC_FIELD, the referrer object is a class (referred to below as C) or an interface (referred to below as I). In this case, index is the index of the field in that class or interface.

If the referrer object is not an interface, then the field indices are determined as follows:
  • make a list of all the fields in C and its superclasses, starting with all the fields in java.lang.Object and ending with all the fields in C.
  • Within this list, put the fields for a given class in the order returned by GetClassFields.
  • Assign the fields in this list indices n, n+1, ..., in order, where n is the count of the fields in all the interfaces implemented by C. Note that C implements all interfaces directly implemented by its superclasses; as well as all superinterfaces of these interfaces.
If the referrer object is an interface, then the field indices are determined as follows:
  • make a list of the fields directly declared in I.
  • Within this list, put the fields in the order returned by GetClassFields.
  • Assign the fields in this list indices n, n+1, ..., in order, where n is the count of the fields in all the superinterfaces of I.
All fields are included in this computation, regardless of field modifier (static, public, private, etc).

For example, given the following classes and interfaces:
interface I0 {
    int p = 0;
}

interface I1 extends I0 {
    int x = 1;
}

interface I2 extends I0 {
    int y = 2;
}

class C1 implements I1 {
    public static int a = 3;
    private int b = 4;
}

class C2 extends C1 implements I2 {
    static int q = 5;
    final int r = 6;
}
Assume that GetClassFields called on C1 returns the fields of C1 in the order: a, b; and that the fields of C2 are returned in the order: q, r. An instance of class C1 will have the following field indices:
a | 2 | The count of the fields in the interfaces implemented by C1 is two (n=2): p of I0 and x of I1.
b | 3 | the subsequent index.
The class C1 will have the same field indices.

An instance of class C2 will have the following field indices:
a | 3 | The count of the fields in the interfaces implemented by C2 is three (n=3): p of I0, x of I1 and y of I2 (an interface of C2). Note that the field p of I0 is only included once.
b | 4 | the subsequent index to "a".
q | 5 | the subsequent index to "b".
r | 6 | the subsequent index to "q".
The class C2 will have the same field indices. Note that a field may have a different index depending on the object that is viewing it -- for example field "a" above. Note also: not all field indices may be visible from the callbacks, but all indices are shown for illustrative purposes.

The interface I1 will have the following field indices:
x 1 The count of the fields in the superinterfaces of I1 is one (n=1): p of I0.

Reference information structure for Array references

Reference information returned for JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT references.

typedef struct {
    jint index;
} jvmtiHeapReferenceInfoArray;
jvmtiHeapReferenceInfoArray - Reference information structure for Array references
Field | Type | Description
index | jint | The array index.

Reference information structure for Constant Pool references

Reference information returned for JVMTI_HEAP_REFERENCE_CONSTANT_POOL references.

typedef struct {
    jint index;
} jvmtiHeapReferenceInfoConstantPool;
jvmtiHeapReferenceInfoConstantPool - Reference information structure for Constant Pool references
Field | Type | Description
index | jint | The index into the constant pool of the class. See the description in The Java™ Virtual Machine Specification, Chapter 4.4.

Reference information structure for Local Variable references

Reference information returned for JVMTI_HEAP_REFERENCE_STACK_LOCAL references.

typedef struct {
    jlong thread_tag;
    jlong thread_id;
    jint depth;
    jmethodID method;
    jlocation location;
    jint slot;
} jvmtiHeapReferenceInfoStackLocal;
jvmtiHeapReferenceInfoStackLocal - Reference information structure for Local Variable references
Field | Type | Description
thread_tag | jlong | The tag of the thread corresponding to this stack, zero if not tagged.
thread_id | jlong | The unique thread ID of the thread corresponding to this stack.
depth | jint | The depth of the frame.
method | jmethodID | The method executing in this frame.
location | jlocation | The currently executing location in this frame.
slot | jint | The slot number of the local variable.

Reference information structure for JNI local references

Reference information returned for JVMTI_HEAP_REFERENCE_JNI_LOCAL references.

typedef struct {
    jlong thread_tag;
    jlong thread_id;
    jint depth;
    jmethodID method;
} jvmtiHeapReferenceInfoJniLocal;
jvmtiHeapReferenceInfoJniLocal - Reference information structure for JNI local references
Field | Type | Description
thread_tag | jlong | The tag of the thread corresponding to this stack, zero if not tagged.
thread_id | jlong | The unique thread ID of the thread corresponding to this stack.
depth | jint | The depth of the frame.
method | jmethodID | The method executing in this frame.

Reference information structure for Other references

Reference information returned for other references.

typedef struct {
    jlong reserved1;
    jlong reserved2;
    jlong reserved3;
    jlong reserved4;
    jlong reserved5;
    jlong reserved6;
    jlong reserved7;
    jlong reserved8;
} jvmtiHeapReferenceInfoReserved;
jvmtiHeapReferenceInfoReserved - Reference information structure for Other references
Field | Type | Description
reserved1 | jlong | reserved for future use.
reserved2 | jlong | reserved for future use.
reserved3 | jlong | reserved for future use.
reserved4 | jlong | reserved for future use.
reserved5 | jlong | reserved for future use.
reserved6 | jlong | reserved for future use.
reserved7 | jlong | reserved for future use.
reserved8 | jlong | reserved for future use.

Reference information structure

The information returned about referrers. Represented as a union of the various kinds of reference information.

typedef union {
    jvmtiHeapReferenceInfoField field;
    jvmtiHeapReferenceInfoArray array;
    jvmtiHeapReferenceInfoConstantPool constant_pool;
    jvmtiHeapReferenceInfoStackLocal stack_local;
    jvmtiHeapReferenceInfoJniLocal jni_local;
    jvmtiHeapReferenceInfoReserved other;
} jvmtiHeapReferenceInfo;
jvmtiHeapReferenceInfo - Reference information structure
Field | Type | Description
field | jvmtiHeapReferenceInfoField | The referrer information for JVMTI_HEAP_REFERENCE_FIELD and JVMTI_HEAP_REFERENCE_STATIC_FIELD references.
array | jvmtiHeapReferenceInfoArray | The referrer information for For JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT references.
constant_pool | jvmtiHeapReferenceInfoConstantPool | The referrer information for For JVMTI_HEAP_REFERENCE_CONSTANT_POOL references.
stack_local | jvmtiHeapReferenceInfoStackLocal | The referrer information for For JVMTI_HEAP_REFERENCE_STACK_LOCAL references.
jni_local | jvmtiHeapReferenceInfoJniLocal | The referrer information for For JVMTI_HEAP_REFERENCE_JNI_LOCAL references.
other | jvmtiHeapReferenceInfoReserved | reserved for future use.

Heap callback function structure

typedef struct {
    jvmtiHeapIterationCallback heap_iteration_callback;
    jvmtiHeapReferenceCallback heap_reference_callback;
    jvmtiPrimitiveFieldCallback primitive_field_callback;
    jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
    jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
    jvmtiReservedCallback reserved5;
    jvmtiReservedCallback reserved6;
    jvmtiReservedCallback reserved7;
    jvmtiReservedCallback reserved8;
    jvmtiReservedCallback reserved9;
    jvmtiReservedCallback reserved10;
    jvmtiReservedCallback reserved11;
    jvmtiReservedCallback reserved12;
    jvmtiReservedCallback reserved13;
    jvmtiReservedCallback reserved14;
    jvmtiReservedCallback reserved15;
} jvmtiHeapCallbacks;
jvmtiHeapCallbacks - Heap callback function structure
Field | Type | Description
heap_iteration_callback | jvmtiHeapIterationCallback | The callback to be called to describe an object in the heap. Used by the IterateThroughHeap function, ignored by the FollowReferences function.
heap_reference_callback | jvmtiHeapReferenceCallback | The callback to be called to describe an object reference. Used by the FollowReferences function, ignored by the IterateThroughHeap function.
primitive_field_callback | jvmtiPrimitiveFieldCallback | The callback to be called to describe a primitive field.
array_primitive_value_callback | jvmtiArrayPrimitiveValueCallback | The callback to be called to describe an array of primitive values.
string_primitive_value_callback | jvmtiStringPrimitiveValueCallback | The callback to be called to describe a String value.
reserved5 | jvmtiReservedCallback | Reserved for future use..
reserved6 | jvmtiReservedCallback | Reserved for future use..
reserved7 | jvmtiReservedCallback | Reserved for future use..
reserved8 | jvmtiReservedCallback | Reserved for future use..
reserved9 | jvmtiReservedCallback | Reserved for future use..
reserved10 | jvmtiReservedCallback | Reserved for future use..
reserved11 | jvmtiReservedCallback | Reserved for future use..
reserved12 | jvmtiReservedCallback | Reserved for future use..
reserved13 | jvmtiReservedCallback | Reserved for future use..
reserved14 | jvmtiReservedCallback | Reserved for future use..
reserved15 | jvmtiReservedCallback | Reserved for future use..

Rationale: The heap dumping functionality (below) uses a callback for each object. While it would seem that a buffered approach would provide better throughput, tests do not show this to be the case--possibly due to locality of memory reference or array access overhead.

Heap Iteration Callback

typedef jint (JNICALL *jvmtiHeapIterationCallback)
    (jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     jint length,
     void* user_data);
Agent supplied callback function. Describes (but does not pass in) an object in the heap.

This function should return a bit vector of the desired visit control flags. This will determine if the entire iteration should be aborted (the JVMTI_VISIT_OBJECTS flag is ignored).

See the heap callback function restrictions.

Parameters
Name | Type | Description
class_tag | jlong | The tag of the class of object (zero if the class is not tagged). If the object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the object (in bytes). See GetObjectSize.
tag_ptr | jlong* | The object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
length | jint | If this object is an array, the length of the array. Otherwise negative one (-1).
user_data | void* | The user supplied data that was passed into the iteration function.

Heap Reference Callback

typedef jint (JNICALL *jvmtiHeapReferenceCallback)
    (jvmtiHeapReferenceKind reference_kind,
     const jvmtiHeapReferenceInfo* reference_info,
     jlong class_tag,
     jlong referrer_class_tag,
     jlong size,
     jlong* tag_ptr,
     jlong* referrer_tag_ptr,
     jint length,
     void* user_data);
Agent supplied callback function. Describes a reference from an object or the VM (the referrer) to another object (the referree) or a heap root to a referree.

This function should return a bit vector of the desired visit control flags. This will determine if the objects referenced by the referree should be visited or if the entire iteration should be aborted.

See the heap callback function restrictions.

Parameters
Name | Type | Description
reference_kind | jvmtiHeapReferenceKind | The kind of reference.
reference_info | const jvmtiHeapReferenceInfo * | Details about the reference. Set when the reference_kind is JVMTI_HEAP_REFERENCE_FIELD, JVMTI_HEAP_REFERENCE_STATIC_FIELD, JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT, JVMTI_HEAP_REFERENCE_CONSTANT_POOL, JVMTI_HEAP_REFERENCE_STACK_LOCAL, or JVMTI_HEAP_REFERENCE_JNI_LOCAL. Otherwise NULL.
class_tag | jlong | The tag of the class of referree object (zero if the class is not tagged). If the referree object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
referrer_class_tag | jlong | The tag of the class of the referrer object (zero if the class is not tagged or the referree is a heap root). If the referrer object represents a runtime class, the referrer_class_tag is the tag associated with the java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the referree object (in bytes). See GetObjectSize.
tag_ptr | jlong* | Points to the referree object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
referrer_tag_ptr | jlong* | Points to the tag of the referrer object, or points to the zero if the referrer object is not tagged. NULL if the referrer in not an object (that is, this callback is reporting a heap root). To set the tag value to be associated with the referrer object the agent sets the jlong pointed to by the parameter. If this callback is reporting a reference from an object to itself, referrer_tag_ptr == tag_ptr.
length | jint | If this object is an array, the length of the array. Otherwise negative one (-1).
user_data | void* | The user supplied data that was passed into the iteration function.

Primitive Field Callback

typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
    (jvmtiHeapReferenceKind kind,
     const jvmtiHeapReferenceInfo* info,
     jlong object_class_tag,
     jlong* object_tag_ptr,
     jvalue value,
     jvmtiPrimitiveType value_type,
     void* user_data);
Agent supplied callback function which describes a primitive field of an object (the object). A primitive field is a field whose type is a primitive type. This callback will describe a static field if the object is a class, and otherwise will describe an instance field.

This function should return a bit vector of the desired visit control flags. This will determine if the entire iteration should be aborted (the JVMTI_VISIT_OBJECTS flag is ignored).

See the heap callback function restrictions.

Parameters
Name | Type | Description
kind | jvmtiHeapReferenceKind | The kind of field -- instance or static (JVMTI_HEAP_REFERENCE_FIELD or JVMTI_HEAP_REFERENCE_STATIC_FIELD).
info | const jvmtiHeapReferenceInfo * | Which field (the field index).
object_class_tag | jlong | The tag of the class of the object (zero if the class is not tagged). If the object represents a runtime class, the object_class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
object_tag_ptr | jlong* | Points to the tag of the object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
value | jvalue | The value of the field.
value_type | jvmtiPrimitiveType | The type of the field.
user_data | void* | The user supplied data that was passed into the iteration function.

Array Primitive Value Callback

typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
    (jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     jint element_count,
     jvmtiPrimitiveType element_type,
     const void* elements,
     void* user_data);
Agent supplied callback function. Describes the values in an array of a primitive type.

This function should return a bit vector of the desired visit control flags. This will determine if the entire iteration should be aborted (the JVMTI_VISIT_OBJECTS flag is ignored).

See the heap callback function restrictions.

Parameters
Name | Type | Description
class_tag | jlong | The tag of the class of the array object (zero if the class is not tagged).
size | jlong | Size of the array (in bytes). See GetObjectSize.
tag_ptr | jlong* | Points to the tag of the array object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
element_count | jint | The length of the primitive array.
element_type | jvmtiPrimitiveType | The type of the elements of the array.
elements | const void* | The elements of the array in a packed array of element_count items of element_type size each.
user_data | void* | The user supplied data that was passed into the iteration function.

String Primitive Value Callback

typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
    (jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     const jchar* value,
     jint value_length,
     void* user_data);
Agent supplied callback function. Describes the value of a java.lang.String.

This function should return a bit vector of the desired visit control flags. This will determine if the entire iteration should be aborted (the JVMTI_VISIT_OBJECTS flag is ignored).

See the heap callback function restrictions.

Parameters
Name | Type | Description
class_tag | jlong | The tag of the class of the String class (zero if the class is not tagged).
size | jlong | Size of the string (in bytes). See GetObjectSize.
tag_ptr | jlong* | Points to the tag of the String object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
value | const jchar* | The value of the String, encoded as a Unicode string.
value_length | jint | The length of the string. The length is equal to the number of 16-bit Unicode characters in the string.
user_data | void* | The user supplied data that was passed into the iteration function.

reserved for future use Callback

typedef jint (JNICALL *jvmtiReservedCallback)
    ();
Placeholder -- reserved for future use.

Parameters
Name Type Description

Follow References

jvmtiError
FollowReferences(jvmtiEnv* env,
            jint heap_filter,
            jclass klass,
            jobject initial_object,
            const jvmtiHeapCallbacks* callbacks,
            const void* user_data)
This function initiates a traversal over the objects that are directly and indirectly reachable from the specified object or, if initial_object is not specified, all objects reachable from the heap roots. The heap root are the set of system classes, JNI globals, references from thread stacks, and other objects used as roots for the purposes of garbage collection.

This function operates by traversing the reference graph. Let A, B, ... represent objects. When a reference from A to B is traversed, when a reference from a heap root to B is traversed, or when B is specified as the initial_object, then B is said to be visited. A reference from A to B is not traversed until A is visited. References are reported in the same order that the references are traversed. Object references are reported by invoking the agent supplied callback function jvmtiHeapReferenceCallback. In a reference from A to B, A is known as the referrer and B as the referree. The callback is invoked exactly once for each reference from a referrer; this is true even if there are reference cycles or multiple paths to the referrer. There may be more than one reference between a referrer and a referree, each reference is reported. These references may be distinguished by examining the reference_kind and reference_info parameters of the jvmtiHeapReferenceCallback callback.

This function reports a Java programming language view of object references, not a virtual machine implementation view. The following object references are reported when they are non-null:
  • Instance objects report references to each non-primitive instance fields (including inherited fields).
  • Instance objects report a reference to the object type (class).
  • Classes report a reference to the superclass and directly implemented/extended interfaces.
  • Classes report a reference to the class loader, protection domain, signers, and resolved entries in the constant pool.
  • Classes report a reference to each directly declared non-primitive static field.
  • Arrays report a reference to the array type (class) and each array element.
  • Primitive arrays report a reference to the array type.

This function can also be used to examine primitive (non-object) values. The primitive value of an array or String is reported after the object has been visited; it is reported by invoking the agent supplied callback function jvmtiArrayPrimitiveValueCallback or jvmtiStringPrimitiveValueCallback. A primitive field is reported after the object with that field is visited; it is reported by invoking the agent supplied callback function jvmtiPrimitiveFieldCallback.

Whether a callback is provided or is NULL only determines whether the callback will be invoked, it does not influence which objects are visited nor does it influence whether other callbacks will be invoked. However, the visit control flags returned by jvmtiHeapReferenceCallback do determine if the objects referenced by the current object as visited. The heap filter flags and klass provided as parameters to this function do not control which objects are visited but they do control which objects and primitive values are reported by the callbacks. For example, if the only callback that was set is array_primitive_value_callback and klass is set to the array of bytes class, then only arrays of byte will be reported. The table below summarizes this:

 | Controls objects visited | Controls objects reported | Controls primitives reported
the Heap Visit Control Flags returned by jvmtiHeapReferenceCallback | Yes | Yes, since visits are controlled | Yes, since visits are controlled
array_primitive_value_callback in callbacks set | No | Yes | No
heap_filter | No | Yes | Yes
klass | No | Yes | Yes

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 115 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
heap_filter | jint | This bit vector of heap filter flags. restricts the objects for which the callback function is called. This applies to both the object and primitive callbacks.
klass | jclass | Callbacks are only reported when the object is an instance of this class. Objects which are instances of a subclass of klass are not reported. If klass is an interface, no objects are reported. This applies to both the object and primitive callbacks. If klass is NULL, callbacks are not limited to instances of a particular class.
initial_object | jobject | The object to follow If initial_object is NULL, references are followed from the heap roots.
callbacks | const jvmtiHeapCallbacks * | Structure defining the set of callback functions. Agent passes in a pointer to jvmtiHeapCallbacks.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_CLASS | klass is not a valid class.
JVMTI_ERROR_INVALID_OBJECT | initial_object is not a valid object.
JVMTI_ERROR_NULL_POINTER | callbacks is NULL.

Iterate Through Heap

jvmtiError
IterateThroughHeap(jvmtiEnv* env,
            jint heap_filter,
            jclass klass,
            const jvmtiHeapCallbacks* callbacks,
            const void* user_data)
Initiate an iteration over all objects in the heap. This includes both reachable and unreachable objects. Objects are visited in no particular order.

Heap objects are reported by invoking the agent supplied callback function jvmtiHeapIterationCallback. References between objects are not reported. If only reachable objects are desired, or if object reference information is needed, use FollowReferences.

This function can also be used to examine primitive (non-object) values. The primitive value of an array or String is reported after the object has been visited; it is reported by invoking the agent supplied callback function jvmtiArrayPrimitiveValueCallback or jvmtiStringPrimitiveValueCallback. A primitive field is reported after the object with that field is visited; it is reported by invoking the agent supplied callback function jvmtiPrimitiveFieldCallback.

Unless the iteration is aborted by the Heap Visit Control Flags returned by a callback, all objects in the heap are visited. Whether a callback is provided or is NULL only determines whether the callback will be invoked, it does not influence which objects are visited nor does it influence whether other callbacks will be invoked. The heap filter flags and klass provided as parameters to this function do not control which objects are visited but they do control which objects and primitive values are reported by the callbacks. For example, if the only callback that was set is array_primitive_value_callback and klass is set to the array of bytes class, then only arrays of byte will be reported. The table below summarizes this (contrast this with FollowReferences):

 | Controls objects visited | Controls objects reported | Controls primitives reported
the Heap Visit Control Flags returned by jvmtiHeapIterationCallback | No (unless they abort the iteration) | No (unless they abort the iteration) | No (unless they abort the iteration)
array_primitive_value_callback in callbacks set | No | Yes | No
heap_filter | No | Yes | Yes
klass | No | Yes | Yes

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 116 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
heap_filter | jint | This bit vector of heap filter flags. restricts the objects for which the callback function is called. This applies to both the object and primitive callbacks.
klass | jclass | Callbacks are only reported when the object is an instance of this class. Objects which are instances of a subclass of klass are not reported. If klass is an interface, no objects are reported. This applies to both the object and primitive callbacks. If klass is NULL, callbacks are not limited to instances of a particular class.
callbacks | const jvmtiHeapCallbacks * | Structure defining the set callback functions. Agent passes in a pointer to jvmtiHeapCallbacks.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_CLASS | klass is not a valid class.
JVMTI_ERROR_NULL_POINTER | callbacks is NULL.

Get Tag

jvmtiError
GetTag(jvmtiEnv* env,
            jobject object,
            jlong* tag_ptr)
Retrieve the tag associated with an object. The tag is a long value typically used to store a unique identifier or pointer to object information. The tag is set with SetTag. Objects for which no tags have been set return a tag value of zero.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 106 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
object | jobject | The object whose tag is to be retrieved.
tag_ptr | jlong* | On return, the referenced long is set to the value of the tag. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_OBJECT | object is not an object.
JVMTI_ERROR_NULL_POINTER | tag_ptr is NULL.

Set Tag

jvmtiError
SetTag(jvmtiEnv* env,
            jobject object,
            jlong tag)
Set the tag associated with an object. The tag is a long value typically used to store a unique identifier or pointer to object information. The tag is visible with GetTag.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 107 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
object | jobject | The object whose tag is to be set.
tag | jlong | The new value of the tag.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_OBJECT | object is not an object.

Get Objects With Tags

jvmtiError
GetObjectsWithTags(jvmtiEnv* env,
            jint tag_count,
            const jlong* tags,
            jint* count_ptr,
            jobject** object_result_ptr,
            jlong** tag_result_ptr)
Return objects in the heap with the specified tags. The format is parallel arrays of objects and tags.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 114 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
tag_count | jint | Number of tags to scan for.
tags | const jlong * | Scan for objects with these tags. Zero is not permitted in this array. Agent passes in an array of tag_count elements of jlong.
count_ptr | jint * | Return the number of objects with any of the tags in tags. Agent passes a pointer to a jint. On return, the jint has been set.
object_result_ptr | jobject ** | Returns the array of objects with any of the tags in tags. Agent passes a pointer to a jobject*. On return, the jobject* points to a newly allocated array of size *count_ptr. The array should be freed with Deallocate. If object_result_ptr is NULL, this information is not returned. The objects returned by object_result_ptr are JNI local references and must be managed.
tag_result_ptr | jlong ** | For each object in object_result_ptr, return the tag at the corresponding index. Agent passes a pointer to a jlong*. On return, the jlong* points to a newly allocated array of size *count_ptr. The array should be freed with Deallocate. If tag_result_ptr is NULL, this information is not returned.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_ILLEGAL_ARGUMENT | Zero is present in tags.
JVMTI_ERROR_ILLEGAL_ARGUMENT | tag_count is less than 0.
JVMTI_ERROR_NULL_POINTER | tags is NULL.
JVMTI_ERROR_NULL_POINTER | count_ptr is NULL.

Force Garbage Collection

jvmtiError
ForceGarbageCollection(jvmtiEnv* env)
Force the VM to perform a garbage collection. The garbage collection is as complete as possible. This function does not cause finalizers to be run. This function does not return until the garbage collection is finished.

Although garbage collection is as complete as possible there is no guarantee that all ObjectFree events will have been sent by the time that this function returns. In particular, an object may be prevented from being freed because it is awaiting finalization.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 108 | 1.0

Capabilities
Required Functionality

Parameters
Name Type Description

Errors
This function returns a universal error

Heap (1.0)

Heap (1.0) functions:
  • Iterate Over Objects Reachable From Object
  • Iterate Over Reachable Objects
  • Iterate Over Heap
  • Iterate Over Instances Of Class
Heap (1.0) function types:
  • Heap Object Callback
  • Heap Root Object Callback
  • Stack Reference Object Callback
  • Object Reference Callback
Heap (1.0) types:
  • jvmtiHeapObjectFilter - Heap Object Filter Enumeration
  • jvmtiHeapRootKind - Heap Root Kind Enumeration
  • jvmtiObjectReferenceKind - Object Reference Enumeration
  • jvmtiIterationControl - Iteration Control Enumeration
These functions and data types were introduced in the original JVM TI version 1.0 and have been superseded by more powerful and flexible versions which:
  • Allow access to primitive values (the value of Strings, arrays, and primitive fields)
  • Allow the tag of the referrer to be set, thus enabling more efficient localized reference graph building
  • Provide more extensive filtering abilities
  • Are extensible, allowing their abilities to grow in future versions of JVM TI

Please use the current Heap functions.

Heap Object Filter Enumeration (jvmtiHeapObjectFilter)
Constant | Value | Description
JVMTI_HEAP_OBJECT_TAGGED | 1 | Tagged objects only.
JVMTI_HEAP_OBJECT_UNTAGGED | 2 | Untagged objects only.
JVMTI_HEAP_OBJECT_EITHER | 3 | Either tagged or untagged objects.
Heap Root Kind Enumeration (jvmtiHeapRootKind)
Constant | Value | Description
JVMTI_HEAP_ROOT_JNI_GLOBAL | 1 | JNI global reference.
JVMTI_HEAP_ROOT_SYSTEM_CLASS | 2 | System class.
JVMTI_HEAP_ROOT_MONITOR | 3 | Monitor.
JVMTI_HEAP_ROOT_STACK_LOCAL | 4 | Stack local.
JVMTI_HEAP_ROOT_JNI_LOCAL | 5 | JNI local reference.
JVMTI_HEAP_ROOT_THREAD | 6 | Thread.
JVMTI_HEAP_ROOT_OTHER | 7 | Other.
Object Reference Enumeration (jvmtiObjectReferenceKind)
Constant | Value | Description
JVMTI_REFERENCE_CLASS | 1 | Reference from an object to its class.
JVMTI_REFERENCE_FIELD | 2 | Reference from an object to the value of one of its instance fields. For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the index of the the instance field. The index is based on the order of all the object's fields. This includes all fields of the directly declared static and instance fields in the class, and includes all fields (both public and private) fields declared in superclasses and superinterfaces. The index is thus calculated by summing the index of the field in the directly declared class (see GetClassFields), with the total number of fields (both public and private) declared in all superclasses and superinterfaces. The index starts at zero.
JVMTI_REFERENCE_ARRAY_ELEMENT | 3 | Reference from an array to one of its elements. For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the array index.
JVMTI_REFERENCE_CLASS_LOADER | 4 | Reference from a class to its class loader.
JVMTI_REFERENCE_SIGNERS | 5 | Reference from a class to its signers array.
JVMTI_REFERENCE_PROTECTION_DOMAIN | 6 | Reference from a class to its protection domain.
JVMTI_REFERENCE_INTERFACE | 7 | Reference from a class to one of its interfaces.
JVMTI_REFERENCE_STATIC_FIELD 8 Reference from a class to the value of one of its static fields. For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the index of the the static field. The index is based on the order of all the object's fields. This includes all fields of the directly declared static and instance fields in the class, and includes all fields (both public and private) fields declared in superclasses and superinterfaces. The index is thus calculated by summing the index of the field in the directly declared class (see GetClassFields), with the total number of fields (both public and private) declared in all superclasses and superinterfaces. The index starts at zero. Note: this definition differs from that in the JVM TI 1.0 Specification.

Rationale: No known implementations used the 1.0 definition.
JVMTI_REFERENCE_CONSTANT_POOL | 9 | Reference from a class to a resolved entry in the constant pool. For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the index into constant pool table of the class, starting at 1. See The Java™ Virtual Machine Specification, Chapter 4.4.
Iteration Control Enumeration (jvmtiIterationControl)
Constant | Value | Description
JVMTI_ITERATION_CONTINUE | 1 | Continue the iteration. If this is a reference iteration, follow the references of this object.
JVMTI_ITERATION_IGNORE | 2 | Continue the iteration. If this is a reference iteration, ignore the references of this object.
JVMTI_ITERATION_ABORT | 0 | Abort the iteration.

Heap Object Callback

typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
    (jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     void* user_data);
Agent supplied callback function. Describes (but does not pass in) an object in the heap.

Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, or JVMTI_ITERATION_ABORT to stop iteration.

See the heap callback function restrictions.

Parameters
Name | Type | Description
class_tag | jlong | The tag of the class of object (zero if the class is not tagged). If the object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the object (in bytes). See GetObjectSize.
tag_ptr | jlong* | The object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
user_data | void* | The user supplied data that was passed into the iteration function.

Heap Root Object Callback

typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
    (jvmtiHeapRootKind root_kind,
     jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     void* user_data);
Agent supplied callback function. Describes (but does not pass in) an object that is a root for the purposes of garbage collection.

Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, JVMTI_ITERATION_IGNORE to continue iteration without pursuing references from referree object or JVMTI_ITERATION_ABORT to stop iteration.

See the heap callback function restrictions.

Parameters
Name | Type | Description
root_kind | jvmtiHeapRootKind | The kind of heap root.
class_tag | jlong | The tag of the class of object (zero if the class is not tagged). If the object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the object (in bytes). See GetObjectSize.
tag_ptr | jlong* | The object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
user_data | void* | The user supplied data that was passed into the iteration function.

Stack Reference Object Callback

typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
    (jvmtiHeapRootKind root_kind,
     jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     jlong thread_tag,
     jint depth,
     jmethodID method,
     jint slot,
     void* user_data);
Agent supplied callback function. Describes (but does not pass in) an object on the stack that is a root for the purposes of garbage collection.

Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, JVMTI_ITERATION_IGNORE to continue iteration without pursuing references from referree object or JVMTI_ITERATION_ABORT to stop iteration.

See the heap callback function restrictions.

Parameters
Name | Type | Description
root_kind | jvmtiHeapRootKind | The kind of root (either JVMTI_HEAP_ROOT_STACK_LOCAL or JVMTI_HEAP_ROOT_JNI_LOCAL).
class_tag | jlong | The tag of the class of object (zero if the class is not tagged). If the object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the object (in bytes). See GetObjectSize.
tag_ptr | jlong* | The object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
thread_tag | jlong | The tag of the thread corresponding to this stack, zero if not tagged.
depth | jint | The depth of the frame.
method | jmethodID | The method executing in this frame.
slot | jint | The slot number.
user_data | void* | The user supplied data that was passed into the iteration function.

Object Reference Callback

typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
    (jvmtiObjectReferenceKind reference_kind,
     jlong class_tag,
     jlong size,
     jlong* tag_ptr,
     jlong referrer_tag,
     jint referrer_index,
     void* user_data);
Agent supplied callback function. Describes a reference from an object (the referrer) to another object (the referree).

Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, JVMTI_ITERATION_IGNORE to continue iteration without pursuing references from referree object or JVMTI_ITERATION_ABORT to stop iteration.

See the heap callback function restrictions.

Parameters
Name | Type | Description
reference_kind | jvmtiObjectReferenceKind | The type of reference.
class_tag | jlong | The tag of the class of referree object (zero if the class is not tagged). If the referree object represents a runtime class, the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged).
size | jlong | Size of the referree object (in bytes). See GetObjectSize.
tag_ptr | jlong* | The referree object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter.
referrer_tag | jlong | The tag of the referrer object, or zero if the referrer object is not tagged.
referrer_index | jint | For references of type JVMTI_REFERENCE_FIELD or JVMTI_REFERENCE_STATIC_FIELD the index of the field in the referrer object. The index is based on the order of all the object's fields - see JVMTI_REFERENCE_FIELD or JVMTI_REFERENCE_STATIC_FIELD for further description. For references of type JVMTI_REFERENCE_ARRAY_ELEMENT the array index - see JVMTI_REFERENCE_ARRAY_ELEMENT for further description. For references of type JVMTI_REFERENCE_CONSTANT_POOL the index into the constant pool of the class - see JVMTI_REFERENCE_CONSTANT_POOL for further description. For references of other kinds the referrer_index is -1.
user_data | void* | The user supplied data that was passed into the iteration function.

Iterate Over Objects Reachable From Object

jvmtiError
IterateOverObjectsReachableFromObject(jvmtiEnv* env,
            jobject object,
            jvmtiObjectReferenceCallback object_reference_callback,
            const void* user_data)
This function iterates over all objects that are directly and indirectly reachable from the specified object. For each object A (known as the referrer) with a reference to object B the specified callback function is called to describe the object reference. The callback is called exactly once for each reference from a referrer; this is true even if there are reference cycles or multiple paths to the referrer. There may be more than one reference between a referrer and a referree, These may be distinguished by the jvmtiObjectReferenceCallback.reference_kind and jvmtiObjectReferenceCallback.referrer_index. The callback for an object will always occur after the callback for its referrer.

See FollowReferences for the object references which are reported.

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 109 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
object | jobject | The object
object_reference_callback | jvmtiObjectReferenceCallback | The callback to be called to describe each object reference.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_OBJECT | object is not an object.
JVMTI_ERROR_NULL_POINTER | object_reference_callback is NULL.

Iterate Over Reachable Objects

jvmtiError
IterateOverReachableObjects(jvmtiEnv* env,
            jvmtiHeapRootCallback heap_root_callback,
            jvmtiStackReferenceCallback stack_ref_callback,
            jvmtiObjectReferenceCallback object_ref_callback,
            const void* user_data)
This function iterates over the root objects and all objects that are directly and indirectly reachable from the root objects. The root objects comprise the set of system classes, JNI globals, references from thread stacks, and other objects used as roots for the purposes of garbage collection.

For each root the heap_root_callback or stack_ref_callback callback is called. An object can be a root object for more than one reason and in that case the appropriate callback is called for each reason.

For each object reference the object_ref_callback callback function is called to describe the object reference. The callback is called exactly once for each reference from a referrer; this is true even if there are reference cycles or multiple paths to the referrer. There may be more than one reference between a referrer and a referree, These may be distinguished by the jvmtiObjectReferenceCallback.reference_kind and jvmtiObjectReferenceCallback.referrer_index. The callback for an object will always occur after the callback for its referrer.

See FollowReferences for the object references which are reported.

Roots are always reported to the profiler before any object references are reported. In other words, the object_ref_callback callback will not be called until the appropriate callback has been called for all roots. If the object_ref_callback callback is specified as NULL then this function returns after reporting the root objects to the profiler.

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 110 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
heap_root_callback | jvmtiHeapRootCallback | The callback function to be called for each heap root of type JVMTI_HEAP_ROOT_JNI_GLOBAL, JVMTI_HEAP_ROOT_SYSTEM_CLASS, JVMTI_HEAP_ROOT_MONITOR, JVMTI_HEAP_ROOT_THREAD, or JVMTI_HEAP_ROOT_OTHER. If heap_root_callback is NULL, do not report heap roots.
stack_ref_callback | jvmtiStackReferenceCallback | The callback function to be called for each heap root of JVMTI_HEAP_ROOT_STACK_LOCAL or JVMTI_HEAP_ROOT_JNI_LOCAL. If stack_ref_callback is NULL, do not report stack references.
object_ref_callback | jvmtiObjectReferenceCallback | The callback function to be called for each object reference. If object_ref_callback is NULL, do not follow references from the root objects.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.

Iterate Over Heap

jvmtiError
IterateOverHeap(jvmtiEnv* env,
            jvmtiHeapObjectFilter object_filter,
            jvmtiHeapObjectCallback heap_object_callback,
            const void* user_data)
Iterate over all objects in the heap. This includes both reachable and unreachable objects.

The object_filter parameter indicates the objects for which the callback function is called. If this parameter is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be called for every object that is tagged. If the parameter is JVMTI_HEAP_OBJECT_UNTAGGED then the callback will only be for objects that are not tagged. If the parameter is JVMTI_HEAP_OBJECT_EITHER then the callback will be called for every object in the heap, irrespective of whether it is tagged or not.

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 111 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
object_filter | jvmtiHeapObjectFilter | Indicates the objects for which the callback function is called.
heap_object_callback | jvmtiHeapObjectCallback | The iterator function to be called for each object matching the object_filter.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_ILLEGAL_ARGUMENT | object_filter is not a jvmtiHeapObjectFilter.
JVMTI_ERROR_NULL_POINTER | heap_object_callback is NULL.

Iterate Over Instances Of Class

jvmtiError
IterateOverInstancesOfClass(jvmtiEnv* env,
            jclass klass,
            jvmtiHeapObjectFilter object_filter,
            jvmtiHeapObjectCallback heap_object_callback,
            const void* user_data)
Iterate over all objects in the heap that are instances of the specified class. This includes direct instances of the specified class and instances of all subclasses of the specified class. This includes both reachable and unreachable objects.

The object_filter parameter indicates the objects for which the callback function is called. If this parameter is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be called for every object that is tagged. If the parameter is JVMTI_HEAP_OBJECT_UNTAGGED then the callback will only be called for objects that are not tagged. If the parameter is JVMTI_HEAP_OBJECT_EITHER then the callback will be called for every object in the heap, irrespective of whether it is tagged or not.

During the execution of this function the state of the heap does not change: no objects are allocated, no objects are garbage collected, and the state of objects (including held values) does not change. As a result, threads executing Java programming language code, threads attempting to resume the execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 112 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_tag_objects | Can set and get tags, as described in the Heap category.

Parameters
Name | Type | Description
klass | jclass | Iterate over objects of this class only.
object_filter | jvmtiHeapObjectFilter | Indicates the objects for which the callback function is called.
heap_object_callback | jvmtiHeapObjectCallback | The iterator function to be called for each klass instance matching the object_filter.
user_data | const void * | User supplied data to be passed to the callback. Agent passes in a pointer. If user_data is NULL, NULL is passed as the user supplied data.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_tag_objects. Use AddCapabilities.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_ILLEGAL_ARGUMENT | object_filter is not a jvmtiHeapObjectFilter.
JVMTI_ERROR_NULL_POINTER | heap_object_callback is NULL.

Local Variable

Local Variable functions:
  • Get Local Variable - Object
  • Get Local Instance
  • Get Local Variable - Int
  • Get Local Variable - Long
  • Get Local Variable - Float
  • Get Local Variable - Double
  • Set Local Variable - Object
  • Set Local Variable - Int
  • Set Local Variable - Long
  • Set Local Variable - Float
  • Set Local Variable - Double
These functions are used to retrieve or set the value of a local variable. The variable is identified by the depth of the frame containing its value and the variable's slot number within that frame. The mapping of variables to slot numbers can be obtained with the function GetLocalVariableTable.

Get Local Variable - Object

jvmtiError
GetLocalObject(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jobject* value_ptr)
This function can be used to retrieve the value of a local variable whose type is Object or a subclass of Object.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 21 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value_ptr | jobject* | On return, points to the variable's value. Agent passes a pointer to a jobject. On return, the jobject has been set. The object returned by value_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not Object or a subclass of Object.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Get Local Instance

jvmtiError
GetLocalInstance(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jobject* value_ptr)
This function can be used to retrieve the value of the local object variable at slot 0 (the "this" object) from non-static frames. This function can retrieve the "this" object from native method frames, whereas GetLocalObject() would return JVMTI_ERROR_OPAQUE_FRAME in those cases.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 155 | 1.2

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
value_ptr | jobject* | On return, points to the variable's value. Agent passes a pointer to a jobject. On return, the jobject has been set. The object returned by value_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | If the specified frame is a static method frame.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Get Local Variable - Int

jvmtiError
GetLocalInt(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jint* value_ptr)
This function can be used to retrieve the value of a local variable whose type is int, short, char, byte, or boolean.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 22 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value_ptr | jint* | On return, points to the variable's value. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not int, short, char, byte, or boolean.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Get Local Variable - Long

jvmtiError
GetLocalLong(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jlong* value_ptr)
This function can be used to retrieve the value of a local variable whose type is long.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 23 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value_ptr | jlong* | On return, points to the variable's value. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not long.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Get Local Variable - Float

jvmtiError
GetLocalFloat(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jfloat* value_ptr)
This function can be used to retrieve the value of a local variable whose type is float.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 24 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value_ptr | jfloat* | On return, points to the variable's value. Agent passes a pointer to a jfloat. On return, the jfloat has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not float.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Get Local Variable - Double

jvmtiError
GetLocalDouble(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jdouble* value_ptr)
This function can be used to retrieve the value of a local variable whose type is long.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 25 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value_ptr | jdouble* | On return, points to the variable's value. Agent passes a pointer to a jdouble. On return, the jdouble has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not double.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Set Local Variable - Object

jvmtiError
SetLocalObject(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jobject value)
This function can be used to set the value of a local variable whose type is Object or a subclass of Object.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 26 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value | jobject | The new value for the variable.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not Object or a subclass of Object.
JVMTI_ERROR_TYPE_MISMATCH | The supplied value is not compatible with the variable type.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.
JVMTI_ERROR_INVALID_OBJECT | value is not an object.

Set Local Variable - Int

jvmtiError
SetLocalInt(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jint value)
This function can be used to set the value of a local variable whose type is int, short, char, byte, or boolean.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 27 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value | jint | The new value for the variable.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not int, short, char, byte, or boolean.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.

Set Local Variable - Long

jvmtiError
SetLocalLong(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jlong value)
This function can be used to set the value of a local variable whose type is long.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 28 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value | jlong | The new value for the variable.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not long.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.

Set Local Variable - Float

jvmtiError
SetLocalFloat(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jfloat value)
This function can be used to set the value of a local variable whose type is float.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 29 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value | jfloat | The new value for the variable.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not float.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.

Set Local Variable - Double

jvmtiError
SetLocalDouble(jvmtiEnv* env,
            jthread thread,
            jint depth,
            jint slot,
            jdouble value)
This function can be used to set the value of a local variable whose type is double.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 30 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

Parameters
Name | Type | Description
thread | jthread | The thread of the frame containing the variable's value. If thread is NULL, the current thread is used.
depth | jint | The depth of the frame containing the variable's value.
slot | jint | The variable's slot number.
value | jdouble | The new value for the variable.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_INVALID_SLOT | Invalid slot.
JVMTI_ERROR_TYPE_MISMATCH | The variable type is not double.
JVMTI_ERROR_OPAQUE_FRAME | Not a visible frame
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | depth is less than zero.
JVMTI_ERROR_NO_MORE_FRAMES | There are no stack frames at the specified depth.

Breakpoint

Breakpoint functions:
  • Set Breakpoint
  • Clear Breakpoint

Set Breakpoint

jvmtiError
SetBreakpoint(jvmtiEnv* env,
            jmethodID method,
            jlocation location)
Set a breakpoint at the instruction indicated by method and location. An instruction can only have one breakpoint.

Whenever the designated instruction is about to be executed, a Breakpoint event is generated.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 38 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_breakpoint_events | Can set and thus get Breakpoint events

Parameters
Name | Type | Description
method | jmethodID | The method in which to set the breakpoint
location | jlocation | the index of the instruction at which to set the breakpoint

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_breakpoint_events. Use AddCapabilities.
JVMTI_ERROR_DUPLICATE | The designated bytecode already has a breakpoint.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_INVALID_LOCATION | location is not a valid location.

Clear Breakpoint

jvmtiError
ClearBreakpoint(jvmtiEnv* env,
            jmethodID method,
            jlocation location)
Clear the breakpoint at the bytecode indicated by method and location.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 39 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_breakpoint_events | Can set and thus get Breakpoint events

Parameters
Name | Type | Description
method | jmethodID | The method in which to clear the breakpoint
location | jlocation | the index of the instruction at which to clear the breakpoint

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_breakpoint_events. Use AddCapabilities.
JVMTI_ERROR_NOT_FOUND | There's no breakpoint at the designated bytecode.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_INVALID_LOCATION | location is not a valid location.

Watched Field

Watched Field functions:
  • Set Field Access Watch
  • Clear Field Access Watch
  • Set Field Modification Watch
  • Clear Field Modification Watch

Set Field Access Watch

jvmtiError
SetFieldAccessWatch(jvmtiEnv* env,
            jclass klass,
            jfieldID field)
Generate a FieldAccess event when the field specified by klass and field is about to be accessed. An event will be generated for each access of the field until it is canceled with ClearFieldAccessWatch. Field accesses from Java programming language code or from JNI code are watched, fields modified by other means are not watched. Note that JVM TI users should be aware that their own field accesses will trigger the watch. A field can only have one field access watch set. Modification of a field is not considered an access--use SetFieldModificationWatch to monitor modifications.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 41 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_field_access_events | Can set watchpoints on field access - SetFieldAccessWatch

Parameters
Name | Type | Description
klass | jclass | The class containing the field to watch
field | jfieldID | The field to watch

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_field_access_events. Use AddCapabilities.
JVMTI_ERROR_DUPLICATE | The designated field is already being watched for accesses.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.

Clear Field Access Watch

jvmtiError
ClearFieldAccessWatch(jvmtiEnv* env,
            jclass klass,
            jfieldID field)
Cancel a field access watch previously set by SetFieldAccessWatch, on the field specified by klass and field.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 42 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_field_access_events | Can set watchpoints on field access - SetFieldAccessWatch

Parameters
Name | Type | Description
klass | jclass | The class containing the field to watch
field | jfieldID | The field to watch

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_field_access_events. Use AddCapabilities.
JVMTI_ERROR_NOT_FOUND | The designated field is not being watched for accesses.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.

Set Field Modification Watch

jvmtiError
SetFieldModificationWatch(jvmtiEnv* env,
            jclass klass,
            jfieldID field)
Generate a FieldModification event when the field specified by klass and field is about to be modified. An event will be generated for each modification of the field until it is canceled with ClearFieldModificationWatch. Field modifications from Java programming language code or from JNI code are watched, fields modified by other means are not watched. Note that JVM TI users should be aware that their own field modifications will trigger the watch. A field can only have one field modification watch set.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 43 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_field_modification_events | Can set watchpoints on field modification - SetFieldModificationWatch

Parameters
Name | Type | Description
klass | jclass | The class containing the field to watch
field | jfieldID | The field to watch

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_field_modification_events. Use AddCapabilities.
JVMTI_ERROR_DUPLICATE | The designated field is already being watched for modifications.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.

Clear Field Modification Watch

jvmtiError
ClearFieldModificationWatch(jvmtiEnv* env,
            jclass klass,
            jfieldID field)
Cancel a field modification watch previously set by SetFieldModificationWatch, on the field specified by klass and field.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 44 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_generate_field_modification_events | Can set watchpoints on field modification - SetFieldModificationWatch

Parameters
Name | Type | Description
klass | jclass | The class containing the field to watch
field | jfieldID | The field to watch

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_generate_field_modification_events. Use AddCapabilities.
JVMTI_ERROR_NOT_FOUND | The designated field is not being watched for modifications.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.

Class

Class functions:
  • Get Loaded Classes
  • Get Classloader Classes
  • Get Class Signature
  • Get Class Status
  • Get Source File Name
  • Get Class Modifiers
  • Get Class Methods
  • Get Class Fields
  • Get Implemented Interfaces
  • Get Class Version Numbers
  • Get Constant Pool
  • Is Interface
  • Is Array Class
  • Is Modifiable Class
  • Get Class Loader
  • Get Source Debug Extension
  • Retransform Classes
  • Redefine Classes
Class types:
  • jvmtiClassDefinition - Class redefinition description
Class flags and constants:
  • Class Status Flags

Get Loaded Classes

jvmtiError
GetLoadedClasses(jvmtiEnv* env,
            jint* class_count_ptr,
            jclass** classes_ptr)
Return an array of all classes loaded in the virtual machine. The number of classes in the array is returned via class_count_ptr, and the array itself via classes_ptr.

Array classes of all types (including arrays of primitive types) are included in the returned list. Primitive classes (for example, java.lang.Integer.TYPE) are not included in this list.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 78 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
class_count_ptr | jint* | On return, points to the number of classes. Agent passes a pointer to a jint. On return, the jint has been set.
classes_ptr | jclass** | On return, points to an array of references, one for each class. Agent passes a pointer to a jclass*. On return, the jclass* points to a newly allocated array of size *class_count_ptr. The array should be freed with Deallocate. The objects returned by classes_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | class_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | classes_ptr is NULL.

Get Classloader Classes

jvmtiError
GetClassLoaderClasses(jvmtiEnv* env,
            jobject initiating_loader,
            jint* class_count_ptr,
            jclass** classes_ptr)
Returns an array of those classes for which this class loader has been recorded as an initiating loader. Each class in the returned array was created by this class loader, either by defining it directly or by delegation to another class loader. See The Java™ Virtual Machine Specification, Chapter 5.3.

For JDK version 1.1 implementations that don't recognize the distinction between initiating and defining class loaders, this function should return all classes loaded in the virtual machine. The number of classes in the array is returned via class_count_ptr, and the array itself via classes_ptr.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 79 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
initiating_loader | jobject | An initiating class loader. If initiating_loader is NULL, the classes initiated by the bootstrap loader will be returned.
class_count_ptr | jint* | On return, points to the number of classes. Agent passes a pointer to a jint. On return, the jint has been set.
classes_ptr | jclass** | On return, points to an array of references, one for each class. Agent passes a pointer to a jclass*. On return, the jclass* points to a newly allocated array of size *class_count_ptr. The array should be freed with Deallocate. The objects returned by classes_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | class_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | classes_ptr is NULL.

Get Class Signature

jvmtiError
GetClassSignature(jvmtiEnv* env,
            jclass klass,
            char** signature_ptr,
            char** generic_ptr)
For the class indicated by klass, return the JNI type signature and the generic signature of the class. For example, java.util.List is "Ljava/util/List;" and int[] is "[I" The returned name for primitive classes is the type signature character of the corresponding primitive type. For example, java.lang.Integer.TYPE is "I".

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 48 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
signature_ptr | char ** | On return, points to the JNI type signature of the class, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If signature_ptr is NULL, the signature is not returned.
generic_ptr | char ** | On return, points to the generic signature of the class, encoded as a modified UTF-8 string. If there is no generic signature attribute for the class, then, on return, points to NULL. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If generic_ptr is NULL, the generic signature is not returned.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.

Get Class Status

jvmtiError
GetClassStatus(jvmtiEnv* env,
            jclass klass,
            jint* status_ptr)
Get the status of the class. Zero or more of the following bits can be set.
Class Status Flags
Constant | Value | Description
JVMTI_CLASS_STATUS_VERIFIED | 1 | Class bytecodes have been verified
JVMTI_CLASS_STATUS_PREPARED | 2 | Class preparation is complete
JVMTI_CLASS_STATUS_INITIALIZED | 4 | Class initialization is complete. Static initializer has been run.
JVMTI_CLASS_STATUS_ERROR | 8 | Error during initialization makes class unusable
JVMTI_CLASS_STATUS_ARRAY | 16 | Class is an array. If set, all other bits are zero.
JVMTI_CLASS_STATUS_PRIMITIVE | 32 | Class is a primitive class (for example, java.lang.Integer.TYPE). If set, all other bits are zero.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 49 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
status_ptr | jint* | On return, points to the current state of this class as one or more of the class status flags. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | status_ptr is NULL.

Get Source File Name

jvmtiError
GetSourceFileName(jvmtiEnv* env,
            jclass klass,
            char** source_name_ptr)
For the class indicated by klass, return the source file name via source_name_ptr. The returned string is a file name only and never contains a directory name.

For primitive classes (for example, java.lang.Integer.TYPE) and for arrays this function returns JVMTI_ERROR_ABSENT_INFORMATION.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 50 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_source_file_name | Can get the source file name of a class

Parameters
Name | Type | Description
klass | jclass | The class to query.
source_name_ptr | char** | On return, points to the class's source file name, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_source_file_name. Use AddCapabilities.
JVMTI_ERROR_ABSENT_INFORMATION | Class information does not include a source file name. This includes cases where the class is an array class or primitive class.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | source_name_ptr is NULL.

Get Class Modifiers

jvmtiError
GetClassModifiers(jvmtiEnv* env,
            jclass klass,
            jint* modifiers_ptr)
For the class indicated by klass, return the access flags via modifiers_ptr. Access flags are defined in The Java™ Virtual Machine Specification, Chapter 4.

If the class is an array class, then its public, private, and protected modifiers are the same as those of its component type. For arrays of primitives, this component type is represented by one of the primitive classes (for example, java.lang.Integer.TYPE).

If the class is a primitive class, its public modifier is always true, and its protected and private modifiers are always false.

If the class is an array class or a primitive class then its final modifier is always true and its interface modifier is always false. The values of its other modifiers are not determined by this specification.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 51 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
modifiers_ptr | jint* | On return, points to the current access flags of this class. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | modifiers_ptr is NULL.

Get Class Methods

jvmtiError
GetClassMethods(jvmtiEnv* env,
            jclass klass,
            jint* method_count_ptr,
            jmethodID** methods_ptr)
For the class indicated by klass, return a count of methods via method_count_ptr and a list of method IDs via methods_ptr. The method list contains constructors and static initializers as well as true methods. Only directly declared methods are returned (not inherited methods). An empty method list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE).

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 52 | 1.0

Capabilities
Required Functionality
Optional Features
Capability | Effect
can_maintain_original_method_order | Can return methods in the order they occur in the class file

Parameters
Name | Type | Description
klass | jclass | The class to query.
method_count_ptr | jint* | On return, points to the number of methods declared in this class. Agent passes a pointer to a jint. On return, the jint has been set.
methods_ptr | jmethodID** | On return, points to the method ID array. Agent passes a pointer to a jmethodID*. On return, the jmethodID* points to a newly allocated array of size *method_count_ptr. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_CLASS_NOT_PREPARED | klass is not prepared.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | method_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | methods_ptr is NULL.

Get Class Fields

jvmtiError
GetClassFields(jvmtiEnv* env,
            jclass klass,
            jint* field_count_ptr,
            jfieldID** fields_ptr)
For the class indicated by klass, return a count of fields via field_count_ptr and a list of field IDs via fields_ptr. Only directly declared fields are returned (not inherited fields). Fields are returned in the order they occur in the class file. An empty field list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE). Use JNI to determine the length of an array.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 53 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
field_count_ptr | jint* | On return, points to the number of fields declared in this class. Agent passes a pointer to a jint. On return, the jint has been set.
fields_ptr | jfieldID** | On return, points to the field ID array. Agent passes a pointer to a jfieldID*. On return, the jfieldID* points to a newly allocated array of size *field_count_ptr. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_CLASS_NOT_PREPARED | klass is not prepared.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | field_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | fields_ptr is NULL.

Get Implemented Interfaces

jvmtiError
GetImplementedInterfaces(jvmtiEnv* env,
            jclass klass,
            jint* interface_count_ptr,
            jclass** interfaces_ptr)
Return the direct super-interfaces of this class. For a class, this function returns the interfaces declared in its implements clause. For an interface, this function returns the interfaces declared in its extends clause. An empty interface list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE).

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 54 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
interface_count_ptr | jint* | On return, points to the number of interfaces. Agent passes a pointer to a jint. On return, the jint has been set.
interfaces_ptr | jclass** | On return, points to the interface array. Agent passes a pointer to a jclass*. On return, the jclass* points to a newly allocated array of size *interface_count_ptr. The array should be freed with Deallocate. The objects returned by interfaces_ptr are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_CLASS_NOT_PREPARED | klass is not prepared.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | interface_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | interfaces_ptr is NULL.

Get Class Version Numbers

jvmtiError
GetClassVersionNumbers(jvmtiEnv* env,
            jclass klass,
            jint* minor_version_ptr,
            jint* major_version_ptr)
For the class indicated by klass, return the minor and major version numbers, as defined in The Java™ Virtual Machine Specification, Chapter 4.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 145 | 1.1

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
minor_version_ptr | jint* | On return, points to the value of the minor_version item of the Class File Format. Note: to be consistent with the Class File Format, the minor version number is the first parameter. Agent passes a pointer to a jint. On return, the jint has been set.
major_version_ptr | jint* | On return, points to the value of the major_version item of the Class File Format. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ABSENT_INFORMATION | The class is a primitive or array class.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | minor_version_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | major_version_ptr is NULL.

Get Constant Pool

jvmtiError
GetConstantPool(jvmtiEnv* env,
            jclass klass,
            jint* constant_pool_count_ptr,
            jint* constant_pool_byte_count_ptr,
            unsigned char** constant_pool_bytes_ptr)
For the class indicated by klass, return the raw bytes of the constant pool in the format of the constant_pool item of The Java™ Virtual Machine Specification, Chapter 4. The format of the constant pool may differ between versions of the Class File Format, so, the minor and major class version numbers should be checked for compatibility.

The returned constant pool might not have the same layout or contents as the constant pool in the defining class file. The constant pool returned by GetConstantPool() may have more or fewer entries than the defining constant pool. Entries may be in a different order. The constant pool returned by GetConstantPool() will match the constant pool used by GetBytecodes(). That is, the bytecodes returned by GetBytecodes() will have constant pool indices which refer to constant pool entries returned by GetConstantPool(). Note that since RetransformClasses and RedefineClasses can change the constant pool, the constant pool returned by this function can change accordingly. Thus, the correspondence between GetConstantPool() and GetBytecodes() does not hold if there is an intervening class retransformation or redefinition. The value of a constant pool entry used by a given bytecode will match that of the defining class file (even if the indices don't match). Constant pool entries which are not used directly or indirectly by bytecodes (for example, UTF-8 strings associated with annotations) are not required to exist in the returned constant pool.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 146 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_constant_pool | Can get the constant pool of a class - GetConstantPool

Parameters
Name | Type | Description
klass | jclass | The class to query.
constant_pool_count_ptr | jint* | On return, points to the number of entries in the constant pool table plus one. This corresponds to the constant_pool_count item of the Class File Format. Agent passes a pointer to a jint. On return, the jint has been set.
constant_pool_byte_count_ptr | jint* | On return, points to the number of bytes in the returned raw constant pool. Agent passes a pointer to a jint. On return, the jint has been set.
constant_pool_bytes_ptr | unsigned char** | On return, points to the raw constant pool, that is the bytes defined by the constant_pool item of the Class File Format Agent passes a pointer to a unsigned char*. On return, the unsigned char* points to a newly allocated array of size *constant_pool_byte_count_ptr. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_constant_pool. Use AddCapabilities.
JVMTI_ERROR_ABSENT_INFORMATION | The class is a primitive or array class.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | constant_pool_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | constant_pool_byte_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | constant_pool_bytes_ptr is NULL.

Is Interface

jvmtiError
IsInterface(jvmtiEnv* env,
            jclass klass,
            jboolean* is_interface_ptr)
Determines whether a class object reference represents an interface. The jboolean result is JNI_TRUE if the "class" is actually an interface, JNI_FALSE otherwise.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 55 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
is_interface_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | is_interface_ptr is NULL.

Is Array Class

jvmtiError
IsArrayClass(jvmtiEnv* env,
            jclass klass,
            jboolean* is_array_class_ptr)
Determines whether a class object reference represents an array. The jboolean result is JNI_TRUE if the class is an array, JNI_FALSE otherwise.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 56 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
is_array_class_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | is_array_class_ptr is NULL.

Is Modifiable Class

jvmtiError
IsModifiableClass(jvmtiEnv* env,
            jclass klass,
            jboolean* is_modifiable_class_ptr)
Determines whether a class is modifiable. If a class is modifiable (is_modifiable_class_ptr returns JNI_TRUE) the class can be redefined with RedefineClasses (assuming the agent possesses the can_redefine_classes capability) or retransformed with RetransformClasses (assuming the agent possesses the can_retransform_classes capability). If a class is not modifiable (is_modifiable_class_ptr returns JNI_FALSE) the class can be neither redefined nor retransformed.

Primitive classes (for example, java.lang.Integer.TYPE) and array classes are never modifiable.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 45 | 1.1

Capabilities
Required Functionality
Optional Features
Capability | Effect
can_redefine_any_class | If possessed then all classes (except primitive and array classes) are modifiable.
can_redefine_classes | No effect on the result of the function. But must additionally be possessed to modify the class with RedefineClasses.
can_retransform_classes | No effect on the result of the function. But must additionally be possessed to modify the class with RetransformClasses.

Parameters
Name | Type | Description
klass | jclass | The class to query.
is_modifiable_class_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | is_modifiable_class_ptr is NULL.

Get Class Loader

jvmtiError
GetClassLoader(jvmtiEnv* env,
            jclass klass,
            jobject* classloader_ptr)
For the class indicated by klass, return via classloader_ptr a reference to the class loader for the class.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 57 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
classloader_ptr | jobject* | On return, points to the class loader that loaded this class. If the class was not created by a class loader or if the class loader is the bootstrap class loader, points to NULL. Agent passes a pointer to a jobject. On return, the jobject has been set. The object returned by classloader_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | classloader_ptr is NULL.

Get Source Debug Extension

jvmtiError
GetSourceDebugExtension(jvmtiEnv* env,
            jclass klass,
            char** source_debug_extension_ptr)
For the class indicated by klass, return the debug extension via source_debug_extension_ptr. The returned string contains exactly the debug extension information present in the class file of klass.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 90 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_source_debug_extension | Can get the source debug extension of a class

Parameters
Name | Type | Description
klass | jclass | The class to query.
source_debug_extension_ptr | char** | On return, points to the class's debug extension, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_source_debug_extension. Use AddCapabilities.
JVMTI_ERROR_ABSENT_INFORMATION | Class information does not include a debug extension.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_NULL_POINTER | source_debug_extension_ptr is NULL.

Retransform Classes

jvmtiError
RetransformClasses(jvmtiEnv* env,
            jint class_count,
            const jclass* classes)
This function facilitates the bytecode instrumentation of already loaded classes. To replace the class definition without reference to the existing bytecodes, as one might do when recompiling from source for fix-and-continue debugging, RedefineClasses function should be used instead.

When classes are initially loaded or when they are redefined, the initial class file bytes can be transformed with the ClassFileLoadHook event. This function reruns the transformation process (whether or not a transformation has previously occurred). This retransformation follows these steps:
  • starting from the initial class file bytes
  • for each retransformation incapable agent which received a ClassFileLoadHook event during the previous load or redefine, the bytes it returned (via the new_class_data parameter) are reused as the output of the transformation; note that this is equivalent to reapplying the previous transformation, unaltered. except that the ClassFileLoadHook event is not sent to these agents
  • for each retransformation capable agent, the ClassFileLoadHook event is sent, allowing a new transformation to be applied
  • the transformed class file bytes are installed as the new definition of the class
See the ClassFileLoadHook event for more details.

The initial class file bytes represent the bytes passed to ClassLoader.defineClass or RedefineClasses (before any transformations were applied), however they may not exactly match them. The constant pool may differ in ways described in GetConstantPool. Constant pool indices in the bytecodes of methods will correspond. Some attributes may not be present. Where order is not meaningful, for example the order of methods, order may not be preserved.

Retransformation can cause new versions of methods to be installed. Old method versions may become obsolete The new method version will be used on new invokes. If a method has active stack frames, those active frames continue to run the bytecodes of the original method version.

This function does not cause any initialization except that which would occur under the customary JVM semantics. In other words, retransforming a class does not cause its initializers to be run. The values of static fields will remain as they were prior to the call.

Threads need not be suspended.

All breakpoints in the class are cleared.

All attributes are updated.

Instances of the retransformed class are not affected -- fields retain their previous values. Tags on the instances are also unaffected.

In response to this call, no events other than the ClassFileLoadHook event will be sent.

The retransformation may change method bodies, the constant pool and attributes. The retransformation must not add, remove or rename fields or methods, change the signatures of methods, change modifiers, or change inheritance. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported retransformation is attempted. The class file bytes are not verified or installed until they have passed through the chain of ClassFileLoadHook events, thus the returned error code reflects the result of the transformations. If any error code is returned other than JVMTI_ERROR_NONE, none of the classes to be retransformed will have a new definition installed. When this function returns (with the error code of JVMTI_ERROR_NONE) all of the classes to be retransformed will have their new definitions installed.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 152 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_retransform_classes | Can retransform classes with RetransformClasses. In addition to the restrictions imposed by the specific implementation on this capability (see the Capability section), this capability must be set before the ClassFileLoadHook event is enabled for the first time in this environment. An environment that possesses this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation capable. An environment that does not possess this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation incapable.
Optional Features
can_retransform_any_class | RetransformClasses can be called on any class (can_retransform_classes must also be set)

Parameters
Name | Type | Description
class_count | jint | The number of classes to be retransformed.
classes | const jclass* | The array of classes to be retransformed. Agent passes in an array of class_count elements of jclass.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_retransform_classes. Use AddCapabilities.
JVMTI_ERROR_UNMODIFIABLE_CLASS | One of the classes cannot be modified. See IsModifiableClass.
JVMTI_ERROR_INVALID_CLASS | One of the classes is not a valid class.
JVMTI_ERROR_UNSUPPORTED_VERSION | A retransformed class file has a version number not supported by this VM.
JVMTI_ERROR_INVALID_CLASS_FORMAT | A retransformed class file is malformed (The VM would return a ClassFormatError).
JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION | The retransformed class file definitions would lead to a circular definition (the VM would return a ClassCircularityError).
JVMTI_ERROR_FAILS_VERIFICATION | The retransformed class file bytes fail verification.
JVMTI_ERROR_NAMES_DONT_MATCH | The class name defined in a retransformed class file is different from the name in the old class object.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED | A retransformed class file would require adding a method.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED | A retransformed class file changes a field.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED | A direct superclass is different for a retransformed class file, or the set of directly implemented interfaces is different.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED | A retransformed class file does not declare a method declared in the old class version.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED | A retransformed class file has different class modifiers.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED | A method in the retransformed class file has different modifiers than its counterpart in the old class version.
JVMTI_ERROR_ILLEGAL_ARGUMENT | class_count is less than 0.
JVMTI_ERROR_NULL_POINTER | classes is NULL.

Redefine Classes

typedef struct {
    jclass klass;
    jint class_byte_count;
    const unsigned char* class_bytes;
} jvmtiClassDefinition;
jvmtiError
RedefineClasses(jvmtiEnv* env,
            jint class_count,
            const jvmtiClassDefinition* class_definitions)
All classes given are redefined according to the definitions supplied. This function is used to replace the definition of a class with a new definition, as might be needed in fix-and-continue debugging. Where the existing class file bytes are to be transformed, for example in bytecode instrumentation, RetransformClasses should be used.

Redefinition can cause new versions of methods to be installed. Old method versions may become obsolete The new method version will be used on new invokes. If a method has active stack frames, those active frames continue to run the bytecodes of the original method version. If resetting of stack frames is desired, use PopFrame to pop frames with obsolete method versions.

This function does not cause any initialization except that which would occur under the customary JVM semantics. In other words, redefining a class does not cause its initializers to be run. The values of static fields will remain as they were prior to the call.

Threads need not be suspended.

All breakpoints in the class are cleared.

All attributes are updated.

Instances of the redefined class are not affected -- fields retain their previous values. Tags on the instances are also unaffected.

In response to this call, the JVM TI event Class File Load Hook will be sent (if enabled), but no other JVM TI events will be sent.

The redefinition may change method bodies, the constant pool and attributes. The redefinition must not add, remove or rename fields or methods, change the signatures of methods, change modifiers, or change inheritance. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported redefinition is attempted. The class file bytes are not verified or installed until they have passed through the chain of ClassFileLoadHook events, thus the returned error code reflects the result of the transformations applied to the bytes passed into class_definitions. If any error code is returned other than JVMTI_ERROR_NONE, none of the classes to be redefined will have a new definition installed. When this function returns (with the error code of JVMTI_ERROR_NONE) all of the classes to be redefined will have their new definitions installed.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 87 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_redefine_classes | Can redefine classes with RedefineClasses.
Optional Features
can_redefine_any_class | Can modify (retransform or redefine) any non-primitive non-array class. See IsModifiableClass.

jvmtiClassDefinition - Class redefinition description
Field | Type | Description
klass | jclass | Class object for this class
class_byte_count | jint | Number of bytes defining class (below)
class_bytes | const unsigned char* | Bytes defining class (in The Java™ Virtual Machine Specification, Chapter 4)

Parameters
Name | Type | Description
class_count | jint | The number of classes specified in class_definitions
class_definitions | const jvmtiClassDefinition* | The array of new class definitions Agent passes in an array of class_count elements of jvmtiClassDefinition.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_redefine_classes. Use AddCapabilities.
JVMTI_ERROR_NULL_POINTER | One of class_bytes is NULL.
JVMTI_ERROR_UNMODIFIABLE_CLASS | An element of class_definitions cannot be modified. See IsModifiableClass.
JVMTI_ERROR_INVALID_CLASS | An element of class_definitions is not a valid class.
JVMTI_ERROR_UNSUPPORTED_VERSION | A new class file has a version number not supported by this VM.
JVMTI_ERROR_INVALID_CLASS_FORMAT | A new class file is malformed (The VM would return a ClassFormatError).
JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION | The new class file definitions would lead to a circular definition (the VM would return a ClassCircularityError).
JVMTI_ERROR_FAILS_VERIFICATION | The class bytes fail verification.
JVMTI_ERROR_NAMES_DONT_MATCH | The class name defined in a new class file is different from the name in the old class object.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED | A new class file would require adding a method.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED | A new class version changes a field.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED | A direct superclass is different for a new class version, or the set of directly implemented interfaces is different.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED | A new class version does not declare a method declared in the old class version.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED | A new class version has different modifiers.
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED | A method in the new class version has different modifiers than its counterpart in the old class version.
JVMTI_ERROR_ILLEGAL_ARGUMENT | class_count is less than 0.
JVMTI_ERROR_NULL_POINTER | class_definitions is NULL.

Object

Object functions:
  • Get Object Size
  • Get Object Hash Code
  • Get Object Monitor Usage
Object types:
  • jvmtiMonitorUsage - Object monitor usage information

Get Object Size

jvmtiError
GetObjectSize(jvmtiEnv* env,
            jobject object,
            jlong* size_ptr)
For the object indicated by object, return via size_ptr the size of the object. This size is an implementation-specific approximation of the amount of storage consumed by this object. It may include some or all of the object's overhead, and thus is useful for comparison within an implementation but not between implementations. The estimate may change during a single invocation of the JVM.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 154 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
object | jobject | The object to query.
size_ptr | jlong* | On return, points to the object's size in bytes. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_OBJECT | object is not an object.
JVMTI_ERROR_NULL_POINTER | size_ptr is NULL.

Get Object Hash Code

jvmtiError
GetObjectHashCode(jvmtiEnv* env,
            jobject object,
            jint* hash_code_ptr)
For the object indicated by object, return via hash_code_ptr a hash code. This hash code could be used to maintain a hash table of object references, however, on some implementations this can cause significant performance impacts--in most cases tags will be a more efficient means of associating information with objects. This function guarantees the same hash code value for a particular object throughout its life

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 58 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
object | jobject | The object to query.
hash_code_ptr | jint* | On return, points to the object's hash code. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_OBJECT | object is not an object.
JVMTI_ERROR_NULL_POINTER | hash_code_ptr is NULL.

Get Object Monitor Usage

typedef struct {
    jthread owner;
    jint entry_count;
    jint waiter_count;
    jthread* waiters;
    jint notify_waiter_count;
    jthread* notify_waiters;
} jvmtiMonitorUsage;
jvmtiError
GetObjectMonitorUsage(jvmtiEnv* env,
            jobject object,
            jvmtiMonitorUsage* info_ptr)
Get information about the object's monitor. The fields of the jvmtiMonitorUsage structure are filled in with information about usage of the monitor.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 59 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_monitor_info | Can GetObjectMonitorUsage

jvmtiMonitorUsage - Object monitor usage information
Field | Type | Description
owner | jthread | The thread owning this monitor, or NULL if unused
entry_count | jint | The number of times the owning thread has entered the monitor
waiter_count | jint | The number of threads waiting to own this monitor
waiters | jthread* | The waiter_count waiting threads
notify_waiter_count | jint | The number of threads waiting to be notified by this monitor
notify_waiters | jthread* | The notify_waiter_count threads waiting to be notified

Parameters
Name | Type | Description
object | jobject | The object to query.
info_ptr | jvmtiMonitorUsage* | On return, filled with monitor information for the specified object. Agent passes a pointer to a jvmtiMonitorUsage. On return, the jvmtiMonitorUsage has been set. The object returned in the field owner of jvmtiMonitorUsage is a JNI local reference and must be managed. The pointer returned in the field waiters of jvmtiMonitorUsage is a newly allocated array. The array should be freed with Deallocate. The objects returned in the field waiters of jvmtiMonitorUsage are JNI local references and must be managed. The pointer returned in the field notify_waiters of jvmtiMonitorUsage is a newly allocated array. The array should be freed with Deallocate. The objects returned in the field notify_waiters of jvmtiMonitorUsage are JNI local references and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_monitor_info. Use AddCapabilities.
JVMTI_ERROR_INVALID_OBJECT | object is not an object.
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Field

Field functions:
  • Get Field Name (and Signature)
  • Get Field Declaring Class
  • Get Field Modifiers
  • Is Field Synthetic

Get Field Name (and Signature)

jvmtiError
GetFieldName(jvmtiEnv* env,
            jclass klass,
            jfieldID field,
            char** name_ptr,
            char** signature_ptr,
            char** generic_ptr)
For the field indicated by klass and field, return the field name via name_ptr and field signature via signature_ptr.

Field signatures are defined in the JNI Specification and are referred to as field descriptors in The Java™ Virtual Machine Specification, Chapter 4.3.2.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 60 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class of the field to query.
field | jfieldID | The field to query.
name_ptr | char ** | On return, points to the field name, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If name_ptr is NULL, the name is not returned.
signature_ptr | char ** | On return, points to the field signature, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If signature_ptr is NULL, the signature is not returned.
generic_ptr | char ** | On return, points to the generic signature of the field, encoded as a modified UTF-8 string. If there is no generic signature attribute for the field, then, on return, points to NULL. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If generic_ptr is NULL, the generic signature is not returned.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.

Get Field Declaring Class

jvmtiError
GetFieldDeclaringClass(jvmtiEnv* env,
            jclass klass,
            jfieldID field,
            jclass* declaring_class_ptr)
For the field indicated by klass and field return the class that defined it via declaring_class_ptr. The declaring class will either be klass, a superclass, or an implemented interface.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 61 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
field | jfieldID | The field to query.
declaring_class_ptr | jclass* | On return, points to the declaring class Agent passes a pointer to a jclass. On return, the jclass has been set. The object returned by declaring_class_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.
JVMTI_ERROR_NULL_POINTER | declaring_class_ptr is NULL.

Get Field Modifiers

jvmtiError
GetFieldModifiers(jvmtiEnv* env,
            jclass klass,
            jfieldID field,
            jint* modifiers_ptr)
For the field indicated by klass and field return the access flags via modifiers_ptr. Access flags are defined in The Java™ Virtual Machine Specification, Chapter 4.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 62 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
klass | jclass | The class to query.
field | jfieldID | The field to query.
modifiers_ptr | jint* | On return, points to the access flags. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.
JVMTI_ERROR_NULL_POINTER | modifiers_ptr is NULL.

Is Field Synthetic

jvmtiError
IsFieldSynthetic(jvmtiEnv* env,
            jclass klass,
            jfieldID field,
            jboolean* is_synthetic_ptr)
For the field indicated by klass and field, return a value indicating whether the field is synthetic via is_synthetic_ptr. Synthetic fields are generated by the compiler but not present in the original source code.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 63 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_synthetic_attribute | Can test if a field or method is synthetic - IsFieldSynthetic and IsMethodSynthetic

Parameters
Name | Type | Description
klass | jclass | The class of the field to query.
field | jfieldID | The field to query.
is_synthetic_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_synthetic_attribute. Use AddCapabilities.
JVMTI_ERROR_INVALID_CLASS | klass is not a class object or the class has been unloaded.
JVMTI_ERROR_INVALID_FIELDID | field is not a jfieldID.
JVMTI_ERROR_NULL_POINTER | is_synthetic_ptr is NULL.

Method

Method functions:
  • Get Method Name (and Signature)
  • Get Method Declaring Class
  • Get Method Modifiers
  • Get Max Locals
  • Get Arguments Size
  • Get Line Number Table
  • Get Method Location
  • Get Local Variable Table
  • Get Bytecodes
  • Is Method Native
  • Is Method Synthetic
  • Is Method Obsolete
  • Set Native Method Prefix
  • Set Native Method Prefixes
Method types:
  • jvmtiLineNumberEntry - Line number table entry
  • jvmtiLocalVariableEntry - Local variable table entry
These functions provide information about a method (represented as a jmethodID) and set how methods are processed.

Obsolete Methods

The functions RetransformClasses and RedefineClasses can cause new versions of methods to be installed. An original version of a method is considered equivalent to the new version if:
  • their bytecodes are the same except for indices into the constant pool and
  • the referenced constants are equal.
An original method version which is not equivalent to the new method version is called obsolete and is assigned a new method ID; the original method ID now refers to the new method version. A method ID can be tested for obsolescence with IsMethodObsolete.

Get Method Name (and Signature)

jvmtiError
GetMethodName(jvmtiEnv* env,
            jmethodID method,
            char** name_ptr,
            char** signature_ptr,
            char** generic_ptr)
For the method indicated by method, return the method name via name_ptr and method signature via signature_ptr.

Method signatures are defined in the JNI Specification and are referred to as method descriptors in The Java™ Virtual Machine Specification, Chapter 4.3.3. Note this is different than method signatures as defined in the Java Language Specification.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 64 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
name_ptr | char ** | On return, points to the method name, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If name_ptr is NULL, the name is not returned.
signature_ptr | char ** | On return, points to the method signature, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If signature_ptr is NULL, the signature is not returned.
generic_ptr | char ** | On return, points to the generic signature of the method, encoded as a modified UTF-8 string. If there is no generic signature attribute for the method, then, on return, points to NULL. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. If generic_ptr is NULL, the generic signature is not returned.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.

Get Method Declaring Class

jvmtiError
GetMethodDeclaringClass(jvmtiEnv* env,
            jmethodID method,
            jclass* declaring_class_ptr)
For the method indicated by method, return the class that defined it via declaring_class_ptr.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 65 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
declaring_class_ptr | jclass* | On return, points to the declaring class Agent passes a pointer to a jclass. On return, the jclass has been set. The object returned by declaring_class_ptr is a JNI local reference and must be managed.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NULL_POINTER | declaring_class_ptr is NULL.

Get Method Modifiers

jvmtiError
GetMethodModifiers(jvmtiEnv* env,
            jmethodID method,
            jint* modifiers_ptr)
For the method indicated by method, return the access flags via modifiers_ptr. Access flags are defined in The Java™ Virtual Machine Specification, Chapter 4.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 66 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
modifiers_ptr | jint* | On return, points to the access flags. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NULL_POINTER | modifiers_ptr is NULL.

Get Max Locals

jvmtiError
GetMaxLocals(jvmtiEnv* env,
            jmethodID method,
            jint* max_ptr)
For the method indicated by method, return the number of local variable slots used by the method, including the local variables used to pass parameters to the method on its invocation.

See max_locals in The Java™ Virtual Machine Specification, Chapter 4.7.3.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 68 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
max_ptr | jint* | On return, points to the maximum number of local slots Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | max_ptr is NULL.

Get Arguments Size

jvmtiError
GetArgumentsSize(jvmtiEnv* env,
            jmethodID method,
            jint* size_ptr)
For the method indicated by method, return via max_ptr the number of local variable slots used by the method's arguments. Note that two-word arguments use two slots.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 69 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
size_ptr | jint* | On return, points to the number of argument slots Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | size_ptr is NULL.

Get Line Number Table

typedef struct {
    jlocation start_location;
    jint line_number;
} jvmtiLineNumberEntry;
jvmtiError
GetLineNumberTable(jvmtiEnv* env,
            jmethodID method,
            jint* entry_count_ptr,
            jvmtiLineNumberEntry** table_ptr)
For the method indicated by method, return a table of source line number entries. The size of the table is returned via entry_count_ptr and the table itself is returned via table_ptr.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 70 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_line_numbers | Can get the line number table of a method

jvmtiLineNumberEntry - Line number table entry
Field | Type | Description
start_location | jlocation | the jlocation where the line begins
line_number | jint | the line number

Parameters
Name | Type | Description
method | jmethodID | The method to query.
entry_count_ptr | jint* | On return, points to the number of entries in the table Agent passes a pointer to a jint. On return, the jint has been set.
table_ptr | jvmtiLineNumberEntry** | On return, points to the line number table pointer. Agent passes a pointer to a jvmtiLineNumberEntry*. On return, the jvmtiLineNumberEntry* points to a newly allocated array of size *entry_count_ptr. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_line_numbers. Use AddCapabilities.
JVMTI_ERROR_ABSENT_INFORMATION | Class information does not include line numbers.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | entry_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | table_ptr is NULL.

Get Method Location

jvmtiError
GetMethodLocation(jvmtiEnv* env,
            jmethodID method,
            jlocation* start_location_ptr,
            jlocation* end_location_ptr)
For the method indicated by method, return the beginning and ending addresses through start_location_ptr and end_location_ptr. In a conventional byte code indexing scheme, start_location_ptr will always point to zero and end_location_ptr will always point to the byte code count minus one.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 71 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
start_location_ptr | jlocation* | On return, points to the first location, or -1 if location information is not available. If the information is available and GetJLocationFormat returns JVMTI_JLOCATION_JVMBCI then this will always be zero. Agent passes a pointer to a jlocation. On return, the jlocation has been set.
end_location_ptr | jlocation* | On return, points to the last location, or -1 if location information is not available. Agent passes a pointer to a jlocation. On return, the jlocation has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ABSENT_INFORMATION | Class information does not include method sizes.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | start_location_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | end_location_ptr is NULL.

Get Local Variable Table

typedef struct {
    jlocation start_location;
    jint length;
    char* name;
    char* signature;
    char* generic_signature;
    jint slot;
} jvmtiLocalVariableEntry;
jvmtiError
GetLocalVariableTable(jvmtiEnv* env,
            jmethodID method,
            jint* entry_count_ptr,
            jvmtiLocalVariableEntry** table_ptr)
Return local variable information.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 72 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_access_local_variables | Can set and get local variables

jvmtiLocalVariableEntry - Local variable table entry
Field | Type | Description
start_location | jlocation | The code array index where the local variable is first valid (that is, where it must have a value).
length | jint | The length of the valid section for this local variable. The last code array index where the local variable is valid is start_location + length.
name | char* | The local variable name, encoded as a modified UTF-8 string.
signature | char* | The local variable's type signature, encoded as a modified UTF-8 string. The signature format is the same as that defined in The Java™ Virtual Machine Specification, Chapter 4.3.2.
generic_signature | char* | The local variable's generic signature, encoded as a modified UTF-8 string. The value of this field will be NULL for any local variable which does not have a generic type.
slot | jint | The local variable's slot. See Local Variables.

Parameters
Name | Type | Description
method | jmethodID | The method to query.
entry_count_ptr | jint* | On return, points to the number of entries in the table Agent passes a pointer to a jint. On return, the jint has been set.
table_ptr | jvmtiLocalVariableEntry** | On return, points to an array of local variable table entries. Agent passes a pointer to a jvmtiLocalVariableEntry*. On return, the jvmtiLocalVariableEntry* points to a newly allocated array of size *entry_count_ptr. The array should be freed with Deallocate. The pointers returned in the field name of jvmtiLocalVariableEntry are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field signature of jvmtiLocalVariableEntry are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field generic_signature of jvmtiLocalVariableEntry are newly allocated arrays. The arrays should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_access_local_variables. Use AddCapabilities.
JVMTI_ERROR_ABSENT_INFORMATION | Class information does not include local variable information.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | entry_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | table_ptr is NULL.

Get Bytecodes

jvmtiError
GetBytecodes(jvmtiEnv* env,
            jmethodID method,
            jint* bytecode_count_ptr,
            unsigned char** bytecodes_ptr)
For the method indicated by method, return the byte codes that implement the method. The number of bytecodes is returned via bytecode_count_ptr. The byte codes themselves are returned via bytecodes_ptr.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 75 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_bytecodes | Can get bytecodes of a method GetBytecodes

Parameters
Name | Type | Description
method | jmethodID | The method to query.
bytecode_count_ptr | jint* | On return, points to the length of the byte code array Agent passes a pointer to a jint. On return, the jint has been set.
bytecodes_ptr | unsigned char** | On return, points to the pointer to the byte code array Agent passes a pointer to a unsigned char*. On return, the unsigned char* points to a newly allocated array of size *bytecode_count_ptr. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_bytecodes. Use AddCapabilities.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NATIVE_METHOD | method is a native method.
JVMTI_ERROR_NULL_POINTER | bytecode_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | bytecodes_ptr is NULL.

Is Method Native

jvmtiError
IsMethodNative(jvmtiEnv* env,
            jmethodID method,
            jboolean* is_native_ptr)
For the method indicated by method, return a value indicating whether the method is native via is_native_ptr

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 76 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method to query.
is_native_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NULL_POINTER | is_native_ptr is NULL.

Is Method Synthetic

jvmtiError
IsMethodSynthetic(jvmtiEnv* env,
            jmethodID method,
            jboolean* is_synthetic_ptr)
For the method indicated by method, return a value indicating whether the method is synthetic via is_synthetic_ptr. Synthetic methods are generated by the compiler but not present in the original source code.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 77 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_synthetic_attribute | Can test if a field or method is synthetic - IsFieldSynthetic and IsMethodSynthetic

Parameters
Name | Type | Description
method | jmethodID | The method to query.
is_synthetic_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_synthetic_attribute. Use AddCapabilities.
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NULL_POINTER | is_synthetic_ptr is NULL.

Is Method Obsolete

jvmtiError
IsMethodObsolete(jvmtiEnv* env,
            jmethodID method,
            jboolean* is_obsolete_ptr)
Determine if a method ID refers to an obsolete method version.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 91 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
method | jmethodID | The method ID to query.
is_obsolete_ptr | jboolean* | On return, points to the boolean result of this function. Agent passes a pointer to a jboolean. On return, the jboolean has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_METHODID | method is not a jmethodID.
JVMTI_ERROR_NULL_POINTER | is_obsolete_ptr is NULL.

Set Native Method Prefix

jvmtiError
SetNativeMethodPrefix(jvmtiEnv* env,
            const char* prefix)
This function modifies the failure handling of native method resolution by allowing retry with a prefix applied to the name. When used with the ClassFileLoadHook event, it enables native methods to be instrumented.

Since native methods cannot be directly instrumented (they have no bytecodes), they must be wrapped with a non-native method which can be instrumented. For example, if we had:
native boolean foo(int x);

We could transform the class file (with the ClassFileLoadHook event) so that this becomes:
boolean foo(int x) {
  ... record entry to foo ...
  return wrapped_foo(x);
}

native boolean wrapped_foo(int x);

Where foo becomes a wrapper for the actual native method with the appended prefix "wrapped_". Note that "wrapped_" would be a poor choice of prefix since it might conceivably form the name of an existing method thus something like "$$$MyAgentWrapped$$$_" would be better but would make these examples less readable.

The wrapper will allow data to be collected on the native method call, but now the problem becomes linking up the wrapped method with the native implementation. That is, the method wrapped_foo needs to be resolved to the native implementation of foo, which might be:
Java_somePackage_someClass_foo(JNIEnv* env, jint x)

This function allows the prefix to be specified and the proper resolution to occur. Specifically, when the standard resolution fails, the resolution is retried taking the prefix into consideration. There are two ways that resolution occurs, explicit resolution with the JNI function RegisterNatives and the normal automatic resolution. For RegisterNatives, the VM will attempt this association:
method(foo) -> nativeImplementation(foo)

When this fails, the resolution will be retried with the specified prefix prepended to the method name, yielding the correct resolution:
method(wrapped_foo) -> nativeImplementation(foo)

For automatic resolution, the VM will attempt:
method(wrapped_foo) -> nativeImplementation(wrapped_foo)

When this fails, the resolution will be retried with the specified prefix deleted from the implementation name, yielding the correct resolution:
method(wrapped_foo) -> nativeImplementation(foo)

Note that since the prefix is only used when standard resolution fails, native methods can be wrapped selectively.

Since each JVM TI environment is independent and can do its own transformation of the bytecodes, more than one layer of wrappers may be applied. Thus each environment needs its own prefix. Since transformations are applied in order, the prefixes, if applied, will be applied in the same order. The order of transformation application is described in the ClassFileLoadHook event. Thus if three environments applied wrappers, foo might become $env3_$env2_$env1_foo. But if, say, the second environment did not apply a wrapper to foo it would be just $env3_$env1_foo. To be able to efficiently determine the sequence of prefixes, an intermediate prefix is only applied if its non-native wrapper exists. Thus, in the last example, even though $env1_foo is not a native method, the $env1_ prefix is applied since $env1_foo exists.

Since the prefixes are used at resolution time and since resolution may be arbitrarily delayed, a native method prefix must remain set as long as there are corresponding prefixed native methods.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 73 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_set_native_method_prefix | Can set prefix to be applied when native method cannot be resolved - SetNativeMethodPrefix and SetNativeMethodPrefixes

Parameters
Name | Type | Description
prefix | const char * | The prefix to apply, encoded as a modified UTF-8 string. Agent passes in an array of char. If prefix is NULL, any existing prefix in this environment is cancelled .

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_set_native_method_prefix. Use AddCapabilities.

Set Native Method Prefixes

jvmtiError
SetNativeMethodPrefixes(jvmtiEnv* env,
            jint prefix_count,
            char** prefixes)
For a normal agent, SetNativeMethodPrefix will provide all needed native method prefixing. For a meta-agent that performs multiple independent class file transformations (for example as a proxy for another layer of agents) this function allows each transformation to have its own prefix. The prefixes are applied in the order supplied and are processed in the same manor as described for the application of prefixes from multiple JVM TI environments in SetNativeMethodPrefix.

Any previous prefixes are replaced. Thus, calling this function with a prefix_count of 0 disables prefixing in this environment.

SetNativeMethodPrefix and this function are the two ways to set the prefixes. Calling SetNativeMethodPrefix with a prefix is the same as calling this function with prefix_count of 1. Calling SetNativeMethodPrefix with NULL is the same as calling this function with prefix_count of 0.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 74 | 1.1

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_set_native_method_prefix | Can set prefix to be applied when native method cannot be resolved - SetNativeMethodPrefix and SetNativeMethodPrefixes

Parameters
Name | Type | Description
prefix_count | jint | The number of prefixes to apply.
prefixes | char ** | The prefixes to apply for this environment, each encoded as a modified UTF-8 string.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_set_native_method_prefix. Use AddCapabilities.
JVMTI_ERROR_ILLEGAL_ARGUMENT | prefix_count is less than 0.
JVMTI_ERROR_NULL_POINTER | prefixes is NULL.

Raw Monitor

Raw Monitor functions:
  • Create Raw Monitor
  • Destroy Raw Monitor
  • Raw Monitor Enter
  • Raw Monitor Exit
  • Raw Monitor Wait
  • Raw Monitor Notify
  • Raw Monitor Notify All

Create Raw Monitor

jvmtiError
CreateRawMonitor(jvmtiEnv* env,
            const char* name,
            jrawMonitorID* monitor_ptr)
Create a raw monitor.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 31 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
name | const char* | A name to identify the monitor, encoded as a modified UTF-8 string. Agent passes in an array of char.
monitor_ptr | jrawMonitorID* | On return, points to the created monitor. Agent passes a pointer to a jrawMonitorID. On return, the jrawMonitorID has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | name is NULL.
JVMTI_ERROR_NULL_POINTER | monitor_ptr is NULL.

Destroy Raw Monitor

jvmtiError
DestroyRawMonitor(jvmtiEnv* env,
            jrawMonitorID monitor)
Destroy the raw monitor. If the monitor being destroyed has been entered by this thread, it will be exited before it is destroyed. If the monitor being destroyed has been entered by another thread, an error will be returned and the monitor will not be destroyed.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 32 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_MONITOR_OWNER | Not monitor owner
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

Raw Monitor Enter

jvmtiError
RawMonitorEnter(jvmtiEnv* env,
            jrawMonitorID monitor)
Gain exclusive ownership of a raw monitor. The same thread may enter a monitor more then once. The thread must exit the monitor the same number of times as it is entered. If a monitor is entered during OnLoad (before attached threads exist) and has not exited when attached threads come into existence, the enter is considered to have occurred on the main thread.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 33 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

Raw Monitor Exit

jvmtiError
RawMonitorExit(jvmtiEnv* env,
            jrawMonitorID monitor)
Release exclusive ownership of a raw monitor.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 34 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_MONITOR_OWNER | Not monitor owner
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

Raw Monitor Wait

jvmtiError
RawMonitorWait(jvmtiEnv* env,
            jrawMonitorID monitor,
            jlong millis)
Wait for notification of the raw monitor.

Causes the current thread to wait until either another thread calls RawMonitorNotify or RawMonitorNotifyAll for the specified raw monitor, or the specified timeout has elapsed.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 35 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor
millis | jlong | The timeout, in milliseconds. If the timeout is zero, then real time is not taken into consideration and the thread simply waits until notified.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_MONITOR_OWNER | Not monitor owner
JVMTI_ERROR_INTERRUPT | Wait was interrupted, try again
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

Raw Monitor Notify

jvmtiError
RawMonitorNotify(jvmtiEnv* env,
            jrawMonitorID monitor)
Notify a single thread waiting on the raw monitor.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 36 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_MONITOR_OWNER | Not monitor owner
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

Raw Monitor Notify All

jvmtiError
RawMonitorNotifyAll(jvmtiEnv* env,
            jrawMonitorID monitor)
Notify all threads waiting on the raw monitor.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 37 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
monitor | jrawMonitorID | The monitor

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_MONITOR_OWNER | Not monitor owner
JVMTI_ERROR_INVALID_MONITOR | monitor is not a jrawMonitorID.

JNI Function Interception

JNI Function Interception functions:
  • Set JNI Function Table
  • Get JNI Function Table
Provides the ability to intercept and resend Java Native Interface (JNI) function calls by manipulating the JNI function table. See JNI Functions in the Java Native Interface Specification.

The following example illustrates intercepting the NewGlobalRef JNI call in order to count reference creation.
JNIEnv original_jni_Functions;
JNIEnv redirected_jni_Functions;
int my_global_ref_count = 0;

jobject
MyNewGlobalRef(JNIEnv *jni_env, jobject lobj) {
   ++my_global_ref_count;
   return originalJNIFunctions->NewGlobalRef(env, lobj);
}

void
myInit() {
   jvmtiError err;

   err = (*jvmti_env)->GetJNIFunctionTable(jvmti_env, &original_jni_Functions);
   if (err != JVMTI_ERROR_NONE) {
      die();
   }
   err = (*jvmti_env)->GetJNIFunctionTable(jvmti_env, &redirected_jni_Functions);
   if (err != JVMTI_ERROR_NONE) {
      die();
   }
   redirectedJNIFunctions->NewGlobalRef = MyNewGlobalRef;
      err = (*jvmti_env)->SetJNIFunctionTable(jvmti_env, redirected_jni_Functions);
   if (err != JVMTI_ERROR_NONE) {
      die();
   }
}
Sometime after myInit is called the user's JNI code is executed which makes the call to create a new global reference. Instead of going to the normal JNI implementation the call goes to myNewGlobalRef. Note that a copy of the original function table is kept so that the normal JNI function can be called after the data is collected. Note also that any JNI functions which are not overwritten will behave normally.

Set JNI Function Table

jvmtiError
SetJNIFunctionTable(jvmtiEnv* env,
            const jniNativeInterface* function_table)
Set the JNI function table in all current and future JNI environments. As a result, all future JNI calls are directed to the specified functions. Use GetJNIFunctionTable to get the function table to pass to this function. For this function to take effect the the updated table entries must be used by the JNI clients. Since the table is defined const some compilers may optimize away the access to the table, thus preventing this function from taking effect. The table is copied--changes to the local copy of the table have no effect. This function affects only the function table, all other aspects of the environment are unaffected. See the examples above.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 120 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
function_table | const jniNativeInterface * | Points to the new JNI function table. Agent passes in a pointer to jniNativeInterface.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | function_table is NULL.

Get JNI Function Table

jvmtiError
GetJNIFunctionTable(jvmtiEnv* env,
            jniNativeInterface** function_table)
Get the JNI function table. The JNI function table is copied into allocated memory. If SetJNIFunctionTable has been called, the modified (not the original) function table is returned. Only the function table is copied, no other aspects of the environment are copied. See the examples above.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | No | 121 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
function_table | jniNativeInterface ** | On return, *function_table points a newly allocated copy of the JNI function table. Agent passes a pointer to a jniNativeInterface*. On return, the jniNativeInterface* points to a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | function_table is NULL.

Event Management

Event Management functions:
  • Set Event Callbacks
  • Set Event Notification Mode
  • Generate Events
Event Management types:
  • jvmtiEventMode - Event Enable/Disable

Set Event Callbacks

jvmtiError
SetEventCallbacks(jvmtiEnv* env,
            const jvmtiEventCallbacks* callbacks,
            jint size_of_callbacks)
Set the functions to be called for each event. The callbacks are specified by supplying a replacement function table. The function table is copied--changes to the local copy of the table have no effect. This is an atomic action, all callbacks are set at once. No events are sent before this function is called. When an entry is NULL or when the event is beyond size_of_callbacks no event is sent. Details on events are described later in this document. An event must be enabled and have a callback in order to be sent--the order in which this function and SetEventNotificationMode are called does not affect the result.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 122 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
callbacks | const jvmtiEventCallbacks * | The new event callbacks. Agent passes in a pointer to jvmtiEventCallbacks. If callbacks is NULL, remove the existing callbacks.
size_of_callbacks | jint | sizeof(jvmtiEventCallbacks)--for version compatibility.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | size_of_callbacks is less than 0.

Set Event Notification Mode

typedef enum {
    JVMTI_ENABLE = 1,
    JVMTI_DISABLE = 0
} jvmtiEventMode;
jvmtiError
SetEventNotificationMode(jvmtiEnv* env,
            jvmtiEventMode mode,
            jvmtiEvent event_type,
            jthread event_thread,
             ...)
Control the generation of events.
Event Enable/Disable (jvmtiEventMode)
Constant | Value | Description
JVMTI_ENABLE | 1 | If mode is JVMTI_ENABLE, the event event_type will be enabled
JVMTI_DISABLE | 0 | If mode is JVMTI_DISABLE, the event event_type will be disabled
If thread is NULL, the event is enabled or disabled globally; otherwise, it is enabled or disabled for a particular thread. An event is generated for a particular thread if it is enabled either at the thread or global levels.

See below for information on specific events.

The following events cannot be controlled at the thread level through this function.
  • VMInit
  • VMStart
  • VMDeath
  • ThreadStart
  • CompiledMethodLoad
  • CompiledMethodUnload
  • DynamicCodeGenerated
  • DataDumpRequest

Initially, no events are enabled at either the thread level or the global level.

Any needed capabilities (see Event Enabling Capabilities below) must be possessed before calling this function.

Details on events are described below.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 2 | 1.0

Capabilities
Required Functionality
Event Enabling Capabilities
Capability | Events
can_generate_field_modification_events | FieldModification
can_generate_field_access_events | FieldAccess
can_generate_single_step_events | SingleStep
can_generate_exception_events | Exception ExceptionCatch
can_generate_frame_pop_events | FramePop
can_generate_breakpoint_events | Breakpoint
can_generate_method_entry_events | MethodEntry
can_generate_method_exit_events | MethodExit
can_generate_compiled_method_load_events | CompiledMethodLoad CompiledMethodUnload
can_generate_monitor_events | MonitorContendedEnter MonitorContendedEntered MonitorWait MonitorWaited
can_generate_vm_object_alloc_events | VMObjectAlloc
can_generate_native_method_bind_events | NativeMethodBind
can_generate_garbage_collection_events | GarbageCollectionStart GarbageCollectionFinish
can_generate_object_free_events | ObjectFree

Parameters
Name | Type | Description
mode | jvmtiEventMode | JVMTI_ENABLE or JVMTI_DISABLE
event_type | jvmtiEvent | the event to control
event_thread | jthread | The thread to control If event_thread is NULL, event is controlled at the global level.
... | ... | for future expansion

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_INVALID_THREAD | event_thread is non-NULL and is not a valid thread.
JVMTI_ERROR_THREAD_NOT_ALIVE | event_thread is non-NULL and is not live (has not been started or is now dead).
JVMTI_ERROR_ILLEGAL_ARGUMENT | thread level control was attempted on events which do not permit thread level control.
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The Required Event Enabling Capability is not possessed.
JVMTI_ERROR_ILLEGAL_ARGUMENT | mode is not a jvmtiEventMode.
JVMTI_ERROR_INVALID_EVENT_TYPE | event_type is not a jvmtiEvent.

Generate Events

jvmtiError
GenerateEvents(jvmtiEnv* env,
            jvmtiEvent event_type)
Generate events to represent the current state of the VM. For example, if event_type is JVMTI_EVENT_COMPILED_METHOD_LOAD, a CompiledMethodLoad event will be sent for each currently compiled method. Methods that were loaded and now have been unloaded are not sent. The history of what events have previously been sent does not effect what events are sent by this function--for example, all currently compiled methods will be sent each time this function is called.

This function is useful when events may have been missed due to the agent attaching after program execution begins; this function generates the missed events.

Attempts to execute Java programming language code or JNI functions may be paused until this function returns - so neither should be called from the thread sending the event. This function returns only after the missed events have been sent, processed and have returned. The event may be sent on a different thread than the thread on which the event occurred. The callback for the event must be set with SetEventCallbacks and the event must be enabled with SetEventNotificationMode or the events will not occur. If the VM no longer has the information to generate some or all of the requested events, the events are simply not sent - no error is returned.

Only the following events are supported:
  • CompiledMethodLoad
  • DynamicCodeGenerated

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 123 | 1.0

Capabilities
Required Functionality
Optional Features
Capability | Effect
can_generate_compiled_method_load_events | Can generate events when a method is compiled or unloaded

Parameters
Name Type Description
event_type jvmtiEvent The type of event to generate. Must be one of these:
  • JVMTI_EVENT_COMPILED_METHOD_LOAD
  • JVMTI_EVENT_DYNAMIC_CODE_GENERATED

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | event_type is JVMTI_EVENT_COMPILED_METHOD_LOAD and can_generate_compiled_method_load_events is false.
JVMTI_ERROR_ILLEGAL_ARGUMENT | event_type is other than JVMTI_EVENT_COMPILED_METHOD_LOAD or JVMTI_EVENT_DYNAMIC_CODE_GENERATED.
JVMTI_ERROR_INVALID_EVENT_TYPE | event_type is not a jvmtiEvent.

Extension Mechanism

Extension Mechanism functions:
  • Get Extension Functions
  • Get Extension Events
  • Set Extension Event Callback
Extension Mechanism function types:
  • Extension Function
  • Extension Event
Extension Mechanism types:
  • jvmtiParamTypes - Extension Function/Event Parameter Types
  • jvmtiParamKind - Extension Function/Event Parameter Kinds
  • jvmtiParamInfo - Extension Function/Event Parameter Info
  • jvmtiExtensionFunctionInfo - Extension Function Info
  • jvmtiExtensionEventInfo - Extension Event Info
These functions allow a JVM TI implementation to provide functions and events beyond those defined in this specification.

Both extension functions and extension events have parameters each of which has a 'type' and 'kind' chosen from the following tables:
Extension Function/Event Parameter Types (jvmtiParamTypes)
Constant | Value | Description
JVMTI_TYPE_JBYTE | 101 | Java programming language primitive type - byte. JNI type jbyte.
JVMTI_TYPE_JCHAR | 102 | Java programming language primitive type - char. JNI type jchar.
JVMTI_TYPE_JSHORT | 103 | Java programming language primitive type - short. JNI type jshort.
JVMTI_TYPE_JINT | 104 | Java programming language primitive type - int. JNI type jint.
JVMTI_TYPE_JLONG | 105 | Java programming language primitive type - long. JNI type jlong.
JVMTI_TYPE_JFLOAT | 106 | Java programming language primitive type - float. JNI type jfloat.
JVMTI_TYPE_JDOUBLE | 107 | Java programming language primitive type - double. JNI type jdouble.
JVMTI_TYPE_JBOOLEAN | 108 | Java programming language primitive type - boolean. JNI type jboolean.
JVMTI_TYPE_JOBJECT | 109 | Java programming language object type - java.lang.Object. JNI type jobject. Returned values are JNI local references and must be managed.
JVMTI_TYPE_JTHREAD | 110 | Java programming language object type - java.lang.Thread. JVM TI type jthread. Returned values are JNI local references and must be managed.
JVMTI_TYPE_JCLASS | 111 | Java programming language object type - java.lang.Class. JNI type jclass. Returned values are JNI local references and must be managed.
JVMTI_TYPE_JVALUE | 112 | Union of all Java programming language primitive and object types - JNI type jvalue. Returned values which represent object types are JNI local references and must be managed.
JVMTI_TYPE_JFIELDID | 113 | Java programming language field identifier - JNI type jfieldID.
JVMTI_TYPE_JMETHODID | 114 | Java programming language method identifier - JNI type jmethodID.
JVMTI_TYPE_CCHAR | 115 | C programming language type - char.
JVMTI_TYPE_CVOID | 116 | C programming language type - void.
JVMTI_TYPE_JNIENV | 117 | JNI environment - JNIEnv. Should be used with the correct jvmtiParamKind to make it a pointer type.
Extension Function/Event Parameter Kinds (jvmtiParamKind)
Constant | Value | Description
JVMTI_KIND_IN | 91 | Ingoing argument - foo.
JVMTI_KIND_IN_PTR | 92 | Ingoing pointer argument - const foo*.
JVMTI_KIND_IN_BUF | 93 | Ingoing array argument - const foo*.
JVMTI_KIND_ALLOC_BUF | 94 | Outgoing allocated array argument - foo**. Free with Deallocate.
JVMTI_KIND_ALLOC_ALLOC_BUF | 95 | Outgoing allocated array of allocated arrays argument - foo***. Free with Deallocate.
JVMTI_KIND_OUT | 96 | Outgoing argument - foo*.
JVMTI_KIND_OUT_BUF | 97 | Outgoing array argument (pre-allocated by agent) - foo*. Do not Deallocate.

Extension Function/Event Parameter Info

typedef struct {
    char* name;
    jvmtiParamKind kind;
    jvmtiParamTypes base_type;
    jboolean null_ok;
} jvmtiParamInfo;
jvmtiParamInfo - Extension Function/Event Parameter Info
Field | Type | Description
name | char* | The parameter name, encoded as a modified UTF-8 string
kind | jvmtiParamKind | The kind of the parameter - type modifiers
base_type | jvmtiParamTypes | The base type of the parameter - modified by kind
null_ok | jboolean | Is a NULL argument permitted? Applies only to pointer and object types.

Extension Function

typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
    (jvmtiEnv* jvmti_env,
      ...);
This is the implementation-specific extension function.

Parameters
Name | Type | Description
jvmti_env | jvmtiEnv * | The JVM TI environment is the only fixed parameter for extension functions.
... | ... | The extension function-specific parameters

Get Extension Functions

typedef struct {
    jvmtiExtensionFunction func;
    char* id;
    char* short_description;
    jint param_count;
    jvmtiParamInfo* params;
    jint error_count;
    jvmtiError* errors;
} jvmtiExtensionFunctionInfo;
jvmtiError
GetExtensionFunctions(jvmtiEnv* env,
            jint* extension_count_ptr,
            jvmtiExtensionFunctionInfo** extensions)
Returns the set of extension functions.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 124 | 1.0

Capabilities
Required Functionality

jvmtiExtensionFunctionInfo - Extension Function Info
Field | Type | Description
func | jvmtiExtensionFunction | The actual function to call
id | char* | The identifier for the extension function, encoded as a modified UTF-8 string. Uses package name conventions. For example, com.sun.hotspot.bar
short_description | char* | A one sentence description of the function, encoded as a modified UTF-8 string.
param_count | jint | The number of parameters excluding jvmtiEnv *jvmti_env
params | jvmtiParamInfo * | Array of param_count parameters (jvmtiEnv *jvmti_env excluded)
error_count | jint | The number of possible error returns (excluding universal errors)
errors | jvmtiError * | Array of error_count possible errors

Parameters
Name | Type | Description
extension_count_ptr | jint* | On return, points to the number of extension functions Agent passes a pointer to a jint. On return, the jint has been set.
extensions | jvmtiExtensionFunctionInfo** | Returns an array of extension function info, one per function Agent passes a pointer to a jvmtiExtensionFunctionInfo*. On return, the jvmtiExtensionFunctionInfo* points to a newly allocated array of size *extension_count_ptr. The array should be freed with Deallocate. The pointers returned in the field id of jvmtiExtensionFunctionInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field short_description of jvmtiExtensionFunctionInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field params of jvmtiExtensionFunctionInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field name of jvmtiParamInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field errors of jvmtiExtensionFunctionInfo are newly allocated arrays. The arrays should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | extension_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | extensions is NULL.

Get Extension Events

typedef struct {
    jint extension_event_index;
    char* id;
    char* short_description;
    jint param_count;
    jvmtiParamInfo* params;
} jvmtiExtensionEventInfo;
jvmtiError
GetExtensionEvents(jvmtiEnv* env,
            jint* extension_count_ptr,
            jvmtiExtensionEventInfo** extensions)
Returns the set of extension events.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 125 | 1.0

Capabilities
Required Functionality

jvmtiExtensionEventInfo - Extension Event Info
Field | Type | Description
extension_event_index | jint | The identifying index of the event
id | char* | The identifier for the extension event, encoded as a modified UTF-8 string. Uses package name conventions. For example, com.sun.hotspot.bar
short_description | char* | A one sentence description of the event, encoded as a modified UTF-8 string.
param_count | jint | The number of parameters excluding jvmtiEnv *jvmti_env
params | jvmtiParamInfo * | Array of param_count parameters (jvmtiEnv *jvmti_env excluded)

Parameters
Name | Type | Description
extension_count_ptr | jint* | On return, points to the number of extension events Agent passes a pointer to a jint. On return, the jint has been set.
extensions | jvmtiExtensionEventInfo** | Returns an array of extension event info, one per event Agent passes a pointer to a jvmtiExtensionEventInfo*. On return, the jvmtiExtensionEventInfo* points to a newly allocated array of size *extension_count_ptr. The array should be freed with Deallocate. The pointers returned in the field id of jvmtiExtensionEventInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field short_description of jvmtiExtensionEventInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field params of jvmtiExtensionEventInfo are newly allocated arrays. The arrays should be freed with Deallocate. The pointers returned in the field name of jvmtiParamInfo are newly allocated arrays. The arrays should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | extension_count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | extensions is NULL.

Extension Event

typedef void (JNICALL *jvmtiExtensionEvent)
    (jvmtiEnv* jvmti_env,
      ...);
This is the implementation-specific event. The event handler is set with SetExtensionEventCallback.

Event handlers for extension events must be declared varargs to match this definition. Failure to do so could result in calling convention mismatch and undefined behavior on some platforms.

For example, if the jvmtiParamInfo returned by GetExtensionEvents indicates that there is a jint parameter, the event handler should be declared:
    void JNICALL myHandler(jvmtiEnv* jvmti_env, jint myInt, ...)
Note the terminal "..." which indicates varargs.

Parameters
Name | Type | Description
jvmti_env | jvmtiEnv * | The JVM TI environment is the only fixed parameter for extension events.
... | ... | The extension event-specific parameters

Set Extension Event Callback

jvmtiError
SetExtensionEventCallback(jvmtiEnv* env,
            jint extension_event_index,
            jvmtiExtensionEvent callback)
Sets the callback function for an extension event and enables the event. Or, if the callback is NULL, disables the event. Note that unlike standard events, setting the callback and enabling the event are a single operation.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 126 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
extension_event_index | jint | Identifies which callback to set. This index is the extension_event_index field of jvmtiExtensionEventInfo.
callback | jvmtiExtensionEvent | If callback is non-NULL, set callback to be the event callback function and enable the event. If callback is NULL, disable the event.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | extension_event_index is not an extension_event_index returned by GetExtensionEvents

Capability

Capability functions:
  • Get Potential Capabilities
  • Add Capabilities
  • Relinquish Capabilities
  • Get Capabilities
Capability types:
  • jvmtiCapabilities - The Capabilities Structure
The capabilities functions allow you to change the functionality available to JVM TI--that is, which JVM TI functions can be called, what events can be generated, and what functionality these events and functions can provide.

The "Capabilities" section of each function and event describe which capabilities, if any, they are associated with. "Required Functionality" means it is available for use and no capabilities must be added to use it. "Optional Functionality" means the agent must possess the capability before it can be used. To possess a capability, the agent must add the capability. "Optional Features" describe capabilities which, if added, extend the feature set.

The potentially available capabilities of each JVM TI implementation are different. Depending on the implementation, a capability:
  • may never be added
  • may be added in either the OnLoad or live phase in any environment
  • may be added only during the OnLoad phase
  • may be possessed by only one environment at a time
  • may be possessed by only one environment at a time, and only during the OnLoad phase
  • and so on ...
Frequently, the addition of a capability may incur a cost in execution speed, start up time, and/or memory footprint. Note that the overhead of using a capability is completely different than the overhead of possessing a capability. Take single stepping as an example. When single stepping is on (that is, when the event is enabled and thus actively sending events) the overhead of sending and processing an event on each instruction is huge in any implementation. However, the overhead of possessing the capability may be small or large, depending on the implementation. Also, when and if a capability is potentially available depends on the implementation. Some examples:
  • One VM might perform all execution by compiling bytecodes into native code and be unable to generate single step instructions. In this implementation the capability can not be added.
  • Another VM may be able to switch execution to a single stepping interpreter at any time. In this implementation, having the capability has no overhead and could be added at any time.
  • Yet another VM might be able to choose a bytecode compiling or single stepping capable interpreted execution engine at start up, but be unable to switch between them. In this implementation the capability would need to be added during the OnLoad phase (before bytecode execution begins) and would have a large impact on execution speed even if single stepping was never used.
  • Still another VM might be able to add an "is single stepping on" check into compiled bytecodes or a generated interpreter. Again in this implementation the capability would need to be added during the OnLoad phase but the overhead (a test and branch on each instruction) would be considerably less.

Each JVM TI environment has its own set of capabilities. Initially, that set is empty. Any desired capability must be added. If possible, capabilities should be added during the OnLoad phase. For most virtual machines certain capabilities require special set up for the virtual machine and this set up must happen during the OnLoad phase, before the virtual machine begins execution. Once a capability is added, it can only be removed if explicitly relinquished by the environment.

The agent can, determine what capabilities this VM can potentially provide, add the capabilities to be used, release capabilities which are no longer needed, and examine the currently available capabilities.

Capability Examples

For example, a freshly started agent (in the OnLoad function) wants to enable all possible capabilities. Note that, in general, this is not advisable as the agent may suffer a performance penalty for functionality it is not using. The code might look like this in C:
    jvmtiCapabilities capa;
    jvmtiError err;

    err = (*jvmti)->GetPotentialCapabilities(jvmti, &capa);
    if (err == JVMTI_ERROR_NONE) {
       err = (*jvmti)->AddCapabilities(jvmti, &capa);
For example, if an agent wants to check if it can get the bytecodes of a method (that is, it wants to check if it previously added this capability and has not relinquished it), the code might look like this in C:
    jvmtiCapabilities capa;
    jvmtiError err;

    err = (*jvmti)->GetCapabilities(jvmti, &capa);
    if (err == JVMTI_ERROR_NONE) {
          if (capa.can_get_bytecodes) { ... } }

The Capabilities Structure

The functions in this category use this capabilities structure which contains boolean flags corresponding to each capability:

typedef struct {
    unsigned int can_tag_objects : 1;
    unsigned int can_generate_field_modification_events : 1;
    unsigned int can_generate_field_access_events : 1;
    unsigned int can_get_bytecodes : 1;
    unsigned int can_get_synthetic_attribute : 1;
    unsigned int can_get_owned_monitor_info : 1;
    unsigned int can_get_current_contended_monitor : 1;
    unsigned int can_get_monitor_info : 1;
    unsigned int can_pop_frame : 1;
    unsigned int can_redefine_classes : 1;
    unsigned int can_signal_thread : 1;
    unsigned int can_get_source_file_name : 1;
    unsigned int can_get_line_numbers : 1;
    unsigned int can_get_source_debug_extension : 1;
    unsigned int can_access_local_variables : 1;
    unsigned int can_maintain_original_method_order : 1;
    unsigned int can_generate_single_step_events : 1;
    unsigned int can_generate_exception_events : 1;
    unsigned int can_generate_frame_pop_events : 1;
    unsigned int can_generate_breakpoint_events : 1;
    unsigned int can_suspend : 1;
    unsigned int can_redefine_any_class : 1;
    unsigned int can_get_current_thread_cpu_time : 1;
    unsigned int can_get_thread_cpu_time : 1;
    unsigned int can_generate_method_entry_events : 1;
    unsigned int can_generate_method_exit_events : 1;
    unsigned int can_generate_all_class_hook_events : 1;
    unsigned int can_generate_compiled_method_load_events : 1;
    unsigned int can_generate_monitor_events : 1;
    unsigned int can_generate_vm_object_alloc_events : 1;
    unsigned int can_generate_native_method_bind_events : 1;
    unsigned int can_generate_garbage_collection_events : 1;
    unsigned int can_generate_object_free_events : 1;
    unsigned int can_force_early_return : 1;
    unsigned int can_get_owned_monitor_stack_depth_info : 1;
    unsigned int can_get_constant_pool : 1;
    unsigned int can_set_native_method_prefix : 1;
    unsigned int can_retransform_classes : 1;
    unsigned int can_retransform_any_class : 1;
    unsigned int can_generate_resource_exhaustion_heap_events : 1;
    unsigned int can_generate_resource_exhaustion_threads_events : 1;
    unsigned int : 7;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
} jvmtiCapabilities;
jvmtiCapabilities - The Capabilities Structure
All types are unsigned int : 1
Field | Description | Since
can_tag_objects | Can set and get tags, as described in the Heap category. | 1.0
can_generate_field_modification_events | Can set watchpoints on field modification - SetFieldModificationWatch | 1.0
can_generate_field_access_events | Can set watchpoints on field access - SetFieldAccessWatch | 1.0
can_get_bytecodes | Can get bytecodes of a method GetBytecodes | 1.0
can_get_synthetic_attribute | Can test if a field or method is synthetic - IsFieldSynthetic and IsMethodSynthetic | 1.0
can_get_owned_monitor_info | Can get information about ownership of monitors - GetOwnedMonitorInfo | 1.0
can_get_current_contended_monitor | Can GetCurrentContendedMonitor | 1.0
can_get_monitor_info | Can GetObjectMonitorUsage | 1.0
can_pop_frame | Can pop frames off the stack - PopFrame | 1.0
can_redefine_classes | Can redefine classes with RedefineClasses. | 1.0
can_signal_thread | Can send stop or interrupt to threads | 1.0
can_get_source_file_name | Can get the source file name of a class | 1.0
can_get_line_numbers | Can get the line number table of a method | 1.0
can_get_source_debug_extension | Can get the source debug extension of a class | 1.0
can_access_local_variables | Can set and get local variables | 1.0
can_maintain_original_method_order | Can return methods in the order they occur in the class file | 1.0
can_generate_single_step_events | Can get single step events | 1.0
can_generate_exception_events | Can get exception thrown and exception catch events | 1.0
can_generate_frame_pop_events | Can set and thus get FramePop events | 1.0
can_generate_breakpoint_events | Can set and thus get Breakpoint events | 1.0
can_suspend | Can suspend and resume threads | 1.0
can_redefine_any_class | Can modify (retransform or redefine) any non-primitive non-array class. See IsModifiableClass. | 1.0
can_get_current_thread_cpu_time | Can get current thread CPU time | 1.0
can_get_thread_cpu_time | Can get thread CPU time | 1.0
can_generate
_method_entry_events 		Can generate method entry events on entering a method 1.0
can_generate
_method_exit_events 		Can generate method exit events on leaving a method 1.0
can_generate
_all_class_hook_events 		Can generate ClassFileLoadHook events for every loaded class. 1.0
can_generate
_compiled_method_load_events 		Can generate events when a method is compiled or unloaded 1.0
can_generate
_monitor_events 		Can generate events on monitor activity 1.0
can_generate
_vm_object_alloc_events 		Can generate events on VM allocation of an object 1.0
can_generate
_native_method_bind_events 		Can generate events when a native method is bound to its implementation 1.0
can_generate
_garbage_collection_events 		Can generate events when garbage collection begins or ends 1.0
can_generate
_object_free_events 		Can generate events when the garbage collector frees an object 1.0
can_force_early_return | Can return early from a method, as described in the Force Early Return category. | 1.1
can_get_owned_monitor_stack_depth_info | Can get information about owned monitors with stack depth - GetOwnedMonitorStackDepthInfo | 1.1
can_get_constant_pool | Can get the constant pool of a class - GetConstantPool | 1.1
can_set_native_method_prefix | Can set prefix to be applied when native method cannot be resolved - SetNativeMethodPrefix and SetNativeMethodPrefixes | 1.1
can_retransform_classes | Can retransform classes with RetransformClasses. In addition to the restrictions imposed by the specific implementation on this capability (see the Capability section), this capability must be set before the ClassFileLoadHook event is enabled for the first time in this environment. An environment that possesses this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation capable. An environment that does not possess this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation incapable. | 1.1
can_retransform_any_class | RetransformClasses can be called on any class (can_retransform_classes must also be set) | 1.1
can_generate_resource_exhaustion_heap_events | Can generate events when the VM is unable to allocate memory from the JavaTM platform heap. See ResourceExhausted. | 1.1
can_generate_resource_exhaustion_threads_events | Can generate events when the VM is unable to create a thread. See ResourceExhausted. | 1.1

Get Potential Capabilities

jvmtiError
GetPotentialCapabilities(jvmtiEnv* env,
            jvmtiCapabilities* capabilities_ptr)
Returns via capabilities_ptr the JVM TI features that can potentially be possessed by this environment at this time. The returned capabilities differ from the complete set of capabilities implemented by the VM in two cases: another environment possesses capabilities that can only be possessed by one environment, or the current phase is live, and certain capabilities can only be added during the OnLoad phase. The AddCapabilities function may be used to set any or all or these capabilities. Currently possessed capabilities are included.

Typically this function is used in the OnLoad function. Some virtual machines may allow a limited set of capabilities to be added in the live phase. In this case, the set of potentially available capabilities will likely differ from the OnLoad phase set.

See the Capability Examples.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 140 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
capabilities_ptr | jvmtiCapabilities* | On return, points to the JVM TI capabilities that may be added. Agent passes a pointer to a jvmtiCapabilities. On return, the jvmtiCapabilities has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | capabilities_ptr is NULL.

Add Capabilities

jvmtiError
AddCapabilities(jvmtiEnv* env,
            const jvmtiCapabilities* capabilities_ptr)
Set new capabilities by adding the capabilities whose values are set to one (1) in * capabilities_ptr. All previous capabilities are retained. Typically this function is used in the OnLoad function. Some virtual machines may allow a limited set of capabilities to be added in the live phase.

See the Capability Examples.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 142 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
capabilities_ptr | const jvmtiCapabilities* | Points to the JVM TI capabilities to add. Agent passes in a pointer to jvmtiCapabilities.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_AVAILABLE | The desired capabilities are not even potentially available.
JVMTI_ERROR_NULL_POINTER | capabilities_ptr is NULL.

Relinquish Capabilities

jvmtiError
RelinquishCapabilities(jvmtiEnv* env,
            const jvmtiCapabilities* capabilities_ptr)
Relinquish the capabilities whose values are set to one (1) in * capabilities_ptr. Some implementations may allow only one environment to have a capability (see the capability introduction). This function releases capabilities so that they may be used by other agents. All other capabilities are retained. The capability will no longer be present in GetCapabilities. Attempting to relinquish a capability that the agent does not possess is not an error.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 143 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
capabilities_ptr | const jvmtiCapabilities* | Points to the JVM TI capabilities to relinquish. Agent passes in a pointer to jvmtiCapabilities.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | capabilities_ptr is NULL.

Get Capabilities

jvmtiError
GetCapabilities(jvmtiEnv* env,
            jvmtiCapabilities* capabilities_ptr)
Returns via capabilities_ptr the optional JVM TI features which this environment currently possesses. Each possessed capability is indicated by a one (1) in the corresponding field of the capabilities structure. An environment does not possess a capability unless it has been successfully added with AddCapabilities. An environment only loses possession of a capability if it has been relinquished with RelinquishCapabilities. Thus, this function returns the net result of the AddCapabilities and RelinquishCapabilities calls which have been made.

See the Capability Examples.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 89 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
capabilities_ptr | jvmtiCapabilities* | On return, points to the JVM TI capabilities. Agent passes a pointer to a jvmtiCapabilities. On return, the jvmtiCapabilities has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | capabilities_ptr is NULL.

Timers

Timers functions:
  • Get Current Thread CPU Timer Information
  • Get Current Thread CPU Time
  • Get Thread CPU Timer Information
  • Get Thread CPU Time
  • Get Timer Information
  • Get Time
  • Get Available Processors
Timers types:
  • jvmtiTimerInfo - Timer Info
  • jvmtiTimerKind - Timer Kinds
These functions provide timing information. The resolution at which the time is updated is not specified. They provides nanosecond precision, but not necessarily nanosecond accuracy. Details about the timers, such as their maximum values, can be accessed with the timer information functions.

Timer Info

The information function for each timer returns this data structure.

typedef struct {
    jlong max_value;
    jboolean may_skip_forward;
    jboolean may_skip_backward;
    jvmtiTimerKind kind;
    jlong reserved1;
    jlong reserved2;
} jvmtiTimerInfo;
jvmtiTimerInfo - Timer Info
Field | Type | Description
max_value | jlong | The maximum value the timer can reach. After this value is reached the timer wraps back to zero. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number.
may_skip_forward | jboolean | If true, the timer can be externally adjusted and as a result skip forward. If false, the timer value will never increase faster than real time.
may_skip_backward | jboolean | If true, the timer can be externally adjusted and as a result skip backward. If false, the timer value will be monotonically increasing.
kind | jvmtiTimerKind | The kind of timer. On a platform that does not distinguish between user and system time, JVMTI_TIMER_TOTAL_CPU is returned.
reserved1 | jlong | Reserved for future use.
reserved2 | jlong | Reserved for future use.
Where the timer kind is --
Timer Kinds (jvmtiTimerKind)
Constant | Value | Description
JVMTI_TIMER_USER_CPU | 30 | CPU time that a thread is in user mode.
JVMTI_TIMER_TOTAL_CPU | 31 | CPU time that a thread is in user or system mode.
JVMTI_TIMER_ELAPSED | 32 | Elapsed time.

Get Current Thread CPU Timer Information

jvmtiError
GetCurrentThreadCpuTimerInfo(jvmtiEnv* env,
            jvmtiTimerInfo* info_ptr)
Get information about the GetCurrentThreadCpuTime timer. The fields of the jvmtiTimerInfo structure are filled in with details about the timer. This information is specific to the platform and the implementation of GetCurrentThreadCpuTime and thus does not vary by thread nor does it vary during a particular invocation of the VM.

Note that the implementations of GetCurrentThreadCpuTime and GetThreadCpuTime may differ, and thus the values returned by GetCurrentThreadCpuTimerInfo and GetThreadCpuTimerInfo may differ -- see GetCurrentThreadCpuTime for more information.

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 134 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_current_thread_cpu_time | Can get current thread CPU time.

Parameters
Name | Type | Description
info_ptr | jvmtiTimerInfo* | On return, filled with information describing the time returned by GetCurrentThreadCpuTime. Agent passes a pointer to a jvmtiTimerInfo. On return, the jvmtiTimerInfo has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_current_thread_cpu_time. Use AddCapabilities.
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Get Current Thread CPU Time

jvmtiError
GetCurrentThreadCpuTime(jvmtiEnv* env,
            jlong* nanos_ptr)
Return the CPU time utilized by the current thread.

Note that the GetThreadCpuTime function provides CPU time for any thread, including the current thread. GetCurrentThreadCpuTime exists to support platforms which cannot supply CPU time for threads other than the current thread or which have more accurate information for the current thread (see GetCurrentThreadCpuTimerInfo vs GetThreadCpuTimerInfo). On many platforms this call will be equivalent to:
  GetThreadCpuTime(env, NULL, nanos_ptr)

Phase | Callback Safe | Position | Since
may only be called during the start or the live phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 135 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_current_thread_cpu_time | Can get current thread CPU time. If this capability is enabled after threads have started, the implementation may choose any time up to and including the time that the capability is enabled as the point where CPU time collection starts. This capability must be potentially available on any platform where can_get_thread_cpu_time is potentially available.

Parameters
Name | Type | Description
nanos_ptr | jlong* | On return, points to the CPU time used by this thread in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_current_thread_cpu_time. Use AddCapabilities.
JVMTI_ERROR_NULL_POINTER | nanos_ptr is NULL.

Get Thread CPU Timer Information

jvmtiError
GetThreadCpuTimerInfo(jvmtiEnv* env,
            jvmtiTimerInfo* info_ptr)
Get information about the GetThreadCpuTime timer. The fields of the jvmtiTimerInfo structure are filled in with details about the timer. This information is specific to the platform and the implementation of GetThreadCpuTime and thus does not vary by thread nor does it vary during a particular invocation of the VM.

Note that the implementations of GetCurrentThreadCpuTime and GetThreadCpuTime may differ, and thus the values returned by GetCurrentThreadCpuTimerInfo and GetThreadCpuTimerInfo may differ -- see GetCurrentThreadCpuTime for more information.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 136 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_thread_cpu_time | Can get thread CPU time.

Parameters
Name | Type | Description
info_ptr | jvmtiTimerInfo* | On return, filled with information describing the time returned by GetThreadCpuTime. Agent passes a pointer to a jvmtiTimerInfo. On return, the jvmtiTimerInfo has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_thread_cpu_time. Use AddCapabilities.
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Get Thread CPU Time

jvmtiError
GetThreadCpuTime(jvmtiEnv* env,
            jthread thread,
            jlong* nanos_ptr)
Return the CPU time utilized by the specified thread.

Get information about this timer with GetThreadCpuTimerInfo.

Phase | Callback Safe | Position | Since
may only be called during the live phase | No | 137 | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this function.
Capability | Effect
can_get_thread_cpu_time | Can get thread CPU time. If this capability is enabled after threads have started, the implementation may choose any time up to and including the time that the capability is enabled as the point where CPU time collection starts.

Parameters
Name | Type | Description
thread | jthread | The thread to query. If thread is NULL, the current thread is used.
nanos_ptr | jlong* | On return, points to the CPU time used by the specified thread in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_MUST_POSSESS_CAPABILITY | The environment does not possess the capability can_get_thread_cpu_time. Use AddCapabilities.
JVMTI_ERROR_INVALID_THREAD | thread is not a thread object.
JVMTI_ERROR_THREAD_NOT_ALIVE | thread is not live (has not been started or is now dead).
JVMTI_ERROR_NULL_POINTER | nanos_ptr is NULL.

Get Timer Information

jvmtiError
GetTimerInfo(jvmtiEnv* env,
            jvmtiTimerInfo* info_ptr)
Get information about the GetTime timer. The fields of the jvmtiTimerInfo structure are filled in with details about the timer. This information will not change during a particular invocation of the VM.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 138 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
info_ptr | jvmtiTimerInfo* | On return, filled with information describing the time returned by GetTime. Agent passes a pointer to a jvmtiTimerInfo. On return, the jvmtiTimerInfo has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | info_ptr is NULL.

Get Time

jvmtiError
GetTime(jvmtiEnv* env,
            jlong* nanos_ptr)
Return the current value of the system timer, in nanoseconds.

The value returned represents nanoseconds since some fixed but arbitrary time (perhaps in the future, so values may be negative). This function provides nanosecond precision, but not necessarily nanosecond accuracy. No guarantees are made about how frequently values change.

Get information about this timer with GetTimerInfo.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 139 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
nanos_ptr | jlong* | On return, points to the time in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. Agent passes a pointer to a jlong. On return, the jlong has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | nanos_ptr is NULL.

Get Available Processors

jvmtiError
GetAvailableProcessors(jvmtiEnv* env,
            jint* processor_count_ptr)
Returns the number of processors available to the Java virtual machine.

This value may change during a particular invocation of the virtual machine. Applications that are sensitive to the number of available processors should therefore occasionally poll this property.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 144 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
processor_count_ptr | jint* | On return, points to the maximum number of processors available to the virtual machine; never smaller than one. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | processor_count_ptr is NULL.

Class Loader Search

Class Loader Search functions:
  • Add To Bootstrap Class Loader Search
  • Add To System Class Loader Search
These functions allow the agent to add to the locations that a class loader searches for a class. This is useful for installing instrumentation under the correct class loader.

Add To Bootstrap Class Loader Search

jvmtiError
AddToBootstrapClassLoaderSearch(jvmtiEnv* env,
            const char* segment)
This function can be used to cause instrumentation classes to be defined by the bootstrap class loader. See The Java™ Virtual Machine Specification, Chapter 5.3.1. After the bootstrap class loader unsuccessfully searches for a class, the specified platform-dependent search path segment will be searched as well. Only one segment may be specified in the segment. This function may be called multiple times to add multiple segments, the segments will be searched in the order that this function was called.

In the OnLoad phase the function may be used to specify any platform-dependent search path segment to be searched after the bootstrap class loader unsuccessfully searches for a class. The segment is typically a directory or JAR file.

In the live phase the segment may be used to specify any platform-dependent path to a JAR file. The agent should take care that the JAR file does not contain any classes or resources other than those to be defined by the bootstrap class loader for the purposes of instrumentation.

The Java™ Virtual Machine Specification specifies that a subsequent attempt to resolve a symbolic reference that the Java virtual machine has previously unsuccessfully attempted to resolve always fails with the same error that was thrown as a result of the initial resolution attempt. Consequently, if the JAR file contains an entry that corresponds to a class for which the Java virtual machine has unsuccessfully attempted to resolve a reference, then subsequent attempts to resolve that reference will fail with the same error as the initial attempt.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 149 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
segment | const char* | The platform-dependent search path segment, encoded as a modified UTF-8 string. Agent passes in an array of char.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | segment is an invalid path. In the live phase, anything other than an existing JAR file is an invalid path.
JVMTI_ERROR_NULL_POINTER | segment is NULL.

Add To System Class Loader Search

jvmtiError
AddToSystemClassLoaderSearch(jvmtiEnv* env,
            const char* segment)
This function can be used to cause instrumentation classes to be defined by the system class loader. See The Java™ Virtual Machine Specification, Chapter 5.3.2. After the class loader unsuccessfully searches for a class, the specified platform-dependent search path segment will be searched as well. Only one segment may be specified in the segment. This function may be called multiple times to add multiple segments, the segments will be searched in the order that this function was called.

In the OnLoad phase the function may be used to specify any platform-dependent search path segment to be searched after the system class loader unsuccessfully searches for a class. The segment is typically a directory or JAR file.

In the live phase the segment is a platform-dependent path to a JAR file to be searched after the system class loader unsuccessfully searches for a class. The agent should take care that the JAR file does not contain any classes or resources other than those to be defined by the system class loader for the purposes of instrumentation.

In the live phase the system class loader supports adding a JAR file to be searched if the system class loader implements a method name appendToClassPathForInstrumentation which takes a single parameter of type java.lang.String. The method is not required to have public access.

The Java™ Virtual Machine Specification specifies that a subsequent attempt to resolve a symbolic reference that the Java virtual machine has previously unsuccessfully attempted to resolve always fails with the same error that was thrown as a result of the initial resolution attempt. Consequently, if the JAR file contains an entry that corresponds to a class for which the Java virtual machine has unsuccessfully attempted to resolve a reference, then subsequent attempts to resolve that reference will fail with the same error as the initial attempt.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 151 | 1.1

Capabilities
Required Functionality

Parameters
Name | Type | Description
segment | const char* | The platform-dependent search path segment, encoded as a modified UTF-8 string. Agent passes in an array of char.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | segment is an invalid path. In the live phase, anything other than an existing JAR file is an invalid path.
JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED | Operation not supported by the system class loader.
JVMTI_ERROR_NULL_POINTER | segment is NULL.

System Properties

System Properties functions:
  • Get System Properties
  • Get System Property
  • Set System Property
These functions get and set system properties.

Get System Properties

jvmtiError
GetSystemProperties(jvmtiEnv* env,
            jint* count_ptr,
            char*** property_ptr)
The list of VM system property keys which may be used with GetSystemProperty is returned. It is strongly recommended that virtual machines provide the following property keys:
  • java.vm.vendor
  • java.vm.version
  • java.vm.name
  • java.vm.info
  • java.library.path
  • java.class.path
Provides access to system properties defined by and used by the VM. Properties set on the command-line are included. This allows getting and setting of these properties before the VM even begins executing bytecodes. Since this is a VM view of system properties, the set of available properties will usually be different than that in java.lang.System.getProperties. JNI method invocation may be used to access java.lang.System.getProperties.

The set of properties may grow during execution.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 130 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
count_ptr | jint* | On return, points to the number of property keys returned. Agent passes a pointer to a jint. On return, the jint has been set.
property_ptr | char*** | On return, points to an array of property keys, encoded as modified UTF-8 strings. Agent passes a pointer to a char**. On return, the char** points to a newly allocated array of size *count_ptr, each element of which is also newly allocated. The array should be freed with Deallocate. Each of the elements should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | count_ptr is NULL.
JVMTI_ERROR_NULL_POINTER | property_ptr is NULL.

Get System Property

jvmtiError
GetSystemProperty(jvmtiEnv* env,
            const char* property,
            char** value_ptr)
Return a VM system property value given the property key.

The function GetSystemProperties returns the set of property keys which may be used. The properties which can be retrieved may grow during execution.

Since this is a VM view of system properties, the values of properties may differ from that returned by java.lang.System.getProperty(String). A typical VM might copy the values of the VM system properties into the Properties held by java.lang.System during the initialization of that class. Thereafter any changes to the VM system properties (with SetSystemProperty) or the java.lang.System system properties (with java.lang.System.setProperty(String,String)) would cause the values to diverge. JNI method invocation may be used to access java.lang.System.getProperty(String).

Phase | Callback Safe | Position | Since
may only be called during the OnLoad or the live phase | No | 131 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
property | const char* | The key of the property to retrieve, encoded as a modified UTF-8 string. Agent passes in an array of char.
value_ptr | char** | On return, points to the property value, encoded as a modified UTF-8 string. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_AVAILABLE | This property is not available. Use GetSystemProperties to find available properties.
JVMTI_ERROR_NULL_POINTER | property is NULL.
JVMTI_ERROR_NULL_POINTER | value_ptr is NULL.

Set System Property

jvmtiError
SetSystemProperty(jvmtiEnv* env,
            const char* property,
            const char* value_ptr)
Set a VM system property value.

The function GetSystemProperties returns the set of property keys, some of these may be settable. See GetSystemProperty.

Phase | Callback Safe | Position | Since
may only be called during the OnLoad phase | No | 132 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
property | const char* | The key of the property, encoded as a modified UTF-8 string. Agent passes in an array of char.
value_ptr | const char * | The property value to set, encoded as a modified UTF-8 string. Agent passes in an array of char. If value_ptr is NULL, do not set the value, but return JVMTI_ERROR_NOT_AVAILABLE if the property is not writeable .

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NOT_AVAILABLE | This property is not available or is not writeable.
JVMTI_ERROR_NULL_POINTER | property is NULL.

General

General functions:
  • Get Phase
  • Dispose Environment
  • Set Environment Local Storage
  • Get Environment Local Storage
  • Get Version Number
  • Get Error Name
  • Set Verbose Flag
  • Get JLocation Format
General types:
  • jvmtiPhase - Phases of execution
  • jvmtiVerboseFlag - Verbose Flag Enumeration
  • jvmtiJlocationFormat - JLocation Format Enumeration
General flags and constants:
  • Version Interface Types
  • Version Masks
  • Version Shifts

Get Phase

typedef enum {
    JVMTI_PHASE_ONLOAD = 1,
    JVMTI_PHASE_PRIMORDIAL = 2,
    JVMTI_PHASE_START = 6,
    JVMTI_PHASE_LIVE = 4,
    JVMTI_PHASE_DEAD = 8
} jvmtiPhase;
jvmtiError
GetPhase(jvmtiEnv* env,
            jvmtiPhase* phase_ptr)
Return the current phase of VM execution. The phases proceed in sequence:
Phases of execution (jvmtiPhase)
Constant | Value | Description
JVMTI_PHASE_ONLOAD | 1 | OnLoad phase: while in the Agent_OnLoad or, for statically linked agents, the Agent_OnLoad_<agent-lib-name> function.
JVMTI_PHASE_PRIMORDIAL | 2 | Primordial phase: between return from Agent_OnLoad or Agent_OnLoad_<agent-lib-name> and the VMStart event.
JVMTI_PHASE_START | 6 | Start phase: when the VMStart event is sent and until the VMInit event is sent.
JVMTI_PHASE_LIVE | 4 | Live phase: when the VMInit event is sent and until the VMDeath event returns.
JVMTI_PHASE_DEAD | 8 | Dead phase: after the VMDeath event returns or after start-up failure.
In the case of start-up failure the VM will proceed directly to the dead phase skipping intermediate phases and neither a VMInit nor VMDeath event will be sent.

Most JVM TI functions operate only in the live phase. The following functions operate in either the OnLoad or live phases:
  • CreateRawMonitor
  • DestroyRawMonitor
  • SetEventCallbacks
  • SetEventNotificationMode
  • GetExtensionFunctions
  • GetExtensionEvents
  • SetExtensionEventCallback
  • GetPotentialCapabilities
  • AddCapabilities
  • RelinquishCapabilities
  • AddToBootstrapClassLoaderSearch
  • AddToSystemClassLoaderSearch
  • GetSystemProperties
  • GetSystemProperty
The following functions operate in only the OnLoad phase:
  • SetSystemProperty
The following functions operate in the start or live phases:
  • GetCurrentThread
  • SetThreadLocalStorage
  • GetThreadLocalStorage
  • GetTag
  • SetTag
  • GetClassSignature
  • GetClassStatus
  • GetSourceFileName
  • GetClassModifiers
  • GetClassMethods
  • GetClassFields
  • GetImplementedInterfaces
  • GetClassVersionNumbers
  • GetConstantPool
  • IsInterface
  • IsArrayClass
  • IsModifiableClass
  • GetClassLoader
  • GetSourceDebugExtension
  • GetObjectSize
  • GetObjectHashCode
  • GetFieldName
  • GetFieldDeclaringClass
  • GetFieldModifiers
  • IsFieldSynthetic
  • GetMethodName
  • GetMethodDeclaringClass
  • GetMethodModifiers
  • GetMaxLocals
  • GetArgumentsSize
  • GetLineNumberTable
  • GetMethodLocation
  • GetBytecodes
  • IsMethodNative
  • IsMethodSynthetic
  • IsMethodObsolete
  • SetJNIFunctionTable
  • GetJNIFunctionTable
  • GetCurrentThreadCpuTimerInfo
  • GetCurrentThreadCpuTime
The following functions operate in any phase:
  • Allocate
  • Deallocate
  • SetNativeMethodPrefix
  • SetNativeMethodPrefixes
  • RawMonitorEnter
  • RawMonitorExit
  • RawMonitorWait
  • RawMonitorNotify
  • RawMonitorNotifyAll
  • GetCapabilities
  • GetTimerInfo
  • GetTime
  • GetAvailableProcessors
  • GetPhase
  • DisposeEnvironment
  • SetEnvironmentLocalStorage
  • GetEnvironmentLocalStorage
  • GetVersionNumber
  • GetErrorName
  • SetVerboseFlag
  • GetJLocationFormat
JNI functions (except the Invocation API) must only be used in the start or live phases.

Most JVM TI events are sent only in the live phase. The following events operate in others phases:
  • ThreadStart
  • ThreadEnd
  • ClassLoad
  • ClassPrepare
  • VMStart
  • NativeMethodBind
  • ClassFileLoadHook
  • DynamicCodeGenerated

Phase | Callback Safe | Position | Since
may be called during any phase | No | 133 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
phase_ptr | jvmtiPhase* | On return, points to the phase. Agent passes a pointer to a jvmtiPhase. On return, the jvmtiPhase has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | phase_ptr is NULL.

Dispose Environment

jvmtiError
DisposeEnvironment(jvmtiEnv* env)
Shutdown a JVM TI connection created with JNI GetEnv (see JVM TI Environments). Dispose of any resources held by the environment. Threads suspended by this environment are not resumed by this call, this must be done explicitly by the agent. Memory allocated by this environment via calls to JVM TI functions is not released, this can be done explicitly by the agent by calling Deallocate. Raw monitors created by this environment are not destroyed, this can be done explicitly by the agent by calling DestroyRawMonitor. The state of threads waiting on raw monitors created by this environment are not affected.

Any native method prefixes for this environment will be unset; the agent must remove any prefixed native methods before dispose is called.

Any capabilities held by this environment are relinquished.

Events enabled by this environment will no longer be sent, however event handlers currently running will continue to run. Caution must be exercised in the design of event handlers whose environment may be disposed and thus become invalid during their execution.

This environment may not be used after this call. This call returns to the caller.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 127 | 1.0

Capabilities
Required Functionality

Parameters
Name Type Description

Errors
This function returns a universal error

Set Environment Local Storage

jvmtiError
SetEnvironmentLocalStorage(jvmtiEnv* env,
            const void* data)
The VM stores a pointer value associated with each environment. This pointer value is called environment-local storage. This value is NULL unless set with this function. Agents can allocate memory in which they store environment specific information. By setting environment-local storage it can then be accessed with GetEnvironmentLocalStorage.

Called by the agent to set the value of the JVM TI environment-local storage. JVM TI supplies to the agent a pointer-size environment-local storage that can be used to record per-environment information.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 148 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
data | const void * | The value to be entered into the environment-local storage. Agent passes in a pointer. If data is NULL, value is set to NULL.

Errors
This function returns a universal error

Get Environment Local Storage

jvmtiError
GetEnvironmentLocalStorage(jvmtiEnv* env,
            void** data_ptr)
Called by the agent to get the value of the JVM TI environment-local storage.

Phase | Callback Safe | Position | Since
may be called during any phase | This function may be called from the callbacks to the Heap iteration functions, or from the event handlers for the GarbageCollectionStart, GarbageCollectionFinish, and ObjectFree events. | 147 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
data_ptr | void** | Pointer through which the value of the environment local storage is returned. If environment-local storage has not been set with SetEnvironmentLocalStorage returned pointer is NULL.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | data_ptr is NULL.

Get Version Number

jvmtiError
GetVersionNumber(jvmtiEnv* env,
            jint* version_ptr)
Return the JVM TI version via version_ptr. The return value is the version identifier. The version identifier includes major, minor and micro version as well as the interface type.
Version Interface Types
Constant | Value | Description
JVMTI_VERSION_INTERFACE_JNI | 0x00000000 | Value of JVMTI_VERSION_MASK_INTERFACE_TYPE for JNI.
JVMTI_VERSION_INTERFACE_JVMTI | 0x30000000 | Value of JVMTI_VERSION_MASK_INTERFACE_TYPE for JVM TI.
Version Masks
Constant | Value | Description
JVMTI_VERSION_MASK_INTERFACE_TYPE | 0x70000000 | Mask to extract interface type. The value of the version returned by this function masked with JVMTI_VERSION_MASK_INTERFACE_TYPE is always JVMTI_VERSION_INTERFACE_JVMTI since this is a JVM TI function.
JVMTI_VERSION_MASK_MAJOR | 0x0FFF0000 | Mask to extract major version number.
JVMTI_VERSION_MASK_MINOR | 0x0000FF00 | Mask to extract minor version number.
JVMTI_VERSION_MASK_MICRO | 0x000000FF | Mask to extract micro version number.
Version Shifts
Constant | Value | Description
JVMTI_VERSION_SHIFT_MAJOR | 16 | Shift to extract major version number.
JVMTI_VERSION_SHIFT_MINOR | 8 | Shift to extract minor version number.
JVMTI_VERSION_SHIFT_MICRO | 0 | Shift to extract micro version number.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 88 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
version_ptr | jint* | On return, points to the JVM TI version. Agent passes a pointer to a jint. On return, the jint has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | version_ptr is NULL.

Get Error Name

jvmtiError
GetErrorName(jvmtiEnv* env,
            jvmtiError error,
            char** name_ptr)
Return the symbolic name for an error code.

For example GetErrorName(env, JVMTI_ERROR_NONE, &err_name) would return in err_name the string "JVMTI_ERROR_NONE".

Phase | Callback Safe | Position | Since
may be called during any phase | No | 128 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
error | jvmtiError | The error code.
name_ptr | char** | On return, points to the error name. The name is encoded as a modified UTF-8 string, but is restricted to the ASCII subset. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | error is not a jvmtiError.
JVMTI_ERROR_NULL_POINTER | name_ptr is NULL.

Set Verbose Flag

typedef enum {
    JVMTI_VERBOSE_OTHER = 0,
    JVMTI_VERBOSE_GC = 1,
    JVMTI_VERBOSE_CLASS = 2,
    JVMTI_VERBOSE_JNI = 4
} jvmtiVerboseFlag;
jvmtiError
SetVerboseFlag(jvmtiEnv* env,
            jvmtiVerboseFlag flag,
            jboolean value)
Verbose Flag Enumeration (jvmtiVerboseFlag)
Constant | Value | Description
JVMTI_VERBOSE_OTHER | 0 | Verbose output other than the below.
JVMTI_VERBOSE_GC | 1 | Verbose garbage collector output, like that specified with -verbose:gc.
JVMTI_VERBOSE_CLASS | 2 | Verbose class loading output, like that specified with -verbose:class.
JVMTI_VERBOSE_JNI | 4 | Verbose JNI output, like that specified with -verbose:jni.
Control verbose output. This is the output which typically is sent to stderr.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 150 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
flag | jvmtiVerboseFlag | Which verbose flag to set.
value | jboolean | New value of the flag.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_ILLEGAL_ARGUMENT | flag is not a jvmtiVerboseFlag.

Get JLocation Format

typedef enum {
    JVMTI_JLOCATION_JVMBCI = 1,
    JVMTI_JLOCATION_MACHINEPC = 2,
    JVMTI_JLOCATION_OTHER = 0
} jvmtiJlocationFormat;
jvmtiError
GetJLocationFormat(jvmtiEnv* env,
            jvmtiJlocationFormat* format_ptr)
Although the greatest functionality is achieved with location information referencing the virtual machine bytecode index, the definition of jlocation has intentionally been left unconstrained to allow VM implementations that do not have this information.

This function describes the representation of jlocation used in this VM. If the returned format is JVMTI_JLOCATION_JVMBCI, jlocations can be used as in indices into the array returned by GetBytecodes.
JLocation Format Enumeration (jvmtiJlocationFormat)
Constant | Value | Description
JVMTI_JLOCATION_JVMBCI | 1 | jlocation values represent virtual machine bytecode indices--that is, offsets into the virtual machine code for a method.
JVMTI_JLOCATION_MACHINEPC | 2 | jlocation values represent native machine program counter values.
JVMTI_JLOCATION_OTHER | 0 | jlocation values have some other representation.

Phase | Callback Safe | Position | Since
may be called during any phase | No | 129 | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
format_ptr | jvmtiJlocationFormat* | On return, points to the format identifier for jlocation values. Agent passes a pointer to a jvmtiJlocationFormat. On return, the jvmtiJlocationFormat has been set.

Errors
This function returns either a universal error or one of the following errors
Error | Description
JVMTI_ERROR_NULL_POINTER | format_ptr is NULL.

Errors

Every JVM TI function returns a jvmtiError error code.

It is the responsibility of the agent to call JVM TI functions with valid parameters and in the proper context (calling thread is attached, phase is correct, etc.). Detecting some error conditions may be difficult, inefficient, or impossible for an implementation. The errors listed in Function Specific Required Errors must be detected by the implementation. All other errors represent the recommended response to the error condition.

Universal Errors

The following errors may be returned by any function

JVMTI_ERROR_NONE (0)
No error has occurred. This is the error code that is returned on successful completion of the function.

JVMTI_ERROR_NULL_POINTER (100)
Pointer is unexpectedly NULL.

JVMTI_ERROR_OUT_OF_MEMORY (110)
The function attempted to allocate memory and no more memory was available for allocation.

JVMTI_ERROR_ACCESS_DENIED (111)
The desired functionality has not been enabled in this virtual machine.

JVMTI_ERROR_UNATTACHED_THREAD (115)
The thread being used to call this function is not attached to the virtual machine. Calls must be made from attached threads. See AttachCurrentThread in the JNI invocation API.

JVMTI_ERROR_INVALID_ENVIRONMENT (116)
The JVM TI environment provided is no longer connected or is not an environment.

JVMTI_ERROR_WRONG_PHASE (112)
The desired functionality is not available in the current phase. Always returned if the virtual machine has completed running.

JVMTI_ERROR_INTERNAL (113)
An unexpected internal error has occurred.

Function Specific Required Errors

The following errors are returned by some JVM TI functions and must be returned by the implementation when the condition occurs.

JVMTI_ERROR_INVALID_PRIORITY (12)
Invalid priority.

JVMTI_ERROR_THREAD_NOT_SUSPENDED (13)
Thread was not suspended.

JVMTI_ERROR_THREAD_SUSPENDED (14)
Thread already suspended.

JVMTI_ERROR_THREAD_NOT_ALIVE (15)
This operation requires the thread to be alive--that is, it must be started and not yet have died.

JVMTI_ERROR_CLASS_NOT_PREPARED (22)
The class has been loaded but not yet prepared.

JVMTI_ERROR_NO_MORE_FRAMES (31)
There are no Java programming language or JNI stack frames at the specified depth.

JVMTI_ERROR_OPAQUE_FRAME (32)
Information about the frame is not available (e.g. for native frames).

JVMTI_ERROR_DUPLICATE (40)
Item already set.

JVMTI_ERROR_NOT_FOUND (41)
Desired element (e.g. field or breakpoint) not found

JVMTI_ERROR_NOT_MONITOR_OWNER (51)
This thread doesn't own the raw monitor.

JVMTI_ERROR_INTERRUPT (52)
The call has been interrupted before completion.

JVMTI_ERROR_UNMODIFIABLE_CLASS (79)
The class cannot be modified.

JVMTI_ERROR_NOT_AVAILABLE (98)
The functionality is not available in this virtual machine.

JVMTI_ERROR_ABSENT_INFORMATION (101)
The requested information is not available.

JVMTI_ERROR_INVALID_EVENT_TYPE (102)
The specified event type ID is not recognized.

JVMTI_ERROR_NATIVE_METHOD (104)
The requested information is not available for native method.

JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED (106)
The class loader does not support this operation.

Function Specific Agent Errors

The following errors are returned by some JVM TI functions. They are returned in the event of invalid parameters passed by the agent or usage in an invalid context. An implementation is not required to detect these errors.

JVMTI_ERROR_INVALID_THREAD (10)
The passed thread is not a valid thread.

JVMTI_ERROR_INVALID_FIELDID (25)
Invalid field.

JVMTI_ERROR_INVALID_METHODID (23)
Invalid method.

JVMTI_ERROR_INVALID_LOCATION (24)
Invalid location.

JVMTI_ERROR_INVALID_OBJECT (20)
Invalid object.

JVMTI_ERROR_INVALID_CLASS (21)
Invalid class.

JVMTI_ERROR_TYPE_MISMATCH (34)
The variable is not an appropriate type for the function used.

JVMTI_ERROR_INVALID_SLOT (35)
Invalid slot.

JVMTI_ERROR_MUST_POSSESS_CAPABILITY (99)
The capability being used is false in this environment.

JVMTI_ERROR_INVALID_THREAD_GROUP (11)
Thread group invalid.

JVMTI_ERROR_INVALID_MONITOR (50)
Invalid raw monitor.

JVMTI_ERROR_ILLEGAL_ARGUMENT (103)
Illegal argument.

JVMTI_ERROR_INVALID_TYPESTATE (65)
The state of the thread has been modified, and is now inconsistent.

JVMTI_ERROR_UNSUPPORTED_VERSION (68)
A new class file has a version number not supported by this VM.

JVMTI_ERROR_INVALID_CLASS_FORMAT (60)
A new class file is malformed (the VM would return a ClassFormatError).

JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION (61)
The new class file definitions would lead to a circular definition (the VM would return a ClassCircularityError).

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED (63)
A new class file would require adding a method.

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED (64)
A new class version changes a field.

JVMTI_ERROR_FAILS_VERIFICATION (62)
The class bytes fail verification.

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED (66)
A direct superclass is different for the new class version, or the set of directly implemented interfaces is different.

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED (67)
A new class version does not declare a method declared in the old class version.

JVMTI_ERROR_NAMES_DONT_MATCH (69)
The class name defined in the new class file is different from the name in the old class object.

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED (70)
A new class version has different modifiers.

JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED (71)
A method in the new class version has different modifiers than its counterpart in the old class version.

Data Types

JVM TI extends the data types defined by JNI.

JNI Types Used in the JVM Tool Interface
Type | Description
jboolean | Holds a Java programming language boolean. Unsigned 8 bits.
jchar | Holds a Java programming language char. Unsigned 16 bits.
jint | Holds a Java programming language int. Signed 32 bits.
jlong | Holds a Java programming language long. Signed 64 bits.
jfloat | Holds a Java programming language float. 32 bits.
jdouble | Holds a Java programming language double. 64 bits.
jobject | Holds a Java programming language object.
jclass | Holds a Java programming language class.
jvalue | Is a union of all primitive types and jobject. Thus, holds any Java programming language value.
jfieldID | Identifies a Java programming language field. jfieldIDs returned by JVM TI functions and events may be safely stored.
jmethodID | Identifies a Java programming language method, initializer, or constructor. jmethodIDs returned by JVM TI functions and events may be safely stored. However, if the class is unloaded, they become invalid and must not be used.
JNIEnv | Pointer to the JNI function table. Pointer to this (JNIEnv *) is a JNI environment.

JVM Tool Interface Base Types
Type | Description
jvmtiEnv | The JVM TI environment pointer. See the Function Section. jvmtiEnv points to the function table pointer.
jthread | Subtype of jobject that holds a thread.
typedef jobject jthread;
jthreadGroup | Subtype of jobject that holds a thread group.
typedef jobject jthreadGroup;
jlocation | A 64 bit value, representing a monotonically increasing executable position within a method. -1 indicates a native method. See GetJLocationFormat for the format on a given VM.
typedef jlong jlocation;
jrawMonitorID | A raw monitor.
struct _jrawMonitorID;
typedef struct _jrawMonitorID *jrawMonitorID;
jvmtiError Holds an error return code. See the Error section for possible values.
typedef enum {
    JVMTI_ERROR_NONE = 0,
    JVMTI_ERROR_INVALID_THREAD = 10,
      ...
} jvmtiError;
jvmtiEvent An identifier for an event type. See the Event section for possible values. It is guaranteed that future versions of this specification will never assign zero as an event type identifier.
typedef enum {
    JVMTI_EVENT_SINGLE_STEP = 1,
    JVMTI_EVENT_BREAKPOINT = 2,
      ...
} jvmtiEvent;
jvmtiEventCallbacks The callbacks used for events.
typedef struct {
    jvmtiEventVMInit VMInit;
    jvmtiEventVMDeath VMDeath;
      ...
} jvmtiEventCallbacks;
See event callbacks for the complete structure.

Where, for example, the VM initialization callback is defined:
typedef void (JNICALL *jvmtiEventVMInit)
    (jvmtiEnv *jvmti_env,
     JNIEnv* jni_env,
     jthread thread);
See the individual events for the callback function definition.
jniNativeInterface | Typedef for the JNI function table JNINativeInterface defined in the JNI Specification. The JNI reference implementation defines this with an underscore.
typedef struct JNINativeInterface_ jniNativeInterface;

Structure Type Definitions
Type | Description
jvmtiAddrLocationMap | Native address to location entry
jvmtiCapabilities | The Capabilities Structure
jvmtiClassDefinition | Class redefinition description
jvmtiExtensionEventInfo | Extension Event Info
jvmtiExtensionFunctionInfo | Extension Function Info
jvmtiFrameInfo | Stack frame information structure
jvmtiHeapCallbacks | Heap callback function structure
jvmtiHeapReferenceInfo | Reference information structure
jvmtiHeapReferenceInfoArray | Reference information structure for Array references
jvmtiHeapReferenceInfoConstantPool | Reference information structure for Constant Pool references
jvmtiHeapReferenceInfoField | Reference information structure for Field references
jvmtiHeapReferenceInfoJniLocal | Reference information structure for JNI local references
jvmtiHeapReferenceInfoReserved | Reference information structure for Other references
jvmtiHeapReferenceInfoStackLocal | Reference information structure for Local Variable references
jvmtiLineNumberEntry | Line number table entry
jvmtiLocalVariableEntry | Local variable table entry
jvmtiMonitorStackDepthInfo | Monitor stack depth information structure
jvmtiMonitorUsage | Object monitor usage information
jvmtiParamInfo | Extension Function/Event Parameter Info
jvmtiStackInfo | Stack information structure
jvmtiThreadGroupInfo | Thread group information structure
jvmtiThreadInfo | Thread information structure
jvmtiTimerInfo | Timer Info

Function Type Definitions
Type | Description
jvmtiArrayPrimitiveValueCallback | Array Primitive Value Callback
jvmtiExtensionEvent | Extension Event
jvmtiExtensionFunction | Extension Function
jvmtiHeapIterationCallback | Heap Iteration Callback
jvmtiHeapObjectCallback | Heap Object Callback
jvmtiHeapReferenceCallback | Heap Reference Callback
jvmtiHeapRootCallback | Heap Root Object Callback
jvmtiObjectReferenceCallback | Object Reference Callback
jvmtiPrimitiveFieldCallback | Primitive Field Callback
jvmtiReservedCallback | reserved for future use Callback
jvmtiStackReferenceCallback | Stack Reference Object Callback
jvmtiStartFunction | Agent Start Function
jvmtiStringPrimitiveValueCallback | String Primitive Value Callback

Enumeration Definitions
Type | Description
jvmtiEventMode | Event Enable/Disable
jvmtiHeapObjectFilter | Heap Object Filter Enumeration
jvmtiHeapReferenceKind | Heap Reference Enumeration
jvmtiHeapRootKind | Heap Root Kind Enumeration
jvmtiIterationControl | Iteration Control Enumeration
jvmtiJlocationFormat | JLocation Format Enumeration
jvmtiObjectReferenceKind | Object Reference Enumeration
jvmtiParamKind | Extension Function/Event Parameter Kinds
jvmtiParamTypes | Extension Function/Event Parameter Types
jvmtiPhase | Phases of execution
jvmtiPrimitiveType | Primitive Type Enumeration
jvmtiTimerKind | Timer Kinds
jvmtiVerboseFlag | Verbose Flag Enumeration

Function Table Layout
Position Function Declaration
1 reserved
void *reserved1;
2 Set Event Notification Mode
jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env,
                       jvmtiEventMode mode,
                       jvmtiEvent event_type,
                       jthread event_thread,
                        ...);
3 reserved
void *reserved3;
4 Get All Threads
jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env,
                       jint* threads_count_ptr,
                       jthread** threads_ptr);
5 Suspend Thread
jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env,
                       jthread thread);
6 Resume Thread
jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env,
                       jthread thread);
7 Stop Thread
jvmtiError (JNICALL *StopThread) (jvmtiEnv* env,
                       jthread thread,
                       jobject exception);
8 Interrupt Thread
jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env,
                       jthread thread);
9 Get Thread Info
jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env,
                       jthread thread,
                       jvmtiThreadInfo* info_ptr);
10 Get Owned Monitor Info
jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env,
                       jthread thread,
                       jint* owned_monitor_count_ptr,
                       jobject** owned_monitors_ptr);
11 Get Current Contended Monitor
jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env,
                       jthread thread,
                       jobject* monitor_ptr);
12 Run Agent Thread
jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env,
                       jthread thread,
                       jvmtiStartFunction proc,
                       const void* arg,
                       jint priority);
13 Get Top Thread Groups
jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env,
                       jint* group_count_ptr,
                       jthreadGroup** groups_ptr);
14 Get Thread Group Info
jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env,
                       jthreadGroup group,
                       jvmtiThreadGroupInfo* info_ptr);
15 Get Thread Group Children
jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env,
                       jthreadGroup group,
                       jint* thread_count_ptr,
                       jthread** threads_ptr,
                       jint* group_count_ptr,
                       jthreadGroup** groups_ptr);
16 Get Frame Count
jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env,
                       jthread thread,
                       jint* count_ptr);
17 Get Thread State
jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env,
                       jthread thread,
                       jint* thread_state_ptr);
18 Get Current Thread
jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env,
                       jthread* thread_ptr);
19 Get Frame Location
jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jmethodID* method_ptr,
                       jlocation* location_ptr);
20 Notify Frame Pop
jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env,
                       jthread thread,
                       jint depth);
21 Get Local Variable - Object
jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jobject* value_ptr);
22 Get Local Variable - Int
jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jint* value_ptr);
23 Get Local Variable - Long
jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jlong* value_ptr);
24 Get Local Variable - Float
jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jfloat* value_ptr);
25 Get Local Variable - Double
jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jdouble* value_ptr);
26 Set Local Variable - Object
jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jobject value);
27 Set Local Variable - Int
jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jint value);
28 Set Local Variable - Long
jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jlong value);
29 Set Local Variable - Float
jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jfloat value);
30 Set Local Variable - Double
jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jint slot,
                       jdouble value);
31 Create Raw Monitor
jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env,
                       const char* name,
                       jrawMonitorID* monitor_ptr);
32 Destroy Raw Monitor
jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env,
                       jrawMonitorID monitor);
33 Raw Monitor Enter
jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env,
                       jrawMonitorID monitor);
34 Raw Monitor Exit
jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env,
                       jrawMonitorID monitor);
35 Raw Monitor Wait
jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env,
                       jrawMonitorID monitor,
                       jlong millis);
36 Raw Monitor Notify
jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env,
                       jrawMonitorID monitor);
37 Raw Monitor Notify All
jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env,
                       jrawMonitorID monitor);
38 Set Breakpoint
jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env,
                       jmethodID method,
                       jlocation location);
39 Clear Breakpoint
jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env,
                       jmethodID method,
                       jlocation location);
40 reserved
void *reserved40;
41 Set Field Access Watch
jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field);
42 Clear Field Access Watch
jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field);
43 Set Field Modification Watch
jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field);
44 Clear Field Modification Watch
jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field);
45 Is Modifiable Class
jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env,
                       jclass klass,
                       jboolean* is_modifiable_class_ptr);
46 Allocate
jvmtiError (JNICALL *Allocate) (jvmtiEnv* env,
                       jlong size,
                       unsigned char** mem_ptr);
47 Deallocate
jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env,
                       unsigned char* mem);
48 Get Class Signature
jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env,
                       jclass klass,
                       char** signature_ptr,
                       char** generic_ptr);
49 Get Class Status
jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env,
                       jclass klass,
                       jint* status_ptr);
50 Get Source File Name
jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env,
                       jclass klass,
                       char** source_name_ptr);
51 Get Class Modifiers
jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env,
                       jclass klass,
                       jint* modifiers_ptr);
52 Get Class Methods
jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env,
                       jclass klass,
                       jint* method_count_ptr,
                       jmethodID** methods_ptr);
53 Get Class Fields
jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env,
                       jclass klass,
                       jint* field_count_ptr,
                       jfieldID** fields_ptr);
54 Get Implemented Interfaces
jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env,
                       jclass klass,
                       jint* interface_count_ptr,
                       jclass** interfaces_ptr);
55 Is Interface
jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env,
                       jclass klass,
                       jboolean* is_interface_ptr);
56 Is Array Class
jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env,
                       jclass klass,
                       jboolean* is_array_class_ptr);
57 Get Class Loader
jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env,
                       jclass klass,
                       jobject* classloader_ptr);
58 Get Object Hash Code
jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env,
                       jobject object,
                       jint* hash_code_ptr);
59 Get Object Monitor Usage
jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env,
                       jobject object,
                       jvmtiMonitorUsage* info_ptr);
60 Get Field Name (and Signature)
jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field,
                       char** name_ptr,
                       char** signature_ptr,
                       char** generic_ptr);
61 Get Field Declaring Class
jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field,
                       jclass* declaring_class_ptr);
62 Get Field Modifiers
jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field,
                       jint* modifiers_ptr);
63 Is Field Synthetic
jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env,
                       jclass klass,
                       jfieldID field,
                       jboolean* is_synthetic_ptr);
64 Get Method Name (and Signature)
jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env,
                       jmethodID method,
                       char** name_ptr,
                       char** signature_ptr,
                       char** generic_ptr);
65 Get Method Declaring Class
jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env,
                       jmethodID method,
                       jclass* declaring_class_ptr);
66 Get Method Modifiers
jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env,
                       jmethodID method,
                       jint* modifiers_ptr);
67 reserved
void *reserved67;
68 Get Max Locals
jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env,
                       jmethodID method,
                       jint* max_ptr);
69 Get Arguments Size
jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env,
                       jmethodID method,
                       jint* size_ptr);
70 Get Line Number Table
jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env,
                       jmethodID method,
                       jint* entry_count_ptr,
                       jvmtiLineNumberEntry** table_ptr);
71 Get Method Location
jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env,
                       jmethodID method,
                       jlocation* start_location_ptr,
                       jlocation* end_location_ptr);
72 Get Local Variable Table
jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env,
                       jmethodID method,
                       jint* entry_count_ptr,
                       jvmtiLocalVariableEntry** table_ptr);
73 Set Native Method Prefix
jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env,
                       const char* prefix);
74 Set Native Method Prefixes
jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env,
                       jint prefix_count,
                       char** prefixes);
75 Get Bytecodes
jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env,
                       jmethodID method,
                       jint* bytecode_count_ptr,
                       unsigned char** bytecodes_ptr);
76 Is Method Native
jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env,
                       jmethodID method,
                       jboolean* is_native_ptr);
77 Is Method Synthetic
jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env,
                       jmethodID method,
                       jboolean* is_synthetic_ptr);
78 Get Loaded Classes
jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env,
                       jint* class_count_ptr,
                       jclass** classes_ptr);
79 Get Classloader Classes
jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env,
                       jobject initiating_loader,
                       jint* class_count_ptr,
                       jclass** classes_ptr);
80 Pop Frame
jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env,
                       jthread thread);
81 Force Early Return - Object
jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env,
                       jthread thread,
                       jobject value);
82 Force Early Return - Int
jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env,
                       jthread thread,
                       jint value);
83 Force Early Return - Long
jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env,
                       jthread thread,
                       jlong value);
84 Force Early Return - Float
jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env,
                       jthread thread,
                       jfloat value);
85 Force Early Return - Double
jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env,
                       jthread thread,
                       jdouble value);
86 Force Early Return - Void
jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env,
                       jthread thread);
87 Redefine Classes
jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env,
                       jint class_count,
                       const jvmtiClassDefinition* class_definitions);
88 Get Version Number
jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env,
                       jint* version_ptr);
89 Get Capabilities
jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env,
                       jvmtiCapabilities* capabilities_ptr);
90 Get Source Debug Extension
jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env,
                       jclass klass,
                       char** source_debug_extension_ptr);
91 Is Method Obsolete
jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env,
                       jmethodID method,
                       jboolean* is_obsolete_ptr);
92 Suspend Thread List
jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env,
                       jint request_count,
                       const jthread* request_list,
                       jvmtiError* results);
93 Resume Thread List
jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env,
                       jint request_count,
                       const jthread* request_list,
                       jvmtiError* results);
94 reserved
void *reserved94;
95 reserved
void *reserved95;
96 reserved
void *reserved96;
97 reserved
void *reserved97;
98 reserved
void *reserved98;
99 reserved
void *reserved99;
100 Get All Stack Traces
jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env,
                       jint max_frame_count,
                       jvmtiStackInfo** stack_info_ptr,
                       jint* thread_count_ptr);
101 Get Thread List Stack Traces
jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env,
                       jint thread_count,
                       const jthread* thread_list,
                       jint max_frame_count,
                       jvmtiStackInfo** stack_info_ptr);
102 Get Thread Local Storage
jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env,
                       jthread thread,
                       void** data_ptr);
103 Set Thread Local Storage
jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env,
                       jthread thread,
                       const void* data);
104 Get Stack Trace
jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env,
                       jthread thread,
                       jint start_depth,
                       jint max_frame_count,
                       jvmtiFrameInfo* frame_buffer,
                       jint* count_ptr);
105 reserved
void *reserved105;
106 Get Tag
jvmtiError (JNICALL *GetTag) (jvmtiEnv* env,
                       jobject object,
                       jlong* tag_ptr);
107 Set Tag
jvmtiError (JNICALL *SetTag) (jvmtiEnv* env,
                       jobject object,
                       jlong tag);
108 Force Garbage Collection
jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
109 Iterate Over Objects Reachable From Object
jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env,
                       jobject object,
                       jvmtiObjectReferenceCallback object_reference_callback,
                       const void* user_data);
110 Iterate Over Reachable Objects
jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env,
                       jvmtiHeapRootCallback heap_root_callback,
                       jvmtiStackReferenceCallback stack_ref_callback,
                       jvmtiObjectReferenceCallback object_ref_callback,
                       const void* user_data);
111 Iterate Over Heap
jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env,
                       jvmtiHeapObjectFilter object_filter,
                       jvmtiHeapObjectCallback heap_object_callback,
                       const void* user_data);
112 Iterate Over Instances Of Class
jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env,
                       jclass klass,
                       jvmtiHeapObjectFilter object_filter,
                       jvmtiHeapObjectCallback heap_object_callback,
                       const void* user_data);
113 reserved
void *reserved113;
114 Get Objects With Tags
jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env,
                       jint tag_count,
                       const jlong* tags,
                       jint* count_ptr,
                       jobject** object_result_ptr,
                       jlong** tag_result_ptr);
115 Follow References
jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env,
                       jint heap_filter,
                       jclass klass,
                       jobject initial_object,
                       const jvmtiHeapCallbacks* callbacks,
                       const void* user_data);
116 Iterate Through Heap
jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env,
                       jint heap_filter,
                       jclass klass,
                       const jvmtiHeapCallbacks* callbacks,
                       const void* user_data);
117 reserved
void *reserved117;
118 reserved
void *reserved118;
119 reserved
void *reserved119;
120 Set JNI Function Table
jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env,
                       const jniNativeInterface* function_table);
121 Get JNI Function Table
jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env,
                       jniNativeInterface** function_table);
122 Set Event Callbacks
jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env,
                       const jvmtiEventCallbacks* callbacks,
                       jint size_of_callbacks);
123 Generate Events
jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env,
                       jvmtiEvent event_type);
124 Get Extension Functions
jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env,
                       jint* extension_count_ptr,
                       jvmtiExtensionFunctionInfo** extensions);
125 Get Extension Events
jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env,
                       jint* extension_count_ptr,
                       jvmtiExtensionEventInfo** extensions);
126 Set Extension Event Callback
jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env,
                       jint extension_event_index,
                       jvmtiExtensionEvent callback);
127 Dispose Environment
jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
128 Get Error Name
jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env,
                       jvmtiError error,
                       char** name_ptr);
129 Get JLocation Format
jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env,
                       jvmtiJlocationFormat* format_ptr);
130 Get System Properties
jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env,
                       jint* count_ptr,
                       char*** property_ptr);
131 Get System Property
jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env,
                       const char* property,
                       char** value_ptr);
132 Set System Property
jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env,
                       const char* property,
                       const char* value_ptr);
133 Get Phase
jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env,
                       jvmtiPhase* phase_ptr);
134 Get Current Thread CPU Timer Information
jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env,
                       jvmtiTimerInfo* info_ptr);
135 Get Current Thread CPU Time
jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env,
                       jlong* nanos_ptr);
136 Get Thread CPU Timer Information
jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env,
                       jvmtiTimerInfo* info_ptr);
137 Get Thread CPU Time
jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env,
                       jthread thread,
                       jlong* nanos_ptr);
138 Get Timer Information
jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env,
                       jvmtiTimerInfo* info_ptr);
139 Get Time
jvmtiError (JNICALL *GetTime) (jvmtiEnv* env,
                       jlong* nanos_ptr);
140 Get Potential Capabilities
jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env,
                       jvmtiCapabilities* capabilities_ptr);
141 reserved
void *reserved141;
142 Add Capabilities
jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env,
                       const jvmtiCapabilities* capabilities_ptr);
143 Relinquish Capabilities
jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env,
                       const jvmtiCapabilities* capabilities_ptr);
144 Get Available Processors
jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env,
                       jint* processor_count_ptr);
145 Get Class Version Numbers
jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env,
                       jclass klass,
                       jint* minor_version_ptr,
                       jint* major_version_ptr);
146 Get Constant Pool
jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env,
                       jclass klass,
                       jint* constant_pool_count_ptr,
                       jint* constant_pool_byte_count_ptr,
                       unsigned char** constant_pool_bytes_ptr);
147 Get Environment Local Storage
jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env,
                       void** data_ptr);
148 Set Environment Local Storage
jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env,
                       const void* data);
149 Add To Bootstrap Class Loader Search
jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env,
                       const char* segment);
150 Set Verbose Flag
jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env,
                       jvmtiVerboseFlag flag,
                       jboolean value);
151 Add To System Class Loader Search
jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env,
                       const char* segment);
152 Retransform Classes
jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env,
                       jint class_count,
                       const jclass* classes);
153 Get Owned Monitor Stack Depth Info
jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env,
                       jthread thread,
                       jint* monitor_info_count_ptr,
                       jvmtiMonitorStackDepthInfo** monitor_info_ptr);
154 Get Object Size
jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env,
                       jobject object,
                       jlong* size_ptr);
155 Get Local Instance
jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env,
                       jthread thread,
                       jint depth,
                       jobject* value_ptr);

Events

Handling Events

Agents can be informed of many events that occur in application programs.

To handle events, designate a set of callback functions with SetEventCallbacks. For each event the corresponding callback function will be called. Arguments to the callback function provide additional information about the event.

The callback function is usually called from within an application thread. The JVM TI implementation does not queue events in any way. This means that event callback functions must be written carefully. Here are some general guidelines. See the individual event descriptions for further suggestions.

  • Any exception thrown during the execution of an event callback can overwrite any current pending exception in the current application thread. Care must be taken to preserve a pending exception when an event callback makes a JNI call that might generate an exception.
  • Event callback functions must be re-entrant. The JVM TI implementation does not queue events. If an agent needs to process events one at a time, it can use a raw monitor inside the event callback functions to serialize event processing.
  • Event callback functions that execute JNI's FindClass function to load classes need to note that FindClass locates the class loader associated with the current native method. For the purposes of class loading, an event callback that includes a JNI environment as a parameter to the callback will treated as if it is a native call, where the native method is in the class of the event thread's current frame.

Some JVM TI events identify objects with JNI references. All references in JVM TI events are JNI local references and will become invalid after the event callback returns. Unless stated otherwise, memory referenced by pointers sent in event callbacks may not be referenced after the event callback returns.

Except where stated otherwise, events are delivered on the thread that caused the event. Events are sent at the time they occur. The specification for each event includes the set of phases in which it can be sent; if an event triggering activity occurs during another phase, no event is sent.

A thread that generates an event does not change its execution status (for example, the event does not cause the thread to be suspended). If an agent wishes the event to result in suspension, then the agent is responsible for explicitly suspending the thread with SuspendThread.

If an event is enabled in multiple environments, the event will be sent to each agent in the order that the environments were created.

Enabling Events

All events are initially disabled. In order to receive any event:
  • If the event requires a capability, that capability must be added with AddCapabilities.
  • A callback for the event must be set with SetEventCallbacks.
  • The event must be enabled with SetEventNotificationMode.

Multiple Co-located Events

In many situations it is possible for multiple events to occur at the same location in one thread. When this happens, all the events are reported through the event callbacks in the order specified in this section.

If the current location is at the entry point of a method, the MethodEntry event is reported before any other event at the current location in the same thread.

If an exception catch has been detected at the current location, either because it is the beginning of a catch clause or a native method that cleared a pending exception has returned, the exceptionCatch event is reported before any other event at the current location in the same thread.

If a singleStep event or breakpoint event is triggered at the current location, the event is defined to occur immediately before the code at the current location is executed. These events are reported before any events which are triggered by the execution of code at the current location in the same thread (specifically: exception, fieldAccess, and fieldModification). If both a step and breakpoint event are triggered for the same thread and location, the step event is reported before the breakpoint event.

If the current location is the exit point of a method (that is, the last location before returning to the caller), the MethodExit event and the FramePop event (if requested) are reported after all other events at the current location in the same thread. There is no specified ordering of these two events with respect to each other.

Co-located events can be triggered during the processing of some other event by the agent at the same location in the same thread. If such an event, of type y, is triggered during the processing of an event of type x, and if x precedes y in the ordering specified above, the co-located event y is reported for the current thread and location. If x does not precede y, y is not reported for the current thread and location. For example, if a breakpoint is set at the current location during the processing of SingleStep, that breakpoint will be reported before the thread moves off the current location.

The following events are never considered to be co-located with other events.
  • VMStart
  • VMInit
  • VMDeath
  • ThreadStart
  • ThreadEnd
  • ClassLoad
  • ClassPrepare

Event Callbacks

The event callback structure below is used to specify the handler function for events. It is set with the SetEventCallbacks function.
typedef struct {
    jvmtiEventVMInit VMInit;
    jvmtiEventVMDeath VMDeath;
    jvmtiEventThreadStart ThreadStart;
    jvmtiEventThreadEnd ThreadEnd;
    jvmtiEventClassFileLoadHook ClassFileLoadHook;
    jvmtiEventClassLoad ClassLoad;
    jvmtiEventClassPrepare ClassPrepare;
    jvmtiEventVMStart VMStart;
    jvmtiEventException Exception;
    jvmtiEventExceptionCatch ExceptionCatch;
    jvmtiEventSingleStep SingleStep;
    jvmtiEventFramePop FramePop;
    jvmtiEventBreakpoint Breakpoint;
    jvmtiEventFieldAccess FieldAccess;
    jvmtiEventFieldModification FieldModification;
    jvmtiEventMethodEntry MethodEntry;
    jvmtiEventMethodExit MethodExit;
    jvmtiEventNativeMethodBind NativeMethodBind;
    jvmtiEventCompiledMethodLoad CompiledMethodLoad;
    jvmtiEventCompiledMethodUnload CompiledMethodUnload;
    jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
    jvmtiEventDataDumpRequest DataDumpRequest;
    jvmtiEventReserved reserved72;
    jvmtiEventMonitorWait MonitorWait;
    jvmtiEventMonitorWaited MonitorWaited;
    jvmtiEventMonitorContendedEnter MonitorContendedEnter;
    jvmtiEventMonitorContendedEntered MonitorContendedEntered;
    jvmtiEventReserved reserved77;
    jvmtiEventReserved reserved78;
    jvmtiEventReserved reserved79;
    jvmtiEventResourceExhausted ResourceExhausted;
    jvmtiEventGarbageCollectionStart GarbageCollectionStart;
    jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
    jvmtiEventObjectFree ObjectFree;
    jvmtiEventVMObjectAlloc VMObjectAlloc;
} jvmtiEventCallbacks;

Event Index

  • Breakpoint
  • Class File Load Hook
  • Class Load
  • Class Prepare
  • Compiled Method Load
  • Compiled Method Unload
  • Data Dump Request
  • Dynamic Code Generated
  • Exception
  • Exception Catch
  • Field Access
  • Field Modification
  • Frame Pop
  • Garbage Collection Finish
  • Garbage Collection Start
  • Method Entry
  • Method Exit
  • Monitor Contended Enter
  • Monitor Contended Entered
  • Monitor Wait
  • Monitor Waited
  • Native Method Bind
  • Object Free
  • Resource Exhausted
  • Single Step
  • Thread End
  • Thread Start
  • VM Death Event
  • VM Initialization Event
  • VM Object Allocation
  • VM Start Event

Single Step

void JNICALL
SingleStep(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location)
Single step events allow the agent to trace thread execution at the finest granularity allowed by the VM. A single step event is generated whenever a thread reaches a new location. Typically, single step events represent the completion of one VM instruction as defined in The Java™ Virtual Machine Specification. However, some implementations may define locations differently. In any case the method and location parameters uniquely identify the current location and allow the mapping to source file and line number when that information is available.

No single step events are generated from within native methods.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_SINGLE_STEP | 60 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_single_step_events | Can get single step events

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread about to execution a new instruction
method | jmethodID | Method about to execute a new instruction
location | jlocation | Location of the new instruction

Breakpoint

void JNICALL
Breakpoint(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location)
Breakpoint events are generated whenever a thread reaches a location designated as a breakpoint with SetBreakpoint. The method and location parameters uniquely identify the current location and allow the mapping to source file and line number when that information is available.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_BREAKPOINT | 62 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_BREAKPOINT, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_breakpoint_events | Can set and thus get Breakpoint events

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread.
thread | jthread | Thread that hit the breakpoint
method | jmethodID | Method that hit the breakpoint
location | jlocation | location of the breakpoint

Field Access

void JNICALL
FieldAccess(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location,
            jclass field_klass,
            jobject object,
            jfieldID field)
Field access events are generated whenever a thread accesses a field that was designated as a watchpoint with SetFieldAccessWatch. The method and location parameters uniquely identify the current location and allow the mapping to source file and line number when that information is available.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_FIELD_ACCESS | 63 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FIELD_ACCESS, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_field_access_events | Can set watchpoints on field access - SetFieldAccessWatch

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread accessing the field
method | jmethodID | Method where the access is occurring
location | jlocation | Location where the access is occurring
field_klass | jclass | Class of the field being accessed
object | jobject | Object with the field being accessed if the field is an instance field; NULL otherwise
field | jfieldID | Field being accessed

Field Modification

void JNICALL
FieldModification(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location,
            jclass field_klass,
            jobject object,
            jfieldID field,
            char signature_type,
            jvalue new_value)
Field modification events are generated whenever a thread modifies a field that was designated as a watchpoint with SetFieldModificationWatch. The method and location parameters uniquely identify the current location and allow the mapping to source file and line number when that information is available.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_FIELD_MODIFICATION | 64 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FIELD_MODIFICATION, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_field_modification_events | Can set watchpoints on field modification - SetFieldModificationWatch

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread modifying the field
method | jmethodID | Method where the modification is occurring
location | jlocation | Location where the modification is occurring
field_klass | jclass | Class of the field being modified
object | jobject | Object with the field being modified if the field is an instance field; NULL otherwise
field | jfieldID | Field being modified
signature_type | char | Signature type of the new value
new_value | jvalue | The new value

Frame Pop

void JNICALL
FramePop(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jboolean was_popped_by_exception)
Frame pop events are generated upon exit from a single method in a single frame as specified in a call to NotifyFramePop. This is true whether termination is caused by executing its return instruction or by throwing an exception to its caller (see was_popped_by_exception). However, frame pops caused by the PopFrame function are not reported.

The location reported by GetFrameLocation identifies the executable location in the returning method, immediately prior to the return.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_FRAME_POP | 61 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FRAME_POP, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_frame_pop_events | Can set and thus get FramePop events

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread that is popping the frame
method | jmethodID | Method being popped
was_popped_by_exception | jboolean | True if frame was popped by a thrown exception. False if method exited through its return instruction.

Method Entry

void JNICALL
MethodEntry(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method)
Method entry events are generated upon entry of Java programming language methods (including native methods).

The location reported by GetFrameLocation identifies the initial executable location in the method.

Enabling method entry or exit events will significantly degrade performance on many platforms and is thus not advised for performance critical usage (such as profiling). Bytecode instrumentation should be used in these cases.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_METHOD_ENTRY | 65 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_ENTRY, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_method_entry_events | Can generate method entry events on entering a method

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread entering the method
method | jmethodID | Method being entered

Method Exit

void JNICALL
MethodExit(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jboolean was_popped_by_exception,
            jvalue return_value)
Method exit events are generated upon exit from Java programming language methods (including native methods). This is true whether termination is caused by executing its return instruction or by throwing an exception to its caller (see was_popped_by_exception).

The method field uniquely identifies the method being entered or exited. The frame field provides access to the stack frame for the method.

The location reported by GetFrameLocation identifies the executable location in the returning method immediately prior to the return.

Enabling method entry or exit events will significantly degrade performance on many platforms and is thus not advised for performance critical usage (such as profiling). Bytecode instrumentation should be used in these cases.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_METHOD_EXIT | 66 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_method_exit_events | Can generate method exit events on leaving a method

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread exiting the method
method | jmethodID | Method being exited
was_popped_by_exception | jboolean | True if frame was popped by a thrown exception. False if method exited through its return instruction.
return_value | jvalue | The return value of the method being exited. Undefined and should not be used if was_popped_by_exception is true.

Native Method Bind

void JNICALL
NativeMethodBind(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            void* address,
            void** new_address_ptr)
A Native Method Bind event is sent when a VM binds a Java programming language native method to the address of a function that implements the native method. This will occur when the native method is called for the first time and also occurs when the JNI function RegisterNatives is called. This event allows the bind to be redirected to an agent-specified proxy function. This event is not sent when the native method is unbound. Typically, this proxy function will need to be specific to a particular method or, to handle the general case, automatically generated assembly code, since after instrumentation code is executed the function at the original binding address will usually be invoked. The original binding can be restored or the redirection changed by use of the JNI function RegisterNatives. Some events may be sent during the primordial phase, JNI and most of JVM TI cannot be used at this time but the method and address can be saved for use later.

Phase | Event Type | Number | Enabling | Since
sent during the primordial, start or live phase | JVMTI_EVENT_NATIVE_METHOD_BIND | 67 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_native_method_bind_events | Can generate events when a native method is bound to its implementation

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread Will be NULL if sent during the primordial phase.
thread | jthread | Thread requesting the bind
method | jmethodID | Native method being bound
address | void* | The address the VM is about to bind to--that is, the address of the implementation of the native method
new_address_ptr | void** | if the referenced address is changed (that is, if *new_address_ptr is set), the binding will instead be made to the supplied address.

Exception

void JNICALL
Exception(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location,
            jobject exception,
            jmethodID catch_method,
            jlocation catch_location)
Exception events are generated whenever an exception is first detected in a Java programming language method. Where "exception" means any java.lang.Throwable. The exception may have been thrown by a Java programming language or native method, but in the case of native methods, the event is not generated until the exception is first seen by a Java programming language method. If an exception is set and cleared in a native method (and thus is never visible to Java programming language code), no exception event is generated.

The method and location parameters uniquely identify the current location (where the exception was detected) and allow the mapping to source file and line number when that information is available. The exception field identifies the thrown exception object. The catch_method and catch_location identify the location of the catch clause, if any, that handles the thrown exception. If there is no such catch clause, each field is set to 0. There is no guarantee that the thread will ever reach this catch clause. If there are native methods on the call stack between the throw location and the catch clause, the exception may be reset by one of those native methods. Similarly, exceptions that are reported as uncaught (catch_klass et al. set to 0) may in fact be caught by native code. Agents can check for these occurrences by monitoring ExceptionCatch events. Note that finally clauses are implemented as catch and re-throw. Therefore they will be reported in the catch location.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_EXCEPTION | 58 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_exception_events | Can get exception thrown and exception catch events

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread generating the exception
method | jmethodID | Method generating the exception
location | jlocation | Location where exception occurred
exception | jobject | The exception being thrown
catch_method | jmethodID | Method that will catch the exception, or NULL if no known catch
catch_location | jlocation | location which will catch the exception or zero if no known catch

Exception Catch

void JNICALL
ExceptionCatch(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jmethodID method,
            jlocation location,
            jobject exception)
Exception catch events are generated whenever a thrown exception is caught. Where "exception" means any java.lang.Throwable. If the exception is caught in a Java programming language method, the event is generated when the catch clause is reached. If the exception is caught in a native method, the event is generated as soon as control is returned to a Java programming language method. Exception catch events are generated for any exception for which a throw was detected in a Java programming language method. Note that finally clauses are implemented as catch and re-throw. Therefore they will generate exception catch events.

The method and location parameters uniquely identify the current location and allow the mapping to source file and line number when that information is available. For exceptions caught in a Java programming language method, the exception object identifies the exception object. Exceptions caught in native methods are not necessarily available by the time the exception catch is reported, so the exception field is set to NULL.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_EXCEPTION_CATCH | 59 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_exception_events | Can get exception thrown and exception catch events

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread catching the exception
method | jmethodID | Method catching the exception
location | jlocation | Location where exception is being caught
exception | jobject | Exception being caught

Thread Start

void JNICALL
ThreadStart(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread)
Thread start events are generated by a new thread before its initial method executes.

A thread may be listed in the array returned by GetAllThreads before its thread start event is generated. It is possible for other events to be generated on a thread before its thread start event.

The event is sent on the newly started thread.

Phase | Event Type | Number | Enabling | Since
sent during the start or live phase | JVMTI_EVENT_THREAD_START | 52 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_THREAD_START, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread.
thread | jthread | Thread starting

Thread End

void JNICALL
ThreadEnd(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread)
Thread end events are generated by a terminating thread after its initial method has finished execution.

A thread may be listed in the array returned by GetAllThreads after its thread end event is generated. No events are generated on a thread after its thread end event.

The event is sent on the dying thread.

Phase | Event Type | Number | Enabling | Since
sent during the start or live phase | JVMTI_EVENT_THREAD_END | 53 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_THREAD_END, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread.
thread | jthread | Thread ending

Class Load

void JNICALL
ClassLoad(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jclass klass)
A class load event is generated when a class is first loaded. The order of class load events generated by a particular thread are guaranteed to match the order of class loading within that thread. Array class creation does not generate a class load event. The creation of a primitive class (for example, java.lang.Integer.TYPE) does not generate a class load event.

This event is sent at an early stage in loading the class. As a result the class should be used carefully. Note, for example, that methods and fields are not yet loaded, so queries for methods, fields, subclasses, and so on will not give correct results. See "Loading of Classes and Interfaces" in the Java Language Specification. For most purposes the ClassPrepare event will be more useful.

Phase | Event Type | Number | Enabling | Since
sent during the start or live phase | JVMTI_EVENT_CLASS_LOAD | 55 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread loading the class
klass | jclass | Class being loaded

Class Prepare

void JNICALL
ClassPrepare(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jclass klass)
A class prepare event is generated when class preparation is complete. At this point, class fields, methods, and implemented interfaces are available, and no code from the class has been executed. Since array classes never have fields or methods, class prepare events are not generated for them. Class prepare events are not generated for primitive classes (for example, java.lang.Integer.TYPE).

Phase | Event Type | Number | Enabling | Since
sent during the start or live phase | JVMTI_EVENT_CLASS_PREPARE | 56 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_PREPARE, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread generating the class prepare
klass | jclass | Class being prepared

Class File Load Hook

void JNICALL
ClassFileLoadHook(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jclass class_being_redefined,
            jobject loader,
            const char* name,
            jobject protection_domain,
            jint class_data_len,
            const unsigned char* class_data,
            jint* new_class_data_len,
            unsigned char** new_class_data)
This event is sent when the VM obtains class file data, but before it constructs the in-memory representation for that class. This event is also sent when the class is being modified by the RetransformClasses function or the RedefineClasses function, called in any JVM TI environment. The agent can instrument the existing class file data sent by the VM to include profiling/debugging hooks. See the description of bytecode instrumentation for usage information.

This event may be sent before the VM is initialized (the primordial phase). During this time no VM resources should be created. Some classes might not be compatible with the function (eg. ROMized classes) and this event will not be generated for these classes.

The agent must allocate the space for the modified class file data buffer using the memory allocation function Allocate because the VM is responsible for freeing the new class file data buffer using Deallocate. Note that Allocate is permitted during the primordial phase.

If the agent wishes to modify the class file, it must set new_class_data to point to the newly instrumented class file data buffer and set new_class_data_len to the length of that buffer before returning from this call. If no modification is desired, the agent simply does not set new_class_data. If multiple agents have enabled this event the results are chained. That is, if new_class_data has been set, it becomes the class_data for the next agent.

The order that this event is sent to each environment differs from other events. This event is sent to environments in the following order:
  • retransformation incapable environments, in the order in which they were created
  • retransformation capable environments, in the order in which they were created
When triggered by RetransformClasses, this event is sent only to retransformation capable environments.

Phase | Event Type | Number | Enabling | Since
sent during the primordial, start or live phase | JVMTI_EVENT_CLASS_FILE_LOAD_HOOK | 54 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL) | 1.0

Capabilities
Required Functionality
Optional Features
Capability | Effect
can_generate_all_class_hook_events | Can generate ClassFileLoadHook events for every loaded class.

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread. Will be NULL if sent during the primordial phase.
class_being_redefined | jclass | The class being redefined or retransformed. NULL if sent by class load.
loader | jobject | The class loader loading the class. NULL if the bootstrap class loader.
name | const char* | Name of class being loaded as a VM internal qualified name (for example, "java/util/List"), encoded as a modified UTF-8 string. Note: if the class is defined with a NULL name or without a name specified, name will be NULL.
protection_domain | jobject | The ProtectionDomain of the class.
class_data_len | jint | Length of current class file data buffer.
class_data | const unsigned char* | Pointer to the current class file data buffer.
new_class_data_len | jint* | Pointer to the length of the new class file data buffer.
new_class_data | unsigned char** | Pointer to the pointer to the instrumented class file data buffer.

VM Start Event

void JNICALL
VMStart(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env)
The VM initialization event signals the start of the VM. At this time JNI is live but the VM is not yet fully initialized. Once this event is generated, the agent is free to call any JNI function. This event signals the beginning of the start phase, JVM TI functions permitted in the start phase may be called.

In the case of VM start-up failure, this event will not be sent.

Phase | Event Type | Number | Enabling | Since
sent during the start or live phase | JVMTI_EVENT_VM_START | 57 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_START, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread.

VM Initialization Event

void JNICALL
VMInit(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread)
The VM initialization event signals the completion of VM initialization. Once this event is generated, the agent is free to call any JNI or JVM TI function. The VM initialization event can be preceded by or can be concurrent with other events, but the preceding events should be handled carefully, if at all, because the VM has not completed its initialization. The thread start event for the main application thread is guaranteed not to occur until after the handler for the VM initialization event returns.

In the case of VM start-up failure, this event will not be sent.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_VM_INIT | 50 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread.
thread | jthread | The initial thread

VM Death Event

void JNICALL
VMDeath(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env)
The VM death event notifies the agent of the termination of the VM. No events will occur after the VMDeath event.

In the case of VM start-up failure, this event will not be sent. Note that Agent_OnUnload will still be called in these cases.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_VM_DEATH | 51 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread

Compiled Method Load

typedef struct {
    const void* start_address;
    jlocation location;
} jvmtiAddrLocationMap;
void JNICALL
CompiledMethodLoad(jvmtiEnv *jvmti_env,
            jmethodID method,
            jint code_size,
            const void* code_addr,
            jint map_length,
            const jvmtiAddrLocationMap* map,
            const void* compile_info)
Sent when a method is compiled and loaded into memory by the VM. If it is unloaded, the CompiledMethodUnload event is sent. If it is moved, the CompiledMethodUnload event is sent, followed by a new CompiledMethodLoad event. Note that a single method may have multiple compiled forms, and that this event will be sent for each form. Note also that several methods may be inlined into a single address range, and that this event will be sent for each method.

These events can be sent after their initial occurrence with GenerateEvents.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_COMPILED_METHOD_LOAD | 68 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL) | 1.0

jvmtiAddrLocationMap - Native address to location entry
Field | Type | Description
start_address | const void* | Starting native address of code corresponding to a location
location | jlocation | Corresponding location. See GetJLocationFormat for the meaning of location.

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_compiled_method_load_events | Can generate events when a method is compiled or unloaded

Parameters
Name | Type | Description
method | jmethodID | Method being compiled and loaded
code_size | jint | Size of compiled code
code_addr | const void* | Address where compiled method code is loaded
map_length | jint | Number of jvmtiAddrLocationMap entries in the address map. Zero if mapping information cannot be supplied.
map | const jvmtiAddrLocationMap* | Map from native addresses to location. The native address range of each entry is from start_address to start_address-1 of the next entry. NULL if mapping information cannot be supplied.
compile_info | const void* | VM-specific compilation information. The referenced compile information is managed by the VM and must not depend on the agent for collection. A VM implementation defines the content and lifetime of the information.

Compiled Method Unload

void JNICALL
CompiledMethodUnload(jvmtiEnv *jvmti_env,
            jmethodID method,
            const void* code_addr)
Sent when a compiled method is unloaded from memory. This event might not be sent on the thread which performed the unload. This event may be sent sometime after the unload occurs, but will be sent before the memory is reused by a newly generated compiled method. This event may be sent after the class is unloaded.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_COMPILED_METHOD_UNLOAD | 69 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_compiled_method_load_events | Can generate events when a method is compiled or unloaded

Parameters
Name | Type | Description
method | jmethodID | Compiled method being unloaded. For identification of the compiled method only -- the class may be unloaded and therefore the method should not be used as an argument to further JNI or JVM TI functions.
code_addr | const void* | Address where compiled method code was loaded. For identification of the compiled method only -- the space may have been reclaimed.

Dynamic Code Generated

void JNICALL
DynamicCodeGenerated(jvmtiEnv *jvmti_env,
            const char* name,
            const void* address,
            jint length)
Sent when a component of the virtual machine is generated dynamically. This does not correspond to Java programming language code that is compiled--see CompiledMethodLoad. This is for native code--for example, an interpreter that is generated differently depending on command-line options.

Note that this event has no controlling capability. If a VM cannot generate these events, it simply does not send any.

These events can be sent after their initial occurrence with GenerateEvents.

Phase | Event Type | Number | Enabling | Since
sent during the primordial, start or live phase | JVMTI_EVENT_DYNAMIC_CODE_GENERATED | 70 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_DYNAMIC_CODE_GENERATED, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name | Type | Description
name | const char* | Name of the code, encoded as a modified UTF-8 string. Intended for display to an end-user. The name might not be unique.
address | const void* | Native address of the code
length | jint | Length in bytes of the code

Data Dump Request

void JNICALL
DataDumpRequest(jvmtiEnv *jvmti_env)
Sent by the VM to request the agent to dump its data. This is just a hint and the agent need not react to this event. This is useful for processing command-line signals from users. For example, in the Java 2 SDK a CTRL-Break on Win32 and a CTRL-\ on Solaris causes the VM to send this event to the agent.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_DATA_DUMP_REQUEST | 71 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_DATA_DUMP_REQUEST, NULL) | 1.0

Capabilities
Required Functionality

Parameters
Name Type Description

Monitor Contended Enter

void JNICALL
MonitorContendedEnter(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jobject object)
Sent when a thread is attempting to enter a Java programming language monitor already acquired by another thread.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_MONITOR_CONTENDED_ENTER | 75 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_monitor_events | Can generate events on monitor activity

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | JNI local reference to the thread attempting to enter the monitor
object | jobject | JNI local reference to the monitor

Monitor Contended Entered

void JNICALL
MonitorContendedEntered(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jobject object)
Sent when a thread enters a Java programming language monitor after waiting for it to be released by another thread.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_MONITOR_CONTENDED_ENTERED | 76 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_monitor_events | Can generate events on monitor activity

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | JNI local reference to the thread entering the monitor
object | jobject | JNI local reference to the monitor

Monitor Wait

void JNICALL
MonitorWait(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jobject object,
            jlong timeout)
Sent when a thread is about to wait on an object.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_MONITOR_WAIT | 73 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_monitor_events | Can generate events on monitor activity

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | JNI local reference to the thread about to wait
object | jobject | JNI local reference to the monitor
timeout | jlong | The number of milliseconds the thread will wait

Monitor Waited

void JNICALL
MonitorWaited(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jobject object,
            jboolean timed_out)
Sent when a thread finishes waiting on an object.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_MONITOR_WAITED | 74 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_monitor_events | Can generate events on monitor activity

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | JNI local reference to the thread that was finished waiting
object | jobject | JNI local reference to the monitor.
timed_out | jboolean | True if the monitor timed out

Resource Exhausted

void JNICALL
ResourceExhausted(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jint flags,
            const void* reserved,
            const char* description)
Sent when a VM resource needed by a running application has been exhausted. Except as required by the optional capabilities, the set of resources which report exhaustion is implementation dependent.

The following bit flags define the properties of the resource exhaustion:
Resource Exhaustion Flags
Constant | Value | Description
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | 0x0001 | After this event returns, the VM will throw a java.lang.OutOfMemoryError.
JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP | 0x0002 | The VM was unable to allocate memory from the JavaTM platform heap. The heap is the runtime data area from which memory for all class instances and arrays are allocated.
JVMTI_RESOURCE_EXHAUSTED_THREADS | 0x0004 | The VM was unable to create a thread.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_RESOURCE_EXHAUSTED | 80 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_RESOURCE_EXHAUSTED, NULL) | 1.1

Capabilities
Required Functionality
Optional Features
Capability | Effect
can_generate_resource_exhaustion_heap_events | Can generate events when the VM is unable to allocate memory from the heap.
can_generate_resource_exhaustion_threads_events | Can generate events when the VM is unable to create a thread.

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
flags | jint | Flags defining the properties of the of resource exhaustion as specified by the Resource Exhaustion Flags.
reserved | const void* | Reserved.
description | const char* | Description of the resource exhaustion, encoded as a modified UTF-8 string.

VM Object Allocation

void JNICALL
VMObjectAlloc(jvmtiEnv *jvmti_env,
            JNIEnv* jni_env,
            jthread thread,
            jobject object,
            jclass object_klass,
            jlong size)
Sent when a method causes the virtual machine to allocate an Object visible to Java programming language code and the allocation is not detectable by other intrumentation mechanisms. Generally object allocation should be detected by instrumenting the bytecodes of allocating methods. Object allocation generated in native code by JNI function calls should be detected using JNI function interception. Some methods might not have associated bytecodes and are not native methods, they instead are executed directly by the VM. These methods should send this event. Virtual machines which are incapable of bytecode instrumentation for some or all of their methods can send this event.

Typical examples where this event might be sent:
  • Reflection -- for example, java.lang.Class.newInstance()
  • Methods not represented by bytecodes -- for example, VM intrinsics and J2ME preloaded classes
Cases where this event would not be generated:
  • Allocation due to bytecodes -- for example, the new and newarray VM instructions
  • Allocation due to JNI function calls -- for example, AllocObject
  • Allocations during VM initialization
  • VM internal objects

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_VM_OBJECT_ALLOC | 84 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_vm_object_alloc_events | Can generate events on VM allocation of an object

Parameters
Name | Type | Description
jni_env | JNIEnv * | The JNI environment of the event (current) thread
thread | jthread | Thread allocating the object.
object | jobject | JNI local reference to the object that was allocated
object_klass | jclass | JNI local reference to the class of the object
size | jlong | Size of the object (in bytes). See GetObjectSize.

Object Free

void JNICALL
ObjectFree(jvmtiEnv *jvmti_env,
            jlong tag)
An Object Free event is sent when the garbage collector frees an object. Events are only sent for tagged objects--see heap functions.

The event handler must not use JNI functions and must not use JVM TI functions except those which specifically allow such use (see the raw monitor, memory management, and environment local storage functions).

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_OBJECT_FREE | 83 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_object_free_events | Can generate events when the garbage collector frees an object

Parameters
Name | Type | Description
tag | jlong | The freed object's tag

Garbage Collection Start

void JNICALL
GarbageCollectionStart(jvmtiEnv *jvmti_env)
A Garbage Collection Start event is sent when a garbage collection pause begins. Only stop-the-world collections are reported--that is, collections during which all threads cease to modify the state of the Java virtual machine. This means that some collectors will never generate these events. This event is sent while the VM is still stopped, thus the event handler must not use JNI functions and must not use JVM TI functions except those which specifically allow such use (see the raw monitor, memory management, and environment local storage functions).

This event is always sent as a matched pair with GarbageCollectionFinish (assuming both events are enabled) and no garbage collection events will occur between them.

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_GARBAGE_COLLECTION_START | 81 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_garbage_collection_events | Can generate events when garbage collection begins or ends

Parameters
Name Type Description

Garbage Collection Finish

void JNICALL
GarbageCollectionFinish(jvmtiEnv *jvmti_env)
A Garbage Collection Finish event is sent when a garbage collection pause ends. This event is sent while the VM is still stopped, thus the event handler must not use JNI functions and must not use JVM TI functions except those which specifically allow such use (see the raw monitor, memory management, and environment local storage functions).

Some agents may need to do post garbage collection operations that require the use of the disallowed JVM TI or JNI functions. For these cases an agent thread can be created which waits on a raw monitor, and the handler for the Garbage Collection Finish event simply notifies the raw monitor

This event is always sent as a matched pair with GarbageCollectionStart (assuming both events are enabled).

Phase | Event Type | Number | Enabling | Since
sent only during the live phase | JVMTI_EVENT_GARBAGE_COLLECTION_FINISH | 82 | SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL) | 1.0

Capabilities
Optional Functionality: might not be implemented for all virtual machines. The following capability (as returned by GetCapabilities) must be true to use this event.
Capability | Effect
can_generate_garbage_collection_events | Can generate events when garbage collection begins or ends

Parameters
Name Type Description

Constant Index

JVMTI_CLASS_STATUS_ARRAY
JVMTI_CLASS_STATUS_ERROR
JVMTI_CLASS_STATUS_INITIALIZED
JVMTI_CLASS_STATUS_PREPARED
JVMTI_CLASS_STATUS_PRIMITIVE
JVMTI_CLASS_STATUS_VERIFIED
JVMTI_DISABLE
JVMTI_ENABLE
JVMTI_HEAP_FILTER_CLASS_TAGGED
JVMTI_HEAP_FILTER_CLASS_UNTAGGED
JVMTI_HEAP_FILTER_TAGGED
JVMTI_HEAP_FILTER_UNTAGGED
JVMTI_HEAP_OBJECT_EITHER
JVMTI_HEAP_OBJECT_TAGGED
JVMTI_HEAP_OBJECT_UNTAGGED
JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT
JVMTI_HEAP_REFERENCE_CLASS
JVMTI_HEAP_REFERENCE_CLASS_LOADER
JVMTI_HEAP_REFERENCE_CONSTANT_POOL
JVMTI_HEAP_REFERENCE_FIELD
JVMTI_HEAP_REFERENCE_INTERFACE
JVMTI_HEAP_REFERENCE_JNI_GLOBAL
JVMTI_HEAP_REFERENCE_JNI_LOCAL
JVMTI_HEAP_REFERENCE_MONITOR
JVMTI_HEAP_REFERENCE_OTHER
JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN
JVMTI_HEAP_REFERENCE_SIGNERS
JVMTI_HEAP_REFERENCE_STACK_LOCAL
JVMTI_HEAP_REFERENCE_STATIC_FIELD
JVMTI_HEAP_REFERENCE_SUPERCLASS
JVMTI_HEAP_REFERENCE_SYSTEM_CLASS
JVMTI_HEAP_REFERENCE_THREAD
JVMTI_HEAP_ROOT_JNI_GLOBAL
JVMTI_HEAP_ROOT_JNI_LOCAL
JVMTI_HEAP_ROOT_MONITOR
JVMTI_HEAP_ROOT_OTHER
JVMTI_HEAP_ROOT_STACK_LOCAL
JVMTI_HEAP_ROOT_SYSTEM_CLASS
JVMTI_HEAP_ROOT_THREAD
JVMTI_ITERATION_ABORT
JVMTI_ITERATION_CONTINUE
JVMTI_ITERATION_IGNORE
JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED
JVMTI_JAVA_LANG_THREAD_STATE_MASK
JVMTI_JAVA_LANG_THREAD_STATE_NEW
JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE
JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED
JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING
JVMTI_JAVA_LANG_THREAD_STATE_WAITING
JVMTI_JLOCATION_JVMBCI
JVMTI_JLOCATION_MACHINEPC
JVMTI_JLOCATION_OTHER
JVMTI_KIND_ALLOC_ALLOC_BUF
JVMTI_KIND_ALLOC_BUF
JVMTI_KIND_IN
JVMTI_KIND_IN_BUF
JVMTI_KIND_IN_PTR
JVMTI_KIND_OUT
JVMTI_KIND_OUT_BUF
JVMTI_PHASE_DEAD
JVMTI_PHASE_LIVE
JVMTI_PHASE_ONLOAD
JVMTI_PHASE_PRIMORDIAL
JVMTI_PHASE_START
JVMTI_PRIMITIVE_TYPE_BOOLEAN
JVMTI_PRIMITIVE_TYPE_BYTE
JVMTI_PRIMITIVE_TYPE_CHAR
JVMTI_PRIMITIVE_TYPE_DOUBLE
JVMTI_PRIMITIVE_TYPE_FLOAT
JVMTI_PRIMITIVE_TYPE_INT
JVMTI_PRIMITIVE_TYPE_LONG
JVMTI_PRIMITIVE_TYPE_SHORT
JVMTI_REFERENCE_ARRAY_ELEMENT
JVMTI_REFERENCE_CLASS
JVMTI_REFERENCE_CLASS_LOADER
JVMTI_REFERENCE_CONSTANT_POOL
JVMTI_REFERENCE_FIELD
JVMTI_REFERENCE_INTERFACE
JVMTI_REFERENCE_PROTECTION_DOMAIN
JVMTI_REFERENCE_SIGNERS
JVMTI_REFERENCE_STATIC_FIELD
JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR
JVMTI_RESOURCE_EXHAUSTED_THREADS
JVMTI_THREAD_MAX_PRIORITY
JVMTI_THREAD_MIN_PRIORITY
JVMTI_THREAD_NORM_PRIORITY
JVMTI_THREAD_STATE_ALIVE
JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
JVMTI_THREAD_STATE_IN_NATIVE
JVMTI_THREAD_STATE_IN_OBJECT_WAIT
JVMTI_THREAD_STATE_INTERRUPTED
JVMTI_THREAD_STATE_PARKED
JVMTI_THREAD_STATE_RUNNABLE
JVMTI_THREAD_STATE_SLEEPING
JVMTI_THREAD_STATE_SUSPENDED
JVMTI_THREAD_STATE_TERMINATED
JVMTI_THREAD_STATE_VENDOR_1
JVMTI_THREAD_STATE_VENDOR_2
JVMTI_THREAD_STATE_VENDOR_3
JVMTI_THREAD_STATE_WAITING
JVMTI_THREAD_STATE_WAITING_INDEFINITELY
JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
JVMTI_TIMER_ELAPSED
JVMTI_TIMER_TOTAL_CPU
JVMTI_TIMER_USER_CPU
JVMTI_TYPE_CCHAR
JVMTI_TYPE_CVOID
JVMTI_TYPE_JBOOLEAN
JVMTI_TYPE_JBYTE
JVMTI_TYPE_JCHAR
JVMTI_TYPE_JCLASS
JVMTI_TYPE_JDOUBLE
JVMTI_TYPE_JFIELDID
JVMTI_TYPE_JFLOAT
JVMTI_TYPE_JINT
JVMTI_TYPE_JLONG
JVMTI_TYPE_JMETHODID
JVMTI_TYPE_JNIENV
JVMTI_TYPE_JOBJECT
JVMTI_TYPE_JSHORT
JVMTI_TYPE_JTHREAD
JVMTI_TYPE_JVALUE
JVMTI_VERBOSE_CLASS
JVMTI_VERBOSE_GC
JVMTI_VERBOSE_JNI
JVMTI_VERBOSE_OTHER
JVMTI_VERSION_INTERFACE_JNI
JVMTI_VERSION_INTERFACE_JVMTI
JVMTI_VERSION_MASK_INTERFACE_TYPE
JVMTI_VERSION_MASK_MAJOR
JVMTI_VERSION_MASK_MICRO
JVMTI_VERSION_MASK_MINOR
JVMTI_VERSION_SHIFT_MAJOR
JVMTI_VERSION_SHIFT_MICRO
JVMTI_VERSION_SHIFT_MINOR
JVMTI_VISIT_ABORT
JVMTI_VISIT_OBJECTS

Change History

Last update: 09/05/07
Version: 1.2.3

The JVM TI specification is an evolving document with major, minor, and micro version numbers. A released version of the specification is uniquely identified by its major and minor version. The functions, events, and capabilities in this specification indicate a "Since" value which is the major and minor version in which it was introduced. The version of the specification implemented by the VM can be retrieved at runtime with the GetVersionNumber function.

Version
Date 		Changes
14 Nov 2002 | Converted to XML document.
14 Nov 2002 | Elided heap dump functions (for now) since what was there was wrong.
18 Nov 2002 | Added detail throughout.
18 Nov 2002 | Changed JVMTI_THREAD_STATUS_RUNNING to JVMTI_THREAD_STATUS_RUNNABLE.
19 Nov 2002 | Added AsyncGetStackTrace.
19 Nov 2002 | Added jframeID return to GetStackTrace.
19 Nov 2002 | Elided GetCurrentFrame and GetCallingFrame functions (for now) since what was there since they are redundant with GetStackTrace.
19 Nov 2002 | Elided ClearAllBreakpoints since it has always been redundant.
19 Nov 2002 | Added GetSystemProperties.
19 Nov 2002 | Changed the thread local storage functions to use jthread.
20 Nov 2002 | Added GetJLocationFormat.
22 Nov 2002 | Added events and introductory text.
22 Nov 2002 | Cross reference type and constant definitions.
24 Nov 2002 | Added DTD.
24 Nov 2002 | Added capabilities function section.
29 Nov 2002 | Assign capabilities to each function and event.
29 Nov 2002 | Add JNI interception functions.
30 Nov 2002 | Auto generate SetEventNotificationMode capabilities.
30 Nov 2002 | Add VMObjectAlloc event.
30 Nov 2002 | Add DynamicCodeGenerated event.
30 Nov 2002 | Add const to declarations.
30 Nov 2002 | Change method exit and frame pop to send on exception.
1 Dec 2002 | Add ForceGarbageCollection.
2 Dec 2002 | Redo Xrun section; clarify GetStackTrace and add example; Fix width problems; use "agent" consistently.
8 Dec 2002 | Remove previous start-up intro. Add JVM TI Environments section.
8 Dec 2002 | Add DisposeEnvironment.
9 Dec 2002 | Numerous minor updates.
15 Dec 2002 | Add heap profiling functions added: get/set annotation, iterate live objects/heap. Add heap profiling functions place holder added: heap roots. Heap profiling event added: object free. Heap profiling event redesigned: vm object allocation. Heap profiling event placeholders added: garbage collection start/finish. Native method bind event added.
19 Dec 2002 | Revamp suspend/resume functions. Add origin information with jvmdi tag. Misc fixes.
24 Dec 2002 | Add semantics to types.
27 Dec 2002 | Add local reference section. Autogenerate parameter descriptions from types.
28 Dec 2002 | Document that RunAgentThread sends threadStart.
29 Dec 2002 | Remove redundant local ref and dealloc warning. Convert GetRawMonitorName to allocated buffer. Add GenerateEvents.
30 Dec 2002 | Make raw monitors a type and rename to "jrawMonitorID".
1 Jan 2003 | Include origin information. Clean-up JVMDI issue references. Remove Deallocate warnings which are now automatically generated.
2 Jan 2003 | Fix representation issues for jthread.
3 Jan 2003 | Make capabilities buffered out to 64 bits - and do it automatically.
4 Jan 2003 | Make constants which are enumeration into enum types. Parameters now of enum type. Clean-up and index type section. Replace remaining datadef entities with callback.
7 Jan 2003 | Correct GenerateEvents description. More internal semantics work.
9 Jan 2003 | Replace previous GetSystemProperties with two functions which use allocated information instead fixed. Add SetSystemProperty. More internal semantics work.
12 Jan 2003 | Add varargs to end of SetEventNotificationMode.
20 Jan 2003 | Finish fixing spec to reflect that alloc sizes are jlong.
22 Jan 2003 | Allow NULL as RunAgentThread arg.
22 Jan 2003 | Fixed names to standardized naming convention Removed AsyncGetStackTrace.
29 Jan 2003 | Since we are using jthread, removed GetThread.
31 Jan 2003 | Change GetFieldName to allow NULLs like GetMethodName.
v40
29 Feb 2003 		Rewrite the introductory text, adding sections on start-up, environments and bytecode instrumentation. Change the command line arguments per EG discussions. Add an introduction to the capabilities section. Add the extension mechanism category and functions. Mark for deletion, but clarified anyhow, SuspendAllThreads. Rename IterateOverLiveObjects to IterateOverReachableObjects and change the text accordingly. Clarify IterateOverHeap. Clarify CompiledMethodLoad. Discuss prerequisite state for Calling Functions. Clarify SetAllocationHooks. Added issues ("To be resolved:") through-out. And so on...
v41
6 Mar 2003 		Remove struct from the call to GetOwnedMonitorInfo. Automatically generate most error documentation, remove (rather broken) hand written error doc. Better describe capability use (empty initial set). Add min value to jint params. Remove the capability can_access_thread_local_storage. Rename error JVMTI_ERROR_NOT_IMPLEMENTED to JVMTI_ERROR_MUST_POSSESS_CAPABILITY; same for *NOT_IMPLEMENTED. Description fixes.
v42
8 Mar 2003 		Rename GetClassSignature to GetClassName. Rename IterateOverClassObjects to IterateOverInstancesOfClass. Remove GetMaxStack (operand stack isn't used in JVM TI). Description fixes: define launch-time, remove native frame pop from PopFrame, and assorted clarifications.
v43
8 Mar 2003 		Fix minor editing problem.
v44
10 Mar 2003 		Add phase information. Remap (compact) event numbers.
v45
11 Mar 2003 		More phase information - allow "any". Elide raw monitor queries and events. Minor description fixes.
v46
12 Mar 2003 		Add GetPhase. Use "phase" through document. Elide GetRawMonitorName. Elide GetObjectMonitors.
v47
12 Mar 2003 		Fixes from link, XML, and spell checking. Auto-generate the callback structure.
v48
13 Mar 2003 		One character XML fix.
v49
13 Mar 2003 		Change function parameter names to be consistent with event parameters (fooBarBaz becomes foo_bar_baz).
v50
14 Mar 2003 		Fix broken link. Fix thread markers.
v51
14 Mar 2003 		Change constants so they are under 128 to workaround compiler problems.
v52
23 Mar 2003 		Overhaul capabilities. Separate GetStackTrace into GetStackTrace and GetStackFrames.
v54
8 Apr 2003 		Use depth instead of jframeID to reference frames. Remove the now irrelevant GetCurrentFrame, GetCallerFrame and GetStackFrames. Remove frame arg from events.
v55
9 Apr 2003 		Remove GetObjectWithAnnotation since tests show bufferred approach more efficient. Add missing annotation_count to GetObjectsWithAnnotations
v56
10 Apr 2003 		Remove confusing parenthetical statement in GetObjectsWithAnnotations
v58
13 Apr 2003 		Replace jclass/jmethodID representation of method with simply jmethodID; Pass JvmtiEnv* as first arg of every event; remove JNIEnv* where inappropriate. Replace can_access_frames with can_access_local_variables; remove from purely stack access. Use can_get_synthetic_attribute; fix description. Clarify that zero length arrays must be deallocated. Clarify RelinquishCapabilities. Generalize JVMTI_ERROR_VM_DEAD to JVMTI_ERROR_WRONG_PHASE.
v59
27 Apr 2003 		Remove lingering indirect references to OBSOLETE_METHOD_ID.
v60
4 May 2003 		Allow DestroyRawMonitor during OnLoad.
v61
7 May 2003 		Added not monitor owner error return to DestroyRawMonitor.
v62
13 May 2003 		Clarify semantics of raw monitors. Change flags on GetThreadStatus. GetClassLoader return NULL for the bootstrap class loader. Add GetClassName issue. Define local variable signature. Disallow zero in annotations array of GetObjectsWithAnnotations. Remove over specification in GetObjectsWithAnnotations. Elide SetAllocationHooks. Elide SuspendAllThreads.
v63
14 May 2003 		Define the data type jvmtiEventCallbacks. Zero length allocations return NULL. Keep SetAllocationHooks in JVMDI, but remove from JVM TI. Add JVMTI_THREAD_STATUS_FLAG_INTERRUPTED.
v64
15 May 2003 		Better wording, per review.
v65
15 May 2003 		First Alpha. Make jmethodID and jfieldID unique, jclass not used.
v66
27 May 2003 		Fix minor XSLT errors.
v67
13 June 2003 		Undo making jfieldID unique (jmethodID still is).
v68
17 June 2003 		Changes per June 11th Expert Group meeting -- Overhaul Heap functionality: single callback, remove GetHeapRoots, add reachable iterators, and rename "annotation" to "tag". NULL thread parameter on most functions is current thread. Add timers. Remove ForceExit. Add GetEnvironmentLocalStorage. Add verbose flag and event. Add AddToBootstrapClassLoaderSearch. Update ClassFileLoadHook.
v69
18 June 2003 		Clean up issues sections. Rename GetClassName back to GetClassSignature and fix description. Add generic signature to GetClassSignature, GetFieldSignature, GetMethodSignature, and GetLocalVariableTable. Elide EstimateCostOfCapabilities. Clarify that the system property functions operate on the VM view of system properties. Clarify Agent_OnLoad. Remove "const" from JNIEnv* in events. Add metadata accessors.
v70
18 June 2003 		Add start_depth to GetStackTrace. Move system properties to a new category. Add GetObjectSize. Remove "X" from command line flags. XML, HTML, and spell check corrections.
v71
19 June 2003 		Fix JVMTI_HEAP_ROOT_THREAD to be 6. Make each synopsis match the function name. Fix unclear wording.
v72
26 June 2003 		SetThreadLocalStorage and SetEnvironmentLocalStorage should allow value to be set to NULL. NotifyFramePop, GetFrameLocationm and all the local variable operations needed to have their wording about frames fixed. Grammar and clarity need to be fixed throughout. Capitalization and puntuation need to be consistent. Need micro version number and masks for accessing major, minor, and micro. The error code lists should indicate which must be returned by an implementation. The command line properties should be visible in the properties functions. Disallow popping from the current thread. Allow implementations to return opaque frame error when they cannot pop. The NativeMethodBind event should be sent during any phase. The DynamicCodeGenerated event should be sent during any phase. The following functions should be allowed to operate before VMInit: Set/GetEnvironmentLocalStorage GetMethodDeclaringClass GetClassSignature GetClassModifiers IsInterface IsArrayClass GetMethodName GetMethodModifiers GetMaxLocals GetArgumentsSize GetLineNumberTable GetMethodLocation IsMethodNative IsMethodSynthetic. Other changes (to XSL): Argument description should show asterisk after not before pointers. NotifyFramePop, GetFrameLocationm and all the local variable operations should hsve the NO_MORE_FRAMES error added. Not alive threads should have a different error return than invalid thread.
v73
7 July 2003 		VerboseOutput event was missing message parameter. Minor fix-ups.
v74
14 July 2003 		Technical Publications Department corrections. Allow thread and environment local storage to be set to NULL.
v75
23 July 2003 		Use new Agent_OnLoad rather than overloaded JVM_OnLoad. Add JNICALL to callbacks (XSL). Document JNICALL requirement for both events and callbacks (XSL). Restrict RedefineClasses to methods and attributes. Elide the VerboseOutput event. VMObjectAlloc: restrict when event is sent and remove method parameter. Finish loose ends from Tech Pubs edit.
v76
24 July 2003 		Change ClassFileLoadHook event to send the class instead of a boolean of redefine.
v77
24 July 2003 		XML fixes. Minor text clarifications and corrections.
v78
24 July 2003 		Remove GetExceptionHandlerTable and GetThrownExceptions from JVM TI. Clarify that stack frames are JVM Spec frames. Split can_get_source_info into can_get_source_file_name, can_get_line_numbers, and can_get_source_debug_extension. PopFrame cannot have a native calling method. Removed incorrect statement in GetClassloaderClasses (see The Java™ Virtual Machine Specification, Chapter 4.4).
v79
24 July 2003 		XML and text fixes. Move stack frame description into Stack Frame category.
v80
26 July 2003 		Allow NULL (means bootstrap loader) for GetClassloaderClasses. Add new heap reference kinds for references from classes. Add timer information struct and query functions. Add AvailableProcessors. Rename GetOtherThreadCpuTime to GetThreadCpuTime. Explicitly add JVMTI_ERROR_INVALID_THREAD and JVMTI_ERROR_THREAD_NOT_ALIVE to SetEventNotification mode. Add initial thread to the VM_INIT event. Remove platform assumptions from AddToBootstrapClassLoaderSearch.
v81
26 July 2003 		Grammar and clarity changes per review.
v82
27 July 2003 		More grammar and clarity changes per review. Add Agent_OnUnload.
v83
28 July 2003 		Change return type of Agent_OnUnload to void.
v84
28 July 2003 		Rename JVMTI_REFERENCE_ARRAY to JVMTI_REFERENCE_ARRAY_ELEMENT.
v85
28 July 2003 		Steal java.lang.Runtime.availableProcessors() wording for AvailableProcessors(). Guarantee that zero will never be an event ID. Remove some issues which are no longer issues. Per review, rename and more completely document the timer information functions.
v86
29 July 2003 		Non-spec visible change to XML controlled implementation: SetThreadLocalStorage must run in VM mode.
0.1.87
5 August 2003 		Add GetErrorName. Add varargs warning to jvmtiExtensionEvent. Remove "const" on the jvmtiEnv* of jvmtiExtensionEvent. Remove unused can_get_exception_info capability. Pass jvmtiEnv* and JNIEnv* to the jvmtiStartFunction. Fix jvmtiExtensionFunctionInfo.func declared type. Extension function returns error code. Use new version numbering.
0.2.88
5 August 2003 		Remove the ClassUnload event.
0.2.89
8 August 2003 		Heap reference iterator callbacks return an enum that allows outgoing object references to be ignored. Allow JNIEnv as a param type to extension events/functions.
0.2.90
15 August 2003 		Fix a typo.
0.2.91
2 September 2003 		Remove all metadata functions: GetClassMetadata, GetFieldMetadata, and GetMethodMetadata.
0.2.92
1 October 2003 		Mark the functions Allocate. Deallocate, RawMonitor*, SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage as safe for use in heap callbacks and GC events.
0.2.93
24 November 2003 		Add pass through opaque user data pointer to heap iterate functions and callbacks. In the CompiledMethodUnload event, send the code address. Add GarbageCollectionOccurred event. Add constant pool reference kind. Mark the functions CreateRawMonitor and DestroyRawMonitor as safe for use in heap callbacks and GC events. Clarify: VMDeath, GetCurrentThreadCpuTimerInfo, GetThreadCpuTimerInfo, IterateOverReachableObjects, IterateOverObjectsReachableFromObject, GetTime and JVMTI_ERROR_NULL_POINTER. Add missing errors to: GenerateEvents and AddToBootstrapClassLoaderSearch. Fix description of ClassFileLoadHook name parameter. In heap callbacks and GC/ObjectFree events, specify that only explicitly allowed functions can be called. Allow GetCurrentThreadCpuTimerInfo, GetCurrentThreadCpuTime, GetTimerInfo, and GetTime during callback. Allow calling SetTag/GetTag during the onload phase. SetEventNotificationMode, add: error attempted inappropriate thread level control. Remove jvmtiExceptionHandlerEntry. Fix handling of native methods on the stack -- location_ptr param of GetFrameLocation, remove JVMTI_ERROR_OPAQUE_FRAME from GetFrameLocation, jvmtiFrameInfo.location, and jlocation. Remove typo (from JVMPI) implying that the MonitorWaited event is sent on sleep.
0.2.94
25 November 2003 		Clarifications and typos.
0.2.95
3 December 2003 		Allow NULL user_data in heap iterators.
0.2.97
28 January 2004 		Add GetThreadState, deprecate GetThreadStatus.
0.2.98
29 January 2004 		INVALID_SLOT and TYPE_MISMATCH errors should be optional.
0.2.102
12 February 2004 		Remove MonitorContendedExit. Added JNIEnv parameter to VMObjectAlloc. Clarified definition of class_tag and referrer_index parameters to heap callbacks.
0.2.103
16 Febuary 2004 		Document JAVA_TOOL_OPTIONS.
0.2.105
17 Febuary 2004 		Divide start phase into primordial and start. Add VMStart event Change phase associations of functions and events.
0.3.6
18 Febuary 2004 		Elide deprecated GetThreadStatus. Bump minor version, subtract 100 from micro version
0.3.7
18 Febuary 2004 		Document that timer nanosecond values are unsigned. Clarify text having to do with native methods.
0.3.8
19 Febuary 2004 		Fix typos. Remove elided deprecated GetThreadStatus.
0.3.9
23 Febuary 2004 		Require NotifyFramePop to act on suspended threads.
0.3.10
24 Febuary 2004 		Add capabilities (can_redefine_any_class and can_generate_all_class_hook_events) and an error (JVMTI_ERROR_UNMODIFIABLE_CLASS) which allow some classes to be unmodifiable.
0.3.11
28 Febuary 2004 		Add JVMTI_ERROR_MUST_POSSESS_CAPABILITY to SetEventNotificationMode.
0.3.12
8 March 2004 		Clarified CompiledMethodUnload so that it is clear the event may be posted after the class has been unloaded.
0.3.13
5 March 2004 		Change the size parameter of VMObjectAlloc to jlong to match GetObjectSize.
0.3.14
13 March 2004 		Added guideline for the use of the JNI FindClass function in event callback functions.
0.3.15
15 March 2004 		Add GetAllStackTraces and GetThreadListStackTraces.
0.3.16
19 March 2004 		ClassLoad and ClassPrepare events can be posted during start phase.
0.3.17
25 March 2004 		Add JVMTI_ERROR_NATIVE_METHOD to GetLineNumberTable, GetLocalVariableTable, GetMaxLocals, GetArgumentsSize, GetMethodLocation, GetBytecodes.
0.3.18
29 March 2004 		Return the timer kind in the timer information structure.
0.3.19
31 March 2004 		Spec clarifications: JVMTI_THREAD_STATE_IN_NATIVE might not include JNI or JVM TI. ForceGarbageCollection does not run finalizers. The context of the specification is the Java platform. Warn about early instrumentation.
0.3.20
1 April 2004 		Refinements to the above clarifications and Clarify that an error returned by Agent_OnLoad terminates the VM.
0.3.21
1 April 2004 		Array class creation does not generate a class load event.
0.3.22
7 April 2004 		Align thread state hierarchy more closely with java.lang.Thread.State.
0.3.23
12 April 2004 		Clarify the documentation of thread state.
0.3.24
19 April 2004 		Remove GarbageCollectionOccurred event -- can be done by agent.
0.3.25
22 April 2004 		Define "command-line option".
0.3.26
29 April 2004 		Describe the intended use of bytecode instrumentation. Fix description of extension event first parameter.
0.3.27
30 April 2004 		Clarification and typos.
0.3.28
18 May 2004 		Remove DataDumpRequest event.
0.3.29
18 May 2004 		Clarify RawMonitorWait with zero timeout. Clarify thread state after RunAgentThread.
0.3.30
24 May 2004 		Clean-up: fix bad/old links, etc.
0.3.31
30 May 2004 		Clarifications including: All character strings are modified UTF-8. Agent thread visibiity. Meaning of obsolete method version. Thread invoking heap callbacks,
1.0.32
1 June 2004 		Bump major.minor version numbers to "1.0".
1.0.33
2 June 2004 		Clarify interaction between ForceGarbageCollection and ObjectFree.
1.0.34
6 June 2004 		Restrict AddToBootstrapClassLoaderSearch and SetSystemProperty to the OnLoad phase only.
1.0.35
11 June 2004 		Fix typo in SetTag.
1.0.36
18 June 2004 		Fix trademarks. Add missing parameter in example GetThreadState usage.
1.0.37
4 August 2004 		Copyright updates.
1.0.38
5 November 2004 		Add missing function table layout. Add missing description of C++ member function format of functions. Clarify that name in CFLH can be NULL. Released as part of J2SETM 5.0.
1.1.47
24 April 2005 		Bump major.minor version numbers to "1.1". Add ForceEarlyReturn* functions. Add GetOwnedMonitorStackDepthInfo function. Add GetCurrentThread function. Add "since" version marker. Add AddToSystemClassLoaderSearch. Allow AddToBootstrapClassLoaderSearch be used in live phase. Fix historic rubbish in the descriptions of the heap_object_callback parameter of IterateOverHeap and IterateOverInstancesOfClass functions; disallow NULL for this parameter. Clarify, correct and make consistent: wording about current thread, opaque frames and insufficient number of frames in PopFrame. Consistently use "current frame" rather than "topmost". Clarify the JVMTI_ERROR_TYPE_MISMATCH errors in GetLocal* and SetLocal* by making them compatible with those in ForceEarlyReturn*. Many other clarifications and wording clean ups.
1.1.48
25 April 2005 		Add GetConstantPool. Switch references to the first edition of the VM Spec, to the seconds edition.
1.1.49
26 April 2005 		Clarify minor/major version order in GetConstantPool.
1.1.50
26 April 2005 		Add SetNativeMethodPrefix and SetNativeMethodPrefixes. Reassign GetOwnedMonitorStackDepthInfo to position 153. Break out Class Loader Search in its own documentation category. Deal with overly long lines in XML source.
1.1.51
29 April 2005 		Allow agents be started in the live phase. Added paragraph about deploying agents.
1.1.52
30 April 2005 		Add specification description to SetNativeMethodPrefix(es). Better define the conditions on GetConstantPool.
1.1.53
30 April 2005 		Break out the GetClassVersionNumber function from GetConstantPool. Clean-up the references to the VM Spec.
1.1.54
1 May 2005 		Allow SetNativeMethodPrefix(es) in any phase. Add clarifications about the impact of redefinition on GetConstantPool.
1.1.56
2 May 2005 		Various clarifications to SetNativeMethodPrefix(es).
1.1.57
2 May 2005 		Add missing performance warning to the method entry event.
1.1.58
5 May 2005 		Remove internal JVMDI support.
1.1.59
8 May 2005 		Add RetransformClasses. Revamp the bytecode instrumentation documentation. Change IsMethodObsolete to no longer require the can_redefine_classes capability.
1.1.63
11 May 2005 		Clarifications for retransformation.
1.1.64
11 May 2005 		Clarifications for retransformation, per review. Lock "retransformation (in)capable" at class load enable time.
1.1.67
4 June 2005 		Add new heap functionity which supports reporting primitive values, allows setting the referrer tag, and has more powerful filtering: FollowReferences, IterateThroughHeap, and their associated callbacks, structs, enums, and constants.
1.1.68
4 June 2005 		Clarification.
1.1.69
6 June 2005 		FollowReferences, IterateThroughHeap: Put callbacks in a struct; Add missing error codes; reduce bits in the visit control flags.
1.1.70
14 June 2005 		More on new heap functionity: spec clean-up per review.
1.1.71
15 June 2005 		More on new heap functionity: Rename old heap section to Heap (1.0).
1.1.72
21 June 2005 		Fix typos.
1.1.73
27 June 2005 		Make referrer info structure a union.
1.1.74
9 September 2005 		In new heap functions: Add missing superclass reference kind. Use a single scheme for computing field indexes. Remove outdated references to struct based referrer info.
1.1.75
12 September 2005 		Don't callback during FollowReferences on frivolous java.lang.Object superclass.
1.1.76
13 September 2005 		In string primitive callback, length now Unicode length. In array and string primitive callbacks, value now "const". Note possible compiler impacts on setting JNI function table.
1.1.77
13 September 2005 		GetClassVersionNumbers() and GetConstantPool() should return error on array or primitive class.
1.1.78
14 September 2005 		Grammar fixes.
1.1.79
26 September 2005 		Add IsModifiableClass query.
1.1.81
9 February 2006 		Add referrer_class_tag parameter to jvmtiHeapReferenceCallback.
1.1.82
13 February 2006 		Doc fixes: update can_redefine_any_class to include retransform. Clarify that exception events cover all Throwables. In GetStackTrace, no test is done for start_depth too big if start_depth is zero, Clarify fields reported in Primitive Field Callback -- static vs instance. Repair confusing names of heap types, including callback names. Require consistent usage of stack depth in the face of thread launch methods. Note incompatibility of JVM TI memory management with other systems.
1.1.85
14 February 2006 		Fix typos and missing renames.
1.1.86
13 March 2006 		Clarify that jmethodIDs and jfieldIDs can be saved. Clarify that Iterate Over Instances Of Class includes subclasses.
1.1.87
14 March 2006 		Better phrasing.
1.1.88
16 March 2006 		Match the referrer_index for static fields in Object Reference Callback with the Reference Implementation (and all other known implementations); that is, make it match the definition for instance fields. In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover an invalid thread in the list; and specify that not started threads return empty stacks.
1.1.89
17 March 2006 		Typo.
1.1.90
25 March 2006 		Typo.
1.1.91
6 April 2006 		Remove restrictions on AddToBootstrapClassLoaderSearch and AddToSystemClassLoaderSearch.
1.1.93
1 May 2006 		Changed spec to return -1 for monitor stack depth for the implementation which can not determine stack depth.
1.1.94
3 May 2006 		Corrections for readability and accuracy courtesy of Alan Pratt of IBM. List the object relationships reported in FollowReferences.
1.1.95
5 May 2006 		Clarify the object relationships reported in FollowReferences.
1.1.98
28 June 2006 		Clarify DisposeEnvironment; add warning. Fix typos in SetLocalXXX "retrieve" => "set". Clarify that native method prefixes must remain set while used. Clarify that exactly one Agent_OnXXX is called per agent. Clarify that library loading is independent from start-up. Remove ambiguous reference to Agent_OnLoad in the Agent_OnUnload spec.
1.1.99
31 July 2006 		Clarify the interaction between functions and exceptions. Clarify and give examples of field indices. Remove confusing "That is" sentence from MonitorWait and MonitorWaited events. Update links to point to Java 6.
1.1.102
6 August 2006 		Add ResourceExhaustedEvent.
1.2.2
11 October 2012 		Fixed the "HTTP" and "Missing Anchor" errors reported by the LinkCheck tool.
1.2.3
19 June 2013 		Added support for statically linked agents.


1 - Introduction

CONTENTS | PREV | NEXT Java Remote Method Invocation

Introduction

CHAPTER 1

Topics:

  • Background
  • System Goals

CONTENTS | PREV | NEXT

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


1 - Introduction

CONTENTS | PREV | NEXT Java Remote Method Invocation

1.1 Background

Distributed systems require that computations running in different address spaces, potentially on different hosts, be able to communicate. For a basic communication mechanism, the JavaTM programming language supports sockets, which are flexible and sufficient for general communication. However, sockets require the client and server to engage in applications-level protocols to encode and decode messages for exchange, and the design of such protocols is cumbersome and can be error-prone.

An alternative to sockets is Remote Procedure Call (RPC), which abstracts the communication interface to the level of a procedure call. Instead of working directly with sockets, the programmer has the illusion of calling a local procedure, when in fact the arguments of the call are packaged up and shipped off to the remote target of the call. RPC systems encode arguments and return values using an external data representation, such as XDR.

RPC, however, does not translate well into distributed object systems, where communication between program-level objects residing in different address spaces is needed. In order to match the semantics of object invocation, distributed object systems require remote method invocation or RMI. In such systems, a local surrogate (stub) object manages the invocation on a remote object.

The Java platform's remote method invocation system described in this specification has been specifically designed to operate in the Java application environment. The Java programming language's RMI system assumes the homogeneous environment of the Java virtual machine (JVM), and the system can therefore take advantage of the Java platform's object model whenever possible.

CONTENTS | PREV | NEXT

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


1 - Introduction

CONTENTS | PREV | NEXT Java Remote Method Invocation

1.2 System Goals

The goals for supporting distributed objects in the Java programming language are:

  • Support seamless remote invocation on objects in different virtual machines
  • Support callbacks from servers to applets
  • Integrate the distributed object model into the Java programming language in a natural way while retaining most of the Java programming language's object semantics
  • Make differences between the distributed object model and local Java platform's object model apparent
  • Make writing reliable distributed applications as simple as possible
  • Preserve the type-safety provided by the Java platform's runtime environment
  • Support various reference semantics for remote objects; for example live (nonpersistent) references, persistent references, and lazy activation
  • Maintain the safe environment of the Java platform provided by security managers and class loaders

Underlying all these goals is a general requirement that the RMI model be both simple (easy to use) and natural (fits well in the language).

The first two chapters in this specification describe the distributed object model for the Java programming language and the system overview. The remaining chapters describe the RMI client and server visible APIs which are part of the Java SE platform.

CONTENTS | PREV | NEXT

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.7 Locating Remote Objects

A simple bootstrap name server is provided for storing named references to remote objects. A remote object reference can be stored using the URL-based methods of the class java.rmi.Naming.

For a client to invoke a method on a remote object, that client must first obtain a reference to the object. A reference to a remote object is usually obtained as a parameter or return value in a method call. The RMI system provides a simple bootstrap name server from which to obtain remote objects on given hosts. The java.rmi.Naming class provides Uniform Resource Locator (URL) based methods to look up, bind, rebind, unbind, and list the name-object pairings maintained on a particular host and port.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.5 Implementing a Remote Interface

The general rules for a class that implements a remote interface are as follows:
  • The class usually extends java.rmi.server.UnicastRemoteObject, thereby inheriting the remote behavior provided by the classes java.rmi.server.RemoteObject and java.rmi.server.RemoteServer.
  • The class can implement any number of remote interfaces.
  • The class can extend another remote implementation class.
  • The class can define methods that do not appear in the remote interface, but those methods can only be used locally and are not available remotely.
For example, the following class BankAcctImpl implements the BankAccount remote interface and extends the java.rmi.server.UnicastRemoteObject class:
package mypackage;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class BankAccountImpl
        extends UnicastRemoteObject
        implements BankAccount
{
        private float balance = 0.0;

        public BankAccountImpl(float initialBalance)
                throws RemoteException
        {
                balance = initialBalance;
        }
        public void deposit(float amount) throws RemoteException {
                ...
        }
        public void withdraw(float amount) throws OverdrawnException,
                RemoteException {
                ...
        }
        public float getBalance() throws RemoteException {
                ...
        }
}

Note:

  • If necessary, a class that implements a remote interface can extend some other class besides java.rmi.server.UnicastRemoteObject. However, the implementation class must then assume the responsibility for exporting the object (taken care of by the UnicastRemoteObject constructor) and for implementing (if needed) the correct remote semantics of the hashCode, equals, and toString methods inherited from the java.lang.Object class.
  • If you export a remote object without specifying a socket factory, or if you export the object with a version of the method UnicastRemoteObject.exportObject or the constructor UnicastRemoteObject that does not contain parameters of type RMIClientSocketFactory and RMIServerSocketFactory, then the remote object is exported to all local addresses. To export a remote object to a specific address, see the section RMI Socket Factories.
CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.6 Parameter Passing in Remote Method Invocation

An argument to, or a return value from, a remote object can be any object that is serializable. This includes primitive types, remote objects, and non-remote objects that implement the java.io.Serializable interface. For more details on how to make classes serializable, see the "Java Object Serialization Specification." Classes, for parameters or return values, that are not available locally are downloaded dynamically by the RMI system. See the section on "Dynamic Class Loading" for more information on how RMI downloads parameter and return value classes when reading parameters, return values and exceptions.

2.6.1 Passing Non-remote Objects

A non-remote object, that is passed as a parameter of a remote method invocation or returned as a result of a remote method invocation, is passed by copy; that is, the object is serialized using the object serialization mechanism of the Java SE platform.

So, when a non-remote object is passed as an argument or return value in a remote method invocation, the content of the non-remote object is copied before invoking the call on the remote object.

When a non-remote object is returned from a remote method invocation, a new object is created in the calling virtual machine.

2.6.2 Passing Remote Objects

When passing an exported remote object as a parameter or return value in a remote method call, the stub for that remote object is passed instead. Remote objects that are not exported will not be replaced with a stub instance. A remote object passed as a parameter can only implement remote interfaces.

2.6.3 Referential Integrity

If two references to an object are passed from one JVM to another JVM in parameters (or in the return value) in a single remote method call and those references refer to the same object in the sending JVM, those references will refer to a single copy of the object in the receiving JVM. More generally stated: within a single remote method call, the RMI system maintains referential integrity among the objects passed as parameters or as a return value in the call.

2.6.4 Class Annotation

When an object is sent from one JVM to another in a remote method call, the RMI system annotates the class descriptor in the call stream with information (the URL) of the class so that the class can be loaded at the receiver. It is a requirement that classes be downloaded on demand during remote method invocation.

2.6.5 Parameter Transmission

Parameters in an RMI call are written to a stream that is a subclass of the class java.io.ObjectOutputStream in order to serialize the parameters to the destination of the remote call. The ObjectOutputStream subclass overrides the replaceObject method to replace each exported remote object with its corresponding stub instance. Parameters that are objects are written to the stream using the ObjectOutputStream's writeObject method. The ObjectOutputStream calls the replaceObject method for each object written to the stream via the writeObject method (that includes objects referenced by those objects that are written). The replaceObject method of RMI's subclass of ObjectOutputStream returns the following:
  • If the object passed to replaceObject is an instance of java.rmi.Remote and that object is exported to the RMI runtime, then it returns the stub for the remote object. If the object is an instance of java.rmi.Remote and the object is not exported to the RMI runtime, then replaceObject returns the object itself. A stub for a remote object is obtained via a call to the method java.rmi.server.RemoteObject.toStub.
  • If the object passed to replaceObject is not an instance of java.rmi.Remote, then the object is simply returned.
RMI's subclass of ObjectOutputStream also implements the annotateClass method that annotates the call stream with the location of the class so that it can be downloaded at the receiver. See the section "Dynamic Class Loading" for more information on how annotateClass is used.

Since parameters are written to a single ObjectOutputStream, references that refer to the same object at the caller will refer to the same copy of the object at the receiver. At the receiver, parameters are read by a single ObjectInputStream.

Any other default behavior of ObjectOutputStream for writing objects (and similarly ObjectInputStream for reading objects) is maintained in parameter passing. For example, the calling of writeReplace when writing objects and readResolve when reading objects is honored by RMI's parameter marshal and unmarshal streams.

In a similar manner to parameter passing in RMI as described above, a return value (or exception) is written to a subclass of ObjectOutputStream and has the same replacement behavior as parameter transmission.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.1 Distributed Object Applications

RMI applications are often comprised of two separate programs: a server and a client. A typical server application creates a number of remote objects, makes references to those remote objects accessible, and waits for clients to invoke methods on those remote objects. A typical client application gets a remote reference to one or more remote objects in the server and then invokes methods on them. RMI provides the mechanism by which the server and the client communicate and pass information back and forth. Such an application is sometimes referred to as a distributed object application.

Distributed object applications need to:

  • Locate remote objects

    Applications can use one of two mechanisms to obtain references to remote objects. An application can register its remote objects with RMI's simple naming facility, the rmiregistry, or the application can pass and return remote object references as part of its normal operation.

  • Communicate with remote objects

    Details of communication between remote objects are handled by RMI; to the programmer, remote communication looks like a standard method invocation.

  • Load class bytecodes for objects that are passed as parameters or return values

    Because RMI allows a caller to pass objects to remote objects, RMI provides the necessary mechanisms for loading an object's code as well as transmitting its data.

The illustration below depicts an RMI distributed application that uses the registry to obtain references to a remote object. The server calls the registry to associate a name with a remote object. The client looks up the remote object by its name in the server's registry and then invokes a method on it. The illustration also shows that the RMI system uses an existing web server to load bytecodes of classes written in the Java programming language, from server to client and from client to server, for objects when needed. RMI can load class bytecodes using any URL protocol (e.g., HTTP, FTP, file, etc.) that is supported by the Java platform.
This illustration depicts an RMI distributed application that uses the registry to obtain references to a remote object.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.2 Definition of Terms

In the Java SE platform's distributed object model, a remote object is one whose methods can be invoked from another Java virtual machine, potentially on a different host. An object of this type is described by one or more remote interfaces, which are interfaces written in the Java programming language that declare the methods of the remote object.

Remote method invocation (RMI) is the action of invoking a method of a remote interface on a remote object. Most importantly, a method invocation on a remote object has the same syntax as a method invocation on a local object.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

Distributed Object Model

CHAPTER 2

Topics:

  • Distributed Object Applications
  • Definition of Terms
  • The Distributed and Nondistributed Models Contrasted
  • Overview of RMI Interfaces and Classes
  • Implementing a Remote Interface
  • Parameter Passing in Remote Method Invocation
  • Locating Remote Objects

CONTENTS | PREV | NEXT

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.3 The Distributed and Nondistributed Models Contrasted

The Java SE platform's distributed object model is similar to the Java SE platform's object model in the following ways:
  • A reference to a remote object can be passed as an argument or returned as a result in any method invocation (local or remote).
  • A remote object can be cast to any of the set of remote interfaces supported by the implementation using the syntax for casting built into the Java programming language.
  • The built-in instanceof operator can be used to test the remote interfaces supported by a remote object.
The Java SE platform's distributed object model differs from the Java SE platform's object model in these ways:
  • Clients of remote objects interact with remote interfaces, never with the implementation classes of those interfaces.
  • Non-remote arguments to, and results from, a remote method invocation are passed by copy rather than by reference. This is because references to objects are only useful within a single virtual machine.
  • A remote object is passed by reference, not by copying the actual remote implementation.
  • The semantics of some of the methods defined by class java.lang.Object are specialized for remote objects.
  • Since the failure modes of invoking remote objects are inherently more complicated than the failure modes of invoking local objects, clients must deal with additional exceptions that can occur during a remote method invocation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Distributed Object Model

CONTENTS | PREV | NEXT Java Remote Method Invocation

2.4 Overview of RMI Interfaces and Classes

The interfaces and classes that are responsible for specifying the remote behavior of the RMI system are defined in the java.rmi package hierarchy. The following figure shows the relationship between several of these interfaces and classes:
relationship between several of these interfaces and classes

2.4.1 The java.rmi.Remote Interface

In RMI, a remote interface is an interface that declares a set of methods that may be invoked from a remote Java virtual machine. A remote interface must satisfy the following requirements:
  • A remote interface must at least extend, either directly or indirectly, the interface java.rmi.Remote.
  • Each method declaration in a remote interface or its super-interfaces must satisfy the requirements of a remote method declaration as follows:
    • A remote method declaration must include the exception java.rmi.RemoteException (or one of its superclasses such as java.io.IOException or java.lang.Exception) in its throws clause, in addition to any application-specific exceptions (note that application specific exceptions do not have to extend java.rmi.RemoteException).
    • In a remote method declaration, a remote object declared as a parameter or return value (either declared directly in the parameter list or embedded within a non-remote object in a parameter) must be declared as the remote interface, not the implementation class of that interface.
The interface java.rmi.Remote is a marker interface that defines no methods:
    public interface Remote {}
A remote interface must at least extend the interface java.rmi.Remote (or another remote interface that extends java.rmi.Remote). However, a remote interface may extend a non-remote interface under the following condition:
  • A remote interface may also extend another non-remote interface, as long as all of the methods (if any) of the extended interface satisfy the requirements of a remote method declaration.
For example, the following interface BankAccount defines a remote interface for accessing a bank account. It contains remote methods to deposit to the account, to get the account balance, and to withdraw from the account:
    public interface BankAccount extends java.rmi.Remote {
        public void deposit(float amount)
                throws java.rmi.RemoteException;
        public void withdraw(float amount)
                throws OverdrawnException, java.rmi.RemoteException;
        public float getBalance()
                throws java.rmi.RemoteException;
}
The next example shows a valid remote interface Beta that extends a non-remote interface Alpha, which has remote methods, and the interface java.rmi.Remote:
    public interface Alpha {
        public final String okay = "constants are okay too";
        public Object foo(Object obj)
                throws java.rmi.RemoteException;
        public void bar() throws java.io.IOException;
        public int baz() throws java.lang.Exception;
}

public interface Beta extends Alpha, java.rmi.Remote {
        public void ping() throws java.rmi.RemoteException;
}

2.4.2 The RemoteException Class

The java.rmi.RemoteException class is the superclass of exceptions thrown by the RMI runtime during a remote method invocation. To ensure the robustness of applications using the RMI system, each remote method declared in a remote interface must specify java.rmi.RemoteException (or one of its superclasses such as java.io.IOException or java.lang.Exception) in its throws clause.

The exception java.rmi.RemoteException is thrown when a remote method invocation fails for some reason. Some reasons for remote method invocation failure include:

  • Communication failure (the remote server is unreachable or is refusing connections; the connection is closed by the server, etc.)
  • Failure during parameter or return value marshalling or unmarshalling
  • Protocol errors
The class RemoteException is a checked exception (one that must be handled by the caller of a remote method and is checked by the compiler), not a RuntimeException.

2.4.3 The RemoteObject Class and its Subclasses

RMI server functions are provided by java.rmi.server.RemoteObject and its subclasses, java.rmi.server.RemoteServer and java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable.
  • The class java.rmi.server.RemoteObject provides implementations for the java.lang.Object methods, hashCode, equals, and toString that are sensible for remote objects.
  • The methods needed to create remote objects and export them (make them available to remote clients) are provided by the classes UnicastRemoteObject and Activatable. The subclass identifies the semantics of the remote reference, for example whether the server is a simple remote object or is an activatable remote object (one that executes when invoked).
  • The java.rmi.server.UnicastRemoteObject class defines a singleton (unicast) remote object whose references are valid only while the server process is alive.
  • The class java.rmi.activation.Activatable is an abstract class that defines an activatable remote object that starts executing when its remote methods are invoked and can shut itself down when necessary.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

RMI System Overview

CHAPTER 3

Topics:

  • Stubs and Skeletons
  • Thread Usage in Remote Method Invocations
  • Garbage Collection of Remote Objects
  • Dynamic Class Loading
  • RMI Through Firewalls Via Proxies

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

3.3 Garbage Collection of Remote Objects

In a distributed system, just as in the local system, it is desirable to automatically delete those remote objects that are no longer referenced by any client. This frees the programmer from needing to keep track of the remote objects' clients so that it can terminate appropriately. RMI uses a reference-counting garbage collection algorithm similar to Modula-3's Network Objects. (See "Network Objects" by Birrell, Nelson, and Owicki, Digital Equipment Corporation Systems Research Center Technical Report 115, 1994.)

To accomplish reference-counting garbage collection, the RMI runtime keeps track of all live references within each Java virtual machine. When a live reference enters a Java virtual machine, its reference count is incremented. The first reference to an object sends a "referenced" message to the server for the object. As live references are found to be unreferenced in the local virtual machine, the count is decremented. When the last reference has been discarded, an unreferenced message is sent to the server. Many subtleties exist in the protocol; most of these are related to maintaining the ordering of referenced and unreferenced messages in order to ensure that the object is not prematurely collected.

When a remote object is not referenced by any client, the RMI runtime refers to it using a weak reference. The weak reference allows the Java virtual machine's garbage collector to discard the object if no other local references to the object exist. The distributed garbage collection algorithm interacts with the local Java virtual machine's garbage collector in the usual ways by holding normal or weak references to objects.

As long as a local reference to a remote object exists, it cannot be garbage-collected and it can be passed in remote calls or returned to clients. Passing a remote object adds the identifier for the virtual machine to which it was passed to the referenced set. A remote object needing unreferenced notification must implement the java.rmi.server.Unreferenced interface. When those references no longer exist, the unreferenced method will be invoked. unreferenced is called when the set of references is found to be empty so it might be called more than once. Remote objects are only collected when no more references, either local or remote, still exist.

Note that if a network partition exists between a client and a remote server object, it is possible that premature collection of the remote object will occur (since the transport might believe that the client crashed). Because of the possibility of premature collection, remote references cannot guarantee referential integrity; in other words, it is always possible that a remote reference may in fact not refer to an existing object. An attempt to use such a reference will generate a RemoteException which must be handled by the application.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

3.4 Dynamic Class Loading

RMI allows parameters, return values and exceptions passed in RMI calls to be any object that is serializable. RMI uses the object serialization mechanism to transmit data from one virtual machine to another and also annotates the call stream with the appropriate location information so that the class definition files can be loaded at the receiver.

When parameters and return values for a remote method invocation are unmarshalled to become live objects in the receiving JVM, class definitions are required for all of the types of objects in the stream. The unmarshalling process first attempts to resolve classes by name in its local class loading context (the context class loader of the current thread). RMI also provides a facility for dynamically loading the class definitions for the actual types of objects passed as parameters and return values for remote method invocations from network locations specified by the transmitting endpoint. This includes the dynamic downloading of remote stub classes corresponding to particular remote object implementation classes (and used to contain remote references) as well as any other type that is passed by value in RMI calls, such as the subclass of a declared parameter type, that is not already available in the class loading context of the unmarshalling side.

To support dynamic class loading, the RMI runtime uses special subclasses of java.io.ObjectOutputStream and java.io.ObjectInputStream for the marshal streams that it uses for marshalling and unmarshalling RMI parameters and return values. These subclasses respectively override the annotateClass method of ObjectOutputStream and the resolveClass method of ObjectInputStream to communicate information about where to locate class files containing the definitions for classes corresponding to the class descriptors in the stream.

For every class descriptor written to an RMI marshal stream, the annotateClass method adds to the stream the result of calling java.rmi.server.RMIClassLoader.getClassAnnotation for the class object, which may be null or may be a String object representing the codebase URL path (a space-separated list of URLs) from which the remote endpoint should download the class definition file for the given class.

For every class descriptor read from an RMI marshal stream, the resolveClass method reads a single object from the stream. If the object is a String (and the value of the java.rmi.server.useCodebaseOnly property is not true), then resolveClass returns the result of calling RMIClassLoader.loadClass with the annotated String object as the first parameter and the name of the desired class in the class descriptor as the second parameter. Otherwise, resolveClass returns the result of calling RMIClassLoader.loadClass with the name of the desired class as the only parameter.

See the section "The RMIClassLoader Class" for more details about class loading in RMI.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

3.2 Thread Usage in Remote Method Invocations

A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads. Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

3.5 RMI Through Firewalls Via Proxies

The RMI transport layer normally attempts to open direct sockets to hosts on the Internet. Many intranets, however, have firewalls that do not allow this. The default RMI transport, therefore, provides two alternate HTTP-based mechanisms which enable a client behind a firewall to invoke a method on a remote object which resides outside the firewall.

As described in this section, the HTTP-based mechanism that the RMI transport layer uses for RMI calls only applies to firewalls with HTTP proxy servers.

3.5.1 How an RMI Call is Packaged within the HTTP Protocol

To get outside a firewall, the transport layer embeds an RMI call within the firewall-trusted HTTP protocol. The RMI call data is sent outside as the body of an HTTP POST request, and the return information is sent back in the body of the HTTP response. The transport layer will formulate the POST request in one of two ways:
  • If the firewall proxy will forward an HTTP request directed to an arbitrary port on the host machine, then it is forwarded directly to the port on which the RMI server is listening. The default RMI transport layer on the target machine is listening with a server socket that is capable of understanding and decoding RMI calls inside POST requests.
  • If the firewall proxy will only forward HTTP requests directed to certain well-known HTTP ports, then the call is forwarded to the HTTP server listening on port 80 of the host machine, and a CGI script is executed to forward the call to the target RMI server port on the same machine.

3.5.2 The Default Socket Factory

The RMI transport implementation includes an extension of the class java.rmi.server.RMISocketFactory, which is the default resource-provider for client and server sockets used to send and receive RMI calls; this default socket factory can be obtained via the java.rmi.server.RMISocketFactory.getDefaultSocketFactory method. This default socket factory creates sockets that transparently provide the firewall tunnelling mechanism as follows:
  • Client sockets first attempt a direct socket connection. Client sockets automatically attempt HTTP connections to hosts that cannot be contacted with a direct socket if that direct socket connection results in either a java.net.NoRouteToHostException or a java.net.UnknownHostException being thrown. If a direct socket connection results in any other java.io.IOException being thrown, such as a java.net.ConnectException, the implementation may attempt an HTTP connection.
  • Server sockets automatically detect if a newly-accepted connection is an HTTP POST request, and if so, return a socket that will expose only the body of the request to the transport and format its output as an HTTP response.
Client-side sockets, with this default behavior, are provided by the factory's java.rmi.server.RMISocketFactory.createSocket method. Server-side sockets with this default behavior are provided by the factory's java.rmi.server.RMISocketFactory.createServerSocket method.

3.5.3 Configuring the Client

A client can disable the packaging of RMI calls as HTTP requests by setting the java.rmi.server.disableHttp property to equal the boolean value true.

3.5.4 Configuring the Server

Note - The host name should not be specified as the host's IP address, because some firewall proxies will not forward to such a host name.
  1. In order for a client outside the server host's domain to be able to invoke methods on a server's remote objects, the client must be able to find the server. To do this, the remote references that the server exports must contain the fully-qualified name of the server host.

    Depending on the server's platform and network environment, this information may or may not be available to the Java virtual machine on which the server is running. If it is not available, the host's fully qualified name must be specified with the property java.rmi.server.hostname when starting the server.

    For example, use this command to start the RMI server class ServerImpl on the machine chatsubo.example.com:

       java -Djava.rmi.server.hostname=chatsubo.example.com ServerImpl
  2. If the server will not support RMI clients behind firewalls that can forward to arbitrary ports, use this configuration:
    1. An HTTP server is listening on port 80.
    2. A CGI script is located at the aliased URL path
          /cgi-bin/java-rmi.cgi
      This script:
      • Invokes the local interpreter for the Java programming language to execute a class internal to the transport layer which forwards the request to the appropriate RMI server port.
      • Defines properties in the Java virtual machine with the same names and values as the CGI 1.0 defined environment variables.
An example script is supplied in the RMI distribution for the Solaris and Windows 32 operating systems. Note that the script must specify the complete path to the interpreter for the Java programming language on the server machine.

3.5.5 Performance Issues and Limitations

Calls transmitted via HTTP requests are at least an order of magnitude slower that those sent through direct sockets, without taking proxy forwarding delays into consideration.

Because HTTP requests can only be initiated in one direction through a firewall, a client cannot export its own remote objects outside the firewall, because a host outside the firewall cannot initiate a method invocation back on the client.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


3 - RMI System Overview

CONTENTS | PREV | NEXT Java Remote Method Invocation

3.1 Stubs and Skeletons

RMI uses a standard mechanism (employed in RPC systems) for communicating with remote objects: stubs and skeletons. A stub for a remote object acts as a client's local representative or proxy for the remote object. The caller invokes a method on the local stub which is responsible for carrying out the method call on the remote object. In RMI, a stub for a remote object implements the same set of remote interfaces that a remote object implements.

When a stub's method is invoked, it does the following:

  • initiates a connection with the remote JVM containing the remote object,
  • marshals (writes and transmits) the parameters to the remote JVM,
  • waits for the result of the method invocation,
  • unmarshals (reads) the return value or exception returned, and
  • returns the value to the caller.
The stub hides the serialization of parameters and the network-level communication in order to present a simple invocation mechanism to the caller.

In the remote JVM, each remote object may have a corresponding skeleton (in Java 2 platform-only environments, skeletons are not required). The skeleton is responsible for dispatching the call to the actual remote object implementation. When a skeleton receives an incoming method invocation it does the following:

  • unmarshals (reads) the parameters for the remote method,
  • invokes the method on the actual remote object implementation, and
  • marshals (writes and transmits) the result (return value or exception) to the caller.
In the Java 2 SDK, Standard Edition, v1.2 an additional stub protocol was introduced that eliminates the need for skeletons in Java 2 platform-only environments. Instead, generic code is used to carry out the duties performed by skeletons in JDK1.1. Stubs and skeletons are generated by the rmic compiler.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


4 - Client Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

4.3 The Naming Class

See the Naming API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


4 - Client Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

4.1 The Remote Interface

See the Remote API documentation, and for more details on how to define a remote interface see the section "The java.rmi.Remote Interface".

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


4 - Client Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

Client Interfaces

CHAPTER 4

When writing an applet or an application that uses remote objects, the programmer needs to be aware of the RMI system's client visible interfaces that are available in the java.rmi package.

Topics:

  • The Remote Interface
  • The RemoteException Class
  • The Naming Class

CONTENTS | PREV | NEXT
Copyright 1997,2006, Oracle and/or its affiliates. All rights reserved.


4 - Client Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

4.2 The RemoteException Class

See the RemoteException API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.9 The RMIFailureHandler Interface

The java.rmi.server.RMIFailureHandler interface provides a method for specifying how the RMI runtime should respond when server socket creation fails (except during object export).
package java.rmi.server;

public interface RMIFailureHandler {

        public boolean failure(Exception ex);
}
The failure method is invoked with the exception that prevented the RMI runtime from creating a java.net.ServerSocket. The method returns true if the runtime should attempt to retry and false otherwise.

Before this method can be invoked, a failure handler needs to be registered via the RMISocketFactory.setFailureHandler call. If the failure handler is not set, the RMI runtime attempts to re-create the ServerSocket after waiting for a short period of time.

Note that the RMIFailureHandler is not called when ServerSocket creation fails upon initial export of the object. The RMIFailureHandler will be called when there is an attempt to create a ServerSocket after a failed accept on that ServerSocket.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.3 The UnicastRemoteObject Class

The class java.rmi.server.UnicastRemoteObject provides support for creating and exporting remote objects. The class implements a remote server object with the following characteristics:
  • References to such objects are valid only for, at most, the life of the process that creates the remote object.
  • Communication with the remote object uses a TCP transport.
  • Invocations, parameters, and results use a stream protocol for communicating between client and server.
package java.rmi.server;

public class UnicastRemoteObject extends RemoteServer {

        protected UnicastRemoteObject()
                throws java.rmi.RemoteException {...}
        protected UnicastRemoteObject(int port)
                throws java.rmi.RemoteException {...}
        protected UnicastRemoteObject(int port,
                                      RMIClientSocketFactory csf,
                                      RMIServerSocketFactory ssf)
                throws java.rmi.RemoteException {...}

        public Object clone()
                throws java.lang.CloneNotSupportedException {...}
        public static RemoteStub exportObject(java.rmi.Remote obj)
                throws java.rmi.RemoteException {...}
        public static Remote exportObject(java.rmi.Remote obj, int port)
                throws java.rmi.RemoteException {...}
        public static Remote exportObject(Remote obj, int port,
                                          RMIClientSocketFactory csf,
                                          RMIServerSocketFactory ssf)
                throws java.rmi.RemoteException {...}
        public static boolean unexportObject(java.rmi.Remote obj,
                                             boolean force)
                throws java.rmi.NoSuchObjectException {...}
}

5.3.1 Constructing a New Remote Object

A remote object implementation (one that implements one or more remote interfaces) must be created and exported. Exporting a remote object makes that object available to accept incoming calls from clients. For a remote object implementation that is exported as a UnicastRemoteObject, the exporting involves listening on a TCP port (note that more than one remote object can accept incoming calls on the same port, so listening on a new port is not always necessary). A remote object implementation can extend the class UnicastRemoteObject to make use of its constructors that export the object, or it can extend some other class (or none at all) and export the object via UnicastRemoteObject's exportObject methods.

The constructor that takes no arguments creates and exports a remote object on an anonymous (or arbitrary) port, chosen at runtime. The second form of the constructor takes a single argument, port, that specifies the port number on which the remote object accepts incoming calls. The third constructor creates and exports a remote object that accepts incoming calls on the specified port via a ServerSocket created from the RMIServerSocketFactory; clients will make connections to the remote object via Sockets supplied from the RMIClientSocketFactory.

Note that if you export a remote object without specifying a socket factory, or if you export the object with a version of the method UnicastRemoteObject.exportObject or the constructor UnicastRemoteObject that does not contain parameters of type RMIClientSocketFactory and RMIServerSocketFactory), then the remote object is exported to all local addresses. To export a remote object to a specific address, see the section RMI Socket Factories.

5.3.2 Exporting an Implementation Not Extended From RemoteObject

An exportObject method (any of the forms) is used to export a simple peer-to-peer remote object that is not implemented by extending the UnicastRemoteObject class. The first form of the exportObject method takes a single parameter, obj, which is the remote object that will accept incoming RMI calls; this exportObject method exports the object on an anonymous (or arbitrary) port, chosen at runtime. The second exportObject method takes two parameters, both the remote object, obj, and port, the port number on which the remote object accepts incoming calls. The third exportObject method exports the object, obj, with the specified RMIClientSocketFactory, csf, and RMIServerSocketFactory, ssf, on the specified port.

The exportObject method returns a Remote stub which is the stub object for the remote object, obj, that is passed in place of the remote object in an RMI call.

5.3.3 Passing a UnicastRemoteObject in an RMI Call

As stated above, when an exported object of type UnicastRemoteObject is passed as a parameter or return value in an RMI call, the object is replaced by the remote object's stub. An exported remote object implementation remains in the virtual machine in which it was created and does not move (even by value) from that virtual machine. In other words, an exported remote object is passed by reference in an RMI call; exported remote object implementations cannot be passed by value.

5.3.4 Serializing a UnicastRemoteObject

Information contained in UnicastRemoteObject is transient and is not saved if an object of that type is written to a user-defined ObjectOutputStream (for example, if the object is written to a file using serialization). An object that is an instance of a user-defined subclass of UnicastRemoteObject, however, may have non-transient data that can be saved when the object is serialized.

When a UnicastRemoteObject is read from an ObjectInputStream using UnicastRemoteObject's readObject method, the remote object is automatically exported to the RMI runtime so that it may receive RMI calls. If exporting the object fails for some reason, deserializing the object will terminate with an exception.

5.3.5 Unexporting a UnicastRemoteObject

The unexportObject method makes the remote object, obj, unavailable for incoming calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in-progress calls to the object. If the object is successfully unexported, the RMI runtime removes the object from its internal tables. Unexporting the object in this forcible manner may leave clients holding stale remote references to the remote object. This method throws java.rmi.NoSuchObjectException if the object was not previously exported to the RMI runtime.

5.3.6 The clone method

Objects are only cloneable using the Java programming language's default mechanism if they support the java.lang.Cloneable interface. The class java.rmi.server.UnicastRemoteObject does not implement this interface, but does implement the clone method so that if subclasses need to implement Cloneable, the remote object will be capable of being cloned properly. The clone method can be used by a subclass to create a cloned remote object with initially the same contents, but is exported to accept remote calls and is distinct from the original object.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.4 The Unreferenced Interface

package java.rmi.server;

public interface Unreferenced {
        public void unreferenced();
}
The java.rmi.server.Unreferenced interface allows a server object to receive notification that there are no clients holding remote references to it. The distributed garbage collection mechanism maintains for each remote object, the set of client virtual machines that hold references to that remote object. As long as some client holds a remote reference to the remote object, the RMI runtime keeps a local reference to the remote object. Each time the remote object's "reference" set becomes empty (meaning that the number of clients that reference the object becomes zero), the Unreferenced.unreferenced method is invoked (if that remote object implements the Unreferenced interface). A remote object is not required to support the Unreferenced interface.

As long as some local reference to the remote object exists, it may be passed in remote calls or returned to clients. The process that receives the reference is added to the reference set for the remote object. When the reference set becomes empty, the remote object's unreferenced method will be invoked. As such, the unreferenced method can be called more than once (each time the set is newly emptied). Remote objects are only collected when no more references, either local references or those held by clients, still exist.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.10 The LogStream Class

See the LogStream API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.5 The RMISecurityManager Class

See the RMISecurityManager API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.1 The RemoteObject Class

See the RemoteObject API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.6 The RMIClassLoader Class

See the RMIClassLoader API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

Server Interfaces

CHAPTER 5 The java.rmi.server package contains interfaces and classes typically used to implement remote objects.

Topics:

  • The RemoteObject Class
  • The RemoteServer Class
  • The UnicastRemoteObject Class
  • The Unreferenced Interface
  • The RMISecurityManager Class
  • The RMIClassLoader Class
  • The LoaderHandler Interface
  • RMI Socket Factories
  • The RMIFailureHandler Interface
  • The LogStream Class
  • Stub and Skeleton Compiler

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.7 The LoaderHandler Interface

See the LoaderHandler API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.2 The RemoteServer Class

See the RemoteServer API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.8 RMI Socket Factories

When the RMI runtime implementation needs instances of java.net.Socket and java.net.ServerSocket for its connections, instead of instantiating objects of those classes directly, it calls the createSocket and createServerSocket methods on the current RMISocketFactory object, returned by the static method RMISocketFactory.getSocketFactory. This allows the application to have a hook to customize the type of sockets used by the RMI transport, such as alternate subclasses of the java.net.Socket and java.net.ServerSocket classes. The instance of RMISocketFactory to be used can be set once by trusted system code. In JDK1.1, this customization was limited to relatively global decisions about socket type, because the only parameters supplied to the factory's methods were host and port (for createSocket) and just port (for createServerSocket).

In the Java SE platform, the new interfaces RMIServerSocketFactory and RMIClientSocketFactory have been introduced to provide more flexible customization of what protocols are used to communicate with remote objects.

To allow applications using RMI to take advantage of these new socket factory interfaces, several new constructors and exportObject methods, that take the client and server socket factory as additional parameters, have been added to both UnicastRemoteObject and java.rmi.activation.Activatable.

Remote objects exported with either of the new constructors or exportObject methods (with RMIClientSocketFactory and RMIServerSocketFactory parameters) will be treated differently by the RMI runtime. For the lifetime of such a remote object, the runtime will use the custom RMIServerSocketFactory to create a ServerSocket to accept incoming calls to the remote object and use the custom RMIClientSocketFactory to create a Socket to connect clients to the remote object.

The implementation of RemoteRef and ServerRef used in the stubs and skeletons for remote objects exported with custom socket factories is UnicastRef2 and UnicastServerRef2, respectively. The wire representation of the UnicastRef2 type contains a different representation of the "endpoint" to contact than the UnicastRef type has (which used just a host name string in UTF format, following by an integer port number). For UnicastRef2, the endpoint's wire representation consists of a format byte specifying the contents of the rest of the endpoint's representation (to allow for future expansion of the endpoint representation) followed by data in the indicated format. Currently, the data may consist of a host name in UTF format, a port number, and optionally (as specified by the endpoint format byte) the serialized representation of an RMIClientSocketFactory object that is used by clients to generate socket connections to remote object at this endpoint. The endpoint representation does not contain the RMIServerSocketFactory object that was specified when the remote object was exported.

When calls are made through references of the UnicastRef2 type, the runtime uses the createSocket method of the RMIClientSocketFactory object in the endpoint when creating sockets for connections to the referent remote object. Also, when the runtime makes DGC "dirty" and "clean" calls for a particular remote object, it must call the DGC on the remote JVM using a connection generated from the same RMIClientSocketFactory object as specified in the remote reference, and the DGC implementation on the server side should verify that this was done correctly.

Remote objects exported with the older constructor or method on UnicastRemoteObject that do not take custom socket factories as arguments will have RemoteRef and ServerRef of type UnicastRef and UnicastServerRef as before and use the old wire representation for their endpoints, i.e. a host string in UTF format followed by an integer specifying the port number. This is so that RMI servers that do not use new 1.2 features will interoperate with older RMI clients.

If you export a remote object without specifying a socket factory, or if you export the object with a version of the method UnicastRemoteObject.exportObject or the constructor UnicastRemoteObject that does not contain parameters of type RMIClientSocketFactory and RMIServerSocketFactory, then the Java runtime uses the system's default RMI socket factory, which opens a socket on a wildcard address, which listens on all interfaces. Consequently, the remote object is exported to all local addresses. To export a remote object to a specific address, do one of the following:

  • Specify a socket factory with the method RMISocketFactory.setSocketFactory.
  • Implement the interfaces RMIClientSocketFactory and RMIServerSocketFactory, and then invoke the method UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf). Alternatively, subclass the class UnicastRemoteObject and invoke the constructor UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf). This approach is more flexible than invoking the method RMISocketFactory.setSocketFactory because it enables you to export different objects bound to different interfaces. However, this approach is more complicated. The RMIClientSocketFactory implementation must be serializable because instances are transmitted to clients by being embedded in the stub. The RMIClientSocketFactory implementation classes must be made accessible to the client, typically by configuring the client's RMI codebase to point to where the classes are available.
  • Instead of using one of the socket factories, set up a security policy that accepts incoming connections from only specific Internet addresses or domains. This option is flexible because it allows you to restrict access to specific networks, domains, or specific hosts (including only localhost). Note that with this approach, the Java runtime uses the system's default RMI socket factory that opens a socket that listens on all interfaces. The socket still accepts connections from disallowed hosts, domains, and networks, but it immediately closes these connections without processing any RMI requests.

5.8.1 The RMISocketFactory Class

The java.rmi.server.RMISocketFactory abstract class provides an interface for specifying how the transport should obtain sockets. Note that the class below uses Socket and ServerSocket from the java.net package.
package java.rmi.server;

public abstract class RMISocketFactory
        implements RMIClientSocketFactory, RMIServerSocketFactory
{

        public abstract Socket createSocket(String host, int port)
                throws IOException;
   public abstract ServerSocket createServerSocket(int port)
                throws IOException;
        public static void setSocketFactory(RMISocketFactory fac)
                throws IOException {...}
        public static RMISocketFactory getSocketFactory() {...}
        public static void setFailureHandler(RMIFailureHandler fh) {...}
        public static RMIFailureHandler getFailureHandler() {...}
}
The static method setSocketFactory is used to set the socket factory from which RMI obtains sockets. The application may invoke this method with its own RMISocketFactory instance only once. An application-defined implementation of RMISocketFactory could, for example, do preliminary filtering on the requested connection and throw exceptions, or return its own extension of the java.net.Socket or java.net.ServerSocket classes, such as ones that provide a secure communication channel. Note that the RMISocketFactory may only be set if the current security manager allows setting a socket factory; if setting the socket factory is disallowed, a SecurityException will be thrown.

The static method getSocketFactory returns the socket factory used by RMI. The method returns null if the socket factory is not set.

The transport layer invokes the createSocket and createServerSocket methods on the RMISocketFactory returned by the getSocketFactory method when the transport needs to create sockets. For example:

    RMISocketFactory.getSocketFactory().createSocket(myhost, myport)
The method createSocket should create a client socket connected to the specified host and port. The method createServerSocket should create a server socket on the specified port.

The default transport's implementation of RMISocketFactory provides for transparent RMI through firewalls using HTTP as follows:

  • On createSocket, the factory automatically attempts HTTP connections to hosts that cannot be contacted with a direct socket.
  • On createServerSocket, the factory returns a server socket that automatically detects if a newly accepted connection is an HTTP POST request. If so, it returns a socket that will transparently expose only the body of the request to the transport and format its output as an HTTP response.
The method setFailureHandler sets the failure handler to be called by the RMI runtime if the creation of a server socket fails. The failure handler returns a boolean to indicate if retry should occur. The default failure handler returns false, meaning that by default recreation of sockets is not attempted by the runtime.

The method getFailureHandler returns the current handler for socket creation failure, or null if the failure handler is not set.

5.8.2 The RMIServerSocketFactory Interface

See the RMIServerSocketFactory API documentation.

5.8.3 The RMIClientSocketFactory Interface

See the RMIClientSocketFactory API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Server Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

5.11 Stub and Skeleton Compiler

The rmic stub and skeleton compiler is used to compile the appropriate stubs and skeletons for a specific remote object implementation.

Please see the following URLs for further information on rmic:

  • For the SolarisTM Operating System:
    http://java.sun.com/products/jdk/1.6.0/docs/tooldocs/solaris/rmic.html
  • For the Windows platform:
    http://java.sun.com/products/jdk/1.6.0/docs/tooldocs/windows/rmic.html

CONTENTS | PREV | NEXT
Copyright (c) 1997,2006, Oracle and/or its affiliates. All rights reserved.


6 - Registry Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

6.1 The Registry Interface

See the Registry API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


6 - Registry Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

6.3 The RegistryHandler Interface

See the RegistryHandler API documentation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


6 - Registry Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

Registry Interfaces

CHAPTER 6 The RMI system uses the java.rmi.registry.Registry interface and the java.rmi.registry.LocateRegistry class to provide a well-known bootstrap service for retrieving and registering objects by simple names.

A registry is a remote object that maps names to remote objects. Any server process can support its own registry or a single registry can be used for a host.

The methods of LocateRegistry are used to get a registry operating on a particular host or host and port. The methods of the java.rmi.Naming class makes calls to a remote object that implements the Registry interface using the appropriate LocateRegistry.getRegistry method.

Topics:

  • The Registry Interface
  • The LocateRegistry Class
  • The RegistryHandler Interface

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


6 - Registry Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

6.2 The LocateRegistry Class

The class java.rmi.registry.LocateRegistry is used to obtain a reference (construct a stub) to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

The registry implements a simple flat naming syntax that associates the name of a remote object (a string) with a remote object reference. The name and remote object bindings are not remembered across server restarts.

Note that a getRegistry call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore, a subsequent method invocation to a remote registry returned as a result of this method may fail.

package java.rmi.registry;

public final class LocateRegistry {

        public static Registry getRegistry()
                throws java.rmi.RemoteException {...}
        public static Registry getRegistry(int port)
                throws java.rmi.RemoteException {...}
        public static Registry getRegistry(String host)
                throws java.rmi.RemoteException {...}
        public static Registry getRegistry(String host, int port)
                throws java.rmi.RemoteException {...}
        public static Registry getRegistry(String host, int port,
                                           RMIClientSocketFactory csf)
                throws RemoteException {...}
        public static Registry createRegistry(int port)
                throws java.rmi.RemoteException {...}
        public static Registry createRegistry(int port,
                                              RMIClientSocketFactory csf,
                                              RMIServerSocketFactory ssf)
                throws RemoteException {...}
}
The first four getRegistry methods return a reference to a registry on the current host, current host at a specified port, a specified host, or at a particular port on a specified host. What is returned is the remote stub for the registry with the specified host and port information.

The fifth getRegistry method (that takes an RMIClientSocketFactory as one of its arguments), returns a locally created remote stub to the remote object Registry on the specified host and port. Communication with the remote registry whose stub is constructed with this method will use the supplied RMIClientSocketFactory, csf, to create Socket connections to the registry on the remote host and port.

Note - A registry returned from the getRegistry method is a specially constructed stub that contains a well-known object identifier. Passing a registry stub from one JVM to another is not supported (it may or may not work depending on the implementation). Use the LocateRegistry.getRegistry methods to obtain the appropriate registry for a host.
The createRegistry method creates and exports a registry on the local host on the specified port.

The second createRegistry method allows more flexibility in communicating with the registry. This call creates and exports a Registry on the local host that uses custom socket factories for communication with that registry. The registry that is created listens for incoming requests on the given port using a ServerSocket created from the supplied RMIServerSocketFactory. A client that receives a reference to this registry will use a Socket created from the supplied RMIClientSocketFactory.

Note - Starting a registry with the createRegistry method does not keep the server process alive.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.3 Implementation Model for an "Activatable" Remote Object

In order to make a remote object that can be accessed via an activation identifier over time, a developer needs to:
  • register an activation descriptor for the remote object, and
  • include a special constructor in the object's class that the RMI system calls when it activates the activatable object.
An activation descriptor (ActivationDesc) can be registered in one of several ways:
  • via a call to the static register method of the class Activatable, or
  • by creating an "activatable" object via the first or second constructor of the Activatable class, or
  • by exporting an "activatable" object explicitly via Activatable's first or second exportObject method.
For a specific object, only one of the above methods should be used to register the object for activation. See the section below on "Constructing an Activatable Remote Object" for examples on how to implement activatable objects.

7.3.1 The ActivationDesc Class

An ActivationDesc contains the information necessary to activate an object. It contains the object's activation group identifier, the class name for the object, a codebase path (or URLs) from which the object's code can be loaded, and a MarshalledObject that may contain object-specific initialization data used during each activation.

A descriptor registered with the activation system is consulted (during the activation process) to obtain information in order to re-create or activate an object. The MarshalledObject in the object's descriptor is passed as the second argument to the remote object's constructor for the object to use during activation.

package java.rmi.activation;
public final class ActivationDesc implements java.io.Serializable
{

        public ActivationDesc(String className,
                              String codebase,
                              java.rmi.MarshalledObject data)
                throws ActivationException;

        public ActivationDesc(String className,
                              String codebase,
                              java.rmi.MarshalledObject data,
                              boolean restart)
                throws ActivationException;

        public ActivationDesc(ActivationGroupID groupID,
                              String className,
                              String codebase,
                              java.rmi.MarshalledObject data,
                              boolean restart);

        public ActivationDesc(ActivationGroupID groupID,
                              String className,
                              String codebase,
                              java.rmi.MarshalledObject data);

        public ActivationGroupID getGroupID();

        public String getClassName();

        public String getLocation();

        public java.rmi.MarshalledObject getData()

        public boolean getRestartMode();
}
The first constructor for ActivationDesc constructs an object descriptor for an object whose class is className, that can be loaded from codebase path, and whose initialization information, in marshalled form, is data. If this form of the constructor is used, the object's group identifier defaults to the current identifier for ActivationGroup for this JVM. All objects with the same ActivationGroupID are activated in the same JVM. If the current group is inactive an ActivationException is thrown. If the groupID is null, an IllegalArgumentException is thrown.

The second constructor for ActivationDesc constructs an object descriptor in the same manner as the first constructor except an additional parameter, restart, must be supplied. If the object requires restart service, meaning that the object will be restarted automatically when the activator is restarted (as opposed to being activated lazily upon demand), restart should be true. If restart is false, the object is simply activated upon demand (via a remote method call).

The third constructor for ActivationDesc constructs an object descriptor for an object whose group identifier is groupID, whose class name is className that can be loaded from the codebase path, and whose initialization information is data. All objects with the same groupID are activated in the same JVM.

The fourth constructor for ActivationDesc constructs an object descriptor in the same manner as the third constructor, but allows a restart mode to be specified. If an object requires restart service (as defined above), restart should be true.

The getGroupID method returns the group identifier for the object specified by the descriptor. A group provides a way to aggregate objects into a single Java virtual machine.

The getClassName method returns the class name for the object specified by the activation descriptor.

The getLocation method returns the codebase path from where the object's class can be downloaded.

The getData method returns a "marshalled object" containing initialization (activation) data for the object specified by the descriptor.

The getRestartMode method returns true if the restart mode is enabled for this object, otherwise it returns false.

7.3.2 The ActivationID Class

The activation protocol makes use of activation identifiers to denote remote objects that can be activated over time. An activation identifier (an instance of the class ActivationID) contains several pieces of information needed for activating an object:
  • a remote reference to the object's activator, and
  • a unique identifier for the object.
An activation identifier for an object can be obtained by registering an object with the activation system. Registration is accomplished in a few ways (also noted above):
  • via the Activatable.register method, or
  • via the first or second Activatable constructor, which both registers and exports the object, or
  • via the first or second Activatable.exportObject method, this method both registers and exports the object.
package java.rmi.activation;
public class ActivationID implements java.io.Serializable
{
        public ActivationID(Activator activator);

        public Remote activate(boolean force)
                throws ActivationException, UnknownObjectException,
                       java.rmi.RemoteException;

        public boolean equals(Object obj);

        public int hashCode();
}
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this activation identifier. An instance of ActivationID is globally unique.

The activate method activates the object associated with the activation identifier. If the force parameter is true, the activator considers any cached reference for the remote object as stale, thus forcing the activator to contact the group when activating the object. If force is false, then returning the cached value is acceptable. If activation fails, ActivationException is thrown. If the object identifier is not known to the activator, then the method throws UnknownObjectException. If the remote call to the activator fails, then RemoteException is thrown.

The equals method implements content equality. It returns true if all fields are equivalent (either identical or equivalent according to each field's Object.equals semantics). If p1 and p2 are instances of the class ActivationID, the hashCode method will return the same value if p1.equals(p2) returns true.

7.3.3 The Activatable Class

The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system. The class Activatable is the main API that developers need to use to implement and manage activatable objects. Note that you must first run the activation system daemon, rmid, before objects can be registered and/or activated.

package java.rmi.activation;
public abstract class Activatable
        extends java.rmi.server.RemoteServer
{
        protected Activatable(String codebase,
                              java.rmi.MarshalledObject data,
                              boolean restart,
                              int port)
                throws ActivationException, java.rmi.RemoteException;

        protected Activatable(String codebase,
                              java.rmi.MarshalledObject data,
                              boolean restart, int port,
                              RMIClientSocketFactory csf,
                              RMIServerSocketFactory ssf)
                throws ActivationException, java.rmi.RemoteException;

        protected Activatable(ActivationID id, int port)
                throws java.rmi.RemoteException;

        protected Activatable(ActivationID id, int port,
                              RMIClientSocketFactory csf,
                              RMIServerSocketFactory ssf)
                throws java.rmi.RemoteException;

        protected ActivationID getID();

        public static Remote register(ActivationDesc desc)
                throws UnknownGroupException, ActivationException,
                       java.rmi.RemoteException;

        public static boolean inactive(ActivationID id)
                throws UnknownObjectException, ActivationException,
                       java.rmi.RemoteException;

        public static void unregister(ActivationID id)
                throws UnknownObjectException, ActivationException,
                       java.rmi.RemoteException;

        public static ActivationID exportObject(Remote obj,
                                                String codebase,
                                                MarshalledObject data,
                                                boolean restart,
                                                int port)
                throws ActivationException, java.rmi.RemoteException;

        public static ActivationID exportObject(Remote obj,
                                                String codebase,
                                                MarshalledObject data,
                                                boolean restart,
                                                int port,
                                                RMIClientSocketFactory csf,
                                                RMIServerSocketFactory ssf)
                throws ActivationException, java.rmi.RemoteException;

        public static Remote exportObject(Remote obj,
                                          ActivationID id,
                                          int port)
                throws java.rmi.RemoteException;

        public static Remote exportObject(Remote obj,
                                          ActivationID id,
                                          int port,
                                          RMIClientSocketFactory csf,
                                          RMIServerSocketFactory ssf)
                throws java.rmi.RemoteException;

        public static boolean unexportObject(Remote obj, boolean force)
                throws java.rmi.NoSuchObjectException;
}
An implementation for an activatable remote object may or may not extend the class Activatable. A remote object implementation that does extend the Activatable class inherits the appropriate definitions of the hashCode and equals methods from the superclass java.rmi.server.RemoteObject. So, two remote object references that refer to the same Activatable remote object will be equivalent (the equals method will return true). Also, an instance of the class Activatable will be "equals" to the appropriate stub object for the instance (i.e., the Object.equals method will return true if called with the matching stub object for the implementation as an argument, and vice versa).

Activatable Class Methods

The first constructor for the Activatable class is used to register and export the object on a specified port (an anonymous port is chosen if port is zero). The object's URL path for downloading its class code is codebase, and its initialization data is data. If restart is true, the object will be restarted automatically when the activator is restarted and if the group crashes. If restart is false, the object will be activated on demand (via a remote method call to the object).

A concrete subclass of the Activatable class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port, if port is zero) to the RMI runtime so that it is available to accept incoming calls from clients.

The constructor throws ActivationException if registering the object with the activation system fails. RemoteException is thrown if exporting the object to the RMI runtime fails.

The second constructor is the same as the first Activatable constructor but allows the specification of the client and server socket factories used to communicate with this activatable object. See the section in about "RMI Socket Factories" for details.

The third constructor is used to activate and export the object (with the ActivationID, id) on a specified port. A concrete subclass of the Activatable class must call this constructor when the object itself is activated via its special "activation" constructor whose parameters must be:

  • the object's activation identifier (ActivationID), and
  • the object's initialization/bootstrap data (a MarshalledObject).
As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients. The constructor throws RemoteException if exporting the object to the RMI runtime fails.

The fourth constructor is the same as the third constructor, but allows the specification of the client and server socket factories used to communicate with this activatable object.

The getID method returns the object's activation identifier. The method is protected so that only subclasses can obtain an object's identifier. The object's identifier is used to report the object as inactive or to unregister the object's activation descriptor.

The register method registers, with the activation system, an object descriptor, desc, for an activatable remote object so that it can be activated on demand. This method is used to register an activatable object without having to first create the object. This method returns the Remote stub for the activatable object so that it can be saved and called at a later time thus forcing the object to be created/activated for the first time. The method throws UnknownGroupException if the group identifier in desc is not registered with the activation system. ActivationException is thrown if the activation system is not running. Finally, RemoteException is thrown if the remote call to the activation system fails.

The inactive method is used to inform the system that the object with the corresponding activation id is currently inactive. If the object is currently known to be active, the object is unexported from the RMI runtime (only if there are no pending or executing calls) so the that it can no longer receive incoming calls. This call also informs this JVM's ActivationGroup that the object is inactive; the group, in turn, informs its ActivationMonitor. If the call completes successfully, subsequent activate requests to the activator will cause the object to reactivate. The inactive method returns true if the object was successfully unexported (meaning that it had no pending or executing calls at the time) and returns false if the object could not be unexported due to pending or in-progress calls. The method throws UnknownObjectException if the object is not known (it may already be inactive); an ActivationException is thrown if the group is not active; a RemoteException is thrown if the call informing the monitor fails. The operation may still succeed if the object is considered active but has already unexported itself.

The unregister method revokes previous registration for the activation descriptor associated with id. An object can no longer be activated via that id. If the object id is unknown to the activation system, an UnknownObjectException is thrown. If the activation system is not running, an ActivationException is thrown. If the remote call to the activation system fails, then a RemoteException is thrown.

The first exportObject method may be invoked explicitly by an "activatable" object that does not extend the Activatable class, in order to both

  • register the object's activation descriptor, desc, constructed from the supplied codebase and data, with the activation system so the object can be activated, and
  • export the remote object, obj, on a specific port. If the port is zero, then an anonymous port is chosen.
Once the object is exported, it can receive incoming RMI calls.

This exportObject method returns the activation identifier obtained from registering the descriptor, desc, with the activation system. If the activation group is not active in the JVM, then ActivationException is thrown. If the object registration or export fails, then RemoteException is thrown.

This method does not need to be called if obj extends Activatable, since the first Activatable constructor calls this method.

The second exportObject method is the same as the first except it allows the specification of client and server socket factories used to communicate with the activatable object.

The third exportObject method exports an "activatable" remote object (not necessarily of type Activatable) with the identifier, id, to the RMI runtime to make the object, obj, available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the third constructor above (which a subclass should invoke from its special activation constructor).

This exportObject method returns the Remote stub for the activatable object. If the object export fails, then the method throws RemoteException.

The fourth exportObject method is the same as the third but allows the specification of the client and server socket factories used to communicate with this activatable object.

The unexportObject method makes the remote object, obj, unavailable for incoming calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object. If the object is successfully unexported, the RMI runtime removes the object from its internal tables. Removing the object from RMI use in this forcible manner may leave clients holding stale remote references to the remote object. This method throws java.rmi.NoSuchObjectException if the object was not previously exported to the RMI runtime.

Constructing an Activatable Remote Object

In order for an object to be activated, the "activatable" object implementation class (whether or not it extends the Activatable class) must define a special public constructor that takes two arguments, its activation identifier of type ActivationID, and its activation data, a java.rmi.MarshalledObject, supplied in the activation descriptor used during registration. When an activation group activates a remote object inside its JVM, it constructs the object via this special constructor (described in more detail below). The remote object implementation may use the activation data to initialize itself in a suitable manner. The remote object may also wish to retain its activation identifier, so that it can inform the activation group when it becomes inactive (via a call to the Activatable.inactive method).

The first and second constructor forms for Activatable are used to both register and export an activatable object on a specified port. This constructor should be used when initially constructing the object; the third form of the constructor is used when re-activating the object.

A concrete subclass of Activatable must call the first or second constructor form to register and export the object during initial construction. This constructor first creates an activation descriptor (ActivationDesc) with the object's class name, the object's supplied codebase and data, and whose activation group is the default group for the JVM. Next, the constructor registers this descriptor with the default ActivationSystem. Finally, the constructor exports the activatable object to the RMI runtime on the specific port (if port is zero, then an anonymous port is chosen) and reports the object as an activeObject to the local ActivationGroup. If an error occurs during registration or export, the constructor throws RemoteException. Note that the constructor also initializes its ActivationID (obtained via registration), so that subsequent calls to the protected method getID will return the object's activation identifier.

The third constructor form for Activatable is used to export the object on a specified port. A concrete subclass of Activatable must call the third constructor form when it is activated via the object's own "activation" constructor, which takes two arguments:

  • the object's ActivationID
  • the object's initialization data, a MarshalledObject
This constructor only exports the activatable object to the RMI runtime on the specific port (if port is 0, then an anonymous port is chosen). It does not inform the ActivationGroup that the object is active, since it is the ActivationGroup that is activating the object and knows it to be active already.

The following is an example of a remote object interface, Server, and an implementation, ServerImpl, that extends the Activatable class:

package examples;

public interface Server extends java.rmi.Remote {
        public void doImportantStuff()
                throws java.rmi.RemoteException;
}

public class ServerImpl extends Activatable implements Server
{
        // Constructor for initial construction, registration and export
        public ServerImpl(String codebase, MarshalledObject data)
                throws ActivationException, java.rmi.RemoteException
        {
                // register object with activation system, then
                // export on anonymous port
                super(codebase, data, false, 0);
        }

        // Constructor for activation and export; this constructor
        // is called by the ActivationInstantiator.newInstance
        // method during activation in order to construct the object.
        public ServerImpl(ActivationID id, MarshalledObject data)
                throws java.rmi.RemoteException
        {
                // call the superclass's constructor in order to
                // export the object to the RMI runtime.
                super(id, 0);
                // initialize object (using data, for example)
        }

        public void doImportantStuff() { ... }
}
An object is responsible for exporting itself. The constructors for Activatable take care of exporting the object to the RMI runtime with the live reference type of a UnicastRemoteObject, so the object implementation extending Activatable does not need to worry about the detail of exporting the object explicitly (other than invoking the appropriate superclasses constructor). If an object implementation does not extend the class Activatable, the object must export the object explicitly via a call to one of the Activatable.exportObject static methods.

In the following example, ServerImpl does not extend Activatable, but rather another class, so ServerImpl is responsible for exporting itself during initial construction and activation. The following class definition shows ServerImpl's initialization constructor and its special "activation" constructor and the appropriate call to export the object within each constructor:

package examples;
public class ServerImpl extends SomeClass implements Server
{
        // constructor for initial creation
        public ServerImpl(String codebase, MarshalledObject data)
                throws ActivationException, java.rmi.RemoteException
        {
                // register and export the object
                Activatable.exportObject(this, codebase, data, false, 0);
        }

        // constructor for activation
        public ServerImpl(ActivationID id, MarshalledObject data)
                throws java.rmi.RemoteException
        {
                // export the object
                Activatable.exportObject(this, id, 0);
        }

        public void doImportantStuff() { ... }
}

Registering an Activation Descriptor Without Creating the Object

To register an activatable remote object with the activation system without first creating the object, the programmer can simply register an activation descriptor (an instance of the class ActivationDesc) for the object. An activation descriptor contains all the necessary information so that the activation system can activate the object when needed. An activation descriptor for an instance of the class examples.ServerImpl can be registered in the following manner (exception handling elided):

 Server
server;
ActivationDesc desc;
String codebase = "http://zaphod/codebase/";

MarshalledObject data = new
MarshalledObject("some data");
desc = new ActivationDesc( "examples.ServerImpl", codebase,
data);
server = (Server)Activatable.register(desc);

The register call returns a Remote stub that is the stub for the examples.ServerImpl object and implements the same set of remote interfaces that examples.ServerImpl implements (i.e, the stub implements the remote interface Server). This stub object (above, cast and assigned to server) can be passed as a parameter in any method call expecting an object that implements the examples.Server remote interface.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

Remote Object Activation

CHAPTER 7

Topics:

  • Overview
  • Activation Protocol
  • Implementation Model for an "Activatable" Remote Object
  • Activation Interfaces

CONTENTS | PREV | NEXT

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.1 Overview

Distributed object systems are designed to support long-lived persistent objects. Given that these systems will be made up of many thousands (perhaps millions) of such objects, it would be unreasonable for object implementations to become active and remain active, taking up valuable system resources, for indefinite periods of time. In addition, clients need the ability to store persistent references to objects so that communication among objects can be re-established after a system crash, since typically a reference to a distributed object is valid only while the object is active.

Object activation is a mechanism for providing persistent references to objects and managing the execution of object implementations. In RMI, activation allows objects to begin execution on an as-needed basis. When an activatable remote object is accessed (via a method invocation) if that remote object is not currently executing, the system initiates the object's execution inside an appropriate JVM.

7.1.1 Terminology

An active object is a remote object that is instantiated and exported in a JVM on some system. A passive object is one that is not yet instantiated (or exported) in a JVM, but which can be brought into an active state. Transforming a passive object into an active object is a process known as activation. Activation requires that an object be associated with a JVM, which may entail loading the class for that object into a JVM and the object restoring its persistent state (if any).

In the RMI system, we use lazy activation. Lazy activation defers activating an object until a client's first use (i.e., the first method invocation).

7.1.2 Lazy Activation

Lazy activation of remote objects is implemented using a faulting remote reference (sometimes referred to as a fault block). A faulting remote reference to a remote object "faults in" the active object's reference upon the first method invocation to the object. Each faulting reference maintains both a persistent handle (an activation identifier) and a transient remote reference to the target remote object. The remote object's activation identifier contains enough information to engage a third party in activating the object. The transient reference is the actual "live" reference to the active remote object that can be used to contact the executing object.

In a faulting reference, if the live reference to a remote object is null, the target object is not known to be active. Upon method invocation, the faulting reference (for that object) engages in the activation protocol to obtain a "live" reference, which is a remote reference (such as a unicast remote reference) for the newly-activated object. Once the faulting reference obtains the live reference, the faulting reference forwards method invocations to the underlying remote reference which, in turn, forwards the method invocation to the remote object.

In more concrete terms, a remote object's stub contains a "faulting" remote reference type that contains both:

  • an activation identifier for a remote object, and
  • a "live" reference (possibly null) containing the "active" remote reference type of the remote object (for example, a remote reference type with unicast semantics).
Note - The RMI system preserves "at most once" semantics for remote calls. In other words, a call to an activatable or unicast remote object is sent at most once. Thus, if a call to a remote object fails (indicated by a RemoteException being thrown), the client can be guaranteed that the remote method executed no more than once (and perhaps not at all).

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.4 Activation Interfaces

In the RMI activation protocol, there are two guarantees that the activator must make for the system to function properly:
  • like all system daemons, the activator should remain running while the machine is up, and
  • the activator must not reactivate remote objects that are already active.
The activator maintains a database of appropriate information for the groups and objects that it participates in activating.

7.4.1 The Activator Interface

The activator is one of the entities that participates during the activation process. As described earlier, a faulting reference (inside a stub) calls the activator's activate method to obtain a "live" reference to an activatable remote object. Upon receiving a request for activation, the activator looks up the activation descriptor for the activation identifier, id, determines the group in which the object should be activated, and invokes the newInstance method on the activation group's instantiator (the remote interface ActivationGroup is described below). The activator initiates the execution of activation groups as necessary. For example, if an activation group for a specific group descriptor is not already executing, the activator will spawn a child JVM for the activation group to establish the group in the new JVM.

The activator is responsible for monitoring and detecting when activation groups fail so that it can remove stale remote references from its internal tables.

package java.rmi.activation;
public interface Activator extends java.rmi.Remote
{
        java.rmi.MarshalledObject activate(ActivationID id,
                                           boolean force)
                throws UnknownObjectException, ActivationException,
                       java.rmi.RemoteException;
}
The activate method activates the object associated with the activation identifier, id. If the activator knows the object to be active already and the force parameter is false, the stub with a "live" reference is returned immediately to the caller; otherwise, if the activator does not know that the corresponding remote object is active or the force parameter is true, the activator uses the activation descriptor information (previously registered to obtain the id) to determine the group (JVM) in which the object should be activated. If an ActivationInstantiator corresponding to the object's group already exists, the activator invokes the activation instantiator's newInstance method, passing it the id and the object's activation descriptor.

If the activation instantiator (group) for the object's group descriptor does not yet exist, the activator starts a new incarnation of an ActivationInstantiator executing (by spawning a child process, for example). When the activator re-creates an ActivationInstantiator for a group, it must increment the group's incarnation number. Note that the incarnation number is zero-based. The activation system uses incarnation numbers to detect late ActivationSystem.activeGroup and ActivationMonitor.inactiveGroup calls. The activation system discards calls with an earlier incarnation number than the current number for the group.

Note - The activator must communicate both the activation group's identifier, descriptor, and incarnation number when it starts up a new activation group. The activator spawns an activation group in a separate JVM (as a separate or child process, for example), and therefore must pass information specifying the information necessary to create the group via the ActivationGroup.createGroup method. How the activator sends this information to the spawned process is unspecified, however, this information could be sent in the form of marshalled objects to the child process's standard input.
When the activator receives the activation group's call back (via the ActivationSystem.activeGroup method) specifying the activation group's reference and incarnation number, the activator can then invoke that activation instantiator's newInstance method to forward each pending activation request to the activation instantiator and return the result (a marshalled remote object reference, a stub) to each caller.

Note that the activator receives a MarshalledObject instead of a Remote object so that the activator does not need to load the code for that object, or participate in distributed garbage collection for that object. If the activator kept a strong reference to the remote object, the activator would then prevent the object from being garbage collected under the normal distributed garbage collection mechanism.

The activate method throws ActivationException if activation fails. Activation may fail for a variety of reasons: the class could not be found, the activation group could not be contacted, etc. The activate method throws UnknownObjectException if no activation descriptor for the activation identifier, id, has been previously registered with this activator. RemoteException is thrown if the remote call to the activator fails.

7.4.2 The ActivationSystem Interface

The ActivationSystem provides a means for registering groups and activatable objects to be activated within those groups. The ActivationSystem works closely with both the Activator, which activates objects registered via the ActivationSystem, and the ActivationMonitor, which obtains information about active and inactive objects and inactive groups.
package java.rmi.activation;
public interface ActivationSystem extends java.rmi.Remote
{
        public static final int SYSTEM_PORT = 1098;

        ActivationGroupID registerGroup(ActivationGroupDesc desc)
                throws ActivationException, java.rmi.RemoteException;

        ActivationMonitor activeGroup(ActivationGroupID id,
                                      ActivationInstantiator group,
                                      long incarnation)
                throws UnknownGroupException, ActivationException,
                       java.rmi.RemoteException;

        void unregisterGroup(ActivationGroupID id)
                throws ActivationException, UnknownGroupException,
                       java.rmi.RemoteException;

        ActivationID registerObject(ActivationDesc desc)
                throws ActivationException, UnknownGroupException,
                       java.rmi.RemoteException;

        void unregisterObject(ActivationID id)
                throws ActivationException, UnknownObjectException,
                       java.rmi.RemoteException;

        void shutdown() throws java.rmi.RemoteException;
}
Note - As a security measure, all of the above methods (registerGroup, activeGroup, unregisterGroup, registerObject, unregisterObject, and shutdown) will throw java.rmi.AccessException, a subclass of java.rmi.RemoteException, if called from a client that does not reside on the same host as the activation system.
The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for an activatable remote object. The ActivationSystem creates an ActivationID (an activation identifier) for the object specified by the descriptor, desc, and records, in stable storage, the activation descriptor and its associated identifier for later use. When the Activator receives an activate request for a specific identifier, it looks up the activation descriptor (registered previously) for the specified identifier and uses that information to activate the object. If the group referred to in desc is not registered with this system, then the method throws UnknownGroupException. If registration fails (e.g., database update failure, etc), then the method throws ActivationException. If the remote call fails, then RemoteException is thrown.

The unregisterObject method removes the activation identifier, id, and associated descriptor previously registered with the ActivationSystem. After the call completes, the object can no longer be activated via the object's activation id. If the object id is unknown (not registered) the method throws UnknownObjectException. If the unregister operation fails (e.g., database update failure, etc.), then the method throws ActivationException. If the remote call fails, then RemoteException is thrown.

The registerGroup method registers the activation group specified by the group descriptor, desc, with the activation system and returns the ActivationGroupID assigned to that group. An activation group must be registered with the ActivationSystem before objects can be registered within that group. If group registration fails, the method throws ActivationException. If the remote call fails, then RemoteException is thrown.

The activeGroup method is a call back from the ActivationGroup (with the identifier, id), to inform the activation system that group is now active and is the ActivationInstantiator for that JVM. This call is made internally by the ActivationGroup.createGroup method to obtain an ActivationMonitor that the group uses to update the system regarding objects' and the group's status (i.e., that the group or objects within that group have become inactive). If the group is not registered, then the method throws UnknownGroupException. If the group is already active, then ActivationException is thrown. If the remote call to the activation system fails, then RemoteException is thrown.

The unregisterGroup method removes the activation group with identifier, id, from the activation system. An activation group makes this call back to inform the activator that the group should be destroyed. If this call completes successfully, objects can no longer be registered or activated within the group. All information of the group and its associated objects is removed from the system. The method throws UnknownGroupException if the group is not registered. If the remote call fails, then RemoteException is thrown. If the unregister fails, ActivationException is thrown (e.g., database update failure, etc.).

The shutdown method gracefully terminates (asynchronously) the activation system and all related activation processes (activator, monitors and groups). All groups spawned by the activation daemon will be destroyed and the activation daemon will exit. In order to shut down the activation system daemon, rmid, execute the command:

                rmid -stop [-port num]
This command will shut down the activation daemon on the specified port (if no port is specified, the daemon on the default port will be shut down).

7.4.3 The ActivationMonitor Class

An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported via a call to ActivationSystem.activeGroup (this is done internally by the ActivationGroup.createGroup method). An activation group is responsible for informing its ActivationMonitor when:
a. its objects become active,

b. its objects become inactive, or

c. the group as a whole becomes inactive.

package java.rmi.activation;
public interface ActivationMonitor
        extends java.rmi.Remote
{

        public abstract void inactiveObject(ActivationID id)
                throws UnknownObjectException, RemoteException;

        public void activeObject(ActivationID id,
                                 java.rmi.MarshalledObject mobj)
                throws UnknownObjectException, java.rmi.RemoteException;

        public void inactiveGroup(ActivationGroupID id,
                                  long incarnation)
                throws UnknownGroupException, java.rmi.RemoteException;
}
An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates). An activation group discovers that an object (that it participated in activating) in its JVM is no longer active via a call to the activation group's inactiveObject method.

The inactiveObject call informs the ActivationMonitor that the remote object reference it holds for the object with the activation identifier, id, is no longer valid. The monitor considers the reference associated with id as a stale reference. Since the reference is considered stale, a subsequent activate call for the same activation identifier results in re-activating the remote object. If the object is not known to the ActivationMonitor, the method throws UnknownObjectException. If the remote call fails, then RemoteException is thrown.

The activeObject call informs the ActivationMonitor that the object associated with id is now active. The parameter obj is the marshalled representation of the object's stub. An ActivationGroup must inform its monitor if an object in its group becomes active by other means than being activated directly by the system (i.e., the object is registered and "activated" itself). If the object id is not previously registered, then the method throws UnknownObjectException. If the remote call fails, then RemoteException is thrown.

The inactiveGroup call informs the monitor that the group specified by id and incarnation is now inactive. The group will be re-created with a greater incarnation number upon a subsequent request to activate an object within the group. A group becomes inactive when all objects in the group report that they are inactive. If either the group id is not registered or the incarnation number is smaller than the current incarnation for the group, then the method throws UnknownGroupException. If the remote call fails, then RemoteException is thrown.

7.4.4 The ActivationInstantiator Class

The ActivationInstantiator is responsible for creating instances of activatable objects. A concrete subclass of ActivationGroup implements the newInstance method to handle creating objects within the group.

package java.rmi.activation;
public interface ActivationInstantiator
        extends java.rmi.Remote
{
        public MarshalledObject newInstance(ActivationID id,
                                            ActivationDesc desc)
                throws ActivationException, java.rmi.RemoteException;

}
The activator calls an instantiator's newInstance method in order to re-create in that group an object with the activation identifier, id, and descriptor, desc. The instantiator is responsible for:
  • determining the class for the object using the descriptor's getClassName method,
  • loading the class from the codebase path obtained from the descriptor (using the getLocation method),
  • creating an instance of the class by invoking the special "activation" constructor of the object's class that takes two arguments: the object's ActivationID, and the MarshalledObject containing object-specific initialization data, and
  • returning a MarshalledObject containing the remote object it created.
An instantiator is also responsible for reporting when objects it creates or activates are no longer active, so that it can make the appropriate inactiveObject call to its ActivationMonitor (see the ActivationGroup class for more details).

If object activation fails, then the newInstance method throws ActivationException. If the remote call fails, then the method throws RemoteException.

7.4.5 The ActivationGroupDesc Class

An activation group descriptor (ActivationGroupDesc) contains the information necessary to create or re-create an activation group in which to activate objects in the same JVM.

Such a descriptor contains:

  • the group's class name (a class name of null indicates the default ActivationGroup implementation),
  • the group's codebase path (the location of the group's class), and
  • a "marshalled" object that can contain object-specific initialization data.
The group's class must be a concrete subclass of ActivationGroup. A subclass of ActivationGroup is created or re-created via the ActivationGroup.createGroup static method, which invokes a special constructor that takes two arguments:
  • the group's ActivationGroupID, and
  • the group's initialization data (in a java.rmi.MarshalledObject)
package java.rmi.activation;
public final class ActivationGroupDesc
        implements java.io.Serializable
{

        public ActivationGroupDesc(java.util.Properties props,
                                   CommandEnvironment env);;

        public ActivationGroupDesc(String className,
                                   String codebase,
                                   java.rmi.MarshalledObject data,
                                   java.util.Properties props,
                                   CommandEnvironment env);

        public String getClassName();

        public String getLocation();

        public java.rmi.MarshalledObject getData();

        public CommandEnvironment getCommandEnvironment();

        public java.util.Properties getPropertiesOverrides();

}
The first constructor creates a group descriptor that uses system default for group implementation and code location. Properties specify Java application environment overrides (which will override system properties in the group implementation's JVM). The command environment can control the exact command/options used in starting the child JVM, or can be null to accept rmid's default. This constructor will create an ActivationGroupDesc with a null group class name, which indicates the system's default ActivationGroup implementation.

The second constructor is the same as the first, but allows the specification of Properties and CommandEnvironment.

The getClassName method returns the group's class name (possibly null). A null group class name indicates the system's default ActivationGroup implementation.

The getLocation method returns the codebase path from where the group's class can be loaded.

The getData method returns the group's initialization data in marshalled form.

The getCommandEnvironment method returns the command environment (possibly null).

The getPropertiesOverrides method returns the properties overrides (possibly null) for this descriptor.

7.4.6 The ActivationGroupDesc.CommandEnvironment Class

The CommandEnvironment class allows overriding default system properties and specifying implemention-defined options for an ActivationGroup.
public static class CommandEnvironment
        implements java.io.Serializable
{
        public CommandEnvironment(String cmdpath, String[] args);
        public boolean equals(java.lang.Object);
        public String[] getCommandOptions();
        public String getCommandPath();
        public int hashCode();

}
The constructor creates a CommandEnvironment with the given command, cmdpath, and additional command line options, args.

The equals implements content equality for command environment objects. The hashCode method is implemented appropriately so that a CommandEnvironment can be stored in a hash table if necessary.

The getCommandOptions method returns the environment object's command line options.

The getCommandPath method returns the environment object's command string.

7.4.7 The ActivationGroupID Class

The identifier for a registered activation group serves several purposes:
  • it identifies the group uniquely within the activation system, and
  • it contains a reference to the group's activation system so that the group can contact its activation system when necessary.
The ActivationGroupID is returned from the call to ActivationSystem.registerGroup and is used to identify the group within the activation system. This group identifier is passed as one of the arguments to the activation group's special constructor when an activation group is created or re-created.

package java.rmi.activation;
public class ActivationGroupID implements java.io.Serializable
{
        public ActivationGroupID(ActivationSystem system);

        public ActivationSystem getSystem();

        public boolean equals(Object obj);

        public int hashCode();
}
The ActivationGroupID constructor creates a unique group identifier whose ActivationSystem is system.

The getSystem method returns the activation system for the group.

The hashCode method returns a hashcode for the group's identifier. Two group identifiers that refer to the same remote group will have the same hash code.

The equals method compares two group identifiers for content equality. The method returns true if both of the following conditions are true: 1) the unique identifiers are equivalent (by content), and 2) the activation system specified in each refers to the same remote object.

7.4.8 The ActivationGroup Class

An ActivationGroup is responsible for creating new instances of activatable objects in its group, informing its ActivationMonitor when:
a. its objects become active,

b. its objects become inactive, or

c. the group as a whole becomes inactive.
An ActivationGroup is initially created in one of several ways:
  • as a side-effect of creating a "default" ActivationDesc for an object, or
  • by an explicit call to the ActivationGroup.createGroup method, or
  • as a side-effect of activating the first object in a group whose ActivationGroupDesc was only registered.
Only the activator can re-create an ActivationGroup. The activator spawns, as needed, a separate JVM (as a child process, for example) for each registered activation group and directs activation requests to the appropriate group. It is implementation specific how JVMs are spawned. An activation group is created via the ActivationGroup.createGroup static method. The createGroup method has two requirements on the group to be created: 1) the group must be a concrete subclass of ActivationGroup, and 2) the group must have a constructor that takes two arguments:
  • the group's ActivationGroupID, and
  • the group's initialization data (in a MarshalledObject)
When created, the default implementation of ActivationGroup will set the system properties to the system properties in force when the ActivationGroupDesc was created, and will set the security manager to the java.rmi.RMISecurityManager. If your application requires some specific properties to be set when objects are activated in the group, the application should set the properties before creating any ActivationDescs (before the default ActivationGroupDesc is created).
package java.rmi.activation;
public abstract class ActivationGroup
        extends UnicastRemoteObject
        implements ActivationInstantiator
{
        protected ActivationGroup(ActivationGroupID groupID)
                throws java.rmi.RemoteException;

        public abstract MarshalledObject newInstance(ActivationID id,
                                                     ActivationDesc desc)
                throws ActivationException, java.rmi.RemoteException;

        public abstract boolean inactiveObject(ActivationID id)
                throws ActivationException, UnknownObjectException,
                       java.rmi.RemoteException;

        public static ActivationGroup createGroup(ActivationGroupID id,
                                                  ActivationGroupDesc desc,
                                                  long incarnation)
                throws ActivationException;

        public static ActivationGroupID currentGroupID();

        public static void setSystem(ActivationSystem system)
                throws ActivationException;

        public static ActivationSystem getSystem()
                throws ActivationException;

        protected void activeObject(ActivationID id,
                                    java.rmi.MarshalledObject mobj)
                throws ActivationException, UnknownObjectException,
                       java.rmi.RemoteException;

        protected void inactiveGroup()
                throws UnknownGroupException, java.rmi.RemoteException;

}
The activator calls an activation group's newInstance method in order to activate an object with the activation descriptor, desc. The activation group is responsible for:
  • determining the class for the object using the descriptor's getClassName method,
  • loading the class from the URL path obtained from the descriptor (using the getLocation method),
  • creating an instance of the class by invoking the special constructor of the object's class that takes two arguments: the object's ActivationID, and a MarshalledObject containing the object's initialization data, and
  • returning a serialized version of the remote object it just created to the activator.
The method throws ActivationException if the instance for the given descriptor could not be created.

The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method. A remote object implementation must call Activatable's inactive method when that object deactivates (the object deems that it is no longer active). If the object does not call Activatable.inactive when it deactivates, the object will never be garbage collected since the group keeps strong references to the objects it creates.

The group's inactiveObject method unexports the remote object, associated with id (only if there are no pending or executing calls to the remote object) from the RMI runtime so that the object can no longer receive incoming RMI calls. If the object currently has pending or executing calls, inactiveObject returns false and no action is taken.

If the unexportObject operation was successful (meaning that the object has no pending or executing calls), the group informs its ActivationMonitor (via the monitor's inactiveObject method) that the remote object is not currently active so that the remote object will be reactivated by the activator upon a subsequent activation request. If the operation was successful, inactiveObject returns true. The operation may still succeed if the object is considered active by the ActivationGroup but has already been unexported.

The inactiveObject method throws an UnknownObjectException if the activation group has no knowledge of this object (e.g., the object was previously reported as inactive, or the object was never activated via the activation group). If the inactive operation fails (e.g., if the remote call to the activator or activation group fails), RemoteException is thrown.

The createGroup method creates and sets the activation group for the current JVM. The activation group can only be set if it is not currently set. An activation group is set using the createGroup method when the Activator initiates the re-creation of an activation group in order to carry out incoming activate requests. A group must first register a group descriptor with the ActivationSystem before it can be created via this method (passing it the ActivationID obtained from previous registration).

The group specified by the ActivationGroupDesc, desc, must be a concrete subclass of ActivationGroup and have a public constructor that takes two arguments; the ActivationGroupID for the group and a MarshalledObject containing the group's initialization data (obtained from its ActivationGroupDesc). If the ActivationGroupDesc.getClassName method returns null, the system's default group implementation is used. Note: if your application creates its own custom activation group, the group must set a security manager in the constructor, or objects cannot be activated in the group.

After the group is created, the ActivationSystem is informed that the group is active by calling the activeGroup method, which returns the ActivationMonitor for the group. The application need not call activeGroup independently since that callback is taken care of by the createGroup method.

Once a group is created, subsequent calls to the currentGroupID method will return the identifier for this group until the group becomes inactive, at which point the currentGroupID method will return null.

The parameter incarnation indicates the current group incarnation, i.e., the number of times the group has been activated. The incarnation number is used as a parameter to the activeGroup method, once the group has been successfully created. The incarnation number is zero-based. If the group already exists, or if an error occurs during group creation, the createGroup method throws ActivationException.

The setSystem method sets the ActivationSystem, system, for the JVM. The activation system can only be set if no group is currently active. If the activation system is not set via an explicit call to setSystem, then the getSystem method will attempt to obtain a reference to the ActivationSystem by looking up the name java.rmi.activation.ActivationSystem in the Activator's registry. By default, the port number used to look up the activation system is defined by ActivationSystem.SYSTEM_PORT. This port can be overridden by setting the property java.rmi.activation.port. If the activation system is already set when setSystem is called, the method throws ActivationException.

The getSystem method returns the activation system for the JVM. The activation system may be set by the setSystem method (described above).

The activeObject method is a protected method used by subclasses to make the activeObject call back to the group's monitor to inform the monitor that the remote object with the specified activation id and whose stub is contained in mobj is now active. The call is simply forwarded to the group's ActivationMonitor.

The inactiveGroup method is a protected method used by subclasses to inform the group's monitor that the group has become inactive. A subclass makes this call when each object the group participated in activating in the JVM has become inactive.

7.4.9 The MarshalledObject Class

A MarshalledObject is a container for an object that allows that object to be passed as a parameter in an RMI call, but postpones deserializing the object at the receiver until the application explicitly requests the object (via a call to the container object). The Serializable object contained in the MarshalledObject is serialized and deserialized (when requested) with the same semantics as parameters passed in RMI calls, which means that any remote object in the MarshalledObject is represented by a serialized instance of its stub. The object contained by the MarshalledObject may be a remote object, a non-remote object, or an entire graph of remote and non-remote objects.

When an object is placed inside the MarshalledObject wrapper, the serialized form of the object is annotated with the codebase URL (where the class can be loaded); likewise, when the contained object is retrieved from its MarshalledObject wrapper, if the code for the object is not available locally, the URL (annotated during serialization) is used to locate and load the bytecodes for the object's class.

package java.rmi;
public final class MarshalledObject implements java.io.Serializable
{
        public MarshalledObject(Object obj)
                throws java.io.IOException;

        public Object get()
                throws java.io.IOException, ClassNotFoundException;

        public int hashCode();

        public boolean equals();
}
MarshalledObject's constructor takes a serializable object, obj, as its single argument and holds the marshalled representation of the object in a byte stream. The marshalled representation of the object preserves the semantics of objects that are passed in RMI calls:
  • each class in the stream is annotated with its codebase URL so that when the object is reconstructed (by a call to the get method), the bytecodes for each class can be located and loaded, and
  • remote objects are replaced with their proxy stubs.
When an instance of the class MarshalledObject is written to a java.io.ObjectOutputStream, the contained object's marshalled form (created during construction) is written to the stream; thus, only the byte stream is serialized.

When a MarshalledObject is read from a java.io.ObjectInputStream, the contained object is not deserialized into a concrete object; the object remains in its marshalled representation until the marshalled object's get method is called.

The get method always reconstructs a new copy of the contained object from its marshalled form. The internal representation is deserialized with the semantics used for unmarshalling parameters for RMI calls. So, the deserialization of the object's representation loads class code (if not available locally) using the URL annotation embedded in the serialized stream for the object.

The hashCode of the marshalled representation of the object is the same as the object passed to the constructor. The equals method will return true if the marshalled representation of the objects being compared are equivalent. The comparison that equals uses ignores a class's codebase annotation, meaning that two objects are equivalent if they have the same serialized representation except for the codebase of each class in the serialized representation.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.2 Activation Protocol

During a remote method invocation, if the "live" reference for a target object is unknown, the faulting reference engages in the activation protocol. The activation protocol involves several entities: the faulting reference, the activator, an activation group, and the remote object being activated.

The activator (usually one per host) is the entity which supervises activation by being both:

  • a database of information that maps activation identifiers to the information necessary to activate an object (the object's class, the location--a URL path--from which the class can be loaded, specific data the object may need to bootstrap, etc.), and
  • a manager of Java virtual machines, that starts up JVMs (when necessary) and forwards requests for object activation (along with the necessary information) to the correct activation group inside a remote JVM.
Note that the activator keeps the current mapping of activation identifiers to active objects as a cache, so that the group does not need to be consulted on each activation request.

An activation group (one per JVM) is the entity which receives a request to activate an object in the JVM and returns the activated object back to the activator.

The activation protocol is as follows. A faulting reference uses an activation identifier and calls the activator (an internal RMI interface) to activate the object associated with the identifier. The activator looks up the object's activation descriptor (registered previously). The object's descriptor contains:

  • the object's group identifier, specifying the JVM in which it is activated,
  • the object's class name,
  • a URL path from which to load the object's class code, and
  • object-specific initialization data in marshalled form (initialization data might be the name of a file containing the object's persistent state, for example).
If the activation group in which this object should reside exists, the activator forwards the activation request to that group. If the activation group does not exist, the activator initiates a JVM executing an activation group and then forwards the activation request to that group.

The activation group loads the class for the object and instantiates the object using a special constructor that takes several arguments, including the activation descriptor registered previously.

When the object is finished activating, the activation group passes back a marshalled object reference to the activator that then records the activation identifier and active reference pairing and returns the active (live) reference to the faulting reference. The faulting reference (inside the stub) then forwards method invocations via the live reference directly to the remote object.

Note - In Java 2 SDK, Standard Edition, v 1.2, RMI provides an implementation of the activation system interfaces. In order to use activation, you must first run the activation system daemon rmid.

CONTENTS | PREV | NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

Stub/Skeleton Interfaces

CHAPTER 8

This section contains the interfaces and classes used by the stubs and skeletons generated by the rmic stub compiler.

Topics:

  • The RemoteStub Class
  • The RemoteCall Interface
  • The RemoteRef Interface
  • The ServerRef Interface
  • The Skeleton Interface
  • The Operation Class

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.1 The RemoteStub Class

The java.rmi.server.RemoteStub class is the common superclass for stubs of remote objects. Stub objects are surrogates that support exactly the same set of remote interfaces defined by the actual implementation of a remote object.
package java.rmi.server;

public abstract class RemoteStub extends java.rmi.RemoteObject {
        protected RemoteStub() {...}
        protected RemoteStub(RemoteRef ref) {...}

        protected static void setRef(RemoteStub stub, RemoteRef ref) {...}
}
The first constructor of RemoteStub creates a stub with a null remote reference. The second constructor creates a stub with the given remote reference, ref.

The setRef method is deprecated (and unsupported) as of the Java 2 SDK, Standard Edition, v1.2.

8.1.1 Type Equivalency of Remote Objects with a Stub Class

Clients interact with stub (surrogate) objects that have exactly the same set of remote interfaces defined by the remote object's class; the stub class does not include the non-remote portions of the class hierarchy that constitutes the object's type graph. This is because the stub class is generated from the most refined implementation class that implements one or more remote interfaces. For example, if C extends B and B extends A, but only B implements a remote interface, then a stub is generated from B, not C.

Because the stub implements the same set of remote interfaces as the remote object's class, the stub has the same type as the remote portions of the server object's type graph. A client, therefore, can make use of the built-in Java programming language operations to check a remote object's type and to cast from one remote interface to another.

Stubs are generated using the rmic compiler.

8.1.2 The Semantics of Object Methods Declared final

The following methods are declared final in the java.lang.Object class and therefore cannot be overridden by any implementation:
  • getClass
  • notify
  • notifyAll
  • wait
The default implementation for getClass is appropriate for all objects written in the Java programming language, local or remote; so, the method needs no special implementation for remote objects. When used on a remote stub, the getClass method reports the exact type of the stub object, generated by rmic. Note that stub type reflects only the remote interfaces implemented by the remote object, not that object's local interfaces.

The wait and notify methods of java.lang.Object deal with waiting and notification in the context of the Java programming language's threading model. While use of these methods for remote stubs does not break the threading model, these methods do not have the same semantics as they do for local objects written in the Java programming language. Specifically, these methods operate on the client's local reference to the remote object (the stub), not the actual object at the remote site.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.3 The RemoteRef Interface

The interface RemoteRef represents the handle for a remote object. Each stub contains an instance of RemoteRef that contains the concrete representation of a reference. This remote reference is used to carry out remote calls on the remote object for which it is a reference.
package java.rmi.server;

public interface RemoteRef extends java.io.Externalizable {
        Object invoke(Remote obj,
                                   java.lang.reflect.Method method,
                                   Object[] params,
                                   long opnum)
                throws Exception;

        RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum,
                           long hash) throws RemoteException;
        void invoke(RemoteCall call) throws Exception;
        void done(RemoteCall call) throws RemoteException;
        String getRefClass(java.io.ObjectOutput out);
        int remoteHashCode();
        boolean remoteEquals(RemoteRef obj);
        String remoteToString();
}
The invoke(Remote,Method,Object[],long) method delegates method invocation to the stub's (obj) remote reference and allows the reference to take care of setting up the connection to the remote host, marshaling some representation for the method and parameters, params, then communicating the method invocation to the remote host. This method either returns the result of the method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception. Note that the operation number, opnum, represents a hash of the method signature and may be used to encode the method for transmission.

The method hash to be used for the opnum parameter is a 64-bit (long) integer computed from the first two 32-bit values of the message digest of a particular byte stream using the National Institute of Standards and Technology (NIST) Secure Hash Algorithm (SHA-1). This byte stream contains a string as if it was written using the java.io.DataOutput.writeUTF method, consisting of the remote method's name followed by its method descriptor (see The Java Virtual Machine Specification (JVMS) for a description of method descriptors).

For example, if a method of a remote interface has the following name and signature:

   void myRemoteMethod(int count, Object obj, boolean flag)
the string containing the remote method's name and descriptor would be the following:
   myRemoteMethod(ILjava/lang/Object;Z)V
The 64-bit hash value is the little-endian composition of an eight byte sequence where the first four bytes are the first 32-bit value of the message digest in big-endian byte order and the last four bytes are the second 32-bit value of the message digest in big-endian byte order. For example, if the first two 32-bit values of the message digest are 0xB0B1B2B3 and 0xB4B5B6B7, then the hash value would be 0xB7B6B5B4B3B2B1B0.
Note - The methods newCall(RemoteObject,Operation[],int,long), invoke(RemoteCall), and done(RemoteCall) are deprecated as of the Java 2 SDK, Standard Edition, v1.2. The stubs generated by rmic using the 1.2 stub protocol version do not use these methods any longer. The sequence of calls consisting of newCall, invoke, and done have been replaced by a new invoke method that takes a Method object as one of its parameters.
The method newCall creates an appropriate call object for a new remote method invocation on the remote object obj. The operation array, op, contains the available operations on the remote object. The operation number, opnum, is an index into the operation array which specifies the particular operation for this remote call. The interface hash is a 64-bit value used to enforce compatibility between a stub and skeleton using the v1.1 stub protocol. The interface hash is computed from the first two 32-bit values of the message digest of a particular byte stream using SHA-1. This byte stream contains data as if it was written using the writeInt and writeUTF methods of the interface java.io.DataOutput, consisting of the following items:
  • (int) stub version number, always 1
  • for each remote method, in order of operation number:
  • (UTF-8) remote method name
  • (UTF-8) remote method descriptor (see The Java Virtual Machine Specification)
  • for each declared exception, in lexicographic order of binary name:
    • (UTF-8) the name of the exception class

The interface hash value is composed from the message digest in the same manner as described above for the method hash used in the invoke method.

The method invoke(RemoteCall) executes the remote call. invoke will raise any "user" exceptions which should pass through and not be caught by the stub. If any exception is raised during the remote invocation, invoke should take care of cleaning up the connection before raising the "user exception" or RemoteException.

The method done allows the remote reference to clean up (or reuse) the connection. done should only be called if the invoke call returns successfully (non-exceptionally) to the stub.

The method getRefClass returns the nonpackage-qualified class name of the reference type to be serialized onto the stream out.

The method remoteHashCode returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hashtables). A RemoteObject forwards a call to its hashCode method to the remoteHashCode method of the remote reference.

The method remoteEquals compares two remote objects for equality. Two remote objects are equal if they refer to the same remote object. For example, two stubs are equal if they refer to the same remote object. A RemoteObject forwards a call to its equals method to the remoteEquals method of the remote reference.

The method remoteToString returns a String that represents the reference of this remote object.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.4 The ServerRef Interface

The interface ServerRef represents the server-side handle for a remote object implementation.
package java.rmi.server;

public interface ServerRef extends RemoteRef {
        RemoteStub exportObject(java.rmi.Remote obj, Object data)
                throws java.rmi.RemoteException;
        String getClientHost() throws ServerNotActiveException;
}
The method exportObject finds or creates a client stub object for the supplied Remote object implementation obj.The parameter data contains information necessary to export the object (such as port number).

The method getClientHost returns the host name of the current client. When called from a thread actively handling a remote method invocation, the host name of the client invoking the call is returned. If a remote method call is not currently being service, then ServerNotActiveException is called.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.2 The RemoteCall Interface

The interface RemoteCall is an abstraction used by the stubs and skeletons of remote objects to carry out a call to a remote object.
Note - The RemoteCall interface is deprecated as of the Java 2 SDK, Standard Edition, v1.2. The 1.2 stub protocol does not make use of this interface anymore. As of the Java 2 SDK, Standard Edition, v1.2, stubs now use the new invoke method which does not require RemoteCall as a parameter.
package java.rmi.server;

import java.io.*;

public interface RemoteCall {
        ObjectOutput getOutputStream() throws IOException;
        void releaseOutputStream() throws IOException;
        ObjectInput getInputStream() throws IOException;
        void releaseInputStream() throws IOException;
        ObjectOutput getResultStream(boolean success)
                throws IOException, StreamCorruptedException;
        void executeCall() throws Exception;
        void done() throws IOException;
}
The method getOutputStream returns the output stream into which either the stub marshals arguments or the skeleton marshals results.

The method releaseOutputStream releases the output stream; in some transports this will release the stream.

The method getInputStream returns the InputStream from which the stub unmarshals results or the skeleton unmarshals parameters.

The method releaseInputStream releases the input stream. This will allow some transports to release the input side of a connection early.

The method getResultStream returns an output stream (after writing out header information relating to the success of the call). Obtaining a result stream should only succeed once per remote call. If success is true, then the result to be marshaled is a normal return; otherwise the result is an exception. StreamCorruptedException is thrown if the result stream has already been obtained for this remote call.

The method executeCall does whatever it takes to execute the call.

The method done allows cleanup after the remote call has completed.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.5 The Skeleton Interface

The interface Skeleton is used solely by the implementation of skeletons generated by the rmic compiler. A skeleton for a remote object is a server-side entity that dispatches calls to the actual remote object implementation.
Note - The Skeleton interface was deprecated as of the Java 2 SDK, Standard Edition, v 1.2. Every 1.1 (and version 1.1 compatible skeletons generated in 1.2 using rmic -vcompat, the default) skeleton class generated by the rmic stub compiler implements this interface. Skeletons are no longer required for remote method call dispatch as of Java 2 SDK, Standard Edition, v1.2-compatible versions. To generate stubs that are compatible with 1.2 or later versions, use the command rmic with the option -v 1.2.
package java.rmi.server;

public interface Skeleton {
    void dispatch(Remote obj, RemoteCall call, int opnum, long hash)
                throws Exception;
    Operation[] getOperations();
}
The dispatch method unmarshals any arguments from the input stream obtained from the call object, invokes the method (indicated by the operation number opnum) on the actual remote object implementation obj, and marshals the return value or throws an exception if one occurs during the invocation.

The getOperations method returns an array containing the operation descriptors for the remote object's methods.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


8 - Stub/Skeleton Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

8.6 The Operation Class

The class Operation holds a description of a method in the Java programming language for a remote object.
Note - The Operation interface is deprecated as of the Java 2 SDK, Standard Edition, v1.2. The 1.2 stub protocol no longer uses the old RemoteRef.invoke method which takes an Operation as one of its arguments. As of the Java 2 SDK, Standard Edition, v1.2, stubs now use the new invoke method which does not require Operation as a parameter.
package java.rmi.server;

public class Operation {
        public Operation(String op) {...}
        public String getOperation() {...}
        public String toString() {...}
}
An Operation object is typically constructed with the method signature.

The method getOperation returns the contents of the operation descriptor (the value with which it was initialized).

The method toString also returns the string representation of the operation descriptor (typically the method signature).

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

9.5 The VMID Class

See the VMID API documentation.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

9.3 The ObjID Class

See the ObjID API documentation.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

9.4 The UID Class

See the UID API documentation.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

9.2 The Lease Class

See the Lease API documentation.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

9.1 The DGC Interface

See the DGC API documentation.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


9 - Garbage Collector Interfaces

CONTENTS | PREV | NEXT Java Remote Method Invocation

Garbage Collector Interfaces

CHAPTER 9

The interfaces and classes in this chapter are used by the distributed garbage collector (DGC) for RMI.

Topics:

  • The DGC Interface
  • The Lease Class
  • The ObjID Class
  • The UID Class
  • The VMID Class

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.1 Overview

The RMI protocol makes use of two other protocols for its on-the-wire format: Java Object Serialization and HTTP. The Object Serialization protocol is used to marshal call and return data. The HTTP protocol is used to "POST" a remote method invocation and obtain return data when circumstances warrant. Each protocol is documented as a separate grammar. Nonterminal symbols in production rules may refer to rules governed by another protocol (either Object Serialization or HTTP). When a protocol boundary is crossed, subsequent productions use that embedded protocol.

Notes about Grammar Notation

  • We use a similar notation to that used in The Java Language Specification.
  • Control codes in the stream are represented by literal values expressed in hexadecimal.
  • Some nonterminal symbols in the grammar represent application specific values supplied in a method invocation. The definition of such a nonterminal consists of its Java programming language type. A table mapping each of these nonterminals to its respective type follows the grammar.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.3 RMI's Use of Object Serialization

Call and return data in RMI calls are formatted using the Java Object Serialization protocol. Each method invocation's CallData is written to a Java object output stream that contains the ObjectIdentifier (the target of the call), an Operation (a number representing the method to be invoked), a Hash (a number that verifies that client stub and remote object skeleton use the same stub protocol), followed by a list of zero or more Arguments for the call.

In the JDK1.1 stub protocol the Operation represents the method number as assigned by rmic, and the Hash was the stub/skeleton hash which is the stub's interface hash. As of the Java 2 stub protocol (Java 2 stubs are generated using the -v1.2 option with rmic), Operation has the value -1 and the Hash is a hash representing the method to call. The hash is described in the section "The RemoteRef Interface".

CallData:

ObjectIdentifier Operation Hash Argumentsopt

ObjectIdentifier:

ObjectNumber UniqueIdentifier

UniqueIdentifier:

Number Time Count

Arguments:

Value

Arguments Value

Value:

Object

Primitive

A ReturnValue of an RMI call consists of a return code to indicate either a normal or exceptional return, a UniqueIdentifier to tag the return value (used to send a DGCAck if necessary) followed by the return result: either the Value returned or the Exception thrown.

ReturnValue:

0x01 UniqueIdentifier Valueopt

0x02 UniqueIdentifier Exception
Note - ObjectIdentifier, UniqueIdentifier, and EndpointIdentifier are not written out using default serialization, but each uses its own special write method (this is not the writeObject method used by object serialization); the write method for each type of identifier adds its component data consecutively to the output stream.

10.3.1 Class Annotation and Class Loading

RMI overrides the annotateClass and resolveClass methods of ObjectOutputStream and ObjectInputStream respectively. Each class is annotated with the codebase URL (the location from which the class can be loaded). In the annotateClass method, the classloader that loaded the class is queried for its codebase URL. If the classloader is non-null and the classloader has a non-null codebase, then the codebase is written to the stream using the ObjectOutputStream.writeObject method; otherwise a null is written to the stream using the writeObject method. Note: as an optimization, classes in the "java" package are not annotated, since they are always available to the receiver.

The class annotation is resolved during deserialization using the ObjectInputStream.resolveClass method. The resolveClass method first reads the annotation via the ObjectInputStream.readObject method. If the annotation, a codebase URL, is non-null, then it obtains the classloader for that URL and attempts to load the class. The class is loaded by using a java.net.URLConnection to fetch the class bytes (the same mechanism used by a web browser's applet classloader).

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.6 RMI's Multiplexing Protocol

The purpose of multiplexing is to provide a model where two endpoints can each open multiple full duplex connections to the other endpoint in an environment where only one of the endpoints is able to open such a bidirectional connection using some other facility (e.g., a TCP connection). RMI use this simple multiplexing protocol to allow a client to connect to an RMI server object in some situations where that is otherwise not possible. For example, some security managers for applet environments disallow the creation of server sockets to listen for incoming connections, thereby preventing such applets to export RMI objects and service remote calls from direct socket connections. If the applet can open a normal socket connection to its codebase host, however, then it can use the multiplexing protocol over that connection to allow the codebase host to invoke methods on RMI objects exported by the applet. This section describes how the format and rules of the multiplexing protocol.

10.6.1 Definitions

This sections defines some terms as they are used in the rest of the description of the protocol.

An endpoint is one of the two users of a connection using the multiplexing protocol.

The multiplexing protocol must layer on top of one existing bidirectional, reliable byte stream, presumably initiated by one of the endpoints to the other. In current RMI usage, this is always a TCP connection, made with a java.net.Socket object. This connection will be referred to as the concrete connection.

The multiplexing protocol facilitates the use of virtual connections, which are themselves bidirectional, reliable byte streams, representing a particular session between two endpoints. The set of virtual connections between two endpoints over a single concrete connection comprises a multiplexed connection. Using the multiplexing protocol, virtual connections can be opened and closed by either endpoint. The state of an virtual connection with respect to a given endpoint is defined by the elements of the multiplexing protocol that are sent and received over the concrete connection. Such state involves if the connection is open or closed, the actual data that has been transmitted across, and the related flow control mechanisms. If not otherwise qualified, the term connection used in the remainder of this section means virtual connection.

A virtual connections within a given multiplexed connection is identified by a 16 bit integer, known as the connection identifier. Thus, there exist 65,536 possible virtual connections in one multiplexed connection. The implementation may limit the number of these virtual connections that may be used simultaneously.

10.6.2 Connection State and Flow Control

Connections are manipulated using the various operations defined by the multiplexing protocol. The following are the names of the operations defined by the protocol: OPEN, CLOSE, CLOSEACK, REQUEST, and TRANSMIT. The exact format and rules for all the operations are detailed in Section 10.6.3, "Protocol Format."

The OPEN, CLOSE, and CLOSEACK operations control connections becoming opened and closed, while the REQUEST and TRANSMIT operations are used to transmit data across an open connection within the constraints of the flow control mechanism.

Connection States

A virtual connection is open with respect to a particular endpoint if the endpoint has sent an OPEN operation for that connection, or it has received an OPEN operation for that connection (and it had not been subsequently closed). The various protocol operations are described below.

A virtual connection is pending close with respect to a particular endpoint if the endpoint has sent a CLOSE operation for that connection, but it has not yet received a subsequent CLOSE or CLOSEACK operation for that connection.

A virtual connection is closed with respect to a particular endpoint if it has never been opened, or if it has received a CLOSE or a CLOSEACK operation for that connection (and it has not been subsequently opened).

Flow Control

The multiplexing protocol uses a simple packeting flow control mechanism to allow multiple virtual connections to exist in parallel over the same concrete connection. The high level requirement of the flow control mechanism is that the state of all virtual connections is independent; the state of one connection may not affect the behavior of others. For example, if the data buffers handling data coming in from one connection become full, this cannot prevent the transmission and processing of data for any other connection. This is necessary if the continuation of one connection is dependent on the completion of the use of another connection, such as would happen with recursive RMI calls. Therefore, the practical implication is that the implementation must always be able to consume and process all of the multiplexing protocol data ready for input on the concrete connection (assuming that it conforms to this specification).

Each endpoint has two state values associated with each connection: how many bytes of data the endpoint has requested but not received (input request count) and how many bytes the other endpoint has requested but have not been supplied by this endpoint (output request count).

An endpoint's output request count is increased when it receives a REQUEST operation from the other endpoint, and it is decreased when it sends a TRANSMIT operation. An endpoint's input request count is increased when it sends a REQUEST operation, and it is decreased when it receives a TRANSMIT operation. It is a protocol violation if either of these values becomes negative.

It is a protocol violation for an endpoint to send a REQUEST operation that would increase its input request count to more bytes that it can currently handle without blocking. It should, however, make sure that its input request count is greater than zero if the user of the connection is waiting to read data.

It is a protocol violation for an endpoint to send a TRANSMIT operation containing more bytes that its output request count. It may buffer outgoing data until the user of the connection requests that data written to the connection be explicitly flushed. If data must be sent over the connection, however, by either an explicit flush or because the implementation's output buffers are full, then the user of the connection may be blocked until sufficient TRANSMIT operations can proceed.

Beyond the rules outlined above, implementations are free to send REQUEST and TRANSMIT operations as deemed appropriate. For example, an endpoint may request more data for a connection even if its input buffer is not empty.

10.6.3 Protocol Format

The byte stream format of the multiplexing protocol consists of a contiguous series of variable length records. The first byte of the record is an operation code that identifies the operation of the record and determines the format of the rest of its content. The following legal operation codes are defined:
value | name
0xE1 | OPEN
0xE2 | CLOSE
0xE3 | CLOSEACK
0xE4 | REQUEST
0xE5 | TRANSMIT

It is a protocol violation if the first byte of a record is not one of the defined operation codes. The following sections describe the format of the records for each operation code.

OPEN operation

This is the format for records of the OPEN operation:

size (bytes) | name | description
1 | opcode | operation code (OPEN)
2 | ID | connection identifier

An endpoint sends an OPEN operation to open the indicated connection. It is a protocol violation if ID refers to a connection that is currently open or pending close with respect to the sending endpoint. After the connection is opened, both input and request count states for the connection are zero for both endpoints.

Receipt of an OPEN operation indicates that the other endpoint is opening the indicated connection. After the connection is opened, both input and output request count states for the connection are zero for both endpoints.

To prevent identifier collisions between the two endpoints, the space of valid connection identifiers is divided in half, depending on the value of the most significant bit. Each endpoint is only allowed to open connections with a particular value for the high bit. The endpoint that initiated the concrete connection must only open connections with the high bit set in the identifier and the other endpoint must only open connections with a zero in the high bit. For example, if an RMI applet that cannot create a server socket initiates a multiplexed connection to its codebase host, the applet may open virtual connections in the identifier range 0x8000-7FFF, and the server may open virtual connection in the identifier range 0-0x7FFF.

CLOSE operation

This is the format for records of the CLOSE operation:
size (bytes) | name | description
1 | opcode | operation code (OPEN)
2 | ID | connection identifier

An endpoint sends a CLOSE operation to close the indicated connection. It is a protocol violation if ID refers to a connection that is currently closed or pending close with respect to the sending endpoint (it may be pending close with respect to the receiving endpoint if it has also sent a CLOSE operation for this connection). After sending the CLOSE, the connection becomes pending close for the sending endpoint. Thus, it may not reopen the connection until it has received a CLOSE or a CLOSEACK for it from the other endpoint.

Receipt of a CLOSE operation indicates that the other endpoint has closed the indicated connection, and it thus becomes closed on the receiving endpoint. Although the receiving endpoint may not send any more operations for this connection (until it is opened again), it still should provide data in the implementation's input buffers to readers of the connection. If the connection had previously been open instead of pending close, the receiving endpoint must respond with a CLOSEACK operation for the connection.

CLOSEACK operation

The following is the format for records with the CLOSEACK operation:
size (bytes) | name | description
1 | opcode | operation code (OPEN)
2 | ID | connection identifier

An endpoint sends a CLOSEACK operation to acknowledge a CLOSE operation from the receiving endpoint. It is a protocol violation if ID refers to a connection that is not pending close for the receiving endpoint when the operation is received.

Receipt of a CLOSEACK operation changes the state of the indicated connection from pending close to closed, and thus the connection may be reopened in the future.

REQUEST operation

This is the format for records of the REQUEST operation:
size (bytes) | name | description
1 | opcode | operation code (OPEN)
2 | ID | connection identifier
4 | count | number of additional bytes requested

An endpoint sends a REQUEST operation to increase its input request count for the indicated connection. It is a protocol violation if ID does not refer to a connection that is open with respect to the sending endpoint. The endpoint's input request count is incremented by the value count. The value of count is a signed 32 bit integer, and it is a protocol violation if it is negative or zero.

Receipt of a REQUEST operation causes the output request count for the indicated connection to increase by count. If the connection is pending close by the receiving endpoint, then any REQUEST operations may be ignored.

TRANSMIT operation

This is the format for records of the TRANSMIT operation.

size (bytes) | name | description
1 | opcode | operation code (OPEN)
2 | ID | connection identifier
4 | count | number of bytes in transmission
count | data | transmission data

An endpoint sends a TRANSMIT operation to actually transmit data over the indicated connection. It is a protocol violation if ID does not refer to a connection that is open with respect to the sending endpoint. The endpoint's output request count is decremented by the value count. The value of count is a signed 32 bit integer, and it is a protocol violation if it is negative or zero. It is also a protocol violation if the TRANSMIT operation would cause the sending endpoint's output request count to become negative.

Receipt of a TRANSMIT operation causes the count bytes of data to be added to the queue of bytes available for reading from the connection. The receiving endpoint's input request count is decremented by count. If this causes the input request count to become zero and the user of the connection is trying to read more data, the endpoint should respond with another REQUEST operation. If the connection is pending close by the receiving endpoint, then any TRANSMIT operations may be ignored.

Protocol Violations

If a protocol violation occurs, as defined above or if a communication error is detected in the concrete connection, then the multiplexed connection is shut down. The real connection is terminated, and all virtual connections become closed immediately. Data already available for reading from virtual connections may be read by the users of the connections.

CONTENTS | PREV | NEXT
Copyright © (c) 1997,2006, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.4 RMI's Use of HTTP POST Protocol

In order to invoke remote methods through a firewall, some RMI calls make use of the HTTP protocol, more specifically HTTP POST. The URL specified in the post header can be one of the following:

http://<host>:<port>/
http://<host>:80/cgi-bin/java-rmi?forward=<port>

The first URL is used for direct communication with an RMI server on the specific host and port. The second URL form is used to invoke a "cgi" script on the server which forwards the invocation to the server on the specified port.

An HttpPostHeader is a standard HTTP header for a POST request. An HttpResponseHeader is a standard HTTP response to a post. If the response status code is not 200, then it is assumed that there is no Return. Note that only a single RMI call is embedded in an HTTP POST request.

HttpMessage:

HttpPostHeader Header Message

HttpReturn:

HttpResponseHeader Return
Note - Only the SingleOpProtocol appears in the Header of an HttpMessage. An HttpReturn does not contain a protocol acknowledgment byte.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.2 RMI Transport Protocol

The wire format for RMI is represented by a Stream. The terminology adopted here reflects a client perspective. Out refers to output messages and In refers to input messages. The contents of the transport header are not formatted using object serialization.
Stream:
Out

In

The input and output streams used by RMI are paired. Each Out stream has a corresponding In stream. An Out stream in the grammar maps to the output stream of a socket (from the client's perspective). An In stream (in the grammar) is paired with the corresponding socket's input stream. Since output and input streams are paired, the only header information needed on an input stream is an acknowledgment as to whether the protocol is understood; other header information (such as the magic number and version number) can be implied by the context of stream pairing.

10.2.1 Format of an Output Stream

An output stream in RMI consists of transport Header information followed by a sequence of Messages. Alternatively, an output stream can contain an invocation embedded in the HTTP protocol.

Out:

Header Messages
HttpMessage

Header:

0x4a 0x52 0x4d 0x49 Version Protocol

Version:

0x00 0x01

Protocol:

StreamProtocol
SingleOpProtocol
MultiplexProtocol

StreamProtocol:

0x4b

SingleOpProtocol:

0x4c

MultiplexProtocol:

0x4d

Messages:

Message
Messages Message

The Messages are wrapped within a particular protocol as specified by Protocol. For the SingleOpProtocol, there may only be one Message after the Header, and there is no additional data that the Message is wrapped in. The SingleOpProtocol is used for invocation embedded in HTTP requests, where interaction beyond a single request and response is not possible.

For the StreamProtocol and the MultiplexProtocol, the server must respond with a a byte 0x4e acknowledging support for the protocol, and an EndpointIdentifier that contains the host name and port number that the server can see is being used by the client. The client can use this information to determine its host name if it is otherwise unable to do that for security reasons. The client must then respond with another EndpointIdentifier that contains the client's default endpoint for accepting connections. This can be used by a server in the MultiplexProtocol case to identify the client.

For the StreamProtocol, after this endpoint negotiation, the Messages are sent over the output stream without any additional wrapping of the data. For the MultiplexProtocol, the socket connection is used as the concrete connection for a multiplexed connection, as described in Section 10.6, "RMI's Multiplexing Protocol." Virtual connections initiated over this multiplexed connection consist of a series of Messages as described below.

There are three types of output messages: Call, Ping and DgcAck. A Call encodes a method invocation. A Ping is a transport-level message for testing liveness of a remote virtual machine. A DGCAck is an acknowledgment directed to a server's distributed garbage collector that indicates that remote objects in a return value from a server have been received by the client.

Message:

Call
Ping
DgcAck

Call:

0x50 CallData

Ping:

0x52

DgcAck:

0x54 UniqueIdentifier

10.2.2 Format of an Input Stream

There are currently three types of input messages: ReturnData, HttpReturn and PingAck. ReturnData is the result of a "normal" RMI call. An HttpReturn is a return result from an invocation embedded in the HTTP protocol. A PingAck is the acknowledgment for a Ping message.

In:

ProtocolAck Returns
ProtocolNotSupported
HttpReturn

ProtocolAck:

0x4e

ProtocolNotSupported:

0x4f

Returns:

Return
Returns Return

Return:

ReturnData
PingAck

ReturnData:

0x51 ReturnValue

PingAck:

0x53

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

10.5 Application-Specific Values for RMI

This table lists the nonterminal symbols that represent application-specific values used by RMI. The table maps each symbol to its respective type. Each is formatted using the protocol in which it is embedded.

Symbol | type
Count | short
Exception | java.lang.Exception
Hash | long
Hostname | UTF
Number | int
Object | java.lang.Object
ObjectNumber | long
Operation | int
PortNumber | int
Primitive | byte, int, short, long...
Time | long

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


10 - RMI Wire Protocol

CONTENTS | PREV | NEXT Java Remote Method Invocation

RMI Wire Protocol

CHAPTER 10

Topics:

  • Overview
  • RMI Transport Protocol
  • RMI's Use of Object Serialization Protocol
  • RMI's Use of HTTP POST Protocol
  • Application-Specific Values for RMI
  • RMI's Multiplexing Protocol

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


Contents

Java™ Remote Method Invocation Specification

Java Remote Method Invocation (Java RMI) is a distributed object model for the Java programming language that retains the semantics of the Java platform's object model, making distributed objects easy to implement and to use. The system combines aspects of the Modula-3 Network Objects system and Spring's subcontract and includes some novel features made possible by the Java SE platform.

Revision 1.11, JavaTM SE Developer Kit, v6

CONTENTS | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


1 - System Architecture

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

System Architecture

CHAPTER 1

Topics:

  • Overview
  • Writing to an Object Stream
  • Reading from an Object Stream
  • Object Streams as Containers
  • Defining Serializable Fields for a Class
  • Documenting Serializable Fields and Data for a Class
  • Accessing Serializable Fields of a Class
  • The ObjectOutput Interface
  • The ObjectInput Interface
  • The Serializable Interface
  • The Externalizable Interface
  • Serialization of Enum Constants
  • Protecting Sensitive Information

1.1 Overview

The ability to store and retrieve JavaTM objects is essential to building all but the most transient applications. The key to storing and retrieving objects in a serialized form is representing the state of objects sufficient to reconstruct the object(s). Objects to be saved in the stream may support either the Serializable or the Externalizable interface. For JavaTM objects, the serialized form must be able to identify and verify the JavaTM class from which the contents of the object were saved and to restore the contents to a new instance. For serializable objects, the stream includes sufficient information to restore the fields in the stream to a compatible version of the class. For Externalizable objects, the class is solely responsible for the external format of its contents.

Objects to be stored and retrieved frequently refer to other objects. Those other objects must be stored and retrieved at the same time to maintain the relationships between the objects. When an object is stored, all of the objects that are reachable from that object are stored as well.

The goals for serializing JavaTM objects are to:

  • Have a simple yet extensible mechanism.
  • Maintain the JavaTM object type and safety properties in the serialized form.
  • Be extensible to support marshaling and unmarshaling as needed for remote objects.
  • Be extensible to support simple persistence of JavaTM objects.
  • Require per class implementation only for customization.
  • Allow the object to define its external format.

1.2 Writing to an Object Stream

Writing objects and primitives to a stream is a straightforward process. For example:

// Serialize today's date to a file.
    FileOutputStream f = new FileOutputStream("tmp");
    ObjectOutput s = new ObjectOutputStream(f);
    s.writeObject("Today");
    s.writeObject(new Date());
    s.flush();
First an OutputStream, in this case a FileOutputStream, is needed to receive the bytes. Then an ObjectOutputStream is created that writes to the FileOutputStream. Next, the string "Today" and a Date object are written to the stream. More generally, objects are written with the writeObject method and primitives are written to the stream with the methods of DataOutput.

The writeObject method (see Section 2.3, "The writeObject Method") serializes the specified object and traverses its references to other objects in the object graph recursively to create a complete serialized representation of the graph. Within a stream, the first reference to any object results in the object being serialized or externalized and the assignment of a handle for that object. Subsequent references to that object are encoded as the handle. Using object handles preserves sharing and circular references that occur naturally in object graphs. Subsequent references to an object use only the handle allowing a very compact representation.

Special handling is required for arrays, enum constants, and objects of type Class, ObjectStreamClass, and String. Other objects must implement either the Serializable or the Externalizable interface to be saved in or restored from a stream.

Primitive data types are written to the stream with the methods in the DataOutput interface, such as writeInt, writeFloat, or writeUTF. Individual bytes and arrays of bytes are written with the methods of OutputStream. Except for serializable fields, primitive data is written to the stream in block-data records, with each record prefixed by a marker and an indication of the number of bytes in the record.

ObjectOutputStream can be extended to customize the information about classes in the stream or to replace objects to be serialized. Refer to the annotateClass and replaceObject method descriptions for details.

1.3 Reading from an Object Stream

Reading an object from a stream, like writing, is straightforward:

// Deserialize a string and date from a file.
    FileInputStream in = new FileInputStream("tmp");
    ObjectInputStream s = new ObjectInputStream(in);
    String today = (String)s.readObject();
    Date date = (Date)s.readObject();
First an InputStream, in this case a FileInputStream, is needed as the source stream. Then an ObjectInputStream is created that reads from the InputStream. Next, the string "Today" and a Date object are read from the stream. Generally, objects are read with the readObject method and primitives are read from the stream with the methods of DataInput.

The readObject method deserializes the next object in the stream and traverses its references to other objects recursively to create the complete graph of objects serialized.

Primitive data types are read from the stream with the methods in the DataInput interface, such as readInt, readFloat, or readUTF. Individual bytes and arrays of bytes are read with the methods of InputStream. Except for serializable fields, primitive data is read from block-data records.

ObjectInputStream can be extended to utilize customized information in the stream about classes or to replace objects that have been deserialized. Refer to the resolveClass and resolveObject method descriptions for details.

1.4 Object Streams as Containers

Object Serialization produces and consumes a stream of bytes that contain one or more primitives and objects. The objects written to the stream, in turn, refer to other objects, which are also represented in the stream. Object Serialization produces just one stream format that encodes and stores the contained objects.

Each object that acts as a container implements an interface which allows primitives and objects to be stored in or retrieved from it. These interfaces are the ObjectOutput and ObjectInput interfaces which:

  • Provide a stream to write to and to read from
  • Handle requests to write primitive types and objects to the stream
  • Handle requests to read primitive types and objects from the stream
Each object which is to be stored in a stream must explicitly allow itself to be stored and must implement the protocols needed to save and restore its state. Object Serialization defines two such protocols. The protocols allow the container to ask the object to write and read its state.

To be stored in an Object Stream, each object must implement either the Serializable or the Externalizable interface:

  • For a Serializable class, Object Serialization can automatically save and restore fields of each class of an object and automatically handle classes that evolve by adding fields or supertypes. A serializable class can declare which of its fields are saved or restored, and write and read optional values and objects.
  • For an Externalizable class, Object Serialization delegates to the class complete control over its external format and how the state of the supertype(s) is saved and restored.

1.5 Defining Serializable Fields for a Class

The serializable fields of a class can be defined two different ways. Default serializable fields of a class are defined to be the non-transient and non-static fields. This default computation can be overridden by declaring a special field in the Serializable class, serialPersistentFields. This field must be initialized with an array of ObjectStreamField objects that list the names and types of the serializable fields. The modifiers for the field are required to be private, static, and final. If the field's value is null or is otherwise not an instance of ObjectStreamField[], or if the field does not have the required modifiers, then the behavior is as if the field were not declared at all.

For example, the following declaration duplicates the default behavior.

class List implements Serializable {
    List next;

    private static final ObjectStreamField[] serialPersistentFields
                 = {new ObjectStreamField("next", List.class)};

}
By using serialPersistentFields to define the Serializable fields for a class, there no longer is a limitation that a serializable field must be a field within the current definition of the Serializable class. The writeObject and readObject methods of the Serializable class can map the current implementation of the class to the serializable fields of the class using the interface that is described in Section 1.7, "Accessing Serializable Fields of a Class." Therefore, the fields for a Serializable class can change in a later release, as long as it maintains the mapping back to its Serializable fields that must remain compatible across release boundaries.
Note - There is, however, a limitation to the use of this mechanism to specify serializable fields for inner classes. Inner classes can only contain final static fields that are initialized to constants or expressions built up from constants. Consequently, it is not possible to set serialPersistentFields for an inner class (though it is possible to set it for static member classes). For other restrictions pertaining to serialization of inner class instances, see section Section 1.10, "The Serializable Interface".

1.6 Documenting Serializable Fields and Data for a Class

It is important to document the serializable state of a class to enable interoperability with alternative implementations of a Serializable class and to document class evolution. Documenting a serializable field gives one a final opportunity to review whether or not the field should be serializable. The serialization javadoc tags, @serial, @serialField, and @serialData, provide a way to document the serialized form for a Serializable class within the source code.
  • The @serial tag should be placed in the javadoc comment for a default serializable field. The syntax is as follows: @serial field-description The optional field-description describes the meaning of the field and its acceptable values. The field-description can span multiple lines. When a field is added after the initial release, a @since tag indicates the version the field was added. The field-description for @serial provides serialization-specific documentation and is appended to the javadoc comment for the field within the serialized form documentation.
  • The @serialField tag is used to document an ObjectStreamField component of a serialPersistentFields array. One of these tags should be used for each ObjectStreamField component. The syntax is as follows: @serialField field-name field-type field-description
  • The @serialData tag describes the sequences and types of data written or read. The tag describes the sequence and type of optional data written by writeObject or all data written by the Externalizable.writeExternal method. The syntax is as follows: @serialData data-description
The javadoc application recognizes the serialization javadoc tags and generates a specification for each Serializable and Externalizable class. See Section C.1, "Example Alternate Implementation of java.io.File" for an example that uses these tags.

When a class is declared Serializable, the serializable state of the object is defined by serializable fields (by name and type) plus optional data. Optional data can only be written explicitly by the writeObject method of a Serializable class. Optional data can be read by the Serializable class' readObject method or serialization will skip unread optional data.

When a class is declared Externalizable, the data that is written to the stream by the class itself defines the serialized state. The class must specify the order, types, and meaning of each datum that is written to the stream. The class must handle its own evolution, so that it can continue to read data written by and write data that can be read by previous versions. The class must coordinate with the superclass when saving and restoring data. The location of the superclasses data in the stream must be specified.

The designer of a Serializable class must ensure that the information saved for the class is appropriate for persistence and follows the serialization-specified rules for interoperability and evolution. Class evolution is explained in greater detail in Chapter 5, "Versioning of Serializable Objects."

1.7 Accessing Serializable Fields of a Class

Serialization provides two mechanisms for accessing the serializable fields in a stream:
  • The default mechanism requires no customization
  • The Serializable Fields API allows a class to explicitly access/set the serializable fields by name and type
The default mechanism is used automatically when reading or writing objects that implement the Serializable interface and do no further customization. The serializable fields are mapped to the corresponding fields of the class and values are either written to the stream from those fields or are read in and assigned respectively. If the class provides writeObject and readObject methods, the default mechanism can be invoked by calling defaultWriteObject and defaultReadObject. When the writeObject and readObject methods are implemented, the class has an opportunity to modify the serializable field values before they are written or after they are read.

When the default mechanism cannot be used, the serializable class can use the putFields method of ObjectOutputStream to put the values for the serializable fields into the stream. The writeFields method of ObjectOutputStream puts the values in the correct order, then writes them to the stream using the existing protocol for serialization. Correspondingly, the readFields method of ObjectInputStream reads the values from the stream and makes them available to the class by name in any order. See Section 2.2, "The ObjectOutputStream.PutField Class" and Section 3.2, "The ObjectInputStream.GetField Class." for a detailed description of the Serializable Fields API.

1.8 The ObjectOutput Interface

The ObjectOutput interface provides an abstract, stream-based interface to object storage. It extends the DataOutput interface so those methods can be used for writing primitive data types. Objects that implement this interface can be used to store primitives and objects.

package java.io;

public interface ObjectOutput extends DataOutput
{
    public void writeObject(Object obj) throws IOException;
    public void write(int b) throws IOException;
    public void write(byte b[]) throws IOException;
     public void write(byte b[], int off, int len) throws IOException;
    public void flush() throws IOException;
    public void close() throws IOException;
}
The writeObject method is used to write an object. The exceptions thrown reflect errors while accessing the object or its fields, or exceptions that occur in writing to storage. If any exception is thrown, the underlying storage may be corrupted. If this occurs, refer to the object that is implementing this interface for more information.

1.9 The ObjectInput Interface

The ObjectInput interface provides an abstract stream based interface to object retrieval. It extends the DataInput interface so those methods for reading primitive data types are accessible in this interface.

package java.io;

public interface ObjectInput extends DataInput
{
    public Object readObject()
        throws ClassNotFoundException, IOException;
    public int read() throws IOException;
    public int read(byte b[]) throws IOException;
    public int read(byte b[], int off, int len) throws IOException;
    public long skip(long n) throws IOException;
    public int available() throws IOException;
    public void close() throws IOException;
}
The readObject method is used to read and return an object. The exceptions thrown reflect errors while accessing the objects or its fields or exceptions that occur in reading from the storage. If any exception is thrown, the underlying storage may be corrupted. If this occurs, refer to the object implementing this interface for additional information.

1.10 The Serializable Interface

Object Serialization produces a stream with information about the JavaTM classes for the objects which are being saved. For serializable objects, sufficient information is kept to restore those objects even if a different (but compatible) version of the implementation of the class is present. The Serializable interface is defined to identify classes which implement the serializable protocol:

package java.io;

public interface Serializable {};
A Serializable class must do the following:
  • Implement the java.io.Serializable interface
  • Identify the fields that should be serializable
(Use the serialPersistentFields member to explicitly declare them serializable or use the transient keyword to denote nonserializable fields.)
  • Have access to the no-arg constructor of its first nonserializable superclass
The class can optionally define the following methods:
  • A writeObject method to control what information is saved or to append additional information to the stream
  • A readObject method either to read the information written by the corresponding writeObject method or to update the state of the object after it has been restored
  • A writeReplace method to allow a class to nominate a replacement object to be written to the stream
(See Section 2.5, "The writeReplace Method" for additional information.)
  • A readResolve method to allow a class to designate a replacement object for the object just read from the stream
(See Section 3.7, "The readResolve Method" for additional information.)
ObjectOutputStream and ObjectInputStream allow the serializable classes on which they operate to evolve (allow changes to the classes that are compatible with the earlier versions of the classes). See Section 5.5, "Compatible JavaTM Type Evolution" for information about the mechanism which is used to allow compatible changes.
Note - Serialization of inner classes (i.e., nested classes that are not static member classes), including local and anonymous classes, is strongly discouraged for several reasons. Because inner classes declared in non-static contexts contain implicit non-transient references to enclosing class instances, serializing such an inner class instance will result in serialization of its associated outer class instance as well. Synthetic fields generated by javac (or other JavaTM compilers) to implement inner classes are implementation dependent and may vary between compilers; differences in such fields can disrupt compatibility as well as result in conflicting default serialVersionUID values. The names assigned to local and anonymous inner classes are also implementation dependent and may differ between compilers. Since inner classes cannot declare static members other than compile-time constant fields, they cannot use the serialPersistentFields mechanism to designate serializable fields. Finally, because inner classes associated with outer instances do not have zero-argument constructors (constructors of such inner classes implicitly accept the enclosing instance as a prepended parameter), they cannot implement Externalizable. None of the issues listed above, however, apply to static member classes.

1.11 The Externalizable Interface

For Externalizable objects, only the identity of the class of the object is saved by the container; the class must save and restore the contents. The Externalizable interface is defined as follows:

package java.io;

public interface Externalizable extends Serializable
{
    public void writeExternal(ObjectOutput out)
        throws IOException;

    public void readExternal(ObjectInput in)
        throws IOException, java.lang.ClassNotFoundException;
}
The class of an Externalizable object must do the following:
  • Implement the java.io.Externalizable interface
  • Implement a writeExternal method to save the state of the object
(It must explicitly coordinate with its supertype to save its state.)
  • Implement a readExternal method to read the data written by the writeExternal method from the stream and restore the state of the object
(It must explicitly coordinate with the supertype to save its state.)
  • Have the writeExternal and readExternal methods be solely responsible for the format, if an externally defined format is written
Note - The writeExternal and readExternal methods are public and raise the risk that a client may be able to write or read information in the object other than by using its methods and fields. These methods must be used only when the information held by the object is not sensitive or when exposing it does not present a security risk.
  • Have a public no-arg constructor
Note - Inner classes associated with enclosing instances cannot have no-arg constructors, since constructors of such classes implicitly accept the enclosing instance as a prepended parameter. Consequently the Externalizable interface mechanism cannot be used for inner classes and they should implement the Serializable interface, if they must be serialized. Several limitations exist for serializable inner classes as well, however; see Section 1.10, "The Serializable Interface", for a full enumeration.
An Externalizable class can optionally define the following methods:
  • A writeReplace method to allow a class to nominate a replacement object to be written to the stream
(See Section 2.5, "The writeReplace Method" for additional information.)
  • A readResolve method to allow a class to designate a replacement object for the object just read from the stream
(See Section 3.7, "The readResolve Method" for additional information.)

1.12 Serialization of Enum Constants

Enum constants are serialized differently than ordinary serializable or externalizable objects. The serialized form of an enum constant consists solely of its name; field values of the constant are not present in the form. To serialize an enum constant, ObjectOutputStream writes the value returned by the enum constant's name method. To deserialize an enum constant, ObjectInputStream reads the constant name from the stream; the deserialized constant is then obtained by calling the java.lang.Enum.valueOf method, passing the constant's enum type along with the received constant name as arguments. Like other serializable or externalizable objects, enum constants can function as the targets of back references appearing subsequently in the serialization stream.

The process by which enum constants are serialized cannot be customized: any class-specific writeObject, readObject, readObjectNoData, writeReplace, and readResolve methods defined by enum types are ignored during serialization and deserialization. Similarly, any serialPersistentFields or serialVersionUID field declarations are also ignored--all enum types have a fixed serialVersionUID of 0L. Documenting serializable fields and data for enum types is unnecessary, since there is no variation in the type of data sent.

1.13 Protecting Sensitive Information

When developing a class that provides controlled access to resources, care must be taken to protect sensitive information and functions. During deserialization, the private state of the object is restored. For example, a file descriptor contains a handle that provides access to an operating system resource. Being able to forge a file descriptor would allow some forms of illegal access, since restoring state is done from a stream. Therefore, the serializing runtime must take the conservative approach and not trust the stream to contain only valid representations of objects. To avoid compromising a class, the sensitive state of an object must not be restored from the stream, or it must be reverified by the class. Several techniques are available to protect sensitive data in classes.

The easiest technique is to mark fields that contain sensitive data as private transient. Transient fields are not persistent and will not be saved by any persistence mechanism. Marking the field will prevent the state from appearing in the stream and from being restored during deserialization. Since writing and reading (of private fields) cannot be superseded outside of the class, the transient fields of the class are safe.

Particularly sensitive classes should not be serialized at all. To accomplish this, the object should not implement either the Serializable or the Externalizable interface.

Some classes may find it beneficial to allow writing and reading but specifically handle and revalidate the state as it is deserialized. The class should implement writeObject and readObject methods to save and restore only the appropriate state. If access should be denied, throwing a NotSerializableException will prevent further access.

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


2 - Object Output Classes

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Object Output Classes

CHAPTER 2

Topics:

  • The ObjectOutputStream Class
  • The ObjectOutputStream.PutField Class
  • The writeObject Method
  • The writeExternal Method
  • The writeReplace Method
  • The useProtocolVersion Method

2.1 The ObjectOutputStream Class

Class ObjectOutputStream implements object serialization. It maintains the state of the stream including the set of objects already serialized. Its methods control the traversal of objects to be serialized to save the specified objects and the objects to which they refer.

package java.io;

public class ObjectOutputStream
    extends OutputStream
    implements ObjectOutput, ObjectStreamConstants
{
    public ObjectOutputStream(OutputStream out)
        throws IOException;

    public final void writeObject(Object obj)
        throws IOException;

    public void writeUnshared(Object obj)
        throws IOException;

    public void defaultWriteObject()
        throws IOException, NotActiveException;

    public PutField putFields()
        throws IOException;

    public writeFields()
        throws IOException;

    public void reset() throws IOException;

    protected void annotateClass(Class cl) throws IOException;

    protected void writeClassDescriptor(ObjectStreamClass desc)
        throws IOException;

    protected Object replaceObject(Object obj) throws IOException;

    protected boolean enableReplaceObject(boolean enable)
        throws SecurityException;

    protected void writeStreamHeader() throws IOException;

    public void write(int data) throws IOException;

    public void write(byte b[]) throws IOException;

    public void write(byte b[], int off, int len) throws IOException;

    public void flush() throws IOException;

    protected void drain() throws IOException;

    public void close() throws IOException;

    public void writeBoolean(boolean data) throws IOException;

    public void writeByte(int data) throws IOException;

    public void writeShort(int data) throws IOException;

    public void writeChar(int data) throws IOException;

    public void writeInt(int data) throws IOException;

    public void writeLong(long data) throws IOException;

    public void writeFloat(float data) throws IOException;

    public void writeDouble(double data) throws IOException;

    public void writeBytes(String data) throws IOException;

    public void writeChars(String data) throws IOException;

    public void writeUTF(String data) throws IOException;

    // Inner class to provide access to serializable fields.
    abstract static public class PutField
    {
        public void put(String name, boolean value)
            throws IOException, IllegalArgumentException;

        public void put(String name, char data)
            throws IOException, IllegalArgumentException;

        public void put(String name, byte data)
            throws IOException, IllegalArgumentException;

        public void put(String name, short data)
            throws IOException, IllegalArgumentException;

        public void put(String name, int data)
            throws IOException, IllegalArgumentException;

        public void put(String name, long data)
            throws IOException, IllegalArgumentException;

        public void put(String name, float data)
            throws IOException, IllegalArgumentException;

        public void put(String name, double data)
            throws IOException, IllegalArgumentException;

        public void put(String name, Object data)
            throws IOException, IllegalArgumentException;
    }

    public void useProtocolVersion(int version) throws IOException;

    protected ObjectOutputStream()
        throws IOException;

     protected writeObjectOverride()
        throws NotActiveException, IOException;
}
The single-argument ObjectOutputStream constructor creates an ObjectOutputStream that serializes objects to the given OutputStream. The constructor calls writeStreamHeader to write a magic number and version to the stream that will be read and verified by a corresponding call to readStreamHeader in the single-argument ObjectInputStream constructor. If a security manager is installed, this constructor checks for the "enableSubclassImplementation" SerializablePermission when invoked directly or indirectly by the constructor of a subclass which overrides the putFields and/or writeUnshared methods.

The writeObject method is used to serialize an object to the stream. An object is serialized as follows:

1. If a subclass is overriding the implementation, call the writeObjectOverride method and return. Overriding the implementation is described at the end of this section.
2. If there is data in the block-data buffer, the data is written to the stream and the buffer is reset.
3. If the object is null, null is put in the stream and writeObject returns.
4. If the object has been previously replaced, as described in Step 8, write the handle of the replacement to the stream and writeObject returns.
5. If the object has already been written to the stream, its handle is written to the stream and writeObject returns.
6. If the object is a Class, the corresponding ObjectStreamClass is written to the stream, a handle is assigned for the class, and writeObject returns.
7. If the object is an ObjectStreamClass, a handle is assigned to the object, after which it is written to the stream using one of the class descriptor formats described in section 4.3. In versions 1.3 and later of the Java 2 SDK, Standard Edition, the writeClassDescriptor method is called to output the ObjectStreamClass if it represents a class that is not a dynamic proxy class, as determined by passing the associated Class object to the isProxyClass method of java.lang.reflect.Proxy. Afterwards, an annotation for the represented class is written: if the class is a dynamic proxy class, then the annotateProxyClass method is called; otherwise, the annotateClass method is called. The writeObject method then returns.
8. Process potential substitutions by the class of the object and/or by a subclass of ObjectInputStream.
a. If the class of an object is not an enum type and defines the appropriate writeReplace method, the method is called. Optionally, it can return a substitute object to be serialized.
b. Then, if enabled by calling the enableReplaceObject method, the replaceObject method is called to allow subclasses of ObjectOutputStream to substitute for the object being serialized. If the original object was replaced in the previous step, the replaceObject method is called with the replacement object.
If the original object was replaced by either one or both steps above, the mapping from the original object to the replacement is recorded for later use in Step 4. Then, Steps 3 through 7 are repeated on the new object.
If the replacement object is not one of the types covered by Steps 3 through 7, processing resumes using the replacement object at Step 10.
9. If the object is a java.lang.String, the string is written as length information followed by the contents of the string encoded in modified UTF-8. For details, refer to Section 6.2, "Stream Elements". A handle is assigned to the string, and writeObject returns.
10. If the object is an array, writeObject is called recursively to write the ObjectStreamClass of the array. The handle for the array is assigned. It is followed by the length of the array. Each element of the array is then written to the stream, after which writeObject returns.
11. If the object is an enum constant, the ObjectStreamClass for the enum type of the constant is written by recursively calling writeObject. It will appear in the stream only the first time it is referenced. A handle is assigned for the enum constant. Next, the value returned by the name method of the enum constant is written as a String object, as described in step 9. Note that if the same name string has appeared previously in the stream, a back reference to it will be written. The writeObject method then returns.
12. For regular objects, the ObjectStreamClass for the class of the object is written by recursively calling writeObject. It will appear in the stream only the first time it is referenced. A handle is assigned for the object.
13. The contents of the object are written to the stream.
a. If the object is serializable, the highest serializable class is located. For that class, and each derived class, that class's fields are written. If the class does not have a writeObject method, the defaultWriteObject method is called to write the serializable fields to the stream. If the class does have a writeObject method, it is called. It may call defaultWriteObject or putFields and writeFields to save the state of the object, and then it can write other information to the stream.
b. If the object is externalizable, the writeExternal method of the object is called.
c. If the object is neither serializable or externalizable, the NotSerializableException is thrown.

Exceptions may occur during the traversal or may occur in the underlying stream. For any subclass of IOException, the exception is written to the stream using the exception protocol and the stream state is discarded. If a second IOException is thrown while attempting to write the first exception into the stream, the stream is left in an unknown state and StreamCorruptedException is thrown from writeObject. For other exceptions, the stream is aborted and left in an unknown and unusable state.

The writeUnshared method writes an "unshared" object to the ObjectOutputStream. This method is identical to writeObject, except that it always writes the given object as a new, unique object in the stream (as opposed to a back-reference pointing to a previously serialized instance). Specifically:
  • An object written via writeUnshared is always serialized in the same manner as a newly appearing object (an object that has not been written to the stream yet), regardless of whether or not the object has been written previously.
  • If writeObject is used to write an object that has been previously written with writeUnshared, the previous writeUnshared operation is treated as if it were a write of a separate object. In other words, ObjectOutputStream will never generate back-references to object data written by calls to writeUnshared.
While writing an object via writeUnshared does not in itself guarantee a unique reference to the object when it is deserialized, it allows a single object to be defined multiple times in a stream, so that multiple calls to the ObjectInputStream.readUnshared method (see Section 3.1, "The ObjectInputStream Class") by the receiver will not conflict. Note that the rules described above only apply to the base-level object written with writeUnshared, and not to any transitively referenced sub-objects in the object graph to be serialized.

The defaultWriteObject method implements the default serialization mechanism for the current class. This method may be called only from a class's writeObject method. The method writes all of the serializable fields of the current class to the stream. If called from outside the writeObject method, the NotActiveException is thrown.

The putFields method returns a PutField object the caller uses to set the values of the serializable fields in the stream. The fields may be set in any order. After all of the fields have been set, writeFields must be called to write the field values in the canonical order to the stream. If a field is not set, the default value appropriate for its type will be written to the stream. This method may only be called from within the writeObject method of a serializable class. It may not be called more than once or if defaultWriteObject has been called. Only after writeFields has been called can other data be written to the stream.

The reset method resets the stream state to be the same as if it had just been constructed. Reset will discard the state of any objects already written to the stream. The current point in the stream is marked as reset, so the corresponding ObjectInputStream will reset at the same point. Objects previously written to the stream will not be remembered as already having been written to the stream. They will be written to the stream again. This is useful when the contents of an object or objects must be sent again. Reset may not be called while objects are being serialized. If called inappropriately, an IOException is thrown.

Starting with the Java 2 SDK, Standard Edition, v1.3, the writeClassDescriptor method is called when an ObjectStreamClass needs to be serialized. writeClassDescriptor is responsible for writing a representation of the ObjectStreamClass to the serialization stream. Subclasses may override this method to customize the way in which class descriptors are written to the serialization stream. If this method is overridden, then the corresponding readClassDescriptor method in ObjectInputStream should also be overridden to reconstitute the class descriptor from its custom stream representation. By default, writeClassDescriptor writes class descriptors according to the format specified in Section 6.4, "Grammar for the Stream Format". Note that this method will only be called if the ObjectOutputStream is not using the old serialization stream format (see Section 6.3, "Stream Protocol Versions"). If the serialization stream is using the old format (ObjectStreamConstants.PROTOCOL_VERSION_1), the class descriptor will be written internally in a manner that cannot be overridden or customized.

The annotateClass method is called while a Class is being serialized, and after the class descriptor has been written to the stream. Subclasses may extend this method and write other information to the stream about the class. This information must be read by the resolveClass method in a corresponding ObjectInputStream subclass.

An ObjectOutputStream subclass can implement the replaceObject method to monitor or replace objects during serialization. Replacing objects must be enabled explicitly by calling enableReplaceObject before calling writeObject with the first object to be replaced. Once enabled, replaceObject is called for each object just prior to serializing the object for the first time. Note that the replaceObject method is not called for objects of the specially handled classes, Class and ObjectStreamClass. An implementation of a subclass may return a substitute object that will be serialized instead of the original. The substitute object must be serializable. All references in the stream to the original object will be replaced by the substitute object.

When objects are being replaced, the subclass must ensure that the substituted object is compatible with every field where the reference will be stored, or that a complementary substitution will be made during deserialization. Objects, whose type is not a subclass of the type of the field or array element, will later abort the deserialization by raising a ClassCastException and the reference will not be stored.

The enableReplaceObject method can be called by trusted subclasses of ObjectOutputStream to enable the substitution of one object for another during serialization. Replacing objects is disabled until enableReplaceObject is called with a true value. It may thereafter be disabled by setting it to false. The previous setting is returned. The enableReplaceObject method checks that the stream requesting the replacement can be trusted. To ensure that the private state of objects is not unintentionally exposed, only trusted stream subclasses may use replaceObject. Trusted classes are those classes that belong to a security protection domain with permission to enable Serializable substitution.

If the subclass of ObjectOutputStream is not considered part of the system domain, SerializablePermission "enableSubstitution" must be added to the security policy file. AccessControlException is thrown if the protection domain of the subclass of ObjectInputStream does not have permission to "enableSubstitution" by calling enableReplaceObject. See the document Java Security Architecture (JDK1.2) for additional information about the security model.

The writeStreamHeader method writes the magic number and version to the stream. This information must be read by the readStreamHeader method of ObjectInputStream. Subclasses may need to implement this method to identify the stream's unique format.

The flush method is used to empty any buffers being held by the stream and to forward the flush to the underlying stream. The drain method may be used by subclassers to empty only the ObjectOutputStream's buffers without forcing the underlying stream to be flushed.

All of the write methods for primitive types encode their values using a DataOutputStream to put them in the standard stream format. The bytes are buffered into block data records so they can be distinguished from the encoding of objects. This buffering allows primitive data to be skipped if necessary for class versioning. It also allows the stream to be parsed without invoking class-specific methods.

To override the implementation of serialization, the subclass of ObjectOutputStream should call the protected no-arg ObjectOutputStream, constructor. There is a security check within the no-arg constructor for SerializablePermission "enableSubclassImplementation" to ensure that only trusted classes are allowed to override the default implementation. This constructor does not allocate any private data for ObjectOutputStream and sets a flag that indicates that the final writeObject method should invoke the writeObjectOverride method and return. All other ObjectOutputStream methods are not final and can be directly overridden by the subclass.

2.2 The ObjectOutputStream.PutField Class

Class PutField provides the API for setting values of the serializable fields for a class when the class does not use default serialization. Each method puts the specified named value into the stream. An IllegalArgumentException is thrown if name does not match the name of a serializable field for the class whose fields are being written, or if the type of the named field does not match the second parameter type of the specific put method invoked.

2.3 The writeObject Method

For serializable objects, the writeObject method allows a class to control the serialization of its own fields. Here is its signature:

    private void writeObject(ObjectOutputStream stream)
        throws IOException;
Each subclass of a serializable object may define its own writeObject method. If a class does not implement the method, the default serialization provided by defaultWriteObject will be used. When implemented, the class is only responsible for writing its own fields, not those of its supertypes or subtypes.

The class's writeObject method, if implemented, is responsible for saving the state of the class. Either ObjectOutputStream's defaultWriteObject or writeFields method must be called once (and only once) before writing any optional data that will be needed by the corresponding readObject method to restore the state of the object; even if no optional data is written, defaultWriteObject or writeFields must still be invoked once. If defaultWriteObject or writeFields is not invoked once prior to the writing of optional data (if any), then the behavior of instance deserialization is undefined in cases where the ObjectInputStream cannot resolve the class which defined the writeObject method in question.

The responsibility for the format, structure, and versioning of the optional data lies completely with the class.

2.4 The writeExternal Method

Objects implementing java.io.Externalizable must implement the writeExternal method to save the entire state of the object. It must coordinate with its superclasses to save their state. All of the methods of ObjectOutput are available to save the object's primitive typed fields and object fields.

    public void writeExternal(ObjectOutput stream)
        throws IOException;

A new default format for writing Externalizable data has been introduced in JDK 1.2. The new format specifies that primitive data will be written in block data mode by writeExternal methods. Additionally, a tag denoting the end of the External object is appended to the stream after the writeExternal method returns. The benefits of this format change are discussed in Section 3.6, "The readExternal Method." Compatibility issues caused by this change are discussed in Section 2.6, "The useProtocolVersion Method."

2.5 The writeReplace Method

For Serializable and Externalizable classes, the writeReplace method allows a class of an object to nominate its own replacement in the stream before the object is written. By implementing the writeReplace method, a class can directly control the types and instances of its own instances being serialized.

The method is defined as follows:

   ANY-ACCESS-MODIFIER Object writeReplace() {
                 throws ObjectStreamException;

The writeReplace method is called when ObjectOutputStream is preparing to write the object to the stream. The ObjectOutputStream checks whether the class defines the writeReplace method. If the method is defined, the writeReplace method is called to allow the object to designate its replacement in the stream. The object returned should be either of the same type as the object passed in or an object that when read and resolved will result in an object of a type that is compatible with all references to the object. If it is not, a ClassCastException will occur when the type mismatch is discovered.

2.6 The useProtocolVersion Method

Due to a stream protocol change that was not backwards compatible, a mechanism has been added to enable the current Virtual Machine to write a serialization stream that is readable by a previous release. Of course, the problems that are corrected by the new stream format will exist when using the backwards compatible protocol.

Stream protocol versions are discussed in Section 6.3, "Stream Protocol Versions."

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


3 - Object Input Classes

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Object Input Classes

CHAPTER 3

Topics:

  • The ObjectInputStream Class
  • The ObjectInputStream.GetField Class
  • The ObjectInputValidation Interface
  • The readObject Method
  • The readExternal Method
  • The readResolve Method

3.1 The ObjectInputStream Class

Class ObjectInputStream implements object deserialization. It maintains the state of the stream including the set of objects already deserialized. Its methods allow primitive types and objects to be read from a stream written by ObjectOutputStream. It manages restoration of the object and the objects that it refers to from the stream.

package java.io;

public class ObjectInputStream
    extends InputStream
    implements ObjectInput, ObjectStreamConstants
{
    public ObjectInputStream(InputStream in)
        throws StreamCorruptedException, IOException;

    public final Object readObject()
        throws OptionalDataException, ClassNotFoundException,
            IOException;

    public Object readUnshared()
        throws OptionalDataException, ClassNotFoundException,
            IOException;

    public void defaultReadObject()
        throws IOException, ClassNotFoundException,
            NotActiveException;

    public GetField readFields()
        throws IOException;

    public synchronized void registerValidation(
        ObjectInputValidation obj, int prio)
        throws NotActiveException, InvalidObjectException;

    protected ObjectStreamClass readClassDescriptor()
        throws IOException, ClassNotFoundException;

    protected Class resolveClass(ObjectStreamClass v)
        throws IOException, ClassNotFoundException;

    protected Object resolveObject(Object obj)
        throws IOException;

    protected boolean enableResolveObject(boolean enable)
        throws SecurityException;

    protected void readStreamHeader()
        throws IOException, StreamCorruptedException;

    public int read() throws IOException;

    public int read(byte[] data, int offset, int length)
        throws IOException

    public int available() throws IOException;

    public void close() throws IOException;

    public boolean readBoolean() throws IOException;

    public byte readByte() throws IOException;

    public int readUnsignedByte() throws IOException;

    public short readShort() throws IOException;

    public int readUnsignedShort() throws IOException;

    public char readChar() throws IOException;

    public int readInt() throws IOException;

    public long readLong() throws IOException;

    public float readFloat() throws IOException;

    public double readDouble() throws IOException;

    public void readFully(byte[] data) throws IOException;

    public void readFully(byte[] data, int offset, int size)
        throws IOException;

    public int skipBytes(int len) throws IOException;

    public String readLine() throws IOException;

    public String readUTF() throws IOException;

    // Class to provide access to serializable fields.
    static abstract public class GetField
    {
        public ObjectStreamClass getObjectStreamClass();

        public boolean defaulted(String name)
            throws IOException, IllegalArgumentException;

        public char get(String name, char default)
            throws IOException, IllegalArgumentException;

        public boolean get(String name, boolean default)
            throws IOException, IllegalArgumentException;

        public byte get(String name, byte default)
            throws IOException, IllegalArgumentException;

        public short get(String name, short default)
            throws IOException, IllegalArgumentException;

        public int get(String name, int default)
            throws IOException, IllegalArgumentException;

        public long get(String name, long default)
            throws IOException, IllegalArgumentException;

        public float get(String name, float default)
            throws IOException, IllegalArgumentException;

        public double get(String name, double default)
            throws IOException, IllegalArgumentException;

        public Object get(String name, Object default)
            throws IOException, IllegalArgumentException;
    }

    protected ObjectInputStream()
        throws StreamCorruptedException, IOException;

    protected readObjectOverride()
        throws OptionalDataException, ClassNotFoundException,
            IOException;
}

The single-argument ObjectInputStream constructor requires an InputStream. The constructor calls readStreamHeader to read and verifies the header and version written by the corresponding ObjectOutputStream.writeStreamHeader method. If a security manager is installed, this constructor checks for the "enableSubclassImplementation" SerializablePermission when invoked directly or indirectly by the constructor of a subclass which overrides the readFields and/or readUnshared methods.

Note - The ObjectInputStream constructor blocks until it completes reading the serialization stream header. Code which waits for an ObjectInputStream to be constructed before creating the corresponding ObjectOutputStream for that stream will deadlock, since the ObjectInputStream constructor will block until a header is written to the stream, and the header will not be written to the stream until the ObjectOutputStream constructor executes. This problem can be resolved by creating the ObjectOutputStream before the ObjectInputStream, or otherwise removing the timing dependency between completion of ObjectInputStream construction and the creation of the ObjectOutputStream.
The readObject method is used to deserialize an object from the stream. It reads from the stream to reconstruct an object.

1. If the ObjectInputStream subclass is overriding the implementation, call the readObjectOverride method and return. Reimplementation is described at the end of this section.
2. If a block data record occurs in the stream, throw a BlockDataException with the number of available bytes.
3. If the object in the stream is null, return null.
4. If the object in the stream is a handle to a previous object, return the object.
5. If the object in the stream is a Class, read its ObjectStreamClass descriptor, add it and its handle to the set of known objects, and return the corresponding Class object.
6. If the object in the stream is an ObjectStreamClass, read in its data according to the formats described in section 4.3. Add it and its handle to the set of known objects. In versions 1.3 and later of the Java 2 SDK, Standard Edition, the readClassDescriptor method is called to read in the ObjectStreamClass if it represents a class that is not a dynamic proxy class, as indicated in the stream data. If the class descriptor represents a dynamic proxy class, call the resolveProxyClass method on the stream to get the local class for the descriptor; otherwise, call the resolveClass method on the stream to get the local class. If the class cannot be resolved, throw a ClassNotFoundException. Return the resulting ObjectStreamClass object.
7. If the object in the stream is a String, read its length information followed by the contents of the string encoded in modified UTF-8. For details, refer to Section 6.2, "Stream Elements". Add the String and its handle to the set of known objects, and proceed to Step 12.
8. If the object in the stream is an array, read its ObjectStreamClass and the length of the array. Allocate the array, and add it and its handle in the set of known objects. Read each element using the appropriate method for its type and assign it to the array. Proceed to Step 12.
9. If the object in the stream is an enum constant, read its ObjectStreamClass and the enum constant name. If the ObjectStreamClass represents a class that is not an enum type, an InvalidClassException is thrown. Obtain a reference to the enum constant by calling the java.lang.Enum.valueOf method, passing the enum type bound to the received ObjectStreamClass along with the received name as arguments. If the valueOf method throws an IllegalArgumentException, an InvalidObjectException is thrown with the IllegalArgumentException as its cause. Add the enum constant and its handle in the set of known objects, and proceed to Step 12.
10. For all other objects, the ObjectStreamClass of the object is read from the stream. The local class for that ObjectStreamClass is retrieved. The class must be serializable or externalizable, and must not be an enum type. If the class does not satisfy these criteria, an InvalidClassException is thrown.
11. An instance of the class is allocated. The instance and its handle are added to the set of known objects. The contents restored appropriately:
a. For serializable objects, the no-arg constructor for the first non-serializable supertype is run. For serializable classes, the fields are initialized to the default value appropriate for its type. Then the fields of each class are restored by calling class-specific readObject methods, or if these are not defined, by calling the defaultReadObject method. Note that field initializers and constructors are not executed for serializable classes during deserialization. In the normal case, the version of the class that wrote the stream will be the same as the class reading the stream. In this case, all of the supertypes of the object in the stream will match the supertypes in the currently-loaded class. If the version of the class that wrote the stream had different supertypes than the loaded class, the ObjectInputStream must be more careful about restoring or initializing the state of the differing classes. It must step through the classes, matching the available data in the stream with the classes of the object being restored. Data for classes that occur in the stream, but do not occur in the object, is discarded. For classes that occur in the object, but not in the stream, the class fields are set to default values by default serialization.
b. For externalizable objects, the no-arg constructor for the class is run and then the readExternal method is called to restore the contents of the object.
12. Process potential substitutions by the class of the object and/or by a subclass of ObjectInputStream:
a. If the class of the object is not an enum type and defines the appropriate readResolve method, the method is called to allow the object to replace itself.
b. Then if previously enabled by enableResolveObject, the resolveObject method is called to allow subclasses of the stream to examine and replace the object. If the previous step did replace the original object, the resolveObject method is called with the replacement object.
If a replacement took place, the table of known objects is updated so the replacement object is associated with the handle. The replacement object is then returned from readObject.

All of the methods for reading primitives types only consume bytes from the block data records in the stream. If a read for primitive data occurs when the next item in the stream is an object, the read methods return -1 or the EOFException as appropriate. The value of a primitive type is read by a DataInputStream from the block data record.

The exceptions thrown reflect errors during the traversal or exceptions that occur on the underlying stream. If any exception is thrown, the underlying stream is left in an unknown and unusable state.

When the reset token occurs in the stream, all of the state of the stream is discarded. The set of known objects is cleared.

When the exception token occurs in the stream, the exception is read and a new WriteAbortedException is thrown with the terminating exception as an argument. The stream context is reset as described earlier.

The readUnshared method is used to read "unshared" objects from the stream. This method is identical to readObject, except that it prevents subsequent calls to readObject and readUnshared from returning additional references to the deserialized instance returned by the original call to readUnshared. Specifically:

  • If readUnshared is called to deserialize a back-reference (the stream representation of an object which has been written previously to the stream), an ObjectStreamException will be thrown.
  • If readUnshared returns successfully, then any subsequent attempts to deserialize back-references to the stream handle deserialized by readUnshared will cause an ObjectStreamException to be thrown.
Deserializing an object via readUnshared invalidates the stream handle associated with the returned object. Note that this in itself does not always guarantee that the reference returned by readUnshared is unique; the deserialized object may define a readResolve method which returns an object visible to other parties, or readUnshared may return a Class object or enum constant obtainable elsewhere in the stream or through external means. If the deserialized object defines a readResolve method and the invocation of that method returns an array, then readUnshared returns a shallow clone of that array; this guarantees that the returned array object is unique and cannot be obtained a second time from an invocation of readObject or readUnshared on the ObjectInputStream, even if the underlying data stream has been manipulated.

The defaultReadObject method is used to read the fields and object from the stream. It uses the class descriptor in the stream to read the fields in the canonical order by name and type from the stream. The values are assigned to the matching fields by name in the current class. Details of the versioning mechanism can be found in Section 5.5, "Compatible Java Type Evolution." Any field of the object that does not appear in the stream is set to its default value. Values that appear in the stream, but not in the object, are discarded. This occurs primarily when a later version of a class has written additional fields that do not occur in the earlier version. This method may only be called from the readObject method while restoring the fields of a class. When called at any other time, the NotActiveException is thrown.

The readFields method reads the values of the serializable fields from the stream and makes them available via the GetField class. The readFields method is only callable from within the readObject method of a serializable class. It cannot be called more than once or if defaultReadObject has been called. The GetFields object uses the current object's ObjectStreamClass to verify the fields that can be retrieved for this class. The GetFields object returned by readFields is only valid during this call to the classes readObject method. The fields may be retrieved in any order. Additional data may only be read directly from stream after readFields has been called.

The registerValidation method can be called to request a callback when the entire graph has been restored but before the object is returned to the original caller of readObject. The order of validate callbacks can be controlled using the priority. Callbacks registered with higher values are called before those with lower values. The object to be validated must support the ObjectInputValidation interface and implement the validateObject method. It is only correct to register validations during a call to a class's readObject method. Otherwise, a NotActiveException is thrown. If the callback object supplied to registerValidation is null, an InvalidObjectException is thrown.

Starting with the Java SDK, Standard Edition, v1.3, the readClassDescriptor method is used to read in all ObjectStreamClass objects. readClassDescriptor is called when the ObjectInputStream expects a class descriptor as the next item in the serialization stream. Subclasses of ObjectInputStream may override this method to read in class descriptors that have been written in non-standard formats (by subclasses of ObjectOutputStream which have overridden the writeClassDescriptor method). By default, this method reads class descriptors according to the format described in Section 6.4, "Grammar for the Stream Format".

The resolveClass method is called while a class is being deserialized, and after the class descriptor has been read. Subclasses may extend this method to read other information about the class written by the corresponding subclass of ObjectOutputStream. The method must find and return the class with the given name and serialVersionUID. The default implementation locates the class by calling the class loader of the closest caller of readObject that has a class loader. If the class cannot be found ClassNotFoundException should be thrown. Prior to JDK 1.1.6, the resolveClass method was required to return the same fully qualified class name as the class name in the stream. In order to accommodate package renaming across releases, method resolveClass only needs to return a class with the same base class name and SerialVersionUID in JDK 1.1.6 and later versions.

The resolveObject method is used by trusted subclasses to monitor or substitute one object for another during deserialization. Resolving objects must be enabled explicitly by calling enableResolveObject before calling readObject for the first object to be resolved. Once enabled, resolveObject is called once for each serializable object just prior to the first time it is being returned from readObject. Note that the resolveObject method is not called for objects of the specially handled classes, Class, ObjectStreamClass, String, and arrays. A subclass's implementation of resolveObject may return a substitute object that will be assigned or returned instead of the original. The object returned must be of a type that is consistent and assignable to every reference of the original object or else a ClassCastException will be thrown. All assignments are type-checked. All references in the stream to the original object will be replaced by references to the substitute object.

The enableResolveObject method is called by trusted subclasses of ObjectOutputStream to enable the monitoring or substitution of one object for another during deserialization. Replacing objects is disabled until enableResolveObject is called with a true value. It may thereafter be disabled by setting it to false. The previous setting is returned. The enableResolveObject method checks if the stream has permission to request substitution during serialization. To ensure that the private state of objects is not unintentionally exposed, only trusted streams may use resolveObject. Trusted classes are those classes with a class loader equal to null or belong to a security protection domain that provides permission to enable substitution.

If the subclass of ObjectInputStream is not considered part of the system domain, a line has to be added to the security policy file to provide to a subclass of ObjectInputStream permission to call enableResolveObject. The SerializablePermission to add is "enableSubstitution". AccessControlException is thrown if the protection domain of the subclass of ObjectStreamClass does not have permission to "enableSubstitution" by calling enableResolveObject. See the document Java Security Architecture (JDK 1.2) for additional information about the security model.

The readStreamHeader method reads and verifies the magic number and version of the stream. If they do not match, the StreamCorruptedMismatch is thrown.

To override the implementation of deserialization, a subclass of ObjectInputStream should call the protected no-arg ObjectInputStream, constructor. There is a security check within the no-arg constructor for SerializablePermission "enableSubclassImplementation" to ensure that only trusted classes are allowed to override the default implementation. This constructor does not allocate any private data for ObjectInputStream and sets a flag that indicates that the final readObject method should invoke the readObjectOverride method and return. All other ObjectInputStream methods are not final and can be directly overridden by the subclass.

3.2 The ObjectInputStream.GetField Class

The class ObjectInputStream.GetField provides the API for getting the values of serializable fields. The protocol of the stream is the same as used by defaultReadObject. Using readFields to access the serializable fields does not change the format of the stream. It only provides an alternate API to access the values which does not require the class to have the corresponding non-transient and non-static fields for each named serializable field. The serializable fields are those declared using serialPersistentFields or if it is not declared the non-transient and non-static fields of the object. When the stream is read the available serializable fields are those written to the stream when the object was serialized. If the class that wrote the stream is a different version not all fields will correspond to the serializable fields of the current class. The available fields can be retrieved from the ObjectStreamClass of the GetField object.

The getObjectStreamClass method returns an ObjectStreamClass object representing the class in the stream. It contains the list of serializable fields.

The defaulted method returns true if the field is not present in the stream. An IllegalArgumentException is thrown if the requested field is not a serializable field of the current class.

Each get method returns the specified serializable field from the stream. I/O exceptions will be thrown if the underlying stream throws an exception. An IllegalArgumentException is thrown if the name or type does not match the name and type of an field serializable field of the current class. The default value is returned if the stream does not contain an explicit value for the field.

3.3 The ObjectInputValidation Interface

This interface allows an object to be called when a complete graph of objects has been deserialized. If the object cannot be made valid, it should throw the ObjectInvalidException. Any exception that occurs during a call to validateObject will terminate the validation process, and the InvalidObjectException will be thrown.

package java.io;

public interface ObjectInputValidation
{
    public void validateObject()
        throws InvalidObjectException;
}

3.4 The readObject Method

For serializable objects, the readObject method allows a class to control the deserialization of its own fields. Here is its signature:

    private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException;
Each subclass of a serializable object may define its own readObject method. If a class does not implement the method, the default serialization provided by defaultReadObject will be used. When implemented, the class is only responsible for restoring its own fields, not those of its supertypes or subtypes.

The readObject method of the class, if implemented, is responsible for restoring the state of the class. The values of every field of the object whether transient or not, static or not are set to the default value for the fields type. Either ObjectInputStream's defaultReadObject or readFields method must be called once (and only once) before reading any optional data written by the corresponding writeObject method; even if no optional data is read, defaultReadObject or readFields must still be invoked once. If the readObject method of the class attempts to read more data than is present in the optional part of the stream for this class, the stream will return -1 for bytewise reads, throw an EOFException for primitive data reads (e.g., readInt, readFloat), or throw an OptionalDataException with the eof field set to true for object reads.

The responsibility for the format, structure, and versioning of the optional data lies completely with the class. The @serialData javadoc tag within the javadoc comment for the readObject method should be used to document the format and structure of the optional data.

If the class being restored is not present in the stream being read, then its readObjectNoData method, if defined, is invoked (instead of readObject); otherwise, its fields are initialized to the appropriate default values. For further detail, see section 3.5.

Reading an object from the ObjectInputStream is analogous to creating a new object. Just as a new object's constructors are invoked in the order from the superclass to the subclass, an object being read from a stream is deserialized from superclass to subclass. The readObject or readObjectNoData method is called instead of the constructor for each Serializable subclass during deserialization.

One last similarity between a constructor and a readObject method is that both provide the opportunity to invoke a method on an object that is not fully constructed. Any overridable (neither private, static nor final) method called while an object is being constructed can potentially be overridden by a subclass. Methods called during the construction phase of an object are resolved by the actual type of the object, not the type currently being initialized by either its constructor or readObject/readObjectNoData method. Therefore, calling an overridable method from within a readObject or readObjectNoData method may result in the unintentional invocation of a subclass method before the superclass has been fully initialized.

3.5 The readObjectNoData Method

For serializable objects, the readObjectNoData method allows a class to control the initialization of its own fields in the event that a subclass instance is deserialized and the serialization stream does not list the class in question as a superclass of the deserialized object. This may occur in cases where the receiving party uses a different version of the deserialized instance's class than the sending party, and the receiver's version extends classes that are not extended by the sender's version. This may also occur if the serialization stream has been tampered; hence, readObjectNoData is useful for initializing deserialized objects properly despite a "hostile" or incomplete source stream.

  private void readObjectNoData() throws ObjectStreamException;

Each serializable class may define its own readObjectNoData method. If a serializable class does not define a readObjectNoData method, then in the circumstances listed above the fields of the class will be initialized to their default values (as listed in The Java Language Specification); this behavior is consistent with that of ObjectInputStream prior to version 1.4 of the Java 2 SDK, Standard Edition, when support for readObjectNoData methods was introduced. If a serializable class does define a readObjectNoData method and the aforementioned conditions arise, then readObjectNoData will be invoked at the point during deserialization when a class-defined readObject method would otherwise be called had the class in question been listed by the stream as a superclass of the instance being deserialized.

3.6 The readExternal Method

Objects implementing java.io.Externalizable must implement the readExternal method to restore the entire state of the object. It must coordinate with its superclasses to restore their state. All of the methods of ObjectInput are available to restore the object's primitive typed fields and object fields.

    public void readExternal(ObjectInput stream)
        throws IOException;
Note - The readExternal method is public, and it raises the risk of a client being able to overwrite an existing object from a stream. The class may add its own checks to insure that this is only called when appropriate.
A new stream protocol version has been introduced in JDK 1.2 to correct a problem with Externalizable objects. The old definition of Externalizable objects required the local virtual machine to find a readExternal method to be able to properly read an Externalizable object from the stream. The new format adds enough information to the stream protocol so serialization can skip an Externalizable object when the local readExternal method is not available. Due to class evolution rules, serialization must be able to skip an Externalizable object in the input stream if there is not a mapping for the object using the local classes.

An additional benefit of the new Externalizable stream format is that ObjectInputStream can detect attempts to read more External data than is available, and can also skip by any data that is left unconsumed by a readExternal method. The behavior of ObjectInputStream in response to a read past the end of External data is the same as the behavior when a class-defined readObject method attempts to read past the end of its optional data: bytewise reads will return -1, primitive reads will throw EOFExceptions, and object reads will throw OptionalDataExceptions with the eof field set to true.

Due to the format change, JDK 1.1.6 and earlier releases are not able to read the new format. StreamCorruptedException is thrown when JDK 1.1.6 or earlier attempts to read an Externalizable object from a stream written in PROTOCOL_VERSION_2. Compatibility issues are discussed in more detail in Section 6.3, "Stream Protocol Versions."

3.7 The readResolve Method

For Serializable and Externalizable classes, the readResolve method allows a class to replace/resolve the object read from the stream before it is returned to the caller. By implementing the readResolve method, a class can directly control the types and instances of its own instances being deserialized. The method is defined as follows:

   ANY-ACCESS-MODIFIER Object readResolve()
                throws ObjectStreamException;
The readResolve method is called when ObjectInputStream has read an object from the stream and is preparing to return it to the caller. ObjectInputStream checks whether the class of the object defines the readResolve method. If the method is defined, the readResolve method is called to allow the object in the stream to designate the object to be returned. The object returned should be of a type that is compatible with all uses. If it is not compatible, a ClassCastException will be thrown when the type mismatch is discovered.

For example, a Symbol class could be created for which only a single instance of each symbol binding existed within a virtual machine. The readResolve method would be implemented to determine if that symbol was already defined and substitute the preexisting equivalent Symbol object to maintain the identity constraint. In this way the uniqueness of Symbol objects can be maintained across serialization.

Note - The readResolve method is not invoked on the object until the object is fully constructed, so any references to this object in its object graph will not be updated to the new object nominated by readResolve. However, during the serialization of an object with the writeReplace method, all references to the original object in the replacement object's object graph are replaced with references to the replacement object. Therefore in cases where an object being serialized nominates a replacement object whose object graph has a reference to the original object, deserialization will result in an incorrect graph of objects. Furthermore, if the reference types of the object being read (nominated by writeReplace) and the original object are not compatible, the construction of the object graph will raise a ClassCastException.

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


4 - Class Descriptors

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Class Descriptors

CHAPTER 4

Topics:
  • The ObjectStreamClass Class
  • Dynamic Proxy Class Descriptors
  • Serialized Form
  • The ObjectStreamField Class
  • Inspecting Serializable Classes
  • Stream Unique Identifiers

4.1 The ObjectStreamClass Class

The ObjectStreamClass provides information about classes that are saved in a Serialization stream. The descriptor provides the fully-qualified name of the class and its serialization version UID. A SerialVersionUID identifies the unique original class version for which this class is capable of writing streams and from which it can read.

package java.io;

public class ObjectStreamClass
{
    public static ObjectStreamClass lookup(Class cl);

        public static ObjectStreamClass lookupAny(Class cl);

    public String getName();

    public Class forClass();

    public ObjectStreamField[] getFields();

    public long getSerialVersionUID();

    public String toString();
}
The lookup method returns the ObjectStreamClass descriptor for the specified class in the virtual machine. If the class has defined serialVersionUID it is retrieved from the class. If the serialVersionUID is not defined by the class, it is computed from the definition of the class in the virtual machine. If the specified class is not serializable or externalizable, null is returned.

The lookupAny method behaves like the lookup method, except that it returns the descriptor for any class, regardless of whether it implements Serializable. The serialVersionUID of a class that does not implement Serializable is 0L.

The getName method returns the name of the class, in the same format that is used by the Class.getName method.

The forClass method returns the Class in the local virtual machine if one was found by ObjectInputStream.resolveClass method. Otherwise, it returns null.

The getFields method returns an array of ObjectStreamField objects that represent the serializable fields of this class.

The getSerialVersionUID method returns the serialVersionUID of this class. Refer to Section 4.6, "Stream Unique Identifiers." If not specified by the class, the value returned is a hash computed from the class's name, interfaces, methods, and fields using the Secure Hash Algorithm (SHA) as defined by the National Institute of Standards.

The toString method returns a printable representation of the class descriptor including the name of the class and the serialVersionUID.

4.2 Dynamic Proxy Class Descriptors

ObjectStreamClass descriptors are also used to provide information about dynamic proxy classes (e.g., classes obtained via calls to the getProxyClass method of java.lang.reflect.Proxy) saved in a serialization stream. A dynamic proxy class itself has no serializable fields and a serialVersionUID of 0L. In other words, when the Class object for a dynamic proxy class is passed to the static lookup method of ObjectStreamClass, the returned ObjectStreamClass instance will have the following properties:

  • Invoking its getSerialVersionUID method will return 0L.
  • Invoking its getFields method will return an array of length zero.
  • Invoking its getField method with any String argument will return null.

4.3 Serialized Form

The serialized form of an ObjectStreamClass instance depends on whether or not the Class object it represents is serializable, externalizable, or a dynamic proxy class.

When an ObjectStreamClass instance that does not represent a dynamic proxy class is written to the stream, it writes the class name and serialVersionUID, flags, and the number of fields. Depending on the class, additional information may be written:

  • For non-serializable classes, the number of fields is always zero. Neither the SC_SERIALIZABLE nor the SC_EXTERNALIZABLE flag bits are set.
  • For serializable classes, the SC_SERIALIZABLE flag is set, the number of fields counts the number of serializable fields and is followed by a descriptor for each serializable field. The descriptors are written in canonical order. The descriptors for primitive typed fields are written first sorted by field name followed by descriptors for the object typed fields sorted by field name. The names are sorted using String.compareTo. For details of the format, refer to Section 6.4, "Grammar for the Stream Format".
  • For externalizable classes, flags includes the SC_EXTERNALIZABLE flag, and the number of fields is always zero.
  • For enum types, flags includes the SC_ENUM flag, and the number of fields is always zero.
When an ObjectOutputStream serializes the ObjectStreamClass descriptor for a dynamic proxy class, as determined by passing its Class object to the isProxyClass method of java.lang.reflect.Proxy, it writes the number of interfaces that the dynamic proxy class implements, followed by the interface names. Interfaces are listed in the order that they are returned by invoking the getInterfaces method on the Class object of the dynamic proxy class.

The serialized representations of ObjectStreamClass descriptors for dynamic proxy classes and non-dynamic proxy classes are differentiated through the use of different typecodes (TC_PROXYCLASSDESC and TC_CLASSDESC, respectively); for a more detailed specification of the grammar, see Section 6.4, "Grammar for the Stream Format".

4.4 The ObjectStreamField Class

An ObjectStreamField represents a serializable field of a serializable class. The serializable fields of a class can be retrieved from the ObjectStreamClass.

The special static serializable field, serialPersistentFields, is an array of ObjectStreamField components that is used to override the default serializable fields.

package java.io;

public class ObjectStreamField implements Comparable {

    public ObjectStreamField(String fieldName,
                             Class fieldType);

    public ObjectStreamField(String fieldName,
                             Class fieldType,
                             boolean unshared);

    public String getName();

    public Class getType();

    public String getTypeString();

    public char getTypeCode();

    public boolean isPrimitive();

    public boolean isUnshared();

    public int getOffset();

    protected void setOffset(int offset);

    public int compareTo(Object obj);

    public String toString();
}
ObjectStreamField objects are used to specify the serializable fields of a class or to describe the fields present in a stream. Its constructors accept arguments describing the field to represent: a string specifying the name of the field, a Class object specifying the type of the field, and a boolean flag (implicitly false for the two-argument constructor) indicating whether or not values of the represented field should be read and written as "unshared" objects if default serialization/deserialization is in use (see the descriptions of the ObjectInputStream.readUnshared and ObjectOutputStream.writeUnshared methods in sections 3.1 and 2.1, respectively).

The getName method returns the name of the serializable field.

The getType method returns the type of the field.

The getTypeString method returns the type signature of the field.

The getTypeCode method returns a character encoding of the field type (`B' for byte, `C' for char, `D' for double, `F' for float, `I' for int, `J' for long, `L' for non-array object types, `S' for short, `Z' for boolean, and `[` for arrays).

The isPrimitive method returns true if the field is of primitive type, or false otherwise.

The isUnshared method returns true if values of the field should be written as "unshared" objects, or false otherwise.

The getOffset method returns the offset of the field's value within instance data of the class defining the field.

The setOffset method allows ObjectStreamField subclasses to modify the offset value returned by the getOffset method.

The compareTo method compares ObjectStreamFields for use in sorting. Primitive fields are ranked as "smaller" than non-primitive fields; fields otherwise equal are ranked alphabetically.

The toString method returns a printable representation with name and type.

4.5 Inspecting Serializable Classes

The program serialver can be used to find out if a class is serializable and to get its serialVersionUID. When invoked with the-show option, it puts up a simple user interface. To find out if a class is serializable and to find out its serialVersionUID, enter its full class name, then press either the Enter or the Show button. The string printed can be copied and pasted into the evolved class.

serialver, Serial Version Inspector program

When invoked on the command line with one or more class names, serialver prints the serialVersionUID for each class in a form suitable for copying into an evolving class. When invoked with no arguments, it prints a usage line.

4.6 Stream Unique Identifiers

Each versioned class must identify the original class version for which it is capable of writing streams and from which it can read. For example, a versioned class must declare:

    private static final long serialVersionUID = 3487495895819393L;

The stream-unique identifier is a 64-bit hash of the class name, interface class names, methods, and fields. The value must be declared in all versions of a class except the first. It may be declared in the original class but is not required. The value is fixed for all compatible classes. If the SUID is not declared for a class, the value defaults to the hash for that class. The serialVersionUID for dynamic proxy classes and enum types always have the value 0L. Array classes cannot declare an explicit serialVersionUID, so they always have the default computed value, but the requirement for matching serialVersionUID values is waived for array classes.

Note - It is strongly recommended that all serializable classes explicitly declare serialVersionUID values, since the default serialVersionUID computation is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpected serialVersionUID conflicts during deserialization, causing deserialization to fail.
The initial version of an Externalizable class must output a stream data format that is extensible in the future. The initial version of the method readExternal has to be able to read the output format of all future versions of the method writeExternal.

The serialVersionUID is computed using the signature of a stream of bytes that reflect the class definition. The National Institute of Standards and Technology (NIST) Secure Hash Algorithm (SHA-1) is used to compute a signature for the stream. The first two 32-bit quantities are used to form a 64-bit hash. A java.lang.DataOutputStream is used to convert primitive data types to a sequence of bytes. The values input to the stream are defined by the Java Virtual Machine (VM) specification for classes. Class modifiers may include the ACC_PUBLIC, ACC_FINAL, ACC_INTERFACE, and ACC_ABSTRACT flags; other flags are ignored and do not affect serialVersionUID computation. Similarly, for field modifiers, only the ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, and ACC_TRANSIENT flags are used when computing serialVersionUID values. For constructor and method modifiers, only the ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT and ACC_STRICT flags are used. Names and descriptors are written in the format used by the java.io.DataOutputStream.writeUTF method.

The sequence of items in the stream is as follows:

  1. The class name.
  2. The class modifiers written as a 32-bit integer.
  3. The name of each interface sorted by name.
  4. For each field of the class sorted by field name (except private static and private transient fields:
    1. The name of the field.
    2. The modifiers of the field written as a 32-bit integer.
    3. The descriptor of the field.
  5. If a class initializer exists, write out the following:
    1. The name of the method, <clinit>.
    2. The modifier of the method, java.lang.reflect.Modifier.STATIC, written as a 32-bit integer.
    3. The descriptor of the method, ()V.
  6. For each non-private constructor sorted by method name and signature:
    1. The name of the method, <init>.
    2. The modifiers of the method written as a 32-bit integer.
    3. The descriptor of the method.
  7. For each non-private method sorted by method name and signature:
    1. The name of the method.
    2. The modifiers of the method written as a 32-bit integer.
    3. The descriptor of the method.
  8. The SHA-1 algorithm is executed on the stream of bytes produced by DataOutputStream and produces five 32-bit values sha[0..4].
  9. The hash value is assembled from the first and second 32-bit values of the SHA-1 message digest. If the result of the message digest, the five 32-bit words H0 H1 H2 H3 H4, is in an array of five int values named sha, the hash value would be computed as follows:
      long hash = ((sha[0] >>> 24) & 0xFF) |
              ((sha[0] >>> 16) & 0xFF) << 8 |
              ((sha[0] >>> 8) & 0xFF) << 16 |
              ((sha[0] >>> 0) & 0xFF) << 24 |
              ((sha[1] >>> 24) & 0xFF) << 32 |
              ((sha[1] >>> 16) & 0xFF) << 40 |
              ((sha[1] >>> 8) & 0xFF) << 48 |
              ((sha[1] >>> 0) & 0xFF) << 56;

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


5 - Versioning of Serializable Objects

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Versioning of Serializable Objects

CHAPTER 5

Topics:

  • Overview
  • Goals
  • Assumptions
  • Who's Responsible for Versioning of Streams
  • Compatible Java Type Evolution
  • Type Changes Affecting Serialization

5.1 Overview

When Java objects use serialization to save state in files, or as blobs in databases, the potential arises that the version of a class reading the data is different than the version that wrote the data.

Versioning raises some fundamental questions about the identity of a class, including what constitutes a compatible change. A compatible change is a change that does not affect the contract between the class and its callers.

This section describes the goals, assumptions, and a solution that attempts to address this problem by restricting the kinds of changes allowed and by carefully choosing the mechanisms.

The proposed solution provides a mechanism for "automatic" handling of classes that evolve by adding fields and adding classes. Serialization will handle versioning without class-specific methods to be implemented for each version. The stream format can be traversed without invoking class-specific methods.

5.2 Goals

The goals are to:

  • Support bidirectional communication between different versions of a class operating in different virtual machines by:
    • Defining a mechanism that allows Java classes to read streams written by older versions of the same class.
    • Defining a mechanism that allows Java classes to write streams intended to be read by older versions of the same class.
  • Provide default serialization for persistence and for RMI.
  • Perform well and produce compact streams in simple cases, so that RMI can use serialization.
  • Be able to identify and load classes that match the exact class used to write the stream.
  • Keep the overhead low for nonversioned classes.
  • Use a stream format that allows the traversal of the stream without having to invoke methods specific to the objects saved in the stream.

5.3 Assumptions

The assumptions are that:

  • Versioning will only apply to serializable classes since it must control the stream format to achieve it goals. Externalizable classes will be responsible for their own versioning which is tied to the external format.
  • All data and objects must be read from, or skipped in, the stream in the same order as they were written.
  • Classes evolve individually as well as in concert with supertypes and subtypes.
  • Classes are identified by name. Two classes with the same name may be different versions or completely different classes that can be distinguished only by comparing their interfaces or by comparing hashes of the interfaces.
  • Default serialization will not perform any type conversions.
  • The stream format only needs to support a linear sequence of type changes, not arbitrary branching of a type.

5.4 Who's Responsible for Versioning of Streams

In the evolution of classes, it is the responsibility of the evolved (later version) class to maintain the contract established by the nonevolved class. This takes two forms. First, the evolved class must not break the existing assumptions about the interface provided by the original version, so that the evolved class can be used in place of the original. Secondly, when communicating with the original (or previous) versions, the evolved class must provide sufficient and equivalent information to allow the earlier version to continue to satisfy the nonevolved contract.

Private serialization protocol and contract with supertype relationships between evolved and nonevolved classes and their instances

For the purposes of the discussion here, each class implements and extends the interface or contract defined by its supertype. New versions of a class, for example foo', must continue to satisfy the contract for foo and may extend the interface or modify its implementation.

Communication between objects via serialization is not part of the contract defined by these interfaces. Serialization is a private protocol between the implementations. It is the responsibility of the implementations to communicate sufficiently to allow each implementation to continue to satisfy the contract expected by its clients.

5.5 Compatible Java Type Evolution

The Java Language Specification discusses binary compatibility of Java classes as those classes evolve. Most of the flexibility of binary compatibility comes from the use of late binding of symbolic references for the names of classes, interfaces, fields, methods, and so on.

The following are the principle aspects of the design for versioning of serialized object streams.

  • The default serialization mechanism will use a symbolic model for binding the fields in the stream to the fields in the corresponding class in the virtual machine.
  • Each class referenced in the stream will uniquely identify itself, its supertype, and the types and names of each serializable field written to the stream. The fields are ordered with the primitive types first sorted by field name, followed by the object fields sorted by field name.
  • Two types of data may occur in the stream for each class: required data (corresponding directly to the serializable fields of the object); and optional data (consisting of an arbitrary sequence of primitives and objects). The stream format defines how the required and optional data occur in the stream so that the whole class, the required, or the optional parts can be skipped if necessary.
    • The required data consists of the fields of the object in the order defined by the class descriptor.
    • The optional data is written to the stream and does not correspond directly to fields of the class. The class itself is responsible for the length, types, and versioning of this optional information.
  • If defined for a class, the writeObject/readObject methods supersede the default mechanism to write/read the state of the class. These methods write and read the optional data for a class. The required data is written by calling defaultWriteObject and read by calling defaultReadObject.
  • The stream format of each class is identified by the use of a Stream Unique Identifier (SUID). By default, this is the hash of the class. All later versions of the class must declare the Stream Unique Identifier (SUID) that they are compatible with. This guards against classes with the same name that might inadvertently be identified as being versions of a single class.
  • Subtypes of ObjectOutputStream and ObjectInputStream may include their own information identifying the class using the annotateClass method; for example, MarshalOutputStream embeds the URL of the class.

5.6 Type Changes Affecting Serialization

With these concepts, we can now describe how the design will cope with the different cases of an evolving class. The cases are described in terms of a stream written by some version of a class. When the stream is read back by the same version of the class, there is no loss of information or functionality. The stream is the only source of information about the original class. Its class descriptions, while a subset of the original class description, are sufficient to match up the data in the stream with the version of the class being reconstituted.

The descriptions are from the perspective of the stream being read in order to reconstitute either an earlier or later version of the class. In the parlance of RPC systems, this is a "receiver makes right" system. The writer writes its data in the most suitable form and the receiver must interpret that information to extract the parts it needs and to fill in the parts that are not available.

5.6.1 Incompatible Changes

Incompatible changes to classes are those changes for which the guarantee of interoperability cannot be maintained. The incompatible changes that may occur while evolving a class are:

  • Deleting fields - If a field is deleted in a class, the stream written will not contain its value. When the stream is read by an earlier class, the value of the field will be set to the default value because no value is available in the stream. However, this default value may adversely impair the ability of the earlier version to fulfill its contract.
  • Moving classes up or down the hierarchy - This cannot be allowed since the data in the stream appears in the wrong sequence.
  • Changing a nonstatic field to static or a nontransient field to transient - When relying on default serialization, this change is equivalent to deleting a field from the class. This version of the class will not write that data to the stream, so it will not be available to be read by earlier versions of the class. As when deleting a field, the field of the earlier version will be initialized to the default value, which can cause the class to fail in unexpected ways.
  • Changing the declared type of a primitive field - Each version of the class writes the data with its declared type. Earlier versions of the class attempting to read the field will fail because the type of the data in the stream does not match the type of the field.
  • Changing the writeObject or readObject method so that it no longer writes or reads the default field data or changing it so that it attempts to write it or read it when the previous version did not. The default field data must consistently either appear or not appear in the stream.
  • Changing a class from Serializable to Externalizable or vice versa is an incompatible change since the stream will contain data that is incompatible with the implementation of the available class.
  • Changing a class from a non-enum type to an enum type or vice versa since the stream will contain data that is incompatible with the implementation of the available class.
  • Removing either Serializable or Externalizable is an incompatible change since when written it will no longer supply the fields needed by older versions of the class.
  • Adding the writeReplace or readResolve method to a class is incompatible if the behavior would produce an object that is incompatible with any older version of the class.

5.6.2 Compatible Changes

The compatible changes to a class are handled as follows:

  • Adding fields - When the class being reconstituted has a field that does not occur in the stream, that field in the object will be initialized to the default value for its type. If class-specific initialization is needed, the class may provide a readObject method that can initialize the field to nondefault values.
  • Adding classes - The stream will contain the type hierarchy of each object in the stream. Comparing this hierarchy in the stream with the current class can detect additional classes. Since there is no information in the stream from which to initialize the object, the class's fields will be initialized to the default values.
  • Removing classes - Comparing the class hierarchy in the stream with that of the current class can detect that a class has been deleted. In this case, the fields and objects corresponding to that class are read from the stream. Primitive fields are discarded, but the objects referenced by the deleted class are created, since they may be referred to later in the stream. They will be garbage-collected when the stream is garbage-collected or reset.
  • Adding writeObject/readObject methods - If the version reading the stream has these methods then readObject is expected, as usual, to read the required data written to the stream by the default serialization. It should call defaultReadObject first before reading any optional data. The writeObject method is expected as usual to call defaultWriteObject to write the required data and then may write optional data.
  • Removing writeObject/readObject methods - If the class reading the stream does not have these methods, the required data will be read by default serialization, and the optional data will be discarded.
  • Adding java.io.Serializable - This is equivalent to adding types. There will be no values in the stream for this class so its fields will be initialized to default values. The support for subclassing nonserializable classes requires that the class's supertype have a no-arg constructor and the class itself will be initialized to default values. If the no-arg constructor is not available, the InvalidClassException is thrown.
  • Changing the access to a field - The access modifiers public, package, protected, and private have no effect on the ability of serialization to assign values to the fields.
  • Changing a field from static to nonstatic or transient to nontransient - When relying on default serialization to compute the serializable fields, this change is equivalent to adding a field to the class. The new field will be written to the stream but earlier classes will ignore the value since serialization will not assign values to static or transient fields.

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


6 - Object Serialization Stream Protocol

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Object Serialization Stream Protocol

CHAPTER 6

Topics:

  • Overview
  • Stream Elements
  • Stream Protocol Versions
  • Grammar for the Stream Format
  • Example

6.1 Overview

The stream format satisfies the following design goals:

  • Is compact and is structured for efficient reading.
  • Allows skipping through the stream using only the knowledge of the structure and format of the stream. Does not require invoking any per class code.
  • Requires only stream access to the data.

6.2 Stream Elements

A basic structure is needed to represent objects in a stream. Each attribute of the object needs to be represented: its classes, its fields, and data written and later read by class-specific methods. The representation of objects in the stream can be described with a grammar. There are special representations for null objects, new objects, classes, arrays, strings, and back references to any object already in the stream. Each object written to the stream is assigned a handle that is used to refer back to the object. Handles are assigned sequentially starting from 0x7E0000. The handles restart at 0x7E0000 when the stream is reset.

A class object is represented by the following:

  • Its ObjectStreamClass object.

An ObjectStreamClass object for a Class that is not a dynamic proxy class is represented by the following:

  • The Stream Unique Identifier (SUID) of compatible classes.
  • A set of flags indicating various properties of the class, such as whether the class defines a writeObject method, and whether the class is serializable, externalizable, or an enum type
  • The number of serializable fields
  • The array of fields of the class that are serialized by the default mechanismFor arrays and object fields, the type of the field is included as a string which must be in "field descriptor" format (e.g., "Ljava/lang/Object;") as specified in The Java Virtual Machine Specification.
  • Optional block-data records or objects written by the annotateClass method
  • The ObjectStreamClass of its supertype (null if the superclass is not serializable)

An ObjectStreamClass object for a dynamic proxy class is represented by the following:

  • The number of interfaces that the dynamic proxy class implements
  • The names of all of the interfaces implemented by the dynamic proxy class, listed in the order that they are returned by invoking the getInterfaces method on the Class object.
  • Optional block-data records or objects written by the annotateProxyClass method.
  • The ObjectStreamClass of its supertype, java.lang.reflect.Proxy.
The representation of String objects consists of length information followed by the contents of the string encoded in modified UTF-8. The modified UTF-8 encoding is the same as used in the Java Virtual Machine and in the java.io.DataInput and DataOutput interfaces; it differs from standard UTF-8 in the representation of supplementary characters and of the null character. The form of the length information depends on the length of the string in modified UTF-8 encoding. If the modified UTF-8 encoding of the given String is less than 65536 bytes in length, the length is written as 2 bytes representing an unsigned 16-bit integer. Starting with the Java 2 platform, Standard Edition, v1.3, if the length of the string in modified UTF-8 encoding is 65536 bytes or more, the length is written in 8 bytes representing a signed 64-bit integer. The typecode preceding the String in the serialization stream indicates which format was used to write the String.

Arrays are represented by the following:

  • Their ObjectStreamClass object.
  • The number of elements.
  • The sequence of values. The type of the values is implicit in the type of the array. for example the values of a byte array are of type byte.

Enum constants are represented by the following:

  • The ObjectStreamClass object of the constant's base enum type.
  • The constant's name string.

New objects in the stream are represented by the following:

  • The most derived class of the object.
  • Data for each serializable class of the object, with the highest superclass first. For each class the stream contains the following:
    • The serializable fields.See Section 1.5, "Defining Serializable Fields for a Class."
    • If the class has writeObject/readObject methods, there may be optional objects and/or block-data records of primitive types written by the writeObject method followed by an endBlockData code.

All primitive data written by classes is buffered and wrapped in block-data records, regardless if the data is written to the stream within a writeObject method or written directly to the stream from outside a writeObject method. This data can only be read by the corresponding readObject methods or be read directly from the stream. Objects written by the writeObject method terminate any previous block-data record and are written either as regular objects or null or back references, as appropriate. The block-data records allow error recovery to discard any optional data. When called from within a class, the stream can discard any data or objects until the endBlockData.

6.3 Stream Protocol Versions

It was necessary to make a change to the serialization stream format in JDK 1.2 that is not backwards compatible to all minor releases of JDK 1.1. To provide for cases where backwards compatibility is required, a capability has been added to indicate what PROTOCOL_VERSION to use when writing a serialization stream. The method ObjectOutputStream.useProtocolVersion takes as a parameter the protocol version to use to write the serialization stream.

The Stream Protocol Versions are as follows:

  • ObjectStreamConstants.PROTOCOL_VERSION_1: Indicates the initial stream format.

  • ObjectStreamConstants.PROTOCOL_VERSION_2: Indicates the new external data format. Primitive data is written in block data mode and is terminated with TC_ENDBLOCKDATA.

    Block data boundaries have been standardized. Primitive data written in block data mode is normalized to not exceed 1024 byte chunks. The benefit of this change was to tighten the specification of serialized data format within the stream. This change is fully backward and forward compatible.

JDK 1.2 defaults to writing PROTOCOL_VERSION_2.

JDK 1.1 defaults to writing PROTOCOL_VERSION_1.

JDK 1.1.7 and greater can read both versions.

Releases prior to JDK 1.1.7 can only read PROTOCOL_VERSION_1.

6.4 Grammar for the Stream Format

The table below contains the grammar for the stream format. Nonterminal symbols are shown in italics. Terminal symbols in a fixed width font. Definitions of nonterminals are followed by a ":". The definition is followed by one or more alternatives, each on a separate line. The following table describes the notation:

Notation | Meaning
(datatype) | This token has the data type specified, such as byte.
token[n] | A predefined number of occurrences of the token, that is an array.
x0001 | A literal value expressed in hexadecimal. The number of hex digits reflects the size of the value.
<xxx> | A value read from the stream used to indicate the length of an array.

Note that the symbol (utf) is used to designate a string written using 2-byte length information, and (long-utf) is used to designate a string written using 8-byte length information. For details, refer to Section 6.2, "Stream Elements".

6.4.1 Rules of the Grammar

A Serialized stream is represented by any stream satisfying the stream rule.

stream:
  magic version contents

contents:
  content
  contents content

content:
  object
  blockdata

object:
  newObject
  newClass
  newArray
  newString
  newEnum
  newClassDesc
  prevObject
  nullReference
  exception
  TC_RESET

newClass:
  TC_CLASS classDesc newHandle

classDesc:
  newClassDesc
  nullReference
  (ClassDesc)prevObject      // an object required to be of type
                             // ClassDesc

superClassDesc:
  classDesc

newClassDesc:
  TC_CLASSDESC className serialVersionUID newHandle classDescInfo
  TC_PROXYCLASSDESC newHandle proxyClassDescInfo

classDescInfo:
  classDescFlags fields classAnnotation superClassDesc

className:
  (utf)

serialVersionUID:
  (long)

classDescFlags:
  (byte)                  // Defined in Terminal Symbols and
                            // Constants

proxyClassDescInfo:
  (int)<count> proxyInterfaceName[count] classAnnotation
      superClassDesc

proxyInterfaceName:

  (utf)

fields:
  (short)<count>  fieldDesc[count]

fieldDesc:
  primitiveDesc
  objectDesc

primitiveDesc:
  prim_typecode fieldName

objectDesc:
  obj_typecode fieldName className1

fieldName:
  (utf)

className1:
  (String)object             // String containing the field's type,
                             // in field descriptor format

classAnnotation:
  endBlockData
  contents endBlockData      // contents written by annotateClass

prim_typecode:
  `B'       // byte
  `C'       // char
  `D'       // double
  `F'       // float
  `I'       // integer
  `J'       // long
  `S'       // short
  `Z'       // boolean

obj_typecode:
  `[`   // array
  `L'       // object

newArray:
  TC_ARRAY classDesc newHandle (int)<size> values[size]

newObject:
  TC_OBJECT classDesc newHandle classdata[]  // data for each class

classdata:
  nowrclass                 // SC_SERIALIZABLE & classDescFlag &&
                            // !(SC_WRITE_METHOD & classDescFlags)
  wrclass objectAnnotation  // SC_SERIALIZABLE & classDescFlag &&
                            // SC_WRITE_METHOD & classDescFlags
  externalContents          // SC_EXTERNALIZABLE & classDescFlag &&
                            // !(SC_BLOCKDATA  & classDescFlags
  objectAnnotation          // SC_EXTERNALIZABLE & classDescFlag&&
                            // SC_BLOCKDATA & classDescFlags

nowrclass:
  values                    // fields in order of class descriptor

wrclass:
  nowrclass

objectAnnotation:
  endBlockData
  contents endBlockData     // contents written by writeObject
                            // or writeExternal PROTOCOL_VERSION_2.

blockdata:
  blockdatashort
  blockdatalong

blockdatashort:
  TC_BLOCKDATA (unsigned byte)<size> (byte)[size]

blockdatalong:
  TC_BLOCKDATALONG (int)<size> (byte)[size]

endBlockData   :
  TC_ENDBLOCKDATA

externalContent:          // Only parseable by readExternal
  ( bytes)                // primitive data
    object

externalContents:         // externalContent written by
  externalContent         // writeExternal in PROTOCOL_VERSION_1.
  externalContents externalContent

newString:
  TC_STRING newHandle (utf)
  TC_LONGSTRING newHandle (long-utf)

newEnum:
  TC_ENUM classDesc newHandle enumConstantName

enumConstantName:
  (String)object

prevObject
  TC_REFERENCE (int)handle

nullReference
  TC_NULL

exception:
  TC_EXCEPTION reset (Throwable)object         reset

magic:
  STREAM_MAGIC

version
  STREAM_VERSION

values:          // The size and types are described by the
                 // classDesc for the current object

newHandle:       // The next number in sequence is assigned
                 // to the object being serialized or deserialized

reset:           // The set of known objects is discarded
                 // so the objects of the exception do not
                 // overlap with the previously sent objects
                 // or with objects that may be sent after
                 // the exception

6.4.2 Terminal Symbols and Constants

The following symbols in java.io.ObjectStreamConstants define the terminal and constant values expected in a stream.

    final static short STREAM_MAGIC = (short)0xaced;
    final static short STREAM_VERSION = 5;
    final static byte TC_NULL = (byte)0x70;
    final static byte TC_REFERENCE = (byte)0x71;
    final static byte TC_CLASSDESC = (byte)0x72;
    final static byte TC_OBJECT = (byte)0x73;
    final static byte TC_STRING = (byte)0x74;
    final static byte TC_ARRAY = (byte)0x75;
    final static byte TC_CLASS = (byte)0x76;
    final static byte TC_BLOCKDATA = (byte)0x77;
    final static byte TC_ENDBLOCKDATA = (byte)0x78;
    final static byte TC_RESET = (byte)0x79;
    final static byte TC_BLOCKDATALONG = (byte)0x7A;
    final static byte TC_EXCEPTION = (byte)0x7B;
    final static byte TC_LONGSTRING = (byte) 0x7C;
    final static byte TC_PROXYCLASSDESC = (byte) 0x7D;
    final static byte TC_ENUM = (byte) 0x7E;
    final static  int   baseWireHandle = 0x7E0000;
The flag byte classDescFlags may include values of

    final static byte SC_WRITE_METHOD = 0x01; //if SC_SERIALIZABLE
     final static byte SC_BLOCK_DATA = 0x08;    //if SC_EXTERNALIZABLE
    final static byte SC_SERIALIZABLE = 0x02;
    final static byte SC_EXTERNALIZABLE = 0x04;
    final static byte SC_ENUM = 0x10;
The flag SC_WRITE_METHOD is set if the Serializable class writing the stream had a writeObject method that may have written additional data to the stream. In this case a TC_ENDBLOCKDATA marker is always expected to terminate the data for that class.

The flag SC_BLOCKDATA is set if the Externalizable class is written into the stream using STREAM_PROTOCOL_2. By default, this is the protocol used to write Externalizable objects into the stream in JDK 1.2. JDK 1.1 writes STREAM_PROTOCOL_1.

The flag SC_SERIALIZABLE is set if the class that wrote the stream extended java.io.Serializable but not java.io.Externalizable, the class reading the stream must also extend java.io.Serializable and the default serialization mechanism is to be used.

The flag SC_EXTERNALIZABLE is set if the class that wrote the stream extended java.io.Externalizable, the class reading the data must also extend Externalizable and the data will be read using its writeExternal and readExternal methods.

The flag SC_ENUM is set if the class that wrote the stream was an enum type. The receiver's corresponding class must also be an enum type. Data for constants of the enum type will be written and read as described in Section 1.12, "Serialization of Enum Constants".

Example

Consider the case of an original class and two instances in a linked list:

class List implements java.io.Serializable {
    int value;
    List next;
    public static void main(String[] args) {
        try {
            List list1 = new List();
            List list2 = new List();
            list1.value = 17;
            list1.next = list2;
            list2.value = 19;
            list2.next = null;

            ByteArrayOutputStream o = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(o);
            out.writeObject(list1);
            out.writeObject(list2);
            out.flush();
            ...
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
The resulting stream contains:

00: ac ed 00 05 73 72 00 04 4c 69 73 74 69 c8 8a 15 >....sr..Listi...<

10: 40 16 ae 68 02 00 02 49 00 05 76 61 6c 75 65 4c >Z......I..valueL<

20: 00 04 6e 65 78 74 74 00 06 4c 4c 69 73 74 3b 78 >..nextt..LList;x<

30: 70 00 00 00 11 73 71 00 7e 00 00 00 00 00 13 70 >p....sq.~......p<

40: 71 00 7e 00 03                                  >q.~..<

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


Contents

CONTENTS | PREV | NEXT
Java Object Serialization Specification

Table of Contents

1 System Architecture
1.1 Overview
1.2 Writing to an Object Stream
1.3 Reading from an Object Stream
1.4 Object Streams as Containers
1.5 Defining Serializable Fields for a Class
1.6 Documenting Serializable Fields and Data for a Class
1.7 Accessing Serializable Fields of a Class
1.8 The ObjectOutput Interface
1.9 The ObjectInput Interface
1.10 The Serializable Interface
1.11 The Externalizable Interface
1.12 Serialization of Enum Constants
1.13 Protecting Sensitive Information

2 Object Output Classes
2.1 The ObjectOutputStream Class
2.2 The ObjectOutputStream.PutField Class
2.3 The writeObject Method
2.4 The writeExternal Method
2.5 The writeReplace Method
2.6 The useProtocolVersion Method

3 Object Input Classes
3.1 The ObjectInputStream Class
3.2 The ObjectInputStream.GetField Class
3.3 The ObjectInputValidation Interface
3.4 The readObject Method
3.5 The readObjectNoData Method
3.6 The readExternal Method
3.7 The readResolve Method

4 Class Descriptors
4.1 The ObjectStreamClass Class
4.2 Dynamic Proxy Class Descriptors
4.3 Serialized Form
4.4 The ObjectStreamField Class
4.5 Inspecting Serializable Classes
4.6 Stream Unique Identifiers

5 Versioning of Serializable Objects
5.1 Overview
5.2 Goals
5.3 Assumptions
5.4 Who's Responsible for Versioning of Streams
5.5 Compatible JavaTM Type Evolution
5.6 Type Changes Affecting Serialization
5.6.1 Incompatible Changes
5.6.2 Compatible Changes

6 Object Serialization Stream Protocol
6.1 Overview
6.2 Stream Elements
6.3 Stream Protocol Versions
6.4 Grammar for the Stream Format
6.4.1 Rules of the Grammar
6.4.2 Terminal Symbols and Constants

A Security in Object Serialization

B Exceptions In Object Serialization

C Example of Serializable Fields
C.1 Example Alternate Implementation of java.io.File
CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


Enhancements in the Java Platform

Documentation Contents

Enhancements

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4

Enhancements in Java SE 6

java.[package1.subpackage]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

java.[package2]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

Enhancements in J2SE 5.0

java.[package1]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

Enhancements in Java 2 SDK v1.4

java.[package1]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

java.[package2]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in [correct platform name for version]

java.[package1]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

java.[package2]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description

java.[package3]

  • Enhancement 1 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • Enhancement 2 in this package
    Short description of enhancement; include any relevant links to APIs or other documentation
  • and so on
    description
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK Man Page Template

Documentation Contents

Command Name - followed by More Descriptive Command Title

  • Synopsis
  • Parameters
  • Description
  • Options
  • Usage
  • Examples
  • See Also

SYNOPSIS

   commandname [ options ] [ sourcefiles ] [ classes ] [ @argfiles ]

PARAMETERS

For example, you could introduce items like the following, as required.

  • Options may be in any order. For a discussion of parameters that apply to a specific option, see OPTIONS below.
  • sourcefiles
    • Zero or more source files to be processed.
    • @files - One or more files that list source files or other options

DESCRIPTION

Generally, what does a user do with this tool?

For what purpose was this tool developed?

You could state general differences in use/functionality for each OS (operating system) we support.

OPTIONS

Place your introduction here. Then, if you have different categories of options, use multiple level 3 headings to create sub-sections as necessary. Options should be listed alphabetically within a sub-section.

Following are a few option examples from the jconsole and apt man pages. They are divided into three sub-sections, just to give an example of what sub-sections look like.

jconsole Options

-interval=n
Set the update interval to n seconds (default is 4 seconds).
-notile
Do not tile windows initially (for two or more connections).
-pluginpath plugins
Specify a list of directories or JAR files which are searched for JConsole plugins. The plugins path should contain a provider-configuration file named:
   META-INF/services/com.sun.tools.jconsole.JConsolePlugin

containing one line for each plugin specifying the fully qualified class name of the class implementing the com.sun.tools.jconsole.JConsolePlugin class.

-version
Output version information and exit.
-help
Output help message and exit.
-J<flag>
Pass <flag> to the Java virtual machine on which jconsole is run.

apt Specific Options

-s dir
Specify the directory root under which processor-generated source files will be placed; files are placed in subdirectories based on package namespace.
-nocompile
Do not compile source files to class files.
-print
Print out textual representation of specified types; perform no annotation processing or compilation.
-A[key[=val]]
Options to pass to annotation processors -- these are not interpreted by apt directly, but are made available for use by individual processors
-factorypath path
Specify where to find annotation processor factories; if this option is used, the classpath is not searched for factories.
-factory classname
Name of annotation processor factory to use; bypasses default discovery process

apt Options shared with javac

-d dir
Specify where to place processor and javac generated class files
-cp path or -classpath path
Specify where to find user class files and annotation processor factories. If -factorypath is given, the classpath is not searched for factories.

Consult the javac(1) man page for information on javac options.

USAGE

Use this section to briefly mention some common ways a developer might use this tool.

EXAMPLES

Here are some examples of starting jstatd. Note that the jstatd scripts automatically start the server in the background.

Using Internal RMI Registry

This example demonstrates starting jstatd with an internal RMI registry. This example assumes that no other server is bound to the default RMI Registry port (port 1099).

jstatd -J-Djava.security.policy=all.policy

Using External RMI Registry

This example demonstrates starting jstatd with a external RMI registry.

rmiregistry&
jstatd -J-Djava.security.policy=all.policy

This example demonstrates starting jstatd with an external RMI registry server on port 2020.

rmiregistry 2020&
jstatd -J-Djava.security.policy=all.policy -p 2020

This example demonstrates starting jstatd with an external RMI registry on port 2020, bound to name AlternateJstatdServerName.

rmiregistry 2020&
jstatd -J-Djava.security.policy=all.policy -p 2020 -n AlternateJstatdServerName

Inhibiting creation of an in-process RMI registry

This example demonstrates starting jstatd such that it will not create a RMI registry if one is not found. This example assumes an RMI registry is already running. If it is not, an appropriate error message is emitted.

jstatd -J-Djava.security.policy=all.policy -nr

Enabling RMI logging capabilities.

This example demonstrates starting jstatd with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.

jstatd -J-Djava.security.policy=all.policy -J-Djava.rmi.server.logCalls=true

SEE ALSO

Following is a SEE ALSO section taken from the jstatd man page.

  • java - the Java Application Launcher
  • jps - the Java Process Status Application
  • jstat - the Java Virtual Machine Statistics Monitoring Tool
  • rmiregistry - the Java Remote Object Registry
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Java Conceptual Diagram

The Java conceptual diagram categorizes Java component technologies in levels. The following lists these levels, from top to bottom, and the technologies that are part of each one. Technologies that are part of a lower level serve as a foundation for those that are part of a higher level.

  • Java Language
  • Tools & Tool APIs
    • java
    • javac
    • javadoc
    • jar
    • javap
    • JPDA
    • JConsole
    • Java VisualVM
    • Java DB
    • Security
    • Int'l
    • RMI
    • IDL
    • Deploy
    • Monitoring
    • Troubleshoot
    • Scripting
    • JVM TI
    • Web Services
  • Deployment
    • Java Web Start
    • Applet / Java Plug-in
  • User Interface Toolkits
    • JavaFX
    • AWT
    • Swing
    • Java 2D
    • Accessibility
    • Drag and Drop
    • Input Methods
    • Image I/O
    • Print Service
    • Sound
  • Integration Libraries
    • IDL
    • JDBC
    • JNDI
    • RMI
    • RMI-IIOP
    • Scripting
  • Other Base Libraries
    • Beans
    • Int'l Support
    • Input/Output
    • JMX
    • JNI
    • Math
    • Networking
    • Override Mechanism
    • Security
    • Serialization
    • Extension Mechanism
    • XML JAXP
  • lang and util Base Libraries
    • lang and util
    • Collections
    • Concurrency Utilities
    • JAR
    • Logging
    • Management
    • Preferences API
    • Ref Objects
    • Reflection
    • Regular Expressions
    • Versioning
    • Zip
    • Instrumentation
  • Java Virtual Machine
    • Java Hotspot Client and Server VM

The JDK consists of all levels.

The JRE consists of the following levels:

  • Deployment
  • User Interface Toolkits
  • Integration Libraries
  • Other Base Libraries
  • lang and util Base Libraries
  • Java Virtual Machine

The Java SE API consists of the following levels:

  • User Interface Toolkits except JavaFX
  • Integration Libraries
  • Other Base Libraries
  • lang and util Base Libraries

Compact Profiles consists of the following levels:

  • Integration Libraries
  • Other Base Libraries
  • lang and util Base Libraries
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java™ Platform Overview

  • JRE and JDK
  • Java Programming Language
  • Java Virtual Machines
  • Base Libraries
  • Integration Libraries
  • User Interface Libraries
  • Deployment
  • Tool Specifications
  • JDK Tools & Utilities
  • Platforms

JRE and JDK

Oracle provides two principal software products in the Java™ Platform, Standard Edition (Java™ SE) family:

Java SE Runtime Environment (JRE)

The JRE provides the libraries, Java virtual machine, and other components necessary for you to run applets and applications written in the Java programming language. This runtime environment can be redistributed with applications to make them free-standing.

Java SE Development Kit (JDK)

The JDK includes the JRE plus command-line development tools such as compilers and debuggers that are necessary or useful for developing applets and applications.

Java Programming Language

The Java Programming Language is a general-purpose, concurrent, strongly typed, class-based object-oriented language. It is normally compiled to the bytecode instruction set and binary format defined in the Java Virtual Machine Specification. For more information see Language Features.

Java Virtual Machines

The Java virtual machine is an abstract computing machine that has an instruction set and manipulates memory at run time. The Java virtual machine is ported to different platforms to provide hardware- and operating system-independence.

The Java Platform, Standard Edition provides two implementations of the Java virtual machine (VM):

Java HotSpot Client VM

The client VM is an implementation for platforms typically used for client applications. The client VM is tuned for reducing start-up time and memory footprint. It can be invoked by using the -client command-line option when launching an application.

Java HotSpot Server VM

The server VM is an implementation designed for maximum program execution speed, trading off launch time and memory. It can be invoked by using the -server command-line option when launching an application.

For more information, see the VM documentation.

Base Libraries

Classes and interfaces that provide basic features and fundamental functionality for the Java platform.

Lang and Util Packages

Provides the fundamental Object and Class classes, wrapper classes for primitive types, a basic math class, and more. See the Lang and Util documentation for more information.

Math

Math functionality includes floating point libraries and arbitrary-precision math. For more information, see the Math documentation.

Monitoring and Management

Comprehensive monitoring and management support for Java platform including Monitoring and Management API for Java virtual machine, Monitoring and Management API for the Logging Facility, jconsole and other monitoring utilities, out-of-the-box monitoring and management, Java Management Extensions (JMX), and Oracle's Platform Extension. See the Monitoring and Management documentation for more information.

Package Version Identification

The package versioning feature enables package-level version control so that applications and applets can identify at runtime the version of a specific Java Runtime Environment, VM, and class package. For more information, see the Package Version Identification documentation.

Reference Objects

Reference objects support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed. Reference objects are therefore useful for building simple caches as well as caches that are flushed when memory runs low, for implementing mappings that do not prevent their keys (or values) from being reclaimed, and for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism. For more information, see the Reference Objects documentation.

Reflection

Reflection enables Java code to discover information about the fields, methods and constructors of loaded classes, and to use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions. The API accommodates applications that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class. Programs can suppress default reflective access control. For more information, see the Reflection documentation.

Collections Framework

A collection is an object that represents a group of objects. The collections framework is a unified architecture for representing collections, allowing them to be manipulated independently of the details of their representation. It reduces programming effort while increasing performance. It allows for interoperability among unrelated APIs, reduces effort in designing and learning new APIs, and fosters software reuse. For more information, see the Collections Framework documentation.

Concurrency Utilities

The Concurrency Utilities packages provide a powerful, extensible framework of high-performance threading utilities such as thread pools and blocking queues. This package frees the programmer from the need to craft these utilities by hand, in much the same manner the Collections Framework did for data structures. Additionally, these packages provide low-level primitives for advanced concurrent programming. For more information, See the Concurrency Utilities documentation.

Java Archive (JAR) Files

JAR (Java Archive) is a platform-independent file format that aggregates many files into one. Multiple Java applets and their requisite components (.class files, images and sounds) can be bundled in a JAR file and subsequently downloaded to a browser in a single HTTP transaction, greatly improving the download speed. The JAR format also supports compression, which reduces the file size, further improving the download time. In addition, the applet author can digitally sign individual entries in a JAR file to authenticate their origin. It is fully extensible. For more information, see the Java Archive documentation.

Logging

The Logging APIs facilitate software servicing and maintenance at customer sites by producing log reports suitable for analysis by end users, system administrators, field service engineers, and software development teams. The Logging APIs capture information such as security failures, configuration errors, performance bottlenecks, and/or bugs in the application or platform. For more information, see the Logging documentation.

Preferences

The Preferences API provides a way for applications to store and retrieve user and system preference and configuration data. The data is stored persistently in an implementation-dependent backing store. There are two separate trees of preference nodes, one for user preferences and one for system preferences. For more information, see the Preferences API documentation,

Other Base Packages

I/O

The java.io and java.nio packages provide a rich set of APIs for managing an application's I/O. The functionality includes file and device I/O, object serialization, buffer management, and character-set support. Additionally, the APIs support features for scalable servers including multiplexed, non-blocking I/O, memory mapping and locks for files. For more information, see the I/O documentation.

Object Serialization

Object Serialization extends the core Java Input/Output classes with support for objects. Object Serialization supports the encoding of objects, and the objects reachable from them, into a stream of bytes; and it supports the complementary reconstruction of the object graph from the stream. Serialization is used for lightweight persistence and for communication via sockets or Remote Method Invocation (RMI). See the Object Serialization documentation for more information.

Networking

Provides classes for networking functionality, including addressing, classes for using URLs and URIs, socket classes for connecting to servers, networking security functionality, and more. See the Networking documentation for more information.

Security

APIs for security-related functionality such as configurable access control, digital signing, authentication and authorization, cryptography, secure Internet communication, and more. See the Security documentation for more information.

Internationalization

APIs that enable the development of internationalized applications. Internationalization is the process of designing an application so that it can be adapted to various languages and regions without engineering changes. See the Internationalization documentation for more information.

JavaBeans™ Component API

Contains classes related to developing beans -- components based on the JavaBeans™ architecture that can be pieced together as part of developing an application. See the JavaBeans documentation for more information.

Java Management Extensions (JMX)

The Java Management Extensions (JMX) API is a standard API for management and monitoring of resources such as applications, devices, services, and the Java virtual machine. Typical uses include consulting and changing application configuration, accumulating statistics about application behavior, and notifying of state changes and erroneous conditions. The JMX API includes remote access, so a remote management program can interact with a running application for these purposes. See the Java Management Extensions documentation for more information.

XML (JAXP)

The Java platform provides a rich set of APIs for processing XML documents and data. See the Java SE XML documentation for more information.

Java Native Interface (JNI)

Java Native Interface (JNI) is a standard programming interface for writing Java native methods and embedding the Java virtual machine into native applications. The primary goal is binary compatibility of native method libraries across all Java virtual machine implementations on a given platform. See the Java Native Interface documentation for more information.

Extension Mechanism

Optional packages are packages of Java classes (and any associated native code) that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java virtual machine (VM) to use the classes of the optional extension in much the same way as the VM uses classes in the Java Platform. The extension mechanism also provides a way for needed optional packages to be retrieved from specified URLs when they are not already installed in the JDK or Runtime Environment. See the Java Extension Mechanism documentation for more information.

Endorsed Standards Override Mechanism

An endorsed standard is a Java API defined through a standards process other than the Java Community ProcessSM (JCP). Because endorsed standards are defined outside the JCP, it is anticipated that such standards may be revised between releases of the Java Platform. In order to take advantage of new revisions to endorsed standards, developers and software vendors may use the Endorsed Standards Override Mechanism to provide newer versions of an endorsed standard than those included in the Java Platform as released by Oracle. See the Endorsed Standards Override Mechanism documentation for more information.

Integration Libraries

Java Database Connectivity (JDBC) API

The JDBC™ API provides universal data access from the Java programming language. Using the JDBC 3.0 API, you developers can write applications that can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built. For more information, see the JDBC documentation.

Remote Method Invocation (RMI)

Remote Method Invocation (RMI) enables the development of distributed applications by providing for remote communication between programs written in the Java programming language. RMI enables an object running in one Java Virtual Machine to invoke methods on an object running in another Java VM, which may be on a different host. For more information, see the Java SE RMI documentation.

Java IDL (CORBA)

Java IDL technology adds CORBA (Common Object Request Broker Architecture) capability to the Java platform, providing standards-based interoperability and connectivity. Java IDL enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IDL (Object Management Group Interface Definition Language) and IIOP (Internet Inter-ORB Protocol) defined by the Object Management Group. Runtime components include a Java ORB for distributed computing using IIOP communication. For more information, see the Java IDL documentation.

RMI-IIOP

Java Remote Method Invocation over Internet Inter-ORB Protocol technology The RMI Programming Model enables the programming of CORBA servers and applications via the RMI API. You can choose to work completely within the Java programming language using the Java Remote Method Protocol (JRMP) as the transport, or work with other CORBA-compliant programming languages using the Internet InterORB Protocol (IIOP). You use the rmic compiler to generate the code necessary for connecting your applications via the Internet InterORB Protocol (IIOP) to others written in any CORBA-compliant language. To work with CORBA applications in other languages, IDL can be generated from Java programming language interfaces using the rmic compiler with the -idl option. To generate IIOP stubs and tie classes, use the rmic compiler with the -iiop option. For more information, see the RMI-IIOP documentation.

Scripting for the Java Platform

Java SE 6 includes the JSR 223: Scripting for the Java™ Platform API. This is a framework by which Java Applications can "host" script engines. Oracle's implementation of Java SE 6 includes an example script engine based on Mozilla Rhino:java_script for Java. The scripting framework supports third-party script engines through jar "service discovery" mechanism. It is possible to "drop" any JSR-223 compliant script engine in the CLASSPATH and access the same from your Java applications For more information, see the Scripting documentation.

Java Naming and Directory Interface™ (JNDI) API

The Java Naming and Directory Interface™ (JNDI) provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way. The JNDI architecture consists of a API and an SPI (Service Provider Interface). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the JNDI API to access their services. For more information, see JNDI documentation.

User Interface Libraries

Input Method Framework

The input method framework enables the collaboration between text editing components and input methods in entering text. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean -- languages using thousands of different characters - on keyboards with far fewer keys. However, the framework also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition. For more information, see the Input Method Framework documentation.

Accessibility

With the Java Accessibility API, developers can easily create Java applications that are accessible to disabled persons. Accessible Java applications are compatible with assistive technologies such as screen readers, speech recognition systems, and refreshable braille displays. For more information, see the Accessibility documentation.

Print Service

The Java™ Print Service API, allows printing on all Java platforms including those requiring a small footprint, such as a Java ME profile. For more information, see Java Print Service documentation.

Sound

The Java platform includes a powerful API for capturing, processing, and playing back audio and MIDI (Musical Instrument Digital Interface) data. This API is supported by an efficient sound engine which guarantees high-quality audio mixing and MIDI synthesis capabilities for the platform. For more information, see Java Sound documentation.

Drag and Drop Data Transfer

Drag and Drop enables data transfer both across Java programming language and native applications, between Java programming language applications, and within a single Java programming language application. For more information, see Drag and Drop Transfer.

Image I/O

The Java Image I/O API provides a pluggable architecture for working with images stored in files and accessed across the network. The API provides a framework for the addition of format-specific plugins. Plug-ins for several common formats are included with Java Image I/O, but third parties can use this API to create their own plugins to handle special formats. For more information, see Image I/O.

Java 2D™ Graphics and Imaging

The Java 2D™ API is a set of classes for advanced 2D graphics and imaging. It encompasses line art, text, and images in a single comprehensive model. The API provides extensive support for image compositing and alpha channel images, a set of classes to provide accurate color space definition and conversion, and a rich set of display-oriented imaging operators. For more information, see the Java 2D documentation.

AWT

The Java™ platform's Abstract Windowing Toolkit (AWT) provides APIs for constructing user interface components such as menus, buttons, text fields, dialog boxes, checkboxes, and for handling user input through those components. In addition, AWT allows for rendering of simple shapes such as ovals and polygons and enables developers to control the user-interface layout and fonts used by their applications. For more information, see the AWT documentation.

Swing

The Swing APIs also provide graphical component (GUI) for use in user interfaces. The Swing APIs are written in the Java programming language without any reliance on code that is specific to the GUI facilities provided by underlying operating system. This allows the Swing GUI components to have a "pluggable" look-and-feel that can be switched while an application is running. For more information, see the Java SE Swing documentation.

JavaFX

Java SE 7 Update 2 and later includes the JavaFX SDK. The JavaFX platform is the evolution of the Java client platform designed to enable application developers to easily create and deploy rich internet applications (RIAs) that behave consistently across multiple platforms. See JavaFX Documentation for more information.

Deployment

Java Deployment

Installation, setup, updating, redistribution and related topics:

  • Installation of the Java Platform on a computer
  • Setting Options in the Java Control Panel
  • Writing applications and applets in the Java Programming language
  • Authoring web pages that invoke applets or download and launch applications
  • Making Java-related files available on web servers
  • Updating the Java Platform on a computer

For more information, see Java Rich Internet Applications Guide and Java Web Start.

Tool Specifications

Debugger Architecture

Architecture and specifications for use by debuggers in development environments. For more information, see the Java Platform Debugger Architecture (JPDA) documentation.

VM Tool Interface

The Java Virtual Machine Tool Interface (JVM TI) is a specification for inspecting the state and controlling the execution of applications running in the JVM. The Java Virtual Machine Profiler Interface (JVMPI) has been deprecated. For more information, see the Java Virtual Machine Tool Interface (JVM TI) documentation.

Javadoc Tool

Javadoc is a tool that parses the declarations and documentation comments source files to produce a set of HTML pages describing the program elements. The Doclet API provides a mechanism for clients to inspect the source-level structure of programs and libraries, including Javadoc comments embedded in the source. This API can be used by doclets to generate documentation. For more information, see the Javadoc documentation.

Dynamic Attach

The package com.sun.tools.attach contains an Oracle extension to the Java Platform that allows an application to attach to a running Java virtual machine. Once the attach has been made, a tool agent can be started in the target virtual machine. For more information, see the attach documentation.

JConsole API

The package com.sun.tools.jconsole contains an Oracle extension to the Java Platform that provides a programmatic interface to access JConsole. For more information, see Using JConsole.

JDK Tools & Utilities

Documentation for the tools and utilities included in the JDK. Covers basic tools (javac, java, javadoc, apt, appletviewer, jar, jdb, javah, javap, extcheck), security tools, internationalization tools, RMI tools, IDL and RMI-IIOP tools, deployment tools, Java Plug-in tools, and Java Web Start tools, monitoring and management tools, and troubleshooting tools. For more information, see the JDK Tools and Utilities documentation.

Platforms

Oracle provides implementations of the JDK and Java Runtime Environment for Microsoft Windows, Linux, and the Solaris operating systems. See System Configurations for information about which versions of these platforms are supported.

Other companies may provide implementations of the Java platform for other operating systems such as Macintosh, AIX, etc.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java 2D Technology in Java SE 5.0

Documentation Contents

Enhancements in Java 2D in Java SE 5.0

  • Caching All BufferedImages
  • Methods for Controlling Hardware Acceleration of Images
  • Support for Hardware-Accelerated Rendering Using OpenGL
  • Solaris and Linux Support for CUPS Printers
  • Bicubic Interpolation
  • Creating Fonts from Files and Streams
  • Improved Text Rendering Performance and Reliability
  • Multilingual Text Rendering

Caching All BufferedImages

As of JDK 5.0, all images created with a BufferedImage constructor are now managed images and can be cached in video memory or, in the case of a remote X server, on the X server side. Earlier, implementations managed only compatible images: those created with the Component createImage(int, int) method or with the GraphicsConfiguration createCompatibleImage methods. Managed images generally perform better than unmanaged images.

Methods for Controlling Hardware Acceleration of Images

The bug report that corresponds to this change is: 4881082

The Image class has three new methods related to hardware acceleration. The getCapabilities method, formerly defined only in VolatileImage, allows you to determine whether the image is currently accelerated. Two other methods let you set or get a hint about how important acceleration is for the image: setAccelerationPriority and getAccelerationPriority.

The GraphicsConfiguration class has two new methods, createCompatibleVolatileImage(int, int, int) and createCompatibleVolatileImage(int, int, ImageCapabilities, int), that allow you to create transparent VolatileImages.

Note: In JDK 5.0, these methods are not fully operational. The value set by setAccelerationPriority is ignored, and images created with the createCompatibleVolatileImage methods are not always hardware accelerated. On Linux and Solaris systems, only OPAQUE VolatileImages are hardware accelerated. On Microsoft Windows systems, images created with createCompatibleVolatileImage in JDK 5.0 are hardware accelerated only if the hardware supports acceleration and one of the following is true:
  • The transparency value is OPAQUE.
  • The transparency value is TRANSLUCENT and translucency acceleration has been specifically enabled at runtime (sun.java2d.translaccel=true).
We expect to fully implement these methods on all platforms in future releases.

Support for Hardware-Accelerated Rendering Using OpenGL

The bug reports that correspond to this change are: 4607536 and 5008045.

JDK 5.0 includes a new OpenGL-based pipeline for Java 2D. This pipeline provides hardware acceleration for simple rendering operations (text, images, lines, and filled primitives) as well as those that involve complex transforms, paints, composites, and clips. This pipeline is available on all platforms (Solaris, Linux, and Microsoft Windows) and is currently disabled by default.

To silently enable the OpenGL-based pipeline, specify the following system property on the command line:

    -Dsun.java2d.opengl=true

To receive verbose console output about whether the OpenGL-based pipeline is initialized successfully for a particular screen, specify "True" (note the uppercase T):

    -Dsun.java2d.opengl=True

Minimum requirements for Solaris/Linux:

  • Hardware accelerated OpenGL/GLX libraries installed and configured properly
  • OpenGL version 1.2 or higher
  • GLX version 1.3 or higher
  • At least one TrueColor visual with an available stencil buffer

Minimum requirements for Microsoft Windows:

  • Hardware accelerated drivers supporting the WGL_ARB_pbuffer, WGL_ARB_render_texture, and WGL_ARB_pixel_format extensions
  • OpenGL version 1.2 or higher
  • At least one pixel format with an available stencil buffer

Solaris OpenGL Notes

The following framebuffers are known to work with the OpenGL-based Java 2D pipeline:

  • Expert3D
  • Expert3D Lite
  • XVR-500
  • XVR-600
  • XVR-1000
  • XVR-1200

Accelerated OpenGL libraries for the Solaris x86 platform are not available from Sun. However, third-parties such as Xi Graphics are known to support OpenGL libraries for Solaris x86.

Linux OpenGL Notes

Most Linux distributions include the Mesa 3D graphics library, which is a software implementation of the OpenGL specification. Since Mesa does not take advantage of hardware acceleration, it is likely that the OpenGL-based Java 2D pipeline will run much more slowly than the default (X11-based) pipeline. Therefore, to achieve optimal performance with the OpenGL-based pipeline, it is recommended that you install accelerated OpenGL drivers provided by your graphics hardware manufacturer.

The following web sites may have accelerated OpenGL drivers you can download.

  • Nvidia (GeForce 2 and above)
  • Others:
    • DRI Wiki
    • Xi Graph

Microsoft Windows OpenGL Notes

To achieve optimal performance with the OpenGL-based pipeline, install accelerated OpenGL drivers provided by your graphics hardware manufacturer. The following websites have accelerated OpenGL drivers available for download that are known to be compatible with the OpenGL-based Java 2D pipeline:

  • Nvidia (GeForce 2 and above)

Note: The latest drivers from both Nvidia and ATI have known issues on Microsoft Windows that might cause rendering artifacts in your application. We are actively investigating these driver bugs and are working with the manufacturers to have them resolved in future driver updates.

Solaris and Linux Support for CUPS Printers

The bug reports that correspond to this change are: 4641868 and 4683270

Solaris and Linux systems can now use printers configured as CUPS (Common UNIX Printing System) printers. This expands the printers the Java platform can use to all those supported by CUPS, including most PostScript and raster printers, making it much easier to use low-cost printers with Linux. CUPS is based on IPP (Internet Printing Protocol).

See CUPS for more information.

Bicubic Interpolation

The bug report that corresponds to this change is: 4200154

The 2D implementation now supports bicubic interpolation and uses it whenever requested. Previously, the VALUE_INTERPOLATION_BICUBIC hint defined by the RenderingHints class wasn't honored, and bilinear interpolation was used instead. Now the bicubic rendering hint is honored, and a new constant TYPE_BICUBIC has been added to AffineTransformOp.

Creating Fonts from Files and Streams

The bug reports that correspond to this change are: 4390880 and 4468862

It is now possible to create Font objects from Type 1 fonts and to create Font objects directly from files containing either Type 1 or TrueType font data.

To support the new functionality, the Font class has a new createFont method that creates Font objects from files. The pre-existing createFont method creates Font objects from streams. A new constant, Font.TYPE1_FONT, specifies Type 1 fonts to either createFont method.

Improved Text Rendering Performance and Reliability

The bug report that corresponds to this change is: 4641861

A number of internal changes to text rendering code greatly improve its robustness, performance, and scalability.

Multilingual Text Rendering

The bug report that corresponds to this change is: 4097028

2D text rendering using logical fonts now takes advantage of installed host OS fonts for all supported writing systems to render multilingual text. For example, if you run in a Thai locale environment but have Korean fonts installed, both Thai and Korean are rendered.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java SE 7

The following topics are covered:

  • XRender-Based Rendering Pipeline
  • Support for OpenType/CFF Fonts
  • TextLayout now Supports Tibetan Script
  • Better Support for Linux Fonts

XRender-Based Rendering Pipeline

A new XRender-based Java 2D rendering pipeline is supported for modern X11-based desktops, offering improved graphics performance. The pipeline is disabled by default, but may be enabled by setting the command line property -Dsun.java2d.xrender=true. Older X11 configurations may not be able to support XRender. The verbose form, -Dsun.java2d.xrender=True, can be used to enable a message to stdout indicating whether the pipeline was actually enabled.

This flag is listed in the System Properties for Java 2D Technology page.

Support for OpenType/CFF Fonts

The JDK now enumerates and displays installed OpenType/CFF fonts through methods such as GraphicsEnvironment.getAvailableFontFamilyNames; these fonts are also recognized by the Font.createFont method. See Selecting a Font in The Java Tutorials.

TextLayout Support for Tibetan Script

The TextLayout class supports Tibetan script.

Support for Linux Fonts

For Solaris and Windows, the logical fonts for the JDK are statically specified in the fontconfig.properties file. On various implementations of Linux, there is no assurance of the presence of particular fonts to support particular locales. As of Java SE 7, libfontconfig is used to select fonts to use for the logical fonts for "unrecognized" Linux platforms. See Fontconfig for more information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D API Specification

The following list contains all of the packages and classes included in the Java 2D API. Each item in the list is linked to its API documentation.
  • java.awt.color
    Provides classes for color spaces and color profiles based on the ICC Profile Format Specification.
  • java.awt.font
    Provides classes and interfaces relating to fonts and support for representing Type 1, Type 1 Multiple Master, OpenType, and TrueType fonts.
  • java.awt.geom
    Provides classes for defining and performing operations on two-dimensional geometric objects.
  • java.awt.image
    Provides classes for creating and modifying images, as well as image producers, consumers and filters for configuring image processing.
  • java.awt.print
    Provides classes and interfaces for printing two-dimensional objects and includes support for specifying document types, controlling page setup and page formats, and managing job control dialogs.
  • javax.print
    Provides the principal classes and interfaces for the Java Print Service API.
  • java.awt.image.renderable
    Provides classes and interfaces for producing rendering-independent images.

The java.awt package also includes classes that are part of the Java 2D API:

  • java.awt - Contains classes for generating user interfaces and painting graphics and images. The following java.awt classes are part of the Java 2D API.
    • java.awt.AlphaComposite
    • java.awt.BasicStroke
    • java.awt.Color
    • java.awt.Composite
    • java.awt.CompositeContext
    • java.awt.Font
    • java.awt.FontMetrics
    • java.awt.GradientPaint
    • java.awt.Graphics
    • java.awt.Graphics2D
    • java.awt.GraphicsConfigTemplate
    • java.awt.GraphicsConfiguration
    • java.awt.GraphicsDevice
    • java.awt.GraphicsEnvironment
    • java.awt.Image
    • java.awt.ImageCapabilities
    • java.awt.MediaTracker
    • java.awt.PageAttributes and its nested classes
    • java.awt.Paint
    • java.awt.PaintContext
    • java.awt.Point
    • java.awt.Polygon
    • java.awt.Rectangle
    • java.awt.RenderingHints and its nested class
    • java.awt.Shape
    • java.awt.Stroke
    • java.awt.TexturePaint
    • java.awt.Toolkit
    • java.awt.Transparency

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D Enhancements in the Java SE 6.0

Major Features:
  • Text rendering
  • Imaging
  • Geometry
  • Printing
Fixed Bugs
Known Bugs and Issues

Major Features

Text rendering

  • Font enhancements
    The following constants of the java.awt.Font class were introduced for canonical family names of the logical fonts:
    • DIALOG
    • DIALOG_INPUT
    • SANS_SERIF
    • SERIF
    • MONOSPACED
    Use the getFontRenderContext() method added to the FontMetrics class to create a FontRenderContext object according to the current hints and to measure text through the application.
    Java SE 6 introduced the new registerFont(Font font) method of the GraphicsEnvironment class that enables you to register a font created by using the Font.createFont(int, java.io.InputStream) method, or derived from a created font by using the Font.deriveFont(int, float) method. If registration is successful, the registerFont method returns true. The false value returned by the method means that the font you are trying to register is not a created font, or conflicts with a non-registered font already registered in this GraphicsEnvironment object.
    A new constructor of the java.awt.font.FontRenderContext class was introduced to create a FontRenderContext object with a specific antialiasing rendering hint or fractional rendering hint. The following methods were added to reflect the new functionality in Java SE 6.0:
    • isTransformed() — To indicate that the FontRenderContext object measures text in a transformed render context.
    • getTransformType() — To get the integer type of the affine transform.
    • getAntiAliasingHint() — To obtain the text anti-aliasing rendering mode hint that can be applied to the FontRenderContext object.
    • getFractionalMetricsHint() — To obtain the text fractional metrics rendering mode hint that can be applied to the FontRenderContext object.
    • getPixelBounds() — To get the pixel bounds of a TextLayout object. This method returns a Rectangle object defining the pixel bounds that are affected.
  • New text antialiasing mode
    Text antialiasing is a technique used to smooth the edges of text on a screen. The Java 2D API provides means to specify whether this technique should be used and what algorithm to use by applying a text rendering hint to the Graphics object. New text antialiasing methods optimized for LCD displays were added. They are enabled by default on some systems and can be controlled using corresponding keys and values defined in the RenderingHints class.

  • See the Displaying Antialiased Text by Using Rendering Hints and Controlling Rendering Quality sections of the Java Tutorial for more information about antialiasing.

  • Enhancements in graphic attributes
    Along with the getOutline(AffineTransform) method of the TextLayout class from earlier versions of JDK, the new getOutline method of the GraphicAttribute class enables you to get a Shape object representing the region that the GraphicAttribute object renders. The getOutline method of the ShapeGraphicAttribute class overrides its counterpart method in the GraphicsAttribute class to get the outline for the region that the ShapeGraphicAttribute object renders.

  • Layout path.
    The new LayoutPath class provides mapping between Point2D locations relative to the baseline and points in user space. Two methods of this class enable bidirectional mapping: a location to a point in the user coordinates and, conversely, a point in the user coordinates to a location. The getLayoutPath() method was added to the TextLayout class to obtain the layout path of the TextLayout object.

  • Text attributes
    New attributes were introduced in the TextAttribute class to enhance font visualization. The KERNING attribute enables you to request the integer kerning value to make the visual appearance of characters more pleasing. The KERNING_ON constant requests that the text be rendered such that spacing between glyphs is adjusted according to kerning pairs specified by fonts. Using the constant LIGATURES_ON value of the LIGATURES attribute requests that optional ligatures specified by the font should be applied. The TRACKING attribute is used to control how closely or loosely the glyphs are spaced. For example, the TRACKING_LOOSE constant allocates and distributes extra space between each glyph.

Imaging

  • A new method in the BufferStrategy class
    The dispose() method was added to the java.awt.image.BufferStrategy class to improve system resources management. The new method releases system resources consumed by the BufferStrategy object. Additionally, the method removes this BufferStrategy object from the associated Component instance.

Geometry

  • Easy compositing
    The following methods were added to the AlphaComposite class to obtain an AlphaComposite object that uses the specified compositing rule or the alpha value:
    • public AlphaComposite derive(int rule)
    • public AlphaComposite derive(float alpha)

    The two methods enable developers to code various compositing effects and avoid more complex usage of the getInstance method.

  • Composite alpha0 = null, alpha1 = null;

alpha0 = AlphaComposite.SrcOver.derive(alpha);
alpha1 = AlphaComposite.SrcOver.derive(1-alpha)
  • Gradient painting capabilities
    The LinearGradientPaint and RadialGradientPaint classes that extend the MultipleGradientPaint class fill a Shape object with the particular color gradient pattern. The MultipleGradientPaint.CycleMethod enum is used to handle painting outside gradient bounds by disabling (CycleMethod.NO_CYCLE), reflecting (CycleMethod.REFLECT), or repeating (CycleMethod.REPEAT) painting.
         Point2D start = new Point2D.Float(0, 0);
     Point2D end = new Point2D.Float(100, 100);
     float[] dist = {0.0f, 0.2f, 1.0f};
     Color[] colors = {Color.BLACK, Color.WHITE, Color.GRAY};
     LinearGradientPaint p =
          new LinearGradientPaint(start, end, dist, colors, CycleMethod.REFLECT);
  • Rotation around an anchor point
    In addition to the existing means of rotation using an anchor point, Java SE 6.0 enables a graphic object to be rotated according to a rotation vector or around an anchor point according to a rotation vector. The following methods were introduced in the AffineTransform class to support the new functionality:

    • public static AffineTransform getRotateInstance(double vecx, double vecy)
    • public static AffineTransform getRotateInstance(double vecx, double vecy, double anchorx, double anchory)
    • public static AffineTransform getQuadrantRotateInstance(int numquadrants)
    • public static AffineTransform getQuadrantRotateInstance(int numquadrants, double anchorx, double anchory)
    • public void rotate(double vecx, double vecy)
    • public void rotate(double vecx, double vecy, double anchorx, double anchory)
    • public void quadrantRotate(int numquadrants)
    • public void quadrantRotate(int numquadrants, double anchorx, double anchory)
    • public void setToRotation(double vecx, double vecy)
    • public void setToRotation(double vecx, double vecy, double anchorx, double anchory

    The setToQuadrantRotation(int numquadrants) method enables rotation by the specified number of quadrants. Its counterpart rotates coordinates by the specified number of quadrants around the specified anchor point.

  • Easy way to get inverted transform
    A new method in the AffineTransform class improves inverse transformation capabilities. While the createInverse method appeared in Java SE 1.2 and transformed a shape's coordinates back to their original locations, the new invert() method enables setting the current transform to the inverse state of itself.

  • Double precision for the GeneralPath class
    For a long time the Java 2D API lacked a double version of the GeneralPath class. The Path2D class represents a path that can be iterated by the PathIterator interface and has two subclasses: Path2D.Float and Path2D.Double. In the changed hierarchy, the GeneralPath class became a subclass of the Path2D.Float class. They both can be used for single point precision, while the Path2D.Double class can be applied for double point precision. One reason to use the Path2D.Float class over the GeneralPath class is to make your code more consistence and explicit if both single and double precision types are employed in the application.

  • New hashCode() and equals() methods in shape classes
    Since JDK 1.2, the Rectangle2D class has contained the hashCode() and equals() methods, while the other subclasses of the RectangularShape class lacked the same functionality. JDK 6.0 fills this gap by adding the hashCode() and equals() method to the Arc2D, Ellipse2D, and RoundRectangle2D classes.

Printing

  • Enhancement in the PrinterJob class
    The getPageFormat method was added to the JDK 6.0 as a convenience method to more easily convert from a description of a page using attributes to a PageFormat object.

Fixed Bugs

6182443 Rotated antialiased text is too light gray:

This bug is essentially side effect of turning off hinting for non-quadrant transforms. The problem was resolved as a part of the fix for 4654540.

4151279 Visual artifacts appear while rendering ovals, arcs, and rounded rectangles:

A separate pipeline was developed for drawing cubic and quad Bezier curves, where an adaptive forward differencing was applied. This approach noticeably improves quality and speeds up Bezier curve drawing.

4924220 Microsoft Sans Serif (True Type) font is not rendered properly:

The Microsoft Sans serif font glyph looked broken due to the current implementation of scan conversion algorithms. The smart dropout mechanism is added as part of the fix for the 6282527 bug.

6300721 Creating Animated GIF images repeatedly with different image frames crashes the VM:

The VM crash appeared as a stomp over memory in the Java heap as if code had gone off the end of an array. The fix checks the dimensions in the image representation code when the first portion of image is gotten. If the dimensions do not match, the internal buffered image is recreated.

6279846 Pixel values are different when source and destination ColorSpace supplied to a ColorConvertOp instance are the same:

If the source and destination ColorSpace objects supplied to a ColorConvertOp instance were the same, pixel values were different between the color converted destination and the original source. This bug is fixed by updating the sRGB profile and creating fast track (without any color transforms).

4654540 Need hinting support for text rendering with scaled and flipped matrices:

Truetype hinting was designed with the assumption that the orientation of glyphs regarding pixel grids would be fixed. That is why truetype hinting did not support complex affine transforms such as rotation, or shear, and scale transforms. As a fix the following approaches are implemented:

  • Decompose the original transform to bitmap transform (combination of quadrant rotation and mirror) and remainder transform
  • Further decompose the remainder transform to safe hinting transform and outline the compensation transform
  • Perform hinting with safe transform
  • Apply compensation transform to the hinted outline
  • Perform scan conversion
  • Apply bitmap transform

6397684 Setting a PrintService object without a name crashes the JVM:

If a PrintService object was set without a name (the getName() methods return null) then the JVM crashed. The problem was caused by the specific user's implementation: the PrintService interface had the getName() function that returned null and this null value was passed to the native function setNativePrintService.

6444688 Printing IndexColorModel images with a transparent pixel may fail on Windows:

Printing an image with bitmask transparency was sometimes incorrect on the Windows platform. A problem existed with the bitmask transparency case. Printing code handled the bitmask transparency as multiple smaller sub images of the original image. The fix includes the simplest and least risky solution: always creating a copy of an image.

6320281 Type1 hinting support is missed :

Before JDK 6 the java font rasterizer only supported hinting for Truetype fonts. However, Type1 fonts were commonplace on Solaris and Linux platforms and they often did not look very customary without hinting. To support the type1 hints the functionality is implemented:

  • hstem and vstem
  • dotsection
  • BlueValues and OtherBlues
  • type1 hint replacements

4912220 1.4 REGRESSION: Flipping with asymmetric scaling often distorts fonts :

Truetype hinting was designed without support for arbitrary transforms. To overcome this limitation, hints are applied with a "safe" identity matrix and then with a transform hinted outline when non-trival transform is requested. The problem was resolved as a part of the fix for 4654540.

5051527 Faster, more direct software transformation of images:

The code to transform images used an image processing library to perform the operation. This approach required at least one intermediate buffer to be created for each transform operation. The new code enables you to transform any of the internally handled formats and composite to any of the internally handled formats in one operation with only a minimal stack-allocated one-line pixel buffer.

Known Bugs and Issues

6343853

On Windows Vista, the use of DirectDraw for hardware acceleration is currently disabled by default because of incompatibilities with Vista's Desktop Window Manager.

The -Dsun.java2d.noddraw=false property can be used to re-enable the use of the DirectDraw pipeline. However, this is not recommended due to rendering artifacts and performance problems. To also enable the Direct3D pipeline, a combination of the aforementioned flag and -Dsun.java2d.d3d=true should be used.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D Features in Java SE 1.4

  • New Pipeline Architecture
  • Hardware Acceleration for OffscreenImages
  • Pluggable Image I/OFramework
  • New Java Print Service API
  • Support for additional ImageTypes
  • Public Bidi Algorithm
  • Font Rasterizer support for TrueType Hinting
  • Hinted Lucida Fonts
  • OpenType Font Table Support
  • Support for Numeric Shaping
  • Improved Complex Text Layout Support
  • Complete Porter-Duff Support
  • Support for Checking if Font has a Transform
  • New Equality Methods for FontRenderContext

New Pipeline Architecture

The bugtraq reports that correspond to this change are: 4228939 and 4268962

In the JDK 1.2 and 1.3 common operations on a Graphics object often invalidated the rendering data cached for this Graphics object. This invalidation interrupted the rendering process by causing continuous re-creation of rendering information for the Graphics object, even for such simple and benign operations as create(), setColor(), and translate(). Because the rendering of Swing hierarchies relies heavily on these common operations, the invalidation and re-creation of rendering data caused poor repaint performance for many Swing applications.

The new pipeline architecture reduces this performance overhead with several implementation changes that:

  • Improve the way that data is shared by the various rendering pipelines.
  • Reduce the amount of code executed and garbage created when responding to changes in the rendering attributes.
  • Improve the way that various graphics routines are chosen such as the routines that copy pixels from one format and location to another.
These changes are especially noticeable when the following calls are used frequently, as they are in Swing applications:
  • getGraphics, Graphics.create() and Graphics.dispose()
  • Graphics.setColor(), Graphics.translate
  • Graphics.copyArea, especially when the source and destination regions overlap.
The runtime footprint should also be improved through better code sharing.

Other changes in the pipeline architecture have greatly improved the performance of:

  • draw(Shape) and fill(Shape), especially when the Shape is a GeneralPath
  • scaled drawImage.
  • Blitting from an offscreen image created with createImage() multiple times without any intervening rendering or modifications to that image
  • Remote X11 display over the network of applications that use createImage() to create an image buffer for double buffering.
  • Rendering non-opaque text.
  • Systems, such as the SGI Visual 320 workstation, which have display cards that use an RGBx format for pixel storage.
  • Rendering coordinates outside of the range -32768 to 32767 with antialiasing turned off.
For more information on this feature, see the whitepaper, High Performance Graphics.

Hardware Acceleration for Offscreen Images

The bugtraq report that corresponds to this change is: 4330166

The JDK 1.4 provides access to hardware acceleration for offscreen images, resulting in better performance of rendering to and copying from these images. One problem with hardware-accelerated images is that, on some platforms such as Microsoft Windows, their contents can be lost at any time due to circumstances beyond the application's control. The new VolatileImage class allows you to create a hardware-accelerated offscreen image and manage the contents of that image.

This new API includes:

  • java.awt.image.VolatileImage:
    This class represents an image whose content can be lost at any time, but provides performance benefits. For example, on Microsoft Windows this image can be stored in VRAM and can benefit from hardware acceleration. The class includes methods that you can call to find out if the contents of the image need to be restored.
  • createVolatileImage(w,h) in Component.
    This method creates a VolatileImage that is compatible with the Component.
  • createCompatibleVolatileImage(int width, int height)
    This method creates a VolatileImage that is compatible with the GraphicsConfiguration.
  • GraphicsDevice.getAvailableAcceleratedMemory
    This method returns the number of bytes of available accelerated memory.

Pluggable Image I/O Framework

The bugtraq report that corresponds to this change is: 4101949

The Java Image I/O API is an pluggable, extensible framework that supports reading and writing images of various formats and protocols. The API provides this support through plug-ins, most of which will be written by third parties. A conforming implementation will only be required to provide a minimal set of plug-ins, principally for compatibility with previous versions of the Java SDK. An application using this API should be able to read and write images without knowing the image's storage format or the plug-in used to support the format.

Fundamentally, all image I/O operations consist of reading or writing streams that contain one or more images, one or more preview (thumbnail) images associated with each image, and metadata, which is everything other than pixel data.

The Java Image I/O API allows applications to:

  • Auto-detect installed plug-ins
  • Choose plug-ins based on format name, file suffix, file contents, or MIME type
  • Access individual images in multi-image files
  • Monitor reading and writing progress
  • Provide progressive updates of images being loaded
  • Read or write only a region of interest of an image
  • Read only selected bands of an image
  • Choose the output size of resolution-independent imagery
  • Retrieve detailed image and stream metadata
  • Work with unknown formats using generic interfaces
  • Work efficiently with both random-access and streaming data sources
  • Transcode between different formats

See Java Image I/O for more information on the Java Image I/O API.

New Java Print Service

The bugtraq reports that corresponds to this change are:
4285177 and 4360752

This API is the product of JSR006, Unified Printing API, and will allow client applications to provide rich access to the capablities of print services available including:

  • Printer browsing and selection
  • Discovery of the capablities of printers
  • Selection of printers for a printer job
  • Specification of a printer job.
Since all capabilities will be exposed through the API, server applications become first class citizens of this API.

Server applications can be beneficiaries of the capabilities for spooling documents to print services, whereas previously only graphics calls could be used to generate printer jobs from Java applications.

See Java Print Service for more information.

Support for float and double Image Types

The bugtraq report that corresponds to this change is: 4364491

Prior to the SDK 1.4, the Java 2D API did not have DataBuffer subclasses for float or double sample types. The Java Image I/O API needs these classes to read and write float and double image types.

The SDK 1.4 contains two new classes to provide float and double image type support: DataBufferFloat and DataBufferDouble. The DataBufferFloat class wraps float arrays of pixels. The DataBufferDouble class wraps double arrays of pixels.

The existing ComponentColorModel and ComponentSampleModel class implementations have also been updated to support signed short,float, and double data. These classes include definitions of the normalized ranges of component values for the newly-supported data types:

  • For the existing data types, the range remains 0.0 to 1.0.
  • For short data, the values are scaled to between -1.0 and 1.0.
  • For float data, the range is the full range of the float primitive type.
  • For double data, the range is also the range of the float primitive type, since values must be cast to float to interact with the ColorSpace class.
The ComponentColorModel class will not clamp the pixel data. Applications are expected to scale to the appropriate range. Methods are added to the ColorSpace class to determine per component minimum and maximum normalized values. Alpha component values must still range from 0.0 to 1.0 normalized.

The complete additional API is listed below.

java.awt.image.ColorModel includes three new methods to parallel existing methods:

  • getDataElement(float[] normComponents, int normOffset)
  • getDataElements(float[] normComponents, int normOffset, Object obj)
  • getNormalizedComponents(Object pixel, float[] normComponents, int normOffset)
java.awt.image.ComponentColorModel includes a new constructor based on the new datatypes and new methods to override the existing ColorModel methods:
  • ComponentColorModel(ColorSpace colorSpace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
  • getRed(Object inData)
  • getGreen(Object inData)
  • getBlue(Object inData)
  • getAlpha(Object inData)
  • getDataElements(int rgb, Object pixel)
  • coerceData(WritableRaster raster, boolean isAlphaPremultiplied)
  • createCompatibleWritableRaster(int w, int h)
  • createCompatibleSampleModel(int w, int h)
java.awt.image.SampleModel includes two new methods to accept the new datatypes:
  • getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
  • setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
java.awt.image.ComponentSampleModel includes two methods to accept the new datatypes:
  • createDataBuffer()
  • getDataElements(int x, int y, Object obj, DataBuffer data)
java.awt.image.BandedSampleModel has three methods that were edited to accept the new datatypes:
  • createDataBuffer()
  • getDataElements(int x, int y, Object obj, DataBuffer data)
  • setDataElements(int x, int y, Object obj, DataBuffer data)
java.awt.color.ColorSpace includes two new methods determine per component minimum and maximum normalized values:
  • getMinValue(int component)
  • getMaxValue(int component)
java.awt.color.ICC_ColorSpace includes new methods override the two new ColorSpace methods.

Public Bidi Algorithm

The bugtraq report that corresponds to this change is: 4285083

The Unicode Bidirectional Algorithm analyzes text using the Unicode character properties and determines the direction of runs of the text. The algorithm is necessary to properly display bidirectional text, such as Hebrew and Arabic text, in the correct order.

The current implementation is all written in the Java programming language, but the SDK 1.4 will include efficient access from native font code so that Hebrew and Arabic text can be more efficiently rendered. The SDK 1.4 will provide access to the native code through the Java Native Interface.

The new public Bidi class implements the Unicode 3.0 Bidi Algorithm and allows access to information on the bidirectional reordering of text so that the mixed, bidirectional text is properly displayed.

The example BidiSample demonstrates some of the Bidi routines.

Font Rasterizer support for TrueType hinting

Before this release, the T2K font rasterizer used by Java 2D did not support font-hinting for TrueType fonts. As a result, when TrueType fonts did not always display with a consistent, attractive appearance. For this release, the T2K rasterizer has been modified to use the hints stored in the TrueType fonts.

By adding this functionality to the T2K rasterizer, dependency on native rasterizers has been greatly reduced. Reducing this dependency results in:

  • Greater portability because hinting of TrueType fonts is performed by the cross-platform T2K rasterizer, not the native rasterizer.
  • More consistent metrics display of TrueType fonts because the same rasterizer is being used for on-screen and off-screen drawing.

Hinted Lucida Fonts

The bugtraq report that corresponds to this change is: 4285089

For the SDK 1.4, the Lucida fonts that are in the Java SE will be upgraded to contain hints. This will give the Java SE higher quality fonts that could be used in place of existing fonts or if no other fonts are available. Adding hints to the Lucida fonts also allows the new cross-platform rasterizer to hint the Lucida fonts contained in the SDK, which causes the Lucida fonts to be displayed in a more consistent and attractive manner.

OpenType Font Table Support

The bugtraq report that corresponds to this change is: 4285161

The SDK 1.4 includes a new architecture for providing general OpenType font support. This new architecture provides international character support for contextual scripts like Thai, Indic, Arabic, and Hebrew. It also provides enhanced typographical support for Roman languages.

Support for Numeric Shaping

The bugtraq report that corresponds to this change is: 4210199

Currently, when Java 2D renders numerals surrounded by Arabic text, the numerals have Arabic (roman) shapes, which are the commonly expected numeral shapes in most western countries. However, people in a Hindi locale expect to see Hindi shapes.

A new attribute, TextAttribute.NUMERIC_SHAPING, and a new class, NumericShaper, enable you to shape ASCII digits to other Unicode decimal ranges.

For example, to cause a TextLayout instance to convert digits from European to Arabic:

  1. Create a NumericShaper that shapes ARABIC digits:
          Numeric Shaper nS
         = NumericShaper.getContextualShaper(NumericShaper.ARABIC)
  2. Add the NumericShaper to an attribute Map along with the key value of TextAttribute.NUMERIC_SHAPING:
          Map map = new HashMap();
      map.put(TextAttribute.NUMERIC_SHAPING, nS);
  3. Create a TextLayout with the attribute Map:
          FontRenderContext frc = ...;
      TextLayout layout = new TextLayout(text, map, frc);
  4. Render the text:
          layout.draw(g2d, x, y);

The NumericShaper class includes 19 constants representing different Unicode decimal ranges, allowing you to convert to 19 different digit shapes, including Devanagari and Thai.

Improved Complex-Layout Support in GlyphVector

Prior to this release, clients could not access glyph-to-character mapping information from GlyphVector. Clients can use this information to find out which glyphs in the GlyphVector correspond to which characters. This release also defines new methods to get the precise bounds of the GlyphVector and of individual glyphs within a GlyphVector.

Note: Although clients can use GlyphVector and the glyph-to-character mapping information to implement selection and hit testing, most clients will find TextLayout and the Swing JTextArea and JTextField classes to be more useful and convenient.

These GlyphVector methods are new in the SDK 1.4:

  • getGlyphCharIndex(int glyphIndex)
    Returns the character index of the specified glyph. The character index is the index of the first logical character represented by the glyph.
  • getGlyphCharIndices(int beginGlyphIndex, int numEntries, int[] codeReturn)
    Returns the character indices of the specified glyphs.
  • getGlyphOutline(int glyphIndex, float x, float y)
    Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector, offset to x, y.
  • getPixelBounds(FontRenderContext renderFRC, float x, float y)
    Returns the pixel bounds of this GlyphVector when rendered in a graphics with the given FontRenderContext at the given location.
  • getGlyphPixelBounds(int index, FontRenderContext renderFRC, float x, float y)
    Returns the pixel bounds of the glyph at index when this GlyphVector is rendered in a Graphics with the given FontRenderContext at the given location.
These new GlyphMetrics methods deal with transformed fonts:
  • getAdvanceX()
    Returns the x-component of the advance of the glyph.
  • getAdvanceY
    Returns the y-component of the advance of the glyph.
Complete Porter-Duff Support

The bugtraq report that corresponds to this change is: 4380232

The AlphaComposite class provides alpha blending capabilities according to modes or rules established by Porter and Duff. Out of the 12 rules that Porter and Duff identified, the AlphaComposite API for the SDK, version 1.3 defines and implements only 8 of them:

  • Clear
  • A (Src)
  • A over B (SrcOver)
  • B over A (DstOver)
  • A in B (SrcIn)
  • B in A (DstIn)
  • A held out by B (SrcOut)
  • B held out by A (DstOut)

For the SDK 1.4, AlphaComposite implements the remaining 4 Porter-Duff rules:

  • B (Dst)
  • A atop B (SrcAtop)
  • B atop A (DstAtop)
  • A xor B (Xor)

Support for Checking if Font has a Transform

The bugtraq report that corresponds to this change is: 4314043

As of the SDK 1.2 the Font object has a transform attribute that can be accessed with the Font.getTransform method. You can perform geometric transformations, such as rotating and shearing, on the Font by setting the transform attribute. However, most applications use the Size attribute rather than the transform to control the size and shape of characters. In this case, the transform is a simple identity transform.

Currently, the only way to determine if the transform is an identity transform is to call getTransform and inspect the returned AffineTransform. Unfortunately, calling getTransform requires the Font object to clone the AffineTransform because the transform is mutable.

Two new methods in the SDK 1.4 allow you to check if a Font object's transform is an identity tranform without creating a new AffineTransform:

  • java.awt.Font.isTransformed:
    Returns true if this Font object has a non-identity AffineTransform attribute.
  • java.awt.font.TransformAttribute.isIdentity:
    Returns true if the wrapped transform is an identity transform.
New Equality Methods for FontRenderContext

The bugtraq report that corresponds to this change is: 4328579

A FontRenderContext object encapsulates state about the graphics context and is used by GlyphVector and TextLayout. Three new methods in FontRenderContext allow you to compare the FontRenderContext in the GlyphVector against the one in the graphics context into which the GlyphVector draws:

  • equals(FontRenderContext)
  • equals(Object)
  • hashCode()
These equals methods also have performance benefits because a client does not have to create an AffineTransform to perform an equality test.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D Graphics and Imaging

The Java 2D API is a set of classes for advanced 2D graphics and imaging. It encompasses line art, text, and images in a single comprehensive model. The API provides extensive support for image compositing and alpha channel images, a set of classes to provide accurate color space definition and conversion, and a rich set of display-oriented imaging operators. These classes are provided as additions to the java.awt and java.awt.image packages.

Overview

  • Java 2D API Overview from the Programmer's Guide to the Java 2D API.

API Specification

  • Java 2D API Specification - a list of the packages and classes included in the Java 2D API.

Tutorials and Programmer's Guides

  • Java 2D API Guide: Enhanced Graphics and Imaging for Java.
    Read the README for instructions on how to run the code samples used in the Imaging chapter of the Java2D API Guide.
  • The 2D Graphics trail in The Java Tutorial demonstrates how to display and print 2D graphics.

API Enhancements

  • Enhancements in Java SE 7
  • Enhancements in Java SE 6.0
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4

More Information

  • System Properties for Java 2D Technology - A list of unsupported properties that you can use to customize how the 2D painting system operates.
  • The Java 2D Home Page
  • The JFC Home Page
  • High Performance Graphics White Paper
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


System Properties for Java 2D Technology

This document describes several unsupported properties that you can use to customize how the 2D painting system operates. You might use these properties to improve performance, fix incorrect rendering, or avoid system crashes under certain configurations. For example, on a small set of Microsoft Windows computers with bad DirectDraw or Direct3D drivers, the use of hardware-accelerated rendering might cause system crashes. You can use properties to specify that on these computers, the Java 2D system shouldn't use DirectDraw or Direct3D.

Warning: Take care when using these properties. Some of them are unsupported for very practical reasons. For example, some behaviors are disabled by default due to driver instabilities; enabling such behaviors could cause system instabilities on some configurations.

Since these properties have the sole purpose of enabling or disabling implementation-specific behaviors, they are subject to change or removal without notification. Some properties might work only on the exact product releases for which they are documented.

2D properties have the prefix sun.java2d.. To specify them, you can use either command-line flags or the _JAVA_OPTIONS environment variable. For example, you can specify the 2D trace property with a flag when running an application, like this:

java -Dsun.java2d.trace=log SomeApp
Or you can specify it by setting _JAVA_OPTIONS before running the application, like this:
export _JAVA_OPTIONS='-Dsun.java2d.trace=log' (Solaris, Linux, or Mac OS X bash shell)
java SomeApp

Some system properties are also settable using environment variables. For example, the d3d property has the equivalent environment variable J2D_D3D. The property description lists the equivalent environment variable, if one exists.

Note: See the High Performance Graphics White Paper for explanations of terms used in property descriptions.

This document lists the following properties:

  • System Properties for All Platforms
    • opengl
    • trace
    • awt.useSystemAAFontSettings
  • System Properties for Microsoft Windows Platforms
    • accthreshold
    • d3d
    • d3dtexbpp
    • ddforcevram
    • ddoffscreen
    • ddscale
    • noddraw
    • translaccel
  • System Properties for Linux and Solaris Platforms
    • NO_J2D_DGA
    • J2D_PIXMAPS
    • xrender
    • pmoffscreen

System Properties for All Platforms

opengl

Intended use: To enable the OpenGL-based pipeline, which provides hardware acceleration.
Introduced: 1.5 Beta 1 (Solaris/Linux); 1.5 Beta 2 (Microsoft Windows)
Default value: false
How to use: To silently enable the OpenGL-based pipeline, set this property to true:

-Dsun.java2d.opengl=true

To receive verbose console output about whether the OpenGL-based pipeline is initialized successfully for a particular screen, set this property to True (note the uppercase T):

-Dsun.java2d.opengl=True

An OpenGL-based pipeline for Java 2D was introduced in 1.5 Beta 1 for Solaris/Linux and 1.5 Beta 2 for Microsoft Windows platforms. This pipeline is currently disabled by default. It provides hardware acceleration for simple rendering operations (text, images, lines, and filled primitives) as well as those that involve complex transforms, paints, composites, and clips.

For more information: The OpenGL section of New Java 2D Features in the Java 2 SDK, v1.5.

trace

Intended use: To help determine the source of less-than-desirable graphics performance.
Introduced: 1.4
How to use: If your application is experiencing less-than-desirable performance, the trace runtime flag can help you determine the source of the problem. The flag is specified with a list of options:

    -Dsun.java2d.trace=[log[,timestamp]],[count],[out:<filename>],[help],[verbose]

The options are:

log
print out the name of each primitive as it is executed
timestamp
precede each log entry with the currentTimeMillis()
count
at exit, print out a count of each primitive used
out:<filename>
send output (logging and counts) to the indicated file
help
print out a short usage statement
verbose
print out a summary of the options chosen for this run

If you use the log option, the Java runtime will print the executed primitives' names, most of which will be in this format:

    <classname>.<methodname>(<src>,<composite>,<dst>)

The methodname represents the basic graphics operation that is used to do the actual rendering work of a Graphics method invocation. These method names will not necessarily map directly to methods on the Graphics object, nor will the number of calls made on the Graphics object map directly to the number of primitive operations performed.

The src and dst represent the type of surfaces or source data involved in the operation.

The composite names match the names in the AlphaComposite class fairly closely with the suffix "NoEa" meaning that the AlphaComposite instance had an "extra alpha" attribute of 1.0. The "SrcNoEa" type is the most commonly used composite type and represents the simplest way of transferring pixels with no blending required. "SrcNoEa" is often used behind the scenes even though the default composite is "SrcOver" when opaque colors and images are rendered because the two operations are indistinguishable for opaque source pixels.

Platform rendering pipelines are sometimes used for doing opaque operations on surfaces accessible by a platform renderer, such as X11, GDI, or DirectDraw. Their names currently use a simplified naming format, which has a prefix for the platform renderer and the name of the operation but without any classname or operand type list. Examples are "X11DrawLine", "GDIFillOval", and "DXFillRect". In the future these names should more closely approximate the names of the other primitives.

awt.useSystemAAFontSettings

Intended use:To override what text anti-aliasing settings are identified as being "desktop settings".
Introduced: 1.6
Default value:true.
How to use:Set on the command line or in a webstart jnlp file as one of the specified values below to control rendering hints used by Swing text.

Strictly this flag doesn't control Java 2D but is documented here because the values all directly map to Java 2D text antialiasing rendering hints values.

What the flag really does is override what the JRE reads from the user's desktop settings as the user's desktop antialiased text preferences. Swing instructs Java 2D to render Swing text to match that preference, so by overriding it you can control Swing text. This applies to standard Swing components (like JTextArea, JButton) in the Metal L&F (aka Java L&F) and native (Windows, GTK) Swing L&Fs. It should also apply to any custom component or L&F which picks up the same property.

For information on the desktop setting this overrides see AWT Desktop Properties

There aren't many reasons for you to specify this property but a couple are

  • The desktop setting you want isn't supported on your desktop (eg you want LCD text on Windows 2000)
  • JRE doesn't recognise your desktop setting (eg KDE)
  • You are automating testing under each of these conditions
System Property Value   | java.awt.RenderingHint value
"off"|"false"|"default" : VALUE_TEXT_ANTIALIAS_DEFAULT
"on"                    : VALUE_TEXT_ANTIALIAS_ON
"gasp"                  : VALUE_TEXT_ANTIALIAS_GASP
"lcd"|"lcd_hrgb"        : VALUE_TEXT_ANTIALIAS_LCD_HRGB
"lcd_hbgr"              : VALUE_TEXT_ANTIALIAS_LCD_HBGR
"lcd_vrgb"              : VALUE_TEXT_ANTIALIAS_LCD_VRGB
"lcd_vbgr"              : VALUE_TEXT_ANTIALIAS_LCD_VBGR

System Properties for Microsoft Windows Platforms

accthreshold

Obsoleted in: Java SE 6 Update 10
Intended use: To determine how many copies from managed images will occur before a VRAM version of the image is automatically created.
Introduced: 1.4.1_02
Default value: 1
How to use: To force accelerated surfaces to be created during image initialization, set the value to 0, as follows:

-Dsun.java2d.accthreshold=0

This property can be used to eliminate the initial delay in rendering when the images are being copied to the VRAM after the first few copies. Instead, the delay is effectively shifted to the image creation time.

This could be useful behavior when you know that your application will be able to take advantage of image management; just get the overhead of the copy over with at the start instead of incurring some number of slower copies to begin with and then having the copy overhead at some later time.

d3d

Intended use: To turn off the Java 2D system's use of Direct3D.
Introduced: 1.4.1_02
Equivalent environment variable: J2D_D3D
How to use: On a small subset of Windows 2000 systems with buggy Direct3D drivers, the use of Direct3D can cause a system crash. To turn off the use of Direct3D, set this property to false:
-Dsun.java2d.d3d=false
If problems persist, try setting the ddoffscreen property to false. If that doesn't solve the problems, try setting noddraw to true.

d3dtexbpp

Obsoleted in: Java SE 6 Update 10
Intended use: To specify that accelerated surfaces for managed or translucent images should be in 16-bit (4444) format, which saves VRAM and system memory but at the cost of decreased quality.
Introduced: 1.4.1_02
Default value: 32
How to use: To turn on 4444 format, set this property to 16:

-Dsun.java2d.d3dtexbpp=16
Note: The d3dtexbpp property has no effect if the OpenGL pipeline is in use.

When this property is set to 16, it forces the accelerated surfaces for managed images (created with GraphicsConfiguration.createCompatibleImage(w,h, TRANSLUCENT)) or translucent images loaded with Toolkit.getImage to be in 4444 format. The system memory surface for these images will be in 4444 format as well.

This option is useful when you have lots of images to be stored in VRAM. The downside is poorer quality.

This option is also useful for computers with video boards (such as 3dfx Voodoo3) that don't support 32-bit textures. When the Java 2D system uses 32-bit textures, as it does by default, then when it encounters a card without 32-bit texture support it disables support for accelerated translucent images. If you want acceleration of translucent images on a video board that doesn't support 32-bit textures, set the d3dtexbpp property to 16.

ddforcevram

Obsoleted in: Java SE 6 Update 10
Intended use: To specify whether VolatileImages should be kept in VRAM.
Introduced: 1.4.1_02
Default value: false in 1.4; as of 1.5 Beta 1, true if translaccel is true, and otherwise false
How to use: Normally, if the 2D system is using the DirectDraw/Direct3D pipeline and detects that an image in video memory is being read from too often (an expensive operation), it punts it to a system memory surface, which is faster to read from. Later, if the system detects that the user is copying from this surface to an accelerated surface again, it promotes it to the video memory. Setting this property to true disables the punting mechanism and always keeps the image in video memory.

Note: The ddforcevram property has no effect if the OpenGL pipeline is in use.

Although this property is often used with the translaccel property, it can be used separately. To set this property to true, either set translaccel to true in a 1.5 release, or set it separately:

-Dsun.java2d.ddforcevram=true

ddoffscreen

Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.ddoffscreen=false is now interpreted exactly the same as disabling that via sun.java2d.d3d=false.
Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D for offscreen surfaces such as the Swing back buffer.
Introduced: 1.4
Default value: true
How to use: Setting this flag to false turns off DirectDraw offscreen surfaces acceleration.

ddscale

Obsoleted in: Java SE 6 Update 10
Intended use: To turn on hardware-accelerated scaling when the DirectDraw/Direct3D pipeline is in use.
Introduced: 1.2
Default value: false
How to use: Setting this flag to true enables hardware-accelerated scaling if the DirectDraw/Direct3D pipeline is in use. DirectDraw/Direct3D hardware scaling is disabled by default to avoid rendering artifacts in existing applications. These rendering artifacts are caused by possible inconsistencies between the scale method that the software scaling operation uses (nearest neighbor) and the different scale methods that video cards use. Certain events that occur while an application is running might cause a scaled image to be rendered partially with hardware scaling operations and partially with software scaling operations, resulting in an inconsistent appearance. For now, you can enable acceleration by setting the ddscale flag to true.

Note: The ddscale property has no effect if the OpenGL pipeline is in use.

For more information: High Performance Graphics White Paper

noddraw

Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false.
Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D completely.
Introduced: 1.2
Default value: false
How to use: Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of rendering problems on Win32.

translaccel

Obsoleted in: Java SE 6 Update 10
Intended use: To specify whether translucent images should be hardware-accelerated when the DirectDraw/Direct3D pipeline is in use.
Introduced: 1.4.1_02
Default value: false
How to use: When the DirectDraw/Direct3D pipeline is being used, both translaccel and ddforcevram must be true for translucent images to be accelerated.

Note: The translaccel property has no effect if the OpenGL pipeline is in use.

To turn on acceleration of translucent images in 1.4 and 1.5:

-Dsun.java2d.translaccel=true
-Dsun.java2d.ddforcevram=true //unnecessary as of 1.5 Beta 1

When both these properties are true, the Java 2D system attempts to put translucent images into VRAM and use Direct3D for rendering (compositing) them to the screen or to a VolatileImage. Only translation transforms are supported (no rotation, scaling, and so on). Before 1.5, to be accelerated a translucent image had to be created in one of the following ways:

  • GraphicsConfiguration.createCompatibleImage(w,h, Transparency.TRANSLUCENT)
  • Images loaded with Toolkit.getImage() that have a translucent color model
As of 1.5, translucent images created with a BufferedImage constructor can also be accelerated. To find out whether an image can be accelerated on a particular device, you can use the Image getCapabilities method to get an ImageCapabilities object, which you can query using the isAccelerated method. Note that a managed image gets accelerated only after a certain number of copies to the screen or to another accelerated surface.

The following code fragment illustrates the use of accelerated images. The fragment assumes that back buffer is a VolatileImage. BufferStrategy can be used as well.

Image translucentImage = gc.createCompatibleImage(w, h, Transparency.TRANSLUCENT);
//...
Graphics2D g2 = (Grahics2D)backBuffer.getGraphics();
g2.drawImage(translucentImage, x, y, null);

Compositing with extra alpha with SRC_OVER rule (which is the default Graphics2D compositing rule) is accelerated, so the following code will allow the use of hardware for compositing: Code:

Image translucentImage = gc.createCompatibleImage(w, h, Transparency.TRANSLUCENT);
// ...
float ea = 0.5;
Graphics2D g2 = (Grahics2D)backBuffer.getGraphics();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, ea));
g2.drawImage(translucentImage, x, y, null);

System Properties for Linux and Solaris Platforms

NO_J2D_DGA

Intended use: To turn off DGA support and hardware acceleration on Solaris Sparc, which sometimes helps to reduce rendering artifacts.
Introduced: 1.2
Default value: (unset)
How to use: This property is settable only as an environment variable; it has no command-line flag equivalent. To turn off DGA support and hardware acceleration on Solaris Sparc, define the variable:
setenv NO_J2D_DGA

Setting this variable automatically enables the use of pixmaps, in effect setting pmoffscreen to true. The reverse, however, is not true: setting pmoffscreen to true doesn't disable DGA.

J2D_PIXMAPS

Intended use: To determine whether the 2D system uses shared memory pixmaps in the local display environment for storing images that experience frequent reads.
Introduced: 1.4 Beta 3
Default value: (unset)
How to use: This property is settable only as an environment variable; it has no command-line flag equivalent. As of 1.4 Beta 3, Java 2D starts out using normal pixmaps to store images, but changes the storage of frequently read images to use Shared Memory Pixmaps in the local display environment. You can override this default behavior, and force only one type of pixmap to be used, with J2D_PIXMAPS environment flag:
    setenv J2D_PIXMAPS=shared
    setenv J2D_PIXMAPS=server

If you set this flag to shared, all images are stored in Shared Memory Pixmaps if you are working in a local display environment. Conversely, if you set this flag to server, all images are stored in normal pixmaps, not Shared Memory Pixmaps; the normal pixmaps can be stored in VRAM at the discretion of the device driver.

For more information: High Performance Graphics White Paper

xrender

Intended use: To enable the XRender-based Java 2D rendering pipeline for modern X11-based desktops, offering improved graphics performance.
Introduced: Java SE 7
Default value: false
How to use: The pipeline is disabled by default, but may be enabled by setting the command line property -Dsun.java2d.xrender=true. Older X11 configurations may not be able to support XRender. The verbose form, -Dsun.java2d.xrender=True, can be used to enable a message to stdout indicating whether the pipeline was actually enabled.

pmoffscreen

Intended use: To determine whether Java 2D stores images in pixmaps by default when DGA is not available.
Introduced: 1.4 Beta 3
Default value: (unset)
How to use: As of 1.4 Beta 3, Java 2D stores images in pixmaps by default when DGA is not available, whether you are working in a local or remote display environment. You can override this behavior with the pmoffscreen flag:

    -Dsun.java2d.pmoffscreen=true
    -Dsun.java2d.pmoffscreen=false

Setting this flag to false disables offscreen pixmap support, which can solve some rendering problems. When the flag is true, offscreen pixmap support is enabled even if DGA is available.

For more information: High Performance Graphics White Paper

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Blur applet

Documentation Contents
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


BufferedShapeMover applet

Documentation Contents

Download and install the Java Runtime Environment (JRE) to view the applet.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Edge applet

Documentation Contents

Download and install the Java Runtime Environment (JRE) to view the applet.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D(TM) Programmer's Guide, Imaging Sample Programs

Documentation Contents

Java 2D Programmer's Guide Imaging Sample Programs

These sample programs demonstrate Java 2D Imaging features.

Downloading the Sample Programs

Click the following link to download a zip file that contains all of the Imaging sample programs and necessary images.

  • Download Java 2D Imaging Programs and images [zip]

List of Sample Programs

Java Files | Description
BufferedShapeMover.java | Illustrates off-screen buffering.
Blur.java | Illustrates blurring using convolution.
Edge.java | Illustrates edge detection using convolution.
LookUp.java | Illustrates lookup-table manipulation.
Rescale.java | Illustrates rescaling.
Sharpen.java | Illustrates sharpening using convolution.

Compiling the Sample Programs

You can compile a sample by running javac on the sample's .java file. For example, to compile the Blur sample, type:

javac Blur.java

(This assumes javac is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

Running the Sample Programs

These sample programs are designed to run as standalone Java applications or applets. To run a sample as an application, execute the java command on the class name. For example, to run the Blur application, type:

java Blur

(This assumes java is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

You can also run the samples as applets by running appletviewer on the particular sample's html file. For example, if you would like to run the Blur applet, you would type the following line while you are in the same directory as the html file.

appletviewer Blur.html

(This assumes appletviewer is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


LookUp applet

Documentation Contents

Download and install the Java Runtime Environment (JRE) to view the applet.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Rescale applet

Documentation Contents

Download and install the Java Runtime Environment (JRE) to view the applet.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Sharpen applet

Documentation Contents

Download and install the Java Runtime Environment (JRE) to view the applet.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 6

Color

Color imaging is one of the fundamental components of any graphics system, and it is often a source of great complexity in the imaging model. The Java 2D API provides support for high-quality color output that is easy to use and allows advanced clients to make sophisticated use of color.

The key color management classes in the Java 2D API are ColorSpace, Color, ColorModel:

  • A ColorSpace represents a system for measuring colors, typically using three separate numerical values or components. The ColorSpace class contains methods for converting between the color space and two standard color spaces, CIEXYZ and RGB.
  • A Color is a fixed color, defined in terms of its components in a particular ColorSpace. To draw a Shape in a color, such as red, you pass a Color object representing that color to the Graphics2D context. Color is defined in the java.awt package.
  • A ColorModel describes a particular way that pixel values are mapped to colors. A ColorModel is typically associated with an Image or BufferedImage and provides the information necessary to correctly interpret the pixel values. ColorModel is defined in the java.awt.image package.

6.1 Classes

Class | Description
ColorSpace | Identifies the color space of a Color object, Image, BufferedImage, or GraphicsDevice. Has methods to transform between RGB and CIEXYZ color spaces.
ICC_ColorSpace | Extends: ColorSpace Represents device-independent and device-dependent color spaces based on the ICC Profile Format Specification.
ICC_Profile | A representation of color profile data for device independent and device dependent color spaces based on the ICC Profile Format Specification.
ICC_ProfileGray | Extends: ICC_Profile A representation of color space type gray.
ICC_ProfileRGB | Extends: ICC_Profile A representation of color space type RGB.

6.2 Color Concepts

A ColorModel is used to interpret pixel data in an image. This includes mapping components in the bands of an image to components of a particular color space. It might also involve extracting pixel components from packed pixel data, retrieving multiple components from a single band using masks, and converting pixel data through a lookup table.

To determine the color value of a particular pixel in an image, you need to know how color information is encoded in each pixel. The ColorModel associated with an image encapsulates the data and methods necessary for translating a pixel value to and from its constituent color components.

6.2.0 Color

The Java 2D API provides two color models in addition to the DirectColorModel and IndexColorModel:

  • ComponentColorModel can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace. This model can be used to represent most color models on most types of GraphicsDevices.
  • PackedColorModel is a base class for models that represent pixel values that have their color components embedded directly in the bits of an integer pixel. A PackedColorModel stores the packing information that describes how color and alpha components are extracted from the channel.The DirectColorModel is a PackedColorModel.

6.2.0.1 ColorSpace

A ColorSpace object represents a system for measuring colors, typically using three separate numeric values. For example, RGB and CMYK are color spaces. A ColorSpace object serves as a colorspace tag that identifies the specific color space of a Color object or, through a ColorModel object, of an Image, BufferedImage, or GraphicsConfiguration. ColorSpace provides methods that transform Colors in a specific color space to and from sRGB and to and from a well-defined CIEXYZ color space.

All ColorSpace objects must be able to map a color from the represented color space into sRGB and transform an sRGB color into the represented color space. Since every Color contains a ColorSpace object, set explicitly or by default, every Color can also be converted to sRGB. Every GraphicsConfiguration is associated with a ColorSpace object that in turn has an associated ColorSpace. A color specified in any color space can be displayed by any device by mapping it through sRGB as an intermediate color space.

The methods used for this process are toRGB and fromRGB:

  • toRGB transforms a Color in the represented color space to a Color in sRGB.
  • fromRGB takes a Color in sRGB and transforms it into the represented color space.

Though mapping through sRGB always works, it's not always the best solution. For one thing, sRGB cannot represent every color in the full gamut of CIEXYZ colors. If a color is specified in some space that has a different gamut (spectrum of representable colors) than sRGB, then using sRGB as an intermediate space results in a loss of information. To address this problem, the ColorSpace class can map colors to and from another color space, the “conversion space” CIEXYZ.

The methods toCIEXYZ and fromCIEXYZ map color values from the represented color space to the conversion space. These methods support conversions between any two color spaces at a reasonably high degree of accuracy, one Color at a time. However, it is expected that Java 2D API implementations will support high-performance conversion based on underlying platform color-management systems, operating on entire images. (See ColorConvertOp in “Imaging”.)

Figure 6-1 and Figure 6-2 illustrate the process of translating a color specified in a CMYK color space for display on an RGB color monitor. Figure 6-1 shows a mapping through sRGB. As this figure illustrates, the translation of the CMYK color to an RGB color is not exact because of a gamut mismatch. 1

The previous context describes this graphic.

Figure 6-1 Mapping Through sRGB

Figure 6-2 shows the same process using CIEXYZ as the conversion space. When CIEXYZ is used, the color is passed through accurately.

The previous context describes this graphic.

Figure 6-2 Mapping Through CIEXYZ

6.2.0.2 ICC_Profile and ICC_ColorSpace

ColorSpace is actually an abstract class. The Java 2D API provides one implementation, ICC_ColorSpace, which is based on ICC Profile data as represented by the ICC_Profile class. You can define your own subclasses to represent arbitrary color spaces, as long as the methods discussed above are implemented. However, most developers can simply use the default sRGB ColorSpace or color spaces that are represented by commonly available ICC Profiles, such as profiles for monitors and printers, or profiles embedded in image data.

“ColorSpace” describes how ColorSpace objects represent a color space and how colors in the represented space can be mapped to and from a conversion space. Color management systems are often used to handle the mapping between color spaces. A typical color management system (CMS) manages ICC profiles, which are similar to ColorSpace objects; ICC profiles describe an input space and a connection space, and define how to map between them. Color management systems are very good at figuring out how to map a color tagged with one profile into the color space of another profile.

The Java 2D API defines a class called ICC_Profile that holds data for an arbitrary ICC Profile. ICC_ColorSpace is an implementation of the abstract ColorSpace class. ICC_ColorSpace objects can be constructed from ICC_Profiles. (There are some limitations—not all ICC Profiles are appropriate for defining an ICC_ColorSpace).

ICC_Profile has several subclasses that correspond to specific color space types, such as ICC_ProfileRGB and ICC_ProfileGray. Each subclass of ICC_Profile has a well-defined input space (such as an RGB space) and a well-defined connection space (like CIEXYZ). The Java 2D API can use a platform's CMS to access color profiles for various devices such as scanners, printers, and monitors. It can also use the CMS to find the best mapping between profiles.

6.2.1 Describing Colors

The Color class provides a description of a color in a particular color space. An instance of Color contains the value of the color components and a ColorSpace object. Because a ColorSpace object can be specified in addition to the color components when a new instance of Color is created, the Color class can handle colors in any color space.

The Color class has a number of methods that support a proposed standard RGB color space called sRGB (see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html). sRGB is the default color space for the Java 2D API. Several constructors defined by the Color class omit the ColorSpace parameter. These constructors assume that the color's RGB values are defined in sRGB, and use a default instance of ColorSpace to represent that space.

The Java 2D API uses sRGB as a convenience to application programmers, not as a reference color space for color conversion. Many applications are primarily concerned with RGB images and monitors, and defining a standard RGB color space makes writing such applications easier. The ColorSpace class defines the methods toRGB and fromRGB so that developers can easily retrieve colors in this standard space. These methods are not intended to be used for highly accurate color correction or conversions. See “ColorSpace” for more information.

To create a color in a color space other than sRGB, you use the Color constructor that takes a ColorSpace object and an array of floats that represent the color components appropriate to that space. The ColorSpace object identifies the color space.

To display a rectangle of a certain color, such as the process color cyan, you need a way to describe this color to the system. There are a number of different ways to describe a color; for example, a color could be described as a set of red, green, and blue (RGB) components, or a set of cyan, magenta, yellow, and black (CMYK) components. These different techniques for specifying colors are called color spaces.

As you probably know, colors on a computer screen are generated by blending different amounts of red, green, and blue light. Therefore, using an RGB color space is standard for imaging on computer monitors. Similarly, four-color process printing uses cyan, magenta, yellow, and black ink to produce color on a printed page; the printed colors are specified as percentages in a CMYK color space.

Due to the prevalence of computer monitors and color printing, RGB and CMYK color spaces are both commonly used to describe colors. However, both types of color spaces have a fundamental drawback—they are device-dependent. The cyan ink used by one printer might not exactly match the cyan ink used by another. Similarly, a color described as an RGB color might look blue on one monitor and purplish on another.

6.2.2 Mapping Colors through sRGB and CIEXYZ

The Java 2D API refers to RGB and CMYK as color space types. A particular model of monitor with its particular phosphors defines its own RGB color space. Similarly, a particular model of printer has its own CMYK color space. Different RGB or CMYK color spaces can be related to each other through a device-independent color space.

Standards for the device-independent specification of color have been defined by the International Commission on Illumination (CIE). The most commonly used device-independent color space is the three-component XYZ color space developed by CIE. When you specify a color using CIEXYZ, you are insulated from device dependencies.

Unfortunately, it’s not always practical to describe colors in the CIEXYZ color space—there are valid reasons for representing colors in other color spaces. To obtain consistent results when a color is represented using a device-dependent color space such as a particular RGB space, it is necessary to show how that RGB space relates to a device-independent space like CIEXYZ.

One way to map between color spaces is to attach information to the spaces that describes how the device-dependent space relates to the device-independent space. This additional information is called a profile. A commonly used type of color profile is the ICC Color Profile, as defined by the International Color Consortium. For details, see the ICC Profile Format Specification, version 3.4 available at http://www.color.org.

Figure 6-3 illustrates how a solid color and a scanned image are passed to the Java 2D API, and how they are displayed by various output devices. As you can see in Figure 6-3, both the input color and the image have profiles attached.

using profiles to map between color spaces

Figure 6-3 Using Profiles to Map Between Color Spaces

6.2.2.1 Color Matching

Once the API has an accurately specified color, it must reproduce that color on an output device, such as a monitor or printer. These devices have imaging characteristics of their own that must be taken into account to make sure that they produce the correct results. Another profile is associated with each output device to describe how the colors need to be transformed to produce accurate results.

Achieving consistent and accurate color requires that both input colors and output devices be profiled against a standard color space. For example, an input color could be mapped from its original color space into a standard device-independent space, and then mapped from that space to the output device’s color space. In many respects, the transformation of colors mimics the transformation of graphical objects in an (x, y) coordinate space. In both cases, a transformation is used to specify coordinates in a “standard” space and then map those coordinates to a device-specific space for output.

1Of course, the colors used in these diagrams are illustrative, not accurate. The point is that colors might not be mapped accurately between color spaces unless an appropriate conversion space is used.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 4

Fonts and Text Layout

You can use the Java 2D API transformation and drawing mechanisms with text strings. In addition, the Java 2D API provides text-related classes that support fine-grain font control and sophisticated text layout. These include an enhanced Font class and the new TextLayout class.

This chapter focuses on the new font and text layout capabilities supported through interfaces and classes in java.awt, and java.awt.font. For more information about using these features, see the Working with Text APIs lesson in the Java Tutorials.

For information about text analysis and internationalization, refer to the java.text documentation and the “Writing Global Programs” track in the Java Tutorial. For information about using the text layout mechanisms implemented in Swing, see the java.awt.swing.text documentation and “Using the JFC/Swing Packages” in the Java Tutorial.

4.1 Interfaces and Classes

The following tables list the key font and text layout interfaces and classes. Most of these interfaces and classes are part of the java.awt.font package. Some, like Font, are part of the java.awt package to maintain backward compatibility with earlier versions of the JDK.

Interface | Description
MultipleMaster | Represents Type 1 Multiple Master fonts. Implemented by Font objects that are multiple master fonts to enable access to multiple master design controls.
OpenType | Represents Open Type and True Type fonts. Implemented by Font objects that are Open Type or True Type fonts to enable access to the font’s sfnt tables.
Class | Description
Font (java.awt) | Represents an instance of a font face from the collection of font faces available on the host system. Supports the specification of detailed font information and provides access to information about the font and its glyphs.
FontRenderContext | Encapsulates the information necessary to correctly measure text.
GlyphJustificationInfo | Represents information about the justification properties of a glyph, such as weight, priority, absorb, and limit.
GlyphMetrics | Provides metrics for a single glyph.
GlyphVector | A collection of glyphs and their positions.
GraphicAttribute | Base class for a TextLayout attribute that specifies a graphic to be embedded within text. Implemented by ShapeGraphicAttribute and ImageGraphicAttribute, which enable Shapes and Images to be embedded in a TextLayout. Can be subclassed to implement custom character replacement graphics.
ImageGraphicAttribute | Extends: GraphicAttribute A GraphicsAttribute used to draw Images within a TextLayout.
LineBreakMeasurer | Breaks a block of text that spans multiple lines into TextLayout objects that fit within a specified line length.
LineMetrics | Provides access to the font metrics needed to lay out characters along a line and to lay out a set of lines. These metrics include ascent, descent, leading, height, and baseline information.
ShapeGraphicAttribute | Extends: GraphicAttribute A GraphicsAttribute used to draw Shapes within a TextLayout.
TextAttribute | Defines attribute keys and values used for text rendering.
TextHitInfo | Represents hit test information for characters in a TextLayout.
TextLayout | Implements: Cloneable Provides an immutable graphical representation of styled character data, including bidirectional text.

4.2 Font Concepts

The Font class has been enhanced to support the specification of detailed font information and enable the use of sophisticated typographic features.

A Font object represents an instance of a font face from the collection of font faces available on the system. Examples of common font faces include Helvetica Bold and Courier Bold Italic.

Three names are associated with a Font—its logical name, family name, and font face name:

  • A Font object’s logical name is a name mapped onto one of the specific fonts available on the platform. When specifying a Font, you should use the font face name instead of the logical name.You can get the logical name from the Font by calling getName. To get a list of the logical names that are mapped onto the specific fonts available on a platform, call java.awt.Toolkit.getFontList.
  • A Font object’s family name is the name of the font family that determines the typographic design across several faces, such as Helvetica. You retrieve the family name through the getFamily method.
  • A Font objects’ font face name refers to an actual font installed on the system. This is the name you should use when specifying a font in JDK. It’s often referred to as just the font name. You can retrieve the font name by calling getFontName. To determine which font faces are available on the system, you can call GraphicsEnvironment.getAllFonts.

You can access information about a Font through the getAttributes method. A Font’s attributes include its name, size, transform, and font features such as weight and posture.

A LineMetrics object encapsulates the measurement information associated with a Font, such as its ascent, descent, and leading:

  • Ascent is the distance from the baseline to the ascender line. This distance represents the typical height of capital letters, but some characters might extend above the ascender line.
  • Descent is the distance from the baseline to the descender line. The lowest point of most characters will fall within the descent, but some characters might extend below the descender line.
  • Leading is the recommended distance from the bottom of the descender line to the top of the next line.

The previous context describes this graphic.

Figure 4-1 Line Metrics

This information is used to properly position characters along a line, and to position lines relative to one another. You can access these line metrics through the getAscent, getDescent, and getLeading methods. You can also access information about a Font’s height, baseline, and underline and strikethrough characteristics through LineMetrics.

4.3 Text Layout Concepts

Before a piece of text can be displayed, it must be properly shaped and positioned using the appropriate glyphs and ligatures. This process is referred to as text layout. The text layout process involves:

  • Shaping text using the appropriate glyphs and ligatures.
  • Properly ordering the text.
  • Measuring and positioning the text.

The information used to lay out text is also necessary for performing text operations such as caret positioning, hit detection, and highlighting.

To develop software that can be deployed in international markets, text must be laid out in different languages in a way that conforms to the rules of the appropriate writing system.

4.3.1 Shaping Text

A glyph is the visual representation of one or more characters. The shape, size, and position of a glyph is dependent on its context. Many different glyphs can be used to represent a single character or combination of characters, depending on the font and style.

For example, in handwritten cursive text, a particular character can take on different shapes depending on how it is connected to adjacent characters.

In some writing systems, particularly Arabic, the context of a glyph must always be taken into account. Unlike in English, cursive forms are mandatory in Arabic; it is unacceptable to present text without using cursive forms.

Depending on the context, these cursive forms can differ radically in shape. For example, the Arabic letter heh has the four cursive forms shown in Figure 4-2.

Illustration of unconnected, connect on right, connect on both sides and connect on left cursive forms in Arabic.

Figure 4-2 Cursive Forms in Arabic

Although these four forms are quite different from one another, such cursive shape-changing is not fundamentally different from cursive writing in English.

In some contexts, two glyphs can change shape even more radically and merge to form a single glyph. This type of merged glyph is called a ligature. For example, most English fonts contain the ligature fi shown in Figure 4-3. The merged glyph takes into account the overhang on the letter f and combines the characters in a natural-looking way, instead of simply letting the letters collide.

The previous context describes this graphic.

Figure 4-3 English Ligatures

Ligatures are also used in Arabic and the use of some ligatures is mandatory—it is unacceptable to present certain character combinations without using the appropriate ligature. When ligatures are formed from Arabic characters, the shapes change even more radically than they do in English. For example, Figure 4-4 illustrates how two Arabic characters are combined into a single ligature when they appear together.

The previous context describes this graphic.

Figure 4-4 Arabic Ligatures

4.3.2 Ordering Text

In the Java programming language, text is encoded using Unicode character encoding. Text that uses Unicode character encoding is stored in memory in logical order. Logical order is the order in which characters and words are read and written. The logical order is not necessarily the same as the visual order, the order in which the corresponding glyphs are displayed.

The visual order for glyphs in a particular writing system (script) is called the script order. For example, the script order for Roman text is left-to-right and the script order for Arabic and Hebrew is right-to-left.

Some writing systems have rules in addition to script order for arranging glyphs and words on lines of text. For example, Arabic and Hebrew numbers run left to right, even though the letters run right to left. (This means that Arabic and Hebrew, even with no embedded English text, are truly bidirectional.)

A writing system’s visual order must be maintained even when languages are mixed together. This is illustrated in Figure 4-5, which displays an Arabic phrase embedded in an English sentence.

Note: In this and subsequent examples, Arabic and Hebrew text is represented by uppercase letters and spaces are represented by underscores. Each illustration contains two parts: a representation of the characters stored in memory (the characters in logical order) followed by a representation of how those characters are displayed (the characters in visual order). The numbers below the character boxes indicate the insertion offsets.

The previous context describes this graphic.

Figure 4-5 Bidirectional Text

Even though they are part of an English sentence, the Arabic words are displayed in the Arabic script order, right-to-left. Because the italicized Arabic word is logically after the Arabic in plain text, it is visually to the left of the plain text.

When a line with a mixture of left-to-right and right-to-left text is displayed, the base direction is significant. The base direction is the script order of the predominant writing system. For example, if the text is primarily English with some embedded Arabic, then the base direction is left-to-right. If the text is primarily Arabic with some embedded English or numbers, then the base direction is right-to-left.

The base direction determines the order in which segments of text with a common direction are displayed. In the example shown in Figure 4-5, the base direction is left-to-right. There are three directional runs in this example: the English text at the beginning of the sentence runs left to right, the Arabic text runs right to left, and the period runs left to right.

Graphics are often embedded in the flow of text. These inline graphics behave like glyphs in terms of how they affect the text flow and line wrapping. Such inline graphics need to be positioned using the same bidirectional layout algorithm so that they appear in the proper location in the flow of characters.

For more information about the precise algorithm used to order glyphs within a line, see the description of the Bidirectional Algorithm in The Unicode Standard, Version 2.0, Section 3.11.

4.3.3 Measuring and Positioning Text

Unless you are working with a monospace font, different characters in a font have different widths. This means that all positioning and measuring of text has to take into account exactly which characters are used, not just how many. For example, to right-align a column of numbers displayed in a proportional font, you can’t simply use extra spaces to position the text. To properly align the column, you need to know the exact width of each number so that you can adjust accordingly.

Text is often displayed using multiple fonts and styles, such as bold or italic. In this case, even the same character can have different shapes and widths, depending on how it is styled. To properly position, measure, and render text, you need to keep track of each individual character and the style applied to that character. Fortunately, TextLayout does this for you.

To properly display text in languages such as Hebrew and Arabic, each individual character needs to be measured and positioned within the context of neighboring characters. Because the shapes and positions of the characters can change depending on the context, measuring and positioning such text without taking the context into account produces unacceptable results.

4.3.4 Supporting Text Manipulation

To allow the user to edit the text that is displayed, you must be able to:

  • Display a caret that indicates where new characters will be inserted when the user enters text.
  • Move the caret and insertion point in response to user input.
  • Detect user selections (hit detection).
  • Highlight selected text.

4.3.4.1 Displaying Carets

In editable text, a caret is used to graphically represent the current insertion point, the position in the text where new characters will be inserted. Typically, a caret is shown as a blinking vertical bar between two glyphs. New characters are inserted and displayed at the caret's location.

Calculating the caret position can be complicated, particularly for bidirectional text. Insertion offsets on directional boundaries have two possible caret positions because the two glyphs that correspond to the character offset are not displayed adjacent to one another. This is illustrated in Figure 4-6. In this figure, the carets are shown as square brackets to indicate the glyph to which the caret corresponds.

The previous context describes this graphic.

Figure 4-6 Dual Carets

Character offset 8 corresponds to the location after the _ and before the A. If the user enters an Arabic character, its glyph is displayed to the right of (before) the A; if the user enters an English character, its glyph is displayed to the right of (after) the _.

To handle this situation, some systems display dual carets, a strong (primary) caret and a weak (secondary) caret. The strong caret indicates where an inserted character will be displayed when that character's direction is the same as the base direction of the text. The weak caret shows where an inserted character will be displayed when the character's direction is the opposite of the base direction. TextLayout automatically supports dual carets; JTextComponent does not.

When you’re working with bidirectional text, you can’t simply add the widths of the glyphs before a character offset to calculate the caret position. If you did, the caret would be drawn in the wrong place, as shown in Figure 4-7.

The previous context describes this graphic.

Figure 4-7 Caret Drawn Incorrectly

For the caret to be properly positioned, the widths of the glyphs to the left of the offset need to be added and the current context taken into account. Unless the context is taken into account, the glyph metrics won’t necessarily match the display. (The context can affect which glyphs are used.)

4.3.4.2 Moving Carets

All text editors allow the user to move the caret with the arrow keys. Users expect the caret to move in the direction of the pressed arrow key. In left-to-right text, moving the insertion offset is simple: the right arrow key increases the insertion offset by one and the left arrow key decreases it by one. In bidirectional text or in text with ligatures, this behavior would cause the caret to jump across glyphs at direction boundaries and move in the reverse direction within different directional runs.

To move the caret smoothly through bidirectional text, you need to take into account the direction of the text runs. You can’t simply increment the insertion offset when the right arrow key is pressed and decrement it when the left arrow key is pressed. If the current insertion offset is within a run of right-to-left characters, the right arrow key should decrease the insertion offset, and the left arrow key should increase it.

Moving the caret across a directional boundary is even more complicated. Figure 4-8 illustrates what happens when a directional boundary is crossed when the user is navigating with the arrow key. Stepping three positions to the right in the displayed text corresponds to moving to the character offsets 7, 19, then 18.

The previous context describes this graphic.

Figure 4-8 Caret Movement

Certain glyphs should never have a caret between them; instead, the caret should move as though the glyphs represented a single character. For example, there should never be a caret between an o and an umlaut if they are represented by two separate characters. (See The Unicode Standard, Version 2.0, Chapter 5, for more information.)

TextLayout provides methods (getNextRightHit and getNextLeftHit) that enable you to easily move the caret smoothly through bidirectional text.

4.3.4.3 Hit Testing

Often, a location in device space must be converted to a text offset. For example, when a user clicks the mouse on selectable text, the location of the mouse is converted to a text offset and used as one end of the selection range. Logically, this is the inverse of positioning a caret.

When you’re working with bidirectional text, a single visual location in the display can correspond to two different offsets in the source text, as shown in Figure 4-9.

The previous context describes this graphic.

Figure 4-9 Hit Testing Bidirectional Text

Because a single visual location can correspond to two different offsets, hit testing bidirectional text isn’t just a matter of measuring glyph widths until the glyph at the correct location is found and then mapping that position back to a character offset. Detecting the side that the hit was on helps distinguish between the two alternatives.

You can perform hit testing using TextLayout.hitTestChar. Hit information is encapsulated in a TextHitInfo object and includes information about the side that the hit was on.

4.3.4.4 Highlighting Selections

A selected range of characters is represented graphically by a highlight region, an area in which glyphs are displayed with inverse video or against a different background color.

Highlight regions, like carets, are more complicated for bidirectional text than for monodirectional text. In bidirectional text, a contiguous range of characters might not have a contiguous highlight region when displayed. Conversely, a highlight region showing a visually contiguous range of glyphs might not correspond to a single, contiguous range of characters.

This results in two strategies for highlighting selections in bidirectional text:

  • Logical highlighting —with logical highlighting, the selected characters are always contiguous in the text model, and the highlight region is allowed to be discontiguous. For an example of logical highlighting, see Figure 4-10.
  • Visual highlighting—with visual highlighting, there might be more than one range of selected characters, but the highlight region is always contiguous. For an example of visual highlighting, see Figure 4-11.

Illustration of logical highlighting (contiguous characters)

Figure 4-10 Logical Highlighting (contiguous characters)

Illustration of visual highlighting (contiguous highlight region)

Figure 4-11 Visual Highlighting (contiguous highlight region)

Logical highlighting is simpler to implement, since the selected characters are always contiguous in the text.

4.3.5 Performing Text Layout in a Java Application

Depending on which Java APIs you use, you can have as little or as much control over text layout as you need:

  • If you just want to display a block of text or need an editable text control, you can use JTextComponent, which will perform the text layout for you. JTextComponent is designed to handle the needs of most international applications and supports bidirectional text For more information about JTextComponent, see “Using the JFC/Swing Packages” in the Java Tutorial.
  • If you want to display a simple text string, you can call Graphics2D.drawString and let Java 2D lay out the string for you. You can also use drawString to render styled strings and strings that contain bidirectional text. For more information about rendering text through Graphics2D, see “Rendering Graphics Primitives”.
  • If you want to implement your own text editing routines, you can use TextLayout to manage text layout, highlighting, and hit detection. The facilities provided by TextLayout handle most common cases, including text strings with mixed fonts, mixed languages, and bidirectional text. For more information about using TextLayout, see “Managing Text Layout”.
  • If you want total control over how text is shaped and positioned, you can construct your own GlyphVectors using Font and then render them through Graphics2D. For more information about implementing your own text layout mechanism, see “Implementing a Custom Text Layout Mechanism”.

Generally, you do not need to perform text layout operations yourself. For most applications, JTextComponent is the best solution for displaying static and editable text. However, JTextComponent does not support the display of dual carets or discontiguous selections in bidirectional text. If your application requires these features, or you prefer to implement your own text editing routines, you can use the Java 2D text layout APIs.

4.4 Managing Text Layout

The TextLayout class supports text that contains multiple styles and characters from different writing systems, including Arabic and Hebrew. (Arabic and Hebrew are particularly difficult to display because you must reshape and reorder the text to achieve an acceptable representation.)

TextLayout simplifies the process of displaying and measuring text even if you are working with English-only text. By using TextLayout, you can achieve high-quality typography with no extra effort.

Text Layout Performance
TextLayout is designed so that there is no significant performance impact when it’s used to display simple, monodirectional text. There is some additional processing overhead when TextLayout is used to display Arabic or Hebrew text. However, it’s typically on the order of microseconds per character and is dominated by the execution of normal drawing code.

The TextLayout class manages the positioning and ordering of glyphs for you. You can use TextLayout to:

  • Lay out monodirectional and bidirectional text
  • Display and move carets
  • Perform hit testing on text
  • Highlight text selections

In some situations, you might want to compute the text layout yourself, so that you can control exactly which glyphs are used and where they are placed. Using information such as glyph sizes, kerning tables, and ligature information, you can construct your own algorithms for computing the text layout, bypassing the system’s layout mechanism. For more information, see “Implementing a Custom Text Layout Mechanism”.

4.4.1 Laying Out Text

TextLayout automatically lays out text, including bidirectional (BIDI) text, with the correct shaping and ordering. To correctly shape and order the glyphs representing a line of text, TextLayout must know the full context of the text:

  • If the text fits on a single line, such as a single-word label for a button or a line in a dialog box, you can construct a TextLayout directly from the text.
  • If you have more text than can fit on a single line or want to break text on a single line into tabbed segments, you cannot construct a TextLayout directly. You must use a LineBreakMeasurer to provide sufficient context.

The base direction of the text is normally set by an attribute (style) on the text. If that attribute is missing, TextLayout follows the Unicode bidirectional algorithm and derives the base direction from the initial characters in the paragraph.

4.4.2 Displaying Dual Carets

TextLayout maintains caret information such as the caret Shape, position, and angle. You can use this information to easily display carets in both monodirectional and bidirectional text. When you’re drawing carets for bidirectional text, using TextLayout ensures that the carets will be positioned correctly.

TextLayout provides default caret Shapes and automatically supports dual carets. For italic and oblique glyphs, TextLayout produces angled carets, as shown in Figure 4-12. These caret positions are also used as the boundaries between glyphs for highlighting and hit testing, which helps produce a consistent user experience.

The previous context describes this graphic.

Figure 4-12 Angled Carets

Given an insertion offset, the getCaretShapes method returns a two-element array of Shapes: element 0 contains the strong caret and element 1 contains the weak caret, if one exists. To display dual carets, you simply draw both caret Shapes; the carets will be automatically be rendered in the correct positions.

If you want to use custom caret Shapes, you can retrieve the position and angle of the carets from the TextLayout and draw them yourself.

In the following example, the default strong and weak caret Shapes are drawn in different colors. This is a common way to differentiate dual carets.

Shape[] caretShapes = layout.getCaretShapes(hit);
g2.setColor(PRIMARY_CARET_COLOR);
g2.draw(caretShapes[0]);
if (caretShapes[1] != null){
  g2.setColor(SECONDARY_CARET_COLOR);
  g2.draw(caretShapes[1]);
}

4.4.3 Moving the Caret

You can also use TextLayout to determine the resulting insertion offset when a user presses the left or right arrow key. Given a TextHitInfo object that represents the current insertion offset, the getNextRightHit method returns a TextHitInfo object that represents the correct insertion offset if the right arrow key is pressed. The getNextLeftHit method provides the same information for the left arrow key.

In the following example, the current insertion offset is moved in response to a right arrow key.

TextHitInfo newInsertionOffset =             layout.getNextRightHit(insertionOffset);
if (newInsertionOffset != null) {
  Shape[] caretShapes =
          layout.getCaretShapes(newInsertionOffset);
  // draw carets
  ...
  insertionOffset = newInsertionOffset;
}

4.4.4 Hit Testing

TextLayout provides a simple mechanism for hit testing text. The hitTestChar method takes x and y coordinates from the mouse as arguments and returns a TextHitInfo object. The TextHitInfo contains the insertion offset for the specified position and the side that the hit was on. The insertion offset is the offset closest to the hit: if the hit is past the end of the line, the offset at the end of the line is returned.

In the following example, hitTestChar is called on a TextLayout and then getInsertIndex is used to retrieve the offset.

TextHitInfo hit = layout.hitTestChar(x, y);
int insertIndex = hit.getInsertIndex();

4.4.5 Highlighting Selections

You can get a Shape that represents the highlight region from the TextLayout. TextLayout automatically takes the context into account when calculating the dimensions of the highlight region. TextLayout supports both logical and visual highlighting.

In the following example, the highlight region is filled with the highlight color and then the TextLayout is drawn over the filled region. This is one simple way to display highlighted text.

Shape highlightRegion = layout.getLogicalHighlightShape(hit1,      hit2);
graphics.setColor(HIGHLIGHT_COLOR);
graphics.fill(highlightRegion);
graphics.drawString(layout, 0, 0);

4.4.6 Querying Layout Metrics

TextLayout provides access to graphical metrics for the entire range of text it represents. Metrics available from TextLayout include the ascent, descent, leading, advance, visible advance, and the bounding rectangle.

More than one Font can be associated with a TextLayout: different style runs can use different fonts. The ascent and descent values for a TextLayout are the maximum values of all of the fonts used in the TextLayout. The computation of the TextLayout's leading is more complicated; it’s not just the maximum leading value.

The advance of a TextLayout is its length: the distance from the left edge of the leftmost glyph to the right edge of the rightmost glyph. The advance is sometimes referred to as the total advance. The visible advance is the length of the TextLayout without its trailing whitespace.

The bounding box of a TextLayout encloses all of the text in the layout. It includes all the visible glyphs and the caret boundaries. (Some of these might hang over the origin or origin + advance). The bounding box is relative to the origin of the TextLayout, not to any particular screen position.

In the following example, the text in a TextLayout is drawn within the layout’s bounding box.

graphics.drawString(layout, 0, 0);
Rectangle2D bounds = layout.getBounds();
graphics.drawRect(bounds.getX()-1, bounds.getY()-1,
         bounds.getWidth()+2, bounds.getHeight()+2);

4.4.7 Drawing Text Across Multiple Lines

TextLayout can also be used to display a piece of text that spans multiple lines. For example, you might take a paragraph of text, line-wrap the text to a certain width, and display the paragraph as multiple lines of text.

To do this, you do not directly create the TextLayouts that represent each line of text—LineBreakMeasurer generates them for you. Bidirectional ordering cannot always be performed correctly unless all of the text in a paragraph is available. LineBreakMeasurer encapsulates enough information about the context to produce correct TextLayouts.

When text is displayed across multiple lines, the length of the lines is usually determined by the width of the display area. Line breaking (line wrapping) is the process of determining where lines begin and end, given a graphical width in which the lines must fit.

The most common strategy is to place as many words on each line as will fit. This strategy is implemented in LineBreakMeasurer. Other more complex line break strategies use hyphenation, or attempt to minimize the differences in line length within paragraphs. The Java 2D API does not provide implementations of these strategies.

To break a paragraph of text into lines, you construct a LineBreakMeasurer with the entire paragraph and then call nextLayout to step through the text and generate TextLayouts for each line.

To do this, LineBreakMeasurer maintains an offset within the text. Initially, the offset is at the beginning of the text. Each call to nextLayout moves the offset by the character count of the TextLayout that was created. When this offset reaches the end of the text, nextLayout returns null.

The visible advance of each TextLayout that the LineBreakMeasurer creates doesn’t exceed the specified line width. By varying the width you specify when you call nextLayout, you can break text to fit complicated areas, such as an HTML page with images in fixed positions or tab-stop fields. You can also pass in a BreakIterator to tell LineBreakMeasurer where valid breakpoints are; if you don't supply one the BreakIterator for the default locale is used.

In the following example, a bilingual text segment is drawn line by line. The lines are aligned to either to the left margin or right margin, depending on whether the base text direction is left-to-right or right-to-left.

Point2D pen = initialPosition;
LineBreakMeasurer measurer = new LineBreakMeasurer(styledText, myBreakIterator);
while (true) {
  TextLayout layout = measurer.nextLayout(wrappingWidth);
  if (layout == null) break;
    pen.y += layout.getAscent();
    float dx = 0;
    if (layout.isLeftToRight())
      dx = wrappingWidth - layout.getAdvance();
    layout.draw(graphics, pen.x + dx, pen.y);
    pen.y += layout.getDescent() + layout.getLeading();
}

4.5 Implementing a Custom Text Layout Mechanism

The GlyphVector class provides a way to display the results of custom layout mechanisms. A GlyphVector object can be thought of as the output of an algorithm that takes a string and computes exactly how the string should be displayed. The system has a built-in algorithm and the Java 2D API lets advanced clients define their own algorithms.

A GlyphVector object is basically an array of glyphs and glyph locations. Glyphs are used instead of characters to provide total control over layout characteristics such as kerning and ligatures. For example, when displaying the string “final”, you might want to replace the leading fi substring with the ligature fi. In this case, the GlyphVector object will have fewer glyphs than the number of characters in the original string.

Figure 4-13 and Figure 4-14 illustrate how GlyphVector objects are used by layout mechanisms. Figure 4-13 shows the default layout mechanism. When drawString is called on a String, the built-in layout algorithm:

  • Uses the current Font in the Graphics2D context to determine which glyphs to use.
  • Calculates where each glyph should be placed.
  • Stores the resulting glyph and position information in a GlyphVector.
  • Passes the GlyphVector to a glyph rendering routine that does the actual drawing.

The previous context describes this graphic.

Figure 4-13 Using the Built-in Layout Algorithm

Figure 4-14 shows the process for using a custom layout algorithm. To use a custom layout algorithm, you must assemble all of the information necessary to lay out the text. The basic process is the same:

  • Using the Font, determine which glyphs to use
  • Determine where to place the glyphs
  • Store this layout information in a GlyphVector

To render the text, you pass the GlyphVector to drawString, which in turn passes it to the glyph renderer. In Figure 4-14, the custom layout algorithm replaces the fi substring with the ligature fi.

using a custom layout algorithm

Figure 4-14 Using a Custom Layout Algorithm

4.6 Creating Font Derivations

Using the Font.deriveFont methods, you can create a new Font object with different attributes from an existing Font object. Often, a transform is applied to the existing Font to create a new derived Font. To do this, you:

  • Create a Font object.,
  • Create the AffineTransform you want to apply to the Font.
  • Call Font.deriveFont, passing in the AffineTransform.

In this way, you could easily create a Font in a custom size or a skewed version of an existing Font.

In the following code excerpt, an AffineTransform is applied to create a skewed version of the font Helvetica. The new derived font is then used to render a string.

        // Create a transformation for the font.
AffineTransform fontAT = new AffineTransform();
fontAT.setToShear(-1.2, 0.0);
// Create a Font Object.
Font theFont = new Font("Helvetica", Font.PLAIN, 1);
// Derive a new font using the shear transform
theDerivedFont = theFont.deriveFont(fontAT);
// Add the derived font to the Graphics2D context
g2.setFont(theDerivedFont);
// Render a string using the derived font
g2.drawString(“Java”, 0.0f, 0.0f);

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 3

Geometries

The Java 2D API provides several classes that define common geometric objects, such as points, lines, curves, and rectangles. These new geometry classes are part of the java.awt.geom package. For backward compatibility, the geometry classes that existed in previous versions of the JDK, such as Rectangle, Point, and Polygon, remain in the java.awt package.

The Java 2D API geometries such as GeneralPath, Arc2D, and Rectangle2D implement the Shape interface defined in java.awt. Shape provides a common protocol for describing and inspecting geometric path objects. A new interface, PathIterator, defines methods for retrieving elements from a geometry.

Using the geometry classes, you can easily define and manipulate virtually any two-dimensional object.

3.1 Interfaces and Classes

The following tables list the key geometry interfaces and classes. Most of these interfaces and classes are part of the java.awt.geom package. Some, like Shape, are part of the java.awt package, primarily to maintain backward compatibility with earlier versions of the JDK.

Interface | Description
PathIterator | Defines methods for retrieving elements from a path.
Shape (java.awt) | Provides a common set of methods for describing and inspecting geometric path objects. Implemented by GeneralPath and other geometry classes.

Class | Description
Arc2D
Arc2D.Double
Arc2D.Float 		Extends: RectangularShape
Represents an arc defined by a bounding rectangle, start angle, angular extent, and a closure type. Implemented to specify arcs in float and double precision: Arc2D.Float and Arc2D.Double.
Area Implements: Shape, Cloneable
Represents an area geometry that supports boolean operations.
CubicCurve2D
CubicCurve2D.Double CubicCurve2D.Float 		Implements: Shape
Represents a cubic parametric curve segment in (w) coordinate space. Implemented to specify cubic curves in float and double precision: CubicCurve2D.Float and CubicCurve2D.Double.
Dimension2D | Encapsulates a width and height dimension. Abstract superclass for all objects that store a 2D dimension.
Ellipse2D
Ellipse2D.Double
Ellipse2D.Float 		Extends: RectangularShape
Represents an ellipse defined by a bounding rectangle. Implemented to specify ellipses in float and double precision: Ellipse2D.Float and Ellipse2D.Double.
FlatteningPathIterator Returns a flattened view of a PathIterator object.
Can be used to provide flattening behavior for Shapes that don’t perform the interpolation calculations themselves.
GeneralPath Implements: Shape
Represents a geometric path constructed from lines and quadratic and cubic curves.
Line2D
Line2D.Double
Line2D.Float 		Implements: Shape
Represents a line segment in (x, y) coordinate space. Implemented to specify lines in float and double precision: Line2D.Float and Line2D.Double.
Point2D
Point2D.Double
Point2D.Float 		A point representing a location in (x,y) coordinate space. Implemented to specify points in float and double precision: Point2D.Float and Point2D.Double.
QuadCurve2D
QuadCurve2D.Double
QuadCurve2D.Float 		Implements: Shape
Represents a quadratic parametric curve segment in (x, y) coordinate space. Implemented to specify quadratic curves in float and double precision: QuadCurve2D.Float and QuadCurve2D.Double.
Rectangle2D
Rectangle2D.Double
Rectangle2D.Float 		Extends: RectangularShape
Represents a rectangle defined by a location (x, y) and dimension (w x h). Implemented to specify rectangles in float and double precision: Rectangle2D.Float and Rectangle2D.Double.
RectangularShape Implements: Shape
Provides common manipulation routines for operating on shapes that have rectangular bounds.
RoundRectangle2D
RoundRectangle2D.Double
RoundRectangle2D.Float 		Extends: RectangularShape
Represents a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of the corner arc. Implemented to specify round rectangles in float and double precision: RoundRectangle2D.Float and RoundRectangle2D.Double.

3.2 Geometry Concepts

A Shape is an instance of any class that implements the Shape interface, such as GeneralPath or Rectangle2D.Float. A Shape’s contour (outline) is referred to as its path.

When a Shape is drawn, the pen style defined by the Stroke object in the Graphics2D context is applied to the Shape’s path. When a Shape is filled, the Paint in the Graphics2D context is applied to the area within its path. For more information, see “Rendering with Graphics2D”.

A Shape’s path can be also used to define a clipping path. A clipping path determines what pixels are rendered—only those pixels that lie within the area defined by the clipping path are rendered. The clipping path is part of the Graphics2D context. For more information, see “Setting the Clipping Path”.

A GeneralPath is a shape that can be used to represent any two-dimensional object that can be constructed from lines and quadratic or cubic curves. For convenience, java.awt.geom provides additional implementations of the Shape interface that represent common geometric objects such as rectangles, ellipses, arcs, and curves. The Java 2D API also provides a special type of shape that supports constructive area geometry.

3.2.1 Constructive Area Geometry

Constructive Area Geometry (CAG) is the process of creating new geometric objects by performing boolean operations on existing objects. In the Java 2D API, a special type of Shape called an Area supports boolean operations. You can construct an Area from any Shape.

Areas support the following Boolean operations:

  • Union
  • Intersection
  • Subtraction
  • Exclusive OR (XOR)

These operations are illustrated in Figure 3-1.

Graphic illustration of union, intersection, subtraction and exclusive OR boolean operations

Figure 3-1 Boolean Operations

3.2.2 Bounds and Hit Testing

A bounding box is a rectangle that fully encloses a shape’s geometry. Bounding boxes are used to determine whether or not an object has been selected or “hit” by the user.

The Shape interface defines two methods for retrieving a shape’s bounding box, getBounds and getBounds2D. The getBounds2D method returns a Rectangle2D instead of a Rectangle, providing a higher-precision description of the shape’s bounding box.

Shape also provides methods for determining whether or not:

  • A specified point lies within the bounds of the shape (contains)
  • A specified rectangle lies totally within the bounds of the shape (contains)
  • A specified rectangle intersects the shape (intersects)

3.3 Combining Areas to Create New Shapes

Areas can be used to quickly construct complex Shapes from simple shapes such as circles and squares. To create a new complex Shape by combining Areas:

  • Using Shapes, construct the Areas to be combined.
  • Call the appropriate Boolean operators: add, subtract, intersect, exclusiveOr.

For example, CAG could be used to create a pear like that shown in Figure 3-2 .

The following context describes the graphic

Figure 3-2 Pear constructed from circles

The body of the pear is constructed by performing a union operation on two overlapping Areas: a circle and an oval. The leaves are each created by performing an intersection on two overlapping circles and then joined into a single Shape through a union operation. Overlapping circles are also used to construct the stem through two subtraction operations.

3.4 Creating a Custom Shape

You can implement the Shape interface to create a class that defines a new type of shape. It doesn’t matter how you represent the shape internally, as long as you can implement the Shape interface methods. The Shape must be able to generate a path that specifies its contour.

For example, you could create a simple implementation of Shape that represents polygons as arrays of points. Once the polygon is built, it could be passed to draw, setClip, or any other method that expects a Shape object as an argument.

The PolygonPath class must implement the Shape interface methods:

  • contains
  • getBounds
  • getBounds2D
  • getPathIterator
  • intersects

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 5

Imaging

The Java 2D API supports three imaging models

  • The producer/consumer (push) model provided in previous versions of the JDK software.
  • The immediate mode model.
  • The pipeline (pull) model compatible with the immediate mode model and that will be fully implemented in the forthcoming Java Advanced Imaging API.

The following table contrasts the features of each of these imaging models.
Push Model
Immediate Mode Image Buffer Model
Pull Model
Major Interfaces/Classes
  • Image
  • ImageProducer
  • ImageConsumer
  • ImageObserver
  • BufferedImage
  • Raster
  • BufferedImageOp
  • RasterOp
    (Java 2D API)
  • RenderableImage
  • RenderableImageOp
    (Java 2D API)
  • RenderedOp
  • RenderableOp
  • TiledImage
    (Java Advanced Imaging API)
Pros
  • Processing driven by image availability (e.g. over network)
  • Images processed incrementally
  • Simplest programming interface
  • Commonly used model
  • Stores/processes only required data
  • Allows lazy evaluation
Cons
  • Requires transfer (but not processing)
  • More complex programming interface
  • Requires memory allocation of complete images
  • Requires processing of complete images
  • More complex programming interface
  • More complex implementation

This chapter focuses on the objects and techniques of the immediate mode imaging model. The immediate mode imaging classes and interfaces of the Java 2D API provide techniques for dealing with pixel mapped images whose data is stored in memory. This API supports accessing image data in a variety of storage formats and manipulating image data through several types of filtering operations.

5.1 Interfaces and Classes

The immediate mode imaging APIs in the Java 2D API can be grouped into six categories: interfaces, image data classes, image operation classes, sample model classes, color model classes, and exceptions.

5.1.1 Imaging Interfaces

Interface | Description
BufferedImageOp | Describes single-input/single-output operations performed on BufferedImage objects. Implemented by AffineTransformOp, ColorConvertOp, ConvolveOp, LookupOp, and RescaleOp.
RasterOp | Defines single-input/single-output operations performed on Raster objects. Implemented by AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, and RescaleOp.
RenderedImage | Defines a common protocol for objects that contain or can produce image data in the form of Rasters.
WritableRenderedImage | Extends: RenderedImage Defines a common protocol for objects that contain or can produce image data in the form of Rasters which can be modified.
TileObserver | Defines a protocol for objects that want to be notified when the modification state of a WritableRenderedImage changes.

5.1.2 Image Data Classes

Class | Description
BufferedImage | Extends: Image Implements: WriteableRenderedImage An image with an accessible data buffer. A BufferedImage has a ColorModel and a Raster of image data.
ByteLookupTable | Extends: LookupTable A LookupTable that contains byte data.
DataBuffer | Wraps one or more data arrays holding pixel data. Each data array is called a bank.
DataBufferByte | Extends: DataBuffer (Final) A data buffer that stores bytes of data. (Used in Java Advanced Imaging API)
DataBufferInt | Extends: DataBuffer (Final)) A data buffer that stores integer data.(Used in Java Advanced Imaging API)
DataBufferShort | Extends: DataBuffer (Final) A data buffer that stores short data.(Used in Java Advanced Imaging API)
DataBufferUShort | Extends: DataBuffer (Final) A data buffer that stores unsigned short data.
Kernel | A matrix that describes how an input pixel and its surrounding pixels affect the value of an output pixel in a ConvolveOp filtering operation.
LookupTable | Extends: Object A table that maps values from single-banded pixel data to color values.
Raster | A rectangular array of pixels from which you can retrieve image data. A Raster contains a DataBuffer and a SampleModel.
ShortLookupTable | Extends: LookupTable A lookup table that contains short data.
WritableRaster | Extends: Raster A Raster that you can modify.

5.1.3 Image Operation Classes

Class | Description
AffineTransformOp | Implements: BufferedImageOp, RasterOp A class that defines an affine transform to perform a linear mapping from 2D coordinates in a source Image or Raster to 2D coordinates in the destination image or Raster. This class can perform either bilinear or nearest neighbor affine transform operations.
BandCombineOp | Implements: RasterOp Using a specified matrix, this operation performs an arbitrary linear combination of bands in a Raster.
BufferedImageFilter | Extends: ImageFilter An ImageFilter that provides a simple means of using a BufferedImageOp (a single-source/single-destination image operator) to filter a BufferedImage or Raster.
ColorConvertOp | Implements: BufferedImageOp, RasterOp Performs a pixel-by-pixel color conversion of the data in the source image.
ConvolveOp | Implements: BufferedImageOp, RasterOp Uses a Kernel to perform a convolution on the source image. A convolution is a spatial operation where the pixels surrounding the input pixel are multiplied by a kernel value to generate the value of the output pixel. The Kernel mathematically defines the relationship between the pixels in the immediate neighborhood of the input pixel and the output pixel.
LookupOp | Implements: BufferedImageOp, RasterOp Performs a lookup operation from the source to the destination. For Rasters, the lookup operates on sample values. For BufferedImages, the lookup operates on color and alpha components.
RescaleOp | Implements: BufferedImageOp, RasterOp Performs a pixel-by-pixel rescaling of the data in the source image by multiplying each pixel value by a scale factor and then adding an offset.

5.1.4 Sample Model Classes

Class | Description
BandedSampleModel | Extends: ComponentSampleModel (Final) Provides access to image data stored with like samples stored as bands in separate banks of a DataBuffer. A pixel consists of one sample from each band.
ComponentSampleModel | Extends: SampleModel Provides access to image data stored with each sample of a pixel residing in a separate element of a DataBuffer. Different types of pixel interleaving are supported.
MultiPixelPackedSampleModel | Extends: SampleModel Provides access to image data stored with multiple one-sample pixels packed into one element of a DataBuffer.
PixelInterleavedSampleModel | Extends: ComponentSampleModel Provides access to image data stored with the sample data for each pixel in adjacent elements of the data array, and all elements in a single bank of a DataBuffer.
SampleModel | An abstract class that defines a mechanism for extracting sample data from an image without knowing how the underlying data is stored in a DataBuffer.
SinglePixelPackedSampleModel | Extends: SampleModel Provides access to image data stored with all the samples belonging to an individual pixel packed into one element of a DataBuffer.

5.1.5 Color Model Classes

Class | Description
ColorModel | Implements: Transparency An abstract class that defines methods for translating from image pixel values to color components such as red, green, and blue.
ComponentColorModel | Extends: ColorModel A ColorModel that can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace. This class can be used to represent most color models on most types of GraphicsDevices.
DirectColorModel | Extends: PackedColorModel A ColorModel that represents pixel values that have RGB color components embedded directly in the bits of the pixel. This color model is similar to an X11 TrueColor visual. The default RGB ColorModel returned by ColorModel.getRGBdefault is a DirectColorModel.
IndexColorModel | Extends: ColorModel A ColorModel that represents pixel values that are indices into a fixed color map in the sRGB ColorSpace.
PackedColorModel | Extends: ColorModel An abstract ColorModel that represents pixel values that have color components embedded directly in the bits of a pixel. DirectColorModel extends PackedColorModel to support pixels that contain RGB color components.

5.1.6 Exception Classes

Class | Description
ImagingOpException | Extends: RuntimeException Thrown if one of the BufferedImageOp or RasterOp filter methods can’t process the image.
RasterFormatException | Extends: RuntimeException Thrown if there is invalid layout information in the Raster.

5.2 Immediate Mode Imaging Concepts

The immediate mode imaging model supports fixed-resolution images stored in memory. The model also supports filtering operations on image data. A number of classes and interfaces are used in this model.

The following context describes this graphic.

Figure 5-1 BufferedImage and supporting classes

As shown in Figure 5-1, BufferedImage provides general image management. A BufferedImage can be created directly in memory and used to hold and manipulate image data retrieved from a file or URL. A BufferedImage can be displayed using any Graphics2D object for a screen device, or rendered to any other destination using appropriate Graphics2D context. A BufferedImage object contains two other objects: a Raster and a ColorModel.

The Raster class provides image data management. It represents the rectangular coordinates of the image, maintains image data in memory, and provides a mechanism for creating multiple subimages from a single image data buffer. It also provides methods for accessing specific pixels within an image. A Raster object contains two other objects, a DataBuffer and a SampleModel.

The DataBuffer class holds pixel data in memory.

The SampleModel class interprets data in the buffer and provides it as individual pixels or rectangular ranges of pixels.

The ColorModel class provides a color interpretation of pixel data provided by the image’s sample model.

The image package provides additional classes that define filtering operations on BufferedImage and Raster objects. Each image processing operation is embodied in a class that implements the BufferedImageOp interface, the RasterOp interface, or both interfaces. The operation class defines filter methods that performs the actual image manipulation.

Figure 5-2 illustrates the basic model for Java 2D API image processing:

Flow diagram shows that the source image flows through an image-processing operation before becoming the destination image.

Figure 5-2 Image Processing Model

The operations supported include:

  • Affine transformation
  • Amplitude scaling
  • Lookup-table modification
  • Linear combination of bands
  • Color conversion
  • Convolution

Note that if you’re interested just in displaying and manipulating images, you only need to understand the BufferedImage class and the filtering operation classes. On the other hand, if you’re planning to write filters or otherwise directly access image data, you’ll need to understand the classes associated with BufferedImage.

5.2.1 Terminology

Here are some terms used throughout the following discussions:

Data Elements: primitive types used as units of storage of image data. Data elements are individual members of a DataBuffer array. The layout of elements in the data buffer is independent of the interpretation of the data as pixels by an image’s SampleModel.

Samples: distinct members of the pixels of an image. A SampleModel provides a mechanism for converting elements in the DataBuffer to pixels and their samples. The samples of a pixel may represent primary values in a particular color model. For example, a pixel in an RGB color model consists of three samples: red, green, and blue.

Components: values of pixels independent of color interpretation. The distinction between component and sample is useful with IndexColorModel, where pixel components are indexes into the LookupTable.

Band: the set of all samples of one type in an image, such as all red samples or all green samples. Pixel data can be stored in a number of ways, the two supported in the Java 2D API being banded and pixel interleaved. Banded storage organizes image data by bands, and a pixel is made up of sample data from the same position in each band. Pixel interleaved storage organizes image data by pixels, with a single array containing all pixels, and bands consisting of the set of samples at the same index position in each pixel.

Primaries: distinct members of a color value in a specific color model; for example the RGB model forms color values from the primaries red, green, and blue.

5.3 Using BufferedImages

The BufferedImage class is the main class supporting the immediate imaging mode. It manages an image in memory, providing ways to store pixel data, interpret pixel data, and to render the pixel data to a Graphics or Graphics2D context.

5.3.1 Creating a BufferedImage

To create a BufferedImage, call the Component.createImage method; this returns a BufferedImage whose drawing characteristics match those of the component used to create it—the created image is opaque, has the foreground and background colors of the Component, and you can’t adjust the transparency of the image. You could use this technique when you want to do double buffered drawing for animation in a component; the discussion “Drawing in an Offscreen Buffer” gives more details.

    public Graphics2D createDemoGraphics2D(Graphics g) {
        Graphics2D g2 = null;
        int width = getSize().width;
        int height = getSize().height;

        if (offImg == null || offImg.getWidth() != width ||
                        offImg.getHeight() != height) {
            offImg = (BufferedImage) createImage(width, height);
        }

        if (offImg != null) {
            g2 = offImg.createGraphics();
            g2.setBackground(getBackground());
        }

        // .. clear canvas ..
        g2.clearRect(0, 0, width, height);

        return g2;
    }

You can also create a blank BufferedImage in memory using one of several constructor methods provided.

5.3.2 Drawing in an Offscreen Buffer

The BufferedImage class can be used to prepare graphic elements offscreen then copy them to the screen. This technique is especially useful when a graphic is complex or used repeatedly. For example, if you want to display a complicated shape several times, you could draw it once into an offscreen buffer and then copy it to different locations in the window. By drawing the shape once and copying it, you can display the graphics more quickly.

The java.awt package facilitates the use of offscreen buffers by letting you draw to an Image object the same way that you draw to a window. All of the Java 2D API rendering features can be used when drawing to offscreen images.

Offscreen buffers are often used for animation. For example, you could use an offscreen buffer to draw an object once and then move it around in a window. Similarly, you could use an offscreen buffer to provide feedback as a user moves a graphic using the mouse. Instead of redrawing the graphic at every mouse location, you could draw the graphic once to an offscreen buffer, and then copy it to the mouse location as the user drags the mouse.1

The following context describes this graphic.

Figure 5-3 Using an Offscreen Buffer

Figure 5-3 demonstrates how a program can draw to an offscreen image and then copy that image into a window multiple times. The last time the image is copied, it is transformed. Note that transforming the image instead of redrawing it with the transformation might produce unsatisfactory results.

5.3.2.1 Creating an Offscreen Buffer

The simplest way to create an image that you can use as an offscreen buffer is to use the Component.createImage method.

By creating an image whose color space, depth, and pixel layout exactly match the window into which you are drawing, the image can be efficiently blitted to a graphics device. This allows drawImage to do its job quickly.

You can also construct a BufferedImage object directly to use as an offscreen buffer. This is useful when you need control over the offscreen image’s type or transparency.

BufferedImage supports several predefined image types:

  • TYPE_3BYTE_BGR
  • TYPE_4BYTE_ABGR
  • TYPE_4BYTE_ABGR_PRE
  • TYPE_BYTE_BINARY
  • TYPE_BYTE_GRAY
  • TYPE_BYTE_INDEXED
  • TYPE_CUSTOM
  • TYPE_INT_ARGB_PRE
  • TYPE_INT_ARGB
  • TYPE_INT_BGR
  • TYPE_INT_RGB
  • TYPE_USHORT_555_RGB
  • TYPE_USHORT_565_RGB
  • TYPE_INT_GRAY

A BufferedImage object can contain an alpha channel. In Figure 5-3, an alpha channel is used to distinguish painted and unpainted areas, allowing an irregular shape to appear over graphics that have already been painted (in this case, a shaded rectangle). In other cases, you might use alpha channel to blend the colors of the new image into those in the existing image.

Note: unless you need alpha image data for transparency, as with the irregularly shaped images shown in Figure 5-2, you should avoid creating an off-screen buffer with alpha. Using alpha where it’s unnecessary slows rendering performance.

GraphicsConfiguration provides convenience methods that automatically create buffered images in a format compatible with your configuration. You can also query the graphics configuration associated with the graphics device on which the window resides to get the information you need to construct a compatible BufferedImage object.

5.3.2.2 Drawing in an Offscreen Buffer

To draw in a buffered image, you call its BufferedImage.createGraphics method, which returns a Graphics2D object. With this object, you can call all of the Graphics2D methods to draw graphics primitives, place text, and render other images in the image. This drawing technique supports dithering and other enhancements provided by the 2D imaging package. The following code illustrates the use of offscreen buffering:

    public void update(Graphics g){
        Graphics2D g2 = (Graphics2D)g;
        if(firstTime){
            Dimension dim = getSize();
            int w = dim.width;
            int h = dim.height;
            area = new Rectangle(dim);
            bi = (BufferedImage)createImage(w, h);
            big = bi.createGraphics();
            rect.setLocation(w/2-50, h/2-25);
            big.setStroke(new BasicStroke(8.0f));
            firstTime = false;
        }

        // Clears the rectangle that was previously drawn.
        big.setColor(Color.white);
        big.clearRect(0, 0, area.width, area.height);

        // Draws and fills the newly positioned rectangle to the buffer.
        big.setPaint(strokePolka);
        big.draw(rect);
        big.setPaint(fillPolka);
        big.fill(rect);

        // Draws the buffered image to the screen.
        g2.drawImage(bi, 0, 0, this);

    }

5.3.3 Manipulating BufferedImage Data Directly

In addition to drawing directly in a BufferedImage, you can directly access and manipulate the image’s pixel data in a couple of ways. These are useful if you’re implementing the BufferedImageOp filtering interface, as described in “Image Processing and Enhancement”.

You can use the BufferedImage.setRGB methods to directly set the value of a pixel or a pixel array to a specific RGB value. Note that no dithering is performed when you modify pixels directly. You can also manipulate pixel data by manipulating a WritableRaster object associated with a BufferedImage (see“Managing and Manipulating Rasters”).

5.3.4 Filtering a BufferedImage

You can apply a filtering operation to a BufferedImage using an object that implements BufferedImageOp interface. Filtering and the classes that provide this filtering interface are discussed in “Image Processing and Enhancement”.

5.3.5 Rendering a BufferedImage

To render a buffered image into a specific context, call one of the drawImage method of the context’s Graphics object. For example, when rendering within a Component.paint method, you call drawImage on the graphics object passed to the method.

    public void paint(Graphics g) {

        if (getSize().width <= 0 || getSize().height <= 0)
            return;

        Graphics2D g2 = (Graphics2D) g;

        if (offImg != null && isShowing())  {
            g2.drawImage(offImg, 0, 0, this);
        }
    }

5.4 Managing and Manipulating Rasters

A BufferedImage object uses a Raster to manage its rectangular array of pixel data. The Raster class defines fields for the image’s coordinate system—width, height, and origin. A Raster object itself uses two objects to manage the pixel data, a DataBuffer and a SampleModel. The DataBuffer is the object that stores pixel data for the raster (as described on ), and the SampleModel provides the interpretation of pixel data from the DataBuffer (as described on ).

5.4.1 Creating a Raster

In most cases, you don’t need to create a Raster directly, since one is supplied with any BufferedImage that you create in memory. However, one of the BufferedImage constructor methods allows you to create a Raster by passing in a WritableRaster.

The Raster class provides a number of static factory methods for creating Rasters with the DataBuffers and SampleModels you specify. You can use these factories when implementing RasterOp filtering classes.

5.4.2 Parent and Child Rasters

The Raster class incorporates the concept of parent and child rasters. This can improve storage efficiency by allowing you to construct any number of buffered images from the same parent. The parent and its children all refer to the same data buffer, and each child has a specific offset and bounds to identify its image location in the buffer. A child identifies its ownership through its getParent method.

To create a subraster, you use the Raster.createSubRaster method.When you create a subraster, you identify the area of its parent that it covers and its offset from the parent’s origin.

5.4.3 Operations on a Raster

The Raster class defines a number of ways to access pixels and pixel data. These are useful when you’re implementing the RasterOp interface, which provides raster-level filtering and manipulation of image data, or when implementing any method that needs to perform low-level pixel manipulation.

The Raster.getPixel methods let you get an individual pixel, which is returned as individual samples in an array. The Raster.getDataElements methods return a specified run of uninterpreted image data from the DataBuffer. The Raster.getSample method returns samples of an individual pixel. The getSamples method returns a band for a particular region of an image.

In addition to these methods, you can also access the data buffer and the sample model through instance variables of the Raster class. These objects provide additional ways to access and interpret the Raster’s pixel data.

5.4.4 The WritableRaster Subclass

The WritableRaster subclass provides methods for setting pixel data and samples. The Raster associated with a BufferedImage is actually a WritableRaster, thus providing full access to manipulate its pixel data.

5.5 Image Data and DataBuffers

The DataBuffer belonging to a Raster represents an array of image data. When you create a Raster directly or through the BufferedImage constructors, you specify a width and height in pixels, along with a SampleModel for the image data. This information is used to create a DataBuffer of the appropriate data type and size.

There are three subclasses of DataBuffer, each representing a different type of data element:

  • DataBufferByte (represents 8-bit values)
  • DataBufferInt (represents 32-bit values)
  • DataBufferShort (represents 16-bit values)
  • DataBufferUShort (represents unsigned short values)

As defined earlier, elements are the discrete members of the array of the data buffer, and components or samples are the discrete values that together make up a pixel. There can be various mappings between a particular type of element in a DataBuffer and a particular type of pixel represented by a SampleModel. It is the responsibility of the various SampleModel subclasses to implement that mapping and provide a way to get specific pixels from a specific DataBuffer.

DataBuffer constructors provide ways to create buffers of a specific size and a specific number of banks.

While you can access image data in a DataBuffer directly, it’s generally easier and more convenient to do so through the methods of the Raster and WritableRaster classes.

5.6 Extracting Pixel Data from a SampleModel

The abstract SampleModel class defines methods for extracting samples of an image without knowing how the underlying data is stored. The class provides fields for tracking the height and width of the image data in the associated DataBuffer, and for describing the number of bands and the data type of that buffer. SampleModel methods provide image data as a collection of pixels, with each pixel consisting of a number of samples or components.

The java.awt.image package provides five types of sample models:

  • ComponentSampleModel—used to extract pixels from images that store sample data in separate data array elements in one bank of a DataBuffer.
  • BandedSampleModel—used to extract pixels from images that store each sample in a separate data element with bands stored in a sequence of data elements
  • PixelInterleavedSampleModel—used to extract pixels from images that store each sample in a separate data element with pixels stored in a sequence of data elements.
  • MultiPixelPackedSampleModel—used to extract pixels from single banded images that store multiple one-sample pixels in one data element.
  • SinglePixelPackedSampleModel—used to extract samples from images that store sample data for a single pixel in one data array element in the first bank of a DataBuffer.

Pixel data presented by the SampleModel may or may not correlate directly to a color data representation of a particular color model, depending on the data source. For example, in photographic image data, the samples may represent RGB data. In image data from a medical imaging device, samples can represent different types of data such as temperature or bone density.

There are three categories of methods for accessing image data. The getPixel methods return a whole pixel as an array, with one entry for each sample. The getDataElement methods provide access to the raw, uninterpreted data stored in the DataBuffer. The getSample methods provide access to pixel components for a specific band.

5.7 ColorModels and Color Data

In addition to the Raster object for managing image data, the BufferedImage class includes a ColorModel for interpreting that data as color pixel values. The abstract ColorModel class defines methods for turning an image’s pixel data into a color value in its associated ColorSpace.

The java.awt.image package provides four types of color models:

  • PackedColorModel—An abstract ColorModel that represents pixel values that have color components embedded directly in the bits of an integer pixel. A DirectColorModel is a subclass of PackedColorModel.
  • DirectColorModel—a ColorModel that represents pixel values that have RGB color components embedded directly in the bits of the pixel itself. DirectColorModel model is similar to an X11 TrueColor visual.
  • ComponentColorModel—a ColorModel that can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace.
  • IndexColorModel—a ColorModel that represents pixel values that are indices into a fixed color map in the sRGB color space.

Based on data in the DataBuffer, the SampleModel provides the ColorModel with a pixel, which the ColorModel then interprets as a color.

5.7.1 Lookup Table

A lookup table contains data for one or more channels or image components; for example, separate arrays for R, G, and B. The java.awt.image package defines two types of lookup tables that extend the abstract LookupTable class, one that contains byte data and one that contains short data (ByteLookupTable and ShortLookupData).

5.8 Image Processing and Enhancement

The image package provides a pair of interfaces that define operations on BufferedImage and Raster objects: BufferedImageOp and RasterOp.

The classes that implement these interfaces include AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, RescaleOp. These classes can be used to geometrically transform, blur, sharpen, enhance contrast, threshold, and color correct images.

Figure 5-4 illustrates edge detection and enhancement, an operation that emphasizes sharp changes in intensity within an image. Edge detection is commonly used in medical imaging and mapping applications. Edge detection is used to increase the contrast between adjacent structures in an image, allowing the viewer to discriminate greater detail.

The previous context describes this graphic.

Figure 5-4 Edge detection and enhancement

The following code illustrates edge detection:

float[] elements = { 0.0f, -1.0f, 0.0f,
                    -1.0f, 4.f, -1.0f,
                    0.0f, -1.0f, 0.0f};
...

BufferedImage bimg = new BufferedImage(bw,bh,BufferedImage.TYPE_INT_RGB);
Kernel kernel = new Kernel(3, 3, elements);
ConvolveOp cop = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP,                                             null);
cop.filter(bi,bimg);

Figure 5-5 demonstrates lookup table manipulation. A lookup operation can be used to alter individual components of a pixel.

The previous context describes this graphic.

Figure 5-5 Lookup-table Manipulation

The following code demonstrates Lookup-table manipulation:

        byte reverse[] = new byte[256];
   for (int j=0; j<200; j++){
                reverse[j]=(byte)(256-j);
        }
        ByteLookupTable blut=new ByteLookupTable(0, reverse);
        LookupOp lop = new LookupOp(blut, null);
   lop.filter(bi,bimg);

Figure 5-6 illustrates rescaling. Rescaling can increase or decrease the intensity of all points. Rescaling can be used to increase the dynamic range of an otherwise neutral image, bringing out detail in a region that appears neutral or flat.

The previous context describes this graphic.

Figure 5-6 Rescaling

The following code snippet illustrates rescaling:

        RescaleOp rop = new RescaleOp(1.5f, 1.0f, null);
        rop.filter(bi,bimg);

5.8.1 Using an Image Processing Operation

Convolution is the process that underlies most spatial filtering algorithms. Convolution is the process of weighting or averaging the value of each pixel in an image with the values of neighboring pixels.This allows each output pixel to be affected by the immediate neighborhood in a way that can be mathematically specified with a kernel. Figure 5-7 illustrates Convolution.

The previous context describes this graphic.

Figure 5-7 Blurring with Convolution

The following code fragment illustrates how to use one of the image processing classes, ConvolveOp. In this example, each pixel in the source image is averaged equally with the eight pixels that surround it.

float weight = 1.0f/9.0f;float[] elements = new float[9]; // create 2D array// fill the array with nine equal elements
for (i = 0; i < 9; i++) {   elements[i] = weight;}// use the array of elements as argument to create a Kernelprivate Kernel myKernel = new Kernel(3, 3, elements);public ConvolveOp simpleBlur = new ConvolveOp(myKernel);

// sourceImage and destImage are instances of BufferedImagesimpleBlur.filter(sourceImage, destImage) // blur the image

The variable simpleBlur contains a new instance of ConvolveOp that implements a blur operation on a BufferedImage or a Raster. Suppose that sourceImage and destImage are two instances of BufferedImage. When you call filter, the core method of the ConvolveOp class, it sets the value of each pixel in the destination image by averaging the corresponding pixel in the source image with the eight pixels that surround it.

The convolution kernel in this example could be represented by the following matrix, with elements specified to four significant figures:

A 3 by 3 matrix with all values being 0.1111.

When an image is convolved, the value of each pixel in the destination image is calculated by using the kernel as a set of weights to average the pixel’s value with the values of surrounding pixels. This operation is performed on each channel of the image.

The following formula shows how the weights in the kernel are associated with the pixels in the source image when the convolution is performed. Each value in the kernel is tied to a spatial position in the image.

A 3 by 3 matrix. The first row values are i minus 1, j minus 1, i, j minus 1, and i plus 1, j minus1. The second row values are i minus 1, j, i, j, and i plus1, j. The third row values are i minus 1, j plus 1, i, j plus 1, and i plus 1, j plus 1.

The value of a destination pixel is the sum of the products of the weights in the kernel multiplied by the value of the corresponding source pixel. For many simple operations, the kernel is a matrix that is square and symmetric, and the sum of its weights adds up to one.2

The convolution kernel in this example is relatively simple. It weights each pixel from the source image equally. By choosing a kernel that weights the source image at a higher or lower level, a program can increase or decrease the intensity of the destination image. The Kernel object, which is set in the ConvolveOp constructor, determines the type of filtering that is performed. By setting other values, you can perform other types of convolutions, including blurring (such as Gaussian blur, radial blur, and motion blur), sharpening, and smoothing operations. Figure 5-8 illustrates sharpening using Convolution.

The previous context describes this graphic.

Figure 5-8 Sharpening with Convolution

The following code snippet illustrates sharpening with Convolution:

float[] elements = { 0.0f, -1.0f, 0.0f,
                    -1.0f,  5.f, -1.0f,
                     0.0f, -1.0f,  0.0f};
...

Kernel kernel = new Kernel(3,3,elements);
ConvolveOp cop = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP,                                                                                                          null);
        cop.filter(bi,bimg);

1It is up to the programmer to “erase” the previous version of the image before making a new copy at a new location. This can be done by redrawing the background or copying the background from another offscreen buffer.
2If the sum of the weights in the matrix is one, the intensity of the destination image is unchanged from the source.
Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 1

Java 2D API Overview

The Java 2D API enhances the graphics, text, and imaging capabilities of the Abstract Windowing Toolkit (AWT), enabling the development of richer user interfaces and new types of Java applications.

Along with these richer graphics, font, and image APIs, the Java 2D API supports enhanced color definition and composition, hit detection on arbitrary geometric shapes and text, and a uniform rendering model for printers and display devices.

The Java 2D API also enables the creation of advanced graphics libraries, such as CAD-CAM libraries and graphics or imaging special effects libraries, as well as the creation of image and graphic file read/write filters.

When used in conjunction with the Java Media Framework and other Java Media APIs, the Java 2D APIs can be used to create and display animations and other multimedia presentations. The Java Animation and Java Media Framework APIs rely on the Java 2D API for rendering support.

1.1 Enhanced Graphics, Text, and Imaging

Early versions of the AWT provided a simple rendering package suitable for rendering common HTML pages, but not full-featured enough for complex graphics, text, or imaging. As a simplified rendering package, the early AWT embodied specific cases of more general rendering concepts. The Java 2D API provides a more flexible, full-featured rendering package by expanding the AWT to support more general graphics and rendering operations.

For example, through the Graphics class you can draw rectangles, ovals, and polygons. Graphics2D enhances the concept of geometric rendering by providing a mechanism for rendering virtually any geometric shape. Similarly, with the Java 2D API you can draw styled lines of any width and fill geometric shapes with virtually any texture.

Geometric shapes are provided through implementations of the Shape interface, for example Rectangle2D and Ellipse2D. Curves and arcs are also specific implementations of Shape.

Fill and pen styles are provided through implementations of the Paint and Stroke interfaces, for example BasicStroke, GradientPaint, TexturePaint, and Color.

AffineTransform defines linear transformations of 2D coordinates, including scale, translate, rotate, and shear.

Clip regions are defined by the same implementations of the Shape interface that are used to define general clipping regions, for example Rectangle2D and GeneralPath.

Color composition is provided by implementations of the Composite interface, for example AlphaComposite.

A Font is defined by collections of Glyphs, which are in turn defined by individual Shapes.

1.2 Rendering Model

The basic graphics rendering model has not changed with the addition of the Java 2D APIs. To render a graphic, you set up the graphics context and invoke a rendering method on the Graphics object.

The Java 2D API class Graphics2D extends Graphics to support more graphics attributes and provide new rendering methods. Setting up a Graphics2D context is described in “Rendering with Graphics2D”.

The Java 2D API automatically compensates for differences in rendering devices and provides a uniform rendering model across different types of devices. At the application level, the rendering process is the same whether the target rendering device is a display or a printer.

The Java 2D API provides support for multi-screen environments. See Section 1.2.1, “Coordinate Systems” and “Rendering in a Multi-Screen Environment” for more information.

1.2.1 Coordinate Systems

The Java 2D API maintains two coordinate systems:

  • User space is a device-independent, logical coordinate system. Applications use this coordinate system exclusively; all geometries passed into Java 2D rendering routines are specified in user space.
  • Device space is a device-dependent coordinate system that varies according to the target rendering device.
    In a multi-screen environment with a virtual desktop where a window can span more than one physical screen device, the device coordinate system that’s used is the coordinate system of the virtual desktop that encompasses all of the screens. For more information on how the Java 2D API supports multi-screen environments, see “Rendering in a Multi-Screen Environment”.

The Java 2D system automatically performs the necessary conversions between user space and the device space of the target rendering device. Although the coordinate system for a monitor is very different from the coordinate system for a printer, these differences are invisible to applications.

1.2.1.1 User Space

As shown in Figure 1-1, the user space origin is located in the upper-left corner of the space, with x values increasing to the right and y values increasing downward.

The previous context describes the graphic

Figure 1-1 User Space Coordinate System

User space represents a uniform abstraction of all possible device coordinate systems. The device space for a particular device might have the same origin and direction as user space, or it might be different. Regardless, user space coordinates are automatically transformed into the appropriate device space when a graphic object is rendered. Often, the underlying platform device drivers are used to perform this conversion.

1.2.1.2 Device Space

The Java 2D API defines three levels of configuration information that are maintained to support the conversion from user space to device space. This information is encapsulated by three classes:

  • GraphicsEnvironment
  • GraphicsDevice
  • GraphicsConfiguration

Between them, the GraphicsEnvironment, GraphicsDevice, and GraphicsConfiguration represent all of the information necessary for locating a rendering device or font on the Java platform and for converting coordinates from user space to device space. An application can access this information, but does not need to perform any transformations between user space and device space.

The GraphicsEnvironment describes the collection of rendering devices visible to a Java application on a particular platform. Rendering devices include screens, printers, and image buffers. The GraphicsEnvironment also includes a list of all of the available fonts on the platform.

A GraphicsDevice describes an application-visible rendering device, such as a screen or printer. Each possible configuration of the device is represented by a GraphicsConfiguration. For example, an SVGA display device can operate in several modes: 640x480x16 colors, 640x480x256 colors, and 800x600x256 colors. The SVGA screen is represented by a GraphicsDevice object and each of the modes is represented by a GraphicsConfiguration object.

A GraphicsEnvironment can contain one or more GraphicsDevices; in turn, each GraphicsDevice can have one or more GraphicsConfigurations.

1.2.2 Transforms

The Java 2D API has a unified coordinate transformation model. All coordinate transformations, including transformations from user to device space, are represented by AffineTransform objects. AffineTransform defines the rules for manipulating coordinates using matrices.

You can add an AffineTransform to the graphics context to rotate, scale, translate, or shear a geometric shape, text, or image when it is rendered. The added transform is applied to any graphic object rendered in that context. The transform is performed when user space coordinates are converted to device space coordinates.

1.2.3 Fonts

A string is commonly thought of in terms of the characters that comprise the string. When a string is drawn, its appearance is determined by the font that is selected. However, the shapes that the font uses to display the string don’t always correspond to individual characters. For example, in professional publishing, certain combinations of two or more characters are often replaced by a single shape called a ligature.

The shapes that a font uses to represent the characters in the string are called glyphs. A font might represent a character such as a lowercase a acute using multiple glyphs, or represent certain character combinations such as the fi in final with a single glyph. In the Java 2D API, a glyph is simply a Shape that can be manipulated and rendered in the same way as any other Shape.

A font can be thought of as a collection of glyphs. A single font might have many versions, such as heavy, medium, oblique, gothic, and regular. These different versions are called faces. All of the faces in a font have a similar typographic design and can be recognized as members of the same family. In other words, a collection of glyphs with a particular style forms a font face, a collection of font faces forms a font family, and a collection of font families forms the set of fonts available within a particular GraphicsEnvironment.

In the Java 2D API, fonts are specified by a name that describes a particular font face—for example, Helvetica Bold.

Using the Java 2D API, you can compose and render strings that contain multiple fonts of different families, faces, sizes, and even languages. The appearance of the text is kept logically separate from the layout of the text. Font objects are used to describe the appearance, and the layout information is stored in TextLayout and TextAttributeSet objects. Keeping the font and layout information separate makes it easier to use the same fonts in different layout configurations.

1.2.4 Images

Images are collections of pixels organized spatially. A pixel defines the appearance of an image at a single display location. A two-dimensional array of pixels is called a raster.

The pixel’s appearance can be defined directly or as an index into a color table for the image.

In images that contain many colors (more than 256), the pixels usually directly represent the color, alpha, and other display characteristics for each screen location. Such images tend to be much larger than indexed-color images, but they look more realistic.

In an indexed-color image, the colors in the image are limited to the colors specified in the color table, often resulting in fewer colors that can be used in the image. However, an index typically requires less storage space than a color value, so images stored as a set of indexed colors are usually smaller. This pixel format is popular for images that contain only 16 or 256 colors.

Images in the Java 2D API have two primary components:

  • The raw image data (the pixels)
  • The information necessary for interpreting the pixels

The rules for interpreting the pixel are encapsulated by a ColorModel object—for example, whether the values should be interpreted as direct or indexed colors. For a pixel to be displayed, it must be paired with a color model.

A band is one component of the color space for an image. For example, the Red, Green, and Blue components are the bands in an RGB image. A pixel in a direct color model image can be thought of as a collection of band values for a single screen location.

The java.awt.image package contains several ColorModel implementations, including those for packed and component pixel representations.

A ColorSpace object encapsulates the rules that govern how a set of numeric measurements corresponds to a particular color. The ColorSpace implementations in the java.awt.color represent the most popular color spaces, including RGB and gray scale. Note that a color space is not a collection of colors—it defines the rules for how to interpret individual color values.

Separating the color space from the color model provides greater flexibility in how colors are represented and converted from one color representation to another.

1.2.5 Fills and Strokes

With the Java 2D API, you can render Shapes using different pen styles and fill patterns. Because text is ultimately represented by a set of glyphs, text strings can also be stroked and filled.

Pen styles are defined by objects that implement the Stroke interface. Strokes enable you to specify different widths and dashing patterns for lines and curves.

Fill patterns are defined by objects that implement the Paint interface. The Color class, which was available in earlier versions of the AWT, is a simple type of Paint object used to define solid-color fills. The Java 2D API provides two additional Paint implementations, TexturePaint and GradientPaint. TexturePaint defines a fill pattern using a simple image fragment that is repeated uniformly. GradientPaint defines a fill pattern as a gradient between two colors.

In Java 2D, rendering a shape’s outline and filling the shape with a pattern are two separate operations:

  • Using one of the draw methods renders the shape’s contour or outline using the pen style specified by the Stroke attribute and the fill pattern specified by the Paint attribute.
  • Using the fill method fills the interior of the shape with the pattern specified by the Paint attribute.

When a text string is rendered, the current Paint attribute is applied to the glyphs that form the string. Note, however, that drawString actually fills the glyphs that are rendered. To stroke the outlines of the glyphs in a text string, you need to get the outlines and render them as shapes using the draw method.

1.2.6 Composites

When you render an object that overlaps an existing object, you need to determine how to combine the colors of the new object with the colors that already occupy the area where you are going to draw. The Java 2D API encapsulates rules for how to combine colors in a Composite object.

Primitive rendering systems provide only basic Boolean operators for combining colors. For example, a Boolean compositing rule might allow the source and destination color values to be ANDed, ORed, or XORed. There are several problems with this approach

  • It is not “human friendly”—it is difficult to think in terms of what the resulting color will be if red and blue are ANDed, not added.
  • Boolean composition does not support the accurate composition of colors in different color spaces.
  • Straight Boolean composition doesn’t take into account the color models of the colors. For example, in an indexed color model, the result of a Boolean operation on two pixel values in an image is the composite of two indices, not two colors.

The Java 2D API avoids these pitfalls by implementing alpha-blending1 rules that take color model information into account when compositing colors. An AlphaComposite object includes the color model of both the source and destination colors.

1.3 The Java 2D API Packages

The Java 2D API classes are organized into the following packages:

  • java.awt
  • java.awt.geom
  • java.awt.font
  • java.awt.color
  • java.awt.image
  • java.awt.image.renderable
  • java.awt.print

Package java.awt contains those Java 2D API classes and interfaces that are general in nature or that enhance legacy classes. (Obviously, not all of the classes in java.awt are Java 2D classes.)

Package java.awt.geom contains classes and interfaces related to the definition of geometric primitives.

Many of the geometric primitives have corresponding .Float and .Double implementations. This was done to enable both floating single- and double-precision implementations. Double-precision implementations provide greater rendering precision at the expense of performance on some platforms.

Package java.awt.font contains classes and interfaces used for text layout and the definition of fonts.

Packagejava.awt.color contains classes and interfaces for the definition of color spaces and color profiles.

The java.awt.image and >java.awt.image.renderable packages contain classes and interfaces for the definition and rendering of images.

Package java.awt.print contains classes and interfaces that enable printing of all Java 2D–based text, graphics, and images.

1For detailed information about alpha blending, see Section 17.6 of Computer Graphics: Principles and Practice. 2nd ed. J.D. Foley, A. van Dam, S.K. Feiner, J.F. Hughes. Addison- Wesley, 1990.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
f

Programmer's Guide to the Java 2D API

Java SE
1.4 version

April 24, 2001
Contents | Previous | Next

Java 2D API Overview

Enhanced Graphics, Text, and Imaging

Rendering Model

Coordinate Systems

Transforms

Fonts

Images

Fills and Strokes

Composites

The Java 2D API Packages

Rendering with Graphics2D

Interfaces and Classes

Rendering Concepts

Rendering Process

Controlling Rendering Quality

Stroke Attributes

Fill Attributes

Clipping Paths

Transformations

Composite Attributes

Setting Up the Graphics2D Context

Setting Rendering Hints

Specifying Stroke Attributes

Specifying Fill Attributes

Setting the Clipping Path

Setting the Graphics2D Transform

Specifying a Composition Style

Rendering Graphics Primitives

Drawing a Shape

Filling a Shape

Rendering Text

Rendering Images

Defining Custom Composition Rules

Rendering in a Multi-Screen Environment

Geometries

Interfaces and Classes

Geometry Concepts

Constructive Area Geometry

Bounds and Hit Testing

Combining Areas to Create New Shapes

Creating a Custom Shape

Fonts and Text Layout

Interfaces and Classes

Font Concepts

Text Layout Concepts

Shaping Text

Ordering Text

Measuring and Positioning Text

Supporting Text Manipulation

Performing Text Layout in a Java Application

Managing Text Layout

Laying Out Text

Displaying Dual Carets

Moving the Caret

Hit Testing

Highlighting Selections

Querying Layout Metrics

Drawing Text Across Multiple Lines

Implementing a Custom Text Layout Mechanism

Creating Font Derivations

Imaging

Interfaces and Classes

Imaging Interfaces

Image Data Classes

Image Operation Classes

Sample Model Classes

Color Model Classes

Exception Classes

Immediate Mode Imaging Concepts

Terminology

Using BufferedImages

Creating a BufferedImage

Drawing in an Offscreen Buffer

Manipulating BufferedImage Data Directly

Filtering a BufferedImage

Rendering a BufferedImage

Managing and Manipulating Rasters

Creating a Raster

Parent and Child Rasters

Operations on a Raster

The WritableRaster Subclass

Image Data and DataBuffers

Extracting Pixel Data from a SampleModel

ColorModels and Color Data

Lookup Table

Image Processing and Enhancement

Using an Image Processing Operation

Color

Classes

Color Concepts

Describing Colors

Mapping Colors through sRGB and CIEXYZ

Printing

Interfaces and Classes

Printing Concepts

Supporting Printing

Page Painters

Printable Jobs and Pageable Jobs

Typical Life-Cycle of a PrinterJob

Dialogs

Printing with Printables

Using Graphics2D for Rendering

Printing a File

Printing with Pageables and Books

Using a Pageable Job

Using Multiple Page Painters

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Legal Notices

Documentation Contents

See Legal Notices

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 7

Printing

The Java Printing API enables applications to:

  • Print all AWT and Java 2D graphics, including composited graphics and images.
  • Control document-composition functions such as soft collating, reverse order printing, and booklet printing.
  • Invoke printer-specific functions such as duplex (two-sided) printing and stapling.
  • Print on all platforms, including Windows and Solaris. This includes printers directly attached to the computer as well as those that the platform software is able to access using network printing protocols.

7.1 Interfaces and Classes

Interface | Description
Printable | The Printable interface is implemented by each page painter, the application class(es) called by the printing system to render a page. The system calls the page painter’s print method to request that a page be rendered.
Pageable | The Pageable interface is implemented by a document that is to be printed by the printing system. Through the Pageable methods, the system can determine the number of pages in the document, the format to use for each page, and the page painter to use to render each page.
PrinterGraphics | The Graphics2D objects that a page painter uses to render a page implement the PrinterGraphics interface. This enables an application to get the PrinterJob object that is controlling the printing.
Class | Description
Book | Implements: Pageable Represents a document in which pages can have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob.
PageFormat | Describes the size and orientation of a page to be printed, as well as the Paper used to print it. For example, portrait and landscape paper orientations are represented by PageFormat.
Paper | Describes the physical characteristics of a piece of paper.
PrinterJob | The principal class that controls printing. The application calls PrinterJob methods to set up a job, display a print dialog to the user (optional), and to print the pages in the job.

7.2 Printing Concepts

The Java Printing API is based on a callback printing model in which the printing system, not the application, controls when pages are printed. The application provides information about the document to be printed and the printing system asks the application to render each page as it needs them.

The printing system might request that a particular page be rendered more than once or request that pages be rendered out of order. The application must be able to generate the proper page image, no matter which page the printing system requests. In this respect, the printing system is similar to the window toolkit, which can request components to repaint at any time, in any order.

The callback printing model is more flexible than traditional application-driven printing models and supports printing on a wider range of systems and printers. For example, if a printer stacks output pages in reverse order, the printing system can ask the application to generate pages in reverse order so that the final stack is in proper reading order.

This model also enables applications to print to a bitmap printer from computers that don’t have enough memory or disk space to buffer a full-page bitmap. In this situation, a page is printed as a series of small bitmaps or bands. For example, if only enough memory to buffer one tenth of a page is available, the page is divided into ten bands. The printing system asks the application to render each page ten times, once to fill each band. The application does not need to be aware of the number or size of the bands; it simply must be able to render each page when requested.

7.2.1 Supporting Printing

An application has to perform two tasks to support printing:

  • Job control—initiating and managing the print job.
  • Imaging—rendering each page when the printing system requests it.

7.2.1.1 Job Control

The user often initiates printing by clicking a button or selecting a menu item in an application. When a print operation is triggered by the user, the application creates a PrinterJob object and uses it to manage the printing process.

The application is responsible for setting up the print job, displaying print dialogs to the user, and starting the printing process.

7.2.1.2 Imaging

When a document is printed, the application has to render each page when the printing system requests it. To support this mechanism, the application provides a page painter that implements the Printable interface. When the printing system needs a page rendered, it calls the page painter’s print method.

When a page painter’s print method is called, it is passed a Graphics context to use to render the page image. It is also passed a PageFormat object that specifies the geometric layout of the page, and an integer page index that identifies the ordinal position of the page in the print job.

The printing system supports both Graphics and Graphics2D rendering, To print Java 2D Shapes, Text, and Images, you cast the Graphics object passed into the print method to a Graphics2D.

To print documents in which the pages use different page painters and have different formats, you use a pageable job. To create a pageable job, you can use the Book class or your own implementation of the Pageable interface. To implement simple printing operations, you do not need to use a pageable print job; Printable can be used as long as all of the pages share the same page format and painter.

7.2.2 Page Painters

The principal job of a page painter is to render a page using the graphics context that is provided by the printing system. A page painter implements the Printable.print method:

public int print(Graphics g, PageFormat pf, int pageIndex)

The graphics context passed to the print method is either an instance of Graphics or Graphics2D, depending on the packages loaded in your Java Virtual Machine. To use Graphics2D features, you can cast the Graphics object to a Graphics2D. The Graphics instance passed to print also implements the PrinterGraphics interface.

The PageFormat passed to a Printable describes the geometry of the page being printed. The coordinate system of the graphics context passed to print is fixed to the page: the origin of the coordinate system is at the upper left corner of the paper, X increases to the right, Y increases downward, and the units are 1/72 inch. If the page is in portrait orientation, the x-axis aligns with the paper’s “width,” while the y-axis aligns with the paper’s “height.” (Normally, but not always, a paper’s height exceeds its width.) If the page is in landscape orientation, the roles are reversed: the x-axis aligns with the paper’s “height” and the y-axis with its “width.”

Because many printers cannot print on the entire paper surface, the PageFormat specifies the imageable area of the page: this is the portion of the page in which it’s safe to render. The specification of the imageable area does not alter the coordinate system; it is provided so that the contents of the page can be rendered so that they don’t extend into the area where the printer can’t print.

The graphics context passed to print has a clip region that describes the portion of the imageable area that should be drawn. It is always safe to draw the entire page into the context; the printing system will handle the necessary clipping. However, to eliminate the overhead of drawing portions of the page that won’t be printed, you can use the clipping region to limit the areas that you render. To get the clipping region from the graphics context, call Graphics.getClip. You are strongly encouraged to use the clip region to reduce the rendering overhead.

It is sometimes desirable to launch the entire printing operation “in the background” so that a user can continue to interact with the application while pages are being rendered. To do this, call PrinterJob.print in a separate thread.

If possible, you should avoid graphics operations that require knowledge of the previous image contents, such as copyArea, setXOR, and compositing. These operations can slow rendering and the results might be inconsistent.

7.2.3 Printable Jobs and Pageable Jobs

A Printable job provides the simplest way to print. Only one page painter is used; the application provides a single class that implements the Printable interface. When it’s time to print, the printing system calls the page painter’s print method to render each page. The pages are requested in order, starting with page index 0. However, the page painter might be asked to render each page several times before it advances to the next page. When the last page has been printed, the page painter’s print method returns NO_SUCH_PAGE.

In a Printable job:

  • All pages use the same page painter and PageFormat. If a print dialog is presented, it will not display the number of pages in the document because that information is not available to the printing system.
  • The printing system always asks the page painter to print each page in indexed order, starting with the page at index 0. No pages are skipped. For example, if a user asks to print pages 2 and 3 of a document, the page painter will be called with indices 0, 1, and 2. The printing system might request that a page be rendered multiple times before moving to the next page.
  • The page painter informs the printing system when the end of the document has been reached.
  • All page painters are called in the same thread.
  • Some printing systems might not be able to achieve the ideal output. For example, the stack of pages emerging from the printer might be in the wrong order, or the pages might not be collated if multiple copies are requested.

A Pageable job is more flexible than a Printable job. Unlike the pages in a Printable job, pages in a Pageable job can differ in layout and implementation. To manage a Pageable job, you can use the Book class or implement your own Pageable class. Through the Pageable, the printing system can determine the number of pages to print, the page painter to use for each page, and the PageFormat to use for each page. Applications that need to print documents that have a planned structure and format should use Pageable jobs.

In a Pageable job:

  • Different pages can use different page painters and PageFormats.
  • The printing system can ask page painters to print pages in an arbitrary order and some pages might be skipped. For example, if a user asks to print pages 2 and 3 of a document, the page painter will be called with indices 1 and 2 and page index 0 will be skipped.
  • Pageable jobs do not need to know in advance how many pages are in the document. However, unlike Printable jobs, they must be able to render pages in any order. There might be gaps in the sequencing and the printing system might request that a page be rendered multiple times before moving to the next page. For example, a request to print pages 2 and 3 of a document might result in a sequence of calls that request pages with indices 2,2,1,1, and 1.

7.2.4 Typical Life-Cycle of a PrinterJob

An application steers the PrinterJob object through a sequence of steps to complete a printing job. The simplest sequence used by an application is:

  • Get a new PrinterJob object by calling PrinterJob.getPrinterJob.
  • Determine what PageFormat to use for printing. A default PageFormat can be obtained by calling defaultPage or you can invoke pageDialog to present a dialog box that allows the user to specify a format.
  • Specify the characteristics of the job to be printed to the PrinterJob. For a Printable job, call setPrintable; for a Pageable job, call setPageable. Note that a Book object is ideal for passing to setPageable.
  • Specify additional print job properties, such as the number of copies to print or the name of the job to print on the banner page.
  • Call printDialog to present a dialog box to the user. This is optional. The contents and appearance of this dialog can vary across different platforms and printers. On most platforms, the user can use this dialog to change the printer selection. If the user cancels the print job, the printDialog method returns FALSE.
  • Call Printerjob.print to print the job. This method in turn calls print on the appropriate page painters.

A job can be interrupted during printing if:

  • A PrinterException is thrown—the exception is caught by the print method and the job is halted. A page painter throws a PrinterException if it detects a fatal error.
  • PrinterJob.cancel is called—the printing loop is terminated and the job is canceled. The cancel method can be called from a separate thread that displays a dialog box and allows the user to cancel printing by clicking a button in the box.

Pages generated before a print job is stopped might or might not be printed.

The print job is usually not finished when the print method returns. Work is typically still being done by a printer driver, print server, or the printer itself. The state of the PrinterJob object might not reflect the state of the actual job being printed.

Because the state of a PrinterJob changes during its life cycle, it is illegal to invoke certain methods at certain times. For example, calling setPageable after you’ve called print makes no sense. When illegal calls are detected, the PrinterJob throws a java.lang.IllegalStateException.

7.2.5 Dialogs

The Java Printing API requires that applications invoke user-interface dialogs explicitly. These dialogs might be provided by the platform software (such as Windows) or by a JDK implementation. For interactive applications, it is customary to use such dialogs. For production printing applications, however, dialogs are not necessary. For example, you wouldn’t want to display a dialog when automatically generating and printing a nightly database report. A print job that requires no user interaction is sometimes called a silent print job.

7.2.5.1 Page setup dialog

You can allow the user to alter the page setup information contained in a PageFormat by displaying a page setup dialog. To display the page setup dialog, you call PrinterJob.pageDialog. The page setup dialog is initialized using the parameter passed to pageDialog. If the user clicks the OK button in the dialog, the PageFormat instance is cloned, altered to reflect the user’s selections, and then returned. If the user cancels the dialog, pageDialog returns the original unaltered PageFormat.

7.2.5.2 Print dialog

Typically, an application presents a print dialog to the user when a print menu item or button is activated. To display this print dialog, you call the PrinterJob’s printDialog method. The user’s choices in the dialog are constrained based on the number and format of the pages in the Printable or Pageable that have been furnished to the PrinterJob. If the user clicks OK in the print dialog, printDialog returns TRUE. If the user cancels the print dialog, FALSE is returned and the print job should be considered abandoned.

7.3 Printing with Printables

To provide basic printing support:

  • Implement the Printable interface to provide a page painter that can render each page to be printed.
  • Create a PrinterJob.
  • Call setPrintable to tell the PrinterJob how to print your document.
  • Call print on the PrinterJob object to start the job.

In the following example, a Printable job is used to print five pages, each of which displays a green page number. Job control is managed in the main method, which obtains and controls the PrinterJob. Rendering is performed in the page painter’s print method.

import java.awt.*; import java.awt.print.*;
public class SimplePrint implements Printable
{
  private static Font fnt = new Font("Helvetica",Font.PLAIN,24);

  public static void main(String[] args)
  {
    // Get a PrinterJob
    PrinterJob job = PrinterJob.getPrinterJob();
    // Specify the Printable is an instance of SimplePrint
    job.setPrintable(new SimplePrint());
    // Put up the dialog box
    if (job.printDialog())
    {
      // Print the job if the user didn't cancel printing
      try { job.print(); }
      catch (Exception e)
        { /* handle exception */ }
    }
    System.exit(0);
  }

  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
    // pageIndex 0 to 4 corresponds to page numbers 1 to 5.
    if (pageIndex >= 5) return Printable.NO_SUCH_PAGE;
    g.setFont(fnt);
    g.setColor(Color.green);
    g.drawString("Page " + (pageIndex+1), 100, 100);
    return Printable.PAGE_EXISTS;
  }
}

7.3.1 Using Graphics2D for Rendering

You can invoke Graphics2D functions in you page painter’s print method by first casting the Graphics context to a Graphics2D.

In the following example, the page numbers are rendered using a red-green gradient. To do this, a GradientPaint is set in the Graphics2D context.

import java.awt.*; import java.awt.print.*;
public class SimplePrint2D implements Printable
{
  private static Font fnt = new Font("Helvetica",Font.PLAIN,24);

  private Paint pnt = new GradientPaint(100f, 100f, Color.red,                                            136f, 100f, Color.green, true);

  public static void main(String[] args)
  {
    // Get a PrinterJob
    PrinterJob job = PrinterJob.getPrinterJob();
    // Specify the Printable is an instance of SimplePrint2D
    job.setPrintable(new SimplePrint2D());
    // Put up the dialog box
    if (job.printDialog())
    {
      // Print the job if the user didn't cancel printing
      try { job.print(); }
      catch (Exception e) { /* handle exception */ }
    }
  System.exit(0);
  }

  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
    // pageIndex 0 to 4 corresponds to page numbers 1 to 5.
    if (pageIndex >= 5) return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
    // Use the font defined above
    g2.setFont(fnt);
    // Use the gradient color defined above
    g2.setPaint(pnt);
    g2.drawString("Page " + (pageIndex+1), 100f, 100f);
    return Printable.PAGE_EXISTS;
  }
}

7.3.2 Printing a File

When a page painter’s print method is invoked several times for the same page, it must generate the same output each time.

There are many ways to ensure that repeated requests to render a page yield the same output. For example, to ensure that the same output is generated each time the printing system requests a particular page of a text file, page painter could either store and reuse file pointers for each page or store the actual page data.

In the following example, a “listing” of a text file is printed. The name of the file is passed as an argument to the main method. The PrintListingPainter class stores the file pointer in effect at the beginning of each new page it is asked to render. When the same page is rendered again, the file pointer is reset to the remembered position.

import java.awt.*;
import java.awt.print.*;
import java.io.*;

public class PrintListing
{
  public static void main(String[] args)
  {
    // Get a PrinterJob
    PrinterJob job = PrinterJob.getPrinterJob();
    // Ask user for page format (e.g., portrait/landscape)
    PageFormat pf = job.pageDialog(job.defaultPage());
    // Specify the Printable is an instance of
    // PrintListingPainter; also provide given PageFormat
    job.setPrintable(new PrintListingPainter(args[0]), pf);
    // Print 1 copy
    job.setCopies(1);
    // Put up the dialog box
    if (job.printDialog())
    {
      // Print the job if the user didn't cancel printing
      try { job.print(); }
      catch (Exception e) { /* handle exception */ }
    }
    System.exit(0);
  }
}

class PrintListingPainter implements Printable
{
  private RandomAccessFile raf;
  private String fileName;
  private Font fnt = new Font("Helvetica", Font.PLAIN, 10);
  private int rememberedPageIndex = -1;
  private long rememberedFilePointer = -1;
  private boolean rememberedEOF = false;

  public PrintListingPainter(String file)
  {
    fileName = file;
    try
    {
      // Open file
      raf = new RandomAccessFile(file, "r");
    }
    catch (Exception e) { rememberedEOF = true; }
  }

  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
  try
  {
    // For catching IOException
    if (pageIndex != rememberedPageIndex)
    {
      // First time we've visited this page
      rememberedPageIndex = pageIndex;
      // If encountered EOF on previous page, done
      if (rememberedEOF) return Printable.NO_SUCH_PAGE;
      // Save current position in input file
      rememberedFilePointer = raf.getFilePointer();
    }
    else raf.seek(rememberedFilePointer);
    g.setColor(Color.black);
    g.setFont(fnt);
        int x = (int) pf.getImageableX() + 10;
        int y = (int) pf.getImageableY() + 12;
    // Title line
    g.drawString("File: " + fileName + ", page: " +                                          (pageIndex+1),  x, y);
    // Generate as many lines as will fit in imageable area
    y += 36;
    while (y + 12 < pf.getImageableY()+pf.getImageableHeight())
    {
      String line = raf.readLine();
      if (line == null)
      {
        rememberedEOF = true;
        break;
                }
        g.drawString(line, x, y);
        y += 12;
      }
      return Printable.PAGE_EXISTS;
    }
    catch (Exception e) { return Printable.NO_SUCH_PAGE;}
  }
}

7.4 Printing with Pageables and Books

Pageable jobs are suited for applications that build an explicit representation of a document, page by page. The Book class is a convenient way to use Pageables, but you can also build your own Pageable structures if Book does not suit your needs. This section shows you how to use Book.

Although slightly more involved, Pageable jobs are preferred over Printable jobs because the printing system has more flexibility. A major advantage of Pageables is that the number of pages in the document is usually known and can be displayed to the user in the print dialog box. This helps the user to confirm that the job is specified correctly or to select a range of pages for printing.

A Book represents a collection of pages. The pages in a book do not have to share the same size, orientation, or page painter. For example, a Book might contain two letter size pages in portrait orientation and a letter size page in landscape orientation.

When a Book is first constructed, it is empty. To add pages to a Book, you use the append method. This method takes a PageFormat object that defines the page’s size, printable area, and orientation and a page painter that implements the Printable interface.

Multiple pages in a Book can share the same page format and painter. The append method is overloaded to enable you to add a series of pages that have the same attributes by specifying a third parameter, the number of pages.

If you don’t know the total number of pages in a Book, you can pass UNKNOWN_NUMBER_OF_PAGES to the append method. The printing system will then call your page painters in order of increasing page index until one of them returns NO_SUCH_PAGE.

The setPage method can be used to change a page’s page format or painter. The page to be changed is identified by a page index that indicates the page’s location in the Book.

You call setPageable and pass in the Book to prepare the print job. The setPageable and setPrintable methods are mutually exclusive; that is, you should call one or the other but not both when preparing the PrinterJob.

7.4.1 Using a Pageable Job

In the following example, a Book is used to reproduce the first simple printing example. (Because this case is so simple, there is little benefit in using a Pageable job instead of a Printable job, but it illustrates the basics of using a Book.) Note that you still have to implement the Printable interface and perform page rendering in the page painter’s print method.

import java.awt.*;
import java.awt.print.*;

public class SimplePrintBook implements Printable
{
  private static Font fnt = new Font("Helvetica",Font.PLAIN,24);
  public static void main(String[] args)
  {
    // Get a PrinterJob
    PrinterJob job = PrinterJob.getPrinterJob();
    // Set up a book
    Book bk = new Book();
    bk.append(new SimplePrintBook(), job.defaultPage(), 5);
    // Pass the book to the PrinterJob
    job.setPageable(bk);
    // Put up the dialog box
    if (job.printDialog())
    {
      // Print the job if the user didn't cancel printing
      try { job.print(); }
      catch (Exception e) { /* handle exception */ }
    }
    System.exit(0);
  }

  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
    g.setFont(fnt);
    g.setColor(Color.green);
    g.drawString("Page " + (pageIndex+1), 100, 100);
    return Printable.PAGE_EXISTS;
  }
}

7.4.2 Using Multiple Page Painters

In the following example, two different page painters are used: one for a cover page and one for content pages. The cover page is printed in landscape mode and the contents pages are printed in portrait mode.

import java.awt.*;
import java.awt.print.*;

public class PrintBook
{
  public static void main(String[] args)
  {
    // Get a PrinterJob
    PrinterJob job = PrinterJob.getPrinterJob();
    // Create a landscape page format
    PageFormat pfl = job.defaultPage();
    pfl.setOrientation(PageFormat.LANDSCAPE);
    // Set up a book
    Book bk = new Book();
    bk.append(new PaintCover(), pfl);
    bk.append(new PaintContent(), job.defaultPage(), 2);
    // Pass the book to the PrinterJob
    job.setPageable(bk);
    // Put up the dialog box
    if (job.printDialog())
    {
      // Print the job if the user didn't cancel printing
      try { job.print(); }
      catch (Exception e) { /* handle exception */ }
    }
  System.exit(0);
  }
}

class PaintCover implements Printable
{
  Font fnt = new Font("Helvetica-Bold", Font.PLAIN, 72);

  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
    g.setFont(fnt);
    g.setColor(Color.black);
         int yc = (int) (pf.getImageableY() +               pf.getImageableHeight()/2);
    g.drawString("Widgets, Inc.", 72, yc+36);
    return Printable.PAGE_EXISTS;
  }
}
class PaintContent implements Printable
{
  public int print(Graphics g, PageFormat pf, int pageIndex)
  throws PrinterException
  {
    Graphics2D g2 = (Graphics2D) g;
    int useRed = 0;
   int xo = (int) pf.getImageableX();
        int yo = (int) pf.getImageableY();
    // Fill page with circles or squares, alternating red & green
        for (int x = 0; x+28 < pf.getImageableWidth(); x += 36)
    for (int y = 0; y+28 < pf.getImageableHeight(); y += 36)
    {
      if (useRed == 0) g.setColor(Color.red);
      else g.setColor(Color.green);
      useRed = 1 - useRed;
      if (pageIndex % 2 == 0) g.drawRect(xo+x+4, yo+y+4, 28, 28);
      else g.drawOval(xo+x+4, yo+y+4, 28, 28);
    }
    return   Printable.PAGE_EXISTS;
  }
}

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Programmer's Guide to the Java 2D API

Enhanced Graphics and Imaging for the Java Programming Language

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 2

Rendering with Graphics2D

Graphics2D extends java.awt.Graphics to provide more sophisticated control over the presentation of shapes, text, and images. The Java 2D rendering process is controlled through the Graphics2D object and its state attributes.

The Graphics2D state attributes, such as line styles and transformations, are applied to graphic objects when they are rendered. The collection of state attributes associated with a Graphics2D is referred to as the Graphics2D context. To render text, shapes, or images, you set up the Graphics2D context and then call one of the Graphics2D rendering methods, such as draw or fill.

2.1 Interfaces and Classes

The following tables list the interfaces and classes used in conjunction with the Graphics2D context, including the classes that represent state attributes. Most of these classes are part of the java.awt package.

Interface | Description
Composite | Defines methods to compose a draw primitive with the underlying graphics area. Implemented by AlphaComposite.
CompositeContext | Defines the encapsulated and optimized environment for a composite operation. Used by programmers implementing custom compositing rules.
Paint | Extends: Transparency Defines colors for a draw or fill operation. Implemented by Color, GradientPaint and TexturePaint.
PaintContext | Defines the encapsulated and optimized environment for a paint operation. Used by programmers implementing custom paint operations.
Stroke | Generates a Shape that encloses the outline of the Shape to be rendered. Implemented by BasicStroke.

Class | Description
AffineTransform (java.awt.geom) | Represents a 2D affine transform, which performs a linear mapping from 2D coordinates to other 2D coordinates.
AlphaComposite | Implements: Composite Implements basic alpha composite rules for shapes, text, and images.
BasicStroke | Implements: Stroke Defines the “pen style” to be applied to the outline of a Shape.
Color | Implements: Paint Defines a solid color fill for a Shape.
GradientPaint | Implements: Paint Defines a linear color gradient fill pattern for a Shape. This fill pattern changes from color C1 at point P1 to color C2 at point P2.
Graphics2D | Extends: Graphics Fundamental class for 2D rendering. Extends the original java.awt.Graphics class.
TexturePaint | Implements: Paint Defines a texture or pattern fill for a Shape. The texture or pattern is generated from a BufferedImage.

2.2 Rendering Concepts

To render a graphic object using the Java 2D API, you set up the Graphics2D context and pass the graphic object to one of the Graphics2D rendering methods.

You can modify the state attributes that form the Graphics2D context to:

  • Vary the stroke width.
  • Change how strokes are joined together.
  • Set a clipping path to limit the area that is rendered.
  • Translate, rotate, scale, or shear objects when they are rendered.
  • Define colors and patterns to fill shapes with.
  • Specify how multiple graphics objects should be composed.

Graphics2D defines several methods for adding and changing attributes in the graphics context. Most of these methods take an object that represents a particular attribute, such as a Paint or Stroke object.

The Graphics2D context holds references to these attribute objects: they are not cloned. If you alter an attribute object that is part of the Graphics2D context, you need to call the appropriate set method to notify the context. Modifying an attribute object during a rendering operation will cause unpredictable and possibly unstable behavior.

2.2.1 Rendering Process

When a graphic object is rendered, the geometry, image, and attribute information are combined to calculate which pixel values must be changed on the display.

The rendering process for a Shape can be broken down into four steps:

  • If the Shape is to be stroked, the Stroke attribute in the Graphics2D context is used to generate a new Shape that encompasses the stroked path.
  • The coordinates of the Shape’s path are transformed from user space into device space according to the transform attribute in the Graphics2D context.
  • The Shape’s path is clipped using the clip attribute in the Graphics2D context.
  • The remaining Shape, if any, is filled using the Paint and Composite attributes in the Graphics2D context.

Rendering text is similar to rendering a Shape, since the text is rendered as individual glyphs and each glyph is a Shape. The only difference is that the Java 2D API must determine what Font to apply to the text and get the appropriate glyphs from the Font before rendering.

Images are handled differently, transformations and clipping operations are performed on the image’s bounding box. The color information is taken from the image itself and its alpha channel is used in conjunction with the current Composite attribute when the image pixels are composited onto the rendering surface.

2.2.2 Controlling Rendering Quality

The Java 2D API lets you indicate whether you want objects to be rendered as quickly as possible, or whether you prefer that the rendering quality be as high as possible. Your preferences are specified as hints through the RenderingHints attribute in the Graphics2D context. Not all platforms support modification of the rendering mode so specifying rendering hints does not guarantee that they will be used.

The RenderingHints class supports the following types of hints:

  • Alpha interpolation—can be set to default, quality, or speed.
  • Antialiasing—can be set to default, on, or off.
  • Color Rendering–can be set to default, quality, or speed.
  • Dithering—can be set to default, disable, or enable.
  • Fractional Metrics—can be set to default, on, or off.
  • Interpolation—can be set to nearest-neighbor, bilinear, or bicubic.
  • Rendering—can be set to default, quality, or speed.
  • Text antialiasing—can be set to default, on, or off.

To set or change the RenderingHints attribute in the Graphics2D context, you call setRenderingHints. When a hint is set to default, the platform rendering default is used is used.

Antialiasing

When graphics primitives are rendered on raster-graphics display devices, their edges can appear jagged because of aliasing. Arcs and diagonal lines take on a jagged appearance because they are approximated by turning on the pixels that are closest to the path of the line or curve. This is particularly noticeable on low-resolution devices, where the jagged edges appear in stark contrast to the smooth edges of horizontal or vertical lines.

Antialiasing is a technique used to render objects with smoother-appearing edges. Instead of simply turning on the pixel that is closest to the line or curve, the intensity of surrounding pixels is set in proportion to the amount of area covered by the geometry being rendered. This softens the edges and spreads the on-off transition over multiple pixels. However, antialiasing requires additional computing resources and can reduce rendering speed

.

This graphic shows examples of an enlarged letter

2.2.3 Stroke Attributes

Stroking a Shape such as a GeneralPath object is equivalent to running a logical pen along the segments of the GeneralPath. The Graphics2D Stroke attribute defines the characteristics of the mark drawn by the pen.

A BasicStroke object is used to define the stroke attributes for a Graphics2D context. BasicStroke defines characteristics such as the line width, endcap style, segment join-style, and the dashing pattern. To set or change the Stroke attribute in the Graphics2D context, you call setStroke.

This graphics shows endcap styles supported by BasicStroke including chopped, round and squared.
Figure 2-1 endcap styles supported by BasicStroke

This graphic shows join styles supported by BasicStroke including bevel, round and miter.
Figure 2-2 Join styles supported by BasicStroke

For example, the first image in Figure 2-3 uses the miter join-style; the second image uses a round join-style, a round endcap style, and a dashing pattern.

This graphic shows two stars, the first with a miter join-style and the second with a round join-style, a round endcap style and a dash pattern
Figure 2-3 Stroke Styles

The Graphics2D rendering methods that use the Stroke attribute are draw, drawArc, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, and drawRoundRect.When one of these methods is called, the outline of the specified Shape is rendered. The Stroke attribute defines the line characteristics and the Paint attribute defines the color or pattern of the mark drawn by the pen.

For example, when draw(myRectangle) is called:

  • The Stroke is applied to the rectangle’s outline.
  • The stroked outline is converted to a Shape object.
  • The Paint is applied to the pixels that lie within the contour of the outline Shape.

This process is illustrated in Figure 2-4:

The previous context describes this graphic.
Figure 2-4 Stroking a Shape

2.2.4 Fill Attributes

The fill attribute in the Graphics2D context is represented by a Paint object. You add a Paint to the Graphics2D context by calling setPaint.

When a Shape or glyph is drawn (Graphics2D.draw, Graphics2D.drawString), the Paint is applied to all of the pixels that lie inside of the Shape that represents the object’s stroked outline. When a Shape is filled (Graphics2D.fill), the Paint is applied to all of the pixels that lie within the Shape’s contour.

Simple solid color fills can be set with the setColor method. Color is the simplest implementation of the Paint interface.

To fill Shapes with more complex paint styles such as gradients and textures, you use the Java 2D Paint classes GradientPaint and TexturePaint. These classes eliminate the time-consuming task of creating complex fills using simple solid-color paints. Figure 2-5 illustrates two fills that could easily be defined by GradientPaint and TexturePaint.

This graphic shows two shapes, the first is irregular and fille with a gradient, the second is a rectangle and filled with a plaid texture
Figure 2-5 Complex Fill Styles

When fill is called to render a Shape, the system:

  • Determines what pixels comprise the Shape.
  • Gets the color of each pixel from the Paint object.
  • Converts the color to an appropriate pixel value for the output device.
  • Writes the pixel to that device.

Batch Processing

To streamline the processing of pixels, the Java 2D API processes them in batches. A batch can be either a contiguous set of pixels on a given scanline or a block of pixels. This batch processing is done in two steps:

  • The Paint object’s createContext method is called to create a PaintContext. The PaintContext stores the contextual information about the current rendering operation and the information necessary to generate the colors. The createContext method is passed the bounding boxes of the graphics object being filled in user space and in device space, the ColorModel in which the colors should be generated, and the transform used to map user space into device space. The ColorModel is treated as a hint because not all Paint objects can support an arbitrary ColorModel. (For more information about ColorModels, see “Color”.”)
  • The getColorModel method is called to get the ColorModel of the generated paint color from the PaintContext.

The getRaster method is then called repeatedly to get the Raster that contains the actual color data for each batch. This information is passed to the next stage in the rendering pipeline, which draws the generated color using the current Composite object.

2.2.5 Clipping Paths

A clipping path identifies the portion of a Shape or Image that needs to be rendered. When a clipping path is part of the Graphics2D context, only those parts of a Shape or Image that lie within the path are rendered.

To add a clipping path to the Graphics2D context, you call setClip. Any Shape can be used to define the clipping path.

To change the clipping path, you can either use setClip to specify a new path or call clip to change the clipping path to the intersection of the old clipping path and a new Shape.

2.2.6 Transformations

The Graphics2D context contains a transform that is used to transform objects from user space to device space during rendering. To perform additional transformations, such as rotation or scaling, you can add other transforms to the Graphics2D context. These additional transforms become part of the pipeline of transformations applied during rendering.

Graphics2D provides several different ways to modify the transform in the Graphics2D context. The simplest is to call one of the Graphics2D transformation methods: rotate, scale, shear, or translate. You specify the characteristics of the transform that you want to be applied during rendering, and Graphics2D automatically makes the appropriate changes.

You can also explicitly concatenate an AffineTransform with the current Graphics2D transform. An AffineTransform performs a linear transformation such as translation, scaling, rotation, or shearing on a set of graphics primitives. When a transform is concatenated with an existing transform, the last transform specified is the first to be applied. To concatenate a transform with the current transform, you pass an AffineTransform to Graphics2D.transform.

The Graphics2D class also contains a setTransform method, but this method should never be used to concatenate another coordinate transform onto of an existing transform. The setTransform method overwrites the Graphics2D object’s current transform, which is needed for other purposes, such as:

  • Applying a scaling transform to adjust for printer resolution.
  • Painting a JComponent at non-zero translation from its parent’s origin
  • Scaling up a component for easier viewing.
  • Any other situation in which the supplier of a Graphics2D object might want to transform the rendering for effect .

The setTransform method is intended for setting the Graphics2D object back to the original transform after rendering the transformed graphics, text or images:

AffineTransform aT = g2d.getTransform();
g2d.transform(...);g2d.draw(...);
g2d.setTransform(aT);

Graphics2D also provides a version of drawImage that takes an AffineTransform as a parameter. This enables you to apply a transformation to an image object when it is drawn without permanently modifying the transformation pipeline. The image is drawn as if you had concatenated the transform with the current transform in the Graphics2D context.

Affine Transforms

The Java 2D API provides one transform class, AffineTransform. AffineTransforms are used to transform text, shapes, and images when they are rendered. You can also apply transforms to Font objects to create new font derivations, as discussed in “Creating Font Derivations”.

An affine transformation performs a linear transformation on a set of graphics primitives. It always transforms straight lines into straight lines and parallel lines into parallel lines; however, the distance between points and the angles between nonparallel lines might be altered.

Affine transformations are based on two-dimensional matrices of the following form:

A 2 by 3 matrix with the top row containing a, c and t sub x. The second row contains b, d and t sub y. where x prime equals a x plus c y plus t sub x and y prime equals b x plus d y plus t sub y

Transforms can be combined, effectively creating a series or pipeline of transformations that can be applied to an object. This combination is referred to as concatenation. When a transform is concatenated with an existing transform, such as with AffineTransform.concatenate, the last transform specified is the first to be applied. A transform can also be pre-concatenated with an existing transform. In this case, the last transform specified is the last to be applied.

Pre-concatenation is used to perform transformations relative to device space instead of user space. For example, you could use AffineTransform.preConcatenate to perform a translation relative to absolute pixel space.

2.2.6.1 Constructing an AffineTransform

AffineTransform provides a set of convenience methods for constructing AffineTransform objects:

  • getTranslateInstance
  • getRotateInstance
  • getScaleInstance
  • getShearInstance

To use these methods, you specify the characteristics of the transform you want to create and AffineTransform generates the appropriate transform matrix. You can also construct an AffineTransform by directly specifying the elements of the transformation matrix.

2.2.7 Composite Attributes

When two graphic objects overlap, it is necessary to determine what colors to render the overlapping pixels. For example, if a red rectangle and a blue rectangle overlap, the pixels that they share could be rendered red, blue, or some combination of the two. The color of the pixels in the overlapping area will determine which rectangle appears to be on top and how transparent it looks. The process of determining what color to render pixels shared by overlapping objects is called compositing.

Two interfaces form the basis of the Java 2D compositing model: Composite and CompositeContext.

To specify the compositing style that should be used, you add an AlphaComposite object to the Graphics2D context by calling setComposite. AlphaComposite, an implementation of the Composite interface, supports a number of different compositing styles. Instances of this class embody a compositing rule that describes how to blend a new color with an existing one.

One of the most commonly used compositing rules in the AlphaComposite class is SRC_OVER, which indicates that the new color (the source color) should be blended over the existing color (the destination color).

AlphaComposite Composition Rule | Description
CLEAR | Clear
DEST_IN | Destination In
DEST_OUT | Destination Out
DEST_OVER | Destination Over
SRC | Source
SRC_IN | Source In
SRC_OUT | Source Out
SRC_OVER | Source Over

2.2.7.1 Managing Transparency

A color’s alpha value is a measure of its transparency: it indicates, as a percentage, how much of a previously rendered color should show through when colors overlap. Opaque colors (alpha=1.0) don’t allow any of the underlying color to show through, while transparent colors (alpha=0.0) let all of it show through.

When text and Shapes are rendered, the alpha value is derived from the Paint attribute in the Graphics2D context. When Shapes and text are antialiased, the alpha value from the Paint in the Graphics2D context is combined with pixel coverage information from the rasterized path. Images maintain their own alpha information—see “Transparency and Images” for more information.

When you construct an AlphaComposite object, you can specify an additional alpha value. When you add this AlphaComposite object to the Graphics2D context, this extra alpha value increases the transparency of any graphic objects that are rendered—the alpha value of each graphic object is multiplied by the AlphaComposite’s alpha value.

2.2.7.2 Transparency and Images

Images can carry transparency information for each pixel in the image. This information, called an alpha channel, is used in conjunction with the Composite object in the Graphics2D context to blend the image with existing drawings.

For example, Figure 2-6 contains three images with different transparency information. In each case, the image is displayed over a blue rectangle. This example assumes that the Graphics2D context contains an AlphaComposite object that uses SRC_OVER as the compositing operation.

The following context describes this graphic.
Figure 2-6 Transparency and Images

In the first image, all of the pixels are either fully opaque (the dog’s body) or fully transparent (the background). This effect is often used on Web pages. In the second image, all of the pixels in the dog’s body are rendered using a uniform, non-opaque alpha value, allowing the blue background to show through. In the third image, the pixels around the dogs face are fully opaque (alpha=1.0), but as the distance from its face increases, the alpha values for the pixels decrease.

2.3 Setting Up the Graphics2D Context

To configure the Graphics2D context for rendering, you use the Graphics2D set methods to specify attributes such as the RenderingHints, Stroke, Paint, clipping path, Composite, and Transform.

2.3.1 Setting Rendering Hints

A RenderingHints object encapsulates all of your preferences concerning how an object is rendered. To set the rendering hints in the Graphics2D context, you create a RenderingHints object and pass it into Graphics2D.setRenderingHints.

Setting a rendering hint does not guarantee that a particular rendering algorithm will be used: not all platforms support modification of the rendering mode.

In the following example, antialiasing is enabled and the rendering preference is set to quality:

qualityHints = new               RenderingHints(RenderingHints.KEY_ANTIALIASING,               RenderingHints.VALUE_ANTIALIAS_ON);
qualityHints.put(RenderingHints.KEY_RENDERING,               RenderingHints.VALUE_RENDER_QUALITY);
g2.setRenderingHints(qualityHints);

2.3.2 Specifying Stroke Attributes

A BasicStroke defines the characteristics applied to a Shape’s outline, including its width and dashing pattern, how line segments are joined together, and the decoration (if any) applied to the end of a line. To set the stroke attributes in the Graphics2D context, you create a BasicStroke object and pass it into setStroke.

2.3.2.1 Setting the Stroke Width

To set the stroke width, you create a BasicStroke object with the desired width and call setStroke.

In the following example, the stroke width is set to twelve points and the defaults are used for the join and endcap decorations:

wideStroke = new BasicStroke(12.0f);
g2.setStroke(wideStroke);

2.3.2.2 Specifying Join and Endcap Styles

To set the join and endcap styles, you create a BasicStroke object with the desired attributes.

In the following example, the stroke width is set to twelve points and the round join and endcap styles are used instead of the defaults:

roundStroke = new BasicStroke(4.0f, BasicStroke.CAP_ROUND,              BasicStroke.JOIN_ROUND);
g2.setStroke(roundStroke);

2.3.2.3 Setting the Dashing Pattern

Complex dashing patterns can easily be defined with a BasicStroke object. When you create a BasicStroke object, you can specify two parameters that control the dashing pattern:

  • dash—an array that represents the dashing pattern. Alternating elements in the array represent the dash size and the size of the space between dashes. Element 0 represents the first dash, element 1 represents the first space.
  • dash_phase—an offset that defines where the dashing pattern starts.

In the following example, two different dashing patterns are applied to a line. In the first, the size of the dashes and the space between them is constant. The second dashing pattern is more complex, using a six-element array to define the dashing pattern.

float dash1[] = {10.0f};
BasicStroke bs = new BasicStroke(5.0f, BasicStroke.CAP_BUTT,
                 BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f);
g2.setStroke(bs);
Line2D line = new Line2D.Float(20.0f, 10.0f, 100.0f, 10.0f);
g2.draw(line);

float[] dash2 = {6.0f, 4.0f, 2.0f, 4.0f, 2.0f, 4.0f};
bs = new BasicStroke(5.0f, BasicStroke.CAP_BUTT,
     BasicStroke.JOIN_MITER, 10.0f, dash2, 0.0f);
g2.setStroke(bs);
g2.draw(line);

Both dashing patterns use a dash phase of zero, causing the dashes to be drawn starting at the beginning of the dashing pattern. The two dashing patterns are shown in Figure Figure 2-7

.

The first dash pattern is regular, the second dash pattern is irregular
Figure 2-7 Dashing Patterns

2.3.3 Specifying Fill Attributes

The Paint attribute in the Graphics2D context determines the fill color or pattern that is used when text and Shapes are rendered.

2.3.3.1 Filling a Shape with a Gradient

The GradientPaint class provides an easy way to fill a shape with a gradient of one color to another. When you create a GradientPaint, you specify a beginning position and color, and an ending position and color. The fill color changes proportionally from one color to the other along the line connecting the two positions, as shown in Figure 2-8.

This graphic shows 3 stars; the first star shows a horizontal gradient, the second star shows the star, and the gradient, at an angle, and the final star shows the points of the gradient inside of the star
Figure 2-8 Creating Gradient Fills

In the third star in Figure 2-8, both points lie within the shape. All of the points along the gradient line extending beyond P1 take the beginning color, and the points along the gradient line extending beyond P2 take the ending color.

To fill a shape with a gradient of one color to another:

  • Create a GradientPaint object.
  • Call Graphics2D.setPaint.
  • Create the Shape.
  • Call Graphics2D.fill(shape).

In the following example, a rectangle is filled with a blue-green gradient.

GradientPaint gp = new GradientPaint(50.0f, 50.0f, Color.blue
                   50.0f, 250.0f, Color.green);
g2.setPaint(gp);
g2.fillRect(50, 50, 200, 200);

2.3.3.2 Filling a Shape with a Texture

The TexturePaint class provides an easy way to fill a shape with a repeating pattern. When you create a TexturePaint, you specify a BufferedImage to use as the pattern. You also pass the constructor a rectangle to define the repetition frequency of the pattern, as shown in Figure 2-9.

This graphic shows 3 images; the first shows the pattern repeat, the second a rectangle showing the reptition frequency and the third showing a large rectangle filled with the texture
Figure 2-9 Creating Texture Paints

To fill a shape with a texture:

  • Create a TexturePaint object.
  • Call Graphics2D.setPaint.
  • Create the Shape.
  • Call Graphics2D.fill(shape).

In the following example, a rectangle is filled with a simple texture created from a buffered image.

// Create a buffered image texture patch of size 5x5
BufferedImage bi = new BufferedImage(5, 5,
                       BufferedImage.TYPE_INT_RGB);
Graphics2D big = bi.createGraphics();
// Render into the BufferedImage graphics to create the texture
big.setColor(Color.green);
big.fillRect(0,0,5,5);
big.setColor(Color.lightGray);
big.fillOval(0,0,5,5);

// Create a texture paint from the buffered image
Rectangle r = new Rectangle(0,0,5,5);
TexturePaint tp = new TexturePaint(bi,r,TexturePaint.NEAREST_NEIGHBOR);

// Add the texture paint to the graphics context.
g2.setPaint(tp);

// Create and render a rectangle filled with the texture.
g2.fillRect(0,0,200,200);
}

2.3.4 Setting the Clipping Path

To define a clipping path:

  • Create a Shape that represents the area you want to render.
  • Call Graphics2D.setClip to use the shape as the clipping path for the Graphics2D context.

To shrink the clipping path:

  • Create a Shape that intersects the current clipping path.
  • Call clip to change the clipping path to the intersection of the current clipping path and the new Shape.

In the following example, a clipping path is created from an ellipse and then modified by calling clip.

public void paint(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

// The width and height of the canvas
  int w = getSize().width;
  int h = getSize().height;
  // Create an ellipse and use it as the clipping path
  Ellipse2D e = new Ellipse2D.Float(w/4.0f,h/4.0f,
                                    w/2.0f,h/2.0f);
  g2.setClip(e);

  // Fill the canvas. Only the area within the clip is rendered
  g2.setColor(Color.cyan);
  g2.fillRect(0,0,w,h);

  // Change the clipping path, setting it to the intersection of
  // the current clip and a new rectangle.
  Rectangle r = new Rectangle(w/4+10,h/4+10,w/2-20,h/2-20);
  g2.clip(r);

  // Fill the canvas. Only the area within the new clip
  // is rendered
  g2.setColor(Color.magenta);
  g2.fillRect(0,0,w,h);
}

2.3.5 Setting the Graphics2D Transform

To transform a Shape, text string, or Image you add a new AffineTransform to the transformation pipeline in the Graphics2D context before rendering. The transformation is applied when the graphic object is rendered.

For example, to draw a rectangle that is rotated 45 degrees:

  • Get the current Graphics2D transform before performing any transformations. Always call getTransform on the Graphics2D before adding a transform to the graphics context because the graphics context might already have a transform that is needed for other reasons, such as positioning Swing and lightweight components within a window.
  • Get a rotation transform by calling AffineTransform. getRotateInstance.
  • Call Graphics2D.transform to add the new transform to the transformation pipeline. Never use the setTransform method to add a new coordinate transform because setTransform will overwrite the current transform in the graphics context.
  • Create a Rectangle2D.Float object.
  • Call Graphics2D.draw to render the rectangle.
  • After you have rendered your transformed rectangle, reset the transform of the Graphics2D back to the original transform that you saved in Step 1 by calling setTransform with the original transform.

In the following example, an instance of AffineTransform is used to rotate a rectangle 45 degrees when it is rendered.

AffineTransform aT = g2.getTransform();Rectangle2D rect = new Rectangle2D.Float(1.0,1.0,2.0,3.0);
AffineTransform rotate45 =
  AffineTransform.getRotateInstance(Math.PI/4.0,0.0,0.0)
g2.transform(rotate45);
g2.draw(rect);g2.setTransform(aT);

In this example, an AffineTransform is used to rotate a text string around a center point:

// Define the rendering transform
AffineTransform at = new AffineTransform();
// Apply a translation transform to make room for the
// rotated text.
at.setToTranslation(400.0, 400.0);
g2.transform(at);
// Create a rotation transform to rotate the text
at.setToRotation(Math.PI / 2.0);
// Render four copies of the string “Java” at 90 degree angles
for (int i = 0; i < 4; i++) {
    g2.drawString(“Java”, 0.0f, 0.0f);
    g2.transform(at);
}

You can transform an image in the same way—the transform in the Graphics2D context is applied during rendering regardless of the type of graphic object being rendered.

To apply a transform to an image without changing the transform in the Graphics2D context, you can pass an AffineTransform to drawImage:

AffineTransform rotate45 =
  AffineTransform.getRotateInstance(Math.PI/4.0,0.0,0.0)
g2.drawImage(myImage, rotate45);

Transforms can also be applied to a Font to create a modified version of the Font, for more information see “Creating Font Derivations”.

2.3.6 Specifying a Composition Style

An AlphaComposite encapsulates composition rules that determine how colors should be rendered when one object overlaps another. To specify the composition style for the Graphics2D context, you create an AlphaComposite and pass it into setComposite. The most commonly used is composition style is SRC_OVER.

2.3.6.1 Using the Source Over Compositing Rule

The SRC_OVER compositing rule composites the source pixel over the destination pixel such that the shared pixel takes the color of the source pixel. For example, if you render a blue rectangle and then render a red rectangle that partially overlaps it, the overlapping area will be red. In other words, the object that is rendered last will appear to be on top.

To use the SRC_OVER composition rule:

  • Create an AlphaComposite object by calling getInstance and specifying the SRC_OVER rule.
  • AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER);
  • Call setComposite to add the AlphaComposite object to the Graphics2D context.

    g2.setComposite(ac);

Once the composite object is set, overlapping objects will be rendered using the specified composition rule.

2.3.6.2 Increasing the Transparency of Composited Objects

AlphaComposite allows you to specify an additional constant alpha value that is multiplied with the alpha of the source pixels to increase transparency.

For example, to create an AlphaComposite object that renders the source object 50% transparent, specify an alpha of .5:

AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f);

In the following example, a source over alpha composite object is created with an alpha of .5 and added to the graphics context, causing subsequent shapes to be rendered 50% transparent.

public void paint(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  g2.setColor(Color.red);
  g2.translate(100,50);
  // radians=degree * pie / 180
  g2.rotate((45*java.lang.Math.PI)/180);
  g2.fillRect(0,0,100,100);
  g2.setTransform(new AffineTransform());  // set to identity
  // Create a new alpha composite
  AlphaComposite ac =
      AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.5f);
  g2.setComposite(ac);
  g2.setColor(Color.green);
  g2.fillRect(50,0,100,100);
  g2.setColor(Color.blue);
  g2.fillRect(125,75,100,100);
  g2.setColor(Color.yellow);
  g2.fillRect(50,125,100,100);
  g2.setColor(Color.pink);
  g2.fillRect(-25,75,100,100);
}

2.4 Rendering Graphics Primitives

Graphics2D provides rendering methods for Shapes, Text, and Images:

  • draw—strokes a Shape’s path using the Stroke and Paint objects in the Graphics2D context.
  • fill—fills a Shape using the Paint in the Graphics2D context.
  • drawString—renders the specified text string using the Paint in the Graphics2D context.
  • drawImage—renders the specified image.

To stroke and fill a shape, you must call both the draw and fill methods.

Graphics2D also supports the draw and fill methods from previous versions of the JDK software, such as drawOval and fillRect.

2.4.1 Drawing a Shape

The outline of any Shape can be rendered with the Graphics2D.draw method. The draw methods from previous versions of the JDK software are also supported: drawLine, drawRect, drawRoundRect, drawOval, drawArc, drawPolyline, drawPolygon, draw3DRect.

When a Shape is drawn, its path is stroked with the Stroke object in the Graphics2D context. (See “Stroke Attributes” for more information). By setting an appropriate BasicStroke object in the Graphics2D context, you can draw lines of any width or pattern. The BasicStroke object also defines the line’s endcap and join attributes.

To render shape’s outline:

  • Create a BasicStroke object
  • Call Graphics2D.setStroke
  • Create the Shape.
  • Call Graphics2D.draw(shape).

In the following example, a GeneralPath object is used to define a star and a BasicStroke object is added to the Graphics2D context to define the star’s line with and join attributes.

public void paint(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  // create and set the stroke
  g2.setStroke(new BasicStroke(4.0f));

  // Create a star using a general path object
  GeneralPath p = new GeneralPath(GeneralPath.NON_ZERO);
  p.moveTo(- 100.0f, - 25.0f);
  p.lineTo(+ 100.0f, - 25.0f);
  p.lineTo(- 50.0f, + 100.0f);
  p.lineTo(+ 0.0f, - 100.0f);
  p.lineTo(+ 50.0f, + 100.0f);
  p.closePath();

  // translate origin towards center of canvas
  g2.translate(100.0f, 100.0f);

  // render the star's path
  g2.draw(p);
}

2.4.2 Filling a Shape

The Graphics2D.fill method can be used to fill any Shape. When a Shape is filled, the area within its path is rendered with the Graphics2D context’s current Paint attribute—a Color, TexturePaint, or GradientPaint.

The fill methods from previous versions of the JDK software are also supported: fillRect, fill3DRect, fillRoundRect, fillOval, fillArc, fillPolygon, clearRect.

To fill a Shape:

  • Set the fill color or pattern on the graphics context using
    Graphics2D.setColor or Graphics2D.setPaint.
  • Create the Shape.
  • Call Graphics2D.fill to render the Shape.

In the following example, setColor is called to define a green fill for a Rectangle2D.

public void paint(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  g2.setPaint(Color.green);
  Rectangle2D r2 = new Rectangle2D.Float(25,25,150,150);

   g2.fill(r2);
}

2.4.3 Rendering Text

To render a text string, you call Graphics2D.drawString, passing in the string that you want to render. For more information about rendering text and selecting fonts, see “Fonts and Text Layout”.

2.4.4 Rendering Images

To render an Image, you create the Image and call Graphics2D.drawImage. For more information about processing and rendering images, see “Imaging”.

2.5 Defining Custom Composition Rules

You can create an entirely new type of compositing operation by implementing the Composite and CompositeContext interfaces. A Composite object provides a CompositeContext object that actually holds the state and performs the compositing work. Multiple CompositeContext objects can be created from one Composite object to maintain the separate states in a multithreaded environment.

2.6 Rendering in a Multi-Screen Environment

The Java 2D API supports three different multi-screen configurations that can possibly be configured by a native platform:

  • Two or more independent screens
  • Two or more screens where one screen is the primary screen and the other screens display copies of what appears on the primary screen.
  • Two or more screens that form a virtual desktop, which is also called a virtual device.

The Java 2D API enables you to create Frame, JFrame, Window, or JWindow objects with a GraphicsConfiguration to target a screen device for rendering.

In all three configurations, each screen device is represented by a GraphicsDevice. A GraphicsDevice can have multiple GraphicsConfiguration objects associated with it.

When two or more screens are used to form a virtual device, a virtual coordinate system that exists outside of the physical screens is used to represent the virtual device. The bounds of each GraphicsConfiguration in this multi-screen configuration are relative to the virtual coordinate system. One screen in this environment is identified as the primary screen, which is located at (0, 0) in the virtual coordinate system. Depending on the location of the primary screen, the virtual device might have negative coordinates, as shown in Figure 2-10:

Example of a virtual device environment with labels for virtual device, physical screens, Frames or Windows, and primary physical screen
Figure 2-10 Example of a virtual device environment

To determine if your environment is a virtual device environment in which a Window or a Frame can span two or more physical screens, call getBounds on each GraphicsConfiguration in your system and check to see if the origin is something other than (0, 0). The getBounds method of a GraphicsConfiguration returns a Rectangle in the virtual coordinate system. So, if any of the origins are not (0, 0), your environment is a virtual device environment.

In a virtual device environment, the coordinates of the GraphicsConfiguration objects are relative to the virtual coordinate system. So, you must use virtual coordinates when calling the setLocation method of a Frame or Window. For example, this code sample gets the bounds of a GraphicsConfiguration and uses the bounds to set the location of a Frame at (10, 10) relative to the origin of the physical screen of the corresponding GraphicsConfiguration.

Frame f = new Frame(GraphicsConfiguration gc);
Rectangle bounds = gc.getBounds();
f.setLocation(10 + bounds.x, 10 + bounds.y);

If the bounds of the GraphicsConfiguration are not taken into account, the Frame is displayed at (10, 10) on the primary physical screen, which might be different from the physical screen of the specified GraphicsConfiguration.

The getBounds method can also be used to determine the bounds of the virtual device. Call getBounds on each GraphicsConfiguration in your system. To determine the bounds of the virtual device, calculate the union of all the bounds. This technique is used in the following sample.

Rectangle virtualBounds = new Rectangle();
GraphicsEnvironment ge =
   GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for (int j = 0; j < gs.length; j++) {
   GraphicsDevice gd = gs[j];
   GraphicsConfiguration[] gc = gd.getConfigurations();
   for (int i = 0; i < gc.length; i++) {
      virtualBounds = virtualBounds.union(gc[i].getBounds());
   }
}

The following applet creates a JFrame with every GraphicsConfiguration of every GraphicsDevice in the GraphicsEnvironment. Each JFrame displays a set of red, green and blue stripes, the screen number, the GraphicsConfiguration number and the bounds of the GraphicsConfiguration.

import java.applet.Applet;
import java.awt.*;
import javax.swing.*;

public class MultiFrameApplet extends Applet {

    public MultiFrameApplet() {
        main(null);
    }

    public static void main(String[] argv) {
        GraphicsEnvironment ge =
           GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j < gs.length; j++) {
          GraphicsDevice gd = gs[j];
          GraphicsConfiguration[] gc =
             gd.getConfigurations();
             for (int i=0; i < gc.length; i++) {
               JFrame f =
                  new JFrame(gs[j].getDefaultConfiguration());
               GCCanvas c = new GCCanvas(gc[i]);
               Rectangle gcBounds = gc[i].getBounds();
               int xoffs = gcBounds.x;
               int yoffs = gcBounds.y;
               f.getContentPane().add(c);
               f.setTitle("Screen# "+Integer.toString(j)+",
                  GC# "+Integer.toString(i));
               f.setSize(300, 150);
               f.setLocation((i*50)+xoffs, (i*60)+yoffs);
               f.show();
             }
        }
    }
}

class GCCanvas extends Canvas {

    GraphicsConfiguration gc;
    Rectangle bounds;

    public GCCanvas(GraphicsConfiguration gc) {
        super(gc);
        this.gc = gc;
        bounds = gc.getBounds();
    }

    public Dimension getPreferredSize() {
        return new Dimension(300, 150);
    }

    public void paint(Graphics g) {
        g.setColor(Color.red);
        g.fillRect(0, 0, 100, 150);
        g.setColor(Color.green);
        g.fillRect(100, 0, 100, 150);
        g.setColor(Color.blue);
        g.fillRect(200, 0, 100, 150);
        g.setColor(Color.black);
        g.drawString("ScreenSize="+
           Integer.toString(bounds.width)+
           "X"+ Integer.toString(bounds.height), 10, 15);
        g.drawString(gc.toString(), 10, 30);
    }
}

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


This guide describes the features provided by the Java 2D™ API and illustrates how you can use the Java 2D API classes to enhance your applications. For additional information about the Java 2D APIs, see:

Documentation Contents
Contents | Previous | Next

This guide describes the features provided by the Java 2D™ API and illustrates how you can use the Java 2D API classes to enhance your applications. For additional information about the Java 2D APIs, see the 2D Graphics trail in the Java Tutorials.

This information in this guide is organized into seven chapters:

Overview —introduces the packages and key classes in the Java 2D API.

Rendering with Graphics2D—describes the Java 2D API classes in the java.awt package and how to set up the Graphics2D rendering context.

Geometries—describes the Java 2D API classes in the java.awt.geom package and how to define and manipulate 2D shapes and areas.

Fonts and Text Layout—describes the Java 2D API classes in the java.awt.font package, how to specify and retrieve font information, and how to display and manipulate international text using the Java 2D text layout APIs directly.

Imaging—describes the Java 2D API classes in the java.awt.image, java.awt.image.codec, and java.awt.image.renderable packages and how to display and manipulate images and offscreen buffers.

Color—describes the Java 2D API classes in the java.awt.color package and color management.

Printing—describes the Java 2D API classes in the java.awt.print package and the Java 2D API printing model.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessibility Enhancements in Java SE 1.4

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide > Accessibility Enhancements in Java SE 1.4

The features described here were introduced in the Java SE 1.4. These features are also part of subsequent releases of the Java SE.

Contents

  • AccessibleExtendedComponent.getAccessibleKeyBinding
  • AccessibleRole New Constants
  • Accessibility Support for HTML Object Tags
  • Support for Tracking HTMLEditorKit Keyboard Link Traversal
  • Assistive Technologies Property
  • Screen Reader Property
  • API Enhancements
  • AccessibleEditableText
  • AccessibleExtendedComponent
  • AccessibleExtendedTable
  • AccessibleKeyBinding
  • Mnemonic Tab Navigation
  • List Navigation by First Letter
  • Accessibility Support for HTML Components
  • Screen Magnifier Property

AccessibleExtendedComponent.getAccessibleKeyBinding

Interface AccessibleExtendedComponent has a new method, getAccessibleKeyBinding, to return key bindings associated with an object.

AccessibleRole New Constants

Class AccessibleRole contains the following new constants:

  • DATE_EDITOR
  • FONT_CHOOSER
  • GROUP_BOX
  • SPIN_BOX
  • STATUS_BAR

Accessibility Support for HTML Object Tags

This release adds accessibility support for HTML object tags. CTRL-t and SHIFT-CTRL-t navigate to the next and previous component, respectively, associated with an object tag in an HTML document. CTRL-SPACE activates the default action associated with the component.

Support for Tracking HTMLEditorKit Keyboard Link Traversal

Assistive technologies needed a way to track HTMLEditorKit keyboard link traversal. The constant AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET was added to support this feature.

Assistive Technologies Property

The javax.accessibility.assistive_technologies property specifies the assistive technologies to load into the JVM.

Screen Reader Property

The javax.accessibility.screen_reader_present property, when set to true, lets the Java platform libraries know that a screen reader is present on the system. Application developers can check this property. If an application is self-voicing and a screen reader is present, developers can turn off the self-voicing.

API Enhancements

The following new classes and interfaces have been added to the Java Accessibility API:

  • javax.accessibility.AccessibleEditableText
  • javax.accessibility.AccessibleExtendedComponent
  • javax.accessibility.AccessibleExtendedTable
  • javax.accessibility.AccessibleKeyBinding
In addition, javax.accessibility.AccessibleContext was updated to reflect the new classes and interfaces.

AccessibleEditableText

Interface AccessibleEditableText provides support for text editing by assistive technologies.

AccessibleExtendedComponent

Interface AccessibleExtendedComponent provides the standard mechanism for an assistive technology to determine the extended graphical representation of an object.

AccessibleExtendedTable

Interface AccessibleExtendedTable provides extended information about a user-interface component that presents data in a two-dimensional table format.

AccessibleKeyBinding

Interface AccessibleKeyBinding provides the standard mechanism for an assistive technology to determine the key bindings which exist for an object.

Mnemonic Tab Navigation

This new feature provides support for easier tab navigation using mnemonics on a JTabbedPane.

List Navigation by First Letter

This new feature provides support for list navigation using the first letter of list items.

Accessibility Support for HTML Components

This release provides accessibility support for HTML components in Swing.

Screen Magnifier Property

The javax.accessibility.screen_magnifier_present property, when set to true, lets the Java platform libraries know that a screen magnifier is present on the system. Application developers can check this property, and if a screen magnifier is present, developers should make sure their applications are compatible with screen magnification.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessibility Enhancements in Java SE 7

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide > Accessibility Enhancements in Java SE 7

Java Access Bridge is included with Java SE Runtime Environment (JRE) Release 7 Update 6 (7u6) and later. Java Access Bridge 2.0.3 is included with JRE 7u6. By default, Java Access Bridge is not enabled. See Enabling and Testing Java Access Bridge for more information. See also RFE 7128768.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessibility Enhancements in the Java SE 5.0

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide > Accessibility Enhancements in the Java SE 5.0

The features described here were introduced in Java SE 5. These features are also part of subsequent releases of the Java platform. Many of these additions were made to maintain compatibility between the Java Accessibility API and the GNOME Accessibility Framework, described at http://projects.gnome.org/accessibility/

Contents

  • AccessibleAction New Constant
  • AccessibleContext New Constants
  • AccessibleRelation New Constants
  • AccessibleRole New Constants
  • AccessibleState New Constants
  • AccessibleText New Constants
  • API Enhancements
  • AccessibleExtendedText
  • AccessibleStreamable
  • Accessibility Support for JSpinner and ProgressMonitor

AccessibleAction New Constant

Class AccessibleAction contains the following new constant:

  • TOGGLE_EXPAND

AccessibleContext New Constants

Class AccessibleContext contains the following new constants:

  • ACCESSIBLE_COMPONENT_BOUNDS_CHANGE
  • ACCESSIBLE_INVALIDATE_CHILDREN
  • ACCESSIBLE_TEXT_ATTRIBUTE_CHANGED

AccessibleRelation New Constants

Class AccessibleRelation contains the following new constants:

  • CHILD_NODE_OF
  • CHILD_NODE_OF_PROPERTY
  • EMBEDS
  • EMBEDS_PROPERTY
  • EMBEDDED_BY
  • EMBEDDED_BY_PROPERTY
  • FLOWS_FROM
  • FLOWS_FROM_PROPERTY
  • FLOWS_TO
  • FLOWS_TO_PROPERTY
  • PARENT_WINDOW_OF
  • PARENT_WINDOW_OF_PROPERTY
  • SUBWINDOW_OF
  • SUBWINDOW_OF_PROPERTY

AccessibleRole New Constants

Class AccessibleRole contains the following new constants:

  • EDITBAR
  • FOOTER
  • HEADER
  • PARAGRAPH
  • PROGRESS_MONITOR
  • RULER

AccessibleState New Constants

Class AccessibleState contains the following new constants:

  • INDETERMINATE
  • MANAGES_DESCENDANTS
  • TRANSIENT
  • TRUNCATED

AccessibleText New Constants

Class AccessibleText contains the following new constants:

  • LINE
  • ACCESSIBLE_CHANGED_TEXT
  • ATTRIBUTE_RUN

API Enhancements

The following new classes and interfaces have been added to the Java Accessibility API:

  • javax.accessibility.AccessibleExtendedText
  • javax.accessibility.AccessibleStreamable

AccessibleExtendedText

Interface AccessibleExtendedText provides support for braille and screen reader review mode.

AccessibleStreamable

Interface AccessibleStreamable provides a stream interface to raw data based on mime type.

Accessibility Support for JSpinner and ProgressMonitor

This release provides accessibility support for spinners and progress monitors in Swing.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessibility Properties

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide > Accessibility Properties

Available Properties

The javax.accessibility package provides the following properties:

  • assistive_technologies
  • screen_magnifier_present
  • screen_reader_present

Loading Assistive Technologies

The assistive_technologies property specifies the assistive technologies to load into the JVM. It takes a comma-delimited list as input. For example, if you set this property to com.sun.java.accessibility.AccessBridge, then Java Access Bridge is enabled.

Indicating the Presence of a Screen Magnifier

When the screen_magnifier_present property is set to true, it lets the Java platform libraries know that a screen magnifier is present on the system. Application developers can check this property, and if a screen magnifier is present, developers should make sure their applications are compatible with screen magnification. For example, on Microsoft Windows operating systems, the reference implementation of the Java 2D API checks this property and if true, turns off Microsoft DirectDraw to avoid problems with the screen magnifier. (Some screen magnifiers may not be able to magnify DirectDraw graphics.)

Indicating the Presence of a Screen Reader

When the screen_reader_present property is set to true, it lets the Java platform libraries know that a screen reader is present on the system. Application developers can check this property. If an application is self-voicing and a screen reader is present, developers can turn off the self-voicing.

Setting Properties

You can set a property at run time or in a properties file. To set a property at run time, enter a command such as the following:

java -Djavax.accessibility.screen_magnifier_present=true foo.class

The reference implementation includes an accessibility.properties file in the jre/lib directory. To set a property in the accessibility.properties file, add a line or lines such as the following:

assistive_technologies=com.sun.java.accessibility.AccessBridge
screen_magnifier_present=true
screen_reader_present=true
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enabling and Testing Java Access Bridge

Java Accessibility Guide > Enabling and Testing Java Access Bridge

Java Access Bridge is a technology that enables Java applications and applets that implement the Java Accessibility API to be visible to assistive technologies on Microsoft Windows systems. See Java SE Desktop Accessibility for more information.

The following topics are covered:

  • Enabling and Disabling Java Access Bridge
    • Enabling Java Access Bridge
    • Disabling Java Access Bridge
  • Testing Java Access Bridge
  • Obtaining Java Access Bridge Testing Tools
  • Troubleshooting

Enabling and Disabling Java Access Bridge

Java Access Bridge is included with Java SE Runtime Environment (JRE) Release 7 Update 6 (7u6) and later. Java Access Bridge 2.0.3 is included with JRE 7u6. By default, Java Access Bridge is not enabled.

Enabling Java Access Bridge

To enable Java Access Bridge, run the following command (where %JRE_HOME% is the directory of your JRE):

%JRE_HOME%\bin\jabswitch -enable

Alternatively, in Windows Vista and later, you can enable Java Access Bridge through the Control Panel:

  1. Go to Start > Control Panel > Ease of Access > Ease of Access Center. Alternatively, press Windows logo key+u to access the Ease of Access Center.
  2. Select Use the computer without a display.
  3. In the section Other programs installed, select the check box Enable Java Access Bridge (you may have to scroll down).

Note: After enabling Java Access Bridge, you must restart your assistive technology software and Java applications that use the accessibility API.

Disabling Java Access Bridge

To disable Java Access Bridge, run the following command:

%JRE_HOME%\bin\jabswitch -disable

Note: You cannot disable Java Access Bridge through the Windows Ease of Access Center.

Testing Java Access Bridge

To test Java Access Bridge, follow these steps:

  1. Ensure that Java Access Bridge is enabled.
  2. Install an assistive technology product that supports Java Access Bridge such as one of the following products:
    • JAWS
    • NonVisual Desktop Access (NVDA)
    • SuperNova
    • Window-Eyes
  3. Run a Java application that uses the accessibility API such as the SwingSet2 demonstration program. Ensure that your assistive technology product works properly with the Java application.

Obtaining Java Access Bridge Testing Tools

The Java Access Bridge testing tools Java Monkey and Java Ferret are not shipped with the JDK. These tools are included in Java Access Bridge 2.0.2. Download this version from Java Access Bridge Downloads.

Troubleshooting

Using Assistive Technologies on 64-Bit Operating Systems

The following lists the minimum version requirements of some assistive technologies for 64-bit operating systems:

  • JAWS: Version 13 and later
  • NVDA: Version 2011.3 and later
  • SuperNova: Version 13 and later
  • Window-Eyes: Version 8.2 and later

Note: It is recommend that you install both the 32-bit and 64-bit versions of the JRE. The 32-bit version only adds support for 32-bit assistive technology, and the 64-bit version only adds support for 64-bit assistive technology.

Using Java Access Bridge with Only the Private JRE

The JDK contains a private JRE. This is required to run tools included with the JDK. If you do not install the public JRE either as an option when installing the JDK or by installing the JRE by itself, and you intend to use the private JRE of the JDK, you will need to manually copy files as specified in the following table:

Dynamic-Link Library (DLL) Files to Copy from Private JRE to Windows Directory
JDK | Windows Operating System | File to Copy | Destination Directory
32-bit | 32-bit | <path to the JDK install directory>\jre\bin\WindowsAccessBridge.dll | C:\Windows\System32
32-bit | 64-bit | <path to the JDK install directory>\jre\bin\WindowsAccessBridge-32.dll | C:\Windows\SysWOW64
64-bit | 64-bit | <path to the JDK install directory>\jre\bin\WindowsAccessBridge-64.dll | C:\Windows\System32
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Accessibility API (JAAPI) Programmer's Guide

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide

With the Java Accessibility API, developers can easily create Java applications that are accessible to persons with disabilities. Accessible Java applications are compatible with assistive technologies such as screen readers, speech recognition systems, and refreshable braille displays.

Overview

  • Accessibility Overview

API Specification

  • javax.accessibility package
  • Accessibility Properties

Tutorials and Programmer's Guides

  • How to Support Assistive Technologies from The Swing Tutorial

Enhancements

  • Accessibility Enhancements in Java SE 7
  • Accessibility Enhancements in the Java 2 Platform Standard Edition 5.0
  • Accessibility Enhancements in the Java 2 Platform, v1.4

More Information

  • Java SE Desktop Accessibility
  • Java SE Desktop Accessibility Documentation
  • Java Accessibility Utilities
  • Enabling and Testing Java Access Bridge
  • Java Access Bridge Programmer's Guide for Assistive Technology Developers
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Accessibility Guide

This guide contains the following sections:

  • Enabling Accessibility: If you have a Java application that was designed for use with a Microsoft Windows assistive technology, see this section to enable Java Access Bridge.
  • Programmer's Guides: If you want to develop accessible Java applications or assistive technology products that work in conjunction with Java applications, see this section.

Enabling Accessibility

Java Access Bridge is a technology that enables certain Java applications and applets to be visible to assistive technologies on Microsoft Windows systems. The following topics show you how to enable and test Java Access Bridge.

  • Enabling and Testing Java Access Bridge
    • Enabling and Disabling Java Access Bridge
      • Enabling Java Access Bridge
      • Disabling Java Access Bridge
    • Testing Java Access Bridge
    • Obtaining Java Access Bridge Testing Tools
    • Troubleshooting

Programmer's Guides

  • Java Accessibility API (JAAPI) Programmer's Guide
  • Java Access Bridge Programmer's Guide for Assistive Technology Developers
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Accessibility Overview

Java Accessibility Guide > Java Accessibility API (JAAPI) Programmer's Guide > Java Accessibility Overview

Java Accessibility API

The Java Accessibility API (JAAPI) is one of the core parts of the Java Foundation Classes (JFC). The JFC are a comprehensive set of graphical user interface components and foundation services designed to simplify deployment of Internet, intranet and desktop applications. The JAAPI makes GUI component information available to assistive technologies, giving users alternative presentation and control of Java applications.

Java Accessibility Utilities

The Java Accessibility Utilities help assistive technologies take advantage of the Java Accessibility API. The Utilities monitor events related to UI components. They also help assistive technologies get additional information about a GUI, such as the current position of the mouse, or the window that currently has focus.

Pluggable Look and Feel

The Java Foundation Classes implement a Pluggable Look and Feel architecture. This architecture allows non-visual manifestations of a user interface to replace or enhance the visual presentation of an application. The expression of the user interface is separated from the underlying structure and data of each individual component. This is accomplished by separating the user interface of the component from its model. The model of a component is the structure which encapsulates the state and information that is presented to the user by the user interface. More information on this architecture can be found in About the JFC and Swing in the Creating a GUI with JFC/Swing trail in the Java Tutorials.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction to Java Access Bridge

Java Accessibility Guide > Java Access Bridge Programmer's Guide for Assistive Technology Developers > Introduction to Java Access Bridge

The following topics are covered:

  • Overview of Java Access Bridge
  • Architecture of Java Access Bridge
  • Related Information

Overview of Java Access Bridge

Java Access Bridge is a technology that exposes the Java Accessibility API in a Microsoft Windows DLL, enabling Java applications and applets that implement the Java Accessibility API to be visible to assistive technologies on Microsoft Windows systems. Java Accessibility API is part of Java Accessibility Utilities, which is a set of utility classes that help assistive technologies provide access to GUI toolkits that implement the Java Accessibility API.

In order for existing assistive technologies available on Microsoft Windows systems to provide access to Java applications, they need some way to communicate with Java Accessibility Utilities. Java Access Bridge supports this communication.

An assistive technology application running on Microsoft Windows (for example a screen reader) communicates with Java Access Bridge DLLs, which in turn communicates with the Java Virtual Machine through Java Access Bridge Java libraries. These Java libraries communicate with Java Accessibility Utilities. Java Accessibility Utilities collects information about what is happening in the Java application, which it forwards to the screen reader through Java Access Bridge.

Architecture of Java Access Bridge

The following figure shows how Java Access Bridge and Java Accessibility Utilities components interact with each other:

Description of Java Access Bridge Architecture Diagram follows

Description of Java Access Bridge Architecture Diagram

Java Access Bridge provides a subset of the Java Accessibility API as a Windows DLL, WindowsAccessBridge.dll. Assistive technologies on Microsoft Windows load and link to this DLL. Java Access Bridge also provides a pair of DLLs, JavaAccessBridge.dll and JAWTAccessBridge.dll, that are loaded by the Java runtime. This pair of DLLs communicate with the application through the Java Accessibility API and through it, the user interface toolkit and components. The pair of DLLs also communicate with the application through Java Accessibility Utilities, a collection of classes that coalesce events and provide application life-cycle functionality to assistive technologies (and to Java Access Bridge, which acts as an assistive technology). The Java component to Java Access Bridge, a set of classes packaged into a JAR file, access-bridge.jar, manages communication between the DLLs loaded into the Java runtime and the other Java code in the Java runtime. This JAR file is loaded into the Java SE runtime through the accessibility.properties file and in turn loads the Java-side DLLs through Java Native Interfaces (JNI).

The communication that Java Access Bridge enables between assistive technologies and Java applications through Java Accessibility Utilities is called inter-process communication. Java Access Bridge 2.0.2 and later provides 64-bit inter-process communication. This enables 64-bit and 32-bit assistive technologies to communicate with Java applications on a 64-bit Windows system. For more information about 64-bit support, see API Changes from 2.0.1 in Java Access Bridge API. Java Access Bridge 2.0.2 and later also provides 32-bit inter-process communication. This enables 32-bit assistive technologies to communicate with Java applications on a 32-bit Windows system.

Related Information

For more information, visit the following:

  • Java SE Desktop Accessibility
  • Java Accessibility API Specification
  • Java Accessibility Utilities
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Access Bridge API

Java Accessibility Guide > Java Access Bridge Programmer's Guide for Assistive Technology Developers > Java Access Bridge API

The Java Access Bridge API enables you to develop assistive technology applications for the Microsoft Windows operating system that work with Java applications. It contains native methods that enable you to view and manipulate information about GUI elements in a Java application, which is forwarded to your assistive technology application through Java Access Bridge.

The following topics are covered:

  • API Files
  • API Changes from 2.0.1
  • API Calls
  • API Data Structures
  • API Callbacks

API Files

The Java Access Bridge API can be found in three files: AccessBridgeCalls.h, AccessBridgePackages.h, and AccessBridgeCallbacks.h. These files correspond to the Java Access Bridge API calls, the API data structures, and the API callbacks, respectively.

API Changes from 2.0.1

Java Access Bridge 2.0.2 includes a new set of APIs in order to support 64-bit systems. However, the changes to the API are specific to parameters passed in API calls; there are no name changes in the API.

Assistive Technologies must recompile their applications with the new header files provided in the source.

Objects of type jobject are now passed as jlong. The typedef JOBJECT64 is either a jobject or jlong depending on whether ACCESSBRIDGE_ARCH_LEGACY is defined. See the AccessBridgePackages.h header file.

For usage examples, see the JavaFerret.cpp example:

void HandlePropertyChildChange(
  long vmID, PropertyChangeEvent event,
  AccessibleContext ac, JOBJECT64 oldChild, JOBJECT64 newChild);

void HandlePropertyActiveDescendentChange(
  long vmID, PropertyChangeEvent event, AccessibleContext ac,
  JOBJECT64 oldActiveDescendent, JOBJECT64 newActiveDescendent);

API Calls

The Java Access Bridge API calls are contained in AccessBridgeCalls.h and to use them, you must also compile the file AccessBridgeCalls.c, which acts as the interface between your application and WindowsAccessBridge.dll.

Initialization/Shutdown Functions

These two functions start and shut down Java Access Bridge.

  • BOOL initializeAccessBridge();

    Starts Java Access Bridge. You cannot use any part of the Java Access Bridge API until you call this function.

  • BOOL shutdownAccessBridge();

    Shuts down Java Access Bridge. It is important to call this function when your application is finished using Java Access Bridge (before your application exists) so that Java Access Bridge can properly perform memory cleanup.

    Note: Calling the function shutdownAccessBridge is not a substitute for releasing any data structures that are maintained by the JVM; do this by calling the function ReleaseJavaObject.

Gateway Functions

You typically call these functions before calling any other Java Access Bridge API function:

  • BOOL IsJavaWindow(HWND window);

    Checks to see if the given window implements the Java Accessibility API.

  • BOOL GetAccessibleContextFromHWND(HWND target, long *vmID, AccessibleContext *ac);

    Gets the AccessibleContext and vmID values for the given window. Many Java Access Bridge functions require the AccessibleContext and vmID values.

Event Handling Functions

These take a function pointer to the function that will handle the event type. When you no longer are interested in receiving those types of events, call the function again, passing in the NULL value. Find prototypes for the function pointers you need pass into these functions in the file AccessBridgeCallbacks.h. See the section "API Callbacks" for more information about these prototypes.

  • void SetFocusGained(AccessBridge_FocusGainedFP fp);

  • void SetFocusLost(AccessBridge_FocusLostFP fp);

General Functions

In order to determine the functionality available, you can get version information from the GetVersionInfo call.

  • void ReleaseJavaObject(long vmID, Java_Object object);

    Release the memory used by the Java object object, where object is an object returned to you by Java Access Bridge. Java Access Bridge automatically maintains a reference to all Java objects that it returns to you in the JVM so they are not garbage collected. To prevent memory leaks, you must call ReleaseJavaObject on all Java objects returned to you by Java Access Bridge once you are finished with them. See JavaFerret.c for an illustration of how to do this.

  • BOOL GetVersionInfo(long vmID, AccessBridgeVersionInfo *info);

    Gets the version information of the instance of Java Access Bridge instance your application is using. You can use this information to determine the available functionality of your version of Java Access Bridge.

    Note: In order to determine the version of the JVM, you need to pass in a valid vmID; otherwise all that is returned is the version of the WindowsAccessBridge.DLL file to which your application is connected.

Accessible Context Functions

These functions provide the core of the Java Accessibility API that is exposed by Java Access Bridge.

The functions GetAccessibleContextAt and GetAccessibleContextWithFocus retrieve an AccessibleContext object, which is a magic cookie (really a Java Object reference) to an Accessible object and a JVM cookie. You use these two cookies to reference objects through Java Access Bridge. Most Java Access Bridge API functions require that you pass in these two parameters.

Note: AccessibleContext objects are 64-bit references under 64-bit inter-process communication (which uses the DLL and JAR files with -32 and -64 in their file names), while AccessibleContext objects are 32-bit references under 32-bit inter-process communication (which uses the DLL and JAR files without -32 and -64 in their file names). Consequently, you need to recompile your Assistive Technology applications if you are using 64-bit inter-process communication.

The function GetAccessibleContextInfo returns detailed information about an AccessibleContext object belonging to the JVM. In order to improve performance, the various distinct methods in the Java Accessibility API are collected together into a few routines in the Java Access Bridge API and returned in struct values. These struct values are defined in the file AccessBridgePackages.h and are described in the section "API Callbacks".

The functions GetAccessibleChildFromContext and GetAccessibleParentFromContext enable you to walk the GUI component hierarchy, retrieving the nth child, or the parent, of a particular GUI object.

  • BOOL GetAccessibleContextAt(long vmID, AccessibleContext acParent, jint x, jint y, AccessibleContext *ac)

    Retrieves an AccessibleContext object of the window or object that is under the mouse pointer.

  • BOOL GetAccessibleContextWithFocus(HWND window, long *vmID, AccessibleContext *ac);

    Retrieves an AccessibleContext object of the window or object that has the focus.

  • BOOL GetAccessibleContextInfo(long vmID, AccessibleContext ac, AccessibleContextInfo *info);

    Retrieves an AccessibleContextInfo object of the AccessibleContext object ac.

  • AccessibleContext GetAccessibleChildFromContext(long vmID, AccessibleContext ac, jint index);

    Returns an AccessibleContext object that represents the nth child of the object ac, where n is specified by the value index.

  • AccessibleContext GetAccessibleParentFromContext(long vmID, AccessibleContext ac);

    Returns an AccessibleContext object that represents the parent of object ac.

Accessible Text Functions

These functions get AccessibleText information provided by the Java Accessibility API, broken down into seven chunks for efficiency. An AccessibleContext has AccessibleText information contained within it if the flag accessibleText in the AccessibleContextInfo data structure is set to TRUE. The struct values used in these functions are defined in the file AccessBridgePackages.h and are described in the section "API Callbacks".

  • BOOL GetAccessibleTextInfo(long vmID, AccessibleText at, AccessibleTextInfo *textInfo, jint x, jint y);

  • BOOL GetAccessibleTextItems(long vmID, AccessibleText at, AccessibleTextItemsInfo *textItems, jint index);

  • BOOL GetAccessibleTextSelectionInfo(long vmID, AccessibleText at, AccessibleTextSelectionInfo *textSelection);

  • char *GetAccessibleTextAttributes(long vmID, AccessibleText at, jint index, AccessibleTextAttributesInfo *attributes);

  • BOOL GetAccessibleTextRect(long vmID, AccessibleText at, AccessibleTextRectInfo *rectInfo, jint index);

  • BOOL GetAccessibleTextRange(long vmID, AccessibleText at, jint start, jint end, wchar_t *text, short len);

  • BOOL GetAccessibleTextLineBounds(long vmID, AccessibleText at, jint index, jint *startIndex, jint *endIndex);

Accessible Value Functions

These functions get AccessibleValue information provided by the Java Accessibility API. An AccessibleContext object has AccessibleValue information contained within it if the flag accessibleValue in the AccessibleContextInfo data structure is set to TRUE. The values returned are strings (char *value) because there is no way to tell in advance if the value is an integer, a floating point value, or some other object that subclasses the Java language construct java.lang.Number.

  • BOOL GetCurrentAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len);

  • BOOL GetMaximumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_ *value, short len);

  • BOOL GetMinimumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_ *value, short len);

Accessible Selection Functions

These functions get and manipulate AccessibleSelection information provided by the Java Accessibility API. An AccessibleContext has AccessibleSelection information contained within it if the flag accessibleSelection in the AccessibleContextInfo data structure is set to TRUE. The AccessibleSelection support is the first place where the user interface can be manipulated, as opposed to being queries, through adding and removing items from a selection. Some of the functions use an index that is in child coordinates, while other use selection coordinates. For example, add to remove from a selection by passing child indicies (for example, add the fourth child to the selection). On the other hand, enumerating the selected children is done in selection coordinates (for example, get the AccessibleContext of the first object selected).

  • void AddAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);

  • void ClearAccessibleSelectionFromContext(long vmID, AccessibleSelection as);

  • jobject GetAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);

  • int GetAccessibleSelectionCountFromContext(long vmID, AccessibleSelection as);

  • BOOL IsAccessibleChildSelectedFromContext(long vmID, AccessibleSelection as, int i);

  • void RemoveAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);

  • void SelectAllAccessibleSelectionFromContext(long vmID, AccessibleSelection as);

API Data Structures

The Java Access Bridge API data structures are contained in the file AccessBridgePackages.h. There are data structures in this file that you do not need (and can ignore); they are used as part of the inter-process communication mechanism of the two Java Access Bridge DLLs. The data structures of importance are as follows:

#define MAX_STRING_SIZE     1024
#define SHORT_STRING_SIZE    256

struct AccessBridgeVersionInfo {
 wchar_t VMversion[SHORT_STRING_SIZE];              // version of the Java VM
 wchar_t bridgeJavaClassVersion[SHORT_STRING_SIZE]; // version of the
                                                    //   AccessBridge.class
 wchar_t bridgeJavaDLLVersion[SHORT_STRING_SIZE];   // version of
                                                    //   JavaAccessBridge.dll
 wchar_t bridgeWinDLLVersion[SHORT_STRING_SIZE];    // version of
                                                    //   WindowsAccessBridge.dll
};

struct AccessibleContextInfo {
 wchar_ name[MAX_STRING_SIZE];        // the AccessibleName of the object
 wchar_ description[MAX_STRING_SIZE]; // the AccessibleDescription of the object
 wchar_ role[SHORT_STRING_SIZE];      // localized AccesibleRole string
 wchar_ states[SHORT_STRING_SIZE];    // localized AccesibleStateSet string
                                      //   (comma separated)
 jint indexInParent                   // index of object in parent
 jint childrenCount                   // # of children, if any
 jint x;                              // screen x-axis co-ordinate in pixels
 jint y;                              // screen y-axis co-ordinate in pixels
 jint width;                          // pixel width of object
 jint height;                         // pixel height of object
 BOOL accessibleComponent;            // flags for various additional
 BOOL accessibleAction;               // Java Accessibility interfaces
 BOOL accessibleSelection;            // FALSE if this object doesn't
 BOOL accessibleText;                 // implement the additional interface
 BOOL accessibleInterfaces;           // new bitfield containing additional
                                      //   interface flags
};

struct AccessibleTextInfo {
 jint charCount;       // # of characters in this text object
 jint caretIndex;      // index of caret
 jint indexAtPoint;    // index at the passsed in point
};

struct AccessibleTextItemsInfo {
 wchar_t letter;
 wchar_t word[SHORT_STRING_SIZE];
 wchar_t sentence[MAX_STRING_SIZE];
};

struct AccessibleTextSelectionInfo {
 jint selectionStartIndex;
 jint selectionEndIndex;
 wchar_t selectedText[MAX_STRING_SIZE];
};

struct AccessibleTextRectInfo {
 jint x;          // bounding recttangle of char at index, x-axis co-ordinate
 jint y;          // y-axis co-ordinate
 jint width;      // bounding rectangle width
 jint height;     // bounding rectangle height
};

struct AccessibleTextAttributesInfo {
 BOOL bold;
 BOOL italic;
 BOOL underline;
 BOOL strikethrough;
 BOOL superscript;
 BOOL subscript;
 wchar_t backgroundColor[SHORT_STRING_SIZE];
 wchar_t foregroundColor[SHORT_STRING_SIZE];
 wchar_t fontFamily[SHORT_STRING_SIZE];
 jint fontSize;
 jint alignment;
 jint bidiLevel;
 jfloat firstLineIndent;
 jfloat leftIndent;
 jfloat rightIndent;
 jfloat lineSpacing;
 jfloat spaceAbove;
 jfloat spaceBelow;
 wchar_t fullAttributesString[MAX_STRING_SIZE];
};

API Callbacks

The Java Access Bridge API callbacks are contained in the file AccessBridgeCallbacks.h. Your event handling functions must match these prototypes.

Note: All of the Java Access Bridge event handlers are defined and used in the Java Ferret example.

You must call the function ReleaseJavaObject on every JOBJECT64 returned through these event handlers once you are finished with them to prevent memory leaks in the JVM.

Here, JOBJECT64 is defined as jlong on 64-bit systems and jobject on legacy versions of Java Access Bridge. For definitions, see the section ACCESSBRIDGE_ARCH_LEGACY in the AccessBridgePackages.h header file.

If using legacy APIs, define ACCESSBRIDGE_ARCH_LEGACY. See the AccessBridgePackages.h header file.

  • typedef void (*AccessBridge_FocusGainedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_FocusLostFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_CaretUpdateFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MouseClickedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MouseEnteredFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MouseExitedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MousePressedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MouseReleasedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MenuCanceledFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MenuDeselectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_MenuSelectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PopupMenuCanceledFP) (long vmID JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PopupMenuWillBecomeInvisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PopupMenuWillBecomeVisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PropertyNameChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldName, wchar_t *newName);

  • typedef void (*AccessBridge_PropertyDescriptionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldDescription, wchar_t *newDescription);

  • typedef void (*AccessBridge_PropertyStateChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldState, wchar_t *newState);

  • typedef void (*AccessBridge_PropertyValueChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldValue, wchar_t *newValue);

  • typedef void (*AccessBridge_PropertySelectionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PropertyTextChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PropertyCaretChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, int oldPosition, int newPosition);

  • typedef void (*AccessBridge_PropertyVisibleDataChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);

  • typedef void (*AccessBridge_PropertyChildChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, JOBJECT64 oldChild, JOBJECT64 newChild);

  • typedef void (*AccessBridge_PropertyActiveDescendentChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, JOBJECT64 oldActiveDescendent, JOBJECT64 newActiveDescendent);

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Access Bridge Guide

Documentation Contents

Java Access Bridge Programmer's Guide for Assistive Technology Developers

Java Accessibility Guide > Java Access Bridge Programmer's Guide for Assistive Technology Developers

This guide is intended for those who develop assistive technology products. If you want to create Java applications that support assistive technologies, see How to Support Assistive Technologies from The Swing Tutorial.

This guide covers the following topics:

Introduction to Java Access Bridge

  • Overview of Java Access Bridge
  • Architecture of Java Access Bridge
  • Related Information

Java Access Bridge API

  • API Files
  • API Changes from 2.0.1
  • API Calls
    • Initialization/Shutdown Functions
    • Gateway Functions
    • Event Handling Functions
    • General Functions
    • Accessible Context Functions
    • Accessible Text Functions
    • Accessible Value Functions
    • Accessible Selection Functions
  • API Data Structures
  • API Callbacks

Troubleshooting

  • Known Problems
  • Usage Tips
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting Java Access Bridge

Java Accessibility Guide > Java Access Bridge Programmer's Guide for Assistive Technology Developers > Troubleshooting Java Access Bridge

This section describes known problems of and usage tips for those developing Assistive Technology applications for Java Access Bridge.

Known Problems

Re-Registering Menu Events Generates Duplicate Copies

If you register a menu event, unregister it, and then register it again, Java Access Bridge will generate duplicate copies of the menu event.

MenuDeselected Events Generated When Menu is Closed

You will not receive MenuCanceled (or PopupMenuCanceled) events. To determine that a menu has been closed, look for MenuDeselected events.

Usage Tips

Determining Changes in Menu Item Selection

Use State PropertyChange events to determine changes in menu item selection (for example, when the user uses the arrow buttons or keys to go up or down within a menu).

Tracking Values of GUI Elements

Use the AccessibleValue support and Value PropertyChange events to track the values of GUI elements like sliders and scroll bars.

Determining Selected Items

Use the AccessibleSelection support to determine which items are selected in containers that contain items such as lists and tables. This is more efficient than enumerating all of the children and examining their StateSet attribute to see if the Selected value is among them.

Obtaining Java Access Bridge Testing Tools

The Java Access Bridge testing tools Java Monkey and Java Ferret are not shipped with the JDK. These tools are included in Java Access Bridge 2.0.2. Download this version from Java Access Bridge Downloads.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration jab-block-diagram.eps

Documentation Contents

This figure, from the section Architecture of Java Access Bridge, contains two frames; these two frames overlap each other:

  • Java Runtime

  • Java Access Bridge for Windows

The following components are in the Java Runtime frame:

  • Java Application, which contains the component UI Toolkit, which contains the component JAAPI (Java Accessibility API)

  • Java Accessibility Utilities

The following component is in the Java Access Bridge for Windows frame:

  • Windows DLL

The following components are in both the Java Runtime frame and the Java Access Bridge for Windows frames (they are located where both frames overlap each other):

  • Java Access Bridge JAR

  • Runtime DLLs

The component Native Assistive Technology is not in either frame.

Double arrows connect the following components:

  • Native Assistive Technology and Windows DLL

  • Windows DLL and Runtime DLLs

  • Runtime DLLs and Java Access Bridge JAR

  • Java Access Bridge JAR and Java Application

  • Java Access Bridge JAR and Java Accessibility Utilities

  • Java Access Bridge JAR and Java Accessibility Utilities

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Attach API

The Attach API is an extension that provides a mechanism to attach to a Java virtual machine. A tool written in the Java Language, uses this API to attach to a target virtual machine and load its tool agent into that virtual machine. For example, a management console might have a management agent which it uses to obtain management information from instrumented objects in a virtual machine. If the management console is required to manage an application that is running in a virtual machine that does not include the management agent, then this API can be used to attach to the target virtual machine and load the agent.

API Specification

  • Attach API

API Enhancements

  • Enhancements
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Attach API Enhancements

  • Enhancements in Java SE 6
  • Enhancements in Java SE 5
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No changes to report.

Enhancements in Java SE 5.0

No changes to report.

Enhancements in Java SE 1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Abstract Window Toolkit

Documentation Contents

Abstract Window Toolkit (AWT)

The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include:

  • A set of native user interface components
  • A robust event-handling model
  • Graphics and imaging tools, including shape, color, and font classes
  • Layout managers, for flexible window layouts that do not depend on a particular window size or screen resolution
  • Data transfer classes, for cut-and-paste through the native platform clipboard
The Swing classes are built on top of the AWT architecture.

API Specification

  • API Reference
  • Focus Model Specification

Tutorials and Programmer's Guides

  • The Swing Tutorial touches on parts of the AWT that support the Swing architecture:
    • Introduction to Event Listeners
    • Top-Level Containers and the Containment Hierarchy
    • Laying out Components in a Container/a>
    • Modality, Splash Screen, Desktop, and System Tray
  • Full-Screen Exclusive Mode API
  • How to Create Translucent and Shaped Windows

API Enhancements

  • AWT Enhancements in Java SE 7
  • AWT Enhancements in the Java SE 6.0
  • AWT Enhancements in the Java SE 5.0
  • AWT Enhancements in the Java SE 1.4

More Information

  • XAWT
  • AWT Native Interface
  • Drag and Drop and Data Transfer
  • Java 2D Graphics and Imaging
  • JavaFX Documentation
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT Enhancements in Java SE 6.0

Documentation Contents

AWT Enhancements in the Java Standard Edition 6.0

java.awt

Major Features

  • Modality
  • Desktop
  • Splash Screen
  • System Tray
  • Enhancements to Layouting Components
  • Enhancements of the Window class
Fixed Bugs
Known Bugs and Issues

Major Features

The following features were introduced in the Java SE 6.0:

Modality

The new modality model was introduced to handle modality blocking of a dialog box. This model comprises four modality types: modeless, application-modal, document-modal, and toolkit-modal.

public Dialog(Window owner, String title,
                           Dialog.ModalityType modalityType,GraphicsConfiguration gc)

The modalityTypes parameter specifies whether a dialog box blocks input to other windows when shown. The null value and unsupported modality types are equivalent to the modeless type. The getModalityType and setModalityType methods of the Dialog class allows you accordingly to return and set the modality type for the dialog box.

Any top-level window can be marked so it will not be blocked by modal dialogs. This property enables you to set up the modal exclusion mode. The setModalExclusionType method of the Window class specifies one of the following modal exclusion modes: APPLICATION_EXCLUDE, TOOLKIT_EXCLUDE, or NO_EXCLUDE.

See the How to Use Modality in Dialogs section of the Swing tutorial for more information about modality.

Desktop

The Desktop API (java.awt.Desktop) API is provided to allow Java applications to interact with default applications associated with specific file types. All provided actions are represented as a Desktop.Action enumeration instance:

  • BROWSE — Represents a browse action performed by the host's default browser.
  • MAIL — Represents a mail action performed by the host's default email client.
  • OPEN — Represents an open action performed by an application associated with opening a specific file type.
  • EDIT — Represents an edit action performed by an application associated with editing a specific file type
  • PRINT — Represents a print action performed by an application associated with printing a specific file type.

Use the isSupported method of the Desktop class to check whether an action is supported on the current platform.

See the How to Integrate with the Desktop Class section of the Swing tutorial for more information about using the Desktop class.

Splash Screen

There is a new solution that allows the application to display the splash screen before the virtual machine starts has been introduced. Although the SplashScreen class cannot be sued to create a splash screen, a Java application can close the splash screen, change the splash screen image, get the image position/size and paint in the splash screen. An instance of the SplashScreen class can be obtained using the getSplashScreen() static method.

To run an application with the splash screen from the command line use the following command:

java -splash:<file name> <class name>

See the How to Create a Splash Screen section of the Swing Tutorial for more information about splash screen.

System Tray

The SystemTray class is intended to represent the system tray for a desktop. The system tray can be accessed by calling the getSystemTray() static method. The system tray may contain one or more tray icons represented by the TrayIcon class objects. However, the TrayIcon class functionality is not limited to creating a tray icon. It also includes a text tooltip, a pop-up menu, and balloon messages:

TrayIcon trayIcon = new TrayIcon(createImage("icon.gif", "tray icon"));

trayIcon.displayMessage("Sun TrayIcon Demo",
                        "This is an info message", TrayIcon.MessageType.INFO);
trayIcon.setToolTip("Sun TrayIcon");

Note: The current implementation of the TrayIcon class provides limited support of the Swing components. The workaround proposal for this issue is described in the Bug Database, see Bug ID 6285881.

See the How to Use the System Tray section of the Swing Tutorial for more information about the system tray and tray icons.

Enhancements to Layouting Components

Two new methods of the java.awt.Component class enable to obtain the baseline measured from the top of the component and to handle the baseline change as the size of the component changes:

  • public int getBaseline(int width int height)
  • public Component.BaselineResizeBehavior getBaselineResizeBehavior()

FlowLayout:

Two methods were introduced to control vertical components' alignment along their baseline:

  • getAlignOnBaseline()
  • setAlignOnBaseline(boolean)
GridBagLayout:

The following constraints were added to the GridBagConstraints class to enhance lay outing components with the GridBagLayout class:

  • BASELINE
  • BASELINE_LEADING
  • BASELINE_TRAILING
  • ABOVE_BASELINE
  • ABOVE_BASELINE_LEADING
  • ABOVE_BASELINE_TRAILING
  • BELOW_BASELINE
  • BELOW_BASELINE_LEADING
  • BELOW_BASELINE_TRAILING

Additionally the GridBagLayoutInfo class was introduced to store align, size, and baseline parameters for every component within a container while lay outing components using GridBagLayout.

Enhancements the Window class

New methods were added to the Window class to handle images that are displayed as the icon for the window. While the setIconImage(Image image) method sets the only one image, the setIconImages(List<? extends Image> icons) method supports the sequence of images of different dimensions to be applied depending on the platform capabilities.

In Java SE 6 a Window or Dialog object can be created without a parent frame, the owner parameter in constructors of such objects equals null.

Fixed Bugs

Here is a list of the key bug fixes:

6404008 Delivery of mouse events depends on drag sensitivity:

Mouse dragged events were received after the drag sensitivity setting of the operating system is reached. In the proposed solution the drag distance parameter of the operating system is ignored. Java drag events will be ganerated on the first movement of the mouse.

6242833 A mouse cursor does not behave properly after maximizing a window on Linux/JDS 3:

Some events essential for cursor update were not delivered while maximazing a window. The fix comprises x-crossing event handling within XWindow.

4841881: Tabbing by using Alt+Tab on Windows L&F moves focus to the application menu bar

Using Alt+Tab to navigate from a Java window to a native application window and back to the Java window resulted in the focus being moved to the first menu item of the Java window. The proposed fix allows to keep the focus on the initially focused component of the Java window.

6291992: All editable fields get frozen

Editable fields became unable to be edited or to get the focus (JTextField, JTextArea, etc), even in fields that have been previously edited. Other components as combo boxes, tables, radio buttons remain editable.

6176814: Multi-click handling

The XWindow.java code lacks multi click handling. So, when the user dragged the mouse on the screen onto the Linux box, double clicks occurred when the user expected single clicks. Likewise, single clicks occurred when the user expected no clicks at all. The fix includes the AWT_MULTICLICK_SMUDGE variable to apply a smudge factor so that moving the mouse by a small amount does not wipe out the multi-click state variables.

5051557: The applet does not respond to keyboard commands

The applet itself did not get the focus, which apparently went to the embedded frame.This incompatibility was caused by a focus rearchitecture introduced in Java SE 1.4. The fix restores initial proper behavior.

4320050: Minimum size for a Frame object is not being enforced

The Window.setMinimumSize() method has been modified to restrict user-resizing of top-level windows below specified dimensions. Previously, minimum size set for toplevel windows was ignored by platform, so this change can impact code that uses the minimumSize property of top-level windows for its own needs.

6199167: Live resizing

Native applications on Windows had the property to dynamically relayout and repaint during resizing. This property was controlled through system desktop settings. Java disables this property by default. In Java SE 6 the required property is enables by default.

4360364: Cyrillic input is not supported

If a locale was defined incorrectly, a native Input Method did not process keysyms and passed them as is to AWT handleKeyEvent routine. In the fix a conversion table is added and key event handling generally streamlined in non Input Method situations.

Known Bugs and Issues

Here is a list of known problems you may encounter in release 6.0.

5070056: The JWindow component stays on top of all other windows

The JWindow component stays up on top of all other windows hiding other windows behind it on Solaris and Linux. To workaround, you can use an undecorated frame.

6387273: The JVM crash

In some synthetic situations (such as repeated showing/disposing of a toplevel) the JVM may crash.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT Enhancements in Java SE 7

The following enhancements are introduced:

Area: API: AWT
Standard/Platform: Java SE 7
Synopsis: The java.awt.Cursor class contained a "protected static field" called "predefined." This field has been removed.

Area: API: AWT
Standard/Platform: Java SE 7
Synopsis: Color alpha values are now preserved by java.awt.Color.darker() and java.awt.Color.lighter() methods.
RFE: 6783910

Area: API: AWT
Standard/Platform: JDK 7
Synopsis: Limited mixing of heavyweight (e.g. AWT) and lightweight (e.g. Swing) components is now officially supported. Details are available in the API specification (see the java.awt.Component class specification and its "See Also" link), and the Mixing Heavyweight and Lightweight Components article. If an application uses custom code to address the mixing issue and experiences problems with the built-in support for mixing, the feature can be turned off by specifying the -Dsun.awt.disableMixing=true system property.
RFE: 4811096

Area: API: AWT
Standard/Platform: JDK 7
Synopsis: The mechanism used to detect whether the window manager supports a system tray (and therefore the TrayIcon API) has been changed. Instead of looking at the current window manager, the System Tray Protocol Specification is used.
RFE: 6438179

Area: API: AWT
Standard/Platform: JDK 7
Synopsis: In the JDK 7 release there are two AWT toolkits that are supported. WToolkit on Windows and XToolkit on Linux/Solaris. The MToolkit implementation on Linux/Solaris is no longer supported.

Area: API: AWT
Standard/Platform: JDK 7
Synopsis: With this fix, all java.awt.Window objects (not frames or dialogs) are regular top-level windows on X11. In the JDK 6 release, they were OverrideRedirect windows.
RFE: 6380835

Area: API: AWT
Standard/Platform: JDK 7
Synopsis: Windows that enable the PERPIXEL_TRANSLUCENT kind of transparency by means of setting a non-opaque background color may not display heavyweight (e.g. AWT) child components correctly. AWT supports lightweight (e.g. Swing) components in per-pixel translucent windows only. More information on the difference between the two kinds of components can be found in the Component class specification and in the Mixing Heavyweight and Lightweight Components article.
RFE: 6802853

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT Native Interface

Documentation Contents

The AWT Native Interface

The Key to Rendering to an AWT Canvas from Native Code

The new Java SE AWT Native Interface enables rendering libraries compiled to native code to draw directly to a Java Canvas drawing surface. This means that such libraries can be used without being converted to Java first and without significant impact on performance. An example illustrating how easy it is to use the AWT Native Interface is presented and discussed in this technical note.

Introduction

The definition of Java Standard Edition includes JNI, the Java Native Interface. Most Java developers will never need to use it, but the interface is invaluable in certain situations because it provides the only way for Java byte code to interact directly with application code that has been compiled to the native machine instructions for the host microprocessor. JNI is most often used as an ``escape valve'' to enable access to platform functionality not yet supported by the Java programming language. For example, you could use JNI to integrate with native code that communicates with a peripheral device, such as a scanner, connected to a system via a USB port.

Of course, JNI is general enough to be used to access almost any sort of native library, regardless of whether the task to be accomplished could also be done using pure Java. The major penalty for using it is that code portability suffers, but this may be acceptable or even necessary for business or technical reasons.

Business reasons? Consider the situation where the legacy software you are trying to port to Java uses a third-party library for a critical set of operations. If you do not have source rights to this library and you cannot convince the owner to provide a Java version, you may not be able to use it. Even if you do have the source, the effort needed to port a standard library to Java and test it may be too expensive to consider.

Another important reason for leaving the native code alone is related to performance. If you are dealing with a finely crafted piece of code, carefully tuned for performance over the course of years, you probably do not want to convert it to Java and risk a performance penalty. It is usually best to keep it intact until you are satisfied that the benefits of Java portability and code maintainability outweigh the expected performance difference.

A rendering library is a good example of a piece of native code that most developers would just as soon leave alone for performance reasons. Unfortunately, this is the very type of library that has been most difficult to integrate with Java code through JNI. The fundamental problem has been that the rendering code cannot identify where to draw. It needs access to information about a Java drawing surface (such as a handle to the underlying peer of a Canvas), but cannot get it.

Until now, the Java platform has kept access to this information private — "private" in the sense of undocumented, unsupported, and deprecated. The good news is that this situation will be remedied with the introduction of the "AWT Native Interface" in the Java upgrade release ("Kestrel"). For the first time there will be an official way to obtain all the information you need to know about the peer of a Java Canvas so that you can draw directly to the Canvas from a native code library using the drawing routines provided by the operating system.

How It Works

In this section we'll describe the most common usage of the AWT Native Interface — overriding the paint method to direct drawing operations to a native rendering library which then queries the Java VM to determine the information it needs in order to render. Note, however, that any native code may use the AWT Native Interface to learn about a target drawing surface, not just code in a paint method.

The first step in hooking up a native rendering library to a Java Canvas is to define a new class that extends Canvas and overrides the paint method. The Java system routes all drawing operations for a Canvas object through the paint method, as it does for all other GUI objects.

The new paint method, to be implemented in the native rendering library, must be declared as public native void , and the native library itself is loaded at runtime by including a call to System.loadLibrary( "myRenderingLib")in the static block of the class. The myRenderingLib name is used for the native shared library; for the Solaris operating environment, the actual name for the library file on disk is libmyRenderingLib.so .

Here is a simple example of such a class:

import java.awt.*;
import java.awt.event.*;

public class MyCanvas extends Canvas {
    static {
        System.loadLibrary("myRenderingLib");
    }
    public native void paint(Graphics g);

    public static void main(String[] args) {
        Frame f = new Frame();
        f.setBounds(0, 0, 500, 110);
        f.add( new MyCanvas() );
        f.addWindowListener( new WindowAdapter() {
            public void windowClosing(WindowEvent ev) {
                System.exit(0);
            }
        } );
        f.show();
    }
}

Note that this class has a main method that can be used torun this code as an application for testing purposes.

The next step is to run the javah tool on the MyCanvas class file above to generate a C/C++ header file that describes the interface to the native paint method that Java expects to be used. javah is a standard tool included with the Java SDK.

The final step the most interesting one is to write the native rendering method, with an interface that conforms to the header file that javah generated, and build it as a standard shared library (called myRenderingLib in the above example) by linking it, for the Solaris operating environment, against the jre/lib/sparc/libjawt.so library. (For Microsoft Windows, link against the jre/bin/jawt.dll library.) This code will call back to the Java virtual machine to get the drawing surface information it needs to access the MyCanvas peer. Once this information is available, the code can draw directly to MyCanvas using standard drawing routines supplied by the underlying operating system.

Here is sample source code for a native paint method designed for use in a Solaris X11-based drawing environment and a Java VM where the AWT Native Interface is present:

#include "MyCanvas.h"
#include "jawt_md.h"

/*
 * Class:     MyCanvas
 * Method:    paint
 * Signature: (Ljava/awt/Graphics;)V
 */
JNIEXPORT void JNICALL Java_MyCanvas_paint
(JNIEnv* env, jobject canvas, jobject graphics)
{
    JAWT awt;
    JAWT_DrawingSurface* ds;
    JAWT_DrawingSurfaceInfo* dsi;
    JAWT_X11DrawingSurfaceInfo* dsi_x11;
    jboolean result;
    jint lock;
    GC gc;

    short       i;
    char        *testString = "^^^ rendered from native code ^^^";

    /* Get the AWT */
    awt.version = JAWT_VERSION_1_3;
    if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
        printf("AWT Not found\n");
        return;
    }

    /* Get the drawing surface */
    ds = awt.GetDrawingSurface(env, canvas);
    if (ds == NULL) {
        printf("NULL drawing surface\n");
        return;
    }

    /* Lock the drawing surface */
    lock = ds->Lock(ds);
    if((lock & JAWT_LOCK_ERROR) != 0) {
        printf("Error locking surface\n");
        awt.FreeDrawingSurface(ds);
        return;
    }

    /* Get the drawing surface info */
    dsi = ds->GetDrawingSurfaceInfo(ds);
    if (dsi == NULL) {
        printf("Error getting surface info\n");
        ds->Unlock(ds);
        awt.FreeDrawingSurface(ds);
        return;
    }

    /* Get the platform-specific drawing info */
    dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;

    /* Now paint */
    gc = XCreateGC(dsi_x11->display, dsi_x11->drawable, 0, 0);
    XSetBackground(dsi_x11->display, gc, 0);
    for (i=0; i<36;i++)
    {
        XSetForeground(dsi_x11->display, gc, 10*i);
        XFillRectangle(dsi_x11->display, dsi_x11->drawable, gc,
                        10*i, 5, 90, 90);
    }
    XSetForeground(dsi_x11->display, gc, 155);
    XDrawImageString(dsi_x11->display, dsi_x11->drawable, gc,
                        100, 110, testString, strlen(testString));
    XFreeGC(dsi_x11->display, gc);

    /* Free the drawing surface info */
    ds->FreeDrawingSurfaceInfo(dsi);

    /* Unlock the drawing surface */
    ds->Unlock(ds);

    /* Free the drawing surface */
    awt.FreeDrawingSurface(ds);
}

The key data structure here is JAWT , which is defined in jawt.h (included by jawt_md.h) ; it provides access to all the information the native code needs to get the job done. The first part of the native method is boilerplate: it populates the JAWT structure, gets a JAWT_DrawingSurface structure, locks the surface (only one drawing engine at a time, please!), then gets a JAWT_DrawingSurfaceInfo structure that contains a pointer (in the platformInfo field) to the necessary platform-specific drawing information. It also includes the bounding rectangle of the drawing surface and the current clipping region.

The structure of the information pointed to by platformInfo is defined in a machine-dependent header file called jawt_md.h. For Solaris/X11 drawing, it includes information about the X11 display and X11 drawable associated with MyCanvas. After the drawing operations are completed, there is more boilerplate code as JAWT_DrawingSurfaceInfo is freed and JAWT_DrawingSurface is unlocked and freed.

The corresponding code for the Microsoft Windows platform would be structured similarly, but would include the version of jawt_md.h for Microsoft Windows and the structure located in the platformInfo field of drawing surface info would be cast as a JAWT_Win32DrawingSurfaceInfo* . And, of course, the actual drawing operations would need to be changed to those appropriate for the Microsoft Windows platform.

Summary

The ability to draw directly into a Java Canvas from a native code library is extremely useful for developers planning to migrate a legacy software system to Java, especially one that includes a high-performance rendering engine. It makes it much easier to migrate in stages, leaving performance-sensitive rendering code alone, while other less-sensitive portions of code are converted to Java. The result can be a modern Java-centric application, providing the benefit of portability and development efficiency, but one that does not sacrifice an investment in performance of a key piece of native code.

References

The definitive reference to the Java Native Interface is The Java Native Interface: Programmer's Guide and Specification by Sheng Liang. This book was published in June 1999 by Addison-Wesley. The ISBN is 0-201-32577-2.

Appendix

Header Files for jawt.h and jawt_md.h

jawt.h

#ifndef _JAVASOFT_JAWT_H_
#define _JAVASOFT_JAWT_H_

#include "jni.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * AWT native interface
 *
 * The AWT native interface allows a native C or C++ application a means
 * by which to access native structures in AWT.  This is to facilitate moving
 * legacy C and C++ applications to Java and to target the needs of the
 * community who, at present, wish to do their own native rendering to canvases
 * for performance reasons.  Standard extensions such as Java3D also require a
 * means to access the underlying native data structures of AWT.
 *
 * There may be future extensions to this API depending on demand.
 *
 * A VM does not have to implement this API in order to pass the JCK.
 * It is recommended, however, that this API is implemented on VMs that support
 * standard extensions, such as Java3D.
 *
 * Since this is a native API, any program which uses it cannot be considered
 * 100% pure java.
 */

/*
 * AWT Native Drawing Surface (JAWT_DrawingSurface).
 *
 * For each platform, there is a native drawing surface structure.  This
 * platform-specific structure can be found in jawt_md.h.  It is recommended
 * that additional platforms follow the same model.  It is also recommended
 * that VMs on Microsoft Windows platforms and Solaris operating environment
 * support the existing structures in jawt_md.h.
 *
 *******************
 * EXAMPLE OF USAGE:
 *******************
 *
 * In Miscrosoft Windows, a programmer wishes to access the HWND of a canvas
 * to perform native rendering into it.  The programmer has declared the
 * paint() method for their canvas subclass to be native:
 *
 *
 * MyCanvas.java:
 *
 * import java.awt.*;
 *
 * public class MyCanvas extends Canvas {
 *
 *     static {
 *         System.loadLibrary("mylib");
 *     }
 *
 *     public native void paint(Graphics g);
 * }
 *
 *
 * myfile.c:
 *
 * #include "jawt_md.h"
 * #include <assert.h>
 *
 * JNIEXPORT void JNICALL
 * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
 * {
 *     JAWT awt;
 *     JAWT_DrawingSurface* ds;
 *     JAWT_DrawingSurfaceInfo* dsi;
 *     JAWT_Win32DrawingSurfaceInfo* dsi_win;
 *     jboolean result;
 *     jint lock;
 *
 *     // Get the AWT
 *     awt.version = JAWT_VERSION_1_3;
 *     result = JAWT_GetAWT(env, &awt);
 *     assert(result != JNI_FALSE);
 *
 *     // Get the drawing surface
 *     ds = awt.GetDrawingSurface(env, canvas);
 *     assert(ds != NULL);
 *
 *     // Lock the drawing surface
 *     lock = ds->Lock(ds);
 *     assert((lock & JAWT_LOCK_ERROR) == 0);
 *
 *     // Get the drawing surface info
 *     dsi = ds->GetDrawingSurfaceInfo(ds);
 *
 *     // Get the platform-specific drawing info
 *     dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
 *
 *     //////////////////////////////
 *     // !!! DO PAINTING HERE !!! //
 *     //////////////////////////////
 *
 *     // Free the drawing surface info
 *     ds->FreeDrawingSurfaceInfo(dsi);
 *
 *     // Unlock the drawing surface
 *     ds->Unlock(ds);
 *
 *     // Free the drawing surface
 *     awt.FreeDrawingSurface(ds);
 * }
 *
 */

/*
 * JAWT_Rectangle
 * Structure for a native rectangle.
 */
typedef struct jawt_Rectangle {
    jint x;
    jint y;
    jint width;
    jint height;
} JAWT_Rectangle;

struct jawt_DrawingSurface;

/*
 * JAWT_DrawingSurfaceInfo
 * Structure for containing the underlying drawing information of a component.
 */
typedef struct jawt_DrawingSurfaceInfo {
    /*
     * Pointer to the platform-specific information.  This can be safely
     * cast to a JAWT_Win32DrawingSurfaceInfo on Microsoft Windows or a
     * JAWT_X11DrawingSurfaceInfo on Solaris operating environment.
     * See jawt_md.h for details.
     */
    void* platformInfo;
    /* Cached pointer to the underlying drawing surface */
    struct jawt_DrawingSurface* ds;
    /* Bounding rectangle of the drawing surface */
    JAWT_Rectangle bounds;
    /* Number of rectangles in the clip */
    jint clipSize;
    /* Clip rectangle array */
    JAWT_Rectangle* clip;
} JAWT_DrawingSurfaceInfo;

#define JAWT_LOCK_ERROR                 0x00000001
#define JAWT_LOCK_CLIP_CHANGED          0x00000002
#define JAWT_LOCK_BOUNDS_CHANGED        0x00000004
#define JAWT_LOCK_SURFACE_CHANGED       0x00000008

/*
 * JAWT_DrawingSurface
 * Structure for containing the underlying drawing information of a component.
 * All operations on a JAWT_DrawingSurface MUST be performed from the same
 * thread as the call to GetDrawingSurface.
 */
typedef struct jawt_DrawingSurface {
    /* Cached reference to the Java environment of the calling thread */
    JNIEnv* env;
    /* Cached reference to the target object */
    jobject target;
    /*
     * Lock the surface of the target component for native rendering.
     * When finished drawing, the surface must be unlocked with
     * Unlock().  This function returns a bitmask with one or more of the
     * following values:
     *
     * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
     * be locked.
     *
     * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
     *
     * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
     *
     * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
     */
    jint (JNICALL *Lock)
        (struct jawt_DrawingSurface* ds);
    /*
     * Get the drawing surface info.
     * The value returned may be cached, but the values may change if
     * additional calls to Lock() or Unlock() are made.
     * Lock() must be called before this can return a valid value.
     * Returns NULL if an error has occurred.
     * When finished with the returned value, FreeDrawingSurfaceInfo must be
     * called.
     */
    JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
        (struct jawt_DrawingSurface* ds);
    /*
     * Free the drawing surface info.
     */
    void (JNICALL *FreeDrawingSurfaceInfo)
        (JAWT_DrawingSurfaceInfo* dsi);
    /*
     * Unlock the drawing surface of the target component for native rendering.
     */
    void (JNICALL *Unlock)
        (struct jawt_DrawingSurface* ds);
} JAWT_DrawingSurface;

/*
 * JAWT
 * Structure for containing native AWT functions.
 */
typedef struct jawt {
    /*
     * Version of this structure.  This must always be set before
     * calling JAWT_GetAWT()
     */
    jint version;
    /*
     * Return a drawing surface from a target jobject.  This value
     * may be cached.
     * Returns NULL if an error has occurred.
     * Target must be a java.awt.Canvas.
     * FreeDrawingSurface() must be called when finished with the
     * returned JAWT_DrawingSurface.
     */
    JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
        (JNIEnv* env, jobject target);
    /*
     * Free the drawing surface allocated in GetDrawingSurface.
     */
    void (JNICALL *FreeDrawingSurface)
        (JAWT_DrawingSurface* ds);
} JAWT;

/*
 * Get the AWT native structure.  This function returns JNI_FALSE if
 * an error occurs.
 */
_JNI_IMPORT_OR_EXPORT_
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);

#define JAWT_VERSION_1_3 0x00010003

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* !_JAVASOFT_JAWT_H_ */

jawt_md.h (Solaris/X11 operating environment version)

#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
#include "jawt.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * X11-specific declarations for AWT native interface.
 * See notes in jawt.h for an example of use.
 */
typedef struct jawt_X11DrawingSurfaceInfo {
    Drawable drawable;
    Display* display;
    VisualID visualID;
    Colormap colormapID;
    int depth;
} JAWT_X11DrawingSurfaceInfo;

#ifdef __cplusplus
}
#endif

#endif /* !_JAVASOFT_JAWT_MD_H_ */

jawt_md.h (Microsoft Windows version)

#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_

#include <windows.h>
#include "jawt.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Microsoft Windows specific declarations for AWT native interface.
 * See notes in jawt.h for an example of use.
 */
typedef struct jawt_Win32DrawingSurfaceInfo {
    /* Native window, DDB, or DIB handle */
    union {
        HWND hwnd;
        HBITMAP hbitmap;
        void* pbits;
    };
    /*
     * This HDC should always be used instead of the HDC returned from
     * BeginPaint() or any calls to GetDC().
     */
    HDC hdc;
    HPALETTE hpalette;
} JAWT_Win32DrawingSurfaceInfo;

#ifdef __cplusplus
}
#endif

#endif /* !_JAVASOFT_JAWT_MD_H_ */
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT Enhancements

Documentation Contents

AWT Enhancements in the Java SE 1.4

1.4.2 Bug Fixes
1.4.1 Bug Fixes
New Focus Subsystem
Deprecated Focus Methods
ActionEvents (and Other Events) Need Timestamps
Headless Support
Window Centering API Required for Multiscreen Support
The New Fullscreen Exclusive Mode API
Sync Out of Range Error From Video Driver Under Windows NT Undecorated Frames
Mouse Wheel Support
Programmatic Zooming of Frames
Dynamic Layout During Resize
Access to Component Listener Lists
Changes to Drag and Drop
64-Bit Compliance on Solaris
Inconsistent DLLs Warning
Removal of the DrawingSurface API
New InputEvent Key Modifiers
Change in Drop Down Behavior for Choice Menus
Choice Component Now Obeys Layout Manager Constraints

1.4.2 Bug Fixes

4648702: On Microsoft Windows 2000 and Windows XP, a TextArea will sometimes display only a vertical scrollbar, even though the SCROLLBARS_BOTH field is set to true.

4636311: Modal dialogs may hang when run from a Runnable on release 1.3.1 and 1.4.

4385243: Unable to input text in Microsoft Windows locales that don't have an ANSI code page (such as Hindi).

1.4.1 Bug Fixes

4690831: Game applets fail to repaint properly with Internet Explorer.

4627627: Focus traversal keys moved from awt.properties to Preferences API.

4636548/ 4639735: Crash of release 1.4 when screensaver on Microsoft Windows 2000 is activated.

4379138: Problems on Linux with key events for some dead keys.

4627542: Swing applications don't support international keyboards under Linux.

4395157: Under Linux on 1.3, can't type "%" in applets.

4669873: A drag and drop bug, reported on hopper-beta under Microsoft Windows, caused an application to briefly freeze during DnD and is fixed in the final release of 1.4.1.

New Focus Subsystem

The bugtraq report that corresponds to this change is: 4290675.

A new focus subsystem replaces the previous focus architecture and addresses many focus-related bugs caused by platform inconsistencies, and incompatibilities between AWT and Swing components. See the new Focus Model Specification for further details.

See the javadoc here.

Headless Support

The bugtraq report that corresponds to this change is: 4281163.

Many environments, such as mainframe machines and dedicated servers, do not support a display, keyboard, or mouse. Headless support is enabled by the new GraphicsEnvironment methods isHeadless and isHeadlessInstance. These methods indicate whether a display, keyboard, and mouse can be supported in a graphics environment.

The API changes for headless include:

  • A new public exception class, java.awt.HeadlessException, is introduced. It is derived from UnsupportedOperationException, which derives from RuntimeException, so that existing implementations of methods that throw the new exception will not require signature changes.
  • Two new methods, are added to java.awt.GraphicsEnvironment.
        public static boolean isHeadless()

    public boolean isHeadlessInstance()
  • The constructors of Applet and all heavyweight components (*) are changed to throw HeadlessException if a display, keyboard, and mouse are not supported by the toolkit implementation. All javadoc tags on all constructors are changed to reflect this RuntimeException.
  • The Robot constructor throws an AWTException if a display, keyboard, and mouse are not supported by the toolkit implementation.
  • Many of the methods in Toolkit and GraphicsEnvironment, with the exception of fonts, imaging, and printing, are changed to throw HeadlessException if a display, keyboard, and mouse are not supported. All the javadoc tags on these methods are changed to reflect this RuntimeException.
  • Other methods that may be affected by lack of display, keyboard, or mouse support, are changed to throw HeadlessException.
  • It should be worth noting that the HeadlessException is thrown if and only if isHeadless returns true, and that all javadoc comments should specify this.

(*)Applet, Button, Checkbox, Choice, FileDialog, Label, List, Menu, MenuBar, MenuComponent, MenuItem, PopupMenu, Scrollbar, ScrollPane, TextArea, TextComponent, Frame, Window, Dialog, JApplet, JFrame, JWindow, JDialog, and TextField. Canvas and Panel do not need to throw this exception since these can be given empty peers and treated as lightweights.

To run our environment with a headless implementation, the follow property may be specified at the java command line:

  -Djava.awt.headless=true
If this property is not specified and a display, keyboard, and mouse are not supported, then headless implementation is used by default.

Source code should check for headless, so that the exception may be caught gracefully. For example, see the following pre-headless implementation of the class Foo:

class Foo {
  static Choice c = new Choice();  // could throw HeadlessException
}
The new and improved implementation of Foo should be placed in a static block:
class Foo {
  static Choice c;
  static {
    try {
      c = new Choice();
    catch (HeadlessException e) {
        ...
    }
  }
}

The New Fullscreen Exclusive Mode API

The bugtraq report that corresponds to this change is: 4189326.

The new full-screen exclusive mode API supports high performance graphics by suspending the windowing system so that drawing can be done directly to the screen. Full screen mode, which is entirely different from simply taking an AWT Frame, Window, or Dialog and expanding it to fit the screen, is a graphics mode whereby the application takes entire control over the contents of video memory. The application tells the graphics card what to draw, how to draw it, and when to draw it. This mode is not always available. On some operating systems, it may not be implemented at all. On other operating systems, it may only be available if the capability is supported by the graphics card. Nevertheless, this mode is critical for performance and is necessary for enabling hardware page-flipping on Windows.

For a tutorial explaining how to use the full screen exclusive API mode with several code examples, see here.

API Changes:

  • A new public final class, java.awt.DisplayMode, is introduced.
  • Changes to java.awt.GraphicsDevice:
        public void setFullScreenWindow(Window w)

    public Window getFullScreenWindow()

    public boolean isDisplayChangeSupported()

    public void setDisplayMode(DisplayMode dm)

    public DisplayMode getDisplayMode()

    public DisplayMode[] getDisplayModes()
  • The algorithm which handles direct video buffer control has been localized to a new class, java.awt.image.BufferStrategy.
  • A new class java.awt.BufferCapabilities can be used when creating a buffer strategy. Likewise, a new class java.awt.ImageCapabilities is available to define the image capabilities of a specific configuration.
  • An application programmer can create and use a buffer strategy from a Canvas or a Window. There are two buffer strategies that are supported as protected inner classes: java.awt.Component.FlipBufferStrategy and java.awt.Component.BltBufferStrategy. One of these two inner classes is used on the Canvas or Window when the createBufferStrategy method is called, depending on the BufferCapabilities object supplied when creating the strategy (if any). To get the buffer strategy used by a particular component, the getBufferStrategy method is used.
Sync Out of Range Error From Video Driver Under Windows NT

The bugtraq report that corresponds to this change is: 4452207.

If you have a Dell Optiplex GX110 using an Intel 810 Graphics Controller, under Windows NT, you may get a "sync out of range" message from the video driver if you change the display mode more than once and use a high display resolution. There is evidently a bug in the (DirectX) video driver that is causing this. There are several workarounds to this problem:

  • Disable DirectDraw by using -Dsun.java2d.noddraw=true at the command line.
  • Do not change the display resolution more than once during the lifetime of a program that is intended to run on this hardware.
  • Disallow the following display modes on this hardware:
        1152 X 864     8       85
    1152 X 864     16      85
    1152 X 864     24      85

    1280 X 1024    8       70,72,75,85
    1280 X 1024    16      70,72,75,85
    1280 X 1024    24      70,75,85

    Bad Color (Unsatisfactory appearance in terms of color)

    1024 X 768     8       60,70,72,75,85

Undecorated Frames

The bugtraq report that corresponds to this change is: 4038769.

For certain applications having no native frame decorations makes sense. For example, applications that will run across many platforms and that require that the look and feel is the same, or when the programmer does not want the end-user coming in contact with the native operating system.

This release allows a Java application to turn off the creation of frame decorations; no native titlebar, system menu, border, or other native operating system dependent screen components appear when this mode is enabled. AWT and Swing components work transparently.

Changes to java.awt.Frame:

    public void setUndecorated(boolean undecorated)

    public boolean isUndecorated()

Changes to java.awt.Dialog:

    public void setUndecorated(boolean undecorated)

    public boolean isUndecorated()

Mouse Wheel Support

The bugtraq report that corresponds to this change is: 4289845.

The mouse wheel, with a scroll wheel in place of the middle mouse button, is enabled with new built-in Java support for scrolling via the mouse wheel. The java.awt.event.MouseWheelEvent class enables seamless support for mouse wheel scrolling in Java applications with no recompiling required. Also, a new java.awt.event.MouseWheelListener interface allows customization of mouse wheel behavior.

Note, for those using the mouse wheel on Linux, see here.

  • Scrolling Behavior:
    • A scrollbar is considered "scrollable" if it is both showing and there is more content in the scrolling Component than can be displayed at once, such that the scroll thumb does not occupy the entire scroll track.
    • It is possible for a scrollbar to be showing, but not be scrollable. Usually this occurs when a scrollbar is set to always be displayed.
    • The scrollbar to be scrolled by the mouse wheel is determined as follows:
      • If only one scrollbar is scrollable, it will be scrolled.
      • If both a horizontal and a vertical scrollbar are scrollable, the vertical scrollbar will be scrolled.
    • Wheel scrolling may be disabled altogether using setWheelScrollEnabled(false).
    • Up/away-from-user rotations cause vertical scroll bars to scroll upwards, and horizontal scrollbars to scroll to the left. Just the opposite is true for down/towards rotations.
    • No scrolling takes place if a scroll thumb is at the end of the scroll track.
  • Heavyweight support:
    • Some native peers with integrated scroll bars can handle mouse wheel scrolling by themselves. Examples on Windows includes TextArea, Choice, FileDialog, and List. Such components will let their native peers handle wheel scrolling.
    • Components which do not inherit any native mouse wheel behavior will propagate mouse wheel events up the Container hierarchy until a Container with MouseWheelEvents enabled is found. This is typically a ScrollPane. Mouse wheel events are delivered to the Component with MouseWheelEvents enabled.
    • Alternatively, client programmers may add MouseWheelListeners to customize what happens when the mouse wheel is moved while the mouse is over a Component. In the case of Components that already have native handling of mouse wheel events, clients may consume the mouse wheel event to avoid native handling.
    • java.awt.ScrollPane is modified to have MouseWheelEvents enabled by default. When a ScrollPane receives a MouseWheelEvent, it will properly scroll its contained Component. This functionality may be disabled with the new setWheelScrollingEnabled method.

  • Lightweight Support:

    • Lightweight components will deliver mouse wheel events to their first ancestor with a MouseWheelListener.
    • MouseWheelListeners may be added to any JComponent for custom event handling.
    • javax.swing.JScrollPane is modified to properly scroll its viewed component. Like java.awt.ScrollPane, this may be disabled using setWheelScrollingEnabled.
  • New API:

    In addition to the new class and new interface previously mentioned, there are some other changes to the API to support the mouse wheel.

    • Change to java.awt.AWTEvent:
          public final static long MOUSE_WHEEL_EVENT_MASK;
    • Changes to java.awt.AWTEventMulticaster:
          public void mouseWheelMoved(MouseWheelEvent e)

    public static MouseWheelListener add(MouseWheelListener a, MouseWheelListener b)

    public static MouseWheelListener remove(MouseWheelListener l, MouseWheelListener oldl)
    • Changes to java.awt.Component:
          public synchronized void addMouseWheelListener(MouseWheelListener l)

    public synchronized void removeMouseWheelListener(MouseWheelListener l)
    • Changes to java.awt.ScrollPane:
          public void setWheelScrollingEnabled(boolean handleWheel)

    public boolean isWheelScrollingEnabled()
    • Change to java.awt.Robot:
          public synchronized void mouseWheel(int wheelAmt)
  • Linux Mouse Wheel Support:

    For Linux to recognize your mouse wheel, two modifications to the /etc/X11/XF86Config file are required. Under the "Pointer" section:

    • Add the line:

          ZAxisMapping 4 5

    • Change the protocol to: "imps/2" (this will vary depending on your particular wheel mouse).

Programmatic Zooming of Frames

The bugtraq report that corresponds to this change is: 4071554.

Previously there was no way to zoom (or maximize) a Frame programmatically. This feature has been added to this release.

The new interface java.awt.event.WindowStateListener is introduced.

Changes to java.awt.Frame:

    public static final int MAXIMIZED_HORIZ;

    public static final int MAXIMIZED_VERT;

    public static final int MAXIMIZED_BOTH;

    public synchronized void setMaximizedBounds(Rectangle bounds)

    public Rectangle getMaximizedBounds()

    public synchronized void setExtendedState(int state)

    public synchronized int getExtendedState()

Changes to java.awt.event.WindowEvent:

    public static final int WINDOW_STATE_CHANGED;

    public WindowEvent(Window source, int id, Window opposite, int oldState, int newState)

    public WindowEvent(Window source, int id, int oldState, int newState)

    public int getOldState()

    public int getNewState()

Changes to java.awt.AWTEvent:

    public final static long WINDOW_STATE_EVENT_MASK;

Changes to java.awt.Toolkit:

    public boolean isFrameStateSupported(int state) throws HeadlessException

Changes to java.awt.Window:

    public synchronized void addWindowStateListener(WindowStateListener l)

    public synchronized void removeWindowStateListener(WindowStateListener l)

    public synchronized WindowStateListener[] getWindowStateListeners()

    protected void processWindowStateEvent(WindowEvent e)

Change to java.awt.event.WindowAdapter:

    public void windowStateChanged(WindowEvent e)

Changes to java.awt.AWTEventMulticaster:

    public static WindowStateListener add(WindowStateListener a, WindowStateListener b)

    public static WindowStateListener remove(WindowStateListener l, WindowStateListener oldl)

Dynamic Layout During Resize

The bugtraq report that corresponds to this change is: 4077991.

Previously, dynamic window resizing wasn't supported on all platforms. For example, on Windows NT, with solid resize on, resizing a window recalculated the layout only when the drag was finished. This has been fixed in this release with the addition of the new desktop property awt.dynamicLayoutSupported. When dynamic layout is enabled, a Container continually lays out its components as it resizes. If disabled, the layout will be validated after resizing has finished.

API changes to java.awt.Toolkit.

    public void setDynamicLayout(boolean dynamic)

    protected boolean isDynamicLayoutSet()

    public boolean isDynamicLayoutActive()

Access to Component Listener Lists

The bugtraq report that corresponds to this change is: 4290704.

Previously all of the state in an AWT component that could be written could also be read. For example, there are no write-only properties in the component API. Event listeners were a notable exception. AWT event listeners are managed according to the JavaBeans conventions with a pair of methods: addXXXListener and removeXXXListener for a listener that implements the XXXEventListener interface.

No access was provided to the listener lists themselves. The fields that contain the listener lists are package private and no method was provided that returns the contents of a listener list. This has caused some problems for Swing and other AWT clients.

To mitigate the problem in the Java 2 SDK, v1.3 release, we added a getListeners method to Component and to the Swing classes that defined listener lists. The getListeners method uses a class to specify a particular listener list. For example to get all of the listeners added with addFocusListener, one would write: getListeners(FocusListener.class).

This particular approach to exposing listener lists was taken to minimize the overall change to the AWT/Swing public API. It was not intended to be a convention for all JavaBeans and it did not handle PropertyChangeListeners - which can be added to a single property, as in addPropertyChangeListener("myProperty", myListener). For this release, we have designed a more complete solution to accessing event listeners. The two conceptual changes are:

  • The addition of a getFooListeners method to the add/remove convention in AWT and Swing classes.
  • Support for PropertyChangeListeners and VetoableChangeListeners, including those which listen to a single property, using the new java.util.EventListenerProxy class.

There is a new java.awt.event.AWTEventListenerProxy class.

API Changes to java.awt.Toolkit:

    public PropertyChangeListener[] getPropertyChangeListeners()

    public synchronized PropertyChangeListener[] getPropertyChangeListeners(String propertyName)

    public AWTEventListener[] getAWTEventListeners()

    public AWTEventListener[] getAWTEventListeners(long eventMask)

Changes to Drag and Drop

The bugtraq reports that corresponds to this change are: 4407057 and 4426750.

In the Solaris and Linux releases of Java 2 Standard Edition, SDK 1.3, several of the AWT heavyweight Components exhibited default drag behavior via the middle mouse button, even if the application did not identify these Components as DragSources via the java.awt.dnd API. These Components were implemented using Motif peers, and Motif provides middle button drag behavior for these peers by default.

Because of the design of the AWT, and because of bugs in the Motif library, this default behavior has been the source of numerous stability problems. Rather than continue to risk the stability of AWT and Drag & Drop for a niche feature, we have chosen to disable this feature explicitly in our implementations.

Developers can still identify these Components as DragSources in their applications using the java.awt.dnd API. This is both functional and supported. This approach is superior to relying upon default Motif behavior in any case, because it enables drag support for these Components on all platforms, not just Solaris and Linux.

64-Bit Compliance on Solaris Machines

The bugtraq report that corresponds to this change is: 4295833.

64-bit Solaris applications use 64 bits to address memory instead of 32. This allows larger applications by providing a much larger virtual memory space. For this release, AWT has been brought up to 64-bit compliance. For more information, see here.

Inconsistent DLLs Warning

The bugtraq report that corresponds to this change is: 4414004.

If you have installed English VC++ 6.0 onto a machine that also has Asian Windows NT installed, you may encounter strange artifacts when rendering Asian text in the TextArea component. You may also see this problem if you have installed Microsoft Exchange or Microsoft Office 97 onto a machine running Asian Windows NT 4.0. Although this problem was reported on the Japanese version of Windows NT, it will probably occur on other non-Latin versions of NT as well, such as Chinese or Korean.

The problem was caused when the installation of those programs replaced the Asian Riched32.dll with the English version. The problem can be corrected by replacing Riched32.dll with the Asian version.

Removal of the Drawing Surface API

The bugtraq report that corresponds to this change is: 4293646.

The sun.awt.DrawingSurface API has been removed. It was never made public, but some developers have been using it. The functionality has been replaced by the JAWT. For more information, see the AWT Native Interface description.

Window Centering API Required for Multiscreen Support

The bugtraq report that corresponds to this change is: 4463949.

Xinerama-aware applications running on multi-headed systems have caused problems which have resulted in a variety of bug reports. Some multi-headed environments use monitors with little or no borders, which can be butted up against one another such that the resulting effect is one mammoth display. In this case, a "properly" centered window may span multiple screens. Other multi-headed environments use regular CRT monitors, with several inches of packaging between the actual display areas. In this case, a window spanning multiple screens produces a disconcerting effect, especially if the window cannot be dragged onto one monitor or the other (the Solaris login screen, for example). In short there was no way to tell where to center a window in a Xinerama environment.

To address this problem, the X group has added API which allows Xinerama users to specify where they want "centered" windows to be centered, and allows developers of Xinerama-aware applications to code accordingly.

Prior to this release, the way to center a window has been to center it within the bounds of the default GraphicsDevice, like this:

    bounds = getDefaultScreenDevice().getDefaultConfiguration().getBounds();
    frame.setLocation(bounds / 2 - size of window / 2);
This code would center the windows "correctly" on Xinerama systems where windows should be centered to the entire Xinerama coordinate space.

As of this release, post 4356756-fix JDKs will center windows "correctly" on Xinerama systems where windows should be centered within the first display.

To accomplish this, the getCenterPoint method has been added to GraphicsEnvironment .

This method works as follows on various platforms:

  • Microsoft Windows/Macintosh:
    These platforms include all monitors in a single virtual coordinate space. However, there is one "primary" display (on Microsoft Windows the primary display contains the task bar, on the Mac, the menubar). Here, getCenterPoint returns the coordinates of the center of the primary display.
  • X-Window, non-Xinerama
    Each display has its own coordinate system; the upper-left corner of every display is 0.0. Again, there is a "first" display. Here, getCenterPoint returns the center point of the primary display.
  • X-Window, Xinerama
    All monitors share a single virtual coordinate space, as on Microsoft Windows. However, it is possible for the user to specify through X resources where windows should be centered. If these resources are set, getCenterPoint reflects their value. Otherwise, it returns the point at the center of the virtual coordinate space. (In practice, this will almost always be set - CDE sets it by default.)

As of JDK 1.4, the correct code for centering is:

    frame.setLocation(getCenterPoint() - size of window / 2);

The other method added to GraphicsEnvironment is getMaximumWindowBounds. Both getCenterPoint and getMaximumWindowBounds throw a HeadlessException when in Headless mode.

New InputEvent Key Modifiers

The bugtraq reports that corresponds to this change are: 4387938 and 4421515.

Previously, the InputEvent modifiers had the same values for keyboard and mouse buttons. In certain situations there was no way to distinguish which one was pressed or when more than one was held simultaneously. These situations included cases when more than one mouse button was down at the same time, or when a modifier key was used to modify a mouse event.

To address this deficiency, the following constants were added to InputEvent:

  • SHIFT_DOWN_MASK
  • CTRL_DOWN_MASK
  • META_DOWN_MASK
  • ALT_DOWN_MASK
  • ALT_GRAPH_DOWN_MASK
  • BUTTON1_DOWN_MASK
  • BUTTON2_DOWN_MASK
  • BUTTON3_DOWN_MASK

The following methods were added to InputEvent:

  • getModifiersEx
  • getModifiersExText

The class spec for MouseEvent was updated. The following constants were also added to MouseEvent:

  • NOBUTTON
  • BUTTON1
  • BUTTON2
  • BUTTON3

These methods in MouseEvent were added:

  • MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button)
  • getButton
  • getMouseModifiersText

DragSourceDragEvent has the new method getGestureModifiersEx.

Change in Drop Down Behavior for Choice Menus

The bugtraq report that corresponds to this change is: 4462677.

The Choice drop down menu behavior has changed from JDK 1.3.1 to 1.4. In 1.3.1, you could click anywhere on the choice bar and the menu would drop down. In 1.4, you must click on the arrow selector on the right hand side of the Choice bar. Clicking anywhere else on the Choice bar has no effect. Also, the symbol on the Choice bar has changed from a bar to an arrow/bar combination. Finally, if the drop down menu extends outside of the parent, when clicking on that area, the application underneath is brought to the foreground. This happens on Solaris, not Windows.

Choice Component Now Obeys Layout Manager Constraints

The bugtraq report that corresponds to this change is: 4288285.

In releases prior to 1.4, the AWT Choice widget sometimes ignored the size that the layout manager told it to be. As of this release, it now obeys the layout manager constraints.

Deprecated Focus Methods

The bugtraq report that corresponds to this change is: 4476300.

The new focus subsystem, introduced in this release, introduced a new architecture and a new terminology for handling keyboard focus in sophisticated AWT and Swing applications. Prior to this project, many of the focus-related APIs were inconsistent in usage and termonology, were improperly documented, and led to poorly designed UIs. Now that the new architecture is in place, the most egregious of these APIs has been deprecated.

The following constants and methods have been deprecated:

  • javax.swing.FocusManager.FOCUS_MANAGER_CLASS_PROPERTY
  • javax.swing.FocusManager.disableSwingFocusManager()
  • javax.swing.FocusManager.isFocusManagerEnabled()
  • javax.swing.JComponent.requestDefaultFocus()
  • javax.swing.JComponent.isManagingFocus()
  • javax.swing.JComponent.setNextFocusableComponent(Component)
  • javax.swing.JComponent.getNextFocusableComponent()
  • java.awt.Component.isFocusTraversable()
  • java.awt.Component.hasFocus()
  • javax.swing.SwingUtilities.findFocusOwner(Component)
ActionEvents (and Other Events) Need Timestamps

The bugtraq report that corresponds to this change is: 4434193.

The new focus architecture includes a type-ahead mechanism that ensures that subsequent KeyEvents that follow a KeyEvent that initiates a focus transfer are not delivered until the transfer is completed. The design for this feature is based on the UTC timestamps of the various events. Events with timestamps later than that of the initiating event are enqueued pending resolution of the transfer; events with earlier timestamps are not.

To implement this feature, the focus code keeps track of the timestamp of the event currently being handled. If a focus change is initiated during this handling, the timestamp is available for use. However, if the current event does not have a timestamp, then the current system time is used. This time is usually too far ahead of the time that the event actually occurred to be of any real use. As a result, the type-ahead mechanism fails, and KeyEvents are delivered before the focus transfer is completed.

The most common case where we encountered this problem was with ActionEvents. ActionEvents are high-level, semantic events generated in response to underlying InputEvents. While the InputEvents had timestamps associated with them, the ActionEvents did not. The ActionEvent API has therefore been expanded to accomodate a timestamp and the implementation has been updated so that an ActionEvent's timestamp is equal to that of its underlying InputEvent.

The following methods have been added to ActionEvent:

  • ActionEvent(Object source, int id, String command, long when, int modifiers)
  • getWhen

The following ActionEvent methods were modified:

  • ActionEvent(Object source, int id, String command)
  • ActionEvent(Object source, int id, String command, int modifiers)

The getWhen method was added to InvocationEvent.

The InvocationEvent constructors InvocationEvent(Object, Runnable) and InvocationEvent(Object, Runnable, Object, boolean) were modified.

A new constructor InputMethodEvent(Component, int, long, AttributedCharacterIterator, int, TextHitInfo, TextHitInfo) was added to InputMethodEvent, as well as the getWhen method.

The following InputMethodEvent constructors have been modified:

  • InputMethodEvent(Component, int, AttributedCharacterIterator, int, TextHitInfo, TextHitInfo)
  • InputMethodEvent(Component, int, TextHitInfo, TextHitInfo).

Finally, the following methods were added to EventQueue:

  • getMostRecentEventTime
  • getCurrentEvent
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Focus API changes

This document outlines the API changes that have been done to AWT and Swing to accomodate the new focus model. For a general overview of the changes, you may want to first read this.

Modifications to existing classes:

  • java.awt.AWTEvent
  • java.awt.Component
  • java.awt.Container
  • java.awt.Window
  • java.awt.Frame
  • java.awt.Dialog
  • java.awt.FocusEvent
  • java.awt.event.WindowEvent
  • java.awt.event.WindowListener
  • java.awt.event.WindowAdapter
  • java.awt.AWTEventMulticaster
  • javax.swing.FocusManager
  • javax.swing.DefaultFocusManager
  • javax.swing.JComponent
  • javax.swing.JInternalFrame
  • javax.swing.KeyStroke
  • javax.swing.SwingUtilities

New classes:

  • java.awt.KeyboardFocusManager
  • java.awt.KeyEventDispatcher
  • java.awt.DefaultKeyboardFocusManager
  • java.awt.FocusTraversalPolicy
  • java.awt.ContainerOrderFocusTraversalPolicy
  • java.awt.DefaultFocusTraversalPolicy
  • java.awt.AWTKeyStroke
  • java.awt.event.WindowFocusListener
  • javax.swing.SortingFocusTraversalPolicy
  • javax.swing.LayoutFocusTraversalPolicy
  • javax.swing.InternalFrameFocusTraversalPolicy

Add the following to java.awt.AWTEvent:

    public void setSource(Object newSource)

Changes to java.awt.Component:

    public boolean isFocusTraversable()

    public boolean isFocusable()

    public void setFocusable(boolean focusable)

    public void setFocusTraversalKeys(int id, Set keystroke)

    public Set getFocusTraversalKeys(int id)

    public void setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled)

    public boolean getFocusTraversalKeysEnabled()

    public void requestFocus()

    protected boolean requestFocus(boolean temporary)

    public boolean requestFocusInWindow()

    protected boolean requestFocusInWindow(boolean temporary)

    public void transferFocus()

    public void transferFocusBackward()

    public void transferFocusUpCycle()

    public Container getFocusCycleRootAncestor()

    public boolean isFocusCycleRoot(Container container)

    public boolean hasFocus()

    public boolean isFocusOwner()

    public void addPropertyChangeListener(PropertyChangeListener listener)

    public void removePropertyChangeListener(PropertyChangeListener listener)

    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)

    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)

    public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)

    public void firePropertyChange(String propertyName, int oldValue, int newValue)

    public boolean isFontSet()

    public boolean isBackgroundSet()

    public boolean isForegroundSet()

    public boolean isCursorSet()

    public boolean areFocusTraversalKeysSet(int id)

Changes to java.awt.Container:

    public void setFocusTraversalKeys(int id, Set keystroke)

    public Set getFocusTraversalKeys(int id)

    public void setFocusTraversalPolicy(FocusTraversalPolicy policy)

    public FocusTraversalPolicy getFocusTraversalPolicy()

    public void setFocusCycleRoot(boolean focusCycleRoot)

    public boolean isFocusCycleRoot()

    public boolean isFocusCycleRoot(Container container)

    public void transferFocusDownCycle()

    public void addPropertyChangeListener(PropertyChangeListener listener)

    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)

    public boolean areFocusTraversalKeysSet(int id)

    public boolean isFocusTraversalPolicySet()

Changes to java.awt.Window:

    public void toFront()

    public void toBack()

    public Component getFocusOwner()

    public Component getMostRecentFocusOwner()

    public boolean isActive()

    public boolean isFocused()

    public final void setFocusCycleRoot(boolean focusCycleRoot)

    public final boolean isFocusCycleRoot()

    public final Container getFocusCycleRootAncestor()

    public boolean isFocusableWindow()

    public void setFocusableWindowState(boolean focusableWindowState)

    public void addPropertyChangeListener(PropertyChangeListener listener)

    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)

Add the following to the javadoc of java.awt.Frame:

/**
 * Frames are capable of generating the following types of WindowEvents:
 * WindowOpened, WindowClosing, WindowClosed, WindowIconified,
 * WindowDeiconified, WindowActivated, WindowDeactivated, WindowGainedFocus,
 * WindowLostFocus.
 */

Add the following to the javadoc of java.awt.Dialog:

/**
 * Dialogs are capable of generating the following WindowEvents:
 * WindowOpened, WindowClosing, WindowClosed, WindowActivated,
 * WindowDeactivated, WindowGainedFocus, WindowLostFocus.
 */

Add the following to java.awt.event.FocusEvent:

    public FocusEvent(Component source, int id, boolean temporary, Component opposite)

    public Component getOppositeComponent()

Add the following to the javadoc of java.awt.event.WindowEvent:

/**
 * A low-level event that indicates that a window has changed its status. This
 * low-level event is generated by a Window object when it is opened, closed,
 * activated, deactivated, iconified, or deiconified, or when focus is
 * transfered into or out of the Window.
 */

Add the following to java.awt.event.WindowEvent:

    public static final int WINDOW_ACTIVATED

    public static final int WINDOW_DEACTIVATED

    public static final int WINDOW_GAINED_FOCUS

    public static final int WINDOW_LOST_FOCUS

    public WindowEvent(Window source, int id, Window opposite)

    public Window getOppositeWindow()

Add the following to java.awt.event.WindowListener:

    public void windowActivated(WindowEvent e)

    public void windowDeactivated(WindowEvent e)

Add the following to java.awt.event.WindowAdapter:

    public void windowGainedFocus(WindowEvent e)

    public void windowLostFocus(WindowEvent e)

Add the following to java.awt.AWTEventMulticaster:

    public void windowGainedFocus(WindowEvent e)

    public void windowLostFocus(WindowEvent e)

Modifications to javax.swing.FocusManager

This class has been obsoleted. New applications should use java.awt.KeyboardFocusManager exclusively. Nevertheless, we have preserved backward compatibility for existing applications (but not applets) which define their own FocusManager.

The Swing FocusManager has been changed to be a subclass of the new, AWT KeyboardFocusManager. FocusManager.setCurrentManager(FocusManager) and FocusManager.getCurrentManager() have been changed to wrappers around KeyboardFocusManager.setCurrentKeyboardFocusManager(KeyboardFocusManager) and KeyboardFocusManager.getCurrentKeyboardFocusManager(), respectively.

There was much discussion over these changes because KeyboardFocusManager.setCurrentKeyboardFocusManager(KeyboardFocusManager) will throw a SecurityException if the calling thread was not granted the "replaceKeyboardFocusManager" permission. Previously, FocusManager.setCurrentManager(FocusManager) would never throw a SecurityException. Although we were able to design a convoluted class organization which avoided this problem, we felt that the elegance and simplicity of the proposed design outweighed the rather small backward compatibility concern.

disableSwingFocusManager() and isFocusManagerEnabled() should not be used. Disabling the Swing FocusManager now has the semantics of reverting the default FocusTraversalPolicy from the Swing default of javax.swing.LayoutFocusTraversalPolicy to the AWT default of java.awt.DefaultFocusTraversalPolicy.

Modifications to javax.swing.DefaultFocusManager

This class has been obsoleted. New applications should use java.awt.KeyboardFocusManager exclusively. Nevertheless, we have preserved backward compatibility for existing applications (but not applets) which define their own DefaultFocusManager.

If client code installs a legacy DefaultFocusManager, we provide backward compatibility by installing a non-public LegacyGlueFocusTraversalPolicy which routes FocusTraversalPolicy method invocations to the corresponding methods on DefaultFocusManager.

Modifications to javax.swing.JComponent

isManagingFocus: This method has been obsoleted. It changed a JComponent's focus traversal keys from TAB and SHIFT-TAB to CTRL-TAB and CTRL-SHIFT-TAB. It also marked the JComponent in such a way that focus traversal would not automatically enter the JComponent. This was similar to, but different from, marking a JComponent as a focus cycle root. Its functionality is superseded by the FocusTraversalPolicy class, per-Component focus traversal keys, and the ability to disable a Component's focus traversal keys en masse.

setNextFocusableComponent/getNextFocusableComponents: These methods have been obsoleted FocusTraversalPolicies are more reliable because they allow an algorithmic expression of focus traversal. These methods force applications to hard-code focus traversal Component by Component.

The spec for setRequestFocusEnabled/isRequestFocusEnabled has changed, such that the requestFocusEnabled property is now a hint to the current look and feel.

requestDefaultFocus: This method has been obsoleted. Its functionality is superseded by FocusTraversalPolicy.getDefaultComponent(Container).requestFocus().

Modifications to javax.swing.JInternalFrame

getMostRecentFocusOwner: Like java.awt.Window, JInternalFrame has a getFocusOwner() method left over from before centralization of focus management in java.awt.KeyboardFocusManager. To round out the API, and to remain consistent with Window, getMostRecentFocusOwner() has been added to JInternalFrame with the same specification as the corresponding method on Window.

setFocusCycleRoot/isFocusCycleRoot: These methods give JInternalFrames similar semantics to top-level Windows in AWT. Since a JInternalFrame must always be a focus cycle root, these methods are overridden and declared final to enforce that restriction. However, unlike an AWT Window, a JInternalFrame can have a focus-cycle-root ancestor, such as a JDesktopPane. Thus, Component.getFocusCycleRootAncestor() is not declared final in JInternalFrame as it is in Window.

Modifications to javax.swing.KeyStroke

Because the existing KeyStroke class was useful for designing per-Component focus traversal key APIs, this class was promoted with minor modifications to AWT as java.awt.AWTKeyStroke. The Swing class is now a subclass of the AWT class.

The one deprecated method in KeyStroke, getKeyStroke(char, boolean), was not promoted to AWT. Because of this, there is no simple way for this method to participate in the standard AWTKeyStroke caching scheme. The specification of this method has been changed to note that implementations need not cache the instances returned by this method.

Modifications to javax.swing.SwingUtilities

findFocusOwner: This method has been obsoleted. Its functionality is superseded by KeyboardFocusManager.getFocusOwner().

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT Enhancements

Documentation Contents

AWT Enhancements in the Java SE 5.0

Major Changes
Window Bugfixes and Enhancements
DnD and Data Transfer Bugfixes and Enhancements
Layout Bugfixes
Miscellaneous Bugfixes
Known Bugs and Issues

Major Changes

4615479: XToolkit on Solaris and Linux

In this release, AWT has been reimplemented on the Solaris and Linux platforms. It is possible to force the Motif toolkit on Linux or XAWT on Solaris. This is done either by setting the AWT_TOOLKIT variable or using the -Dawt.toolkit command line parameter. The value for XAWT is sun.awt.X11.XToolkit and the value for Motif is sun.awt.motif.MToolkit. For more information, see the XToolkit on Solaris/Linux note.

4638443: XDnD Support

As of this release, the XDnD Protocol support has been implemented as part of the data transfer system. Prior to this release, only the Motif DnD protocol was supported on X11.

4009555: Obtaining the mouse location on the desktop

API has been added to obtain the mouse location on the desktop. The new PointerInfo class describes the pointer coordinates and the associated GraphicsDevice object at the moment the PointerInfo instance is created. PointerInfo has the following methods:
  • GraphicsDevice getDevice()
  • Point getLocation()

The new MouseInfo class has information about the current location of the mouse pointer. MouseInfo has two methods:

  • PointerInfo getPointerInfo()
  • int getNumberOfButtons

Other new methods:

java.awt.Component.getMousePosition()
java.awt.Container.getMousePosition(boolean)
java.awt.Toolkit.getMouseInfoPeer

Window Bugfixes and Enhancements

4632143: Window, Frame or Dialog Always on Top

New API has been added to ensure that a particular Window, Frame or Dialog is always on top of the desktop. This is useful when implementing certain GUI elements, such as tool boxes, notification or information applets, and other desktop-enhancing features. The new and modified API includes:
  • isAlwaysOnTop()
  • setAlwaysOnTop(boolean)
  • addPropertyChangeListener(PropertyChangeListener)
  • addPropertyChangeListener(String, PropertyChangeListener) The addXXX methods have been modified to support setting a property change listener on the window's alwaysOnTop state.
  • java.awt.Permission The new setWindowAlwaysOnTop permission has been added.

Depending on the system setup, always-on-top Windows, Frames or Dialogs may not be supported. They are supported on Microsoft Windows, Linux and Solaris running GNOME2/Metacity, as well as Linux running KDE/kwin. They are not supported on Solaris running CDE/dtwm. It is possible that always-on-top windows do not work on Linux or Solaris running session and window managers other than those mentioned above.

4102292: New API to Specify Default Window Location by Platform

Two new methods and one new property allow the user to specify the default location for a new Window, appropriate to the platform. This is especially important for X11. The new api includes:
  • Window.setLocationByPlatform(boolean)
  • Window.isLocationByPlatform
  • Window.isLocationByPlatform (a property)
Note that the locationByPlatform property must be set to true for the underlying window manager to tile the window according to its own logic. Otherwise, AWT won't know whether the window was put at 0,0 intentionally or was just unspecified and the window will be placed at the upper-left-hand corner of the screen.

4101435: Window/Dialog/Frame.setLocation doesn't always work as expected

The location and size of Windows, Dialogs and Frames, is under the control of the desktop's window management system, not the application or the toolkit. The window manager is free to ignore or modify a window placement request. Therefore, when calling Window.setLocation(x, y), you can't rely on the Window being moved to location (x, y). The same situation exists for Window.setSize and Window.setBounds. The Window documentation has been clarified to explain this.

4401846: New _JAVA_AWT_WM_STATIC_GRAVITY Environment Variable

Certain window managers position AWT windows incorrectly. For example, a window that is requested to be moved to (0,0) will, under some window managers, be positioned so that the window's title and left border are off-screen. This is because there are two schools of window managers that disagree on the interpretation of the ICCCM specification for the ConfigureRequest requests that X11 programs make to position their windows.

To address this issue, the _JAVA_AWT_VM_STATIC_GRAVITY environment variable has been added so that a power user can indicate that his window manager implements the StaticGravity behavior.

DnD and Data Transfer Bugfixes and Enhancements

4378091: New DropTarget.getTransferable method

The new java.awt.dnd.DropTargetDragEvent.getTransferable method enables the drop target to access transfer data during a drag operation.

This also fixes bug 4248542: DropTargetListener can't access the transferable in dragOver and dragEnter.

4259272: Notification of Clipboard contents changes is now supported

Previously, the Java clipboard API didn't allow an efficient way to track changes to the set of DataFlavors available on the clipboard or notify interested parties about those changes. API has been added for this purpose:
  • addFlavorListener(FlavorListener)
  • removeFlavorListener(FlavorListener)
  • getFlavorListeners()

4287795: New methods for querying information in a Clipboard

Three new methods have been added:
  • DataFlavor[] getAvailableDataFlavors() returns the DataFlavors currently available on the clipboard.
  • boolean isDataFlavorAvailable(DataFlavor) returns true if the specified data flavor is available.
  • Object getData(DataFlavor) returns the data in the specified data flavor.

4790833: Memory Usage No Longer Shoots Up using Clipboard.getContents

Prior to this release, Clipboard.getContents fetched clipboard data in all provided formats for which a mapping to the corresponding data flavor in the default flavor map exists. If there were a lot of formats and the data were large, a lot of memory was consumed with the fetched data in different formats. Thanks to the new methods introduced with bug fix 4287795, this problem has been fixed.

4415175: New API to Globally Change the DnD Gesture Motion Threshold

The drag motion gesture threshold represents the number of pixels the cursor is dragged before the data transfer system initiates a drag operation. Prior to this release, this was hard-coded to 5 pixels. As of release 5.0, there is support for picking up the desktop properties for drag sensitivity and mapping it to the threshold, and new API that allows users to get and change this threshold. The new API includes:
  • java.awt.dnd.DragSource.getDragThreshold()
  • java.awt.dnd.drag.threshold (a property)
  • java.awt.dnd.MouseDragGestureRecognizer (updated class spec)

4712068: DnD Usability Issue for Dragging Text

Prior to this release, the hotspot of the drop icons used on X platforms was located at the middle of the icon. When dragging text, the text cursor moves to indicate the current drop location, but this was obscurbed by the drop icon itself. For this release, the drop cursors used on X platforms have been changed to point to the upper-left corner of the drop icon. The corresponding hotspots have been changed accordingly.

4191708: Clarification in spec for several java.awt.dnd.DropTarget methods

The doc has been clarified with respect to passing in a null parameter for the following java.awt.dnd.DropTarget methods:
  • dragEnter(DropTargetDragEvent)
  • dragOver(DropTargetDragEvent)
  • dropActionChanged(DropTargetDragEvent)
  • drop(DropTargetDropEvent)
  • dragExit(DropTargetEvent)

4819437: DragSourceListener.dragExit is now called in a consistent way

The class specification for the DragSourceAdapter and DragSourceAdapter classes, and the documentation for the DragSourceAdapter.dragExit and DragSourceListener.dragExit methods have been updated to clarify the notion that the drop site is associated with the previous call to dragEnter.

4654688: SystemFlavorMap Methods Now Consistent with Documentation

The SystemFlavorMap class is used to store mappings between native formats and Java data flavors in order to support data transfer between native and Java applications. The documentation for the SystemFlavorMap.getNativesForFlavor(DataFlavor) method has been clarified to say that a DataFlavor (or a native format) is known if and only if it has at least one static mapping associated with it.

4123385: Documentation Clarification for Drag Source Events Constructors Constructors

The documentation has been clarified with respect to passing in invalid parameters for the following constructors of drag source events:
  • DragSourceDragEvent(DragSourceContext, int int, int)
  • DragSourceDragEvent(DragSourceContext, int int, int, int, int)
  • DragSourceDropEvent(DragSourceContext)
  • DragSourceDropEvent(DragSourceContext, int, boolean)
  • DragSourceDropEvent(DragSourceContext, int, boolean, int, int)

Layout Bugfixes

GridBagLayout Bugfixes

GridBagLayout: Several bugfixes have been implemented for GridBagLayout. Note that two of these bugs listed apply to the documentation only. The most significant bugfixes include:

4254022: More than 512 horizontal or vertical components are now possible in a GridBagLayout

Previously, GridBagLayout had been implemented with a hard-coded width and height limit of 512. This is now allocated dynamically and the MAXGRIDSIZE constant is no longer used.

4532201: GridBagLayout.lookupConstraints doc is clarified

Documentation was added to clarify what happens when the specified Component is not in the grid bag layout.

4618355: Doc for GridBagLayout.gridwidth/gridheight is clarified

The class spec for GridBagLayout.gridwidth/gridheight was confusing in its description of REMAINDER and RELATIVE. This has been corrected.

FlowLayout Bugfixes

FlowLayout: Several documentation bugs have been fixed for FlowLayout

4586806: FlowLayout spec is corrected regarding alignment

Previously, the class spec stated that components are centered on the line. Actually, the align property determines how the components are laid out. The doc has been corrected.

4881919: FlowLayout class spec no longer implies that components are always left to right

The FlowLayout class spec was written before the ability to go right to left was added. Therefore it assumed that left to right was the only possible orientation. The doc has been corrected.

4587456: Corrected spec for FlowLayout constructor

Previously, the doc for the FlowLayout constructor neglected to mention that the hgap and vap were applied to the spacing between the components and the container border as well as between the components. The documentation has been corrected.

4172932: New methods to get constraints for children in BorderLayout

Three public methods have been added to BorderLayout, one to get the constraints for a component, and two different ways to get the component for a given constraint (one takes component orientation into account and the other doesn't). The new methods are:
  • Component getLayoutComponent(Object)
  • Component getLayoutComponent(Container, Object)
  • Object getConstraints(Component)

4515041: Clarified spec for GridLayout.layoutContainer regarding vgap and hgap params

Previously, the spec for layoutContainer stated that the vgap and hgap was added between each cell and between the first/last cell and the border. In reality, the gaps are applied between the components only. This has been corrected in the doc.

Miscellaneous Bugfixes

4533021: New API to Change the Z-ordering of Children

New API has been added to specify the z-ordering of children in a Container. The two new Container methods include:
  • getComponentZOrder(Component, int)
  • setComponentZOrder(Component, int)

4370733: AWTKeyStroke.getAWTKeyStroke(String) and toString are now symmetric

Previously it was not possible to take the output from AWTKeyStroke.toString and pass it to the getAWTKeyStroke method. This has been changed so the methods

4341785: Clarify spec for several List methods

The spec for the following List methods has been clarified to state that unspecified behavior results when the range is out of bounds:
  • deselect(int)
  • setMultipleMode(boolean)
  • select(int)

4368570: Clarify List spec regarding behavior of clicking on a selected item

Previously, the class spec for List stated that clicking on an unselected item selects it and clicking on a selected item de-selects it. This is true only if the list is in multiple-selection mode. In single-selection mode, any click on a list's item selects the clicked item. The spec has been clarified.

4082708: Clarified spec for the ContainerEvent.getContainer method

The ContainerEvent.getContainer method assumes that source is of type Container. Previously, it casted the source to type Container without first checking which could result in ClassCastException. The method has been changed to return a value of null if the source isn't a Container.

4620715: New KeyEvent codes for two standard Microsoft Windows keys.

Two keys on a standard Microsoft Windows keyboard don't have Java keycodes: the windows key and the context menu key. This impedes the ability to meet 508 requirements. Therefore, the java.awt.event.KeyEvent.VK_WINDOWS and java.awt.event.KeyEvent.VK_CONTEXT_MENU keycodes have been added.

4829063: Scrollbar now specifies that Scrollbar thumb may not be visible

Previously, the doc for Scrollbar.getVisibleAmount and setVisibleAmount did not say that sometimes the thumb might not be visible or accurately describe what the scrollbar's range is used for. The specification has been cleaned up. This is a doc-only change.

4840172: Behavior of KeyEvent.getKeyChar is clarified

Use of KeyEvent.getKeyChar is explained in the KeyEvent class documentation, but the doc for the method itself was brief. The doc for getKeyChar has been improved for this release.

4233061: Clarify spec that ENTER doesn't fire an ActionEvent

There is confusion among some developers that when the focus is on a Button, pressing the ENTER key doesn't fire an ActionEvent. This is correct behavior. The SPACE bar fires an ActionEvent. The ActionEvent class specification was updated to clarify this fact.

4221123: New FileDialog constructors

Three new FileDialog constructors have been added that can specify a Dialog as the owner:
  • FileDialog(Dialog)
  • FileDialog(Dialog, String)
  • FileDialog(Dialog, String, int)

4691481: Updated spec for Robot.createScreenCapture

Previously, the documentation for Robot.createScreenCapture didn't mention that the mouse cursor is not included in the captured image. This has always been true of Solaris, Linux, Windows and Mac OS X. The documentation has been updated to reflect this information.

4704042: New method for setting Insets

A single method to set Insets has been added: set(int, int, int, int).

4492739: Clarify InputEvent.ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK doc

There is an overlap in the values for some of the InputEvent constants. This is confusing because when calling KeyEvent.getModifiersExText(int) and MouseEvent.getMouseEventModifiersText(int) the string returned for KeyEvent.BUTTON2_MASK is "Alt" and the string returned for KeyEvent.BUTTON3_MASK is "Meta". For this release, documentation was added to the InputEvent, KeyEvent and MouseEvent classes to clarify this.

Known Bugs and Issues

Here is a list of known problems you may encounter in release 5.0.

Metacity versioning

We recommend using the latest build of Metacity (which is currently 2.6.2). There were some bugs that occurred with versions prior to 2.4.34 (problems with programmatic iconification, and non-resizable frames, for example) that have since been fixed.

5051557: Applet focus incompatibility

We have received reports that, in some applets, pressing a key on the keyboard doesn't have the expected result. This usually happens because the applet doesn't get the focus automatically when there are no child components in the applet. To ensure that such an applet works across all platforms, it is recommended that you request the focus at startup (via requestFocus) and on mouse press. If you don't want the focus, call setFocusable(false).

5050387: JVM may crash when JOptionPane is invoked from drop()

On Solaris/Linus running MToolKit, displaying a JOptionpane from the drop method may cause the JVM to crash. This bug will be addressed in a future release.

Focus bugs when running applets

There were focus-related bugs noticeable when running applets in Mozilla in release 1.4.2 and earlier. This includes:
  • 4907493: Input focus not working with multiple applets
  • 4902616: The characters of a text field can't delete when doing Java Plug-in test
  • 4877530: Unable to input text into JTextField in 1.4.1_02
  • 4806274: The requestFocus method doesn't bring focus to the component on Netscape 7 on Solaris
  • 4816394: Can't input anything to SpreadSheet
  • 4837794: Can't input charact to login AnswerCenter with Java applet
  • 4902609: Tab key can't work when doing Java test case
To solve this problem, the client side of the XEmbed protocol was implemented:
  • 4849238: Add XEmbed support to AWT
  • 4907325: XEmbed should be implemented for the Motif toolkit
However, the browser should support the server side of XEmbed in order for it to work. We recommend using the following browsers with Java:
  • On Linux, Mozilla community edition at least version 1.5 or higher.
  • On Solaris, Sun Mozilla at least version 1.4 or higher.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


XToolkit on Solaris/Linux

Starting with Java SE 5.0, AWT has been re-implemented on the Solaris and Linux platforms. The new Toolkit implementation provides the following advantages:
  • Removes the dependency on Motif and Xt libraries.
  • Interoperates better with other GUI Toolkits.
  • Provides better performance and quality.

The new Toolkit (XToolkit) is default both on Linux and Solaris.

Explicitly Setting the Toolkit

You can explicitly set the toolkit for an applet or application using an environment variable or a system property. Keep in mind that the environment variable overrides the system property.

  • Setting the toolkit for an application:
    • Using an environment variable. This needs to be set before starting the VM.
       csh:
 setenv AWT_TOOLKIT XToolkit #selects the XToolkit
 setenv AWT_TOOLKIT MToolkit #selects the MToolkit

 ksh/bash:
 export AWT_TOOLKIT=XToolkit
 export AWT_TOOLKIT=MToolkit
    • Using a system property on the command line:
       java -Dawt.toolkit=sun.awt.X11.XToolkit MyApp
 java -Dawt.toolkit=sun.awt.motif.MToolkit MyApp
  • Setting the toolkit for an applet:
    • Using an environment variable.

      If the browser is started from a terminal window, the environment variable must be set in the terminal window before launching the browser. If the browser is launched from a desktop icon or menu, the toolkit for an applet cannot be set using an environment variable. The Java Plug-in Control Panel should be used instead.

    • Using the Plug-in Control Panel:
      • Launch the Java Plug-in Control Panel:
        $java_home/bin/ControlPanel
      • Add the system property to the Java Runtime Parameters field under the Advanced tab.
        -Dawt.toolkit=sun.awt.X11.XToolkit
-Dawt.toolkit=sun.awt.motif.MToolkit
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements to the JavaBeans API in Java SE 6.0

Documentation Contents

Enhancements to the JavaBeans Component API in Java SE 6.0

java.beans

Major Features
Fixed Bugs

Major Features

The @ConstructorProperties annotation

The @ConstructorProperties annotation was introduced in Java SE 6.0 to show how the parameters of annotated constructor correspond to an object's properties. Previously, the constructor DefaultPersistenceDelegate(String[] constructorPropertyNames) was used for the same goal, but was not an appropriate approach for library classes.

Technically, an annotation is used for copying beans with read-only properties. In the following code example the Food properties are read-only.

public class Food {
     private final int varieties;
     private final String country;

     @ConstructorProperties({"varieties", "country"})
     public Point(int varieties, String country) {
         this.varieties = varieties;
         this.country = country;
     }
     public int getVarieties() {
         return this.varieties;
     }
     public String getCountry() {
         return this.country;
     }
}

To create a vegetable object with the same properties that the fruit object has, use the following code:

Food fruit = new Food (5, "Argentina");
Food vegetable = new Food (fruit.getVarieties(), fruit.getCountry());
Defining the annotation accomplishes two goals:
  • Eliminates the need for the developer to explicitly use the DefaultPersistenceDelegate class.
  • Describes the relationship between a constructor parameter and a property, but not an operational logic, therefore the annotation can be applied to both bean related areas, such as Long Term Persistence, and to non-beans related areas, such JMX.

Fixed Bugs

The EventHandler class

6179222: Possible a NullPointerException error with the EventHandler class

The NPR exception was thrown by the EventHandler class. The create method of the EventHandler class checks the null value, and javadoc is corrected accordingly.

6204552: The EventHandler documentation and exception handling problems

Documentation on the EventHandler class of the eventPropertyName argument did not clearly explain waht the argument supports. Information about what the eventProperName property is capable of is included in the documentation for the create method.

6210265: The EventHandler class should not cache the Method object

The method search is improved, and the method is prevented from being cached in the EventHandler class field.

6271692: The target property of the EventHandler class did support same syntax as the event property

The target property syntax is fixed and now supports an arbitrary number of methods or properties. This was accomplished by separating each property or method with a ".".

The XMLEncoder class

The following fixes were performed to improve the long-term persistence process.

6245149: The java.beans.XMLEncoder class does not encode java.net.URI objects

The Statement class could not access a member of the java.net.URI class with modifiers private. In JDK 6.0 an appropriate PersistenceDelegate is provided to solve this problem.

4921212: The XMLEncoder class does not encode null entries in HashMap objects

A null Key entry of the HashMap object was not included into the XML output. The fix includes a null Key entry to the XML file.

6256805: The XMLEncoder class emits invalid XML

The XMLEncoder class produces an XML output only for valid XML characters. A new code attribute was introduced for a character element. The code contains a hexadecimal value if it starts with "#". Otherwise it contains a decimal value.

5015403: The XMLEncoder class does not encode enumerations correctly

The XMLEncoder class was not serializing an enumeration correctly. The EnumPersistenceDelegate class, a new persistence delegate, was introduced to support the serialization of enum classes.

4741757: The XMLEncoder class ignores persistence delegates when used with Java Web Start

A DefaultPersistenceDelegate class for some classes was created improperly. As a result the hack that adds field access for properties and breaking JavaBeans specification was detected. The performed fix removes the hack that was intended for the following classes: java.awt.Dimension, java.awt.Point, and java.awt.Rectangle.

6338070: The XMLDecoder class ignores statements made to owner unless the read() method is called

Initially the XMLDecoder class was created with lazy initialization. The fix enables parsing in the close() method if a file is not parsed by the readObject() method.

6341798: The XMLDecoder class fails when using Turkish Locale

The XMLDecoder class did not function correctly when reading an English XML file on a machine with the locale set to Turkish. To fix this bug the toLowerCase and toUpperCase methods are invoked in the English locale.

6437265: Some Component object is missing during xml serializing

Container objects were not serialized. The fix adds special behavior to the persistence delegate for containers with BorderLayout.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JavaBeans

Documentation Contents

JavaBeans Component API

The JavaBeans component API extends the Java platform's Write Once, Run Anywhere capability to reusable component development. In fact, the JavaBeans architecture takes interoperability a major step forward — your code runs on every OS and also within any application environment. A developer who creates components based on the JavaBeans architecture (beans) secures a future in the emerging network software market without losing customers that use proprietary platforms, because beans interoperate with ActiveX, OpenDoc, and LiveConnect. Long-term persistence for JavaBeans enables you to read and write a bean as a textual representation of its property values.

API Specification

  • API Reference
  • BeanContext Specification ( PDF | PS)
    Extensible Runtime Containment and Services Protocol for JavaBeans
  • JavaBeans Specification (PDF and PS)

Tutorials and Programmer's Guides

  • JavaBeans Tutorial

API Enhancements

  • API Enhancements in Java SE 6.0
  • API Enhancements in Java SE 5.0
  • API Enhancements in Java SE 1.4

More Information

  • The JavaBeans Home Page
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JavaBeans API

  • java.beans - Contains classes related to developing beans — components based on the JavaBeans architecture.
  • java.beans.beancontext - Provides classes and interfaces relating to bean context.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JavaBeans API Enhancements in Java SE 5.0

Documentation Contents

API Enhancements to the JavaBeans Component API in Java SE 5.0

This document describes changes to the java.beans package that were introduced in Java SE 5.0:
  • Support for IndexedPropertyChangeEvent
  • New Method for Creating a PropertyEditor
  • Public Constructors for PropertyEditorSupport

Support for IndexedPropertyChangeEvent

The bugtraq report that corresponds to this change is: 4353056

A new subclass of PropertyChangeEvent named IndexedPropertyChangeEvent has been added to support bound properties that use an index to identify the part of the bean that changed. Also, three methods, all named fireIndexedPropertyChange, have been added to the PropertyChangeSupport utility class to support firing indexed property change events. You can find an example of using indexed property change events in IndexedTest.java.

New Method for Creating a PropertyEditor

The bugtraq report that corresponds to this change is: 4274639

A new method called createPropertyEditor has been added to the PropertyDescriptor class.

Public Constructors for PropertyEditorSupport

The bugtraq report that corresponds to this change is: 4305280

The two PropertyEditorSupport constructors are now public instead of protected, so that PropertyEditorSupport objects can be more easily created and used as delegates. Also, the source object is now exposed by means of new setSource and getSource methods.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


V1.4 JavaBeans API Enhancements

Documentation Contents

API Enhancements to the JavaBeans Component API in v1.4

This document describes changes to the java.beans package that were introduced in Java SE 1.4:

  • New API for Long-Term Persistence
  • Other API Additions
  • Changes to the Introspector
  • Garbage Collection and Custom Attributes

New API for Long-Term Persistence

To support long-term persistence, the following classes were added:

Class | Description
Statement | An object that represents a method call, possibly with arguments, upon an object. For example: a.setFoo(b).
Expression | A statement that returns a result. For example: a.getFoo().
XMLDecoder | Reads XML documents that were created using XMLEncoder.
Encoder | Uses persistence delegates to break an object graph down into a series of Statements and Expressions that can be used to recreate it.
XMLEncoder | An Encoder that produces statements and expressions in an XML encoding.
PersistenceDelegate | An abstract class that defines objects that can express the state of another object using the public methods of that object's class.
DefaultPersistenceDelegate | The persistence delegate used, by default, for beans.

See JavaBeans Component API for links to where you can find more information about long-term persistence.

Other API Additions

The following classes were also added in v1.4:

Class | Description
EventHandler | Provides support for dynamically generating event listeners that have a small footprint and can be saved automatically by the persistence scheme.
ExceptionListener | Defines a listener to be notified when a exception was thrown but then recovered from. You can register an exception listener on an XMLEncoder or XMLDecoder object to be notified when the object encounters a recoverable problem while writing or reading a bean.
PropertyChangeListenerProxy | A proxy that implements PropertyChangeListener and serves to group another PropertyChangeListener (the real event handler) with a specific property; the proxy forwards property change events to the real event handler.
VetoableChangeListenerProxy | A proxy that implements VetoableChangeListener and serves to group another VetoableChangeListener (the real event handler) with a specific constrained property; the proxy forwards vetoable property change events to the real event handler.

The following classes have additional methods:

  • The PropertyChangeSupport class now contains a no-argument method to get all the registered property change listeners: getPropertyChangeListeners.
  • Similarly, the VetoableChangeSupport class now contains a no-argument method to get all the registered vetoable change listeners: getVetoableChangeListeners.

Changes to the Introspector

The Introspector class has been reimplemented, and its performance has improved. The new implementation has caused the following changes in the behavior of the introspector:
  • FeatureDescriptors are now shared on a per-BeanInfo basis, rather than copied when the BeanInfo is returned. This change improves the performance of the getBeanInfo method. It also means that when an attribute/value in a FeatureDescriptor changes, that change is persistent among getBeanInfo invocations as long as the BeanInfo is not garbage collected. (Garbage collection of BeanInfos is described in Garbage Collection and Custom Attributes.)
  • The getBeanInfo methods no longer create a copy of the requested BeanInfo. Instead, they cache the BeanInfo and return it. If necessary, you can get the old behavior by storing a reference to the returned BeanInfo and using the flushFromCaches method to flush the bean's class from the introspector's cache.
  • If the instantiate method can't instantiate a particular class using the sibling or bootstrap class loader, it now tries to load the class using the current thread's class loader.

Garbage Collection and Custom Attributes

As of v 1.4, a BeanInfo can be garbage collected when no direct references to it exist and the system is low on memory. This is implemented in the Introspector by wrapping BeanInfos in SoftReferences.

The possibility of garbage collection affects how you store custom attributes inside BeanInfos. If a particular BeanInfo is garbage collected, then the next time you invoke Introspector.getBeanInfo to get the BeanInfo, the returned object won't contain any custom attributes.

To avoid this problem, if you store custom attributes inside a BeanInfo you must ensure that the BeanInfo is correctly initialized with those attributes every time you retrieve the BeanInfo. The following is an example of initializing a BeanInfo class with a custom property in the bean descriptor. The code would be similar for a custom attribute in a property descriptor, method descriptor, or event set descriptor.

BeanInfo beanInfo = getBeanInfo(SomeBean.class);
BeanDescriptor beanDescriptor = beanInfo.getBeanDescriptor();

/*
 * Before using the BeanInfo, check to see if our custom
 * property has been initialized.  (Even if we initialized
 * it before, if the BeanInfo has been garbage collected,
 * then we need to initialize it again.)  Since our custom
 * property's value could be null, we define another property
 * to tell us if the custom property is initialized.
 */
if (beanDescriptor.getValue("myProperty_init") == null) {
    beanDescriptor.setValue("myProperty", someValue);
    beanDescriptor.setValue("myProperty_init", Boolean.TRUE);
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Extensible Runtime Containment and Server Protocol for JavaBeans Version 1.0

Documentation Contents

Extensible Runtime Containment and Server Protocol for JavaBeans

Version 1.0

Laurence Cable

Contents | Previous | Next

Extensible Runtime Containment and Server Protocol for JavaBeans Version 1.0

2.0 API Specification

3.0 Overloading java.beans.instantiate() static method

4.0 Providing better support for Beans that are also Applets

5.0 Standard/Suggested Conventions for BeanContext Services

6.0 Support classes

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Extensible Runtime Containment and Services Protocol for JavaBeans Version 1.0

1.0 Introduction.

Currently the JavaBeans specification (Version 1.0) contains neither conventions describing a hierarchy or logical structure of JavaBeans, nor conventions for those JavaBeans to rendezvous with, or obtain arbitrary services or facilities from, the execution environment within which the JavaBean was instantiated.

It is desirable to both provide a logical, traversable, hierarchy of JavaBeans, and further to provide a general mechanism whereby an object instantiating an arbitrary JavaBean can offer that JavaBean a variety of services, or interpose itself between the underlying system service and the JavaBean, in a conventional fashion.

In other component models there exists the concept of a relationship between a Component and its environment, or Container, wherein a newly instantiated Component is provided with a reference to its Container or Embedding Context.

The Container, or Embedding Context not only establishes the hierarchy or logical structure, but its also acts as a service provider that Components may interrogate in order to determine, and subsequently employ, the services provided by their Context.

This proposal defines such a protocol that supports extensible mechanisms that:

  • Introduce an abstraction for the environment, or context, in which a JavaBean logically functions during its lifecycle, that is a hierarchy or structure of JavaBeans.
  • Enable the dynamic addition of arbitrary services to a JavaBean’s environment.
  • Provide a single service discovery mechanism through which JavaBeans may interrogate their environment in order both to ascertain the availability of particular services and to subsequently employ those services.
  • Provide a simple mechanism to propagate an Environment to a JavaBean.
  • Provide better support for JavaBeans that are also Applets.
graphic representation of previous list points

2.0 API Specification

2.1 interface java.beans.beancontext.BeanContext

The hierarchal structure and general facilities of a BeanContext are provided for as follows:

public interface                java.beans.beancontext.BeanContext
           extends              java.beans.beancontext.BeanContextChild,
                      java.util.Collection,
                         java.beans.DesignMode,
                         java.beans.Visibility {

        Object instantiateChild(String beanName)
                  throws IOException, ClassNotFoundException;

        public InputStream
                getResourceAsStream(String           name,
                                    BeanContextChild requestor
                );

        public java.net.URL
                getResource(String           name,
                            BeanContextChild requestor
                );

        void addBeanContextMembershipListener(
                   BeanContextMembershipListener bcml
          );

        void removeBeanContextMembershipListener{
                    BeanContextMembershipListener bcml
        );

        public static final Object globalHierarchyLock;
}

Notifications of changes in the membership of a BeanContext are modeled as follows:

public interface BeanContextMembershipListener
          extends   java.util.Listener {
        void childrenAdded(BeanContextMembershipEvent   bcme);
        void childrenRemoved(BeanContextMembershipEvent bcme);
}

The base class of all BeanContext related Events is defined by:

public abstract class BeanContextEvent
          extends  java.util.EventObject {
        public BeanContext getBeanContext();

        public synchronized void
                setPropagatedFrom(BeanContext bc);

        public synchronized BeanContext getPropagatedFrom();

        public synchronized boolean isPropagated()
}

The BeanContextMembershipEvent is defined as:

public class BeanContextMembershipEvent
          extends BeanContextEvent {

        public BeanContextMembershipEvent(BeanContext bc,
                                          Object[]    deltas);

        public BeanContextMembershipEvent(BeanContext bc,
                                          Collection     deltas);

        public int size();

        public boolean contains(Object child);

        public Object[] toArray();

        public Iterator iterator();
}

2.1.1 The BeanContext as a participant in nested structure

One of the roles of the BeanContext is to introduce the notion of a hierarchical nesting or structure of BeanContext and JavaBean instances. In order to model this structure the BeanContext must expose API that defines the relationships in the structure or hierarchy.

The BeanContext exposes its superstructure through implementation of the java.beans.beancontext.BeanContextChild interface (as described later). This interface allows the discovery and manipulation of a BeanContext’s nesting BeanContext, and thus introduces a facility to create a hierarchy of BeanContexts.

The BeanContext exposes its substructure through a number of interface methods modeled by the java.util.Collection interface semantics

BeanContexts are required to implement all the mandatory Collection API’s, with the following particular semantics for add() and remove():.

The add() method may be invoked in order to nest a new Object, BeanContextChild, or BeanContext within the target BeanContext. A conformant add() implementation is required to adhere to the following semantics:

  • Synchronize on the BeanContext.globalHierarchyLock.
  • Each child object shall appear only once in the set of children for a given BeanContext. If the instance is already a member of the BeanContext then the method shall return False.
  • Each valid child shall be added to the set of children of a given source BeanContext, and thus shall appear in the set of children, obtained through either the toArray(), or iterator() methods, until such time as that child is deleted from the nesting BeanContext via an invocation of remove(), removeAll(), retainAll(), or clear()
  • As the child is added to the set of nested children, and where that child implements the java.beans.beancontext.BeanContextChild interface (or BeanContextProxy, see later for details), the BeanContext shall invoke the setBeanContext() method upon that child, with a reference to itself. Upon invocation, a child may, if it is for some reason unable or unprepared to function in that BeanContext, throw a PropertyVetoException to notify the nesting BeanContext. If the child throws such an exception the BeanContext shall revoke the addition of the child (and any other partial changes made to the state of the BeanContext as a side effect of this addition operation) to the set of nested children and throw an IllegalStateException.
  • JavaBeans that implement the java.beans.Visibility interface shall be notified via the appropriate method, either dontUseGui() or okToUseGui(), of their current ability to render GUI as defined the policy of the BeanContext.
  • If the newly added child implements BeanContextChild, the BeanContext shall register itself with the child on both its VetoableChangeListener and PropertyChangeListener interfaces to monitor, at least, that BeanContextChild’s “beanContext” property.

By doing so the BeanContext can monitor its child and can detect when such children are removed by a 3rd party (usually another BeanContext) invoking setBeanContext(). A BeanContext may veto such a change by a 3rd party if it determines that the child is not in a state to depart membership at that time.

  • If the JavaBean(s) added implement Listener interfaces that the BeanContext is a source for, then the BeanContext may register the newly added objects via the appropriate Listener registration methods as a permissible side effect of nesting.
  • If the JavaBean(s) added are Event Sources for Event that a particular BeanContext has interest in the BeanContext may, as a side effect of adding the child, register Listeners on that child. The BeanContext should avoid using Serializable Listeners thus avoiding accidental serialization of unwanted structure when a child serializes itself.
  • Once the targetChild has been successfully processed, the BeanContext shall fire a java.beans.beancontext.BeanContextMembershipEvent, containing a reference to the newly added targetChild, to the childrenAdded() method of all the BeanContextMemebrshipListeners currently registered.
  • The method shall return true if successful.

The remove() method may be invoked in order to remove an existing child JavaBean or BeanContext from within the target BeanContext. A conformant remove() implementation is required to adhere to the following semantics:

  • Synchronize with the BeanContext.globalHierarchyLock.
  • If a particular child is not present in the set of children for the source BeanContext, the method shall return False.
  • Remove the valid targetChild from the set of children for the source BeanContext, also removing that child from any other Listener interfaces that it was implicitly registered on, for that BeanContext as a side-effect of nesting.

Subsequently, if the targetChild implements the java.beans.beancontext.BeanContextChild interface (or BeanContextProxy, see later for deatils), the BeanContext shall invoke the setBeanContext() with a null1 BeanContext value, in order to notify that child that it is no longer nested within the BeanContext.

If a particular BeanContextChild is in a state where it is not able to be un-nested from its nesting BeanContext it may throw a PropertyVetoException, upon receipt of this the BeanContext shall revoke the remove operation for this instance and throw IllegalStateException. To avoid infinite recursion, children are not permitted to repeatedly veto subsequent remove notifications. In practice, a child should attempt to resolve the condition (if temporary) that precludes it’s removal from it’s current nesting BeanContext.

  • If the targetChild implements java.beans.beancontext.BeanContextChild then the BeanContext shall de-register itself from that child’s PropertyChangeListener and VetoableChangeListener sources.
  • If the BeanContext had previously registered the object(s) removed as Listeners on events sources implemented by the BeanContext as a side effect of nesting those objects, then the BeanContext shall de-register the newly removed object from the applicable source(s) via the appropriate Listener de-registration method(s)
  • If the BeanContext had previously registered Listener(s) on the object(s) removed then the BeanContext shall remove those Listener(s) from those object(s).
  • Once the targetChild has been removed from the set of children, the BeanContext shall fire a java.beans.beancontext.BeanContextMembershipEvent, containing a reference to the targetChild just removed, to the childrenRemoved() method of all the BeanContextMembershipListeners currently registered.
  • Finally the method shall return the value true if successful.

Note that the lifetime of any child of a nesting BeanContext, is at least for the duration of that child’s containment within a given BeanContext. For simple JavaBeans that are not aware of their containment within a BeanContext, this usually implies that the JavaBean shall exist for at least the lifetime of the nesting BeanContext.

BeanContext’s are not required to implement either addAll(), removeAll(), retainAll() or clear() optional methods defined by java.util.Collection API, however if they do they must implement the semantics defined, per object, for both add() and remove() above. In the failure cases these methods shall revoke any partially applied changes to return the BeanContext to the state it was in prior to the failing composite operation being invoked, no BeanContextEvents shall be fired in the failure case as is consistent with the definition of add() and remove() above.

BeanContextMembershipListeners may be added and removed via invocations of addBeanContextMembershipListener() and removeBeanContextMembershipListener().

The toArray(), method shall return a copy of the current set of JavaBean or BeanContext instances nested within the target BeanContext, and the iterator() method shall supply a java.util.Iterator object over the same set of children.

The contains() method shall return true if the object specified is currently a child of the BeanContext.

The size() method returns the current number of children nested.

The isEmpty() method returns true if the BeanContext has no children.

Note that all the Collection methods all require proper synchronization between each other by a given implementation in order to function correctly in a multi-threaded environment, that is, to ensure that any changes to the membership of the set of JavaBeans nested within a given BeanContext are applied atomically. All implementations are required to synchronized their implementations of these methods with the BeanContext.globalHierarchyLock.

In some situations, add() and remove() (or a variant thereof) operations may occur nested, that is multiple occurrences may appear on the stack of the calling Thread simultaneously, e.g: when BeanContextChild, A, is added (or removed), it’s setBeanContext() method also adds (or removes) another BeanContextChild, B. A particular BeanContext implementation may choose to fire either two BeanContextMembershipListener notifications, one for each add()/remove() operation of B then A (in this order since B is successfully added before A), or coalesce these into a single notification containing both A, and B. Note that should A be unable to be added or removed for any reason it shall not perform, or undo, any add or remove operations upon B as a side-effect, prior to throwing a PropertyVetoException to indicate this condition, that is, it must avoid or undo any side-effect membership changes prior to rejecting any changes to its own membership status.

The instantiateChild() method is a convenience method that may be invoked to instantiate a new JavaBean instance as a child of the target BeanContext. The implementation of the JavaBean is derived from the value of the beanName actual parameter, and is defined by the java.beans.Beans.instantiate() method.

Typically, this shall be implemented by calling the appropriate java.beans.Beans.instantiate() method, using the ClassLoader of the target BeanContext. However a particular BeanContext implementation may interpose side-effects on the instantiate operation in their implementation of this method.

The BeanContextEvent is the abstract root EventObject class for all Events pertaining to changes in state of a BeanContext’s defined semantics. This abstract root class defines the BeanContext that is the source of the notification, and also introduces a mechanism to allow the propagation of BeanContextEvent subclasses through a hierarchy of BeanContexts. The setPropagatedFrom() and getPropagatedFrom() methods allows a BeanContext to identify itself as the source of a propagated Event to the BeanContext to which it subsequently propagates the Event to. This is a general propagation mechanism and should be used with care as it has significant performance implications when propagated through large hierarchies.

The BeanContextMembershipEvent describes changes that occur in the membership of a particular BeanContext instance. This event encapsulates the list of children either added to, or removed from, the membership of a particular BeanContext instance, i.e the delta in the membership set.

Whenever a successful add(), remove(), addAll(), retainAll(), removeAll(), or clear() is invoked upon a particular BeanContext instance, a BeanContextMembershipEvent is fired describing the children effected by the operation.

2.1.2 Resources.

The BeanContext defines two methods; getResourceAsStream() and getResource() which are analogous to those methods found on java.lang.ClassLoader. BeanContextChild instances nested within a BeanContext shall invoke the methods on their nesting BeanContext in preference for those on ClassLoader, to allow a BeanContext implementation to augment the semantics by interposing behavior between the child and the underlying ClassLoader semantics.

2.1.3 The BeanContext as a Service Provider

The service facilities of a BeanContext are provided as follows:

public interface BeanContextServices
          extends   BeanContext,BeanContextServicesListener {

        boolean addService(Class           serviceClass,
                           BeanContextServiceProvider service);

        boolean revokeService(Class           serviceClass,
                              BeanContextServiceProvider bcsp,
                              boolean         revokeNow
        );

        boolean hasService(Class serviceClass);

        Object getService(BeanContextChild      bcc,
                          Object                requestor.
                          Class                 serviceClass,
                          Object                serviceSelector,
                          BeanContextServicesRevokedListener sl
        ) throws TooManyListenersException;

        void releaseService(BeanContextChild bcc,
                            Object           requestor,
                            Object           service);

        Iterator getCurrentServiceClasses();

        public Iterator getCurrentServiceSelectors(Class sc);

        addBeanContextServicesListener(
                BeanContextServicesListener bcsl
        );

        removeBeanContextServicesListener(
                BeanContextServicesListener bcsl
     );
}

The BeanContextServiceProvider interface is defined as follows:

public interface BeanContextServiceProvider {
        Object getService(BeanContext bc,
                          Object      requestor,
                          Class       serviceCls,
                          Object      serviceSelector);

        void releaseService(BeanContext bc,
                            Object      requestor,
                            Object      service);

        Iterator getCurrentServiceSelectors(BeanContext bc,
                                            Class serviceCls);
}

The BeanContextServiceRevokedListener is defined as follows:

public interface BeanContextServiceRevokedListener
          extends java.util.EventListener {
        void serviceRevoked(
                BeanContextServiceRevokedEvent bcsre
        );
}

The BeanContextServicesListener is defined as follows:

public interface BeanContextServicesListener
          extends BeanContextServiceRevokedListener {
        void serviceAvailable(
                BeanContextServiceAvailableEvent bcsae
        );
}

The BeanContextServiceAvailableEvent is defined as follows:

public class BeanContextServiceAvailableEvent
          extends BeanContextEvent {

        public BeanContextServiceAvailableEvent(
                        BeanContextServices        bcs,
                        Class                      sc
     );

        BeanContextServices getSourceAsBeanContextServices();

        public Class getServiceClass();

        public boolean isServiceClass(Class serviceClass);

        public Iterator getCurrentServiceSelectors();
}

The BeanContextServiceRevokedEvent is defined as follows:

public class BeanContextServiceRevokedEvent
          extends BeanContextEvent {
        public BeanContextServiceRevokedEvent(
                                BeanContextServices        bcs,
                                Class                      sc,
                             boolean                    invalidNow
        );
        public BeanContextServices
                        getSourceAsBeanContextServices();

        public Class getServiceClass();

        public boolean isServiceClass(Class service);

        public boolean isCurrentServiceInvalidNow();
}

The BeanContextServiceProviderBeanInfo is defined as follows:

public interface BeanContextServicesProviderBeanInfo
       extends   java.beans.BeanInfo {
    java.beans.BeanInfo[] getServicesBeanInfo();
}

Apart from providing a structured hierarchy, the other major role of a BeanContext is to provide a standard mechanism for a JavaBean component to obtain context-specific facilities or services from its environment.

A service, represented by a Class object, is typically a reference to either an interface, or to an implementation that is not publicly instantiable. This Class defines an interface protocol or contract between a BeanContextServiceProvider, the factory of the service, and an arbitrary object associated with a BeanContextChild that is currently nested within the BeanContext the service is registered with. Typically such protocols encapsulate some context specific or sensitive behavior that isolates a BeanContextChild’s implementation from such dependencies thus resulting in simpler implementations, greater interoperability and portability.

A BeanContextServiceProvider, is a “factory” for one or more services. It registers itself with a particular BeanContextServices via it’s adService() method, if the service is not already registered with the BeanContextServices, the BeanContextServices associates the service specified with the BeanContextServiceProvider, and fires a BeanContextServiceAvailableEvent via the serviceAvailable() method to those BeanContextServicesListeners currently registered, then returns true, otherwise false indicating that the service is already registered for that BeanContextServices.

Once registered, and until revoked, the service is available via the BeanContextServices getService() method.

The hasService() method may be used to test the presence of a particular service, and the getCurrentServices() method returns an iterator over the currently available services for that BeanContextServices.

A BeanContextChild or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via an invocation of the getService() method. The getService() method specifies; the BeanContextChild, the associated requestor, the Class of the service requested, a service dependent parameter (known as a Service Selector), and a BeanContextServicesRevokedListener used to subsequently notify the requestor that the service class has been revoked by the BeanContextServiceProvider. The Listener is registered automatically with a unicast event source per requestor and service class and is automatically unregistered when a requestor relinquishes all references of a given service class, or as a side effect of the service being “forcibly revoked” by the providing BeanContextServiceProvider.

The BeanContextServices passes this getService() invocation onto the associated BeanContextServiceProvider (if any) to be satisfied via an invocation of its getService() method. The BeanContextServiceProvider is passed the BeanContext, the Class of the service provided, the service dependent service parameter (the Service Selector) and a reference to the object requesting the service.

The reference to the BeanContext is intended to enable the BeanContextServiceProvider to distinguish service requests from multiple sources. A BeanContextServiceProvider is only permitted to retain a weak reference to any BeanContext so obtained.

The Service Selector parameter is a service dependent value used by a service requestor for a particular service in order to parameterize the service to be provided to it by the BeanContextServiceProvider. Some examples of its usage are; a parameter to a constructor for the service implementation class; a value for a particular service’s property, or as a key into a map of existing implementations.

The reference to the requestor is intended to permit the BeanContextServiceProvider to interrogate the state of the requestor in order to perform any customization or parameterization of the service, therefore this reference shall be treated as immutable by the BeanContextServicesProvider. Additionally the BeanContextServiceProvider is permitted to retain only weak and immutable reference to both the requestor and the BeanContextChild after returning from the getService() invocation.

The BeanContextServiceProvider may satisfy the request, returning a reference to an instance of the Class of the requested service (such that the reference returned shall result in the expression: <serviceRefence> instanceof <serviceClass> being true), return null, or throw an unchecked exception.

In the case when a nested BeanContextServices is requested for a particular service that it has no BeanContextServiceProvider for, then the BeanContextServices may delegate the service requested to its own nesting BeanContextServices in order to be satisfied. Thus delegation requests can propagate from the leaf BeanContextServices to the root BeanContextServices.

A BeanContextChild may query a particular BeanContextServices for a list of currently available Service Classes (via the getCurrentServiceClasses() method)and any associated Service Selectors, if a particular service Class implements a finite list of apriori values for a Service Class, via its nesting BeanContextServices.getCurrentServiceSelectors() method, which in turn obtains the currently available Service Selectors (if any) via the BeanContextServiceProvider.getCurrentServiceSelectors() method.

If the service in question does not implement a finite set of apriori values for the set of valid Service Selectors it shall return null.

A reference obtained by a BeanContextChild via getService() is valid until the reference is released by the BeanContextChild via an invocation of its nesting BeanContextServices releaseService() method, except in the case where the BeanContextServices fires a BeanContextServiceRevokedEvent and that Event’s isCurrentServiceInvalidNow() method returns true, in this case the BeanContextServices and/or the BeanContextServiceProvider that provided the service has determined that current service references are immediately invalidated, or “forcibly revoked” (this typically occurs in the following situation).

When BeanContextChild instances are removed from a particular BeanContextServices instance, they shall discard all references to any services they obtained from that BeanContextServices by appropriate invocations of releaseService(). If the un-nesting BeanContextChild is also a BeanContextServices instance, and if any of these service references have been exposed to the un-nesting BeanContextServices’s own members as a result of a delegated getService() request as defined above, the BeanContextServiecs shall fire a BeanContextServiceRevokedEvent to notify its nested children that the service(s) are “forcibly revoked”. This immediate invalidation of current references to delegated services at un-nesting is to ensure that services that are dependent upon the structure of the hierarchy are not used by requestors after their location in the structure has changed.

BeanContextChild instances receiving a “forcable revocation” of a Service Class shall not invoke releaseService() for any references it may hold of that type, since in this case, the BeanContextServiceProvider or the BeanContextServices that provided the service reference to that BeanContextChild has already invalidated all references to that service on their behalf.

A BeanContextServiceProvider may revoke a Service Class at any time after it has registered it with a BeanContextServices by invoking its revokeService() method. Once the BeanContextServices has fired a BeanContextServiceRevokedEvent notifying the currently registered BeanContextServiceRevokedListeners and the BeanContextServicesListeners that the service is now unavailable it shall no longer satisfy any new service requests for the revoked service until (if at all) that Service Class is re-registered. References obtained by BeanContextChild requestors to a service prior to its being revoked remain valid, and therefore the service shall remain valid to satisfy those extant references, until all references to that service are released, unless in exceptional circumstances the BeanContextServiceProvider, or BeanContextServices, when revoking the service, wants to immediately terminate service to all the current references. This immediate revocation is achieved by invoking the BeanContextServices .revokeService() method with an actual parameter value of revokeNow == true. Subsequent to immediate invalidation of current service references the service implementation may throw a service specific unchecked exception in response to any attempts to continue to use the revoked service by service requestors that have erroneously retained references to the service, ignoring the earlier immediate revocation notification.

Note that in order to function correctly (when delegating service requests) in a multi-threaded environment, implementations of BeanContextServices are required to synchronize their implementations of; addService(), hasService(), getCurrentServiceClasses(), getCurrentServiceSelectors(), getService(), releaseService() and revokeService() with the BeanContext.globalHierarhyLock.

A BeanContextServicesProvider may expose the BeanInfo for the Service Classes it provides implementations for by providing a BeanInfo class that implements BeanContextServicesProviderBeanInfo. Thus exposing an array of BeanInfo’s, one for each Service Class supported. Builder tools can, for example, use this infomation to provide application developers with a palette of Servlice Classes for inclusion in an application.

2.1.4 The role of a BeanContext in Persistence

Since one of the primary roles of a BeanContext is to represent a logical nested structure of JavaBean component and BeanContext instance hierarchies, it is natural to expect that in many scenarios that hierarchy should be persistent, i.e that the BeanContext should participate in persistence mechanisms, in particular, either java.io.Serializable or java.io.Externalizable (If the latter the BeanContext is responsible for acting as the persistence container for the sub-graph of children, encoding and decoding the class information, and maintaining sub-graph equivalence after deserialization, basically the function(s) provide for serialization by ObjectOutputStream and ObjectInputStream).

In particular BeanContexts shall persist and restore their current children that implement the appropriate persistence interfaces when they themselves are made persistent or subsequently restored.

As a result of the above requirement, persistent BeanContextChild implementations are required to not persist any references to either their nesting BeanContext, or to any Delegates obtained via its nesting BeanContextServices.

BeanContexts shall, when restoring an instance of BeanContextChild from its persistence state, be required to perform the equivalent of invoking add()on the newly instantiated BeanContextChild,, in order to notify the newly restored instance of its nesting BeanContext, thus allowing that BeanContextChild to fully reestablish its dependencies on its environment.

Also note that since BeanContext implements java.beans.beancontext.BeanContextChild it shall obey the persistence requirements defined below for implementors of that interface.

2.1.5 BeanContext with associated presentation hierarchies

Although not required, many BeanContexts may be associated within a presentation hierarchy of java.awt.Containers and java.awt.Components. A Container cannot implement BeanContext directly2 but may be associated with one by implementing the BeanContextProxy interface described herein.

public interface BeanContextProxy {
    BeanContext getBeanContext();
}

For instances of classes that do not (or cannot in the case of Component or subclasses thereof) directly implement the BeanContext interface, but are associated with an instance of such an implementation, (via delegation) such instances may expose this association by implementing the BeanContextProxy interface. By doing so, this enables arbitrary 3rd parties, such as builder tools, to interrogate and discover the BeanContext associated with such objects for the purposes of either nesting objects within that associated BeanContext, observing changes in the membership, or obtaining services thereof.

This also permits multiple distinct objects (e.g: Containers) to share a single BeanContext. [Note though that in this case a shared BeanContext shall not implement BeanContextContainerProxy since that is a peer-to-peer relationship between a single BeanContext and the Container implementing that interface]

The value returned from getBeanContext() is constant for the lifetime of the implementing instance, that is the relationship between a BeanContextProxy and it’s associated BeanContext is static and thus may not change for the lifetime of either participant.

No class may implement both the BeanContext (or BeanContextChild) and the BeanContextProxy interfaces, they are mutually exclusive.

Some BeanContextProxy implementors may also implement java.util.Collection, or some other collection-like API (e.g java.awt.Container), in addition to, and possibly distinct from, maintaining a BeanContext based Collection.

In such cases it is possible to add, or remove, elements from either the BeanContext, via it’s Collection API’s, or the BeanContextProxy implementor using it’s own collection-like API’s (e.g: public boolean java.awt.Container.add(Component)). It is implementation dependent whether or not objects added or removed from either the BeanContext’s Collection, or the BeanContextProxy implementor’s collection are also added or removed from the corresponding object’s collection (i.e: should a Container.add() also infer a BeanContext.add() and vica-versa?). In such situations both participants (the implementor of BeanContextProxy and the BeanContext itself) are required to; 1) implement the same add/remove semantics as the other (i.e: if x.add(o) has a side effect of x.getBeanContext().add(o) then x.getBeanContext().add(o) should also a have side effect of x.add(o)), and 2) before adding/removing an object to/from the other participants collection, it should test (synchronized) if that object is/is not a member of the other participants collection before proceeding with the operation in question (this is to avoid infinite recursion between collection operations on both participants) (i.e: x.add(o) should not invoke x.getBeanContext().add(o) if x.getBeanContext().contains(o) is true and vica-versa).

It is important to note that if an object that implements BeanContextProxy is added to , or removed from, a BeanContext, that in addition to the operation performed on that object, the same operation should be performed on the BeanContext returned from BeanContextProxy.getBeanContext(). That is an implementor of BeanContextProxy shall be treated as though it directly implemented BeanContext by any nesting BeanContext. (and vica-versa if the operation is applied to the BeanContext its shall also be applied to the corresponding BeanContextProxy)

The following interface is defined to allow a BeanContext to expose a reference to an associated Container to enable it’s BeanContextChild members to add, or remove, their associated Component objects to/from that Container or to inspect some state on the Container.

public interface BeanContextContainerProxy {
        Container getContainer()
}

When a BeanContextChild with an associated Component is added to a BeanContext with an associated Container there are three models of interaction that can occur in relation to the nesting of the Component in the Container as a result:

  • If the associated Component was added to the associated Container via a Container API, then the nesting of the BeanContextChild in the BeanContext is a side effect of that and no further action is required.
  • If the Component and Container are not nested then the nesting BeanContext may as a side effect cause the Component associated with the BeanContextChild to be added to it’s associated Container.

OR

  • If the Component and Container are not nested then the BeanContextChild being nested may as a side effect may cause it’s Component to be associated with the Container associated with the nesting BeanContext.

Thus, for greatest interoperability a BeanContextChild shall always check if its Compoent’s parent is the BeanContext Container, and if it is not, then it may add itself if appropriate. Thus a BeanContextChild may function correctly under all scenarios.

The BeanContextChild is responsible for initially causing itself to eligible to be displayed via an invocation of show() [note that the BeanContextChild may also subsequently repeatedly hide() and show() itself].

The nesting BeanContext, or its associated Container, may subsequently hide() or show() the BeanContextChild’s Component arbitrarily, but it is strongly recommended that it treat that Component as immutable in all other respects with the exception of registering Listeners to obtain event notifications, or where other Component/Container specific protocols permit or require the Container to alter the state of its Component containees. An example of such a permitted interaction would be where a property such as background or foreground color were propagated from Container to Component.

Once a BeanContextChild has been un-nested from it’s BeanContext, it’s associated Component (if any) shall be removed from that BeanContext’s Container as a side effect of the removal operation, this is the responsibility of the BeanContext (typically if the BeanContextChild has been moved to another BeanContext with an associated Container via an invocation of it’s setBeanContext() method, the Component will already have been re-parented as a side effect of that operation by the time the original BeanContext is notified of the change via a PropertyChangeEvent from the child, however the check should be made and the Component removed if it has not already occurred).

To avoid infinite recursion, both a BeanContext and a BeanContextChild that also are associated with a Container and Component nesting relationship should avoid undoing any changes applied to the Component by the other party in the relationship. In general the BeanContext is responsible for the appearance, visibility and relative layout of the BeanContextChild’s Component, and the BeanContextChild is responsible for the Component’s state and content pertaining to the application functionality it is implementing.

The value returned from the getContainer() method is constant for the lifetime of the implementing BeanContext, that is the relationship between a BeanContext and a Container is static for the lifetime of both participants.

In addition the following interface is also defined:

public interface BeanContextChildComponentProxy {
    Component getComponent();
}

A BeanContext or a BeanContextChild may implement this interface to expose the GUI Component that it is associated with to it’s nesting BeanContext. A BeanContext may use this method to establish the relationship between references to instances of Component and BeanContextChild that are known to it, where a BeanContextChild and Component are not implemented by the same object instance (that is the BeanContextChild delegates its Component implementation to a distinct object rather than inheriting from Component]. A BeanContext may interrogate the Component reference it obtains from a nested BeanContextChild in order to determine its state, and it may also register Listeners for particular events, however it is strongly recommended that the BeanContext treat the reference as generally immutable to avoid changing the Component state.

The value returned from the getComponent() method is a constant for the lifetime of that BeanContextChild.

In the situation where a BeanContext has an associated Container, but does not wish to expose that Container by implementing the BeanContextContainerProxy interface, but wishes to handle the nesting of an arbitrary BeanContextChild’s associated Component (exposed by the BeanContextChild either implementing the BeanContextChildComponentProxy interface or as direct subclass of Component) the BeanContext is permitted to add/remove that Component to/from its associated Container.In such cases the BeanContextChild and it’s associated Component implementation shall not interfere with this action.

If a class implements both BeanContextChildComponentProxy and BeanContextContainerProxy then the object returned by both getComponent() and getContainer() shall be the same object.

2.2 interface java.beans.beancontext.BeanContextChild3

Simple JavaBeans that do not require any support or knowledge of their environment shall continue to function as they do today. However both JavaBeans that wish to utilize their containing BeanContext, and BeanContexts that may be nested, require to implement a mechanism that enables the propagation of the reference to the enclosing BeanContext through to cognizant JavaBeans and nested BeanContexts, the interface proposed is:

public interface java.beans.beancontext.BeanContextChild {
        void        setBeanContext(BeanContext bc)
                                throws PropertyVetoException;

        BeanContext getBeanContext();

        void addPropertyChangeListener
                (String name, PropertyChangeListener pcl);

     void removePropertyChangeListener
                (String name, PropertyChangeListener pcl);

        void addVetoableChangeListener
                (String name, VetoableChangeListener pcl);

     void removeVetoableChangeListener
                (String name, VetoableChangeListener pcl);

}

The expected usage is that some 3rd party shall invoke one of the appropriate methods defined on BeanContext (by virtue of its inheritance from Collection) in order to add a BeanContextChild to the membership of the target BeanContext. As a consequence the BeanContext shall attempt to set the BeanContextChild’s “beanContext” property by invoking its setter method, setBeanContext(). Only a BeanContext may call a BeanContextChild’s setBeanContext() method, since this is the mechanism that a BeanContext uses to notify a child that it is now has a new BeanContext value. Since this property is not directly settable or customizable by a user in the context of an application construction tool the BeanInfo for a BeanContextChild should set the hidden state for this property in order for builder tools to avoid presenting the property to the user for customization.

A BeanContextChild object may throw a PropertyVetoException, to notify the nesting BeanContext that it is unable to function/be nested within that particular BeanContext. Such a veto shall be interpreted by a BeanContext as an indication that the BeanContextChild has determined that it is unable to function in that particular BeanContext and is final.

During the un-nesting of a BeanContextChild from its BeanContext, it is possible for the child, or a 3rd party listening to the child’s “beanContext” property for PropertyVetoEvents, to throw a PropertyVetoException to notify the caller that it is not in a state to be un-nested. In order to bound this interaction a BeanContextChild, or 3rd party, may veto the initial un-nesting notification, but may not veto any subsequent notifications, and must, upon receipt of such notifications, amend its state accordingly to prepare itself to be subsequently un-nested.

Note that classes that implement this interface, also act as an Event Source for (sub)interface(s) of java.beans.PropertyChangeListener, and are required to update their state accordingly and subsequently fire the appropriate java.beans.PropertyChangeEvent with propertyName = “beanContext”, oldValue = the reference to the previous nesting BeanContext, and newValue = the reference to the new nesting BeanContext, to notify any Listeners that its nesting BeanContext has changed value.

BeanContextChild instances, or nested BeanContexts in the process of terminating themselves, shall invoke the remove() method on their nesting BeanContext in order to withdraw themselves from the hierarchy prior to termination.

2.2.1 Important Persistence considerations

Instances of BeanContextChild nested within an BeanContext, will typically define fields or instance variables that will contain references to their nesting BeanContext instance, and possibly services obtained from that BeanContextServices instance via its getService() method.

In order to ensure that the act of making such an instance persistent does not erroneously persist objects from the instances nesting environment, such instances shall be required to define such fields, or instance variables as either transient, or to implement custom persistence methods that avoid persisting such state.

This requirement is crucial since operations such as cutting and pasting object instances through a clipboard via object serialization will not function correctly if the act of serializing the target object also serializes much of the entire source environment it is nested within.

3.0 Overloading java.beans.instantiate() static method

Since java.beans.instantiate() is the current mechanism for (re)instantiating JavaBeans we need to extend or overload the syntax and semantics of this method in order to accommodate the introduction of the BeanContext abstraction. The extension proposed is:

public static Object instantiate(ClassLoader cl,
                                                String        beanName,
                                                BeanContext beanContext);

This method behaves has it is currently defined in the JavaBeans specification, but in addition to these existing semantics, when a non-null BeanContext is specified then the method invokes the add() method on the beanContext actual parameter with the value of the targetChild actual parameter = a reference to the newly instantiated JavaBean component.4

4.0 Providing better support for Beans that are also Applets

The current implementation of java.beans.instantiate() contains minimal support for instantiating JavaBeans that are also Applets. In particular, this method will currently construct an AppletContext and AppletStub for the newly instantiated JavaBean, set the stub on the newly instantiated Applet, and init() the Applet if it has not already been invoked.

Unfortunately this does not provide sufficient support in order to allow most Applets to be fully functional, since the AppletContext and AppletStub created by java.beans.instantiate(), are no-ops. This is a direct consequence of the lack of sufficient specification of how to construct AppletContext and AppletStub implementations in the existing Applet API’s. Furthermore, even if such specifications existed we would require an API that propagated a number of Applet attributes such as its Codebase, Parameters, AppletContext, and Documentbase into java.beans.instantiate() in order for it to subsequently instantiate the appropriately initialized objects.

Since key to supporting fully functional Applets is to provide them with fully functional AppletContext and AppletStub instances, the design goal is to provide a mechanism to provide this state to instantiate() so that it may carry out the appropriate initialization and binding5, therefore the proposed interface is:

public static Object
                        instantiate(ClassLoader                                 cl,
                                          String                beanName,
                                          BeanContext           bCtxt,
                                          AppletInitializer                                                                                                                     ai
                        );

public interface AppletInitializer {
        void initialize(Applet newApplet, BeanContext bCtxt);
        void activate(Applet newApplet);
}

If the newly instantiated JavaBean component is an instance of java.applet.Applet then the new constructed Applet, (Bean) will be passed to the AppletInitializer via a call to initialize().

Compliant implementations of AppletInitializer.initialize() shall:

  • Associate the newly instantiated Applet with the appropriate AppletContext.
  • Instantiate an AppletStub() and associate that AppletStub with the Applet via
  • an invocation of setStub().
  • If BeanContext parameter is null, then it shall associate the Applet with its appropriate Container by adding that Applet to its Container via an invocation of add(). If the BeanContext parameter is non-null, then it is the responsibility of the BeanContext to associate the Applet with its Container during the subsequent invocation of its addChildren() method.

Compliant implementations of AppletInitializer.activate() shall mark the Applet as active, and may optionally also invoke the Applet’s start() method.

Note that if the newly instantiated JavaBean is not an instance of Applet, then the AppletInitializer interface is ignored.

5.0 Standard/Suggested Conventions for BeanContext Services

5.1 BeanContexts that support InfoBus.

The InfoBus technology is a standard extension package that is intended to facilitate the rendezvous and exchange of dynamic self describing data, based upon a publish and subscribe abstraction, between JavaBean Components within a single Java Virtual Machine.

A BeanContext that exposes an InfoBus to its nested BeanContextChild shall do so by exposing a service via the hasService() and getService() methods of type javax.infobus.InfoBus.

Thus BeanContextChild implementations may locate a common InfoBus implementation for their current BeanContext by using this mechanism to rendezvous with that InfoBus instance.

The Infobus 1.2 specification shall define a convenience mechanism provided by the InfoBus class to simplify the discovery mechanism for BeanContextChild instances nested within a particular instance of BeanContextServices.

5.2 BeanContexts that support printing

A BeanContext that wishes to expose printing facilities to its descendants may delegate a reference of (sub)type java.awt.PrintJob.

As the Java Network Printing Interface evolves additional specifications will be provided to expose it’s facilities via the services mechanism.

5.3 BeanContext Design/Runtime mode support.

JavaBeans support the concepts of “design”-mode, when JavaBeans are being manipulated and composed by a developer in an Application Builder or IDE, and “Run”-mode, when the resulting JavaBeans are instantiated at runtime as part of an Applet, Application or some other executable abstraction.

In the first version of the specification, the “mode” or state, that is “design”-time or “run”-time was a JVM global attribute. This is insufficient since, for example, in an Application Builder environment, there may be JavaBeans that function, in “run”-mode, as part of the Application Builder environment itself, as well as the JavaBeans that function, in “design”-mode, under construction by the developer using the Application Builder to compose an application.

Therefore we require the ability to scope this “mode” at a granularity below that of JVM global.

The BeanContext abstraction, as a “Container” or “Context” for one or more JavaBeans provides appropriate mechanism to better scope this “mode”.

Thus BeanContext’s that wish to expose and propagate this “mode” to its descendants may delegate a reference of type java.beans.DesignMode:

public interface java.beans.DesignMode {
        void    setDesignTime(boolean isDesignTime);
        boolean isDesignTime();
}

Additionally, BeanContexts delegating such a reference shall be required to fire the appropriate java.beans.propertyChangeEvent, with propertyName = “designTime”, with the appropriate values for oldValue and newValue, when the “mode” changes value.

Note that it is illegal for instances of BeanContextChild to call setDesignTime() on instances of BeanContext that they are nested within.

5.4 BeanContext Visibility support.

JavaBeans with associated presentation, or GUI, may be instantiated in environments where the ability to present that GUI is either not physically possible (when the hardware is not present), or is not appropriate under the current conditions (running in a server context instead of a client).

The first version of the JavaBeans Specification introduced the java.beans.Visibility interface in order to provide a mechanism for JavaBeans to have their “visible” state, or ability to render a GUI, controlled from their environment.

BeanContexts that wish to enforce a particular policy regarding the ability of their children to present GUI, shall use the java.beans.Visibility interface to control their children.

5.5 Determining Locale from a BeanContext

BeanContexts may have a locale associated with them, in order to associate and propagate this important attribute across the JavaBeans nested therein.

Therefore, BeanContexts, shall be required to fire the appropriate java.beans.PropertyChangeEvent, with propertyName = “locale”, oldValue = the reference to the previous value of the Locale delegate, and newValue = the reference to the new value of the Locale delegate, in order to notify its Listeners of any change in Locale.

Setting and getting the value of the Locale on the BeanContext is implementation dependent.

6.0 Support classes

In order to ease the implementation of this relatively complex protocol a “helper” classes are provided; java.beans.beancontext.BeanContextChildSupport, java.beans.beancontext.BeanContextSupport, and java.beans.beancontext.BeanContextServicesSupport. These classes are designed to either be subclassed, or delegated implicitly by another object, and provides fully compliant (extensible) implementations of the protocols embodied herein.

1Note, if the remove() was invoked as a result of the BeanContext receiving an unexpected PropertyChan- geEvent notification as a result of a 3rd party invoking setBeanContext() then the remove implementation shall not invoke setBeanContext(null) on that child as part of the remove() semantics, since to do so would overwrite the value previously set by the 3rd party.
2Unfortunately because of method name collisions between Component and Collection a Component can- not implement BeanContext or Collection directly and must model the capability with a “HasA” rather than an “IsA” relationship.
3I don’t like this name much but I am struggling for a better alternative! (we are stuck with it)
4Note: Since simple JavaBeans have no knowledge of a BeanContext, it is not advisable to introduce such instances into the hierarchy since there is no mechanism for these simple JavaBeans to remove them- selves from the hierarchy and thus subsequently be garbage collected.
5AppletContext objects expose a list of Applet objects they “contain”, unfortunately the current Applet or AppletStub API’s as defined, provide no mechanism for the AppletContext to discover its Applets from its AppletStubs, or for an AppletStub to inform its AppletContext of its Applet. Therefore we will have to assume that this binding/discovery can occur in order for this mechanism to be worthwhile in java.beans.instantiate().

Contents
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Change Summary for Java SE 1.4

Documentation Contents

Collections Framework Enhancements

This page summarizes the enhancements made to the collections framework in Java SE 1.4.

  • The Collections utility class has several new methods:
    • rotate(List list, int distance) - Rotates all of the elements in the list by the specified distance. This operation is common in GUI computations: moving one or more columns in a table can be accomplished efficiently by applying this operation to a sublist. This operation is also common in mathematical and scientific calculations.
    • replaceAll(List list, Object oldVal, Object newVal) - Replaces all occurrences of one specified value with another. This is essentially a convenience method. Though not difficult to program, it's very commonly needed.
    • indexOfSubList(List source, List target) - Returns the index of the first sublist of source that is equal to target. Commonly used in many domains including text processing.
    • lastIndexOfSubList(List source, List target) - Returns the index of the last sublist of source that is equal to target. Commonly used in many domains including text processing.
    • swap(List list, int i, int j) - Swaps the elements at the specified positions in the specified list. Essentially a convenience method, though this implementation is faster than the naive implementation.
    • list(Enumeration e) - Returns an ArrayList containing the elements returned by the specified enumeration. This convenience method provides interoperability between legacy APIs that return enumerations and new APIs that require collections.
  • New interface RandomAccess is a marker interface that allows List implementations to indicate that they support fast (generally constant time) random access. This allows generic algorithms to alter their behavior to provide good performance when applied to either random or sequential access lists.
  • New class LinkedHashMap provides an insertion-ordered Map implementation that runs nearly as fast as HashMap. Internally, it uses a hash table with a doubly linked list running through it in insertion order. Also available is a corresponding Set implementation, called LinkedHashSet.
  • New class IdentityHashMap is an identity-based Map implementation based on a hash table. This class is useful for topology-preserving object graph transformations (such as serialization or deep-copying). To perform such transformations, you need to maintain an identity-based "node table" that keeps track of which objects have already been seen. Identity-based maps are also used to maintain object-to-meta-information mappings in dynamic debuggers and similar systems. Finally, identity-based maps are useful in thwarting "spoof attacks" resulting from intentionally perverse equals methods. (IdentityHashMap never invokes the equals method on its keys.) An added benefit of this implementation is that it is fast.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Change Summary for Java SE 6

Documentation Contents

Collections Framework Enhancements

This page summarizes enhancements to the collections framework in Java SE 6.

This release saw fewer API changes than 5.0, but there was more of a focus on the accuracy and clarity of the specification. We recommend using the Java SE 6 specification even when writing programs for older releases.

The primary theme of the API changes was better bi-directional collection access.

These new collection interfaces are provided:

  • Deque - a double ended queue, supporting element insertion and removal at both ends. Extends the Queue interface.
  • BlockingDeque - a Deque with operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element. Extends both the Deque and BlockingQueue interfaces. (This interface is part of java.util.concurrent.)
  • NavigableSet - a SortedSet extended with navigation methods reporting closest matches for given search targets. A NavigableSet may be accessed and traversed in either ascending or descending order. This interface is intended to supersede the SortedSet interface.
  • NavigableMap - a SortedMap extended with navigation methods returning the closest matches for given search targets. A NavigableMap may be accessed and traversed in either ascending or descending key order. This interface is intended to supersede the SortedMap interface.
  • ConcurrentNavigableMap - a ConcurrentMap that is also a NavigableMap. (This interface is part of java.util.concurrent.)

The following concrete implementation classes have been added:

  • ArrayDeque - efficient resizable-array implementation of the Deque interface.
  • ConcurrentSkipListSet - concurrent scalable skip list implementation of the NavigableSet interface.
  • ConcurrentSkipListMap - concurrent scalable skip list implementation of the ConcurrentNavigableMap interface.
  • LinkedBlockingDeque - concurrent scalable optionally bounded FIFO blocking deque backed by linked nodes.
  • AbstractMap.SimpleEntry - simple mutable implementation of Map.Entry
  • AbstractMap.SimpleImmutableEntry - simple immutable implementation of Map.Entry

These existing classes have been retrofitted to implement new interfaces:

  • LinkedList - retrofitted to implement the Deque interface.
  • TreeSet - retrofitted to implement the NavigableSet interface.
  • TreeMap - retrofitted to implement the NavigableMap interface.

Two new methods were added to the Collections utility class:

  • newSetFromMap(Map) - creates a general purpose Set implementation from a general purpose Map implementation.

    There is no IdentityHashSet class, but instead, just use

    Set<Object> identityHashSet=
    Collections.newSetFromMap(
        new IdentityHashMap<Object, Boolean>());
  • asLifoQueue(Deque) - returns a view of a Deque as a Last-in-first-out (Lifo) Queue.
The Arrays utility class now has methods copyOf and copyOfRange that can efficiently resize, truncate, or copy subarrays for arrays of all types.

Before:

int[] newArray = new int[newLength];
System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);

After:

int[] newArray = Arrays.copyOf(a, newLength);
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Change Summary for JDK 5

Documentation Contents

Collections Framework Enhancements

This page summarizes enhancements to the collections framework in version 5 of the JDK.

Three new language features significantly enhance the collections framework:

  • Generics - adds compile-time type safety to the collections framework and eliminates the need to cast when reading elements from collections.
  • Enhanced for loop - eliminates the need for explicit iterators when interating over collections.
  • Autoboxing/unboxing - automatically converts primitives (such as int) to wrapper classes (such as Integer) when inserting them into collections, and converts wrapper class instances to primitives when reading from collections.

Three new collection interfaces are provided:

  • Queue - represents a collection designed for holding elements prior to processing. Besides basic Collection operations, queues provide additional insertion, extraction, and inspection operations.
  • BlockingQueue - extends Queue with operations that wait for the queue to become non-empty when retrieving an element, and that wait for space to become available in the queue when storing an element. (This interface is part of the new package java.util.concurrent.)
  • ConcurrentMap - extends Map with atomic putIfAbsent, remove, and replace methods. (This interface is part of java.util.concurrent.)

Two new concrete Queue implementations are provided, one existing List implementation has been retrofitted to implement Queue, and one abstract Queue implementation is provided:

  • PriorityQueue - an unbounded priority queue backed by a heap.
  • ConcurrentLinkedQueue - an unbounded thread-safe FIFO (first-in first-out) queue backed by linked nodes. (This class is part of java.util.concurrent.)
  • LinkedList - retrofitted to implement the Queue interface. When accessed via the Queue interface, LinkedList behaves as a FIFO queue.
  • AbstractQueue - a skeletal Queue implementation.

Five new BlockingQueue implementations are provided, all of which are part of java.util.concurrent:

  • LinkedBlockingQueue - an optionally bounded FIFO blocking queue backed by linked nodes.
  • ArrayBlockingQueue - a bounded FIFO blocking queue backed by an array.
  • PriorityBlockingQueue - an unbounded blocking priority queue backed by a heap.
  • DelayQueue - a time-based scheduling queue backed by a heap.
  • SynchronousQueue - a simple rendezvous mechanism utilizing the BlockingQueue interface.

One ConcurrentMap implementation is provided:

  • ConcurrentHashMap - a highly concurrent, high-performance ConcurrentMap implementation backed by a hash table. This implementation never blocks when performing retrievals and allows the client to select the concurrency level for updates. It is intended as a drop-in replacement for Hashtable: in addition to implementing ConcurrentMap, it supports all of the "legacy" methods peculiar to Hashtable.

Special-purpose List and Set implementations are provided for use in situations where read operations vastly outnumber write operations and iteration cannot or should not be synchronized:

  • CopyOnWriteArrayList - a List implementation backed by an array. All mutative operations (such as add, set, and remove) are implemented by making a new copy of the array. No synchronization is necessary, even during iteration, and iterators are guaranteed never to throw ConcurrentModificationException. This implementation is well-suited to maintaining event-handler lists (where change is infrequent, and traversal is frequent and potentially time-consuming).
  • CopyOnWriteArraySet - a Set implementation backed by a copy-on-write array. This implementation is similar in nature to CopyOnWriteArrayList. Unlike most Set implementations, the add, remove, and contains methods require time proportional to the size of the set. This implementation is well-suited to maintaining event-handler lists that must prevent duplicates.

Special-purpose Set and Map implementations are provided for use with enums:

  • EnumSet - a high-performance Set implementation backed by a bit-vector. All elements of each EnumSet instance must be elements of a single enum type.
  • EnumMap - a high-performance Map implementation backed by an array. All keys in each EnumMap instance must be elements of a single enum type.

A new family of wrapper implementations is provided, primarily for use with generic collections:

  • Collections.checkedInterface - returns a dynamically typesafe view of the specified collection, which throws a ClassCastException if a client attempts to add an element of the wrong type. The generics mechanism in the language provides compile-time (static) type checking, but it is possible to defeat this mechanism. Dynamically typesafe views eliminate this possibility entirely.

Three new generic algorithms and one comparator converter were added to the Collections utility class:

  • frequency(Collection<?> c, Object o) - counts the number of times the specified element occurs in the specified collection.
  • disjoint(Collection<?> c1, Collection<?> c2) - determines whether two collecitons are disjoint, in other words, whether they contain no elements in common.
  • addAll(Collection<? super T> c, T... a) - convenience method to add all of the elements in the specified array to the specified collection.
  • Comparator<T> reverseOrder(Comparator<T> cmp) - returns a comparator that represents the reverse ordering of the specified comparator.

The Arrays utility class has been outfitted with content-based hashCode and toString methods for arrays of all types. These methods complement the existing equals methods. Versions of all three methods are provided to operate on nested (or "multidimensional") arrays: deepEquals, deepHashCode, and deepToString. It is now trivial to print the contents of any array. The idiom for printing a "flat" array is:

    System.out.println(Arrays.toString(a));

The idiom for printing a nested (multidimensional) array is:

    System.out.println(Arrays.deepToString(a));

Finally, Boolean was retrofitted to implement Comparable.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Enhancements in Java SE 7

New Interface, TransferQueue

The interface TransferQueue has been added. It is a refinement of the BlockingQueue interface in which producers can wait for consumers to receive elements. One implementation of the new interface is also included in this release, LinkedTransferQueue.

Improved Hash Function

Java SE 7u6 introduces an improved, alternative hash function for the following map and map-derived collection implementations:

  • HashMap
  • Hashtable
  • HashSet
  • LinkedHashMap
  • LinkedHashSet
  • WeakHashMap
  • ConcurrentHashMap

The alternative hash function improves the performance of these map implementations when a large number of key hash collisions are encountered.

For Java SE 7u6, this alternative hash function is implemented as follows:

  • The alternative hash function is only applied to keys of type String.

  • The alternative hash function is only applied to maps with a capacity larger than a specified threshold size. By default, the threshold is -1. This value disables the alternative hash function. To enable the alternative hash function (which is only applied to keys of type String), set the jdk.map.althashing.threshold system property to a different value. The recommended value is 512. Setting this system property to 512 causes all maps with a capacity larger than 512 entries to use the alternative hash function. You can set this system property to 0, which causes all maps to use the alternative hash function.

    The following describes the jdk.map.althashing.threshold system property in more detail:

    • Value type: Integer
    • Value default: -1
    • Value range: From -1 to 2147483647, inclusive
    • Description: Threshold capacity at which maps use the alternative hash function for keys of type String. The value -1 is a synonym for 2147483647 (which is easier to remember). All other values correspond to threshold capacity.

    For example, the following command runs the Java application MyApplication and sets the jdk.map.althashing.threshold system property to 512:

    java -Djdk.map.althashing.threshold=512 MyApplication

  • If the alternative hash function is being used, then the iteration order of keys, values, and entities vary for each instance of HashMap, Hashtable, HashSet, and ConcurrentHashMap. This change in iteration order may cause compatibility issues with some programs. This is the reason that the alternative hash function is disabled by default. Hashing improvements will be investigated in future releases. In the meantime, the system property jdk.map.althashing.threshold is experimental. It is strongly recommended that you test your applications with the alternative hashing function enabled (by setting jdk.map.althashing.threshold to 0) to determine if your applications are affected by iteration order. If there is an impact, you should fix your applications as soon as possible because there is no guarantee of iteration order.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Enhancements in Java SE 8

Support for Lambda Expressions, Streams, and Aggregate Operations

The Java Collections Framework has been updated to support lambda expressions, streams, and aggregate operations. For more information on these topics, see the following pages:

  • Enhancements in Java SE 8
  • New and Enhanced APIs That Take Advantage of Lambda Expressions and Streams in Java SE 8
  • Lambda Expressions (The Java Tutorials)
  • Aggregate Operations (The Java Tutorials)
  • Collections (The Java Tutorials)

Performance Improvement for HashMaps with Key Collisions

As part of the work for JEP 180, there is a performance improvement for HashMap objects where there are lots of collisions in the keys.

The alternative String hash function added in 7u6 has been removed from JDK 8, along with the jdk.map.althashing.threshold system property. Instead, hash bins containing a large number of colliding keys improve performance by storing their entries in a balanced tree instead of a linked list. This JDK 8 change applies only to HashMap, LinkedHashMap, and ConcurrentHashMap.

In rare situations, this change could introduce a change to the iteration order of HashMap and HashSet. A particular iteration order is not specified for HashMap objects - any code that depends on iteration order should be fixed.

Note that, other than removing the feature introduced in 7u6, the java.util.Hashtable class is not affected. The features added in 7u6 applied to WeakHashMap and Hashtable (and by extension Properties and Provider) but in JDK 8 these have been removed.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Collections Framework Overview

Introduction

The Java platform includes a collections framework. A collection is an object that represents a group of objects (such as the classic Vector class). A collections framework is a unified architecture for representing and manipulating collections, enabling collections to be manipulated independently of implementation details.

The primary advantages of a collections framework are that it:

  • Reduces programming effort by providing data structures and algorithms so you don't have to write them yourself.
  • Increases performance by providing high-performance implementations of data structures and algorithms. Because the various implementations of each interface are interchangeable, programs can be tuned by switching implementations.
  • Provides interoperability between unrelated APIs by establishing a common language to pass collections back and forth.
  • Reduces the effort required to learn APIs by requiring you to learn multiple ad hoc collection APIs.
  • Reduces the effort required to design and implement APIs by not requiring you to produce ad hoc collections APIs.
  • Fosters software reuse by providing a standard interface for collections and algorithms with which to manipulate them.

The collections framework consists of:

  • Collection interfaces. Represent different types of collections, such as sets, lists, and maps. These interfaces form the basis of the framework.
  • General-purpose implementations. Primary implementations of the collection interfaces.
  • Legacy implementations. The collection classes from earlier releases, Vector and Hashtable, were retrofitted to implement the collection interfaces.
  • Special-purpose implementations. Implementations designed for use in special situations. These implementations display nonstandard performance characteristics, usage restrictions, or behavior.
  • Concurrent implementations. Implementations designed for highly concurrent use.
  • Wrapper implementations. Add functionality, such as synchronization, to other implementations.
  • Convenience implementations. High-performance "mini-implementations" of the collection interfaces.
  • Abstract implementations. Partial implementations of the collection interfaces to facilitate custom implementations.
  • Algorithms. Static methods that perform useful functions on collections, such as sorting a list.
  • Infrastructure. Interfaces that provide essential support for the collection interfaces.
  • Array Utilities. Utility functions for arrays of primitive types and reference objects. Not, strictly speaking, a part of the collections framework, this feature was added to the Java platform at the same time as the collections framework and relies on some of the same infrastructure.

Collection Interfaces

The collection interfaces are divided into two groups. The most basic interface, java.util.Collection, has the following descendants:

  • java.util.Set
  • java.util.SortedSet
  • java.util.NavigableSet
  • java.util.Queue
  • java.util.concurrent.BlockingQueue
  • java.util.concurrent.TransferQueue
  • java.util.Deque
  • java.util.concurrent.BlockingDeque

The other collection interfaces are based on java.util.Map and are not true collections. However, these interfaces contain collection-view operations, which enable them to be manipulated as collections. Map has the following offspring:

  • java.util.SortedMap
  • java.util.NavigableMap
  • java.util.concurrent.ConcurrentMap
  • java.util.concurrent.ConcurrentNavigableMap

Many of the modification methods in the collection interfaces are labeled optional. Implementations are permitted to not perform one or more of these operations, throwing a runtime exception (UnsupportedOperationException) if they are attempted. The documentation for each implementation must specify which optional operations are supported. Several terms are introduced to aid in this specification:

  • Collections that do not support modification operations (such as add, remove and clear) are referred to as unmodifiable. Collections that are not unmodifiable are modifiable.
  • Collections that additionally guarantee that no change in the Collection object will be visible are referred to as immutable. Collections that are not immutable are mutable.
  • Lists that guarantee that their size remains constant even though the elements can change are referred to as fixed-size. Lists that are not fixed-size are referred to as variable-size.
  • Lists that support fast (generally constant time) indexed element access are known as random access lists. Lists that do not support fast indexed element access are known as sequential access lists. The RandomAccess marker interface enables lists to advertise the fact that they support random access. This enables generic algorithms to change their behavior to provide good performance when applied to either random or sequential access lists.

Some implementations restrict what elements (or in the case of Maps, keys and values) can be stored. Possible restrictions include requiring elements to:

  • Be of a particular type.
  • Be not null.
  • Obey some arbitrary predicate.

Attempting to add an element that violates an implementation's restrictions results in a runtime exception, typically a ClassCastException, an IllegalArgumentException, or a NullPointerException. Attempting to remove or test for the presence of an element that violates an implementation's restrictions can result in an exception. Some restricted collections permit this usage.

Collection Implementations

Classes that implement the collection interfaces typically have names in the form of <Implementation-style><Interface>. The general purpose implementations are summarized in the following table:

Interface | Hash Table | Resizable Array | Balanced Tree | Linked List | Hash Table + Linked List
Set | HashSet |  | TreeSet |  | LinkedHashSet
List |  | ArrayList |  | LinkedList |
Deque |  | ArrayDeque |  | LinkedList |
Map | HashMap |  | TreeMap |  | LinkedHashMap

The general-purpose implementations support all of the optional operations in the collection interfaces and have no restrictions on the elements they may contain. They are unsynchronized, but the Collections class contains static factories called synchronization wrappers that can be used to add synchronization to many unsynchronized collections. All of the new implementations have fail-fast iterators, which detect invalid concurrent modification, and fail quickly and cleanly (rather than behaving erratically).

The AbstractCollection, AbstractSet, AbstractList, AbstractSequentialList and AbstractMap classes provide basic implementations of the core collection interfaces, to minimize the effort required to implement them. The API documentation for these classes describes precisely how each method is implemented so the implementer knows which methods must be overridden, given the performance of the basic operations of a specific implementation.

Concurrent Collections

Applications that use collections from more than one thread must be carefully programmed. In general, this is known as concurrent programming. The Java platform includes extensive support for concurrent programming. See Java Concurrency Utilities for details.

Collections are so frequently used that various concurrent friendly interfaces and implementations of collections are included in the APIs. These types go beyond the synchronization wrappers discussed previously to provide features that are frequently needed in concurrent programming.

These concurrent-aware interfaces are available:

  • BlockingQueue
  • TransferQueue
  • BlockingDeque
  • ConcurrentMap
  • ConcurrentNavigableMap

The following concurrent-aware implementation classes are available. See the API documentation for the correct usage of these implementations.

  • LinkedBlockingQueue
  • ArrayBlockingQueue
  • PriorityBlockingQueue
  • DelayQueue
  • SynchronousQueue
  • LinkedBlockingDeque
  • LinkedTransferQueue
  • CopyOnWriteArrayList
  • CopyOnWriteArraySet
  • ConcurrentSkipListSet
  • ConcurrentHashMap
  • ConcurrentSkipListMap

Design Goals

The main design goal was to produce an API that was small in size and, more importantly, in "conceptual weight." It was critical that the new functionality not seem too different to current Java programmers; it had to augment current facilities, rather than replace them. At the same time, the new API had to be powerful enough to provide all the advantages described previously.

To keep the number of core interfaces small, the interfaces do not attempt to capture such subtle distinctions as mutability, modifiability, and resizability. Instead, certain calls in the core interfaces are optional, enabling implementations to throw an UnsupportedOperationException to indicate that they do not support a specified optional operation. Collection implementers must clearly document which optional operations are supported by an implementation.

To keep the number of methods in each core interface small, an interface contains a method only if either:

  • It is a truly fundamental operation: a basic operations in terms of which others could be reasonably defined,
  • There is a compelling performance reason why an important implementation would want to override it.

It was critical that all reasonable representations of collections interoperate well. This included arrays, which cannot be made to implement the Collection interface directly without changing the language. Thus, the framework includes methods to enable collections to be moved into arrays, arrays to be viewed as collections, and maps to be viewed as collections.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Core Java Collections Enhancements

Documentation Contents

Java™ Collections Enhancements

Java has added functionality to the Collections packages in the versions listed below:

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Collections API Design FAQ

This document answers frequently asked questions concerning the design of the Java collections framework. It is derived from the large volume of traffic on the collections-comments alias. It serves as a design rationale for the collections framework.

Core Interfaces - General Questions

  1. Why don't you support immutability directly in the core collection interfaces so that you can do away with optional operations (and UnsupportedOperationException)?
  2. Won't programmers have to surround any code that calls optional operations with a try-catch clause in case they throw an UnsupportedOperationException?
  3. Why isn't there a core interface for "bags" (AKA multisets)?
  4. Why didn't you use "Beans-style names" for consistency?

Collection Interface

  1. Why doesn't Collection extend Cloneable and Serializable?
  2. Why don't you provide an "apply" method in Collection to apply a given method ("upcall") to all the elements of the Collection?
  3. Why didn't you provide a "Predicate" interface, and related methods (e.g., a method to find the first element in the Collection satisfying the predicate)?
  4. Why don't you provide a form of the addAll method that takes an Enumeration (or an Iterator)?
  5. Why don't the concrete implementations in the JDK have Enumeration (or Iterator) constructors?
  6. Why don't you provide an Iterator.add method?

List Interface

  1. Why don't you rename the List interface to Sequence; doesn't "list" generally suggest "linked list"? Also, doesn't it conflict with java.awt.List?
  2. Why don't you rename List's set method to replace, to avoid confusion with Set.

Map Interface

  1. Why doesn't Map extend Collection?

Iterator Interface

  1. Why doesn't Iterator extend Enumeration?
  2. Why don't you provide an Iterator.peek method that allows you to look at the next element in an iteration without advancing the iterator?

Miscellaneous

  1. Why did you write a new collections framework instead of adopting JGL (a preexisting collections package from ObjectSpace, Inc.) into the JDK?
  2. Why don't you eliminate all of the methods and classes that return "views" (Collections backed by other collection-like objects). This would greatly reduce aliasing.
  3. Why don't you provide for "observable" collections that send out Events when they're modified?

Core Interfaces - General Questions

  1. Why don't you support immutability directly in the core collection interfaces so that you can do away with optional operations (and UnsupportedOperationException)?

    This is the most controversial design decision in the whole API. Clearly, static (compile time) type checking is highly desirable, and is the norm in Java. We would have supported it if we believed it were feasible. Unfortunately, attempts to achieve this goal cause an explosion in the size of the interface hierarchy, and do not succeed in eliminating the need for runtime exceptions (though they reduce it substantially).

    Doug Lea, who wrote a popular Java collections package that did reflect mutability distinctions in its interface hierarchy, no longer believes it is a viable approach, based on user experience with his collections package. In his words (from personal correspondence) "Much as it pains me to say it, strong static typing does not work for collection interfaces in Java."

    To illustrate the problem in gory detail, suppose you want to add the notion of modifiability to the Hierarchy. You need four new interfaces: ModifiableCollection, ModifiableSet, ModifiableList, and ModifiableMap. What was previously a simple hierarchy is now a messy heterarchy. Also, you need a new Iterator interface for use with unmodifiable Collections, that does not contain the remove operation. Now can you do away with UnsupportedOperationException? Unfortunately not.

    Consider arrays. They implement most of the List operations, but not remove and add. They are "fixed-size" Lists. If you want to capture this notion in the hierarchy, you have to add two new interfaces: VariableSizeList and VariableSizeMap. You don't have to add VariableSizeCollection and VariableSizeSet, because they'd be identical to ModifiableCollection and ModifiableSet, but you might choose to add them anyway for consistency's sake. Also, you need a new variety of ListIterator that doesn't support the add and remove operations, to go along with unmodifiable List. Now we're up to ten or twelve interfaces, plus two new Iterator interfaces, instead of our original four. Are we done? No.

    Consider logs (such as error logs, audit logs and journals for recoverable data objects). They are natural append-only sequences, that support all of the List operations except for remove and set (replace). They require a new core interface, and a new iterator.

    And what about immutable Collections, as opposed to unmodifiable ones? (i.e., Collections that cannot be changed by the client AND will never change for any other reason). Many argue that this is the most important distinction of all, because it allows multiple threads to access a collection concurrently without the need for synchronization. Adding this support to the type hierarchy requires four more interfaces.

    Now we're up to twenty or so interfaces and five iterators, and it's almost certain that there are still collections arising in practice that don't fit cleanly into any of the interfaces. For example, the collection-views returned by Map are natural delete-only collections. Also, there are collections that will reject certain elements on the basis of their value, so we still haven't done away with runtime exceptions.

    When all was said and done, we felt that it was a sound engineering compromise to sidestep the whole issue by providing a very small set of core interfaces that can throw a runtime exception.

  2. Won't programmers have to surround any code that calls optional operations with a try-catch clause in case they throw an UnsupportedOperationException?

    It was never our intention that programs should catch these exceptions: that's why they're unchecked (runtime) exceptions. They should only arise as a result of programming errors, in which case, your program will halt due to the uncaught exception.

  3. Why isn't there a core interface for "bags" (AKA multisets)?

    The Collection interface provides this functionality. We are not providing any public implementations of this interface, as we think that it wouldn't be used frequently enough to "pull its weight." We occasionally return such Collections, which are implemented easily atop AbstractCollection (for example, the Collection returned by Map.values).

  4. Why didn't you use "Beans-style names" for consistency?

    While the names of the new collections methods do not adhere to the "Beans naming conventions", we believe that they are reasonable, consistent and appropriate to their purpose. It should be remembered that the Beans naming conventions do not apply to the JDK as a whole; the AWT did adopt these conventions, but that decision was somewhat controversial. We suspect that the collections APIs will be used quite pervasively, often with multiple method calls on a single line of code, so it is important that the names be short. Consider, for example, the Iterator methods. Currently, a loop over a collection looks like this:

        for (Iterator i = c.iterator(); i.hasNext(); )
        System.out.println(i.next());
    Everything fits neatly on one line, even if the Collection name is a long expression. If we named the methods "getIterator", "hasNextElement" and "getNextElement", this would no longer be the case. Thus, we adopted the "traditional" JDK style rather than the Beans style.

Collection Interface

  1. Why doesn't Collection extend Cloneable and Serializable?

    Many Collection implementations (including all of the ones provided by the JDK) will have a public clone method, but it would be mistake to require it of all Collections. For example, what does it mean to clone a Collection that's backed by a terabyte SQL database? Should the method call cause the company to requisition a new disk farm? Similar arguments hold for serializable.

    If the client doesn't know the actual type of a Collection, it's much more flexible and less error prone to have the client decide what type of Collection is desired, create an empty Collection of this type, and use the addAll method to copy the elements of the original collection into the new one.

  2. Why don't you provide an "apply" method in Collection to apply a given method ("upcall") to all the elements of the Collection?

    This is what is referred to as an "Internal Iterator" in the "Design Patterns" book (Gamma et al.). We considered providing it, but decided not to as it seems somewhat redundant to support internal and external iterators, and Java already has a precedent for external iterators (with Enumerations). The "throw weight" of this functionality is increased by the fact that it requires a public interface to describe upcalls.

  3. Why didn't you provide a "Predicate" interface, and related methods (e.g., a method to find the first element in the Collection satisfying the predicate)?

    It's easy to implement this functionality atop Iterators, and the resulting code may actually look cleaner as the user can inline the predicate. Thus, it's not clear whether this facility pulls its weight. It could be added to the Collections class at a later date (implemented atop Iterator), if it's deemed useful.

  4. Why don't you provide a form of the addAll method that takes an Enumeration (or an Iterator)?

    Because we don't believe in using Enumerations (or Iterators) as "poor man's collections." This was occasionally done in prior releases, but now that we have the Collection interface, it is the preferred way to pass around abstract collections of objects.

  5. Why don't the concrete implementations in the JDK have Enumeration (or Iterator) constructors?

    Again, this is an instance of an Enumeration serving as a "poor man's collection" and we're trying to discourage that. Note however, that we strongly suggest that all concrete implementations should have constructors that take a Collection (and create a new Collection with the same elements).

  6. Why don't you provide an Iterator.add method?

    The semantics are unclear, given that the contract for Iterator makes no guarantees about the order of iteration. Note, however, that ListIterator does provide an add operation, as it does guarantee the order of the iteration.

List Interface

  1. Why don't you rename the List interface to Sequence; doesn't "list" generally suggest "linked list"? Also, doesn't it conflict with java.awt.List?

    People were evenly divided as to whether List suggests linked lists. Given the implementation naming convention, <Implementation><Interface>, there was a strong desire to keep the core interface names short. Also, several existing names (AbstractSequentialList, LinkedList) would have been decidedly worse if we changed List to Sequence. The naming conflict can be dealt with by the following incantation:

        import java.util.*;
    import java.awt.*;
    import java.util.List;   // Dictates interpretation of "List"
  2. Why don't you rename List's set method to replace, to avoid confusion with Set.

    It was decided that the "set/get" naming convention was strongly enough enshrined in the language that we'd stick with it.

Map Interface

  1. Why doesn't Map extend Collection?

    This was by design. We feel that mappings are not collections and collections are not mappings. Thus, it makes little sense for Map to extend the Collection interface (or vice versa).

    If a Map is a Collection, what are the elements? The only reasonable answer is "Key-value pairs", but this provides a very limited (and not particularly useful) Map abstraction. You can't ask what value a given key maps to, nor can you delete the entry for a given key without knowing what value it maps to.

    Collection could be made to extend Map, but this raises the question: what are the keys? There's no really satisfactory answer, and forcing one leads to an unnatural interface.

    Maps can be viewed as Collections (of keys, values, or pairs), and this fact is reflected in the three "Collection view operations" on Maps (keySet, entrySet, and values). While it is, in principle, possible to view a List as a Map mapping indices to elements, this has the nasty property that deleting an element from the List changes the Key associated with every element before the deleted element. That's why we don't have a map view operation on Lists.

Iterator Interface

  1. Why doesn't Iterator extend Enumeration?

    We view the method names for Enumeration as unfortunate. They're very long, and very frequently used. Given that we were adding a method and creating a whole new framework, we felt that it would be foolish not to take advantage of the opportunity to improve the names. Of course we could support the new and old names in Iterator, but it doesn't seem worthwhile.

  2. Why don't you provide an Iterator.peek method that allows you to look at the next element in an iteration without advancing the iterator?

    It can be implemented atop the current Iterators (a similar pattern to java.io.PushbackInputStream). We believe that its use would be rare enough that it isn't worth including in the interface that everyone has to implement.

Miscellaneous

  1. Why did you write a new collections framework instead of adopting JGL (a preexisting collections package from ObjectSpace, Inc.) into the JDK?

    If you examine the goals for our Collections framework (in the Overview), you'll see that we are not really "playing in the same space" as JGL. Quoting from the "Design Goals" Section of the Java Collections Overview: "Our main design goal was to produce an API that was reasonably small, both in size, and (more importantly) in 'conceptual weight.'"

    JGL consists of approximately 130 classes and interfaces; its main goal was consistency with the C++ Standard Template Library (STL). This was not one of our goals. Java has traditionally stayed away from C++'s more complex features (e.g., multiple inheritance, operator overloading). Our entire framework, including all infrastructure, contains approximately 25 classes and interfaces.

    While this may cause some discomfort for some C++ programmers, we feel that it will be good for Java in the long run. As the Java libraries mature, they inevitably grow, but we are trying as hard as we can to keep them small and manageable, so that Java continues to be an easy, fun language to learn and to use.

  2. Why don't you eliminate all of the methods and classes that return "views" (Collections backed by other collection-like objects). This would greatly reduce aliasing.

    Given that we provide core collection interfaces behind which programmers can "hide" their own implementations, there will be aliased collections whether the JDK provides them or not. Eliminating all views from the JDK would greatly increase the cost of common operations like making a Collection out of an array, and would do away with many useful facilities (like synchronizing wrappers). One view that we see as being particularly useful is List.subList. The existence of this method means that people who write methods taking List on input do not have to write secondary forms taking an offset and a length (as they do for arrays).

  3. Why don't you provide for "observable" collections that send out Events when they're modified?

    Primarily, resource constraints. If we're going to commit to such an API, it has to be something that works for everyone, that we can live with for the long haul. We may provide such a facility some day. In the meantime, it's not difficult to implement such a facility on top of the public APIs.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Outline of the Collections Framework

The collections framework consists of:
  • Collection interfaces - The primary means by which collections are manipulated.
    • Collection - A group of objects. No assumptions are made about the order of the collection (if any) or whether it can contain duplicate elements.
    • Set - The familiar set abstraction. No duplicate elements permitted. May or may not be ordered. Extends the Collection interface.
    • List - Ordered collection, also known as a sequence. Duplicates are generally permitted. Allows positional access. Extends the Collection interface.
    • Queue - A collection designed for holding elements before processing. Besides basic Collection operations, queues provide additional insertion, extraction, and inspection operations.
    • Deque - A double ended queue, supporting element insertion and removal at both ends. Extends the Queue interface.
    • Map - A mapping from keys to values. Each key can map to one value.
    • SortedSet - A set whose elements are automatically sorted, either in their natural ordering (see the Comparable interface) or by a Comparator object provided when a SortedSet instance is created. Extends the Set interface.
    • SortedMap - A map whose mappings are automatically sorted by key, either using the natural ordering of the keys or by a comparator provided when a SortedMap instance is created. Extends the Map interface.
    • NavigableSet - A SortedSet extended with navigation methods reporting closest matches for given search targets. A NavigableSet may be accessed and traversed in either ascending or descending order.
    • NavigableMap - A SortedMap extended with navigation methods returning the closest matches for given search targets. A NavigableMap can be accessed and traversed in either ascending or descending key order.
    • BlockingQueue - A Queue with operations that wait for the queue to become nonempty when retrieving an element and that wait for space to become available in the queue when storing an element. (This interface is part of the java.util.concurrent package.)
    • TransferQueue - A BlockingQueue in which producers can wait for consumers to receive elements. (This interface is part of the java.util.concurrent package.)
    • BlockingDeque - A Deque with operations that wait for the deque to become nonempty when retrieving an element and wait for space to become available in the deque when storing an element. Extends both the Deque and BlockingQueue interfaces. (This interface is part of the java.util.concurrent package.)
    • ConcurrentMap - A Map with atomic putIfAbsent, remove, and replace methods. (This interface is part of the java.util.concurrent package.)
    • ConcurrentNavigableMap - A ConcurrentMap that is also a NavigableMap.
  • General-purpose implementations - The primary implementations of the collection interfaces.
    • HashSet - Hash table implementation of the Set interface. The best all-around implementation of the Set interface.
    • TreeSet - Red-black tree implementation of the NavigableSet interface.
    • LinkedHashSet - Hash table and linked list implementation of the Set interface. An insertion-ordered Set implementation that runs nearly as fast as HashSet.
    • ArrayList - Resizable array implementation of the List interface (an unsynchronized Vector). The best all-around implementation of the List interface.
    • ArrayDeque - Efficient, resizable array implementation of the Deque interface.
    • LinkedList - Doubly-linked list implementation of the List interface. Provides better performance than the ArrayList implementation if elements are frequently inserted or deleted within the list. Also implements the Deque interface. When accessed through the Queue interface, LinkedList acts as a FIFO queue.
    • PriorityQueue - Heap implementation of an unbounded priority queue.
    • HashMap - Hash table implementation of the Map interface (an unsynchronized Hashtable that supports null keys and values). The best all-around implementation of the Map interface.
    • TreeMap Red-black tree implementation of the NavigableMap interface.
    • LinkedHashMap - Hash table and linked list implementation of the Map interface. An insertion-ordered Map implementation that runs nearly as fast as HashMap. Also useful for building caches (see removeEldestEntry(Map.Entry) ).
  • Wrapper implementations - Functionality-enhancing implementations for use with other implementations. Accessed solely through static factory methods.
    • Collections.unmodifiableInterface - Returns an unmodifiable view of a specified collection that throws an UnsupportedOperationException if the user attempts to modify it.
    • Collections.synchronizedInterface - Returns a synchronized collection that is backed by the specified (typically unsynchronized) collection. As long as all accesses to the backing collection are through the returned collection, thread safety is guaranteed.
    • Collections.checkedInterface - Returns a dynamically type-safe view of the specified collection, which throws a ClassCastException if a client attempts to add an element of the wrong type. The generics mechanism in the language provides compile-time (static) type checking, but it is possible to bypass this mechanism. Dynamically type-safe views eliminate this possibility.
  • Adapter implementations - Implementations that adapt one collections interface to another:
    • newSetFromMap(Map) - Creates a general-purpose Set implementation from a general-purpose Map implementation.
    • asLifoQueue(Deque) - Returns a view of a Deque as a Last In First Out (LIFO) Queue.
  • Convenience implementations - High-performance "mini-implementations" of the collection interfaces.
    • Arrays.asList - Enables an array to be viewed as a list.
    • emptySet, emptyList and emptyMap - Return an immutable empty set, list, or map.
    • singleton, singletonList, and singletonMap - Return an immutable singleton set, list, or map, containing only the specified object (or key-value mapping).
    • nCopies - Returns an immutable list consisting of n copies of a specified object.
  • Legacy implementations - Older collection classes were retrofitted to implement the collection interfaces.
    • Vector - Synchronized resizable array implementation of the List interface with additional legacy methods.
    • Hashtable - Synchronized hash table implementation of the Map interface that does not allow null keys or values, plus additional legacy methods.
  • Special-purpose implementations
    • WeakHashMap - An implementation of the Map interface that stores only weak references to its keys. Storing only weak references enables key-value pairs to be garbage collected when the key is no longer referenced outside of the WeakHashMap. This class is the easiest way to use the power of weak references. It is useful for implementing registry-like data structures, where the utility of an entry vanishes when its key is no longer reachable by any thread.
    • IdentityHashMap - Identity-based Map implementation based on a hash table. This class is useful for topology-preserving object graph transformations (such as serialization or deep copying). To perform these transformations, you must maintain an identity-based "node table" that keeps track of which objects have already been seen. Identity-based maps are also used to maintain object-to-meta-information mappings in dynamic debuggers and similar systems. Finally, identity-based maps are useful in preventing "spoof attacks" resulting from intentionally perverse equals methods. (IdentityHashMap never invokes the equals method on its keys.) An added benefit of this implementation is that it is fast.
    • CopyOnWriteArrayList - A List implementation backed by an copy-on-write array. All mutative operations (such as add, set, and remove) are implemented by making a new copy of the array. No synchronization is necessary, even during iteration, and iterators are guaranteed never to throw ConcurrentModificationException. This implementation is well-suited to maintaining event-handler lists (where change is infrequent, and traversal is frequent and potentially time-consuming).
    • CopyOnWriteArraySet - A Set implementation backed by a copy-on-write array. This implementation is similar to CopyOnWriteArrayList. Unlike most Set implementations, the add, remove, and contains methods require time proportional to the size of the set. This implementation is well suited to maintaining event-handler lists that must prevent duplicates.
    • EnumSet - A high-performance Set implementation backed by a bit vector. All elements of each EnumSet instance must be elements of a single enum type.
    • EnumMap - A high-performance Map implementation backed by an array. All keys in each EnumMap instance must be elements of a single enum type.
  • Concurrent implementations - These implementations are part of java.util.concurrent.
    • ConcurrentLinkedQueue - An unbounded first in, first out (FIFO) queue based on linked nodes.
    • LinkedBlockingQueue - An optionally bounded FIFO blocking queue backed by linked nodes.
    • ArrayBlockingQueue - A bounded FIFO blocking queue backed by an array.
    • PriorityBlockingQueue - An unbounded blocking priority queue backed by a priority heap.
    • DelayQueue - A time-based scheduling queue backed by a priority heap.
    • SynchronousQueue - A simple rendezvous mechanism that uses the BlockingQueue interface.
    • LinkedBlockingDeque - An optionally bounded FIFO blocking deque backed by linked nodes.
    • LinkedTransferQueue - An unbounded TransferQueue backed by linked nodes.
    • ConcurrentHashMap - A highly concurrent, high-performance ConcurrentMap implementation based on a hash table. This implementation never blocks when performing retrievals and enables the client to select the concurrency level for updates. It is intended as a drop-in replacement for Hashtable. In addition to implementing ConcurrentMap, it supports all of the legacy methods of Hashtable.
    • ConcurrentSkipListSet - Skips list implementation of the NavigableSet interface.
    • ConcurrentSkipListMap - Skips list implementation of the ConcurrentNavigableMap interface.
  • Abstract implementations - Skeletal implementations of the collection interfaces to facilitate custom implementations.
    • AbstractCollection - Skeletal Collection implementation that is neither a set nor a list (such as a "bag" or multiset).
    • AbstractSet - Skeletal Set implementation.
    • AbstractList - Skeletal List implementation backed by a random access data store (such as an array).
    • AbstractSequentialList - Skeletal List implementation backed by a sequential access data store (such as a linked list).
    • AbstractQueue - Skeletal Queue implementation.
    • AbstractMap - Skeletal Map implementation.
  • Algorithms - The Collections class contains these useful static methods.
    • sort(List) - Sorts a list using a merge sort algorithm, which provides average case performance comparable to a high quality quicksort, guaranteed O(n*log n) performance (unlike quicksort), and stability (unlike quicksort). A stable sort is one that does not reorder equal elements.
    • binarySearch(List, Object) - Searches for an element in an ordered list using the binary search algorithm.
    • reverse(List) - Reverses the order of the elements in a list.
    • shuffle(List) - Randomly changes the order of the elements in a list.
    • fill(List, Object) - Overwrites every element in a list with the specified value.
    • copy(List dest, List src) - Copies the source list into the destination list.
    • min(Collection) - Returns the minimum element in a collection.
    • max(Collection) - Returns the maximum element in a collection.
    • rotate(List list, int distance) - Rotates all of the elements in the list by the specified distance.
    • replaceAll(List list, Object oldVal, Object newVal) - Replaces all occurrences of one specified value with another.
    • indexOfSubList(List source, List target) - Returns the index of the first sublist of source that is equal to target.
    • lastIndexOfSubList(List source, List target) - Returns the index of the last sublist of source that is equal to target.
    • swap(List, int, int) - Swaps the elements at the specified positions in the specified list.
    • frequency(Collection, Object) - Counts the number of times the specified element occurs in the specified collection.
    • disjoint(Collection, Collection) - Determines whether two collections are disjoint, in other words, whether they contain no elements in common.
    • addAll(Collection<? super T>, T...) - Adds all of the elements in the specified array to the specified collection.
  • Infrastructure
    • Iterators - Similar to the familiar Enumeration interface, but more powerful, and with improved method names.
      • Iterator - In addition to the functionality of the Enumeration interface, enables the user to remove elements from the backing collection with well-defined, useful semantics.
      • ListIterator - Iterator for use with lists. In addition to the functionality of the Iterator interface, supports bidirectional iteration, element replacement, element insertion, and index retrieval.
    • Ordering
      • Comparable - Imparts a natural ordering to classes that implement it. The natural ordering can be used to sort a list or maintain order in a sorted set or map. Many classes were retrofitted to implement this interface.
      • Comparator - Represents an order relation, which can be used to sort a list or maintain order in a sorted set or map. Can override a type's natural ordering or order objects of a type that does not implement the Comparable interface.
    • Runtime exceptions
      • UnsupportedOperationException - Thrown by collections if an unsupported optional operation is called.
      • ConcurrentModificationException - Thrown by iterators and list iterators if the backing collection is changed unexpectedly while the iteration is in progress. Also thrown by sublist views of lists if the backing list is changed unexpectedly.
    • Performance
      • RandomAccess - Marker interface that lets List implementations indicate that they support fast (generally constant time) random access. This lets generic algorithms change their behavior to provide good performance when applied to either random or sequential access lists.
  • Array Utilities
    • Arrays - Contains static methods to sort, search, compare, hash, copy, resize, convert to String, and fill arrays of primitives and objects.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Collectdions Framework

Documentation Contents

The Collections Framework

The collections framework is a unified architecture for representing and manipulating collections, enabling them to be manipulated independently of the details of their representation. It reduces programming effort while increasing performance. It enables interoperability among unrelated APIs, reduces effort in designing and learning new APIs, and fosters software reuse. The framework is based on more than a dozen collection interfaces. It includes implementations of these interfaces and algorithms to manipulate them.

Overview

  • Overview - An overview of the collections framework.

API Specification

  • API Reference - An annotated outline of the classes and interfaces comprising the collections framework, with links into the JavaDoc.

Tutorials and Programmer's Guides

  • Tutorial - A tutorial introduction to the collections framework with many programming examples.

API Enhancements

  • API Enhancements in Java SE 8 - An annotated list of API changes between release 7 and 8.
  • API Enhancements in Java SE 7 - An annotated list of API changes between release 6 and 7.
  • API Enhancements in Java SE 6 - An annotated list of API changes between release 5.0 and 6.
  • API Enhancements in J2SE 5.0 - An annotated list of API changes between release 1.4 and 5.0.
  • API Enhancements in J2SDK 1.4 - An annotated list of API changes between release 1.3 and 1.4.

More Information

  • Design FAQ - Answers to frequently asked questions (FAQ) about the design of the collections framework.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Compact Profiles

Compact profiles, introduced in Java SE 8, define subsets of the Java SE Platform API that can reduce the static size of the Java runtime on devices that have limited storage capacity.

Overview

A compact profile (or simply profile) is a subset of the full Java SE Platform API. Because they have smaller storage footprints, profiles can enable many Java applications to run on resource-constrained devices. Choosing a profile that closely matches an application's functional needs minimizes the storage devoted to unused functions.

Compact profiles address API choices only; they are unrelated to the Java virtual machine, the language proper, or tools.

There are three profiles, compact1, compact2, and compact3. Each profile includes the APIs of the lower-numbered profiles (compact2 is a superset of compact1). The full SE API is a superset of the compact3 profile. The following table shows the high-level composition of each:

Full SE API | Beans | JNI | JAX-WS
 | Preferences | Accessibility | IDL
 | RMI-IIOP | CORBA | Print Service
 | Sound | Swing | Java 2D
 | AWT | Drag and Drop | Input Methods
 | Image I/O |  |
compact3 | Security1 | JMX |
 | XML JAXP2 | Management | Instrumentation
compact2 | JDBC | RMI | XML JAXP
compact1 | Core (java.lang.*) | Security | Serialization
 | Networking | Ref Objects | Regular Expressions
 | Date and Time | Input/Output | Collections
 | Logging | Concurrency | Reflection
 | JAR | ZIP | Versioning
 | Internationalization | JNDI | Override Mechanism
 | Extension Mechanism | Scripting |

1. Adds kerberos, acl, and sasl to compact1 Security.
2. Adds crypto to compact2 XML JAXP.

These JDK 8 tools have explicit support for profiles:

  • javac compiler [Solaris, Linux, or Mac OS X or Windows]: The -profile profile option directs the compiler to flag usage of an API not present in profile.
  • jdeps static dependency analyzer [Solaris, Linux, or Mac OS X or Windows]: The -profile option shows the profile or file containing a package.

Detailed Profile Composition

The following table lists the API packages in each of the compact profiles. The API Reference also defines profile composition.

compact1 | compact2 Additions | compact3 Additions
java.io | java.rmi | java.lang.instrument
java.lang | java.rmi.activation | java.lang.management
java.lang.annotation | java.rmi.dgc | java.security.acl
java.lang.invoke | java.rmi.registry | java.util.prefs
java.lang.ref | java.rmi.server | javax.annotation.processing
java.lang.reflect | java.sql | javax.lang.model
java.math | javax.rmi.ssl | javax.lang.model.element
java.net | javax.sql | javax.lang.model.type
java.nio | javax.transaction | javax.lang.model.util
java.nio.channels | javax.transaction.xa | javax.management
java.nio.channels.spi | javax.xml | javax.management.loading
java.nio.charset | javax.xml.datatype | javax.management.modelmbean
java.nio.charset.spi | javax.xml.namespace | javax.management.monitor
java.nio.file | javax.xml.parsers | javax.management.openmbean
java.nio.file.attribute | javax.xml.stream | javax.management.relation
java.nio.file.spi | javax.xml.stream.events | javax.management.remote
java.security | javax.xml.stream.util | javax.management.remote.rmi
java.security.cert | javax.xml.transform | javax.management.timer
java.security.interfaces | javax.xml.transform.dom | javax.naming
java.security.spec | javax.xml.transform.sax | javax.naming.directory
java.text | javax.xml.transform.stax | javax.naming.event
java.text.spi | javax.xml.transform.stream | javax.naming.ldap
java.time | javax.xml.validation | javax.naming.spi
java.time.chrono | javax.xml.xpath | javax.security.auth.kerberos
java.time.format | org.w3c.dom | javax.security.sasl
java.time.temporal | org.w3c.dom.bootstrap | javax.sql.rowset
java.time.zone | org.w3c.dom.events | javax.sql.rowset.serial
java.util | org.w3c.dom.ls | javax.sql.rowset.spi
java.util.concurrent | org.xml.sax | javax.tools
java.util.concurrent.atomic | org.xml.sax.ext | javax.xml.crypto
java.util.concurrent.locks | org.xml.sax.helpers | javax.xml.crypto.dom
java.util.function |  | javax.xml.crypto.dsig
java.util.jar |  | javax.xml.crypto.dsig.dom
java.util.logging |  | javax.xml.crypto.dsig.keyinfo
java.util.regex |  | javax.xml.crypto.dsig.spec
java.util.spi |  | org.ietf.jgss
java.util.stream |  |
java.util.zip |  |
javax.crypto |  |
javax.crypto.interfaces |  |
javax.crypto.spec |  |
javax.net |  |
javax.net.ssl |  |
javax.script |  |
javax.security.auth |  |
javax.security.auth.callback |  |
javax.security.auth.login |  |
javax.security.auth.spi |  |
javax.security.auth.x500 |  |
javax.security.cert |  |

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Compact Profiles

Compact Profiles, introduced in JDK 8, enable reduced memory footprint for applications that do not require the entire Java platform. The javac compiler has a -profile option, which allows the application to be compiled using one of the supported profiles.

There are three supported profiles: compact1, compact2 and compact3. These are additive layers, so that each Profile contains all of the APIs in profiles smaller than itself. The compact profiles feature is useful in small devices. It also can be used to shorten the time to download an application from an "app store." It makes for more compact deployment of Java applications that bundle the JRE. A JRE can be configured with a compact profile, reducing its footprint for deployment along with a compact profile application.

Tutorials and Programmer's Guides

  • Compact Profiles

API Specification

  • Profile compact1
  • Profile compact2
  • Profile compact3

More Information

  • jdeps man page [Solaris, Linux, or Mac OS X or Windows]
  • javac man page [Solaris, Linux, or Mac OS X or Windows]
  • JEP 161: Compact Profiles
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Concurrency Utilities Enhancements in Java SE 7

The fork/join framework, which is based on the ForkJoinPool class, is an implementation of the Executor interface. It is designed to efficiently run a large number of tasks using a pool of worker threads. A work-stealing technique is used to keep all the worker threads busy, to take full advantage of multiple processors. See Fork/Join in The Java Tutorials. The directory <Java home>/sample/forkjoin/ contains samples that demonstrate the fork/join framework.

The ThreadLocalRandom class eliminates contention among threads using pseudo-random numbers; see Concurrent Random Numbers.

The Phaser class is a new synchronization barrier, similar to CyclicBarrier.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Concurrency Utilities Enhancements in Java SE 8

New classes and interfaces in java.util.concurrent

The java.util.concurrent package contains two new interfaces and four new classes:

  • Interface CompletableFuture.AsynchronousCompletionTask: A marker interface identifying asynchronous tasks produced by async methods.
  • Interface CompletionStage<T>: A stage of a possibly asynchronous computation, that performs an action or computes a value when another CompletionStage completes.
  • Class CompletableFuture<T>: A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.
  • Class ConcurrentHashMap.KeySetView<K,V>: A view of a ConcurrentHashMap as a Set of keys, in which additions may optionally be enabled by mapping to a common value.
  • Class CountedCompleter<T>: A ForkJoinTask with a completion action performed when triggered and there are no remaining pending actions.
  • Class CompletionException: Exception thrown when an error or other exception is encountered in the course of completing a result or task.

New methods in java.util.concurrent.ConcurrentHashMap

The Collections Framework has undergone a major revision in Java 8 to add aggregate operations based on the newly added streams facility and lambda expressions. As a result, the ConcurrentHashMap class introduces over 30 new methods in this release. These include various forEach methods (forEach, forEachKey, forEachValue, and forEachEntry), search methods (search, searchKeys, searchValues, and searchEntries) and a large number of reduction methods (reduce, reduceToDouble, reduceToLong etc.)

Other miscellaneous methods (mappingCount and newKeySet) have been added as well. As a result of the JDK 8 changes, ConcurrentHashMaps (and classes built from them) are now more useful as caches. These changes include methods to compute values for keys when they are not present, plus improved support for scanning (and possibly evicting) entries, as well as better support for maps with large numbers of elements.

For complete details, see the java.util.concurrent.ConcurrentHashMap API specification.

New classes in java.util.concurrent.atomic

Maintaining a single count, sum, etc. that is updated by possibly many threads is a common scalability problem. This release introduces scalable updatable variable support through a small set of new classes (DoubleAccumulator, DoubleAdder, LongAccumulator, LongAdder), which internally employ contention-reduction techniques that provide huge throughput improvements as compared to Atomic variables. This is made possible by relaxing atomicity guarantees in a way that is acceptable in most applications.

  • DoubleAccumulator: One or more variables that together maintain a running double value updated using a supplied function.
  • DoubleAdder: One or more variables that together maintain an initially zero double sum.
  • LongAccumulator: One or more variables that together maintain a running long value updated using a supplied function.
  • LongAdder: One or more variables that together maintain an initially zero long sum.

New methods in java.util.concurrent.ForkJoinPool

A static commonPool() method is now available and appropriate for most applications. The common pool is used by any ForkJoinTask that is not explicitly submitted to a specified pool. Using the common pool normally reduces resource usage (its threads are slowly reclaimed during periods of non-use, and reinstated upon subsequent use). Two new methods (getCommonPoolParallelism() and commonPool()) have been added, which return the targeted parallelism level of the common pool, or the common pool instance, respectively.

New class java.util.concurrent.locks.StampedLock

A new StampedLock class adds a capability-based lock with three modes for controlling read/write access (writing, reading, and optimistic reading). This class also supports methods that conditionally provide conversions across the three modes.

For complete details, see the java.util.concurrent.StampedLock API documentation.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Concurrency Utilities Overview

Documentation Contents

Concurrency Utilities
Overview

The Java platform includes a package of concurrency utilities. These are classes that are designed to be used as building blocks in building concurrent classes or applications. Just as the collections framework simplified the organization and manipulation of in-memory data by providing implementations of commonly used data structures, the concurrency utilities simplify the development of concurrent classes by providing implementations of building blocks commonly used in concurrent designs. The concurrency utilities include a high-performance, flexible thread pool; a framework for asynchronous execution of tasks; a host of collection classes optimized for concurrent access; synchronization utilities such as counting semaphores; atomic variables; locks; and condition variables.

Using the concurrency utilities, instead of developing components such as thread pools yourself, offers a number of advantages:

  • Reduced programming effort. It is easier to use a standard class than to develop it yourself.
  • Increased performance. The implementations in the concurrency utilities were developed and peer-reviewed by concurrency and performance experts; these implementations are likely to be faster and more scalable than a typical implementation, even by a skilled developer.
  • Increased reliability. Developing concurrent classes is difficult -- the low-level concurrency primitives provided by the Java language (synchronized, volatile, wait(), notify(), and notifyAll()) are difficult to use correctly, and errors using these facilities can be difficult to detect and debug. By using standardized, extensively tested concurrency building blocks, many potential sources of threading hazards such as deadlock, starvation, race conditions, or excessive context switching are eliminated. The concurrency utilities were carefully audited for deadlock, starvation, and race conditions.
  • Improved maintainability. Programs that use standard library classes are easier to understand and maintain than those that rely on complicated, homegrown classes.
  • Increased productivity. Developers are likely to already understand the standard library classes, so there is no need to learn the API and behavior of ad hoc concurrent components. Additionally, concurrent applications are simpler to debug when they are built on reliable, well-tested components.

In short, using the concurrency utilities to implement a concurrent application can help your program be clearer, shorter, faster, more reliable, more scalable, easier to write, easier to read, and easier to maintain.

The concurrency utilities includes:

  • Task scheduling framework. The Executor interface standardizes invocation, scheduling, execution, and control of asynchronous tasks according to a set of execution policies. Implementations are provided that enable tasks to be executed within the submitting thread, in a single background thread (as with events in Swing), in a newly created thread, or in a thread pool, and developers can create customized implementations of Executor that support arbitrary execution policies. The built-in implementations offer configurable policies such as queue length limits and saturation policy that can improve the stability of applications by preventing runaway resource use.
  • Fork/join framework. Based on the ForkJoinPool class, this framework is an implementation of Executor. It is designed to efficiently run a large number of tasks using a pool of worker threads. A work-stealing technique is used to keep all the worker threads busy, to take full advantage of multiple processors.
  • Concurrent collections. Several new collections classes were added, including the new Queue, BlockingQueue and BlockingDeque interfaces, and high-performance, concurrent implementations of Map, List, and Queue. See the Collections Framework Guide for more information.
  • Atomic variables. Utility classes are provided that atomically manipulate single variables (primitive types or references), providing high-performance atomic arithmetic and compare-and-set methods. The atomic variable implementations in the java.util.concurrent.atomic package offer higher performance than would be available by using synchronization (on most platforms), making them useful for implementing high-performance concurrent algorithms and conveniently implementing counters and sequence number generators.
  • Synchronizers. General purpose synchronization classes, including semaphores, barriers, latches, phasers, and exchangers, facilitate coordination between threads.
  • Locks. While locking is built into the Java language through the synchronized keyword, there are a number of limitations to built-in monitor locks. The java.util.concurrent.locks package provides a high-performance lock implementation with the same memory semantics as synchronization, and it also supports specifying a timeout when attempting to acquire a lock, multiple condition variables per lock, nonnested ("hand-over-hand") holding of multiple locks, and support for interrupting threads that are waiting to acquire a lock.
  • Nanosecond-granularity timing. The System.nanoTime method enables access to a nanosecond-granularity time source for making relative time measurements and methods that accept timeouts (such as the BlockingQueue.offer, BlockingQueue.poll, Lock.tryLock, Condition.await, and Thread.sleep) can take timeout values in nanoseconds. The actual precision of the System.nanoTime method is platform-dependent.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Core Java Concurrency Enhancements

Documentation Contents

Java has added functionality to the Concurrency packages as listed below:

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Concurrency Utilities

The concurrency utilities packages provide a powerful, extensible framework of high-performance threading utilities such as thread pools and blocking queues. This package frees the programmer from the need to craft these utilities by hand, in much the same manner the collections framework did for data structures. Additionally, these packages provide low-level primitives for advanced concurrent programming.

Overview

  • Overview - An overview of the concurrency utilities.

API Specification

  • java.util.concurrent Package (Package Description)
  • java.util.concurrent.atomic Package (Package Description)
  • java.util.concurrent.locks Package (Package Description)

Tutorial

  • Tutorial - Concurrency Lesson

API Enhancements

  • API Enhancements in Java SE 7

More Information

  • Java Thread Primitive Deprecation
  • JSR 166 - Concurrency Utilities
  • Concurrent Programming in Java: Design Principles and Pattern (2nd Edition) by Doug Lea: A comprehensive work by a leading expert, who's also the architect of the Java platform's concurrency framework
  • A Java Fork/Join Framework
  • Java Concurrent Animated: Animations that show usage of concurrency features
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Thread Primitive Deprecation

Why is Thread.stop deprecated?

Because it is inherently unsafe. Stopping a thread causes it to unlock all the monitors that it has locked. (The monitors are unlocked as the ThreadDeath exception propagates up the stack.) If any of the objects previously protected by these monitors were in an inconsistent state, other threads may now view these objects in an inconsistent state. Such objects are said to be damaged. When threads operate on damaged objects, arbitrary behavior can result. This behavior may be subtle and difficult to detect, or it may be pronounced. Unlike other unchecked exceptions, ThreadDeath kills threads silently; thus, the user has no warning that his program may be corrupted. The corruption can manifest itself at any time after the actual damage occurs, even hours or days in the future.

Couldn't I just catch the ThreadDeath exception and fix the damaged object?

In theory, perhaps, but it would vastly complicate the task of writing correct multithreaded code. The task would be nearly insurmountable for two reasons:

  1. A thread can throw a ThreadDeath exception almost anywhere. All synchronized methods and blocks would have to be studied in great detail, with this in mind.
  2. A thread can throw a second ThreadDeath exception while cleaning up from the first (in the catch or finally clause). Cleanup would have to repeated till it succeeded. The code to ensure this would be quite complex.
In sum, it just isn't practical.

What about Thread.stop(Throwable)?

In addition to all of the problems noted above, this method may be used to generate exceptions that its target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For example, the following method is behaviorally identical to Java's throw operation, but circumvents the compiler's attempts to guarantee that the calling method has declared all of the checked exceptions that it may throw:

    static void sneakyThrow(Throwable t) {
        Thread.currentThread().stop(t);
    }

What should I use instead of Thread.stop?

Most uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. To ensure prompt communication of the stop-request, the variable must be volatile (or access to the variable must be synchronized).

For example, suppose your applet contains the following start, stop and run methods:

    private Thread blinker;

    public void start() {
        blinker = new Thread(this);
        blinker.start();
    }

    public void stop() {
        blinker.stop();  // UNSAFE!
    }

    public void run() {
        while (true) {
            try {
                Thread.sleep(interval);
            } catch (InterruptedException e){
            }
            repaint();
        }
    }
You can avoid the use of Thread.stop by replacing the applet's stop and run methods with:
    private volatile Thread blinker;

    public void stop() {
        blinker = null;
    }

    public void run() {
        Thread thisThread = Thread.currentThread();
        while (blinker == thisThread) {
            try {
                Thread.sleep(interval);
            } catch (InterruptedException e){
            }
            repaint();
        }
    }

How do I stop a thread that waits for long periods (e.g., for input)?

That's what the Thread.interrupt method is for. The same "state based" signaling mechanism shown above can be used, but the state change (blinker = null, in the previous example) can be followed by a call to Thread.interrupt, to interrupt the wait:

    public void stop() {
        Thread moribund = waiter;
        waiter = null;
        moribund.interrupt();
    }
For this technique to work, it's critical that any method that catches an interrupt exception and is not prepared to deal with it immediately reasserts the exception. We say reasserts rather than rethrows, because it is not always possible to rethrow the exception. If the method that catches the InterruptedException is not declared to throw this (checked) exception, then it should "reinterrupt itself" with the following incantation:
    Thread.currentThread().interrupt();
This ensures that the Thread will reraise the InterruptedException as soon as it is able.

What if a thread doesn't respond to Thread.interrupt?

In some cases, you can use application specific tricks. For example, if a thread is waiting on a known socket, you can close the socket to cause the thread to return immediately. Unfortunately, there really isn't any technique that works in general. It should be noted that in all situations where a waiting thread doesn't respond to Thread.interrupt, it wouldn't respond to Thread.stop either. Such cases include deliberate denial-of-service attacks, and I/O operations for which thread.stop and thread.interrupt do not work properly.

Why are Thread.suspend and Thread.resume deprecated?

Thread.suspend is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes.

What should I use instead of Thread.suspend and Thread.resume?

As with Thread.stop, the prudent approach is to have the "target thread" poll a variable indicating the desired state of the thread (active or suspended). When the desired state is suspended, the thread waits using Object.wait. When the thread is resumed, the target thread is notified using Object.notify.

For example, suppose your applet contains the following mousePressed event handler, which toggles the state of a thread called blinker:

    private boolean threadSuspended;

    Public void mousePressed(MouseEvent e) {
        e.consume();

        if (threadSuspended)
            blinker.resume();
        else
            blinker.suspend();  // DEADLOCK-PRONE!

        threadSuspended = !threadSuspended;
    }
You can avoid the use of Thread.suspend and Thread.resume by replacing the event handler above with:
    public synchronized void mousePressed(MouseEvent e) {
        e.consume();

        threadSuspended = !threadSuspended;

        if (!threadSuspended)
            notify();
    }
and adding the following code to the "run loop":
                synchronized(this) {
                    while (threadSuspended)
                        wait();
                }
The wait method throws the InterruptedException, so it must be inside a try ... catch clause. It's fine to put it in the same clause as the sleep. The check should follow (rather than precede) the sleep so the window is immediately repainted when the thread is "resumed." The resulting run method follows:
    public void run() {
        while (true) {
            try {
                Thread.sleep(interval);

                synchronized(this) {
                    while (threadSuspended)
                        wait();
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }
Note that the notify in the mousePressed method and the wait in the run method are inside synchronized blocks. This is required by the language, and ensures that wait and notify are properly serialized. In practical terms, this eliminates race conditions that could cause the "suspended" thread to miss a notify and remain suspended indefinitely.

While the cost of synchronization in Java is decreasing as the platform matures, it will never be free. A simple trick can be used to remove the synchronization that we've added to each iteration of the "run loop." The synchronized block that was added is replaced by a slightly more complex piece of code that enters a synchronized block only if the thread has actually been suspended:

                if (threadSuspended) {
                    synchronized(this) {
                        while (threadSuspended)
                            wait();
                    }
                }

In the absence of explicit synchronization, threadSuspended must be made volatile to ensure prompt communication of the suspend-request.

The resulting run method is:
    private volatile boolean threadSuspended;

    public void run() {
        while (true) {
            try {
                Thread.sleep(interval);

                if (threadSuspended) {
                    synchronized(this) {
                        while (threadSuspended)
                            wait();
                    }
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }

Can I combine the two techniques to produce a thread that may be safely "stopped" or "suspended"?

Yes, it's reasonably straightforward. The one subtlety is that the target thread may already be suspended at the time that another thread tries to stop it. If the stop method merely sets the state variable (blinker) to null, the target thread will remain suspended (waiting on the monitor), rather than exiting gracefully as it should. If the applet is restarted, multiple threads could end up waiting on the monitor at the same time, resulting in erratic behavior.

To rectify this situation, the stop method must ensure that the target thread resumes immediately if it is suspended. Once the target thread resumes, it must recognize immediately that it has been stopped, and exit gracefully. Here's how the resulting run and stop methods look:

    public void run() {
        Thread thisThread = Thread.currentThread();
        while (blinker == thisThread) {
            try {
                Thread.sleep(interval);

                synchronized(this) {
                    while (threadSuspended && blinker==thisThread)
                        wait();
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }

    public synchronized void stop() {
        blinker = null;
        notify();
    }
If the stop method calls Thread.interrupt, as described above, it needn't call notify as well, but it still must be synchronized. This ensures that the target thread won't miss an interrupt due to a race condition.

What about Thread.destroy?

Thread.destroy was never implemented and has been deprecated. If it were implemented, it would be deadlock-prone in the manner of Thread.suspend. (In fact, it is roughly equivalent to Thread.suspend without the possibility of a subsequent Thread.resume.)

Why is Runtime.runFinalizersOnExit deprecated?

Because it is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock. While this problem could be prevented if the class whose objects are being finalized were coded to "defend against" this call, most programmers do not defend against it. They assume that an object is dead at the time that its finalizer is called.

Further, the call is not "thread-safe" in the sense that it sets a VM-global flag. This forces every class with a finalizer to defend against the finalization of live objects!

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Date Time APIs

Documentation Contents

Java Date-Time Packages

The Date-Time APIs, introduced in JDK 8, are a set of packages that model the most important aspects of date and time. The core classes in the java.time package use the calendar system defined in ISO-8601 (based on the Gregorian calendar system) as the default calendar. Other non-ISO calendar systems can be represented using the java.time.chrono package and several predefined chronologies, such as Hijrah and Thai Buddhist are provided.

API Specification

  • java.time - Classes for date, time, date and time combined, time zones, instants, duration, and clocks.
  • java.time.chrono - API for representing calendar systems other than ISO-8601. Several predefined chronologies are provided and you can also define your own chronology.
  • java.time.format - Classes for formatting and parsing dates and time.
  • java.time.temporal - Extended API, primarily for framework and library writers, allowing interoperations between the date and time classes, querying, and adjustment. Fields and units are defined in this package.
  • java.time.zone - Classes that support time zones, offsets from time zones, and time zone rules.
  • JSR 310: Date and Time API

Tutorials and Programmer's Guides

  • The Date-Time API trail in The Java Tutorial shows how to write code that manipulates date and time values.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


DnD Enhancements in Java SE 7

The following enhancement is added to JDK 7

Area: API: DnD
Standard/Platform: JDK 7
Synopsis: Because of some security enhancements, some operations for untrusted applications throw or print exceptions. For instance, if during a drag and drop operation the mouse pointer is dragged over an untrusted Java application, the applications can retrieve the transferred data only in the drop callback method. Another example is the clipboard implementation. In an untrusted application, the user cannot access the system clipboard without the java.awt.AWTPermission.accessClipboard permission.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Drag and Drop-related APIs and Developer Guides

Documentation Contents

Drag and Drop

Drag and Drop enables data transfer across Java programming language and native applications, between Java programming language applications, and within a single Java programming language application.

Support for drag and drop is implemented primarily in the AWT package, but there is additional support built in to the Swing GUI classes. In many cases, drag and drop support can be enabled by calling a single method on a Swing component. For more information, please see How to Use Drag and Drop and Data Transfer, a section in The Swing Tutorial

API Specification

  • java.awt.datatransfer - Provides interfaces and classes for transferring data between and within applications.
  • java.awt.dnd - Drag and drop is a direct manipulation gesture, found in many Graphical User Interface systems, that provides a mechanism to transfer information between two entities logically associated with presentation elements in the GUI.
  • Drag and Drop Specification

Tutorials and Programmer's Guides

  • How to Use Drag and Drop and Data Transfer from The Swing Tutorial

API Enhancements

  • Drag and Drop Enhancements in Java SE 7
  • Swing Enhancements in the Java SE 6.0
  • AWT Enhancements in the Java SE 5.0 - contains a section that specifically deals with enhancements to drag and drop.

More Information

  • Java SE Desktop Overview
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Drag and Drop Subsystem for the Java 2 Platform Standard Edition 5.0

This document has these sections:

  • 1.0 Requirements
  • 2.0 API
  • 2.1 Overview
  • 2.2 Drag Gesture Recognition
    • 2.2.1 DragGestureRecognizer
  • 2.3 Drag Source
    • 2.3.1 The DragSource Definition
    • 2.3.2 The DragSourceContext Definition
    • 2.3.3 The DragSourceListener Definition
    • 2.3.4 The DragSourceEvent Definition
    • 2.3.5 The DragSourceDragEvent Definition
    • 2.3.6 The DragSourceDropEvent Definition
  • 2.4 Drop Target
    • 2.4.1 java.awt.Component additions for DropTarget (de)registration
    • 2.4.2 The DropTarget Definition
    • 2.4.3 The DropTargetContext Definition
    • 2.4.4 The DropTargetListener Definition
    • 2.4.5 The DropTargetDragEvent and DropTargetDropEvent Definitions
    • 2.4.6 Autoscrolling Support
  • 2.5 Data Transfer Phase
    • 2.5.1 FlavorMap and SystemFlavorMap
    • 2.5.2 Transferring Data across the JVM boundary
    • 2.5.3 Transferring lists of files across the JVM boundary
    • 2.5.4 Transferring java.rmi.Remote references across the JVM boundary
  • 3.0 Issues
    • 3.0.1 What are the implications of the various platform protocol engines?
    • 3.0.2 Inter/Intra VM transfers?
    • 3.0.3 Lifetime of the Transferable(s)?
    • 3.0.4 Implications of ACTION_MOVE semantics on source objects exposed via Transferable?
    • 3.0.5 Semantics of ACTION_REFERENCE operation
  • Appendix A: DropTargetPeer definition
  • Appendix B: DragSourceContextPeer definition
  • Appendix C: DropTargetContextPeer definition

1.0 Requirements

This specification defines the API for the drag and drop facilities for the Java 2 Platform.

The primary requirements that this specification addresses, are:

  1. Provision of a platform-independent drag and drop facility for Java GUI clients implemented through AWT and Swing classes.
  2. Integration with platform dependent drag and drop facilities, permitting Java clients to be able to participate in DnD operation with native applications using:
    • OLE (Win32) DnD
    • XDND protocol
    • CDE/Motif dynamic protocol
    • MacOS
    • OS/2
  3. Support for 100% pure JavaOS/Java implementation.
  4. Leverages the existing java.awt.datatransfer.* package to enable the transfer of data, described by an extensible data type system based on the MIME standard.
  5. Does not preclude the use of "accessibility" features where available.
  6. Extensible to support diverse input devices.

The specification derives from the previous work mentioned above, but incorporates significant differences from that original work as a result of the advent of the JavaBeans event model, lightweight (Swing) components, and an increasing understanding of the cross-platform integration and interoperability issues.

2.0 API

The following sections cover the drag and drop API.

2.1 Overview

Drag and drop is a direct manipulation gesture found in many graphical user interface systems that provides a mechanism to transfer information between two entities logically associated with presentation elements in the GUI. Normally driven by a physical gesture of a human user using an appropriate input device, drag and drop provides both a mechanism to enable continuous feedback regarding the possible outcome of any subsequent data transfer to the user during navigation over the presentation elements in the GUI, and the facilities to provide for any subsequent data negotiation and transfer.

A typical drag and drop operation can be decomposed into the following states (not entirely sequentially):

  • A DragSource comes into existence, associated with some presentation element (Component) in the GUI, to initiate a drag and drop of some potentially Transferable data.
  • 1 or more DropTargets come into/go out of existence, associated with presentation elements in the GUI (Components), potentially capable of consuming Transferable data types.
  • A DragGestureRecognizer is obtained from the DragSource and is associated with a Component in order to track and identify any drag initiating gesture by the user over the Component.
  • A human user makes a drag gesture over the Component, which the registered DragGestureRecognizer detects, and notifies its DragGestureListener of.

    Note: Although the body of this document consistently refers to the stimulus for a drag and drop operation being a physical gesture by a human user this does not preclude a programmatically driven DnD operation given the appropriate implementation of a DragSource.

  • The DragGestureListener causes the DragSource to initiate the drag and drop operation on behalf of the user, perhaps animating the GUI Cursor and/or rendering an Image of the item(s) that are the subject of the operation.
  • As the user gestures navigate over Component(s) in the GUI with associated DropTarget(s), the DragSource receives notifications in order to provide "Drag Over" feedback effects, and the DropTarget(s) receive notifications in order to provide "Drag Under" feedback effects based upon the operation(s) supported and the data type(s) involved.

    The gesture itself moves a logical cursor across the GUI hierarchy, intersecting the geometry of GUI Component(s), possibly resulting in the logical "Drag" cursor entering, crossing, and subsequently leaving Component(s) and associated DropTarget(s).

    The DragSource object manifests "Drag Over" feedback to the user, in the typical case by animating the GUI Cursor associated with the logical cursor.

    DropTarget objects manifest "Drag Under" feedback to the user, in the typical case, by rendering animations into their associated GUI Component(s) under the GUI Cursor.

  • The determination of the feedback effects, and the ultimate success or failure of the data transfer, should one occur, is parameterized as follows:
  • By the transfer "operation" selected by the user, and supported by both the DragSource and DropTarget: Copy, Move or Reference(link).
  • By the intersection of the set of data types provided by the DragSource and the set of data types comprehensible by the DropTarget.
  • When the user terminates the drag operation, normally resulting in a successful Drop, both the DragSource and DropTarget receive notifications that include, and result in the type negotiation and transfer of, the information associated with the DragSource via a Transferable object.

The remainder of this document details the proposed API changes to support this model.

2.2 Drag Gesture Recognition

The gesture(s) that can initiate a drag and drop operation vary, not only per platform, but also per Component, and per device. Therefore a mechanism is required in order to encapsulate these dependencies, thus making the task of the author of a Component that wishes to initiate a drag and drop operation much simpler.

2.2.1 DragGestureRecognizer

The DragGestureRecognizer is an abstract base class for all device/platform/Component specific drag and drop gesture recognizers, and is defined as:

public abstract DragGestureRecognizer {
    protected DragGestureRecognizer(
        DragSource  ds,
        Component c,
        int  srcActions,
        DragGestureListener dgl
    );
    public Component getComponent();
    public void      setComponent(Component c);
    public int  getSourceActions();
    public void setSourceActions(int actions);
    public java.awt.InputEvent getTriggerEvent();
    public void resetRecognizer();
    public void addDragGestureListener(
        DragGestureListener dgl
    ) throws TooManyListenerExceptions;
    public void removeDragGestureListener(
       DragGestureListener dgl
    );
    protected abstract void registerListeners();
    protected abstract void unregisterListeners();
    protected void fireDragGestureRecognized(
       int dragAction
    );
    protected void appendEvent(InputEvent awtie);
}

An appropriate concrete subclasses of DragGestureRecognizer for a particular may be obtained in a variety of ways; from a DragSource instance, from the Toolkit, or by other means. Concrete implementation subclasses are obtained through standard APIs' by specifying a Class reference to an abstract DragGestureRecognizer superclass, an instance of a concrete subclass of this actual parameter is instantiated and returned to the requestor.

Once a DragGestureRecognizer instance is associated with a Component and a DragSource it registers its own particular set of EventListeners' with the target Component in order to monitor the appropriate events being delivered to that Component to detect an initiating gesture. (Using registerListeners and unregisterListeners to add/remove these monitoring EventListeners').

Note that a DragGestureRecognizer may throw either an IllegalStateException or an IllegalArgumentException if either the Component or DragSource specified is either not in the correct state for, or is not interoperable with, that DragGestureRecognizer.

When a concrete DragGestureRecognizer instance detects a drag-initiating user gesture on the Component it is associated with, it will fire a DragGestureEvent to the DragGestureListener registered on its unicast event source for DragGestureListener events. This DragGestureListener is responsible for causing the associated DragSource to start the drag and drop operation (if appropriate).

The implementation provides (at least) an abstract subclass for recognizing mouse device gestures MouseDragGestureRecognizer. Other abstract subclasses may be provided by the platform to support other input devices or particular Component class semantics. Concrete superclasses of this MouseDragGestureRecognizer that encapsulate platform dependent mouse based gestures are available from the Toolkit object via its createDragGestureRecognizer(Class adgrc, DragSource ds, Component c, int sa, DragGestureListener dgl) method. This Toolkit API provides platform dependent concrete implementations that extend particular platform independent abstract definitions (classes).

The MouseDragGestureRecognizer abstract class is defined as:

public abstract   MouseDragGestureRecognizer
       extends    DragGestureRecognizer
          implements MouseListener, MouseMotionListener {

    public MouseDragGestureRecognizer(
        DragSource  ds,
        Component   c,
        int  sa,
        DragGestureListener dsl
    );
    //...
}

The DragGestureListener is defined as:

public interface DragGestureListener extends EventListener {
    void dragGestureRecognized(DragGestureEvent dge);
}

Usually the dragGestureRecognized() method will simply, via the DragGestureEvent's convenience API startDrag, start a drag and drop operation on the associated DragSource.

Note that per Component (class or instance) behavior that may effect the initiating gesture would usually be implemented in this DragGestureListener method, or in the DragGestureRecognizer subclass where appropriate or possible.

The DragGestureEvent is defined as:

publc class DragGestureEvent extends EventObject {
        public DragGestureEvent(DragGestureRecognizer dgr,
             int  dragAction,
             java.util.List  events
     );
    public DragGestureRecognizer getSourceAsDragGestureRecognizer();
    public Component  getComponent();
    public DragSource getDragSource();
    public java.util.Iterator iterator();
    public Object[] toArray();
    public Object[] toArray(Object[] array);
    public int getDragAction();
    public startDrag(Cursor             dragCursor,
                     Transferable       t,
                     DragSourceListener dsl
    );
    public startDrag(Cursor             dragCursor,
                     Image              dragImage,
                     Point              imageOffset,
                     Transferable       t,
                     DragSourceListener dsl
    );
    //...
}

The DragGestureEvent encapsulates all the information regarding the nature of the gesture that has just been recognized, including:

  • The DragGestureRecognizer that recognized the gesture
  • The Component that the gesture occurred on
  • The DragSource that will process the operation
  • The List of InputEvent objects that comprise the gesture.
  • The action (ACTION_COPY, ACTION_MOVE or ACTION_LINK, selected by the user's gesture.

2.3 Drag Source

The DragSource is the entity responsible for the initiation of the drag and drop operation:

2.3.1 The DragSource definition

The DragSource and associated constant interfaces are defined as follows:

The DnDConstants class defines the operations that may be applied to the subject of the transfer:

public final class java.awt.dnd.DnDConstants {
     public static int ACTION_NONE = 0x0;
     public static int ACTION_COPY = 0x1;
     public static int ACTION_MOVE = 0x2;
     public static int ACTION_COPY_OR_MOVE= ACTION_COPY | ACTION_MOVE;
     public static int ACTION_REFERENCE = 0x40000000;
}

public class java.awt.dnd.DragSource {
     public static Cursor     DefaultCopyDrop;
     public static Cursor     DefaultMoveDrop;
     public static Cursor     DefaultLinkDrop;
     public static Cursor     DefaultCopyNoDrop;
     public static Cursor     DefaultMoveNoDrop;
     public static Cursor     DefaultLinkNoDrop;
     public static DragSource getDefaultDragSource();
     public static boolean isDragImageSupported();
     public void startDrag(DragGestureEvent trigger,
                        Cursor             dragCursor,
                        Image              dragImage,
                        Point              dragImageOffset,
                        Transferable       transferable,
                        DragSourceListener dsl,
                        FlavorMap          fm)
                  throws InvalidDnDOperationException;
     protected DragSourceContext  createDragSourceContext(
                        DragSourceContextPeer dscp,
                        DragGestureEvent      trigger,
                        Cursor                dragCursor,
                        Image                 dragImage,
                        Point                 dragImageOffset,
                        Transferable          transferable,
                        DragSourceListener    dsl
      );
      public FlavorMap getFlavorMap();
      public DragGestureRecongizer createDragGestureRecognizer(
              Class               abstractRecognizerClass,
              Component           c,
              int                 srcActions,
              DragGestureListener dgl
     );
     public DragGestureRecongizer createDefaultDragGestureRecognizer(
              Component           c,
              int                 srcActions,
              DragGestureListener dgl
     );
     //...
}

The DragSource may be used in a number of scenarios:

  • 1 default instance per JVM for the lifetime of that JVM. (defined by this spec)
  • 1 instance per class of potential Drag Initiator object (e.g TextField). [implementation dependent]
  • 1 per instance of a particular Component, or application specific object associated with a Component instance in the GUI. [implementation dependent]
  • some other arbitrary association. [implementation dependent]

A controlling object, shall obtain a DragSource instance prior to a user's gesture, effecting an associated Component, in order to process the operation. Once obtained a DragGestureRecognizer should be obtained and used to associate the DragSource with a Component.

The initial interpretation of the user's gesture, and the subsequent starting of the drag operation are the responsibility of the implementing Component, this is usually implemented by a DragGestureRecognizer.

When a gesture occurs, the DragSource's startDrag method shall be invoked in order to cause processing of the user's navigational gestures and delivery of drag and drop protocol notifications. A DragSource shall only permit a single drag and drop operation to be current at any one time, and shall reject any further startDrag requests by throwing an IllegalDnDOperationException until such time as the extant operation is complete.

In order to start a drag operation the caller of the startDrag method shall provide the following parameters:

  • The DragGestureEvent for the gesture.
  • A Cursor representing the initial "Drag Over" feedback for the operation(s) specified. (This shall be a Cursor that provides "No Drop" visual feedback to the user).
  • An (optional) Image to visually represent the item, or item(s) that are the subject(s) of the operation.

  • On platforms that can support this feature, a "Drag" image may be associated with the operation to enhance the fidelity of the "Drag Over" feedback. This image would typically be a small "iconic" representation of the object, or objects being dragged, and would be rendered by the underlying system, tracking the movement of, and coincident with, but typically in addition to the Cursor animation.

    Where this facility is not available, or where the image is not of a suitable type to be rendered by the underlying system, this parameter is ignored and only Cursor "Drag Over" animation results, so applications should not depend upon this feature. The presence of the facility on a particular platform may be tested by invoking the static method isDragImageSupported.

  • Where an Image is provided; a Point (in the co-ordinate space of the Component) specifying the initial origin of that Image relative to the co-ordinates of the "hotspot" of the drag "Cursor", in the co-ordinate space of the Component, at the time of the initial gesture, for the purposes of initiating a correctly positioned "Drag Over" animation of that Image relative to that "hotspot".
  • A Transferable that describes the various DataFlavor(s) that represent the subject(s) of any subsequent data transfer that may result from a successful Drop.

    The Transferable instance associated with the DragSource at the start of the drag operation, represents the object(s) or data that are the operand(s), or the subject(s), of the Drag and Drop operation, that is the information that will subsequently be passed from the DragSource to the DropTarget as a result of a successful Drop on the Component associated with that DropTarget.

    Note that multiple (collections) of either homogeneous, or heterogeneous, objects may be subject of a Drag and Drop operation, by creating a container object, that is the subject of the transfer, and implements Transferable. However it should be noted that since none of the targeted native platforms systems support a standard mechanism for describing and thus transferring such collections it is not possible to implement such transfers in a transparent, or platform portable fashion.

  • A DragSourceListener instance, which will subsequently receive events notifying it of changes in the state of the ongoing operation in order to provide the "Drag Over" feedback to the user.

As stated above, the primary role of the startDrag method is to initiate a Drag on behalf of the user. In order to accomplish this, the startDrag method must create a DragSourceContext instance to track the operation itself, and more importantly it must initiate the operation itself in the underlying platform implementation. In order to accomplish this, the DragSource must first obtain a DragSourceContextPeer from the underlying system (usually via an invocation of java.awt.Toolkit.createDragSourceContextPeer method) and subsequently associate this newly created DragSourceContextPeer (which provides a platform independent interface to the underlying systems capabilities) with a DragSourceContext.The startDrag method invokes the createDragSourceContext method to instantiate an appropriate DragSourceContext and associate the DragSourceContextPeer with that.

If the drag and drop system is unable to initiate a drag operation for some reason the startDrag method shall throw a java.awt.dnd.InvalidDnDOperationException to signal such a condition. Typically this exception is thrown when the underlying platform system is either not in a state to initiate a drag, or the parameters specified are invalid.

Note that during the drag neither the set of operations the source exposed at the start of the drag operation may change for the duration of the operation, in other words the operation(s) and are constant for the duration of the operation with respect to the DragSource.

The getFlavorMap method is used by the underlying system to obtain a FlavorMap object in order to map the DataFlavors exposed by the Transferable to data type names of the underlying DnD platform. [see later for details of the FlavorMap]

A "private" FlavorMap may be provided to the startDrag() method of the DragSource, or null, in which case the "default" FlavorMap for that DragSource class or instance is used.

2.3.2 The DragSourceContext Definition

As a result of a DragSource's startDrag method being successfully invoked an instance of the DragSourceContext class is created. This instance is responsible for tracking the state of the operation on behalf of the DragSource and dispatching state changes to the DragSourceListener.

The DragSourceContext class is defined as follows:

public class DragSourceContext implements DragSourceListener {
        public DragSourceContext(
                DragSourceContextPeer dscp,
                DragGestureEvent  trigger,
                Cursor  dragCursor,
                Image  dragImage,
                Point  dragOffset,
                Transferable  transferable,
                DragSourceListener  dsl
        );
        public DragSource  getDragSource();
        public Component  getComponent();
        public DragGestureEvent getTrigger();
        public Image     getDragImage();
        public Point     getDragImageOffset();
        public void transferablesFlavorsChanged();
        public int getSourceActions();
        public Cursor getCursor();
        pbulic void   setCursor(Cursor Cursor)
                    throws InvalidDnDOperationException;
        public void addDragSourceListener(DragSourceListener dsl)
                    throws TooManyListenersException;
        public void removeDragSourceListener(DragSourceListener dsl);
        protected updateCurrentCursor(int dropOperation,
                                   int targetActions,
                                   int status
        );
        // values for status parameter above.
        protected static final int DEFAULT = 0;
        protected static final int ENTER   = 1;
        protected static final int OVER    = 2;
        protected static final int CHANGED = 3;

        //...
}

Note that the DragSourceContext itself implements DragSourceListener, this is to allow the platform peer, the DragSourceContextPeer instance, created by the DragSource, to notify the DragSourceContext of changes in state in the ongoing operation, and thus allows the DragSourceContext to interpose itself between the platform and the DragSourceListener provided by the initiator of the operation.

The state machine the platform exposes, with respect to the source, or initiator of the Drag and Drop operation is detailed below:

Following context describes this graphic

Notifications of changes in state with respect to the initiator during a drag and drop operation, as illustrated above, are delivered from the DragSourceContextPeer, to the appropriate DragSourceContext, which delegates notifications, via a unicast JavaBeans compliant EventListener subinterface, to an arbitrary object that implements DragSourceListener registered with the DragSource via startDrag.

The primary responsibility of the DragSourceListener is to monitor the progress of the user's navigation during the drag and drop operation and provide the "Drag-Over" effects feedback to the user. Typically this is accomplished via changes to the "Drag Cursor".

Every drag operation has 2 logical cursor states (Drag Cursors) associated with it:

  • The Drop Cursor, the cursor displayed when dragging over a valid DropTarget.
  • The NoDrop Cursor, the cursor displayed when dragging over everything else (the initial state of the cursor at the start of a drag).

The state of the Cursor may be modified by calling the setCursor method of the DragSourceContext.

2.3.3 The DragSourceListener Definition

The DragSourceListener interface is defined as follows:

public interface java.awt.dnd.DragSourceListener
        extends java.util.EventListener {
        void dragEnter  (DragSourceDragEvent dsde);
        void dragOver   (DragSourceDragEvent dsde);
        void dropActionChanged (DragSourceDragEvent dsde);
        void dragExit   (DragSourceEvent     dse);
        void dragDropEnd  (DragSourceDropEvent dsde);
}

As the drag operation progresses, the DragSourceListener's dragEnter, dragOver, and dragExit methods shall be invoked as a result of the user's navigation of the logical "Drag" cursor's location intersecting the geometry of GUI Component(s) with associated DropTarget(s). [See below for details of the DropTarget's protocol interactions].

The DragSourceListener's dragEnter method is invoked when the following conditions are true:

  • The logical cursor's hotspot initially intersects a GUI Component's visible geometry.
  • That Component has an active DropTarget associated.

The DropTarget's registered DropTargetListener dragEnter method is invoked and returns successfully.

The registered DropTargetListener invokes the DropTargetDragEvent's acceptDrag method to accept the drag based upon interrogation of the source's potential drop actions and available data types (DataFlavors).

The DragSourceListener's dragOver method is invoked when the following conditions are true:

  • The cursor's logical hotspot has moved but still intersects the visible geometry of the Component associated with the previous dragEnter invocation.
  • That Component still has a DropTarget associated.
  • That DropTarget is still active.
  • The DropTarget's registered DropTargetListener dragOver method is invoked and returns successfully.
  • The DropTarget does not reject the drag via rejectDrag.

The DragSourceListener's dragExit method is invoked when one of the following conditions is true:

  • The cursor's logical hotspot no longer intersects the visible geometry of the Component associated with the previous dragEnter invocation.

    Or:

  • The Component that the logical cursor's hotspot intersected that resulted in the previous dragEnter invocation, no longer has an active DropTarget (or DropTargetListener) associated.

    Or:

  • The current DropTarget's DropTargetListener has invoked rejectDrag since the last dragEnter or dragOver invocation.

The DragSourceListener's dropActionChanged() method is invoked when the state of the input device(s), typically the mouse buttons or keyboard modifiers, that the user is interacting with in order to perform the drag operation, changes.

The dragDropEnd() method is invoked to signify that the operation is completed. The getDropSuccess method of the DragSourceDropEvent can be used to determine the termination state. The getDropAction method returns the operation that the DropTarget selected (via the DropTargetDropEvent acceptDrop parameter) to apply to the drop operation.

Once this method is complete the current DragSourceContext and the associated resources are invalid.

2.3.4 The DragSourceEvent Definition

The DragSourceEvent class is the root Event class for all events pertaining to the DragSource, and is defined as follows:

public class   java.awt.dnd.DragSourceEvent extends java.util.EventObject {
        public DragSourceEvent(DragSourceContext dsc);
        public DragSourceContext getDragSourceContext();
        //...
};

An instance of this event is passed to the DragSourceListener dragExit method.

2.3.5 The DragSourceDragEvent Definition

The DragSourceDragEvent class is defined as follows:

public class java.awt.dnd.DragSourceDragEvent extends DragSourceEvent {
        public int getTargetActions();
        public int getUserAction();
        public int getGestureModifiers();
        public int getGestureModifiersEx();
        public int getDropAction();
}

An instance of the above class is passed to a DragSourceListener's dragEnter, dragOver, and dragGestureChanged methods.

The getDragSourceContext method returns the DragSourceContext associated with the current drag and drop operation.

The getUserAction method returns the action that is currently selected by the user's gesture.

The getTargetActions method returns the drop action selected by the current drop target if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

The logical intersection of these two results and the set of drop actions supported by the drag source defines the actual effect of a drop and is returned via getDropAction.

The getGestureModifiers method returns the current state of the input device modifiers, usually the mouse buttons and keyboard modifiers, associated with the user's gesture.

The getGestureModifiersEx method returns the current state of the input device extended modifiers associated with the user's gesture.

2.3.6 The DragSourceDropEvent Definition

The DragSourceDropEvent class is defined as follows:

public public class java.awt.dnd.DragSourceDropEvent
                        extends java.util.EventObject {
       public DragSourceDropEvent(DragSourceContext dsc);
       public DragSourceDropEvent(DragSourceContext dsc,
                                int  action,
                                boolean success);
       public boolean getDropSuccess();
       public int getDropAction();
}

An instance of the above class is passed to a DragSourceListener's dragDropEnd method. This event encapsulates the termination state of the drag and drop operation for the DragSource.

If the drop occurs, then the participating DropTarget will signal the success or failure of the data transfer via the DropTargetContext's dropComplete method, this status is made available to the initiator via the getDropSuccess method. The operation that the destination DropTarget selected to perform on the subject of the drag (passed by the DropTarget's acceptDrop method) is returned via the getDropAction method.

If the drag operation was aborted for any reason prior to a drop occurring, for example if the user ends the gesture outside a DropTarget, or if the DropTarget invokes rejectDrop, the getDropSuccess method will return false, otherwise true.

2.4 Drop Target

2.4.1 java.awt.Component additions for DropTarget (de)registration.

The java.awt.Component class has two additional methods added to allow the (dis)association with a DropTarget. In particular:

public class java.awt.Component /* ... */ {
        //...
        public synchronized void setDropTarget(DropTarget dt);
        public synchronized DropTarget getDropTarget(DropTarget df);
        //...
}

To associate a DropTarget with a Component one may invoke either; DropTarget.setCompononent or Component.setDropTarget methods. Thus conforming implementations of both methods are required to guard against mutual recursive invocations.

To disassociate a DropTarget with a
Component one may invoke either;
DropTarget.setCompononent(null) or
Component.setDropTarget(null) methods.

Conformant implementations of both setter methods in DropTarget and Component should be implemented in terms of each other to ensure proper maintenance of each other's state.

The setDropTarget method throws IllegalArgumentException if the DropTarget actual parameter is not suitable for use with this class/instance of Component. It may also throw UnsupportedOperationException if, for instance, the Component does not support external setting of a DropTarget.

2.4.2 The DropTarget Definition

A DropTarget encapsulates all of the platform-specific handling of the Drag and Drop protocol with respect to the role of the recipient or destination of the operation.

A single DropTarget instance may typically be associated with any arbitrary instance of java.awt.Component. Establishing such a relationship exports the associated Components geometry to the client desktop as being receptive to drag and drop operations when the coordinates of the logical cursor intersects that visible geometry.

The DropTarget class is defined as follows:

public class java.awt.dnd.DropTarget
       implements DropTargetListener, Serializable {

        public DropTarget(Component          c,
                       int                actions,
                       DropTargetListener dsl,
                       boolean            isActive,
                       FlavorMap          fm
        );
        public DropTarget();
        public DropTarget(Component c);
        public DropTarget(Component c, DropTargetListener dsl);
        public Component getComponent();
        public void      setComponent(Component c);
        public DropTargetContext getDropTargetContext();
        public void addDropTargetListener(DropTargetListener dte)
                  throws TooManyListenersException;
        public void removeDropTargetListener(DropTargetListener dte);
        public void setActive(boolean active);
        public boolean isActive();
        public FlavorMap getFlavorMap();
        public void      setFlavorMap(FlavorMap fm);
        public void setDefaultActions(int actions);
        public int  getDefaultActions();
        protected DropTargetContext createDropTargetContext();
        public void addNotify(ComponentPeer cp);
        public void removeNotify(ComponentPeer cp);
        // ...
}

The setComponent method throws IllegalArgumentException if the Component actual parameter is not appropriate for use with this class/instance of DropTarget, and may also throw UnsupportedOperationException if the Component specified disallows the external setting of a DropTarget.

The addDropTargetListener and removeDropTargetListener methods allow the unicast DropTargetListener to be changed.

The setActive and isActive methods allow the DropTarget to be made active or otherwise and for its current state to be determined.

The getFlavorMap methods is used to obtain the FlavorMap associated with this DropTarget for the purposes of mapping any platform dependent type names to/from their corresponding platform independent DataFlavors.

The setFlavorMap method allows a new FlavorMap to be assigned to the DropTarget, a parameter of null causes a "default" FlavorMap to be installed for the DropTarget.

The createDropTargetContext method is only invoked to provide the underlying platform dependent peer with an instantiation of a new DropTargetContext as a Drag operation initially encounters the Component associated with the DropTarget. If no DropTargetContext is currently associated with a DropTarget, a permitted side-effect of an invocation of getDropTargetContext is to instantiate a new DropTargetContext.

The addNotify and removeNotify methods are only called from Component to notify the DropTarget of the Component's (dis)association with its ComponentPeer.

Note that the DropTarget itself implements DropTargetListener, this is to allow the platform peer, the DropTargetContextPeer instance, created by the platform, to notify the DropTarget of changes in state in the ongoing operation, and thus allows the DropTarget to interpose itself between the platform and the DropTargetListener registered with the DropTarget.

2.4.3 The DropTargetContext Definition

As the logical cursor associated with an ongoing drag and drop operation first intersects the visible geometry of a Component with an associated DropTarget, the DropTargetContext associated with the DropTarget is the interface, through which, access to, and control over state of the recipient protocol is achieved from the DropTargetListener.

A DropTargetContext is created by a DropTarget, via it's createDropTargetContext method, as a side effect of a call to a DropTarget's getDropTargetContext method, if no <>DropTargetContext currently exists for that DropTarget.

The DropTargetContext interface is defined as follows:

public class DropTargetContext {
        public DropTarget getDropTarget();
        public Component getComponent();
        public void  dropComplete(boolean success)
                                throws InvalidDnDOperationException;
        public void acceptDrag(int dropAction);
        public void rejectDrag();
        public void acceptDrop(int dropAction);
        public void rejectDrop();
        public void addNotify(DropTargetContextPeer dtcp);
        public void removeNotify();
        protected Transferable createTransferableProxy(Transferable t,
                   boolean isLocal
        );
        protected void setTargetActions(int actions);
        protected int  getTargetActions();
        protected DataFlavor[] getCurrentDataFlavors();
        protected List getCurrentDataFlavorsAsList();
        protected boolean isDataFlavorSupported(DataFlavor df);
        protected Transferable getTransferable();
        // ...
}

Most of the access and control methods are protected, since public access to their state is usually achieved by calling through a particular DropTargetEvent subclass that delegates the request to the DropTargetContext.

The getDropTarget() method return the DropTarget that created this DropTargetContext.

The getComponent method returns the Component associated with the DropTarget that created this DropTargetContext.

The acceptDrag method is delegated from the similar method on DropTargetDragEvent and is invoked from one of the DropTargetListener's methods; dragEnter(), dragOver or dropActionChanged to signify that the recipient is prepared to accept a drop with the operation specified, which is usually the user's currently selected action.

The rejectDrag method is delegated from the similar method on DropTargetDragEvent and is invoked from one of the DropTargetListener's methods; dragEnter, dragOver or dropActionChanged to signify that the recipient is unable to accept a drop with the user's currently selected action.

The acceptDrop method is delegated from the similar method on DropTargetDropEvent and is invoked from the DropTargetListener's drop method to signify that the recipient is prepared to accept a drop with the operation specified, which is usually the user's currently selected action.

The rejectDrop method is delegated from the similar method on DropTargetDropEvent and is invoked from the DropTargetListener's drop method to signify that the recipient is unable to accept a drop with the user's currently selected action. This terminates a drag and drop operation without a data transfer.

The dropComplete method signals to the originating DragSource that the DropTargetListener has completed the transfer(s) that comprise the subject of the drag and drop operation and that the operation is complete. The success (or failure) of the transfer(s) and the subsequent application of the operation specified is signaled by the value of the actual parameter.

The getDataFlavors method returns an array of the DataFlavors available from the DragSource.

The getTransferable method returns a Transferable (not necessarily the one the DragSource registered, it may be a proxy, and certainly shall be in the inter-JVM case) to enable data transfers to occur via its getTransferData method. Note that it is illegal to invoke getTransferable without first invoking an acceptDrop.

The addNotify and removeNotify methods are exclusively called by the underlying platform's DropTargetContextPeer in order to notify the DropTargetContext that a drag and drop operation is occurring/ceasing on the DropTargetContext and associated DropTarget.

The createTransferableProxy method enables a DropTargetContext implementation to interpose a Transferable between the DropTargetListener and the Transferable provided by the caller, which is typically the underlying platform DropTargetContextPeer.

2.4.4 The DropTargetListener Definition

Providing the appropriate "Drag-under" feedback semantics, and processing of any subsequent Drop, is enabled through the DropTargetListener asssociated with a DropTarget.

The DropTargetListener determines the appropriate "Drag-under" feedback and its response to the DragSource regarding drop eligibility by inspecting the sources suggested actions, the data types available and the data itself.

A particular DropTargetListener instance may be associated with a DropTarget via addDropTargetListener and removed via removeDropTargetListener methods.

public interface java.awt.dnd.DropTargetListener
        extends java.util.EventListener {
        void dragEnter            (DropTargetDragEvent dtde);
        void dragOver             (DropTargetDragEvent dtde);
        void dropActionChanged    (DropTargetDragEvent dtde);
        void dragExit             (DropTargetDragEvent dtde);
        void drop                 (DropTargetDropEvent dtde);
}

The following context describes this graphic.

The dragEnter method of the DropTargetListener is invoked when the hotspot of the logical "Drag" Cursor intersects a visible portion of the DropTarget's associated Component's geometry. The DropTargetListener, upon receipt of this notification, shall interrogate the operations or actions, and the types of the data (DataFlavors) and the data itself as supplied by the DragSource to determine the appropriate actions and "Drag-under" feedback to respond with invocation of either acceptDrag or rejectDrag.

The dragOver method of the DropTargetListener is invoked while the hotspot of the logical "Drag" Cursor, in motion, continues to intersect a visible portion of the DropTarget's associated Component's geometry. The DropTargetListener, upon receipt of this notification, shall interrogate the operation "actions" the types of the data and the data itself as supplied by the DragSource to determine the appropriate "actions" and "Drag-under" feedback to respond with an invocation of either acceptDrag or rejectDrag.

The dragExit method of the DropTargetListener is invoked when the hotspot of the logical "Drag" Cursor ceases to intersect a visible portion of the DropTarget's associated Component's geometry, or immediately prior to a drop notification. The DropTargetListener, upon receipt of this notification, shall undo any "Drag-under" feedback effects it has previously applied. Note that the DropTargetContext associated with the DropTarget is invalidated as a side-effect.

The drop method of the DropTargetListener is invoked as a result of the user terminating their drag gesture while intersecting. The DropTargetListener, upon receipt of this notification, shall perform the operation specified by the return value of the getSourceActions method on the DropTargetDropEvent object, upon the Transferable object returned from the getTransferable method, and subsequently invoke the dropComplete method of the associated DropTargetContext to signal the success, or otherwise, of the operation.

2.4.5 The DropTargetDragEvent and DropTargetDropEvent Definitions

The DropTargetEvent and DropTargetDragEvent are defined as follows:

public abstract class java.awt.dnd.DropTargetEvent
          extends java.util.EventObject {

        public DropTargetContext getDropTargetContext();
        //...
}

A DropTargetEvent is passed to the DropTargetListener's dragExit method.

public class   java.awt.dnd.DropTargetDragEvent
                         extends java.awt.dnd.DropTargetEvent {
        public Transferable getTransferable();
        public Point  getLocation();
        public int   getSourceActions();
        public getDropAction();
        public DataFlavor[] getCurrentDataFlavors();
        public List  getCurrentDataFlavorsAsList();
        public boolean isDataFlavorSupported();
        public void acceptDrag(int operation);
        public void rejectDrag();
        //...
}

A DropTargetDragEvent is passed to the DropTargetListener's dragEnter, dragOver and dropActionChanged methods.

The getLocation method return the current co-ordinates, relative to the associated Component's origin, of the hotspot of the logical "Drag" cursor.

The getSourceActions method returns the current "actions", or operations (ACTION_MOVE, ACTION_COPY, or ACTION_REFERENCE) the DragSource associates with the current drag and drop gesture.

The return value of the getDropAction method is the action that is selected by the user's gesture.

The getCurrentDataFlavors, getCurrentDataFlavorsAsList and isDataFlavorSupported methods are provided in order for the recipient to interrogate the list of types available from the source.

The getTransferable method is provided in order for the recipient to interrogate the data available from the source. Note that getTransferable on the DropTargetDragEvent instance should only be called within the respective DropTargetListener's method, and all the necessary data should be retrieved from the returned Transferable before that method returns.

The DropTargetDropEvent is defined as follows:

public class java.awt.dnd.DropTargetDropEvent
          extends java.awt.dnd.DropTargetEvent {

        public Point      getLocation();
        public int getSourceActions();
        public int getDropAction();
        public void acceptDrop(int dropAction);
        public void rejectDrop();
        public boolean isLocalTransfer();
        public DataFlavor[] getCurrentDataFlavors();
        public List  getCurrentDataFlavorsAsList();
        public boolean isDataFlavorSupported(DataFlavor df);
        public Transferable getTransferable();
        public void dropComplete(boolean success);
        //...
}

A DropTargetDropEvent is passed to the DropTargetListener's drop method, as the drop occurs. The DropTargetDropEvent provides the DropTargetListener with access to the data associated with the operation, via the Transferable returned from the getTransferable method.

The return value of the getSourceActions method is defined to be the action(s) defined by the source at the time at which the drop occurred.

The return value of the getDropAction method is the action that is selected by the user's gesture.

The return value of the getLocation method is defined to be the location at which the drop occurred.

The getCurrentDataFlavors, getCurrentDataFlavorsAsList, and isDataFlavorSupported, methods are provided in order for the recipient to interrogate the list of types available from the source for subsequent transfer via the getTransferData method of the Transferable.

A typical implementation of the drop method will inspect the actions and the DataFlavors' available to determine if a successful exchange can occur or not.

When an exchange may occur, a DropTargetListener.drop implementation shall invoke acceptDrop with the selected operation as an actual parameter, prior to any invocation of getTransferable. Calling getTransferable prior to acceptDrop shall result in an InvalidDnDOperationException.

The rejectDrop shall be called to reject the drop operation. Once called no further interaction can occur between the two participants, therefore it is typical to return from the drop method immediately after calling this.

The isLocalTransfer method shall return true, if the source of the drag and drop operation resides within the same physical JVM as the recipient of the drop notification, and false otherwise.

This distinction is significant to the recipient when it receives object references back from invoking Transferable.getTransferData in the local case, since in this case the object reference it receives is the same object reference held by the source (i.e it is not a copy, proxy or distinct object) thus the recipient must treat such a shared object reference differently in the local case as follows:

  • If the action is ACTION_COPY then the recipient shall, depending upon the nature of the object(s) and data transferred, either take a copy of; the object itself, the data encapsulated within, or both.
  • If the action is ACTION_MOVE, then the recipient shall not modify the state of the object or the data encapsulated within until after it has signalled to the source, via an invocation of dropCompete that the transfer is effected. (Note that a source is also prohibited from modifying the state of such an object after it has returned such an object from it's getTransferData method, until such time as it receives a dragDropEnd notification.)
  • If the action is ACTION_LINK, neither the recipient nor the source shall alter the state of either the object exchanged or any data contained therein until after the dropComplete and dragDropEnd methods have been processed. Thereafter the sharing semantics are implementation dependent upon the object(s) shared.

The dropComplete method signals the end of the associated drag and drop operation, and indicates the success (or failure) of the transfers performed by the recipient. Invoking this method results in the DragSourceListener's dragDropEnd method being called with the appropriate state available from it's DragSourceDropEvent. Failure to invoke this method will result in the drag and drop operation failing to terminate properly.

2.4.6 Autoscrolling Support

Many GUI Components present a scrollable "viewport" over a (potentially) large dataset. During a drag and drop operation it is desirable to be able to "autoscroll" such "viewports" to allow a user to navigate over such a dataset, scrolling to locate a particular member (initially not visible through the "viewport") that they wish to drop the subject of the operation upon.

Components that are scrollable provide drag "autoscrolling" support to their DropTarget by implementing the following interface:

public interface Autoscroll {
        Insets getAutoscrollInsets();
        void autoScrollContent(Point cursorLocn);
}

An implementing DropTarget shall periodically call the autoscroll method of its associated Component (if present), passing the current logical cursor location in Component co-ordinates, when the following conditions are met:

  • If the logical cursor's hotspot intersects with the associated Component's visible geometry and the boundary region described by the Insets returned by the getAutoscrollInsets method.
  • If the logical cursor's hotspot has not moved (subject to the next condition below) for an implementation defined period (millisecs)
  • If any cursor movement subsequent to the initial triggering occurrence does not exceed a platform dependent hysteresis value (pixels).

Should any of the above conditions cease to be valid, autoscrolling shall terminate until the next triggering condition occurs.

Both the initial delay prior to autoscrolling commencing, the interval between autoscrolling notifications, and the pixel hysteresis value are externally configurable and can be queried from the Toolkit.getDesktopProperty method.

2.5 Data Transfer Phase

In the case where a valid drop occurs, the DropTargetListener's drop method is responsible for undertaking the transfer of the data associated with the gesture. The DropTargetDropEvent provides a means to obtain a Transferable object that represent that data object(s) to be transferred.

From the drop method, the DropTargetListener shall initially either rejectDrop (immediately returning thereafter) or acceptDrop specifying the selected operation from those returned by getSourceActions.

Subsequent to an acceptDrop, but not before, getTransferable may be invoked, and any data transfers performed via the returned Transferable's getTransferData method. Finally, once the destination of the drop has completed the transfer(s) of the objects from the source it shall signal the success, or immediate failure, of the transfer(s) via an invocation of DropTargetContext.dropComplete.

Upon returning from the DropTargetContext.dropComplete method the Transferable and DragSourceContext instances are no longer guaranteed to be valid and all references to them shall be discarded by the recipient to allow them to be subsequently garbage collected.

When using the ACTION_REFERENCE operation the source and destination should take care to agree upon the object and the associated semantics of the transfer. Typically in intra-JVM transfers a live object reference would be passed between source and destination, but in the case of inter-JVM transfers, or transfers between native and Java applications, live object references do not make sense, so some other ‘reference' type should be exchanged such as a URI for example. Both the DragSource and DropTarget can detect if the transfer is intra-JVM or not.

2.5.1 FlavorMap and SystemFlavorMap

All the target DnD platforms represent their transfer data types using a similar mechanism, however the representations do differ. The Java platform uses MIME types encapsulated within a DataFlavor to represent its data types. Unfortunately in order to permit the transfer of data between Java and platform native applications the existence of these platform names need to be exposed, thus a mechanism is required in order to create an extensible (platform independent) mapping between these platform dependent type names, their representations, and the Java MIME based DataFlavors.

The implementation will provide a mechanism to externally specify a mapping between platform native data types (strings) and MIME types (strings) used to construct DataFlavors. This external mapping will be used by the underlying platform specific implementation code in order to expose the appropriate DataFlavors (MIME types), exported by the source, to the destination, via the underlying platform DnD mechanisms.

Both the DragSource and DropTarget classes provide access for the underlying system to map platform dependent names to and from DataFlavors.

public interface java.awt.datatransfer.FlavorMap {
        java.util.Map getNativesForFlavors(DataFlavor[] dfs);
        java.util.Map getFlavorsForNatives(String[] natives);
}

The getNativesForFlavors method takes an array of DataFlavors and returns a Map object containing zero or more keys of type DataFlavor, from the actual parameter dfs, with associated values of type String, which correspond to the platform-dependent type name for that MIME type.

The getFlavorsForNatives method takes an array of String types and returns a Map object containing zero or more keys of type String, from the actual parameter natives, with associated values of type DataFlavor, which correspond to the platform-independent type for that platform-dependent type name.

The Map object returned by both methods may be mutable but is not required to be.

If NULL is passed to either of these methods they should return their current map of all keys and values known to the implementation at the time of the call.

For example on Win32 the Clipboard Format Name for simple text is "CF_TEXT" (actually it is the integer 1) and on Motif it is the X11 Atom named "STRING", the MIME type one may use to represent this would be "text/plain;charset=us-ascii". Therefore a platform portable FlavorMap would map between these names; CF_TEXT on win32 and STRING on Motif/X11.

Typically, as implemented in the SystemFlavorMap these mappings are held in an external persistent configuration format (a properties file or URL) and are loaded from the platform to configure the FlavorMap appropriately for a given platform.

The SystemFlavorMap class is provided to implement a simple, platform configurable mechanism for specifying a system-wide set of common mappings, and is defined as follows:

public class  java.awt.datatransfer.SystemFlavorMap implements FlavorMap, FlavorTable {
        public static FlavorMap getSystemFlavorMap();
        public synchronized Map getNativesForFlavors(DataFlavor[] dfs);
        public synchronized Map getFlavorsForNatives(String[] natives);
        public static String encodeDataFlavor(DataFlavor flav);
        public static String encodeJavaMIMEType(String mimeType);
        public static boolean isJavaMIMEType(String mimeStr);
        public static String decodeJavaMIMEType(String nat);
        public static DataFlavor decodeDataFlavor(String nat);
        //...
}

The SystemFlavorMap class provides a simple implementation, using a properties file (see java.awt.Properties), of a persistent platform FlavorMap. Using the value of the AWT property "AWT.flavorMapFileURL" (see Toolkit.getProperty) or the default file location of System.getProperty("java.home") + File.separator + "lib" + File.separator + "flavormap.properties", this class creates the appropriate Maps from the properties found therein.

In addition the class provides several static convenience functions used to encode and decode Java MimeTypes to and from a platform dependent namespace. The syntax of the properties file is:

{ <platform_type_name> ‘=' <IETF_MIME_RFC_conformant_specification> <nl> } *

The default implementations of DragSource and DropTarget return the SystemFlavorMap from their getFlavorMap method, unless they have been provided with an overriding implementation.

2.5.2 Transferring Data across the JVM boundary

Since one of the primary goals of this API is to allow drag and drop of data between Java and native applications this has some significant consequences upon the method and mechanism of the actual data encoding and exchange when data is passed across the boundary of the Java Virtual Machine.

Since one of the participants in such an exchange may be a native application, and thus has no knowledge of the Java type system, the drag and drop system cannot just exchange a Java object reference since the other participant may have no knowledge of, or capability to manipulate such a type.

When any exchange occurs, it can only do so, regardless of the implementation of the participants, if and only if both participants are agreed upon a familiar data type and encoding. Thus, sadly the burden of the exchange is born mostly by the participants themselves.

What this means in practical terms is that for "native" data formats, such as platform-dependent image, document, or other "Content-Types" the encoding and decoding of their associated external data format is the responsibility of the source and destination of the transfer.

The drag and drop system shall expose the external representation of such "native" data types across the boundary of the Java Virtual Machine as encapsulated within a java.io.InputStream or a subclass thereof.

This means that any DataFlavor with a representation class that extends java.io.InputStream can be transferred, and will be exposed for transfer, across the Java Virtual Machine boundary.

To implement the exchange of such a native data type, a developer would define a DataFlavor with a MIME "Content-Type" that describes the nature of the "native" data type, with a representation class that extends a java.io.InputStream class that encodes the data encapsulated into a stream of bytes.

In particular such InputStream subclasses shall implement the following semantics:

  • Provide a public constructor with a single argument of type java.io.InputStream.

    Provision of this constructor by a subclass of java.io.InputStream will allow the drag and drop system (associated with the DropTarget) to automatically re-construct an instance of the representation class specified by the requested DataFlavor, and initialize it with an InputStream containing the encapsulated data formatted according to the expectations of that subclass. Once initialized this instance is returned to the caller of the Transferable.getTransferData method, thus allowing the caller to subsequently re-read and interpret the formatted content of the data stream transferred.

  • Provide an implementation of InputStream.read(byte b[], int off, int len).

Provision of this method (or inheriting a superclasses implementation) enables the drag and drop system (associated with the DragSource) to automatically extract an encoded stream of the encapsulated data from the Transferable, thus enabling the transfer of the data across the JVM boundary as a simple byte stream to the requestor of the particular DataFlavor.

2.5.3 Transferring lists of files across the JVM boundary.

A typical subject of a Drag and Drop transfer is a list of one or more platform dependent filenames. In order to ease the programming task of developers either producing or consuming such lists the drag and drop system treats them as a special case.

If a DataFlavor is specified with a MIME "Content-Type" of application/x-java-file-list;class=java.util.List the drag and drop system will expect the list elements to be a homogeneous list of objects of type java.io.File. Thus a source shall, if supporting the transfer of a list of files, construct such a List of File objects when such a DataFlavor is requested, and a recipient shall expect such a List of File objects if it requests such a valid DataFlavor from its source. This special case provides a simple mechanism for the transfer of lists of files between source and target.

2.5.4 Transferring java.rmi.Remote references across the JVM boundary.

It is possible to Drag and Drop object references between JVMs' by using the facilities of the RMI mechanism. The Drag and Drop system will automatically arrange for the transfer of any object reference that adheres to these requirements:

  • The representation class of interface associated with the requested DataFlavor implements both java.rmi.Remote and java.io.Serializable.

    (the MIME "Content-Type" can be any suitable, arbitrary type or application/x-java-remote-object)

    (effectively the object implementation class transferred should be extended from java.rmi.server.UnicastRemoteObject since the RMI system implements some required initialization, without which the transfer will not complete properly).

  • The drop action is ACTION_LINK.

If these conditions are met, then if an appropriate DataFlavor is requested, then the object returned to the requestor (if it is in a difference JVM from the source) will be an RMI reference to an instance of the Remote object subinterface specified as the representation class of the DataFlavor.

3.0 Issues

3.0.1 What are the implications of the various platform protocol engines?

Due to limitations of particular underlying platform drag and drop and window system implementations, the interaction of a drag operation, and the event delivery semantics to AWT Components is platform dependent. Therefore during a drag operation a DragSource may process platform Window System Events pertaining to that drag to the exclusion of normal event processing.

Due to interactions between the single-threaded design center of the platform native DnD systems, and the native window system event dispatching implementations in AWT, "callbacks" into DropTargetListener and DragSourceListener will occur either on, or synchronized with the AWT system event dispatch thread. This behavior is highly undesirable for security reasons but is an implementation, not architectural feature, and is unavoidable.

3.0.2 Inter/Intra VM transfers?

To enable intra-JVM Drag and Drop Transfers the existing DataFlavor class will be extended to enable it to represent the type of a "live" object reference, as opposed to a Serialized (persistent) representation of one. Such objects may be transferred between source and destination within the same JVM and ClassLoader context.

The MIME Content-Type shall be application/x-java-local-objectref.

3.0.3 Lifetime of the Transferable(s)?

Transferable objects, their associated DataFlavors', and the objects that encapsulate the underlying data specified as the operand(s) of a drag and drop operation shall remain valid until, at least, the DragSourceListener associated with the DragSource controlling the operation, receives a dragDropEnd. The lifetime of the subject(s) of the operation, transferred between source and target is implementation defined beyond that point in time.

3.0.4 Implications of ACTION_MOVE semantics on source objects exposed via Transferable?

The "source" of a successful Drag and Drop (ACTION_MOVE) operation is required to delete/relinquish all references to the object(s) that are the subject of the Transferable immediately after transfer has been successfully completed. That is before returning from the DragSourceListener.dragDropEnd notification.

3.0.5 Semantics of ACTION_REFERENCE operation.

As a result of significant input from developers to an earlier version of the specification an additional operation/action tag; ACTION_REFERENCE was added to include existing platform Drag and Drop"Link" semantics.

It is believed that Reference, or Link, semantics are already sufficiently poorly specified for the platform native Drag and Drop to render it essentially useless even between native applications, thus between native and platform independent Java applications it is not recommended.

For Java to Java usage the required semantic; within the same JVM/ClassLoader, is defined such that the destination shall obtain a Java object reference to the subject(s) of the transfer. Between Java JVM's or ClassLoaders, the semantic is implementation defined, but could be implemented through transferring either a URL from the source to the destination or an RMI Remote reference.

Appendix A : DropTargetPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DropTargetPeer {
        void addDropTarget(DropTarget dt);
        void removeDropTarget(DropTarget dt);
}

Appendix B : DragSourceContextPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DragSourceContextPeer {
    void startDrag(DragSourceContext dsc,
                   Cursor            c,
                   Image             di,
                   Point             ioff
    ) throws InvalidDnDOperationException;
    Cursor getCursor();
    void   setCursor(Cursor c) throws InvalidDnDOperationException;
    void transferablesFlavorsChanged();
}

Appendix C : DropTargetContextPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DropTargetContextPeer {
    int  getTargetActions();
    void setTargetActions(int actions);
    DropTarget getDropTarget();
    DataFlavor[] getTransferDataFlavors();
    Transferable getTransferable() throws InvalidDnDOperationException;
    boolean isTransferableJVMLocal();
    void acceptDrag(int dragAction);
    void rejectDrag();
    void acceptDrop(int dropAction);
    void rejectDrop();
    void dropComplete(boolean success);
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Extension Versioning

Documentation Contents

Optional Package Versioning

Note: Optional packages is the new term for what used to be known as standard extensions or just extensions.

This section includes the following topics:

  • Overview
  • Manifest Attributes for Use by Installed Optional Packages
  • Manifest Attributes for Use by Applet Jar Files
  • Java Plug-in Update Rules
  • Download and Installation of Optional Packages

Overview

Java SE 1.3 introduced support for an expanded set of Jar-file manifest attributes that enable applets to specify version and vendor information for the optional packages that they require. The manifests of Jar-packaged applets can specify a URL at which the latest version of the optional package the Java Plug-in can download if

  • the needed optional package is not already installed in the Java runtime environment, or
  • the optional package is installed but has an out-of-date version number, or
  • the optional package is installed but is not from a specified vendor.

The manifest attributes that can be used to specify version and vendor information are described below.

Manifest Attributes for Use by Installed Optional Packages

The following portion of a sample manifest file illustrates the attributes that are available for use by optional packages.
Extension-Name: javax.help
Specification-Vendor: Oracle Corporation
Specification-Version: 1.0
Implementation-Vendor-Id: com.sun
Implementation-Vendor: Oracle, Inc
Implementation-Version: 1.0
The attributes in this example are:
Extension-Name
This attribute specifies a name for the optional package contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the optional package.
Specification-Vendor
This attribute identifies the company that originated the specification to which the optional package conforms.
Specification-Version
This attribute specifies the version number of the specification to which the implementation conforms.
Implementation-Vendor-Id
This attribute's value is a unique identifier for the company that produced the optional package implementation contained in the Jar file.
Implementation-Vendor
This attribute's value is the name of the company that produced the implementation of the optional package. This attribute should be used only for such purposes such as user feedback, and the Java Plug-in software does not use it to identify the optional package vendor. Rather, the Java Plug-in relies on the Implementation-Vendor-Id attribute to provide unique vendor identification.
Implementation-Version
This attribute indicates the vendor's version number for the implementation of the optional package.

Each optional package installed in the Java runtime environment can use these manifest attributes to identify itself. When the Java Plug-in is running an applet that requires an optional package, the plug-in can access these attributes to determine if the installed optional packages match the vendor and version criteria specified by the applet. The applet specifies such information by using the manifest attributes described in the following section. Note that all of the above manifest attributes should be included in an optional package's manifest. If the plug-in looks for but doesn't find one of these attributes in an optional package's manifest, it will assume that the optional package is not suitable for the applet.

Manifest Attributes for Use by Applet Jar Files

The following sample manifest file illustrates the attributes that are available for use by Jar-packaged applets. (This sample is for illustrative purposes only. No actual optional packages are available at the URLs mentioned in this example.)
Extension-List: javahelp java3d
javahelp-Extension-Name: javax.help
javahelp-Specification-Version: 1.0
javahelp-Implementation-Version: 1.0.3
javahelp-Implementation-Vendor-Id: example.com
javahelp-Implementation-URL: http://www.example.com/products/stdext/javahelp.jar
java3d-Extension-Name: javax.3d
java3d-Specification-Version: 1.0
java3d-Implementation-Version: 1.2.1
java3d-Implementation-Vendor-Id: example.com
java3d-Implementation-URL: http://www.example.com/products/stdext/java3d.jar
The attributes used in this example are:
Extension-List
This attribute indicates the optional packages that are needed by the applet. Each optional package listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the optional package it requires.
<extension>-Extension-Name
This attribute is the unique name of the optional package. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed optional packages to determine if the optional package is installed.
<extension>-Specification-Version (Optional)
This attribute specifies the minimum optional package specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed optional package to determine if the optional package is up to date.
<extension>-Implementation-Version (Optional)
This attritute specifies the miminum optional package implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed optional package to see if a more recent implementation needs to be downloaded.
<extension>-Implementation-Vendor-Id (Optional)
This attribute can be used to identify the vendor of an optional package implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed optional package.
<extension>-Implementation-URL
This attritute specifies a URL that can be used to obtain the most recent version of the optional package if the required version is not already installed.

Java Plug-in Update Rules

The Java Plug-in performs the following determinations when loading an applet whose manifest indicates that it needs one or more optional packages:

  • If an optional package with the correct value of the Extension-Name attribute is not installed, the Java Plug-in will prompt the user to let it download the optional package.
  • If an optional package with the correct value of the Extension-Name attribute is already installed, the Java Plug-in makes the following comparisons:
    • If the optional package's Specification-Version value is greater or equal to that required by the applet:
      • If the Implementation-Vendor-Id attributes match:
        • If the optional package's Implementation-Version is greater than or equal to that specified in the applet's manifest, do nothing - an up-to-date version of the optional package is already installed.
        • If the optional package's Implementation-Version is less than that specified in applet's manifest, the plug-in will prompt the user to download an upgrade from the same vendor.
      • If the Implementation-Vendor-Id attributes do not match, the Java Plug-in will prompt the user to download the optional package from the vendor specified in the applet's manifest.
    • If the optional package's Specification-Version value is less than that required by the applet:
      • If the optional package's Implementation-Vendor-Id matches that indicated in the applet's manifest, the Java Plug-in will prompt the user to download an updated optional package from the same vendor.
      • If the optional package's Implementation-Vendor-Id does not match that specified by the applet's manifest, the Java Plug-in will prompt the user to download the optional package from the vendor specified in the applet's manifest.

If the applet's manifest doesn't contain one or more of the optional attributes, the plug-in will accept any value of the corresponding attribute in the optional package's manifest.

Download and Installation of Optional Packages

The following considerations pertain to optional packages that are downloaded by the Java Plug-in.

The optional package download URL as indicated in the applet manifest's <extension>-Implementation-URL attribute need not be limited to the Applet codebase.

All downloadable files should be signed using a DSA or RSA certificate. Any optional packages not so signed will not be installed but instead will be treated as a bundled optional package and loaded through the applet class loader, sharing the applet security attributes.

When the Java Plug-in retrieves an optional package from the URL indicated in the applet's manifest, it will check the optional package's manifest for a Main-Class attribute after verifying the optional package's signature. If the optional package's manifest file does not contain a Main-Class attribute, the Java Plug-in will simply drop the Jar file into the optional packages directory of the runtime environment (jre/lib/ext in the JDK and lib/ext in the JRE).

Some optional package Jar files may contain their own installer programs in either native code or as applications written in the Java programming language. Such an installer program may be necessary for purposes such as installing native libraries or accessing the Microsoft Windows registry, for example. If the Java Plug-in finds a Main-Class attribute in the optional package's manifest, it will assume that it indicates a class that serves as a Java-language installer and will invoke the main() method of that class.

An optional package's manifest may alternatively contain a Extension-Installation attribute. The value of this field will point to a native installation application that is to be used by the Java Plug-in to install the optional package.

The URL of an optional package as specified by the <extension>-Implementation-URL must point to a JAR-file. The plug-in will not download and install optional packages packaged as .exe or .bin files.

Some optional packages come packaged in different Jar files for different operating systems. Such cases can be accomodated by the <extension>-Implementation-URL attribute by using the $(os-name)$ construction in the attribute's value. Here is an example.

javaExt-Implementation-URL: http://.../stdext/javaExt-$(os-name)$.jar
Here, $(os-name)$ is the name of target operating system as defined by the os.name system property.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Extensions Enhancements

Java has added functionality to the Extensions packages in the versions listed below:

  • Enhancements in Java SE 6 (link to correct anchor when content is fleshed out; dummy content is currently commented out in this document)
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements to the extension mechanism in version 1.3 included an extended set of manifest attributes that can be used for checking vendor and versioning information of installed optional packages. If an applet requires an optional package that isn't installed, or that is installed but has the wrong version number or is not from the appropriate vendor, the Java Plug-in can download the needed extension from a specified URL. For more information, see Optional-Package Versioning.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Optional Package Overview

Documentation Contents

Optional Packages - An Overview

Contents

  • What an optional package is
  • Installed optional packages
  • Download optional packages

What an optional package is

Note: Optional packages were formerly known as standard extensions or just extensions.

Optional packages are packages of Java classes and associated native code that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java virtual machine (VM) to use the optional-package classes in much the same way as the VM uses bootstrap classes. (Bootstrap classes are those implementing the core platform, contained in jre/lib/rt.jar and several other important jar files. These include classes of the public API such as java.lang, java.io, etc., and classes supporting the platform's internationalization/localization features.). Like bootstrap classes, classes in optional packages do not have to be placed on the class path. The extension mechanism also provides a way for needed optional packages to be retrieved from specified URLs when they are not already installed in the Java 2 Runtime Environment or JDK.

Optional packages are embodied in JAR files, and every JAR file is a potential optional package. A JAR file can be made to play the role of an optional package in two ways:

  • by being placed in a special location in the Java 2 Runtime Environment or JDK directory structure - in which case it is an installed optional package.
  • by being referenced in a specified way from the manifest of the JAR file of an applet or application - in which case it is a download optional package.

When the VM is searching for a class of a particular name, it will first look among the bootstrap classes. If it fails to find the desired class there, it will next look for the class among any installed optional packages. If it doesn't find the class among either the bootstrap classes or the installed optional packages, the VM will search among any download optional packages referenced by the application or applet. The VM only searches the class path if it fails to find a class among the bootstrap classes or optional package classes.

Installed optional packages

Installed optional packages are JAR files in the following directories:

  • lib/ext (in the JRE)
  • jre/lib/ext (in the JDK)

Classes within JAR files in this directory can be used by applets and applications much as if they were part of the set of bootstrap classes, without having to explicitly include them in the class path.

An installed optional package's native code binaries, if any, are placed in

  • jre\bin (Microsoft Windows)
  • jre/lib/<arch> (Solaris operating environment)

where <arch> is the Solaris processor architecture, either sparc or i386. Native libraries may also be placed in jre/lib/ext/<arch> for both Microsoft Windows and the Solaris operating environment, where <arch> will be i386 on Microsoft Windows systems. The jre/lib/ext/<arch> directory is searched after jre\bin or jre/lib/<arch>.

When the Java VM encounters a class name, it looks first for the class in the runtime environment. If it fails to find the desired class among the classes that are part of the standard runtime environment, the VM will search for the class in any JAR files in the optional packages directory.

Note that there is nothing special about any particular JAR file itself or the classes it contains that makes it an installed optional package. It is an installed optional package by virtue of its location in jre/lib/ext.

The manifest of an installed optional package's JAR file should contain version and vendor information for use by applets that need to use the optional packages classes. The attributes that specify the version and vendor information are described in Optional Package Versioning. Here is an example of what such a manifest might look like:

Manifest-version: 1.0
Extension-Name: javax.extension
Specification-Version: 1.0
Specification Vendor: Oracle Corporation.
Implementation-Vendor: Oracle Corporation.
Implementation-Vendor-Id: com.sun
Sealed: true

This version and vendor information can be used by the Java Plug-in when running an applet to see if optional packages needed by the applet are installed, are up to date, and are from the vendor requested by the applet. If not, the Java Plug-in can prompt the applet user to download the proper optional package. See Optional Package Versioning for more information.

If a class is not found after searching both the system classes and the classes in the installed optional packages, the extension mechanism will search for the class in a download optional package....

Download optional packages

A download optional package is a JAR files that is specified in the Class-Path header field in the manifest of another JAR files. Classes in download optional packages may be used by classes in the referencing JAR file. In a typical situation, an applet will be bundled in a JAR file whose manifest references a JAR file (or several JAR files) that will serve as an optional package for the purposes of that applet. Optional packages may reference each other in the same way.

A Class-Path header might look like this, for example:

Class-Path: servlet.jar infobus.jar acme/beans.jar

This specifies that the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as optional pakcages for purposes of the classes in the JAR file whose manifest contains this header. The URLs in the Class-Path field are given relative to the URL of the JAR file of the applet or application.

Unlike the case of installed optional packages, the location of the JAR files that serve as download optional packages is irrelevent. A download optional package is an optional package because it is specified as the value of the Class-Path header in another JAR file's manifest, not because it has any particular location.

Another difference between installed and download optional packages is that only applets and applications bundled in a JAR file can make use of download optional packages. Applets and applications not bundled in a JAR file don't have a manifest from which to reference download optional packages.

When searching for a class, the VM first searches among the classes in the system classes and in any installed optional packages. If the class is not found in either the system classes or in the installed optional packages, the VM will search for the class in any download optional packages referenced by the manifest of the application or applet. A download optional package will not be downloaded if a desired class is found among the installed optional packages, even if the download optional package is referenced by the manifest file of the applet or application.

The extension mechanism will not install a download optional package in the JRE or JDK directory structure. Download optional packages do not become installed extentions after they have once been downloaded.

Unlike installed optional packages, download optional packages cannot have any native code.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Extension Mechanism

for Support of Optional Packages

Optional packages are packages of classes (and any associated native code) that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java virtual machine (VM) to use the classes of the optional extension in much the same way as the VM uses classes in the Java Platform. The extension mechanism also provides a way for needed optional packages to be retrieved from specified URLs when they are not already installed in the JDK or JRE.

Overview

Overview - What optional packages are and how to use them.

API Specification

The following classes play a role in the extension mechanism:

  • java.lang.ClassLoader
  • java.lang.Package
  • java.lang.Thread
  • java.net.JarURLConnection
  • java.net.URLClassLoader
  • java.security.SecureClassLoader

See also the Related APIs section of the mechanism specification for notes on these APIs.

Tutorials and Programmer's Guides

Located on the Java Software website:

  • The Extension Mechanism trail of the Java Tutorial.

API Enhancements

For details, see Enhancements.

More Information

Extension Mechanism Architecture - Notes on the extension mechanism API and how optional packages use the Jar file format.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Extension Mechanism

Documentation Contents

Extension Mechanism Architecture

Contents

  • Introduction
  • The Extension Mechanism
    • Architecture
    • Optional Package Deployment
    • Bundled Optional Packages
    • Installed Optional Packages
  • Optional Package Sealing
  • Optional Package Security
  • Related APIs

Introduction

Note: Optional packages are the new name for what used to be known as standard extensions. The "extension mechanism" is that functionality of the JDK and JRE that supports the use of optional packages.

This document describes the mechanism provided by the Java™ platform for handling optional packages. An optional package is a group of packages housed in one or more JAR files that implement an API that extends the Java platform. Optional package classes extend the platform in the sense that the virtual machine can find and load them without their being on the class path, much as if they were classes in the platform's core API.

Since optional packages extend the platform's core API, their use should be judiciously applied. Most commonly they are used for well standardized interfaces such as those defined by the Java Community Process, although it may also be appropriate for site wide interfaces. Optional packages are rarely appropriate for interfaces used by a single, or small set of applications.

Furthermore, since the symbols defined by installed optional packages will be visible in all Java processes, care should be taken to ensure that all visible symbols follow the appropriate "reverse domain name" and "class hierarchy" conventions. For example, com.mycompany.MyClass.

An implementation of an optional package may consist of code written in the Java programming language and, less commonly, platform-specific native code. In addition, it may include properties, localization catalogs, images, serialized data, and other resources specific to the optional package.

Support for optional packages in browsers such as Internet Explorer and Netscape Navigator is available through the Java Plug-in. See Applet Developer's Guide for more information.

A optional package is an implementation of an open, standard API (examples of optional packages JavaServlet, Java3D, JavaManagement). Most optional packages are rooted in the javax.* namespace, although there may be exceptions.

The Extension Mechanism

Architecture

The extension mechanism is designed to contain the following elements:
  • an optional package or application packaged as a JAR file can declare dependencies on other JAR files, thus allowing an application to consist of multiple modules, and,
  • the class loading mechanism is augmented to search installed optional packages (and other libraries) for classes, and, if that fails, to search along an application-specified path for classes.
Applications must therefore, in general, be prepared to specify and supply the optional packages (and, more generally, libraries) that it needs. The system will prefer installed copies of optional packages (and libraries) if they exist; otherwise, it will delegate to the class loader of the application to find and load the referenced optional package (and library) classes.

This architecture, since it allows applications, applets and servlets to extend their own class path, also permits packaging and deploying these as multiple JAR files.

Each optional package or application consists of at least one JAR file containing an optional manifest, code and assorted resources. As described below, this primary JAR file can also include additional information in its manifest to describe dependencies on other JAR files. The jar command line tool included with the JDK provides a convenient means of packaging optional packages. (See the reference pages for the jar tool: [Microsoft Windows] [Solaris, Linux, or Mac OS X])

An optional package or application may refer to additional JAR files which will be referenced from the primary JAR, and these can optionally contain their own dependency information as well.

Packages comprising optional packages should be named per the standard package naming conventions when implementing optional packages. These conventions are outlined in The Java Language Specification, but the requirement that the domain prefix be specified in all upper case letters has been removed. For example, the package name com.sun.server is an accepted alternative to COM.sun.server. Unique package naming is recommended in order to avoid conflicts, because applications and optional packages may share the same class loader.

Optional Package Deployment

An optional package may either be bundled with an application or installed in the JRE for use by all applications. Bundled optional packages are provided at the same code base as the application and will automatically be downloaded in the case of network applications (applets). For this reason, bundled optional packages are often called download optional packages. When the manifest of a bundled optional package's JAR file contains version information and the JAR is signed, it can be installed into the extensions directory of the JRE which downloads it. Installed optional packages are loaded when first used and will be shared by all applications using the same JRE.

When packaging optional packages, the JAR file manifest can be used to identify vendor and version information (see Package Version Identification).

Classes for installed optional packages are shared by all code in the same virtual machine. Thus, installed optional packages are similar to the platform's core classes (in rt.jar), but with an associated class loader and a pre-configured security policy as described below.

Classes for bundled optional packages are private to the class loader of the application, applet or servlet. In the case of network applications such as applets, these optional packages will be automatically downloaded as needed. Since class loaders are currently associated with a codebase, this permits multiple applets originating from the same codebase to share implementations (JARs). However, signed bundled optional packages with version information as described above are installed in the JRE, and their contents are available to all applications running on that JRE and are therefore not private.

Bundled Optional Packages

The manifest for an application or optional package can specify one or more relative URLs referring to the JAR files and directories for the optional packages (and other libraries) that it needs. These relative URLs will be treated relative to the code base that the containing application or optional package JAR file was loaded from.

An application (or, more generally, JAR file) specifies the relative URLs of the optional packages (and libraries) that it needs via the manifest attribute Class-Path. This attribute lists the URLs to search for implementations of optional packages (or other libraries) if they cannot be found as optional packages installed on the host Java virtual machine*. These relative URLs may include JAR files and directories for any libraries or resources needed by the application or optional package. Relative URLs not ending with '/' are assumed to refer to JAR files. For example,

Class-Path: servlet.jar infobus.jar acme/beans.jar images/
At most one Class-Path header may be specified in a JAR file's manifest..

Currently, the URLs must be relative to the code base of the JAR file for security reasons. Thus, remote optional packages will originate from the same code base as the application.

Each relative URL is resolved against the code base that the containing application or optional package was loaded from. If the resulting URL is invalid or refers to a resource that cannot be found then it is ignored.

The resulting URLs are used to extend the class path for the application, applet, or servlet by inserting the URLs in the class path immediately following the URL of the containing JAR file. Any duplicate URLs are omitted. For example, given the following class path:

a.jar b.jar
If optional package b.jar contained the following Class-Path manifest attribute:
Class-Path: x.jar a.jar
Then the resulting application class path would be the following:
a.jar b.jar x.jar
Of course, if x.jar had dependencies of its own then these would be added according to the same rules and so on for each subsequent URL. In the actual implementation, JAR file dependencies are processed lazily so that the JAR files are not actually opened until needed.

Installed Optional Packages

The JAR files of a installed optional package are placed in a standard local code source:
<java-home>\lib\ext                     [Microsoft Windows]
<java-home>/lib/ext                     [Solaris OS, Linux]

Here <java-home> refers to the directory where the runtime software is installed (which is the top-level directory of the JRE or the jre directory in the JDK).

The locations for installed optional packages can be specified through the system property java.ext.dirs. This property specifies one or more directories to search for installed optional packages, each separated by File.pathSeparatorChar. The default setting for java.ext.dirs is the standard directory for installed optional packages, as indicated above. For Java 6 and later, the default is enhanced: it is suffixed with the path to a platform-specific directory that is shared by all JREs (Java 6 or later) installed on a system:

%SystemRoot%\Sun\Java\lib\ext           [Microsoft Windows]
/usr/java/packages/lib/ext              [Linux]
/usr/jdk/packages/lib/ext               [Solaris OS]

An installed optional package may also contain one or more shared libraries (such as .dll files) and executables. In what follows, <arch> will be shown but in practice should be the name of an instruction set architecture, for example sparc, sparcv9, i386, and amd64. These can be installed in one of two places. The first to be searched is:

<java-home>\bin                         [Microsoft Windows]
<java-home>/lib/<arch>                  [Solaris OS, Linux]

The second extension directory to be searched applies only to Java 6 and later. As with Java packages, native libraries can be installed in directories that will be shared by all Java 6 and later JREs:

%SystemRoot%\Sun\Java\bin               [Microsoft Windows]
/usr/java/packages/lib/<arch>           [Linux]
/usr/jdk/packages/lib/<arch>            [Solaris OS]

An optional package that contains native code cannot be downloaded by network code into the virtual machine at execution time, whether such code is trusted or not. An optional package that contains native code and is bundled with a network application must be installed in the JDK or JRE.

By default, installed optional packages in this standard directory are trusted. That is, they are granted the same privileges as if they were core platform classes (those in rt.jar). This default privilege is specified in the system policy file (in <java-home>/jre/lib/security/java.policy), but can be overridden for a particular optional package by adding the appropriate policy file entry (see Permissions in the JDK).

Note also that if a installed optional package JAR is signed by a trusted entity, then it will be granted the privileges associated with the trusted signer.

Optional Package Sealing

JAR files and packages can be optionally sealed, so that an optional package or package can enforce consistency within a version.

A package sealed within a JAR specifies that all classes defined in that package must originate from the same JAR. Otherwise, a SecurityException is thrown.

A sealed JAR specifies that all packages defined by that JAR are sealed unless overridden specifically for a package.

A sealed package is specified via the manifest attribute, Sealed, whose value is true or false (case irrelevant). For example,

Name: javax/servlet/internal/
Sealed: true
specifies that the javax.servlet.internal package is sealed, and that all classes in that package must be loaded from the same JAR file.

If this attribute is missing, the package sealing attribute is that of the containing JAR file.

A sealed JAR is specified via the same manifest header, Sealed, with the value again of either true or false. For example,

Sealed: true
specifies that all packages in this archive are sealed unless explicitly overridden for a particular package with the Sealed attribute in a manifest entry.

If this attribute is missing, the JAR file is assumed to not be sealed, for backwards compatibility. The system then defaults to examining package headers for sealing information.

Package sealing is also important for security, because it restricts access to package-protected members to only those classes defined in the package that originated from the same JAR file.

Package sealing is checked for installed as well as downloaded optional packages, and will result in a SecurityException if violated. Also, the null package is not sealable, so classes that are to be sealed must be placed in their own packages.

Optional Package Security

The code source for a installed optional package (namely <java-home>/lib/ext) has a pre-configured security policy associated with it. The exact level of trust granted to JARs in this directory is specified by the standard security policy configuration file
<java-home>/lib/security/java.policy
The default policy is for a installed optional package to behave the same way it would if were part of the core platform. This follows from the common need for a installed optional package to load native code.

The Java Security Model provides some safety when installed optional package code is called from untrusted code. However optional package code must be carefully reviewed for potential security breaches wherever it uses privileged blocks.

A remotely loaded optional package that needs to use access-checked system services (such as file I/O) to function correctly must either be signed by a trusted entity or loaded from a trusted source.

Consult the Java security documentation for further details regarding how to write optional package and application code to use the security features of the Java Platform.

Related APIs

Several classes in the Java platform support the extension mechanism, including:
  • public class java.lang.ClassLoader
  • public class java.lang.Package
  • public class java.net.URLClassLoader

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Changes in CORBA Features Between J2SE 1.4 and later and Java SE 5.0

This release of the Java SE, contains the following enhancements to CORBA, Java IDL, and Java RMI-IIOP technology:

  • Enhancement 4674929. Additional serviceability features for the Java SE ORB provide a logging framework based on Java SE 1.4 logging APIs. When an error is encountered and an OMG minor code is generated, this minor code will now be translated to a Java error code for error logging. The ORB will also include the standard minor codes as specified by the OMG specifications.
  • Enhancement 4607440. Better performance of the default ORB in Java SE in high volume deployments, including better scalability and performance.
  • Enhancement 4629589. Added Object Reference Template (ORT) to ORB. An Object Reference Template is an extension to portable interceptors that supports portable server activation frameworks, load balancing, fault tolerance, dynamic bridging, and other advanced features.
  • Enhancement 4674944. Added on-the-wire interoperability. This includes identifying and incorporating any resolutions and/or updates from the OMG of any interoperability issues since CORBA 2.3.1 that affect on-the-wire interoperability for the J2EE Application Servers, and incorporating those resolutions into the Java SE ORB.
  • When the J2SE 5.0 ORB marshals an org.omg.CORBA.SystemException response, it adds an ExceptionDetailMessage (i.e., a ServiceContext with ServiceId 14) as defined in:
    /**
 * CORBA formal/02-06-01: 13.7.1:
 * ExceptionDetailMessage identifies a CDR encapsulation of a wstring,
 * encoded using GIOP 1.2 with a TCS-W of UTF-16.  This service context
 * may be sent on Reply messages with a reply_status of SYSTEM_EXCEPTION
 * or USER_EXCEPTION. The usage of this service context is defined
 * by language mappings.
 *
 * IDL/Java: ptc/02-01-22: 1.15.2:
 * When a System Exception is marshaled, its GIOP Reply message shall
 * include an associated ExceptionDetailMessage service context. The
 * callee's stack trace is often very valuable debugging information but
 * may contain sensitive or unwanted information. The wstring within the
 * service context will therefore contain additional information relating
 * to the exception, for example the result of calling either
 * printStackTrace(PrintWriter) or getMessage() on the exception. When
 * unmarshaling a System Exception on the client side, the wstring from
 * any ExceptionDetailMessage service context shall become the Java error
 * message in the unmarshaled exception object.
 */

    When the J2SE 5.0 ORB unmarshals an org.omg.CORBA.SystemException response it constructs the SystemException with the contents of the ExceptionDetailMessage as the message argument to the SystemException constructor.

    NOTE: The content of the message may change. In J2SE 5.0, the message contains the server side stack trace. The following code example (note: all details may change) of a stack trace on the client side for an exception generated on the server-side (note the server-side stack trace in the exception's message):

    org.omg.CORBA.FREE_MEM: ----------BEGIN server-side stack trace----------
org.omg.CORBA.FREE_MEM: idlIConnect  vmcid: 0x0  minor code: 0  completed: No
        at corba.exceptiondetailsc.idlIServantConnect.raise_system_exception(idlIServantConnect.java:23)
        at corba.exceptiondetailsc._idlIImplBase._invoke(_idlIImplBase.java:42)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:647)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
        at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
----------END server-side stack trace----------  vmcid: 0x0  minor code: 0  completed: No
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:791)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:97)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:546)
        at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:407)
        at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:303)
        at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:132)
        at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
        at corba.exceptiondetailsc._idlIStub.raise_system_exception(_idlIStub.java:20)
        at corba.exceptiondetailsc.Client.main(Client.java:87)

------------------------------------------------------------------------------

See Official Specifications for CORBA support in J2SE 5.0 for information on how Java IDL and Java RMI-IIOP comply with the CORBA Specifications.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Concepts

  • Distributed Application Concepts
  • CORBA and the Java Platform
  • Glossary
Home Concepts Programming Reference Tutorial
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


CORBA and Java technologies

Documentation Contents

CORBA Technology and the Java Platform Standard Edition

The Java Platform Standard Edition, v1.4, provides an Object Request Broker (ORB) and two CORBA programming models that can utilize the Java CORBA ORB and Internet InterORB Protocol (IIOP). This topic discusses these options for creating and distributing CORBA technology.

CORBA technology is an integral part of the Java platform. It consists of an Object Request Broker (ORB), APIs for the RMI programming model, and APIs for the IDL programming model.

For more information on which specifications are implemented in this release of the Java platform, see the compliance document.

How does Java SE leverage CORBA

Common Object Request Broker Architecture (CORBA) technology is the open standard for heterogeneous computing. CORBA complements the Java platform by providing a distributed object framework, services to support that framework, and interoperability with other languages. The Java platform complements CORBA by providing a portable, highly productive implementation environment, and a very robust platform. By combining the Java platform with CORBA and other key enterprise technologies, the Java Platform is the ultimate platform for distributed technology solutions.

CORBA standards provide the proven, interoperable infrastructure to the Java platform. IIOP (Internet Inter-ORB Protocol) manages the communication between the object components that power the system. The Java platform provides a portable object infrastructure that works on every major operating system. CORBA provides the network transparency, Java provides the implementation transparency.

The Object Request Broker

An Object Request Broker (ORB) is part of the Java Platform Standard Edition, since version 1.3. The ORB is a runtime component that can be used for distributed computing using IIOP communication.

NOTE: Although it is true that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

The Object Management Group (OMG) is an industry consortium that creates and publishes specifications for CORBA. Vendors implement the specifications to produce products known as Object Request Brokers (ORB). The good news for developers is that the Java Platform Standard Edition, v1.2 and higher includes an ORB that is available in every deployment of the Java Platform Standard Edition. For more information, see the ORB class.

The Java CORBA ORB supports both the RMI and IDL programming models, both of which can use the underlying IIOP wire-level protocol for communication.

Introducing the CORBA Programming Models

History of the CORBA Programming Models

In 1997, Remote Method Invocation, or RMI, was introduced in JDK 1.1. Initially, RMI was positioned as a natural outgrowth of Remote Procedure Calls (RPC), strictly for enabling calls to be made between Java objects in different virtual machines, and even on different physical machines.

In 1998, came JDK 1.2, which introduced Java IDL, a Java API for interoperability and integration with CORBA. Java IDL included both a Java-based ORB, which supported IIOP, and the IDL-to-Java compiler, idltojava, for generating client-side stubs and server-side code skeletons. The ORB supports both the RMI over IIOP and Java IDL programming models.

In 1999, the RMI over IIOP standard extension to the Java platform was introduced for JDK 1.1.6 and 1.2. Now that RMI over IIOP is integrated into J2SE version 1.3 and higher, the optional download has been end-of-lifed, but is still available from the archives.

The OMG finalized modifications of its IIOP specification so that it would support most of the JDK 1.1 functionality of RMI. RMI over IIOP was introduced as a standard extension to JDK 1.2. This enabled remote objects written in the Java programming language to be accessible from any language via IIOP.

J2SE, v.1.3 introduced a new, 100% Pure Java, IDL-to-Java compiler, idlj, along with support for IDL abstract interfaces and value types. Also in v.1.3, RMI over IIOP is included in the JDK.

J2SE v.1.4, the current version, was introduced in 2001, and includes support for the Portable Object Adapter, Portable Interceptors, Interoperable Naming Service, GIOP 1.2, and Dynamic Anys. J2SE v.1.4 also includes an Object Request Broker Daemon (ORBD), which is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment, and servertool, which provides a command-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on new features in J2SE v.1.4, see Changes in CORBA Features Between J2SE 1.3 and 1.4.

Comparing the CORBA Programming Models

Cross-language, cross-vendor interoperability is achieved via the Internet InterORB Protocol, or IIOP. IIOP is a transport protocol for distributed applications written in either IDL or Java RMI.

When using the IDL programming model, the interface is everything! It defines the points of entry that can be called from a remote process, such as the types of arguments the called procedure will accept, or the value/output parameter of information returned. Using IDL, the programmer can make the entry points and data types that pass between communicating processes act like a standard language.

CORBA is a language-neutral system in which the argument values or return values are limited to what can be represented in the involved implementation languages. In CORBA, object orientation is limited only to objects that can be passed by reference (the object code itself cannot be passed from machine-to-machine) or are predefined in the overall framework. Passed and returned types must be those declared in the interface.

With RMI, the interface and the implementation language are described in the same language, so you don't have to worry about mapping from one to the other. Language-level objects (the code itself) can be passed from one process to the next. Values can be returned by their actual type, not the declared type. Or, you can compile the interfaces to generate IIOP stubs and skeletons which allow your objects to be accessible from other CORBA-compliant languages.

The RMI Programming Model

What is the RMI Programming Model

The RMI Programming model is a general object model for distributed computing via the rmi API. You can choose to work completely within the Java programming language, using the Java Remote Method Protocol (JRMP) or work with other CORBA-compliant programming languages using the Internet InterORB Protocol (IIOP).

The RMI programming model is part of the Java Platform Standard Edition, and consists of both an Object Request Broker (ORB) and the rmic compiler. The rmic compiler is used to generate stubs, skeletons, and ties for remote objects using either the JRMP or IIOP protocols. The rmic compiler can also generates OMG IDL. For more information on using rmic, link to rmic - The Java RMI Stub Compiler.

The RMI over IIOP Programmer's Guide discusses the differences between using RMI with JRMP or IIOP.

When should I use the RMI programming model instead of the IDL programming model?

The RMI programming model speeds distributed application development by allowing developers to work completely in the Java programming language. When using the RMI programming model to produce Java technology-based distributed applications, there is no separate Interface Definition Language (IDL) or mapping to learn. The RMI programming model provides flexibility by allowing developers to pass any serializable Java object (Objects By Value) between application components. Like the IDL programming model, the RMI programming model is based on open standards defined with the participation of hundreds of vendors and users in the Java Community Process (JCP). Like the IDL programming model, the RMI programming model can use the Internet Inter-ORB Protocol (IIOP) as its communication protocol. IIOP eases legacy application and platform integration by allowing application components written in C++, Smalltalk, and other CORBA supported languages to communicate with components running on the Java platform.

With the RMI programming model, developers can write remote interfaces in the Java programming language and implement them simply using Java technology and the Java RMI APIs. These interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces.

Where can I found out more about the RMI programming model

  • For more information on RMI over IIOP, see RMI over IIOP Documentation.
  • For more information on RMI over JRMP, see RMI Documentation.
  • For an introductory tutorial using RMI over IIOP, see Tutorial: Getting Started with RMI over IIOP.
  • For more information on mapping Java interfaces to OMG IDL, see Catalog of OMG IDL / Language Mappings Specificatons.

The IDL Programming Model

What is the IDL Programming Model

The IDL programming model, known as Java IDL, consists of both the Java CORBA ORB and the idlj compiler that maps the OMG IDL to Java bindings that use the Java CORBA ORB, as well as a set of APIs, which can be explored by selecting the org.omg prefix from the Package section of the API index.

Java IDL adds CORBA (Common Object Request Broker Architecture) capability to the Java platform, providing standards-based interoperability and connectivity. Java IDL enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IDL (Object Management Group Interface Definition Language) and IIOP (Internet Inter-ORB Protocol) defined by the Object Management Group. Runtime components include a Java ORB for distributed computing using IIOP communication.

To use the IDL programming model, you define remote interfaces using the Object Management Group's (OMG) Interface Definition Language (IDL), then compile the interfaces using the idlj compiler. When you run the idlj compiler over your interface definition file, it generates the Java version of the interface, as well as the class code files for the stubs and skeletons that enable your applications to hook into the ORB.

Java IDL is part of the Java Platform Standard Edition. To develop applications with Java IDL, use the Java IDL Compiler, idlj (Solaris, Linux, or Mac OS X or Windows), idlj, which is included in every installation of J2SE v1.3 and higher.

When should I use the IDL programming model instead of the RMI programming model?

The OMG IDL (Interface Definition Language) is a purely declarative language designed for specifying programming-language-independent operational interfaces for distributed applications. OMG specifies a mapping from IDL to several different programming languages, including Java, C, C++, Lisp, Python, Smalltalk, COBOL, and Ada. When mapped, each statement in OMG IDL is translated to a corresponding statement in the programming language of choice. Java IDL is an implementation of the CORBA specification. For example, you could use the Java IDL Compiler, idlj, to map an IDL interface to Java and implement the client class in Java. If you map the same IDL to C++, using an IDL-to-C++ compiler and a C++ ORB, and implement the server in that language, the Java client and C++ server interoperate through the ORB.

NOTE: Although it is true that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

Where can I find out more about the IDL programming model

  • For more information on the IDL programming model, see Java IDL Documentation.
  • For an introductory tutorial to the IDL programming model, see the Getting Started with Java IDL tutorial.
  • For more information on how IDL maps to the Java language, see see the Catalog of OMG IDL / Language Mappings Specificatons.

Comparison of IDL and RMI programming models

There are several scenarios that will define how you will want to create distributed CORBA applications. Here are some of them:

  • If you have been developing CORBA applications using IDL for some time, you will probably want to stay in this environment. Create the interfaces using IDL, and define the client and server applications using the Java programming language to take advantage of its portabile, highly productive implementation environment, and its very robust platform.
  • If all of your applications are written in the Java programming language, you will probably want to use Java RMI to enable communication between Java objects on different virtual machines and different physical machines. Using Java RMI without its IIOP option leverages its strengths of code portability, security, and garbage collection.
  • If you are writing most of your new applications using the Java programming language, but need to maintain legacy applications written in other programming languages as well, you will probably want to use Java RMI with its IIOP compiler option.

What about CORBA and J2EE?

In addition to Java IDL and RMI over IIOP, J2EE includes Enterprise JavaBeans technology (EJB).

Enterprise JavaBeans is part of the Java Platform, Enterprise Edition. The EJB server-side component model simplifies development of middleware components that are transactional, scalable, and portable. EJB servers reduce the complexity of developing middleware by providing automatic support for middleware services such as transactions, security, database connectivity, and more.

EJBs use RMI over IIOP for their distributed object model, and use the Java Transaction Service (JTS) for their distributed transaction model. When Enterprise JavaBeans are implemented using the RMI over IIOP protocol for EJB interoperability in heterogeneous server environments, the standard mapping of the EJB architecture to CORBA enables the following interoperability:

  • A Java client using an ORB from one vendor can access enterprise beans residing on an EJB server provided by another vendor.
  • Enterprise beans in one EJB server can access enterprise beans in another EJB server.
  • A non-Java platform CORBA client can access any enterprise bean object.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


CORBA Compatibility Information

Documentation Contents

CORBA Compatibility Information - J2SE 5.0

  • CORBA API Changes Between J2SE 1.4.x and J2SE 5.0.x
  • Official Specifications for CORBA support in J2SE 5.0.x
  • Other Compatibility Information

CORBA API Changes Between J2SE 1.3 and J2SE 5.0

This document contains information regarding all of the API changes related to CORBA functionality between JDK 1.3 and 5.0. The changes have been made to make the APIs for the CORBA technology shipped in the JDK 5.0 compliant to the CORBA 2.3 mapping as specified by the following OMG documents:

  • CORBA 2.3.1 (formal/99-10-07)
  • IDL to Java language mapping (ptc/00-01-08)
  • Java to IDL language mapping (ptc/00-01-06)
  • Interoperable Naming Service (/ptc/00-08-07)
  • Portable Interceptors (ptc/2001-03-04)

API changes to org.omg.COSNaming classes

To comply with the IDL to Java mapping specified by the CORBA Version 2.3 specification, the following org.omg.COSNaming classes have been regenerated from the idlj compiler shipped with the JDK. This change (CCC 4284015) consists of the following API changes. Compatibility impact: None.

  1. To conform with CORBA V (2.3) All Helpers Section 1.5.2 Spec ptc/00-01-08.pdf, all Helpers are now abstract public classes. Below is the list of all Helper classes under org.omg.CosNaming that have been changed to abstract public classes.

    • BindingHelper.java
    • BindingIteratorHelper.java
    • BindingListHelper.java
    • BindingTypeHelper.java
    • IStringHelper.java
    • NameComponentHelper.java
    • NameHelper.java
    • NamingContextHelper.java
    • AlreadyBoundHelper.java
    • CannotProceedHelper.java
    • InvalidNameHelper.java
    • NotEmptyHelper.java
    • NotFoundHelper.java
    • NotFoundReasonHelper.java

    To conform with Section 1.7 OMG Spec ptc/00-01-08.pdf, Mapping for Enum, the mapping for the following Enum constructors is changed to protected.

    CLASS | BEFORE | NOW
    BindingType.java | private BindingType( int ) | protected BindingType( int )
    NotFoundReason.java | private NotFoundReason( int ) | protected NotFoundReason( int )

  2. To conform with CORBA 2.3 spec (ptc/00-01-08.pdf), Deletion of constructors in Stub classes, the following constructors have been deleted.

    CLASS | BEFORE | NOW
    _BindingIteratorStub.java | public _BindingIteratorStub(org.omg.CORBA.portable.Delegate d) | The constructor is deleted.
    _NamingContextStub.java | public _NamingContextStub(org.omg.CORBA.portable.Delegate d) | The constructor is deleted.

  3. To conform with CORBA 2.3 spec (ptc/00-01-08.pdf), the following exceptions have been changed.

    CLASS | BEFORE | NOW
    AlreadyBound.java | public final class AlreadyBound extends org.omg.CORBA.UserException implements org.omg.CORBA.portable.IDLEntity | public final class AlreadyBound extends org.omg.CORBA.UserException
    AlreadyBound.java | Only default constructor | Add new constructor public AlreadyBound (String reason)
    CannotProceed.java | public final class CannotProceed extends org.omg.CORBA.UserException implements org.omg.CORBA.portable.IDLEntity | public final class CannotProceed extends org.omg.CORBA.UserException
    CannotProceed.java | Only default constructor | Add new constructor public CannotProceed (String reason)
    InvalidName.java | public final class InvalidName extends org.omg.CORBA.UserException implements org.omg.CORBA.portable.IDLEntity | public final class InvalidName extends org.omg.CORBA.UserException
    InvalidName.java | Only default constructor | Add new constructor public InvalidName (String reason)
    NotEmpty.java | public final class NotEmpty extends org.omg.CORBA.UserException implements org.omg.CORBA.portable.IDLEntity | public final class NotEmpty extends org.omg.CORBA.UserException
    NotEmpty.java | Only default constructor | Add new constructor public NotEmpty (String reason)
    NotFound.java | public final class NotFound extends org.omg.CORBA.UserException implements org.omg.CORBA.portable.IDLEntity | public final class NotFound extends org.omg.CORBA.UserException
    NotFound.java | Only default constructor | Add new constructor public NotFound (String, org.omg.CosNaming.NamingContextPackage.NotFoundReason, org.omg.CosNaming.NameComponent[])

  4. To conform with the CORBA 2.3 specification, the following classes have been added.

    • NamingContextPOA.java
    • BindingIteratorPOA.java

  5. To conform with the CORBA 2.3 specification, the following classes are deprecated.

    • _NamingContextImplBase.java
    • _BindingIteratorImplBase.java

API changes to org.omg.CORBA

  • To conform to OMG spec 99-07-57, IDL to Java mapping, the following methods have been changed.
    • The signature of method org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode) is changed to throw an org.omg.CORBA.Bad_INV_ORDER exception. System exception does not need to be declared in user's code. (CCC 4340915)
    • The method TypeCode.equivalent is defined as abstract. BEFORE: threw a NO_IMPLEMENT exception. Compatibility impact: Minimal impact for licensees, not for end user. Licensees need to provide a dummy implementation of this method. (CCC 4340932)
    • The method TypeCode.get_compact_typecode is defined as abstract. BEFORE: threw a NO_IMPLEMENT exception. Compatibility impact: Minimal impact for licensees, not for end user. Licensees need to provide a dummy implementation of this method. (CCC 4340932)
    • The mapping for the get_interface_def(org.omg.CORBA.Object) method in org.omg.CORBA.portable.Delegate.java is defined as abstract. Compatibility impact: Yes, a non-abstract method is converted to abstract. (CCC 4366071)
    • The mapping for the write_Principal() method in org.omg.CORBA.portable.OutputStream.java is no longer abstract. Compatibility impact: No, an abstract method is converted to non-abstract. (CCC 4366072)
    • The mapping for the read_Principal() method in org.omg.CORBA.portable.InputStream.java is no longer abstract. Compatibility impact: None, changing a method that is declared abstract to no longer be abstract does not break compatibility with pre-existing binaries. (CCC 4366074)
  • To conform to the CORBA 2.3 specification, the org.omg.DomainManagerOperations interface no longer extends org.omg.CORBA.Object. Compatibility impact: None, no CORBA program will use the DomainManagerOperations interface directly. The DomainManagerOperations interface can only be used by the programs via the DomainManager interface, which already extends org.omg.CORBA.Object. (CCC 4340907)
  • The following classes are declared as abstract and no longer have a private constructor. (CCC 4372196)
    • org.omg.CORBA.ServiceDetailHelper
    • org.omg.CORBA.ServiceInformationHelper
  • To conform with the IDL to Java spec in section 1.15.2, the default constructor javadoc comments in the following org.omg.CORBA files have been changed from COMPLETED_MAYBE to COMPLETED_NO. Compatibility impact: None. (CCC 4363355)
    • INTERNAL.java
    • INVALID_TRANSACTION.java
    • INV_OBJREF.java
  • The following Helper classes in org.omg.CORBA have been changed from public final to public abstract, and the default constructor for the Helper classes has been deleted. This change has been made to comply with the ORB core specification as defined by CORBA 2.3.1 and with the IDL/Java Language mapping as defined in ptc/00-01-08. Compatibility impact: Minimal since the Helper classes have been made 'abstract' as defined by the OMG IDL/Java Language mapping specification, applications which had previously instantiated a Helper class instance would fail. But the Helper class has only static methods in it, and there is no good reason for an application to create an instance of the Helper class. (CCC 4364208)
    • AnySeqHelper.java
    • BooleanSeqHelper.java
    • CharSeqHelper.java
    • DoubleSeqHelper.java
    • FloatSeqHelper.java
    • LongLongSeqHelper.java
    • LongSeqHelper.java
    • OctetSeqHelper.java
    • ShortSeqHelper.java
    • StringValueHelper.java
    • ULongLongSeqHelper.java
    • ULongSeqHelper.java
    • UShortSeqHelper.java
    • WCharSeqHelper.java
    • WStringValueHelper.java
  • To conform with the recently passed OMG issue 3015, which adds a new class, AbstractInterfaceDef to Interface Repository classes, we have added the following new constants to org.omg.CORBA.DefinitionKind. Compatibility impact: None. (CCC 4367601)
    • _dk_AbstractInterface=24. This is a constant that indicates that an Interface Repository object is representing an abstract object.
    • public static final DefinitionKind dk_AbstractInterface = new DefinitionKind(_dk_AbstractInterface). This is the static instance of DefinitionKind, indicating that an Interface Repository object represents an abstract interface.
  • The following org.omg.CORBA APIs for typecodes were changed to conform to the OMG specification. All of the classes in the following list are in the org.omg.CORBA package. Compatibility impact: Yes. See each change below for details. (CCC 4368800)
    • The Typecode methods fixed_digits, fixed_scale, member_visibility, type_modified, and concrete_base_type are changed from concrete to abstract. Typecode is always implemented by an ORB implementor and never subclassed by an ORB user, so this should not impact customers.
    • TCKind.from_int no longer throws the unchecked exception BAD_PARAM. Since BAD_PARAM is an unchecked exception, removing the exception should not affect customer code at compile time.
    • Principal is changed to a concrete class with methods that throw NO_IMPLEMENT from an abstract class with abstract methods. Principal is deprecated and rarely used. In any case, it would not generally be subclassed by a user and would always be fully implemented by an ORB implementor.
    • An extract_Streamable method is added to Any. Adding a method does not affect compatibility.
    • Any.insert_object( object, Typecode ) is changed to throw BAD_PARAM. Since BAD_PARAM is an unchecked exception, adding the exception should not affect customer code at compile time.
    • The Any methods insert_Streamable, extract_Principal, and insert_Principal are no longer abstract. Any is fully implemented by ORB implementors and never subclassed by ORB users, so this should not impact customers.
    • The Any methods extract_value and insert_value are changed to abstract. Any is fully implemented by ORB implementors and never subclassed by ORB users, so this should not impact customers.
  • The Identifier field is added to org.omg.CORBA.Initializer. Compatibility impact: None. (CCC 4372194)
  • To comply with ptc/00-01-08.pdf, the following classes are changed:
    • org.omg.CORBA.ORBPackage.InvalidName.java is declared as final. Compatibility impact: Yes. The InvalidName is being declared as final, which would impact source code that was subclassing this. Since it is an exception type, we do not anticipate this kind of behavior. (CCC 4366734)
    • org.omg.stub.java.rmi._Remote_Stub.java returns a clone of _type_ids. This will prevent mangling of the original type_ids_ array by external users. (CCC 4366734)
    • The from_int(Int i) method in org.omg.CORBA.SetOverrideType no longer throws a BAD_PARAM exception. Compatibility impact: No. Should not cause a compatibility problem since we are removing a throws declaration of an unchecked exception. (CCC 4369490)
    • The from_int(Int i) method in org.omg.CORBA.DefinitionKind no longer throws a BAD_PARAM exception. Compatibility impact: No. (CCC 4370659)
    • org.omg.CORBA.DynamicImplementation has been deprecated by the OMG in favor of the Portable Object Adapter (POA). A default invoke body is supplied. Compatibility impact: No. Should not impact anyone implementing this class. (CCC 4369490)
  • The following classes are changed to correct errors. Compatibility impact: No (CCC 4362556)
    • Helper and Holder classes are added to UnknownUserException.java. No compatibility impact.
    • Helper and Holder classes are added to WrongTransaction.java, and the class is declared final. No compatibility impact.
    • CompletionStatus.java is declared final, no longer implements IDLEntity, is changed to a private constructor. A BAD_PARAM RuntimeException will no longer explicitly be thrown by from_int. Compatibility impact: Yes. New code written using the new CompletionStatus.java class will not have to explicitly catch the BAD_PARAM runtime exception. If it's recompiled with an older JDK, it would get a compile-time error. -- These changes were undone due to JCK regression (4375061). An OMG issue has been filed instead (http://www.omg.org/issues/java-rtf.html#Issue3946).
    • INV_POLICY.java is declared as final. No compatibility impact.
  • The addition of portable interceptors requires a new method on existing CORBA APIs and four new classes generated from IDL typedefs. Compatibility impact: none, these changes are all additions. (CCC 4379826)
    • register_initial_reference is added in public class org.omg.CORBA.ORB.
    • New class org.omg.CORBA.StringSeqHelper is added for 2 IDL typedefs.
    • New class org.omg.CORBA.StringSeqHolder is added for 2 IDL typedefs.
    • New class org.omg.CORBA.WStringSeqHelper is added for 2 IDL typedefs.
    • New class org.omg.CORBA.WStringSeqHolder is added for 2 IDL typedefs.

API changes to javax.rmi.CORBA

To comply with OMG API specifications, the following changes have been made to javax.rmi.CORBA:
  • The protected constructor in javax.rmi.CORBA.Stub is removed. Compatibility impact: None. (CCC 4366722)
  • To comply with OMG specification 00-01-06.pdf, the jaxax.rmi.CORBA.ClassDesc constructor is removed. (CCC 4366734)

Non-API changes

The following non-API changes were also implemented in JDK 5.0.
  • Correct repository id computations. Compatibility impact: Yes. Added ORB versioning support to allow interoperability with the JDK 1.3 ORB, maintain backwards compatibility, and enable interoperability with other vendor ORBs. (CCC 4365188)
  • To conform with the recently passed OMG issue 3015, we have taken all Interface Repository-related version pragmas out of org.omg.CORBA.ir.idl. This also changes the Repository ID values of a few IR interfaces that we ship in org.omg.CORBA, for example, IDLTypeHelper, from

    private static String _id = "IDL:omg.org/CORBA/IDLType:2.3";
    to
    private static String _id = "IDL:omg.org/CORBA/IDLType:1.0";

    Compatibility impact: Yes. This change might affect interoperability with existing implementations. Restart the application and the IR if you get a COMM_FAILURE exception (or something similar). (CCC 4372718)

  • Added @serial exclude tags to all org.omg.* package files so that JAVADOC will ignore the whole package for the Serialization spec. There is no requirement from Object Management Group (OMG) to have Serialization compatibility between different versions. Practically speaking there are no use cases where the org.omg classes will be serialized in one version and de-serialized in the next version. Compatibility impact: None. (CCC 4394004)
  • Changed idlj compiler arguments in support of POA, which is a new CORBA feature in Merlin. Changes to the idlj tool arguments include:
    • removed undocumented -poa flag
    • enabled generation of standard POA-based skeletons by default
    • added a new flag, -oldImplBase, to allow generation of backward compatible skeletons (compatible with JDK 1.2 and 1.3)

    Compatibility impact: Yes, existing programs that use the compiler may need to add the -oldImplBase flag to their idlj invocation to maintain compatibility. (CCC 4407835)

New API

The following new API were added to JDK 5.0.
  • The PortableInterceptor API is added. An incorrect specification, ptc/2000-04-05, was being referenced in the test plan. Another incorrect specification, orbos/99-12-02 was being referenced in the feature list (ptc/2000-04-05 is the same as orbos/99-12-02 except the format has changed). The correct specification reference for this new API is http://www.omg.org/cgi-gin/doc?ptc/2001-03-04. CCC 4307834 includes the list of changes/additions from ptc/2000-04-05. Compatibility impact: none, this is a new feature so no existing code uses it.
  • The addition of portable interceptors requires a new method, id, in public interface org.omg.PortableServer.POA.

Official Specifications for CORBA support in J2SE 5.0

Specification References

The specifications with which the Java 2 Platform Standard Edition (J2SE) 5.0 ORB complies are as follows. If these links do not take you to the referenced specification, the OMG may have changed the URL, and you can link to www.omg.org to search for the correct specification.
  • CORBA 2.3.1 (formal/99-10-07)
  • IDL to Java language mapping (ptc/00-01-08)
  • Revised IDL to Java language mapping (ptc/00-11-03)
  • Java to IDL language mapping (ptc/00-01-06)
  • Interoperable Naming Service (ptc/00-08-07)
  • Portable Interceptors (ptc/2001-08-31)
These are the only specifications referenced by this document.

Supported Specification Details

Not all of the above specifications are currently implemented in the ORB in J2SE 5.0. The precise list of supported sections is as follows:
  • CORBA 2.3.1 chapters 1-3 and 6-9
  • Revised IDL to Java language mapping, section 1.21.8.2, the orb.properties file.
  • CORBA 2.3.1 chapter 4 with the following replacements from the Portable Interceptors specification:
    • section 4.2.3.5 destroy
    • section 4.5.2 CodeFactory and PICurrent are required
    • Section 4.5.3.4 as updated for register_initial_reference
  • CORBA 2.3.1 chapter 5 with the following update from the Portable Interceptors specification:
    • 5.5.2 StringSeq and WStringSeq are required. This adds the following classes to org.omg.CORBA:
      • StringSeqHolder
      • StringSeqHelper
      • WStringSeqHolder
      • WStringSeqHelper
  • CORBA 2.3.1 sections 10.6.1 and 10.6.2 are supported for repository IDs.
  • CORBA 2.3.1 section 10.7 for TypeCode APIs.
  • CORBA 2.3.1 chapter 11, Portable Object Adapter (POA), with the following updates from the Portable Interceptors specification:
    • Section 11.3.7 POAs must preserve all policies
    • Section 11.3.8.2 again states that POAs must preserve all policies
    • Section 11.3.8.26 POA::id is required.
  • CORBA 2.3.1 chapters 13 and 15 define GIOP 1.0, 1.1, and 1.2. The J2SE 5.0 ORB fully supports all versions of GIOP, with the exception that the bi-directional GIOP feature defined in sections 15.8 and 15.9 is not supported.
  • All of the Interoperable Naming Service is supported.
  • Portable Interceptors section 13.8 (the new Coder/Decoder interfaces) and all of chapter 21 (the interceptor specification).
  • Section 1.21.8 of the Revised IDL to Java Language Mapping Specification (ptc/00-11-03) has been changed from the version in the IDL to Java Language Mapping Specification (ptc/00-01-08).

Tools

  • The IDL to Java compiler (idlj) complies with:
    • CORBA 2.3.1 chapter 3 (IDL definition)
    • CORBA 2.3.1 chapters 5 and 6 (semantics of Value types)
    • CORBA 2.3.1 section 10.6.5 (pragmas)
    • The IDL to Java mapping specification
    • The Revised IDL to Java language mapping specification section 1.12.1 "local interfaces"
  • The Java to IDL compiler (the IIOP backend for rmic) complies with:
    • CORBA 2.3.1 chapters 5 and 6 (value types)
    • The Java to IDL language mapping. Note that this implicitly references section 1.21 of the IDL to Java language mapping
    • IDL generated by the -idl flag complies with CORBA 2.3.1 chapter 3.

Other Compatibility Information

  • The class java.util.Calendar is not interoperable between J2SE 1.3.x and J2SE 5.0 when using RMI-IIOP. OMG issue 3151 may resolve this, but it will probably have to be implemented in a later release of the Java platform.

    The J2SE 5.0 version of Calendar writes a ZoneInfo object in its writeObject method. Similarly, it calls readObject to read this. Based on Java Object Serialization, it expects that if it's talking to an older version, the object won't be there, so the stream will throw an EOFException and keep the stream position intact.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Developing Clients

This document was not updated for this release.

When updated, topics in this section will include:

  • ORBs and Invocations
  • Static Invocation
  • Dynamic Invocation

ORBs and Invocations

For a client to invoke a CORBA object operation, both the client and the server (the object implementation) must use a CORBA software component called an ORB (object request broker). ORBs are the common denominators that bridge the differences in location, platform, and programming language that can separate a client and a server. ORBs can contact each other across the network, can create and interpret object references (CORBA object handles), and can marshal parameters into and out of the format used by IIOP. In addition to enabling client/server communication, ORBs provide other services, but they are not described here.

The two ways to invoke an operation on a CORBA object are:

  • Static invocation, which is used most often and most resembles conventional Java programming, is type-checked by the compiler. But it can only be used for objects whose interface definitions exist when the invoking client is compiled.
  • Dynamic invocation is more flexible because clients can invoke objects they discover at runtime. However, compile-time type-checking is impossible with dynamic invocation. Although it's possible to type-check parameters at runtime, doing so requires a CORBA Interface Repository, which the current release of Java IDL does not provide.

Static Invocation

To make a static invocation on a CORBA object, a Java client needs an object reference to the servant that performs the operation. The object reference has two important functions:

  • It uniquely identifies the servant, wherever it is located.
  • It implements the client stub interface, making the reference a local proxy for the servant object.
Clients don't create object references but obtain them, typically from other objects such as factories or naming contexts.

OMG IDL is the language in which CORBA object interfaces are defined. For each OMG IDL module, the idlj compiler generates a Java package. For each interface Foo defined in an OMG IDL module, the generated package contains the following items of interest to the client programmer:

  • A Java signature interface Foo, which extends org.omg.portable.IDLEntity, org.omg.CORBA.Object, and the operations interface. The signature interface is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. From the client's point of view, an object reference for a CORBA Foo object implements this interface.

    Note: The Stub implements the Foo interface, where it generates code for each method to marshall the arguments, invoke the method, and then unmarshall the arguments.

  • A Java operations interface FooOperations, which is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and server. The server developer provides implementation for the methods indicated by the operations interface.

    Note: The server writer usually extends FooPOA and provides implementation for the methods provided by the operations interface.

  • A Java class FooHelper, that defines auxiliary methods, notably narrow(), which is the CORBA counterpart of Java casting.
  • A Java class called FooHolder, that holds a public Foo member. Holders are required for CORBA operations that take out or inout arguments, which, unlike CORBA in arguments, don't map directly to Java's pass-by-value semantics.

Dynamic Invocation

CORBA dynamic invocation uses an object called a request to hold everything pertinent to an invocation: the object reference, the name of the operation, its parameters, and space for the result. The client builds a request object describing an operation, then calls the request's invoke method, which dispatches the request just as a stub would. When the invoke method returns, the result is available in the request object.

The key to dynamic invocation is the ability of requests to hold self-describing data. This facility enables a request object to represent any invocation of any operation, regardless of its parameters. Each self-describing data element has a special type known in OMG IDL as Any. An Any consists of a typecode (whose values are defined by OMG IDL) and a value; the typecode specifies the type of the value.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Developing Servers

This document was not updated for this release

This topic introduces Java IDL support for servers of both persistent and transient CORBA objects.

Transient and Persistent Objects

A persistent CORBA object lives until it is explicitly destroyed. If a client has a reference to a persistent CORBA object, that reference can be used even if the object's server is not running -- an ORB daemon, ORBD, will start the server when the ORB receives an invocation on the object.

Starting with J2SE 1.4, Java IDL includes a Portable Object Adapter (POA), Object Request Broker Daemon (ORBD), and the servertool. These features enable persistent object servers to be written using Java IDL!

By contrast, a transient CORBA object has the same lifetime as the execution of the server process that creates it. When a server terminates, its transient objects disappear with it and any object references held by the client become invalid. Transient objects are often used to effect asynchronous, or callback communication between applications and objects. For example, suppose a timing service notifies a client application when an interval expires; it could do so as follows:

  • The timing service defines an interface for a notifier object that includes an interval_expired() operation.
  • The timing service requires that a client pass a notifier object to the timing service's set_interval() operation.
  • The timing service client application implements a transient object that implements the notifier interface.
  • The client application creates and passes a notifier object to the timing service.
  • When the interval expires, the timing service invokes the notifier object's interval_expired() operation.

The arrangement, in other words, is much like a callback in procedural programming.

Persistent Object Servers

Starting with J2SE 1.4, Java IDL includes a Portable Object Adapter (POA), Object Request Broker Daemon (ORBD), and the servertool. These features enable persistent object servers to be written using Java IDL! The tutorial Hello World with persistent server provides a version of the "Hello World" application that utilizes a persistent object server.

Transient Object Servers

The Hello World example includes a transient object server.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Distributed Application Concepts

Topics discussed in this section include:

  • Multi-Tiered Applications
  • User-Interface Tier
  • Service (Server) Tier
  • Data Store (Database) Tier

Multi-Tiered Applications

Traditional enterprise applications are, for the most part, self-contained monolithic programs which have limited access to one another's procedures and data. They are usually cumbersome to build and expensive to maintain because even simple changes require the entire program to be recompiled and retested.

By contrast, applications built using distributed objects such as CORBA naturally lend themselves to a multitiered architecture, fostering a neat separation of concerns. A three-tiered application has a user interface code layer, a computation code (or business logic) layer, and a database access layer. All interaction between the layers occurs via the interfaces that all CORBA objects must publish. The diagram below illustrates the transition from monolithic applications to multi-tiered, modular applications.

User-Interface Tier

The user-interface tier is the layer of user interaction. Its focus is on efficient user interface design and accessibility throughout your organization. The user interface tier can reside on the user's desktop, on your organization's intranet, or on the World Wide Web (Internet). Several user interface implementations may be deployed which access the same server. The UI tier usually invokes methods on the business logic tier and thus acts as a client of the business logic servers.

Service (Server) Tier

The service, or business logic layer, is server-based code with which the client code interacts. The business logic layer is made up of business objects - CORBA objects that perform logical business functions such as inventory control, budget, sales orders, and billing. These objects invoke methods on Data Store tier objects.

Data Store (Database) Tier

The data store layer is made up of objects that encapsulate database routines and interact directly with the DBMS product(s). For example, a hypothetical get_Sales_Sum method might be implemented to obtain data from a relational database via the appropriate SQL SELECT statements.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


DSI Programming

Documentation Contents

Advanced Topic: The Dynamic Skeleton Interface (DSI)

The Dynamic Skeleton Interface (DSI) allows servers to serve a servant object without prior (compile time) knowledge of the object's interface. Insead of using skeleton code compiled from the IDL interface definition, the server constructs an operation invocation dynamically.

Why Use DSI?

DSI can be used to bridge CORBA with non-CORBA environments. Such a bridge would allow CORBA clients to invoke methods on CORBA objects that are implemented as, for example, COM services.

why use DSI

The dynamic servant is implemented to convert the CORBA client request to a format understood by the COM server. You must write all the code to perform this work. Contrast this with a typical static object invocation. The server has access to the compiled skeletons for the interface being invoked. These skeletons are generated by compiling the IDL interface definitions with the idlj compiler. When the ORB receives a request, it uses the skeleton code to build operation arguments on the server side and to send back any result.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java™ IDL

Documentation Contents

Enhancements in IDL

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in Java SE 6

Enhancements in J2SE 5.0

Enhancements in Java 2 SDK v1.4

For changes between JDK 1.4 and 5.0, see Changes in CORBA Features Between J2SE 1.4.x and 5.0

Previous Enhancements

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Example with Callback Object

Documentation Contents

Java IDL: Example with Callback Object

Client programs often react to changes or updates that occur in a server. For example, a client graph or spreadsheet program might need to be updated with each stock price update on a stock market server. The client has two options in this scenario:

  • Periodically ask for the stock price via a method request on the stock server. This is known as the "polling" or "pull" model.
  • Ask to be notified by the server whenever a price change occurs. This option is referred to as a "callback" or the "push" model.

The example in this document illustrates how a client program can pass a callback object to a server, and the server can then callback to notify changes to the client. At this time, we have provided the code for an extension of a simple application. Notes about simplifying the application are contained within the code.

This document provides the code for:

  • The IDL for an example program with a callback.
  • A server implementation that callsback to a client.
  • A client that sends a callback object reference to a server.
  • An implementation of the Listener.
  • An implementation of the MessageServer.

Instructions for compiling and running the example are also provided.

Callback Example: Intermediate Level

Writing the IDL file

For the example application, the file callback.idl looks like this:

interface Listener {
        void message(in string msg);
};

interface MessageServer {
        void register(in Listener lt);
};

Writing the Server Code

For the example application, the Server.java file looks like as follows.

import org.omg.CORBA.ORB;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;
import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;

public class Server {

    public static void main(String[] args) {
        try {
            //create and initialize the ORB
            Properties props = System.getProperties();
            props.put("org.omg.CORBA.ORBInitialPort", "1050");
            //Replace MyHost with the name of the host on which you are running the server
            props.put("org.omg.CORBA.ORBInitialHost", "<MyHost>");
            ORB orb = ORB.init(args, props);
            System.out.println("Initialized ORB");

            //Instantiate Servant and create reference
            POA rootPOA = POAHelper.narrow(
                orb.resolve_initial_references("RootPOA"));
            MessageServerImpl msImpl = new MessageServerImpl();
            rootPOA.activate_object(msImpl);
            MessageServer msRef = MessageServerHelper.narrow(
                rootPOA.servant_to_reference(msImpl));

            //Bind reference with NameService
            NamingContext namingContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));
            System.out.println("Resolved NameService");
            NameComponent[] nc = { new NameComponent("MessageServer", "") };
            namingContext.rebind(nc, msRef);

            //Activate rootpoa
            rootPOA.the_POAManager().activate();

            //Start readthread and wait for incoming requests
            System.out.println("Server ready and running ....");

            //REMOVE THE NEXT LINE FOR THE SIMPLER EXAMPLE
            msImpl.startReadThread();

            orb.run();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Writing the MessageServer Implementation

The file registers new clients, accepts messages, then relays the messages to the registered clients. For the example application, the file MessageServerImpl.java looks like the following example.

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Vector;
import java.util.Iterator;

public class MessageServerImpl extends MessageServerPOA {

    private Vector clients = new Vector();
    private ReadThread rt = null;

    public MessageServerImpl() {
        rt = new ReadThread(this);
    }

    public void register(Listener lt) {
        clients.add(lt);
    }

    public void startReadThread() {
        rt.start();
    }

    public void message(String msg) {
        Iterator it = clients.iterator();
        while (it.hasNext()) {
            Listener lt = (Listener) it.next();
            lt.message(msg);
            //FOR THE SIMPLER EXAMPLE, ADD A SIMPLE
            //MESSAGE TO BE CALLED BACK, FOR EXAMPLE,
            //SLEEP FOR 30 SECONDS, THEN SEND THE TIME
        }
    }
}

//EXCLUDE THIS CLASS FOR THE SIMPLER EXAMPLE
class ReadThread extends Thread {

    MessageServerImpl msImpl = null;

    public ReadThread(MessageServerImpl msImpl) {
        this.msImpl = msImpl;
    }

    public void run() {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));

        try {
            for (;;) {
                System.out.print("message > ");
                String msg = br.readLine();
                msImpl.message(msg);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Writing the Client Code

For the example application, the file Client.java file looks like the following example.

import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;
import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;

public class Client {

    public static void main(String[] args) {
        try {

            //initialize orb
            Properties props = System.getProperties();
            props.put("org.omg.CORBA.ORBInitialPort", "1050");
            //Replace MyHost with the name of the host on which you are running the server
            props.put("org.omg.CORBA.ORBInitialHost", "<MyHost>");
            ORB orb = ORB.init(args, props);
            System.out.println("Initialized ORB");

            //Instantiate Servant and create reference
            POA rootPOA = POAHelper.narrow(
                orb.resolve_initial_references("RootPOA"));
            ListenerImpl listener  = new ListenerImpl();
            rootPOA.activate_object(listener);
            Listener ref = ListenerHelper.narrow(
                rootPOA.servant_to_reference(listener));

            //Resolve MessageServer
            MessageServer msgServer = MessageServerHelper.narrow(
                orb.string_to_object("corbaname:iiop:1.2@localhost:1050#MessageServer"));

            //Register listener reference (callback object) with MessageServer
            msgServer.register(ref);
            System.out.println("Listener registered with MessageServer");

            //Activate rootpoa
            rootPOA.the_POAManager().activate();

            //Wait for messages
            System.out.println("Wait for incoming messages");
            orb.run();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Writing the Listener Implementation

When the Listener identifies that a message has been received from the server, it displays the message on the client. For the example application, the ListenerImpl.java file looks like the following example.

public class ListenerImpl extends ListenerPOA {

    public void message(String msg) {
        System.out.println("Message from server : " + msg);
    }
}

Instructions for compiling and running the example

To run the example application, you would follow these instructions on the SERVER machine:
  1. If you've run the example previously, remove any existing generated files. In the UNIX operating environment, this command would be as follows:
    rm -rf ./classes ./orb.db
  2. Generate the stubs and skeletons. First, you need to create the directory where the stubs and skeletons will reside, then run the idlj compiler to generate the stubs and skeletons. This command would look like this:
    mkdir -p ./classes
<path_to_java>/bin/idlj -fall -td ./classes callback.idl
  3. Compile the .java files, as follows:
    <path_to_java>/bin/javac -classpath ./classes -d ./classes *.java
  4. Start the orbd naming service, as follows:
    <path_to_java>/bin/orbd -ORBInitialPort 1050 -ORBInitialHost <host_name> &
  5. Run the server, as follows:
    <path_to_java>/bin/java -classpath ./classes Server -ORBInitialPort 1050

After you have started the server, you will see output such as the following in the terminal window:

Initialized ORB
Resolved NameService
Server ready and running ....
message >

At this prompt, you will send messages to the client, but first you need to start the client application. From the CLIENT terminal, follow these steps to run the client. Make sure that you used the host name on which the server is running in the properties section of the client code.

<path_to_java>/bin/java -classpath ./classes Client -ORBInitialPort 1050

The output from the client will display in a format similar to this:

Initialized ORB
Listener registered with MessageServer
Wait for incoming messages

To display the functionality of using a callback, you would enter a data on the server terminal, at the prompt, and it will display on all client terminals. This could be anything where clients are interested in some notifications.

One example is a football game score where clients are notified whenever the score changes.

message > Niners TD. Niners 7 - Giants 0
message > Giants TD. Niners 7 - Giants 7
message > Niners TD. Niners 14 - Giants 7

When messages such as those shown above are sent, the client display looks similar to the following:

Wait for incoming messages
Message from server : Niners TD. Niners 7 - Giants 0
Message from server : Giants TD. Niners 7 - Giants 7
Message from server : Niners TD. Niners 14 - Giants 7
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Exceptions

CORBA has two types of exceptions: standard system exceptions which are fully specified by the OMG and user exceptions which are defined by the individual application programmer. CORBA exceptions are a little different from Java exception objects, but those differences are largely handled in the mapping from IDL to Java.

Topics in this section include:

  • Differences Between CORBA and Java Exceptions
  • System Exceptions
    • System Exception Structure
    • Minor Codes
    • Completion Status
  • User Exceptions
  • Minor Code Meanings

Differences Between CORBA and Java Exceptions

To specify an exception in IDL, the interface designer uses the raises keyword. This is similar to the throws specification in Java. When you use the exception keyword in IDL you create a user-defined exception. The standard system exceptions need not (and cannot) be specified this way.

System Exceptions

CORBA defines a set of standard system exceptions, which are generally raised by the ORB libraries to signal systemic error conditions like:
  • Server-side system exceptions, such as resource exhaustion or activation failure.
  • Communication system exceptions, for example, losing contact with the object, host down, or cannot talk to ORB daemon (orbd).
  • Client-side system exceptions, such as invalid operand type or anything that occurs before a request is sent or after the result comes back.

All IDL operations can throw system exceptions when invoked. The interface designer need not specify anything to enable operations in the interface to throw system exceptions -- the capability is automatic.

This makes sense because no matter how trivial an operation's implementation is, the potential of an operation invocation coming from a client that is in another process, and perhaps (likely) on another machine, means that a whole range of errors is possible.

Therefore, a CORBA client should always catch CORBA system exceptions. Moreover, developers cannot rely on the Java compiler to notify them of a system exception they should catch, because CORBA system exceptions are descendants of java.lang.RuntimeException.

System Exception Structure

All CORBA system exceptions have the same structure:

exception <SystemExceptionName> { // descriptive of error
    unsigned long minor;          // more detail about error
    CompletionStatus completed;   // yes, no, maybe
}

System exceptions are subtypes of java.lang.RuntimeException through org.omg.CORBA.SystemException:

  • java.lang.Exception
    • java.lang.RuntimeException
      • org.omg.CORBA.SystemException
        • BAD_PARAM
        • //etc.

Minor Codes

All CORBA system exceptions have a minor code field, a number that provides additional information about the nature of the failure that caused the exception. Minor code meanings are not specified by the OMG; each ORB vendor specifies appropriate minor codes for that implementation. For the meaning of minor codes thrown by the Java ORB, see Minor code meanings .

Completion Status

All CORBA system exceptions have a completion status field, indicating the status of the operation that threw the exception. The completion codes are:

COMPLETED_YES
The object implementation has completed processing prior to the exception being raised.
COMPLETED_NO
The object implementation was not invoked prior to the exception being raised.
COMPLETED_MAYBE
The status of the invocation is unknown.

User Exceptions

CORBA user exceptions are subtypes of java.lang.Exception through org.omg.CORBA.UserException:

  • java.lang.Exception
    • org.omg.CORBA.UserException
      • Stocks.BadSymbol
      • //etc.

Each user-defined exception specified in IDL results in a generated Java exception class. These exceptions are entirely defined and implemented by the programmer

Minor Code Meanings

System exceptions all have a field minor that allows CORBA vendors to provide additional information about the cause of the exception. For a list of standard OMG minor code exceptions (OMGVMCID), see the Object Management Group website.

Some of the most common Sun minor code exceptions are the following:

  • COMM_FAILURE/201. vmcid: SUN minor code: 201 literally means "CONNECT_FAILURE". This may be caused by a java.net.SocketException, usually one of BindException, ConnectException, or NoRouteToHostException.

    Some things to verify are:

    • Is a naming service running? If not, start the ORBD naming service as described in the orbd man page (Solaris, Linux, or Mac OS X or Windows).
    • Are the -ORBInitialHost and -ORBInitialPort values being set correctly for the naming service? If you are uncertain about what the settings should be, read the orbd man page (Solaris, Linux, or Mac OS X or Windows).
    • Are the client and server applications aware of the port number (and machine name, if applicable) where the Naming Service is running? Read the orbd man page (Solaris, Linux, or Mac OS X or ) for more information on how to do this.
  • COMM_FAILURE/208. vmcid: SUN minor code: 208 literally means "CONNECTION ABORT", which generally means the connection has been dropped.
  • COMM_FAILURE/209. vmcid: SUN minor code: 209 literally means "CREATE_LISTENER_FAILED": Unable to create the listener thread on the specific port. Either the post is taken or there was an error creating the daemon thread. This generally indicates that the port on which you are trying to run the naming service is in use by another process. If you are running on Solaris, you could discover whether or not something is running on this port using the following terminal prompt command:
    netstat | grep port_number
  • OBJECT_NOT_EXIST/204. vmcid: SUN minor code: 204 literally means "SERVANT_NOT_FOUND". It is only thrown in one place: corba.INSSubcontract.getINSReference.
  • MARSHAL/217. vmcid: SUN minor code: 217 means that your client tried to send either a wchar or wstring in GIOP 1.0, which is not legal in the spec.
  • MARSHAL/202. vmcid: SUN minor code: 202 means that the code is attempting to marshal an object that derives from org.omg.CORBA.Object, but that particular instance has never been connected to an ORB. When using the POA, you need to register the object with the POA first. If you need more information on how to register an object with the POA, refer to the POA document or the tutorial.
  • BAD_PARAM/201. vmcid: SUN minor code: 201 literally means "NULL_PARAM". This exception often occurs because a Java null was given to a write method such as write_string, write_octet_array, etc. You cannot return a Java null as the result of a Java method.
  • org.omg.CORBA.INTERNAL. vmcid: SUN minor code: 208 means Unable to determine local hostname using InetAddress.getLocalHost().getHostName().

    The ORB uses InetAddress.getLocalHost().getHostName() to create a reference to the name service for looking for and/or binding references. It also uses InetAddress.getLocalHost().getHostName() on the server side to create remote object references (i.e., IORs) that contain the name/port of the server (rather than a dotted-decimal/port pair).

    To avoid the call to getHostName, you can set the following properties (refer to the orbd man page [Solaris, Linux, or Mac OS X or Windows) if you are not sure how to do this):

    • Set com.sun.CORBA.ORBServerHost to the DNS name or dotted-decimal address of the server if the ORB is acting as a server.
    • Set com.sun.CORBA.ORBInitialHost to the DNS name or dotted-decimal address of the name server.

    NOTE: These properties are proprietary and are subject to deletion or change.

If none of these suggestions work for you, or if you encounter a different Sun minor code exception, post a message to the developer forum at Oracle Forum Home.

When requesting the meaning of a minor code, include the following information:

  • The platform on which the client and server are running (e.g., Solaris, Linux, Win32)
  • The version of Java SE you are using (e.g., 1.5.0_01)
  • A complete stack trace
  • If you are using a naming service or an ORB from a different vendor, provide the information on the vendor and version of the product.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Getting Started with Java IDL

Java IDL is a technology for distributed objects – that is, objects interacting on different platforms across a network. Java IDL enables objects to interact regardless of whether they're written in the Java programming language or another language such as C, C++, COBOL, or others.

This is possible because Java IDL is based on the Common Object Request Brokerage Architecture (CORBA), an industry-standard distributed object model. A key feature of CORBA is IDL, a language-neutral Interface Definition Language. Each language that supports CORBA has its own IDL mapping--and as its name implies, Java IDL supports the mapping for Java. To learn more about the IDL-to-Java language mapping, see IDL-to-Java Language Mapping.

To support interaction between objects in separate programs, Java IDL provides an Object Request Broker, or ORB. The ORB is a class library that enables low-level communication between Java IDL applications and other CORBA-compliant applications.

This tutorial teaches the basic tasks needed to build a CORBA distributed application using Java IDL. You will build the classic "Hello World" program as a distributed application. The Hello World program has a single operation that returns a string to be printed.

Any relationship between distributed objects has two sides: the client and the server. The server provides a remote interface, and the client calls a remote interface. These relationships are common to most distributed object standards, including Java Remote Method Invocation (RMI, RMI-IIOP) and CORBA. Note that in this context, the terms client and server define object-level rather than application-level interaction--any application could be a server for some objects and a client of others. In fact, a single object could be the client of an interface provided by a remote object and at the same time implement an interface to be called remotely by other objects.

This figure shows how a one-method distributed object is shared between a CORBA client and server to implement the classic "Hello World" application.

A one-method distributed object shared between a CORBA client and server.

On the client side, the application includes a reference for the remote object. The object reference has a stub method, which is a stand-in for the method being called remotely. The stub is actually wired into the ORB, so that calling it invokes the ORB's connection capabilities, which forwards the invocation to the server.

On the server side, the ORB uses skeleton code to translate the remote invocation into a method call on the local object. The skeleton translates the call and any parameters to their implementation-specific format and calls the method being invoked. When the method returns, the skeleton code transforms results or errors, and sends them back to the client via the ORBs.

Between the ORBs, communication proceeds by means of a shared protocol, IIOP--the Internet Inter-ORB Protocol. IIOP, which is based on the standard TCP/IP internet protocol, defines how CORBA-compliant ORBs pass information back and forth. Like CORBA and IDL, the IIOP standard is defined by OMG, the Object Management Group.

The Java IDL Development Process and the Hello World Tutorial

This tutorial teaches the basic tasks in building a CORBA distributed application using Java IDL. You will build the classic "Hello World" program as a distributed application. The "Hello World" program has a single operation that returns a string to be printed.

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation. The following steps provide a general guide to designing and developing a distributed object application with Java IDL. Links to the relevant steps of the tutorial will guide you through creating this sample application.

  1. Define the remote interface

    You define the interface for the remote object using the OMG's Interface Definition Langauge (IDL). You use IDL instead of the Java language because the idlj compiler automatically maps from IDL, generating all Java language stub and skeleton source files, along with the infrastructure code for connecting to the ORB. Also, by using IDL, you make it possible for developers to implement clients and servers in any other CORBA-compliant language.

    Note that if you're implementing a client for an existing CORBA service, or a server for an existing client, you would get the IDL interfaces from the implementer--such as a service provider or vendor. You would then run the idlj compiler over those interfaces and follow these steps.

    Writing the IDL file in this tutorial walks you through defining the remote interface for the simple "Hello World" example.

  2. Compile the remote interface

    When you run the idlj compiler over your interface definition file, it generates the Java version of the interface, as well as the class code files for the stubs and skeletons that enable your applications to hook into the ORB.

    Mapping Hello.idl to Java in this tutorial walks you through these steps for the simple "Hello World" example.

  3. Implement the server

    Once you run the idlj compiler, you can use the skeletons it generates to put together your server application. In addition to implementing the methods of the remote interface, your server code includes a mechanism to start the ORB and wait for invocation from a remote client.

    Developing the Hello World Server walks you through writing a simple server for the "Hello World" application.

  4. Implement the client

    Similarly, you use the stubs generated by the idlj compiler as the basis of your client application. The client code builds on the stubs to start its ORB, look up the server using the name service provided with Java IDL, obtain a reference for the remote object, and call its method.

    Developing a Client Application walks you through writing a simple client application.

  5. Start the applications

    Once you implement a server and a client, you can start the name service, then start the server, then run the client.

    Running the Hello World Application walks you through running the server and client program that together make up the "Hello World" application, and the name service that enables them to find one another.

Using Stringified Object References walks you through making an object reference when there is no naming service.

Running the Hello World Application on Two Machines describes one way of distributing the simple application across two machines - a client and a server.

For More Information

Although concepts are explained as they are introduced in the tutorial, you will find more information in the Concepts section. New terms are linked to their definitions throughout the tutorial.

The Object Management Group no longer maintains this site, but the CORBA for Beginnners page contains links to web pages that provide introductory CORBA information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Glossary

Documentation Contents

Glossary of Java IDL Terms

adapter activator
An adapter activator is an object that the application developer can associate with a POA. The ORB will invoke an operation on an adapter activator when a request is received for a child POA that does not currently exist. The adapter activator can then create the required POA on demand.

attribute (IDL)
An identifiable association between an object and a value. An attribute A is made visible to clients as a pair of operations: get_A and set_A. Readonly attributes only generate a get operation.

Also, that part of an IDL interface that is similar to a public class field or C++ data member. The idlj compiler maps an OMG IDL attribute to accessor and modifier methods in the Java programming language. For example, an interface ball might include the attribute color. The idlj compiler would generate a Java programming language method to get the color, and unless the attribute is readonly, a method to set the color.

client
Any code which invokes an operation on a distributed object. A client might itself be a CORBA object, or it might be a non-object-oriented program, but while invoking a method on a CORBA object, it is said to be acting as client.

client stub
A Java programming language class generated by idlj and used transparently by the client ORB during object invocation. The remote object reference held by the client points to the client stub. This stub is specific to the IDL interface from which it was generated, and it contains the information needed for the client to invoke a method on the CORBA object that was defined in the IDL interface.

client tier
The portion of a distributed application that requests services from the server tier. Typically, the client tier is characterized by a small local footprint, a graphical user interface, and simplified development and maintenance efforts.

Common Object Request Broker Architecture (CORBA)
An OMG-specified architecture that is the basis for the CORBA object model. The CORBA specification includes an interface definition language (IDL), which is a language-independent way of creating contracts between objects for implementation as distributed applications.

The Java 2 Platform Standard Edition (J2SE) provides a CORBA Object Request Broker (ORB) and two CORBA programming models that utilize the Java CORBA ORB and Internet InterORB Protocol (IIOP). The two programming models are the RMI programming model, or RMI-IIOP, and the IDL programming model, or Java IDL. For more information on these programming models, read CORBA Technology and the Java Platform.
See also: client tier, service tier, data store tier

CORBA object
An entity which (1) is defined by an OMG IDL interface, and (2) for which an object reference is available. Object is also the implicit common base type for object references of IDL interfaces.

data store tier
The portion of a distributed application that manages access to persistent data and its storage mechanisms, such as relational databases.

distributed application
A program designed to run on more than one computer, typically with functionality separated into tiers such as client, service, and data store.

distributed environment
A network of one or more computers that use CORBA objects. Objects are installed on the various machines and can communicate with each other.

Dynamic Invocation Interface (DII)
An API that allows a client to make dynamic invocations on remote CORBA objects. It is used when at compile time a client does not have knowledge about an object it wants to invoke. Once an object is discovered, the client program can obtain a definition of it, issue a parameterized call to it, and receive a reply from it, all without having a type-specific client stub for the remote object.

Dynamic Skeleton Interface (DSI)
An API that provides a way to deliver requests from an ORB to an object implementation when the type of the object implementation is not known at compile time. DSI, which is the server side analog to the client side DII, makes it possible for the application programmer to inspect the parameters of an incoming request to determine a target object and method.

exception (IDL)
An IDL construct that represents an exceptional condition that could be returned in response to an invocation. There are two categories of exceptions: (1) system exceptions, which inherit from org.omg.CORBA.SystemException (which is a java.lang.RuntimeException), and (2) user-defined exceptions, which inherit from org.omg.CORBA.UserException (which is a java.lang.Exception).

factory object
A CORBA object that is used to create new CORBA objects. Factory objects are themselves usually created at server installation time.

idlj compiler
A tool that takes an interface written in OMG IDL and produces Java programming language interfaces and classes that represent the mapping from the IDL interface to the Java programming language. The resulting files are .java files. Prior to JDK 1.3, the idlj compiler was known as the idltojava compiler. The idlj compiler supports new CORBA-standard features required for RMI-IIOP. The idlj compiler is placed in the SDK's .bin directory by the installer.

idltojava compiler
A tool that takes an interface written in OMG IDL and produces Java programming language interfaces and classes that represent the mapping from the IDL interface to the Java programming language. The resulting files are .java files. Beginning with JDK 1.3, the IDL-to-Java language mapping is handled by the idlj compiler, which supports new CORBA-standard features required for RMI-IIOP. The idltojava compiler can be downloaded from the Java Developer Connection (JDC) web site.

implementation
A concrete class that defines the behavior for all of the operations and attributes of the IDL interface it supports. A servant object is an instance of an implementation. There may be many implementations of a single interface.

initial naming context
The NamingContext object returned by a call to the method orb.resolve_initial_references("NameService"). It is an object reference to the COS Naming Service registered with the ORB and can be used to create other NamingContext objects.
See also: naming context

Interface Definition Language (IDL)
The OMG-standard language for defining the interfaces for all CORBA objects. An IDL interface declares a set of operations, exceptions, and attributes. Each operation has a signature, which defines its name, parameters, result and exceptions. OMG IDL does not include implementations for operations; rather, as its name indicates, it is simply a language for defining interfaces. The complete syntax and semantics for IDL are available in the OMG specification at the OMG web site.

Interface Repository (IFR)
A service that contains all the registered component interfaces, the methods they support, and the parameters they require. The IFR stores, updates, and manages object interface definitions. Programs may use the IFR APIs to access and update this information. An IFR is not necessary for normal client/server interactions.

Internet InterORB Protocol (IIOP)
The OMG-specified network protocol for communicating between ORBs. Java IDL conforms to CORBA/IIOP specification 2.3.1.

invocation
The process of performing a method call on a CORBA object, which can be done without knowledge of the object's location on the network. Static invocation, which uses a client stub for the invocation and a server skeleton for the service being invoked, is used when the interface of the object is known at compile time. If the interface is not known at compile time, dynamic invocation must be used.

Java IDL
The classes, libraries, and tools that make it possible to use CORBA objects from the Java programming language. The main components of Java IDL are an ORB, a naming service, and the idlj compiler. All are part of this release of J2SE.

name binding
The association of a name with an object reference. Name bindings are stored in a naming context.

namespace
A collection of naming contexts that are grouped together.

naming context
A CORBA object that supports the NamingContext interface and functions as a sort of directory which contains (points to) other naming contexts and/or simple names. Similar to a directory structure, where the last item is a file and preceding items are directories, in a naming context, the last item is an object reference name, and the preceding items are naming contexts.

naming service
A CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. The two options for Naming Services shipped with this version of Java SE are orbd, which is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager, and tnameserv, a transient naming service.

object
A computational grouping of operations and data into a modular unit. An object is defined by the interface it presents to others, its behavior when operations on its interface are invoked, and its state.

object adapter
The ORB component which provides object reference, activation, and state related services to an object implementation. There may be different adapters provided for different kinds of implementations. The POA is a particular type of object adapter specified by OMG that can be used with multiple ORB implementations with a minimum of rewriting needed to deal with different vendors' implementations.

object id
An object id is a value that is used by the POA and by the user-supplied implementation to identify a particular abstract CORBA object. Object Id values may be assigned and managed by the POA, or they may be assigned and managed by the implementation. Object Id values are hidden from clients, encapsulated by references. Object Ids have no standard form; they are managed by the POA as uninterpreted octet sequences.

object implementation
See implementation.

Object Management Group (OMG)
An international organization with over 700 members that establishes industry guidelines and object management specifications in order to provide a common framework for object-oriented application development. Its members include platform vendors, object-oriented database vendors, software tool developers, corporate developers, and software application vendors. The OMG Common Object Request Broker Architecture specifies the CORBA object model. See www.omg.org for more information.

object reference
A construct containing the information needed to specify an object within an ORB. An object reference is used in method invocations to locate a CORBA object. Object references are the CORBA object equivalent to programming language-specific object pointers. They may be obtained from a factory object or from the Naming Service. An object reference, which is opaque (its internal structure is irrelevant to application developers), identifies the same CORBA object each time it is used. It is possible, however, for multiple object references to refer to the same CORBA object.

Object Request Broker (ORB)
The libraries, processes, and other infrastructure in a distributed environment that enable CORBA objects to communicate with each other. The ORB connects objects requesting services to the objects providing them.

operation (IDL)
The construct in an IDL interface that maps to a Java programming language method. For example, an interface ball might support the operation bounce. Operations may take parameters, return a result, or raise exceptions. IDL operations can be oneway, in which case they cannot return results (return values or out arguments) or raise exceptions.

operations interface
A non abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. The operations interface has the same name as the IDL interface with the suffix Operations appended to the end and is used in the server-side mapping and as a mechanism for providing optimized calls for collocated clients and servers.

ORBD (Object Request Broker Daemon)
The orbd tool (Solaris, Linux, or Mac OS X or Windows) is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager.

parameter (IDL)
One or more objects the client passes to an IDL operation when it invokes the operation. Parameters may be declared as "in" (passed from client to server), "out" (passed from server to client), or "inout" (passed from client to server and then back from server to client).

persistent object
An object that can survive the process or thread that created it. A persistent object exists until it is explicitly deleted.

PIDL (Pseudo-IDL)
The interface definition language for describing a CORBA pseudo-object. Each language mapping, including the mapping from IDL to the Java programming language, describes how pseudo objects are mapped to language-specific constructs. PIDL mappings may or may not follow the rules that apply to mapping regular CORBA objects.

POA (Portable Object Adapter)
An object adapter is the mechanism that connects a request using an object reference with the proper code to service that request. The POA is a particular type of object adapter specified by OMG that can be used with multiple ORB implementations with a minimum of rewriting needed to deal with different vendors' implementations.

The POA is also intended to allow persistent objects -- at least, from the client's perspective. That is, as far as the client is concerned, these objects are always alive, and maintain data values stored in them, even though physically, the server may have been restarted many times, or the implementation may be provided by many different object implementations.

POA Manager
A POA manager is an object that encapsulates the processing state of one or more POAs. Using operations on a POA manager, the developer can cause requests for the associated POAs to be queued or discarded. The developer can also use the POA manager to deactivate the POAs.

policy
A policy is an object associated with a POA by an application in order to specify a characteristic shared by the objects implemented in that POA. This specification defines policies controlling the POA's threading model as well as a variety of other options related to the management of objects. Other specifications may define other policies that affect how an ORB processes requests on objects implemented in the POA.

Portable Interceptors
Portable Interceptors are hooks into the ORB through which ORB services can intercept the normal flow of execution of the ORB. For more information, see PortableInterceptor Package.

pragma
In J2SE v.1.2, a directive to the idltojava compiler to perform certain operations while compiling an IDL file. For example, the pragma "javaPackage" directs the idltojava compiler to put the Java programming language interfaces and classes it generates from the IDL interface into the Java programming language package specified. In J2SE v.1.3 and higher, this functionality is supported via the -pkgPrefix command line option to idlj.

pseudo-object
An object similar to a CORBA object in that it is described in IDL, but unlike a CORBA object, it cannot be passed around using its object reference, nor can it be narrowed or stringified. Examples of pseudo-objects include the Interface Repository and DII which, although implemented as libraries, are more clearly described in OMG specifications as pseudo-objects with IDL interfaces. The IDL for pseudo-objects is called "PIDL" to indicate that a pseudo-object is being defined.

RMI-IIOP
Java RMI-IIOP is an Object Request Broker and a compiler, rmic -iiop, that generates IIOP stub and tie classes. With RMI-IIOP, developers can write remote interfaces in the Java programming language and implement them simply using Java technology and the Java RMI APIs. These interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces. Using RMI-IIOP, objects can be passed both by reference and by value over IIOP.

servant
A servant is a programming language object or entity that implements requests on one or more objects. Servants generally exist within the context of a server process. Requests made on an object's references are mediated by the ORB and transformed into invocations on a particular servant. In the course of an object's lifetime it may be associated with (that is, requests on its references will be targeted at) multiple servants.

servant manager
A servant manager is an object that the application developer can associate with a POA. The ORB will invoke operations on servant managers to activate servants on demand, and to deactivate servants. Servant managers are responsible for managing the association of an object (as characterized by its Object Id value) with a particular servant, and for determining whether an object exists or not. There are two kinds of servant managers, called ServantActivator and ServantLocator; the type used in a particular situation depends on policies in the POA.

servant object
An instance of an object implementation for an IDL interface. The servant object is registered with the ORB so that the ORB knows where to send invocations. It is the servant that performs the services requested when a CORBA object's method is invoked.

server
A program that contains the implementations of one or more IDL interfaces. For example, a desktop publishing server might implement a Document object type, a ParagraphTag object type, and other related object types. The server is required to register each implementation (servant object) with the ORB so that the ORB knows about the servant. Servers are sometimes referred to as object servers.

server skeleton
A public abstract class generated by the idlj compiler that provides the ORB with information it needs in dispatching method invocations to the servant object(s). A server skeleton, like a client stub, is specific to the IDL interface from which it is generated. A server skeleton is the server side analog to a client stub, and these two classes are used by ORBs in static invocation.

servertool
The Java IDL Server Tool, servertool (Solaris, Linux, or Mac OS X or Windows) provides the ease-of-use interface for the application programmers to register, unregister, startup, and shutdown a server.

service tier
The portion of a distributed application that contains the business logic and performs most of the computation. The service tier is typically located on a shared machine for optimum resource use.

signature interface
A non-abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. The signature interface, which extends IDLEntity, has the same name as the IDL interface name and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces.

skeleton
The object-interface-specific ORB component which assists an object adapter in passing requests to particular methods.

static invocation
See invocation.

stringified object reference
An object reference that has been converted to a string so that it may be stored on disk in a text file (or stored in some other manner). Such strings should be treated as opaque because they are ORB-implementation independent. Standard object_to_string and string_to_object methods on org.omg.CORBA.Object make stringified references available to all CORBA Objects.

stub
A local procedure corresponding to a single operation that invokes that operation when called.

tnameserv
The CORBA COS (Common Object Services) Naming Service provides a tree-like directory for object references much like a filesystem provides a directory structure for files. The Transient Naming Service provided with Java IDL, tnameserv> (Solaris, Linux, or Mac OS X or Windows), is a simple implementation of the COS Naming Service specification. Object references are stored in the namespace by name and each object reference-name pair is called a name binding. Name bindings may be organized under naming contexts. Naming contexts are themselves name bindings and serve the same organizational function as a file system subdirectory. All bindings are stored under the initial naming context. The initial naming context is the only persistent binding in the namespace; the rest of the namespace is lost if the transient naming service process halts and restarts.

transient object
An object whose existence is limited by the lifetime of the process or thread that created it.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Initialization

This document was not updated for this release.

Before a Java program can use CORBA objects, it must initialize itself as follows:

  • Create an ORB object.
  • Obtain one or more initial object references, typically at least a naming context.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Interoperable Naming Service (INS) Example

Documentation Contents

Java IDL: Interoperable Naming Service (INS) Example

The Interoperable Naming Service (INS) is an extension to the CosNaming service. It provides the following additional features:

  • Capability to resolve using stringified names (e.g., Department/Accounting/TravelExpenses)
  • URLs for CORBA object references (corbaloc: and corbaname: formats)
  • Convenient APIs in NamingContextExt for handling CosNames and URLs
  • ORB arguments for bootstrapping (ORBInitRef and ORBDefaultInitRef)

The following diagram shows how INS fits into ORBD:

An object reference contains at least three pieces of information: an address, the name of the POA that created an object reference, and an Object ID.

Using INS, you can provide an URL to access the CORBA object, which is more readable than a stringified Interoperable Object References (IOR). The following stringified object reference formats are allowed:

  • Interoperable Object References (IOR)

    An IOR is an object reference that is understood by ORBs that can interoperate using the OMG-defined protocols General Inter-ORB Protocol (GIOP) and Internet Inter-ORB Protocol (IIOP). A client can obtain an object reference using orb.object_to_string(objRef), as shown in the Browsing the Namespace example, or as a result of an invocation on another object reference.

  • Human-Readable URL Formats for CORBA Object References

    The corbaloc and corbaname formats enable you to provide a URL to access CORBA objects. Use the corbaloc format for resolving to a particular CORBAservice without going through a naming service. Use the corbaname format to resolve a stringified name from a specific naming context.

    • corbaloc:

      The corbaloc: format is used to locate CORBA services, is useful for CORBA client programs, and is typically used to resolve the reference using the GIOP LocateRequest or Request message. For example, a corbaloc: object reference might look like this:

              corbaloc:iiop:1.2@example.com:2050/TraderService

      This example show how to get an object reference for TraderService from host example.com on port 2050.

      NOTE: The 1.2 in the example URL refers to GIOP version 1.2 for the IOR that corresponds to that corbaloc URL. GIOP 1.2 is the default value for Java CORBA ORB. It is shown in this example in order to demonstrate how you can plug in a different version.

    • corbaname:

      The corbaname: format provides a mechanism for a client to bootstrap directly, and is typically used to resolve the stringified name from the root naming context. For example, a corbaname: object reference might look like this:

              corbaname::example.com:2050#Personal/schedule

      where example.com is the host, 2050 is the port. The portion of the reference up to the hash mark (corbaname::example.com:2050 ) is the URL that returns the root naming context. This example provides the URL to use to: a) locate the Naming Service, and, b) resolve the name Personal/schedule from the Naming Service.

NamingContextExt API

The NamingContextExt interface, derived from NamingContext provides the operations required to use URLs and stringified names. Some of the APIs in NamingContextExt for converting between CosNames, Stringified Names, and URLs are listed below. See the COS Naming Specification, Section 3.6.4, for more information on these API.

  • to_string

    This operation accepts a Name and returns a stringified name. If the Name is invalid, an InvalidName exception is raised.

  • to_name

    This operation accepts a stringified name and returns a Name. If the stringified name is syntactically malformed or violates an implementation limit, an InvalidName exception is raised.

  • resolve_str

    This is a convenience operation that performs a resolve in the same manner as NamingContext.resolve(). It accepts a stringified name as an argument instead of a Name.

  • to_url

    This operation takes a corbaloc URL <address> and <key_string> component such as

    • :myhost.555xyz.com
    • :myhost.555xyz.com/a/b/c
    • atm:00002112...,:myhost.xyz.com/a/b/c

    for the first parameter, and a stringified name for the second. It then performs any escapes necessary on the parameters and returns a fully formed URL string. An exception is raised if either the corbaloc address and key parameter or name parameter are malformed.

    It is legal for the stringified_name to be empty. If the address is empty, an InvalidAddress exception is raised.

Conversions from URLs to objects are handled by org.omg.CORBA.ORB.string_to_object() as described in the CORBA 2.3 Specification, Section 13.6.6.

The following Java IDL tutorials use NamingContextExt:

  • Java IDL: The "Hello World" Example (using the POA and a transient server)
  • Java IDL: The "Hello World" Example (using the POA, a persistent server, and a persistent naming service)
  • Java IDL: The "Hello World" Example (using the POA-Tie server-side model)

Bootstrap Options for the ORB

The ORB can be configured to return the handle of a customized CORBA service from resolve_initial_references() using either ORBInitRef and/or ORBDefaultInitRef. For example,

  • Use -ORBInitRef to resolve to specific CORBA services, for example,
    -ORBInitRef TraderService=corbaloc::example.com:2050/TraderService
  • If no -ORBInitRef is given, -ORBDefaultInitRef is used to resolve. In the TraderService example,
    -ORBDefaultInitRef corbaloc:iiop:1.2:example.com:2050

The order of resolution when these options are used is as follows:

  1. Objects registered with register_initial_references
  2. -ORBInitRef
  3. -ORBDefaultInitRef
  4. Proprietary Bootstrap (Oracle ORBs only)

For more information about INS, refer to the INS Naming Specification.

INS Example: Publishing a Reference to be Accessed by INS URL's

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using the Interoperable Naming Service (INS).

This example makes use of the following files:

  • The IDL for a simple interface for this example
  • A server that creates an object and publishes it to be used by INS URL's
  • The implementation of the Service interface
  • An application client that retrieves a reference from the server using corbaloc: URL
  • Instructions for compiling and running the example

step Each step in the tutorial is indicated by this symbol.

Defining the Interface (Service.idl)

The first step to creating a CORBA application is to specify all of your objects and their interfaces using the OMG's Interface Definition Language (IDL).

The following code is written in the OMG IDL, and describes a CORBA object whose ping() operation pings the INS Service.

step Create the file Service.idl and add the following code:

Service.idl

// A very simple interface to explain this example
interface Service {
    void ping();
};

Implementing the Server (INSServer.java)

The INSServer class has the server's main() method, which:

  • Sets the ORBPeristentServerPort property in order to open up a port to listen for INS requests (Oracle proprietary property)
  • Creates and initializes an ORB instance
  • Gets a reference to the root POA and activates its POAManager
  • Creates a servant (the implementation of one CORBA ServiceImpl object)
  • Registers the new object in the naming context under the name "PingService"
  • Waits for invocations of the new object from the client

step Create the file INSServer.java and add the following code:

INSServer.java

// INSServer.java
// Copyright and License
import java.util.Properties;
import org.omg.CORBA.Object;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.*;
import org.omg.PortableServer.Servant;

public class INSServer {
    public static void main( String args[] ) {
        try {
            Properties properties = System.getProperties( );
            // STEP 1: Set ORBPeristentServerPort property
            // Set the proprietary property to open up a port to listen to
            // INS requests.
            // Note: This property is subject to change in future releases
            properties.put( "com.sun.CORBA.POA.ORBPersistentServerPort",
                Integer.toString(1060) );

            // STEP 2: Instantiate the ORB, By passing in the
            // ORBPersistentServerPort property set in the previous step
            ORB orb = ORB.init( args, properties );

            // STEP 3: Instantiate the Service Object that needs to be published
            // and associate it with RootPOA.
            ServiceImpl servant = new ServiceImpl( );
            POA rootPOA = POAHelper.narrow( orb.resolve_initial_references( "RootPOA" ));
            rootPOA.the_POAManager().activate();
            rootPOA.activate_object( servant );

            // STEP 4: Publish the INS Service using
            // orb.register_initial_reference( <ObjectKey>, <ObjectReference>
            // NOTE: Oracle Java private internal API, not part of CORBA 2.3.1.
            // May move as our compliance with OMG standards evolves.
            ((com.sun.corba.se.internal.Interceptors.PIORB) orb).
                register_initial_reference(
                "PingService", rootPOA.servant_to_reference(servant) );

            System.out.println( "INS Server is Ready..." );

            // STEP 5: We are ready to receive requests
            orb.run( );
        } catch ( Exception e ) {
             System.err.println( "Error in setup : " + e );
        }
    }
}

Implementing the Service (ServiceImpl.java)

The example implementation, ServiceImpl, is the implementation of the Service IDL interface.

step Create the file ServiceImpl.java and add the following code:

ServiceImpl.java

// ServiceImpl.java
// Copyright and License

// Implementation of Service interface
public class ServiceImpl extends ServicePOA {
    public void ping( ) {
        System.out.println( "PingService.ping called..." );
    }
}

Implementing the Client Application (INSClient.java)

The example application client that follows:

  • Creates and initializes an ORB
  • Retrieves PingService object reference using resolve_initial_references()
  • Invokes the PingService's ping() operation and prints the result

step Create the file INSClient.java and add the following code:

INSClient.java

// INSClient.java
// Copyright and License

import org.omg.CORBA.ORB;

public class INSClient {
    public static void main( String args[] ) {
        try {
            // STEP 1: Instantiate the ORB
            ORB orb = ORB.init( args, null );

            // STEP 2: Resolve PingService using orb.resolve_initial_references()
            // In this example we have used -ORBInitRef argument to locate the
            // PingService. User can also choose to pass the corbaloc: url to
            // orb.string_to_object to resolve the published PingService
            // reference.
            org.omg.CORBA.Object object = orb.resolve_initial_references(
                "PingService" );

            // STEP 3: Narrow the reference and we are ready to invoke method
            // on PingService.
            Service insService = ServiceHelper.narrow( object );

            insService.ping( );
            System.out.println( "The server has been pinged" );

        } catch ( Exception e ) {
            System.err.println( "Exception in INSClient " + e );
            e.printStackTrace( );
        }
    }
}

Building and Running the INS Example

When running this example, we recommend that you use a port number greater than or equal to 1024. This is because you must become root to start a process on a port under 1024 when using Solaris software. The ORBPersistentServerPort property of the server has been set to 1060 in this example.

Compile the Interface Definition

step Change to the directory that contains the file Service.idl, and run the IDL-to-Java compiler as shown below:

  idlj -fall  Service.idl

You must use the -fall option with the idlj compiler to generate both client and server-side bindings. For more information on the idlj options, see the man page for idlj (Solaris, Linux, or Mac OS X or Windows).

The files generated by the idlj compiler for Service.idl, with the -fall command line option, are:

  • ServicePOA.java - the server skeleton
  • _ServiceStub.java - client stub
  • Service.java - the Java version of our IDL interface
  • ServiceHelper.java - auxiliary functionality, notably the narrow() method
  • ServiceHolder.java - holds a public instance member of type INS
  • ServiceOperations.java - contains the method ping()

Compile the Java files

step Compile the .java files, including the stubs and skeletons, as follows:

   javac *.java

Start the INS Server

step Start the INS server:

  java -classpath . INSServer

If the INS Server is running correctly, the following message will display:

INS Server is Ready...

Start the Client Application

step Open another terminal window or DOS shell and run the client application:

  java -classpath . INSClient -ORBInitRef
    PingService=corbaloc:iiop:1.2@localhost:1060/PingService

When the client is run with the -ORBInitRef option, it will be able to locate PingService. The following message displays in the client window:

The server has been pinged

And the following message displays in the server window:

PingService.ping called...

When you have finished this tutorial, be sure to shut down or kill the INS server. To do this from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To do this from a shell on Solaris, Linux, or Mac OS X, open the shell that was running the client and type pkill INSServer.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java IDL FAQ

This is a document that attempts to answer many of the questions you may have about using Java IDL technology.

Errors

  • Why do I get this message when I try to run HelloServer: Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer/java
  • My existing programs aren't running using this release. Are there any compatibility issues that could affect this?
  • Why can't I connect using IOR's from a Linux server when the IOR contains 127.0.0.0 as the host address?
  • What does this minor code mean?
  • Can I add multiple classpaths when starting a server using servertool?
  • What do I do when the naming service (tnameserv, orbd) fails to run on the Linux platform??

Features

  • What is the thread model supported by the CORBA implementation in this release?
  • Does Java IDL contain notification/event services? an Interface Repository?
  • How can I run the Hello World example on two machines?
  • Is Java IDL compliant with OMG CORBA specifications?

Compatibility/Interoperability

  • With which CORBA specifications does J2SE 5.0 comply?
  • How can I specify a different ORB?
  • How can I test whether my JDK ORB Client can communicate with another vendor's ORB implementation?
  • Do you have any examples that use a CORBA client and a Java server application?
  • How do I connect to a 3rd-party Naming Service from Sun's ORB?
  • Can I use the Java IDL ORB with a C++ CORBA server? (interoperability)

General

  • Should I use Java IDL or Java RMI-IIOP technology?
  • Where can I download the idltojava compiler?
  • What are my options for developing CORBA applications using Java technology?
  • What is the difference between Java IDL and Java RMI-IIOP?
  • What are the limitations of Java IDL and Java RMI-IIOP in this release?
  • What are the standard tags for ...?

Errors

Why do I get this message when I try to run HelloServer: "Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer/java"

The most common reason for this error when running HelloServer (and also HelloClient) from the Java IDL tutorial is that HelloServer is not in the classpath. For more information on setting the classpath variable, see Setting the class path.

The second most common reason occurs when a space is added between quotation marks in the following line of code:

NameComponent nc = new NameComponent("Hello", "");

There should be no spaces between the quotation marks. Without spaces, this value is passed as a null. With a space between the quotations, a space character is passed.

My existing programs aren't running using this release. Are there any compatibility issues that could affect this?

Information on compatibility between J2SE 1.4.x and J2SE 5.0 can be found in CORBA Compatibility Information - J2SE 5.0.

Why can't I connect using IOR's from a Linux server when the IOR contains 127.0.0.0 as the host address?

On Red Hat Linux installations InetAddress.getLocalHost() may return an InetAddress corresponding to the loopback address (127.0.0.1). This arises because the default installation creates an association in /etc/hosts between the hostname of the machine and the loopback address. To ensure that InetAddress.getLocalHost() returns the actual host address, update the /etc/hosts file or the name service configuration file (/etc/nsswitch.conf) to query dns or nis before searching hosts.

What does this minor code mean?

The most recent versions of the standard (OMG) minor code exceptions can be found on the OMG Web site at http://www.omg.org/.

Some of the most common Sun minor code exceptions are the following:

  • COMM_FAILURE/201. vmcid: SUN minor code: 201 literally means "CONNECT_FAILURE". This may be caused by a java.net.SocketException, usually one of BindException, ConnectException, or NoRouteToHostException.

    Some things to verify are:

    • Is a naming service running? If not, start the ORBD naming service as described in the orbd man page (Solaris, Linux, or Mac OS X or Windows).

    • Are the -ORBInitialHost and -ORBInitialPort values being set correctly for the naming service? If you are uncertain about what the settings should be, read the orbd man page (Solaris, Linux, or Mac OS X or Windows).

    • Are the client and server applications aware of the port number (and machine name, if applicable) where the Naming Service is running? Read the orbd man page (Solaris, Linux, or Mac OS X or Windows) for more information on how to do this.

  • COMM_FAILURE/208. vmcid: SUN minor code: 208 literally means "CONNECTION ABORT", which generally means the connection has been dropped.

  • COMM_FAILURE/209. vmcid: SUN minor code: 209 literally means "CREATE_LISTENER_FAILED": Unable to create the listener thread on the specific port. Either the post is taken or there was an error creating the daemon thread. This generally indicates that the port on which you are trying to run the naming service is in use by another process. If you are running on Solaris, you could discover whether or not something is running on this port using the following terminal prompt command:

    netstat | grep port_number

  • OBJECT_NOT_EXIST/204. vmcid: SUN minor code: 204 literally means "SERVANT_NOT_FOUND". It is only thrown in one place: corba.INSSubcontract.getINSReference.

  • MARSHAL/217. vmcid: SUN minor code: 217 means that your client tried to send either a wchar or wstring in GIOP 1.0, which is not legal in the spec.

  • MARSHAL/202. vmcid: SUN minor code: 202 means that the code is attempting to marshal an object that derives from org.omg.CORBA.Object, but that particular instance has never been connected to an ORB. When using the POA, you need to register the object with the POA first. If you need more information on how to register an object with the POA, refer to Portable Object Adapter (POA) or the Getting Started with Java™ IDL tutorial.

  • BAD_PARAM/201. vmcid: SUN minor code: 201 literally means "NULL_PARAM". This exception often occurs because a Java null was given to a write method such as write_string, write_octet_array, etc. You cannot return a Java null as the result of a Java method.

  • org.omg.CORBA.INTERNAL. vmcid: SUN minor code: 208 means Unable to determine local hostname using InetAddress.getLocalHost().getHostName().

    The ORB uses InetAddress.getLocalHost().getHostName() to create a reference to the name service for looking for and/or binding references. It also uses InetAddress.getLocalHost().getHostName() on the server side to create remote object references (i.e., IORs) that contain the name/port of the server (rather than a dotted-decimal/port pair).

    To avoid the call to getHostName, you can set the following properties (refer to the orbd man page [Solaris, Linux, or Mac OS X or Windows] if you are not sure how to do this):

    • Set com.sun.CORBA.ORBServerHost to the DNS name or dotted-decimal address of the server if the ORB is acting as a server.

    • Set com.sun.CORBA.ORBInitialHost to the DNS name or dotted-decimal address of the name server.

    NOTE: These properties are proprietary and are subject to deletion or change.

Can I add multiple classpaths when starting a server using servertool?

The longer version of this question was as follows: My server code needs multiple JAR files in the classpath. When I register my server using the servertool, and try to specify the classpath, I get the syntax of the register command. I assume my command line is exceeding the limit.

How do I specify a really long classpath while registering the server in the servertool?

The servertool does accept multiple JAR files, however, there is currently a bug with the length of the command line buffer in servertool. Read more about the servertool wrapper bug, 4482166.

The workaround is to call the ServerTool class to start the server, rather than starting the server from within servertool, such as:

${JAVA_HOME}/bin/java com.sun.corba.se.internal.Activation.ServerTool
-ORBInitialPort ${ORB_INITIAL_PORT} -cmd register -server
sample.MyServer -classpath jar1:jar2:jar3 -applicationName sample

Please note that the name of the servertool class may change in future releases.

What do I do when the naming service (tnameserv, orbd) fails to run on the Linux platform?

If the naming service fails to startup on Linux, include the following lines in the /etc/hosts file:
<Local Host IP Address>   localhost
<Local Host IP Address>   <HostName>

where <Local Host IP Address> is the IP address where the naming service (tnameserv, orbd) is started.

Features

What is the thread model supported by the CORBA implementation in this release?

The Java CORBA ORB shipped in Java SE is multi-threaded. On the server side, we have a thread pool such that each incoming request is handled by a separate thread. If all the pool's threads are in use when a new request comes in, a new thread is created and added to the pool. The thread is returned to the pool after the request is finished. The Java CORBA ORB is threaded to allow scalability and concurrent request processing. The SINGLE_THREAD option for the POA threading policy is not supported. The threading model for the Java CORBA ORB is implicit: the user does not set the thread policy for the ORB. There are no external, user-level APIs exposed for controlling the threading model or the number of threads.

Does Java IDL contain notification/event services? an Interface Repository?

No, it does not. If you need one of these services, you can implement one, you can purchase one off the shelf, or you can search for one freely available to start things off with. You can plug-in 3rd party services such as these to the ORB using INS technology.

How can I run the Hello World example on two machines?

You need to use the -ORBInitialHost <Host Name where Name Service is Launched> option when starting the client and/or server (whichever is not running on the same machine as the name server). This way the client and server know where to find the Name Service. An example can be found at Java IDL: The "Hello World" Example on Two Machines.

Is Java IDL technology compliant with CORBA specifications?

For compliance information for CORBA technology shipped with J2SE 5.0, read the CORBA compliance statement at Official Specifications for CORBA support in J2SE 5.0.

Compatibility/Interoperability

With which CORBA specifications does J2SE 5.0 comply?

See Official Specifications for CORBA support in J2SE 5.0.

How can I specify a different ORB?

To use an ORB other than the Java CORBA ORB in your application, you can set the org.omg.CORBA.ORBClass property to the ORB of your choice. For example, use code as shown in the example to explicitly set the ORB to the ORB-implementation you would prefer to use:
public class MyApp {

    public static void main( String args[] ) {
        Properties properties = System.getProperties();
        properties.put( "org.omg.CORBA.ORBClass",
            "<com.other_company.package.ORB>" );

        try {
             ORB orb = ORB.init( args, properties);

             ...

Check the vendor's documentation for information on setting properties specific to their ORB implementation.

How can I test whether my JDK ORB Client can communicate with another company's ORB implementation?

This ORB has been tested as part of the J2EE certification process, however, it has not been tested with all vendor's standalone CORBA ORBs.

If INS is supported in the other vendor's service, then, try this. Convert the Interoperable Object References (see Java ID: Interoperable Naming Service Example) on the other vendor's ORB server to a string using the ORB.object_to_string() method using INS. Write that string to a file.

Do you have any examples that use a CORBA client and an EJB server application?

A developer guide that includes an example application with a C++ client and an Enterprise JavaBeans component can be found on the Web site at: Enterprise JavaBeans™ Components and CORBA Clients: A Developer's Guide.

How do I connect to a 3rd-party Naming Service from Sun's ORB?

The recommended way is to use the Java IDL: Interoperable Naming Service (INS) Example, if this option is supported by the 3rd-party Naming Service.

To use the Sun ORB with another vendor's Naming Service,

  1. Start the 3rd-party name server on Host <H> and Port. <P>
  2. Pass the following argument to ORB.init():
            -ORBInitRef NameService=corbaloc:iiop:1.2@:/NameService

When you do orb.resolve_initial_references( "NameService" ), you should be able to connect to 3rd-party Name Service. If you are still not able to connect, try these troubleshooting hints:

  • Verify that the 3rd-party Name Service supports INS.
  • Verify that the host and port information is accurate.
  • Verify that the 3rd-party Name Service has been started successfully.
  • Verify that the 3rd-party Name Service supports GIOP 1.2. If not, refer to the Name Server's documentation for the correct the GIOP version, and modify the corbaloc: URL accordingly.
  • Determine if the 3rd-party Name Service has a different object key it uses to contact NameService. If so, refer to the Name Server's documentation.

Can I use the Java IDL ORB with a C++ CORBA server? (interoperability)

The Java IDL ORB is an ORB completely written using Java technology. The idlj compiler generates code that follows the conventions defined in the IDL to Java Language Mapping Specification. The Java ORB does not provide a compiler that generates code in any languages other than the Java platform. If you want to test interoperability between the Java ORB and an ORB written in another language (such as C++), you will need to find an ORB written in that language and a compiler that conforms to the specific language mapping. Language mapping specifications are available from the Object Management Group Web site at http://www.omg.org/. A user who wants to use the Java platform on one side and C++ on the other will only share the IDL. You will have to use your C++ ORB's tools to generate the stubs and skeletons for use with the C++ ORB, but you don't have to change the IDL at all. To find a vendor that provides a CORBA ORB and a language mapping compiler in the language you are working with, search the Web for "C++ CORBA ORB", or equivalent.

A developer guide that includes an example application with a C++ client and an Enterprise JavaBeans component can be found on the Web site at: Enterprise JavaBeans™ Components and CORBA Clients: A Developer's Guide.

Although it is true that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

General

Should I use Java IDL or Java RMI-IIOP technology?

This is a fundamental question and it's important to understand the distinction between these two ways of integrating the Java programming language with CORBA.

Java IDL technology is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

Java Remote Method Invocation over Internet Inter-ORB Protocol ("RMI-IIOP") technology is for Java programmers who want to program to the Java Remote Method Invocation ("Java RMI") interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans™ (EJB™) technology, since the EJB remote object model is based on Java RMI technology.

Where can I download the idltojava compiler?

The idltojava compiler is no longer available for download. We highly recommend that you use the latest version of the IDL-to-Java compiler, idlj.

To get the latest version of the IDL-to-Java compiler, download the latest version of the Java™ Platform, Standard Edition (Java SE). When Java SE is installed, idlj will be located in the bin directory.

What are my options for developing CORBA applications using Java technology?

CORBA technology as part of the Java 2 platform consists of an Object Request Broker (ORB) written in the Java language (with a small bit of native code), the RMI programming model, and the IDL programming model. The "magic" that gives us the cross-language, cross-vendor interoperability is the Internet InterORB Protocol, or IIOP. IIOP can be a transport protocol for distributed applications written in either IDL or Java RMI. IIOP allows distributed objects to conform to OMG's CORBA specification. When using the IDL programming model, the interface is everything! It defines the points of entry that can be called from a remote process, such as the types of arguments the called procedure will accept, or the value/output parameter of information returned. Using IDL, the programmer can make the entry points and datatypes that pass between communicating processes act like a standard language. CORBA is a language-neutral system in which the argument values or return values are limited to what can be represented in the involved implementation languages. In CORBA, object orientation is limited only to objects that can be passed by reference (the object code itself cannot be passed from machine-to-machine) or are predefined in the overall framework. Passed and returned types must be those declared in the interface. With RMI, the IDL and the implementation language are the same thing, so you don't have to worry about mapping from one to the other. Language-level objects (the code itself) can be passed from one process to the next. Values can be returned by their actual type, not the declared type. Or, you can compile the interfaces to generate IIOP-compliant stubs and skeletons to talk to objects written on other machines in other CORBA-compliant languages.

What is the difference between Java IDL and Java RMI-IIOP?

This is a fundamental question and it's important to understand the distinction between these two ways of integrating the Java programming language with CORBA. Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting the Java language in exactly the same way as other languages like C++ or COBOL. Java RMI-IIOP (Remote Method Invocation over Internet Inter-ORB Protocol) is for developers who want to use the Java programming language to program to the Java RMI interfaces, but use IIOP as the underlying transport. Java RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJB's is RMI-based. There are several scenarios that will define how you will want to create distributed CORBA applications. Here are some of them:
  • Java IDL - If you have been developing CORBA applications using IDL for some time, you will probably want to stay in this environment. Create the interfaces using IDL, and define the client and server applications using the Java programming language to take advantage of its portability, its highly productive implementation environment, and its very robust platform.
  • RMI-JRMP - If all of your applications are written in the Java programming language, you will probably want to use Java RMI technology to enable communication between Java objects on different virtual machines and different physical machines. Using Java RMI without its IIOP option leverages its strengths of code portability, security, and garbage collection.
  • Java RMI-IIOP - If you are writing most of your new applications using the Java programming language, but need to maintain legacy applications written in other programming languages as well, you will probably want to use Java RMI with its IIOP compiler option.

What are the limitations when using Java IDL and/or Java RMI-IIOP?

For more information on product limitations, read Limitations.

What are the standard tags for ...?

The most recent versions of standard tag allocation files can be found at the OMG Web site: http://www.omg.org/.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java IDL-related APIs and Developer Guides

Documentation Contents

Java IDL (CORBA)

Java IDL technology adds CORBA (Common Object Request Broker Architecture) capability to the Java platform, providing standards-based interoperability and connectivity. Java IDL enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IDL (Object Management Group Interface Definition Language) and IIOP (Internet Inter-ORB Protocol) defined by the Object Management Group. Runtime components include a Java ORB for distributed computing using IIOP communication.

Overview

  • CORBA and the Java Programming Language
  • Distributed Application Concepts
  • Glossary
  • POA - Portable Object Adapter
  • Portable Interceptors Advanced Topic
  • INS - Interoperable Naming Service

API Specification

  • package org.omg.CORBA - provides the mapping of the OMG CORBA APIs to the Java[tm] programming language
  • package org.omg.CosNaming - provides the naming service for Java IDL
  • package org.omg.PortableServer - provides classes and interfaces for making the server side of your applications portable across multivendor ORBs
  • package org.omg.PortableInterceptor - provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB
  • package org.omg.DynamicAny - provides classes and interfaces to enable Any values to be dynamically interpreted (traversed) and constructed through DynAny objects
  • org.omg.CORBA.ORB - provides APIs for the CORBA Object Request Broker features

Tutorials and Programmer's Guides

Most of the tutorials are variations on the basic distributed "Hello World" application.

Introductory-Level Tutorials

The following documents provide introductory-level information on creating applications that use Java IDL. All use the POA-server side model. The differences are in the server implementations.

In order to best understand the material, progress through the examples in the order presented here.

  • Introductory "Hello World" example using Java IDL technology
  • "Hello World" example with a transient server (same code as above example, less descriptive material)
  • "Hello World" example with a persistent server

Other server-side models may be created using JavaSE. If you'd like to use other server- side models, refer to these tutorials. Both of these tutorials use a transient server implementation.

  • "Hello World" example with a POA-Tie (Delegation) server-side model
  • "Hello World" example with an ImplBase (Inheritance) server-side model

Intermediate-Level Tutorials

The tutorials listed in this section are for developers who understand the material in the introductory-level tutorials, and are looking for more complex material.

  • Using the Interoperable Naming Service
  • CORBA Programming with Java SE: Programming Transient and Persistent Servers

Advanced-Level Tutorials

These tutorials are for experienced developers. The descriptive material is reduced, the sample code is commented for better understanding of the material.

  • Portable Interceptors
  • Using Servant Activators
  • Using Servant Locators
  • Using Adapter Activators

Programming Guides

  • Exceptions
  • Initialization
  • Naming Service
  • Dynamic Skeleton Interface
  • Mapping IDL to the Java Programming Language

Additional Sample Applications

  • Sample Code for Hello World provides the code for all created and generated files used in the POA server-side model tutorial
  • Example: Interoperable Naming Service
  • Example: Callback Objects

API Enhancements

  • Changes in CORBA (Java IDL, Java RMI-IIOP) Java SE 1.4 and later and Java SE 5.0

Tools

  • the IDL-to-Java compiler, idlj (Solaris, Linux, or Mac OS X or Windows
  • orbd (Solaris, Linux, or Mac OS X or Windows) - a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager
  • servertool ( Solaris, Linux, or Mac OS X or Windows) - the ease-of-use interface for application programmers to register, unregister, startup, and shutdown a server.
  • tnameserv (Solaris, Linux, or Mac OS X or Windows) - the Transient Java IDL Naming Service (provided for backward compatibility)

More Information

The CORBA Home Page

The OMG is the official source of information for all CORBA and IIOP related information. Please see the CORBA 2.3.1 Specification for more information.

For more information on which OMG specifications are implemented in this release of the Java platform, see the compliance document.

For information on product limitations in this release of the Java IDL/RMI-IIOP technologies, see Java IDL Product Limitations.

For questions, check the Java IDL FAQ.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Legal Notices

Documentation Contents

Java IDL Examples License

See Legal Notices

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Limitations

Documentation Contents

Limitations (Java IDL/Java RMI over IIOP)

This document lists some of the limitations regarding Java IDL and Java RMI over IIOP technology in this release of the Java 2 Platform Standard Edition (J2SE). The limitations are outlined below.

The Official Specifications for CORBA Support in J2SE 5.0 document provides information outlining with which OMG Specifications this implementation of the Java IDL and Java RMI over IIOP technologies comply.

LIMITATIONS:

  • Java SDK version interoperability When a J2SE 1.3.x client talks to a server written in J2SE 1.4 or higher using RMI-IIOP and an unchecked or RemoteException is thrown by the server, the client will hang. Similarly, when the server is using J2SE 1.3.x and the client is using J2SE 1.4 or higher, the client will receive a CORBA UNKNOWN exception with minor code 0.

    This issue is currently being addressed at the OMG in the Java to IDL RTF as issue 4795: http://www.omg.org/issues/java2idl-rtf.html#Issue4795.

    In J2SE 1.4.1 and higher: If one side is using J2SE 1.3.1.05, and the other side is using J2SE 1.4.1 or higher on the other side, this type of communication will work properly.

  • Multiple Profile IOR If an IOR has multiple profiles, the first IIOP profile is used for the invocation.

  • Multiple ORBs not allowed in persistent servers This release of Java SE platform does not allow multiple ORB instantiations in persistent servers. If the persistent server is written using the Java RMI over IIOP APIs, instantiating JNDI's InitialContext() creates an ORB. To avoid creating multiple ORBs in this setting, you can set the java.naming.ORB system property to an ORB that is already initialized.

  • Locally-optimized stubs Locally-optimized stubs, those with the local optimization generated by a different IDL-to-Java compiler than idlj, may be used with the J2SE 1.4 or higher ORB. However, Portable Interceptors will not be invoked when taking the locally-optimized stub branch. This is due to an issue with the OMG IDL to Java language mapping and is being addressed under OMG issue 4701.

    The J2SE 1.4 or higher rmic compiler generates locally optimized stubs when used in conjunction with the -iiop option. However, the J2SE 1.4 and higher implementation of javax.rmi.CORBA.Util always returns false for isLocal. The result is that the stubs never use the local optimization. This is due to an issue with the OMG Java to IDL language mapping and is addressed under OMG issue 3754.

    The J2SE 1.4 and higher ORB does use a locally-optimized transport for both Java IDL and Java RMI-IIOP when it detects that the client and server are running sharing the same ORB.

  • Single thread POA policy As per the CORBA 2.3.1 specification, there can be two choices for Thread Policy for the Portable Object Adapter (POA): The ORB Controlled Model and the Single Thread Model. J2SE 5.0 does not support the Single Thread Model.

  • RMI-IIOP Stream Format version 2 If the super-type of a class has evolved to become custom-marshalled and writes optional, custom data, then that class cannot be sent between J2SE 1.3.x and J2SE 1.4 or higher. One example of this is that java.util.Calendar in J2SE 1.4 or higher cannot be sent back to J2SE 1.3.x.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Naming Services

Documentation Contents

Naming Service

Topics in this section include:

  • COS Naming Service: an Overview
  • Using the Naming Service

COS Naming Service: an Overview

The CORBA COS (Common Object Services) Naming Service provides a tree-like directory for object references much like a filesystem provides a directory structure for files. The Naming Service provided with Java IDL is an implementation of the COS Naming Service specification. The following overview is taken from that document.

A name-to-object association is called a name binding. A name binding is always defined relative to a naming context. A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

To resolve a name is to determine the object associated with the name in a given context. To bind a name is to create a name binding in a given context. A name is always resolved relative to a context - there are no absolute names.

Because a context is like any other object, it can also be bound to a name in a naming context. Binding contexts in other contexts creates a naming graph - a directed graph with nodes and labeled edges where the nodes are contexts. A naming graph allows more complex names to reference an object. Given a context in a naming graph, a sequence of names can reference an object. This sequence of names (called a compound name) defines a path in the naming graph to navigate the resolution process.

The following figure shows an example of a naming graph. A sample program that illustrates how to add names to the namespace uses this same model.

Example of naming graph

For an application to use the COS Naming Service, its ORB must know the port of a host running a naming service or have access to a stringified initial naming context for that naming service. The naming service can either be the Java IDL naming service or another COS-compliant naming service.

Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service.

  • The Persistent Naming Service provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
  • For backward compatibility, tnameserv, a Transient Naming Service shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost.

Both client and server should agree on which root naming context to use. The orb.resolve_initial_references(String name_of_service) method is used to obtain the root naming context. If you get a handle on a Naming Service by providing "NameService" as the name_of_service, you will get a persistent naming service, meaning that the naming context graph will be restored after a service failure. If you get the handle using "TNameService", you will get a transient naming service, meaning that you will need to re-obtain the root naming context using orb.resolve_initial_references(String name_of_service) if there is a service interruption.

For example,

      // get the root naming context
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

The string "NameService" is defined for all CORBA ORBs. When you pass in this string, the ORB returns a naming context object that is an object reference for:

  • The persistent name service if you are using the Naming Service that is part of ORBD.
  • The transient name service if you are using tnameserv.

To specify that you want to use the transient naming service with ORBD, pass in the string "TNameService". The string "TNameService" is a proprietary name. When you pass in this string, the ORB returns a naming context object that is an object reference for ORBD's transient name service.

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContextExt object, you must narrow it to its proper type.

NamingContextExtHelper is an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContextExt and you can use it to access the naming service and register the server.

NamingContextExt and NamingContextExtHelper are new to this release of J2SE. NamingContextExt is the extension of NamingContext. It contains a set of name bindings in which each name is unique and is part of the Interoperable Naming Service. Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL-based names to bind and resolve. NamingContextExtHelper provides additional helper methods like narrow() that are type-specific but don't deal with business logic.

Interoperable Naming Service

The Interoperable Naming Service (INS) is a URL-based naming system on top of the CORBA Naming Service, as well as a common bootstrap mechanism that lets applications share a common initial naming context.

The Interoperable Naming Service (INS) provides the following features:

  • Capability to resolve using stringified names (e.g., a/b.c/d)
  • URLs for CORBA object references (corbaloc: and corbaname: formats)
  • Standard APIs in NamingContextExt for converting between CosNames, URLs, and Strings
  • ORB arguments for bootstrapping (ORBInitRef and ORBDefaultInitRef)

An example application that demonstrates how to use the INS can be found at Interoperable Naming Service Example.

The following diagram shows how INS fits into ORBD:

ORBD

An object reference contains at least three pieces of information: an address, the name of the POA that created an object reference, and an Object ID.

Using INS, you can provide a URL to access the CORBA object, which is more readable than a stringified IOR. The following stringified object reference formats are allowed:

  • Interoperable Object References (IOR)

    An IOR is an object reference that is understood by ORBs that can interoperate using the OMG-defined protocols GIOP and IIOP. A client can obtain an object reference using orb.object_to_string(objRef), as shown in the Browsing the Namespace example, or as a result of an invocation on another object reference.

    Note: If an IOR contains multiple profiles, the J2SE v.1.4 and higher ORB always uses the first one.

  • Human-Readable URL Formats for CORBA Object References
    • corbaloc:

      The corbaloc: format is useful for CORBA client programs, and is typically used to resolve the reference using the GIOP LocateRequest or Request message. For example, a corbaloc: object reference might look like this:

              corbaloc:iiop:1.2@example.com:2050/TraderService

      This example show how to get an object reference for TraderService from host example.com on port 2050.

    • corbaname:

      The corbaname: format provides a mechanism for a client to bootstrap directly, and is typically used to resolve the stringified name from the root naming context. For example, a corbaname: object reference might look like this:

              corbaname::example.com:2050#Personal/schedule

      where example.com is the host, 2050 is the port. The portion of the reference up to the hash mark (corbaname::example.com:2050 ) is the URL that returns the root naming context. This example provides the URL to use to: a) locate the Naming Service, and, b) resolve the name Personal/schedule from the Naming Service.

Bootstrap Options for the ORB

INS provides ORB options for bootstrapping. To bootstrap a CORBA system, you must give it an object reference. The ORB can be configured to return the handle of a customized CORBA service from resolve_initial_references() using either ORBInitRef and/or ORBDefaultInitRef. For example,

-ORBInitRef TraderService=corbaloc::example.com:2050/TraderService
-ORBDefaultInitRef corbaloc:iiop:1.2:example.com:2050

The order of resolution when these options are used is as follows:

  1. Objects registered with register_initial_references
  2. -ORBInitRef
  3. -ORBDefaultInitRef
  4. Proprietary Bootstrap (Sun ORBs only)

For more information about INS, refer to the INS Naming Specification.

Using the Naming Service

To use the Naming Service, you must first write the server and client code that finds and/or creates the namespace and/or the objects in the namespace. Before running the client and server, you must start the Naming Service and tell the client and server where to find it. The following steps loosely suggest what happens when the client and server attempt to access the Naming Service:

  • The server invokes the bind or rebind method to associate a logical name with an object reference.
  • The Naming Service adds this object reference/name binding to its namespace database.
  • A client application invokes the resolve method to obtain an object reference with this name.
  • The client uses an object reference to invoke methods on the target object.

The following topics are covered in this section:

  • Sample Client: Adding Objects to the Namespace
  • Sample Client: Resolving Objects from the Namespace
  • Sample Client: Browsing the Namespace
  • Starting the Naming Service
  • Stopping the Naming Service

Sample Client: Adding Objects to the Namespace

The following sample program illustrates how to add names to the namespace. It is a self-contained Naming Service client that creates the following simple tree. Naming contexts are in italics and object references are in normal font.

adding names to the namespace

In this example, plans is an object reference and Personal is a naming context that contains two object references: calendar and schedule.

  1. Create the NameClient.java file and import the proper libraries:
    import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClient
{
   public static void main(String args[])
   {
      try {
  2. Set Port and Host properties.

    In the section, Starting the Naming Service, the name server is started on port 1050 and host localhost. The following code ensures that the client program is aware of this port number and host name.

            Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        props.put("org.omg.CORBA.ORBInitialHost", "localhost");
        ORB orb = ORB.init(args, props);
  3. Obtain the initial naming context.

    The following code obtains the initial naming context and assigns it to ctx. The second line copies ctx into a dummy object reference objref that we'll attach to various names and add into the namespace.

        NamingContextExt ctx =
          NamingContextExtHelper.narrow(orb.resolve_initial_references(
            "NameService"));
        org.omg.CORBA.Object objref = ctx;
  4. Bind the name "plans" to the object reference.

    This code binds the name "plans" to our dummy object reference. The object reference, "plans", is then added under the initial naming context using rebind. The rebind method allows us to run this program over and over again without getting the exceptions we'd get from using bind.

            NameComponent name1[] = ctx.to_name("plans");
        ctx.rebind(name1, objref);
        System.out.println("plans rebind successful!");
  5. Create a new naming context named "Personal".

    This code creates a new naming context called "Personal". The resulting object reference, ctx2, is bound to the name and added under the initial naming context.

            NameComponent name2[] = ctx.to_name("Personal");
        NamingContextExt ctx2 = (NamingContextExt)ctx.bind_new_context(name2);
        System.out.println("New naming context, Personal, added!");
  6. Bind "schedule" and "calendar" to a dummy object reference. To bind a name is to create a name binding in a given context. A name is always resolved relative to a context - there are no absolute names.

    This code binds the dummy object reference using the names "schedule" and "calendar" under the "Personal" naming context (ctx2).

            NameComponent name3[] = ctx.to_name("schedule");
        ctx2.rebind(name3, objref);
        System.out.println("schedule rebind successful!");

        NameComponent name4[] = ctx.to_name("calendar");
        ctx2.rebind(name4, objref);
        System.out.println("calendar rebind successful!");

    } catch (Exception e) {
        e.printStackTrace(System.err);
    }
  }
}
  7. Save NameClient.java, and compile the file as follows:
         javac NameClient.java

    Correct any syntax errors before proceeding.

  8. Run the Object Request Broker Daemon as shown in Starting the Naming Service.
  9. Run NameClient, as follows:
         java NameClient -ORBInitialPort 1050

The output in the terminal window looks like this:

output in the terminal window

We now have a namespace that to the Naming Service looks like the above diagram.

Sample Client: Resolving Objects from the Namespace

The following sample program illustrates how to resolve names from the namespace. To resolve a name is to determine the object associated with the name in a given context. When using the persistent Naming Service, you do not need to re-resolve if the Naming Service goes down. If you use a transient Naming Service, you do need to re-resolve in the Naming Service goes down.

In this example, plans is an object reference and Personal is a naming context that contains two object references: calendar and schedule.

  1. Create the NameClientResolve.java file and import the proper libraries:
    import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClientResolve
{
   public static void main(String args[])
   {
      try {
  2. Set Port and Host properties.

    In the section, Starting the Naming Service, the name server is started on port 1050 and host localhost. The following code ensures that the client program is aware of this port number and host name.

            Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        props.put("org.omg.CORBA.ORBInitialHost", "localhost");
        ORB orb = ORB.init(args, props);
  3. Obtain the initial naming context.

    The following code obtains the initial naming context and assigns it to nc.

        NamingContextExt nc =
          NamingContextExtHelper.narrow(orb.resolve_initial_references(
            "NameService"));
  4. Resolve each namespace.

    The following code resolves each namespace.

       org.omg.CORBA.Object sched = nc.resolve_str("Personal/schedule");
        org.omg.CORBA.Object cal = nc.resolve_str("Personal/calendar");
        org.omg.CORBA.Object plan = nc.resolve_str("plans");

      //finish the try-catch block
      } catch (Exception e) {
        e.printStackTrace(System.err);
        }
}
  5. Save NameClientResolve.java, and compile the file as follows:
         javac NameClientResolve.java

    Correct any syntax errors before proceeding.

  6. Make sure the Object Request Broker Daemon is running and the client application illustrated in Sample Client: Adding Objects to the Namespace has been run.
  7. Run NameClientResolve, as follows:
         java NameClientResolve -ORBInitialPort 1050

There is no output to the terminal window when you run this client application. If you want verification that the object references have been resolved, you could add code such as the following for testing purposes:

        if (sched == null){
          System.out.println("Schedule is null");
        }

        if (cal == null){
          System.out.println("Calendar is null");
        }

        if (plan == null){
          System.out.println("Plans is null");
        }

Sample Client: Browsing the Namespace

The following sample program illustrates how to browse the namespace.

  1. Create the NameClientList.java file and import the proper libraries:
    import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClientList
{
   public static void main(String args[])
   {
      try {

  2. In the section, Starting the Naming Service, the nameserver is started on port 1050 and host localhost. The following code ensures that the client program is aware of this port number and host name.

        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        props.put("org.omg.CORBA.ORBInitialHost", "localhost");
        ORB orb = ORB.init(args, props);
  3. Obtain the initial naming context.
            NamingContextExt nc =
          NamingContextExtHelper.narrow(orb.resolve_initial_references(
            "NameService"));
  4. List all bindings in the naming context.

    The list method lists the bindings in the naming context. In this case, up to 1000 bindings from the initial naming context will be returned in the BindingListHolder; any remaining bindings are returned in the BindingIteratorHolder.

        BindingListHolder bl = new BindingListHolder();
        BindingIteratorHolder blIt= new BindingIteratorHolder();
        nc.list(1000, bl, blIt);
  5. Get the array of bindings.

    This code gets the array of bindings out of the returned BindingListHolder.

            Binding bindings[] = bl.value;
  6. This code loops through the bindings and prints the names out.
            for (int i=0; i < bindings.length; i++) {

            int lastIx = bindings[i].binding_name.length-1;

            // check to see if this is a naming context
            if (bindings[i].binding_type == BindingType.ncontext) {
              System.out.println( "Context: " +
                bindings[i].binding_name[lastIx].id);
            } else {
                System.out.println("Object: " +
                  bindings[i].binding_name[lastIx].id);
            }
        }

       } catch (Exception e) {
        e.printStackTrace(System.err);
       }
   }
}
  7. Save NameClientList.java, and compile the file as follows:
         javac NameClientList.java

    Correct any syntax errors before proceeding.

  8. Make sure the Object Request Broker Daemon is running, the client application illustrated in Sample Client: Adding Objects to the Namespace has been run, and the client application illustrated in Sample Client: Resolving Objects from the Namespace has been run.
  9. Run NameClientList, as follows:
         java NameClientList -ORBInitialPort 1050

The output in the terminal window looks like this:

output in the terminal window

Starting the Naming Service

In all of the tutorials we use the Object Request Broker Daemon, orbd, which includes both a Persistent and a Transient Naming Service, and is available with every download of J2SE 1.4 and higher.

For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object.

To learn how to start the Naming Service, see the orbd man page (Solaris, Linux, or Mac OS X or Windows).

Stopping the Naming Service

To stop the naming service, use the relevant operating system command, such as kill on Solaris, or Ctrl+C in the DOS window in which orbd is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.

Naming Service FAQ

How do I connect to a 3rd-party Naming Service from Sun's ORB?

The recommended way is to use the Inter-Operable Naming Service (INS), if this option is supported by the 3rd-party Naming Service.

To use the Sun ORB with another vendor's Naming Service,

  1. Start the 3rd-party name server on Host <H> and Port. <P>
  2. Pass the following argument to ORB.init():
            -ORBInitRef NameService=corbaloc:iiop:1.2@<H>:<P>/NameService

When you do orb.resolve_initial_references( "NameService" ), you should be able to connect to 3rd-party Name Service. If you are still not able to connect, try these troubleshooting hints:

  • Verify that the 3rd-party Name Service supports INS.
  • Verify that the host and port information is accurate.
  • Verify that the 3rd-party Name Service has been started successfully.
  • Verify that the 3rd-party Name Service supports GIOP 1.2. If not, refer to the Name Server's documentation for the correct the GIOP version, and modify the corbaloc: URL accordingly.
  • Determine if the 3rd-party Name Service has a different object key it uses to contact NameService. If so, refer to the Name Server's documentation.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Official Specifications for CORBA support in J2SE 5.0

Specification References

The specifications with which the Java 2 Platform Standard Edition (J2SE) 5.0 ORB complies are as follows. If these links do not take you to the referenced specification, the OMG may have changed the URL, and you can link to www.omg.org to search for the correct specification.
  • CORBA 2.3.1 (formal/99-10-07)
  • IDL to Java language mapping (ptc/00-01-08)
  • Revised IDL to Java language mapping (ptc/00-11-03)
  • Java to IDL language mapping (ptc/00-01-06)
  • Interoperable Naming Service (ptc/00-08-07)
  • Portable Interceptors (ptc/2001-08-31)
These are the only specifications referenced by this document.

Supported Specification Details

Not all of the above specifications are currently implemented in the ORB in J2SE 5.0. The precise list of supported sections is as follows:
  • CORBA 2.3.1 chapters 1-3 and 6-9
  • Revised IDL to Java language mapping, section 1.21.8.2, the orb.properties file.
  • CORBA 2.3.1 chapter 4 with the following replacements from the Portable Interceptors specification:
    • section 4.2.3.5 destroy
    • section 4.5.2 CodeFactory and PICurrent are required
    • Section 4.5.3.4 as updated for register_initial_reference
  • CORBA 2.3.1 chapter 5 with the following update from the Portable Interceptors specification:
    • 5.5.2 StringSeq and WStringSeq are required. This adds the following classes to org.omg.CORBA:
      • StringSeqHolder
      • StringSeqHelper
      • WStringSeqHolder
      • WStringSeqHelper
  • CORBA 2.3.1 sections 10.6.1 and 10.6.2 are supported for repository IDs.
  • CORBA 2.3.1 section 10.7 for TypeCode APIs.
  • CORBA 2.3.1 chapter 11, Portable Object Adapter (POA), with the following updates from the Portable Interceptors specification:
    • Section 11.3.7 POAs must preserve all policies
    • Section 11.3.8.2 again states that POAs must preserve all policies
    • Section 11.3.8.26 POA::id is required.
  • CORBA 2.3.1 chapters 13 and 15 define GIOP 1.0, 1.1, and 1.2. The J2SE 5.0 ORB fully supports all versions of GIOP, with the exception that the bi-directional GIOP feature defined in sections 15.8 and 15.9 is not supported.
  • All of the Interoperable Naming Service is supported.
  • Portable Interceptors section 13.8 (the new Coder/Decoder interfaces) and all of chapter 21 (the interceptor specification).
  • Section 1.21.8 of the Revised IDL to Java Language Mapping Specification (ptc/00-11-03) has been changed from the version in the IDL to Java Language Mapping Specification (ptc/00-01-08).

Tools

  • The IDL to Java compiler (idlj) complies with:
    • CORBA 2.3.1 chapter 3 (IDL definition)
    • CORBA 2.3.1 chapters 5 and 6 (semantics of Value types)
    • CORBA 2.3.1 section 10.6.5 (pragmas)
    • The IDL to Java mapping specification
    • The Revised IDL to Java language mapping specification section 1.12.1 "local interfaces"
  • The Java to IDL compiler (the IIOP backend for rmic) complies with:
    • CORBA 2.3.1 chapters 5 and 6 (value types)
    • The Java to IDL language mapping. Note that this implicitly references section 1.21 of the IDL to Java language mapping
    • IDL generated by the -idl flag complies with CORBA 2.3.1 chapter 3.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Portable Interceptors (PI)

Documentation Contents

Java IDL and Java RMI-IIOP Technologies: Using Portable Interceptors (PI)

Last Update: 4/25/2002

NOTICE: This document is intended for advanced CORBA developers.

The Java CORBA Object Request Broker (ORB) provides hooks, or interception points, through which ORB services can intercept the normal flow of execution of the ORB. These Portable Interceptors provide a mechanism for plugging in additional ORB behavior, or, by modifying the communications between client and server, for modifying the behavior of the ORB. The example that follows shows different ways of using Portable Interceptors.

Support for Portable Interceptors is a major recent addition to the CORBA specification. Using RequestInterceptors, one can easily write and attach portable ORB hooks that will intercept any ORB-mediated invocation. Using IORInterceptors, one can write code to annotate CORBA object references.

It is highly recommended that you read the Portable Interceptors Specification at ptc/2001-03-04 before reading this document.

The following topics are included in this document:

  • Interceptor Types
  • Registering ORBInitializers in Java
    • Notes About the Scope of Interceptors
    • Notes on Interceptor Order
    • Notes about Registering Interceptors
  • Portable Interceptor Current (PICurrent)
    • Obtaining PICurrent
    • Obtaining PICurrent
    • Request Scope vs Thread Scope
  • Portable Interceptor Example
    • Flowing Context Information between Clients and Servers
    • Avoiding Infinite Recursion During Interceptor Outcalls
    • Avoiding Recursion for Colocated Outcall References
    • Avoid recursion by using multiple ORBs
  • Example Code
  • Compiling and running the application

Interceptor Types

There are currently three types of interceptors that can be registered, as shown below. Examples of each are shown in the example that follows.

  • IORInterceptor

    In some cases, a portable ORB service implementation may need to add information describing the server's or object's ORB service-related capabilities to object references in order to enable the ORB service implementation in the client to function properly. This is supported through the IORInterceptor and IORInfo interfaces. The IOR Interceptor is used to establish tagged components in the profiles within an Interoperable Object Reference (IOR).

    An example of an IOR Interceptor is shown in the file AServiceIORInterceptor.java in the example that follows.

  • ClientRequestInterceptor

    A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers.

    A ClientRequestInterceptor intercepts the flow of a request/reply sequence through the ORB on the client side.

  • An example of a ClientRequestInterceptor is shown in the file LoggingServiceClientInterceptor.java in the example that follows.

  • ServerRequestInterceptor

    A ServerRequestInterceptor intercepts the flow of a request/reply sequence through the ORB on the server side.

    An example of a ServerRequestInterceptor is shown in the file LoggingServiceServerInterceptor.java in the example that follows.

Registering ORBInitializers in Java

The ORBInitializer interface facilitates interceptor registration and ORB initialization.

Interceptors are intended to be a means by which ORB services gain access to ORB processing, effectively becoming part of the ORB. Since interceptors are part of the ORB, when ORB.init returns an ORB, the interceptors shall have been registered. Interceptors cannot be registered on an ORB after it has been returned by a call to ORB.init.

ORBInitializers are registered via Java ORB properties. An interceptor is registered by registering an associated ORBInitializer object which implements the ORBInitializer interface. When an ORB is initializing, it shall call each registered ORBInitializer, passing it an ORBInitInfo object which is used to register its interceptor.

The property names are of the form:

org.omg.PortableInterceptor.ORBInitializerClass.<Service>

where <Service> is the string name of a class which implements

org.omg.PortableInterceptor.ORBInitializer
To avoid name collisions, the reverse DNS name convention should be used. For example, if company Example has three initializers, it could define the following properties:
  • org.omg.PortableInterceptor.ORBInitializerClass.com.example.Init1
  • org.omg.PortableInterceptor.ORBInitializerClass.com.example.Init2
  • org.omg.PortableInterceptor.ORBInitializerClass.com.example.Init3

Note: Any values associated with ORBInitializerClass properties are ignored.

During ORB.init, these ORB properties which begin with org.omg.PortableInterceptor.ORBInitializerClass shall be collected, the <Service> portion of each property shall be extracted, an object shall be instantiated with the <Service> string as its class name, and the pre_init and post_init methods shall be called on that object. If there are any exceptions, the ORB shall ignore them and proceed.

Notes About the Scope of Interceptors

  • Interceptors are registered on a per-ORB basis.
  • To achieve virtual per-POA interceptors, instantiate each POA with a different ORB.

Notes on Interceptor Order

  • While interceptors may be ordered administratively, there is no concept of order with respect to the registration of interceptors. Request Interceptors are concerned with service contexts. Service contexts have no order, so there is no purpose for request interceptors to have an order. IOR Interceptors are concerned with tagged components. Tagged components also have no order, so there is no purpose for IOR Interceptors to have an order.

Notes about Registering Interceptors

  • Registration code should avoid using the ORB (i.e., calling ORB.init with the provided orb_id). Since registration occurs during ORB initialization, results of invocations on this ORB while it is in this state are undefined.

Portable Interceptor Current (PICurrent)

The PortableInterceptor::Current object (hereafter referred to as PICurrent) is a Current object that is used specifically by portable Interceptors to transfer thread context information to a request context. Portable Interceptors are not required to use PICurrent, but if information from a client's thread context is required at an Interceptor's interception points, then PICurrent can be used to propagate that information. PICurrent allows portable service code to be written regardless of an ORB's threading model.

Note: PICurrent is typically NOT used directly by CORBA client or server code. Instead, it is generally used by interceptor-based service implementations as demonstrated in the AService example interceptor which follows.

Obtaining PICurrent

Before an invocation is made, PICurrent is obtained via a call to ORB::resolve_initial_references ( PICurrent ). From within the interception points, the data on PICurrent that has moved from the thread scope to the request scope is available via the get_slot operation on the RequestInfo object. A PICurrent can still be obtained via resolve_initial_references, but that is the Interceptor's thread scope PICurrent.

Request Scope vs Thread Scope

The thread scope PICurrent (TSC) is the PICurrent that exists within a thread's context. A request scope PICurrent (RSC) is the PICurrent associated with the request. On the client-side, the thread scope PICurrent is logically copied to the request scope PICurrent from the thread s context when a request begins and is attached to the ClientRequestInfo object. On the server-side, the request scope PICurrent is attached to the ServerRequestInfo and follows the request processing. It is logically copied to the thread scope PICurrent after the list of receive_request_service_contexts interception points are processed. See the Updated Interceptors specification, Section, 21.4.4.5, Flow of PICurrent between Scopes for a detailed discussion of the scope of PICurrent.

Portable Interceptor Example

This section contains an example logging service application. The sample code for this application is quite complicated because it covers even subtle "corner cases". The following scenarios are covered in this sample application:

  1. A logging service which logs invocations. Neither client nor server explicitly use the logging service.
  2. An "empty" service which passes information from the client to the server. The client and server explicitly use this service but are not aware that it is implemented using interceptors.

Note: These examples explicitly register ORBInitializers to make the code easier to experiment with and setup. Typically this would not be done. Instead, this information would be passed as -D properties to the Java virtual machine when the applications are started. That way the applications are not coupled to the fact that either the service exists (e.g., the logging service) or that a service that they explicitly use (e.g., the AService interface) is implemented as an interceptor.

The purpose of the logging service example is to show how to avoid infinite recursion when making outcalls (i.e., invocations on CORBA references) from within interception points. This turns out to be quite involved when all corner cases are covered.

The purpose of the "empty" service example is to show how to implement services which flow context information from client to server and back.

Flowing Context Information between Clients and Servers

A typical interceptor-based service will flow context information between clients and servers. The AService example shows how this information is flowed from the client thread into the client interceptors, across the wire into the server interceptors, to the servant thread and back.

It is important to note that neither the client nor the servant is aware that the service is implemented using interceptors. Instead, they interact with the service through local object references (the aService reference in this example).

AService diagram

AService diagram

Description of the steps of the AService diagram:

  1. The client invokes aService.begin().

    1.a. aService.begin() sets the service context information in a slot it has reserved in PICurrent.

  2. The client invokes a method on some reference (i.e., ref.method()). This invocation is taking place inside the context of the service since aService.begin() has been invoked.
  3. send_request is entered for the ref.method call.
  4. get_effective_component(s) may be called to determine if the reference being invoked needs to interact with the service.
  5. get_slot is called to retrieve the context set in step 1a. Slots set in PICurrent are logically copied and made available to ClientRequestInfo.
  6. The service interceptor adds a service context containing the appropriate context (most likely depending on the context set in step 1a and any components retrieved in step 4). It uses add_request_service_context to add this context information to the request which is sent over the wire.
  7. The ref.method request arrives at the server, activating the receive_request_service_contexts interception point.
  8. get_request_service_context is used to retrieve the service context added at step 6.
  9. ServerRequestInfo.set_slot is used to transfer the context information from the service context retrieved in step 8 to the logical thread local data.
  10. receive_request is entered.
  11. The "ref" Servant's "method" is entered.
  12. The servant method invokes aService.verify() to interact with the service.
  13. The service uses get_slot on PICurrent to retrieve the context information sent from the client side. The service may also use set_slot on PICurrent to set any return context information.
  14. After the Servant completes, the send_* interception point is entered. If the service set any return context information, it would add a service context to the return. This is not shown in this example.
  15. When the reply arrives at the client, the receive_* interception point is entered. If the service set any return context information, it would be retrieved at this point. This is not shown in this example.

Avoiding Infinite Recursion During Interceptor Outcalls

Some services may need to make invocations on other CORBA object references from within interception points. When making outcalls from within interception points, steps must be taken to avoid infinite recursion since those outcalls will flow through the interception points. The LoggingService example illustrates this case.

The LoggingService example is comprised of ClientRequestInterceptors registered in a client program, and ServerRequestInterceptors registered in a server program. These interceptors send information from the client and server to a LoggingService implemenation which logs this information.

However, since the LoggingService implementation is itself a CORBA server, we must ensure that we do not log calls to the logger. The following diagrams illustrate the steps taken to avoid infinite recursion.

The following diagram shows the simplest case of avoiding recursion when calling an external logger from within interceptors. These steps are useful for the case where the client ORB only contains ClientRequestInterceptors, the server ORB only contains ServerRequestInterceptors, and the LoggingService is external to both the client and server ORBs.

LoggingService diagram

Logging Service diagram

Description of the steps of the LoggingService diagram:

  1. The client invokes a method on some reference.
  2. The client interceptor's send_request method is entered for the method invoked in step 1.
  3. A slot reserved for indicating an outcall is set to true on PICurrent.
  4. The same slot is checked on ClientRequestInfo via get_slot. This value will not be set since it represents the client's thread state at step 1. Therefore a call to the logger will be made.
  5. send_request is recursively entered for the logger invocation made in step 4.
  6. A slot reserved for indicating an outcall is set to true on PICurrent. Note, this slot is always unconditionally set. This is necessary when there are 2 or more interceptors doing outcalls. Since interceptors do not know about the existence of other interceptors we always set the PICurrent slot.
  7. The slot is checked on ClientRequestInfo via get_slot. This time the value is set (from step 3). Therefore we do not log this call (which is the call to the logger itself). The send_request point that entered at step 5 finishes.
  8. The ORB sends the log invocation made at step 4 to the logging service.
  9. The send_request point for step 2 finishes. The ORB sends the initial client invocation made in step 1 to the server for the appropriate reference.
  10. The server's receive_request_service_contexts point is entered. It logs the incoming request. A server which does not contain client interceptors which make outcalls and which does not contain the implementation of the logger itself does not need to set recursion avoidance slots. That is what this diagram represents.
  11. - 13. Therefore all the server side interception points are entered with no further checking and the response from the method initially invoked by the client is returned to the client ORB.
  14. The client's receive_* point is entered. Steps similar to steps 2 through 9 will occur if this point needs to make an outcall.

Avoiding Recursion for Colocated Outcall References

The following diagram illustrates the case where the LoggingService may be colocated in the same ORB as the reference being invoked by the client. In general, it is not possible to know that a particular object reference is NOT colocated with any other objects hosted by that ORB. Therefore, to cover all corner cases, more steps must be taken.

This diagram shows only the server side. The client side steps are identical to those in the preceding diagram.

LoggingServiceColocated diagram

LoggingServiceColocated diagram

Description of the steps of the LoggingServiceColocated diagram:

  1. The request from the client ORB arrives, activating the receive_request_service_contexts interception point.
  2. A slot reserved for indicating an outcall is set to true on PICurrent.
  3. ServerRequestInfo.get_request_service_context is used to check for the presence of a service context indicating an outcall. The service context is not present so the logger is invoked from within the interception point.
  4. The send_request interception point is entered for the logger request.
  5. get_slot checks for the outcall indicator.
  6. The outcall indicator slot has been set (from step 2), therefore add_request_service_context is used to a service context indicating an outcall. This is necessary since there is no logical relationship between client and server threads.
  7. The logger invocation arrives at receive_request_service_contexts.
  8. A slot reserved for indicating an outcall is set to true on PICurrent.
  9. ServerRequestInfo.get_request_service_context is used to check for the presence of a service context indicating an outcall. The service context is present so no further action is taken. receive_request_service_contexts exits.
  10. The logger request proceeds to receive_request. Steps similar to those taken inside receive_request_service_context are necessary if the logger is called at the receive_request point (this is not shown in the diagram (although the example code logs all points)).
  11. The logger request arrives at the LoggingService Servant, which logs the initial client request (not invocation of the logger).
  12. The logger request proceeds to ServerRequestInterceptor.send_* (most likely send_reply).
  13. The logger request proceeds to ClientRequestInterceptor.receive_* (most likely receive_reply).

    After Step 13, the original request that left off at Step 3 would be serviced.

The main point illustrated in this example is the necessity of using both client and server interceptors in conjunction with PICurrent slots and service contexts to indicate an outcall.

Avoid recursion by using multiple ORBs

A simpler way to avoid recursion is to ensure that the outcall references are associated with a different ORB that does not have the logging interceptors registered. That way the outcall invocations never go through interceptors.

This seems like a simple solution, but, in general, interceptors are registered via properties passed to the VM during startup. This means that all ORBs created in that VM will contain all interceptors so this solution will not work.

This solution will only work where interceptors are explicitly registered in client code during ORB.init. However, that is neither a typical nor a recommended way to register interceptor-based services.

Example Code

The following files contain the code which the above diagrams illustrate. Instructions for compiling and executing these examples follow the code. The files included in this example are:

  • serviceexample.idl
  • LoggingServiceClientORBInitializer.java
  • LoggingServiceClientInterceptor.java
  • LoggingServiceServerORBInitializer.java
  • LoggingServiceServerInterceptor.java
  • LoggingServiceImpl.java
  • AServiceORBInitializer.java
  • AServiceImpl.java
  • AServiceInterceptor.java
  • AServiceIORInterceptor.java
  • ArbitaryObjectImpl.java
  • Client.java
  • ColocatedServers.java

serviceexample.idl

This is the Interface Definition Language (IDL) file that contains definitions of an arbitrary object on which to make invocations and two services which will service calls to the arbitrary object.

// serviceexample.idl
// Copyright and License

module pi
{
module serviceexample
{

    // Create some arbitrary object to call.  Those calls
    // will be serviced by the service implemented using interceptors.

    exception ArbitraryObjectException { string reason; };

    interface ArbitraryObject
    {
             string         arbitraryOperation1 ( in string a1 );

        oneway void         arbitraryOperation2 ( in long a1 );

               void         arbitraryOperation3 ( in string a1 )
                                raises (ArbitraryObjectException);
    };

    // This would typically be in a file separate from the "ArbitraryObject"
    // and probably unknown to it.

    interface LoggingService
    {
        void log ( in string a1 );
    };

    // This would also typically be in a file of its own.
    // IMPORTANT: the interface should be a local object to avoid
    // unnecessary overhead.

    /*local*/ interface AService
    {
        void begin();
        void end();
        void verify();
    };

    // Tagged component for adding to an IOR to indicate that
    // the AService must be in effect when invocations are made
    // on the object containing this tagged component.

    // Note: we explicitly declare the tag type rather than using
    // the IOP typedef (commented out) to simplify compiling this
    // example (i.e., to avoid includes and make include path directives).
    //const IOP::ComponentId TAG_ASERVICE_COMPONENT = 2345;
    const unsigned long TAG_ASERVICE_COMPONENT = 2345;

    struct ASERVICE_COMPONENT {
        boolean requiresAService;
    };

}; // module serviceexample

}; // module pi

LoggingServiceClientORBInitializer.java

This file creates and registers the logging service interceptor used by object clients.

// LoggingServiceClientORBInitializer.java
// Copyright and License

package pi.serviceexample;

import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.CurrentHelper;
import org.omg.PortableInterceptor.ORBInitInfo;

public class LoggingServiceClientORBInitializer
    extends org.omg.CORBA.LocalObject
    implements org.omg.PortableInterceptor.ORBInitializer
{
    public void pre_init(ORBInitInfo info)
    {
    }

    public void post_init(ORBInitInfo info)
    {
        try {

            // Get a reference to the LoggingService object.

            NamingContext nameService =
                NamingContextHelper.narrow(
                    info.resolve_initial_references("NameService"));

            NameComponent path[] =
                { new NameComponent("LoggingService", "") };
            LoggingService loggingService =
                LoggingServiceHelper.narrow(nameService.resolve(path));

            // Get a reference to TSC PICurrent.

            Current piCurrent =
                CurrentHelper.narrow(
                    info.resolve_initial_references("PICurrent"));

            // Allocate a slot id to use for the interceptor to indicate
            // that it is making an outcall.  This is used to avoid
            // infinite recursion.

            int outCallIndicatorSlotId = info.allocate_slot_id();

            // Create (with the above data) and register the client
            // side interceptor.

            LoggingServiceClientInterceptor interceptor =
                new LoggingServiceClientInterceptor(loggingService,
                                                    piCurrent,
                                                    outCallIndicatorSlotId);

            info.add_client_request_interceptor(interceptor);
        } catch (Throwable t) {
            System.out.println("Exception handling not shown.");
        }
    }
}

LoggingServiceClientInterceptor.java

This interceptor logs client side interception points. It illustrates how to make invocations on other objects from within an interceptor and how to avoid infinite recursion during those "outcall" invocations.

// LoggingServiceClientInterceptor.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TCKind;
import org.omg.IOP.ServiceContext;
import org.omg.PortableInterceptor.ClientRequestInterceptor;
import org.omg.PortableInterceptor.ClientRequestInfo;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.InvalidSlot;

public class LoggingServiceClientInterceptor
    extends org.omg.CORBA.LocalObject
    implements ClientRequestInterceptor
{
    private LoggingService loggingService;
    private Current piCurrent;
    private int outCallIndicatorSlotId;

    public LoggingServiceClientInterceptor(LoggingService loggingService,
                                           Current piCurrent,
                                           int outCallIndicatorSlotId)
    {
        this.loggingService = loggingService;
        this.piCurrent = piCurrent;
        this.outCallIndicatorSlotId = outCallIndicatorSlotId;
    }

    //
    // Interceptor operations
    //

    public String name()
    {
        return "LoggingServiceClientInterceptor";
    }

    public void destroy()
    {
    }

    //
    // ClientRequestInterceptor operations
    //

    public void send_request(ClientRequestInfo ri)
    {
        log(ri, "send_request");
    }

    public void send_poll(ClientRequestInfo ri)
    {
        log(ri, "send_poll");
    }

    public void receive_reply(ClientRequestInfo ri)
    {
        log(ri, "receive_reply");
    }

    public void receive_exception(ClientRequestInfo ri)
    {
        log(ri, "receive_exception");
    }

    public void receive_other(ClientRequestInfo ri)
    {
        log(ri, "receive_other");
    }

    //
    // Utilities.
    //

    public void log(ClientRequestInfo ri, String point)
    {
        // IMPORTANT: Always set the TSC out call indicator in case
        // other interceptors make outcalls for this request.
        // Otherwise the outcall will not be set for the other interceptor's
        // outcall resulting in infinite recursion.

        Any indicator = ORB.init().create_any();
        indicator.insert_boolean(true);
        try {
            piCurrent.set_slot(outCallIndicatorSlotId, indicator);
        } catch (InvalidSlot e) { }

        try {
            indicator = ri.get_slot(outCallIndicatorSlotId);

            // If the RSC out call slot is not set then log this invocation.
            // If it is set that indicates the interceptor is servicing the
            // invocation of loggingService itself.  In that case do
            // nothing (to avoid infinite recursion).

            if (indicator.type().kind().equals(TCKind.tk_null)) {
                loggingService.log(ri.operation() + " " + point);
            }
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }
    }
}

LoggingServiceServerORBInitializer.java

This file creates and registers the logging service interceptor used by object servers. Even though this interceptor is meant to only log server-side interception points, it is both a client and server interceptor. The code illustrates how to avoid infinite recursion in the case where the object being called is colocated in the same ORB in which the interceptors are registered.

// LoggingServiceServerORBInitializer.java
// Copyright and License

package pi.serviceexample;

import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.CurrentHelper;
import org.omg.PortableInterceptor.ORBInitInfo;

public class LoggingServiceServerORBInitializer
    extends org.omg.CORBA.LocalObject
    implements org.omg.PortableInterceptor.ORBInitializer
{
    public void pre_init(ORBInitInfo info)
    {
    }

    public void post_init(ORBInitInfo info)
    {
        try {

            // Create and register the logging service interceptor.
            // Give that interceptor references to the NameService and
            // PICurrent to avoid further lookups (i.e., optimization).
            // More importantly, allocate and give the interceptor
            // a slot id which is will use to tell itself not to
            // log calls that the interceptor makes to the logging process.

            NamingContext nameService =
                NamingContextHelper.narrow(
                    info.resolve_initial_references("NameService"));

            Current piCurrent =
                CurrentHelper.narrow(
                    info.resolve_initial_references("PICurrent"));

            int outCallIndicatorSlotId = info.allocate_slot_id();

            LoggingServiceServerInterceptor interceptor =
                new LoggingServiceServerInterceptor(nameService,
                                                    piCurrent,
                                                    outCallIndicatorSlotId);

            info.add_client_request_interceptor(interceptor);
            info.add_server_request_interceptor(interceptor);
        } catch (Throwable t) {
            System.out.println("Exception handling not shown.");
        }
    }
}

LoggingServiceServerInterceptor.java

This interceptor logs server side interception points, and is implemented as both a ClientRequestInterceptor and a ServerRequestInterceptor to illustrate the need to set some "out call" service context data (in addition to setting an out call slot) to avoid infinite recursion for the case noted in the description of LoggingServiceServerORBInitializer.java.

// LoggingServiceServerInterceptor.java
// Copyright and License

package pi.serviceexample;

import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TCKind;
import org.omg.IOP.ServiceContext;
import org.omg.PortableInterceptor.ClientRequestInterceptor;
import org.omg.PortableInterceptor.ClientRequestInfo;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.InvalidSlot;
import org.omg.PortableInterceptor.ServerRequestInterceptor;
import org.omg.PortableInterceptor.ServerRequestInfo;

public class LoggingServiceServerInterceptor
    extends org.omg.CORBA.LocalObject
    implements ClientRequestInterceptor,
               ServerRequestInterceptor
{
    private NamingContext nameService;
    private LoggingService loggingService;
    private Current piCurrent;
    private int outCallIndicatorSlotId;
    private static final int serviceContextId = 100001;
    private static final byte[] serviceContextData = {1};

    // Returns a reference to the logging process.

    private LoggingService loggingService()
    {
        if (loggingService == null) {
            NameComponent path[] =
                { new NameComponent("LoggingService", "") };
            try {
                loggingService =
                    LoggingServiceHelper.narrow(nameService.resolve(path));
            } catch (Throwable t) {
                System.out.println("Exception handling not shown.");
            }
        }
        return loggingService;
    }

    public LoggingServiceServerInterceptor(NamingContext nameService,
                                           Current piCurrent,
                                           int outCallIndicatorSlotId)
    {
        this.nameService = nameService;
        this.piCurrent = piCurrent;
        this.outCallIndicatorSlotId = outCallIndicatorSlotId;
    }

    //
    // Interceptor operations
    //

    public String name()
    {
        return "LoggingServiceServerInterceptor";
    }

    public void destroy()
    {
    }

    //
    // ClientRequestInterceptor operations
    //

    public void send_request(ClientRequestInfo ri)
    {

        // If the server interceptor sets the recursion slot then
        // put in the service context so the server doesn't make
        // the call again in the case where the server side interceptor
        // is colocated in the same ORB as the object being invoked.

        try {
            Any indicator = ri.get_slot(outCallIndicatorSlotId);
            if (indicator.type().kind().equals(TCKind.tk_boolean)) {
                ServiceContext serviceContext =
                    new ServiceContext(serviceContextId, serviceContextData);
                ri.add_request_service_context(serviceContext, false);
            }
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }
    }

    public void send_poll(ClientRequestInfo ri)
    {
    }

    public void receive_reply(ClientRequestInfo ri)
    {
    }

    public void receive_exception(ClientRequestInfo ri)
    {
    }

    public void receive_other(ClientRequestInfo ri)
    {
    }

    //
    // ServerRequestInterceptor operations
    //

    public void receive_request_service_contexts(ServerRequestInfo ri)
    {
        log(ri, "receive_request_service_contexts");
    }

    public void receive_request(ServerRequestInfo ri)
    {
        log(ri, "receive_request");
    }

    public void send_reply(ServerRequestInfo ri)
    {
        log(ri, "send_reply");
    }

    public void send_exception(ServerRequestInfo ri)
    {
        log(ri, "send_exception");
    }

    public void send_other(ServerRequestInfo ri)
    {
        log(ri, "send_other");
    }

    //
    // Utilities.
    //

    public void log(ServerRequestInfo ri, String point)
    {
        // This is only relevant for the colocated example.
        // Do not attempt to log until the logging service object
        // has been bound in naming.  Otherwise the attempt to call
        // rebind on naming will call log which will fail.
        if (! ColocatedServers.colocatedBootstrapDone) {
            return;
        }

        // IMPORTANT:
        // The conditional logging of the invocation is only necessary
        // if there is a chance that the object being invoked is colocated
        // in the same ORB as this interceptor.  Otherwise the outcall to
        // the logging service can be made unconditionally.

        // Always set the recursion slot.

        Any indicator = ORB.init().create_any();
        indicator.insert_boolean(true);
        try {
            piCurrent.set_slot(outCallIndicatorSlotId, indicator);
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }

        // Make the out call if you have not already done so.

        try {

            // Only the presence of the service context counts.
            // The data is ignored.

            ri.get_request_service_context(serviceContextId);
        } catch (BAD_PARAM e) {
            // Recursion indicator not set so make the call.
            loggingService().log(ri.operation() + " " + point);
        }
    }
}

LoggingServiceImpl.java

This file is the implementation of the logging object to which the logging service interceptors send their data.

//
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.PortableServer.POAHelper;

import java.util.Properties;

class LoggingServiceImpl
    extends LoggingServicePOA
{
    public static ORB orb;

    //
    // The IDL operations.
    //

    public void log(String a1)
    {
        System.out.println(a1);
    }

    //
    // The server.
    //

    public static void main(String[] av)
    {
        try {
            if (orb == null) {
                orb = ORB.init(av, null);
            }

            POA rootPOA =  POAHelper.narrow( orb.resolve_initial_references("RootPOA"));
            rootPOA.the_POAManager().activate();

            byte[] objectId =
                rootPOA.activate_object(new LoggingServiceImpl());
            org.omg.CORBA.Object ref = rootPOA.id_to_reference(objectId);

            NamingContext nameService =
                NamingContextHelper.narrow(
                    orb.resolve_initial_references("NameService"));
            NameComponent path[] =
                { new NameComponent("LoggingService", "") };
            nameService.rebind(path, ref);

            // Only relevant for colocated example.
            ColocatedServers.colocatedBootstrapDone = true;

            System.out.println("LoggingService ready.");

            orb.run();

        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
        System.exit(0);
    }
}

AServiceORBInitializer.java

The file creates and registers the AServiceInterceptor as both a client and server interceptor, creates and registers the AServiceIORInterceptor which puts a TaggedComponent into IORs, and creates a local object to be used by applications to explicitly control the services offered by AService. This local object is registered as an initial service with the ORB such that it can be obtained by clients using org.omg.CORBA.ORB.resolve_initial_references.

// AServiceORBInitializer.java
// Copyright and License

package pi.serviceexample;

import org.omg.IOP.Codec;
import org.omg.IOP.CodecFactory;
import org.omg.IOP.CodecFactoryHelper;
import org.omg.IOP.Encoding;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.CurrentHelper;
import org.omg.PortableInterceptor.ORBInitInfo;

public class AServiceORBInitializer
    extends org.omg.CORBA.LocalObject
    implements org.omg.PortableInterceptor.ORBInitializer
{
    private AServiceImpl aServiceImpl;
    private AServiceInterceptor aServiceInterceptor;

    public void pre_init(ORBInitInfo info)
    {
        try {
            int id = info.allocate_slot_id();

            aServiceInterceptor = new AServiceInterceptor(id);

            info.add_client_request_interceptor(aServiceInterceptor);
            info.add_server_request_interceptor(aServiceInterceptor);

            // Create and register a reference to the service to be
            // used by client code.

            aServiceImpl = new AServiceImpl(id);

            info.register_initial_reference("AService", aServiceImpl);

        } catch (Throwable t) {
            System.out.println("Exception handling not shown.");
        }
    }

    public void post_init(ORBInitInfo info)
    {
        try {

            Current piCurrent =
                CurrentHelper.narrow(
                    info.resolve_initial_references("PICurrent"));
            aServiceImpl.setPICurrent(piCurrent);

            CodecFactory codecFactory =
                CodecFactoryHelper.narrow(
                    info.resolve_initial_references("CodecFactory"));
            Encoding encoding = new Encoding((short)0, (byte)1, (byte)2);
            Codec codec = codecFactory.create_codec(encoding);
            aServiceInterceptor.setCodec(codec);

            AServiceIORInterceptor aServiceIORInterceptor =
                new AServiceIORInterceptor(codec);
            info.add_ior_interceptor(aServiceIORInterceptor);

        } catch (Throwable t) {
            System.out.println("Exception handling not shown.");
        }
    }

}

AServiceImpl.java

This file contains an object that is explicitly used by client and servant code to communicate with the service. When the client calls begin() on the service, the service causes a ServiceID specific to the service to be put in the TSC PICurrent slot reserved by this service. When the client calls end() on the service, it sets the TSC slot to a non-valid value to indicate that the service is not in effect. Servants use the verify() method to determine whether the ServiceID was passed from the client side to the server side.

//
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.Any;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.ORB;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.InvalidSlot;

class AServiceImpl
    extends LocalObject
    implements AService
{
    private int slotId;

    private int currentServiceId = 0;

    private Current piCurrent;

    private Any NOT_IN_EFFECT;

    public AServiceImpl(int slotId)
    {
        this.slotId = slotId;
        NOT_IN_EFFECT = ORB.init().create_any();
    }

    // Package protected so the AService ORBInitializer can access this
    // non-IDL defined method.
    void setPICurrent(Current piCurrent)
    {
        this.piCurrent = piCurrent;
    }

    public void begin()
    {
        Any any = ORB.init().create_any();
        any.insert_long(++currentServiceId);
        setSlot(any);
    }

    public void end()
    {
        setSlot(NOT_IN_EFFECT);
    }

    public void verify()
    {
        try {
            Any any = piCurrent.get_slot(slotId);
            if (any.type().kind().equals(TCKind.tk_long)) {
                System.out.println("Service present: " + any.extract_long());
            } else {
                System.out.println("Service not present");
            }
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }
    }

    // Synchronized because two threads in the same ORB could be
    // sharing this object.
    synchronized private void setSlot(Any any)
    {
        try {
            piCurrent.set_slot(slotId, any);
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }
    }
}

AServiceInterceptor.java

This interceptor is responsible for arranging to pass the client side AService information to the service side.

On the client side, if AService.begin() has been called, the send_request(ri) point will see the service id in the RSC slot. In this case, it inserts the value of that service id into an org.omg.CORBA.ServiceContext and adds that service context to the data to be passed along with the invocation.

On the server side, receive_request_service_context(ri) looks for the presence of that service context. When present, it extracts the service id value from the ServiceContext and sets the RSC slot to that value. When the servant is executing, the value of that RSC slot is available in the TSC slot.

// AServiceInterceptor.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TCKind;
import org.omg.IOP.Codec;
import org.omg.IOP.CodecPackage.FormatMismatch;
import org.omg.IOP.CodecPackage.TypeMismatch;
import org.omg.IOP.ServiceContext;
import org.omg.IOP.TaggedComponent;
import org.omg.PortableInterceptor.ClientRequestInterceptor;
import org.omg.PortableInterceptor.ClientRequestInfo;
import org.omg.PortableInterceptor.InvalidSlot;
import org.omg.PortableInterceptor.ServerRequestInterceptor;
import org.omg.PortableInterceptor.ServerRequestInfo;

public class AServiceInterceptor
    extends org.omg.CORBA.LocalObject
    implements ClientRequestInterceptor, ServerRequestInterceptor
{
    private int slotId;
    private Codec codec;

    private static final int serviceContextId = 1234;

    public AServiceInterceptor(int slotId)
    {
        this.slotId = slotId;
    }

    void setCodec(Codec codec)
    {
        this.codec = codec;
    }

    //
    // Interceptor operations
    //

    public String name()
    {
        return "AServiceInterceptor";
    }

    public void destroy()
    {
    }

    //
    // ClientRequestInterceptor operations
    //

    public void send_request(ClientRequestInfo ri)
    {
        //
        // See if the target object contains an ASERVICE_COMPONENT.
        //

        try {
            TaggedComponent taggedComponent =
                ri.get_effective_component(TAG_ASERVICE_COMPONENT.value);

            Any sAny = null;
            try {
                sAny = codec.decode_value(taggedComponent.component_data,
                                          ASERVICE_COMPONENTHelper.type());
            } catch (TypeMismatch e) {
                System.out.println("Exception handling not shown.");
            } catch (FormatMismatch e) {
                System.out.println("Exception handling not shown.");
            }

            ASERVICE_COMPONENT aServiceComponent =
                ASERVICE_COMPONENTHelper.extract(sAny);

            //
            // Only send the service context if the target object requires it.
            //

            if (aServiceComponent.requiresAService) {
                try {
                    Any any = ri.get_slot(slotId);
                    if (any.type().kind().equals(TCKind.tk_long)) {
                        int serviceId = any.extract_long();
                        byte[] serviceContextData = {
                            // Little endian to make it
                            // easier to see in debugger.
                            (byte)((serviceId >>>  0) &  0xFF),
                            (byte)((serviceId >>>  8) &  0xFF),
                            (byte)((serviceId >>> 16) &  0xFF),
                            (byte)((serviceId >>> 24) &  0xFF)
                        };
                        ri.add_request_service_context(
                            new ServiceContext(serviceContextId,
                                               serviceContextData),
                            false);
                    }
                } catch (InvalidSlot e) {
                    System.out.println("Exception handling not shown.");
                }
            }
        } catch (BAD_PARAM e) {
            // If it is not present, do nothing.
            ;
        }
    }

    public void send_poll(ClientRequestInfo ri)
    {
    }

    public void receive_reply(ClientRequestInfo ri)
    {
    }

    public void receive_exception(ClientRequestInfo ri)
    {
    }

    public void receive_other(ClientRequestInfo ri)
    {
    }

    //
    // ServerRequestInterceptor operations
    //

    public void receive_request_service_contexts(ServerRequestInfo ri)
    {
        try {
            ServiceContext serviceContext =
                ri.get_request_service_context(serviceContextId);
            byte[] data = serviceContext.context_data;
            int b1, b2, b3, b4;
            b4 = (data[0] <<  0) & 0x000000FF;
            b3 = (data[1] <<  8) & 0x0000FF00;
            b2 = (data[2] << 16) & 0x00FF0000;
            b1 = (data[3] << 24) & 0xFF000000;
            int serviceId = (b1 | b2 | b3 | b4);
            Any any = ORB.init().create_any();
            any.insert_long(serviceId);
            ri.set_slot(slotId, any);
        } catch (BAD_PARAM e) {
            // Not present means service is not in effect.
            // Do nothing.
            ;
        } catch (InvalidSlot e) {
            System.out.println("Exception handling not shown.");
        }
    }

    public void receive_request(ServerRequestInfo ri)
    {
    }

    public void send_reply(ServerRequestInfo ri)
    {
    }

    public void send_exception(ServerRequestInfo ri)
    {
    }

    public void send_other(ServerRequestInfo ri)
    {
    }
}

AServiceIORInterceptor.java

This file adds a TaggedComponent to IORs.

// AServiceIORInterceptor.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.Any;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.ORB;
import org.omg.IOP.TaggedComponent;
import org.omg.IOP.Codec;
import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
import org.omg.PortableInterceptor.IORInfo;
import org.omg.PortableInterceptor.IORInterceptor;

public class AServiceIORInterceptor
    extends org.omg.CORBA.LocalObject
    implements IORInterceptor
{
    private Codec codec;

    public AServiceIORInterceptor(Codec codec)
    {
        this.codec = codec;
    }

    //
    // Interceptor operations
    //

    public String name()
    {
        return "AServiceInterceptor";
    }

    public void destroy()
    {
    }

    //
    // IOR Interceptor operations
    //

    public void establish_components(IORInfo info)
    {
        //
        // Note: typically, rather than just inserting a tagged component
        // this interceptor would check info.get_effective_policy(int)
        // to determine if a tagged component reflecting that policy
        // should be added to the IOR.  That is not shown in this example.
        //

        ASERVICE_COMPONENT aServiceComponent = new ASERVICE_COMPONENT(true);
        Any any = ORB.init().create_any();
        ASERVICE_COMPONENTHelper.insert(any, aServiceComponent);
        byte[] value = null;
        try {
            value = codec.encode_value(any);
        } catch (InvalidTypeForEncoding e) {
            System.out.println("Exception handling not shown.");
        }
        TaggedComponent taggedComponent =
            new TaggedComponent(TAG_ASERVICE_COMPONENT.value, value);
        info.add_ior_component(taggedComponent);
    }

}

ArbitaryObjectImpl.java

This file is an implementation and server for the ArbitraryObject IDL interface. The implementations of the IDL interface operations explicitly call the AServiceImpl.verify() method to illustrate the end-to-end passing of data from the client (via AService.begin()) to the servant.

// ArbitaryObjectImpl.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.ORB;
import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.PortableServer.POAHelper;

import java.util.Properties;

class ArbitraryObjectImpl
    extends ArbitraryObjectPOA
{
    public static ORB orb;

    private AService aService;

    //
    // The IDL operations.
    //

    public String arbitraryOperation1(String a1)
    {
        verifyService();
        return "I got this from the client: " + a1;
    }

    public void arbitraryOperation2 (int a1)
    {
        verifyService();
    }

    public void arbitraryOperation3(String a1)
        throws ArbitraryObjectException
    {
        verifyService();
        if (a1.equals("throw exception")) {
            throw new ArbitraryObjectException("because you told me to");
        }
    }

    private void verifyService()
    {
        getAService().verify();
    }

    private AService getAService()
    {
        // Only look up the service once, then cache it.

        if (aService == null) {
            try {
                aService =
                    AServiceHelper.narrow(
                        orb.resolve_initial_references("AService"));
            } catch (InvalidName e) {
                System.out.println("Exception handling not shown.");
            }
        }
        return aService;
    }

    //
    // The server.
    //

    public static void main(String[] av)
    {
        try {
            if (orb == null) {
                Properties props = new Properties();
                props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                          + "pi.serviceexample.AServiceORBInitializer",
                          "");
                props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                          + "pi.serviceexample.LoggingServiceServerORBInitializer",
                          "");
                orb = ORB.init(av, props);
            }

            POA rootPOA =  POAHelper.narrow( orb.resolve_initial_references("RootPOA"));
            // Create a POA so the IOR interceptor executes.
            POA childPOA = rootPOA.create_POA("childPOA", null, null);
            childPOA.the_POAManager().activate();

            byte[] objectId =
                childPOA.activate_object(new ArbitraryObjectImpl());
            org.omg.CORBA.Object ref = childPOA.id_to_reference(objectId);

            NamingContext nameService =
                NamingContextHelper.narrow(
                    orb.resolve_initial_references("NameService"));
            NameComponent path[] =
                { new NameComponent("ArbitraryObject", "") };
            nameService.rebind(path, ref);

            System.out.println("ArbitaryObject ready.");

            orb.run();

        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
        System.exit(0);
    }
}

Client.java

This is a client that calls methods on ArbitraryObject. It makes some of those calls within the context of AService and some outside of its context. It is unaware of the existence of the logging interceptor (except that it explicitly registers the LoggingServerClientORBInitializer as noted above).

// Client.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;

import java.util.Properties;

public class Client
{
    public static void main(String av[])
    {
        try {
            Properties props = new Properties();
            props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                      + "pi.serviceexample.AServiceORBInitializer",
                      "");
            props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                      + "pi.serviceexample.LoggingServiceClientORBInitializer",
                      "");
            ORB orb = ORB.init(av, props);

            //
            // The client obtains a reference to a service.
            // The client does not know the service is implemented
            // using interceptors.
            //

            AService aService =
                AServiceHelper.narrow(
                    orb.resolve_initial_references("AService"));

            //
            // The client obtains a reference to some object that
            // it will invoke.
            //

            NamingContext nameService =
                NamingContextHelper.narrow(
                    orb.resolve_initial_references("NameService"));
            NameComponent arbitraryObjectPath[] =
                { new NameComponent("ArbitraryObject", "") };
            ArbitraryObject arbitraryObject =
                ArbitraryObjectHelper.narrow(nameService.resolve(arbitraryObjectPath));

            //
            // The client begins the service so that invocations of
            // any object will be done with that service in effect.
            //

            aService.begin();

            arbitraryObject.arbitraryOperation1("one");
            arbitraryObject.arbitraryOperation2(2);

            //
            // The client ends the service so that further invocations
            // of any object will not be done with that service in effect.
            //

            aService.end();

            // This invocation is not serviced by aService since
            // it is outside the begin/end.
            arbitraryObject.arbitraryOperation3("just return");

            aService.begin();
            try {
                arbitraryObject.arbitraryOperation3("throw exception");
                throw new RuntimeException("should not see this");
            } catch (ArbitraryObjectException e) {
                // Expected in this example, so do nothing.
            }
            aService.end();

        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
        System.out.println("Client done.");
        System.exit(0);
    }
}

ColocatedServers.java

This is a server which runs both ArbitraryObject and LoggingService in the same ORB. This means that these objects are colocated.

The server is created this way in order to exercise the code in LoggingServiceServerInterceptor that illustrates when interceptors make out calls to objects colocated in the same ORB extra steps must be taken to avoid infinite recursion.

// ColocatedServers.java
// Copyright and License

package pi.serviceexample;

import org.omg.CORBA.ORB;
import java.util.Properties;

public class ColocatedServers
{
    public static ORB orb;

    public static boolean colocatedBootstrapDone = false;

    public static void main (String[] av)
    {
        try {

            //
            // Share an ORB between objects servers.
            //

            Properties props = new Properties();
            props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                      + "pi.serviceexample.AServiceORBInitializer",
                      "");
            props.put("org.omg.PortableInterceptor.ORBInitializerClass."
                      + "pi.serviceexample.LoggingServiceServerORBInitializer",
                      "");
            ORB orb = ORB.init(av, props);
            ArbitraryObjectImpl.orb = orb;
            LoggingServiceImpl.orb = orb;

            //
            // Start both object servers.
            //

            ServerThread ServerThread = new ServerThread(av);
            ServerThread.start();
            ArbitraryObjectImpl.main(av);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }
}

class ServerThread extends Thread
{
    String[] av;
    ServerThread (String[] av)
    {
        this.av = av;
    }
    public void run ()
    {
        LoggingServiceImpl.main(av);
    }
}

Compiling and running the application

The example code, which contains the logging example and the service example, may be compiled and run using a Makefile such as that shown below:

# Makefile for the Example Files
# Copyright and License

JAVA_HOME=/path_to_J2SE_installation

CLASSPATH=.

JAVAC=$(JAVA_HOME)/bin/javac
JAVA=$(JAVA_HOME)/bin/java

ORB_INITIAL_PORT=1050

IDLJ=$(JAVA_HOME)/bin/idlj
IDLJ_FLAGS=-fall -td $(CLASSPATH) -verbose

ORBD=${JAVA_HOME}/bin/orbd -ORBInitialPort ${ORB_INITIAL_PORT}

build:
        $(IDLJ) $(IDLJ_FLAGS) serviceexample.idl
        $(JAVAC) -d $(CLASSPATH) *.java
        $(JAVAC) pi/serviceexample/*.java

runorbd:
        $(ORBD)

runloggingservice:
        $(JAVA) -classpath $(CLASSPATH) pi.serviceexample.LoggingServiceImpl \
                -ORBInitialPort ${ORB_INITIAL_PORT}

runarbitraryobject:
        $(JAVA) -classpath $(CLASSPATH) pi.serviceexample.ArbitraryObjectImpl \
                -ORBInitialPort ${ORB_INITIAL_PORT}

runcolocatedservers:
        $(JAVA) -classpath $(CLASSPATH) pi.serviceexample.ColocatedServers \
                -ORBInitialPort ${ORB_INITIAL_PORT}

runclient:
        $(JAVA) -classpath $(CLASSPATH) pi.serviceexample.Client \
                -ORBInitialPort ${ORB_INITIAL_PORT}

clean:
        rm -rf pi
        rm -rf orb.db

# Order of steps:
# Build:     clean build
# Remote:    runorbd runloggingservice runarbitraryobjectimpl runclient
# Colocated: runorbd runcolocatedservers runclient

The following steps show how to build and run the example on the Solaris operating system using the above Makefile. From the command prompt, run these commands as shown. The % symbol is used as a reminder that these are commands that are to be run from the command prompt.

  1. % make clean
  2. % make build
  3. % make runorbd &
  4. % make runloggingservice &
  5. % make runarbitraryobject &
  6. % make runclient

    After this step, you will see output such as this:

    resolve send_request
resolve receive_reply
arbitraryOperation1 send_request
Service present: 1
arbitraryOperation1 receive_reply
arbitraryOperation2 send_request
Service present: 1
arbitraryOperation2 receive_other
arbitraryOperation3 send_request
Service not present
arbitraryOperation3 receive_reply
arbitraryOperation3 send_request
Service present: 2
arbitraryOperation3 receive_exception
Client done.
  7. % jobs

    After this step, you will see output such as this:

    [1]   Running                 make runorbd &
[2]-  Running                 make runloggingservice &
[3]+  Running                 make runarbitraryobject &
  8. % kill %2 %3
  9. % make runcolocatedservers &
  10. % make runclient

    After this step, you will see output such as this:

    log receive_request_service_contexts
log receive_request
resolve send_request
log send_reply
log receive_request_service_contexts
log receive_request
resolve receive_reply
log send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation1 send_request
log send_reply
arbitraryOperation1 receive_request_service_contexts
arbitraryOperation1 receive_request
Service present: 1
arbitraryOperation1 send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation1 receive_reply
log send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation2 send_request
log send_reply
arbitraryOperation2 receive_request_service_contexts
arbitraryOperation2 receive_request
log receive_request_service_contexts
Service present: 1
arbitraryOperation2 send_reply
log receive_request
arbitraryOperation2 receive_other
log send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation3 send_request
log send_reply
arbitraryOperation3 receive_request_service_contexts
arbitraryOperation3 receive_request
Service not present
arbitraryOperation3 send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation3 receive_reply
log send_reply
log receive_request_service_contexts
log receive_request
arbitraryOperation3 send_request
log send_reply
arbitraryOperation3 receive_request_service_contexts
arbitraryOperation3 receive_request
Service present: 2
arbitraryOperation3 send_exception
log receive_request_service_contexts
log receive_request
arbitraryOperation3 receive_exception
log send_reply
Client done.
  11. % jobs

    After this step, you will see output such as this:

    [1]-  Running                 make runorbd &
[4]+  Running                 make runcolocatedservers &
  12. % kill %1 %4
  13. % make clean
See Also:
ORBInitInfo
org.omg.PortableInterceptor package.
Portable Interceptors Specification at ptc/2001-08-31
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Portable Object Adapter (POA)

What is the Portable Object Adapter (POA)?

An object adapter is the mechanism that connects a request using an object reference with the proper code to service that request. The Portable Object Adapter, or POA, is a particular type of object adapter that is defined by the CORBA specification. The POA is designed to meet the following goals:

  • Allow programmers to construct object implementations that are portable between different ORB products.
  • Provide support for objects with persistent identities.
  • Provide support for transparent activation of objects.
  • Allow a single servant to support multiple object identities simultaneously.

This document presents an introduction to using the POA with the Java SE. For a more complete description of the POA, see Chapter 11 of the CORBA 2.3.1 Specification.

Creating and Using the POA

The steps for creating and using a POA will vary according to the specific application being developed. The following steps generally occur during the POA life cycle:

  1. Get the root POA
  2. Define the POA's policies
  3. Create the POA
  4. Activate the POAManager
  5. Activate the servants, which may include activating the Tie
  6. Create the object reference from the POA

Each step is described in more detail in the sections that follow.

Step 1: Get the root POA

The first step is to get the first POA, which is called the rootPOA. The root POA is managed by the ORB and provided to the application using the ORB initialization interface under the initial object name "RootPOA".

An example of code that will get the root POA object and cast it to a POA is:

      ORB orb = ORB.init( args, null );
      POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
Step 2: Define the POA's Policies

The Portable Object Adapter (POA) is designed to provide an object adapter that can be used with multiple ORB implementations with no rewriting needed to deal with different vendors' implementations.

The POA is also intended to allow persistent objects -- at least, from the client's perspective. That is, as far as the client is concerned, these objects are always alive, and maintain data values stored in them, even though physically, the server may have been restarted many times.

The POA allows the object implementer a lot more control over the object's identity, state, storage, and life cycle. You can create a POA without defining any policies and the default values will be used. The root POA has the following policies by default:

  • Thread Policy: ORB_CTRL_MODEL
  • Lifespan Policy: TRANSIENT
  • Object Id Uniqueness Policy: UNIQUE_ID
  • Id Assignment Policy: SYSTEM_ID
  • Servant Retention Policy: RETAIN
  • Request Processing Policy: USE_ACTIVE_OBJECT_MAP_ONLY
  • Implicit Activation Policy: IMPLICIT_ACTIVATION

The following code snippet shows how policies are set in the RMI-IIOP (with POA) example:

      Policy[] tpolicy = new Policy[3];
      tpolicy[0] = rootPOA.create_lifespan_policy(
        LifespanPolicyValue.TRANSIENT );
      tpolicy[1] = rootPOA.create_request_processing_policy(
        RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY );
      tpolicy[2] = rootPOA.create_servant_retention_policy(
        ServantRetentionPolicyValue.RETAIN);

Each policy is discussed briefly in the following topics. For more information on POA policies, refer to Chapter 11, Portable Object Adapter of the CORBA/IIOP 2.3.1 Specification.

Thread Policy

This policy specifies the threading model used with the created POA. The default is ORB_CTRL_MODEL.

The ThreadPolicyValue can have the following values:

  • ORB_CTRL_MODEL - The ORB is responsible for assigning requests for an ORB-controlled POA to threads.
  • SINGLE_THREAD_MODEL - Requests for a single-threaded POA are processed sequentially. (NOTE: This policy is not supported in the ORB shipped with Java SE).

Lifespan Policy

This policy specifies the lifespan of the objects implemented in the created POA. The default is TRANSIENT.

The LifespanPolicyValue can have the following values:

  • TRANSIENT - The objects implemented in the POA cannot outlive the POA instance in which they are first created.
  • PERSISTENT - The objects implemented in the POA can outlive the process in which they are first created.

Object Id Uniqueness Policy

This policy specifies whether the servants activated in the created POA must have unique object identities. The default is UNIQUE_ID.

The IdUniquenessPolicyValue can have the following values:

  • UNIQUE_ID - Servants activated with that POA support exactly one Object Id.
  • MULTIPLE_ID - A servant activated with that POA may support one or more Object Ids.

Id Assignment Policy

This policy specifies whether Object Ids in the created POA are generated by the application or by the ORB. The default is SYSTEM_ID.

The IdAssignmentPolicyValue can have the following values:

  • USER_ID - Objects created with that POA are assigned Object Ids only by the application.
  • SYSTEM_ID - Objects created with that POA are assigned a unique object id by the POA. If the POA also has the PERSISTENT policy, assigned Object Ids must be unique across all instantiations of the same POA.

Servant Retention Policy

This policy specifies whether the created POA retains active servants in an Active Object Map. The default is RETAIN.

The ServantRetentionPolicyValue can have the following values.

  • RETAIN - to indicate that the POA will retain active servants in its Active Object Map.
  • NON_RETAIN - to indicate Servants are not retained by the POA.

Request Processing Policy

This policy specifies how requests are processed by the created POA. The default is USE_ACTIVE_OBJECT_MAP_ONLY.

The RequestProcessingPolicyValue can have the following values:

  • USE_ACTIVE_OBJECT_MAP_ONLY - If the object ID is not found in the Active Object Map, an OBJECT_NOT_EXIST exception is returned to the client. The RETAIN policy is also required.
  • USE_DEFAULT_SERVANT - If the object ID is not found in the Active Object Map or the NON_RETAIN policy is present, and a default servant has been registered with the POA using the set_servant operation, the request is dispatched to the default servant.
  • USE_SERVANT_MANAGER - If the object ID is not found in the Active Object Map or the NON_RETAIN policy is present, and a servant manager has been registered with the POA using the set_servant_manager operation, the servant manager is given the opportunity to locate or activate a servant or raise an exception.

Implicit Activation Policy

This policy specifies whether implicit activation of servants is supported in the created POA. The default value is IMPLICIT_ACTIVATION.

The ImplicitActivationPolicyValue can have the following values:

  • IMPLICIT_ACTIVATION - Indicates implicit activation of servants. This requires SYSTEM_ID and RETAIN policies to be set.
  • NO_IMPLICIT_ACTIVATION - Indicates no implicit servant activation.
Step 3: Create the POA

Creating a new POA allows the application developer to declare specific policy choices for the new POA and to provide a different adapter activator and servant manager (these are callback objects used by the POA to activate POAs on demand and activate servants). Creating new POAs also allows the application developer to partition the name space of objects, as Object Ids are interpreted relative to a POA. Finally, by creating new POAs, the developer can independently control request processing for multiple sets of objects.

A POA is created as a child of an existing POA using the create_POA operation on the parent POA. To create a new POA, pass in the following information:

  • Name of the POA. The POA is given a name that must be unique with respect to all other POAs with the same parent. In the following example, the POA is named childPOA.
  • POA Manager. Specify the POA Manager to be associated with the new POA. If, as is shown in the following example, null is passed for this parameter, a new POA Manager will be created. The user can also choose to pass the POA Manager of another POA.
  • Policy List. Specify the policy list to be associated with the POA to control its behavior. In the following example, a persistent lifespan policy has already been defined for this POA.

The following code snippet shows how the POA is created in the Hello World: Persistent Server example.

// Create a POA by passing the Persistent Policy
POA persistentPOA = rootPOA.create_POA("childPOA", null,
   persistentPolicy );
Step 4: Activate the POAManager

Each POA object has an associated POAManager object that controls the processing state of the POAs with which it is associated, such as whether requests to the POA are queued or discarded. The POAManager can also deactivate the POA. A POA Manager may be associated with one or more POA objects.

The POAManager can have the following states:

  • Holding - In this state, associated POAs will queue incoming requests.
  • Active - In this state, associated POAs will start processing requests.
  • Discarding - In this state, associated POAs will discard incoming requests.
  • Inactive - In this state, associated POAs will reject the requests that have not begun executing as well as any new requests.

The POAManagerOperations javadocs contain more information on these states.

POA Managers are not automatically activated when they are created. The following code snippet shows how the POAManager is activated in the Hello World: Persistent Server example. If the POA Manager is not activated in this way, all calls to the Servant will hang because, by default, the POA Manager is in the HOLD state.

            // Activate PersistentPOA's POAManager. Without this step,
            // all calls to Persistent Server will hang because POAManager
            // will be in the 'HOLD' state.
            persistentPOA.the_POAManager().activate( );

Step 5: Activate the servants

The following information is quoted from section 11.2.5 of the CORBA Specification.

At any point in time, a CORBA object may or may not be associated with an active servant.

If the POA has the RETAIN policy, the servant and its associated Object Id are entered into the Active Object Map of the appropriate POA. This type of activation can be accomplished in one of the following ways.

  • The server application itself explicitly activates individual objects (via the activate_object or activate_object_with_id operations).
  • The server application instructs the POA to activate objects on demand by having the POA invoke a user-supplied servant manager. The server application registers this servant manager with set_servant_manager.
  • Under some circumstances (when the IMPLICIT_ACTIVATION policy is also in effect and the language binding allows such an operation), the POA may implicitly activate an object when the server application attempts to obtain a reference for a servant that is not already active (that is, not associated with an Object Id).

If the USE_DEFAULT_SERVANT policy is also in effect, the server application instructs the POA to activate unknown objects by having the POA invoke a single servant no matter what the Object Id is. The server application registers this servant with set_servant.

If the POA has the NON_RETAIN policy, for every request, the POA may use either a default servant or a servant manager to locate an active servant. From the POA's point of view, the servant is active only for the duration of that one request. The POA does not enter the servant-object association into the Active Object Map.

When using RMI-IIOP technology, your implementations use delegation (known as the Tie model) to associate your implementation with the interface. When you create an instance of your implementation, you also need to create a Tie object to associate it with a CORBA interface. The following code snippet shows how to activate the Tie, if the POA policy is USE_ACTIVE_OBJECT_MAP_ONLY. This sample code is from the RMI-IIOP with POA example.

_HelloImpl_Tie tie = (_HelloImpl_Tie)Util.getTie( helloImpl );
String helloId = "hello";
byte[] id = helloId.getBytes();
tPOA.activate_object_with_id( id, tie );

The CORBA Specification discusses creating object references (section 11.2.4), activating objects (section 11.2.5), and processing requests (section 11.2.6) in more detail than is done in this document. Please refer to the CORBA 2.3.1 Specification for more information.

Step 6: Create the object reference

Object references are created in servers. Once created, they may be exported to clients. Object references encapsulate object identity information and information required by the ORB to identify and locate the server and the POA with which the object is associated. References are created in the following ways:

  • Explicitly activate a servant and associate it with an object reference.

    The following example is from Hello World: Persistent Server. This example uses the servant_to_reference operation to map an activated servant to its corresponding object reference.

    // Resolve Root Naming context and bind a name for the
// servant.
org.omg.CORBA.Object obj = orb.resolve_initial_references(
  "NameService" );
NamingContextExt rootContext = NamingContextExtHelper.narrow( obj );

NameComponent[] nc = rootContext.to_name(
  "PersistentServerTutorial" );
rootContext.rebind( nc, persistentPOA.servant_to_reference(
  servant ) );
  • Server application directly creates a reference.

    The following example is from the RMI-IIOP with POA example. In this example, the following code directly creates a reference. In doing so, they bring the abstract object into existence, but do not associate it with an active servant.

    // Publish the object reference using the same object id
// used to activate the Tie object.
Context initialNamingContext = new InitialContext();
initialNamingContext.rebind("HelloService",
tPOA.create_reference_with_id(id,
  tie._all_interfaces(tPOA,id)[0]) );
  • Server application causes a servant to implicitly activate itself.

    The behavior can occur only if the POA has been created with the IMPLICIT_ACTIVATION policy, which is the default behavior.

Once an reference is created in the server, it can be made available to clients. For more information on creating object references and exporting to clients, refer to section 11.2.4 of the CORBA 2.3.1 Specification for more information.

Adapter Activators

  • For an example application that uses Adapter Activators, see Using Adapter Activators.

An adapter activator is optional. You would use an adapter activator if POAs need to be created during request processing. If all needed POAs are created when the application is executed, an adapter activator is not required.

An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when the find_POA method is called with an activate parameter value of TRUE. The ORB will invoke an operation on an adapter activator when a request is received for a child POA that does not currently exist. The adapter activator can then create the required POA on demand.

A request must be capable of conveying the Object Id of the target object as well as the identification of the POA that created the target object reference. When a client issues a request, the ORB first locates an appropriate server (perhaps starting one if needed) and then it locates the appropriate POA within that server.

If the POA does not exist in the server process, the application has the opportunity to re-create the required POA by using an adapter activator. An adapter activator is a user-implemented object that can be associated with a POA. It is invoked by the ORB when a request is received for a non-existent child POA. The adapter activator has the opportunity to create the required POA. If it does not, the client receives the ADAPTER_NONEXISTENT exception.

Once the ORB has located the appropriate POA, it delivers the request to that POA. The further processing of that request depends both upon the policies associated with that POA as well as the object's current state of activation.

For more information on Adapter Activators, refer to section 11.3.3 of the CORBA 2.3.1 Specification or the AdapterActivatorOperations API documentation.

Servant Managers

Servant Managers are optional. You would use a servant manager to allow the POA to activate servants on demand when a request for an inactive object is received. If your server loads all objects when it starts up, you do not need a servant manager.

A servant manager is a callback object that the application developer can associate with a POA. The ORB will invoke operations on servant managers to activate servants on demand, and to deactivate servants. Servant managers are responsible for managing the association of an object reference (as characterized by its Object Id value) with a particular servant, and for determining whether an object reference exists or not. Each servant manager type contains two operations, the first called to find and return a servant and the second to deactivate a servant. The operations differ according to the amount of information usable for their situation.

To use servant managers, the USE_SERVANT_MANAGER policy must be set. Once set, the type of servant manager used in a particular situation depends on other policies in the POA. The two types of servant managers are:

  • ServantActivator

    When the POA has the RETAIN policy, it uses servant managers that are ServantActivators.

    This type is typically used to activate persistent objects.

    • For an example that uses Servant Activators, see Using Servant Activators.
  • ServantLocator

    When the POA has the NON_RETAIN policy, it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    This type is typically used to activate transient objects.

    • For an example that uses Servant Locators see Using Servant Locators.

For more information on Servant Managers, refer to section 11.3.4 of the CORBA 2.3.1 Specification.

POA Q&A

Is POAManager.activate() required for a newly created POA?

POAManager.activate() is required for a newly created POA if a null is passed for the POAManager parameter to POA::createPOA . If null is passed, a new POAManager is created and associated with the created POA. In this case, POAManager.activate() is needed.

To control several POAs with the same POAManager, you would:

  1. Create a POA or use the rootPOA
  2. Obtain the POA's manager via POA::the_POAManager
  3. Pass the POAManager to subsequent createPOA calls

There is no implicit relationship between the Root POA's POAManager and other POAs unless explicitly programmed by the programmer as shown above.

For more information, read section 11.3.2 of the CORBA specification, formal/99-10-07.

For more information

For more information about the Portable Object Adapter, read Chapter 11 of the CORBA/IIOP v.2.3.1 Specification from the Object Management Group's website.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Programming Guide

  • Getting Started: Hello World has a transient server
  • Example: Persistent Server
  • Example: POA-Tie Server-Side Model
  • Example: ImplBase Server-Side Model
  • Example: Interoperable Naming Service
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Reference

All packages that begin with org.omg are part of the Java IDL API. Those of most interest are:

  • package org.omg.CORBA - provides the mapping of the OMG CORBA APIs to the Java[tm] programming language
  • package org.omg.CosNaming - provides the naming service for Java IDL
  • package org.omg.PortableServer - provides classes and interfaces for making the server side of your applications portable across multivendor ORBs
  • package org.omg.PortableInterceptor - provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB
  • package org.omg.DynamicAny - provides classes and interfaces to enable Any values to be dynamically interpreted (traversed) and constructed through DynAny objects
  • org.omg.CORBA.ORB - provides APIs for the CORBA Object Request Broker features

Mapping IDL to Java

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Sample code

Documentation Contents

Sample Code for Hello.idl

This document shows the code generated by the IDL-to-Java compiler in accordance with the IDL to Java Language Mapping Specification (for compliance details refer to the compliance document), as well as sample client and server applications.

For a detailed description of the code listed here, consult the introductory tutorial, Getting Started with Java IDL.

Hello.idl, the interface definition

The following file, Hello.idl, is written in the OMG Interface Definition Language, and describes a CORBA object whose sayHello() operation returns a string and whose shutdown() method shuts down the ORB. OMG IDL is a purely declarative language designed for specifying programming-language-independent operational interfaces for distributed applications. The IDL can be mapped to a variety of programming languages. The IDL mapping for Java is summarized in IDL to Java Language Mapping Summary.

To learn more about OMG IDL Syntax and Semantics, read Chapter 3 of the CORBA Specification.

Hello.idl

module HelloApp
{
  interface Hello
  {
  string sayHello();
  oneway void shutdown();
  };
};

Generated Files

The idlj compiler uses the IDL-to-Java mapping to convert IDL interface definitions to corresponding Java interfaces, classes, and methods, which you can then use to implement your client and server code. The following files are generated when Hello.idl is compiled with the IDL-to-Java compiler, using the following command:

   idlj -fall Hello.idl

Hello.java, the signature interface

The signature interface file, Hello.java extends org.omg.portable.IDLEntity, org.omg.CORBA.Object, and the operations interface, HelloOperations. The signature interface is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. From the client's point of view, an object reference for a CORBA Hello object implements this interface.

Note: The Stub implements the Hello interface, where it generates code for each method to marshall the arguments, invoke the method, and then unmarshall the arguments.

HelloApp/Hello.java
package HelloApp;

/**
* HelloApp/Hello.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

public interface Hello extends HelloOperations, org.omg.CORBA.Object,
org.omg.CORBA.portable.IDLEntity
{
} // interface Hello

HelloOperations.java, the operations interface

The Java operations interface, HelloOperations.java, is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and server. The server developer provides implementation for the methods indicated by the operations interface.

This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

Note: The server writer usually extends HelloPOA and provides implementation for the methods provided by the operations interface.

HelloApp/HelloOperations.java
package HelloApp;

/**
* HelloApp/HelloOperations.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

public interface HelloOperations
{
  String sayHello ();
  void Shutdown ();
} // interface HelloOperations

HelloHelper.java, the Helper class

The Java class HelloHelper provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types. The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

HelloApp/HelloHelper.java
package HelloApp;

/**
* HelloApp/HelloHelper.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

abstract public class HelloHelper
{
  private static String  _id = "IDL:HelloApp/Hello:1.0";

  public static void insert (org.omg.CORBA.Any a, HelloApp.Hello that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static HelloApp.Hello extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc
(HelloApp.HelloHelper.id (), "Hello");
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static HelloApp.Hello read (org.omg.CORBA.portable.InputStream istream)
  {
    return narrow (istream.read_Object (_HelloStub.class));
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream,
HelloApp.Hello value)
  {
    ostream.write_Object ((org.omg.CORBA.Object) value);
  }

  public static HelloApp.Hello narrow (org.omg.CORBA.Object obj)
  {
    if (obj == null)
      return null;
    else if (obj instanceof HelloApp.Hello)
      return (HelloApp.Hello)obj;
    else if (!obj._is_a (id ()))
      throw new org.omg.CORBA.BAD_PARAM ();
    else
    {
      org.omg.CORBA.portable.Delegate delegate =
((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
      HelloApp._HelloStub stub = new HelloApp._HelloStub ();
      stub._set_delegate(delegate);
      return stub;
    }
  }

}

HelloHolder.java, the Holder class

The Java class called HelloHolder holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

HelloApp/HelloHolder.java
package HelloApp;

/**
* HelloApp/HelloHolder.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

public final class HelloHolder implements org.omg.CORBA.portable.Streamable
{
  public HelloApp.Hello value = null;

  public HelloHolder ()
  {
  }

  public HelloHolder (HelloApp.Hello initialValue)
  {
    value = initialValue;
  }

  public void _read (org.omg.CORBA.portable.InputStream i)
  {
    value = HelloApp.HelloHelper.read (i);
  }

  public void _write (org.omg.CORBA.portable.OutputStream o)
  {
    HelloApp.HelloHelper.write (o, value);
  }

  public org.omg.CORBA.TypeCode _type ()
  {
    return HelloApp.HelloHelper.type ();
  }

}

_HelloStub.java, the client stub

The Java class _HelloStub is the stub file for the client-side mapping. It extends org.omg.CORBA.portable.ObjectImpl and implements the Hello.java interface.

HelloApp/_HelloStub.java
package HelloApp;

/**
* HelloApp/_HelloStub.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

public class _HelloStub extends org.omg.CORBA.portable.ObjectImpl implements
HelloApp.Hello
{

  public String sayHello ()
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("sayHello", true);
       _in = _invoke (_out);
       String __result = _in.read_string ();
       return __result;
    } catch (org.omg.CORBA.portable.ApplicationException _ex) {
       _in = _ex.getInputStream ();
       String _id = _ex.getId ();
       throw new org.omg.CORBA.MARSHAL (_id);
    } catch (org.omg.CORBA.portable.RemarshalException _rm) {
       return sayHello ();
    } finally {
        _releaseReply (_in);
    }
  } // sayHello

  public void Shutdown ()
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("Shutdown", false);
       _in = _invoke (_out);
    } catch (org.omg.CORBA.portable.ApplicationException _ex) {
       _in = _ex.getInputStream ();
       String _id = _ex.getId ();
       throw new org.omg.CORBA.MARSHAL (_id);
    } catch (org.omg.CORBA.portable.RemarshalException _rm) {
       Shutdown ();
    } finally {
        _releaseReply (_in);
    }
  } // Shutdown

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:HelloApp/Hello:1.0"};

  public String[] _ids ()
  {
    return (String[])__ids.clone ();
  }

  private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
  {
     String str = s.readUTF ();
     String[] args = null;
     java.util.Properties props = null;
     org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args,
props).string_to_object
(str);
     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)
obj)._get_delegate ();
     _set_delegate (delegate);
  }

  private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
  {
     String[] args = null;
     java.util.Properties props = null;
     String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
     s.writeUTF (str);
  }
} // class _HelloStub

HelloPOA.java, the server skeleton

The Java class HelloImplPOA is the skeleton file for the server-side mapping, providing basic CORBA functionality for the server. It extends org.omg.PortableServer.Servant, and implements the InvokeHandler interface and the HelloOperations interface. The server class, HelloServant, extends HelloPOA.

HelloApp/HelloPOA.java
package HelloApp;

/**
* HelloApp/HelloPOA.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
* Thursday, March 22, 2001 2:17:15 PM PST
*/

public abstract class HelloPOA extends org.omg.PortableServer.Servant
 implements HelloApp.HelloOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("sayHello", new java.lang.Integer (0));
    _methods.put ("Shutdown", new java.lang.Integer (1));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get (method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0,
org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {
       case 0:  // HelloApp/Hello/sayHello
       {
         String __result = null;
         __result = this.sayHello ();
         out = rh.createReply();
         out.write_string (__result);
         break;
       }

       case 1:  // HelloApp/Hello/Shutdown
       {
         this.Shutdown ();
         out = rh.createReply();
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0,
org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:HelloApp/Hello:1.0"};

  public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
  {
    return (String[])__ids.clone ();
  }

  public Hello _this()
  {
    return HelloHelper.narrow(
    super._this_object());
  }

  public Hello _this(org.omg.CORBA.ORB orb)
  {
    return HelloHelper.narrow(
    super._this_object(orb));
  }

} // class HelloPOA

Completing the application

To complete the application, the developer must write the client and server code.

HelloServer.java, a transient server

The example server consists of two classes, the servant and the server. The servant, HelloImpl, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloImpl instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL.

The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

This example shows the code for a transient server. For a "Hello World" application with a persistent server, see Hello World with a Persistent Server.

The following code is written by the developer.

HelloServer.java
// HelloServer.java
// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA {
  private ORB orb;

  public void setORB(ORB orb_val) {
    orb = orb_val;
  }

  // implement sayHello() method
  public String sayHello() {
    return "\nHello world !!\n";
  }

  // implement shutdown() method
  public void shutdown() {
    orb.shutdown(false);
  }
}

public class HelloServer {

  public static void main(String args[]) {
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get reference to rootpoa & activate the POAManager
      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      // create servant and register it with the ORB
      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb);

      // get object reference from the servant
      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
      Hello href = HelloHelper.narrow(ref);

      // get the root naming context
      // NameService invokes the name service
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      // Use NamingContextExt which is part of the Interoperable
      // Naming Service (INS) specification.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // bind the Object Reference in Naming
      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      // wait for invocations from clients
      orb.run();
    }

      catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }

      System.out.println("HelloServer Exiting ...");

  }
}

HelloClient.java, the client application

This example shows a Java client application. You could write a CORBA client as a servlet, a JSP, an applet, etc.

HelloClient.java
// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

public class HelloClient
{
  static Hello helloImpl;

  public static void main(String args[])
    {
      try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // get the root naming context
        org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");
        // Use NamingContextExt instead of NamingContext. This is
        // part of the Interoperable naming Service.
        NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

        // resolve the Object Reference in Naming
        String name = "Hello";
        helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

        System.out.println("Obtained a handle on server object: " + helloImpl);
        System.out.println(helloImpl.sayHello());
        helloImpl.shutdown();

        } catch (Exception e) {
          System.out.println("ERROR : " + e) ;
          e.printStackTrace(System.out);
          }
    }

}

Compiling and Running a Java CORBA application

For the details of compiling and running a Java CORBA application, refer to Building and Running the Hello World Application.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The "Hello World" Example

Documentation Contents

Java IDL: The "Hello World" Example

Using the POA, a persistent server, and a persistent naming service

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using IDL (Interface Definiton Language) to define interfaces and the Java IDL compiler to generate stubs and skeletons. For more information on the development process, and a more detailed tutorial on creating a CORBA application using IDL, see Getting Started with Java IDL: The Hello World Tutorial. You can also create CORBA applications by defining the interfaces in the Java programming language. For more information and a tutorial on this development process, see Java RMI-IIOP documentation.

For more information on transient vs. persistent servers, refer to the document Developing Servers.

This document contains:

  • The IDL for a simple "Hello World" program
  • A persistent server that creates an object and publishes it with the naming service using the default server-side implementation (POA)
  • A servant that implements each of the IDL interfaces
  • An application client that knows the object's name, retrieves a reference for it from the naming service, and invokes the object
  • Instructions for compiling and running the example

Defining the Interface (PersistentHello.idl)

The first step to creating a CORBA application is to specify all of your objects and their interfaces using the OMG's Interface Definition Language (IDL). IDL has a syntax similar to C++ and can be used to define modules, interfaces, data structures, and more. The IDL can be mapped to a variety of programming languages. The IDL mapping for Java is summarized in IDL to Java Language Mapping Summary.

The following code is written in the OMG IDL, and describes a CORBA object whose sayHello() operation returns a string and whose shutdown() method shuts down the ORB. To learn more about OMG IDL Syntax and Semantics, read Chapter 3 of the CORBA 2.3.1 Specification.

PersistentHello.idl

module Persistent {
    interface Hello {
        string sayHello( );
        oneway void shutdown();
    };
};
NOTE: When writing code in OMG IDL, do not use an interface name as the name of a module. Doing so runs the risk of getting inconsistent results when compiling with tools from different vendors, thereby jeopardizing the code's portability. For example, code containing the same names could be compiled with the IDL to Java compiler and get one result. The same code compiled with another vendor's IDL to Java compiler could produce a different result.

To complete the application, you simply provide the server (PersistentServer.java), servant (PersistentHelloServant.java), and client (PersistentClient.java) implementations.

Implementing the Server (PersistentServer.java)

The example server, PersistentServer, has the server's main() method, which:

  • Creates and initializes an ORB instance
  • Creates a servant
  • Gets a reference to the root POA
  • Creates the policy that makes the server persistent
  • Creates a persistent POA by passing in the persistent policy
  • Activates the persistent POA's POAManager
  • Associates the servant with the persistent POA
  • Gets a CORBA object reference for the root naming context in which to register the new CORBA object
  • Narrows the object reference to a naming context
  • Registers the new object in the naming context under the name "PersistentServerTutorial"
  • Waits for invocations of the new object from the client

This example provides an example of a persistent object server. For an example of the "Hello World" program with a transient object server, see Hello World with a Transient Server. For more discussion of CORBA servers, see Developing Servers.

PersistentServer.java

// PersistentServer.java
// Copyright and License
import java.util.Properties;
import org.omg.CORBA.Object;
import org.omg.CORBA.ORB;
import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContextExt;
import org.omg.CosNaming.NamingContextExtHelper;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.*;
import org.omg.PortableServer.Servant;

public class PersistentServer {

    public static void main( String args[] ) {
        Properties properties = System.getProperties();
        properties.put( "org.omg.CORBA.ORBInitialHost",
            "localhost" );
        properties.put( "org.omg.CORBA.ORBInitialPort",
            "1050" );

        try {
            // Step 1: Instantiate the ORB
            ORB orb = ORB.init(args, properties);

            // Step 2: Instantiate the servant
            PersistentHelloServant servant = new PersistentHelloServant(orb);

            // Step 3 : Create a POA with Persistent Policy
            // *******************
            // Step 3-1: Get the rootPOA
            POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            // Step 3-2: Create the Persistent Policy
            Policy[] persistentPolicy = new Policy[1];
            persistentPolicy[0] = rootPOA.create_lifespan_policy(
                LifespanPolicyValue.PERSISTENT);
            // Step 3-3: Create a POA by passing the Persistent Policy
            POA persistentPOA = rootPOA.create_POA("childPOA", null,
                persistentPolicy );
            // Step 3-4: Activate PersistentPOA's POAManager, Without this
            // All calls to Persistent Server will hang because POAManager
            // will be in the 'HOLD' state.
            persistentPOA.the_POAManager().activate( );
            // ***********************

            // Step 4: Associate the servant with PersistentPOA
            persistentPOA.activate_object( servant );

            // Step 5: Resolve RootNaming context and bind a name for the
            // servant.
            // NOTE: If the Server is persistent in nature then using Persistent
            // Name Service is a good choice. Even if ORBD is restarted the Name
            // Bindings will be intact. To use Persistent Name Service use
            // 'NameService' as the key for resolve_initial_references() when
            // ORBD is running.
            org.omg.CORBA.Object obj = orb.resolve_initial_references(
                "NameService" );
            NamingContextExt rootContext = NamingContextExtHelper.narrow( obj );

            NameComponent[] nc = rootContext.to_name(
                "PersistentServerTutorial" );
            rootContext.rebind( nc, persistentPOA.servant_to_reference(
                servant ) );

            // Step 6: We are ready to receive client requests
            orb.run();
        } catch ( Exception e ) {
            System.err.println( "Exception in Persistent Server Startup " + e );
        }
    }
}

Implementing the Servant (PersistentHelloServant.java)

The example servant, PersistentHelloServant, is the implementation of the Hello IDL interface; each Hello instance is implemented by a PersistentHelloServant instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

PersistentHelloServant.java

// PersistentHelloServant.java
// Copyright and License
import org.omg.CORBA.ORB;

public class PersistentHelloServant extends Persistent.HelloPOA {
    private ORB orb;

    public PersistentHelloServant( ORB orb ) {
        this.orb = orb;
    }

    /**
     *  sayHello() method implementation returns a simple message.
     */
    public String sayHello( ) {
        return "Hello From Persistent Server...";
    }

    /**
     *  shutdown() method shuts down the Persistent Server.
     *  See NOTE below.
     */
    public void shutdown( ) {
        orb.shutdown( false );
    }
}

Note: For convenience of presentation in this example, the shutdown() method is included as part of the servant. This has been done in order to demonstrate the persistence of the server in this example. This is not a recommended programming convention for the following reasons:

  • If the orb.shutdown() method is called with parameter true (meaning "wait for completion") within the implementation of a remote method, the ORB will hang in a deadlock. Other threads can invoke orb.shutdown() without deadlock.
  • If you have multiple servants associated with the ORB, using the shutdown(false) method by one of them will make all of them unavailable.
  • The orb.shutdown(false) method should be called as part of the SERVER code under more controlled circumstances.

Implementing the Client Application (PersistentClient.java)

The example application client that follows:

  • Creates and initializes an ORB.
  • Resolves the PersistentHelloServant by using the Interoperable Naming Service's (INS) corbaname url. The URL locates the Naming Service running on host localhost and listening on port 1050. When located, it resolves "PersistentServerTutorial" from that Naming Service.
  • Invokes the object's sayHello() and shutdown() operations and prints the result. In this example, the client calls the sayHello() method every 3 seconds, then shuts down the server. The next call from the client will restart the server (because of the persistent lifespan of the server).

PersistentClient.java

// Copyright and License

import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.CORBA.OBJ_ADAPTER;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;
import org.omg.CosNaming.NameComponent;
import org.omg.PortableServer.POA;

import Persistent.HelloHelper;
import Persistent.Hello;

public class PersistentClient {

    public static void main(String args[]) {

        try {
            // Step 1: Instantiate the ORB
            ORB orb = ORB.init(args, null);

            // Step 2: Resolve the PersistentHelloServant by using INS's
            // corbaname url. The URL locates the NameService running on
            // localhost and listening on 1050 and resolve
            // 'PersistentServerTutorial' from that NameService
            org.omg.CORBA.Object obj = orb.string_to_object(
                "corbaname::localhost:1050#PersistentServerTutorial");

            Hello hello = HelloHelper.narrow( obj );

            // Step 3: Call the sayHello() method every 60 seconds and shutdown
            // the server. Next call from the client will restart the server,
            // because it is persistent in nature.
            while( true ) {
                System.out.println( "Calling Persistent Server.." );
                String helloFromServer = hello.sayHello();
                System.out.println("Message From Persistent Server: " +
                    helloFromServer );
                System.out.println( "Shutting down Persistent Server.." );
                hello.shutdown( );
                Thread.sleep( 60000 );
            }
        } catch ( Exception e ) {
            System.err.println( "Exception in PersistentClient.java..." + e );
            e.printStackTrace( );
        }
    }
}

Building and Running Hello World

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation.

This example requires a naming service, which is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. This example uses orbd (Solaris, Linux, or Mac OS X or Windows), which contains a Persistent Naming Service and a Server Manager.

When running this example, remember that, when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The following instructions assume you can set the -ORBInitialPort option to use port 1050 for the Java IDL Object Request Broker Daemon, orbd. You can substitute a different port if necessary.

To run this client-server application on your development machine:

  1. Create or download the IDL and Java files for this example.
  2. Change to the directory that contains the file PersistentHello.idl.
  3. Run the IDL-to-Java compiler, idlj, on the IDL file to create stubs and skeletons. This step assumes that you have included the path to the java/bin directory in your path.
      idlj  -fall -td . -verbose  PersistentHello.idl

    You must use the -fall option with the idlj compiler to generate both client and server-side bindings. This command line will generate the default server-side bindings, which assumes the POA Inheritance server-side model. For more information on the idlj options, see the man page for idlj (Solaris, Linux, or Mac OS X or Windows).

    The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for PersistentHello.idl, with the -fall command line option, are:

    • HelloPOA.java

      This abstract class is the stream-based server skeleton, providing basic CORBA functionality for the server. It extends org.omg.PortableServer.Servant , and implements the InvokeHandler interface and the HelloOperations interface. The server class PersistentHelloServant extends HelloPOA.

    • _HelloStub.java

      This class is the client stub, providing CORBA functionality for the client. It extends org.omg.CORBA.portable.ObjectImpl and implements the Hello interface.

    • Hello.java

      This interface contains the Java version of our IDL interface. The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality. It also extends the HelloOperations interface and org.omg.CORBA.portable.IDLEntity.

    • HelloHelper.java

      This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

    • HelloHolder.java

      This final class holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

    • HelloOperations.java

      This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

  4. Compile the .java files, including the stubs and skeletons (which are in the directory Persistent). This step assumes the java/bin directory is included in your path.
       javac *.java Persistent/*.java
  5. Start orbd.

    To start orbd, enter one of the following:

    • Solaris, Linux, or Mac OS X operating system:

      orbd -ORBInitialPort 1050 -serverPollingTime 200&

    • Windows operating system:

      start orbd  -ORBInitialPort 1050 -serverPollingTime 200&

    Note that 1050 is the port on which you want the name server to run. The -ORBInitialPort argument is a required command-line argument. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

    The -serverPollingTime 200 argument specifies how often ORBD checks for the health of persistent servers registered via servertool. The default value is 1,000 ms. We are setting this parameter to 200 ms in this example to enable more frequent monitoring of failures. In the event that a server failure is detected, the server will be restarted to its proper state.

  6. Start the Hello server:

    To register a persistent server with the ORBD, the server must be started using servertool (Solaris, Linux, or Mac OS X or Windows), which is a command-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When the servertool is started, you must specify the port and the host (if different) on which orbd is executing.

    To start the Hello server,

    • Start the servertool from the command line of another terminal window or command prompt as follows:
        servertool -ORBInitialPort 1050        (Solaris, Linux, or Mac OS X operating system)

  start servertool -ORBInitialPort 1050  (Windows operating system)

      Make sure the name server (orbd) port is the same as in the previous step, for example, -ORBInitialPort 1050. The servertool must be started on the same port as the name server.

      The servertool command line interface appears:

      Server Tool
    • Register the PersistentServer from the servertool prompt, as shown below. Type the information in one long string without returns.
        servertool  > register -server PersistentServer -applicationName s1
                -classpath path_to_server_class_files

      The servertool registers the server, assigns it the name of "s1", and displays its server id.

  7. Run the client application from the command line of another terminal window or command prompt:
      java -classpath . PersistentClient

    The terminal window or DOS prompt displays the following messages:

    Calling Persistent Server..
Message From Persistent Server: Hello From Persistent Server...
Shutting down Persistent Server..
Calling Persistent Server..
Message From Persistent Server: Hello From Persistent Server...
Shutting down Persistent Server..

In this example, the client invokes the sayHello() method every minute and then kills the persistent server, which will be automatically restarted the next time the client invokes the sayHello() method.

When you have finished this tutorial, be sure to shut down or kill the name server (orbd). To do this from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To do this from a shell on Solaris, Linux, or Mac OS X, type pkill ordb from a terminal window. The server will continue to wait for invocations until it is explicitly stopped.

Running the Hello World Application on Two Machines describes one way of distributing the simple application across two machines - a client and a server.

Running the Example on Solaris, Linux, or Mac OS X Using a Makefile

The following code provides an example of a Makefile that can be used to run this example. Change the location of JAVA_HOME to the location where you installed J2SE 5.0. Change the CLASSPATH variable to the directory where you have created the sample application. This example is for the Solaris, Linux or Mac OS X operating systems, modify accordingly if using the Windows operating system.

#Change to location of your Java SE installation.
JAVA_HOME=/home/user_name/j2sdk1.5.0/

CLASSPATH=.

JAVAC=$(JAVA_HOME)/bin/javac
JAVA=$(JAVA_HOME)/bin/java

ORB_INITIAL_PORT=1050
ORB_INITIAL_HOST=localhost
ORB_ACTIVATION_PORT=1049

#Change ClassPath based on where your PersistentServer is located.
export CLASSPATH=<path to server class files>
IDLJ :=$(JAVA_HOME)/bin/idlj

ORB_PROPS=-Dorg.omg.CORBA.ORBInitialHost=$(ORB_INITIAL_HOST)
-Dorg.omg.CORBA.ORBInitialPort=$(ORB_INITIAL_PORT)

IDLJ_FLAGS=-fall -td . -verbose

ORBD=${JAVA_HOME}/bin/orbd -ORBInitialPort ${ORB_INITIAL_PORT}
-port ${ORB_ACTIVATION_PORT} -serverPollingTime 200
-serverStartupDelay 1000

SERVERTOOL=${JAVA_HOME}/bin/servertool

all: clean build run

build: stubs

stubs:
        $(IDLJ) $(IDLJ_FLAGS) PersistentHello.idl
        $(JAVAC) *.java
        $(JAVAC) Persistent/*.java

runc:
        $(JAVA) -classpath . PersistentClient

runorbd:
        $(ORBD)

# Enter the following command in servertool to register server:
# (without the # sign)
# register -server PersistentServer -applicationName s1
-classpath path_to_server_class_files

servertool:
        $(SERVERTOOL) -ORBInitialPort $(ORB_INITIAL_PORT)

clean:
        rm -rf Persistent
        rm -rf *.class

To run the application using the Makefile, enter the following commands:

  1. gnumake build
  2. gnumake runorbd
  3. gnumake runservertool
  4. In servertool, enter the commands as shown above
  5. gnumake runc
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The "Hello World" Example

Documentation Contents

Java IDL: The "Hello World" Example

POA model, transient server

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using IDL (Interface Definiton Language) to define interfaces and the Java IDL compiler to generate stubs and skeletons. For more information on the development process, and a more detailed tutorial on creating a CORBA application using IDL, see Getting Started with Java IDL: The Hello World Tutorial. You can also create CORBA application by defining the interfaces in the Java programming language. For more information and a tutorial on this development process, see the Java RMI-IIOP documentation.

In this release of Java SE, the server-side implementation generated by the idlj compiler is the Portable Servant Inheritance Model, also known as the POA model. The POA, or Portable Object Adapter, is discussed in more detail in Portable Object Adapter. This document presents a sample application created using the default behavior of the idlj compiler, which uses a POA server-side model.

CORBA supports at least two different server-side mappings for implementing an IDL interface:

  • The Inheritance Model

    Using the Inheritance Model, you implement the IDL interface using an implementation class that also extends the compiler-generated skeleton.

    Inheritance models include:

    • The OMG-standard, POA. Given an interface My defined in My.idl, the file MyPOA.java is generated by the idlj compiler. You must provide the implementation for My and it must inherit from MyPOA, a stream-based skeleton that extends org.omg.PortableServer.Servant , which serves as the base class for all POA servant implementations.
    • ImplBase. Given an interface My defined in My.idl, the file _MyImplBase.java is generated. You must provide the implementation for My and it must inherit from _MyImplBase.

      NOTE: ImplBase is deprecated in favor of the POA model, but is provided to allow compatibility with servers written in J2SE 1.3 and prior. We do not recommend creating new servers using this nonstandard model.

  • The Delegation Model

    Using the Delegation Model, you implement the IDL interface using two classes:

    • An IDL-generated Tie class that inherits from the compiler-generated skeleton, but delegates all calls to an implementation class.
    • A class that implements the IDL-generated operations interface (such as HelloOperations), which defines the IDL function.

    The Delegation model is also known as the Tie model, or the Tie Delegation model. It inherits from either the POA or ImplBase compiler-generated skeleton, so the models will be described as POA/Tie or ImplBase/Tie models in this document.

This tutorial presents the POA Inheritance model for server-side implementation. For tutorials using the other server-side implementations, see the following documents:

  • Java IDL: The "Hello World" Example with the POA/Tie Server-Side Model

    The Tie Model is a delegation model. Use the idlj compiler to first generate server-side bindings. Then, run the idlj compiler a second time with the with the -fallTie option to generate Tie model server-side bindings. For the interface Hello, HelloPOATie.java is one of the generated files. The constructor to HelloPOATie takes a delegate or a delegate and a poa. You must provide the implementation for delegate and/or the poa, but the delegate does not have to inherit from any other class, only the interface HelloOperations. For more information, refer to the IDL to Java Language Mapping Specification.

    You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method.

  • Java IDL: The "Hello World" Example with the ImplBase Server-Side Model

    The ImplBase server-side model is an Inheritance Model, as is the POA model. Use the idlj compiler with the -oldImplBase flag to generate server-side bindings that are compatible with versions of Java IDL prior to J2SE 1.4. Given an interface Hello defined in Hello.idl, the file _HelloImplBase.java is generated. You must provide the implementation for Hello and it must inherit from _HelloImplBase.

    Note that using the -oldImplBase flag is non-standard: these APIs are being deprecated. You would use this flag ONLY for compatibility with existing servers written in J2SE 1.3 or earlier. In that case, you would need to modify an existing MAKEFILE to add the -oldImplBase flag to the idlj compiler, otherwise POA-based server-side mappings will be generated.

This document contains:

  • The example code for this application
  • The IDL for a simple "Hello World" program
  • A server that creates an object and publishes it with the naming service using the default server-side implementation (POA)
  • An application client that knows the object's name, retrieves a reference for it from the naming service, and invokes the object
  • Instructions for compiling and running the example

To create this example, create a directory named hello/ where you develop sample applications and create the files in this directory, or download the example code and unzip it into your sample applications directory.

Defining the Interface (Hello.idl)

The first step to creating a CORBA application is to specify all of your objects and their interfaces using the OMG's Interface Definition Language (IDL). IDL has a syntax similar to C++ and can be used to define modules, interfaces, data structures, and more. The IDL can be mapped to a variety of programming languages. The IDL mapping for Java is summarized in IDL to Java Language Mapping Summary.

The following code is written in the OMG IDL, and describes a CORBA object whose sayHello() operation returns a string and whose shutdown() method shuts down the ORB. To learn more about OMG IDL Syntax and Semantics, read Chapter 3 of the CORBA 2.3.1 Specification.

Hello.idl

module HelloApp
{
  interface Hello
  {
  string sayHello();
  oneway void shutdown();
  };
};
NOTE: When writing code in OMG IDL, do not use an interface name as the name of a module. Doing so runs the risk of getting inconsistent results when compiling with tools from different vendors, thereby jeopardizing the code's portability. For example, code containing the same names could be compiled with the IDL to Java compiler from Sun Microsystems and get one result. The same code compiled with another vendor's IDL to Java compiler could produce a different result.

To complete the application, you simply provide the server (HelloServer.java) and client (HelloClient.java) implementations.

Implementing the Server (HelloServer.java)

The example server consists of two classes, the servant and the server. The servant, HelloImpl, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloImpl instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

The HelloServer class has the server's main() method, which:

  • Creates and initializes an ORB instance
  • Gets a reference to the root POA and activates the POAManager
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Gets a CORBA object reference for a naming context in which to register the new CORBA object
  • Gets the root naming context
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object from the client

This example provides an example of a transient object server. For an example of the "Hello World" program with a persistent object server, see Example 2: Hello World with Persistent State. For more discussion of CORBA servers, see Developing Servers.

For more discussion of the code, see the detailed tutorial topic Getting Started with Java IDL: Developing a Hello World Server.

HelloServer.java

// HelloServer.java
// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA {
  private ORB orb;

  public void setORB(ORB orb_val) {
    orb = orb_val;
  }

  // implement sayHello() method
  public String sayHello() {
    return "\nHello world !!\n";
  }

  // implement shutdown() method
  public void shutdown() {
    orb.shutdown(false);
  }
}

public class HelloServer {

  public static void main(String args[]) {
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get reference to rootpoa & activate the POAManager
      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      // create servant and register it with the ORB
      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb);

      // get object reference from the servant
      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
      Hello href = HelloHelper.narrow(ref);

      // get the root naming context
      // NameService invokes the name service
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      // Use NamingContextExt which is part of the Interoperable
      // Naming Service (INS) specification.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // bind the Object Reference in Naming
      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      // wait for invocations from clients
      orb.run();
    }

      catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }

      System.out.println("HelloServer Exiting ...");

  }
}

Implementing the Client Application (HelloClient.java)

The example application client that follows:

  • Creates and initializes an ORB
  • Obtains a reference to the root naming context
  • Looks up "Hello" in the naming context and receives a reference to that CORBA object
  • Invokes the object's sayHello() and shutdown() operations and prints the result

For more discussion of the details of the code, see Getting Started with Java IDL: Developing a Client Application.

HelloClient.java

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

public class HelloClient
{
  static Hello helloImpl;

  public static void main(String args[])
    {
      try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // get the root naming context
        org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");
        // Use NamingContextExt instead of NamingContext. This is
        // part of the Interoperable naming Service.
        NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

        // resolve the Object Reference in Naming
        String name = "Hello";
        helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

        System.out.println("Obtained a handle on server object: " + helloImpl);
        System.out.println(helloImpl.sayHello());
        helloImpl.shutdown();

        } catch (Exception e) {
          System.out.println("ERROR : " + e) ;
          e.printStackTrace(System.out);
          }
    }

}

Building and Running Hello World

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation. Static invocation, which uses a client stub for the invocation and a server skeleton for the service being invoked, is used when the interface of the object is known at compile time. If the interface is not known at compile time, dynamic invocation must be used.

This example requires a naming service, which is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. The two options for Naming Services shipped with this release of Java SE include orbd (Solaris, Linux, or Mac OS X or Windows), a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager, and tnameserv (Solaris, Linux, or Mac OS X or Windows), a transient naming service that is provided for backward compatibility. This example uses orbd.

When running this example, remember that, when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The -ORBInitialPort option is used to override the default port number in this example. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon, orbd. You can substitute a different port if necessary. When running these examples on a Windows machine, subtitute a backslash (\) in path names.

To run this client-server application on your development machine:

  1. Change to the directory that contains the file Hello.idl.
  2. Run the IDL-to-Java compiler, idlj, on the IDL file to create stubs and skeletons. This step assumes that you have included the path to the java/bin directory in your path.
      idlj -fall  Hello.idl

    You must use the -fall option with the idlj compiler to generate both client and server-side bindings. This command line will generate the default server-side bindings, which assumes the POA Inheritance server-side model. For more information on the idlj options, see the man page for idlj (Solaris, Linux, or Mac OS X or Windows).

    The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

    • HelloPOA.java

      This abstract class is the stream-based server skeleton, providing basic CORBA functionality for the server. It extends org.omg.PortableServer.Serva nt , and implements the InvokeHandler interface and the HelloOperations interface. The server class HelloImpl extends HelloPOA.

    • _HelloStub.java

      This class is the client stub, providing CORBA functionality for the client. It extends org.omg.CORBA.portable.ObjectImpl and implements the Hello.java interface.

    • Hello.java

      This interface contains the Java version of our IDL interface. The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality. It also extends the HelloOperations interface and org.omg.CORBA.portable.IDLEntity.

    • HelloHelper.java

      This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

    • HelloHolder.java

      This final class holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

    • HelloOperations.java

      This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

  3. Compile the .java files, including the stubs and skeletons (which are in the directory HelloApp). This step assumes the java/bin directory is included in your path.
       javac *.java HelloApp/*.java
  4. Start orbd.

    To start orbd from a Solaris, Linux, or Mac OS X command shell, enter:

      orbd -ORBInitialPort 1050&

    From an MS-DOS system prompt (Windows), enter:

      start orbd -ORBInitialPort 1050

    Note that 1050 is the port on which you want the name server to run. The -ORBInitialPort argument is a required command-line argument. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

    For an example of how to run this program on two machines, see Running the Hello World Program on 2 machines.

  5. Start the Hello server:

    To start the Hello server from a Solaris, Linux, or Mac OS X command shell, enter:

      java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost

    You will see HelloServer ready and waiting... when the server is started.

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello server. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

  6. Run the client application:
      java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost

    When the client is running, you will see a response such as the following on your terminal: Obtained a handle on server object: IOR: (binary code) Hello World! HelloServer exiting...

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello client. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

When you have finished this tutorial, be sure to shut down or kill the name server (orbd). To do this from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To do this from a shell on Solaris, Linux, or Mac OS X, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.

Running the Hello World Application on Two Machines describes one way of distributing the simple application across two machines - a client and a server.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The "Hello World" Example With The ImplBase Server-Side Model

Documentation Contents

Java IDL: The "Hello World" Example With The ImplBase Server-Side Model

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using IDL (Interface Definiton Language) to define interfaces and the Java IDL compiler to generate stubs and skeletons. This document describes using the ImplBase Inheritance Server-Side Model.

The idlj compiler now generates server-side mappings based on the POA Inheritance Model as the default. For compatibility with existing applications, a new flag has been added to the idlj compiler to allow it to generate server-side mappings based on the ImplBase Inheritance Model, -oldImplBase.

NOTE: ImplBase is deprecated in favor of the POA model, but is provided to allow compatibility with servers written in J2SE 1.3 and prior. We do not recommend creating new servers using this nonstandard model.

This document contains:

  • The IDL for a simple "Hello World" program
  • A server that creates an object and publishes it with a naming service using the ImplBase server-side implementation
  • An application client that knows the object's name, retrieves a reference for it from the naming service, and invokes the object
  • Instructions for compiling and running the example

Defining the Interface (Hello.idl)

The first step to creating a CORBA application is to specify all of your objects and their interfaces using the OMG's Interface Definition Language (IDL). IDL has a syntax similar to C++ and can be used to define modules, interfaces, data structures, and more. The IDL can be mapped to a variety of programming languages. The IDL mapping for Java is summarized in IDL to Java Language Mapping Summary.

The following code is written in the OMG IDL, and describes a CORBA object whose sayHello() operation returns a string and whose shutdown() operation shuts down the ORB. To learn more about OMG IDL Syntax and Semantics, link to the OMG Web site, and read Chapter 3 of the CORBA Specification.

Hello.idl

module HelloApp
{
  interface Hello
  {
  string sayHello();
  oneway void shutdown();
  };
};
NOTE: When writing code in OMG IDL, do not use an interface name as the name of a module. Doing so runs the risk of getting inconsistent results when compiling with tools from different vendors, thereby jeopardizing the code's portability. For example, code containing the same names could be compiled with the IDL to Java compiler and get one result. The same code compiled with another vendor's IDL to Java compiler could produce a different result.

To complete the application, you simply provide the server (HelloServer.java) and client (HelloClient.java) implementations.

Implementing the Server (HelloServer.java)

The example server consists of two classes, the servant and the server. The servant, HelloImpl, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloImpl instance. The servant is a subclass of _HelloImplBase, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

The HelloServer class has the server's main() method, which:

  • Creates and initializes an ORB instance
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Gets a CORBA object reference for a naming context in which to register the new CORBA object
  • Gets the root naming context
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object from the client

The HelloServer for the ImplBase server-side implementation differs only slightly from its POA counterpart. The sections of the POA-based server that get a reference to the root POA and activate the POAManager are not necessary for this implementation, which follows:

HelloServer.java

// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

import java.util.Properties;

class HelloImpl extends _HelloImplBase{

  private ORB orb;

  public void setORB(ORB orb_val){
    orb = orb_val;
  }

  public String sayHello(){
    return "\nHello world !!\n";
  }

  public void shutdown(){
    orb.shutdown(false);
  }
}

public class HelloServer {

  public static void main(String args[]) {
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // create servant and register it with the ORB
      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb);

      // get the root naming context
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      Hello href = HelloHelper.narrow(helloImpl);

      // bind the Object Reference in Naming
      NameComponent nc = new NameComponent("Hello", "");
      NameComponent path[] = {nc};
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      // wait for invocations from clients
      orb.run();
    }

    catch (Exception e) {
      System.err.println("ERROR: " + e);
      e.printStackTrace(System.out);
    }

    System.out.println("HelloServer Exiting ...");

  }
}

Implementing the Client Application (HelloClient.java)

The example application client that follows is similar to the one presented in the default tutorial, however, the new Interoperable Naming Service features are not used in this example to preserve backward compatibility. The example client application:

  • Creates and initiliazes an ORB
  • Obtains a reference to the naming context
  • Looks up "Hello" in the naming context and receives a reference to that CORBA object
  • Invokes the object's sayHello() and shutdown() operations and prints the result

HelloClient.java

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

public class HelloClient{

  static Hello helloImpl;

  public static void main(String args[]){

    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get the root naming context
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // resolve the Object Reference in Naming
      NameComponent nc = new NameComponent("Hello", "");
      NameComponent path[] = {nc};
      Hello helloImpl = HelloHelper.narrow(ncRef.resolve(path));

      System.out.println("Obtained a handle on server object: " + helloImpl);
      System.out.println(helloImpl.sayHello());
      helloImpl.shutdown();
      }

    catch (Exception e) {
      System.out.println("ERROR : " + e) ;
      e.printStackTrace(System.out);
    }
  }
}

Building and Running Hello World

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation.

This example requires a naming service, which is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. The two options for Naming Services shipped with this version of Java SE are tnameserv, a transient naming service, and orbd (Solaris, Linux, or Mac OS X or Windows), which is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager. This example uses orbd.

When running this example, remember that, when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The -ORBInitialPort option is used to override the default port number in this example. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon, orbd. You can substitute a different port if necessary. When running these examples on a Windows machine, subtitute a backslash (\) in path names.

To run this client-server application on your development machine:

  1. Create the program files or download and unzip HelloImplBase.zip.
  2. Change to the directory that contains the file Hello.idl.
  3. Run the IDL-to-Java compiler, idlj, on the IDL file to create stubs and skeletons. This step assumes that you have included the path to the java/bin directory in your path.

    NOTE: ImplBase is deprecated in favor of the POA model, but is provided to allow compatibility with servers written in J2SE 1.3 and prior. We do not recommend creating new servers using this nonstandard model.

      idlj -fall -oldImplBase Hello.idl

    You must use the -fall option with the idlj compiler to generate both client and server-side bindings. This command line will generate the default server-side bindings, which assumes the POA programming model. The -oldImplBase option tells the compiler to generate the ImplBase Inheritance Model server-side bindings, instead of the default POA Inheritance Model server-side bindings. For more information on the idlj options, see the idlj man page (Solaris, Linux, or Mac OS X or Windows).

    The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

    • _HelloImplBase.java

      This abstract class is the server skeleton, providing basic CORBA functionality for the server. It implements the InvokeHandler and the Hello interface. It inherits from org.omg.CORBA.portable.ObjectImpl. The server class HelloImpl inherits from _HelloImplBase.

    • _HelloStub.java

      This class is the client stub, providing CORBA functionality for the client. It inherits from org.omg.CORBA.portable.ObjectImpl and implements the Hello interface.

    • Hello.java

      This interface contains the Java version of our IDL interface. The Hello.java interface inherits from org.omg.CORBA.Object, providing standard CORBA object functionality. It also inherits from HelloOperations and org.omg.CORBA.portable.IDLEntity.

    • HelloHelper.java

      This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

    • HelloHolder.java

      This final class holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

    • HelloOperations.java

      This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

  4. Compile the .java files, including the stubs and skeletons (which are in the directory HelloApp). This step assumes the java/bin directory is included in your path.
       javac *.java HelloApp/*.java
  5. Start orbd.

    To start orbd from a command shell on Solaris, Linux, or Mac OS X, enter:

      orbd -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start orbd -ORBInitialPort 1050 -ORBInitialHost localhost

    Note that 1050 is the port on which you want the name server to run. -ORBInitialPort is a required command-line argument. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

    -ORBInitialHost is an optional command-line argument. For this example, since both client and server on running on the development machine, we have set the host to localhost. When developing on more than one machine, you will replace this with the name of the host. For an example of how to run this program on two machines, see Running the Hello World Program on 2 machines.

  6. Start the Hello server:

    To start the Hello server from a command shell on Solaris, Linux, or Mac OS X, enter:

      java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello server. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

    When the server is running, it will echo the following message back to the terminal:

    HelloServer ready and waiting ...
  7. Run the client application:
      java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello client. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

    When the client is running, the following message will echo to the terminal:

       Obtained a handle on server object: IOR: ...
   Hello World !!
   HelloServer Exiting ...

When you have finished this tutorial, be sure to shut down or kill the name server (orbd). To do this from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To do this from a shell on Solaris, Linux, or Mac OS X, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.

Running the Hello World Application on Two Machines describes one way of distributing the simple application across two machines - a client and a server.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The "Hello World" Example With The POA-Tie Server-Side Model

Documentation Contents

Java IDL: The "Hello World" Example With The POA-Tie Server-Side Model

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using IDL (Interface Definiton Language) to define interfaces and the Java IDL compiler to generate stubs and skeletons. This document describes using the POA-Tie Server-Side Model. You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up. By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method.

The other part of this programming model is the Portable Object Adapter, or POA, which is designed to meet the following goals:

  • Allow programmers to construct object implementations that are portable between different ORB products.
  • Provide support for objects with persistent identities.
  • Provide support for transparent activation of objects.
  • Allow a single servant to support multiple object identities simultaneously.

This document contains:

  • The IDL for a simple "Hello World" program
  • A server that creates an object and publishes it with a naming service using the POA-Tie server-side implementation
  • An application client that knows the object's name, retrieves a reference for it from the naming service, and invokes the object
  • Instructions for compiling and running the example

Defining the Interface (Hello.idl)

The first step to creating a CORBA application is to specify all of your objects and their interfaces using the OMG's Interface Definition Language (IDL). IDL has a syntax similar to C++ and can be used to define modules, interfaces, data structures, and more. The IDL can be mapped to a variety of programming languages. The IDL mapping for Java is summarized in IDL to Java Language Mapping Summary.

The following code is written in the OMG IDL, and describes a CORBA object whose sayHello() operation returns a string and whose shutdown() method shuts down the ORB. To learn more about OMG IDL Syntax and Semantics, read Chapter 3 of the CORBA 2.3.1 Specification.

Hello.idl

module HelloApp
{
  interface Hello
  {
  string sayHello();
  oneway void shutdown();
  };
};
NOTE: When writing code in OMG IDL, do not use an interface name as the name of a module. Doing so runs the risk of getting inconsistent results when compiling with tools from different vendors, thereby jeopardizing the code's portability. For example, code containing the same names could be compiled with the IDL to Java compiler from Sun Microsystems and get one result. The same code compiled with another vendor's IDL to Java compiler could produce a different result.

To complete the application, you simply provide the server (HelloServer.java) and client (HelloClient.java) implementations.

Implementing the Server (HelloServer.java)

The example server consists of two classes, the servant and the server. The servant, HelloImpl, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloImpl instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

The HelloServer class has the server's main() method, which:

  • Creates and initializes an ORB instance
  • Gets a reference to the root POA and activates the POAManager
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Creates a tie with the servant being the delegate
  • Gets a CORBA object reference for a naming context in which to register the tie. This step also implicitly activates the object. See the POA topic for more information on POA policies and activations.
  • Gets the root naming context
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object from the client

The code that is different from that in the default tutorial is highlighted in bold.

HelloServer.java

// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA{
  private ORB orb;

  public void setORB(ORB orb_val){
    orb = orb_val;
  }

  public String sayHello(){
    return "\nHello world !!\n";
  }

  public void shutdown(){
    orb.shutdown(false);
  }
}

public class HelloServer{

  public static void main(String args[]){
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // Get reference to rootpoa & activate the POAManager
      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      // create servant and register it with the ORB
      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb);

      // create a tie, with servant being the delegate.
      HelloPOATie tie = new HelloPOATie(helloImpl, rootpoa);

      // obtain the objectRef for the tie
      // this step also implicitly activates the object
      Hello href = tie._this(orb);

      // get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");

      // Use NamingContextExt which is part of the Interoperable
      // Naming Service specification.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // bind the Object Reference in Naming
      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      // wait for invocations from clients
      orb.run();
      }

    catch (Exception e){
      System.err.println("ERROR: " + e);
      e.printStackTrace(System.out);
    }

    System.out.println("HelloServer Exiting ...");

  }
}

Implementing the Client Application (HelloClient.java)

The example application client that follows is the same as the one presented in the default tutorial. The server implementation is the only file that is changed from that example. The example client application:

  • Creates and initializes an ORB
  • Obtains a reference to the root naming context
  • Looks up "Hello" in the naming context and receives a reference to that CORBA object
  • Invokes the object's sayHello() and shutdown() operations and prints the result

HelloClient.java

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

public class HelloClient{

  public static void main(String args[]){

    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get the root naming context
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");

      // Use NamingContextExt instead of NamingContext. This is
      // part of the Interoperable naming Service.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // resolve the Object Reference in Naming
      String name = "Hello";
      Hello helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

      System.out.println("Obtained a handle on server object: " + helloImpl);
      System.out.println(helloImpl.sayHello());
      helloImpl.shutdown();
      }

    catch (Exception e) {
      System.out.println("ERROR : " + e) ;
      e.printStackTrace(System.out);
    }
  }
}

Building and Running Hello World

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation.

This example requires a naming service, which is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. The two options for Naming Services shipped with this version of the Java SE are tnameserv (Solaris, Linux, or Mac OS X or Windows), a transient naming service, and orbd (Solaris, Linux, or Mac OS X or Windows), which contain a Naming Service. This example uses orbd.

When running this example, remember that, when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The -ORBInitialPort option is used to override the default port number in this example. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon, orbd. You can substitute a different port if necessary. When running these examples on a Windows machine, subtitute a backslash (\) in path names.

To run this client-server application on your development machine:

  1. Create the program files or download and unzip the file HelloTie.zip.
  2. Change to the directory that contains the program files.
  3. Run the IDL-to-Java compiler, idlj, twice on the IDL file to create stubs and skeletons. This step assumes that you have included the path to the java/bin directory in your path.
      idlj -fall  Hello.idl
  idlj -fallTie Hello.idl

    You must use the -fall option with the idlj compiler to generate both client and server-side bindings. This command line will generate the default server-side bindings, which assumes the POA programming model. The -fallTie option generates another file, HelloPOATie, which is used to create a Tie. For more information on the idlj options, see the man page for idlj (Solaris, Linux, or Mac OS X or Windows).

    The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

    • HelloPOA.java

      This abstract class is the stream-based server skeleton, providing basic CORBA functionality for the server. It extends org.omg.PortableServer.Servant, and implements the InvokeHandler interface and the HelloOperations interface. The server class HelloImpl extends HelloPOA.

    • _HelloStub.java

      This class is the client stub, providing CORBA functionality for the client. It extends org.omg.CORBA.portable.ObjectImpl and implements the Hello interface.

    • Hello.java

      This interface contains the Java version of our IDL interface. The Hello interface extends org.omg.CORBA.Object, providing standard CORBA object functionality. It also extends the HelloOperations interface and org.omg.CORBA.portable.IDLEntity.

    • HelloHelper.java

      This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

    • HelloHolder.java

      This final class holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

    • HelloOperations.java

      This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

    The files generated by the idlj compiler for Hello.idl, with the -fallTie command line option, are:

    • HelloPOATie.java

      The constructor to MyPOATie takes a delegate and/or a poa. You must provide the implementations for delegate and/or poa, but the delegate does not have to inherit from any other class, only the interface HelloOperations. For more information, refer to the IDL to Java Language Mapping Specification.

  4. Compile the .java files, including the stubs and skeletons (which are in the directory HelloApp). This step assumes the java/bin directory is included in your path.
       javac *.java HelloApp/*.java
  5. Start orbd.

    To start orbd from a command shell on Solaris, Linux, or Mac OS X, enter:

      orbd -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start orbd -ORBInitialPort 1050 -ORBInitialHost localhost

    Note that 1050 is the port on which you want the name server to run. -ORBInitialPort is a required command-line argument. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

    -ORBInitialHost is an optional command-line argument. For this example, since both client and server on running on the development machine, we have set the host to localhost. When developing on more than one machine, you will replace this with the name of the host. For an example of how to run this program on two machines, see Running the Hello World Program on 2 machines.

  6. Start the Hello server.

    To start the Hello server from a command shell on Solaris, Linux, or Mac OS X, enter:

      java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello server. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

    The server starts and echos the following message back to the terminal:

    HelloServer ready and waiting ...
  7. Run the client application:
      java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello client. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

    The client runs and echos the following information back to the terminal:

    Obtained a handle on server object: IOR:
...
Hello World!
Hello Server Exiting ...

When you have finished this tutorial, be sure to shut down or kill the name server (orbd). To do this from a DOS prompt, select the window that is running orbd and enter Ctrl+C to shut it down. To do this from a shell on Solaris, Linux, or Mac OS X, find the process, and kill it. The name server will continue to wait for invocations until it is explicitly stopped.

Running the Hello World Application on Two Machines describes one way of distributing the simple application across two machines - a client and a server.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Tutorial

Hello World Tutorial

Home Concepts Programming Reference Tutorial
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Adapter Activators

When creating a new POA, the application developer may declare specific policy choices for the new POA and provide a different adapter activator and servant manager (these are callback objects used by the POA to activate POAs on demand and activate servants). Creating new POAs also allows the application developer to partition the name space of objects, as Object Ids are interpreted relative to a POA. Finally, by creating new POAs, the developer can independently control request processing for multiple sets of objects.

An adapter activator is optional. You would use an adapter activator if POAs need to be created during request processing. If all needed POAs are created when the application is initialized, an adapter activator is not required.

An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when the find_POA method is called with an activate parameter value of TRUE. The ORB will invoke an operation on an adapter activator when a request is received for a child POA that does not currently exist. The adapter activator can then create the required POA on demand.

A request must be capable of conveying the Object Id of the target object as well as the identification of the POA that created the target object reference. When a client issues a request, the ORB first locates an appropriate server (perhaps starting one if needed) and then it locates the appropriate POA within that server.

If the POA does not exist in the server process, the application has the opportunity to re-create the required POA by using an adapter activator. An adapter activator is a user-implemented object that can be associated with a POA. It is invoked by the ORB when a request is received for a nonexistent child POA. The adapter activator has the opportunity to create the required POA. If it does not, the client receives the ADAPTER_NONEXISTENT exception.

Once the ORB has located the appropriate POA, it delivers the request to that POA. The further processing of that request depends both upon the policies associated with that POA as well as the object's current state of activation.

An Example Using Adapter Activators

The following example code shows an application that uses Adapter Activators to enable the POA to be created during request processing. This application builds on the "Hello World" example. The following files are included in this example:

  • Client.java
  • Server.java
  • Hello.idl
  • HelloServant.java
  • Makefile
  • run.bat

For instructions on running this example, see Running the Example Adapter Activator Application.

Client.java

The code for the example client initializes the ORB, resolves HelloServant, and invokes the sayHello() method.

//Client.java
import org.omg.CORBA.ORB;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;
import org.omg.CosNaming.NameComponent;

public class Client {

    public void run(String[] args) {
        try {
            //initialize the orb
            ORB orb = ORB.init(args, null);
            System.out.println("ORB initialized");

            NamingContext namingContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));
            NameComponent[] nc = { new NameComponent("HelloServer", "") };

            //resolve HelloServant and invoke sayHello()
            Hello helloRef = HelloHelper.narrow(namingContext.resolve(nc));
            System.out.println("Resolved HelloServant");

            System.out.println(helloRef.sayHello());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new Client().run(args);
    }
}

Server.java

The code for the server does the following:

  • Initializes the ORB.
  • Resolve RootPOA.
  • Registers the adapter activator with rootPOA so that child POAs can be created on demand.
  • Runs find_POA with an activate parameter of TRUE to cause the adapter activator associated with rootPOA to be invoked if 'HelloPOA' does not exist.
  • Creates the object reference for HelloServant and registers it with the naming service.
  • Destroys 'HelloPOA'. This POA will be transparently recreated when the ORB receives a request on HelloPOA using the adapter activator we registered with the RootPOA.
  • Activates rootPOA.
  • Waits for incoming requests.
  • Creates MyAdapterActivator to create the POA with appropriate policies, associate the servant with the new POA, and activate the new POA.
//Server.java
import org.omg.CORBA.ORB;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;
import org.omg.PortableServer.AdapterActivator;
import org.omg.PortableServer.IdAssignmentPolicyValue;
import org.omg.PortableServer.LifespanPolicyValue;
import org.omg.PortableServer.ImplicitActivationPolicyValue;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;
import org.omg.CosNaming.NameComponent;

public class Server {

    public void run(String[] args) {
        try {
            //initialize the orb
            ORB orb = ORB.init(args, null);
            System.out.println("ORB initialized");

            //resolve RootPOA
            POA rootPOA = POAHelper.narrow(
                orb.resolve_initial_references("RootPOA"));

            //register adapter activator with rootPOA so that child POAs can
            //be created on demand
            rootPOA.the_activator(new MyAdapterActivator());

            //find_POA with an activate parameter TRUE would cause the
            //adapter activator associated with rootPOA to be invoked if
            //'HelloPOA' does not exist
            POA childPOA = rootPOA.find_POA("HelloPOA", true);

            //Create the object reference for HelloServant
            //and register with naming service
            org.omg.CORBA.Object obj = childPOA.id_to_reference(
                "abcd".getBytes());
            Hello helloRef = HelloHelper.narrow(obj);

            NamingContext namingContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));
            NameComponent[] nc = { new NameComponent("HelloServer", "") };
            namingContext.rebind(nc, helloRef);

            //Destroy 'HelloPOA'. This POA will be transparently recreated when
            //ORB receives a request on HelloPOA using the adapter activator we
            //registered with the RootPOA
            childPOA.destroy(true, true);

            //activate rootPOA
            rootPOA.the_POAManager().activate();

            //wait for incoming requests
            System.out.println("Server ready and running....");
            orb.run();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new Server().run(args);
    }
}

class MyAdapterActivator extends LocalObject implements AdapterActivator {

    public boolean unknown_adapter(POA parent, String name) {
        System.out.println("unknown_adapter() invoked for POA - " + name);
        try {
            // create the POA with appropriate policies
            // this sample uses PERSISTENT, NO_IMPLICIT_ACTIVATION
            // and USER_ID policies
            Policy[] policy = new Policy[3];
            policy[0] = parent.create_lifespan_policy(
                LifespanPolicyValue.PERSISTENT);
            policy[1] = parent.create_id_assignment_policy(
                IdAssignmentPolicyValue.USER_ID);
            policy[2] = parent.create_implicit_activation_policy(
                ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION);

            POA child = parent.create_POA(name, null, policy);

            //Associate the servant with the new POA
            HelloServant hello = new HelloServant();
            child.activate_object_with_id("abcd".getBytes(), hello);

            //activate the new POA
            child.the_POAManager().activate();

            return true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
}

Hello.idl

This Interface Definition Language (IDL) file is used in all of the "Hello World" example variations on this site. This IDL file describes a CORBA object whose sayHello() operation returns a string.
interface Hello { string sayHello(); };

HelloServant.java

The servant is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloServant instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, the sayHello() method. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.
//HelloServant.java
public class HelloServant extends HelloPOA {

    public String sayHello() {
        return "Hello :)";
    }
}

Makefile

The make program generates a sequence of commands for execution by the shell on Solaris, Linux, or Mac OS X.

JAVA_HOME=<path_to_your_Java_installation_bin_directory>

#setup tools
JAVA=$(JAVA_HOME)/bin/java
JAVAC=$(JAVA_HOME)/bin/javac
IDLJ=$(JAVA_HOME)/bin/idlj
ORBD=$(JAVA_HOME)/bin/orbd

all     : clean build run

clean   :
        - rm -rf classes orb.db

build   :
        mkdir -p classes
        $(IDLJ) -fall -td classes Hello.idl
        $(JAVAC) -classpath classes -d classes HelloServant.java Server.java Client.java

run     : runorbd register runclient

runorbd :
        $(ORBD) -ORBInitialPort 10001 &
        sleep 20

register:
        #servertool does not support script based register due to a bug
        #using class instead
        #Please note that the name of the servertool
        #class may change in future releases.
        $(JAVA) com.sun.corba.se.internal.Activation.ServerTool \
        -ORBInitialPort 10001 -cmd \
        register -server Server -classpath classes

runclient :
        $(JAVA) -classpath classes Client -ORBInitialPort 10001

run.bat

The bat utility generates a sequence of commands for execution by the Microsoft Windows command shell.

SET JAVA_HOME=<path_to_your_Java_installation_build_directory>

mkdir classes

%JAVA_HOME%\bin\idlj -fall -td classes Hello.idl
%JAVA_HOME%\bin\javac -classpath classes -d classes HelloServant.java Server.java Client.java

REM - Start the ORB daemon

start %JAVA_HOME%\bin\orbd -ORBInitialPort 10001 -ORBDebug orbd
@echo Wait 10-15 seconds for the orbd to start
@pause

REM - Register the persistent server with orbd using servertool
REM - Please note that the name of the servertool
REM - class may change in future releases.
%JAVA_HOME%\bin\java com.sun.corba.se.internal.Activation.ServerTool -ORBInitialPort 10001 -cmd register -server Server -classpath classes

%JAVA_HOME%\bin\java -classpath classes Client -ORBInitialPort 10001

Running the Example Adapter Activator Application

To run this example,

  • Create the files using the code shown above.
  • Run the example using either of these methods:
    • If you have the Make utility, run the application using the Makefile:

      make all

    • If you have the batch utility, run the application using run.bat. From the application directory, enter:

      run

You will see output generated to the terminal window similar to that below when you run the Makefile:

rm -rf classes orb.db mkdir -p classes /j2sdk1.5.0/bin/idlj -fall -td classes Hello.idl /j2sdk1.5.0/bin/javac -classpath classes -d classes HelloServant.java Server.java Client.java /j2sdk1.5.0/bin/orbd -ORBInitialPort 10001 & sleep 20 #servertool does not support script based register due to a bug #using class instead #Please note that the name of the servertool
#class may change in future releases.
/j2sdk1.5.0/bin/java com.sun.corba.se.internal.Activation.ServerTool \
-ORBInitialPort 10001 -cmd \
register -server Server -classpath classes

        server registered (serverid = 257).

/j2sdk1.5.0/bin/java -classpath classes Client -ORBInitialPort 10001
ORB initialized
Resolved HelloServant
Hello :)
Shut down ORBD when you have completed this example.
  • If using the Solaris, Linux, or Mac OS X operating system, type pkill orbd in the terminal window.
  • If using Microsoft Windows, enter Ctrl+C in the command prompt window.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Servant Activators

What is a Servant Activator?

When creating a new POA, the application developer may declare specific policy choices for the new POA and provide a different adapter activator and servant manager (these are callback objects used by the POA to activate POAs on demand and activate servants). Creating new POAs also allows the application developer to partition the name space of objects, as Object Ids are interpreted relative to a POA. Finally, by creating new POAs, the developer can independently control request processing for multiple sets of objects.

A Servant Activator is a type of Servant Manager. Servant Managers are optional. You would use a servant manager to allow the POA to activate servants on demand when a request for an inactive object is received. If your server loads all objects when it starts up, you do not need a servant manager.

A servant manager is a callback object that the application developer can associate with a POA. The ORB will invoke operations on servant managers to activate servants on demand, and to deactivate servants. Servant managers are responsible for managing the association of an object reference (as characterized by its Object Id value) with a particular servant, and for determining whether an object reference exists or not. Each servant manager type contains two operations, the first called to find and return a servant and the second to deactivate a servant. The operations differ according to the amount of information usable for their situation.

To use servant managers, the USE_SERVANT_MANAGER policy must be set. Once set, the type of servant manager used in a particular situation depends on other policies in the POA. The two types of servant managers are:

  • ServantActivator

    When the POA has the RETAIN policy, it uses servant managers that are ServantActivators. A ServantActivator always results in an entry in the Active Object Map. The servant is then used until it is deactivated. A servant can be deactivated by destroying the POA, the POA Manager, or the ORB, or by an explicit deactivate call.

    • This document includes an example that uses Servant Activators, see An Example Using Servant Activators.
  • ServantLocator

    When the POA has the NON_RETAIN policy, it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • For an example that uses Servant Locators see Using Servant Locators.

An Example Using Servant Activators

The following example code shows an application that uses Servant Activators to enable the POA to activate transient objects. This application builds on the "Hello World" example. The following files are included for your information:

  • Client.java
  • Server.java
  • Hello.idl
  • HelloImpl.java
  • Makefile
  • runSample

Client.java

import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;

public class Client {
    public Client(String[] args) {
        try {
            ORB orb = ORB.init(args, System.getProperties());
            NamingContext rootContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));

            // Resolves for remote object reference of HelloServer
            NameComponent name[] = {new NameComponent("HelloServer", "")};
            Hello helloRef = HelloHelper.narrow(rootContext.resolve(name));
            System.out.println("\nClient: Obtained the remote object " +
                               "reference");

            // Invokes the remote sayHello() method
            System.out.println("Client: Invoking the remote operation ...");
            System.out.println(helloRef.sayHello());
        } catch (Exception e) {
            System.err.println("\nClient: Caught exception - " + e);
            e.printStackTrace();
        }
    }

    public static void main(String [] args) {
        Client servantActivatorClient = new Client(args);
    }
}

Server.java

import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.CosNaming.*;

public class Server {
    public Server(String[] args) {
        try {
            ORB orb = ORB.init(args, System.getProperties());
            POA rootPoa = (POA) orb.resolve_initial_references("RootPOA");
            rootPoa.the_POAManager().activate();
            System.out.println("\nServer: Obtained from ORB and activated " +
                               "the " + rootPoa.the_name());

            Policy poaPolicy[] = new Policy[2];
            poaPolicy[0] = rootPoa.create_servant_retention_policy(
                ServantRetentionPolicyValue.RETAIN);
            poaPolicy[1] = rootPoa.create_request_processing_policy(
                RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
            System.out.println("Server: Set POA policy as RETAIN and " +
                               "USE_SERVANT_MANAGER");

            POA poa1 = rootPoa.create_POA("HelloPoa", null, poaPolicy);
            poa1.the_POAManager().activate();
            System.out.println("Server: Created and activated child POA " +
                               "\"" + poa1.the_name() + "\"");

            poa1.set_servant_manager(new PoaServantActivator());
            System.out.println("Server: Associated the servant manager of " +
                               "type servant activator with \"" +
                               poa1.the_name() + "\"");

            // This create_reference operation does not cause an activation,
            // the resulting object reference will be exported and passed to
            // client, so that subsequent requests on the reference will cause
            // the appropriate servant manager to be invoked
            org.omg.CORBA.Object objectRef = poa1.create_reference(
                HelloHelper.id());
            System.out.println("Server: Created a CORBA object reference " +
                               "from id \"" + HelloHelper.id() + "\"");

            NamingContext rootContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));
            NameComponent name[] = {new NameComponent("HelloServer", "")};
            rootContext.rebind(name, objectRef);
            System.out.println("Server: Exported the CORBA object reference " +
                               "to NameService");

            System.out.println("Server: Ready and waiting for requests ...");
            orb.run();
        } catch (Exception e) {
            System.err.println("\nServer: Caught exception - " + e);
            e.printStackTrace();
        }
    }

    public static void main(String [] args) {
        Server serverServantActivator = new Server(args) ;
    }
}

class PoaServantActivator extends LocalObject implements ServantActivator {
    // The incarnate operation is invoked by the POA whenever the POA receives
    // a request for an object that is not currently active, assuming the POA
    // has the RETAIN and USE_SERVANT_MANAGER policies
    public Servant incarnate(byte[] oid, POA adapter) throws ForwardRequest {
        try {
            HelloImpl servantObj = new HelloImpl();
            System.out.println("PoaServantActivator.incarnate(): Created \"" +
                               servantObj.getClass().getName() + "\" " +
                               "servant object for \"" + adapter.the_name() +
                               "\"");
            return servantObj;
        } catch (Exception e) {
            System.err.println("incarnate: Caught exception - " + e);
        }
        return null;
    }

    public void etherealize(byte[] oid, POA adapter, Servant serv,
                            boolean cleanup_in_progress,
                            boolean remaining_activations) {
    }
}

Hello.idl

interface Hello {
    string sayHello();
};

HelloImpl.java

public class HelloImpl extends HelloPOA {

    public String sayHello() {
        return "Hello :)";
    }

}

Makefile

IDLJ=${JAVA_HOME}/bin/idlj
JAVAC=${JAVA_HOME}/bin/javac
JAVA=${JAVA_HOME}/bin/java

CLASSFILES=./classes_dir
IDLJFLAGS=-fall -verbose -td ${CLASSFILES}
JFLAGS=-g -d $(CLASSFILES) -classpath $(CLASSFILES)
JAVAFLAGS=-cp $(CLASSFILES) -Dorg.omg.CORBA.ORBInitialHost=localhost \
          -Dorg.omg.CORBA.ORBInitialPort=1950
ORBD_FLAGS=-port 1949 -ORBInitialHost ${SERVER_HOSTNAME} \
           -ORBInitialPort 1950 -ORBDebug
ORBD=${JAVA_HOME}/bin/orbd $(ORBD_FLAGS) orbd

client = Client.java

server = HelloImpl.java \
         Server.java

all: clean build run

clean:
        @echo ""
        @echo "*** Clean up old files and directories ***"
        -$(RM) $(CLASSFILES)
        -$(RM) ./orb.db
        -$(RM) ./kill_started_processes.sh

build: stubs client_server

stubs: Hello.idl
        @echo ""
        @echo "*** Generate stubs and helpers ***"
        @-$(MKDIR) $(CLASSFILES)
        $(IDLJ) $(IDLJFLAGS) Hello.idl

client_server: $(client) $(server)
        @echo ""
        @echo "*** Compile client, server and implementation ***"
        $(JAVAC) $(JFLAGS) $(client) $(server)

run: run_orbd run_server run_client terminate_servers

run_orbd:
        @echo ""
        @echo "*** Start the orbd ***"
        $(ORBD) & \
        echo "kill -9 $$!" > ./kill_started_processes.sh; \
        if [ $(OS) = "WinNT" ] ; then \
            tpid=`ps -o pid,ppid,comm | grep $$! | grep -v "sh" | cut -c1-6` ; \
            echo "kill -9 $$tpid" >> ./kill_started_processes.sh ; \
        fi ; \
        $(SLEEP) $(SLEEP_LONG)

run_server: run_orbd
        @echo ""
        @echo "*** Start the Server ***"
        $(JAVA) $(JAVAFLAGS) Server & \
        echo "kill -9 $$!" >> ./kill_started_processes.sh; \
        if [ $(OS) = "WinNT" ] ; then \
        tpid=`ps -o pid,ppid,comm | grep $$! | grep -v "sh" | cut -c1-6` ; \
        echo "kill -9 $$tpid" >> ./kill_started_processes.sh ; \
        fi ; \
        $(SLEEP) $(SLEEP_NORMAL)

run_client:
        @echo ""
        @echo "*** Start the Client ***"
        $(JAVA) $(JAVAFLAGS) Client

terminate_servers:
        @echo ""
        @echo "*** Terminate the Server and orbd ***"
        @$(SLEEP) $(SLEEP_SHORT)
        @if [ -f ./kill_started_processes.sh ]; then \
                $(CHMOD) u+x ./kill_started_processes.sh; \
                ./kill_started_processes.sh; \
                $(SLEEP) $(SLEEP_SHORT) ; \
        fi

runSample

#!/bin/ksh

if [ `uname` = "OpenOS" ] ; then
    OS="Solaris_sparc"
    JAVA_HOME=/path_to_your_java_installation
    SEP=:
    SLEEP=/bin/sleep
    RM="/bin/rm -rf"
    CHMOD=/bin/chmod
    MKDIR=/bin/mkdir
    SLEEP_SHORT=2
    SLEEP_NORMAL=5
    SLEEP_LONG=7
elif [ `uname` = "Windows_NT" ] ; then
    OS="WinNT"
    if [ ! -d "y:/path_to_your_java_installation" ] ; then
        echo; echo "Please map drive y: to \\\\\your_Java_drive before runSample"
        exit 1
    fi
    JAVA_HOME="y:/path_to_your_java_installation"
    SEP=";"
    SLEEP=sleep
    RM="rm -rf"
    CHMOD=chmod
    MKDIR="mkdir -p"
    SLEEP_SHORT=5
    SLEEP_NORMAL=10
    SLEEP_LONG=15
fi

while [ $# -gt 0 ] ; do
   case $1 in
   -host ) SERVER_HOSTNAME=$2 ;
           shift;;
   * ) TARGET=$* ;
       break ;;
   esac
   shift
done

DEFAULT_HOSTNAME=localhost
SERVER_HOSTNAME=${HOSTNAME-$DEFAULT_HOSTNAME}

make ${TARGET} \
   "OS=${OS}" \
   "JAVA_HOME=${JAVA_HOME}" \
   "SERVER_HOSTNAME=${SERVER_HOSTNAME}" \
   "SLEEP=${SLEEP}" \
   "RM=${RM}" \
   "CHMOD=${CHMOD}" \
   "MKDIR=${MKDIR}" \
   "SLEEP_SHORT=${SLEEP_SHORT}" \
   "SLEEP_NORMAL=${SLEEP_NORMAL}" \
   "SLEEP_LONG=${SLEEP_LONG}"

Running the Example Servant Activator Example

To run this example,

  1. Create the files using the code shown above.
  2. Run the example as shown in runSample.

You will see output generated to the terminal window similar to that below:

*** Clean up old files and directories ***
/bin/rm -rf ./classes_dir
/bin/rm -rf ./orb.db
/bin/rm -rf ./kill_started_processes.sh

*** Generate stubs and helpers ***
/path_to_your_java_installation/bin/idlj -fall -verbose -td ./classes_dir Hello.idl
Parsing Hello.idl
done  - Hello.idl

Generating Hello
done   -   Hello

*** Compile client, server and implementation ***
/path_to_your_java_installation/bin/javac -g -d ./classes_dir -classpath
./classes_dir Client.java HelloImpl.java Server.java

*** Start the orbd ***
/path_to_your_java_installation/bin/orbd -port 1949 -ORBInitialHost localhost
-ORBInitialPort 1950 -ORBDebug orbd & \
echo "kill -9 $!" > ./kill_started_processes.sh; \
if [ Solaris_sparc = "WinNT" ] ; then \
    tpid=`ps -o pid,ppid,comm | grep $! | grep -v "sh" | cut -c1-6` ; \
    echo "kill -9 $tpid" >> ./kill_started_processes.sh ; \
fi ; \
/bin/sleep 7
ORBD begins initialization.
ORBD is ready.
ORBD serverid: 1
activation dbdir: /path_to_your_sample_file/ServantActivator/./orb.db
activation port: 1949
activation Server Polling Time: 1000 milli-seconds
activation Server Startup Delay: 1000 milli-seconds

*** Start the Server ***
/path_to_your_java_installation/bin/java -cp ./classes_dir
-Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBInitialPort=1950 Server & \
echo "kill -9 $!" >> ./kill_started_processes.sh; \
if [ Solaris_sparc = "WinNT" ] ; then \
tpid=`ps -o pid,ppid,comm | grep $! | grep -v "sh" | cut -c1-6` ; \
echo "kill -9 $tpid" >> ./kill_started_processes.sh ; \
fi ; \
/bin/sleep 5

Server: Obtained from ORB and activated the RootPOA
Server: Set POA policy as RETAIN and USE_SERVANT_MANAGER
Server: Created and activated child POA "HelloPoa"
Server: Associated the servant manager of type servant activator with "HelloPoa"
Server: Created a CORBA object reference from id "IDL:Hello:1.0"
Server: Exported the CORBA object reference to NameService
Server: Ready and waiting for requests ...

*** Start the Client ***
/path_to_your_java_installation/bin/java -cp ./classes_dir
-Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBInitialPort=1950 Client

Client: Obtained the remote object reference
Client: Invoking the remote operation ...
PoaServantActivator.incarnate(): Created "HelloImpl" servant object for "HelloPoa"
Hello :)

*** Terminate the Server and orbd ***

Further Information

For more information on Servant Activators, see the section on Servant Managers, in section 11.3.4 of the CORBA 2.3.1 Specification.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Servant Locators

What is a Servant Locator?

When creating a new POA, the application developer may declare specific policy choices for the new POA and provide a different adapter activator and servant manager (these are callback objects used by the POA to activate POAs on demand and activate servants). Creating new POAs also allows the application developer to partition the name space of objects, as Object Ids are interpreted relative to a POA. Finally, by creating new POAs, the developer can independently control request processing for multiple sets of objects.

A Servant Activator is a type of Servant Manager. Servant Managers are optional. You would use a servant manager to allow the POA to activate servants on demand when a request for an inactive object is received. If your server loads all objects when it starts up, you do not need a servant manager.

A servant manager is a callback object that the application developer can associate with a POA. The ORB will invoke operations on servant managers to activate servants on demand, and to deactivate servants. Servant managers are responsible for managing the association of an object reference (as characterized by its Object Id value) with a particular servant, and for determining whether an object reference exists or not. Each servant manager type contains two operations, the first called to find and return a servant and the second to deactivate a servant. The operations differ according to the amount of information usable for their situation.

To use servant managers, the USE_SERVANT_MANAGER policy must be set. Once set, the type of servant manager used in a particular situation depends on other policies in the POA. The two types of servant managers are:

  • ServantActivator

    When the POA has the RETAIN policy, it uses servant managers that are ServantActivators. A ServantActivator always results in an entry in the Active Object Map. The servant is then used until it is deactivated. A servant can be deactivated by destroying the POA, the POA Manager, or the ORB, or by an explicit deactivate call.

    • For an example that uses Servant Activators, see Using Servant Activators.
  • ServantLocator

    When the POA has the NON_RETAIN policy, it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.

    • This document includes an example that uses Servant Locators, see An Example Using Servant Locators.

An Example Using Servant Locators

The following example code shows an application that uses Servant Locators to enable the POA to activate transient objects. This application builds on the "Hello World" example. The following files are included for your information:

  • Client.java
  • Server.java
  • Hello.idl
  • HelloImpl.java
  • Makefile
  • runSample

Client.java

import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;

public class Client {
    public Client(String[] args) {
        try {
            ORB orb = ORB.init(args, System.getProperties());
            NamingContext rootContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));

            // Resolves for remote object reference of HelloServer
            NameComponent name[] = {new NameComponent("HelloServer", "")};
            Hello helloRef = HelloHelper.narrow(rootContext.resolve(name));
            System.out.println("\nClient: Obtained the remote object " +
                               "reference");

            // Invokes the remote sayHello() method
            System.out.println("Client: Invoking the remote operation ...");
            System.out.println(helloRef.sayHello());
        } catch (Exception e) {
            System.err.println("\nClient: Caught exception - " + e);
            e.printStackTrace();
        }
    }

    public static void main(String [] args) {
        Client servantLocatorClient = new Client(args);
    }
}

Server.java

import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.ServantLocatorPackage.*;
import org.omg.CosNaming.*;

public class Server {
    public Server(String[] args) {
        try {
            ORB orb = ORB.init(args, System.getProperties());
            POA rootPoa = (POA) orb.resolve_initial_references("RootPOA");
            rootPoa.the_POAManager().activate();
            System.out.println("\nServer: Obtained from ORB and activated " +
                               "the " + rootPoa.the_name());

            Policy poaPolicy[] = new Policy[2];
            poaPolicy[0] = rootPoa.create_servant_retention_policy(
                ServantRetentionPolicyValue.NON_RETAIN);
            poaPolicy[1] = rootPoa.create_request_processing_policy(
                RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
            System.out.println("Server: Set POA policy as NON_RETAIN and " +
                               "USE_SERVANT_MANAGER");

            POA poa1 = rootPoa.create_POA("HelloPoa", null, poaPolicy);
            poa1.the_POAManager().activate();
            System.out.println("Server: Created and activated child POA " +
                               "\"" + poa1.the_name() + "\"");

            poa1.set_servant_manager(new PoaServantLocator());
            System.out.println("Server: Associated the servant manager of " +
                               "type servant locator with \"" +
                               poa1.the_name() + "\"");

            // This create_reference operation does not cause an activation,
            // the resulting object reference will be exported and passed to
            // client, so that subsequent requests on the reference will cause
            // the appropriate servant manager to be invoked
            org.omg.CORBA.Object objectRef = poa1.create_reference(
                HelloHelper.id());
            System.out.println("Server: Created a CORBA object reference " +
                               "from id \"" + HelloHelper.id() + "\"");

            NamingContext rootContext = NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));
            NameComponent name[] = {new NameComponent("HelloServer", "")};
            rootContext.rebind(name, objectRef);
            System.out.println("Server: Exported the CORBA object reference " +
                               "to NameService");

            System.out.println("Server: Ready and waiting for requests ...");
            orb.run();
        } catch (Exception e) {
            System.err.println("\nServer: Caught exception - " + e);
            e.printStackTrace();
        }
    }

    public static void main(String [] args) {
        Server serverServantLocator = new Server(args) ;
    }
}

class PoaServantLocator extends LocalObject implements ServantLocator {
    public Servant preinvoke(byte[] oid, POA adapter,
                             String operation,
                             CookieHolder the_cookie) throws ForwardRequest {
        try {
            HelloImpl servantObj = new HelloImpl();
            System.out.println("PoaServantLocator.preinvoke(): Created \"" +
                               servantObj.getClass().getName() + "\" " +
                               "servant object for \"" + adapter.the_name() +
                               "\"");
            return servantObj;
        } catch (Exception e) {
            System.err.println("preinvoke: Caught exception - " + e);
        }
        return null;
    }

    public void postinvoke(byte[] oid, POA adapter,
                           String operation,
                           java.lang.Object the_cookie,
                           Servant the_servant) {
        try {
            System.out.println("PoaServantLocator.postinvoke(): For \"" +
                               adapter.the_name() + "\" adapter of servant " +
                               "object type \"" +
                               the_servant.getClass().getName() + "\"");
        } catch (Exception e) {
            System.err.println("postinvoke: Caught exception - " + e);
        }
    }
}

Hello.idl

interface Hello {
    string sayHello();
};

HelloImpl.java

public class HelloImpl extends HelloPOA {

    public String sayHello() {
        return "Hello :)";
    }

}

Makefile

IDLJ=${JAVA_HOME}/bin/idlj
JAVAC=${JAVA_HOME}/bin/javac
JAVA=${JAVA_HOME}/bin/java

CLASSFILES=./classes_dir
IDLJFLAGS=-fall -verbose -td ${CLASSFILES}
JFLAGS=-g -d $(CLASSFILES) -classpath $(CLASSFILES)
JAVAFLAGS=-cp $(CLASSFILES) -Dorg.omg.CORBA.ORBInitialHost=localhost \
          -Dorg.omg.CORBA.ORBInitialPort=1950
ORBD_FLAGS=-port 1949 -ORBInitialHost ${SERVER_HOSTNAME} \
           -ORBInitialPort 1950 -ORBDebug
ORBD=${JAVA_HOME}/bin/orbd $(ORBD_FLAGS) orbd

client = Client.java

server = HelloImpl.java \
         Server.java

all: clean build run

clean:
        @echo ""
        @echo "*** Clean up old files and directories ***"
        -$(RM) $(CLASSFILES)
        -$(RM) ./orb.db
        -$(RM) ./kill_started_processes.sh

build: stubs client_server

stubs: Hello.idl
        @echo ""
        @echo "*** Generate stubs and helpers ***"
        @-$(MKDIR) $(CLASSFILES)
        $(IDLJ) $(IDLJFLAGS) Hello.idl

client_server: $(client) $(server)
        @echo ""
        @echo "*** Compile client, server and implementation ***"
        $(JAVAC) $(JFLAGS) $(client) $(server)

run: run_orbd run_server run_client terminate_servers

run_orbd:
        @echo ""
        @echo "*** Start the orbd ***"
        $(ORBD) & \
        echo "kill -9 $$!" > ./kill_started_processes.sh; \
        if [ $(OS) = "WinNT" ] ; then \
            tpid=`ps -o pid,ppid,comm | grep $$! | grep -v "sh" | cut -c1-6` ; \
            echo "kill -9 $$tpid" >> ./kill_started_processes.sh ; \
        fi ; \
        $(SLEEP) $(SLEEP_LONG)

run_server: run_orbd
        @echo ""
        @echo "*** Start the Server ***"
        $(JAVA) $(JAVAFLAGS) Server & \
        echo "kill -9 $$!" >> ./kill_started_processes.sh; \
        if [ $(OS) = "WinNT" ] ; then \
        tpid=`ps -o pid,ppid,comm | grep $$! | grep -v "sh" | cut -c1-6` ; \
        echo "kill -9 $$tpid" >> ./kill_started_processes.sh ; \
        fi ; \
        $(SLEEP) $(SLEEP_NORMAL)

run_client:
        @echo ""
        @echo "*** Start the Client ***"
        $(JAVA) $(JAVAFLAGS) Client

terminate_servers:
        @echo ""
        @echo "*** Terminate the Server and orbd ***"
        @$(SLEEP) $(SLEEP_SHORT)
        @if [ -f ./kill_started_processes.sh ]; then \
                $(CHMOD) u+x ./kill_started_processes.sh; \
                ./kill_started_processes.sh; \
                $(SLEEP) $(SLEEP_SHORT) ; \
        fi

runSample

#!/bin/ksh

if [ `uname` = "OpenOS" ] ; then
    OS="Solaris_sparc"
    JAVA_HOME=/path_to_your_java_installation
    SEP=:
    SLEEP=/bin/sleep
    RM="/bin/rm -rf"
    CHMOD=/bin/chmod
    MKDIR=/bin/mkdir
    SLEEP_SHORT=2
    SLEEP_NORMAL=5
    SLEEP_LONG=7
elif [ `uname` = "Windows_NT" ] ; then
    OS="WinNT"
    if [ ! -d "y:/path_to_your_java_installation" ] ; then
        echo; echo "Please map drive y: to \\\\\path_to_your_java_installation before
runSample"
        exit 1
    fi
    JAVA_HOME="y:/path_to_your_java_installation"
    SEP=";"
    SLEEP=sleep
    RM="rm -rf"
    CHMOD=chmod
    MKDIR="mkdir -p"
    SLEEP_SHORT=5
    SLEEP_NORMAL=10
    SLEEP_LONG=15
fi

while [ $# -gt 0 ] ; do
   case $1 in
   -host ) SERVER_HOSTNAME=$2 ;
           shift;;
   * ) TARGET=$* ;
       break ;;
   esac
   shift
done

DEFAULT_HOSTNAME=localhost
SERVER_HOSTNAME=${HOSTNAME-$DEFAULT_HOSTNAME}

make ${TARGET} \
   "OS=${OS}" \
   "JAVA_HOME=${JAVA_HOME}" \
   "SERVER_HOSTNAME=${SERVER_HOSTNAME}" \
   "SLEEP=${SLEEP}" \
   "RM=${RM}" \
   "CHMOD=${CHMOD}" \
   "MKDIR=${MKDIR}" \
   "SLEEP_SHORT=${SLEEP_SHORT}" \
   "SLEEP_NORMAL=${SLEEP_NORMAL}" \
   "SLEEP_LONG=${SLEEP_LONG}"

Running the Example Servant Activator Example

To run this example,

  1. Create the files using the code shown above.
  2. Run the example as shown in runSample.

You will see output generated to the terminal window similar to that below:

*** Clean up old files and directories ***
/bin/rm -rf ./classes_dir
/bin/rm -rf ./orb.db
/bin/rm -rf ./kill_started_processes.sh

*** Generate stubs and helpers ***
/path_to_your_java_installation/bin/idlj -fall -verbose -td ./classes_dir Hello.idl
Parsing Hello.idl
done  - Hello.idl

Generating Hello
done   -   Hello

*** Compile client, server and implementation ***
/path_to_your_java_installation/bin/javac -g -d ./classes_dir -classpath ./classes_dir
Client.java HelloImpl.java Server.java

*** Start the orbd ***
/path_to_your_java_installation/bin/orbd -port 1949 -ORBInitialHost localhost -ORBInitialPort
1950 -ORBDebug orbd & \
echo "kill -9 $!" > ./kill_started_processes.sh; \
if [ Solaris_sparc = "WinNT" ] ; then \
    tpid=`ps -o pid,ppid,comm | grep $! | grep -v "sh" | cut -c1-6` ; \
    echo "kill -9 $tpid" >> ./kill_started_processes.sh ; \
fi ; \
/bin/sleep 7
ORBD begins initialization.
ORBD is ready.
ORBD serverid: 1
activation dbdir: /home/dcarson1/samples/POA_samples/ServantLocator/./orb.db
activation port: 1949
activation Server Polling Time: 1000 milli-seconds
activation Server Startup Delay: 1000 milli-seconds

*** Start the Server ***
/path_to_your_java_installation/bin/java -cp ./classes_dir
-Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBInitialPort=1950 Server & \
echo "kill -9 $!" >> ./kill_started_processes.sh; \
if [ Solaris_sparc = "WinNT" ] ; then \
tpid=`ps -o pid,ppid,comm | grep $! | grep -v "sh" | cut -c1-6` ; \
echo "kill -9 $tpid" >> ./kill_started_processes.sh ; \
fi ; \
/bin/sleep 5

Server: Obtained from ORB and activated the RootPOA
Server: Set POA policy as NON_RETAIN and USE_SERVANT_MANAGER
Server: Created and activated child POA "HelloPoa"
Server: Associated the servant manager of type servant locator with "HelloPoa"
Server: Created a CORBA object reference from id "IDL:Hello:1.0"
Server: Exported the CORBA object reference to NameService
Server: Ready and waiting for requests ...

*** Start the Client ***
/path_to_your_java_installation/bin/java -cp ./classes_dir
-Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBInitialPort=1950 Client

Client: Obtained the remote object reference
Client: Invoking the remote operation ...
PoaServantLocator.preinvoke(): Created "HelloImpl" servant object for "HelloPoa"
PoaServantLocator.postinvoke(): For "HelloPoa" adapter of servant object type "HelloImpl"
Hello :)

*** Terminate the Server and orbd ***

Further Information

For more information on Servant Locators, see the section on Servant Managers in section 11.3.4 of the CORBA 2.3.1 Specification.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Mapping IDL to Java

Documentation Contents

Java IDL: IDL to Java Language Mapping

The package includes idlj, a compiler that reads an Object Management Group (OMG) Interface Definition Language (IDL) file and translates it, or maps it, to a Java interface. Depending on the command-line options used, the idlj compiler creates stub, skeleton, helper, holder, and other files as necessary. These .java files are generated from the IDL file according to the mapping specified in the OMG document (pdf format) OMG IDL to Java Language Mapping Specification, ptc, 00-01-08, with the revisions indicated in ptc/00-11-03, The new IDL to Java Mapping Chapter. Version 00-01-08 of the IDL to Java language mapping is aligned with CORBA version 2.3.2. For a basic summary of the IDL to Java mapping, see IDL to Java Language Mapping Overview below.

  • The CORBA technology shipped in J2SE 5.0 conforms to the mappings specified by the following document: Official Specifications for CORBA support in J2SE 5.0.

Some topics from the OMG IDL to Java Language Mapping specification that are not easily summarized are:

  • Section 1.13, Mapping for Value Type
  • Section 1.14, Value Box Types
  • Section 1.20, Server-Side Mapping
  • Section 1.21, Java ORB Portability Interfaces

IDL to Java Language Mapping Overview

CORBA objects are defined in OMG IDL (Object Management Group Interface Definition Language). The syntax and semantics of OMG IDL are defined in Chapter 3 of the CORBA/IIOP 2.3.1 Specification. The IDL-to-Java compiler, idlj, maps the IDL-defined interfaces to Java classes and interfaces as defined in OMG IDL to Java Language Mapping Specification, ptc, 00-01-08, and as supported in this version of the Java platform, as described in Official Specifications for CORBA support in J2SE 5.0.

This overview shows the correspondence between OMG IDL types and Java types. Note that OMG IDL, as its name implies, defines interfaces. Like Java interfaces, IDL interfaces contain no implementations for their operations (methods in Java). In other words, IDL interfaces define only the signature for an operation (the name of the operation, the data type of its return value, the data types of the parameters that it takes, and any exceptions that it raises). The implementations for these operations need to be supplied in Java classes written by a Java programmer.

The following table lists the main constructs of IDL and the corresponding constructs in Java.

IDL Type | Java Type
module | package
boolean | boolean
char, wchar | char
octet | byte
string, wstring | java.lang.String
short, unsigned short | short
long, unsigned long | int
long long, unsigned long long | long
float | float
double | double
fixed | java.math.BigDecimal
enum, struct, union | class
sequence, array | array
interface (non-abstract) | signature interface and an operations interface, helper class, holder class
interface (abstract) | signature interface, helper class, holder class
constant (not within an interface) | public interface
constant (within an interface) | fields in the Java signature interface for non-abstract, or the sole Java interface for abstract
exception | class
Any | org.omg.CORBA.Any
type declarations nested within interfaces | "scoped" package
typedef | helper classes
pseudo objects | pseudo interface
readonly attribute | accessor method
readwrite attribute | accessor and modifer methods
operation | method
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Developing a Client Application

Documentation Contents

Getting Started with Java IDL: Developing a Client Application

This topic introduces the basics of writing a CORBA client application. Included in this lesson are:

  1. Creating HelloClient.java
  2. Understanding HelloClient.java
  3. Compiling HelloClient.java

Creating HelloClient.java

To create HelloClient.java,

  1. Start your text editor and create a file named HelloClient.java in your main project directory, Hello.
  2. Enter the following code for HelloClient.java in the text file. The following section, Understanding HelloClient.java, explains each line of code in some detail.

    HelloClient.java

    // Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

public class HelloClient
{
  static Hello helloImpl;

  public static void main(String args[])
    {
      try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // get the root naming context
        org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");
        // Use NamingContextExt instead of NamingContext. This is
        // part of the Interoperable naming Service.
        NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

        // resolve the Object Reference in Naming
        String name = "Hello";
        helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));

        System.out.println("Obtained a handle on server object: " + helloImpl);
        System.out.println(helloImpl.sayHello());
        helloImpl.shutdown();

        } catch (Exception e) {
          System.out.println("ERROR : " + e) ;
          e.printStackTrace(System.out);
          }
    }

}

  3. Save and close HelloClient.java.

Understanding HelloClient.java

This section explains each line of HelloClient.java, describing what the code does, as well as why it is needed for this application.

Performing Basic Setup

The basic shell of a CORBA client is the same as many Java applications: You import required library packages, declare the application class, define a main method, and handle exceptions.

Importing Required Packages

First, we import the packages required for the client class:

import HelloApp.*; // the package containing our stubs
import org.omg.CosNaming.*; // HelloClient will use the Naming Service
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*; // All CORBA applications need these classes

Declaring the Client Class

The next step is to declare the client class:

public class HelloClient
{
  // The main() method goes here.
}

Defining a main() Method

Every Java application needs a main() method. It is declared within the scope of the HelloClient class, as follows:

  public static void main(String args[])
  {
    // The try-catch block goes here.
  }

Handling CORBA System Exceptions

Because all CORBA programs can throw CORBA system exceptions at runtime, all of the main() functionality is placed within a try-catch block. CORBA programs throw system exceptions whenever trouble occurs during any of the processes (marshaling, unmarshaling, upcall) involved in invocation.

Our exception handler simply prints the name of the exception and its stack trace to standard output so you can see what kind of thing has gone wrong.

The try-catch block is set up inside main(),

    try{

      // Add the rest of the HelloClient code here.

    } catch(Exception e) {
        System.out.println("ERROR : " + e);
        e.printStackTrace(System.out);
      }

Creating an ORB Object

A CORBA client needs a local ORB object to perform all of its marshaling and IIOP work. Every client instantiates an org.omg.CORBA.ORB object and initializes it by passing to the object certain information about itself.

The ORB variable is declared and initialized inside the try-catch block.

        ORB orb = ORB.init(args, null);

The call to the ORB's init() method passes in your application's command line arguments, allowing you to set certain properties at runtime.

Finding the Hello Server

Now that the application has an ORB, it can ask the ORB to locate the actual service it needs, in this case the Hello server. There are a number of ways for a CORBA client to get an initial object reference; our client application will use the COS Naming Service specified by OMG and provided with Java IDL. See Using Stringified Object References for information on how to get an initial object reference when there is no naming service available.

The two options for Naming Services are orbd (Solaris, Linux, or Mac OS X or Windows), which is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager, and tnameserv, a transient naming service. This example uses orbd.

Obtaining the Initial Naming Context

The first step in using the naming service is to get the initial naming context. In the try-catch block, below your ORB initialization, you call orb.resolve_initial_references() to get an object reference to the name server:

        org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");

The string "NameService" is defined for all CORBA ORBs. When you pass in that string, the ORB returns the initial naming context, an object reference to the name service. The string "NameService" indicates:

  • The persistent naming service will be used when using ORBD as the naming service.
  • The transient naming service will be used when using tnameserv as the naming service.

The string "TNameService" indicates that the transient naming service will be used when ORBD is the naming service. In this example, we are using the persistent naming service that is a part of orbd.

Narrowing the Object Reference

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContextExt object, you must narrow it to its proper type.

        NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

Here we see the use of an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContextExt and you can use it to access the naming service and find other services. You will do that in the next step.

The NamingContextExt object is new to J2SE v.1.4, and is part of the Interoperable Naming Service.

Resolve the Object Reference in Naming

To publish a reference in the Naming Service to the Hello object implementing the Hello interface, you first need an identifying string for the Hello object.

      String name = "Hello";

Finally, we pass name to the naming service's resolve_str() method to get an object reference to the Hello server and narrow it to a Hello object:

        helloImpl = HelloHelper.narrow(ncRef.resolve-str(name));
        System.out.println("Obtained a handle on server object: " + helloImpl);

Here you see the HelloHelper helper class at work. The resolve-str() method returns a generic CORBA object as you saw above when locating the name service itself. Therefore, you immediately narrow it to a Hello object, which is the object reference you need to perform the rest of your work. Then, you send a message to the screen confirming that the object reference has been obtained.

Invoking the sayHello() Operation

CORBA invocations look like a method call on a local object. The complications of marshaling parameters to the wire, routing them to the server-side ORB, unmarshaling, and placing the upcall to the server method are completely transparent to the client programmer. Because so much is done for you by generated code, invocation is really the easiest part of CORBA programming.

Finally, we print the results of the invocation to standard output and explicitly shutdown the ORB:

        System.out.println(helloImpl.sayHello());
        helloImpl.shutdown();

Compiling HelloClient.java

Now we will compile HelloClient.java so that we can correct any errors before continuing with this tutorial.

Windows users note that you should substitute backslashes (\) for the slashes (/) in all paths in this document.

To compile HelloClient.java,

  1. Change to the Hello directory.
  2. Run the Java compiler on HelloClient.java:
    javac HelloClient.java HelloApp/*.java
  3. Correct any errors in your file and recompile if necessary.
  4. The HelloClient.class is generated to the Hello directory.

Running the Client Application

Running the Hello World application is covered in Running the Hello World Application.

For More Information

Developing Clients
Covers topics of interest to CORBA client programmers
Exceptions: System Exceptions
Explains how CORBA system exceptions work and provides details on the minor codes of Java IDL's system exceptions
Naming Service
Covers the COS Naming Service in greater detail
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Developing the Hello World Server

Documentation Contents

Getting Started with Java IDL:
Developing the Hello World Server

The example server consists of two classes, the servant and the server. The servant, HelloImpl, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloImpl instance. The servant is a subclass of HelloPOA, which is generated by the idlj compiler from the example IDL.

The servant contains one method for each IDL operation, in this example, the sayHello() and shutdown() methods. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the skeleton.

The server class has the server's main() method, which:

  • Creates and initializes an ORB instance
  • Gets a reference to the root POA and activates the POAManager
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Gets a CORBA object reference for a naming context in which to register the new CORBA object
  • Gets the root naming context
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object from the client

This lesson introduces the basics of writing a CORBA server. For an example of the "Hello World" program with a persistent object server, see Example 2: Hello World with Persistent State. For more discussion of CORBA servers, see Developing Servers.

The steps in this lesson cover:

  1. Creating HelloServer.java
  2. Understanding HelloServer.java
  3. Compiling the Hello World Server

Creating HelloServer.java

To create HelloServer.java,

  1. Start your text editor and create a file named HelloServer.java in your main project directory, Hello.
  2. Enter the following code for HelloServer.java in the text file. The following section, Understanding HelloServer.java, explains each line of code in some detail.
    // HelloServer.java
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA {
  private ORB orb;

  public void setORB(ORB orb_val) {
    orb = orb_val;
  }

  // implement sayHello() method
  public String sayHello() {
    return "\nHello world !!\n";
  }

  // implement shutdown() method
  public void shutdown() {
    orb.shutdown(false);
  }
}

public class HelloServer {

  public static void main(String args[]) {
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get reference to rootpoa and activate the POAManager
      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      // create servant and register it with the ORB
      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb);

      // get object reference from the servant
      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
      Hello href = HelloHelper.narrow(ref);

      // get the root naming context
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");
      // Use NamingContextExt which is part of the Interoperable
      // Naming Service (INS) specification.
      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      // bind the Object Reference in Naming
      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      // wait for invocations from clients
      orb.run();
    }

      catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }

      System.out.println("HelloServer Exiting ...");

  }
}

  3. Save and close HelloServer.java.

Understanding HelloServer.java

This section explains each line of HelloServer.java, describing what the code does, as well as why it is needed for this application.

Performing Basic Setup

The structure of a CORBA server program is the same as most Java applications: You import required library packages, declare the server class, define a main() method, and handle exceptions.

Importing Required Packages

First, we import the packages required for the server class:

// The package containing our stubs
import HelloApp.*;

// HelloServer will use the naming service
import org.omg.CosNaming.*;

// The package containing special exceptions thrown by the name service
import org.omg.CosNaming.NamingContextPackage.*;

// All CORBA applications need these classes
import org.omg.CORBA.*;

// Classes needed for the Portable Server Inheritance Model
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

// Properties to initiate the ORB
import java.util.Properties;

Defining the Servant Class

In this example, we are defining the class for the servant object within HelloServer.java, but outside the HelloServer class.

class HelloImpl extends HelloPOA
{
  // The sayHello() and shutdown() methods go here.
}

The servant is a subclass of HelloPOA so that it inherits the general CORBA functionality generated for it by the compiler.

First, we create a private variable, orb that is used in the setORB(ORB) method. The setORB method is a private method defined by the application developer so that they can set the ORB value with the servant. This ORB value is used to invoke shutdown() on that specific ORB in response to the shutdown() method invocation from the client.

  private ORB orb;

  public void setORB(ORB orb_val) {
    orb = orb_val;
  }

Next, we declare and implement the required sayHello() method:

  public String sayHello()
  {
    return "\nHello world!!\n";
  }

And last of all, we implement the shutdown() method in a similar way. The shutdown() method calls the org.omg.CORBA.ORB.shutdown(boolean) method for the ORB. The shutdown(false) operation indicate that the ORB should shut down immediately, without waiting for processing to complete.

  public void shutdown() {
    orb.shutdown(false);
  }

Declaring the Server Class

The next step is to declare the server class:

public class HelloServer
{
  // The main() method goes here.
}

Defining the main() Method

Every Java application needs a main method. It is declared within the scope of the HelloServer class:

  public static void main(String args[])
  {
    // The try-catch block goes here.
  }

Handling CORBA System Exceptions

Because all CORBA programs can throw CORBA system exceptions at runtime, all of the main() functionality is placed within a try-catch block. CORBA programs throw runtime exceptions whenever trouble occurs during any of the processes (marshaling, unmarshaling, upcall) involved in invocation. The exception handler simply prints the exception and its stack trace to standard output so you can see what kind of thing has gone wrong.

The try-catch block is set up inside main(), as shown:

    try{

      // The rest of the HelloServer code goes here.

    } catch(Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }

Creating and Initializing an ORB Object

A CORBA server needs a local ORB object, as does the CORBA client. Every server instantiates an ORB and registers its servant objects so that the ORB can find the server when it receives an invocation for it.

The ORB variable is declared and initialized inside the try-catch block.

      ORB orb = ORB.init(args, null);

The call to the ORB's init() method passes in the server's command line arguments, allowing you to set certain properties at runtime.

Get a Reference to the Root POA and Activate the POAManager

The ORB obtains the initial object references to services such as the Name Service using the method resolve_initial_references.

The reference to the root POA is retrieved and the POAManager is activated from within the try-catch block.

      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

The activate() operation changes the state of the POA manager to active, causing associated POAs to start processing requests. The POA manager encapsulates the processing state of the POAs with which it is associated. Each POA object has an associated POAManager object. A POA manager may be associated with one or more POA objects.

Managing the Servant Object

A server is a process that instantiates one or more servant objects. The servant inherits from the interface generated by idlj and actually performs the work of the operations on that interface. Our HelloServer needs a HelloImpl.

Instantiating the Servant Object

We instantiate the servant object inside the try-catch block, just after activating the POA manager, as shown:

      HelloImpl helloImpl = new HelloImpl();

The section of code describing the servant class was explained previously.

In the next line of code, setORB(orb) is defined on the servant so that ORB.shutdown() can be called as part of the shutdown operation. This step is required because of the shutdown() method defined in Hello.idl.

      helloImpl.setORB(orb);

There are other options for implementing the shutdown operation. In this example, the shutdown() method called on the Object takes care of shutting down an ORB. In another implementation, the shutdown method implementation could have simply set a flag, which the server could have checked and called shutdown().

The next set of code is used to get the object reference associated with the servant. The narrow() method is required to cast CORBA object references to their proper types.

      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
      Hello href = HelloHelper.narrow(ref);

Working with COS Naming

The HelloServer works with the Common Object Services (COS) Naming Service to make the servant object's operations available to clients. The server needs an object reference to the naming service so that it can publish the references to the objects implementing various interfaces. These object references are used by the clients for invoking methods. Another way a servant can make the objects available to clients for invocations is by stringifying the object references to a file.

The two options for Naming Services are:

  • orbd (Solaris, Linux, or Mac OS X or Windows), which includes both a Transient Naming Service and a Persistent Naming Service, in addition to a Server Manager.
  • tnameserv (Solaris, Linux, or Mac OS X or Windows) - a Transient Naming Service.

This example uses orbd.

Obtaining the Initial Naming Context

In the try-catch block, below getting the object reference for the servant, we call orb.resolve_initial_references() to get an object reference to the name server:

      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");

The string "NameService" is defined for all CORBA ORBs. When you pass in that string, the ORB returns a naming context object that is an object reference for the name service. The string "NameService" indicates:

  • The naming service will be persistent when using ORBD's naming service, as we do in this example.
  • The naming service will be transient when using tnameserv.

The proprietary string "TNameService" indicates that the naming service will be transient when using ORBD's naming service.

Narrowing the Object Reference

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContextExt object, you must narrow it to its proper type. The call to narrow() is just below the previous statement:

      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

Here you see the use of an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContextExt and you can use it to access the naming service and register the server, as shown in the next topic.

The NamingContextExt object is part of the Interoperable Naming Service specification.

Registering the Servant with the Name Server

Just below the call to narrow(), we create a new NameComponent array. Because the path to Hello has a single element, we create the single-element array that NamingContext.resolve requires for its work:

      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );

Finally, we pass path and the servant object to the naming service, binding the servant object to the "Hello" id:

      ncRef.rebind(path, href);

Now, when the client calls resolve("Hello") on the initial naming context, the naming service returns an object reference to the Hello servant.

Waiting for Invocation

The previous sections describe the code that makes the server ready; the next section explains the code that enables it to simply wait around for a client to request its service. The following code, which is at the end of (but within) the try-catch block, shows how to accomplish this.

      orb.run();

When called by the main thread, ORB.run() enables the ORB to perform work using the main thread, waiting until an invocation comes from the ORB. Because of its placement in main(), after an invocation completes and sayHello() returns, the server will wait again. This is the reason that the HelloClient explicitly shuts down the ORB after completing its task.

Compiling the Hello World Server

Now we will compile the HelloServer.java so that we can correct any errors before continuing with this tutorial.

Windows users note that you should substitute backslashes (\) for the slashes (/) in all paths in this document.

To compile HelloServer.java,

  1. Change to the Hello directory.
  2. Run the Java compiler on HelloServer.java:
    javac HelloServer.java HelloApp/*.java
  3. Correct any errors in your file and recompile if necessary.
  4. The files HelloServer.class and HelloImpl.class are generated in the Hello directory.

Running the Hello World Server

Running the Hello World Application discusses running HelloServer and the rest of the application.

Understanding The Server-Side Implementation Models

CORBA supports at least two different server-side mappings for implementing an IDL interface:

  • The Inheritance Model

    Using the Inheritance Model, you implement the IDL interface using an implementation class that also extends the compiler-generated skeleton.

    Inheritance models include:

    • The OMG-standard, POA. Given an interface My defined in My.idl, the file MyPOA.java is generated by the idlj compiler. You must provide the implementation for My and it must inherit from MyPOA, a stream-based skeleton that extends org.omg.PortableServer.Servant, which serves as the base class for all POA servant implementations.

      The default server-side mapping generated when either the -fall or -fserver arguments are used conform to Chapter 11, Portable Object Adapter (POA) of the CORBA 2.3.1 Specification (formal/99-10-07). For more information on the POA, see Portable Object Adapter.

      The advantages of using the Portable Object Adaptor (POA) are:

      • Allow programmers to construct object implementations that are portable between different ORB products.
      • Provide support for objects with persistent identities.
      • Provide support for transparent activation of objects.
      • Allow a single servant to support multiple object identities simultaneously.
    • ImplBase. Given an interface My defined in My.idl, the file _MyImplBase.java is generated. You must provide the implementation for My and it must inherit from _MyImplBase.

      NOTE: ImplBase is obsoleted in favor of the POA model, but is provided to allow compatibility with servers written in J2SE 1.3 and prior. We do not recommend creating new servers using this nonstandard model.

  • The Delegation Model

    Using the Delegation Model, you implement the IDL interface using two classes:

    • An IDL-generated Tie class that inherits from the compiler-generated skeleton, but delegates all calls to an implementation class.
    • A class that implements the IDL-generated operations interface (such as HelloOperations), which defines the IDL function.

    The Delegation model is also known as the Tie model, or the Tie Delegation model. It inherits from either the POA or ImplBase compiler-generated skeleton, so the models will be described as POA/Tie or ImplBase/Tie models in this document.

This tutorial presents the POA Inheritance model for server-side implementation. For tutorials using the other server-side implementations, see the following documents:

  • Java IDL: The "Hello World" Example with the POA/Tie Server-Side Model

    You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method.

  • Java IDL: The "Hello World" Example with the ImplBase Server-Side Model

    The ImplBase server-side model is an Inheritance Model, as is the POA model. Use the idlj compiler with the -oldImplBase flag to generate server-side bindings that are compatible with older version of Java IDL (prior to J2SE 1.4).

    Note that using the -oldImplBase flag is non-standard: these APIs are obsoleted. You would use this flag ONLY for compatibility with existing servers written in J2SE 1.3 or earlier. In that case, you would need to modify an existing MAKEFILE to add the -oldImplBase flag to the idlj compiler, otherwise POA-based server-side mappings will be generated.

For More Information

Exceptions: System Exceptions
Explains how CORBA system exceptions work and provides details on the minor codes of Java IDL's system exceptions
Developing Servers
Covers topics of interest to CORBA server programmers
Java IDL Naming Service
Covers the COS Naming Service in greater detail
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Running The "Hello World" Example on Two Machines

Documentation Contents

Java IDL: The "Hello World" Example on Two Machines

To enable the Hello World Tutorial to run on two machines, follow the steps as directed in the tutorial, with the following changes. This tutorial was written for the Java SE. In this example, the client, stubs, and skeletons are located on the client machine, and the server and name server are located on the server machine. This scenario can be changed to meet your needs and is provided simply as an introduction to one way to distribute an application across two machines.

  1. Create (as shown in the tutorial) and compile the Hello.idl file on the client machine:

   idlj -fall Hello.idl
  2. Create HelloClient.java on the client machine. Compile the *.java files, including the stubs and skeletons (which are in the directory HelloApp):
       javac *.java HelloApp/*.java
  3. Create HelloServer.java on the server machine. Compile the .java files:
       javac *.java
  4. Start the Java Object Request Broker Daemon, orbd, which includes a Naming Service, on the server machine. To do this on Solaris, Linux, or Mac OS X:
       orbd -ORBInitialPort 1050 -ORBInitialHost servermachinename&

    To do this on Windows:

       start orbd -ORBInitialPort 1050 -ORBInitialHost servermachinename

    Both -ORBInitialPort and -ORBInitialHost are required arguments on the orbd command line. This example starts the name server on port 1050, because on Solaris you must become root to start a process on a port under 1024. If you want to use a different nameserverport, replace 1050 with the correct port number throughout this example.

    When using orbd, the ORBD must be run on the same machine as the machine on which the servers will be activated. Another Naming Service, tnameserv, could be used if you prefer to run the Naming Service on a machine other than the machine on which the servers will be activated.

  5. On the server machine, start the Hello server, as follows:
       java HelloServer -ORBInitialPort 1050

    If you used a different nameserverport, replace 1050 with the correct port number. You do not need to specify the -ORBInitialHost argument because the Hello server will be running on the same host as the name server in this example. If the Name Server were running on a different machine, you would specify which machine using the -ORBInitialHost nameserverhost argument.

  6. On the client machine, run the Hello application client. From a DOS prompt or shell, type:
       java HelloClient -ORBInitialHost nameserverhost -ORBInitialPort 1050

    Note that nameserverhost is the host on which the IDL name server is running. In this case, it is the server machine.

    If you used a different nameserverport, replace 1050 with the correct port number.

  7. Kill or stop orbd when finished. The name server will continue to wait for invocations until it is explicitly stopped.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Running the Hello World Application

This topic walks you through running the server and client program that together make up the "Hello World" application.

Running the Hello World Application

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation.

This example requires a naming service to make the servant object's operations available to clients. The server needs an object reference to the naming service so that it can publish the references to the objects implementing various interfaces. These object references are used by the clients for invoking methods. The two options for Naming Services shipped with Java SE are tnameserv, a transient naming service, and orbd (a href= "../../../tools/unix/orbd.html">Solaris, Linux, or Mac OS X or Windows), which is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager. This example uses orbd.

When running this example, remember that, when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The -ORBInitialPort option is used to override the default port number in this example. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon, orbd. You can substitute a different port if necessary. When running these examples on a Windows machine, subtitute a backslash (\) in path names.

To run this client-server application on your development machine:

  1. Start orbd.

    To start orbd from a Solaris, Linux, or Mac OS X command shell, enter:

      orbd -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start orbd -ORBInitialPort 1050 -ORBInitialHost localhost

    Note that 1050 is the port on which you want the name server to run. -ORBInitialPort is a required command-line argument. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

    Note that -ORBInitialHost is also a required command-line argument. For this example, since both client and server on running on the development machine, we have set the host to localhost. When developing on more than one machine, you will replace this with the name of the host. For an example of how to run this program on two machines, see The Hello World Example on Two Machines.

  2. Start the Hello server.

    To start the Hello server from a Solaris, Linux, or Mac OS X command shell, enter:

      java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost&

    From an MS-DOS system prompt (Windows), enter:

      start java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello server. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

  3. Run the client application:
      java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost

    For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello client. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running.

    Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050.

  4. The client prints the string from the server to the command line:
    Hello world!!

The name server, like many CORBA servers, runs until you explicitly stop it. To avoid having many servers running, kill the name server process after the client application returns successfully. To do this from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To do this from a Solaris, Linux, or Mac OS X shell, find the process, and kill it.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Stringified Object References

Documentation Contents

Getting Started with Java IDL: Using Stringified Object References

This document was not updated for this release.

To invoke an operation on a CORBA object, a client application needs a reference to the object. You can get such references in a number of ways, such as calling ORB.resolve_initial_references() or using another CORBA object (like the name service). In previous sections of this tutorial, you used both of these methods to get an initial object reference.

Often, however, there is no naming service available in the distributed environment. In that situation, CORBA clients use a stringified object reference to find their first object.

When updated, this lesson will teach you how to create a stringified object reference as a part of the server startup, and how the client gets that reference and destringifies it for use as a real object reference.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Writing the Interface Definition

Documentation Contents

Getting Started with Java IDL:
Writing the Interface Definition

Before you start working with Java IDL, you need to install version 1.4 (or later) of the Java platform. Version 1.4 (and later) provides the Application Programming Interface (API) and Object Request Broker (ORB) needed to enable CORBA-based distributed object interaction, as well as the idlj compiler. The idlj compiler uses the IDL-to-Java language mapping to convert IDL interface definitions to corresponding Java interfaces, classes, and methods, which you can then use to implement your client and server code.

This section teaches you how to write a simple IDL interface definition and how to translate the IDL interface to Java. It also describes the purpose of each file generated by the idlj compiler.

These topics are included in this section:

  1. Writing Hello.idl
  2. Understanding the IDL file
  3. Mapping Hello.idl to Java
  4. Understanding the idlj Compiler Output

Writing Hello.idl

To create the Hello.idl file,
  1. Create a new directory, named Hello, for this application.
  2. Start your favorite text editor and create a file named Hello.idl in this directory.
  3. In your file, enter the code for the interface definition, Hello.idl:
    module HelloApp
{
  interface Hello
  {
    string sayHello();
    oneway void shutdown();
  };
};
  4. Save the file.

Understanding the IDL file

OMG IDL is the language used to describe the interfaces that client objects call and object implementations provide. An interface definition written in OMG IDL completely defines the interface and fully specifies each operation's parameters. An OMG IDL interface provides the information needed to develop clients that use the interface's operations.

Clients are written in languages for which mappings from OMG IDL concepts have been defined. The mapping of an OMG IDL concept to a client language construct will depend on the facilities available in the client language. OMG specifies a mapping from IDL to several different programming languages, including C, C++, Smalltalk, COBOL, Ada, Lisp, Python, and Java. When mapped, each statement in OMG IDL is translated to a corresponding statement in the programming language of choice.

For example, you could use the tool idlj to map an IDL interface to Java and implement the client class. When you mapped the same IDL to C++ and implemented the server in that language, the Java client (through the Java ORB) and C++ server (through the C++ ORB) interoperate as though they were written in the same language.

The IDL for "Hello World" is extremely simple; its single interface has but two operations. You need perform only three steps:

  1. Declare the CORBA IDL module
  2. Declare the interface
  3. Declare the operations

Declaring the CORBA IDL Module

A CORBA module is a namespace that acts as a container for related interfaces and declarations. It corresponds closely to a Java package. Each module statement in an IDL file is mapped to a Java package statement.

The module statement looks like this:

module HelloApp
{
    // Subsequent lines of code here.
};

When you compile the IDL, the module statement will generate a package statement in the Java code.

Declaring the Interface

Like Java interfaces, CORBA interfaces declare the API contract an object has with other objects. Each interface statement in the IDL maps to a Java interface statement when mapped.

In your Hello.idl file, the interface statement looks like this:

module HelloApp
{
  interface Hello  // These lines
  {                // declare the
                   // interface
  };               // statement.
};

When you compile the IDL, this statement will generate an interface statement in the Java code.

Declaring the Operations

CORBA operations are the behavior that servers promise to perform on behalf of clients that invoke them. Each operation statement in the IDL generates a corresponding method statement in the generated Java interface.

In your Hello.idl file, the operation statement looks like this:

module HelloApp
{
  interface Hello
  {
    string sayHello();        // This line is an operation statement.
    oneway void shutdown();   // This line is another
  };
};
The interface definition for our little "Hello World" application is now complete.

Mapping Hello.idl to Java

The tool idlj reads OMG IDL files and creates the required Java files. The idlj compiler defaults to generating only the client-side bindings. If you need both client-side bindings and server-side skeletons (as you do for our "Hello World" program), you must use the -fall option when running the idlj compiler. For more information on compiler options, see the idlj man page (Solaris, Linux, or Mac OS X or Windows).

The default server-side mapping generated when either the -fall or -fserver arguments are used conform to Chapter 11, Portable Object Adapter (POA) of the CORBA 2.3.1 Specification (formal/99-10-07). For more information on the POA, see Portable Object Adapter.

The advantages of using the Portable Object Adaptor (POA) are:

  • Allow programmers to construct object implementations that are portable between different ORB products.
  • Provide support for objects with persistent identities.
  • Provide support for transparent activation of objects.
  • Allow a single servant to support multiple object identities simultaneously.
  1. Make sure that the jdk/bin directory (or the directory containing idlj, java, javac, and orbd) are in your path.
  2. Go to a command line prompt.
  3. Change to the directory containing your Hello.idl file.
  4. Enter the compiler command:

        idlj -fall Hello.idl

If you list the contents of the directory, you will see that a directory called HelloApp has been created and that it contains six files. Open Hello.java in your text editor. Hello.java is the signature interface and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. It looks like this:

//Hello.java
package HelloApp;

/**
* HelloApp/Hello.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
*/

public interface Hello extends HelloOperations, org.omg.CORBA.Object,
org.omg.CORBA.portable.IDLEntity
{
} // interface Hello

With an interface this simple, it is easy to see how the IDL statements map to the generated Java statements.

IDL Statement | Java Statement
module HelloApp | package HelloApp;
interface Hello | public interface Hello

The single surprising item is the extends statement. All CORBA objects are derived from org.omg.CORBA.Object to ensure required CORBA functionality. The required code is generated by idlj; you do not need to do any mapping yourself.

In previous versions of the idlj compiler (known as idltojava), the operations defined on the IDL interface would exist in this file as well. Starting with J2SDK v1.3.0, in conformance with the CORBA 2.3.1 Specification (formal/99-10-07), the IDL-to-Java mapping puts all of the operations defined on the IDL interface in the operations interface, HelloOperations.java. The operations interface is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and servers. For Hello.idl, this file looks like this:

//HelloOperations.java
package HelloApp;

/**
* HelloApp/HelloOperations.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
*/

public interface HelloOperations
{
  String sayHello ();
  void Shutdown ();
} // interface HelloOperations

Because there are only two operations defined in this interface, it is easy to see how the IDL statements map to the generated Java statements.

IDL Statement | Java Statement
string sayHello(); | String sayHello();
oneway void shutdown(); | void Shutdown ();

Understanding the idlj Compiler Output

The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. Under J2SE v.1.4, the files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

  • HelloPOA.java

    This abstract class is the stream-based server skeleton, providing basic CORBA functionality for the server. It extends org.omg.PortableServer.Servant, and implements the InvokeHandler interface and the HelloOperations interface. The server class, HelloServant, extends HelloPOA.

  • _HelloStub.java

    This class is the client stub, providing CORBA functionality for the client. It extends org.omg.CORBA.portable.ObjectImpl and implements the Hello.java interface.

  • Hello.java

    This interface contains the Java version of our IDL interface. The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality. It also extends the HelloOperations interface and org.omg.CORBA.portable.IDLEntity.

  • HelloHelper.java

    This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types. The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys. The Holder class delegates to the methods in the Helper class for reading and writing.

  • HelloHolder.java

    This final class holds a public instance member of type Hello. Whenever the IDL type is an out or an inout parameter, the Holder class is used. It provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics. The Holder class delegates to the methods in the Helper class for reading and writing. It implements org.omg.CORBA.portable.Streamable.

  • HelloOperations.java

    This interface contains the methods sayHello() and shutdown(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

When you write the IDL interface, you do all the programming required to generate all these files for your distributed application. The next steps are to implement the client and server classes. In the steps that follow, you will create the HelloClient.java client class and the HelloServer.java server class.

Troubleshooting

  • Error Message: "idlj" not found

    If you try to run idlj on the file Hello.idl and the system cannot find idlj, it is most likely not in your path. Make certain that the location of idlj (the JDK bin directory) is in your path, and try again.

For More Information

  • IDL to Java Language Mapping Overview

    Provides the basics for mapping IDL constructs to the corresponding Java statements.

  • Chapter 3 of the OMG CORBA 2.3.1 specification, formal/99-10-07

    Provides the complete specification for OMG Interface Definition Language. The specification can be downloaded from formal/99-10-07.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Image I/O Enhancements in Java SE 6.0

Major Features
  • A writer plug-in for the GIF image format
  • New methods for file formats filtering
Fixed Bugs
  • API and doc changes
  • BMP plugin improvements
  • Performance and resource management
  • Robustness
  • Quality
  • Miscellaneous

Major Features

A writer plug-in for the GIF file format

While reading capabilities for the GIF file format have been available since Java SE 1.4, the com.sun.media.imageio.plugins.gif package lacked a writer. The newly added GIF image writer enables writing images which satisfy the following requirements:

  • The number of bands is 1
  • The number of bits per sample is not greater than 8
  • The size of a color component is not greater than 8

Additionally, the GIF images writer supports the animated GIF images creation through the standard methods defined in the ImageWriter class. See more details about the GIF images writer in the Standard plug-in for GIF image format notes.

New methods for file formats filtering

Two new methods were introduced in the ImageIO class that obtain file suffixes to be filtered. The getReaderFileSuffixes() and getWriterFileSuffixes methods return an array of Strings listing all of the file suffixes associated with the formats recognized by the current set of registered readers and writers.

Fixed Bugs

API and doc changes

4953566 The mark() or reset() methods of the ImageInputStream class do not work properly with PNG ImageReader:

The following note was added to the ImageInputStream class specification to clarify that ImageReader classes are allowed to call the flushBefore() as part of the decoding process:

Note that it is valid for an ImageReader to call flushBefore as part of a read operation. Therefore, if an application calls the mark prior to passing that stream to an ImageReader, the application should not assume that the marked position will remain valid after the read operation has completed.

5068322 The javax.imageio.plugins.jpeg.JPEGQTable.toString() method produces incorrect description:

The toString() method of the JPEGQTable class in the package javax.imageio.plugins.jpeg was supposed to return a String object containing the values of the table, but instead repeated only the first line of the table. The performed fix eliminate this error.

6359957 Wrong doc URL reference for PNG specification:

The link to the PNG specification in the javax.imageio.metadata package was corrected to the following URL:

http://www.libpng.org/pub/png/spec/

6457035 javadoc for ImageInputStreamImpl.read() method is missing:

The ImageInputStreamImpl.java file had a missing '*' character at the beginning of the javadoc for the abstract read() method definition.The fix fills in the missing character.

BMP plugin improvements

6294920 The BMPImageReader class fails to read 3BYTE_BGR images encoded using BMP Writer with BI_JPEG compression:

While attempting to write an image of the BI_JPEG compression type, the java.io.EOFException was thrown by the BMPImageReader class. The problem was that the BMPImageReader class did not process embedded images both of BI_JPEG and BI_PNG types. To resolve this problem, the embedded image handling is moved to separate code.

6297016 Output BMP image is distorted when writing TYPE_3BYTE_BGR buffered image with BI_BITFIELDS compression:

While attempting to write a buffered image of the TYPE_3BYTE_BGR type to a file using the BMPWriter class and the BI_BITFIELDS compression type, the output image was distorted and unusable. This problem was caused by the bitfileds masks which were applied to a bmp image. However, an image data layout was not changed according to the BMP format requirements. To fix this problem the writePixels() method is used to copy image data correctly.

5076878 ImageIO BMP Writer writes 32 bit files for 24 bit images:

The ImageIO.write method presented a BMP file as a 32 bit image even if the source image had 24 bits per pixel presentation. The fix enables the writePixels procedure whenever the number of bits per pixel is smaller than the size of a databuffer type (for example, with TYPE_INT_RGB, the actual number of bits per pixel is 24 while the size of the databuffer type is 32).

6332480 The BMPReader class fails to read the TYPE_BYTE_GRAY image encoded by the BMPWriter class with BI_RLE8 compression:

The BMPReader class did not properly read the TYPE_BYTE_GRAY image written with the BMPWriter class using the BI_RLE8 compression. The problem was that the RLE decoding procedures (both RLE4 and RLE8) mistakenly used the width of the destination region instead of the height to calculate the range of image lines for copying. The performed fix uses the height of the destination region to calculate the range.

6399660 Using subsampling with compression alters the colors for some of the image types for BMP:

While using all the supported compression types for BMP, different affects on image were detected including blurring, a different color appearance, and slight image corruption. The performed fix separates processing BI_RGB compression and BI_RGB compression as follows:

  • For BI_RGB compression the BGR order of raster data should be used (except the case of 16bpp images where RGB data order is defined by the BMP spec)
  • For BI_BITFIELDS compression the order of raster data should be defined using corresponding masks. The RGB order of raster data is used for the default bitfields masks.

Performance and resource management

6299405 The ImageInputStreamImpl class still uses the finalize() method which causes the java.lang.OutOfMemoryError:

The finalize() method had to be emptied and its functionality (closing the stream) must be replaced with a more prompt mechanism. The finalize() method cannot be easily emptied at the ImageInputStreamImpl level, since third-party IISI subclasses may rely on the finalize() method calling their close() method as per the spec. However, for ImageInputStreamImpl subclasses under Oracle control, the finalize() methods can be emptied. The Java2D Disposer mechanism is used instead.

6266748 The JPEGImageWriter.write() method makes a copy of the raster:

The write() method of the JPEGImageWriter class contained memory-inefficient code. The suggested fix helps to improve performance for simple rendered images.

6336804 The javax.imageio.ImageIO class can handle leaks in some methods:

Some of the read() and write() convenience methods in the javax.imageio.ImageIO class did not properly close streams and dispose reader or writer instances in a try and finally blocks. As a fix the appropriate notes were added to each method's javadocs indicating whether it is the caller's responsibility to close the provided stream or not.

6347575 FileImageInputStream.readInt() and similar methods are inefficient:

Calling the read() method of the FileImageInputStream 4x was much more expensive than making a single call to the read(byte[]) method with a cached byte array. This fact had a profound impact on performance of reading small PNG and other images. The fixes were performed for the readShort() and readInt() methods of the ImageInputStreamImpl class.

6348744 The PNGImageReader class should skip metadata if the ignoreMetadata flag has the true value:

Before JDK 6, the PNGImageReader class read all image metadata, even if the ignoreMetadata flag was set. The fix reduces overhead and improves performance when reading small PNG images by skipping metadata blocks if the ignoreMetadata flag is true.

6354056 The JPEGImageReader class could be optimized:

The JPEG image reader copied decoded data into memory, but not in an optimized way. The performed fix improves this operation by using the memcpy() method instead of copying one byte at a time.

6354112 Increase compiler optimization level for libjpeg to improve runtime performance:

The libjpeg library in the JDK was built with default compiler optimization flags. The values of these flags are increased to a higher level to enable the native IJG JPEG libraries to run faster.

6404011 IllegalArgumentException: "Invalid ICC Profile Data" when reading a certain JPEG image:

This bug was an unchecked exception and could cause a system crash on some platforms. The fix catches the IllegalArgumentException, which is thrown by ICC_Profile, and handles images without taking into account invalid color profiles.

Robustness

6291034 The IFileCacheImageInputStream and FileCacheImageOutputStream should avoid using the File.deleteOnExit method:

Both the FileCacheImageInputStream and FileCacheImageOutputStream classes used the functionality of the deleteOnExit method of the File class. The fix has replaced the File.deleteOnExit() functionality with the shutdown hook that closes streams that are still open before the VM shutdown.

4892630 The ImageReader class does not validate the image index which is passed to some of the methods:

The getWidth(imgIndex), getHeight(imgIndex), and getAspectRatio(imgIndex) methods of the ImageReader class did not throw the IndexOutOfBoundsException if the given PNG image index was out of range. The performed fix resolves this issue by throwing the exception appropriately.

4895547 JPEGImageMetadata obtained from reader throws NullPointerException when calling the mergeTree() method:

The list of parent attributes did not contain attributes related to the child node and this fact caused the NullPointerException in the MarkerSegment.getAttributeValue() method while trying to get child related attribute. The performed fix obtains the attribute list from the child node.

4528643 Native JPEG code makes JNI calls in scope of GetPrimitiveArrayCritical:

Running any application that reads or writes JPEG images with the non-standard -Xcheck:jni flag caused the following error in several methods of the JPEGImageReader class:

Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical

In the fix, the affected methods are surrounded with the RELEASE/GET_ARRAYS macros.

5076692 Installed Extensions Image I/O reader-writer plug-ins unusable in applet context:

The problem was that the imageio registry initialization code did not have read access to jars in the java.ext.dirs when the registry code was called from applet context. Therefore, the imageio plugins installed to java.ext.dirs were not available in case of applets. The fix idea is to register plugins from java.ext.dirs in the privileged action block.

6342404 The ImageIO plugin failure causes all readers to fail:

Removing an ImageIO plugin's code from the classpath, but still including an entry for the plugin's ImageReader in META-INF/services made using any of the ImageIO plugins impossible. To fix this bug, a 'try and catch' block was added to the IIORegistry.registerApplicationClasspathSpis() method to catch the ServiceConfigurationError.

6395551 Setting the destination type to type specifier returned by redr.getImageTypes() throws exception for JPG:

The problem was that a new ColorSpace instance was re-created for embedded color profiles whenever an image header was read. In addition, there was no means for correct comparison of ColorSpace and ICC_Profile classes. This omission made comparing instances of ImageTypeSpecifier class impossible. The proposed workaround for this problem is as follows: to detect the case when the iccCS instance contains the same profile data as a newly read. If so, the 'old' instance is left; otherwise (if the profile data seems to be different) a new color space instance is created for the embedded color profile.

6399616 PIT: JPGReader throws an exception when using the TYPE_CUSTOM TypeSpecifier returned by the Reader.getImageTypes method:

The regression was caused by the fix for 4705399, where color conversion was removed (JPEGImageReader.java lines 783 -786) because it caused extra color conversion for images with embedded color profiles. However, this conversion was required when the destination type defined different color spaces for images that do not contain embedded profiles. The fix for this case converts image data from sRGB (produced by the decoder) to the color space used in the destination image.

Quality

5028259 Setting the destination image type for jpeg images increases the size of the result file:

If the write parameter with the destination type was used explicitly to write a jpeg image, then the size of the result file was bigger than if the same destination type was used implicitly. The problem was revealed when the destination type was specified but the corresponding metadata object was not specified. The fix creates the metadata object using the given destination type in order to build a SOF marker object, which will be used to change the default values of the QtableSelectors.

4881314 ImageIO does not correctly read certain standard JPG files:

The ImageIO incorrectly reads some JPG files. The result was a red or green image that looked like a photographic negative. The fix eliminates color space conversion for EXIF images. To detect EXIF images, the check for the APP1 marker in the image header is added.

5098176 Some PNG images fail to load with the ImageIO class:

The PNGImageReader failed to create the ImageTypeSpecifier instance corresponding to the indexed PNG image if the length of the image palette in smaller than 2 bitDepth. To avoid this limitation new palette arrays of the appropriate power of 2 size were created. These arrays are padded with the last value from original arrays in order to avoid the appearance of colors that do not exist in the original palette.

6372769 The ImageIO.read method improperly decodes Nikon Jpegs:

The ImageIO jpeg reader performed extra color conversion if an image contained the embedded color profile. The bug was fixed by removing the extra color conversion operation.

Miscellaneous

4972087 Quality Desc and Quality Values arrays are of the same length for JPG:

The JPEGImageWriteParam class was updated so that the getCompressionQualityValues() method returns an array whose length is one larger than the array returned by getCompressionQualityDescriptions(), as per the specification.

6195593 REGRESSION: The javax/imageio/IRPTest.java file fails:

The problem was caused by the fix for the bug 5039494. Starting with this fix, the ImageReader.computeRegion() method was used to calculate the destination region. In order to avoid discrepancies between calculated destination regions and destinations offset from the parameter, the destinationOffset is updated according to the calculated values.

6304433 Test bug: the regression test for the bug 6291034 fails on all platforms:

The regression test failure was caused by the creation of an output image file. This file was created after counting the existing files in the work directory and was not deleted on regression test finish. So, after regression test execution, the work directory always contained one extra file, although all temporary files were deleted upon VM exit. The solution is to use byte array input or output streams instead of file input or output streams in order to avoid creating extra files in the work directory.

6356926 PIT: The regression test javax/imageio/stream/DeleteOnExit.sh is failing:

The problem was caused by the fix for the bug 6299405. The affected code is fixed and the corresponding comment has been added.

6459309 The NoAPP0Test.java regression test failed on all platforms:

The difference in pixel values is caused by using new version of sRGB profile that was updated as part of fix for 6279846. New profile was integrated in the b92 build.

6363748 The close() method of the FileCacheImageInputStream class fails:

The problem was caused by the fix for the bug 6299405. As a part of that fix the FileCacheImageInputStream.close() method was changed so that it nulled out its reference to the cache object. To eliminate this issue the FCIIS.read() method is updated to call the checkClosed() method as it is supposed to do.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Image I/O Technology

The Java Image I/O API, developed through JSR-015, provides a pluggable architecture for working with images stored in files and accessed across the network. It offers substantially more flexibility and power than the previous APIs for loading and saving images.

The API provides a framework for the addition of format-specific plugins. Plug-ins for several common formats are included with Java Image I/O, but third parties can use this API to create their own plugins to handle special formats.

API Specification

The Java Image I/O API Specification consists of the following packages:

  • javax.imageio - the basic classes and interfaces for describing the contents of image files, including metadata and thumbnails; controlling the image reading and writing process; performing transcoding between formats; and reporting errors.
  • javax.imageio.event - interfaces for dealing with synchronous notification of events during the reading and writing of images.
  • javax.imageio.metadata - classes and interfaces for reading and writing image metadata.
  • javax.imageio.plugins.bmp - a support class for the built-in BMP reader and writer plug-ins.
  • javax.imageio.plugins.jpeg - some support classes for the built-in JPEG reader and writer plug-ins.
  • javax.imageio.spi - service-provider interfaces for: readers, writers, transcoders; and includes a runtime registry.
  • javax.imageio.stream - classes and interfaces for low-level I/O from files and streams.

Tutorials and Programmer's Guides

The Java Image I/O API Guide describes the API in more detail and demonstrates how to use Java Image I/O to read and write images and write custom plug-ins.

API Enhancements

  • Java Image I/O Enhancements in Java SE 6.0
  • Java Image I/O Enhancements in Java SE 5.0

More Information

  • The Java 2D Home Page
  • Java Advanced Imaging
  • The JFC Home Page

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


New Java Image I/O Features in Java SE 5.0

Documentation Contents

New Java Image I/O Features in
Java SE 5.0

Image I/O Support for BMP and WBMP Formats

The bug reports that correspond to this change are: 4339462 and 4339384

This change adds readers and writers for BMP and WBMP formats to the Image I/O system. As of Java SE 5.0, all implementations of javax.imageio provide support for reading and writing JPEG, PNG, BMP, and WBMP images, and for reading GIF images.

For more information, see the API documentation for the javax.imageio.plugins.bmp package and javax.imageio.plugins.bmp.BMPImageWriteParam class. Further details are in the metadata descriptions of the BMP and WBMP formats.

Improved Performance

The bug reports that correspond to this change are: 4827358, 4867874, and 4868479

These changes improve the Image I/O system's performance and memory usage when reading and writing JPEG images. The changes do not affect the Image I/O API.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

1.4 Target Audience

The API is intended to be used in a variety of contexts. Client-side applications may use it to load image data from local disk files or across the network. Server-side applications may use it to generate images dynamically in response to client requests, for example by using the Servlet API. The Image I/O API may be used in conjunction with other APIs such as Java Advanced Imaging, Java3D, and the Java Media Framework in order to build sophisticated multimedia applications.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

CHAPTER 1

Introduction

1.1 The Java Image I/O API

The Java Image I/O API provides a pluggable architecture for working with images stored in files and accessed across the network. It offers substantially more flexibility and power than the previously available APIs for loading and saving images.

The API provides a framework for the addition of format-specific plug-ins. Plug-ins for several common formats will be included with the standard Java SDK; other plug-ins will be available from third parties. A voting process has been established where Java developers may indicate their interest in particular formats. See:

http://bugs.java.com/view_bug.do?bug_id=4339476

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

1.5 Acknowledgements

The authors would like to thank the following members of the expert group and others who provided valuable assistance with the API design:

Bharti Agrawal, Troy Chinen, Shoji Hara, Fuji FilmSoft

David Clunie, Quintiles Intelligent Imaging

Bob Deen, NASA Jet Propulsion Laboratories

Thomas DeWeese, Eastman Kodak Corp.

Steve Levoe, NASA Jet Propulsion Laboratories

Todd Rowell, Oracle

Jeannette Hung and Ihtisham Kabir provided excellent front-line management and made it possible for the API and its implementation to be devloped with a minimum of red tape. Aastha Bhardwaj, Brian Burkhalter, Jerry Evans, Ivan Wong, and John Zimmerman provided invaluable technical assistance.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

1.2 About This Document

This document is a brief guide to the API and its goals, including some simple programming examples. However, this document is not intended to be a complete guide to the API. The definitive guide to the specification is the automatically-generated ("javadoc") API documentation. In all cases, the automatically-generated documentation takes precedence over the descriptive materal in this document.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

1.3 Platforms

Refer to the Supported System Configurations page to determine which platforms the JDK supports. Find a link to this page from the Java SE documentation main page.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Goals

Documentation Contents
CONTENTS | PREV | NEXT

2.2 Non-Goals

Thread Safety A particular instance of an ImageReader or ImageWriter is not required to support re-entrant (simultaneous) calls to its methods (with the exception of the abort method that requests current read or writes to halt). However, it must be possible for multiple instances of the same plug-in class to operate simultaneously. For the sake of brevity, we will only discuss reader plug-ins below.

Supporting full re-entrancy would require that the reader bundle all of its state information (e.g., the current input source) into a separate state object, which would allow methods in progress to continue to work with the settings that were in effect at the time they began, while allowing a separate thread to modify the state to be used by the next operation.

Rather than forcing each ImageReader to keep track of its state in this way, it is simpler to require the application to instantiate multiple instances of the same ImageReader class if it wishes to perform multithreaded processing. This means that the state of an ImageReader must be maintained using non-static instance variables only, which should not be a burden for plug-in developers.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Goals

Documentation Contents
CONTENTS | PREV | NEXT

CHAPTER 2

Goals

2.1 API Goals

The design of the Image I/O API was influenced by the desire to support a number of primary goals. Each goal provides the justification for a particular set of API features. These goals may be divided into those motivated mainly by the needs of client-side applications, and those motivated by the needs of server applications. Naturally, these primary goals represent only a fraction of the capabilities of the API. They are listed here in order to provide a sense of the motivations that went into the design of the API.

As a general rule of thumb, whenever a tradeoff between ease of use for application developers and plug-in developers was identified, the application developer was given a higher priority. Since relatively few users of the API are expected to write plug-ins, and even those developers who do write plug-ins will typically write no more than a handful in order to support formats of immediate use to them, it makes sense to push complexity into the plug-ins rather than into applications.

To ameliorate the complexity of plug-in development, some utility methods and implementation classes are provided that perform common functions. However, it is not possible to provide implementation classes to cover every situation, and providing an excessive number of utility classes and methods would increase the footprint for all API users even if they did not use non-standard plug-ins. We expect that plug-in developers will be able to incorporate source code from existing plug-ins and sample code into their plug-ins. While this might lead to some redundancy when using multiple, independently developed plug-ins, most users will probably use only a small number of plug-ins at a time in any case. Thus, we believe the cost of having to load code that might theoretically be shared but actually is not will tend to outweight the cost of loading some redundant code when many plug-ins are used.

2.1.1 Client-Side Application Goals

Pluggability An application written to use the Image I/O API should be able to automatically take advantage of new plug-ins without any rewriting or recompilation. This requires that plug-ins follow, as much as possible, a set of format-neutral interfaces. However, every image format has unique properties and capabilities, which plug-ins must be able to expose to applications. This is accomplished by allowing plug-ins to extend a number of interfaces within the API. Applications that are unaware of the plug-in specific extensions may continue to make use of the normal plug-in capabilities, while aware applications may use the extended interfaces.

Both generic and plug-in specific access to metadata (non-image data) is supported by allowing plug-ins to provide access to metadata in multiple formats. These may include plug-in specific formats, a plug-in neutral format defined by the API, and industry standard formats.

Automatic and Manual Plug-in Installation and Selection For simple applications that wish to load images without user intervention, it is important to allow a reader plug-in to be selected automatically based on file contents. However, it is desirable to avoid the loading and instantiation of complex classes unless they are needed. A plug-in must be able to determine whether it can handle a particular image without loading all of its code. In order to meet this goal, plug-ins are instantiated via a service provider interface mechanism that allows simple queries to be performed without loading the main body of plug-in code.

All of the bytecode (.class) files associated with a plug-in may be combined into a JAR file, which may be installed permanently into a Java Runtime Environment, or loaded dynamically using the application CLASSPATH mechanism.

Manual Plug-in Selection Although automatic plug-in selection is convenient for many applications, it must be possible for more sophisticated applications to exercise greater control over the plug-in selection process. This is accomplished by means of a run-time registry of plug-ins that may be queried and manipulated by an application.

Network, Disk-based, and Direct I/O Increasingly, applications must deal with both disk-based and network-based data. In many cases, even disk-based data must be dealt with in the form of an InputStream due to the needs of other APIs. The Image I/O API offers a set of interfaces that allow data from Files, InputStreams, or other sources to be handled in a unified manner while preserving the ability to seek backwards and forwards. The API is future-proofed to allow new I/O interfaces, including direct interfaces to image acquisition and output devices, to be used without rewriting application code.

Access to Metadata The metadata stored alongside an image may be as important as the image data. The Java Image I/O API provides thorough yet flexible access to metadata. Since metadata may take many forms, and contain very specialized information, it is difficult to provide direct access to such metadata in a general-purpose API. Instead, the API requires plug-ins to cast their metadata into the form of an XML Document structure, possibly enhanced with Object references in addition to textual data. Once this has been done, the metadata may be accessed and edited using standard XML DOM (Document Object Model) interfaces. The syntax of the Documents will vary from plug-in to plug-in, but the structure may be traversed, displayed, and edited without specific knowledge of the plug-in being used.

Support for Advanced Applications In order to support advanced applications, the API must provide access to features such as "thumbnail" images, multiple images stored in a file, muli-resolution imagery, and tiled imagery. It must provide the capability to decode portions of a larger image, and to perform subsampling during decoding in order to allow panning over very large images. When writing images, it must be possible to write image data piece-by-piece, without storing the entire image in memory at once.

2.1.2 Server Use Cases

Dynamic image generation Modern web servers typically generate a large portion of their content dynamically. The Java Servlet and Java Server Pages (JSP) APIs provide portable ways to generate HTML pages in response to requests from web browsers. Just as unique, custom HTML may be generated for each user, it is possible to customize image content.

In many cases, image content must be generated dynamically. For example, consider supplying stock price charts. While it might be possible to generate and store a limited set of charts for each listed stock in advance, if the user is allowed to add customizations such as the time interval over which the price should be displayed, or a set of indices or other stocks against which the stock price should be compared, the number of possible images grows exponentially. Only a dynamic approach can possibly allow such customization.

Image Customization Web images are typically one-size-fits-all, with the same image data being delivered regardless of the display capabilities of the receiver. The increasing use of wireless and handheld devices will require images that are customized for their limited bandwidth and display capabilities. Desktop computers have seen increases in their display resolution, causing many web images to appear too small. The lack of scalable images also causes problems for visually impaired users. Server-side image customization can be used to provide optimal images for all users, with the image resolution and color characteristics being chosen based on user preferences.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.8 Handling Errors using IIOException

In the examples above, the possibility of fatal errors was not considered. Errors may result from a number of sources, including true I/O errors (e.g., file not found, file unreadable, file on corrupt media), security violations (e.g., no permission to read files from an applet), file format problems (file contents corrupted, file using a variant of the format that is not supported by the plug-in), or even bugs in the API implementation or in the plug-in.

The Image I/O API makes use of its own subclass of the standard IOException class, called IIOException. IIOExceptions are used to signal all errors encountered during the parsing of a source file (e.g., an incorrect checksum or an invalid value for a particular byte within the file), including true I/O errors that result in an IOException being thrown within the reader.

An IIOException contains a (non-localized) message describing the reason for the exception, as well as a reference to another Exception that was the cause of the IIOException, if one exists.

Thus, application code that attempts to provide graceful handling of errors will look something like:

File f = new File("c:\images\myimage.gif");
ImageInputStream iis = null;
try {
        iis = ImageIO.createImageInputStream(f);
} catch (IIOException iioe1) {
        System.out.println("Unable to create an input stream!");
        return;
}

reader.setInput(stream);
try {
        reader.read(0, param);
} catch (IIOException iioe2) {
        System.out.println("An error occurred during reading: " +
                                 iioe2.getMessage());
        Throwable t = iioe2.getCause();
        if ((t != null) && (t instanceof IOException)) {
                System.out.println("Caused by IOException: " +
                                   t.getMessage());
        }
}

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.5 Handling Metadata

Data stored in an image file that does not represent actual pixel values is referred to as metadata. The javax.imageio.metadata package contains classes and interfaces for accessing metadata.

Metadata may contain complex, hierarchical structures. The Java XML Document Object Model (DOM) API is used to represent these structures, allowing developers to leverage their knowledge of these interfaces.

The Image I/O API differentiates between stream metadata, which is associated with all images stored in an image file, and image metadata which is associated with a single image. For image formats that contain a single image, only image metadata is used.

Metadata may be obtained by calling the ImageReader.getStreamMetadata and getImageMetadata(int imageIndex) methods. These return an object that implements the IIOMetadata interface. The actual class type of the returned object is up to the ImageReader, and will usually be a unique class used only by that reader. This object should be designed to store as much of the metadata allowed by the format as possible, as losslessly as possible. However, this fidelity to the specifications of the image format comes at a cost, as access to the metadata becomes format-specific.

In order to allow access to the metadata without the need for format-specific application code, IIOMetadata objects expose their internal information in the form of an XML DOM structure, which is essentially a tree of nodes of various types that may contain a set of attributes (String values accessed by name), and which may reference a set of child nodes.

A single plug-in may support multiple document formats, which are distinguished by a format name. Typically, at least two formats will be supported by a given plug-in. The first is a common, plug-in neutral format called com.sun.imageio_1.0, which is defined in the class comment for the IIOMetadata interface. The second will be a highly plug-in specific format that exposes all of the internal structure of the IIOMetadata object in the form of a DOM. The latter format is referred to as the native format of the plug-in; its name may be determined by calling the getNativeMetadataFormatName method of the IIOMetadata object returned by the reader (advanced users may call a method of the same name on the ImageReaderSpi object used to instantiate the reader. The latter approach is useful for selecting a plug-in based on its support for a particular format). The names of all of the supported document formats may be determined similarly by calling getMetadataFormatNames.

The contents of an IIOMetadata object may be accessed in the form of a tree of XML Node objects by calling its getAsTree method. This method takes a String argument which is the name of one of the document formats supported by the plug-in. This document may then be manipulated as a standard XML DOM tree.

As an example, to print the contents of an XML DOM tree, the following code may be used:

public void displayMetadata(Node root) {
        displayMetadata(root, 0);
}

void indent(int level) {
        for (int i = 0; i < level; i++) {
                System.out.print("  ");
        }
}

void displayMetadata(Node node, int level) {
        indent(level); // emit open tag
        System.out.print("<" + node.getNodeName());
        NamedNodeMap map = node.getAttributes();
        if (map != null) { // print attribute values
                int length = map.getLength();
                for (int i = 0; i < length; i++) {
                        Node attr = map.item(i);
                        System.out.print(" " + attr.getNodeName() +
                                         "=\"" + attr.getNodeValue() + "\"");
                }
        }

        Node child = node.getFirstChild();
        if (child != null) {
                System.out.println(">"); // close current tag
                while (child != null) { // emit child tags recursively
                        displayMetadata(child, level + 1);
                        child = child.getNextSibling();
                }
                indent(level); // emit close tag
                System.out.println("</" + node.getNodeName() + ">");
        } else {
                System.out.println("/>");
        }
}
Executing displayMetadata on the metadata from a PNG test image yields the output:
<com.sun.imageio.png_1.0>
  <IHDR width="32" height="32" bitDepth="8" colorType="RGB"
compressionMethod="deflate" filterMethod="adaptive" interlaceMethod="none"/>
  <cHRM whitePointX="31270" whitePointY="32900" redX="64000" redY="33000"
greenX="30000" greenY="60000" blueX="15000" blueY="6000"/>
  <gAMA value="100000"/>
</com.sun.imageio.png_1.0>
We see that the image contains IHDR, cHRM, and gAMA chunks. The interpretation of the attribute values requires an understanding of the PNG format; however, it is still possible for an application that does not understand PNG internals to display the values and allow them to be edited interactively.

3.5.1 The IIOMetadataFormat Interface

An IIOMetadataFormat object is used to describe the legal structure of a metadata document format. It constrains the types of nodes that may appear, the types of nodes that may be children of a node of a given type, the names and data types of the attributes that may appear at a node of a given type, and the audiotape of an Object value that may be stored at a node of a given type. In XML terms, the information provided by the IIOMetadataFormat interface is somewhere in between a DTD (Document Type Definition), which gives information about node types, children, and attributes, and an XML Schema, which provides detailed information about data types.

For simplicity, only a subset of legal DTD structures can be described by IIOMetadataFormat. For example, the children of a node may be defined in an IIOMetadataFormat as a sequence in which each child must appear once (a, b, c), a sequence in which each child is optional (a?, b?, c?), a choice of a single child (a | b | c), or a repetition of a single node type (a)*, whereas a DTD allows many more combinations.

A node may not contain any textual data, but may contain a reference to an arbitrary Object. The IIOMetadataFormat indicates the class type and optionally the legal enumerated values or a range of values for the Object. Arrays are supported as well.

A DTD does not allow any attribute data types other than character strings; an XML Schema allows extremely complex data types to be built up from simpler ones. IIOMetadataFormat occupies a middle ground; it allows attributes to be constrained to belong to one of a predefined set of simple data types, including integers, floating-point decimals, and dates. Lists of these data types are also allowed.

Since an IIOMetadataFormat might be used to automatically construct a user interface for displaying and editing metadata, restricted the set of legal structures greatly simplifies the mapping between formats and user interface designs.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.6 Transcoding

Transcoding refers to reading an image file with a reader plug-in, and writing out the image using a writer plug-in, especially, if the writer plug-in cannot directly understand the native metadata format of the reader. In such a case, there will always be some loss of information, even if both plug-ins deal with the same file format. A transcoder plug-in is responsible for converting the stream and image metadata that have been created by a reader plug-in into a better form for use by a writer plug-in. The API does not mandate the presence of any transcoder plug-ins, but they may be installed and registered just like readers and writers.

A set of reader and writer plug-ins may be designed to interpret each other's metadata without the need for a separate transcoder. The relationships between plug-ins can be determined using the ImageReaderSpi.getImageWriterSpiNames and ImageWriterSpi.getImageReaderSpiNames methods, which indicate which plug-ins are known to work well with a given plug-in of the opposite type. If multiple plug-ins are being written by a single vendor, this mechanism will provide the best quality.

However, when working with plug-ins that have not been designed to interoperate, a transcoder plug-in may be provided by a developer who understands the metadata formats of a given pair of reader and writer plug-ins, even though each was written without knowledge of the other.

Given a particular pair of reader and writer plug-ins, the set of appropriate transcoder plug-ins may be located as follows:

ImageReader reader;
ImageWriter writer;

Iterator transcoders = ImageIO.getImageTranscoders(reader, writer);

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.3 ImageReader

Rather than using the ImageIO class to perform the entire decoding operation, an application may use the ImageIO class to obtain an ImageReader object that may be used to perform the read:

Iterator readers = ImageIO.getImageReadersByFormatName("gif");
ImageReader reader = (ImageReader)readers.next();

Readers may also be retrieved based on file contents, file suffix, or MIME type. The mechanism for locating and instantiating the reader makes use of the javax.imageio.spi.ImageReaderSpi class, which allows information about a reader plug-in to be retrieved without actually instantiating the plug-in. The notion of "service provider interfaces" (SPIs) is described in detail in the following chapter.

Once a reader has been obtained, it must be supplied with an input source. Most readers are able to read from an ImageInputStream, which is a special input source that is defined by the Image I/O API. A special input source is used in order to make it simple for reader and writers to work with both file and streaming I/O.

Obtaining an ImageInputStream is straightforward. Given an input source in the form of a File or InputStream, an ImageInputStream is produced by the call:

Object source; // File or InputStream
ImageInputStream iis = ImageIO.createImageInputStream(source);

Once a source has been obtained, it may be attached to the reader by calling:

reader.setInput(iis, true);

The second parameter should be set to false if the source file contains multiple images and the application is not guaranteed to read them in order. For file formats that allow only a single image to be stored in a file, it is always legal to pass in a value of true.

Once the reader has its input source set, we can use it to obtain information about the image without necessarily causing image data to be read into memory. For example, calling reader.getImageWidth(0) allows us to obtain the width of the first image stored in the file. A well-written plug-in will attempt to decode only as much of the file as is necessary to determine the image width, without reading any pixels.

To read the image, the application may call reader.read(imageIndex), where imageIndex is the index of the image within the file. This produces the same result as if it had called ImageIO.read, as shown above.

3.3.1 ImageReadParam

More control may be obtained by supplying the read method with an additional parameter of type ImageReadParam. An ImageReadParam allows the application to specify a destination image in which the decoded image data should be stored, allowing better control over memory use. It also allows a region of interest to be specified, as well as subsampling factors that may be used to obtain a scaled-down version of the image.

When a source region is set, the reader plug-in will attempt to decode only the desired region, to the extent that the file format allows partial decoding. In any case, no pixels outside the region will appear in the output. This capability makes it possible to work with extremely large images in a limited amount of memory.

For example, to decode only the upper-left quadrant of the image, the application first obtains an ImageReadParam that is suitable for use with the reader:

ImageReadParam param = reader.getDefaultReadParam();
Next, the source region of interest is set on the ImageReadParam:
import java.awt.Rectangle;
int imageIndex = 0;
int half_width = reader.getImageWidth(imageIndex)/2;
int half_height = reader.getImageHeight(imageIndex)/2;
Rectangle rect = new Rectangle(0, 0, half_width, half_height);
param.setSourceRegion(rect);

Finally, the image is read using the ImageReadParam:

BufferedImage bi = reader.read(imageIndex, param);

The result is a new BufferedImage whose width and height are equal to half those of the original image (rounding down if the image had an odd width or height).

The lower-right quadrant of the image may then be read into the same BufferedImage that was created to hold the upper-left quadrant, overwriting the previous pixel data:

param.setDestination(bi);
rect = new Rectangle(half_width, half_height, half_width, half_height);
param.setSourceRegion(rect);
BufferedImage bi2 = reader.read(0, param);
if (bi == bi2) {
        System.out.println("The same BufferedImage was used!");
} else {
        System.out.println("This can't happen!");
}

In practice, the application could simply call reader.read(0, param) without assigning the result anywhere, knowing that the pixels will be written into the existing BufferedImage bi.

As another example, to read every third pixel of the image, resulting in an image one-ninth the size of the original, subsampling factors may be set in the ImageReadParam:

param = reader.getDefaultImageParam();
param.setSourceSubsampling(3, 3, 0, 0);
BufferedImage bi3 = reader.read(0, param);

3.3.2 IIOParamController

A plug-in may optionally supply an IIOParamController object that may be used to set up an IIOReadParam (or IIOWriteParam) using a graphical user interface (GUI), or any other interface. A reader plug-in may attach an IIOParamController to any ImageReadParam objects that it creates:

ImageReadParam param = reader.getDefaultImageParam();
IIOParamController controller = param.getController();
if (controller != null) {
        controller.activate(param);
}

When the controller's activate method is called, it displays the GUI and handles user events such as slider movements and button presses. Typically the interface will contain an "OK" or "Apply" button, which when pressed will cause the activate method to return. The controller is responsible for calling methods on its associated ImageReadParam to update its state, either in response to each GUI event, or all at once prior to returning from activate.

3.3.3 Reading From Multi-Image Files

All the methods in the ImageReader class that deal with images take an imageIndex parameter. This parameter allows access to any of the images in a multi-image file.

The ImageReader.getNumImages method returns the number of images that are stored in the input file. This method takes a boolean parameter, allowSearch. Some image formats, notably GIF, do not provide any way to determine the number of images without reading the entire file. Since this may be costly, setting allowSearch to false will allow the reader to return a value of -1 instead of the actual number of images. If the parameter is true, the reader will always return the actual number of images.

Even if the number of images is not known by the application, it is still possible to call read(imageIndex); if the index is too large, the method will throw an IndexOutOfBoundsException. Thus, the application can request images with increasing indices until it receives an exception.

3.3.4 Reading "Thumbnail" Images

Some image formats allow a small preview image (or multiple previews) to be stored alongside the main image. These "thumbnail" images are useful for identifying image files quickly, without the need to decode the entire image.

Applications can determine how many thumbnail images associated with a particular image are available by calling:

reader.getNumThumbnails(imageIndex);

If a thumbnail image is present, it can be retrieved by calling:

int thumbailIndex = 0;
BufferedImage bi;
bi = reader.readThumbnail(imageIndex, thumbnailIndex);

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.7 Listening for Events

As an image is being read or written, the plug-in may provide updates to the
application. The application may provide one or more classes that implement
interfaces from the javax.image.event package. Instances of these classes are then
added to the ImageReader or ImageWriter being used. For example,

class MyReadProgressListener implements IIOReadProgressListener {

        public MyReadProgressListener() {}

        public void imageStarted(ImageReader source) {
                System.out.println("Started reading!");
        }

        // Other methods from IIOReadProgressListener omitted
}

IIOReadProgressListener listener = new MyReadProgressListener();
reader.addIIOReadProgressListener(listener);
As the ImageReader.read method progresses, methods on listener will be called at various times to indicate how much of the image has been read. Because these methods are being called while ImageReader.read is active, they must not call most methods from the same ImageReader object. They may call ImageReader.abort(), which will cause ImageReader.read to return even if it is only partially complete.

3.7.1 The IIOReadProgressListener Interface

An IIOReadProgressListener may be used to provide simple status information during reading. An estimate of the percentage of completion of a read is provided, which may be used to update a Swing JProgressBar or other progress indicator, or to estimate the time remaining to read a large image.

The imageStarted method will be called at the start of the read. During the read, the imageProgress method will be called multiple times, each time with a different, increasing value for its percentageDone parameter. When the read is about to complete, the imageComplete method will be called.

Similarly, the thumbnailStarted, thumbnailProgress, and thumbnailComplete methods will be called during thumbnail reads.

Other methods exist to indicate the start and end of a sequence of image reads performed by the ImageReader.readAll method. Additionally, it is possible for an ongoing read to be aborted using the ImageReader.abort method; in this case, the listener's readAborted method will be called.

3.7.2 The IIOReadUpdateListener Interface

An IIOReadUpdateListener provides more detailed information on the progress of an image read. Some image formats allow interlaced or progressive encoding, in which a subset of the pixel data is made available quickly, so that a crude version of the image may be displayed while the remainder of the pixel data is still being received and decoded. A typical scheme might begin by sending only every fourth row, and only every fourth pixel in each of those rows, so that the initial image requires only one sixteenth of the total amount of data to be transmitted and decoded. If interlacing were not used, only the top one-sixteenth of the image would be displayed in the same amount of time. Thus, a person viewing an interlaced image will be able to get a sense of its contents much sooner than if a traditional left-to-right, top-to-bottom order were used.

By implementing the methods of the IIOReadUpdateListener interface, an application class can receive notification when groups of possibly non-contiguous pixels are ready to be displayed. These methods also receive a reference to the BufferedImage that is in the process of being filled in, which may be used to refresh the display to include the newly decoded pixels.

When decoding an interlaced or progressive image, the decoding proceeds in multiple passes. At the start of each pass, the listener's passStarted method will be called to indicate the set of pixels that may be overwritten during the following pass. This estimate is conservative; not every pixel in the region will necessarily be updated during the pass. As the pass progresses, the imageUpdate method will be called with arguments describing the region of pixels that have receive new values. This region is described by the coordinates of its upper-left corner, its width and height, and the spacing between the pixels that make up the pass (in the example above, both parameters would be equal to 4 for the initial pass). When a pass has completed, the passComplete method is called. Similar methods allow the progress of thumbnail image reads to be tracked.

3.7.3 The IIOReadWarningListener Interface

By attaching an IIOReadWarningListener to an ImageReader, information on non-fatal errors may be received. For example, a reader might detect a tag or chunk that should not be present. Even though the reader may choose to ignore the error and proceed with decoding, it may wish to inform the application that the input source was malformed, as this could indicate problems in the application that generated the images.

ImageReaders may specify a set of Locales for which they can provide localized warning messages. The set of available locales can be obtained from the reader's getAvailableLocales method. The desired locale should then be set by calling the reader's setLocale method prior to attaching the IIOReadWarningListener. Each listener will receive messages in the Locale that was in effect at the time it was attached to the reader.

3.7.4 The IIOWriteProgressListener and IIOWriteWarningListener Interfaces

The IIOWriteProgressListener and IIOWriteWarningListener interfaces function similarly to their reader counterparts.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

CHAPTER 3

Writing Image I/O Applications

3.1 Reading and Writing Images

The javax.imageio.ImageIO class provides a set of static convenience methods that perform most simple Image I/O operations.

Reading an image that is in a standard format (GIF, PNG, or JPEG) is simple:

File f = new File("c:\images\myimage.gif");
BufferedImage bi = ImageIO.read(f);

The format of the image will be auto-detected by the API based on the contents of the file. Most image files contain a "magic number" in their first few bytes that identifies the file format. For formats that do not have a magic number, auto-detection may fail and somewhat more sophisticated application code will be needed.

Additional formats may be handled by installing JAR files containing plug-ins; the details are described in the next chapter. Once a plug-in has been installed, a new format will be understood automatically without any changes to the application code.

The set of formats available for reading can be obtained by calling ImageIO.getReaderFormatNames. This will return an array of Strings containing the names of the available formats, such as "gif" and "png."

Writing an image in a supported format is equally simple:

BufferedImage bi;
File f = new File("c:\images\myimage.png");
ImageIO.write(im, "png", f);

The list of supported formats may be obtained by calling ImageIO.getWriterFormatNames.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.2 Going Further

The methods described above are sufficient for simple applications. However, the Image I/O API offers much more power for writing sophisticated applications. In order to make use of the advanced features of the API, applications will work directly with the ImageReader and ImageWriter classes that are part of the API.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Writing Image I/O Applications

Documentation Contents
CONTENTS | PREV | NEXT

3.4 The ImageWriter Class

Just as we obtained a list of ImageReaders for a particular format using a method from the ImageIO class, we can obtain a list of ImageWriters:

Iterator writers = ImageIO.getImageWritersByFormatName("png");
ImageWriter writer = (ImageWriter)writers.next();

Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:

File f = new File("c:\images\myimage.png");
ImageOutputStream ios = ImageIO.createImageOutputStream(f);
writer.setOutput(ios);

Finally, the image may be written to the output stream:

BufferedImage bi;
writer.write(bi);

3.4.1 Writing Multiple Images

The IIOImage class is use to store references to an image, one or more thumbnail images, and metadata (non-image data) associated with the image. Metadata will be discussed below; for now, we will simply pass null as the value for the metadata-related parameters.

The ImageWriter class contains a write method that creates a new file from an IIOImage, and a writeInsert method that adds an IIOImage to an existing file . By calling the two in sequence a multi-image file may be written:

BufferedImage first_bi, second_bi;
IIOImage first_IIOImage = new IIOImage(first_bi, null, null);
IIOImage second_IIOImage = new IIOImage(second_bi, null, null);
writer.write(null, first_IIOImage, null);
if (writer.canInsertImage(1)) {
        writer.writeInsert(1, second_IIOImage, null);
} else {
        System.err.println("Writer can't append a second image!");
}

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

4.3 Writing Reader Plug-Ins

A minimal reader plug-in consists of an ImageReaderSpi subclass, and an ImageReader subclass. Optionally, it may contain implementations of the IIOMetadata interface representing the stream and image metadata, and an IIOMetadataFormat object describing the structure of the metadata.

In the following sections, we will sketch out the implementation of a simple reader plug-in for a hypothetical format called "MyFormat". It will consist of the classes MyFormatImageReaderSpi, MyFormatImageReader, and MyFormatMetadata.

The format itself is defined to begin with the characters `myformat\n', followed by two four-byte integers representing the width, height, and a single byte indicating the color type of the image, which may be either gray or RGB. Next, after a newline character, metadata values may stored as alternating lines containing a keyword and a value, terminated by the special keyword `END'. The string values are stored using UTF8 encoding followed by a newline. Finally, the image samples are stored in left-to-right, top-to-bottom order as either byte grayscale values, or three bytes representing red, green, and blue.

MyFormatImageReaderSpi The MyFormatImageReaderSpi class provides information about the plug-in, including the vendor name, plug-in version string and description, format name, file suffixes associated with the format, MIME types associated with the format, input source classes that the plug-in can handle, and the ImageWriterSpis of plug-ins that are able to interoperate specially with the reader. It also must provide an implementation of the canDecodeInput method, which is used to locate plug-ins based on the contents of a source image file.

The ImageReaderSpi class provides implementations of most of its methods. These methods mainly return the value of various protected instance variables, which the MyFormatImageReaderSpi may set directly or via the superclass constructor, as in the example below:

package com.mycompany.imageio;

import java.io.IOException;
import java.util.Locale;
import javax.imageio.ImageReader;
import javax.imageio.spi.ImageReaderSpi;
import javax.imageio.stream.ImageInputStream;

public class MyFormatImageReaderSpi extends ImageReaderSpi {

        static final String vendorName = "My Company";
        static final String version = "1.0_beta33_build9467";
        static final String readerClassName =
                "com.mycompany.imageio.MyFormatImageReader";
        static final String[] names = { "myformat" };
        static final String[] suffixes = { "myf" };
        static final String[] MIMETypes = {
                "image/x-myformat" };
        static final String[] writerSpiNames = {
                "com.mycompany.imageio.MyFormatImageWriterSpi" };

        // Metadata formats, more information below
        static final boolean supportsStandardStreamMetadataFormat = false;
        static final String nativeStreamMetadataFormatName = null
        static final String nativeStreamMetadataFormatClassName = null;
        static final String[] extraStreamMetadataFormatNames = null;
        static final String[] extraStreamMetadataFormatClassNames = null;
        static final boolean supportsStandardImageMetadataFormat = false;
        static final String nativeImageMetadataFormatName =
                "com.mycompany.imageio.MyFormatMetadata_1.0";
        static final String nativeImageMetadataFormatClassName =
                "com.mycompany.imageio.MyFormatMetadata";
        static final String[] extraImageMetadataFormatNames = null;
        static final String[] extraImageMetadataFormatClassNames = null;

        public MyFormatImageReaderSpi() {
                super(vendorName, version,
                      names, suffixes, MIMETypes,
                      readerClassName,
                      STANDARD_INPUT_TYPE, // Accept ImageInputStreams
                      writerSpiNames,
                      supportsStandardStreamMetadataFormat,
                      nativeStreamMetadataFormatName,
                      nativeStreamMetadataFormatClassName,
                      extraStreamMetadataFormatNames,
                      extraStreamMetadataFormatClassNames,
                      supportsStandardImageMetadataFormat,
                      nativeImageMetadataFormatName,
                      extraImageMetadataFormatNames,
                      extraImageMetadataFormatClassNames);
                }

                public String getDescription(Locale locale) {
                        // Localize as appropriate
                        return "Description goes here";
                }

                public boolean canDecodeInput(Object input)
                        throws IOException {
                        // see below
                }

            public ImageReader createReaderInstance(Object extension) {
                return new MyFormatImageReader(this);
            }
        }
Most plug-ins need read only from ImageInputStream sources, since it is possible to "wrap" most other types of input with an appropriate ImageInputStream. However, it is possible for a plug-in to work directly with other Objects, for example an Object that provides an interface to a digital camera or scanner. This interface need not provide a "stream" view of the device at all. Rather, a plug-in that is aware of the interface may use it to drive the device directly.

The plug-in advertises which input classes it can handle via its getInputTypes method, which returns an array of Class objects. An implementation of getInputTypes is provided in the superclass, which returns the value of the inputTypes instance variable, which in turn is set by the seventh argument to the superclass constructor. The value used in the example above, STANDARD_INPUT_TYPE, is shorthand for an array containing the single element javax.imageio.stream.ImageInputStream.class, indicating that the plug-in accepts only ImageInputStreams.

The canDecodeInput method is responsible for determining two things: first, whether the input parameter is an instance of a class that the plug-in can understand, and second, whether the file contents appear to be in the format handled by the plug-in. It must leave its input in the same state as it was when it was passed in. For an ImageInputStream input source, the mark and reset methods may be used. For example, since files in the "MyFormat" format all begin with the characters `myformat', canDecodeInput may be implemented as:

public boolean canDecodeInput(Object input) {
        if (!(input instanceof ImageInputStream)) {
                return false;
        }

        ImageInputStream stream = (ImageInputStream)input;
        byte[] b = new byte[8];
        try {
                stream.mark();
                stream.readFully(b);
                stream.reset();
        } catch (IOException e) {
                return false;
        }

        // Cast unsigned character constants prior to comparison
        return (b[0] == (byte)'m' && b[1] == (byte)'y' &&
                b[2] == (byte)'f' && b[3] == (byte)'o' &&
                b[4] == (byte)'r' && b[5] == (byte)'m' &&
                b[6] == (byte)'a' && b[7] == (byte)'t');
}
MyFormatImageReader The heart of a reader plug-in is its extension of the ImageReader class. This class is responsible for responding to queries about the images actually stored in an input file or stream, as well as the actual reading of images, thumbnails, and metadata. For simplicity, we will ignore thumbnail images in this example.

A sketch of some of the methods of a hypothetical MyFormatImageReader class is shown below:

package com.mycompany.imageio;

public class MyFormatImageReader extends ImageReader {

        ImageInputStream stream = null;
        int width, height;
        int colorType;

        // Constants enumerating the values of colorType
        static final int COLOR_TYPE_GRAY = 0;
        static final int COLOR_TYPE_RGB = 1;

        boolean gotHeader = false;

        public MyFormatImageReader(ImageReaderSpi originatingProvider) {
                super(originatingProvider);
        }

        public void setInput(Object input, boolean isStreamable) {
                super.setInput(input, isStreamable);
                if (input == null) {
                        this.stream = null;
                        return;
                }
                if (input instanceof ImageInputStream) {
                        this.stream = (ImageInputStream)input;
                } else {
                        throw new IllegalArgumentException("bad input");
                }
        }

        public int getNumImages(boolean allowSearch)
                throws IIOException {
                return 1; // format can only encode a single image
        }

        private void checkIndex(int imageIndex) {
                if (imageIndex != 0) {
                        throw new IndexOutOfBoundsException("bad index");
                }
        }

        public int getWidth(int imageIndex)
                throws IIOException {
                checkIndex(imageIndex); // must throw an exception if != 0
                readHeader();
                return width;
        }

        public int getHeight(int imageIndex)
                throws IIOException {
                checkIndex(imageIndex);
                readHeader();
                return height;
        }
The getImageTypes Method The reader is responsible for indicating what sorts of images may be used to hold the decoded output. The ImageTypeSpecifier class is used to hold a SampleModel and ColorModel indicating a legal image layout. The getImageTypes method returns an Iterator of ImageTypeSpecifiers:
        public Iterator getImageTypes(int imageIndex)
                throws IIOException {
                checkIndex(imageIndex);
                readHeader();

                ImageTypeSpecifier imageType = null;
                int datatype = DataBuffer.TYPE_BYTE;
                java.util.List l = new ArrayList();
                switch (colorType) {
                case COLOR_TYPE_GRAY:
                        imageType = ImageTypeSpecifier.createGrayscale(8,
                                                                       datatype,
                                                                       false);
                        break;

                case COLOR_TYPE_RGB:
                        ColorSpace rgb =
                                ColorSpace.getInstance(ColorSpace.CS_sRGB);
                        int[] bandOffsets = new int[3];
                        bandOffsets[0] = 0;
                        bandOffsets[1] = 1;
                        bandOffsets[2] = 2;
                        imageType =
                                ImageTypeSpecifier.createInterleaved(rgb,
                                                                     bandOffsets,
                                                                     datatype,
                                                                     false,
                                                                     false);
                        break;
                }
                l.add(imageType);
                return l.iterator();
        }
Parsing the Image Header Several of the methods above depend on a readHeader method, which is responsible for reading enough of the input stream to determine the width, height, and layout of the image. readHeader is defined so it is safe to be called multiple times (note that we are not concerned with multi-threaded access):
        public void readHeader() {
                if (gotHeader) {
                        return;
                }
                gotHeader = true;

                if (stream == null) {
                        throw new IllegalStateException("No input stream");
                }

                // Read `myformat\n' from the stream
                byte[] signature = new byte[9];
                try {
                        stream.readFully(signature);
                } catch (IOException e) {
                        throw new IIOException("Error reading signature", e);
                }
                if (signature[0] != (byte)'m' || ...) { // etc.
                        throw new IIOException("Bad file signature!");
                }
                // Read width, height, color type, newline
                try {
                        this.width = stream.readInt();
                        this.height = stream.readInt();
                        this.colorType = stream.readUnsignedByte();
                        stream.readUnsignedByte(); // skip newline character
                } catch (IOException e) {
                        throw new IIOException("Error reading header", e)
                }
        }
The actual reading of the image is handled by the read method:
        public BufferedImage read(int imageIndex, ImageReadParam param)
                throws IIOException {
                readMetadata(); // Stream is positioned at start of image data
Handling the ImageReadParam The first section of the method is concerned with using a supplied ImageReadParam object to determine what region of the source image is to be read, what sort of subsampling is to be applied, the selection and rearrangement of bands, and the offset in the destination:

        // Compute initial source region, clip against destination later
        Rectangle sourceRegion = getSourceRegion(param, width, height);

        // Set everything to default values
        int sourceXSubsampling = 1;
        int sourceYSubsampling = 1;
        int[] sourceBands = null;
        int[] destinationBands = null;
        Point destinationOffset = new Point(0, 0);

        // Get values from the ImageReadParam, if any
        if (param != null) {
                sourceXSubsampling = param.getSourceXSubsampling();
                sourceYSubsampling = param.getSourceYSubsampling();
                sourceBands = param.getSourceBands();
                destinationBands = param.getDestinationBands();
                destinationOffset = param.getDestinationOffset();
        }
At this point, the region of interest, subsampling, band selection, and destination offset have been initialized. The next step is to create a suitable destination image. The ImageReader.getDestination method will return any image that was specified using ImageReadParam.setDestination, or else will create a suitable destination image using a supplied ImageTypeSpecifier, in this case determined by calling getImageTypes(0):
        // Get the specified detination image or create a new one
        BufferedImage dst = getDestination(param,
                                           getImageTypes(0),
                                           width, height);
        // Enure band settings from param are compatible with images
        int inputBands = (colorType == COLOR_TYPE_RGB) ? 3 : 1;
        checkReadParamBandSettings(param, inputBands,
                                   dst.getSampleModel().getNumBands());
To reduce the amount of code we have to write, we create a Raster to hold a row's worth of data, and copy the pixels from that Raster into the actual image. In this way, band selection and the details of pixel formatting are taken care of, at the expense of an additional copy.
        int[] bandOffsets = new int[inputBands];
        for (int i = 0; i < inputBands; i++) {
                bandOffsets[i] = i;
        }
        int bytesPerRow = width*inputBands;
        DataBufferByte rowDB = new DataBufferByte(bytesPerRow);
        WritableRaster rowRas =
                Raster.createInterleavedRaster(rowDB,
                                               width, 1, bytesPerRow,
                                               inputBands, bandOffsets,
                                               new Point(0, 0));
        byte[] rowBuf = rowDB.getData();

        // Create an int[] that can a single pixel
        int[] pixel = rowRas.getPixel(0, 0, (int[])null);
Now we have a byte array, rowBuf, which can be filled in from the input data, and which is also the source of pixel data for the Raster rowRaster. We extract the (single) tile of the destination image, and determine its extent. Then we create child rasters of both the source and destination that select and order their bands according to the settings previously extracted from the ImageReadParam:

        WritableRaster imRas = dst.getWritableTile(0, 0);
        int dstMinX = imRas.getMinX();
        int dstMaxX = dstMinX + imRas.getWidth() - 1;
        int dstMinY = imRas.getMinY();
        int dstMaxY = dstMinY + imRas.getHeight() - 1;

        // Create a child raster exposing only the desired source bands
        if (sourceBands != null) {
                rowRas = rowRas.createWritableChild(0, 0,
                                                    width, 1,
                                                    0, 0,
                                                    sourceBands);
        }

        // Create a child raster exposing only the desired dest bands
        if (destinationBands != null) {
                imRas = imRas.createWritableChild(0, 0,
                                                  imRas.getWidth(),
                                                  imRas.getHeight(),
                                                  0, 0,
                                                  destinationBands);
        }
Reading the Pixel Data Now we are ready to begin read pixel data from the image. We will read whole rows, and perform subsampling and destination clipping as we proceed. The horizontal clipping is complicated by the need to take subsampling into account. Here we perform per-pixel clipping; a more sophisticated reader could perform horizontal clipping once:
        for (int srcY = 0; srcY < height; srcY++) {
                // Read the row
                try {
                        stream.readFully(rowBuf);
                } catch (IOException e) {
                        throw new IIOException("Error reading line " + srcY, e);
                }

                // Reject rows that lie outside the source region,
                // or which aren't part of the subsampling
                if ((srcY < sourceRegion.y) ||
                    (srcY >= sourceRegion.y + sourceRegion.height) ||
                    (((srcY - sourceRegion.y) %
                      sourceYSubsampling) != 0)) {
                        continue;
                }

                // Determine where the row will go in the destination
                int dstY = destinationOffset.y +
                        (srcY - sourceRegion.y)/sourceYSubsampling;
                if (dstY < dstMinY) {
                        continue; // The row is above imRas
                }
                if (dstY > dstMaxY) {
                        break; // We're done with the image
                }

                // Copy each (subsampled) source pixel into imRas
                for (int srcX = sourceRegion.x;
                     srcX < sourceRegion.x + sourceRegion.width;
                     srcX++) {
                        if (((srcX - sourceRegion.x) % sourceXSubsampling) != 0) {
                                continue;
                        }
                        int dstX = destinationOffset.x +
                                (srcX - sourceRegion.x)/sourceXSubsampling;
                        if (dstX < dstMinX) {
                                continue;  // The pixel is to the left of imRas
                        }
                        if (dstX > dstMaxX) {
                                break; // We're done with the row
                        }

                        // Copy the pixel, sub-banding is done automatically
                        rowRas.getPixel(srcX, 0, pixel);
                        imRas.setPixel(dstX, dstY, pixel);
                }
        }
        return dst;
For performance, the case where sourceXSubsampling is equal to 1 may be broken out separately, since it is possible to copy multiple pixels at once:
        // Create an int[] that can hold a row's worth of pixels
        int[] pixels = rowRas.getPixels(0, 0, width, 1, (int[])null);

        // Clip against the left and right edges of the destination image
        int srcMinX =
                Math.max(sourceRegion.x,
                     dstMinX - destinationOffset.x + sourceRegion.x);
      int srcMaxX =
                Math.min(sourceRegion.x + sourceRegion.width - 1,
                         dstMaxX - destinationOffset.x + sourceRegion.x);
        int dstX = destinationOffset.x + (srcMinX - sourceRegion.x);
        int w = srcMaxX - srcMinX + 1;
        rowRas.getPixels(srcMinX, 0, w, 1, pixels);
        imRas.setPixels(dstX, dstY, w, 1, pixels);
There are several additional features that readers should implement, namely informing listeners of the progress of the read, and allowing the read process to be aborted from another thread. Listeners There are three types of listeners that may be attached to a reader: IIOReadProgressListener, IIOReadUpdateListener, and IIOReadWarningListener. Any number of each type may be attached to a reader by means of various add and remove methods that are implemented in the ImageReader superclass. ImageReader also contains various process methods that broadcast information to all of the attached listeners of a given type. For example, when the image read begins, the method processImageStarted(imageIndex) should be called to inform all attached IIOReadProgressListeners of the event.

A reader plug-in is normally responsible for calling processImageStarted and processImageComplete at the beginning and end of its read method, respectively. processImageProgress should be called at least every few scanlines with an estimate of the percentage completion of the read. It is important that this percentage never decrease during the read of a single image. If the reader supports thumbnails, the corresponsing thumbnail progress methods should be called as well. The processSequenceStarted and processSequenceComplete methods of IIOReadProgressListener only need to be called if the plug-in overrides the superclass implementation of readAll.

More advanced readers that process incoming data in multiple passes may choose to support IIOReadUpdateListeners, which receive more detauled information about which pixels have been read so far. Applications may use this information to perform selective updates of an on-screen image, for example, or to re-encode image data in a streaming fashion.

Aborting the Read Process While one thread performs an image read, another thread may call the reader's abort method asynchronously. The reading thread should poll the reader's status periodically using the abortRequested method, and attempt to cut the decoding short. The partially decoded image should still be returned, although the reader need not make any guarantees about its contents. For example, it could contain compressed or encrypted data in its DataBuffer that does not make sense visually. IIOReadProgressListener Example A typical set of IIOReadProgressListener calls might look like this:

public BufferedImage read(int imageIndex, ImageReadParam param)
        throws IOException {
        // Clear any previous abort request
        boolean aborted = false;
        clearAbortRequested();

        // Inform IIOReadProgressListeners of the start of the image
        processImageStarted(imageIndex);

        // Compute xMin, yMin, xSkip, ySkip from the ImageReadParam
        // ...

        // Create a suitable image
        BufferedImage theImage = new BufferedImage(...);

        // Compute factors for use in reporting percentages
        int pixelsPerRow = (width - xMin + xSkip - 1)/xSkip;
        int rows = (height - yMin + ySkip - 1)/ySkip;
        long pixelsDecoded = 0L;
        long totalPixels = rows*pixelsPerRow;

        for (int y = yMin; y < height; y += yskip) {
                // Decode a (subsampled) scanline of the image
                // ...

                // Update the percentage estimate
                // This may be done only every few rows if desired
                pixelsDecoded += pixelsPerRow;
                processImageProgress(100.0F*pixelsDecoded/totalPixels);

                // Check for an asynchronous abort request
                if (abortRequested()) {
                        aborted = true;
                        break;
                }
        }

        // Handle the end of decoding
        if (aborted) {
                processImageAborted();
        } else {
                processImageComplete(imageIndex);
        }

        // If the read was aborted, we still return a partially decoded image
        return theImage;
}
Metadata The next set of methods in MyFormatImageReader deal with metadata. Because our hypothetical format only encodes a single image, we may ignore the concept of "stream" metadata, and use "image" metadata only:
        MyFormatMetadata metadata = null; // class defined below

        public IIOMetadata getStreamMetadata()
                throws IIOException {
                return null;
        }

        public IIOMetadata getImageMetadata(int imageIndex)
                throws IIOException {
                if (imageIndex != 0) {
                        throw new IndexOutOfBoundsException("imageIndex != 0!");
                }
                readMetadata();
                return metadata;
        }
The actual work is done by a format-specific method readMetadata, which for this format fills in the keyword/value pairs of the metadata object,
        public void readMetadata() throws IIOException {
                if (metadata != null) {
                        return;
                }
                readHeader();
                this.metadata = new MyFormatMetadata();
                try {
                        while (true) {
                                String keyword = stream.readUTF();
                                stream.readUnsignedByte();
                                if (keyword.equals("END")) {
                                        break;
                                }
                                String value = stream.readUTF();
                                stream.readUnsignedByte();

                                metadata.keywords.add(keyword);
                                metadata.values.add(value);
                        } catch (IIOException e) {
                                throw new IIOException("Exception reading metadata",
                                                       e);
                        }
                }
        }
MyFormatMetadata Finally, the various interfaces for extracting and editing metadata must be defined. We define a class called MyFormatMetadata that extends the IIOMetadata class, and additionally can store the keyword/value pairs that are allowed in the file format:
package com.mycompany.imageio;

import org.w3c.dom.*;
import javax.xml.parsers.*; // Package name may change in JDK 1.4

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.imageio.metadata.IIOInvalidTreeException;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.metadata.IIOMetadataFormat;
import javax.imageio.metadata.IIOMetadataNode;

public class MyFormatMetadata extends IIOMetadata {

        static final boolean standardMetadataFormatSupported = false;
        static final String nativeMetadataFormatName =
                "com.mycompany.imageio.MyFormatMetadata_1.0";
        static final String nativeMetadataFormatClassName =
                "com.mycompany.imageio.MyFormatMetadata";
        static final String[] extraMetadataFormatNames = null;
        static final String[] extraMetadataFormatClassNames = null;

        // Keyword/value pairs
        List keywords = new ArrayList();
        List values = new ArrayList();
The first set of methods are common to most IIOMetadata implementations:
        public MyFormatMetadata() {
                super(standardMetadataFormatSupported,
                      nativeMetadataFormatName,
                      nativeMetadataFormatClassName,
                      extraMetadataFormatNames,
                      extraMetadataFormatClassNames);
        }

        public IIOMetadataFormat getMetadataFormat(String formatName) {
                if (!formatName.equals(nativeMetadataFormatName)) {
                        throw new IllegalArgumentException("Bad format name!");
                }
                return MyFormatMetadataFormat.getDefaultInstance();
        }
The most important method for reader plug-ins is getAsTree:
        public Node getAsTree(String formatName) {
                if (!formatName.equals(nativeMetadataFormatName)) {
                        throw new IllegalArgumentException("Bad format name!");
                }

                // Create a root node
                IIOMetadataNode root =
                        new IIOMetadataNode(nativeMetadataFormatName);

                // Add a child to the root node for each keyword/value pair
                Iterator keywordIter = keywords.iterator();
                Iterator valueIter = values.iterator();
                while (keywordIter.hasNext()) {
                        IIOMetadataNode node =
                                new IIOMetadataNode("KeywordValuePair");
                        node.setAttribute("keyword", (String)keywordIter.next());
                        node.setAttribute("value", (String)valueIter.next());
                        root.appendChild(node);
                }

                return root;
        }
For writer plug-ins, the ability to edit metadata values is obtained by implementing the isReadOnly, reset, and mergeTree methods:
        public boolean isReadOnly() {
            return false;
        }

        public void reset() {
            this.keywords = new ArrayList();
            this.values = new ArrayList();
        }

        public void mergeTree(String formatName, Node root)
                throws IIOInvalidTreeException {
                if (!formatName.equals(nativeMetadataFormatName)) {
                        throw new IllegalArgumentException("Bad format name!");
                }

                Node node = root;
                if (!node.getNodeName().equals(nativeMetadataFormatName)) {
                        fatal(node, "Root must be " + nativeMetadataFormatName);
                }
                node = node.getFirstChild();
                while (node != null) {
                        if (!node.getNodeName().equals("KeywordValuePair")) {
                                fatal(node, "Node name not KeywordValuePair!");
                        }
                        NamedNodeMap attributes = node.getAttributes();
                        Node keywordNode = attributes.getNamedItem("keyword");
                        Node valueNode = attributes.getNamedItem("value");
                        if (keywordNode == null || valueNode == null) {
                                fatal(node, "Keyword or value missing!");
                        }

                        // Store keyword and value
                        keywords.add((String)keywordNode.getNodeValue());
                        values.add((String)valueNode.getNodeValue());

                        // Move to the next sibling
                        node = node.getNextSibling();
                }
        }

        private void fatal(Node node, String reason)
                throws IIOInvalidTreeException {
                throw new IIOInvalidTreeException(reason, node);
        }
}
MyFormatMetadataFormat The tree structure of the metadata may be described using the IIOMetadataFormat interface. An implementation class, IIOMetadataFormatImpl, takes care of maintaining the "database" of information about elements, their attributes, and the parent-child relationships between them:
package com.mycompany.imageio;

import javax.imageio.ImageTypeSpecifier;
import javax.imageio.metadata.IIOMetadataFormatImpl;

public class MyFormatMetadataFormat extends IIOMetadataFormatImpl {

        // Create a single instance of this class (singleton pattern)
        private static MyFormatMetadataFormat defaultInstance =
                new MyFormatMetadataFormat();

        // Make constructor private to enforce the singleton pattern
        private MyFormatMetadataFormat() {
                // Set the name of the root node
                // The root node has a single child node type that may repeat
                super("com.mycompany.imageio.MyFormatMetadata_1.0",
                      CHILD_POLICY_REPEAT);

                // Set up the "KeywordValuePair" node, which has no children
                addElement("KeywordValuePair",
                           "com.mycompany.imageio.MyFormatMetadata_1.0",
                           CHILD_POLICY_EMPTY);

                // Set up attribute "keyword" which is a String that is required
                // and has no default value
                addAttribute("KeywordValuePair", "keyword", DATATYPE_STRING,
                             true, null);
                // Set up attribute "value" which is a String that is required
                // and has no default value
                addAttribute("KeywordValuePair", "value", DATATYPE_STRING,
                             true, null);
        }

        // Check for legal element name
        public boolean canNodeAppear(String elementName,
                                     ImageTypeSpecifier imageType) {
                return elementName.equals("KeywordValuePair");
        }

        // Return the singleton instance
        public static MyFormatMetadataFormat getDefaultInstance() {
                return defaultInstance;
        }
}

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

4.4 Writing Writer Plug-ins

MyFormatImageWriterSpi The MyFormatImageWriterSpi call plays a similar role to the MyFormatImageReaderSpi class discussed in the previous section. However, instead of being responsible for determining whether a given stream can be read, it must deterine whether an image in memory can be written. Rather than inspecting the image itself, an ImageTypeSpecifier is used so that writers may be selected before an actual image is available.
package com.mycompany.imageio;

import java.io.IOException;
import java.util.Locale;
import javax.imageio.ImageWriter;
import javax.imageio.ImageTypeSpecifier;
import javax.imageio.spi.ImageWriterSpi;
import javax.imageio.stream.ImageInputStream;

public class MyFormatImageWriterSpi extends ImageWriterSpi {

        static final String vendorName = "My Company";
        static final String version = "1.0_beta33_build9467";
        static final String writerClassName =
                "com.mycompany.imageio.MyFormatImageWriter";
        static final String[] names = { "myformat" };
        static final String[] suffixes = { "myf" };
        static final String[] MIMETypes = { "image/x-myformat" };
        static final String[] readerSpiNames = {
                "com.mycompany.imageio.MyFormatImageReaderSpi" };

        static final boolean supportsStandardStreamMetadataFormat = false;
        static final String nativeStreamMetadataFormatName = null;
        static final String nativeStreamMetadataFormatClassName = null;
        static final String[] extraStreamMetadataFormatNames = null;
        static final String[] extraStreamMetadataFormatClassNames = null;
        static final boolean supportsStandardImageMetadataFormat = false;
        static final String nativeImageMetadataFormatName =
                "com.mycompany.imageio.MyFormatMetadata_1.0";
        static final String nativeImageMetadataFormatClassName =
                "com.mycompany.imageio.MyFormatMetadata";
        static final String[] extraImageMetadataFormatNames = null;
        static final String[] extraImageMetadataFormatClassNames = null;

        public MyFormatImageWriterSpi() {
                super(vendorName, version,
                      names, suffixes, MIMETypes,
                      writerClassName,
                      STANDARD_OUTPUT_TYPE, // Write to ImageOutputStreams
                      readerSpiNames,
                      supportsStandardStreamMetadataFormat,
                      nativeStreamMetadataFormatName,
                      nativeStreamMetadataFormatClassName,
                      extraStreamMetadataFormatNames,
                      extraStreamMetadataFormatClassNames,
                      supportsStandardImageMetadataFormat,
                      nativeImageMetadataFormatName,
                      nativeImageMetadataFormatClassName,
                      extraImageMetadataFormatNames,
                      extraImageMetadataFormatClassNames);
        }

        public boolean canEncodeImage(ImageTypeSpecifier imageType) {
                int bands = imageType.getNumBands();
                return bands == 1 || bands == 3;
        }

        public String getDescription(Locale locale) {
                // Localize as appropriate
                return "Description goes here";
        }

        public ImageWriter createWriterInstance(Object extension) {
            return new MyFormatImageWriter(this);
        }
}
MyFormatImageWriter
package com.mycompany.imageio;

import java.awt.Rectangle;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
import java.io.IOException;
import java.util.Iterator;
import javax.imageio.IIOException;
import javax.imageio.IIOImage;
import javax.imageio.ImageTypeSpecifier;
import javax.imageio.ImageWriteParam;
import javax.imageio.ImageWriter;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.spi.ImageWriterSpi;
import javax.imageio.stream.ImageOutputStream;

public class MyFormatImageWriter extends ImageWriter {

        ImageOutputStream stream = null;

        public MyFormatImageWriter(ImageWriterSpi originatingProvider) {
                super(originatingProvider);
        }

        public void setOutput(Object output) {
                super.setOutput(output);
                if (output != null) {
                        if (!(output instanceof ImageOutputStream)) {
                                throw new IllegalArgumentException
                                        ("output not an ImageOutputStream!");
                        }
                        this.stream = (ImageOutputStream)output;
                } else {
                        this.stream = null;
                }
        }
The ImageWriteParam returned by getDefaultWriteParam must be customized based on the writer's capabilities. Since this writer does not support tiling, progessive encoding, or compression, we pass in values of false or null as appropriate:
        // Tiling, progressive encoding, compression are disabled by default
        public ImageWriteParam getDefaultWriteParam() {
                return new ImageWriteParam(getLocale());
        }
The format only handles image metadata. The convertImageMetadata method does very little; it could be defined to interpret the metadata classes used by other plug-ins.

  public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param) {
                return null;
        }

        public IIOMetadata
                getDefaultImageMetadata(ImageTypeSpecifier imageType,
                                        ImageWriteParam param) {
                return new MyFormatMetadata();
        }

        public IIOMetadata convertStreamMetadata(IIOMetadata inData,
                                                 ImageWriteParam param) {
                return null;
        }

        public IIOMetadata convertImageMetadata(IIOMetadata inData,
                                                ImageTypeSpecifier imageType,
                                                ImageWriteParam param) {
                // We only understand our own metadata
                if (inData instanceof MyFormatMetadata) {
                        return inData;
                } else {
                        return null;
                }
        }
The actual writing of the image requires first applying the source region, source bands, and subsampling factors from the ImageWriteParam. The source region and source bands may be handled by creating a child Raster. For simplicity, we extract a single Raster from the source image. If the source image is tiled, we can save memory by extracting smaller Rasters as needed.
        public void write(IIOMetadata streamMetadata,
                          IIOImage image,
                          ImageWriteParam param) throws IIOException {
                RenderedImage im = image.getRenderedImage();

                Rectangle sourceRegion =
                        new Rectangle(0, 0, im.getWidth(), im.getHeight());
                int sourceXSubsampling = 1;
                int sourceYSubsampling = 1;
                int[] sourceBands = null;
                if (param != null) {
                        sourceRegion =
                                sourceRegion.intersection(param.getSourceRegion());
                        sourceXSubsampling = param.getSourceXSubsampling();
                        sourceYSubsampling = param.getSourceYSubsampling();
                        sourceBands = param.getSourceBands();

                        int subsampleXOffset = param.getSubsamplingXOffset();
                        int subsampleYOffset = param.getSubsamplingYOffset();
                        sourceRegion.x += subsampleXOffset;
                        sourceRegion.y += subsampleYOffset;
                        sourceRegion.width -= subsampleXOffset;
                        sourceRegion.height -= subsampleYOffset;
                }

                // Grab a Raster containing the region of interest
                int width = sourceRegion.width;
                int height = sourceRegion.height;
                Raster imRas = im.getData(sourceRegion);
                int numBands = imRas.getNumBands();

                // Check that sourceBands values are in range
                if (sourceBands != null) {
                        for (int i = 0; i < sourceBands.length; i++) {
                                if (sourceBands[i] >= numBands) {
                                        throw new IllegalArgumentException("bad band!");
                                }
                        }
                }

                // Translate imRas to start at (0, 0) and subset the bands
                imRas = imRas.createChild(sourceRegion.x, sourceRegion.y,
                                          width, height,
                                          0, 0,
                                          sourceBands);

                // Reduce width and height according to subsampling factors
                width = (width + sourceXSubsampling - 1)/sourceXSubsampling;
                height = (height + sourceYSubsampling - 1)/sourceYSubsampling;

                // Assume 1 band image is grayscale, 3 band image is RGB
                int colorType;
                if (numBands == 1) {
                        colorType = MyFormatImageReader.COLOR_TYPE_GRAY;
                } else if (numBands == 3) {
                        colorType = MyFormatImageReader.COLOR_TYPE_RGB;
                } else {
                        throw new IIOException("Image must have 1 or 3 bands!");
                }
Once the image dimensions and color type of the image have been ascertained, the plug-in is ready to write the file header:
                try {
                        byte[] signature = {
                                (byte)'m', (byte)'y',  (byte)'f', (byte)'o',
                                (byte)'r', (byte)'m',  (byte)'a', (byte)'t'
                        };
                        // Output header information
                        stream.write(signature);
                        stream.write(`\n');
                        stream.writeInt(width);
                        stream.writeInt(height);
                        stream.writeByte(colorType);
                        stream.write(`\n');
Next, the plug-in extracts the image metadata from the write method's IIOImage argument, and attempts to convert it into a MyFormatMetadata object by calling convertImageMetadata. If the result is non-null, the keywords and values are extracted from the metadata and written to the output:
                        // Attempt to convert metadata, if present
                        IIOMetadata imd = image.getMetadata();
                        MyFormatMetadata metadata = null;
                        if (imd != null) {
                                ImageTypeSpecifier type =
                                        ImageTypeSpecifier.createFromRenderedImage(im);
                                metadata =
                                        (MyFormatMetadata)convertImageMetadata(imd,
                                                                               type,
                                                                               null);
                        }

                        // Output metadata if present
                        if (metadata != null) {
                                Iterator keywordIter = metadata.keywords.iterator();
                                Iterator valueIter = metadata.values.iterator();
                                while (keywordIter.hasNext()) {
                                        String keyword = (String)keywordIter.next();
                                        String value = (String)valueIter.next();

                                        stream.writeUTF(keyword);
                                        stream.write(`\n');
                                        stream.writeUTF(value);
                                        stream.write(`\n');
                                }
                        }
                        stream.writeUTF("END");
                        stream.write(`\n');
Finally, the plug-in is ready to begin writing the pixel data. The image Raster is copied into an int array, one row at a time using the getPixels method. Then these values are subsampled using the horizontal subsampling factor, and copied into a byte array, which is written to the output with a single write call. The source row is then incremented by the vertical subsampling factor until the end of the source region is reached, and the output stream is flushed:
                        // Output (subsampled) pixel values
                        int rowLength = width*numBands;
                        int xSkip = sourceXSubsampling*numBands;
                        int[] rowPixels = imRas.getPixels(0, 0, width, 1,
                                                          (int[])null);
                        byte[] rowSamples = new byte[rowLength];

                        // Output every (sourceYSubsampling)^th row
                        for (int y = 0; y < height; y += sourceYSubsampling) {
                                imRas.getPixels(0, y, width, 1, rowPixels);

                                // Subsample horizontally and convert to bytes
                                int count = 0;
                                for (int x = 0; x < width; x += xSkip) {
                                        if (colorType ==
                                                MyFormatImageReader.COLOR_TYPE_GRAY) {
                                                rowSamples[count++] = (byte)rowPixels[x];
                                        } else {
                                                rowSamples[count++] = (byte)rowPixels[x];
                                                rowSamples[count++] =
                                                        (byte)rowPixels[x + 1];
                                                rowSamples[count++] =
                                                        (byte)rowPixels[x + 2];
                                        }
                                }

                                // Output a row's worth of bytes
                                stream.write(rowSamples, 0, width*numBands);
                        }
                        stream.flush();
                } catch (IOException e) {
                        throw new IIOException("I/O error!", e);
                }
        }
}

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

4.5 Writing Transcoder Plug-ins

A transcoder plug-in consists of an ImageTranscoderSpi, which performs the same functions as do the Spi classes for other plug-ins, and an object that implements the ImageTranscoder interface:
IIOMetadata convertStreamMetadata(IIOMetadata inData,
                                  ImageWriteParam param);

IIOMetadata convertImageMetadata(IIOMetadata inData,
                                 ImageTypeSpecifier imageType,
                                 ImageWriteParam param);
The ImageTranscoder may use the standard interfaces to unpack the incoming metadata, or it may make use of interfaces that are specific to the actual object at hand. For example, it could access the keywords and values instance variables of the MyFormatMetadata class defined above; these were made public, but not documented, precisely in order to allow a transcoder plug-in developer to access them without having to go through a DOM representation.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

4.2 Embedding Plug-ins in JAR Files

Since a plug-in consists of several classes, the JAR file mechanism is used to allow them to be combined into a single file. In addition to class files, JAR files may contain additional files used to describe their contents. In particular, a JAR file may contain a META-INF/services directory that is used to list any service providers that are contained in the file. For each service provider interface that is implemented by a class stored in the JAR file, a file whose name is the fully-qualified class name of the service provider interface is placed within the services directory. The file should contain the fully-qualified class names of the implementation classes present in the JAR file, one per line. For example, if the JAR file contains a service provider class named com.mycompany.mypackage.MyImageReaderSpi, which implements the javax.imageio.spi.ImageReaderSpi interface, there should be a file named META-INF/services/javax.imageio.spi.ImageReaderSpi containing the line com.mycompany.mypackage.MyImageReaderSpi.

The Image I/O API will automatically examine any JAR files that are found on the class path, and identify those that contain Image I/O plug-ins. For each plug-in found, a single instance of its service provider class will be instantiated and stored in a run-time registry class, javax.iamgeio.spi.IIORegistry.

JAR files on the application class path (i.e., the path set using the CLASSPATH variable), or elsewhere (e.g., available via a network URL) may be loaded by the application. They are not loaded by default in order to minimize startup time.

The javax.imageio.spi.IIORegistry class may also be used at run-time to deregister installed plug-ins and to register new ones. In particular, it is possible to use a ClassLoader to load a plug-in over the network, which may then be registered and used exactly like a locally installed plug-in.

Most applications should not need to deal directly with the registry. Instead, they may make use of convenience methods contained within the javax.imageio.ImageIO class that search for appropriate plug-ins automatically.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

4.6 Writing Stream Plug-ins

The standard classes in the javax.imageio.stream package are able to create ImageInputStreams and ImageOutputStreams that:
  • Read from a File
  • Read from an InputStream, using a temporary File as a cache
  • Read from an InputStream, using a byte array in memory as a cache
  • Write to a File
  • Write to an OutputStream, using a temporary File as a cache
  • Write to an OutputStream, using a byte array in memory as a cache
It is possible to write new implementations of ImageInputStream and InmageOutputStream that interface with other I/O primitives (for example, databases or future fast I/O interfaces). The ImageInputStreamImpl and ImageOutputStreamImpl classes provide a base for subclassing. Only a handful of methods are required to be implemented by the subclass, although it is possible to implement more for greater efficiency:
  • int read()
  • int read(byte[] b, int off, int len)
  • write(int b)
  • write(byte[] b, int off, int len)
  • seek(long pos)

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Writing Image I/O Plug-ins

Documentation Contents
CONTENTS | PREV | NEXT

CHAPTER 4

Writing Image I/O Plug-ins

4.1 The Plug-in Concept

The Image I/O API is designed as a pluggable framework into which any developer may add their own "plug-ins." A plug-in is defined as a set of Java language classes which may be loaded into the API at run-time and which add functionality to the AP I. In the context of the Java Image I/O API, a plug-in may provide the ability to read image data from a new file format, to write image data in a new format, to "transcode" non-image metadata between two formats, or to read or write streaming dat a from or to a new data source or sink. A plug-in may also provide support for the same format as another plug-in, perhaps providing better performance, more features, or a different view of the data stored by the format.

In order for plug-ins to be added to a running Java Virtual Machine, they must be compiled into Java bytecode files (class files). These class files will contain the code for subclasses of various classes defined by the API. For example, a plug-in that pr ovides the capability to read images will include a new subclass of the abstract javax.imageio.ImageReader class defined by the API. The usual reversed Internet domain name convention may be used to guarantee uniqueness of class names.

Because loading and instantiating an entire plug-in may be expensive, an additional class is used as a "stand-in" to provide information about the plug-in. This class may be used, for example, to determine what formats are handled by the plug-in p rior to actually instantiating the plug-in.

The "stand-in" object is lightweight enough that it can be loaded and a single instance instantiated every time the API is used within a given invocation of the Java virtual machine. This pattern, in which a small class is used to provide informat ion about an available service, is referred to as a "service provider interface."

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Image I/O API Guide

Documentation Contents
PREV | NEXT

1. Introduction
1.1 The Java Image I/O API
1.2 About This Document
1.3 Platforms
1.4 Target Audience
1.5 Acknowledgements
2. Goals
2.1 API Goals
2.1.1 Client-Side Application Goals
2.1.2 Server Use Cases
2.2 Non-Goals
3. Writing Image I/O Applications
3.1 Reading and Writing Images
3.2 Going Further
3.3 ImageReader
3.3.1 ImageReadParam
3.3.2 IIOParamController
3.3.3 Reading From Multi-Image Files
3.3.4 Reading "Thumbnail" Images
3.4 The ImageWriter Class
3.4.1 Writing Multiple Images
3.5 Handling Metadata
3.5.1 The IIOMetadataFormat Interface
3.6 Transcoding
3.7 Listening for Events
3.7.1 The IIOReadProgressListener Interface
3.7.2 The IIOReadUpdateListener Interface
3.7.3 The IIOReadWarningListener Interface
3.7.4 The IIOWriteProgressListener and IIOWriteWarningListener Interfaces
3.8 Handling Errors using IIOException
4. Writing Image I/O Plug-ins
4.1 The Plug-in Concept
4.2 Embedding Plug-ins in JAR Files
4.3 Writing Reader Plug-Ins
4.4 Writing Writer Plug-ins
4.5 Writing Transcoder Plug-ins
4.6 Writing Stream Plug-ins

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Image I/O API Guide

Phil Race, Dan Rice, Raúl Vera

April 2001

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Core Java IMF Enhancements

Documentation Contents

Java IMF Enhancements

Java has added functionality as listed below:

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Client API Reference

The following classes are part of the input method client API:

  • java.awt.event
    • java.awt.event.InputMethodEvent
    • java.awt.event.InputMethodListener
  • java.awt.im
    • java.awt.im.InputContext
    • java.awt.im.InputMethodHighlight
    • java.awt.im.InputMethodRequests
    • java.awt.im.InputSubset

    In addition, the following classes and members in other frameworks support the input method client API:

  • java.awt
    • java.awt.AWTEvent
      • INPUT_METHOD_EVENT_MASK
    • java.awt.AWTEventMulticaster
      • add(InputMethodListener, InputMethodListener)
      • caretPositionChanged(InputMethodEvent)
      • inputMethodTextChanged(InputMethodEvent)
      • remove(InputMethodListener, InputMethodListener)
    • java.awt.Component
      • addInputMethodListener(InputMethodListener)
      • enableInputMethods(boolean)
      • getInputContext()
      • getInputMethodRequests()
      • processInputMethodEvent(InputMethodEvent)
      • removeInputMethodListener(InputMethodListener)
    • java.awt.Graphics
      • drawString(AttributedCharacterIterator, int, int)
    • java.awt.Toolkit
      • mapInputMethodHighlight
    • java.awt.Window
      • getInputContext()
  • java.awt.font
    • java.awt.font.TextAttribute
      • INPUT_METHOD_UNDERLINE
      • UNDERLINE_LOW_ONE_PIXEL
      • UNDERLINE_LOW_TWO_PIXEL
      • UNDERLINE_LOW_DOTTED
      • UNDERLINE_LOW_GRAY
      • UNDERLINE_LOW_DASHED
  • java.lang
    • java.lang.Character.Subset
  • java.text
    • java.text.Annotation
    • java.text.AttributedCharacterIterator
    • java.text.AttributedCharacterIterator.Attribute
    • java.text.AttributedString

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Client API Tutorial

Contents

  1. Implementing an Active Client Component
    • Handling Input Method Events
    • Handling Input Method Highlight Attributes
    • Handling Input Method Requests
    • Ending Input Operations
  2. Enhancing an Active Client Component
    • Handling Additional Text Attributes
    • Creating Private Input Contexts
    • Selecting Input Methods
    • Setting an Expected Character Subset
    • Using Engine-Specific Functionality
  3. Implementing a Non-Client
  4. Sample Code

1. Implementing an Active Client Component

The input method client API makes it possible for client components to implement integrated text input user interfaces such as on-the-spot input. The API defines events and methods that facilitate the communication between a client component and an input method. It also lets the client component request an input method for a particular language.

Since the API doesn't make any assumptions about how and where the text is drawn, it can also be used to implement other input styles such as over-the-spot editing. In this style, the composed text is drawn over surrounding text and covers it instead of being integrated and formatted with it.

Any client component class can become an active client of the input method client API and thus support an integrated text input user interface by performing the following steps:

  • Implement the InputMethodListener interface to handle incoming InputMethodEvents generated by the current input method, and register the listener.
  • Implement the InputMethodRequests interface and override getInputMethodRequests to return the request handler.
  • Store InputMethodHighlight attributes along with composed text and pass them on to the drawing routines.
  • End input operations when the user initiates an operation that requires all text to be committed.

Optionally, the client component can also use the following functionality:

  • Store other text attributes that are created by input methods, and return them when text is requested.
  • Create a private input context (instead of sharing one with other components in the same window).
  • Select input methods, for example, based on the language of the text being edited.
  • Set an expected character subset.

Client components don't need to deal with setting up input contexts, activating or deactivating contexts, or dispatching events to input methods, since all this is handled automatically by AWT.

Handling Input Method Events

The input method framework provides an event class, InputMethodEvent, to support the communication between input methods and text components. The class has two separate event kinds: text changed and caret changed. An event listener interface, InputMethodListener, supports these two events. An active client component must implement the InputMethodListener interface, register the listener, and handle both kinds of events.

InputMethodEvent instances are sent to the client component when there is a change to the user's input text, its highlighting, or to the caret location within the composed text. The event sent for caret-only changes is a simplified version of the one for text changes (it just doesn't have text information), so the following discussion assumes the text-changed event.

An event reporting a text change has a reference to an instance of AttributedCharacterIterator that represents either composed text or committed text or both together. The event's committed character count value specifies how many characters in the iterator's range are committed text; all remaining characters are composed text. Committed text always precedes composed text. If the component has no previous composed text, the committed and composed text replace any selected text or are inserted at the current insertion position of the component's text. If there is previous composed text, the entire previous composed text is replaced with the new committed and composed text. The insertion point moves to the end of the committed text. The client component is responsible for redrawing the updated text.

The event also contains information about the current caret location within the composed text (null if no caret is to be displayed), and about the part of the composed text that is most important to keep in view (null if the input method doesn't have a recommendation).

Handling Input Method Highlight Attributes

The text component generally draws the composed text as part of the text being edited, using its regular text layout and drawing functionality. However, it needs to add certain highlight style attributes to the composed text to indicate the current state of the composition. The framework defines these style attributes as abstract styles (for example, "unconverted unselected text" or "converted selected text"), and maps them internally to platform-dependent concrete styles (for example, 2-pixel gray underline).

Highlight attributes are represented by the InputMethodHighlight class. Instances of this class are used as attribute values of the AttributedCharacterIterator instances representing composed text. Text components must store these attributes with the composed text and pass them on to the drawing routines when drawing composed text. They can use either the drawString methods that accept AttributedCharacterIterator, or create a TextLayout from the iterator and use its draw method. These drawing methods interact with the input method framework to map abstract to concrete highlight styles. Text components using these methods therefore generally do not need to be concerned with the internal details of the input method highlights. If a text component uses some other mechanism to render the text, it should check the input method highlight for concrete style information, and, if none is provided, use Toolkit.mapInputMethodHighlight to map to a concrete style.

Some input methods may treat highlights as "annotations". Annotations are attributes that apply to a specified range of text, but not to subranges or the concatenation of ranges. They are represented by wrapping the InputMethodHighlight instance into an Annotation instance. Input methods may use annotation highlights to separate text segments that will be converted as separate units. On some platforms, these highlights are rendered so as to make the segments visible, for example, by using underlines with short breaks between the segments. Text components have to be able to handle input method highlights whether they are wrapped in Annotation instances or not. If a text component implements line wrapping, special care needs to be taken when the range to which a highlight annotation applies crosses a line boundary: The normal behavior (implemented, for example, in AttributedString) would be to discard the attribute because it doesn't apply to subranges. But, since in this case there's only a visual break and not a logical break, the highlight needs to be preserved - it has to be treated as if it applied to the subranges that are rendered on separate lines. One way to do this is by implementing the AttributedCharacterIterator in a way that returns highlight annotations even for subranges of the intended range.

Handling Input Method Requests

An input method needs to access component information to perform input operations. For example, an input method needs to know the location where a list of possible choices can be shown.

An active client component therefore must implement the InputMethodRequests interface, and override getInputMethodRequests to return the request handler. The interface includes methods to:

  • Perform conversions between screen coordinates and offsets within the composed text.
  • Obtain specified text of the component.
  • Cancel the latest committed text.
  • Obtain the insertion position within the component's committed text.

Ending Input Operations

Input methods typically recognize some user actions that end input operations, for example, an operation that commits all uncommitted text. However, there are also user actions that start operations for which input operations should be ended, but that an input method cannot recognize. Saving the document containing the text is one such example. In these cases, the component has to explicitly call the input context's endComposition method.

2. Enhancing an Active Client Component

Handling Additional Text Attributes

In addition to the input method highlight information, input methods may also attach other attributes to the text they send to a text component. These attributes may be useful information for the component. They may also improve the input method's performance if returned by the InputMethodRequest methods. For the latter reason, it is recommended that text components keep this attribute information around while the text is being edited, and return it with any text requested.

The AttributedCharacterIterator.Attribute class defines the following common attributes:

  • LANGUAGE - the language of the text, specified as a Locale object.
  • READING - a phonetic representation (yomi in Japanese), specified as a String object.
  • INPUT_METHOD_SEGMENT - segmentation information used by input methods.

Input methods written in the Java programming language may define additional attributes.

Creating Private Input Contexts

By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's containment hierarchy. This reduces the number of instances created overall, and lets input methods combine information about all the text entered in this window (input methods often use information about previously entered text to improve their conversion accuracy). It means, however, that only one input operation is possible at any one time within a window, and that the text needs to be committed when moving the focus from one text component to another. If this is not desired, text components can create their own input context instances and override getInputContext to return them. A component that doesn't have its own input context uses the one used by its parent.

Selecting Input Methods

Text components can use the input context's selectInputMethod operation to select an input method for a given language or locale. This may be helpful, for example, if the user clicks in text that is written in that language, since it's likely that she wants to continue in the same language. Or, the text component may know that the application only allows text in a certain language to be entered.

Setting an Expected Character Subset

Text components can use the input context's setCharacterSubsets operation to tell input methods which characters can be meaningfully entered. For example, a database application may know that certain fields should only receive input in hiragana (one of the syllabic subscripts used in Japanese), another one only Latin characters, a third one any kind of characters. Passing on this information to input methods may allow the input methods to limit the range of characters that can be entered, or to switch to a different input mode that particularly supports the specified character subsets.

Using Engine-Specific Functionality

Some input methods may provide functionality to client components that can not be made available through the input method framework API. This is possible through input method control objects. The input method developer must publish an interface for these objects. Client components that want to take advantage of the additional functionality can then call InputContext.getInputMethodControlObject, check whether the returned object is an instance of a known control object class, and if it is, call its methods.

3. Implementing a Non-Client

By default, all components that process key events are clients of the input method framework, that is, input method support is enabled for them. In some cases, components may not want to have their input processed by input methods. For example, games may want to interpret keyboard events directly. These components should call enableInputMethods(false), so that events do not get forwarded to input methods.

4. Sample Code

This sample code shows how to implement the different kinds of input method clients that are possible with the input method framework: an active client, a passive client, a non-client, and a peered text component.

  • Applet - run this applet in a browser, and you can experiment with the different client components.
  • Source Code
    • IMFDemo.java - the applet/application that contains the different client components.
    • LWTextComponent.java - a lightweight text editing component that doesn't know about input methods, but can be extended to an active client.
    • ActiveClient.java - extends LWTextComponent to become an active client component.
    • PeeredTextArea.java - a peered text component.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Engine SPI Reference

The following classes are part of the input method engine SPI:

  • java.awt.im.spi
    • Package Specification
    • java.awt.im.spi.InputMethod
    • java.awt.im.spi.InputMethodDescriptor
    • java.awt.im.spi.InputMethodContext
  • java.awt.im
    • java.awt.im.InputMethodHighlight
    • java.awt.im.InputMethodRequests
    • java.awt.im.InputSubset
  • java.awt.event
    • java.awt.event.InputMethodEvent

    In addition, the following classes and members in other frameworks support the input method engine SPI:

  • java.awt.font
    • java.awt.font.TextAttribute
      • INPUT_METHOD_UNDERLINE
      • UNDERLINE_LOW_ONE_PIXEL
      • UNDERLINE_LOW_TWO_PIXEL
      • UNDERLINE_LOW_DOTTED
      • UNDERLINE_LOW_GRAY
      • UNDERLINE_LOW_DASHED
  • java.lang
    • java.lang.Character.Subset
  • java.text
    • java.text.Annotation
    • java.text.AttributedCharacterIterator
    • java.text.AttributedCharacterIterator.Attribute
    • java.text.AttributedString
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Engine SPI Tutorial

Contents

  1. Introduction
  2. Describing the Input Method
  3. Communicating with the Client Component
  4. Using Input Method Windows
  5. Implementing Composition
  6. Providing Engine-Specific Functionality
  7. Packaging the Input Method
  8. Sample Code

1. Introduction

The input method engine SPI enables the development of input methods in the Java programming language that can be used with any JRE. As far as the input method framework is concerned, an input method consists of two classes implementing the InputMethodDescriptor and InputMethod interfaces, packaged with some additional information as an extension and installed into a Java runtime. The specifications for the java.awt.im.spi package, and the InputMethodDescriptor and InputMethod interfaces provide the core information that's needed to implement an input method. This tutorial provides additional information that makes this task a little easier and helps avoid compatibility problems between different implementations of the Java platform.

2. Describing the Input Method

Before the input method framework can start using an input method, it needs to know about its capabilities. The necessary information is provided by the input method's implementation of the InputMethodDescriptor class. This information is used in selecting input methods.

The list of available locales returned by getAvailableLocales should only return languages that the input method is really designed for. For example, a Chinese Pinyin input method that produces simplified Chinese characters should only return SIMPLIFIED_CHINESE, even if it has a mode that simply lets key events pass through and thus also makes it possible to write English or Malay. The InputMethod.setLocale method on the other hand may return true for a larger set of languages. The reason is that getAvailableLocales is used to decide whether to load and switch to an input method, which is only worthwhile if the input method handles the language well, while setLocale is used to decide whether to switch away from an input method, which is only worthwhile if the input method doesn't handle the language at all.

3. Communicating with the Client Component

When an input method instance is created, it receives an InputMethodContext instance through setInputMethodContext. This instance provides it with all the functionality that it needs to communicate with the input method framework, the client component, or the composition window. It lets the input method send information about composed and committed text using the dispatchInputMethodEvent method. And it lets the input method request information from the client component using the methods it inherits from the InputMethodRequests interface.

The input method framework provides the input method with an environment that makes it seem like it is always communicating with an active client component using the on-the-spot input style. If the actual client component is not an active client, or if a different input style is used, then the framework redirects events and requests as needed.

The input method should never try to access the client component directly, as doing so would conflict with the framework's switching and redirection functionality. Instead, the input method should always use the methods provided by its input method context.

4. Using Input Method Windows

Input methods may use a number of different windows to communicate with the user. Windows commonly used by input methods include:

  • a look-up window, which shows several possible interpretations of the user's input and lets the user choose the correct one.
  • a status window, which provides the user with information about the current state of the input method, such as the selected language or target character set.
  • a control panel (often combined with the status window), which lets the user change the input method's state, such as selecting a different language or target character set.
  • a preferences window, which lets the user tailor the input method to his or her needs.
  • a dictionary editor window, which lets the user add or correct conversions.

Note: On some other platforms, input methods may also provide a composition window, which shows the composed text. In the Java input method framework, composed text is always displayed by the client component or the input method framework, never by the input method.

It is useful to consider three groups of windows:

  • transient windows: these windows pop up for short times during a composition operation. Their functionality is tied to a specific composition. Opening, closing, positioning, and sizing are usually automatic since any user interaction with the windows themselves would distract from the composition. In particular, transient windows are always closed when the composition operation ends or is interrupted. Examples: look-up window.
  • persistent windows: these windows tend to stay around for extended periods of time, possibly for as long as the user is using the input method. Their functionality may be tied to the currently active instance of the input method, or to the input method class. Usually the user can actively open, close, position, and possibly resize these windows, although they are always automatically closed when switching to a different input method, and in some cases they're automatically positioned relative to the window containing the current client component. Examples: status window, control panel.
  • document windows: these are just regular windows. Their functionality is not tied to composition. The user fully controls opening, closing, positioning, and possibly sizing of these windows. Examples: dictionary editor window.

Here's how these window groups can be handled by input methods:

  • transient windows are created using InputMethodContext.createInputMethodWindow, typically with attachToInputContext set to true. They are opened either in the input method's implementation of activate, or later when needed to respond to user input. They are closed in the input method's implementations of deactivate or hideWindows, or earlier if they are no longer needed.
  • persistent windows are created using InputMethodContext.createInputMethodWindow, with attachToInputContext set to false. They are typically opened in the input method's implementation of activate and closed in the input method's implementation of hideWindows.
  • document windows are created as regular AWT windows, and opening and closing them is usually under user control.

Note that the focus behavior of a window created by createInputMethodWindow is implementation dependent. It may never get the focus, it may get the focus when initially made visible, or it may get the focus when the user clicks into it. An input method must be able to handle either case.

To position windows (such as the look-up window) automatically relative to the composed text, the input method can use the input method context's getTextLocation method. To position windows (such as a status window) automatically relative to the window containing the current client component, the input method can register for notifications about that window's location and state using the input method context's enableClientWindowNotification method; it then has to implement the notifyClientWindowChange method to receive notifications.

Input methods must call Window.dispose for all windows they create when they are no longer needed. This ensures that the JVM exits when the application terminates all non-daemon threads it started. Please refer to AWT Threading Issues for more information.

5. Implementing Composition

The main task of an input method is interpreting user actions in composing text input. The user actions may be typing on the keyboard, using the mouse, handwriting, or speaking.

The activate and deactivate methods indicate to the input method whether a client component has the focus and therefore is the target of text input. Typically input methods only process events to compose text while they're active.

When an input method is active, certain types of events are dispatched to the input method using the dispatchEvent method before they are processed by the client component. The input method decides for each event whether it wants to handle it. If it does, it marks the event as consumed so that it is not processed by the client component.

Note: For key events, input methods should use only KEY_TYPED events to obtain information about characters being entered, and use KEY_PRESSED or KEY_RELEASED events only to obtain information about function keys that don't result in KEY_TYPED events. The mapping from key-presses to characters depends on platforms, hardware, locales, and possibly other factors, and is best left to the underlying operating system.

As text is being composed and committed, the input method needs to inform the client component about all changes so that the client component can redraw the text. The input method does this by using InputMethodContext.dispatchInputMethodEvent to construct and dispatch input method events to the client component. Depending on the current event flow model, the input method framework may redirect the events to its composition window. Dispatching input method events is the only way for Java input methods to have composed text displayed.

Composed text is usually marked up with highlight styles that indicate the current state of the conversion. This is accomplished by adding attributes to the text using the TextAttribute.INPUT_METHOD_HIGHLIGHT key and instances of InputMethodHighlight as values. Normally input methods only define abstract highlights (using the state and selected properties of the input method highlight) and leave the mapping to concrete styles to the rendering system. However, if desired, input methods can add concrete style information to the highlight using the style property. It is a good idea to design the concrete styles as variations of the styles provided returned by Toolkit.mapInputMethodHighlight.

Both the client component and the input method framework may recognize situations where the current composition needs to be ended and all composed text either committed or cancelled. They inform the input method about this need using the endComposition method. Note that endComposition may be called while the input method is not active.

Client components can influence composition using several methods. The InputContext.setCharacterSubsets method lets them restrict the subset of the Unicode character set that the input method is allowed to input. Input methods should generally not create characters outside of the specified subsets, and may switch to a different input mode that particularly supports the specified character subsets. The InputContext.setCompositionEnabled and isCompositionEnabled methods let them control and examine whether the current input method is enabled for composition. The InputContext.reconvert method lets them initiate reconversion.

6. Providing Engine-Specific Functionality

Some input methods may want to provide functionality to client components that can not be made available through the input method framework API. This is possible through input method control objects. The input method developer must publish an interface for these objects, and return instances through InputMethod.getControlObject. Client components that want to take advantage of the additional functionality can then call InputContext.getInputMethodControlObject, check whether the returned object is an instance of a known control object class, and if it is, call its methods.

7. Packaging the Input Method

Input methods are packaged as installed extensions with specific content as described in the "Packaging Input Methods" section of the SPI specification. One important aspect to consider is that all extensions installed in a Java application environment share the same name space. To avoid name collisions, input methods should follow the package naming conventions as described in the Java Language Specification. Similar conventions should be applied to naming non-class files that are packaged in the input method JAR file, such as dictionaries.

8. Sample Code

City Input Method is a simple input method that shows how to use the interfaces provided by the input method engine SPI.

  • City Input Method documentation - tells you how to install and use this input method.
  • City Input Method - a jar file containing the input method. Some browsers will automatically offer to download this file; others will show its contents in a window (not a pretty sight), and you then have to use the Save command to write it into a file. See the documentation for installation instructions.
  • CityInputMethodDescriptor.java - the InputMethodDescriptor implementation for this input method.
  • CityInputMethod.java - the InputMethod implementation for this input method.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Framework Overview

Contents

  1. Introduction
  2. Goals
  3. Input Method Support in Other Frameworks
  4. References

1. Introduction

Input methods are software components that interpret user operations such as typing keys, speaking, or writing using a pen device to generate text input for applications. The most common input methods are the ones that let users type text in Chinese, Japanese, or Korean, languages that use thousands of different characters, on a regular-sized keyboard. The text is typed in a form that can be handled by regular-sized keyboards, for example, in a romanized form, and then converted into the form that's really intended. Typically a sequence of several characters needs to be typed and then converted in one chunk, and conversion may have to be retried because there may be several possible translations. Similarly, for hand-writing recognition, the user may write a series of characters, convert them, and select the correct text from several possible conversion results. This process is called composition, and the text that the input method is working on is called composed text. It ends when the user confirms the final conversion result and the text is committed.

During composition, the composed text logically belongs to the input method, but still needs to be displayed to the user. Input method frameworks cooperate with input methods to provide at least two ways to do this: They enable modern text editing components to display the text in the context of the document that it will eventually belong to, albeit in a style that indicates that the text still needs to be converted or confirmed by the input method. This is called on-the-spot style input. And they provide a separate window to display the text as a fall-back if a not-so-modern text editing component can't deal with the text until it's confirmed. We call this root-window style input.

The input method framework enables the collaboration between text editing components and input methods in entering text. Its input method client API provides interfaces and classes that enable text editing components to communicate with input methods and implement a well-integrated text input user interface in the on-the-spot and below-the-spot styles; it also provides root-window style input as a fallback. Its service provider interface (SPI) for input method engines provides interfaces that enable the development of input methods in the Java programming language that can be used with any Java runtime environment; it also supports native input methods of the host platform.

2. Goals

"Write Once, Run Anywhere in the World" for Text Components

Text editing components that use the input method framework run on any Java application environment and support any text input methods available on that Java application environment without modifying or recompiling the text editing component. The framework isolates text editing components from differences in platforms and input method engines. It provides only one programming model for interacting with input methods. This lets developers write to a single API, and lets users choose whatever input method they prefer. When using native input methods, the framework maps to the platform input method APIs.

Although engine independence will be important to most developers, some high-end developers may want access to engine specific features. The framework allows this access.

"Write Once, Run Anywhere in the World" for Input Methods

Input methods written in the Java programming language and using the input method engine SPI can be installed into any Java application environment and support any text component running in that Java application environment. The framework isolates input methods from differences in platforms and text editing components. It provides only one programming model for interacting with text components. This lets developers write to a single SPI, and lets users choose whatever text editing component they prefer.

Language Independence

The input method framework is language independent in order to satisfy the needs of fully international applications. Although input methods are generally used for entering East Asian text, they may be useful for other languages as well. For example, a transliteration input method might be developed to allow Greek to be entered using Latin characters.

The framework handles input methods for different languages at the same time for truly multilingual text editing. While the choice of native input methods may be limited by the host operating system, any input method written in the Java programming language and using the input method engine SPI can be used at any time. Text created by an input method can have language attributes so that applications can perform language sensitive operations on the text.

Input Device Independence

The input method framework is designed to accommodate many possible input devices. Although keyboards are the predominant way of entering text today, other devices are gaining importance. For some platforms, pen-based input is the only way to enter text. Also, voice input is becoming more and more popular. The input method engine SPI opens the way to support these alternate devices.

Multiple Service Levels

Different programs have different needs for input method support. Tight integration with input methods provides the best user interface, but requires some additional programming. Some developers may not find that additional work worthwhile, but their applications still need to be able to receive East Asian text input. A few programs, such as games, want direct low-level keyboard input without interference from an input method. The framework lets programs choose one of the following levels of text input support.

Integrated Text Input User Interface

Modern programs intended to be used with East Asian languages usually provide a fully integrated user interface for text input operations and show the text being composed embedded in the document text. While converting text, the current candidate is highlighted, and when the user chooses a different candidate, the previous candidate text is replaced with the new one. This user interface support for input methods is known as on-the-spot style (or inline style). An alternative that Chinese-speaking users often prefer is the below-the-spot style, where composed text is shown in a separate composition window that is automatically positioned close to the insertion point where text will be inserted after being committed. The input method client API lets text editing components implement these integrated text input user interfaces.

Integration does not only mean displaying the composed text in the context of the target document. It also means that the text editing component understands "input method events", which let the input method communicate more information about the text than simple key events (for example, grammatical information), and that it can responds to requests for information from the input method that let the input method improve its functionality (for example, its accuracy).

Non-Integrated Text Input User Interface

For programs that do not want to deal with the user interface for text input operations, only final input text is sent to the application. In this case, the framework provides a user interface for input operations in a separate composition window outside the application. This is known as root-window style. It is less convenient because the user either has to manually position the window near the insertion point or to move his/her eyes between the composition window and the application window.

In this case, the application receives the input text as a sequence of key events. Therefore, there is no way to receive any information associated with the input text, such as grammatical information. Also, surrogate pairs (as defined in the Unicode Standard, version 2.0) are received as two separate key events.

No Input Method Support

Some applications, such as game software, may need only raw key input and no input method support. The framework provides a way to explicitly disable input method support.

Building Block Reuse

An important theme of object-oriented programming is reuse of program building blocks. The same building block may be used in many different applications, and several times within the same application. To make it easy to combine different text editing building blocks of possibly different capabilities, the input method framework interacts with each text editing component directly and individually.

As a consequence, many applications will not interact with the input method framework directly at all. Instead, they will use ready-made text editing components, such as the Swing text components, which will handle the interaction for them.

Close Integration with Other Frameworks

The input method framework is designed as an integral part of the Java platform. Interfaces that are necessary to exchange text between input methods and text components are designed to also support communication between other text-related frameworks, such as Java 2D and the Swing text components. Support for input method highlight drawing is integrated into Java 2D, so that text components can treat composed text just like any other text and the highlights just like any other style. Java 2D interacts with the input method framework to determine appropriate visual styles for input method highlights depending on the platform. The Swing text components use the input method framework to implement the best possible user interface with minimal additional programming.

3. Input Method Support in Other Frameworks

This chapter summarizes functionality in other Java platform frameworks that support input methods.

Text

The AttributedCharacterIterator interface provides a standard way of communicating text information with attributes between frameworks. It lets text readers access text without having to know how the text is stored in the information provider. Attribute information may include font and style attributes as well as language tags and grammatical annotations.

Abstract Window Toolkit

The Window class creates an initial input context for the window, and disposes this input context for the window when the window is disposed. Explicitly disposing input contexts allows to free up the (often substantial) resources allocated by native input methods.

The Component class has methods to handle input contexts and input method request handlers. Newly created Component instances other than windows initially share the input context of their containing window. The event handling in the Component class redirects incoming events to the input context associated with the component, and only passes them on to the component's listeners if they have not been consumed by an input method. Focus changes are communicated to the input context so it can activate or deactivate input methods.

The AWT classes that have knowledge of event or listener classes handle the InputMethodEvent and InputMethodListener classes.

The Graphics class defines a drawString method that accepts AttributedCharacterIterator instances as input. Instances of the TextLayout class can be constructed from AttributedCharacterIterator instances and used to draw text with input method highlights. Both ways of drawing text recognize input method highlights as attributes of the text and render them.

Swing

The Swing text components are by default active clients of the input method framework. That means, applications using these text components will use on-the-spot or below-the-spot style input by default. Application developers are still responsible for ending input operations when some other operation is started that requires the text to be committed. They may also use the input method framework's methods to create a private input context, to select an input method, or to set an expected character subset.

4. References

Information about the implementation of input methods on different platforms can be found in the following literature:

  • "Programmer's Supplement for Release 6," O'Reilly & Associates, Inc. (ISBN 1-56592-089-9).
  • "Inside Macintosh: Text," Addison-Wesley (ISBN 0-201-63298-5).
  • "Developing International Software for Windows 95 and Windows NT," Microsoft Press (ISBN 1-55615-840-8).
  • "IIIMP - Platform Independent Input Method for Internet and Java," Proc. Twelfth International Unicode/ISO 10646 Conference, Unicode Consortium.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Framework Specification

Contents

  1. Framework Architecture
  2. Client Components
  3. Input Styles
  4. Input Method Engines and Adapters
  5. Context Management
  6. Information Flow Through the Framework

1. Framework Architecture

The following picture shows the overall structure of the framework and its clients. Parts outlined in bold are integrated with the input method framework as part of the Java SE platform; others can be developed and distributed separately by independent software vendors.

The following context describes this graphic

The input method client API defines the classes and interfaces that text editing components can use to implement an integrated text input user interface. The AWT text components TextArea and TextField provide on-the-spot or over-the-spot composition, depending on implementation. The text components of the Swing user interface toolkit provide an integrated text input user interface. The context management manages communication paths between the text editing components and input methods. The input method engine SPI defines the interfaces that allow input method engines and adapters to be plugged into the framework. Input method engines can be implemented directly in the Java programming language using these interfaces. To use native input methods integrated with the host input method manager, an adapter translates information between the data models used by native input methods and the input method framework and provides the composition window. Adapters for other input systems, such as Java Speech or the Internet-Intranet Input Method Protocol (IIIMP), can also be implemented using this interface.

2. Client Components

Every instance of the Component class is potentially a client of the input method framework. The framework distinguishes between four kinds of components:

  • Active clients are components whose getInputMethodRequests implementations return a non-null value. The framework assumes that these components actively use the input method client API and, in particular, provide an implementation of the InputMethodListener interface. These components are expected to handle events and requests for information coming from the input method and draw composed text that is sent to them.
  • Non-clients are components that have turned off input method support using the enableInputMethods method.
  • Peered clients are peered text components (instances of the TextComponent class). Their behavior is implementation dependent, and their input method support may be limited. On Windows, peered text components behave mostly like active clients. On Solaris, peered text components can receive input only from host input methods, and they do not support the below-the-spot input style (see below).
  • Passive clients are all remaining components. The framework assumes that passive clients don't use the input method client API, but still need to receive text input from input methods.

All four kinds of components may coexist in the same window. The input method framework, therefore, needs to determine the capabilities of components and adjust its behavior as the focus moves from one component to another.

Client components are not responsible for drawing candidate lists or for user interface elements that control the input method's behavior. Depending on the platform, this responsibility rests with input methods, the host input method manager, or the input method framework.

Input methods are not concerned with the differences between client components. They interact with them indirectly through the input method framework, which presents an interface similar to an active client and handles the differences internally.

3. Input Styles

The input method framework supports three input styles:

  • On-the-spot input, where the client component draws the composed text in the context of the document that it will eventually belong to, but in a style that indicates that the text still needs to be converted or confirmed by the input method. This is the default input style for active clients.
  • Below-the-spot input, where the composed text is shown in a separate composition window that is automatically positioned just below the insertion point where text will be inserted after being committed. The window's location is calculated first when the window is opened, then updated whenever committed text has been dispatched to the client component. If positioning the window below the insertion point would move it partially or entirely off-screen, it is moved above the insertion point. This input style may be selected for active clients as described below.
  • Root-window input, where the composed text is shown in a separate composition window that is not automatically positioned. This input style is used for passive clients.

The framework chooses between on-the-spot and below-the-spot input for active clients based on a system property or an AWT property "java.awt.im.style". The system property can be defined from the command line (by the end user), the AWT property in a localized awt.properties file (by the localizer or a system administrator). If both are defined, the system property takes precedence. If the property's value is "below-the-spot", below-the-spot input is used, otherwise on-the-spot input.

Support for below-the-spot input with native input methods is platform dependent. It is supported on Windows, but not on Solaris. Where it is not supported, on-the-spot input is used instead.

The input style used for peered text components (instances of the TextComponent class) is implementation dependent and may not be any of the styles described above. On Windows, below-the-spot input may be selected as described above, otherwise over-the-spot input is used, where composed text is drawn in a separate window covering the insertion point. On Solaris, the input style depends on the input method.

No input style is associated with non-clients.

Input methods are not concerned with the differences between input styles. They interact with client components indirectly through the input method framework, which presents an interface assuming on-the-spot input and handles the differences internally.

4. Input Method Engines and Adapters

The input method engine SPI enables the development of input methods in the Java programming language. Adapters for other input systems, such as Java Speech or the Internet-Intranet Input Method Protocol, can also be implemented using this interface. For information specific to the SPI, see the SPI package specification.

The SPI is also used for host input method adapters, which connect to native input methods integrated with the host input method managers, such as the Input Method Manager on Microsoft Windows, the Text Services Manager on MacOS, and XIM on Solaris. The host input method adapter plays the role of an input method within the input method framework, and translates events and requests between the data models used by AWT and the input method framework on one side and the host's input method manager on the other side. It also cooperates with the input context in managing the composition window - for passive clients interacting host input methods, typically the root window provided by the host input method manager is used. The adapter passes on requests for particular input methods to the host, but users can also use the host's selection mechanism to select input methods.

5. Context Management

InputContext instances manage communication contexts between client components and input methods. The main task of an input context is to maintain the connection from the current client component to its current input method. It dispatches input events such as key and mouse events from the component to the current input method, and input method events from the input method to the client component. It also dispatches requests for information from the input method to the client component.

Each InputContext instance provides its own text input environment, separate from all other input contexts. This allows applications to support multiple concurrent input operations. For example, in the middle of entering text into a document, a user can open a file dialog and enter a file name, without affecting the composition state of the text being entered into the document.

By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's containment hierarchy. If necessary, components can create private input contexts. A component that doesn't have its own input context uses the one used by its parent. An input context has at most one current client component, the component that currently has the focus. When switching to a new client component, the input context calls its endComposition method to commit or cancel composed text for the previous client component.

The input context creates an input method instance for each input method engine that its client components need to use. Separate input method instances are created for each input context instance. The instances are kept until the input context is disposed, so that the instances can keep information about the text that was entered in the window.

The input context also handles input method selection and the composition window.

Selecting Input Methods

An input context has a current input method and a current locale.

The input method framework provides two separate ways of selecting input methods and input locales:

  • The method InputContext.selectInputMethod lets applications request an input method supporting a specified locale.
  • A user interface lets the user request an input method by name, and specify the input locale. A selection made from the user interface affects the currently active input context only.

The framework does not give preference to selections made either way, so the last successful selection made either way for an input context determines the current input method for an input context (note that selectInputMethod may fail if no available input method supports the requested locale).

Before switching to a new input method, the input context calls the old input method's endComposition method. The input context retains the old input method instance and reuses it when the same input method is selected again for this input context at a later point.

InputContext.selectInputMethod looks for an input method supporting the specified locale using the results of the InputMethodDescriptor.getAvailableLocales methods of all installed input methods. If the user has previously selected an input method with the specified locale from the user interface, this input method is chosen. Otherwise it is implementation dependent which input method is chosen if multiple input methods support the specified locale.

The user interface for selecting input methods is implementation dependent. It must provide the user with a list of all available input methods and let him/her select one of them. Where an input method supports multiple locales, the user interface also lets the user select the input locale (this facility may be omitted for host adapters if the host provides an alternative facility to select the input locale). Licensees developing Java runtime environments for their own platforms are encouraged to integrate the user interface with existing user interfaces for selecting keyboards or input methods.

On Windows and Solaris (with Motif-based AWT), the user interface consists of three parts: a "Select Input Method" menu item added to the Window menu in Motif or the System menu in Windows, a user-defined input method selection key, and a pop-up menu brought up by either the "Select Input Method" menu item or the input method selection key. The "Select Input Method" item is only shown if the Java runtime environment has more than one input method available or the input method supports multiple locales (the host input method adapter is treated as a single input method). The popup menu lists the available input methods, with supported locales of multi-locale input methods as submenus, and lets the user select from this list. The JREs for Solaris (with X-based AWT) and Linux do not provide the "Select Input Method" menu item, i.e., the pop up menu is only brought up by pressing the input method selection key. The input method selection key definition is stored persistently using two preferences, one defining the base key code value and the other defining the modifiers. The "modifiers" preference is optional. If a modifiers entry is defined without matching keyCode entry, that modifiers entry is ignored. The following table shows the contents.

key name (String) | value (int)
"keyCode" | any java.awt.event.KeyEvent.VK_* value except VK_UNDEFINED
"modifiers" | any combination of java.awt.event.InputEvent.*_MASK

The JRE looks for these preferences first in the user's preference tree node /java/awt/im/selectionKey, then, if no definition could be found, in the system preference node with the same path.

Composition Window

For passive clients and for active clients using below-the-spot input, the input method framework provides a composition window. The window is opened when the input method starts sending composed text; it is closed when all text is committed. At most one composition window is open at any time even if multiple compositions (using separate input contexts) are currently in progress.

For below-the-spot input, the window is automatically positioned just below the insertion point where text will be inserted after being committed. The window's location is calculated first when the window is opened, then updated whenever committed text has been dispatched to the client component. If positioning the window below the insertion point would move it partially or entirely off-screen, it is moved above the insertion point.

6. Information Flow Through the Framework

The framework provides two mechanisms to communicate information between the current client component and the current input method:

  • AWT events are used to pass information about user actions to the input method, and to notify the component of changes in the input text. This provides a programming interface that's consistent with other input operations. However, InputMethodEvents are typically dispatched synchronously to the component's methods, while other AWT events are dispatched asynchronously through the event queue.
  • The InputMethodRequests interface defines methods that an input method can call to request information from the client component. This invocation is synchronous.

Both event dispatching and calling InputMethodRequests methods are done indirectly through the input context. This lets the input context redirect information to a composition window if necessary. The composition window provides a full implementation of an active client, and so the input method can always assume it is interacting with an active client.

The following sections show the flow of events through the input method framework and explain the associated handling of input method requests. Four alternatives are described, depending on the kind of client component and the selected input style. All diagrams assume an input method implemented in the Java programming language using the input method engine SPI. Event flows for peered text components or native input methods are implementation dependent, may vary substantially, and are not shown.

Active Clients With On-the-Spot Input

The following context describes this graphic

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event to the component. The client component must have registered an InputMethodListener so it can handle InputMethodEvents coming from the input method and receive composed and committed text.

InputMethodRequests calls from the input method are forwarded to the object returned by the client component's getInputMethodRequests method.

Active Clients With Below-the-Spot Input

The following context describes this graphic

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event. Since below-the-spot input is selected, the event is redirected to the composition window, which handles it. When text is committed (partially or entirely), the composition window generates a new input method event holding the committed text for the client component. The client component must have registered an InputMethodListener so it can handle InputMethodEvents, which in this case come from the composition window and only contain committed text.

InputMethodRequests calls from the input method that relate to the display of composed text (getTextLocation, getLocationOffset) are handled by the composition window; all others are forwarded to the object returned by the client component's getInputMethodRequests method. The composition window uses the client component's getTextLocation implementation to position itself.

Passive Clients

The following context describes this graphic

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event. The event is redirected to the composition window, which handles it. When text is committed, the composition window translates it into key events for the actual client's key event listener. Only KEY_TYPED events are sent.

InputMethodRequests calls from the input method are handled by the composition window. Calls hat relate to the display of composed text (getTextLocation, getLocationOffset) are handled based on information about the composed text being displayed. All other calls are handled at all times based on the assumption that composition has just started and there's no committed text, because the composition window does not have access to text in the client component.

Non-Clients

The following context describes this graphic

Events for non-clients do not go to the input context. All events go straight to the component's listeners (here, the key listener).

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Input Method Framework

Documentation Contents

Java Input Method Framework
(IMF) Technology

The input method framework enables the collaboration between text editing components and input methods for entering text. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean - languages using thousands of different characters - on keyboards with far fewer keys. However, the framework also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition.

The input method framework provides two layers of public interfaces:

  • The input method client API provides interfaces and classes that enable text editing components to communicate with input methods and implement a well-integrated text input user interface.
  • The input method engine SPI provides interfaces that enable the development of input methods in the Java programming language that can be used with any Java runtime environment.

Overview

Overview - An overview of the Input Method framework.

API Specification

  • Specification
  • Input method client API reference
  • Input method engine SPI reference

Tutorials and Programmer's Guides

  • Input method client API tutorial
  • Input method engine SPI tutorial

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Input Method Framework Demo

Download and install the Java Runtime Environment (JRE) to view the applet.

This applet contains four text components that show the different ways of interacting with input methods in the Java SE platform. This applet can be run in two ways:
  • On a platform/locale that uses native input methods. Examples: Japanese Windows NT, Macintosh with Chinese Language Kit, Solaris with Korean locale.
  • With an input method installed that's implemented in the Java programming language. The Java runtime environment may be running on a platform/locale that does not support native input methods.

The first three components are lightweight components, i.e., they handle events and render text using Java APIs. The last one is a peered component, that is, event handling and text rendering are handled by a text editing engine provided by the underlying platform. Peered components were used widely in JDK 1.0 AWT, while lightweight components were introduced in JDK 1.1 and are the basis of the Swing class library.

The lightweight components have different capabilities:

  • The active client uses the input method framework API to implement on-the-spot (also called "inline") text composition.
  • The passive client works with input methods in the simplest way - it relies on the input method framework to handle all composition and only accepts committed text.
  • The non-client refuses to work with input methods.

To test with the different components with native Japanese input methods, click into the components to focus on them, turn on an input method (Alt-` on Windows, choosing from the keyboard menu on Macintosh, Control-Space on Solaris), then type "nihongo". The behavior you should see is:

  • Active client: The word is entered in the component directly and gets converted to four hiragana characters as you type.
  • Passive client: A separate window shows up, the word is entered in that window and gets converted to four hiragana characters as you type.
  • Non-client: The text "nihongo" is entered into the component.
  • Peered component: The behavior depends on the platform, but most likely it's similar to the active client (the text may be drawn over the pre-existing text or push it to the right).

For all components except the non-client, you can now convert the text (Space on Windows and Macintosh, Control-N or Space on Solaris) and then commit it (Enter on all three platforms - how could that happen?). Conversion should result in three kanji characters, which after committing are shown in the component without highlight.

To test with the different components with the sample input method implemented in the Java programming language, "City Input Method", install the input method's JAR file into the extensions directory of the Java runtime environment before running the applet. Then click into the components to focus on them, and select the input method. The selection mechanism is implementation dependent; on Oracle's Java runtime environments, choose the "Select Input Method" menu item from the system menu in the top left corner of the window, then choose the input method from the pop-up menu that comes up. Then type "TYO". The behavior you should see:

  • Active client: The text is entered in the component directly and is highlighted.
  • Passive client: A separate window shows up, the text is entered in that window and is highlighted.
  • Non-client: The text is entered into the component, but not highlighted.
  • Peered component: The behavior depends on the platform.

For all components except the non-client and, on some platforms, the peered component, you can now convert the text using the Space key. The conversion result depends on your default language - it's the name "Tokyo" in Japanese, Japanese yomi, English, German, simplified or traditional Chinese. To see all options, press Space again - this time, you'll get a look-up window showing all the possibilities. You can use Space to go through all possible selections, or type the number of the conversion you like. Pressing the Enter key will commit the selected conversion and remove the highlight.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


City Input Method

Contents

  1. About City Input Method
  2. Installing and Selecting the Input Method
  3. Using the Input Method for the First Time
  4. Using the Input Method
  5. Controlling the Status Window
  6. Supported Cities and Locales

1. About City Input Method

City Input Method is a simple input method that lets users enter city names by just typing a three-character airport code and converting it to a corresponding city name. If the user enters more than one airport code (up to three at a time are possible), the input method creates a short phrase such as "From San Francisco to Beijing via Tokyo". For each city, the input method knows the city names and phrases in a number of different languages (or, more precisely, locales). City names and phrases in all supported languages can be freely mixed in any input operation. The input method can be used to enter text into any text component that supports input methods, such as a Swing text component.

2. Installing and Selecting the Input Method

To make the input method available to applications, its jar file must be installed into the extensions directory of a JRE environment. After launching a Java application with a text component that supports input methods, the input method can be selected using the input method selection user interface provided by the runtime environment. First, make sure that a text component has the focus - typically, the text component indicates this by showing an insertion point. Then, choose the "Select Input Method" menu from the menu that can be pulled down from the top left corner of the window (the System menu on Windows, Window menu on Solaris), then choose "City Input Method" and the desired locale from the popup menu. Note that correct text display in some languages depends on the font configuration, so you may want to pick the locale of the host operating system or a language that is supported by most fonts, such as English or German.

3. Using the Input Method for the First Time

After selecting the input method, type "SFO", the code for San Francisco International Airport. You will see that the text is input into the text component, but highlighted to indicate that it is still being composed (the text is inverted on Solaris, underlined on Windows). Then type a Space character to start conversion. You will see that the airport code is replaced with the name of San Francisco in the language that you selected. The text is still highlighted, although the highlight may now look somewhat different. Type Space again. A lookup window opens, which shows the city name in all available languages, with the originally displayed name selected. Continue typing Space. You will see that the selection cycles through all the names, and that the selected name is also shown in the text component. Type Return. The lookup window disappears, and the most recently selected name is now shown in the text component without any highlight - it is committed.

4. Using the Input Method

Entering Raw Text

Raw text is any text that is entered through the input method, but hasn't been converted yet. From the moment you type the first character of an airport until you start conversion the input method is in raw text mode. In this mode, letters from "a" to "z" or their uppercase variants (the input method is case insensitive) are added to the raw text input. You can use backspace to delete a character, and you can click into the text using the mouse to move the insertion point.

Converting to City Names

You can start the conversion process from airport codes to city names when the raw text includes one, two, or three airport codes - that is, three, six, or nine characters. To start conversion, type Space. A single airport code is converted to just a city name. Two or three airport codes are converted to phrases such as "From San Francisco to Frankfurt" for two codes or "From San Francisco to Frankfurt via Chicago" for three codes. Each city name is considered a separate segment. One of the segments is selected, that is, it can be further converted using the lookup window. If there are multiple segments, the segment selection can be changed by clicking into a segment or by using the Arrow Right and Arrow Left keys.

Continuing Conversion Using the Lookup Window

The lookup window is a temporary window that shows the city names in all available languages for the airport code of the selected segment, and lets the user choose a different name. To show the window, select a segment, then type Space. The window opens just below or, if there's not enough space, in another location near the segment's text. The currently selected city name is outlined. To change the name selection, type Space, Arrow Down, or Arrow Up to cycle through all available names. To confirm a selected name, you usually commit as described in the next section. To select a name and close the lookup window without committing, type the number in front of the desired name.

Committing the Input

Committing the input text means to end input method processing of it, and make it a normal part of the text component's text body. All input method highlighting is removed from committed text. You can commit the entire input text at any time by typing Return. If you entered more than one airport code and have started conversion, you can also perform a partial commit: typing Control-Arrow Down commits the text up to the currently selected segment, but leaves following segments available for further conversion.

Conversion is requested using the Space character. During conversion, the input method first offers the city name in the selected language (if that name is available). If the user does not accept this selection, a second step brings up a choice window that offers all available names for the city, with the corresponding locale name.

5. Controlling the Status Window

The input method provides a little status window that shows the currently selected locale. Initially this window is positioned near the lower right corner of the screen, but it can be moved to a different location. To request that the status window automatically positions itself below the window containing the currently focussed text component, double-click into the status window's content area.

6. Supported Cities and Locales

The input method's knowledge of the world is limited - airport codes it knows include: SFO, NYC, JFK, LGA, ORD, FRA, MUC, TYO, NRT, HND, KIX, ITM, PEK, BJS, SHA, HKG, TPE. It currently supports the following languages: English, German, Japanese (normal and yomi), Simplified Chinese, Traditional Chinese.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java Instrumentation

For changes in Java SE 6, see Enhancements in JDK 6 java.lang.instrument.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in java.lang.instrument

Documentation Contents

Enhancements in Java SE 6

for the java.lang.instrument Package

The following functionality has been added to the java.lang.instrument package between its initial release in JDK 5.0 and Java™ SE 6.

  • Support for retransformation of class files - To facilitate dynamic transformation of classes that have already been loaded, the following methods have been added.
    • Instrumentation.retransformClasses(Class...)
    • Instrumentation.addTransformer(ClassFileTransformer, boolean)
    • Instrumentation.isModifiableClass(Class)
    • Instrumentation.isRetransformClassesSupported()
    They are suited to operations such as adding instrumentation to methods whose classes have already been loaded. Support for retransformation means that access to the original class file is no longer required in order to instrument loaded classes. They enable the easy removal of applied transformations and are designed to work in multi-agent environments.
  • Support for instrumenting native methods - The following methods allow native methods to be instrumented by providing a JVM-aware mechanism for wrapping the native method.
    • Instrumentation.setNativeMethodPrefix(ClassFileTransformer, String)
    • Instrumentation.isNativeMethodPrefixSupported()
  • Support for appending to class loader search - The following methods allow instrumentation support classes to be defined in the appropriate class loader.
  • Instrumentation.appendToBootstrapClassLoaderSearch(JarFile)
  • Instrumentation.appendToSystemClassLoaderSearch(JarFile)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java(TM) java.lang.instrument

Documentation Contents

Java™ java.lang.instrument Package

The java.lang.instrument package provides a Java™ programming language API for tools to instrument Java programming language applications -- for example, to monitor them or collect performance information. Tools use java.lang.instrument to modify the class file that defines a class -- generally, by inserting into the byte-code of methods additional byte-code which will perform the instrumentation.

java.lang.instrument was introduced in JDK™ 5.0.

API Specification

  • java.lang.instrument Package (package description)

API Enhancements

  • See the API Enhancements in JDK 6 - An annotated list of API changes between the 5.0 and 6 releases.

More Information

  • Java Virtual Machines Tool Interface - a native interface which can also perform instrumentation.
  • java.lang.management package - the monitoring and management package, often useful with instrumentation.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Font Configuration Files

The Java Platform defines five logical font names that every implementation must support: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical font names are mapped to physical fonts in implementation dependent ways.

Sun's Java SE Runtime Environments use font configuration files to map logical font names to physical fonts. There are several files to support different mappings depending on the host operating system version. The files are located in the lib directory within the JRE installation. Users can edit or create their own font configuration files to adjust the mappings to their particular system setup. Note however that this is a modification of the JRE, and Sun does not support modified JREs.

Font configuration files come in two formats: A properties format and a binary format. The properties format is described in detail in this document and can be used for user-defined configurations. The binary format is undocumented and used only for the JRE's predefined configurations; the corresponding files in properties format are available for reference as files with the ".properties.src" extension.

Note that font configuration files are implementation dependent. Not all implementations of the Java Platform use them, and the format and content vary between different runtime environments as well as between releases. This document describes the format used by version 6 of Sun's Java SE Runtime Environments.

  1. Loading Font Configuration Files
  2. Names Used in Font Configuration Files
  3. Properties for All Platforms
  4. Properties for Windows
  5. Properties for Solaris and Linux

Loading Font Configuration Files

To find the appropriate font configuration file for a host operating system, the following information is used:

  • JavaHome - the JRE's directory, as given by the "java.home" system property.
  • OS - a string identifying an operating system variant:
    • For Windows, "98", "2000", "Me", "XP", "2003".
    • For Solaris, empty.
    • For Linux, "Sun", "RedHat", "Turbo", "SuSE".
  • Version - a string identifying the operating system version.

The runtime uses the first of the following files it finds:

        JavaHome/lib/fontconfig.OS.Version.properties
        JavaHome/lib/fontconfig.OS.Version.bfc
        JavaHome/lib/fontconfig.OS.properties
        JavaHome/lib/fontconfig.OS.bfc
        JavaHome/lib/fontconfig.Version.properties
        JavaHome/lib/fontconfig.Version.bfc
        JavaHome/lib/fontconfig.properties
        JavaHome/lib/fontconfig.bfc

Files with a ".properties" suffix are assumed to be properties files as specified by the Properties class and are loaded through that class. Files without this suffix are assumed to be in binary format.

Names Used in Font Configuration Files

Throughout the font configuration files, a number of different names are used:

  • LogicalFontName - one of the five logical font names: serif, sansserif, monospaced, dialog, and dialoginput. In font configuration files, these names are always in lowercase.
  • StyleName - one of the four standard font styles: plain, bold, italic, and bolditalic. Again, these names are always in lowercase.
  • PlatformFontName - the name of a physical font, in a format typically used on the platform:
    • On Windows, a font face name, such as "Courier New" or "\uad74\ub9bc".
    • On Solaris and Linux, an xlfd name, such as "-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1". Note that "%d" is used for the font size - the actual font size is filled in at runtime.
  • CharacterSubsetName - a name for a subset of the Unicode character set which certain component fonts can render. For Windows, the following names are predefined: alphabetic, arabic, chinese-ms936, chinese-gb18030, chinese-ms950, chinese-hkscs, cyrillic-iso8859-5, cyrillic-cp1251, cyrillic-koi8-r, devanagari, dingbats, greek, hebrew, japanese, korean, latin, symbol, thai. For Solaris and Linux, the following names are predefined: arabic, chinese-gb2312, chinese-gbk, chinese-gb18030-0, chinese-gb18030-1, chinese-cns11643-1, chinese-cns11643-2, chinese-cns11643-3, chinese-big5, chinese-hkscs, cyrillic, devanagari, dingbats, greek, hebrew, japanese-x0201, japanese-x0208, japanese-x0212, korean, korean-johab, latin-1, latin-2, latin-4, latin-5, latin-7, latin-9, symbol,thai. A font configuration file may define additional names to identify additional character subsets.
  • Encoding - the canonical name of the default encoding, as provided by java.nio.charset.Charset.defaultCharset().name().
  • Language - the language of the initial default locale.
  • Country - the country of the initial default locale.

Properties for All Platforms

Version Property

The version property identifies the font configuration format version. This document specifies version 1.

The complete property has the form:

version=1

Component Font Mappings

Component font mapping properties describe which physical font to use to render characters from a given character subset with a given logical font in a given style.

The keys have the forms:

        allfonts.CharacterSubsetName
        LogicalFontName.StyleName.CharacterSubsetName

The first form is used if the same font is used for a character subset independent of logical font and style (in this case, the font rendering engines apply algorithmic styles to the font). The second form is used if different physical fonts are used for a character subset for different logical fonts and styles. In this case, properties must be specified for each combination of logical font and style, so 20 properties for one character subset. If a property of the first form is present for a character subset, then properties of the second form for the same character subset are ignored.

The values are platform font names, as described above.

Since the character subsets supported by given fonts often overlap, separate search sequence properties are used to define in which order to try the fonts when rendering a character.

Search Sequences

The Java runtime uses sequence properties to determine search sequences for the five logical fonts. However, a font configuration file may specify properties that are specific to a combination of encoding, language, and country, and the runtime will then use a lookup to determine the search sequence property for each logical font.

The keys have the form:

     sequence.allfonts.Encoding.Language.Country
        sequence.LogicalFontName.Encoding.Language.Country
        sequence.allfonts.Encoding.Language
        sequence.LogicalFontName.Encoding.Language
        sequence.allfonts.Encoding
        sequence.LogicalFontName.Encoding
        sequence.allfonts
        sequence.LogicalFontName

The allfonts forms are used if the sequence is used for all five logical fonts. The forms specifying logical font names are used if different sequences are used for different logical fonts.

For each logical font, the Java runtime uses the property value with the first of the above keys. This property determines the primary search sequence for the logical font.

The file may also define a single fallback search sequence. The key for the fallback search sequence property is:

     sequence.fallback

The values of all search sequence properties have the form:

SearchSequenceValue:
        CharacterSubsetName
        CharacterSubsetName , SearchSequenceValue

The primary search sequence properties specify character subset names for required fonts, which are used for both AWT and 2D font rendering. The fallback search sequence property gives character subset names for optional fonts, which are used as fallbacks for all logical fonts, but only for 2D font rendering. The runtime automatically adds the Lucida Sans Regular font as a fallback font for 2D rendering if it's not already specified. If the runtime environment has a directory lib/fonts/fallback and this directory contains valid TrueType or Type 1 fonts, the runtime automatically adds these fonts as fallback fonts for 2D rendering. On Windows, if there is a system EUDC (End User Defined Characters) font registered with Windows, the runtime automatically adds this font as well as a fallback font for 2D rendering.

The sequence properties determine in which sequence component fonts are tried to render a given character. For example, given the following properties:

sequence.monospaced=japanese,alphabetic
sequence.fallback=korean
monospaced.plain.alphabetic=Arial
monospaced.plain.japanese=MSGothic
monospaced.plain.korean=Gulim

the runtime will first attempt to render a character with the MSGothic font. If that font doesn't provide a glyph for the character, it will attempt the Arial font. For 2D rendering, it will also try the Gulim and the Lucida Sans Regular font as well as any TrueType or Type 1 fonts in the runtime's lib/fonts/fallback directory. For 2D rendering on Windows, if there is a system EUDC font registered with Windows, the runtime will finally try this EUDC font.

When calculating font metrics for a logical font without reference to a string, only the required fonts are taken into consideration. For the example above, the FontMetrics.getMaxDescent method would return results based on the MSGothic and Arial fonts, but not the Gulim and Lucida Sans fonts. In this way, simple user interface elements such as buttons, which sometimes calculate their size based on font metrics, are not affected by an extended list of component fonts which their labels usually don't use. On the other hand, text components typically calculate metrics based on the text they contain and thus will obtain correct results.

The sequence properties that the runtime obtains for the five logical fonts should list the same character subsets, but may list them in different order.

Exclusion Ranges

The exclusion range properties specify Unicode character ranges which should be excluded from being rendered with the fonts corresponding to a given character subset. This is used if a font with a large character repertoire needs to be placed early in the search sequence (for example, for performance reasons), but some characters that it supports should be drawn with a different font instead. These properties are optional, so there's at most one per character subset.

The keys have the form:

     exclusion.CharacterSubsetName

The values have the form:

ExclusionRangeValue:
        Range
        Range , ExclusionRangeValue

Range:
        Char - Char

Char:
        HexDigit HexDigit HexDigit HexDigit
        HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit

A Char is a Unicode character represented as a hexadecimal value.

Proportional Fonts

The proportional font properties describe the relationship between proportional and non-proportional variants of otherwise equivalent fonts. These properties are used to implement preferences specified by the GraphicsEnvironment.preferProportionalFonts method.

The keys have the form:

     proportional.PlatformFontName

Space characters in the platform font name must be replaced with underscore characters ("_").

The values have the form:

     PlatformFontName

In values, space characters are left unmodified.

Each property indicates that the font named in the value is the proportional equivalent of the font named in the key, and also that the font named in the key is the non-proportional equivalent of the font named in the value.

Font File Names

Font file name properties provide the names of the files containing the physical fonts used in the font configuration file. File names are required for all physical fonts on Windows and recommended for all physical fonts on Solaris and Linux.

The keys have the form:

     filename.PlatformFontName

Space characters in the platform font name must be replaced with underscore characters ("_").

The values are the file names of the files containing the fonts. On Windows, simple file names are used; and the runtime environment looks for each file first in its own lib/fonts directory, then in the Windows fonts directory. On Solaris and Linux, absolute path names, path names starting with "$JRE_LIB_FONTS" for the runtime environment's own lib/fonts directory, or xlfd names are used.

Appended Font Path

The Java runtime can automatically determine a number of directories that contain font files, such as its own lib/fonts directory or the Windows fonts folder. Additional directories can be specified to be appended to the font path.

The key has the form:

     appendedfontpath

The value has the form:

AppendedFontPathValue:
        Directory
        Directory PathSeparator AppendedFontPathValue

The path separator is the platform dependent value of java.io.File.pathSeparator.

Properties for Windows

There are no platform-specific properties for Windows. However, there is a special form of the character subset name used in search sequences. The name "alphabetic" can take a suffix indicating the character encoding associated with the subset:

     alphabetic
        alphabetic/default
        alphabetic/1252

This information is only used for AWT, not for 2D. The "/default" suffix restricts use of the component fonts for this character subset to the character set of the default encoding; the "/1252" suffix to the Windows-1252 character set. For accessing component font mappings and exclusion ranges, the character encoding suffix is omitted. For all other character subsets, the AWT character encoding is determined internally by the Java runtime.

Properties for Solaris and Linux

Motif Component Font Mappings

The AWT text components, which rely on Motif-based peers for text rendering, cannot always use the same platform fonts as other AWT components and 2D. When looking up component fonts for these components, additional keys are recognized. The complete set of keys looked up in this case is:

     allfonts.CharacterSubsetName.motif
        LogicalFontName.StyleName.CharacterSubsetName.motif
        allfonts.CharacterSubsetName
        LogicalFontName.StyleName.CharacterSubsetName

AWT X11 Font Path

The AWT font path properties specify platform directories which should be added to the X11 server font path. The keys have the form:

   awtfontpath.CharacterSubsetName

The values have the form:

AWTFontPathValue:
        Directory
        Directory : AWTFontPathValue

The directories must be valid X11 font directories. The Java runtime ensures that the directories for all character subsets of a primary search sequence found by the search sequence lookup are part of the X11 font path. The implementation assumes that all logical fonts use the same set of character subsets for a given environment of encoding, language, and country.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization Enhancements in Java SE 6

This page provides an overview of internationalization enhancements in Java SE Development Kit 6 (JDK):

  • Core Java Internationalization
  • Desktop Java Internationalization

Core Java Internationalization

Locale Sensitive Services SPIs

To enable plug-in of locale sensitive data (e.g., date format strings) and services (e.g., date formatters), some Service Provider Interfaces (SPIs) for locale-sensitive classes in the java.text and java.util packages have been added. These SPIs make it much easier for developers to provide support of more locales in addition to the currently available locales in Java SE. For example, your own implementation of BreakIterator for Chinese could become available through the BreakIterator.getSentenceInstance factory in the Java runtime.

Unicode Normalizer API

The new java.text.Normalizer class supports the Unicode text normalization defined in Unicode Standard Annex #15.

Internationalized Domain Names Support

The new java.net.IDN class provides Internationalized Domain Names (IDNs) support based on RFC 3490, 3491, 3454, and 3492.

Japanese Imperial Calendar Support

A new Calendar implementation has been added to support the Japanese imperial era-based year numbering, such as Heisei 17 for 2005 (Gregorian). An instance of this Japanese imperial calendar can be created through the Calendar.getInstance factory by specifying a Locale("ja", "JP", "JP"). The java.text.SimpleDateFormat class now supports calendar specific eras and date formats for non-Gregorian calendar systems. Refer to the Supported Calendars documentation for details.

ResourceBundle Enhancements

The new nested java.util.ResourceBundle.Control class has been added to give applications more control over the resource bundle loading process. The class defines a set of callback methods that are invoked by the ResourceBundle.getBundle factory during the resource bundle loading. Applications can override those callback methods to change the factory method behavior.

Additional Locales Support

The following locales are now available.

  • zh_SG - Chinese (Simplified), Singapore
  • en_MT - English, Malta
  • en_PH - English, Philippines
  • en_SG - English, Singapore
  • el_CY - Greek, Cyprus
  • id_ID - Indonesian, Indonesia
  • ga_IE - Irish, Ireland
  • ms_MY - Malay, Malaysia
  • mt_MT - Maltese, Malta
  • pt_BR - Portuguese, Brazil
  • pt_PT - Portuguese, Portugal
  • es_US - Spanish, United States

Refer to the Supported Locales documentation for details.

Desktop Java Internationalization

Key Input in non-English Locales

The keyboard related AWT code has been re-architected to fix various problems on key input in non-English locales for Solaris and Linux operating systems.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization Enhancements in Java SE 7

The Internationalization enhancements for Java SE 7 include the following:

  • New Scripts and Characters from Unicode 6.0.0
  • Extensible Support for ISO 4217 Currency Codes
  • Category Locale Support
  • Locale Class Supports BCP47 and UTR35
  • New NumericShaper Methods
  • Unicode 6.0 Support in Regular Expressions API

New Scripts and Characters from Unicode 6.0.0

Early versions of the Java SE 7 release added support for Unicode 5.1.0. The final version of the Java SE 7 release supports Unicode 6.0.0. Unicode 6.0.0 is a major version of the Unicode Standard and adds support for over 2000 additional characters, as well as support for properties and data files.

The Java Tutorial has a new section that discusses Unicode.

Extensible Support for ISO 4217 Currency Codes

Currencies are identified by their ISO 4217 codes. These codes maintained by an external agency and are released independent of the Java SE platform. As of Java SE 7, it is possible to accommodate new currencies without requiring a new release of the JDK.

To supersede the default currency at runtime, create a properties file named <JAVA_HOME>/lib/currency.properties. This file contains the key/value pairs of the ISO 3166 country code, and the ISO 4217 currency data. The value part consists of three comma-separated ISO 4217 currency values: an alphabetic code, a numeric code, and a minor unit. Any lines beginning with the hash character, #, are treated as comment lines. For example:

# Sample currency property for Japan
JP=JPZ,999,0

The new API for this feature includes the following methods, all in the Currency class:

  • getAvailableCurrencies – Returns the set of available currencies.
  • getNumericCode – Returns the ISO 4217 numeric code of this currency
  • getDisplayName – Gets the name suitable for displaying this currency for the default locale.
  • getDisplayName(Locale) – Gets the name suitable for displaying the specified locale.

Category Locale Support

The default locale can be independently set for two types of uses: the format setting is used for formatting resources, and the display setting is used in menus and dialogs. The new getDefault(Locale.Category) method takes a Locale.Category parameter. Passing the FORMAT enum to the method returns the default locale for formatting resources. Similarly, passing the DISPLAY enum returns the default locale used by the UI. The setDefault(Locale.Category, Locale) method is used to set the locale for the specified category. The no-argument getDefault method returns the DISPLAY default value.

On Microsoft Windows, these default values are initialized according to the "Standard and Formats" and "Display Language" settings in the Windows control panel.

Locale Class Supports BCP47 and UTR35

The Locale class has been updated to implement identifiers interchangeable with BCP 47 (IETF BCP 47, "Tags for Identifying Languages"), with support for the LDML (UTS#35, "Unicode Locale Data Markup Language") BCP 47-compatible extensions for locale data exchange.

The following nested classes have been added to the Locale class in this release:

  • Locale.Builder can be used to create a Locale instance and to configure that instance using setter methods.

The following methods have been added to the Locale class:

  • getExtensionKeys()
  • getExtension(char)
  • getUnicodeLocaleType(String
  • getUnicodeLocaleKeys()
  • getUnicodeLocaleAttributes()
  • forLanguageTag(String)
  • toLanguageTag()
  • getScript()
  • getDisplayScript()
  • getDisplayScript(Locale)

The following constants have been added to the LOCALE class:

  • UNICODE_LOCALE_EXTENSION
  • PRIVATE_USE_EXTENSION

For more information, see the Creating a Locale and BCP 47 Extensions lessons in the Java Tutorial.

New NumericShaper Methods

The NumericShaper class is used to convert Latin-1 (European) digits to other Unicode decimal digits. For the Java SE 7 release, the NumericShaper.Range enum has been added to represent a Unicode range of a script having its own decimal digits. The following methods, using the NumericShaper.Range enum have been added to the Java SE 7 release:

  • getShaper(NumericShaper.Range) - returns a shaper for the provided Unicode range.
  • getContextualShaper(Set<NumericShaper.Range>) - returns a contextual shaper for the provided Unicode range(s). The shaper assumes European as the starting context.
  • getContextualShaper(Set<NumericShaper.Range> NumericShaper.Range) - returns a contextual shaper for the provided Unicode range(s). The shaper uses the defaultContext as the starting context.
  • shape(char[], int, int, NumericShaper.Range) - converts the digits in the text that occur between start and start + count, using the provided context.

For more information, see the Converting Latin Digits to Other Unicode Digits lesson in the Java Tutorial.

Unicode 6.0 Support in Regular Expressions API

The Regular Expressions pattern matching functionality has been expanded to support Unicode 6.0. You can match Unicode code points using either the \u or the \x escape sequence.

The Unicode Support page in the Java Tutorial has more information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization Enhancements in JDK 8

The Internationalization enhancements for JDK 8 include the following:

  • Unicode Enhancements
  • Adoption of Unicode CLDR Data and the java.locale.providers System Property
  • New Calendar and Locale APIs
  • Ability to Install a Custom Resource Bundle as an Extension

Unicode Enhancements

The JDK 8 release includes support for Unicode 6.2.0. Since the release of JDK 7, which supported Unicode 6.0, the Unicode 6.1.0 and 6.2.0 specs introduced the following new features that are now included in JDK 8:

  • 733 new characters including Turkish Lira sign
  • 7 new scripts:

    • Meroitic Hieroglyphs
    • Meroitic Cursive
    • Sora Sompeng
    • Chakma
    • Sharada
    • Takri
    • Miao

  • 11 new blocks - including 7 blocks for the new scripts listed above and 4 blocks for the following existing scripts:

    • Arabic Extended-A
    • Sundanese Supplement
    • Meetei Mayek Extensions
    • Arabic Mathematical Alphabetical Symbols

The Java Tutorial has a section that discusses Unicode.

Adoption of Unicode CLDR Data and the java.locale.providers System Property

The Unicode Consortium has released the Common Locale Data Repository (CLDR) project to "support the world's languages, with the largest and most extensive standard repository of locale data available." The CLDR is becoming the de-facto standard for locale data.

The CLDR's XML-based locale data has been incorporated into the JDK 8 release, however it is disabled by default.

There are now four distinct sources for locale data:

  • CLDR represents the locale data provided by the Unicode CLDR project.
  • HOST represents the current user's customization of the underlying operating system's settings. It works only with the user's default locale, and the customizable settings may vary depending on the OS, but primarily Date, Time, Number, and Currency formats are supported.
  • SPI represents the locale sensitive services implemented in the installed SPI providers.
  • JRE represents the locale data that is compatible with the prior JRE releases.

To select the desired locale data source, use the java.locale.providers system property, listing the data sources in the preferred order. For example:

java.locale.providers=HOST,SPI,CLDR,JRE

The default behavior is equivalent to the following setting:

java.locale.providers=JRE,SPI

For further information, see the API specification page for java.util.spi.LocaleServiceProvider and the "JDK 8 and JRE 8 Supported Locales" page, which becomes available after the release of Oracle JDK 8.

New Calendar and Locale APIs

As the Unicode Common Locale Data Repository (CLDR) project continues to evolve, the Java SE API is updated. The JDK 8 release includes two new classes, several new methods, and a new return value for an existing static method:

  • The DecimalFormatSymbols.getInstance(Locale) static method is now able to recognize Locale.UNICODE_LOCALE_EXTENSION for the numbering system.
  • Two new abstract classes for service providers are added to the java.util.spi package. The CalendarDataProvider abstract class provides localized week parameters. The CalendarNameProvider abstract class provides field values names for displaying a calendar's name. This class recognizes the following calendar type strings:
    • "gregory" - Gregorian/Julian hybrid
    • "buddhist" - Thai Buddhist
    • "japanese" - Japanese Imperial
  • The new method, LocaleServiceProvider.html#isSupportedLocale(Locale), returns true if the specified locale is supported by the locale service provider.
  • The new Calendar.getCalendarType() method returns the calendar type string ("gregory", "buddhist", "japanese").
  • New style specifiers, used by the Calendar.getDisplayName and Calendar.getDisplayNames methods, determine the format of the Calendar name:
    • Calendar.SHORT_FORMAT
    • Calendar.LONG_FORMAT
    • Calendar.SHORT_STANDALONE
    • Calendar.LONG_STANDALONE
  • Two new Locale methods for dealing with a locale's (optional) extensions:
    • Locale.hasExtensions()
    • Locale.stripExtensions()
    For more information, see BCP 47 Extensions in the Java Tutorial.
  • Two new Locale.filter methods return a list of Locale instances that match the specified criteria, as defined in RFC 4647:
    • Locale.filter(List<Local.LanguageRange>, Collection<Locale>)
    • Locale.filter(List<Locale.LanguageRange>, Collection<Locale>, Locale.FilteringMode)
  • Two new Locale.filterTags methods return a list of language tags that match the specified criteria, as defined in RFC 4647:
    • Locale.filterTags(List<Locale.LanguageRange>, Collection<String>)
    • Locale.filterTags(List<Locale.LanguageRange>, Collection<String>, Locale.FilteringMode)
  • Two new lookup methods return the best-matching locale or language tag using the lookup mechanism defined in RFC 4647:
    • Locale.lookup(List<Local.LanguageRange>, Collection)
    • Locale.lookupTag(List<Locale.LanguageRange>, Collection<String>)

Ability to Install a Custom Resource Bundle as an Extension

JDK 8 introduces the java.util.spi.ResourceBundleControlProvider interface, which is a service provider interface (SPI). SPIs enable you to create extensible applications, which are those that you can extend easily without modifying their original code base. This SPI enables you to change how the method ResourceBundle getBundle(String baseName, Locale targetLocale) loads resource bundles. Note that this method does not require an instance of the ResourceBundle.Control class. An installed implementation of the ResourceBundleControlProvider SPI replaces the default ResourceBundle.Control class, which defines the default bundle loading process. See Installing a Custom Resource Bundle as an Extension for more information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization Overview

Contents

  • Introduction
  • Core Java Internationalization
    • Text Representation
    • Locale Identification and Localization
    • Date and Time Handling
    • Text Processing
    • Locale Sensitive Services SPIs
    • Character Encoding Conversion
  • Desktop Java Internationalization
    • Text Input

Introduction

The global Internet demands global software - that is, software that can be developed independently of the countries or languages of its users, and then localized for multiple countries or regions. The Java Platform provides a rich set of APIs for developing global applications. These internationalization APIs are based on the Unicode standard and include the ability to adapt text, numbers, dates, currency, and user-defined objects to any country's conventions.

This document summarizes the internationalization APIs and features of the Java Platform, Standard Edition. For coding examples and step-by-step instructions, see the Java Tutorial. The detailed APIs are found in the Java Platform, Standard Edition, API Specification.

For additional information, see the Java Internationalization home page.

Text Representation

The Java programming language is based on the Unicode character set, and several libraries implement the Unicode standard. Unicode is an international character set standard which supports all of the major scripts of the world, as well as common technical symbols. The original Unicode specification defined characters as fixed-width 16-bit entities, but the Unicode standard has since been changed to allow for characters whose representation requires more than 16 bits. The range of legal code points is now U+0000 to U+10FFFF. An encoding defined by the standard, UTF-16, allows to represent all Unicode code points using one or two 16-bit units.

The primitive data type char in the Java programming language is an unsigned 16-bit integer that can represent a Unicode code point in the range U+0000 to U+FFFF, or the code units of UTF-16. The various types and classes in the Java platform that represent character sequences - char[], implementations of java.lang.CharSequence (such as the String class), and implementations of java.text.CharacterIterator - are UTF-16 sequences. Most Java source code is written in ASCII, a 7-bit character encoding, or ISO-8859-1, an 8-bit character encoding, but is translated into UTF-16 before processing.

The Character class as an object wrapper for the char primitive type. The Character class also contains static methods such as isLowerCase() and isDigit() for determining the properties of a character. Since J2SE 5, these methods have overloads that accept either a char (which allows representation of Unicode code points in the range U+0000 to U+FFFF) or an int (which allows representation of all Unicode code points).

Locale Identification and Localization

Locales

On the Java platform, a locale is simply an identifier for a particular combination of language and region. It is not a collection of locale-specific attributes. Instead, each locale-sensitive class maintains its own locale-specific information. With this design, there is no difference in how user and system objects maintain their locale-specific resources. Both use the standard localization mechanism.

Java programs are not assigned a single global locale. All locale-sensitive operations may be explicitly given a locale as an argument. This greatly simplifies multilingual programs. While a global locale is not enforced, a default locale is available for programs that do not wish to manage locales explicitly. A default locale also makes it possible to affect the behavior of the entire presentation with a single choice.

Java locales act as requests for certain behavior from another object. For example, a French Canadian locale passed to a Calendar object asks that the Calendar behave correctly for the customs of Quebec. It is up to the object accepting the locale to do the right thing. If the object has not been localized for a particular locale, it will try to find a "close" match with a locale for which it has been localized. Thus if a Calendar object was not localized for French Canada, but was localized for the French language in general, it would use the French localization instead.

Locale Class

A Locale object represents a specific geographical, political, or cultural region. An operation that requires a locale to perform its task is called locale-sensitive and uses the Locale object to tailor information for the user. For example, displaying a number is a locale-sensitive operation - the number should be formatted according to the customs and conventions of the user's native country, region, or culture.

Supported Locales

On the Java platform, there does not have to be a single set of supported locales, since each class maintains its own localizations. Nevertheless, there is a consistent set of localizations supported by the classes of the Java Platform. Other implementations of the Java platform may support different locales. Those supported by the JRE are summarized in the web page Supported Locales.

Localized Resources

All locale-sensitive classes must be able to access resources customized for the locales they support. To aid in the process of localization, it helps to have these resources grouped together by locale and separated from the locale-neutral parts of the program.

ResourceBundle Class

The class ResourceBundle is an abstract base class representing containers of resources. Programmers create subclasses of ResourceBundle that contain resources for a particular locale. New resources can be added to an instance of ResourceBundle, or new instances of ResourceBundle can be added to a system without affecting the code that uses them. Packaging resources as classes allows developers to take advantage of Java's class loading mechanism to find resources.

Resource bundles contain locale-specific objects. When a program needs a locale-specific resource, a String object for example, the program can load it from the resource bundle that is appropriate for the current user's locale. In this way, the programmer can write code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

This allows Java programmers to write code that can:

  • be easily localized, or translated, into different languages
  • handle multiple locales at once
  • be easily modified later to support even more locales
ResourceBundle.Control Class

ResourceBundle.Control is a nested class of ResourceBundle. It defines methods to be called by the ResourceBundle.getBundle factory methods so that the resource bundle loading behavior may be changed. For example, application specific resource bundle formats, such as XML, could be supported by overriding the methods.

ListResourceBundle Class

ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.

PropertyResourceBundle Class

PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.

Date and Time Handling

The java.util.Date class represents a specific instant in time with millisecond precision, independent of time zones and locales.

The Date class contains several methods for the interpretation of dates as year, month, day, hour, minute, and second values, and for formatting and parsing date strings. These methods are incompatible with internationalization, and most of them therefore are deprecated. Instead of them, applications should use the Calendar class to convert between date and time fields, and the DateFormat class to format and parse date strings.

Calendar Class

The class Calendar is an abstract base class which can convert between a point in time (represented as milliseconds from 00:00:00 GMT, Jan 1, 1970) and a set of integers representing the year, month, week and so on. GregorianCalendar is a concrete subclass of Calendar that does this according to the rules of the Gregorian calendar.

Calendar and its subclasses are useful for doing various manipulations with time values. Arithmetic can be performed on a Calendar object's fields and the resulting date determined. A Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style. Refer to the web page Supported Calendars for details.

TimeZone Class

The abstract class TimeZone encapsulates a time zone offset from GMT (Greenwich Mean Time) and a possible daylight saving time offset. The TimeZone.getTimeZone factory method can be called to get a TimeZone instance for a time zone ID. The TimeZone.getDefault factory method automatically detects the platform time zone and returns a TimeZone instance that matches the platform time zone.

The Calendar class and its subclasses use the TimeZone class to convert between local time and UTC, which is the internal representation used by Date objects. Most programs will not have to deal with TimeZone objects directly.

Text Processing

Formatting

It is in formatting data for output that many cultural conventions are applied. Numbers, dates, times, and messages may all require formatting before they can be displayed. The Java platform provides a set of flexible formatting classes that can handle both the standard locale formats and programmer defined custom formats. These formatting classes are also able to parse formatted strings back into their constituent objects.

Format Class

The class Format is an abstract base class for formatting locale-sensitive information such as dates, times, messages, and numbers. Three main subclasses are provided: DateFormat, NumberFormat, and MessageFormat. These three also provide subclasses of their own.

DateFormat Class

Dates and times are stored internally in a locale-independent way, but should be formatted so that they can be displayed in a locale-sensitive manner. For example, the same date might be formatted as:

  • November 3, 1997 (English)
  • 3 novembre 1997 (French)

The class DateFormat is an abstract base class for formatting and parsing date and time values in a locale-independent manner. It has a number of static factory methods for getting standard time formats for a given locale.

The DateFormat object uses Calendar and TimeZone objects in order to interpret time values. By default, a DateFormat object for a given locale will use the appropriate Calendar object for that locale and the system's default TimeZone object. The programmer can override these choices if desired.

SimpleDateFormat Class

The class SimpleDateFormat is a concrete class for formatting and parsing dates and times in a locale-sensitive manner. It allows for formatting (milliseconds to text), parsing (text to milliseconds), and normalization.

DateFormatSymbols Class

The class DateFormatSymbols is used to encapsulate localizable date-time formatting data, such as the names of the months, the names of the days of the week, time of day, and the time zone data. The DateFormat and SimpleDateFormat classes both use the DateFormatSymbols class to encapsulate this information.

Usually, programmers will not use the DateFormatSymbols directly. Rather, they will implement formatting with the DateFormat class's factory methods.

NumberFormat Class

The class NumberFormat is an abstract base class for formatting and parsing numeric data. It contains a number of static factory methods for getting different kinds of locale-specific number formats.

The NumberFormat class helps programmers to format and parse numbers for any locale. Code using this class can be completely independent of the locale conventions for decimal points, thousands-separators, the particular decimal digits used, or whether the number format is even decimal. The application can also display a number as a normal decimal number, currency, or percentage:

  • 1,234.5 (decimal number in U.S. format)
  • $1,234.50 (U.S. currency in U.S. format)
  • 1.234,50 € (European currency in German format)
  • 123.450% (percent in German format)

DecimalFormat Class

Numbers are stored internally in a locale-independent way, but should be formatted so that they can be displayed in a locale-sensitive manner. For example, when using "#,###.00" as a pattern, the same number might be formatted as:

  • 1.234,56 (German)
  • 1,234.56 (English)

The class DecimalFormat, which is a concrete subclass of the NumberFormat class, can format decimal numbers. Programmers generally will not instantiate this class directly but will use the factory methods provided.

The DecimalFormat class has the ability to take a pattern string to specify how a number should be formatted. The pattern specifies attributes such as the precision of the number, whether leading zeros should be printed, and what currency symbols are used. The pattern string can be altered if a program needs to create a custom format.

DecimalFormatSymbols Class

The class DecimalFormatSymbols represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers. DecimalFormat creates for itself an instance of DecimalFormatSymbols from its locale data. A programmer needing to change any of these symbols can get the DecimalFormatSymbols object from the DecimalFormat object and then modify it.

ChoiceFormat Class

The class ChoiceFormat is a concrete subclass of the NumberFormat class. The ChoiceFormat class allows the programmer to attach a format to a range of numbers. It is generally used in a MessageFormat object for handling plurals. See the "MessageFormat Class" section that follows for more information.

MessageFormat Class

Programs often need to build messages from sequences of strings, numbers and other data. For example, the text of a message displaying the number of files on a disk drive will vary:

  • The disk C contains 100 files.
  • The disk D contains 1 file.
  • The disk F contains 0 files.

If a message built from sequences of strings and numbers is hard-coded, it cannot be translated into other languages. For example, note the different positions of the parameters "3" and "G" in the following translations:

  • The disk G contains 3 files. (English)
  • Il y a 3 fichiers sur le disque G. (French)

The class MessageFormat provides a means to produce concatenated messages in language-neutral way. The MessageFormat object takes a set of objects, formats them, and then inserts the formatted strings into the pattern at the appropriate places.

ParsePosition Class

The class ParsePosition is used by the Format class and its subclasses to keep track of the current position during parsing. The parseObject() method in the Format class requires a ParsePosition object as an argument.

FieldPosition Class

The FieldPosition class is used by the Format class and its subclasses to identify fields in formatted output. One version of the format() method in the Format class requires a FieldPosition object as an argument.

Locale-Sensitive String Operations

Programs frequently need to manipulate strings. Common operations on strings include searching and sorting. Some tasks, such as collating strings or finding various boundaries in text, are surprisingly difficult to get right and are even more difficult when multiple languages must be considered. The Java Platform provides classes for handling many of these common string manipulations in a locale-sensitive manner.

Collator Class

The Collator class performs locale-sensitive string comparison. Programmers use this class to build searching and alphabetical sorting routines for natural language text. Collator is an abstract base class. Its subclasses implement specific collation strategies. One subclass, RuleBasedCollator, is currently provided with the Java Platform and is applicable to a wide set of languages. Other subclasses may be created to handle more specialized needs.

RuleBasedCollator Class

The RuleBasedCollator class, which is a concrete subclass of the Collator class, provides a simple, data-driven, table collator. Using RuleBasedCollator, a programmer can create a customized table-based collator. For example, a programmer can build a collator that will ignore (or notice) uppercase letters, accents, and Unicode combining characters.

CollationElementIterator Class

The CollationElementIterator class is used as an iterator to walk through each character of an international string. Programmers use the iterator to return the ordering priority of the positioned character. The ordering priority of a character, or key, defines how a character is collated in the given Collator object. The CollationElementIterator class is used by the compare() method of the RuleBasedCollator class.

CollationKey Class

A CollationKey object represents a string under the rules of a specific Collator object. Comparing two CollationKey objects returns the relative order of the strings they represent. Using CollationKey objects to compare strings is generally faster than using the Collator.compare() method. Thus, when the strings must be compared multiple times, for example when sorting a list of strings, it is more efficient to use CollationKey objects.

BreakIterator Class

The BreakIterator class indirectly implements methods for finding the position of the following types of boundaries in a string of text:

  • potential line break
  • sentence
  • word
  • character

The conventions on where to break lines, sentences, words, and characters vary from one language to another. Since the BreakIterator class is locale-sensitive, it can be used by programs that perform text operations. For example, consider a a word processing program that can highlight a character, cut a word, move the cursor to the next sentence, or word-wrap at a line ending. This word processing program would use break iterators to determine the logical boundaries in text, enabling it to perform text operations in a locale-sensitive manner.

StringCharacterIterator Class

The StringCharacterIterator class provides the ability to iterate over a string of Unicode characters in a bidirectional manner. This class uses a cursor to move within a range of text, and can return individual characters or their index values. The StringCharacterIterator class implements the character iterator functionality of the CharacterIterator interface.

CharacterIterator Interface

The CharacterIterator interface defines a protocol for bidirectional iteration over Unicode characters. Classes should implement this interface if they want to move about within a range of text and return individual Unicode characters or their index values. CharacterIterator is for searching is useful when performing character searches.

Normalizer Class

The Normalizer class provides methods to transform Unicode text into an equivalent composed or decomposed form. The class supports the Unicode Normalization Forms defined by the Unicode standard.

Locale Sensitive Services SPIs

Locale sensitive services provided by classes in the java.text and java.util packages can be extended by implementing Locale Sensitive Services SPIs for locales the Java runtime has not yet supported. In addition to localized symbols or names for the Currency, Locale, and TimeZone classes in the java.util package, implementations of the following classes in the java.text package can be plugged in with the SPIs.

  • BreakIterator
  • Collator
  • DateFormat
  • DateFormatSymbols
  • DecimalFormatSymbols
  • NumberFormat

Character Encoding Conversion

The Java platform uses Unicode as its native character encoding; however, many Java programs still need to handle text data in other encodings. Java therefore provides a set of classes that convert many standard character encodings to and from Unicode. Java programs that need to deal with non-Unicode text data convert that data into Unicode, process the data as Unicode, then convert the result back to the external character encoding. The InputStreamReader and OutputStreamWriter classes provide methods that can convert between other character encodings and Unicode.

Supported Encodings

The InputStreamReader, OutputStreamWriter, and String classes can convert between Unicode and the set of character encodings listed in the web page Supported Encodings.

Stream I/O

The Java Platform provides features in the java.io package to improve the handling of character data: the Reader and Writer classes, and an enhancement to the PrintStream class.

Reader and Writer Classes

The Reader and Writer class hierarchies provide the ability to perform I/O operations on character streams. These hierarchies parallel the InputStream and OutputStream class hierarchies, but operate on streams of characters rather than streams of bytes. Character streams make it easy to write programs that are not dependent upon a specific character encoding, and are therefore easier to internationalize. The Reader and Writer classes also have the ability to convert between Unicode and other character encodings. Please refer to the Character Streams document for more information about the Reader and Writer class hierarchies.

PrintStream Class

The PrintStream class produces output using the system's default character encoding and line terminator. This change allows methods such as System.out.println() to act more reasonably with non-ASCII data.

Charset Package

The java.nio.charset package provides the underpinnings for character encoding conversion. Applications can use its classes to fine-tune the behavior of built-in character converters. Developers can also create custom converters for character encodings that are not supported by built-in character converters, using the java.nio.charset.spi package.

Text Input

Input Methods

Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean - languages using thousands of different characters - on keyboards with far fewer keys. However, the Java platform also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition.

The Java platform enables the use of native input methods provided by the host operating system, such as Windows or Solaris, as well as the implementation and use of input methods written in the Java programming language.

The term input methods does not refer to class methods of the Java programming language.

Input Method Support in Swing

The Swing text components provide an integrated user interface for text input using input methods. Depending on the locale, one of two input styles is used. With on-the-spot (inline) input, the style used for most locales, the input methods insert the text directly into the text component while the text is being composed. With below-the-spot input, the style used for Chinese locales, a separate composition window is used, which is positioned automatically to be near the point where the text is to be inserted after being committed.

An application using Swing text components does not have to coordinate the interaction between the text components and input methods. However, it should call InputContext.endComposition when all text must be committed, such as when a document is saved or printed.

Input Method Framework

The input method framework enables the collaboration between text editing components and input methods in entering text. Programmers who develop text editing components or input methods use this framework. Other application developers generally make only minimal use of it. For example, they should call InputContext.endComposition when all text must be committed, such as when a document is saved or printed.

The Input Method Framework web page contains links to the specifications and API documentation.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE 8 Internationalization (I18n) Developer Guides

Documentation Contents

Java™ Internationalization Support

Internationalization is the process of designing an application so that it can be adapted to various languages and regions without engineering changes. Sometimes the term internationalization is abbreviated as i18n, because there are 18 letters between the first "i" and the last "n."

An internationalized program has the following characteristics:

  • With the addition of localization data, the same executable can run worldwide.
  • Textual elements, such as status messages and the GUI component labels, are not hardcoded in the program. Instead they are stored outside the source code and retrieved dynamically.
  • Support for new languages does not require recompilation.
  • Culturally-dependent data, such as dates and currencies, appear in formats that conform to the end user's region and language.
  • It can be localized quickly.

Acknowledgment: Much of the design and implementation of the internationalization API is by IBM's Center for Java Technology - Silicon Valley. Java Software is grateful for their work.

Overview

  • Internationalization Overview

Tutorials and Programmer's Guides

  • Internationalization Trail of the Java Tutorial
  • Supported Locales
  • Supported Encodings
  • Supported Calendars

API Enhancements

  • Internationalization Enhancements in JDK 8
  • Internationalization Enhancements in Java SE 7
  • Internationalization Enhancements in Java SE 6

More Information

  • Internationalization Home Page
  • Internationalization Articles
  • Java Internationalization FAQ
  • Internationalization Tools
  • Fonts
    • Fonts and Text Layout section of the Java 2D API Guide
    • Supported Fonts
    • The Font Configuration Files
  • Input Methods
    • An overview of Input Methods
    • Input Method Framework

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Supported Calendars

This page documents supported calendar systems.

1. Introduction

Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on. Subclasses of Calendar interpret a Date according to the rules of a specific calendar system. The platform provides one public concrete subclass of Calendar: GregorianCalendar. The factory method, Calendar.getInstance, returns the concrete calendar system implementation for the given Locale. The following are supported calendar systems:

Locale | Calendar System | Since (JRE version)
th_TH (with any variant) | Thai Buddhist calendar | 1.4
ja_JP_JP | Japanese imperial calendar | 1.6
Any except above Locales | Gregorian calendar (GregorianCalendar) | 1.1

2. Thai Buddhist Calendar

In Thailand, the Gregorian calendar system is used with the Buddhist Era-based year numbering. In Buddhist Era (พุทธศักราช) or B.E. (พ.ศ.) for short, year 1 corresponds to BCE (BC) 543 (Julian). Therefore, Gregorian year + 543 is the B.E. year value.

The Calendar.getInstance method returns a Thai Buddhist calendar instance if a Thai locale is specified, which is determined by its language and country values. This Thai Buddhist calendar implementation supports dates accurately from B.E. 2484 (1941 Gregorian). The historical calendar system transitions are not supported by the implementation. The Calendar.ERA value for Buddhist Era is 1.

3. Japanese Imperial Calendar

In Japan, the Gregorian calendar system is used with the imperial era-based year numbering. An imperial era starts from an emperor's ascension and its year number is reset to 1 with a new era name. The first year of an imperial era is not in sync with the Gregorian year boundaries, and any day could be the first day of an imperial era. For example, the current era started from January 8, 1989 (Gregorian). However, the month and the day of month numberings are in sync with the Gregorian calendar system.

The Calendar.getInstance method returns a Japanese imperial calendar instance if ja_JP_JP locale is specified. This implementation supports the eras since Meiji with the following transition dates.

Era Name
(in Japanese)
 Era
Abbr.
 ERA
 field value
 Transition date and time
(Gregorian)
- (西暦)
 -
 0
 -
Meiji (明治)
 M
 1
 1868-01-01 00:00:00 local time
Taisho (大正)
 T
 2
 1912-07-30 00:00:00 local time
Showa (昭和)
 S
 3
 1926-12-25 00:00:00 local time
Heisei (平成)
 H
 4
 1989-01-08 00:00:00 local time

Before Meiji, the Gregorian year numbering is supported. Unlike GregorianCalendar, the Japanese imperial calendar implementation doesn't support any Julian to Gregorian transition, and the year numbering before Gregorian 1 is 0, -1, -2, ..., not 1, 2, 3, ... Strictly speaking, the Gregorian calendar is in use from 1873 (Meiji 5) and other calendar systems were used before that year. However, the implementation defines the first day of Meiji as January 1, 1868, which is not historically accurate. The Japanese decrees related to calendar systems don't specify how to deal with time zones outside of Japan. The implementation assumes that era transitions occur at midnight in local time in any time zone.

In the Calendar API, some fields are in sync with the year value for the era transitions and therefore handle irregular rules in the first year of an imperial era. The following table shows those fields.

Calendar field
 Description
WEEK_OF_YEAR
         To determine the first WEEK_OF_YEAR of year 1 in each era, the same rules as determining the first week by the first day of week and minimal days in the first week values are applied. For example, if the first day of week is SUNDAY and the minimal days in the first week is 1, the WEEK_OF_YEAR value of 1926-12-18 is 51 of Taisho 15 and the value of 1926-12-25 is 1 of Showa 1.
DAY_OF_YEAR
         The DAY_OF_YEAR value of the first day of each era is 1. For example, looking at the transition between the Showa and Heisei eras, the last day of the Showa era (Showa 64.01.07, gregorian value 1989-01-07) is 7 and the next day, which is the first day of the Heisei era (Heisei 1.01.08), is 1. The getLeastMaximum method returns the minimum value of all year 1 lengths in days.

4. Formatting and Parsing Non-GregorianCalendar Dates

A DateFormat instance has a Calendar instance for internal date-time conversions based on the given Locale or the default one. The same rule is applied for creating a Calendar instance. For example, if ja_JP_JP locale is specified, the DateFormat.getDateInstance method returns a DateFormat instance that handles Japanese imperial calendar dates. The following code:
DateFormat df = DateFormat.getDateInstance(DateFormat.FULL,
                                           new Locale("ja", "JP", "JP"));
System.out.println(df.format(new Date()));
will produce the output, like:
平成17年10月25日
Also, the DateFormat.parse method parses a date string with an imperial era. The following code:
System.out.println(df.parse("平成元年10月25日"));
will produce the output in the Asia/Tokyo time zone:
Wed Oct 25 00:00:00 JST 1989
Note that a Date object returned by the DateFormat.parse method represents a corresponding Gregorian date. To convert a Date to a Japanese imperial date, the Calendar.setTime method must be used with the given Date.

In SimpleDateFormat, the following rules are applied for the Thai Buddhist and Japanese imperial calendar systems.

Calendar system
         Pattern Letter
         Description
Thai Buddhist G
         The number of pattern letters doesn't affect displayed era names.
Thai Buddhist y
         The same rule of the number of pattern letters as GregorianCalendar is applied.
Japanese imperial G
         For formatting, if the number of pattern letters is 4 or more, the long era names (e.g., "平成") are used. Otherwise, the abbreviations (e.g., "H") are used. For parsing, both the long era names and abbreviations are accepted.
Japanese imperial y
         For formatting, if the number of pattern letters is 4 or more, the first year of an era is formatted as the locale specific representation, such as "元" in Japanese locale. Other year values are displayed as numbers. The 2- and 4-digit rules of GregorianCalendar date formatting are not applied. For parsing, both the locale specific representation and the number representation are accepted.

If the variant element is "TH" in Thai locale, the Thai digits are used for the date-time formatting. For example, the following code:
DateFormat df = DateFormat.getDateInstance(DateFormat.FULL,
                                           new Locale("th", "TH", "TH"));
System.out.println(df.format(new Date()));
will produce the output, like:
วันอังคารที่ ๒๕ ตุลาคม พ.ศ. ๒๕๔๘

5. Serialization Considerations

When a Calendar object returned by the Calendar.getInstance factory method is serialized and sent to another JVM, deserialization of the object fails if the destination JVM does not support the same Calendar subclass that has been used to create the serialized Calendar object. Please make sure that the same Calendar subclasses are supported in JVMs where you would like to exchange serialized Calendar objects.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Supported Encodings

The java.io.InputStreamReader, java.io.OutputStreamWriter, java.lang.String classes, and classes in the java.nio.charset package can convert between Unicode and a number of other character encodings. The supported encodings vary between different implementations of the Java Platform, Standard Edition 7 (Java SE 7). The class description for java.nio.charset.Charset lists the encodings that any implementation of the Java Platform, Standard Edition 7 is required to support.

Oracle's Java SE Development Kit 7 (Java SE 7) for all platforms (Solaris, Linux, and Microsoft Windows) and the Java SE Runtime Environment 7 (JRE 7) for Solaris and Linux support all encodings shown on this page. Oracle's JRE 7 for Microsoft Windows may be installed as a complete international version or as a European languages version. By default, the JRE 7 installer installs a European languages version if it recognizes that the host operating system only supports European languages. If the installer recognizes that any other language is needed, or if the user requests support for non-European languages in a customized installation, a complete international version is installed. The European languages version only supports the encodings shown in the following Basic Encoding Set table. The international version (which includes the lib/charsets.jar file) supports all encodings shown on this page.

The following tables show the encoding sets supported by Java SE 7. The canonical names used by the new java.nio APIs are in many cases not the same as those used in the java.io and java.lang APIs.

Basic Encoding Set (contained in lib/rt.jar)

Canonical Name for java.nio API | Canonical Name for java.io API and java.lang API | Description
IBM00858 | Cp858 | Variant of Cp850 with Euro character
IBM437 | Cp437 | MS-DOS United States, Australia, New Zealand, South Africa
IBM775 | Cp775 | PC Baltic
IBM850 | Cp850 | MS-DOS Latin-1
IBM852 | Cp852 | MS-DOS Latin-2
IBM855 | Cp855 | IBM Cyrillic
IBM857 | Cp857 | IBM Turkish
IBM862 | Cp862 | PC Hebrew
IBM866 | Cp866 | MS-DOS Russian
ISO-8859-1 | ISO8859_1 | ISO-8859-1, Latin Alphabet No. 1
ISO-8859-2 | ISO8859_2 | Latin Alphabet No. 2
ISO-8859-4 | ISO8859_4 | Latin Alphabet No. 4
ISO-8859-5 | ISO8859_5 | Latin/Cyrillic Alphabet
ISO-8859-7 | ISO8859_7 | Latin/Greek Alphabet (ISO-8859-7:2003)
ISO-8859-9 | ISO8859_9 | Latin Alphabet No. 5
ISO-8859-13 | ISO8859_13 | Latin Alphabet No. 7
ISO-8859-15 | ISO8859_15 | Latin Alphabet No. 9
KOI8-R | KOI8_R | KOI8-R, Russian
KOI8-U | KOI8_U | KOI8-U, Ukrainian
US-ASCII | ASCII | American Standard Code for Information Interchange
UTF-8 | UTF8 | Eight-bit Unicode (or UCS) Transformation Format
UTF-16 | UTF-16 | Sixteen-bit Unicode (or UCS) Transformation Format, byte order identified by an optional byte-order mark
UTF-16BE | UnicodeBigUnmarked | Sixteen-bit Unicode (or UCS) Transformation Format, big-endian byte order
UTF-16LE | UnicodeLittleUnmarked | Sixteen-bit Unicode (or UCS) Transformation Format, little-endian byte order
UTF-32 | UTF_32 | 32-bit Unicode (or UCS) Transformation Format, byte order identified by an optional byte-order mark
UTF-32BE | UTF_32BE | 32-bit Unicode (or UCS) Transformation Format, big-endian byte order
UTF-32LE | UTF_32LE | 32-bit Unicode (or UCS) Transformation Format, little-endian byte order
x-UTF-32BE-BOM | UTF_32BE_BOM | 32-bit Unicode (or UCS) Transformation Format, big-endian byte order, with byte-order mark
x-UTF-32LE-BOM | UTF_32LE_BOM | 32-bit Unicode (or UCS) Transformation Format, little-endian byte order, with byte-order mark
windows-1250 | Cp1250 | Windows Eastern European
windows-1251 | Cp1251 | Windows Cyrillic
windows-1252 | Cp1252 | Windows Latin-1
windows-1253 | Cp1253 | Windows Greek
windows-1254 | Cp1254 | Windows Turkish
windows-1257 | Cp1257 | Windows Baltic
Not available | UnicodeBig | Sixteen-bit Unicode (or UCS) Transformation Format, big-endian byte order, with byte-order mark
x-IBM737 | Cp737 | PC Greek
x-IBM874 | Cp874 | IBM Thai
x-UTF-16LE-BOM | UnicodeLittle | Sixteen-bit Unicode (or UCS) Transformation Format, little-endian byte order, with byte-order mark

Extended Encoding Set (contained in lib/charsets.jar)

Canonical Name for java.nio API | Canonical Name for java.io API and java.lang API | Description
Big5 | Big5 | Big5, Traditional Chinese
Big5-HKSCS | Big5_HKSCS | Big5 with Hong Kong extensions, Traditional Chinese (incorporating 2001 revision)
EUC-JP | EUC_JP | JISX 0201, 0208 and 0212, EUC encoding Japanese
EUC-KR | EUC_KR | KS C 5601, EUC encoding, Korean
GB18030 | GB18030 | Simplified Chinese, PRC standard
GB2312 | EUC_CN | GB2312, EUC encoding, Simplified Chinese
GBK | GBK | GBK, Simplified Chinese
IBM-Thai | Cp838 | IBM Thailand extended SBCS
IBM01140 | Cp1140 | Variant of Cp037 with Euro character
IBM01141 | Cp1141 | Variant of Cp273 with Euro character
IBM01142 | Cp1142 | Variant of Cp277 with Euro character
IBM01143 | Cp1143 | Variant of Cp278 with Euro character
IBM01144 | Cp1144 | Variant of Cp280 with Euro character
IBM01145 | Cp1145 | Variant of Cp284 with Euro character
IBM01146 | Cp1146 | Variant of Cp285 with Euro character
IBM01147 | Cp1147 | Variant of Cp297 with Euro character
IBM01148 | Cp1148 | Variant of Cp500 with Euro character
IBM01149 | Cp1149 | Variant of Cp871 with Euro character
IBM037 | Cp037 | USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia
IBM1026 | Cp1026 | IBM Latin-5, Turkey
IBM1047 | Cp1047 | Latin-1 character set for EBCDIC hosts
IBM273 | Cp273 | IBM Austria, Germany
IBM277 | Cp277 | IBM Denmark, Norway
IBM278 | Cp278 | IBM Finland, Sweden
IBM280 | Cp280 | IBM Italy
IBM284 | Cp284 | IBM Catalan/Spain, Spanish Latin America
IBM285 | Cp285 | IBM United Kingdom, Ireland
IBM297 | Cp297 | IBM France
IBM420 | Cp420 | IBM Arabic
IBM424 | Cp424 | IBM Hebrew
IBM500 | Cp500 | EBCDIC 500V1
IBM860 | Cp860 | MS-DOS Portuguese
IBM861 | Cp861 | MS-DOS Icelandic
IBM863 | Cp863 | MS-DOS Canadian French
IBM864 | Cp864 | PC Arabic
IBM865 | Cp865 | MS-DOS Nordic
IBM868 | Cp868 | MS-DOS Pakistan
IBM869 | Cp869 | IBM Modern Greek
IBM870 | Cp870 | IBM Multilingual Latin-2
IBM871 | Cp871 | IBM Iceland
IBM918 | Cp918 | IBM Pakistan (Urdu)
ISO-2022-CN | ISO2022CN | GB2312 and CNS11643 in ISO 2022 CN form, Simplified and Traditional Chinese (conversion to Unicode only)
ISO-2022-JP | ISO2022JP | JIS X 0201, 0208, in ISO 2022 form, Japanese
ISO-2022-KR | ISO2022KR | ISO 2022 KR, Korean
ISO-8859-3 | ISO8859_3 | Latin Alphabet No. 3
ISO-8859-6 | ISO8859_6 | Latin/Arabic Alphabet
ISO-8859-8 | ISO8859_8 | Latin/Hebrew Alphabet
JIS_X0201 | JIS_X0201 | JIS X 0201
JIS_X0212-1990 | JIS_X0212-1990 | JIS X 0212
Shift_JIS | SJIS | Shift-JIS, Japanese
TIS-620 | TIS620 | TIS620, Thai
windows-1255 | Cp1255 | Windows Hebrew
windows-1256 | Cp1256 | Windows Arabic
windows-1258 | Cp1258 | Windows Vietnamese
windows-31j | MS932 | Windows Japanese
x-Big5-Solaris | Big5_Solaris | Big5 with seven additional Hanzi ideograph character mappings for the Solaris zh_TW.BIG5 locale
x-euc-jp-linux | EUC_JP_LINUX | JISX 0201, 0208, EUC encoding Japanese
x-EUC-TW | EUC_TW | CNS11643 (Plane 1-7,15), EUC encoding, Traditional Chinese
x-eucJP-Open | EUC_JP_Solaris | JISX 0201, 0208, 0212, EUC encoding Japanese
x-IBM1006 | Cp1006 | IBM AIX Pakistan (Urdu)
x-IBM1025 | Cp1025 | IBM Multilingual Cyrillic: Bulgaria, Bosnia, Herzegovinia, Macedonia (FYR)
x-IBM1046 | Cp1046 | IBM Arabic - Windows
x-IBM1097 | Cp1097 | IBM Iran (Farsi)/Persian
x-IBM1098 | Cp1098 | IBM Iran (Farsi)/Persian (PC)
x-IBM1112 | Cp1112 | IBM Latvia, Lithuania
x-IBM1122 | Cp1122 | IBM Estonia
x-IBM1123 | Cp1123 | IBM Ukraine
x-IBM1124 | Cp1124 | IBM AIX Ukraine
x-IBM1381 | Cp1381 | IBM OS/2, DOS People's Republic of China (PRC)
x-IBM1383 | Cp1383 | IBM AIX People's Republic of China (PRC)
x-IBM33722 | Cp33722 | IBM-eucJP - Japanese (superset of 5050)
x-IBM834 | Cp834 | IBM EBCDIC DBCS-only Korean
x-IBM856 | Cp856 | IBM Hebrew
x-IBM875 | Cp875 | IBM Greek
x-IBM921 | Cp921 | IBM Latvia, Lithuania (AIX, DOS)
x-IBM922 | Cp922 | IBM Estonia (AIX, DOS)
x-IBM930 | Cp930 | Japanese Katakana-Kanji mixed with 4370 UDC, superset of 5026
x-IBM933 | Cp933 | Korean Mixed with 1880 UDC, superset of 5029
x-IBM935 | Cp935 | Simplified Chinese Host mixed with 1880 UDC, superset of 5031
x-IBM937 | Cp937 | Traditional Chinese Host miexed with 6204 UDC, superset of 5033
x-IBM939 | Cp939 | Japanese Latin Kanji mixed with 4370 UDC, superset of 5035
x-IBM942 | Cp942 | IBM OS/2 Japanese, superset of Cp932
x-IBM942C | Cp942C | Variant of Cp942
x-IBM943 | Cp943 | IBM OS/2 Japanese, superset of Cp932 and Shift-JIS
x-IBM943C | Cp943C | Variant of Cp943
x-IBM948 | Cp948 | OS/2 Chinese (Taiwan) superset of 938
x-IBM949 | Cp949 | PC Korean
x-IBM949C | Cp949C | Variant of Cp949
x-IBM950 | Cp950 | PC Chinese (Hong Kong, Taiwan)
x-IBM964 | Cp964 | AIX Chinese (Taiwan)
x-IBM970 | Cp970 | AIX Korean
x-ISCII91 | ISCII91 | ISCII91 encoding of Indic scripts
x-ISO2022-CN-CNS | ISO2022_CN_CNS | CNS11643 in ISO 2022 CN form, Traditional Chinese (conversion from Unicode only)
x-ISO2022-CN-GB | ISO2022_CN_GB | GB2312 in ISO 2022 CN form, Simplified Chinese (conversion from Unicode only)
x-iso-8859-11 | x-iso-8859-11 | Latin/Thai Alphabet
x-JIS0208 | x-JIS0208 | JIS X 0208
x-JISAutoDetect | JISAutoDetect | Detects and converts from Shift-JIS, EUC-JP, ISO 2022 JP (conversion to Unicode only)
x-Johab | x-Johab | Korean, Johab character set
x-MacArabic | MacArabic | Macintosh Arabic
x-MacCentralEurope | MacCentralEurope | Macintosh Latin-2
x-MacCroatian | MacCroatian | Macintosh Croatian
x-MacCyrillic | MacCyrillic | Macintosh Cyrillic
x-MacDingbat | MacDingbat | Macintosh Dingbat
x-MacGreek | MacGreek | Macintosh Greek
x-MacHebrew | MacHebrew | Macintosh Hebrew
x-MacIceland | MacIceland | Macintosh Iceland
x-MacRoman | MacRoman | Macintosh Roman
x-MacRomania | MacRomania | Macintosh Romania
x-MacSymbol | MacSymbol | Macintosh Symbol
x-MacThai | MacThai | Macintosh Thai
x-MacTurkish | MacTurkish | Macintosh Turkish
x-MacUkraine | MacUkraine | Macintosh Ukraine
x-MS950-HKSCS | MS950_HKSCS | Windows Traditional Chinese with Hong Kong extensions
x-mswin-936 | MS936 | Windows Simplified Chinese
x-PCK | PCK | Solaris version of Shift_JIS
x-SJIS_0213 | x-SJIS_0213 | Shift_JISX0213
x-windows-50220 | Cp50220 | Windows Codepage 50220 (7-bit implementation)
x-windows-50221 | Cp50221 | Windows Codepage 50221 (7-bit implementation)
x-windows-874 | MS874 | Windows Thai
x-windows-949 | MS949 | Windows Korean
x-windows-950 | MS950 | Windows Traditional Chinese
x-windows-iso2022jp | x-windows-iso2022jp | Variant ISO-2022-JP (MS932 based)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Supported Fonts

The set of supported fonts varies between different implementations of the Java platform. For the terminology used, see the Font class description.

  • Support for Physical Fonts
  • Support for Logical Fonts
  • The Lucida Fonts

Support for Physical Fonts

The JRE supports TrueType and PostScript Type 1 fonts.

Physical fonts need to be installed in locations known to the Java runtime environment. The JRE looks in two locations: the lib/fonts directory within the JRE itself, and the normal font location(s) defined by the host operating system. If fonts with the same name exist in both locations, the one in the lib/fonts directory is used.

Users can add physical fonts that use a supported font technology by installing them either in the lib/fonts directory within the JRE, or by installing them in a way supported by the host operating system. The recommended location to add per-user fonts on Solaris or Linux is the $HOME/.fonts directory which is searched by the platform's libfontconfig, and which is in turn used by the JDK.

Support for Logical Fonts

Logical font names are mapped to physical fonts in implementation dependent ways. Typically one logical font name maps to several physical fonts in order to cover a large range of characters. The JRE uses font configuration files to define the mapping.

Users can add a physical font as a fallback font to logical fonts used in Java 2D rendering by installing it in the lib/fonts/fallback directory within the JRE.

The Lucida Fonts

The JDK and the JRE bundle several physical fonts of the "Lucida" design family. These fonts are also licensed for use in other implementations of the Java Platform. These fonts are physical fonts, but since they come with the Java SE Runtime, they don't depend on the host operating system. Using them provides the benefit of a consistent look and feel across platforms and implementations for a large set of languages.

There are three different type families: "Lucida Sans", "Lucida Sans Typewriter", and"Lucida Bright". Each family has plain, bold, italic, and bold-italic styles. Not all of these are present in all Java SE implementations. For example, the default download bundle of the JRE for Windows only contains the Lucida Sans plain font (but note that application developers can include all Lucida fonts with a Java runtime environment that they redistribute with an application).

The following table shows which Unicode character blocks are covered by each font family:

Unicode Block | Lucida Sans | Lucida Sans Typewriter | Lucida Bright
Basic Latin | yes | yes | yes
Latin-1 Supplement | yes | yes | yes
Latin Extended-A | yes | yes | yes
Latin Extended-B | partial | partial | partial
IPA Extensions | partial | no | no
Spacing Modifier Letter | partial | partial | partial
Combining Diacritical Marks | partial | no | partial
Greek | yes | yes | yes
Cyrillic | partial | partial | partial
Hebrew | yes | yes | no
Arabic | partial | partial | partial
Devanagari | yes | no | no
Thai | yes | yes | no
General Punctuation | partial | partial | partial
Superscripts and Subscripts | partial | partial | partial
Currency Symbols | partial | partial | partial
Letterlike Symbols | partial | partial | partial
Number Forms | partial | partial | no
Arrows | partial | partial | partial
Mathematical Operators | yes | partial | yes
Enclosed Alphanumerics | partial | no | no
Box Drawings | partial | partial | no
Block Elements | partial | partial | no
Geometric Shapes | partial | partial | partial
Miscellaneous Symbols | partial | partial | no
Dingbats | yes | no | no
Alphabetic Presentation Forms | partial | partial | no
Arabic Presentation Forms-A | partial | partial | partial
Arabic Presentation Forms-B | yes | yes | yes

Note that of the writing systems that are generally fully supported by the JRE, the Lucida fonts do not support Chinese (Simplified), Chinese (Traditional), Japanese, and Korean. (See JDK 8 and JRE 8 Supported Locales.)

The fonts are installed in the Java SE Runtime Environment's lib/fonts directory as the following files (not all of them may be present):

LucidaSansDemiBold.ttf
LucidaSansRegular.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterRegular.ttf
LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Character streams

Version 1.1 of the Java Development Kit introduced support for character streams to the java.io package.

Prior to JDK 1.1, the standard I/O facilities supported only byte streams, via the InputStream and OutputStream classes and their subclasses. Character streams are like byte streams, but they contain 16-bit Unicode characters rather than eight-bit bytes. They are implemented by the Reader and Writer classes and their subclasses. Readers and Writers support essentially the same operations as InputStreams and OutputStreams, except that where byte-stream methods operate on bytes or byte arrays, character-stream methods operate on characters, character arrays, or strings.

Most of the functionality available for byte streams is also provided for character streams. This is reflected in the name of each character-stream class, whose prefix is usually shared with the name of the corresponding byte-stream class. For example, there is a PushbackReader class that provides the same functionality for character streams that is provided by PushbackInputStream for byte streams.

Why use character streams?

The primary advantage of character streams is that they make it easy to write programs that are not dependent upon a specific character encoding, and are therefore easy to internationalize.

Java stores strings in Unicode, an international standard character encoding that is capable of representing most of the world's written languages. Typical user-readable text files, however, use encodings that are not necessarily related to Unicode, or even to ASCII, and there are many such encodings. Character streams hide the complexity of dealing with these encodings by providing two classes that serve as bridges between byte streams and character streams. The InputStreamReader class implements a character-input stream that reads bytes from a byte-input stream and converts them to characters according to a specified encoding. Similarly, the OutputStreamWriter class implements a character-output stream that converts characters into bytes according a specified encoding and writes them to a byte-output stream.

A second advantage of character streams is that they are potentially much more efficient than byte streams. The implementations of many of Java's original byte streams are oriented around byte-at-a-time read and write operations. The character-stream classes, in contrast, are oriented around buffer-at-a-time read and write operations. This difference, in combination with a more efficient locking scheme, allows the character stream classes to make up for the added overhead of encoding conversion in many cases.

API overview

The character-stream classes have been designed to parallel the existing byte-stream classes in the java.io package. As noted above, the name of each character-stream class ends in Reader or Writer, as appropriate, while its prefix is usually shared with the corresponding byte-stream class, if any. The following table summarizes the new classes; in the left column, indentation indicates subclass relationships.
Character-stream class | Description | Corresponding byte class
Reader | Abstract class for character-input streams | InputStream
BufferedReader | Buffers input, parses lines | BufferedInputStream
LineNumberReader | Keeps track of line numbers | LineNumberInputStream
CharArrayReader | Reads from a character array | ByteArrayInputStream
InputStreamReader | Translates a byte stream into a character stream | (none)
FileReader | Translates bytes from a file into a character stream | FileInputStream
FilterReader | Abstract class for filtered character input | FilterInputStream
PushbackReader | Allows characters to be pushed back | PushbackInputStream
PipedReader | Reads from a PipedWriter | PipedInputStream
StringReader | Reads from a String | StringBufferInputStream
Writer | Abstract class for character-output streams | OutputStream
BufferedWriter | Buffers output, uses platform's line separator | BufferedOutputStream
CharArrayWriter | Writes to a character array | ByteArrayOutputStream
FilterWriter | Abstract class for filtered character output | FilterOutputStream
OutputStreamWriter | Translates a character stream into a byte stream | (none)
FileWriter | Translates a character stream into a byte file | FileOutputStream
PrintWriter | Prints values and objects to a Writer | PrintStream
PipedWriter | Writes to a PipedReader | PipedOutputStream
StringWriter | Writes to a String | (none)

Related changes

PrintStream

The PrintStream class has been modified to use the platform's default character encoding and the platform's default line terminator. Thus each PrintStream incorporates an OutputStreamWriter, and it passes all characters through this writer to produce bytes for output. The println methods use the platform's default line terminator, which is defined by the system property line.separator and is not necessarily a single newline character ('\n'). Bytes and byte arrays written via the existing write methods are not passed through the writer.

The primary motivation for changing the PrintStream class is that it will make System.out and System.err more useful to people writing Java programs on platforms where the local encoding is something other than ASCII. PrintStream is, in other words, provided primarily for use in debugging and for compatibility with existing code. Code that produces textual output should use the new PrintWriter class, which allows the character encoding to be specified or the default encoding to be accepted. For convenience, the PrintWriter class provides constructors that take an OutputStream object and create an intermediate OutputStreamWriter object that uses the default encoding.

Other classes

The following constructors and methods have been deprecated because they do not properly convert between bytes and characters:

String | DataInputStream.readLine()
InputStream | Runtime.getLocalizedInputStream(InputStream)
OutputStream | Runtime.getLocalizedOutputStream(OutputStream)
 | StreamTokenizer(InputStream)
 | String(byte ascii[], int hibyte, int offset, int count)
 | String(byte ascii[], int hibyte)
void | String.getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin)

Finally, the following constructor and methods have been added:

 | StreamTokenizer(Reader)
byte[] | String.getBytes()
void | Throwable.printStackTrace(PrintWriter)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java I/O

  • Enhancements in JDK 8 Release
  • Enhancements in JDK 7 Release
  • Enhancements in JDK 6 Release
  • Enhancements in JDK 5.0 Release
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in JDK 8 Release

There are several improvements to the standard (java.nio.charset.Charset) and extended charset implementations. They include:

  • New SelectorProvider implementation for Solaris based on the Solaris event port mechanism. This SelectorProvider may improve performance or scalability for some server workloads. The /dev/poll SelectorProvider continues to be the default. To use the Solaris event port mechanism, run with the system property java.nio.channels.spi.Selector set to the value sun.nio.ch.EventPortSelectorProvider.

  • Decrease in the size of <JDK_HOME>/jre/lib/charsets.jar file

  • Performance improvement for the java.lang.String(byte[], *) constructor and the java.lang.String.getBytes() method.

Enhancements in JDK 7 Release

The java.nio.file package and its related package, java.nio.file.attribute, provide comprehensive support for file I/O and for accessing the file system. A zip file system provider is also available in JDK 7. The following resources provide more information:

  • File I/O (featuring NIO 2.0) in the Java Tutorials; NIO stands for non-blocking I/O
  • Developing a Custom File System Provider
  • Zip File System Provider
  • The directory <Java home>/sample/nio/chatserver/ contains samples that demonstrate the new APIs contained in the java.nio.file package
  • The directory <Java home>/demo/nio/zipfs/ contains samples that demonstrate the NIO.2 NFS (Network File System) file system

In addition, the following enhancement is introduced:

Area: NIO
Standard/Platform: JDK 7
Synopsis: Prior to the JDK 7 release, direct buffers allocated using java.nio.ByteBuffer.allocateDirect(int) were aligned on a page boundary. In JDK 7, the implementation has changed so that direct buffers are no longer page aligned. This should reduce the memory requirements of applications that create lots of small buffers.
RFE: 4837564

Enhancements in JDK 6 Release

java.io

One new class is provided:

  • Console - Contains methods to access a character-based console device. The readPassword() methods disable echoing thus they are suitable for retrieval of sensitive data such as passwords. The method System.console() returns the unique console associated with the Java Virtual Machine.

The following new methods were added to File:

  • Methods to retrieve disk usage information:
    • getTotalSpace() returns the size of the partition in bytes
    • getFreeSpace() returns the number of unallocated bytes in the partition
    • getUsableSpace() returns the number of bytes available on the partition and includes checks for write permissions and other operating system restrictions
  • Methods to set or query file permissions:
    • setWritable(boolean writable, boolean ownerOnly) and setWritable(boolean writable) set the owner's or everybody's write permission
    • setReadable(boolean readable, boolean ownerOnly) and setReadable(boolean readable) set the owner's or everybody's read permission
    • setExecutable(boolean executable, boolean ownerOnly) and setExecutable(boolean executable) set the owner's or everybody's execute permission
    • canExecute() tests the value of the execute permission

Constructors were added to the following class:

  • IOException supports exception chaining via the addition of the new constructors IOException(String, Throwable) and IOException(Throwable).

The behavior of the following method was modified:

  • The File.isFile() Windows implementation has been modified to always return false for reserved device names such as CON, NUL, AUX, LPT, etc. Previously it returned true, which customers considered a bug because it was inconsistent with behavior for devices on UNIX.

java.nio

  • A new java.nio.channels.SelectorProvider implementation that is based on the Linux epoll event notification facility is included. The epoll facility is available in the Linux 2.6, and newer, kernels. The new epoll-based SelectorProvider implementation is more scalable than the traditional poll-based SelectorProvider implementation when there are thousands of SelectableChannels registered with a Selector. The new SelectorProvider implementation will be used by default when the 2.6 kernel is detected. The poll-based SelectorProvider will be used when a pre-2.6 kernel is detected.
  • The system property sun.nio.ch.disableSystemWideOverlappingFileLockCheck controls whether java.nio.channels.FileChannel.lock() checks whether regions are locked by other instances of FileChannel. Unless this system property is set to true, FileChannel.lock() will throw an OverlappingFileLockException if an application attempts to lock a region that overlaps one that is locked by another instance of FileChannel. The system property exists to provide compatibility with previous releases which do not implement the JVM-wide overlapping file lock check.

Enhancements in JDK 5.0 Release

java.nio

  • Class javax.net.ssl.SSLEngine was added. The existing J2SDK 1.4.0 secure communication infrastructure, javax.net.ssl.SSLSocket, was based on the I/O model of java.net.Socket. The SSLEngine class abstracts away the I/O model, and leaves developers free to secure communication pathways using alternate types of I/O. SSLEngine can be combined with the New I/O APIs to create implementations such as secure blocking or non-blocking SocketChannels. For details see the JSSE Reference Guide.

Enhancements in Java SE 1.4

java.io

  • In the FileInputStream and FileOutputStream classes, getChannel methods have been added to return the underlying FileChannel object, and the close methods have been revised to close the underlying channel.
  • Similarly, in the RandomAccessFile class, a getChannel method has been added and the close method has been revised to close the underlying channel. The RandomAccessFile constructors now support the mode characters "s" and "d" to allow the specification, at file-open time, of synchronous writes or synchronous-data writes.
  • In the InputStreamReader and OutputStreamWriter classes, constructors have been added that take a stream and a Charset object, and the getEncoding methods have been revised to return the historical name of the encoding being used. Constructors to InputStreamReader and OutputStreamWriter have been added that take existing CharsetDecoder and CharsetEncoder objects, respectively.

java.nio

  • The nio packages were added to supplement the I/O facilities provided the java.io package.
  • Three new functions were added to the Java Native Interface (JNI) to support direct buffers. For information, see JNI Enhancements in v 1.4.

Previous Enhancements

  • Features of java.io.File describes changes to the java.io.File class.
  • Other changes describes modifications made to the java.io package.
  • Character Streams discusses very early changes to the java.io class package to support character streams.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Features of java.io.File in the Java(TM) 2 Platform

Documentation Contents

Features of java.io.File in the Java 2 Platform

The File class is a true abstract representation of file and directory pathnames. This allows the File class to better support non-UNIX platforms such as Windows, which has a rich pathname syntax involving drive letters, UNC share names, and multiple separator characters. The specification of class File prior to the Java Platform could not handle these cases because it was written in terms of simple string operations.

The following features were introduced in the File class in Java SE 1.2:

  • The ability to create temporary files, and a simple delete-on-exit facility (the new methods createNewFile, createTempFile, and deleteOnExit);
  • Conversion of abstract pathnames to URLs (the new method toURL);
  • Access to the list of filesystem roots (the new method listRoots);
  • Comparability (the new compareTo methods);
  • Access to additional file attributes (the new methods isHidden, setLastModified, and setReadOnly); and
  • A uniform set of methods that accept and return File objects rather than strings (the new methods getParentFile, getAbsoluteFile, getCanonicalFile, and listFiles, and the new interface FileFilter).
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java I/O, NIO, and NIO.2

Java I/O support is included in the java.io and java.nio packages. Together these packages include the following features:

  • Input and output through data streams, serialization and the file system.
  • Charsets, decoders, and encoders, for translating between bytes and Unicode characters.
  • Access to file, file attributes and file systems.
  • APIs for building scalable servers using asynchronous or multiplexed, non-blocking I/O.

Tutorials and Programmer's Guides

  • The Basic I/O section of The Java Tutorial and, in particular, File I/O (featuring NIO.2)
  • Developing a Custom File System Provider
  • Zip File System Provider
  • Troubleshooting Tips

API Specification

  • java.io (description) - Supports system input and output, and object serialization. to the file system
  • java.nio (description) - Defines buffers for bulk memory operations. Buffers may be allocated in direct memory for high performance.
  • java.nio.channels (description) - Defines channels, an abstraction for devices capable of performing I/O operations; defines selectors for multiplexed, non-blocking I/O
  • java.nio.channels.spi (description) - Provides implementations for channels
  • java.nio.file - Defines interfaces and classes to access files and file systems.
  • java.nio.file.attribute - Defines interfaces and classes for accessing file system attributes.
  • java.nio.file.spi - Defines classes for creating a file system implementation.
  • java.nio.charset (description) - Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters
  • java.nio.charset.spi (description) - Provides implementations for charsets

Examples

  • NIO and NIO.2 Examples

Enhancements

  • Enhancements in JDK 8 Release
  • Enhancements in JDK 7 Release
  • Enhancements in JDK 6 Release
  • Enhancements in JDK 5.0 Release
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

More Information

  • Supported Encodings
  • Object Serialization
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Minor changes to java.io in Java SE 1.2

The following changes to package java.io were introduced in Java SE 1.2. Minor changes to this package were:
  • The out field of the PrintWriter class is now protected rather than private, so that subclasses may access it
  • The RandomAccessFile class supports a new setLength method; and
  • The StringWriter(int) constructor is now public.

The following constructors check for null input parameters:

  • The constructors PrintStream(OutputStream out) and PrintStream(OutputStream out, boolean autoFlush) will throw a NullPointerException if the parameter out is null.
  • The constructors InputStreamReader(InputStream in) and InputStreamReader(InputStream in, String enc) will throw a NullPointerException if the in parameter is null.
  • The constructors OutputStreamWriter(OutputStream out) and OutputStreamWriter(OutputStream out, String enc) will throw a NullPointerException if the out parameter is null.
  • The protected constructors Reader(Object lock) and Writer(Object lock) now throw NullPointerException if the lock parameter is null.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting

Documentation Contents

Troubleshooting Tips

  • A File object represents a file name, not an actual file. Such objects are, moreover, immutable. Thus the code
        File f1 = new File("foo");
    File f2 = new File("bar");
    f1.renameTo(f2);
    will rename the file named "foo" (if it exists) to "bar". It will not change the value of the File object referred to by f1; in particular, the expression f1.getPath() will still evaluate to "foo".
  • The available method of the InputStream class and its subclasses does not necessarily return the maximum number of bytes that can be read without blocking. In particular, code of the form
        int n = in.available();
    byte buf = new byte[n];
    in.read(buf);
    is not guaranteed to read all of the remaining bytes from the given input stream. Similarly, the ready method of Reader and its subclasses may return false even if the stream is ready to be read.
  • The read(byte[]) and read(byte[], int, int) methods of InputStream and its subclasses are not guaranteed to read all available bytes. A loop may be required, for example, in order to read a large file into an array:
        for (int off = 0; off < size;) {
        int r = in.read(buf, off, buf.length - off);
        if (r == -1) break;
        off += r;
    }
    Alternatively, a BufferedInputStream may be used. Similar remarks apply to the read(char[]) and read(char[], int, int) methods of Reader and its subclasses.
  • The PrintStream and PrintWriter classes suppress all I/O errors. To see whether an error has occurred, invoke the checkError method.
  • PrintStream and PrintWriter objects do not always flush their output. To arrange for automatic flushing, use the two-argument constructors of these classes and specify true for the second argument.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


NIO and NIO.2 Examples

The examples in the following table show how to use the NIO APIs.
Source File | Description
Grep.java | Searches a list of files for lines that match a given regular-expression pattern. Demonstrates NIO mapped byte buffers, charsets, and regular expressions.
Sum.java | Computes 16-bit checksums for a list of files. Uses NIO mapped byte buffers for speed.
TimeQuery.java | Asks a list of hosts what time it is. Is a simple, blocking program that demonstrates NIO socket channels (connection and reading), buffer handling, charsets, and regular expressions.
TimeServer.java | Listens for connections and tells callers what time it is. Is a simple, blocking program that demonstrates NIO socket channels (accepting and writing), buffer handling, charsets, and regular expressions.
Ping.java | Connects to each of a list of hosts and measures the time required to complete the connection. Uses a selector and two additional threads to demonstrate non-blocking connects and the multithreaded use of a selector.
NBTimeServer.java | Implements a non-blocking Internet time server.

The NIO.2 examples in the following table can be accessed in your JDK 7 installation under <JAVA_HOME>/sample/nio.

Source File | Description
file/Chmod.java | Changes the permissions of files in a manner similar to the chmod(1) utility.
file/Copy.java | Copies files in a manner similar to the cp(1) utility.
file/DiskUsage.java | Prints out disk space information similar to the df(1M) utility.
file/FileType.java | Prints out a file's type.
file/WatchDir.java | Watches a directory (or tree) for changes to files.
file/Xdd.java | Lists, gets, and deletes the user-defined attributes of a file.
multicast/MulticastAdress.java | Parses and represents a multicast address.
multicast/Reader.java | Reads a message from a multicast datagram.
multicast/Sender.java | Sends a message in a multicast datagram to a given group.
server/README.txt | This directory contains a simple NIO-based HTTP/HTTPS server example. See the README.txt file for further information.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Developing a Custom File System Provider

Introduction

The NIO.2 API introduced in the Java SE 7 release provides the ability to develop a custom file system provider that can be used to manage file system objects. A file system is essentially a container with organized, homogenous elements referred to as file system objects. A file system provides access to file system objects. A file system object can be a file store, file, or directory. A file store is a volume or partition in which files are stored. For example, in a native file system such as on the Windows platform, commonly known drives like c: or d: are file stores. On the Solaris operating system, / (root) and mounted directories are considered file stores.

The java.nio.file.spi.FileSystemProvider class allows you to develop a custom file system provider. A custom file system provider is useful in the following situations:

  • Developing a memory-based or zip-file-based file system
  • Developing a fault-tolerant distributed file system
  • Replacing or supplementing the default file system provider. The custom provider can augment the default provider by performing specific operations, such as logging all system operations, and delegate to the default provider for other routine operations.

Overview of the java.nio.file.spi.FileSystemProvider Class

A custom file system provider must implement the java.nio.file.spi.FileSystemProvider class. A file system provider is identified by a URI scheme such as file, jar, memory, cd.

An implementation of the java.nio.file.spi.FileSystemProvider class is a factory for instances of the java.nio.file.FileSystem class. A file system's URI has a URI scheme that matches the URI scheme of the file system provider that created it.

The newFileSystem method is used to create a file system and the getFileSystem method is used to retrieve a reference to an existing file system.

Implementing a Custom File System Provider

This section describes the high-level steps necessary to create a custom file system provider using the java.nio.file.spi.FileSystemProvider API. The ZipFileSystemProvider class that is shipped in the demo/nio/zipfs of your JDK installation is an example of a custom file system provider. See Resources for information about the zip file system provider.

Implementing the Custom File System Provider Class

Implementing the custom file system provider class involves the following operations:

  • Create a custom file system provider class, such as MyFileSystemProvider, that extends the java.nio.file.spi.FileSystemProvider class.
  • Define a URI scheme such as jar for the file system provider. The getScheme method should return the URI scheme of this provider.
  • Create an internal cache to keep track of file systems created by this provider.
  • Implement the newFileSystem method. The method will create a new custom file system at the specified path and add the file system to cache. This method should throw a java.nio.file.FileSystemAlreadyExistsException exception if a file system already exists at the specified path.
  • Implement the getFileSystem method. This method should search the cache and return a previously created instance of a file system that corresponds to the given URI.
  • Implement the newFileChannel method or the newAsynchronousFileChannel method depending on the requirements of your file system provider. This method should return a FileChannel object that allows a file to be read or written in the file system.

Implementing the Custom File System Class

Implementing the custom file system class involves the following operations:

  • Create a class, such as MyFileSystem, that extends the java.nio.file.FileSystem class.
  • Implement the methods of your file system class depending on the characteristics of the desired file system. Some characteristics of a file system are as follows:
    • Number of roots – A file system can have a single hierarchy of files with one root, or multiple hierarchies.
    • Read and write access – A file system can be read-only or read/write.
    • File store – A file system requires an underlying file store. The attributes that can be set for a file will vary depending on the underlying file store.

Resources

  • Zip File System Provider
  • Zip File System Properties
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Zip File System Properties

The following table shows the configurable properties of a zip file system created by the zip file system provider in the Java™ Development Kit (JDK).

Property Name (of Type java.lang.String) | Allowed Values | Property Description
create | true / false | The value should be of type java.lang.String. The default value is false. If the value is true, the zip file system provider creates a new zip file if it does not exist.
encoding | String indicating the encoding scheme | The value should be of type java.lang.String. The value of the property indicates the encoding scheme for the names of the entries in the zip or JAR file. The default value is UTF-8.

Resources

  • Developing a Custom File System Provider
  • Zip File System Provider
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Zip File System Provider

Introduction

The zip file system provider introduced in the JDK 7 release is an implementation of a custom file system provider. The zip file system provider treats a zip or JAR file as a file system and provides the ability to manipulate the contents of the file. The zip file system provider creates multiple file systems — one file system for each zip or JAR file.

The demo/nio/zipfs/src.zip file in demo and samples ,which can be downloaded explicitly from Demo and Samples contains the source code for the zip file system provider. It also contains the Demo.java class that shows how to use the zip file system provider.

Using the Zip File System Provider

You can use the factory methods of the java.nio.file.FileSystems class to create a new zip file system or to obtain a reference to an existing zip file system. Create a zip file system by specifying the path of the zip or JAR file in one of the following ways:

  • By using the JAR URL syntax defined in the java.net.JarURLConnection class
    URI uri = URI.create("jar:file:/codeSamples/zipfs/zipfstest.zip");
FileSystem fs = FileSystems.newFileSystem(uri, env);
  • By specifying a path and using automatic file type detection
    Path zipfile = Paths.get("/codeSamples/zipfs/zipfstest.zip");
FileSystem fs = FileSystems.newFileSystem(zipfile, env, null);

Specify the configuration options for the zip file system in the java.util.Map object passed to the FileSystems.newFileSystem method. See the Zip File System Properties topic for information about the provider-specific configuration properties for the zip file system.

Once you have an instance of a zip file system, you can invoke the methods of the java.nio.file.FileSystem and java.nio.file.Path classes to perform operations such as copying, moving, and renaming files, as well as modifying file attributes.

The following code sample shows how to create a zip file system and copy a file to the new zip file system.

import java.util.*;
import java.net.URI;
import java.nio.file.Path;
import java.nio.file.*;

public class ZipFSPUser {
    public static void main(String [] args) throws Throwable {
        Map<String, String> env = new HashMap<>();
        env.put("create", "true");
        // locate file system by using the syntax
        // defined in java.net.JarURLConnection
        URI uri = URI.create("jar:file:/codeSamples/zipfs/zipfstest.zip");

        try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {
            Path externalTxtFile = Paths.get("/codeSamples/zipfs/SomeTextFile.txt");
            Path pathInZipfile = zipfs.getPath("/SomeTextFile.txt");
            // copy a file into the zip file
            Files.copy( externalTxtFile,pathInZipfile,
                    StandardCopyOption.REPLACE_EXISTING );
        }
    }
}

Resources

  • Developing a Custom File System Provider
  • Zip File System Properties
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Jar and Zip Change Summary for JDK 6

Documentation Contents

Jar and Zip Enhancements

This page summarizes enhancements to the jar and zip support provided in JDK 6.

API changes

Two new compressed streams have been added:

  • java.util.zip.DeflaterInputStream: Data read from this stream is compressed.
  • java.util.zip.InflaterOutputStream: Data written to this stream is decompressed.
For example, these can be useful if a client wants to send compressed data over a network. The data can be compressed into packets with DeflaterInputStream, and those packets written over the network connection. The receiving end then reads the compressed packets from the network connection, and decompresses them by writing to an InflaterOutputStream.

Implementation changes

On all platforms, zip files can contain more than 64k entries.

On Windows, some limitations have been removed:

  • File names longer than 256 characters are now supported.
  • The limitation of just over 2,000 simultaneously open zip files has been removed.

Changes to the jar command

There are two changes to the behavior of the jar command:

  • The timestamps of extracted files are those listed in the archive, instead of the time of extraction.
  • When creating a jar, it is possible to specify the entry point for stand-alone applications bundled into an executable jar file. The 'e' option specifies the application entry point by creating or overriding the Main-Class attribute value in the jar file's manifest.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAR File Overview

What is JAR?

JAR stands for Java ARchive. It's a file format based on the popular ZIP file format and is used for aggregating many files into one. Although JAR can be used as a general archiving tool, the primary motivation for its development was so that Java applets and their requisite components (.class files, images and sounds) can be downloaded to a browser in a single HTTP transaction, rather than opening a new connection for each piece. This greatly improves the speed with which an applet can be loaded onto a web page and begin functioning. The JAR format also supports compression, which reduces the size of the file and improves download time still further. Additionally, individual entries in a JAR file may be digitally signed by the applet author to authenticate their origin.

JAR is:

  • the only archive format that is cross-platform
  • the only format that handles audio and image files as well as class files
  • backward-compatible with existing applet code
  • an open standard, fully extendable, and written in java
  • the preferred way to bundle the pieces of a java applet

JAR consists of a zip archive, as defined by PKWARE, containing a manifest file and potentially signature files, as defined in the JAR File Specification.

The APPLET tag

Changing the APPLET tag in your HTML page to accomodate a JAR file is simple. The JAR file on the server is identified by the ARCHIVE parameter, where the directory location of the jar file should be relative to the location of the html page:
    <applet code=Animator.class
      archive="jars/animator.jar"
      width=460 height=160>
      <param name=foo value="bar">
    </applet>
Note that the familiar CODE=myApplet.class parameter must still be present. The CODE parameter, as always, identifies the name of the applet where execution begins. However, the class file for the applet and all of its helper classes are loaded from the JAR file.

Th ARCHIVE attribute describes one or more JAR files containing classes and other resources that will be "preloaded". The classes are loaded using an instance of an AppletClassLoader with the given CODEBASE. It takes the form archive = archiveList. The archives in archiveList are separated by ",".

Once the archive file is identified, it is downloaded and separated into its components. During the execution of the applet, when a new class, image or audio clip is requested by the applet, it is searched for first in the archives associated with the applet. If the file is not found amongst the archives that were downloaded, it is searched for on the applet's server, relative to the CODEBASE (that is, it is searched for as in JDK1.0.2).

The archive tag may specify multiple JAR files. Each JAR file must be separated by "," (comma). Each file is downloaded in turn:

    <applet code=Animator.class
      archive="classes.jar ,  images.jar ,  sounds.jar"
      width=460 height=160>
      <param name=foo value="bar">
    </applet>
There can be any amount of white space between entries within the archive parameter. In addition, the archive tag itself is case-insensitive; it can be lower-case, upper-case, or any combination of lower- and upper-case letters, such as ArCHiVe.

Executable JAR Files

On Microsoft Windows systems, the Java 2 Runtime Environment's installation program will register a default association for JAR files so that double-clicking a JAR file on the desktop will automatically run it with javaw -jar. Dependent extensions bundled with the application will also be loaded automatically. This feature makes the end-user runtime environment easier to use on Microsoft Windows systems.

The Solaris 2.6 kernel has already been extended to recognize the special "magic" number that identifies a JAR file, and to invoke java -jar on such a JAR file as if it were a native Solaris executable. A application packaged in a JAR file can thus be executed directly from the command line or by clicking an icon on the CDE desktop.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAR File Specification

Contents

  • Introduction
  • The META-INF directory
  • Name-Value pairs and Sections
  • JAR Manifest
    • Overview
    • Manifest Specification
    • Main Attributes
    • Per-Entry Attributes
  • Signed JAR file
    • Overview
    • Signature File
      • Signature validation
      • The Magic Attribute
    • Digital Signatures
  • Notes on Manifest and Signature Files
  • JAR Index
    • Overview
    • Index File Specification
    • Backward Compatibility
  • Service Provider
    • Overview
    • Provider Configuration File
    • Example
  • API Details
  • See Also

Introduction

JAR file is a file format based on the popular ZIP file format and is used for aggregating many files into one. A JAR file is essentially a zip file that contains an optional META-INF directory. A JAR file can be created by the command-line jar tool, or by using the java.util.jar API in the Java platform. There is no restriction on the name of a JAR file, it can be any legal file name on a particular platform.

In many cases, JAR files are not just simple archives of java classes files and/or resources. They are used as building blocks for applications and extensions. The META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.

The META-INF directory

The following files/directories in the META-INF directory are recognized and interpreted by the Java 2 Platform to configure applications, extensions, class loaders and services:
  • MANIFEST.MF
The manifest file that is used to define extension and package related data.
  • INDEX.LIST
This file is generated by the new "-i" option of the jar tool, which contains location information for packages defined in an application or extension. It is part of the JarIndex implementation and used by class loaders to speed up their class loading process.
  • x.SF
The signature file for the JAR file. 'x' stands for the base file name.
  • x.DSA
The signature block file associated with the signature file with the same base file name. This file stores the digital signature of the corresponding signature file.
  • services/
This directory stores all the service provider configuration files.

Name-Value pairs and Sections

Before we go to the details of the contents of the individual configuration files, some format convention needs to be defined. In most cases, information contained within the manifest file and signature files is represented as so-called "name: value" pairs inspired by the RFC822 standard. We also call these pairs headers or attributes.

Groups of name-value pairs are known as a "section". Sections are separated from other sections by empty lines.

Binary data of any form is represented as base64. Continuations are required for binary data which causes line length to exceed 72 bytes. Examples of binary data are digests and signatures.

Implementations shall support header values of up to 65535 bytes.

All the specifications in this document use the same grammar in which terminal symbols are shown in fixed width font and non-terminal symbols are shown in italic type face.

Specification:

section: *header +newline
nonempty-section: +header +newline
newline: CR LF | LF | CR (not followed by LF)
header: name : value
name: alphanum *headerchar
value: SPACE *otherchar newline *continuation
continuation: SPACE *otherchar newline
alphanum: {A-Z} | {a-z} | {0-9}
headerchar: alphanum | - | _
otherchar: any UTF-8 character except NUL, CR and LF

; Also: To prevent mangling of files sent via straight e-mail, no
; header will start with the four letters "From".

Non-terminal symbols defined in the above specification will be referenced in the following specifications.

JAR Manifest

Overview

A JAR file manifest consists of a main section followed by a list of sections for individual JAR file entries, each separated by a newline. Both the main section and individual sections follow the section syntax specified above. They each have their own specific restrictions and rules.

The main section contains security and configuration information about the JAR file itself, as well as the application or extension that this JAR file is a part of. It also defines main attributes that apply to every individual manifest entry. No attribute in this section can have its name equal to "Name". This section is terminated by an empty line.

The individual sections define various attributes for packages or files contained in this JAR file. Not all files in the JAR file need to be listed in the manifest as entries, but all files which are to be signed must be listed. The manifest file itself must not be listed. Each section must start with an attribute with the name as "Name", and the value must be a relative path to the file, or an absolute URL referencing data outside the archive.

If there are multiple individual sections for the same file entry, the attributes in these sections are merged. If a certain attribute have different values in different sections, the last one is recognized.

Attributes which are not understood are ignored. Such attributes may include implementation specific information used by applications.

Manifest Specification:

manifest-file: main-section newline *individual-section
main-section: version-info newline *main-attribute
version-info: Manifest-Version : version-number
version-number : digit+{.digit+}*
main-attribute: (any legitimate main attribute) newline
individual-section: Name : value newline *perentry-attribute
perentry-attribute: (any legitimate perentry attribute) newline
newline : CR LF | LF | CR (not followed by LF)
digit: {0-9}

In the above specification, attributes that can appear in the main section are referred to as main attributes, whereas attributes that can appear in individual sections are referred to as per-entry attributes. Certain attributes can appear both in the main section and the individual sections, in which case the per-entry attribute value overrides the main attribute value for the specified entry. The two types of attributes are defined as follows.

Main Attributes

Main attributes are the attributes that are present in the main section of the manifest. They fall into the following different groups:
  • general main attributes
    • Manifest-Version: Defines the manifest file version. The value is a legitimate version number, as described in the above spec.
    • Created-By: Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool.
    • Signature-Version: Defines the signature version of the jar file. The value should be a valid version-number string.
    • Class-Path: The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
  • attribute defined for stand-alone applications: This attribute is used by stand-alone applications that are bundled into executable jar files which can be invoked by the java runtime directly by running "java -jar x.jar".
    • Main-Class: The value of this attribute is the class name of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name.
  • attributes defined for applets: These attributes are used by an applet which is bundled into JAR files to define requirements, version and location information for the extensions which this applet depends on. (see Extension Versioning ).
    • Extension-List: This attribute indicates the extensions that are needed by the applet. Each extension listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the extension it requires.
    • <extension>-Extension-Name: This attribute is the unique name of the extension. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed extensions to determine if the extension is installed.
    • <extension>-Specification-Version: This attribute specifies the minimum extension specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed extension to determine if the extension is up to date.
    • <extension>-Implementation-Version: This attritute specifies the minimum extension implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed extension to see if a more recent implementation needs to be downloaded.
    • <extension>-Implementation-Vendor-Id: This attribute can be used to identify the vendor of an extension implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed extension.
    • <extension>-Implementation-URL: This attribute specifies a URL that can be used to obtain the most recent version of the extension if the required version is not already installed.
  • attribute defined for extension identification: This attribute is used by extensions to define their unique identity.
    • Extension-Name: This attribute specifies a name for the extension contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the extension.
  • attributes defined for extension and package versioning and sealing information: These attributes define features of the extension which the JAR file is a part of. The value of these attributes apply to all the packages in the JAR file, but can be overridden by per-entry attributes.
    • Implementation-Title: The value is a string that defines the title of the extension implementation.
    • Implementation-Version: The value is a string that defines the version of the extension implementation.
    • Implementation-Vendor: The value is a string that defines the organization that maintains the extension implementation.
    • Implementation-Vendor-Id: The value is a string id that uniquely defines the organization that maintains the extension implementation.
    • Implementation-URL: This attribute defines the URL from which the extension implementation can be downloaded from.
    • Specification-Title: The value is a string that defines the title of the extension specification.
    • Specification-Version: The value is a string that defines the version of the extension specification.
    • Specification-Vendor: The value is a string that defines the organization that maintains the extension specification.
    • Sealed: This attribute defines whether this JAR file is sealed or not. The value can be either "true" or "false", case is ignored. If it is set to "true", then all the packages in the JAR file are defaulted to be sealed, unless they are defined otherwise individually.

Per-Entry Attributes

Per-entry attributes apply only to the individual JAR file entry to which the manifest entry is associated with. If the same attribute also appeared in the main section, then the value of the per-entry attribute overwrites the main attribute's value. For example, if JAR file a.jar has the following manifest content:
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Sealed: true
Name: foo/bar/
Sealed: false

It means that all the packages archived in a.jar are sealed, except that package foo.bar is not.

The per-entry attributes fall into the following groups:

  • attributes defined for file contents:
    • Content-Type: This attribute can be used to specify the MIME type and subtype of data for a specific file entry in the JAR file. The value should be a string in the form of type/subtype. For example "image/bmp" is an image type with a subtype of bmp (representing bitmap). This would indicate the file entry as an image with the data stored as a bitmap. RFC 1521 and 1522 discuss and define the MIME types definition.
  • attributes defined for package versioning and sealing information: These are the same set of attributes defined above as main attributes that defines the extension package versioning and sealing information. When used as per-entry attributes, these attributes overwrites the main attributes but only apply to the individual file specified by the manifest entry.
  • attribute defined for beans objects:
    • Java-Bean: Defines whether the specific jar file entry is a Java Beans object or not. The value should be either "true" or "false", case is ignored.
  • attributes defined for signing: These attributes are used for signing and verifying purposes. More details here.
    • x-Digest-y: The name of this attribute specifies the name of the digest algorithm used to compute the digest value for the corresponding jar file entry. The value of this attribute stores the actual digest value. The prefix 'x' specifies the algorithm name and the optional suffix 'y' indicates to which language the digest value should be verified against.
    • Magic: This is an optional attribute that can be used by applications to indicate how verifier should compute the digest value contained in the manifest entry. The value of this attribute is a set of comma separated context specific strings. Detailed description is here.

Signed JAR File

Overview

A JAR file can be signed by using the command line jarsigner tool or directly through the java.security API. Every file entry, including non-signature related files in the META-INF directory, will be signed if the JAR file is signed by the jarsigner tool. The signature related files are:
  • META-INF/MANIFEST.MF
  • META-INF/*.SF
  • META-INF/*.DSA
  • META-INF/*.RSA
  • META-INF/SIG-*
Note that if such files are located in META-INF subdirectories, they are not considered signature-related. Case-insensitive versions of these filenames are reserved and will also not be signed.

Subsets of a JAR file can be signed by using the java.security API. A signed JAR file is exactly the same as the original JAR file, except that its manifest is updated and two additional files are added to the META-INF directory: a signature file and a signature block file. When jarsigner is not used, the signing program has to construct both the signature file and the signature block file.

For every file entry signed in the signed JAR file, an individual manifest entry is created for it as long as it does not already exist in the manifest. Each manifest entry lists one or more digest attributes and an optional Magic attribute.

Signature File

Each signer is represented by a signature file with extension .SF. The major part of the file is similar to the manifest file. It consists of a main section which includes information supplied by the signer but not specific to any particular jar file entry. In addition to the Signature-Version and Created-By attributes (see Main Attributes), the main section can also include the following security attributes:
  • x-Digest-Manifest-Main-Attributes (where x is the standard name of a java.security.MessageDigest algorithm): The value of this attribute is the digest value of the main attributes of the manifest.
  • x-Digest-Manifest (where x is the standard name of a java.security.MessageDigest algorithm): The value of this attribute is the digest value of the entire manifest.
The main section is followed by a list of individual entries whose names must also be present in the manifest file. Each individual entry must contain at least the digest of its corresponding entry in the manifest file.

Paths or URLs appearing in the manifest file but not in the signature file are not used in the calculation.

Signature Validation

A successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps:

  1. Verify the signature over the signature file when the manifest is first parsed. For efficiency, this verification can be remembered. Note that this verification only validates the signature directions themselves, not the actual archive files.

  2. If an x-Digest-Manifest attribute exists in the signature file, verify the value against a digest calculated over the entire manifest. If more than one x-Digest-Manifest attribute exists in the signature file, verify that at least one of them matches the calculated digest value.

  3. If an x-Digest-Manifest attribute does not exist in the signature file or none of the digest values calculated in the previous step match, then a less optimized verification is performed:

    1. If an x-Digest-Manifest-Main-Attributes entry exists in the signature file, verify the value against a digest calculated over the main attributes in the manifest file. If this calculation fails, then JAR file verification fails. This decision can be remembered for efficiency. If an x-Digest-Manifest-Main-Attributes entry does not exist in the signature file, its nonexistence does not affect JAR file verification and the manifest main attributes are not verified.

    2. Verify the digest value in each source file information section in the signature file against a digest value calculated against the corresponding entry in the manifest file. If any of the digest values don't match, then JAR file verification fails.

    One reason the digest value of the manifest file that is stored in the x-Digest-Manifest attribute may not equal the digest value of the current manifest file is that one or more files were added to the JAR file (using the jar tool) after the signature (and thus the signature file) was generated. When the jar tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the signature file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the digest values in the non-header sections of the signature file equal the digest values of the corresponding sections in the manifest file.

  4. For each entry in the manifest, verify the digest value in the manifest file against a digest calculated over the actual data referenced in the "Name:" attribute, which specifies either a relative file path or URL. If any of the digest values don't match, then JAR file verification fails.

Example manifest file:

Manifest-Version: 1.0
Created-By: 1.7.0 (Sun Microsystems Inc.)

Name: common/class1.class
SHA-256-Digest: (base64 representation of SHA-256 digest)

Name: common/class2.class
SHA1-Digest: (base64 representation of SHA1 digest)
SHA-256-Digest: (base64 representation of SHA-256 digest)
The corresponding signature file would be:
Signature-Version: 1.0
SHA-256-Digest-Manifest: (base64 representation of SHA-256 digest)
SHA-256-Digest-Manifest-Main-Attributes: (base64 representation of SHA-256 digest)

Name: common/class1.class
SHA-256-Digest: (base64 representation of SHA-256 digest)

Name: common/class2.class
SHA-256-Digest: (base64 representation of SHA-256 digest)

The Magic Attribute

Another requirement to validate the signature on a given manifest entry is that the verifier understand the value or values of the Magic key-pair value in that entry's manifest entry.

The Magic attribute is optional but it is required that a parser understand the value of an entry's Magic key if it is verifying that entry's signature.

The value or values of the Magic attribute are a set of comma-separated context-specific strings. The spaces before and after the commas are ignored. Case is ignored. The exact meaning of the magic attributes is application specific. These values indicate how to compute the hash value contained in the manifest entry, and are therefore crucial to the proper verification of the signature. The keywords may be used for dynamic or embedded content, multiple hashes for multilingual documents, etc.

Here are two examples of the potential use of Magic attribute in the manifest file:

        Name: http://www.example-scripts.com/index#script1
        SHA-256-Digest: (base64 representation of SHA-256 hash)
        Magic: JavaScript, Dynamic

        Name: http://www.example-tourist.com/guide.html
        SHA-256-Digest: (base64 representation of SHA-256 hash)
        SHA-256-Digest-French: (base64 representation of SHA-256 hash)
        SHA-256-Digest-German: (base64 representation of SHA-256 hash)
        Magic: Multilingual

In the first example, these Magic values may indicate that the result of an http query is the script embedded in the document, as opposed to the document itself, and also that the script is generated dynamically. These two pieces of information indicate how to compute the hash value against which to compare the manifest's digest value, thus comparing a valid signature.

In the second example, the Magic value indicates that the document retrieved may have been content-negotiated for a specific language, and that the digest to verify against is dependent on which language the document retrieved is written in.

Digital Signatures

A digital signature is a signed version of the .SF signature file. These are binary files not intended to be interpreted by humans.

Digital signature files have the same filenames as the .SF files but different extensions. The extension varies depending on the type of digital signature.

  • .RSA (PKCS7 signature, SHA-256 + RSA)
  • .DSA (PKCS7 signature, DSA)
Digital signature files for signature algorithms not listed above must reside in the META-INF directory and have the prefix "SIG-". The corresonding signature file (.SF file) must also have the same prefix.

For those formats that do not support external signed data, the file shall consist of a signed copy of the .SF file. Thus some data may be duplicated and a verifier should compare the two files.

Formats that support external data either reference the .SF file, or perform calculations on it with implicit reference.

Each .SF file may have multiple digital signatures, but those signatures should be generated by the same legal entity.

File name extensions may be 1 to 3 alphanum characters. Unrecognized extensions are ignored.

Notes on Manifest and Signature Files

Following is a list of additional restrictions and rules that apply to manifest and signature files.
  • Before parsing:
    • If the last character of the file is an EOF character (code 26), the EOF is treated as whitespace. Two newlines are appended (one for editors that don't put a newline at the end of the last line, and one so that the grammar doesn't have to special-case the last entry, which may not have a blank line after it).
  • Attributes:
    • In all cases for all sections, attributes which are not understood are ignored.
    • Attribute names are case insensitive. Programs which generate manifest and signature files should use the cases shown in this specification however.
    • Attribute names cannot be repeated within a section.
  • Versions:
    • Manifest-Version and Signature-Version must be first, and in exactly that case (so that they can be recognized easily as magic strings). Other than that, the order of attributes within a main section is not significant.
  • Ordering:
    • The order of individual manifest entries is not significant.
    • The order of individual signature entries is not significant, except that the digests that get signed are in that order.
  • Line length:
    • No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).
  • Errors:
    • If a file cannot be parsed according to this spec, a warning should be output, and none of the signatures should be trusted.
  • Limitations:
    • Because header names cannot be continued, the maximum length of a header name is 70 bytes (there must be a colon and a SPACE after the name).
    • NUL, CR, and LF can't be embedded in header values, and NUL, CR, LF and ":" can't be embedded in header names.
    • Implementations should support 65535-byte (not character) header values, and 65535 headers per file. They might run out of memory, but there should not be hard-coded limits below these values.
  • Signers:
    • It is technically possible that different entities may use different signing algorithms to share a single signature file. This violates the standard, and the extra signature may be ignored.
  • Algorithms:
    • No digest algorithm or signature algorithm is mandated by this standard. However, at least one of MD5 and SHA1 digest algorithm must be supported.

JAR Index

Overview

Since 1.3, JarIndex is introduced to optimize the class searching process of class loaders for network applications, especially applets. Originally, an applet class loader uses a simple linear search algorithm to search each element on its internal search path, which is constructed from the "ARCHIVE" tag or the "Class-Path" main attribute. The class loader downloads and opens each element in its search path, until the class or resource is found. If the class loader tries to find a nonexistent resource, then all the jar files within the application or applet will have to be downloaded. For large network applications and applets this could result in slow startup, sluggish response and wasted network bandwidth. The JarIndex mechanism collects the contents of all the jar files defined in an applet and stores the information in an index file in the first jar file on the applet's class path. After the first jar file is downloaded, the applet class loader will use the collected content information for efficient downloading of jar files.

The existing jar tool is enhanced to be able to examine a list of jar files and generate directory information as to which classes and resources reside in which jar file. This directory information is stored in a simple text file named INDEX.LIST in the META-INF directory of the root jar file. When the classloader loads the root jar file, it reads the INDEX.LIST file and uses it to construct a hash table of mappings from file and package names to lists of jar file names. In order to find a class or a resource, the class loader queries the hashtable to find the proper jar file and then downloads it if necessary.

Once the class loader finds a INDEX.LIST file in a particular jar file, it always trusts the information listed in it. If a mapping is found for a particular class, but the class loader fails to find it by following the link, an InvalidJarIndexException is thrown. When this occurs, the application developer should rerun the jar tool on the extension to get the right information into the index file.

To prevent adding too much space overhead to the application and to speed up the construction of the in-memory hash table, the INDEX.LIST file is kept as small as possible. For classes with non-null package names, mappings are recorded at the package level. Normally one package name is mapped to one jar file, but if a particular package spans more than one jar file, then the mapped value of this package will be a list of jar files. For resource files with non-empty directory prefixes, mappings are also recorded at the directory level. Only for classes with null package name, and resource files which reside in the root directory, will the mapping be recorded at the individual file level.

Index File Specification

The INDEX.LIST file contains one or more sections each separated by a single blank line. Each section defines the content of a particular jar file, with a header defining the jar file path name, followed by a list of package or file names, one per line. All the jar file paths are relative to the code base of the root jar file. These path names are resolved in the same way as the current extension mechanism does for bundled extensions.

The UTF-8 encoding is used to support non ASCII characters in file or package names in the index file.

Specification

index file : version-info blankline section*
version-info : JarIndex-Version: version-number
version-number : digit+{.digit+}*
section : body blankline
body : header name*
header : char+.jar newline
name : char+ newline
char : any valid Unicode character except NULL, CR and LF
blankline: newline newline
newline : CR LF | LF | CR (not followed by LF)
digit: {0-9}

The INDEX.LIST file is generated by running jar -i. See the jar man page for more details.

Backward Compatibility

The new class loading scheme is totally backward compatible with applications developed on top of the current extension mechanism. When the class loader loads the first jar file and an INDEX.LIST file is found in the META-INF directory, it would construct the index hash table and use the new loading scheme for the extension. Otherwise, the class loader will simply use the original linear search algorithm.

Service Provider

Overview

Files in the META-INF/services directory are service provider configuration files. A service is a well-known set of interfaces and (usually abstract) classes. A service provider is a specific implementation of a service. The classes in a provider typically implement the interfaces and subclass the classes defined in the service itself. Service providers may be installed in an implementation of the Java platform in the form of extensions, that is, jar files placed into any of the usual extension directories. Providers may also be made available by adding them to the applet or application class path or by some other platform-specific means.

A service is represented by an abstract class. A provider of a given service contains one or more concrete classes that extend this service class with data and code specific to the provider. This provider class will typically not be the entire provider itself but rather a proxy that contains enough information to decide whether the provider is able to satisfy a particular request together with code that can create the actual provider on demand. The details of provider classes tend to be highly service-specific; no single class or interface could possibly unify them, so no such class has been defined. The only requirement enforced here is that provider classes must have a zero-argument constructor so that they may be instantiated during lookup.

Provider-Configuration File

A service provider identifies itself by placing a provider-configuration file in the resource directory META-INF/services. The file's name should consist of the fully-qualified name of the abstract service class. The file should contain a newline-separated list of unique concrete provider-class names. Space and tab characters, as well as blank lines, are ignored. The comment character is '#' (0x23); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

Example

Suppose we have a service class named java.io.spi.CharCodec. It has two abstract methods:
  • public abstract CharEncoder getEncoder(String encodingName);
  • public abstract CharDecoder getDecoder(String encodingName);

Each method returns an appropriate object or null if it cannot translate the given encoding. Typical CharCodec providers will support more than one encoding.

If sun.io.StandardCodec is a provider of the CharCodec service then its jar file would contain the file META-INF/services/java.io.spi.CharCodec. This file would contain the single line:

sun.io.StandardCodec    # Standard codecs for the platform

To locate an encoder for a given encoding name, the internal I/O code would do something like this:

   CharEncoder getEncoder(String encodingName) {
       Iterator ps = Service.providers(CharCodec.class);
       while (ps.hasNext()) {
           CharCodec cc = (CharCodec)ps.next();
           CharEncoder ce = cc.getEncoder(encodingName);
           if (ce != null)
               return ce;
       }
       return null;
   }

The provider-lookup mechanism always executes in the security context of the caller. Trusted system code should typically invoke the methods in this class from within a privileged security context.

API Details

Package java.util.jar

See Also

Package java.security
Package java.util.zip
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Archive (JAR) Files

JAR (Java Archive) is a platform-independent file format that aggregates many files into one. Multiple Java applets and their requisite components (.class files, images and sounds) can be bundled in a JAR file and subsequently downloaded to a browser in a single HTTP transaction, greatly improving the download speed. The JAR format also supports compression, which reduces the file size, further improving the download time. In addition, the applet author can digitally sign individual entries in a JAR file to authenticate their origin. It is fully extensible.

Overview and Specification

  • Overview - An overview of JAR Files
  • Specification - The JAR File Specification

API Specification

  • java.util.jar Package
  • java.net.JarURLConnection

Tutorials and Programmer's Guides

  • A tutorial introduction to JAR files.

Enhancements

  • Enhancements in JDKTM 6 - An annotated list of changes between the 5.0 and 6.0 releases to APIs, the jar command, and the jar/zip implementation.

JAR Tools

  • JAR tool reference page for Solaris, Linux, or Mac OS X
  • JAR tool reference page for Windows

More Information

  • Extension Mechanism Architecture - The mechanism for extending the Java platform uses the JAR file format to package extension classes. Manifest attributes are available to support the extension mechanism and related features such as package sealing and package versioning.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Manifest Specification

Documentation Contents
The manifest specification has moved to the JAR File Specification.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javac

Documentation Contents

The Java Programming Language Compiler, javac

The Java programming language compiler, javac, reads source files written in the Java programming language, and compiles them into bytecode class files. Optionally, the compiler can also process annotations found in source and class files using the Pluggable Annotation Processing API. The compiler is a command line tool but can also be invoked using the Java Compiler API. The compiler accepts source code defined by the Java Language Specification (JLS) and produces class files defined by the Java Virtual Machine Specification (JVMS).

API Specification

This lists the APIs introduced in the javac tool:

  • javax.annotation.processing - Annotation processing
  • javax.lang.model - Language model used in annotation processing and Compiler Tree API
    • javax.lang.model.element - Language elements
    • javax.lang.model.type - Types
    • javax.lang.model.util - Language model utilities
  • javax.tools - Java Compiler API
  • com.sun.source.* - Provides read-only acccess to abstract syntax trees that the javac tool uses

Enhancements in Java SE 8

  • The javac tool now provides the ability to generate native headers as needed. This removes the need to run the javah tool as a separate step in the build pipeline. The feature is enabled in javac by using the new -h option, which is used to specify a directory in which the header files should be written. Header files will be generated for any class which has either native methods, or constant fields annotated with a new annotation of type java.lang.annotation.Native.
  • The javac tool now has support for checking the content of javadoc comments for issues which could lead to various problems, such as invalid HTML or accessibility issues, in the files that are generated when javadoc is run. The feature is enabled by the new -Xdoclint option. For more details, see the output from running "javac -X". This feature is also available in javadoc, and enabled there by default.

Enhancements in Java SE 7 Update 2

Area: Compiler
Synopsis: The Java 7 compiler used to erroneously accept the diamond operator in array initializer expressions. For example, the following code, which was previously accepted, is now rightly rejected:

class Foo<X> {}

class Test {
    Foo<String>[] fooArr = new Foo<>[]{ }; //error
}

See 7057297.

Area: Compiler
Synopsis: The Java 7 compiler erroneously accepted the following program due to a bug in the most specific algorithm implementation:

import java.util.*;

interface A {List<Number> getList();}
interface B {ArrayList getList();}
interface AB extends A, B {}

class Test {
   void test(AB ab) {
      Number n = ab.getList().get(1);
   }
}

This program used to fail in JDK 6. A fix has been provided in Java SE 7u2 to rightly reject this program. See 7062745.

More Information

For more information on javac tool, visit the following links:

  • The javac Home Page: It lists several API implementations of javac
  • javac Manual page [ Solaris, Linux, or Mac OS X | Microsoft Windows ]
  • Java Language Specification and Java Virtual Machine Specification
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Doclet Overview

Documentation Contents

The Standard Doclet

Contents

  • What the Standard Doclet Is
  • Running the Standard Doclet from the Command Line
  • Running the Standard Doclet Programmatically
  • The Source for the Standard Doclet

What the Standard Doclet Is

The standard doclet is the doclet provided by Oracle that produces Javadoc's default HTML-formatted API output. The API documentation for the Java™ platform in this JDK documentation is an example of the standard doclet's output. Javadoc uses the standard doclet if no other doclet is specified using Javadoc's -doclet option on the command line.

Running the Standard Doclet from the Command Line

The standard doclet is invoked by default when no other doclet is specified with the -doclet tag on the command line. For example, running
% javadoc myPackage
will use the standard doclet to produce the default-style HTML API documentation for myPackage. Running javadoc without the -doclet option is equivalent to running javadoc using the -doclet option to invoke the standard doclet. That is, the above command is equivalent to
% javadoc -docletpath /home/user/jdk1.5.0/lib/tools.jar \
  -doclet com.sun.tools.doclets.standard.Standard \
  myPackage
or
% javadoc -docletpath /home/user/jdk1.5.0/lib/tools.jar \
  -doclet com.sun.tools.doclets.formats.html.HtmlDoclet \
  myPackage
Both of these approaches are equivalent.

Running the Standard Doclet Programmatically

The Javadoc tool has a programmatic interface with public methods for invoking the Javadoc tool from another program written in the Java language. These methods are located in class com.sun.tools.javadoc.Main in lib/tools.jar. An example is given below.

The disadvantages of calling main are: (1) It can only be called once per run -- for 1.2.x or 1.3.x, use java.lang.Runtime.exec("javadoc ...") if more than one call is needed, (2) it exits using System.exit(), which exits the entire program, and (3) an exit code is not returned.

public static void main(java.lang.String[] args)
Command line interface.
Parameters:
args - The command line parameters.
The execute method overcomes all the disadvantages of main.
public static int execute(java.lang.String[] args)
Programmatic interface.
Parameters:
args - The command line parameters.
Returns:
The return code.
public static int execute(java.lang.String programName,
                          java.lang.String[] args)
Programmatic interface.
Parameters:
programName - Name of the program (for error messages).
args - The command line parameters.
Returns:
The return code.
public static int execute(java.lang.String programName,
                          java.lang.String defaultDocletClassName,
                          java.lang.String[] args)
Programmatic interface.
Parameters:
programName - Name of the program (for error messages).
defaultDocletClassName - Fully qualified class name.
args - The command line parameters.
Returns:
The return code.
public static int execute(java.lang.String programName,
                          java.io.PrintWriter errWriter,
                          java.io.PrintWriter warnWriter,
                          java.io.PrintWriter noticeWriter,
                          java.lang.String defaultDocletClassName,
                          java.lang.String[] args)
Programmatic interface.
Parameters:
programName - Name of the program (for error messages).
errWriter - PrintWriter to receive error messages.
warnWriter - PrintWriter to receive error messages.
noticeWriter - PrintWriter to receive error messages.
defaultDocletClassName - Fully qualified class name.
args - The command line parameters.
Returns:
The return code.

Example

With classpath set to lib/tools.jar in the Java SE, pass in each option and argument as a separate string:

com.sun.tools.javadoc.Main.execute(new String[] {"-d", "docs", "-sourcepath", "/home/usr/src", "p1", "p2"});

The Source for the Standard Doclet

You can download the source code for the standard doclet as part of the Java SE at:
  • Java SE Source Code Release
    (Note: There is a delay between when the JDK is first available and the source code release is available.)
The source files are located in the directory src/share/classes/com/sun/tools/doclets.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 1.2

This document describes the changes made to Javadoc between versions 1.1 and 1.2. It is divided into sections for three types of users: (1) for writers of doc comments, (2) for developers wanting to write doclets (architecture and the Doclet API), and (3) for readers of the javadoc-generated HTML pages (content and format). Further details are given in the "Detailed Changes" section that follows.

SUMMARY OF CHANGES

This summary includes changes for writers of doc comments, changes to the Javadoc tool (the Doclet API) and changes to the content and format of the HTML output of Javadoc (as implemented in the Standard Doclet).

WRITING DOC COMMENTS

Changes for Writing Doc Comments

The following list summarizes in one place all features listed elsewhere that can have an impact on how you would write doc comments.
  • The first sentence of each class description should be a summary statement.
  • Package-level comments are now possible.
  • The first sentence of each package description should be a summary statement.
  • System-wide (overview) comments are now possible.
  • New Javadoc tags are available for use in doc comments.
  • Copies new "doc-files" directory for holding images and examples.
  • Hierarchical destination file structure
  • Possible incompatibilities between 1.1 and 1.2 doc comments

ARCHITECTURE

Doclet API

  • Javadoc now has a Doclet API to which you can write doclets.

CONTENT

New Tags

  • @throws is a synonym for @exception.
  • @see now accepts packages, HTML anchors and quoted strings. It can also take a label.
  • {@link apiname label} is a new tag for in-line links in text.

Provides more API information and links

  • Includes mechanisms for package-level and document-level information.
  • Incorporates one-line summaries for classes and packages like there have been for members.
  • Includes inherited API on class and interface pages.
  • Includes return types in method summaries, and field data types in field summaries.
  • Includes links to interfaces from members that implement that interface.
  • Includes list of subclasses for each class, and implementing classes for each interface.
  • Copies member descriptions from interfaces to implementing classes.
  • Includes a class hierarchy (tree) view for each package.
  • Introduces -link option for linking to external Javadoc-generated documents.
  • Includes list of deprecated API.
  • Omits the keywords native and synchronization (which are not part of the Java spec).
  • Copies new "doc-files" directory for holding images and examples.

Customizable title, header and footer

  • Introduces options for adding a unique title, header, footer, and bottom note. The bottom note is for information like a copyright notice and mailto link.

FORMAT

Image files

  • No longer relies on images for headings and bullets. Instead it uses table cells and horizontal rules to distinguish headings and API.

Style sheet

  • Add HTML style sheets for control of colors, fonts and positioning.

Improved navigation

  • Adds optional HTML frames for lists of packages and classes. You can show or hide these frames with a single click.
  • Navigation bar is now the same from screen-to-screen.
  • Renames "API Users Guide" to "Help".
  • Changes the term "index" to "summary" in headings of class pages for member summaries.
  • Better distinguishes the summary and detail sections from each other.

Index improvements

  • Option exists to break index up to one file per initial character.
  • Index is internationalized to handle Unicode characters.
  • Index now contains the classes and interfaces.

Hierarchical Destination File Structure

  • Change the destination directory from flat to hierarchical. (new in Beta4)

GENERAL

Incompatibilities

  • Describes possible incompatibilities when running Javadoc 1.2 on 1.1 comments

Other Doclets

  • Maintains the ability to generate Javadoc 1.1 HTML output, for those who want it.
  • [Future] Adds the ability to generate MIF output, for importing into FrameMaker.

Future Enhancements After 1.2

  • Allow for incremental builds contributing to a single Javadoc-generated document.

DETAILED CHANGES

These are the detailed changes made to Javadoc from 1.1 to 1.2. Features denoted as "Done" are implemented and tested in 1.2 Beta 4.

CHANGES FOR WRITING DOC COMMENTS

Javadoc 1.2 has the following new requirements and features you should be aware of when writing documentation comments:
The first sentence of each class description should be a summary statement.
Package-level comments are now possible.
The first sentence of each package description should be a summary statement.
System-wide comments are now possible.
New Javadoc tags are available for use in doc comments.
Copies new "doc-files" directory for holding images and examples.
Hierarchical destination file structure
Possible incompatibilities between 1.1 and 1.2 doc comments

ARCHITECTURE - DOCLET API

Javadoc now has a Doclet API to which you can write doclets. This is a major architectural change to Javadoc. You can use Javadoc doclets to customize Javadoc output. Think of a doclet as a plug-in for text conversion. A doclet is written to the doclet API to specifies the content and format of the output to be generated by the Javadoc tool. You can write a doclet to generate any kind of text-file output, such as HTML, SGML, XML, RTF, and MIF. Sun provides a "standard" doclet for generating HTML-format API documentation. Doclets can also be used to perform special tasks not related to producing API documentation. For example, a diagnostic doclet could be created to check that all members have documentation comments.

Motivation for New Architecture - The original Javadoc (in 1.0.x and 1.1.x) takes java source files as input and produces HTML as output. The format of the HTML output is hard coded in java. The disadvantage is that developers who want to customize the output are out of luck, unless they have a source license and want to hack some very arcane code. This means technical writers cannot make enhancements they might need, whether minor (such as capitalizing a word, changing color, adding bold, ...) or major (converting to a new format, such as MIF or RTF).

The requirements for the Javadoc re-architecting were:

  • Separate the mechanisms used to parse and process the input source from the specification of the output format.
  • Make the output format specification pluggable.
  • Make the output format specification as comprehensible as possible to tech writers.
New architecture: The javadoc front-end handles command line arguments and java parsing/processing, constructing a root data structure and passes this off to a java "doclet". The doclet would access this data via an API representing packages, classes, methods, fields, and comments, as well as enumerations of these objects. New doclets could be written to this API, or standard doclets could be subclassed to allow minor changes.

CONTENT - NEW TAGS

These tags are actually implemented in the javadoc API, not in the standard doclet.
New tag "@throws" is a synonym for "@exception". This is a convenience, since "throws" is a keyword in the Java language.
Existing tag "@see" now accepts packages, HTML anchors and quoted strings. It can also take a label. An @see tag can refer to a package just like it can refer to a class, method or other API. The HTML anchor is of the form <a href="xxx">XXX</a> and the quoted string is of the form "xxx". For examples, see Javadoc Reference Page. The label is optional and is of the form: "@see name label". If a label is included, it will be displayed instead of the name.
New tag "{@link apiname label}" is for in-line links in text. In previous versions of Javadoc, the only way to include links to API was to use the @see tag or to hard-code HTML. This new in-line tag uses the same algorithm that @see uses to generate the HTML link. The difference is that it places the link in-line rather than under a "See Also" heading.

CONTENT - PROVIDES MORE API INFORMATION AND LINKS

Add to source tree one file per package, named "package.html", dedicated to doc comments. The first sentence of each package description is the summary. Javadoc picks up everything between <body> and </body> and add it to the package summary page "package-summary.html" (which also contains a table of its classes and interfaces). Javadoc copies the first sentence of this to the overview page "overview.html". Therefore, you should not put a title or any other text between <body> and the first sentence.
Outline for package-level comments:
  • Introduction
  • Package Specification
  • Related Documentation

For more information, see Package Level Comments.

Old Behavior: Javadoc 1.1 has no mechanism for including comments specific to a particular package. NOTE - The above feature requires writers to follow a new Javadoc rule: The first sentence of each package description should be a summary statement.
Add a single system-wide document "overview.html" for the set of packages. Include in it any comments that apply to the all the packages being documented. For example, you might document the following assumption on this page: "NullPointerException is thrown wherever null is passed in, except as noted."
This file belongs in your source tree and can be any filename you specify. By convention, we use the name "overview.html". Specify this filename with the -overview option on the command line when running Javadoc and the file's contents (between the <body> and </body> tags) is inserted into the initial page that appears in the right-hand frame, named overview-summary.html (which was called packages.html in Beta3 and earlier versions).
Old Behavior: Javadoc 1.1 has no mechanism for including comments that apply to all packages.
Javadoc picks up the first sentence one-line summary for each package from package.html and puts it in packages.html. This provides a brief summary of each packages in the list of all packages.
Old Behavior: Javadoc 1.1 has no such summary list.
Pick up the first sentence of each class description and include it in the class summary at package-<class>.html This provides a brief summary of all classes for a given package.
Old Behavior: Javadoc 1.1 has no such summary list. NOTE - The above feature requires writers to follow a new Javadoc rule: The first sentence of each class description should be a summary statement.
Add inherited API to method and field summaries on class and interface pages.
Old Behavior: In Javadoc 1.1, the inherited members for a given class do not appear on the class page, necessitating following links to discover them.
Include return type and keywords "static", "protected" and "abstract" in the signature in the method summary, since they are needed by someone calling a method. Do not include public, transient, volatile, or final; those appear in the detail section further down the page. Include data type of fields.
Old Behavior: In Javadoc 1.1, method summaries don't indicate the return type. Field summaries don't indicate the field type.
Add "Specified by" for members that implement an interface.
Old Behavior: In Javadoc 1.1, members of a class that implement an interface make no such mention.
Add the list of subclasses at the top of the class page. Also add the subinterfaces and implementing classes at the top of the interface pages.
Old Behavior: Javadoc 1.1 does not list subclasses on a class page.
Copy the description automatically from the method in an interface to its implementing subclass only when the implementing method contains no text. Include a boilerplate statement that says that the text is copied from the interface. The reason for doing this, is that when implementing an interface, the method descriptions are often identical for both the interface and the class. Copying the descriptions manually seems like needless work that is difficult to maintain.
Old Behavior: Javadoc 1.1 does not copy method descriptions from an interface.
Add a tree view for each package. When you are viewing a package or class, the "Tree" link goes to that view, which then has a link to the tree for all packages.
Old Behavior: Javadoc 1.1 has no tree view (class hierarchy) of single packages. The only tree view is of all packages, which, for the JDK, is overwhelming.
Introduce -link option for linking to external Javadoc-generated documents. Default is to not link to external documentation. When someone generates docs, the -link option generates links to documentation for any API referenced by the API being documented. The links can be local or remote (on the Internet).
Old Behavior: Javadoc 1.1 makes no links to documentation outside what is being generated.
Submit bugs against default constructors that should not be documented by Javadoc. We should either deprecate them or remove them as bugs.
(Does not affect Javadoc)
Old Behavior: Javadoc includes all default constructors, whether or not an application developer would ever call them. When it documents default constructors, it leaves their descriptions blank.
Add a deprecated summary page listing all deprecated API. (Eventually we will add links to the replacement API.)
Old Behavior: Javadoc 1.1 does not generate a list of deprecated API.
Mark classes that are deprecated.
Old Behavior: In Javadoc 1.1, deprecated classes are not marked as such in the class list for a given package.
Remove "synchronized" and "native" from signatures. Javadoc generates an API specification. These two keywords do not belong in the signatures of a specification, because they are implementation-specific. The keyword "native" does not need to be documented. The keyword "synchronized" indicates thread-safe behavior that should instead be described in the method descriptions. A thread-safe method itself might not use the "synchronized" keyword but might call private methods that are.
Old Behavior: Javadoc 1.1 includes the keywords "synchronized" and "native".
Copy "doc-files" directory (one per package) for holding images and examples. Javadoc looks for a directory named "doc-files" in each package directory of the source tree and copies that directory and its contents to the destination. The files in "doc-files" are merely copied to the destination and not processed by Javadoc. This means these files cannot contain the standard navigation bar, header or footer, or be included in the index or tree. This directory can contain arbitrary files referenced by doc comments. Examples: images, HTML files, text files, example source code, HTML tables shared by more than one class.
Example: To include a reference to the image file "Button-1.gif" within the description for the java.awt.Button class:
  • In the source tree, create a directory named "doc-files" in the "java/awt/" directory.
  • Put the "Button-1.gif" file in the "doc-files" directory.
  • Add an <img> tag to your doc comment for the Button class:
       /**
    * <img src="doc-files/Button-1.gif">
    */
Java Software has adopted the naming convention starting with "-1" and incrementing for subsequent images. For more details, see Including Images.
Old Behavior: In Javadoc 1.1, running Javadoc generates files with broken links because images are not copied to the destination. (In the JDK, these images are currently mostly screen shots of AWT and Swing components.)

CONTENT - CUSTOMIZABLE TITLE/HEADER/FOOTER

Add the -title option to include a title to first page "packages.html". Example title: "Java Platform 1.2 Core API".
Old Behavior: Javadoc 1.1 has no formal way to add a title to the generated document.
Add -header, -footer, -bottom options for header/footer/bottom on every page. This enables you to put the version number of the API (such as "Java 1.2 Beta 4") on every page so that when you print out a page, you have a record of the version it came from. The "bottom" feature lets you add a copyright notice or feedback email link at the bottom of each page.
Old Behavior: In Javadoc 1.1, the version number by default does not appear on any page.

CONTENT - NO LINKS TO SOURCE FILES

For internal development, having direct links from each Javadoc-generated class page to its source code would be handy. However, we have decided not to include links in the Java API documentation to the Java source code when we generate and publish our API documentation. Hence it becamse a low priority to put that feature into the standard doclet. However, we have made available separately a doclet that generates links to the source code.

FORMAT - IMAGE FILES

Eliminate any required GIF images. Replace the GIF bullets with horizontal rules. Replace the graphic headings (e.g., "Methods", "Fields") with text inside colored table cells.
Old Behavior: Javadoc 1.1 requires GIF images for bullets and headers. These are not necessary, they slow down the display, and they need to be manually copied to the destination.

FORMAT - STYLE SHEET

Add HTML style sheets for control of colors, fonts and positioning. Style sheets are a standardized way of setting the colors, fonts and positioning of text on web pages at runtime. To modify the colors of the table cells or the font sizes in the left-hand frames, modify the file stylesheet.css that is generated by javadoc. There is also a -stylesheetfile option when running javadoc for specifying your own style sheet.
For example, you can change the background cell color of the headings from dark blue to white by editing the file stylesheet.css as follows.
From:
   #TableHeadingColor     { background: #CCCCFF } /* Dark mauve */
To:
   #TableHeadingColor     { background: #FFFFFF } /* Dark mauve */

For a formal description, see Cascading Style Sheets from W3C. (For an introduction, click on "back to intro" from the CSS Reference Table.)

FORMAT - IMPROVED NAVIGATION

Add frames for package, class and member. (For no frames, start at "package-summary.html". For frames, start at "overview-summary.html")
Old Behavior: Javadoc 1.1 has no easy way to access any package, class or member. It requires users to backtrace.
Add "All classes" link to top of package list (upper left frame). When user clicks this, it should display list of all classes in alphabetic order in lower left-hand frame.
Old Behavior: Javadoc 1.1 has no easy way to access any class, regardless of the package it is in. It requires users to go to "Class Hierarchy". It would be nice to have a list of just classes and interfaces.
Develop a single navigation bar that works in all screens. Dim out the unused items.
Old Behavior: In Javadoc 1.1, the standard navigation bar along the top changes dramatically from page to page. There are three different navigation bars: all packages (2 items), a package (3 items), and a class (6 items).
Add another navigation bar to jump to each subsection.
Summary: Inner | Field | Constr | Method Detail: Field | Constr | Method
Old Behavior: Javadoc 1.1 requires you to scroll past the class description to get to the member summaries and detail.
Rename the "API Users Guide" link to "Help". Modify Javadoc to generate a default help file. Add an option -nohelp to omit the "Help" link from the navigation bar if desired. Add an option -helpfile to create a file
Old Behavior: Javadoc 1.1 has a link in packages.html called "API Users Guide". The file it points to is not automatically copied to the destination directory.
HTML frame for members in Javadoc 1.2. This is a feature we had considered adding to the standard doclet but decided not to. We plan to announce a third-party developer to eventually release this feature in a separate doclet.

FORMAT - WEB PAGES

Change the summaries to tables with borders and cell background color. This better distinguishes between summary and detail portions of class files.
Old Behavior: In Javadoc 1.1, both the summary and detail portions both look quite similar, it's not obvious when scrolling down the page which section you are in.
Keep "Index" as the name of the alphabetized list of API at the end of the document. Rename top portion of each package page from "Package Index" to "Package Summary", likewise for top portion of each class page rename "Method Index" to "Method Summary", "Constructor Index" to "Constructor Summary", and "Field Index" to "Field Summary".
Old Behavior: In Javadoc 1.1, the word "index" is used to identify both summaries at the top of class pages, and the alphabetic book-type list containing all the API. This is needlessly confusing.

FORMAT - INDEX IMPROVEMENTS

Add -breakindex option to break the index into a separate file for each letter of alphabet.
Old Behavior: In Javadoc 1.1, the index is a gigantic 1.4MB file for JDK; takes forever to load over Internet.
Add classes and interfaces to the index.
Old Behavior: In Javadoc 1.1, the index lists only constructors and members, not classes or interfaces.
Internationalize the index, to enable any Unicode characters.
Old Behavior: In Javadoc 1.1, the index handles only the alphabet A-Z. (Actually, only A-Y.)

FORMAT - HIERARCHICAL DESTINATION FILE STRUCTURE

Add hierarchical destination directories that replicates the source code tree of one directory per subpackage. Flat structure will no longer be supported. This has the effect of reducing the number of files in a directory by distributing them by package. A side effect is to reduce length of filenames, since package names will be directory names rather than part of the filename. This will make it easier for third parties to generate shorter names (for example, 31-character names for the Macintosh) that retain some meaning.
For example, java.awt.Button.html will now be \java\awt\Button.html Given all the 1.2 changes, the destination file structure for running Javadoc on the java.applet package would now look like file structure.
Old Behavior: Javadoc 1.1 uses a flat structure, where all HTML files sit in a single directory.

INCOMPATIBILITIES

Possible incompatibilities between 1.1 and 1.2 doc comments We have been careful to write Javadoc 1.2 to be compatible with documentation comments written for previous versions of Javadoc. However, there may be a few cases where old documentation comments may not "work" the same when compiled with Javadoc 1.2.
  • Many filenames have changed. The most important change is that the initial page of the generated documentation is now index.html (which sets up HTML frames) instead of packages.html. If you want to avoid frames, the initial page to load is overview-summary.html (which replaces packages.html in 1.1).
  • In the text of comments, writers might have hard-coded in-line links to API names. Because javadoc now generates hierarchical directories, those links would now be broken. The new {@link} tag enables proper in-line links.

OTHER DOCLETS

Maintain Javadoc 1.1 format with its own doclet. This keeps the old look and flat directory structure but with some of the new bug fixes. To access this, use the "-1.1" javadoc option
Old Behavior: - The Javadoc 1.1 format is important for those who has built parsers that operate on and rely on that HTML output.
[Future] Implement a MIF doclet. This will add the ability to generate MIF output, for importing into FrameMaker.
(Plan to do and release separately after 1.2.)
Old Behavior: Javadoc 1.1 has no MIF capability (Javadoc 1.0.2 does).

FUTURE ENHANCEMENTS - TO DO IN A RELEASE AFTER 1.2

Allow for incremental builds contributing to a single Javadoc-generated document. Would be useful to save the intermediate format from each Javadoc run and allow merging of those intermediate formats into a complete document, with fully correct index, tree, class hierarchy, subclasses list, etc.
(Not done - planned for a release after 1.2)
Old Behavior: Javadoc 1.1 does not allow incremental building of documentation.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 1.3

This document describes the changes made to the Javadoc tool between versions 1.2.2 and 1.3.

New Features

Added {@docRoot} - This is a new Javadoc tag that represents the path from any class page up to the root directory of the generated documentation hierarchy. The purpose of this tag is to allow you to make a link to a single web page from all generated pages, such as to a copyright page or corporate logo from the footers of all generated pages. (This tag was broken in 1.3 Beta) (Request #a4197510).

MIF doclet. This adds the ability to generate MIF output, for importing into FrameMaker and eventual conversion to PDF, PS, RTF, Word, or WordPerfect.

Bug Fixes

4260169: Added <code> HTML tag to "Overrides", "Specified By" and "Tags copied from".

4276757: Fixed Javadoc to document inherited public members of package-private classes.

4214932: Fixed bug where private fields/methods were documented as inherited.

4216836: The "Specified by:" link has been added for a method in an interface implementing a method from a superinterface.

4227539: We now list interfaces found walking all the way up the hierarchy tree. For interfaces, added "All superinterfaces: A, B, C". For classes, added "All implemented interfaces: A, B, C".

4233601: In inner class summary, fixed bug where Exceptions were mistakenly listed as Interfaces.

4216434: Fixed Javadoc -help option which didn't print all the options (-helpfile, -stylesheetfile).

4235271: Fixed bug where overriding method in Interface is now shown as "Specified By".

4231274: Added a missing space ahead of parenthetical phrase "(also extends...)"

4285930: Changed second argument of -linkoffline so that if supplying a relative path, you should make it relative to the destination directory (supplied with -d) rather than relative to the current directory from where javadoc is run.

Future Enhancements

To possibly do in a release after 1.3
XML Doclet - for a standardized representation of static program information of a set of packages. This might possibly allow developers to incrementally build a single document from separate Javadoc runs. By saving the intermediate representation from each Javadoc run, it would allow merging of those into a complete document, with fully updated index, tree, class hierarchy, subclasses list, etc.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 1.4

This document describes the changes made to the Javadoc tool between versions 1.3 and 1.4. You can also see a concise list of outstanding bugs listed in Release Notes for Java SE 1.4.2, and view importatn bug fixes and changes in Bug Fixes in Subsequent 1.4.2 Update Release Versions.

  • Summary of New Tags and Options
  • Possible Incompatibilities
  • Running Javadoc
  • Writing Doc Comments
  • Output Content
  • Doclet API
  • Standard Doclet Code Change
  • Javadoc Tool Front End

Summary of New Tags and Options

Here is a brief summary of the new tags and options. New Tags
{@linkplain}, {@inheritDoc}, @serial, {@value}

New Options
-breakiterator, -docfilessubdirs -exclude, -excludedocfilessubdir -nocomment, -noqualifier, -quiet, -source, -linksource, -subpackages, -tag, -taglet

Possible Incompatibilities

The following changes can affect the way your existing doc comments are interpreted or displayed:
  • New sentence break for first sentence
  • Javadoc copies @throws comments more conservatively

Running Javadoc

Includes changes that affect command line options, errors and warnings. Added -subpackages option to recursively traverse all subpackages by passing in a single package root. The -exclude option unconditionally exclude packages from the list of packages to document even if it would otherwise be included by some previous or later -subpackages command-line flag. For example, -subpackages java -exclude java.lang.ref would include java.io, java.util, and java.lang (among others), but not java.lang.ref. (4074234)

Added "-source 1.4" option for assertions - This option documents code that was compiled using "javac -source 1.4", necessary for code that contains assertions. (4400430)

Added public methods to invoke Javadoc tool from within Java - Added a programmatic interface to the Javadoc tool in com.sun.tools.javadoc.Main (consequently, the standard doclet was made re-entrant). For more details, see Standard Doclet. (4113483)

Warning and error messages now contain filename and line number. The line number is to the declaration line rather than to the particular line in the doc comment. Uses the SourcePosition class. (4396665)

Serialized form page enhancements - Javadoc now includes private classes in the serialized form page (without requiring the -private flag). This means the serialized form page can be properly generated in a normal Javadoc run. This was done by adding the method PackageDoc.allClasses(boolean filter) where private and package-private classes are included when filter is false. ( Information Specific to the Doclet API) The method writeReplace() is now included in the serialized form page. Javadoc also now looks at "@serial include" and "@serial exclude" tags and includes or excludes classes accordingly. For more information, see @serial tag. (4290079, 4180839, 4341304)

Documented @files to work with command line options as well as filenames This changes the documentation to conform to the implementation. The @files feature was originally documented in javadoc and javac to allow only filenames, not command line options. This expands the documentation to say that @files also allows command line options. (Also renamed @files to @argfile in the documentation to make it clear it's a file of arguments.) (4469119)

Added -quiet option to shut off non-error messages
Only the warnings and errors appear, making them easier to find. (4217345)

The standard doclet prints its version number in its output stream. Suppressed by -quiet option. (4114089)

Automatically create destination directory (-d). Since a primary function of javadoc is to create files and directories, it seems reasonable to create the root destination directory as well. (4464477)

Document only legal classes - When documenting a package, Javadoc no longer reads files whose names are not composed of legal class names. Example: When passing com.sun.foo into Javadoc, it used to parse every file in the directory com\sun\foo whose name ended with ".java", whether or not the filename, stripped of that suffix, was actually a legal class name. Now Javadoc will parse only files whose names are legal class names. This enables developers to include templates, test source files, or other .java files that will not be documented, by including, for example, a hyphen "-" in its filename. (4398440)

Fixed -linkoffline separator '/' - When running on Microsoft Windows, the -linkoffline option now properly inserts '/' instead of '\' in each link that points to an external class. This bug caused broken links to external classes when documentation that was created by Javadoc on Windows was then browsed on Solaris, Linux, or Mac OS X. (4359874)

Removed transitional "-1.1" option - The "-1.1" option was introduced in version 1.2 as a doclet to provide a transition path from Javadoc 1.1 to 1.2. This transition is not necessary for moving to 1.3. The "1.1" doclet did not handle new features of the language (such as inner classes) and because of shared code with the standard doclet was an impediment to maintenance. (4312499)

Writing Doc Comments

Includes changes that affect how doc comments are written, such as new tags. Added tag interface for custom tags
You can create and use your own custom tags -- both normal standalone tags, similar to @return, and inline tags, similar to {@link}.
  • Simple tags - These are tags with a single text argument. You choose a unique name for a tag and use the -tag option.
  • Complex tags - These are tags with more than one argument, or that need special output. This requires developing a "taglet" class that implements the tag behavior. Then specify the -taglet and -tagletclasspath options (don't use the -tag option).
In both cases, the order of the -tag and -taglet options determine the order they are output. You can mix these options with the standard tags "-tag return", "-tag param" to intersperse them.

For custom inline tags, you must create a taglet. (4282805)

Flag any unknown tags while printing custom tags. This is a part of the custom tag mechanism. When javadoc parses the doc comments, any tag encountered that is not either a standard tag or passed in with -tag or -taglet is considered unknown, and a warning is thrown. (4039014)

When omitting the leading asterisk (*), keep indentation within <PRE> tags. This enables you to paste code examples directly into a doc comment. Indentation is relative to the left margin (rather than the separator /**). (4232882)

Added -breakiterator for new way to determine end of first sentence. We plan to change the algorithm for determining the end of the first sentence in the next major feature release. The -breakiterator option gives you a preview of the new algorithm. In 1.2 and 1.3, the java.text.BreakIterator class was used to determine the end of sentence for all languages but English (4165985). English had its own algorithm, which looked for a period followed by a space. When -breakiterator is omitted, the end of the first sentence is unchanged from 1.2 and 1.3, but warnings are emitted displaying where there would be a difference. Using -breakiterator uses the new algorithm. Differences in the algorithms show up in English as follows: (4165985)

  • Old algorithm - Stops at a period followed by a space or a paragraph-level HTML tag, such as <P>.
  • New algorithm - Stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "Serial no. is valid", but won't handle "Mr. Smith"). Won't stop at HTML tags or sentences that begin with numbers or symbols.

Fixed Javadoc to no longer require method bodies. - You can now run javadoc on .java source files that are pure stub files with no method bodies. This means you can write documentation comments and run Javadoc in the earliest stages of design while creating the API, before writing the implementation. Previously, javadoc complained if you tried to do this, insisting that you add "abstract" to the methods and the classes.

Added {@linkplain}, a plain text version of {@link}. The link's label is displayed in plain text rather than code font. Useful when the label is plain text. (4429628)
Example:

        Refer to {@linkplain add() the overridden method}.

Added {@inheritDoc} tag for inheriting documentation. This tag copies the doc comment from a superclass into the current doc comment. This allows developers to write around the copied text rather than have the inherited text be the only text. Previously, text was copied only if the comment was missing. (4186639)

Javadoc tags @return, @param, and @throws are now individually inherited. In 1.3, they would be inherited only if the entire doc comment was empty. The @see tag is also inherited, but only if there are no @see tags in the overriding element. (4496270)

The @throws documentation is copied from an overridden method to a subclass only when the exception is explicitly declared in the overridden method. In 1.3, the @throws text would be copied to an overriding method, whether or not that method actually could throw that execption. This new behavior may remove some documentation that @throws was properly inheriting. You can use {@inheritDoc} to cause @throws to inherit documentation. (4317583)

Output Content

Includes output text, images, layout, formatting and links. Includes values of static field constants - Javadoc now documents the values of constant fields. Those values appear on a separate Constant Values page, reachable from "See also: Constant Values" links by each static field. The new inline tag {@value}, when used in a static field comment, returns its value. This tag is useful for inserting the value into a doc comment. (4422788)

This change required adding to the Doclet API the methods FieldDoc.constantValue() and FieldDoc.constantValueExpression() in package com.sun.javadoc. ( Information Specific to the Doclet API) (4320557)

Added -noqualifier option to omit qualifying package name from ahead of class names in output
The previous behavior was as follows: On the page for class p.C, add the package name only to classes not belonging to package p. The argument to -noqualifier is either "all" (all package qualifiers are omitted) or a colon-separate list of packages, with wildcards, to be removed as qualifiers (such as "java.lang:java.awt:javax.*"). (4359889)

Add links to source code, using -linksource option
Creates an HTML version of each source file and adds links to them from the normal documentation. (Named -src in Beta 2. Will rename it to -linksource in the final version, to better differentiate it from -source.) (1242492)

Put current class or package name first in window title.
This enables the name to appear in the Windows task bar when a window is minimized. (Also works in Internet Explorer when frames are turned on.) (4232597)

Generate package page when passing in source filenames (*.java). The docs that are generated should not be any different when passing in package names than when passing in the source filenames for classes in those packages. (4359386)

Put exception class link in throws section in two cases:
(1) there a @throws tag but no text accompanies the tag
(2) if an exception is declared but there is no tag (4074202)

Added -nocomment to suppress description and tags, generating only declarations. Enables re-using source files originally intended for a different purpose. (4464558)

Error exit status - Fixed javadoc to use the exit status of the doclet. (4136558)

Use the -encoding option when reading package.html. (4463408)

Added "All Classes" to navigation bar for improved accessibility (4140824)

Directory doc-files is now copied when passing in .java files - When passing in source files (*.java) to Javadoc, it now copies the "doc-files" directories to the destination. (Formerly, the "doc-files" directories were not copied.) This behavior is now identical to that when passing in package names. (4340814)

Fixed doc-files directory at doc root to be copied to destination.
This enables the inclusion of overview-level documentation to be included. (4256505)

Added -docfilessubdirs to enable deep copy of doc-files - Subdirectories of the "doc-files" directory are now recursively copied to the destination when -docfilessubdirs is used. For example, doc-files/example/images and all its contents would now be copied.If you need it, this option is also available: -excludedocfilessubdir name1>:<name2>... to exclude any doc-files subdirectories with the given names. This prevents the copying of SCCS and other source-code-control subdirectories. Previously, only files directly in "doc-files" were copied. (4385048)

Fixed {@docroot} in HTML frame - The {@docroot} tag is now properly resolved when it appears in the upper left HTML frame (overview-frame.html). (4365290)

Fixed {@docroot} in @see - The {@docroot} tag is now properly resolved when it appears in the text of an @see tag. (4416364)

Fixed {@link} with {@docRoot} - The {@docRoot} tag no longer disables any {@link} tag that follows it in the same comment. (4369014)

"Implements" heading - A doc comment inherited from an abstract method now uses the proper subheading "implements" rather than "overrides". (4318787)

Fixed "Implementing Class" on interface page - Fixed bug on interface page where some classes were not showing up as "implementing class". (4378491)

Fixed display of static initializers - The initializer static {...} caused the "Methods Inherited From" table to start with a comma (,). The underlying bug was that javadoc considered static {} to be an anonymous method. It will no longer appear as a method entry in the generated docs. (4136861)

Properly document fields and methods for private inner classes. (445611)

Corrected "nested classes" terminology - Javadoc now uses the term "nested classes" rather than "inner classes" throughout its headings and subheadings. The definitions are: "A nested class is any class whose declaration occurs within the body of another class or interface." while "An inner class is a nested class that is not static." Therefore, "nested" is the more general term. (4307151)

Doclet API

Information Specific to the Doclet API Doclet API is no longer serializable. - The classes no longer extend serializable. (It would have been impossible, in general, to properly serialize them.) (4125581)

Information Specific to the Doclet API Expose filename and line number of declarations. A new class SourcePosition has been added to the Doclet API, as well as a new method position() in Doc and Tag (see 4192783). These enable the complete decomposing and recomposing of source files. (4192783, 4208989)

Information Specific to the Doclet API Added MethodDoc.overriddenMethod() for returning the list of methods that are overridden.

Information Specific to the Doclet API Improved documentation of the Doclet API.

Information Specific to the Doclet API Potential incompatibility - The Tag interface now has a position() method. Doclets that implement the 1.3 Tag interface (such as MIF Doclet 1.2 Beta 1) will not work with Javadoc 1.4.

Standard Doclet Code Change

Standard doclet code change - In the standard doclet source code, added a configuration argument to the MessageRetriever constructor signature. This may affect code that subclasses the standard doclet. New constructor is now MessageRetriever(Configuration configuration, String resourcelocation) (No bug number)

Javadoc Tool Front End

There are many changes to the Javadoc tool described in the other sections; the most notable one is mentioned here.

Complete reimplementation of the Javadoc tool and API (4400430): - Javadoc now uses the new javac compiler instead of the old.

A few changes in behavior are known. These are not bugs and will probably never be "fixed" in javadoc:

  • Private inner classes are now marked as private. The old javadoc incorrectly marked them as having package protection.
  • static class initialization blocks were reported by the old javadoc as if they were a function named <clinit>. The new javadoc correctly omits them.
  • The old javadoc incorrectly inserted a this$0 parameter to constructors for nested classes. While this agrees with the reflective view of these constructors, it is not correct from the source or the language viewpoint. The new javadoc reports the signature as it appears in the source.
  • The old javadoc sometimes reported the compiler-generated field this$0 as a serializable field. The new javadoc correctly omits mention of this$0 and other synthetic members. See java.util.logging.LogManager.LogProperties for an example.
  • The old javadoc occasionally omitted wildcard import declararations that appeared in the source. For example, in the translation unit for java.io.PipedOutputStream there is a (useless and redundant) "import java.io.*;". The new javadoc correctly includes this in the list of imports.
  • The old javadoc incorrectly reported that a private method overrides a private method with the same signature in the superclass. The new javadoc correctly reports that a private method is never overridden.
  • Some bugs remaining in the new java.io implementation prevent the correct processing of Unicode characters on output. While this is not a javadoc bug per se, it will affect any comparison of the old javadoc output with the new. For an example of the differences, see java.util.regex.Pattern.Caret. The workaround is to use a locale that supports a wider set of Unicode.

Some further known examples of incorrect behavior of the old javadoc are intentionally reproduced in the new javadoc implementation for compatibility. For example, if a class a.A has inner classes and you import them using:

        import a.A.*;
Old Javadoc would incorrectly report (through the Doclet API) an import of:
        import a.*;
There is no way of correctly expressing this import declaration with the current javadoc API.

ClassDoc instances are no longer unique - Prior to 1.4.0, every class being documented was represented by a single ClassDoc instance -- this was an undocumented implementation detail. With 1.4.0, this is no longer true -- the Javadoc tool is capable of creating two different ClassDoc instances that represent the same class. This would break any doclets that mistakenly relied on this fact. One such bug was 4496290: The -use option is severely broken.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 1.4.1

This document describes the changes made to the Javadoc tool between versions 1.4.0 and 1.4.1. You can also see a concise list of outstanding bugs listed at important new bugs and regressions, and can view listings from our database at Important Bug Fixes and Changes.

The changes listed below include the bug number and whether the fix was in the Javadoc tool front end ("tool") or standard doclet ("stddoclet"). The term "regression" appears for features that worked in 1.3.x, broke in 1.4.0, and have been fixed in 1.4.1.

  • New Features
  • Bug Fixes
    • Running Javadoc
    • Error/Warning Messages
    • Command Line Options
    • Tags
    • Miscellaneous

New Features

Added package and class names as keywords in <META> tags. This should improve search results for search engines that look at <META> tags. (4034096, stddoclet)

Bug Fixes:

Running Javadoc:

Regression: Fixed bug where it mistakenly documented .class files found on classpath (if they belong to packages passed in on the command line). (4548768, tool)

Regression: Fixed to handle packages named *.java. (4507380, tool)

Added better checking to accept only valid source file and package names. (4434834, tool)

Error/Warning Messages

Fixed com.sun.tools.javadoc.Main.execute to not ignore PrintWriters. (4587487, tool)

Added quotes around package name in error message when "\ " (backslash, space) passed in. (4370719, tool)

Command Line Options:

Regression: Fixed -use option, which was severely broken. (4496290, stddoclet)

Regression: Fixed -encoding option for reading source files. (4661481, stddoclet)

Regression: Fixed -link option to handle absolute paths. (4640745, stddoclet)

Fixed hang when -subpackages is passed in topmost package name. (4628237, tool)

Changed diagnostic of -help to 'Display command line options and exit'. (4501697, tool)

Tags:

Regression: Fixed to properly insert </DD> when using multiple @author tags. (4651598, stddoclet)

Regression: Fixed {@docRoot} which had been inserting an extra slash "/". (4524350, stddoclet)

Regression: Fixed @throws in implementing class to override @throws in interface. (4633969, stddoclet)

Regression: Fixed to enable @throws tags to have duplicate error class names. (4525364, stddoclet)

Regression: Fixed {@inheritDoc}, which did not work. (4618686, stddoclet)

Added warning when lowercase {@docroot} is used instead of {@docRoot}. (4662945, stddoclet)

Miscellaneous

Added interface constants to the Constant Field Values list. (4526070, stddoclet)

Corrected boolean constant fields to use true/false rather than 0/1. (4587494, tool)

Removed extra space of indentation for comments that omit leading asterisk. (4587562, tool)

Regression: Fixed StringIndexOutOfBoundsException caused by multiple <a href> tags. (4638015, stddoclet)

Changed so nothing is serializable when Serializable is not on -bootclasspath. (4644960, tool)

Removed "()" from window title when frames are off. (4530730, stddoclet)

Notes for doclet programmers:

The -use option was broken because Doc objects are no longer unique in 1.4.0. To keep track of class and package usage, the standard doclet creates Doc/List hash tables where the key is a ClassDoc or PackageDoc and the List is a list of Doc objects that use the key. This way of determining class and package usage worked fine with previous versions of the Javadoc tool, but it does not seem to work with 1.4.x. A Doc object should not be used as a key in the hash table. They are not unique -- that is, the Javadoc tool seems to be capable of creating two different ClassDoc objects that represent the same class. To fix this bug, we used the qualified name as the key in the hash table. We plan to make Doc objects unique again at some point.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 1.4.2

This document describes the changes made to the Javadoc tool between versions 1.4.1 and 1.4.2.

The changes listed below include the bug number and whether the fix was in the Javadoc tool front end ("tool") or standard doclet ("stddoclet"). The term "regression" appears for features that regressed at some point -- for features that worked in 1.3.x, broke in 1.4.0 or 1.4.1, and have been fixed in 1.4.2.

  • Notable New Features
  • Notable Bug Fixes
  • Notable Known Bugs
  • New Features and Bug Fixes
    • Command Line Options
    • Tags
    • Bad API Specifications
    • HTML & Javascript
    • Invalid HTML
    • Links
    • Running Javadoc
    • Error/Warning Messages
    • Accessibility
    • Doclet API

Notable New Features

  • All known bugs related to the U.S. Government's Section 508 requirements for accessibility have been fixed in this version. (4737558, stddoclet)
  • Include serialVersionUID in Serialized Form (4525039, stddoclet)
  • Can now inherit comments from source files not being documented. Your code can automatically inherit comments from interfaces and classes whose source files are on -sourcepath but are not being passed in on the command line. For example, for J2SE, You can do this by unzipping the src.zip file that ships with the SDK (which does not contain all source files, however), and add its path to -sourcepath. When javadoc runs on your code, it will load the doc comments from those source files as needed. For example, if a class in your code implements java.lang.Comparable, the compareTo(Object) method you implement will inherit the doc comment from java.lang.Comparable. This feature was actually available in 1.4.1. (No bug number, tool)
  • When using the -link (or -linkoffline) option, all @see and {@link} tags now create links to excluded classes. This fix greatly simplifies the ability to link to external classes and members. Previously, an external class needed to be either imported or fully qualified in a declaration in order for @see or {@link} to link to its documentation. Now, the only requirements are that the class be fully qualified and that its API docs appear on the path supplied by -link. (4652655, stddoclet)

    Other new features are listed below.

Notable Bug Fixes

  • Links: Fixed @link of a fully-qualified program element to link to external classes with the -link option. (4652655, tool, REGRESSION)
  • Links: Fixed missing internal links on return/parameter types when .java files are passd in (4628281, tool)
  • Execution: Fixed so duplicate classes are documented (4673477, tool, REGRESSION)
  • Serialized form: Fixed link anchors to classes in serialized form (4521661, stddoclet)
  • Javascript: Internet Explorer Javascript load error when linked by -linkoffline (4645058, stddoclet, REGRESSION)
  • HTML: Fixed so there is no diff when passing in package names or .java file names (4506980, stddoclet)

    Other bug fixes are listed below.

Notable Known Bugs

Bugs that can hang the Javadoc tool and highly noticeable bugs are listed here. You see a concise list of bugs listed at important new Javadoc bugs and regressions, and can view listings from our database at Important Bug Fixes and Changes.
  • Javadoc hangs without any useful message if {@inheritDoc} is used in a member that cannot inherit a comment. (4812240, stddoclet) For example:
    public class C {
    /** {@inheritDoc} */
    public abstract void m() {
    }
}
  • Internet Explorer displays unnecessary horizontal scroll bar in the main content pane when frames are showing. A simple workaround is described in the bug report. (4852280, stddoclet)

New Features and Bug Fixes

All new features and bug fixes in 1.4.2 follow.

Command Line Options

  • New feature: Added -packagesheader option for upper left frame (4766385, stddoclet)
  • New feature: Enable "-tag name" shortcut for "-tag name:a:name" (4695326, stddoclet)
  • New feature: Added -linksourcetab option to convert each tab to n spaces. This option is experimental and may change. (4510979, stddoclet)
  • New feature: The -tag option now allows dash (-) separator for xdoclet tags like @ejb:bean (4750173, stddoclet)
  • New feature: New -keywords option adds member names as meta keyword tags to improve API search (4764726, stddoclet)
  • New feature: Added -Xwerror flag to exit nonzero if there are warnings. (4099527, tool)
  • Bug fix: Fixed option -tag tagname:X:taghead so it no longer requires taghead (4628181, stddoclet)
  • Bug fix: Documented -quiet option to quiet only the standard doclet messages (4714350, stddoclet). Opened a new bug 4702454 to request that it quiet the javadoc tool messages as well.
  • Bug fix: Moved documentation for -source option from doclet options to javadoc tool options -- it has always been a tool option (4760924, stddoclet)
Tags
  • New feature: Javadoc now inherits @throws comments for runtime exceptions (4679573, stddoclet)
  • New feature: Javadoc now warns when first argument of @param is not parameter name (4693440, stddoclet)
  • Bug fix: Now compares fully qualified exception names when inheriting @throws text (4684827, stddoclet)
  • Bug fix: Fixed missing 'Throws' heading when followed only by auto-generated exceptions (4530727, stddoclet)
  • Bug fix: Fixed broken @inheritDoc when inheriting from abstract superclass's interface (4720974, stddoclet)
API Specifications
  • New feature: Now includes serialVersionUID in Serialized Form (4525039 stddoclet)
  • New feature: Can now inherit comments from source files not being documented. Your code can automatically inherit comments from interfaces and classes whose source files are on -sourcepath but are not being passed in on the command line. See example. (No bug number, tool)
  • Bug fix: Fixed missing inherited nested classes from summary table (4638588, stddoclet)
  • Bug fix: Fixed so javadoc no longer incorrectly lists hidden fields (4492178, stddoclet)
  • Bug fix: Added serializable superclass of non-public serializable class (4671694, stddoclet)
  • Bug fix: No longer documents override of private method, such as createBufferStrategy (4634891, stddoclet)
HTML & Javascript
  • New feature: Now includes javadoc version number and build in generated HTML comment (4749707, stddoclet)
  • Bug fix: Added "#anchor" names back to links that point to classes in serialized form page (4521661, stddoclet, REGRESSION)
  • Bug fix: Fixed Javascript IE load error when linked by -linkoffline (4645058, stddoclet, REGRESSION)
  • Bug fix: Fixed so there is no diff when passing in package names or .java file names (4506980, stddoclet)
  • Bug fix: Fixed invalid stylesheet.css file (font-size: normal) (4417174, stddoclet)
  • Bug fix: Fixed window title to not change when loading left frames (javascript, stddoclet) (4747738, stddoclet)
Invalid HTML
  • Bug fix: Added missing whitespace in DOCTYPE declaration (4625400, stddoclet)
  • Bug fix: Fixed invalid HTML in frameset DTD and extra <DL> (4275630, stddoclet)
  • Bug fix: Fixed <NOFRAMES>, which is not allowed outside <FRAMESET> element (4753048, stddoclet)
  • Bug fix: Fixed wrong !DOCTYPE in index-all.html file (4418115, stddoclet)
  • Bug fix: Fixed HTML table tags that were inserted in wrong place in package use page (4415270, stddoclet)
Links
  • Bug fix: Internal links missing from return/param types when .java files passd in (4628281, tool, REGRESSION)
  • Bug fix: Fixed @link of a fully-qualified program element to link to external classes with the -link option (4652655, tool, REGRESSION)
  • Bug fix: Fixed -link and -linkoffline to create proper relative links (4720957, stddoclet)
  • Bug fix: The -linksource option no longer produces '\' in links when run on Windows (4511110, stddoclet)
  • Bug fix: The label in {@link java.lang label} is no longer ignored when linking to a package name (4524136, stddoclet)
  • Bug fix: @link tag no longer malformed when only newline exists between first and second arguments (4739870, stddoclet)
Running Javadoc
  • Bug fix: No longer crashes when test file of unnamed package was included in source directory (4670772, tool)
  • Bug fix: Fixed so duplicate classes are once again documented (4673477, tool, REGRESSION)
  • Bug fix: Empty jarfile on classpath: Fixed so empty jarfile in classpath no longer throws an exception (4697113, stddoclet)
  • Bug fix: Files: When source and destination directories are the same, doc-files are no longer trashed (4258405, stddoclet)

Error/Warning Messages

  • Bug fix: Improve unhelpful error message "foo.jar: Body tag missing from HTML" (4691095, stddoclet)
  • Bug fix: Fixed so javadoc no longer reports errors when classpath jar files contain package.html files (4697040, stddoclet)
  • Bug fix: Fixed erroneous "Parameter foo is documented more than once." warnings. (4745855, stddoclet)
  • Bug fix: Now uses Messager printwriters inead of System.out and System.err (4644257, stddoclet)
Accessibility
  • Bug fix: Add title description to links describing italic style as "interface" (4714257, stddoclet)
  • Bug fix: Added ability to skip over nav bar for accessibility (4638136, stddoclet)
  • Bug fix: Added "summary" attribute to tables for accessibility (4637604, 4775148, stddoclet)
  • Bug fix: Added title attribute to <FRAME> tags for accessibility (4636655, stddoclet)
  • Bug fix: Put <H1>, <H2>, <H3> in proper sequence (4636667, stddoclet)
  • Bug fix: Add text equivalent of ASCII art in class tree for accessibility (4706779, stddoclet)
Doclet API
  • New feature: Extended Doclet API with holder() method in Tag interface (4706525, stddoclet)
  • Bug fix: Doc objects are once again == comparable (4731054, tool, REGRESSION)
  • Bug fix: Fixed bad ClassDoc for nested classes when built from .class files (4694497, tool)
  • Bug fix: Clarified the specification for Doc.position() (4748246, stddoclet)
  • Bug fix: Clarified the specification for RootDoc classes() method (4748234, stddoclet)
  • Bug fix: Clarified the specification for com.sun.javadoc.SeeTag (4754029, stddoclet)
  • Bug fix: Clarified the specification for PackageDoc.ordinaryClasses() needs clarification (4748244, stddoclet)
  • Bug fix: Clarified the specification for "kind" in com.sun.javadoc.Doc (4502589, stddoclet)
  • Bug fix: Clarified the specification for Doc.isClass() and all "class" references (4748245, stddoclet)
  • Bug fix: Clarified the specification for "class" further (4763596, stddoclet)
  • Bug fix: Clarified the specification for PackageDoc.allClasses() method and the term "included" (4748240, stddoclet)
  • Bug fix: Clarified the specification for ProgramElementDoc.qualifiedName() parameter list (4621267, stddoclet)
  • Bug fix: Clarified the specification for RootDoc.classes() and PackageDoc.allClasses() (4748238, stddoclet)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 5.0

This document describes the changes made to the Javadoc tool between versions 1.4.2 and 5.0 (formerly 1.5.0).

The changes listed below include the bug number and whether the fix was in the Javadoc tool front end ("tool") or standard doclet ("stddoclet"). The term "regression" appears for features that regressed at some point -- usually for features that worked in 1.3.x, broke in 1.4.x, and have been fixed in 5.0.

  • Notable New Features
  • Notable Bug Fixes
  • Known Bugs
  • Incompatibilities with Custom Doclets
  • New Features and Bug Fixes
    • Command Line Options
    • Tags and Taglets
    • Links
    • Generated API Specifications
    • Formatting and Invalid HTML
    • Navigation Bar
    • Accessibility
    • Running Javadoc
    • Error/Warning/Status Messages
    • Doclet API

Notable New Features

  • Generics, enums, and varargs: Added support for these new language features in the javadoc tool front-end (Doclet API) (4421066, tool) and standard doclet (4789689, stddoclet, 1 vote)
  • Annotations: Added support for annotations and annotation types in the javadoc tool front-end (Doclet API) (4904495, tool) and standard doclet (4905985, stddoclet)
  • BreakIterator: We have removed the -breakiterator warning messages from 5.0, and have left the default sentence-break algorithm unchanged from earlier releases. That is, the -breakiterator option is not the default in 5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings will go away in 5.0. The reason for this reversal is because any benefit to having -breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. (The -breakiterator option was added in 1.4.0; for English locale only, it forces the use of BreakIterator class to determine where the first sentence in a doc comment ends, as BreakIterator already does for other languages.) (4959985, tool)
    Furthermore, in a future release (hopefully 5.1) we will add new javadoc tags (feature request 4921374) to enable you to mark summaries explicitly and avoid using heuristics of any kind.
  • New tags {@literal} and {@code} The {@literal} tag denotes literal text. The enclosed text is interpreted as not containing HTML markup or nested javadoc tags. For example, the doc comment text: {@literal a<B>c} displays in the generated HTML page unchanged: a<B>c -- that is, the <B> is not interpreted as bold.
    The {@code} tag formats literal text in the code font; {@code abc} is equivalent to <code>{@literal abc}</code>.
  • Tag {@value arg}: This inline tag now accepts the name of a program element: {@value package.class#field}. This enables it to be used in any doc comment, not just in the doc comment of the constant field. (4764045, stddoclet, 2 votes)
  • package-info.java: You can now create a source file with this name to store package comments and annotations. It can be used in place of package.html (which supports only comments, not annotations). If package-info.java is present, javadoc should ignore package.html and look instead for the package doc comment immediately preceding the (possibly annotated) package declaration. The javadoc tool handles the selection and parsing of package-info.java and package.html and passes the doc comments to the doclet. See Package Comment Files.
  • @Deprecated annotation: This is a new annotation in 5.0 that should be used in addition to the @deprecated tag for deprecating program elements. The Java Language Specification now requires compilers to issue warnings when the @Deprecated annotation (but not necessarily the tag) is used. The @deprecated tag provides a place to describe what replaces the deprecated program element. See @Deprecated annotation.
  • Standard doclet reimplementation - The standard doclet and MIF doclet were re-implemented to share as much code as possible. This has made it possible to reduce the number of bugs in both doclets and raise the capabilities of the MIF doclet to that of the standard doclet. (The new MIF doclet has not yet been released -- it will probably be named version 1.4 Beta 1.) The key reason we merged these two doclets is because they both try to generate essentially the same document but in different formats (HTML and PDF). (4638723, stddoclet, 2 votes)
    We plan to publish this shared code as a doclet toolkit, as described on the Javadoc Tool home page.

    All new features are listed below.

Notable Bug Fixes

  • Option -tag: (regression) Fixed -tag so its name can once again contain a dash "-", as it allowed in 1.4.1. (4920381, stddoclet, 59 votes)
  • Hang due to {@inheritDoc}: No longer hangs when {@inheritDoc} (1) cannot inherit or (2) inherits from super-superinterface. (4812240, stddoclet, 18 votes)
  • Tag @param: (regression) Fixed @param so the parameter name (the first argument) is printed even if incorrect, as it worked in 1.3.1. (4802275, stddoclet, 1 vote)
  • Tag {@value}: Using {@value} in a custom tag no longer generates a NullPointerException. (4821796, stddoclet, 1 vote)
  • Browser scroll bar: Internet Explorer no longer displays an unnecessary horizontal scroll bar when frames are showing. (4852280, stddoclet, 5 votes)
  • Inheriting package-private docs: When -private option is used, now properly documents methods inherited from package-private classes only in the inherited method summary table and not in the detail section. (4780441, stddoclet, 5 votes)
  • First sentence ending with {@inheritDoc}: The end of a first sentence containing {@inheritDoc} is now determined correctly. (4767038, stddoclet, 4 votes)
  • First sentence broken link with {@docRoot}: A first sentence containing a {@docRoot} link is no longer broken in the single-page index. (4760191, stddoclet, 3 votes)
  • Inherited comment link: An inherited comment now links directly to the proper member, not just to the class. (4368820, stddoclet, 1 vote)
  • Alphabetic index sorting: Index sorting is again case-independent. Only in 1.4.1 and 1.4.2 it was sorted uppercase then lowercase. (4984419, stddoclet, no votes)

    All bug fixes are listed below.

Known Bugs

Javadoc 5.0 has no known bugs that cause it to hang or crash. You can view listings from our Bug Database. The notable bugs are:
  • Six-fold performance degradation since 1.4.2 for deeply inherited classes. The slowdown is partly due to the extra processing required by generic type parameters.
    Workaround: None. (5081166)
  • @param in base class is ignored if {@inheritDoc} in main description.
    Workaround: None. (4778311)
  • Produces faulty Constant Values page if a constant contain angle bracket '<'
    Workaround: None. (5077317)
  • Malformed HTML tag throws error due to message not found in resource file.
    Error message: java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets.formats.html.resources.standard, key doclet.malformed_html_link_tag
    Workaround: Reduce the number of packages and classes passed into javadoc until the error goes away and you locate the source file that contains the malformed tag. Then fix the malformed tag. A malformed HTML tag is one that begins properly but is otherwise improper. For example <action> is interpreted as a malformed <a> tag. (5082928)

Incompatibilities with Custom Doclets

Custom doclets written prior to 5.0 will have compatibility problems when run on source files that use new language features in 5.0.
  • New Language Features: The Doclet API and standard doclet were revised to handle the new 5.0 language features -- generics, enums, varargs and annotations. To handle these features, custom doclets would also need to be revised.

    The Javadoc tool tries -- to the extent possible -- to present so-called "legacy" doclets with a view of the program that 1) continues to work with pre-5.0 source code, and 2) matches their expectations for 5.0 source code. So, for example, type parameters and type arguments are stripped from generic constructs, type variables and wildcard types are replaced by their erasures, and ClassDoc.fields() will return enum constants.

    But legacy support is not specified with precision. It's a compatibility mode that will suffice until the doclet gets updated to understand the language it is operating on. The only guarantee is source and binary compatibility of doclets themselves: when using the 5.0 Javadoc tool, if your doclet is based on 1.4 and the source code on which you're operating is also based on 1.4, then you can still compile the doclet and it will still operate as before (modulo bug fixes).

New Features and Bug Fixes

The following is a list of essentially all new features and bug fixes in 5.0. Only very minor changes are omitted (such as fixing broken links in the documentation for the Doclet API) and bugs introduced in early-access releases of 5.0 but fixed in the final release are omitted.

Command Line Options

  • New feature: New -keywords option adds HTML meta tags to each generated file to help with search (4776637, stddoclet)
  • New feature: New -notimestamp option suppresses hidden timestamp embedded near the top of HTML pages (4777717
  • New feature: It is now possible to create test subpackages that contain hyphens that the -subpackages option will skip over without producing warnings. That is, this option will no longer warn if it encounters a directory with an illegal Java name (which is consistent with illegal source filenames). (4773013, tool)
  • Bug fix: The -help option no longer mistakenly shows "[classnames]" in the usage. (4775743, tool)
  • Bug fix: The -group option no longer causes a duplicate warning. (4924383, stddoclet)
Tags and Taglets
  • New feature: The {@literal} tag denotes literal text. The enclosed text is interpreted as not containing HTML markup or nested javadoc tags. For example, the doc comment text: {@literal a<B>c} displays in the generated HTML page unchanged: a<B>c -- that is, the <B> is not interpreted as bold.
  • New feature: The {@code} tag formats literal text in the code font. It is equivalent to <code>{@literal}</code>.
  • New feature: The {@value} inline tag now accepts the name of a program element and label: {@value package.class#member label}. This enables it to be used in any doc comment. (4764045, stddoclet)
  • New feature: Not a Javadoc tag, the @Deprecated annotation is new in 5.0 and should be used in addition to the @deprecated tag for deprecating program elements. See @Deprecated annotation.
  • Bug fix: (regresion): Fixed @param so the parameter name (its first argument) is printed even if incorrect, as it worked in 1.3.1. (4802275, stddoclet)
  • Bug fix: (regression) Fixed -tag so its name can once again contain a dash "-", as was allowed in 1.4.1. (4920381, stddoclet)
  • Bug fix: A first sentence containing a {@docRoot} link is no longer broken in the single-page index. (4760191, stddoclet)
  • Bug fix: The end of a first sentence containing {@inheritDoc} is now determined correctly. (4767038, stddoclet, 4 votes)
  • Bug fix: Use of the {@docroot} tag in -bottom text no longer causes a broken link on the help-doc.html page. (4851991, stddoclet)
  • Bug fix: Modified taglet code to allow standalone tags to handle inline tags. (4654308, stddoclet)
  • Bug fix: Use of {@value} in a custom tag no longer generates a NullPointerException. (4821796, stddoclet)
  • Bug fix: Inline tags now allow nested braces that do not belong to inline tags. (4965490, tool)
  • Bug fix: @param, @return and some @throws tags now inherit comments properly. (4915434, stddoclet)
  • Bug fix: @throws documentation is now auto-inherited if the exception is checked. (4947455, stddoclet)
Links
  • Bug fix: An inherited comment now links directly to the proper member, not just to the class. (4368820, stddoclet)
  • Bug fix: The summary heading is no longer missing when a class has no direct members but inherits members. (4904036, stddoclet)
  • Bug fix: Relative link in <a href> in first sentence no longer generates a broken link when it appears on other pages. (4460354, stddoclet)

    For more link bug fixes, see "Tags and Taglets", associated with the {@docRoot} tag.

Documented Source files
  • New feature: package-info.java is a reserved name for a source file to store package comments and annotations. package-info.java is described above.
Generated API Specifications
  • New feature: Added support for generics, enums, and varargs in the javadoc tool front-end (Doclet API) (4421066, tool) and standard doclet (4789689, stddoclet)
  • New feature: Added support for annotations and annotation types in the javadoc tool front-end (Doclet API) (4904495, tool) and standard doclet (4905985, stddoclet)
  • New feature: For legibility, constant field values of type long are now printed with "L" rather than lowercase "l". (4869993, tool)
  • New feature: For legibility, serialVersionUID values of type long are now printed with "L" rather than lowercase "l". (4821483, stddoclet)
  • New feature: Table of contents has been added to the top of the "Deprecated" list. (4927552, stddoclet)
  • Bug fix: No longer hangs when {@inheritDoc} (1) cannot inherit or (2) inherits from super-superinterface. (4812240, stddoclet)
  • Bug fix: Inherited non-public superclass is no longer mentioned (4874845, stddoclet)
  • Bug fix: "Specified by:" and "Overrides:" comments are now inherited from externally referenced classes. (4857717, stddoclet)
  • Bug fix: Documentation is no longer inherited from members of package-private classes. (4780441, stddoclet)
  • Bug fix: Order of method descriptions can no longer change from one run to the next. (4885372, stddoclet)
  • Bug fix: When class B extends class A which implements interface I, in the documentation for I, we now document that B implements I (under "All implementing classes"). (4947464, stddoclet)
  • Bug fix: Correct return type now shows up in member summary when a method inherits documentation from an overridden method that returns a different type. (4951228, stddoclet)
  • Bug fix: Now generates doc for readObjectNoData() in serialized form page. (4770063, stddoclet)
  • Bug fix: Now generates a package summary page for the unnamed package, if present. (4774450, stddoclet)
  • Bug fix: Now prints "Unnamed" as the name of the unnamed package, rather than printing empty string. (4904075, stddoclet)
  • Bug fix: All inherited methods from multiple extended interfaces are now documented. (4933335, stddoclet)
  • Bug fix: Interface methods are no longer marked "public" (just a change -- not actually a bug). (4682448, stddoclet)
  • Bug fix: Constructor comments are now indented properly. (4904037, stddoclet)
  • Bug fix: packages.html (note the plural) file is no longer included, as it has not been used or needed since 1.1. (4475679, stddoclet)
  • Bug fix: When a type parameter in the member summary is greater than 10 characters, now add a line break to shorten it (4927167, stddoclet)
Formatting and Invalid HTML
  • Bug fix: Now outputs <NOSCRIPT> tag with each <SCRIPT> tag. (4855054, stddoclet)
  • Bug fix: Internet Explorer no longer displays an unnecessary horizontal scroll bar when frames are showing. (4852280, stddoclet)
  • Bug fix: Newlines are no longer hard-coded as "\n". (4938109, stddoclet)
  • Bug fix: Table border added around class headings in constant value summary. (4904025, stddoclet)
  • Bug fix: Now prints certain HTML source comments conditionally (4904038, stddoclet)
Navigation Bar
  • Bug fix: An extra column no longer appears in the first row of the navbar. (4664607, stddoclet, 1 vote)
  • Bug fix: Package link is now active when documenting only one package. (4689286, stddoclet)
  • Bug fix: Next/Prev Class links now iterate through all interfaces and classes in current package. (4131628, stddoclet)

Accessibility

  • Bug fix: Table headings now use
    . (4905786, stddoclet)
    • Bug fix: Missing space added at end of alternate text for inherit.gif. (4956908, stddoclet)
    Running Javadoc
    • Bug fix: No longer get InvocationTargetException when a source flie links to another source file in the wrong directory. (4835749, stddoclet)
    • Bug fix: (regression) No longer fails on internal classes, as it worked in 1.4.1. (4843578, tool)

    Error/Warning/Notice Messages

    • New feature: Now warns when @return tag is present in void method. (4490068, stddoclet)
    • New feature: Now displays message when creating new destination directory (4657239, stddoclet)
    • Bug fix: BreakIterator warnings no longer appear. For more information, see above. (4959985, tool)
    • Bug fix: The "first sentence" warning is no longer split between stderr and stdout. (4753853, tool)
    • Bug fix: DocLocale.java implementation has been modified to allow for proper translation. (4780921, tool)
    • Bug fix: Now uses DocletErrorReporter to print option errors, rather than MessageRetriever. (4927928, stddoclet)
    • Bug fix: Message no longer says "error" when it's really a warning for a missing package-list file. (4625883, stddoclet)
    Doclet API
    • New feature: Added support for generics, enums, and varargs in the javadoc tool front-end (Doclet API) (4421066, tool) and standard doclet (4789689, stddoclet)
    • New feature: Added support for annotations and annotation types in the javadoc tool front-end (Doclet API) (4904495, tool) and standard doclet (4905985, stddoclet)
    • New feature: Add Doclet.languageVersion method to determine which version of Java source code the doclet was written for. (4909767, tool)

    Standard Doclet Implementation

    • Bug fix: Re-implemented standard doclet to maximize shared code for doclets emulating the stddoclet (4638723, stddoclet)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, Java SE 7

The following describes the changes and enhancements made for Javadoc tool in Java SE 7.

HTML documents generated by the Javadoc tool conform to the HTML 4.01 Transitional DTD (Document Type Definition). However, the Javadoc tool does not currently ensure that HTML fragments in Javadoc comments, or option values specified by the user, conform to this DTD.

Generated HTML documents are also compliant to the Electronic and Information Technology Accessibility Standards (Section 508) specification. Similarly, the Javadoc tool does not currently ensure compliance to this standard of any user-specified HTML fragments.

The look-and-feel of HTML documents generated by the Javadoc tool has been updated for this release. This is accomplished by using CSS (Cascading Style Sheets) files. You can change the look-and-feel of your API documentation by changing the CSS file. Future updates and releases of the JDK may include additional look-and-feel options through CSS files. The defalt stylesheet.css file can be found in the API documentation.

The -stylesheetfile <path> option can be used to specify a stylesheet other than the default.

For more information, see the following RFEs: 7052425 and 6851834.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Javadoc, JDK 8

Documentation Contents

Enhancements in Javadoc, Java SE 8

The following new APIs were added to the Javadoc tool in Java SE 8:

  • The new DocTree API involves the introduction of a scanner that enables you to traverse source code that is represented by an abstract syntax tree. This extends the Compiler Tree API to provide structured access to the content of javadoc comments. For more information, see JEP 105.

  • Javadoc Access API - The javax.tools package contains classes and interfaces that enable you to invoke the Javadoc tool directly from a Java application, without executing a new process. For more information, see JEP 106.

  • Grouping Methods By Type- The "Method Summary" section of the generated documentation of a class or interface has been restructured. Method descriptions in this section are grouped by type. By default, all methods are listed. You can click a tab to view methods of a particular type (static, instance, abstract, concrete, or deprecated, if they exist in the class or interface).
  • The javadoc tool now has support for checking the content of javadoc comments for issues that could lead to various problems, such as invalid HTML or accessibility issues, in the files that are generated by javadoc. The feature is enabled by default, and can also be controlled by the new -Xdoclint option. For more details, see the output from running "javadoc -X". This feature is also available in javac, although it is not enabled by default there.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Javadoc Technology

Javadoc is a tool that parses the declarations and documentation comments in a set of source files and produces a set of HTML pages describing the classes, interfaces, constructors, methods, and fields.

You can use a Javadoc doclet to customize Javadoc output. A doclet is a program written with the Doclet API that specifies the content and format of the output to be generated by the tool. You can write a doclet to generate any kind of text file output, such as HTML, SGML, XML, RTF, and MIF. Oracle provides a standard doclet for generating HTML-format API documentation. Doclets can also be used to perform special tasks not related to producing API documentation.

A taglet is a program that allows you to create and use custom tags that are more flexible than custom tags created with the -tag option. A custom tag is used by a doclet to format and display text from a Javadoc tag. A taglet must implement the taglet interface.

API Specifications

The following are APIs related to Javadocs:

  • Doclet API - The com.sun.javadoc package contains the Doclet API.
  • Taglet API - The com.sun.tools.doclets.Taglet class contains the Taglet API.
  • Doctree API - The package com.sun.source.doctree contains the Doctree API. This API enables you to traverse Javadoc comments as abstract syntax trees.
  • Javadoc Access API - The package javax.tools contains the Javadoc Access API. This API enables you to invoke the Javadoc tool directly from a Java application without executing a new process.

Tools

The following pages list all Javadoc tags and command-line options for running the Javadoc tool, with examples for the Solaris and Microsoft Windows operating systems:
  • Javadoc Tool Reference Page (Solaris, Linux, or Mac OS X)
  • Javadoc Tool Reference Page (Microsoft Windows)

Tutorials and Programmer's Guides

This section contains tutorials and guides for Javadoc APIs:

  • Doclet Overview - This introduction to standard doclets includes simple examples that illustrate the Doclet API.
  • Running the Standard Doclet - This doclet produces the default HTML-formatted API documentation. Javadoc uses the standard doclet if no other doclet is specified with the Javadoc -doclet option.
  • Transitioning to the 5.0 Doclet API - This document provides tips to extend legacy doclets to support 5.0 new language features.
  • Taglet Overview - This introduction to taglets includes simple examples that illustrate the Taglet API.

API Enhancements

The following lists features and enhancements for Javadoc in given releases:

  • Enhancements in Javadoc, Java SE 8
  • Enhancements in Javadoc, Java SE 7
  • Enhancements in Javadoc, Java SE 5.0
  • Enhancements in Javadoc, Java SE 1.4.2

More Information

For more information visit the following:

  • Deprecation in an API - Learn what deprecated APIs are and how to deprecate APIs in the documentation generated by the Javadoc tool.
  • Javadoc FAQ - Review important tips and workarounds for bugs.
  • Javadoc Forum - Enter into discussions with fellow developers. This forum is monitored only occasionally by the Javadoc team.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deprecation of APIs

A deprecated API is one that you are no longer recommended to use, due to changes in the API. While deprecated classes, methods, and fields are still implemented, they may be removed in future implementations, so you should not use them in new code, and if possible rewrite old code not to use them.

Guide

How and When to Deprecate APIs

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


How and When To Deprecate APIs

  • What "Deprecated" Means
  • When to Deprecate
  • How to Deprecate
    • Using the @Deprecated Annotation
    • Using the @deprecated Javadoc Tag

What "Deprecated" Means

You may have heard the term, "self-deprecating humor," or humor that minimizes the speaker's importance. A deprecated class or method is like that. It is no longer important. It is so unimportant, in fact, that you should no longer use it, since it has been superseded and may cease to exist in the future.

Java provides a way to express deprecation because, as a class evolves, its API (application programming interface) inevitably changes: methods are renamed for consistency, new and better methods are added, and fields change. But such changes introduce a problem. You need to keep the old API around until developers make the transition to the new one, but you don't want them to continue programming to the old API.

The ability to deprecate a class, method, or member field solves the problem. Java supports two mechanisms for deprecation: and an annotation, (supported starting with J2SE 5.0) and a Javadoc tag (supported since 1.1). Existing calls to the old API continue to work, but the annotation causes the compiler to issue a warning when it finds references to deprecated program elements. The Javadoc tag and associated comments warn users against using the deprecated item and tell them what to use instead.

When to Deprecate

When you design an API, carefully consider whether it supersedes an old API. If it does, and you wish to encourage developers (users of the API) to migrate to the new API, then deprecate the old API. Valid reasons to deprecate an API include:

  • It is insecure, buggy, or highly inefficient
  • It is going away in a future release
  • It encourages bad coding practices

Deprecation is a reasonable choice in all these cases because it preserves "backward compatibility" while encouraging developers to change to the new API. Also, the deprecation comments help developers decide when to move to the new API, and so should briefly mention the technical reasons for deprecation.

It is not necessary to deprecate individual member fields (properties) of a deprecated class, unless of course you want to explain a specific point about a property.

How to Deprecate

Starting with J2SE 5.0, you deprecate a class, method, or field by using the @Deprecated annotation. Additionally, you can use the @deprecated Javadoc tag tell developers what to use instead.

Using the annotation causes the Java compiler to generate warnings when the deprecated class, method, or field is used. The compiler suppresses deprecation warnings if a deprecated item is used within an entity which itself is deprecated or is used within the same outermost class or is used in an entity that is annotated to suppress the warning.

You are strongly recommended to use the Javadoc @deprecated tag with appropriate comments explaining how to use the new API. This ensures developers will have a workable migration path from the old API to the new API. For more information, see Using the @deprecated Javadoc Tag.

NOTE: The Java Language Specification requires compilers to issue warnings when classes, methods, or fields marked with the @Deprecated annotation are used. Compilers are not required by the Java Language Specification to issue warnings when classes, methods, or fields marked with the @deprecated Javadoc tag are accessed, although the Sun compilers currently do so. However, there is no guarantee that the Sun compiler will always issue such warnings.

Using the @Deprecated Annotation

J2SE 5.0 introduces a new language feature called annotations (also called metadata). One of the Java language's built-in annotations is the @Deprecated annotation. To use it, you simply precede the class, method, or member declaration with "@Deprecated."

Using the @Deprecated annotation to deprecate a class, method, or field ensures that all compilers will issue warnings when code uses that program element. In contrast, there is no guarantee that all compilers will always issue warnings based on the @deprecated Javadoc tag, though the Sun compilers currently do so. Other compilers may not issue such warnings. Thus, using the @Deprecated annotation to generate warnings is more portable that relying on the @deprecated Javadoc tag.

In addition, the @Deprecated annotation causes the javadoc-generated documentation to be marked "Deprecated" wherever that program element appears.

NOTE: Deprecation applies to classes and to individual methods or properties, not to their names. It is possible for a single method to have deprecated and non-deprecated overloadings. It is possible for a non-deprecated property to hide or override a deprecated one, which removes deprecation. As developer of an API, it is your responsibility to deprecate overrides of a deprecated method, if in fact they should be deprecated.

Example

The following is a simple example of using the @Deprecated annotation from java.lang.Thread:

public
class Thread implements Runnable {
...
@Deprecated
    public final void stop() {
  synchronized (this) {
...

Using the @deprecated Javadoc Tag

You can use the @deprecated tag to make Javadoc show a program element as deprecated. The @deprecated tag must be followed by a space or newline. In the paragraph following the @deprecated tag, explain why the item has been deprecated and suggest what to use instead.

Javadoc generates special HTML based on @deprecated tags: it moves the paragraph following the @deprecated tag to the front of the description, placing it in italics and preceding it with a warning, "Note: foo is deprecated", in bold. It also adds "Deprecated" in bold to any index entries mentioning the deprecated entity.

The tagged paragraph can be empty, but empty deprecation paragraphs are bad form, because they do not help the user fix the warnings that arise from the deprecation. Include paragraphs marked with @link or @see tags that refer to the new versions of the same functionality. It is usually not a good idea to mention a timetable for phase-out of the deprecated API; this is a business decision that is best communicated other ways.

For more information on using the @deprecated Javadoc tag, see Javadoc - The Java API Documentation Generator.

Example

The following examples show how to use the @deprecated Javadoc tag. They also illustrate the @Deprecated annotation, to emphasize that the two should be used together.

Here is an example of the most common form of a deprecated method (for Javadoc 1.2 and later):

/**
 * @deprecated  As of release 1.3, replaced by {@link #getPreferredSize()}
 */
@Deprecated public Dimension preferredSize() {
return getPreferredSize();
}

If the API reorganization was more than renaming, the deprecation may be more complex. Here is an example of a method that is being retracted:

/**
 * Delete multiple items from the list.
 *
 * @deprecated  Not for public use.
 *    This method is expected to be retained only as a package
 *    private method.  Replaced by
 *    {@link #remove(int)} and {@link #removeAll()}
 */
@Deprecated public synchronized void delItems(int start, int end) {
...
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The @deprecated Tag

"@deprecated": Mechanical Help for Abandoning Old APIs

John R. Rose
Oct 4, 1996

Problem:

Java 1.1 introduces many new APIs, some of which supersede older ones. The new and old APIs co-exist in the same packages. The superseded ones add various difficulties to the programmer's job, the chief being the need to ignore and avoid them in most cases.

Partial Solution: If we mark superseded classes, methods, and fields clearly and unambiguously as "deprecated", the programmers will know where to concentrate their attention. Also, the compiler will be able to help with this process, by bringing unintentional uses of deprecated APIs to the programmer's attention.

Details:

Within documentation comments, we define the new paragraph tag "@deprecated". (See the Java Language Specification.) It can appear in both class and member documentation comments, and will apply specifically the construct its comment introduces.

The tagged paragraph can be empty. If it is not, it should tell the programmer how to avoid using the deprecated feature.

There should be "@see" tagged paragraphs which refer to the new versions of the same functionality.

As far as the compiler is concerned, the presence of the string "@deprecated" at the beginning of a documentation comment line (except for whitespace) causes it to place a "Deprecated" attribute in the output classfile for the corresponding class, field, or method.

Moreover, in parallel with the access checking logic for classes and members, the compiler looks for "Deprecated" attributes of classes and members being accessed, and issues warnings when the deprecated classes or members are used.

Note that deprecation applies to classes and to individual members, not to their names. It is possible for a single method to have deprecated and non-deprecated overloadings. It is possible for a non-deprecated member to hide or override a deprecated one, which removes deprecation. It is the responsibility of the programmer to deprecate overrides of a deprecated method, if in fact they should be deprecated.

A deprecation warning is suppressed if the compilation unit containing the deprecation is being compiled at the same time as the compilation unit using the deprecated class or member. This allows legacy APIs to be built without warnings. There currently is no other way to suppress the deprecation warnings.

A hypothetical "-strict" option to the compiler could promote all warnings, including deprecation warnings, to hard errors. This is not in 1.1.

Javadoc should somehow highlight deprecation paragraphs, and perhaps should place a characteristic glyph next to references to deprecated names.

Practice:

Here is an example of the most common form of a deprecated method:

    /**
     * @deprecated
     * @see #getPreferredSize
     */
    public Dimension preferredSize() {
        return getPreferredSize();
    }
(Notes: The "@deprecated" tag must be followed by a space or newline. The "@see" tag must be at the beginning of the line. See the Java Language Specification.)

If the deprecation is a simple renaming, there is no need to say something like "this method is replaced by getPreferredSize"; the "@see"-tagged paragraph points the user to the replacement.

The deprecation may be more complex if the API was reorganized by other than a renaming of features. Here is an example of a method that is being retracted:

    /**
     * Delete multiple items from the list.
     *
     * @deprecated  Not for public use in the future.
     * This method is expected to be retained only as a package
     * private method.
     * @see #remove(int)
     * @see #removeAll()
     */
    public synchronized void delItems(int start, int end) {
    ...
    }
Designers of new 1.1 APIs should carefully consider whether they are superseding old APIs. For each such API, if they wish to encourage users of the old previous API to migrate to the new API, they should add a deprecation paragraph to the documentation comment. Empty deprecation paragraphs are bad form, because they do not help the user fix the warnings that arise from the deprecation.

Valid reasons for wishing one's users to migrate to the new API include:

  • the old API is insecure, buggy, or highly inefficient
  • the old API is going away in a future release
  • the old API encourages very bad coding practices

Not all of these reasons are of equal weight, yet deprecation is a reasonable (though not mandatory) choice in all these cases. Therefore, the use of deprecated APIs can never be made a hard error by default. Also, the deprecation comments need to help the user decide when to move to the new API, and so should briefly mention the technical reasons for deprecation.

(It is probably not good to specifically mention a timetable for phase-out of the deprecated API; this is a business decision that needs to be communicated other ways.)

It is not necessary to deprecate individual members of a deprecated class, unless of course the programmer wants to explain some specific point about one member.

When a feature is deprecated, it is a good idea to notify the engineering organization of this fact, so that other engineers can respond to the change (pro or con) in a timely manner.

Other Design Options:

This is the first time the compiler is in any way cognizant of document comment contents. (Once, it made sure that they were at the right place in the parse tree, but this is no longer true.) We did not lightly choose to make the compiler's behavior dependent on the contents of a comment.

One precedent for looking into comments is "lint", which uses comments like /*PRINTFLIKE2*/ to annotate C APIs.

Note that Java documentation comments are structured, and the structure is specified in the Java Language Specification. This means that we "own" the format of this particular sort of comment, so our design is somewhat more reasonable than the less-differentiated conventions used by lint.

We considered introducing pragmas, and using them for deprecation (e.g., <*deprecated*>) but this would open the door very wide to many sorts of incompatible extensions and, possibly, to serious abuses.

However, @deprecated does work like a pragma: It belongs in the source, expresses information about it, but does not modify its semantics. Unlike many pragmas, @deprecated is intended for a human audience.

The compiler emits warnings as a friendly and helpful reminder, but does not enforce any rules. It's up to the programmer to use the contents of the deprecation paragraph. Since the human is the primary user of the data, it belongs in comments.

We considered introducing a new keyword, something like "transient". This would solve the mechanical problem, but at the cost of modifying the language itself. In particular, we would have to take away an identifier from coders that we had not previously reserved (like "var"). Moreover, since the primary audience of deprecations is humans, a keyword-based approach is insufficient, and must be augmented by comment conventions, preferably ones which integrate with javadoc. Thus, the keyword approach does not pay.

Still, the compiler has heretofore ignored and should generally ignore documentation comments. This is an admittedly irregular exception to that practice. But the other design options for deprecation involve worse sorts of irregularity.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Doclet Overview

Contents

  • The Basics
  • A Simple Example Doclet
  • Example - Subclassing the standard doclet
  • Example - Creating and handling custom tags
  • Example - Using custom command-line options

The Basics

Doclets are programs written in the Java programming language that use the doclet API to specify the content and format of the output of the Javadoc tool. By default, the Javadoc tool uses the "standard" doclet provided by Oracle to generate API documentation in HTML form. However, you can supply your own doclets to customize the output of Javadoc as you like. You can write the doclets from scratch using the doclet API, or you can start with the standard doclet and modify it to suit your needs.

Here are the basic steps you need to follow to create and use your own doclet:

  1. Write the Java program that constitutes your doclet. Your program should import com.sun.javadoc.* in order to use the doclet API. The entry point of your program is a class with a public static boolean start method that takes a RootDoc as a parameter.
  2. Compile your doclet. You can use the compiler in the Java 2 SDK, javac.
  3. Run the javadoc tool using the -doclet startingclass option to produce the output specified by your doclet, where startingclass is the fully-qualified name of the starting class mentioned in step 1 above.
The doclet API class files are in the lib/tools.jar file in the SDK. When you compile a doclet, the tools.jar must be on the class path. You can use the -classpath option on javac for this purpose.

If you run javadoc without the -doclet command-line option, it will default to the standard doclet to produce HTML-format API documentation.

Package com.sun.javadoc consists of interfaces that define the doclet API. The lib/tools.jar file in the Java 2 SDK contains these interfaces and also a private package with classes that implement the interfaces. The tools.jar file also contains the classes implementing the standard doclet.

A Simple Example Doclet

You can get a feeling for the way doclets work by looking at this simple example doclet that consists of one short class:
import com.sun.javadoc.*;

public class ListClass {
    public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; ++i) {
            System.out.println(classes[i]);
        }
        return true;
    }
}
As you might be able to guess by looking at the code, this doclet takes the classes upon which Javadoc is operating and prints their names to standard out.

This first thing to notice about the doclet is that it imports the com.sun.javadoc package in order to use the doclet APIs. As with all doclets, the entry point is the public static boolean start method. The start method takes a RootDoc as a parameter. This parameter carries information about any options specified on the command line when javadoc is run, and also about the classes and packages upon which javadoc is operating.

RootDoc defines a classes method that returns a ClassDoc array whose elements represent the classes that Javadoc parses. The for loop then prints out the names of each class in the array. (Passing a ClassDoc to println results in the printing of the name of the class that the ClassDoc represents.)

To run this doclet, you first have to compile it. You can compile it with the javac compiler. The doclet API classfiles are in the file lib/tools.jar in the Java 2 SDK which javac does not automatically load. You therefore need to include tools.jar on the compiler's classpath, as in this example:

javac -classpath C:\jdk1.3\lib\tools.jar ListClass.java
To run the ListClass doclet, you point to the compiled doclet with Javadoc's -doclet and -docletpath tags. For example, to run the doclet on a file called MyClass.java, you could use this command, assuming ListClass.class is in the current directory:
% javadoc -doclet ListClass -docletpath .  MyClass.java
The output will be the string "MyClass". Note that this command does not require tools.jar to be on the class path, as the Javdoc tool automatically loads it.

A note about command-line options: If you run javadoc -help, you'll see that the Javadoc tool has two sets of command-line options. One set is generic and will work with any doclet. The second set of options is special to the standard doclet. Options in this second set will not be available when using custom doclets. Your custom doclets can also define their own command-line options. See the example below.

To generate API documentation, a doclet will have to be considerably more complex than this simple example. If you want to customize the format of the API documentation generated by Javadoc, you may want to start with the default standard doclet and modify it as necessary rather than write your own doclet from scratch.

Example - Subclassing the Standard Doclet

To customize the output of the Javadoc tool, you need to write your own doclet that specifies the content and format of the output that you desire. If you want HTML output with roughly the same format as the default output, you can use the standard doclet as a starting point for creating your doclet. You can subclass appropriate classes in the standard doclet and then add or override methods as necessary to produce the output you want. Or you can copy the whole standard doclet and modify it. If you use a copy of the standard doclet as your starting point, you may want to remove the package statements at the beginning of each source file and replace them with the name of your own, new package.

For an example, see How can I modify the standard doclet to produce links to source code from the API documentation?

Example - Creating and handling custom tags

Suppose, for example, that you want use a custom tag, say @mytag, in your documentation comments in addition to the standard tags like @param and @return. To make use of the information in your custom tags, you need to have your doclet use instances of Tag that represent your custom tags. One of the easiest ways to do that is to use the tags(String) method of Doc or one of Doc's subclasses. This method returns an array of Tag objects representing any tags whose name matches the string argument. For example, if method is an instance of MethodDoc, then
method.tags("mytag")
would return an array of Tag objects representing any @mytag tags in the method's documentation comment. You can then access the information in your @mytag tags with Tag's text method. That method returns a string representing the content of the tag which you can parse or use as needed. For example, if a documentation comment contained one of your custom tags like this:
@mytag Some dummy text.
then the text method would return the string "Some dummy text.".

Here's a standalone doclet (not a subclass of the standard doclet) that uses these ideas to print out the text associated with all instances of a specified tag that it finds in method comments. It could be extended to find all instances of that tag in all comments.

import com.sun.javadoc.*;

public class ListTags {
    public static boolean start(RootDoc root){
        String tagName = "mytag";
        writeContents(root.classes(), tagName);
        return true;
    }

    private static void writeContents(ClassDoc[] classes, String tagName) {
        for (int i=0; i < classes.length; i++) {
            boolean classNamePrinted = false;
            MethodDoc[] methods = classes[i].methods();
            for (int j=0; j < methods.length; j++) {
                Tag[] tags = methods[j].tags(tagName);
                if (tags.length > 0) {
                    if (!classNamePrinted) {
                        System.out.println("\n" + classes[i].name() + "\n");
                        classNamePrinted = true;
                    }
                    System.out.println(methods[j].name());
                    for (int k=0; k < tags.length; k++) {
                        System.out.println("   " + tags[k].name() + ": "
                            + tags[k].text());
                    }
                }
            }
        }
    }
}
The tag for which this doclet searches is specified by the variable tagName. The value of the tagName string can be any tag name, custom or standard. This doclet writes to standard out, but its output format could be modified, for example, to write HTML output to a file.

Example - Using custom command-line options

You can write doclets that accept custom command-line options. To see how that works, let's augment the example doclet above so that it allows you to use a command-line option to specify the tag name to search for.

Any doclet that uses custom options must have a method called optionLength(String option) that returns an int. For each custom option that you want your doclet to recognize, optionLength must return the number of separate pieces or tokens in the option. For our example, we want to be able to use the custom option of the form -tag mytag. This option has two pieces, the -tag option itself and its value, so the optionLength method in our doclet must return 2 for the -tag option. The optionsLength method should return 0 for unrecognized options.

Here's the full, augmented doclet:

import com.sun.javadoc.*;

public class ListTags {
    public static boolean start(RootDoc root){
        String tagName = readOptions(root.options());
        writeContents(root.classes(), tagName);
        return true;
    }

    private static void writeContents(ClassDoc[] classes, String tagName) {
        for (int i=0; i < classes.length; i++) {
            boolean classNamePrinted = false;
            MethodDoc[] methods = classes[i].methods();
            for (int j=0; j < methods.length; j++) {
                Tag[] tags = methods[j].tags(tagName);
                if (tags.length > 0) {
                    if (!classNamePrinted) {
                        System.out.println("\n" + classes[i].name() + "\n");
                        classNamePrinted = true;
                    }
                    System.out.println(methods[j].name());
                    for (int k=0; k < tags.length; k++) {
                        System.out.println("   " + tags[k].name() + ": " + tags[k].text());
                    }
                }
            }
        }
    }

    private static String readOptions(String[][] options) {
        String tagName = null;
        for (int i = 0; i < options.length; i++) {
            String[] opt = options[i];
            if (opt[0].equals("-tag")) {
                tagName = opt[1];
            }
        }
        return tagName;
    }

    public static int optionLength(String option) {
        if(option.equals("-tag")) {
            return 2;
        }
        return 0;
    }

    public static boolean validOptions(String options[][],
                                       DocErrorReporter reporter) {
        boolean foundTagOption = false;
        for (int i = 0; i < options.length; i++) {
            String[] opt = options[i];
            if (opt[0].equals("-tag")) {
                if (foundTagOption) {
                    reporter.printError("Only one -tag option allowed.");
                    return false;
                } else {
                    foundTagOption = true;
                }
            }
        }
        if (!foundTagOption) {
            reporter.printError("Usage: javadoc -tag mytag -doclet ListTags ...");
        }
        return foundTagOption;
    }
}
In this modified doclet, the variable tagName is set with the command-line option -tag. It has a optionLength method returns two for our custom option. Note that an explicit call to optionLength isn't required.

This doclet also adds the readOptions methods that actually parses the command-line options looking for the -tag option. It makes use of the fact that the Rootdoc.options method returns a two-dimensional String array containing option information. For example, given the command

javadoc -foo this that -bar other ...
the RootDoc.options method will return
options()[0][0] = "-foo"
options()[0][1] = "this"
options()[0][2] = "that"
options()[1][0] = "-bar"
options()[1][1] = "other"
The number of elements in the array's second index is determined by the optionLength method. In this example, optionLength returns 3 for option -foo and returns 2 for option -bar.

The validOptions method is an optional method that you can use to test the validity of the usage of command-line tags. If the validOptions method is present, it is automatically invoked; you don't have to explicitly call it. It should return true if the option usage is valid, and false otherwise. You can also print appropriate error messages from validOptions when improper usages of command-line options are found. The validOptions method in this example doclet checks that the -tag option is used once and only once.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Transitioning to 1.5 Doclet API

Introduction Notes

It is assumed that the doclet developer has read the documentation on new 1.5 language features and is aware of the doclet changes required to support the new features. This document only assists the developer in making those changes. It does not define all the new language features in 1.5.

Indicate That Your Doclet Supports 1.5 Source

Class com.sun.javadoc.Doclet has a new method that allows doclets to indicate which version of Java Programming Language is supported:

Doclet.languageVersion()

By default, this method returns LanguageVersion.JAVA_1_1. You should override this method and return LanguageVersion.JAVA_1_5.

Ensure That Your Doclet Handles Primitives Properly

Given a Type, most doclets distinguish between classes and primitives by using the following check:
   // If true, Type must be a primitive
   Type.asClassDoc() == null
In 1.5, this no longer works because there are other non-classdoc types besides primitives. For example, the asClassDoc method would return null for annotation types as well. You should find all occurances of ?Type.asClassDoc() == null? and replace it with Type.isPrimitive().

Use ClassDoc.superclassType() Instead of ClassDoc.superclass()

ClassDoc.superclass() cannot accommodate certain generic type constructs. The superclassType() method should be used instead.

Use ClassDoc.interfaceTypes() Instead of ClassDoc.interfaces()

ClassDoc.interfaces() cannot accommodate certain generic type constructs. The interfaceTypes() method should be used instead.

Type Parameters

When processing ClassDocs and ExecutableMemberDocs, call method typeParameters() to retrieve the formal type parameters. Each parameter can be processed in a similar way that regular types are processes. The only difference is that type parameters have bounds that need to be documented. The bounds are retrieved by calling TypeVariable.bounds().

Here is the interface that represents a type variable:

com.sun.javadoc.TypeVariable

Here is the algorithm that the standard doclet uses to process type parameters:

if (type.asTypeVariable()!= null) {
    Doc owner = type.asTypeVariable().owner();
    if (owner instanceof ClassDoc) {
        // Generate Link to type Parameter
    } else {
        // No need to link method type parameters.
        // Append the name of the type parameter
    }

    Type[] bounds = type.asTypeVariable().bounds();
    if (! linkInfo.excludeTypeBounds) {
        for (int i = 0; i < bounds.length; i++) {
            // If i greater than 0, append " & ".  Otherwise, append " extends "
            // Generate a link to the bound
        }
    }
}

Param Tags For Type Parameters

A doclet retrieves @param tags from constructors and methods by calling ExecutableMemberDoc.paramTags(). Since classes, constructors and methods can have type parameters, the @param tag may be used to document these type parameters. They are distinguished by having angle brackets around the names. For example:
/**
 * @param <E> the type parameter for this class.
 */
public class Foo<E>
To retrieve these type parameter @param tags, call ClassDoc. typeParamTags() or ExecutableMemberDoc.typeParamTags().

Type parameter tags can be distinguished from regular parameter tags by calling ParamTag.isTypeParameter().

Annotation Types

An annotation type is distinguished from classes and interfaces by calling the isAnnotationType() method. Here is the interface that represents an annotation type:

com.sun.javadoc.AnnotationTypeDoc

Retrieve the annotation type elements by calling method elements(). There are two types of elements:

  • An optional element. If the user does not specify a value for this element, it is set to a specified default value.
  • A required element. The user must specify a value for this element when using the annotation.
There is no way to retrieve an exactly list of optional and required elements from the doclet API. The doclet must manually interate through the array of elements and check the default value is null. If it is null, the element is required.

Annotation Type Usage

When processing a ProgramElementDoc, the annotation() method should be called to retrieve the annotations used. Here is the interface that encapsulates annoation usage information:

com.sun.javadoc.AnnotationDesc

Iterate through the list of AnnotationDesc objects and process each one. Here is the algorithm that the standard doclet uses to process AnnotationDesc objects:

for (int i = 0; i < descList.length; i++) {
    AnnotationTypeDoc annotationDoc = descList[i].annotationType();
    if (/**annotationDoc does not have @documented annotation**/){
        // ONLY document annotations if they have @documented.
        continue;
    }
    // Generate a link to the annotation.  Start with the ?@? character>
    AnnotationDesc.ElementValuePair[] pairs =
        descList[i].elementValues();
    if (pairs.length > 0) {
        // Append '(' to indicate start of element list>
        for (int j = 0; j < pairs.length; j++) {
              if (j > 0) {
                // Append ',' to separate previous element from the next>
            }
            // Generate a link to the annotation element>
            // Append '=' to separate element name from value>
            AnnotationValue annotationValue = pairs[j].value();
            List annotationTypeValues = new ArrayList();
            if (annotationValue.value() instanceof
                     AnnotationValue[]) {
                 AnnotationValue[] annotationArray =
                 (AnnotationValue[]) annotationValue.value();
                 for (int k = 0; k < annotationArray.length; k++) {
                    annotationTypeValues.add(annotationArray[k]);
                 }
           } else {
               annotationTypeValues.add(annotationValue);
           }
           // Append '{' if this is an array of values
           for (Iterator iter =
               annotationTypeValues.iterator();
               iter.hasNext(); ) {
               // Append string representation of value
               // Append ?,? if there is more to append
           }
           // Append '}' if this is an array of values
       }
       // Append ')' if this is an array of values
    }
}
Here is a sample of this output:

java.lang.annotation.Target

An annotation value can be any of the following:

  • Type
  • Array Type
  • Primitive
  • Nested Annotation
  • MemberDoc
  • String
Here is the algorithm that the standard doclet uses to convert an annotation to a string:
if (annotationValue.value() instanceof Type) {
    Type type = (Type) annotationValue.value();
    if (type.asClassDoc() != null) {
        LinkInfoImpl linkInfo = new LinkInfoImpl(
           LinkInfoImpl.CONTEXT_ANNOTATION, type);
        linkInfo.label = (type.asClassDoc().isIncluded() ?
            type.typeName() :
            type.qualifiedTypeName()) + type.dimension() + ".class ";
        return getLink(linkInfo);
    } else {
        return type.typeName() + type.dimension() + ".class";
    }
} else if (annotationValue.value() instanceof AnnotationDesc) {
    // Handle nested annotations using recursion.
    List list = getAnnotations(
        new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
            false);
    StringBuffer buf = new StringBuffer();
    for (Iterator iter = list.iterator(); iter.hasNext(); ) {
        buf.append(iter.next());
    }
    return buf.toString();
} else if (annotationValue.value() instanceof MemberDoc) {
    // Simply link to the member being references in the annotation.
    return getDocLink(LinkInfoImpl.CONTEXT_ANNOTATION,
        (MemberDoc) annotationValue.value(),
        ((MemberDoc) annotationValue.value()).name(), false);
} else {
    return annotationValue.toString();
}

Enums

An enum is distinguished from classes and interfaces by calling the isEnum() method. To retrieve the list of enum constants to be documented, call the enumConstants() method. The enum constants are returned as an array of FieldDoc objects. An enum constant can be distinguished from a regular field by calling isEnumConstant().

Here is a sample of Enum documentation:

java.lang.management.MemoryType.html

Varable Arguments

When processing an ExecutableMemberDoc, call isVarArg() to determine if the last constructor/method parameter is a var arg. If it is, the last parameter requires special handling. Here is the extra code that the standard doclet executes for var args:
if (isVarArg) {
    if (type.dimension().length() > 2) {
        // Doclet API returns var args as array.
        // Strip out the first [] from the var arg.
        // Append type.dimension().substring(2)
    }
    // Append "..."
} else {
    // Append type.dimension()
}
This code should be inserted in the place where you normally document array dimensions. Please note the comment that var args are returned as arrays by the doclet API. We strip out the first ?[]? because it is just a part of the internal representation of the var arg and should not appear in the documetation.

Wild Cards

Here is the interface that represents the wild card type:

com.sun.javadoc.WildcardType

When a wild card is encountered, iterate through the lists of extends and super bounds. Process each bound the same way you would process a regular type. Here is the algorithm the standard doclet uses to process wild cards:

if (type.asWildcardType() != null) {
    WildcardType wildcardType = type.asWildcardType();
    Type[] extendsBounds = wildcardType.extendsBounds();
    for (int i = 0; i < extendsBounds.length; i++) {
        // If i greater than 0, append " , ".  Otherwise, append " extends "
        // Generate link to extendsBounds[i])
    }
    Type[] superBounds = wildcardType.superBounds();
    for (int i = 0; i < superBounds.length; i++) {
        // If i greater than 0, append " , ".  Otherwise, append " super "
        // Generate link to superBounds[i])
    }
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Taglet Overview

Contents

  • Taglet API
  • Writing a Taglet
  • Example - A Simple Block Taglet
  • Example - A Block Taglet That Handles Inline Tags
  • Example - An Inline Taglet
  • Handling Errors and Warnings

Taglet API

Taglets are programs written in the Java™ programming language that implement the Taglet API. Taglets support both block tags, such as @todo, and inline tags, such as {@underline}. (See block and inline tags.) The Taglet API consists of one interface and two abstract classes:
  • Taglet API
    Taglet Interface
    Implement when writing a block taglet that does not need to support inline tags, or when writing a general inline tag
    BaseExecutableMemberTaglet class
    Extend when writing a block taglet that supports inline tags
    BaseInlineTaglet class
    Extends when writing an inline tag that needs access to the HtmlStandardWriter and/or the doc object
A taglet can modify and format the text argument of a custom tag, and it can redirect the text to a file or other stream. A taglet can override a standard tag.

Taglets are a the foundation beneath the -tag option. When you use the -tag option, it uses a built-in taglet to generate default HTML formatting that is similar to that generated for @return.

Writing a Taglet

Choose which type of taglet you want to write, and implement the appropriate interface or extend the appropriate abstract class:
  • Block taglets
    • that support inline tags - extend BaseExecutableMemberTaglet
    • that do not support inline tags - implement Taglet
  • Inline taglets
    • general inline tags - implement Taglet
    • that need access to the HtmlStandardWriter or Doc object - extend BaseInlineTag
The BaseExecutableMemberTaglet class extends Taglet to provide the additional functionality to support inline tags. It supports both standard inline tags, such as {@link} and {@docroot}, and custom inline tags you might write.

If you write an inline tag that needs access to the HtmlStandardWriter or the Doc object, it should extend BaseInlineTag. For example, the {@value} inline tag needs the Doc object to retrieve the constant value from the field. Most tags only need the HtmlStandardWriter to report errors using the doclet error reporting methods.

Here are the basic steps you need to follow to create and use your own taglet:

  1. Write the Java program that constitutes your taglet. Include import statements appropriate to the taglet you're writing. For example, if extending BaseExecutableMemberTaglet, your program should import the following:
    import com.sun.tools.doclets.Taglet;                                        // Taglet API
import com.sun.tools.doclets.standard.tags.BaseExecutableMemberTaglet;      // For inline tags
import com.sun.tools.doclets.standard.HtmlStandardWriter;                   // For error reporting
import com.sun.javadoc.*;                                                   // Doclet API
import java.util.Map;                                                       // Used in register(Map)
    The Tag interface used in toString(Tag) is part of the Doclet API.
  2. In addition to the requirements of the interface you are implementing or abstract class you are extending, your program must implement the following static method. Then enables the taglet to be loaded at runtime. See the example below.
        public static void register(Map tagletMap)
    Your class must also implement the requirements of the interface it extends or class it implements. The toString method is where all of the custom work is implemented to modify, format or redirect the text argument passed in to your custom tag.
        toString(Doc, HtmlStandardWriter)
  3. Compile your doclet. Use javac compiler version 1.4.0 (or later) in the Java 2 SDK. The required class files are in the lib\tools.jar file in the SDK. For the first example below, assuming the SDK is installed at C:\Program Files\j2sdk1.4.0.
       javac -classpath "C:\Program Files\j2sdk1.4.0\lib\tools.jar"  ToDoTaglet.java
  4. Run the javadoc tool using the -taglet and -tagletpath options. For example, if your taglet class file is defined to be in package com.sun and is stored in C:\taglets\com\sun\Taglet.class, then you should set tagletpath to C:\taglets. This example calls javadoc on package com.package1, including ToDoTaglet tags:
       javadoc -taglet ToDoTaglet -tagletpath C:\taglets com.package1

The following are examples of block and inline taglets.

Example - A Simple Block Taglet

The source code for an example of a block taglet implementing @todo is included at:

  • ToDoTaglet.java

The corresponding class file ToDoTaglet.class is already compiled and saved in the same directory as this source file.

To run the doclet, include the -tagletpath and -taglet options. Assuming the ToDoTaglet.class is located in /home/user/taglet, and the @todo tag is located in the Test.java file:

% javadoc -d html -tagletpath /home/user/taglet -taglet ToDoTaglet ./Test.java
If the file Test.java contains the following doc comment:
    /**
     * @todo Fix this!
     */
then the ToDo taglet formats the HTML output as follows:
To Do:
Fix this!

Implementation Description

Let's look at the source code. To name the tag and define the header text, define two private fields:
    private static final String NAME = "todo";
    private static final String HEADER = "To Do:";
To make this a block tag rather than an inline tag, you set isInlineTag to return false:
    public boolean isInlineTag() {
        return false;
    }
There are other methods inField, inMethod, inType, inPackage and inOverview that you specify true or false to indicate in which doc comments in the source code this tag can be used.

The toString(Tag) method determines how the text is inserted into the output when a single {@todo} tag is encountered. This code creates a bold heading followed by a table with a yellow background that contains the text (specified by tag.text()).

    public String toString(Tag tag) {`
        return "<DT><B>" + HEADER + "</B><DD>"
               + "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
               + tag.text()
               + "</td></tr></table></DD>\n";
    }
Similarly, the toString(Tag[]) method (which takes an array of tags) determines how the text is inserted into the output when multiple {@todo} tags are encountered.

Example - A Block Taglet That Handles Inline Tags

The source code for an example of a block taglet implementing @todo is included at:

  • ToDoTagletWithInline.java
The corresponding class file ToDoTaglet.class is already compiled and saved in the same directory as this source file.

To run the doclet, include the -tagletpath and -taglet options. Assuming the ToDoTaglet.class is located in /home/user/taglet, and the @todo tag is located in the Test.java file:

% javadoc -d html -tagletpath /home/user/taglet -taglet ToDoTaglet ./Test.java
If the file Test.java contains the following doc comment:
    /**
     * @todo Fix this!
     */
then the ToDo taglet formats the HTML output as follows:
To Do:
Fix this!

Implementation Description

Let's look at the source code. To name the tag and define the header text, define two private fields:
    private static final String NAME = "todo";
    private static final String HEADER = "To Do:";
To make this a block tag rather than an inline tag, you set isInlineTag to return false:
    public boolean isInlineTag() {
        return false;
    }
There are other methods inField, inMethod, inType, inPackage and inOverview that you specify true or false to indicate in which doc comments in the source code this tag can be used.

The toString(Tag) method determines how the text is inserted into the output when a single {@todo} tag is encountered. This code creates a bold heading followed by a table with a yellow background that contains the text (specified by tag.text()).

    public String toString(Tag tag) {`
        return "<DT><B>" + HEADER + "</B><DD>"
               + "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
               + tag.text()
               + "</td></tr></table></DD>\n";
    }
Similarly, the toString(Tag[]) method (which takes an array of tags) determines how the text is inserted into the output when multiple {@todo} tags are encountered.

Example - An Inline Taglet

Unline block tags, a custom inline tag can only be implemented using a taglet (rather than using the -tag option). This is because there is no default behavior for inline tags.

The source code for an example of an inline taglet implementing {@underline} is included at:

  • UnderlineTaglet.java
The corresponding class file UnderlineTaglet.class is already compiled and saved in the same directory as this source file.

This taglet formats the output for the {@underline} tag. A doc comment containing the following tag:

    /**
     * Be sure to insert the value at the {@underline start} of the array.
     */
would be output in HTML as follows:

Be sure to insert the value at the start of the array.

Implementation Description

Let's look at how this source code differs from the previous example. Of course the tag name is different (and inline tags have no heading, so none is defined):
    private String NAME = "underline";
To define this as an inline tag rather than a block tag, you set isInlineTag to return true:
    public boolean isInlineTag() {
        return true;
    }

The methods inField, inMethod, inConstructor, inType, inPackage and inOverview apply only to block tags and must all be set to false for inline tags.

The toString(Tag) method determines how the text is inserted into the output when an {@underline} tag is encountered. This code creates surrounds the text with the HTML underline tags <ul> and </ul>.

    public String toString(Tag tag) {
        return "<u>" + tag.text() + "</u>";
    }

It is not possible to have an array of inline tags to process, like it is with block tags. Therefore, the toString(Tag[]) method (which takes an array of tags) is ignored for inline tags.

Handling Errors and Warnings

Errors - A taglet can report an error and stop the Javadoc tool by simply printing the error message and then calling System.exit().

Warnings - A taglet can report a warning using a MessageRetriever given to it by the Doclet instance. The MessageRetriever is obtained from the Configuration object. The Configuration object is obtained from the doclet. For example, if the Taglet is designed to be used with the Standard doclet, the Configuration can be retrieved using Standard.configuration(), a static method. As an example, this is how the SimpleTaglet prints warnings, which is the default taglet for the -tag option.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Taglet Overview

Contents

  • Taglet API
  • Writing a Taglet
  • Example - A Block Taglet
  • Example - An Inline Taglet
  • Handling Errors and Warnings

Taglet API

Taglets are programs written in the Java™ programming language that implement the Taglet API. Taglets can be written as either block tags, such as @todo, or inline tags, such as {@underline}. Block taglets do not currently support inline tags in their text. (See block and inline tags.) The Taglet API consists of one interface:
  • Taglet interface
A taglet can modify and format the text argument of a custom tag, and do other things, such as redirect the text to a file or other stream. A taglet can override a standard tag.

Taglets are the foundation beneath the -tag option. When you use the -tag option, it uses a built-in taglet to generate default HTML formatting that is similar to that generated for @return.

Writing a Taglet

Here are the basic steps you need to follow to create and use your own taglet:

  1. Write the Java program that constitutes your taglet. Your program should import the following:
       import com.sun.tools.doclets.Taglet;    // Taglet API
   import com.sun.javadoc.*;               // Doclet API
   import java.util.Map;                   // Used in register(Map)
    The com.sun.javadoc classes must be imported for the Tag interface used in toString(Tag).
  2. Your class must implement the requirements of the interface it extends. The toString method is where all of the custom work is implemented to modify, format or redirect the text argument passed in to your custom tag.
        public String toString(Tag tag)
  3. In addition to the requirements of the interface you are implementing, your program must implement the following static method. Then enables the taglet to be loaded at runtime. See the source code in the example below.
        public static void register(Map tagletMap)
  4. Compile your doclet. Use javac compiler version 1.4.0 (or later) in the JDK. The required class files are in the lib\tools.jar file in the JDK. For the first example below, assuming the JDK is installed at C:\Program Files\j2sdk1.4.1.
       javac -classpath "C:\Program Files\j2sdk1.4.1\lib\tools.jar"  ToDoTaglet.java
  5. Run the javadoc tool using the -taglet and -tagletpath options. For example, if your taglet class file is defined to be in package com.sun and is stored in C:\taglets\com\sun\Taglet.class, then you should set tagletpath to C:\taglets. This example calls javadoc on package com.package1, including ToDoTaglet tags:
       javadoc -taglet ToDoTaglet -tagletpath C:\taglets com.package1

The following examples are of block and inline taglets.

Example - A Block Taglet

The source code for an example of a block taglet implementing @todo is included at:
  • ToDoTaglet.java
The corresponding class file ToDoTaglet.class is already compiled and saved in the same directory as this source file.

This taglet formats the output for the @todo tag. A doc comment containing the following tag:

    /**
     * @todo Fix this!
     */
then the ToDo taglet formats the HTML output as follows:
To Do:
Fix this!

Implementation Description

Let's look at the source code. To name the tag and define the header text, define two private fields:
    private static final String NAME = "todo";
    private static final String HEADER = "To Do:";
To make this a block tag rather than an inline tag, you set isInlineTag to return false:
    public boolean isInlineTag() {
        return false;
    }
There are other methods inField, inMethod, inType, inPackage and inOverview that you specify true or false to indicate in which doc comments in the source code this tag can be used.

The toString(Tag) method determines how the text is inserted into the output when a single {@todo} tag is encountered. This code creates a bold heading followed by a table with a yellow background that contains the text (specified by tag.text()).

    public String toString(Tag tag) {`
        return "<DT><B>" + HEADER + "</B><DD>"
               + "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
               + tag.text()
               + "</td></tr></table></DD>\n";
    }
Similarly, the toString(Tag[]) method (which takes an array of tags) determines how the text is inserted into the output when multiple {@todo} tags are encountered.

The register method

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    public static void register(Map tagletMap) {
       ToDoTaglet tag = new ToDoTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }

Example - An Inline Taglet

Unlike block tags, a custom inline tag can only be implemented using a taglet (rather than using the -tag option). This is because there is no default behavior for inline tags.

The source code for an example of an inline taglet implementing {@underline} is included at:

  • UnderlineTaglet.java
The corresponding class file UnderlineTaglet.class is already compiled and saved in the same directory as this source file.

This taglet formats the output for the {@underline} tag. A doc comment containing the following tag:

    /**
     * Be sure to insert the value at the {@underline start} of the array.
     */
would be output in HTML as follows:

Be sure to insert the value at the start of the array.

Implementation Description

Let's look at how this source code differs from the previous example. Of course the tag name is different (and inline tags have no heading, so none is defined):
    private String NAME = "underline";
To define this as an inline tag rather than a block tag, you set isInlineTag to return true:
    public boolean isInlineTag() {
        return true;
    }

The methods inField, inMethod, inConstructor, inType, inPackage and inOverview apply only to block tags and must all be set to false for inline tags.

The toString(Tag) method determines how the text is inserted into the output when an {@underline} tag is encountered. This code creates surrounds the text with the HTML underline tags <ul> and </ul>.

    public String toString(Tag tag) {
        return "<u>" + tag.text() + "</u>";
    }
It is not possible to have an array of inline tags to process, like it is with block tags. Therefore, the toString(Tag[]) method (which takes an array of tags) is ignored for inline tags.

Handling Errors and Warnings

Errors - A taglet can report an error and stop the Javadoc tool by simply printing the error message and then calling System.exit().

Warnings - A taglet can report a warning using a MessageRetriever given to it by the Doclet instance. The MessageRetriever is obtained from the Configuration object. The Configuration object is obtained from the doclet. For example, if the Taglet is designed to be used with the Standard doclet, the Configuration can be retrieved using Standard.configuration(), a static method. As an example, this is how the SimpleTaglet prints warnings, which is the default taglet for the -tag option.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


enhancements

Documentation Contents

Java Web Start enhancements in version 6

  • JNLP Specification addition of the <update> element with its "policy" and "check" attributes.

The new <update> element with its "policy" and "check" attributes is now supported. The update element describes the applications preferences on how Java Web Start should check for updates on the web, and what to do when it is known before launching that an update is available.
In the previous versions of Java Web Start, the <offline-allowed> element was overloaded to mean two things. First, it meant that the application was allowed to run in "offline" mode. (An application can be run in offline mode either from the command line by adding the "-offline" argument, or from the Cache Viewer.) Second, it meant that attempts to check for update before launching an application (when not run in offline mode) could time out. When a check for update times out, the application would be launched from the cache while the update check continued in the background.
With the advent of the <update> element and its check attribute in 6.0, the <offline-allowed> element no longer has this second meaning. The default values: <update check="timeout"/>. which is the same behavior as previous versions where <offline-allowed> was specified. For the behavior that previously used whenever <offline-allowed> was omitted, you need to specify <update check="always"/>. A third value <update check="background"/> can be specified to always immediately launch from the cache while spawning a check for update in the background. The second attribute, "policy", is used to determine what to do when it is known before starting the application that there is an update available. You can either always get the update, or prompt the user. The policy attribute values can be either "always" (this is default) , "prompt-update" or "prompt-run".

  • JNLP Specification relaxation of requirements for the DownloadService API.

In the previous versions, the URLs passed as arguments to all of the APIs were restricted to be URLs to resources listed in the jnlp file(s) of the running application. This restriction is changed such that there are no restrictions for signed and trusted code, and the restriction on untrusted code is not that it be listed in the jnlp file(s), but only that it be from the same codebase.
Further, URLs to jnlp file(s) themselves are allowed, so that calling DownloadService.removeResource() can now be used to remove a whole application from the cache, and DownloadService.loadResource() can be used to import an application.
One effect of this change is that resources not listed in any jnlp file can now be used in an application. For example, after determining the locale is set to en_xx, an application can then load resources_en_xx.jar using the DownloadService, without listing all the available resource jars in the jnlp file. (Allowing you to dynamically add support for more locales without changing the jnlp file).

  • Implementation of a SocketService

Another significant specification change is a clarification in the definition of the sandbox, that it is only the default sandbox, and that the implementation is free to prompt the user to allow actions that wouldn't be allowed by the sandbox. You already saw in 1.5.0 that this was done for printing, so that just by using the normal printing api in awt, you could expand the sandbox to allow the application to access the printer (if the user agreed). In 6.0 this is also done for socket connections, so that if an untrusted application attempts to connect to a url, the user can be prompted to allow the connection.

  • New <java> element in jnlp file to replace <j2se> element.

For jnlp files that will be used only with Java Web Start version 6.0 or later, the <java> element can be used to replace the <j2se> tag. (This is mainly because the Java Platform Standard Edition is no longer called j2se.) For backward compatibility, the <j2se> tag will continue to work. The <java> element will be identical to the <j2se> element..

  • The <association> element now may contain the <icon> and <description> sub-elements.

When creating file extension and mime type associations with your Java Web Start application, you can now specify a separate icon to be used for each association (as opposed to using the default icon for the application). Now, you can also specify a description.

  • Jar Indexing is fully supported now, and the JNLPClassLoader is now an instance of the URLClassLoader.

The JNLPClassLoader was rewritten to extend URLClassLoader. This gives several powerful advantages.
First, Jar Indexing is now fully supported. If you have several jar files, and create a jar index in the main jar file that indexes all the jar files, you can then mark each additional jar as lazy, and it will not be downloaded until and unless a resource or class in it is referenced. This makes the old part and package elements unnecessary for insuring that lazy jars are not downloaded prematurely.
Second, since the JNLPClassLoader now extends URLClassLoader, an Application can call getURLs() to get a list of the jar elements that are listed in the jnlp files (or have been downloaded using the DownloadService API, even if not listed in any jnlp file, see above).
Finally, the URL returned for calls to ClassLoader.getResource() is now the proper JAR URL of the item on the net. In previous versions, this URL returned was a jar url of the file url item in the cache. By extending URLClassLoader, the cached location (if it exists) is meaningless, and it allows Java Web Start to operate without caching.

  • Enhanced icon support.

Java Web Start now supports two new icon formats, ".png", and ".ico". This allows you to specify an icon that will not need to be translated into a different format depending on its use. You can also now specify kind="shortcut", and Java Web Start will now honor the width and height hints. This means if you specify:
<icon kind="shortcut" href="menushortcut.ico" width="16" height="16"/>
<icon kind="shortcut" href="desktopshortcut.ico" width="32" height="32"/>
you can specify separate images for any desktop and menu shortcuts that are created. (note: for desktop shortcuts, Java Web Start will use the icon whose size is closer to 32X32, and for menu shortcuts Java Web Start will use the icon whose size is closer to 16X16 )

  • Enhanced support for Add/Remove program entries on Windows.

The Windows Add/Remove program entries for Java Web Start applications will now include the publisher, publisher web site, install date, and application icon from the information block of the jnlp file.

  • Desktop shortcut tooltips.

Desktop shortcuts created by Java Web Start will now use the <description> element in the jnlp file to create a toolkit describing the application.

  • JNLPDownloadServlet enhancements.

The JnlpDownloadServlet now contains both a $$hostname and a $$site macro. The $$hostname macro is expanded to contain the host name. The $$site macro is expanded to contain the web site address without the WAR context portion.

  • The list of safe vm args and safe properties has been expanded.

See the developers guide for the current list of safe properties and vm args.

  • Several Command Line Interface (CLI) items have been changed or added. See the developers guide for the current Javaws CLI.

Enhancements Common to Java Web Start and Java Plug-in

  • All dialogs have been redesigned to be more user friendly.

All of the dialogs and screens shown by Java Web Start and Java Plug-in have been redesigned with help from the User Experience team to be more user friendly, intuitive, and accessible.

  • DownloadEngine and cache consolidation and redesign.

The entire caching mechanism and download engine has been redesigned and consolidated between Java Web Start and Java Plug-in.
This brings several new features to Java Web Start, previously available only in Java Plug-in and vice versa.

  • Caching can be disabled now entirely via the Java Control Panel.

  • The cache max size set in the JCP is now honored in Java Web Start, and a cleanup thread may be started by Java Web Start to removed LRU items from the cache when it is approaching the max size set by the user.
  • The "cache-control: no-cache" HTTP header is now supported. "no-cache" means cached contents cannot be used without re-validation. When the no-cache directive is used , an update check is always made to make sure the cached content is the same as the server copy pointed to, by the resource URL. If so, cached copy can be used. If not, server copy will be downloaded. Expiration field is ignored, which means that even if the cached resource is not expired yet, update check will still be performed.
  • The expiration-date will be honored. If a downloaded resource contains an expiration date, it will not be used after that date.

Note: The format of the cache is completely changed and should never be assumed. Any existing code that assumed the previous format of the cache, for either Java Web Start or Java Plug-in will no longer work. Existing applications in the Java Web Start cache will be upgraded and converted to the new cache format the first time you run a Java Web Start application, or if you launch the cache viewer using "javaws -viewer". Likewise, the system cache will be upgraded and converted to the new format the first time you launch Java Web Start in system mode, or if you just launch "javaws -system".

  • The Java Console is now excluded from modality.

By using the new modality features added by AWT in Java 6, you can interact with the Java Console even when the Application displays a modal Dialog.

  • New support for OCSP/CRL

Java Web Start and Java Java Plug-in support CRL (Certificate Revocation Lists) and OCSP (Online Certificate Status Protocol) for verifying the certificates.

  • New Support for SSL/TSL

An Option has been added to the Java Control Panel to select the default SSL handshaking protocol.
The default is set to SSLv3 and SSLv2, but then user or enterprise can change it to TSL.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements to Java Web Start in J2SE 5.0

Documentation Contents

Enhancements to
Java Web Start in J2SE 5.0

  • Elimination of Application Manager: The J2SE 5.0 release no longer contains the Application Manager. Its major functionality is now contained in the Java Control Panel (see item 3 below) and the JNLP Cache Viewer (see item 4 below). The remaining functionality viewing web pages containing JNLP links is better served by a web browser.
  • Elimination of Developer Bundle: Java Web Start is now fully integrated into the JRE and the JDK. The items which were previously contained in a separate developer bundle are now contained in the JDK. The documentation which was previously contained in the developers bundle is now available online. The JDK now contains a samples directory with sample source code to four Java Web Start applications, a sample JRE installer, and the JNLP download servlet. The JDK now also contains jardiff.jar, jnlp.jar, and jnlp-servlet.jar.
  • JNLP Cache Viewer: The JNLP Cache Viewer replaces the functionality of the Application Manager's "downloaded Applications" view. Now all applications, applets, libraries and installers are shown. Available applications can be launched online or offline, removed, or restored from the web. All JNLP files are now kept in the cache (even those without href parameters).
  • System Cache: Java Web Start now contains both system and user caches. The system administrator can now pre-load applications and shared libraries into the system cache so that multiple users can share the same resources.
  • Import Facility: Java Web Start now contains an import facility. This can be used for CD installs, where code is initially loaded from one location and then updated from another. It can also be used to pre-install applications and libraries in either the user or system cache without running the applications.
  • Desktop Integration: (1) Desktop integration of applications has been extended to GNOME and enhanced to allow an application's JNLP file to specify what integration to do. The JNLP file can now suggest desktop and/or menu and specify submenu names. (2) On Windows and on Solaris, Linux, or Mac OS X running GNOME 2.0 or above, Java Web Start applications can now register themselves to be the primary handler for specific MIME types and extensions on the desktop or file system (but not as links in web pages). (3) Now other related content HTML links, native content, and related JNLP applications can be included in the desktop integration of an application.
  • API Enhancements: The JNLP API has been extended to contain an Extended Service and a Single Instance Service. The Extended Service contains file IO APIs not available in the original spec. The Single Instance Service provides a mechanism whereby applications can insure that multiple invocations of the same application will cause new arguments to be passed to the original instance. This avoids the overhead of relaunching Java. Note that the Single Instance behavior will only be enabled after the application calls the Single Instance API in the JNLP application.
  • VM arguments: A JNLP file can now request arbitrary arguments to the virtual machine. Previous JNLP applications could only use the initial-heap-size and max-heap-size arguments to the J2SE element; now a java-vm-args argument has been added. Java Web Start will honor the requests for any normal java and -X arguments that it considers "safe". A list of all such arguments will be included with each release so that the JNLP Spec does not need to change.
  • A JNLP applications running in a sandbox can now print with full support using the Java Printing APIs: Whenever the JNLP application tries to print, Java Web Start will pop up a security dialog asking the user for permission for the application to print. This provides JNLP applications with complete printing support; previously they could only use JNLP printing APIs. This is similar to the applet printing behaviour in Java Plug-in.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Web Start 1.4.2 Release Notes

These release notes include the following sections:

  • Enhancements
    • Improved JNLP URL Support In Application Manager
    • Dynamic Download of HTTPS Certificates
    • Automatic Detection of JREs
    • Combined Control Panel Infrastructure
    • Security Audit of Java Web Start
    • First-Time Prompt for Shortcut
    • Integration with InstallShield 7
  • Bug Fixes

Enhancements

Improved JNLP URL Support In Application Manager

JNLP URLs are now directly openable from the JAWS Application Manager and can be bookmarked. Moreover, they may be .html or .jnlp files. (This is RFE 4531885.)

Dynamic Download of HTTPS Certificates

Java Web Start now dynamically imports certificates in much the same way as browsers do, making use of https much easier for users. (This is RFE 4696477.) For more information, see Dynamic Download of HTTPS Certificates in the Java Web Start 1.4.2 Developer Guide.

Automatic Detection of JREs

Every time JAWS is run, it automatically detects all "registered" JREs on the computer.

There are two types of JREs recognized by JAWS: registered and unregistered. A registered JRE is one that is recorded in the system or package registry, i.e., the system registry on Windows, the package database on Solaris, and the RPM database on Linux. An unregistered JRE is not recorded in a registry; e.g., a JRE mounted on a network drive in an unregistered JRE. (This is RFE 4474876.)

Combined Control Panel Infrastructure

There is now a combined control panel infrastructure used for the Java deployment products, including Java Plug-in and Java Web Start. If you have taken advantage of knowing certain undocumented information, such as the Java Web Start cache location or the configuration file format and location, you could be affected. (This is RFE 4723794.)

Security Audit of Java Web Start

A security audit of Java Web Start has been completed. (This is RFE 4645808.)

First-Time Prompt for Shortcut

Users are now asked if they want a desktop shorcut the first time an application is downloaded and cached. (This is RFE 4737538.)

Integration with InstallShield 7

Java Web Start is now installed via InstallShield 7 as part of the JRE. There is no longer a separate installer for Java Web Start. (This is RFE 4718282.)

Bug Fixes

Bug ID | Synopsis
4791532 | Dialogs are layed out wrong in javawebstart
4778185 | JNLPClassLoader can still return unencoded URL
4780676 | Java Web Start sometimes fails to launch applications while offline
4757170 | Typo in Jaws Pop-up window <Rename HTML Entry> "You must enter and entry name"
4777238 | Cache Location JTextField should handle enter properly
4685501 | De - Word "Console" is not translated in the titlebar of jaws Console dialog
4688776 | JaWS, JAWS 1.2 b08, Translation errors
4785128 | Exception coming if you use mantis-beta jaws with jre1.2.2 on Windows
4772298 | Proxy authentication dialog pops up twice even if username/password is correct
4772381 | System.exit not working with shutdownhook and JWS console
4784292 | Java Web Start should use cached jnlp file if possible to improve startup time
4782008 | Review webstart ActiveX control
4782000 | Need to update webstart autoinstall version tags
4785581 | JAWS on linux cannot be invoked via symbolic link
4789162 | JAWS on solaris/sparc cannot be invoked via symbolic link
4792033 | Need javaws link in /usr/bin on Solaris
4792949 | autoupdate of javaws file is not getting staged in RE area
4791695 | Help Menu Item, "Check For Update" doesn't notify of the latest 1.2 JWS version
4735750 | Fix Certificate-chain Validation
4711515 | Wrong AppContext used in RMI threads
4757168 | Jaws application not properly cached if PATH to the application contains letter N
4759001 | Exception coming (getText()),when trying to Clear Folder with the Downloaded vie
4759005 | Exception coming (synchron),when trying to Clear Folder with the Downloaded vie
4665132 | Webstart not returning ContextClassLoader consistently under jre 1.4.0
4696315 | Splash screen is not showing with large image
4699299 | Splash Screen is wierd on Linux machine
4734410 | JAVAWS is passing the property set in extension installer to main program
4739089 | Java Web Wtart does not handle signed jars correctly
4743169 | Root Certificates panel in Java WS app mgr is blank if cacerts is missing
4754648 | Advanced Preference Panel miss a key shortcut
4754763 | getResourceAsStream() fails with JNLPClassLoader
4772558 | Implement new Icons from UE group.
4772559 | Reduce access scope (phase II)
4772563 | New default splash screen, and modified customized ones
4772926 | Extra ; char on the window title
4773110 | Apps are run with the wrong JRE
4775373 | Problem checking for updates on https codebase
4379831 | Please launch new VM for -Dsun.java2d.noddraw=true
4474875 | Incremental updates fail if going from basic proto to version based.
4485537 | 'Read -1 of 2k (0%)' message still displayed in DL window
4653074 | JWS: Update Shortcuts and programs folder when app name changed in jnlp file.
4666303 | Cannot delete java.sun.com cache directory structure in Application Manager
4687256 | Jaws App_mgr did not prompt shortcut options on the second launch with j2re1.2.2
4688193 | Reduce access scope
4691541 | JWS should handle the version control of splash screen icons
4708051 | Exception coming when you try to "Clear Folder" with View/Download_App enabled
4718813 | Application Manager lost focus after first startup
4729230 | Loging to "TEMP" file does not work
4761563 | Can't set property to "" in jnlp file
4625826 | Unexpected exit when lazy-loading unsigned jar file
4775823 | Unnecessary . (dot) in Appman Shortcuts tab after "When to Create" instruction.
4685497 | De - Overlapping text in the certificates tab
4723717 | JRE1.4.0_x - JaWS component cannot be installed in non-default location.
4777764 | Cancelling import certificate will cause ca chain completely broken
4694453 | Customize splash screen would not work if no href
4720897 | Jar Diff'ing does not work if jars are packaged in a war file.
4724977 | The application panel size it too small to show the string.
4726525 | Certificate detail panel should have focus on OK button
4751780 | JWS Hanging on Jar update (Scanning entries at 100% for a LONG time)
4759104 | Clear cache function could not remove certificate
4759298 | "details" button not showing on app_mgr root certicates tab
4480656 | View Source in IE won't work after creating shortcut for Notepad Demo
4498419 | WebStart won't start if the default browser is deinstalled
4623207 | jaxp.jar
4626733 | Multi-platform support
4653036 | JarDiffHandler() should use javax.servlet.context.
4654173 | JWS litters $WINUSERHOME\Local Settings\Temp and d:\TMP
4667701 | JWS should give the name of the resource that fails
4668473 | Cannot create shortcut if title is too long
4676386 | Better user-agent value in http request header
4685505 | De - Broken border around " Choose Log File Name"
4687857 | Focus is back to wrong window after closing dialog
4699771 | JWS login prompt for secure resources is not robust.
4744945 | JWS 1.2 application cannot delete after upgrade
4775777 | "Invalid Cache Location" window incorrect behavior
4492987 | Java Web Start Installation documentation for Linux
4768914 | Javaws unsigned extension installer can call setJREInfo
4773602 | Auto proxy detection is failing when using Netscape 4.79 and 7.0
4777392 | Mantis b06:file type description for jnlp is not set to NS/IE on Win98 ja
4665251 | Preferences: Shortcut Options: When To Create := "Always" fails (always:)
4692415 | Jaws application freezing if you launching it as a root, through browser on Sol
4723790 | Web start install should use pack instead of crunch
4739415 | Jaws j2re1.4.0 installer problem
4772158 | Make web start part of JRE image on Solaris, Linux, and Mac OS X platforms
4776098 | Javaws JRE autodownload not working
4431364 | JRE should always be installed
4459559 | J2SE Installer can't finish the work if Installed
4463745 | WebStart can't handle Netscape automatic proxy configuration
4469455 | Proxy autoconfig script parsing has problems
4514686 | Installer can't handle adding >100th mime type to Netscape on Windows
4615288 | Build fails under Windows due to install directory not existing
4653566 | JWS is not compatible with the centralization of home directories under NT
4685474 | Message on Japanese Installer/Uninstaller does not fall within a view area
4730185 | javaws.cfg file in $USERPROFILE is not uninstalled
4763779 | Need to check javaws bootdir during control build
4764601 | Unsigned extension installer throws exception when Main.systemExit is called
4765164 | Singleton api service classes can be re-initialized
4765165 | com.sun.jnlp package needs to be protected from package addition
4775492 | Javaws app with no href in JNLP causing nonfatal exception on netscape/unix
4768903 | Javaws dev target doesn't work during dev build
4741507 | Missing signed entry JNLPException is not explicit

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java(TM) Web Start

Documentation Contents

Java™ Web Start

Java Web Start version 1.7.0 is included in the Java™ Platform, Standard Edition 7 JDK.

Overview

Java Web Start is an application-deployment technology that gives you the power to launch full-featured applications with a single click from your Web browser. You can now download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through complicated installation procedures.

Java Web Start includes the security features of the Java platform, so the integrity of your data and files is never compromised. In addition, Java Web Start technology enables you to use the latest Java SE technology with any browser.

With Java Web Start, you launch applications simply by clicking on a Web page link. If the application is not present on your computer, Java Web Start automatically downloads all necessary files. It then caches the files on your computer so the application is always ready to be relaunched anytime you want—either from an icon on your desktop or from the browser link. And no matter which method you use to launch the application, the most current version of the application is always presented to you.

Enhancements

  • Java Rich Internet Applications Enhancements in JDK 7
  • Java Web Start Enhancements in Java SE 6.0

Documentation

  • Developer's Guide
  • FAQ
  • Java Web Start lesson in Deployment Java Tutorial
  • JNLP Specification
  • Package javax.jnlp
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java(TM) Web Start Technology README

Documentation Contents

README

Java Web Start Technology - Version 1.4.2

Table of Contents

Introduction
Installation Instructions
Using Java Web Start Software

Introduction

Java Web Start is a deployment solution for Java-technology-based applications. It is the plumbing between the computer and the Internet that allows the user to launch and manage applications right off the Web. Java Web Start provides easy, one-click activation of applications, and guarantees that you are always running the latest version of the application, eliminating complicated installation or upgrade procedures.

Distributing software across the Web in the tradition manner requires the user to find the installer on the Web, download the installer, locate the installer on the system, and then execute the installer. Once the installer is executed, it prompts for installation directories and installation options such as full, typical, or minimum. This is a time-consuming and complicated task, and one that must be repeated for each new version of the software.

By contrast, Web-deployed applications, such as your favorite HTML-based email client and calendar, auction sites, and so on, are a breeze to install and use. The Web browser has automated the entire process. There is no complicated download, setup, and configuration steps, and you are guaranteed to always be running the latest version.

Java Web Start technology provides the same benefits to full-featured applications as described above for HTML-based applications. Java Web Start technology is an application deployment solution for the Web. Using a full-featured application instead of an HTML-based client can have many benefits:

  • A highly-interactive user interface, comparable to traditional applications, such as word processors and spreadsheets.
  • Lower bandwidth requirements. An application does not necessarily have to connect back to the Web server on each click, and it can cache already-downloaded information. Thus, it can provide better interactivity on slow connections.
  • Support for off-line use.
Or course, you still have to download the application the first time you use it. An HTML-based application, thus has a first-time activation cost. Typically, a Web page is brought up in a matter of seconds. A Java technology-based application will require download times in the order of minutes on a typical modem connection. The Java Web Start caches all downloaded files locally on the computer. Thus, although the first-time activation cost is higher for applications than for HTML pages, subsequent launches will be almost instantaneous because all the required resources are already available locally.

On each launch, Java Web Start checks the Web server to see if a new version of the application is available, and if so, automatically downloads and launches it. Thus, applications are automatically brought up to date. There is no complicated upgrade procedure.

Security

Java Web Start is built on top of the Java 2 platform, which provides a comprehensive security architecture. Applications launched with Java Web Start will, by default, run in a restricted environment ("sandbox") with limited access to files and network. Thus, launching applications using Java Web Start maintains system security and integrity.

An application can request unrestricted access to your system. In this case, Java Web Start will display a Security Warning dialog when the application is launched for the first time. The security warning will show information about the vendor who developed the application. If you choose to trust the vendor, then the application will be launched. The information about the origin of the application is based on digital code signing.

Installation Instructions

Java Web Start is installed with the SDK/JRE. For installation instructions, follow the standard installation instructions for the SDK/JRE you are installing.

Using Java Web Start Software

Java Web Start allows you to launch Java-technology-based applications directly from the Web. An application can be launched in three different ways:
  • From a Web browser by clicking on a link.
  • From Java Web Start's built-in Application Manager, which tracks recently used applications and provides quick access to your favorite applications.
  • From desktop icons or the Start Menu (Microsoft Windows only).
Regardless of which way is used, Java Web Start will connect back to the Web server each time an application is launched to check whether an updated version of the application is available.

Launching from a Web browser

The Java Tutorials contain examples that can be launched with a single click of a mouse; see Java Web Start Development Examples and Using Swing Components: Examples. Try launching the different applications by clicking on the Launch links or buttons. The Web browser will launch Java Web Start, which will then download, cache, and execute the given application. You will notice that the second time you launch an application, it starts much more quickly since it is already present locally and does not need to be downloaded again.

Most of the demos on the page are just downloaded and executed without any user intervention. These applications run in a restricted environment in which they are prevented from accessing the local disk and network, and can be guaranteed not to install any viruses on your computer.

Some demos require extra privileges, such as access to your local hard disk. For these applications, a security dialog will pop up with information about the origin of the application based on who digitally signed the code. The application will run only if you decide to trust the vendor.

That is really all there is to using Java Web Start, but how does it work? The HTML links that launch the applications are, in fact, standard HTML links. However, instead of pointing to another Web page, they link to a special configuration file called a JNLP file. The Web browser examines the file extension and/or the MIME type of the file, and sees that it belongs to Java Web Start. It then launches Java Web Start with the downloaded JNLP file as an argument. Java Web Start proceeds with downloading, caching, and running the application as directed by the JNLP file.

Launching from the built-in Application Manager

The Application Manager is a built-in part of the Java Web Start product. It lets you quickly and easily launch applications that have previously been launched by Java Web Start. It is a combination of a History menu and a Start/Programs menu for your Web deployed Java-technology-based applications. The Application Manager also allows you to see additional information about the applications, with links the applications' home pages.

You launch an application from the Application Manager by double clicking on the application icon or by clicking the launch button.

Another important feature of the Application Manager is the Preferences dialog which lets you examine and modify settings used by Java Web Start. For example, this includes tabs which allow you to:

  • Specify an HTTP Proxy (or tell Java Web Start to use the default browser settings).
  • Clear the cache of downloaded applications.
  • Specify the location of the different versions of Java runtime environments.
  • Select whether a Java console is to be displayed.
  • View the set of root security certificates.

The Application Manager is launched by either clicking on the Java Web Start icon on the desktop or in the Start Menu on Microsoft Windows. On the Solaris Operating Environment and Linux, it is launched by invoking the javaws command in the Java Web Start installation directory. The Application Manager can also be launched from a Web browser; click the following link to launch it:

  • Application Manager

Launching from desktop icons and the Start Menu (Microsoft Windows only)

Java Web Start technology can automatically create shortcuts on the Microsoft Windows desktop and in the Start Menu for Web deployed Java-technology-based applications. By default, Java Web Start asks the second time an application is launched, if a shortcut should be created. This can be changed using the Preference panel.

Shortcuts can also be added and removed by using the Application Manager, using the Application/Create Shortcut, and using Application/Remove Shortcut menu item.

Using Java Web Start Software Behind a Proxy Server/Firewall

Java Web Start software must be configured with the correct proxy settings in order to launch applications from outside your firewall. Java Web Start software will automatically try to detect the proxy settings from the default browser on your system (Internet Explorer or Netscape browsers on Microsoft Windows, and Netscape browsers on the Solaris Operating Environment and Linux). Java Web Start technology supports most web proxy auto-configuration scripts. It can detect proxy settings in almost all environments.

If the proxy setting cannot be automatically detected, then you will be prompted to specify the proxy settings the first time you use Java Web Start. Java Web Start will also prompt you for a user name and password required to access an authenticating proxy server. This user name and password will be stored for the current invocation of Java Web Start. However, at the time a newly invoked Java Virtual Machine, if accessing a secure web site, will prompt you for the user name and password since this information is stored within a Java Virtual Machine instance.

You can also use the Java Web Start Preferences panel to view or edit the proxy configuration. Launch the Application Manager, either by clicking on the icon on the desktop (Microsoft Windows), or type ./javaws in the Java Web Start installation directory (Solaris Operating Environment and Linux), and then select Edit/Preferences. If you are in an environment where access to the Web is through a proxy server, you are encouraged to use the Java Web Start Preferences panel to check that these are set-up correctly.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Mozilla Public License version 1.1

Documentation Contents
MOZILLA PUBLIC LICENSE
Version 1.1

1. Definitions.

1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party.

1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications.

1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.

1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.

1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data.

1.5. ''Executable'' means Covered Code in any form other than Source Code.

1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.

1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.

1.8. ''License'' means this document.

1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.

1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:

A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.

B. Any new file that contains any part of the Original Code or previous Modifications.

1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.

1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.

1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.

1.12. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and

(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).

(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.

(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.

2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license

(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and

(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).

(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.

(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.

3. Distribution Obligations.

3.1. Application of License.
The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.

3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.

3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.

3.4. Intellectual Property Matters

(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.

(b) Contributor APIs.
If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.

(c) Representations.
Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.

3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.

3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.

3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.

4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (''Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.

6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.

6.3. Derivative Works.
If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)

7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.

8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that:

(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.

(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.

8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.

8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.

9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.

EXHIBIT A -Mozilla Public License.

``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY KIND, either express or implied. See the License for the specific language governing rights and
limitations under the License.

The Original Code is ______________________________________.

The Initial Developer of the Original Code is ________________________. Portions created by
______________________ are Copyright (C) ______ _______________________. All Rights
Reserved.

Contributor(s): ______________________________________.

Alternatively, the contents of this file may be used under the terms of the _____ license (the [___] License), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License."

[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.]

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


xbDetectBrowser.js

Documentation Contents
/* ***** BEGIN LICENSE BLOCK *****
 * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * Full Terms at http://devedge.netscape.com/lib/js/license/mpl-tri-license.txt
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Netscape code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2001
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): Bob Clary <bclary@netscape.com>
 *
 * ***** END LICENSE BLOCK ***** */

function xbDetectBrowser()
{
  var oldOnError = window.onerror;
  var element = null;

  window.onerror = null;

  // work around bug in xpcdom Mozilla 0.9.1
  window.saveNavigator = window.navigator;

  navigator.OS    = '';
  navigator.version  = parseFloat(navigator.appVersion);
  navigator.org    = '';
  navigator.family  = '';

  var platform;
  if (typeof(window.navigator.platform) != 'undefined')
  {
    platform = window.navigator.platform.toLowerCase();
    if (platform.indexOf('win') != -1)
      navigator.OS = 'win';
    else if (platform.indexOf('mac') != -1)
      navigator.OS = 'mac';
    else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
      navigator.OS = 'nix';
  }

  var i = 0;
  var ua = window.navigator.userAgent.toLowerCase();

  if (ua.indexOf('opera') != -1)
  {
    i = ua.indexOf('opera');
    navigator.family  = 'opera';
    navigator.org    = 'opera';
    navigator.version  = parseFloat('0' + ua.substr(i+6), 10);
  }
  else if ((i = ua.indexOf('msie')) != -1)
  {
    navigator.org    = 'microsoft';
    navigator.version  = parseFloat('0' + ua.substr(i+5), 10);

    if (navigator.version < 4)
      navigator.family = 'ie3';
    else
      navigator.family = 'ie4'
  }
  else if (ua.indexOf('gecko') != -1)
  {
    navigator.family = 'gecko';
    var rvStart = ua.indexOf('rv:');
    var rvEnd   = ua.indexOf(')', rvStart);
    var rv      = ua.substring(rvStart+3, rvEnd);
    var rvParts = rv.split('.');
    var rvValue = 0;
    var exp     = 1;

    for (var i = 0; i < rvParts.length; i++)
    {
      var val = parseInt(rvParts[i]);
      rvValue += val / exp;
      exp *= 100;
    }
    navigator.version = rvValue;

    if (ua.indexOf('netscape') != -1)
      navigator.org = 'netscape';
    else if (ua.indexOf('compuserve') != -1)
      navigator.org = 'compuserve';
    else
      navigator.org = 'mozilla';
  }
  else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
  {
    var is_major = parseFloat(navigator.appVersion);

    if (is_major < 4)
      navigator.version = is_major;
    else
    {
      i = ua.lastIndexOf('/')
      navigator.version = parseFloat('0' + ua.substr(i+1), 10);
    }
    navigator.org = 'netscape';
    navigator.family = 'nn' + parseInt(navigator.appVersion);
  }
  else if ((i = ua.indexOf('aol')) != -1 )
  {
    // aol
    navigator.family  = 'aol';
    navigator.org    = 'aol';
    navigator.version  = parseFloat('0' + ua.substr(i+4), 10);
  }
  else if ((i = ua.indexOf('hotjava')) != -1 )
  {
    // hotjava
    navigator.family  = 'hotjava';
    navigator.org    = 'sun';
    navigator.version  = parseFloat(navigator.appVersion);
  }

  window.onerror = oldOnError;
}

xbDetectBrowser();
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Application Development Considerations

This chapter includes the following topics:

  • Introduction
  • Retrieving Resources from JAR files
  • Accessing the Client Using JNLP API
  • Security and Code Signing
  • Signing JAR Files With a Test Certificate
  • How to Encode JNLP Files
  • Dynamic Download of HTTPS Certificates

Introduction

Developing applications for deployment with Java Web Start is generally the same as developing stand-alone applications for the Java(TM) Platform Standard Edition. For instance, the entry point for the application is the standard public static void main(String[] argv).

However, in order to support Web deployment—automatic download and launching of an application—and to ensure that an application can run in a secure sandbox, there are some additional considerations:

  • An application must be delivered as a set of JAR files.
  • All application resources, such as files and images must be stored in JAR files; and they must be referenced using the getResource mechanism in the Java(TM) Platform Standard Edition (see below).
  • If an application is written to run in a secure sandbox, it must follow these restrictions:
    • No access to local disk.
    • All JAR files must be downloaded from the same host.
    • Network connections are enabled only to the host from which the JAR files are downloaded.
    • No security manager can be installed.
    • No native libraries may be used.
    • Limited access to system properties. The application has read/write access to all system properties defined in the JNLP File, as well as read-only access to the same set of properties that an Applet has access to.
    Some of these restrictions can be overcome by the use of JNLP API to access the file system and other system resources.
  • An application is allowed to use the System.exit call.
  • An application that needs unrestricted access to the system will need to be delivered in a set of signed JAR files. All entries in each JAR file must be signed.

Retrieving Resources from JAR files

Java Web Start only transfers JAR files from the Web server to the client machine. It determines where to store the JAR files on the local machine. Thus, an application cannot use disk-relative references to resources such as images and configuration files.

All application resources must be retrieved from the JAR files specified in the resources section of the JNLP file, or retrieved explicitly using an HTTP request to the Web server. Storing resources in JAR files is recommended, since they will be cached on the local machine by Java Web Start.

The following code example shows how to retrieve images from a JAR file:

// Get current classloader
ClassLoader cl = this.getClass().getClassLoader();
// Create icons
Icon saveIcon  = new ImageIcon(cl.getResource("images/save.gif"));
Icon cutIcon   = new ImageIcon(cl.getResource("images/cut.gif"));
...

The example assumes that the following entries exist in one of the JAR files for the application:

images/save.gif
images/cut.gif

Accessing the Client Using JNLP API

JNLP API can be used to access the client's file system and other resources. See the following topics for more information about using JNLPI API to access the client:

  • JNLP API Examples
  • Accessing Client the Using JNLP API (Topic in the Deployment Trail of the Java Tutorials. Although the sample shown is an applet, the information applies to Java Web Start applications also.)

Security and Code Signing

Java Web Start addresses the security issues:

  • Protecting users against malicious code (intentional & unintentional) that may affect local files;
  • Protecting enterprises against code that may attempt to access or destroy data on networks.

Applications launched with Java Web Start are, by default, run in a restricted environment where they have limited access to local computing resources, such as storage devices and the local network. In this sandbox environment, Java Web Start can guarantee that a downloaded and potentially untrusted application cannot compromise the security of the local files or the network.

An additional security feature supported by Java Web Start is digital code signing. If an application being invoked is delivered in one or more signed JAR files, Java Web Start will verify that the contents of the JAR file have not been modified since they were signed. If verification of a digital signature fails, Java Web Start will not run the application, since it may have been compromised by a third-party.

The support for code signing is important for both users and for application service providers. This service makes it possible for users to verify that an application comes from a trusted source. Because the application service provider signs the code, both can be ensured that no other party can impersonate the application on the Web. A signed application that is trusted by the user can also request additional system privileges, such as access to a local disk.

Java Web Start presents a dialog displaying the application's origin, based on the signer's certificate, before the application is launched. This allows the user to make an informed decision about whether or not to grant additional privileges to the downloaded code.

By including the following settings in the JNLP file, an application can request full access to a client system if all its JAR files are signed :

<security>
   <all-permissions/>
</security>

The implementation of code signing in Java Web Start is based on the security API in the core Java(TM) Platform Standard Edition. The Java 2 SE JRE 1.4.2 supports code signing with the SHA1withDSA and MD5withRSA algorithms.

Developers sign code for use with Java Web Start in the same way as for Java Applets—by using the standard jarsigner tool from the Java(TM) Platform Standard Edition. The jarsigner tool documentation provides examples of how to sign code and create test certificates, and it discusses other issues related to signing.

Signing JAR Files With a Test Certificate

Here are the steps needed to sign a JAR file with a test certificate:

1. Make sure that you have an SDK 1.4.2 keytool and jarsigner in your path. These tools are located in the SDK bin directory.

2. Create a new key in a new keystore as follows:

keytool -genkey -keystore myKeystore -alias myself

You will get prompted for a information about the new key, such as password, name, etc. This will create the myKeystore file on disk.

3. Then create a self-signed test certificate as follows:

keytool -selfcert -alias myself -keystore myKeystore

This will prompt for the password. Generating the certificate may take a few minutes.

4. Check to make sure that everything is okay. To list the contents of the keystore, use this command:

keytool -list -keystore myKeystore

It should list something like:

Keystore type: jks
Keystore provider: SUN

Your keystore contains 1 entry:

myself, Tue Jan 23 19:29:32 PST 2001, keyEntry,
Certificate fingerprint (MD5):
C2:E9:BF:F9:D3:DF:4C:8F:3C:5F:22:9E:AF:0B:42:9D

5. Finally, sign the JAR file with the test certificate as follows:

jarsigner -keystore myKeystore test.jar myself

Repeat this step with all of your JAR files.

Note that a self-signed test certificate should only be used for internal testing, since it does not guarantee the identity of the user and therefore cannot be trusted. A trust-worthy certificate can be obtained from a certificate authority, such as VeriSign or Thawte, and should be used when the application is put into production.

How to Encode JNLP Files

Beginning with Java Web Start version 1.2, JNLP files may be encoded in any character encoding supported by the Java(TM) Platform Standard Edition. (See the Java(TM) Platform Standard Edition documentation for a list of supported encodings.)

To encode a JNLP file, specify an encoding in the XML prolog of that file. For example, the following line indicates that the JNLP file will be encoded in UTF-16.

<?xml version="1.0" encoding="utf-16"?>

The XML prolog itself must be UTF-8-encoded.

Dynamic Download of HTTPS Certificates

Beginning with 1.4.2, Java Web Start dynamically imports certificates in much the same way as browsers do. In order to make this work, Java Web Start now sets its own https handler, using the java.protocol.handler.pkgs system properties, to initialize defaults for SSLSocketFactory and HostnameVerifier. It sets the defaults with HttpsURLConnection.setDefaultSSLSocketFactory and HttpsURLConnection.setDefaultHostnameVerifier.

If your application uses those two method, make sure they are called after the Java Web Start https handler is initialized, otherwise your custom handler will be replaced by the Java Web Start default handler. You can ensure that your own customized SSLSocketFactory and HostnameVerifiter are used by doing either of the following:

  1. Installing your own https handler, which will completely replace the Java Web Start https handler;
  2. Calling HttpsURLConnection.setDefaultSSLSocketFactory or HttpsURLConnection.setDefaultHostnameVerifier only after the first https url object is created, which will execute the Java Web Start https handler initialization code first.

For information on creating a download servlet see the next chapter, JnlpDownloadServlet Guide.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Converting JNLP Files to Work With This Release

The JNLP file format has not changed between the 1.0 and this release.

If your JNLP file is compatible with a version of Java Web Start that is lower than 1.0, please note that the JNLP file format has changed significantly. Below is a list of the most common modifications that needs to be applied to a 0.4 JNLP file to make it compatible with Java Web Start 1.0 or higher:

  • Set spec attribute to 1.0.
  • Rename the unrestricted element to all-permissions.
  • Rename the jre element to j2se and move this element inside the resources element (i.e., make j2se a subelement of resources).

Converting JNLP files used with the 1.0-beta or 1.0-rc release only requires updating the spec attribute to "1.0".

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Creating the Web Page That Lauches the Application

Documentation Contents

< Contents

Creating the Web Page That Launches the Application

This chapter includes the following topics:

  • Introduction

  • Detecting if Java Web Start is installed on Netscape

  • Detecting if Java Web Start is installed on IE, and if so, the version number

  • Launching the application if Java Web Start is Installed—or providing a link for auto-install or general download page

  • Creating an auto-install page

Introduction

The following information predates the introduction of the Deployment Toolkit script in the Java SE 6 update 10 release.
See Java Rich Internet Applications Deployment Advice for information about using the Deployment Toolkit script.

In order for an application to be launched from a web page via JNLP, the page must include a link to the JNLP file. E.g., to be able to launch application app.jnlp on a web site http://www.MySite.com, the page needs to include the following link:

<a href=http://www.MySite.com/app.jnlp>Launch the application</a>

It may be the case, however, that Java Web Start is not installed on the user's computer. Thus the page needs to include logic (scripts) to take account of this. In fact, the page should include logic for the following:

Detect if Java Web Start is installed

  • If so, launch the application.

  • If not, detect if user is running IE on Window.

    • If so, provide link to a page that can auto-install the JRE for Windows

    • If not, provide a link to the general download page for the JDK/JRE.

The scripts, and the HTML for the auto-install page, are discussed below.

Detecting if Java Web Start is installed on Netscape

Here is the first script that should be run on a web page for launching an application via JNLP:

<SCRIPT LANGUAGE="JavaScript">
var javawsInstalled = 0;
var javaws142Installed=0;
var javaws150Installed=0;
var javaws160Installed = 0;
isIE = "false";
if (navigator.mimeTypes && navigator.mimeTypes.length) {
   x = navigator.mimeTypes['application/x-java-jnlp-file'];
   if (x) {
      javawsInstalled = 1;
      javaws142Installed=1;
      javaws150Installed=1;
      javaws160Installed = 1;
  }
}
else {
   isIE = "true";
}
</SCRIPT>

This script looks at the navigator.mimeTypes object and the navigator.mimeTypes.length var to decide if the browser is Netscape or IE. If length is 0, it is assumed the browser is IE, as with IE the navigator.mimeTypes array is defined but always empty. If length is non-zero, then the browser is assumed to be Netscape and the JNLP MIME type is checked to see if it exists on Netscape. If so, javawsInstalled, javaws142Installed, javaws150Installed and javaws160Installed are all set to 1. With Netscape it is not possible to determine which particular version of Java Web Start is installed, so all four variables are set to 1.

Detecting if JavaWeb Start is installed on IE, and if so, the version

The above JavaScript should be followed by a VBScript that sets variables related to Internet Explorer browers:

<SCRIPT LANGUAGE="VBScript">
on error resume next
If isIE = "true" Then
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled"))) Then
     javawsInstalled = 0
  Else
     javawsInstalled = 1
  End If
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.4.2.0"))) Then
     javaws142Installed = 0
  Else
     javaws142Installed = 1
  End If
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.5.0.0"))) Then
     javaws150Installed = 0
  Else
     javaws150Installed = 1
  End If
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.6.0.0"))) Then
     javaws160Installed = 0
  Else
     javaws160Installed = 1
  End If
End If
</SCRIPT>

This VBScript is executed if the variable isIE from the preceeding JavaScript is "true"; i.e., if the end-user's browser is Internet Explorer. This script instantiates the isInstalled COM object in JavaWebStart.dll, and this object determines four things:

  • whether the client machine has any version of Java Web Start installed;

  • whether the client machine has version 1.2 of Java Web Start installed;

  • whether the client machine has versions 1.4.2 of Java Web Start installed;

  • whether the client machine has versions 1.5.0 of Java Web Start installed.

  • whether the client machine has versions 1.6.0 of Java Web Start installed.

After the above two scripts have been executed, the variables javawsInstalled, javaws142Installed, javawsInstalled150 and javawsInstalled160 will be set to either 1 or 0, as follows:

Browser

javawsInstalled

javaws142Installed

javaws150Installed

javaws160Installed

Internet Explorer

1 if any version of Java Web Start is installed; 0 otherwise.

1 if Java Web Start 1.4.2 is installed; 0 otherwise.

1 if Java Web Start 1.5.0 is installed; 0 otherwise.

1 if Java Web Start 1.6.0 is installed; 0 otherwise.

Netscape Navigator

1 if any version of Java Web Start is installed; 0 otherwise.

1 if any version of Java Web Start is installed; 0 otherwise.

1 if any version of Java Web Start is installed; 0 otherwise.

1 if any version of Java Web Start is installed; 0 otherwise.

Launching the application if Java Web Start is Installed—or providing a link for auto-install or general download page

An additional JavaScript can be used to decide whether to:

  • provide a link to the application's jnlp file (i.e., Java Web Start is installed);

  • initiate auto-download of JRE 6.0, which includes Java Web Start (i.e., Java Web Start is not installed and the user is running IE on Windows);

  • or provide a link to the general download page for the 6.0 JDK/JRE (i.e., Java Web Start is not installed and the user is not running IE on Windows).

The following JavaScript handles these scenarios:

<script language="JavaScript">
/* Note that the logic below always launches the JNLP application
 *if the browser is Gecko based. This is because it is not possible
 *to detect MIME type application/x-java-jnlp-file on Gecko-based browsers.
 */
if (javawsInstalled || (navigator.userAgent.indexOf("Gecko") !=-1)) {
    document.write("<a href=http://www.MySite.com/app.jnlp>Launch
        the application</a>");
} else {
    document.write("Click ");
    document.write("<a href=http://java.sun.com/PluginBrowserCheck?
        pass=http://www.MySite.com/download.html&
        fail=http://java.sun.com/javase/downloads/ea.jsp>here</a> ");
    document.write("to download and install JRE 5.0 and
        the application.");
}
</SCRIPT>

Notes:

  1. The script only uses javawsInstalled—not javaws142Installed or javaws150Installed or javaws160Installed.

  2. The line breaks following '?' and '&' are for readability purposes only; in an actual script there should be no breaks in the href string.

If javawsInstalled is 1, indicating that Java Web Start is already available on the client, then the script provides a link to the application's jnlp file. If Java Web Start is not installed on the client, the script instead provides a link to the PluginBrowserCheck program on the java.sun.com web site. PluginBrowserCheck checks whether the client uses Internet Explorer on a Microsoft Windows platform. If so, PluginBrowserCheck sends the user to the auto-install page http://www.MySite.com/download.html. (See the next section, Creating an auto-install page, for how to create an auto-install page for IE running on Windows.) If PluginBrowserCheck determines the user is not using Internet Explorer on Microsoft Windows, the user is redirected to the 6.0 JRE general download page on java.sun.com.

Creating an auto-install page

The download.html file should be staged on the server side. It contains special OBJECT and PARAM tags that will download to the client an auto-installer for JRE 6.0 . Along with Java Web Start, an ActiveX control will be downloaded to the client. The ActiveX control will launch the application using the newly installed Java Web Start. Here is a sample download.html file:

<HTML>
<BODY>
<OBJECT codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0"
classid="clsid:5852F5ED-8BF4-11D4-A245-0080C6F74284" height=0 width=0>
<PARAM name="app" value="http://www.MySite.com/app.jnlp">
<PARAM name="back" value="true">
<!-- Alternate HTML for browsers which cannot instantiate the object -->
<A href="http://java.sun.com/javase/downloads/ea.jsp">
Download Java Web Start</A>
</OBJECT>
</BODY>
</HTML>

The OBJECT tag fetches a .cab file that contains an auto-installer for JRE 6.0.

The URL:

http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab

will return the latest update release available for the Java SE 6 release.

The string: Version=6,0,0,0 will be used to compare with the wsdetect.dll version, which is registered with the CLSID above. If the local machine has the dll installed and the version is greater than or equal to the Version specified, we will just load the dll in the local machine. Otherwise it will download and install Java from the codebase specified.

The PARAM tags specify the location of the application's jnlp file so that it may be automatically launched after the JRE is installed on the client.

app: Once the Java Web Start Active-X control is installed/loaded, it will invoke Java Web Start to launch the application specified by this URL.

back: This controls the behavior of the browser after launching the application. It can remain on the current page (download.html in this case) or navigate back to the previous page.

For issues relating to application development see the next chapter, Application Development Considerations.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Web Start - Frequently Asked Questions

Documentation Contents

Java Web Start version 6

Frequently Asked Questions (FAQ)

FAQ Update (March 2006)

General Questions

  1. What is Java Web Start?
  2. Where do I get more information?
  3. Why should I use Java Web Start?
  4. How can I launch applications with Java Web Start?
  5. Does it matter how I launch an application?
  6. What are the system requirements for Java Web Start?
  7. What platforms does Java Web Start run on?
  8. What are the server requirements for Java Web Start?
  9. Is Java Web Start based on a standard?
  10. Can I implement my own Java Web Start?
  11. What are the supported browsers?
  12. Is there a comprehensive list of online resources for Java Web Start?
  13. Can I deploy any application with Java Web Start?
  14. Is Java Web Start a software distribution mechanism like Marimba and MS SMS?
  15. Is Java Web Start an application installer?
  16. What version of the Java platform does Java Web Start work with?
  17. How does Java Web Start relate to Java Plug-in Technology (applets)?

Technical Questions

  1. Do I need to change my application to work with Java Web Start?
  2. Is there a migration path from applets to applications?
  3. Is there a way to pass VM arguments to the Java Runtime?
  4. I don't want to rely on a server timestamp. How can I specify a versioned JAR and how can I get incremental updates of JARs?
  5. Are JAR files shared between applications?
  6. How can I provide my own splash screen?
  7. How can I save the application state on the local system?
  8. My application requires a specific version of the JRE. How do I specify this my JNLP file?
  9. Can I rely on Class-Path in the manifest file?
  10. Can I use Java Web Start even if my Application depends on or uses native code?
  11. How can I load resources within my application using Class.forName and ClassLoader.getSystemClassLoader?
  12. How can I launch Java Web Start from the command line?
  13. How do I use multiple JAR files signed by different certificates?
  14. How do I detect if Java Web Start is installed?
  15. Why does my browser shows JNLP file as plain text.
  16. Why does Java Web Start always reload JAR files from IIS server?
  17. Can I use Pack200 compression with the JnlpDownloadServlet?
  18. What is the best way to ensure only one instance of my app is run?
  19. When will properties set in the jnlp file get set?
  20. What causes the file not found message for the downloaded jnlp file?
  21. How can I use signed jars (such as JCE extensions) signed for other purposes?
  22. Why can't I use the Association feature on some linux platforms with Gnome?
  23. How do I set up my server to broadcast the jnlp mime type?
  24. How do I set up my server to use the JnlpDownloadServlet?
  25. How are Applications uniquely identified?
  26. How do I create multiple file-extension/mime-type associations with a JNLP application?
  27. Why does FindClass() sometimes fail when called from native code?

Security Questions

  1. How secure is Java Web Start?
  2. What is a secure sandbox?
  3. How is the Java Web Start secure sandbox more flexible than the applet sandbox?
  4. How can I enable my application to gain unrestricted access to the system?
  5. Is there support for encrypted download of JAR files?
  6. Can I use NTLM authentication with Java Web Start?
  7. Can I use HTTPS protocol with Java Web Start?
  8. Are there online resources to learn more about the security tools?

Known Bugs

  1. 4825415: Web Start desktop integration and security dialogs disappear in 1.4.2
  2. 4491398: Dependent DLL resource problem
  3. 5008460: Web Start fails if path contains spaces and TraceSecurity is turned on.
  4. 5074087: If related-content is specified w/o a title on Windows, application cannot start.
  5. 5074524: First jar of unsigned extension must be downloaded eagerly
  6. 5047548: Lazy downloading of parts with packages is broken
  7. 5074526: ExtenededService file APIs show security dialog even if app is signed
  8. 4925768: No support for system level shortcuts in Gnome.
  9. 5072969: Startup errors causing Web Start to appear to hang
  10. 5074530: Web Start not picking up the correct JRE.

March 2006 Updates:

General Questions

What is Java Web Start?

Java Web Start provides a platform-independent, secure, and robust deployment technology. It enables developers to deploy full-featured applications to end-users by making the applications available on a standard web server. With any web browser, end-users can launch the applications and be confident they always have the most-recent version.
Back to top

Where do I get more information?

Look at the online documentation for Java Web Start .

If you are a developer, go to the Developer's Guide for detailed technical information on how to deploy applications using Java Web Start.
Back to top

Why should I use Java Web Start?

It's an easy, robust, and secure way to deploy applications directly from the web. Developers can make applications readily available via the web. In addition, Java Web Start provides Java runtime environment (JRE) management capabilities, it's easy to set up, it's browser-independent, and it's an efficient way to deploy web application solutions.

Users can easily access applications much as they would a web page--without a separate installation step. From the desktop, users can access and use Java applications, using a richer and more responsive user interface than is available on a web page. And, once a Java Web Start based application is installed, users simply click to run the application whenever needed.

Users do not need to manually update applications because each time they launch an application, it is transparently updated from the web--so they always use the most recent version available.
Back to top

How can I launch applications with Java Web Start?

You initially launch a new application by clicking on a link from a web page.

If you use an application frequently, create a shortcut from your desktop or from the Start Menu by allowing Java Web Start to place an icon on your desktop. Java Web Start may ask if you would like to create
shortcuts or an entry in the Start Menu. If you say "yes," all future launches of the application can start without a browser.

Java Web Start also provides an Application Cache Viewer which you can launch from the Java Control Panel. The Cache Viewer enables you to directly launch applications you have downloaded.

You can also launch an application from a command prompt by typing “javaws <jnlp_url>” where <jnlp_url is a url to the jnlp file of the application.
Back to top

Does it matter how I launch an application?

No, applications launch in the same manner no matter which method you use: from a web page, from the shortcut on the desktop, from the Start menu, or through the Java Application Cache Viewer.

Java Web Start always checks to see if a newer version of the application is available for use and automatically downloads it if so.

If the application you are using has not been digitally signed, Java Web Start will launch it in a restricted and secure execution environment. An application that is not signed, or one that you do not trust, will never be run with unrestricted access to your local system or network.
Back to top

What are the system requirements for Java Web Start?

Any client system that supports the Java version 1.2.2 or higher can use Java Web Start. Java Web Start works with virtually all browsers.
Back to top

What platforms does Java Web Start run on?

Sun Microsystems provides versions for Windows 98/NT/2000/XP/2003, Solaris Operating Environment (SPARC and Intel editions) and Linux/i486. Apple provides a version for their OS X release.
Back to top

What are the server requirements for Java Web Start?

Java Web Start uses HTTP for communication between the client and the server. You can use a standard web server to host an application. If you require additional services, such as version-based downloading, incremental updates, or pack200 compression for your applications, the web server will need to support servlets or Java Server Pages. A sample servlet implementing these features is provided in the samples directory of the JDK.
Back to top

Is Java Web Start based on a standard?

Yes. Java Web Start 1.5.0 is the product-quality reference implementation of Java Network Launching Protocol (JNLP) technology, which was developed through the Java Community Process. JNLP is specification number JSR 056. Other platform vendors are encouraged to port Java Web Start to their platform or implement the specification.

For more information, see the JNLP specification.
Back to top

Can I implement my own Java Web Start?

The underlying technology for Java Web Start, the Java Network Launching Protocol and API is being developed through the Java Community Process, so you can implement this protocol in any product. However additional licensing and terms must be met to implement any JCP technology including the JNLP technology.
Back to top

What are the supported browsers?

Java Web Start supports primarily Internet Explorer 4 or higher and Mozilla. However any browser can launch JNLP files if you have set the MIME-type association correctly. Java Web Start uses the browser's settings and may launch a browser to show a URL; this feature may not work with unsupported browsers.
Back to top

Is there a comprehensive list of online resources for Java Web Start?

  • Java Web Start documentation page

  • : Developer's Guide

  • Java Web Start Discussion Forums: Oracle Forum Home

  • JSR-56: http://jcp.org/en/jsr/detail?id=56

Back to top

Can I deploy any application with Java Web Start?

Java Web Start is an application launcher for Java applications that are written to be web-deployed.

An application must be delivered in a set of JAR files and all application resources, such as images, configuration files, and native libraries must be included in the JAR files. The resources must be looked up using the method ClassLoader.getResource() or an equivalent method. Java Web Start only transfers JAR files from the web server to the client.

If an application is written to run in a restricted execution environment (sandbox), then access to disk is not permitted and the application may only connect to the host on which it resides.
Back to top

Is Java Web Start a software distribution mechanism like Marimba and MS SMS?

Java Web Start is an application launcher for Java applications. It allows easy distribution of full-featured applications based on the Java platform from a web server to a client machine with minimal user interaction.

The software distribution technology is only one aspect of Java Web Start. It also provides security, updates to the applications, ease-of-use for end users, and flexibility for developers when they create the applications.
Back to top

Is Java Web Start an application installer?

Java Web Start is an application launcher for Java applications that are written to be web-deployed. Java Web Start caches resources locally on the disk, but also provides a secure execution environment and a virtually transparent updating facility for applications. The end user does not need to manually initiate a software update because the application is updated each time it is used.
Back to top

What version of the Java platform does Java Web Start work with?

Java Web Start launches only applications written for the Java platform versions 1.2.2 and higher.
Back to top

How does Java Web Start relate to Java Plug-in Technology (applets)?

The two approaches are very similar. The key difference is in the user experience. If the Java application/applet needs to interact with a web page and be tightly bound to a web browser, then applets may be the solution. On the other hand, if browser independence is important, then Java Web Start is the deployment platform of choice. There are a number of other differences, but this is the fundamental difference.

Java Plug-in technology enables users to run Java applets inside a browser.

Java Web Start enables users to download full-featured applications with any browser. Once they have downloaded and launched an application, the browser can be closed, while the application continues working. The application does not depend on an open browser to function. The browser can be shut down or you can go to a different web page and the application will continue running.
Back to top

Technical Questions

Do I need to change my application to work with Java Web Start?

If your application is written to the Java 2 platform, and is delivered as a set of JAR files, there should be no need to revise your application. Make sure that your application retrieves all its resources (such as images and resource bundles) from a JAR file, since Java Web Start launches an application by invoking the public static void main(String[] args) method.

If your application needs unrestricted access to the system, (for example, network or disk access), you will need to sign your code.
Back to top

Is there a migration path from applets to applications?

Java Web Start is primarily designed for application deployment. You specify all requirements for your application in the JNLP file, and off you go. It does provide the ability to launch applets in much the same way as the traditional AppletViewer. The built-in AppletViewer provides an easy migration path for existing applets that want to take advantage of Java Web Start. However, it is not intended to be a full implementation of the Plug-In. The Plug-In is the primary launching vehicle for applets. The built-in AppletViewer in Java Web Start has limitations, for example, you cannot specify class files as resources and it does not accept policy files.
Back to top

Is there a way to pass VM arguments to the Java Runtime?

Java Web Start allows certain JVM flags to be set with the java-vm-args attribute of the j2se element (see Developer's Guide). Allowing the complete set could compromise security as well as limit portability across different platforms and implementations. You can set the maximum and initial heap size using the initial-heap-size and max-heap-size attributes of the j2se element, for example:

<j2se version="..." max-heap-size="100M"/>

Back to top

I don't want to rely on a server timestamp. How can I specify a versioned JAR and how can I get incremental updates of JARs?

Java Web Start supports versioned JARs and incremental updates. You can specify exact versions of the JAR files you want, instead of relying on timestamp information to determine if an update is available. Using version IDs also allows you to provide incremental updates from one version to another. See the JNLP Specification or the Developer's Guide for details.
Back to top

Are JAR files shared between applications?

Each JAR file that a JNLP Client (such as Java Web Start) downloads, is uniquely identified with a URL. If two JNLP files use the same URL, then the resource will only be downloaded once and shared. This is similar to the caching implementations used by web browsers.
Back to top

How can I provide my own splash screen?

Java Web Start needs to put up the initial splash screen while Java is loading. For subsequent access, you can specify an image file to use for the splash screen in the JNLP file with the tag

<icon href="mysplash.jpg" kind="splash"/>

where mysplash.jpg is the image file for your splash screen. The first time your application runs, it will use the standard splash screen. After that, it will use the image you provide.
Back to top

How can I save the application state on the local system?

A sandboxed application can store state using the PersistenceService API. This API is similar to cookies for HTML pages. Thus, it is a secure way to store persistent information on the client computer. For more information, see:

  • JNLP Specification

  • Java Web Start Developers Guide

Back to top

My application requires a specific version of the JRE. How do I specify this my JNLP file?

The tag <j2se version="versionNum"> specifies a platform version, where versionNum is 1.2, 1.3, 1.4, or 1.5.

You can request a specific product version by including a vendor URL in the href attribute. For Oracle's JREs, the URL is http://javadl.sun.com/webapps/jawsautodl/AutoDL/j2se For example, the following J2SE tag will request any Sun 1.3.1 implementation:

<j2se version="1.3.1*" href="http://javadl.sun.com/webapps/jawsautodl/AutoDL/j2se"/>

You can see all the versions of the installed JREs in the Java tab of the Java Control Panel.
Back to top

Can I rely on Class-Path in the manifest file?

Java Web Start does not support the Class-Path entry in the manifest file. The Class-Path attribute is entirely file-centric, whereas Java Web Start and JNLP is web-centric, i.e., based on URLs. Thus, the two models do not merge easily.

Instead of relying on the Class-Path entry, you can list multiple JAR files in the JNLP file, for example:

<resources>
 <jar href="A.jar"/>
 <jar href="B.jar"/>
</resources>

In a JNLP file, you can factor out dependencies on a set of JAR files to another JNLP file using the <extension... > element. Thus, you can achieve the same kind of re-usability and ease of maintenance as you do with the Class-Path entry. This feature is described in the specification.

JNLP also implements a just-in-time downloading mechanism, similar to applets. For each resource in a JNLP file, you can specify which parts should be eagerly or lazily downloaded. Eagerly loaded resources are loaded before the application is launched, lazily loaded resources later. Default is eager download. Furthermore, the specification includes an API for which you can programatically query Java Web Start about which resources are available and request them to be downloaded. Thus, you can write download/network aware applications.

See the JNLP specification for more information.
Back to top

Can I use Java Web Start even if my application depends on or uses native code?

You can use Java Web Start to deploy Java Technology-based applications that depend on native code such as DLLs and SOs. Use the <nativelib ...> element to specify required native libraries. See the Developer's Guide for details.
Back to top

How can I load resources within my application using Class.forName and ClassLoader.getSystemClassLoader?

Java Web Start uses a user-level classloader to load all the application resources specified in the JNLP file. This classloader implements the security model and the downloading model defined by the JNLP specification. This is no different than how the AppletViewer or the Java Plug-In works.

This has the, unfortunate, side-effect that Class.forName will not find any resources that are defined in the JNLP file. The same is true for looking up resources and classes using the system class loader (ClassLoader.getSystemClassLoader).

To find application resources in Java Web Start, use the classloader that loaded your application, for example use the following call in the in the application;s main thread:

this.getClass().getClassLoader();

You can also use:

Thread.getCurrent().getContextClassLoader();
Back to top

How can I launch Java Web Start from the command line?

You can launch Java Web Start from the command line as follows:

javaws [options] your-app-JNLP-URL

where your-app-JNLP-URL is the location of your application's JNLP file. For example, the following command starts the Dynamic Tree Demo application (from the Java Tutorials):

javaws http://docs.oracle.com/javase/tutorialJWS/deployment/webstart/ex6/webstart_ComponentArch_DynamicTreeDemo/dynamictree-webstart.jnlp

For complete command line syntax see: the Developer's Guide
Back to top

How do I use multiple JAR files signed by different certificates?

The JNLP 1.0 specification requires all JAR files used in a JNLP file to be signed by the same certificate. This restriction avoids requiring the user to accept multiple certificates from the same source, and enables Java Web Start to know if the user has accepted all certificates used for an application.

However, Java Web Start can use multiple JAR files signed by different certificates, by using the component extension mechanism and multiple JNLP files. The only requirement is that the JAR files contain code from different packages. So, instead of the following:

<jar href="myjar1.jar"/>
<jar href="jh.jar"/>

Use the following:

<jar href="myjar1.jar"/>
<extension name="Java Help" href="help.jnlp"/>

Then add a help.jnlp file with the following contents:

<?xml version="1.0" encoding="utf-8"?>
 <jnlp spec="1.0+"
codebase="http://ws503" href="Help.jnlp">
 <information>
<title>JavaHelp</title>
<vendor>Sun Microsystems, Inc.</vendor>
 </information>
<resources>
<jar href="jh.jar"/>
</resources>
 <component-desc/>
</jnlp>

Back to top

How do I detect if Java Web Start is installed?

You can write a short JavaScript or VBScript to detect if Java Web Start is installed. See the Developer's Guide for details.
Back to top

Why does my browser shows JNLP file as plain text ?

This is most likely happening because your web server is not aware of the proper MIME type for JNLP files. Java Web Start requires only one change to your web server, that is creating an association between the file extension, typically jnlp, and the MIME type, application/x-java-jnlp-file. The steps for doing this vary depending upon the web server you are using.

Furthermore, if your corporation uses a proxy server, ensure that the update versions of the files are returned, by updating the time stamp of the resources on the web server such that the proxies will update their caches.
Back to top

Why does Java Web Start always reload JAR files from IIS server?

If a timestamp of the file on the IIS server is in the future IIS returns current-time as last-modified time. This makes Java Web Start to reload the JARs since time-stamp is always newer.
Back to top

Can I use Pack200 compression with the JnlpDownloadServlet?

Yes. The JnlpDownloadServlet distributed in the samples directory of the JDK now supports Pack200. If you deploy yourfile.jar along with yourfile.jar.pack.gz the packed file will be downloaded when the client is running Java Web Start 1.5.0 or later.
 Back to top

What is the best way to ensure only one instance of my application is run?

Use the SingleInstanceService to register as a singleton as soon as your application starts up. Re-invoking your application before it is registered as a singleton will cause another Java VM to start up.

Make sure to unregister before your program exits.
 Back to top

When will properties set in the jnlp file get set?

Normally, properties in the jnlp file will not be set until the first resource listed in that jnlp file is loaded. This insures the properties are set before any of your code is run, however some properties need to be set before other packages are loaded. Some properties are considered to be “secure” by Java Web Start, and, when found in the main jnlp file, will be passed as arguments to the invoking VM (-Dname=value).

The list of “secure” properties for this version can be found in the Developer's Guide
Back to top

What causes the file not found message for the downloaded jnlp file?

You click on a jnlp file, and Internet Explorer downloads the file, then launches Java Web Start, but you get the message: “Could not load file/URL specified: C:\Documents and Settings\...\application[1].jnlp”.

This problem is specific to Internet Explorer. Although this can be caused by a full cache, or turning off the cache in IE, it is usually caused by a no-cache directive coming from either the web server or the proxy server. IE will honor this directive, and not write the jnlp file to disk, so Java Web Start cannot find it. This frequently happens when upgrading a tomcat based server. Later versions set the no-cache directive by default for any resource that is within a security-constraint in web.xml. Try taking the relevant URI out of the security constraint in web.xml.
Back to top

How can I use signed jars (such as JCE extensions) signed for other purposes?

Beginning with Java Web Start 1.5.0, you can multiply sign the jar, adding code signing certificates over another existing certificate chain. With previous versions, you would either have to run the jar as a component extension w/o all-permissions, or strip the existing certificates before adding code signing certificates. (which in many cases rendered the package inoperable.)
 Back to top

Why can't I use the Association feature on some linux platforms with Gnome?

The association feature specifically requires libgnomevsf-2.so. If this library is not present, associations are not supported.
 Back to top

How do I set up my server to broadcast the jnlp mime type?

Each web server has a specific way in which to add MIME types. For example, for the Apache web server you must add the following line to the .mime.types configuration file:

application/x-java-jnlp-file JNLP

Check the documentation for the specifics of your web server.
Back to top

How do I set up my server to use the JnlpDownloadServlet?

See the Developers Guide section on using the servlet. The application need not be packaged in a Web Archive.
 Back to top

How are Applications uniquely identified?

An application is normally identified by it's href (the url to it's jnlp file.) If there is no href to the jnlp file, it is identified by the href to it's main jar file. If multiple applications share the same main jar file, they must contain an href, or they will be treated as the same app.

In version 1.5.0 and beyond, the Java Application Cache Viewer, will show all applications, even those w/o an href. The Viewer can only launch an application online, if it has an href. Without an href, it can launch offline if the jnlp file allows (contains <offline-allowed>)

In previous versions, the Application Manager will only show those applications with an href.

The same thing applies to creating shortcuts. In 1.5.0 you can only create a shortcut to launch online if there is an href, and can only create an offline shortcut if <offline-allowed> is specified. In 1.4.2, you can only create shortcuts to applications with an href.
Back to top

How do I create multiple file-extension/mime-type associations with a JNLP application?

When creating multiple file-extension/mime-type associations with your JNLP application, it's recommended that you use multiple association tags. Also, both the file-extension and mime-type must be specified for each association tag. For example:

    <association extensions="aaa" mime-type="x-application/aaa"/>
    <association extensions="bbb" mime-type="x-application/bbb"/>
Back to top

Why does FindClass() sometimes fail when called from native code?

When jni code that may be called on the EventDispatch Thread calls findClass() then it may fail. For more information, see the FindClass function.

Security Questions

How secure is Java Web Start?

Security is a key consideration of the Java Web Start design. In Java Web Start all applications are launched by default in a secure "sandbox."
Back to top

What is a secure sandbox?

Applications in the secure sandbox have restricted access to local computing resources such as the disk and network.
Back to top

How is the Java Web Start secure sandbox more flexible than the applet sandbox?

All applications, by default, are run in a sandboxed environment, similar to the applet sandbox. However, Java Web Start provides a secure API that enables an application to import and export files from the local disk under the user's control. The API includes dialog boxes for operations such as saving a file and opening a file that are actually rendered by Java Web Start, and not by the application itself.

This sandbox design is similar to what you can do with HTML. A file input field in an HTML form enables a user to pick a file from the local disk and submit the name (excluding path) and content to the web server. Similarly, most browsers support the 'Save as...' option.
Back to top

How can I enable my application to gain unrestricted access to the system?

An application requesting unrestricted system access must be digitally signed. The first time a user launches such an application, a security dialog box will appear. Before running the application, Java Web Start will prompt the user to accept the digital certificate. After the user has accepted the certificate, subsequent invocations will not show the security dialog box.
Back to top

Is there support for encrypted download of JAR files?

Support for encrypting data transferred from the server to the client is very important. This is an important point on our issue list, and we will definitely make sure that HTTPS libraries will work with applications that are launched with Java Web Start. The HTTPS support might be in an optional package that you need to specify that your application depends on.

Encrypting the JAR files transferred from the server to the client may not be necessary. The reason is, even if the class files where encrypted on the wire, they will have to be decrypted on the client side and stored to disk, so the JVM will be able to load the classes. Thus, it could be fairly simple for a cracker to get around the encryption of the JAR files.

Instead, what is important for JAR files is that they can be signed, so the user can be absolutely sure that the application is from the vendor he expect it to be from. This is already supported.
Back to top

Can I use NTLM authentication with Java Web Start?

NTLM support was added to Java 1.4.2 on Windows platforms only. You can use NTLM authentication with Java Web Start in 1.4.2 and beyond. The JAuthenticator dialog may contain some misleading text when using NTLM with Java Web Start 1.4.2, but this is fixed in Java Web Start 1.5.0.
Back to top

Can I use HTTPS protocol with Java Web Start?

HTTPS support was added to Java in version 1.4. You can use use HTTPS protocol for Java Web Start resources starting in version 1.2, but may encounter one of several problems that were addressed in Java Web Start 1.4.2. It is recommended to use at least Java Web Start 1.4.2 if using HTTPS protocol.
Back to top

Are there other online resources to learn more about the security tools?

See the following:

  • Signing JAR Files

  • Security in Java Rich Internet Applications Guide

Back to top

Known Bugs

4825415: Web Start desktop integration and security dialogs disappear in 1.4.2

In version 1.4.2 only.

This is the problem where the desktop integration dialog fights for focus with a modal dialog displayed by the application, or the dialog is lost behind another application window.

This is fixed in versions 1.4.2_06 and 1.5
Back to top

4491398: Dependent DLL resource problem

In all versions.

If you have multiple native libraries, you must load each library with System.LoadLibrary, before loading any other that references it. This may become impossible if libraries have circular dependancies.
Back to top

5008460: Web Start fails if path contains spaces and TraceSecurity is turned on.

In versions 1.2 and 1.4.2

If TraceSecurity is turned on, you may get an exception on Windows platforms if there is a space in the path to the cache directory. If you have this problem turn off the TraceSecurity debugging switch (<property name=”javaws.debug.0” name=”-TraceSecurity” />.

This is fixed in version 1.5.
Back to top

5074087: If related-content is specified w/o a title on Windows, application cannot start.

In version 1.5.0.

In the specification of the jnlp file, it is legal to specify a related-content element without a title sub-element. However if this is done on windows platforms, an exception will be thrown when the shortcut to the related content is installed, and the program cannot be run. To work around this problem, always include a title for related-content elements.
Back to top

5074524: First jar of unsigned extension must be downloaded eagerly.

In all versions.

If a component extension is used, the first jar in it will be download eagerly, even if it is marked lazy.
Back to top

5047548: Lazy downloading of parts with packages is broken.

In all versions.

If you use the part and package mechanisms to declare what packages are included in what jar files, you should be able to skip downloading of any lazy jars so declared, when accessing a non-existent resource not in any of the declared packages. This does not work, and without Jar Indexing implemented, there is no way to prevent all jars from being downloaded.
Back to top

5074526: ExtenededService file APIs show security dialog even if app is signed.

In version 1.5.0.

When using the FileOpen Service, the security dialog will only show if the application does not have file access permissions. This is not true with the new ExtendedService OpenFile, and OpenFiles methods, the security dialog shows anyway.
Back to top

4925768: No support for system level shortcuts in Gnome.

In version 1.5.0.

When importing applications into the system cache with -shortcut, or running the Cache Viewer in system mode and creating shortcuts. The shortcuts should be created for all users. This works in Windows, but not on Solaris, Linux, or Mac OS X with Gnome.
Back to top

5072969: Startup errors causing Web Start to appear to hang.

In all versions.

If an Exception or other Throwable is not caught by Java Web Start. The main run method may terminate without calling System.exit(). This makes application appear to hang (sometimes with DownloadProgress window showing with no progress).

In 1.4.2 this can happen when the Application or Java Web Start throws an Error (such as a NoSuchMethodError). You may need to turn on logging to a file and run with <property name=”javaws.debug.0” value=”+TraceIgnoredExceptions” /> to see the Error.

In 1.5.0 this is only known to happen if static code in the applications main class throws an Error (such as a NoSuchMethodError).
Back to top

5074530: Web Start not picking up the correct JRE.

In all versions.

When Java Web Start finds multiple JRE's that satisfy the requirements of the j2se elements version attribute in the jnlp file, it should always use the latest matching version.

In 1.4.2 it will usually just use the first matching version found.

In 1.5.0 it will usually use the latest version, but under some specific circumstances will still use an earlier one.
Back to top

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Web Start Guide

Related Documents
Java Rich Internet Applications Guide

Overview

Java Web Start Technology
Where to Find Java Web Start Technology
 Using Java Web Start Software
Requirements

Setting up the Web Site

Introduction
Basic Steps

Creating the Web Page That Launches the Application

Introduction
Detecting if Java Web Start is installed on Netscape
Detecting if Java Web Start is installed on IE, and if so, the version number
Launching the application if Java Web Start is Installed—or providing a link for auto-install or general download page
Creating an auto-install page

Application Development Considerations

Introduction
Retrieving Resources from JAR files
Security and Code Signing
Signing JAR Files with a Test Certificate
How to Encode JNLP Files
Dynamic Download of HTTPS Certificates

JnlpDownloadServlet Guide

Introduction
Using JnlpDownloadServlet
Substitutions
Version, Extension, and Platform Requests
Incremental Updates with JARDiff
Faster Downloads with Pack200
Other Features
Building JnlpDownloadServlet
Reference

JNLP File Syntax

Introduction
The jnlp Element
The information Element
The security Element
The resources Element
The application-desc Element
The applet-desc Element

JNLP API Examples

Introduction
Using a BasicService Service
Using a ClipboardService Service
Using a DownloadService Service
Using the DownloadService2 Service
Implementing the DownloadServiceListener Service
Using the IntegrationService Service
Using a FileOpenService Service
Using a FileSaveService Service
Using a PrintService Service
Using a PersistenceService Service
Using FileContents
Using a JNLPRandomAccessFile
Using a SingleInstanceService Service
Using an ExtendedService Service

The javaws Command Line Interface

Appendices:

FAQ
JNLP API (JavaDoc)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNLP API Examples

This chapter includes the following topics:

  • Introduction
  • Using the BasicService Service
  • Using the ClipboardService Service
  • Using the DownloadService Service
  • Using the DownloadService2 Service
  • Implementing the DownloadServiceListener Service
  • Using the FileOpenService Service
  • Using the FileSaveService Service
  • Using the IntegrationService Service
  • Using the PrintService Service
  • Using the PersistenceService Service
  • Using FileContents
  • Using a JNLPRandomAccessFile
  • Using the SingleInstanceService Service
  • Using the ExtendedService Service

Introduction

The JNLP API is designed to provide additional information to the application that would otherwise not be available using the standard Java(TM) Platform Standard Edition API. The following code examples show how the following services can be used: BasicService, ClipboardService, DownloadService, FileOpenService, FileSaveService, PrintService, and PersistenceService.

The public classes and interfaces in the JNLP API are included in the jnlp.jar file. This JAR file must be included in the classpath when compiling source files that use the JNLP API. For example on Windows:

javac -classpath .;jnlp.jar *.java

The jnlp.jar file is included in the JNLP Developers Pack.

Using the BasicService Service

The javax.jnlp.BasicService service provides a set of methods for querying and interacting with the environment similar to what the AppletContext provides for a Java Applet.

The showURL method uses the JNLP API to direct the default browser on the platform to show the given URL. The method returns true if the request succeeds, otherwise false.

import javax.jnlp.*;
   ...

   // Method to show a
URL
boolean showURL(URL url) {
try {
// Lookup the javax.jnlp.BasicService object
BasicService bs =
(BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
// Invoke the showDocument method
return bs.showDocument(url);
}
catch(UnavailableServiceException ue) {
// Service is not supported
return false;
}
}

Using the ClipboardService Service

The javax.jnlp.ClipboardService service provides methods for accessing the shared system-wide clipboard, even for applications that are running in the restricted execution environment.

Java Web Start will warn the user of the potential security risk of letting an untrusted application access potentially confidential information stored in the clipboard, or overwriting contents stored in the clipboard.

import javax.jnlp;
    ...

    private ClipboardService cs;

    try {
        cs = (ClipboardService)ServiceManager.lookup
                 ("javax.jnlp.ClipboardService");
    } catch (UnavailableServiceException e) {
        cs = null;
    }

    if (cs != null) {
// set the
system clipboard contents to a string selection
StringSelection ss =
new StringSelection("Java Web Start!");
cs.setContents(ss);
// get the
contents of the system clipboard and print them
Transferable tr =
cs.getContents();
if
(tr.isDataFlavorSupported(DataFlavor.stringFlavor)) {
try {
String s =
(String)tr.getTransferData(DataFlavor.stringFlavor);
System.out.println("Clipboard contents: " + s);
} catch (Exception e) {
e.printStackTrace();
}
}
}

Using the DownloadService Service

The javax.jnlp.DownloadService service allows an application to control how its own resources are cached.

The service allows an application to determine which of its resources are cached, to force resources to be cached, and to remove resources from the cache.

import javax.jnlp.*;
    ...

    DownloadService ds;

    try {
        ds = (DownloadService)ServiceManager.lookup("javax.jnlp.DownloadService");
    } catch (UnavailableServiceException e) {
        ds = null;
    }

    if (ds != null) {

        try {
            // determine if a particular resource is cached
            URL url =
                    new URL("http://www.example.com/draw.jar");
            boolean cached = ds.isResourceCached(url, "1.0");
            // remove the resource from the cache
            if (cached) {
                ds.removeResource(url, "1.0");
            }
            // reload the resource into the cache
            DownloadServiceListener dsl = ds.getDefaultProgressWindow();
            ds.loadResource(url, "1.0", dsl);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Using the DownloadService2 Service

The javax.jnlp.DownloadService2 service, introduced in the Java SE 6 update 18 release, provides the following methods:

  • getCachedResources – Lists cached resources that match the given version, URL and resource type.
  • getUpdateAvailableResources – Checks and lists resources for which updates are available. If an application uses the version download protocol, specify a version in the DownloadService2.ResourceSpec. If not, specify a null value for version.

An instance of the DownloadService2.ResourceSpec class specifies details about the resource to be checked.

import javax.jnlp.*;
...
DownloadService2 service = (DownloadService2)
                        ServiceManager.lookup("javax.jnlp.DownloadService2");

// create a new instance of ResourceSpec. In this example:
// - resource is downloaded from a directory on http://foo.bar.com:8080
// - version is 2. [0-9]+
// - resource type is JAR
ResourceSpec spec = new ResourceSpec("http://foo.bar.com:8080/.*", 2.*, service.JAR)

// returns all cached resources that match the given ResourceSpec
ResourceSpec results[] = service.getCachedResources(spec);

// returns all resources for which an update is available on the
// server http://foo.bar.com:8080.
results = service.getUpdateAvailableResources(spec);

Implementing the DownloadServiceListener Service

The javax.jnlp.DownloadServiceListener service provides methods to specify a customized loading progress indicator that indicates the progress of an application's download. See the Implementing a Customized Loading Progress Indicator topic for more information.

Using the FileOpenService Service

The javax.jnlp.FileOpenService service provides methods for importing files from the local disk, even for applications that are running in the restricted execution environment.

This interface is designed to provide the same kind of of disk access to potentially untrusted Web-deployed applications that a Web developer has when using HTML. HTML forms support the inclusion of files by displaying a file open dialog.

import javax.jnlp.*;
    ...

    FileOpenService fos;

    try {
        fos = (FileOpenService)ServiceManager.lookup("javax.jnlp.FileOpenService");
    } catch (UnavailableServiceException e) {
        fos = null;
    }

    if (fos != null) {
        try {
            // ask user to select a file through this service
            FileContents fc = fos.openFileDialog(null, null);
            // ask user to select multiple files through this service
            FileContents[] fcs = fos.openMultiFileDialog(null, null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Using the FileSaveService Service

The javax.jnlp.FileSaveService service provides methods for exporting files to the local disk, even for applications that are running in the restricted execution environment.

This interface is designed to provide the same level of disk access to potentially untrusted Web-deployed applications that a Web browser provides for contents that it is displaying. Most browsers provide a Save As... dialog as part of their user interface.

import javax.jnlp.*;
    ...

    FileSaveService fss;
    FileOpenService fos;

    try {
        fos = (FileOpenService)ServiceManager.lookup("javax.jnlp.FileOpenService");
        fss = (FileSaveService)ServiceManager.lookup
                                   ("javax.jnlp.FileSaveService");
    } catch (UnavailableServiceException e) {
        fss = null;
        fos = null;
    }

    if (fss != null && fos != null) {
        try {
            // get a file with FileOpenService
            FileContents fc = fos.openFileDialog(null, null);
            // one way to save a file
            FileContents newfc = fss.saveFileDialog(null, null,
            fc.getInputStream(), "newFileName.txt");
            // another way to save a file
            FileContents newfc2 = fss.saveAsFileDialog(null, null, fc);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Also see Using FileContents.

Using the IntegrationService Service

The javax.jnlp.IntegrationService service, introduced in the Java SE 6 update 18 release, provides methods for programmatic management of shortcuts. By using this service, an application can perform the following operations:

  • An application can create a desktop shortcut.
  • An application can create a menu shortcut.
  • An application can query and delete shortcuts.
  • An application can create, query, and delete associations of an application with a mime-type or file extensions.
import javax.jnlp.*;
...

IntegrationService is = null;
try {
    is = (IntegrationService) ServiceManager.lookup("javax.jnlp.IntegrationService");
} catch(UnavailableServiceException use){
    ...
}

// creates a desktop and system menu shortcut; returns true if the shortcuts
// were created successfully
boolean result = is.requestShortcut(true, true, null);

//removes all shortcuts for application
result = is.removeShortcuts();

// checks to see if there are shortcuts for the application
result = is.hasMenuShortcut() && is.hasDesktopShortcut());

// associates the application with the specified mime-type and file extensions
String mime = "x-application/aaa";
String [] exts = {"aaa", "abc"};
result = is.requestAssociation(mime, exts);

// checks if the application is associated with the specified mime-type and file extensions
result = is.hasAssociation(mime, exts);

// removes association between the application and the specified mime-type and file extensions
is.removeAssociation(mime, exts);

Using the PrintService Service

The javax.jnlp.PrintService service provides methods for access to printing, even for applications that are running in the restricted execution environment.

Using this service, an application can submit a print job. Java Web Start will then show this request to the user and, if accepted, queue the request to the printer.

In Java Web Start 5.0, you can now directly use the Java Printing APIs, and Java Web Start will pop up a security dialog asking the user to grant PrintPermission if the application is running in a sandbox. There is no need to use the JNLP Printing APIs anymore. You can have full access to the Java Printing APIs in any JNLP application.

import javax.jnlp.*;
    ...

    PrintService ps;

    try {
        ps = (PrintService)ServiceManager.lookup("javax.jnlp.PrintService");
    } catch (UnavailableServiceException e) {
        ps = null;
    }

    if (ps != null) {
        try {

            // get the default PageFormat
            PageFormat pf = ps.getDefaultPage();

            // ask the user to customize the PageFormat
            PageFormat newPf = ps.showPageFormatDialog(pf);

            // print the document with the PageFormat above
            ps.print(new DocToPrint());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    // Code to construct the Printable Document
    class DocToPrint implements Printable {
        public int print(Graphics g, PageFormat pageformat, int PageIndex){
            // code to generate what you want to print
        }
    }

Using the PersistenceService Service

The javax.jnlp.PersistenceService service provides methods for storing data locally on the client system, even for applications that are running in the restricted execution environment.

The service is designed to be somewhat similar to that which the cookie mechanism provides to HTML-based applications. Cookies allow a small amount of data to be stored locally on the client system. That data can be securely managed by the browser and can only be retrieved by HTML pages which originate from the same URL as the page that stored the data.

import javax.jnlp.*;
    ...

    PersistenceService ps;
    BasicService bs;

    try {
        ps = (PersistenceService)ServiceManager.lookup("javax.jnlp.PersistenceService");
        bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
    } catch (UnavailableServiceException e) {
        ps = null;
        bs = null;
    }

    if (ps != null && bs != null) {

        try {
            // find all the muffins for our URL
            URL codebase = bs.getCodeBase();
            String [] muffins = ps.getNames(url);

            // get the attributes (tags) for each of these muffins.
            // update the server's copy of the data if any muffins
            // are dirty
            int [] tags = new int[muffins.length];
            URL [] muffinURLs = new URL[muffins.length];
            for (int i = 0; i < muffins.length; i++) {
                muffinURLs[i] = new URL(codebase.toString() + muffins[i]);
                tags[i] = ps.getTag(muffinURLs[i]);
                // update the server if anything is tagged DIRTY
                if (tags[i] == PersistenceService.DIRTY) {
                    doUpdateServer(muffinURLs[i]);
                }
            }

            // read in the contents of a muffin and then delete it
            FileContents fc = ps.get(muffinURLs[0]);
            long maxsize = fc.getMaxLength();
            byte [] buf = new byte[fc.getLength()];
            InputStream is = fc.getInputStream();
            long pos = 0;
            while((pos = is.read(buf, pos, buf.length - pos)) > 0) {
                // just loop
            }
            is.close();

            ps.delete(muffinURLs[0]);

            // re-create the muffin and repopulate its data
            ps.create(muffinURLs[0], maxsize);
            fc = ps.get(muffinURLs[0]);
            // don't append
            OutputStream os = fc.getOutputStream(false);
            os.write(buf);
            os.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

   void doUpdateServer(URL url) {
        // update the server's copy of the persistent data
        // represented by the given URL
        ...
        ps.setTag(url, PersistenceService.CACHED);
   }

Using FileContents

javax.jnlp.FileContents objects encapsulate the name and contents of a file. An object of this class is used by the FileOpenService, FileSaveService and PersistenceService. Here is an example of how an instance of a FileContents can be used to read from and write to a file:

import javax.jnlp.*;
    ...

    FileOpenService fos;

    //Initialize fos (see Using the FileOpenService Service example)
    ...

    if (fos != null) {

        try {

            // get a FileContents object to work with from the
            // FileOpenService
            FileContents fc = fos.openFileDialog(null, null);

            // get the InputStream from the file and read a few bytes
            byte [] buf = new byte[fc.getLength()];
            InputStream is = fc.getInputStream();
            int pos = 0;
            while ((pos = is.read(buf, pos, buf.length - pos)) > 0) {
                // just loop
            }
            is.close();

            // get the OutputStream and write the file back out
            if (fc.canWrite()) {
               // don't append
               OutputStream os = fc.getOutputStream(false);
               os.write(buf);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Using a JNLPRandomAccessFile

Instances of javax.jnlp.JNLPRandomAccessFile support both reading and writing to a random access file. A random access file behaves like a large array of bytes stored in the file system. Here is an example of how an instance of a JNLPRandomAccessFile can be used to write to a random access file:

import javax.jnlp.*;
    ...

    FileOpenService fos;

    //Initialize fos (see Using the FileOpenService Service example)
    ...

    if (fos != null) {
        try {
           // ask the user to choose a file to open
           FileContents fc = fos.openFileDialog(null, null);

           // attempt to increase the maximum file length
           long grantedLength = fc.getLength();
           if (grantedLength + 1024 > fc.getMaxLength()) {
               // attempt to increase the maximum file size defined by
               // the client
               grantedLength = fc.setMaxLength(grantedLength + 1024);
           }

           // if we were able to increase the maximum allowable file size,
           // get a JNLPRandomAccessFile representation of the file, and
           // write to it
           if (fc.getMaxSize() > fc.getLength() && fc.canWrite()) {
               JNLPRandomAccessFile raf = fc.getRandomAccessFile("rw");
               raf.seek(raf.length() - 1);
               raf.writeUTF("Java Web Start!");
               raf.close();
           }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Using the SingleInstanceService Service

The javax.jnlp.SingleInstanceService provides a set of methods for applications to register themselves as singletons, and to register listener(s) for handling arguments passed in from different instances of applications.

import javax.jnlp.*;
    ...

    SingleInstanceService sis;

    ...

    try {
        sis =
(SingleInstanceService)ServiceManager.lookup("javax.jnlp.SingleInstanceService");
    } catch (UnavailableServiceException e) { sis=null; }

    ...

    // Register the single instance listener at the start of your application

    SISListener sisL = new SISListener();
    sis.addSingleInstanceListener(sisL);

    ...

    // Remember to remove the listener before your application exits

    sis.removeSingleInstanceListener(sisL);
    System.exit(0);

    // Implement the SingleInstanceListener for your application

    class SISListener implements SingleInstanceListener {
        public void newActivation(String[] params) {

            // your code to handle the new arguments here

            ...
        }
    }

Using an ExtendedService Service

The javax.jnlp.ExtendedService provides additional support to the current JNLP API. It allows applications to open specific file(s) in the client's file system.

import javax.jnlp.*;
    ...

    ExtendedService es;

    ...

    try {
        es =
(ExtendedService)ServiceManager.lookup("javax.jnlp.ExtendedService");
    } catch (UnavailableServiceException e) { es=null; }

    ...

    // Open a specific file in the local machine

    File a = new File("c:\somefile.txt");

    ...

    // Java Web Start will pop up a dialog asking the user to grant permission
    // to read/write the file c:\somefile.txt

    FileContents fc_a = es.openFile(a);

    // You can now use the FileContents object to read/write the file

    ...

    // Open a specific set of files in the local machine

    File[2] fArray = new File[2];

    fArray[0] = a;
    fArray[1] = new File("c:\anotherFile.txt");

    // Java Web Start will pop up a dialog asking the user to grant permission
    // to read/write files in fArray

    FileContents[] fc_Array = es.OpenFiles(fArray);

    // You can now read/write the set of files in fc_Array using the
    // FileContents objects

    }

For detailed information on using javaws, see the javaws man page (Solaris, Linux, Mac OS X or Windows).

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNLP File Syntax

This chapter covers the following topics:

  • Introduction
  • Example
  • JNLP Elements
    • jnlp Element
    • information Element
    • security Element
    • update Element
    • resources Element
    • application-desc Element
    • applet-desc Element
    • component-desc Element
    • installer-desc Element

Introduction

The format used in this release is that specified in the Java Network Launching Protocol & API Specification (JSR-56) version 6.0. This document describes the most commonly used elements of a JNLP file. For a complete description of the format, refer to the specification.

JNLP File Contents

Element

Attributes

Description

Since

Required

jnlp

This is the main xml element for a jnlp file. Everything is contained within the jnlp element.

1.0

yes

spec

The spec attribute can be 1.0, 1.5.0, 6.0, 6.0.10, 6.0.18, 7.0, or a wildcard such as 1.0+. It denotes the minimum version of the JNLP Specification that this jnlp file can work with.

1.0

codebase

The codebase attribute specifies the base location for all relative URLs specified in href attributes in the JNLP file.

1.0

href

The href specifies the URL of the JNLP file itself.

1.0

version

The version of the application being launched, as well as the version of the JNLP file itself.

1.0

information

The information element contains other elements that describe the application and it's source.

1.0

yes

os

Specifies the operating systems for which this information element should be considered.

1.5.0

arch

Specifies the architecture for which this information element should be considered

1.5.0

platform

Specifies the platform for which this information element should be considered.

1.5.0

locale

Specifies the locale for which this information element should be considered.

1.5.0

title

The title element specifies the title of the application.

1.0

yes

vendor

The vendor element specifies the provider of the application.

1.0

yes

homepage

The homepage of the application.

1.0

href

A URL pointing to where more information on this application can be found.

1.0

yes

description

A short statement describing the application.

1.0

kind

An indicator as to what type of description this is, legal values are one-line, short, and tooltip.

1.0

icon

Describes an icon that can be used to identify the application to the user.

1.0

href

A URL pointing to the icon file, may be in one of the following formats: gif, jpg, png, ico.

1.0

yes

kind

Indicates the suggested use of the icon; can be: default, splash, or shortcut.

1.0

width

Can be used to indicate the resolution of the image.

1.0

height

Can be used to indicate the resolution of the image.

1.0

depth

Can be used to indicate the resolution of the image.

1.0

offline-allowed

Indicates that this application can operate when the client system is disconnected from the network.

1.0

shortcut

The shortcut element can be used to indicate an application's preferences for desktop integration.

1.5.0

online

Can be used to describe the application's preference for creating a shortcut to run online or offline.

1.5.0

install

The optional install attribute can be used in a shortcut element to describe the application's preference for being considered "installed". If the value is "true" the application prefers to be considered installed. The default value of the install attribute is "false". On Windows, this determines if the application appears in the Add and Remove Programs panel.

7.0

desktop

Can be used to indicate an application's preference for putting a shortcut on the users desktop.

1.5.0

menu

Can be used to indicate an application's preference for putting a menu item in the users start menus.

1.5.0

sub-menu

Can be used to indicate an application's preference for where to place the menu item.

1.5.0

association

Can be used to hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. If this element is included, either the offline-allowed element must also be included, or the href attribute must be set for the jnlp element.

1.5.0

extensions

Contains a list of file extensions (separated by spaces) that the application requests it be registered to handle.

1.5.0

mime-type

Contains the mime-type that the application requests it be registered to handle.

1.5.0

related-content

Describes an additional piece of related content that may be integrated with the application.

1.5.0

href

A URL pointing to the related content.

1.5.0

yes

update

The update element is used to indicate the preferences for how application updates should be handled by the JNLP Client.

6.0

check

Indicates the preference for when the JNLP Client should check for updates. It can be always, timeout, or background..

6.0

policy

Indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched. It can be always, prompt-update, or prompt-run.

6.0

1.0

security

This element can be used to request enhanced permissions.

1.0

all-permissions

Requests that the application be run with all permissions.

1.0

j2ee-application-client-permissions

Requests that the application be run with a permission set that meets the security specifications of the J2EE Application Client environment.

1.0

1.0

resources

Describes all the resources that are needed for an application.

1.0

yes

os

Specifies the operating system for which the resources element should be considered.

1.0

arch

Specifies the architecture for which the resources element should be considered.

1.0

locale

Specifies that the locales for which the resources element should be considered.

java (or j2se)

Specifies what version(s) of Java to run the application with.

6.0 (java)

version

Describes an ordered list of version ranges to use.

1.0

yes

href

The URL denoting the supplier of this version of java, and where it may be downloaded from.

1.0

java-vm-args

Indicates an additional set of standard and non-standard virtual machine arguments that the application would prefer the JNLP Client to use when launching Java.

1.0

initial-heap-size

Indicates the initial size of the Java heap.

1.0

max-heap-size

Indicates the maximum size of the Java heap.

1.0

jar

Specifies a JAR file that is part of the application's classpath.

1.0

yes

href

The URL of the jar file.

1.0

yes

version

The requested version of the jar file. Requires using the version-based download protocol

1.0

main

Indicates if this jar contains the class containing the main method of the application.

1.0

download

Can be used to indicate this jar may be downloaded eagerly, lazily, or for progress indication.

1.0 (6.0.18)

size

Indicates the downloadable size of the jar file in bytes.

1.0

part

Can be used to group resources together so they will be downloaded at the same time.

1.0

nativelib

Specifies a JAR file that contains native libraries in it's root directory.

1.0

href

The URL of the jar file.

1.0

yes

version

The requested version of the jar file. Requires using the version-based download protocol

1.0

download

Can be used to indicate this jar may be downloaded lazily.

1.0

size

Indicates the downloadable size of the jar file in bytes.

1.0

part

Can be used to group resources together so they will be downloaded at the same time.

1.0

extension

Contains pointer to an additional component-desc or installer-desc to be used with this application.

1.0

href

The URL to the additional extension jnlp file.

1.0

yes

version

The version of the additional extension jnlp file.

1.0

name

The name of the additional extension jnlp file

1.0

ext-download

Can be used in an extension element to denote the parts contained in a component-extension.

1.0

ext-part

Describes the name of a part that can be expected to be found in the extension.

1.0

yes

download

Can be used to indicate this extension may be downloaded eagerly or lazily.

1.0

part

Denotes the name of a part in this jnlp file to include the extension in.

1.0

package

Can be used to indicate to the JNLP Client which packages are implemented in which JAR files.

1.0

name

Package name contained in the jar files of the given part.

1.0

yes

part

Part name containing the jar files that include the given package name.

1.0

yes

recursive

Can be used to indicated that all package names beginning with the given name, can be found in the given part.

1.0

property

Defines a system property that will be available through the System.getProperty and System.getProperties methods.

1.0

name

Name of the system property.

1.0

yes

value

Value it will be set to.

1.0

yes

1.0

Note: A jnlp file must contain one of application-desc, applet-desc, component-desc, or installer-desc

1.0

yes

application-desc

Denotes this is the jnlp file for an application.

1.0

main-class

The name of the class containing the public static void main(String[]) method of the application.

1.0

yes

progress-class

The name of the class containing the implementation of DownloadServiceListener, that may be used to indicate download progress.

6.0.18

argument

Each argument contains (in order) an additional argument to be passed to main.

1.0

applet-desc

Denotes this is the jnlp file for an applet.

1.0

main-class

This is the name of the main Applet class.

1.0

yes

documentbase

The document base for the Applet as a URL.

1.0

name

Name of the Applet.

1.0

yes

width

The width of the applet in pixels.

1.0

yes

height

The height of the applet in pixels

1.0

yes

progress-class

The name of the class containing the implementation of DownloadServiceListener, that may be used to indicate download progress.

6.0.18

param

A set of parameters that can be passed into the applet.

1.0

name

The name of this parameter

1.0

yes

value

The value of this parameter

1.0

yes

component-desc

Denotes this is the jnlp file for a component extension.

1.0

progress-class

The name of the class containing the implementation of DownloadServiceListener, that may be used to indicate download progress.

6.0.18

installer-desc

Denotes this is the jnlp file for an installed extension.

1.0

main-class

The name of the class containing the public static void main(String[]) method of the installer.

1.0

yes

The JNLP file is an XML document. The following shows a complete example of a JNLP file.

Example

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp
  spec="6.0+"
  codebase="http://my_company.com/jaws/apps"
  href="swingset2.jnlp">
  <information>
    <title>SwingSet2 Demo Application</title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <homepage href="docs/help.html"/>
    <description>SwingSet2 Demo Application</description>
    <description kind="short">A demo of the capabilities
    of the Swing Graphical User Interface.</description>
    <icon href="images/swingset2.jpg"/>
    <icon kind="splash" href="images/splash.gif"/>
    <offline-allowed/>
    <association mime-type="application-x/swingset2-file"  extensions="swingset2"/>
    <shortcut online="false" install="false">
      <desktop/>
      <menu submenu="My Corporation Apps"/>
    </shortcut>
  </information>
  <information os="linux">
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html">
  </information>
  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-esa -Xnoclassgc"/>
    <jar href="lib/SwingSet2.jar"/>
  </resources>
  <application-desc main-class="SwingSet2"/>
</jnlp>

The example shows the basic outline of the document. The root element is jnlp, which has four subelements: information, security, resources, and application-desc. In addition, Java Web Start also supports launching applets by using the applet-desc element. The elements are described in more detail below.

JNLP Elements

jnlp Element

spec attribute: This attribute must be 1.0 or higher to work with this release. The default value is "1.0+". Thus, it can typically be omitted. Note that this version supports both spec version 1.0, version 1.5, and version 6.0, whereas previous versions support only 1.0 and 1.5. A jnlp file specifying spec="6.0+" will work with this version, but not previous versions of Java Web Start.

codebase attribute: All relative URLs specified in href attributes in the JNLP file are using this URL as a base.

href attribute: This is a URL pointing to the location of the JNLP file itself.

information Element

os attribute: This attribute contains a list of operating system names for this element. Read the discussion of the resources element later for a full discussion of the os attribute.

title element: The name of the application.

vendor element: The name of the vendor of the application.

homepage element: Contains a single attribute, href, which is a URL locating the home page for the Application. It is used by the Java Application Cache Viewer to point the user to a Web page where more information about the application can be found.

description element: A short statement about the application. Description elements are optional. The kind attribute defines how the description should be used. It can have one of the following values:

  • one-line: If a reference to the application is going to appear on one row in a list or a table, this description will be used.
  • short: If a reference to the application is going to be displayed in a situation where there is room for a paragraph, this description is used.
  • tooltip: If a reference to the application is going to appear in a tooltip, this description is used.

Only one description element of each kind can be specified. A description element without a kind is used as a default value. Thus, if Java Web Start needs a description of kind short, and it is not specified in the JNLP file, then the text from the description without an attribute is used.

All descriptions contain plain text. No formatting, such as with HTML tags, is supported.

icon element: Contains an HTTP URL to an image file in either GIF, JPEG, ICO, or PNG format. The icons are used to represents the application

  • during launch when Java Web Start presents the application to the user;
  • in the Java Application Cache Viewer;
  • in desktop shortcuts.

A 64x64 icon is shown during download; in the Java Application Cache Viewer and in desktop shortcuts a 32x32 icon is used. Java Web Start automatically resizes an icon to the appropriate size.

Optional width and height attributes can be used to indicate the size of the images.

The optional kind attribute can have one of the following values:

  • default: The specified image is used in the Java Application Cache Viewer. It is also used if an icon element with a particular kind attribute has not been specified. Not specifying the kind attribute is the same as specifying it with the default value.
  • splash: The specified image is used as the splash image on the second and subsequent launches of the application. During the initial launch of the application, before resources are downloaded, the default splash image is used.
  • shortcut: The specified image is used in desktop shortcuts.

A JNLP file can contain multiple icon elements that differ by their kind attribute. This enables you to specify different icon images for your application.

offline-allowed element: The optional offline-allowed element indicates if the application can be launched offline.

If offline-allowed is specified, then the application can be launched offline by the Java Application Cache Viewer, and shortcuts can be created which launch the application offline.

If an application is launched offline, it will not check for updates and the API call BasicService.isOffline() will return true.

The offline-allowed element also controls how Java Web Start checks for an update to an application. If the element is not specified—i.e., the application is required to be online to run—Java Web Start will always check for an updated version before launching the application. And if an update is found, the new application will be downloaded and launched. Thus, it is guaranteed that the user always runs the latest version of the application. The application, however, must be run online.

If offline-allowed is specified, Java Web Start will also check to see if an update is available. However, if the application is already downloaded the check will timeout after a few seconds, in which case the cached application will be launched instead. Given a reasonably fast server connection, the latest version of the application will usually be run, but it is not guaranteed. The application, however, can be run offline.

shortcut element: The optional shortcut element can be used to indicate an application's preferences for desktop integration. The shortcut element and its sub-elements provide hints that the JNLP Client may or may not use. The shortcut element can contain the optional online and install attributes, and the two optional sub-elements, desktop and menu.

association element: The optional association element is a hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. The association element must have the extensions and mime-type attributes. If the association element is included, either the offline-allowed element must also be included, or the href attribute must be set for the jnlp element to ensure that the application can be located and run.

related-content element: The optional related-content element describes an additional piece of related content, such as a readme file, help pages, or links to registration pages, as a hint to a JNLP Client. The application is asking that this content be included in its desktop integration. The related-content element has a mandatory href and title attribute. It can contain any of the following two sub-elements:

  • description element: A short description of the related content.
  • icon element: The icon can be used by the JNLP Client to identify the related content to the user.

security Element

Each sandbox application is run in a restricted execution environment, similar to the Applet sandbox. The security element can be used to request unrestricted access.

If the all-permissions element is specified, the application will have full access to the client machine and local network. All JAR files must be signed. The user is prompted to accept the certificate and agree to run the application.

update Element

The update element is used to indicate the preferences for how application updates should be handled by Java Web Start.

The update element can contain the following two optional attributes:

check attribute: The check attribute indicates the preference for when the JNLP Client should check for updates, and can have one of the three values: "always", "timeout", and "background"

A value of "always" means to always check for updates before launching the application.

A value of "timeout" (default) means to check for updates until timeout before launching the application. If the update check is not completed before the timeout, the application is launched, and the update check will continue in the background.

A value of "background" means to launch the application while checking for updates in the background.

policy attribute: The policy attribute indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched, and can have one of the following three values: "always", "prompt-update", and "prompt-run"

A value of "always" (default) means to always download updates without any prompt.

A value of "prompt-update" means to ask the user if he/she wants to download and run the updated version, or launch the cached version.

A value of "prompt-run" means to ask the user if he/she wants to download and run the updated version, or cancel and abort running the application.

For example:

<update check="always" policy="prompt-update">

resources Element

The resources element is used to specify all the resources, such as Java class files, native libraries, and system properties, that are part of the application. A resource definition can be restricted to a specific operating system, architecture, or locale using the os, arch, and locale attributes.

The os attribute contains a list of operating system names for a resource. For example, you could use multiple resources definitions, with different os attributes, to supply a native library for multiple operating systems.

The os attribute contains a list of operating system names separated by spaces. At runtime, the os values are compared with the beginning of the os.name system property to find a match. For example, an os attribute value of "Windows" matches both "Windows Vista" and "Windows 7" operating systems.

If you wish to list an operating system whose name contains a space, use a backslash to indicate that the space is part of the operating system name. The following example will specifically match "Windows Vista" and "Windows 7":

    <resources os="Windows\ Vista Windows\ 7">
      <jar href="hello.jar"/>
    </resources>

The resources element has six different possible subelements: jar, nativelib, j2se, property, package, and extension. The package and extension elements are not discussed in this developer's guide.

A jar element specifies a JAR file that is part of the application's classpath. For example:

      <jar href="myjar.jar"/>

The jar file will be loaded into the JVM using a ClassLoader object. The jar file will typically contain Java classes that contain the code for the particular application, but can also contain other resources, such as icons and configuration files, that are available through the getResource mechanism.

A nativelib element specifies a JAR file that contains native libraries. For example:

      <nativelib href="lib/windows/corelib.jar"/>

The JNLP client must ensure that each file entry in the root directory of the JAR file (i.e., /) can be loaded into the running process using the System.loadLibrary method. Each entry must contain a platform-dependent shared library with the correct naming convention, e.g., *.dll on Windows or lib*.so on Solaris/Linux. The application is responsible for doing the actual call to System.loadLibrary.

Native libraries would typically be included in a resources element that is geared toward a particular operating system and architecture. For example:

    <resources os="SunOS" arch="sparc">
      <nativelib href="lib/solaris/corelibs.jar"/>
    </resources>

By default, jar and nativelib resources will be downloaded eagerly, i.e., they are downloaded and available locally to the JVM running the application before the application is launched. The jar and nativelib elements also allow a resource to be specified as lazy. This means the resource does not have to be downloaded onto the client system before the application is launched.

The download attribute is used to control whether a resource is downloaded eagerly, lazily, or contains a custom progress implementation. For example:

    <jar href="sound.jar"
download="lazy"/>
<nativelib
href="native-sound.jar"
download="eager"/>
<jar href="progress.jar"
download="progress"/>

A jar denoted with download="progress" will be downloaded eagerly, and may be used to indicate progress while downloading other resources.

The j2se element specifies what Java Platform Standard Edition Runtime Environment (JRE) versions an application is supported on, as well as standard parameters to the Java Virtual Machine. If several JREs are specified, this indicates a prioritized list of the supported JREs, with the most preferred version first. For example:

       <j2se
version="1.3" initial-heap-size="64m"
max-heap-size="128m"/>
<j2se
version="1.4.2+"
href="http://java.sun.com/products/autodl/j2se"
java-vm-args="-esa -Xnoclassgc"/>

The version attribute refers, by default, to a platform version (specification version) of the Java Platform Standard Edition. Currently defined platform versions are 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, and 1.8. (A platform version will not normally contain a micro version number; e.g., 1.4.2.)

Exact product versions (implementation versions) may also be specified. by including the href attribute. For example, 1.3.1_07, 1.4.2, or 1.5.0-beta2 by Sun Microsystems, Inc. For example,

<j2se version="1.4.2" href="http://java.sun.com/products/autodl/j2se"/

or

<j2se version="1.4.2_04" href="http://java.sun.com/products/autodl/j2se"/>

If a platform version is specified (i.e., no href attribute is provided), Java Web Start will not consider an installed non-FCS (i.e., milestone) JRE as a match. E.g., a request of the form

<j2se version="1.4+"/>

would not consider an installed 1.4.1-ea or 1.4.2-beta JRE as a match for the request. Starting with 1.3.0, a JRE from Sun Microsystems, Inc., is by convention a non-FCS (milestone) JRE if there is a dash (-) in the version string.

The java-vm-args attribute of the j2se element specifies a preferred set of virtual machine arguments to use when launching java.

<j2se version="1.4+" java-vm-args="-ea -Xincgc"/>

The following java-vm-args are supported by this version:

 -d32,                                                          /* use a 32-bit data model if available (unix platforms only) */
 -client,                                                       /* to select the client VM */
 -server,                                                       /* to select the server VM */
 -verbose,                                                      /* enable verbose output */
 -version,                                                      /* print product version and exit */
 -showversion,                                                  /* print product version and continue */
 -help,                                                         /* print this help message */
 -X,                                                            /* print help on non-standard options */
 -ea,                                                           /* enable assertions */
 -enableassertions,                                             /* enable assertions */
 -da,                                                           /* disable assertions */
 -disableassertions,                                            /* disable assertions */
 -esa,                                                          /* enable system assertions */
 -enablesystemassertions,                                       /* enable system assertions */
 -dsa,                                                          /* disable system assertione */
 -disablesystemassertions,                                      /* disable system assertione */
 -Xmixed,                                                       /* mixed mode execution (default) */
 -Xint,                                                         /* interpreted mode execution only */
 -Xnoclassgc,                                                   /* disable class garbage collection */
 -Xincgc,                                                       /* enable incremental garbage collection */
 -Xbatch,                                                       /* disable background compilation */
 -Xprof,                                                        /* output cpu profiling data */
 -Xdebug,                                                       /* enable remote debugging */
 -Xfuture,                                                      /* enable strictest checks, anticipating future default */
 -Xrs,                                                          /* reduce use of OS signals by Java/VM (see documentation) */
 -XX:+ForceTimeHighResolution,                                  /* use high resolution timer */
 -XX:-ForceTimeHighResolution,                                  /* use low resolution (default) */

Plus any argument starting with one of the following:

-ea,                          /* enable assertions for classes */
-enableassertions,            /* enable assertions for classes */
-da,                          /* disable assertions for classes */
-disableassertions,           /* disable assertions for classes */
-verbose,                     /* enable verbose output */
-Xms,                         /* set initial Java heap size */
-Xmx,                         /* set maximum Java heap size */
-Xss,                         /* set java thread stack size */
-XX:NewRatio,                 /* set Ratio of new/old gen sizes */
-XX:NewSize,                  /* set initial size of new generation */
-XX:MaxNewSize,               /* set max size of new generation */
-XX:PermSize,                 /* set initial size of permanent gen */
-XX:MaxPermSize,              /* set max size of permanent gen */
-XX:MaxHeapFreeRatio,         /* heap free percentage (default 70) */
-XX:MinHeapFreeRatio,         /* heap free percentage (default 40) */
-XX:UseSerialGC,              /* use serial garbage collection */
-XX:ThreadStackSize,          /* thread stack size (in KB) */
-XX:MaxInlineSize,            /* set max num of bytecodes to inline */
-XX:ReservedCodeCacheSize,    /* Reserved code cache size (bytes) */
-XX:MaxDirectMemorySize,

The property element defines a system property that will be available through the System.getProperty and System.setProperties methods. It has two required attributes: name and value. For example:

<property name="key" value="overwritten"/>

Properties set in the JNLP file will normally be set by Java Web Start after the VM is started but before the application is invoked. Some properties are considered "secure" properties and can be passed as -Dkey=value arguments on the java invocation command line. The following properties are predefined secure properties and will be passed to the VM in this way:

    sun.java2d.noddraw,
    javaws.cfg.jauthenticator,
    swing.useSystemFontSettings,
    swing.metalTheme,
    http.agent,
    http.keepAlive,
    sun.awt.noerasebackground,
    sun.java2d.opengl,
    sun.java2d.d3d,
    java.awt.syncLWRequests,
    java.awt.Window.locationByPlatform,
    sun.awt.erasebackgroundonresize,
    sun.awt.keepWorkingSetOnMinimize,
    swing.noxp,
    swing.boldMetal,
    awt.useSystemAAFontSettings,
    sun.java2d.dpiaware,
    sun.awt.disableMixing,
    sun.lang.ClassLoader.allowArraySyntax,
    java.awt.smartInvalidate"
    apple.laf.useScreenMenuBar,
    java.net.preferIPv4Stack,
    java.util.Arrays.useLegacyMergeSort",
    sun.locale.formatasdefault,
    sun.awt.enableExtraMouseButtons,
    com.sun.management.jmxremote.local.only,
    sun.nio.ch.bugLevel,
    sun.nio.ch.disableSystemWideOverlappingFileLockCheck,
    jdk.map.althashing.threshold

New secure properties can also be defined as needed by prefixing the property name with "jnlp." or "javaws.".

System properties set in an unsigned JNLP file will only be set by Java Web Start if they are considered secure.

For information about properties that affect the behavior of Java Web Start applications, see Properties That Affect the Behavior of Rich Internet Applications.

application-desc Element

The application element indicates that the JNLP file is launching an application (as opposed to an applet). The application element has an optional attribute, main-class, which can be used to specify the name of the application's main class, i.e., the class that contains the public static void main(String argv[]) method where execution must begin.

The main-class attribute can be omitted if the first JAR file specified in the JNLP file contains a manifest file containing the main class.

Arguments can be specified to the application by including one or more nested argument elements. For example:

  <application-desc main-class="Main">
    <argument>arg1</argument>
    <argument>arg2</argument>
  </application-desc>

The (optional) progress-class attribute can be used to indicate that the class of this name implements the javax.jnlp.DownloadServiceListener interface. This class may be loaded first and used to indicate the progress of other resources being downloaded and verified.

applet-desc Element

Java Web Start has support for launching Java applets. This support provides easy migration of existing code to Java Web Start.

An applet is launched using the applet-desc element instead of the application-desc element. For example:

  <applet-desc
documentBase="http://..."
name="TimePilot"
main-class="TimePilot.TimePilotApp"
width="527"
height="428">
<param name="key1"
value="value1"/>
<param name="key2"
value="value2"/>
</applet-desc>

The JAR files that make up the applet are described using the resources element as for applications. The documentBase must be provided explicitly since a JNLP file is not embedded in an HTML page. The rest of the attributes correspond to the respective HTML applet tag elements.

The main-class attribute is used instead of the code attribute. The main-class attribute is assigned the name of the Applet class (without the .class extension). This attribute can be omitted if the Applet class can be found from the Main-Class manifest entry in the main JAR file.

The (optional) progress-class attribute can be used to indicate that the class of this name implements the javax.jnlp.DownloadServiceListener interface. This class may be loaded first and used to indicate the progress of other resources being downloaded and verified.

Note: Applets must be packaged in JAR files in order to work with Java Web Start.

component-desc Element

The component-desc element denotes that this jnlp file is not an application or an applet but an extension that can be used as a resource in an application, applet or another extension.

A component extension is typically used to factor out a set of resources that are shared between multiple applications or that have separate security needs.

The (optional) progress-class attribute can be used to indicate that the class of this name implements the javax.jnlp.DownloadServiceListener interface. This class may be loaded first and used to indicate the progress of other resources being downloaded and verified.

installer-desc Element

The installer-desc element denotes that this jnlp file is an installer extension that defines an application that will be run only once, the first time this extension jnlp file is used in an application, applet or another extension.

An installer extension is typically used to install platform specific native code that requires a more complicated setup than simply loading a native library into the VM.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JnlpDownloadServlet Guide

Table of Contents

Introduction
Using JnlpDownloadServlet
Substitutions
Version, Extension, and Platform Requests
Incremental Updates with JARDiff
Faster Downloads with Pack200
Other Features
Building JnlpDownloadServlet
Reference

Introduction

JnlpDownloadServlet is a servlet that simplifies the process of deploying Java Web Start applications on a web server as well as providing enhanced functionality. JnlpDownloadServlet is available in the sample/jnlp/servlet directory of the JDK, both as compiled JAR files and as source code.

In the simplest case of JNLP deployment, you put your application files and a JNLP file on a web server. After you configure the web server for the JNLP MIME type, you have basic JNLP functionality — the user clicks on a JNLP file link in a browser and your application is downloaded and run.

However, this approach has some drawbacks. First, the explicit URL of the application codebase must appear in the JNLP file. This means it must be changed if you decide to host your application elsewhere, or if you're moving from a local test server to a more public production server. In addition, the file system time stamp on your application files will be used to report the time stamp of your application, which might not be what you want. Finally, only the most basic parts of the JNLP protocol are implemented through HTTP. Versioning and other features are not supported.

Features

JnlpDownloadServlet acts as a liaison between your application files and the client. It provides the following features:

  • You do not have to hardcode codebase URLs in the JNLP file. This simplifies moving from one server to another.
  • You can specify an explicit time stamp for your application files, instead of relying on file system time stamps.
  • The servlet supports the full set of download protocols defined by the JNLP specification.
  • Version information can be specified per file or per directory.
  • The servlet generates JARDiff files.
  • The servlet supports Pack200 compression for application files.

Baseline Example

To understand the useful features that JnlpDownloadServlet brings to application deployment, you must first understand the simplest way an application can be distributed using JNLP and Java Web Start.

The app1 example (in the sample/jnlp/servlet directory of the JDK) contains a simple application and, perhaps more valuable, an Ant build script that builds the application and bundles it in a WAR file for distribution on a web server.

The application itself consists of a single class, Pie, and an image file, key-lime.jpg, which are packaged into the pie.jar JAR file.

The pie.jar archive is packaged into a web application file, app1.war, which has these contents:

WEB-INF/web.xml
index.html
pie.jnlp
pie.jar

The JNLP file describes the application, assuming it is deployed on a server at http://localhost:8080/, which works for a locally installed Tomcat server.

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/app1">
    <information>
        <title>Pie</title>
        <vendor>Example Vendor</vendor>
    </information>
    <resources>
        <j2se version="1.2+"/>
        <jar href="pie.jar" main="true" />
    </resources>
    <application-desc/>
</jnlp>

Consider the interaction between client and server as a dialog:

[User clicks a link in the browser.]

Client browser: May I please have pie.jnlp?

Server: Yes, here you go.

Client browser: I notice the MIME type is application/x-java-jnlp-file. Java Web Start, would you please handle pie.jnlp for me?

Client Java Web Start: Let me see what resources are required for this application. Hey Server, can I please have pie.jar?

Server: Here you go.

Client Java Web Start: Now I'll launch the JAR file using its Main-class manifest attribute.

[Application appears on the user's screen.]

Other Examples

The app2 example shows how to bundle JnlpDownloadServlet with an application and how to use it to perform simple substitutions in a JNLP file.

The app3 example shows how a versioned resource request is handled by JnlpDownloadServlet.

Both app2 and app3 will be referenced from the following sections.

Using JnlpDownloadServlet

To take advantage of JnlpDownloadServlet, perform these steps.

  1. Package JnlpDownloadServlet in your web application WAR file. You must use two JAR files to have the full functionality, jnlp-servlet.jar and jardiff.jar. These two JAR files are put in the WEB-INF/lib directory of your WAR file.
  2. Map requests for *.jnlp and *.jar to JnlpDownloadServlet using your web application's web.xml file. It must contain lines that identify JnlpDownloadServlet and makes it the handler for JNLP and JAR files. Here is a complete example:
    <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <servlet>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jnlp</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jar</url-pattern>
  </servlet-mapping>

</web-app>

The app2 and app3 examples show how to package JnlpDownloadServlet in a web application. Review the Ant build script app2/build.xml or app3/build.xml for more information.

Substitutions

JnlpDownloadServlet makes convenient substitutions in your JNLP files. When the client requests a JNLP file, the servlet reads the original file, substitutes values, and returns the results.

Time Stamp

If the first line of your JNLP file contains a time stamp, JnlpDownloadServlet uses the value as a time stamp for your application. If you do not specify a time stamp, JnlpDownloadServlet uses the last modified time stamp from the file system.

Using an explicit time stamp is useful if you copy a JNLP file to multiple servers for load balancing. The explicit time stamp ensures that clients see consistent results, regardless of which server they consult.

To use an explicit time stamp, add a line to the top of your JNLP file. Begin the line with TS:. The rest of the line must contain a time stamp in ISO 8601 format, which has this basic format:

YYYY-MM-DD hh:mm:ss

Here is one example:

TS: 2010-08-07 21:19:05

Consult the Reference section for a more complete description of the time stamp string.

Codebase and Other Values

JnlpDownloadServlet makes substitutions for strings that begin with two dollar signs. For example, consider this line in a JNLP file:

<jnlp spec="1.0+" codebase="$$codebase">

When a client requests the JNLP file, JnlpDownloadServlet substitutes the correct value for $$codebase, wherever it is deployed. This is convenient because you do not have to hardcode this value in the JNLP file, making it easier to move from server to server.

The full list of substitutions is shown in the following table:

Name | Substituted value
$$codebase | The URL of the request except for the name of the JNLP file
$$name | The name of the JNLP file
$$context | The base URL of the web application
$$site | The web server address
$$hostname | The name of the server

For example, suppose the app2 example is deployed at example.com. The values of each substitution would be as follows:

Name | Substituted value
$$codebase | http://example.com/app2/
$$name | pie.jnlp
$$context | http://example.com/app2
$$site | http://example.com
$$hostname | example.com

The app2/pie.jnlp and app3/pie.jnlp examples use only $$codebase.

Version, Extension, and Platform Requests

The JNLP specification supports requesting application resources with explicit version numbers or resources for certain locales, operating systems, and system architectures. This means that you can deploy an application that has different libraries for different operating systems or different resource files for different locales.

JnlpDownloadServlet provides support for special requests with two different mechanisms. The first is a scheme for naming resource files where locales, operating systems, and other parameters are embedded in the file name. The second mechanism involves an XML file that describes the parameters of resource files in the same directory.

File Naming Convention

JnlpDownloadServlet enables you to specify information about files by embedding it in a file name. If the file name contains two underscores in a row, the file name is treated as containing attributes. A prefix letter specifies the attribute information, as shown here:

Prefix | Meaning
V | Version number
O | Operating system
A | Architecture
L | Locale

Only one version is allowed per file, but a file can be associated with multiple operating system, architecture, or locale attributes. For example, application__V1.2__Len_US__Len.jar means that the resource application.jar has a version of 1.2, and associated locales of en_US and en.

For example, consider a JNLP file that contains this resource line:

<jar href="app-lib.jar" version="2.0" />

When Java Web Start encounters this line in the JNLP file, it sends a request to the server for version 2.0 of app-lib.jar. If you have placed a file app-lib__V2.0.jar in your web application, JnlpDownloadServlet returns it to the client as version 2.0 of app-lib.jar. Note how the actual file name in your web application gets remapped to be visible to the client as app-lib.jar.

XML Version File

The file naming convention can be cumbersome, especially if you have multiple resource files that each have multiple associations for operating systems, architectures, or locales.

JnlpDownloadServlet supports an alternate mechanism, where all attributes are described in a separate XML file. The servlet looks for a version.xml file in the same directory as the resource. The version.xml file contains information about the other files in the same directory.

For example, the following version.xml file describes a resource that is available to a client as application.jar. The actual file is stored in the same directory as application-1_2-us.jar.

<jnlp-versions>
  <resource>
    <pattern>
      <name>application.jar</name>
      <version-id>1.2</version-id>
      <locale>en_US</locale>
      <locale>en</locale>
    </pattern>
    <file>application-1_2-us.jar</file>
  </resource>
</jnlp-versions>

The app3 example shows how to respond to a versioned request for a resource using the XML version file. In particular, the JNLP file contains this resource line:

<jar href="app-lib.jar" version="2.0" />

The WAR file contains the library, app-lib.jar, and this XML version file version.xml that describes the library:

<jnlp-versions>
  <resource>
    <pattern>
      <name>app-lib.jar</name>
      <version-id>2.0</version-id>
    </pattern>
    <file>app-lib-2.0.jar</file>
  </resource>
</jnlp-versions>

Note how the actual name of the file, app-lib-2.0.jar, is remapped so that the file name visible from the client is app-lib.jar.

Incremental Updates with JARDiff

JnlpDownloadServlet generates and returns incremental updates to JAR files, if possible. If the current-version-id parameter is included in the request, and the servlet can find both a match on the current-version-id and the requested version, and the request is for a JAR file, then a JARDiff file is generated by the servlet. The JARDiff file is returned if its size is less than that of the requested version.

The JARDiff file is generated and stored in a temporary directory that is specific to the web container. The servlet finds the temporary working directory using the javax.servlet.context.tempdir context attribute.

Faster Downloads with Pack200

Pack200 is an efficient compression technology for JAR files. Download and installation times for applications are important factors in how users perceive applications. Making your application resources as small as possible reduces the amount of time users must wait for your application to download.

JnlpDownloadServlet can supply resources for clients, such as Java Web Start, that support GZIP and Pack200 downloads. Place *.jar.pack.gz or *.jar.gz files together with your original *.jar files on the server. For example, JnlpDownloadServlet chooses the best of the following files, based upon what the client supports:

pie.jar
pie.jar.gz
pie.jar.pack.gz

You can create Pack200 files using the pack200 tool that is included with the Java Development Kit. The app3 example creates a Pack200 version of the pie.jar file. Look at build.xml to see how the Pack200 file is created. Because pie.jar is simple, the Pack200 file is negligibly smaller; however, for a larger JAR file, the compression is much greater.

Other Features

JNLP substitutions, Pack200 support, and file attribute support are the most useful features of JnlpDownloadServlet. The servlet also supports a logging system and MIME type mapping.

Logging

The servlet has logging capabilities that enable you to monitor its behavior. Logging messages are generated in different categories:

  • FATAL means a malfunction or internal error occurred inside the servlet.
  • WARNING indicates an error processing some of the information in the WAR file or parsing the version.xml file.
  • INFORMATIONAL logs all requests, replies, directory scanning, and so on.
  • DEBUG displays detailed internal information about how a request is processed.

Logging output is controlled by two servlet initialization parameters, logLevel and logPath. The log level can be set to either NONE, FATAL, WARNING, INFORMATIONAL, or DEBUG. The log path specifies a file where the output is written. If no path is specified, logging is done to the standard log for servlets (using ServletContext.log()). Here is an example:

<servlet>
  <servlet-name>
    JnlpDownloadServlet
  </servlet-name>
  <servlet-class>
    jnlp.sample.servlet.JnlpDownloadServlet
  </servlet-class>

  <init-param>
    <param-name>
      logLevel
    </param-name>

    <param-value>
      DEBUG
    </param-value>
  </init-param>

  <init-param>
    <param-name>
      logPath
    </param-name>

    <param-value>
      /logs/jnlpdownloadservlet.log
    </param-value>
  </init-param>

</servlet>

MIME Types

The servlet treats JNLP and JAR files specially. Substitutions are made in JNLP files as desribed in Substitutions. A version-based request for a JAR file can result in the generation of an incremental update. The servlet uses extensions to determine if a file is a JNLP or JAR file. The default extension of JNLP files is .jnlp and for JAR files is .jar. These default extensions can be overwritten by the initialization parameters: jnlp-extension and jar-extension. Here is an example:

<init-param>
  <param-name>
    jnlp-extension
  </param-name>

  <param-value>
    .xjnlp
  </param-value>
</init-param>

The MIME type that is returned for a file is also based on its extension. The MIME type is looked up in the configuration files for the web container and the WAR file. If no mapping is specified, the default MIME types are assigned:

Extension | Default MIME Type
.jnlp | application/x-java-jnlp-file
.jar | application/x-java-archive
.jardiff | application/x-java-archive-diff

To change the MIME type JnlpDownloadServlet returns, use the <mime-type> element in the web.xml file. Here is an example:

<web-app>
   ...
   <mime-mapping>
      <extension>jnlp</extension>
      <mime-type>text/ascii</mime-type>
   </mime-mapping>
   ...
</web-app>

Building JnlpDownloadServlet

Most of the time, you will use JnlpDownloadServlet directly. In rare cases, you might want to add functionality to JnlpDownloadServlet. The full source code is available, and the build is relatively straightforward.

You must have GNU make, a Java Development Kit (JDK), and you must define environment variables. Here is one example on a Linux system.

$ export CLASS_PATH=/home/edmond/Applications/apache-tomcat-7.0.2/lib/servlet-api.jar
$ export FILE_SEPARATOR=:
$ export TMPDIR=/tmp
$ export SDK_HOME=/home/edmond/jdk1.7.0
$ make
.
.
.

The output of the build is lib/jnlp-servlet.jar and lib/jardiff.jar.

Reference

More Information About ISO 8601 Time Stamps

The general format of a time stamp is:

   YYYY-MM-DD hh:mm:ss

The dashes, colons, and seconds are optional:

   YYYYMMDDhhmm

The hh is in 24-hour notation. By default, the local time zone is used. Universal Time (UTC), also known as GMT time, can be specified by appending the capital letter Z to a time:

     23:59:59Z or 235959Z

The strings +hh:mm, +hhmm, or +hh can be added to the time to indicate that the local time zone is hh hours and mm minutes ahead of UTC. For time zones west of the zero meridian, which are behind UTC, the notation -hh:mm, -hhmm, or -hh is used instead. For example, Central European Time (CET) is +0100 and U.S./Canadian Eastern Standard Time (EST) is -0500. The following strings all indicate the same point in time:

     12:00Z = 13:00+01:00 = 0700-0500

Specification of the XML Version File

The complete document type definition (DTD) for the version.xml file is shown here:

<!ELEMENT jnlp-versions <resource*, platform*)>
<!ELEMENT resource (pattern, file)>
<!ELEMENT platform (pattern, file, product-version-id)>
<!ELEMENT pattern (name, version-id, os*, arch*, locale*)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT version-id (#PCDATA)>
<!ELEMENT os (#PCDATA)>
<!ELEMENT arch (#PCDATA)>
<!ELEMENT locale (#PCDATA)>
<!ELEMENT file (#PCDATA)>
<!ELEMENT product-version-id (#PCDATA)>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview

Java Web Start Technology

Java Web Start is a helper application that gets associated with a Web browser. When a user clicks on a link that points to a special launch file (JNLP file), it causes the browser to launch Java Web Start, which then automatically downloads, caches, and prompts the user to run the given Java Technology-based application. Prompting for future launches of the application can be turned off by the user.

From a technology standpoint, Java Web Start has a number of key benefits that make it an attractive platform to use for deploying applications:

  • Java Web Start is built exclusively to launch applications written to the Java(TM) Platform Standard Edition. Thus, a single application can be made available on a Web server and then deployed on a wide variety of platforms, including Windows 98/NT/2000/ME/XP, Linux, and the Solaris Operating Environment. The Java platform has proven to be a very robust, productive, and expressive development platform, leading to a significant cost savings due to minimized development and testing costs.
  • Java Web Start supports multiple revisions of the Java Platform Standard Edition. Thus, an application can request a particular version of the platform it requires, such as Java SE 1.5.0. Several applications can run at the same time on different platform revisions without causing conflicts, and Java Web Start can automatically download and install a revision of the platform if an application requests a version that is not installed on the client system.
  • Java Web Start allows applications to be launched independently of a Web browser. This can be used for off-line operation of an application, where launching through the browser is often inconvenient or impossible. The application can also be launched through desktop shortcuts, making launching the Web-deployed application similar to launching a native application.
  • Java Web Start takes advantage of the inherent security of the Java Platform. Sandbox applications are run in a protective environment with restricted access to local disk and network resources. Users must also agree to run the application the first time it is launched.
  • Applications launched with Java Web Start are cached locally. Thus, an already-downloaded application is launched on par with a traditionally installed application.

The technology underlying Java Web Start is the Java Network Launching Protocol & API (JNLP). This technology was developed via the Java Community Process (JCP). Java Web Start is the reference implementation (RI) for the JNLP specification. The JNLP technology defines, among other things, a standard file format that describes how to launch an application called a JNLP file.

Security

Java Web Start is built on top of the Java SE platform, which provides a comprehensive security architecture. Applications launched with Java Web Start, by default, run without permissions in a restricted environment ("sandbox") with limited access to files and network. Users are also shown a security warning and prompted for permission to run these applications. Thus, launching applications using Java Web Start maintains system security and integrity.

An application can request unrestricted access to your system. Java Web Start will display a Security Warning dialog when the application is launched for the first time. The security warning shows information about the publisher of the application, the location from which the application is accessed, and the level of access requested. If you agree to the risk, then the application will be launched. The information about the origin of the application is based on digital code signing.

Where to find Java Web Start

Java Web Start is included in the Java Runtime Environment available at http://java.sun.com. The JNLP specification can be found at JSR 56: Java Network Launching Protocol and API.

Using Java Web Start Software

Java Web Start allows you to launch Java-technology-based applications directly from the Web. An application can be launched in three different ways:

  • From a Web browser by clicking on a link.
  • From desktop icons or the Start Menu.
  • From the Java Cache Viewer

Regardless of which way is used, Java Web Start will connect back to the Web server each time an application is launched to check whether an updated version of the application is available.

Launching from a Web browser

Point your web browser to a page with a link to a jnlp application, and click on that link.

A security dialog will pop up with information about the origin of the application based on who digitally signed the code, and the level of access requested. The application will run only if you decide to trust the vendor.

That is really all there is to using Java Web Start, but how does it work? The HTML links that launch the applications are, in fact, standard HTML links. However, instead of pointing to another Web page, they link to a special configuration file called a JNLP file. The Web browser examines the file extension and/or the MIME type of the file, and sees that it belongs to Java Web Start. It then launches Java Web Start with the downloaded JNLP file as an argument. Java Web Start proceeds with downloading, caching, and running the application as directed by the JNLP file.

Launching from desktop icons and the Start Menu (Microsoft Windows and Solaris, Linux, and Mac OS X running GNOME 2.0+)

Java Web Start technology can automatically create shortcuts for your application on the desktop and in the Start Menu for Web-deployed applications developed with Java technology. You can use the Java Control Panel to control the shortcut settings. Shortcuts can also be added by using the Java Web Start Cache Viewer, using the install shortcut menu item.

Using Java Web Start Software Behind a Proxy Server/Firewall

Java Web Start software must be configured with the correct proxy settings in order to launch applications from outside your firewall. Java Web Start software will automatically try to detect the proxy settings from the default browser on your system (Internet Explorer or Netscape browsers on Microsoft Windows, and Netscape browsers on the Solaris Operating Environment and Linux). Java Web Start technology supports most web proxy auto-configuration scripts. It can detect proxy settings in almost all environments.

You can also use the Java Web Start Control Panel to view or edit the proxy configuration. Refer to the Java Control Panel for more details.

Requirements

Desktop/Client requirements:

The client machine requires support for the Java Runtime Environment (JRE), version 1.3 or later. Java Web Start is available for Windows 98/NT/2000/ME/XP, the Solaris Operating Environment, and Linux.

Server requirements:

Applications can be deployed from any standard Web server. In order to use Java Web Start, the Web server must be configured with support for a new MIME type. See Setting Up the Web Site.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Packaging an Application for Easy Deployment

The Developer's Pack contains a servlet that can be used to bundle a JNLP-deployed application in a Web Archive (WAR) file. See Packaging JNLP Applications in a Web Archive

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Setting Up the Web Site

Introduction

Java Web Start leverages existing Internet technology, such as the HTTP protocol and Web servers, so existing infrastructure for deploying HTML-based contents can be reused to deploy Java Technology-based applications using Java Web Start.

In order to deploy your application to client machines, you must make sure that all files containing your application are accessible through a Web server. This typically amounts to copying one or more JAR files, along with a JNLP file, into the Web server's directories. The set-up required for enabling the Web site to support Java Web Start is very similar to deploying HTML-based contents. The only caveat is that a new MIME type needs to be configured for the Web server.

Basic Steps

1. Configure the Web server to use the Java Web Start MIME type

Configure the Web server so that all files with the .jnlp file extension are set to the application/x-java-jnlp-file MIME type.

Most Web browsers use the MIME type returned with the contents from the Web server to determine how to handle the particular content. The server must return application/x-java-jnlp-file MIME type for JNLP files in order for Java Web Start to be invoked.

Each Web server has a specific way in which to add MIME types. For example, for the Apache Web server you must add the following line to the .mime.types configuration file:

application/x-java-jnlp-file JNLP

Check the documentation for the specifics of your Web server.

2. Create a JNLP file for the application

The easiest way to create this file is to modify an existing JNLP file to your requirements.

The syntax and format for the JNLP file is described in a later section.

3. Make the application accessible on the Web server

Ensure your application's JAR files and the JNLP file are accessible at the URLs listed in the JNLP file.

4. Create the web page that launches the application

See the next chapter, Creating the Web Page that launches the Application, for details on step 4.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java JDBC API

The Java Database Connectivity (JDBC) API provides universal data access from the Java programming language. Using the JDBC API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built.

The JDBC API is comprised of two packages:

  • java.sql
  • javax.sql

You automatically get both packages when you download the Java Platform Standard Edition (Java SE) 8.

To use the JDBC API with a particular database management system, you need a JDBC technology-based driver to mediate between JDBC technology and the database. Depending on various factors, a driver might be written purely in the Java programming language or in a mixture of the Java programming language and Java Native Interface (JNI) native methods. To obtain a JDBC driver for a particular database management system, see JDBC Data Access API.

Enhancements in Java SE 8

Component: core-libs
Sub-Component: java.sql:bridge
Synopsis: The JDBC-ODBC Bridge has been removed.
RFE: 7176225

Component: core-libs
Sub-Component: java.sql
Synopsis: JDBC 4.2 introduces the following features:

  • Addition of REF_CURSOR support.
  • Addition of java.sql.DriverAction Interface
  • >Addition of security check on deregisterDriver Method in DriverManager Class
  • Addition of the java.sql.SQLType Interface
  • Addition of the java.sql.JDBCType Enum
  • Add Support for large update counts
  • Changes to the existing interfaces
  • Rowset 1.2: Lists the enhancements for JDBC RowSet.

RFE: 8005080

Enhancements in Java SE 7

Component: core-libs
Sub-Component: java.sql
Synopsis: JDBC 4.1 introduces the following features:

  • The ability to use a try-with-resources statement to automatically close resources of type Connection, ResultSet, and Statement
  • RowSet 1.1: The introduction of the RowSetFactory interface and the RowSetProvider class, which enable you to create all types of row sets supported by your JDBC driver.

RFE: 6589685

Component: docs
Sub-Component: release_notes
Synopsis: The JDBC-ODBC Bridge will be removed in JDK 8.
RFE: 8001747

More Information

  • JDBC Basics Tutorial
  • JDBC Home Page
  • Frequently Asked Questions about JDBC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDBC 4.1

JDBC 4.1, which is part of Java SE 7, introduces the following features:

  • The ability to use a try-with-resources statement to automatically close resources of type Connection, ResultSet, and Statement
  • RowSet 1.1: The introduction of the RowSetFactory interface and the RowSetProvider class, which enable you to create all types of row sets supported by your JDBC driver.

Using try-with-resources Statements to Automatically Close JDBC Resources

You can use a try-with-resources statement to automatically close java.sql.Connection, java.sql.Statement, and java.sql.ResultSet objects, regardless of whether a SQLException or any other exception has been thrown. A try-with-resources statement consists of a try statement and one or more declared resources (which are separated by semicolons).

See The try-with-resources Statement for more information

The following example uses a try-with-resources statement to close the Statement object, stmt, automatically:

  public static void viewTable(Connection con) throws SQLException {

    String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES";

    try (Statement stmt = con.createStatement()) {

      ResultSet rs = stmt.executeQuery(query);

      while (rs.next()) {
        String coffeeName = rs.getString("COF_NAME");
        int supplierID = rs.getInt("SUP_ID");
        float price = rs.getFloat("PRICE");
        int sales = rs.getInt("SALES");
        int total = rs.getInt("TOTAL");
        System.out.println(coffeeName + ", " + supplierID + ", " + price +
                           ", " + sales + ", " + total);
      }
    }
  }

The following statement is a try-with-resources statement that declares one resource, stmt, which will be automatically closed then the try block terminates:

    try (Statement stmt = con.createStatement()) {

      // ...

    }

RowSet 1.1: Creating Row Sets with RowSetFactory Interface and RowSetProvider Class

You can use an instance of RowSetFactory to create a RowSet object. The following example uses an instance of RowSetFactory to create the JdbcRowSet object, jdbcRs:

  public void testJdbcRowSet(String username, String password) throws SQLException {

    RowSetFactory myRowSetFactory = null;
    JdbcRowSet jdbcRs = null;
    ResultSet rs = null;
    Statement stmt = null;

    try {

      myRowSetFactory = RowSetProvider.newFactory();
      jdbcRs = myRowSetFactory.createJdbcRowSet();

      jdbcRs.setUrl("jdbc:myDriver:myAttribute");
      jdbcRs.setUsername(username);
      jdbcRs.setPassword(password);

      jdbcRs.setCommand("select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES");
      jdbcRs.execute();

      // ...

The following statement creates the RowSetProvider object myRowSetFactory with the default RowSetFactory implementation, com.sun.rowset.RowSetFactoryImpl:

      myRowSetFactory = RowSetProvider.newFactory();

Alternatively, if your JDBC driver has its own RowSetFactory implementation, you can specify it as an argument of newFactory.

The following statements create the JdbcRowSet object jdbcRs and configure its database connection properties:

      jdbcRs = myRowSetFactory.createJdbcRowSet();

      jdbcRs.setUrl("jdbc:myDriver:myAttribute");
      jdbcRs.setUsername(username);
      jdbcRs.setPassword(password);

The RowSetFactory interface contains methods to create the different types of RowSet implementations available in JDBC 4.1 and later:

  • createCachedRowSet
  • createFilteredRowSet
  • createJdbcRowSet
  • createJoinRowSet
  • createWebRowSet
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDBC 4.2

JDBC 4.2, which is part of Java SE 8, introduces the following features:

  • Addition of REF_CURSOR support.
  • Addition of java.sql.DriverAction Interface
  • Addition of the java.sql.SQLType Interface
  • Addition of the java.sql.JDBCType Enum
  • Add Support for large update counts
  • Changes to the existing interfaces
  • Rowset 1.2: Lists the enhancements for JDBC RowSet.

Addition of REF_CURSOR Support

The REF_CURSOR data type is supported by several databases. To return a REF_CURSOR from a stored procedure, use the method CallableStatement.registerOutParameter and specify Types.REF_CURSOR as the data type to be returned. To retrieve the ResultSet instance representing the REF_CURSOR, invoke the method the method CallablStatement.getObject, and specify ResultSet as the data type to which to convert the returned object. The returned result set is a forward, read-only result set.

If you invoke the method registerOutParameter and specify Types.REF_CURSOR as the data type to be returned, and the JDBC driver does not support this data type, a SQLFeatureNotSupportedException is thrown.

The following example obtains a ResultSet instance from a REF_CURSOR with the CallableStatement class:

CallableStatement cstmt = conn.prepareCall("{callmySproc(?)}");
cstmt.registerOutParameter(1, Types.REF_CURSOR);
cstmt.executeQuery();
ResultSet rs = cstmt.getObject(1, ResultSet.class);
while(rs.next()){
System.out.println("Name="+ rs.getString(1));
}

To determine if a JDBC Driver supports REF_CURSOR, invoke the method DatabaseMetaData.supportsRefCursors.

Addition of the java.sql.DriverAction Interface

This is an interface that any class that implements the java.sql.Driver must implement if it wants to be notified by the DriverManager class. The JDBC driver's static initialization block must invoke the method DriverManager.registerDriver(java.sql.Driver, java.sql.DriverAction) to inform DriverManager class of which DriverAction implementation to invoke when the JDBC driver is deregistered. The method DriverManager.deregisterDriver requires a permission, if a SecurityManager is enabled.

Addition of the java.sql.SQLType Interface

This interface is used to create an object that identifies a generic SQL type, called JDBC type or a vendor specific data type.

Addition of the java.sql.JDBCType Enum

This enum identifies generic SQL Types, called JDBC Types. Use JDBCType in place of the constants defined in Types.java.

Add support for large update counts

JDBC methods returned only int value for the update count. As datasets continue to grow, this caused problems. Thus methods have been added to the Statement class that return a long value for the update count. These methods should be used when the returned row count exceeds the constant Integer.MAX_VALUE.

Changes to the existing interfaces

Methods have been added to or clarified for the following interfaces. The following is the list of enhanced interfaces:

  • java.sql.Driver
  • java.sql.DriverManager
  • java.sql.DatabaseMetaData
  • java.sql.Date
  • java.sql.Time
  • java.sql.TimeStamp
  • java.sql.Statement
  • java.sql.CallableStatement
  • java.sql.PreparedStatement
  • java.sql.ResultSet
  • java.sql.SQLInput
  • java.sql.SQLOutput
  • java.sql.Types
  • javax.sql.DataSource and javax.sql.XADataSource
  • java.sql.SQLXML

RowSets 1.2: Lists the enhancements JDBC RowSet.

The following lists the interfaces and classes enhanced or clarified for RowSet1.2:

  • javax.sql.rowset.BaseRowSet
  • javax.sql.rowset.CachedRowSet
  • javax.sql.rowset.Predicate
  • javax.sql.rowset.JdbcRowSet
  • javax.sql.rowset.RowSetMetaDataImpl
  • javax.sql.rowset.spi.SyncFactory
  • javax.sql.rowset.serial.SerialArray
  • javax.sql.rowset.serial.SerialBlob
  • javax.sql.rowset.serial.SerialClob
  • javax.sql.rowset.serial.SerialDatalink
  • javax.sql.rowset.serial.SerialJavaObject
  • javax.sql.rowset.serial.SerialRef
  • javax.sql.rowset.serial.SerialStruct
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


About Java Flight Recorder

Documentation Contents
Java Platform, Standard Edition Java Flight Recorder Runtime Guide
Contents Previous Next

1 About Java Flight Recorder

Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments. When default settings are used, both internal testing and customer feedback indicate that performance impact is less than one percent. For some applications, it can be significantly lower. However, for short-running applications (which are not the kind of applications running in production environments), relative startup and warmup times can be larger, which might impact the performance by more than one percent. JFR collects data about the JVM as well as the Java application running on it.

Compared to other similar tools, JFR has the following benefits:

  • Provides better data: A coherent data model used by JFR makes it easier to cross reference and filter events.

  • Allows for third-party event providers: A set of APIs allow JFR to monitor third-party applications, including WebLogic Server and other Oracle products.

  • Reduces total cost of ownership: JFR enables you to spend less time diagnosing and troubleshooting problems, reduces operating costs and business interrupts, provides faster resolution time when problems occur, and improves system efficiency.

JFR is primarily used for:

  • Profiling

    JFR continuously saves large amounts of data about the running system. This profiling information includes thread samples (which show where the program spends its time), lock profiles, and garbage collection details.

  • Black Box Analysis

    JFR continuously saves information to a circular buffer. This information can be accessed when an anomaly is detected to find the cause.

  • Support and Debugging

    Data collected by JFR can be essential when contacting Oracle support to help diagnose issues with your Java application.

1.1 Understanding Events

Java Flight Recorder collects data about events. Events occur in the JVM or the Java application at a specific point in time. Each event has a name, a time stamp, and an optional payload. The payload is the data associated with an event, for example, the CPU usage, the Java heap size before and after the event, the thread ID of the lock holder, and so on.

Most events also have information about the thread in which the event occurred, the stack trace at the time of the event, and the duration of the event. Using the information available in events, you can reconstruct the runtime details for the JVM and the Java application.

JFR collects information about three types of events:

  • A duration event takes some time to occur, and is logged when it completes. You can set a threshold for duration events, so that only events lasting longer than the specified period of time are recorded. This is not possible for other types of events.

  • An instant event occurs instantly, and is logged right away.

  • A sample event (also called requestable event) is logged at a regular interval to provide a sample of system activity. You can configure how often sampling occurs.

JFR monitors the running system at an extremely high level of detail. This produces an enormous amount of data. To keep the overhead as low as possible, limit the type of recorded events to those you actually need. In most cases, very short duration events are of no interest, so limit the recording to events with a duration exceeding a certain meaningful threshold.

1.2 Understanding Data Flow

JFR collects data from the JVM (through internal APIs) and from the Java application (through the JFR APIs). This data is stored in small thread-local buffers that are flushed to a global in-memory buffer. Data in the global in-memory buffer is then written to disk. Disk write operations are expensive, so you should try to minimize them by carefully selecting the event data you enable for recording. The format of the binary recording files is very compact and efficient for applications to read and write.

There is no information overlap between the various buffers. A particular chunk of data is available either in memory or on disk, but never in both places. This has the following implications:

  • Data not yet flushed to a disk buffer will not be available in the event of a power failure.

  • A JVM crash can result in some data being available in the core file (that is, the in-memory buffer) and some in the disk buffer. JFR does not provide the capability to merge such buffers.

  • There may be a small delay before data collected by JFR is available to you (for example, when it has to be moved to a different buffer before it can be made visible).

  • The data in the recording file may not be in time sequential order as the data is collected in chunks from several thread buffers.

In some cases, the JVM drops the event order to ensure that it does not crash. Any data that cannot be written fast enough to disk is discarded. When this happens, the recording file will include information on which time period was affected. This information will also be logged to the logging facility of the JVM.

You can configure JFR to not write any data to disk. In this mode, the global buffer acts as a circular buffer and the oldest data is dropped when the buffer is full. This very low-overhead operating mode still collects all the vital data necessary for root-cause problem analysis. Because the most recent data is always available in the global buffer, it can be written to disk on demand whenever operations or surveillance systems detect a problem. However, in this mode, only the last few minutes of data is available, so it only contains the most recent events. If you need to get the full history of operation for a long period of time, use the default mode when events are written to disk regularly.

1.3 Java Flight Recorder Architecture

JFR is comprised of the following components:

  • JFR runtime is the recording engine inside the JVM that produces the recordings. The runtime engine itself is comprised of the following components:

    • The agent controls buffers, disk I/O, MBeans, and so on. This component provides a dynamic library written in C and Java code, and also provides a JVM-independent pure Java implementation.

    • The producers insert data into the buffers. They can collect events from the JVM and the Java application, and (through a Java API) from third-party applications.

  • Flight Recorder plugin for Java Mission Control (JMC) enables you to work with JFR from the JMC client, using a graphical user interface (GUI) to start, stop, and configure recordings, as well as view recording files.

1.4 Enabling Java Flight Recorder

By default, JFR is disabled in the JVM. To enable JFR, you must launch your Java application with the -XX:+FlightRecorder option. Because JFR is a commercial feature, available only in the commercial packages based on Java Platform, Standard Edition (Oracle Java SE Advanced and Oracle Java SE Suite), you also have to enable commercial features using the -XX:+UnlockCommercialFeatures options.

For example, to enable JFR when launching a Java application named MyApp, use the following command:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder MyApp

For more information about these and other options of the java command, see the reference pages at http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (Solaris, Linux, OS X)
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html (Windows)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Command Reference

Documentation Contents
Java Platform, Standard Edition Java Flight Recorder Runtime Guide
Contents Previous

A Command Reference

This appendix serves as a basic reference to the commands you can use with Java Flight Recorder. It contains the following sections:

  • Section A.1, "Command-Line Options"

  • Section A.2, "Diagnostic Command Reference"

A.1 Command-Line Options

When you launch your Java application with the java command, you can specify options to enable Java Flight Recorder, configure its settings, and start a recording. The following command-line options are specific to Java Flight Recorder:

  • -XX:+|-FlightRecorder

  • -XX:FlightRecorderOptions

  • -XX:StartFlightRecording

These command-line options are available only in the commercial license of the JDK. To use them, you have to also specify the -XX:+UnlockCommercialFeatures option.

For more information about these options, see Java Command Line Reference at http://docs.oracle.com/javase/8/docs/technotes/tools/solaris/java.html (Solaris, Linux)
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html (Windows)

Note:

You should use -XX options only if you have a thorough understanding of your system. If you use these commands improperly, you might affect the stability or performance of your system. -XX options are experimantal, and they are subject to change at any time.

A.2 Diagnostic Command Reference

This is a description of the diagnostic commands available to control Java Flight Recorder and the parameters available for each command. This information is also available by running the jcmd command with the process identifier specified, followed by the help parameter and the commad name. For example, to get help information for the JFR.start command on a running JVM process with the identifier 5361, run the following:

jcmd 5361 help JFR.start

To get a full list of diagnostic commands available to the JVM, do not specify the name of the command. For more information about using the jcmd command, see the jcmd documentation at:

http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jcmd.html

The diagnostic commands associated with Java Flight Recorder are:

  • JFR.start

  • JFR.check

  • JFR.stop

  • JFR.dump

A.2.1 JFR.start

The JFR.start diagnostic command starts a flight recording. Table A-1 lists the parameters you can use with this command.

Table A-1 JFR.start

Parameter | Description | Type of value | Default
name | Name of recording | String |
settings | Server-side template | String |
defaultrecording | Starts default recording | Boolean | False
delay | Delay start of recording | Time | 0s
duration | Duration of recording | Time | 0s (means "forever")
filename | Resulting recording filename | String |
compress | GZip compress the resulting recording file | Boolean | False
maxage | Maximum age of buffer data | Time | 0s (means "no age limit")
maxsize | Maximum size of buffers in bytes | Long | 0 (means "no max size")

A.2.2 JFR.check

The JFR.check command shows information about running recordings. Table A-2 lists the parameters you can use with this command.

Table A-2 JFR.check

Parameter | Description | Type of value | Default
name | Recording name | String |
recording | Recording id | Long | 1
verbose | Print verbose data | Boolean | False

A.2.3 JFR.stop

The JFR.stop diagnostic command stops running flight recordings. Table A-3 lists the parameters you can use with this command.

Table A-3 JFR.stop

Parameter | Description | Type of value | Default
name | Recording name | String |
recording | Recording id | Long | 1
discard | Discards the recording data | Boolean |
copy_to_file | Copy recording data to file | String |
compress_copy | GZip compress "copy_to_file" destination | Boolean | False

A.2.4 JFR.dump

The JFR.dump diagnostic command stops running flight recordings. Table A-4 lists the parameters you can use with this command.

Table A-4 JFR.dump

Parameter | Description | Type of value | Default
name | Recording name | String |
recording | Recording id | Long | 1
copy_to_file | Copy recording data to file | String |
compress_copy | GZip compress "copy_to_file" destination | Boolean | False

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition/Java Flight Recorder Runtime Guide, Release 8

Documentation Contents
Java Platform, Standard Edition Java Flight Recorder Runtime Guide
Contents Previous Next

Java Platform, Standard Edition

Java Flight Recorder Runtime Guide

Release 8

E28976-01

March 2014

Describes the Java Flight Recorder runtime implementation and instructions for using the tool.

Java Platform, Standard Edition/Java Flight Recorder Runtime Guide, Release 8

E28976-01

Copyright 2001, 2014Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document describes the Java Flight Recorder runtime implementation and instructions for using the tool.

Audience

This document is intended for Java developers and support engineers who need an introduction about the architecture and runtime implementation of Java Flight Recorder. It assumes that the reader has basic knowledge of Java.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Running Java Flight Recorder

Documentation Contents
Java Platform, Standard Edition Java Flight Recorder Runtime Guide
Contents Previous Next

2 Running Java Flight Recorder

This chapter describes how you can run Java Flight Recorder.

You can run multiple recordings concurrently and configure each recording using different settings; in particular, you can configure different recordings to capture different sets of events. However, in order to make the internal logic of Java Flight Recorder as streamlined as possible, the resulting recording always contains the union of all events for all recordings active at that time. This means that if more than one recording is running, you might end up with more information in the recording than you wanted. This can be confusing but has no other negative implications.

The easiest and most intuitive way to use JFR is through the Flight Recorder plugin that is integrated into Java Mission Control. This plugin enables access to JFR functionality through an intuitive GUI. For more information about using the JMC client to control JFR, see the Flight Recorder Plugin section of the Java Mission Control help.

This chapter explains more advanced ways of running and managing JFR recordings and contains the following sections:

  • Section 2.1, "Using the Command Line"

  • Section 2.2, "Using Diagnostic Command"

  • Section 2.3, "Configuring Recordings"

  • Section 2.4, "Creating Recordings Automatically"

  • Section 2.5, "Security"

  • Section 2.6, "Troubleshooting"

2.1 Using the Command Line

You can start and configure a recording from the command line using the -XX:StartFlightRecording option of the java command, when starting the application. To enable the use of JFR, specify the -XX:+FlightRecorder option. Because JFR is a commercial feature, you also have to specify the -XX:+UnlockCommercialFeatures option. The following example illustrates how to run the MyApp application and immediately start a 60-second recording which will be saved to a file named myrecording.jfr:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=myrecording.jfr MyApp

To configure JFR, you can use the -XX:FlightRecorderOptions option. For more information, see Appendix A, "Command-Line Options".

2.2 Using Diagnostic Command

You can also control recordings by using Java-specific diagnostic commands. For a more detailed description of Diagnostic Commands, see Appendix A, "Diagnostic Command Reference".

The simplest way to execute a diagnostic command is to use the jcmd tool (located in the Java installation directory). To issue a command, you have to pass the process identifier of the JVM (or the name of the main class) and the actual command as arguments to jcmd. For example, to start a 60-second recording on the running Java process with the identifier 5368 and save it to myrecording.jfr in the current directory, use the following:

jcmd 5368 JFR.start duration=60s filename=myrecording.jfr

To see a list of all running Java processes, run the jcmd command without any arguments. To see a complete list of commands available to a runnning Java application, specify help as the diagnostic command after the process identificator (or the name of the main class). The commands relevant to Java Flight Recorder are:

  • JFR.start

    Start a recording.

  • JFR.check

    Check the status of all recordings running for the specified process, including the recording identification number, file name, duration, and so on.

  • JFR.stop

    Stop a recording with a specific identification number (by default, recording 1 is stopped).

  • JFR.dump

    Dump the data collected so far by the recording with a specific identification number (by default, data from recording 1 is dumped).

Note:

These commands are available only if the Java application was started with the Java Flight Recorder enabled, that is, using the following options:

-XX:+UnlockCommercialFeatures -XX:+FlightRecorder

2.3 Configuring Recordings

You can configure an explicit recording in a number of other ways. These techniques work the same regardless of how you start a recording (that is, either by using the command-line approach or by using diagnostic commands).

2.3.1 Setting Maximum Size and Age

You can configure an explicit recording to have a maximum size or age by using the following parameters:

  • maxsize=size

    Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes, or do not specify any suffix to set the size in bytes.

  • maxage=age

    Append the letter s to indicate seconds, m to indicate minutes, h to indicate hours, or d to indicate days.

If both a size limit and an age are specified, the data is deleted when either limit is reached.

2.3.2 Setting the Delay

When scheduling a recording. you might want to add a delay before the recording is actually started; for example, when running from the command line, you might want the application to boot or reach a steady state before starting the recording. To achieve this, use the delay parameter:

delay=delay

Append the letter s to indicate seconds, m to indicate minutes, h to indicate hours, or d to indicate days.

2.3.3 Setting Compression

Although the recording file format is very compact, you can compress it further by adding it to a ZIP archive. To enable compression, use the following parameter:

compress=true

Note that CPU resources are required for the compression, which can negatively impact performance.

2.4 Creating Recordings Automatically

When running with a default recording you can configure Java Flight Recorder to automatically save the current in-memory recording data to a file whenever certain conditions occur. If a disk repository is used, the current information in the disk repository will also be included.

2.4.1 Creating a Recording On Exit

To save the recording data to the specified path every time the JVM exits, start your application with the following option:

-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=path

Set path to the location where the recording should be saved. If you specify a directory, a file with the date and time as the name is created in that directory. If you specify a file name, that name is used. If you do not specify a path, the recording will be saved in the current directory.

2.4.2 Creating a Recording Using Triggers

You can use the Console in Java Mission Control to set triggers. A trigger is a rule that executes an action whenever a condition specified by the rule is true. For example, you can create a rule that triggers a flight recording to commence whenever the heap size exceeds 100 MB. Triggers in Java Mission Control can use any property exposed through a JMX MBean as the input to the rule. They can launch many other actions than just Flight Recorder dumps.

Define triggers on the Triggers tab of the JMX Console. For more information on how to create triggers, see the Java Mission Control help.

2.5 Security

Java Flight Recorder is intended only for diagnostic purposes. The recording file can potentially contain confidential information such as Java command-line options and environment variables. Use extreme care when you store or transfer the recording files as you would do with diagnostic core files or heap dumps.

Table 2-1 describes security permissions for various methods of using JFR.

Table 2-1 Security Permissions

Method | Security
Command line | Anyone with access to the command line of the Java process must be trusted.
Diagnostic commands | Only the owner of the Java process can use jcmd to control the process.
Java Mission Control Client | Java Mission Control Client uses JMX to access the JVM.

2.6 Troubleshooting

You can collect a significant amount of diagnostic information from Java Flight Recorder by starting the JVM with one of the following options:

  • -XX:FlightRecorderOptions=loglevel=debug

  • -XX:FlightRecorderOptions=loglevel=trace.

For more information about the -XX:FlightRecorderOptions option, see the Oracle JRockit Command Line Reference at
http://docs.oracle.com/javase/8/docs/technotes/tools/solaris/java.html (Solaris, Linux)
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html (Windows)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Java Flight Recorder Runtime Guide
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Conventions

1 About Java Flight Recorder

  • 1.1 Understanding Events
  • 1.2 Understanding Data Flow
  • 1.3 Java Flight Recorder Architecture
  • 1.4 Enabling Java Flight Recorder

2 Running Java Flight Recorder

  • 2.1 Using the Command Line
  • 2.2 Using Diagnostic Command
  • 2.3 Configuring Recordings
    • 2.3.1 Setting Maximum Size and Age
    • 2.3.2 Setting the Delay
    • 2.3.3 Setting Compression
  • 2.4 Creating Recordings Automatically
    • 2.4.1 Creating a Recording On Exit
    • 2.4.2 Creating a Recording Using Triggers
  • 2.5 Security
  • 2.6 Troubleshooting

A Command Reference

  • A.1 Command-Line Options
  • A.2 Diagnostic Command Reference
    • A.2.1 JFR.start
    • A.2.2 JFR.check
    • A.2.3 JFR.stop
    • A.2.4 JFR.dump
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


About Java Mission Control

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

1 About Java Mission Control

This chapter provides an overview of Java Mission Control and its features.

Java Mission Control enables you to monitor and manage Java applications without introducing the performance overhead normally associated with these types of tools. It uses data collected for normal adaptive dynamic optimization of the Java Virtual Machine (JVM). Besides minimizing the performance overhead, this approach eliminates the problem of the observer effect, which occurs when monitoring tools alter the execution characteristics of the system.

Java Mission Control consists of the client application (JMC client) and a number of plug-ins that run on it:

  • JVM Browser shows the running Java applications and their JVMs. Each JVM instance is called a JVM Connection.

  • JMX Console connects to a running JVM, collects and displays its characteristics in real time, and enables you to change some of the runtime properties through Managed Beans (MBeans). You can also create rules that trigger on certain events (for example, to send an email if the CPU usage by the application reaches 90 percent).

  • Java Flight Recorder (JFR) collects and saves detailed performance characteristics for historic analysis and profiling. It can be used as a standalone performance monitoring and profiling tool, but when used as a plug-in for the JMC client, it presents diagnostic information in logically grouped tables, charts, and dials. It enables you to select the range of time and level of detail necessary to focus on the problem.

Java Mission Control plug-ins connect to a JVM using the Java Management Extensions (JMX) agent. For more information about JMX, see the Java Management Extensions documentation at http://docs.oracle.com/javase/8/docs/technotes/guides/jmx/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessibility in Java Mission Control

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

3 Accessibility in Java Mission Control

This chapter describes the accessibility features provided by Java Mission Control.

Oracle is dedicated to providing high quality information technology that is accessible to people with disabilities. To this end, Oracle has undertaken a substantial project to ensure the accessibility of Java Mission Control. Oracle is implementing these enhancements and will continue to address all accessibility issues that arise.

3.1 Screen Readers

Oracle supports a number of screen readers that translate screen-based information into spoken words to assist vision-impaired users.

Configuration options are currently available for the JAWS screen reader produced by Freedom Scientific, Inc. For information on configuring this product, please refer to the Freedom Scientific screen reader website at
http://www.freedomscientific.com/documentation/screen-readers.asp

Note:

If you are using JAWS, be aware that switching tabs does not work as expected. For a workaround, see "Switching Between Tabs".

3.2 Java Mission Control Accessibility Mode

Java Mission Control displays performance data dials and graphs that provide a valuable graphical view of the data that can reveal trends and help identify minimum and maximum values for performance metrics. However, dials and graphs do not convey information in a manner that can be read by a screen reader. To remedy this problem, Java Mission Control provides a way to view dial and graph data in tabular format, which is more accessible for users with visual impairment. To toggle the accessibility mode, click the Accessibility mode button in the top-right corner of the relevant panel with dials or graphs.

To enable accessibility mode for all panels in Java Mission Control:

  1. Open the Window menu and select Preferences.

  2. Select Java Mission Control in the left pane.

  3. Under Accessibility Options, select Use accessibility mode.

  4. Click Apply.

3.3 Showing Text Labels on Buttons

Java Mission Control contains a lot of buttons with graphics and no text labels. To show the text labels that can be read by screen readers:

  1. Open the Window menu and select Preferences.

  2. Select Java Mission Control in the left pane.

  3. Under Accessibility Options, select Show text labels on buttons.

  4. Click Apply.

    Restart any running plug-ins to see the text labels on buttons.

3.4 Resizing Online Help Text

Vision-impaired users might find it difficult to read the online help documents in the standalone (RCP) version of Java Mission Control unless the text size is increased. Due to a limitation in the Eclipse help viewer, currently you cannot resize its text. To change the font size, view the help in an external browser.

To change the default viewer for Java Mission Control Help:

  1. Open the Window menu and select Preferences.

  2. Select Help in the left pane.

  3. Under Open Modes, select to open help contents in an external browser.

  4. Click Apply.

Java Mission Control will use the default web browser specified in the operating system, and you cannot specify a different web browser from within Java Mission Control. How you specify a browser in the operating system depends on the operating system.

3.5 Known Issues and Workarounds

This section contains additional instructions for enhancing your experience with Java Mission Control's accessibility features.

Navigating in a Tree Table with Only One Row

When navigating in a tree table component containing only one row, press the Space key or the Shift key and use the Up and Down keys to get to the row.

Switching Between Tabs

When reaching a tab component, JAWS erroneously tells the user to switch pages, press Ctrl+Tab. The correct way to switch between tabs is to use the left or right arrow keys.

Reading Table Data with a Screen Reader

To read table data more efficiently with screen reading software, copy and paste the table data into a text editor and read it from there. To copy the data, select the rows that you are interested in, right-click and select Copy. Then paste the data into a text editor.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Experimental Plug-ins

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

5 Experimental Plug-ins

This chapter provides inforrmation about experimental plug-ins that you can download from the Java Mission Control client.

The experimental plug-ins for Java Mission Control are a set of plug-ins designed to either extend Java Mission Control in various ways or assist in developing such extensions. An experimental plug-in can be one of the following:

  • A technology preview that may later be incorporated into the main distribution, depending on the feedback.

  • A plug-in extending Java Mission Control with functionality that is not directly related to Java SE, for example, the WebLogic Server plug-in for Java Flight Recorder.

Note:

These plug-ins are currently not supported and are provided only for evaluation purposes. The experimental plug-ins are not included in the Java Mission Control product distribution.

You can download and install the experimental plug-ins from the Experimental Update Site using the Java Mission Control client. To install a plug-in:

  1. Open the Help menu and select Install New Software.

  2. Select the plug-ins that you want to install and follow the installation wizard.

Note:

To use the installed plug-in, restart Java Mission Control.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Frequently Asked Questions

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous

6 Frequently Asked Questions

This chapter contains frequently asked questions and answers about Java Mission Control.

The following issues sometimes arise:

Issue 1I cannot connect to the JVM. What could be the problem?

Consider the following:

  • Are you using the correct protocol?

    Ensure that you are using the same version of the JVM that you want to monitor as is being used by the JVM running the JMC client.

    The format of the service URL is:

    service:jmx:rmi:///jndi/rmi://<hostname>/jmxrmi

  • Are the correct ports opened?

    Note that running JMX over RMI requires two ports and that one of the ports will not be known beforehand.

  • Is the communication caught in a firewall?

    For more information, see "Java Mission Control Communications" in the Introduction to Java Mission Control on the Oracle Technology Network.

Issue 2When attempting to connect to a JVM, I get a stack trace indicating that the JVM attempts to communicate with a strange IP or host name. What does this mean?

Sometimes RMI can have a problem determining which address to use. This can happen because of any of the following:

  • There are access restrictions in the Security manager.

  • The machine is multihomed and RMI is selecting the wrong interface.

  • There is a misconfigured hosts file or a number of different network related configuration problems.

If all else fails, you can try specifying the java.rmi.server.hostname system property. Note that this can affect applications running on the JVM.

Issue 3I am getting exceptions during startup about classes not being found. What is wrong?

Ensure that you are using JAVA_HOME/bin/jmc to start the JMC client.

Issue 4Why does Java Mission Control fail to find any local JVMs?

Consider the following:

  • Make sure that you are using JAVA_HOME/bin/jmc to start the JMC client.

  • If you are running JMC from Eclipse, make sure that Eclipse is running on a JDK (not JRE).

  • Make sure that there is a directory named hsperfdata_username in the system's tmp directory, that it is writable by the user running JMC, and that the file system supports access control lists (ACLs).

Issue 5How do I connect to JBoss?

Before starting JMC, you need to add the -Xbootclasspath/a option to the -vmargs section of the jmc.ini file. The value for this option (after a colon) should be set to the extended classpath that is generated by JBoss's jconsole.bat file (for this, add @echo on to the file and run it).

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition/Java Mission Control User's Guide, Release 8

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

Java Platform, Standard Edition

Java Mission Control User's Guide

Release 8

E28023-04

March 2014

Provides an overview of Java Mission Control. It includes information about the features, architecture, and accessibility of the product.

Java Platform, Standard Edition/Java Mission Control User's Guide, Release 8

E28023-04

Copyright 2001, 2014,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Logging Properties

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

4 Logging Properties

This chapter describes how to change the way Java Mission Control logs errors and warnings.

By default, the JMC client uses the logging.properties file located in the com.jrockit.mc.ui package (Java Archive or JAR file) to control the way logging is performed. For example, if you have a commercial license of the JDK installed in JAVA_HOME, the location of this JAR file should be JAVA_HOME/lib/missioncontrol/plugins.

You should not modify the original file. Instead, copy it to another location (for example, to the root of the JMC installation directory) and modify the copy. To point the JMC client to the copy of the logging.properties file:

  1. Open the Window menu and select Preferences.

  2. Select Java Mission Control from the left pane.

  3. In the Logging settings file field, specify the path and name of the logging properties file that you want to use. You can click Browse to select the file in the file system explorer window.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document provides an overview of Java Mission Control. It includes information about the features, architecture, and accessibility of the product.

Audience

This document is intended for Java developers and support engineers who need an introduction about the functionality and architecture of Java Mission Control. It assumes that the reader has basic knowledge of Java.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For information about using Java Mission Control, refer to the online help included with the product. You can view it by pressing F1 when working with the Java Mission Control client, or by clicking one of the question mark buttons located on most windows in the graphical user interface (GUI).

For information about Java Flight Recorder (JFR), see the Java Flight Recorder Runtime Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/jfr/

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

Abbreviations

The following abbreviations are used in this document:

Abbreviation | Meaning
JDK | Java Development Kit
JDP | Java Discovery Protocol
JFR | Java Flight Recorder
JMC | Java Mission Control
JMX | Java Management Extensions
JVM | Java Virtual Machine
MBean | Managed Bean (Java)
RCP | Rich Client Platform (Eclipse)
RMI | Remote Method Invocation (Java)

Support and Feedback

You can contact Oracle Support for technical assistance if you are entitled to the Oracle Support services for Java Mission Control. The following types of licenses include support for Java Mission Control:

  • Oracle Java SE Advanced

  • Oracle Java SE Suite

  • WebLogic Server Enterprise Edition

  • WebLogic Suite

If you have any suggestions about how to improve Java Mission Control or information on how it is most commonly used in your development environment, post it on the Java Mission Control forum at: https://forums.oracle.com/forums/forum.jspa?forumID=1419

All feedback is considered by the Java Mission Control development team to find ways for improving the product. Oracle's goal is to simplify the tasks for making your Java applications as fast and efficient as possible.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions
  • Abbreviations
  • Support and Feedback

1 About Java Mission Control

2 Using the Java Mission Control Client

  • 2.1 Starting the Java Mission Control Client
  • 2.2 Java Mission Control Client GUI
    • 2.2.1 Tabs and Tab Groups
    • 2.2.2 Panels

3 Accessibility in Java Mission Control

  • 3.1 Screen Readers
  • 3.2 Java Mission Control Accessibility Mode
  • 3.3 Showing Text Labels on Buttons
  • 3.4 Resizing Online Help Text
  • 3.5 Known Issues and Workarounds

4 Logging Properties

5 Experimental Plug-ins

6 Frequently Asked Questions

Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using the Java Mission Control Client

Documentation Contents
Java Platform, Standard Edition Java Mission Control User's Guide
Contents Previous Next

2 Using the Java Mission Control Client

This chapter describes how to start the JMC client and use its features.

The JMC client is the main application from which you connect to JVMs and start the tools included in Java Mission Control. You can run the JMC client either as a standalone application or as an Eclipse plug-in. Ensure that you run the JMC client in a secure environment, because it does not include or run with a security manager.

2.1 Starting the Java Mission Control Client

The JMC client executable file is located in the bin directory of the Java SE Development Kit (JDK) installation path (JAVA_HOME). If the JAVA_HOME/bin directory is in the PATH environment variable, you can start the JMC client by entering jmc at the command-line prompt (shell). Otherwise, you have to specify the full path to the JMC executable:

  • JAVA_HOME\bin\jmc.exe (Windows)

  • JAVA_HOME/bin/jmc (Linux, OS X)

Note:

On Windows, a shortcut to the JMC client executable is added to the Java Development Kit folder under All Programs in the Start menu.

Note

On OS X, if you cannot find the JMC executable or locate JMC in Spotlight, you can start JMC from the command line using /Library/Java/JavaVirtualMachines/jdk<version>.jdk/Contents/Home/bin/jmc. Alternatively, use Finder to browse to /Library/Java/JavaVirtualMachines/jdk<version>.jdk/Contents/Home/lib/missioncontrol and double-click the Java Mission Control app.

Note

On OS X, when you launch the JMC executable, the Terminal window opens. When you close the JMC client, the Terminal is left behind with the text [Process completed]. To avoid this, open the Terminal Preferences, then open the Settings tab, select the scheme you use, then select the Shell tab, and change the When the shell exits option to Close if the shell exited cleanly.

Passing JVM Options To the JMC Launcher

JMC is a Java application, and the JMC client executable is a launcher for this application. JMC startup is controlled by options specified in the jmc.ini file, which is located in the JAVA_HOME/bin directory. Arguments to the -vmargs option in the jmc.ini file are options that are passed to the JVM running the JMC application. You can specify these options to control the way this JVM runs. If you do not want to modify the jmc.ini file, you can specify JVM options on the command line as arguments to the -vmargs option of the jmc command.

Note:

If other options are specified for the jmc command, the -vmargs option must be specified last.

To start the JMC client with your own set of JVM options (overriding those specified in the jmc.ini file), run the following command (separate multiple arguments with spaces):

jmc -vmarg arguments

To start the JMC client with additional JVM options (appending them to those specified in the jmc.ini file), run the following command (separate multiple arguments with spaces):

jmc --launcher.appendVmargs -vmarg arguments

Using a Workspace Directory

If you want to copy your settings for the JMC client to another computer or another user, or use different predefined settings for different applications, add the -data command-line option and define a workspace directory when you start the JMC client:

jmc -data workspace-directory

2.2 Java Mission Control Client GUI

When you first launch the JMC client, the left part of the window contains two views by default:

  •

    JVM Browser is the plugin that shows all available JVM connections.

    •

  •

    Event Types contains a list of event types for a selected flight recording. For information about opening a flight recording, see the Java Flight Recorder plug-in section of the online help.

    •

You can open the Window menu, select Show View and then Other to open a window that lists all available views. Select the necessary views and click OK to open them. The following views are available in addition to the default ones:

  •

    Properties lists the properties of items that you select in tables, including hidden properties that are not displayed in the tables.

    •

  •

    Progress View displays the progress of running operations, for example, a flight recording.

    •

  •

    Help displays the Java Mission Control online help.

    •

The other part of the JMC client window is reserved for the Editor Area, which is used to work with the plug-ins for available JVM connections. To launch a plug-in, right-click a JVM connection and select the plug-in (Start JMX Console, Open Historical Data, Start Flight Recording, etc.).

2.2.1 Tabs and Tab Groups

Views and editors are displayed as tabs united into tab groups. You can drag tabs and tab groups around the JMC client window to create a layout that works best for you. View tabs and tab groups can even be detached from the main window.

You can maximize a tab group to the size of the JMC client window or minimize it to make more room for other tab groups:

  •

    To maximize a tab group, click the Maximize button in the top-right corner. The tab group expands almost to the size of the JMC client window and the Maximize button changes to the Restore button. The other tab groups are automatically minimized.

    •

  •

    To minimize a tab group, click the Minimize button in the top-right corner. The tab group shrinks and the Minimize button changes to the Restore button. The other tab groups fill the rest of the JMC client window proportionally.

    •

  •

    To restore the tab to its original state, click the Restore button.

    •

To separate logically related information, editor tabs are divided into subtabs (or subtab groups), allowing you to drill down into specific data. Some of the subtabs have buttons to control the data displayed in them to the right of the subtab name.

2.2.2 Panels

Editor tabs are composed of panels with logically related information in the form of graphs, tables, lists, and so on. You can modify some of the parameters using various controls in the panels, such as buttons, text fields, drop-down lists, and so on.

Some panels can be collapsed to make more room for other panels in the tab (using the black triangle show and hide button next to the panel name). To the right of the panel name, there are buttons to add and remove components, refresh data, switch modes, change settings, get online help about the panel, and so on.

Most panels are unique, but some are similar for different tabs. Information for using each panel is provided in the description for the panel. To see this information, click the question mark button to the right of the panel name.

                Contents
                Previous
                Next

  Oracle and/or its affiliates

Copyright
© 1993, 2014, Oracle and/or its affiliates. All rights
reserved.

Contact
Us


Java Management Extensions

Documentation Contents

Java Management Extensions (JMX) Tracing

Traces in the JMX implementation are based on the Java SE logging capability (provided by classes in the java.util.logging package). The JMX implementation uses a set of Loggers for sending traces. All Loggers are contained in the javax.management namespace, which corresponds to the name of the root package hosting all public JMX interfaces.

The list below shows the Logger objects used in this implementation and their corresponding category of activity.

Logger Name: | Information logged
javax.management.mbeanserver | Information about the MBean Server
javax.management.mlet | Information from an MLet service
javax.management.monitor | Information from a monitor
javax.management.timer | Information from a timer
javax.management.notification | Information from the notification mechanism
javax.management.relation | Information from the Relation Service
javax.management.modelmbean | Information from the Model MBean components
javax.management.misc | Information sent from any other class.
javax.management.remote.rmi | Information from the RMI connector.
javax.management.remote.misc | Information sent from any other JMX Remote API class.

The following log levels are used in JMX:

JMX log level: | Description
Level.FINEST | Used to print debugging traces (useful for diagnosing the JMX implementation)
Level.FINER | Used to print information traces
Level.SEVERE | Used to notify of error conditions
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Management Extensions API Enhancements

Documentation Contents

JMX API Enhancements

  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0

Enhancements in Java SE 7

There were no API changes to JMX in JDK 7.

Enhancements in Java SE 6

javax.management

  • Generification.
    The JMX API now fully supports Generics.

  • ObjectName supports wildcards.
    key=* wildcards are now supported in ObjectName. Previously, "domain:key1=value1,*" could be used to match MBeans that have key1=value1 in their name, but "domain:key1=*" could not be used to match MBeans that have key1 in their name. This is now possible.

  • New JMX class.
    A new class, javax.management.JMX, has been added to house constants and static methods.

  • MBean Descriptors added.
    MBean Descriptors have been added. Descriptors allow you to give additional information about MBeans to management clients. See MBean Descriptors in the JMX Technology Tutorial for information.

  • MXBeans added.
    MXBeans have been added. MXBeans are MBeans that provide a convenient way to bundle related values together without requiring clients to be specially configured to handle the bundles. A defined set of MXBeans already existed in the Java SE 5.0 platform, but Java SE 6 introduces an API to allow you to program your own custom MXBeans. See Introducing MXBeans in the JMX Technology Tutorial for information.

java.management.monitor

  • JMX Monitor API now supports complex types.
    Improvements have been made to the JMX Monitor API to support complex types. Previously, only attributes of simple types could be monitored, but often, the value to be monitored is buried inside a more complex type. See the JMX Specification, version 1.4, for details of the behavior of monitors.

Enhancements in Java SE 5.0

The Java Management Extensions (JMX) technology became a part of the Java platform in the Java Platform Standard Edition (Java SE) 5.0.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Management Extensions API Specification

Documentation Contents

Java Management Extensions (JMX)
API Specification

The Java Management Extensions (JMX) API is a standard API for management and monitoring.

The following packages of documentation generated by the Javadoc utility are provided for the JMX API:

  • javax.management
  • javax.management.loading
  • javax.management.modelmbean
  • javax.management.monitor
  • javax.management.openmbean
  • javax.management.relation
  • javax.management.remote
  • javax.management.remote.rmi
  • javax.management.timer
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Management Extensions Examples

Documentation Contents

Java Management Extensions (JMX) Examples

The files listed below are code examples demonstrating some of the main features of JMX technology. You can use these examples to develop more complex MBeans and full-featured JMX agents to fit your management solution.

Each example consists of Java source files and a README file. The README file explains the topics covered by the example and instructions for compiling and running the classes.

You can also download a Zip file of all the JMX technology examples. For more complete descriptions of how to run the examples, see the JMX Technology Tutorial.

Note - In addition to the examples presented here, you can download the Java SE Demos and Samples bundle. Once you have unzipped the bundle, a sample application that demonstrates a real-life implementation of the JMX API can be found in the following directory:

JDK_HOME/sample/jmx/jmx-scandir

The jmx-scandir example is an advanced example, which presents advanced concepts of the JMX API in a real-world scenario.

The following JMX technology examples are provided in the examples ZIP file:

JMX Essentials

This example introduces the fundamental notion of the JMX API, namely managed beans, or MBeans.

View the README file or the source code for the Java classes used:

  • Hello
  • HelloMBean
  • Main

JMX MBean Notifications

This example implements MBean notifications.

View the README file or the source code for the Java classes used:

  • Hello
  • HelloMBean
  • Main

MXBeans

This example demonstrates the use of MXBeans.

View the README file or the source code for the Java classes used:

  • Main
  • QueueSample
  • QueueSampler
  • QueueSamplerMXBean

MBean Descriptors

This example demonstrates the use of MBean Descriptors.

View the README file or the source code for the Java classes used:

  • Author
  • DisplayName
  • Main
  • QueueSample
  • QueueSampler
  • QueueSamplerMXBean
  • Version

JMX Connectors

This example provides a sample implementation of how to connect to MBeans and perform operations on them remotely.

View the README file or the source code for the Java classes used:

  • Server
  • SimpleStandardMBean
  • SimpleStandard
  • SimpleDynamic
  • ClientListener
  • Client

Lookup Services

The JMX API defines three bindings to lookup services, using existing lookup technologies These examples provide a sample implementation of each type of lookup service.

  • Service Location Protocol (SLP) Lookup Service
    View the README file or the source code for the Java classes used:
    • Server
    • Client
  • Jini Lookup Service.
    View the README file or the source code for the Java classes used:
    • Server
    • Client
    • java.policy
    • jini.properties.template
  • Java Naming and Directory Interface (JNDI)/LDAP Lookup Service
    View the README file or the source code for the Java classes used:
    • Server
    • Client
    • jmx-schema.txt
    • 60jmx-schema.ldif

Security

The JMX API implements existing security protocols to secure your connections.

These examples provide a sample secure implementations

  • Simple Security
    View the README file or the source code for the Java classes used:
    • Server
    • Client
    • ClientListener
    • access.properties
    • keystore
    • password.properties
    • truststore
    • SimpleStandard
    • SimpleStandardMBean
  • Security with Subject Delegation
    View the README file or the source code for the Java classes used:
    • Server
    • Client
    • ClientListener
    • access.properties
    • password.properties
    • java.policy
    • SimpleStandard
    • SimpleStandardMBean
  • Fine-Grained Security
    View the README file or the source code for the Java classes used:
    • Server
    • Client
    • ClientListener
    • keystore
    • password.properties
    • truststore
    • java.policy
    • SimpleStandard
    • SimpleStandardMBean
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK Java Management Extensions

Documentation Contents

Java Management Extensions (JMX)

The Java Management Extensions (JMX) API is a standard API for management and monitoring of resources such as applications, devices, services, and the Java virtual machine. The JMX technology was originally developed through the Java Community Process (JCP) as Java Specification Request (JSR) 3, Java Management Extensions, and JSR 160, JMX Remote API.

Typical uses of the JMX technology include:

  • Consulting and changing application configuration
  • Accumulating statistics about application behavior and making them available
  • Notifying of state changes and erroneous conditions.

The JMX API includes remote access, so a remote management program can interact with a running application for these purposes.

Overview

  • Overview - This overview provides an introduction to the JMX technology.

API Specification

  • API Reference - Online documentation for all JMX packages, classes and members of the agent and instrumentation RI, as generated by the Javadoc tool.

Tutorials and Programming Guides

  • JMX Tutorial - This tutorial presents some examples of the features of the JMX technology.
  • Examples - The JMX reference implementation contains code examples for different areas of JMX operation.

In addition to the above examples, you can download the Java SE Demos and Samples bundle. Once you have unzipped the bundle, a sample application that demonstrates a real-life implementation of the JMX API can be found in the following directory:

JDK_HOME/sample/jmx/jmx-scandir

The jmx-scandir example is an advanced example, which presents advanced concepts of the JMX API in a real-world scenario.

API Enhancements

  • JMX API Enhancements

More Information

  • JMX home page - The page for news, downloads, blogs and other information about the JMX specification.
  • JMX 1.4 Specification (PDF)
  • JMX Tracing - Traces in the JMX implementation are based on the Java SE logging capability.
  • JSR 3 - The JCP page for the JMX API.
  • JSR 160 - The JCP page for the JMX Remote API.
  • Java SE Monitoring and Management documentation
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Appendix A

JMX Technology Versions

Java Management Extensions Technology (JMX) became a standard part of the Java platform in the Java Platform Standard Edition (Java SE) 5.0. The JMX technology was developed through the Java Community Process (JCP) as two closely related Java Specification Requests (JSRs). The versions of the JSRs implemented in Java SE 5.0 are detailed in the following sections.

Java Management Extensions (JMX) Instrumentation and Agent Specification (JSR 3)

The Java SE 6 platform implements version 1.4 of the JMX Specification (Maintenance Release, October 2006). It incorporates the modifications listed in the errata provided with the download.

JMX Remote API Specification (JSR 160)

The Java SE 6 platform implements version 1.4 of the JMX Remote API Specification (Maintenance Release, October 2006).

In addition to standard RMI and RMI/IIOP connectors, JSR 160 also defines optional JMX Messaging Protocol (JMXMP) connectors based on TCP sockets. The Java SE platform does not include these optional connectors. However, you might want to use JMXMP connectors if, for example, you require a more advanced level of security.

If you want to use a JMXMP connector, download the JSR 160 Reference Implementation from the download page specified at the beginning of this section, and add the jmxremote_optional.jar file to your classpath. You will find examples of use of JMXMP connectors in the JMX Remote API Tutorial included with the JSR 160 Reference Implementation.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

Java Management Extensions (JMX) Technology Overview

Java Management Extensions (JMX)
Java Platform, Standard Edition version 7

April, 2012
Contents | Previous | Next

Contents

Preface

1. Introduction to JMX Technology

What Is JMX Technology?

Why Use JMX Technology?

What's New in JDK7?

2. JMX Architecture

Architecture Outline

Instrumenting Resources Using MBeans

Creating a JMX Agent

Managing Resources Remotely

3. Instrumenting Your Resources for JMX Technology

Manageable Resources

Managed Beans (MBeans)

Java Virtual Machine Instrumentation

4. Using JMX Agents

MBean Server

Agent Services

Protocol Adaptors and Connectors

Protocol Adaptors

Connectors

5. Using JMX Connectors to Manage Resources Remotely

RMI Connector

Generic Connector

User-Defined Protocols

6. Discovery and Lookup Services

Getting Started With Lookup Services

Using the Service Location Protocol (SLP)

Using the Jini Network Technology

Using the Java Naming and Directory Interface (JNDI) API With an LDAP Backend

A. JMX Technology Versions

Java Management Extensions (JMX) Instrumentation and Agent Specification (JSR 3)

JMX Remote API Specification (JSR 160)

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Chapter 6

Discovery and Lookup Services

The Java Management Extensions (JMX) Remote API Specification describes how you can advertise and find JMX API agents by using existing discovery and lookup infrastructures. The specification does not define any discovery and lookup APIs specific to JMX technology.

This chapter provides a brief outline of existing discovery and lookup infrastructures that you can use with JMX technology, in the following sections:

  • "Getting Started With Lookup Services"
  • "Using the Service Location Protocol (SLP)"
  • "Using the Jini Network Technology"
  • "Using the Java Naming and Directory Interface (JNDI) API With an LDAP Backend"

For more information about these infrastructures, see the “References” section of the Java Management Extensions Remote API 1.0 Specification.

Getting Started With Lookup Services

Lookup services can be used by JMX agents and JMX clients. A single Java VM can contain many JMX agents and/or JMX clients.

  • A JMX agent is a logical server application composed of the following features:
  • One MBean server
  • One or more JMX connector servers that allow remote clients to access the MBeans contained in that MBean server
  • A JMX client is a logical client application that opens a client connection with a JMX agent.

The Java Management Extensions (JMX) Technology Tutorial and its accompanying examples demonstrate how to use lookup services to advertise and find JMX agents. The procedure is similar for all three infrastructures. The main difference is that in SLP and JNDI, the agent registers addresses with the lookup service, whereas when using the Jini network technology, the agent registers a JMX connector stub with the lookup service.

Note – The use of existing discovery and lookup services is optional. Alternatively, you can encode the addresses of your JMX API agents in the form of URLs, and communicate these URLs to the manager.

Using the Service Location Protocol (SLP)

The Service Location Protocol (SLP) provides a framework that allows networking applications to discover the existence, location, and configuration of networked services in enterprise networks.

The following steps summarize the procedure defined in the JMX Remote API specification for using the SLP lookup service to advertise and find JMX agents:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers the address with the SLP lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the SLP lookup service, and retrieves one or more addresses that match the query.
  • Finally, the client obtains a connector that is connected with the server identified by a retrieved address.

The JMX Remote API specification defines URL schemes which are compliant with the SLP protocol. See the Java Management Extensions (JMX) Remote API Specification. The specification also defines mandatory and optional SLP lookup attributes that are provided at registration time.

Using the Jini Network Technology

The Jini Network Technology is an open software architecture that enables developers to create services that are adaptable to changes in the network. The Jini specification offers a standard lookup service. A running Jini lookup service can be discovered with a simple API call.

The following steps summarize the procedure defined in the JMX Remote API specification for using the Jini lookup service to advertise and find JMX agents:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers a JMX connector stub with the Jini lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the Jini lookup service, and retrieves one or more connector stubs that match the query.
  • Finally, the client connects directly to the server using the provided connector stub.

The JMX Remote API specification defines bindings with Jini technology based entries. See the Java Management Extensions (JMX) Remote API Specification. The specification also defines mandatory and optional entries to specify when registering an agent connector.

Using the Java Naming and Directory Interface (JNDI) API With an LDAP Backend

The Java Naming and Directory Interface (JNDI) API is a standard extension to the Java platform. It provides Java technology-enabled applications with a unified interface to a number of naming and directory services.

The JMX Remote API specification details how an LDAP server can be used to store and retrieve information about JMX connectors exposed by JMX agents.

The following steps summarize the procedure defined in the JMX Remote API specification for using the JNDI lookup service:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers the address with the JNDI lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the JNDI lookup service, and retrieves one or more addresses that match the query.
  • Finally, the client obtains a connector that is connected to the server identified by a retrieved address.

The JMX Remote API defines an LDAP schema for registering addresses and explains how a client can discover a registered agent. See the JMX 1.4 Specification for details. The specification also defines a lease mechanism.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Chapter 3

Instrumenting Your Resources for JMX Technology

This chapter outlines the concepts behind instrumenting resources for management using JMX technology, in the following sections:

  • "Manageable Resources"
  • "Managed Beans (MBeans)"
  • "Java Virtual Machine Instrumentation"

Manageable Resources

Different types of resource can be managed using JMX technology, for example an application, an implementation of a service, a device or a user. For a given resource to be managed by JMX technology, it must be developed in the Java language, or at least offer a Java language wrapper. It must also be instrumented by one or more Java objects known as managed beans (MBeans), in compliance with the JMX specification.

Developers of applications and devices are free to choose the granularity of objects that are instrumented as MBeans. An MBean might represent the smallest object in an application, or it could represent the entire application. Application components designed with their management interface in mind can typically be written as MBeans. MBeans can also be used as wrappers for legacy code without a management interface or as proxies for code with a legacy management interface.

Managed Beans (MBeans)

The Java objects that implement resources and their instrumentation are called managed beans, or MBeans. MBeans must follow the design patterns and interfaces defined in the JMX specification (JSR 3). This ensures that all MBeans provide the instrumentation of managed resources in a standardized way.

The instrumentation of a given resource is provided by one or more MBeans that are either standard or dynamic. Standard MBeans are Java objects that conform to certain design patterns derived from the JavaBeansTM component model. Dynamic MBeans conform to a specific interface that offers more flexibility at runtime. MXBeans reference only a pre-defined set of types.

The instrumentation of a resource allows it to be manageable through the agent level described in Chapter 4, "Using JMX Agents". MBeans do not require knowledge of the JMX agent with which they operate.

MBeans are designed to be flexible, simple, and easy to implement. Developers of applications, services, or devices can make their products manageable in a standard way without having to understand or invest in complex management systems. Existing objects can easily be evolved to produce standard MBeans or wrapped as dynamic MBeans, thus making existing resources manageable with minimum effort.

In addition, the instrumentation level also specifies a notification mechanism. This allows MBeans to generate and propagate notification events to components of the other levels.

The management interface of an MBean consists of:

  • Named and typed attributes that can be read and/or written
  • Named and typed operations that can be invoked
  • Typed notifications that can be emitted by the MBean

The Java class of a standard MBean exposes the resource to be managed directly through its attributes and operations. Attributes are internal entities that are exposed through getter and setter methods. Operations are the other methods of the class that are available to managers. All these methods are defined statically in the MBean interface and are visible to a JMX agent through introspection. This is the most straightforward way of making a new resource manageable.

A dynamic MBean is an MBean that defines its management interface at runtime. For example, a configuration MBean could determine the names and types of the attributes it exposes by parsing an XML file.

An MXBean is a new type of MBean that provides a simple way to code an MBean that only references a pre-defined set of types. In this way, you can be sure that your MBean will be usable by any client, including remote clients, without any requirement that the client have access to model-specific classes representing the types of your MBeans.

Java Virtual Machine Instrumentation

The Java Virtual Machine (Java VM) is highly instrumented using JMX technology. You can easily start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage the Java VM remotely by means of JMX technology.

To find out more about using JMX technology to monitor and manage the Java VM, see the Java SE Monitoring and Management Guide.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Contents | Previous | Next

Chapter 1

Introduction to JMX Technology

Note: If you are already familiar with JMX technology, see Appendix A, "JMX Technology Versions" for version information.

JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Because JMX technology is dynamic, you can use it to monitor and manage resources as they are created, installed and implemented. You can also use JMX technology to monitor and manage the Java Virtual Machine1 (Java VM).

JMX technology was developed through the Java Community Process (JCP) as two closely related Java Specification Requests (JSRs):

  • JSR 3, Java Management Extensions Instrumentation and Agent Specification
  • JSR 160, Java Management Extensions Remote API

Each of the JSRs is defined by the API documentation generated by the Javadoc tool, in conjunction with the PDF specification documents for each JSR.

As its name indicates, the JMX Remote API adds remote capabilities to the JMX specification, allowing you to monitor and manage applications, systems and networks remotely. In this document, the term “JMX technology” is used to cover both the JMX specification and the JMX Remote API.

This chapter introduces JMX technology in the following sections:

  • "What Is JMX Technology?"
  • "Why Use JMX Technology?"
  • "What's New in JDK7"

What Is JMX Technology?

The JMX specification defines an architecture, the design patterns, the APIs, and the services for application and network management and monitoring in the Java programming language.

Using JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core managed object server, known as an MBean server, that acts as a management agent and can run on most devices enabled for the Java programming language.

The specifications define JMX agents that you use to manage resources instrumented in compliance with the specifications. A JMX agent consists of an MBean server, in which MBeans are registered, and a set of services for handling MBeans. In this way, JMX agents directly control resources and make them available to remote management applications.

The way in which resources are instrumented is completely independent from the management infrastructure. Resources can therefore be rendered manageable regardless of how their management applications are implemented.

JMX technology defines standard connectors (JMX connectors) that allow you to access JMX agents from remote management applications. JMX connectors using different protocols provide the same management interface. Hence a management application can manage resources transparently, regardless of the communication protocol used. JMX agents can also be used by systems or applications that are not compliant with the JMX specification but which support JMX agents.

Why Use JMX Technology?

JMX technology provides Java developers across all industries with a flexible means to instrument Java code, create smart Java agents, implement distributed management middleware and managers, and smoothly integrate these solutions into existing management and monitoring systems.

  • JMX technology enables Java applications to be managed without heavy investment: A JMX technology agent can run on most Java technology-enabled devices, thus Java applications can become manageable with little impact on their design. A Java application simply needs to embed a managed object server and make some of its functionality available as one or several managed beans (MBeans) registered in the object server; that is all it takes to benefit from the management infrastructure.
  • JMX technology provides a standard way to manage Java technology-based applications, systems, and networks. For example, the Java Platform, Enterprise Edition (Java EE) 5 Application Server conforms to the JMX architecture and consequently can be managed using JMX technology.
  • JMX technology can be used for out-of-the-box management of the Java VM. The Java Virtual Machine (Java VM) is highly instrumented using JMX technology. You can easily start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage the Java VM remotely.
  • JMX technology provides a scalable, dynamic management architecture. Every JMX agent service is an independent module that can be plugged into the management agent, depending on the requirements. This component-based approach means that JMX solutions can scale from small-footprint devices to large telecommunications switches and beyond. The JMX specification provides a set of core agent services. Additional services can be developed and dynamically loaded, unloaded, or updated in the management infrastructure.
  • JMX technology leverages existing standard Java technologies. Whenever needed, the JMX specification references existing Java specifications, for example, the Java Naming and Directory Interface (JNDI).
  • Creating JMX applications has been made easier by the creation of a JMX module for the NetBeans IDE. You can obtain the JMX module from the NetBeans Update Center.
  • JMX technology integrates easily with existing management solutions and emerging technologies. For example, JMX agents could be managed through an HTML browser. The JMX APIs are open interfaces that any management system vendor can leverage. JMX solutions can use lookup and discovery services and protocols such as Jini network technology and the Service Location Protocol (SLP).

What's New in JDK7

Beginning with JDK7 Update 4, virtual machine support for JMX has been enhanced with additional features to support management and monitoring systems. Here is a summary of those enhancements.

  • JCMD options have been provided to stop running JMX agent and to restart it again after changing its options. See the man page for jcmd (Solaris, Linux, or Mac OS X or Windows).
  • A JCMD option is available to change the options of a stopped JMX agent.
  • The JMX agent now supports the configuration of the communications port to enable connections through firewalls.
  • The JMX agent now supports attach on demand.
1The terms “Java Virtual Machine” and “Java VM” mean a virtual machine for the Java platform.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Chapter 2

JMX Architecture

JMX technology provides a standard API for management and monitoring of resources. The API includes remote access, so a remote management application can manage and monitor applications, systems, and networks. This chapter outlines JMX architecture in the following sections:

  • "Architecture Outline"
  • "Instrumenting Resources Using MBeans"
  • "Creating a JMX Agent"
  • "Managing Resources Remotely"

Architecture Outline

JMX technology is defined by two closely related specifications developed through the Java Community Process (JCP) as Java Specification Request (JSR) 3 and JSR 160:

  • JSR 3, Java Management Extensions Instrumentation and Agent Specification
  • JSR 160, Java Management Extensions Remote API

The following table shows that the management architecture can be broken down into three levels. The first two levels shown in the table, instrumentation and agent,

Java VM are defined by JSR 3. The remote management level is defined by JSR 160.

TABLE 2-1 – JMX Technology Architecture
Level | Description
Instrumentation | Resources, such as applications, devices, or services, are instrumented using Java objects called Managed Beans (MBeans). MBeans expose their management interfaces, composed of attributes and operations, through a JMX agent for remote management and monitoring.
Agent | The main component of a JMX agent is the MBean server. This is a core managed object server in which MBeans are registered. A JMX agent also includes a set of services for handling MBeans. JMX agents directly control resources and make them available to remote management agents.
Remote Management | Protocol adaptors and standard connectors make a JMX agent accessible from remote management applications outside the agent’s Java Virtual Machine (Java VM).

Instrumenting Resources Using MBeans

To manage resources using JMX technology, you must first instrument the resources in the Java programming language. You use Java objects known as MBeans to implement the access to the instrumentation of resources. MBeans must follow the design patterns and interfaces defined in the specification. This ensures that all MBeans provide the instrumentation of managed resources in a standardized way.

Once a resource has been instrumented by MBeans, it can be managed through a JMX agent. MBeans do not require knowledge of the JMX agent with which they will operate.

MBeans are designed to be flexible, simple, and easy to implement. Developers of applications, systems, and networks can make their products manageable in a standard way without having to understand or invest in complex management systems. Existing resources can be made manageable with minimum effort.

In addition, the instrumentation level specifies a notification mechanism. This allows MBeans to generate and propagate notification events to components of the other levels.

Creating a JMX Agent

A JMX agent is a standard management agent that directly controls resources and makes them available to remote management applications. JMX agents are usually located on the same machine as the resources they control, but this is not a requirement.

The core component of a JMX agent is the MBean server, a managed object server in which MBeans are registered. A JMX agent also includes a set of services to manage MBeans, and at least one communications adaptor or connector to allow access by a management application.

When you implement a JMX agent, you do not need to know the semantics or functions of the resources that it will be used to manage. In fact, a JMX agent does not even need to know which resources it will serve, because any resource instrumented in compliance with the JMX specification can use any JMX agent that offers the services it requires. Similarly, the agent does not need to know the functions of the management applications that will access it.

Managing Resources Remotely

JMX API instrumentation can be accessed in many different ways, either through existing management protocols such as the Simple Network Management Protocol (SNMP), or through proprietary protocols. The MBean server relies on protocol adaptors and connectors to make a JMX agent accessible from management applications outside the agent’s Java Virtual Machine (Java VM).

Each adaptor provides a view through a specific protocol of all MBeans registered in the MBean server. For example, an HTML adaptor could display an MBean in a Web browser.

Connectors provide a manager-side interface that handles the communication between manager and JMX agent. Each connector provides the same remote management interface though a different protocol. When a remote management application uses this interface, it can connect to a JMX agent transparently through the network, regardless of the protocol.

JMX technology provides a standard solution for exporting JMX API instrumentation to remote applications, based on Remote Method Invocation (RMI). In addition, the JMX Remote API defines an optional protocol based directly on TCP sockets, called the JMX Messaging Protocol (JMXMP). An implementation of the JMX Remote API does not have to support this optional protocol. The Java SE platform does not include the optional protocol. See Appendix A, "JMX Technology Versions" for further information.

The JMX Remote API specification describes how you can advertise and find JMX agents using existing discovery and lookup infrastructures. Examples of how to do this are provided and are described in the Java Management Extensions (JMX) Technology Tutorial. The specification does not define its own discovery and lookup service. The use of existing discovery and lookup services is optional: alternatively you can encode the addresses of your JMX API agents in the form of URLs, and communicate these URLs to the manager.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

The Java Management Extensions (JMX) Technology Overview provides an introduction to JMX technology.

Before You Read This Book

To make full use of the information in the Java Management Extensions (JMX) Technology Overview, you should have knowledge of the following technology:

  • The Java programming language and its development environment
  • The Java Platform, Standard Edition (Java SE) software

Some sections of this overview refer to the following protocols and specifications. You might want to investigate these areas further to gain a deeper insight into JMX technology:

  • The JavaBeans model
  • Remote Method Invocation (RMI)
  • Lightweight Directory Access Protocol (LDAP)
  • Service Location Protocol (SLP)
  • Jini Network Technology
  • Java Naming and Directory Interface (JNDI) API
  • Java Secure Socket Extension (JSSE)
  • Java Authentication and Authorization Service (JAAS)
  • Simple Authentication and Security Layer (SASL)

How This Book Is Organized

This document describes the JMX technology in the following chapters:

  • Chapter 1, "Introduction to JMX Technology" provides a brief outline of the JMX technology and indicates its main advantages and features.
  • Chapter 2, "JMX Architecture"
  • Chapter 3, "Instrumenting Your Resources for JMX Technology"
  • Chapter 4, "Using JMX Agents"
  • Chapter 5, "Using JMX Connectors to Manage Resources Remotely" describes the required connector defined by the JMX technology specification. It also outlines an optional generic connector. This chapter includes information on connector security features.
  • Chapter 6, "Discovery and Lookup Services" describes briefly how to use existing discovery and lookup services with the JMX technology
  • Appendix A, "JMX Technology Versions" defines the versions of the Java Specification Requests (JSRs) relating to JMX technology implemented in this version of the Java SE platform.

Typographic Conventions

Typeface | Meaning | Examples
AaBbCc123 | The names of commands, files, and directories; on-screen computer output | Edit your .login file. Use ls -a to list all files. % You have mail.
AaBbCc123 | What you type, when contrasted with on-screen computer output | % su Password:
AaBbCc123 | Book titles, new words or terms, words to be emphasized Command-line variable; replace with a real name or value | Read Chapter 6 in the User’s Guide. These are called class options. You must be superuser to do this. To delete a file, type rm filename.

Shell Prompts

Shell | Prompt
C shell | machine_name%
C shell superuser | machine_name#
Bourne shell and Korn shell | $
Bourne shell and Korn shell superuser | #

Related Documentation

  • Java Management Extensions Specification 1.4
  • Java Management Extensions Technology Tutorial

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Chapter 4

Using JMX Agents

A Java Management Extensions (JMX) agent is a management entity that runs in a Java Virtual Machine (Java VM) and acts as the liaison between the MBeans and the management application. The various components of a JMX agent are outlined in the following sections:

  • "MBean Server"
  • "Agent Services"
  • "Protocol Adaptors and Connectors"

MBean Server

The MBean server is the core component of a JMX agent. It is a registry for objects that are exposed to management operations in an agent. Any object registered with the MBean server becomes visible to management applications. However, the MBean server only exposes the management interface of an MBean, never its direct object reference.

Any resource that you want to manage from outside the agent’s Java VM must be registered as an MBean in the server. The MBean server also provides a standardized interface for accessing MBeans within the same Java VM, giving local objects all the benefits of manipulating manageable resources. MBeans can be instantiated and registered by:

  • Another MBean
  • The agent itself
  • A remote management application

When you register an MBean, you must assign it a unique object name. A management application uses the object name to identify the object on which it is to perform a management operation. The operations available on MBeans include:

  • Discovering the management interface of MBeans
  • Reading and writing their attribute values
  • Performing operations defined by the MBeans
  • Getting notifications emitted by MBeans
  • Querying MBeans based on their object name or their attribute values

Agent Services

Agent services are objects that can perform management operations on the MBeans registered in the MBean server. By including management intelligence into the agent, JMX helps you build more powerful management solutions. Agent services are often MBeans as well, allowing them and their functionality to be controlled through the MBean server. The JMX specification defines the following agent services:

  • Dynamic class loading through the management applet (m-let) service retrieves and instantiates new classes and native libraries dynamically downloaded from the network.
  • Monitors observe the numerical or string value of MBean attributes and can notify other objects of several types of changes.
  • Timers provide a scheduling mechanism and can send notifications at predetermined intervals.
  • The relation service defines associations between MBeans and maintains the consistency of the relation.

Protocol Adaptors and Connectors

Protocol adaptors and connectors make the agent accessible from remote management applications. They provide a view through a specific protocol of the MBeans instantiated and registered in the MBean server. They enable a management application outside the Java VM to:

  • Get or set attributes of existing MBeans
  • Perform operations on existing MBeans
  • Instantiate and register new MBeans
  • Register for and receive notifications emitted by MBeans

Consequently, for a JMX agent to be manageable, it must include at least one protocol adaptor or connector. The Java SE platform includes the standard RMI connector. An agent can include any number of protocol adaptors and connectors, allowing it to be managed and monitored remotely through different protocols simultaneously.

Protocol Adaptors

Protocol adaptors provide a management view of the JMX agent through a given protocol. They adapt the operations of MBeans and the MBean server into a representation in the given protocol, and possibly into a different information model, for example SNMP. The Java SE platform does not include any protocol adaptors as standard.

Management applications that connect to a protocol adaptor are usually specific to the given protocol. This is typically the case for legacy management solutions that rely on a specific management protocol. They access the JMX agent not through a remote representation of the MBean server, but through operations that are mapped to those of the MBean server.

Connectors

Connectors are used to connect an agent with a remote management application enabled for JMX technology, namely, a management application developed using the distributed services of the JMX specification. This kind of communication involves a connector server in the agent and a connector client in the manager.

These components convey management operations transparently point-to-point over a specific protocol. The JMX Remote API provides a remote interface to the MBean server through which the management application can perform operations. A connector is specific to a given protocol, but the management application can use any connector indifferently because they have the same remote interface.

See Chapter 5, "Using JMX Connectors to Manage Resources Remotely" for more information on standard JMX connectors.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next

Chapter 5

Using JMX Connectors to Manage Resources Remotely

The Java Management Extensions Instrument and Agent Specification defines the concept of connectors. A connector makes a Java Management Extensions (JMX) technology MBean server accessible to remote Java technology-based clients. The client end of a connector exports essentially the same interface as the MBean server.

A connector consists of a connector client and a connector server. A connector server is attached to an MBean server and listens for connection requests from clients. A connector client is responsible for establishing a connection with the connector server. A connector client will usually be in a different Java Virtual Machine (Java VM) from the connector server, and will often be running on a different machine.

Many different implementations of connectors are possible. In particular, there are many possibilities for the protocol used to communicate over a connection between client and server.

A connector server usually has an address, used to establish connections between connector clients and the connector server. Alternatively, some connectors can provide connection stubs to establish connections. The way in which connections are established depends on the discovery and lookup technology that you use (see Chapter 6, "Discovery and Lookup Services").

This chapter outlines the different types of connector defined by the JMX Remote API specification and the protocols they use, in the following sections:

  • "RMI Connector": This standard Remote Method Invocation (RMI) protocol must be supported by every implementation that conforms to the JMX Remote API standard.
  • "Generic Connector": The JMX Remote API standard also defines an optional protocol based directly on TCP sockets, called the JMX Messaging Protocol (JMXMP). An implementation of the standard can omit the JMXMP connector, but must not omit the RMI connector. The Java SE platform does not include the optional JMXMP connector.
  • "User-Defined Protocols": A connector can also implement a protocol that is not defined in the JMX technology.

RMI Connector

The JMX Remote API standard defines a standard protocol based on RMI. The RMI connector must be present in every implementation of the JMX Remote API.

The RMI connector supports the Java Remote Method Protocol (JRMP) transport, and optionally, the Internet Inter-Object Request Broker (ORB) Protocol (IIOP) transport.

The RMI connector over JRMP provides a simple mechanism for securing and authenticating the connection between a client and a server. This mechanism provides a basic level of security for environments using the RMI connector. Note that the generic JMXMP connector provides a more advanced level of security.

You can improve on the basic security mechanism of the RMI connector over JRMP by using an RMI socket factory so that the connection between client and server uses the Secure Socket Layer (SSL).

Generic Connector

An optional part of the JMX Remote API, which is not included in the Java SE platform, is a generic connector. This connector can be configured by adding pluggable modules to define the following:

  • The transport protocol used to send requests from the client to the server, and to send responses and notifications from the server to the clients
  • The object wrapping for objects that are sent from the client to the server and whose class loader can depend on the target MBean

The JMX Messaging Protocol (JMXMP) connector is a configuration of the generic connector where the transport protocol is based on TCP and the object wrapping is native Java serialization. Security is more advanced than for the RMI connector. Security is based on the Java Secure Socket Extension (JSSE), the Java Authentication and Authorization Service (JAAS), and the Simple Authentication and Security Layer (SASL).

The generic connector and its JMXMP configuration are optional, which means that they are not always included in an implementation of the JMX Remote API. The Java SE platform does not include the optional generic connector.

User-Defined Protocols

While the RMI connector must be present in every implementation of the JMX Remote API, you can also implement a connector based on a protocol that is not defined in the JMX Remote API standard. A typical example of this is a connector based on a protocol that uses HTTP/S. Other protocols are also possible. The JMX specification describes how to implement a connector based on a user-defined protocol.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar

Java Management Extensions (JMX) Technology Tutorial

Java Management Extensions (JMX)
Java Platform, Standard Edition version 8

August, 2008
Contents | Previous | Next

Contents

  • Preface
  • 1. Getting Started
    • Platform Information
    • Examples Directory
    • Working Directory
  • 2. Essentials of the JMX API
    • Standard MBeans
      • MBean Interface
      • MBean Implementation
      • Managing a Resource
      • Running the Standard MBean Example
    • Sending Notifications
      • NotificationBroadcaster Interface
      • Running the MBean Notification Example
    • Introducing MXBeans
      • QueueSamplerMXBean Interface
      • QueueSampler Class
      • QueueSample Class
      • Creating and Registering the MXBean in the MBean Server
      • Running the MXBean Example
    • MBean Descriptors
      • DescriptorKey Annotations
      • Using MBean Descriptors
      • Running the MBean Descriptors Example
  • 3. JMX Connectors
    • Accessing Standard and Dynamic MBeans via the RMI Connector
      • Analyzing the Example Classes
        • Server.java
        • SimpleStandardMBean.java
        • SimpleStandard.java
        • SimpleDynamic.java
        • ClientListener.java
        • Client.java
      • Running the MBean Example
  • 4. Lookup Services
    • Initial Configuration
      • External RMI Registry
      • External CORBA Naming Service
      • External LDAP Registry
    • Service Location Protocol (SLP) Lookup Service
      • Analyzing the Example Classes
        • Server.java
        • Client.java
      • Running the SLP Lookup Service Example
        • Setting up the SLP Lookup Service Example
        • Running the SLP Lookup Service Example
    • Jini Lookup Service
      • Analyzing the Example Classes
        • Server.java
        • Client.java
        • java.policy
        • jini.properties.template
      • Running the Jini Lookup Service Example
        • Setting up the Jini Lookup Service Example
        • Running the Jini Lookup Service Example
    • Java Naming and Directory Interface (JNDI) / LDAP Lookup Service
      • Analyzing the Example Classes
        • Server.java
        • Client.java
        • jmx-schema.txt
        • 60jmx-schema.ldif
      • Running the JNDI/LDAP Lookup Service Example
        • Setting up the JNDI/LDAP Lookup Service Example
        • Running the JNDI/LDAP Lookup Service Example With an RMI Connector
  • 5. Security
    • Simple Security
      • RMI Connectors With Simple Security
        • Server.java
        • SimpleStandardMBean.java
        • SimpleStandard.java
        • ClientListener.java
        • Client.java
      • Running the RMI Connector Example With Simple Security
    • Subject Delegation
      • Secure RMI Connectors With Subject Delegation
        • Server.java
        • java.policy
        • SimpleStandardMBean.java
        • SimpleStandard.java
        • ClientListener.java
        • Client.java
      • Running the Secure RMI Connector Example With Subject Delegation
    • Fine-Grained Security
      • RMI Connectors With Fine-Grained Security
        • The files will be analyzed in the following sections.Server.java
        • java.policy
        • SimpleStandardMBean.java
        • SimpleStandard.java
        • ClientListener.java
        • Client.java
      • Running the RMI Connector Example With Fine-Grained Security

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next Java Management Extensions (JMX) Technology Tutorial

Chapter 2

Essentials of the JMX API

This chapter introduces the fundamental notion of the Java Management Extensions (JMX) API, namely managed beans, or MBeans.

An MBean is a managed Java object, similar to a JavaBeanTM, that follows the design patterns set forth in the instrumentation level of the JMX specification. An MBean can represent a device, an application, or any resource that needs to be managed. MBeans expose a management interface: a set of readable and/or writable attributes and a set of invokable operations, along with a self-description. The management interface does not change throughout the life of an MBean instance. MBeans can also emit notifications when certain defined events occur.

The JMX specification defines four types of MBean: standard MBeans, dynamic MBeans, open MBeans and model MBeans. The examples in this chapter demonstrate the simplest type of MBean, namely standard MBeans.

Standard MBeans

A standard MBean is defined by writing a Java interface called SomethingMBean and a Java class called Something that implements that interface. Every method in the interface defines either an attribute or an operation in the MBean. By default every method defines an operation. Attributes and operations are simply methods which follow certain design patterns. A standard MBean is composed of the MBean interface which lists the methods for all exposed attributes and operations, and the class which implements this interface and provides the functionality of the instrumented resource.

The following sections dissect an example standard MBean, and a simple JMX agent that manages the MBean. The code samples are taken from the directory work_dir/jmx_examples/Essential/com/example/mbeans.

MBean Interface

An example of a very basic MBean interface, named HelloMBean, is shown in CODE EXAMPLE 2-1.

CODE EXAMPLE 2-1 Example MBean Interface, HelloMBean

package com.example.mbeans;

public interface HelloMBean {

    public void sayHello();
    public int add(int x, int y);

    public String getName();

    public int getCacheSize();
    public void setCacheSize(int size);
}

As stated previously, by convention an MBean interface takes the name of the Java class that implements it, with the suffix MBean added. So, in this case, the interface is called HelloMBean. The Hello class that implements this interface is described in Section "MBean Implementation".

According to the JMX specification, an MBean interface consists of named and typed attributes that are readable and possibly writable, and named and typed operations that can be invoked by the applications that are managed by the MBean. The HelloMBean interface shown in CODE EXAMPLE 2-1, declares two operations: the Java methods add() and sayHello().

Of the two attributes that are declared by HelloMbean, Name is a read-only string, and CacheSize is an integer that can be both read and written. Getter and setter methods are declared, to allow the managed application to access and possibly change the attribute values. As defined by the JMX specification, a getter is any public method whose name begins with get and which does not return void. A getter enables a manager to read the value of the attribute, whose type is that of the returned object. A setter is any public method whose name begins with set and which takes a single parameter. A setter enables a manager to write a new value in the attribute, whose type is the same as that of the parameter.

The implementation of these operations and attributes is shown in the following section.

MBean Implementation

The Hello class shown in CODE EXAMPLE 2-1 implements HelloMBean.

CODE EXAMPLE 2-1 Example MBean Implementation Class, Hello

package com.example.mbeans;

public class Hello implements HelloMBean {
    public void sayHello() {
        System.out.println("hello, world");
    }

    public int add(int x, int y) {
        return x + y;
    }

    public String getName() {
        return this.name;
    }

    public int getCacheSize() {
        return this.cacheSize;
    }

    public synchronized void setCacheSize(int size) {
        this.cacheSize = size;

        System.out.println("Cache size now " + this.cacheSize);
    }

    private final String name = "Reginald";
    private int cacheSize = DEFAULT_CACHE_SIZE;
    private static final int DEFAULT_CACHE_SIZE = 200;
}

The straightforward Java class Hello provides the definitions of the operations and attributes declared by HelloMBean. As you can see, the sayHello() and add() operations are extremely simple, but real-life operations can be as simple or as sophisticated as you like.

Methods to get the Name attribute and to get and set the cacheSize attribute are also defined. In this example, the Name attribute value never changes, but in a real scenario it might change as the managed resource runs. For example, the attribute might represent statistics such as uptime or memory usage. Here, it is merely the name “Reginald”.

Calling the setCacheSize method allows you to alter the cacheSize attribute from its declared default value of 200. In reality, changing the cacheSize attribute could require other operations to be performed, such as discarding entries or allocating new ones. This example merely prints a message to confirm that the cache size has changed, but more sophisticated operations could be defined in the place of the simple call to println().

With the simple Hello MBean and its interface thus defined, they can now be used to manage the resource they represent, as shown in the following section.

Managing a Resource

As presented in the Java Management Extensions (JMX) Technology Overview, once a resource has been instrumented by MBeans, the management of that resource is performed by a JMX agent.

The core component of a JMX agent is the MBean server, a managed object server in which MBeans are registered (see the API documentation for the MBeanServer interface for details of the MBean server implementation). A JMX agent also includes a set of services to manage MBeans.

CODE EXAMPLE 2-1 presents a basic JMX agent, named Main.

CODE EXAMPLE 2-1 Creating a JMX Agent

package com.example.mbeans;

import java.lang.management.*;
import javax.management.*;

public class Main {

   public static void main(String[] args) throws Exception {

      MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

      ObjectName name = new ObjectName("com.example.mbeans:type=Hello");

      Hello mbean = new Hello();

      mbs.registerMBean(mbean, name);

      System.out.println("Waiting forever...");
      Thread.sleep(Long.MAX_VALUE);
   }
}

The JMX agent Main begins by obtaining any MBean server that is running on the platform, by calling the getPlatformMBeanServer() method of the java.lang.management.ManagementFactory class. If there is no MBean server already running on the platform, then getPlatformMBeanServer() creates one automatically by calling the JMX method MBeanServerFactory.createMBeanServer(). The MBeanServer instance obtained by Main is named mbs.

Next, Main defines an object name for the MBean instance it will create. Every JMX MBean must have an object name. The object name is an instance of the JMX class ObjectName, and must conform to the syntax defined by the JMX specification, namely it must comprise a domain, and a list of key-properties (see the API documentation for the ObjectName class for details of this syntax). In the object name defined by Main, name, the domain is com.example.mbeans (the package in which the example MBeans are contained) and the key-property declares that this object is of the type Hello.

An instance of a Hello object is created, named mbean. This Hello object is itself an instance of the MBean Hello that was defined in Section "MBean Implementation".

The Hello object named mbean is then registered as an MBean in the MBean server mbs with the object name name, by passing the object and the object name into a call to the JMX method MBeanServer.registerMBean().

With the Hello MBean registered in the MBean server, Main will simply wait for management operations to be performed on Hello. In the scope of this example, these management operations are invoking sayHello(), and add(), and getting and setting the attribute values.

Running the Standard MBean Example

Having examined the example classes, you can now run the example. The Java Platform, Standard Edition comes with a management and monitoring console, named JConsole, that is used to interact with the MBean in this example. JConsole is located in JavaSE_HOME/bin/jconsole, in which JavaSE_HOME is the installation directory of the Java Platform, Standard Edition (Java SE platform).

To run the example, follow the steps below, or see the README file:

  2. If you have not done so already, open work_dir/jmx_examples/Essential.

    $ cd work_dir/jmx_examples/Essential

  3. Compile the example Java classes.

    $ javac com/example/mbeans/*.java

  4. Start the Main application.

    $ java com.example.mbeans.Main

    You will see confirmation that Main is waiting for something to happen.

  5. Start JConsole in a different terminal window on the same machine.

    $ jconsole

    You will see the JConsole tool open, presenting a list of running JMX agents that you can connect to.

  6. Select com.example.mbeans.Main from the list in the “New Connection” window, and click on “Connect”.

    You will see a summary of your platform’s current activity.

  7. Click on the “MBeans” tab.

    This panel shows you all the MBeans currently registered in the MBean server.

  8. In the left-hand frame, expand the com.example.mbeans node in the MBean tree.

    You will see the example MBean Hello, that was created and registered by Main. If you click on Hello, you will see its associated Attributes and Operations nodes in the MBean tree.

  9. Click on the Hello MBean node in the MBean tree.

    The Hello MBean’s metadata and its associated Descriptor will be displayed.

  10. Click on the Attributes node of the Hello MBean in the MBean tree.

    This displays the MBean attributes that were defined by the Hello class.

  11. Change the value of the CacheSize attribute to 150

    In the terminal window in which you started Main, you will see confirmation of this change of attribute.

  12. Click on the Operations node of the Hello MBean in the MBean tree.

    Here you will see the two operations declared by the Hello MBean, sayHello() and add().

  13. Invoke the sayHello() operation, by clicking on the sayHello button.

    A JConsole dialogue box will inform you that the method was invoked successfully, and you will see the message “hello, world” in the terminal window in which Main is running.

  14. Provide two integers for the add() operation to add up, and click on the add button.

    You will be informed of the answer in a JConsole dialogue box.

  15. Click on “Connection” and then “Exit”, to exit JConsole.

Sending Notifications

MBeans can generate notifications, for example to signal a state change, a detected event, or a problem.

For an MBean to generate notifications, it must implement the interface NotificationBroadcaster, or its subinterface NotificationEmitter. All you need to do to send a notification is to construct an instance of the class javax.management.Notification or a subclass (such as AttributeChangedNotification), and pass it to NotificationBroadcasterSupport.sendNotification.

Every notification has a source. The source is the object name of the MBean that emitted the notification.

Every notification has a sequence number. This number can be used to order notifications coming from the same source when order matters and there is a danger of the notifications being handled in the wrong order. It is all right for the sequence number to be zero, but it is better for it to increment for each notification from a given MBean.

There is an example of a standard MBean that emits notifications in the directory work_dir/jmx_examples/Notification/com/example/mbeans. This example is essentially the same as the example seen in Section "Standard MBeans", except that the Hello MBean implements the NotificationBroadcaster interface.

NotificationBroadcaster Interface

As stated above, the only difference between this example and the one presented in Section "Standard MBeans" is the fact that the MBean implementation allows for the sending of notifications.

Notifications are activated by implementing the NotificationBroadcaster interface, as shown in CODE EXAMPLE 2-1.

CODE EXAMPLE 2-1 Implementing MBean Notifications

package com.example.mbeans;

import javax.management.*;

public class Hello
        extends NotificationBroadcasterSupport implements HelloMBean {

    public void sayHello() {
        System.out.println("hello, world");
    }

    public int add(int x, int y) {
        return x + y;
    }

    public String getName() {
        return this.name;
    }

    public int getCacheSize() {
        return this.cacheSize;
    }

    public synchronized void setCacheSize(int size) {
        int oldSize = this.cacheSize;
        this.cacheSize = size;

        System.out.println("Cache size now " + this.cacheSize);

        Notification n =
            new AttributeChangeNotification(this,
                                            sequenceNumber++,
                                            System.currentTimeMillis(),
                                            "CacheSize changed",
                                            "CacheSize",
                                            "int",
                                            oldSize,
                                            this.cacheSize);

        sendNotification(n);
    }

    @Override
    public MBeanNotificationInfo[] getNotificationInfo() {
        String[] types = new String[] {
            AttributeChangeNotification.ATTRIBUTE_CHANGE
        };
        String name = AttributeChangeNotification.class.getName();
        String description = "An attribute of this MBean has changed";
        MBeanNotificationInfo info =
            new MBeanNotificationInfo(types, name, description);
        return new MBeanNotificationInfo[] {info};
    }

    private final String name = "Reginald";
    private int cacheSize = DEFAULT_CACHE_SIZE;
    private static final int DEFAULT_CACHE_SIZE = 200;

    private long sequenceNumber = 1;
}

As you can see in CODE EXAMPLE 2-1, this Hello MBean implementation extends the NotificationBroadcasterSupport class, that itself implements the NotificationEmitter interface.

The operations and attributes are set in the same way as before, with the only exception that the cacheSize attribute’s setter method now defines a new value oldSize, which records the cacheSize attribute’s value prior to the set operation.

The notification is constructed from an instance, n, of the JMX class AttributeChangeNotification, which extends javax.management.Notification. The notification is constructed within the definition of the setCacheSize() method, from the following information, that is passed to AttributeChangeNotification as parameters:

  • The object name of the source of the notification, namely the Hello MBean, represented simply by this
  • A sequence number, which in this example is a long named sequenceNumber, that is set at 1 and that increases incrementally
  • A timestamp
  • The content of the notification message
  • The name of the attribute that has changed, in this case cacheSize
  • The type of attribute that has changed
  • The old attribute value, in this case oldSize
  • The new attribute value, in this case this.cacheSize

The notification n is then passed to the NotificationBroadcasterSupport.sendNotification() method.

Finally, the MBeanNotification is defined to describe the characteristics of the different notification instances emitted by the MBean for a given Java class of notification, which in this case is AttributeChangeNotification notifications.

The MBean interface, HelloMBean, and the JMX agent Main are identical to those used in the previous example.

Running the MBean Notification Example

Having examined the example classes, you can now run the example. This example again uses JConsole to interact with the Hello MBean.To run the example, follow the steps below, or see the README file:

  2. If you have not done so already, open work_dir/jmx_examples/Notification.

    $ cd work_dir/jmx_examples/Notification

  3. Compile the example Java classes.

    $ javac com/example/mbeans/*.java

  4. Start the Main application.

    $ java com.example.mbeans.Main

    You will see confirmation that Main is waiting for something to happen.

  5. Start JConsole in a different terminal window on the same machine.

    $ jconsole

    You will see the JConsole tool open, presenting a list of running JMX agents that you can connect to.

  6. Select com.example.mbeans.Main from the list in the “New Connection” window, and click on “Connect”.

    You will see a summary of your platform’s current activity.

  7. Click on the “MBeans” tab.

    This panel shows you all the MBeans currently registered in the MBean server.

  8. In the left-hand frame, expand the com.example.mbeans node in the MBean tree.

    You will see the example MBean Hello, that was created and registered by Main. If you click on Hello, you will see its associated Attributes, Operations and Notifications nodes in the MBean tree.

  9. Click on the Hello MBean node in the MBean tree.

    This displays the MBean’s metadata and its associated Descriptor.

  10. Click on the Notifications node of the Hello MBean in the MBean tree.

    You will see that the panel is blank.

  11. Click on the “Subscribe” button.

    The current number of notifications received (0), will be displayed in the Notifications node label.

  12. Click on the Attributes node of the Hello MBean in the MBean tree, and change the value of the CacheSize attribute to 150

    In the terminal window in which you started Main, you will see confirmation of this change of attribute. You will also see that the number of notifications received displayed in the Notifications node has changed to 1.

  13. Click on the Notifications node of the Hello MBean in the MBean tree again.

    You will see the details of the notification that was sent.

  14. Click on “Connection” and then “Exit”, to exit JConsole.

Introducing MXBeans

An MXBean is a new type of MBean that provides a simple way to code an MBean that only references a pre-defined set of types. In this way, you can be sure that your MBean will be usable by any client, including remote clients, without any requirement that the client have access to model-specific classes representing the types of your MBeans. MXBeans provide a convenient way to bundle related values together without requiring clients to be specially configured to handle the bundles.

In the same way as for standard MBeans, an MXBean is defined by writing a Java interface called Something MXBean and a Java class that implements that interface. However, unlike standard MBeans, MXBeans do not require the Java class to be called Something. Every method in the interface defines either an attribute or an operation in the MXBean. The annotation @MXBean can be also used to annotate the Java interface instead of requiring the interface’s name to be followed by the MXBean suffix.

MXBeans provide a convenient way to bundle related values together in an MBean without requiring clients to be specially configured to handle the bundles when interacting with that MBean. MXBeans already existed in the Java 2 Platform, Standard Edition (J2SE) 5.0, in the package java.lang.management. With the Java SE 6 platform, users can now define their own MXBeans, in addition to the standard set defined in java.lang.management.

The key idea behind MXBeans is that types such as java.lang.management.MemoryUsage that are referenced in the MXBean interface, java.lang.management.MemoryMXBean in this case, are mapped into a standard set of types, the so-called Open Types that are defined in the package javax.management.openmbean. The exact mapping rules appear in the MXBean specification, but to oversimplify we could say that simple types like int or String are unchanged, while complex types like MemoryUsage get mapped to the standard type CompositeDataSupport.

The operation of MXBeans is demonstrated by example programs that you will find in the directory work_dir/jmx_examples/MXBean/com/example/mxbeans after you have downloaded and unzipped the jmx_examples.zip file. The MXBean example contains the following files:

  • QueueSamplerMXBean interface.
  • QueueSampler class that implements the MXBean interface.
  • QueueSample Java type returned by the getQueueSample() method in the MXBean interface.
  • Main, the program that sets up and runs the example.

The MXBean example performs the following actions.

  • Defines a simple MXBean that manages a resource of type Queue<String>.
  • Declares a getter, getQueueSample, in the MXBean that takes a snapshot of the queue when invoked and returns a Java class QueueSample that bundles the following values together:
  • The time the snapshot was taken.
  • The queue size.
  • The head of the queue at that given time.
  • Registers the MXBean in an MBean server.

QueueSamplerMXBean Interface

CODE EXAMPLE 2-1 shows the code of the sample QueueSamplerMXBean interface.

CODE EXAMPLE 2-1 QueueSamplerMXBean interface

package com.example.mxbeans;

public interface QueueSamplerMXBean {
    public QueueSample getQueueSample();
    public void clearQueue();
}

As you can see, you declare an MXBean interface in exactly the same way as you declare a standard MBean. The QueueSamplerMXBean interface declares two operations, getQueueSample and clearQueue.

QueueSampler Class

The QueueSampler class implements the QueueSamplerMXBean interface, as shown in CODE EXAMPLE 2-1.

CODE EXAMPLE 2-1 QueueSampler Class
package com.example.mxbeans;

import java.util.Date;
import java.util.Queue;

public class QueueSampler implements QueueSamplerMXBean {

    private Queue<String> queue;

    public QueueSampler(Queue<String> queue) {
       this.queue = queue;
    }

    public QueueSample getQueueSample() {
        synchronized (queue) {
            return new QueueSample(new Date(), queue.size(), queue.peek());
        }
    }

    public void clearQueue() {
        synchronized (queue) {
            queue.clear();
        }
    }
}

The MXBean operations getQueueSample() and clearQueue() declared by the MXBean interface are defined in QueueSampler. The getQueueSample() operation simply returns an instance of the QueueSample Java type, created with the values returned by the java.util.Queue methods peek() and size() and an instance of java.util.Date.

QueueSample Class

The QueueSample instance returned by QueueSampler is defined in the QueueSample class shown in CODE EXAMPLE 2-1.

CODE EXAMPLE 2-1 QueueSample Class
package com.example.mxbeans;

import java.beans.ConstructorProperties;
import java.util.Date;

public class QueueSample {

    private final Date date;
    private final int size;
    private final String head;

    @ConstructorProperties({"date", "size", "head"})
    public QueueSample(Date date, int size, String head) {
        this.date = date;
        this.size = size;
        this.head = head;
    }

    public Date getDate() {
        return date;
    }

    public int getSize() {
        return size;
    }

    public String getHead() {
        return head;
    }
}

In QueueSample class, the MXBean framework calls all the getters in QueueSample to convert the given instance into a CompositeData and uses the @ConstructorProperties annotation to reconstruct a QueueSample instance from a CompositeData.

Creating and Registering the MXBean in the MBean Server

Having defined an MXBean interface and the class that implements it, as well as the Java type that is returned, the MXBean must now be created and registered in an MBean server. These actions are performed by the example class Main.

CODE EXAMPLE 2-1 MXBean example Main class
package com.example.mxbeans;

import java.lang.management.ManagementFactory;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;
import javax.management.MBeanServer;
import javax.management.ObjectName;

public class Main {

    public static void main(String[] args) throws Exception {
        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

        ObjectName name =
                new ObjectName("com.example.mxbeans:type=QueueSampler");

        Queue<String> queue = new ArrayBlockingQueue<String>(10);
        queue.add("Request-1");
        queue.add("Request-2");
        queue.add("Request-3");
        QueueSampler mxbean = new QueueSampler(queue);

        mbs.registerMBean(mxbean, name);

        System.out.println("Waiting...");
        Thread.sleep(Long.MAX_VALUE);
    }
}

The Main class gets the platform MBean server, creates an object name for the MXBean QueueSampler, creates a Queue instance for the QueueSampler MXBean to process, and feeds this Queue instance to a newly created QueueSampler MXBean. The MXBean is then registered in the MBean server in exactly the same way as a standard MBean.

Running the MXBean Example

To run the example, follow the steps below, or see the README file:

  2. If you have not done so already, open work_dir/jmx_examples/MXBean.

    $ cd work_dir/jmx_examples/MXBean

  3. Compile the example Java classes.

    $ javac com/example/mxbeans/*.java

  4. Start the Main application.

    $ java com.example.mxbeans.Main

    You will see confirmation that Main is waiting for something to happen.

  5. Start JConsole in a different terminal window on the same machine.

    $ jconsole

    You will see the JConsole tool open, presenting a list of running JMX agents that you can connect to.

  6. Select com.example.mxbeans.Main from the list in the “New Connection” window, and click on “Connect”.

    You will see a summary of your platform’s current activity.

  7. Click on the “MBeans” tab.

    This panel shows you all the MBeans currently registered in the MBean server.

  8. In the left-hand frame, expand the com.example.mxbeans node in the MBean tree.

    You will see the example MBean QueueSampler, that was created and registered by Main. If you click on QueueSampler, you will see its associated Attributes and Operations nodes in the MBean tree.

  9. Select the Attributes node.

    You will see the QueueSample attribute appear in the right-hand pane, with its value of javax.management.openmbean.CompositeDataSupport.

  10. Double-click on the CompositeDataSupport value.

    You can see the QueueSample values date, head and size because the MXBean framework has converted the QueueSample instance into CompositeData. If you had defined QueueSampler as a Standard MBean rather than as an MXBean, JConsole would not have found the QueueSample class because it would not be in its class path. If QueueSampler had been a standard MBean, you would have received a ClassNotFoundException when retrieving the QueueSample attribute value. This demonstrates the usefulness of using MXBeans when connecting to JMX agents through generic JMX clients, like JConsole.

  11. Select the Operations node.

    You will see a button to invoke the clearQueue operation.

  12. Click on the clearQueue button.

    You will be informed that the method was invoked successfully.

  13. Select the Attributes node again and double click on the CompositeDataSupport value.

    The queue has been reset now.

  14. Click on “Connection” and then “Exit”, to exit JConsole.

In this example JConsole has been used as the JMX client but if you were to access your MXBean programmatically in a JMX client you write yourself, then you could do so in one of two ways:

  • Generically, using the following code.
CODE EXAMPLE 2-1 Accessing an MXBean directly

MBeanServer mbs = ...whatever...;
ObjectName name = new ObjectName("com.example.mxbeans:type=QueueSampler");
CompositeData queueSample = (CompositeData) mbs.getAttribute(name,
                             "QueueSample");
int size = (Integer) queueSample.get("size");
  • Via a proxy, using the following code.
CODE EXAMPLE 2-2 Accessing an MXBean via a proxy

MBeanServer mbs = ...whatever...;
ObjectName name = new ObjectName("com.example.mxbeans:type=QueueSampler");
QueueSamplerMXBean proxy = JMX.newMXBeanProxy(mbs, name,
                                              QueueSamplerMXBean.class);
QueueSample queueSample = proxy.getQueueSample();
int size = queueSample.getSize();

CODE EXAMPLE 2-2 uses the newMXBeanProxy method to create the MXBean proxy. An equivalent method, newMBeanProxy, exists to create proxies for other types of MBeans. The newMBeanProxy and newMXBeanProxy methods are used in exactly the same way.

MBean Descriptors

Descriptors allow you to give additional information about MBeans to management clients. For example, a Descriptor on an MBean attribute might say what units it is measured in, or what its minimum and maximum possible values are. As of Java SE 6, Descriptors are an integrated part of the JMX API and are available in all types of MBeans.

Descriptors give you a convenient way to attach arbitrary extra metadata to your MBeans. Descriptors have always existed in the JMX API, but until Java SE 6 they were only available in conjunction with Model MBeans.

For most constructors in the classes MBean*Info (MBeanInfo, MBeanAttributeInfo, and so on), a parallel constructor exists with the same parameters plus an additional javax.management.Descriptor parameter. The same is true for OpenMBean*InfoSupport. The MBean*Info and OpenMBean*InfoSupport classes contain a getDescriptor() method.

Open MBeans return information about default and legal values from the getDefaultValue(), getLegalValues(), getMaxValue(), getMinValue() methods of OpenMBeanParameterInfo and OpenMBeanAttributeInfo. This information is now also present in the corresponding Descriptors, and other types of MBean can also return the information in their Descriptors.

MBean Descriptors are demonstrated in the example classes you will find in the directory work_dir/jmx_examples/Descriptors/com/example/mxbeans after you have downloaded and unzipped the jmx_examples.zip file. The MBean Descriptor example contains the following files.

  • Author, an annotation the supplies the name of the author of the MBean interface.
  • DisplayName, an annotation that supplies a display name for methods in the MBean interface.
  • Main, the program that sets up and runs the example.
  • QueueSamplerMXBean interface.
  • QueueSampler class that implements the MXBean interface.
  • QueueSample Java type returned by the getQueueSample() method in the MXBean interface.
  • Version, an annotation that supplies the current version of the MBean interface.

The QueueSampler MXBean in this example basically performs the same actions as the MXBean example presented in Chapter 2, "Introducing MXBeans", except with the addition of MBean Descriptors. This example shows how the DescriptorKey meta-annotation can be used to add new descriptor items to the Descriptors for a standard MBean (or an MXBean) via annotations in the standard MBean (or MXBean) interface.

DescriptorKey Annotations

A new annotation DescriptorKey can be used to add information to the Descriptors for a standard MBean (or MXBean) via annotations in the Standard MBean (or MXBean) interface. This makes it possible for a tool that generates standard MBeans from an existing management model to include information from the model in the generated MBean interfaces, rather than in separate files.

CODE EXAMPLE 2-1 shows the definition of the annotation Author.

CODE EXAMPLE 2-1 Author Annotation

package com.example.mxbeans;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.management.DescriptorKey;

@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Author {
    @DescriptorKey("author")
    String value();
}

This annotation supplies the name of the creator of the MBean interface. A new field author will be added to the MBeanInfo Descriptor with the value defined by the @Author annotation. The files Version and DisplayName define annotations of those names in exactly the same way as for Author above. In each of Version and DisplayName, the @DescriptorKey value is “version” and “displayname” respectively.

In the case of Version, a new field version will be added to the MBeanInfo Descriptor with the value defined by the @Version annotation.

For DisplayName, new field displayName will be added to the MBeanAttributeInfo Descriptor or the MBeanOperationInfo Descriptor with the value defined by the @DisplayName annotation depending on whether the annotated method is a getter/setter or an operation, respectively.

Using MBean Descriptors

The QueueSamplerMXBean interface used in this example is slightly different from the one used in the MXBeans example, in as much as it implements MBean Descriptors to publish some of its information.

CODE EXAMPLE 2-1 QueueSamplerMXBean with Descriptors.

package com.example.mxbeans;

@Author("Mr Bean")
@Version("1.0")
public interface QueueSamplerMXBean {
    @DisplayName("GETTER: QueueSample")
    public QueueSample getQueueSample();
    @DisplayName("OPERATION: clearQueue")
    public void clearQueue();
}

Here, you see that the @Author annotation is set to Mr. Bean, the @Version annotation is set to 1.0, and the @DisplayName is set to the names either of the attribute QueueSample or the operation clearQueue.

Running the MBean Descriptors Example

To run the example, follow the steps below, or see the README file:

  2. If you have not done so already, open work_dir/jmx_examples/Descriptors.

    $ cd work_dir/jmx_examples/Descriptors

  3. Compile the example Java classes.

    $ javac com/example/mxbeans/*.java

  4. Start the Main application.

    $ java com.example.mxbeans.Main

    You will see confirmation that Main is waiting for something to happen.

  5. Start JConsole in a different terminal window on the same machine.

    $ jconsole

    You will see the JConsole tool open, presenting a list of running JMX agents that you can connect to.

  6. Select com.example.mxbeans.Main from the list in the “New Connection” window, and click on “Connect”.

    You will see a summary of your platform’s current activity.

  7. Click on the “MBeans” tab.

    This panel shows you all the MBeans currently registered in the MBean server.

  8. In the left-hand frame, expand the com.example.mxbeans node in the MBean tree.

    You will see the example MBean QueueSampler, that was created and registered by Main. If you click on QueueSampler, you will see its associated Attributes and Operations nodes in the MBean tree.You will also see the fields author and version in the MBeanInfo Descriptor table.

  9. Expand the Attributes and Operations nodes under the QueueSampler MBean node.

    You will see the individual Attributes and Operations.

  10. Select the QueueSample node.

    You will see the field displayName in the MBeanAttributeInfo Descriptor table.

  11. Select the clearQueue node.

    You will see the field displayName in the MBeanOperationInfo Descriptor table.

  12. Click on “Connection” and then “Exit”, to exit JConsole.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next Java Management Extensions (JMX) Technology Tutorial

Chapter 1

Getting Started

This chapter explains what you need to do to get started with the Java Management Extensions (JMX) examples. It provides instructions that apply to all the examples described in the subsequent chapters.

Platform Information

All variable assignments and commands in the examples in this tutorial were defined using UNIX Korn shell syntax. If you are running a shell other than the Korn shell on a Solaris, Linux, or Mac OS X platform, you must adapt these commands to your preferred shell environment.

If you are running a Microsoft Windows operating environment, in the majority of cases, adapting commands will simply involve replacing forward slashes (/) with backward slashes (\) and replacing colons (:) with semi-colons (;) in the paths. A specific Microsoft Windows command is given only when it differs significantly from the Solaris, Linux, or Mac OS X command provided.

Examples Directory

The examples that form the basis of this tutorial are all accessible from the JMX page in the Java Platform, Standard Edition (Java SE) documentation bundle, found in the following location:

Java Management Extensions (JMX) Examples

The code excerpts quoted in this tutorial are taken from these example programs. However, some code excerpts might be rearranged and comments might be changed. Program listings in the tutorial usually simplify comments and omit output statements, for space considerations. Some classes or sections of code that deserve special attention have been highlighted using bold text for the purposes of this tutorial.

Working Directory

To preserve untouched copies of the original example files, create a new directory in which to compile and run the examples.

  2. Create a new working directory.

    This working directory is referred to as work_dir throughout this tutorial.

  3. Download the examples ZIP bundle from the following URL:

    Downloadable JMX Examples

  4. Unzip all the examples into work_dir.

All the examples will now be contained in work_dir/jmx_examples.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next Java Management Extensions (JMX) Technology Tutorial

Chapter 3

JMX Connectors

This chapter introduces the concepts of standard and dynamic management beans (MBeans) and also shows how to use Java Management Extensions (JMX) technology to perform operations on MBeans, both locally and remotely.

Accessing Standard and Dynamic MBeans via the RMI Connector

This example demonstrates standard and dynamic MBeans only.

As seen in Chapter 2, "Essentials of the JMX API", a standard MBean is one that statically defines its management interface through the names of the methods it contains. A dynamic MBean implements a specific Java interface and reveals its attributes and operations at run time.

The JMX technology defines a connector based on RMI. The RMI connector supports the Java Remote Method Protocol (JRMP) transport, and optionally, the Internet Inter-Object Request Broker (ORB) Protocol (IIOP) transport. This connector allows you to connect to an MBean in an MBean server from a remote location, and perform operations on it, exactly as if the operations were being performed locally.

The purpose of this example is to demonstrate the implementation of a standard MBean and a dynamic MBean. It also shows how to perform operations on them, both locally, and remotely through an RMI connection between a server and a remote client.

When you run this example:

  • The server:
  • Creates an MBean server
  • Registers a SimpleStandard and a SimpleDynamic MBean in the local MBean server
  • Performs local operations on the MBeans
  • Creates an RMI connector server
  • The client:
  • Creates an RMI connector
  • Registers a SimpleStandard and a SimpleDynamic MBean on the remote MBean server
  • Performs remote operations on both MBeans

The RMI connector example is contained in the directory work_dir/jmx_examples/Basic.

  2. Open the work_dir/jmx_examples/Basic directory.

    Inside this directory, you will find the following files:

    • Server.java
    • SimpleStandardMBean.java
    • SimpleStandard.java
    • SimpleDynamic.java
    • ClientListener.java
    • Client.java
    • README
  3. Open each of the *.java files in a text editor.

Analyzing the Example Classes

The following sections analyze each of the classes used in the basic MBean example, and explain how they perform the operations described in the preceding section.

Server.java

Due to its size, the Server.java class is shown in several code excerpts.

CODE EXAMPLE 3-1 MBean Example Class Server.java (Excerpt 1)

public class Server {

 public static void main(String[] args) {
     try {

         MBeanServer mbs = MBeanServerFactory.createMBeanServer();
         waitForEnterPressed();

         String domain = mbs.getDefaultDomain();
         waitForEnterPressed();

         String mbeanClassName = "SimpleStandard";
         String mbeanObjectNameStr =
             domain + ":type=" + mbeanClassName + ",name=1";
         ObjectName mbeanObjectName =
             createSimpleMBean(mbs, mbeanClassName, mbeanObjectNameStr);
         waitForEnterPressed();

         printMBeanInfo(mbs, mbeanObjectName, mbeanClassName);
         waitForEnterPressed();

         manageSimpleMBean(mbs, mbeanObjectName, mbeanClassName);
         waitForEnterPressed();

         mbeanClassName = "SimpleDynamic";
         mbeanObjectNameStr =
             domain + ":type=" + mbeanClassName + ",name=1";
         mbeanObjectName =
             createSimpleMBean(mbs, mbeanClassName, mbeanObjectNameStr);
         waitForEnterPressed();

         printMBeanInfo(mbs, mbeanObjectName, mbeanClassName);
         waitForEnterPressed();

         manageSimpleMBean(mbs, mbeanObjectName, mbeanClassName);
         waitForEnterPressed();

         [...]

Examining this class, you can see that the following occurs:

Firstly, the Server.java class creates a new MBean server called mbs by calling the createMBeanServer() method of the MBeanServerFactory class.

Then, the default domain in which the MBean server is registered is obtained with a call to the getDefaultDomain() method of the MBeanServer interface. The domain is identified by the string domain.

The MBean class named SimpleStandard is also identified by a variable, in this case the string mbeanClassName. SimpleStandard is the name of the Java class for the Java object of which this MBean is an instance. The SimpleStandard.java object is examined in Section "SimpleStandard.java".

Another variable, the string mbeanObjectNameStr, is defined as the combination of the domain, plus the following key=value pairs:

  • The type, which in this case is the mbeanClassName.
  • A name, to differentiate this MBean from other MBeans of the same type that might be created subsequently. In this case the name number is 1.

The purpose of mbeanObjectNameStr is to give the MBean a human-readable identifier.

A call to createSimpleMBean() creates and registers the SimpleStandard MBean in the local MBean server, with the given object name.

The operations printMBeanInfo(), and manageSimpleMBean() are then performed on the SimpleStandard MBean. Like createSimpleMBean(), these methods are defined later in the Server.java code, and are shown in CODE EXAMPLE 3-4 and CODE EXAMPLE 3-5.

In code that is not shown here, a second MBean of the type SimpleDynamic is created and registered in the MBean server in exactly the same way as the SimpleStandard MBean. As the name suggests, this MBean is an instance of the SimpleDynamic Java object, which is examined in Section "SimpleDynamic.java".

CODE EXAMPLE 3-2 MBean Example Class Server.java (Excerpt 2)

[...]

JMXServiceURL url =
  new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9999/server");
JMXConnectorServer cs =
  JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
cs.start();
waitForEnterPressed();
cs.stop();

[...]

In CODE EXAMPLE 3-2, an RMI connector server is created so that operations can be performed on the MBeans remotely. A call to the class JMXServiceURL creates a new service URL called url, which serves as an address for the connector server. In this example, the service URL is given in JNDI form, rather than in encoded form (see the API documentation for the javax.management.remote.rmi package for an explanation of JNDI form). This service URL defines the following:

  • The connector will use the default RMI transport, denoted by rmi.
  • The RMI registry in which the RMI connector stub will be stored will be running on port 9999 on the local host, and the server address will be registered under the name server. The port 9999 specified in the example is arbitrary; you can use any available port.

An RMI connector server named cs is created by calling the constructor JMXConnectorServerFactory, with the service URL url, a null environment map, and the MBean server mbs as parameters. The connector server cs is launched by calling the start() method of JMXConnectorServer, whereupon RMIConnectorServer exports the RMI object server to the RMI registry. The connection will remain open until the Enter key is pressed, as instructed by the simple method waitForEnterPressed, that is defined later in the Server code.

CODE EXAMPLE 3-3 MBean Example Class Server.java (Excerpt 3)

[...]

private static ObjectName createSimpleMBean(MBeanServer mbs,
                                              String mbeanClassName,
                                              String mbeanObjectNameStr) {
     echo("\n>>> Create the " + mbeanClassName +
          " MBean within the MBeanServer");
     echo("ObjectName = " + mbeanObjectNameStr);
     try {
          ObjectName mbeanObjectName =
             ObjectName.getInstance(mbeanObjectNameStr);
          mbs.createMBean(mbeanClassName, mbeanObjectName);
             return mbeanObjectName;
          } catch (Exception e) {
            echo(       "!!! Could not create the " +
                  mbeanClassName + " MBean !!!");
            e.printStackTrace();
            echo("\nEXITING...\n");
            System.exit(1);
        }
        return null;
     }

[...]

CODE EXAMPLE 3-3 shows the definition of the createSimpleMBean() method. In this method, the MBean instance with the object name mbeanObjectNameStr is passed to the getInstance() method of the ObjectName interface to create a new object name for registering the MBean inside the MBean server. The resulting object name instance is named mbeanObjectName. A call to the MBeanServer method createMBean() then instantiates an MBean defined by the combination of the Java object identified by mbeanClassName and the MBean instance mbeanObjectName and registers this MBean in the MBean server mbs.

CODE EXAMPLE 3-4 MBean Example Class Server.java (Excerpt 4)
[...]

private static void printMBeanInfo(MBeanServer mbs,
                                     ObjectName mbeanObjectName,
                                     String mbeanClassName) {
     MBeanInfo info = null;
     try {
         info = mbs.getMBeanInfo(mbeanObjectName);
     } catch (Exception e) {
         echo(  "!!! Could not get MBeanInfo object for " +
         mbeanClassName +" !!!");
         e.printStackTrace();
         return;
     }

     MBeanAttributeInfo[] attrInfo = info.getAttributes();
     if (attrInfo.length > 0) {
         for (int i = 0; i < attrInfo.length; i++) {
        echo(" ** NAME:    " + attrInfo[i].getName());
        echo("    DESCR:   " + attrInfo[i].getDescription());
        echo("    TYPE:    " + attrInfo[i].getType() +
                "READ: "+ attrInfo[i].isReadable() +
                "WRITE: "+ attrInfo[i].isWritable());
        }
     } else echo(" ** No attributes **");

[...]

In CODE EXAMPLE 3-4 we see the definition of the method printMBeanInfo(). The printMBeanInfo() method calls the MBeanServer method getMBeanInfo() to obtain details of the attributes and operations that are exposed by the MBean mbeanObjectName. MBeanAttributeInfo defines the following methods, each of which is called in turn to obtain information about the mbeanObjectName MBean’s attributes:

  • getName, to obtain the attribute’s name.
  • getDescription, to obtain the human readable description of the attribute.
  • getType, to obtain the class name of the attribute.
  • isReadable, to determine whether or not the attribute is readable.
  • isWritable, to determine whether or not the attribute is writable.

In code that is not shown here, calls are made to obtain information about the mbeanObjectName MBean’s constructors, operations and notifications:

  • MBeanConstructorInfo, to obtain information about the MBean’s Java class.
  • MBeanOperationInfo, to learn what operations the MBean performs, and what parameters it takes.
  • MBeanNotificationInfo, to find out what notifications the MBean sends when its operations are performed.
CODE EXAMPLE 3-5 MBean Example Class Server.java (Excerpt 5)
[...]

private static void manageSimpleMBean(MBeanServer mbs,
                                        ObjectName mbeanObjectName,
                                        String mbeanClassName) {
        try {
            printSimpleAttributes(mbs, mbeanObjectName);

            Attribute stateAttribute = new Attribute("State",
                                                     "new state");
            mbs.setAttribute(mbeanObjectName, stateAttribute);

            printSimpleAttributes(mbs, mbeanObjectName);

            echo("\n    Invoking reset operation...");
            mbs.invoke(mbeanObjectName, "reset", null, null);

            printSimpleAttributes(mbs, mbeanObjectName);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void printSimpleAttributes(
                                        MBeanServer mbs,
                                        ObjectName mbeanObjectName) {
        try {
            String State =
               (String) mbs.getAttribute(mbeanObjectName, "State");
            Integer NbChanges =
               (Integer) mbs.getAttribute(mbeanObjectName,
                                          "NbChanges");
        } catch (Exception e) {
            echo(       "!!! Could not read attributes !!!");
            e.printStackTrace();
        }
   }

[...]

CODE EXAMPLE 3-5 shows a method for managing a simple MBean.

The manageSimpleMBean() method first of all calls the printSimpleAttributes() method that is also defined by Server. The printSimpleAttributes() method obtains an MBean attribute called state from the MBean mbeanObjectName, as well as another MBean attribute called NbChanges. Both of these attributes are defined in the SimpleStandard class, shown in Section "SimpleStandard.java".

The manageSimpleMBean() method then defines an attribute called stateAttribute, which is an instance of the Attribute class. The stateAttribute attribute associates a value of new state with the existing attribute state, defined by SimpleStandard. A call to the MBeanServer method setAttribute() then sets the mbeanObjectName MBean’s state to the new state defined by stateAttribute.

Finally, a call to the MBeanServer method invoke() invokes the mbeanObjectName MBean’s reset operation. The reset operation is defined in the SimpleStandard class.

SimpleStandardMBean.java

The SimpleStandardMBean.java class is shown in CODE EXAMPLE 3-1.

CODE EXAMPLE 3-1 MBean Example Class SimpleStandardMBean.java

public interface SimpleStandardMBean {

       public String getState();
       public void setState(String s);
       public int getNbChanges();
       public void reset();

}

The SimpleStandardMBean.java class is a straightforward JMX specification management interface for the MBean SimpleStandard. This interface exposes the four operations defined by SimpleStandard for management through a JMX agent.

SimpleStandard.java

The SimpleStandard.java class is shown in CODE EXAMPLE 3-1.

CODE EXAMPLE 3-1 MBean Example Class SimpleStandard.java

public class SimpleStandard
    extends NotificationBroadcasterSupport
    implements SimpleStandardMBean {
    public String getState() {
       return state;
    }
    public void setState(String s) {
       state = s;
       nbChanges++;
    }

    public int getNbChanges() {
        return nbChanges;
    }

    public void reset() {
       AttributeChangeNotification acn =
           new AttributeChangeNotification(this,
                                          0,
                                          0,
                                          "NbChanges reset",
                                          "NbChanges",
                                          "Integer",
                                          new Integer(nbChanges),
                                          new Integer(0));
       state = "initial state";
       nbChanges = 0;
       nbResets++;
       sendNotification(acn);
    }

    public int getNbResets() {
       return nbResets;
    }

    public MBeanNotificationInfo[] getNotificationInfo() {
        return new MBeanNotificationInfo[] {
          new MBeanNotificationInfo(
          new String[] {
            AttributeChangeNotification.ATTRIBUTE_CHANGE },
            AttributeChangeNotification.class.getName(),
            "This notification is emitted when the reset()
             method is called.")
        };
    }

    private String state = "initial state";
    private int nbChanges = 0;
    private int nbResets = 0;

}

The SimpleStandard class defines a straightforward JMX specification standard MBean.

The SimpleStandard MBean exposes operations and attributes for management by implementing the corresponding SimpleStandardMBean interface, shown in Section "SimpleStandardMBean.java".

The simple operations exposed by this MBean are as follows:

  • To define a state.
  • To update this state.
  • To count the number of times the state is updated
  • To reset the values of the state and the number of changes to their original value of zero
  • To send a notification whenever the reset operation is invoked

The notification emitted by the reset operation is an instance of the class AttributeChangeNotification, which collects information about the number of changes carried out on the State attribute before calling reset. The content of the notification sent is defined by the MBeanNotificationInfo instance.

SimpleDynamic.java

The SimpleDynamic class is shown in CODE EXAMPLE 3-1.

CODE EXAMPLE 3-1 MBean Example Class SimpleDynamic.java

public class SimpleDynamic
    extends NotificationBroadcasterSupport
    implements DynamicMBean {

    public SimpleDynamic() {
        buildDynamicMBeanInfo();
    }

[...]

The SimpleDynamic dynamic MBean shows how to expose attributes and operations for management at runtime, by implementing the DynamicMBean interface. It starts by defining a method, buildDynamicMBeanInfo(), for obtaining information for the MBean dynamically. The buildDynamicMBeanInfo() method builds the MBeanInfo for the dynamic MBean.

The rest of the code of SimpleDynamic corresponds to the implementation of the DynamicMBean interface. The attributes, operations and notifications exposed are identical to those exposed by the SimpleStandard MBean.

ClientListener.java

The ClientListener.java class is shown in CODE EXAMPLE 3-1.

CODE EXAMPLE 3-1 MBean Example Class ClientListener.java

public class ClientListener implements NotificationListener {
 public void handleNotification(Notification notification, Object handback)
     {
         System.out.println("\nReceived notification: " + notification);
     }
}

The ClientListener class implements a straightforward JMX specification notification listener.

The handleNotification() method of the NotificationListener interface is called upon reception of a notification, and prints out a message to confirm that a notification has been received.

Client.java

The Client.java class is shown in CODE EXAMPLE 3-1.

CODE EXAMPLE 3-1 MBean Example Class Client.java

public class Client {

  public static void main(String[] args) {
    try {
      // Create an RMI connector client
      //
      JMXServiceURL url = new JMXServiceURL(
         "service:jmx:rmi:///jndi/rmi://localhost:9999/server");
      JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
      ClientListener listener = new ClientListener();
      MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
      waitForEnterPressed();

      // Get domains from MBeanServer
      //
      String domains[] = mbsc.getDomains();
      for (int i = 0; i < domains.length; i++) {
          System.out.println("Domain[" + i + "] = " + domains[i]);
      }
      waitForEnterPressed();

      String domain = mbsc.getDefaultDomain();

      // Create SimpleStandard MBean
      ObjectName mbeanName =
             new ObjectName(domain +":type=SimpleStandard,name=2");
      mbsc.createMBean("SimpleStandard", stdMBeanName, null, null);
      waitForEnterPressed();

      // Create SimpleDynamic MBean
      ObjectName dynMBeanName =
          new ObjectName(domain +":type=SimpleDynamic,name=2");
      echo("\nCreate SimpleDynamic MBean...");
      mbsc.createMBean("SimpleDynamic", dynMBeanName, null, null);
      waitForEnterPressed();

      // Get MBean count
      echo("\nMBean count = " + mbsc.getMBeanCount());

      // Query MBean names
      echo("\nQuery MBeanServer MBeans:");
      Set names = mbsc.queryNames(null, null);
      for (Iterator i = names.iterator(); i.hasNext(); ) {
      echo(     "ObjectName = " + (ObjectName) i.next());
      }
      waitForEnterPressed();

      mbsc.setAttribute(stdMBeanName,
                        new Attribute("State", "changed state"));

      SimpleStandardMBean proxy = JMX.newMBeanProxy(
          mbsc, stdMBeanName, SimpleStandardMBean.class, true);
      echo("\nState = " + proxy.getState());

      ClientListener listener = new ClientListener();
      mbsc.addNotificationListener(stdMBeanName, listener, null, null);

      mbsc.invoke(stdMBeanName, "reset", null, null);

      mbsc.removeNotificationListener(stdMBeanName, listener);
      mbsc.unregisterMBean(stdMBeanName);

      [...]

      jmxc.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
[...]

The Client.java class creates an RMI connector client that is configured to connect to the RMI connector server created by Server.java.

As you can see, Client.java defines the same service URL url as that defined by Server.java. This allows the connector client to retrieve the RMI connector server stub named server from the RMI registry running on port 9999 of the local host, and to connect to the RMI connector server.

With the RMI registry thus identified, the connector client can be created. The connector client, jmxc, is an instance of the interface JMXConnector, created by the connect() method of JMXConnectorFactory. The connect() method is passed the parameters url and a null environment map when it is called.

The Client also creates an instance of ClientListener, to listen for notifications, as shown in Section "ClientListener.java".

An instance of a JMX specification MBeanServerConnection, named mbsc, is then created by calling the getMBeanServerConnection() method of the JMXConnector instance jmxc.

The connector client is now connected to the MBean server created by Server.java, and can register MBeans and perform operations on them with the connection remaining completely transparent to both ends.

The client creates and registers the SimpleStandard MBean and the SimpleDynamic MBean in the MBean server with a call to the createMBean() method of MBeanServerConnection, and performs the operations defined by SimpleStandard and SimpleDynamic as if they were local JMX specification MBean operations.

MBean proxies allow you to access an MBean through a Java interface, allowing you to make calls on the proxy rather than having to write lengthy code to access a remote MBean. An MBean proxy for SimpleStandardMBean is created here by calling the method newMBeanProxy() in the javax.management.JMX class, passing it the MBean’s MBeanServerConnection, object name, the class name of the MBean interface and true, to signify that the proxy must behave as a NotificationBroadcaster. You can make proxies for MXBeans in exactly the same way as for standard MBeans, by simply calling newMXBeanProxy() instead of newMBeanProxy().

The code for the different operations performed on SimpleDynamic is not shown here, because the operations are the same as those performed on SimpleStandard.

Finally, the client unregisters the SimpleStandard MBean and closes the connection. The final removeNotificationListener is optional, as listeners registered by a remote client are removed when that client is closed.

Running the MBean Example

Having examined the example classes, you can now run the example. To run the example, follow the steps below, or see the README file:

  2. Compile the Java classes.

    $ javac *.java

  3. Start an RMI registry on port 9999 of the local host.

    The RMI registry will be used by the Server to register the RMI connector stub.

    $ rmiregistry 9999 &

  4. Start the Server class.

    $ java -classpath . Server

    You will see confirmation of the creation of the MBean server and the creation of the SimpleStandard MBean in the MBean server. You will then be prompted to press the Enter key to obtain information about, and then to perform operations on, the SimpleStandard MBean.

    Once the operations on the SimpleStandard have completed, the process will be repeated for the SimpleDynamic MBean.

    Once both the MBeans have been created and their operations performed, you see the creation of an RMI connector server, to allow operations to be performed on the MBeans from the remote Client.

  5. Start the Client class in another terminal window.

    $ java -classpath . Client

    You will see confirmation of the creation of the RMI connector client and of the connection with the connector server. You will also be informed of the domain name, and the creation and registration of SimpleStandard and SimpleDynamic MBeans. The client will then perform operations on SimpleStandard and SimpleDynamic MBeans, before unregistering them.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next Java Management Extensions (JMX) Technology Tutorial

Chapter 4

Lookup Services

The Java Management Extensions (JMX) specification defines three bindings to lookup services, using existing lookup technologies, as described in the following sections:

  • Section "Initial Configuration" provides configuration information that applies to all three types of lookup service.
  • Section "Service Location Protocol (SLP) Lookup Service" presents the SLP lookup example.
  • Section "Jini Lookup Service" presents the Jini lookup example.
  • Section "Java Naming and Directory Interface (JNDI) / LDAP Lookup Service" presents the JNDI/LDAP lookup example.

The lookup services allow JMX technology clients to find and connect to connector servers that have registered with the lookup services.

Initial Configuration

As shown simply in Section "Accessing Standard and Dynamic MBeans via the RMI Connector", if you are using remote method invocation (RMI) connectors, you can choose to use an external directory to register the connector server stubs you want to look up. The following cases are presented in the lookup service examples relating to RMI connectors:

  • RMI connectors using one of the following external directories:
  • An RMI registry, for RMI connectors implementing the default Java Remote Method Protocol (JRMP) transport
  • CORBA Naming Service, for RMI connectors implementing the Internet Inter-ORB Protocol (IIOP) transport
  • Lightweight Directory Access Protocol (LDAP), for both the IIOP and JRMP transports
  • RMI connectors without an external directory

If you choose to register the RMI connector stubs in an external directory, some initial configuration is required, to set up your RMI registry, CORBA naming service or LDAP server. If you do not use an external directory, the RMI connector stub is encoded into the JMX service URL.

The following sections describe the external directories that you can use in conjunction with the lookup service examples that use RMI connectors. These external directories are referred to when running the three examples of lookup services that are given in the subsequent sections in this chapter.

External RMI Registry

To register the RMI connector server stubs in an external RMI registry, for use by connectors implementing the JRMP transport, perform the following actions:

  2. Start the RMI registry on port 9999 of the local host.

    As was the case in Chapter 3, "JMX Connectors", the RMI registry is used to store the RMI connector stubs for RMI connectors implementing the JRMP transport.

    $ rmiregistry 9999 &

  3. For your convenience when typing commands, create an environment variable for the address of the RMI registry.

    To shorten the commands that you will type when you run the examples, set the service URL for the RMI registry as an environment variable, jndirmi. In these examples, the service URL is given in JNDI form. See the API documentation for the javax.management.remote.rmi package for an explanation of JNDI form. If you want to run the external directories on a machine other than the local machine, you must specify that machine’s host name instead of localhost.

    $ jndirmi="rmi://localhost:9999"

External CORBA Naming Service

To register the RMI connector server stubs in an external CORBA naming service, for use by connectors implementing the IIOP transport, perform the following actions:

  2. Start an Object Request Broker (ORB) daemon on port 7777 of the local host.

    RMI connectors that implement the IIOP transport can use CORBA naming to identify the RMI connector stub.

    $ orbd -ORBInitialPort 7777 &

  3. For your convenience when typing commands, create an environment variable for the address of the CORBA naming service.

    To shorten the commands that you type when you run the examples, set the service URL for the CORBA naming service as an environment variable, jndiiiop. In these examples, the service URL is given in JNDI form. If you want to run the external directories on a machine other than the local machine, you must specify that machine’s host name instead of localhost.

    $ jndiiiop="iiop://localhost:7777"

External LDAP Registry

To register the RMI connector server stubs in an external LDAP registry, for use by connectors implementing either of the JRMP or IIOP transports, perform the following actions:

  2. Start an LDAP Server.

    The LDAP server you use is your choice, although the schema for representing Java objects in an LDAP directory must be known to the server. See the relevant Request For Comments (RFC) document for details:

    http://www.ietf.org/rfc/rfc2713.txt

  3. Create a domain component suffix.

    These examples require that you create the following domain component suffix:

    dc=Test

    See the documentation accompanying your LDAP server for details of how to configure the server and create this suffix.

  4. For your convenience, set the following LDAP parameters as environment variables.

    These variables are used to shorten the commands you type when starting the Server and Client classes in the lookup service examples that register RMI connector stubs in the external LDAP server.

    2. The name of the machine running your LDAP server (ldap_host)

      $ ldaphost=ldap_host

    3. The port the LDAP server is running on (ldap_port)

      $ ldapport=ldap_port

    4. The LDAP common name attribute, which in these examples is “Directory Manager”

      $ principal=”cn=Directory Manager”

    5. The password required by your LDAP server

      Supply the password for your LDAP server.

      $ credentials=your_ldap_password

    6. The address of the LDAP server

      In this example, the service URL for the LDAP server is given in JNDI form and is identified by the variable jndildap.

      $ jndildap="ldap://$ldaphost:$ldapport"

    • You are now ready to run the different lookup service examples.

Service Location Protocol (SLP) Lookup Service

The JMX technology specifies how to register RMI connectors with the SLP lookup service.

The purpose of this example is to demonstrate how a JMX Remote API connector client can find and connect to a connector server that has registered with the SLP lookup service. This example performs the following operations:

  • The agent:
  • Creates an MBean server
  • Gets a pointer to the SLP lookup service
  • Creates a connector server
  • Registers the connector address with the SLP lookup service
  • The client:
  • Gets a pointer to the SLP lookup service
  • Looks for any connector servers registered in the SLP lookup service
  • Creates a JMX Remote API connector
  • Retrieves information about the MBeans in the MBean server

This example assumes that you are already familiar with SLP technology. The code provided for this example conforms to Sun Microsystems’ implementation of SLP, as defined by RFC 2614 (see http://www.ietf.org/rfc/rfc2614.txt). Sun Microsystems’ implementation of SLP is available in the Solaris operating environment in the directory/usr/share/lib/slp. If you are not running the Solaris operating environment, you must obtain a version of SLP that is compliant with RFC 2614, section 5. You can download the OpenSLP Java implementation from http://www.openslp.org/.

The SLP lookup example is contained in the directory work_dir/jmx_examples/Lookup/slp.

  2. Open work_dir/jmx_examples/Lookup/slp.

    Inside this directory, you will find the following files:

    • Server.java
    • Client.java
    • README
  3. Open both the *.java files in a text editor.

    These classes will be analyzed in the following sections.

Analyzing the Example Classes

The following sections analyze each of the classes used in the SLP lookup example, and explain how they perform the operations described above.

Note – If you are using an implementation of SLP other than Sun Microsystems’ implementation, you will have to modify Server.java and Client.java to import your version of the SLP Java classes instead of the com.sun.slp package. See RFC 2614, section 5.

Server.java

Due to its size, the SLP lookup service Server.java class is shown as a series of code excerpts. For explanations of the SLP code used in this example, see RFC 2614 and the API documentation for SLP.

CODE EXAMPLE 4-1 SLP Lookup Service Example Class Server.java (Excerpt 1)

public class Server {
   public final static int JMX_DEFAULT_LEASE = 300;
   public final static String JMX_SCOPE = "DEFAULT";

   private final MBeanServer mbs;
   public Server() {
       mbs = MBeanServerFactory.createMBeanServer();
   }

[...]

CODE EXAMPLE 4-1 sets the default SLP lease JMX_DEFAULT_LEASE to a default lease of 300 seconds, corresponding to the length of time the URL will be registered, and shows the initial creation of the MBean server mbs.

In code that is not shown here, you then define an SLP advertiser slpAdvertiser, and an SLP service URL url. The slpAdvertiser is used to register the service URL in the SLP lookup service. The SCOPE and the agentName are registered in SLP as lookup attributes.

CODE EXAMPLE 4-2 SLP Lookup Service Example Class Server.java (Excerpt 2)

[...]

   public static void register(JMXServiceURL jmxUrl, String name)
     throws ServiceLocationException {
     ServiceURL serviceURL =
          new ServiceURL(jmxUrl.toString(),
                         JMX_DEFAULT_LEASE);
     debug("ServiceType is: " + serviceURL.getServiceType());
     Vector attributes = new Vector();
     Vector attrValues = new Vector();
     attrValues.add(JMX_SCOPE);
     ServiceLocationAttribute attr1 =
          new ServiceLocationAttribute("SCOPE", attrValues);
     attributes.add(attr1);
     attrValues.removeAllElements();
     attrValues.add(name);
     ServiceLocationAttribute attr2 =
          new ServiceLocationAttribute("AgentName", attrValues);
     attributes.add(attr2);
     final Advertiser slpAdvertiser =
          ServiceLocationManager.getAdvertiser(Locale.US);
     slpAdvertiser.register(serviceURL, attributes);

   }

[...]

CODE EXAMPLE 4-2 shows the registration of the JMX connector server’s URL with the SLP lookup service.

The JMX service URL jmxUrl is the address of the connector server, and is obtained by a call to the getAddress() method of JMXConnectorServer when the connector server is started.

The SLP lookup attributes, namely the scope and the agent name under which the connector server address is to be registered (name), are then specified by the SLP class ServiceLocationAttribute. The AgentName attribute is mandatory, but other optional attributes, such as ProtocolType, AgentHost, and Property can also be registered in the SLP lookup service.

Finally, the JMX connector server address is registered in the SLP service with a call to the register() method of the Advertiser interface, with the serviceURL and the attributes passed in as parameters.

CODE EXAMPLE 4-3 SLP Lookup Service Example Class Server.java (Excerpt 3)

[...]

   public JMXConnectorServer rmi(String url) throws
     IOException,
     JMException,
     NamingException,
     ClassNotFoundException,
     ServiceLocationException {
     JMXServiceURL jurl = new JMXServiceURL(url);
     final HashMap env = new HashMap();
     // Environment map attributes
     [...]

     JMXConnectorServer rmis =
        JMXConnectorServerFactory.newJMXConnectorServer(jurl, env, mbs);
     final String agentName = System.getProperty("agent.name",
                                                 "DefaultAgent");
     start(rmis, agentName);

     return rmis;
  }
[...]

CODE EXAMPLE 4-3 shows the creation of an RMI connector server. The JMX service URL jurl is constructed from the string url that is included in the command used to launch the Server at the command line. An RMI connector server named rmis is then created with the system properties defined by the environment map and the address jurl.

The connector server is then started, and the RMI connector server address is registered in the SLP lookup service under the name agentName.

CODE EXAMPLE 4-4 SLP Lookup Service Example Class Server.java (Excerpt 4)

[...]

   public void start(JMXConnectorServer server, String agentName)
      throws IOException, ServiceLocationException {
      server.start();
      final JMXServiceURL address = server.getAddress();
      register(address,agentName);
   }

[...]

CODE EXAMPLE 4-4 shows the launching of the connector server server and the registration of server in the SLP lookup service with the given address address.

Client.java

The SLP lookup service Client.java class is shown in CODE EXAMPLE 4-1, CODE EXAMPLE 4-2, and CODE EXAMPLE 4-3:

CODE EXAMPLE 4-1 SLP Lookup Service Example Class Client.java (Excerpt 1)

public class Client {

    public final static String JMX_SCOPE = "DEFAULT";

    public static Locator getLocator() throws ServiceLocationException {
      final Locator slpLocator =
          ServiceLocationManager.getLocator(Locale.US);
      return slpLocator;
    }

      public static List lookup(Locator slpLocator, String name)
          throws IOException, ServiceLocationException {

          final ArrayList list = new ArrayList();
          Vector scopes = new Vector();

          scopes.add(JMX_SCOPE);
          String query =
              "(&(AgentName=" + ((name!=null)?name:"*") + "))";

          ServiceLocationEnumeration result =
              slpLocator.findServices(new ServiceType("service:jmx"),
                                      scopes, query);

          while(result.hasMoreElements()) {
                final ServiceURL surl = (ServiceURL) result.next();

             JMXServiceURL jmxUrl = new JMXServiceURL(surl.toString());
             try {
                  JMXConnector client =
                     JMXConnectorFactory.newJMXConnector(jmxUrl,null);
                  if (client != null) list.add(client);
             } catch (IOException x ) {
             [...]
             }
          }
      }
      return list;
    }

CODE EXAMPLE 4-1 first of all obtains the SLP service Locator by calling the getLocator method of the SLP class ServiceLocationManager. Client then retrieves all the connector servers registered in the SLP service under a given agent name, or under agent names that match a certain pattern. If no agent name is specified when the Client is started, all agent names will be considered.

A JMX technology service URL, jmxUrl, is generated for each of the agents retrieved by SLP, with each agent’s SLP service URL, surl, passed as a parameter into the JMXServiceURL instance. The URL jmxUrl is then passed to the newJMXConnector() method of JMXConnectorFactory, to create a new connector client named client for each agent that is registered in the SLP service.

The connector clients retrieved are stored in an array list called list.

CODE EXAMPLE 4-2 SLP Lookup Service Example Class Client.java (Excerpt 2)

public static void listMBeans(MBeanServerConnection server)
     throws IOException {

     final Set names = server.queryNames(null,null);
     for (final Iterator i=names.iterator(); i.hasNext(); ) {
          ObjectName name = (ObjectName)i.next();
          System.out.println("Got MBean: "+name);
          try {
               MBeanInfo info =
                  server.getMBeanInfo((ObjectName)name);
               MBeanAttributeInfo[] attrs = info.getAttributes();
               if (attrs == null) continue;
               for (int j=0; j<attrs.length; j++) {
                    try {
                         Object o =
                         server.getAttribute(name,attrs[j].getName());
                         System.out.println("\t\t" + attrs[j].getName() +
                         " = "+o);
                    } catch (Exception x) {
                         System.err.println("JmxClient failed to get " +
                                             attrs[j].getName() + x);
                         x.printStackTrace(System.err);
                    }
     }
}

In CODE EXAMPLE 4-2, a reference to the MBeanServerConnection is retrieved for every connector client that is created from the connector server address stored in the SLP service. A list of all the MBeans and their attributes is retrieved.

CODE EXAMPLE 4-3 SLP Lookup Service Example Class Client.java (Excerpt 3)

public static void main(String[] args) {
      try {
           final String agentName = System.getProperty("agent.name");
           final Locator slpLocator = getLocator();
           List l = lookup(slpLocator,agentName);
           int j = 1;
           for (Iterator i=l.iterator();i.hasNext();j++) {
                JMXConnector c1 = (JMXConnector) i.next();
                if (c1 != null) {
                    try {
                         c1.connect(env);
                    } catch (IOException x) {
                         System.err.println ("Connection failed: " + x);
                         x.printStackTrace(System.err);
                         continue;
                    }

                    MBeanServerConnection conn =
                         c1.getMBeanServerConnection();

                    try {
                         listMBeans(conn);
                    } catch (IOException x) {
                         x.printStackTrace(System.err);
                    }
                    try {
                         c1.close();
                    } catch (IOException x) {
                         x.printStackTrace(System.err);
                    }
                }
           }
      } catch (Exception x) {
           x.printStackTrace(System.err);
      }
}

In CODE EXAMPLE 4-3, the agent.name property is retrieved by calling the getProperty() method of the System class, and the SLP lookup service is found by calling the getLocator() method of Locator.

All the agents named agentName are then looked up, and connections are made to the agents discovered. If no agent is specified, then all agents are lookup up. Connections are made to the MBean server created by Server, and all the MBeans in it are listed, before the connection is closed down.

Running the SLP Lookup Service Example

In addition to the actions you performed in Section "Initial Configuration", before you can run the lookup service examples that use the SLP, you must perform some further initial actions that are specific to this example. You can then start looking up connectors using SLP in conjunction with the two connectors supported by the JMX technology.

When you run the examples, to help you keep track of which agent has been created with which transport, the agent names include a letter suffix that is the same as the lettering of the corresponding section. For example, the agent from Section a. "RMI connector over JRMP, without an external directory" is called example-server-a.

Setting up the SLP Lookup Service Example

The following steps are required by all of the different transports you can run in this example.

  2. For convenience when compiling and running the classes, define an additional environment variable.

    In addition to the common environment variables that were set in Section "Initial Configuration", you need to add the path to the SLP service. If you are using the Solaris operating environment, add the following variable:

    $ SLPLIB=/usr/share/lib/slp

    If you are using another platform, set SLPLIB appropriately for the platform you are using.

  3. Define and export the classp environment variable.

    This example requires a classpath that includes the Java archive (JAR) files for SLP.

    $ classp=$SLPLIB/slp.jar

  4. Compile the example Client and Server classes.

    Type the following command:

    $ javac -d . -classpath $classp Server.java Client.java

  5. Start the SLP daemon.

    If you are using the Solaris operating environment, type the following command, which requires you to know your super user password:

    $ su root -c "java -cp $SLPLIB/slpd.jar com.sun.slp.slpd &"

    Password: [type superuser password]

    If you are not running a Solaris system, start the SLP daemon according to the implementation of SLP you are using.

Running the SLP Lookup Service Example

This example demonstrates the use of the SLP lookup service to look up RMI connector servers that use RMI’s default transport, JRMP, as well as the IIOP transport. In addition, as described in Section "Initial Configuration", different external directories are used to register the RMI connector stubs.

The combinations of transports and external directories demonstrated here are:

  • RMI connector over the JRMP transport, with:
  • No external directory
  • An RMI registry
  • An LDAP registry
  • RMI connector over the IIOP transport, with:
  • No external directory
  • A CORBA naming service
  • An LDAP registry

Perform the following steps to run the example:

  2. Start the Server.

    The command you use to start the Server varies according to which external directory you are using. You can start one or more of the following instances of Server with different transports and external registries before starting the Client.

    2. RMI connector over JRMP, without an external directory

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-a \
  -Durl ="service:jmx:rmi://" \
  slp.Server &

      In this command:

      • debug is set to true to provide more complete screen output when the Server runs
      • The name of the agent to be created is example-server-a
      • The service URL specifies that the chosen connector is an RMI connector, running over the RMI default transport JRMP.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the SLP service.

    3. RMI connector over JRMP, using an RMI registry as an external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-b \
  -Durl="service:jmx:rmi:///jndi/${jndirmi}/server" \
  slp.Server &

      In this command:

      • The name of the agent created is example-server-b
      • The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub, server, is stored is the RMI registry you identified as jndirmi in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the SLP service.

    4. RMI connector over JRMP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-c \
  -Durl="service:jmx:rmi:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  slp.Server &

      In this command:

      • The name of the agent created is example-server-c
      • The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".
      • The stub is registered in the Test domain component in the LDAP server.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the SLP service under the agent name example-server-c.

    5. RMI connector over IIOP, without an external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-d \
  -Durl="service:jmx:iiop://" \
  slp.Server &

      In this command:

      • The name of the agent created is example-server-d
      • The service URL specifies the chosen connector as RMI connector over IIOP.

      When the Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its automatically generated URL in the SLP service.

    6. RMI connector over IIOP, using CORBA naming as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-e \
  -Durl="service:jmx:iiop:///jndi/${jndiiiop}/server" \
  slp.Server &

      In this command:

      • The name of the agent created is example-server-e
      • The service URL specifies the chosen connector as RMI connector over IIOP. The external directory in which the RMI connector stub server is stored is the CORBA naming service you identified as jndiiiop in Section "Initial Configuration"

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the SLP service under the name example-server-e.

    7. RMI connector over IIOP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-f \
  -Durl="service:jmx:iiop:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  slp.Server &

      In this command:

      • The name of the agent created is example-server-f
      • The service URL specifies the chosen connector as RMI over IIOP, and the external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".
      • The stub is registered in the Test domain component in the LDAP server.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the SLP service under the agent name example-server-f.

    • Start the Client.

    • After starting the Server using the transport and external directory of your choice, start the Client:

$ java -classpath .:$classp -Ddebug=true \
     -Djava.naming.security.principal="$principal" \
     -Djava.naming.security.credentials="$credentials" \
     slp.Client

      You will see output confirming the detection of the agents created by the Server and registered in the lookup service. You will also see the identification and confirmation of the connection made to the agents.

      To look up a specific agent, type the following command:

$ java -classpath .:$classp -Ddebug=true \
     -Djava.naming.security.principal="$principal" \
     -Djava.naming.security.credentials="$credentials" \
     -Dagent.name="agentName" \
    slp.Client

      In the command shown above, agentName is the name of the agent you want to look up. You can also specify a partial agent name by using *; for example, x* for all agent names beginning with the letter x.

Jini Lookup Service

The purpose of this example is to demonstrate how a JMX technology connector client can find and connect to a connector server that has registered with the Jini lookup service. This example performs the following operations:

  • The agent:
  • Creates an MBean server
  • Creates a connector server
  • Registers the connector address with the Jini lookup service
  • The client:
  • Gets a pointer to the Jini lookup service
  • Looks for any connector servers registered in the Jini lookup service
  • Creates a JMX Remote API connector
  • Retrieves information about the MBeans in the MBean server

The Jini lookup service example is contained in the directory work_dir/jmx_examples/Lookup/jini.

Note – These examples assume that you are already familiar with the Jini network technology. The documentation for the Jini network technology is available at http://java.net/projects/jini. You can download the Jini network technology from http://java.net/projects/jini. This example has been implemented using the Jini Technology Starter Kit Version 1.2.1_002.
  2. Open the work_dir/jmx_examples/Lookup/jini directory.

    Inside this directory, you will find the following files:

    • Server.java
    • Client.java
    • java.policy
    • jini.properties.template
    • README
  3. Open each of the files in a text editor.

    These classes will be analyzed in the following sections.

Analyzing the Example Classes

The following sections analyze each of the classes used in the Jini lookup service example, and explain how they perform the operations described above.

Server.java

Due to its size, the Jini lookup service Server.java class is shown as a series of code excerpts.

CODE EXAMPLE 4-1 Jini Lookup Service Example Class Server.java (Excerpt 1)

public class Server {
   private final MBeanServer mbs;
   private static boolean debug = false;
   public Server() {
     mbs = MBeanServerFactory.createMBeanServer();
   }

[...]

CODE EXAMPLE 4-1 shows the creation of an MBean server mbs. As was the case for the SLP examples, the JMX service URL and the agent name are passed to Server when it is launched at the command line.

CODE EXAMPLE 4-2 Jini Lookup Service Example Class Server.java (Excerpt 2)

[...]

   public JMXConnectorServer rmi(String url)
      throws IOException, JMException, ClassNotFoundException {
      JMXServiceURL jurl = new JMXServiceURL(url);
      final HashMap env = new HashMap();
      // Environment map attributes
     [...]
     JMXConnectorServer rmis =
        JMXConnectorServerFactory.newJMXConnectorServer(jurl, env, mbs);

     final String agentName = System.getProperty("agent.name",
                                                 "DefaultAgent");

     start(rmis,env,agentName);

     return rmis;
   }

[...]

CODE EXAMPLE 4-2 shows the creation of an RMI connector server named rmis, using the system properties defined by the environment map env and the address jurl.

The RMI connector server rmis is started. The RMI connector server address is registered in the Jini lookup service under the name agentName.

CODE EXAMPLE 4-3 Jini Lookup Service Example Class Server.java (Excerpt 3)

[...]

   public void start(JMXConnectorServer server, Map env, String agentName)
      throws IOException, ClassNotFoundException {
      server.start();
      final ServiceRegistrar registrar=getRegistrar();
      final JMXConnector proxy = server.toJMXConnector(env);
      register(registrar,proxy,agentName);
   }

   public static ServiceRegistrar getRegistrar()
      throws IOException, ClassNotFoundException,
         MalformedURLException {
      final String jurl =
         System.getProperty("jini.lookup.url","jini://localhost");
      final LookupLocator lookup = new LookupLocator(jurl);
      final ServiceRegistrar registrar = lookup.getRegistrar();
      if (registrar instanceof Administrable)
          debug("Registry is administrable.");
      return registrar;
   }

   public static ServiceRegistration register(ServiceRegistrar registrar,
                                              JMXConnector proxy, String name)
      throws IOException {
      Entry[] serviceAttrs = new Entry[] {
              new net.jini.lookup.entry.Name(name)
                       };

      System.out.println("Registering proxy: AgentName=" + name );
      debug("" + proxy);
      ServiceItem srvcItem = new ServiceItem(null, proxy, serviceAttrs);
      ServiceRegistration srvcRegistration =
             registrar.register(srvcItem, Lease.ANY);
      debug("Registered ServiceID: " +
                              srvcRegistration.getServiceID().toString());
      return srvcRegistration;
   }

[...]

CODE EXAMPLE 4-3 shows the creation of a connector server named server with the environment map env and the service URL jurl. The connector server instance server then gets a pointer to the Jini lookup service by calling the Jini lookup service method LookupLocator.getRegistrar().

The connector server is registered in the Jini lookup service in the form of a proxy, using the Jini lookup service locator registrar and the agent name under which the connector server will be registered. The proxy is in fact a client stub for the connector server, obtained by a call to the toJMXConnector() method of JMXConnectorServer.

The registration itself is performed by a call to the register() method of the Jini lookup service class ServiceRegistrar, with an array of service items.

Client.java

The Jini lookup service example class Client.java is shown in CODE EXAMPLE 4-1.

CODE EXAMPLE 4-1 Jini Lookup Service Example Class Client.java

public class Client {

   private static boolean debug = false;
   public static ServiceRegistrar getRegistrar()
       throws IOException, ClassNotFoundException, MalformedURLException {
       final String jurl =
                  System.getProperty("jini.lookup.url","jini://localhost");
       final LookupLocator lookup = new LookupLocator(jurl);
       final ServiceRegistrar registrar = lookup.getRegistrar();
       if (registrar instanceof Administrable)
               debug("Registry is administrable.");
       return registrar;
 }

   public static List lookup(ServiceRegistrar registrar,
           String name) throws IOException {
       final ArrayList list = new ArrayList();
       final Class[] classes = new Class[] {JMXConnector.class};
       final Entry[] serviceAttrs = new Entry[] {
           new net.jini.lookup.entry.Name(name)
   };

   ServiceTemplate template =
        new ServiceTemplate(null,classes,serviceAttrs);
   ServiceMatches matches =
        registrar.lookup(template, Integer.MAX_VALUE);
   for(int i = 0; i < matches.totalMatches; i++) {
        debug("Found Service: " + matches.items[i].serviceID);
        if (debug) {
           if (matches.items[i].attributeSets != null) {
                   final Entry[] attrs = matches.items[i].attributeSets;
                   for (int j = 0; j < attrs.length ; j++) {
                       debug("Attribute["+j+"]=" + attrs[j]);
               }
           }
        }

        if(matches.items[i].service != null) {
            JMXConnector c = (JMXConnector)(matches.items[i].service);
            debug("Found a JMXConnector: " + c);
            list.add(c);
        }
   }
   return list;
}

[...]

CODE EXAMPLE 4-1 shows how the connector client obtains a pointer to the Jini lookup service with a call to lookup.getRegistrar(). The client then obtains the list of the connectors registered as entries in the Jini lookup service with the agent name name. Unlike in the SLP example, the agent name you pass to Client when it is launched must be either an exact match of an existing agent name, or null, in which case the Jini lookup service will look up all the agents.

Once the list of connectors has been obtained, in code that is not shown here, the client connects to the MBean server started by Server, and retrieves the list of all the MBeans registered in it.

java.policy

The java.policy file is a Java technology security policy file, configured for this example.

jini.properties.template

A template Jini networking technology properties file, to be configured for this example. Change @INSTALL_HOME_FOR_JINI@ and rename the file to jini.properties.

Running the Jini Lookup Service Example

In addition to the actions you performed in Section "Initial Configuration", before you can run the lookup service examples that use the Jini lookup service, you must perform some further initial actions that are specific to this example. You can then start looking up connectors using the Jini network technology, in conjunction with the connector supported by the JMX technology.

When you run the examples, to help you keep track of which agent has been created with which transport, the agent names include a letter suffix that is the same as the lettering of the corresponding section. For example, the agent from Section a. "RMI connector over JRMP, without an external directory." is called example-server-a.

Setting up the Jini Lookup Service Example

The following steps are required by all of the different transports you can run in this example.

  2. For your convenience when compiling and running the example classes, define some additional environment variables.

    In addition to the common environment variables that you set in Section "Initial Configuration" you can add the path to the Jini lookup service. The directory where you have installed the Jini networking technology is referred to as jini_dir.

    $ JINI_HOME=jini_dir

    $ JINILIB=$JINI_HOME/lib

  3. Define the classp environment variable.

    This example requires the JAR files for the Jini lookup services core and extensions.

    $ classp=$JINILIB/jini-core.jar:$JINILIB/jini-ext.jar

  4. Create a jini.properties file.

    A properties file for Solaris, Linux, or Mac OS X platforms is provided in the same directory as the classes for this example. If you are not running a Solaris, Linux, or Mac OS X platform, you can obtain a properties file for your platform in the following directory:

    $JINI_HOME/example/launcher/jini12_<platform>.properties

  5. Update the jini.properties file.

    You must complete the file to include all the necessary paths, host names and port numbers for your system. Even if you are not running a Solaris, Linux, or Mac OS X platform, you can use the template provided as a guide.

  6. Start the Jini networking technology StartService.

    $ java -cp $JINILIB/jini-examples.jar com.sun.jini.example.launcher.StartService &

    This will open the StartService graphical user interface.

  7. Load your jini.properties file into StartService.

    Click on ‘File’, ‘Open Property File’ and then select your properties file from within work_dir/jmx_examples/Lookup/jini.

  8. Start the Jini lookup services.

    Start the required Jini lookup services by clicking on the ‘Run’ tab and then pressing the ‘START’ button for each of the following:

    • RMID
    • WebServer
    • Reggie
    • LookupBrowser

    You will see confirmation that the services are running.

  9. Compile the Client and Server classes.

    Type the following command:

    $ javac -d . -classpath $classp Server.java Client.java

Running the Jini Lookup Service Example

This example demonstrates the use of the Jini lookup service to look up RMI connector servers that use RMI’s default transport, JRMP, as well as the IIOP transport. In addition, as described in Section "Initial Configuration", different external directories are used to register the RMI connector stubs.

The combinations of transports and external directories demonstrated here are:

  • RMI connector over the JRMP transport, with:
  • No external directory
  • An RMI registry
  • An LDAP registry
  • RMI connector over the IIOP transport, with:
  • No external directory
  • A CORBA naming service
  • An LDAP registry
  2. Start the Server.

    The command you use to start the Server varies according to which external directory you are using. You can start one or more of the following instances of Server with different transports and external registries before starting the Client.

    2. RMI connector over JRMP, without an external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-a \
  -Durl="service:jmx:rmi://" \
  -Djava.security.policy=java.policy \
  jini.Server &

      In this command:

      • debug is set to true to provide more complete screen output when the Server runs.
      • The security policy is provided, to allow access to the Jini lookup service.
      • The name of the agent to be created is example-server-a.
      • The service URL specifies that the chosen connector is an RMI connector, running over the RMI default transport JRMP.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the Jini lookup service.

    3. RMI connector over JRMP, using an RMI registry as an external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-b \
  -Durl="service:jmx:rmi:///jndi/${jndirmi}/server" \
  -Djava.security.policy=java.policy \
  jini.Server &

      In this command:

      • The security policy is provided, to allow access to the Jini lookup service.
      • The name of the agent created is example-server-b.
      • The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub, server, is stored is the RMI registry you identified as jndirmi in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the Jini lookup service.

    4. RMI connector over JRMP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-c \
  -Durl="service:jmx:rmi:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.security.policy=java.policy \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jini.Server &

      In this command:

      • The security policy is provided, to allow access to the Jini lookup service.
      • The name of the agent created is example-server-c.The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".
      • The stub is registered in the Test domain component in the LDAP server.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the Jini lookup service under the agent name example-server-c.

    5. RMI connector over IIOP, without an external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-d \
  -Durl="service:jmx:iiop://" \
  -Djava.security.policy=java.policy \
  jini.Server &

      In this command:

      • The security policy is provided, to allow access to the Jini lookup service
      • The name of the agent created is example-server-d
      • The service URL specifies the chosen connector as RMI connector over IIOP.

      When the Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its automatically generated URL in the Jini lookup service.

    6. RMI connector over IIOP, using CORBA naming as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-e \
  -Durl="service:jmx:iiop:///jndi/${jndiiiop}/server" \
  -Djava.security.policy=java.policy \
  jini.Server &

      In this command:

      • The security policy is provided, to allow access to the Jini lookup service.
      • The name of the agent created is example-server-e.
      • The service URL specifies the chosen connector as RMI connector over IIOP. The external directory in which the RMI connector stub, server, is stored is the CORBA naming service you identified as jndiiiop in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the Jini lookup service under the name example-server-e.

    7. RMI connector over IIOP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Dagent.name=example-server-f \
  -Durl="service:jmx:iiop:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.security.policy=java.policy \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jini.Server &

      In this command:

      • The security policy is provided, to allow access to the Jini lookup service.
      • The name of the agent created is example-server-f.
      • The service URL specifies the chosen connector as RMI over IIOP.
      • The external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".
      • The stub is registered in the Test domain component in the LDAP server.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the Jini lookup service under the agent name example-server-f.

    • Start the Client.

    • After starting the Server using the transport and external directory of your choice, start the Client:

$ java -classpath .:$classp -Ddebug=true \
  -Djava.security.policy=java.policy \
  jini.Client

      You will see output confirming the detection of the agents created by the Server and registered in the lookup service. You will also see the identification and confirmation of the connection made to the agents.

      To look up a specific agent, you can do so by typing the following command:

$ java -classpath .:$classp -Ddebug=true \
  -Djava.security.policy=java.policy \
  -Dagent.name=agentName \
  jini.Client

      In the command shown above, agentName is the name of the agent you want to look up. You can also specify a partial agent name by using *; for example, x* for all agent names beginning with the letter x.

Java Naming and Directory Interface (JNDI) / LDAP Lookup Service

JMX technology allows you to register RMI connectors with a JNDI lookup service using an LDAP registry as a back end. This example performs the following operations:

  • The agent:
  • Creates an MBean server
  • Creates a connector server
  • Registers the connector address with the LDAP server
  • The client:
  • Gets a pointer to the JNDI/LDAP lookup Service
  • Looks for any connector servers registered in the JNDI/LDAP lookup service
  • Creates a JMX Remote API connector
  • Retrieves information about the MBeans in the MBean server

The JNDI/LDAP lookup example is contained in the directory work_dir/jmx_examples/Lookup/ldap.

  2. Open the work_dir/jmx_examples/Lookup/ldap directory.

    Inside this directory, you will find the following files:

    • Server.java
    • Client.java
    • jmx-schema.txt
    • 60jmx-schema.ldif
    • README
  3. Open the files in a text editor.

    These classes will be analyzed in the following sections.

Analyzing the Example Classes

The following sections analyze each of the classes used in the JNDI/LDAP lookup service example, and explain how they perform the operations described above.

Server.java

Due to its size, the JNDI/LDAP lookup service Server.java class is shown as a series of code excerpts.

CODE EXAMPLE 4-1 JNDI/LDAP Lookup Service Example Server.java (Excerpt 1)

[...]

public class Server {
   public final static int JMX_DEFAULT_LEASE = 60;
   private static boolean debug = false;
   private final MBeanServer mbs;
   public Server() {
      mbs = MBeanServerFactory.createMBeanServer();
   }

  public static DirContext getRootContext() throws NamingException {
      final Hashtable env = new Hashtable();

      final String factory =
        System.getProperty(Context.INITIAL_CONTEXT_FACTORY,
                           "com.sun.jndi.ldap.LdapCtxFactory");
      final String ldapServerUrl =
        System.getProperty(Context.PROVIDER_URL);
      final String ldapUser =
        System.getProperty(Context.SECURITY_PRINCIPAL,
                           "cn=Directory Manager");
      final String ldapPasswd =
        System.getProperty(Context.SECURITY_CREDENTIALS);
      debug(Context.PROVIDER_URL + "=" + ldapServerUrl);
      debug(Context.SECURITY_PRINCIPAL + "=" + ldapUser);
      if (debug) {
                  System.out.print(Context.SECURITY_CREDENTIALS + "=");
                  final int len = (ldapPasswd==null)?0:ldapPasswd.length();
                  for (int i=0;i<len;i++) System.out.print("*");
                  System.out.println();
      }
      env.put(Context.INITIAL_CONTEXT_FACTORY,factory);
      env.put(Context.SECURITY_PRINCIPAL, ldapUser);
      if (ldapServerUrl != null)
           env.put(Context.PROVIDER_URL, ldapServerUrl);
      if (ldapPasswd != null)
           env.put(Context.SECURITY_CREDENTIALS, ldapPasswd);
      InitialContext root = new InitialLdapContext(env,null);
      return (DirContext)(root.lookup(""));
  }

[...]

CODE EXAMPLE 4-1 shows the initial creation of an MBean server mbs, and the obtention of a pointer to the root context of the LDAP directory tree in which the connector server address is to be registered. All the relevant LDAP access variables, such as the provider URL, the LDAP user name and the security credentials, are given here and passed into the environment map env. The environment map env is then passed as a parameter into a call to InitialLdapContext, from which the initial LDAP context is obtained.

Code that is omitted from CODE EXAMPLE 4-1 retrieves the agent name under which the connector will be registered in the LDAP server.

CODE EXAMPLE 4-2 JNDI/LDAP Lookup Service Example Server.java (Excerpt 2)
[...]

public static void register(DirContext root,
                           JMXServiceURL jmxUrl,
                           String name)
   throws NamingException, IOException {

   final String mydn = System.getProperty("dn","cn="+name);

   debug("dn: " + mydn );

   Object o = null;
   try {
       o = root.lookup(mydn);
   } catch (NameNotFoundException n) {
       Attributes attrs = new BasicAttributes();
       Attribute objclass = new BasicAttribute("objectClass");
       objclass.add("top");
       objclass.add("javaContainer");
       objclass.add("jmxConnector");
       attrs.put(objclass);
       attrs.put("jmxAgentName", name);
       o = root.createSubcontext(mydn,attrs);
   }
   if (o == null) throw new NameNotFoundException();
   final Attributes attrs = root.getAttributes(mydn);
   final Attribute oc = attrs.get("objectClass");
   if (!oc.contains("jmxConnector")) {
       final String msg = "The supplied node [" + mydn +
         "] does not contain the jmxConnector objectclass";
       throw new NamingException(msg);
   }

   final Attributes newattrs = new BasicAttributes();
   newattrs.put("jmxAgentName",name);
   newattrs.put("jmxServiceURL",jmxUrl.toString());
   newattrs.put("jmxAgentHost",InetAddress.getLocalHost().getHostName());
   newattrs.put("jmxProtocolType",jmxUrl.getProtocol());
   newattrs.put("jmxExpirationDate",
                getExpirationDate(JMX_DEFAULT_LEASE));
   root.modifyAttributes(mydn,DirContext.REPLACE_ATTRIBUTE,newattrs);
}

[...]

CODE EXAMPLE 4-2 shows the registration of JMX connector server service URL in the LDAP directory. The DN where the URL will be registered can be passed on the command line through the dn System property, that is, -Ddn=mydn (see later the commands used start the server). If the dn System property is not specified, then you can use the DN: cn=name where name is the agentName. Naturally, this is not mandatory. The location where the URL is registered does not really matter, because the client code never uses that DN directly, but instead performs an LDAP search to find the nodes which have an auxiliary jmxConnector ObjectClass. What is important here is that each URL is registered in its own LDAP node. How to name these nodes is left to the LDAP administrator, who in this case is you. In this example, it is assumed that you have configured your LDAP server by creating a root context under which the node cn=name can be created, and that this root context has been passed to the LDAP initial context through the Context.PROVIDER_URL property (see CODE EXAMPLE 4-1).

The code shown in CODE EXAMPLE 4-2 checks whether the node in which you will register the server URL already exists. If it does not, you try to create it (this will fail if the parent node does not exist). Since the jmxConnector ObjectClass is a simple auxiliary class, you will use the javaContainer ObjectClass as structural class if you need to create a new context. Once again, this is completely optional. Any structural class to which the jmxConnector auxiliary class could be added would be acceptable. It then checks whether the node in which you will register the server already has the jmxConnector auxiliary class. If not, an exception is thrown.

At this point you are sure that the node in which you will register the URL exists, and has the appropriate jmxConnector auxiliary class. So you need only to replace the values of the attributes defined by JMX Remote API for LDAP lookup (see jmx-schema.txt):

  • jmxServiceUrl: contains the String form of the server URL, as obtained from server.getAddress() after the server was started
  • jmxAgentName: contains the JMX agent name
  • jmxProtocolType: contains the JMX protocol type, as returned by jmxUrl.getProtocolType()
  • jmxAgentHost: contains the name of the agent host
  • jmxExpirationDate: contains the date at which the URL will be considered obsolete.
CODE EXAMPLE 4-3 JNDI/LDAP Lookup Service Example Server.java (Excerpt 3)

[...]

   public JMXConnectorServer rmi(String url)
     throws IOException, JMException,
        NamingException, ClassNotFoundException {

     JMXServiceURL jurl = new JMXServiceURL(url);
     final HashMap env = new HashMap();
     // Prepare the environment Map

[...]

     JMXConnectorServer rmis =
        JMXConnectorServerFactory.newJMXConnectorServer(jurl, env, mbs);

     final String agentName = System.getProperty("agent.name",
                                                 "DefaultAgent");
     start(rmis,env,agentName);
     return rmis;
   }

[...]

In CODE EXAMPLE 4-3, a new RMI connector server named rmis is created with the JMX service URL jurl and the appropriate LDAP properties passed to its environment map env. The connector server rmis is launched by calling JMXConnectorServer.start() and is registered in the LDAP server.

CODE EXAMPLE 4-4 JNDI/LDAP Lookup Service Example Server.java (Excerpt 4)

[...]

    public void start(JMXConnectorServer server, Map env, String agentName)
       throws IOException, NamingException {
       server.start();
       final DirContext root=getRootContext();
       final JMXServiceURL address = server.getAddress();
       register(root,address,agentName);
    }

[...]

CODE EXAMPLE 4-4 shows the creation of a JMX connector server server, the obtention of a pointer to the LDAP server root directory root and the creation of a URL for server named address. The root directory, the URL and an agent name are passed as parameters to register() and are registered in the LDAP server.

Client.java

The JNDI/LDAP lookup service Client.java class is shown in CODE EXAMPLE 4-1.

CODE EXAMPLE 4-1 JNDI/LDAP Lookup Service Example Client.java

[...]

public class Client {

   private static boolean debug = false;

   public static void listAttributes(DirContext root, String dn)
     throws NamingException {
     final Attributes attrs = root.getAttributes(dn);
     System.out.println("dn: " + dn);
     System.out.println("attributes: " + attrs);
   }

   public static DirContext getRootContext() throws NamingException {
      final Hashtable env = new Hashtable();
      // Prepare environment map
      [...]

      InitialContext root = new InitialLdapContext(env,null);
      return (DirContext)(root.lookup(""));
   }

   // Confirm URL has not expired
  [...]

   public static List lookup(DirContext root, String protocolType,
                             String name)
      throws IOException, NamingException {
      final ArrayList list = new ArrayList();
      String queryProtocol =
         (protocolType==null)?"":"(jmxProtocolType="+protocolType+")";
      String query =
          "(&" + "(objectClass=jmxConnector) " +
          "(jmxServiceURL=*) " +
          queryProtocol +
          "(jmxAgentName=" + ((name!=null)?name:"*") + "))";

      SearchControls ctrls = new SearchControls();
      ctrls.setSearchScope(SearchControls.SUBTREE_SCOPE);
      final NamingEnumeration results = root.search("", query, ctrls);
      while (results.hasMore()) {
           final SearchResult r = (SearchResult) results.nextElement();
           debug("Found node: " + r.getName());
           final Attributes attrs = r.getAttributes();
           final Attribute attr = attrs.get("jmxServiceURL");
           if (attr == null) continue;
           final Attribute exp = attrs.get("jmxExpirationDate");
           if ((exp != null) && hasExpired((String)exp.get())) {
               System.out.print(r.getName() + ": ");
               System.out.println("URL expired since: " + exp.get());
               continue;
           }
           final String urlStr = (String)attr.get();
           if (urlStr.length() == 0) continue;

           debug("Found URL: "+ urlStr);

           final JMXServiceURL url = new JMXServiceURL(urlStr);
           final JMXConnector conn =
               JMXConnectorFactory.newJMXConnector(url,null);
           list.add(conn);
           if (debug) listAttributes(root,r.getName());
      }

      return list;

   }
}

In CODE EXAMPLE 4-1, the Client firstly returns a pointer root to the LDAP directory DirContext, then it searches through the directory for object classes of the type jmxConnector. The service URL and expiry date attributes, attr and exp respectively, for the jmxConnector object classes are obtained, exp is checked to make sure that the URL has not expired and a call is made to JMXConnectorFactory to create a new connector conn. The connector conn is added to the list of connectors and is used to access the MBeans in the MBean server created by Server.

jmx-schema.txt

The jmx-schema.txt file is the LDAP schema file for the JMX Remote API.

60jmx-schema.ldif

The 60jmx-schema.ldif file is an ldif file corresponding to the LDAP schema file, jmx-schema.txt, for JMX technology. If you are using Sun ONE Directory Server, this file can be copied directly to the config/schema directory of the Sun ONE Directory Server (see Section "Setting up the JNDI/LDAP Lookup Service Example").

Running the JNDI/LDAP Lookup Service Example

In addition to the actions you performed in Section "Initial Configuration", before you can run the lookup service examples that use the JNDI/LDAP lookup service, you must perform some further initial actions that are specific to this example. You can then start looking up connectors using the JNDI/LDAP network technology, in conjunction with the two connectors supported by the JMX technology.

When you run the examples, to help you keep track of which agent has been created with which transport, the agent names include a letter suffix that is the same as the lettering of the corresponding section. For example, the agent from Section a. "RMI connector over JRMP, without an external directory." is called example-server-a.

Setting up the JNDI/LDAP Lookup Service Example

The following steps are required by all of the different connector/transport combinations you can run in this example.

  2. Stop the LDAP server you started in Section "Initial Configuration".

    Do this according to the type of LDAP server you are using.

  3. Copy the JMX technology schema into your LDAP server’s schema directory.

    For example, if you are using Sun ONE Directory Server 5.0, you would type:

    $ cp 60jmx-schema.ldif /var/ds5/slapd-<hostname>/config/schema

    Otherwise, do this according to the type of LDAP server you are using.

  4. Restart the LDAP server.

    Do this according to the type of LDAP server you are using.

  5. Define the root under which the Server will register its service URL.

    You must provide the Server with the path to the domain component suffix dc=Test that you created in Section "Initial Configuration".

    $ provider="ldap://$ldaphost:$ldapport/dc=Test"

  6. Compile the Client and Server classes.

    $ javac -d . Server.java Client.java

Running the JNDI/LDAP Lookup Service Example With an RMI Connector

This example demonstrates the use of the JNDI/LDAP lookup service to look up RMI connector servers that use RMI’s default transport, JRMP, as well as the IIOP transport. In addition, as described in Section "Initial Configuration", different external directories are used to register the RMI connector stubs.

The combinations of transports and external directories demonstrated here are:

  • RMI connector over the JRMP transport, with:
  • No external directory
  • An RMI registry
  • An LDAP registry
  • RMI connector over the IIOP transport, with:
  • No external directory
  • A CORBA naming service
  • An LDAP registry
  2. Start the Server.

    The command you use to start the Server varies according to which external directory you are using. You can start one or more of the following instances of Server with different transports and external registries before starting the Client.

    2. RMI connector over JRMP, without an external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-a \
  -Durl="service:jmx:rmi://" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • debug is set to true to provide more complete screen output when the Server runs.
      • The name of the agent to be created is example-server-a.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies that the chosen connector is an RMI connector, running over the RMI default transport JRMP.

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the JNDI/LDAP lookup service.

    3. RMI connector over JRMP, using an RMI registry as an external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-b \
  -Durl="service:jmx:rmi:///jndi/${jndirmi}/server" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • The name of the agent created is example-server-b.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub, server, is stored is the RMI registry you identified as jndirmi in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the JNDI/LDAP lookup service.

    4. RMI connector over JRMP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-c \
  -Durl="service:jmx:rmi:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • The name of the agent created is example-server-c.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies the chosen connector as RMI over JRMP, and the external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the JNDI/LDAP lookup service under the agent name example-server-c.

    5. RMI connector over IIOP, without an external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-d \
  -Durl="service:jmx:iiop://" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • The name of the agent created is example-server-d.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies that the chosen connector is an RMI connector, running over IIOP.

      When the Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its automatically generated URL in the JNDI/LDAP lookup service.

    6. RMI connector over IIOP, using CORBA naming as the external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-e \
  -Durl="service:jmx:iiop:///jndi/${jndiiiop}/server" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • The name of the agent created is example-server-e.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies the chosen connector as RMI connector over IIOP, and the external directory in which the RMI connector stub, server, is stored is the CORBA naming service you identified as jndiiiop in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the JNDI/LDAP lookup service under the name example-server-e.

    7. RMI connector over IIOP, using LDAP as the external directory.

      Start Server by typing the following command:

$ java -classpath . -Ddebug=true \
  -Dagent.name=example-server-f \
  -Durl="service:jmx:iiop:///jndi/${jndildap}/cn=x,dc=Test" \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Server &

      In this command:

      • The name of the agent created is example-server-f.
      • The URL, provider, that points to the domain component suffix in which the agent will be registered, is given.
      • The common name attribute principal and password credentials are given to gain access to the LDAP server.
      • The service URL specifies the chosen connector as RMI over IIOP, and the external directory in which the RMI connector stub is stored is the LDAP server you identified as jndildap in Section "Initial Configuration".

      When Server is launched, you will see confirmation of the creation of the RMI connector, and the registration of its URL in the JNDI/LDAP lookup service under the agent name example-server-f.

    • Start the Client.

    • After starting the Server using the transport and external directory of your choice, start the Client:

$ java -classpath . -Ddebug=true \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  jndi.Client

      You will see output confirming the detection of the agents created by the Server and registered in the lookup service. You will also see the identification and confirmation of the connection made to the agents.

      To look up a specific agent, type the following command:

$ java -classpath . -Ddebug=true \
  -Djava.naming.provider.url="$provider" \
  -Djava.naming.security.principal="$principal" \
  -Djava.naming.security.credentials="$credentials" \
  -Dagent.name=agentName \
  jndi.Client

      In the command shown above, agentName is the name of the agent you want to look up. You can also specify a partial agent name by using *; for example, x* for all agent names beginning with the letter x.

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

The Java Management Extensions (JMX) Technology Tutorial provides examples of how to use the main features of the JMX technology that is provided with the Java Platform, Standard Edition .

Before You Read This Book

The Java Management Extensions (JMX) Technology Tutorial demonstrates the concepts and technology that are introduced in the Java Management Extensions (JMX) Technology Overview. You should, therefore, read the overview before attempting to work through this tutorial. To make full use of the information in this tutorial, you should be familiar with the following protocols and specifications:

  • Remote Method Invocation (RMI)
  • Lightweight Directory Access Protocol (LDAP)
  • Service Location Protocol (SLP)
  • JiniTM Network Technology
  • Java Naming and Directory InterfaceTM (JNDI) API
  • Java Secure Socket Extension (JSSE)
  • Java Authentication and Authorization Service (JAAS)

How This Book Is Organized

This tutorial provides examples in broad categories, presented in the following chapters.

  • Chapter 1, "Getting Started" gives you some initial configuration information.
  • Chapter 2, "Essentials of the JMX API" introduces the core notions of the JMX specification.
  • Chapter 3, "JMX Connectors" provides examples of how to implement the standard and dynamic types of MBean, and perform operations on them both locally and remotely.
  • Chapter 4, "Lookup Services" demonstrates the lookup services that can be used in conjunction with the JMX technology.
  • Chapter 5, "Security" shows some examples of security configurations.

Related Documentation

This tutorial is accompanied by the following documents:

  • Java Management Extensions Technology Overview
  • Java Management Extensions Specification 1.4

About This Tutorial

As previously stated, this tutorial demonstrates some of the concepts that are described in the Java Management Extensions (JMX) Technology Overview. This tutorial is intended to be read in order, from beginning to end, working through the examples as you go. Actions you perform at the beginning of the tutorial might be required parts of subsequent examples. Consequently, starting mid-way through the tutorial might cause you to skip actions required by certain examples.

Where you are required to perform a task, the instructions are presented in bold text and marked with an action number; sub-tasks are marked with a lower-case letter, as shown in the following example:

  2. Perform a task.

    Description of how to perform that task.

    2. Perform a sub-task.

      Description of how to perform that sub-task.

    • Perform another task.

    • And so on

Typographic Conventions

Typeface | Meaning | Examples
AaBbCc123 | The names of commands, files, and directories; on-screen computer output | Edit your .login file. Use ls -a to list all files. % You have mail.
AaBbCc123 | What you type, when contrasted with on-screen computer output | % su Password:
AaBbCc123 | Book titles, new words or terms, words to be emphasized Command-line variable; replace with a real name or value | Read Chapter 6 in the User’s Guide. These are called class options. You must be superuser to do this. To delete a file, type rm filename.

Shell Prompts

Shell | Prompt
C shell | machine_name%
C shell superuser | machine_name#
Bourne shell and Korn shell | $
Bourne shell and Korn shell superuser | #

Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Skip navigation bar
Contents | Previous | Next Java Management Extensions (JMX) Technology Tutorial

Chapter 5

Security

This chapter gives examples of how to set up the JMX technology security features, as described in the following sections:

  • Section "Simple Security" presents examples of connectors that implement straightforward security based on password authentication and file access control.
  • Section "Subject Delegation" presents examples of connectors that use the subject delegation model to perform operations on a given authenticated connection on behalf of several different identities.
  • Section "Fine-Grained Security" presents examples of connectors that implement more sophisticated security mechanisms, in which permission to perform individual operations is controlled.

Caution: Applications should prompt the user to enter passwords rather than expecting the user to provide them on the command line. Use secure authentication mechanisms in production systems.

Simple Security

The simplest type of security you can use with the JMX technology is based upon encryption, user name and password authentication, and file access control.

RMI Connectors With Simple Security

You can find an example of an RMI connector with simple security in the directory work_dir/jmx_examples/Security/simple.

  2. Open the work_dir/jmx_examples/Security/simple directory.

    Inside this directory you will find the following directories:

    • /server, containing the fileServer.java
    • /config, containing the security configuration files:
    • access.properties
    • keystore
    • password.properties
    • truststore
    • /mbeans, containing the following files:
    • SimpleStandardMBean.java
    • SimpleStandard.java
    • /client, containing the following files:
    • Client.java
    • ClientListener.java
  3. Open all the *.java and *.properties files in a text editor

    These files will be analyzed in the following sections.

Server.java

The Server.java class is shown in CODE EXAMPLE 5-1.

CODE EXAMPLE 5-1 RMI Connector Example (Simple Security) Class Server.java

public class Server {

  public static void main(String[] args) {
  try {
       MBeanServer mbs = MBeanServerFactory.createMBeanServer();

       HashMap env = new HashMap();

       SslRMIClientSocketFactory csf =
                  new SslRMIClientSocketFactory();
       SslRMIServerSocketFactory ssf =
                  new SslRMIServerSocketFactory();
       env.put(RMIConnectorServer.
                  RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,csf);
       env.put(RMIConnectorServer.
                  RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE,ssf);

       env.put("jmx.remote.x.password.file",
                 "config" + File.separator + "password.properties");
       env.put("jmx.remote.x.access.file",
                 "config" + File.separator + "access.properties");

       JMXServiceURL url = new JMXServiceURL(
        "service:jmx:rmi:///jndi/rmi://localhost:9999/server");
         JMXConnectorServer cs =
            JMXConnectorServerFactory.newJMXConnectorServer(url,
                                                            env,
                                                            mbs);
       cs.start();
     } catch (Exception e) {
       e.printStackTrace();
     }
  }
}

The Server class shown in CODE EXAMPLE 5-1 creates an MBean server mbs, and populates an environment map env with a secure RMI client socket factory csf, a secure RMI server socket factory ssf, and the properties files password.properties and access.properties.

The properties file password.properties contains a username and password and is accessed using the JMX Remote API interface JMXAuthenticator. Using the property jmx.remote.x.password.file is the same as creating a password-based JMXAuthenticator and passing it into the environment map through the jmx.remote.authenticator property.

The properties file access.properties contains a username and a level of access permission that can be either readwrite or readonly. This represents the level of access this user can have to MBean server operations. This file-based access control is implemented using the JMX technology interface MBeanServerForwarder, which wraps the real MBean server inside an access controller MBean server. The access controller MBean server only forwards requests to the real MBean server after performing the appropriate checks.

Server creates a JMX service URL, named url, for an RMI connector that will operate over the default JRMP transport, and register an RMI connector stub in an RMI registry on port 9999 of the local host.

The MBean server mbs, the environment map env and the service URL url are all passed to JMXConnectorServer to create a new, secure JMX connector server named cs.

SimpleStandardMBean.java

The SimpleStandardMBean class defines the same straightforward MBean interface as was used in Chapter 3, "JMX Connectors".

SimpleStandard.java

The SimpleStandard class defines the same straightforward MBean as was used in Chapter 3, "JMX Connectors".

ClientListener.java

The ClientListener class defines the same straightforward notification listener as was used in Chapter 3, "JMX Connectors".

Client.java

The Client.java class is shown in CODE EXAMPLE 5-1.

CODE EXAMPLE 5-1 RMI Connector Example (Simple Security) Class Client.java

public class Client {

  public static void main(String[] args) {
  try {
      HashMap env = new HashMap();

      String[] credentials = new String[] { "username" , "password" };
      env.put("jmx.remote.credentials", credentials);
      JMXServiceURL url = new JMXServiceURL(
         "service:jmx:rmi:///jndi/rmi://localhost:9999/server");
      JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
      MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
      String domains[] = mbsc.getDomains();
      for (int i = 0; i < domains.length; i++) {
         System.out.println("Domain[" + i + "] = " + domains[i]);
      }

      ObjectName mbeanName =
          new ObjectName("MBeans:type=SimpleStandard");
      mbsc.createMBean("SimpleStandard", mbeanName, null, null);
      // Perform MBean operations
      [...]

      mbsc.removeNotificationListener(mbeanName, listener);
      mbsc.unregisterMBean(mbeanName);
      jmxc.close();
    }  catch (Exception e) {
      e.printStackTrace();
    }
  }
}

The Client class shown in CODE EXAMPLE 5-1 populates an environment map env with a set of credentials, namely the username and password expected by the Server. These credentials are then given to an instance of JMXConnector named jmxc when the service URL of the connector stub and the environment map are passed to JMXConnectorFactory.connect(). Through jmxc, the Client connects to the MBean server started by Server, and performs MBean operations.

When the connection is established, the credentials supplied in the environment map env are sent to the server. The server then calls the authenticate() method of the JMXAuthenticator interface, passing the client credentials as parameters. The authenticate() method authenticates the client and returns a subject that contains the set of principals upon which the access control checks will be performed.

Running the RMI Connector Example With Simple Security

To run the RMI connector example with simple security, perform the following steps:

  • $ javac
      mbeans/SimpleStandard.java \
      mbeans/SimpleStandardMBean.java \
      server/Server.java \
      client/Client.java \
      client/ClientListener.java
  • Start an RMI registry on port 9999 of the local host.
  •
$ export CLASSPATH=server ; rmiregistry 9999 &
  • Start the Server.
  •
$ java -classpath server:mbeans \
     -Djavax.net.ssl.keyStore=config/keystore \
     -Djavax.net.ssl.keyStorePassword=password \
     Server &

    You will see confirmation of the creation of the MBean server and of the RMI connector.

  • Start the Client.
  •
$java -classpath client:server:mbeans \
     -Djavax.net.ssl.trustStore=config/truststore \
     -Djavax.net.ssl.trustStorePassword=trustword \
     Client

    You will see confirmation of the creation of the connector client, the various MBean operations followed by the closure of the connection.

    As you can see, all the above appears to proceed in exactly the same manner as the basic RMI connector example shown in Chapter 3, "JMX Connectors". However, if you were to open password.properties and change the password, you would see a java.lang.SecurityException when you launched the Client, and the connection would fail.

    Subject Delegation

    If your implementation requires the client end of the connection to perform different operations on behalf of multiple users or applications, using the security mechanisms demonstrated in Section "Simple Security", each different user would require one secure connection for every operation it performs. If you expect your connector clients to interact with numerous users, you can reduce the load on your system by implementing subject delegation. Subject delegation establishes a single secure connection for a user, and this connection can be used to perform related operations on behalf of any number of users. The connection itself is made by an authenticated user. If the authenticated user has been granted a SubjectDelegationPermission that allows it to act on behalf of another user, then operations can be performed over the connection on behalf of that user.

    Secure RMI Connectors With Subject Delegation

    You can find an example of a secure RMI connector that implements subject delegation in the directory work_dir/jmx_examples/Security/subject_delegation.

    2. Open the work_dir/jmx_examples/Security/subject_delegation directory

      Inside this directory you will find the following directories:

      • /server, containing the file Server.java:
      • /config, containing the security configuration files:
      • access.properties
      • java.policy
      • password.properties
      • /mbeans, containing the following files:
      • SimpleStandardMBean.java
      • SimpleStandard.java
      • /client, containing the following files:
      • Client.java
      • ClientListener.java
    3. Open all the *.java and *.properties files in a text editor

      These files will be analyzed in the following sections.

    Server.java

    The Server.java class is shown in CODE EXAMPLE 5-1:

    CODE EXAMPLE 5-1 Secure RMI Connector (Subject Delegation) Example Class Server.java

public class Server {

   public static void main(String[] args) {
     try {
          MBeanServer mbs = MBeanServerFactory.createMBeanServer();
          HashMap env = new HashMap();
          env.put("jmx.remote.x.password.file",
                  "config" + File.separator + "password.properties");
          env.put("jmx.remote.x.access.file",
                  "config" + File.separator + "access.properties");

          JMXServiceURL url = new JMXServiceURL(
             "service:jmx:rmi:///jndi/rmi://localhost:9999/server");
          JMXConnectorServer cs =
              JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
          cs.start();
     } catch (Exception e) {
          e.printStackTrace();
     }
   }
}

    CODE EXAMPLE 5-1 begins with the creation of an MBean server mbs, and the population of an environment map env with a password file and an access file, called password.properties and access.properties respectively:

    • The password file contains a username and password combination that is used to authenticate users that try to make connections.
    • The access file contains a user name and access level combination that is used to authorize access to the MBeans in the MBean server. The access level is either readwrite or readonly.

    The Server then creates a connector server named cs, and starts it in exactly the same way as in the previous RMI connector examples.

    java.policy

    The java.policy file grants to username a SubjectDelegationPermission so it can perform operations on behalf of the user delegate, an instance of JMXPrincipal created by the Client class. The java.policy file is required when launching the Server class.

    SimpleStandardMBean.java

    The SimpleStandardMBean class defines the same straightforward MBean interface as was used in the previous examples.

    SimpleStandard.java

    The SimpleStandard class defines the same straightforward MBean as was used in the previous examples.

    ClientListener.java

    The ClientListener class defines the same straightforward notification listener as was used in the previous examples.

    Client.java

    The Client.java class is shown in CODE EXAMPLE 5-1:

    CODE EXAMPLE 5-1 Secure RMI Connector (Subject Delegation) Example Class Client.java

public class Client {

  public static void main(String[] args) {
    try {
         HashMap env = new HashMap();
         String[] credentials = new String[] { "username" , "password" };
         env.put("jmx.remote.credentials", credentials);
         JMXServiceURL url = new JMXServiceURL(
            "service:jmx:rmi:///jndi/rmi://localhost:9999/server");
         JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
         Subject delegationSubject =
            new Subject(true,
                Collections.singleton(new JMXPrincipal("delegate")),
                Collections.EMPTY_SET,
                Collections.EMPTY_SET);

         MBeanServerConnection mbsc =
            jmxc.getMBeanServerConnection(delegationSubject);
         String domains[] = mbsc.getDomains();
         ObjectName mbeanName =
            new ObjectName("MBeans:type=SimpleStandard");
         mbsc.createMBean("SimpleStandard", mbeanName, null, null);
         // Perform MBean operations
         //

[...]
         mbsc.removeNotificationListener(mbeanName, listener);
         mbsc.unregisterMBean(mbeanName);
         jmxc.close();
     } catch (Exception e) {
         e.printStackTrace();
     }
  }
}

    CODE EXAMPLE 5-1 begins with the creation of an environment map env that is populated with a user name username and a password password. These strings match the user name and password stored in the password.properties file that is held by the Server to authenticate users accessing the connector server.

    A JMX technology connector client jmxc is created in the same way as in the previous RMI connector examples, with the user name and password passed into the environment map env.

    The Client then creates an instance of Subject, called delegationSubject, with a Principal that is an instance of JMXPrincipal, named delegate.

    An MBean server connection, named mbsc, is created by calling the getMBeanServerConnection() method of JMXConnector, with delegationSubject passed in as a parameter. This MBean server connection therefore allows operations to be performed on the remote MBean server on behalf of the principals stored in the delegationSubject, which in this example is the JMXPrincipal named delegate.

    The example continues by creating and registering the SimpleStandard MBean in the MBean server, and performing operations on it, in exactly the same way as in the previous examples.

    Running the Secure RMI Connector Example With Subject Delegation

    To run the secure RMI connector example with subject delegation, perform the following steps:

    $ javac  mbeans/SimpleStandard.java \
  mbeans/SimpleStandardMBean.java \
  server/Server.java \
  client/Client.java \
  client/ClientListener.java
    • Start an RMI registry on port 9999 of the local host.

    • $ export CLASSPATH=server ; rmiregistry 9999 &

    • Start the Server.
    • $ java -classpath server:mbeans \
  -Djava.security.policy=config/java.policy Server &

      You will see confirmation of the creation of the MBean server, the initialization of the environment map, the creation of the RMI connector, and the registration of the connector in the MBean server.

    • Start the Client.

    • $ java -classpath client:server:mbeans Client

      You will see confirmation of the creation of the connector client, the creation of the delegation subject, the connection to the MBean server and the various MBean operations followed by the closure of the connection.

      Fine-Grained Security

      You can implement a more fine-grained level of security in your connectors by managing user access through the Java Authentication and Authorization Service (JAAS) and Java platform Standard Edition (Java SE) Security Architecture. JAAS and Java SE security is based on the use of security managers and policy files to allocate different levels of access to different users. Consequently, you can decide more precisely which users are allowed to perform which operations.

      The two examples in this section are very similar to those shown in Section "Simple Security", with the difference being that the simple, file-based access control has been replaced by policy-based access control.

      RMI Connectors With Fine-Grained Security

      You can find an example of an RMI connector with fine-grained security in the directory work_dir/jmx_examples/Security/fine_grained.

      2. Open work_dir/jmx_examples/Security/fine_grained.

        Inside this directory you will find the following directories:

        • /server, containing the fileServer.java
        • /config, containing the security configuration files:
        • java.policy
        • keystore
        • password.properties
        • truststore
        • /mbeans, containing the following files:
        • SimpleStandard.java
        • SimpleStandardMBean.java
        • /client, containing the following files:
        • ClientListener.java
        • Client.java
      3. Open all the *.java and *.properties files in a text editor.

        The files will be analyzed in the following sections.Server.java

        The Server.java class used in this example is very similar to the one used in the RMI connector example with simple security. The only difference is that there is no access.properties file to map into the environment map in the fine-grained example. Otherwise, the two classes are identical.

        java.policy

        The java.policy file grants the following permissions:

        • All permissions to the server code base, so that the connector server can create the connectors, and then perform the operations requested by remote user calls
        • MBeanTrustPermission to the mbeans code base, allowing trusted MBeans to register in the MBean server
        • Permission to perform the various MBean and MBean server operations for the user represented by a JMXPrincipal named username.

        SimpleStandardMBean.java

        The SimpleStandardMBean class defines the same straightforward MBean interface as was used in the previous examples.

        SimpleStandard.java

        The SimpleStandard class defines the same straightforward MBean as was used in the previous examples.

        ClientListener.java

        The ClientListener class defines the same straightforward notification listener as as was used in the previous examples.

        Client.java

        The Client.java class is exactly the same as the one used in the RMI connector example with simple security.

        Running the RMI Connector Example With Fine-Grained Security

        To run the RMI connector example with fine-grained security, perform the following steps:

        $ javac
      mbeans/SimpleStandard.java \
      mbeans/SimpleStandardMBean.java \
      server/Server.java \
      client/Client.java \
      client/ClientListener.java
      4. Start an RMI registry on port 9999 of the local host.

        $ export CLASSPATH=server ; rmiregistry 9999 &

      5. Start the Server.
        $ java -classpath server:mbeans \
     -Djavax.net.ssl.keyStore=config/keystore \
     -Djavax.net.ssl.keyStorePassword=password \
     -Djava.security.manager \
     -Djava.security.policy=config/java.policy \
     Server &

        You will see confirmation of the initialization of the environment map, the creation of the MBean server and of the RMI connector.

      6. Start the Client.

$ java -classpath client:server:mbeans \
     -Djavax.net.ssl.trustStore=config/truststore \
     -Djavax.net.ssl.trustStorePassword=trustword \
     Client

        You will see confirmation of the creation of the connector client, the connection to the RMI server and the various MBean operations followed by the closure of the connection.

      Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Guidelines for LDAP Service Providers

Documentation Contents
JNDI Implementor Guidelines for LDAP Service Providers

Draft 0.4.2

Table of Contents
1. Introduction
2. Conformance
3. Environment Properties
4. Names
5. Attributes
6. URLs
7. Java Objects
8. Schema
9. Exceptions
10. API Mapping
11. Federation
12. SASL
13. Extensions and Controls
14. Event Notification
15. SSL

1. Introduction

This document specifies guidelines that developers creating LDAP service providers and service providers that support LDAP-like features should follow. By following these guidelines, developers can produce implementations that JNDI API users can configure and use with minimal differences.

Not all of the features described in this document must be supported by an LDAP service provider. However, if a feature is supported, it should be supported in the way described by this document.

2. Conformance

An LDAP service provider that supports LDAP version 3 (LDAPv3) conforms to:
  • RFC 2251 and related specifications.
An LDAP service provider that supports LDAP version 2 (LDAPv2) conforms to:
  • RFC 1777 and related specifications.

3. Environment Properties

Environment properties are the means by which JNDI application users configure and affect the behavior of JNDI service providers. Consequently, service providers must interpret and handle environment properties in the same way.

There are four types of environment properties that affect LDAP service providers:

  • Standard JNDI environment properties
  • LDAP-specific environment properties
  • Provider-specific environment properties
  • Feature-specific environment properties

3.1 Overview

3.1.1 Initialization

When creating an initial context, environment properties can be passed as an argument to the constructor or may be initialized as specified in the JNDI documentation.

In particular, if any of the following properties is not supplied in the environment properties then it is sought from the system properties, applet parameters, and both provider and application resource files (in that order):

  • java.naming.factory.control
  • java.naming.factory.initial
  • java.naming.factory.object
  • java.naming.factory.state
  • java.naming.provider.url
In the case of the control, object and state factory properties, if more than one occurrence of the property is located, then its values are concatenated into a single list. In the case of the url property and all other properties, only the first occurrence is used.

A context's environment properties can be examined using the Context.getEnvironment method.

3.1.2 Modification

A context's environment properties may be changed using the Context.addToEnvironment and Context.removeFromEnvironment methods.

3.1.3 Scope

With the exception of the java.naming.provider.url and java.naming.factory.initial properties, changing a property using the Context.addToEnvironment or Context.removeFromEnvironment methods affects the context instance on which the method is invoked. For example, if you specify new credentials for a context to use, subsequent methods invoked on that context that require communication with the server will use those new credentials (perhaps internally by first creating a new connection to the server). These updated environment properties are inherited by context instances that are subsequently derived from the affected context instance, but do not otherwise affect other context instances that were in existence prior to the update.

3.1.4 Timeliness

When a change is made to the environment properties, there is no requirement that the change be verified and acted upon at the time the Context.addToEnvironment or Context.removeFromEnvironment method is invoked. The only requirement is that the change (or changes) be effective the next time an operation that uses that property is invoked.

3.1.5 Defaults

This specification defines defaults for the environment properties. In a few cases, the default is determined by the service provider. If a context does not have a particular environment property, it behaves as if it has that environment property with its default value.

When a property is removed from the environment properties of a context, the context assumes the default behavior specified for that property. This does not necessarily mean that the default value must be recorded as the property's value. The removal may also be indicated by the absence of the property from the context's environment properties.

3.1.6 Acceptable Values

This specification defines acceptable values for the environment properties. Some environment properties have a fixed set of acceptable values while others have values that must follow a particular syntax. If an unacceptable value is presented, a property-specific exception will be thrown (for example, ConfigurationException, IllegalArgumentException, or AuthenticationNotSupportedException). In some cases, it might be reasonable for the service provider to accept additional values than those specified, in which case, those values should be documented.

3.2 JNDI Properties

LDAP service providers should process the JNDI environment properties according to the following specifications. In the examples given, env is an instance of Hashtable that holds the environment properties used to create an initial context.

java.naming.batchsize

The value of this property is a string of decimal digits that specifies the batch size of search results returned by the server.

This property affects the blocking behaviour of the Context.list, Context.listBindings, and DirContext.search methods and the NamingEnumeration objects that they return. It does not affect how many items are returned in the enumeration; it only affects how the items are batched or read at the LDAP protocol level.

A setting of zero means that the provider should block until all results have been received. A setting of an integer n greater than zero means that the provider should block until n results have been received from the server or until the enumeration terminates, whichever produces the fewer number of results. After the application has read n results (using NamingEnumeration.next or NamingEnumeration.nextElement), the provider should read n more results from the server or until the enumeration terminates, whichever produces the fewer number of results.

If this property is not set then its default value is implementation-specific.

For example, the following code specifies that the provider should block until 24 entries have been read from the server or until the enumeration terminates, whichever produces the fewer number of results:

env.put(Context.BATCHSIZE, "24");
java.naming.factory.control

The value of this property is a colon-separated list of fully qualified class names of control factory classes.

The factories are responsible for narrowing the class of response controls. They create specific response controls from the generic response controls generated by the provider.

No default value is defined for this property.

For example, the following code sets the ResponseControlFactory class as the control factory to try:

env.put(LdapContext.CONTROL_FACTORIES,
        "com.sun.jndi.ldap.ctl.ResponseControlFactory");
java.naming.factory.initial

The value of this property is the fully qualified class name of the factory class which creates the initial context for the LDAP service provider.

It is used to select a particular LDAP service provider; it's not actually used by the provider itself. This property need not be set when the name argument to initial context methods is a URL.

No default value is defined for this property.

For example, the following code selects Sun's LDAP provider:

env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.ldap.LdapCtxFactory");
java.naming.factory.object

The value of this property is a colon-separated list of fully qualified class names of object factory classes.

The factories are responsible for creating specific objects from the LDAP entries returned by the provider. For example, a Person object factory might generate a Person object from an LDAP entry of object class person. Object factories behave in the opposite way to state factories in that they generate objects from LDAP attributes.

No default value is defined for this property.

For example,

env.put(Context.OBJECT_FACTORIES,
        "com.sun.jndi.ldap.obj.PersonFromLDAP");
sets the PersonFromLDAP class as the object factory to try.
java.naming.factory.state

The value of this property is a colon-separated list of fully qualified class names of state factory classes.

The factories are responsible for creating an object's state (for storing) from the object itself. For example, a Person state factory might generate an LDAP entry of object class person from a Person object. State factories behave in the opposite way to object factories in that they generate LDAP attributes from objects.

No default value is defined for this property.

For example,

env.put(Context.STATE_FACTORIES,
        "com.sun.jndi.ldap.obj.PersonToLDAP");

sets the PersonToLDAP class as the state factory to try.

java.naming.language

The value of this property is a string language tag according to RFC 1766.

This property indicates a preference for a particular natural language. A provider may adjust its LDAP requests and responses according to the value of this property.
The affect of this property is implementation-specific. No default value is defined.
For example:
env.put(Context.LANGUAGE, "ja-JP");
indicates a preference for Japanese.
java.naming.provider.url

The value of this property is a list of space-separated LDAP or LDAPS URL strings, each of which specifies the hostname and port number of the LDAP server, and the root distinguished name of the naming context to use. An LDAP URL specifies the use of a plain (i.e., unprotected) connection; an LDAPS URL specifies the use of an SSL connection. If the list contains more than one URL, the provider should attempt to use each URL in turn until it is able to create a successful connection, and after creation, set the property to the successful URL.

The default hostname is localhost; the default port is 389 for plain connections and 636 for SSL connections. The default root distinguished name is the empty string. If this property is not set, or if either the hostname or port number is omitted, then the default values are used in place of the missing information. If both the hostname and port are missing but a non-empty distinguished name is present in the URL, then the provider should use the distinguished name to determine the hostname and port of the LDAP server(s) as described in the URLs section and when a connection has been established successfully, set the java.naming.provider.url property to a URL constructed using the successful hostname, port and distinguished name. See also the URLs section for information on how the provider should treat other information found in the URL.

For example:

env.put(Context.PROVIDER_URL, "ldap://secserver:636");
specifies that the LDAP server is running on a host named secserver at port 636.

NOTE: Changing this property using the Context.addToEnvironment or Context.removeFromEnvironment methods does not affect the context. It is only used by the initial context constructors.

java.naming.referral

The value of this property is a string that specifies how referrals shall be handled by the provider. The following values are defined for this property:

follow
automatically follow any referrals.
throw
throw a ReferralException for each referral.
ignore
ignore referrals if they appear in results. A PartialResultException is thrown to indicate an incomplete result. In addition, for LDAPv3 servers, the provider shall request that referrals be treated as ordinary attributes when they appear in entries. This is achieved by sending a non-critical ManageDsaIT (RFC 3296) LDAP control with each LDAP request. LDAP servers which do not support this LDAP control will simply ignore it and process the request as normal.

See the URLs section for information on how to treat multiple URLs found in a single referral entry.

If this property is not set then its default value is ignore.

For example:

env.put(Context.REFERRAL, "throw");
specifies that referrals encountered during an LDAP operation should throw a ReferralException to the application.
java.naming.security.authentication

The value of this property is a string that specifies the authentication mechanism(s) for the provider to use. The following values are defined for this property:

none
use no authentication (anonymous bind).
simple
use simple authentication (a cleartext password).
A space-separated list of one or more SASL mechanism names:
use the first available SASL mechanism in the list that conforms to the specified policy requirements

See the SASL section for information on how this property is used for SASL authentication. See RFC 2829 for information on LDAP authentication mechanisms.

If this property is not set then its default value is none, unless the java.naming.security.credentials property is set, in which case the default value is simple. If this property is set to a value that the provider does not recognize or support, it should throw AuthenticationNotSupportedException.

For example:

env.put(Context.SECURITY_AUTHENTICATION, "simple");
specifies that simple authentication be used to authenticate to the LDAP server. Or,
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5");
specifies that DIGEST-MD5 authentication be used and, if that SASL mechanism is unavailable, that CRAM-MD5 authentication be used. If neither is available then throw AuthenticationNotSupportedException.
java.naming.security.credentials
The value of this property is an object that specifies the credentials of the principal to be authenticated. Its format and handling depends on the value of the java.naming.security.authentication property.
For anonymous binds, this property is ignored - an empty string is always used for the credentials. For simple authentication and SASL authentication that requires a password, the value of this property may be supplied as a java.lang.String, a char[] or a byte[]. If it is a String or a char[] then it is encoded into a byte array using UTF-8 in the case of LDAPv3 and encoded using ISO-Latin-1 in the case of LDAPv2. If it is a byte[] then it is used as is.
See the SASL section for information on how this property is used for SASL authentication.
No default value is defined for this property.
For example:
env.put(Context.SECURITY_CREDENTIALS, "secret");
sets the credentials to be the string "secret".
java.naming.security.principal

The value of this property is a string that specifies the identity of the principal to be authenticated. Its format depends on the authentication type; see RFC 2829 for more information. The value is used as the name component in an LDAP ASN.1 BindRequest for non-SASL authentication. For SASL authentication, the value of this property is used as the authentication ID for SASL mechanisms that need an authentication ID.

The provider is not required to verify the validity of the principal name. It may, for example, just pass the string to be verified by the server. If the principal identified is not a valid principal then the provider shall throw an AuthenticationException.

No default value is defined for this property.

For example:

env.put(Context.SECURITY_PRINCIPAL, "cn=admin,o=sun,c=us");

sets the principal name to be the distinguished name "cn=admin, o=sun, c=us".

java.naming.security.protocol
The value of this property is a string that specifies the security protocol for the provider to use. The following value is defined for this property:
ssl
use Secure Sockets Layer version 3.0.

If this property is set to ssl, the provider must use SSL sockets, or throw ConfigurationException if it is unable to do so. In addition to the value listed above, a provider may support other security protocols. However, such provider-specific protocols might not be supported by all providers. If this property is set to a security protocol that the provider does not recognize or support, it should throw ConfigurationException.

If the java.naming.ldap.factory.socket property is set, then the socket factory identified by that property must create sockets that are appropriate for this protocol setting. For example, if the security protocol is set to ssl, then the socket factory must create SSL-compliant sockets.

If this property is not set then the default is to use no security protocol.

As a developer of the LDAP provider, you should be aware that using SSL to connect to a server on a port that is not listening for SSL connections causes the socket to hang. Similarly, using a plain socket to connect to a server that is listening for SSL connections also leads to hanging. This is a characteristic of the protocol that some implementations may choose to correct but is not otherwise required to do so. The provider's documentation, however, should describe this behavior to its users. See SSL for information on how to use SSL.

For example:

env.put(Context.SECURITY_PROTOCOL, "ssl");
specifies that SSL-compliant sockets be used to communicate with the server.

3.3 LDAP-specific Properties

LDAP-specific properties are environment properties that apply to LDAP service providers in general. These properties' names have the prefix "java.naming.ldap.". The following table lists LDAP-specific properties that have been defined so far.

java.naming.ldap.attributes.binary
The value of this property is a string of space-separated attribute names. It specifies attributes which have non-string syntax. It extends the provider's built-in list of non-string attributes (below). The value of an attribute that has non-string syntax is returned as a byte array (byte[]) instead of a String.
No default is defined. If this property is not set then only the following attributes are considered to have non-string syntax:
Attribute ID | OID | Reference
Any attribute ID with the ";binary" option.
photo | 0.9.2342.19200300.100.1.7 | RFC 1274
personalSignature | 0.9.2342.19200300.100.1.53 | RFC 1274
audio | 0.9.2342.19200300.100.1.55 | RFC 1274
jpegPhoto | 0.9.2342.19200300.100.1.60 | RFC 2798
javaSerializedData | 1.3.6.1.4.1.42.2.27.4.1.7 | RFC 2713
thumbnailPhoto | 2.16.128.113533.1.1400.1 | NAC LIP Schema
thumbnailLogo | 2.16.128.113533.1.1400.2 | NAC LIP Schema
userPassword | 2.5.4.35 | RFC 2256
userCertificate | 2.5.4.36 | RFC 2256
cACertificate | 2.5.4.37 | RFC 2256
authorityRevocationList | 2.5.4.38 | RFC 2256
certificateRevocationList | 2.5.4.39 | RFC 2256
crossCertificatePair | 2.5.4.40 | RFC 2256
x500UniqueIdentifier | 2.5.4.45 | RFC 2256
For example:
env.put("java.naming.ldap.attributes.binary",
        "mpegVideo myspecialkey");
informs the provider to return values of the mpegVideo and myspecialkey attributes as byte[].
java.naming.ldap.control.connect
The value of this property is a Control[] object. It sets the connection request controls that are active on a connection. See LdapContext.
No default value is defined for this property.
For example:
env.put("java.naming.ldap.control.connect",
        new Control[]{ new ManageReferralControl(true) });
sets a critical ManageDsaIT LDAP control as the connection request control.

java.naming.ldap.deleteRDN
The value of this property is a string that specifies whether the old RDN is removed by the Context.rename method. The following values are defined for this property:
true
delete the old RDN from the entry during the rename operation.
false
retain the old RDN as an attribute value of the entry.

If this property is not set then its default value is true.

For example:

env.put("java.naming.ldap.deleteRDN", "false");
causes the old RDN to be retained as an attribute of the renamed entry.

java.naming.ldap.derefAliases

The value of this property is a string that specifies how aliases are dereferenced during search operations. The following values are defined for this property:

always
always dereference aliases.
never
never dereference aliases.
finding
dereference aliases only during name resolution (that is, while locating the target entry).
searching
dereference aliases once name resolution has completed (that is, after locating the target entry).
If this property is not set then its default value is always.
For example:
env.put("java.naming.ldap.derefAliases", "searching");
causes the provider to dereference aliases only once the target entry has been located.

NOTE: this property is unrelated to the dereference-links flag in the SearchControls object.

java.naming.ldap.factory.socket
The value of this property is a string identifying the class name of a socket factory.
This property is used to override the default socket factory. The class specified in this property must implement the javax.net.SocketFactory interface. See JSSE Reference Guide for more information. See SSL for information on how to use SSL.
In addition, if the java.naming.security.protocol property is set, then the socket factory identified by this property must create sockets which are appropriate for that protocol setting. For example, if the security protocol is set to ssl then the socket factory must create SSL-compliant sockets.
No default is defined for this property.
For example:
env.put("java.naming.ldap.factory.socket",
        "javax.net.ssl.SSLSocketFactory");
sets the socket factory of the provider to be javax.net.ssl.SSLSocketFactory.

java.naming.ldap.ref.separator
The value of this property is a string containing the character to use when encoding a RefAddr object in the javaReferenceAddress attribute (see Java Objects).
This property is used to avoid a conflict in the case where the default separator character appears in the components of a RefAddr object.
If this property is not set then its default value is '#' (the hash character).
For example:
env.put("java.naming.ldap.ref.separator", ":");
specifies that the separator ':' (the colon character) be used when storing RefAddr instances.

java.naming.ldap.referral.limit
The value of this property is a string of decimal digits specifying the maximum number of referrals to follow in a chain of referrals. A setting of zero indicates that there is no limit.
If this property is not set then the default value is 10.
For example:
env.put("java.naming.ldap.referral.limit", "5");
specifies that the referral limit is 5.

java.naming.ldap.typesOnly
The value of this property is a string that specifies whether only attribute IDs are returned in results - attribute values are omitted. Affects the SearchResult.getAttributes and DirContext.getAttributes methods. The following values are defined for this property:
true
return only attribute IDs.
false
return both attribute IDs and attribute values.

If this property is not set then its default value is false.

For example:

env.put("java.naming.ldap.typesOnly", "true");
causes the server to return attribute IDs but not attribute values.
java.naming.ldap.version
The value of this property is a string that specifies the protocol version for the provider. The following values are defined for this property:
2
selects LDAP version 2 (LDAPv2).
3
selects LDAP version 3 (LDAPv3).

If this property is not set then the provider first attempts to bind using LDAP v3 and fails over to using LDAP v2 if a protocol error is received from the server. This failover mechanism is only used when the java.naming.security.authentication property indicates anonymous bind or simple authentication.

For example:

env.put("java.naming.ldap.version", "2");
requests the LDAP provider to communicate with the server using LDAPv2.

3.4 Feature-specific Properties

Feature-specific properties are environment properties which apply to a particular feature which is supported by a provider.

3.4.1 SASL Properties

There are two groups of SASL properties. The first group comprises those that relate to how the JNDI service provider interacts with the Java SASL API (JSR 28). These properties have the prefix "java.naming.security.sasl." The second group comprises those that affect the SASL mechanisms. These properties are specified in the Java SASL API and have the prefix "javax.security.sasl." See the SASL section and the Java SASL API for details about this second group of properties.

java.naming.security.sasl.authorizationId

The value of this property is a string that specifies the authorization ID for the SASL mechanisms.

If this property is not set, then the authorization ID passed to the SASL mechanisms is the empty string. According to SASL (RFC 2222), using an authorization ID of the empty string directs the server to derive an authorization ID from the client's authentication credentials.

For example:

env.put("java.naming.security.sasl.authorizationId",
        "dn:cn=administrators,ou=groups,o=sun,c=us");

specifies the identity to use for authorization (access control) upon successful authentication.

java.naming.security.sasl.realm

The value of this property is a string that specifies the realm information required by some SASL mechanisms such as DIGEST-MD5.

If this property is not set, then a mechanism-specific default such as that negotiated between the client and server during the authentication exchange is used.

For example:

env.put("java.naming.security.sasl.realm", "webusers");

specifies that the client wants to use the "webusers" realm for authentication.

java.naming.security.sasl.callback

The value of this property is an instance of javax.security.auth.callback.CallbackHandler. When the provider uses a SASL mechanism that requires callbacks, the SASL mechanism uses the object supplied in the property. The callback handler should satisfy a NameCallback by supplying the authentication ID.

If this property is not set, then the provider should use a default callback handler that satisfies the NameCallback using the value of the java.naming.security.principal property, satisfies the PasswordCallback using the value of the java.naming.security.credentials property, and satisfies the RealmCallback and RealmChoiceCallback (described in the Java SASL API) using the value of the java.naming.security.sasl.realm property.

For example:

env.put("java.naming.security.sasl.callback",
        new MyCallbackHandler());

supplies an instance of the callback handler for SASL mechanisms to use.

javax.security.sasl.qop

The value of this property is a ','-separated list of quality-of-protection (qop) values used to specify the client's qop preference. A qop value is one of

  • "auth" - authentication only
  • "auth-int" - authentication plus integrity protection
  • "auth-conf" - authentication plus integrity and confidentiality protection
The order of the list specifies the preference order. If this property is absent, the default qop is "auth".
javax.security.sasl.strength

The value of this property is a ','-separated list of cipher strength values used to specify the client's preference. A strength value is one of

  • "low"
  • "medium"
  • "high"
The order of the list specifies the preference order. If this property is absent, the default strength is "high,medium,low".

For privacy in DIGEST-MD5, "high" maps to "3des", "medium" to "rc4" or "des", and "low" to "rc4-56" or "rc4-40".

javax.security.sasl.maxbuffer

The value of this property is the string representation of an integer that specifies the maximum size of the receive buffer in bytes that the client is willing to receive. If this property is absent, the default size is defined by the SASL mechanism.

javax.security.sasl.server.authentication

The value of this property is either "true" or "false", specifying whether the server must authenticate to the client or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.forward

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must support forward secrecy between sessions or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.credentials

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must require client credentials or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noplaintext

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to simple plain passive attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noactive

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to active (non-dictionary) attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.nodictionary

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to dictionary attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noanonymous

The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not accept anonymous logins or not, respectively. If this property is absent, the default is "false".

3.5 Provider-specific Properties

Provider-specific properties are environment properties which apply only to particular provider implementations. The names of these properties are chosen by the provider's implementor. The recommended policy for naming these properties is to use the implementor's reversed DNS domain name to prefix the provider's package name and to use that package name to prefix the property name. For example, Sun prefixes its provider-specific LDAP properties with "com.sun.jndi.ldap".

4. Names

Names are handled by the provider's context methods according to the following rules:
  1. String names supplied as parameters to the context methods are in the composite name syntax.The first component of the composite name is an LDAP distinguished name while the rest of the components are used for federation.
  2. If a Name argument is a CompositeName object then its first component is assumed to be an LDAP distinguished name and the remaining components (if any) are used for federation.
  3. If a Name argument is not a CompositeName object then all of its components are assumed to be the parsed form of an LDAP distinguished name. That is, each Name component is an LDAP relative distinguished name (RDN).
  4. Names are parsed using the name parser returned by the Context.getNameParser method. The parser accepts LDAP distinguished names as String objects and produces LDAP distinguished names as Name objects.
  5. Names returned by context operations are string composite names or string URLs.
The syntax of string LDAP distinguished names follows RFC 2253. For example:
  • CN=Steve Kille, O=Isode Limited, C=GB
  • OU=Sales+CN=J. Smith, O=Widget Inc., C=US
  • CN=L. Eagle, O=Sue\, Grabbit and Runn, C=GB

The name supplied to an LDAP context is always relative to that context. For example, given an LDAP context (lctx) for "dc=widget,dc=com", in order to name LDAP entries in that subtree, a name relative to "dc=widget,dc=com" must be supplied. For example, the following call obtains the attributes for the "cn=John Smith,dc=widget,dc=com" entry.

Attributes attrs = lctx.getAttributes("cn=John Smith");

Similarly, when a context is enumerated using any of the enumeration methods (Context.list, Context.listBindings, DirContext.search), the names returned are relative to the target context--the context being enumerated. When referrals are invoked, instead of a relative name, an LDAP or LDAPS URL string containing the fully qualified name is returned. (If the enumeration was performed using a plain connection, an LDAP URL string is returned; if it was done using an SSL connection, an LDAPS URL string is returned.) The format of LDAP URLs is defined in RFC 2255.

LDAP URLs that follow RFC 2255 and LDAPS URLs may be supplied to any of the context methods. The hostname and port number are extracted from the URL and used to contact the LDAP server; the URL's scheme ("ldap" or "ldaps") is used to determine whether a plain or SSL connection is used. The java.naming.factory.initial and java.naming.provider.url properties are ignored. For example,

    DirContext ictx = new InitialDirContext();
    Attributes attrs = ictx.getAttributes(
        "ldap://wserver:389/cn=John Smith,dc=widget,dc=com");

This code fragment contacts the LDAP server at machine wserver at port 389 using a plain connection.

5. Attributes

The LDAP provider expects as input and returns as output all attribute values as either String or byte[] objects. See the java.naming.ldap.attributes.binary environment property for which ones are treated as byte[] and how to extend the list.

6. URLs

RFC 2255 describes the syntactic format of LDAP URLs. The format contains all the elements necessary to specify an LDAP search operation, with provisions for supporting extensions:
ldap://host:port/dn?attributes?scope?filter?extensions

Authentication information may be specified in the extensions portion of the URL. See the RFC for a complete description of the format.

In addition to LDAP URLs, the provider may also support the non-standard but widely used LDAPS URLs. LDAPS URLs use SSL connections instead of plain (i.e., unprotected) connections. They have a syntax similar to LDAP URLs except the schemes are different and the default port for LDAPS URLs is 636 instead of 389.

ldaps://host:port/dn?attributes?scope?filter?extensions

URLs play a role in several places in JNDI:

  1. Configuration of service providers.
    To configure an LDAP service provider, you typically supply one or more space-separated LDAP or LDAPS URLs in the java.naming.provider.url property. This is used by the LDAP service provider to configure its connection to the directory server. Only the host, port, and dn parts of the URL are relevant in this setting. Supplying other parts of the URL results in a ConfigurationException.
  2. Argument to initial context methods.
    If a URL string (with syntax scheme_id:rest_of_name) is passed to the methods in InitialContext, either as a String argument or as the first component of Name, the URL's scheme id is used to locate the context factory for handling that scheme. If none is found, the URL string is treated as an ordinary name and passed to the initial context specified by the java.naming.factory.initial property is used. See the java.naming.spi.NamingManager.getURLContext method for details on how URL context factories are located. Note that this support for URLs as names is only available in the initial context.

    With the exception of the search methods, when an LDAP or LDAPS URL is passed as a name to the initial context, the URL should not contain any query ('?') components. Otherwise, an InvalidNameException is thrown by the service provider. For the search methods, the query components of the URL override any corresponding components supplied as arguments. For example, if an LDAP URL containing a scope component is supplied, then that scope overrides any scope setting that may be passed in a SearchControls argument.

  3. Referrals.
    An LDAP referral contains a list of one or more URLs. To process an LDAP referral (either explicitly or implicitly by setting the java.naming.referral property), the service provider needs to use the information in the these URLs to create connections to LDAP servers to which they refer. When multiple URLs are present in a single referral they are treated as alternatives and each is followed until one succeeds. The complete URL (that is, including any query components) is used.
  4. Returned as a name in list and search enumerations.
    When the name of the entry being returned has a name that is not relative to the target context (i.e., the starting context for the list or search), the name is returned as a URL. See the NameClassPair.isRelative method for details.
  5. Argument to the getObjectInstance method of NamingManager or DirectoryManager.
    When an LDAP namespace is federated underneath another namespace (for example, such as DNS), the information that is stored in the superior namespace might be an LDAP or LDAPS URL. In such a scenario, a lookup/list/search operation in the superior namespace would return a Reference containing an LDAP or LDAPS URL for the LDAP namespace. The service provider for the superior namespace would pass the Reference to the getObjectInstance method to create an instance of an LDAP context.
For items (1), (2), (3), and (5), if the URL is missing the hostname and port but has a non-empty distinguished name, the provider should use the algorithm for discovering LDAP services with DNS as described in the Internet draft draft-ietf-ldapext-locate-08.txt. If the provider does not use this algorithm, or if the DNS configuration is not available, then the provider should use localhost as the hostname, and 389 as the port for plain connections, 636 as the port for SSL connections.

7. Java Objects

7.1 Storing

The LDAP provider should support the storing of Java objects into the directory. This is implemented in the following methods:
  • Context.bind()
  • Context.rebind()
  • DirContext.bind()
  • DirContext.rebind()
The provider should support at a minimum the storage of the following types of Java objects:
  1. Instances of Reference
  2. Objects that implement the Referenceable interface
  3. Objects that implement the Serializable interface
  4. Objects that implement the DirContext interface
It should check whether an object is in these four categories in the order listed because that is most likely to capture the intent of the client. For example, a Reference is Serializable, so if you performed the Serializable check first, no References would ever be stored in the reference format (that is, they would all be serialized).

References, referenceable and serializable objects should be stored according to RFC 2713. DirContext objects should be stored by storing their attributes.

When storing a reference's list of RefAddr into the javaReferenceAddress attribute, the separator to use for delimiting the address's position, type and content are controlled using the environment property java.naming.ldap.ref.separator. If this environment property is not specified, the hash character '#' should be used as the separator.

The provider uses the DirectoryManager.getStateToBind method when storing objects in the directory. This allows objects of any type to be transformed into one of the four categories listed above so that they can be stored into the directory.

7.2 Reading

Objects are read from the directory using the following operations:
  • Context.lookup()
  • Context.lookupLink()
  • Binding.getObject()
When the provider reads an entry from the directory, it will get LDAP attributes, and attributes defined in RFC 2713 if the entry has an associated Java object. If the entry contains Java object-related attributes, the provider should recreate the object using those attributes. Otherwise, the provider should return an instance of DirContext containing the attributes of the entry. For both DirContext and Java objects, the provider should then invoke DirectoryManager.getObjectInstance() on it and return the result to the caller.

8.0 Schema

JNDI does not specify schema-related details such as structure and contents of the schema tree, permission to modify to the contents of the schema tree, and the effect of such modifications on the directory are dependent on the underlying directory. JNDI specifies only that the root schema context--that returned by DirContext.getSchema()--contain the following bindings:
  • AttributeDefinition
  • ClassDefinition
  • SyntaxDefinition
This document specifies the structure and content of schema trees that are derived from LDAP-based schemas. It describes how the schema tree is laid out, and the mandatory and optional attributes that you can expect to find associated with entries in different parts of this schema tree.

Permission to modify the contents of the schema tree is determined by the directory administrator. When the schema tree is modified, the changes are made to schema stored on the directory server.

8.1 Schema Tree Structure

In addition to the three bindings in the root schema context listed previously, the root schema context may also contain the following four bindings:
  • MatchingRule
  • ExtensionDefinition
  • ControlDefinition
  • SASLDefinition

Name of Binding | Description of Binding
AttributeDefinition | Root of the attribute definition tree: a flat namespace with attributes identified by their name or OID.
ClassDefinition | Root of the "objectclass" definition tree: a flat namespace with object classes identified by their name or OID.
SyntaxDefinition | Root of the syntax definition tree: a flat namespace with syntaxes identified by their OID.
MatchingRule | Root of matching rule tree: a flat namespace with matching rules identified by their name or OID.
ExtensionDefinition | Root of the extensions tree: a flat namespace with extensions identified by their OID.
ControlDefinition | Root of the controls tree: a flat namespace with controls identified by their OID.
SASLMechanism | Root of the SASL tree: a flat namespace with SASL authentication mechanisms identified by their string name.

Any or all of these bindings may be absent if the underlying directory does not publish such schema information, or the service provider does not support retrieving them. If these names are present in the root schema context, however, they must have the binding specified in the above table.

The attribute names and values of these entries' attributes are case-insensitive.

8.2 Attribute Definitions

The name "AttributeDefinition" is bound to a context containing DirContext objects representing attribute definitions in the schema. For example, if a directory supports a "commonName" attribute, the "AttributeDefinition" context would have a binding with name "commonName" that is bound to a DirContext object.

Each object in the "AttributeDefinition" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | attribute's name
DESC | attribute's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SUP | name of superior attribute type from which this attribute's type is derived
EQUALITY | name or OID of matching rule if equality matching allowed, absent otherwise
ORDERING | name or OID of matching rule if ordering matching allowed, absent otherwise
SUBSTRING | name or OID of matching rule if substring matching allowed, absent otherwise
SYNTAX | numeric OID of syntax of values of this type
SINGLE-VALUE | "true" if attribute not multi-valued, "false" or absent otherwise.
COLLECTIVE | "true" if attribute is collective, "false" or absent otherwise.
NO-USER-MODIFICATION | "true" if not user-modifiable, "false" or absent otherwise.
USAGE | description of attribute usage

These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "AttributeTypeDescription." All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the "cn" attribute using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext cnSchema = schema.lookup("AttributeDefinition/cn");

If you then get the attributes of the "cnSchema" DirContext object, you would see:

NUMERICOID      2.5.4.3
NAME            cn
SYNTAX          1.3.6.1.4.1.1466.115.121.1.15
DESC            Standard Attribute, alias for commonName

An equivalent way of getting "cnSchema" is if you already have a "cn" attribute. The following code illustrates this alternative:

Attributes attrs = ctx.getAttributes("cn=John", new String[]{"cn"});
Attribute cnAttr = attrs.get("cn");
DirContext cnSchema = cnAttr.getAttributeDefinition();

8.3 Object Class Definitions

The name "ClassDefinition" is bound to a context containing DirContext objects representing object class definitions in the schema. For example, if a directory supports a "country" object class, the "ClassDefinition" context would have a binding with name "country" that is bound to a DirContext object.

Each object in the "ClassDefinition" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | object class's name
DESC | object class's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SUP | name of superior object class from which this object class is derived
ABSTRACT | "true" if object class is abstract, "false" or absent otherwise
STRUCTURAL | "true" if object class is structural, "false" or absent otherwise
AUXILIARY | "true" if object class is auxiliary, "false" or absent otherwise
MUST | a list of type names of attributes that must be present
MAY | a list of type names of attributes that may be present

These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "ObjectClassDescription." All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the "country" object class using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext countrySchema = schema.lookup("ClassDefinition/country");

If you then get the attributes of the "countrySchema" DirContext object, you would see:

NUMERICOID      2.5.6.2
NAME            country
MAY             aci, searchguide, description
MUST            objectclass, c
DESC            Standard ObjectClass
SUP             top

An equivalent way of getting "countrySchema" is if you already have a "country" object. The following code illustrates this alternative:

// Read object from directory
DirContext countryObj = (DirContext)ctx.lookup("c=us", new String[]{"country"});

// Get all of object's object class definitions
DirContext objClasses = countryAttr.getSchemaClassDefinition();

// Pick out "country" object class in particular
DirContext countryClass = (DirContext)objClasses.lookup("country");

NOTE: JNDI 1.1's specification of getSchemaClassDefinition() implies that the service provider should return any one of an object's object class definitions. This specification is inadequate because an object usually has multiple object classes and the application might require knowledge about any of those object classes depending on what it is doing. The proposal as illustrated by the example above is to return a context containing all of the object class definitions.

8.4 Syntax Definitions

The name "SyntaxDefinition" is bound to a context containing DirContext objects representing syntax definitions in the schema. For example, if a directory supports the "1.3.6.1.4.1.1466.115.121.1.15" syntax (Directory String) syntax, the "SyntaxDefinition" context would have a binding with name "1.3.6.1.4.1.1466.115.121.1.15" that is bound to a DirContext object.

Each object in "SyntaxDefinition" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
DESC | syntax's description

These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "SyntaxDescription." All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the "1.3.6.1.4.1.1466.115.121.1.15" syntax using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext dirStringSchema =
    schema.lookup("SyntaxDefinition/1.3.6.1.4.1.1466.115.121.1.15");

If you then get the attributes of the "dirStringSchema" DirContext object, you would see:

NUMERICOID      1.3.6.1.4.1.1466.115.121.1.15
DESC            Directory String

An equivalent way of getting "dirStringSchema" is if you already have an attribute that has that syntax (such as, the "country" attribute). The following code illustrates this alternative:

Attributes attrs = ctx.getAttributes("c=us", new String[]{"country"});
Attribute countryAttr = attrs.get("country");
DirContext dirStringSchema = countryAttr.getSyntaxAttributeDefinition();

8.5 Matching Rules

The name "MatchingRule" is bound to a context containing DirContext objects representing matching rules in the schema. A "matching rule" uniquely identifies the algorithm to use when comparing attribute values. For example, a directory might support a matching rule that is based on how a string sounds and define it as the "soundAlikeMatch" matching rule. Then, the "MatchingRule" context would have a binding with name "soundAlikeMatch" that is bound to a DirContext object.

When a matching rule is an extensible matching rule, it must also contain an "APPLIES" attribute listing the attributes to which this extensible matching rule can be applied.

Each object in "MatchingRule" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | name of matching rule
DESC | matching rule's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SYNTAX | numeric oid of syntax to which this rule applies
APPLIES | a list type names of attributes to which this extensible matching rule applies

These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "MatchingRuleDescription" and "MatchingRuleUseDescription." All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the "soundAlikeMatch" syntax using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext soundMatchSchema =
    schema.lookup("MatchingRule/soundAlikeMatch");

If you then get the attributes of the "soundMatchSchema" DirContext object, you would see:

NUMERICOID      1.2.3.4.5
NAME            soundAlikeMatch
SYNTAX          1.3.6.1.4.1.1466.115.121.1.15 (for directory string)
APPLIES         2.5.4.41, 2.5.4.15
DESC            Home-grown Phonetic match

8.6 Extension Definitions

The name "ExtensionDefinition" is bound to a context containing DirContext objects representing extensions supported by the server. For example, a directory might support the "Start TLS" extension ("1.3.6.1.4.1.1466.20037"). Then, the "ExtensionDefinition" context would have a binding with name "1.3.6.1.4.1.1466.20037" that is bound to a DirContext object.

Each object in "ExtensionDefinition" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
DESC | extension's description

All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the Start TLS extension ("1.3.6.1.4.1.1466.20037") using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext startTLSSchema =
    schema.lookup("ExtensionDefinition/1.3.6.1.4.1.1466.20037");

If you then get the attributes of the "startTLSSchema" DirContext object, you would see:

NUMERICOID      1.3.6.1.4.1.1466.20037
DESC            Start TLS (see RFC 2830)

8.7 Control Definitions

The name "ControlDefinition" is bound to a context containing DirContext objects representing controls supported by the server. For example, a directory might support the control for asking the server to sort the search results it returns.

Each object in "ControlDefinition" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (string)
DESC | control's description

All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the server-side sorting control ("1.2.840.113556.1.4.473") using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext svrSortSchema =
    schema.lookup("ControlDefinition/1.2.840.113556.1.4.473");

If you then get the attributes of the "svrSortSchema" DirContext object, you would see:

NUMERICOID      1.2.840.113556.1.4.473
DESC            server-side sorting of search results

8.8 SASL Mechanisms

The name "SASLMechanism" is bound to a context containing DirContext objects representing SASL authentication mechanisms supported by the server. For example, a directory might support the EXTERNAL SASL mechanism (RFC 2222) which requests that the server make use of security credentials exchanged by a lower layer.

Each object in "SASLMechanism" context has the following mandatory and optional attributes:

Attribute Identifier | Attribute Value Description
NAME (mandatory) | SASL mechanism's name
DESC | SASL mechanism's description

All the attribute values are represented by the java.lang.String class.

You can, for example, obtain the object representing the EXTERNAL SASL mechanism using the following code:

DirContext schema = ctx.getSchema(""); // get schema tree
DirContext saslExternalSchema =
    schema.lookup("SASLMechanism/EXTERNAL");
If you then get the attributes of the "saslExternalSchema" DirContext object, you would see:
NAME
EXTERNAL
DESC      EXTERNAL SASL mechanism (RFC
2222)

9. Exceptions

When building an LDAP provider, you need to translate LDAP error codes (see RFC 2251) into JNDI exceptions. You should use the following table when performing the translation. Furthermore, you should encode as much information as possible about the error into the exception's detailed message, "root cause" exception, resolved and remaining names. Note that resolved name and resolved object should correspond to each other's setting.
LDAP error code | Exception or Action
success (0) | Report success.
operationsError (1) | NamingException
protocolError (2) | CommunicationException
timeLimitExceeded (3) | TimeLimitExceededException
sizeLimitExceeded (4) | SizeLimitExceededException
compareFalse (5) | Used by DirContext.search() and does not generate an exception.
compareTrue (6) | Used by DirContext.search() and does not generate an exception.
authMethodNotSupported (7) | AuthenticationNotSupportedException
strongAuthRequired (8) | AuthenticationNotSupportedException
partialResults (9) | If java.naming.referral is set to ignore, or contents of error does not contain a referral, throw PartialResultException. Otherwise, use the contents to build a referral.
referral (10) | If java.naming.referral is set to ignore then throw PartialResultException. If it is set to throw then throw ReferralException. If it is set to follow then the provider shall follow the referral. If the value for java.naming.ldap.referral.limit is exceeded while following the referral then throw LimitExceededException.
adminLimitExceeded (11) | LimitExceededException
unavailableCriticalExtension (12) | OperationNotSupportedException
confidentialityRequired (13) | AuthenticationNotSupportedException
saslBindInProgress (14) | Used internally by LDAP provider during multi-stage SASL authentication.
noSuchAttribute (16) | NoSuchAttributeException
undefinedAttributeType (17) | InvalidAttributeIdentifierException
inappropriateMatching (18) | InvalidSearchFilterException
constraintViolation (19) | InvalidAttributeValueException
attributeOrValueExists (20) | AttributeInUseException
invalidAttributeSyntax (21) | InvalidAttributeValueException
noSuchObject (32) | NameNotFoundException
aliasProblem (33) | NamingException
invalidDNSyntax (34) | InvalidNameException
isLeaf (35) | Used by provider; usually doesn't generate exception.
aliasDereferencingProblem (36) | NamingException
inappropriateAuthentication (48) | AuthenticationNotSupportedException
invalidCredentials (49) | AuthenticationException
insufficientAccessRights (50) | NoPermissionException
busy (51) | ServiceUnavailableException
unavailable (52) | ServiceUnavailableException
unwillingToPerform (53) | OperationNotSupportedException
loopDetect (54) | NamingException
namingViolation (64) | InvalidNameException
objectClassViolation (65) | SchemaViolationException
notAllowedOnNonLeaf (66) | ContextNotEmptyException
notAllowedOnRDN (67) | SchemaViolationException
entryAlreadyExists (68) | NameAlreadyBoundException
objectClassModsProhibited (69) | SchemaViolationException
affectsMultipleDSAs (71) | NamingException
other (80) | NamingException

10. API Mapping

The methods of the JNDI API context interfaces are mapped onto LDAP operations as follows.
EventContext.addNamingListener
EventDirContext.addNamingListener
Register a listener for receiving naming events that take place in the specified subtree of LDAP entries. LDAP servers notify clients of events by means of LDAP controls attached to LDAP operation responses or by means of an LDAP unsolicited notifications. Such responses are then processed by the LDAP provider and indicated to the application in the form of NamingEvent or UnsolicitedNotificationEvent.
Context.addToEnvironment

Update context's environment properties. If multiple contexts share the same set of environment properties, the provider should take care to only modify the intended context's environment. Changing an environment property might require changes to the existing connection the context is using.

Supplying null for the property value has the same effect as removing the property.
For all environment properties, the new property is recorded even if it does not affect the context. See the Environment Properties section.
Context.bind

DirContext.bind
Perform an LDAP add operation to create a new entry in the directory. The DirContext.bind method can accept null as the object to bind if it is also supplied a non-null set of attributes. Otherwise, if the method is given insufficient information (i.e., no object or attributes), no entry can be added. If an object is provided in the arguments, then it is converted into attributes and stored in the entry along with any supplied attributes, as described in the Java Objects section. The provider should use the DirectoryManager.getStateToBind method to transform the input object into a form that it can store.
If the provider does not support binding any objects in the directory then it should throw OperationNotSupportedException. Otherwise, if it does support binding objects but does not support the supplied object then it should throw IllegalArgumentException.
Context.close
Release resources associated with context. For example, if the connection being used by this context is not shared with another context, the provider may abandon any outstanding requests and close the network connection to the server. Precisely which resources are released is implementation-dependent.
Context.composeName
If the parent context is from the same LDAP namespace, then concatenate the names according to the LDAP name syntax described in Context.getNameParser(). Otherwise, concatenate the names as composite names.
Context.createSubcontext

DirContext.createSubcontext
Perform an LDAP add operation to create the named entry and its associated attributes. If no attributes are supplied then the objectClass attribute is generated with the values top and javaContainer (javaContainer is a structural class that is necessary to avoid a schema violation error).
Context.destroySubcontext
Perform an LDAP delete operation to remove the named entry and its associated attributes. The named entry must be a leaf entry; subtrees are not removed. If the leaf entry does not exist (but its parent exists), the operation still succeeds.
LdapContext.extendedOperation
Perform an LDAP extended operation.
DirContext.getAttributes
Perform an LDAP base-object search operation to retrieve the LDAP entry's attributes. Use "(objectclass=*)" as the filter.
If the list of requested attributes is null or contains the special attribute identifier '*' then all the user attributes at the LDAP entry are returned. If operational attributes are required then those attribute identifiers must be present in the list of requested attributes.
LdapContext.getConnectControls
Retrieve the connection request controls in effect for LDAP bind operations invoked on this context.
Context.getEnvironment
Return the environment properties recorded at the context.
Context.getNameInNamespace
Return the LDAP distinguished name of the context.
Context.getNameParser
Return a name parser that parses LDAP names according to RFC 2253.
LdapContext.getRequestControls
Retrieve the request controls in effect for LDAP operations subsequently invoked on this context.
LdapContext.getResponseControls
Retrieve the response controls returned by the last LDAP operation invoked on this context.
DirContext.getSchema
See the Schema Section.
DirContext.getSchemaClassDefinition
See the Schema Section.
Context.list
Perform an LDAP one-level search operation of the named entry using the filter "(objectclass=*)" to retrieve the names of the entries immediately below the named entry.
Ask for, at a minimum, the javaClassName attributes so that the class name of each entry can be determined. If the class name cannot be determined, return javax.naming.directory.DirContext as the class name.
The names which are returned are either relative to the named context or they are LDAP or LDAPS URLs.
Context.listBindings
Perform an LDAP one-level search operation of the named entry using the filter "(objectclass=*)" to retrieve the attributes representing objects (or object references). Request the attributes for reconstructing the Java object and possibly other attributes as well. See Java Objects on how to reconstruct the object. If the object cannot be reconstructed according to RFC 2713 then return a DirContext object representing the LDAP entry. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.
The names which are returned are either relative to the named context or they are LDAP or LDAPS URLs.
Context.lookup

Context.lookupLink
Perform an LDAP base-object search operation of the named entry using the filter "(objectclass=*)". Request (possibly all) the attributes for reconstructing the Java object. See Java Objects on how to reconstruct the object. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.
DirContext.modifyAttributes
Perform an LDAP modify operation at the named entry using the supplied modifications. For the overloaded method that accepts an Attributes, first convert the Attributes argument into an ordered list of modifications by enumerating its contents using Attributes.getAll() and reusing the modification operation argument (mod_op).
LdapContext.newInstance
Initialize an new instance of this context with the specified request controls.
Context.rebind

DirContext.rebind
This method may involve several different LDAP operations. First get the existing entry's attributes. If the existing entry does not exist, this method behaves the same as bind(). Otherwise, if no attributes have been supplied and the object being bound is DirContext, invoke DirContext.getAttributes() and use the result as the attributes argument (attrs). If there are still no attributes, use the original entry's attributes as attrs. Remove the existing entry using the LDAP delete operation. Convert the object provided in the arguments into attributes (as described in the Java Objects section) and store in the entry along with attrs using the LDAP add operation. The provider should use the DirectoryManager.getStateToBind method to transform the input object into a form that it can store.
LdapContext.reconnect
Reconnect to the LDAP server using the supplied connection request controls and the current environment properties.
Context.removeFromEnvironment

Remove context's environment properties. If multiple contexts share the same set of environment properties, the provider should take care to only modify the intended context's environment. Changing an environment property might require changes to the existing connection the context is using.

For all environment properties, the new property is recorded even if it does not affect the context. Removing a property should cause the context to assume the property's default.
EventContext.removeNamingListener
Deregister a naming event listener so that subsequent events destined for that listener are not delivered.
Context.rename
Perform an LDAP modify DN operation to rename the entry. If LDAPv2 is being used then the new name and the old name must share the same immediate parent name. If the parents are not equal then throw InvalidNameException.
Note the effect of the java.naming.ldap.deleteRDN property on the behavior of this method.
DirContext.search
Perform an LDAP search operation according to the specified search controls.
If the list of requested attributes is null or contains the special attribute identifier '*' then all the user attributes at the LDAP entry are returned. If operational attributes are required then those attribute identifiers must be present in the list of requested attributes.
If objects are requested to be returned, then the Java object-related attributes (RFC 2713) are requested in addition to any requested by the API user. If these attributes are present then they are used to assemble the original objects (see Java Objects). If the object cannot be reconstructed according to RFC 2713 then return a DirContext object representing the LDAP entry. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.
The names which are returned are either relative to the named context or they are LDAP or LDAPS URLs.
The provider may use an LDAP compare operation instead of an LDAP search when the search filter supplied is suitably constrained:
  • The filter must be of the form "(<attributeID>=<value>)"
  • The scope must be object scope
  • Zero attributes must be requested (empty returning-attributes list)

In the forms of search that accept a string filter as argument, the syntax of the filter follows RFC 2254 with the exception that Unicode characters are also allowed. The use of Unicode characters is preferable to the use of encoded UTF-8 octets. The service provider is responsible for translating the Unicode characters into their corresponding UTF-8 representation for transmission to the server. For example, the Greek letter alpha can be specified in the string filter either as "\u03B1" or as "\\CE\\B1".

In the form search(Name, Attributes) and related methods, the Attributes argument is converted into a string filter by creating a conjunctive expression out of its elements. Each attribute value is treated as a literal; therefore '*' and other special characters defined in RFC 2254 that appear in the values of an attribute should be escaped according to the rules in RFC 2254. For example, an attribute value of '*' should be encoded as the string "\\2a".

In the form search(Name, String filterExpr, Object[] filterArgs) and its String overloaded method, "{num}" expansion is done in the filter by putting in values from filterArgs. Each "{num}" component may appear in the place of "attr" or "value" in Section 4 from RFC 2254.

The objects in filterArgs should be encoded in the following way:

  • byte arrays (byte[]) are encoded by encoding each byte as a string according to RFC 2254. For example, the array {0, 1, 10, 100} is encoded as the string "\\00\\01\\0a\\64".
  • Strings are treated as literals. In other words, '*' and other special characters defined in RFC 2254 that appear in the string are escaped according to the rules in RFC 2254. For example, a string of "*" is encoded as the string "\\2a".
  • Objects that are neither String nor byte[] are converted to their string form using Object.toString() and then the rules for String applied.
LdapContext.setRequestControls
Set the request controls for LDAP operations subsequently invoked on this context.
EventContext.targetMustExist
Determine whether a listener can register interest in an LDAP entry that doesn't exist.
Context.unbind
Perform an LDAP delete operation to remove the named entry. The named entry must be a leaf entry; subtrees are not removed. If the leaf entry does not exist (but its parents exist), the operation still succeeds.

11. Federation

The LDAP service provider should support federation using strong separation and either or both of junctions or implicit next naming system pointer.

12. SASL

The provider supports SASL mechanisms by means of the Java SASL API (JSR 28). This allows SASL mechanism drivers from different vendors to be used with the LDAP provider, and also allows a SASL mechanism driver to be used with different LDAP providers and even non-LDAP protocol libraries.

The Java SASL API depends on the Java Authentication and Authorization Service (JAAS), which provides callback support for SASL mechanisms that need to obtain or supply user/application information directly.

12.1 SASL Configuration

To specify that SASL authentication be used, you specify the official IANA-registered names of the SASL mechanisms in the java.naming.security.authentication property. The first SASL mechanism on the list that is both available and satisfies the optionally specified policies is used. That is, properties with the prefix "javax.security.sasl.policy." can be used to control the security characteristics of the selected SASL mechanism.

Some SASL mechanisms require the identity of the entity being authenticated. This is known as the authentication ID. Some SASL mechanisms, like DIGEST-MD5, require the use of a password and/or a realm. By default, the provider supplies the value of java.naming.security.principal property as the authentication ID to any SASL mechanism that requires the authentication ID, the value of the java.naming.security.credentials property as the password, and the value of the java.naming.security.sasl.realm property as the realm. To override these defaults, use the java.naming.security.sasl.callback property.

SASL mechanisms support the notion of authorization identity or authorization ID, which is the entity to which the server should grant access if the authentication succeeds. If the java.naming.security.sasl.authorizationId property has been set, then its value is used as the authorization ID. Otherwise, the empty string is used as the authorization ID, which directs the server to derive an authorization ID from the client's authentication credentials.

See SASL properties for a description of the properties used by an LDAP service provider for supporting SASL.

In addition to these properties, there might be properties required for specific SASL mechanisms. For example, a SASL mechanism that supports privacy and integrity needs to know the quality of protection that the client requires. Properties such as these are passed to the SASL mechanism via the environment properties. See the JNDI documentation for how to set environment properties.

For example, if the application needs privacy, it can do so by using a call such as:

env.put("javax.security.sasl.qop", "auth-conf");

before passing env to the initial context constructor. See the Java SASL API for details about these properties.

12.2 SASL Mechanism Drivers

The Java SASL API provides a framework for dynamically plugging in SASL mechanism drivers. The LDAP provider might provide a few default drivers. See the Java SASL API for details.

13. Extensions and Controls

The provider supports LDAP extensions and controls using the javax.naming.ldap package. In addition, the provider supports LDAP unsolicited notifications (which are transmitted in LDAP extended operation responses) using the services of the javax.naming.event package.

Several LDAP extensions and controls are defined by the IETF LDAPEXT working group.

The "Start TLS" extension ("1.3.6.1.4.1.1466.20037") is supported by the StartTlsRequest and StartTlsResponse classes. The LDAP provider must provide a concrete implementation of the abstract StartTlsResponse class and make its implementation available to the LDAP provider. See the description in StartTlsRequest.createExtendedResponse. Typically, the StartTlsResponse implementation would need access to the LDAP provider's data structures.

The LDAP service provider should perform hostname verification after Start TLS negotiation as specified in RFC 2830. If the LDAP server was discovered automatically by using information in DNS (as described in the URLs section), the provider should use the domain name derived from the distinguished name as the hostname to verify, as recommended by draft-ietf-ldapext-locate-08.txt.

14. Event Notification

The provider supports event notification using the javax.naming.event package.

A JNDI application can register for events that occur in the directory, such as the addition or removal of an entry, or the modification of an entry. Applications can also register for unsolicited notifications.

15. SSL

The provider supports SSL according to the Java Secure Socket Extension (JSSE) specification. SSL is activated by setting the java.naming.security.protocol environment property as follows:

env.put(Context.SECURITY_PROTOCOL,
"ssl");
and by selecting the hostname and port number of an LDAP server that supports SSL. Once an SSL connection has been established subsequent LDAP protocol exchanges take place over that secure connection.

If, in addition, LDAP authentication is also required then the java.naming.security.authentication, java.naming.security.principal, and java.naming.security.credentials environment properties should be set, as appropriate. If LDAP authentication is required and the SSL credentials should be reused for LDAP authentication then set the java.naming.security.authentication environment property to select the SASL EXTERNAL mechanism, as follows:

env.put(Context.SECURITY_AUTHENTICATION, "EXTERNAL");

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI Enhancements

Java SE 7 Enhancements
Java SE 6 Enhancements
Java SE 5.0 Enhancements
Java SE 1.4.1 Enhancements
Java SE 1.4 Enhancements
Java SE 1.3 Enhancements

Enhancements in Java SE 7

There were no enhancements in this release.

Enhancements in Java SE 6

There were no enhancements in this release.

Enhancements in Java SE 5.0

Support for retrieving an absolute name from the NameClassPair class
This feature enables getting the LDAP Distinguished Name from the SearchResult. To support this, two new methods have been added to the javax.naming.NameClassPair class:
  • getNameInNamespace()
  • setNameInNamespace()
Support for standard LDAP controls
The necessary LDAP controls are already supported in the LDAP Booster Pack extension package which is available for the JNDI/LDAP service provider. The LDAP controls have been recently standardized in RFCs. These are made available in the javax.naming.ldap package through the following classes.
  • ManageReferralControl (RFC 3296)
  • PagedResultsControl (RFC 2696)
  • PagedResultsResponseControl
  • SortControl (RFC 2891)
  • SortKey
  • SortResponseControl
  • BasicControl
Support for manipulation of LDAP names
This feature enables easy manipulation of LDAP Names to build distinguished names or relative distinguished names methodically, and enables formatting them into their strings representation as defined by RFC 2253. To support this, two new classes have been added to the javax.naming.ldap package.
  • LdapName
  • Rdn

Enhancements in Java SE 1.4.1

LDAP Service Provider
  • Support for LDAPS URLs.

Enhancements in Java SE 1.4.0

DNS Service Provider
  • Support for controlling timeouts when submitting UDP queries.
  • Support for automatic discovery of DNS service.
LDAP Service Provider
  • Support for connection pooling.
  • Support for automatic discovery of LDAP service via DNS.
  • Support for use of multiple URLs for configuration.

Enhancements in Java SE 1.3

DNS Service Provider
An Internet Domain Naming System (DNS) service provider has been added. This component enables applications to read data stored in the DNS.
Security Enhancements to the LDAP Service Provider
These enhancements bring the LDAP service provider in conformance with standard LDAP security requirements (RFC 2829) and promote better interoperability with widely deployed LDAP servers.
  • Support for the "Start TLS" (Transport Layer Security) extension (RFC 2830) and External SASL authentication mechanism. This enables applications to establish secure sessions over existing LDAP connections. This feature introduces two new classes.
    • javax.naming.ldap.StartTlsRequest
    • javax.naming.ldap.StartTlsResponse
  • Support for the GSS-API/Kerberos v5 SASL authentication mechanism (RFC 2222). This enables secure, authenticated access to the Windows 2000 and XP Active Directory servers.
  • Support for the Digest-MD5 SASL authentication mechanism (RFC 2831).

See the LDAP Service Provider documentation and the JNDI Tutorial for details and examples.

"corbaname" and "corbaloc" URL Support
The COS naming service provider supports the Interoperable Naming Service (INS) specification (99-12-03). This enables applications to use the "corbaname" URL from the initial context and to configure the provider by using the "corbaname" and "corbaloc" URLs.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI Interface-related APIs and Developer Guides

Documentation Contents

Java Naming and Directory Interface (JNDI)

The Java Naming and Directory Interface (JNDI) provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the API of the JNDI technology to access their services.

API and SPI Specification

  • JNDI API and SPI Specification - A list of the packages included in the JNDI technology.

Tutorials

  • Java Naming and Directory Interface Trail, part of the Java Tutorial.
  • JNDI Tutorial - A tutorial introduction to the JNDI technology with programming examples.

API Enhancements

  • See JNDI Enhancements

More Information

  • The JNDI Home Page
  • JNDI Architecture Documents:
    • JNDI API
    • JNDI SPI

  • JNDI Service Providers:
    To use JNDI with a particular naming or directory service, you need a JNDI service provider, which is a module that plugs in beneath the JNDI API to access the naming or directory service.
    The Java SE release includes the following service providers:
    • The LDAP Service Provider
    • The COS Naming Service Provider
    • The RMI Registry Service Provider
    • The DNS Service Provider
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI/COS Naming Service Provider

Documentation Contents

COS Naming Service Provider for the
Java Naming and Directory Interface (JNDI)

Table of Contents

  • Introduction
  • Conformance
  • Environment Properties
  • ORB Initialization
  • Root Naming Context Initialization
  • Names and URLs
  • API Mapping
  • Converting CORBA Programs to use JNDI
  • Security Considerations

Introduction

The Common Object Services (COS) Name Server is the name server for storing Common Object Request Broker Architecture (CORBA) object references. It can be accessed from CORBA applications by using the COS Naming package (org.omg.CORBA.CosNaming).

The JNDI/COS naming service provider implements the javax.naming.Context interface on top of the COS Naming package in order to allow applications to use JNDI to access the COS Name Server. JNDI can also be used to access other naming and directory services, in addition to the COS Name Server, thereby offering the CORBA application one interface for accessing different naming and directory services.

This document describes the features of the COS naming service provider and contains details of how JNDI is mapped to the COS naming package.

Conformance

The COS naming service provider for JNDI uses Java IDL, the Java programming language mapping to the industry standard Object Management Group Interface Definition Language (OMG IDL). In particular, it uses the COS Naming Service.

The complete specification for COS Naming can be obtained from OMG.

The syntax of names conforms to the Interoperable Naming Service (INS) specification (99-12-03), with backward compatibility support for the previous version of INS, OMG TC Document orbos/98-10-11. This is described in Names and URLs.

Environment Properties

The following JNDI environment properties are relevant for the COS naming service provider. See the JNDI documentation for a description of how properties are initialized using the environment properties, system properties, applet parameters, and resource files.

java.naming.factory.initial

This property is used to select the COS naming service provider; it's not actually used by the provider itself. It specifies the class name of the initial context factory for the provider.

For example:

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");

This property must be set if you are using the COS naming service as the initial context. The only exception is if you supply only URLs to the initial context, in which case, you don't need to specify this property. See Names and URLs for details.

java.naming.provider.url

This property is used to configure the root naming context and/or the Object Request Broker (ORB). Its value is the string representation of a URL.

If this property is not specified, then the ORB is initialized using the java.naming.corba.orb property, the java.naming.applet property, or other ORB initialization properties. The root naming context is obtained by invoking

orb.resolve_initial_references("NameService");

If the URL scheme is one of "IOR", "corbaname", or "corbaloc", as specified in the INS specification (99-12-03), then the root naming context is that named by the URL. The ORB is initialized using the java.naming.corba.orb property, the java.naming.applet property, or other ORB initialization properties.

If the URL scheme is either "iiop" or "iiopname", then the host and port fields of the URL are used to initialize the ORB. An "iiopname" URL must conform to the now obsolete INS specification (98-10-11). It has the form:

iiopname://[<addr_list>][/<cosnaming_name>]

The "iiop" URL scheme is supported for backward compatibility with an older version of the INS specification. It has the form:

iiop://[<host>[:<port>]][/<cosnaming_name>]

For both "iiop" and "iiopname" URLs, if <host> is not specified, then it defaults to "localhost" for an application and the applet's host for an applet. If <port> is not specified, then it defaults to 9999 for "iiopname", and 900 for "iiop". The root naming context is obtained by invoking the following method on the ORB:

orb.resolve_initial_references("NameService");

If <cosnaming_name> is nonempty, then the root naming context is the naming context named by cosnaming_name.

If the URL scheme is not one of "iiop", "iiopname", "IOR", "corbaname", or "corbaloc", then the URL must name a location that contains the stringified IOR of the root naming context. For example, if the property contains "file:/nsdir/ior", then the file /nsdir/ior must contain a stringified IOR. The URL scheme can be any for which there is a corresponding URL protocol handler ( java.net.URLStreamHandler). See the java.net.URL class for details. The stringified IOR is read from the data stream corresponding to the URL by using a character encoding of ISO Latin-1. The stringified IOR is the first line in the stream that contains the prefix "IOR:". For example, if the URL scheme is "http", then the headers in the stream are skipped and the first line that contains the prefix "IOR:" is returned as the IOR.

When the property specifies a stringified IOR or the location of one, the root naming context is that named by the stringified IOR. The ORB is initialized using the java.naming.corba.orb property, the java.naming.applet property, or other ORB initialization properties.

java.naming.corba.orb

This property specifies the ORB that the program is using. When the JNDI COS naming service provider needs to use an ORB, for example, to look up the "NameService" initial reference or to turn a stringified IOR into an object reference, it will use this ORB.

In an application you can set this property as follows:

ORB orb = ORB.init(args, null);
Hashtable env = new Hashtable(5, 0.75f);
env.put("java.naming.corba.orb", orb);
...
In an applet, you can set it as follows:
public class MyApplet extends Applet {

    public someInitMethod() {
        ORB orb = ORB.init(this, null);
        Hashtable env = new Hashtable(5, 0.75f);
        env.put("java.naming.corba.orb", orb);
        ...
    }
...
}

If this property is not set, then the java.naming.provider.url property, the java.naming.applet property, or the ORB initialization properties are used to initialize the ORB.

java.naming.applet

This property specifies the applet that the program is using. It is used to initialize the ORB to be used by the COS naming service provider. Its parameters are used for setting JNDI-related properties; see the JNDI documentation for details.

public class MyApplet extends Applet {

    public someInitMethod() {
        Hashtable env = new Hashtable(5, 0.75f);
        env.put("java.naming.applet", this);
        ...
    }
...
}

java.naming.factory.state

A colon-separated list of the fully qualified class names of state factory classes used to get an object's state for storing given the object itself. You can use this mechanism to transform an object into forms that can be stored into a COS name server. The COS name server supports storing CORBA objects.

A state factory that transforms a java.rmi.Remote into a CORBA object is supplied by default. This factory is useful for applications that use RMI-IIOP. You can supply other factories to affect the transformation of other objects into CORBA objects for storing. See javax.naming.spi.NamingManager.getStateToBind() for details.

java.naming.factory.object

A colon-separated list of the fully qualified class names of object factory classes for transforming a CORBA object. You can use this mechanism to transform an object into forms expected by the application. For example, a specialized object factory could do the appropriate narrowing to return an object of the expected type. See javax.naming.spi.NamingManager.getObjectInstance() for details.

java.naming.batchsize

Specifies the batch size to use in CosNaming::BindingIterator.next_n when getting the results of a list()/listBindings(). The default is "100." For example, the following sets the batch size to be 24.

env.put(Context.BATCHSIZE, "24");
ORB initialization properties

You can specify CORBA related properties such as those with the "org.omg.CORBA." prefix as properties. Properties of type String are used to initialize the ORB.

ORB Initialization

The properties that affect which ORB is used and how the ORB is initialized are:

  • java.naming.corba.orb

  • java.naming.applet

  • java.naming.provider.url
  • org.omg.CORBA.* and other ORB-specific properties of type String
The following algorithm is used to determine which ORB is used:
  1. If java.naming.corba.orb has been set, then its value (an ORB) is used.
  2. Otherwise, the provider will internally initialize and use an ORB as follows:
    a) Any org.omg.CORBA.* properties and properties of type String are extracted and used as part of the Properties argument to the ORB.init() method. You can use this mechanism to specify, for example, the ORB implementation or host to use.
    b) If java.naming.provider.url has been set and it contains a URL of scheme "iiop" or "iiopname", then the host and port number specified in the URL are used as part of the Properties argument to the ORB.init() method, overriding any org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort properties set up in (a).
    c) The Properties instance constructed in (a) and (b) are passed to ORB.init() along with the Applet instance in java.naming.applet property, or an empty String[] if java.naming.applet was not supplied.

If the properties employed in steps (a), (b) and (c) contain no relevant information for initializing the ORB, then the Java IDL implementation's defaults are used. Typically that means port 900 on the local host for an application, and port 900 on the applet host for an applet are used. Note that when the ORB is initialized using ORB.init(), its arguments are checked in the following order: (from org.omg.CORBA.ORB javadoc)

  1. Check in Applet parameter or application string array, if any
  2. Check in properties parameter, if any
  3. Check in the System properties (currently applications only)
  4. Fall back on a hardcoded default behavior (use the Java IDL implementation)

Root Naming Context Initialization

The root naming context is initialized either using the java.naming.provider.url property or by a resolve_initial_references() call on the ORB. If the java.naming.provider.url property is set but contains neither an "iiop" or "iiopname" URL, then it is assumed to contain a stringified IOR, a "corbaname" or "corbaloc" URL of an IOR, or a URL containing the location of a stringified IOR. The IOR is used to obtain the root naming context and must be that of a CORBA object of type CosNaming::NamingContext.

If the java.naming.provider.url has not been set, then the root naming context is obtained by invoking the following method on the ORB:

        orb.resolve_initial_references("NameService");

Names and URLs

String Names

String names accepted by the java.naming.Context methods are JNDI composite names in which each component is the stringified form of a CosNaming::NameComponent.

A CosNaming::Name contains a sequence of CosNaming::NameComponent. The stringified form of a component is the concatenation of the component's id, the kind separator character ('.'), and the component's kind. The occurrence of any meta characters ('.', '/', or '\') in either the id or kind is escaped using the escape character ('\'). The stringified form of a CosNaming::Name is defined in Section 3.5 of the INS specification (99-12-03).

The JNDI composite name syntax is very similar to, but not identical to, the INS syntax. There are minor differences with respect to the treatment of escape and quote characters. If you want to use names with the precise INS syntax, then you should use the overloads that accept a Name argument instead of a String argument. The Name argument should be a value returned by nameParser.parse(), where nameParser is a value obtained from the COS naming service provider. See the Name Parsing section.

URL String Names

The URL form of a CosNaming::Name is defined in the INS specification.

corbaname:<corbaloc_obj>["#" <cosnaming_name>]

where <corbaloc_obj> is

<corbaloc_obj> = <obj_addr_list> ["/" <key_string>]

and <obj_addr_list> is a list of addresses as defined in a "corbaloc" URL and <key_string> is a key string as defined in a "corbaloc" URL. <cosnaming_name> is the stringified form of an INS name (see Name Parsing).

For backward compatibility with older versions of the INS, the following URL schemes are also supported.

iiopname://[<addr_list>][/<cosnaming_name>]

where <addr_list> specifies a list of host/port pairs. If <port> is not specified, then it defaults to 9999. <cosnaming_name> is the stringified form of an INS name.

iiop://<host>[:<port>][/<cosnaming_name>]

If <port> is not supplied, then it defaults to 900. <cosnaming_name> is the stringified form of an INS name.

When you supply an "iiop" or "iiopname" URL to the initial context in this way, the ORB supplied to the initial context is used if its string_to_object() method supports the 99-12-03 INS specification. Otherwise, the ORB is ignored and the server and port designations in the URL are used to create an ORB. The value of the java.naming.factory.initial property is ignored for the purposes of resolving the URL.

Note that this rule is not used when you supply a "corbaname" URL to the initial context. For a "corbaname" URL, the ORB supplied to the initial context is used because the ORB is needed to resolve the "corbaname" URL. Name Objects

The Name argument to a Context method is treated as a sequence of strings, each representing a stringified CosNaming::NameComponent.

Name Parsing

The COS naming service provider supports names in the syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Here is a code fragment that uses the name parser from the COS naming service provider to eventually do a lookup using an INS name.

String insName = ...;
InitialContext ctx = new InitialContext(env);   // env contains init properties
NameParser parser = ctx.getNameParser("");      // parser for INS names
Name name = parser.parse(insName);              // get parsed INS name
Object obj = ctx.lookup(name);                  // do lookup

API Mapping

The COS name server supports only naming operations. The COS naming service provider maps the javax.naming.Context methods to use the appropriate COS Naming calls.

addToEnvironment()

Records change to environment property but does not reinitialize ORB.

bind()

Binds an object to the specified name.

If the object being bound is an org.omg.CosNaming.NamingContext, then CosNaming::NamingContext.bind_context is used. If it is an org.omg.CORBA.Object, then CosNaming::NamingContext.bind is used. The binding of any other type of object is not supported unless the object can be converted into an org.omg.CORBA.Object using the state factory mechanism described next.

Before the bind is performed on the naming server, the COS naming service provider uses javax.naming.spi.NamingManager.getStateToBind() to allow the object to be transformed into a org.omg.CORBA.Object. The getStateToBind() method uses the state factories available to the COS naming service provider. If the state factory accepts a java.rmi.Remote object, then it is responsible for obtaining the object's RMI-IIOP stub and connecting it to the ORB associated with the context. The connected stub is the object that will be bound in the naming server.

By default, the COS naming service provider supplies and uses a state factory that transforms an object implementing the java.rmi.Remote interface to an org.omg.CORBA.Object following the requirements described above. This factory uses the utilities in the javax.rmi.CORBA package. You can supply additional state factories to transform objects into CORBA objects.

close()

Releases any internal data structures used.

composeName()

Concatenates the supplied name to the prefix.

createSubcontext()

Uses CosNaming::NamingContext.bind_new_context to create and bind a new context.

destroySubcontext()

Uses CosNaming::NamingContext.destroy to destroy the named context. Then uses CosNaming::NamingContext.unbind to remove the binding.

getEnvironment()

Returns the environment of this context.

getNameInNamespace()

Returns the INS name of this context relative to the root of the Cos Naming namespace.

getNameParser()

Returns a name parser for parsing INS names.

lookup()
lookupLink()

Uses CosNaming::NamingContext.resolve to lookup the name. It returns a CORBA object reference except when the reference is that of a CosNaming::NamingContext, in which case a Context object is returned instead. NamingManager.getObjectInstance() is called before the object is returned in case the application or user has supplied object factories.

list()
listBindings()

Uses CosNaming::NamingContext.resolve to get the object reference for the context, and then uses CosNaming::BindingIterator and helper classes to iterate through the context. The objects bound to the names are obtained by calling CosNaming::NamingContext.resolve on them. NamingManager.getObjectInstance() is called before the object is returned in case the application or user has supplied object factories.

removeFromEnvironment()

Removes the specified property from the environment but does not otherwise update the context.

rebind()

If the object being bound is an org.omg.CosNaming.NamingContext, then CosNaming::NamingContext.rebind_context is used. If it is an org.omg.CORBA.Object, then CosNaming::NamingContext.rebind is used. See bind() for details on the use of state factories to transform the argument into an org.omg.CORBA.Object.

rename()

This method is implemented using bind() followed by unbind(). It is not atomic.

unbind()

Uses CosNaming::NamingContext.unbind to unbind the object.

Converting CORBA Programs to use JNDI

This section explains how to modify your Java IDL program to use JNDI. The explanation uses the Java IDL sample programs helloClient.java and helloServer.java.

  1. Generate the stubs from the IDL file.
    # idltojava -fclient -fserver hello.idl

    This creates the client (helloClient.java) and server (helloServer.java) skeletons, and a directory containing common code (e.g. HelloApp/*.java).

  2. Fill in the code for the client and server programs.
  3. Modify (or copy the client and server files) to use JNDI instead of COS Naming directly.
    • Replace the import to use javax.naming.*;

      Delete:

      import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
      Add:
      import javax.naming.*;
    • Replace how you get the initial reference to "NameService" with InitialContext, supplying the initial context the ORB being used by the current application.

      Delete:

      org.omg.CORBA.Object objRef =
   orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef);

      Add:

      Hashtable env = new Hashtable(5, 0.75f);
env.put("java.naming.corba.orb", orb);
Context ic = new InitialContext(env);
    • Replace the call to resolve() to use lookup().

      Delete:

      // resolve the Object Reference in Naming
NameComponent nc = new NameComponent("Hello", "");
NameComponent path[] = {nc};
hello helloRef = helloHelper.narrow(ncRef.resolve(path));
      Add:
      // resolve the Object Reference using JNDI
hello helloRef =
helloHelper.narrow((org.omg.CORBA.Object)ic.lookup("Hello"));

Security Considerations

When a security manager has been installed, you must grant to the application using JNDI and the COS naming service provider the following permissions:

permission java.net.SocketPermission "host[:port]", "connect";

For each host/port identified in the java.naming.factory.initial property, in URL string names supplied to context methods, in ORB initialization parameters and properties, and in object references.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI/DNS Service Provider

Documentation Contents

DNS Service Provider for the
Java Naming Directory Interface (JNDI)

Table of Contents

  • Introduction
  • Conformance
  • Environment Properties
  • Mapping DNS Content to JNDI
  • DNS Pseudo-URLs
  • API Mapping
  • Usage Examples
  • Security Considerations
  • Federation

Introduction

The DNS service provider allows JNDI applications to access information stored in the internet Domain Name System. The provider presents the DNS namespace as a tree of JNDI directory contexts, and DNS resource records as JNDI attributes.

This document describes the features of the DNS service provider, and contains details of how DNS is mapped onto JNDI.

Conformance

The DNS service provider supports the Domain Name System as described in RFC 1034 and RFC 1035, and as updated and clarified by RFC 1123 and RFC 2181. It currently supports the following resource record types and classes:

Type | Where Specified
A | RFC 1035
NS | RFC 1035
CNAME | RFC 1035
SOA | RFC 1035
PTR | RFC 1035
MX | RFC 1035
TXT | RFC 1035
HINFO | RFC 1035
AAAA | RFC 1886
NAPTR | RFC 2915
SRV | RFC 2782

Each lookup is initially performed using UDP. If the response is too long to be returned in a UDP packet without being truncated, the lookup is repeated using TCP.

Environment Properties

The following JNDI environment properties are relevant to the DNS service provider. See the JNDI documentation for a description of how properties are initialized using the initial context constructor, system properties, applet parameters, and resource files.

java.naming.authoritative

This property is used to specify whether all responses must be authoritative. If its value is "true", only authoritative responses are accepted from DNS servers; otherwise, all responses are accepted. If this property has not been set, the default is "false". Here is an example that specifies that all responses must be authoritative.

env.put(Context.AUTHORITATIVE, "true");

Note that some information might be made unavailable when you request that only authoritative responses be returned because the DNS protocol does not provide a way to request authoritative information. For example, the DNS service provider might have retrieved nonauthoritative data as the result of a query and is subsequently forced to discard it because only authoritative data may be returned.

java.naming.factory.initial

This property is used to select the DNS service provider as the initial context. It is not used by the provider itself. It specifies the class name of the initial context factory for the provider, and may be set as in the following example:

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.example.jndi.dns.DnsContextFactory");

java.naming.factory.object

This property contains a colon-separated list of the fully-qualified class names of object factories for transforming objects read from DNS. This mechanism is used to transform objects into forms more useful to the application. See DirectoryManager.getObjectInstance() for details.

java.naming.provider.url

This property specifies the host name and port of the DNS server used by the initial DNS context, as well the initial context's domain name. For details on the URL format see DNS Pseudo-URLs below. For example:

env.put(Context.PROVIDER_URL, "dns://server1.example.com/example.com");

will cause the provider to use the DNS server at server1.example.com, and set the initial context's domain name to example.com. If this property is not set, it defaults to "dns:" (all defaults as described in the DNS Pseudo-URLs section are used).

Multiple DNS servers may be specified by setting this property to a space-separated list of URLs. Each of the servers is contacted in turn until one of them responds. Since the initial context has only a single domain name, if multiple URLs are listed then each must contain the same domain part. For example:

env.put(Context.PROVIDER_URL,
    "dns://server1.example.com/example.com dns://server2.example.com/example.com");

com.example.jndi.dns.lookup.attr

Before JNDI invokes an object factory on a DNS context, it by default reads and passes to the factory any internet TXT attributes of the context. This property, if set, names an alternate attribute identifier to use. See Mapping DNS Content to JNDI below for information on the format of attribute identifiers.

com.example.jndi.dns.recursion

This property is used to specify that recursion is disallowed on DNS queries. If this property has not been set or if it has been set to "true", recursion is allowed; otherwise, recursion is disallowed. Here is an example that specifies that recursion on DNS queries is to be disallowed.

env.put("com.example.jndi.dns.recursion", "false");

com.example.jndi.dns.timeout.initial
com.example.jndi.dns.timeout.retries

These properties are used to alter the timeout-related defaults that the DNS provider uses when submitting UDP queries. The DNS provider submits UDP queries using the following exponential backoff algorithm. The provider submits a query to a DNS server and waits for a response to arrive within a timeout period (1 second by default). If it receives no response within the timeout period, it queries the next server, and so on. If the provider receives no response from any server, it doubles the timeout period and repeats the process of submitting the query to each server, up to a maximum number of retries (4 by default).

The "com.example.jndi.dns.timeout.initial" property, if set, specifies the number of milliseconds to use as the initial timeout period (i.e., before any doubling). If this property has not been set, the default initial timeout is 1000 milliseconds.

The "com.example.jndi.dns.timeout.retries" property, if set, specifies the number of times to retry each server using the exponential backoff algorithm described previously. If this property has not been set, the default number of retries is 4.

Here is an example that doubles the initial timeout period while keeping total length of all timeouts roughly unchanged.

env.put("com.example.jndi.dns.timeout.initial", "2000");
env.put("com.example.jndi.dns.timeout.retries", "3");

Mapping DNS Content to JNDI

The DNS service provider maps DNS names, nodes, and resource records onto JNDI data types as follows.

Names

DNS domain names are represented by JNDI compound Nameobjects with right-to-left, dot-separated syntax, and with backslash (\) as the escape character. Escape sequences of the form \DDDmay also be used, where DDDis a three-digit decimal value. Names are case-insensitive. A fully-qualified name ending with an explicit root domain label (".") is represented by a compound Nameobject with an empty component in the most-significant position.

Host names are a subset of domain names. Their labels contain only US-ASCII letters, digits, and hyphens, and none may begin or end with a hyphen. While names not conforming to these rules may be valid domain names, they will not be usable by a number of DNS applications, and should in most cases be avoided.

DNS does not specify an encoding (such as UTF-8) to use for characters other than those of US-ASCII. As a consequence, no character in a DNS name will ever have a non-zero high-order byte. When work on internationalizing domain names is finalized, the DNS service provider may be updated to conform to that work.

Nodes and Resource Records

A DNS node is represented by a DirContextobject. The resource records of the node are represented by attributes of the context. For example, if the DNS node example.com contains an A record with the address 192.0.2.33 and an MX record with the data "10 example.com", the corresponding JNDI context will have an attribute with identifier "A" and string value "192.0.2.33" and an attribute with identifier "MX" and string value "10 example.com".

Multiple records of the same type are represented as multi-valued attributes. Records of unsupported types are represented by attributes with numeric identifiers and with byte arrays as values.

Attribute Identifiers

DNS resource record class and type names are mapped onto JNDI attribute identifiers. If a record is in the internet class, the corresponding attribute ID is simply the record's type name. If the type is an unsupported one, its integer value is used instead. If the record is not in the internet class, the class name (or integer class value) is prepended to the attribute ID, separated by a space. For example, the attribute identifier "AAAA" represents an IPv6 address record, and the attribute identifier "HS 97" represents a resource record of type 97 in the Hesiod class.

Superclass attribute identifiers are also defined. These may be useful when querying records using the DirContext.getAttributes() method. If an attribute name has "*" in place of a type name (or class name), it represents records of any type (or class). For example, the attribute identifier "IN *" may be passed to the getAttributes() method to find all internet class records. The attribute identifier "* *" represents records of any class or type.

Attribute identifiers are case-insensitive.

DNS Pseudo-URLs

A URL-like notation is used to represent a DNS server, port, and domain in the java.naming.provider.url property and in URL names passed to the initial context. The format of this pseudo-URL is:
   dns:[//host[:port]][/domain]
The host and port indicate the DNS server to use. If only a host is given, the port defaults to 53; if only a port is given, the host defaults to "localhost". If neither is given, the provider will attempt to determine and use the server(s) configured for the underlying platform, and if successful, will set the java.naming.provider.urlproperty to a space-separated list of URLs constructed using the server(s). (For example, on Solaris or Linux, the provider will read the /etc/resolv.conffile.) If DNS has not been configured on the underlying platform, the host and port default to "localhost" and 53.

The domain is the DNS domain name of the context, and is not necessarily related to the domain of the server. It defaults to "." (the root domain).

API Mapping

The DNS service provider implements the DirContextinterface. Methods are mapped onto DNS operations as described below. Methods not listed are not supported.
addToEnvironment()

Adds a new property to the environment, or changes an existing property.

close()

Releases internal data structures.

composeName()

Composes two names.

getAttributes()

Returns attributes representing DNS resource records.

getEnvironment()

Returns the environment properties associated with this context.

getNameInNamespace()

Returns the fully-qualified domain name of this node.

getNameParser()

Returns a name parser for DNS domain names.

lookup()
lookupLink()

Returns a DirContext that represents the named node. The DirectoryManager.getObjectInstance() method is invoked on the object before it is returned, in case the application or user has supplied object factories.

list()
listBindings()

The listing of the DNS namespace is implemented using zone transfers, so these operations are potentially compute- and network-intensive, and they may not be supported by all DNS installations. The DirectoryManager.getObjectInstance() method is invoked on an object before it is returned, in case the application or user has supplied object factories; no attributes are passed in.

removeFromEnvironment()

Removes a property from the environment.

Usage Examples

Example 1

In this example we create an initial context representing the example.com domain, then read the IP addresses (the A records) of two hosts in that domain.
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "com.example.jndi.dns.DnsContextFactory");
env.put("java.naming.provider.url",    "dns://server1.example.com/example.com");

DirContext ictx = new InitialDirContext(env);
Attributes attrs1 = ictx.getAttributes("host1", new String[] {"A"});
Attributes attrs2 = ictx.getAttributes("host2", new String[] {"A"});

Example 2

Instead of using the properties as above, we may pass a DNS pseudo-URL to the methods of the default initial context. In this example we read the MX record of a host in the example.com domain.

DirContext ictx = new InitialDirContext();
Attributes attrs3 = ictx.getAttributes("dns://server1.example.com/host3.example.com",
                                       new String[] {"MX"});

Security Considerations

When a security manager has been installed, the DNS service provider and the application using it must both be granted the following permissions:

permission java.net.SocketPermission "host[:port]", "connect,accept";

for each host/port identified in the java.naming.provider.urlproperty, in URL string names supplied to context methods, and in object references.

Federation

The DNS service provider treats composite names as strongly separated. That is, it processes the first component of the composite name as a DNS domain name and the rest of the components as names in the next naming system(s)(nns). The implicit next naming system is determined dynamically.

For example, here is an example that lists the root of the next naming system federated beyond a DNS context, and one that looks up a name using a multi-component composite name:

// List the root of the nns.
// Note the use of a trailing slash to indicate traversal into the nns.
NamingEnumeration enum = ctx.list("java.example.com/");

// A composite name lookup.
Object obj = ctx.lookup("example.com/some/x/y/z");

Class | Where Specified
IN | RFC 1035
HS | RFC 1035
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI/LDAP Service Provider

Documentation Contents

LDAP Naming Service Provider for the
Java Naming and Directory Interface (JNDI)

Table of Contents

  1. Introduction
  2. Conformance
  3. Environment Properties
  4. Names
  5. Attributes
  6. URLs
  7. Java Objects
  8. Schema
  9. Exceptions
  10. API Mapping
  11. Federation
  12. Event Notification
  13. SASL Authentication
  14. SSL and Start TLS
  15. Connection Pooling
  16. Security Considerations

1. Introduction

The Lightweight Directory Access Protocol (LDAP) is an Internet standard for accessing directory services. The JNDI/LDAP service provider provides access to servers implementing the LDAP protocols.

This document describes the features of the LDAP service provider. A major portion of the description is couched in terms of how the LDAP service provider behaves with respect to the descriptions in Guidelines for LDAP Service Providers. For examples and descriptions of how to use this provider, please see the JNDI Tutorial.

The LDAP service provider implements the basic features for LDAP access. Additional functionality, such as support for a number of popular LDAP controls, and for storing and reading RMI and CORBA objects, can be added to the basic provider by installing a booster pack, available for download at the JNDI Web site.

2. Conformance

The LDAP service provider conforms to the following standards:
Standard | Supported | Comments
LDAPv3 (RFC 2251) | Yes |
LDAPv3 Attributes (RFC 2252) | Yes |
LDAPv3 Distinguished Names (RFC 2253) | Yes |
LDAP Search Filters (RFC 2254) | Yes |
LDAP URL Format (RFC 2255) | Yes |
LDAPv3 Schema (RFC 2256) | Yes |
LDAPv2 (RFC 1777) | Yes |
LDAP Authentication (RFC 2829) | Yes |
Start TLS Extension (RFC 2830) | Yes |
DIGEST-MD5 (RFC 2831) | Yes |
Manage Referral Control (RFC 3296) | Yes |
Paged Results Control (RFC 2696) | Yes |
Sort Control (RFC 2891) | Yes |

3. Environment Properties

Descriptions of JNDI, LDAP-specific, and SASL-specific properties are found in Guidelines for LDAP Service Providers.

3.1 JNDI Properties

The LDAP service provider supports the following JNDI environment properties:
Property | Supported | Comments
java.naming.batchsize | Yes | Default value is 1.
java.naming.factory.control | Yes |
java.naming.factory.initial | Yes | Specify com.sun.jndi.ldap.LdapCtxFactory to use the LDAP service provider as the initial context.
java.naming.factory.object | Yes |
java.naming.factory.state | Yes |
java.naming.language | No | Ignored by the provider.
java.naming.provider.url | Yes | On systems earlier than the Java SE 1.4.1, can contain only a single URL. On systems earlier than the Java SE 1.4.2, cannot contain LDAPS URLs.
java.naming.referral | Yes |
java.naming.security.authentication | Yes | simple, none, list of SASL mechanisms
java.naming.security.credentials | Yes |
java.naming.security.principal | Yes |
java.naming.security.protocol | Yes | ssl

3.2 LDAP-specific Properties

The provider supports the following LDAP-specific environment properties:
Property | Supported | Comments
java.naming.ldap.attributes.binary | Yes |
java.naming.ldap.control.connect | Yes |
java.naming.ldap.deleteRDN | Yes |
java.naming.ldap.derefAliases | Yes |
java.naming.ldap.factory.socket | Yes | Default value is javax.net.ssl.SSLSocketFactory when the java.naming.security.protocol property is set to ssl. See the SSL Section for details.
java.naming.ldap.ref.separator | Yes |
java.naming.ldap.referral.limit | Yes |
java.naming.ldap.typesOnly | Yes |
java.naming.ldap.version | Yes |

3.3 SASL-specific Properties

The provider supports the following SASL-specific environment properties:
Property | Supported | Comments
java.naming.security.sasl.authorizationId | Yes |
java.naming.security.sasl.callback | Yes |
java.naming.security.sasl.realm | Yes |
javax.security.sasl.qop | Yes |
javax.security.sasl.strength | Yes | Cipher selected depends on the ciphers available from the Java Cryptography Extension (JCE) service providers in the Java platform.
javax.security.sasl.maxbuffer | Yes |
javax.security.sasl.server.authentication | Yes |
javax.security.sasl.policy.forward | Yes |
javax.security.sasl.policy.credentials | Yes |
javax.security.sasl.policy.noplaintext | Yes |
javax.security.sasl.policy.noactive | Yes |
javax.security.sasl.policy.nodictionary | Yes |
javax.security.sasl.policy.noanonymous | Yes |

3.4 Provider-specific Properties

The LDAP service provider defines the following provider-specific environment properties:
com.sun.jndi.ldap.connect.pool

This property is used to specify that a pooled connection should be used when creating the initial context instance. If its value is "true", the provider will use a pooled connection if the parameters for creating a connection (referred to as the connection request) meet the criteria set forth by the connection pool configuration. If this property has not been set, or if it has been set to any other value, or if the connection request does not meet the criteria, the provider will not use a pooled connection. See the Connection Pooling section for more information on connection pooling.

For example, the following code

env.put("com.sun.jndi.ldap.connect.pool",
"true");
directs the LDAP provider to use a pooled connection when creating an initial context.
com.sun.jndi.ldap.connect.timeout

The value of this property is the string representation of an integer representing the connection timeout in milliseconds. If the LDAP provider cannot establish a connection within that period, it aborts the connection attempt. The integer should be greater than zero. An integer less than or equal to zero means to use the network protocol's (i.e., TCP's) timeout value.

If this property is not specified, the default is to wait for the connection to be established or until the underlying network times out.

For example,

env.put("com.sun.jndi.ldap.connect.timeout", "500"); causes the LDAP service provider to abort the connection attempt if a connection cannot be established in half a second.

When connection pooling has been requested for a connection, this property also determines the maximum wait time for a connection when all connections in the pool are in use and the maximum pool size has been reached. If the value of this property is less than or equal to zero under such circumstances, the provider will wait indefinitely for a connection to become available; otherwise, the provider will abort the wait when the maximum wait time has been exceeded. See the Connection Pooling section for details.

com.sun.jndi.ldap.read.timeout

The value of this property is the string representation of an integer representing the read timeout in milliseconds for LDAP operations. If the LDAP provider cannot get a LDAP response within that period, it aborts the read attempt. The integer should be greater than zero. An integer less than or equal to zero means no read timeout is specified which is equivalent to waiting for the response infinitely until it is received.

If this property is not specified, the default is to wait for the response until it is received.

For example,

env.put("com.sun.jndi.ldap.read.timeout", "5000"); causes the LDAP service provider to abort the read attempt if the server does not respond with a reply within 5 seconds.

com.sun.jndi.ldap.netscape.schemaBugs

The Netscape Directory Server 4.0 and earlier releases do not support schema entries that comply with RFC 2252. Specifically, contrary to RFC 2252, the Netscape server requires OIDs (such as those for SUP and SYNTAX) be delimited by single quotes and MUST/MAY lists be enclosed by parentheses. When you update the schema of the Netscape Directory Server 4.0, you need to use this property to get around these problems.

The following values are defined for this property:

true
activate the workaround.
false
do not activate the workaround.

If this property is not set then its default value is false.

For example,

env.put("com.sun.jndi.ldap.netscape.schemaBugs", "true");
activates the workaround.

NOTE 1: This property may only be passed to the initial context and becomes fixed for the provider. It is unaffected by the addToEnvironment or removeFromEnvironment methods.

NOTE 2: If you are using Netscape Directory Server 4.1, do not use this property. The 4.1 server has problems parsing object class definitions that contain MUST/MAY clauses without parentheses. If you are creating or modifying an object class definition that contains a single MUST/MAY item, work around the bug by adding a superfluous value (such as 'objectClass') to the MUST/MAY list.

com.sun.jndi.ldap.trace.ber

The value of this property is a java.io.OutputStream object into which a hexadecimal dump of the incoming and outgoing LDAP ASN.1 BER packets is written. No default is defined for this property.

For example,

env.put("com.sun.jndi.ldap.trace.ber",
System.out);
directs the LDAP protocol trace to the standard output stream.

NOTE: This property may only be passed to the initial context and becomes fixed for the provider. It is unaffected by the addToEnvironment or removeFromEnvironment methods.

4. Names

The LDAP service provider supports names in accordance with the description in Guidelines for LDAP Service Providers. It supports LDAP distinguished names in the following formats:
Distinguished Name format | Comments
String | Treat as composite name. Process the first component of the composite name as a distinguished name. Use rest of the components for federation.
Name | If instance of CompositeName, treat as composite name, which means process the first component of the composite name as a distinguished name and use the rest for federation. Otherwise, treat as parsed LDAP name, where each component of Name is a component of the LDAP name as defined in RFC 2253.
LDAP URL String | When passed to the initial context, the LDAP URL string is interpreted according to RFC 2255, and its distinguished name component interpreted according to RFC 2253.
LDAPS URL String | When passed to the initial context, the LDAPS URL string is interpreted like an LDAP URL, except that an SSL connection is used to communicate with the server.

The name parser returned by an invocation of getNameParser() returns a parser that, when given a string name, parses it into components in accordance with RFC 2253.

5. Attributes

The LDAP service provider supports attributes in accordance with the description in Guidelines for LDAP Service Providers. It supports the following formats for specifying LDAP attribute values:
Attribute value format | Supported | Comments
String values | Yes |
byte[] values | Yes |

Some LDAP servers support attribute subtyping, attribute name synonyms, and language codes for specifying language preferences for attribute values. In such cases, the attribute name returned by an LDAP server may be different from the one which was requested.

In LDAP, attribute names are case-insensitive. Therefore, when creating a collection of attributes to be passed as a parameter to JNDI operations, it is recommended to use a case-insensitive attributes class. For example,

Attributes attrs = new BasicAttributes(true); // ignoreCase=true

For all attribute values, regardless of whether they are String or byte[], you need to know the syntax and format of the attribute value. You can typically find this out by reading the schema document in which the attribute and its syntax is defined.

When attributes are supplied as arguments to JNDI calls then they must satisfy whatever schema is enforced at the LDAP directory. In particular, the objectClass attribute is normally required when creating a new LDAP entry (for example, when using Context.bind, Context.rebind or DirContext.createSubcontext).

6. URLs

6.1 Uses

The LDAP service provider supports URLs in accordance with the description in Guidelines for LDAP Service Providers. It supports both LDAP and LDAPS URLs.

It supports the following use of URLs:

URL usage | Supported | Comments
LDAP and LDAPS URLs to configure the LDAP service provider. | Yes |
URLs passed as names to the InitialDirContext methods. | Yes |
URLs in LDAP referrals | Yes | The scope component of LDAP/LDAPS URLs is supported. The attributes, filter and extensions components are ignored.
URLs returned as names in list, listBindings, and search enumerations. | Yes |
URLs linking federated namespaces. | Yes |

6.2 Automatic Discovery of LDAP Service

The LDAP service provider supports the use of DNS configuration for automatically discovering the LDAP service. When an LDAP/LDAPS URL in the above usage cases is missing the hostname and port but has a non-empty distinguished name, the LDAP service provider will attempt to locate the LDAP servers to use as described in the Guidelines for LDAP Service Providers.

For example, given a URL of ldap:///dc=example,dc=com, the service provider will try to locate the DNS SRV records for _ldap._tcp.example.com. If the provider finds such records, it will then extract and use the hostnames and ports of the LDAP servers from the records. The order in which it uses these records follows the algorithm described in the Internet draft draft-ietf-ldapext-locate-08.txt.

For locating the DNS SRV records of the LDAP service, the LDAP service provider uses the DNS service configured for the underlying platform (on Solaris or Linux, for example, the DNS client configuration is read from the /etc/resolv.conf file). If DNS has not been configured for the underlying platform, the LDAP service provider will use localhost and 53 as the hostname and port of the DNS server. If no DNS service is available, or if the DNS service does not have the LDAP service's SRV records, the LDAP service provider will use localhost as the hostname, and 389 as the port for a plain connection and 636 as the port for an SSL connection.

7. Java Objects

The LDAP service provider supports storing and reading the following types of objects, as specified in Guidelines for LDAP Service Providers.
Storable/Readable Objects | Supported | Comments
Reference objects | Yes |
Referenceable objects | Yes |
Serializable objects | Yes |
DirContext objects | Yes |

See the JNDI Tutorial for examples.

8. Schema

The LDAP service provider supports the following schema bindings, as specified in Guidelines for LDAP Service Providers.
Schema Tree | Supported | Comments
AttributeDefinition | Yes |
ClassDefinition | Yes |
SyntaxDefinition | Yes |
MatchingRule | Yes |
ExtensionDefinition | No |
ControlDefinition | No |
SASLMechanism | No |

9. Exceptions

The LDAP service provider maps LDAP error codes to JNDI exceptions according to Guidelines for LDAP Service Providers.

10. API Mapping

The LDAP service provider maps the following JNDI API methods to LDAP according to Guidelines for LDAP Service Providers:
Mapping for Context methods | Supported | Comments
addToEnvironment | Yes |
bind | Yes |
close | Yes |
composeName | Yes |
destroySubcontext | Yes |
getEnvironment | Yes |
getNameInNamespace | Yes |
getNameParser | Yes |
list | Yes |
listBindings | Yes |
lookup | Yes | Does not process LinkRef specially.
lookupLink | Yes |
rebind | Yes |
removeFromEnvironment | Yes |
rename | Yes |
unbind | Yes |
Mapping for DirContext methods | Supported | Comments
bind | Yes |
createSubcontext | Yes |
destroySubcontext | Yes |
getAttributes | Yes |
getSchema | Yes |
getSchemaClassDefinition | Yes |
modifyAttributes | Yes |
rebind | Yes |
search | Yes |
Mapping for LdapContext methods | Supported | Comments
extendedOperation | Yes |
getRequestControls | Yes |
getResponseControls | Yes |
newInstance | Yes |
reconnect | Yes |
setRequestControls | Yes |
Mapping for EventDirContext methods | Supported | Comments
addNamingListener | Yes |
removeNamingListener | Yes |
targetMustExist | Yes |

11. Federation

The LDAP service provider supports federation in accordance with the description in Guidelines for LDAP Service Providers. It supports the following federation techniques:
Federation Technique | Supported | Comments
Junction | Yes | Except when subordinate naming system is another LDAP system
Implicit Next Naming System Pointer | Yes |

The LDAP service provider treats composite names as strongly separated. That is, it processes the first component of the composite name as a distinguished name and the rest of the components as names in the next naming system(s). For example, here are examples that lists the root of the next naming system federated beyond an LDAP context and looks up a name using a multicomponent composite name:

// List the root of the nns,
// Note use of the trailing slash to indicate traversal into the nns
NamingEnumeration enum = ctx.list("cn=objects,ou=Sales/");

// A composite name lookup
Object obj = ctx.lookup("cn=objects,ou=Sales/some/x/y/z");

12. Event Notification

The LDAP service provider supports event notification in accordance with the description in Guidelines for LDAP Service Providers. It supports the following events:
Event | Supported | Comments
Namespace change notification | Yes | Uses the persistent search control*
Object change notification | Yes | Uses the persistent search control*
Unsolicited notification | Yes |

* The persistent search control is defined in the IETF Internet-Draft draft-ietf-ldapext-psearch-03.txt.

13. SASL Authentication

The LDAP service provider supports SASL authentication in accordance with the description in Guidelines for LDAP Service Providers.

The LDAP service provider supports the following SASL mechanisms.

  • EXTERNAL (RFC 2222). This mechanism obtains authentication information from an external source (such as SSL/TLS or IPsec).
  • DIGEST-MD5 (RFC 2831) is for Digest Authentication.
  • GSSAPI (RFC 2222) is for Kerberos V5 authentication.
In addition to these mechanisms, the provider supports additional SASL mechanisms made available via the framework defined in the Java SASL API (JSR 28 Public Review Draft), with the exception that the package is named com.sun.security.sasl.preview instead of javax.security.sasl.

14. SSL and Start TLS

14.1 SSL

The LDAP service provider supports SSL in accordance with the description in Guidelines for LDAP Service Providers. It uses the default socket factory javax.net.ssl.SSLSocketFactory unless the java.naming.ldap.factory.socket property has been set to the class name of some other socket factory.

When SSL is being used and no port has been specified, 636 is used as the default port.

14.2 Start TLS

The LDAP provider supports the the "Start TLS" extension ("1.3.6.1.4.1.1466.20037") by supplying a concrete implementation of the StartTlsResponse abstract class. Hostname verification is performed as per the Guidelines for LDAP Service Providers.

15. Connection Pooling

15.1 Overview

The LDAP service provider supports connection pooling by maintaining pools of previously used connections. Whenever the LDAP provider needs a connection (and the application has requested pooling), it gets a connection from the pool. If an existing connection is available, it will be used. If no existing connection is available, a new connection is created and used. When the provider is done with the connection, the connection is marked idle and can be reused.

An application requests connection pooling by adding the property, com.sun.jndi.ldap.connect.pool, to the environment properties passed to the initial context constructor. An application can decide whether to use pooling on a per-context basis by using environment properties with and without this property. This same mechanism is used to control whether pooled connections are used for referral handling and processing of LDAP/LDAPS URLs passed to the initial context. For example, when this property is present in the environment when the provider is processing a referral, the provider will use a pooled connection for the referral.

Here is sample code that requests that connection pooling be used for a new initial context and all contexts derived from it.

Hashtable env = new Hashtable();
env.put("com.sun.jndi.ldap.connect.pool", "true");
env.put(Context.PROVIDER_URL, url);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
DirContext ctx = new InitialDirContext(env);
...

Only the addition of the single property, com.sun.jndi.ldap.connect.pool, is required; no other changes are required to the application.

The LDAP provider keeps track of whether a connection is being used through indications from the application. It assumes that an application that is maintaining an open context handle is using the connection. Therefore, in order for the LDAP provider to properly manage the pooled connections, the application must be diligent about invoking Context.close() on contexts that it no longer needs.

Bad connections are automatically detected and removed from the pool. The probability of a context ending up with a bad connection is the same regardless of whether connection pooling is used.

15.2 When Not to Use Pooling

Pooled connections are intended to be reused. Therefore, an application that plans on performing operations on a context that might alter the underlying connection's state should not use connection pooling for the context. Specifically, if an application is planning to use the Start TLS extended operation on a context, or is planning to change security-related properties (such as java.naming.security.principal or java.naming.security.protocol) after the initial context has been created, it should not use connection pooling for that context. Using connection pooling under such circumstances might compromise the security of the application and/or create unexpected behavior.

15.3 Global Configuration

Connection pooling is configured and maintained per Java runtime. Connections are not shared across different runtimes. To use connection pooling, no configuration is required. Configuration is necessary only if you want to customize how pooling is done, such as controlling the size of the pools and which connections are pooled.

Connection pooling is configured by a number of System properties at runtime startup time. Note that these are System properties, not environment properties and that they affect all connection pooling requests.

Here is a summary of the system properties. They are described in more detail in the rest of this section.

System Property Name | Description | Default
com.sun.jndi.ldap.connect.pool.authentication | A list of space-separated authentication types of connections that may be pooled. Valid types are "none", "simple", and "DIGEST-MD5". | "none simple"
com.sun.jndi.ldap.connect.pool.debug | A string that indicates the level of debug output to produce. Valid values are "fine" (trace connection creation and removal) and "all" (all debugging information). |
com.sun.jndi.ldap.connect.pool.initsize | The string representation of an integer that represents the number of connections per connection identity to create when initially creating a connection for the identity. | 1
com.sun.jndi.ldap.connect.pool.maxsize | The string representation of an integer that represents the maximum number of connections per connection identity that can be maintained concurrently. | no maximum size
com.sun.jndi.ldap.connect.pool.prefsize | The string representation of an integer that represents the preferred number of connections per connection identity that should be maintained concurrently. | no preferred size
com.sun.jndi.ldap.connect.pool.protocol | A list of space-separated protocol types of connections that may be pooled. Valid types are "plain" and "ssl". | "plain"
com.sun.jndi.ldap.connect.pool.timeout | The string representation of an integer that represents the number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool. | no timeout

Here is an example that sets the maximum pool size to 20, the preferred pool size to 10, and the idle timeout to 5 minutes for pooled connections.

# java -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 \
       -Dcom.sun.jndi.ldap.connect.pool.prefsize=10 \
       -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 \
    YourProgram

15.3.1 What Gets Pooled

The LDAP provider will use a pooled connection only if the application has requested it and the request for the connection meets the pooling criteria. The application requests that a connection be pooled by using the com.sun.jndi.ldap.connect.pool environment property. The default pooling criteria is that plain (non-SSL) connections that use simple or no authentication are allowed to be pooled. The pooling criteria can be adjusted to include SSL connections and the DIGEST-MD5 authentication type by using System properties. A connection that has enabled protocol tracing (via the com.sun.jndi.ldap.trace.ber environment property) cannot be pooled. For pooling connections from a custom socket factory see Pooling Custom Socket Factory Connections

To allow SSL connections to be pooled, include the string "ssl" in the com.sun.jndi.ldap.connect.pool.protocol System property. For example, to allow both plain and SSL connections to be pooled, set this System property to the string "plain ssl".

To allow DIGEST-MD5 connections to be pooled, include the string "DIGEST-MD5" in the com.sun.jndi.ldap.connect.pool.authentication System property. For example, to allow connections of anonymous, simple and DIGEST-MD5 authentication types to be pooled, set this System property to the string "none simple DIGEST-MD5".

15.3.2 How Connections are Pooled

The LDAP provider maintains pooled connections so that they can be reused. When an application requests to use a pooled connection, the LDAP provider needs to determine whether the request can be satisfied by an existing pooled connection. It does this by assigning a connection identity to each pooled connection and checking whether the incoming request has the same connection identity as that of one of its pooled connections.

A connection identity is the set of the parameters required to create a possibly authenticated LDAP connection. Its composition depends on the authentication type of the request, as shown in the following table.

Authentication type Connection identity contents
none
  • connection controls
  • hostname, port number and scheme as specified in the java.naming.provider.url property, referral, or URL supplied to the initial context
  • the contents of the following properties:
    java.naming.security.protocol
java.naming.ldap.version
simple
  • all of the information listed for anonymous
  • the contents of following properties:
    java.naming.security.principal
java.naming.security.credentials
DIGEST-MD5
  • all of the information listed for simple
  • the contents of following properties:
    java.naming.security.sasl.authorizationId
java.naming.security.sasl.realm
javax.security.sasl.qop
javax.security.sasl.strength
javax.security.sasl.server.authentication
javax.security.sasl.maxbuffer
javax.security.sasl.policy.noplaintext
javax.security.sasl.policy.noactive
javax.security.sasl.policy.nodictionary
javax.security.sasl.policy.noanonymous
javax.security.sasl.policy.forward
javax.security.sasl.policy.credentials

15.3.3 Pooling Custom Socket Factory Connections

Pooling of connections from a custom socket factory is allowed when java.naming.ldap.factory.socket environment property is set. For the custom socket factory to be pooled the socket factory class must implement the Comparator interface. The LDAP Service Provider calls Comparator.compare() method for equality comparison of the socket factories whose connections are being checked for equality by the pooling mechanism. The socket factory comparison should ensure that the socket factory parameters that influence the connection equality are being compared. This comparison is made in addition to the connection identity comparison described in How Connections are Pooled. A custom socket factory class should have the following structure if its connections were to be pooled:
    public class CustomSocketFactory extends SocketFactory
                implements Comparator<SocketFactory> {
       :
       :
       public int compare(SocketFactory sf1, SocketFactory sf2) {
           :
           :
           // do whatever comparison that's required
       }
    }

If the socket factory class does not implement Comparator interface, the connections from that socket factory class do not get pooled. This requirement for implementing the Comparator interface is to ensure that the LDAP Service Provider does the necessary checks when comparing connections from different socket factories whose implementation is not known to the provider.

15.3.4 Pool Sizes

The LDAP provider maintains pools of connections; each pool holds connections (either in-use or idle) that have the same connection identity. There are three sizes that affect the management of each pool. These sizes are global and affect all pools.

The initial pool size is the number of connections per connection identity that the LDAP service provider creates when first creating the pool (which corresponds to when the application first requests a pooled connection for that connection identity). Authentication of each connection in the pool is performed on demand, as the connection gets used. By default, the initial pool size is 1 and can be changed by using the System property com.sun.jndi.ldap.connect.pool.initsize. It is typically used at application start-up time to prime the pool with a certain number of connections to a server.

The maximum pool size is the maximum number of connections per connection identity that can be maintained concurrently by the LDAP service provider. Both in-use and idle connections contribute to this number. When the pool size reaches this number, no new connection for the corresponding connection identity may be created until a connection in the pool has been removed (i.e., the physical connection is closed). When the pool size reaches the maximum and all of the connections in the pool are in use, the application's request for a connection from that pool is blocked until a connection in the pool either becomes idle or is removed. A maximum pool size of 0 means that there is no maximum size: A request for a pooled connection will use an existing pooled idle connection or a newly created pooled connection.

The preferred pool size is the preferred number of connections per connection identity that the LDAP service provider should maintain. Both in-use and idle connections contribute to this number. When an application requests the use of a pooled connection and the pool size is less than the preferred size, the LDAP provider will create and use a new pooled connection regardless of whether an idle connection is availble. When an application is finished with a pooled connection (by invoking Context.close() on all contexts that share the connection) and the pool size is greater than the preferred size, the LDAP provider will close and remove the pooled connection from the pool. A preferred pool size of 0 means that there is no preferred size: A request for a pooled connection will result in a newly created connection only if no idle ones are available.

Note that the maximum pool size overrides both the initial and preferred pool sizes. For example, setting the preferred pool size greater than the maximum pool size is effectively setting it to the maximum pool size.

15.3.5 Idle Connections

When the application is finished with a pooled connection (by invoking Context.close() on all contexts that share the connection), the underlying pooled connection is marked as idle, waiting to be reused. By default, idle connections remain in the pool indefinitely until they are garbage-collected. If the "com.sun.jndi.ldap.connect.pool.timeout" System property has been set, the LDAP provider will automatically close and remove pooled connections that have been idle for more than the specified period.

15.4 Per-Context Configuration

15.4.1 Enabling Pooling

To use pooling, set the com.sun.jndi.ldap.connect.pool property to "true" in the environment properties passed to the initial context constructor. The provider will apply the pooling criteria to the supplied environment properties and decide whether to use pooling for that context. If the provider determines that a connection cannot be pooled, it creates and uses an unpooled connection for the context.

If this property is omitted, the context will not use connection pooling.

15.4.2 Connection Timeout

The com.sun.jndi.ldap.connect.timeout environment property is used to specify a timeout period for establishment of the LDAP connection. This property affects the TCP timeout when opening a connection to an LDAP server. When connection pooling has been requested, this property also specifies the maximum wait time for a connection when all connections in pool are in use and the maximum pool size has been reached.

If this property has not been specified, the LDAP provider will wait indefinitely for a pooled connection to become available, and to wait for the default TCP timeout to take effect when creating a new connection.

Note that this property is different from the System property com.sun.jndi.ldap.connect.pool.timeout, which is related to the removal of idle pooled connections.

16. Security Considerations

When a security manager has been installed, you must grant to the application using JNDI and the LDAP service provider the following permissions:
permission java.net.SocketPermission "host[:port]", "connect";

For each host/port identified in the java.naming.factory.initial property and in URL string names supplied to context methods.

permission java.net.SocketPermission "host[:port]", "connect,accept";

For each host/port named in the URL strings in References and javaCodebase attributes stored with Serializable objects.

If you are using SASL authentication and will be setting the SASL client factory programmatically, grant your application the following permission.
permission java.lang.RuntimePermission "setFactory"
If you use the "GSSAPI" SASL mechanism, you need the following additional permissions.
permission javax.security.auth.AuthPermission "createLoginContext.appClassName";
permission javax.security.auth.AuthPermission "doAsPrivileged";

For the application class that's going to be logging in and invoking the doAsPrivileged method.

permission java.net.SocketPermission "host[:port]", "connect";

For the host/port of the Kerberos Key Distribution Center (KDC).

permission javax.security.auth.kerberos.ServicePermission "krbtgt/realm@realm", "initiate";
permission javax.security.auth.kerberos.ServicePermission "ldap/fully-qualified-hostname@realm", "initiate";

For the realm and host of the LDAP service and KDC.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI/RMI Registry Service Provider

Documentation Contents

RMI Registry Service Provider for the
Java Naming and Directory Interface (JNDI)

Table of Contents

  • Introduction
  • Environment Properties
  • Names
  • RMI URLs
  • RMI URL Format
  • API Mapping
  • Bindings
  • Usage Examples
  • Security Considerations

Introduction

The RMI registry service provider allows JNDI applications to access remote objects registered with the RMI registry. Given the location of a registry, the provider will create a naming context with bindings for the objects registered there. Such a context may be bound into another JNDI-accessible namespace (such as LDAP, for example). References to individual remote objects may likewise be bound into another namespace.

A key benefit of binding registry contexts into other namespaces is location-independent access to remote objects: the RMI clients do not need to know the registry's host name or port number. RMI servers can take advantage of this to advertise their services to potential clients. In addition, remote objects can be linked into the same enterprise directory that is used to access information about people, organizations, and network resources.

With this service provider installed, JNDI subsumes the functionality of the java.rmi.Naming class.

This document describes the features of the RMI registry service provider.

Environment Properties

The following JNDI environment properties are used by the RMI registry service provider. See the JNDI documentation for a description of how properties are initialized using the environment properties, system properties, applet parameters, and resource files.

java.naming.factory.initial

This property is used to select the registry service provider as the initial context. It is not used by the provider itself. It specifies the class name of the initial context factory for the provider. For example:

env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.rmi.registry.RegistryContextFactory");

This property is used in conjunction with the java.naming.provider.url property. This property must be set if you are using the registry as the initial context. The only exception is if you supply only URLs to the initial context, in which case, you don't need to specify this property. See RMI URLs for details.

java.naming.provider.url

This property specifies the location of the registry when the registry is being used as the initial context. It's value is an RMI URL with no object name component (see RMI URL Format below). For example:

env.put(Context.PROVIDER_URL, "rmi://server:1099");

The default value of this property is "rmi:", signifying a registry running on port 1099 of the local host.

This property is used in conjunction with the java.naming.factory.initial property.

java.naming.factory.state

A colon-separated list of the fully qualified class names of state factory classes used to get an object's state for storing given the object itself. You can use this mechanism to transform an object into forms that can be stored into the registry. The RMI registry service provider supports storing java.rmi.Remote, javax.naming.Reference, and javax.naming.Referenceable objects. See javax.naming.spi.NamingManager.getStateToBind() for details.

java.naming.factory.object

A colon-separated list of the fully qualified class names of object factory classes for transforming objects read from the registry. You can use this mechanism to transform an object into forms expected by the application. See javax.naming.spi.NamingManager.getObjectInstance() for details.

com.sun.jndi.rmi.factory.socket

This property specifies the socket factory for use by the RMI runtime in order to obtain the client sockets to make RMI calls. The value specified for the socket factory must be of the type java.rmi.server.RMIClientSocketFactory. If this property is not set, the default socket factory is used by the registry.

java.naming.rmi.security.manager

This property, when set to any value, indicates that the provider should attempt to install the RMISecurityManager. See the Security Considerations section below.

Names

The RMI registry supports a flat namespace. Since there is no hierarchy, every name is atomic. Each name may be composed of any characters, and case is significant.

Names are passed as arguments to the methods of a registry context, and are returned as the results of those methods, either as Name objects or as strings. When a Name object is used, it should have a single component whose value is the atomic name that will be passed on to the registry. When a string is used as a name, it is interpreted as the string representation of a composite name. So if ctx is a registry context, for example, then the following two unbind operations are equivalent:

String name = ...
ctx.unbind(name);
ctx.unbind(new CompositeName(name));

Care must be taken with names containing any of the four meta-characters that are treated specially during the parsing of composite names: '/', '\\', '"', and '\''. These characters must be properly escaped or quoted. The atomic name X/Y, for example, may be represented as the composite name X\/Y so as not to be mistaken for a two-component name with X and Y as its components. See CompositeName for more information.

RMI URLs

JNDI provides support for resolving URLs that name objects. The registry service provider allows RMI URLs to be used as names in this manner. This provides a generalization of the java.rmi.Naming functionality, only using the more general JNDI interface.

The class com.sun.jndi.url.rmi.rmiURLContextFactory implements a URL context factory for RMI URLs. This allows an RMI URL to be passed as a name to the default JNDI initial context.

RMI URL Format

The format of an RMI URL is one of the following:

   rmi://[host][:port][/[object]]

   rmi:[/][object]
If the object name is absent, then the URL names the registry at the given host and port. Otherwise, it names the remote object registered at that registry under the name provided.

If the host is omitted, the local host is assumed. If the port is omitted, the default registry port 1099 is assumed.

API Mapping

The registry service provider implements the java.naming.Context and java.naming.Referenceable interfaces. Context and Referenceable methods are mapped onto registry operations as described below.

lookup()
lookupLink()

The java.rmi.Registry.lookup() method is called. If the returned object is a wrapper around a javax.naming.Reference, the referenced object is created using javax.naming.spi.NamingManager.getObjectInstance(). JNDI links are not currently supported.

bind()

The java.rmi.Registry.bind() method is called. State factories are first consulted through javax.naming.spi.NamingManager.getStateToBind(). The object being bound must be of type java.rmi.Remote, javax.naming.Reference, or javax.naming.Referenceable. If the object is a javax.naming.Reference or javax.naming.Referenceable, its reference is wrapped in a Remote wrapper and then bound (see Binding Objects into the Registry below).

rebind()

The java.rmi.Registry.rebind() method is called. Objects are otherwise treated as for the JNDI bind() operation.

unbind()

The java.rmi.Registry.unbind() method is called.

rename()

This method is implemented as a sequence of JNDI operations: lookup(), bind(), unbind(). The sequence is not performed atomically.

list()

The java.rmi.Registry.list() method is called. As this provides no information about the types of the bound objects, each javax.naming.NameClassPair returned has the generic java.lang.Object as its class name.

listBindings()

The java.rmi.Registry.list() method is called. As each javax.naming.Binding is read from the resulting enumeration, java.rmi.Registry.lookup() is called and passed through javax.naming.spi.NamingManager.getObjectInstance().

createSubcontext()
destroySubcontext()

These operations are not supported.

getNameParser()

Returns a name parser for case-sensitive atomic names.

getNameInNamespace()

Returns the empty string (the name of the registry).

composeName()

Returns the composition of the two names.

addToEnvironment()

The specified property is added to the context's environment. If the java.naming.rmi.security.manager property is added, the provider will attempt to install the default RMI security manager (see Security Considerations). Other properties may be added or changed in the environment, but have no additional effect on the context.

removeFromEnvironment()

The specified property is removed from the context's environment. The context is otherwise unaffected.

close()

Clears internal state used by the provider, but otherwise has no immediate effect.

getReference()

If this context was constructed from a reference, a clone of that reference is returned. Otherwise a new reference for the context is returned, providing that the host name can be determined and is not "localhost" (see Binding Registry Contexts and Remote Objects below).

Bindings

Binding Objects into the Registry

An object may be bound into a registry context if it implements the java.rmi.Remote interface. An object may also be bound if it is a JNDI Reference object, or if it implements the Referenceable interface (in which case the corresponding reference will be bound in place of the object itself).

Binding Registry Contexts and Remote Objects

Each RMI registry context implements the Referenceable interface. It may therefore be bound into any JNDI-accessible namespace that can store Referenceable objects. A reference to an individual remote object that is registered with a registry may also be constructed, allowing that object to be bound into another namespace.

The class com.sun.jndi.rmi.registry.RegistryContextFactory implements the object factory that converts registry references into the corresponding registry contexts or remote objects.

For a registry context to be constructed, the registry's URL must be determined. This URL may come from the java.naming.provider.url property, or may be passed as a name to the initial context, or may be embedded in a registry reference. If the URL contains no host name or uses the host name "localhost", then the registry context's getReference() method is unable to return a reference for the context. Such a registry context, therefore, cannot be bound into another namespace.

Registry Reference Format

A JNDI reference for an RMI registry contains a list of string addresses (class StringRefAddr), each tagged with the type "URL". Each address contains an RMI URL locating either a registry, or a remote object registered with a registry (see RMI URL Format above).

When multiple URLs appear within a single reference, each represents an alternative address for the same logical resource. The order of the addresses is not significant. Addresses not of class StringRefAddr, or not of address type "URL", are ignored.

Usage Examples

Example 1

To create an initial context that accesses a registry, set the properties java.naming.factory.initial and java.naming.provider.url as described in Environment Properties above. Then the names stored in the registry, for example, may be listed as follows:

Context ictx = new InitialContext(env);
NamingEnumeration enum = ictx.list("");

Example 2

Instead of using the properties as above, you may pass an RMI URL as a name to resolve in the default initial context:

Context registryCtx = (Context)ictx.lookup("rmi://host");

Example 3

A registry context may be bound into another JNDI-accessible namespace. To bind registryCtx (from the preceding example) into an LDAP directory, for example:

Context ldapCtx = (Context)ictx.lookup("ldap://server/o=sun,c=us");
ldapCtx.bind("cn=rmi", registryCtx);
If the names R1 and R2 are bound in this registry, then a JNDI client browsing the LDAP namespace will see R1 and R2 beneath the cn=rmi entry.

Example 4

A remote object that is registered with an RMI registry may be bound into another JNDI-accessible namespace by constructing a reference for that object. If the variable obj holds the object named R1 from the preceding examples, it may be bound into an LDAP directory as follows:

RefAddr addr = new StringRefAddr("URL", "rmi://host/R1");
Reference ref = new Reference(obj.getClass().getName(), addr);
ldapCtx.bind("cn=R1", ref);

Security Considerations

Security Manager

The usual security considerations of RMI apply. For RMI to dynamically load classes from a remote server, a security manager must first be installed. This can be done in the same way as it would for any other RMI application. See the Java Remote Method Invocation Specification. Or, if the environment property java.naming.rmi.security.manager is passed to the provider, then the provider will attempt to install the RMISecurityManager itself.

Permissions

The application using JNDI and the RMI registry provider must be granted the following permissions:

permission java.net.SocketPermission "host[:port]", "connect";

For each host/port identified in the java.naming.provider.url property and in URL string names supplied to context methods.

permission java.net.SocketPermission "host[:port]", "connect,accept";

For each host/port identified in the URL strings in javax.naming.References.

permission java.lang.RuntimePermission "setSecurityManager";

If using the java.naming.rmi.security.manager environment property, which asks the RMI registry provider to install the RMISecurityManager.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Outline of the JNDI API

Documentation Contents

Outline of the Java Naming and Directory Interface (JNDI)

The JNDI consists of these packages:
  • javax.naming
    Contains classes and interfaces for accessing naming services.
  • javax.naming.directory
    Extends the core javax.naming package to provide functionality for accessing directories in addition to naming services.
  • javax.naming.event
    Contains classes and interfaces for supporting event notification in naming and directory services.
  • javax.naming.ldap
    Contains classes and interfaces for supporting LDAPv3 extended operations and controls.
  • javax.naming.spi
    Contains the classes and interfaces that allow various naming and directory service providers to be dynamically plugged in beneath the JNDI.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

Java Naming and Directory Interface

The Java Naming and Directory Interface technology (JNDI) provides a unified interface to multiple naming and directory services. As part of the Java enterprise API set, JNDI enables seamless connectivity to heterogeneous enterprise naming and directory services. Developers can now build powerful and portable directory-enabled Java applications using this industry-standard interface.

The JNDI specification was developed by Sun Microsystems with a number of leading industry partners, including Novell, Netscape, SCO, and BEA.

Technical Overview

Directory services play a vital role in Intranets and Internets by providing access to a variety of information about users, machines, networks, services, and applications. By its very nature, a directory service incorporates a naming facility for providi ng human understandable namespaces that characterize the arrangement and identification of the various entities.

The computing environment of an enterprise typically consists of several naming facilities often representing different parts of a composite namespace. For example, the Internet Domain Name System (DNS) may be used as the top-level naming facilit y for different organizations within an enterprise. The organizations themselves may use a directory service such as LDAP or NDS or NIS. From a user's perspective, there is one namespace consisting of composite names. URLs are examples of composite names because they span namespaces of multiple naming facilities. Applications which use directory services must support this user perspective.

Many Java application developers can benefit from a directory service API that is not only independent of the particular directory or naming service implementation, but also enables seamless access to directory objects through multiple naming facilities. In fact, an application can attach its own objects to the namespace. Such a facility enables any Java application to discover and retrieve objects of any type.

JNDI provides directory and naming functionality to Java applications. It is defined to be independent of any specific directory service implementation. Thus, a variety of directories, new and existing ones in the installed base, can be a ccessed in a common way.

JNDI also defines a service provider's interface which allows various directory and naming service drivers to be plugged in.

Examples

Here are two examples to briefly illustrate some of the more commonly used features of JNDI.

An application that wants to access a printer needs the corresponding printer object. This is simply done as follows:

prt = (Printer)
        building7.lookup("puffin");
prt.print(document);

where building7 is the naming context representing a physical building that provides a convenient context for referring to the printers.

JNDI does all the work of locating the information needed to construct the printer object.

As another example, an application that wants to find a person's phone numbers, which are stored in the organization's directory, can simply do:

String[] attrs = {"workPhone", "cellPhone", "faxNumber"};
bobsPhones = directory.getAttributes("cn=Bob,o=Widget,c=US", attrs);

If there may be several Bobs in the Widget organization, the application can search the organization's directory to find the right Bob as follows:

bob = directory.search("o=Widget,c=US","(cn=Bob)", controls);

Other application examples include access to security credentials stored in an enterprise-wide directory service, access to electronic mail addresses, and access to addresses of a variety of existing services such as databases, network file systems, etc.

Overview of Interfaces

The Naming Interface - javax.naming

Context is the core interface that specifies a naming context. It defines basic operations such as adding a name-to-object binding, looking up the object bound to a specified name, listing the bindings, removing a name-to-object binding, crea ting and destroying subcontexts of the same type, etc.

Context.lookup() is the most commonly used operation. The context implementation can return an object of whatever class is required by the Java application. For example, an application might use the name of a printer to look up the correspond ing Printer object, and then print to it directly:

Printer printer = (Printer)
 ctx.lookup("treekiller");
printer.print(report);

The application is not exposed to any naming service implementation. In fact, a new type of naming service can be introduced without requiring the application to be modified or even disrupted if it is running.

The Directory Interface - javax.naming.directory

Directory Objects and Attributes. The DirContext interface enables the directory capability by defining methods for examining and updating attributes associated with a directory object. Each directory object contains a set of zero or more objects of class Attribute. Each attribute is denoted by a string identifier and can have zero or more values of any type.

Directory Objects as Naming Context. The DirContext interface also behaves as a naming context by extending the Context interface. This means that any directory object can also provide a naming context. In addition to a directory object keeping a variety of information about a person, for example, it is also a natural naming context for resources associated with that person: a person's printers, file system, calendar, etc.

Searches. The DirContext interface supports content-based searching of directories. In the simplest and most common form of usage, the application specifies a set of attributes - possibly with specific values - to match. It then invo kes the DirContext.search() method on the directory object, which returns the matching directory objects along with the requested attributes.

The Event Interface - javax.naming.event

Naming Events. The NamingEvent class represents an event generated by a naming or directory service. Examples of a NamingEvent are a change to a directory entry's attribute or a rename of a directory entry.

Naming Listeners. A NamingListener is an object that registers interests in NamingEvents. Listeners register with a context to receive notification of changes in the context, its children, or its subtree.

The LDAP Interface - javax.naming.ldap

The LdapContext interface allows an application to use LDAP v3-specific features, including extensions and controls, not already covered by the more generic DirContext interface.

The Service Provider Interface - javax.naming.spi

The JNDI SPI provides the means by which different naming/directory service providers can develop and hook up their implementations so that the corresponding services are accessible from applications that use JNDI. In add ition, because JNDI allows specification of names that span multiple namespaces, if one service provider implementation needs to interact with another in order to complete an operation, the SPI provides methods that allow different provider implementations to cooperate to complete client JNDI operations.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 Introduction

Documentation Contents
CONTENTS | PREV | NEXT

1. Introduction

Directory services play a vital role in Intranets and Internets by providing access to a variety of information about users, machines, networks, services, and applications. By its very nature, a directory service incorporates a naming facility for providing human understandable namespaces that characterize the arrangement and identification of the various entities.

The computing environment of an enterprise typically consists of several naming facilities often representing different parts of a composite namespace. For example, the Internet Domain Name System (DNS) might be used as the top-level naming facility for different organizations within an enterprise. The organizations themselves might use a directory service such as LDAP or NDS or NIS. From a user's perspective, there is one namespace consisting of composite names. URLs are examples of composite names because they span namespaces of multiple naming facilities. Applications which use directory services must support this user perspective.

Many Java application developers can benefit from a directory service API that is not only independent of the particular directory or naming service implementation, but also enables seamless access to directory objects through multiple naming facilities. In fact, any application can attach its own objects to the namespace. Such a facility enables any Java application to discover and retrieve objects of any type.

End users can benefit from logical namespaces that allow easier discovery and identification of the objects in the network.

Directory service developers can benefit from a service-provider capability that enables them to incorporate their respective implementations without requiring changes to the client.

Java Naming and Directory Interface (JNDI) is an API that provides directory and naming functionality to Java applications. It is defined to be independent of any specific directory service implementation. Thus, a variety of directories can be accessed in a common way.

Here are two examples to briefly illustrate some of the more commonly used features of JNDI.

An application that wants to access a printer needs the corresponding printer object. This is simply done as follows:

prt = (Printer) building7.lookup("puffin");
prt.print(document);

JNDI does all the work of locating the information needed to construct the printer object.

An application that wants to find a person's phone numbers, which are stored in the organization's directory, can simply do:

String[] attrs = {"workPhone", "cellPhone", "faxNumber"};
bobsPhones = directory.getAttributes("cn=Bob, o=Widget, c=US", attrs);

If there may be several Bobs in the Widget organization, the application can search the organization's directory to find the right Bob as follows:

bob = directory.search("o=Widget, c=US", "(cn=Bob)", searchctls);

This document describes the architecture and interfaces of JNDI.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

1 Introduction

2 Goals and Design Principles

3 Overview of the Architecture

4 Fundamentals

5 Overview of the Interface

6 Configuration

7 Scenarios

8 Security Considerations

9 Design Choices

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 Goals and Design Principles

Documentation Contents
CONTENTS | PREV | NEXT

2. Goals and Design Principles

We followed several principles and maxims in designing the API.

2.1 Keep it consistent and intuitive

Wherever possible, we have used existing components from the rest of the Java development environment. Adhering to this principle not only makes JNDI consistent with existing core classes in the Java platform but also reduces needless proliferation of classes.

The object-oriented nature of the Java programming language allows for an intuitive and simple API design, in which the directory service functionality is expressed as a natural extension to the more fundamental naming service functionality.

2.2 Pay for what you use

The API is structured in a tiered manner so that the application programmer interested in a certain directory service capability need not necessarily know about a more advanced capability. We have strived to keep the lower tiers simple and also make them represent the common case capability, relegating the more complex ones to the upper tiers.

2.3 Implementable over common directory and naming services and protocols

This goal is important for two reasons. First, it enables Java applications to take advantage of information in a variety of existing naming and directory services such as DNS, NDS, NIS (YP), X.500, and LDAP. Second, it helps limit the appearance of any implementation specific artifacts in the API.

Providing a unified interface to multiple naming and directory services does not imply that access of unique features of a particular service is precluded. The unified API which is designed to cover the common case is still beneficial to applications that have explicit knowledge of the underlying naming or directory service. Such applications still benefit from sharing the common portions that use the API. This is analogous to applications sharing commonly used classes and yet adding needed specificity via subclassing.

2.4 Seamless integration

This is important not only because of the diversity of directory service and naming services in the installed base that need to be supported, but also because new Java application and service programmers can export their own namespaces and directory objects in a uniform way.

We also wanted to make a variety of implementation choices possible without having the application pay for this freedom. For example, a "thin-client" might be better served by a proxy-style protocol in which the access to specific naming and directory services is relegated to a server. Whereas, a performance sensitive, resource rich client, might choose to use an implementation which directly allows it to access the various servers. However, the application should be insulated from these implementation choices. It should be possible to defer such choices even until runtime.

2.5 Support for leading industry standards

The Lightweight Directory Access Protocol (Internet RFC 2251) has emerged as the standard for directory access at the protocol level. All major directory vendors have products that support this protocol. An application that uses JNDI should be able to access all of the features offered by this standard. Where possible, JNDI should support conventions (such as those for specifying search queries/filters) already defined by the standard.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 Overview of the Architecture

Documentation Contents
CONTENTS | PREV | NEXT

3. Overview of the Architecture

The JNDI architecture consists of the JNDI API and the JNDI SPI. The JNDI API allows Java applications to access a variety of naming and directory services. The JNDI SPI is designed to be used by arbitrary service providers including directory service providers. This enables a variety of directory and naming services to be plugged in transparently to the Java application (which uses only the JNDI API). The following diagram shows the JNDI architecture and includes a few service providers of directory and naming contexts as examples.

JNDI Architecture

Graphic with the following from top to bottom: Java application, JNDI API, JNDI Naming Manager, JNDI SPI, and RMI, CORBA, LDAP and NDS on the bottom row.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 Fundamentals

Documentation Contents
CONTENTS | PREV | NEXT

4. Fundamentals

A directory service provides access to diverse kinds of information about users and resources in a network environment. It uses a naming system for the purpose of identifying and organizing directory objects to represent this information. A directory object provides an association between attributes and values. Thus, a directory service enables information to be organized in a hierarchical manner to provide a mapping between human understandable names and directory objects.

4.1 Naming -- The Foundation

A fundamental facility in any computing system is the naming service - the means by which names are associated with objects, and by which objects are found given their names. In traditional systems, the naming service is seldom a separate service. It is usually integrated with another service, such as a file system, directory service, database, desktop, mail system, spreadsheet, or calendar. For example, a file system includes a naming service for files and directories; a spreadsheet has a naming service for cells and macros.

The computing environment of an enterprise typically consists of several naming services. There are naming services that provide contexts for naming common entities in an enterprise such as organizations, physical sites, human users and computers. Naming services are also incorporated in applications offering services such as file service, mail service, printer service, and so on. From a user's perspective, there exist several natural and logical relationships between these naming services. For example, it is natural to think of naming a variety of services such as files, mail, appointment calendar, and so on, in the context of a user. It is also natural to think of a user in the context of a department, within a division of an enterprise. Meaningful names can be composed using useful arrangements of naming services reflecting these relationships.

Every name is generated by a set of syntactic rules called a naming convention. An atomic name is an indivisible component of a name, as defined by the naming convention.

A compound name represents a sequence of zero or more atomic names composed according to the naming convention.

For example, in UNIX pathnames, atomic names are ordered from left to right, and are delimited by slash (`/') characters. The UNIX pathname usr/local/bin is a compound name representing the sequence of atomic names, usr , local , and bin . In names from the Internet Domain Name System (DNS), atomic names are ordered from right to left, and are delimited by dot (`.') characters. Thus, the DNS name sales.Example.COM is a compound name representing the sequence of atomic names, COM, Example, and sales.

The association of an atomic name with an object is called a binding.

A context is an object whose state is a set of bindings with distinct atomic names. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns an object, and may provide operations such as for binding names, unbinding names, listing bound names. An atomic name in one context object can be bound to another context object of the same type, called a subcontext, giving rise to compound names.

Resolution of compound names proceeds by looking up each successive atomic component in each successive context. The reader will find a familiar model in UNIX file naming, where directories serve as contexts, and pathnames may be compound names.

A naming system is a connected set of contexts of the same type (having the same naming convention) and providing the same set of operations with identical semantics.

A namespace is the set of all names in a naming system.

A composite name is a name that spans multiple naming systems. It consists of an ordered list of zero or more components. Each component is a name from the namespace of a single naming system.

For example, the name example.eng:/export/home/john/.signature is a composite name representation made up of a host name example.eng from a host namespace, and the file name /export/home/john/.signature from a UNIX file namespace. Another example is the Internet URL http://www.example.org/public/index.html , which is a composite name representation made up of the scheme-id http from the "URL scheme-id" namespace, www.example.org which is the DNS name of the machine on which the web server is running, and public/index.html which is a file name from a file namespace.

Every name is interpreted relative to some context, and every naming operation is performed on a context object. A client can obtain an initial context object that provides a starting point for resolution of names.

4.2 Directory Objects

The primary function of a naming system is to map names to objects. The objects can be of any type. A directory object is a particular type of object that is used to represent the variety of information in a computing environment. A directory object can have associated with it attributes. An attribute has an identifier and a set of values.

A directory object provides operations for creating attributes, adding, removing, and modifying attributes associated with the directory object. If we make a directory object also be a naming context, we can represent trees of directory information where the interior nodes not only behave like naming contexts but also contain attributes.

The following diagram illustrates several things.

Example of a Composite Namespace

The following context describes this graphic
  • There can be multiple naming systems that can be represented by a composite namespace. In this case, DNS is used as the global naming system; one division uses NDS, while a second division uses LDAP.
  • Each namespace has interior nodes that represent naming contexts, which may be directory objects as well. Leaf nodes can be objects of any type.
  • The InitialContext is configured to have bindings to useful starting contexts in different naming and directory systems.
  • Applications just see a composite namespace. They can access any type of object bound in any naming system in this arrangement.
  • Services can incorporate their own namespaces which appear as first-class citizens in JNDI.
  • Arbitrary directory services can be added and accessed without requiring client applications to be changed.

4.3 URLs and Composite Names

Uniform Resource Locators (URLs) are special composite names whose syntax are determined by the URL's definition. Clients of JNDI can use URLs to refer to arbitrary types of objects. For example, a client can use nfs://nfs.example.com/export/jndi/src/README to refer to a file object that is being accessed using the Network File System (NFS) protocol. Similarly, a client can perform directory operations on a directory object in an LDAP server using the URL ldap://ldap.example.com/cn=Emily,ou=marketing .

To support composite names in general, JNDI defines a composite name syntax and utilities for processing composite names. This allows clients of JNDI to refer to objects using names that span multiple namespaces.

4.4 Events

As the naming/directory service plays an increasingly important role in the computing environment, the need to provide administration and monitoring tools to help manage changes in the service also increases. For such tools and other applications, the traditional request/response style of interaction needs to be augmented with an asynchronous notification model that allows applications to register interest in changes in the service.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


5 Overview of the Interface

Documentation Contents
CONTENTS | PREV | NEXT

5. Overview of the Interface

The JNDI API is contained in four packages:

  • javax.naming contains classes and interfaces for accessing naming services
  • javax.naming.directory extends the core javax.naming package to provide access to directories
  • javax.naming.event contains classes and interfaces for supporting event notification in naming and directory services
  • javax.naming.ldap contains classes and interfaces for supporting LDAP v3 extensions and controls

The JNDI service provider interface is contained one package:

  • javax.naming.spi contains classes and interfaces that allow various naming and directory service providers to be dynamically plugged in beneath the JNDI API (see the JNDI SPI document for details)

The following sections provide an overview of the JNDI API. For more details on the API, see the corresponding javadoc.

5.1 The Naming Package -- javax.naming 1

The javax.naming package. The information in this graphic is available in the API documentation.

(exception classes are not shown)

5.1.1 Contexts

Context is the core interface that specifies a naming context. It defines basic operations such as adding a name-to-object binding, looking up the object bound to a specified name, listing the bindings, removing a name-to-object binding, creating and destroying subcontexts of the same type, etc.

public interface Context {
    public Object lookup(Name name) throws NamingException;
    public void bind(Name name, Object obj) throws NamingException;
    public void rebind(Name name, Object obj) throws NamingException;
    public void unbind(Name name) throws NamingException;
    public void rename(Name old, Name new) throws NamingException;
    public NamingEnumeration listBindings(Name name) throws NamingException;
    ...
    public Context createSubcontext(Name name) throws NamingException;
    public void destroySubcontext(Name name) throws NamingException;
    ...
};

Every naming method in Context takes a name as an argument. The operation defined by the method is performed on the Context object that is obtained by implicitly resolving the name. If the name is empty ("") the operation is performed directly on the context itself. The name of an object can be a composite name reflecting the arrangement of the namespaces used to refer to the object. Of course, the client is not exposed to any naming service implementation. In fact, a new type of naming service can be introduced without requiring the application to be modified or even disrupted if it is running.

5.1.2 The Initial Context

In JNDI, every name is relative to a context. There is no notion of "absolute names." An application can bootstrap by obtaining its first context of class InitialContext :

public class InitialContext implements Context {
    public InitialContext()...;
    ...
}

The initial context contains a variety of bindings that hook up the client to useful and shared contexts from one or more naming systems, such as the namespace of URLs or the root of DNS.

5.1.3 Names

The Name interface represents a generic name--an ordered sequence of components. Each Context method that takes a Name argument has a counterpart that takes the name as a String instead. The versions using Name are useful for applications that need to manipulate names: composing them, comparing components, and so on. The versions using String are likely to be more useful for simple applications, such as those that simply read in a name and look up the corresponding object. The String name parameter represents a composite name. The Name parameter can represent a composite name or a compound name .

The CompositeName class represents a sequence of names (atomic or compound) from multiple namespaces. If the Name parameter supplied to a method of the Context class is an instance of CompositeName , the name represents a composite name.

If the Name parameter supplied to a method of the Context class is not an instance of CompositeName , the name represents a compound name, which can be represented by the CompoundName class or some other implementation class. The CompoundName class represents hierarchical names from a single namespace. A context's name parser can be used to manipulate compound names in the syntax associated with that particular context:

public interface Context {
    ...
    public NameParser getNameParser(Name name) throws NamingException;
    ...
}

A namespace browser is an example of the kind of application that might need to manipulate names syntactically at this level. Most other applications will work with strings or composite names.

5.1.4 Bindings

Context.lookup() is the most commonly used operation. The context implementation can return an object of whatever class is required by the Java application. For example, a client might use the name of a printer to look up the corresponding Printer object, and then print to it directly:

Printer printer = (Printer) ctx.lookup("treekiller");
printer.print(report);

Context.listBindings() returns an enumeration of name-to-object bindings, each binding represented by an object of class Binding . A binding is a tuple containing the name of the bound object, the name of the object's class, and the object itself.

The Context.list() method is similar to listBindings() , except that it returns an enumeration of NameClassPair objects. Each NameClassPair contains an object's name and the name of the object's class. The list() method is useful for applications such as browsers that wish to discover information about the objects bound within a context, but don't need all of the actual objects. Although listBindings() provides all of the same information, it is potentially a much more expensive operation.

public class NameClassPair ... {
    public String getName() ...;
    public String getClassName() ...;
    ...
}
public class Binding extends NameClassPair {
    public Object getObject() ...;
    ...
}

5.1.5 References

Different Context implementations are able to bind different kinds of objects natively. A particularly useful object that should be supported by any general-purpose context implementation is the Reference class. A reference represents an object that exists outside of the directory. References are used to give JNDI clients the illusion that objects of arbitrary classes are able to be bound in naming or directory services--such as X.500--that do not have native support for objects in the Java programming language.

When the result of an operation such as Context.lookup() or Binding.getObject() is a Reference object, JNDI attempts to convert the reference into the object that it represents before returning it to the client. A particularly significant instance of this occurs when a reference representing a Context of one naming system is bound to a name in a different naming system. This is how multiple independent naming systems are joined together into the JNDI composite namespace. Details of how this mechanism operates are provided in the JNDI SPI document.

Objects that are able to be represented by a reference should implement the Referenceable interface. Its single method -- getReference() -- returns the object's reference. When such an object is bound to a name in any context, the context implementation might store the reference in the underlying system if the object itself cannot be stored natively.

Each reference may contain the name of the class of the object that it represents, and may also contain the location (typically a URL) where the class file for that object can be found. In addition, a reference contains a sequence of objects of class RefAddr . Each RefAddr in turn contains a "type" string and some addressing data, generally a string or a byte array.

A specialization of Reference called a LinkRef is used to add "symbolic" links into the JNDI namespace. It contains the name of a JNDI object. By default, these links are followed whenever JNDI names are resolved.

5.1.6 Referrals

Some naming/directory services support the notion of referrals for redirecting a client's request to another server. The JNDI client can request that referrals be automatically followed, be ignored, or be processed manually.

The abstract class ReferralException is used to represent a referral:

public abstract class ReferralException extends NamingException {
    public abstract Context getReferralContext() throws NamingException;
    ...
    public abstract Object getReferralInfo();
    public abstract void retryReferral();
    public abstract boolean skipReferral();
}

When a referral is encountered and the client has requested that referrals not be ignored or automatically followed, a ReferralException is thrown. The getReferralInfo() method provides information--in a format appropriate to the service provider--about where the referral leads. The application is not required to examine this information; however, it might choose to present it to a human user to help him determine whether to follow the referral or not. skipReferral() allows the application to discard a referral and continue to the next referral (if any).

To continue the operation, the application re-invokes the method on the referral context using the same arguments it supplied to the original method.

5.2 The Directory Package -- javax.naming.directory 2

The javax.naming.directory package.

(exception classes are not shown)

5.2.1 Directory Objects

The DirContext interface enables the directory capability by defining methods for examining and updating attributes associated with a directory object.

public interface DirContext extends Context {
    public Attributes getAttributes(Name name)
                 throws NamingException;
    public Attributes getAttributes(Name name, String[] attrIds)
                 throws NamingException;
    ...
    public void modifyAttributes(Name name, int modOp, Attributes attrs)
                 throws NamingException;
    public void modifyAttributes(Name name, ModificationItem[] mods)
                 throws NamingException;
    ...
}

The getAttributes() operations on a directory return some or all of its attributes. Attributes are modified using two forms of modifyAttributes() . Both forms make use of a "modification operation," one of:

ADD_ATTRIBUTE
REPLACE_ATTRIBUTE
REMOVE_ATTRIBUTE

The ADD_ATTRIBUTE operation adds values to an attribute if that attribute already exists, while the REPLACE_ATTRIBUTE operation discards any pre-existing values. The first form of modifyAttributes() performs the specified operation on each element of a set of attributes. The second form takes an array of objects of class ModificationItem :

public class ModificationItem {
    public ModificationItem(int modOp, Attribute attr) ...;
    ...
}

Each operation is performed on its corresponding attribute in the order specified. When possible, a context implementation should perform each call to modifyAttributes() as an atomic operation.

5.2.2 Attributes

A directory object contains a set of zero or more Attribute objects. Each attribute is denoted by a string identifier and can have zero or more values of any type.

public interface Attribute ... {
    ...
    public String getID();
    public Object get(int n) throws NamingException;
    public boolean isOrdered();
    public NamingEnumeration getAll()
           throws NamingException;
    ...
}

An attribute's values can be ordered or unordered. If the values are unordered, no duplicates are allowed. If the values are ordered, duplicates are allowed.

Attributes are grouped into a collection by using the Attributes interface.

public interface Attributes ... {
    ...
    public Attribute get(String attrID);
    public NamingEnumeration getIDs();
    public NamingEnumeration getAll();
    public Attribute put(Attribute attr);
    public Attribute remove(String attrID);
    ...
}

JNDI provides implementations for these two interfaces, BasicAttribute and BasicAttributes , for convenience. Service providers and applications are free to use their own implementations.

Note that updates to Attributes and Attribute , such as adding or removing an attribute or its value, do not affect the corresponding representation in the directory. Updates to the directory can only be effected by using DirContext.modifyAttributes() .

5.2.3 Directory Objects as Naming Contexts

The DirContext interface also behaves as a naming context by extending the Context interface. This means that any directory object can also provide a naming context. In addition to a directory object keeping a variety of information about a person, for example, it is also a natural naming context for resources associated with that person: a person's printers, file system, calendar, etc.

Hybrid operations perform certain naming and directory operations in a single atomic operation:

public interface DirContext extends Context {
    ...
    public void bind(Name name, Object obj, Attributes attrs)
           throws NamingException;
    ...
}

Other hybrid operations that are provided are rebind() and createSubcontext() that accept an additional Attributes argument.

5.2.4 The Initial Context

An application that is performing directory operations can use InitialDirContext instead of javax.naming.InitialContext to create its initial context:

public class InitialDirContext
       extends InitialContext implements DirContext {
    public InitialDirContext() ...;
    ...
}

It can then invoke any method in the Context or DirContext interface on the initial context.

5.2.5 Searches

The DirContext interface supports content-based searching of directories. In the simplest and most common form of usage, the application specifies a set of attributes -- possibly with specific values -- to match. It then invokes the DirContext.search() method on the directory object, which returns the matching directory objects along with the requested attributes.

public interface DirContext extends Context {
    ...
    public NamingEnumeration search(Name name, Attributes matchingAttributes)
                 throws NamingException;
    public NamingEnumeration search(Name name,
                                    Attributes matchingAttributes,
                                    String[] attributesToReturn)
                 throws NamingException;
    ...
}

The results of the search are returned as a NamingEnumeration containing an enumeration of objects of class SearchResult :

public class SearchResult extends Binding {
    ...
    public Attributes getAttributes() ...;
}

In the more sophisticated case, it is possible to specify a search filter and to provide controlling information such as the scope of the search and the maximum size of the results. The search filter specifies a syntax that follows Internet RFC 2254 for LDAP. The SearchControls argument specifies such things as the scope of the search: this can include a single directory object, all of its children, or all of its descendants in the directory hierarchy.

public interface DirContext extends Context {
    ...
    public NamingEnumeration search(Name name,
                                    String filter,
                                    SearchControls ctls)
           throws NamingException;

    public NamingEnumeration search(Name name,
                                    String filter,
                                    Object[] filterArgs,
                                    SearchControls ctls)
                throws NamingException;
        ...
}

5.2.6 Schema

A schema describes the rules that define the structure of a namespace and the attributes stored within it. The granularity of the schema can range from a single schema that is associated with the entire namespace, to a per-attribute, fine-grained schema description.

Because schemas can be expressed as an information tree, it is natural to use for this purpose the naming and directory interfaces already defined in JNDI. This is powerful because the schema part of a namespace is accessible to applications in a uniform way. A browser, for example, can access information in the schema tree just as though it were accessing any other directory objects.

Applications can retrieve the schema associated with a directory object when the underlying context implementation provides the appropriate support.

DirContext.getSchema() is used to retrieve the root of the schema tree associated with a directory object. The root has children such as "ClassDefinition", "AttributeDefinition", and "SyntaxDefinition", each denoting the kind of definition being described. The schema root and its descendents are objects of type DirContext . The DirContext.getSchemaClassDefinition() method returns a DirContext that contains class descriptions about a particular directory object.

public interface DirContext extends Context {
        ...
        public DirContext getSchema(Name name)
                throws NamingException;

        public DirContext getSchemaClassDefinition(Name name)
                throws NamingException;
        ...
}

In addition, the schema associated with any attribute can be accessed using the Attribute.getAttributeDefinition() and getAttributeSyntaxDefinition() methods.

public interface Attribute ... {
    ...
    public DirContext getAttributeDefinition() throws NamingException;
    public DirContext getAttributeSyntaxDefinition()
    throws NamingException;
    ...
}

The following diagram shows the different associations for accessing schema information.

Example mapping Directory to Schema

Example mapping Directory to Schema

5.3 The Event Package -- javax.naming.event 3

The javax.naming.event package. The information in this graphic is available in the <a href= API documentation." WIDTH="769" HEIGHT="258" ALIGN="BOTTOM" BORDER="0" >

The javax.naming.event package contains classes and interfaces for supporting event notification in naming and directory services.

5.3.1 Naming Events

A NamingEvent represents an event that is generated by a naming/directory service.

public class NamingEvent extends java.util.EventObject {
    ...
    public int getType();
    public Binding getOldBinding();
    public Binding getNewBinding();
    ...
}

The event's type identifies the type of event. The NamingEvent class defines four types of events:

  1. OBJECT_ADDED
  2. OBJECT_REMOVED
  3. OBJECT_RENAMED
  4. OBJECT_CHANGED

These types can be placed into two categories:

  • Those that affect the namespace (add/remove/rename an object)
  • Those that affect an object's contents

In addition to the event's type, a NamingEvent contains other information about the change, such as information about the object before and after the change.

5.3.2 Naming Listeners

A naming listener is an object that registers for NamingEvent s. It is represented by the interface NamingListener . Each category of NamingEvent is handled by a corresponding subtype of NamingListener . The NamespaceChangeListener interface represents a listener interested in namespace changes, while the ObjectChangeListener represents a listener interested in changes to an object's contents. A listener implementation might implement one or both of these interfaces, depending on the types of events it is interested in.

5.3.3 Event Registration and Deregistration

The EventContext and EventDirContext interfaces extend the Context and DirContext interfaces, respectively, to support event registration and deregistration.

public interface EventContext extends Context {
    ...
    public void addNamingListener(Name target,
                                  int scope,
                                  NamingListener l)
           throws NamingException;
    public void removeNamingListener(NamingListener l)
           throws NamingException;
    public boolean targetMustExist()
           throws NamingException;
}

Like methods in the corresponding Context interface, addNamingListener() has an overload that accepts a String name argument. The name parameter is referred to as the target . The scope parameter specifies whether the registration is for the object named by the target, the immediate children of the context named by the target, or the entire subtree rooted at the object named by the target.

It is possible to register interest in a target that does not exist, but there might be limitations in the extent to which this can be supported by the service provider and underlying protocol/service. An application can use the method targetMustExist() to check whether an EventContext supports registration of nonexistent targets.

public interface EventDirContext extends EventContext, DirContext {
    public void addNamingListener(Name target,
                                  String filter,
                                  SearchControls ctls,
                                  NamingListener l)
                throws NamingException;
    public void addNamingListener(Name target,
                                  String filter,
                                  Object[] filterArgs,
                                  SearchControls ctls,
                                  NamingListener l)
                throws NamingException;
    ...
}

The EventDirContext interface extends the EventContext and DirContext interfaces to allow a listener to register interest in objects identified using search filters (Internet RFC 2254).

Like methods in the corresponding DirContext interface, addNamingListener() methods have overloads that accept a String name argument.

The EventContext/EventDirContext instance on which the addNamingListener() method is invoked is the event source of the events that are (potentially) generated. When the registered listener invokes getSource() or getEventContext() on a NamingEvent , the result will be this EventContext / EventDirContext instance.

For example, suppose a listener makes the following registration:

NamespaceChangeListener listener = ...;
src.addNamingListener("x", SUBTREE_SCOPE, listener);

When an object named "x/y" is subsequently deleted, the corresponding NamingEvent ( evt ) delivered to listener must contain src as its event source. The following will both be true:

evt.getEventContext() == src
evt.getOldBinding().getName().equals("x/y")

5.3.4 Exception Handling

When a listener registers for events with a context, the context might need to do some internal processing in order to collect information required to generate the events. The context, for example, might need to make a request to the server to register interest in changes on the server that will eventually be translated into events. If an error occurs that prevents information about the events from being collected, the listener will never be notified of the events. When such an error occurs, a NamingExceptionEvent is fired to notify the listener, and the listener is automatically deregistered.

The base NamingListener interface defines a namingExceptionThrown() method so that a listener can be notified of such an error.

public interface NamingListener extends java.util.EventListener {
    public void namingExceptionThrown(NamingExceptionEvent evt);
}

5.4 The LDAP Package -- javax.naming.ldap 4

The javax.naming.ldap package. The information in the graphic is available in the API documentation.

The javax.naming.ldap package contains classes and interfaces for using LDAP v3-specific features that are not already covered by the more generic javax.naming.directory package. In fact, the majority of JNDI applications that use LDAP will find the javax.naming.directory package sufficient, and will not need to use this package at all. This package is primarily for those applications that need to use extended operations, controls, or unsolicited notifications.

5.4.1 Extended Operations

In addition to specifying well-defined operations such as search and modify, the LDAP v3 protocol (Internet RFC 2251) specifies a way of transmitting yet-to-be defined operations between the LDAP client and server. These operations are referred to as extended operations . An extended operation may be defined by a standards organization such as the IETF or by a vendor.

The LdapContext interface defines a method for executing an extended operation:

public interface LdapContext extends DirContext {
    public ExtendedResponse extendedOperation(ExtendedRequest request)
           throws NamingException;
    ...
}

The ExtendedRequest interface represents the argument to an extended operation, while the ExtendedResponse interface represents the result of the extended operation. An ExtendedRequest or ExtendedResponse consists of an identifier that identifies the extended operation and a byte array containing the ASN.1 BER encoded contents of the request/response.

An application typically does not deal directly with the ExtendedRequest / ExtendedResponse interfaces. Instead, it deals with classes that implement these interfaces. The application gets these classes either as part of a repertoire of extended operations standardized through the IETF, or from directory vendors for vendor-specific extended operations. The request classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "get time" extended operation. It would supply classes such as GetTimeRequest and GetTimeResponse , so that applications can use this feature. An application would use these classes as follows:

GetTimeResponse resp =
   (GetTimeResponse)lctx.extendedOperation(new GetTimeRequest());
long time = resp.getTime();

5.4.2 Controls

The LDAP v3 protocol (Internet RFC 2251) allows any request or response to be augmented by yet-to-be defined modifiers. These modifiers are referred to as controls . Controls that are sent with requests are called request controls and those that are sent with responses are called response controls . A control may be defined by a standards organization such as the IETF or by a vendor. There is not necessarily a pairing between request controls and response controls.

JNDI classifies request controls into two categories:

  • connection request controls: those that affect how a connection is created
  • context request controls: those that affect context methods

Connection request controls are used whenever a connection needs to be established or re-established with an LDAP server. Context request controls are used when all other LDAP operations are sent to the LDAP server. The reason for this distinction is because JNDI is a high-level API that does not deal directly with connections. It is the job of service providers to do any necessary connection management. Hence, a single connection might be shared by multiple context instances, and a service provider is free to use its own algorithms to conserve connection and network usage. Thus, when a method is invoked on the context instance, the service provider might need to do some connection management in addition to performing the corresponding LDAP operations. For connection management, it uses the connection request controls, while for the normal LDAP operations, it uses the context request controls.

The LdapContext interface defines methods for dealing with controls:

public interface LdapContext extends DirContext {
    public void reconnect(Control[] connCtls) throws NamingException;
    public Control[] getConnectControls() throws NamingException;
    ...
    public LdapContext newInstance(Control[] reqCtls)
           throws NamingException;
    public void setRequestControls(Control[] reqCtls)
           throws NamingException;
    public Control[] getRequestControls() throws NamingException;
    ...
    public Control[] getResponseControls() throws NamingException;
}

The Control interface represents a control. It consists of an identifier that identifies the control and a byte array containing the ASN.1 BER encoded contents of the control.

Connection request controls are initialized using the initial context constructor and are inherited by contexts that are derived from a context. reconnect() is used to change the connection request controls of a context. A context's connection request controls are retrieved using getConnectControls() .

Context request controls are initialized using newInstance() and changed using setRequestControls() . newInstance() is a convenience method for creating a new instance of a context for the purposes of multithreaded access. For example, if multiple threads want to use different context request controls, each thread may use this method to get its own copy of this context and set/get context request controls without having to synchronize with other threads.

Unlike connection request controls, context request controls are not inherited by context instances that are derived from a context. Derived context instances are initialized with no context request controls. You must set the request controls of a derived context instance explicitly using setRequestControls() . A context's context request controls are retrieved using getRequestControls() .

5.4.3 The Initial Context

An application that is performing LDAP extended operations or controls can use InitialLdapContext instead of javax.naming.InitialContext or javax.naming.directory.InitialDirContext to create its initial context:

public class InitialLdapContext extends InitialDirContext implements LdapContext {
    public InitialDirContext() ...;
    public InitialDirContext(Hashtable env, Control[] connCtls) ...;
}

It can then invoke any method in the Context , DirContext , or LdapContext interfaces on the initial context. By using the constructor that accepts a connCtls argument, the application can specify controls to be used when establishing a connection with the LDAP server.

5.4.4 Unsolicited Notifications

In addition to the normal request/response style of interaction between the client and server, the LDAP v3 protocol also specifies unsolicited notifications --messages that are sent from the server to the client asynchronously, not in response to any client request.

JNDI supports unsolicited notifications using the event model embodied in the javax.naming.event package. It defines an UnsolicitedNotificationEvent class and a corresponding UnsolicitedNotificationListener interface. An application registers to receive UnsolicitedNotificationEvent s by supplying an UnsolicitedNotificationListener to EventContext.addNamingListener() .

1. See Appendix C for legend of class diagram.

2. See Appendix C for legend of class diagram.

3. See Appendix C for legend of class diagram.

4. See Appendix C for legend of class diagram.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


6 Configuration

Documentation Contents
CONTENTS | PREV | NEXT

6. Configuration

6.1 Environment Properties

Some JNDI applications need a way to communicate various preferences and information that define the environment in which naming and directory services are accessed. For example, an application might need to specify the level of security for accessing a directory service. Or, when directory and naming services are distributed, the source of information is in more than one place--replicas, master, caches, etc. An application might want to access information from the authoritative source and needs to indicate this information to the JNDI system.

To address these requirements, JNDI defines a number of properties that developers and users can use to provide configuration information to the JNDI system. These are called environment properties .

There are different types of environment properties:

  • Standard JNDI environment properties. These properties are defined by JNDI and are common across all service providers. They are defined in relatively generic terms. For example, the property "java.naming.security.principal" is used to specify the security principal for authentication to the naming service. Individual service providers map these environment properties to an interpretation appropriate for their service. These properties have the prefix "java.naming.". contains a list of standard JNDI environment properties. The Context interface defines constants for most of these environment property names.
  • Service-specific environment properties. These properties are common across all service providers that implement a particular service or protocol. They have the prefix "java.naming. service. ", where service is the name of the service. For example, the prefix "java.naming.ldap." is used for LDAP-specific environment properties.
  • Feature-specific environment properties. These properties are common across all service providers that support a particular feature. They have the prefix "java.naming. feature .", where feature is the name of the feature. For example, the prefix "java.naming.security.sasl." is used for SASL-specific environment properties.
  • Provider-specific environment properties. These properties only apply to a particular service provider. They should have a prefix that reflects this uniqueness. A common practice is to use the package name of the service provider as the prefix. For example, since Sun's LDAP provider is primarily contained in the package com.sun.jndi.ldap , properties specific to Sun's LDAP provider have the prefix "com.sun.jndi.ldap.".

See the following section for security-related considerations when using environment properties.

Although the support for environment properties is rather extensive, it is important to note that an application typically does not need to deal with them, or only needs to set one or two properties. Most properties have reasonable defaults and only need to be adjusted when the application has special requirements.

6.2 Context Environment

A context's environment is represented as a java.util.Hashtable or any of its subclasses (e.g., java.util.Properties 1 ). It is typically specified using an argument to the InitialContext , InitialDirContext , or InitialLdapContext constructors, and augmented with data from other sources (as discussed in the rest of this section). They are inherited from the parent context as context methods proceed from one context to the next. For example, the following code creates an environment consisting of two security-related properties and creates an initial context using that environment.

Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, "jsmith");
env.put(Context.SECURITY_CREDENTIALS, "xxxxxxx");
Context ctx = new InitialContext(env);

Contexts that are looked up or otherwise derived from this initial context will have these two properties in their environment.

A context's environment can be examined using Context.getEnvironment() .

Not all environment properties are meaningful to all contexts. Those that are not meaningful are ignored by the context but inherited by derived contexts (because they might be meaningful, for instance, to federated contexts).

6.3 Resource Files

A JNDI resource file is a file in the properties file format (see java.util.Properties ). The file contains a list of key/value pairs. The key is the name of the property (e.g., "java.naming.factory.object") and the value is a string in the format defined for that property. Here is an example of a JNDI resource file:

java.naming.factory.object=com.wiz.jndi.AttrsToCorba:com.wiz.jndi.ToPerson
java.naming.factory.state=com.wiz.jndi.CorbaToAttrs:com.wiz.jndi.FromPerson
java.naming.factory.control=com.wiz.jndi.MyResponseControlFactory

There are two kinds of JNDI resource files: application and provider.

Application Resource Files

When an application is deployed, it will generally have several codebase directories and JARs in its classpath. Similarly, when an applet is deployed, it will have a codebase and archives specifying where to find the applet's classes. JNDI locates all application resource files named jndi.properties in the classpath. In addition, if the file $JAVA_HOME/lib/jndi.properties exists and is readable, JNDI treats it as an additional application resource file. ( $JAVA_HOME is the directory named by the java.home system property.) All of the properties contained in these files are placed into the environment of the initial context. This environment is then inherited by other contexts.

For each property found in more than one application resource file, JNDI uses the first value found or, in a few cases where it makes sense to do so, it concatenates all of the values. For example, if the java.naming.factory.object property is found in three jndi.properties resource files, the list of object factories is a concatenation of the property values from all three files. Using this scheme, each deployable component is responsible for listing the factories that it exports. JNDI automatically collects and uses all of these export lists when searching for factory classes.

Application resource files are available beginning with the Java Platform, except that the file in $JAVA_HOME/lib can be used on all Java platforms.

Provider Resource Files

Each service provider has an optional resource file that contains properties specific to that provider. The name of this resource is:

[prefix/]jndiprovider.properties

where prefix is the package name of the provider's context implementation(s), with each period (".") converted to a slash ("/").

The JNDI library will consult the provider resource file when determining the values of certain properties. Properties other than these can be set in the provider resource file at the discretion of the service provider. The service provider's documentation should clearly state which properties are allowed.

6.4 Application/Applet-scope Standard JNDI Properties

Certain standard JNDI properties can alternately be set in the Java runtime's system properties, or in an applet's parameter list. These properties are:

java.naming.factory.initial
java.naming.factory.object
java.naming.factory.state
java.naming.factory.control
java.naming.factory.url.pkgs
java.naming.provider.url
java.naming.dns.url

For JNDI to access an applet's parameters, the applet code must set the java.naming.applet environment property to an instance of the applet ( java.applet.Applet ).

When these properties are set as system properties or applet parameters, they affect all of the application's/applet's contexts.

6.5 How the Environment Properties are Set

When JNDI constructs an initial context, the context's environment is initialized with properties defined in the environment parameter passed to the constructor and all application resource files. For the application/applet-scope properties, their values from the system properties and the applet parameters are also used.

JNDI passes the resulting environment to the initial context implementation. The environment is then inherited by contexts that are derived from the initial context. Since JNDI performs any necessary merging of the properties and their values, there is no need for the application or context implementation to directly consult the system properties or applet parameters.

6.6 Modifications to the Environment

A context's environment can be changed using the addToEnvironment() and removeFromEnvironment() methods:

public interface Context {
        public Object addToEnvironment(String propName, Object val)
                throws NamingException;
        public Object removeFromEnvironment(String propName)
                throws NamingException;
        ...
}

Not all environment properties are meaningful to all contexts. Changes to those that are not meaningful are still recorded and passed onto derived contexts.

Scope

Changing a property using the addToEnvironment() or removeFromEnvironment() methods affects the context instance on which the method is invoked. For example, if you specify new credentials for a context to use, subsequent methods invoked on that context that require communication with the server will use those new credentials (perhaps internally by first creating a new connection to the server). These updated environment properties are inherited by context instances that are subsequently derived from the affected context instance, but do not otherwise affect other context instances that were in existence prior to the update.

Timeliness

When a change is made to the environment properties, there is no requirement that the change be verified and acted upon at the time addToEnvironment() or removeFromEnvironment() is invoked. The only requirement is that the change (or changes) be effective the next time an operation that uses that property is invoked.

Defaults

For some environment properties, JNDI defines defaults (see Appendix A). For others, the default might be determined by the service provider or a group of service providers. If a context's environment does not have a particular property, the context behaves as if its environment has that property with its default value.

When a property is removed from a context's environment, the context assumes the default behavior specified for that property. This does not necessarily mean that the default value must be recorded as the property's value. The removal may also be indicated by the absence of the property from the context's environment.

Acceptable Values

Some environment properties have a fixed set of acceptable values while others have values that must follow a particular syntax. If an unacceptable value is presented, a property-specific exception will be thrown (for example, ConfigurationException , IllegalArgumentException , or AuthenticationNotSupportedException ). In some cases, it might be reasonable for the service provider to accept additional values than those specified, in which case, those values should be documented.

1. Note that if you use Properties, only the top-level properties are consulted--its defaults are not consulted--because Hashtable.get() is used when retrieving entries from the environment. See java.util.Properties for details.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


7 Scenarios

Documentation Contents
CONTENTS | PREV | NEXT

7. Scenarios

This section outlines a few application scenarios to help illustrate the capabilities enabled by JNDI.

The examples below are not meant to be prescriptive. There are often several ways to solve a problem, and JNDI is designed with flexibility in mind.

7.1 User authentication

In secure systems, a user must authenticate himself to the computer, network, or service that he wishes to access. For example, logging into UNIX requires the user to supply a password. Similarly, use of SSL requires that the user supply his X.509 certificate. Such authentication information can be stored as attributes associated with each user in the directory. The system performing the authentication would look up the attribute (for example, "password") of the user and verify the authenticity using the information supplied by the user.

DirContext ctx = new InitialDirContext();
Attribute attr = ctx.getAttributes(userName).get("password");
String password = (String)attr.get();

7.2 Electronic Mail

A useful feature of an electronic mail system is a directory service that provides a mapping between users and email addresses. This allows mail users to search for the email address of a particular user. This is analogous to searching for an individual's telephone number in the phone book in order to dial his phone number. For example, when I want to send mail to John Smith in my department, I search for "John Smith" in the directory using a "search" widget in the mail application. The widget returns to me five entries of John Smith, from which I select the one that is in a building on my site and use the email address attribute associated with that entry.

NamingEnumeration matches = deptCtx.search("user", new BasicAttributes("name", "John Smith"));
// use matches to construct a selectable list for end-user
while (matches.hasMore()) {
    SearchResult item = (SearchResult) matches.next();
    Attributes info = item.getAttributes();
    /* display attributes */
    ...
}

The directory could also be used by users to set up personalized address books. For example, once I have located John Smith's email address, I might not want to search the directory again each time I send him mail. Instead, I can create a personal subtree in the directory in which I maintain entries that I frequently use, possibly by creating links to the existing entries.

7.3 Databases

Database applications can use the directory to locate database servers. For example, a financial application needs to get the stock quotes from a stock quote server using JDBC. This application can enable the user to select the stock quote server based on specification of some attributes (such as coverage of which markets and frequency of quote updates). The application searches the directory for quote servers that meet these attributes, and then retrieves the "location" attribute (a JDBC URL) of the selected quote server and connects to it.

NamingEnumeration matches =     ctx.search("service/stockQuotes",
                                        "(&(market=NASDAQ)(updateFreqency<=300))", searchctls);
while (matches.hasMore()) {
           SearchResult item = (SearchResult)matches.next();
           Attribute location = item.getAttributes().get("location");
   ...
}

7.4 Browsing

When using almost any kind of interactive application that asks a user to input names, the user's job is made easier if a namespace browser is available to him. The browser can either be built into the application and tailored to suit that application in particular, or it can be more general-purpose such as a typical web browser.

A very simple example of a JNDI browser allows a user to "walk" through a namespace, viewing the atomic names at each step along the way. The browser prints a "*" to highlight the name of each Context , thus telling the user where he can go next. 1

// Start at the top -- the initial context.
Context ctx = new InitialContext();
while (ctx != null) {           // display one level
    NamingEnumeration   items = ctx.list();
    while (items.hasMoreElements()) {
        NameClassPair item = (NameClassPair)items.next();
        if (isContext(item.getClassName())) {
            System.out.print("*");
        } else {
            System.out.print(" ");
        }
        System.out.println(" " + item.getName());
    }
    // Take the next step down into the namespace.
    String target = input.readLine();
    try {
        ctx = (Context)ctx.lookup(target);
    } catch (NamingException e) {
        // handle error
    } catch (ClassCastException e) {
        // not a context; cannot traverse
    }
}

7.5 Network Printing

An important function of a printing service is to provide a means for its human users to easily discover and select printers in the network. An application that needs to print, or the machine on which it runs, should not have to be configured each time a new printer is added to the network. The scope of network access to printers may range from a workgroup to global. The printing service can use the directory to provide this capability.

Assume that printers are represented by a Printer interface. One of the methods in it could be print() which, when given an InputStream , will read data from InputStream and print it on the printer represented by this instance of Printer.

interface Printer {
        void print(InputStream data) throws PrinterException;
        ...
}

A user selects a printer using a logical printer name, either explicitly or through default settings. For example, the user might have specified a default printer to use for all his applications, which is overridden only when he explicitly specifies another printer to use. The application that is accepting the print request takes the printer name and looks it up in the directory service. The application expects to receive as the result an object that implements the Printer interface.

void myAppPrint(String printerName, String fileName) throws IOException {
    try {
        DirContext ctx = new InitialDirContext();
        Printer prt = (Printer) ctx.lookup(printerName);
        prt.print(new FileInputStream(fileName));
    } catch (NamingException e){
        System.err.println("Could not locate printer: " + e);
    } catch (ClassCastException e) {
        System.err.println(printerName + "does not name a printer");
    }
}

7.5.1 Browsing and searching for printers

Selecting a printer by explicitly giving its name is but one way of identifying a printer. The user can also use the directory to see the different printers available (browsing), or to search for printers with particular attributes. For example the user can ask the directory to list all the printers on the second floor of building 5 in the Mountain View campus, or search for all color laser printers with 600dpi resolution. From the application's perspective, just as lookup() returned a Printer object, the list and search operations also provide the same capability of returning Printer objects that the application could use to submit print requests.

1. The isContext() method used in the example is not part of JNDI. It is a method that must be provided by the application.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


8 Security Considerations

Documentation Contents
CONTENTS | PREV | NEXT

8. Security Considerations

There are two main settings in which JNDI is used: with and without a security manager installed.

In the case of Java applications running with no security manager installed, the code is trusted and the application can access service providers from the local classpath. Furthermore, there is no restriction if the service providers access local files, or make network connections to naming or directory servers anywhere on the network.

In the case of an applet or application running with a security manager installed, there can be trusted code and untrusted code within the same applet or application. The Sharing Context Handles and Context Environment sections below are especially applicable in such a scenario. The ability of an applet or an application running with a security manager installed to access service providers, especially service providers that require the use of restricted resources (like the file system or network connections) may be severely limited.

8.1 JNDI Classes

The classes in the JNDI packages contain no native methods. They do not require any special installation in order to run inside an applet or an application.

JNDI uses several system properties (see Application/Applet-scope Standard JNDI Properties ). This allows applets and applications to be configured easily without much programming. However, an applet or application might have restricted access to some or all system properties as a result of the security manager installed on the platform on which it is running. Consequently, JNDI also allows these same properties to be specified as applet parameters, in resource files, or as environment properties passed to a context.

In the Java Platform, the JNDI classes use doPrivileged blocks when accessing the system properties listed in Application/Applet-scope Standard JNDI Properties .

8.2 Security Model

JNDI does not define a security model or a common security interface for accessing naming and directory servers. Security-related operations, such as those required for authentication or access control to the directory service, are dealt with by individual service providers. JNDI provides the means by which an application or applet can pass such security-related information to service providers in order to establish a connection with the service, but does not itself take part in such security-related activities.

JNDI also provides the means by which security-related problems can be indicated to the client in the form of security-related exceptions.

JNDI service providers are controlled by the security manager in place when they try to gain access to protected resources such as the file system or network. Some service providers may control directory access by making use of the Java Platform security architecture (for example, allowing access to special ports for administration-related applets).

8.3 Access To Servers

Naming and directory services typically have their own security system in place to protect information stored therein. For example, one directory might require that its users first "login" to the directory before reading or updating information in the directory. Some services might allow anonymous access to part of its namespace/directory.

Once a user has logged into a service, it is imperative for security reasons not to share that privilege with untrusted code.

8.4 Sharing Context Handles

In the following discussion, we refer to a context handle as a reference to a Context instance. This is analogous to how a reference to a Reader / Writer / InputStream / OutputStream instance is often referred to as a file handle .

A context handle should be treated like any other protected resource. If a piece of trusted code obtains a context handle (possibly by authenticating its access with the directory server), it should protect the use of that context against unauthorized or untrusted code. This is analogous to how application and/or applet code should protect file handles. For example, if a piece of trusted code opens a file for writing (and it was granted such privilege because of its trusted nature), it should be careful about passing that file handle to any other pieces of code, trusted or otherwise.

Similarly, giving access of a context handle to untrusted code may lead to its misuse in accessing or updating information in the directory, or accessing security-sensitive environment properties associated with the context.

8.5 Context Environment

JNDI allows the application/applet to pass preferences and information to a context in the form of an environment. The application/applet can also get the current environment from a context. See Configuration and Appendix A for more information on a context's environment.

The nature of the information contained in a context's environment might be sensitive and need protection from untrusted access. Specifically, the environment properties java.naming.security.principal and java.naming.security.credentials contain information that should not be given out to untrusted code. Service providers might take precaution to protect against accessing these properties (see Responsibilities of Service Providers below). Client applications and applets should take care not to pass context handles with such sensitive environment properties to untrusted code.

8.6 Class Loading

JNDI allows the class files to be loaded dynamically.

When JNDI is run on the Java platform, it will attempt to load such classes from the locations specified in the codebase using the java.net.URLClassLoader . In order for the class loading to succeed, you must grant the application and the JNDI and service provider classes the permissions appropriate for the URLs named in the codebase. For example, if the URL scheme is "http" or "ftp", you must grant the application the appropriate java.net.SocketPermission ; if the URL scheme is "file", you must grant the application the appropriate java.io.FilePermission .

8.7 Serializable Objects

Several of the JNDI classes are serializable. This allows the objects to be accessed in the form of a byte stream, possibly outside of the environment in which they were created.

8.8 Responsibilities of Service Providers

8.8.1 Context Environment

When a context handle is created (either by getting the initial context or by looking it up or by creating it from the directory), some environment properties may be specified for it. Sometimes security-related properties are required for the creation of the context handle (such as user information that "logs" the user in with the directory). The service provider should take care to protect this security-sensitive information from untrusted code.

The service provider needs to protect the context's environment from being tampered or otherwise modified by untrusted code. The service provider needs to protect the security-sensitive environment properties from being read by untrusted code. It might do this by disallowing any thread whose execution context and/or trust level is different than that originally held by the thread that created the context handle to use the context handle. Or it might disallow certain operations (such as accessing security-sensitive environment properties). Or it might simply not return security-sensitive environment properties, or only return them to trusted code.

8.8.2 Network Security

Untrusted code (such as those found in untrusted applets) have limited access to the network. Untrusted applets, for example, can only create a network connection to the host from which they were downloaded. With finer-grain security models, it will be possible for the service provider itself to be trusted code, and hence be allowed to connect to hosts not allowed for untrusted applets. In such a scenario, the service provider should be careful not to compromise the security intended by the security manager. If the service provider is sure that access by an untrusted applet to the directory will cause no security problems, then it may proceed to offer such a service to untrusted code. For example, allowing untrusted code to access a directory "anonymously" would post no security problems because the directory already allows any anonymous client (written in the Java programming language or otherwise) to access the same data.

Most naming and directory services are accessed over the network. Although the data requested is protected by the server's authentication and access control mechanisms, some protocols do not protect (encrypt) the data being sent as replies. Again, this is not a problem particular to a client using JNDI but a problem for any client accessing the directory. The service provider should document the security implications associated with using the associated directory over a network.

8.8.3 Accessing Local Files

Similar to network access, untrusted code has limited access to the local file system. If the service provider has special privileges for accessing local files, it should do so with utmost precaution so as not to compromise the security policies intended by the runtime/platform.

8.8.4 Privileged Code, Native Methods

A service provider that is written completely in the Java programming language with no privileged sections is controlled by the same security policies afforded other code written in the Java programming language. All protected resources that it attempts to access go through the same security manager and access controller.

If a service provider contains privileged code sections, or if it contains native methods, then it needs to be especially careful to preserve the security policies intended by the runtime/platform.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


9 Design Choices

Documentation Contents
CONTENTS | PREV | NEXT

9. Design Choices

9.1 Separation of Interfaces into Context and DirContext

There are two core interfaces in JNDI: Context , and DirContext , with DirContext extending the base naming operations in Context with directory service operations. They have been separated into separate interfaces both for modularity and also in keeping with the "pay for what you use" goal of JNDI.

Naming is a basic component found in many computing services such as file systems, spreadsheets, calendar services, and directory services. By having a base Context interface for the naming operations, we enable its use by all these other services, not just for directory services.

DirContext extends Context to provide basic directory service operations, which include manipulation of attributes associated with named objects, attribute-based searches, and schema-related operations of those attributes and named objects.

9.2 Separation of JNDI into Different Functional Packages

JNDI is separated into four client packages ( javax.naming , javax.naming.directory , javax.naming.event , javax.naming.ldap ) and a service provider package ( javax.naming.spi ). The idea is that each package contains the interfaces and classes required for a particular category of applications, again in keeping with the "pay for what you use" goal. For example, an application that just wants to perform name-lookups only needs to use the javax.naming package. An application that wants to examine/modify attributes associated with an object uses the javax.naming and javax.naming.directory packages. An application that needs to use LDAP-specific controls or extended operations uses the javax.naming.ldap package. There is a step-by-step progression of what classes and interfaces each category of application writer needs to learn and use.

9.3 Separation of Client APIs and Service Provider Interfaces

JNDI separates interfaces and classes that a client application needs to use from those that are only of interest to service providers into different packages. For example, a client would use interfaces and classes from javax.naming , while a service provider that is hooking up a naming service would use both javax.naming and javax.naming.spi . The package delineation minimizes confusion for the application developer and makes clear which packages he needs to examine when writing his program.

9.4 Multiple methods for listing Context

There are two common types of applications that list contexts: browser-style applications, and applications that need to perform operations on the objects in a context en-masse. Browser-style applications typically want to display the names of the contents of a context. In addition to the names, many browsers often require type information of the objects bound to the names, so that it can display appropriate pictorial representations of the objects. The browser is usually interactive. Once a user has used a browser to display the contents of a context, he would then select one or a few of the entries displayed and request more information on it.

Some applications need to perform operations on objects within a context en-masse. For example, a backup program might want to perform "file stats" operations on all the objects in a file directory. A printer administration program might want to restart all the printers in a building. To perform such operations, these programs need to obtain all the objects bound in a context.

With these two common styles of usage in mind, the Context interface has two types of list methods: list() and listBindings() . list() returns a list of name/class-name pairs while listBindings() returns a list of name/class-name/object tuples. list() is designed for browser-style applications that want mostly just the names and types of objects bound in a context. listBindings() is for applications that want to potentially get all the objects in the context, as well as their names and types. listBindings() returns an enumeration of Binding . Both the listBindings() operation itself and invocation of methods in the Binding class (e.g. getObject() ) could be implemented lazily or eagerly. Using listBindings() simply indicates the potential that the caller might want all or many of the objects in the context so that implementations that are able can optimize for it. Using list() indicates that the caller is unlikely to want all, if any, objects in the context so implementations can optimize for that if possible.

An alternative is to have a single list operation and have the lazy or eager behavior as part of the implementation of Binding . The advantage of this is that there is a single list operation to learn. The disadvantage is that the caller has no way of indicating which piece of information he wants back from list, and subsequently, implementations cannot optimize for the eventual behavior of the program.

9.5 Support for Federation

Federation is a first-class concept in JNDI. In the client interfaces, it is supported by the use of the Name interface for specifying names that can span one or more namespaces. The caller of the methods in the client interface need not know anything else regarding federation. Resolution of names across multiple systems is handled by the SPI and does not involve any intervention on the part of the caller.

Although federation is a first-class concept, that does not mean that all callers and service providers must make use of it. If an application or service does not want to take advantage of federation, there is no requirement that Name always span multiple namespaces. Name can just name objects within a single namespace, and the SPI can handle name resolution within a single namespace as well (as a degenerate case of multiple namespace support).

9.6 DirContext versus DirObject

Instead of having DirContext extend Context , an alternative would be to not extend Context at all but to have a separate interface called DirObject that encapsulates all the directory-related methods. In that case, an object can implement both Context and DirObject if it supports both the naming and directory operations; another object might implement just DirObject .

The problem with eliminating DirContext is that DirContext contains some hybrid operations that involve both naming and directories ( bind() , createSubcontext() methods that accept attributes as arguments). To keep these operations and have DirObject at the same time would produce the need for a third interface (perhaps called DirContext ) to contain just these hybrids.

Furthermore, having DirContext instead of DirObject is somewhat more convenient in that you can perform some operations in one step instead of two. For example DirContext.getAttributes() could be used to get the attributes associated with a named object, whereas with DirObject , you would need first to resolve to the object ( Context.lookup() ) and then use DirObject.getAttributes() to get the attributes from it.

9.7 Support for Schemas

The DirContext interface contains support for schemas. For example, from a DirContext object you can obtain its schema object, which points to the directory space where the schema for this particular DirContext instance is defined. From a DirContext object, you can also obtain its schema class definition (i.e. information about what type of object this represents in the directory). There is further support for schemas in the Attribute class, which contains methods for obtaining an attribute's syntax information (i.e. what is the type of the attribute's value) and the attribute's definition (e.g. is it multivalued, syntax, constraints on its syntax). There is no requirement that any of this schema information be dynamically accessible (i.e. points to live directory spaces). Support for such schema information could be generated statically by the service provider. For example, a particular directory service might only support string attribute values, so it can hard-wire the syntax of the attributes that it returns. Another directory might support only static schemas (where information in the schema are not modifiable). Yet another directory might support fully dynamic schemas. The interfaces and classes in DirContext are flexible enough that these different levels of support for schemas can be accommodated.

9.8 Overloaded Methods in Context and DirContext

For each method in the Context and DirContext interfaces that accepts a Name argument, there is a corresponding overloaded form that accepts a String argument for specifying a name.

The motivation for having the String -based methods is that there are many applications that simply accept a string name from the end-user and perform context methods on the object named by that string name. For those applications, it is useful to have the context methods accept a string for the name directly, instead of requiring the applications to first construct a Name object using the string name.

The motivation for having the Name -based methods is that there are also many applications that manipulate names and do not want to worry about syntactic details of the names' string forms when composing and modifying names. These applications deal with the parsed form of names and hence would prefer to deal with Name objects rather than string names. For these applications, we provide the Name -based methods in the context interfaces. Not providing these methods would probably cause proliferation of Name -like interfaces/classes to support manipulation of names in their structural form in applications developed on top of JNDI.

9.9 Reference and Referenceable

There are different ways in which applications and services can use the directory to locate objects. JNDI is general enough that it accommodates several different models. For some applications, the object bound in the directory is the object itself. An application may build up a dynamic directory while the application is active, and delete the directory when the application exits. Another application might store URLs as attributes for locating objects in its namespace. Other systems might bind some reference information in the directory, which can subsequently be used to locate or access the actual object. This last case is quite common, especially for making Java applications take advantage of services in the installed base. The reference in the directory acts as a "pointer" to the real object.

JNDI defines a Reference class to provide a uniform way of representing reference information. A Reference contains information on how to access an object. It consists of a list of addresses and class information about the object to which this reference refers. When binding a name to an object that is to be represented in the directory as a reference, the desired effect is that the object's reference be extracted and bound. To allow for this behavior, the object's class must implement the Referenceable interface, which contains the method getReference() .

There is some similarity between the interfaces Serializable and Referenceable and a natural question is "why not just use Serializable instead?" The answer is that a serialized object is really a frozen version of the object, whereas the reference contains just the information needed to construct it. The serialized version may have a lot more state which may not be appropriate for storage in the directory.

9.10 Automatically Turning References into Objects

For an object that is bound as a Reference in the directory, JNDI SPI framework automatically creates and instantiates the object identified by the reference. In this way, the program can simply narrow the result of lookup() to the expected class, instead of calling a separate operation to transform the result of lookup() into an object of the expected class.

For example, if you are looking up a printer object, a successful lookup would return to you a printer object that you can directly use.

Printer prt = (Printer) ctx.lookup(somePrinterName);
prt.print(someFileName);

JNDI does this automatically, instead of requiring an explicit conversion step, because this is expected to be the common usage pattern. By having the Reference class, and a common mechanism for converting a Reference into the object identified by the Reference , JNDI encourages different applications and system providers to utilize this mechanism, rather than inventing separate mechanisms on their own.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.1 Search the Directory

CONTENTS | PREV | NEXT

Appendix B:

B.1.1 Search Using LDAP C API B.1.2 Search Using JNDI

B.1.1 Search Using LDAP C API

/*
 * Copyright (c) 1996. Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Search the directory for all people whose surname (last name) is
 * "Jensen".
 * Since the "sn" attribute is a caseignorestring (cis), case
 * is not significant when searching.
 *
 */
#include "examples.h"
int
main( int argc, char **argv )
{
    LDAP *ld;
    LDAPMessage *result, *e;
    BerElement *ber;
    char *a, *dn;
    char **vals;
    int i;

    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( ldap_init );
        return( 1 );
    }
    /* authenticate to the directory as nobody */
    if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
        ldap_perror( ld, ldap_simple_bind_s );
        return( 1 );
    }
    /* search for all entries with surname of Jensen */
    if ( ldap_search_s( ld, MY_SEARCHBASE, LDAP_SCOPE_SUBTREE,
        MY_FILTER, NULL, 0, &result ) != LDAP_SUCCESS ) {
            ldap_perror( ld, ldap_search_s );
            return( 1 );
    }
    /* for each entry print out name + all attrs and values */
    for ( e = ldap_first_entry( ld, result ); e != NULL;
        e = ldap_next_entry( ld, e ) ) {
            if ( (dn = ldap_get_dn( ld, e )) != NULL ) {
                printf( "dn: %s\n", dn );
                ldap_memfree( dn );
            }
            for ( a = ldap_first_attribute( ld, e, &ber );
                a != NULL; a = ldap_next_attribute( ld, e, ber ) ) {
                    if ((vals = ldap_get_values( ld, e, a)) != NULL ) {
                        for ( i = 0; vals[i] != NULL; i++ ) {
                            printf( "%s: %s\n", a, vals[i] );
                        }
                        ldap_value_free( vals );
                     }
                     ldap_memfree( a );
            }
            if ( ber != NULL ) {
                ber_free( ber, 0 );
            }
            printf( "\n" );
    }
    ldap_msgfree( result );
    ldap_unbind( ld );
    return( 0 );
}

B.1.2 Search Using JNDI

/*
 * Copyright (c) 1999 Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.util.Hashtable;
import java.util.Enumeration;
import javax.naming.*;
import javax.naming.directory.*;
/*
 * Search the directory for all people whose surname (last name) is
 * "Jensen".
 * Since the "sn" attribute is a caseignorestring (cis), case
 * is not significant when searching.
 *
 * [equivalent to search.c in Netscape's SDK.]
 *
 */
class Search {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *     Search
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* specify search constraints to search subtree */
        SearchControls constraints = new SearchControls();
        constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
        /* search for all entries with surname of Jensen */
        NamingEnumeration results
            = ctx.search(Env.MY_SEARCHBASE, Env.MY_FILTER, constraints);
        /* for each entry print out name + all attrs and values */
        while (results != null && results.hasMore()) {
            SearchResult si = (SearchResult)results.next();
            /* print its name */
            System.out.println("name: " + si.getName());
            Attributes attrs = si.getAttributes();
            if (attrs == null) {
                System.out.println("No attributes");
            } else {
                /* print each attribute */
                for (NamingEnumeration ae = attrs.getAll();
                     ae.hasMoreElements();) {
                    Attribute attr = (Attribute)ae.next();
                    String attrId = attr.getID();
                    /* print each value */
                    for (Enumeration vals = attr.getAll();
                         vals.hasMoreElements();
                         System.out.println(attrId + ": " + vals.nextElement()))
                            ;
                }
            }
            System.out.println();
        }
    } catch (NamingException e) {
        System.err.println("Search example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.2 Read An Entry

CONTENTS | PREV | NEXT

Appendix B:

B.2.1 Read Using LDAP C-API B.2.2 Read Using JNDI

B.2.1 Read Using LDAP C-API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Search the directory for the specific entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * Retrieve all attributes from the entry.
 *
 */
#include "examples.h"
int
main( int argc, char **argv )
{
    LDAP        *ld;
    LDAPMessage *result, *e;
    BerElement  *ber;
    char        *a, *dn;
    char        **vals;
    int         i;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( "ldap_init");
        return( 1 );
    }
    /* authenticate to the directory as nobody */
    if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_simple_bind_s" );
        return( 1 );
    }
    /* search for Babs entry */
    if ( ldap_search_s( ld, ENTRYDN, LDAP_SCOPE_SUBTREE,
            "(objectclass=*)", NULL, 0, &result ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_search_s" );
        return( 1 );
    }
    /* for each entry print out name + all attrs and values */
    for ( e = ldap_first_entry( ld, result ); e != NULL;
            e = ldap_next_entry( ld, e ) ) {
        if ( (dn = ldap_get_dn( ld, e )) != NULL ) {
            printf( "dn: %s\n", dn );
            ldap_memfree( dn );
        }
        for ( a = ldap_first_attribute( ld, e, &ber );
                a != NULL; a = ldap_next_attribute( ld, e, ber ) ) {
            if ((vals = ldap_get_values( ld, e, a)) != NULL ) {
                for ( i = 0; vals[i] != NULL; i++ ) {
                    printf( "%s: %s\n", a, vals[i] );
                }
                ldap_value_free( vals );
            }
            ldap_memfree( a );
        }
        if ( ber != NULL ) {
            ber_free( ber, 0 );
        }
        printf( "\n" );
    }
    ldap_msgfree( result );
    ldap_unbind( ld );
    return( 0 );
}

B.2.2 Read Using JNDI

/*
 * @(#)Rdentry.java     1.2 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
import java.util.Hashtable;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Search the directory for the specific entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * Retrieve all attributes from the entry.
 *
 * [Equivalent to rdentry.c in Netscape SDK]
 */
class Rdentry {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Rdentry
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* Read Babs' entry */
        Attributes attrs = ctx.getAttributes(Env.ENTRYDN);
        if (attrs == null) {
            System.out.println(Env.ENTRYDN + "has no attributes");
        } else {
            /* print each attribute */
            for (NamingEnumeration ae = attrs.getAll();
                 ae.hasMoreElements();) {
                Attribute attr = (Attribute)ae.next();
                String attrId = attr.getID();
                /* print each value */
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println(attrId + ": " + vals.nextElement()))
                    ;
            }
        }
    } catch (NamingException e) {
        System.err.println("Rdentry example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.3 Get Attributes

CONTENTS | PREV | NEXT

Appendix B:

B.3.1 Get Attributes Using LDAP C API B.3.2 Get Attributes Using JNDI

B.3.1 Get Attributes Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Retrieve several attributes of a particular entry.
 */
#include "examples.h"

int
main( int argc, char **argv )
{
    LDAP                *ld;
    LDAPMessage         *result, *e;
    char                **vals, *attrs[ 5 ];
    int                 i;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( "ldap_init" );
        return( 1 );
    }
    attrs[ 0 ] = "cn";         /* Get canonical name(s) (full name) */
    attrs[ 1 ] = "sn";         /* Get surname(s) (last name) */
    attrs[ 2 ] = "mail";       /* Get email address(es) */
    attrs[ 3 ] = "telephonenumber";      /* Get telephone number(s) */
    attrs[ 4 ] = NULL;
    if ( ldap_search_s( ld, ENTRYDN, LDAP_SCOPE_BASE,
            "(objectclass=*)", attrs, 0, &result ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_search_s" );
        return( 1 );
    }
    /* print it out */
    if (( e = ldap_first_entry( ld, result )) != NULL ) {
        if (( vals = ldap_get_values( ld, e, "cn" )) != NULL ) {
            printf( "Full name:\n" );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( "\t%s\n", vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, "sn" )) != NULL ) {
            printf( "Last name (surname):\n" );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( "\t%s\n", vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, "mail" )) != NULL ) {
            printf( "Email address:\n" );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( "\t%s\n", vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, "telephonenumber" )) != NULL ) {
            printf( "Telephone number:\n" );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( "\t%s\n", vals[i] );
            }
            ldap_value_free( vals );
        }
    }
    ldap_msgfree( result );
    ldap_unbind( ld );
    return( 0 );
}

B.3.2 Get Attributes Using JNDI

/*
 *
 * @(#)Getattrs.java      1.2 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.util.Hashtable;
import java.util.Enumeration;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Retrieve several attributes of a particular entry.
 *
 * [equivalent to getattrs.c in Netscape SDK]
 */
class Getattrs {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * For example,
     * This could also be set by using the -D option to the java program.
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Getattrs
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        String[] attrs = new String[4];
        attrs[ 0 ] = "cn";              /* Get canonical name(s) (full name) */
        attrs[ 1 ] = "sn";              /* Get surname(s) (last name) */
        attrs[ 2 ] = "mail";            /* Get email address(es) */
        attrs[ 3 ] = "telephonenumber"; /* Get telephone number(s) */
        Attributes result = ctx.getAttributes(Env.ENTRYDN, attrs);
        if (result == null) {
            System.out.println(Env.ENTRYDN +
                               "has none of the specified attributes.");
        } else {
            /* print it out */
            Attribute attr = result.get("cn");
            if (attr != null) {
                System.out.println("Full name:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("sn");
            if (attr != null) {
                System.out.println("Last name (surname):" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("mail");
            if (attr != null) {
                System.out.println("Email address:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("telephonenumber");
            if (attr != null) {
                System.out.println("Telephone number:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
        }
    } catch (NamingException e) {
        System.err.println("Getattrs example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.4 Compare An Attribute

CONTENTS | PREV | NEXT

Appendix B:

B.4.1 Compare Using LDAP C API B.4.2 Compare Using JNDI

B.4.1 Compare Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Use ldap_compare() to compare values agains values contained in entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * We test to see if (1) the value "person" is one of the values in the
 * objectclass attribute (it is), and if (2) the value "xyzzy" is in the
 * objectlass attribute (it isn't, or at least, it shouldn't be).
 *
 */
#include "examples.h"
int
main( int main, char **argv )
{
    LDAP        *ld;
    int         rc;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( "ldap_init" );
        return( 1 );
    }
    /* authenticate to the directory as nobody */
    if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_simple_bind_s" );
        return( 1 );
    }
    /* compare the value "person" against the objectclass attribute */
    rc = ldap_compare_s( ld, ENTRYDN, "objectclass", "person" );
    switch ( rc ) {
    case LDAP_COMPARE_TRUE:
        printf( "The value \"person\" is contained in the objectclass "
                "attribute.\n" );
        break;
    case LDAP_COMPARE_FALSE:
        printf( "The value \"person\" is not contained in the objectclass "
                "attribute.\n" );
        break;
    default:
        ldap_perror( ld, "ldap_compare_s" );
    }
    /* compare the value "xyzzy" against the objectclass attribute */
    rc = ldap_compare_s( ld, ENTRYDN, "objectclass", "xyzzy" );
    switch ( rc ) {
    case LDAP_COMPARE_TRUE:
        printf( "The value \"xyzzy\" is contained in the objectclass "
                "attribute.\n" );
        break;
    case LDAP_COMPARE_FALSE:
        printf( "The value \"xyzzy\" is not contained in the objectclass "
                "attribute.\n" );
        break;
    default:
        ldap_perror( ld, "ldap_compare_s" );
    }
    ldap_unbind( ld );
    return( 0 );
}

B.4.2 Compare Using JNDI

/*
 * @(#)Compare.java       1.2 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

import java.util.Hashtable;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Use search() to compare values against values contained in entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * We test to see if (1) the value "person" is one of the values in the
 * objectclass attribute (it is), and if (2) the value "xyzzy" is in the
 * objectlass attribute (it isn't, or at least, it shouldn't be).
 *
 * [equivalent to compare.c in Netscape SDK]
 *
 */
class Compare {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *    java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Compare
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    DirContext ctx = null;
    SearchControls ctls = new SearchControls();
    ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
    ctls.setReturningAttributes(new String[0]);  // do not return any attrs
    try {
        /* get a handle to an Initial DirContext */
        ctx = new InitialDirContext(env);
    } catch (NamingException e) {
        System.err.println("Cannot get initial context.");
        return;
    }
    try {
        NamingEnumeration results =
            ctx.search(Env.ENTRYDN, "objectclass=person", ctls);
        if (results != null && results.hasMoreElements()) {
            System.out.println(
                "The value \"person\" is contained in the objectclass attribute.");
        } else {
            System.out.println(
          "The value \"person\" is not contained in the objectclass attribute." );
        }
    } catch (NamingException e) {
        System.err.println("Comparison of value person failed.");
    }
    try {
        NamingEnumeration results =
            ctx.search(Env.ENTRYDN, "objectclass=xyzzy", ctls);

        if (results != null && results.hasMoreElements()) {
            System.out.println(
                "The value \"xyzzy\" is contained in the objectclass attribute.");
        } else {
            System.out.println(
          "The value \"xyzzy\" is not contained in the objectclass attribute." );
        }
    } catch (NamingException e) {
        System.err.println("Comparison of value xyzzy failed.");
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.5 Modify Attributes

CONTENTS | PREV | NEXT

Appendix B:

B.5.1 Modify Attributes Using LDAP C API B.5.2 Modify Attributes Using JNDI

B.5.1 Modify Attributes Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Modify an entry:
 *  - replace any existing values in the "mail" attribute with "babs@example.com"
 *  - add a new value to the "description" attribute
 */
#include "examples.h"
int
main( int argc, char **argv )
{
    LDAP        *ld;
    LDAPMod     mod0;
    LDAPMod     mod1;
    LDAPMod     *mods[ 3 ];
    char        *vals0[ 2 ];
    char        *vals1[ 2 ];
    time_t      now;
    char        buf[ 128 ];
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( "ldap_init" );
        return( 1 );
    }
    /* authenticate */
    if ( ldap_simple_bind_s( ld, ENTRYDN, ENTRYPW ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_simple_bind_s" );
        return( 1 );
    }
    /* construct the list of modifications to make */
    mod0.mod_op = LDAP_MOD_REPLACE;
    mod0.mod_type = "mail";
    vals0[0] = "babs@example.com";
    vals0[1] = NULL;
    mod0.mod_values = vals0;
    mod1.mod_op = LDAP_MOD_ADD;
    mod1.mod_type = "description";
    time( &now );
    sprintf( buf, "This entry was modified with the modattrs program on %s",
            ctime( &now ));
    /* Get rid of \n which ctime put on the end of the time string */
    if ( buf[ strlen( buf ) - 1 ] == '\n' ) {
        buf[ strlen( buf ) - 1 ] = '\0';
    }
    vals1[ 0 ] = buf;
    vals1[ 1 ] = NULL;
    mod1.mod_values = vals1;
    mods[ 0 ] = &mod0;
    mods[ 1 ] = &mod1;
    mods[ 2 ] = NULL;
    /* make the change */
    if ( ldap_modify_s( ld, ENTRYDN, mods )
            != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_modify_s" );
        return( 1 );
    }
    ldap_unbind( ld );
    printf( "modification was successful\n" );
    return( 0 );
}

Modify Attributes Using JNDI

/*
 * @(#)Modattrs.java      1.2 99/07/26
 *
 * Copyright (c) 1997, 1998, 1999, Oracle and/or its affiliates.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle or the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.util.Hashtable;
import java.util.Date;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Modify an entry:
 *  - replace any existing values in the "mail"
 *    attribute with "babs@example.com"
 *  - add a new value to the "description" attribute
 *
 * [equivalent to modattrs.c in Netscape SDK]
 */
class Modattrs {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Modattrs
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    /* specify authentication information */
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, Env.MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, Env.MGR_PW);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* construct the list of modifications to make */
        ModificationItem[] mods = new ModificationItem[2];
        Attribute mod0 = new BasicAttribute("mail", "babs@eng");
        // Update mail attribute
        mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, mod0);
        // Add another value to description attribute
        Attribute mod1 =
            new BasicAttribute("description",
                          "This entry was modified with the Modattrs program on " +
                          (new Date()).toString());
        mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE, mod1);
         /* Delete the description attribute altogether */
        /*
        Attribute mod1 =  new BasicAttribute("description");
        mods[2] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, mod1);
        */
        /* make the change */
        ctx.modifyAttributes(Env.ENTRYDN, mods);
        System.out.println( "modification was successful." );
    } catch (NamingException e) {
        System.err.println("modification failed. " + e);
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


B.6 Rename An Entry

CONTENTS | PREV | NEXT

Appendix B:

B.6.1 Rename Using LDAP C API

 B.6.2 Rename Using JNDI

B.6.1 Rename Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Modify the RDN (relative distinguished name) of an entry.  In this
 * example, we change the dn "cn=Jacques Smith, o=Ace Industry, c=US"
 * to "cn=Jacques M Smith, o=Ace Industry, c=US".
 *
 * Since it is an error to either (1) attempt to modrdn an entry which
 * does not exist, or (2) modrdn an entry where the destination name
 * already exists, we take some steps, for this example, to make sure
 * we will succeed.  We (1) add "cn=Jacques Smith" (if the entry exists,
 * we just ignore the error, and (2) delete "cn=Jacques M Smith" (if the
 * entry doesn't exist, we ignore the error).
 *
 * We pass 0 for the "deleteoldrdn" argument to ldap_modrdn2_s().  This
 * means that after we change the RDN, the server will put the value
 * "Jacques Smith" into the cn attribute of the new entry, in addition to
 * "Jacques M Smith".
 */
#include "examples.h"
#define        NMODS        4
unsigned long        global_counter = 0;
static void free_mods( LDAPMod **mods );
int
main( int argc, char **argv )
{
    LDAP                    *ld;
    char                    *dn, *ndn, *nrdn;
    int                     i;
    int                     rc;
    LDAPMod                 **mods;
    /* Values we will use in creating the entry */
    char *objectclass_values[] = { "top", "person", "organizationalPerson",
                                   "inetOrgPerson", NULL };
    char *cn_values[] = { "Jacques Smith", NULL };
    char *sn_values[] = { "Smith", NULL };
    char *givenname_values[] = { "Jacques", NULL };
    /* Specify the DN we are adding */
    dn = "cn=Jacques Smith, o=Ace Industry, c=US";
    /* the destination DN */
    ndn = "cn=Jacques M Smith, o=Ace Industry, c=US";
    /* the new RDN */
    nrdn = "cn=Jacques M Smith";
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( "ldap_init" );
        return( 1 );
    }
    /* authenticate to the directory as the Directory Manager */
    if ( ldap_simple_bind_s( ld, MGR_DN, MGR_PW ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_simple_bind_s" );
        return( 1 );
    }
    if (( mods = ( LDAPMod ** ) malloc(( NMODS + 1 ) * sizeof( LDAPMod *)))
            == NULL ) {
        fprintf( stderr, "Cannot allocate memory for mods array\n" );
        return( 1 );
    }
    /* Construct the array of values to add */
    for ( i = 0; i < NMODS; i++ ) {
        if (( mods[ i ] = ( LDAPMod * ) malloc( sizeof( LDAPMod ))) == NULL ) {
            fprintf( stderr, "Cannot allocate memory for mods element\n" );
            return( 1 );
        }
    }
    mods[ 0 ]->mod_op = 0;
    mods[ 0 ]->mod_type = "objectclass";
    mods[ 0 ]->mod_values = objectclass_values;
    mods[ 1 ]->mod_op = 0;
    mods[ 1 ]->mod_type = "cn";
    mods[ 1 ]->mod_values = cn_values;
    mods[ 2 ]->mod_op = 0;
    mods[ 2 ]->mod_type = "sn";
    mods[ 2 ]->mod_values = sn_values;
    mods[ 3 ]->mod_op = 0;
    mods[ 3 ]->mod_type = "givenname";
    mods[ 3 ]->mod_values = givenname_values;
    mods[ 4 ] = NULL;

    /* Add the entry */
    if (( rc = ldap_add_s( ld, dn, mods )) != LDAP_SUCCESS ) {
        /* If entry exists already, fine.  Ignore this error. */
        if ( rc == LDAP_ALREADY_EXISTS ) {
            printf( "Entry \"%s is already in the directory.\n", dn );
        } else {
            ldap_perror( ld, "ldap_add_s" );
            free_mods( mods );
            return( 1 );
        }
    } else {
        printf( "Added entry \"%s\".\n", dn );
    }
    free_mods( mods );
    /* Delete the destination entry, for this example */
    if (( rc = ldap_delete_s( ld, ndn )) != LDAP_SUCCESS ) {
        /* If entry does not exist, fine.  Ignore this error. */
        if ( rc == LDAP_NO_SUCH_OBJECT ) {
            printf( "Entry \"%s\" is not in the directory.  "
                    "No need to delete.\n", ndn );
        } else {
            ldap_perror( ld, "ldap_delete_s" );
            return( 1 )
        }
    } else {
        printf( "Deleted entry \"%s\".\n", ndn );
    }
    /* Do the modrdn operation */
    if ( ldap_modrdn2_s( ld, dn, nrdn, 0 ) != LDAP_SUCCESS ) {
        ldap_perror( ld, "ldap_modrdn2_s" );
        return( 1 );
    }
    printf( "The modrdn operation was successful.  Entry\n"
            "\"%s\" has been changed to\n"
            "\"%s\".\n", dn, ndn );
    ldap_unbind( ld );
    return 0;
}

/*
 * Free a mods array.
 */
static void
free_mods( LDAPMod **mods )
{
    int i;

    for ( i = 0; i < NMODS; i++ ) {
        free( mods[ i ] );
    }
    free( mods );
}

B.6.2 Rename Using JNDI

/*
 * @(#)Modrdn.java      1.2 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

import java.util.Hashtable;
import java.util.Date;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Modify the RDN (relative distinguished name) of an entry.  In this
 * example, we change the dn "cn=Jacques Smith, o=Ace Industry, c=US"
 * to "cn=Jacques M Smith, o=Ace Industry, c=US".
 *
 * Since it is an error to either (1) attempt to modrdn an entry which
 * does not exist, or (2) modrdn an entry where the destination name
 * already exists, we take some steps, for this example, to make sure
 * we'll succeed.  We (1) add "cn=Jacques Smith" (if the entry exists,
 * we just ignore the error, and (2) delete "cn=Jacques M Smith" (if the
 * entry doesn't exist, we ignore the error).
 *
 * After renaming, we add back the attribute "Jacques Smith" into the cn
 * attribute.
 *
 * [based on modrdn.c of Netscape  SDK]
 */
class Modrdn {
public static void main(String[] args) {
    /* Values we'll use in creating the entry */
    Attribute objClasses = new BasicAttribute("objectclass");
    objClasses.add("top");
    objClasses.add("person");
    objClasses.add("organizationalPerson");
    objClasses.add("inetOrgPerson");
    Attribute cn = new BasicAttribute("cn", "Jacques Smith");
    Attribute sn = new BasicAttribute("sn", "Smith");
    Attribute givenNames = new BasicAttribute("givenname", "Jacques");
    /* Specify the DN we're adding */
    String dn = "cn=Jacques Smith, " + Env.MY_MODBASE;
    /* the destination DN */
    String ndn = "cn=Jacques M Smith, " + Env.MY_MODBASE;
    /* the new RDN */
    String nrdn = "cn=Jacques M Smith";
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Modrdn
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    /* specify authentication information */
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, Env.MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, Env.MGR_PW);
    DirContext ctx = null;
    try {
        /* get a handle to an Initial DirContext */
        ctx = new InitialDirContext(env);
        Attributes orig = new BasicAttributes();
        orig.put(objClasses);
        orig.put(cn);
        orig.put(sn);
        orig.put(givenNames);
        /* Add the entry */
        ctx.createSubcontext(dn, orig);
        System.out.println( "Added entry " + dn + ".");
    } catch (NameAlreadyBoundException e) {
        /* If entry exists already, fine.  Ignore this error. */
        System.out.println("Entry " + dn + " already exists, no need to add");
    } catch (NamingException e) {
        System.err.println("Modrdn: problem adding entry." + e);
        System.exit(1);
    }
    try {
        /* Delete the destination entry, for this example */
        ctx.destroySubcontext(ndn);
        System.out.println( "Deleted entry " + ndn + "." );
    } catch (NameNotFoundException e) {
        /* If entry does not exist, fine.  Ignore this error. */
        System.out.println( "Entry " + ndn + " is not in the directory.  " +
                    "No need to delete.");
    } catch (NamingException e) {
        System.err.println("Modrdn: problem deleting entry." + e);
        System.exit(1);
    }

    /* Do the modrdn operation */
    try {
        ctx.rename(dn, ndn);
        System.out.println("The modrdn operation was successful.  Entry " +
                           dn + " has been changed to " + ndn + ".");
    } catch (NamingException e) {
        System.err.println("Modify operation failed." + e);
    }
}
}

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

Examples for LDAP Programmers

CONTENTS | PREV | NEXT

Appendix B:

This appendix contains sample JNDI programs intended to help a developer familiar with the LDAP C API. Starting with sample programs from the Netscape Directory SDK for accessing and updating the directory using the LDAP C API, we show the equivalent way of doing the same thing for Java applications using JNDI.

B.1 Search the Directory

B.2 Read An Entry

B.3 Get Attributes

B.4 Compare An Attribute

B.5 Modify Attributes

B.6 Rename An Entry

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI Change History

Documentation Contents

Appendix C: JNDI Change History

CONTENTS | PREV | NEXT

Appendix 4:

JNDI 1.2: Changes Since JNDI 1.1

  • Added javax.naming.event package.
  • Added javax.naming.ldap package.
  • Added support for configuration using resource files. See Chapter 6 of the JNDI API document.

API-related Changes

  • Added NamingEnumeration.close() for cancelling or terminating enumerations.
  • Added ReferralException.getReferralContext(Hashtable env) and ReferralException.retryReferral() to allow creation and retry of referral context with different environment properties.
  • Clarified how context methods that accept Name argument should deal with CompositeName and non CompositeName arguments. Specifically, instances of CompositeName are treated as composite name, while all others are treated as compound name.
  • Added Context.getNameInNamespace() for retrieving the full name of a context within its own namespace.
  • Clarified definition of the class factory location of a Reference object. Specifically, the location is a codebase, which consists of a list space-separated URLs.
  • Added support for ordered multivalued attributes to Attribute and BasicAttribute .
  • Added BasicAttributes.equals() and BasicAttributes.hashCode() .
  • Redefined semantics of DirContext.getSchemaClassDefinition() so that it returns a context that contains the DirContext objects of class definitions, rather than returning one (arbitrary) class definition.
  • Added protected InitialContext / InitialDirContext constructors to allow lazy initialization. Useful for subclass implementations.

SPI-related Changes

  • Added StateFactory / NamingManager.getStateToBind() , analogous to ObjectFactory / NamingManager.getObjectInstance() , for transforming an object's state before the object is bound in the naming/directory service.
  • Added interfaces DirObjectFactory and DirStateFactory to better support service providers that implement the DirContext interface. Added DirectoryManager.getObjectInstance() and DirectoryManager.getStateToStore() to use these interfaces.
  • Refined definition of NamingManager.getObjectInstance() to not treat URL strings specially. Instead, the URL should be wrapped inside a Reference whose RefAddr type is "URL".
  • Made ResolveResult implement Serializable .
  • Defined a special form of Reference called a next naming system (nns) reference for supporting "dynamic federation". This reference has a RefAddr type of "nns" and a content consisting of the resolved object.
  • Added the string constant NamingManager.CPE which names a property set by NamingManager.getContinuationContext() / DirectoryManager.getContinuationContext() . The value of this property is an instance of CannotProceedException . This is useful to service providers that implement federation by chaining the CPEs.
  • Defined a convention for service providers to use when naming environment properties. See Section 6.1.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI Spec

Documentation Contents
CONTENTS | PREV | NEXT

Java Naming and Directory Interface
Application Programming Interface (JNDI API)

This developer guide provides information about the JNDI API.
JNDI 1.2/Java Platform, Standard Edition, v 1.3
July 14, 1999
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
CONTENTS | PREV | NEXT

Appendix 1: JNDI Standard Environment Properties

Environment Configuration

Property Name | Description
java.naming.applet (Context.APPLET) | An instance of java.applet.Applet whose applet parameters are used to obtain some environment properties. See Chapter 6 for details. No default.

Program Configuration 2

Property Name | Description
java.naming.factory.initial (Context.INITIAL_CONTEXT_FACTORY) | Class name of initial context factory to use. See InitialContext . No default.
java.naming.factory.object (Context.OBJECT_FACTORIES) | Colon-separated list of class names of object factory classes to use. See NamingManager.getObjectInstance() and DirectoryManager.getObjectInstance() . Defaults to empty list.
java.naming.factory.state (Context.STATE_FACTORIES) | Colon-separated list of class names of state factory classes to use. See NamingManager.getStateToBind() and DirectoryManager.getStateToBind() . Defaults to empty list.
java.naming.factory.control (LdapContext.CONTROL_FACTORIES) | Colon-separated list of class names of response control factory classes to use. See ControlFactory.getControlInstance() . Defaults to empty list.
java.naming.factory.url.pkgs (Context.URL_PKG_PREFIXES) | Colon-separated list of package prefixes to use when loading in URL context factories. com.sun.jndi.url is always added to end of list. See NamingManager.getURLContext() . Defaults to empty list.

Access Configuration 3

Property Name | Description
java.naming.provider.url (Context.PROVIDER_URL) | Specifies configuration information for provider to use. Defaults to provider default, using provider's own configuration or discovery protocols.
java.naming.dns.url (Context.DNS_URL) | Specifies the DNS host and domain names. No default.

Service-Related

Property Name | Description
java.naming.authoritative (Context.AUTHORITATIVE) | Specifies the authoritativeness of the service requested. If "true", specifies most authoritative source is to be used (e.g., bypass any caches, or bypass replicas in some systems). Otherwise, source need not be (but can be) authoritative. Defaults to "false".
java.naming.batchsize (Context.BATCHSIZE) | Specifies the preferred batch size to use when returning data via the service's protocol. This is a hint to the provider to return the results of operations in batches of the specified size, so that the provider can optimize its performance and usage of resources. It does not affect the total number or size of the data returned. Defaults to provider default.
java.naming.referral (Context.REFERRAL) | Specifies that referrals encountered by the service provider are to be followed automatically. If "follow", follow referrals automatically. If "ignore", ignore referrals encountered. If "throw", throw ReferralException when a referral is encountered. Defaults to provider default.

Security

Property Name | Description
java.naming.security.protocol (Context.SECURITY_PROTOCOL) | Security protocol to use for service. Defaults to provider default.
java.naming.security.authentication (Context.SECURITY_AUTHENTICATION) | Takes values "none", "simple", "strong", or a provider-specific string (e.g., "CRAM-MD5 DIGEST-MD5 EXTERNAL"). Defaults to provider default.
java.naming.security.principal (Context.SECURITY_PRINCIPAL) | Identity of principal (e.g., user) for the authentication scheme. Defaults to provider default.
java.naming.security.credentials (Context.SECURITY_CREDENTIALS) | Principal's credentials for the authentication scheme. The particular type of credentials is determined by the authentication scheme chosen. Examples of different types of credentials are passwords, keys, and certificates. Defaults to provider default.

Internationalization

Property Name | Description
java.naming.language (Context.LANGUAGE) | Specifies a colon-separated list of preferred language to use with this service (e.g., "en-US", "fr", "fr-CH", "ja-JP-kanji"). Languages are specified using tags defined in RFC 1766. Defaults to provider default.

1. The Context and LdapContext interfaces define constants for these property names. The names of the constants are shown in parentheses below the property's string names.

2. These properties may be set in the Java runtime's system properties or in an applet's parameter list.

3. These properties may be set in the Java runtime's system properties or in an applet's parameter list.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Legend for Class Diagram

Documentation Contents

Appendix B: Legend for Class Diagram

CONTENTS | PREV | NEXT

Appendix 3:

In a class diagram, we visually distinguish the different kinds of Java entities, as follows:

The interface: A rounded rectangle

  1. The class: A rectangle
  2. The abstract class: A rectangle with an empty dot
  3. The final class: A rectangle with a black dot
  4. Classes with subclasses: A rectangle with a small black triangle on the lower right corner

Most of these elements are shown below. The class or interface being described in the current chapter is shaded grey (this is not applicable for package class diagrams). A solid line represents extends , while a dotted line represents implements .

Example class diagram

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Programmer's Guide to the Java 2D API

Documentation Contents
CONTENTS | PREV | NEXT

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
[Top] [Prev] [Next] [Bottom]

Java Naming and Directory Interface
Service Provider Interface
(JNDI SPI)

JNDI 1.2 / Java Platform, Standard Edition, v 1.3
July 14, 1999

[Top] [Prev] [Next] [Bottom]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
[Top] [Prev] [Next] [Bottom]

Appendix C: JNDI Change History

JNDI 1.2: JNDI Changes Since JNDI 1.1

  • Added javax.naming.event package.
  • Added javax.naming.ldap package.
  • Added support for configuration using resource files. See Chapter 6 of the JNDI API document.

API-related Changes

  • Added NamingEnumeration.close() for cancelling or terminating enumerations.
  • Added ReferralException.getReferralContext(Hashtable env) and ReferralException.retryReferral() to allow creation and retry of referral context with different environment properties.
  • Clarified how context methods that accept Name argument should deal with CompositeName and nonCompositeName arguments. Specifically, instances of CompositeName are treated as composite name, while al l others are treated as compound name.
  • Added Context.getNameInNamespace() for retrieving the full name of a context within its own namespace.
  • Clarified definition of the class factory location of a Reference object. Specifically, the location is a codebase, which consists of a list space-separated URLs.
  • Added support for ordered multivalued attributes to Attribute and BasicAttribute.
  • Added BasicAttributes.equals() and BasicAttributes.hashCode().
  • Redefined semantics of DirContext.getSchemaClassDefinition() so that it returns a context that contains the DirContext objects of class definitions, rather than returning one (arbitrary) class definition.
  • Added protected InitialContext/InitialDirContext constructors to allow lazy initialization. Useful for subclass implementations.

SPI-related Changes

  • Added StateFactory/NamingManager.getStateToBind(), analogous to ObjectFactory/NamingManager.getObjectInstance(), for transforming an object's state before the object is bound in the naming/directory service.
  • Added interfaces DirObjectFactory and DirStateFactory to better support service providers that implement the DirContext interface. Added DirectoryManager.getObjectInstance() and DirectoryManager.getStateToStore() to use these interfaces.
  • Refined definition of NamingManager.getObjectInstance() to not treat URL strings specially. Instead, the URL should be wrapped inside a Reference whose RefAddr type is "URL".
  • Made ResolveResult implement Serializable.
  • Defined a special form of Reference called a next naming system (nns) reference for supporting "dynamic federation". This reference has a RefAddr type of "nns" and a content consisting of the resolved object.
  • Added the string constant NamingManager.CPE which names a property set by NamingManager.getContinuationContext()/DirectoryManager.getContinuationContext(). The value of this property is an instance of CannotProceedException. This is useful to service providers that implement federation by chaining the CPEs.
  • Defined a convention for service providers to use when naming environment properties. See Section 6.1.

[Top] [Prev] [Next] [Bottom]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNDI SPI

Documentation Contents
[Top] [Prev] [Next] [Bottom]

1 Introduction

The JNDI SPI provides the means by which developers can write different naming and directory service providers and make them available so that the corresponding services are accessible from applications that use the JNDI API. A service provider is a set of modules that together satisfy JNDI API requests. In addition, because JNDI allows the use of names that span multiple namespaces, one service provider implementation may need to interact with another in order to complete an operation. The SPI provides methods that allow different provider implementations to cooperate to complete client JNDI operations.

This document describes the components of the SPI and explains how developers can build service providers for JNDI. It is assumed that the reader is familiar with the contents of the JNDI API document.

All service provider developers should read the "Security Considerations" section of the JNDI API document. It contains important issues that all developers using JNDI, especially those writing service providers, should consider.

1.1 Document Overview

There are several types of implementations that sit beneath the JNDI API. A service provider contains at a minimum a context implementation. A context implementation implements the Context interface or any of its subinterfaces, such as DirContext, EventContext, or LdapContext. The complexity of the implementation depends primarily on the complexity of the underlying service, and secondarily on the number of JNDI features that the implementation supports. Chapter 2 describes the details of building a context implementation.

A context implementation can be accessed in different ways. The most common way is to access it from the initial context. Chapter 3 describes two ways that a context implementation can be accessed from the initial context: via an initial context factory and a URL context factory.

The JNDI architecture defines components/implementations that can be used to augment the behavior of context implementations. This allows users and applications to customize the implementation. These components are supported through factories. JNDI defines three types of factories and provides SPI methods that make use of them. These factories are described in Chapter 4.

  • Object factories-For transforming data stored in naming/directory services into Java types more natural to the Java application.
  • State factories-For transforming objects of Java types natural to the program into formats suitable for storage into naming/directory services.
  • Response control factories-For narrowing LDAP v3 response controls received from LDAP servers into more user-friendly types.

1.2 Interface1 Overview

The JNDI SPI is contained in the javax.naming.spi package. The following sections provide an overview of the SPI. For more details on the SPI, see the corresponding javadoc.

The javax.naming.spi package

The information in this graphic is available in the API documentation.

1.2.1 NamingManager and DirectoryManager

The NamingManager class contains static methods that perform provider-related operations. For example, it contains methods to create instances of objects using Reference, to obtain an instance of the initial context using the java.naming.factory.initial property, and to install ObjectFactoryBuilder and InitialContextFactoryBuilder. The DirectoryManager class provides similar static methods for DirContext related operations.

1.2.2 Initial Contexts

InitialContextFactory is the interface for creating an initial context instance. See Section 3.1 for more details.

InitialContextFactoryBuilder is the interface for creating InitialContextFactory instances. See Section 3.3 for more details.

1.2.3 Object Factories

ObjectFactory is the interface for supporting creation of objects using information stored in the namespace. DirObjectFactory is a subinterface of ObjectFactory for use by context implementations that implement the DirContext interface. See Section 4.1 for more details.

ObjectFactoryBuilder is the interface for creating object factories. See Section 4.1.4 for more details.

1.2.4 State Factories

StateFactory is the interface for supporting converting objects into storable formats supported by the naming/directory service. DirStateFactory is a subinterface of StateFactory for use by context implementations that implement the DirContext interface. DirStateFactory.Result is a class for holding a pair of java.lang.Object and Attributes that is returned by DirStateFactory.getStateToBind(). See Section 4.2 for more details.

1.2.5 Federation Support

The Resolver interface defines a method for providers to implement that allows them to participate in a federation for supporting extended interfaces to Context. See "Resolving Through to Subinterfaces of Context" on page 10 for more details.

ResolveResult is the return value of calling Resolver.resolveToClass(). It contains the object to which resolution succeeded, and the remaining name yet to be resolved.

2 Building a Context Implementation

One of the basic tasks in building a service provider is to define a class that implements the Context interface or any of its subinterfaces. This class is called a context implementation. The following guidelines should be used for developing a context implementation.

2.1 Ownership of Parameters

In general, any object passed as a parameter to methods in the Context interface (or subinterfaces) and NamingManager/DirectoryManager utility methods is owned by the caller. In many cases, the parameter eventually reaches a context implementation. Because the caller owns the object, the context implementation is prohibited from modifying the object. Furthermore, the context implementation is allowed to maintain a pointer to the object only for the duration of the operation and not beyond. If a context implementation needs to save the information contained in a parameter beyond the duration of the operation, it should maintain its own copy.

For purposes of parameter ownership, an operation on a context instance is not considered to have completed while any referrals generated by that operation are still being followed, or if the operation returns a NamingEnumeration, while the enumeration is still in use.

2.2 Reentrancy

A context instance need not be reentrant. Two threads that need to access the same context instance concurrently should synchronize amongst themselves and provide the necessary locking.

However, different context instances must be safe for concurrent multithreaded access. That is, two threads each operating concurrently on their respective context instance should not need to synchronize their access. For example, even though two contexts might share the same resources (such as the same connection), it must be possible (and safe) for two separate threads to operate on each of those contexts without the threads having to do any explicit synchronization.

For purposes of concurrency control, an operation on a context instance is not considered to have completed while any referrals generated by that operation are still being followed, or if the operation returns a NamingEnumeration, while the enumeration is still in use.

2.3 Basic Support-Implementing the Context Interface(s)

The context implementation defines implementations for each of the methods in the Context interface or subinterfaces that the implementation supports.

If a method is not supported, it should throw OperationNotSupportedException.

For methods in the Context interface or subinterfaces that accept a name argument (either as a String or a Name), an empty name denotes the current context. For example, if an empty name is supplied to lookup(), that means to return a new instance of the current context. If an empty name is supplied to list(), that means to enumerate the names in the current context. If an empty name is supplied to getAttributes(), that means to retrieve the attributes associated with this context.

Appendix A contains an example context implementation that implements a flat, in-memory namespace.

2.4 Object Support

JNDI encourages providers to supply implementations of the Context and its subinterfaces that are natural and intuitive for the Java application programmer. For example, when looking up a printer name in the namespace, it is natural for the programmer to expect to get back a printer object on which to operate.

Context ctx = new InitialContext();
Printer prt = (Printer)ctx.lookup(somePrinterName);
prt.print(someStreamOfData);

Similarly, when storing an application's object into the underlying service, it is most portable and convenient if the application does not have to know about the underlying data representation.

However, what is bound in the underlying directory or naming services typically are not objects in the Java programming language but merely reference information which can be used to locate or access the actual object. This case is quite common, especially for Java applications accessing and sharing services in an existing installed base. The reference in effect acts as a "pointer" to the real object. In the printer example, what is actually bound might be information on how to access the printer (e.g., its protocol type, its server address). To enable this easy-to-use model for the application developer, the context implementation must do the transformation of the data to/from the underlying service into the appropriate objects in the Java programming language.

There are different ways to achieve this goal. One context implementation might have access to all the implementation classes of objects that a directory can return; another context implementation might have a special class loader for locating implementation classes for its objects. JNDI provides the Reference class as a standard way of representing references. Applications and context implementations are encouraged to use this class, rather than invent separate mechanisms on their own. However, this does not preclude context implementations from using their own mechanisms for achieving the same goal.

JNDI provides utilities for context implementations to use when reading/storing objects in the Java programming language in a format-independent way to the underlying service. This section describes these utilities. These utilities interact with components called object and state factories that do the actual transformations. These factories are described in Chapter 4.

2.4.1 Reading an Object

JNDI provides the following methods that context implementations should use to transform data read from the underlying service into objects in the Java programming language:

Object NamingManager.getObjectInstance(Object refInfo,
                                       Name name,
                                       Context nameCtx,
                                       Hashtable env)
        throws Exception;
Object DirectoryManager.getObjectInstance(Object refInfo,
                                          Name name,
                                          Context nameCtx,
                                          Hashtable env,
                                          Attributes attrs)
        throws Exception;
refInfo is the data (representing the object) read from the underlying service. name is the name of the object while nameCtx is the context in which to resolve name. The name/nameCtx pair can be used to obtain more information about the object than is available from refInfo. env is the environment of the context from which getObjectInstance() is being invoked. attrs is the collection of attributes read from the directory about the object, usually in the same request that was used to get refInfo. It might not be the complete collection of attributes if such was not requested.

The method in the NamingManager class should be used by context implementations that implement the Context interface, while the method in the DirectoryManager class should be used by context implementations that implement the DirContext interface.

When constructing objects to be returned for the following methods, the context implementation should call getObjectInstance(), or its own mechanism for generating objects from the bound information, if it wants this feature to be enabled in their contexts. (String overloads not shown.)

        javax.naming.Context.lookup(Name name)
        javax.naming.Context.lookupLink(Name name)
        javax.naming.Binding.getObject()
        javax.naming.directory.SearchResult.getObject()

For Binding and SearchResult, the context implementation should either pass an object that is the result of calling getObjectInstance() or its equivalent to the constructor, or override the default implementation of Binding and SearchResult so that their getObject() implementations call getObjectInstance() or its equivalent before returning.

Here is an example. Suppose printers are represented in the namespace using References. To turn a printer Reference into a live Printer object, the context implementation would use the NamingManager.getObjectInstance() method. In this way, the underlying service need not know anything specific about printers.

Object lookup(Name name) {
        ...
        Reference ref = <some printer reference looked up from naming service>;
        return NamingManager.getObjectInstance(ref, name, this, env);
}

In another example, suppose printers are represented in the directory as a collection of attributes. To turn a printer's directory entry into a live Printer object, the context implementation would use DirectoryManager.getObjectInstance().

Object lookup(Name name) {
        ...
        Attributes attrs = <read attributes from directory>;
        Reference ref = <construct reference from attributes>;
        return DirectoryManager.getObjectInstance(ref, name, this,
                env, attrs);
}

2.4.2 Storing an Object

JNDI provides the following methods that context implementations should use to transform an object before storing it in the underlying service:

Object NamingManager.getStateToBind(
                                    Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable env)
        throws NamingException;
DirStateFactory.Result DirectoryManager.getStateToBind(
                                    Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable env,
                                    Attributes attrs)
        throws NamingException;

obj is the object to be stored in the underlying service. name is the name of the object while nameCtx is the context in which to resolve name. The name/nameCtx pair can be used to obtain more information about the object than is available from obj. env is the environment of the context from which getStateToBind() is being invoked. attrs is the collection of attributes that is to be bound with the object. DirStateFactory.Result is a class that contains an object and a collection of attributes.

The method in the NamingManager class should be used by context implementations that implement the Context interface, while the method in the DirectoryManager class should be used by context implementations that implement the DirContext interface.

Before storing an object supplied by the application, the context implementation should call getStateToBind(), or its own mechanism for generating information to be bound, if it wants this feature to be enabled in their contexts. (String overloads not shown.)

javax.naming.Context.bind(Name name, Object o)
javax.naming.Context.rebind(Name name, Object o)
javax.naming.DirContext.bind(Name name, Object o, Attributes attrs)
javax.naming.DirContext.rebind(Name name, Object o, Attributes attrs)

Here's an example of how a Context implementation supports Context.bind:

// First do transformation
obj = NamingManager.getStateToBind(obj, name, ctx, env);

// Check for Referenceable
if (obj instanceof Referenceable) {
    obj = ((Referenceable)obj).getReference();
}

if (obj instanceof Reference) {
        // store as ref
} else if (obj instanceof Serializable) {
        // serialize
} else {
        ...
}

Here's an example of how a DirContext implementation supports DirContext.bind:

// First do transformation
DirStateFactory.Result res = DirectoryManager.getStateToBind(
        obj, name, ctx, env, inAttrs);

obj = res.getObject();
Attributes outAttrs = res.getAttributes();

// Check for Referenceable
if (obj instanceof Referenceable) {
        obj = ((Referenceable)obj).getReference();
}
if (obj instanceof Reference) {
        // store as ref and add outAttrs
} else if (obj instanceof Serializable) {
        // serialize and add outAttrs
} else if (obj instanceof DirContext) {
        // grab attributes and merge with outAttrs
} else {
        ...
}

As shown in these examples, a context implementation might be able to store different types of objects (Reference, Serializable, and DirContext). If the context implementation cannot store Referenceable objects directly and getStateToBind() returns such an object, the context implementation should subsequently call Referenceable.getReference() and store the resulting Reference instead.

If a context implementation can store different types of objects, it should follow this order for the following common types:

  • Reference
  • Serializable
  • DirContext

This order is recommended because it is most likely to capture the intent of the caller of the bind()/rebind() method. For example, a Reference is Serializable, so if you performed the Serializable check first, no Reference objects would ever be stored in the reference format (that is, they would all be serialized).

2.5 Federation Support

2.5.1 Names

When a context is given a string name argument, the name represents a composite name that may span multiple namespaces, or it may have only a single compound name component (which in turn may be made up of one or several atomic names) that belongs to a single namespace. The context implementation must determine which part of the name is to be resolved/processed in its context and pass the rest onto the next context. This may be done syntactically by examining the name, or dynamically by resolving the name.

When a context is given a Name argument, if it is an instance of CompositeName, then it will be treated as a composite name. Otherwise, it will be treated as a compound name that is implemented by the CompoundName class or some other compound name implementation.

2.5.2 Resolving Through a Context

A context participates in a federation by performing the resolution phase of all of the context operations. The lookup() method must always be supported. Support for other methods is optional, but if the context is to participate in a federation, then the resolution implicit in all operations must be supported.

Figure 1: Example of Resolving through Intermediate Contexts to Perform a bind().

Example of resolving through intermediate contexts to perform a bind()

For example, suppose a context does not support the bind() operation. When that context is being used as an intermediate context for bind(), it must perform the resolution part of that operation to enable the operation to continue to the next context. It should only throw OperationNotSupportedException if it is being asked to create a binding in its own context. Figure 1 shows an example of how the bind() operation is passed through intermediate contexts to be performed in the target context.

2.5.3 Resolving Through to Subinterfaces of Context

To invoke a DirContext method (such as getAttributes()), the application first obtains an initial DirContext, and then perform the operation on the DirContext.

DirContext ctx = new InitialDirContext();
Attributes attrs = ctx.getAttributes(someName);
From the context implementation's perspective, in order to retrieve the attributes, getAttributes() might need to traverse multiple naming systems. Some of these naming systems only support the Context interface, not the DirContext interface. These naming systems are being used as intermediaries for resolving towards the target context. The target context must support the DirContext interface. Figure 2 shows an example of this.

Figure 2: Example of Resolving Through Intermediate non-DirContexts

Example of resolving through intermediate non-DirContexts

In order for intermediate naming systems to participate in the federation for extensions of Context, they must implement the Resolver interface. The Resolver interface is used by the JNDI framework to resolve through intermediate contexts that do not support a particular subinterface of Context. It consists of two overloaded forms of the method resolveToClass(). This method is used to partially resolve a name, stopping at the first context that is an instance of the required subinterface. By providing support for this method and the resolution phase of all methods in the Context interface, a context implementation can act as an intermediate context for extensions (subinterfaces) of Context.

public interface Resolver {
        public ResolveResult resolveToClass(Name name, Class contextType)
                throws NamingException;
        public ResolveResult resolveToClass(String name,
                                           Class contextType)
                throws NamingException;
}

2.5.4 Naming System Boundaries

The resolution of a (multicomponent) composite name proceeds from one naming system to the next, with the resolution of the components that span each naming system typically handled by a corresponding context implementation. From a context implementation's point of view, it passes the components for which it is not responsible to the (context implementation of the) next naming system.

There are several ways in which the context implementation for the next naming system may be located. It may be done explicitly through the use of a junction, where a name in one naming system is bound to a context (or a Reference to a context) in the next naming system. For example, with the composite name "cn=fs,ou=eng/lib/xyz.zip", the LDAP name "cn=fs,ou=eng" might resolve to a file system context in which the name "lib/xyz.zip" could then be resolved.

Alternately, the next naming system may be located implicitly. For example, a context implementation may choose the next naming system based upon service-specific knowledge of the object that it has resolved. For example, with the composite name "ldap.wiz.com/cn=fs,ou=eng", the DNS name ldap.wiz.com might name a DNS entry. To get the next naming system beyond DNS, the DNS context implementation might construct a context using SRV resource records found in that entry, which in this case, happens to name an LDAP context. When the next naming system is located in this fashion, JNDI composite name separator is used to denote the boundary from one naming system to the next, and is referred to as the implicit next naming system pointer.

However the next naming system is located, the context implementation must hand the next naming system the remaining portion of the composite name to resolve.

2.5.5 Continuing an Operation in a Federation

In performing an operation on a name that spans multiple namespaces, a context in an intermediate naming system needs to pass the operation onto the next naming system. The context does this by first constructing a CannotProceedException containing information pinpointing how far it has proceeded. In so doing it sets the resolved object, resolved name, remaining name, and environment parts of the exception.2 (In the case of the Context.rename() method, it also sets the "resolved newname" part.)

It then obtains a continuation context from JNDI by passing the CannotProceedException to static method NamingManager.getContinuationContext()

public class NamingManager {
        public static Context getContinuationContext(
                CannotProceedException e) throws NamingException;
        ...
}

The information in the exception is used by getContinuationContext() to create the context instance in which to continue the operation.

To obtain a continuation context for the DirContext operations, use Directory-Manager.getContinuationDirContext().

public class DirectoryManager {
        public static getContinuationDirContext(
                CannotProceedException e) throws NamingException;
        ...
}

Upon receiving the continuation context, the operation should be continued using the remainder of the name that has not been resolved.

For example, when attempting to continue a bind() operation, the code in the context implementation might look as follows:

public void bind(Name name, Object obj) throws NamingException {
        ...
        try {
                internal_bind(name, obj);
                ...
        } catch (CannotProceedException e) {
                Context cctx =                  NamingManager.getContinuationContext(e);
                cctx.bind(e.getRemainingName(), obj);
        }
}

In this example, bind() depends on an internal method, internal_bind(), to carry out the actual work of the bind and to throw a CannotProceedException when it discovers that it is going beyond this naming system. The exception is then passed to getContinuationContext() in order to continue the operation. If the operation cannot be continued, the continuation context will throw the CannotProceedException to the caller of the original bind() operation.

2.5.6 "Dynamic" Location of Next Naming System

In some federation configurations, the result of resolution in one naming system does not indicate which is the next naming system. The only conclusion that the context implementation can draw is that resolution has terminated in the current naming system and should proceed to the next naming system.

For example, suppose the composite name "lib/xyz.zip/part1/abc" consists of two parts: "lib/xyz.zip", which names a file in ZIP format, and "part1/abc", which names an entry within the ZIP file. Although the resolution of "lib/xyz.zip" results in a file object, the desired result is a context in which to resolve names of ZIP entries. Similarly, another composite name could name an entry within a file in "tar" format, and the desired result of the resolution of the file component of the composite name would be a context in which to resolve tar entries.

In effect, any type of context might be federated beneath the file system namespace depending on the format of the files. Such relationships should be symmetric: it should be possible for the ZIP file context and other similar contexts to federate beneath other, non-file system namespaces. Furthermore, developers writing the file system context implementation and those writing the context implementations for the ZIP file context, the tar file context, or a context for some yet-to-be defined format, should be able to work independently.

To support this type of federation, JNDI defines a special form of Reference called an nns reference ("nns" stands for "next naming system"). This Reference has an address with type nns. The address contents is the resolved object (in the above example, the ZIP file). Continuing with the file system example, the file system context implementation might create the nns reference as follows:

 RefAddr addr = new RefAddr("nns") {
        public Object getContent() {
                return theFile;
        }
};
Reference ref = new Reference("java.io.File", addr);

Next, the context implementation constructs a CannotProceedException (as with the junction case) by using the nns reference as the resolved object, and a resolved name consisting of the resolved file name and an empty component. The empty component is being used as an implicit next naming system pointer and indicates that the resolution has succeeded to the point of resolving the next naming system. (Notice how the values of the resolved object and resolved name are matched.) The context impementation then passes the CannotProceedException to getContinuationContext().

As with any resolved object in a CannotProceedException, getContinuationContext() searches for a context implementation that accepts this nns reference. The ZIP file context implementation, for instance, might accept an nns reference and other information provided, such as the name of the file (relative to a given context). If the context implementation determines that the file is a ZIP file, it would then construct a context for resolving names within that file.

2.5.7 More about CannotProceedException

Central to the JNDI SPI's framework for federation is the CannotProceedException. A Cannot-ProceedException contains information such as the resolved name/object and remaining name, inherited from the NamingException superclass. In addition, a CannotProceedException also contains fields for the "alt" name and "alt" name context. While the resolved name from NamingException is the full composite name (relative to the starting context of the operation), alt name is the resolved name relative to the alt name context. That is, alt name might not necessarily be the same as the resolved name. Alt name and alt name context are used as arguments to NamingManager/DirectoryManager.getObjectInstance(). They allow the factories that are called by this method to obtain more information about the resolved object (for example, it could be used to get a special attribute about the object). These factories are described in Chapter 4.

2.5.8 Contextual Information

While the emphasis of the JNDI SPI framework is on "looking forward" and trying to find the next naming system, some context implementations, once located, need to "look back" the resolution chain to obtain contextual information. For example, a particular context implementation that is federated off of a host naming system might be designed such that the only means by which it can find out host information is to ask its (possibly not immediate) superior naming system. To do that, it needs contextual information-information about how the resolution proceeded to its current point.

Summarizing earlier discussions on federation, when performing an operation on a name that spans multiple namespaces, the context implementation first constructs a CannotProceed-Exception containing information pinpointing how far it has proceeded. It then obtains a continuation context from JNDI by calling getContinuationContext(). To support the retrieval of contextual information, getContinuationContext() automatically adds the environment property java.naming.spi.CannotProceedException, with the value of the Cannot-ProceedException argument, to the continuation context's environment. This property is inherited by the continuation context and may be used by that context's implementation to inspect the fields of the exception.

2.6 Referral Support

LDAP-style directory services support the notion of referrals for redirecting a client's request to another server. A referral differs from the federation continuation mechanism described earlier in that a referral may be presented to the JNDI client, who then decides whether to follow it, whereas a CannotProceedException should be returned to the client only when no further progress is possible. Another difference is that an individual context implementation offers the capability of continuing the operation using the referral (and itself determines the mechanism for doing so). In a federation, the mechanism of continuation is beyond the scope of individual context implementations: individual context implementations benefit from the common federation mechanism provided by the JNDI SPI framework.

A context implementation that supports referrals defines a subclass of ReferralException and provides implementations for its abstract methods. getReferralContext() returns a context at which to carry on the operation, and getReferralInfo() returns information on where the referral leads to, in a format appropriate to the context implementation.

The environment property java.naming.referral specifies how the context implementation should treat referrals. If the context implementation is asked to throw an exception when a referral is encountered, or if the context implementation encounters problems following a referral, it throws a ReferralException to the application. To continue the operation, the application re-invokes the method on the referral context using the same arguments it supplied to the original method. The following code sample shows how ReferralException may be used by an application:3

while (true) {
        try {
                bindings = ctx.listBindings(name);
                while (bindings.hasMore()) {
                        b = (Binding) bindings.next();
                        ...
                }
                break;
        } catch (ReferralException e) {
                ctx = e.getReferralContext();
        }
}

This convention of re-invoking the method using the original arguments is a simple one for applications to follow. This places the burden on the implementation of the ReferralException to supply enough information to the implementation of the referral context for the operation to be continued. Note that this will likely render some of the arguments passed to the re-invoked operation superfluous. The referral context implementation is free to ignore any redundant or unneeded information.

It is possible for an operation to return results in addition to a referral. For example, when searching a context, the server might return several results in addition to a few referrals as to where to obtain further results. These results and referrals might be interleaved at the protocol level. If referrals require user interaction (i.e., not followed automatically), the context implementation should return the results through the search enumeration first. When the results have been returned, the referral exception can then be thrown. This allows a simple programming model to be used when presenting the user with a clear relationship between a referral and its set of results.

2.7 Schema Support

JNDI defines the Attribute interface for representing an attribute in a directory. An attribute consists of an attribute identifier (a string) and a set of attribute values, which can be any object in the Java programming language. There are also methods defined in Attribute for obtaining the attribute's definition and syntax definition from the directory's schema.

public class Attribute {
        public DirContext getAttributeDefinition() throws NamingException;
        public DirContext getAttributeSyntaxDefinition()
                throws NamingException;
        ...
}

The utility class, BasicAttribute, does not provide useful implementations for these methods. A directory context implementation that has support for such schema information should provide implementations of Attribute that implement these two methods based on its schema mechanisms, perhaps by subclassing BasicAttribute and overriding these two methods. The context implementation should then return instances of these subclasses when asked to return instances of Attribute. The context implementation, when it receives an Attribute instance that do not have meaningful implementations of these two methods, should use reasonable defaults to determine the attribute's definition and syntax, using information such as the attribute values' class names or conventions used for the attribute identifier.

The DirContext interface contains schema-related methods:

public class DirContext {
        ...
        public DirContext getSchema(Name name) throws NamingException;
        public DirContext getSchema(String name) throws NamingException;

        public DirContext getSchemaClassDefinition(Name name)
                throws NamingException;
        public DirContext getSchemaClassDefinition(String name)
                throws NamingException;

}

getSchema() returns the schema tree for the named object, while getSchemaClassDefinition() returns a context containing schema class definitions for the named object. Some systems have just one global schema and, regardless of the value of the name argument, will return the same schema tree. Others support finer grained schema definitions, and may return different schema trees depending on which context is being examined.

2.8 Event Support

A context implementation supports event notification by providing implementation for the methods in the EventContext/EventDirContext interfaces. The event model advocated by these interfaces can be readily supported using a multithreaded model. When an application uses addNamingListener() to register a listener with a context, the context records the requests and takes action to collect information required to generate the events. When the context eventually receives information to generate the events, it fires the events to the listener. The thread that does the registration is typically different from the thread that runs the listener. The context implementation typically uses a thread that it has created and manages to run the listener method. When one event is dispatched to multiple listeners, the context implementation may choose to (and is generally encouraged) to execute the listener methods concurrently in separate threads.

The addNamingListener() methods accept an instance of NamingListener. The instance might implement one or more subinterfaces of NamingListener. If the listener implements more than one subinterface, the context implementation should try to conserve resources required to satisfy the registration. For example, an implementation might be able to submit a single request to the server that captures all of the requests of the subinterfaces.

Where possible, the context implementation should fire a NamingExceptionEvent to a listener if the context will be unable to fire further events and then automatically deregister the listener. For example, if the connection to the server is broken subsequent to the registration of the listener and no information will be available to fire events, the context should fire a NamingExceptionEvent to the listener.

2.9 Context Environment Support

Each instance of Context (or its subinterfaces) can have associated with it an environment which contains preferences expressed by the application of how it would like to access the services offered by the context. Examples of information found in an environment are security-related information that specify the user's credentials and desired level of security (none, simple, strong), and configuration information, such as the server to use. See Chapter 6 and Appendix A of the JNDI API document for more details about environment properties.

Environment properties are defined generically in order to ensure maximum portability. Individual service providers should map these generic properties to characteristics appropriate for their service. Properties that are not relevant to a provider should be recorded and silently ignored. The environment may also be used for storing service provider-specific properties or preferences, in which case their applicability across different providers is limited.

2.9.1 Property Naming Convention

See Section 6.1 in the JNDI API document for a description of how environment properties are named. Service provider-specific properties should have a prefix that reflects their uniqueness to the provider. A common practice is to use the package name of the service provider as the prefix. For example, since Sun's LDAP provider is primarily contained in the package com.sun.jndi.ldap, properties specific to Sun's LDAP provider have the prefix "com.sun.jndi.ldap.".

2.9.2 Initializing a Context's Environment

When creating an initial context (either using the constructors from InitialContext or its subclasses), the application can supply an environment as a parameter. The parameter is represented as a Hashtable or any of its subclasses (e.g., Properties). The JNDI class library augments the data from this parameter with data from other sources (see Chapter 6 in the JNDI API document) and passes this to the context implementation.

Like all other parameters, the environment parameter received by a context implementation is owned by the caller. The context implementation should make a copy of the environment parameter it gets or otherwise take steps to ensure that changes by the caller to the parameter would not affect what the context implementation sees and vice versa. Note also that if the environment parameter is a Properties instance, enumeration and Hashtable.get() on the parameter only examine the top-level properties (not any nested defaults). This is the expected behavior. The context implementation is not expected to retrieve or enumerate values in the Properties instance's nested defaults.

The JNDI library is responsible for merging properties from different sources, such as the environment parameter to the initial context, resource files, and, where appropriate, system properties and applet parameters (see the JNDI API document, Chapter 6). The context implementation typically just reads the property it needs from the environment which it was supplied. There is seldom a need for a context implementation to consult other sources.

2.9.3 Inheritance

The environment is inherited from parent to child as the context methods proceed from one context to the next. The entire environment of a context instance is inherited by the child context instances, regardless of whether certain properties within the environment are ignored by a particular context.

A context implementation must pass on the environment from one context instance to the next in order to implement this "inheritance" trait of environments. Within one context implementation it can do so by passing the environment as an argument to the Context constructor, or to the NamingManager/DirectoryManager.getObjectInstance() method for creating Context instances.

Across context implementations in a federation, this is supported by passing the environment as part of the CannotProceedException parameter of NamingManager.getContinuationContext()/DirectoryManager.getContinuationDirContext(), which in turn will use this environment when creating an instance of the context in which to continue the operation.

Inheritance can be implemented in any way as long as it preserves the semantics that each context has its own view of its environment. For example, a copy-on-write implementation could be used to defer copying of the environment until it is absolutely necessary.

2.9.4 Updates to the Environment

The environment of a context can be updated via the use of the addToEnvironment() and removeFromEnvironment() methods in the Context interface.

public interface Context {
        ...
        public Object addToEnvironment(String propName, Object propVal)
                throws NamingException;

        public Object removeFromEnvironment(String propName)
                throws NamingException;
}

These methods update the environment of this instance of Context. An environment property that is not relevant to the context implementation is silently ignored but maintained as part of the environment. The updated environment affects this instance of Context, and will be inherited by any new child Context instances, but does not affect any Context instances already in existence. A lookup of the empty name on a Context will return a new Context instance with an environment inherited as with any other child.

See Section 6.6 in the JNDI API document for details.

2.9.5 Provider Resource Files

Each service provider has an optional resource file that contains properties specific to that provider. The name of this resource is:

[prefix/]jndiprovider.properties
where prefix is the package name of the provider's context implementation(s), with each period (".") converted to a slash ("/"). For example, suppose a service provider defines a context implementation with class name com.sun.jndi.ldap.LdapCtx. The provider resource for this provider is named com/sun/jndi/ldap/jndiprovider.properties.

The JNDI class library will consult this file when it needs to determine the value of a property, as described in Section 6.5.2 in the JNDI API document.

When the service provider needs to determine the value of a property, it will generally take that value directly from the environment. The service provider may define provider-specific properties to be placed in its own provider resource file. In that case it needs to read them from its property resource file and merge them in a way consistent with the algorithm described in Section 6.5.2 in the JNDI API document.

2.10 Connection Management

For a context implementation that uses a client/server protocol, there is not necessarily a one-to-one mapping between a context and a connection between the client and the server. JNDI is a high-level API that does not deal directly with connections. It is the job of the context implementation to do any necessary connection management. Hence, a single connection may be shared by multiple context instances, and a context implementation is free to use its own algorithms to conserve connection and network usage. Thus, when a method is invoked on the context instance, the context implementation might need to do some connection management in addition to performing the requested operation.

The Context.close() and NamingEnumeration.close() methods can be used by applications to provide hints to the context implementation as to when to free connection-related resources. A context implementation may choose to (and is generally encouraged to) take other measures to garbage-collect and conserve its connection-related resources.

Some environment properties affect a context's connection. For example, if the application changes the security-related properties, the context implementation might need to modify or create a new connection using those updated properties. If the connection was being shared by other contexts prior to the change, the connection change should not affect contexts whose properties have not been updated.

3 The Initial Context

Since all naming methods are performed relative to a context, an application needs a starting context in order to invoke them. This starting context is referred to as the initial context. The bindings in the initial context are determined by policies set forth by the initial context implementation, perhaps using standard policies for naming global and enterprise-wide namespaces. For example, the initial context might contain a binding to the Internet DNS namespace, a binding to the enterprise-wide namespace, and a binding to a personal directory belonging to the user who is running the application.

An application obtains an initial context by making the following call:

Context ctx = new InitialContext();
An alternate constructor allows an environment to be passed as an argument. This allows the application to pass in preferences or security information to be used in the construction of the initial context.
Hashtable env = new Hashtable();4
env.put(Context.SECURITY_PRINCIPAL, "jsmith");
env.put(Context.SECURITY_CREDENTIALS, "xxxxxxx");
Context ctx = new InitialContext(env);

Subsequent to getting an initial context, the application can invoke Context methods.

Object obj = ctx.lookup("this/is/a/test");

The InitialContext class (and subclasses) selects an implementation using a default algorithm that can be overridden by installing an initial context factory builder (described below).

The InitialDirContext is an extension of InitialContext. It is used for performing directory operations using the initial context. The InitialLdapContext class is an extension of InitialDirContext. It is used for performing special LDAP v3 operations using the initial context. The algorithms and policies described in this section also apply to InitialDirContext and InitialLdapContext. Places where DirContext/LdapContext is required instead of Context have been noted.

3.1 The Initial Context Factory

An initial context factory is a class that creates an instance of a context that has been implemented following the guidelines outlined in Chapter 2. The factory is used by the InitialContext class (or subclass) constructor.

Given an environment, the factory returns an instance of Context (or its subinterfaces).

public interface InitialContextFactory {
        public Context getInitialContext(Hashtable env)
                throws NamingException;
}

Appendix A contains an example of an InitialContextFactory.

Once the context instance has been created, when a method is invoked on InitialContext by using a non-URL name (see below), the method is forwarded and invoked on that context instance.

JNDI selects the initial context implementation to use by using the property java.naming.factory.initial. This property contains the fully-qualified class name of an initial context factory. The class must implement the InitialContextFactory interface and have a public constructor that does not take any arguments. JNDI will load the initial context factory class and then invoke getInitialContext() on it to obtain a Context instance to be used as the initial context.

An application that wants to use a particular initial context must supply the java.naming.factory.initial property in the environment passed to the InitialContext (or subclass) constructors, or via resource files, system properties, or applet parameters.

3.1.1 Exceptions

When the property java.naming.factory.initial is set to a non-null value, the InitialContext (and subclass) constructors will try to load and instantiate an initial context factory, which will then create a context instance. If the factory or context cannot be created, for example as a result of an authentication problem, the initial context factory can throw an exception to indicate this problem. Note however that it is up to the context implementation when it verifies and indicates to users of the initial context any environment property- or connection- related problems. It can do so lazily-delaying until an operation is performed on the context, or eagerly, at the time the context is created.

If the property java.naming.factory.initial is not set, no attempt will be made to create an underlying context for the initial context. The initial context is still useful, for instance, for processing URL names, as described next.

3.2 URL Support

If a URL5 string is passed to the initial context, it will be resolved using the corresponding URL context implementation. This feature is supported by the InitialContext class (and subclasses) and is independent of the setting of the java.naming.factory.initial environment property.

This feature allows applications to use the initial context to reach any namespace for which a URL context implementation has been made available. For example, the following code lists an LDAP namespace from the initial context:

new InitialContext().list("ldap://lserver/ou=eng,o=wiz,c=us");

3.2.1 URL Context

A URL string has the following format:

scheme_id:opaque_string

For example, an LDAP URL string has the scheme id "ldap"; a file URL has the scheme id "file".

A URL context implementation is a class that implements the Context interface (and possibly some subinterfaces) and accepts name arguments that are URL strings of the scheme that it supports. For example, an LDAP URL context accepts "ldap" URL strings.

When a URL string name is passed to a URL context, the context methods that accept String treat the name as a URL with the syntax defined by the URL scheme. When a Name object in which the first component is a URL string name is passed to a URL context, the first component is treated as a URL string, and the rest is used for federation (that is, resolution of the first component will indicate which naming system to use to resolve the rest). The Name instance should be a CompositeName; otherwise, an InvalidNameException should be thrown.

Name arguments that are not URL strings, and URL strings with an inappropriate scheme id should be rejected with an InvalidNameException.

3.2.2 URL Context Factory

A URL context factory is a class (actually a special type object factory (see Section 4.1)) that creates an instance of a URL context for URLs of one or more schemes.

When the InitialContext class receives a URL string as a name argument, it will look for a URL context factory by using the following algorithm. The environment property java.naming.factory.url.pkgs contains a colon-separated list of package prefixes. The factory's class name is constructed by using the following rule:

package_prefix + "." + scheme_id + "." + scheme_id URLContextFactory

for each package prefix listed in the property. The default package prefix com.sun.jndi.url is appended to the end of the list.

For example, if the URL is "ldap://somehost:389" and java.naming.factory.url.pkgs contains "com.widget:com.wiz.jndi", the InitialContext class will attempt to locate the corresponding factory class by loading the following classes until one is successfully instantiated:

com.widget.ldap.ldapURLContextFactory
com.wiz.jndi.ldap.ldapURLContextFactory
com.sun.jndi.url.ldap.ldapURLContextFactory
The factory class implements the ObjectFactory interface (see "URL Context Factory" on page 31) and has a public constructor that takes no arguments. The InitialContext class passes the scheme id as the resolved object to the factory's getObjectInstance() method, which in turn creates a URL context for the URL scheme. The URL context will then be used to carry out the originally intended Context or DirContext operation on the URL supplied to InitialContext.

3.2.3 Service Provider's Responsibility

There is no requirement that a service provider supply a URL context factory and URL context implementation. It only does so if it wants to allow URL string names with its URL scheme to be accepted by the InitialContext class. A service provider, for instance, might just provide an initial context factory and a context implementation that is accessed through that factory.

3.3 Overriding the Default Behavior

The policy of creating an initial context factory using the java.naming.factory.initial environment property and URL support is built into the InitialContext class. There are two ways an application can override some or all of this policy.

3.3.1 Removing URL Support

If an application does not want URL strings to be treated specially, it can use the method NamingManager.getInitialContext(), which creates a context instance using the factory named in the java.naming.factory.initial environment property.

This method is also useful if the application needs to access interfaces implemented by the context created by the initial context factory, but which are not one of Context, DirContext, or LdapContext. Here is a code fragment that gets a context using NamingManager.getInitialContext() and then casts it to a subclass:

FooContext ctx = (FooContext) NamingManager.getInitialContext(env);
...
Object obj = ctx.lookup(name);
ctx.fooMethod1(...);
Note that installing an initial context factory builder (discussed next) affects the result of NamingManager.getInitialContext().

3.3.2 Removing All Policy

An initial context factory builder is a class that creates instances of initial context factories.

An application can install an initial context factory builder to define its own policy of how to locate and construct initial context implementations. When a builder has been installed, it is solely responsible for creating the initial context factories. None of the default policies (java.naming.factory.initial property or URL support) normally used by JNDI are employed.

An implementation of an initial context factory builder must implement the InitialContext-FactoryBuilder interface. Its createInitialContextFactory() method creates instances of InitialContextFactory.

After a builder has been installed. the application can get the initial context by either using the InitialContext/InitialDirContext/InitialLdapContext constructors, or by using NamingManager.getInitialContext(). When one of the constructors is used, its class is basically a wrapper around the underlying context implementation returned by NamingManager.getInitialContext().

3.4 Implementing a Subclass of InitialContext

When there is a need to provide an initial context that supports an interface that extends from Context, DirContext, or LdapContext, the service provider should supply a subclass of InitialContext (or InitialDirContext/InitialLdapContext).

3.4.1 URL Support

To add support for URLs in the same way InitialContext and InitialDirContext do, the subclass should use the protected methods available in InitialContext as follows. This only makes sense for interfaces that have methods that accept name argument.

For example, suppose FooContext is a subinterface of DirContext. Its initial context implementation would define getURLOrDefaultInitFooCtx() methods (for both Name and String parameters) that retrieve the real initial context to use.

public class InitialFooContext extends InitialDirContext {
        ...
        protected FooContext getURLOrDefaultInitFooCtx(Name name)
                throws NamingException {
                Context answer = getURLOrDefaultInitCtx(name);
                if (!(answer instanceof FooContext)) {
                        throw new NoInitialContextException("Not a FooContext");
                }
                return (FooContext)answer;
        }
        // similar code for getURLOrDefaultInitFooCtx(String name)
}
When providing implementations for the new methods in the FooContext interface that accept a name argument, getURLOrDefaultInitFooCtx() is used in the following way.
        public Object FooMethod1(Name name, ...) throws NamingException {
                return getURLOrDefaultInitFooCtx(name).FooMethod1(name, ...);
        }

3.4.2 New Method Support

When providing implementations for the new methods in the FooContext interface that do not have a name argument, or for which URL support is not required, use InitialContext.getDefaultInitCtx().

protected FooContext getDefaultInitFooCtx() throws NamingException {
        Context answer = getDefaultInitCtx();
        if (!(answer instanceof FooContext)) {
                throw new NoInitialContextException("Not an FooContext");
        }
        return (FooContext)answer;
}
public Object FooMethod2(Args args) throws NamingException {
        return getDefaultInitFooCtx().FooMethod2(args);
}

3.4.3 Constructors

The implementation should provide appropriate constructors for the class. The constructor should call the appropriate constructor of the superclass. If the environment needs to be modified or examined prior to the superclass's constructor being called, it should use the protected constructor that accepts a boolean flag to control the initialization of the initial context, and then use the init() method to initialize the context. Here is an example:

public InitialFooContext(Hashtable environment, Object otherArg)
            throws NamingException {
        super(true); // don't initialize yet

        // Clone environment and adjust
        Hashtable env = (environment == null) ? new Hashtable(11) :
                (Hashtable)environment.clone();
        ...
        init(env);
}
Client programs that use this new initial context would look as follows.

import com.widget.jndi.InitialFooContext;
...
FooContext ctx = new InitialFooContext(env);
Object obj = ctx.lookup(name);
ctx.FooMethod1(name, ...);

4 Customizing A Context Implementation

JNDI allows a context implementation to be customized-by the application, the application's deployer or user, or the service provider-in how it reads and stores objects in the naming/directory service. A similar facility is also available for narrowing LDAP v3 control classes.

You can think of these facilities as modules that plug into a context implementation.

4.1 Reading Objects: Object Factories

JNDI provides a generic way of creating objects (including instances of Context) using information stored in the namespace. That information may be of arbitrary type (java.lang.Object). For example, it may be a Reference, or a URL, or any other data required to create the object. Turning such information stored in the namespace into an object is supported through the use of object factories. An object factory is a class that implements the ObjectFactory interface (or the DirObjectFactory subinterface):

        public interface ObjectFactory {
                public Object getObjectInstance(Object refObj,
                                                Name name,
                                                Context nameCtx,
                                                Hashtable env)
                        throws Exception;
        }
        public interface DirObjectFactory extends ObjectFactory {
                public Object getObjectInstance(Object refObj,
                                                Name name,
                                                Context nameCtx,
                                                Hashtable env,
                                                Attributes attrs)
                        throws Exception;
        }

Given some reference information (refObj) about an object, optional information about the name of the object and where it is bound, and optionally some additional environment information (for example, some identity or authentication information about the user creating the object), the factory attempts to create an object represented by the reference information. For example, given reference information about a printer, a printer object factory might return an instance of Printer. In the case of an object factory that is to be used with a DirContext implementation, the factory is also given some attributes about the object. If the factory requires more attributes or information, it can obtain them directly from the naming/directory service by using the name/nameCtx arguments.

If the factory cannot created an object using the arguments supplied, it should return null. For example, when a printer object factory is given data about a disk drive, it should return null. The factory should only thrown an exception if no other object factories should be tried. Therefore, the factory should be careful about runtime exceptions that might be thrown from its implementation. For example, if a printer object factory is given data about a printer but the data is malformed in some way, it should throw an exception.

Object factories are used in several places in JNDI, basically to turn any reference information into an object. They are used in federation, URL processing in the initial context, and, as illustrated by the printer example, turning data into a form expected by the application.

4.1.1 Handling Structured References

A Reference contains methods for returning the class name and location of the object factory. The following methods are found in Reference.

public class Reference {
        ...
        public String   getClassName();
        public String getFactoryClassName();
        public String getFactoryClassLocation();
}
If the object read from the directory/naming service is an instance of Reference or Referenceable, its corresponding object factory can be located using information in Reference. The getFactoryClassName() method retrieves the name of the factory class that implements the ObjectFactory interface. This factory must implement the ObjectFactory interface and have a public constructor that takes no arguments. getFactoryClassLocation() retrieves the codebase of the class implementation for the factory, which is a list of space-separated URLs.

JNDI creates the object by invoking getObjectInstance() on the ObjectFactory instance, by using the Reference and environment as arguments. The result is an instance of a class identified by getClassName().

Note that all the classes necessary to instantiate the object returned to the application are made available using mechanisms provided by JNDI. The application doesn't have to install the classes locally.

Figure 3: Example Using Reference to Get Back an Object From the Namespace

Example Using Reference to Get Back an Object From the Namespace

Returning to the printer example, suppose Printer is an interface for representing a printer and the BSDPrinter class is an implementation of that interface. BSDPrinter implements the Referenceable interface and uses the Reference class to store information on how to construct instances of BSDPrinter and address information for communicating with the print server. The Reference contains the class name of the object ("Printer"), the class name of the printer object factory ("PrinterFactory") and a URL for loading the factory's class implementation. Using the factory class name and implementation location, JNDI first loads the implementation of PrinterFactory and creates an instance of PrinterFactory. It then invokes getObjectInstance() on the factory to create an instance of Printer using the reference. For example, one address in the reference may have an address of type "bsd", and contains the print server's host name ("lobby-printserver"). The PrinterFactory instance uses the address type ("bsd") to decide to create a BSDPrinter instance and passes the address contents ("lobby-printserver") to its constructor. The resulting BSDPrinter object is returned as the result of lookup().

From the context implementation's point of view, all of this is done automatically by its invocation of NamingManager/DirectoryManager.getObjectInstance().

When the application invokes print() on the BSDPrinter instance returned by lookup(), the data is sent to the print server on the machine "lobby-printserver" for printing. The application need not know the details of the Reference stored in the namespace, the protocol used to perform the job, or whether the BSDPrinter class was defined locally or loaded over the network. The transformation of the information stored in the underlying service into an object that implements the Printer interface is done transparently through the cooperation of the service provider (which stores bindings of printer names to printer address information), the printer service provider (which provides the PrinterFactory and BSDPrinter classes), and the JNDI SPI framework (which ties the two together to return an object that the application can use directly).

A service provider for such an object must do the following:

  2. Define the class for the object (e.g., BSDPrinter) that implements Referenceable or is a subclass of Reference.
  3. Define the Reference and its reference addresses for the object.
  4. Define a factory class that implements ObjectFactory (e.g., PrinterFactory). This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given the Reference from step 2.

4.1.2 Handling URL References

If a Reference contains an address of type "URL" but not the factory class name and location, or if the reference is an array of strings containing URLs, JNDI will use the URL context factory support described in Section 3.2 to locate the factory, and then pass the URL string in the address to the factory's getObjectInstance() method. See Section 4.1.6 for a description of how JNDI expects a URL context factory implementation to behave.

A service provider for such an object must do the following:

  2. Define the class for the object (e.g., BSDPrinter).
  3. Define the URL scheme for the object.
  4. Define a URL context factory class that implements ObjectFactory. This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given the URL from step 2.

4.1.3 Handling Arbitrary References: The java.naming.factory.object Property

In addition to extracting factory information from References, or using URLs, JNDI also looks for object factories specified in the java.naming.factory.object property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of object factories. Each class must implement the ObjectFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the ObjectFactory/DirObjectFactory.getObjectInstance() method on it using the object and environment arguments supplied. If the creation is successful, the resulting object is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

Figure 4: Example using java.naming.factory.object to Get Back an Object from the Namespace

Example using java.naming.factory.object to Get Back an Object from the Namespace

For the printer example, instead of using a Reference to represent a printer in the namespace, some other information is stored. When that information is later retrieved, the object factories specified java.naming.factory.object are tried in turn to attempt to turn that information into a Printer instance.

A service provider for such an object must do the following:

  2. Define the class for the object (e.g., BSDPrinter).
  3. Define the class for reference information for the object. This is the object that will be bound in the namespace. This need not be Reference. It can be anything that will be understood by its corresponding object factory (e.g., some string containing the server name "printer type=bsd; host=lobby-printserver").
  4. Define a factory class that implements ObjectFactory (e.g., PrinterFactory). This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given an instance of the class from step 2 (e.g., "printer type=bsd; host=lobby-printserver").

The service provider should automatically convert between the actual object (e.g., BSDPrinter) and the reference information (step 2, e.g., "printer type=bsd; host=lobby-printserver") when binding or looking up the object.

An application that wants to use a particular factory for generating objects must include the factory's class name in its java.naming.factory.object environment property and make the factory's classes and object classes available.

4.1.4 Overriding the Default Behavior

An object factory builder is a class that creates instances of object factories.

An application can install an object factory builder to defining its own policy of how to locate and construct object factory implementations. When a builder has been installed, it is solely responsible for creating the object factories. None of the default policies (Reference, URL string, or java.naming.factory.object property) normally used by JNDI are employed.

Figure 5: Example using an Object Factory Builder to Get Back an Object from the Namespece

Example using an Object Factory Builder to Get Back an Object from the Namespece

A service provider for an object factory builder must do the following:

  2. Define object factories that implement ObjectFactory.
  3. Define a class that implements ObjectFactoryBuilder. This class's createObjectFactory() method will use the constructors for the ObjectFactory classes in step 1.

An application that wants to use this factory builder must first install it.

       NamingManager.setObjectFactoryBuilder(builder);

4.1.5 Context Factory

A context factory is an object factory that creates instances of Context. The implementation of these contexts for a particular naming or directory service is referred to as a context implementation. Context implementations are described in Chapter 2. Like any other object factory, a context factory can be obtained by using any of the three mechanisms described above: from a Reference, a URL scheme id, or listed in the java.naming.factory.object property.

4.1.6 URL Context Factory

A URL context factory is a special kind of context factory. It follows these rules when implementing ObjectFactory.getObjectInstance().

  • If refObj is null, create a context for resolving URLs of the scheme associated with this factory. The resulting context is not tied to a specific URL. For example, invoking
getObjectInstance(null, null, null, env)
  • on an "ldap" URL context factory returns a context that can resolve LDAP URLs (e.g., "ldap://ldap.wiz.com/o=wiz,c=us" or "ldap://ldap.umich.edu/", ...).
  • If refObj is a URL string, create the object identified by the URL. For example, invoking
getObjectInstance("ldap://ldap.wiz.com/o=wiz,c=us", null, null, env);
  • on an "ldap" URL context factory would return the object named by "o=wiz,c=us" on the LDAP server ldap.wiz.com. If this happens to name a context, it can then be used for resolving (relative) LDAP names (e.g., "cn=Jane Smith").
  • If refObj is an array of URL strings, the assumption is that the URLs are equivalent in terms of the context to which they refer. Verification of whether the URLs are, or need to be, equivalent is up to the context factory. The order of the URLs in the array is not significant. The object returned by getObjectInstance() is the same as that for the single URL case-it is an object (perhaps a context) named by the URLs.
  • If refObj is any other type, the behavior of getObjectInstance() is determined by the implementation.

    URL context factories are used by the InitialContext class when it is passed a URL to resolve. URL context factories are also used for creating objects in the Java programming language from URLs stored in the namespace (see Section 4.1.2).

4.2 Storing Objects: State Factories

JNDI provides a mechanism to transform an object into a form storable by the underlying context implementation. That form may be any arbitrary type acceptable to the underlying context implementation. For example, it may be a Reference, a URL, a Serializable object, or a set of attributes, or any other data acceptable by the underlying context implementation. Turning an arbitrary object into data that can be stored in the namespace is supported through the use of state factories. A state factory is a class that implements the StateFactory interface (or the DirStateFactory subinterface):

        public interface StateFactory {
                public Object getStateToBind(Object obj,
                                             Name name,
                                             Context nameCtx,
                                             Hashtable env)
                        throws NamingException;
        }

        public interface DirStateFactory {
                public DirStateFactory.Result getStateToBind(Object obj,
                                                             Name name,
                                                             Context nameCtx,
                                                             Hashtable env,
                                                             Attributes attrs)
                        throws NamingException;
        }

Given an object (obj), optional information about the name of the object and where it is bound, and optionally some additional environment information (for example, some identity or authentication information about the user accessing the namespace), the factory attempts to create an object suitable for binding. Typically, the state factory is knowledgeable about the target naming/directory service and/or context implementation, and knows which data formats are acceptable. In the case of a state factory that is to be used with a DirContext implementation, the factory is also given some attributes that are to be stored with the object. If the factory require more information about the object, it can obtain them directly from the naming/directory service by using the name/nameCtx arguments. For example, a printer state factory for an LDAP directory might return a set of attributes that represent the printer.

If the factory cannot return any data using the arguments supplied, it should return null. For example, when a printer state factory is given a disk object, it should return null. The factory should only thrown an exception if no other state factories should be tried. Therefore, the factory should be careful about exceptions that might be thrown from its implementation. For example, if a printer state factory is given a printer object but perhaps contradictory attributes, it might throw an exception.

4.2.1 Input/Output Options

Ultimately, a factory's output formats are determined by the underlying naming/directory service. A context implementation for the CORBA Object Services (COS) naming service, for example, can only store CORBA object references into the service; a context implementation for LDAP can only store attributes, although there is a lot of flexibility in how to encode information within those attributes.

A service provider typically supplies a factory for each (common) type of input that it expects, and the application can augment that set with state factories of its own. For example, a service provider for COS naming might have a state factory for converting a Java Remote Method Invocation (RMI) object into a CORBA object reference. A user of that provider might add a state factory for converting a Microsoft COM object reference into a CORBA object reference.

4.2.2 Locating State Factories: The java.naming.factory.state Property

JNDI looks for state factories specified in the java.naming.factory.state property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of state factories. Each class must implement the StateFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the StateFactory/DirStateFactory.getStateToBind() method on it using the object, name, context, environment, and attributes arguments supplied. If the factory produces a non-null result, the result is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

4.3 Narrowing LDAP v3 Controls: Response Control Factories

The LDAP v3 protocol allows response controls to accompany any response sent by the server. The control consists of an OID string identifier and a sequence of ASN.1 BER encoded bytes. In the absence of any external information or assistance, the context implementation can only return a plain implementation of the Control interface that returns the OID and bytes.

JNDI provides the following abstract class for dealing with response controls:

        public abstract javax.naming.ldap.ControlFactory {
        ...
        public static Control getControlInstance(Control ctl,
                                                Context ctx,
                                                Hashtable env)
                throws NamingException;
        public abstract Control getControlInstance(Control ctl)
                throws NamingException;
}
When a context implementation receives a response control, it invokes the static getControl-Instance() method to find a control factory that can narrow the control to one that has more user-friendly access methods. Such a control, for instance, can decode the ASN.1 BER bytes and provide access methods that return the information as Java types. If no such control factory can be found, the original response control is returned. Here is an example of a hypothetical Time-ResponseControl which decodes the time of day.
public class TimeResponseControl implements Control {
        long time;
        // Constructor used by ControlFactory
        public TimeResponseControl(String OID, byte[] berVal)
                throws NamingException {
                // check validity of OID
                time = // extract time from berVal
        };

        // Type-safe and User-friendly method
        public long getTime() {
                return time;
        }
        // Low-level methods
        public String getID() {
                return TIME_OID;
        }
        public byte[] getEncodedValue() {
                return // original berVal
        }
         ...
}
A control factory may be responsible for one or more controls. If the factory cannot return a control using the arguments supplied, it should return null. Typically, this involves just matching the control's OID against the list of OIDs supported by the factory. The factory should only thrown an exception if no other control factories should be tried. Therefore, the factory should be careful about exceptions that might be thrown from its implementation. For example, if a control factory is given a control with an OID that it supports, but the byte array has an encoding error, it should throw an exception.

Here is an example of a control factory:

public class VendorXControlFactory extends ControlFactory {
        public VendorXControlFactory () {
        }
        public Control getControlInstance(Control orig)
                throws NamingException {
                if (isOneOfMyControls(orig.getID())) {
                         ...
                        // determine which of ours it is and call its constructor
                        return new TimeResponseControl(orig.getID(),
                                                                orig.getEncodedValue());
                }
                return null;  // not one of ours
        }
}

4.3.1 Locating Response Control Factories: The java.naming.factory.control Property

JNDI looks for response control factories specified in the java.naming.factory.control property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of control factories. Each class must implement the ControlFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the ControlFactory.getControlInstance() instance method on it using the control, context, and environment arguments supplied. If the factory produces a non-null result, the result is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

4.4 Ownership of Parameters

Any object passed as a parameter to a method in a factory is owned by the caller. Therefore, the factory is prohibited from maintaining a pointer to the object beyond the duration of the operation or modifying the object. If the factory needs to save the information contained in a parameter beyond the duration of the operation, it should maintain its own copy.

4.5 Reentrancy

A factory instance should be reentrant. That is, it should be possible for multiple threads to invoke methods on a single instance of a factory concurrently.

[Top] [Prev] [Next] [Bottom]

1 See Appendix B for legend of class diagram. 2 The CannotProceedException may well have been thrown by one of the context's internal methods when it discovered that the name being processed is beyond the scope of its naming system. The process by which the exception is produced is dependent on the implementation of the context. 3 Note that this is code in the application. In "Continuing an Operation in a Federation", the code sample presented is code in the context implementation. 4 You can also use a subclass of Hashtable (e.g. Properties) for this. 5 The mention of "URL" in this document refers to a URL string as defined by RFC 1738 and its related RFCs. It is any string that conforms to the syntax described therein, and may not always have corresponding support in the java.net.URL class or Web browsers. The URL string is either passed as the String name parameter, or as the first component of the Name parameter.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
[Top] [Prev] [Next] [Bottom]

Appendix B: Legend for Class Diagram

In a class diagram, we visually distinguish the different kinds of Java entities, as follows:

  2. The interface: A rounded rectangle
  3. The class: A rectangle
  4. The abstract class: A rectangle with an empty dot
  5. The final class: A rectangle with a black dot
  6. Classes with subclasses: A rectangle with a small black triangle on the lower right corner

    Most of these elements are shown below. The class or interface being described in the current chapter is shaded grey (this is not applicable for package class diagrams). A solid line represents extends, while a dotted line represents implements.

    Example class diagram

[Top] [Prev] [Next] [Bottom]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Service Provider Example

Documentation Contents
[Top] [Prev] [Next] [Bottom]

Appendix A: Service Provider Example

This appendix contains a simple service provider. It implements a flat namespace (with no federation support). It shows how to produce a context implementation by providing all the methods in the Context interface.

An instance of this context is bound directly as the initial context. This example provides the corresponding InitialContextFactory definition.

A.1 Simple Flat Context

A.1.1 Context Implementation

/*
 * @(#)FlatCtx.java     1.3 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
package examples.spi.flat;

import javax.naming.*;
import java.util.*;

/**
 * A sample service provider that implements a flat namespace in memory.
 */

class FlatCtx implements Context {
    Hashtable myEnv;
    private Hashtable bindings = new Hashtable(11);
    static NameParser myParser = new FlatNameParser();

    FlatCtx(Hashtable environment) {
        myEnv = (environment != null)
            ? (Hashtable)(environment.clone())
            : null;
    }

    public Object lookup(String name) throws NamingException {
        if (name.equals("")) {
            // Asking to look up this context itself.  Create and return
            // a new instance with its own independent environment.
            return (new FlatCtx(myEnv));
        }
        Object answer = bindings.get(name);
        if (answer == null) {
            throw new NameNotFoundException(name + " not found");
        }
        return answer;
    }

    public Object lookup(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return lookup(name.toString());
    }

    public void bind(String name, Object obj) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot bind empty name");
        }
        if (bindings.get(name) != null) {
            throw new NameAlreadyBoundException(
                    "Use rebind to override");
        }
        bindings.put(name, obj);
    }

    public void bind(Name name, Object obj) throws NamingException {
        // Flat namespace; no federation; just call string version
        bind(name.toString(), obj);
    }

    public void rebind(String name, Object obj) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot bind empty name");
        }
        bindings.put(name, obj);
    }

    public void rebind(Name name, Object obj) throws NamingException {
        // Flat namespace; no federation; just call string version
        rebind(name.toString(), obj);
    }

    public void unbind(String name) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot unbind empty name");
        }
        bindings.remove(name);
    }

    public void unbind(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        unbind(name.toString());
    }

    public void rename(String oldname, String newname)
            throws NamingException {
        if (oldname.equals("") || newname.equals("")) {
            throw new InvalidNameException("Cannot rename empty name");
        }

        // Check if new name exists
        if (bindings.get(newname) != null) {
            throw new NameAlreadyBoundException(newname +
                                                " is already bound");
        }

        // Check if old name is bound
        Object oldBinding = bindings.remove(oldname);
        if (oldBinding == null) {
            throw new NameNotFoundException(oldname + " not bound");
        }

        bindings.put(newname, oldBinding);
    }

    public void rename(Name oldname, Name newname)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        rename(oldname.toString(), newname.toString());
    }

    public NamingEnumeration list(String name)
            throws NamingException {
        if (name.equals("")) {
            // listing this context
            return new FlatNames(bindings.keys());
        }

        // Perhaps `name' names a context
        Object target = lookup(name);
        if (target instanceof Context) {
            return ((Context)target).list("");
        }
        throw new NotContextException(name + " cannot be listed");
    }

    public NamingEnumeration list(Name name)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        return list(name.toString());
    }

    public NamingEnumeration listBindings(String name)
            throws NamingException {
        if (name.equals("")) {
            // listing this context
            return new FlatBindings(bindings.keys());
        }

        // Perhaps `name' names a context
        Object target = lookup(name);
        if (target instanceof Context) {
            return ((Context)target).listBindings("");
        }
        throw new NotContextException(name + " cannot be listed");
    }

    public NamingEnumeration listBindings(Name name)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        return listBindings(name.toString());
    }

    public void destroySubcontext(String name) throws NamingException {
        throw new OperationNotSupportedException(
                "FlatCtx does not support subcontexts");
    }

    public void destroySubcontext(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        destroySubcontext(name.toString());
    }

    public Context createSubcontext(String name)
            throws NamingException {
        throw new OperationNotSupportedException(
                "FlatCtx does not support subcontexts");
    }

    public Context createSubcontext(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return createSubcontext(name.toString());
    }

    public Object lookupLink(String name) throws NamingException {
        // This flat context does not treat links specially
        return lookup(name);
    }

    public Object lookupLink(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return lookupLink(name.toString());
    }

    public NameParser getNameParser(String name)
            throws NamingException {
        return myParser;
    }

    public NameParser getNameParser(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return getNameParser(name.toString());
    }

    public String composeName(String name, String prefix)
            throws NamingException {
        Name result = composeName(new CompositeName(name),
                                  new CompositeName(prefix));
        return result.toString();
    }

    public Name composeName(Name name, Name prefix)
            throws NamingException {
        Name result = (Name)(prefix.clone());
        result.addAll(name);
        return result;
    }

    public Object addToEnvironment(String propName, Object propVal)
            throws NamingException {
        if (myEnv == null) {
            myEnv = new Hashtable(5, 0.75f);
        }
        return myEnv.put(propName, propVal);
    }

    public Object removeFromEnvironment(String propName)
            throws NamingException {
        if (myEnv == null)
            return null;

        return myEnv.remove(propName);
    }

    public Hashtable getEnvironment() throws NamingException {
        if (myEnv == null) {
            // Must return non-null
            return new Hashtable(3, 0.75f);
        } else {
            return (Hashtable)myEnv.clone();
        }
    }

    public String getNameInNamespace() throws NamingException {
        return "";
    }

    public void close() throws NamingException {
        myEnv = null;
        bindings = null;
    }

    // Class for enumerating name/class pairs
    class FlatNames implements NamingEnumeration {
        Enumeration names;

        FlatNames (Enumeration names) {
            this.names = names;
        }

        public boolean hasMoreElements() {
            return names.hasMoreElements();
        }

        public boolean hasMore() throws NamingException {
            return hasMoreElements();
        }

        public Object nextElement() {
            String name = (String)names.nextElement();
            String className = bindings.get(name).getClass().getName();
            return new NameClassPair(name, className);
        }

        public Object next() throws NamingException {
            return nextElement();
        }
        public void close() {
        }
    }

    // Class for enumerating bindings
    class FlatBindings implements NamingEnumeration {
        Enumeration names;

        FlatBindings (Enumeration names) {
            this.names = names;
        }

        public boolean hasMoreElements() {
            return names.hasMoreElements();
        }

        public boolean hasMore() throws NamingException {
            return hasMoreElements();
        }

        public Object nextElement() {
            String name = (String)names.nextElement();
            return new Binding(name, bindings.get(name));
        }

        public Object next() throws NamingException {
            return nextElement();
        }
        public void close() {
        }
    }
};

A.1.2 Name Parser

/*
 * @(#)FlatNameParser.java      1.3 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
package examples.spi.flat;

import javax.naming.NameParser;
import javax.naming.Name;
import javax.naming.CompoundName;
import javax.naming.NamingException;
import java.util.Properties;

class FlatNameParser implements NameParser {

    static Properties syntax = new Properties();
    static {
        syntax.put("jndi.syntax.direction", "flat");
        syntax.put("jndi.syntax.ignorecase", "false");
    }
    public Name parse(String name) throws NamingException {
        return new CompoundName(name, syntax);
    }
}

A.1.3 Initial Context Factory

/*
 * @(#)FlatInitCtxFactory.java  1.3 99/07/26
 *
 * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
package examples.spi.flat;

import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.spi.InitialContextFactory;

public class FlatInitCtxFactory implements InitialContextFactory {

    public Context getInitialContext(Hashtable env) {
        return new FlatCtx(env);
    }
}

[Top] [Prev] [Next] [Bottom]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in JNI

Documentation Contents

Java JNI Enhancements

  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 7

No changes to report.

Enhancements in Java SE 6

No changes to report.

Enhancements in Java SE 5.0

No changes to report.

Enhancements in Java SE 1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNI APIs and Developer Guides

Documentation Contents

Java Native Interface

Java Native Interface (JNI) is a standard programming interface for writing Java native methods and embedding the Java virtual machine into native applications. The primary goal is binary compatibility of native method libraries across all Java virtual machine implementations on a given platform.

JNI 6.0 API Specification

The Java Native Interface 6.0 Specification describes how the AWT package is designed to use JNI mechanisms to display objects on Solaris, Linux and Windows platforms.

JNI API Enhancements

JNI Enhancements will report further enhancements to this technology as they are added.

More Information

See JNI FAQ.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNI Enhancements in Java SE

Documentation Contents

JNI Enhancements
Introduced in Version 1.4 of Java SE

JNI has been enhanced in v 1.4 with support for the java.nio package as well as a new entry point in the JNI Invocation Interface. Also, the JNI version number has been incremented and the description of JNI_OnLoad updated accordingly.

The new Invocation Interface routine allows native code to attach a daemon thread to the Java virtual machine (JVM); this is useful when the JVM should not wait for this thread to exit upon shutdown.

  • AttachCurrentThreadAsDaemon

The NIO-related entry points allow native code to access java.nio direct buffers. The contents of a direct buffer can, potentially, reside in native memory outside of the ordinary garbage-collected heap. For information about direct buffers, please see New I/O APIs and the specification of the java.nio.ByteBuffer class.

Three new functions allow JNI code to create, examine, and manipulate direct buffers:
  • NewDirectByteBuffer
  • GetDirectBufferAddress
  • GetDirectBufferCapacity

Every implementation of the Java virtual machine must support these functions, but not every implementation is required to support JNI access to direct buffers. If a JVM does not support such access then the NewDirectByteBuffer and GetDirectBufferAddress functions must always return NULL, and the GetDirectBufferCapacity function must always return -1. If a JVM does support such access then these three functions must be implemented to return the appropriate values.

Incremented Version Number

The JNI version number has been incremented. The include file jni.h defines the new constant:

    #define JNI_VERSION_1_4 0x00010004

The GetVersion procedure now returns this value, and the specification of the JNI_OnLoad procedure has been revised:

    jint JNI_OnLoad(JavaVM *vm, void *reserved);

      The VM calls JNI_OnLoad when the native library is loaded (for example,
      through System.loadLibrary).  JNI_OnLoad must return the JNI version
      needed by the native library.

      In order to use the JNI functions introduced in Java SE release 1.2 in
      addition to those that were available in JDK 1.1, a native library must
      export a JNI_OnLoad function that returns JNI_VERSION_1_2.

      In order to use the JNI functions introduced in Java SE release 1.4 in
      addition to those that were available in release 1.2, a native library
      must export a JNI_OnLoad function that returns JNI_VERSION_1_4.

      If the native library does not export a JNI_OnLoad function, the VM
      assumes that the library only requires JNI version JNI_VERSION_1_1.  If
      the VM does not recognize the version number returned by JNI_OnLoad, the
      native library cannot be loaded.

Additions to the JNI Invocation Interface

AttachCurrentThreadAsDaemon

jint AttachCurrentThreadAsDaemon(JavaVM* vm, void** penv, void* args);

Same semantics as AttachCurrentThread, but the newly-created java.lang.Thread instance is a daemon.

If the thread has already been attached via either AttachCurrentThread or AttachCurrentThreadAsDaemon, this routine simply sets the value pointed to by penv to the JNIEnv of the current thread. In this case neither AttachCurrentThread nor this routine have any effect on the daemon status of the thread.

LINKAGE

Index 7 in the JavaVM interface function table.

PARAMETERS

vm: the virtual machine instance to which the current thread will be attached.

penv: a pointer to the location in which the JNIEnv interface pointer for the current thread will be placed.

args: a pointer to a JavaVMAttachArgs structure.

RETURNS

Returns zero on success; otherwise, returns a negative number.

EXCEPTIONS

None.

Additions to the JNI Interface

NewDirectByteBuffer

jobject NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity);

Allocates and returns a direct java.nio.ByteBuffer referring to the block of memory starting at the memory address address and extending capacity bytes.

Native code that calls this function and returns the resulting byte-buffer object to Java-level code should ensure that the buffer refers to a valid region of memory that is accessible for reading and, if appropriate, writing. An attempt to access an invalid memory location from Java code will either return an arbitrary value, have no visible effect, or cause an unspecified exception to be thrown.

LINKAGE

Index 229 in the JNIEnv interface function table.

PARAMETERS

env: the JNIEnv interface pointer

address: the starting address of the memory region (must not be NULL)

capacity: the size in bytes of the memory region (must be positive)

RETURNS

Returns a local reference to the newly-instantiated java.nio.ByteBuffer object. Returns NULL if an exception occurs, or if JNI access to direct buffers is not supported by this virtual machine.

EXCEPTIONS

OutOfMemoryError: if allocation of the ByteBuffer object fails

GetDirectBufferAddress

void* GetDirectBufferAddress(JNIEnv* env, jobject buf);

Fetches and returns the starting address of the memory region referenced by the given direct java.nio.Buffer.

This function allows native code to access the same memory region that is accessible to Java code via the buffer object.

LINKAGE

Index 230 in the JNIEnv interface function table.

PARAMETERS

env: the JNIEnv interface pointer

buf: a direct java.nio.Buffer object (must not be NULL)

RETURNS

Returns the starting address of the memory region referenced by the buffer. Returns NULL if the memory region is undefined, if the given object is not a direct java.nio.Buffer, or if JNI access to direct buffers is not supported by this virtual machine.

GetDirectBufferCapacity

jlong GetDirectBufferCapacity(JNIEnv* env, jobject buf);

Fetches and returns the capacity in bytes of the memory region referenced by the given direct java.nio.Buffer.

LINKAGE

Index 231 in the JNIEnv interface function table.

PARAMETERS

env: the JNIEnv interface pointer

buf: a direct java.nio.Buffer object (must not be NULL)

RETURNS

Returns the capacity in bytes of the memory region associated with the buffer. Returns -1 if the given object is not a direct java.nio.Buffer, or if JNI access to direct buffers is not supported by this virtual machine.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNI Enhancements in the JDK

Documentation Contents

JNI Enhancements
Introduced in version 1.2 of Java SE

JNI has been enhanced in the Java SE to:

  • incorporate new features in the evolving Java platform,
  • ensure an efficient and stable interface for Java/native code integration.

New Constants

#define JNI_VERSION_1_1 0x00010001
#define JNI_VERSION_1_2 0x00010002

/* Error codes */
#define JNI_EDETACHED    (-2)              /* thread detached from the VM */
#define JNI_EVERSION     (-3)              /* JNI version error */

Enhancements to the Existing API

  • Class Operations
    • FindClass
  • Invocation API
    • JNI_CreateJavaVM
    • AttachCurrentThread
    • DetachCurrentThread
    • DestroyJavaVM

New Functions

  • Library and Version Management
    • JNI_OnLoad
    • JNI_OnUnload
  • Local Reference Management
    • EnsureLocalCapacity
    • PushLocalFrame
    • PopLocalFrame
    • NewLocalRef
  • Exceptions
    • ExceptionCheck
  • Weak Global References
    • NewWeakGlobalRef
    • DeleteWeakGlobalRef
  • Array Operations
    • GetPrimitiveArrayCritical
    • ReleasePrimitiveArrayCritical
  • String Operations
    • GetStringRegion
    • GetStringUTFRegion
    • GetStringCritical
    • ReleaseStringCritical
  • Reflection Support
    • FromReflectedMethod
    • FromReflectedField
    • ToReflectedMethod
    • ToReflectedField
  • Invocation API
    • GetEnv

Class Operations

In the enhanced Java security model, non-system classes can load native code. The JNI function FindClass has been extended so that it finds classes loaded with a class loader.

jclass FindClass(JNIEnv *env, const char *name);

In JDK 1.1, FindClass searched only local classes in CLASSPATH. The resulting classes did not have a class loader.

The Java security model has been extended to allow non-system classes to load and call native methods. In the Java SE Platform, FindClass locates the class loader associated with the current native method. If the native code belongs to a system class, no class loader will be involved. Otherwise, the proper class loader will be invoked to load and link the named class.

When FindClass is called through the Invocation Interface, there is no current native method or its associated class loader. In that case, the result of ClassLoader.getBaseClassLoader is used. This is the class loader the virtual machine creates for applications, and is able to locate classes listed in the java.class.path property.

Library and Version Management

In JDK 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems:
  • A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader.
  • Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems.

In the JDK, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are:

  • Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders.
  • In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected.

To facilitate versioning control and resource management, JNI libraries in the Java Platform may optionally export the following two functions:

jint JNI_OnLoad(JavaVM *vm, void *reserved);

The VM calls JNI_OnLoad when the native library is loaded (for example, through System.loadLibrary). JNI_OnLoad must return the JNI version needed by the native library.

In order to use any of the new JNI functions, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded.

void JNI_OnUnload(JavaVM *vm, void *reserved);

The VM calls JNI_OnUnload when the class loader containing the native library is garbage collected. This function can be used to perform cleanup operations. Because this function is called in an unknown context (such as from a finalizer), the programmer should be conservative on using Java VM services, and refrain from arbitrary Java call-backs.

Note that JNI_OnLoad and JNI_OnUnload are two functions optionally supplied by JNI libraries, not exported from the VM.

Local Reference Management

Local references are valid for the duration of a native method call. They are freed automatically after the native method returns. Each local reference costs some amount of Java Virtual Machine resource. Programmers need to make sure that native methods do not excessively allocate local references. Although local references are automatically freed after the native method returns to Java, excessive allocation of local references may cause the VM to run out of memory during the execution of a native method.

JDK 1.1 provides a DeleteLocalRef function so that programmers can manually delete local references. For example, if native code iterates through a potentially large array of objects and uses one element in each iteration, it is a good practice to delete the local reference to the no-longer-used array element before a new local reference is created in the next iteration.

The JDK provides an additional set of functions for local reference lifetime management.

jint EnsureLocalCapacity(JNIEnv *env, jint capacity);

Ensures that at least a given number of local references can be created in the current thread. Returns 0 on success; otherwise returns a negative number and throws an OutOfMemoryError.

Before it enters a native method, the VM automatically ensures that at least 16 local references can be created.

For backward compatibility, the VM allocates local references beyond the ensured capacity. (As a debugging support, the VM may give the user warnings that too many local references are being created. In the JDK, the programmer can supply the -verbose:jni command line option to turn on these messages.) The VM calls FatalError if no more local references can be created beyond the ensured capacity.

jint PushLocalFrame(JNIEnv *env, jint capacity);

Creates a new local reference frame, in which at least a given number of local references can be created. Returns 0 on success, a negative number and a pending OutOfMemoryError on failure.

Note that local references already created in previous local frames are still valid in the current local frame.

jobject PopLocalFrame(JNIEnv *env, jobject result);

Pops off the current local reference frame, frees all the local references, and returns a local reference in the previous local reference frame for the given result object.

Pass NULL as result if you do not need to return a reference to the previous frame.

jobject NewLocalRef(JNIEnv *env, jobject ref);

Creates a new local reference that refers to the same object as ref. The given ref may be a global or local reference. Returns NULL if ref refers to null.

Exceptions

We introduce a convenience function to check for pending exceptions without creating a local reference to the exception object.

jboolean ExceptionCheck(JNIEnv *env);

Returns JNI_TRUE when there is a pending exception; otherwise, returns JNI_FALSE.

Weak Global References

Weak global references are a special kind of global reference. Unlike normal global references, a weak global reference allows the underlying Java object to be garbage collected. Weak global references may be used in any situation where global or local references are used. When the garbage collector runs, it frees the underlying object if the object is only referred to by weak references. A weak global reference pointing to a freed object is functionally equivalent to NULL. Programmers can detect whether a weak global reference points to a freed object by using IsSameObject to compare the weak reference against NULL.

Weak global references in JNI are a simplified version of the Java Weak References, available as part of the Java SE API ( java.lang.ref package and its classes).

Clarification (added June 2001)

Since garbage collection may occur while native methods are running, objects referred to by weak global references can be freed at any time. While weak global references can be used where global references are used, it is generally inappropriate to do so, as they may become functionally equivalent to NULL without notice.

While IsSameObject can be used to determine whether a weak global reference refers to a freed object, it does not prevent the object from being freed immediately thereafter. Consequently, programmers may not rely on this check to determine whether a weak global reference may used (as a non-NULL reference) in any future JNI function call.

To overcome this inherent limitation, it is recommended that a standard (strong) local or global reference to the same object be acquired using the JNI functions NewLocalRef or NewGlobalRef, and that this strong reference be used to access the intended object. These functions will return NULL if the object has been freed, and otherwise will return a strong reference (which will prevent the object from being freed). The new reference should be explicitly deleted when immediate access to the object is no longer required, allowing the object to be freed.

The weak global reference is weaker than other types of weak references (Java objects of the SoftReference or WeakReference classes). A weak global reference to a specific object will not become functionally equivalent to NULL until after SoftReference or WeakReference objects referring to that same specific object have had their references cleared.

The weak global reference is weaker than Java's internal references to objects requiring finalization. A weak global reference will not become functionally equivalent to NULL until after the completion of the finalizer for the referenced object, if present.

Interactions between weak global references and PhantomReferences are undefined. In particular, implementations of a Java VM may (or may not) process weak global references after PhantomReferences, and it may (or may not) be possible to use weak global references to hold on to objects which are also referred to by PhantomReference objects. This undefined use of weak global references should be avoided.

jweak NewWeakGlobalRef(JNIEnv *env, jobject obj);

Creates a new weak global reference. Returns NULL if obj refers to null, or if the VM runs out of memory. If the VM runs out of memory, an OutOfMemoryError will be thrown.

void DeleteWeakGlobalRef(JNIEnv *env, jweak obj);

Delete the VM resources needed for the given weak global reference.

Array Operations

In JDK 1.1, programmers can use Get/Release<PrimitiveType>ArrayElements functions to obtain a pointer to primitive array elements. If the VM supports pinning, the pointer to the original data is returned; otherwise, a copy is made.

New functions allow native code to obtain a direct pointer to array elements even if the VM does not support pinning.

void * GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy);
void ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, void *carray, jint mode);

The semantics of these two functions are very similar to the existing Get/Release<PrimitiveType>ArrayElements functions. If possible, the VM returns a pointer to the primitive array; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used.

After calling GetPrimitiveArrayCritical, the native code should not run for an extended period of time before it calls ReleasePrimitiveArrayCritical. We must treat the code inside this pair of functions as running in a "critical region." Inside a critical region, native code must not call other JNI functions, or any system call that may cause the current thread to block and wait for another Java thread. (For example, the current thread must not call read on a stream being written by another Java thread.)

These restrictions make it more likely that the native code will obtain an uncopied version of the array, even if the VM does not support pinning. For example, a VM may temporarily disable garbage collection when the native code is holding a pointer to an array obtained via GetPrimitiveArrayCritical.

Multiple pairs of GetPrimtiveArrayCritical and ReleasePrimitiveArrayCritical may be nested. For example:

  jint len = (*env)->GetArrayLength(env, arr1);
  jbyte *a1 = (*env)->GetPrimitiveArrayCritical(env, arr1, 0);
  jbyte *a2 = (*env)->GetPrimitiveArrayCritical(env, arr2, 0);
  /* We need to check in case the VM tried to make a copy. */
  if (a1 == NULL || a2 == NULL) {
    ... /* out of memory exception thrown */
  }
  memcpy(a1, a2, len);
  (*env)->ReleasePrimitiveArrayCritical(env, arr2, a2, 0);
  (*env)->ReleasePrimitiveArrayCritical(env, arr1, a1, 0);

Note that GetPrimitiveArrayCritical might still make a copy of the array if the VM internally represents arrays in a different format. Therefore we need to check its return value against NULL for possible out of memory situations.

String Operations

In JDK 1.1, programmers can get primitive array elements in a user-supplied buffer. The JDK allows native code to obtain Unicode or UTF-8 characters in a user-supplied buffer.

void GetStringRegion(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);

Copies len number of Unicode characters beginning at offset start to the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

< void GetStringUTFRegion(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);

Translates len number of Unicode characters beginning at offset start into UTF-8 format and place the result in the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

const jchar * GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy);
void ReleaseStringCritical(JNIEnv *env, jstring string, const jchar *carray);

The semantics of these two functions are similar to the existing Get/ReleaseStringChars functions. If possible, the VM returns a pointer to string elements; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used. In a code segment enclosed by Get/ReleaseStringCritical calls, the native code must not issue arbitrary JNI calls, or cause the current thread to block.

The restrictions on Get/ReleaseStringCritical are similar to those on Get/ReleasePrimitiveArrayCritical.

Reflection Support

Programmers can use the JNI to call Java methods or access Java fields if they know the name and type of the methods or fields. The Java Core Reflection API allows programmers to introspect Java classes at runtime. JNI provides a set of conversion functions between field and method IDs used in the JNI to field and method objects used in the Java Core Reflection API.

jmethodID FromReflectedMethod(JNIEnv *env, jobject method);

Converts a java.lang.reflect.Method or java.lang.reflect.Constructor object to a method ID.

jfieldID FromReflectedField(JNIEnv *env, jobject field);

Converts a java.lang.reflect.Field to a field ID.

jobject ToReflectedMethod(JNIEnv *env, jclass cls,
   jmethodID methodID);

Converts a method ID derived from cls to a java.lang.reflect.Method or java.lang.reflect.Constructor object.

Throws OutOfMemoryError and returns 0 if fails.

jobject ToReflectedField(JNIEnv *env, jclass cls,
   jfieldID fieldID);

Converts a field ID derived from cls to a java.lang.reflect.Field object.

Throws OutOfMemoryError and returns 0 if fails.

Invocation API

jint JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);

In JDK 1.1, the second argument to JNI_CreateJavaVM is always a pointer to JNIEnv *. The third argument is a pointer to a JDK 1.1 specific structure (JDK1_1InitArgs). The JDK1_1InitArgs structure is clearly not designed to be portable on all VMs.

In the JDK, we introduce a standard VM initialization structure. Backward compatibility is preserved. If the VM initialization argument points to a JDK1_1InitArgs structure, JNI_CreateJavaVM still returns the 1.1 version of JNI interface pointer. The VM returns the 1.2 version of JNI interface pointer if the third argument points to a JavaVMInitArgs structure. Unlike JDK1_1InitArgs, which contains a fixed set of options, JavaVMInitArgs uses option strings to encode arbitrary VM start up options.

typedef struct JavaVMInitArgs {
    jint version;

    jint nOptions;
    JavaVMOption *options;
    jboolean ignoreUnrecognized;
} JavaVMInitArgs;
The version field must be set to JNI_VERSION_1_2. (In contrast, the version field in JDK1_1InitArgs must be set to JNI_VERSION_1_1.) The options field is an array of the following type:
typedef struct JavaVMOption {
    char *optionString;
    void *extraInfo;
} JavaVMOption;
The size of the array is denoted by the nOptions field in JavaVMInitArgs. If ignoreUnrecognized is JNI_TRUE, JNI_CreateJavaVM ignore all unrecognized option strings that begin with "-X" or "_". If ignoreUnrecognized is JNI_FALSE, JNI_CreateJavaVM returns JNI_ERR as soon as it encounters any unrecognized option strings. All Java VMs must recognize the following set of standard options:
optionString | meaning
-D<name>=<value> | Set a system property
-verbose[:class|gc|jni] | Enable verbose output. The options can be followed by a comma-separated list of names indicating what kind of messages will be printed by the VM. For example, "-verbose:gc,class" instructs the VM to print GC and class loading related messages. Standard names include: gc, class, and jni. All nonstandard (VM-specific) names must begin with "X".
vfprintf | extraInfo is a pointer to the vfprintf hook.
exit | extraInfo is a pointer to the exit hook.
abort | extraInfo is a pointer to the abort hook.

In addition, each VM implementation may support its own set of non-standard option strings. Non-standard option names must begin with "-X" or an underscore ("_"). For example, the JDK supports -Xms and -Xmx options to allow programmers specify the initial and maximum heap size. Options that begin with "-X" are accessible from the "java" command line.

Here is the example code that creates a Java VM in the JDK:

JavaVMInitArgs vm_args;
JavaVMOption options[4];

options[0].optionString = "-Djava.compiler=NONE";           /* disable JIT */
options[1].optionString = "-Djava.class.path=c:\myclasses"; /* user classes */
options[2].optionString = "-Djava.library.path=c:\mylibs";  /* set native library path */
options[3].optionString = "-verbose:jni";                   /* print JNI-related messages */

vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 4;
vm_args.ignoreUnrecognized = TRUE;

/* Note that in the JDK, there is no longer any need to call
 * JNI_GetDefaultJavaVMInitArgs.
 */
res = JNI_CreateJavaVM(&vm, (void **)&env, &vm_args);
if (res < 0) ...

The JDK still supports JDK1_1InitArgs in exactly the same way as JDK 1.1.

jint AttachCurrentThread(JavaVM *vm, void **penv, void *args);

In JDK 1.1, the second argument to AttachCurrentThread is always a pointer to JNIEnv. The third argument to AttachCurrentThread was reserved, and should be set to NULL.

In the JDK, you pass NULL as the third argument for 1.1 behavior, or pass a pointer to the following structure to specify additional information:

typedef struct JavaVMAttachArgs {
    jint version;  /* must be JNI_VERSION_1_2 */
    char *name;    /* the name of the thread, or NULL */
    jobject group; /* global ref of a ThreadGroup object, or NULL */
} JavaVMAttachArgs;

jint DetachCurrentThread(JavaVM *vm);

In JDK 1.1, the main thread cannot be detached from the VM. It must call DestroyJavaVM to unload the entire VM.

In the JDK, the main thread can be detached from the VM.

jint DestroyJavaVM(JavaVM *vm);

The support for DestroyJavaVM was not complete in 1.1. Only the main thread may call DestroyJavaVM. In the JDK, any thread, whether attached or not, can call this function. If the current thread is attached, the VM waits until the current thread is the only user-level Java thread. If the current thread is not attached, the VM attaches the current thread and then waits until the current thread is the only user-level thread. The JDK still does not support VM unloading, however. DestroyJavaVM always returns an error code.

jint GetEnv(JavaVM *vm, void **env, jint version);

If the current thread is not attached to the VM, sets *env to NULL, and returns JNI_EDETACHED. If the specified version is not supported, sets *env to NULL, and returns JNI_EVERSION. Otherwise, sets *env to the appropriate interface, and returns JNI_OK.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Acknowledgments

The Java Native Interface (JNI) specification was formed as a result of a series of discussions among JavaSoft and Java licensees. The goal is to achieve a native interface standard.

Sheng Liang at JavaSoft is responsible for the JNI design and specification. JNI is partly evolved from Netscape’s Java Runtime Interface (JRI), which was designed by Warren Harris. Warren Harris also helped to improve the JNI design. Simon Nash at IBM and Patrick Beard at Apple provided extensive feedbacks that shaped the JNI design in many ways.

In addition, the JNI benefited greatly from JavaSoft internal design reviews. These design reviews were conducted by James Gosling, Peter Kessler, Tim Lindholm, Mark Reinhold, Derek White, and Frank Yellin.

We also want to acknowledge the helpful comments and suggestions we received from numerous people on various drafts of the specification.

Lastly, Beth Stearns improved the presentation of this document.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Design Overview

Documentation Contents
Contents | Previous | Next

Chapter 2: Design Overview

This chapter focuses on major design issues in the JNI. Most design issues in this section are related to native methods. The design of the Invocation API is covered in Chapter 5: The Invocation API.

This chapter covers the following topics:

  • JNI Interface Functions and Pointers
  • Compiling, Loading and Linking Native Methods
    • Resolving Native Method Names
    • Native Method Arguments
  • Referencing Java Objects
    • Global and Local References
    • Implementing Local References
  • Accessing Java Objects
    • Accessing Primitive Arrays
    • Accessing Fields and Methods
  • Java Exceptions
    • Exceptions and Error Codes
    • Asynchronous Exceptions
    • Exception Handling

JNI Interface Functions and Pointers

Native code accesses Java VM features by calling JNI functions. JNI functions are available through an interface pointer. An interface pointer is a pointer to a pointer. This pointer points to an array of pointers, each of which points to an interface function. Every interface function is at a predefined offset inside the array. The following figure, Interface Pointer, illustrates the organization of an interface pointer.

Description of Figure Interface Pointer

The JNI interface is organized like a C++ virtual function table or a COM interface. The advantage to using an interface table, rather than hard-wired function entries, is that the JNI name space becomes separate from the native code. A VM can easily provide multiple versions of JNI function tables. For example, the VM may support two JNI function tables:

  • one performs thorough illegal argument checks, and is suitable for debugging;
  • the other performs the minimal amount of checking required by the JNI specification, and is therefore more efficient.

The JNI interface pointer is only valid in the current thread. A native method, therefore, must not pass the interface pointer from one thread to another. A VM implementing the JNI may allocate and store thread-local data in the area pointed to by the JNI interface pointer.

Native methods receive the JNI interface pointer as an argument. The VM is guaranteed to pass the same interface pointer to a native method when it makes multiple calls to the native method from the same Java thread. However, a native method can be called from different Java threads, and therefore may receive different JNI interface pointers.

Compiling, Loading and Linking Native Methods

Since the Java VM is multithreaded, native libraries should also be compiled and linked with multithread aware native compilers. For example, the -mt flag should be used for C++ code compiled with the Sun Studio compiler. For code complied with the GNU gcc compiler, the flags -D_REENTRANT or -D_POSIX_C_SOURCE should be used. For more information please refer to the native compiler documentation.

Native methods are loaded with the System.loadLibrary method. In the following example, the class initialization method loads a platform-specific native library in which the native method f is defined:

package pkg;

class Cls {
    native double f(int i, String s);
    static {
        System.loadLibrary(“pkg_Cls”);
    }
}

The argument to System.loadLibrary is a library name chosen arbitrarily by the programmer. The system follows a standard, but platform-specific, approach to convert the library name to a native library name. For example, a Solaris system converts the name pkg_Cls to libpkg_Cls.so, while a Win32 system converts the same pkg_Cls name to pkg_Cls.dll.

The programmer may use a single library to store all the native methods needed by any number of classes, as long as these classes are to be loaded with the same class loader. The VM internally maintains a list of loaded native libraries for each class loader. Vendors should choose native library names that minimize the chance of name clashes.

A native library may be statically linked with the VM. The manner in which the library and VM image are combined is implementation dependent.

A System.loadLibrary or equivalent API must succeed for this library to be considered loaded.

A library L whose image has been combined with the VM is defined as statically linked if and only if the library exports a function called JNI_OnLoad_L.

If a statically linked library L exports a function called JNI_OnLoad_L and a function called JNI_OnLoad, the JNI_OnLoad function will be ignored.

If a library L is statically linked, then upon the first invocation of System.loadLibrary("L") or equivalent API, a JNI_OnLoad_L function will be invoked with the same arguments and expected return value as specified for the JNI_OnLoad function.

A library L that is statically linked will prohibit a library of the same name from being loaded dynamically.

When the class loader containing a statically linked native library L is garbage collected, the VM will invoke the JNI_OnUnload_L function of the library if such a function is exported.

If a statically linked library L exports a function called JNI_OnUnLoad_L and a function called JNI_OnUnLoad, the JNI_OnUnLoad function will be ignored.

The programmer can also call the JNI function RegisterNatives() to register the native methods associated with a class. The RegisterNatives() function is particularly useful with statically linked functions.

Resolving Native Method Names

Dynamic linkers resolve entries based on their names. A native method name is concatenated from the following components:

  • the prefix Java_
  • a mangled fully-qualified class name
  • an underscore (“_”) separator
  • a mangled method name
  • for overloaded native methods, two underscores (“__”) followed by the mangled argument signature

The VM checks for a method name match for methods that reside in the native library. The VM looks first for the short name; that is, the name without the argument signature. It then looks for the long name, which is the name with the argument signature. Programmers need to use the long name only when a native method is overloaded with another native method. However, this is not a problem if the native method has the same name as a nonnative method. A nonnative method (a Java method) does not reside in the native library.

In the following example, the native method g does not have to be linked using the long name because the other method g is not a native method, and thus is not in the native library.

class Cls1 {
    int g(int i);
    native int g(double d);
}

We adopted a simple name-mangling scheme to ensure that all Unicode characters translate into valid C function names. We use the underscore (“_”) character as the substitute for the slash (“/”) in fully qualified class names. Since a name or type descriptor never begins with a number, we can use _0, ..., _9 for escape sequences, as the following table illustrates:

Unicode Character Translation
Escape Sequence | Denotes
_0XXXX | a Unicode character XXXX. Note that lower case is used to represent non-ASCII Unicode characters, for example, _0abcd as opposed to _0ABCD.
_1 | the character “_”
_2 | the character “;” in signatures
_3 | the character “[“ in signatures

Both the native methods and the interface APIs follow the standard library-calling convention on a given platform. For example, UNIX systems use the C calling convention, while Win32 systems use __stdcall.

Native Method Arguments

The JNI interface pointer is the first argument to native methods. The JNI interface pointer is of type JNIEnv. The second argument differs depending on whether the native method is static or nonstatic. The second argument to a nonstatic native method is a reference to the object. The second argument to a static native method is a reference to its Java class.

The remaining arguments correspond to regular Java method arguments. The native method call passes its result back to the calling routine via the return value. Chapter 3: JNI Types and Data Structures describes the mapping between Java and C types.

The following code example illustrates using a C function to implement the native method f. The native method f is declared as follows:

package pkg;

class Cls {
    native double f(int i, String s);
    // ...
}

The C function with the long mangled name Java_pkg_Cls_f_ILjava_lang_String_2 implements native method f:

jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (
     JNIEnv *env,        /* interface pointer */
     jobject obj,        /* "this" pointer */
     jint i,             /* argument #1 */
     jstring s)          /* argument #2 */
{
     /* Obtain a C-copy of the Java string */
     const char *str = (*env)->GetStringUTFChars(env, s, 0);

     /* process the string */
     ...

     /* Now we are done with str */
     (*env)->ReleaseStringUTFChars(env, s, str);

     return ...
}

Note that we always manipulate Java objects using the interface pointer env. Using C++, you can write a slightly cleaner version of the code, as shown in the following code example:

extern "C" /* specify the C calling convention */

jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (

     JNIEnv *env,        /* interface pointer */
     jobject obj,        /* "this" pointer */
     jint i,             /* argument #1 */
     jstring s)          /* argument #2 */

{
     const char *str = env->GetStringUTFChars(s, 0);

     // ...

     env->ReleaseStringUTFChars(s, str);

     // return ...
}

With C++, the extra level of indirection and the interface pointer argument disappear from the source code. However, the underlying mechanism is exactly the same as with C. In C++, JNI functions are defined as inline member functions that expand to their C counterparts.

Referencing Java Objects

Primitive types, such as integers, characters, and so on, are copied between Java and native code. Arbitrary Java objects, on the other hand, are passed by reference. The VM must keep track of all objects that have been passed to the native code, so that these objects are not freed by the garbage collector. The native code, in turn, must have a way to inform the VM that it no longer needs the objects. In addition, the garbage collector must be able to move an object referred to by the native code.

Global and Local References

The JNI divides object references used by the native code into two categories: local and global references. Local references are valid for the duration of a native method call, and are automatically freed after the native method returns. Global references remain valid until they are explicitly freed.

Objects are passed to native methods as local references. All Java objects returned by JNI functions are local references. The JNI allows the programmer to create global references from local references. JNI functions that expect Java objects accept both global and local references. A native method may return a local or global reference to the VM as its result.

In most cases, the programmer should rely on the VM to free all local references after the native method returns. However, there are times when the programmer should explicitly free a local reference. Consider, for example, the following situations:

  • A native method accesses a large Java object, thereby creating a local reference to the Java object. The native method then performs additional computation before returning to the caller. The local reference to the large Java object will prevent the object from being garbage collected, even if the object is no longer used in the remainder of the computation.
  • A native method creates a large number of local references, although not all of them are used at the same time. Since the VM needs a certain amount of space to keep track of a local reference, creating too many local references may cause the system to run out of memory. For example, a native method loops through a large array of objects, retrieves the elements as local references, and operates on one element at each iteration. After each iteration, the programmer no longer needs the local reference to the array element.

The JNI allows the programmer to manually delete local references at any point within a native method. To ensure that programmers can manually free local references, JNI functions are not allowed to create extra local references, except for references they return as the result.

Local references are only valid in the thread in which they are created. The native code must not pass local references from one thread to another.

Implementing Local References

To implement local references, the Java VM creates a registry for each transition of control from Java to a native method. A registry maps nonmovable local references to Java objects, and keeps the objects from being garbage collected. All Java objects passed to the native method (including those that are returned as the results of JNI function calls) are automatically added to the registry. The registry is deleted after the native method returns, allowing all of its entries to be garbage collected.

There are different ways to implement a registry, such as using a table, a linked list, or a hash table. Although reference counting may be used to avoid duplicated entries in the registry, a JNI implementation is not obliged to detect and collapse duplicate entries.

Note that local references cannot be faithfully implemented by conservatively scanning the native stack. The native code may store local references into global or heap data structures.

Accessing Java Objects

The JNI provides a rich set of accessor functions on global and local references. This means that the same native method implementation works no matter how the VM represents Java objects internally. This is a crucial reason why the JNI can be supported by a wide variety of VM implementations.

The overhead of using accessor functions through opaque references is higher than that of direct access to C data structures. We believe that, in most cases, Java programmers use native methods to perform nontrivial tasks that overshadow the overhead of this interface.

Accessing Primitive Arrays

This overhead is not acceptable for large Java objects containing many primitive data types, such as integer arrays and strings. (Consider native methods that are used to perform vector and matrix calculations.) It would be grossly inefficient to iterate through a Java array and retrieve every element with a function call.

One solution introduces a notion of “pinning” so that the native method can ask the VM to pin down the contents of an array. The native method then receives a direct pointer to the elements. This approach, however, has two implications:

  • The garbage collector must support pinning.
  • The VM must lay out primitive arrays contiguously in memory. Although this is the most natural implementation for most primitive arrays, boolean arrays can be implemented as packed or unpacked. Therefore, native code that relies on the exact layout of boolean arrays will not be portable.

We adopt a compromise that overcomes both of the above problems.

First, we provide a set of functions to copy primitive array elements between a segment of a Java array and a native memory buffer. Use these functions if a native method needs access to only a small number of elements in a large array.

Second, programmers can use another set of functions to retrieve a pinned-down version of array elements. Keep in mind that these functions may require the Java VM to perform storage allocation and copying. Whether these functions in fact copy the array depends on the VM implementation, as follows:

  • If the garbage collector supports pinning, and the layout of the array is the same as expected by the native method, then no copying is needed.
  • Otherwise, the array is copied to a nonmovable memory block (for example, in the C heap) and the necessary format conversion is performed. A pointer to the copy is returned.

Lastly, the interface provides functions to inform the VM that the native code no longer needs to access the array elements. When you call these functions, the system either unpins the array, or it reconciles the original array with its non-movable copy and frees the copy.

Our approach provides flexibility. A garbage collector algorithm can make separate decisions about copying or pinning for each given array. For example, the garbage collector may copy small objects, but pin the larger objects.

A JNI implementation must ensure that native methods running in multiple threads can simultaneously access the same array. For example, the JNI may keep an internal counter for each pinned array so that one thread does not unpin an array that is also pinned by another thread. Note that the JNI does not need to lock primitive arrays for exclusive access by a native method. Simultaneously updating a Java array from different threads leads to nondeterministic results.

Accessing Fields and Methods

The JNI allows native code to access the fields and to call the methods of Java objects. The JNI identifies methods and fields by their symbolic names and type signatures. A two-step process factors out the cost of locating the field or method from its name and signature. For example, to call the method f in class cls, the native code first obtains a method ID, as follows:

jmethodID mid = env->GetMethodID(cls, “f”, “(ILjava/lang/String;)D”);

The native code can then use the method ID repeatedly without the cost of method lookup, as follows:

jdouble result = env->CallDoubleMethod(obj, mid, 10, str);

A field or method ID does not prevent the VM from unloading the class from which the ID has been derived. After the class is unloaded, the method or field ID becomes invalid. The native code, therefore, must make sure to:

  • keep a live reference to the underlying class, or
  • recompute the method or field ID

if it intends to use a method or field ID for an extended period of time.

The JNI does not impose any restrictions on how field and method IDs are implemented internally.

Reporting Programming Errors

The JNI does not check for programming errors such as passing in NULL pointers or illegal argument types. Illegal argument types includes such things as using a normal Java object instead of a Java class object. The JNI does not check for these programming errors for the following reasons:

  • Forcing JNI functions to check for all possible error conditions degrades the performance of normal (correct) native methods.
  • In many cases, there is not enough runtime type information to perform such checking.

Most C library functions do not guard against programming errors. The printf() function, for example, usually causes a runtime error, rather than returning an error code, when it receives an invalid address. Forcing C library functions to check for all possible error conditions would likely result in such checks to be duplicated--once in the user code, and then again in the library.

The programmer must not pass illegal pointers or arguments of the wrong type to JNI functions. Doing so could result in arbitrary consequences, including a corrupted system state or VM crash.

Java Exceptions

The JNI allows native methods to raise arbitrary Java exceptions. The native code may also handle outstanding Java exceptions. The Java exceptions left unhandled are propagated back to the VM.

Exceptions and Error Codes

Certain JNI functions use the Java exception mechanism to report error conditions. In most cases, JNI functions report error conditions by returning an error code and throwing a Java exception. The error code is usually a special return value (such as NULL) that is outside of the range of normal return values. Therefore, the programmer can:

  • quickly check the return value of the last JNI call to determine if an error has occurred, and
  • call a function, ExceptionOccurred(), to obtain the exception object that contains a more detailed description of the error condition.

There are two cases where the programmer needs to check for exceptions without being able to first check an error code:

  • The JNI functions that invoke a Java method return the result of the Java method. The programmer must call ExceptionOccurred() to check for possible exceptions that occurred during the execution of the Java method.
  • Some of the JNI array access functions do not return an error code, but may throw an ArrayIndexOutOfBoundsException or ArrayStoreException.

In all other cases, a non-error return value guarantees that no exceptions have been thrown.

Asynchronous Exceptions

In cases of multiple threads, threads other than the current thread may post an asynchronous exception. An asynchronous exception does not immediately affect the execution of the native code in the current thread, until:

  • the native code calls one of the JNI functions that could raise synchronous exceptions, or
  • the native code uses ExceptionOccurred() to explicitly check for synchronous and asynchronous exceptions.

Note that only those JNI function that could potentially raise synchronous exceptions check for asynchronous exceptions.

Native methods should insert ExceptionOccurred()checks in necessary places (such as in a tight loop without other exception checks) to ensure that the current thread responds to asynchronous exceptions in a reasonable amount of time.

Exception Handling

There are two ways to handle an exception in native code:

  • The native method can choose to return immediately, causing the exception to be thrown in the Java code that initiated the native method call.
  • The native code can clear the exception by calling ExceptionClear(), and then execute its own exception-handling code.

After an exception has been raised, the native code must first clear the exception before making other JNI calls. When there is a pending exception, the JNI functions that are safe to call are:

ExceptionOccurred()
ExceptionDescribe()
ExceptionClear()
ExceptionCheck()
ReleaseStringChars()
ReleaseStringUTFChars()
ReleaseStringCritical()
Release<Type>ArrayElements()
ReleasePrimitiveArrayCritical()
DeleteLocalRef()
DeleteGlobalRef()
DeleteWeakGlobalRef()
MonitorExit()
PushLocalFrame()
PopLocalFrame()
Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction

Documentation Contents
Contents | Next

Chapter 1: Introduction

This chapter introduces the Java Native Interface (JNI). The JNI is a native programming interface. It allows Java code that runs inside a Java Virtual Machine (VM) to interoperate with applications and libraries written in other programming languages, such as C, C++, and assembly.

The most important benefit of the JNI is that it imposes no restrictions on the implementation of the underlying Java VM. Therefore, Java VM vendors can add support for the JNI without affecting other parts of the VM. Programmers can write one version of a native application or library and expect it to work with all Java VMs supporting the JNI.

This chapter covers the following topics:

  • Java Native Interface Overview
  • Historical Background
    • JDK 1.0 Native Method Interface
    • Java Runtime Interface
    • Raw Native Interface and Java/COM Interface
  • Objectives
  • Java Native Interface Approach
  • Programming to the JNI
  • Changes

Java Native Interface Overview

While you can write applications entirely in Java, there are situations where Java alone does not meet the needs of your application. Programmers use the JNI to write Java native methods to handle those situations when an application cannot be written entirely in Java.

The following examples illustrate when you need to use Java native methods:

  • The standard Java class library does not support the platform-dependent features needed by the application.
  • You already have a library written in another language, and wish to make it accessible to Java code through the JNI.
  • You want to implement a small portion of time-critical code in a lower-level language such as assembly.

By programming through the JNI, you can use native methods to:

  • Create, inspect, and update Java objects (including arrays and strings).
  • Call Java methods.
  • Catch and throw exceptions.
  • Load classes and obtain class information.
  • Perform runtime type checking.

You can also use the JNI with the Invocation API to enable an arbitrary native application to embed the Java VM. This allows programmers to easily make their existing applications Java-enabled without having to link with the VM source code.

Historical Background

VMs from different vendors offer different native method interfaces. These different interfaces force programmers to produce, maintain, and distribute multiple versions of native method libraries on a given platform.

We briefly examine some of the native method interfaces, such as:

  • JDK 1.0 native method interface
  • Netscape's Java Runtime Interface
  • Microsoft's Raw Native Interface and Java/COM interface

JDK 1.0 Native Method Interface

JDK 1.0 was shipped with a native method interface. Unfortunately, there were two major reasons that this interface was unsuitable for adoption by other Java VMs.

First, the native code accessed fields in Java objects as members of C structures. However, the Java Language Specification does not define how objects are laid out in memory. If a Java VM lays out objects differently in memory, then the programmer would have to recompile the native method libraries.

Second, JDK 1.0's native method interface relied on a conservative garbage collector. The unrestricted use of the unhand macro, for example, made it necessary to conservatively scan the native stack.

Java Runtime Interface

Netscape had proposed the Java Runtime Interface (JRI), a general interface for services provided in the Java virtual machine. JRI was designed with portability in mind---it makes few assumptions about the implementation details in the underlying Java VM. The JRI addressed a wide range of issues, including native methods, debugging, reflection, embedding (invocation), and so on.

Raw Native Interface and Java/COM Interface

The Microsoft Java VM supports two native method interfaces. At the low level, it provides an efficient Raw Native Interface (RNI). The RNI offers a high degree of source-level backward compatibility with the JDK’s native method interface, although it has one major difference. Instead of relying on conservative garbage collection, the native code must use RNI functions to interact explicitly with the garbage collector.

At a higher level, Microsoft's Java/COM interface offers a language-independent standard binary interface to the Java VM. Java code can use a COM object as if it were a Java object. A Java class can also be exposed to the rest of the system as a COM class.

Objectives

We believe that a uniform, well-thought-out standard interface offers the following benefits for everyone:

  • Each VM vendor can support a larger body of native code.
  • Tool builders will not have to maintain different kinds of native method interfaces.
  • Application programmers will be able to write one version of their native code and this version will run on different VMs.

The best way to achieve a standard native method interface is to involve all parties with an interest in Java VMs. Therefore we organized a series of discussions among the Java licensees on the design of a uniform native method interface. It is clear from the discussions that the standard native method interface must satisfy the following requirements:

  • Binary compatibility - The primary goal is binary compatibility of native method libraries across all Java VM implementations on a given platform. Programmers should maintain only one version of their native method libraries for a given platform.
  • Efficiency - To support time-critical code, the native method interface must impose little overhead. All known techniques to ensure VM-independence (and thus binary compatibility) carry a certain amount of overhead. We must somehow strike a compromise between efficiency and VM-independence.
  • Functionality - The interface must expose enough Java VM internals to allow native methods to accomplish useful tasks.

Java Native Interface Approach

We hoped to adopt one of the existing approaches as the standard interface, because this would have imposed the least burden on programmers who had to learn multiple interfaces in different VMs. Unfortunately, no existing solutions are completely satisfactory in achieving our goals.

Netscape’s JRI is the closest to what we envision as a portable native method interface, and was used as the starting point of our design. Readers familiar with the JRI will notice the similarities in the API naming convention, the use of method and field IDs, the use of local and global references, and so on. Despite our best efforts, however, the JNI is not binary-compatible with the JRI, although a VM can support both the JRI and the JNI.

Microsoft’s RNI was an improvement over JDK 1.0 because it solved the problem of native methods working with a nonconservative garbage collector. The RNI, however, was not suitable as a VM-independent native method interface. Like the JDK, RNI native methods access Java objects as C structures, leading to two problems:

  • RNI exposed the layout of internal Java objects to native code.
  • Direct access of Java objects as C structures makes it impossible to efficiently incorporate “write barriers,” which are necessary in advanced garbage collection algorithms.

As a binary standard, COM ensures complete binary compatibility across different VMs. Invoking a COM method requires only an indirect call, which carries little overhead. In addition, COM objects are a great improvement over dynamic-link libraries in solving versioning problems.

The use of COM as the standard Java native method interface, however, is hampered by a few factors:

  • First, the Java/COM interface lacks certain desired functions, such as accessing private fields and raising general exceptions.
  • Second, the Java/COM interface automatically provides the standard IUnknown and IDispatch COM interfaces for Java objects, so that native code can access public methods and fields. Unfortunately, the IDispatch interface does not deal with overloaded Java methods and is case-insensitive in matching method names. Furthermore, all Java methods exposed through the IDispatch interface are wrapped to perform dynamic type checking and coercion. This is because the IDispatch interface is designed with weakly-typed languages (such as Basic) in mind.
  • Third, instead of dealing with individual low-level functions, COM is designed to allow software components (including full-fledged applications) to work together. We believe that it is not appropriate to treat all Java classes or low-level native methods as software components.
  • Fourth, the immediate adoption of COM is hampered by the lack of its support on UNIX platforms.

Although Java objects are not exposed to the native code as COM objects, the JNI interface itself is binary-compatible with COM. JNI uses the same jump table structure and calling convention that COM does. This means that, as soon as cross-platform support for COM is available, the JNI can become a COM interface to the Java VM.

JNI is not believed to be the only native method interface supported by a given Java VM. A standard interface benefits programmers, who would like to load their native code libraries into different Java VMs. In some cases, the programmer may have to use a lower-level, VM-specific interface to achieve top efficiency. In other cases, the programmer might use a higher-level interface to build software components. Indeed, as the Java environment and component software technologies become more mature, native methods will gradually lose their significance.

Programming to the JNI

Native method programmers should program to the JNI. Programming to the JNI insulates you from unknowns, such as the vendor’s VM that the end user might be running. By conforming to the JNI standard, you will give a native library the best chance to run in a given Java VM.

If you are implementing a Java VM, you should implement the JNI. JNI has been time tested and ensured to not impose any overhead or restrictions on your VM implementation, including object representation, garbage collection scheme, and so on. Please send us your feedback if you run into any problems we may have overlooked.

Changes

As of Java SE 6.0, the deprecated structures JDK1_1InitArgs and JDK1_1AttachArgs have been removed, instead JavaVMInitArgs and JavaVMAttachArgs are to be used.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Native Interface Specification Contents

Contents | Previous | Next
  • 1. Introduction
    • Java Native Interface Overview
    • Historical Background
      • JDK 1.0 Native Method Interface
      • Java Runtime Interface
      • Raw Native Interface and Java/COM Interface
    • Objectives
    • Java Native Interface Approach
    • Programming to the JNI
    • Changes
  • 2. Design Overview
    • JNI Interface Functions and Pointers
    • Compiling, Loading and Linking Native Methods
      • Resolving Native Method Names
      • Native Method Arguments
    • Referencing Java Objects
      • Global and Local References
      • Implementing Local References
    • Accessing Java Objects
      • Accessing Primitive Arrays
      • Accessing Fields and Methods
    • Java Exceptions
      • Exceptions and Error Codes
      • Asynchronous Exceptions
      • Exception Handling
    • JNI Interface Functions and Pointers
  • 3. JNI Types and Data Structures
    • Primitive Types
    • Reference Types
    • Field and Method IDs
    • The Value Type
    • Type Signatures
    • Modified UTF-8 Strings
  • 4. JNI Functions
    • Interface Function Table
    • Version Information
      • GetVersion
      • Constants
    • Class Operations
      • DefineClass
      • FindClass
      • GetSuperclass
      • IsAssignableFrom
    • Exceptions
      • Throw
      • ThrowNew
      • ExceptionOccurred
      • ExceptionDescribe
      • ExceptionClear
      • FatalError
      • ExceptionCheck
    • Global and Local References
      • Global References
      • NewGlobalRef
      • DeleteGlobalRef
      • Local References
      • DeleteLocalRef
      • EnsureLocalCapacity
      • PushLocalFrame
      • PopLocalFrame
      • NewLocalRef
    • Weak Global References
      • NewWeakGlobalRef
      • DeleteWeakGlobalRef
    • Object Operations
      • AllocObject
      • NewObject, NewObjectA, NewObjectV
      • GetObjectClass
      • GetObjectRefType
      • IsInstanceOf
      • IsSameObject
    • Accessing Fields of Objects
      • GetFieldID
      • Get<type>Field Routines
      • Set<type>Field Routines
    • Calling Instance Methods
      • GetMethodID
      • Call<type>Method Routines, Call<type>MethodA Routines, Call<type>MethodV Routines
      • CallNonvirtual<type>Method Routines, CallNonvirtual<type>MethodA Routines, CallNonvirtual<type>MethodV Routines
    • Accessing Static Fields
      • GetStaticFieldID
      • GetStatic<type>Field Routines
      • SetStatic<type>Field Routines
    • Calling Static Methods
      • GetStaticMethodID
      • CallStatic<type>Method Routines, CallStatic<type>MethodA Routines, CallStatic<type>MethodV Routines
    • String Operations
      • NewString
      • GetStringLength
      • GetStringChars
      • ReleaseStringChars
      • NewStringUTF
      • GetStringUTFLength
      • GetStringUTFChars
      • ReleaseStringUTFChars
      • GetStringRegion
      • GetStringUTFRegion
      • GetStringCritical, ReleaseStringCritical
    • Array Operations
      • GetArrayLength
      • NewObjectArray
      • GetObjectArrayElement
      • SetObjectArrayElement
      • New<PrimitiveType>Array Routines
      • Get<PrimitiveType>ArrayElements Routines
      • Release<PrimitiveType>ArrayElements Routines
      • Get<PrimitiveType>ArrayRegion Routines
      • Set<PrimitiveType>ArrayRegion Routines
      • GetPrimitiveArrayCritical, ReleasePrimitiveArrayCritical
    • Registering Native Methods
      • RegisterNatives
      • UnregisterNatives
    • Monitor Operations
      • MonitorEnter
      • MonitorExit
    • NIO Support
      • NewDirectByteBuffer
      • GetDirectBufferAddress
      • GetDirectBufferCapacity
    • Reflection Support
      • FromReflectedMethod
      • FromReflectedField
      • ToReflectedMethod
      • ToReflectedField
    • Java VM Interface
      • GetJavaVM
  • 5. The Invocation API
    • Overview
      • Creating the VM
      • Attaching to the VM
      • Detaching from the VM
      • Unloading the VM
    • Library and Version Management
      • JNI_OnLoad
      • JNI_OnUnload
    • Invocation API Functions
      • JNI_GetDefaultJavaVMInitArgs
      • JNI_GetCreatedJavaVMs
      • JNI_CreateJavaVM
      • DestroyJavaVM
      • AttachCurrentThread
      • AttachCurrentThreadAsDaemon
      • DetachCurrentThread
      • GetEnv
Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNI Functions

Documentation Contents
Contents | Previous | Next

Chapter 4: JNI Functions

This chapter serves as the reference section for the JNI functions. It provides a complete listing of all the JNI functions. It also presents the exact layout of the JNI function table.

Note the use of the term “must” to describe restrictions on JNI programmers. For example, when you see that a certain JNI function must receive a non-NULL object, it is your responsibility to ensure that NULL is not passed to that JNI function. As a result, a JNI implementation does not need to perform NULL pointer checks in that JNI function.

A portion of this chapter is adapted from Netscape’s JRI documentation.

The reference material groups functions by their usage. The reference section is organized by the following functional areas:

  • Interface Function Table
  • Version Information
    • GetVersion
    • Constants
  • Class Operations
    • DefineClass
    • FindClass
    • GetSuperclass
    • IsAssignableFrom
  • Exceptions
    • Throw
    • ThrowNew
    • ExceptionOccurred
    • ExceptionDescribe
    • ExceptionClear
    • FatalError
    • ExceptionCheck
  • Global and Local References
    • Global References
    • NewGlobalRef
    • DeleteGlobalRef
    • Local References
    • DeleteLocalRef
    • EnsureLocalCapacity
    • PushLocalFrame
    • PopLocalFrame
    • NewLocalRef
  • Weak Global References
    • NewWeakGlobalRef
    • DeleteWeakGlobalRef
  • Object Operations
    • AllocObject
    • NewObject, NewObjectA, NewObjectV
    • GetObjectClass
    • GetObjectRefType
    • IsInstanceOf
    • IsSameObject
  • Accessing Fields of Objects
    • GetFieldID
    • Get<type>Field Routines
    • Set<type>Field Routines
  • Calling Instance Methods
    • GetMethodID
    • Call<type>Method Routines, Call<type>MethodA Routines, Call<type>MethodV Routines
    • CallNonvirtual<type>Method Routines, CallNonvirtual<type>MethodA Routines, CallNonvirtual<type>MethodV Routines
  • Accessing Static Fields
    • GetStaticFieldID
    • GetStatic<type>Field Routines
    • SetStatic<type>Field Routines
  • Calling Static Methods
    • GetStaticMethodID
    • CallStatic<type>Method Routines, CallStatic<type>MethodA Routines, CallStatic<type>MethodV Routines
  • String Operations
    • NewString
    • GetStringLength
    • GetStringChars
    • ReleaseStringChars
    • NewStringUTF
    • GetStringUTFLength
    • GetStringUTFChars
    • ReleaseStringUTFChars
    • GetStringRegion
    • GetStringUTFRegion
    • GetStringCritical, ReleaseStringCritical
  • Array Operations
    • GetArrayLength
    • NewObjectArray
    • GetObjectArrayElement
    • SetObjectArrayElement
    • New<PrimitiveType>Array Routines
    • Get<PrimitiveType>ArrayElements Routines
    • Release<PrimitiveType>ArrayElements Routines
    • Get<PrimitiveType>ArrayRegion Routines
    • Set<PrimitiveType>ArrayRegion Routines
    • GetPrimitiveArrayCritical, ReleasePrimitiveArrayCritical
  • Registering Native Methods
    • RegisterNatives
    • UnregisterNatives
  • Monitor Operations
    • MonitorEnter
    • MonitorExit
  • NIO Support
    • NewDirectByteBuffer
    • GetDirectBufferAddress
    • GetDirectBufferCapacity
  • Reflection Support
    • FromReflectedMethod
    • FromReflectedField
    • ToReflectedMethod
    • ToReflectedField
  • Java VM Interface
    • GetJavaVM

Interface Function Table

Each function is accessible at a fixed offset through the JNIEnv argument. The JNIEnv type is a pointer to a structure storing all JNI function pointers. It is defined as follows:

typedef const struct JNINativeInterface *JNIEnv;

The VM initializes the function table, as shown by the following code example. Note that the first three entries are reserved for future compatibility with COM. In addition, we reserve a number of additional NULL entries near the beginning of the function table, so that, for example, a future class-related JNI operation can be added after FindClass, rather than at the end of the table.

Note that the function table can be shared among all JNI interface pointers.

const struct JNINativeInterface ... = {

    NULL,
    NULL,
    NULL,
    NULL,
    GetVersion,

    DefineClass,
    FindClass,

    FromReflectedMethod,
    FromReflectedField,
    ToReflectedMethod,

    GetSuperclass,
    IsAssignableFrom,

    ToReflectedField,

    Throw,
    ThrowNew,
    ExceptionOccurred,
    ExceptionDescribe,
    ExceptionClear,
    FatalError,

    PushLocalFrame,
    PopLocalFrame,

    NewGlobalRef,
    DeleteGlobalRef,
    DeleteLocalRef,
    IsSameObject,
    NewLocalRef,
    EnsureLocalCapacity,

    AllocObject,
    NewObject,
    NewObjectV,
    NewObjectA,

    GetObjectClass,
    IsInstanceOf,

    GetMethodID,

    CallObjectMethod,
    CallObjectMethodV,
    CallObjectMethodA,
    CallBooleanMethod,
    CallBooleanMethodV,
    CallBooleanMethodA,
    CallByteMethod,
    CallByteMethodV,
    CallByteMethodA,
    CallCharMethod,
    CallCharMethodV,
    CallCharMethodA,
    CallShortMethod,
    CallShortMethodV,
    CallShortMethodA,
    CallIntMethod,
    CallIntMethodV,
    CallIntMethodA,
    CallLongMethod,
    CallLongMethodV,
    CallLongMethodA,
    CallFloatMethod,
    CallFloatMethodV,
    CallFloatMethodA,
    CallDoubleMethod,
    CallDoubleMethodV,
    CallDoubleMethodA,
    CallVoidMethod,
    CallVoidMethodV,
    CallVoidMethodA,

    CallNonvirtualObjectMethod,
    CallNonvirtualObjectMethodV,
    CallNonvirtualObjectMethodA,
    CallNonvirtualBooleanMethod,
    CallNonvirtualBooleanMethodV,
    CallNonvirtualBooleanMethodA,
    CallNonvirtualByteMethod,
    CallNonvirtualByteMethodV,
    CallNonvirtualByteMethodA,
    CallNonvirtualCharMethod,
    CallNonvirtualCharMethodV,
    CallNonvirtualCharMethodA,
    CallNonvirtualShortMethod,
    CallNonvirtualShortMethodV,
    CallNonvirtualShortMethodA,
    CallNonvirtualIntMethod,
    CallNonvirtualIntMethodV,
    CallNonvirtualIntMethodA,
    CallNonvirtualLongMethod,
    CallNonvirtualLongMethodV,
    CallNonvirtualLongMethodA,
    CallNonvirtualFloatMethod,
    CallNonvirtualFloatMethodV,
    CallNonvirtualFloatMethodA,
    CallNonvirtualDoubleMethod,
    CallNonvirtualDoubleMethodV,
    CallNonvirtualDoubleMethodA,
    CallNonvirtualVoidMethod,
    CallNonvirtualVoidMethodV,
    CallNonvirtualVoidMethodA,

    GetFieldID,

    GetObjectField,
    GetBooleanField,
    GetByteField,
    GetCharField,
    GetShortField,
    GetIntField,
    GetLongField,
    GetFloatField,
    GetDoubleField,
    SetObjectField,
    SetBooleanField,
    SetByteField,
    SetCharField,
    SetShortField,
    SetIntField,
    SetLongField,
    SetFloatField,
    SetDoubleField,

    GetStaticMethodID,

    CallStaticObjectMethod,
    CallStaticObjectMethodV,
    CallStaticObjectMethodA,
    CallStaticBooleanMethod,
    CallStaticBooleanMethodV,
    CallStaticBooleanMethodA,
    CallStaticByteMethod,
    CallStaticByteMethodV,
    CallStaticByteMethodA,
    CallStaticCharMethod,
    CallStaticCharMethodV,
    CallStaticCharMethodA,
    CallStaticShortMethod,
    CallStaticShortMethodV,
    CallStaticShortMethodA,
    CallStaticIntMethod,
    CallStaticIntMethodV,
    CallStaticIntMethodA,
    CallStaticLongMethod,
    CallStaticLongMethodV,
    CallStaticLongMethodA,
    CallStaticFloatMethod,
    CallStaticFloatMethodV,
    CallStaticFloatMethodA,
    CallStaticDoubleMethod,
    CallStaticDoubleMethodV,
    CallStaticDoubleMethodA,
    CallStaticVoidMethod,
    CallStaticVoidMethodV,
    CallStaticVoidMethodA,

    GetStaticFieldID,

    GetStaticObjectField,
    GetStaticBooleanField,
    GetStaticByteField,
    GetStaticCharField,
    GetStaticShortField,
    GetStaticIntField,
    GetStaticLongField,
    GetStaticFloatField,
    GetStaticDoubleField,

    SetStaticObjectField,
    SetStaticBooleanField,
    SetStaticByteField,
    SetStaticCharField,
    SetStaticShortField,
    SetStaticIntField,
    SetStaticLongField,
    SetStaticFloatField,
    SetStaticDoubleField,

    NewString,

    GetStringLength,
    GetStringChars,
    ReleaseStringChars,

    NewStringUTF,
    GetStringUTFLength,
    GetStringUTFChars,
    ReleaseStringUTFChars,

    GetArrayLength,

    NewObjectArray,
    GetObjectArrayElement,
    SetObjectArrayElement,

    NewBooleanArray,
    NewByteArray,
    NewCharArray,
    NewShortArray,
    NewIntArray,
    NewLongArray,
    NewFloatArray,
    NewDoubleArray,

    GetBooleanArrayElements,
    GetByteArrayElements,
    GetCharArrayElements,
    GetShortArrayElements,
    GetIntArrayElements,
    GetLongArrayElements,
    GetFloatArrayElements,
    GetDoubleArrayElements,

    ReleaseBooleanArrayElements,
    ReleaseByteArrayElements,
    ReleaseCharArrayElements,
    ReleaseShortArrayElements,
    ReleaseIntArrayElements,
    ReleaseLongArrayElements,
    ReleaseFloatArrayElements,
    ReleaseDoubleArrayElements,

    GetBooleanArrayRegion,
    GetByteArrayRegion,
    GetCharArrayRegion,
    GetShortArrayRegion,
    GetIntArrayRegion,
    GetLongArrayRegion,
    GetFloatArrayRegion,
    GetDoubleArrayRegion,
    SetBooleanArrayRegion,
    SetByteArrayRegion,
    SetCharArrayRegion,
    SetShortArrayRegion,
    SetIntArrayRegion,
    SetLongArrayRegion,
    SetFloatArrayRegion,
    SetDoubleArrayRegion,

    RegisterNatives,
    UnregisterNatives,

    MonitorEnter,
    MonitorExit,

    GetJavaVM,

    GetStringRegion,
    GetStringUTFRegion,

    GetPrimitiveArrayCritical,
    ReleasePrimitiveArrayCritical,

    GetStringCritical,
    ReleaseStringCritical,

    NewWeakGlobalRef,
    DeleteWeakGlobalRef,

    ExceptionCheck,

    NewDirectByteBuffer,
    GetDirectBufferAddress,
    GetDirectBufferCapacity,

    GetObjectRefType
  };

Version Information

GetVersion

jint GetVersion(JNIEnv *env);

Returns the version of the native method interface.

LINKAGE:

Index 4 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

RETURNS:

Returns the major version number in the higher 16 bits and the minor version number in the lower 16 bits.

In JDK/JRE 1.1, GetVersion() returns 0x00010001.

In JDK/JRE 1.2, GetVersion() returns 0x00010002.

In JDK/JRE 1.4, GetVersion() returns 0x00010004.

In JDK/JRE 1.6, GetVersion() returns 0x00010006.

Constants

SINCE JDK/JRE 1.2:

#define JNI_VERSION_1_1 0x00010001
#define JNI_VERSION_1_2 0x00010002

/* Error codes */
#define JNI_EDETACHED    (-2)              /* thread detached from the VM */
#define JNI_EVERSION     (-3)              /* JNI version error

SINCE JDK/JRE 1.4:

    #define JNI_VERSION_1_4 0x00010004

SINCE JDK/JRE 1.6:

    #define JNI_VERSION_1_6 0x00010006

Class Operations

DefineClass

jclass DefineClass(JNIEnv *env, const char *name, jobject loader,
const jbyte *buf, jsize bufLen);

Loads a class from a buffer of raw class data. The buffer containing the raw class data is not referenced by the VM after the DefineClass call returns, and it may be discarded if desired.

LINKAGE:

Index 5 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

name: the name of the class or interface to be defined. The string is encoded in modified UTF-8.

loader: a class loader assigned to the defined class.

buf: buffer containing the .class file data.

bufLen: buffer length.

RETURNS:

Returns a Java class object or NULL if an error occurs.

THROWS:

ClassFormatError: if the class data does not specify a valid class.

ClassCircularityError: if a class or interface would be its own superclass or superinterface.

OutOfMemoryError: if the system runs out of memory.

SecurityException: if the caller attempts to define a class in the "java" package tree.

FindClass

jclass FindClass(JNIEnv *env, const char *name);

In JDK release 1.1, this function loads a locally-defined class. It searches the directories and zip files specified by the CLASSPATH environment variable for the class with the specified name.

Since Java 2 SDK release 1.2, the Java security model allows non-system classes to load and call native methods. FindClass locates the class loader associated with the current native method; that is, the class loader of the class that declared the native method. If the native method belongs to a system class, no class loader will be involved. Otherwise, the proper class loader will be invoked to load and link the named class.

Since Java 2 SDK release 1.2, when FindClass is called through the Invocation Interface, there is no current native method or its associated class loader. In that case, the result of ClassLoader.getSystemClassLoader is used. This is the class loader the virtual machine creates for applications, and is able to locate classes listed in the java.class.path property.

The name argument is a fully-qualified class name or an array type signature . For example, the fully-qualified class name for the java.lang.String class is:

                   "java/lang/String"

The array type signature of the array class java.lang.Object[] is:

                   "[Ljava/lang/Object;"

LINKAGE:

Index 6 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

name: a fully-qualified class name (that is, a package name, delimited by “/”, followed by the class name). If the name begins with “[“ (the array signature character), it returns an array class. The string is encoded in modified UTF-8.

RETURNS:

Returns a class object from a fully-qualified name, or NULL if the class cannot be found.

THROWS:

ClassFormatError: if the class data does not specify a valid class.

ClassCircularityError: if a class or interface would be its own superclass or superinterface.

NoClassDefFoundError: if no definition for a requested class or interface can be found.

OutOfMemoryError: if the system runs out of memory.

GetSuperclass

jclass GetSuperclass(JNIEnv *env, jclass clazz);

If clazz represents any class other than the class Object, then this function returns the object that represents the superclass of the class specified by clazz.

If clazz specifies the class Object, or clazz represents an interface, this function returns NULL.

LINKAGE:

Index 10 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns the superclass of the class represented by clazz, or NULL.

IsAssignableFrom

jboolean IsAssignableFrom(JNIEnv *env, jclass clazz1,
jclass clazz2);

Determines whether an object of clazz1 can be safely cast to clazz2.

LINKAGE:

Index 11 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz1: the first class argument.

clazz2: the second class argument.

RETURNS:

Returns JNI_TRUE if either of the following is true:

  • The first and second class arguments refer to the same Java class.
  • The first class is a subclass of the second class.
  • The first class has the second class as one of its interfaces.

Exceptions

Throw

jint Throw(JNIEnv *env, jthrowable obj);

Causes a java.lang.Throwable object to be thrown.

LINKAGE:

Index 13 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a java.lang.Throwable object.

RETURNS:

Returns 0 on success; a negative value on failure.

THROWS:

the java.lang.Throwable object obj.

ThrowNew

jint ThrowNew(JNIEnv *env, jclass clazz,
const char *message);

Constructs an exception object from the specified class with the message specified by message and causes that exception to be thrown.

LINKAGE:

Index 14 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a subclass of java.lang.Throwable.

message: the message used to construct the java.lang.Throwable object. The string is encoded in modified UTF-8.

RETURNS:

Returns 0 on success; a negative value on failure.

THROWS:

the newly constructed java.lang.Throwable object.

ExceptionOccurred

jthrowable ExceptionOccurred(JNIEnv *env);

Determines if an exception is being thrown. The exception stays being thrown until either the native code calls ExceptionClear(), or the Java code handles the exception.

LINKAGE:

Index 15 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

RETURNS:

Returns the exception object that is currently in the process of being thrown, or NULL if no exception is currently being thrown.

ExceptionDescribe

void ExceptionDescribe(JNIEnv *env);

Prints an exception and a backtrace of the stack to a system error-reporting channel, such as stderr. This is a convenience routine provided for debugging.

LINKAGE:

Index 16 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

ExceptionClear

void ExceptionClear(JNIEnv *env);

Clears any exception that is currently being thrown. If no exception is currently being thrown, this routine has no effect.

LINKAGE:

Index 17 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

FatalError

void FatalError(JNIEnv *env, const char *msg);

Raises a fatal error and does not expect the VM to recover. This function does not return.

LINKAGE:

Index 18 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

msg: an error message. The string is encoded in modified UTF-8.

ExceptionCheck

We introduce a convenience function to check for pending exceptions without creating a local reference to the exception object.

jboolean ExceptionCheck(JNIEnv *env);

Returns JNI_TRUE when there is a pending exception; otherwise, returns JNI_FALSE.

LINKAGE:

Index 228 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Global and Local References

Global References

NewGlobalRef

jobject NewGlobalRef(JNIEnv *env, jobject obj);

Creates a new global reference to the object referred to by the obj argument. The obj argument may be a global or local reference. Global references must be explicitly disposed of by calling DeleteGlobalRef().

LINKAGE:

Index 21 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a global or local reference.

RETURNS:

Returns a global reference, or NULL if the system runs out of memory.

DeleteGlobalRef

void DeleteGlobalRef(JNIEnv *env, jobject globalRef);

Deletes the global reference pointed to by globalRef.

LINKAGE:

Index 22 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

globalRef: a global reference.

Local References

Local references are valid for the duration of a native method call. They are freed automatically after the native method returns. Each local reference costs some amount of Java Virtual Machine resource. Programmers need to make sure that native methods do not excessively allocate local references. Although local references are automatically freed after the native method returns to Java, excessive allocation of local references may cause the VM to run out of memory during the execution of a native method.

DeleteLocalRef

void DeleteLocalRef(JNIEnv *env, jobject localRef);

Deletes the local reference pointed to by localRef.

LINKAGE:

Index 23 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

localRef: a local reference.

Note: JDK/JRE 1.1 provides the DeleteLocalRef function above so that programmers can manually delete local references. For example, if native code iterates through a potentially large array of objects and uses one element in each iteration, it is a good practice to delete the local reference to the no-longer-used array element before a new local reference is created in the next iteration.

As of JDK/JRE 1.2 an additional set of functions are provided for local reference lifetime management. They are the four functions listed below.

EnsureLocalCapacity

jint EnsureLocalCapacity(JNIEnv *env, jint capacity);

Ensures that at least a given number of local references can be created in the current thread. Returns 0 on success; otherwise returns a negative number and throws an OutOfMemoryError.

Before it enters a native method, the VM automatically ensures that at least 16 local references can be created.

For backward compatibility, the VM allocates local references beyond the ensured capacity. (As a debugging support, the VM may give the user warnings that too many local references are being created. In the JDK, the programmer can supply the -verbose:jni command line option to turn on these messages.) The VM calls FatalError if no more local references can be created beyond the ensured capacity.

LINKAGE:

Index 26 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

PushLocalFrame

jint PushLocalFrame(JNIEnv *env, jint capacity);

Creates a new local reference frame, in which at least a given number of local references can be created. Returns 0 on success, a negative number and a pending OutOfMemoryError on failure.

Note that local references already created in previous local frames are still valid in the current local frame.

LINKAGE:

Index 19 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

PopLocalFrame

jobject PopLocalFrame(JNIEnv *env, jobject result);

Pops off the current local reference frame, frees all the local references, and returns a local reference in the previous local reference frame for the given result object.

Pass NULL as result if you do not need to return a reference to the previous frame.

LINKAGE:

Index 20 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

NewLocalRef

jobject NewLocalRef(JNIEnv *env, jobject ref);

Creates a new local reference that refers to the same object as ref. The given ref may be a global or local reference. Returns NULL if ref refers to null.

LINKAGE:

Index 25 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Weak Global References

Weak global references are a special kind of global reference. Unlike normal global references, a weak global reference allows the underlying Java object to be garbage collected. Weak global references may be used in any situation where global or local references are used. When the garbage collector runs, it frees the underlying object if the object is only referred to by weak references. A weak global reference pointing to a freed object is functionally equivalent to NULL. Programmers can detect whether a weak global reference points to a freed object by using IsSameObject to compare the weak reference against NULL.

Weak global references in JNI are a simplified version of the Java Weak References, available as part of the Java 2 Platform API ( java.lang.ref package and its classes).

Clarification (added June 2001)

Since garbage collection may occur while native methods are running, objects referred to by weak global references can be freed at any time. While weak global references can be used where global references are used, it is generally inappropriate to do so, as they may become functionally equivalent to NULL without notice.

While IsSameObject can be used to determine whether a weak global reference refers to a freed object, it does not prevent the object from being freed immediately thereafter. Consequently, programmers may not rely on this check to determine whether a weak global reference may used (as a non-NULL reference) in any future JNI function call.

To overcome this inherent limitation, it is recommended that a standard (strong) local or global reference to the same object be acquired using the JNI functions NewLocalRef or NewGlobalRef, and that this strong reference be used to access the intended object. These functions will return NULL if the object has been freed, and otherwise will return a strong reference (which will prevent the object from being freed). The new reference should be explicitly deleted when immediate access to the object is no longer required, allowing the object to be freed.

The weak global reference is weaker than other types of weak references (Java objects of the SoftReference or WeakReference classes). A weak global reference to a specific object will not become functionally equivalent to NULL until after SoftReference or WeakReference objects referring to that same specific object have had their references cleared.

The weak global reference is weaker than Java's internal references to objects requiring finalization. A weak global reference will not become functionally equivalent to NULL until after the completion of the finalizer for the referenced object, if present.

Interactions between weak global references and PhantomReferences are undefined. In particular, implementations of a Java VM may (or may not) process weak global references after PhantomReferences, and it may (or may not) be possible to use weak global references to hold on to objects which are also referred to by PhantomReference objects. This undefined use of weak global references should be avoided.

NewWeakGlobalRef

jweak NewWeakGlobalRef(JNIEnv *env, jobject obj);

Creates a new weak global reference. Returns NULL if obj refers to null, or if the VM runs out of memory. If the VM runs out of memory, an OutOfMemoryError will be thrown.

LINKAGE:

Index 226 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

DeleteWeakGlobalRef

void DeleteWeakGlobalRef(JNIEnv *env, jweak obj);

Delete the VM resources needed for the given weak global reference.

LINKAGE:

Index 227 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Object Operations

AllocObject

jobject AllocObject(JNIEnv *env, jclass clazz);

Allocates a new Java object without invoking any of the constructors for the object. Returns a reference to the object.

The clazz argument must not refer to an array class.

LINKAGE:

Index 27 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns a Java object, or NULL if the object cannot be constructed.

THROWS:

InstantiationException: if the class is an interface or an abstract class.

OutOfMemoryError: if the system runs out of memory.

NewObject, NewObjectA, NewObjectV

jobject NewObject(JNIEnv *env, jclass clazz,
jmethodID methodID, ...);

jobject NewObjectA(JNIEnv *env, jclass clazz,
jmethodID methodID, const jvalue *args);

jobject NewObjectV(JNIEnv *env, jclass clazz,
jmethodID methodID, va_list args);

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with <init> as the method name and void (V) as the return type.

The clazz argument must not refer to an array class.

NewObject

Programmers place all arguments that are to be passed to the constructor immediately following the methodID argument. NewObject() accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

LINKAGE:

Index 28 in the JNIEnv interface function table.

NewObjectA

Programmers place all arguments that are to be passed to the constructor in an args array of jvalues that immediately follows the methodID argument. NewObjectA() accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

LINKAGE:

Index 30 in the JNIEnv interface function table.

NewObjectV

Programmers place all arguments that are to be passed to the constructor in an args argument of type va_list that immediately follows the methodID argument. NewObjectV() accepts these arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

LINKAGE:

Index 29 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methodID: the method ID of the constructor.

Additional Parameter for NewObject:

arguments to the constructor.

Additional Parameter for NewObjectA:

args: an array of arguments to the constructor.

Additional Parameter for NewObjectV:

args: a va_list of arguments to the constructor.

RETURNS:

Returns a Java object, or NULL if the object cannot be constructed.

THROWS:

InstantiationException: if the class is an interface or an abstract class.

OutOfMemoryError: if the system runs out of memory.

Any exceptions thrown by the constructor.

GetObjectClass

jclass GetObjectClass(JNIEnv *env, jobject obj);

Returns the class of an object.

LINKAGE:

Index 31 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

RETURNS:

Returns a Java class object.

GetObjectRefType

jobjectRefType GetObjectRefType(JNIEnv* env, jobject obj);

Returns the type of the object referred to by the obj argument. The argument obj can either be a local, global or weak global reference.

LINKAGE:

Index 232 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a local, global or weak global reference.

vm: the virtual machine instance from which the interface will be retrieved.

env: pointer to the location where the JNI interface pointer for the current thread will be placed.

version: the requested JNI version.

RETURNS:

The function GetObjectRefType returns one of the following enumerated values defined as a jobjectRefType:

JNIInvalidRefType = 0,
JNILocalRefType = 1,
JNIGlobalRefType = 2,
JNIWeakGlobalRefType = 3

If the argument obj is a weak global reference type, the return will be JNIWeakGlobalRefType.

If the argument obj is a global reference type, the return value will be JNIGlobalRefType.

If the argument obj is a local reference type, the return will be JNILocalRefType.

If the obj argument is not a valid reference, the return value for this function will be JNIInvalidRefType.

An invalid reference is a reference which is not a valid handle. That is, the obj pointer address does not point to a location in memory which has been allocated from one of the Ref creation functions or returned from a JNI function.

As such, NULL would be an invalid reference and GetObjectRefType(env,NULL) would return JNIInvalidRefType.

On the other hand, a null reference, which is a reference that points to a null, would return the type of reference that the null reference was originally created as.

GetObjectRefType cannot be used on deleted references.

Since references are typically implemented as pointers to memory data structures that can potentially be reused by any of the reference allocation services in the VM, once deleted, it is not specified what value the GetObjectRefType will return.

SINCE:

JDK/JRE 1.6

IsInstanceOf

jboolean IsInstanceOf(JNIEnv *env, jobject obj,
jclass clazz);

Tests whether an object is an instance of a class.

LINKAGE:

Index 32 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object.

clazz: a Java class object.

RETURNS:

Returns JNI_TRUE if obj can be cast to clazz; otherwise, returns JNI_FALSE. A NULL object can be cast to any class.

IsSameObject

jboolean IsSameObject(JNIEnv *env, jobject ref1,
jobject ref2);

Tests whether two references refer to the same Java object.

LINKAGE:

Index 24 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

ref1: a Java object.

ref2: a Java object.

RETURNS:

Returns JNI_TRUE if ref1 and ref2 refer to the same Java object, or are both NULL; otherwise, returns JNI_FALSE.

Accessing Fields of Objects

GetFieldID

jfieldID GetFieldID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the field ID for an instance (nonstatic) field of a class. The field is specified by its name and signature. The Get<type>Field and Set<type>Field families of accessor functions use field IDs to retrieve object fields.

GetFieldID() causes an uninitialized class to be initialized.

GetFieldID() cannot be used to obtain the length field of an array. Use GetArrayLength() instead.

LINKAGE:

Index 94 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the field name in a 0-terminated modified UTF-8 string.

sig: the field signature in a 0-terminated modified UTF-8 string.

RETURNS:

Returns a field ID, or NULL if the operation fails.

THROWS:

NoSuchFieldError: if the specified field cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

Get<type>Field Routines

NativeType Get<type>Field(JNIEnv *env, jobject obj,
jfieldID fieldID);

This family of accessor routines returns the value of an instance (nonstatic) field of an object. The field to access is specified by a field ID obtained by calling GetFieldID().

The following table describes the Get<type>Field routine name and result type. You should replace type in Get<type>Field with the Java type of the field, or use one of the actual routine names from the table, and replace NativeType with the corresponding native type for that routine.

Get<type>Field Family of Accessor Routines
Get<type>Field Routine Name | Native Type
GetObjectField() | jobject
GetBooleanField() | jboolean
GetByteField() | jbyte
GetCharField() | jchar
GetShortField() | jshort
GetIntField() | jint
GetLongField() | jlong
GetFloatField() | jfloat
GetDoubleField() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table:

Get<type>Field Family of Accessor Routines
Get<type>Field Routine Name | Index
GetObjectField() | 95
GetBooleanField() | 96
GetByteField() | 97
GetCharField() | 98
GetShortField() | 99
GetIntField() | 100
GetLongField() | 101
GetFloatField() | 102
GetDoubleField() | 103

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

fieldID: a valid field ID.

RETURNS:

Returns the content of the field.

Set<type>Field Routines

void Set<type>Field(JNIEnv *env, jobject obj, jfieldID fieldID,
 NativeType value);

This family of accessor routines sets the value of an instance (nonstatic) field of an object. The field to access is specified by a field ID obtained by calling GetFieldID().

The following table describes the Set<type>Field routine name and value type. You should replace type in Set<type>Field with the Java type of the field, or use one of the actual routine names from the table, and replace NativeType with the corresponding native type for that routine.

Set<type>Field Family of Accessor Routines
Set<type>Field Routine | Native Type
SetObjectField() | jobject
SetBooleanField() | jboolean
SetByteField() | jbyte
SetCharField() | jchar
SetShortField() | jshort
SetIntField() | jint
SetLongField() | jlong
SetFloatField() | jfloat
SetDoubleField() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

Set<type>Field Family of Accessor Routines
Set<type>Field Routine | Index
SetObjectField() | 104
SetBooleanField() | 105
SetByteField() | 106
SetCharField() | 107
SetShortField() | 108
SetIntField() | 109
SetLongField() | 110
SetFloatField() | 111
SetDoubleField() | 112

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

fieldID: a valid field ID.

value: the new value of the field.

Calling Instance Methods

GetMethodID

jmethodID GetMethodID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the method ID for an instance (nonstatic) method of a class or interface. The method may be defined in one of the clazz’s superclasses and inherited by clazz. The method is determined by its name and signature.

GetMethodID() causes an uninitialized class to be initialized.

To obtain the method ID of a constructor, supply <init> as the method name and void (V) as the return type.

LINKAGE:

Index 33 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the method name in a 0-terminated modified UTF-8 string.

sig: the method signature in 0-terminated modified UTF-8 string.

RETURNS:

Returns a method ID, or NULL if the specified method cannot be found.

THROWS:

NoSuchMethodError: if the specified method cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

Call<type>Method Routines, Call<type>MethodA Routines, Call<type>MethodV Routines

NativeType Call<type>Method(JNIEnv *env, jobject obj,
jmethodID methodID, ...);

NativeType Call<type>MethodA(JNIEnv *env, jobject obj,
jmethodID methodID, const jvalue *args);

NativeType Call<type>MethodV(JNIEnv *env, jobject obj,
jmethodID methodID, va_list args);

Methods from these three families of operations are used to call a Java instance method from a native method.They only differ in their mechanism for passing parameters to the methods that they call.

These families of operations invoke an instance (nonstatic) method on a Java object, according to the specified method ID. The methodID argument must be obtained by calling GetMethodID().

When these functions are used to call private methods and constructors, the method ID must be derived from the real class of obj, not from one of its superclasses.

Call<type>Method Routines

Programmers place all arguments that are to be passed to the method immediately following the methodID argument. The Call<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

Call<type>MethodA Routines

Programmers place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The Call<type>MethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

Call<type>MethodV Routines

Programmers place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The Call<type>MethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result type. You should replace type in Call<type>Method with the Java type of the method you are calling (or use one of the actual method calling routine names from the table) and replace NativeType with the corresponding native type for that routine.

Instance Method Calling Routines
Call<type>Method Routine Name | Native Type
CallVoidMethod() CallVoidMethodA() CallVoidMethodV() | void
CallObjectMethod() CallObjectMethodA() CallObjectMethodV() | jobject
CallBooleanMethod() CallBooleanMethodA() CallBooleanMethodV() | jboolean
CallByteMethod() CallByteMethodA() CallByteMethodV() | jbyte
CallCharMethod() CallCharMethodA() CallCharMethodV() | jchar
CallShortMethod() CallShortMethodA() CallShortMethodV() | jshort
CallIntMethod() CallIntMethodA() CallIntMethodV() | jint
CallLongMethod() CallLongMethodA() CallLongMethodV() | jlong
CallFloatMethod() CallFloatMethodA() CallFloatMethodV() | jfloat
CallDoubleMethod() CallDoubleMethodA() CallDoubleMethodV() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table:

Instance Method Calling Routines
Call<type>Method Routine Name | Index
CallVoidMethod() CallVoidMethodA() CallVoidMethodV() | 61 63 62
CallObjectMethod() CallObjectMethodA() CallObjectMethodV() | 34 36 35
CallBooleanMethod() CallBooleanMethodA() CallBooleanMethodV() | 37 39 38
CallByteMethod() CallByteMethodA() CallByteMethodV() | 40 42 41
CallCharMethod() CallCharMethodA() CallCharMethodV() | 43 45 44
CallShortMethod() CallShortMethodA() CallShortMethodV() | 46 48 47
CallIntMethod() CallIntMethodA() CallIntMethodV() | 49 51 50
CallLongMethod() CallLongMethodA() CallLongMethodV() | 52 54 53
CallFloatMethod() CallFloatMethodA() CallFloatMethodV() | 55 57 56
CallDoubleMethod() CallDoubleMethodA() CallDoubleMethodV() | 58 60 59

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object.

methodID: a method ID.

Additional Parameter for Call<type>Method Routines:

arguments to the Java method.

Additional Parameter for Call<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for Call<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the Java method.

THROWS:

Exceptions raised during the execution of the Java method.

CallNonvirtual<type>Method Routines, CallNonvirtual<type>MethodA Routines, CallNonvirtual<type>MethodV Routines

NativeType CallNonvirtual<type>Method(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, ...);

NativeType CallNonvirtual<type>MethodA(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, const jvalue *args);

NativeType CallNonvirtual<type>MethodV(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, va_list args);

These families of operations invoke an instance (nonstatic) method on a Java object, according to the specified class and method ID. The methodID argument must be obtained by calling GetMethodID() on the class clazz.

The CallNonvirtual<type>Method families of routines and the Call<type>Method families of routines are different. Call<type>Method routines invoke the method based on the class of the object, while CallNonvirtual<type>Method routines invoke the method based on the class, designated by the clazz parameter, from which the method ID is obtained. The method ID must be obtained from the real class of the object or from one of its superclasses.

CallNonvirtual<type>Method Routines

Programmers place all arguments that are to be passed to the method immediately following the methodID argument. The CallNonvirtual<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

CallNonvirtual<type>MethodA Routines

Programmers place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The CallNonvirtual<type>MethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

CallNonvirtual<type>MethodV Routines

Programmers place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The CallNonvirtualMethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result type. You should replace type in CallNonvirtual<type>Method with the Java type of the method, or use one of the actual method calling routine names from the table, and replace NativeType with the corresponding native type for that routine.

CallNonvirtual<type>Method Routines
CallNonvirtual<type>Method Routine Name | Native Type
CallNonvirtualVoidMethod() CallNonvirtualVoidMethodA() CallNonvirtualVoidMethodV() | void
CallNonvirtualObjectMethod() CallNonvirtualObjectMethodA() CallNonvirtualObjectMethodV() | jobject
CallNonvirtualBooleanMethod() CallNonvirtualBooleanMethodA() CallNonvirtualBooleanMethodV() | jboolean
CallNonvirtualByteMethod() CallNonvirtualByteMethodA() CallNonvirtualByteMethodV() | jbyte
CallNonvirtualCharMethod() CallNonvirtualCharMethodA() CallNonvirtualCharMethodV() | jchar
CallNonvirtualShortMethod() CallNonvirtualShortMethodA() CallNonvirtualShortMethodV() | jshort
CallNonvirtualIntMethod() CallNonvirtualIntMethodA() CallNonvirtualIntMethodV() | jint
CallNonvirtualLongMethod() CallNonvirtualLongMethodA() CallNonvirtualLongMethodV() | jlong
CallNonvirtualFloatMethod() CallNonvirtualFloatMethodA() CallNonvirtualFloatMethodV() | jfloat
CallNonvirtualDoubleMethod() CallNonvirtualDoubleMethodA() CallNonvirtualDoubleMethodV() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

CallNonvirtual<type>Method Routines
CallNonvirtual<type>Method Routine Name | Index
CallNonvirtualVoidMethod() CallNonvirtualVoidMethodA() CallNonvirtualVoidMethodV() | 91 93 92
CallNonvirtualObjectMethod() CallNonvirtualObjectMethodA() CallNonvirtualObjectMethodV() | 64 66 65
CallNonvirtualBooleanMethod() CallNonvirtualBooleanMethodA() CallNonvirtualBooleanMethodV() | 67 69 68
CallNonvirtualByteMethod() CallNonvirtualByteMethodA() CallNonvirtualByteMethodV() | 70 72 71
CallNonvirtualCharMethod() CallNonvirtualCharMethodA() CallNonvirtualCharMethodV() | 73 75 74
CallNonvirtualShortMethod() CallNonvirtualShortMethodA() CallNonvirtualShortMethodV() | 76 78 77
CallNonvirtualIntMethod() CallNonvirtualIntMethodA() CallNonvirtualIntMethodV() | 79 81 80
CallNonvirtualLongMethod() CallNonvirtualLongMethodA() CallNonvirtualLongMethodV() | 82 84 83
CallNonvirtualFloatMethod() CallNonvirtualFloatMethodA() CallNonvirtualFloatMethodV() | 85 87 86
CallNonvirtualDoubleMethod() CallNonvirtualDoubleMethodA() CallNonvirtualDoubleMethodV() | 88 90 89

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class.

obj: a Java object.

methodID: a method ID.

Additional Parameter for CallNonvirtual<type>Method Routines:

arguments to the Java method.

Additional Parameter for CallNonvirtual<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for CallNonvirtual<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the Java method.

THROWS:

Exceptions raised during the execution of the Java method.

Accessing Static Fields

GetStaticFieldID

jfieldID GetStaticFieldID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the field ID for a static field of a class. The field is specified by its name and signature. The GetStatic<type>Field and SetStatic<type>Field families of accessor functions use field IDs to retrieve static fields.

GetStaticFieldID() causes an uninitialized class to be initialized.

LINKAGE:

Index 144 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the static field name in a 0-terminated modified UTF-8 string.

sig: the field signature in a 0-terminated modified UTF-8 string.

RETURNS:

Returns a field ID, or NULL if the specified static field cannot be found.

THROWS:

NoSuchFieldError: if the specified static field cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

GetStatic<type>Field Routines

NativeType GetStatic<type>Field(JNIEnv *env, jclass clazz,
jfieldID fieldID);

This family of accessor routines returns the value of a static field of an object. The field to access is specified by a field ID, which is obtained by calling GetStaticFieldID().

The following table describes the family of get routine names and result types. You should replace type in GetStatic<type>Field with the Java type of the field, or one of the actual static field accessor routine names from the table, and replace NativeType with the corresponding native type for that routine.

GetStatic<type>Field Family of Accessor Routines
GetStatic<type>Field Routine Name | Native Type
GetStaticObjectField() | jobject
GetStaticBooleanField() | jboolean
GetStaticByteField() | jbyte
GetStaticCharField() | jchar
GetStaticShortField() | jshort
GetStaticIntField() | jint
GetStaticLongField() | jlong
GetStaticFloatField() | jfloat
GetStaticDoubleField() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

GetStatic<type>Field Family of Accessor Routines
GetStatic<type>Field Routine Name | Index
GetStaticObjectField() | 145
GetStaticBooleanField() | 146
GetStaticByteField() | 147
GetStaticCharField() | 148
GetStaticShortField() | 149
GetStaticIntField() | 150
GetStaticLongField() | 151
GetStaticFloatField() | 152
GetStaticDoubleField() | 153

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

fieldID: a static field ID.

RETURNS:

Returns the content of the static field.

SetStatic<type>Field Routines

void SetStatic<type>Field(JNIEnv *env, jclass clazz,
jfieldID fieldID, NativeType value);

This family of accessor routines sets the value of a static field of an object. The field to access is specified by a field ID, which is obtained by calling GetStaticFieldID().

The following table describes the set routine name and value types. You should replace type in SetStatic<type>Field with the Java type of the field, or one of the actual set static field routine names from the table, and replace NativeType with the corresponding native type for that routine.

SetStatic<type>Field Family of Accessor Routines
SetStatic<type>Field Routine Name | NativeType
SetStaticObjectField() | jobject
SetStaticBooleanField() | jboolean
SetStaticByteField() | jbyte
SetStaticCharField() | jchar
SetStaticShortField() | jshort
SetStaticIntField() | jint
SetStaticLongField() | jlong
SetStaticFloatField() | jfloat
SetStaticDoubleField() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

SetStatic<type>Field Family of Accessor Routines
SetStatic<type>Field Routine Name | Index
SetStaticObjectField() | 154
SetStaticBooleanField() | 155
SetStaticByteField() | 156
SetStaticCharField() | 157
SetStaticShortField() | 158
SetStaticIntField() | 159
SetStaticLongField() | 160
SetStaticFloatField() | 161
SetStaticDoubleField() | 162

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

fieldID: a static field ID.

value: the new value of the field.

Calling Static Methods

GetStaticMethodID

jmethodID GetStaticMethodID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the method ID for a static method of a class. The method is specified by its name and signature.

GetStaticMethodID() causes an uninitialized class to be initialized.

LINKAGE:

Index 113 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the static method name in a 0-terminated modified UTF-8 string.

sig: the method signature in a 0-terminated modified UTF-8 string.

RETURNS:

Returns a method ID, or NULL if the operation fails.

THROWS:

NoSuchMethodError: if the specified static method cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

CallStatic<type>Method Routines, CallStatic<type>MethodA Routines, CallStatic<type>MethodV Routines

NativeType CallStatic<type>Method(JNIEnv *env, jclass clazz,
jmethodID methodID, ...);

NativeType CallStatic<type>MethodA(JNIEnv *env, jclass clazz,
jmethodID methodID, jvalue *args);

NativeType CallStatic<type>MethodV(JNIEnv *env, jclass clazz,
jmethodID methodID, va_list args);

This family of operations invokes a static method on a Java object, according to the specified method ID. The methodID argument must be obtained by calling GetStaticMethodID().

The method ID must be derived from clazz, not from one of its superclasses.

CallStatic<type>Method Routines

Programmers should place all arguments that are to be passed to the method immediately following the methodID argument. The CallStatic<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

CallStatic<type>MethodA Routines

Programmers should place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The CallStaticMethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

CallStatic<type>MethodV Routines

Programmers should place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The CallStaticMethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result types. You should replace type in CallStatic<type>Method with the Java type of the method, or one of the actual method calling routine names from the table, and replace NativeType with the corresponding native type for that routine.

CallStatic<type>Method Calling Routines
CallStatic<type>Method Routine Name | Native Type
CallStaticVoidMethod() CallStaticVoidMethodA() CallStaticVoidMethodV() | void
CallStaticObjectMethod() CallStaticObjectMethodA() CallStaticObjectMethodV() | jobject
CallStaticBooleanMethod() CallStaticBooleanMethodA() CallStaticBooleanMethodV() | jboolean
CallStaticByteMethod() CallStaticByteMethodA() CallStaticByteMethodV() | jbyte
CallStaticCharMethod() CallStaticCharMethodA() CallStaticCharMethodV() | jchar
CallStaticShortMethod() CallStaticShortMethodA() CallStaticShortMethodV() | jshort
CallStaticIntMethod() CallStaticIntMethodA() CallStaticIntMethodV() | jint
CallStaticLongMethod() CallStaticLongMethodA() CallStaticLongMethodV() | jlong
CallStaticFloatMethod() CallStaticFloatMethodA() CallStaticFloatMethodV() | jfloat
CallStaticDoubleMethod() CallStaticDoubleMethodA() CallStaticDoubleMethodV() | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

CallStatic<type>Method Calling Routines
CallStatic<type>Method Routine Name | Index
CallStaticVoidMethod() CallStaticVoidMethodA() CallStaticVoidMethodV() | 141 143 142
CallStaticObjectMethod() CallStaticObjectMethodA() CallStaticObjectMethodV() | 114 116 115
CallStaticBooleanMethod() CallStaticBooleanMethodA() CallStaticBooleanMethodV() | 117 119 118
CallStaticByteMethod() CallStaticByteMethodA() CallStaticByteMethodV() | 120 122 121
CallStaticCharMethod() CallStaticCharMethodA() CallStaticCharMethodV() | 123 125 124
CallStaticShortMethod() CallStaticShortMethodA() CallStaticShortMethodV() | 126 128 127
CallStaticIntMethod() CallStaticIntMethodA() CallStaticIntMethodV() | 129 131 130
CallStaticLongMethod() CallStaticLongMethodA() CallStaticLongMethodV() | 132 134 133
CallStaticFloatMethod() CallStaticFloatMethodA() CallStaticFloatMethodV() | 135 137 136
CallStaticDoubleMethod() CallStaticDoubleMethodA() CallStaticDoubleMethodV() | 138 140 139

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methodID: a static method ID.

Additional Parameter for CallStatic<type>Method Routines:

arguments to the static method.

Additional Parameter for CallStatic<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for CallStatic<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the static Java method.

THROWS:

Exceptions raised during the execution of the Java method.

String Operations

NewString

jstring NewString(JNIEnv *env, const jchar *unicodeChars,
jsize len);

Constructs a new java.lang.String object from an array of Unicode characters.

LINKAGE:

Index 163 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

unicodeChars: pointer to a Unicode string.

len: length of the Unicode string.

RETURNS:

Returns a Java string object, or NULL if the string cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetStringLength

jsize GetStringLength(JNIEnv *env, jstring string);

Returns the length (the count of Unicode characters) of a Java string.

LINKAGE:

Index 164 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

RETURNS:

Returns the length of the Java string.

GetStringChars

const jchar * GetStringChars(JNIEnv *env, jstring string,
jboolean *isCopy);

Returns a pointer to the array of Unicode characters of the string. This pointer is valid until ReleaseStringChars() is called.

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

LINKAGE:

Index 165 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to a Unicode string, or NULL if the operation fails.

ReleaseStringChars

void ReleaseStringChars(JNIEnv *env, jstring string,
const jchar *chars);

Informs the VM that the native code no longer needs access to chars. The chars argument is a pointer obtained from string using GetStringChars().

LINKAGE:

Index 166 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

chars: a pointer to a Unicode string.

NewStringUTF

jstring NewStringUTF(JNIEnv *env, const char *bytes);

Constructs a new java.lang.String object from an array of characters in modified UTF-8 encoding.

LINKAGE:

Index 167 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

bytes: the pointer to a modified UTF-8 string.

RETURNS:

Returns a Java string object, or NULL if the string cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetStringUTFLength

jsize GetStringUTFLength(JNIEnv *env, jstring string);

Returns the length in bytes of the modified UTF-8 representation of a string.

LINKAGE:

Index 168 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

RETURNS:

Returns the UTF-8 length of the string.

GetStringUTFChars

const char * GetStringUTFChars(JNIEnv *env, jstring string,
jboolean *isCopy);

Returns a pointer to an array of bytes representing the string in modified UTF-8 encoding. This array is valid until it is released by ReleaseStringUTFChars().

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

LINKAGE:

Index 169 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to a modified UTF-8 string, or NULL if the operation fails.

ReleaseStringUTFChars

void ReleaseStringUTFChars(JNIEnv *env, jstring string,
const char *utf);

Informs the VM that the native code no longer needs access to utf. The utf argument is a pointer derived from string using GetStringUTFChars().

LINKAGE:

Index 170 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

utf: a pointer to a modified UTF-8 string.

Note: In JDK/JRE 1.1, programmers can get primitive array elements in a user-supplied buffer. As of JDK/JRE 1.2 additional set of functions are provided allowing native code to obtain characters in Unicode (UTF-16) or modified UTF-8 encoding in a user-supplied buffer. See the functions below.

GetStringRegion

void GetStringRegion(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);

Copies len number of Unicode characters beginning at offset start to the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

LINKAGE:

Index 220 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

GetStringUTFRegion

< void GetStringUTFRegion(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);

Translates len number of Unicode characters beginning at offset start into modified UTF-8 encoding and place the result in the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

LINKAGE:

Index 221 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

GetStringCritical, ReleaseStringCritical

const jchar * GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy);
void ReleaseStringCritical(JNIEnv *env, jstring string, const jchar *carray);

The semantics of these two functions are similar to the existing Get/ReleaseStringChars functions. If possible, the VM returns a pointer to string elements; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used. In a code segment enclosed by Get/ReleaseStringCritical calls, the native code must not issue arbitrary JNI calls, or cause the current thread to block.

The restrictions on Get/ReleaseStringCritical are similar to those on Get/ReleasePrimitiveArrayCritical.

LINKAGE (GetStringCritical):

Index 224 in the JNIEnv interface function table.

LINKAGE (ReleaseStingCritical):

Index 225 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Array Operations

GetArrayLength

jsize GetArrayLength(JNIEnv *env, jarray array);

Returns the number of elements in the array.

LINKAGE:

Index 171 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array object.

RETURNS:

Returns the length of the array.

NewObjectArray

jobjectArray NewObjectArray(JNIEnv *env, jsize length,
jclass elementClass, jobject initialElement);

Constructs a new array holding objects in class elementClass. All elements are initially set to initialElement.

LINKAGE:

Index 172 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

length: array size.

elementClass: array element class.

initialElement: initialization value.

RETURNS:

Returns a Java array object, or NULL if the array cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetObjectArrayElement

jobject GetObjectArrayElement(JNIEnv *env,
jobjectArray array, jsize index);

Returns an element of an Object array.

LINKAGE:

Index 173 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

index: array index.

RETURNS:

Returns a Java object.

THROWS:

ArrayIndexOutOfBoundsException: if index does not specify a valid index in the array.

SetObjectArrayElement

void SetObjectArrayElement(JNIEnv *env, jobjectArray array,
jsize index, jobject value);

Sets an element of an Object array.

LINKAGE:

Index 174 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

index: array index.

value: the new value.

THROWS:

ArrayIndexOutOfBoundsException: if index does not specify a valid index in the array.

ArrayStoreException: if the class of value is not a subclass of the element class of the array.

New<PrimitiveType>Array Routines

ArrayType New<PrimitiveType>Array(JNIEnv *env, jsize length);

A family of operations used to construct a new primitive array object. The following table describes the specific primitive array constructors. You should replace New<PrimitiveType>Array with one of the actual primitive array constructor routine names from this table, and replace ArrayType with the corresponding array type for that routine.

New<PrimitiveType>Array Family of Array Constructors
New<PrimitiveType>Array Routines | Array Type
NewBooleanArray() | jbooleanArray
NewByteArray() | jbyteArray
NewCharArray() | jcharArray
NewShortArray() | jshortArray
NewIntArray() | jintArray
NewLongArray() | jlongArray
NewFloatArray() | jfloatArray
NewDoubleArray() | jdoubleArray

LINKAGE:

Indices in the JNIEnv interface function table.

New<PrimitiveType>Array Family of Array Constructors
New<PrimitiveType>Array Routines | Index
NewBooleanArray() | 175
NewByteArray() | 176
NewCharArray() | 177
NewShortArray() | 178
NewIntArray() | 179
NewLongArray() | 180
NewFloatArray() | 181
NewDoubleArray() | 182

PARAMETERS:

env: the JNI interface pointer.

length: the array length.

RETURNS:

Returns a Java array, or NULL if the array cannot be constructed.

Get<PrimitiveType>ArrayElements Routines

NativeType *Get<PrimitiveType>ArrayElements(JNIEnv *env,
 ArrayType array, jboolean *isCopy);

A family of functions that returns the body of the primitive array. The result is valid until the corresponding Release<PrimitiveType>ArrayElements() function is called. Since the returned array may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until Release<PrimitiveType>ArrayElements() is called.

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

The following table describes the specific primitive array element accessors. You should make the following substitutions:

  • Replace Get<PrimitiveType>ArrayElements with one of the actual primitive element accessor routine names from the following table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.

Regardless of how boolean arrays are represented in the Java VM, GetBooleanArrayElements() always returns a pointer to jbooleans, with each byte denoting an element (the unpacked representation). All arrays of other types are guaranteed to be contiguous in memory.

Get<PrimitiveType>ArrayElements Family of Accessor Routines
Get<PrimitiveType>ArrayElements Routines | Array Type | Native Type
GetBooleanArrayElements() | jbooleanArray | jboolean
GetByteArrayElements() | jbyteArray | jbyte
GetCharArrayElements() | jcharArray | jchar
GetShortArrayElements() | jshortArray | jshort
GetIntArrayElements() | jintArray | jint
GetLongArrayElements() | jlongArray | jlong
GetFloatArrayElements() | jfloatArray | jfloat
GetDoubleArrayElements() | jdoubleArray | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

Get<PrimitiveType>ArrayElements Family of Accessor Routines
Get<PrimitiveType>ArrayElements Routines | Index
GetBooleanArrayElements() | 183
GetByteArrayElements() | 184
GetCharArrayElements() | 185
GetShortArrayElements() | 186
GetIntArrayElements() | 187
GetLongArrayElements() | 188
GetFloatArrayElements() | 189
GetDoubleArrayElements() | 190

PARAMETERS:

env: the JNI interface pointer.

array: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to the array elements, or NULL if the operation fails.

Release<PrimitiveType>ArrayElements Routines

void Release<PrimitiveType>ArrayElements(JNIEnv *env,
 ArrayType array, NativeType *elems, jint mode);

A family of functions that informs the VM that the native code no longer needs access to elems. The elems argument is a pointer derived from array using the corresponding Get<PrimitiveType>ArrayElements() function. If necessary, this function copies back all changes made to elems to the original array.

The mode argument provides information on how the array buffer should be released. mode has no effect if elems is not a copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

Primitive Array Release Modes
mode | actions
0 | copy back the content and free the elems buffer
JNI_COMMIT | copy back the content but do not free the elems buffer
JNI_ABORT | free the buffer without copying back the possible changes

In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give the programmer more control over memory management and should be used with extreme care.

The next table describes the specific routines that comprise the family of primitive array disposers. You should make the following substitutions:

  • Replace Release<PrimitiveType>ArrayElements with one of the actual primitive array disposer routine names from the following table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.
Release<PrimitiveType>ArrayElements Family of Array Routines
Release<PrimitiveType>ArrayElements Routines | Array Type | Native Type
ReleaseBooleanArrayElements() | jbooleanArray | jboolean
ReleaseByteArrayElements() | jbyteArray | jbyte
ReleaseCharArrayElements() | jcharArray | jchar
ReleaseShortArrayElements() | jshortArray | jshort
ReleaseIntArrayElements() | jintArray | jint
ReleaseLongArrayElements() | jlongArray | jlong
ReleaseFloatArrayElements() | jfloatArray | jfloat
ReleaseDoubleArrayElements() | jdoubleArray | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

Release<PrimitiveType>ArrayElements Family of Array Routines
Release<PrimitiveType>ArrayElements Routines | Index
ReleaseBooleanArrayElements() | 191
ReleaseByteArrayElements() | 192
ReleaseCharArrayElements() | 193
ReleaseShortArrayElements() | 194
ReleaseIntArrayElements() | 195
ReleaseLongArrayElements() | 196
ReleaseFloatArrayElements() | 197
ReleaseDoubleArrayElements() | 198

PARAMETERS:

env: the JNI interface pointer.

array: a Java array object.

elems: a pointer to array elements.

mode: the release mode.

Get<PrimitiveType>ArrayRegion Routines

void Get<PrimitiveType>ArrayRegion(JNIEnv *env, ArrayType array,
jsize start, jsize len, NativeType *buf);

A family of functions that copies a region of a primitive array into a buffer.

The following table describes the specific primitive array element accessors. You should do the following substitutions:

  • Replace Get<PrimitiveType>ArrayRegion with one of the actual primitive element accessor routine names from the following table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.
Get<PrimitiveType>ArrayRegion Family of Array Accessor Routines
Get<PrimitiveType>ArrayRegion Routine | Array Type | Native Type
GetBooleanArrayRegion() | jbooleanArray | jboolean
GetByteArrayRegion() | jbyteArray | jbyte
GetCharArrayRegion() | jcharArray | jchar
GetShortArrayRegion() | jshortArray | jhort
GetIntArrayRegion() | jintArray | jint
GetLongArrayRegion() | jlongArray | jlong
GetFloatArrayRegion() | jfloatArray | jloat
GetDoubleArrayRegion() | jdoubleArray | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

Get<PrimitiveType>ArrayRegion Family of Array Accessor Routines
Get<PrimitiveType>ArrayRegion Routine | Index
GetBooleanArrayRegion() | 199
GetByteArrayRegion() | 200
GetCharArrayRegion() | 201
GetShortArrayRegion() | 202
GetIntArrayRegion() | 203
GetLongArrayRegion() | 204
GetFloatArrayRegion() | 205
GetDoubleArrayRegion() | 206

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

start: the starting index.

len: the number of elements to be copied.

buf: the destination buffer.

THROWS:

ArrayIndexOutOfBoundsException: if one of the indexes in the region is not valid.

Set<PrimitiveType>ArrayRegion Routines

void Set<PrimitiveType>ArrayRegion(JNIEnv *env, ArrayType array,
jsize start, jsize len, const NativeType *buf);

A family of functions that copies back a region of a primitive array from a buffer.

The following table describes the specific primitive array element accessors. You should make the following replacements:

  • Replace Set<PrimitiveType>ArrayRegion with one of the actual primitive element accessor routine names from the following table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.
Set<PrimitiveType>ArrayRegion Family of Array Accessor Routines
Set<PrimitiveType>ArrayRegion Routine | Array Type | Native Type
SetBooleanArrayRegion() | jbooleanArray | jboolean
SetByteArrayRegion() | jbyteArray | jbyte
SetCharArrayRegion() | jcharArray | jchar
SetShortArrayRegion() | jshortArray | jshort
SetIntArrayRegion() | jintArray | jint
SetLongArrayRegion() | jlongArray | jlong
SetFloatArrayRegion() | jfloatArray | jfloat
SetDoubleArrayRegion() | jdoubleArray | jdouble

LINKAGE:

Indices in the JNIEnv interface function table.

Set<PrimitiveType>ArrayRegion Family of Array Accessor Routines
Set<PrimitiveType>ArrayRegion Routine | Index
SetBooleanArrayRegion() | 207
SetByteArrayRegion() | 208
SetCharArrayRegion() | 209
SetShortArrayRegion() | 210
SetIntArrayRegion() | 211
SetLongArrayRegion() | 212
SetFloatArrayRegion() | 213
SetDoubleArrayRegion() | 214

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

start: the starting index.

len: the number of elements to be copied.

buf: the source buffer.

THROWS:

ArrayIndexOutOfBoundsException: if one of the indexes in the region is not valid.

Note: As of JDK/JRE 1.1, programmers can use Get/Release<primitivetype>ArrayElements functions to obtain a pointer to primitive array elements. If the VM supports pinning, the pointer to the original data is returned; otherwise, a copy is made.

New functions introduced as of JDK/JRE 1.3 allow native code to obtain a direct pointer to array elements even if the VM does not support pinning.

GetPrimitiveArrayCritical, ReleasePrimitiveArrayCritical

void * GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy);
void ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, void *carray, jint mode);

The semantics of these two functions are very similar to the existing Get/Release<primitivetype>ArrayElements functions. If possible, the VM returns a pointer to the primitive array; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used.

After calling GetPrimitiveArrayCritical, the native code should not run for an extended period of time before it calls ReleasePrimitiveArrayCritical. We must treat the code inside this pair of functions as running in a "critical region." Inside a critical region, native code must not call other JNI functions, or any system call that may cause the current thread to block and wait for another Java thread. (For example, the current thread must not call read on a stream being written by another Java thread.)

These restrictions make it more likely that the native code will obtain an uncopied version of the array, even if the VM does not support pinning. For example, a VM may temporarily disable garbage collection when the native code is holding a pointer to an array obtained via GetPrimitiveArrayCritical.

Multiple pairs of GetPrimtiveArrayCritical and ReleasePrimitiveArrayCritical may be nested. For example:

  jint len = (*env)->GetArrayLength(env, arr1);
  jbyte *a1 = (*env)->GetPrimitiveArrayCritical(env, arr1, 0);
  jbyte *a2 = (*env)->GetPrimitiveArrayCritical(env, arr2, 0);
  /* We need to check in case the VM tried to make a copy. */
  if (a1 == NULL || a2 == NULL) {
    ... /* out of memory exception thrown */
  }
  memcpy(a1, a2, len);
  (*env)->ReleasePrimitiveArrayCritical(env, arr2, a2, 0);
  (*env)->ReleasePrimitiveArrayCritical(env, arr1, a1, 0);

Note that GetPrimitiveArrayCritical might still make a copy of the array if the VM internally represents arrays in a different format. Therefore we need to check its return value against NULL for possible out of memory situations.

LINKAGE (GetPrimitiveArrayCritical):

Linkage Index 222 in the JNIEnv interface function table.

LINKAGE (ReleasePrimitiveArrayCritical):

Linkage Index 223 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Registering Native Methods

RegisterNatives

jint RegisterNatives(JNIEnv *env, jclass clazz,
const JNINativeMethod *methods, jint nMethods);

Registers native methods with the class specified by the clazz argument. The methods parameter specifies an array of JNINativeMethod structures that contain the names, signatures, and function pointers of the native methods. The name and signature fields of the JNINativeMethod structure are pointers to modified UTF-8 strings. The nMethods parameter specifies the number of native methods in the array. The JNINativeMethod structure is defined as follows:

typedef struct {

    char *name;

    char *signature;

    void *fnPtr;

} JNINativeMethod;

The function pointers nominally must have the following signature:

ReturnType (*fnPtr)(JNIEnv *env, jobject objectOrClass, ...);

LINKAGE:

Index 215 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methods: the native methods in the class.

nMethods: the number of native methods in the class.

RETURNS:

Returns “0” on success; returns a negative value on failure.

THROWS:

NoSuchMethodError: if a specified method cannot be found or if the method is not native.

UnregisterNatives

jint UnregisterNatives(JNIEnv *env, jclass clazz);

Unregisters native methods of a class. The class goes back to the state before it was linked or registered with its native method functions.

This function should not be used in normal native code. Instead, it provides special programs a way to reload and relink native libraries.

LINKAGE:

Index 216 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns “0” on success; returns a negative value on failure.

Monitor Operations

MonitorEnter

jint MonitorEnter(JNIEnv *env, jobject obj);

Enters the monitor associated with the underlying Java object referred to by obj.

Enters the monitor associated with the object referred to by obj. The obj reference must not be NULL.

Each Java object has a monitor associated with it. If the current thread already owns the monitor associated with obj, it increments a counter in the monitor indicating the number of times this thread has entered the monitor. If the monitor associated with obj is not owned by any thread, the current thread becomes the owner of the monitor, setting the entry count of this monitor to 1. If another thread already owns the monitor associated with obj, the current thread waits until the monitor is released, then tries again to gain ownership.

A monitor entered through a MonitorEnter JNI function call cannot be exited using the monitorexit Java virtual machine instruction or a synchronized method return. A MonitorEnter JNI function call and a monitorenter Java virtual machine instruction may race to enter the monitor associated with the same object.

To avoid deadlocks, a monitor entered through a MonitorEnter JNI function call must be exited using the MonitorExit JNI call, unless the DetachCurrentThread call is used to implicitly release JNI monitors.

LINKAGE:

Index 217 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a normal Java object or class object.

RETURNS:

Returns “0” on success; returns a negative value on failure.

MonitorExit

jint MonitorExit(JNIEnv *env, jobject obj);

The current thread must be the owner of the monitor associated with the underlying Java object referred to by obj. The thread decrements the counter indicating the number of times it has entered this monitor. If the value of the counter becomes zero, the current thread releases the monitor.

Native code must not use MonitorExit to exit a monitor entered through a synchronized method or a monitorenter Java virtual machine instruction.

LINKAGE:

Index 218 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

obj: a normal Java object or class object.

RETURNS:

Returns “0” on success; returns a negative value on failure.

EXCEPTIONS:

IllegalMonitorStateException: if the current thread does not own the monitor.

NIO Support

The NIO-related entry points allow native code to access java.nio direct buffers. The contents of a direct buffer can, potentially, reside in native memory outside of the ordinary garbage-collected heap. For information about direct buffers, please see New I/O APIs and the specification of the java.nio.ByteBuffer class.

Three new functions introduced in JDK/JRE 1.4 allow JNI code to create, examine, and manipulate direct buffers:
  • NewDirectByteBuffer
  • GetDirectBufferAddress
  • GetDirectBufferCapacity

Every implementation of the Java virtual machine must support these functions, but not every implementation is required to support JNI access to direct buffers. If a JVM does not support such access then the NewDirectByteBuffer and GetDirectBufferAddress functions must always return NULL, and the GetDirectBufferCapacity function must always return -1. If a JVM does support such access then these three functions must be implemented to return the appropriate values.

NewDirectByteBuffer

jobject NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity);

Allocates and returns a direct java.nio.ByteBuffer referring to the block of memory starting at the memory address address and extending capacity bytes.

Native code that calls this function and returns the resulting byte-buffer object to Java-level code should ensure that the buffer refers to a valid region of memory that is accessible for reading and, if appropriate, writing. An attempt to access an invalid memory location from Java code will either return an arbitrary value, have no visible effect, or cause an unspecified exception to be thrown.

LINKAGE:

Index 229 in the JNIEnv interface function table.

PARAMETERS:

env: the JNIEnv interface pointer

address: the starting address of the memory region (must not be NULL)

capacity: the size in bytes of the memory region (must be positive)

RETURNS:

Returns a local reference to the newly-instantiated java.nio.ByteBuffer object. Returns NULL if an exception occurs, or if JNI access to direct buffers is not supported by this virtual machine.

EXCEPTIONS:

OutOfMemoryError: if allocation of the ByteBuffer object fails

SINCE:

JDK/JRE 1.4

GetDirectBufferAddress

void* GetDirectBufferAddress(JNIEnv* env, jobject buf);

Fetches and returns the starting address of the memory region referenced by the given direct java.nio.Buffer.

This function allows native code to access the same memory region that is accessible to Java code via the buffer object.

LINKAGE:

Index 230 in the JNIEnv interface function table.

PARAMETERS:

env: the JNIEnv interface pointer

buf: a direct java.nio.Buffer object (must not be NULL)

RETURNS:

Returns the starting address of the memory region referenced by the buffer. Returns NULL if the memory region is undefined, if the given object is not a direct java.nio.Buffer, or if JNI access to direct buffers is not supported by this virtual machine.

SINCE:

JDK/JRE 1.4

GetDirectBufferCapacity

jlong GetDirectBufferCapacity(JNIEnv* env, jobject buf);

Fetches and returns the capacity of the memory region referenced by the given direct java.nio.Buffer. The capacity is the number of elements that the memory region contains.

LINKAGE:

Index 231 in the JNIEnv interface function table.

PARAMETERS:

env: the JNIEnv interface pointer

buf: a direct java.nio.Buffer object (must not be NULL)

RETURNS:

Returns the capacity of the memory region associated with the buffer. Returns -1 if the given object is not a direct java.nio.Buffer, if the object is an unaligned view buffer and the processor architecture does not support unaligned access, or if JNI access to direct buffers is not supported by this virtual machine.

SINCE:

JDK/JRE 1.4

Reflection Support

Programmers can use the JNI to call Java methods or access Java fields if they know the name and type of the methods or fields. The Java Core Reflection API allows programmers to introspect Java classes at runtime. JNI provides a set of conversion functions between field and method IDs used in the JNI to field and method objects used in the Java Core Reflection API.

FromReflectedMethod

jmethodID FromReflectedMethod(JNIEnv *env, jobject method);

Converts a java.lang.reflect.Method or java.lang.reflect.Constructor object to a method ID.

LINKAGE:

Index 7 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

FromReflectedField

jfieldID FromReflectedField(JNIEnv *env, jobject field);

Converts a java.lang.reflect.Field to a field ID.

LINKAGE:

Index 8 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

ToReflectedMethod

jobject ToReflectedMethod(JNIEnv *env, jclass cls,
   jmethodID methodID, jboolean isStatic);

Converts a method ID derived from cls to a java.lang.reflect.Method or java.lang.reflect.Constructor object. isStatic must be set to JNI_TRUE if the method ID refers to a static field, and JNI_FALSE otherwise.

Throws OutOfMemoryError and returns 0 if fails.

LINKAGE:

Index 9 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

ToReflectedField

jobject ToReflectedField(JNIEnv *env, jclass cls,
   jfieldID fieldID, jboolean isStatic);

Converts a field ID derived from cls to a java.lang.reflect.Field object. isStatic must be set to JNI_TRUE if fieldID refers to a static field, and JNI_FALSE otherwise.

Throws OutOfMemoryError and returns 0 if fails.

LINKAGE:

Index 12 in the JNIEnv interface function table.

SINCE:

JDK/JRE 1.2

Java VM Interface

GetJavaVM

jint GetJavaVM(JNIEnv *env, JavaVM **vm);

Returns the Java VM interface (used in the Invocation API) associated with the current thread. The result is placed at the location pointed to by the second argument, vm.

LINKAGE:

Index 219 in the JNIEnv interface function table.

PARAMETERS:

env: the JNI interface pointer.

vm: a pointer to where the result should be placed.

RETURNS:

Returns “0” on success; returns a negative value on failure.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JNI Types and Data Structures

Documentation Contents
Contents | Previous | Next

Chapter 3: JNI Types and Data Structures

This chapter discusses how the JNI maps Java types to native C types.

This chapter covers the following topics:

  • Primitive Types
  • Reference Types
  • Field and Method IDs
  • The Value Type
  • Type Signatures
  • Modified UTF-8 Strings

Primitive Types

The following table describes Java primitive types and their machine-dependent native equivalents.

Primitive Types and Native Equivalents
Java Type | Native Type | Description
boolean | jboolean | unsigned 8 bits
byte | jbyte | signed 8 bits
char | jchar | unsigned 16 bits
short | jshort | signed 16 bits
int | jint | signed 32 bits
long | jlong | signed 64 bits
float | jfloat | 32 bits
double | jdouble | 64 bits
void | void | not applicable

The following definition is provided for convenience.

#define JNI_FALSE  0
#define JNI_TRUE   1

The jsize integer type is used to describe cardinal indices and sizes:

typedef jint jsize;

Reference Types

The JNI includes a number of reference types that correspond to different kinds of Java objects. JNI reference types are organized in the following hierarchy:

  • jobject
    • jclass (java.lang.Class objects)
    • jstring (java.lang.String objects)
    • jarray (arrays)
      • jobjectArray (object arrays)
      • jbooleanArray (boolean arrays)
      • jbyteArray (byte arrays)
      • jcharArray (char arrays)
      • jshortArray (short arrays)
      • jintArray (int arrays)
      • jlongArray (long arrays)
      • jfloatArray (float arrays)
      • jdoubleArray (double arrays)
    • jthrowable (java.lang.Throwable objects)

In C, all other JNI reference types are defined to be the same as jobject. For example:

typedef jobject jclass;

In C++, JNI introduces a set of dummy classes to enforce the subtyping relationship. For example:

class _jobject {};
class _jclass : public _jobject {};
// ...
typedef _jobject *jobject;
typedef _jclass *jclass;

Field and Method IDs

Method and field IDs are regular C pointer types:

struct _jfieldID;              /* opaque structure */
typedef struct _jfieldID *jfieldID;   /* field IDs */

struct _jmethodID;              /* opaque structure */
typedef struct _jmethodID *jmethodID; /* method IDs */

The Value Type

The jvalue union type is used as the element type in argument arrays. It is declared as follows:

typedef union jvalue {
    jboolean z;
    jbyte    b;
    jchar    c;
    jshort   s;
    jint     i;
    jlong    j;
    jfloat   f;
    jdouble  d;
    jobject  l;
} jvalue;

Type Signatures

The JNI uses the Java VM’s representation of type signatures. The following table shows these type signatures.

Java VM Type Signatures
Type Signature | Java Type
Z | boolean
B | byte
C | char
S | short
I | int
J | long
F | float
D | double
L fully-qualified-class ; | fully-qualified-class
[ type | type[]
( arg-types ) ret-type | method type

For example, the Java method:

long f (int n, String s, int[] arr);

has the following type signature:

(ILjava/lang/String;[I)J

Modified UTF-8 Strings

The JNI uses modified UTF-8 strings to represent various string types. Modified UTF-8 strings are the same as those used by the Java VM. Modified UTF-8 strings are encoded so that character sequences that contain only non-null ASCII characters can be represented using only one byte per character, but all Unicode characters can be represented.

All characters in the range \u0001 to \u007F are represented by a single byte, as follows:

  • 0xxxxxxx

The seven bits of data in the byte give the value of the character represented.

The null character ('\u0000') and characters in the range '\u0080' to '\u07FF' are represented by a pair of bytes x and y:

  • x: 110xxxxx
  • y: 10yyyyyy

The bytes represent the character with the value ((x & 0x1f) << 6) + (y & 0x3f).

Characters in the range '\u0800' to '\uFFFF' are represented by 3 bytes x, y, and z:

  • x: 1110xxxx
  • y: 10yyyyyy
  • z: 10zzzzzz

The character with the value ((x & 0xf) << 12) + ((y & 0x3f) << 6) + (z & 0x3f) is represented by the bytes.

Characters with code points above U+FFFF (so-called supplementary characters) are represented by separately encoding the two surrogate code units of their UTF-16 representation. Each of the surrogate code units is represented by three bytes. This means, supplementary characters are represented by six bytes, u, v, w, x, y, and z:

  • u: 11101101
  • v: 1010vvvv
  • w: 10wwwwww
  • x: 11101101
  • y: 1011yyyy
  • z: 10zzzzzz

The character with the value 0x10000+((v&0x0f)<<16)+((w&0x3f)<<10)+(y&0x0f)<<6)+(z&0x3f) is represented by the six bytes.

The bytes of multibyte characters are stored in the class file in big-endian (high byte first) order.

There are two differences between this format and the standard UTF-8 format. First, the null character (char)0 is encoded using the two-byte format rather than the one-byte format. This means that modified UTF-8 strings never have embedded nulls. Second, only the one-byte, two-byte, and three-byte formats of standard UTF-8 are used. The Java VM does not recognize the four-byte format of standard UTF-8; it uses its own two-times-three-byte format instead.

For more information regarding the standard UTF-8 format, see section 3.9 Unicode Encoding Forms of The Unicode Standard, Version 4.0.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Invocation API

Documentation Contents
Contents | Previous

Chapter 5: The Invocation API

The Invocation API allows software vendors to load the Java VM into an arbitrary native application. Vendors can deliver Java-enabled applications without having to link with the Java VM source code.

This chapter begins with an overview of the Invocation API. This is followed by reference pages for all Invocation API functions. It covers the following topics:

  • Overview
    • Creating the VM
    • Attaching to the VM
    • Detaching from the VM
    • Unloading the VM
  • Library and Version Management
    • JNI_OnLoad
    • JNI_OnUnload
  • Invocation API Functions
    • JNI_GetDefaultJavaVMInitArgs
    • JNI_GetCreatedJavaVMs
    • JNI_CreateJavaVM
    • DestroyJavaVM
    • AttachCurrentThread
    • AttachCurrentThreadAsDaemon
    • DetachCurrentThread
    • GetEnv

Overview

The following code example illustrates how to use functions in the Invocation API. In this example, the C++ code creates a Java VM and invokes a static method, called Main.test. For clarity, we omit error checking.

    #include <jni.h>       /* where everything is defined */
    ...
    JavaVM *jvm;       /* denotes a Java VM */
    JNIEnv *env;       /* pointer to native method interface */
    JavaVMInitArgs vm_args; /* JDK/JRE 6 VM initialization arguments */
    JavaVMOption* options = new JavaVMOption[1];
    options[0].optionString = "-Djava.class.path=/usr/lib/java";
    vm_args.version = JNI_VERSION_1_6;
    vm_args.nOptions = 1;
    vm_args.options = options;
    vm_args.ignoreUnrecognized = false;
    /* load and initialize a Java VM, return a JNI interface
     * pointer in env */
    JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    delete options;
    /* invoke the Main.test method using the JNI */
    jclass cls = env->FindClass("Main");
    jmethodID mid = env->GetStaticMethodID(cls, "test", "(I)V");
    env->CallStaticVoidMethod(cls, mid, 100);
    /* We are done. */
    jvm->DestroyJavaVM();

This example uses three functions in the API. The Invocation API allows a native application to use the JNI interface pointer to access VM features. The design is similar to Netscape’s JRI Embedding Interface.

Creating the VM

The JNI_CreateJavaVM() function loads and initializes a Java VM and returns a pointer to the JNI interface pointer. The thread that called JNI_CreateJavaVM() is considered to be the main thread.

Attaching to the VM

The JNI interface pointer (JNIEnv) is valid only in the current thread. Should another thread need to access the Java VM, it must first call AttachCurrentThread() to attach itself to the VM and obtain a JNI interface pointer. Once attached to the VM, a native thread works just like an ordinary Java thread running inside a native method. The native thread remains attached to the VM until it calls DetachCurrentThread() to detach itself.

The attached thread should have enough stack space to perform a reasonable amount of work. The allocation of stack space per thread is operating system-specific. For example, using pthreads, the stack size can be specified in the pthread_attr_t argument to pthread_create.

Detaching from the VM

A native thread attached to the VM must call DetachCurrentThread() to detach itself before exiting. A thread cannot detach itself if there are Java methods on the call stack.

Unloading the VM

The JNI_DestroyJavaVM() function unloads a Java VM.

The VM waits until the current thread is the only non-daemon user thread before it actually unloads. User threads include both Java threads and attached native threads. This restriction exists because a Java thread or attached native thread may be holding system resources, such as locks, windows, and so on. The VM cannot automatically free these resources. By restricting the current thread to be the only running thread when the VM is unloaded, the burden of releasing system resources held by arbitrary threads is on the programmer.

Library and Version Management

Once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems:

  • A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader.
  • Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems.

Each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are:

  • Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders.
  • In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected.

To facilitate version control and resource management, JNI libraries optionally export the following two functions:

JNI_OnLoad

jint JNI_OnLoad(JavaVM *vm, void *reserved);

The VM calls JNI_OnLoad when the native library is loaded (for example, through System.loadLibrary). JNI_OnLoad must return the JNI version needed by the native library.

In order to use any of the new JNI functions, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the VM will unload the library and act as if the library was +never loaded.

JNI_Onload_L(JavaVM *vm, void *reserved);

If a library L is statically linked, then upon the first invocation of System.loadLibrary("L") or equivalent API, a JNI_OnLoad_L function will be invoked with the same arguments and expected return value as specified for the JNI_OnLoad function. JNI_OnLoad_L must return the JNI version needed by the native library. This version must be JNI_VERSION_1_8 or later. If the VM does not recognize the version number returned by JNI_OnLoad_L, the VM will act as if the library was never loaded.

LINKAGE:

Exported from native libraries that contain native method implementation.

JNI_OnUnload

void JNI_OnUnload(JavaVM *vm, void *reserved);

The VM calls JNI_OnUnload when the class loader containing the native library is garbage collected. This function can be used to perform cleanup operations. Because this function is called in an unknown context (such as from a finalizer), the programmer should be conservative on using Java VM services, and refrain from arbitrary Java call-backs.

Note that JNI_OnLoad and JNI_OnUnload are two functions optionally supplied by JNI libraries, not exported from the VM.

JNI_OnUnload_L(JavaVM *vm, void *reserved);

When the class loader containing a statically linked native library L is garbage collected, the VM will invoke the JNI_OnUnload_L function of the library if such a function is exported. This function can be used to perform cleanup operations. Because this function is called in an unknown context (such as from a finalizer), the programmer should be conservative on using Java VM services, and refrain from arbitrary Java call-backs.

Informational Note:

The act of loading a native library is the complete process of making the library and its native entry points known and registered to the Java VM and runtime. Note that simply performing operating system level operations to load a native library, such as dlopen on a UNIX(R) system, does not fully accomplish this goal. A native function is normally called from the Java class loader to perform a call to the host operating system that will load the library into memory and return a handle to the native library. This handle will be stored and used in subsequent searches for native library entry points. The Java native class loader will complete the load process once the handle is successfully returned to register the library.

LINKAGE:

Exported from native libraries that contain native method implementation.

Invocation API Functions

The JavaVM type is a pointer to the Invocation API function table. The following code example shows this function table.

typedef const struct JNIInvokeInterface *JavaVM;

const struct JNIInvokeInterface ... = {
    NULL,
    NULL,
    NULL,

    DestroyJavaVM,
    AttachCurrentThread,
    DetachCurrentThread,

    GetEnv,

    AttachCurrentThreadAsDaemon
};

Note that three Invocation API functions, JNI_GetDefaultJavaVMInitArgs(), JNI_GetCreatedJavaVMs(), and JNI_CreateJavaVM(), are not part of the JavaVM function table. These functions can be used without a preexisting JavaVM structure.

JNI_GetDefaultJavaVMInitArgs

jint JNI_GetDefaultJavaVMInitArgs(void *vm_args);

Returns a default configuration for the Java VM. Before calling this function, native code must set the vm_args->version field to the JNI version it expects the VM to support. After this function returns, vm_args->version will be set to the actual JNI version the VM supports.

LINKAGE:

Exported from the native library that implements the Java virtual machine.

PARAMETERS:

vm_args: a pointer to a JavaVMInitArgs structure in to which the default arguments are filled.

RETURNS:

Returns JNI_OK if the requested version is supported; returns a JNI error code (a negative number) if the requested version is not supported.

JNI_GetCreatedJavaVMs

jint JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen, jsize *nVMs);

Returns all Java VMs that have been created. Pointers to VMs are written in the buffer vmBuf in the order they are created. At most bufLen number of entries will be written. The total number of created VMs is returned in *nVMs.

Creation of multiple VMs in a single process is not supported.

LINKAGE:

Exported from the native library that implements the Java virtual machine.

PARAMETERS:

vmBuf: pointer to the buffer where the VM structures will be placed.

bufLen: the length of the buffer.

nVMs: a pointer to an integer.

RETURNS:

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

JNI_CreateJavaVM

jint JNI_CreateJavaVM(JavaVM **p_vm, void **p_env, void *vm_args);

Loads and initializes a Java VM. The current thread becomes the main thread. Sets the env argument to the JNI interface pointer of the main thread.

Creation of multiple VMs in a single process is not supported.

The second argument to JNI_CreateJavaVM is always a pointer to JNIEnv *, while the third argument is a pointer to a JavaVMInitArgs structure which uses option strings to encode arbitrary VM start up options:

typedef struct JavaVMInitArgs {
    jint version;

    jint nOptions;
    JavaVMOption *options;
    jboolean ignoreUnrecognized;
} JavaVMInitArgs;

The options field is an array of the following type:

typedef struct JavaVMOption {
    char *optionString;  /* the option as a string in the default platform encoding */
    void *extraInfo;
} JavaVMOption;

The size of the array is denoted by the nOptions field in JavaVMInitArgs. If ignoreUnrecognized is JNI_TRUE, JNI_CreateJavaVM ignore all unrecognized option strings that begin with "-X" or "_". If ignoreUnrecognized is JNI_FALSE, JNI_CreateJavaVM returns JNI_ERR as soon as it encounters any unrecognized option strings. All Java VMs must recognize the following set of standard options:

Standard Options
optionString | meaning
-D<name>=<value> | Set a system property
-verbose[:class|gc|jni] | Enable verbose output. The options can be followed by a comma-separated list of names indicating what kind of messages will be printed by the VM. For example, "-verbose:gc,class" instructs the VM to print GC and class loading related messages. Standard names include: gc, class, and jni. All nonstandard (VM-specific) names must begin with "X".
vfprintf | extraInfo is a pointer to the vfprintf hook.
exit | extraInfo is a pointer to the exit hook.
abort | extraInfo is a pointer to the abort hook.

In addition, each VM implementation may support its own set of non-standard option strings. Non-standard option names must begin with "-X" or an underscore ("_"). For example, the JDK/JRE supports -Xms and -Xmx options to allow programmers specify the initial and maximum heap size. Options that begin with "-X" are accessible from the "java" command line.

Here is the example code that creates a Java VM in the JDK/JRE:

JavaVMInitArgs vm_args;
JavaVMOption options[4];

options[0].optionString = "-Djava.compiler=NONE";           /* disable JIT */
options[1].optionString = "-Djava.class.path=c:\myclasses"; /* user classes */
options[2].optionString = "-Djava.library.path=c:\mylibs";  /* set native library path */
options[3].optionString = "-verbose:jni";                   /* print JNI-related messages */

vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 4;
vm_args.ignoreUnrecognized = TRUE;

/* Note that in the JDK/JRE, there is no longer any need to call
 * JNI_GetDefaultJavaVMInitArgs.
 */
res = JNI_CreateJavaVM(&vm, (void **)&env, &vm_args);
if (res < 0) ...

LINKAGE:

Exported from the native library that implements the Java virtual machine.

PARAMETERS:

p_vm: pointer to the location where the resulting VM structure will be placed.

p_env: pointer to the location where the JNI interface pointer for the main thread will be placed.

vm_args: Java VM initialization arguments.

RETURNS:

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

DestroyJavaVM

jint DestroyJavaVM(JavaVM *vm);

Unloads a Java VM and reclaims its resources.

Any thread, whether attached or not, can invoke this function. If the current thread is attached, the VM waits until the current thread is the only non-daemon user-level Java thread. If the current thread is not attached, the VM attaches the current thread and then waits until the current thread is the only non-daemon user-level thread.

LINKAGE:

Index 3 in the JavaVM interface function table.

PARAMETERS:

vm: the Java VM that will be destroyed.

RETURNS:

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

Unloading of the VM is not supported.

AttachCurrentThread

jint AttachCurrentThread(JavaVM *vm, void **p_env, void *thr_args);

Attaches the current thread to a Java VM. Returns a JNI interface pointer in the JNIEnv argument.

Trying to attach a thread that is already attached is a no-op.

A native thread cannot be attached simultaneously to two Java VMs.

When a thread is attached to the VM, the context class loader is the bootstrap loader.

LINKAGE:

Index 4 in the JavaVM interface function table.

PARAMETERS:

vm: the VM to which the current thread will be attached.

p_env: pointer to the location where the JNI interface pointer of the current thread will be placed.

thr_args: can be NULL or a pointer to a JavaVMAttachArgs structure to specify additional information:

The second argument to AttachCurrentThread is always a pointer to JNIEnv. The third argument to AttachCurrentThread was reserved, and should be set to NULL.

You pass a pointer to the following structure to specify additional information:

typedef struct JavaVMAttachArgs {
    jint version;
    char *name;    /* the name of the thread as a modified UTF-8 string, or NULL */
    jobject group; /* global ref of a ThreadGroup object, or NULL */
} JavaVMAttachArgs

RETURNS:

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

AttachCurrentThreadAsDaemon

jint AttachCurrentThreadAsDaemon(JavaVM* vm, void** penv, void* args);

Same semantics as AttachCurrentThread, but the newly-created java.lang.Thread instance is a daemon.

If the thread has already been attached via either AttachCurrentThread or AttachCurrentThreadAsDaemon, this routine simply sets the value pointed to by penv to the JNIEnv of the current thread. In this case neither AttachCurrentThread nor this routine have any effect on the daemon status of the thread.

LINKAGE:

Index 7 in the JavaVM interface function table.

PARAMETERS:

vm: the virtual machine instance to which the current thread will be attached.

penv: a pointer to the location in which the JNIEnv interface pointer for the current thread will be placed.

args: a pointer to a JavaVMAttachArgs structure.

RETURNS

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

EXCEPTIONS

None.

DetachCurrentThread

jint DetachCurrentThread(JavaVM *vm);

Detaches the current thread from a Java VM. All Java monitors held by this thread are released. All Java threads waiting for this thread to die are notified.

The main thread can be detached from the VM.

LINKAGE:

Index 5 in the JavaVM interface function table.

PARAMETERS:

vm: the VM from which the current thread will be detached.

RETURNS:

Returns JNI_OK on success; returns a suitable JNI error code (a negative number) on failure.

GetEnv

jint GetEnv(JavaVM *vm, void **env, jint version);

LINKAGE:

Index 6 in the JavaVM interface function table.

PARAMETERS:

vm: The virtual machine instance from which the interface will be retrieved.
env: pointer to the location where the JNI interface pointer for the current thread will be placed.
version: The requested JNI version.

RETURNS:

If the current thread is not attached to the VM, sets *env to NULL, and returns JNI_EDETACHED. If the specified version is not supported, sets *env to NULL, and returns JNI_EVERSION. Otherwise, sets *env to the appropriate interface, and returns JNI_OK.

Contents | Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure Interface Pointer

Link to Figure Interface Pointer

This figure consists of three elements appearing from left to right, as well as three ovals labeled "an interface function":

  • Text: "JNI interface pointer"
  • Table of one column and two rows:
    • First row: "Pointer"
    • Second row: "per-thread JNI data structure"
  • Table of one column and four rows titled "Array of pointers to JNI functions":
    • First row: "Pointer." An arrow points from this table cell to an oval labeled "an interface function." No other arrows point to this oval.
    • Second row: "Pointer." An arrow points from this table cell to an oval labeled "an interface function." No other arrows point to this oval.
    • Third row: "Pointer." An arrow points from this table cell to an oval labeled "an interface function." No other arrows point to this oval.
    • Fourth row: "..." (an ellipsis)

Arrows connect these three elements:

  • From the text "JNI interace pointer" to the table cell "Pointer" from the table of one column and two rows
  • From the table cell "Pointer" from the table of one column and two rows to the first row (with the text "Pointer") of the table "Array of pointers to JNI functions"
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Debug Wire Protocol

Protocol details

Overview

The Java Debug Wire Protocol (JDWP) is the protocol used for communication between a debugger and the Java virtual machine (VM) which it debugs (hereafter called the target VM). JDWP is optional; it might not be available in some implementations of the JDK. The existence of JDWP can allow the same debugger to work

  • in a different process on the same computer, or
  • on a remote computer,

The JDWP differs from many protocol specifications in that it only details format and layout, not transport. A JDWP implementation can be designed to accept different transport mechanisms through a simple API. A particular transport does not necessarily support each of the debugger/target VM combinations listed above.

The JDWP is designed to be simple enough for easy implementation, yet it is flexible enough for future growth.

Currently, the JDWP does not specify any mechanism for transport rendezvous or any directory services. This may be changed in the future, but it may be addressed in a separate document.

JDWP is one layer within the Java Platform Debugger Architecture (JPDA). This architecture also contains the higher-level Java Debug Interface (JDI). The JDWP is designed to facilitate efficient use by the JDI; many of its abilities are tailored to that end. The JDI is more appropriate than JDWP for many debugger tools, particularly those written in the Java programming language. For more information on the Java Platform Debugger Architecture, see the Java Platform Debugger Architecture documentation for this release.

JDWP Start Up

After the transport connection is established and before any packets are sent, a handshake occurs between the two sides of the connection:

The handshake process has the following steps:

  • The debugger side sends 14 bytes to the VM side, consisting of the 14 ASCII characters of the string "JDWP-Handshake".
  • The VM side replies with the same 14 bytes: JDWP-Handshake

JDWP Packets

The JDWP is packet based and is not stateful. There are two basic packet types: command packets and reply packets.

Command packets may be sent by either the debugger or the target VM. They are used by the debugger to request information from the target VM, or to control program execution. Command packets are sent by the target VM to notify the debugger of some event in the target VM such as a breakpoint or exception.

A reply packet is sent only in response to a command packet and always provides information success or failure of the command. Reply packets may also carry data requested in the command (for example, the value of a field or variable). Currently, events sent from the target VM do not require a response packet from the debugger.

The JDWP is asynchronous; multiple command packets may be sent before the first reply packet is received.

Command and reply packet headers are equal in size; this is to make transports easier to implement and abstract. The layout of each packet looks like this:

Command Packet
  • Header
    • length (4 bytes)
    • id (4 bytes)
    • flags (1 byte)
    • command set (1 byte)
    • command (1 byte)
  • data (Variable)
Reply Packet
  • Header
    • length (4 bytes)
    • id (4 bytes)
    • flags (1 byte)
    • error code (2 bytes)
  • data (Variable)

All fields and data sent via JDWP should be in big-endian format. (See the Java Virtual Machine Specification for the definition of big-endian.) The first three fields are identical in both packet types.

Command and Reply Packet Fields

Shared Header Fields

length
The length field is the size, in bytes, of the entire packet, including the length field. The header size is 11 bytes, so a packet with no data would set this field to 11.
id
The id field is used to uniquely identify each packet command/reply pair. A reply packet has the same id as the command packet to which it replies. This allows asynchronous commands and replies to be matched. The id field must be unique among all outstanding commands sent from one source. (Outstanding commands originating from the debugger may use the same id as outstanding commands originating from the target VM.) Other than that, there are no requirements on the allocation of id's.

A simple monotonic counter should be adequate for most implementations. It will allow 2^32 unique outstanding packets and is the simplest implementation alternative.

flags
Flags are used to alter how any command is queued and processed and to tag command packets that originate from the target VM. There is currently one flag bits defined; future versions of the protocol may define additional flags.
0x80
Reply packet

The reply bit, when set, indicates that this packet is a reply.

Command Packet Header Fields

command set
This field is useful as a means for grouping commands in a meaningful way. The Sun defined command sets are used to group commands by the interfaces they support in the JDI. For example, all commands that support the JDI VirtualMachine interface are grouped in a VirtualMachine command set.

The command set space is roughly divided as follows:

0 - 63
Sets of commands sent to the target VM
64 - 127
Sets of commands sent to the debugger
128 - 256
Vendor-defined commands and extensions.
command
This field identifies a particular command in a command set. This field, together with the command set field, is used to indicate how the command packet should be processed. More succinctly, they tell the receiver what to do. Specific commands are presented later in this document.

Reply Packet Header Fields

error code
This field is used to indicate if the command packet that is being replied too was successfully processed. A value of zero indicates success, a non-zero value indicates an error. The error code returned may be specific to each command set/command, but it is often mapped to a JVM TI error code.

Data

The data field is unique to each command set/command. It is also different between command and reply packet pairs. For example, a command packet that requests a field value will contain references to the object and field id's for the desired value in its data field. The reply packet's data field will contain the value of the field.

Detailed Command Information

In general, the data field of a command or reply packet is an abstraction of a group of multiple fields that define the command or reply data. Each subfield of a data field is encoded in big endian (Java) format. The detailed composition of data fields for each command and its reply are described in this section.

There is a small set of common data types that are common to many of the different JDWP commands and replies. They are described below.

Name | Size | Description
byte | 1 byte | A byte value.
boolean | 1 byte | A boolean value, encoded as 0 for false and non-zero for true.
int | 4 bytes | An four-byte integer value. The integer is signed unless explicitly stated to be unsigned.
long | 8 bytes | An eight-byte integer value. The value is signed unless explicitly stated to be unsigned.
objectID Target VM-specific, up to 8 bytes (see below) Uniquely identifies an object in the target VM. A particular object will be identified by exactly one objectID in JDWP commands and replies throughout its lifetime (or until the objectID is explicitly disposed). An ObjectID is not reused to identify a different object unless it has been explicitly disposed, regardless of whether the referenced object has been garbage collected. An objectID of 0 represents a null object.

Note that the existence of an object ID does not prevent the garbage collection of the object. Any attempt to access a a garbage collected object with its object ID will result in the INVALID_OBJECT error code. Garbage collection can be disabled with the DisableCollection command, but it is not usually necessary to do so.
tagged-objectID | size of objectID plus one byte | The first byte is a signature byte which is used to identify the object's type. See JDWP.Tag for the possible values of this byte (note that only object tags, not primitive tags, may be used). It is followed immediately by the objectID itself.
threadID | same as objectID | Uniquely identifies an object in the target VM that is known to be a thread
threadGroupID | same as objectID | Uniquely identifies an object in the target VM that is known to be a thread group
stringID | same as objectID | Uniquely identifies an object in the target VM that is known to be a string object. Note: this is very different from string, which is a value.
classLoaderID | same as objectID | Uniquely identifies an object in the target VM that is known to be a class loader object
classObjectID | same as objectID | Uniquely identifies an object in the target VM that is known to be a class object.
arrayID | same as objectID | Uniquely identifies an object in the target VM that is known to be an array.
referenceTypeID | same as objectID | Uniquely identifies a reference type in the target VM. It should not be assumed that for a particular class, the classObjectID and the referenceTypeID are the same. A particular reference type will be identified by exactly one ID in JDWP commands and replies throughout its lifetime A referenceTypeID is not reused to identify a different reference type, regardless of whether the referenced class has been unloaded.
classID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be a class type.
interfaceID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be an interface type.
arrayTypeID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be an array type.
methodID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a method in some class in the target VM. The methodID must uniquely identify the method within its class/interface or any of its subclasses/subinterfaces/implementors. A methodID is not necessarily unique on its own; it is always paired with a referenceTypeID to uniquely identify one method. The referenceTypeID can identify either the declaring type of the method or a subtype.
fieldID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a field in some class in the target VM. The fieldID must uniquely identify the field within its class/interface or any of its subclasses/subinterfaces/implementors. A fieldID is not necessarily unique on its own; it is always paired with a referenceTypeID to uniquely identify one field. The referenceTypeID can identify either the declaring type of the field or a subtype.
frameID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a frame in the target VM. The frameID must uniquely identify the frame within the entire VM (not only within a given thread). The frameID need only be valid during the time its thread is suspended.
location Target VM specific An executable location. The location is identified by one byte type tag followed by a a classID followed by a methodID followed by an unsigned eight-byte index, which identifies the location within the method. Index values are restricted as follows:
  • The index of the start location for the method is less than all other locations in the method.
  • The index of the end location for the method is greater than all other locations in the method.
  • If a line number table exists for a method, locations that belong to a particular line must fall between the line's location index and the location index of the next line in the table.
Index values within a method are monotonically increasing from the first executable point in the method to the last. For many implementations, each byte-code instruction in the method has its own index, but this is not required.

The type tag is necessary to identify whether location's classID identifies a class or an interface. Almost all locations are within classes, but it is possible to have executable code in the static initializer of an interface.
string | Variable | A UTF-8 encoded string, not zero terminated, preceded by a four-byte integer length.
value | Variable | A value retrieved from the target VM. The first byte is a signature byte which is used to identify the type. See JDWP.Tag for the possible values of this byte. It is followed immediately by the value itself. This value can be an objectID (see Get ID Sizes) or a primitive value (1 to 8 bytes). More details about each value type can be found in the next table.
untagged-value | Variable | A value as described above without the signature byte. This form is used when the signature information can be determined from context.
arrayregion | Variable | A compact representation of values used with some array operations. The first byte is a signature byte which is used to identify the type. See JDWP.Tag for the possible values of this byte. Next is a four-byte integer indicating the number of values in the sequence. This is followed by the values themselves: Primitive values are encoded as a sequence of untagged-values; Object values are encoded as a sequence of values.

Object ids, reference type ids, field ids, method ids, and frame ids may be sized differently in different target VM implementations. Typically, their sizes correspond to size of the native identifiers used for these items in JNI and JVMDI calls. The maximum size of any of these types is 8 bytes. The "idSizes" command in the VirtualMachine command set is used by the debugger to determine the size of each of these types.

If a debuggee receives a Command Packet with a non-implemented or non-recognized command set or command then it returns a Reply Packet with the error code field set to NOT_IMPLEMENTED (see Error Constants).

Protocol details

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Debug Wire Protocol Transport Interface

Documentation Contents

Java Debug Wire Protocol Transport Interface (jdwpTransport)

A transport is implemented as a series of functions in a dynamic library (sometimes called a DLL, or shared library). The library exports an onload function that is invoked by the JDWP (or other) agent at startup-time.

Like JVMTI, jdwpTransport functions are accessed through an interface pointer called the environment pointer. An environment pointer is a pointer to an environment and has type jdwpTransportEnv*. The environment pointer is returned to the JDWP (or other) agent from the onload function.

A transport may support a single environment or it may support multiple environments. In other words, a transport may be used by only one, or multiple agents at the same time. If a transport supports multiple environments then each call to the onload function will return a new environment pointer. If a transport only supports a single environment then second, and subsequent calls to the onload function will return an error.

A transport is thread-safe and jdwpTransport functions can be used by multiple concurrent threads. For example, one thread may be blocked in the jdwpTransport ReadPacket function waiting for a packet while another thread invokes WritePacket function to write a packet.

In most cases jdwpTransport functions return a jdwpTransportError value indicating return status. Some functions return additional values through pointers provided by the calling function. In cases where the return values are allocated by a jdwpTransport function then the function will use the memory allocation routine specified by the agent. The memory allocation routines are specified to the transport, at start-up, via the onload function.

In the event of an error (that is, one of the jdwpTransport functions returns a value other than JDWPTRANSPORT_ERROR_NONE) then a string representing the error can be subsequently obtained through a call to the jdwpTransport function GetLastError. Errors are recorded on a per-thread basis. The GetLastError function will return a string represetning the last error that was encountered by the current thread only.

Developing a Transport implementation

A transport library can be developed in any native language that supports C language calling conventions and C or C++ definitions.

The function, data type, and constant definitions needed for using the jdwpTransport interface are defined in the include file jdwpTransport.h. To use these definitions add the Java SE include directory to your include path :-

#include "jdwpTransport.h"

Transport Start-Up

The transport library must export an onload function with the following prototype :-

JNIEXPORT jint JNICALL
jdwpTransport_OnLoad(JavaVM *jvm,
                     jdwpTransportCallback *callback,
                     jint version,
                     jdwpTransportEnv** env);

This function will be called by the JDWP (or other agent) when the library is loaded.

The jvm argument is the JNI invocation interface obtained by agent by invoking JNI's GetJavaVM function.

The callback argument is a pointer to a function table of memory management routines that the transport must use to allocate the memory for return values that are allocated by the transport implementation :-

typedef struct jdwpTransportCallback {
    void* (*alloc)(jint numBytes);
    void (*free)(void *buffer);
} jdwpTransportCallback;

The lifespan of the callback argument is the onload function and therefore the transport must take a copy of the function table in the jdwpTransport_OnLoad function.

The function table has two entries. The alloc function allocates an area of memory. It has a single argument to specify the number of bytes to allocate. It returns a pointer to the begining of the allocated memory, or NULL if the memory request cannot be honored. If the number of bytes requested is zero then NULL is returned. The free function deallocates an area of memory that was previously allocated using the alloc function.

The memory management functions provided by the agent are thread safe and the transport implementation is not required to synchronize calls to the these functions. The implementation of the memory management functions are guaranteed not to call any jdwpTransport function.

version is the version of the transport interface that the agent expects. This must be specified as JDWPTRANSPORT_VERSION_1_0.

env is a pointer to the environment pointer returned by the function.

The jdwpTransport_OnLoad function returns JNI_OK if the transport initializes successfully. If initialization fails then one of the following errors is returned :

JNI_ENOMEM
JNI_EVERSION
JNI_EEXIST

JNI_ENOMEM is returned if there is insufficient memory to complete initialization.

JNI_EVERSION is returned if the version in the version argument is not JDWPTRANSPORT_VERSION_1_0.

JNI_EEXIST is returned if the transport only supports a single environment, and the environment pointer was previously returned by the first call to the onload function.

Functions

The jdwpTransport functions fall into these categories:

  • Connection Management
    • Attach
    • StartListening
    • StopListening
    • Accept
    • IsOpen
    • Close
  • I/O Functions
    • ReadPacket
    • WritePacket
  • Miscellaneous Functions
    • GetLastError
    • Get Capabilities

Connection Management

The connection management functions are used to establish and close the connection to the debugger. A connection provides a reliable flow of JDWP packets to and from the debugger. Packets written to a connection are read, by the debugger, in exactly the order in which they were written. Similarly, any packets written to the connection by the debugger are read in the order in which they were written.

Connections are established either actively or passively. Establishing the connection actively means that the jdwpTransport's Attach function is called to initiate the connection the debugger. Establishing the connection passively means that the jdwpTransport's StartListening function is used to put the transport into listen mode so that it listens for a connection from a debugger. Once in listen mode the Accept function is used to accept the connection. Irrespective of how the connection is established the Close function is used to close the connection, and IsOpen is used to test if a connection is open to the debugger.

Attach

jdwpTransportError
Attach(jdwpTransportEnv* env, const char* address,
       jlong attachTimeout, jlong handshakeTimeout)

Attaches to the debugger. Attaching to the debugger involves two steps. First, a connection is established to the specified address. Once a connection is established a handshake is performed to ensure that the connection is indeed established to a debugger. Handshaking involves the exchange of ASCII string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.

The address argument is a pointer to a string representing the address of the debugger. The exact format is specific to the transport (In the case of a TCP/IP based transport the address may include the hostname and port number of the debugger. In the case of a transport that supports connections through a serial port it might be the device name of the serial port).

The attachTimeout argument specifies a timeout to use when attaching. If the transport supports an attach timeout (see GetCapabilities) and if the attachTimeout is positive then it specifies the timeout, in milliseconds (more or less), to use when attaching to the debugger. If the transport does not support an attach timeout, or if attachTimeout is specified as zero then a timeout is not used when attaching.

The handshakeTimeout argument specifies a timeout to use when handshaking with the debugger. If the transport supports a handshake timeout (see GetCapabilities) and if the handshakeTimeout is positive then it specifies the timeout, in milliseconds (more or less), to use when handshaking with the debugger. The exact usage of the handshake timeout is specific to the transport - for example one implementation may use the timeout as an inter-character timeout while waiting for the JDWP-Handshake message from the debugger. Another implementation may use the timeout to indicate the total duration allowed for the handshake exchange. In general the purpose of the handshake timeout is to allow for error handling in the event that the transport connects to something other than a valid debugger. If the transport does not support a handshake timeout, or if the handshakeTimeout is specified as zero then a timeout is not used when handshaking.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT
JDWPTRANSPORT_ERROR_ILLEGAL_STATE
JDWPTRANSPORT_ERROR_IO_ERROR
JDWPTRANSPORT_ERROR_TIMEOUT

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT is returned if address is invalid or timeout is negative.

JDWPTRANSPORT_ERROR_ILLEGAL_STATE is returned if the transport is currently in listen mode (see StartListening), or there is already an open connection to the debugger (see IsOpen).

JDWPTRANSPORT_ERROR_IO_ERROR is returned if there is an error (other than an attach timeout) attaching to the debugger. Note that errors during the start-up handshake (including a handshake timeout) are considered I/O errors. I/O errors are specific to the transport. GetLastError can be used to obtain a string representation of the error.

JDWPTRANSPORT_ERROR_TIMEOUT is returned if the transport supports an attach timeout, and if the attachTimeout value is positive, and if the connection to the debugger cannot be established within that attachTimeout period.

StartListening

jdwpTransportError
StartListening(jdwpTransportEnv* env, const char* address, char** actualAddress);

Puts the transport into listen mode to listen for a connection from a debugger.

The address argument is a pointer to a string representing the local address that the transport should listen on. The exact format is specific to the transport (In the case of a TCP/IP based transport the address might a local TCP port number. In the case of a transport that supports connections through a serial port it might be the device name of a serial port). The address argument can be specified as NULL or as an empty string (first character is \0). In that case the transport listens on a default address that is specific to the transport.

If actualAddress is not NULL then it is set to the address of a string returned by the StartListening function. The returned string will contain the string representation of the address that the transport is listening on. This may, or may not, differ from the address provided in the address argument. The string is allocated using the allocation callback provided to the transport when the jdwpTransport_OnLoad function was called. The caller is responsible for freeing the returned string.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT
JDWPTRANSPORT_ERROR_ILLEGAL_STATE
JDWPTRANSPORT_ERROR_IO_ERROR

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT is returned if address is invalid.

JDWPTRANSPORT_ERROR_ILLEGAL_STATE is returned if there is already an open connection to a debugger (see IsOpen), or the transport is already in listen mode.

JDWPTRANSPORT_ERROR_IO_ERROR is returned if there is an error putting the transport into listen mode. The nature of the error is specific to the transport. GetLastError can be used to obtain a string representing the error.

StopListening

jdwpTransportError
StopListening(jdwpTransportEnv* env)

Takes the transport out of listen mode so that it's no longer listening for connections from a debugger.

If the transport is in listen mode then it will be taken out of this mode. If there is an open (see IsOpen) connection to a debugger then it is unaffected by this function. In other words, StopListening does not close a connection to the debugger. If the transport is not in listen mode then this function does nothing and no error is returned.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_IO_ERROR

JDWPTRANSPORT_ERROR_IO_ERROR is returned if there is an error taking the transport out of listen mode. The nature of the error is specific to the transport. GetLastError can be used to obtain a string representing the error.

Accept

jdwpTransportError
Accept(jdwpTransportEnv* env, jlong acceptTimeout, jlong handshakeTimeout)

Accepts a connection from a debugger. Accepting a connection from a debugger involves two steps. Firstly, a connection is established by the debugger. Once a connection is established a handshake is performed to ensure that the connection was indeed established by a debugger. Handshaking involves the exchange of ASCII string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.

The acceptTimeout argument specifies the timeout to use while waiting for the debugger to connect. If the transport supports an accept timeout (see GetCapabilities) and if the acceptTimeout is positive then it specifies the timeout, in milliseconds (more or less), to use when waiting for a connection from a debugger. If the transport does not support an accept timeout, or if timeout is specified as zero then block indefinitely waiting for a connection.

The handshakeTimeout argument specifies a timeout to use when handshaking with the debugger. If the transport supports a handshake timeout (see GetCapabilities) and if the handshakeTimeout is positive then it specifies the timeout, in milliseconds (more or less), to use when handshaking with the debugger. The exact usage of the handshake timeout is specific to the transport - for example one implementation may use the timeout as an inter-character timeout while waiting for the JDWP-Handshake message from the debugger. Another implementation may use the timeout to indicate the total duration allowed for the handshake exchange. In general the purpose of the handshake timeout is to allow for error handling in the event that something other than a debugger establishes a connection to the debuggee. If the transport does not support a handshake timeout, or if the handshakeTimeout is specified as zero then a timeout is not used when handshaking.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT
JDWPTRANSPORT_ERROR_ILLEGAL_STATE
JDWPTRANSPORT_ERROR_IO_ERROR
JDWPTRANSPORT_ERROR_TIMEOUT

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT is returned if attachTimeout or handshakeTimeout is negative.

JDWPTRANSPORT_ERROR_ILLEGAL_STATE is returned if there is already an open connection to a debugger (see IsOpen), or if the transport is not in listen mode (see StartListening).

JDWPTRANSPORT_ERROR_IO_ERROR is returned if there is an error (other than an accept timeout) while accepting a connection from a debugger. Note that errors during the start-up handshake (including a handshake timeout) are considered I/O errors. The nature of the error is specific to the transport. GetLastError can be used to obtain a string representing the error.

JDWPTRANSPORT_ERROR_TIMEOUT is returned if the transport supports an accept timeout, and if the acceptTimeout value is positive, and if the connection to the debugger cannot be established within that timeout period.

Note: A thread that is blocked in Accept waiting for a connection from a debugger can be interrupted by another thread calling StopListening. In that case the thread that called Accept will return JDWPTRANSPORT_ERROR_IO_ERROR indicating an I/O error has occurred. If a thread blocked in Accept has accepted a connection and is in the process of handshaking with the debugger then StopListening will not interrupt the connection.

IsOpen

jboolean
isOpen(jdwpTransportEnv* env)

Tells whether or not there is a connection open to a debugger.

Returns JNI_TRUE if, and only if, there is an open connection to a debugger. Otherwise it returns JNI_FALSE.

Close

jdwpTransportError
Close(jdwpTransportEnv* env)

Closes an open connection to a debugger.

If there isn't an open connection to a debugger (see IsOpen) then this function does nothing and no error is returned.

If there are threads blocked in any I/O functions (namely, ReadPacket and WritePacket), then these I/O functions will be interrupted by the close and will return an JDWPTRANSPORT_ERROR_IO_ERROR indicating an I/O error has occurred.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_IO_ERROR

JDWPTRANSPORT_ERROR_IO_ERROR is returned if there is an error closing the connection. The nature of the error is specific to the transport. GetLastError can be used to obtain a string representing the error.

I/O Functions

The I/O functions are used for reading and writing JDWP packets from and to the debugger.

ReadPacket

typedef struct {
    jint len;
    jint id;
    jbyte flags;
    jbyte cmdSet;
    jbyte cmd;
    jbyte *data;
} jdwpCmdPacket;

typedef struct {
    jint len;
    jint id;
    jbyte flags;
    jshort errorCode;
    jbyte *data;
} jdwpReplyPacket;

typedef struct jdwpPacket {
    union {
        jdwpCmdPacket cmd;
        jdwpReplyPacket reply;
    } type;
} jdwpPacket;

jdwpTransportError
ReadPacket(jdwpTransportEnv* env, jdwpPacket* packet)

Reads a JDWP packet from an open connection to a debugger.

This function does a blocking read on an open connection. It blocks indefinitely until a complete JDWP packet can be returned, or in the case of a transport based on a stream-oriented protocol, end-of-stream is encountered.

The packet argument is the address of a jdwpPacket structure that is populated by this function. The packet.type.cmd.len or packet.type.reply.len field (depending on if the packet is a command or reply packet) is populated with the length of the packet. If end of stream is encountered the length field will be set to 0 and all other fields in the packet will be undefined. If end of stream is encountered after reading some, but not all, bytes of a packet it is considered an I/O error and JDWPTRANSPORT_ERROR_IO_ERROR will be returned. In that case the length field will not be populated. When an entire packet is read then all fields in the packet are populated with values in host order. This may, or may not, differ from the big endian order require when transmitting JDWP packets.

The packet.type.cmd.data or packet.type.reply.data field (depending on if the packet is a command or reply packet) will be populated with NULL or a pointer to the packet data allocated by this function. Packet data is allocated using the allocation callback provided to the transport when the jdwpTransport_OnLoad function was called. The caller is responsible to free it. The layout of the packet data (that is the data following the header, if any) is returned to the caller in the byte ordering in which it was received.

The ReadPacket function does not do any integrity checking on the returned packet except checking that the length of the packet (as indicated by the first 4 bytes) is >= 11 bytes. If the length field is less than 11 bytes then JDWPTRANSPORT_ERROR_IO_ERROR is returned.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_IO_ERROR
JDWPTRANSPORT_ERROR_ILLEGAL_STATE
JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT

JDWPTRANSPORT_ERROR_IO_ERROR is returned if an I/O error occurs when reading, the connection is closed asynchronously by another thread calling the Close function, or a badly formed packet (length field less than 11 bytes) is received. I/O errors are specific to the transport. GetLastError can be used to obtain a string representing the error.

JDWPTRANSPORT_ERROR_ILLEGAL_STATE is returned if there isn't an open connection to a debugger (see IsOpen).

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT is returned if packet is NULL

WritePacket

jdwpTransportError
WritePacket(jdwpTransportEnv* env, const jdwpPacket* packet)

Writes a JDWP packet to an open connection.

The packet argument is a pointer to a jdwpPacket structure. All fields in the packet header must be stored in host order. The packet data field (packet.type.cmd.data or packet.type.reply.data) must be NULL, or a pointer to a location containing packet data that immediately follows the header. The packet data is must be in network order (big endian) ready for transmission.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT
JDWPTRANSPORT_ERROR_IO_ERROR
JDWPTRANSPORT_ERROR_ILLEGAL_STATE

JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT if packet is NULL, or if the packet length field (packet.type.cmd.len or packet.type.reply.len) is less than 11, or it is greater than 11 but the packet data field (packet.type.cmd.data or packet.type.reply.data) is NULL.

JDWPTRANSPORT_ERROR_IO_ERROR is returned if an I/O error occurs when writing, or the connection is closed asynchronously by another thread calling the Close function. I/O errors are specific to the transport. GetLastError can be used to obtain a string representing the error.

JDWPTRANSPORT_ERROR_ILLEGAL_STATE is returned if there isn't an open connection to a debugger (see IsOpen).

Miscellaneous Functions

GetLastError

jdwpTransportError
GetLastError(jdwpTransportEnv* env, char** msg);

Returns the string representation of the last error.

When an error occurs it is recorded on a per-thread basis. A subsequent call to GetLastError returns the string representation of the last I/O error.

The msg argument is a pointer to a null-terminated string returned by this function. The string is allocated using the allocation callback provided to the transport when the jdwpTransport_OnLoad function was called. The caller is responsible to free the returned string.

This function returns a universal error or one of the following errors:

JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE

JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE is returned if this thread has not encountered an I/O error or there isn't a string representation of the last error available.

GetCapabilities

typedef struct {
    unsigned int can_timeout_attach     :1;
    unsigned int can_timeout_accept     :1;
    unsigned int can_timeout_handshake  :1;
    unsigned int reserved3              :1;
    unsigned int reserved4              :1;
    unsigned int reserved5              :1;
    unsigned int reserved6              :1;
    unsigned int reserved7              :1;
    unsigned int reserved8              :1;
    unsigned int reserved9              :1;
    unsigned int reserved10             :1;
    unsigned int reserved11             :1;
    unsigned int reserved12             :1;
    unsigned int reserved13             :1;
    unsigned int reserved14             :1;
    unsigned int reserved15             :1;
} JDWPTransportCapabilities;

jdwpTransportError
GetCapabilities(jdwpTransportEnv* env, JDWPTransportCapabilities* capabilitiesPtr)

Returns via capabilitiesPtr the optional jdwpTransport features supported by this transport. The capabilities structure contains a number of boolean flags indicating whether the named feature is supported. The current set of flags is:

Boolean Flag | Meaning
can_timeout_attach | Indicates if the transport supports attaching with a timeout
can_timeout_accept | Indicates if the transport supports an accept timeout
can_timeout_handshake | Indicates if the transport supports a timeout when performing the initial handshake with the debugger when the connection is established

This function does not return any errors.

Universal Errors

Error | Meaning
JDWPTRANSPORT_ERROR_NONE | No error has occurred. This is the error code that is returned on successful completion of the function.
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY | The function needed to allocate memory and no more memory was available for allocation.
JDWPTRANSPORT_ERROR_INTERNAL | An unexpected internal error has occurred.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture

Documentation Contents

Release notes for the javadt debugger

As a demonstration of the Java Debug Interface (JDI), we are providing source code for a simple GUI debugging tool - javadt. It is included as an example and demonstration of JDI. It is not a finished or polished debugger and is missing many features of importance for real debugging work.

Invoking javadt

javadt can be run by executing:

   java gui.GUI <options>.. <class-name>

where <class-name> is the name you would normally place on the java command line. Note: the paths to the JDI Library and to the compiled javadt class files must be on the class path used to invoke gui.GUI. Be sure that the lib/tools.jar file is also on your class path.

For example, you can invoke the javadt debugger as follows:

   javadt gui.GUI -classpath . Hello
Note: this -classpath option controls the class path for the Hello application. Once the window appears, you can issue the 'run' command to begin execution immediately. It is also possible to give the class name in the 'run' command, in which case it may be omitted when invoking the debugger from the shell.

The classpath may also be set from within the debugger, using the 'classpath' command. Currently, other arguments to the VM must be given on the shell command line when the debugger is initially invoked. The most recently mentioned classpath, VM arguments, main class name, and program arguments are retained as defaults for later 'run' and 'load' commands. (Unfortunately, at present, the debugger will likely crash if you attempt to begin another debugging session with another debuggee process from within the same invocation of the debugger. You should exit to the shell and start a new debugger process.)

Using javadt

The javadt tool normally displays context related to the "current thread", that is, the thread that most recently encountered a breakpoint, threw an uncaught exception, or was single-stepped by the user. When program execution is suspended on account of one of these events, a current thread exists, and the javadt displays the following information about it:

  • A stack backtrace.
  • The source code surrounding the line corresponding to the instruction counter for the thread, if the source code is available.

In addition, a tabbed pane allows the user to view one of three additional views:

  • A tree of all source files available on the source path.
  • A tree of all loaded class files, organized hierarchically by package.
  • A tree of all active threads, organized hierarchically by thread group.

By clicking on the name of a source file, the source view can be directed to display it. Likewise, clicking on a thread will make that thread the current thread. These features are normally used while the program is suspended, e.g, at a breakpoint. Upon resumption and encountering another breakpoint, for example, the current thread will be automatically reset and the views will be updated. The views tile the javadt display, and are adjustable in size.

The javadt functionality is rather basic, thus a command-line interaction window is also provided that allows access to functions that are not yet exposed in the javadt. In particular, it is necessary to use the command line in order to set breakpoints and examine variables. The javadt debugger command interpreter implements roughly a subset of the jdb functionality, but adds a few commands of its own. The 'help' command lists the complete set of commands and their function. Shortcuts for a set of the most common commands is provided on a button-bar at the top of the display.

The program to be debugged may be started either as a child of the debugger, or the debugger can be attached to an existing process, provided that its VM is prepared to accept the connection. If the debuggee is started by the debugger as a child, a line-oriented interface to its standard input, output, and error streams is provided in an application interaction pane.

The debugger expects to find the program source code on its sourcepath, set with the 'use' or 'sourcepath' command. If you find that sources are not being displayed because the sourcepath is incorrect, you may change it at that time, and the source view will be immediately updated.

The message "No current thread" is often encountered when stepping through a program. This message does not mean that the thread or the VM has died, merely that a current thread is undefined. This situation can easily occur unexpectedly when the program being stepped is waiting, eg., for input. The VM appears to be stopped, as it would be after the successful completion of a step, but it is considered to be "running", not "interrupted". The prompt in the command interaction pane indicates the state by changing to a thread name and frame number when the VM is interrupted. When it is running, the prompt "Command:" is displayed.

Source for javadt

Full source code for javadt is included in the Java SE demos package that you can download from Java SE Downloads. Once you unzip the package, you can find the source in the com/sun/tools/example/debug directory. Note: this directory also includes the source for jdb. Source code for these example applications is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the copyright notice.

javadt uses the following packages (found in the com/sun/tools/example/debug directory:

gui
User interface code
bdi
Debugger core code
events
Event Set code
expr
Expression processing code

Building javadt

To build the javadt classes from the provided source files in the debuggers directory, you need only to compile them. No special options are required, aside from those which set your classpath to include the JDI Library. However, if want to modify the expression parser in the file Expr.jj, you will need the JavaCC Parser Generator.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture

As a demonstration of the Java Debug Interface (JDI), we are providing source code for the jdb debugger.

jdb man pages

jdb man pages for Windows

jdb man pages for Solaris, Linux, or Mac OS X

Invoking jdb

The jdb sample can be run by executing:

   java tty.TTY <options>.. <class-name>
where <class-name> is the name you would normally place on the java command line. The -help option provides information on options. Note: Be sure that the lib/tools.jar file is on the class path used to invoke tty.TTY. (The tools.jar file includes the JDI Library.) The compiled jdb class files must also be on the class path.

For more information on invoking and connecting see Connection and Invocation Details, and particularly the section on jdb.

Source for jdb

Full source code for jdb is included as part of the example code in the Java SE demo package that you can download from the Java SE Downloads page. The lib/jpda directory is included in examples.jar. (Use jar xvf examples.jar to extract the contents of examples.jar.) Note: this file also includes the source for javadt. Source code of these example applications is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the copyright notice.

jdb uses the following packages (found in the examples.jar file):

tty
Application code
expr
Expression processing code

Building jdb

To completely rebuild the jdb classes from the provided source files, you need only to compile them. No special options are required, aside from those which set your classpath to include the JDI Library. However, if want to modify the expression parser in the file Expr.jj, you will need the JavaCC Parser Generator.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture

Documentation Contents

Java Platform Debugger Architecture (JPDA)

The Java Platform Debugger Architecture (JPDA) consists of three interfaces designed for use by debuggers in development environments for desktop systems. The Java Virtual Machine Tools Interface (JVM TI) defines the services a VM must provide for debugging. The Java Debug Wire Protocol (JDWP) defines the format of information and requests transferred between the process being debugged and the debugger front end, which implements the Java Debug Interface (JDI). The Java Debug Interface defines information and requests at the user code level.

Enhancements

  • JPDA Enhancements in Java SE 6
  • JPDA Enhancements in Java SE 5.0
  • JPDA Enhancements in Java SE 1.4

Design

  • JPDA Overview
    • Modularity
    • Walk-through
    • Porting
  • Architecture Structure
    • Structure Overview
    • Components
    • Debugger Interfaces
    • Java Virtual Machine Tool Interface
    • Java Debugger Wire Protocol
    • Java Debug Interface

Interface Reference

  • Java Virtual Machine Tool Interface (JVM TI)

    • NOTE: JVMPI, the experimental Java Virtual Machine Profiling Interface has removed. It has been replaced by JVM TI.

    • Specification

  • Java Virtual Machine Debug Interface (JVMDI)

  • JVMDI has been removed. It has been replaced by JVM TI.

  • Java Debug Wire Protocol (JDWP)
    • Specification

  • Java Debug Wire Protocol Interface
    • Specification

  • Java Debug Interface (JDI)
    • Specification

Implementation

  • Connection and Invocation Details

More Information

  • Java Platform Debugger Architecture - FAQs

Examples

  • Example JDI Applications
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture

Documentation Contents

Structure Overview

The Java Platform Debugger Architecture is structured as follows:
           Components                          Debugger Interfaces

                /    |--------------|
               /     |     VM       |
 debuggee ----(      |--------------|  <------- JVM TI - Java VM Tool Interface
               \     |   back-end   |
                \    |--------------|
                /           |
 comm channel -(            |  <--------------- JDWP - Java Debug Wire Protocol
                \           |
                     |--------------|
                     | front-end    |
                     |--------------|  <------- JDI - Java Debug Interface
                     |      UI      |
                     |--------------|

What is the Java Platform Debugger Architecture (JPDA)?

JPDA is a multi-tiered debugging architecture that allows tools developers to easily create debugger applications which run portably across platforms, virtual machine (VM) implementations and JDK versions.

JPDA consists of three layers:

JVM TI - Java VM Tool Interface
Defines the debugging services a VM provides.
JDWP - Java Debug Wire Protocol
Defines the communication between debuggee and debugger processes.
JDI - Java Debug Interface
Defines a high-level Java language interface which tool developers can easily use to write remote debugger applications.

Reference implementation

In addition to the specification of these interfaces, Oracle also provides a reference implementation, which consists of:
  • JVM TI implementations on multiple VMs (see VM documentation).
  • A back-end which uses JVM TI to implement the debuggee side of JDWP.
  • A front-end which uses the debugger side of JDWP to implement JDI.
  • Two simple example debugger applications which are built on JDI.
This provides a layered implementation in which any layer may be substituted.

Using JPDA

A debugger developer may hook into JPDA at any layer. Since the JDI is the highest level and easiest to use we encourage developers to use this interface. Suppose a company develops a debugger using JDI. They can use it with the reference implementation and it will automatically work with the VMs and platforms that Oracle supports. It can also work, for example, with the reference implementation front-end and a debuggee running another company's VM that implements JDWP (which might use or by-pass JVM TI).

Some debuggers are built on top of lower layers, JDWP (for example if the front-end is not written in the Java language) or JVM TI (for specialized debuggers which need low-level functionality).

Components

debuggee

The debuggee is the process being debugged, it consists of the application being debugged (not shown), the VM running the application and the back-end of the debugger.

Java Virtual Machine (VM)

This refers to the VM running the application being debugged.

The debugger architecture is being designed for use in wide spectrum of VM implementations.

The VM implements the Java Virtual Machine Debug Interface (JVM TI).

back-end

The back-end of the debugger is responsible for communicating requests from the debugger front-end to the debuggee VM and for communicating the response to these requests (including desired events) to the front-end. The back-end communicates with the front-end over a communications channel using the Java Debug Wire Protocol (JDWP). The back-end communicates with the debuggee VM using the Java Virtual Machine Debug Interface (JVM TI).

It is clear from experience that debugger support code, running on the debuggee and written in Java, contends with the debuggee in ways that cause hangs and other undesired behavior. Thus, the back-end is native code. This, in turn, implies that the JVM TI be a pure native interface.

communications channel

The communications channel is the link between the front and back ends of the debugger. It can be thought of as consisting of two mechanisms:

  1. A connector. A connector is a JDI object that is the means by which a connection is established between the front and back-ends.

    JPDA defines three types of connectors:

    • listening connectors: The front-end listens for an incoming connection from the back-end
    • attaching connectors: The front-end attaches to an already running back-end.
    • launching connectors: The front-end actually launches the java process that will run the debuggee code and the back-end.
  2. A transport. A transport is the underlying mechanism used to move bits between the front-end and the back-end.

    The transport mechanism used is unspecified; possible mechanisms include: sockets, serial lines, and shared memory. However, the format and semantics of the serialized bit-stream flowing over the channel is specified by the Java Debug Wire Protocol (JDWP).
JPDA includes service provider interfaces to allow the development and deployment of connector and transport implementations. These service provider interfaces allow debugger and other tool vendors to develop new connector implementations and provide addition transport mechanisms over and beyond the socket and shared memory transport provided by Oracle. The service provider interfaces in JDI are specified in the com.sun.jdi.connect.spi package.

In addition to the service provider interfaces in JDI, JPDA also defines a transport library interface called the Java Debug Wire Protocol Transport Interface. A transport library is loaded by the JDWP agent in the target VM and is used to establish a connection to the debugger and to transport JDWP packets between the debugger and the VM.

See Java Platform Debugger Architecture - Service Provider Interfaces for more information on using these SPIs.

front-end

The debugger front-end implements the high-level Java Debug Interface (JDI). The front-end uses the information from the low-level Java Debug Wire Protocol (JDWP).

User Interface (UI)

The user interface to the debugger is not specified; the intent is that tool vendors will provide value added implementations. We provide an example simple graphical user interface (GUI) which serves as test harness and as a starting point for the development of more complex GUIs. A version of JDB is also available as an example.

The example UIs are clients of the Java Debug Interface (JDI).

Debugger Interfaces

Java Virtual Machine Tool Interface (JVM TI)

A native interface implemented by the VM.

Defines the services a VM must provide for debugging. Includes requests for information (for example, current stack frame), actions (for example, set a breakpoint), and notification (for example, when a breakpoint has been hit). A debugger may make use of VM information other than this (for example, Java Native Interface (JNI)), but this is the source of all debugger specific information.

Specifying the VM Interface allows any VM implementor to plug easily into the debugging architecture. It also allows alternate communication channel implementations. VM implementations which do not adhere to this interface can still provide access via the Java Debug Wire Protocol (JDWP).

See also:

JVM TI Specification

Java Debug Wire Protocol (JDWP)

Defines the format of information and requests transferred between the debuggee process and the debugger front-end. It does not define the transport mechanism (socket, serial line, shared memory, ...).

The specification of the protocol allows the debuggee and debugger front-end to run under separate VM implementations and/or on separate platforms. It also allows the front-end to be written in a language other than Java, or the debuggee to be non-native (e.g. Java).

Information and requests are roughly at the level of the Java Virtual Machine Debug Interface (JVM TI), but will include additional information and requests necessitated by bandwidth issues, examples include information filtering and batching.

See also:

JDWP Specification
JDWP Transport Specification

Java Debug Interface (JDI)

A 100% Java interface implemented by the front-end.

Defines information and requests at a user code level.

While debugger implementors could directly use the Java Debug Wire Protocol (JDWP) or Java Virtual Machine Debug Interface (JVM TI), this interface greatly facilitates the integration of debugging capabilities into development environments. We recommend the JDI layer for all debugger development.

See also:

JDI Specification

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture

Trace runs the Java language program passed as an argument and generates a trace of its execution. Trace is a simple command line tool that uses the Java Debug Interface (JDI). Programs need not be compiled for debugging since this information is not used.

Trace can be invoked as follows:

        java Trace options class args
Your classpath must include the JDK's lib/tools.jar file which contains the JDI Library (see Required Set-up), the path to the compiled trace class files, and the path for the application being traced.

Available options are:

  -output filename
        Set destination for output trace. By default output
        goes to the terminal.

  -all
        Include system classes in output.  By default
        java.*, javax.*, sun.* and com.sun.* events are
        not diplayed.

  -fields
        Also show assignments into fields.

  -help
        Print a help message

class is the program to trace. args are the arguments to class.

Source for trace

Full source code for trace is included in the trace directory of examples.jar. Source code of these example application is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the copyright notice.

Building trace

To completely rebuild the trace classes from the provided source files in the trace directory, you need only to compile them. No special options are required, aside from those which set your classpath to include the JDI Library in lib/tools.jar.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture - Example JDI Applications

From the Java SE Downloads page, you can download JDK and JavaFX demos and examples. When you download and unzip this package, the demo/jpda directory contains source code and documentation for three applications written using the Java Debug Interface (JDI) of the Java Platform Debugger Architecture (JPDA). They are provided as educational tools and as starting points for debugger development.

In increasing order of complexity:

  • Trace displays traces of program execution. It is very simple (less than 600 lines) yet uses most of the basic JDI functionality. It is a good starting point.
  • Jdb is the command line debugger.
  • Javadt is the beginnings of a GUI debugger.

Trace is in the trace directory. Jdb and Javadt share a package, and are in the debug directory.

Required Set-up

Your classpath must include the JDI Library code, which is in lib/tools.jar directory of the JDK. (Note that tools.jar is not in the Java Runtime Environment; it is only in the JDK.) This is needed for both compiling the example code and executing it. For information on how to set the classpath, see the JDK Tools and Utilities documentation.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform Debugger Architecture - Service provider interfaces

Documentation Contents

Java Platform Debugger Architecture
Service Provider Interfaces

The service provider interfaces in the Java Debug Interface (JDI) enable the Connector and TransportService implementations to be developed and deployed. The TransportService class represents the underlying transport service used by a Connector and is used to establish connections and transport Java Debug Wire Protocol (JDWP) packets between a debugger and a target VM.

In addition to service provider interfaces in JDI, the JDK also includes a transport library interface called the Java Debug Wire Protocol Transport Interface (jdwpTransport). This is a native (C/C++) interface to allow the development and deployment of transport libraries. A transport library is loaded by the debuggee-side JDWP agent and is used to establish a connection to the debugger and to transport JDWP packets between the debugger and the VM.

This page describes a number of scenarios where the new interfaces may be used. It also provides an overview of the tasks involved in developing and deploying new Connectors and transport implementations.

  • Example Scenarios
  • Developing a Connector
  • Deploying a Connector
  • Developing a TransportService
  • Deploying a TransportService

Example Scenarios

The service provider interfaces and the native transport interface are expected to be used by the following classes of users:

  • Debugger and tool vendors that need to develop new LaunchingConnector implementations or wish to provide additional transport options for remote debugging over-and-beyond the TCP/IP and shared memory transports provided by Oracle.
  • Embedded device, operating system, or virtual machine vendors that require remote debugging using transports that than TCP/IP.

Given the above class of user the following describes a number of scenarios where the new interfaces might be used.

  • In many environments, particularly embedded devices, the debugger may be required to connect to a target VM using a transport other than TCP/IP. In this type of environment the new service provider interfaces can be used to develop and support debugging over an alternative transport.

    On the debuggee-side a transport library for the new transport can be developed by implementing the jdwpTransport interface. For the debugger, a TransportService implementation can be developed. When the TransportService implementation is deployed, the JDI VirtualMachineManager implementation will automatically create an AttachingConnector and a ListeningConnector to allow remote debugging to the target VM.

  • In some environments the debugger may be required to connect to a target VM using a mechanism other than a transport. For example, the debugger may be used to attach, in a read-only manner, to a crash dump or to a hung process.

    For these examples, an AttachingConnector implementation can be developed. The AttachingConnector implementation extends com.sun.jdi.connect.AttachingConnectors and when deployed it will appear on the list of attaching connectors returned by the VirtualMachineManager's attachingConnectors() method.

  • In many environments the target VM will be launched in a very proprietary way. In such environments the Connector arguments or launch mechanism used by the Oracle-provided com.sun.jdi.CommandLineLaunch LaunchingConnector may not be sufficient. In such cases the operating system or virtual machine vendor may decide to develop their own LaunchingConnector that is capable of launching the target VM. This new LaunchingConnector would have appropriate Connector arguments which would be used to configure the target VM for debugging. Once deployed it will appear on the list of Connectors returned by the VirtualMachineManager object's launchingConnectors() method.
  • Another example arises in enterprise environments where an Integrated Development Environment (IDE) implementer wishes to support debugging over a non-Oracle provided transport. For example an IDE may wish to provide the option of debugging over a secure connection using TLS/SSL.

    In this example the IDE implementer develops a transport library using the jdwpTransport interface. This allows the debuggee to use the new transport. On the debugger-side the IDE implementer has a choice. One option is to develop and deploy a TransportService implementation. This option would allow the new transport to be used for remote debugging.

    Alternatively, the IDE implementer may decide to create a Connector implementation that encapsulates the transport. This option is appropriate when the IDE implementer wishes to add new Connector arguments. For example, with a secure transport the IDE implementer may wish to have a Connector that has Connector arguments to specify keystore, pass phrase, or other options needed to configure the secure connection. If a new Connector is appropriate then the IDE implementer develops a transport library for the debuggee-side and a Connector for the debugger-side. The type of Connector is the choice of the implementer - one example is a LaunchingConnector that launches the debuggee and establishes a secure connection between the debugger and debuggee.

Developing a Connector

Developing a Connector involves creating a concrete implementation of a LaunchingConnector, AttachingConnector, or ListeningConnector.

Every Connector implementation must have a public no-arg constructor in addition to implementing all the Connector methods. The constructor will be called by the VirtualMachineManager during initialization. The constructor may be a no-op or it may perform initialization tasks such as loading a transport service. The constructor does not throw any checked exceptions so any problems during initialization should be thrown as an Error or other unchecked exceptions.

Connectors are not required to use a TransportService. Some Connectors may connect to the target VM using a mechanism other than a transport (in the Example Scenarios section we list the examples of AttachingConnectors that attach to crash dumps or hung processes). For Connectors that use a TransportService implementation the Connector can either reference the TransportService implementation directly or it can load the implementation at runtime. Connectors that wish to make use of Oracle-provided transports should load the transport service using code such as following:

try {
    Class c = Class.forName("com.sun.tools.jdi.SocketTransportService");
    ts = (TransportService)c.newInstance();
} catch (Exception x) {
    throw new Error(x);
}

Java SE implementations are not required to include Oracle's socket or shared memory transport service implementations so in the above example an Error will be thrown if the transport service does not exist.

Assuming that the type of Connector is known then the following items should be noted when developing the implementation:

  • The list of Connector.Arguments should be carefully considered. For some Connector implementations the default argument construction and parsing may be the bulk of the code in the implementation.
  • A Connector is required to name the transport that it uses. If an implementation uses an existing TransportService then the recommended transport name is the name of the underlying TransportService. That is, the Connector's transport() implementation returns a Transport for which the name() method returns a java.lang.String representing the name of the transport.
  • Most Connector implementations will establish a Connection to a target VM. Once established the Connector's launch, attach, or accept method will return a VirtualMachine instance to the debugger. To facilitate the creation of a VirtualMachine mirror the VirtualMachineManager has a method to create a VirtualMachine. The following code fragment shows an example usage of this method:
    VirtualMachine vm = Bootstrap.virtualMachineManager().createVirtualMachine(conn);

    The VirtualMachineManager also involves another form of the createVirtualMachine method for use by LaunchingConnector instances. The other form allows the LaunchingConnector to specify the java.lang.Process that represents the debuggee. See the specification for com.sun.jdi.VirtualMachineManager for further details.

You can view the source code for an example LaunchingConnector, SimpleLaunchingConnector.java. The Connector has a single Connector.Argument called class that specifies the class name of class to run in the target VM. The example demonstrates all of the points discussed previously, including Connector.Argument, transport naming, and the use of the createVirtualMachine method.

Deploying a Connector

To deploy a Connector requires packaging the classes for the Connector implementation into a jar file along with a service configuration file that lists the fully-qualified class name of the Connector. The jar file is then deployed in a location that is visible to the system class loader.

The service configuration file that must be included in the jar file is named META-INF/services/com.sun.jdi.connect.Connector. The file simply lists the fully-qualified class names of the Connector included in the jar file. Multiple Connector implementations may be included in the same jar file and in that case the class name for each Connector is listed on a separate line.

Suppose you wish to deploy a launching connector named SimpleLaunchingConnector. In order to deploy this you create a file META-INF/services/com.sun.jdi.connect.Connector similar to the following:

# A very simple launching connector
SimpleLaunchingConnector

This service configuration file is then packaged into a jar file along with the classes that comprise the implementation of the Connector:

jar cf SimpleLaunchingConnector.jar \
    META-INF/services/com.sun.jdi.connect.Connector \
    SimpleLaunchingConnector.class

The jar file is then copied into a location that is visible to the system class loader.

Once deployed the Connector will be located by the debugger when the debugger is restarted. That is, SimpleLaunchingConnector will be included in the list of Connectors returned by VirtualMachineManager's allConnectors() method. In addition, as this is a launching connector, it will also appear on the list of launching connectors returned by the launchingConnectors() method.

Developing a TransportService

Developing a transport service requires developing two components :

  • A concrete implementation of com.sun.jdi.connect.spi.TransportService.
  • A debuggee-side shared library that implements the jdwpTransport interface.

The development of a transport service requires a high degree of familiarity with the transport and the underlying communication protocol. A transport service essentially binds JDWP to an underlying communication protocol. The service that it provides is reliable and JDWP packets are exchanged between the debugger and debuggee without duplication or data loss. Given that packets must be exchanged in a reliable manner might mean that additional protocol support be included in the transport service over and beyond that provided by the underlying communication protocol. For example, if debugging over a raw and unreliable serial connection is required, then the transport service implementer may be required to build in error detection and recovery in the implementation to ensure that JDWP packets can be reliably transported between the debugger and the debuggee.

Assuming the details of the transport and underlying communication protocol are understood then the next step is to consider the following:

  • The TransportService's capabilities() method returns a TransportService.Capabilities to indicate the transport service's capabilities. The transport service implementer thus needs to consider:
    • Can the transport can support multiple concurrent connections to a single listener address?
    • Can timeouts be feasibly implemented when connecting, handshaking, or waiting for a connection to be established?
  • The native transport library may be used by only one, or multiple JDWP (or other) agents at the same time. If a transport supports multiple environments then each call to the jdwpTransport_OnLoad function will return a new environment pointer. If a transport only supports a single environment then second and subsequent calls to jdwpTransport_OnLoad will return an error. The transport library implementer must therefore decide if the library implementation will support one or multiple environments.
  • Addresses, or connection-endpoints, are represented by Strings. The implementer must therefore design an address scheme so that all the components of an address can be encoded into a String. For example, the address and configuration of a serial port might be encoded as something like:
    /dev/ttya;9600,1
  • Design an appropriate ListenKey implementation. As a TransportService may be used to listen on multiple, yet different, addresses at the same time the listen key is used to uniquely identify each "listener".
  • Decide on an appropriate name and description for the TransportService. At start-up the VirtualMachineManager will create an Attaching and Listening Connector to encapsulate the transport service. The name and description of these Connectors will be based on the name and description of the transport service - for example, if the TransportService's name() method returns "Serial" then the Connectors created by the VirtualMachineManager will be named "SerialAttach" and "SerialListen".

Once the above have been resolved then creating a TransportService involves extending com.sun.jdi.connect.spi.TransportService and providing an implementation. The attach and accept methods return an instance of com.sun.jdi.connect.spi.Connection so an implementation of Connection is required so that the debugger can exchange JDWP packets with the debuggee.

You can view an example of a TransportService implementation for Oracle's socket transport, SocketTransportService.java. This is provided for reference purposes only.

To develop a native transport library requires implementing each of the functions listed in the jdwpTransport specification. The function prototypes and definitions are defined in ${java_home}/include/jdwpTransport.h.

The transport library implementer compiles and links the function implementations into a dynamic library (or equivalent). The library exports a function jdwpTransport_OnLoad function which the JDWP agent will call when the transport library is loaded. Some embedded environments don't support dynamic linking and in such environments the transport library may need to be statically linked. In that case there isn't any library loading but the jdwpTransport_OnLoad function will still be called to initialize the transport library and obtain the environment pointer.

As an example of a jdwpTransport implementation, you can download code for Oracle's socket transport library (dt_socket), socketTransport-example.c. This is provided for references purposes only.

Deploying a TransportService

A TransportService is deployed in a similar manner to a Connector. To deploy a TransportService requires packaging the classes for the TransportService implementation into a jar file along with a service configuration file that lists the fully-qualified class name of the TransportService. The jar file is then deployed in a location that is visible to the system class loader.

The service configuration file that must be included in the jar file is named META-INF/services/com.sun.jdi.connect.spi.TransportService. As per Connector deployment the configuration file may list the classes names of multiple transport service implementations in the event that the jar file includes multiple implementations.

In the case of a transport service com.sun.SerialTransportService then the service configuration file will be similar to the following :

# Serial line transport
com.foo.SerialTransportService

This service configuration file is then packaged into a jar file along with the classes that comprise the implementation. For this example we will assume that the implementation involves a number of classes :

jar cf SerialTransportService.jar \
    META-INF/services/com.sun.jdi.connect.spi.TransportService \
    com/foo/SerialTransportService.class \
    com/foo/SerialConnection.class \
    com/foo/SerialCapabilities.clas \
    com/foo/SerialIO.class \
    com/foo/SerialProtocol.class

As per the deployment of Connectors, the jar file is then copied into a location that is visible to the system class loader.

A TransportService may have native methods or rely on other APIs that require a native library. In that case the native library must be location that allows it be loaded using System.loadLibrary.

A native transport library is loaded by the JDWP agent. In must be located on the normal runtime library search path for the operating systems. For example, on Solaris or Linux systems it must be on search path specified by the LD_LIBRARY_PATH environment variable.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JPDA Connection and Invocation

Documentation Contents

Connection and Invocation Details

Contents

Transports
Connectors
Oracle VM Invocation Options
Debugging Plug-in Applets
Connecting with JDB
Service Provider Interfaces

Transports

A JPDA Transport is a method of communication between a debugger and the virtual machine that is being debugged (hereafter the target VM). The communication is connection oriented - one side acts as a server, listening for a connection. The other side acts as a client and connects to the server. JPDA allows either the debugger application or the target VM to act as the server. Transport implementations can allow communications between processes running on a single machine, on different machines, or either. When establishing a connection a transport addresses is used to identify the end-point of the connection. The format of a transport address depends on the type of transport.

Within JPDA the debugger application uses the Java Debug Interface (JDI) interface and the Connector abstraction to establish a connection to the target VM. The Connector used by the debugger application encapsulates the transport. On the target VM an agent supporting the Java Debug Wire Protocol is used to communicate with the debugger. This agent (which may be built into the target VM or loaded from a runtime library) encapsulates the transport to communicate with the debugger.

Two transport implementations are shipped with the reference implementation: A socket transport based on TCP/IP, and a shared memory transport. The specifications do not require any specific transport implementation to exist. In addition to transports provided with the implementation the architecture includes service provider interfaces to allow additional transports be developed and deployed.

Socket Transport

The JPDA reference implementation provides a socket transport for the Solaris, Linux, and Microsoft Windows platforms. With the socket transport, the debugger application and the target VM can reside either on the same machine or on different machines. The socket transport uses a single stream TCP/IP connection between the debugger application and the target VM. Both IPv4 and IPv6 are supported on the JDI side of the socket transport. The current implementation on the target VM side only supports IPv4, but this could change in a future release so that both IPv4 and IPv6 are supported.

Command and reply packets are written to the stream in accordance with the JDWP specification using the JDWP Transport Interface. Since many small packets can be sent over JDWP, the TCP_NO_DELAY socket option can improve performance in some socket implementations by avoiding delays that could occur if the socket implementation buffers small packets before sending them. Sockets are closed gracefully so that unsent data is sent if possible.

The socket transport is identified through a unique string, dt_socket. This name can be used to select the socket transport when invoking the target VM. Within the debugger application a corresponding Connector is used which encapsulates the socket transport.

In contexts where a client is attaching to a server, socket transport addresses have the format "<name>:<port>" where <name> is the host name and <port> is the socket port number at which it attaches or listens. In contexts where a server is waiting for a client to attach, the address consists of the port number alone (the host name is implicit).

Shared Memory Transport

In addition to the socket transport, the JPDA reference implementation provides a shared memory transport on the Microsoft Windows platform. The shared memory transport uses a shared memory region to exchange JDWP packets between the debugger application and the target VM. With the shared memory transport, the debugger application and target VM must reside on the same machine.

The shared memory transport is identified through a unique string, dt_shmem. This name can be used to select the socket transport when invoking the target VM. Within the debugger application a corresponding Connector is used which encapsulates the shared memory transport.

Shared memory transport addresses are simply names that can be used as Microsoft Windows file-mapping object names. The name string can consist of any combination of characters, excluding the backslash.

Connectors

A connector is a JDI abstraction that is used in establishing a connection between a debugger application (written to the JDI) and a target VM. Different JDI implementations are free to provide different connector implementations to match the transports and VMs they support. The connector interfaces are very general, to allow JDI to be used with varying connector implementations. Connectors are configured through a set of name/value pairs. Specific connectors accept different name/value pairs.

A good JDI client application will allow users to choose and configure any connector that may be present, but it can be beneficial to incorporate knowledge of specific connectors into the debugger to make their configuration a more pleasant user experience. The example JDB implementation provided with the JPDA illustrates this approach.

The JDI reference implementations provides several connectors which map to the available transport types and the modes of connection (launching, listening, and attaching). These connectors are described in the following sections. A List containing these connectors is returned by JDI method VirtualMachineManager.allConnectors(). In addition, each attaching, listening, and launching connector is contained in the lists returned by the corresponding VirtualMachineManager methods attachingConnectors(), listeningConnectors(), and launchingConnectors().

Command Line Launching Connector

This connector can be used by a debugger application to launch an Oracle VM or any other VM which supports the same invocation options with respect to debugging. The details of launching the VM and specifying the necessary debug options are handled by the connector. The underlying transport used by this connector depends on the platform. On Microsoft Windows, the shared memory transport is used. On Solaris and Linux the socket transport is used.

This connector is uniquely identified by the name "com.sun.jdi.CommandLineLaunch".

Command Line Launching Connector Arguments
name | required? | default value | description
home | no | current java.home property value | Location of the Java Runtime Environment (JRE) used to invoke the Target VM.
options | no | "" | Options, in addition to the standard debugging options, with which to invoke the VM.
main | yes | "" | The debugged application's main class and command line arguments.
suspend | no | true | True if the target VM is to be suspended immediately before the main class is loaded; false otherwise.
quote | yes | "\"" | The character used to combine space-delimited text on the command line.
vmexec | yes | "java" | The VM launcher executable. This can be changed to javaw or to java_g for debugging, if that launcher is available.

Raw Command Line Launching Connector

This connector can be used by a debugger application to launch any VM. The entire command line must be specified and it is not edited in any way. The details of launching the VM with the given command line are handled by the connector. The underlying transport used by this connector depends on the platform. On Microsoft Windows, the shared memory transport is used. On the Solaris operating environment, the socket transport is used.

This connector is uniquely identified by the name "com.sun.jdi.RawCommandLineLaunch".

Raw Command Line Launching Connector Arguments
name | required? | default value | description
command | yes | "" | Full command line to invoke the target VM with the application to be debugged..
address | yes | "" | Transport address at which to listen for the newly launched target VM to connect. This value is typically part of the raw command argument as well, but this is not required if the target VM has some other means of determining the transport address to which it should connect.
quote | yes | "\"" | The character used to combine space-delimited text on the command line.

Socket Attaching Connector

This connector can be used by a debugger application to attach to a currently running target VM through the socket transport. The target VM must have been invoked with options consistent with this connector's arguments described in the following table. For an Oracle VM, the necessary options are described in Oracle Invocation VM Options.

This connector is uniquely identified by the name "com.sun.jdi.SocketAttach".

Socket Attaching Connector Arguments
name | required? | default value | description
hostname | no | local host name | Name of host machine to connect to.
port | yes | "" | Port number on the host machine to connect to.
timeout | no | "" | The timeout, in milliseconds, to use when attaching to the target VM.

Shared Memory Attaching Connector

This connector can be used by a debugger application to attach to a currently running target VM through the shared memory transport. It is available only on the Microsoft Windows platform. The target VM must have been invoked with options consistent with this connectors arguments described in the following table. For an Oracle VM, the necessary options are described in Oracle VM Invocation Options.

This connector is uniquely identified by the name "com.sun.jdi.SharedMemoryAttach".

Shared Memory Attaching Connector Arguments
name | required? | default value | description
name | yes | "" | The shared memory transport address at which the target VM is listening..
timeout | no | "" | The timeout, in milliseconds, to use when attaching to the target VM

Socket Listening Connector

This connector can be used by a debugger application to accept a connection from a separately invoked target VM through the socket transport.. The target VM must be invoked with options consistent with this connector's arguments described in the following table. For an Oracle VM, the necessary options are described in Oracle VM Invocation Options.

This connector can accept connections from multiple target VMs.

This connector is uniquely identified by the name "com.sun.jdi.SocketListen".

Socket Listening Connector Arguments
name | required? | default value | description
port | no | Ephemeral port number (port assigned by the TCP/IP stack) | Port number at which to listen for a connection..
localAddress | no | All addresses assigned to the host | An IP address assigned to the host
timeout | no | "" | The timeout, in milliseconds, to use while waiting for the target VM to connect

Shared Memory Listening Connector

This connector can be used by a debugger application to accept a connection from a separately invoked target VM through the shared memory transport. It is available only on the Microsoft Windows platform. The target VM must be invoked with options consistent with this connector's arguments described in the following table. For an Oracle VM, the necessary options are described in Oracle VM Invocation Options.

This connector can accept connections from multiple target VMs.

This connector is uniquely identified by the name "com.sun.jdi.SharedMemoryListen".

Shared Memory Listening Connector Arguments
name | required? | default value | description
name | yes | "" | A shared memory transport address at which to listen for the target VM connection.
timeout | no | "" | The timeout, in milliseconds, to use while waiting for the target VM to connect

Process Attaching Connector

This connector can be used by a debugger application to attach to a currently running target VM that was started with the "server=y" debugging sub-option described in Oracle VM Invocation Options. The target VM must be Java SE 6 or newer.

The Process Attaching Connector does not have an associated transport. Instead, the transport is determined dynamically when an attach actually occurs. Because of this, the transport().name() method for this connector returns "local".

This connector is uniquely identified by the name "com.sun.jdi.ProcessAttach".

Process Attaching Connector Arguments
name | required? | default value | description
pid | yes | "" | The Process ID of a process to be debugged.
timeout | no | "" | The timeout, in milliseconds, to use when attaching to the target VM.

SA Core Attaching Connector

This connector can be used by a debugger application to debug a core file. It is possible that the core file is corrupted to the extent that not all available debugging operations can be performed on it.

The VirtualMachine object returned by this connector's attach() method is 'read-only'. This means that the method:
vm.canBeModified()
will return false, and that the JDI client should not call any JDI methods that are defined to throw a VMCannotBeModifiedException in this case. The word size (i.e. 32 bit/64 bit) and version (e.g. 5.0, 5.1) of the debugger's Virtual Machine must be the same as that of the Virtual Machine of the process from which the core file was produced.
This connector allows multiple debugging sessions on the same core file.

This connector is uniquely identified by the name "sun.jvm.hotspot.jdi.SACoreAttachingConnector".

SA Core Attaching Connector Arguments
name | required? | default value | description
core | no | core | Pathname of the core file to debug
javaExecutable | yes | "" | Pathname of the Java executable that produced the core file.

SA PID Attaching Connector

This connector can be used by a debugger application to debug a process. It is not available on the Linux Itanium platform. It is possible that the process is corrupted to the extent that not all available debugging operations can be performed on it.

The VirtualMachine object returned by this connector's attach() method is 'read-only'. This means that the method:
vm.canBeModified()
will return false, and that the JDI client should not call any JDI methods that are defined to throw a VMCannotBeModifiedException in this case.

The process to be debugged need not have been started in debug mode(ie, with -agentlib:jdwp or -Xrunjdwp). It is permissable for the process to be hung. The word size (i.e. 32 bit/64 bit) and version (e.g. 5.0, 5.1) of the debugger and debuggee must be the same. The process is suspended when this connector attaches and resumed when this connector detaches. More than one SAPIDAttachingConnector can not attach to a single process simultaneously.

This connector is uniquely identified by the name "sun.jvm.hotspot.jdi.SAPIDAttachingConnector".

SA PID Attaching Connector Arguments
name | required? | default value | description
pid | yes | "" | The Process ID of a process to be debugged.

SA Debug Server Attaching Connector

This connector can be used by a debugger application to debug a process or core file on a machine other than the machine upon which the debugger is running. It is not available on the Linux Itanium platform. It is possible that the remote process/core file is corrupted to the extent that not all available debugging operations can be performed on it.

The VirtualMachine object returned by this connector's attach() method is 'read-only'. This means that the method:
vm.canBeModified()
will return false, and that the JDI client should not call any JDI methods that are defined to throw a VMCannotBeModifiedException in this case.

This connector uses RMI to communicate with a 'debug server' running on the remote machine.
Before the attach() method on this connector is called, the debug server must be started on the remote machine
and told what process or corefile is to be debugged. The following must be done on the remote machine:
  • start the RMI registry with sa-jdi.jar in the classpath:

${JAVA_HOME}/bin/rmiregistry -J-Xbootclasspath/p:${JAVA_HOME}/lib/sa-jdi.jar
  • start the 'debug-server' on the remote machine, specifying the process or corefile to be debugged:
${JAVA_HOME}/bin/java \
    -classpath ${JAVA_HOME}/lib/sa-jdi.jar \
    sun.jvm.hotspot.jdi.SADebugServer \
    <pid> \
    [uniqueID]

or

${JAVA_HOME}/bin/java \
    -classpath ${JAVA_HOME}/lib/sa-jdi.jar \
    sun.jvm.hotspot.jdi.SADebugServer \
    <pathname to the java executable that produced the core file>\
    <pathname of the corefile to debug> \
     [uniqueID]

An alternative to the above two steps is to use the jsadebugd (Solaris, Linux, or Mac OS X or Windows) command to start the RMI registry and debug-server on the remote machine.

'uniqueID' is an optional string. If more than one debug server is to run at the same time on the same machine, then each must have a different 'uniqueID' string.

In the above, JAVA_HOME must contain the pathname of a Java installation that is the same bit size (i.e. 32 bit/64 bit) and the same version (e.g. 5.0, 5.1) as the version used by the debuggee. However the debugger does not have to be the same bit size and version.

A process to be debugged need not have been started in debug mode(ie, with -agentlib:jdwp or -Xrunjdwp). It is permissable for the process to be hung. The process is suspended when the debug server attaches to it. When a debug server attached to a process is killed (by ^C or other means), the debuggee process will be resumed. Attaching more than one debug server to a corefile is permitted, but only one debug server can be attached to a process.

This connector allows multiple debugging sessions connected to the same debug server.

This connector is uniquely identified by the name "sun.jvm.hotspot.jdi.SADebugServerAttachingConnector".

SA DebugServer Attaching Connector Arguments
name | required? | default value | description
debugServerName | yes | "" | The IP address or name of the machine upon which the debug server is running. If the machine contains multiple debug servers, this name must be of the form uniqueID@IPAddress or uniqueID@hostname where 'uniqueID' is the string used to start the corresponding debug server.

Oracle VM Invocation Options

This section describes the options necessary to invoke an Oracle VM for debugging.

Oracle's VM implementation requires command line options to load the JDWP agent for debugging. The -agentlib:jdwp option is used to load and specify options to the JDWP agent.

The -agentlib:jdwp option is specified as follows:

-agentlib:jdwp=<sub-options>
Loads the JPDA reference implementation of JDWP. This library resides in the target VM and uses JVM TI and JNI to interact with it. It uses a transport and the JDWP protocol to communicate with a separate debugger application. Specific sub-options are described in -Xrunjdwp Sub-options.

-agentlib:jdwp and -Xrunjdwp sub-options

The -agentlib:jdwp and -Xrunjdwp option can be further qualified with sub-options. The sub-options are specified as follows:

    -agentlib:jdwp=<name1>[=<value1>],<name2>[=<value2>]...

or

    -Xrunjdwp:<name1>[=<value1>],<name2>[=<value2>]...

The following table describes the options that can be used:

-Xrunjdwp Sub-options
name | required? | default value | description
help | no | N/A | Prints a brief help message and exits the VM.
transport | yes | none | Name of the transport to use in connecting to debugger application.
server no "n" If "y", listen for a debugger application to attach; otherwise, attach to the debugger application at the specified address.

If "y" and no address is specified, choose a transport address at which to listen for a debugger application, and print the address to the standard output stream.
address yes, if server=n
no, otherwise 		"" Transport address for the connection. If server=n, attempt to attach to debugger application at this address. If server=y, listen for a connection at this address.
timeout no "" If server=y specifies the timeout, in milliseconds, to wait for the debugger to attach. If server=n specifies the timeout, in milliseconds, to use when attaching to the debugger. Note that the timeout option may be ignored by some transport implementations.
launch no none At completion of JDWP initialization, launch the process given in this string. This option is used in combination with onthrow and/or onuncaught to provide "Just-In-Time debugging" in which a debugger process is launched when a particular event occurs in this VM.

Note that the launched process is not started in its own window. In most cases the launched process should be a small application which in turns launches the debugger application in its own window.

The following strings are appended to the string given in this argument (space-delimited). They can aid the launched debugger in establishing a connection with this VM. The resulting string is executed.

  • The value of the transport sub-option.
  • The value of the address sub-option (or the generated address if one is not given)
onthrow | no | none | Delay initialization of the JDWP library until an exception of the given class is thrown in this VM. The exception class name must be package-qualified.Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown.
onuncaught | no | "n" | If "y", delay initialization of the JDWP library until an uncaught exception is thrown in this VM. Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown. See the JDI specification for com.sun.jdi.ExceptionEvent for a definition of uncaught exceptions.
suspend | no | "y" | If "y", VMStartEvent has a suspendPolicy of SUSPEND_ALL. If "n", VMStartEvent has a suspendPolicy of SUSPEND_NONE.

Examples

-agentlib:jdwp=transport=dt_socket,server=y,address=8000
Listen for a socket connection on port 8000. Suspend this VM before main class loads (suspend=y by default). Once the debugger application connects, it can send a JDWP command to resume the VM.

-agentlib:jdwp=transport=dt_socket,server=y,address=localhost:8000,timeout=5000
Listen for a socket connection on port 8000 on the loopback address only. Terminate if the debugger does not attach within 5 seconds. Suspend this VM before main class loads (suspend=y by default). Once the debugger application connects, it can send a JDWP command to resume the VM.

-agentlib:jdwp=transport=dt_shmem,server=y,suspend=n
Choose an available shared memory transport address and print it to stdout. Listen for a shared memory connection at that address. Allow the VM to begin executing before the debugger application attaches.

-agentlib:jdwp=transport=dt_socket,address=myhost:8000
Attach to a running debugger application via socket on host myhost at port 8000. Suspend this VM before the main class loads.

-agentlib:jdwp=transport=dt_shmem,address=mysharedmemory
Attach to a running debugger application via shared memory at transport address "mysharedmemory". Suspend this VM before the main class loads.

-agentlib:jdwp=transport=dt_socket,server=y,address=8000,onthrow=java.io.IOException,launch=/usr/local/bin/debugstub
Wait for an instance of java.io.IOException to be thrown in this VM. Suspend the VM (suspend=y by default). Listen for a socket connection on port 8000. Execute the following: "/usr/local/bin/debugstub dt_socket myhost:8000".This program can launch a debugger process in a separate window which will attach to this VM and begin debugging it.

-agentlib:jdwp=transport=dt_shmem,server=y,onuncaught=y,launch=d:\bin\debugstub.exe
Wait for an uncaught exception to be thrown in this VM. Suspend the VM. Select a shared memory transport address and listen for a connection at that address. Execute the following: "d:\bin\debugstub.exe dt_shmem <address>", where <address> is the selected shared memory address. This program can launch a debugger process in a separate window which will attach to this VM and begin debugging it.

Debugging Plug-in Applets

Applets running under Java Plug-in can be debugged. The required VM options described above can be specified in the Plug-In control panel, under the "Basic" tab, in the "Java Run-Time Parameters". The debug options under the "Advanced" tab should not be used as they will enable the old sun.tools.debug debug support. In future versions of Java Plug-in, these debug options will be changed to use JPDA.

JDI launching connectors cannot be used to debug Plug-in applets.

Connecting with JDB

The example implementation of JDB provided with the JPDA, provides an illustration of the usage of JDI connectors. There are "shortcut" options to JDB which assume the use of connectors known to it (that is, connectors present in the reference implementation). It also provides a way to establish a general connection using any connector. While JDB is hardly an example of a good debugger interface, it does provide a simple example of connectors in use.

In JDB, the -attach option provides access to one of the attaching connectors in the reference implementation (shared memory on Microsoft Windows, sockets on the Solaris and Linux platforms). The -listen option provides access to one of the listening connectors in the reference implementation (shared memory on Microsoft Windows, sockets on the Solaris and Linux platforms). A class name and arguments specified directly on the command line provide access to the command line launching connector.

For example:

jdb -attach myhost:8000

is an easy way to attach to a target VM with the Socket Attaching Connector (on the Solaris operating environment), and

jdb Hello 1 2 3

is an easy way to launch a target VM with the Command Line Launching Connector.

However, the -connect option is also provided by JDB to handle any connector by taking an connector name and a set of arbitrary name/value argument pairs. For example the command lines above have the following equivalents.

jdb -connect com.sun.jdi.SocketAttach:hostname=myhost,port=8000
jdb -connect "com.sun.jdi.CommandLineLaunch:main=Hello 1 2 3"

These command lines are more cumbersome than the ones above, but the -connect option can be used with any connector. This kind of operation is a primitive example of how a JDI debugger can deal with any kind of connector while providing a simplified interface for dealing with common, well-known connectors.

Service Provider Interfaces

JPDA includes service provider interfaces to allow the development and deployment of connector and transport implementations. These service provider interfaces allow debugger and other tool vendors develop new connector implementations and provide addition transport mechanisms over and beyond the socket and shared memory transport provided by Oracle. The service provider interfaces in JDI are specified in the com.sun.jdi.connect.spi package.

In addition to the service provider interfaces in JDI the Oracle implementation also includes a transport library interface called the Java Debug Wire Protocol Transport Interface. A transport library is loaded by the JDWP agent in the target VM and is used to establish a connection to the debugger and to transport JDWP packets between the debugger and the VM.

Further information on the service provider interfaces can be in the document Java Platform Debugger Architecture - Service Provider Interfaces.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JPDA Enhancements

Documentation Contents

Java Platform Debugger Architecture
Java SE 1.5 Enhancements

The version 5.0 family of the JDK includes the following JPDA enhancements:

  • Addition of JVMTI
  • JPDA now supports generics
  • JPDA now supports enums
  • JPDA now supports varargs
  • JPDA pluggable connections and transports
  • JDWP Allow machine to be specified on address param for server
  • Read-only subset of JDI
  • Tool to generate/analyze core files from a crashed JVM
  • Need a way to timeout or test for connection with LinsteningConnector.accept()

Addition of JVMTI

The Java Virtual Machine Tool Interface (JVMTI) is a new native programming interface for use by development and monitoring tools, which replaces JVMPI and JVMDI. It provides both a way to inspect the state and to control the execution of applications running in the Java virtual machine (VM). JVMTI is intended to provide a VM interface for the full breadth of tools that need access to VM state, including but not limited to: profiling, debugging, monitoring, thread analysis, and coverage analysis tools.

Note: JVMPI and JVMDI will be removed in the next major release of Java SE.

JPDA Now Supports Generics

Generics is a new feature in the Java programming langauge, and the JPDA interfaces now allow debuggers to access generic information. This change adds interface elements to the JDWP and JDI components of JPDA. These elements allow generic information to be accessed by JDI clients as Strings containing the actual contents of the Signature attributes from .class files.

JDWP changes

The following are new commands to JDWP. These are the similar to the previously-existing commands, but return generic signatures if they exist, in addition to the JNI signatures.

  • AllClassesWithGeneric: Similar to AllClasses but also returns the generic signature for each class
  • SignatureWithGeneric: Similar to the ReferenceType.Signature command but also returns the generic signature.
  • FieldsWithGeneric: Similar to the Fields command but also returns the generic signature for each field.
  • MethodsWithGeneric: Similar to the Methods command but also returns the generic signature for each method.
  • VariableTableWithGeneric: Similar to the VariableTable command but also includes a new generic signature value for each variable.

JDI changes

New methods:

  • LocalVariable.genericSignature()
  • ReferenceType.genericSignature()
  • TypeComponent.genericSignature()
  • Method.isBridge()

JPDA Now Supports Enums

Enumeration types are a new feature in the Java programming langauge, and the JPDA interfaces now allow debuggers to access information about enumeration types.

New methods:

  • com.sun.jdi.ClassType.isEnum()
  • com.sun.jdi.Field.isEnumConstant()

JPDA Now Supports Varargs

The ability to declare a method as accepting a variable number of agruments is a new feature in the Java programming langauge. The JDI now allows a debugger to query whether or not a method accepts a variable number of arguments. This change also modifies the three JDI methods that allow a method to be called to accept varargs.

New method in com.sun.jdi.Method:

  • boolean isVarargs();

Specification update for the following methods:

  • com.sun.jdi.Method.argumentTypes()
  • com.sun.jdi.Method.arguments()
  • com.sun.jdi.ClassType.invokeMethod
  • com.sun.jdi.ClassType.newInstance
  • com.sun.jdi.ObjectReference.invokeMethod

JPDA Pluggable Connections and Transports

The Java Debug Interface (JDI) previously lacked a provider interface to allow tool vendors to develop and deploy their own Connectors. A Connector is the means by which a Java debugger connects to a target virtual machine.

The JDK ships with 6 Connectors. Two of these are LaunchingConnectors, which are used to launch and establish a debugging session with a target VM. The other four Connectors encapsulate transports for remote debugging. The creation of these 6 Connectors was previously hardcoded into the Oracle JDI implementation of VirtualMachineManager and there was no means for tool vendors to develop or deploy additional Connectors.

Related to the above is that the Java Platform Debugger Architecture (JPDA) previously lacked a means for tool vendors to plug-in their own transport implementations. There was no supported way to debug over non-Oracle provided transports. The JDK ships with 2 transports - a TCP transport (for Solaris, Linux, and Windows) and a shared memory transport (Windows only).

There are two components to this enhancement:

  1. Extend the Java Debug Interface (JDI) with specification and a provider interface to allow 3rd party Connectors and Transport Services be developed and deployed
  2. Develop a VM/debuggee-side native interface to allow 3rd party transport libraries to be located and loaded by the debugging agent running in the VM

Specification updates for 5 existing classes/interfaces :

  • com.sun.jdi.Bootstrap
  • com.sun.jdi.VirtualMachineManager
  • com.sun.jdi.connect.AttachingConnector
  • com.sun.jdi.connect.ListeningConnector
  • com.sun.jdi.connect.Transport

Two new methods added com.sun.jdi.VirtualMachineManager:

  • VirtualMachine createVirtualMachine(Connection connection, Process process) throws IOException
  • VirtualMachine createVirtualMachine(Connection connection) throws IOException;

Four new classes :

  • com.sun.jdi.connect.spi.TransportService
  • com.sun.jdi.connect.spi.TransportService.Capabilities (inner class)
  • com.sun.jdi.connect.spi.TransportService.ListenKey (inner class)
  • com.sun.jdi.connect.spi.Connection

Two new exceptions :

  • com.sun.jdi.connect.TransportTimeoutException
  • com.sun.jdi.connect.spi.ClosedConnectionException

Native transport interface (defined by jdwpTransport.h)

New Connector arguments have been added as follows :

A "timeout" Connector argument has been added to the following Connectors (note that these are Connector names and not class names) :

  • com.sun.jdi.SocketAttach
  • com.sun.jdi.SocketListen
  • com.sun.jdi.SharedMemoryAttach
  • com.sun.jdi.SharedMemoryListen

The timeout argument is optional and specifies the attach or accept timeout (in milliseconds) to use when establishing a connection to the debuggee.

A "localAddress" Connector argument has been added to com.sun.jdi.SocketListen. This Connector argument specifies the local address to bind to when waiting to accept a connection from the debuggee.

Also, the options string to the JDWP agent has been amended to include a timeout option. The timeout argument specifies the timeout (in milliseconds) when establishing the connection to the debugger :

-agentlib:jdwp=...,...,timeout=<timeout>

In addition the address string for the dt_socket transport has been amended to take a local address when running in server mode. For example:

-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:4000,server=y

indicates that the debugee bind to loopback address, port 4000 and wait for the debugger to connect.

JDWP Allow machine to be specified on address param for server

One of the JPDA options is the "address=" parameter, which has the format of:

JPDA Server: address=port

JPDA Client: address=machine:port

This change allows the server to accept a machine name, for cases where the JPDA server is running on a computer with more than one network card and address. The SunCommandLineLauncher, which is the default LaunchingConnector returned by Bootstrap.virtualMachineManager().defaultConnector(), now has a localAddress connector argument so that the local address can be specified. Also, the JDWP options string on the debugee-side can now accept a local address in addition to a port.

Read-only subset of JDI

When using JDI to debug a 'debuggee' that is unmodifiable (such as when the debuggee is represented by a corefile), the JDI client needs to know which JDI methods it can call and which it cannot. This change adds a method to the VirtualMachine interface that allows the JDI client to determine if that VM is read-only. It also defines various JDI methods as throwing a new exception if called on a read-only VM.

New method in com.sun.jdi.VirtualMachine.

  • boolean canBeModified()

New exception class:

  • com.sun.jdi.VMCannotBeModified.

The clause: @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. has been added to the specification of the following methods:

com.sun.jdi.ArrayReference

  • void setValue(int index, Value value)
  • void setValues(List values)
  • void setValues(int index, List values, int srcIndex, int length)

com.sun.jdi.ArrayType

  • ArrayReference newInstance(int length);

com.sun.jdi.ClassType

  • void setValue(Field field, Value value)
  • Value invokeMethod(ThreadReference thread, Method method, List arguments, int options)
  • ObjectReference newInstance(ThreadReference thread, Method method, List arguments, int options)

com.sun.jdi.ObjectReference

  • ArrayReference newInstance(int length);

com.sun.jdi.ClassType

  • void setValue(Field field, Value value)
  • Value invokeMethod(ThreadReference thread, Method method, List arguments, int options)
  • ObjectReference newInstance(ThreadReference thread, Method method, List arguments, int options)

com.sun.jdi.ObjectReference

  • void setValue(Field field, Value value)
  • Value invokeMethod(ThreadReference thread, Method method,
  • List arguments, int options)

com.sun.jdi.StackFrame

  • void setValue(LocalVariable variable, Value value)

com.sun.jdi.ThreadGroupReference

  • void suspend();
  • void resume();

com.sun.jdi.ThreadReference

  • void suspend();
  • void resume();
  • void stop(ObjectReference throwable);
  • void interrupt();
  • void popFrames(StackFrame frame)

com.sun.jdi.VirtualMachine

  • void redefineClasses(Map classToBytes);
  • void suspend();
  • void resume();
  • EventQueue eventQueue();
  • EventRequestManager eventRequestManager();
  • void exit(int exitCode);

Tool to generate/analyze core files from a crashed JVM

When a JVM crashes, developers want to be able to look at a core file and understand what their code was doing when the crash occured. JDI, the Java Debug Interface, defines interfaces for 'connectors'. A connector is an implementation of one of these interfaces. Connectors are used to establish a connection between a debugger process and a debuggee. Java SE ships with several connectors that allow a debugger process to launch a debuggee, attach to an already running debuggee, or listen for incoming connections from a debuggee which has not yet run. These connectors are not part of the JDI specification but are part of the implementation of JDI on a platform. Other vendors are free to include whatever connectors they choose. In addition, users themselves can create their own connectors.

This feature adds three new connectors to the Oracle implementation. Each connector has a set of arguments that the JDI user can/must set in order to use the connector.

The interface summary below lists the class names of these three new connectors. This solution uses a Solaris private interface in libproc.h.

This will add three new attaching connectors to our release of Java SE:

  • sun.jvm.hotspot.jdi.SACoreAttachingConnector
  • sun.jvm.hotspot.jdi.SAPIDAttachingConnector
  • sun.jvm.hotspot.jdi.SADebugServerAttachingConnector

These connectors will be contained in the list of connectors returned to a JDI client by the JDI methods:

  • VirtualMachineManager.allConnectors()
  • VirtualMachineManager.attachingConnectors()

These connectors are used by a JDI client in the same way that the other JDI attaching connectors are used.

The JDI VirtualMachine objects returned by these connectors' attach() methods are 'read-only'. This means that VirtualMachine.canBeModified() will return false. This in turn means that the methods defined in JDI as throwing VMCannotBeModifiedException if the VirtualMachine is read-only should not be called by the JDI client. These connectors can only be used to debug processes and corefiles that use the Oracle Hotspot Virtual Machine. These connectors are not available on Windows nor on Linux Itanium.

Need a way to timeout or test for connection with ListeningConnector.accept()

The method com.sun.jdi.connect.ListeningConnector.attach() previously waited indefinitely for a connection, with no way to set a timeout or interrupt the wait. This made it fairly dangerous to use in an integrated debugger. This change makes it possible to set a timeout, instantly test for a connection, or interrupt another thread.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JPDA Enhancements

Documentation Contents

Java Platform Debugger Architecture
Java SE 1.4 Enhancements

The version 1.4 family of the JDK includes the following JPDA enhancements:
  • Full Speed Debugging
  • Enable "HotSwap" Class File Replacement
  • Instance Filters
  • Support For Debugging Other Languages
  • VMDeathRequests

Full Speed Debugging

The Java HotSpot virtual machine now uses "full-speed debugging". In the previous version of HotSpot, when debugging was enabled, the program executed using only the interpreter. Now, the full performance advantage of HotSpot Technology is available to programs running with debugging enabled. The improved performance allows long running programs to be more easily debugged. It also allows testing to proceed at full speed and the launch of a debugger to occur on an exception:

        -Xrunjdwp:transport=dt_socket,server=y,onuncaught=y,launch=myDebuggerLaunchScript

For details on launch "onthrow" and launch "onuncaught", see Connection and Invocation Details. Setting a breakpoint only inhibits compilation (full speed execution) for the method containing the breakpoint. Execution reverts to the interpreter during some debug operations such as single-stepping and when method entry/exit or watchpoints are set.

As of version 1.4.1, full-speed debugging is available with both the Java HotSpot Client VM (default) and Java HotSpot Server VM (invoked with the -server command-line flag). In the JDK 1.4.0, full-speed debugging was available only with the Java HotSpot Client VM.

Enable "HotSwap" Class File Replacement

This new feature encapsulates the ability to substitute modified code in a running application through the debugger APIs. For example, one can recompile a single class and replace the old instance with the new instance.

This change was made to address these issues:

  • Tool (IDE) vendors want the ability to do fix-and-continue debugging. That is, while debugging, identify a problem, fix it, and continue debugging with fixed code.
  • Organizations deploying long running servers wish to be able to fix bugs without taking down the server.

HotSwap adds functionality to the Java Platform Debugger Architecture (JPDA) to allow a class to be updated while under the control of a debugger. The two central components of this functionality are RedefineClasses which replaces the class definitions and PopFrame which pops frames off the stack allowing a method which has been redefined to be re-executed.

In the reference implementation, this functionality is implemented at the Java Virtual Machine Debug Interface (JVMDI) layer and made available through the higher layers of JPDA - the Java Debug Wire Protocol (JDWP) and the Java Debug Interface (JDI).

Redefinition Functionality
JDI | VirtualMachine.redefineClasses(Map classToBytes)
JDWP | RedefineClasses (Cmd 18) in VirtualMachine (CmdSet 1)
JVMDI | RedefineClasses(jint classCount, JVMDI_class_definition *classDefs)

Pop Frame Functionality
JDI | ThreadReference.popFrames(StackFrame frame)
JDWP | PopFrames (Cmd 4) in StackFrame (CmdSet 16)
JVMDI | PopFrame(jthread thread)

All functionality at each layer is independently optional. The GetCapabilities function at the JVMDI layer; the CapabilitiesNew command at the JDWP layer; and the canRedefineClasses, canAddMethod, canUnrestrictedlyRedefineClasses, and canPopFrames, methods at the JDI layer describe what functionality is implemented.

The bug report associated with this change is 4287595.

Instance Filters

BreakpointRequest, MethodExitRequest, ExceptionRequest, StepRequest, WatchpointRequest and MethodEntryRequest classes now have the capability of adding instance filters by using the addInstanceFilter method. Instance filters restrict the events generated by a request to those in which the currently executing instance is the object specified.

Support For Debugging Other Languages

The Java Platform Debugger Architecture has been extended so that non-Java programming language source, which is translated to Java programming language source, can be debugged in the future. The table below describes the new APIs and APIs with comments that have changed. This information is based on the SourceDebugExtension.

Package | New APIs | APIs with Changed Comments
JVMDI | GetSourceDebugExtension |
JDWP - ReferenceType (2) Command Set | SourceDebugExtension Command (12) |
JDWP - VirtualMachine (1) Command Set | SetDefaultStratum Command (19) |
JDK - VirtualMachine I/F | void setDefaultStratum(String stratum) |
JDK - VirtualMachine I/F | String getDefaultStratum() |
JDI - ReferenceType I/F | String sourceNames(String stratum) | String sourceName()
JDI - ReferenceType I/F | String sourcePaths(String stratum) |
JDI - ReferenceType I/F | List allLineLocations(String stratum, String sourceName) | List allLineLocations()
JDI - ReferenceType I/F | List locationsOfLine(String stratum, String sourceName, int lineNumber) | List locationsOfLine(int lineNumber)
JDI - ReferenceType I/F | List availableStrata() |
JDI - ReferenceType I/F | String defaultStratum() |
JDI - ReferenceType I/F | String sourceDebugExtension() |
JDK - Method I/F | List allLineLocations(String stratum, String sourceName) | List allLineLocations()
JDK - Method I/F | List locationsOfLine(String stratum, String sourceName, int lineNumber) | List locationsOfLine(int lineNumber)
JDI - Location I/F |  | class comment (strata defined)
JDI - Location I/F | int lineNumber(String stratum) | int lineNumber()
JDI - Location I/F | String sourceName(String stratum) | String sourceName()
JDI - Location I/F | String sourcePath(String stratum) |
JDI - Location I/F | String sourcePath() |

VMDeathRequests

Using class VMDeathRequest, a request can be made for notification when the target VM terminates. When an enabled VMDeathRequest is satisfied, an EventSet containing a VMDeathEvent will be placed on the EventQueue.

Even without creating a VMDeathRequest, a single unsolicited VMDeathEvent will be sent with a suspend policy of SUSPEND_NONE.

This request would typically be created so that a VMDeathEvent with a suspend policy of SUSPEND_ALL will be sent. This event can be used to assure completion of any processing which requires the VM to be alive (e.g. event processing). Note: the unsolicited VMDeathEvent will still be sent.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JPDA Enhancements

Documentation Contents

Java Platform Debugger Architecture
Java SE 1.6 Enhancements

Following is a short summary of the enhancements to JPDA that have been added in Java SE 6. The documentation for these features is available in the JDI Specification.

Not shown here are the equivalent commands in JDWP. The documentation for these features is available in the JDWP Specification.

  • JVMDI has been deleted. See its replacement, JVM TI
  • heap walking
    • 5024119 Add ReferenceType.getAllInstances () method to JDI.
    • 5089849 Add support for backtracking reference graph.

    New methods:

              VirtualMachine:
           boolean canGetInstanceInfo();
           long[] instanceCounts(List<?extends ReferenceType?> refTypes);

         ReferenceType:
           List<ObjectReference> instances(long maxInstances);

         ObjectReference:
           List<ObjectReference> referringObjects(long maxReferrers);
  • 5024104 Allow access to Constant Pool in ClassType

    New methods:

  •
        VirtualMachine:
           boolean canGetClassFileVersion();
           boolean canGetConstantPool();

         ReferenceType:
           int majorVersion();
           int minorVersion();
           int constantPoolCount();
           byte[] constantPool();
  • 4836939 JDI add addSourceFileFilter to ClassPrepareRequestb

    New methods:

  •           VirtualMachine:
            boolean canUseSourceNameFilters();

          ClassPrepareRequest:
            void addSourceNameFilter(String sourceNamePattern);
  • 4490824 JDI: provide arguments when no debug attributes present

    New methods:

  •          StackFrame:
           List<Value> getArgumentValues();
  • 4195445 JDWP, JDI: Add return value to Method Exit Event

    New methods:

  •          VirtualMachine:
           boolean canGetMethodReturnValues();

         MethodExitEvent:
           Value returnValue();
  • 6175634 Allow early return from method

    New methods:

  •          VirtualMachine:
           boolean canForceEarlyReturn();

         ThreadReference:
           void forceEarlyReturn(Value value) throws InvalidTypeException,
                                              ClassNotLoadedException,
                                              IncompatibleThreadStateException;
  • 4401399 Request for breakpoints for monitor acquisitions and releases

    New methods:

  •          VirtualMachine
           boolean canRequestMonitorEvents();

         EventRequestManager:
           List<MonitorContendedEnterRequest> monitorContendedEnterRequests();
           List<MonitorContendedEnteredRequest> monitorContendedEnteredRequests();
           List<MonitorWaitRequest> monitorWaitRequests();
           List<MonitorWaitedRequest> monitorWaitedRequests();

    New classes:

           public interface MonitorContendedEnterRequest extends EventRequest
         public interface MonitorContendedEnteredRequest extends EventRequest
         public interface MonitorWaitRequest extends EventRequest
         public interface MonitorWaitedRequest extends EventRequest

         public interface MonitorContendedEnterEvent extends LocatableEvent
         public interface MonitorContendedEnteredEvent extends LocatableEvent
         public interface MonitorWaitEvent extends LocatableEvent
         public interface MonitorWaitedEvent extends LocatableEvent
  • 6230699 Need to be able to get the location at which a monitor was acquired

    New methods:

  •          VirtualMachine
           boolean canGetMonitorFrameInfo();

         ThreadReference
           List<MonitorInfo> ownedMonitorsAndFrames()
                           throws IncompatibleThreadStateException;

    New classes:

         public interface MonitorInfo extends Mirror
  • 4527279: Need a better way to find out the port number on which JPDA is listening

    New Connector:

  • com.sun.tools.jdi.ProcessAttach, with arguments pid and timeout. This allows a debugger to attach to a debuggee started in debug mode via process id instead of transport address.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JPDA Overview

Documentation Contents

Java Platform Debugger Architecture

Overview

The Java Platform Debugger Architecture (JPDA) consists of two interfaces (JVM TI and JDI), a protocol (JDWP) and two software components which tie them together (back-end and front-end). The intent of JVM TI is multi-fold:
  • To provide standard interfaces (for the sake of simplicity we will refer to JDWP as an interface) which allow Java programming language debugging tools to be easily written without regard to platform specifics such hardware, operating system and virtual machine implementation.
  • To describe a complete architecture for implementing these interfaces, including remote and cross-platform debugging.
  • To provide a reference implementation of this architecture.
  • To provide a highly modular architecture where the implementation and/or client of an interface can be different than the reference implementation or different from the JPDA component.

Background

See Java Platform Debugger Architecture.

Modularity

Details of the modular structure of JPDA are discussed below. In each case the standard JPDA usage is described. The reference implementation is described and alternative implementations and clients of the interface are discussed.

JVM TI Modularity

The Java Virtual Machine Tool Interface (JVM TI) describes the functionality provided by a virtual machine (VM) in order to allow debugging of Java programming language applications running under this VM. In JPDA, JVM TI is implemented by a VM and the client is the JPDA back-end. In the reference implementation of JPDA, JVM TI is implemented by the Java HotSpot VM and the client is the reference implementation of the back-end, supplied as a native shared library (jdwp.so, jdwp.dll, ...), which is shipped with the JDK.

Many VMs other than the Java HotSpot VM implement JVM TI. The reference implementation of the back-end has been ported to other platforms. And there are JVM TI clients other than the back-end, most notably agents for applications that allow debugging of both native and Java programming language code, and thus need native level control and information. We are aware of no clean-room implementations of the back-end, although this is possible - and a lot of work.

JDWP Modularity

The Java Debug Wire Protocol (JDWP) describes the format of debugging information and requests between a debuggee and a debugger. In JPDA, there is a communication channel between the front-end (in the debugger process) and the back-end (in the debuggee process) - the format of data flowing on this channel is described by JDWP. In the reference implementation of JPDA, the reference implementation of the back-end (above) provides the debuggee side of this channel, and the reference implementation of the front-end (a Java programming language component of the JDK, located in tools.jar) provides the debugger side.

JVM TI is problematic to implement in some VMs. JDWP is implemented directly in such VMs. On the client side, an application written in a language other than the Java programming language may not be an optimal candidate for using JDI. Some have chosen to be clients of JDWP.

JDI Modularity

The Java Debug Interface (JDI) provides a pure Java programming language interface for debugging Java programming language applications. In JPDA, the JDI is a remote view in the debugger process of a virtual machine in the debuggee process. It is implemented by the front-end (above) while a debugger-like application (IDE, debugger, tracer, monitoring tool, ...) is the client.

The JDI could be implemented by a system with a static view of an application. It could be implemented by a system with a mechanism utterly different than JDWP/front-end for collecting information or controlling a VM.

Walk-through

The various ways that the interfaces can be used is discussed above. This section will examine how the standard full JPDA works. The examples go into detail about specific calls and codes. It is not important to understand these -- they are present only to make the examples more concrete.

Across each interface there are two classes of activity: requests and events. Requests originate on the debugger side and include queries for information, setting of state changes in the remote VM/application, and setting of debugging state. Events originate on the debuggee side and denote changes of state in the remote VM/application.

Let's walk through an example. A user clicks on a local variable in a stack view in an IDE, requesting its value. The IDE uses the JDI to get the value, in particular it calls the getValue method, for example:

    theStackFrame.getValue(theLocalVariable)
Where theStackFrame is a com.sun.jdi.StackFrame and theLocalVariable is a com.sun.jdi.LocalVariable.

The front-end then sends this query over a communications channel (let's say a socket) to the back-end running in the debuggee process. It sends it by formatting it into a byte stream in accordance with the JDWP. In particular, it sends a GetValues command (byte value: 1) in the StackFrame command set (byte value: 16), followed by the thread ID, frame ID, etc.

The back-end deciphers the byte-stream and sends the query off to the VM through the JVM TI. In particular, let's say the requested value is an integer, the following JVM TI function call is made:

    error = jvmti->GetLocalInt(frame, slot, &intValue);
The back-end sends back across the socket, a response packet, which will include the value of intValue, and which will be formatted according to JDWP. The front-end deciphers the response packet and returns the value as the value of the getValue method call. The IDE then displays the value.

Requests to change debugging state are processed in a similar manner. For example, a request to set a breakpoint goes through the same steps -- although, of course, the JDI methods called, the JDWP commands sent, and the JVM TI functions called are different. Additionally, the front-end and back-end do more than shove data back and forth, they track and schedule activity and convert, filter, and cache information, so a breakpoint request will be processed quite differently than a get value query - but the communication sequence will be the same.

What happens when the application being debugged finally hits this breakpoint? This is where events come into play. The virtual machine sends an event across the JVM TI interface. In particular, it calls the event handling function passing the breakpoint:

The back-end has set the event handling function to be:

static void Breakpoint(jvmtiEnv *jvmti_env,
                       JNIEnv* jni_env, jthread thread,
                       jmethodID method, jlocation location)
{ ...
This back-end function starts a chain of activity which filters the event to see if it is interesting, queues it, and sends it across the socket in the JDWP format defined for breakpoint events. The front-end decodes and processes the event, eventually generating a JDI event. In particular, the JDI event is exposing it as a com.sun.tools.jdi.event.BreakpointEvent. The IDE then gets the event by removing it from the event queue:
    theEventQueue.remove()
where theEventQueue is a com.sun.jdi.event.EventQueue. The IDE will probably update its displays by making many query calls across the JDI.

Porting

Each virtual machine implementation needs its own JVM TI implementation -- a JVM TI implementation must dig deeply into VM data structures and must set hooks into the VM implementation in order to get events. Adding JVMDT to a VM without JVM TI support is a significant undertaking. Depending on the complexity of the VM and the amount of optional JVM TI implemented, it might be a three to twelve month project. Porting a VM which has JVM TI support to a new platform is primarily the work of porting the non-JVM TI portions of the VM -- JVM TI adds a comparatively small amount of work.

The reference implementation of the back-end can usually be moved to a new platform with little (a few lines) or no change to the source and then recompiled. To use a new VM on the same platform, the binary of the back-end should generally work -- although, it's not Java programming language code so you never know. Note that licensing issues are not covered by this document.

The front-end implementation is written in the Java programming language and will run on any platform or VM. However, the connector code has functionality that may need to be extended for some systems. For example, the reference implementation of the front-end includes a launcher which assumes virtual machines are launched using Java SE conventions. A user of the JDI can configure any launcher syntax he or she wants, but generally a debugger application would prefer to leave this to the JDI implementation. If a different type of communication channel is desired (serial, for example) this too would need to be added using the Service Provider Interface introduced in JDK 5.0.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


SourceDebugExtension Class File Attribute

Java virtual machine class file attributes are described in section 4.7 of the The Java Virtual Machine Specification. The definition of the added attribute is in the context of The Java Virtual Machine Specification:
The SourceDebugExtension attribute is an optional attribute in the attributes table of the ClassFile structure. There can be no more than one SourceDebugExtension attribute in the attributes table of a given ClassFile structure.

The SourceDebugExtension attribute has the following format:

    SourceDebugExtension_attribute {
       u2 attribute_name_index;
       u4 attribute_length;
       u1 debug_extension[attribute_length];
    }
The items of the SourceDebugExtension_attribute structure are as follows:
attribute_name_index
The value of the attribute_name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing the string "SourceDebugExtension".
attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes. The value of the attribute_length item is thus the number of bytes in the debug_extension[] item.
debug_extension[]
The debug_extension array holds a string, which must be in UTF-8 format. There is no terminating zero byte.

The string in the debug_extension item will be interpreted as extended debugging information. The content of this string has no semantic effect on the Java Virtual Machine.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java JPS

Documentation Contents

Enhancements to Java Print Service

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No current changes to report.

Enhancements in J2SE 5.0

No current changes to report.

Enhancements in Java 2 SDK v1.4

No current changes to report.

Previous Enhancements

No current changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Print Service

The Java Print Service API allows printing on all Java platforms including those requiring a small footprint, such as a Java ME profile, but also supports the java.awt.print.PrinterJob API. The Java Print Service API includes an extensible print attribute set based on the standard attributes specified in the Internet Printing Protocol (IPP) 1.1 from the IETF. With the attributes, client and server applications can discover and select printers that have the capabilities specified by the attributes. In addition to the included StreamPrintService, which allows applications to transcode data to different formats, third parties can dynamically install their own print services through the Service Provider Interface.

API Specification

The Java Print Service API consists of these four packages:

javax.print:
Provides the principal classes and interfaces for the Java Print Service API.

javax.print.attribute:
Provides classes and interfaces that describe the types of Java Print Service attributes and how they can be collected into attribute sets.

javax.print.attribute.standard:
Contains classes defining specific printing attributes.

javax.print.event:
Contains event classes and listener interfaces for monitoring print services and the progress of a specific print job.

Tutorials and Programmer's Guides

The Java Print Service User Guide describes the Java Print Service in more detail and demonstrates how to use the Java Print Service API to:

  • Discover and select print services based on their capabilities
  • Specify the format of print data
  • Submit print jobs to services that support the document type to be printed.

More Information

See the Java Software websites:

  • The Java 2D Home Page
  • Java SE Desktop Overview

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

What the Java Print Service API Offers

The Java Print Service API unifies and extends printing on the Java platform by addressing many of the common printing needs of both client and server applications that are not met by the current Java printing APIs.

In addition to supporting the current Java 2D printing features, the Java Print Service offers many improvements, including:

  • Both client and server applications can discover and select printers based on their capabilities and specify the properties of a print job. Thus, the JPS provides the missing component in a printing subsystem: programmatic printer discovery.
  • Implementations of standard IPP attributes are included in the JPS API as first-class objects.
  • Applications can extend the attributes included with the JPS API.
  • Third parties can plug in their own print services with the Service Provider Interface.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

History of Printing on the Java Platform

Enhancements in JDK 1.3

For JDK 1.3, the JobAttributes and PageAttributes classes were introduced to AWT printing so that client applications could specify the properties of a print job and the attributes of a page.

The two APIs primarily support page imaging, which is the rendering and formatting of a page and is one component of a printing subsystem. Although a client can choose a printer from a print dialog and can specify printing attributes using JobAttributes and PageAttributes, neither the AWT nor Java 2D printing APIs support discovery of printers based on their capabilities, which is another key component of any printing subsystem. For more details on the history of printing on the Java platform refer to Printing Help for Java Developers.

Enhancements in JDK 1.2

The JDK 1.2 advanced printing on the Java platform with the java.awt.print package by allowing applications to print all Java 2D graphics, which includes 2D graphics, text, and images.

Enhancements in JDK 1.1

Basic printing support for the Java platform was first introduced in the Java Development Kit, version 1.1. The JDK 1.1 printing API provided developers with a basic framework for printing the user-interface content from client applications. JDK 1.1 printing, also called the AWT Printing API, was designed around the java.awt.PrintJob class, which encapsulates a printing request. The PrintJob class creates a subclass of Graphics, which implements the rendering calls to image the page.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

How Applications Use the Java Print Service

A typical application using the Java Print Service API performs these steps to process a print request:
  1. Obtain a suitable DocFlavor, which is a class that defines the format of the print data.
  2. Create and populate an AttributeSet, which encapsulates a set of attributes that describe the desired print service capabilities, such as the ability to print five copies, stapled, and double-sided.
  3. Lookup a print service that can handle the print request as specified by the DocFlavor and the attribute set.
  4. Create a print job from the print service.
  5. Call the print job's print method.
The application performs these steps differently depending on what and how it intends to print. The application can either send print data to a printer or to an output stream. The print data can either be a document in the form of text or images, or a Jav a object encapsulating 2D Graphics. If the print data is 2D graphics , the print job can be represented by either a DocPrintJob or a PrinterJob. If the print data is a document then a DocPrintJob must be used.

The combinations of printing methods and print data formats yield a choice of six printing mechanisms:

  • Print a document to a printer by using a DocPrintJob and an implementation of PrintService
  • Stream a document to an output stream by using a DocPrintJob and a StreamPrintService
  • Print 2D graphics to a printer by using a DocPrintJob and an implementation of PrintService
  • Stream 2D graphics to an output stream by using a DocPrintJob and a StreamPrintService
  • Print 2D graphics to a PrintService using java.awt.print.PrinterJob
  • Stream 2D graphics to a StreamPrintService using java.awt.print.PrinterJob
The Attributes chapter and the Specifying Document Types chapter describe how to create an attribute set and specify document types for use with any of the print mechanisms. The Printing and Streaming Documents chapter discusses printing and streaming documents using DocPrintJob. The Printing and Streaming 2D Graphics chapter explains printing and streaming 2D graphics using both DocPrintJob and PrinterJob.

A Basic Example

Most applications using the Java Print Service API will probably send a document directly to a printer, which the following code sample demonstrates:

// Input the file
FileInputStream textStream;
try {
        textstream = new FileInputStream("file.TXT");
} catch (FileNotFoundException ffne) {
}
if (textstream == null) {
        return;
}
// Set the document type
DocFlavor myFormat = DocFlavor.INPUT_STREAM.TEXT_PLAIN_ASCII;
// Create a Doc
Doc myDoc = new SimpleDoc(texttream, myFormat, null);
// Build a set of attributes
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new Copies(5));
aset.add(MediaSize.ISO_A4);
aset.add(Sides.DUPLEX);
// discover the printers that can print the format according to the
// instructions in the attribute set
PrintService[] services =
        PrintServiceLookup.lookupPrintServices(myFormat, aset);
// Create a print job from one of the print services
if (services.length > 0) {
        DocPrintJob job = services[0].createPrintJob();
        try {
                job.print(myDoc, aset);
        } catch (PrintException pe) {}
}
Although this sample only demonstrates one of the six ways to print, the other printing mechanisms work in a similar way. The rest of this guide discusses each piece of the printing process and all the printing mechanisms in more detail

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT

Java Print Service Architecture

The Java Print Service API consists of four packages: javax.print, javax.print.attribute, javax.print.attribute.standard, and javax.print.event.

The javax.print Package

The javax.print package is the main package of the API. It contains classes and interfaces that you use to:
  • Discover Print Services
  • Specify the print data format
  • Create print jobs from a print service
  • Send the print data to a printer or a stream

Discover Print Services

An application invokes the static methods of the abstract class PrintServiceLookup to locate print services that have the capabilities to satisfy the application's print request. For example, to print a double-sided document, the application first needs to find printers that have the double-sided printing capability.

An implementation of the PrintService interface represents an actual printer that might be returned from an implementation of PrintServiceLookup. The PrintService can be queried to determine its capabilities by invoking one of the many methods that return the print service's supported attributes. The Locating Services section of the Printing and Streaming Documents chapter discusses using PrintService and PrintServiceLookup.

The JDK includes PrintServiceLookup implementations that can locate the standard platform printers. To locate other types of printers, such as IPP printers or JINI printers, a print-service provider can write implementations of PrintServiceLookup. The print-service provider can dynamically install these PrintServiceLookup implementations using the SPI JAR file specification.

Rather than sending data to a printer, an application can also print the data to an output stream using a StreamPrintService, which allows the application to convert the data to different formats. To obtain a StreamPrintService, an application uses the lookup methods of the StreamPrintServiceFactory abstract class. This class is similar to that of the PrintServiceLookup class in that it also discovers print services. The chapter Printing and Streaming Documents describes using StreamPrintServiceFactory and StreamPrintService. A StreamPrintService can also be used to send 2D graphics to an output stream. See Printing and Streaming 2D Graphics for more details.

Specify the Print Data Format

The DocFlavor class represents the print data format, such as JPEG or PostScript. A DocFlavor object consists of a MIME type describing the format, and a representation class name, such as java.io.InputStream, that indicates how the document will be delivered to the service. As a convenience, the JPS API also includes pre-defined DocFlavor objects representing common data formats. The Specifying Document Types chapter describes in more detail how to use DocFlavor objects.

Create Print Jobs

When an appropriate print service is found, an application creates a print job from it. The print job is represented by the DocPrintJob class, which provides the actual print method. Before calling print, the application creates a Doc object to encapsulate the print data and the print request attributes, which are defined in the javax.print.attribute and javax.print.attribute.standard packages. The chapter Printing and Streaming Documents discusses using Doc and DocPrintJob. An application that is using the Java Print Service to print 2D Graphics can use either the PrinterJob class or the DocPrintJob class. The chapter Printing and Streaming 2D Graphics discusses using the Java Print Service to print 2D Graphics.

The Attribute Packages

The javax.print.attribute and javax.print.attribute.standard packages define print attributes, which describe a capability of a print service, a charactaristic of a document, an instruction for processing a document or an entire print job, or the state of a print job or printer.

The javax.print.attribute package describes the types of attributes and how they can be collected into sets. The Attribute interface is the superinterface for all attributes. The javax.print.attribute package includes classes and interfaces defining the five different kinds of attributes, each of which describes the capabilities of one piece of the printing process. For example, the PrintRequestAttribute interface defines attributes that clients use to describe the characteristics of a print job, which might include the number of copies to print.

The javax.print.attribute.standard package enumerates all of the standard attributes supported by the API, most of which are implementations of attributes specified in the IPP specification. The Attributes chapter discusses the attribute API in more detail.

The javax.print.event Package

The javax.print.event package contains classes that allow applications to register for events on print jobs and print services. Read the Registering for Events section for more information on registering for print job events.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


1 - Introduction

Documentation Contents
CONTENTS | PREV | NEXT
CHAPTER 1

Introduction

The Java Print Service (JPS) is a Java Print API that is designed to support printing on all Java platforms, including platforms requiring a small footprint, but also supports the current Java Print API. This unified Java Print API includes extensible print attributes based on the standard attributes specified in the Internet Printing Protocol (IPP) 1.1 from the IETF Specification, RFC 2911. With the attributes, client and server applications can discover and select printers that have the capabilities specified by the attributes. In addition to the included StreamPrintService, which allows applications to transcode print data to different formats, a third party can dynamically install their own print services through the Service Provider Interface.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

CHAPTER 2

Attributes

When sending print data to a printer, a client also provides instructions on how to print the data, such as: what media (paper) to use and how many copies to print. The client specifies these processing instructions using the attribute definitions of the Java Print Service API.

The Java Print Service API includes two packages that define attributes: javax.print.attribute and javax.print.attribute.standard. The javax.print.attribute package contains the interfaces and classes that describe the types of attributes and how they are collected into sets. The javax.print.attribute.standard package enumerates all of the standard attributes in the API. Most of the attribute definitions in the JPS API are implementations of the standard and extensible attributes defined by the Internet Printing Protocol (IPP) Specification from the IETF.

This chapter describes the attribute definitions of the JPS API in more detail.The Attribute Categories and Values section explains what an attribute is according to the JPS. The Attribute Roles section describes the type of attributes. The Attribute Sets section describes how the attributes are collected into sets. The Standard Attributes section describes some of the more-commonly used attributes defined in the javax.attribute.standard package.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

Uses of JPS Attributes

Unlike attributes of previous Java printing APIs, the Java Print Service attributes can be used in both the program and from the user dialog. Applications can specify as little as needed about how a job should be printed and can inspect the selections made by end users in user dialogs.

The JPS attributes are designed to be extensible. An AttributeSet can contain anything that properly implements the Attribute interfaces, which means that the set of standard attributes can evolve and still be compatible with future JDK versions, and implementors of services can extend attributes in two ways:

  • Using their own subclasses of a standard attribute category to support additional values of that category.
  • Creating new attribute categories.
Demonstrating attribute usage from the user dialog requires providing a user interface, which is beyond the scope of this user guide. Likewise, extending JPS attributes is a task for service providers, and is not included as an example in this version of the user guide. However, the Printing a Document chapter explains a simple printing application, which covers the basics of using the JPS attributes as described in this chapter.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

Standard Attributes

The javax.print.attribute.standard package enumerates all of the standard attributes in the Java Print Service API. Most of these standard attributes are taken from the attributes defined in the IETF Internet Printing Protocol (IPP) 1.1 specification. This means that each IPP-compliant attribute class(category) defined in package javax.print.attribute.standard corresponds to an IPP attribute category, and the name (as returned by getName) is the actual IPP name for the category. The class names also usually reflect the IPP name as closely as the coding conventions of the Java programming language permit. Furthermore the values defined for a category are the same as the IPP values. IPP compatibility of each attribute category is documented in the API specification.

This section describes the attributes that developers will probably use most frequently. The more commonly-used attributes, including the ones listed here, implement PrintRequestAttribute because printing applications will usually specify how an entire print job should be printed, which is the role of a PrintRequestAttribute.

OrientationRequested

The OrientationRequested attribute category allows you to specify the orientation of the imaging on the paper. The possible attribute values are: PORTRAIT, LANDSCAPE, REVERSE_PORTRAIT, and REVERSE_LANDSCAPE. OrientationRequested.PORTRAIT is usually the default value. This code snippet demonstrates adding an OrientationRequested attribute to a set:

aset.add(OrientationRequested.REVERSE_PORTRAIT);
The OrientationRequested object is a type-safe enumeration encapsulating String values, which correspond to the possible orientations. These values are the actual IPP keywords.

Some pre-formatted document types, such as "Postscript", might not be able to support this attribute category because pre-formatted document types embed printer language commands that are interpreted by the printer, and these commands take precedence over a client request.

Clients can discover the supported orientation values for a particular print service by calling:

PrintService.getSupportedAttributeValues(OrientationRequested.class, ...).
This method returns an array of type OrientationRequested enumerating the supported values.

Copies

The Copies attribute category allows you to specify the number of copies to print. The Copies class encapsulates an integer representing the number of copies requested. This code snippet demonstrates adding a Copies attribute, set to five copies, to an attribute set:

aset.add(Copies(5));
Clients can discover the range of copies that a print service supports by calling :

PrintService.getSupportedAttributeValues(Copies.class, ...)
This method returns a CopiesSupported object, which encapsulates a range of integer values representing the range of copies that the service can handle. Calling getSupportedAttributeValues with CopiesSupported instead of Copies always returns null because the CopiesSupported object does not implement the PrintRequestAttribute interface, and so a client cannot specify a CopiesSupported attribute in a print request.

This code sample demonstrates discovering if a print service supports printing 5 copies and adding a Copies attribute with a value of 5 copies to an attribute set:

CopiesSupported copSupp =
        (CopiesSupported) service.getSupportedAttributeValues(Copies.class, null,
                                                                                null);
if (copSupp != null && copSupp.contains(5)) {
        requestAttrSet.add(new Copies(5));
} else { ...
}

Media

Media is the IPP attribute that identifies the medium on which to print. The Media attribute is an important attribute to understand, butis relatively complex.

The Java Print Service API defines three subclasses of the abstract class Media to reflect the overloaded Media attribute in the IPP specification: MediaSizeName, MediaName and MediaTray. All the Media subclasses have the Media category, for which each subclass defines different standard attribute values. For example, a MediaTray object can specify a value of MANUAL for the Media attribute to indicate that the document must be printed on paper from the printer's manual tray. This code snippet demonstrates adding a Media attribute to a set:

aset.add(MediaTray.MANUAL);

The value of the Media attribute is always a String, but because the attribute is overloaded, its value determines the type of media to which the attribute refers. For example, the IPP pre-defined set of attribute values include the values "a4" and "top-tray". If Media is set to the value "a4" then the Media attribute refers to the size of paper, but if Media is set to "top-tray" then the Media attribute refers to the paper source. Because the String attribute value can refer to such diverse types of media, an application can extend the attribute set to include values such as "company-letterhead" or "yellow letter paper". Of course, to extend the Media attribute in this way, an application must discover a print service that is configured to print with this media.

In most cases, applications will use either MediaSizeName or MediaTray. The MediaSizeName class enumerates the media by size. The MediaTray class enumerates the paper trays on a printer, which usually include a main tray and a manual feed tray. The IPP 1.1 specification does not provide for specifying both the media size and the media tray at the same time, which means, for example, that an application cannot request size A4 paper from the manual tray. A future revision of the IPP specification might provide for a way to request more than one type of media at a time, in which case the JPS API will most likely be enhanced to implement this change.

The JPS API also includes two additional media-related Attribute classes that are not IPP attributes: MediaSize and MediaPrintableArea.

MediaSize

MediaSize is not a request attribute; it is an enumeration of paper dimensions and a mapping to MediaSizeName instances. Each MediaSizeName instance usually has a MediaSize object associated with it so that clients can obtain the dimensions of the paper that the MediaSizeName instance defines. To determine the dimensions of the MediaSizeName instance, call:

MediaSize size = MediaSizeName.getMediaSizeForName(paper);

MediaPrintableArea

MediaPrintableArea is used in a print request in conjunction with a compatible Media to specify the area of the paper on which to print. Printer hardware usually defines the printable area of a page, which is rarely the entire page. For this reason, an application needs to determine what printable area a printer defines for a particular size media to ensure that the print data can fit within this area.

For example, to determine the supported printable area for 5" x 7" paper, the application needs to choose a media size attribute value that corresponds to this size paper and then query the print service with the media size:

PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(MediaSizeName.NA_5X7);
MediaPrintableArea printableArea =
(MediaPrintableArea)service.
        getSupportedAttributeValues(MediaPrintableArea.class, null, aset);
The returned value indicates the largest printable area that can be supported by that printer for that paper size.

Destination

The Destination attribute allows you to redirect your print data to a file rather than sending it to a printer device. The "print-to-file" option is very common in user dialogs, but the spooled data is not always usable because it might be a device-specific raster that can only be interpreted by the device from which it was redirected. For this reason, the Java Print Service API requires that the client query the print service to determine if it can redirect the output to a file. The service might not support the category at all, or it might support only particular values. For example, since the JPS API can be used in an network environment, in which the formatting of print data does not occur on the host computer, specifying a local file for output might not be possible because the service formatting the data might not have access to the local filesystems of the client. The Destination attribute takes a URL as the value of the destination, which allows a network printer to use a protocol such as ftp to upload formatted print data. However, most printers that support this attribute will run as part of a local environment and can accept the "file:" protocol URL. This code snippet redirects the output to a file called out.prn on the c: drive:

aset.add(new Destination("file:c:\out.prn"));

SheetCollate

The SheetCollate attribute allows you to specify whether or not your print job is collated when you are printing more than one copy of a multi-page document. For example, the pages of a 3-page, 2-copy collated job will print as (1,2,3,1,2,3), but the pages of the same document submitted in a 2-copy uncollated job will be printed as (1,1,2,2,3,3). This attribute is not in version 1.1 of the IPP specification, but it is very useful and most printers support it. This code snippet demonstrates specifying a collated job:

aset.add(SheetCollate.COLLATED);

Sides

Some printers, particularly high-end printers, can print on both sides of the paper. The Sides attribute allows applications to specify two-sided printing instead of the usual default of single-sided printing. Two-sided printing is sometimes referred to as "duplex" or "tumble" printing. These two values are differentiated by the orientation of the output. The Java Print Service API refers to duplex as "two sided long edge" and tumble as "two sided short edge". Read the API specification for Sides for further explanation. This code snippet specifiesthat a job print the documents two-sided:

aset.add(Sides.DUPLEX);

Fidelity

The Fidelity attribute is an IPP boolean attribute that represents whether or not a print job should be rejected if the print service does not support any attribute specified in the print request. Fidelity is not an attribute many developers will need to consider, but it is an important attribute in the context of the JPS API. The default value is FIDELITY_FALSE, which indicates that a print job should not be rejected if the print service does not support an attribute specified in the print request. For example, if an application specifies an orientation of reverse landscape, but the printer does not support reverse landscape, the job is rejected if fidelity is true, but if fidelity is false then the printer might substitute a reasonable alternative, such as the landscape orientation. The Fidelity attribute allows applications to decide whether to only print the document exactly as specified or to print it even though the printer might not support all attributes. This code snippet specifies that a job should be rejected if the printer does not support the requested attributes:

aset.add(Fidelity.FIDELITY_TRUE);
For the cases in which fidelity is important, the Java Print Service API provides many tools for applications to query exactly what can be supported for a particular print request. See the various query methods on the PrintService interface.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

Attribute Roles

When submitting a print job to a printer, the client provides the attributes describing the characteristics of the print data, such as the document name, and how the print data should be printed, such as double-sided, five copies. If a print job consists of multiple pieces of print data, different pieces might have different processing instructions, such as 8 x 11 inch media for the first document, and 11 x 17 inch media for another document.

Once the printer starts processing the print job, additional information about the job becomes available, which might include: the job state (such as completed or queued) and the number of pages printed so far. These pieces of information are also attributes. Attributes can also describe the printer itself, such as: the printer name, the printer location, and the number of jobs queued.

The Java Print Service API defines these different kinds of attribute roles with five subinterfaces of Attribute:

  • PrintRequestAttribute is used by an application to represents a setting applied to an entire print job and to specify how the entire print job should be printed.
  • DocAttribute is used by an application to specify a characteristic of a single document and the print job settings to be applied to the document.
  • PrintJobAttribute is used by a print service to report how a job is being printed. These values will usually be identical the requested attribute values. However, if the printer does not support the value of a print request attribute then the corresponding print job attribute contains a different value that is supported by the printer
  • PrintServiceAttribute is used by a print service to report the status of the print service.
  • SupportedValuesAttribute is used by a print service o indicate the range of values supported for a request attribute. For example, a printer might support only a certain range of copies. When a print service is queried for the supported range of copies, it returns this information in a CopiesSupported object, which implements SupportedValuesAttribute.
Many attributes can be members of more than one role. For example, the Media attribute belongs to the doc, print job, and print request roles because the Media attribute can describe the paper size, the paper tray, or paper type. In fact, most doc attributes are also request attributes, and all request attributes are also job attributes.

The next section describes how to collect attributes together into attribute sets, which also have roles.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

Attribute Sets

A client usually needs to provide more than one processing instruction when submitting a print job. For example, the client might need to specify an A4 media and a landscape orientation. To send more than one processing instruction to the printer, the client collects the attributes representing the instructions into an attribute set, which the Java Print Service API represents with the AttributeSet interface.

The AttributeSet interface is similar to the java.util.Map interface: it provides a map of keys to values, in which each key is unique and can contain no more than one value. However, the AttributeSet interface is designed to specifically support the needs of the Java Print Service API. An AttributeSet requires that:

  • Each key in an AttributeSet corresponds to a category, and the value of the key can only be one of the attribute values that belong to the category represented by the key. Thus, unlike a Map, an AttributeSet restricts the possible values of a key: an attribute category cannot be set to an attribute value that does not belong to that category.
  • Only attributes implementing the Attribute interface can be added to the attribute set.
  • Only one attribute from a particular category can exist in an AttributeSet. For example, if an attribute set already contains a Media attribute, adding another Media attribute overwrites the first one.
Like a single attribute, an attribute set has a role. The roles are defined by the AttributeSet subinterfaces, which parallel the Attribute subinterfaces mentioned in the Attribute Roles section. The AttributeSet subinterfaces are: PrintRequestAttributeSet, PrintJobAttributeSet, DocAttributeSet, and PrintServiceAttributeSet. The role of the attribute set determines what kind of attributes it contains: a print request attribute set can contain only print request attributes.

The Java Print Service API includes HashAttributeSet as a concrete implementation of the AttributeSet interface, but developers can provide their own implementation. Rather than using HashAttributeSet directly, applications will more often use one of the subclasses of HashAttributeSet, which are: HashPrintRequestAttributeSet, HashPrintJobAttributeSet, HashDocumentAttributeSet, and HashPrintServiceAttributeSet. These subclasses implement the corresponding AttributeSet subinterfaces. For example PrintRequestAttributeSet extends AttributeSet, and HashPrintRequestAttributeSet is the concrete implementation of PrintRequestAttributeSet. An attribute set created with HashPrintRequestAttributeSet or any implementation of PrintRequestAttributeSet can contain only request attributes.

Unlike its subclasses, a HashAttributeSet can contain any kind of attribute. An application uses a HashAttributeSet directly when it needs a set to contain more than one kind of attribute. One example is the set returned by the getUnsupportedAttributes method of PrintService. The unsupported attributes returned might belong to more than one attribute role.

As with single attributes, applications will more often create request attribute sets because specifying print requests is the printing application's primary function. To create a request attribute set, use one of the constructors from the HashPrintRequestAttributeSet class:

PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
The next section describes some of the more commonly-used attributes that you can add to a set.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

Attribute Categories and Values

Every printer has a set of capabilities, such as the ability to print on different paper sizes or the ability to print more than one copy. Each of the capabilities has a range of values. For example, a printer's orientation capability might have this range of values: [landscape, portrait]. For each print request, the capability is set to one of these possible values. The Java Print Service API uses the term attribute category to refer to a printer capability, such as orientation, and the term attribute value to refer to the value of the capability, such as landscape.

In the Java Print Service API, an attribute category is represented by a Java class implementing the Attribute interface, and attribute values are instances of such a class or one of its subclasses. For example, to print 5 copies of a job, an application constructs an instance of the Copies class with the value of 5 and uses the Copies instance to specify the print job. The Copies class represents the attribute category, and the Copies instance represents the attribute value. Because the attribute value is encapsulated as a Java object, the attribute value implies its attribute category, and so an attribute value is usually referred to simply as an attribute. The category and value constitute a key-value pair, which you can add to a set along with other attributes. See Attribute Sets for more information

The Attribute interface defines just two methods: getName and getCategory. The getName method returns a String name for the attribute category. The getCategory method returns the class that first implements that category. To ensure that all implementations of a particular category report the same name and class, subclasses should not override the getName or getCategory methods.

To determine what attribute categories and values are supported by a printer, use the query methods defined in the PrintService interface. A print request does not need to specify attribute values for all of the target printer's supported attribute categories: each supported attribute category has a default value. For example, a printer might support printing up to 999 copies of a job, but if a print request does not specify the number of copies, the printer almost always prints a default of just 1 copy.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


2 - Attributes

Documentation Contents
CONTENTS | PREV | NEXT

How to Specify Attributes

Whether you are printing or streaming data, you specify attributes in the same way. You will usually use PrintRequestAttribute more often than the other kinds of attributes because print request attributes specify the settings for an entire print job. Bec ause you will most likely want to specify more than one attribute for a particular job, you need to create an attribute set. This sample demonstrates creating a PrintRequestAttributeSet that instructs the service to use A4 media to print five copies of th e job using both sides of the paper:

PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new Copies(5));
aset.add(MediaSize.ISO_A4);
aset.add(Sides.DUPLEX);
After creating an attribute set, you will pass it to the print job's print method, along with the DocFlavor. The Specifying Document Types discusses using DocFlavor. The Printing and Streaming Documents chapter discusses how to print. The next section explains some of the more commonly-used attributes in more detail.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Specifying Document Types

Documentation Contents
CONTENTS | PREV | NEXT

Importance of Character Encoding

If a MIME type for byte print data does not include a charset parameter, indicating the encoding, the Java Print Service assumes a character set of US-ASCII. This behavior is different than that of the Java runtime, which always assumes the default encodi ng for the user's locale on the underlying operating system, which might be different than US-ASCII.

Every instance of the Java Virtual Machine* has a default character encoding determined during virtual-machine startup that usually depends upon the locale and charset used by the underlying operating system. In a distributed environment, two JVM's might n ot share the same default encoding. Thus clients who want to stream platform-encoded text data from the host platform to a Java Print Service instance must explicitly declare the charset and not rely on defaults.

For these reasons, applications that stream text data should always specify the charset in the MIME type. To specify a MIME type, an application needs to determine the host platform's encoding, which it does by calling the DocFlavor.hostEncoding metho d. The MIME type returned from this method is guaranteed to be understood by the current JVM.

See character encodings for more information on the character encodings supported on the Java platform.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Specifying Document Types

Documentation Contents
CONTENTS | PREV | NEXT
CHAPTER 3

Specifying Document Types

From the user's perspective, a document can take many different forms, including: a PDF file, an image from a digital camera, an email, a word processor document, or a web page. Before printing a document of a particular format, the client needs to ensure that the printer can understand the format. Sometimes a printer can directly print documents of a given format: photo printers can directly print images of various formats, and PostScript printers can directly print a PostScript document. However, there are few printers that can directly print a wide range of formats; most printers require some higher-level software support to translate the source document into a format they can print.

A printing API needs to provide a way to describe document types so that:

  • The printer can report what formats it can print.
  • The client can describe the format of the data it wants to print.
  • The client can describe the encoding of text data.
The Java Print Service API describes document types using the DocFlavor class. A DocFlavor is comprised of:
  • A MIME type that tells the printer how to interpret the data.
  • A representation class name indicating the Java class that describes how the data is sent to the printer.
To describe an HTML page to a print service, a client might choose to use a DocFlavor with a MIME type string of "text/html; charset=utf-16" and a representation class name of "java.io.InputStream". The client can obtain this DocFlavor in one of two ways:
  • Construct a DocFlavor:DocFlavor htmlStreamFlavor = new DocFlavor("text/html; charset=utf-16", "java.io.InputStream");
  • Use the pre-defined instance that represents this type of DocFlavor:DocFlavor.INPUT_STREAM TEXT_HTML_UTF_16 . The Java Print Service API provides a set of pre-defined instances for common doc flavors as a convenience.
Because the HTML page contains text data, the MIME type String includes the text encoding, which is charset=utf-16 in this example. The client is responsible for accurately describing the print data to the print service. The section, Client-Formatted Print Data, explains how to properly construct a DocFlavor to accomplish this. If the text encoding is not included in the MIME type, unexpected results can occur, as explained in the section, Importance of Character Encoding. The client can allow the service to determine the format of data that the client supplies as a Java object. The Service-Formatted Print Data section describes using a DocFlavor to represent service-formatted print data.

Keep in mand that, just because the DocFlavor API has a pre-declared doc flavor, this doesn't mean that an implementation of the particular flavor is available. For example, even if you use the pre-defined DocFlavor representing HTML text in UTF-16, you won't be able to print the HTML unless you have a print service that supports printing HTML. Again, it is the user's responsibility to ensure that a printer supports a particular format.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Specifying Document Types

Documentation Contents
CONTENTS | PREV | NEXT

Service-Formatted Print Data

Rather than the client describing the print data format with a MIME type, the client can supply a Java object from which a print service determines the print data format. For example, the Java object can encapsulate a PostScript document. Instead of the client explicitly describing the document as PostScript with a MIME type, the client can wrap a reference to the document in a Java object, which the print service inspects to determine that the format is PostScript. Because the print data is delivered to the print service through the Java object, the class that the Java object implements is the representation class.

The DocFlavor class has an inner class called DocFlavor.SERVICE_FORMATTED that contains DocFlavor object constants representing service-formatted print data. Each of these constants has a MIME type of "application/x-java-jvm-local-objectref", which indicates that the client will supply a reference to a Java object implementing the interface named as the representation class.

The three DocFlavor object constants contained in DocFlavor.SERVICE_FORMATTED each represent a common representation class name used with service-formatted print data:

  • DocFlavor.SERVICE_FORMATTED.PAGEABLE:The client supplies an object that implements thejava.awt.print.Pageable interface, which represents a set of pages to be printed. The printer calls methods in that interface to obtain the pages to be printed, one by one. For each page, the printer supplies a graphics context and prints whatever the client draws in that graphics context.
  • DocFlavor.SERVICE_FORMATTED.PRINTABLE:The client supplies an object that implements the java.awt.print.Printable interface, which is responsible for drawing the contents of each page. The printer calls methods in that interface to obtain the pages to be printed, one by one. For each page, the printer supplies a graphics context and prints whatever the client draws in that graphics context.
  • DocFlavor.SERVICE_FORMATTED.RENDERABLE_IMAGE:The client supplies an object that implements interface java.awt.image.renderable.RenderableImage, which represents an image that can be manipulated in a rendering-independent manner and can be rendered to various contexts, such as a printer, without compromising quality. The printer calls methods in the interface to obtain the image to be printed.
  • As stated in the Introduction, applications that wrap 2D graphics into a Java object can use the service-formatted print data DocFlavor constants. See Printing and Streaming 2D Graphics for more information.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Specifying Document Types

Documentation Contents
CONTENTS | PREV | NEXT

Client-Formatted Print Data

The client uses the DocFlavor to describe the print data format and to indicate how the data will be delivered to the print service. The MIME type specifies the data format. The representation class name specifies how the data will be delivered to the printer.

The DocFlavor class has an inner class for each of the common representation class names. Each inner class contains a set of DocFlavor object constants representing formats that can be delivered using the representation class. For example, an input stream can stream many different kinds of print data formats, including GIF, represented by DocFlavor.INPUT_STREAM.GIF, and PostScript, represented by DocFlavor.INPUT_STREAM.POSTSCRIPT. If one of the DocFlavor object constants accurately describes the format of a given piece of print data, the client can use this constant instead of constructing a DocFlavor.

If the appropriate DocFlavor is not already defined in the JPS API, a client can create it with the DocFlavor constructor. The client can use the MIME types and representation class names explained in the next two sections to construct the DocFlavor.

MIME Types for Preformatted Data

The four most common types of preformatted data are: text data, page description language documents, image data, and autosense print data. This section describes each one of these data types and lists their corresponding MIME types.

Text Data

Preformatted text data is usually provided in a character-oriented representation class, such as a character array, String, or Reader, or in a byte-oriented representation class, such as a byte array, input stream, or URL. Plain text and HTML are two common forms of preformatted text data. You can use these MIME type strings to represent the format of the data when constructing a DocFlavor:

MIME type | Format of data
"text/plain" | Plain text in the default character set US-ASCII
"text/plain;charset=xxx" | Plain text in character set xxx
"text/html" | HyperText Markup Languge in the default character set (US-ASCII)
"text/html;charset=xxx" | HyperText Markup Languge in the character set xxx

Page Description Language Documents

Preformatted page description language (PDL) documents are usually provided in a byte-oriented representation class, such as byte array, InputStream, or URL. You can use these MIME type strings to represent the format of the data when constructing a DocFlavor:

MIME type | Format of data
"application/pdf" | Portable Document Format document
"application/postscript" | PostScript document
"application/vnd.hp-PCL" | Printer Control Language document

Image Data

Preformatted image data is provided in a byte-oriented representation class: byte array, InputStream, or URL. You can use these MIME type strings to represent the format of the data when constructing a DocFlavor:

MIME type | Format of data
"image/gif" | Graphics Interchange Format image
"image/jpeg" | Joint Photographic Experts Group image
"image/png" | Portable Network Graphics image

Autosense Print Data

Preformatted autosense print data allows the printer to decide how to interpret the print data. This type of data is usually provided in a byte-oriented representation class. You can use this MIME type string to represent the format of the data when constructing a DocFlavor:

"application/octet-stream"

Representation Classes

For client-formatted print data, the print data representation class is usually one of the following:

Print data representation class | Description
Character array (char[]) | The print data consists of the Unicode characters in the array. This representation class can provide text data and PDL data.
java.lang.String | The print data consists of the Unicode characters in the string. This representation class can provide text data.
A Character stream represented by java.io.Reader | The print data consists of the Unicode characters read from the stream up to the end-of-stream. This representation class can provide text data.
Byte array (byte[]) | The print data consists of the bytes in the array. The bytes are encoded in the character set specified by the doc flavor's MIME type. If the MIME type does not specify a character set, the default character set is US-ASCII. This representation class can provide text data, PDL documents, and image data.
A Byte stream represented by java.io.InputStream | The print data consists of the bytes read from the stream up to the end-of-stream. The bytes are encoded in the character set specified by the doc flavor's MIME type. If the MIME type does not specify a character set, the default character set is US-ASCII. This representation class can provide text data, PDL documents, and image data.
Uniform Resource Locator, java.net.URL | The print data consists of the bytes read from the URL location. The bytes are encoded in the character set specified by the doc flavor's MIME type. If the MIME type does not specify a character set, the default character set is US-ASCII. This representation class can provide text data, PDL documents, and image data. To print documents to a network print service that might not have access to the URL, open an input stream on the URL and use an input stream data flavor instead.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


3 - Specifying Document Types

Documentation Contents
CONTENTS | PREV | NEXT

How to Use DocFlavor

These steps illustrate the role of the DocFlavor in a typical application:
  1. A client determines the format of the print data and decides how to present the data to the printer. The client then creates or obtains a DocFlavorrepresenting the format:DocFlavor flavor = DocFlavor.INPUT_STREAM.GIF;
  2. The client uses the DocFlavor to find printers that can understand the format specified by the DocFlavor and has the capabilities specified in the client's attribute set:PrintService[] services = PrintServiceLookup.lookupPrintServices(flavor, aset);
  3. From a print service, the client creates a print job, represented by a DocPrintJob object:DocPrintJob printJob = services[0].createPrintJob();
  4. The client creates a Doc representing the document to be printed:Doc doc = new InputStreamDoc("duke.gif", flavor);
  5. The client prints the document by calling the print method of the DocPrintJob object:printJob.print(doc, aset);When the client passes the Doc object to the print method, the DocPrintJob object obtains the print data from the Doc object and determines the doc flavor that the client can supply. The doc flavor's representation class is a conduit for the DocPrintJob to obtain a sequence of characters or bytes from the client.
The Printing and Streaming Documents chapter demonstrates a complete printing application.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Print Service Providers

Print Service Providers are third parties that write an implementation of the abstract class PrintServiceLookup and install it according to the SPI JAR file specification.

This class provides a standardized API for looking up instances of print services. For example an IPP print service provider, a JINI lookup service, or a JNDI-based directory service may each be implementations of this class which can return PrintServices.

The API is reasonably simple and generally requires implementation of the PrintServiceLookup class, and the PrintService interface, and DocPrintJob. The PrintService should also support the events defined by the Java Print Service API.

How much more code there is depends on the document types that are supported. If a printer wants to be able to print a JPEG image and the printer already has such capability in hardware, its little more than a case of properly spooling the data. However, to print 2D graphics, a class that can turn the graphics calls into a printer-formatted raster is a significant body of work.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Obtaining a Print Job

A print job is a submitted print request and includes one or more pieces of print data and a set of processing instructions. The Java Print Service represents a print job with the DocPrintJob object. Whether you are sending print data to a stream or to a printer, you create a print job in the same way: by calling createPrintJob on the service:

   DocPrintJob pj = pservices[0].createPrintJob();
An application obtains a print job from a service because the service only creates print jobs that are capable of handling data that the particular service can accept.

The DocPrintJob interface provides the print method, which takes a PrintRequestAttributeSet parameter and a Doc encapsulating the print data and the doc flavor:

   pj.print(doc, aset);
The next section discusses creating a Doc.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Creating a Doc

To create a Doc you must provide an implementation of the Doc interface. The Java Print Service API provides a convenient implementation of Doc called SimpleDoc. An application is not required to use the SimpleDoc implementation, but to ensure compliance with Doc, any Doc implementation must observe the same required semantics that SimpleDoc implements, which are:
  • Every Doc implemenation must implement all five methods of the Doc interface.
  • The Doc implementation must allow multiple threads to access the Doc object.
  • Every time a Doc method is called, it returns the same object. This means you do not return a new stream. Since there is only one input stream there can only be one consumer of the Doc.
  • The Doc returns a stream for the service if requested
  • The Doc checks if the data type matches the doc flavor
  • The attributes returned from getAttributes always override those passed in the print method.
Before creating a Doc, you need to load your document from the file. The representation class of the DocFlavor determines how you load the document from the file. In this case, the representation class is an InputStream:

   FileInputStream fis = new FileInputStream("java2dlogo.gif");
Once you have the stream, pass it to SimpleDoc with the DocFlavor and a DocAttributeSet, ifi you have one. If you don't have a DocAttributeSet, pass in null instead:

   Doc doc = new SimpleDoc(fis, flavor, null);
See Example: PrintGIF.java for an example of a custom Doc implementation.

The next section demonstrates how to register for events on your print job or service.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

StreamPrintService Versus PrintService

The Java Print Service API includes a PrintService class and a StreamPrintService class. A StreamPrintService extends PrintService, and so a StreamPrintService can be used anywhere a PrintService can be used. However, PrintService and StreamPrintService are used for different purposes. APrintService is used to direct output to a printer; a StreamPrintService is used to export formatted print data to a stream, usually to a different format. When locating a StreamPrintService, you specify the required output format in the form of a MIME type argument and provide an OutputStream to receive the data. You do not provide a representation class when locating a StreamPrintService, as you do when locating a PrintService, because the output is always delivered to an OutputStream.

After locating a service, you obtain a print job and submit the print job to the service in the same way whether you are using a PrintService or a StreamPrintServie. The major differences between StreamPrintService and PrintService are in the way they are located. The next section discusses locating both print services and stream print services.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Registering for Events

The Java Print Service API allows services to report two types of events to applications: printer status updates and print job progress updates. The events API, which includes the javax.print.event package and methods to register listeners on a service and DocPrintJob, follows the familiar listener model used in AWT.

Print Service Events

Print Service event listeners monitor a service's changes in status and report events as changes in the values of print service attributes. An application can monitor events on a print service by implementing the javax.print.event.PrintServiceAttributeListener interface and installing itself as a listener on a PrintService as shown in this example:

public class PrintPS implements PrintServiceAttributeListener {
        ...
        pservices[0].addPrintServiceAttributeListener(this);
        ...
        public void attributeUpdate(PrintServiceAttributeEvent e){
                // Do something if an attribute is updated
        }
...
The PrintServiceAttributeListener.attributeUpdate() method is called when print service attributes change. The service uses the PrintServiceAttributeListener interface to decide which events it supports.

An application can discover which print service attributes a service supports by using the same query methods it uses to discover which request attributes a service supports. For example, to discover if the service supports the QueuedJobCount attribute an application calls:

service.isAttributeCategorySupported(QueuedJobCount.class);
The service determines how frequently it reports updates on attributes. If many attributes are supported, the service might batch events, which means an application isn't guaranteed to receive a particular event. The delivered event contains only attributes that have changed in value, which means that static service attributes, such as the printer model, will never be reported in an event.

Print Job Events

Most printing clients are more interested in monitoring a print job than monitoring a service's status. A client can install two different kinds of listeners on a DocPrintJob: PrintJobAttributeListener and PrintJobListener.

PrintJobAttributeListener

PrintJobAttributeListener is similar to the service attribute listener: the job reports changes in attributes that implement the PrintJobAttribute interface. Usually these attributes are also print request attributes and are fixed over the lifetime of a print job. Only a few attributes, such as JobMediaSheetsCompleted, are likely to change. Since few clients are interested in this granularity of detail, and even fewer services support this capability, clients will most likely use PrintJobListener to monitor a job's progress.

PrintJobListener

PrintJobListener is easier to use than PrintJobAttributeListener because it delivers simple messages, such as printJobCompleted or printJobFailed. The interface has only six methods, each of which reports a significant but simple piece of information as an event. As a convenience, the adapter class, PrintJobAdapter, provides default implementations of these six methods.

One message in particular: printJobNoMoreEvents is unusual but useful. A client is often interested in knowing if a job has finished or failed. If possible, a service should deliver such "terminal" events, but sometimes the service cannot be sure if the job finished or failed, and a "completed" message is misleading in this case. For example, a job might be spooled to a network print service that has a queue that's not visible. In this case, the "no more events" message is not sufficient to say that the job has succeeded, but the client can at least infer that it is not known to have failed. The following example demonstrates adding a listener that monitors printJobNoMoreEvents messages:

public class PrintPS extends PrintJobAdapter{
        ...
        pj.addPrintJobListener(this);
        ...
        public void printJobNoMoreEvents(PrintJobEvent e){
                // Do something here
        }
...

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT
CHAPTER 4

Printing and Streaming Documents

Before submitting a print job, an application needs to locate print services that have the capability to handle the print data. Once the appropriate service is located, the application obtains a print job from it and submits the print job to the service.

This chapter demonstrates how to print and stream documents by:

  • Locating appropriate services using the elements presented in the two previous chapters: Attributes and Document Flavors
  • Creating a print job
  • Submitting the print job to the printer or service
  • Registering for events on the print job or service.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Submitting the Print Job

Once you have the Doc and DocPrintJob, you can call the DocPrintJob object's print method to submit the document to the service. The Submitting the Print Job to the Printer section completes the printin g example. The Submitting the Print Job to the Stream section completes the streaming example.

Submitting the Print Job to the Printer

This section completes the printing application explained in this chapter. This example prints five copies of a PostScript document, double-sided on A4 paper, and stapled.

       DocFlavor psFlavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
        aset.add(new Copies(2));
        aset.add(MediaSizeName.ISO_A4);
        aset.add(Sides.TWO_SIDED_LONG_EDGE);
        aset.add(Finishings.STAPLE);
        PrintService[] pservices = PrintServiceLookup.lookupPrintServices(psFlavor,
                                                        aset);
        if (services.length > 0) {
                DocPrintJob pj = pservices[0].createPrintJob();
                try {
                        FileInputStream fis = new FileInputStream("example.ps");
                        Doc doc = new SimpleDoc(fis, psFlavor, null);
                        pj.print(doc, aset);
                } catch (IOException e) {
                        System.err.println(e);
                } catch (PrintException e) {
                        System.err.println(e);
                }
        }
See Example: PrintPS.java for the complete application.

Submitting the Print Job to the Stream

This section completes the streaming example explained in this chapter. This example converts a GIF document to PostScript and embeds the specified printing attributes into the PostScript document.

       DocFlavor flavor = DocFlavor.INPUT_STREAM.GIF;
        String psMimeType = DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType();
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
        aset.add(new Copies(2));
        aset.add(MediaSizeName.ISO_A4);
        aset.add(Sides.TWO_SIDED_LONG_EDGE);
        aset.add(Finishings.STAPLE);
        StreamPrintServiceFactory[] factories =
                StreamPrintServiceFactory.lookupStreamPrintServiceFactories(
                                flavor, psMimeType);
        if(factories.length==0) {
                System.err.println("No suitable factories");
                System.exit(0);
        }
        try {
                FileInputStream fis = new FileInputStream("java2dlogo.gif");
                String filename = "newfile.ps";
                FileOutputStream fos = new FileOutputSteam(filename);
                StreamPrintService sps= factories[0].getPrintService(fos);
                DocPrintJob pj = sps.createPrintJob();
                Doc doc = new SimpleDoc(fos, psFlavor, aset);
                pj.print(doc, aset);
        } catch (IOException e) {
                System.err.println(e);
        } catch (PrintException e) {
                System.err.println(e);
        }
}
See Example: PrintGIFtoStream.java for the complete application.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


4 - Printing and Streaming Documents

Documentation Contents
CONTENTS | PREV | NEXT

Locating Services

An application locates a print service in a slightly differently way from locating a stream print service. The Discovering Print Services section explains locating print services. The Discovering Stream Prin t Services section explains locating stream print services.

Discovering Print Services

Before sending a print job to a printer, the application needs to find printers that have the capabilities to handle the print job. To print a double-sided document, the application first needs to find printers that have the double-sided printing capabili ty.

The javax.print.PrintServiceLookup class included in the Java Print Service API provides static methods that applications use to locate printers.

An application invokes the lookupPrintServices method of PrintServiceLookup with a DocFlavor and an AttrbuteSet:

DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(MediaSizeName.ISO_A4);
aset.add(new Copies(2));
PrintService[] service =
        PrintServiceLookup.lookupPrintServices(flavor,
                        aset);
This method returns an array of print services representing printers that have the capabilities specified in the attribute set and can print the data format specified in the doc flavor. See the Attributes c hapter and the Specifying Document Types chapter for more help in choosing a DocFlavor and creating an AttributeSet.

The base set of printers returned from the lookupPrintServices method are the same as the set of printers returned by the platform. For example, when using Windows NT, the set of returned printers is the same as the set of printers visible in the Windows Printer Control Panel. Likewise, when using Solaris, the returned printers are the same as those enumerated by the System V UNIX "lpstat" command. However, since third parties can augment these sets, additional printers, such as JINI printers, can be retu rned.

After obtaining a suitable PrintService, the application can access its many query methods to determine what values are supported for attribute categories. The Obtaining a Print Job section explains how to g et a print job from the PrintService.

Discovering Stream Print Services

An application uses stream print services to convert print data to different formats. This is useful, for example, if you do not have a printer that can print the format of a particular piece of print data. This section demonstrates how to convert a GIF d ocument into Postscript using a StreamPrintService.

The StreamPrintServiceFactory class has a lookupStreamPrintServiceFactories method for locating stream print services. This method, like the lookupPrintServices method in PrintServiceLookup, takes a DocFlavor that represents the type of the input document --in this case, DocFlavor.INPUT_STREAM.GIF. Unlike lookupPrintServices, this method also takes a MIME type. This MIME type represents the format of the output. Since this example converts GIF to postscript, the MIME type is "application/postscript" ;. The DocFlavor class has the getMimeType method for returning the MIME type from a DocFlavor. The lookupStreamPrintServicesFactories method returns an array of StreamPrintServiceFactory objects, which are factories for StreamPrintService instances. This code sample demonstrates obtaining an array of StreamPrintServiceFactory objects that can return StreamPrintService objects able to convert a GIF image into PostScript:

DocFlavor flavor = DocFlavor.INPUT_STREAM.GIF;
String psMimeType = DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType();
StreamPrintServiceFactory[] psfactories =
        StreamPrintServiceFactory.lookupStreamPrintServiceFactories(
                flavor, psMimeType);
The StreamPrintServiceFactory object has an instance method called getPrintService that takes an OutputStream parameter and creates a StreamPrintService instance that writes to that stream:

FileOutputStream fos = new FileOutputStream(filename);
StreamPrintService psService = psfactories[0].getPrintService(fos);
The JDK V1.4 includes one stream print service that can export Postscript from graphics calls, such as through the Pageable and Printable interfaces. To verify the availability of this service, use the StreamPrintServiceFactory class to try to l ocate it. The Printing and Streaming 2D Graphics chapter discusses streaming 2D graphics.

StreamPrintService implements PrintService, which means you can use a StreamPrintService wherever you can use a PrintService. The application is responsible for closing the output stream after a job has printed to the stream. Once the stream is closed, th e StreamPrintService instance can no longer be used.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


5 - Printing and Streaming 2D Graphics

Documentation Contents
CONTENTS | PREV | NEXT

Using Service-Formatted Data

You can print or stream 2D graphics encapsulated in a Pageable or Printable object using a DocPrintJob and a service-formatted DocFlavor. A DocFlavor can represent any kind of data, including Java objects. An implementation of the Pageable or Printable interface is a Java object. As discussed in the Specifying Document Types chapter, the Java Print Service API includes pre-defined DocFlavor object constants for print data in the form of a Java object. An application can look up print services or stream print services supporting this type of data, encapsulate the object in a Doc implemetation and submit it to the service in a DocPrintJob. The Printing the Service-Formatted Data section demonstrates printing the data. The Streaming Service-Formatted Print Data section demonstrates streaming the data. Registering for events on 2D graphics printing applications using DocPrintJob is done the same way as for document printing applications using DocPrintJob. See Registering for Events for more information.

Printing the Service-Formatted Data

To locate print services that can handle the service-formatted data, pass the appropriate service-formatted DocFlavor object constant to the lookupPrintServices method:

PrintService []services =
        PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE,
                                                        null);
The printing application implements the Printable interface. To create the Doc, use SimpleDoc, passing this in for the printData, the service-formatted DocFlavor constant for the DocFlavor, and an optional attribute set:

Doc  doc = new SimpleDoc(this, DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
Create the DocPrintJob, and submit it to the service:

DocPrintJob pj = service[0].createPrintJob();
pj.print(doc);
See Example: Print2DGraphics.java for the complete application.

Streaming Service-Formatted Print Data

A stream print service can be used to export 2D graphics encapsulated in a Java object to another format. This example exports graphics in a Printable to Postscript:

DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE
StreamPrintServiceFactory []factories =
        StreamPrintServiceFactory.lookupStreamPrintServiceFactories(flavor,
                                                        "application/postscript"));
if (factories.length == 0) {
        System.err.println("No suitable factories");
        System.exit(0);
}
try{
        FileOutputStream fos = new FileOutputStream("out.ps");
        StreamPrintService sps = factories[0].getPrintService(fos);
}
Doc  doc = new SimpleDoc(this, flavor, null);
sps.createPrintJob().print(doc);
See Example: Print2DtoStream.java for the complete application

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


5 - Printing and Streaming 2D Graphics

Documentation Contents
CONTENTS | PREV | NEXT

Using PrinterJob to Print or Stream Graphics

The API in java.awt.print consists of these PrinterJob methods:
  • Static convenience methods to look up print services that can image 2D graphics, which are returned as an array of PrintService or StreamPrintServiceFactory objects depending on the method.
  • Methods to set and get a PrintService on a PrinterJob.
  • A pageDialog method that takes a PrintRequestAttributeSet parameter.
  • A printDialog method that takes a PrintRequestAttributeSet parameter.
  • A print method that takes a PrintRequestAttributeSet parameter.
Because the printDialog and pageDialog methods take an attribute set, users can edit the initail attribute settings from the dialogs.

Applications can use PrinterJob to print 2D graphics to a printer or to an output stream. The lookupPrintServices method returns an array of PrintService objects, each of which represents a printer that can print 2D graphics. The lookupStreamPrintServices method returns an array of StreamPrintServiceFactory objects, each of which can return a StreamPrintService. An application uses the StreamPrintService to send print data to an output stream. As with printing documents, applications can use a StreamPrintService to transcode 2D graphics to other formats. This section discusses using PrinterJob to submit 2D graphics to a printer and to an output stream.

Printing 2D Graphics

The pageDialog, printDialog, and print methods allow an application to initialize print settings and pass these settings to a dialog so that a user can update the settings before submitting the print request, as demonstrated by this code sample:

// Step 1: Set up initial print settings.
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
// Step 2: Obtain a print job.
PrinterJob pj = PrinterJob.getPrinterJob();
// Step 3: Find print services.
PrintService []services = PrinterJob.lookupPrintServices();
if (services.length > 0) {
        System.out.println("selected printer: " + services[0]);
        try {
        pj.setPrintService(service[0]);
        // Step 2: Pass the settings to a page dialog and print dialog.
        pj.pageDialog(aset);
        if (pj.printDialog(aset)) {
                // Step 4: Update the settings made by the user in the dialogs.
                // Step 5: Pass the final settings into the print request.
                pj.print(aset);
        }
        } catch (PrinterException(pe)) {
                System.err.println(pe):
        }
}
See Example: Print2DPrinterJob.java for the complete application.

Note that Step 4 in this code sample does not seem to correspond to any particular line of code. In fact, the user updates the print settings in the dialogs, and the updated settings are saved in the PrintRequestAttributeSet, aset.

One problem with using Java 2D and the Java Print Service together is that some attributes, such as number of copies, are defined in both APIs. If such an attribute is specified in a PrintRequestAttributeSet, it takes precedence over the same attribute specified in the PrinterJob. Note that if a user updates the number of copies in a print dialog, the PrinterJob is automatically updated to reflect that, which reconfirms the existing behavior.

The PageFormat specification also overlaps with the Java Print Service Media, MediaPrintableArea, and OrientationRequested attributes. If an application uses the Printable interface and the print(PrintRequestAttributeSet) method, the media, orientation, and imageable area attributes contained in the attribute set are added to a new PageFormat, which is passed to the print method of the Printable object. If an application uses the Pageable interface, the PageFormat does not change.

Streaming 2D Graphics

An application can also use a PrinterJob and a StreamPrintService to send print data to an output stream. This example is similar to the example in the previous section, except a StreamPrintService is used in place of a PrintService:

PrinterJob job = PrinterJob.getPrinterJob();
String psMimeType = "application/postscript";
FileOutputStream outstream;
StreamPrintService psPrinter;
StreamPrintServiceFactory []spsFactories =
        PrinterJob.lookupStreamPrintServices(psMimeType);
if (factories.length > 0) {
        try {
                outstream = new File("out.ps");
                psPrinter = factories[0].getPrintService(fos);
                // psPrinter can now be set as the service on a PrinterJob
        } catch (FileNotFoundException e) { }
}
job.setPrintService(service[0]); // if app wants to specify this printer.
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new Copies(2));
job.print(aset);
}

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


5 - Printing and Streaming 2D Graphics

Documentation Contents
CONTENTS | PREV | NEXT
CHAPTER 5

Printing and Streaming 2D Graphics

The Java 2D printing API is the java.awt.print package and provides for creating a PrinterJob, displaying a printer dialog to the user, and printing paginated graphics using the same java.awt.Graphics and java.awt.Graphics2D classes that are used to draw to the screen.

Many of the features in the Java Print Service, such as printer discovery and specification of printing attributes, are also very important to users of the Java 2D printing API. To make these features available to users of Java 2D printing, the java.awt.print package allows access to the Java Print Service from the Java 2D printing API.

Developers of Java 2D printing applications have four ways of using the Java Print Service with the Java 2D API:

  • Print 2D graphics using PrinterJob.
  • Stream 2D graphics using PrinterJob
  • Print 2D graphics using DocPrintJob and a service-formatted DocFlavor
  • Stream 2D graphics using DocPrintJob and a service-formatted DocFlavor
The Using PrinterJob to Print or Stream Graphics section explains the first two methods. The Using Service-Formatted Data section explains the other two methods.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Contents

Documentation Contents
CONTENTS | PREV | NEXT

Java Print Service API User Guide

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in JVM TI

Documentation Contents

Enhancements in JDK 6
Java Virtual Machine Tool Interface (JVM TI)

The following functionality has been added to the JVM tool interface (JVM TI) between its initial release in JDK 5.0 and JDK 6.
  • Support for transformation of class files - To facilitate dynamic transformation of classes which have already been loaded, the RetransformClasses function has been added. It is suited to operations such as adding instrumentation to methods. Support for retransformation means that access to the original class file is no longer required in order to instrument loaded classes. It can easily remove the applied transformation and it is designed to work in a multi-agent environment.
  • Enhanced heap walking support - More powerful and flexible heap functionality has been added. The new functionality:
    • allows access to primitive values (the value of Strings, arrays, and primitive fields)
    • allows the tag of the referrer to be set, thus enabling more efficient localized reference graph building
    • provides more extensive filtering abilities
    • is extensible, allowing abilities to grow in future versions of JVM TI
    The FollowReferences and IterateThroughHeap functions have been added along with supporting types and constants. The previous functionality is still supported but its use is discouraged.
  • More class information - The new GetConstantPool, GetClassVersionNumbers and IsModifiableClass functions provide additional information about a class.
  • Support for instrumenting native methods - The new SetNativeMethodPrefix and SetNativeMethodPrefixes functions allow native methods to be instrumented by providing a JVM-aware mechanism for wrapping the native method.
  • Enhanced support for instrumentation under the system class loader - The new AddToSystemClassLoaderSearch function allows instrumentation support classes to be defined by the system class loader.
  • Support for early return from a method - The new force early return functions allow debugger-like tools to force a method to return from any point in its execution.
  • Monitor stack depth information - The new GetOwnedMonitorStackDepthInfo function provides information about the monitors owned by the specified thread and the depth of the stack frame which locked them.
  • Support for resource exhaustion notification - The new ResourceExhaustedevent notifies the JVM when a critical resource (such as the Java platform heap) has been exhausted.
Other changes between JDK 5.0 and JDK 6 include new error codes, a revised definition for field index, allowing AddToBootstrapClassLoaderSearch to be called in the live phase, and considerable specification clean-up and clarification. For detailed information about the changes, see the Change History.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Virtual Machine Tool Interface

Documentation Contents

Java Virtual Machine Tool Interface (JVM TI)

The JVM tool interface (JVM TI) is a native programming interface for use by tools. It provides both a way to inspect the state and to control the execution of applications running in the Java virtual machine (JVM). JVM TI supports the full breadth of tools that need access to JVM state, including but not limited to: profiling, debugging, monitoring, thread analysis, and coverage analysis tools.

Note: JVM TI was introduced at JDK 5.0. JVM TI replaced the Java Virtual Machine Profiler Interface (JVMPI) and the Java Virtual Machine Debug Interface (JVMDI) which, as of JDK 6, are no longer provided.

JVM TI Reference

  • See the JVM TI Reference for overview, API reference, and usage information.

API Enhancements

  • See the API Enhancements in JDK 6 - An annotated list of API changes between the 5.0 and 6 releases.

More Information

  • Java Virtual Machines - features, command-line options, and additional information.
  • Java Native Interface - the interface which JVM TI extends.
  • java.lang.instrument package - a Java programming language alternate to JVM TI if only the instrumentation functionality of JVM TI is used.

* As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Customizing the RIA Loading Experience

Documentation Contents

Customizing the Rich Internet Application Loading Experience

Java Rich Internet Applications Guide > Customizing the Rich Internet Application Loading Experience

The following topics are covered:

  • The RIA Loading Experience
  • The RIA Loading Process
  • Customization Options
    • Adding a Splash Screen for an Applet
    • Implementing a Customized Loading Progress Indicator
      • The javax.jnlp.DownloadServiceListener Interface
      • Constructors of the Loading Progress Indicator Class
      • Methods of the javax.jnlp.DownloadServiceListener Interface
      • Specifying the Custom Progress Indicator in the JNLP File
      • How the RIA Software Communicates Progress
  • Best Practices and Tips

The RIA Loading Experience

Java Rich Internet applications (RIAs) are downloaded over the internet and displayed to the end user. The speed of the download may vary depending on various criteria such as the size of the RIA JAR file, any external dependencies, and the speed of the internet connection.

When the RIA is being downloaded, by default, the RIA software (Java Plug-in and Java Web Start software) will display the standard progress indicators, such as the spinning Java logo and progress bars. End users may get impatient when confronted with large downloads. With improvements in RIA software technology in the Java SE 6 update 18 and Java SE 6 update 21 releases, you can keep the end user engaged by providing a creative, captivating, and meaningful RIA loading experience. You can customize the RIA loading experience in several ways as described next.

  • By providing a splash screen
  • By creating a customized loading progress indicator
  • By leveraging one progress indicator to reflect progress of RIA download and the loading of RIA-specific data

You can also use a combination of the above options to accomodate older versions of the Java Runtime Environment (JRE) software on the client machine.

Note: Certain customization options are specific to applets or to Java Web Start applications. Such cases will be identified in this topic.

The RIA Loading Process

This section describes the process by which RIAs are loaded.

RIA software initiates a series of steps to download, validate, and execute a RIA. The RIA loading process can be broadly broken down into the following stages. RIA software provides varying levels of progress-related feedback during these stages.

  • Initialization – During this stage, RIA software performs an assessment of the resources required to launch the RIA. The amount of work required to download, validate, and execute the RIA is indeterminate at this time.
  • Loading and validation – RIA software downloads the required resources (JAR files) over the Internet, if necessary. If the RIA has been previously cached, RIA software loads the resources from the local cache. RIA software validates the resources. Deterministic feedback is communicated by the RIA software during the resource loading and validation process. Deterministic feedback implies that percent completion rates are calculated and communicated by the RIA software.
  • RIA Execution – During this stage, RIA software executes the RIA. The RIA is now fully functional. The RIA can load application-specific data at this time.

Customization Options

Adding a Splash Screen

The simplest way to customize a RIA's loading experience is to provide a splash screen. Specify the image that should be displayed in the splash screen. No changes are required in the RIA itself. RIA software displays the splash screen when the RIA is being loaded and hides it when the RIA's resources have been downloaded and validated. See the following topics for more information:

  • Creating a Splash Screen for an Applet topic in the Java Tutorials to view an example
  • Java Web Start FAQ and the resources Element in JNLP File Syntax for information about adding a splash screen for a Java Web Start application

Implementing a Customized Loading Progress Indicator

You can replace the default loading progress indicator with a custom implementation that provides regular feedback about how the RIA is loading. Don't feel constrained by rectangular boxes or the use of the Swing JProgressBar component. You can develop a customized loading progress indicator that is meaningful to your RIA or web site. The loading progress indicator can use visual or non-visual means to keep the end user interested and engaged while the RIA is loading in the background.

See Customizing the Loading Experience topic in the Java Tutorials for step-by-step instructions and detailed examples. A few screenshots of loading progress indicators are shown next.

Default loading progress indicator for Java Web Start application

Default Progress Indicator for Java Web Start applications

Customized loading progress indicator for Java Web Start application

Customized Progress Indicator for Java Web Start applications

Customized loading progress indicator for the Reversi JavaFX applet (black balls turn white as loading progresses)

Customized Progress Indicator for Reversi application

The following features enable varied customizations of the loading progress indicator for a RIA that is deployed by using JNLP technology:

  • The customized loading progress indicator can provide deterministic or non-deterministic feedback.
  • The customized loading progress indicator can provide visual or non-visual cues to communicate progress.
  • A single loading progress indicator can be developed to support applets and Java Web Start applications.
  • Multiple loading progress indicators can be defined as Java Network Launch Protocol (JNLP) extensions. The loading progress indicator specified in the RIA's main JNLP file takes precedence (if one is specified). You should specify which extension should be displayed to avoid undeterministic behavior.
  • The customized loading progress indicator can be leveraged to also display progress when loading application-specific data. For example, if a RIA invokes web services to load initial application data, you can use the progress range of 0 - 75% to indicate status of RIA download, and use the range of 76% - 100% to indicate progress of a web service invocation that fetches application data.
  • Loading progress indicators for applets can perform the following operations:
    • They can receive a reference to an instance of the java.applet.AppletStub class. This allows the loading progress indicator code to access the java.applet.AppletContext object to retrieve the applet's parameters.
    • They can invoke JavaScript code in the applet's parent web page. A reference to the window can be retrieved as shown next.
      JSObject window = JSObject.getWindow(null);
window.call("someJavaScriptFunction", args);

The next few paragraphs describe technical details about implementing a loading progress indicator.

The javax.jnlp.DownloadServiceListener Interface

A loading progress indicator class should implement the javax.jnlp.DownloadServiceListener interface.

Constructors of the Loading Progress Indicator Class

Specify the following constructors in the loading progress indicator class. The RIA software will invoke the appropriate constructor depending on the capabilities of the JRE software on the client machine. In some cases, RIA software may not instantiate the loading progress indicator class if all resources are up-to-date.

  • Constructor without any parameters – This constructor should be specified in the loading progress indicator class for a Java Web Start application. This constructor can also be specified in the loading progress indicator class for an applet. If the RIA software invokes this constructor, the loading progress indicator UI will be displayed in a top level window such as a javax.swing.JFrame object.
  • Constructor with one parameter – This constructor has one parameter of type java.lang.Object. The Object argument can be typecast to an instance of the java.awt.Container class. This constructor is relevant to loading progress indicators for applets. If the RIA software (in this case, Java Plug-in software) invokes this constructor, the loading progress indicator UI will be displayed in the applet's container.
  • Constructor with two parameters – This constructor has two parameters of type java.lang.Object. The first Object argument can be typecast to an instance of the java.awt.Container class. The second Object argument can be typecast to an instance of the java.applet.AppletStub class. If the RIA software (in this case, Java Plug-in software) invokes this constructor, the loading progress indicator UI will be displayed in the applet's container. The loading progress indicator can access the java.applet.AppletContext object to customize the loading progress indicator further. This constructor is relevant to loading progress indicators for applets.

    When specifying the constructor with two parameters, it is better to also specify the single-parameter constructor to accomodate older versions of the client JRE software. The constructor with two parameters is invoked only when the client JRE software version is at least Java SE 6 update 21.

Methods of the javax.jnlp.DownloadServiceListener Interface

The loading progress indicator class should implement the following methods of the interface to receive and convey the latest progress information.

  • progress(URL url, String version, long readSoFar, long total, int overallPercent)
  • upgradingArchive(java.net.URL url, java.lang.String version, int patchPercent, int overallPercent)
  • validating(java.net.URL url, java.lang.String version, long entry, long total, int overallPercent) – When the loading progress indicator class is instantiated, this method is always invoked with an overallPercent value of 100.

Update progress information in the loading progress indicator based on the overallPercent values received in these methods.

Specifying the Custom Progress Indicator in the JNLP File

Include the following information in the RIA's Java Network Launch Protocol (JNLP) file to specify a loading progress indicator:

  • download="progress" attribute to indicate which JAR file contains the loading progress indicator class
  • progress-class attribute containing fully qualified name of the loading progress indicator class. This attribute can be defined as a part of the <applet-desc>, <application-desc>, or <component-desc> depending on how the RIA and the loading progress indicator are deployed.

A sample JNLP file for an applet is shown next.

<jnlp spec="1.0+" codebase="" href="">
...
  <resources>
    ...
    <jar href="MyApplet.jar" main="true" />
    <jar href="CustomProgressIndicator.jar" download="progress" />
  </resources>

  <applet-desc
     name="MyFavoriteApplet"
     main-class="myAppletPackage.MyFavoriteApplet"
     progress-class="myCustomProgressPackage.MyCustomProgressIndicator"
     width="600"
     height="200">
  </applet-desc>
...
</jnlp>

How the RIA Software Communicates Progress

RIA software communicates progress information as follows:

  • RIA software instantiates loading progress indicator, if necessary. In some cases, when all resources are cached and up-to-date, the loading progress indicator may not be instantiated at all.
  • RIA software invokes the progress, upgradingArchive, validating methods several times with increasing values of overallPercent.
  • In some cases, when the resources are already cached and validated, RIA software may just invoke the constructor followed by a 100% completion message.
  • RIA software will always send a 100% completion message to the loading progress indicator.

Best Practices and Tips

  • When deciding on an approach to customize the RIA loading experience, consider the capabilities of older versions of client JRE software. You can provide a range of increasingly sophisticated implementations depending on the capabilities of the client JRE software and other criteria as described next.
    • Specify a splash screen that can be displayed for applets when the client JRE software version is at least Java SE 6 update 10.
    • Specify a customized loading progress indicator that can be displayed when the client JRE software version is at least Java SE 6 update 18.
  • Consider the fact that a splash screen or loading screen may not be displayed at all when a RIA is partially or completely cached.
  • When developing a customized loading progress indicator, consider the following items:
    • Keep the size of the loading progress indicator JAR file small. RIA resources are downloaded concurrently. If the loading progress indicator JAR file is large, then it may be downloaded at approximately the same time as other resources. In this case, the loading progress indicator may be displayed for a very short time or may not be displayed at all.
    • Limit the amount of resources required by the loading progress indicator. Avoid using ImageIO or service lookups as this may cause other resources to be downloaded.
    • A loading progress indicator can use the same top level window as the Java Web Start application itself. In this case, limit the amount of resources that are used when the application's constructor is invoked. Specify resource lookups in the application's main method instead.
    • A loading progress indicator can be integrated into the applet's UI. In this case, create a top level container, such as a javax.swing.JPanel object, and add it to the surfaceContainer object described previously. After the applet's resources have been completely downloaded, remove the top level container from the surfaceContainer object and add it to the applet itself.
    • A signed loading progress indicator implementation may be best for a signed RIA. In this case, security warnings would be displayed and accepted early on and progress can be updated without further interruptions.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Development and Deployment Of Rich Internet Applications

Documentation Contents

Java Rich Internet Applications Development and Deployment

Java Rich Internet Applications Guide > Java Rich Internet Applications Development and Deployment

The following topics are covered:

  • Introduction
  • Design
  • Development
  • Deployment

Introduction

Java technology based solutions are versatile when developed with good design principles. There are three major kinds of solutions depending on their deployment mechanism and execution context:

  1. Applets – These solutions run in the context of a web browser. They utilize the browser capabilities like session cookies, DOM access etc. Applets may be deployed by using Java Network Launch Protocol (JNLP) or by using applet tag attributes.

  2. Java Web Start applications - Java Web Start applications are deployed via a browser the first time. Once the application is downloaded and the user has accepted its security certificate, it behaves almost like a standalone application. When run standalone from the user's desktop using Java Web Start, updates to the application are automatically downloaded.
  3. Standalone solutions – Standalone solutions do not require a browser session for execution.

Applets and Java Web Start applications are now referred to as rich internet applications (RIAs) - Java programs that take advantage of the Internet.

Design

In the past, the decision of whether to deploy a RIA inside the browser as an applet, or outside the browser as a Java Web Start application, could significantly impact the design of the solution. With technology introduced in the Java SE 6 update 10 release, these two deployment options have been substantially unified, so that properly structured programs can be easily deployed either inside or outside the browser.

A key methodology to follow during the design of your app is to use a component-based architecture. Traditional applications tend to construct their user interfaces, including the top-level Frame, in the main method. This programming style prevents easy re-deployment of the app in the browser, because it assumes that the app creates its own Frame. When running in the browser as an applet, the applet is implicitly the container that should hold the user interface for the app, and no top-level Frame is needed or desired.

Instead, during the development of your app, try to organize its functionality into one or more components that can be composed together. In this context, the term "component" refers to a GUI element that subclasses from the AWT Component class, the Swing JComponent class, or another subclass. Rather than phrasing the app in terms of various methods which build user interfaces and return or show them, instead phrase the app in terms of various Component subclasses, each of which adds their portion of the user interface to themselves. Then the app, which at that point is just a Component (and perhaps, for example, a menu bar) can easily be added to any kind of Container. The container might be a top-level Frame or an Applet. Using this methodology and architecture makes it easy to redeploy the app either inside or outside the browser, and allows this deployment decision to be changed at essentially any time without significantly impacting the development cycle of the app.

The SwingSet2 demo is an example that shows how to lay out components in a single cohesive unit. This demo is included in the JDK 7 Demos and Samples bundle that you can download. The constructor of the ButtonDemo class instantiates and lays out all required user interface components into one master panel. The DemoModule class is only responsible for displaying this master panel as an applet. This design enables the ButtonDemo to be reused or ported easily to another applet or application.

To determine whether to develop an applet or a Java Web Start application, see Rich Internet Applications Decision Guide.

Development

Having decided on the type of client app you plan to build, the next step is to build it. For applets, use the Applet Developer's Guide to set up the applet, get the browser and the applet talking to each other, and to communicate with other applets. For Java Web Start applications, use the Java Web Start Developer's Guide.

Debugging is a natural part of development. In addition to using your Java IDE or the Java debugger, you can use the debugging facilities in the Java Console, as well as the JVM's Tracing and Logging capabilities.

The Deployment trail in the Java Tutorials is a comprehensive resource to learn more about the development and deployment of RIAs.

Deployment

Signing the application JAR files with a valid public key certificate and specifying the runtime permission in the JAR file manifest are critical. Applications that are deployed without these elements might not be allowed to run in some circumstances.

Deployment is a multi-step process. Many of the steps are optional, but they are all intended to improve the end-user's experience. The following is an overview of deployment related steps. See Rich Internet Applications Deployment Advice for more information.

  • JNLP File: A JNLP file is created for Java Web Start applications and applets that will be deployed using JNLP. If the RIA requires access to resources on the user's system, you'll need to include the security element in the JNLP file. Otherwise, the RIA runs in the security sandbox. See JNLP File Syntax for information on the JNLP file.

  • JAR File Manifest: The JAR file manifest contains security and configuration information about the JAR file and the files it contains. Attributes introduced in the JDK 7u25 and JDK 7u45 releases provide additional security for RIAs. See JAR File Manifest Attributes for Security for more information.

  • Security Certificate: RIAs request permission from the user to run the first time they are launched, whether they run in the security sandbox or require access to a user's system. Sign and time stamp the JAR file for the RIA with a certificate from a recognized certificate authority. See Security Dialogs and Security for more information.

  • JAR Indexing: To keep the app from downloading JAR files before they're needed, you'll want to use JAR Indexing. Jar Indexing works both for applets and Java Web Start applications. With Jar Indexing, the main jar contains an index file that tells which packages are in the other jars. When lazy-loading a resource, the underlying classloader uses the index to know what jar file to download. Make sure that you create the index before you sign the JAR file.

  • Pack200 Compression: See Pack200 and Compression for Network Deployment for information on how to use Pack200 compression to minimize download time for JAR files.

  • Deployment Toolkit: Finally, you'll want to use the Deployment Toolkit to set up your web page with cross-browser JavaScript you need to launch your app. The deployment toolkit is essentially a set of JavaScript functions that ensure deployment of applets consistently across various browsers.

For enterprises that provide a common execution environment and manage the applications that users access, the Deployment Rule Set feature enables the creation of rules that allow some applications to be run without security prompts while automatically blocking other applications. This feature is intended to be used internally in an organization. See Deployment Rule Set for more information.

For users who need to run RIAs that are blocked because they do not meet current security requirements, the Exception Site List feature is provided. RIAs that are started from sites in the list prompt the user for permission to run. See Exception Site List for more information.

To understand how the deployment of RIAs is handled, see Rich Internet Application Deployment Process.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Rich Internet Applications Deployment Advice

Java Rich Internet Applications Guide > Java Rich Internet Applications Deployment Advice

The following topics are covered:

  • Unified Deployment Mechanism - Java Network Launch Protocol
  • Deployment Toolkit Script
  • Other Deployment Considerations
    • Order of Installation of JREs
    • ClassLoader and Accessing Resources
    • Lazy Downloading
  • Resources

Unified Deployment Mechanism - Java Network Launch Protocol

Starting in release Java SE 6 update 10, Java Network Launch Protocol (JNLP) provides a unified mechanism for deploying rich internet applications (RIAs – applets and Java Web Start applications). RIAs launched using JNLP have the following powerful capabilities at their disposal:

  • Access to JNLP extensions – Powerful JNLP extensions such as Java Binding for the Open GL OpenGL API (JOGL), JavaFX Scene Graph, and NASA World Wind Java SDK (a planetary and extra-planetary visualization system) can now be used from applets and Java Web Start applications.
  • Access to the JNLP APIs – Applets and Java Web Start applications have access to the JNLP APIs to gain user-controlled access to persistent storage (the PersistenceService), lazily-downloaded parts (the DownloadService), the local file system (the FileOpenService and FileSaveService), and much more. See the Java Tutorial lesson, Accessing the Client Using JNLP API for step-by-step instructions about using JNLP API.
  • Version selection and more – Building on the new Java Plug-in's architecture, applets launched via JNLP may utilize all of the features previously available to Java Web Start applications, such as JRE version selection, passing command-line arguments and system properties to the JVM, and much more.

Deployment Toolkit Script

To avoid browser compatibility issues, the Deployment Toolkit script provides JavaScript functions that automatically generate the HTML required to deploy RIAs. Developers should invoke these functions to deploy their solutions in a consistent fashion across various browsers.

The script exposes a single object, named deployJava, which contains the following public functions:

  • createWebStartLaunchButton(jnlp, minimumVersion) - Outputs a launch button for the specified JNLP URL. When clicked, the button will ensure that an appropriate JRE is installed and then launch the JNLP application.

  • createWebStartLaunchButtonEx(jnlp, minimumVersion) - Outputs a launch button for the specified JNLP URL. When clicked, the button will ensure that an appropriate JRE is installed and then launch the JNLP application. The JNLP file does not require a value for the codebase attribute. This function requires that the Java SE 6 update 18 release be present on the client. If the Java SE 6 update 18 release is not present on the client, then the user will be instructed to install the required software.

  • getBrowser() - Returns the name of the browser currently running.

  • getJREs() - Returns an array of currently-installed JRE version strings.

  • installJRE(requestVersion) - Triggers the installation of the specified requestVersion, the latest version matching the specified requestVersion, or the latest JRE.

  • installLatestJRE() - Triggers the installation of the latest JRE

  • isPlugin2() - Determines if the next generation Java Plug-in is the default.

  • isWebStartInstalled(minimumVersion) - Returns true if an installation of Java Web Start of the specified minimumVersion can be detected.

  • launch- Launches JNLP application.

  • runApplet(attributes, parameters, minimumVersion) - Ensures that an appropriate JRE is installed and then runs an applet.

  • setAdditionalPackages(packageList) - Sets additional package list to be used by kernel installer.

  • setInstallerType(type) - Sets the preferred install type : null, online, kernel.

  • versionCheck(version) - Returns true if there is a matching JRE version currently installed (among those detected by the getJREs() function).

  • writeAppletTag(attributes, parameters) - Outputs an applet tag with the specified attributes and parameters. The parameters argument is optional.

See the human readable version of the Deployment Toolkit for a detailed description of these public functions. See the following Java Tutorial lessons for more information about deploying RIAs:

  • Deploying an Applet
  • Deploying a Java Web Start application
  • Deployment In-Depth

Other Deployment Considerations

Order of Installation of JREs

If multiple JREs are required to run various Java Plug-in applets on the same machine, it is recommended to install the JREs in the order of their versions. The oldest version should be installed first and the newest version installed last. This will avoid the problem of the dynamic CLSID {8AD9C840-044E-11D1-B3E9-00805F499D93} being used in an object tag that is not using the latest version of the JRE on the computer.

Starting from JRE 5.0u6 with SSV support, the above is not an issue because the latest version of JRE on the machine will be used. In addition, a new dynamic version CLSID {CAFEEFAC-FFFF-FFFF-FFFF-ABCDEFFEDCBA} has been added. If the new dynamic CLSID is used in the object tag, the latest version of the JRE will be used independently of the installation order of the JREs.

Installation order should have no effect on Java Web Start. In any case the highest version of the JRE on the system will contain the version of Java Web Start that is run.

ClassLoader and Accessing Resources

Resources accessed in a Java Web Start application or Java Plug-in applet may be cached on the client machine in the Deployment Cache. It is unwise to assume the format or content of this cache, as it may change between versions.

When porting stand alone programs to Java Web Start or Java Plug-in, problems can occur when code has inherent assumptions that it is loaded by the SystemClassLoader. In Java Plug-in resources are loaded by the PluginClassLoader (which extends sun.applet.AppletClassLoader, which in turn extends java.net.URLClassLoader). In Java Web Start resources are loaded by the JNLPClassLoader (which as of JDK 6 extends java.net.URLClassLoader).

Access the ClassLoader being used with:

    ClassLoader cl = Thread.getCurrent().getContextClassLoader();

ClassLoader.getResource() returns a URL, but any code that assumes the URL is a JarURL to a FileURL, and then tries to decompose that FileURL to find the underlying file path will fail. The correct way to access resources is to use getResourceAsStream() which will return the correct content whatever type of ClassLoader is used to access the resource. If the resource is already cached, the contents of the resource will be returned from the cache directly, so there won't be extra network connections to the resource itself.

We do not recommend modifying the contents of the Java deployment cache directly. The cache is a private implementation of Java Web Start / Java Plug-in, and is subject to change anytime.

Many applications and libraries try to deploy properties files and other "resources" by including them in the same directory as the jar file that uses them, and then expect to be able to decompose the the URL returned from getResource() to construct the path to these files. Developers argue that this is needed so the application can later modify these property files or other "resources" for use in subsequent launchings of the app. When porting to web deployed applications, they then find they need to repackage these into the jar files of the app, and consider them only the "default" content, and use one of several other mechanisms to persist the modified versions on the client machine (by writing files or by using either the Preference API or the JNLP PersistenceService.)

Lazy Downloading

When applications are large, it can be useful to only download the part of the application that is required to start up, and then download the rest on demand. This process is referred to as lazy downloading.

Java Web Start has support for lazy downloading, but few developers use it. It can be a way to significantly improve the download and startup time in some applications. To effectively use lazy downloading, Java Web Start must be aware which jar to download to resolve a request for a specific resource. Previous versions of Java Web Start required a complex specification of parts and packages to provide this information. Beginning with version 6.0, the same thing can be accomplished using Jar Indexing.

Jar Indexing is a simple and effective way to download only the required jars, and avoid downloading everything when a nonexistent resource is requested. See Jar Indexing.

Java Plug-in has built-in support for lazy downloading (that is, downloading is lazy by default), and also supports Jar Indexing. Developers should also try to NOT use individual classes but package them as JARs instead.

Resources

  • Client JRE Capabilities - Quick Reference
  • Deployment trail in the Java Tutorials
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Rich Internet Applications Enhancement in JDK 8

Java Rich Internet Applications Guide > Enhancements and Other Features > Java Rich Internet Applications Enhancements in JDK 8

This release introduces the following improvements for web-deployed applications, called RIAs:

  • For sandbox RIAs, URLPermission is now used to allow connections back to the server from which they were started. URLPermissions is granted based on protocol, host and port of the code source. This change has the following implications:

    • For sandbox RIAs, SocketPermissions for the origin host is no longer granted. Calls from JavaScript code to the RIA are not granted SocketPermissions beginning with JDK 8.

    • Sandbox RIAs that are loaded from a server using the HTTP protocol are not allowed to connect back to the server using the HTTPS protocol.

    • Sandbox RIAs loaded from a server on a specific port using either the HTTP or HTTPS protocol are not allowed to connect back to a different port on the server. For example, if the RIA is started from https://www.example.com:80, then the RIA is not allowed to connect back to https://www.example.com:8888.

    • Sandbox RIAs loaded from a server using either the HTTP or HTTPS protocol and a domain name are not allowed to connect back to the server using an IP address. For example, if the RIA is started from https://www.example.com:8080, then the RIA is not allowed to connect back to https://192.0.2.1:8080.

    • Privileged RIAs loaded from a server using the HTTP protocol do not accept calls from JavaScript code using the HTTPS protocol. If you want to make calls to your RIA from JavaScript code using HTTPS, you must load your RIA using HTTPS.

  • The Permissions attribute is now required in the JAR file manifest for the main JAR file of all Rich Internet Applications (RIAs) at all security levels. See JAR File Manifest Attributes for Security for information on the Permissions attribute.

  • The Java class file format has been updated because of JSR 292, Java Virtual Machine Support for Non-Java Languages. Consequently, the Pack200 engine has been updated accordingly to ensure that Java SE 8 class files are compressed effectively. In particular, the Pack200 engine now recognizes constant pool entries and new bytecodes introduced by JSR 292.

    As a result, compressed files created with this version of pack200 will not be compatible with older versions of unpack200.

    In general, if a compressed file contains Java SE 8 or Java SE 7 class files, then it will not be compatible with older unpackers. (For example, if a compressed file contains Java SE 7 class files, then it will not be compatible with unpackers from Java SE 6 or earlier.)

    See Pack200 and Compression for Network Deployment and RFE 6981776.

  • The old Java Plug-in (the version available prior to Java SE 6 Update 10) has been removed from this release. See RFE 7076143.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Rich Internet Applications Enhancements in Java SE 7

Documentation Contents

Java Rich Internet Applications Enhancements in JDK 7

The following topics are covered:

  • Enhancements in JDK 7 Update 51
  • Enhancements in JDK 7 Update 45
  • Enhancements in JDK 7 Update 40
  • Enhancements in JDK 7 Update 25
  • Enhancements in JDK 7 Update 21
  • Enhancements in JDK 7 Update 10
  • Enhancements in JDK 7 Update 6
  • Enhancements in JDK 7 Update 2
  • Enhancements in JDK 7

Enhancements in JDK 7 Update 51

The JDK 7u51 release includes the following enhancements:

  • The Exception Site List feature provides a way for users to run Java applets and Java Web Start applications that do not meet the latest security requirements. RIAs that are hosted on a site in the exception site list are allowed to run with the applicable security prompts.

  • Unsigned and self-signed RIAs are blocked when the security level is set to Very High or High.

  • The Permissions attribute is required in the JAR file manifest of the main JAR file when the security level is set to Very High or High.

Enhancements in JDK 7 Update 45

The JDK 7u45 release includes the following enhancements:

  • JAR file manifest attributes are available to enhance the security of running Java applets and applications in a browser. The Application-Name attribute provides a secure title for your RIA. The Application-Library-Allowable-Codebase identifies the locations from which your RIA can be started if the JNLP file or HTML page is in a different location than the JAR file. The Caller-Allowable-Codebase attribute identifies the locations from which JavaScript code can call methods in your RIA. See JAR File Manifest Attributes for Security for more information.

  • The Java Control Panel has an option for restoring the security prompts that were hidden when the option to not show the prompt again was selected. See the documentation for the Security tab of the Java Control Panel for more information.

Enhancements in JDK 7 Update 40

The JDK 7u40 release includes the following enhancements:

  • For enterprises that provide a common execution environment and manage the applications that employees access, the Deployment Rule Set feature enables the creation of rules that allow some applications to be run without security prompts while automatically blocking other applications. This feature is intended to be used internally in an organization. See Deployment Rule Set for more information.

  • When a RIA is started, the JRE is checked to see if it is expired or below the security baseline. If so, the user is warned and given the opportunity to upgrade the JRE. For enterprises that manage the update process of user's systems, the deployment.expiration.check.enabled property can be set to suppress this check. See Deployment Configuration File and Properties for more information.

In addition, the Rich Internet Application Deployment Process section in this guide provides a look at how the deployment of RIAs is handled.

Enhancements in JDK 7 Update 25

The JDK 7u25 release includes the following security enhancements:

  • Before Java applets and Java Web Start applications are run, the signing certificates are checked to ensure that one hasn't been revoked. Advanced options in the Java Control Panel can be set to manage if the checking is done and what services are used for making the checks. The default is now to check all certificates using both OCSP and CRLs. See the Perform Certificate Checks and Check for Certificate Revocation Using sections of the Java Control Panel documentation for more information.

  • Permissions and Codebase are new attributes for the JAR file manifest that are used to defend RIAs against unauthorized code repurposing. These attributes are used with signed JAR files for applets and Java Web Start applications. See Preventing a RIA from Being Repurposed for more information on these attributes. Steps 2 and 3 in the Deploying an Applet and Deploying a Java Web Start Application lessons in the Java Tutorial describe how to include these attributes in the manifest.

In addition, the Security Dialogs section provides information on the prompts that are shown when a RIA is started, and Deployment Best Practices in the Java Tutorial provide suggestions for deploying your RIA.

Enhancements in JDK 7 Update 21

This release includes the following security enhancements for running rich internet applications (RIAs), which are Java applets and Java Web Start applications:

  • RIAs prompt the user for permission to run the first time the RIA is launched. The prompt includes information on the certificate used to sign the application, the location of the application, and the level of access that the application requests. In most cases, users can turn off the prompts for future launches of the same application. See What should I do when I see a security prompt from Java? for a description of the prompts.

  • RIAs that are signed with a certificate issued by a recognized certificate authority require a single click by the user to run the application. Self-signed and unsigned applications require additional steps by the user before the application is launched. Therefore, for the best user experience, sign your RIAs with a trusted certificate before deploying to the end user. For information on signing JAR files, see Signing and Verifying JAR Files.

  • Depending on the security level set in the Java Control Panel and the user's version of the JRE, self-signed or unsigned applications might not be allowed to run. The default setting of High permits all but local applets to run on a secure JRE. If the user is running an insecure JRE, only applications that are signed with a certificate issued by a recognized certificate authority are allowed to run.

    The Low and Custom settings are no longer available.

    For more information, see the Security section of the Java Control Panel.

  • Sandbox applications (previously called "unsigned" or "untrusted" applications) are restricted to the security sandbox. Privileged applications (previously called "signed" applications) are provided unrestricted access to a user's system.

    For Java Web Start applications, including applets that are launched using JNLP, the security element in the .jnlp file is used to set the level of access. If the element is not present, access is restricted to the sandbox. See Security in Rich Internet Applications for more information.

    For applets that are not launched using JNLP, the permissions element is added to the applet or object element to set the level of access to either sandbox or all-permissions. See Deploying With the Applet Tag for more information.

  • JavaScript code that calls code within a privileged applet (an applet that runs outside the sandbox) is treated as mixed code. Warning dialogs are raised if the signed JAR files are not tagged with the Trusted-Library attribute. See Mixing Privileged Code and Sandbox Code for more information.

Enhancements in JDK 7 Update 10

The JDK 7u10 release includes the following enhancements:

  • The ability to disable any Java app from running in the browser. This mode can be set in the Java Control Panel or using a command-line install argument (Microsoft Windows only).
  • The ability to select the desired level of security for unsigned applets, Java Web Start applications, and embedded JavaFX applications that run in a browser. Four levels of security are supported. This feature can be set in the Java Control Panel, or using a command-line install argument (Microsoft Windows only).
  • New dialogs warn you when the JRE is insecure (either expired or below the security baseline) and needs to be updated.

For more information, see Setting the Level of Security for the Java Client and Java Control Panel.

Enhancements in JDK 7 Update 6

This release includes Oracle's release of the JRE and JDK for the Mac. Here is related information:

  • Mac FAQ
  • Packaging a Java App for Distribution on a Mac
  • JDK 7 and JRE 7 Installation Guide for the Mac which includes the Mac Install FAQ

Enhancements in JDK 7 Update 2

This release introduces the following improvements for web-deployed applications:

  • Java SE includes JavaFX: JDK 7 Update 2 and later includes the JavaFX SDK. See JavaFX 2.0.2 Release Notes for more information.

  • Non-blocking installation of JRE and JavaFX using Deployment Toolkit: The web page continues to accept user input while Deployment Toolkit downloads and installs the required components. See 7052499 for details.

  • Reduced footprint of signed JAR files: This release provides a new signing method that enables you to sign a JAR file as one large object instead of signing every JAR entry individually. This saves up to 10% of the total JAR size. Note: Users must run JRE 7 Update 2 or later to be able to use these JARs. See 7049193 and the section Sign the JAR Files in Packaging (the information in this section also applies to Java SE).

  • Caching certificate details in the JNLP file for signed applications: For an application that uses security, a security dialog will present the cached certificates immediately for user approval while downloading the application in the background. An older JRE will ignore this functionality; it will present the certificate information after the application is downloaded. See 7049169 and the section Embed Signing Certificate into Deployment Descriptor in Packaging (the information in this section also applies to Java SE).

  • Caching enabled by default: Caching of network content for application code running in Web Start mode is now enabled by default. This allows application improved performance and consistency with applet execution mode. To ensure the latest copy of content is used, the application can use URLConnection.setUseCaches(false) or request header Cache-Control values no-cache/no-store.

  • Embedded JNLP support for Web Start: The Deployment Toolkit can use a copy of a JNLP file embedded into a web page to launch an application. This helps to reduce number of network connections needed for the first start of a Web Start application from the browser. See 7052492 and the section Embed Deployment Descriptor into Web Page in Packaging (the information in this section also applies to Java SE).

  • Ability to pass secure JVM arguments to the Web Start application from inside the web page using Deployment Toolkit: This helps to avoid JVM relaunch due to JVM configuration mismatch and also helps to pass dynamic parameters from the web page. See 7072364 and the section Platform in Deployment in the Browser (the information in this section also applies to Java SE).

  • Improvements for handling content with gzip encoding: The deployment cache will keep application content in compressed form and return it to the application as-is with gzip content-encoding in the HTTP header. This makes behavior more consistent across different execution modes (first launch versus subsequent launch, cache enabled versus cache disabled). See 6575586 for more details.

  • Improved support for JNLP applications: JavaFX applications are more cleanly uninstalled; see 7085171 and 7053087. Recognition of JNLP install hints is improved; see 7046670.

  • Startup improvements: Startup has been improved for specific scenarios; see 7099086 and 7098160 for details.

  • New setting, Insecure JRE versions, in Java Control Panel: If users have a version of Java on their system that is below the security baseline, a warning message is displayed before an application or an applet can be run using that version. You can control this warning message with the Java Control Panel Advanced tab setting, Insecure JRE versions, which will set the property deployment.insecure.jres in the deployment.properties file to one of the following values:

    Value of deployment.insecure.jres property | Value of Insecure JRE versions setting | Description
    NEVER | Do not use insecure JRE versions | Untrusted content will always run with the default JRE.
    PROMPT | Prompt user before using insecure JRE versions | Users will see warning dialogs; this is the default value.
    ALWAYS | Allow using insecure JRE versions (not recommended) | Untrusted content will run with the requested JRE without any prompting.

    See Deployment Configuration File and Properties for more information about the deployment.properties file.

Enhancements in Java SE 7

  • The following enhancements have been made to the syntax of JNLP files; see JNLP File Syntax:
    • The os attribute in the information and resources elements can now contain specific versions of Windows, such as Windows Vista or Windows 7.
    • Applications can use the install attribute in the shortcut element to specify their their desire to be installed. Installed applications are not removed when the Java Web Start cache is cleared, but can be explicitly removed using the Java Control Panel.
    • Java Web Start applications can be deployed without specifying the codebase attribute; see Deploying Without Codebase
  • A JNLP file can be embedded into an HTML page; see Embedding JNLP File in Applet Tag.
  • You can check the status variable of the applet while it is loading to determine if the applet is ready to handle requests from JavaScript code; see Handling Initialization Status With Event Handlers.
  • You now have control of the window decoration style and title of an applet launched from a shortcut or dragged out of the browser; see Requesting and Customizing Applet Decoration in Developing Draggable Applets.
  • In order to make it easier to re-distribute an application that is deployed using a signed jar file, a JNLP template can be used. The JNLP template allows the developer to specify what parts of a JNLP file may be changed without resigning the main jar. For more information, see Signing JAR Files with a JNLP Template.

In addition, the following enhancements are introduced:

Area: Deployment
Standard/Platform: JDK 7
Synopsis: Previously, the pack200 tool segmented its output by default. As of this release, the pack200 tool will create one large segment per jar file. Therefore, if deployers have jar files larger than the virtual memory available on the end-user's systems, it is recommended that either the input jar file be split, or suitably segmented by using the command-line flag "--segment-limit=nnnnn" or the equivalent property "SEGMENT_LIMIT".
RFE: 6575357

Area: Deployment
Standard/Platform: JDK 7
Synopsis: On Windows XP machines, the default cache directory is now under $USER\Local Settings\Application Data\Sun\Java\Deployment\cache. If needed, you may customize it to point to a network share folder for a single application cache across domain machines.
RFE: 7012538

Area: Deployment
Standard/Platform: JDK 7
Synopsis: The optional applet parameter, jnlp_embedded, provides the option to cache JNLP content on the HTML page and shortens applet launch time by skipping network access. The jnlp_embedded parameter has as its value the base64 encoded content of the applet JNLP file. For example:

<applet  width="710" height="540" >
    <param name="jnlp_href" value="launch.jnlp"/>
    <param name="jnlp_embedded"
        value="PD94bWwgdmVyc2lvbj0iMS4wIiB . . . dC1kZXNjPg0KPC9qbmxwPg0K"/>
    <param name="draggable" value="true"/>
</applet>
When present, the jnlp_embedded parameter value replaces the content of the JNLP value pointed to by the jn.p_href parameter. The value of jnlp_ref is then optional and only used as a backup when the content of jnlp_embedded is invalid. There are a few restrictions on the embedded JNLP content:
  • The attribute href from element jnlp should be relative.
  • The attribute codebase from element jnlp should be empty (which means the codebase value will be derived from the document base URL).
RFE: 6990877

Area: Deployment
Standard/Platform: JDK 7
Synopsis: As of JDK 7, clearing the cache works as follows:

  • Only non-installed resources are removed from the cache when invoking javaws -XClearCache.
  • Both installed and non-installed resources are removed by invoking javaws -uninstall.
  • The "Delete Temporary Files" dialog, in JCP, previously had two checkboxes, both checked by default: "Applications and Applets", and "Trace and Log files". As of JDK 7, there will be three checkboxes, with the first two checked by default: "Trace and Log Files", "Cached Applications and Applets", and "Installed Applications and Applets".
  • Only installed applications will have an entry in the Add/Remove panel.
RFE: 6873615

Area: JNLP Files
Standard/Platform: JDK 7
Synopsis: In order to support debugging of Java Web Start applications, the -XX:HeapDumpOnOutOfMemoryError flag is now supported in JNLP files for trusted applications.
RFE: 6664424

Area: JNLP Files
Standard/Platform: JDK 7
Synopsis: Previous versions of Java Web Start did not correctly implement section 6.0.10 of the JNLP Specification. With this fix, fine-grained values for the "os" attribute, such as os="Windows\ XP", os="Windows\ Vista", and os="Windows\ 7", will work as expected. Values such as os="Win", and os="Windows" will continue to match all Windows platforms. As of this release, os="Windows\ Vista Windows\ 7" will only match Vista or Windows 7 and not Windows XP.
RFE: 7014170

Area: Plugin
Standard/Platform: JDK 7
Synopsis: A message stating that the first generation of the Java plugin is deprecated is now printed to the log file and to the Java console whenever plugin 1 is used.
RFE: 7027792

Area: Plugin
Standard/Platform: JDK 7
Synopsis: On Windows, the tray icon is now disabled by default. To enable the tray icon, use the Windows Start menu.
RFE: 6694710

Area: Plugin
Standard/Platform: JDK 7
Synopsis: The 64-bit toolkit is now supported on 64-bit Windows platforms.
RFE: 6492139

Area: Plugin
Standard/Platform JDK 7
Synopsis: Previously, the persistence API provided only temporary persistence for applets. When the VM exited, the data was lost. Data can be persisted via any of the standard Java mechanisms, through the use of LiveConnect to store data in the page DOM, or using one of the JNLP services.
RFE: 6992419

Area: Plugin
Standard/Platform: JDK 7
Synopsis: Google Chrome is now supported by the DT Plugin.
RFE: 6907245

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Rich Internet Applications Guide

This guide covers the following topics:

  • Java Rich Internet Applications Development and Deployment
  • Rich Internet Applications Decision Guide
  • Migrating Java Applets to Java Web Start Applications
  • Java Rich Internet Applications Deployment Advice
  • Customizing the Rich Internet Application Loading Experience
  • Properties That Affect the Behavior of Rich Internet Applications
  • Applet Developer's Guide
    • Java Plug-in and Applet Architecture
    • Applet Deployment
    • Using applet, object and embed Tags
    • Applet Status And Event Handlers
    • Codebase Determination
  • Networking
    • Proxy Configuration
    • Deploying JAR Files Compressed with Pack200
    • Compression Formats for Network Deployment
  • Java Control Panel
    • Deployment Configuration File and Properties
    • Java Console
    • Tracing and Logging
  • Security
    • Rich Internet Application Deployment Process
    • Browser Keystores
    • Mixing Privileged Code and Sandbox Code Ensuring Application and Applet Security
    • Signed JNLP Files
    • Verification of RSA Signed Applets in Java Plug-in
    • Signing Applets Using RSA Certificates
    • Deploying RSA-Signed Applets in Java Plug-in
    • JAR File Manifest Attributes for Security
    • Preventing RIAs from Being Repurposed
    • Security Dialogs
    • Deployment Rule Set
    • Exception Site List
  • Enhancements and Other Features
    • Rich Internet Applications - Development, Deployment, and Runtime Enhancements
    • Java Rich Internet Applications Enhancement in JDK 8
    • Java Rich Internet Applications Enhancement in JDK 7
    • Protocol Support: HTTP, HTTPS, FTP, GOPHER, SOCKS, and NTLM
    • Multi-Version Support
    • System-Wide Repository
    • Applet Persistence API
    • Special Applet Attributes
    • Pack200 and Version Download
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java(TM) Rich Internet Applications Decision Guide

Documentation Contents

Rich Internet Applications Decision Guide

Java Rich Internet Applications Guide > Rich Internet Applications Decision Guide

Applet or Java Web Start Application?

Both applets and Java Web Start applications are rich internet applications (RIAs). RIAs are easier to distribute than standard applications, because they're launched over the web. They both require permission from the user to run, so it is important that they be signed with a valid certificate from a trusted authority to enable the user to make an informed decision about running the application. RIAs can only access the user's system in highly controlled ways, unless extended access is requested when launched and permitted by user.

Here's a table that summarizes the differences:

Feature | Applet | Java Web Start
Java version | Individual applets may specify the exact version, or version range, of the Java platform it will use. The Java Plug-in supports both static version requests (such as "5.0 update 9") and family version requests (such as "5.0 family"), and supports several backward compatibility mechanisms such as static and family ClassIDs in Internet Explorer. See JRE Version Selection in Applet Deployment for details. | Java Web Start will also be used only from the latest Java version installed on a system, but the version of Java Web Start run is independent of the version of the Java platform used. A Java Web Start application can specify the exact version, or version range, of the Java platform that it will use.
Cookies | Java Plug-in applets run in the same session as the browser, and so have access to both "persistent" cookies and "session" cookies already stored in the browser session. | Java Web Start runs outside the browser process. It can access "persistent" cookies stored by the browser (it does this by using the WinINet API on Windows), but has no access to "session" cookies unless set in that application using the java.net.CookieManager and java.net.CookieHandler API's.
Browser Interactions | Java Plug-in includes the ability for applets to interact with the current browser session with the the Common DOM API. See Manipulating DOM of Applet's Web Page from the Java Tutorials. In addition, Java applets can invoke JavaScript functions present in the same web page as the applet and JavaScript code on a web page can interact with Java applets embedded on the page. See Invoking JavaScript Code From an Applet and Invoking Applet Methods From JavaScript Code from the Java Tutorials. | Java Web Start is limited to invoking the default browser to display specific URL's (see JNLP API).
Java Runtime | An applet may specify Java Runtime parameters used to launch that particular applet instance, without affecting the parameters used to launch other applets. Specifying Java Runtime parameters via the Java Control Panel is also supported for backward compatibility purposes. | Java Web Start applications have (limited) control over the Java Runtime parameters that is used to launch that application.
JNLP API | Applets launched using Java Network Launching Protocol (JNLP) have access to JNLP API which allows sandbox applications access to persistent storage, download control, file I/O, and more. | Java Web Start includes access to the JNLP API,
Shortcuts | You can develop draggable applets. A Java applet that is deployed by specifying the draggable parameter can be dragged outside the browser and dynamically transformed into a Java Web Start application. The Java applet can be dragged by pressing the Alt key and the left mouse button and dragging the mouse. You can add a desktop shortcut that can be used to launch your application outside the browser. See Developing Draggable Applets in the Java Tutorials for more information. | Java Web Start applications can install shortcuts that allow the application to be rerun, either online or offline, independent of the browser.

Other differences

There are several other minor differences caused by need to maintain compatibility with earlier versions. For further information on the specific differences between Java Web Start and Java Plug-in can be found in Migrating Java Applets to Java Web Start Applications.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Mac FAQ

Contents:

  • How do I install Oracle Java?
  • How do I install JavaFX?
  • Can I restore Apple Java 6 after uninstalling Oracle Java 7?
  • I am running Mountain Lion (OS X 10.8) or later and Gatekeeper is blocking an app from launching. What is going on?
  • What happened to the Java Preferences app in Application -> Utilities?
  • I have Oracle's version of the JRE installed, but it is not listed in Java Preferences.
  • I have Oracle's version of the JRE installed, but when I try to use java from the command line, it does not work.

Q: How do I install Oracle Java?

A: See the JDK Installation for OS X and JRE Installation for OS X guides.

Q: How do I install JavaFX?

A The JavaFX SDK and runtime are included in the installation of the JDK and JRE respectively, and they are integrated into the same directory structure. For information on how to work with JavaFX, see the JavaFX Documentation.

Q: Can I restore Apple Java 6 after uninstalling Oracle Java 7?

A: Go back to Apple Java 6 using the following instructions:

  1. Uninstall Oracle Java 7 by deleting the plug-in file. From a Terminal window enter:
    % sudo rm -rf /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  2. Create a symlink using the following command, entered on a single line:
    % sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

Q: I am running Mountain Lion (OS X 10.8) or later and Gatekeeper is blocking an app from launching. What is going on?

A: Gatekeeper, introduced in Mountain Lion (OS X 10.8), is designed to prevent potentially malicious apps from launching. When you attempt to launch an app that doesn't meet certain criteria, Gatekeeper will block the launch. To override this, you can modify Gatekeeper's default settings, or explicitly right/control-click the application and choose Open.

To create a Java application that will launch without interruption under the default Gatekeeper settings, the app must be bundled with a JRE, use Oracle's launcher stub, and be signed with an Apple Developer ID. For more information on creating an app that satisfies these requirements, see Packaging a Java App for Distribution on a Mac.

Q: What happened to the Java Preferences app in Application -> Utilities?

A: The Java Preferences app was part of Apple Java installation and is not used by Oracle Java. Therefore, OS X releases from Apple that do not include Apple Java will not include Java Preferences.

One of the functions of Java Preferences was to set the current version of the JRE. Under Oracle Java, only a single version of the JRE can be installed at a time. For more information, see JRE 7 Installation for Mac OS X.

To access the Java Control Panel, click the Java icon in the System Preferences panel. If the Java icon is not present (under the Other category) in System Preferences, you do not have an Oracle JRE installed.

Q: I have Oracle's version the JRE installed, but it is not listed in Java Preferences.

A: This is correct. The JRE will not show up in the Java Preferences list unless you install the full JDK.

Q: I have Oracle's version of the JRE installed, but when I try to use java from the command line, it does not work.

A: Installing a JRE from Oracle does not update java -version symlinks or add java to your path. For this functionality, you must install the full JDK.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Packaging a Java App for Distribution on a Mac

This page shows you, step by step, how to convert a simple Java application to a version you can distribute on a Mac. To follow along, download the ButtonDemo (.zip) example from the Java Tutorial. This example was created using NetBeans which uses the Ant utility. You can run all necessary tools and make all necessary edits from the command line, without launching NetBeans. The Ant tool is required.

You have created a Java application and want to bundle it for deployment. This requires the following steps:

  • Create a JAR File
  • Bundle the JAR File into an App Package
  • Bundle the JRE with the App Package
  • Sign the App
  • Submitting an App to the Mac App Store

Create a JAR File

This step creates the ButtonDemo.jar file.

Execute ant jar in the high-level project directory to create the dist/ButtonDemo.jar file. This jar file is used to create the .app package.

Bundle the JAR File into an App Package

To create the ButtonDemo.app package, use the appbundler tool. The appbundler is not shipped with the 7u6 version of the Oracle JDK for the Mac. You can download it from the Java Application Bundler project on java.net. There is also AppBundler Documentation available.

As of this writing, the most recent version is appbundler-1.0.jar, which is used by this document. Download the latest version available and substitute the file name accordingly.

  1. Install the appbundler-1.0.jar file. In this case, create a lib directory in the high-level project directory and add the appbundler-1.0.jar file.
  2. Modify the build.xml file in the high-level project directory as follows. (The added code is shown in bold.)
    <?xml version="1.0" encoding="UTF-8"?>
<project name="ButtonDemo" default="default" basedir=".">
    <import file="nbproject/build-impl.xml"/>

    <taskdef name="bundleapp"
             classname="com.oracle.appbundler.AppBundlerTask"
             classpath="lib/appbundler-1.0.jar" />

    <target name="bundle-buttonDemo">
        <bundleapp outputdirectory="dist"
            name="ButtonDemo"
            displayname="Button Demo"
            identifier="components.ButtonDemo"
            mainclassname="components.ButtonDemo">
            <classpath file="dist/ButtonDemo.jar" />
        </bundleapp>
    </target>

</project>
  3. Invoke the appbundler by typing ant bundle-buttonDemo from the high-level project directory. This creates the ButtonDemo.app package in the dist directory.
  4. You should now be able to launch the application by double clicking ButtonDemo.app in the Finder, or by typing open ButtonDemo.app at the command line.

Bundle the JRE with the App Package

In order to distribute a Java application, you want to avoid dependencies on third party software. Your app package should include the Java Runtime Environment, or JRE. In fact, the Apple Store requires the use of an embedded JRE as a prerequisite for Mac App Store distribution. The runtime sub-element of the <bundleapp> task specifies the root of the JRE that will be included in the app package.

In this example, the location of the JRE is defined using the JAVA_HOME environment variable. However, you might choose to bundle a JRE that is not the same as the one you are using for development. For example you might be developing on 7u6, but you need to bundle the app with 7u4. You will define runtime accordingly.

Since this example defines the runtime sub-element using JAVA_HOME, make sure it is configured correctly for your environment. For example, in your .bashrc file, define JAVA_HOME as follows:

export JAVA_HOME=`/usr/libexec/java_home`

Use the following steps to modify the build.xml file at the top of the project directory:

  1. Specify an environment property, named env:
    <property environment="env" />
  2. In the target that creates the bundle, specify the location of the JRE on your system, using the env property:
    <runtime dir="${env.JAVA_HOME}" />

The resulting build.xml file should look like the following. (The new lines are shown in bold.)

<?xml version="1.0" encoding="UTF-8"?>
<project name="ButtonDemo" default="default" basedir=".">
    <import file="nbproject/build-impl.xml"/>

<property environment="env" />

<taskdef name="bundleapp"
         classname="com.oracle.appbundler.AppBundlerTask"
         classpath="lib/appbundler-1.0ea.jar" />

<target name="bundle-buttonDemo">
    <bundleapp outputdirectory="dist"
        name="ButtonDemo"
        displayname="Button Demo"
        identifier="components.ButtonDemo"
        mainclassname="components.ButtonDemo">
        <runtime dir="${env.JAVA_HOME}" />
        <classpath file="dist/ButtonDemo.jar" />
    </bundleapp>
</target>

</project>

Create a fresh version of ButtonDemo.app, using the ant bundle-buttonDemo command. The resulting version includes the JRE in the app package. You can confirm this by examining the Contents/PlugIns directory inside of the app package.

Sign the App

The Gatekeeper feature, introduced in Mountain Lion (OS X 10.8), allows users to set the level of security for downloaded applications. By default, Gatekeeper is set to allow only OS X App Store and Developer ID signed applications. Unless your app is signed with a Developer ID certificate provided by Apple, your application will not launch on a system with Gatekeeper's default settings.

For information on the signing certificates available, see Code Signing Tasks on developer.apple.com.

The signing certificate contains a field called Common Name. Use the string from the Common Name field to sign your application.

Sign your app using the codesign(1) tool, as shown in the following example:

% codesign -s "Developer ID Application: CommonNameFromCertificate" ExampleApp.app

To verify that the app is signed, the following command provides information about the signing status of the app:

% codesign -d --verbose=4 ExampleApp.app

To check whether an application can be launched when Gatekeeper is enabled, use the spctl command:

% spctl --assess --verbose=4 --type execute ExampleApp.app

If you leave off the --verbose tag, and it does not print any output, indicates 'success'.

For more information, see Distributing Outside the Mac App Store on developer.apple.com.

Submitting an App to the Mac App Store

Packaging an app for the Mac App Store is similar to packaging for regular distribution up until the step of signing the app. Signing the app for the Mac App Store requires a few more steps, and a different kind of certificate.

You will need to create an application ID and then obtain a distribution certificate for that application ID. Submit your app using Application Loader. For more information, see the following links (on developer.apple.com):

  • Submitting to the Mac App Store
  • Submit Your Application Using Application Loader
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Properties That Affect the Behavior of Rich Internet Applications

Java Rich Internet Applications Guide > Properties That Affect the Behavior of Rich Internet Applications

The following properties can be specified in a rich Internet application's JNLP file to control the behavior of the rich Internet application (RIA - applet and Java Web Start applications).

Property | Allowed Value | Description
javaws.cfg.jauthenticator | true / false | A value of "true" or "all" prevents Java Web Start software from installing the default JAuthenticator.
jnlp.concurrentDownloads | integer | Number of threads for concurrent download of JAR files
jnlp.packEnabled | true / false | A value of "true" indicates that the application's JAR files have been compressed using the Pack200 tool. See Deploying JAR Files Compressed with Pack200 for more information.
jnlp.versionEnabled true / false

A value of "true" indicates that the application's JAR files have been versioned to enable the version download protocol.

Version download is the ability to request that specific versions of certain JAR files be used by applets and Java Web Start applications.

When this property is set to true and if the JAR version is specified, the server is checked for the versioned JAR file using the following naming convention:

  <file> ::= <name> "__" <options> ".jar"
  <options> ::= "V" <version-id>

Note: version 1.0 of foo.jar should be named foo__V1.0.jar.

The original jar will be used if the versioned jar file is not found.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Rich Internet Applications - Development, Deployment, and Runtime Enhancements

Java Rich Internet Applications Guide > Enhancements and Other Features > Rich Internet Applications - Development, Deployment, and Runtime Enhancements

Java rich Internet application (RIA) technology is getting increasingly sophisticated. New features are being added in every release of the Java Runtime Environment (JRE) software. This quick reference helps you keep up with the vibrant technology and implement RIA solutions that work elegantly on all versions of the client JRE software. The quick reference provides information about significant capabilities added in each version of the JRE software starting with the Java SE 6 update 10 release.

JDK 8

Java Rich Internet Application Enhancements in JDK 8

JDK 7

Java Rich Internet Application Enhancements in JDK 7

Java SE 6 update 21

  • Customized loading progress indicator: Customized loading progress indicator can access applet context and invoke JavaScript code in parent web page.

Java SE 6 update 18

  • Customized loading progress indicator: Customized loading progress indicator can be displayed in a top level window or applet container. Default splash screen is never displayed. Custom splash screen displayed when loaded from cache.

Java SE 6 update 10

  • Java Network Launch Protocol (JNLP) Support: The next generation Java Plug-in enables applets that can be deployed by using JNLP and can access JNLP API.
  • Draggable applet: Applets can be dragged out of the browser if specified as "draggable".
  • Splash screen: Custom splash screen displayed if specified.

Resources

  • Deployment trail in the Java Tutorials
  • JavaFX Documentation
  • Deploying JavaFX Applications
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Setting the Security Level of the Java Client

Contents

  • Ensuring the Most Secure JRE
  • JRE Expiration Date
    • Testing a JRE Below the Security Baseline
    • Testing an Expired JRE
  • Disabling Java in the Browser
  • Setting the Security Level
  • Security Options for a Secure Execution Environment
  • Install Options
  • Apps with Mixed Code

As of the JDK 7u10 release, a user may control, via the Java Control Panel, the level of security that will be used when running Java apps in a browser. The user may select from four levels of security, including disabled, where no Java apps are allowed to run in the browser.

These security levels apply to running Java in the browser, which includes plugin applets, Java Web Start applications, embedded JavaFX applications, and access to the native deployment toolkit plugins. Setting the security level does not affect desktop (also called stand-alone) applications. Note that applets and these various types of applications are collectively referred to as apps or Java apps.

Ensuring the Most Secure JRE

Before the browser plugin software attempts to run a Java app, it verifies that the JRE version is at or above the security baseline for that family and that the age of the JRE is recent. If the JRE is determined to be below the security baseline, or if unable to verify the baseline and the current date is past the JRE Expiration Date, additional security warnings are displayed, or in some cases, the app is blocked. If the app is not automatically blocked, the user has the option to block the app, to continue running the app, or to go to java.com to download the latest release. The JRE Expiration Date can be found in the release notes for JDK Update releases starting with JDK 7u21.

JRE Expiration Date

The JRE relies on periodic checks with an Oracle Server to determine if the JRE is still considered up-to-date with all the available security fixes (above the security baseline). In the past, if the JRE was unable to contact the Oracle Server, the JRE continued to behave as though it is the most recent version with regard to security for an indefinite period.

To avoid this problem, a secondary mechanism that does not rely on external communication has been added to the JDK 7u10 release. From the 7u10 release onwards, all JREs contain a hard-coded expiration date. The expiration date is calculated to end after the scheduled release of the next Critical Patch Update.

JREs that are unable to contact Oracle Servers for an extended period of time now offer additional protection after a reasonable period and do not continue to behave as if they were up-to-date with regard to security fixes.

To test what happens when the JRE falls below the security baseline or expires, see Testing a JRE Below the Security Baseline and Testing an Expired JRE.

Testing a JRE Below the Security Baseline

To see how applications behave when the JRE falls below the Security Baseline, follow these steps:

  1. Install the JRE that you want to test.

  2. Remove the following files, if they exist:

    • <user-deployment-home>/deployment.properties
    • <user-deployment-home>/security/baseline.versions
    • <user-deployment-home>/security/update.timestamp

    See Deployment Configuration File for the location of the deployment.properties file on each supported platform.

  3. From the command line, run the following command:

    javaws -SSVBaselineUpdate

    The <user-deployment-home>/security/baseline.versions file is downloaded.

  4. Edit the <user-deployment-home>/security/baseline.versions file.

    Set the version number of the JRE for the JRE family that you are testing to a value greater than the version that you are testing. For example, if you are testing JRE version 7u45, set the version in the file to 1.7.0_99. The JRE periodically updates this file, so make the file read-only to prevent your changes from being overwritten.

  5. Run any Java applet or Java Web Start application.

    The Java Update Needed prompt is shown. Click Later to continue running the application. See Why do I see the Java Update Needed messages? on java.com for information on this prompt.

  6. When you are done testing, repeat Step 2 and Step 3 to restore the correct version of the files.

Testing an Expired JRE

To see how applications behave after the JRE has expired, follow these steps:

  1. Install the JRE that you want to test.

  2. Remove the following files, if they exist:

    • <user-deployment-home>/deployment.properties
    • <user-deployment-home>/security/baseline.versions

    See Deployment Configuration File for the location of the deployment.properties file on each supported platform.

  3. Set the system to a future date beyond the expiration date of the JRE. Get the expiration date from the Release Notes for the release that you are testing.

  4. Run any Java applet or Java Web Start application.

    The Java Update Needed prompt is shown. Click Later to continue running the application. See Why do I see the Java Update Needed messages? on java.com for information on this prompt.

Disabling Java in the Browser

If you prefer to completely disable access to Java through the browser, de-select the Enable Java content in the browser option in the Java Control Panel under the Security tab. If you do not need to run Java through a browser, consider installing the Server JRE, which does not contain the Java Plug-In. See Server JRE (Java SE Runtime Environment) 7 Downloads for information.

Setting the Security Level

Note: These settings affect all browsers that use Oracle's Java browser plug-in. They do not affect stand-alone Java apps.

The Security tab of the Java Control Panel contains a Security Level slider that controls the restrictions placed on any app that is run from the web or from the local system. The user can select medium, high or very high security settings. The settings determine if an app is allowed to run and if so, the warnings you must accept before the app is launched. The warnings contain information about the signing status of the app, the location of the app, and whether the app is requesting enhanced permissions to run outside the security sandbox.

Unsigned apps that request enhanced permissions are not allowed to run, regardless of the Security Level setting. At the Very High setting, only apps signed with a valid certificate are allowed to run. For information on all security levels, see the Security section of the Java Control Panel documentation.

The default security level is High.

The ability to run applications is also affected by the settings of the Security Options for a Secure Execution Environment.

Security Options for a Secure Execution Environment

To select the behavior when attempting to run an app, there are several checkboxes available in the Java Control Panel (under the Advanced tab):

  • Allow user to grant permissions to signed content
  • Show sandbox warning banner
  • Allow user to accept JNLP security requests
  • Don't prompt for client certificate selection when no certificates or only one exists
  • Warn if site certificate does not match hostname
  • Show site certificate even if it is valid

Install Options

In the JDK 7u10 release, new arguments for command line installation are available for setting the security level for Java in the browser. Admin privileges are required to install the JRE. These arguments are available only on Microsoft Windows.

  • On installation, the WEB_JAVA argument has the following effect:
    WEB_JAVA=1 enables Java in the browser
    WEB_JAVA=0 disables Java in the browser
  • On installation, the WEB_JAVA_SECURITY_LEVEL argument has the following effect:
    WEB_JAVA_SECURITY_LEVEL=VH sets the security level to very high
    WEB_JAVA_SECURITY_LEVEL=H sets the security level to high
    WEB_JAVA_SECURITY_LEVEL=M sets the security level to medium

After installation of the JRE, you can check the Java Control Panel to verify that the security level settings are correct.

Apps with Mixed Code

This information also applies to untrusted apps that have signed trusted extensions, but not to signed trusted apps that have unsigned untrusted extensions. For more information, see Mixing Privileged Code and Sandbox Code.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applet Caching and Installation in Java Plug-in

Documentation Contents

Note: This Java plug-in guide describes features released prior to the Java SE 6 update 10 release. See Java Rich Internet Applications Development and Deployment for the latest information.

< Contents

Applet Caching

This section covers the following topics:

  • Caching Option
    • cache_archive
    • cache_version
    • cache_archive_ex
    • Cache Update Algorithm
  • Security
  • Known Issues

Caching Option

When an applet is cached, it no longer needs to be downloaded when referenced again. This reduces applet startup time. All file types used by Java Plug-in applets are now cached.

An alternative form of applet caching is provided which allows an applet deployer to decide if an applet should be sticky A sticky applet is placed in a disk cache created and controlled by Java Plug-in which the browser cannot overwrite. The only time a sticky applet gets downloaded after caching is when it is updated on the server. Otherwise the applet is always available for fast loading. Applets providing core business applications should be made sticky to improve startup performance.

This feature is activated by including the cache_archive, cache_version , and cache_archive_ex values in the OBJECT/EMBED tag as described below.

Note

.jar files specified with the archive attribute also get cached in this sticky cache.

cache_archive

The cache_archive attribute contains a list of the files to be cached:

<PARAM NAME="cache_archive" VALUE="a.jar,b.jar,c.jar">

Like the archive attribute in the APPLET tag, the list of .jar files in the cache_archive attribute do not contain the full URL, but are always downloaded from the codebase .

cache_version

The cache_version is an optional attribute. If used, it contains a list of file versions to be cached:

<PARAM NAME="cache_version" VALUE="1.2.0.1, 2.1.1.2, 1.1.2.7">

Each version number is in the form xxxx.xxxx.xxxx.xxxx, where x is a hexadecimal number. Each version number corresponds to a respective .jar file in the cache_archive.

cache_archive_ex

In order to allow pre-loading of .jar files, the HTML parameter cache_archive_ex can be used. This parameter allows you to specify whether the .jar file needs to be pre-loaded; optionally the version of the .jar file can also be specified. VALUE for cache_archive_ex has the following format:

VALUE="<jar_file_name>;<preload(optional)>;<jar_file_version(optional)>,<jar_file_name>;
       <preload(optional)>;<jar_file_version(optional)>,..."

The optional tags preload and jar_file_version can appear after the jar_file_name in any order separated by the delimiter ";". "," separates multiple entries.

The following shows how these tags might be used in an HTML page:

<OBJECT ....
<PARAM NAME="archive" VALUE="a.jar">
<PARAM NAME="cache_archive" VALUE="b.jar, c.jar, d.jar">
<PARAM NAME="cache_version" VALUE="0.0.0.1, 0.0.2A.1, 0.3D.22.FFFE">
<PARAM NAME="cache_archive_ex" VALUE="applet.jar;preload, util.jar;preload;0.9.0.AC1, tools.jar;0.9.8.7F">
</OBJECT>

In the above example, a.jar is specified in archive, whereas b.jar, c.jar and d.jar are specified in cache_archive. The versions are also specified for b.jar, c.jar, and d.jar as 0.0.0.1, 0.0.2A.1, and 0.3D.22.FFFE, respectively. In cache_archive_ex, applet.jar is specified to be pre-loaded. util.jar is also specified to be pre-loaded but along with the version. For tools.jar, only version is specified.

Java Plug-In doesn't compare the versions if they are not specified for all the .jar files specified in HTML parameter cache_archive. If cache_archive is used without cache_version, the .jar files specified in cache_archive are treated no differently than the .jar files specified in HTML parameter archive. Similar treatment is given to .jar files specified in cache_archive_ex when preload and version options are not provided.

Class files and resources will be searched in the following order from the .jar files specified by the HTML parameters

  1. cache_archive_ex
  2. cache_archive
  3. archive

Applet Caching Update Algorithm

By default, without the cache_version attribute, applet caching will be updated if:

  • The cache_archive has not been cached before, or
  • The "Last-Modified" value of the cache_archive on the web server is newer than the one stored locally in the applet cache, or
  • The "Content-Length" of the cache_archive on the web server is different from the one stored locally in the applet cache.

However, in some situations, the "Last-Modified" value returned from the web server through HTTP/HTTPS may not reflect the actual version of the applets. For example, if the web server crashes and all the files are restored, the cache_archive may have a different modification date on the server. Even if the cache_archive has not been updated, it will still force all the Java Plug-in clients to download the cache_archive again.

To strongly enforce the version update, it is recommended that the applet deployer use the cache_version attribute.

If cache_version is used, applet caching will be updated if the cache_version for the cache_archive is larger than the one stored locally in the applet cache. Note that the version number is used for triggering an update; there is no actual version number attached to the .jar file on the web server. In fact, unless version is used to trigger an update, it is possible the applet on the web server could be updated without the applet in cache_archive.

Using cache_version eliminates the need to connect to the web server to obtain "Modification-Date" and "Content-Length" of the cache_archive. In most cases this will speed up performance.

Security

Although sticky applets are cached locally, they will still conform to the security policy defined by their original codebase and signer.

Versioning Support

Java Plug-in 6 applets can use the JNLP Version Download protocol for launching JAR resources listed in the HTML file. Versioning also supports JarDiff. To use versioning support use the archive_x tag where x specifies a number. The following is the syntax of the archive_x tag.

  • First value must be the jar filename
  • Each value must be separated by comma
  • Use preload to indicate preloading of the jar file
  • version= is used to specify the version string for the jar file request

The following are the various ways in which the archive_x tag can be used.

<PARAM NAME="archive_1" VALUE="a.jar, preload, version=2.0+">

  • The + sign after the version indicates the Java Plug-in to request for a jar file whose version is equal to or higher than the specified version
<PARAM NAME="archive_1" VALUE="a.jar, preload, version=2.0*">
  • The * sign after the version indicates the Java Plug-in to request for a jar file whose version begins with 2.0, e.g 2.0.1 or 2.0.2
<PARAM NAME="archive_2" VALUE="b.jar, version=0.0.0.3">
  • This allows Java Plug-in to request for a jar file whose version is exactly 0.0.0.3

Note

If the archive_x tag is specified, old style tags (cache_archive, cache_version, cache_archive_ex) are ignored.

Applets using JNLP style version support should use the JNLPDownloadServlet to host the applet resources. More information about JNLP Version Download protocol and JNLPDownloadServlet is available in the JNLP Guide.

Known Issues

  • Caching of the .jar files specified in the manifest's Class-Path variable using Java Plug-in's cache is currently not supported.
  • The path specified in the cache_archive must be a relative URL to the applet's codebase. Full URLs are not supported in cache_archive.
  • The "java.io.IOException: Caching not supported for ..." is thrown because Java Plug-in could not get the expiration and last-modification dates for a given JAR file from the web server. If the Java Plug-in cannot get the date information, the JAR file is downloaded every time it is used.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applet Deployment Parameters

Java Rich Internet Applications Guide > Applet Developer's Guide > Applet Deployment Parameters

Applets may be deployed by hand-coding the applet, object or embed tags with the required parameters. This section describes these parameters. However, to assure cross browser compatibility, it is recommended that the Deployment Toolkit be used to deploy applets. Refer to Java Rich Internet Applications Deployment Advice for information on using the Deployment Toolkit and deploying applets using JNLP.

The following topics are covered:

  • Deployment using JNLP
    • jnlp_href
  • Loading Screen
    • boxborder
    • centerimage
  • Command-line Arguments
    • java-vm-args
    • java_arguments
    • separate_jvm
  • JRE Version Selection
    • java_version
    • class-id attribute in Internet Explorer
    • version and jpi-version attributes in the Mozilla Browser family
  • Class Loader Caching
    • classloader_cache
  • Security
    • permissions
  • Java Cache
    • cache_archive

Deployment using JNLP

jnlp_href

The file containing information that the plug-in should use to launch the applet.

Loading Screen

The Java Plug-in offers better customization of the image that is displayed before the applet is loaded. Animated GIFs are now supported as the target of the image parameter, as described in Special Attributes. Additionally, the following parameters are supported:

boxborder

A boolean parameter indicating whether a one-pixel border should be drawn around the edge of the applet's area while displaying the image shown before the applet is loaded. Defaults to true. We recommend setting this value to false, in particular when using an animated GIF as the loading image, to avoid the possibility of flicker.

centerimage

A boolean parameter indicating whether the loading image should be centered within the area of the applet instead of originating at the upper left corner. Defaults to false.

Example using the boxborder and centerimage parameters:

   <APPLET archive="large_archive.jar"
                   code="MyApplet"
                   width="300" height="300">
          <!-- Use an animated GIF as an indeterminate progress bar
                   while the applet is loading -->
          <PARAM NAME="image" VALUE="animated_gif.gif">
          <!-- Turn off the box border for better blending with the
                   surrounding web page -->
          <PARAM NAME="boxborder" VALUE="false">
          <!-- Center the image in the applet's area -->
          <PARAM NAME="centerimage" VALUE="true">
        </APPLET>

Command-line Arguments

java-vm-args

Specifies an additional set of standard and non-standard virtual machine arguments that the application prefers the JNLP client to use when launching Java. When both java_arguments and java-vm-args are present, the java-vm-args arguments take precedence.

java_arguments

Specifies JVM command-line arguments to be used when executing this applet instance. Nearly all JVM command-line arguments are supported, though there are certain rules and restrictions. When both java_arguments and java-vm-args are present, the java-vm-args arguments take precedence.

The java_arguments option is primarily for the purpose of avoiding a client Java VM relaunch during applet startup. As a good practice, if both java_arguments and java-vm-args are specified, they should contain the same values.

Examples Illustrating the Relationship Between java_arguments and java-vm-args

Scenario 1:: Both parameters are defined and their values are different.

java_arguments = -Xmx256m
java-vm-args = -verbose

Expected behavior on all platforms: -verbose
The JVM first launches using the value specified by the java_arguments tag. The client JVM detects the mismatch and relaunches with -verbose only. A warning is printed to the Java console.

Scenario 2: Both parameters are defined, and the values specified in java-vm-args are a subset of those specified in java_arguments.

java_argument = -Xmx256m -verbose
java-vm-args = -verbose

Expected behavior on all platforms: -verbose
The JVM first launches with the full set of arguments as specified by java_arguments. The client JVM detects the mismatch, and relaunches the smaller set of argument as specified by java-vm-args only. A warning about the parameter mismatch is printed in the Java console.

Scenario 3: The java_arguments tag is defined in the HTML file, but the java-vm-args tag is not defined in the JNLP file.

java_arguments = -Xmx256m
java-vm-args = [not defined]

Expected behavior on all platforms: [no jvm params]
The JVM first launches with the values specified in java_arguments. The client JVM detects the mismatch and relaunches the JVM with no params. A warning about the parameter mismatch is printed in the Java console.

Scenario 4: The java_arguments tag is not defined in the HTML file, but the java-vm-args tag is defined in the JNLP file.

java_arguments = [not defined]
java-vm-args = -Xmx256m

Expected behavior on all platforms: -Xmx256m
The JVM first launches with no JVM arguments, as there are none specified in the java_arguments tag. The client JVM detects the mismatch and relaunches the JVM using the values specified in java-vm-args.

Other Examples

  1. Specifying a larger-than-default maximum heap size:
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_arguments" value="-Xmx128m">
</APPLET>
  2. Specifying a non-default heap size and a Java 2D hardware acceleration option typically used for applets using OpenGL via Java Binding for the OpenGL API (JOGL):
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_arguments" value="-Xmx256m -Dsun.java2d.noddraw=true">
</APPLET>
  3. Enabling verbose output of the garbage collector, and the assertion facility in the Java programming language:
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_arguments" value="-verbose:gc -ea:MyApplet">
</APPLET>

A set of "secure" JVM command-line arguments and system properties is defined in the JNLP File Syntax section of the Java Web Start Developers' Guide. In the Java Plug-in, as long as all of the JVM command-line arguments specified via the java_arguments parameter are secure, then the applet, or any classes it loads, may run without permissions.

Insecure JVM command-line arguments (in other words, those not on the secure list) may also be specified via the java_arguments parameter. In this case, there is the potential for a security risk, so the Java Plug-In enforces the rule that no unsigned classes may be loaded. In other words, only trusted code, for which the user has accepted the security dialog, may be loaded by such a JVM instance. If an attempt is made to load an unsigned or untrusted class in a JVM instance for which insecure system properties have been specified, a ClassNotFoundException will be thrown indicating that the given class could not be loaded because it was not signed.

There are relatively few restrictions on what command-line arguments may be passed via the java_arguments parameter. In general, the -Xbootclasspath argument is forbidden, as well as any command-line argument used to specify a path, such as -classpath or -jar. All other command-line arguments, present and future, should be supported, with the caveat about secure and insecure command-line arguments described above.

The command-line arguments passed via the java_arguments parameter are added to any specified via the Java Runtime Environment Settings dialog in the Java Control Panel. The command-line arguments from the control panel are used for all JVM instances of the version for which they are specified; the java_arguments parameters do not completely replace them.

When JVM command-line arguments are specified, it is likely that the Java Plug-in will need to launch another JVM instance in order to satisfy them. In other words, it is unlikely that a preexisting JVM instance will have been started with the correct set of command-line arguments to satisfy the request. The rules for exactly when a new JVM instance is launched to start a given applet are deliberately left unspecified and may need to change in subsequent releases. Here is a rough set of guidelines for the sharing and creation of new JVM instances:

  • If the command-line arguments used to start a preexisting JVM instance are a superset of the requested arguments, the preexisting JVM instance will be used.
  • If a JVM instance is launched for the "default" set of command-line arguments (i.e., those specified in the Java Control Panel, with no java_arguments specified), then this JVM instance will never be used to launch any applet that has even one command-line argument specified via java_arguments.
  • -Xmx is handled specially: if a preexisting JVM instance was started with for example -Xmx256m via java_arguments, and a new applet requests -Xmx128m, then new applet will very likely be run in the preexisting JVM instance. In other words, -Xmx specifications are matched with a greater-than-or-equal test.

There is no way to "name" a JVM instance used to launch a particular applet and "force" subsequent applets into that JVM instance.

See the section on the separate_jvm parameter to isolate a particular applet in its own JVM instance, separate from all other applets.

separate_jvm

A boolean parameter specifying that a particular applet should run in its own JVM instance. This supports certain powerful desktop applets which can not tolerate any interference from other applets running in the same JVM and potentially consuming heap space or other resources.

<APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_arguments" value="...">
    <PARAM name="separate_jvm" value="true">
</APPLET>

JRE Version Selection

java_version

Specifies a JRE version upon which to launch a particular applet.

Examples

  1. Specifying a particular JRE version for a particular applet:
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_version" value="1.5.0_09">
</APPLET>
  2. Requesting any JRE in a particular family for a particular applet:
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_version" value="1.5*">
</APPLET>
  3. Specifying a JRE from a particular family or any later family:
    <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="java_version" value="1.5+">
</APPLET>

classid Attribute in Internet Explorer

The Internet Explorer browser uses the classid attribute of the <object> tag to indicate how the content of that tag should be displayed. The classid attribute can be used in conjunction with the codebase attribute to automatically download and install a particular JRE version if none is currently available on the system (see classid usage). The family CLSID concept was introduced more recently to provide a way to select an arbitrary JRE in a given family. (See Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer for more information.)

Not all of the classid options described in earlier documentation work in conjunction with the Java Plug-In to both select, and potentially automatically download and install, a particular JRE version. This section describes what works in conjunction with the Java Plug-in, and what backward compatibility mechanisms are in place.

Recommended Usage

The recommended usage of the classid attribute is in conjunction with the java_version parameter described above. The dynamic classid, which always points to the latest installed JRE version, should be specified in the <object> tag in order to indicate that the latest version of the Java Plug-In, with multiple JRE support, should be used. The java_version parameter should then be used to specify the version of the JRE to use to run the applet.

Example of recommended usage:

  <object
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase="http://www.example.com/out-of-proc-plugin-url-placeholder.exe#1,6,0,10"
    width="200" height="200">
      <param name="code" value="MyApplet">
      <param name="java_version" value="1.5*">
  </object>

Note that, at the current time, Oracle is not providing a new CLSID to describe the Java Plug-In, but instead overloading the usage of the dynamic classid. This means that if a previous version of the JRE is already installed which does not have multiple JRE version support in the Java Plug-In, the Java Plug-In will not be automatically downloaded and installed, since a handler for that classid is already available. The result will be that the version selection via the java_version parameter will be ignored. The decision to not provide a new classid may be revisited in the future. For the time being, Oracle expects that sophisticated developers requiring multiple JRE version selection and automatic download of the Java Plug-In will either document that their users must install and configure the Java Plug-In in order to properly run their content, or will have administrative control over the client computers, as is common in many enterprises.

Backward Compatibility

To ease the transition for developers already using the classid attribute, two backward compatibility mechanisms have been introduced: the ability to use a classid to select either a specific JRE version, or an arbitrary JRE in a given family. In both cases, the expectation is that both the Java Plug-In, and the target JRE version for the applet, are already installed and configured. In conjunction with these backward compatibility mechanisms, auto-downloading of any JRE, either the one supplying the Java Plug-In or the one to be used to run the applet, is not supported.

Note that these backward compatibility mechanisms may be removed in a future release. Oracle recommends transitioning existing content to the new mechanisms described previously.

Selecting a particular JRE version (1.5.0_11) for an individual applet:

  <object
    classid="clsid:CAFEEFAC-0015-0000-0011-ABCDEFFEDCBA"
    width="200" height="200">
      <param name="code" value="MyApplet">
  </object>

Selecting the latest JRE from a particular family (1.5) using the family CLSID:

  <object
    classid="clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA"
    width="200" height="200">
      <param name="code" value="MyApplet">
  </object>

Note that attempts to download older versions of the JRE using the codebase parameter will be ignored, because these classids are registered on the system to point to more recent versions of the DLLs during the installation process of the Java Plug-In. Note also that the use of the java_version parameter in conjunction with these classids is not supported. Specifying both the java_version parameter as well as either a static or family classid will result in undefined behavior.

version and jpi-version attributes in the Mozilla Browser Family

The Mozilla browser family uses the MIME type in the <embed> tag to indicate how the content of that tag should be displayed. The <embed> tag also supports automatic downloading of a particular version of the JRE.

Previous versions of the Java Plug-In used the version and jpi-version portions of the application/x-java-applet MIME type to perform JRE version selection. Not all of these mechanisms described in earlier documentation work in conjunction with the Java Plug-In to both select, and potentially automatically download and install, a particular JRE version. This section describes what works in conjunction with the Java Plug-in, and what backward compatibility mechanisms are in place.

Recommended Usage

The recommended usage of the <embed> tag is to not specify any version or jpi-version in the MIME type of the applet. Instead, use the java_version parameter to choose a particular JRE version upon which to run the applet. If no previous Java version is installed, auto-download of the Java Plug-In can be enabled using the pluginspage parameter:

  <embed code="MyApplet"
    type="application/x-java-applet"
    pluginspage="http://www.example.com/out-of-proc-plugin-url-placeholder.xpi"
    width="200" height="200">
    java_version="1.5*"
  </embed>

Note that, at the current time, Oracle is not providing a new MIME type to describe the Java Plug-In, but instead overloading the usage of the application/x-java-applet MIME type. This means that if a previous version of the JRE is already installed which does not have multiple JRE version support in the Java Plug-In, the Java Plug-In will not be automatically downloaded and installed, since a plugin supporting that MIME type is already available. The result will be that the version selection via the java_version parameter will be ignored. The decision to not provide a new MIME type may be revisited in the future. For the time being, Oracle expects that sophisticated developers requiring multiple JRE version selection and automatic download of the Java Plug-In will either document that their users must install and configure the Java Plug-In in order to properly run their content, or will have administrative control over the client s, as is common in many enterprises.

Backward Compatibility

To ease the transition for developers already using the version and jpi-version portions of the MIME type, a limited degree of backward compatibility is supported in the Java Plug-In. Specifically, the version attribute is supported to request an arbitrary JRE in a given family or any later family. Using the jpi-version attribute to select a particular JRE version is no longer supported. Its use is strongly discouraged since it may disrupt correct operation of the Java Plug-In.

Note that this backward compatibility mechanism may be removed in a future release. Oracle recommends transitioning existing content to the mechanisms described previously.

To use the version attribute to require the 1.5 JRE or a later one:

  <embed code="MyApplet"
    type="application/x-java-applet;version=1.5"
    width="200" height="200">
  </embed>

Note that the semantics of the version attribute imply that the above tag is equivalent to using the java_version parameter with a value of 1.5+. Since this Java Plug-In is delivered with Java SE 6 update 10, which is a later version than 5.0, this version request essentially has no effect.

Note also that combining the version attribute with the java_version parameter is not supported. Specifying both the java_version parameter as well as a version attribute will result in undefined behavior.

Class Loader Caching

classloader_cache

The Java Plug-in provides a way to opt out of the use of the class loader cache on an applet by applet basis.

<APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
    <PARAM name="classloader_cache" value="false">
</APPLET>

The default value of the classloader_cache parameter is true; class loader caching is enabled by default.

Security

permissions

Specifies the level of permissions that the applet needs to run. The following values are valid:

  • sandbox - The applet runs in the security sandbox.
  • all-permissions - The applet requires access to resources on the user's system.
  • default - The level of permissions is determined by the Permissions attribute in the manifest for the main JAR file.
  <APPLET archive="my_applet.jar" code="MyApplet" width="300" height="300">
     <PARAM name="permissions" value="sandbox" />
  </APPLET>

If this parameter is omitted, default is assumed. If the parameter is present and not set to default, the value must match the value of the Permissions attribute in the manifest for any JAR file that has the Permissions attribute, otherwise the applet is blocked.

Java Cache

Files you use in Java applications are stored in a special folder for quick execution later; this folder is also called the Java cache. The subpanel Temporary Internet Files in the General panel in the Java Control Panel enables you to view which files are stored in the Java cache and control how much disk space it can take up in your computer.

cache_archive

The cache_archive attribute contains a list of the files to be cached:

<param name="cache_archive" VALUE="a.jar,b.jar,c.jar">

Like the archive attribute in the applet tag, the list of jar files in the cache_archive attribute do not contain the full URL, but are always downloaded from the codebase specified in the embed/object tag.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applet Developer's Guide

Java Rich Internet Applications Guide > Applet Developer's Guide

This guide covers the following topics:

  • Java Plug-in and Applet Architecture
  • Applet Deployment
  • Using applet, object and embed Tags
  • Applet Status And Event Handlers
  • Codebase Determination

Overview

Java Plug-in technology (hereafter the "Java Plug-in"), which is included in the Java Runtime Environment, enables Java applets to run in popular web browsers on the desktop. The Java Plug-in provides powerful new capabilities to applets in the web browser, while improving the overall reliability and functionality of applets in a backward-compatible manner.

The Java Plug-in runs one or more Java virtual machine instances (JVMs) that connect back to the browser for full interoperability with the surrounding web page. This architectural change offers many advantages and features:

  • The JVM running the applet is isolated from the web browser at the operating system level. If something should go wrong while running the applet, or if an uncooperative applet refuses to shut down, the Java Plug-in detects and handles the error condition gracefully; the web browser is unaffected.

    The Java Plug-in starts applets in the background, so the web browser always remains responsive. Applets appear on the web page as they become ready to run.

  • The Java Plug-in offers the capability to launch applets directly from JNLP files, unifying deployment of Java content both in the browser and out of the browser (via Java Web Start). Developers can reuse JNLP extensions for advanced functionality including Java Binding for the OpenGL API (JOGL) and NASA World Wind (planetary-scale terrain visualization) within applets. Applets can access JNLP APIs for persistent data storage, local file system access, and other useful functionality from sandboxed code.

  • The bridge between the JavaScript engine in the web browser and the Java programming language is backward-compatible and features exceptional reliability, performance, and cross-browser portability for both Java calling JavaScript as well as JavaScript calling Java. Formerly Mozilla-specific "LiveConnect" functionality, such as the ability to call static Java methods, instantiate new Java objects and reference third-party packages from JavaScript, is available in all browsers.

  • Applets can utilize as much heap space as command-line applications.

  • JVM command-line arguments may be specified in the HTML of the web page on a per-applet basis, providing fine-grained control over options such as the heap size and Java 2D hardware acceleration features.

  • Each individual applet instance may request a different JRE version on which to run. This feature is designed for enterprise customers who prefer to qualify their applets against either a particular JRE version or a particular JRE family. Both selection of a specific JRE version, or any in a particular family, are supported in the Java Plug-in.

See the Applet Development Tutorial, a comprehensive Java Tutorial that explains various aspects of applet development and deployment.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applet Status And Event Handlers

Java Rich Internet Applications Guide > Applet Developer's Guide > Applet Status and Event Handlers

Beginning in the Java SE 7 release, you can check the value of the status variable of an applet while it is being initialized. This check is non-blocking and immediately returns the status of the applet. You can explicitly check the status of the applet while it is loading and perform relevant actions or register event handlers that will automatically be invoked during various stages of applet initialization. The applet should be deployed with the java_status_events parameter set to true in order to use this functionality. See the Handling Initialization Status With Event Handlers topic in the Java Tutorials for step by step instructions and an example.

Applet Status

The following table displays the meaning of values returned by the status method of the applet.

Applet Status Values and Meaning
Applet Status | Applet Status Variable Value | Meaning
LOADING | 1 | Applet is loading
READY | 2 | Applet has loaded completely and is ready to receive JavaScript calls
ERROR | 3 | Error while loading applet

Applet Event Handlers

You can register event handlers for various events. The Java Plug-in software will invoke these event handlers at various stages of the applet loading process. The following table describes applet events for which event handlers can be registered.

Applet Events
Applet Event | When Event Occurs
onLoad | Occurs when applet status is READY. Applet has finished loading and is ready to receive JavaScript calls
onStop | Occurs when applet has stopped
onError | Occurs when applet status is ERROR. An error has occurred while loading the applet

You can register or determine an event handler in the JavaScript code of a web page as shown in the following code snippets.

// use an anonymous function
applet.onLoad(function() {
  //event handler for ready state
}

// use a regular function
function onLoadHandler() {
  // event handler for ready state
}

// Use method form
applet.onLoad(onLoadHandler);

// Use attribute form
applet.onLoad = onLoadHandler;

// get current event handler
var handler = applet.onLoad
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Codebase Determination

Java Rich Internet Applications Guide > Applet Developer's Guide > Codebase Determination

The following topics are covered:

  • Codebase Computation Rules
    • Examples
  • Best Practices

Codebase Computation Rules

In a JNLP file, the codebase is an optional parameter to the <jnlp> tag. It is used both to locate resources described in that JNLP file, as well as to find the JNLP file itself. For technical reasons, Java Web Start is not able to refresh the contents of the JNLP file from the server unless an absolute codebase is specified.

A codebase is always provided by the browser, either because it was explicitly specified, or implicitly obtained from the location of the HTML document. This allows relative URLs to be used in JNLP files, which is very useful for moving an entire tree of content from one server to another.

JNLP files reference other JNLP files in a tree structure. The root JNLP file for a JNLP applet is referenced by an <applet> tag. The applet tag's codebase helps define the location of the root JNLP file.

The rules for codebase computation are as follows:

  • If an absolute codebase is specified in the JNLP file, it is used. This is required for backward compatibility reasons.
  • If the JNLP codebase is not specified, the directory containing the JNLP file is used.
  • Otherwise, merge the JNLP's codebase into the directory containing the JNLP file.

In simple Java terms, this can be expressed as

   URL new_codebase = new URL(current_jnlp_dir, current_jnlp_codebase);

This codebase computation is not an extension of JSR-56. JSR-56 does not restrict the codebase to be absolute, and therefore it may be relative.

Examples

Example 1:

   this JNLP's location:   http://someserver.example.com/this.jnlp
   this JNLP's codebase:   http://www.example.com/test/
   resulting codebase for
     parsing this JNLP:    http://www.example.com/test/

Example 2:

   this JNLP's location:   http://www.example.com/test2/this.jnlp
   this JNLP's codebase:   <none>
   resulting codebase for
     parsing this JNLP:    http://www.example.com/test2/

Example 3:

   this JNLP's location:   http://www.example.com/this.jnlp
   this JNLP's codebase:   codebasedir
   resulting codebase for
     parsing this JNLP:    http://www.example.com/codebasedir

Example 4:

Relative paths are used to refer to each nested JNLP, just as in a tree of HTML files.

   www.example.com/html/my_applet.html
     refers to: my_applet.jnlp
     codebase:  www.example.com/html

     my_applet.jnlp:
       codebase not specified
       inherits "www.example.com/html"
       references JNLP extension "jogl/jogl.jnlp"

     jogl/
       jogl.jnlp
       codebase not specified
       inherits "www.example.com/html/jogl"
         (the directory containing jogl.jnlp)
       references gluegen-rt/gluegen-rt.jnlp

       gluegen-rt/
         gluegen-rt.jnlp
         codebase not specified
         inherits "www.example.com/html/jogl/gluegen-rt"
           (the directory containing gluegen-rt.jnlp)

Best Practices

We recommend either:

  • Leaving the codebase empty for both the main or extension JNLP file, allowing the referencing JNLP file or <applet> tag to implicitly specify the codebase.
  • Specifying an absolute URL for the codebase of any main or extension JNLP file.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Plug-in and Applet Architecture

Java Rich Internet Applications Guide > Applet Developer's Guide > Java Plug-in and Applet Architecture

This document describes how the Java Plug-in controls the execution of applets and interactions between applets and the browser.

The following topics are covered:

  • Architecture
    • Java Runtime Environment
    • Java Runtime Environment Version Selection
    • Thread Considerations
    • Classloader Cache and Interaction between Applets
    • Applet Garbage Collection
    • Applet Privileges
    • Proxy Configuration
    • Security

Architecture

Java Runtime Environment

With the Java Plug-in, applets are not run in the JVM inside the browser. Instead, they are executed in a separate process. The same JVM process can be shared between multiple applets, or applets may be placed into different processes depending on whether the existing JVMs match the applet requirements and have enough resources to execute the applet. An applet can request specific version of JRE to be used and can specify what options need to be passed to the JVM. An applet can also request to be executed in the separate JVM.

Java Plug-in running applets on different JRE versions

The browser and the applet can still communicate with one another, however. Existing APIs have been re-engineered to use process sockets, so things continue to work as they did before, only better. This architecture provides a number of benefits:

  • Applets that require different versions of the JRE can run simultaneously.
  • Applets can specify JRE start-up parameters such as heap size. (A new applet uses an existing JRE if it's requirements are a subset of an existing JRE, otherwise, a new JRE instance is launched.);
  • The message-passing interfaces are written in Java, so they run on all supported platforms, in the same way, so cross-browser compatibility is enhanced.

With that architecture, a new JRE can be launched whenever it is needed. But an applet will run in an existing JRE as long as:

  1. The JRE version required by the applet matches an existing JRE, and
  2. The JRE's launch parameters satisfy the applet's requirements

Note:

  • If two applets each require a large amount of memory, they might both run in the same JRE, causing one of them to run out of memory. But that's only a concern when you have multiple applets running simultaneously.

  • Particular versions of JRE can be marked as unavailable to the plugin by disabling them in the Java Control Panel.

Java Runtime Environment Version Selection

On all platforms, the Java Plug-in locates JREs to use from the entries listed in the Java Control Panel ("Java" tab, "View" button). The available JREs in this list are encoded in the deployment.properties file whose location is platform-dependent. On the Windows platform, it is generally located in C:\Users\[username]\AppData\LocalLow\Sun\Java\Deployment. On Solaris, Linux, and Mac OS X platforms, it is generally located in ~/.java/deployment/deployment.properties.

On Windows platforms, both the Java Control Panel and the Java Plug-in will automatically detect the installed JREs and add them to the available set. On Solaris, Linux, and Mac OS X platforms, auto-detection of installed JREs is not supported. The Java Runtime Environment Settings dialog, which is accessed by clicking View in the Java tab of the Java Control Panel, may be used to manually add JREs to the known list for the Java Plug-in.

By default, the Java Plug-in will execute all applets in the latest JRE version named in this list. It will only execute an applet on an earlier JRE version if explicitly requested.

When considering a request to launch an applet on a specific JRE version (for example, a particular update release like "1.5.0_11"):

  1. The list of available JREs is consulted. If there is an exact match of the version string, that JRE version is selected. Otherwise, if there are one or more installed JREs in the same family, the latest version is selected. Otherwise, the latest available JRE on the machine is selected.
  2. The selected JRE version is compared against the security baseline for the family. (See Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer for more information.) If it is equal to or more recent than that version, no further prompting is done and the applet is launched.
  3. Otherwise, the code for the applet is downloaded in a JVM instance of the selected JRE version. If the applet is signed and the user accepts the security dialog for the applet (or the code source has already been trusted), no further prompting is done and the applet is launched.
  4. Otherwise, we are dealing with an unsigned applet on an "older" JRE version. A dialog box is presented indicating that this applet is requesting to run on top of an older JRE release, and asks the user whether he or she wants to allow it to. If the user clicks "yes", the applet is launched. If the user clicks "no", the applet is re-launched on top of the latest available JRE version.

When considering a request to launch an applet on a particular family, the most recent JRE from that family will be selected and the above steps starting from (2) will be followed.

When considering a request to launch an applet on a particular family or any later family, the latest available JRE will be used to launch the applet.

Thread Considerations

A web browser's JavaScript interpreter engine is single thread. The Java Plug-in is capable of managing multiple threads. The Java Plug-in creates a separate worker thread for every applet. Applets themselves may be multi-threaded. Applets making JavaScript to Java calls and vice versa should be designed with the thread related issues in mind.

The following picture shows the thread interactions between the JavaScript Interpreter, Java Plug-in and an applet (i.e. Java).

JavaScript Interpreter, Java Plug-in and Applet Thread Interactions

When the JavaScript interpreter is idle, the Java Plug-in executes a JavaScript to Java call on the per applet worker thread (JavaScript Interpreter Not Busy scenario).

When a Java to Javascript call is in progress and a JavaScript to Java call is made, the latter is executed on the same thread that made the Java to JavaScript call (Round Trip scenario).

When a thread is executing a Java to JavaScript call, another thread wanting to do the same will be blocked till the first thread has received its result and is done (JavaScript Interpreter Busy scenario)

In order to avoid thread related issues especially when multiple applets are running simultaneously, keep both Java to JavaScript and JavaScript to Java calls short and avoid round trips, if possible.

Classloader Cache and Interaction between Applets

Normally, if two applets have the same codebase and archive parameters, they will be loaded by the same class loader instance. This behavior is required for backward compatibility, and is relied on by several real-world applications. The result is that multiple applets on the same web page may access each others' static variables at the Java language level, effectively allowing the multiple applets to be written as though they comprised a single application.

While this feature enables certain kinds of applications to be conveniently written, it has certain drawbacks. It interferes with termination of applets, in particular when multiple instances of the same applet are active. It makes the programming model for applets more complex, since it is under specified exactly when the static fields of an applet will be re-initialized, and when they will be maintained from run to run of the same applet. It causes imprecise behavior of certain user interface operations within the Java Plug-in due to the inability to identify exactly which applet initiated a particular request.

For this reason, the Java Plug-in provides a way to opt out of the use of the classloader cache on an applet by applet basis.

Applet Garbage Collection

Garbage collection occurs on an applet instance immediately after the destroy method finishes. The garbage collection applies to all memory acquired by the applet, except for static variables. Statics are preserved in the classloader cache, along with the classes themselves, for as long as the class loader is present.

So when does the class loader go away? That behavior is not specified. It's up to the implementation of the Java virtual machine and its interactions with the operating system. You can expect it be retained for as long as possible, but to be discarded when the memory is needed for other purposes.

Applet Privileges

All applets should be signed with a certificate from a recognized certificate authority. The user must agree to run an applet and having a valid certificate provides the user with some assurance that the applet is safe to run. An applet runs in a secure sandbox that prevents it from interacting with the users system, unless authorized. To obtain that authorization, the applet must request permissions when it is launched and the user must agree to run the applet. Permissions are needed to:

  • Print
  • Access the file system
  • Access browser cookies
  • Access other system resources

The basic applet security model is an all or nothing proposition. An applet with permissions has full access to the user's system. Without permissions, the applet has virtually no access at all.

Deployment of applets using JNLP allows them to avail a more fine-grained security model (similar to Java Web Start applications), that gives them controlled access to a user's system, under control of the user. (For example, the ability to save or open a file selected by the user and the ability to print.)

Proxy Configuration

See Proxy Configuration for details.

Security

See Security for details.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java™ Plug-in Configuration

Applet Developer's Guide > Java Plug-in Configuration

You can change the JREs available to your Java Plug-in for applet execution, via the Java tab in the Java Control Panel. Click View to view and change Java Runtime Environment Settings. Check the Enabled checkbox to make a JRE available to the Java Plug-in.

Enable JRE available to Java Plug-in

Click Find to find and add JREs that may just have been unzipped and not installed via an installer.

Click Add or Remove to explicitly add or remove JREs from the list.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using applet, object and embed Tags

Java Rich Internet Applications Guide > Applet Developer's Guide > Using applet, object, and embed Tags

This sections explains how to add Java applets to Web pages with the applet, object, and embed tag. In addition, this section provides guidelines for deploying applets on the Internet and on intranets, and for use with different browsers.

The following topics are covered:

  • General Considerations
  • Using the applet tag
  • Using the object tag
  • Using the embed tag
  • Deploying Applets in a Mixed-Browser Environment

General Considerations

How you deploy an applet depends on whether users access the Web page through the Internet or an Intranet, and the type of browser they use. Note this information about your users, then follow the general guidelines below.

Deploying Applets on the Internet Versus an Intranet

When deploying applets:

  • Use the applet tag if the Web page is accessed through the Internet.

  • Use the object or embed tag if the Web page is accessed through an intranet.

Deploying Applets for Specific Browsers

When deploying applets:

  • For Internet Explorer only, use the object tag.

  • For the Mozilla family of browsers only, use the embed tag.

If you must deploy an applet in a mixed-browser environment, follow the guidelines in the section Deploying Applets in a Mixed-Browser Environment.

Using the applet tag

You use the applet tag to deploy applets to a multi-browser environment.

For complete details on the applet tag, see the following:

  • Deploying With the Applet Tag
  • HTML 4.01 Specification

Note: The HTML specification states that the applet tag is deprecated, and that you should use the object tag instead. However, the specification is vague about how browsers should implement the object tag to support Java applets, and browser support is currently inconsistent. Oracle therefore recommends that you continue to use the applet tag as a consistent way to deploy Java applets across browsers on all platforms.

The following is the syntax for the applet tag. Required attributes are in bold. Optional attributes are in regular typeface. Values you specify are in italics:

    <applet
        codebase = codebaseURL
        archive = archiveList
        code = appletFile ...or...  object = serializedApplet
        alt = alternateText
        name = appletInstanceName
        width = pixels
        height = pixels
        align = alignment
        vspace = pixels
        hspace = pixels
        legacy_lifestyle = boolean
    >
    <param name = appletAttribute1 value = value1>
    <param name = appletAttribute2 value = value2>
    ...
    alternateHTML
    </applet>

code, codebase, and so on are attributes of the applet tag; they give the browser information about the applet. The only mandatory attributes are code, width, and height. Each attribute is described below.

codebase = codebaseURL
This optional attribute specifies the base URL of the applet: the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.
archive = archiveList
This optional attribute describes one or more archives containing classes and other resources that will be "preloaded". The classes are loaded using an instance of AppletClassLoader with the given codebase.
The archives in archiveList are separated by commas (,) Note: in JDK 1.1, multiple applet tags with the same codebase share the same instance of a ClassLoader. This is used by some client code to implement inter-applet communication. Future JDKs may provide other mechanisms for inter-applet communication. For security reasons, the applet's class loader can read only from the same codebase from which the applet was started. This means that archives in archiveList must be in the same directory as, or in a subdirectory of, the codebase. Entries in archiveList of the form ../a/b.jar will not work unless explicitly allowed for in the security policy file (except in the case of an HTTP codebase, where archives in archiveList must be from the same host as the codebase, but can have the symbol for parent directory (..) in their paths.)
code = appletFile
This required attribute gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URL of the applet. It cannot be absolute. One of code or object must be present. The value appletFile can be of the form classname.class or of the form packagename.classname.class.
object = serializedApplet
This attribute gives the name of the file that contains a serialized representation of an applet. The applet will be deserialized. The init() method will not be invoked but its start() method will. Attributes valid when the original object was serialized are not restored. Any attributes passed to this applet instance will be available to the applet; we advocate very strong restraint in using this feature. An applet should be stopped before it is serialized. One of code or object must be present.
alt = alternateText
This optional attribute specifies any text that should be displayed if the browser understands the applet tag but can't run Java applets.
name = appletInstanceName
This optional attribute specifies a name for the applet instance, which makes it possible for applets on the same page to find (and communicate with) each other.
width = pixels
height = pixels
These required attributes give the initial width and height (in pixels) of the applet display area, not counting any windows or dialogs that the applet brings up.
align = alignment
This optional attribute specifies the alignment of the applet. The possible values of this attribute are the same as those for the img tag: left, right, top, texttop, middle, absmiddle, baseline, bottom, and absbottom.
vspace = pixels
hspace = pixels
These optional attributes specify the number of pixels above and below the applet (vspace) and on each side of the applet (hspace). They're treated the same way as the img tag's vspace and hspace attributes.
legacy_lifecycle = boolean
If this optional attribute is set to true, a running applet is not destroyed when the user navigates away from a page. Furthermore, when the user navigates back to the page, the running applet is resumed unless the following occurs:
  • The browser reissues the request for the applet definition.
  • The response to this request produces an applet definition that differs from the applet definition that was returned by the original request.
<param name = appletAttribute1 value = value1>
<param name = appletAttribute2 value = value2> ...
This tag is the only way to specify an applet-specific attribute. Applets access their attributes with the getParameter() method.

Using the object tag

You use the object tag to deploy applets that are to be used only with Internet Explorer. For complete details on the object tag, read the W3 HTML specification. Following is an example of the object tag:

<OBJECT
  classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width="200" height="200">
  <PARAM name="code" value="Applet1.class">
</OBJECT>

The classid Attribute

The classid attribute identifies which minimum version of Java Plug-in to use.

The example shown below is the most commonly used form of the classid attribute. This example instructs Internet Explorer to use the highest installed version of Java Plug-in.

classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

Following is an alternative form of the classid attribute:

classid="clsid:CAFEEFAC-xxxx-yyyy-zzzz-ABCDEFFEDCBA"

In this form, "xxxx", "yyyy", and "zzzz" are four-digit numbers that identify the minimum version of Java Plug-in to be used. For example, to use Java Plug-in version 1.6, you specify:

classid="clsid:CAFEEFAC-0016-0000-0000-ABCDEFFEDCBA"

See Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer for more information about the classid attribute.

The codebase Attribute

You use the optional codebase attribute to specify if and how to download the JRE.

The codebase attribute has two forms:

  • codebase=<URL>

    With this form, if the JRE specified by the classid attribute is not installed locally, then the user is prompted to download the JRE from the URL specified.

  • codebase=<URL>#Version=major,minor,micro,update

    With this form, if the version of the JRE specified in the codebase attribute is greater than the version of the JRE specified by the classid attribute, then the user is prompted to download the JRE from the URL specified.

Following is an example of how to use the codebase attribute to set up automatic downloads from the Sun Java Web site:

<object
  classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width="200" height="200"
  codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
  <param name="code" value="Applet1.class">
</object>

Note: In this example the codebase=http://java.sun.com ... line is broken for readability. In the actual HTML file it would be one long line.

Oracle has packaged each version of the JRE installer in Microsoft cabinet (.cab) file format. See Autodownload Files for a list of these releases and the corresponding .cab file names.

Using the embed tag

You use the embed tag to deploy applets that are to be used only with the Mozilla family of browsers.

Following is an example of the embed tag:

<embed code="Applet1.class"
  width="200" height="200"
  type="application/x-java-applet;version=1.6"
  pluginspage="http://java.sun.com/javase/downloads/ea.jsp"/>

The type attribute can have one of two forms:

  • type="application/x-java-applet;version=1.6"

    With this form, the highest installed JRE that supports the MIME type i.e. application/x-java-applet;version=1.6 is invoked to run the applet. If a JRE with a version number equal to or greater than the version number specified is installed locally, then that JRE is invoked. Otherwise the user is directed to the URL specified as the value of the pluginspage attribute.
  • type="application/x-java-applet;jpi-version=1.5.0_07

    With this form, a JRE with at least the specified update version given by the value of jpi-version (in this example, 1.5.0_07) is invoked to run the applet. Otherwise the user is directed to the URL specified as the value of the pluginspage attribute.

Deploying Applets in a Mixed-Browser Environment

You can deploy applets for users of both Internet Explorer and the Mozilla family of browsers in one of two ways:

  • Using pure HTML

  • Using JavaScript

Deploying Applets Using Pure HTML

When using a pure HTML approach to deploy applets in a mixed-browser environment, note the following:

  • Internet Explorer

    • Recognizes the object tag
    • Ignores the contents of the comment tag
  • Mozilla browsers
    • Ignore an object tag with the classid attribute
    • Interpret the contents of the comment tag

Consider the following example code from an HTML page:

<object
  classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  <param name="code" value="Applet1.class">
    <comment>
      <embed code="Applet1.class"
        type="application/x-java-applet;version=1.6">
        <noembed>
          No Java Support.
        </noembed>
      </embed>
    </comment>
  </object>

Deploying Applets Using JavaScript

Instead of using the pure HTML approach described above, you can use JavaScript to deploy applets in a mixed-browser environment.

Through JavaScript, you:

  1. Detect the user's browser through the appName variable.

  2. Use the document.write() method to write a tag based on the value of the appName variable:

  1. If the browser name equals "Mozilla", write the embed tag.

  2. If the browser name equals "Microsoft Internet Explorer", write the object tag.

In the following example, the document.write() method outputs either an embed or object tag for each user “on the fly”:

<html>
<script language="Javascript">

  var _app = navigator.appName;

  if (_app == 'Mozilla') {
    document.write('<embed code="Applet1.class"',
                   'width="200"',
                   'height="200"',
                   'type="application/x-java-applet;version=1.5.0">');
    }
  else if (_app == 'Microsoft Internet Explorer') {
    document.write('<OBJECT ',
                   'classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"',
                   'width="200"',
                   'height="200">',
                   '<PARAM name="code" value="Applet1.class">',
                   '</OBJECT>');
    }
  else {
    document.write('<p>Sorry, unsupported browser.</p>');
    }

</script>
</html>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deployment Configuration File and Properties

Java Rich Internet Applications Guide > Java Control Panel > Deployment Configuration File and Properties

The following topics are covered:

  • Overview
  • Deployment Configuration File
  • Deployment Configuration Properties

Overview

The deployment.properties file is used for storing and retrieving deployment configuration properties in the Java Control Panel. They are also used for customizing runtime behavior for both Java Plug-in and Java Web Start.

There is always a User-Level deployment.properties file. Its location, which is non-configurable, is described below. There may also be an (optional) System-Level deployment.properties file. If it exists, its location is determined by a System Administrator through the deployment.config file as described below.

Deployment Configuration File (deployment.properties)

User Level

The following table shows the location of the User-Level deployment.properties file.

Operating System | Location
Windows | <User Application Data Folder>\LocalLow\Sun\Java\Deployment\deployment.properties
UNIX | ${user.home}/.java/deployment/deployment.properties
Mac OS X | ~/Library/Application Support/Oracle/Java/Deployment/deployment.properties

On Windows, <User Application Data Folder> is typically C:\Users\username. On UNIX, ${user.home} is typically /home/username. On Mac OS X, the tilde (~) represents the home directory, which is typically /Users/username.

Examples:

For user jsmith running on Windows 7, the deployment.properties file would be located in the following directory:

C:\Users\jsmith\AppData\LocalLow\Sun\Java\Deployment\deployment.properties

For user bjones running on UNIX, the deployment.properties file would be located in the following directory:

/home/bjones/.java/deployment/deployment.properties

For user jdoe running on Mac OS X, the deployment.properties file would be located in the following directory:

/Users/jdoe/Library/Application Support/Oracle/Java/Deployment/deployment.properties

System Level

The deployment.config file is used for specifying the System-Level deployment.properties in the infrastructure. By default no deployment.config file exists; thus, no system-wide deployment.properties file exists. If deployment.config exists, it is located in one of the directories shown in the following table.

Operating System
Location
Windows
  • <Windows Directory>\Sun\Java\Deployment\deployment.config
  • ${deployment.java.home}\lib\deployment.config
UNIX
  • /etc/.java/deployment/deployment.config
  • ${deployment.java.home}/lib/deployment.config
Mac OS X
  • /Library/Application Support/Oracle/Java/Deployment/deployment.config
  • ${deployment.java.home}/lib/deploy/deployment.config

${deployment.java.home} is the location of the JRE from which the deployment products are run. Deployment products include Java Web Start, Java Plug-in, Java Control Panel, and others.

deployment.config (if it exists) contains two properties: deployment.system.config and deployment.system.config.mandatory.

deployment.system.config is the URL to the system (enterprise-wide) deployment.properties file. This property can be used by system administrators to centrally administer or "lock-down" user-specific configuration settings. For local files, use the file protocol in the URL, for example, file:///C:/Windows/Sun/Java/Deployment/deployment.properties.

deployment.system.config.mandatory is a boolean. The default is false. If false, there will be an attempt to load the deployment.properties file pointed to by the deployment.system.config URL. If the URL can be found and loaded, it will be used. If true, there will likewise be an attempt to load the system deployment.properties file pointed to by the deployment.system.config URL. If the URL can be found and loaded, it will be used; but if it cannot be found or loaded, then nothing will be allowed to run.

Deployment Configuration Properties

The following table describes the properties that can be set in the deployment.properties file.

Note: Any system deployment property, say SomeKey=SomeValue, may be locked by including another key, SomeKey.locked. The key SomeKey.locked may or may not be set to a value; in either case, SomeKey=SomeValue will be locked so that the user cannot change it. If a system deployment property is not locked, then a user will be allowed to change it.

Infrastructure

Property Key | Type | Default Value | Description
deployment.user.cachedir | String | "$USER_HOME" + File.separator + "cache" | User-level cache directory.
deployment.system.cachedir | String | null | System-level cache directory.
deployment.user.logdir | String | "$USER_HOME" + File.separator + "log" | User-level log directory.
deployment.user.tmp | String | "$USER_HOME" + File.separator + "tmp"; | Temporary user directory.

Certificate stores and policy files

Property Key | Type | Default Value | Description
deployment.user.security.policy | String | "file://$USER_HOME/security/java.policy" | User-level security policy file. The protocol of URL is either file, HTTP, or HTTPS.
deployment.user.security.trusted.cacerts | String | "$USER_HOME" + File.separator + "security" + File.separator + "trusted.cacerts"; | User-level Root CA certificate store.
deployment.user.security.trusted.jssecacerts | String | "$USER_HOME" + File.separator + "security" + File.separator + "trusted.jssecacerts" | User-level JSSE CA certificate store.
deployment.user.security.trusted.certs | String | "$USER_HOME" + File.separator + "security" + File.separator + "trusted.certs" | User-level Trusted signer certificate store.
deployment.user.security.trusted.jssecerts | String | "$USER_HOME" + File.separator + "security" + File.separator + "trusted.jssecerts"; | User-level Trusted JSSE certificate store.
deployment.user.security.trusted.clientauthcerts | String | "$USER_HOME" + File.separator + "security" + File.separator + "trusted.clientcerts" | User-level Client Authentication certificate store.
deployment.user.security.exception.sites | String | "$USER_HOME" + File.separator + "security" + File.separator + "exception.sites" | Location of the exception site list. See Exception Site List for information.
deployment.system.security.policy | String | null | System-level security policy file. The protocol of URL is either file, HTTP, or HTTPS.
deployment.system.security.cacerts | String | "$JAVA_HOME" + File.separator + "lib" + File.separator + "security" + File.separator + "cacerts" | System-level Root CA certificate store.
deployment.system.security.jssecacerts | String | "$JAVA_HOME" + File.separator + "lib" + File.separator + "security" + File.separator + "jssecacerts"; | System-level JSSE CA certificate store.
deployment.system.security.trusted.certs | String | "$SYSTEM_HOME" + File.separator + "security" + File.separator + "trusted.certs" | System-level Signer certificate store.
deployment.system.security.trusted.jssecerts | String | "$SYSTEM_HOME" + File.separator + "security" + File.separator + "trusted.jssecerts" | System-level JSSE certificate store.
deployment.system.security.trusted.clientauthcerts | String | "$SYSTEM_HOME" + File.separator + "security" + File.separator + "trusted.clientcerts" | System-level Client Authentication certificate store.

Security Access And Control settings

Property Key | Type | Default Value | Description
deployment.security.level String HIGH
  • "MEDIUM": All applications that include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. If the Permissions attribute is not present in the main JAR file, then the application is blocked.
  • "HIGH": Applications that are signed with a valid or expired certificate and include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. Applications are also allowed to run with security prompts when the revocation status of the certificate cannot be checked. All other applications are blocked.
  • "VERY_HIGH": Applications that are signed with a valid certificate and include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. All other applications are blocked.
deployment.webjava.enabled | Boolean | true | Must be "true" to run applets or Java Web Start applications.

deployment.insecure.jres

 String "PROMPT"
  • "NEVER": Untrusted content will always run with the default JRE
  • "PROMPT": Prompt user before using insecure JRE versions; users will see the new warning dialogs
deployment.expiration.check.enabled | Boolean | true | Must be "true" to prompt users to update the JRE when an out-of-date JRE is found on their system. Set to "false" to suppress the prompt.

deployment.security.askgrantdialog.show

 Boolean true Must be "true" if the user is allowed to grant permissions at all.

deployment.security.askgrantdialog.notinca

 Boolean true Must be "true" if the user is allowed to grant permissions to certificates that are not issued by a CA in the Root/JSSE CA certificate store.

deployment.security.jsse.hostmismatch.warning

 Boolean true Must be "true" for JSSE HTTPS certificate verification to show host-mismatch warning.

deployment.security.trusted.policy

 String ""

Policy file contains the ceiling policy of permissions granted to trusted applications and applets. By default this is all permissions, but by using this configuration setting, a user or enterprise can configure a lesser set of permissions.

deployment.security.mixcode

 String ENABLE
  • "ENABLE" enables the software to test for mixing trusted and untrusted code and, when potentially unsafe components are detected, raises a warning dialog.
  • "HIDE_RUN" suppresses the warning dialog and, if potentially unsafe components are detected, behaves as if the user had clicked Run in the warning dialog - the applet or application continues running with some added protections.
  • "HIDE_CANCEL" suppresses the warning dialog and behaves as if the user had clicked Cancel in the warning dialog - potentially unsafe components are blocked from running and the program may terminate.
  • "DISABLE" (not recommended) disables the software from checking for mixing trusted and untrusted code, leaving the user to run potentially unsafe code with no warning and without the additional protections.

deployment.security.sandbox.awtwarningwindow

 Boolean true "true" if the sandbox has awtShowWindowWithoutWarning.

deployment.security.sandbox.jnlp.enhanced

 Boolean true Must be "true" for the user to see and accept JNLP API security dialogs.
deployment.security.sandbox.selfsigned String PROMPT
  • "PROMPT": Prompt user to allow the self-signed app to run in the sandbox.
  • "NEVER": Block all self-signed content.
deployment.security.sandbox.casigned String PROMPT
  • "PROMPT": Prompt user to allow the app to run and provide information on the certificate used to sign the app. The user can choose to turn off future prompting for this application.
  • "NEVER": Block any content from running unless it asks for and is granted all permissions.
deployment.security.blacklist.check | Boolean | true | Support for blacklisting signed JAR files that contain serious security vulnerabilities. deployment.security.blacklist.check is used to toggle this behaviour. For more information visit Blacklist Feature.
deployment.security.revocation.check String ALL_CERTIFICATES
  • "PUBLISHER_ONLY" checks only the certificate that the publisher used to sign the application.
  • "ALL_CERTIFICATES" checks all certificates in the certificate chain.
  • "NO_CHECK" (not recommended) suppresses the check for certificates that have been revoked.
deployment.security.validation.ocsp | Boolean | true | Specifies whether Online Certificate Status Protocol is enabled.
deployment.security.validation.ocsp.url | String | null | Specifies a url string pointing to an OCSP response server.
deployment.security.validation.ocsp.signer | String | null | Points to a OCSP response singer certificate subject name.
deployment.security.validation.crl | Boolean | true | Specifies whether to use certificate revocation list.
deployment.security.validation.crl.url | String | null | Specifies a URL in the Certificate Revocation List to perform a certificate validation.
deployment.security.validation.clockskew | int | 900 | Acceptable time difference, in seconds, between the system clock and the clock on the server used for revocation checks. If the property is not set, or the value is negative, the default of 900 seconds (15 minutes) is used.
deployment.security.validation.timeout | int | 15 | Maximum time, in seconds, that the system attempts to connect to the server for revocation checks before timing out. If the property is not set, or the value is negative, the default of 15 seconds is used. To never time out, set the property to 0.
deployment.security.authenticator
 Boolean true Normally Plug-in and Web Start install an Authenticator to handle communication with Authenticating web pages or Authenticating proxies. This is the default behavior (true). This option can be used to turn the normal behavior off if, for example, an application communicates itself with an authenticating web page and needs to install it's own Authenticator.

Networking

Property Key | Type | Default Value | Description

deployment.proxy.type

 int 3 for PROX_TYPE_BROWSER

This is for the type of proxy that should be use. The choices are:

PROX_TYPE_UNKNOWN = -1;
PROX_TYPE_NONE = 0;
PROX_TYPE_MANUAL = 1;
PROX_TYPE_AUTO = 2; and
PROX_TYPE_BROWSER = 3;

deployment.proxy.same

 Boolean false This parameter (true) says to use the same web server and port for https and ftp as is configured for http. (This is only valid if deployment.proxy.type = PROX_TYPE_MANUAL.)
deployment.proxy.auto.config.url | String | (no default) | URL for auto-Auto proxy configuration JavaScript.proxy configuration JavaScript.
deployment.proxy.bypass.list | String | (no default) | List of host names that should bypass the proxy. Each host name is delimited by a comma in the property; e.g., "192.168.1.100,localhost,example.com"
deployment.proxy.bypass.local String (no default)

All local hosts should be bypassed.
deployment.proxy.http.host | String | (no default) | HTTP proxy hostname.
deployment.proxy.http.port | String | (no default) | HTTP proxy port.
deployment.proxy.https.host | String | (no default) | HTTPS proxy hostname.
deployment.proxy.https.port | String | (no default) | HTTPS proxy port.
deployment.proxy.ftp.host | String | (no default) | FTP proxy hostname.
deployment.proxy.ftp.port | String | (no default) | FTP proxy port.
deployment.proxy.socks.host | String | (no default) | SOCKS v4 proxy hostname.
deployment.proxy.socks.port | String | (no default) | SOCKS v4 proxy port.
deployment.proxy.override.hosts
 String "" Proxy overridden list.

Cache and Optional Package Repository

Property Key | Type | Default Value | Description
deployment.cache.max.size | int | "-1" | Maximum size of deployment cache in MB. This is the cache size for each cache: Java Web Start and Java Plug-in. "0"-Disables caching in Java Plug-in; cache size in Java Web Start will be unlimited. "-1"-For unlimited cache size.
deployment.cache.jarcompression | String | 0 | 0-9 compression ratio to be used in applet jar compression.
deployment.javapi.cache.enabled | Boolean | false | Specifies if cache should be disabled. false means it should not be disabled.

Java Console

Property Key Type Default Value Description

deployment.console.startup.mode

 String

"HIDE"

The choices are:

  • "HIDE" to hide the Java Console;
  • "SHOW" to show the Java Console;
  • "DISABLE" to disable the Java Console;

Tracing and Logging

Property Key | Type | Default Value | Description
deployment.trace | Boolean | false | Enable tracing.
deployment.log | Boolean | false | Enable logging.

Java Web Start: JNLP Association

Property Key Type Default Value Description
deployment.javaws.associations int 2

The JNLP associations. The choices are:

ASSOCIATION_NEVER = 0;
ASSOCIATION_NEW_ONLY = 1;
ASSOCIATION_ASK_USER = 2;
ASSOCIATION_REPLACE_ASK = 3;

Java Web Start: Desktop Integration

Property Key Type Default Value Description

deployment.javaws.shortcut

 String "ASK_IF_HINTED"

This relates to creating a desktop shortcut for Java Web Start. The choices are:

  • "NEVER"
  • "ALWAYS"
  • "ASK_USER"
  • "ASK_IF_HINTED"
  • "ALWAYS_IF_HINTED"

Browser selection and path

Property Key Type Default Value Description

deployment.browser.path

 String "<No Browser Selected>"

This is the path to the browser for showing web pages from the application viewer, the About Box, and Web Start applications.

Note that this property is used for Solaris and Linux only. On Widows, this property is ignored, and the default browser is determined the same way it is by any other application that launches a browser on Windows.

Check for update Timeout

Property Key | Type | Default Value | Description
deployment.javaws.update.timeout | int | 500 | Units are milliseconds.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Console

Java Rich Internet Applications Guide > Java Control Panel > Java Console

The following topics are covered:

  • What is Java Console?
  • Debugging Options
  • Task-Bar Integration
  • Startup Behavior

What is Java Console?

Java Console is a simple debugging aid that redirects any System.out and System.err to the console window. It is available for applets running with Java Plug-in and applications running with Java Web Start.

Debugging Options

Java Console provides various options as shown below to make applet and application debugging easier.

An action/option is selected by typing its letter/number while the Java Console window has focus.

Key | Description
c: | Clears the Java Console window.
f: | Triggers finalization on the objects in the finalization queue and then displays memory information. Memory refers to the current heap size used by the JRE. Free is the available memory that is free in the heap. The percent (xx%) is the free memory as a percent of the total heap size.
g: | Triggers garbage collection and displays memory information as described above.
h: | Displays help message, which is being described here.
l: | Displays a list of the cached ClassLoader objects in the Java Plug-in. Classes are cached to avoid having to load them again when returning to previously-visited pages. When a page is visited the first time, a ClassLoader object will be created and all of the classes that are downloaded will be cached in that object. These objects are created and cached according to their codebase. To identify a ClassLoader object, the "classloader list" displays the codebase for that object. Additional information displayed with a ClassLoader object includes zombie, cache and info. zombie = true indicates that a ClassLoader object is not being used (i.e., the applet is not currently loaded on the page). cache = true indicates that the applet should be cached, while false indicates that the applet will be destroyed when the page is left. info is a value used for debugging.
m: | Displays heap memory usage as described above.
o: | Triggers logging, which directs output from the Java Plug-in Console to a log file.
p: | Reloads the proxy configuration.
q: | Causes the Java Console to disapper from the main screen.
r: | Reloads the policy configuration.
s: | Prints out the system properties. This is mostly for debugging.
t: | Prints out all the existing thread groups. The first group shown is Group main. ac stands for active count; it is the total number of active threads in a thread group and its child thread groups. agc stands for active group count; it is the number of active child thread groups of a thread group. pri stands for priority; it is the priority of a thread group. Following Group main, other thread groups will be shown as Group <name>, where name is the URL associated with an applet. Individual listings of threads will show the thread name, the thread priority, alive if the thread is alive or destroyed if the thread is in the process of being destroyed, and daemon if the thread is a daemon thread.
x: | This removes (destroys) all ClassLoader objects in the cache. Modified jar files will be downloaded from the server when a page with an applet is refreshed or revisited if you first do this: type "x" in the Java Console to clear the Classloader cache.
0-5: | This sets the trace-level options as described in Tracing and Logging.

Task-Bar Integration

When Java Plug-in is running an icon is displayed in the taskbar for Windows or on the desktop for Solaris. When right-clicked, a menu option displays, allowing the user to Open/Hide the Java Console. Thus the user can open and hide the Java Console any number of times within the same browser session.

Startup Behavior

Java Console may be shown, hidden, or not started at startup time, as configured through the Java Control Panel in the Advanced tab.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Control Panel

The Java Control Panel is a multipurpose control panel. It allows you to view and set a wide range of parameters controlling how, or if, Java technology runs on your computer. It lets you view and delete temporary files used by the Java Plug-in, which allows Java technology to be used by your Web browser to run applets; and Java Web Start, which allows you to run Java applications over the network. It allows you to control certificates, making it safe to run applets and applications over the network. It enables you to view an active deployment rule set, and to manage the exception site list. It allows you to set runtime parameters for applets that run with Java Plug-in and applications that run with Java Web Start. It provides a mechanism for updating your version of the Java platform so that you always have the latest Java Runtime Environment (JRE). And it allows you to set options for debugging, applet handling, etc. The Java Control Panel includes the following separately viewable panels:

Contents

  • General
  • Update
  • Java
  • Security
  • Advanced

General

The General panel looks like this:

It includes three subpanels: About, Network Settings, and Temporary Internet Files. As of the JDK 7u10 release, this panel also informs you whether Java is enabled in the browser. This setting is contolled in the Security panel.

About

The About... button displays version information for the latest JRE installed on the computer.

Network Settings

These settings are for network connections. Press the Network Settings... button to get the Network Settings dialog. There are four choices:

Use browser settings

Check this to use the browser default proxy settings. This is the default setting (checked).

Use proxy server

You have two choices here:

  • You can set the Address and the Port for a proxy server with the option to bypass it for local addresses.
  • You can press the Advanced ... button to get the Advanced Network Settings dialog. In this panel you can individually set the proxy server for HTTP, Secure, FTP, and Socks connections. You can also provide a list of addresses for which you do not want to use a proxy server. The Advanced Network Settings panel looks like this:

Advanced Network Settings panel

Use automatic proxy configuration script

You can specify the location (URL) for the JavaScript file (.js or .pac extension) that contains the FindProxyForURL function. FindProxyForURL has the logic to determine the proxy server to use for a connection request.

Direct Connection

Select this for situations where you do not want to use a proxy.

Temporary Internet Files

You can do the following:

  • Press the Settings... button to get the Temporary Files Settings dialog from which you can perform the following:
    • Specify if you want to keep temporary files on your computer.
    • Specify the location where temporary files are kept.
    • Specify the compression level for JAR files.
    • Specify the amount of disk space for storing temporary files.
    • Delete temporary files by pressing the Delete Files... button, which displays the Delete Temporary Files dialog. From this dialog, you can specify which files you want to delete:
      • Trace and Log Files
      • Cached Applications and Applets
      • Installed Applications and Applets
    • Restore default settings for the Temporary Files Settings dialog by pressing the Restore Defaults button.
  • Press the View... button to get the Java Cache Viewer dialog. This dialog enables you to list applications, resources, and deleted applications stored in the Java cache. In addition, you may perform the following:
    • Run and visit the Web page of applications.
    • View the JNLP file of applications and resources.

Update

On Microsoft Windows platforms, the Update panel looks like this:

The Update panel, in conjunction with the Java Update Scheduler (jusched.exe), is used to provide the latest Java updates to the end user.

Note: This panel is only available on Microsoft Windows and Mac OS X and only for users with Administrative privileges. On Microsoft Windows, if both the 32-bit and 64-bit versions of Java are installed and this panel is not available, launch the Java Control Panel directly from the 32-bit directory command line (C:\Program Files (x86)\Java\jre7\bin\javacpl.exe).

Update Panel Options

There are two basic options on the Update tab:

  • Automatic update: Available only on Microsoft Windows XP and higher, and set by default
  • Manual update

Automatic update is performed on a scheduled basis and it is selected by checking the Check for Updates Automatically check box.

Manual update is performed by pressing the Update Now button.

If you select automatic update, you can then set the notification via the Notify Me: drop-down menu, and you can set the update schedule via the Advanced... button.

With notification, you can chose to be notified before an update is downloaded and before it is installed; or you can chose to be notified only before an update is installed (i.e., the download is automatic).

The Advanced... allows you to select the desired frequency for updates: daily, weekly, or monthly (default). For daily updates, you can select the time of the day for the update. For weekly updates, you can select the day of the week and the time of the day. For monthly updates, you can select the day of the week and the time of the day. Monthly updates check weekly and notify you within 30 days that an update is available, however, if an update is considered critical you are notified within a week of its release.

You can do manual updates at any time by pressing the Update Now button. This allows you to do immediate, unscheduled updates.

Java Update Scheduler

On Microsoft Windows platforms, the Java Update Scheduler (jusched.exe) is used for launching automatic updates when Update Automatically is selected in the Update tab. jusched.exe runs as a background process that launches the Update Manager at predefined intervals set by the user through the Advanced... button of the Update tab. The Update Manager coordinates the update process.

jusched.exe is launched when the user reboots the computer after installing the SDK/JRE. It is normally transparent to the user but can be viewed in the Processes tab of the Windows Task Manager. Should a user for some reason not want the scheduler to run, it can be killed via End Process button of the Processes tab.

Java

The Java panel looks like this:

Click the View... button to access the Java Runtime Environment Settings dialog.

Java Runtime Environment Settings

These settings will be used when a Java application is launched. The Java Runtime Environment Settings dialog looks like the following on Microsoft Windows:

Java Runtime Environment Settings dialog

Each row in the Java Runtime Versions panel represents a Java Runtime Environment that is installed in your computer. You may modify the value in each cell by double-clicking it:

  • Platform: The version of the Java Runtime Environment
  • Product: The full version number of the Java Runtime Environment (which includes the update number)
  • Location: The URL that Java Update Scheduler uses to launch automatic updates
  • Path: The full path name of the Java Runtime Environment
  • Runtime Parameters: Optional custom options used to override the Java Plug-in default startup parameters
  • Enabled: This option is for selecting which of the (older) JRE versions to consider when running an app using Java Plug-in or Java Web Start. If this check box is not selected, then Java Plug-in and Java Web Start will not use this JRE to launch Java apps. However, the current JRE might be used regardless of this checkbox. This checkbox does not affect stand alone applications, it is only for Java in the browser. Note that if all Java apps are disabled from running in the browser, by de-selecting Enable the Java content in the browser in the Security panel, enabling the JRE here has no effect.

Click the Find button to launch the JRE Finder. This utility searches for unregistered private Java Runtime Environments installed in your computer and adds them to the Java Runtime Versions panel.

Click the Add button to manually add a Java Runtime Environment to the Java Runtime Versions panel. When you click the Add button, a new row appears in the Java Runtime Versions panel; however, there are no values for Platform, Product, Path, Runtime Parameters, and Enabled; you must specify them yourself.

Click the Remove button to remove the selected Java Runtime Environment from the Java Runtime Versions panel.

Notes

There will always be at least one entry. It will be the most recently installed JRE; i.e., the JRE associated with the Java Control Panel.

Microsoft Windows will show all JREs installed on a computer. The Java Control Panel finds the JREs by looking in the registry. On Solaris, Linux, or Mac OS X, the situation is different. There is no registry so there is no easy way to find the JREs that a user may have installed. The JRE that Java Web Start or Java Plug-in is using to deploy applications is the JRE that is considered registered. Consequently, use the Find, Add, and Remove buttons to change which JREs are listed in the Java Runtime Environments panel. On Mac OS X, only the currently installed JRE is displayed, JDKs are not included.

For Solaris, Linux, or Mac OS X, only version 5.0 or higher should be added. For Microsoft Windows, where all JREs are found in the registry, version 1.3.1 or higher will be displayed.

Example:

Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.

  1. Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
  2. Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
  3. Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
  4. If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
  5. Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
  6. Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.

You can add a JRE by pressing Add and specifying its location (see notes above).

For Windows and Solaris, Linux, or Mac OS X you can optionally set Java Runtime Settings for the JRE.

Java Runtime Parameters

You can override the Java Plug-in default startup parameters by specifying custom options in the Java Runtime Parameters field. With the exception of setting classpath and cp, the syntax is the same as used with parameters to the java command line invocation. See the java launcher for a full list of command line options:

java launcher: Windows, Solaris, Linux, or Mac OS X.

Below are some examples of Java runtime parameters.

Setting classpath and cp

The following format should be used for setting classpath and cp in Java Plug-in. It differs slightly from the java command line format, which uses a space instead of the equal (=) sign.

-classpath=<path>
-cp=<path>

Enabling and disabling assertion support

To enable assertion support, the following system property must be specified in the Java Runtime Parameters:

-[ enableassertions | ea ][:<package name>"..." | : <class name> ]

To disable assertion in the Java Plug-in, specify the following in the Java Runtime Parameters:

-[ disableassertions | da ][:<package name>"..." | : <class name> ]

Assertion is disabled in Java Plug-in code by default. Since the effect of assertion is determined during Java Plug-in startup, changing assertion settings in the Java Plug-in Control Panel will require a browser restart in order for the new settings to take effect.

Because Java code in Java Plug-in also has built-in assertion, it is possible to enable the assertion in Java Plug-in code through the following:

-[ enableassertions | ea ]:sun.plugin

Tracing and logging support

Tracing is a facility to redirect any output in the Java Console to a trace file (.plugin<version>.trace).

-Djavaplugin.trace=true
-Djavaplugin.trace.option=basic|net|security|ext|liveconnect

If you do not want to use the default trace file name:

-Djavaplugin.trace.filename=<tracefilename>

Similar to tracing, logging is a facility to redirect any output in the Java Console to a log file (.plugin<version>.log) using the Java Logging API. Logging can be turned on by enabling the property javaplugin.logging.

-Djavaplugin.logging=true

If you do not want to use the default log file name, enter:

-Djavaplugin.log.filename=<logfilename>

Furthermore, if you do not want to overwrite the trace and log files each session, you can set the property:

-Djavaplugin.outputfiles.overwrite=false

If the property is set to false, then trace and log files will be uniquely named for each session. If the default trace and log file names are used, then the files would be named as follows

.plugin<username><date hash code>.trace
.plugin<username><date hash code>.log

Tracing and logging set through the Control Panel will take effect when the Plug-in is launched, but changes made through the Control Panel while a Plug-in is running will have no effect until a restart.

Debugging applets in Java Plug-in

The following options are used when debugging applets in the Java Plug-in.

-Djava.compiler=NONE
-Xnoagent
-Xdebug
-Xrunjdwp:transport=dt_shmem,address=<connect-address>,server=y,suspend=n

The <connect-address> can be any string (example: 2502) which is used by the Java Debugger (jdb) later to connect to the JVM

Default connection timeout

When a connection is made by an applet to a server and the server doesn't respond properly, the applet may appear to hang and may also cause the browser to hang, since by default there is no network connection timeout.

To avoid this problem, Java Plug-in 1.4 has added a default network timeout value (2 minutes) for all HTTP connections. You can override this setting in the Java Runtime Parameters:

-Dsun.net.client.defaultConnectTimeout=<value in
milliseconds>

Another networking property that you can set is sun.net.client.defaultReadTimeout.

-Dsun.net.client.defaultReadTimeout=<value in milliseconds>

Note

Java Plug-in does not set sun.net.client.defaultReadTimeout by default. If you want to set it, do so through the Java Runtime Parameters as shown above.

Networking properties description:

sun.net.client.defaultConnectTimeout
sun.net.client.defaultReadTimeout

These properties specify, respectively, the default connect and read timeout values for the protocol handlers used by java.net.URLConnection. The default value set by the protocol handlers is -1, which means there is no timeout set.

sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example, for http connections it is the timeout when establishing the connection to the http server. For ftp connections it is the timeout when establishing the connection to ftp servers.

sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from an input stream when a connection is established to a resource.

For the official description of these properties, see Networking Properties.

Security

As of the JDK 7u51 release, the Security panel looks like this:

De-selecting the Enable Java content in the browser button, which is selected by default, will prevent any Java application from running in the browser.

Security Level Slider

When the Enable Java content in the browser option is selected, the Security Level slider becomes available. As the security level is increased, more restrictions are placed on allowing an application to run, and stronger warnings are issued to the user.

The default security level setting is High. The available settings are:

  • Very High - Applications that are signed with a valid certificate that is located in the Signer CA keystore, and include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. All other applications are blocked.

  • High - Applications that are signed with a valid or expired certificate that is located in the Signer CA keystore, and include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. Applications are also allowed to run with security prompts when the revocation status of the certificate cannot be checked. All other applications are blocked.

  • Medium - All applications that include the Permissions attribute in the manifest for the main JAR file are allowed to run with security prompts. If the Permissions attribute is not present in the main JAR file, then the application is blocked.

See Rich Internet Application Deployment Process for information on how the decision to run or block an application is made.

The Security Level setting affects plug-in applets, Java Web Start applications, embedded JavaFX applications, and access to the native deployment toolkit plug-ins. This setting does not affect stand alone Java applications.

For more information, see Setting the Security Level of the Java Client.

Exception Site List

The exception site list contains a list of URLs that host RIAs that users want to run even if the RIAs are normally blocked by security checks. RIAs from the sites listed are allowed to run with applicable security prompts. Click Edit Site List to add, edit, and remove items.

See Exception Site List for more information.

Deployment Rule Set

If an active deployment rule set is installed on the system, the link View the active Deployment Rule Set is shown before the Manage Certificates button. Click the link to view the rule set. When a rule set is available, the rules determine if a RIA is run without security prompts, run with security prompts, or blocked. For more information on deployment rules, see Deployment Rule Set. For more information on security prompts, see Security Dialogs.

Restore Security Prompts

An option to hide a prompt in the future is included in some security prompts that are shown when an application starts. To insure the continued security of your system, it is recommended that you periodically restore the prompts that were hidden. Seeing the prompts again provides an opportunity to review the applications and ensure that you still want them to run.

To restore the prompts that were previously hidden, click Restore Security Prompts. When asked to confirm the selection, click Restore All. The next time an application is started, the security prompt for that application is shown.

Certificates

Click Manage Certificates to get the Certificates dialog, which looks like this:

Certificate Types

It handles both User- and System-Level (enterprise-wide) certificates of the following types:

  • Trusted
  • Secure Site
  • Signer CA
  • Secure site CA
  • Client Authentication

Trusted Certificates

These are certificates for signed applets and applications that are trusted.

Secure site

These are certificates for secure sites.

Signer CA

These are certificates of Certificate Authorities (CAs) for Trusted Certificates; Certificate Authorities are the ones who issue the certificates to the signers of Trusted Certificates.

Secure site CA

These are certificates of Certificate Authorities (CAs) for secure sites; Certificate Authorities are the ones who issue the certificates for secure sites.

Client Authentication

These are certificates for a client to authenticate itself to a server.

User-Level Certificates

Options

For user-level certificates, there are four options: Import, Export, Remove, and Details. The user can import, export, remove, and view the details of a certificate.

Default Keystore Location

The following table shows the default locations of the of the keystore files.

Operating System | Location
Solaris, Linux, or Mac OS X | ${user.home}/.java/deployment/security
Microsoft Windows | ${deployment.user.home}\security

For instance, on Microsoft Windows 7, the default location of the keystore files for user jsmith would be as follows:

C:\Users\jsmith\AppData\LocalLow\Sun\Java\Deployment\security

Non-Default Keystore Location

For non-default locations of the certificate keystore files, specify them in the User-Level deployment.properties file with the following property names:

Certificate Type | Property Name
Trusted Certificates | deployment.user.security.trusted.certs
Secure site | deployment.user.security.trusted.jssecerts
Signer CA | deployment.user.security.trusted.cacerts
Secure site CA | deployment.user.security.trusted.jssecacerts
Client Authentication | deployment.user.security.trusted.clientcerts

System-Level Certificates

Options

For System-Level certificates, the only options a user has are Export and Details.

Default Keystore Location

Trusted, Secure Site, and Client Authentication certificate keystore files do not exist by default. Thus there are no default locations for them.

The default location for the Signer CA keystore is:

Operating System | Location
Solaris, Linux, or Mac OS X | $JAVA_HOME/lib/security/cacerts
Microsoft Windows | $JAVA_HOME\lib\security\cacerts

The default location for the Secure Site CA keystore is:

Operating System | Location
Solaris, Linux, or Mac OS X | $JAVA_HOME/lib/security/jssecacerts
Microsoft Windows | $JAVA_HOME\lib\security\jssecacerts

Non-Default Keystore Location

The location of the keystore files for the various types of certificates can also be set in a System-Level deployment.properties file, if it exists. The System-Level deployment.properties file does not exist by default. It is specified in a deployment.config file. See System-Level deployment.properties file. The following properties may be specified:

Certificate Type | Property Name
Trusted Certificates | deployment.system.security.trusted.certs
Secure site | deployment.system.security.trusted.jssecerts
Signer CA | deployment.system.security.trusted.cacerts
Secure site CA | deployment.system.security.trusted.jssecacerts
Client Authentication | deployment.system.security.trusted.clientcerts

Advanced

The Advanced panel looks like this (three screenshots are required to show the entire list of options):

Advanced Network Settings panel, first part Advanced Network Settings panel, second part Advanced Network Settings panel, third part

It includes options for Debugging, Java console, Default Java for browsers, Shortcut Creation, JNLP File/MIME Association, Application Installation, Secure Execution Environment, Mixed code security verification, Certificate revocation checks, Advanced Security Settings, and Miscellaneous.

Debugging

You can enable tracing and logging.

Java Console

There are three options:

  • Show the console
  • Hide the console (default)
  • Do not start the console

Default Java for Browsers

There are two options; both are selected by default:

  • Microsoft Internet Explorer
  • Mozilla Family

This option enables settings in your browser that enable you to use the JRE installed in your computer.

For example, if you enable this option for Microsoft Internet Explorer, then the option Use JRE <version number> for <applet> (requires restart) is available, where <version number> is the version of the JRE installed in your computer. (Find this option by going to Tools, then Internet Options, then click the tab Advanced.)

In addition, if you enable this option for Mozilla Family, and your browser is Firefox, then the extension Java Console <version number> appears in the Add-ons list, where <version number> is the version of the JRE installed in your computer. (Access the Add-ons list from the Tools menu in the menu bar.)

Shortcut Creation

This provides options for Java Web Start for creating shortcuts on the desktop. The options are:

  • Always allow
  • Always allow if hinted
  • Prompt user
  • Prompt user if hinted (default)
  • Never allow

JNLP File/MIME Association

This allows you to associate files with the JNLP MIME type. The options are (radio button, select only one):

  • Always allow
  • Prompt user (default)
  • Never allow

Application Installation

There are four options:

  • Install if hinted (default)
  • Install if shortcut created
  • Install if hinted and shortcut
  • Never install

A Java application or applet that is launched with Java Web Start can either be installed or cached on the client computer. If the Java application is cached, then Java Web Start stores the entire application in its cache; the application is removed from the client computer when Java Web Start empties its cache. If the Java application is installed, then the application will have an entry in the Add or Remove Programs applet in Windows Control Panel.

A Java application or applet can specify if it prefers to be cached or installed; if the Java application specifies that it prefers to be installed, then it is hinted. By default, Java applications that are hinted are installed on the client computer. You can also specify that a Java application is installed if it creates a shortcut on the client computer's desktop.

Secure Execution Environment

These options are check boxes. You can select any number of available options. All options are checked by default except for those specified. The following are the various Java security options:

  • Allow user to grant permissions to signed content
  • Show sandbox warning banner
  • Allow user to accept JNLP security requests
  • Don't prompt for client certificate selection when no certificates or only one exists
  • Warn if site certificate does not match hostname
  • Show site certificate from server even if it is valid (not checked by default)

Mixed code (sandboxed vs. trusted) security verification

The Mixed code options are radio buttons. You can select only one option. For more information, see Mixing Privileged Code and Sandbox Code.

  • Enable - show warning if needed (selected by default)
  • Enable - hide warning and run with protections
  • Enable - hide warning and don't run untrusted code
  • Disable verification (not recommended)

Perform certificate revocation checks on

Before a signed applet or Java Web Start application is run, the certificates used to sign the JAR file can be checked to ensure that none have been revoked. You can have all certificates checked, or only the certificate from the publisher of the app. If a certificate has been revoked, any app that is signed with the certificate is not allowed to run. This check can be disabled, but that is not recommended. You can select only one of the following options:

  • Publisher's certificate only
  • All certificates in the chain of trust (selected by default)
  • Do not check (not recommended)

Check for certificate revocation using

The following options indicate what to use to determine if a certificate has been revoked:

  • Certificate Revocations Lists (CRLs)
  • Online Certificate Status Protocol (OCSP)
  • Both CRLs and OCSP (selected by default)

If Do Not Check is selected for Perform certificate revocation checks on, this setting is ignored.

Advanced Security Settings

These options are check boxes. You can select any number of available options. All options are checked by default except for those specified. The following are the various Java security options:

  • Use certificates and keys in browser keystore
  • Enable blacklist revocation check
  • Enable caching password for authentication
  • Use SSL 2.0 compatible ClientHello format (not checked by default)
  • Use SSL 3.0
  • Use TLS 1.0
  • Use TLS 1.1
  • Use TLS 1.2

Miscellaneous

One option is available, which is checked by default:

  • Place Java icon in system tray

Command to launch default browser (Solaris, Linux, or Mac OS X only, not shown above)

Allows you to specify the location of the default browser to be launched.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Tracing and Logging

Java Rich Internet Applications Guide > Java Control Panel > Tracing and Logging

The following topics are covered:

  • Tracing
  • Logging
  • Other Options

Tracing

Tracing is a facility to redirect any output in the Java Console to a trace file.

Tracing for Java Plug-in and Java Web Start can be turned on by setting the property deployment.trace property to true. This property turns on all tracing facilities inside Java Plug-in and Java Web Start. To enable more fine-grained tracing, the deployment.trace.level property can be used. The deployment.trace.level property can have one of the following values:

  • basic
  • cache
  • net
  • security
  • ext
  • liveconnect
  • drs

To use all of the tracing levels, set deployment.trace.level to all.

To enable tracing on the fly, you can set trace-level options (0-5) in the Java Console, shown in the previous chapter, with the following meanings:

  • 0: off
  • 1: basic
  • 2: network, cache, and basic
  • 3: security, network and basic
  • 4: extension, security, network and basic
  • 5: LiveConnect, extension, security, network, temp, basic, and Deployment Rule Set

Another way to set fine-grained tracing is through the Java Control Panel. For instance, to enable tracing for everthing (option 5 above), enter the following in the "Java Run Time Parameters" textfield:

-Ddeployment.trace=true
-Ddeployment.trace.level=all

Tracing set through the Control Panel takes effect when Java Plug-in or Java Web Start is launched, but changes made through the Control Panel while Java Plug-in or Java Web Start is running has no effect until restarted.

Logging

Similar to tracing, logging is a facility to redirect any output in the Java Console to a log file using the Java Logging API. To enable logging perform the following actions:

  • Open Java Control Panel
  • Click Advanced tab.
  • Select Enable Logging under the Debugging option

Other Options

File Names

  • plugin<random-number>.trace - Name of the trace file for Java Plug-in.
  • plugin<random-number>.log - Name of the log file for Java Plug-in.
  • javaws<random-number>.trace - Name fo the trace file for Java Web Start.
  • javaws<random-number>.log - Name of the log file for Java Web Start.
  • jcp.trace - Name of the trace file that is created when the Java Control Panel is run.

<random-number> is a number that is generated when the file is created.

File Locations

The default location (directory) of the trace and log files is:

  • <user.home>/.java/deployment/log on UNIX, Linux
  • ~/Library/Application Support/Oracle/Java/Deployment/log on Mac OS X
  • <User Application Data Folder>\Sun\Java\Deployment\log on Windows

If the environment variable USER_JPI_PROFILE is set to <user plugin home> then the trace and log files will be written to:

  • <user plugin home>/.java/deployment/log on UNIX, Linux
  • <user plugin home>/Library/Application Support/Oracle/Java/Deployment/log on Mac OS X
  • <user plugin home>\Sun\Java\Deployment\log on Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Compression Formats for Network Deployment

Java Rich Internet Applications Guide > Networking > Compression Formats for Network Deployment

To increase server and network availability and bandwidth, two compression formats are available to Java deployment of applications and applets: gzip and Pack200. With both techniques, the compressed JAR files are transmitted over the network and the receiving application uncompresses and restores them.

See Reducing the Download Time in the Java Tutorials to create and deploy a compressed JAR file for a rich Internet application.

This section describes the technical details of how a web server handles a compressed JAR file. The following topics are covered:

  • Background
  • Gzip Compression
  • Pack200 Compression
  • Testing
  • More Information
  • Updates in Java Standard Edition 6
  • Updates in Java Standard Edition 8

Background

Hypertext Transfer Protocol -- HTTP 1.1 (RFC 2616) discusses HTTP compression. HTTP Compression allows applications JAR files to be deployed as compressed JAR files. The supported compression techniques are gzip, compress, and deflate.

As of SDK/JRE version 5.0, HTTP compression is implemented in Java Web Start and Java Plug-in in compliance with RFC 2616. The supported techniques are gzip and pack200-gzip.

The requesting application can send an HTTP request to the server indicating its ability to handle compressed versions of the file. The following is an example HTTP request created when the Dynamic Tree Demo applet, whose JAR file has been compressed with Pack200, is loaded:

GET http://www.example.com/DynamicTreeDemo.jar.pack.gz HTTP/1.1
accept-encoding: pack200-gzip,gzip
User-Agent: Mozilla/4.0 (Windows 7 6.1) Java/1.8.0
Host: example.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

The following is the HTTP response from the server:

HTTP/1.1 200 OK
Date: Wed, 21 Mar 2012 20:13:22 GMT
Server: Apache/2.2.11 (Solaris, Linux, or Mac OS X) mod_ssl/2.2.11 OpenSSL/0.9.8k SVN/1.6.2 DAV/2
Last-Modified: Thu, 08 Mar 2012 03:48:34 GMT
ETag: "489ee5-112d-4bab326774e43"
Accept-Ranges: bytes
Content-Length: 4397
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: application/x-gzip
Content-Encoding: gzip

For more information about the Dynamic Tree Demo applet, see Deploying an Applet in the Java Tutorials.

The Accept-Encoding field specifies what the client can accept, which is set by the client. The Content-Encoding field indicates what is being sent, which is set by the server. The Content-Type field indicates what the client should expect when the transformation or decoding is done.

In this example, the Accept-Encoding field is set to pack200-gzip and gzip, indicating to the server that the application (in this case, Mozilla Firefox running in Windows 7 with the Java Plug-in that comes with JRE 7) can handle pack200-gzip and gzip formats.

The server searches for the requested JAR file with a .pack.gz or .gz file extension and responds with the located file. The server sets the response header Content-Encoding field to pack200-gzip, gzip, or NULL depending on the type of file that is being sent, and optionally may set the Content-Type to application/x-java-archive. Therefore, by inspecting the Content-Encoding field, the requesting application can apply the corresponding transformation to restore the original JAR file.

Example 1: Application requesting packed or compressed JAR

Example 1: Application requesting packed or compressed JAR

In Example 1, the client requests the file foo.jar with the Accept-Encoding field pack200-gzip,gzip. The server searches for the file foo.jar.pack.gz. If the server finds the file, it will send the file to the client and set the Content-Encoding field to pack200-gzip.

Example 2: Application requesting packed or compressed JAR

Example 2: Application requesting packed or compressed JAR

In Example 2, if the file foo.jar.pack.gz is not found, the server responds with the file foo.jar.gz, if it is found, and sets the Content-Encoding field to gzip.

Example 3: Application requesting packed or compressed JAR

Example 3: Application requesting packed or compressed JAR

In Example 3, if the files foo.jar.pack.gz and foo.jar.gz are not found, then the server responds with the file foo.jar and either does not set the Content-Encoding field or sets it to NULL.

Example 4: Legacy application requesting JAR

Example 4: Legacy application requesting JAR

In Example 4, a legacy application (an application without HTTP or Pack200 compressions) requests the file foo.jar; consequently this application will continue to work seamlessly. Therefore, it is recommended that you host all three files foo.jar, foo.jar.gz, and foo.jar.jar.gz.

GZIP Compression

gzip is a freely available compressor available within the JRE and the SDK as java.util.zip.GZIPInputStream and java.util.zip.GZIPOutputStream.

The command line versions are available with most Solaris, Linux, or Mac OS X operating systems, Windows UNIX toolkits (Cygwin and MKS Toolkit), or from http://www.gzip.org/.

You can get the highest degree of compression using gzip to compress an uncompressed JAR file versus compressing a compressed JAR file. The downside is that the JAR file may be stored uncompressed on target systems.

Here is an example:

  • Using gzip to compress a JAR file that contains individual deflated entries:
    • Notepad.jar: 46.25 kb
    • Notepad.jar.gz: 43.00 kb
  • Using gzip to compress a JAR file that contains stored entries (stored entries are entries that are not compressed):
    • Notepad.jar: 987.47 kb
    • Notepad.jar.gz: 32.47 kb

As you can see, the download size can be reduced by 14% by compressing an uncompressed JAR file compared to 3% by compressing a compressed JAR file.

Pack200 Compression

Pack200 compresses large files very efficiently, depending on the density and size of the class files in the JAR file. You can expect compression to one-ninth the size of the JAR file if it contains only class files and is in the order of several megabytes.

Using the same JAR file in the previous example:

  • Notepad.jar: 46.25 kb
  • Notepad.jar.pack.gz: 22.58 kb

In this case, the same JAR file can be reduced by 50%.

Pack200 works most efficiently on Java class files. It uses several techniques to efficiently reduce the size of JAR files:

  • It merges and sorts the constant-pool data in the class files and co-locates them in the archive.
  • It removes redundant class attributes.
  • It stores internal data structures.
  • It use delta and variable length encoding.
  • It chooses optimum coding types for secondary compression.

Compress and uncompress JAR files with the command line interfaces pack200 and unpack200 in the bin directory of your SDK or JRE directory.

You can also programmatically invoke Pack200 interfaces; see java.util.jar.Pack200.

Steps to Pack a file

1. Consider the size of the JAR file, the contents of the JAR file, and the bandwidth of your target audience.

All these factors play into choosing a compression technique. The unpack200 tool is designed to be as efficient as possible, and it takes little time to restore the original file. If you have large JAR files (2 MB or more) comprised mostly of class files, Pack200 is the preferred compression technique. If you have large JAR files which are comprised of resource files (JPEG, GIF, data, etc.), then gzip is the preferred compression technique.

2. Specify the segment limit for Pack200 compression.

Pack200 loads the entire compressed file into memory. However, when target systems are memory and resource constrained, setting the Pack200.Packer.SEGMENT_LIMIT to a lower value will reduce the memory requirements during compression and uncompression.

As a special case, a value of -1 will produce a single large segment with all input files, while a value of 0 will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.

The default is -1, which means pack200 will always create a single segment output file. In cases where extremely large output files are generated, you are are strongly encouraged to use segmenting or break up the input file into smaller JARs.

For example, a 10 MB JAR packed without this limit will typically pack about 10% smaller, but pack200 may require a larger Java heap (about ten times the segment limit).

3. Sign the JAR files.

Pack200 rearranges the contents of the resulting JAR file. The jarsigner tool hashes the contents of the class file and stores the hash in an encrypted digest in the manifest. When unpack200 uncompresses a file, the contents of the classes will be rearranged and thus invalidate the signature. Therefore, the JAR file must be normalized first using pack200 and unpack200, and thereafter signed.

Here's why this works: Any reordering pack200 does on any class file structures is idempotent, so the second time it is compressed, it does not change the orderings produced by the first compression. Also, unpack200 is guaranteed by the JSR 200 specification to produce a specific bytewise image for any given transmission ordering of archive elements.

For example, suppose you want to use HelloWorld.jar:

  1. Recompress, or repack, the file to normalize the JAR file; repacking uncompresses and compresses the JAR file in one step.

    % pack200 --repack HelloWorld.jar

  2. Sign the JAR.

    % jarsigner -keystore myKeystore HelloWorld.jar user_name

    Note: You must sign the repacked file with the same key that was used when building the original JAR file. Alternatively, delete all signature files found in the META-INF directory before repacking, re-signing and verifying. The signature files are named MANIFEST.MF, *.DSA and *.SF.

    Verify the just signed JAR file to ensure the signing worked.

    % jarsigner -verify HelloWorld.jar
jar verified.

    Ensure the JAR file still works.

    % Java -jar HelloWorld.jar
HelloWorld

  3. Compress the JAR file with pack200.

    % pack200 HelloWorld.jar.pack.gz HelloWorld.jar

    Note: You must compress the JAR file with the same options that you used to repack the file to normalize the JAR file, as demonstrated in step 1. Additionally, you must set the segment limit to -1 (unlimited) for all packing steps when using JDK 6 and earlier releases to prevent accidental variations of segment boundaries; class file sizes can change slightly under these circumstances, thus disrupting signatures. The default segment limit for JDK 7 and later is -1.

  4. Uncompress the file with unpack200

    % unpack200 HelloWorld.jar.pack.gz HelloT1.jar

  5. Verify the JAR file.

    % jarsigner -verify HelloT1.jar
jar verified.

    Test the JAR file.

    % Java -jar HelloT1.jar
HelloWorld

After verification, you can deploy the compressed pack file HelloWorld.jar.pack.gz..

4. Apply reduction techniques

Pack200 by default behaves in a High Fidelity (Hi-Fi) mode, meaning all the original attributes present in the classes as well as the attributes of each individual entry in a JAR file is retained. These typically tend to add to the packed file size; here are some of the techniques one can use to further reduce the size of the download:

  1. Modification times: If modification time of the individual entries in a JAR file is not a concern, you can specify the option Pack200.Packer.MODIFICATION_TIME="LATEST". This will allow one modification time to be transmitted in the pack file for each segment. The latest time will be the latest time of any entry within that segment.

  2. Deflation hint: Similar to setting the modification time to "LATEST", if the compression state of the individual entries in the archive is not required, set Pack200.Packer.DEFLATION_HINT="false". This will fractionally reduce the download size, as individual compression hints will not be transmitted. However, the JAR file when recomposed will contain "stored" entries and hence may consume more disk space on the target system.

    For example:

    pack200 --modification-time=latest --deflate-hint="true"
tools-md.jar.pack.gz tools.jar

    Note: the above optimizations will yield better results with a JAR file containing thousands of entries.

  3. Attributes: Several class attributes are not required when deploying JAR files. These attributes can be stripped out of class files, significantly reducing download size. However, care must be taken to ensure that required runtime attributes are maintained.

    1. Debugging attributes: If debugging information, such as Line Numbers and Source File, is not required (typically in applications stack traces), then these attributes can be discarded by specifying Pack200.Packer.STRIP_DEBUG=true.This typically reduces the packed file by about 10%.

      Example:

      pack200 --strip-debug tools-stripped.jar.pack.gz tools.jar

    2. Other attributes: Advanced users may use some of the other strip-related properties to strip out additional attributes. However, extreme caution should be used when doing so, the resultant JAR file must be tested on all possible Java runtime systems to ensure that the runtime does not depend on the stripped attributes.

5. Handle unknown attributes:

Pack200 deals with standard attributes defined by the Java Virtual Machine Specification; however compilers are free to introduce custom attributes. When such attributes are present, by default, Pack200 passes through the class, emitting a warning message. These "passed-through" class files may contribute to bloating of packed files. If the unknown attributes are prevalent in the classes of a JAR file, this may lead to a very large bloat in the compressed output. In such cases, consider the following strategies:

  • Strip the attribute if the attribute is deemed to be redundant at runtime; this can be achieved by setting the property Pack200.Packer.UNKNOWN_ATTRIBUTE=STRIP:

    pack200 --unknown-attribute=strip
foo.pack.gz foo.jar

  • If the attributes are required at runtime, and they do contribute to inflation in the size of the compressed file, then identify the attribute from the warning message and apply a suitable layout for these as described in the Pack200 JSR 200 specification, and the Java API reference section for the interface Pack200.Packer.

  • It is possible that a compiler could define an attribute not implemented in the layout specification of Pack200, and may cause the pack200 to malfunction. In such cases, an entire class file or class files can be "passed through", as if it were a resource by virtue of its name and can be specified as follows:

    pack200 --pass-file="com/acme/foo/bar/baz.class" foo.pack.gz foo.jar

    The following passes through an entire directory and its contents,

    pack200 --pass-file="com/acme/foo/bar/" foo.pack.gz foo.jar

Note: When signing large JAR files, this step may fail with a security error. A likely cause is bug 5078608. Use one of the following workarounds:

  • Specify --segment-limit=-1 during repacking and packing.
  • Follow these repacking and signing steps:
    1. pack200 --repack b.jar a.jar
    2. Sign b.jar.
    3. pack200 --repack c.jar b.jar
    4. Sign c.jar.
    5. pack200 out.jar.pack.gz c.jar
    6. Deploy out.jar.pack.gz.

6. Take advantage of Pack200 in your installation program

You may wish to take advantage of the Pack200 technology in your installation program, whereby a product's JAR files may need to compressed using Pack200 and uncompressed during installation. If the JRE or SDK is bundled in the installation, you are free to use the unpack200 (Solaris, Linux, or Mac OS X) or unpack200.exe (Windows) tool in the distribution bin directory. This implementation is a pure C++ application requiring no Java runtime to be present for it to run.

Windows: Installers may use a better algorithm than the one in GZIP to compress entries. In such cases, one will get better compression using the Installer's intrinsic compression, by using the pack200 tool as follows:

pack200 --no-gzip foo.jar.pack foo.jar

This will prevent the output file from being gzip compressed.

unpack200 is a Windows console application; i.e. it will display a MS-DOS window during the install. To suppress this, use a launcher with a WinMain, which will suppress this window, as shown below.

Sample Code:

#include "windows.h"
#include <stdio.h>

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow) {
  STARTUPINFO si;
  memset(&si, 0, sizeof(si));
  si.cb = sizeof(si);

  PROCESS_INFORMATION pi;
  memset(&pi, 0, sizeof(pi));

  //Test
  //lpCmdLine = "c:/build/windows-i586/bin/unpack200 -l c:/Temp/log c:/Temp/rt.pack c:/Temp/rt.jar";
  int ret = CreateProcess(NULL,                 /* Exec. name */
                          lpCmdLine,            /* cmd line */
                          NULL,                 /* proc. sec. attr. */
                          NULL,                 /* thread sec. attr */
                          TRUE,                 /* inherit file handle */
                          CREATE_NO_WINDOW | DETACHED_PROCESS, /* detach the process/suppress console */
                          NULL,                 /* env block */
                          NULL,                 /* inherit cwd */
                          &si,                      /* startup info */
                          &pi);                     /* process info */
  if ( ret == 0) ExitProcess(255);

  // Wait until child process exits.
  WaitForSingleObject( pi.hProcess, INFINITE );

  DWORD exit_val;

  // Be conservative and return
  if (GetExitCodeProcess(pi.hProcess, &exit_val) == 0) ExitProcess(255);

  ExitProcess(exit_val); // Return the error code of the child process

  return -1;
}

Testing

It is required that all JAR files, compressed and uncompressed, be tested for correctness with your applications test qualifiers. When using the command line interface pack200, the output file will be compressed using gzip with default values. A user may create a simple pack file and compress using gzip with user-specified options or using some other compressor.

More Information

For more information, see pack200 and unpack200 in Java Deployment Tools.

Updates in Java Standard Edition 6

In Java SE 6, the Java class file format has been updated. For more information see JSR 202: Java Class File Specification Update. Due to JSR 202, the Pack200 engine needs to be updated accordingly for the following reasons:

  • Align with the new class file format for Java SE 6
  • Ensure that Java SE 6 class files are compressed effectively.

To keep the changes minimal and seamless for users, pack200 will generate appropriately versioned pack files based on the version of the input class files.

Also to maintain backward compatibility, if the input JAR files are solely comprised of JDK 5 or older class files, a JDK 5 compatible pack file is produced. Otherwise a Java SE 6 compatible Pack200 file is produced. For more information, refer to the pack200 man page for Solaris, Linux, or Mac OS X or Windows.

Updates in Java Standard Edition 8

In Java SE 8, the Java class file format has been updated because of JSR 292, Java Virtual Machine Support for Non-Java Languages. Consequently, the Pack200 engine has been updated accordingly to ensure that Java SE 8 class files are compressed effectively. In particular, the Pack200 engine now recognizes constant pool entries and new bytecodes introduced by JSR 292.

As a result, compressed files created with this version of pack200 will not be compatible with older versions of unpack200.

In general, if a compressed file contains Java SE 8 or Java SE 7 class files, then it will not be compatible with older unpackers. (For example, if a compressed file contains Java SE 7 class files, then it will not be compatible with unpackers from Java SE 6 or earlier.)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deploying JAR Files Compressed with Pack200

Java Rich Internet Applications Guide > Networking > Deploying JAR Files Compressed with Pack200

When the Java system property jnlp.packEnabled is set to true in a JNLP file or an applet tag, Java Plug-in or Java Web Start will download the JAR file compressed by the Pack200 tool. If the this compressed version is not available, Java Plug-in or Java Web Start will look for the uncompressed version.

Note: Pack200 compressed JAR files must have the extension pack.gz. For example, if your JAR file is named foo.jar, then the Pack200 compressed version of this file must be named foo.jar.pack.gz.

Usage in a JNLP File

Use the property tag to specify jnlp.packEnabled to true within the resources tags, for example:

<jnlp ...>
   ...
   <resources>
      <property name="jnlp.packEnabled" value="true"/>
         <java version="1.5+" href="http://javadl.sun.com/webapps/jawsautodl/AutoDL/j2se"/>
         <jar href="foo.jar" main="true" download="eager"/>
   </resources>
   ...
</jnlp>

In this example, Java Web Start and the Java Plug-in first look for foo.jar.pack.gz. If the file is not found, they look for the original, foo.jar.

Usage in Applet Tag

Pass the -Djnlp.packEnabled VM argument by using java_arguments, for example:

<HTML>
   ...
   <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
      <PARAM NAME  = "cache_archive" VALUE = "HelloWorld.jar"/>
      <PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=true"/>
   </APPLET>
   ...
</HTML>

The Java Plug-in looks for HelloWorld.jar.pack.gz; if this file is not available, it looks for HelloWorld.jar.

Related Links

  • Compression Formats for Network Deployment: Describes compression formats available to the deployment of applications and applets (gzip and Pack200), how the Java platform handles compressed JAR files, steps to pack a JAR file, and updates to Pack200 in Java SE releases
  • Reducing the Download Time from the Java Tutorials: Describes how to create and deploy a compressed JAR file for a rich internet application
  • Pack200 Tools: Describes command line tools pack200 and unpack200
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Proxy Configuration

Java Rich Internet Applications Guide > Networking > Proxy Configuration

The following topics are covered:

  • Introduction
  • How Java Plug-in and Java Web Start Obtain Proxy Information
  • Manual Proxy Configuration
  • Automatic Proxy Configuration
  • java.net.ProxySelector API

Introduction

For enterprise customers it is important to be able to set up secure computing environments within their companies, and proxy configuration is an essential part of doing that. Proxy configuration acts as a security barrier; it ensures that the proxy server monitors all traffic between the Internet and the intranet. This is normally an integral part of security enforcement in corporate firewalls within intranets. Enterprise customers who want to use Java Plug-in to deploy applets, or Java Web Start to run applications, on their intranet web pages may also set up proxy support. This support is required for Java Plug-in and Java Web Start to work in an intranet environment and can be set up through the Java Control Panel.

Java Control Panel

The Java Control Panel provides four proxy options via the Network Setting subpanel:

  • Use browser settings
  • Use proxy server
  • Use automatic proxy configuration script
  • Direct connection

Use browser settings

If "Use browser settings" is selected, then proxy information is obtained entirely through the browser. To change proxy information, refer to the documentation of your browser:

  • Internet Explorer:
    • Change proxy server settings in Internet Explorer (Windows 7)
    • Change proxy settings in Internet Explorer (Windows Vista)
    • Configure Proxy Settings for Internet Explorer (Windows Server 2008 R2)
  • Firefox: Change proxy settings in the Options window - Advanced panel
  • Chrome: Chrome uses the same connection and proxy settings as Windows; follow the same steps as you would with Internet Explorer

Use proxy Server

If you select "Use proxy server" in the Java Control Panel, you have two choices here:

  1. You can set the Address and the Port for a proxy server with the option to bypass it for local addresses.
  2. You can individually set the proxy server for HTTP, Secure, FTP, and Socks connections. You can also provide a list of addresses for which you do not want to use a proxy server.

Use automatic proxy configuration script

If you select "Use automatic proxy configuration script", then you must enter the URL for the location of the JavaScript called FindProxyForURL(URL url) that returns the proxy server to be used for a URL. Support for this script is the same as described below under Automatic Proxy Configuration.

Direct connection

Direct connection does not use a proxy. For certain situations, such as when mobile users connect to the company through a modem, direct connection to the intranet environment is required, and proxies should not be used in these cases.

How Java Plug-in and Java Web Start Obtain Proxy Information From the Browser

Because browsers on different platforms store proxy information differently, there is no generic mechanism to obtain proxy information. Here's how proxy information is obtained from Internet Explorer and Firefox on Windows:

Internet Explorer: Internet Explorer obtains proxy information from the same set of keys in the Windows registry. Java Plug-in and Java Web Start extract this information directly from the registry.

Firefox: Firefox stores proxy information in a preference file under the user profile directory on the local machine. Firefox also has public APIs available for determining proxy information. Java Plug-in uses these public APIs to obtain the proxy information; Java Web Start obtains the proxy information through reading and parsing the preference file.

Java Plug-in and Java Web Start obtain proxy information at startup time. If you change the proxy settings after Java Plug-in or Java Web Start have started, you may force reloading of the proxy information from the browser through the p option in the Java Console. Java Web Start is restarted for each application, so new proxy information will be used automatically on subsequent launches.

Manual Proxy Configuration

Internet Explorer, Firefox, and Chrome support manual proxy configuration. Users can specify the proxy server and port for each protocol. Users can also specify one proxy server and port for all protocols. To minimize the workload of the proxy server, some sites might bypass the proxy server completely when a machine is connecting to another machine inside the intranet environment. To do this, network administrators and users can specify a proxy server bypass list in the browser's proxy setting

Internet Explorer: Java Plug-in and Java Web Start recognize and supports the proxy server and port setting associated with the protocol. IE supports various syntaxes in the proxy server bypass list, as follows:

  • IP address/hostname only
  • IP address/hostname with wildcard
  • IP address/hostname with protocol

For example, if you specify "203.0.113.0;*.eng;http://*.com" in the proxy server bypass list, then the browser bypasses the proxy whenever one of the following occurs:

  • "203.0.113.0" is requested
  • the URL hostname ends with ".eng"
  • the URL protocol is http and the URL hostname ends with ".com"

Currently Java Plug-in and Java Web Start support the first two syntaxes in the proxy server bypass list in IE. IE also supports bypassing the proxy server for local (intranet) addresses without using the proxy server bypass list. Java Plug-in and Java Web Start support this option by bypassing the proxy server if the URL hostname is plain; i.e., the hostname contains no dot (.).

Firefox: Java Plug-in and Java Web Start recognize and supports the proxy server and port setting associated with the protocol. For example, if you specify ".eng,.sun.com" in the proxy server bypass list in Firefox, it bypasses the proxy whenever the URL hostname ends with ".eng" or ".sun.com". Java Plug-in and Java Web Start fully support this syntax in the proxy server bypass list in Firefox.

For more information about manual proxy configuration in your browser, consult the user guide for your browser.

Automatic Proxy Configuration

Automatic proxy configuration is supported in the browser by setting a particular URL that contains a JavaScript file with .pac or .js extension. This file contains a function called FindProxyForURL that contains the logic to determine which proxy server to use when the browser receives a connection request. This function is written by the system administrator for the particular intranet environment. When the browser starts up, it recognizes the URL of the JavaScript file and downloads the file to the local machine using direct connection. Then whenever it needs to make a new connection, the browser executes the JavaScript function FindProxyForURL in the file to obtain the proxy information to set up the connection.

Java Plug-in:

Internet Explorer: During startup, Java Plug-in downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL function to obtain the proxy information using the JavaScript engine in Internet Explorer.

Firefox: During startup, Java Plug-in downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL function to obtain the proxy information by using the JavaScript engine in Firefox.

Java Web Start:

Windows: During startup, Java Web Start downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL function to obtain the proxy information using the JavaScript engine in Internet Explorer.

Linux/Solaris: During startup, Java Web Start downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it will parse the FindProxyForURL function and try its best guess to obtain the proxy information.

Notes on FindProxyForURL

Given a JavaScript engine, the following is applicable to Java Plug-in on all platforms and to Java Web Start on Windows only.

  1. There are a number of JavaScript helper functions which can be called from the JavaScript function FindProxyForURL. Java Plug-in and Java Web Start provide their own implementations of these functions to completely emulate automatic proxy configuration. Regarding the implementation of these helper function, note the following:
    • Function dnsResolve always returns an empty string if the host is not an IP address.
    • Function isResolvable always returns false if the host is not an IP address.
    • Function isInNet always returns false if the host is not an IP address.
  2. Executing the function FindProxyForURL always returns proxy information as a string. Java Plug-in and Java Web Start extract the setting in the following way:
    • If "DIRECT" is in the string, Java Plug-in and Java Web Start assume direct connection.
    • If "PROXY" is in the string, they use the first proxy setting for the connection.
    • If "SOCKS" is in the string, they use the SOCKS v4 for the connection.
    • Otherwise, the proxy information in the string is incorrect. In this cases, Java Plug-in and Java Web Start assume direct connection.

For more information about automatic proxy configuration in your browser, consult the user guide for your browser.

java.net.ProxySelector API

Developers may sometimes need to determine the proxy configuration of a given host. By knowing the proxy configuration they can write more intelligent code to connect to the host through the proper proxy server. The class java.net.ProxySelector provides configuration support. Here is a simple code example:

private Proxy findProxy(URI uri)
{
     try
     {
          ProxySelector selector = ProxySelector.getDefault();
          List<Proxy> proxyList = selector.select(uri);
          if (proxyList.size() > 1)
               return proxyList.get(0);
     }
     catch (IllegalArgumentException e)
     {
     }
     return Proxy.NO_PROXY;
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applet Persistence API

Java Rich Internet Applications Guide > Enhancements and Other Features > Applet Persistence API

Two methods in the interface java.Applet.AppletContext enable applet persistence across browser sessions:

  • setStream(String key, InputStream stream)
  • getStream(String key)

These methods enable you to stream data and objects from one browser session so that they can be reused in subsequent browser sessions. This provides applet persistence and makes it unnecessary to use static objects in applets for this same purpose.

setStream(key, stream) maps a key to a stream. getStream(key) returns the stream mapped to the key. If the AppletContext already has a stream mapped to the key when setStream(key, stream) is invoked, the mapping is updated.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Multi-Version Support

Java Rich Internet Applications Guide > Enhancements and Other Features > Protocol Support

The following topics are covered:

  • Unique MIME Type
  • Unique Java Plug-in Registry Key
  • Unique Java Plug-in Property File
  • Unique Java Plug-in Trace and Log Files
  • Unique Java Control Panel
  • Unique Registry Keys for JRE/JDK
  • Multi-version Support in Browser Sessions

Unique MIME Type

There is a unique MIME type for every new or patch version of Java Plug-in. MIME type identifies the type or version of the Java executable to be loaded and initialized by Java Plug-in. It is specified with the element type in the embed tag with Firefox and with <param name="type"> in the object tag for Internet Explorer. If you want to use a minimum version of Java Plug-in with Firefox, specify the unique MIME type in the embed tag.

The MIME type corresponding to the version of Java Plug-in installed in your computer looks like the following:

application/x-java-applet;jpi-version=<version>

where version includes the major, minor and patch version numbers.

The Java Plug-in supports supports the latest MIME type version (corresponding to the version of the Java Plug-in) and all previous MIME type versions.

Other MIME types supported by the Java Plug-in look like the following:

application/x-java-applet;version=<version>

To determine which MIME types are supported by the version of the Java Plug-in installed on your computer, enter about:plugins in the Firefox location bar. This displays a list of installed and detected plugins. Look for the Java Plug-in entry; it will list all supported MIME types. See about:plugins in the MozillaZine Knowledge Base for more information.

Example:

For Java Plug-in 1.7.0, the unique MIME type would be:

application/x-java-applet;jpi-version=1.7

Note: If you have different versions of the JRE installed, only the latest version of the Java Plug-in will be installed. As mentioned previously, this version of the Java Plug-in supports all previous versions of the Java Plug-in MIME type. These MIME types are supported by the file npjp2.dll. The location of this file is listed in the about:plugins page.

Unique Java Plug-in Registry Key

There is a unique Java Plug-in registry key for every new or patch version of Java Plug-in. The main Java Plug-in registry key is as follows:

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\<version number>

Note: If you installed a 32-bit JRE in a 64-bit operating system, then the Java Plug-in registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Plug-in\<version number>.

To determine <version number>, refer to the Java Plug-in entry in the Firefox about:plugins page.

Example:

For the Java Plug-in that comes with JRE 7u3, you will find the following in your registry:

HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Plug-in\10.3.0

Unique Java Plug-in Property File

The property file is named deployment.properties. It is located in the following directory:

<User Application Data Folder>\Sun\Java\Deployment

where <User Application Data Folder> is an application data folder specific to the user.

As an example, for a user testuser on a Windows 7 system, the value of <User Application Data Folder> would be C:\Users\testuser\AppData\LocalLow

The value of <User Application Data Folder> is obtained from the Win32 API function call SHGetFolderPath() with CSIDL_APPDATA.

Unique Java Plug-in Trace and Log Files

The default location for trace and log files is <User Application Data Folder>\Sun\Java\Deployment\log

where <User Application Data Folder> is as defined in Unique Java Plug-in Property File.

The property javaplugin.outputfiles.path can be used to override the default location for the trace and log files. See Tracing and Logging for more information.

Unique Java Control Panel

There is a unique Java Control Panel for every new or patch release. The filename for the Java Control Panel is javacpl.exe, which is located in the directory <JRE installation directory>\bin.

Only the latest installed version of the Java Control Panel is available from the Windows Control Panel.

Unique Registry Keys for JRE/JDK

There are unique registry keys for every new or patch release of the JRE/JDK. These registry keys are located as follows:

HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\<version number>
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit\<version number>

where the <version number> includes the major, minor and the patch version numbers; for example: 1.7.0.

Note: If you installed a 32-bit JRE in a 64-bit operating system, then the registry keys are located in Java Plug-in registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft.

These keys allow Java Plug-in to locate the proper version of the JRE.

Multi Version Support in Browser Sessions

Multiple JRE versions can be installed on the Windows platform. With multiple JRE's applets using MIME type jpi-version will work with Firefox browsers only if you enable the following options:

  • To enable the Mozilla Family option for JRE 6 and later, open Java Control Panel and click Advanced > Default Java for browsers > Mozilla family.
  • To enable the Mozilla and Netscape option for JRE 1.5.0 or earlier, open Java Control Panel and click Advanced > <Applet> tag support > Mozilla and Netscape.

To invoke Java Control Panel for a specific version of the JRE browse to the <JRE_HOME>/bin directory of that version and run javacpl.exe.

Note: Multiple versions of the JRE can be run in different browser sessions. However, multiple versions cannot be run in the same browser session. Should this be attempted, the user is warned and the attempt will fail.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Protocol Support

Java Rich Internet Applications Guide > Enhancements and Other Features > Protocol Support

The following sections are covered:

  • HTTP, FTP, and GOPHER
  • HTTPS
  • Socks
  • NTLM Authentication

HTTP, FTP, and GOPHER

Java Plug-in supports HTTP, FTP, and GOPHER protocols, including built-in proxy configuration support.

HTTPS

Introduction

HTTPS is supported in Java Plug-in through Java Secure Socket Extension (JSEE), which provides a Java implementation of SSL and HTTPS for the Java platform.

Error handling support

When accessing an HTTPS server, errors may occur. Java Plug-in has hooked into JSSE to provide the following types of error handling:

  • Hostname mismatch: If the HTTPS server host name does not match the name on the server certificate, a warning dialog will appear.
  • Untrusted server certificate: If the server certificate can not be verified during the SSL handshaking, a warning dialog will appear.
  • Untrusted client certificate: In case client authentication is required by the server and the client certificate cannot be verified, a warning dialog will be appear.
  • Server authentication: If the client accesses a protected directory on the HTTPS server, the users will be prompted for a username and password. Note: Only basic authentication is currently supported.

Potential issues with HTTPS through JSSE

Although support of HTTPS through JSSE eliminates many browser-specific problems, there are several issues that developers should be aware of:

  • Untrusted server certificate: When SSL handshaking takes place in establishing an HTTPS connection, the server certificate is verified against the root CA store in Java SE. However, Java SE supports fewer root CA certificates than does the browser. As a result, you may have problems with untrusted server certificates.
  • Client authentication: Java Plugin supports browser keystore in JRE 1.5 or later. With browser keystore client authentication of HTTPS server is performed differently for Internet Explorer and Mozilla family browsers. For Internet Explorer the certificate is not imported into the JRE keystore. For Mozilla family browsers, a JSS package should be installed to read the certificate from the Mozilla keystore. By default browser keystore support is turned on.
  • Level of error handling: Java Plug-in currently handles the types of error listed in the previous section. However, if there are additional types of error that Java Plug-in doesn't recognize, the Java applet code may break.

Socks

Java Plug-in currently supports SOCKS version 4.

Note: For HTTP/HTTPS, a SOCKS proxy server may be used with a web proxy server to add caching. The behavior, however, may differ from that observed when running a similar configuration in a browser without Java Plug-in.

NTLM Authentication

Java Plug-in supports NTLM authentication protocol for HTTP/HTTPS. When attempting to access a server requiring NTLM authentication, the following dialog is displayed:

NTLM Authentication required. Provide your username, password and domain name

To authenticate enter User Name, Password and the Domain in the respective fields.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Special Applet Attributes

Java Rich Internet Applications Guide > Enhancements and Other Features > Special Applet Attributes

Applets have default attributes associated with them. Special attributes like image and boxmessage can be associated with applets and used for customizing the applet window during downloading of an applet. JavaBeans component can also be customized using these special attributes.

The following topics are covered:

  • Default Appearance of Applets
  • Special Attributes of Applets
  • Applet Attribute Precedence
  • Troubleshooting Scenario

Default Appearance of Applets

The default appearence of a Applet when no special attributes are used is as follows:

  • The Java logo is centered in the applet's space.
  • There is a white glow (circle with hazy edge) encircling the Java brand.
  • The rotating burst animation shows that activity is occuring.
  • The progress bar is located below the bottom edge of the Java brand graphic to show the progress as the applet is downloaded.
  • Depending on the size of the applet's viewing area the default appearance will vary.
  • The design of animation will scale to accomodate different "width-by-height" combinations.
  • When the mouse is moved over the applet's area during the loading period, the cursor changes to the normal hypertext cursor indicating that this element is an interactive part of the web page.
  • Clicking/selecting anywhere within the Gray Box will spawn a new browser window pointing to the www.java.com web page.

Special Attributes of Applets

image

The image attribute allows you to replace the default animation with a custom graphic. The format with the standard applet element is:

<applet ...>
<param name="image" value="my_image.gif">
</applet>

See Using applet, object and embed Tags in Java Plug-in for how this would be mapped to the object or the embed tags.

If a custom graphic is specified, it should be the same size as the area of the applet window. If these sizes do not match, the graphic will be placed in the upper left corner of the area specified for applet. If it is larger than the applet window, part of it will get chopped off. If it is smaller than the applet window, white, or whatever color is specified for boxbgcolor, will appear around it.

The image can be either a GIF or JPEG, and it should reside in the same directory where other resources for the applet reside; i.e., if the applet uses the codebase attribute, then this image should be in the codebase directory.

Note: The image file should not be in a packaged jar file with other applet resources, since the image needs to be displayed while downloading resources.

The status bar of the browser will display "Loading Java Applet ..." when the mouse is pointed at the applet window.

boxmessage

With the boxmessage attribute you can customize the text displayed in the status bar of the browser. This attribute will be in effect when image attribute is used. The format for using this with the standard APPLET element is:

<APPLET ...>
<PARAM name="boxmessage" value="<your custom message goes here>">
</APPLET>

boxbgcolor, boxfgcolor

These attributes can be used to customize colors in the applet window.

These attributes will be in effect when the image attribute is used. Custom colors cannot be specified for the default appearance of the applet viewing area.

By default the applet window background color is white. The attribute boxbgcolor can be used to specify a different background color. The format for use with the standard APPLET element is:

<APPLET ...>
<PARAM name="boxbgcolor" value="<value>">
</APPLET>

where <value> may be:

  • any Color from java.awt.Color;
  • r,g,b where r, g, and b are integers in the range of 0-255 that would render an opaque standard RGB (sRGB) color in the Color constructor Color(int r, int g, int b);
  • standard HTML colors: silver, green, maroon, purple, navy, teal, and olive; or
  • hexadecimal color format

Examples of each item above:
value="cyan",
value="111,222,145",
value="silver",
value="#33FF33"

By default the applet window foreground color is black. The attribute boxfgcolor can be used to specify a different foreground color. The color values are the same as described above. The format for use with the standard APPLET element is:

<APPLET ...>
<PARAM name="boxfgcolor" value="<value>">
</APPLET>

Applet Attribute Precedence

The order of precedence for these attributes in applets is as follows:

1) If no parameters are provided, the default appearance described above is used.
2) If a custom graphic is specified via the image attribute, then the custom graphic will appear as described above under image.
3) If custom text is provided via the boxmessage attribute, then custom text will be displayed as described above under boxmessage.

With any combination of image and boxmessage attributes, custom colors can always be provided via the boxbgcolor and boxfgcolor attributes.

Troubleshooting Scenario

If an applet fails to load the following actions are performed:

  • The applet window displays error information.
  • The applet window has a single pixel border using white for the foreground color, and a small "broken" graphic will occupy the upper left corner.

The user can click in the applet window to get a popup menu to open one of the following options:

  • Open the Java Console
  • Open a window with information about the Java VM and Java Plug-in.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


System-Wide Repository

Documentation Contents

System-Wide Repository (Windows only)

Java Rich Internet Applications Guide > Enhancements and Other Features > System-Wide Repository (Windows only)

Previous to this release, when a new JRE was installed, JAR and native libraries for the old release were not visible to the new one. Thus applications and applets that relied on those libraries would not work, and developers were forced to redeploy their libraries to the new JRE. The new System-Wide Repository is the solution to that problem. It provides a global or system-wide location where the VM can search for libraries, JAR or native, independent of the JRE location. It provides functionality similar to the repository in the Microsoft VM.

Note: In this release the system-wide repository is supported only by Java Plug-in and only on Windows.

The table below shows the location of the new System-Wide Repository:

Type of Library | System-Wide Location
DLL | Any directory in the System Path environment variable.
Untrusted JAR | <Windows Directory>\Sun\Java\Deployment\Lib\Untrusted
Trusted JAR | <Windows Directory>\Sun\Java\Deployment\Lib\Trusted

<Windows Directory> is the Windows OS directory on the drive where Windows was installed (also called %SystemRoot%).

For example, on Windows XP, where Windows has been installed on the C drive (typical), the locations of these libraries would be as follows:

Type of Library | System-Wide Location
DLL | Any directory in the System Path variable; e.g., C:\WINDOWS\repository if C:\WINDOWS\repository has been set in the System Path variable.
Untrusted JAR | C:\WINDOWS\Sun\Java\Deployment\Lib\Untrusted
Trusted JAR | C:\WINDOWS\Sun\Java\Deployment\Lib\Trusted

Note:

  • The classes in the JARS from the system-wide trusted repository are loaded by the extension class loader, whereas the classes in the JARs from system-wide untrusted repository are loaded by the applet class loader. Thus the former classes are given the AllPermission permissions, while the latter are given only default applet permissions.
  • The repository does not provide version or namespaces control. It is up to the deployer to avoid version and namespaces conflicts at deployment time.
  • The system-wide trusted repository implementation is based on the system property java.ext.dirs. If the user selects his/her own java.ext.dirs system property via the Java Control Panel, the JARs in the system-wide trusted repository will not be loaded by Java Plug-in.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Browser Keystores

Java Rich Internet Applications Guide > Security > Browser Keystores

The following topics are covered:

  • Overview
  • Internet Explorer keystore support
  • Mozilla Keystore Support
  • Installing JSS with Mozilla

Overview

Java Plug-in and Java Web Start support browser keystore in Internet Explorer and Mozilla; certificates and keys in browser keystores are used for the following purpose:

  • Signature signing verification
  • HTTPS server authentication
  • HTTPS client authentication

If the certificates and keys are on the smart cards, they are also recognized by Java Plug-in and Java Web Start if exposed in the browser keystore.

By default, browser keystore support is enabled; users may configure the support through the Advanced tab in the Java Control Panel.

Internet Explorer keystore support

On Windows, browser keystore is supported through Internet Explorer. Certificates and keys in Internet Explorer are automatically recognized by Java Plug-in and Java Web Start when Java applications and applets are deployed on Windows.

This feature is supported only with Internet Explorer 5.0 or higher.

Mozilla keystore support

On Linux and Solaris, browser keystore is supported through Mozilla. Certificates and keys in Mozilla are recognized by Java Plug-in and Java Web Start when Java applications and applets are deployed on Linux and Solaris.

Support for Mozilla keystore requires a Mozilla library called JSS (Network Security Services for Java). By default, JSS is a separate component that does not ship with Mozilla -- it is the responsibility of the deployer to install JSS with Mozilla. Java Plug-in and Java Web Start will enable the Mozilla keystore support appropriately after JSS is deployed.

This feature is supported only with Mozilla 1.4 or higher and JSS 3.2 or higher, assuming both Mozilla and JSS are compiled using the same compiler on the same platform.

Installing JSS with Mozilla

Windows

  1. Create jss directory under Mozilla's installed directory.
  2. Copy JSS JAR file into the jss directory.
  3. Copy JSS native library DLL into Mozilla's installed directory.

Linux/Solaris

  1. Create jss directory under Mozilla's installed directory.
  2. Copy JSS JAR file into the jss directory.
  3. Copy JSS native library .so into Mozilla's installed directory.
  4. Set environment variable MOZILLA_HOME to Mozilla's installed directory in Mozilla's launch script.
  5. Change environment variable LD_LIBRARY_PATH to include Mozilla's installed directory in Mozilla's launch script.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deploying RSA-Signed Applets in Java Plug-in

Java Rich Internet Applications Guide > Security > Deploying RSA-Signed Applets in Java Plug-in

The following topics are covered:

  • How to deploy RSA Signed Applets
  • Certificate Management
  • Disabling RSA signed applet support

How to Deploy RSA Signed Applets

To deploy RSA signed applets:

  1. Reference the JAR from the HTML page using archive, cache_archive, or cache_archive_ex format.
  2. Place the JAR file and HTML page on the web server.

When users of Java Plug-in encounter an RSA signed applet, the Plug-in will verify whether:

  1. The applet is correctly signed
  2. The RSA certificate chain and root CA are valid

If the applet is correctly signed and the RSA certificate chain and root CA are valid, the Plug-in will pop-up a security dialog telling the user and providing four options:

  1. Grant always: If selected, the applet will be granted the AllPermission permission. Any applet signed with the same certificate will be trusted automatically in the future, and no security dialog will pop up when the certificate is encountered again. This option selection can be changed from the Java Control Panel.
  2. Grant this session: If selected, the applet will be granted the AllPermission permission. Any applet signed with the same certificate will be trusted automatically within the same browser session.
  3. Deny: If selected, the applet will be treated as untrusted.
  4. View Issuer: If selected, the user can examine the attributes of each certificate in the certificate chain in the JAR file.

Once the user selects the options from the security dialog, the applet will be run in the corresponding security context. Note that all options are selected on the fly; no preconfiguration is required.

Certificate Management

The Certificates dialog from the Java Control Panel manages RSA signed applets. (Access this dialog from the Security panel.) The Certificates dialog contains a list of certificates that received "Grant always" permission when the Java Plug-in security dialog (pop-up) ran. Users can remove any certificate from the list, and if an applet signed by a removed certificates is encountered again, a security dialog pop-up will appear asking for permission. Users can also export and view certificates through the Java Control Panel.

Disabling RSA Signed Applet Support

RSA signed applets can be entirely disabled in Java Plug-in by specifying the usePolicy permission in the policy file. If the usePolicy permission is among the permissions granted to the given codesource (by the configured security policy), user prompting will not take place, and only permissions specified in the security policy will be granted to the codesource. By default, RSA signed applets are enabled in the Java Plug-in.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deployment Rule Set

Java Rich Internet Applications Guide > Security > Deployment Rule Set

This page includes the following topics:

  • Overview
  • Create the Rule Set
    • Define the Rules
    • Set Up Rules for Calls from JavaScript Code (LiveConnect)
    • Set Up Rules for Mixed Code
    • Get the Certificate Hash
  • Package and Install the Rule Set
  • Security Considerations
  • Examples

Overview

The Deployment Rule Set feature is for enterprises that manage their Java desktop environment directly, and provides a way for enterprises to continue using legacy business applications in an environment of ever-tightening Java applet and Java Web Start application security policies.

Java applets and Java Web Start Applications, known collectively as Rich Internet Applications (RIAs), are accessed from a web server through a browser. To protect the user and minimize the possibility that a RIA was compromised, security checks are performed when a RIA is started, and the user is prompted for permission to run the RIA. The Deployment Rule Set feature enables an enterprise to establish a whitelist of known applications. Applications on the whitelist can be run without most security prompts, however, the following prompts are not suppressed:

  • HTTPS security warnings
  • Authentication dialogs that require the user to provide credentials to connect
  • Security warnings from unsigned Java Web Start applications that want to perform such actions as creating a shortcut or an association

Rules for deployment are defined in an XML file and packaged in a signed JAR file. The rules are tested sequentially until one matches the RIA. Depending on the action assigned to the rule, the RIA is then run without security prompts, blocked from running, or run with default processing that shows any security prompts that are applicable. If no rules are matched, then default processing is used. The rules also provide the ability to specify the version of the JRE that is used to run the RIA and suppress the notification of out-of-date JREs.

An active rule set that is installed on the system can be viewed from the Security tab of the Java Control Panel. See the Security section of Java Control Panel for more information.

The Deployment Rule Set feature requires the new Java Plug-in (available since Java SE 6 Update 10). Use of the old Java Plug-in is not supported. If a deployment rule set is installed, usage of the old plug-in is blocked for all RIAs.

Note: The Deployment Rule Set feature is optional and shall only be used internally in an organization with a controlled environment. If a JAR file that contains a rule set is distributed or made available publicly, then the certificate used to sign the rule set will be blacklisted and blocked in Java.

Create the Rule Set

The rule set is an XML file that must be named ruleset.xml. Use any text editor to create this file.

Define the Rules

Define the rules that you need to run or block RIAs for your organization. See Java Deployment Rule Set DTD for the syntax of the rule set. Unknown elements or attributes are ignored. Valid elements are described in the following table.

Element Description Attributes

ruleset

Top-level element of the policy file. The version attribute is required.

The valid child element is rule.

  • version - Minimum version of the Deployment Rule Set specification that is required to process this file. Use a plus sign (+) to indicate that later versions can also be used, for example 1.0+. As of the 7u40 release, the Deployment Rule Set version is 1.0.

rule

Identifies a RIA or set of RIAs and the action taken. A rule element contains one id and one action element. Rules are processed sequentially until a rule is matched. When a match is found, no further rules are processed. If no rule is matched, then default processing is used, and any relevant security prompts or warnings are shown. The valid child elements are id and action.

When a RIA has artifacts that are signed with a different certificate or that are in a different location, ensure that the rule set contains rules for all artifacts of the RIA. For mixed code cases, which are calls between JAR files with different permission levels or calls from JavaScript code to privileged Java code, see Set Up Rules for Mixed Code for additional information.

The valid parent element is ruleset. The valid child elements are id and action.

None

id

Identifies the RIA or set of RIAs to which the rule applies. To be considered a match, the RIA must match all attributes and child elements present.

If no attributes or child elements are present, then the rule matches all RIAs. If the action for a rule is run, then at least one attribute or child element must be present.

The valid parent element is rule. The valid child element is certificate.

  • location - URL of the source of the RIA. For RIAs that use JNLP, this value is matched to the location of the JNLP file, or the canonical home of the RIA if there is no JNLP file. For a JNLP extension, this value is matched to the location of the extension element in the resource element of the main artifact. For RIAs that do not use JNLP, this value is matched to the URL for the HTML file. The path is case sensitive and UTF-8 encoding is assumed.

    Use of the HTTPS protocol is strongly recommended to avoid potential man-in-the middle attacks.

    A location is matched based on the following guidelines:

    • If provided, then the protocols must match exactly.
    • The host name can start with an asterisk followed by a dot (*.), which then matches any host that ends with the string provided after the dot. For example, *.example.com matches host.example.com and host.test.example.com. The host name cannot be just an asterisk.
    • If provided, then the port numbers must match exactly.
    • If provided, then the beginning of the paths must match exactly. If the location attribute does not contain a path, then all paths from the host are considered a match. For example, host.example.com/samples matches host.example.com/samples and host.example.com/samples/test, but does not match host.example.com/test. However, host.example.com matches host.example.com/samples, host.example.com/samples/test, and host.example.com/test.

    If the location attribute is not present, or the value is null, then the location matches all RIAs.

  • title - String used in the title element of the JNLP file, or as used by the Java Plug-in. If the title attribute is present and the value is not null, then the value must match the title of the RIA exactly. If the title attribute is not present, or the value is null, then the title matches all RIAs.

    If the action for a rule is run or default and the title attribute is present, another id attribute or child element must be specified with the title attribute, otherwise the rule is invalid.

certificate

Identifies the certificate used to sign the RIA. The hash attribute is required.

The valid parent element is id. The certificate element has no child elements.

  • algorithm - String that defines the hashing algorithm used to generate the value for the hash attribute. Currently, only security hash algorithm SHA-256 is supported. If the value is null, then SHA-256 is used.

  • hash - String of hexadecimal digits that represent the hash value of the code signing certificate. The value is based on the hashing algorithm specified for the algorithm attribute. See Get the Certificate Hash for information on getting the value to use.

action

Defines the action taken for any RIA that matches the rule.

The valid parent element is rule. The valid child element is message.

  • permission - Action taken. The following values are valid:

    • run - The following types of RIAs are allowed to run without prompts:

      • Signed with a valid certificate from a trusted certificate authority
      • Signed with an expired certificate
      • Self-signed
      • Unsigned
      • Missing required JAR file manifest attributes

      A RIA is blocked if it is signed with a certificate that is blacklisted or known to be revoked, even though the action is set to run.

    • block - RIA is not run. A message is shown to the user. To provide a custom message, include the message element.

    • default - RIA is run with default processing and any applicable security prompts are shown.

  • version - String that identifies the version of the JRE to use to run the RIA. This attribute applies only when the value for the permission attribute is run. Use the version attribute when an older JRE is needed for compatibility with specific RIAs. If the version attribute is not present, the RIA is run with the latest JRE available.

    The following values are valid:

    • Product version, such as 1.7.0_40, 1.7*, or 1.7.0_40+. Use an asterisk (*) after the number to request the use of any version that begins with the number before the asterisk. Use a plus sign (+) after the number to request the use of the specified version or any later version.
    • SECURE. The SECURE keyword requests the use of any secure version.
    • SECURE-version, where version is a valid platform version, such as SECURE-1.7. The SECURE-version keyword requests the use of any secure version of the specified platform, or the specified platform or later when a plus sign (+) follows the platform.

    The version of the JRE that is used is determined by the following order of precedence:

    1. The current version of the JRE is used if it is available and matches both the version attribute and the version requested by the RIA.
    2. The latest available version of the JRE is used if it matches both the version attribute and the version requested by the RIA.
    3. The current version of the JRE is used if it is available and matches the version attribute.
    4. The latest available version of the JRE is used if it matches the version attribute.

    If no version is available that meets the criteria, then the RIA is blocked, and a message is shown to the user. To provide a custom message, include the message element.

message

Message shown to the user if the RIA is blocked. Use only plain text for the message, HTML tags and other special formatting are not supported. If this element is not present, then a default message is shown.

To support multiple locales, include a message element for each locale. Define locale-specific messages after any message that does not include a locale. All messages are checked and if more than one message matches the user's locale, then the last message matched is used.

If the locale attribute is not specified, then the message is used for any locale for which a message element is not provided. If a message element for the user's locale is not provided and a message element without a locale is not present, then a default message is shown.

To ensure that the dialog box that shows the message fits the screen, keep the message under 1024 characters and test for all locales provided.

The valid parent element is action. The message element has no child elements.

  • locale - Locale to which the message applies.

See Examples for some sample rule sets.

If the rule set is invalid, then an error that describes the problem is shown and all RIAs are blocked. Either the ruleset.xml file must be corrected, or the DeploymentRuleSet.jar file must be removed from the deployment directory (see Package and Install the Rule Set for the location of this directory) before RIAs can be run. If a rule set is reported as invalid, then check for the following problems based on the error you received:

  • The file is unreadable.
  • The structure of the file is invalid.
  • The rules are not properly defined.
  • A rule with an action of run has no selection criteria provided and therefore matches all RIAs.
  • The JAR file is not properly signed with a valid certificate.

If the DeploymentRuleSet.jar file is removed, RIAs are handled by the default deployment process.

Set Up Rules for Calls From JavaScript Code (LiveConnect)

If you need to make calls to your RIA from JavaScript code, then apply the following guidelines to prevent the calls from being blocked:

  • If the rule set contains a rule with the action of run that matches your RIA, then the rule set must also contain a rule with the action of run that matches the location of the JavaScript code.

  • If the rule set contains a rule with the action of default that matches your RIA, or no rule matches your RIA so default processing is used, then one of the following must be true:

    • The rule set contains a rule with the action of run that matches the location of the JavaScript code.
    • The rule set contains a rule with the action of default that matches the location of the JavaScript code.
    • No rule matches the location of the JavaScript code, so default processing is used.

If the JavaScript code is calling privileged code and you want to suppress mixed code warnings, see Set Up Rules for Mixed Code.

Set Up Rules for Mixed Code

When you create your rule set, ensure that you have rules for all of the artifacts that are associated with the RIAs. Additional rules might be needed to suppress mixed code security warnings that are generated when calls are made between code with different permission levels, or from JavaScript code to privileged Java code. To suppress the mixed code security warnings, include rules in your rule set based on the following requirements of your RIA:

  • To make calls between Java code with different permission levels, add a rule with an action of run that matches the code being called.

    For example, the following rule suppresses the mixed code prompt for calls to privileged code located at https://host.example.com/apps from sandbox code:

    <rule>
     <id location="https://host.example.com/apps"/>
     <action permission="run"/>
 </rule>

  • To call privileged Java code from JavaScript code, add a rule with an action of run that matches the location of the JavaScript code.

    For example, the following rule suppresses the mixed code prompt for calls to privileged Java code from JavaScript code that is located in any page on https://host.example.com.

    <rule>
     <id location="https://host.example.com/"/>
     <action permission="run"/>
 </rule>

    If the rule set has no rule with an action of run or default that matches the location of the JavaScript code, then calls from JavaScript code are blocked. If you want any applicable security prompts to be shown for calls from JavaScript code, you must define a rule with an action of default that matches the location of the JavaScript code.

Be aware that the rules shown in this section for suppressing the mixed code prompt also suppress the other security prompts for any RIA that matches the rule. Make sure that your rules are defined in the order needed to provide the control that you want.

Get the Certificate Hash

If you want to define a rule that uses the certificate hash to match RIAs, you need to obtain the correct string of hexadecimal digits. Follow these steps:

  1. Use the following command to print out the certificate information for your JAR file, replacing myjar.jar with the name of your JAR file:

    keytool -printcert -jarfile myjar.jar | more

  2. At the beginning of the output, find Signer #1

  3. In the Certificate fingerprints section under Signer #1, find the line that begins with SHA256.

    The text that follows the SHA256 identifier contains 32 pairs of hexadecimal numbers separated by colons.

  4. Copy the string that follows the SHA256 identifier to a text editor and remove the colons.

    The string that you create by removing the colons is the hash value to use for the hash attribute of the certificate element.

Package and Install the Rule Set

The rule set defined in the ruleset.xml file must be packaged in a signed JAR file named DeploymentRuleSet.jar. The JAR file must be signed with a valid certificate from a trusted certificate authority. For information about creating and signing a JAR file, see the lesson Packaging Programs in JAR Files in the Java Tutorials.

Install the DeploymentRuleSet.jar file on your users' systems in the following directories:

  • On Windows platforms, install the file in the <Windows-directory>\Sun\Java\Deployment directory, for example, c:\Windows\Sun\Java\Deployment.
  • On Solaris or Linux platforms, install the file in the /etc/.java/deployment directory.
  • On Mac OS X platforms, install the file in the /Library/Application Support/Oracle/Java/Deployment/ directory.

To view the active rule set, see the Security section of Java Control Panel.

Security Considerations

The Deployment Rule Set feature enables RIAs to run without notifying users of potential security risks. Review the following security considerations to be aware of the risks of using a rule set, and follow any recommendations provided:

  • The location attribute of the id element is compared to the location of the following files:

    • The HTML file, for applets that do not use JNLP
    • The JNLP file, for Java Web Start applications and applets that do use JNLP

    If matched, then all of the content in the HTML file or JNLP file is considered trusted. However, if the web site that hosts the file is vulnerable to cross-site scripting attacks, malicious content could be injected into the HTML file or JNLP file.

  • For applets that use JNLP, the location of the HTML file is not checked, so the applet could potentially be started from anywhere.

  • If the location attribute is not used to match a rule to a RIA, then the HTML file or JNLP file that is used to start the RIA could be compromised. Use of the location attribute is recommended.

  • When a path is included in the location attribute, avoid using complex paths or multi-byte characters, if possible. The path is case sensitive and UTF-8 encoding is assumed. Security exceptions occur when any unsupported characters, decoding errors, or overlong encoding is encountered. If the web server, file system, or browser normalizes the path differently, a rule based on the location attribute could return unexpected results.

  • A blocking rule for a specific URI is not intended to be a robust security enforcement mechanism. For example, a rule established with a domain name can be bypassed if a user uses the IP address instead. The recommended practice is to have a final rule in your rule set with no identifiers and an action of block. Define the rules that you need to run RIAs without security prompts or with default processing, and let all other RIAs be matched by the final rule, which blocks them from running.

  • Use of the HTTPS protocol is recommended for all locations.

  • The order of the rules in the deployment rule set is critical. Rules are processed sequentially from the beginning of the file. When a match is found, no further rules are processed. Review your final rule set and look at both positive and negative cases to ensure that the rules cover the RIAs that you plan to manage without allowing matches to unknown RIAs.

  • Rules are required for all artifacts of the RIA, such as multiple JAR files and JNLP extensions. Be careful when defining a rule for an artifact so that you do not inadvertently allow other RIAs that match the rule to run.

  • Deployment rules allow RIAs to run with old versions of the JRE when needed for compatibility, however, older versions might have known security issues. Use the latest JRE whenever possible, and set the version attribute to SECURE or SECURE-version. If an older version of the JRE must be used, make any rule that requests the old version as restrictive as possible to limit the RIAs that match the rule and run with the old version. Use of all of the identifiers–location, title, and certificate hash–is recommended in this case.

  • If a rule with an action of run exists for the RIA, the RIA is run even if the certificate used to sign the RIA is expired.

Examples

The following rule set allows all RIAs from https://host.example.com/ to run without security prompts. RIAs from other locations do not match the rule so default processing is used and security prompts are shown as applicable.

<ruleset version="1.0+">
  <rule>
    <id location="https://host.example.com" />
    <action permission="run" />
  </rule>
</ruleset>

To ensure that all RIAs are handled by the rule set, you can provide a final rule that matches any RIA that was not matched by a previous rule. The action for this rule must be either block or default. The following rule set allows all RIAs from https://host.example.com:8080 to run without security prompts and blocks all other RIAs.

<ruleset version="1.0+">
  <rule>
    <id location="https://host.example.com:8080" />
    <action permission="run" />
  </rule>

  <rule>
    <id />
    <action permission="block" />
  </rule>
</ruleset>

Rules are processed in the order in which they appear in the rule set. Complex patterns can be defined for matching rules by placing the rules in the correct order. The following rule set allows RIAs from https://host.example.com to run without security prompts using a secure version of the Java 1.7 platform, but uses default processing for RIAs from https://host.example.com/games, which shows applicable security prompts. RIAs from other locations do not match either rule, so default processing is used.

<ruleset version="1.0+">
  <rule>
    <id location="https://host.example.com/games" />
    <action permission="default" />
  </rule>

  <rule>
    <id location="https://host.example.com" />
    <action permission="run" version="SECURE-1.7" />
  </rule>
</ruleset>

The following rule set modifies the previous rule set and allows the RIA named Solitaire from https://host.example.com/games to run with default processing. Other RIAs from https://host.example.com are allowed to run without security prompts using a secure version of the Java 1.7 platform. All other RIAs are blocked.

<ruleset version="1.0+">
  <rule>
    <id title="Solitaire" location="https://host.example.com/games" />
    <action permission="default" />
  </rule>

  <rule>
    <id location="https://host.example.com" />
    <action permission="run" version="SECURE-1.7" />
  </rule>

  <rule>
    <id />
    <action permission="block" />
  </rule>
</ruleset>

If you want to allow multiple RIAs from multiple locations to run, and all RIAs are signed with the same certificate, you can use the certificate element to identify the RIAs with one rule instead of creating rules for each location and title. The following rule set allows all RIAs that are signed with the certificate used by Oracle to run without security prompts using a secure version of the Java platform. RIAs from any host ending with example.com are allowed to run with default processing. All other RIAs are blocked, and a custom message is shown.

<ruleset version="1.0+">
  <rule> <!-- allow anything signed with company's public cert -->
    <id>
      <certificate hash="794F53C746E2AA77D84B843BE942CAB4309F258FD946D62A6C4CCEAB8E1DB2C6" />
    </id>
    <action permission="run" version="SECURE" />
  </rule>

  <rule>
    <id location="*.example.com" />
    <action permission="default" />
  </rule>

  <rule>
    <id />
    <action permission="block">
      <message>Blocked by corporate. Contact J. Smith, smith@host.example.com, if you need to run this app.</message>
    </action>
  </rule>
</ruleset>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Exception Site List

Java Rich Internet Applications Guide > Security > Exception Site List

This page includes the following topics:

  • Overview
  • Manage the Exception Site List
    • Add a URL
    • Edit a URL
    • Remove a URL
  • Manage Access to the Exception Site List

Overview

The Exception Site List feature provides a way for users to run Rich Internet Applications (RIAs) that otherwise would be blocked by security checks. The criteria used to determine if RIAs are allowed to run are becoming stricter. In some cases it might be difficult to update legacy RIAs to meet the security requirements and prevent them from being blocked. This feature enables users to continue to run these RIAs.

The exception site list contains URLs for sites that host RIAs that users want to run. RIAs that are launched from sites in the exception site list are allowed to run with the appropriate security prompts, even in the following circumstances, which would normally cause the RIA to be blocked:

  • RIA is not signed with a certificate from a trusted certificate authority
  • RIA is hosted locally
  • JAR file does not have the Permission manifest attribute
  • RIA is signed with an expired certificate
  • Certificate used to sign the RIA cannot be checked for revocation

The exception site list also allows JavaScript code to call Java code (LiveConnect) without prompting the user for permission when the JavaScript code and the Java code are located on a site in the list.

Note: If an active deployment rule set is installed on the system, the deployment rules take precedence over the exception site list. The exception site list is considered only when the default rule applies. See Deployment Rule Set for information about deployment rules.

Manage the Exception Site List

The exceptions granted by the Exception Site List feature apply to RIAs whose entry point is included in the list:

  • For applets, the URL for the document base of the applet must be in the list.
  • For Java Web Start applications, the URL for the main JNLP file must be in the list. If the URL for the main JNLP file cannot be determined, then the exceptions do not apply to the RIA.

If the RIA requires resources from another domain, that domain must also be included in the exception site list. Otherwise, the RIA is blocked when the additional resource is accessed.

The exception site list is managed in the Security tab of the Java Control Panel. The list is shown in the tab. To add, edit, or remove items from the list, click Edit Site List and follow the directions in Add a URL, Edit a URL, and Remove a URL.

Add a URL

To add a URL to the exception site list, follow these steps:

  1. Click Add in the Exception Site List window.
  2. Type the URL into the empty field that is provided under Location.
  3. Continue to click Add and enter URLs until your list is complete.
  4. Click OK to save the URLs that you entered. If you click Cancel, the URLs are not saved.

The following rules apply to the format of the URL:

  • A protocol is required.

    Supported protocols are FILE, HTTP, and HTTPS. HTTPS is recommended. If the protocol is not HTTPS, a warning is shown. Click Continue to add the URL, or click Cancel to discard the URL.

  • A domain is required.

    Wildcards are not supported. If only a domain is provided, any RIA from that domain is allowed to run. A domain can have multiple entries, for example, https://www.example.com and http://www.example.com.

  • A port number is required only if the default port is not used.

  • A path is optional.

    Wildcards are not supported. If the path ends with a slash (/), for example, https://www.example.com/apps/, RIAs in that directory and any subdirectory are allowed to run. If the path does not end with a slash, for example, http://www.example.com/test/applet.html, only that specific RIA is allowed to run.

If an invalid URL is entered, an error icon is shown next to the item. If the URL is not corrected before OK is clicked, the invalid URL is not saved.

Edit a URL

To edit a URL in the exception site list, follow these steps:

  1. Double-click the URL that you want to edit in the Exception Site List window.
  2. Make changes to the URL. See Add a URL for information on the format of the URL.
  3. Click OK to save the changes. If you click Cancel, the changes are not saved.

Remove a URL

To remove a URL from the exception site list, follow these steps:

  1. Click the URL that you want to remove in the Exception Site List window.
  2. To remove more than one URL, Ctrl-click the additional URLs.
  3. Click Remove.
  4. Click OK to save your change. If you click Cancel, the URLs are not removed from the list.

Manage Access to the Exception Site List

The location of the exception site list is set in the deployment.user.security.exception.sites property. The default location is <deployment.user.home>/security/exception.sites. See Deployment Configuration Properties for information on properties and property files.

Users can manage a list on their system, or use a list managed by a system administrator in a central location. If a system administrator does not want users to edit the exception site list, the deployment.user.security.exception.sites property can be set to a file for which users do not have write permission. If a user cannot write to the exception site list, the list is shown in the Java Control Panel, but the controls for editing are not available in the Exception Site List window.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


How RSA Signed Applet Verification Works in Java Plug-in

Documentation Contents

Verification of RSA Signed Applets in Java Plug-in

Java Rich Internet Applications Guide > Security > Verification of RSA Signed Applets in Java Plug-in

The following topics are covered:

  • Introduction
  • Support for RSA Verification
  • Support for Dynamic Trust Management
  • usePolicy Permission

Introduction

This page provides an overview of how verification of RSA signed applets is implemented in Java Plug-in. For an overview of how to use RSA signed applets, see Deploying RSA-Signed Applets in Java Plug-in.

Support for RSA Verification

To enable verification of RSA signatures in a browser-independent way, Java Plug-in includes a Cryptographic Service Provider (CSP). The CSP supports the "MD2withRSA", "MD5withRSA", and "SHA1withRSA" digital signature algorithms. It is automatically registered with the Java Cryptographic Architecture framework as part of the static initializer of the PluginClassLoader.

Support for Dynamic Trust Management

Java SE has a fine-grained access control based on "codesource" and "protection domain". Every class that is loaded from a JAR file has a codesource, which encapsulates two pieces of information:

  • The location (URL) where the class came from. In addition, every class that is loaded by a classloader belongs to one and only one protection domain, based on its codesource (i.e., based on where the class came from and who signed it). Every protection domain has a set of permissions associated with it, based on the configured security policy. The protection domain encapsulates the codesource and the set of permissions granted to it
  • The list of principals who signed it (its certificates). Each signer principal in the codesource is represented by its X.509 public-key certificate and supporting certificate chain.

A certificate chain is a list of hierarchically ordered public-key certificates, starting at the signer's public-key certificate and ending at the certificate of a Root Certification Authority ("Root CA"). The public key of one certificate in the chain is used to verify the signature on the previous certificate in the chain. The Root CA certificate is self-signed. The assumption is that the Root CA is trusted because it is well known and widely published.

The PluginClassLoader checks the configured security policy to determine which permissions to grant to a given codesource. The codesource and the set of permissions granted to it then form a protection domain. This behavior is common to all secure classloaders (i.e., instances of java.security.SecureClassLoader).

The sun.plugin.security.PluginClassLoader extends sun.applet.AppletClassLoader, which is a subclass of java.net.URLClassLoader, which in turn extends java.security.SecureClassLoader. The PluginClassLoader does additional work: If the applet is signed, and the permissions granted to it do not include the special usePolicy permission, the PluginClassLoader extracts the signers (and their supporting certificate chains) from the applet's codesource and attempts to verify them.

If Plug-in can verify the certificate chain all the way up to its Root CA certificate, it checks if that Root CA certificate is contained in the database of trusted Root CA certificates. If so, Plug-in will display the certificate chain of the authenticated signer and ask the user whether or not to grant AllPermission to code signed by that principal. Java code that is assigned the AllPermission permission is treated the same as system code, meaning it has all the privileges that system code has. The user can then choose whether or not to grant AllPermission to code signed by that principal, and whether such permission should be granted to any code signed by that principal for all subsequent sessions or for the current session only.

For the case of unsigned applets, or signed applets whose permissions include the usePolicy, see Security.

usePolicy Permission

A permission named usePolicy allows system administrators to turn off the PluginClassLoader behavior. If the usePolicy permission is granted to the codesource by the configured security policy, no user prompting will take place. Only the permissions specified in the security policy will be granted to the codesource.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAR File Manifest Attributes for Security

Java Rich Internet Applications Guide > Security > JAR File Manifest Attributes for Security

Contents

  • Overview
  • Permissions Attribute
  • Codebase Attribute
  • Application-Name Attribute
  • Application-Library-Allowable-Codebase Attribute
  • Caller-Allowable-Codebase Attribute
  • Trusted-Only Attribute
  • Trusted-Library Attribute
  • Additional Information

Overview

The JAR file manifest contains information about the contents of the JAR file, including security and configuration information. Use the manifest attributes described in this section to enhance the security of running RIAs from a browser. Add the attributes to the manifest before the JAR file is signed. See Modifying a Manifest File in the Java Tutorial for information on adding attributes to the JAR manifest file.

Note: These attributes apply to signed applets and Java Web Start applications. These attributes are ignored for stand-alone Java applications.

Permissions Attribute

The Permissions attribute is used to verify that the permissions level requested by the RIA when it runs matches the permissions level that was set when the JAR file was created. This attribute is required in the manifest of the main JAR file for the RIA, secondary JAR files and extensions are not required to have the Permissions attribute. If the attribute is not present in the main JAR file, then the RIA is blocked.

Use the Permissions attribute to help prevent someone from re-deploying an application that is signed with your certificate and running it at a different privilege level. Set this attribute to one of the following values:

  • sandbox - Indicates that the RIA runs in the security sandbox and does not require additional permissions.

  • all-permissions - Indicates that the RIA requires access to the user's system resources.

For Java Web Start applications and applets that use JNLP, the value of the Permissions attribute must match the permissions level requested in the JNLP file, or match the default permission if no permissions level is requested. Otherwise, an error is shown and the RIA is blocked. See Structure of the JNLP File for information on the security element that is used to request the permissions level. If the element is not present, the permissions level defaults to sandbox.

For applets that do not use JNLP, the value of the Permissions attribute must match the permissions level requested in the applet tag. Otherwise, an error is shown and the RIA is blocked. If the applet tag does not contain a permissions level, then signed applets run with the permissions level set by the Permissions attribute. See Deploying with the Applet Tag for information on setting the permissions level in the applet tag.

Codebase Attribute

The Codebase attribute is used to restrict the code base of the JAR file to specific domains. Use this attribute to prevent someone from re-deploying your application on another website for malicious purposes.

Note: If the Codebase attribute does not specify a secure server, such as HTTPS, some risk exists that your code could be repurposed in Man-in-the-Middle (MITM) attack schemes.

Set this attribute to either the domain name or IP address where the JAR file for the application is located. A port number can also be included. For multiple locations, separate the values with a space. An asterisk (*) can be used as a wildcard only at the beginning of the domain name. The following table shows sample values and what they match.

Value | Matches | Does Not Match
* | All domains |
https://*.example.com | https://a.example.com https://a.b.example.com | http://a.example.com http://a.b.example.com
www.example.com | https://www.example.com, http://www.example.com | http://example.com http://example.net
www.example.com:8085 | https://www.example.com:8085, http://www.example.com:8085 | http://www.example.com
*.example.com | https://a.example.com, http://a.example.com https://a.b.example.com, http://a.b.example.com https://example.com, http://example.com | http://example.net
127.0.0.1 | http://127.0.0.1 http://127.0.0.1:8080 http://127.0.0.1:80 | http://localhost
127.0.0.1:8080 | http://127.0.0.1:8080 | http://127.0.0.1 http://127.0.0.1:80

The value of the Codebase attribute must match the location of the JAR file for the RIA. Otherwise, an error is shown and the RIA is blocked. If the attribute is not present, a warning is written to the Java Console and the code base specified for the applet tag or JNLP file is used.

Application-Name Attribute

The Application-Name attribute is used in security prompts to provide a title for your signed RIA. Use of this attribute is recommended to help users make the decision to trust and run the RIA. The value can be any valid string, for example:

Application-Name: Hello World

If the Application-Name attribute is not present in the JAR file manifest, a warning is written to the Java Console and the value for the Main-Class attribute is used. If neither attribute is present in the manifest, no title is shown in the security prompts. Titles are not shown for unsigned RIAs.

Application-Library-Allowable-Codebase Attribute

The Application-Library-Allowable-Codebase attribute identifies the locations where your signed RIA is expected to be found. This attribute is used to determine what is listed in the Location field for the security prompt that is shown to users when the JAR file for your RIA is in a different location than the JNLP file or HTML page that starts your RIA. If the files are not in the locations identified, the RIA is blocked. Set this attribute to the domains where the JAR file, JNLP file, and HTML page are located. To specify more than one domain, separate the domains by a space, for example:

Application-Library-Allowable-Codebase: https://host.example.com *.samplehost.com/apps

If the Application-Library-Allowable-Codebase attribute is present and matches the location from which the RIA is started, then a single host is listed in the Location field for the prompt and the option to hide future prompts is provided. If this attribute is present and the files are accessed from a location not included for the attribute, then the RIA is blocked. If this attribute is not present, then multiple hosts that correspond to the locations of the JAR file and the JNLP file or HTML page are listed in the Location field for the prompt. When multiple hosts are shown, the user is not given the option to hide future prompts. Use of this attribute is recommended so the files for the RIA are accessed only from known locations.

This attribute is not needed if the JAR file for the RIA is in the same location as the JNLP file or HTML page that starts the RIA.

See Codebase Attribute for a description of the values that are allowed.

Caller-Allowable-Codebase Attribute

The Caller-Allowable-Codebase attribute is used to identify the domains from which JavaScript code can make calls to your RIA without security prompts. Set this attribute to the domain that hosts the JavaScript code. If a call is made from JavaScript code that is not located in a domain specified by the Caller-Allowable-Codebase attribute, the call is blocked. To specify more than one domain, separate the domains by a space, for example:

Caller-Allowable-Codebase: host.example.com 127.0.0.1

If the Caller-Allowable-Codebase attribute is not present, calls from JavaScript code to your RIA are blocked when the security level is set to High, which is the default, or Very High. When the security level is set to Medium, which is not recommended, a security warning is shown and users then have the choice to allow the call or block the call. For unsigned RIAs, JavaScript code that requires access to the RIA must be in the same location as the main JAR file for your RIA, otherwise, the user is prompted to allow access. Security prompts are shown for each Applet classLoader instance.

See Codebase Attribute for a description of the values that are allowed.

Trusted-Only Attribute

The Trusted-Only attribute is used to prevent untrusted classes or resources from being loaded for an applet or application. Set the value of the attribute to true, for example:

Trusted-Only: true

This attribute prevents a privileged application or applet from being repurposed with untrusted components. All classes and resources in the application or applet must be signed and request all permissions.

Trusted-Library Attribute

The Trusted-Library attribute is used for applications and applets that are designed to allow untrusted components. No warning dialog is shown and an application or applet can load JAR files that contain untrusted classes or resources. Set the value of the attribute to true, for example:

Trusted-Library: true

This attribute prevents components in a privileged application or applet from being repurposed with untrusted components. All classes and resources in a JAR file containing this manifest attribute must be signed and request all permissions.

In a mixed code application or applet, all privileged classes and resources must be included in JAR files that contain the Trusted-Library attribute. This attribute is used for calls between privileged Java code sandbox Java code. If you have JavaScript code that calls Java code, see Caller-Allowable-Codebase Attribute.

All trusted library JARs are loaded into a separate dedicated class loader that is unique to the application or applet instance. This Trusted-Library loader is now the parent of the normal Web Start or applet class loader. For backwards compatibility with the original search order, both loaders cooperate to implement a common class path. Consistent with prior releases, JAR files use lazy download and are opened as needed to find requested classes and resources.

Code in a JAR file that is to be marked with the Trusted-Library manifest attribute may need to be modified slightly if it uses calls that are class loader dependent, such as the single parameter version of Class.forName(), Class.getResource(), and Class.getResourceAsStream(), some variants of java.util.ResourceBundle.getBundle(), and any other methods that operate relative to their immediate caller's defining loader. Changes only need to be made if the requested class or resource might be found in a JAR file that is not a Trusted-Library (and is therefore loaded by the normal Web Start or applet class loader).

Code in a Trusted-Library can look up the normal loader by invoking Thread.currentThread().getContextClassLoader(). Note, however, that there are uncommon circumstances in which getContextClassLoader() may return null. For example, this may happen when the garbage collector uses a JRE system thread to invoke the Object.finalize() method of an unreachable instance.

If you need to convert class to Class.getResource() or Class.getResourceAsStream() to their ClassLoader equivalents, remember to adjust the string parameter as described by the documentation for those two methods. If the original resource name began with '/', then it was an absolute name and the leading '/' simply needs to be removed. Otherwise, determine if the class instance which was the target of the getResource call is in a named package. If it is an array you should first determine the underlying component type of the array. Invoke Class.getName() on the class or component type instance. If the class name contains any '.' characters, it is in a named package that will need to be prepended to the original resource name. Determine the package name by removing any characters after, and including, the trailing '.' character. Next, replace any remaining '.' characters with '/' characters. Finally, add a trailing '/' and append the original resource name string. This new string can now be passed to the ClassLoader version of the getResource() or getResourceAsStream() methods.

Generally, care must be taken to ensure that the code in the trusted library is written in a careful and secure manner and is otherwise compatible with being loaded in a separate class loader instance from any remaining jars that are part of the application and are loaded by the normal loader.

Additional Information

See Mixing Privileged Code and Sandbox Code for information on using manifest attributes to manage calls from untrusted code.

See Preventing RIAs from Being Repurposed for information on using manifest attributes to ensure that the correct permissions level and code base are used.

For information on adding attributes to the JAR manifest file, see Modifying a Manifest File in the Java Tutorial.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Deployment Rule Set DTD

<!ELEMENT ruleset (rule*)>
<!ATTRIBUTE ruleset version CDATA #REQUIRED>

<!ELEMENT rule (id, action)>

<!ELEMENT id (certificate?)>
<!ATTRIBUTE id title CDATA #IMPLIED>
<!ATTRIBUTE id location CDATA #IMPLIED>

<!ELEMENT certificate EMPTY>
<!ATTLIST certificate algorithm CDATA #IMPLIED>
<!ATTLIST certificate hash CDATA #REQUIRED>

<!ELEMENT action (message?)>
<!ATTRIBUTE permission (run | block | default) #REQUIRED>
<!ATTRIBUTE version CDATA #IMPLIED>

<!ELEMENT message (#PCDATA)>
<!ATTLIST message locale CDATA #IMPLIED>

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Mixing Privileged Code and Sandbox Code

Documentation Contents

Mixing Privileged Code and Sandbox Code
Ensuring Application and Applet Security

Contents

  • Overview
  • Mixed Code Protection Options for Users
  • Deploying Privileged Applications and Applets Securely Without a Mixed Code Warning
    • Trusted-Only Attribute
    • Trusted-Library Attribute
  • Mixed Code FAQ
  • For More Information

Overview

Privileged Java Web Start applications and applets that contain components that are restricted to the security sandbox could potentially be unsafe unless the mixed code was intended by the application vendor. When a program contains both privileged components and sandbox components, security warnings are shown. Note that JavaScript code is restricted to the sandbox and could also cause security warnings to be shown. See Caller-Allowable-Codebase Attribute for information on the manifest attribute for authorizing JavaScript code.

The security warnings state that Java has discovered application components that could indicate a security concern and recommends that you contact the application vendor to ensure that the application components have not been tampered with.

In the dialog, you choose to Block, or Don't Block execution of the application components. You can also click the optional More Information link.

Clicking the Block button blocks potentially unsafe components from running, and the program may terminate. Clicking the Don't Block button causes the application or applet to continue execution with some added protections.

Raising a warning is the default behavior, but there are options available to manage how this situation is handled.

  • For users and systems administrators, various protection options are available. For more information, see Mixed Code Protection Options for Users.
  • For developers and deployers, two manifest attributes are available. For more information, see Deploying Privileged Applications and Applets Securely Without a Mixed Code Warning.
Note: If any concepts are unclear, such as how to modify a manifest file, or how to sign a JAR file, or how to use a deployment configuration file, see For More Information for useful links.

Mixed Code Protection Options for Users

There are two mechanisms for managing how mixed code programs are handled.
  • From the Java Control Panel

    You can manage how mixed code programs are handled via the Java Control Panel. There are four levels of control available.

    How to access the Java Control Panel varies for each platform and sometimes varies for different releases of a platform. On Microsoft Windows, you can bring up the panel via Start menu > Control Panel > Java.

    In the Mixed Code section of the Advanced Tab, the first three options enable the software protections, but behave a bit differently.

    • Enable - show warning if needed
      This is the default setting. When a potential security risk is encountered, a warning dialog is raised. Clicking Block blocks potentially unsafe components from running and may terminate the program. When the user clicks Don't Block, the application or applet continues execution with some added protections (packages or resources that are later encountered with the same names but have different levels of permissions will not be loaded).
    • Enable - hide warning and run with protections
      This option suppresses the warning dialog. The code executes as if the user had clicked Don't Block from the warning dialog.
    • Enable - hide warning and don't run untrusted code
      This option suppresses the warning dialog and behaves as if the user had clicked Block from the warning dialog.

    The final option, Disable verification, is not recommended. This option completely disables the software from checking for a mixture of privileged code and sandbox code, leaving the user to run potentially unsafe code with no warning and without the additional protections.

  • From the deployment.properties File

    The mixed code protection options can also be set by using the deployment.security.mixcode deployment property, as described in Deployment Configuration File and Properties.

    • deployment.security.mixcode=ENABLE

      This option enables mixed code verification. When a potential security risk is encountered, a warning dialog is raised. This is the default value for this property.

    • deployment.security.mixcode=HIDE_RUN

      This option suppresses the warning dialog. The code executes as if the user had clicked Don't Block from the warning dialog.

    • deployment.security.mixcode=HIDE_CANCEL

      This option suppresses the warning dialog and behaves as if the user had clicked Block from the warning dialog.

    • deployment.security.mixcode=DISABLE

      This option is not recommended. The software is disabled from checking for a mixture of privileged code and sandbox code, leaving the user to run potentially unsafe code with no warning and without the additional protections.

Version note: To take advantage of these security enhancements, users need to install the Java SE or Java for Business 6 Update 19 release (or later) and use the new Java Plug-in, which is enabled by default. To use an earlier JRE with the new Java Plug-in, you need to install the Java for Business 5.0 Update 24 release (or later) or the Java for Business 1.4.2_26 release (or later) in order to enable the mixed code security enhancement for those release families.
Note 1: Mixed code checking for the 1.4.2 release is available only for the Windows platform.
Note 2: For Solaris, the new Java Plug-in requires Firefox 3 or later. Netscape 7 and Firefox 2 are not supported.
Note 3: For more information on which platforms are supported by the new plug-in, see the Release Notes for the Next-Generation Java Plug-in.

Deploying Privileged Applications and Applets Securely Without a Mixed Code Warning

This section describes best practices for developers and deployers to protect their applications and applets from being maliciously re-purposed by replacing trusted components with untrusted ones.

Two JAR manifest attributes are available, as of Java SE 6 Update 19, for deploying privileged applications and applets. A warning dialog is not displayed when one of these manifest attributes is included.

Developers and deployers should check their Java Web Start applications and applets to determine if they mix privileged code and untrusted code. If users of these applications and applets may inadvertently download these applications and applets from rogue websites, deploying or re-deploying with one of the following attributes should be considered. Existing signed JARs need to be re-signed after adding these manifest attributes. Note: source code of the classes and resources are not required for re-signing with the manifest entries.

Trusted-Only Attribute

For applications and applets that do not require untrusted components, use the Trusted-Only attribute. No warning dialog is displayed and an application or applet that loads a JAR file containing this attribute does not load any untrusted classes or resources. This attribute prevents a privileged application or applet from being re-purposed with untrusted components. See Trusted-Only Attribute for more information.

Trusted-Library Attribute

For applications and applets that are designed to allow untrusted components, use the Trusted-Library attribute. No warning dialog is shown and an application or applet can load JAR files containing untrusted classes or resources. This attribute prevents components in a privileged application or applet from being re-purposed with untrusted components. See Trusted-Library Attribute for more information about using this attribute.

The Trusted-Library attribute is used for calls between privileged Java code and sandbox Java code. If you have JavaScript code that calls Java code, use the Caller-Allowable-Codebase Attribute.

Mixed Code FAQ

  • Question: I develop and/or deploy applications. How do I know whether I need to be concerned about this issue?

    Answer: If you do not use the manifest entries and you encounter the warning dialog when running your privileged application or applet, your program contains mixed code and is affected.

  • Question: Is there a test I can run to determine whether I am affected?

    Answer: Test your Java Web Start applications and Java applets against Java SE or Java for Business 6 Update 19 or later. If you are running earlier release families, you should additionally install and test your program under 5.0 Update 24 (or later), or 1.4.2_26 (or later), as appropriate. If you see the warning dialog, then the Java Web Start application or applet contains mixed code.

  • Question: What actions can I take?

    Answer: End users can click the "More Information" link before deciding whether to click "Block" or "Don't Block" in response to the warning dialog. IT or System Administrators can choose from one of the Mixed Code protection options and configure enterprise desktops through the respective deployment properties described above. Developers and deployers can use the manifest entries to protect their applications from tampering. No warning dialog will be displayed when one of these manifest entries is used.

  • Question: What should Java ISVs, OEMs, and application vendors do with their code?

    Answer: Two manifest entries are available to application vendors to deploy, or re-deploy, their Java Web Start applications and Java applets.

  • Question:What versions of Java SE and Java for Business are affected?

    Answer: The following releases from Oracle are affected:

    • Java SE and Java for Business 6 Update 18 and earlier
    • Java for Business 5.0 Update 23 and earlier
    • Java for Business 1.4.2_25 and earlier
  • Question: What about Java applets and Java Web Start applications from the Internet, do I need to be concerned about those?

    Answer: Users will see a warning dialog if a signed Java Web Start application or Java applet contains mixed code regardless of whether it is downloaded from the Internet or Intranet.

  • Question: What if I am behind a corporate firewall?

    Answer: The mixed code issue applies. See the question on applets and applications from the Internet.

  • Question: Is this an issue for Oracle JRockit?

    Answer: No.

  • Question: I am using an implementation of Java from another vendor. Are they affected in the same way?

    Answer: Please contact your vendor for advice on their implementation.

  • Question: What are the risks to remaining on Java SE 6u18 (or earlier) to avoid seeing the warnings?

    Answer: Java SE 6 Update 19 (or later) contains the latest security fixes and Oracle recommends that customers use the latest release.

  • Question: If I move to 6 Update 19 or later, what type of testing do I need to consider?

    Answer: See the question on testing. In addition, the release notes for each update release documents the latest changes included.

  • Question: I am a developer. What are the security exceptions that are added with this enhancement?

    Answer: The following SecurityException messages are described for informational and debugging purposes only. The actual message contents may change between different implementations and releases.

    These SecurityExceptions are thrown when a JAR file contains one of the manifest attributes and the JAR file itself contains untrusted components.

    attempted to open sandboxed jar "+ url +" as Trusted-Only
attempted to open sandboxed jar "+ url +" as Trusted-Library
    The following SecurityException is thrown when a JAR file contains the Trusted-Only manifest attribute and untrusted components have previously been accessed.
    attempted to open Trusted-Only jar "+ url +" on sandboxed loader
    The following SecurityException is thrown when at least one JAR containing the Trusted-Only manifest attribute has been opened and a subsequent attempt is made to load an untrusted component.
    Trusted-Only loader attempted to load sandboxed resource from "+ url"
    The following two SecurityExceptions are thrown when mixed components are first detected and a decision is made to disallow mixing. In the first case, everything previously loaded was trusted and then an attempt was made to load an untrusted component. The second case is the reverse condition.
    trusted loader attempted to load sandboxed resource from "+ url"
sandboxed loader attempted to load trusted resource from "+ url"
    The following two SecurityExceptions are thrown after mixed components had previously been detected and a decision was made to allow them to coexist. The exceptions indicate that a component name collision (resource name or class package name) was detected between trusted and untrusted components and the request to load the resource or class was denied.
    "resource \"" + name + "\" does not match trust level of other resources of the same name"
"class \"" + packageName + "\" does not match trust level of other classes in the same package"
    The following two SecurityExceptions are thrown when untrusted components have been previously accessed, an attempt to load a trusted component was previously detected, and a decision was made to allow mixed components to coexist, and a JAR containing trusted components is opened and a component name collision is detected between trusted and untrusted components.
    "untrusted resource \"" + name + "\" in class path"
"untrusted class package \"" + packageName + "\" in class path"
  • Question: I have a mixed code Java Web Start application which cannot be easily updated to use the Trusted-Library manifest attribute. Can I sign the JAR files in the sandboxed JNLP without having to change the JNLP to request the all-permissions security model?

    Answer: Yes, with some limitations beginning with Java Web Start in Java SE or Java for Business Update 21. The sandboxed JAR files must be signed in the same way (same signing certificates) as one or more of the trusted JAR files in a JNLP file that uses the all-permissions security model, and the trusted JAR file must be opened by Java Web Start prior to any sandboxed resource being loaded which shares the same signer. This means the trusted JAR file must be earlier in Java Web Start's JAR search order or it is triggered to load independent of the simple search order by use of the JAR indexing feature. In Java Web Start, the main application JNLP's JARs are searched first, followed in declaration order by any JNLP extensions. JAR files labeled within a JNLP as "eager" are searched first, followed by "lazy" JAR files, followed by any JAR files labeled as using the "part" feature.

  • Question: I have Java on my phone. Is that affected by this issue?

    Answer: No, Java ME is not affected.

For More Information

  • JAR File Manifest Attributes for Security
  • Secure Coding Guidelines for Java
  • Deployment Configuration File and Properties
  • Modifying a Manifest File, a section in The Java Tutorial, has information on how to work with manifest files.
  • Signing JAR Files, a section in The Java Tutorial.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preventing the Repurposing of an Application

Documentation Contents

Preventing RIAs from Being Repurposed

Java Rich Internet Applications Guide > Security > Preventing RIAs from Being Repurposed

The following topics are covered:

  • Identifying Valid Permissions Level and Codebases
  • Examples
  • Additional Information

Identifying Valid Permissions Level and Codebase

The following attributes for the JAR file manifest were introduced in the JDK 7u25 release to defend RIAs against unauthorized code repurposing:

  • Permissions Attribute -Verifies that the RIA requests the permission level that you intended.

    If this attribute is not present, it might be possible for an attacker to exploit a user by re-deploying an application that is signed with your certificate, and running the application at a different privilege level.

  • Codebase Attribute - Verifies that the RIA is run from the location that you intended.

    If the Codebase attribute does not specify a secure server, such as HTTPS, some risk exists that your code could be repurposed in Man-in-the-Middle (MITM) attack schemes.

Note: These attributes apply to signed applets and Java Web Start applications. The attributes are ignored for stand-alone Java applications.

Examples

If you have a RIA that runs in the security sandbox and is expected to be accessed from https://example.com, add the following attributes to the manifest:

Permissions: sandbox
Codebase: https://example.com

If the RIA is also available from example.backup.com:8080, include both domains for the Codebase attribute:

Codebase: https://example.com example.backup.com:8080

Additional Information

See JAR File Manifest Attributes for Security for information on other manifest attributes that are available.

For information on adding attributes to the JAR file manifest, see Modifying a Manifest File in the Java Tutorial.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Rich Internet Application Deployment Process

Java Rich Internet Applications Guide > Security > Rich Internet Application Deployment Process

This page includes the following topics:

  • Overview
  • Plug-in Processing
  • Rules Processing
  • JRE Status
  • Digital Signature
  • Security Prompts
    • Normal Processing
    • Exception Site List
    • Select JRE

Overview

When a user launches an applet or a Java Web Start application, collectively called Rich Internet Applications (RIAs), a number of checks are made to determine if the RIA is allowed to run, which version of the JRE is used, and which security prompts are shown to the user. The purpose of this topic is to explain those checks and show how the decisions are made.

The following flow chart shows a simplified version of the process that is used to deploy a RIA.

Figure 1. Deployment Processing Flow Chart

Flow chart that shows the deployment process for RIAs

The nodes in the left column of the chart provide a high-level view of what happens after a user starts a RIA. The following steps describe the main process. When a decision is made to either run or block the RIA, any remaining steps are skipped.

  1. Begin loading Java content.

    When a user opens an HTML page that contains an applet, or starts a Java Web Start application, the content starts to load. If no JRE is installed, the browser notifies the user that the plug-in is missing and the RIA is not run.

  2. Is the browser plug-in registered and allowed to run?

    Check that the plug-in is registered and enabled. See Plug-in Processing for more information.

  3. Does a rule exist for this RIA?

    If a deployment rule set exists, then look for a rule that matches the RIA. If a matching rule is found, then the action for the rule is taken. If the action is block, then the RIA is not run. If the action is run, then the RIA is allowed to run. If no rule is found, or the action is default, then the deployment process continues with the next step in the flow chart. See Rules Processing for more information.

  4. Is the JRE expired or below the security baseline?

    Ensure that a valid JRE is installed to run the RIA. If not, then give the user the option to update the JRE. See JRE Status for more information.

  5. Does the RIA have a valid signature?

    Check if the RIA is signed. If so, then ensure that the signature is valid. See Digital Signature for more information.

  6. Which security prompt is needed?

    Determine which security prompt to show based on the RIA, the setting of the security level in the Java Control Panel, and the exception site list. If an older JRE is requested, then choose the JRE that is used to run the RIA. See Security Prompts for more information.

Plug-in Processing

When content starts to load, plug-in processing answers the question in the second step of the deployment process, "Is the browser plug-in registered and allowed to run?" This process is shown in the Plug-in Processing box in Figure 1, which is connected to the node for this step and shown to the right of the node.

If the plug-in is not registered, then the browser notifies the user that the plug-in is missing and the RIA is not run.

If the plug-in is registered, then deployment properties are checked to see if the plug-in is disabled. The browser is also checked to see if the browser has disabled the plug-in. If the plug-in is disabled, then the user is notified and the RIA is not run. If the plug-in is enabled, then the deployment process continues with Rules Processing. See the Security tab of the Java Control Panel for information on disabling and enabling the Java Plug-in. If the plug-in was disabled by the browser, see the documentation for the browser.

Rules Processing

Rules processing answers the question in the third step of the deployment process, "Does a rule exist for this RIA?" This process is shown in the Rules Processing box in Figure 1, which is connected to the node for this step and shown to the right of the node. Rules processing looks for a valid Deployment Rule Set file. See Deployment Rule Set, which was introduced in Java 7 update 40, for information on this feature.

If no deployment rule set is found, then the deployment process continues with JRE Status.

If an invalid deployment rule set is found, then an error message is shown to the user and the RIA is blocked.

If a valid deployment rule set is found, then one of the following actions is performed:

  • If no rule matches the RIA, then the deployment process continues with JRE Status.

  • If the RIA matches a rule, then one of the following actions is performed:

    • If the rule allows the RIA to run, then the signature for the RIA is checked. If the signature is valid, or the RIA is unsigned, then the RIA is run on the requested version of the JRE without showing any security prompts. If the signature for the RIA is not valid, then a security warning is shown to the user and the RIA is blocked.

      For rules processing, a signature that contains a certificate that is expired or a certificate whose certificate revocation status cannot be checked is considered valid, and the RIA is run. An invalid signature is one that contains a certificate that is blacklisted, revoked, or malformed in some way.

    • If the rule blocks the RIA, then a security warning is shown to the user and the RIA is blocked.

    • If the rule requests default processing for the RIA, then the deployment process continues with Digital Signature.

JRE Status

JRE status processing answers the question in the fourth step of the deployment process, "Is the JRE expired or below the security baseline?" This process is shown in the JRE Status box in Figure 1, which is connected to the node for this step and shown to the right of the node. If the option for ignoring the security baseline is set, then the JRE status is not checked and the deployment process continues with Digital Signature. The deployment property deployment.expiration.check.enabled is used to indicate if the security baseline is ignored. See Deployment Configuration File and Properties for information on this property.

If the security baseline is not ignored, the JRE is checked to see if it is expired or below the security baseline. If neither condition is true, then the deployment process continues with Digital Signature. See Setting the Security Level of the Java Client for information on the JRE expiration date. See the Update Release Notes for your version of the JDK for information on the security baseline.

If the JRE is either expired or below the security baseline, the user is given the option to update the JRE. Depending on the user's choice, one of the following actions is performed:

  • If the user chooses to update later, then the deployment process continues with Digital Signature.
  • If the user chooses to block the RIA, then the RIA is not run.
  • If the user chooses to update the JRE, then the user is directed to the download page at java.com.

Digital Signature

Digital signature processing answers the question in the fifth step of the deployment process, "Does the RIA have a valid signature?" This process is shown in the Digital Signature box in Figure 1, which is connected to the node for this step and shown to the right of the node. If the RIA is unsigned, then the deployment process continues with Security Prompts.

If the RIA is signed, then the certificate used to sign the RIA is validated. If the certificate is invalid or revoked, then the RIA is blocked.

If the RIA is signed with a valid certificate, or if the certificate is expired or the revocation status cannot be checked, then the deployment process continues with Security Prompts. The action taken for RIAs that have expired certificates or certificates that cannot be checked depends on the setting of the Security Level slider in the Java Control Panel.

See Signing and Verifying JAR Files for information on digital signatures.

Security Prompts

The final step in the deployment process is to determine if the RIA is run, and answers the question in the last step of the deployment process, "Which security prompt is needed?" If the RIA is run, this step also determines which version of the JRE is used when an older version is requested. The Normal Processing box and Exception Site List box in Figure 1 show the process for determining if the RIA is run and which security prompt is shown. These boxes are connected to the node for this step and shown to the right of the node.

The process for determining which JRE is used when an older version is requested is shown in the Select JRE box in Figure 1, which is connected to the boxes for determining if the RIA is run and which security prompt is shown.

At this point in the process, the decision to run or block the RIA, and the choice of the security prompt to show, is based on the following criteria:

  • The setting of the Security Level slider in the Java Control Panel, the default is High. See the Security tab of the Java Control Panel for information on the Security Level Slider.
  • The presence of a signing certificate for the RIA
  • The status of the certificate that was used to sign the RIA
  • The inclusion of the location of the RIA in the exception site list

Note: If the user previously selected the option to not show a prompt again, then that prompt is suppressed. The response the user gave when the option to suppress was selected is used instead of showing the prompt again.

Normal Processing

The following table shows if a RIA is run or blocked when the location of the RIA is not on the exception site list.

Security Level Run with Prompt Block

Very High

Only RIAs that are signed with a valid certificate located in the Signer CA keystore are allowed to run. The manifest for the main JAR file for the RIA must contain the Permissions attribute. See JAR File Manifest Attributes for Security for information on the Permissions attribute.

The following RIAs are blocked:

  • Signed with an expired certificate, or a certificate whose revocation status cannot be checked
  • Missing the Permissions attribute in the main JAR file
  • Self-signed (signed with a certificate that is not in the Signer CA keystore)
  • Unsigned
  • Local

High

RIAs that are signed with a valid certificate located in the Signer CA keystore, an expired certificate, or a certificate whose revocation status cannot be checked are allowed to run. The manifest for the main JAR file for the RIA must contain the Permissions attribute. See JAR File Manifest Attributes for Security for information on the Permissions attribute.

The following RIAs are blocked:

  • Missing the Permissions attribute in the main JAR file
  • Self-signed (signed with a certificate that is not in the Signer CA keystore)
  • Unsigned
  • Local

Medium

All RIAs that contain the Permissions attribute in the manifest for the main JAR file are allowed to run. See JAR File Manifest Attributes for Security for information on the Permissions attribute.

The following RIAs are blocked:

  • Missing the Permissions attribute in the main JAR file

If the RIA is allowed to run and requests an older version of the JRE, then the deployment process continues with Select JRE.

Exception Site List

The Exception Site List feature, which was introduced in Java 7 Update 51, provides a way for users to run RIAs that would be blocked because they do not meet the current security requirements. RIAs that are launched from sites in the exception site list are allowed to run with the appropriate security prompts. See Exception Site List for more information on this feature.

If the RIA is allowed to run and requests an older version of the JRE, then the deployment process continues with Select JRE.

Select JRE

It is recommended that the most recent version of the JRE always be used. However, if a RIA is not compatible with this version of the JRE, the version that is required to run the RIA can be requested in the JNLP file or applet tag.

When an older version is requested, one of the following actions is performed, based on the criteria described in the sections that follow:

  • The RIA is restarted with the requested version of the JRE using Secure Static Versioning (SSV).
  • The RIA is run with the latest version of the JRE that is installed.
  • The RIA is blocked.

Run the RIA with the Requested JRE

The RIA is restarted with the requested version of the JRE using SSV when the following conditions are met:

  • RIA is signed.
  • The requested version of the JRE is installed.
  • For privileged RIAs, which request all permissions, the RIA is signed with a valid certificate.
  • For sandbox RIAs or self-signed RIAs, the user agrees to run with the requested version when prompted.

Run the RIA with the Latest JRE

The following table describes the cases in which the RIA is run with the latest version of the JRE that is installed, instead of the requested version.

Signing Status | Requested Version is Installed | Type of RIA | Response to Prompt
Signed | Yes | Sandbox, self-signed | User does not agree to run with requested version
Signed | No | All | User agrees to run with the latest version that is installed
Unsigned | Ignored | All | User agrees to run with the latest version that is installed

Block the RIA

The RIA is blocked in the following cases when the user does not agree to run with the latest version of the JRE that is installed:

  • The RIA is signed and the requested version of the JRE is not installed.
  • The RIA is unsigned.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security

Java Rich Internet Applications Guide > Security

The following topics are covered:

  • Policy Files and Permissions
  • Property Files and Certificates
  • Security Dialogs
  • More Information

Policy Files and Permissions

Java applications and applets deployed using Java Web Start and Java Plug-in are by default run in a secure sandbox that defines the set of permissions that code in an untrusted application is granted.

The standard java policy files can be used to enhance the permissions granted to untrusted applications. In addition to $JRE_HOME/lib/security/java.policy and $USER_HOME/.java.policy (used by all java programs), applications and applets loaded by Java Web Start and Java Plug-in load two additional policy files, whose location can be configured by the deployment configuration properties: deployment.user.security.policy and deployment.system.security.policy.

The default sandbox, combined with the permissions granted by these policy files, if they exist, determine the permissions granted to untrusted code.

One other policy file, whose location is determined by the deployment configuration property deployment.security.trusted.policy, can be used to restrict the permissions granted to trusted code. With this property unset (default), trusted code will be granted the AllPermission permission. With this property set, trusted code will be granted only the permissions granted to untrusted code, plus any other permissions granted by the policy file pointed to by this property.

Property Files and Certificates

The deployment configuration also has several properties that determine how and if code can be trusted. Normally, any signed JAR file in Java Plug-in, and any set of signed JAR files in Java Web Start that are listed in a jnlp file requesting the AllPermission permission, will be granted trust by the user after the certificate chains have been verified and shown to the user in a security dialog.

The deployment configuration property deployment.user.security.trusted.certs points to a certificate store that contains the certificates already accepted by the user.

The deployment configuration property deployment.system.security.trusted.certs can be configured to point to a certificate store of certificates pre-accepted by the system administrator.

If a JAR file (in Java Plug-in) or set of JAR files in a jnlp file requesting the AllPermission permission (in Java Web Start) is signed by a certificate that is in one of these stores, it will be trusted.

The deployment configuration property deployment.security.askgrantdialog.show can control if the user is permitted to grant trust to new code signed with new certificates, and the deployment configuration property deployment.security.askgrantdialog.notinca can further be used to control if the user is permitted to grant trust to code signed by certificates whose root certificate is not in one of the Root Certificate Authority certificate stores (see below).

Security Dialogs

If the above two properties allow it, and the code is signed with certificate chains that can be properly validated, the users are then prompted to grant trust to the code. See Security Dialogs for information on the prompts shown.

The Root Certificate Authority certificate stores are the union of the certificate stores in the files pointed to by the properties: deployment.user.security.cacerts and deployment.system.security.cacerts. By default deployment.system.security.cacerts points to the cacerts file in the jre/lib/security directory. deployment.user.security.cacerts points to a file that contains any additional cacerts imported into it using the Certificates dialog in the Security tab of the Java Control Panel.

One final setting can be used to customize the user experience in Java Web Start. By default the sandbox does not include the AWTPermission showWindowWithoutWarningBanner. Without this permission, all top-level windows will contain the awt banner "Java Application Window" or "Java Applet Window". The deployment configuration property deployment.security.sandbox.awtwarningwindow can be used to add this permission to untrusted code.

More Information

  • Rich Internet Application Deployment Process
  • Browser Keystores
  • Mixing Signed and Unsigned Code Ensuring Application and Applet Security
  • Signing JAR Files with a JNLP Template
  • Verification of RSA Signed Applets in Java Plug-in
  • Signing Applets Using RSA Certificates
  • Deploying RSA-Signed Applets in Java Plug-in
  • Preventing RIAs from Being Repurposed
  • Security Dialogs
  • Deployment Rule Set
  • For a detailed discussion of properties, see Deployment Configuration File and Properties
  • For details about security in the Java Control Panel, see the Security section in the Java Control Panel
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security Dialogs

Java Rich Internet Applications Guide > Security > Security Dialogs

The following topics are covered:

  • Dialog Contents
  • Improving the User Experience
  • Java Control Panel Settings That Affect the Dialogs Shown

Dialog Contents

Beginning with the 7u21 release, users are notified when a RIA is launched with a security prompt similar to the following screen shot.

Screen shot of the security dialog shown for an RIA that runs in the security sandbox and is signed with a certificate from a trusted certificate authority.

Depending on the RIA, the security prompt shows the following information:

  • Name of the RIA, or notification that the application is unsigned.

    The name that is shown is the value of the Application-Name attribute in the JAR file manifest. If the Application-Name attribute is not present, the value for the Main-Class attribute is used. If neither attribute is present in the manifest, no title is shown in the security prompts. Titles are not shown for unsigned RIAs. See Application-Name Attribute for information.

  • Warning when an out-of-date JRE is being used.

    For enterprises that manage the update process of user's systems, the deployment property deployment.expiration.check.enabled can be set to suppress the warnings for out-of-date JREs. See Deployment Configuration File and Properties for information.

  • Information about the publisher.

    If the application is self-signed or signed by an unknown authority, the publisher is shown as UNKNOWN.

  • Warnings about the certificate.

    If the certificate is expired, revoked, or the server that tracks which certificates were revoked cannot be accessed, the prompt shows a warning. A warning is also shown if the certificate is not valid until a future date.

  • Location from which the application is accessed.

    The value is either a URL for applications that are accessed from a website, or a directory for applications that are accessed from a local drive.

  • Level of access required by the application.

    Limited access restricts the application to the security sandbox, unrestricted access provides the application with access to resources on the user's system.

  • Warning about missing JAR file manifest attributes.

    JAR file manifest attributes are available to provide additional protection for an application. The warning indicates that the manifest is missing a recommended attribute. See JAR File Manifest Attributes for Security for information.

  • For unsigned or self-signed applications, a checkbox that the user must select before the Run button is enabled.

  • Option to not show the prompt again.

    For signed RIAs, future prompts for this RIA and RIAs from the same location that are signed with the same certificate can be turned off. If the RIA is a sandbox application, then the prompt is turned off only for other sandbox applications that are signed with the same certificate. When shown, click Show Options to access the option to turn off the prompt.

    Prompts that were previously hidden can be restored through a button on the Security tab of the Java Control Panel. See Restore Security Prompts for information.

  • Buttons to Run the RIA, Cancel the RIA, and when a JRE is out of date, to Update to the latest JRE.

For a description and examples of the security prompts, see "What should I do when I see a security prompt from Java?" on java.com.

Improving the User Experience

The best experience for the user is when the RIA is restricted to the security sandbox and is signed with a current certificate from a trusted certificate authority. Clicking Run is all that is needed from the user to run the RIA.

As conditions become less secure, warning messages become stronger, and in some cases, more action is needed by the user, as described for the following situations:

  • If the RIA is signed with a certificate from a trusted certificate authority, but requires unrestricted access to the user's system, the prompt warns the users about the risk of running the RIA. Clicking Run starts the RIA.

  • If the RIA is signed with an expired certificate or the revocation status of the certificate cannot be checked, the prompt provides stronger warnings about the risk of running the RIA. The user must select the option to accept the risk, which enables the Run button, then click Run to run the RIA.

  • Additional warnings are shown in some cases, such as when sandbox code attempts to access privileged code, or a RIA attempts to access resources that it does not have permission to access. These warnings require additional responses from the user.

For guidelines on deploying your RIA, see Deployment Best Practices in the Java Tutorial. For information on how the deployment of RIAs is handled, see Rich Internet Application Deployment Process.

Java Control Panel Settings That Affect the Dialogs Shown

The Java Control Panel can be used to set options that are related to the security prompts. The Security tab provides an option to block Java content from running in a browser. The Security Level setting determines if the applet is automatically blocked and what level of prompting the user receives if the RIA is not blocked. See the Security section for the Java Control Panel for more information.

The Advanced tab provides options for managing RIAs:

  • Secure Execution Environment options provide control for allowing or prohibiting users from granting privileges. If the user is not allowed to grant privileges, the security prompt is not shown and the app or features of the app are blocked.

  • Mixed code security verification options provide control for showing or hiding prompts that warn of mixed code. If the prompts are hidden, some features might be blocked without any notice to the user.

See the Advanced section for the Java Control Panel for more information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Signed JNLP Files

TOC:

  • Signing a JNLP File
  • Signing a JAR File with a JNLP Template

Signing a JNLP File

There are several advantages to signing a JNLP file. It will:

  • Ensure that others cannot change the content in your JNLP file. For example, by adding a random library, or changing application information.
  • Allow the use of arbitrary Java Virtual Machine (JVM) options and Java system properties in your application.
  • Prevent others from referencing your JAR file directly in their HTML browser applets.

To create a signed JNLP file you don't sign the JNLP file itself, but you include the JNLP file inside the directory structure before the JAR file is created and then signed. The JNLP file must be named APPLICATION.JNLP and is included in the JNLP-INF subdirectory. The JAR file is then created and signed in the usual manner. When a web start application is started, the JNLP file used must be identical to the JNLP file in the signed JAR in order for the application to run.

Note that you cannot use the APPLET tag to run an applet if JAR file contains a signed JNLP file.

The Signing and Verifying JAR Files lesson in the Java Tutorial explains how to sign a JAR file.

Signing a JAR File with a JNLP Template

A JNLP file can be signed in order to grant a jar-bundled application special priviledges. When deploying a signed application from a location that is unlikely to change, and other aspects of the deployment are stable, you can use a standard JNLP file, as described in Signing and Verifying Jar Files (Java Tutorial).

However, in cases when an application needs to be re-distributed, or other tweaks are needed, such as changing the application icon, you can deploy the application with a JNLP template. Introduced in JDK 7, a template can define what parts of an external JNLP file may differ from one embedded into a jar file.

A template file has the name JNLP-INF/APPLICATION_TEMPLATE.JNLP. Note that the name must be in upper case. For those element or attribute fields in the file that are to be left unspecified, the wildcard notation, *, is used as that field's value. Elements or attributes that may compromise security will be locked out from this feature.

The following is an example of an application template that could be used to host an application on various hosts with different application icons.

<?xml version="1.0" encoding="UTF-8"?>
  <jnlp codebase="*">
    <information>
      <title>SampleApp</title>
      <vendor>Sample Company</vendor>
      <icon href="*"/>
      <offline-allowed/>
    </information>
    <resources>
      <java version="1.3+"/>
      <jar href="SampleApp.jar"/>
    </resources>
    <application-desc main-class="com.sample.SampleApp"/>
  </jnlp>

An application with this text in a JNLP-INF/APPLICATION_TEMPLATE.JNLP file in its main jar file can be moved from one server to another, or its application icon can be changed, without resigning the main jar file.

For more information, see Version 7.0 of the JNLP specification (jcp.org).

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Signing Applets Using RSA Signed Certificates

Documentation Contents

Signing Applets Using RSA Certificates

Java Rich Internet Applications Guide > Security > Signing Applets Using RSA Certificates

The following topics are covered:

  • Introduction
  • Signing Tools
  • Getting RSA Certificates
    • Getting Certificates With Jarsigner
  • Bundling Java Applets as JAR Files
  • Signing Java Applets
    • Signing Applets Using jarsigner
    • Signing Applets Using Netscape Signing Tool
  • Converting Old Netscape-Signed Applets
  • Microsoft Authenticode
  • Common Problems

Introduction

RSA-signed applets are supported to make deployment of signed applets easier. However, signing applets through RSA is still difficult for most novice applet developers and prevents them from taking full advantage of this Java Plug-in feature. This document provides step-by-step instructions for signing applets using RSA certificates, allowing novice applet developers to sign their applets without having to wade through the many complex security issues involved.

Signing applets requires the following :

  1. Signing tools
  2. An RSA keypair and a certificate chain for the public keys
  3. The applet and all its class files, bundled as JAR files

Signing Tools

Java Plug-in supports the format of the following tools for signing applets using RSA:

  1. jarsigner: Signing tool shipped as part of the Java SDK
  2. signtool: Signing tool provided by Netscape for signing applets in Navigator/Communicator. For more details on the sign tool and downloading it, see NSS Security Tools.

Getting RSA Certificates

RSA certificates may be purchased from a Certificate Authority (CA) that supports RSA, such as VeriSign and Thawte. Some CAs, such as VeriSign, implement different protocols for issuing certificates, depending on the particular signing tool you are using.

Getting Certificates With Jarsigner

Jarsigner is known to work with VeriSign and Thawte certificates and may work with Certificate Authorties. To use Jarsigner to sign applets using RSA certificates, obtain code signing certificates for Java from VeriSign, Thawte, or similar certificates from other CAs. During the process of certificate enrollment, you will be asked to provide the certificate signing request (CSR). To generate the CSR, follow these steps:

  1. Use keytool to generate an RSA keypair (using the "-genkey -keyalg rsa" options). Make sure your distinguished name contains all the components mandated by VeriSign/Thawte. For example:
    C:\Program Files\Java\jdk1.8.0\bin\keytool -genkey -keyalg rsa -alias MyCert
Enter keystore password: *********
What is your first and last name?
[Unknown]: XXXXXXX YYY
What is the name of your organizational unit?
[Unknown]: Example Software
What is the name of your organization?
[Unknown]: New Technology Company
What is the name of your City or Locality?
[Unknown]: Cupertino
What is the name of your State or Province?
[Unknown]: CA
What is the two-letter country code for this unit?
[Unknown]: US
Is <CN=XXXXXXX YYY, OU=Example Software, O=New Technology Company,
                L=Cupertino, ST=CA, C=US> correct?
[no]: yes

Enter key password for <MyCert>
(RETURN if same as keystore password): *********
  2. Use "keytool -certreq" to generate a certification signing request. Copy the result and paste it into the VeriSign/Thawte webform. For example,
    C:\Program Files\Java\jdk1.8.0\bin\keytool -certreq -alias MyCert

Enter keystore password:  *********
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBtjCCAR8CAQAwdjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwE
AYDVQQHEwlDdXBlcnRpbm8xGTAXBgNVBAoTEFN1biBNaWNyb3N5c3RlbX
MxFjAUBgNVBAsTDUphdmEgU29mdHdhcmUxEzARBgNVBAMTClN0YW5sZXk
gSG8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALTgU8PovA4y59eb
oPjY65BwCSc/zPqtOZKJlaW4WP+UhmebE+T2Mho7P5zXjGf7elo3tV5uI
3vzgGfnhgpf73EoMow8EJhly4w/YsXKqeJEqqvNogzAD+qUv7Ld6dLOv0
CO5qvpmBAO6mfaI1XAgx/4xU/6009jVQe0TgIoocB5AgMBAAGgADANBgk
qhkiG9w0BAQQFAAOBgQAWmLrkifKiUYtd4ykhBtPWSwW/IKkgyfIuNMML
dF1DH8neSnXf3ZLI32f2yXvs7u3/xn6chnTXh4HYCJoGYOAbB3WNbAoQR
i6u6TLLOvgv9pMNUo6v1qB0xly1faizjimVYBwLhOenkA3Bw7S8UIVfdv
84cO9dFUGcr/Pfrl3GtQ==
-----END NEW CERTIFICATE REQUEST-----
  3. The CA (for example, VeriSign/Thawte) will send you a certificate reply (chain) by email. Copy the chain and store it in a file. Use "keytool -import" to import the chain into your keystore. For example:
    C:\Program Files\Java\jdk1.6.0\bin\keytool -import -alias MyCert -file VSSStanleyNew.cer
  4. Your RSA certificate and its supporting chain have been validated and imported into your keystore. You are now ready to use jarsigner to sign your JAR file.

Note:

You must use the same alias name for all the above steps or no alias name, in which case the alias name defaults to "mykey".

Bundling Java Applets as JAR Files

To use Jarsigner to sign applets with RSA certificates, the applets must be bundled as JAR files. The Jar tool (command jar ...), which comes wiht the Java SE SDK, can be used for that purpose. For example:

C:\Program Files\Java\jdk1.8.0\bin\jar cvf C:\TestApplet.jar .
added manifest
adding: TestApplet.class (in = 94208) (out= 20103)(deflated 78%)
adding: TestHelper.class (in = 16384) (out= 779)(deflated 95%)
This example creates a JAR file C:\TestApplet.jar, and it contains all the files under the current directory and its sub-directories.

After the JAR file is created, you should verify its content using the jar tool again, e.g.,

C:\Program Files\Java\jdk1.8.0\bin\jar tvf TestApplet.jar
     0 Mon Mar 06 18:02:54 PST 2000 META-INF/
    68 Mon Mar 06 18:02:54 PST 2000 META-INF/MANIFEST.MF
 94208 Wed Mar 10 11:48:52 PST 2000 TestApplet.class
 16384 Wed Mar 10 11:48:52 PST 2000 TestHelper.class
This ensures that the class files are stored with the proper path within the JAR file.

To sign an applet with an RSA certificate using the Netscape Signing Tool, the applet must be placed in a directory, e.g., C:\signdir. The Netscape Signing Tool will bundle it as JAR file after the signing process.

Signing Java Applets

Once you have the RSA certificates, the signing tool and the applet's JAR files, you are ready to sign the applets.

Signing Applets Using jarsigner

To sign applets using jarsigner, follow these steps:

  1. Use jarsigner to sign the JAR file, using the RSA credentials in your keystore that were generated in the previous steps. Make sure the same alias name is specified. E.g.,
    C:\Program Files\Java\jdk1.8.0\bin\jarsigner C:\TestApplet.jar MyCert
Enter Passphrase for keystore: ********
  2. Use "jarsigner -verify -verbose -certs" to verify the jar files
    C:\Program Files\Java\jdk1.8.0\bin\jarsigner -verify -verbose
                -certs d:\TestApplet.jar

         245 Wed Mar 10 11:48:52 PST 2000 META-INF/manifest.mf
         187 Wed Mar 10 11:48:52 PST 2000 META-INF/MYCERT.SF
         968 Wed Mar 10 11:48:52 PST 2000 META-INF/MYCERT.RSA
smk      943 Wed Mar 10 11:48:52 PST 2000 TestApplet.class
smk      163 Wed Mar 10 11:48:52 PST 2000 TestHelper.class

      X.509, CN=XXXXXXX YYY, OU=Example Software,
                O=New Technology Company, L=Cupertino,
                ST=CA, C=US (mycert)
      X.509, CN=New Technology Company, OU=Java Plug-in QA,
                O=New Technology Company, L=Cupertino, ST=CA, C=US
      X.509, EmailAddress=server-certs@thawte.com,
                CN=Thawte Server CA, OU=Certification
                Services Division, O=Thawte Consulting cc,
                L=Cape Town, ST=Western Cape, C=ZA

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.
  3. Your applet has been signed properly. You are now ready to deploy your RSA signed applet.

Signing Applets Using Netscape Signing Tool

To sign applets using signtool, follow these steps:

  1. Use "signtool -L" to determine the certificate nickname that should be used in signing. E.g.,
    C:\signtool13WINNT40\signtool -L -d a:\cert
using certificate directory: a:\cert

S Certificates
- ------------
  AT&T Certificate Services
  Thawte Personal Premium CA
  GTE CyberTrust Secure Server CA
  Verisign/RSA Commercial CA
  AT&T Directory Services
  BelSign Secure Server CA
  BelSign Class 1 CA
  GTIS/PWGSC, Canada Gov. Web CA
  Thawte Personal Freemail CA
  Thawte Server CA
  GTIS/PWGSC, Canada Gov. Secure CA
  MCI Mall CA
  VeriSign Class 3 Primary CA
  VeriSign Class 4 Primary CA
  KEYWITNESS, Canada CA
  BelSign Class 2 CA
  BelSign Object Publishing CA
* Sun Microsystems, Inc.
  VeriSign Class 3 CA - Commercial Content/Software
                        Publisher - VeriSign, Inc.
  Verisign/RSA Secure Server CA
  VeriSign Class 1 Primary CA
  BBN Certificate Services CA Root 1
  Thawte Personal Basic CA
* Sun Microsystems, Inc.'s VeriSign, Inc. ID
  CertiSign BR
  VeriSign Class 2 Primary CA
  Canada Post Corporation CA
  Integrion CA
  IBM World Registry CA
  BelSign Class 3 CA
  Uptime Group Plc. Class 1 CA
  Uptime Group Plc. Class 2 CA
  Thawte Premium Server CA
  Uptime Group Plc. Class 3 CA
  GTE CyberTrust Root CA
  Uptime Group Plc. Class 4 CA
- ------------

Certificates that can be used to sign objects
have *'s to their left.
  2. Create an empty directory. E.g.,
    mkdir signdir
  3. Put all the applet class files into it.

  4. Use "signtool -Z" to sign the applet. E.g.,
    C:\signtool13>signtool -k "Sun Microsystems, Inc.'s VeriSign, Inc. ID"
        -d a:\cert -Z c:\TestApplet.jar c:\signdir
using certificate directory: a:\cert
Generating c:\signdir/META-INF/manifest.mf file..
--> TestApplet.class
adding c:\signdir/TestApplet.class to c:\TestApplet.jar...
        (deflated 57%)
--> TestHelper.class
adding c:\signdir/TestHelper.class to c:\TestApplet.jar...
        (deflated 43%)
Generating zigbert.sf file..
adding c:\signdir/META-INF/manifest.mf to c:\TestApplet.jar...
        (deflated 44%)
adding c:\signdir/META-INF/zigbert.sf to c:\TestApplet.jar...
        (deflated 46%)
adding c:\signdir/META-INF/zigbert.rsa to c:\TestApplet.jar...
        (deflated 40%)
tree "c:\signdir" signed successfully
  5. Use "signtool -w" to verify the archive. E.g.,
    C:\signtool13>signtool -w c:\TestApplet.jar -d a:\cert
using certificate directory: a:\cert

Signer information:

nickname: Sun Microsystems, Inc.'s VeriSign, Inc. ID
subject name: C=US, ST=CA, L=Palo Alto, OU=Example Software,
        CN=Sun Microsystems, OU=Digital ID Class 3 - Netscape
Object Signing, OU="www.verisign.com/repository/RPA Incorp.
        by Ref.,LIAB.LTD(c)99", OU=VeriSign Trust Network,
        O="VeriSign, Inc."
issuer name: CN=VeriSign Class 3 CA - Commercial Content/Software
        Publisher, OU="www.verisign.com/repository/RPA Incorp.
        by Ref.,LIAB.LTD(c)98", OU=VeriSign Trust Network,
        O="VeriSign, Inc."

Your applet has been signed properly. You are now ready to deploy your RSA signed applet. See How to Deploy RSA Signed Applets for deployment information.

Converting Old Netscape-Signed Applets

Existing RSA signed applets designed for Netscape may use Netscape-specific security APIs. These Netscape-specific APIs are not supported in Java Plug-in. Instead, the Plug-in supports the standard Java security APIs in both Netscape Navigator and Internet Explorer.

To migrate Netscape-signed applets using the Netscape security APIs to run in Java Plug-in:

  1. Comment or remove all netscape.security.* related statements from the Java applet.
  2. Compile and archive the applet as a JAR file.
  3. Re-sign the JAR file using Object Signing.

This ensures that an RSA signed applet will run in both Netscape Navigator and Internet Explorer with Java Plug-in.

Microsoft Authenticode

Authenticode is a proprietary signing technology used in Microsoft Internet Explorer on Win32 for supporting signed applets in IE's JVM. Authenticode is not supported in Java Plug-in. Instead, the Java Plug-in supports use of RSA signed applets in both IE and Netscape.

Common Problems

If the JAR file is not signed properly, if the RSA certificate has expired, or if the RSA certificate is a self-generated, self-signed certificate, Java Plug-in may fail silently and not pop up the security dialog. The applet will be treated as unsigned.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Pack200 and Version Download

Java Rich Internet Applications Guidet > Enhancements and Other Features > Pack200 and Version Download

Contents

  • Introduction
  • Pack200
    • Usage in a JNLP File
    • Usage in Applet Tag
  • Version Download
    • Usage in a JNLP file

Related Links

  • Pack200 Tools

Introduction

Prior to Java SE 6 update 10 release, engineers had to deploy the JNLPDownloadServlet on the web servers in order to use Pack200 or download specific versions of their application JARs. While this solution works, it limits the flexibility of deploying versioned or Pack200 compressed JARs: Engineers might not have access to deploy JNLPDownloadServlet on web servers.

The Java SE 6 update 10 release introduces two new Java system properties to enable Pack200 and version download: jnlp.packEnabled and jnlp.versionEnabled.

Pack200

When the Java system property jnlp.packEnabled is set to "true" in a jnlp file or an applet tag, the Java Plug-in or Java Web Start software will download the .pack.gz version of JARs. If the .pack.gz version is not available, the unzipped JAR will be searched for.

Note: the compressed version of foo.jar should be named foo.jar.pack.gz.

Usage in a JNLP File

Use the property tag to specify "jnlp.packEnabled" to "true" within the resources tags, i.e.:

<jnlp ...>
   ...
   <resources>
      <property name="jnlp.packEnabled" value="true"/>
         <java version="1.5+" href="http://javadl.sun.com/webapps/jawsautodl/AutoDL/j2se"/>
         <jar href="foo.jar" main="true" download="eager"/>
   </resources>
   ...
</jnlp>

In the above case, Java Web Start and the new Java Plug-in will first look for foo.jar.pack.gz. If the file is not found, they will fall back and look for the original, foo.jar.

Usage in Applet Tag

Pass the "-Djnlp.packEnabled" VM argument by using "java_arguments", i.e.:

<HTML>
   ...
   <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
      <PARAM NAME  = "cache_archive" VALUE = "HelloWorld.jar"/>
      <PARAM NAME="java_arguments" VALUE="-Djnlp.packEnabled=true"/>
   </APPLET>
   ...
</HTML>

This feature is only available to New Java Plug-in since it requires passing the VM argument to Java VM. The New Java Plug-in will look for HelloWorld.jar.pack.gz, if this file is not available, it will fall back and look for HelloWorld.jar.

Version Download

Version download is the ability to request that specific versions of certain jar files be used by applets and Java Web Start applications. The jnlp.versionEnabled applies to Java Web Start applications and applets deployed using JNLP.

Usage in a JNLP file

When the Java system property jnlp.versionEnabled is set to "true" in the jnlp file, if the JAR version is specified, the server is checked for the versioned JAR file using the naming convention:

  <file> ::= <name> "__" <options> ".jar"
  <options> ::= "V" <version-id>

Note: version 1.0 of foo.jar should be named foo__V1.0.jar.

The original jar will be used if the versioned jar file is not found.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessing Resources

Documentation Contents

Location-Independent Access to Resources

  • Overview
  • Resources, names, and contexts
  • System Resources
  • Non-System Resources
  • Resource Names
  • Usimg Methods of java.lang.Class
  • Using Methods of java.lang.ClassLoader
  • Security
  • Examples
  • References

Overview

A resource is data (images, audio, text, and so on) that a program needs to access in a way that is independent of the location of the program code. Java programs can use two mechanisms to access resources: Applets use Applet.getCodeBase() to get the base URL for the applet code and then extend the base URL with a relative path to load the desired resource, for example with Applet.getAudioClip(url). Applications use "well known locations" such as System.getProperty("user.home") or System.getProperty("java.home"), then add "/lib/resource", and open that file.

Methods in the classes Class and ClassLoader provide a location-independent way to locate resources. For example, they enable locating resources for:

  • An applet loaded from the Internet using multiple HTTP connections.
  • An applet loaded using JAR files.
  • A Java Bean loaded or installed in the CLASSPATH.
  • A "library" installed in the CLASSPATH.

These methods do not provide specific support for locating localized resources. Localized resources are supported by the internationalization facilities.

Resources, names, and contexts

A resource is identified by a string consisting of a sequence of substrings, delimited by slashes (/), followed by a resource name. Each substring must be a valid Java identifier. The resource name is of the form shortName or shortName.extension. Both shortName and extension must be Java identifiers.

The name of a resource is independent of the Java implementation; in particular, the path separator is always a slash (/). However, the Java implementation controls the details of how the contents of the resource are mapped into a file, database, or other object containing the actual resource.

The interpretation of a resource name is relative to a class loader instance. Methods implemented by the ClassLoader class do this interpretation.

System Resources

A system resource is a resource that is either built-in to the system, or kept by the host implementation in, for example, a local file system. Programs access system resources through the ClassLoader methods getSystemResource and getSystemResourceAsStream.

For example, in a particular implementation, locating a system resource may involve searching the entries in the CLASSPATH. The ClassLoader methods search each directory, ZIP file, or JAR file entry in the CLASSPATH for the resource file, and, if found, returns either an InputStream, or the resource name. If not found, the methods return null. A resource may be found in a different entry in the CLASSPATH than the location where the class file was loaded.

Non-System Resources

The implementation of getResource on a class loader depends on the details of the ClassLoader class. For example, AppletClassLoader:

  • First tries to locate the resource as a system resource; then, if not found,
  • Searches through the resources in archives (JAR files) already loaded in this CODEBASE; then, if not found,
  • Uses CODEBASE and attempts to locate the resource (which may involve contacting a remote site).

All class loaders will search for a resource first as a system resource, in a manner analogous to searcing for class files. This search rule permits overwriting locally any resource. Clients should choose a resource name that will be unique (using the company or package name as a prefix, for instance).

Resource Names

A common convention for the name of a resource used by a class is to use the fully qualified name of the package of the class, but convert all periods (.) to slashes (/), and add a resource name of the form name.extension. To support this, and to simplify handling the details of system classes (for which getClassLoader returns null), the class Class provides two convenience methods that call the appropriate methods in ClassLoader.

The resource name given to a Class method may have an initial starting "/" that identifies it as an "absolute" name. Resource names that do not start with a "/" are "relative".

Absolute names are stripped of their starting "/" and are passed, without any further modification, to the appropriate ClassLoader method to locate the resource. Relative names are modified according to the convention described previously and then are passed to a ClassLoader method.

Using Methods of java.lang.Class

The Class class implements several methods for loading resources.

The method getResource() returns a URL for the resource. The URL (and its representation) is specific to the implementation and the JVM (that is, the URL obtained in one runtime instance may not work in another). Its protocol is usually specific to the ClassLoader loading the resource. If the resource does not exist or is not visible due to security considerations, the methods return null.

If the client code wants to read the contents of the resource as an InputStream, it can apply the openStream() method on the URL. This is common enough to justify adding getResourceAsStream() to Class and ClassLoader. getResourceAsStream() the same as calling getResource().openStream(), except that getResourceAsStream() catches IO exceptions returns a null InputStream.

Client code can also request the contents of the resource as an object by applying the java.net.URL.getContent() method on the URL. This is useful when the resource contains the data for an image, for instance. In the case of an image, the result is an awt.image.ImageProducer object, not an Image object.

The getResource and getResourceAsStream methods find a resource with a given name. They return null if they do not find a resource with the specified name. The rules for searching for resources associated with a given class are implemented by the class's ClassLoader. The Class methods delegate to ClassLoader methods, after applying a naming convention: if the resource name starts with "/", it is used as is. Otherwise, the name of the package is prepended, after converting all periods (.) to slashes (/).

public InputStream getResourceAsStream(String name) {
  name = resolveName(name);
  ClassLoader cl = getClassLoader();
  if (cl==null) {
    return ClassLoader.getSystemResourceAsStream(name); // A system class.
  }
  return cl.getResourceAsStream(name);
}

public java.net.URL getResource(String name) {
  name = resolveName(name);
  ClassLoader cl = getClassLoader();
  if (cl==null) {
    return ClassLoader.getSystemResource(name);  // A system class.
  }
  return cl.getResource(name);
}

The resolveName method adds a package name prefix if the name is not absolute, and removes any leading "/" if the name is absolute. It is possible, though uncommon, to have classes in diffent packages sharing the same resource.

private String resolveName(String name) {
  if (name == null) {
    return name;
  }
  if (!name.startsWith("/")) {
    Class c = this;
    while (c.isArray()) {
      c = c.getComponentType();
    }
    String baseName = c.getName();
    int index = baseName.lastIndexOf('.');
    if (index != -1) {
      name = baseName.substring(0, index).replace('.', '/') + "/" + name;
    }
  } else {
    name = name.substring(1);
  }
  return name;
}

Using Methods of java.lang.ClassLoader

The ClassLoader class has two sets of methods to access resources. One set returns an InputStream for the resource. The other set returns a URL. The methods that return an InputStream are easier to use and will satisfy many needs, while the methods that return URLs provide access to more complex information, such as an Image and an AudioClip.

The ClassLoadermanges resources similarly to the way it manages classes. A ClassLoader controls how to map the name of a resource to its content. ClassLoader also provides methods for accessing system resources, analogous to the system classes. The Class class provides some convenience methods that delegate functionality to the ClassLoader methods.

Many Java programs will access these methods indirectly through the I18N (localization) APIs. Others will access it through methods in Class. A few will directly invoke the ClassLoader methods.

The methods in ClassLoader use the given String as the name of the resource without applying any absolute/relative transformation (see the methods in Class). The name should not have a leading "/".

System resources are those that are handled by the host implemenation directly. For example, they may be located in the CLASSPATH.

The name of a resource is a "/"-separated sequence of identifiers. The Class class provides convenience methods for accessing resources; the methods implement a convention where the package name is prefixed to the short name of the resource.

Resources can be accessed as an InputStream, or a URL.

The getSystemResourceAsStream method returns an InputStream for the specified system resource or null if it does not find the resource. The resource name may be any system resource.

The getSystemResource method finds a system resource with the specified name. It returns a URL to the resource or null if it does not find the resource. Calling java.net.URL.getContent() with the URL will return an object such as ImageProducer, AudioClip, or InputStream.

The getResourceAsStream method returns an InputStream for the specified resource or null if it does not find the resource.

The getResource method finds a resource with the specified name. It returns a URL to the resource or null if it does not find the resource. Calling java.net.URL.getContent() with the URL will return an object such as ImageProducer, AudioClip, or InputStream.

Security

Since getResource() provides access to information, it must have well-defined and well-founded security rules. If security considerations do not allow a resource to be visible in some security context, the getResource() method will fail (return null) as if the resource were not present at all, this addresses existence attacks.

Class loaders may not provide access to the contents of a .class file for both security and performance reasons. Whether it is possible to obtain a URL for a .class file depends on the specifics, as shown below.

There are no specified security issues or restrictions regarding resources that are found by a non-system class loader. AppletClassLoader provides access to information that is loaded from a source location, either individually, or in a group through a JAR file; thus AppletClassLoader should apply the same checkConnect() rules when dealing with URLs through getResource().

The system ClassLoader provides access to information in the CLASSPATH. A CLASSPATH may contain directories and JAR files. Since a JAR file is created intentionally, it has a different significance than a directory where things may end up in a more casual manner. In particular, we are more strict on getting information out of a directory than out from a JAR file.

If a resource is in a directory:

  • getResource() invocations will use File.exists() to determine whether to make the corresponding file visible to the user. Recall that File.exists() uses the checkRead() method in the security manager.
  • the same applies to getResourceAsStream().

If the resource is in a JAR file:

  • getResource() invocations will succeed for all files, regardless of whether the invocation is done from within a system or a non-system class.
  • getResourceAsStream() invocations will succeed for non .class resources, and so will for java.net.URL.getContent() on corresponding URLs.

Examples

This section provides two examples of client code. The first example uses "absolute resource" names and traditional mechanisms to get a Class object.

package pkg;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;

class Test {

  private static final String absName = "/pkg/mumble.baf";

  public static void test1() {
    Class c=null;
    try {
      c = Class.forName("pkg.Test");
    } catch (Exception ex) {
      // This should not happen.
    }
    InputStream s = c.getResourceAsStream(absName);
    // do something with it.
  }

  public void test2() {
    InputStream s = this.getClass().getResourceAsStream(absName);
  // do something with it.
  }
}

This example uses "relative resource" names and the mechanism available from the compiler through the -experimental flag, to get a Class object.

package pkg;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;

class Test {
  private static final String relName = "mumble.baf";
  public static void test1() {
  InputStream s = Test.class.getResourceAsStream(relName);
  // do something with it.
}

  public void test2() {
    InputStream s = Test.class.getResourceAsStream(relName);
    // do something with it.
  }

API References

  • java.lang.Class
  • java.lang.ClassLoader
  • java.net.URLClassLoader
  • java.util.ResourceBundle
  • java.lang.SecurityManager
  • java.security
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Chained Exception Facility

It is common for Java code to catch one exception and throw another:

try {
    ...
} catch(YourException e) {
    throw new MyException();
}

Unfortunately, the information contained in the "causative exception" (YourException in the example above) is generally lost, which greatly complicates debugging. Recognizing this problem, developers sometimes build ad hoc mechanisms to allow certain "wrapped exceptions" to contain a second exception. An accessor is generally provided to extract the contained exception. Such mechanisms are sometimes known as "exception chaining facilities", as they allow arbitrary chains of exceptions to be constructed when contained exceptions are, themselves, wrapped exceptions.

There are many advantages to unifying all of these facilities. Chief among them are: (1) We guarantee that anyone who wants to record the fact that one exception caused another can do so, regardless of what the exceptions are. (2) By providing a common API to record the fact that one exception caused another, we ease this task, making it more likely that programmers will take the trouble to do it. (3) By providing a common API to access causative exceptions, we greatly increase the likelihood that this information will be made available to those who need it. In fact, the proposed mechanism prints entire "causal chain" as part of the standard stack backtrace, ensuring that preexisting programs will provide this information with no additional effort on the part of their authors.

To address these issues, we have added two new methods to Throwable, getCause() and initCause(Throwable), and two new constructors, Throwable(Throwable) and Throwable(String, Throwable). Other "general purpose" exception classes (like Exception, RunTimeException and Error) have been similarly outfitted with (Throwable) and (String, Throwable) constructors. However, even exceptions without such constructors will be usable as "wrapped exceptions" via the initCause method.

The implementation of Throwable.printStackTrace has been modified to display backtraces for the entire causal chain of exceptions. New method getStackTrace provides programmatic access to the stack trace information provided by printStackTrace.

All of the platform's wrapped exceptions will be retrofitted to support the new facility (in addition to their legacy APIs).

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Design of Shutdown Hooks API

Documentation Contents

Design of the Shutdown Hooks API

The following Q&A addresses some of the design issues of the Shutdown Hooks API.

Why don't you provide information as to why the VM is shutting down?

On some platforms a native process can't distinguish a shutdown due to exit from a shutdown due to termination. Other platforms provide much richer capabilities, in some cases including notification of system suspension and restart or of imminent power failure. In short, it's impossible to generalize such information in a portable way.

Will shutdown hooks be run if the VM crashes?

If the VM crashes due to an error in native code then no guarantee can be made about whether or not the hooks will be run.

Why are shutdown hooks run concurrently? Wouldn't it make more sense to run them in reverse order of registration?

Invoking shutdown hooks in their reverse order of registration is certainly intuitive, and is in fact how the C runtime library's atexit procedure works. This technique really only makes sense, however, in a single-threaded system. In a multi-threaded system such as Java platform the order in which hooks are registered is in general undetermined and therefore implies nothing about which hooks ought to be run before which other hooks. Invoking hooks in any particular sequential order also increases the possibility of deadlocks. Note that if a particular subsystem needs to invoke shutdown actions in a particular order then it is free to synchronize them internally.

Why are hooks just threads, and unstarted ones at that? Wouldn't it be simpler to use Runnable objects, or Beans-style event and listener patterns?

The approach taken here has two advantages over the more obvious, and more frequently suggested, callback-oriented designs based upon Runnable objects or Beans-style event listeners.

First, it gives the user complete control over the thread upon which a shutdown action is executed. The thread can be created in the proper thread group, given the correct priority, context, and privileges, and so forth.

Second, it simplifies both the specification and the implementation by isolating the VM from the hooks themselves. If shutdown actions were executed as callbacks then a robust implementation would wind up having to create a separate thread for each hook anyway in order for them to run concurrently. The specification would also have to include explicit language about how the threads that execute the callbacks are created.

Aren't threads pretty expensive things to keep around, especially if they won't be started until the VM shuts down?

Most implementations of the Java platform don't actually allocate resources to a thread until it's started, so maintaining a set of unstarted threads is actually very cheap. If you look at the internals of java.lang.Thread you can see that its various constructors just do security checks and initialize private fields. The native start() method does the real work of allocating a thread stack, etc., to get things going.

What about Personal and Embedded Java? Won't starting threads during shutdown be too expensive on those platforms?

This API may not be suitable for the smaller Java platforms. Threads in the Java 2 Platform carry more information than threads in JDK 1.1 and p/eJava. A thread has a class loader, it may have some inherited thread-local variables, and, in the case of GUI apps, it may be associated with a specific application context. Threads will come to carry even more information as the platform evolves; for example, the security team is planning to introduce a notion of per-thread user identity in their upcoming authentication framework.

Because of all this contextual information, shutdown hooks would be harder to write and maintain if they were just Runnable objects or Beans-style event listeners. Suppose that a Runnable shutdown hook, or an equivalent event listener, needed a specific bit of thread-contextual information in order to carry out its operations. Such information could be saved in some shared location before the hook is registered. While this is merely awkward, suppose further that threads acquire some new type of contextual information in a future release. If an operation invoked by the hook also evolves to need that information then the code that registers the hook would have to be amended to save that information as well. Making hooks be threads instead of Runnables or event listeners insulates them from this sort of future change.

Okay, but won't I have to write a lot of code just to register a simple shutdown hook?

No. Simple shutdown hooks can often be written as anonymous inner classes, as in this example:
Runtime.getRuntime().addShutdownHook(new Thread() {
    public void run() { database.close(); }
});
This idiom is fine as long as you'll never need to cancel the hook, in which case you'd need to save a reference to the hook when you create it.

What about security? Can an untrusted applet register a shutdown hook?

If there is a security manager installed then the addShutdownHook and removeShutdownHook methods check that the caller's security context permits RuntimePermission("shutdownHooks"). An untrusted applet will not have this permission, and will therefore not be able to register or de-register a shutdown hook.

What happens if a shutdown hook throws an exception and the exception is not caught?

Uncaught exceptions are handled in shutdown hooks just as in any other thread, by invoking the uncaughtException method of the thread's ThreadGroup object. The default implementation of this method prints the exception's stack trace to System.err and terminates the thread. Note that uncaught exceptions do not cause the VM to exit; this happens only when all non-daemon threads have finished or when the Runtime.exit method is invoked.

Why did you add the Runtime.halt method? Isn't it pretty dangerous?

The halt method is certainly powerful, and it should be used with the utmost caution. It's provided so that applications can insulate themselves from shutdown hooks that deadlock or run for inordinate amounts of time. It also allows applications to force a quick exit in situations where that is necessary.

What happens if finalization-on-exit is enabled? Will finalizers be run before, during, or after shutdown hooks?

Finalization-on-exit processing is done after all shutdown hooks have finished. Otherwise a hook may fail if some live objects are finalized prematurely.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in java.lang and java.util.*

Documentation Contents

Enhancements in Packages java.lang.* and java.util.*

The following topics are covered:

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Enhancements in Java SE 1.3

Enhancements in Java SE 8

Parallel Array Sorting

The Parallel Array Sorting feature adds the same set of sorting operations currently provided by the Arrays class, but with a parallel implementation that utilizes the Fork/Join framework. Additional utility methods were added to java.util.Arrays that use the JSR 166 Fork/Join parallelism common pool to provide sorting of arrays in parallel. The methods are called parallelSort() and are overloaded for all the primitive data types and Comparable objects. See JEP 103 for more details.

The new methods are mentioned in the Java Tutorials (see Arrays and Fork/Join).

Standard Encoding and Decoding Base64

Applications that use base64 encoding schemes include Multipurpose Internet Mail Extensions (MIME) and encode passwords for HTTP headers. These applications encode and decode textual data. A new API for base64 encoding and decoding has been introduced in the java.util package. The Base64 class defines factory methods to get Encoder and Decoder instances that encode and decode base64 data. Base64Sample and Base64Sample2 are code samples that demonstrate the Base64 class. See JEP 135: Base64 Encoding and Decoding for more details.

Unsigned Arithmetic Support

Methods were added to the Java Libraries to support unsigned integer arithmetic. Integers are 32-bits numbers out of which 1 bit is reserved for the sign but using these unsigned methods one can use all the 32 bits. Static methods such as parseUnsignedLong, toUnsignedString, divideUnsigned, compareUnsigned were added to the Long class and methods such as divideUnsigned, compareUnsigned, parseUnsignedInt, remainderUnsigned, toUnsignedString were added to the Integer class. These methods are faster than using the BigDecimal and BigInteger for arithmetic opearations as these include optimizations of primitive datatypes.

Other issues in Java SE 8

Area: Core Libraries / java.lang.reflect
Synopsis: The java.lang.reflect.Proxy(InvocationHandler h) constructor now throws a NullPointerException if the given InvocationHandler parameter is null.
Nature of Incompatibility: behavioral
Description: Existing code that constructs a dynamic proxy instance with a null argument will now get NullPointerException. Such usage is expected to rarely exist since a null proxy instance has no use and will throw a NullPointerException when its method is invoked anyway.
RFE: 4487672.

Enhancements in Java SE 7

  • Multithreaded Custom Class Loaders in Java SE 7 - Potential deadlocks were eliminated for multithreaded, non-hierarchically delegating custom class loaders.

In addition, the following enhancements are introduced:

Area: API: Language
Standard/Platform: Java SE 7
Synopsis: Class loading can be prone to deadlocks if custom class loaders do not adhere to an acyclic class loader delegation model. New APIs have been added to the java.lang.ClassLoader class to support parallel loading of classes and finer-grained locking mechanism for class loading operations. Custom class loaders which would like to leverage this functionality must refer to the Class Loader API Modifications for Deadlock Fix documentation for the suggested model and requirements and be implemented accordingly.

Area: API: Language
Standard/Platform: JDK 7
Synopsis: Previously, the two exception types in the javax.lang.model.type package, MirroredTypeException and MirroredTypesException, were unrelated. In the javac implementation, MirroredTypeException was thrown where MirroredTypesException should have been thrown. In part to address this problem, MirroredTypeException was made a subclass of MirroredTypesException. This change is binary compatible and generally preserves the behavior of existing annotation processors. However, it is possible this change may cause source incompatibilities for client programs; in those cases, changing the order of catch clauses should allow the programs to compile again.

Area: API: Language
Standard/Platform: JDK 7
Synopsis: To model the language changes in this release, several updates were made to javax.lang.model.* including adding a method to the javax.lang.model.type.TypeVisitor interface. Such an addition is source incompatible with libraries that have directly implemented the TypeVisitor interface. However, such additions were foreseen as part of this API's evolution and libraries were explicitly cautioned to extend one of the utility visitors instead of directly implementing such an interface.
RFE: 6933147

Area: API: Language
Standard/Platform: JDK 7
Synopsis: The method Runtime.exec(String command, String[] envp, File dir) breaks the command string into tokens, consisting of the name of the executable and its arguments, by the invocation new StringTokenizer(command) with the default delimiter set (the space character, the tab character, the newline character, the carriage-return character, and the form-feed character). Essentially, this method splits the command string into tokens, using white space as the delimiter.

On Windows operating systems, splitting the command parameter by white spaces can lead to errors. In particular, if the command parameter contains an executable path with spaces, the invocation new StringTokenizer(command) extracts the wrong executable name. For example, the invocation Runtime.getRuntime().exec("C:\\My Programs\\foo.exe bar") attempts to launch the program C:\My with the arguments Programs\foo.exe and bar. This invocation is likely to fail with an exception to indicate that the executable C:\My cannot be found.

If your legacy application is not using a security manager (see the class SecurityManager), you can specify the system property jdk.lang.Process.allowAmbigousCommands with any value other than false so that the method Runtime.exec correctly parses path names with spaces. (See System Properties in The Java Tutorials.) Alternatively, you can surround the path name with quotation marks. For example, the invocation Runtime.getRuntime().exec("\"C:\\My Programs\\foo.exe\" bar") attempts to launch C:\My Programs\foo.exe with the argument bar.

Note: For updates after Update 25, the name of the system property to allow ambiguous commands is jdk.lang.Process.allowAmbiguousCommands.

Area: API: Utilities
Standard/Platform: JDK 7
Synopsis: Due to an error in java.util.TreeMap, it was previously possible to insert invalid null elements and elements not implementing Comparable into empty TreeMaps and TreeSets. Only a single invalid element could be inserted into the empty TreeMaps or TreeSets; additional elements would cause the expected NullPointerException or ClassCastException. Most other operations upon the collection would also fail. As of JDK 7, inserting an invalid null element or an element not implementing Comparable into an empty TreeMap or TreeSet throws a NullPointerException. RFE: 5045147

Enhancements in Java SE 6

java.util

  • ServiceLoader - A facility to load a specific implementation of a service.
  • Collections Framework Enhancements - There are many enhancements to the Collections framework.

Enhancements in Java SE 5.0

java.lang

  • ProcessBuilder - The new ProcessBuilder class provides a more convenient way to invoke subprocesses than does Runtime.exec. In particular, ProcessBuilder makes it easy to start a subprocess with a modified process environment (that is, one based on the parent's process environment, but with a few changes).
  • Threads - The java.lang.Thread class has the following enhancements:
    • Thread priority handling has changed.
    • Thread.State enum class and the new getState() API are provided for querying the execution state of a thread.
    • The new thread dump API - The getStackTrace and getAllStackTraces methods in the Thread class - provides a programmatic way to obtain the stack trace of a thread or all threads.
    • The uncaughtExceptionHandler mechanism, previously available only through the ThreadGroup class, is now available directly through the Thread class.
    • A new form of the sleep() method is provided which allows for sleep times smaller than one millisecond.

java.lang.instrument

  • Instrumentation - The new java.lang.instrument package provides services that allow Java programming agents to instrument programs running on the Java virtual machine by modifying methods' bytecodes at runtime.

java.util

  • Formatter - An interpreter for printf-style format strings, the Formatter class provides support for layout justification and alignment, common formats for numeric, string, and date/time data, and locale-specific output. Common Java types such as byte, java.math.BigDecimal , and java.util.Calendar are supported. Limited formatting customization for arbitrary user types is provided through the java.util.Formattable interface.
  • Scanner - The java.util.Scanner class can be used to convert text into primitives or Strings. Since it is based on the java.util.regex package, it also offers a way to conduct regular expression based searches on streams, file data, strings, or implementors of the Readable interface.
  • Collections Framework Enhancements - There are many enhancements to the Collections framework.

Enhancements in Java SE 1.4

java.lang

  • Chained Exception Facility - This is a new facility that provides a common API to record the fact that one exception caused another, to access causative exceptions, and to acess the entire "causal chain" as part of the standard stack backtrace, ensuring that preexisting programs will provide this information with no additional effort on the part of their authors.
  • String - Two split methods are new. The subSequence method has been added, as required by the CharSequence interface that String now implements. Three additional methods have been added: matches, replaceAll, and replaceFirst.
  • StringBuffer - The subSequence method has been added, as required by the CharSequence interface that StringBuffer now implements.
  • Thread - The interrupt method has been revised to interrupt threads blocked in channel-I/O operations.

java.util.logging

  • Logging API - The Java Logging API facilitates software servicing and maintenance at customer sites by producing log reports suitable for analysis by end users, system administrators, field service engineers, and software development teams. The Logging APIs capture information such as security failures, configuration errors, performance bottlenecks, and/or bugs in the application or platform. The core package includes support for delivering plain text or XML formatted log records to memory, output streams, consoles, files, and sockets. In addition, the logging APIs are capable of interacting with logging services that already exist on the host operating system.

java.util.prefs

  • Preferences API - The preferences API, implemented by package java.util.prefs, allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store. The Preferences API is intended to replace most common uses of class java.util.Properties, rectifying many of its deficiencies, while retaining its light weight.

Enhancements in Java SE 1.3

java.lang

  • java.lang.Math and java.lang.StrictMath - Two new classes which provide APIs for performing general numeric operations.
    • java.lang.StrictMath - Class java.lang.StrictMath has the same API as old class java.lang.Math, which was present in previous versions of the Java platform. Unlike class Math, however, StrictMath is defined to return bit-for-bit reproducible results in all implementations.
    • java.lang.Math - Class java.lang.Math provides the same set of API as does class StrictMath. However, unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results, but can vary within specified constraints. This permits better-performing implementations where strict reproducibility is not required.
  • Timer API - Two new classes to provide an API for a timer facility which can be used for purposes such as animations, human interaction timeouts, on-screen clocks and calendars, work-scheduling routines, reminder facilities, and more.
    • java.util.Timer
    • java.util.TimerTask
    Countdown.java is a simple demo application that uses the Timer API.
  • Virtual Machine Shutdown Hooks Sophisticated applications often require the ability to perform specific actions when the virtual machine shuts down, whether due to voluntary exit or involuntary termination. Typical actions include cleanly closing down network connections, saving session state, and deleting temporary files. Every major operating system provides the means for native applications to do this, though of course the details vary from platform to platform. Three methods have been added to java.lang.Runtime to provide a simple and portable interface to these facitilies. The new methods are:
    • addShutdownHook
    • removeShutdownHook
    • halt
    In addition, the Runtime.exit method has been revised. For more information, see Design of the Shutdown Hooks API.

java.util

  • Enhanced Collections Framework - The Collections Framework has these new convenience APIs:
    • Added Collections.singletonList and Collections.singletonMap. Previously, there was a convenience implementation for singleton Set, but no corresponding implementation for List and Map. Both of these implementations proved desirable in practice.
    • Added Collections.EMPTY_MAP. Previously, there were constant convenience implementations for the empty Set and List, but no corresponding implementation for Map.
    The following special-purpose implementation has also been added:
    • Added Map constuctor for WeakHashMap. The Map interface dictates that most Map implementations should have a "copy constructor" that takes a Map argument. WeakHashMap lacked such a constructor in the 1.2 release.

java.util.jar
java.util.zip

  • New URL JAR File Caching - The API of classes java.util.zip and java.util.jar have been enhanced with the addition of the following:
    • java.util.zip.OPEN_READ
    • java.util.zip.OPEN_DELETE
    • java.util.zip.ZipFile(File file, int mode)
    • java.util.jar.JarFile(File file, boolean verify, int mode)

    The previous implementation of caching downloaded Jar files created problems for long-running server application and for RMI. Each open JarURLConnection creates a temporary local file that holds Jar-file date, and a JarFile object is created on top of the temporary file. Because the open file handle/descriptor on each temporary file was never closed, the files could quickly take up disk space for long-running server applications. The new API provides a solution for this problem by supporting a new "delete-on-close" mode for opening Zip and Jar files.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Multithreaded Custom Class Loaders in Java

The Java SE 7 release contains an important enhancement for multithreaded custom class loaders. In previous releases, certain types of custom class loaders were prone to deadlock. The Java SE 7 release modifies the locking mechanism to avoid deadlock.

Background

The function of a java.lang.ClassLoader is to locate the bytecode for a particular class, then transform that bytecode into a usable class in the runtime system. The runtime system provides class loaders that can locate bootstrap classes, extension classes, and user classes. The CLASSPATH environment variable is one way to indicate to the runtime system where the bytecode is located.

Knowing about the CLASSPATH environment variable is all you may need to know about class loading. In some specific situations, however, customizing the behavior of a class loader by creating your own subclass may be necessary.

Custom class loaders will not run into deadlocks if they adhere to an acyclic class loader delegation model. Acyclic delegation is what the architects of ClassLoader envisioned. In this model, every class loader has a parent (delegate). When a class is requested, the class loader first checks if the class was loaded previously. If the class is not found, the class loader asks its parent to locate the class. If the parent cannot find the class, the class loader attempts to locate the class itself.

Deadlock Scenario

In earlier releases of the Java platform, multithreaded custom class loaders could deadlock when they did not have an acyclic delegation model. Here is one example:

Class Hierarchy:
  class A extends B
  class C extends D

ClassLoader Delegation Hierarchy:

Custom Classloader CL1:
  directly loads class A
  delegates to custom ClassLoader CL2 for class B

Custom Classloader CL2:
  directly loads class C
  delegates to custom ClassLoader CL1 for class D

Thread 1:
  Use CL1 to load class A (locks CL1)
    defineClass A triggers
      loadClass B (try to lock CL2)

Thread 2:
  Use CL2 to load class C (locks CL2)
    defineClass C triggers
      loadClass D (try to lock CL1)

Synchronization in the ClassLoader class was previously heavy-handed, or in technical terms, not sufficiently granular. A request to load a class synchronized on the entire ClassLoader object, which made it prone to deadlock.

Class Loader Synchronization in the Java SE 7 Release

The Java SE 7 release includes the concept of a parallel capable class loader. Loading a class by a parallel capable class loader now synchronizes on the pair consisting of the class loader and the class name.

In the previous scenario, using the Java SE 7 release, the threads are no longer deadlocked, and all classes are loaded successfully:

Thread 1:
  Use CL1 to load class A (locks CL1+A)
    defineClass A triggers
      loadClass B (locks CL2+B)

Thread 2:
  Use CL2 to load class C (locks CL2+C)
    defineClass C triggers
      loadClass D (locks CL1+D)

Recommendations for Multithreaded Custom Class Loaders

Custom class loaders that do not have a history of deadlocks do not require any changes. In particular, you do not need to change custom class loaders that follow the recommended acyclic hierarchical delegation model, that is, delegating first to their parent class. For backward compatibility, the Java SE 7 release continues to lock a class loader object unless it registers as parallel capable.

To create new custom class loaders, the process is similar in the Java SE 7 release as in previous releases. Create a subclass of ClassLoader, then override the findClass() method and possibly loadClass(). Overriding loadClass() makes your life more difficult, but it is the only way to use a different delegation model.

If you have a custom class loader with a risk of deadlocking, with the Java SE 7 release, you can avoid deadlocks by following these rules:

  1. Ensure that your custom class loader is multithread safe for concurrent class loading.
    1. Decide upon an internal locking scheme. For example, java.lang.ClassLoader uses a locking scheme based on the requested class name.
    2. Remove all synchronization on the class loader object lock alone.
    3. Ensure that critical sections are safe for multiple threads loading different classes.
  2. In your custom class loader's static initializer, invoke java.lang.ClassLoader's static method registerAsParallelCapable(). This registration indicates that all instances of your custom class loader are multithread safe.
  3. Check that all class loader classes that this custom class loader extends also invoke the registerAsParallelCapable() method in their class initializers. Ensure that they are multithread safe for concurrent class loading.

If your custom class loader overrides only findClass(String), you do not need further changes. This is the recommended mechanism to create a custom class loader.

If your custom class loader overrides either the protected loadClass(String, boolean) method or the public loadClass(String) method, you must also ensure that the protected defineClass() method is called only once for each class loader and class name pair.

Troubleshooting

If your product ships and appears to have problems due to incomplete handling of critical sections, you can use a new VM flag -XX:+AlwaysLockClassLoader. This flag reverts to locking the class loader lock before invoking your custom class loader's findClass() or loadClass() method, even for class loaders that register as parallel capable.

References

Class Loader API Modifications for Deadlock Fix at OpenJDK

Bug Database Bug 4670071 Detail

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The java.lang and java.util Packages

Documentation Contents

The java.lang.* and java.util.* Packages

The java.lang and java.util packages provide basic functionality that is used by almost all applications. Other packages with names that begin with java.lang and java.util provide supplemental APIs for specific features.

Tutorials and Programmer's Guides

  • The Java Tutorial

API Enhancements

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Enhancements in Java SE 1.3

Package List

Package | Enhancements | More Information
java.lang Provides classes that are fundamental to the design of the Java programming language such as String, Math, and basic runtime support for threads and processes. Java SE 5.0,
Java SE 1.4, and
Java SE 1.3
  • Package Version Identification
  • Location-Independent Access to Resources
  • Chained Exception Facility
java.lang.annotation Provides library support for the Java programming language annotation facility. New in Java SE 5.0
  • Using Annotations
java.lang.instrument Provides services that allow Java programming language agents to instrument programs running on the JVM. Java SE 6 and
Java SE 5.0
  • Instrumenting Applications
java.lang.management Provides the management interface for monitoring and management of the JVM as well as the operating system on which the JVM is running. Java SE 6
  • Monitoring and Management
java.lang.ref Provides reference-object classes, which support a limited degree of interaction with the garbage collector. | New in Java SE 1.3 | No additional information
java.lang.reflect Provides classes and interfaces for obtaining reflective information about classes and objects. Java SE 6,
Java SE 5.0, and
Java SE 1.4
  • Reflection APIs
java.util Provides the collections framework, formatted printing and scanning, array manipulation utilities, event model, date and time facilities, internationalization, and miscellaneous utility classes. Java SE 6,
Java SE 5.0, and
Java SE 1.3
  • Collections Framework
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks Provides utility classes used in concurrent programming, including support for atomic updates of single variables and a locking framework which supplements language-level synchronization. 		New in Java SE 5.0
  • Concurrency Utilities
java.util.jar
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats as well as the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. 		Java SE 6 and
Java SE 1.3
  • Java Archive (JAR) Files
java.util.logging Provides support to maintain and service software at customer sites. Java SE 5.0 and
Java SE 1.4
  • Java Logging APIs
java.util.regex Provides classes for matching character sequences against patterns specified by regular expressions. New in Java SE 1.4
  • Regular Expressions Tutorial
java.util.prefs Provides classes to store and retrieve user and system preference and configuration data. Java SE 1.4
  • Preferences API
java.util.spi Service provider classes for the java.util package. | New in Java SE 6 | No additional information
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Annotations

Many APIs require a fair amount of boilerplate code. For example, in order to write a JAX-RPC web service, you must provide a paired interface and implementation. This boilerplate could be generated automatically by a tool if the program were “decorated” with annotations indicating which methods were remotely accessible.

Other APIs require “side files” to be maintained in parallel with programs. For example JavaBeans requires a BeanInfo class to be maintained in parallel with a bean, and Enterprise JavaBeans (EJB) requires a deployment descriptor. It would be more convenient and less error-prone if the information in these side files were maintained as annotations in the program itself.

The Java platform has always had various ad hoc annotation mechanisms. For example the transient modifier is an ad hoc annotation indicating that a field should be ignored by the serialization subsystem, and the @deprecated javadoc tag is an ad hoc annotation indicating that the method should no longer be used. The platform has a general purpose annotation (also known as metadata) facility that permits you to define and use your own annotation types. The facility consists of a syntax for declaring annotation types, a syntax for annotating declarations, APIs for reading annotations, a class file representation for annotations, and annotation processing support provided by the javac tool.

Annotations do not directly affect program semantics, but they do affect the way programs are treated by tools and libraries, which can in turn affect the semantics of the running program. Annotations can be read from source files, class files, or reflectively at run time.

Annotations complement javadoc tags. In general, if the markup is intended to affect or produce documentation, it should probably be a javadoc tag; otherwise, it should be an annotation.

Typical application programmers will never have to define an annotation type, but it is not hard to do so. Annotation type declarations are similar to normal interface declarations. An at-sign (@) precedes the interface keyword. Each method declaration defines an element of the annotation type. Method declarations must not have any parameters or a throws clause. Return types are restricted to primitives, String, Class, enums, annotations, and arrays of the preceding types. Methods can have default values. Here is an example annotation type declaration:

/**
 * Describes the Request-For-Enhancement(RFE) that led
 * to the presence of the annotated API element.
 */
public @interface RequestForEnhancement {
    int    id();
    String synopsis();
    String engineer() default "[unassigned]";
    String date()    default "[unimplemented]";
}

Once an annotation type is defined, you can use it to annotate declarations. An annotation is a special kind of modifier, and can be used anywhere that other modifiers (such as public, static, or final) can be used. By convention, annotations precede other modifiers. Annotations consist of an at-sign (@) followed by an annotation type and a parenthesized list of element-value pairs. The values must be compile-time constants. Here is a method declaration with an annotation corresponding to the annotation type declared above:

@RequestForEnhancement(
    id       = 2868724,
    synopsis = "Enable time-travel",
    engineer = "Mr. Peabody",
    date     = "4/1/3007"
)
public static void travelThroughTime(Date destination) { ... }

An annotation type with no elements is termed a marker annotation type, for example:

/**
 * Indicates that the specification of the annotated API element
 * is preliminary and subject to change.
 */
public @interface Preliminary { }

It is permissible to omit the parentheses in marker annotations, as shown below:

@Preliminary public class TimeTravel { ... }

In annotations with a single element, the element should be named value, as shown below:

/**
 * Associates a copyright notice with the annotated API element.
 */
public @interface Copyright {
    String value();
}

It is permissible to omit the element name and equals sign (=) in a single-element annotation whose element name is value, as shown below:

@Copyright("2002 Yoyodyne Propulsion Systems")
public class OscillationOverthruster { ... }

To tie it all together, we'll build a simple annotation-based test framework. First we need a marker annotation type to indicate that a method is a test method, and should be run by the testing tool:

import java.lang.annotation.*;

/**
 * Indicates that the annotated method is a test method.
 * This annotation should be used only on parameterless static methods.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Test { }

Note that the annotation type declaration is itself annotated. Such annotations are called meta-annotations. The first (@Retention(RetentionPolicy.RUNTIME)) indicates that annotations with this type are to be retained by the VM so they can be read reflectively at run-time. The second (@Target(ElementType.METHOD)) indicates that this annotation type can be used to annotate only method declarations.

Here is a sample program, some of whose methods are annotated with the above interface:

public class Foo {
    @Test public static void m1() { }
    public static void m2() { }
    @Test public static void m3() {
        throw new RuntimeException("Boom");
    }
    public static void m4() { }
    @Test public static void m5() { }
    public static void m6() { }
    @Test public static void m7() {
        throw new RuntimeException("Crash");
    }
    public static void m8() { }
}

Here is the testing tool:

import java.lang.reflect.*;

public class RunTests {
   public static void main(String[] args) throws Exception {
      int passed = 0, failed = 0;
      for (Method m : Class.forName(args[0]).getMethods()) {
         if (m.isAnnotationPresent(Test.class)) {
            try {
               m.invoke(null);
               passed++;
            } catch (Throwable ex) {
               System.out.printf("Test %s failed: %s %n", m, ex.getCause());
               failed++;
            }
         }
      }
      System.out.printf("Passed: %d, Failed %d%n", passed, failed);
   }
}

The tool takes a class name as a command line argument and iterates over all the methods of the named class attempting to invoke each method that is annotated with the Test annotation type (defined above). The reflective query to find out if a method has a Test annotation is highlighted in green. If a test method invocation throws an exception, the test is deemed to have failed, and a failure report is printed. Finally, a summary is printed showing the number of tests that passed and failed. Here is how it looks when you run the testing tool on the Foo program (above):

$ java RunTests Foo
Test public static void Foo.m3() failed: java.lang.RuntimeException: Boom
Test public static void Foo.m7() failed: java.lang.RuntimeException: Crash
Passed: 2, Failed 2
While this testing tool is clearly a toy, it demonstrates the power of annotations and could easily be extended to overcome its limitations.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Autoboxing

As any Java programmer knows, you can't put an int (or other primitive value) into a collection. Collections can only hold object references, so you have to box primitive values into the appropriate wrapper class (which is Integer in the case of int). When you take the object out of the collection, you get the Integer that you put in; if you need an int, you must unbox the Integer using the intValue method. All of this boxing and unboxing is a pain, and clutters up your code. The autoboxing and unboxing feature automates the process, eliminating the pain and the clutter.

The following example illustrates autoboxing and unboxing, along with generics and the for-each loop. In a mere ten lines of code, it computes and prints an alphabetized frequency table of the words appearing on the command line.

import java.util.*;

// Prints a frequency table of the words on the command line
public class Frequency {
   public static void main(String[] args) {
      Map<String, Integer> m = new TreeMap<String, Integer>();
      for (String word : args) {
          Integer freq = m.get(word);
          m.put(word, (freq == null ? 1 : freq + 1));
      }
      System.out.println(m);
   }
}

java Frequency if it is to be it is up to me to do the watusi
{be=1, do=1, if=1, is=2, it=2, me=1, the=1, to=3, up=1, watusi=1}

The program first declares a map from String to Integer, associating the number of times a word occurs on the command line with the word. Then it iterates over each word on the command line. For each word, it looks up the word in the map. Then it puts a revised entry for the word into the map. The line that does this (highlighted in green) contains both autoboxing and unboxing. To compute the new value to associate with the word, first it looks at the current value (freq). If it is null, this is the first occurrence of the word, so it puts 1 into the map. Otherwise, it adds 1 to the number of prior occurrences and puts that value into the map. But of course you cannot put an int into a map, nor can you add one to an Integer. What is really happening is this: In order to add 1 to freq, it is automatically unboxed, resulting in an expression of type int. Since both of the alternative expressions in the conditional expression are of type int, so too is the conditional expression itself. In order to put this int value into the map, it is automatically boxed into an Integer.

The result of all this magic is that you can largely ignore the distinction between int and Integer, with a few caveats. An Integer expression can have a null value. If your program tries to autounbox null, it will throw a NullPointerException. The == operator performs reference identity comparisons on Integer expressions and value equality comparisons on int expressions. Finally, there are performance costs associated with boxing and unboxing, even if it is done automatically.

Here is another sample program featuring autoboxing and unboxing. It is a static factory that takes an int array and returns a List of Integer backed by the array. In a mere ten lines of code this method provides the full richness of the List interface atop an int array. All changes to the list write through to the array and vice-versa. The lines that use autoboxing or unboxing are highlighted in green:

// List adapter for primitive int array
public static List<Integer> asList(final int[] a) {
    return new AbstractList<Integer>() {
        public Integer get(int i) { return a[i]; }
        // Throws NullPointerException if val == null
        public Integer set(int i, Integer val) {
            Integer oldVal = a[i];
            a[i] = val;
            return oldVal;
        }
        public int size() { return a.length; }
    };
}

The performance of the resulting list is likely to be poor, as it boxes or unboxes on every get or set operation. It is plenty fast enough for occasional use, but it would be folly to use it in a performance critical inner loop.

So when should you use autoboxing and unboxing? Use them only when there is an "impedance mismatch" between reference types and primitives, for example, when you have to put numerical values into a collection. It is not appropriate to use autoboxing and unboxing for scientific computing, or other performance-sensitive numerical code. An Integer is not a substitute for an int; autoboxing and unboxing blur the distinction between primitive types and reference types, but they do not eliminate it.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Binary Literals

In Java SE 7, the integral types (byte, short, int, and long) can also be expressed using the binary number system. To specify a binary literal, add the prefix 0b or 0B to the number. The following examples show binary literals:

// An 8-bit 'byte' value:
byte aByte = (byte)0b00100001;

// A 16-bit 'short' value:
short aShort = (short)0b1010000101000101;

// Some 32-bit 'int' values:
int anInt1 = 0b10100001010001011010000101000101;
int anInt2 = 0b101;
int anInt3 = 0B101; // The B can be upper or lower case.

// A 64-bit 'long' value. Note the "L" suffix:
long aLong = 0b1010000101000101101000010100010110100001010001011010000101000101L;

Binary literals can make relationships among data more apparent than they would be in hexadecimal or octal. For example, each successive number in the following array is rotated by one bit:

public static final int[] phases = {
  0b00110001,
  0b01100010,
  0b11000100,
  0b10001001,
  0b00010011,
  0b00100110,
  0b01001100,
  0b10011000
}

In hexadecimal, the relationship among the numbers is not readily apparent:

public static final int[] phases = {
    0x31, 0x62, 0xC4, 0x89, 0x13, 0x26, 0x4C, 0x98
}

You can use binary integral constants in code that you can verify against a specifications document, such as a simulator for a hypothetical 8-bit microprocessor:

public State decodeInstruction(int instruction, State state) {
  if ((instruction & 0b11100000) == 0b00000000) {
    final int register = instruction & 0b00001111;
    switch (instruction & 0b11110000) {
      case 0b00000000: return state.nop();
      case 0b00010000: return state.copyAccumTo(register);
      case 0b00100000: return state.addToAccum(register);
      case 0b00110000: return state.subFromAccum(register);
      case 0b01000000: return state.multiplyAccumBy(register);
      case 0b01010000: return state.divideAccumBy(register);
      case 0b01100000: return state.setAccumFrom(register);
      case 0b01110000: return state.returnFromCall();
      default: throw new IllegalArgumentException();
    }
  } else {
    final int address = instruction & 0b00011111;
    switch (instruction & 0b11100000) {
      case 0b00100000: return state.jumpTo(address);
      case 0b01000000: return state.jumpIfAccumZeroTo(address);
      case 0b01000000: return state.jumpIfAccumNonzeroTo(address);
      case 0b01100000: return state.setAccumFromMemory(address);
      case 0b10100000: return state.writeAccumToMemory(address);
      case 0b11000000: return state.callTo(address);
      default: throw new IllegalArgumentException();
    }
  }
}

You can use binary literals to make a bitmap more readable:

public static final short[] HAPPY_FACE = {
   (short)0b0000011111100000;
   (short)0b0000100000010000;
   (short)0b0001000000001000;
   (short)0b0010000000000100;
   (short)0b0100000000000010;
   (short)0b1000011001100001;
   (short)0b1000011001100001;
   (short)0b1000000000000001;
   (short)0b1000000000000001;
   (short)0b1001000000001001;
   (short)0b1000100000010001;
   (short)0b0100011111100010;
   (short)0b0010000000000100;
   (short)0b0001000000001000;
   (short)0b0000100000010000;
   (short)0b0000011111100000;
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking

This page covers the following topics:

  • Handling More Than One Type of Exception
  • Rethrowing Exceptions with More Inclusive Type Checking

Handling More Than One Type of Exception

In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.

Consider the following example, which contains duplicate code in each of the catch blocks:

catch (IOException ex) {
     logger.log(ex);
     throw ex;
catch (SQLException ex) {
     logger.log(ex);
     throw ex;
}

In releases prior to Java SE 7, it is difficult to create a common method to eliminate the duplicated code because the variable ex has different types.

The following example, which is valid in Java SE 7 and later, eliminates the duplicated code:

catch (IOException|SQLException ex) {
    logger.log(ex);
    throw ex;
}

The catch clause specifies the types of exceptions that the block can handle, and each exception type is separated with a vertical bar (|).

Note: If a catch block handles more than one exception type, then the catch parameter is implicitly final. In this example, the catch parameter ex is final and therefore you cannot assign any values to it within the catch block.

Bytecode generated by compiling a catch block that handles multiple exception types will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each. A catch block that handles multiple exception types creates no duplication in the bytecode generated by the compiler; the bytecode has no replication of exception handlers.

Rethrowing Exceptions with More Inclusive Type Checking

The Java SE 7 compiler performs more precise analysis of rethrown exceptions than earlier releases of Java SE. This enables you to specify more specific exception types in the throws clause of a method declaration.

Consider the following example:

  static class FirstException extends Exception { }
  static class SecondException extends Exception { }

  public void rethrowException(String exceptionName) throws Exception {
    try {
      if (exceptionName.equals("First")) {
        throw new FirstException();
      } else {
        throw new SecondException();
      }
    } catch (Exception e) {
      throw e;
    }
  }

This examples's try block could throw either FirstException or SecondException. Suppose you want to specify these exception types in the throws clause of the rethrowException method declaration. In releases prior to Java SE 7, you cannot do so. Because the exception parameter of the catch clause, e, is type Exception, and the catch block rethrows the exception parameter e, you can only specify the exception type Exception in the throws clause of the rethrowException method declaration.

However, in Java SE 7, you can specify the exception types FirstException and SecondException in the throws clause in the rethrowException method declaration. The Java SE 7 compiler can determine that the exception thrown by the statement throw e must have come from the try block, and the only exceptions thrown by the try block can be FirstException and SecondException. Even though the exception parameter of the catch clause, e, is type Exception, the compiler can determine that it is an instance of either FirstException or SecondException:

  public void rethrowException(String exceptionName)
  throws FirstException, SecondException {
    try {
      // ...
    }
    catch (Exception e) {
      throw e;
    }
  }

This analysis is disabled if the catch parameter is assigned to another value in the catch block. However, if the catch parameter is assigned to another value, you must specify the exception type Exception in the throws clause of the method declaration.

In detail, in Java SE 7 and later, when you declare one or more exception types in a catch clause, and rethrow the exception handled by this catch block, the compiler verifies that the type of the rethrown exception meets the following conditions:

  • The try block is able to throw it.
  • There are no other preceding catch blocks that can handle it.
  • It is a subtype or supertype of one of the catch clause's exception parameters.

The Java SE 7 compiler allows you to specify the exception types FirstException and SecondException in the throws clause in the rethrowException method declaration because you can rethrow an exception that is a supertype of any of the types declared in the throws.

In releases prior to Java SE 7, you cannot throw an exception that is a supertype of one of the catch clause's exception parameters. A compiler from a release prior to Java SE 7 generates the error, "unreported exception Exception; must be caught or declared to be thrown" at the statement throw e. The compiler checks if the type of the exception thrown is assignable to any of the types declared in the throws clause of the rethrowException method declaration. However, the type of the catch parameter e is Exception, which is a supertype, not a subtype, of FirstException andSecondException.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enums

In prior releases, the standard way to represent an enumerated type was the int Enum pattern:
// int Enum Pattern - has severe problems!
public static final int SEASON_WINTER = 0;
public static final int SEASON_SPRING = 1;
public static final int SEASON_SUMMER = 2;
public static final int SEASON_FALL   = 3;
This pattern has many problems, such as:
  • Not typesafe - Since a season is just an int you can pass in any other int value where a season is required, or add two seasons together (which makes no sense).
  • No namespace - You must prefix constants of an int enum with a string (in this case SEASON_) to avoid collisions with other int enum types.
  • Brittleness - Because int enums are compile-time constants, they are compiled into clients that use them. If a new constant is added between two existing constants or the order is changed, clients must be recompiled. If they are not, they will still run, but their behavior will be undefined.
  • Printed values are uninformative - Because they are just ints, if you print one out all you get is a number, which tells you nothing about what it represents, or even what type it is.
It is possible to get around these problems by using the Typesafe Enum pattern (see Effective Java Item 21), but this pattern has its own problems: It is quite verbose, hence error prone, and its enum constants cannot be used in switch statements.

In 5.0, the Java™ programming language gets linguistic support for enumerated types. In their simplest form, these enums look just like their C, C++, and C# counterparts:

enum Season { WINTER, SPRING, SUMMER, FALL }

But appearances can be deceiving. Java programming language enums are far more powerful than their counterparts in other languages, which are little more than glorified integers. The new enum declaration defines a full-fledged class (dubbed an enum type). In addition to solving all the problems mentioned above, it allows you to add arbitrary methods and fields to an enum type, to implement arbitrary interfaces, and more. Enum types provide high-quality implementations of all the Object methods. They are Comparable and Serializable, and the serial form is designed to withstand arbitrary changes in the enum type.

Here is an example of a playing card class built atop a couple of simple enum types. The Card class is immutable, and only one instance of each Card is created, so it need not override equals or hashCode:

import java.util.*;

public class Card {
    public enum Rank { DEUCE, THREE, FOUR, FIVE, SIX,
        SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE }

    public enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }

    private final Rank rank;
    private final Suit suit;
    private Card(Rank rank, Suit suit) {
        this.rank = rank;
        this.suit = suit;
    }

    public Rank rank() { return rank; }
    public Suit suit() { return suit; }
    public String toString() { return rank + " of " + suit; }

    private static final List<Card> protoDeck = new ArrayList<Card>();

    // Initialize prototype deck
    static {
        for (Suit suit : Suit.values())
            for (Rank rank : Rank.values())
                protoDeck.add(new Card(rank, suit));
    }

    public static ArrayList<Card> newDeck() {
        return new ArrayList<Card>(protoDeck); // Return copy of prototype deck
    }
}
The toString method for Card takes advantage of the toString methods for Rank and Suit. Note that the Card class is short (about 25 lines of code). If the typesafe enums (Rank and Suit) had been built by hand, each of them would have been significantly longer than the entire Card class.

The (private) constructor of Card takes two parameters, a Rank and a Suit. If you accidentally invoke the constructor with the parameters reversed, the compiler will politely inform you of your error. Contrast this to the int enum pattern, in which the program would fail at run time.

Note that each enum type has a static values method that returns an array containing all of the values of the enum type in the order they are declared. This method is commonly used in combination with the for-each loop to iterate over the values of an enumerated type.

The following example is a simple program called Deal that exercises Card. It reads two numbers from the command line, representing the number of hands to deal and the number of cards per hand. Then it creates a new deck of cards, shuffles it, and deals and prints the requested hands.

import java.util.*;

public class Deal {
    public static void main(String args[]) {
        int numHands = Integer.parseInt(args[0]);
        int cardsPerHand = Integer.parseInt(args[1]);
        List<Card> deck  = Card.newDeck();
        Collections.shuffle(deck);
        for (int i=0; i < numHands; i++)
            System.out.println(deal(deck, cardsPerHand));
    }

    public static ArrayList<Card> deal(List<Card> deck, int n) {
         int deckSize = deck.size();
         List<Card> handView = deck.subList(deckSize-n, deckSize);
         ArrayList<Card> hand = new ArrayList<Card>(handView);
         handView.clear();
         return hand;
     }
}

$ java Deal 4 5
[FOUR of HEARTS, NINE of DIAMONDS, QUEEN of SPADES, ACE of SPADES, NINE of SPADES]
[DEUCE of HEARTS, EIGHT of SPADES, JACK of DIAMONDS, TEN of CLUBS, SEVEN of SPADES]
[FIVE of HEARTS, FOUR of DIAMONDS, SIX of DIAMONDS, NINE of CLUBS, JACK of CLUBS]
[SEVEN of HEARTS, SIX of CLUBS, DEUCE of DIAMONDS, THREE of SPADES, EIGHT of CLUBS]

Suppose you want to add data and behavior to an enum. For example consider the planets of the solar system. Each planet knows its mass and radius, and can calculate its surface gravity and the weight of an object on the planet. Here is how it looks:

public enum Planet {
    MERCURY (3.303e+23, 2.4397e6),
    VENUS   (4.869e+24, 6.0518e6),
    EARTH   (5.976e+24, 6.37814e6),
    MARS    (6.421e+23, 3.3972e6),
    JUPITER (1.9e+27,   7.1492e7),
    SATURN  (5.688e+26, 6.0268e7),
    URANUS  (8.686e+25, 2.5559e7),
    NEPTUNE (1.024e+26, 2.4746e7),
    PLUTO   (1.27e+22,  1.137e6);

    private final double mass;   // in kilograms
    private final double radius; // in meters
    Planet(double mass, double radius) {
        this.mass = mass;
        this.radius = radius;
    }
    public double mass()   { return mass; }
    public double radius() { return radius; }

    // universal gravitational constant  (m3 kg-1 s-2)
    public static final double G = 6.67300E-11;

    public double surfaceGravity() {
        return G * mass / (radius * radius);
    }
    public double surfaceWeight(double otherMass) {
        return otherMass * surfaceGravity();
    }
}

The enum type Planet contains a constructor, and each enum constant is declared with parameters to be passed to the constructor when it is created.

Here is a sample program that takes your weight on earth (in any unit) and calculates and prints your weight on all of the planets (in the same unit):

    public static void main(String[] args) {
        double earthWeight = Double.parseDouble(args[0]);
        double mass = earthWeight/EARTH.surfaceGravity();
        for (Planet p : Planet.values())
           System.out.printf("Your weight on %s is %f%n",
                             p, p.surfaceWeight(mass));
    }

$ java Planet 175
Your weight on MERCURY is 66.107583
Your weight on VENUS is 158.374842
Your weight on EARTH is 175.000000
Your weight on MARS is 66.279007
Your weight on JUPITER is 442.847567
Your weight on SATURN is 186.552719
Your weight on URANUS is 158.397260
Your weight on NEPTUNE is 199.207413
Your weight on PLUTO is 11.703031

The idea of adding behavior to enum constants can be taken one step further. You can give each enum constant a different behavior for some method. One way to do this by switching on the enumeration constant. Here is an example with an enum whose constants represent the four basic arithmetic operations, and whose eval method performs the operation:

public enum Operation {
    PLUS, MINUS, TIMES, DIVIDE;

    // Do arithmetic op represented by this constant
    double eval(double x, double y){
        switch(this) {
            case PLUS:   return x + y;
            case MINUS:  return x - y;
            case TIMES:  return x * y;
            case DIVIDE: return x / y;
        }
        throw new AssertionError("Unknown op: " + this);
    }
}
This works fine, but it will not compile without the throw statement, which is not terribly pretty. Worse, you must remember to add a new case to the switch statement each time you add a new constant to Operation. If you forget, the eval method with fail, executing the aforementioned throw statement

There is another way give each enum constant a different behavior for some method that avoids these problems. You can declare the method abstract in the enum type and override it with a concrete method in each constant. Such methods are known as constant-specific methods. Here is the previous example redone using this technique:

public enum Operation {
  PLUS   { double eval(double x, double y) { return x + y; } },
  MINUS  { double eval(double x, double y) { return x - y; } },
  TIMES  { double eval(double x, double y) { return x * y; } },
  DIVIDE { double eval(double x, double y) { return x / y; } };

  // Do arithmetic op represented by this constant
  abstract double eval(double x, double y);
}

Here is a sample program that exercises the Operation class. It takes two operands from the command line, iterates over all the operations, and for each operation, performs the operation and prints the resulting equation:

    public static void main(String args[]) {
        double x = Double.parseDouble(args[0]);
        double y = Double.parseDouble(args[1]);
        for (Operation op : Operation.values())
            System.out.printf("%f %s %f = %f%n", x, op, y, op.eval(x, y));
    }

$ java Operation 4 2
4.000000 PLUS 2.000000 = 6.000000
4.000000 MINUS 2.000000 = 2.000000
4.000000 TIMES 2.000000 = 8.000000
4.000000 DIVIDE 2.000000 = 2.000000
Constant-specific methods are reasonably sophisticated, and many programmers will never need to use them, but it is nice to know that they are there if you need them.

Two classes have been added to java.util in support of enums: special-purpose Set and Map implementations called EnumSet and EnumMap. EnumSet is a high-performance Set implementation for enums. All of the members of an enum set must be of the same enum type. Internally, it is represented by a bit-vector, typically a single long. Enum sets support iteration over ranges of enum types. For example given the following enum declaration:

    enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }
you can iterate over the weekdays. The EnumSet class provides a static factory that makes it easy:
    for (Day d : EnumSet.range(Day.MONDAY, Day.FRIDAY))
        System.out.println(d);
Enum sets also provide a rich, typesafe replacement for traditional bit flags:
    EnumSet.of(Style.BOLD, Style.ITALIC)

Similarly, EnumMap is a high-performance Map implementation for use with enum keys, internally implemented as an array. Enum maps combine the richness and safety of the Map interface with speed approaching that of an array. If you want to map an enum to a value, you should always use an EnumMap in preference to an array.

The Card class, above, contains a static factory that returns a deck, but there is no way to get an individual card from its rank and suit. Merely exposing the constructor would destroy the singleton property (that only a single instance of each card is allowed to exist). Here is how to write a static factory that preserves the singleton property, using a nested EnumMap:

private static Map<Suit, Map<Rank, Card>> table =
    new EnumMap<Suit, Map<Rank, Card>>(Suit.class);
static {
    for (Suit suit : Suit.values()) {
        Map<Rank, Card> suitTable = new EnumMap<Rank, Card>(Rank.class);
        for (Rank rank : Rank.values())
            suitTable.put(rank, new Card(rank, suit));
        table.put(suit, suitTable);
    }
}

public static Card valueOf(Rank rank, Suit suit) {
    return table.get(suit).get(rank);
}
The EnumMap (table) maps each suit to an EnumMap that maps each rank to a card. The lookup performed by the valueOf method is internally implemented as two array accesses, but the code is much clearer and safer. In order to preserve the singleton property, it is imperative that the constructor invocation in the prototype deck initialization in Card be replaced by a call to the new static factory:
    // Initialize prototype deck
    static {
        for (Suit suit : Suit.values())
            for (Rank rank : Rank.values())
                protoDeck.add(Card.valueOf(rank, suit));
    }
It is also imperative that the initialization of table be placed above the initialization of protoDeck, as the latter depends on the former.

So when should you use enums? Any time you need a fixed set of constants. That includes natural enumerated types (like the planets, days of the week, and suits in a card deck) as well as other sets where you know all possible values at compile time, such as choices on a menu, rounding modes, command line flags, and the like. It is not necessary that the set of constants in an enum type stay fixed for all time. The feature was specifically designed to allow for binary compatible evolution of enum types.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Generics

When you take an element out of a Collection, you must cast it to the type of element that is stored in the collection. Besides being inconvenient, this is unsafe. The compiler does not check that your cast is the same as the collection's type, so the cast can fail at run time.

Generics provides a way for you to communicate the type of a collection to the compiler, so that it can be checked. Once the compiler knows the element type of the collection, the compiler can check that you have used the collection consistently and can insert the correct casts on values being taken out of the collection.

Here is a simple example taken from the existing Collections tutorial:

// Removes 4-letter words from c. Elements must be strings
static void expurgate(Collection c) {
    for (Iterator i = c.iterator(); i.hasNext(); )
      if (((String) i.next()).length() == 4)
        i.remove();
}

Here is the same example modified to use generics:

// Removes the 4-letter words from c
static void expurgate(Collection<String> c) {
    for (Iterator<String> i = c.iterator(); i.hasNext(); )
      if (i.next().length() == 4)
        i.remove();
}

When you see the code <Type>, read it as "of Type"; the declaration above reads as "Collection of String c." The code using generics is clearer and safer. We have eliminated an unsafe cast and a number of extra parentheses. More importantly, we have moved part of the specification of the method from a comment to its signature, so the compiler can verify at compile time that the type constraints are not violated at run time. Because the program compiles without warnings, we can state with certainty that it will not throw a ClassCastException at run time. The net effect of using generics, especially in large programs, is improved readability and robustness.

To paraphrase Generics Specification Lead Gilad Bracha, when we declare c to be of type Collection<String>, this tells us something about the variable c that holds true wherever and whenever it is used, and the compiler guarantees it (assuming the program compiles without warnings). A cast, on the other hand, tells us something the programmer thinks is true at a single point in the code, and the VM checks whether the programmer is right only at run time.

While the primary use of generics is collections, there are many other uses. "Holder classes," such as WeakReference and ThreadLocal, have all been generified, that is, they have been retrofitted to make use of generics. More surprisingly, class Class has been generified. Class literals now function as type tokens, providing both run-time and compile-time type information. This enables a style of static factories exemplified by the getAnnotation method in the new AnnotatedElement interface:

    <T extends Annotation> T getAnnotation(Class<T> annotationType);
This is a generic method. It infers the value of its type parameter T from its argument, and returns an appropriate instance of T, as illustrated by the following snippet:
    Author a = Othello.class.getAnnotation(Author.class);
Prior to generics, you would have had to cast the result to Author. Also you would have had no way to make the compiler check that the actual parameter represented a subclass of Annotation.

Generics are implemented by type erasure: generic type information is present only at compile time, after which it is erased by the compiler. The main advantage of this approach is that it provides total interoperability between generic code and legacy code that uses non-parameterized types (which are technically known as raw types). The main disadvantages are that parameter type information is not available at run time, and that automatically generated casts may fail when interoperating with ill-behaved legacy code. There is, however, a way to achieve guaranteed run-time type safety for generic collections even when interoperating with ill-behaved legacy code.

The java.util.Collections class has been outfitted with wrapper classes that provide guaranteed run-time type safety. They are similar in structure to the synchronized and unmodifiable wrappers. These "checked collection wrappers" are very useful for debugging. Suppose you have a set of strings, s, into which some legacy code is mysteriously inserting an integer. Without the wrapper, you will not find out about the problem until you read the problem element from the set, and an automatically generated cast to String fails. At this point, it is too late to determine the source of the problem. If, however, you replace the declaration:

    Set<String> s = new HashSet<String>();
with this declaration:
    Set<String> s = Collections.checkedSet(new HashSet<String>(), String.class);
the collection will throw a ClassCastException at the point where the legacy code attempts to insert the integer. The resulting stack trace will allow you to diagnose and repair the problem.

You should use generics everywhere you can. The extra effort in generifying code is well worth the gains in clarity and type safety. It is straightforward to use a generic library, but it requires some expertise to write a generic library, or to generify an existing library. There is one caveat: You may not use generics (or any other Tiger features) if you intend to deploy the compiled code on a pre-5.0 virtual machine.

If you are familiar with C++'s template mechanism, you might think that generics are similar, but the similarity is superficial. Generics do not generate a new class for each specialization, nor do they permit "template metaprogramming."

There is much more to learn about generics. See the Generics lesson in the Java Tutorials.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Improved Compiler Warnings When Using Non-Reifiable Formal Parameters with Varargs Methods

Documentation Contents

Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods

This page covers the following topics:

  • Heap Pollution
  • Variable Arguments Methods and Non-Reifiable Formal Parameters
  • Potential Vulnerabilities of Varargs Methods with Non-Reifiable Formal Parameters
  • Suppressing Warnings from Varargs Methods with Non-Reifiable Formal Parameters

Heap Pollution

Most parameterized types, such as ArrayList<Number> and List<String>, are non-reifiable types. A non-reifiable type is a type that is not completely available at runtime. At compile time, non-reifiable types undergo a process called type erasure during which the compiler removes information related to type parameters and type arguments. This ensures binary compatibility with Java libraries and applications that were created before generics. Because type erasure removes information from parameterized types at compile-time, these types are non-reifiable.

Heap pollution occurs when a variable of a parameterized type refers to an object that is not of that parameterized type. This situation can only occur if the program performed some operation that would give rise to an unchecked warning at compile-time. An unchecked warning is generated if, either at compile-time (within the limits of the compile-time type checking rules) or at runtime, the correctness of an operation involving a parameterized type (for example, a cast or method call) cannot be verified.

Consider the following example:

    List l = new ArrayList<Number>();
    List<String> ls = l;       // unchecked warning
    l.add(0, new Integer(42)); // another unchecked warning
    String s = ls.get(0);      // ClassCastException is thrown

During type erasure, the types ArrayList<Number> and List<String> become ArrayList and List, respectively.

The variable ls has the parameterized type List<String>. When the List referenced by l is assigned to ls, the compiler generates an unchecked warning; the compiler is unable to determine at compile time, and moreover knows that the JVM will not be able to determine at runtime, if l refers to a List<String> type; it does not. Consequently, heap pollution occurs.

As a result, at compile time, the compiler generates another unchecked warning at the add statement. The compiler is unable to determine if the variable l refers to a List<String> type or a List<Integer> type (and another heap pollution situation occurs). However, the compiler does not generate a warning or error at the get statement. This statement is valid; it is calling the List<String>.get method to retrieve a String object. Instead, at runtime, the get statement throws a ClassCastException.

In detail, a heap pollution situation occurs when the List object l, whose static type is List<Number>, is assigned to another List object, ls, that has a different static type, List<String>. However, the compiler still allows this assignment. It must allow this assignment to preserve backwards compatibility with versions of Java SE that do not support generics. Because of type erasure, List<Number> and List<String> both become List. Consequently, the compiler allows the assignment of the object l, which has a raw type of List, to the object ls.

Furthermore, a heap pollution situation occurs when the l.add method is called. The static type second formal parameter of the add method is String, but this method is called with an actual parameter of a different type, Integer. However, the compiler still allows this method call. Because of type erasure, the type of the second formal parameter of the add method (which is defined as List<E>.add(int,E)) becomes Object. Consequently, the compiler allows this method call because, after type erasure, the l.add method can add any object of type Object, including an object of Integer type, which is a subtype of Object.

Variable Arguments Methods and Non-Reifiable Formal Parameters

Consider the method ArrayBuilder.addToList in the following example. It is a variable arguments (also known as varargs) method that adds the objects of type T contained in the elements varargs formal parameter to the List listArg:

import java.util.*;

public class ArrayBuilder {

  public static <T> void addToList (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }

  public static void faultyMethod(List<String>... l) {
    Object[] objectArray = l;  // Valid
    objectArray[0] = Arrays.asList(new Integer(42));
    String s = l[0].get(0);    // ClassCastException thrown here
  }

}

import java.util.*;

public class HeapPollutionExample {

  public static void main(String[] args) {

    List<String> stringListA = new ArrayList<String>();
    List<String> stringListB = new ArrayList<String>();

    ArrayBuilder.addToList(stringListA, "Seven", "Eight", "Nine");
    ArrayBuilder.addToList(stringListA, "Ten", "Eleven", "Twelve");
    List<List<String>> listOfStringLists = new ArrayList<List<String>>();
    ArrayBuilder.addToList(listOfStringLists, stringListA, stringListB);

    ArrayBuilder.faultyMethod(Arrays.asList("Hello!"), Arrays.asList("World!"));
  }
}

The Java SE 7 compiler generates the following warning for the definition of the method ArrayBuilder.addToList:

warning: [varargs] Possible heap pollution from parameterized vararg type T

When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method ArrayBuilder.addToList, the compiler translates the varargs formal parameter T... elements to the formal parameter T[] elements, an array. However, because of type erasure, the compiler converts the varargs formal parameter to Object[] elements. Consequently, there is a possibility of heap pollution. See the next section, Potential Vulnerabilities of Varargs Methods with Non-Reifiable Formal Parameters, for more information.

Note: The Java SE 5 and 6 compilers generate this warning when the ArrayBuilder.addToList is called; in this example, the warning is generated for the class HeapPollutionExample. These compilers do not generate the warning at the declaration site. However, the Java SE 7 generates the warning at both the declaration site and the call site (unless the warnings are preempted with annotations; see Suppressing Warnings from Varargs Methods with Non-Reifiable Formal Parameters for more information). The advantage of generating a warning when a compiler encounters a varargs method that has a non-reifiable varargs formal parameter at the declaration site as opposed to the call site is that there is only one declaration site; there are potentially many call sites.

Potential Vulnerabilities of Varargs Methods with Non-Reifiable Formal Parameters

The method ArrayBuilder.faultyMethod shows why the compiler warns you about these kinds of methods. The first statement of this method assigns the varargs formal parameter l to the Object array objectArgs:

    Object[] objectArray = l;

This statement can potentially introduce heap pollution. A value that does match the parameterized type of the varargs formal parameter l can be assigned to the variable objectArray, and thus can be assigned to l. However, the compiler does not generate an unchecked warning at this statement. The compiler has already generated a warning when it translated the varargs formal parameter List<String>... l to the formal parameter List[] l. This statement is valid; the variable l has the type List[], which is a subtype of Object[].

Consequently, the compiler does not issue a warning or error if you assign a List object of any type to any array component of the objectArray array as shown by this statement:

    objectArray[0] = Arrays.asList(new Integer(42));

This statement assigns to the first array component of the objectArray array with a List object that contains one object of type Integer.

Suppose you call the ArrayBuilder.makeArray method with the following statement:

    ArrayBuilder.faultyMethod(Arrays.asList("Hello!"), Arrays.asList("World!"));

At runtime, the JVM throws a ClassCastException at the following statement:

    String s = l[0].get(0);    // ClassCastException thrown here

The object stored in the first array component of the variable l has the type List<Integer>, but this statement is expecting an object of type List<String>.

Suppressing Warnings from Varargs Methods with Non-Reifiable Formal Parameters

If you declare a varargs method that has parameterized parameters, and you ensure that the body of the method does not throw a ClassCastException or other similar exception due to improper handling of the varargs formal parameter (as shown in the ArrayBuilder.faultyMethod method), you can suppress the warning that the compiler generates for these kinds of varargs methods by using one of the following options:

  • Add the following annotation to static and non-constructor method declarations:

    @SafeVarargs

    Unlike the @SuppressWarnings annotation, the @SafeVarargs annotation is a documented part of the method's contract; this annotation asserts that the implementation of the method will not improperly handle the varargs formal parameter.

  • Add the following annotation to the method declaration:

    @SuppressWarnings({"unchecked", "varargs"})

    Unlike the @SafeVarargs annotation, the @SuppressWarnings("varargs") does not suppress warnings generated from the method's call site.

  • Use the compiler option -Xlint:varargs.

For example, the following version of the ArrayBuilder class has two additional methods, addToList2 and addToList3:

public class ArrayBuilder {

  public static <T> void addToList (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }

  @SuppressWarnings({"unchecked", "varargs"})
  public static <T> void addToList2 (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }

  @SafeVarargs
  public static <T> void addToList3 (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }

  // ...

}

public class HeapPollutionExample {

  // ...

  public static void main(String[] args) {

    // ...

    ArrayBuilder.addToList(listOfStringLists, stringListA, stringListB);
    ArrayBuilder.addToList2(listOfStringLists, stringListA, stringListB);
    ArrayBuilder.addToList3(listOfStringLists, stringListA, stringListB);

    // ...

  }
}

The Java compiler generates the following warnings for this example:

  • addToList:
    • At the method's declaration: [unchecked] Possible heap pollution from parameterized vararg type T
    • When the method is called: [unchecked] unchecked generic array creation for varargs parameter of type List<String>[]
  • addToList2: When the method is called (no warning is generated at the method's declaration): [unchecked] unchecked generic array creation for varargs parameter of type List<String>[]
  • addToList3: No warnings are generated either at the method's declaration or when it is called.

Note: In Java SE 5 and 6, it is the responsibility of the programmer who calls a varargs method that has a non-reifiable varargs formal parameter to determine whether heap pollution would occur. However, if this programmer did not write such a method, he or she cannot easily determine this. In Java SE 7, it is the responsibility of the programmer who writes these kinds of varargs methods to ensure that they properly handle the varargs formal parameter and ensure heap pollution does not occur.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Programming Language

Documentation Contents

Java™ Programming Language

The Java™ Programming Language is a general-purpose, concurrent, strongly typed, class-based object-oriented language. It is normally compiled to the bytecode instruction set and binary format defined in the Java Virtual Machine Specification.

Tutorials and Programmer's Guides

  • The Java Tutorial

API Enhancements

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in J2SE 1.4

More Information

  • Java Language Specification
  • Generics by Gilad Bracha.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Programming Language Enhancements

Enhancements in Java SE 8

  • Lambda Expressions enable you to encapsulate a single unit of behavior and pass it to other code. You can use a lambda expressions if you want a certain action performed on each element of a collection, when a process is completed, or when a process encounters an error. Lambda expressions are supported by the following features:

    • Method References are compact, easy-to-read lambda expressions for methods that already have a name.

    • Default Methods enable you to add new functionality to the interfaces of your libraries and ensure binary compatibility with code written for older versions of those interfaces. They are interface methods that have an implementation and the default keyword at the beginning of the method signature. In addition, you can define static methods in interfaces.

    • New and Enhanced APIs That Take Advantage of Lambda Expressions and Streams in Java SE 8 describe new and enhanced classes that take advantage of lambda expressions and streams.

  • Improved Type Inference - The Java compiler takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an expression is the data type that the Java compiler expects depending on where the expression appears. For example, you can use an assignment statement's target type for type inference in Java SE 7. However, in Java SE 8, you can use the target type for type inference in more contexts. The most prominent example is using a method invocation's target types to infer the data types of its arguments.

    Consider the following example:

    List<String> stringList = new ArrayList<>();
stringList.add("A");
stringList.addAll(Arrays.asList());

    Disregarding generics for the moment, the method addAll expects a Collection instance as its argument, and the method Arrays.asList returns a List instance. This works because List is a subtype of Collection.

    Now considering generics, the target type of addAll is Collection<? extends String>, and Arrays.asList returns a List<T> instance. In this example, the Java SE 8 compiler can infer that the value of the type variable T is String. The compiler infers this from the target type Collection<? extends String>.

    Compilers from Java SE 7 and earlier do not accept this code because they do not use target typing to infer types for method call arguments. For example, the Java SE 7 compiler generates an error message similar to the following:

    error: no suitable method found for addAll(List<Object>) ...
    method List.addAll(Collection<? extends String>) is not applicable (actual argument List<Object> cannot be converted to Collection<? extends String> by method invocation conversion)

    Consequently, in situations like this where the Java compiler cannot infer types, you must explicitly specify values for type variables with type witnesses. For example, the following works in Java SE 7:

    List<String> stringList = new ArrayList<>();
stringList.add("A");
stringList.addAll(Arrays.<String>asList());

    See the following sections in the Java Tutorials for more information:

    • Target Typing in Lambda Expressions

    • Type Inference

  • Annotations on Java Types - It is now possible to apply an annotation anywhere a type is used. Used in conjunction with a pluggable type system, this allows for stronger type checking of your code. For more information, see Type Annotations and Pluggable Type Systems in the new Annotations lesson in the Java Tutorial.

  • Repeating Annotations - It is now possible to apply the same annotation type more than once to the same declaration or type use. For more information, see Repeating Annotations in the new Annotations lesson in the Java Tutorial.

  • Method Parameter Reflection - You can obtain the names of the formal parameters of any method or constructor with the method java.lang.reflect.Executable.getParameters. (The classes Method and Constructor extend the class Executable and therefore inherit the method Executable.getParameters.) However, .class files do not store formal parameter names by default. To store formal parameter names in a particular .class file, and thus enable the Reflection API to retrieve formal parameter names, compile the source file with the -parameters option of the javac compiler. See Obtaining Names of Method Parameters in the Java Tutorials.

Enhancements in Java SE 7

  • Binary Literals - In Java SE 7, the integral types (byte, short, int, and long) can also be expressed using the binary number system. To specify a binary literal, add the prefix 0b or 0B to the number.
  • Underscores in Numeric Literals - Any number of underscore characters (_) can appear anywhere between digits in a numerical literal. This feature enables you, for example, to separate groups of digits in numeric literals, which can improve the readability of your code.
  • Strings in switch Statements - You can use the String class in the expression of a switch statement.
  • Type Inference for Generic Instance Creation - You can replace the type arguments required to invoke the constructor of a generic class with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context. This pair of angle brackets is informally called the diamond.
  • Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods - The Java SE 7 complier generates a warning at the declaration site of a varargs method or constructor with a non-reifiable varargs formal parameter. Java SE 7 introduces the compiler option -Xlint:varargs and the annotations @SafeVarargs and @SuppressWarnings({"unchecked", "varargs"}) to suppress these warnings.
  • The try-with-resources Statement - The try-with-resources statement is a try statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements the new java.lang.AutoCloseable interface or the java.io.Closeable interface can be used as a resource. The classes java.io.InputStream, OutputStream, Reader, Writer, java.sql.Connection, Statement, and ResultSet have been retrofitted to implement the AutoCloseable interface and can all be used as resources in a try-with-resources statement.
  • Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking - A single catch block can handle more than one type of exception. In addition, the compiler performs more precise analysis of rethrown exceptions than earlier releases of Java SE. This enables you to specify more specific exception types in the throws clause of a method declaration.

Enhancements in Java SE 6

No language changes were introduced in Java SE 6.

Enhancements in Java SE 5.0

  • Generics - This long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting. See the Generics lesson in the Java Tutorials. (JSR 14)
  • Enhanced for Loop - This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays. (JSR 201)
  • Autoboxing/Unboxing - This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). (JSR 201)
  • Typesafe Enums - This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern ("Effective Java," Item 21) without the verbosity and the error-proneness. (JSR 201)
  • Varargs - This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists.
  • Static Import - This facility lets you avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern." (JSR 201)
  • Annotations (Metadata) - This language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it. Also it eliminates the need for maintaining "side files" that must be kept up to date with changes in source files. Instead the information can be maintained in the source file. (JSR 175)
    NOTE: The @Deprecated annotation provides a way to deprecate program elements. See How and When To Deprecate APIs.

Generics papers

  • JSR14: Adding Generic Types to the Java Programming Language
    • Generics lesson in the Java Tutorials
    • Earlier public review draft specification from Java Community Process
  • Making the Future Safe for the Past: Adding Genericity to the Java Programming Language (PDF)
    Bracha, Odersky, Stoutamire, and Wadler. OOPSLA 98, Vancouver, October 1998. ( other formats)
  • GJ: Extending the Java Programming Language with Type Parameters (PDF)
    Bracha, Odersky, Stoutamire, and Wadler. A tutorial on GJ. August 1998. ( other formats)
  • Adding Generics to the Java Programming Language (PDF)
    Bracha. Slides from JavaOne 2003 presentation.
  • Adding Wildcards to the Java Programming Language (PDF)
    Torgersen, Hansen, Ernst, Ahe, Bracha and Gafter. An ACM paper, 2004.

Enhancements in J2SE 1.4

  • Assertion Facility - Assertions are boolean expressions that the programmer believes to be true concerning the state of a computer program. For example, after sorting a list, the programmer might assert that the list is in ascending order. Evaluating assertions at runtime to confirm their validity is one of the most powerful tools for improving code quality, as it quickly uncovers the programmer's misconceptions concerning a program's behavior.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


New and Enhanced APIs That Take Advantage of Lambda Expressions and Streams in Java SE 8

In Java SE 8, new classes have been added and existing classes have been enhanced to take advantage of lambda expressions and streams, which are described in the lesson Aggregate Operations in the Java Tutorials. You can find most of these new and enhanced classes in the following packages:

  • java.util: An existing package which, in addition to the java.lang.invoke package, integrates the Java Collections Framework with streams and provides general utility functionality used by streams.
  • java.util.function: A new package that contains general purpose functional interfaces that provide target types for lambda expressions and method references.
  • java.util.stream: A new package that contains the majority of interfaces and classes that provide functionality to streams and aggregate operations

Many additions to existing classes take advantage of streams. Other additions include methods that accept instances of functional interfaces, which you can invoke with lambda expressions or method references.

New Packages

java.util.function
java.util.stream

Modified Packages

Classes such as Boolean, Integer, and other object wrapper classes for primitive types (see Autoboxing and Unboxing) are listed here because they have been enhanced with methods that are suitable for targets of method references. For example, you can use the method Integer.sum as a method reference, as demonstrated in the following example that adds integers contained in a list:

Integer[] intArray = {1, 2, 3, 4, 5, 6, 7, 8 };
List<Integer> listOfIntegers =
    new ArrayList<>(Arrays.asList(intArray));
    System.out.println("Sum of integers: " +
        listOfIntegers
            .stream()
            .reduce(Integer::sum).get());

(Note that you can also add integers contained in a stream with the method IntStream.sum.)

Package | New Classes | Modified Classes
java.io | UncheckedIOException | BufferedReader
java.lang | not applicable | AutoCloseable ThreadLocal String Iterable CharSequence Boolean Integer Long Float Double
java.nio.file | not applicable | Files
java.util | PrimitiveIterator Spliterator DoubleSummaryStatistics IntSummaryStatistics LongSummaryStatistics Optional OptionalDouble OptionalInt OptionalLong Spliterators SplittableRandom StringJoiner | Arrays BitSet Collection Comparator Iterator List Map Map.Entry LinkedHashMap Random TreeMap
java.util.concurrent | not applicable | ThreadLocalRandom
java.util.jar | not applicable | JarFile
java.util.zip | not applicable | ZipFile
java.util.logging | not applicable | Logger
java.util.regex | not applicable | Pattern
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Programming With Assertions

An assertion is a statement in the Java programming language that enables you to test your assumptions about your program. For example, if you write a method that calculates the speed of a particle, you might assert that the calculated speed is less than the speed of light.

Each assertion contains a boolean expression that you believe will be true when the assertion executes. If it is not true, the system will throw an error. By verifying that the boolean expression is indeed true, the assertion confirms your assumptions about the behavior of your program, increasing your confidence that the program is free of errors.

Experience has shown that writing assertions while programming is one of the quickest and most effective ways to detect and correct bugs. As an added benefit, assertions serve to document the inner workings of your program, enhancing maintainability.

This document shows you how to program with assertions. It covers the topics:

  • Introduction
  • Putting Assertions Into Your Code
  • Compiling Files That Use Assertions
  • Enabling and Disabling Assertions
  • Compatibility With Existing Programs
  • Design FAQ

Introduction

The assertion statement has two forms. The first, simpler form is:

assert Expression1 ;

where Expression1 is a boolean expression. When the system runs the assertion, it evaluates Expression1 and if it is false throws an AssertionError with no detail message.

The second form of the assertion statement is:

assert Expression1 : Expression2 ;

where:

  • Expression1 is a boolean expression.
  • Expression2 is an expression that has a value. (It cannot be an invocation of a method that is declared void.)

Use this version of the assert statement to provide a detail message for the AssertionError. The system passes the value of Expression2 to the appropriate AssertionError constructor, which uses the string representation of the value as the error's detail message.

The purpose of the detail message is to capture and communicate the details of the assertion failure. The message should allow you to diagnose and ultimately fix the error that led the assertion to fail. Note that the detail message is not a user-level error message, so it is generally unnecessary to make these messages understandable in isolation, or to internationalize them. The detail message is meant to be interpreted in the context of a full stack trace, in conjunction with the source code containing the failed assertion.

Like all uncaught exceptions, assertion failures are generally labeled in the stack trace with the file and line number from which they were thrown. The second form of the assertion statement should be used in preference to the first only when the program has some additional information that might help diagnose the failure. For example, if Expression1 involves the relationship between two variables x and y, the second form should be used. Under these circumstances, a reasonable candidate for Expression2 would be "x: " + x + ", y: " + y.

In some cases Expression1 may be expensive to evaluate. For example, suppose you write a method to find the minimum element in an unsorted list, and you add an assertion to verify that the selected element is indeed the minimum. The work done by the assert will be at least as expensive as the work done by the method itself. To ensure that assertions are not a performance liability in deployed applications, assertions can be enabled or disabled when the program is started, and are disabled by default. Disabling assertions eliminates their performance penalty entirely. Once disabled, they are essentially equivalent to empty statements in semantics and performance. See Enabling and Disabling Assertions for more information.

The addition of the assert keyword to the Java programming language has implications for existing code. See Compatibility With Existing Programs for more information.

Putting Assertions Into Your Code

There are many situations where it is good to use assertions, including:

  • Internal Invariants
  • Control-Flow Invariants
  • Preconditions, Postconditions, and Class Invariants

There are also situations where you should not use them:

  • Do not use assertions for argument checking in public methods.

    Argument checking is typically part of the published specifications (or contract) of a method, and these specifications must be obeyed whether assertions are enabled or disabled. Another problem with using assertions for argument checking is that erroneous arguments should result in an appropriate runtime exception (such as IllegalArgumentException, IndexOutOfBoundsException, or NullPointerException). An assertion failure will not throw an appropriate exception.

  • Do not use assertions to do any work that your application requires for correct operation.

    Because assertions may be disabled, programs must not assume that the boolean expression contained in an assertion will be evaluated. Violating this rule has dire consequences. For example, suppose you wanted to remove all of the null elements from a list names, and knew that the list contained one or more nulls. It would be wrong to do this:

    // Broken! - action is contained in assertion
assert names.remove(null);

    The program would work fine when asserts were enabled, but would fail when they were disabled, as it would no longer remove the null elements from the list. The correct idiom is to perform the action before the assertion and then assert that the action succeeded:

    // Fixed - action precedes assertion
boolean nullsRemoved = names.remove(null);
assert nullsRemoved;  // Runs whether or not asserts are enabled

    As a rule, the expressions contained in assertions should be free of side effects: evaluating the expression should not affect any state that is visible after the evaluation is complete. One exception to this rule is that assertions can modify state that is used only from within other assertions. An idiom that makes use of this exception is presented later in this document.

Internal Invariants

Before assertions were available, many programmers used comments to indicate their assumptions concerning a program's behavior. For example, you might have written something like this to explain your assumption about an else clause in a multiway if-statement:

if (i % 3 == 0) {
    ...
} else if (i % 3 == 1) {
    ...
} else { // We know (i % 3 == 2)
    ...
}

You should now use an assertion whenever you would have written a comment that asserts an invariant. For example, you should rewrite the previous if-statement like this:

if (i % 3 == 0) {
   ...
} else if (i % 3 == 1) {
    ...
} else {
    assert i % 3 == 2 : i;
    ...
}

Note, incidentally, that the assertion in the above example may fail if i is negative, as the % operator is not a true modulus operator, but computes the remainder, which may be negative.

Another good candidate for an assertion is a switch statement with no default case. The absence of a default case typically indicates that a programmer believes that one of the cases will always be executed. The assumption that a particular variable will have one of a small number of values is an invariant that should be checked with an assertion. For example, suppose the following switch statement appears in a program that handles playing cards:

switch(suit) {
  case Suit.CLUBS:
    ...
  break;

  case Suit.DIAMONDS:
    ...
  break;

  case Suit.HEARTS:
    ...
    break;

  case Suit.SPADES:
      ...
}

It probably indicates an assumption that the suit variable will have one of only four values. To test this assumption, you should add the following default case:

default:
    assert false : suit;

If the suit variable takes on another value and assertions are enabled, the assert will fail and an AssertionError will be thrown.

An acceptable alternative is:

default:
    throw new AssertionError(suit);

This alternative offers protection even if assertions are disabled, but the extra protection adds no cost: the throw statement won't execute unless the program has failed. Moreover, the alternative is legal under some circumstances where the assert statement is not. If the enclosing method returns a value, each case in the switch statement contains a return statement, and no return statement follows the switch statement, then it would cause a syntax error to add a default case with an assertion. (The method would return without a value if no case matched and assertions were disabled.)

Control-Flow Invariants

The previous example not only tests an invariant, it also checks an assumption about the application's flow of control. The author of the original switch statement probably assumed not only that the suit variable would always have one of four values, but also that one of the four cases would always be executed. It points out another general area where you should use assertions: place an assertion at any location you assume will not be reached. The assertions statement to use is:

assert false;

For example, suppose you have a method that looks like this:

void foo() {
    for (...) {
      if (...)
        return;
    }
    // Execution should never reach this point!!!
}

Replace the final comment so that the code now reads:

void foo() {
    for (...) {
      if (...)
        return;
    }
    assert false; // Execution should never reach this point!
}

Note: Use this technique with discretion. If a statement is unreachable as defined in the Java Language Specification, you will get a compile time error if you try to assert that it is not reached. Again, an acceptable alternative is simply to throw an AssertionError.

Preconditions, Postconditions, and Class Invariants

While the assert construct is not a full-blown design-by-contract facility, it can help support an informal design-by-contract style of programming. This section shows you how to use asserts for:

  • Preconditions — what must be true when a method is invoked.
    • Lock-Status Preconditions — preconditions concerning whether or not a given lock is held.
  • Postconditions — what must be true after a method completes successfully.
  • Class invariants — what must be true about each instance of a class.

Preconditions

By convention, preconditions on public methods are enforced by explicit checks that throw particular, specified exceptions. For example:

/**
  * Sets the refresh rate.
  *
  * @param  rate refresh rate, in frames per second.
  * @throws IllegalArgumentException if rate <= 0 or
  * rate > MAX_REFRESH_RATE.
*/
public void setRefreshRate(int rate) {
  // Enforce specified precondition in public method
  if (rate <= 0 || rate > MAX_REFRESH_RATE)
    throw new IllegalArgumentException("Illegal rate: " + rate);
    setRefreshInterval(1000/rate);
  }

This convention is unaffected by the addition of the assert construct. Do not use assertions to check the parameters of a public method. An assert is inappropriate because the method guarantees that it will always enforce the argument checks. It must check its arguments whether or not assertions are enabled. Further, the assert construct does not throw an exception of the specified type. It can throw only an AssertionError.

You can, however, use an assertion to test a nonpublic method's precondition that you believe will be true no matter what a client does with the class. For example, an assertion is appropriate in the following "helper method" that is invoked by the previous method:

/**
 * Sets the refresh interval (which must correspond to a legal frame rate).
 *
 * @param  interval refresh interval in milliseconds.
*/
 private void setRefreshInterval(int interval) {
  // Confirm adherence to precondition in nonpublic method
  assert interval > 0 && interval <= 1000/MAX_REFRESH_RATE : interval;

  ... // Set the refresh interval
 }

Note, the above assertion will fail if MAX_REFRESH_RATE is greater than 1000 and the client selects a refresh rate greater than 1000. This would, in fact, indicate a bug in the library!

Lock-Status Preconditions

Classes designed for multithreaded use often have non-public methods with preconditions relating to whether or not some lock is held. For example, it is not uncommon to see something like this:

private Object[] a;
public synchronized int find(Object key) {
  return find(key, a, 0, a.length);
}

// Recursive helper method - always called with a lock on this object
private int find(Object key, Object[] arr, int start, int len) {
 ...
}

A static method called holdsLock has been added to the Thread class to test whether the current thread holds the lock on a specified object. This method can be used in combination with an assert statement to supplement a comment describing a lock-status precondition, as shown in the following example:

// Recursive helper method - always called with a lock on this.
private int find(Object key, Object[] arr, int start, int len) {
  assert Thread.holdsLock(this); // lock-status assertion
  ...
}

Note that it is also possible to write a lock-status assertion asserting that a given lock isn't held.

Postconditions

You can test postcondition with assertions in both public and nonpublic methods. For example, the following public method uses an assert statement to check a post condition:

 /**
  * Returns a BigInteger whose value is (this-1 mod m).
  *
  * @param  m the modulus.
  * @return this-1 mod m.
  * @throws ArithmeticException  m <= 0, or this BigInteger
  *has no multiplicative inverse mod m (that is, this BigInteger
  *is not relatively prime to m).
  */
public BigInteger modInverse(BigInteger m) {
  if (m.signum <= 0)
    throw new ArithmeticException("Modulus not positive: " + m);
  ... // Do the computation
  assert this.multiply(result).mod(m).equals(ONE) : this;
  return result;
}

Occasionally it is necessary to save some data prior to performing a computation in order to check a postcondition. You can do this with two assert statements and a simple inner class that saves the state of one or more variables so they can be checked (or rechecked) after the computation. For example, suppose you have a piece of code that looks like this:

 void foo(int[] array) {
  // Manipulate array
  ...

  // At this point, array will contain exactly the ints that it did
  // prior to manipulation, in the same order.
 }

Here is how you could modify the above method to turn the textual assertion of a postcondition into a functional one:

 void foo(final int[] array) {

  // Inner class that saves state and performs final consistency check
  class DataCopy {
private int[] arrayCopy;

DataCopy() { arrayCopy = (int[]) array.clone(); }

boolean isConsistent() { return Arrays.equals(array, arrayCopy); }
  }

  DataCopy copy = null;

  // Always succeeds; has side effect of saving a copy of array
  assert ((copy = new DataCopy()) != null);

  ... // Manipulate array

  // Ensure array has same ints in same order as before manipulation.
  assert copy.isConsistent();
  }

You can easily generalize this idiom to save more than one data field, and to test arbitrarily complex assertions concerning pre-computation and post-computation values.

You might be tempted to replace the first assert statement (which is executed solely for its side-effect) by the following, more expressive statement:

 copy = new DataCopy();

Don't make this replacement. The statement above would copy the array whether or not asserts were enabled, violating the principle that assertions should have no cost when disabled.

Class Invariants

A class invariant is a type of internal invariant that applies to every instance of a class at all times, except when an instance is in transition from one consistent state to another. A class invariant can specify the relationships among multiple attributes, and should be true before and after any method completes. For example, suppose you implement a balanced tree data structure of some sort. A class invariant might be that the tree is balanced and properly ordered.

The assertion mechanism does not enforce any particular style for checking invariants. It is sometimes convenient, though, to combine the expressions that check required constraints into a single internal method that can be called by assertions. Continuing the balanced tree example, it might be appropriate to implement a private method that checked that the tree was indeed balanced as per the dictates of the data structure:

 // Returns true if this tree is properly balanced
 private boolean balanced() {
  ...
 }

Because this method checks a constraint that should be true before and after any method completes, each public method and constructor should contain the following line immediately prior to its return:

 assert balanced();

It is generally unnecessary to place similar checks at the head of each public method unless the data structure is implemented by native methods. In this case, it is possible that a memory corruption bug could corrupt a "native peer" data structure in between method invocations. A failure of the assertion at the head of such a method would indicate that such memory corruption had occurred. Similarly, it may be advisable to include class invariant checks at the heads of methods in classes whose state is modifiable by other classes. (Better yet, design classes so that their state is not directly visible to other classes!)

Advanced Uses

The following sections discuss topics that apply only to resource-constrained devices and to systems where asserts must not be disabled in the field. If you have no interest in these topics, skip to the next section, "Compiling Files that Use Assertions".

Removing all Trace of Assertions from Class Files

Programmers developing applications for resource-constrained devices may wish to strip assertions out of class files entirely. While this makes it impossible to enable assertions in the field, it also reduces class file size, possibly leading to improved class loading performance. In the absence of a high quality JIT, it could lead to decreased footprint and improved runtime performance.

The assertion facility offers no direct support for stripping assertions out of class files. The assert statement may, however, be used in conjunction with the "conditional compilation" idiom described in the Java Language Specification, enabling the compiler to eliminate all traces of these asserts from the class files that it generates:

 static final boolean asserts = ... ; // false to eliminate asserts

 if (asserts)
  assert <expr> ;

Requiring that Assertions are Enabled

Programmers of certain critical systems might wish to ensure that assertions are not disabled in the field. The following static initialization idiom prevents a class from being initialized if its assertions have been disabled:

 static {
  boolean assertsEnabled = false;
  assert assertsEnabled = true; // Intentional side effect!!!
  if (!assertsEnabled)
throw new RuntimeException("Asserts must be enabled!!!");
 }

Put this static-initializer at the top of your class.

Compiling Files That Use Assertions

In order for the javac compiler to accept code containing assertions, you must use the -source 1.4 command-line option as in this example:

 javac -source 1.4 MyClass.java

This flag is necessary so as not to cause source compatibility problems.

Enabling and Disabling Assertions

By default, assertions are disabled at runtime. Two command-line switches allow you to selectively enable or disable assertions.

To enable assertions at various granularities, use the -enableassertions, or -ea, switch. To disable assertions at various granularities, use the -disableassertions, or -da, switch. You specify the granularity with the arguments that you provide to the switch:

  • no arguments
    Enables or disables assertions in all classes except system classes.
  • packageName...
    Enables or disables assertions in the named package and any subpackages.
  • ...
    Enables or disables assertions in the unnamed package in the current working directory.
  • className
    Enables or disables assertions in the named class

For example, the following command runs a program, BatTutor, with assertions enabled in only package com.wombat.fruitbat and its subpackages:

 java -ea:com.wombat.fruitbat... BatTutor

If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. For example, the following command runs the BatTutor program with assertions enabled in package com.wombat.fruitbat but disabled in class com.wombat.fruitbat.Brickbat:

 java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat BatTutor

The above switches apply to all class loaders. With one exception, they also apply to system classes (which do not have an explicit class loader). The exception concerns the switches with no arguments, which (as indicated above) do not apply to system classes.This behavior makes it easy to enable asserts in all classes except for system classes, which is commonly desirable.

To enable assertions in all system classes, use a different switch: -enablesystemassertions, or -esa. Similarly, to disable assertions in system classes, use -disablesystemassertions, or -dsa.

For example, the following command runs the BatTutor program with assertions enabled in system classes, as well as in the com.wombat.fruitbat package and its subpackages:

 java -esa -ea:com.wombat.fruitbat...

The assertion status of a class (enabled or disabled) is set at the time it is initialized, and does not change. There is, however, one corner case that demands special treatment. It is possible, though generally not desirable, to execute methods or constructors prior to initialization. This can happen when a class hierarchy contains a circularity in its static initialization.

If an assert statement executes before its class is initialized, the execution must behave as if assertions were enabled in the class. This topic is discussed in detail in the assertions specification in the Java Language Specification.

Compatibility With Existing Programs

The addition of the assert keyword to the Java programming language does not cause any problems with preexisting binaries (.class files). If you try to compile an application that uses assert as an identifier, however, you will receive a warning or error message. In order to ease the transition from a world where assert is a legal identifier to one where it isn't, the compiler supports two modes of operation in this release:

  • source mode 1.3 (default) — the compiler accepts programs that use assert as an identifier, but issues warnings. In this mode, programs are not permitted to use the assert statement.
  • source mode 1.4 — the compiler generates an error message if the program uses assert as an identifier. In this mode, programs are permitted to use the assert statement.

Unless you specifically request source mode 1.4 with the -source 1.4 flag, the compiler operates in source mode 1.3. If you forget to use this flag, programs that use the new assert statement will not compile. Having the compiler use the old semantics as its default behavior (that is, allowing assert to be used as an identifier) was done for maximal source compatibility. Source mode 1.3 is likely to be phased out over time.

Design FAQ

Here is a collection of frequently asked questions concerning the design of the assertion facility.

  • General Questions
  • Compatibility
  • Syntax and Semantics
  • The AssertionError Class
  • Enabling and Disabling Assertions

General Questions

  • Why provide an assertion facility, given that one can program assertions atop the Java programming language with no special support?

    Although ad hoc implementations are possible, they are of necessity either ugly (requiring an if statement for each assertion) or inefficient (evaluating the condition even if assertions are disabled). Further, each ad hoc implementation has its own means of enabling and disabling assertions, which lessens the utility of these implementations, especially for debugging in the field. As a result of these shortcomings, assertions have never become a part of the culture among engineers using the Java programming language. Adding assertion support to the platform stands a good chance of rectifying this situation.

  • Why does this facility justify a language change, as opposed to a library solution?

    We recognize that a language change is a serious effort, not to be undertaken lightly. The library approach was considered. It was, however, deemed essential that the runtime cost of assertions be negligible if they are disabled. In order to achieve this with a library, the programmer is forced to hard-code each assertion as an if statement. Many programmers would not do this. Either they would omit the if statement and performance would suffer, or they would ignore the facility entirely. Note also that assertions were contained in James Gosling's original specification for the Java programming language. Assertions were removed from the Oak specification because time constraints prevented a satisfactory design and implementation.

  • Why not provide a full-fledged design-by-contract facility with preconditions, postconditions and class invariants, like the one in the Eiffel programming language?

    We considered providing such a facility, but were unable to convince ourselves that it is possible to graft it onto the Java programming language without massive changes to the Java platform libraries, and massive inconsistencies between old and new libraries. Further, we were not convinced that such a facility would preserve the simplicity that is the hallmark of the Java programming language. On balance, we came to the conclusion that a simple boolean assertion facility was a fairly straight-forward solution and far less risky. It's worth noting that adding a boolean assertion facility to the language doesn't preclude adding a full-fledged design-by-contract facility at some time in the future.

    The simple assertion facility does enable a limited form of design-by-contract style programming. The assert statement is appropriate for nonpublic precondition, postcondition and class invariant checking. Public precondition checking should still be performed by checks inside methods that result in particular, documented exceptions, such as IllegalArgumentException and IllegalStateException.

  • In addition to boolean assertions, why not provide an assert-like construct to suppress the execution of an entire block of code if assertions are disabled?

    Providing such a construct would encourage programmers to put complex assertions inline, when they are better relegated to separate methods.

Compatibility

  • Won't the new keyword cause compatibility problems with existing programs that use assert as an identifier?

    Yes, for source files. (Binaries for classes that use assert as an identifier will continue to work fine.) To ease the transition, we implemented a strategy whereby developers can continue using assert as an identifier during a transitional period.

  • Doesn't this facility produce class files that cannot be run against older JREs?

    Yes. Class files will contain calls to the new ClassLoader and Class methods, such as desiredAssertionStatus. If a class file containing calls to these methods is run against an older JRE (whose ClassLoader class doesn't define the methods), the program will fail at run time, throwing a NoSuchMethodError. It is generally the case that programs using new facilities are not compatible with older releases.

Syntax and Semantics

  • Why allow primitive types in Expression2?

    There is no compelling reason to restrict the type of this expression. Allowing arbitrary types provides convenience for developers who, for example, want to associate a unique integer code with each assertion. Further, it makes this expression feel like the argument of System.out.println(...), which is seen as desirable.

The AssertionError Class

  • When an AssertionError is generated by an assert statement in which Expression2 is absent, why isn't the program text of the asserted condition used as the detail message (for example, "height < maxHeight")?

    While doing so might improve out-of-the-box usefulness of assertions in some cases, the benefit doesn't justify the cost of adding all those string constants to .class files and runtime images.

  • Why doesn't an AssertionError allow access to the object that generated it? Similarly, why not pass an arbitrary object from the assertion to the AssertionError constructor in place of a detail message?

    Access to these objects would encourage programmers to attempt to recover from assertion failures, which defeats the purpose of the facility.

  • Why not provide context accessors (like getFile, getline, getMethod) on AssertionError?

    This facility is best provided on Throwable, so it may be used for all throwables, not just assertion errors. We enhanced Throwable with the getStackTrace method to provide this functionality.

  • Why is AssertionError a subclass of Error rather than RuntimeException?

    This issue was controversial. The expert group discussed it at length, and came to the conclusion that Error was more appropriate to discourage programmers from attempting to recover from assertion failures. It is, in general, difficult or impossible to localize the source of an assertion failure. Such a failure indicates that the program is operating "outside of known space," and attempts to continue execution are likely to be harmful. Further, convention dictates that methods specify most runtime exceptions they may throw (with @throws doc comments). It makes little sense to include in a method's specification the circumstances under which it may generate an assertion failure. Such information may be regarded as an implementation detail, which can change from implementation to implementation and release to release.

Enabling and Disabling Assertions

  • Why not provide a compiler flag to completely eliminate assertions from object files?

    It is a firm requirement that it be possible to enable assertions in the field, for enhanced serviceability. It would have been possible to also permit developers to eliminate assertions from object files at compile time. Assertions can contain side effects, though they should not, and such a flag could therefore alter the behavior of a program in significant ways. It is viewed as good thing that there is only one semantics associated with each valid Java program. Also, we want to encourage users to leave asserts in object files so they can be enabled in the field. Finally, the spec demands that assertions behave as if enabled when a class runs before it is initialized. It would be impossible to offer these semantics if assertions were stripped from the class file. Note, however, that the standard "conditional compilation idiom" described in the Java Language Specification can be used to achieve this effect for developers who really want it.

  • Why do the commands that enable and disable assertions use package-tree semantics instead of the more traditional package semantics?

    Hierarchical control is useful, as programmers really do use package hierarchies to organize their code. For example, package-tree semantics allow assertions to be enabled or disabled in all of Swing at one time.

  • Why does setClassAssertionStatus return a boolean instead of throwing an exception if it is invoked when it's too late to set the assertion status (that is, if the named class has already been initialized)?

    No action (other than perhaps a warning message) is necessary or desirable if it's too late to set the assertion status. An exception seems unduly heavyweight.

  • Why not overload a single method name to take the place of setDefaultAssertionStatus and setAssertionStatus?

    Clarity in method naming is for the greater good. Overloading tends to cause confusion.

  • Why not tweak the semantics of desiredAssertionStatus to make it more "programmer friendly" by returning the actual assertion status if a class is already initialized?

    It's not clear that there would be any use for the resulting method. The method isn't designed for application programmer use, and it seems inadvisable to make it slower and more complex than necessary.

  • Why is there no RuntimePermission to prevent applets from enabling/disabling assertions?

    While applets have no reason to call any of the ClassLoader methods for modifying assertion status, allowing them to do so seems harmless. At worst, an applet can mount a weak denial-of-service attack by enabling assertions in classes that have yet to be initialized. Moreover, applets can only affect the assert status of classes that are to be loaded by class loaders that the applets can access. There already exists a RuntimePermission to prevent untrusted code from gaining access to class loaders (getClassLoader).

  • Why not provide a construct to query the assert status of the containing class?

    Such a construct would encourage people to inline complex assertion code, which we view as a bad thing. Further, it is straightforward to query the assert status atop the current API, if you feel you must:

    boolean assertsEnabled = false;
assert assertsEnabled = true;  // Intentional side-effect!!!
// Now assertsEnabled is set to the correct value
  • Why does an assert statement that executes before its class is initialized behave as if assertions were enabled in the class?

  • Few programmers are aware of the fact that a class's constructors and methods can run prior to its initialization. When this happens, it is quite likely that the class's invariants have not yet been established, which can cause serious and subtle bugs. Any assertion that executes in this state is likely to fail, alerting the programmer to the problem. Thus, it is generally helpful to the programmer to execute all assertions encountered while in this state.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Static Import

In order to access static members, it is necessary to qualify references with the class they came from. For example, one must say:
double r = Math.cos(Math.PI * theta);
In order to get around this, people sometimes put static members into an interface and inherit from that interface. This is a bad idea. In fact, it's such a bad idea that there's a name for it: the Constant Interface Antipattern (see Effective Java Item 17). The problem is that a class's use of the static members of another class is a mere implementation detail. When a class implements an interface, it becomes part of the class's public API. Implementation details should not leak into public APIs.

The static import construct allows unqualified access to static members without inheriting from the type containing the static members. Instead, the program imports the members, either individually:

import static java.lang.Math.PI;
or en masse:
import static java.lang.Math.*;
Once the static members have been imported, they may be used without qualification:
double r = cos(PI * theta);
The static import declaration is analogous to the normal import declaration. Where the normal import declaration imports classes from packages, allowing them to be used without package qualification, the static import declaration imports static members from classes, allowing them to be used without class qualification.

So when should you use static import? Very sparingly! Only use it when you'd otherwise be tempted to declare local copies of constants, or to abuse inheritance (the Constant Interface Antipattern). In other words, use it when you require frequent access to static members from one or two classes. If you overuse the static import feature, it can make your program unreadable and unmaintainable, polluting its namespace with all the static members you import. Readers of your code (including you, a few months after you wrote it) will not know which class a static member comes from. Importing all of the static members from a class can be particularly harmful to readability; if you need only one or two members, import them individually. Used appropriately, static import can make your program more readable, by removing the boilerplate of repetition of class names.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Strings in switch Statements

In the JDK 7 release, you can use a String object in the expression of a switch statement:

public String getTypeOfDayWithSwitchStatement(String dayOfWeekArg) {
     String typeOfDay;
     switch (dayOfWeekArg) {
         case "Monday":
             typeOfDay = "Start of work week";
             break;
         case "Tuesday":
         case "Wednesday":
         case "Thursday":
             typeOfDay = "Midweek";
             break;
         case "Friday":
             typeOfDay = "End of work week";
             break;
         case "Saturday":
         case "Sunday":
             typeOfDay = "Weekend";
             break;
         default:
             throw new IllegalArgumentException("Invalid day of the week: " + dayOfWeekArg);
     }
     return typeOfDay;
}

The switch statement compares the String object in its expression with the expressions associated with each case label as if it were using the String.equals method; consequently, the comparison of String objects in switch statements is case sensitive. The Java compiler generates generally more efficient bytecode from switch statements that use String objects than from chained if-then-else statements.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The For-Each Loop

Iterating over a collection is uglier than it needs to be. Consider the following method, which takes a collection of timer tasks and cancels them:
void cancelAll(Collection<TimerTask> c) {
    for (Iterator<TimerTask> i = c.iterator(); i.hasNext(); )
        i.next().cancel();
}

The iterator is just clutter. Furthermore, it is an opportunity for error. The iterator variable occurs three times in each loop: that is two chances to get it wrong. The for-each construct gets rid of the clutter and the opportunity for error. Here is how the example looks with the for-each construct:

void cancelAll(Collection<TimerTask> c) {
    for (TimerTask t : c)
        t.cancel();
}

When you see the colon (:) read it as "in." The loop above reads as "for each TimerTask t in c." As you can see, the for-each construct combines beautifully with generics. It preserves all of the type safety, while removing the remaining clutter. Because you don't have to declare the iterator, you don't have to provide a generic declaration for it. (The compiler does this for you behind your back, but you need not concern yourself with it.)

Here is a common mistake people make when they are trying to do nested iteration over two collections:

List suits = ...;
List ranks = ...;
List sortedDeck = new ArrayList();

// BROKEN - throws NoSuchElementException!
for (Iterator i = suits.iterator(); i.hasNext(); )
    for (Iterator j = ranks.iterator(); j.hasNext(); )
        sortedDeck.add(new Card(i.next(), j.next()));

Can you spot the bug? Don't feel bad if you can't. Many expert programmers have made this mistake at one time or another. The problem is that the next method is being called too many times on the "outer" collection (suits). It is being called in the inner loop for both the outer and inner collections, which is wrong. In order to fix it, you have to add a variable in the scope of the outer loop to hold the suit:

// Fixed, though a bit ugly
for (Iterator i = suits.iterator(); i.hasNext(); ) {
    Suit suit = (Suit) i.next();
    for (Iterator j = ranks.iterator(); j.hasNext(); )
        sortedDeck.add(new Card(suit, j.next()));
}

So what does all this have to do with the for-each construct? It is tailor-made for nested iteration! Feast your eyes:

for (Suit suit : suits)
    for (Rank rank : ranks)
        sortedDeck.add(new Card(suit, rank));

The for-each construct is also applicable to arrays, where it hides the index variable rather than the iterator. The following method returns the sum of the values in an int array:

>// Returns the sum of the elements of a>
int sum(int[] a) {
    int result = 0;
    for (int i : a)
        result += i;
    return result;
}

So when should you use the for-each loop? Any time you can. It really beautifies your code. Unfortunately, you cannot use it everywhere. Consider, for example, the expurgate method. The program needs access to the iterator in order to remove the current element. The for-each loop hides the iterator, so you cannot call remove. Therefore, the for-each loop is not usable for filtering. Similarly it is not usable for loops where you need to replace elements in a list or array as you traverse it. Finally, it is not usable for loops that must iterate over multiple collections in parallel. These shortcomings were known by the designers, who made a conscious decision to go with a clean, simple construct that would cover the great majority of cases.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The try-with-resources Statement

The try-with-resources statement is a try statement that declares one or more resources. A resource is as an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements java.lang.AutoCloseable, which includes all objects which implement java.io.Closeable, can be used as a resource.

The following example reads the first line from a file. It uses an instance of BufferedReader to read data from the file. BufferedReader is a resource that must be closed after the program is finished with it:

static String readFirstLineFromFile(String path) throws IOException {
  try (BufferedReader br = new BufferedReader(new FileReader(path))) {
    return br.readLine();
  }
}

In this example, the resource declared in the try-with-resources statement is a BufferedReader. The declaration statement appears within parentheses immediately after the try keyword. The class BufferedReader, in Java SE 7 and later, implements the interface java.lang.AutoCloseable. Because the BufferedReader instance is declared in a try-with-resource statement, it will be closed regardless of whether the try statement completes normally or abruptly (as a result of the method BufferedReader.readLine throwing an IOException).

Prior to Java SE 7, you can use a finally block to ensure that a resource is closed regardless of whether the try statement completes normally or abruptly. The following example uses a finally block instead of a try-with-resources statement:

static String readFirstLineFromFileWithFinallyBlock(String path) throws IOException {
  BufferedReader br = new BufferedReader(new FileReader(path));
  try {
    return br.readLine();
  } finally {
    if (br != null) br.close();
  }
}

However, in this example, if the methods readLine and close both throw exceptions, then the method readFirstLineFromFileWithFinallyBlock throws the exception thrown from the finally block; the exception thrown from the try block is suppressed. In contrast, in the example readFirstLineFromFile, if exceptions are thrown from both the try block and the try-with-resources statement, then the method readFirstLineFromFile throws the exception thrown from the try block; the exception thrown from the try-with-resources block is suppressed. In Java SE 7 and later, you can retrieve suppressed exceptions; see the section Suppressed Exceptions for more information.

You may declare one or more resources in a try-with-resources statement. The following example retrieves the names of the files packaged in the zip file zipFileName and creates a text file that contains the names of these files:

  public static void writeToFileZipFileContents(String zipFileName, String outputFileName)
    throws java.io.IOException {

    java.nio.charset.Charset charset = java.nio.charset.StandardCharsets.US_ASCII;
    java.nio.file.Path outputFilePath = java.nio.file.Paths.get(outputFileName);

    // Open zip file and create output file with try-with-resources statement

    try (
      java.util.zip.ZipFile zf = new java.util.zip.ZipFile(zipFileName);
      java.io.BufferedWriter writer = java.nio.file.Files.newBufferedWriter(outputFilePath, charset)
    ) {

      // Enumerate each entry

      for (java.util.Enumeration entries = zf.entries(); entries.hasMoreElements();) {

        // Get the entry name and write it to the output file

        String newLine = System.getProperty("line.separator");
        String zipEntryName = ((java.util.zip.ZipEntry)entries.nextElement()).getName() + newLine;
        writer.write(zipEntryName, 0, zipEntryName.length());
      }
    }
  }

In this example, the try-with-resources statement contains two declarations that are separated by a semicolon: ZipFile and BufferedWriter. When the block of code that directly follows it terminates, either normally or because of an exception, the close methods of the BufferedWriter and ZipFile objects are automatically called in this order. Note that the close methods of resources are called in the opposite order of their creation.

The following example uses a try-with-resources statement to automatically close a java.sql.Statement object:

  public static void viewTable(Connection con) throws SQLException {

    String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES";

    try (Statement stmt = con.createStatement()) {

      ResultSet rs = stmt.executeQuery(query);

      while (rs.next()) {
        String coffeeName = rs.getString("COF_NAME");
        int supplierID = rs.getInt("SUP_ID");
        float price = rs.getFloat("PRICE");
        int sales = rs.getInt("SALES");
        int total = rs.getInt("TOTAL");
        System.out.println(coffeeName + ", " + supplierID + ", " + price +
                           ", " + sales + ", " + total);
      }

    } catch (SQLException e) {
      JDBCTutorialUtilities.printSQLException(e);
    }
  }

The resource java.sql.Statement used in this example is part of the JDBC 4.1 and later API.

Note: A try-with-resources statement can have catch and finally blocks just like an ordinary try statement. In a try-with-resources statement, any catch or finally block is run after the resources declared have been closed.

Suppressed Exceptions

An exception can be thrown from the block of code associated with the try-with-resources statement. In the example writeToFileZipFileContents, an exception can be thrown from the try block, and up to two exceptions can be thrown from the try-with-resources statement when it tries to close the ZipFile and BufferedWriter objects. If an exception is thrown from the try block and one or more exceptions are thrown from the try-with-resources statement, then those exceptions thrown from the try-with-resources statement are suppressed, and the exception thrown by the block is the one that is thrown by the writeToFileZipFileContents method. You can retrieve these suppressed exceptions by calling the Throwable.getSuppressed method from the exception thrown by the try block.

Classes That Implement the AutoCloseable or Closeable Interface

See the Javadoc of the AutoCloseable and Closeable interfaces for a list of classes that implement either of these interfaces. The Closeable interface extends the AutoCloseable interface. The close method of the Closeable interface throws exceptions of type IOException while the close method of the AutoCloseable interface throws exceptions of type Exception. Consequently, subclasses of the AutoCloseable interface can override this behavior of the close method to throw specialized exceptions, such as IOException, or no exception at all.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Type Inference for Generic Instance Creation

You can replace the type arguments required to invoke the constructor of a generic class with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context. This pair of angle brackets is informally called the diamond.

For example, consider the following variable declaration:

Map<String, List<String>> myMap = new HashMap<String, List<String>>();

In Java SE 7, you can substitute the parameterized type of the constructor with an empty set of type parameters (<>):

Map<String, List<String>> myMap = new HashMap<>();

Note that to take advantage of automatic type inference during generic class instantiation, you must specify the diamond. In the following example, the compiler generates an unchecked conversion warning because the HashMap() constructor refers to the HashMap raw type, not the Map<String, List<String>> type:

Map<String, List<String>> myMap = new HashMap(); // unchecked conversion warning

Java SE 7 supports limited type inference for generic instance creation; you can only use type inference if the parameterized type of the constructor is obvious from the context. For example, the following example does not compile:

List<String> list = new ArrayList<>();
list.add("A");

  // The following statement should fail since addAll expects
  // Collection<? extends String>

list.addAll(new ArrayList<>());

Note that the diamond often works in method calls; however, it is suggested that you use the diamond primarily for variable declarations.

In comparison, the following example compiles:

// The following statements compile:

List<? extends String> list2 = new ArrayList<>();
list.addAll(list2);

Type Inference and Generic Constructors of Generic and Non-Generic Classes

Note that constructors can be generic (in other words, declare their own formal type parameters) in both generic and non-generic classes. Consider the following example:

class MyClass<X> {
  <T> MyClass(T t) {
    // ...
  }
}

Consider the following instantiation of the class MyClass, which is valid in Java SE 7 and prior releases:

new MyClass<Integer>("")

This statement creates an instance of the parameterized type MyClass<Integer>; the statement explicitly specifies the type Integer for the formal type parameter, X, of the generic class MyClass<X>. Note that the constructor for this generic class contains a formal type parameter, T. The compiler infers the type String for the formal type parameter, T, of the constructor of this generic class (because the actual parameter of this constructor is a String object).

Compilers from releases prior to Java SE 7 are able to infer the actual type parameters of generic constructors, similar to generic methods. However, the compiler in Java SE 7 can infer the actual type parameters of the generic class being instantiated if you use the diamond (<>). Consider the following example which is valid for Java SE 7 and later:

MyClass<Integer> myObject = new MyClass<>("");

In this example, the compiler infers the type Integer for the formal type parameter, X, of the generic class MyClass<X>. It infers the type String for the formal type parameter, T, of the constructor of this generic class.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Underscores in Numeric Literals

In Java SE 7 and later, any number of underscore characters (_) can appear anywhere between digits in a numerical literal. This feature enables you, for example, to separate groups of digits in numeric literals, which can improve the readability of your code.

For instance, if your code contains numbers with many digits, you can use an underscore character to separate digits in groups of three, similar to how you would use a punctuation mark like a comma, or a space, as a separator.

The following example shows other ways you can use the underscore in numeric literals:

long creditCardNumber = 1234_5678_9012_3456L;
long socialSecurityNumber = 999_99_9999L;
float pi =      3.14_15F;
long hexBytes = 0xFF_EC_DE_5E;
long hexWords = 0xCAFE_BABE;
long maxLong = 0x7fff_ffff_ffff_ffffL;
byte nybbles = 0b0010_0101;
long bytes = 0b11010010_01101001_10010100_10010010;

You can place underscores only between digits; you cannot place underscores in the following places:

  • At the beginning or end of a number
  • Adjacent to a decimal point in a floating point literal
  • Prior to an F or L suffix
  • In positions where a string of digits is expected

The following examples demonstrate valid and invalid underscore placements (which are highlighted) in numeric literals:

float pi1 = 3_.1415F;      // Invalid; cannot put underscores adjacent to a decimal point
float pi2 = 3._1415F;      // Invalid; cannot put underscores adjacent to a decimal point
long socialSecurityNumber1
  = 999_99_9999_L;         // Invalid; cannot put underscores prior to an L suffix

int x1 = _52;              // This is an identifier, not a numeric literal
int x2 = 5_2;              // OK (decimal literal)
int x3 = 52_;              // Invalid; cannot put underscores at the end of a literal
int x4 = 5_______2;        // OK (decimal literal)

int x5 = 0_x52;            // Invalid; cannot put underscores in the 0x radix prefix
int x6 = 0x_52;            // Invalid; cannot put underscores at the beginning of a number
int x7 = 0x5_2;            // OK (hexadecimal literal)
int x8 = 0x52_;            // Invalid; cannot put underscores at the end of a number

int x9 = 0_52;             // OK (octal literal)
int x10 = 05_2;            // OK (octal literal)
int x11 = 052_;            // Invalid; cannot put underscores at the end of a number
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Varargs

In past releases, a method that took an arbitrary number of values required you to create an array and put the values into the array prior to invoking the method. For example, here is how one used the MessageFormat class to format a message:
Object[] arguments = {
    new Integer(7),
    new Date(),
    "a disturbance in the Force"
};

String result = MessageFormat.format(
    "At {1,time} on {1,date}, there was {2} on planet "
     + "{0,number,integer}.", arguments);

It is still true that multiple arguments must be passed in an array, but the varargs feature automates and hides the process. Furthermore, it is upward compatible with preexisting APIs. So, for example, the MessageFormat.format method now has this declaration:

    public static String format(String pattern,
                                Object... arguments);

The three periods after the final parameter's type indicate that the final argument may be passed as an array or as a sequence of arguments. Varargs can be used only in the final argument position. Given the new varargs declaration for MessageFormat.format, the above invocation may be replaced by the following shorter and sweeter invocation:

String result = MessageFormat.format(
    "At {1,time} on {1,date}, there was {2} on planet "
    + "{0,number,integer}.",
    7, new Date(), "a disturbance in the Force");

There is a strong synergy between autoboxing and varargs, which is illustrated in the following program using reflection:

// Simple test framework
public class Test {
    public static void main(String[] args) {
        int passed = 0;
        int failed = 0;
        for (String className : args) {
            try {
                Class c = Class.forName(className);
                c.getMethod("test").invoke(c.newInstance());
                passed++;
            } catch (Exception ex) {
                System.out.printf("%s failed: %s%n", className, ex);
                failed++;
            }
        }
        System.out.printf("passed=%d; failed=%d%n", passed, failed);
    }
}

This little program is a complete, if minimal, test framework. It takes a list of class names on the command line. For each class name, it instantiates the class using its parameterless constructor and invokes a parameterless method called test. If the instantiation or invocation throws an exception, the test is deemed to have failed. The program prints each failure, followed by a summary of the test results. The reflective instantiation and invocation no longer require explicit array creation, because the getMethod and invoke methods accept a variable argument list. The program also uses the new printf facility, which relies on varargs. The program reads much more naturally than it would without varargs.

So when should you use varargs? As a client, you should take advantage of them whenever the API offers them. Important uses in core APIs include reflection, message formatting, and the new printf facility. As an API designer, you should use them sparingly, only when the benefit is truly compelling. Generally speaking, you should not overload a varargs method, or it will be difficult for programmers to figure out which overloading gets called.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Logging API Enhancements

  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4

Enhancements in Java SE 6

No current changes to report.

Enhancements in Java SE 5.0

No current changes to report.

Enhancements in Java SE 1.4

No current changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Logging API Enhancements

Documentation Contents

Java Logging Technology

The Java Logging APIs, introduced in package java.util.logging, facilitate software servicing and maintenance at customer sites by producing log reports suitable for analysis by end users, system administrators, field service engineers, and software development teams. The Logging APIs capture information such as security failures, configuration errors, performance bottlenecks, and/or bugs in the application or platform.

The core package includes support for delivering plain text or XML-formatted log records to memory, output streams, consoles, files, and sockets. In addition, the logging APIs are capable of interacting with logging services that already exist on the host operating system.

Overview

  • Overview of key elements.

API Specification

  • java.util.logging reference

API Enhancements

  • Enhancements and Changes in Java SE 5.0

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Logging Overview

Last update Nov 26 2001

1.0 Java Logging Overview
1.1 Overview of Control Flow
1.2 Log Levels
1.3 Loggers
1.4 Logging Methods
1.5 Handlers
1.6 Formatters
1.7 The LogManager
1.8 Configuration File
1.9 Default Configuration
1.10 Dynamic Configuration Updates
1.11 Native Methods
1.12 XML DTD
1.13 Unique Message IDs
1.14 Security
1.15 Configuration Management
1.16 Packaging
1.17 Localization
1.18 Remote Access and Serialization
2.0 Examples
2.1 Simple Use
2.2 Changing the Configuration
2.3 Simple Use, Ignoring Global Configuration
2.4 Sample XML Output
3.0 Appendix A: DTD for XMLFormatter Output

1.0 Java Logging Overview

The logging APIs are described in detail in the Java SE API Specification. The goal of this document is to provide an overview of key elements.

1.1 Overview of Control Flow

Applications make logging calls on Logger objects. Loggers are organized in a hierarchical namespace and child Loggers may inherit some logging properties from their parents in the namespace.

Applications make logging calls on Logger objects. These Logger objects allocate LogRecord objects which are passed to Handler objects for publication. Both Loggers and Handlers may use logging Levels and (optionally) Filters to decide if they are interested in a particular LogRecord. When it is necessary to publish a LogRecord externally, a Handler can (optionally) use a Formatter to localize and format the message before publishing it to an I/O stream.

The previous context describes this graphic

Each Logger keeps track of a set of output Handlers. By default all Loggers also send their output to their parent Logger. But Loggers may also be configured to ignore Handlers higher up the tree.

Some Handlers may direct output to other Handlers. For example, the MemoryHandler maintains an internal ring buffer of LogRecords and on trigger events it publishes its LogRecords through a target Handler. In such cases, any formatting is done by the last Handler in the chain.

The previous context describes this graphic

The APIs are structured so that calls on the Logger APIs can be cheap when logging is disabled. If logging is disabled for a given log level, then the Logger can make a cheap comparison test and return. If logging is enabled for a given log level, the Logger is still careful to minimize costs before passing the LogRecord into the Handlers. In particular, localization and formatting (which are relatively expensive) are deferred until the Handler requests them. For example, a MemoryHandler can maintain a circular buffer of LogRecords without having to pay formatting costs.

1.2 Log Levels

Each log message has an associated log Level. The Level gives a rough guide to the importance and urgency of a log message. Log level objects encapsulate an integer value, with higher values indicating higher priorities.

The Level class defines seven standard log levels, ranging from FINEST (the lowest priority, with the lowest value) to SEVERE (the highest priority, with the highest value).

1.3 Loggers

As stated earlier, client code sends log requests to Logger objects. Each logger keeps track of a log level that it is interested in, and discards log requests that are below this level.

Loggers are normally named entities, using dot-separated names such as "java.awt". The namespace is hierarchical and is managed by the LogManager. The namespace should typically be aligned with the Java packaging namespace, but is not required to follow it slavishly. For example, a Logger called "java.awt" might handle logging requests for classes in the java.awt package, but it might also handle logging for classes in sun.awt that support the client-visible abstractions defined in the java.awt package.

In addition to named Loggers, it is also possible to create anonymous Loggers that don't appear in the shared namespace. See section 1.14.

Loggers keep track of their parent loggers in the logging namespace. A logger's parent is its nearest extant ancestor in the logging namespace. The root Logger (named "") has no parent. Anonymous loggers are all given the root logger as their parent. Loggers may inherit various attributes from their parents in the logger namespace. In particular, a logger may inherit:

  • Logging level. If a Logger's level is set to be null then the Logger will use an effective Level that will be obtained by walking up the parent tree and using the first non-null Level.
  • Handlers. By default a Logger will log any output messages to its parent's handlers, and so on recursively up the tree.
  • Resource bundle names. If a logger has a null resource bundle name, then it will inherit any resource bundle name defined for its parent, and so on recursively up the tree.

1.4 Logging Methods

The Logger class provides a large set of convenience methods for generating log messages. For convenience, there are methods for each logging level, named after the logging level name. Thus rather than calling "logger.log(Level.WARNING,..." a developer can simply call the convenience method "logger.warning(..."

There are two different styles of logging methods, to meet the needs of different communities of users.

First, there are methods that take an explicit source class name and source method name. These methods are intended for developers who want to be able to quickly locate the source of any given logging message. An example of this style is:

void warning(String sourceClass, String sourceMethod, String msg);

Second, there are a set of methods that do not take explicit source class or source method names. These are intended for developers who want easy-to-use logging and do not require detailed source information.

void warning(String msg);

For this second set of methods, the Logging framework will make a "best effort" to determine which class and method called into the logging framework and will add this information into the LogRecord. However, it is important to realize that this automatically inferred information may only be approximate. The latest generation of virtual machines perform extensive optimizations when JITing and may entirely remove stack frames, making it impossible to reliably locate the calling class and method.

1.5 Handlers

Java SE provides the following Handlers:

  • StreamHandler: A simple handler for writing formatted records to an OutputStream.
  • ConsoleHandler: A simple handler for writing formatted records to System.err
  • FileHandler: A handler that writes formatted log records either to a single file, or to a set of rotating log files.
  • SocketHandler: A handler that writes formatted log records to remote TCP ports.
  • MemoryHandler: A handler that buffers log records in memory.

It is fairly straightforward to develop new Handlers. Developers requiring specific functionality can either develop a Handler from scratch or subclass one of the provided Handlers.

1.6 Formatters

Java SE also includes two standard Formatters:
  • SimpleFormatter: Writes brief "human-readable" summaries of log records.
  • XMLFormatter: Writes detailed XML-structured information.

As with Handlers, it is fairly straightforward to develop new Formatters.

1.7 The LogManager

There is a global LogManager object that keeps track of global logging information. This includes:
  • A hierarchical namespace of named Loggers.
  • A set of logging control properties read from the configuration file. See section 1.8.

There is a single LogManager object that can be retrieved using the static LogManager.getLogManager method. This is created during LogManager initialization, based on a system property. This property allows container applications (such as EJB containers) to substitute their own subclass of LogManager in place of the default class.

1.8 Configuration File

The logging configuration can be initialized using a logging configuration file that will be read at startup. This logging configuration file is in standard java.util.Properties format.

Alternatively, the logging configuration can be initialized by specifying a class that can be used for reading initialization properties. This mechanism allows configuration data to be read from arbitrary sources, such as LDAP, JDBC, etc. See the LogManager API Specification for details.

There is a small set of global configuration information. This is specified in the description of the LogManager class and includes a list of root-level Handlers to install during startup.

The initial configuration may specify levels for particular loggers. These levels are applied to the named logger and any loggers below it in the naming hierarchy. The levels are applied in the order they are defined in the configuration file.

The initial configuration may contain arbitrary properties for use by Handlers or by subsystems doing logging. By convention these properties should use names starting with the name of the handler class or the name of the main Logger for the subsystem.

For example, the MemoryHandler uses a property "java.util.logging.MemoryHandler.size" to determine the default size for its ring buffer.

1.9 Default Configuration

The default logging configuration that ships with the JRE is only a default, and can be overridden by ISVs, system admins, and end users.

The default configuration makes only limited use of disk space. It doesn't flood the user with information, but does make sure to always capture key failure information.

The default configuration establishes a single handler on the root logger for sending output to the console.

1.10 Dynamic Configuration Updates

Programmers can update the logging configuration at run time in a variety of ways:
  • FileHandlers, MemoryHandlers, and PrintHandlers can all be created with various attributes.
  • New Handlers can be added and old ones removed.
  • New Loggers can be created and can be supplied with specific Handlers.
  • Levels can be set on target Handlers.

1.11 Native Methods

There are no native APIs for logging.

Native code that wishes to use the Java Logging mechanisms should make normal JNI calls into the Java Logging APIs.

1.12 XML DTD

The XML DTD used by the XMLFormatter is specified in Appendix A.

The DTD is designed with a "<log>" element as the top-level document. Individual log records are then written as "<record>" elements.

Note that in the event of JVM crashes it may not be possible to cleanly terminate an XMLFormatter stream with the appropriate closing </log>. Therefore tools that are analyzing log records should be prepared to cope with un-terminated streams.

1.13 Unique Message IDs

The Java Logging APIs do not provide any direct support for unique message IDs. Those applications or subsystems requiring unique message IDs should define their own conventions and include the unique IDs in the message strings as appropriate.

1.14 Security

The principal security requirement is that untrusted code should not be able to change the logging configuration. Specifically, if the logging configuration has been set up to log a particular category of information to a particular Handler, then untrusted code should not be able to prevent or disrupt that logging.

A new security permission LoggingPermission is defined to control updates to the logging configuration.

Trusted applications are given the appropriate LoggingPermission so they can call any of the logging configuration APIs. Untrusted applets are a different story. Untrusted applets can create and use named Loggers in the normal way, but they are not allowed to change logging control settings, such as adding or removing handlers, or changing log levels. However, untrusted applets are able to create and use their own "anonymous" loggers, using Logger.getAnonymousLogger. These anonymous Loggers are not registered in the global namespace and their methods are not access-checked, allowing even untrusted code to change their logging control settings.

The logging framework does not attempt to prevent spoofing. The sources of logging calls cannot be determined reliably, so when a LogRecord is published that claims to be from a particular source class and source method, it may be a fabrication. Similarly, formatters such as the XMLFormatter do not attempt to protect themselves against nested log messages inside message strings. Thus, a spoof LogRecord might contain a spoof set of XML inside its message string to make it look as if there was an additional XML record in the output.

In addition, the logging framework does not attempt to protect itself against denial of service attacks. Any given logging client can flood the logging framework with meaningless messages in an attempt to conceal some important log message.

1.15 Configuration Management

The APIs are structured so that an initial set of configuration information is read as properties from a configuration file. The configuration information may then be changed programatically by calls on the various logging classes and objects.

In addition, there are methods on LogManager that allow the configuration file to be re-read. When this happens, the configuration file values will override any changes that have been made programatically.

1.16 Packaging

All of the logging class are in the java.* part of the namespace, in the java.util.logging package.

1.17 Localization

Log messages may need to be localized.

Each Logger may have a Resource Bundle name associated with it. The corresponding Resource Bundle can be used to map between raw message strings and localized message strings.

Normally localization will be performed by Formatters. As a convenience, the formatter class provides a formatMessage method that provides some basic localization and formatting support.

1.18 Remote Access and Serialization

As with most Java platform APIs, the logging APIs are designed for use inside a single address space. All calls are intended to be local. However, it is expected that some Handlers will want to forward their output to other systems. There are a variety of ways of doing this:

Some Handlers (such as the SocketHandler) may write data to other systems using the XMLFormatter. This provides a simple, standard, inter-change format that can be parsed and processed on a variety of systems.

Some Handlers may wish to pass LogRecord objects over RMI. The LogRecord class is therefore serializable. However there is a problem in how to deal with the LogRecord parameters. Some parameters may not be serializable and other parameters may have been designed to serialize much more state than is required for logging. To avoid these problems the LogRecord class has a custom writeObject method that converts the parameters to strings (using Object.toString()) before writing them out. See the LogRecord API Specification for details.

Most of the logging classes are not intended to be serializable. Both Loggers and Handlers are stateful classes that are tied into a specific virtual machine. In this respect they are analogous to the java.io classes, which are also not serializable.

2.0 Examples

2.1 Simple Use

The following is a small program that performs logging using the default configuration.

This program relies on the root handlers that were established by the LogManager based on the configuration file. It creates its own Logger object and then makes calls to that Logger object to report various events.

package com.wombat;
import java.util.logging.*;

public class Nose{
    // Obtain a suitable logger.
    private static Logger logger = Logger.getLogger("com.wombat.nose");
    public static void main(String argv[]) {
        // Log a FINE tracing message
        logger.fine("doing stuff");
        try{
            Wombat.sneeze();
        } catch (Exception ex) {
            // Log the exception
            logger.log(Level.WARNING, "trouble sneezing", ex);
        }
        logger.fine("done");
    }
}

2.2 Changing the Configuration

Here's a small program that dynamically adjusts the logging configuration to send output to a specific file and to get lots of information on wombats. The pattern "%t" means the system temporary directory.

public static void main(String[] args) {
    Handler fh = new FileHandler("%t/wombat.log");
    Logger.getLogger("").addHandler(fh);
    Logger.getLogger("com.wombat").setLevel(Level.FINEST);
    ...
}

2.3 Simple Use, Ignoring Global Configuration

Here's a small program that sets up its own logging Handler and ignores the global configuration.

package com.wombat;

import java.util.logging.*;

public class Nose {
    private static Logger logger = Logger.getLogger("com.wombat.nose");
    private static FileHandler fh = new FileHandler("mylog.txt");
    public static void main(String argv[]) {
        // Send logger output to our FileHandler.
        logger.addHandler(fh);
        // Request that every detail gets logged.
        logger.setLevel(Level.ALL);
        // Log a simple INFO message.
        logger.info("doing stuff");
        try {
            Wombat.sneeze();
        } catch (Exception ex) {
            logger.log(Level.WARNING, "trouble sneezing", ex);
        }
        logger.fine("done");
    }
}

2.4 Sample XML Output

Here's a small sample of what some XMLFormatter XML output looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2000-08-23 19:21:05</date>
  <millis>967083665789</millis>
  <sequence>1256</sequence>
  <logger>kgh.test.fred</logger>
  <level>INFO</level>
  <class>kgh.test.XMLTest</class>
  <method>writeLog</method>
  <thread>10</thread>
  <message>Hello world!</message>
</record>
</log>

3.0 Appendix A: DTD for XMLFormatter Output

<!-- DTD used by the java.util.logging.XMLFormatter -->
<!-- This provides an XML formatted log message. -->

<!-- The document type is "log" which consists of a sequence
of record elements -->
<!ELEMENT log (record*)>

<!-- Each logging call is described by a record element. -->
<!ELEMENT record (date, millis, sequence, logger?, level,
class?, method?, thread?, message, key?, catalog?, param*, exception?)>

<!-- Date and time when LogRecord was created in ISO 8601 format -->
<!ELEMENT date (#PCDATA)>

<!-- Time when LogRecord was created in milliseconds since
midnight January 1st, 1970, UTC. -->
<!ELEMENT millis (#PCDATA)>

<!-- Unique sequence number within source VM. -->
<!ELEMENT sequence (#PCDATA)>

<!-- Name of source Logger object. -->
<!ELEMENT logger (#PCDATA)>

<!-- Logging level, may be either one of the constant
names from java.util.logging.Level (such as "SEVERE"
or "WARNING") or an integer value such as "20". -->
<!ELEMENT level (#PCDATA)>

<!-- Fully qualified name of class that issued
logging call, e.g. "javax.marsupial.Wombat". -->
<!ELEMENT class (#PCDATA)>

<!-- Name of method that issued logging call.
It may be either an unqualified method name such as
"fred" or it may include argument type information
in parenthesis, for example "fred(int,String)". -->
<!ELEMENT method (#PCDATA)>

<!-- Integer thread ID. -->
<!ELEMENT thread (#PCDATA)>

<!-- The message element contains the text string of a log message. -->
<!ELEMENT message (#PCDATA)>

<!-- If the message string was localized, the key element provides
the original localization message key. -->
<!ELEMENT key (#PCDATA)>

<!-- If the message string was localized, the catalog element provides
the logger's localization resource bundle name. -->
<!ELEMENT catalog (#PCDATA)>

<!-- If the message string was localized, each of the param elements
provides the String value (obtained using Object.toString())
of the corresponding LogRecord parameter. -->
<!ELEMENT param (#PCDATA)>

<!-- An exception consists of an optional message string followed
by a series of StackFrames. Exception elements are used
for Java exceptions and other java Throwables. -->
<!ELEMENT exception (message?, frame+)>

<!-- A frame describes one line in a Throwable backtrace. -->
<!ELEMENT frame (class, method, line?)>

<!-- an integer line number within a class's source file. -->
<!ELEMENT line (#PCDATA)>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Logging APIs Changes and New Features

Documentation Contents

Logging APIs
Changes and New Features

Changes and New Features in Java SE 5.0

  • The management interface for the logging facility is implemented. Refer to Monitoring and Management API for the Logging Facility.
  • Handlers can now be added to Loggers using the logging configuration file. See the .handlers property in java.util.logging.LogManager. See 4635817 for details.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Additional Security Information For Microsoft Windows - Java SE Monitoring and Management Guide

Documentation Contents
previous Previous Contents
Appendix A

Additional Security Information For Microsoft Windows

How to Secure a Password File on Microsoft Windows Systems

For remote monitoring and management, password and access files are used to control security. How to set the file permissions for a password file is described for Solaris and Linux platforms in Using Password and Access Files in Chapter 2, Monitoring and Management Using JMX Technology.

This appendix describes how to set the file permissions of the password file on a Windows system using a New Technology File System (NTFS) so that only the owner has read and write permissions on this file. If the file system is a File Allocation Table (FAT) 32 system, then security is not supported for this file system and the password file cannot be secured.

Securing a password file is done differently in the different versions of Windows XP. Solutions for both Windows XP Professional Edition and Windows XP Home Edition are provided in this appendix.

procedure graphic To Secure a Password File on Windows XP Professional Edition

The procedure given below will not work if you are running Windows XP Home Edition, which does not allow you to change file permissions graphically. A solution is given in To Secure a Password File on Windows XP Home Edition below.

Note - The solution using the cacls command described in To Secure a Password File on Windows XP Home Edition can also be used on Windows XP Professional Edition, as a command-line alternative to using the graphical interfaces.

  1. In Windows Explorer, navigate to the directory containing the jmxremote.password file.
  2. Right-click on the jmxremote.password file and select the Properties option.
    Displaying the jmxremote.password file properties
  3. Select the Security tab
    Displaying the jmxremote.password file's security properties

    If you are using Windows XP Professional Edition and the computer is not part of a domain, then the Security tab will not be automatically visible. To reveal the Security tab, you must perform the following steps.

    1. Open Windows Explorer, and choose Folder Options from the Tools menu.
    2. Select the View tab and scroll to the bottom of the Advanced Settings and clear the Use Simple File Sharing check box.
      Displaying the Security tab in Windows XP.
    3. Click OK to apply the change.
    4. Restart Windows Explorer.

      The Security tab will now be visible

  4. Select the Advanced button in the Security tab.
    Displaying advanced security properties.
  5. Select the Owner tab to check if the file owner matches the user under which the Java VM is running.
    Checking who owns the password file.
  6. Select the Permissions tab to set the permissions.

    If there are permission entries inherited from a parent directory that allow users or groups other than the owner access to the file, then clear the "Inherit from parent the permission entries that apply to child objects" checkbox.

    Blocking inheritance of file permissions from parent objects.
  7. A dialog box will ask if the inherited permissions should be copied from the parent or removed. Press the Copy button.
    Copying permissions from the parent.
  8. Remove all permission entries that grant access to users or groups other than the file owner.

    Do this by clicking the user or group and pressing the Remove button for all users and groups except the file owner.

    Removing permissions from all users but the owner.

    Now there should be a single permission entry which grants Full Control to the owner.

  9. Press OK to apply the file security change.

    The password file is now secure and can only be accessed by the owner.

  10. Press OK in the jmxremote.password Properties dialog.

procedure graphic To Secure a Password File on Windows XP Home Edition

As stated above, Windows XP Home Edition does not allow you to set file permissions graphically. However, you can set permissions using the cacls command.

  1. Open a command prompt window.
  2. Run the following command
    C:\MyPasswordFile>cacls jmxremote.password

    This command displays the access control list (ACL) of the jmxremote.password file.

  3. Set the access rights so that only your username has read access.

    When no users have been configured on the machine the default username is usually Owner, or a localized translation of Owner.

    C:\MyPasswordFile>cacls jmxremote.password /P Owner:R

    This command grants access to the user Owner with read-only permission, where Owner is the owner of the jmxremote.password file.

  4. Display the ACL again.
    C:\MyPasswordFile>cacls jmxremote.password

    This time, you will see that only the Owner has access to the password file.

    Changing file permissions in Windows XP.
previous Previous Contents
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Document Information - Java SE Monitoring and Management Guide

Documentation Contents
Contents Next Next

Part No: N/A

Java Platform, Standard Edition 6

October 2006
Contents Next Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Document Information - Java SE Monitoring and Management Guide

Documentation Contents

Part No: N/A

Java Platform, Standard Edition 6

October 2006

Copyright (c) 2006 Oracle and/or its affiliates. All Rights Reserved.

Contents Next arrow icon
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in the Java Platform

Documentation Contents

Java SE Monitoring and Management Enhancements

  • Enhancements in Java SE 6

Enhancements in Java SE 6

Monitoring and Management API Enhancements

The Java Platform, Standard Edition (Java SE) provides an API to allow you to monitor and manage the Java Virtual Machine (Java VM) and other applications, in the package java.lang.management.

The Java SE 6 platform includes the following enhancements to this API.

  • Support for java.util.concurrent locks has been added.

    The ThreadMXBean.getThreadInfo methods have been enhanced to report the java.util.concurrent.locks.AbstractOwnableSynchronizer that a thread is waiting to acquire. The Java SE 5.0 only reported an object monitor that a thread was blocked from entering or waiting to acquire.

    In addition, the following new methods have been added in the ThreadMXBean interface:

    • isObjectMonitorUsageSupported()
    • isSynchronizerUsageSupported()
    • findDeadlockedThreads()
  • New classes and methods for obtaining the list of locks owned by a thread and to report which stack frame locked a monitor have been added to the java.lang.management package.
    • New LockInfo class.
    • New MonitorInfo class.
    • New ThreadInfo
methods getLockInfo(),

getLockedMonitors() and
getLockedSynchronizers().
    • New ThreadMXBean methods dumpAllThreads() and getThreadInfo(long[] ids, boolean lockedMonitor, boolean lockedSynchronizers)
  • A new method, getSystemLoadAverage(), has been added to OperatingSystemMXBean to return the system load average.

JConsole Enhancements

The Java SE platform provides a graphical monitoring tool called JConsole. The JConsole tool implements the Java Management Extensions (JMX) API and enables you to monitor the performance of a Java VM and any instrumented applications. Introduced in Java SE 5.0, JConsole became an officially supported feature of Java SE 6.

Some of the enhancements that have been made to the JConsole tool between these two releases are as follows.

  • JConsole Plugin support, that allows you to build your own plug-ins to run with JConsole, for example, to add a custom tab for accessing your applications' MBeans.
  • Dynamic attach capability, allowing you to connect JConsole to any application that supports the dynamic Attach API, that was also added in Java SE 6.
  • Enhanced user interface that makes data more easily accessible.
  • New Overview and VM Summary tabs, for a better presentation of general information about your Java VM.
  • The HotSpot Diagnostic MBean, which provides an API to request heap dump at runtime and also change the setting of certain VM options.
  • Improved presentation of MBeans, to make it easier to access your MBeans' operations and attributes.

Out-of-the-Box Remote Management Enhancements

The Java Java VM has built-in instrumentation that enables you to monitor and manage it using the JMX technology. These built-in management utilities are often referred to as out-of-the-box management tools for the Java VM. The following enhancement has been made to the out-of-the-box management utilities in this release.

  • The remote method invocation (RMI) registry has been secured using the secure sockets layer (SSL). A new management property, com.sun.management.jmxremote.registry.ssl, has been added to enable the use of a SSL-enabled RMI registry so that only legimate clients with the appropriate SSL certificates can obtain the connector stub.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Frequently Asked Questions

Documentation Contents

Frequently Asked Questions
JConsole and Remote Management

JConsole and JMX Remote Management

  1. I run JConsole on Windows. Why does the Local tab in Connect dialog not list any Java processes?
  2. JDK 5 jconsole and jps commands do not work if your username contains '_' (underscore) on Windows. JConsole is unable to find your Java processes.
  3. How to secure the password file on Windows systems?
  4. JConsole fails to connect to an application remotely or locally running on the same machine using the Remote Tab. However, it works when connecting to it using the Local Tab on the same machine.
  5. I am having problem using JConsole to connect to a JVM running on Linux. Connecting to JVM running on Windows and Solaris works fine.
  6. My application has remote management enabled with SSL. How to setup JConsole to connect to my application?
  7. Can I use JConsole to monitor an application through a firewall?

SNMP Based Management

  1. Where is the standard MIB for SNMP management of the Java virtual machine? What version of SNMP protocol does it require?
  2. I'm not able to see all objects the JVM MIB tree. For example, the jvmMemoryHeapUsed OID is missing. Is it a known problem?

JConsole and JMX Remote Management

  1. I run JConsole on Windows. Why does the Local tab in Connect dialog not list any Java process?

    The problem is most likely that your default Windows temporary directory is on a FAT file system. If your TMP file system is NTFS and JConsole does not show your processes, check your username as described in FAQ #2.

    For security reasons, local monitoring and management is only supported if your default Windows temporary directory is on a file system that supports setting permissions on files and directories (for example, on an NTFS file system). It is not supported on a FAT file system that provide insufficient access controls.

    A potential workaround for this issue:
    Set the TMP environment variable to refer to a directory on an NTFS file system, or any file system that supports setting permissions on files and directories before you run your application with local or remote management enabled. Note that this file system should be local to the machine. Setting this option for target applications is application specific. To set this variable in a command prompt or in a batch script, simply enter the following:

    set TMP=path

    The environment variable can be set globally by adding it to the list of environment variables in the System Properties (Control Panel->System, select the "Advanced" tab and click on the "Environment Variables" button). Through this interface, you can choose to set the variable for all processes run by the current user or globally as a system variable for all processes run by the system.

  2. JDK 5 jconsole and jps commands do not work if your username contains '_' (underscore) on Windows. JConsole is unable to find your Java processes.

    It is a known problem in JDK 5 that jconsole and jps commands do not work on Windows if your username contains '_' (underscore). Bug 6301562 will be fixed in a future release.

  3. How to secure the password file on Windows systems?

    Please see the "How to secure a password file on Windows systems" document for details.

  4. JConsole fails to connect to an application remotely or locally running on the same machine using the Remote Tab. However, it works when connecting to it using the Local Tab on the same machine.

    It is most likely a configuration problem. First, make sure your application was started with remote management enabled. (See details from the "Monitoring and Management using JMX" document.) Second, check if SSL is enabled in the management properties to enable remote management and if it is configured properly.

    SSL is enabled by default when the remote management is enabled. You can disable SSL by setting com.sun.management.jmxremote.ssl property to false. If your application is not set up with SSL properly but SSL is enabled for remote management, JConsole will fail to connect to the application. Please see "Using SSL" section in the "Monitoring and Management Using JMX" document for information about using SSL for remote management.

    If the connection failure problem occurs only when your application runs on Linux, please see FAQ #5.

  5. I am having problem using JConsole to connect to a JVM running on Linux. Connecting to JVM running on Windows and Solaris works fine.

    This is most likely a configuration problem on the Linux machine or the management properties specified to run the application. Please also see FAQ #a4 about using SSL.

    You should check the following:

    • Check if the hostname correctly resolves to the host address.

      Run "hostname -i" command. If it reports 127.0.0.1, JConsole would not be able to connect to the JVM running on that Linux machine. To fix this issue, edit /etc/hosts so that the hostname resolves to the host address.

    • Check if the Linux machine is configured to accept packets from the host where JConsole runs on to connect to the application.

      Packet filtering is built in the Linux kernel. You can run "/sbin/iptables --list" to determine if an external client is allowed to connect to the JMX agent created for remote management. You can use the following command to add a rule to allow an external client such as JConsole to connect:

      /usr/sbin/iptables -I INPUT -s jconsole-host -p tcp --destination-port jmxremote-port -j ACCEPT

      where jconsole-host is either the hostname or the host address on which JConsole runs on and jmxremote-port is the port number set for com.sun.management.jmxremote.port for remote management.

  6. My application has remote management enabled with SSL. How to setup JConsole to connect to my application?

    When you enable the application for remote management with SSL, you have set up a digital certificate on the system where the JMX agent (MBean server) is running and configured SSL properly.

    Assuming you created a keystore as described in the JSSE Guide and started your application (Server) as follows:

    % java -Djavax.net.ssl.keyStore=keystore \
      -Djavax.net.ssl.keyStorePassword=password Server

    To connect to this application, you need to run jconsole as follows:

    % jconsole -J-Djavax.net.ssl.trustStore=truststore \
      -J-Djavax.net.ssl.trustStorePassword=trustword
    The above configuration authenticates the server only. If client authentication is set up, you will need to provide a similar keystore for the JConsole's keys, and an appropriate truststore for the application.
  7. Can I use JConsole to monitor an application through a firewall?

    The com.sun.management.jmxremote.port management property specifies the port where the RMI Registry can be reached but the ports where the RMIServer and RMIConnection remote objects are exported is chosen by the RMI stack. To export the remote objects (RMIServer and RMIConnection) on a given port you need to create your own RMI connector server programmatically, as described in the section Mimicking Out-of-the-Box Management Using the JMX Remote API in the Java SE Monitoring and Management Guide. You must specify the JMXServiceURL as follows:

    JMXServiceURL url = new
JMXServiceURL("service:jmx:rmi://localhost:" + port1 +
"/jndi/rmi://localhost:" + port2 +
"/jmxrmi");
    In the command above, port1 is the port number on which the RMIServer and RMIConnection remote objects are exported and port2 is the port number of the RMI Registry.

SNMP Based Management

  1. Where can I find the standard MIB for SNMP management of the Java virtual machine? What version of SNMP protocol does it require?

    The file JVM-MANAGEMENT-MIB.mib is the standard MIB for the Java virtual machine. Some objects exposed in the JVM MIB are 64-bit quantities. To see these objects, you need to use the SNMP v2 protocol. If you can walk the JVM MIB using SNMP v1 protocol, the 64-bit objects are skipped.

  2. I'm not able to see all objects the JVM MIB tree. For example, the jvmMemoryHeapUsed OID is missing. Is it a known problem?

    The JVM MIB includes 64-bit objects which require to use the SNMP v2 protocol. All the 64-bit objects are skipped if you walk the JVM MIB using SNMP v1.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

- 1. Overview of Java SE Monitoring and Management

Key Monitoring and Management Features

Java VM Instrumentation

Monitoring and Management API

Monitoring and Management Tools

Java Management Extensions (JMX) Technology

What are MBeans?

MBean Server

Creating and Registering MBeans

Instrumenting Applications

Platform MXBeans

Platform MBean Server

+ 2. Monitoring and Management Using JMX Technology

+ 3. Using JConsole

+ 4. Using the Platform MBean Server and Platform MXBeans

+ 5. SNMP Monitoring and Management

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

+ 2. Monitoring and Management Using JMX Technology

- 3. Using JConsole

Starting JConsole

Command Syntax

Setting up Local Monitoring

Setting up Remote Monitoring

Setting up Secure Remote Monitoring

Connecting to a JMX Agent

Dynamic Attach

Connecting JConsole to a Local Process

Connecting JConsole to a Remote Process

Connecting Using a JMX Service URL

Presenting the JConsole Tabs

Viewing Overview Information

Saving Chart Data

Monitoring Memory Consumption

Heap and Non-Heap Memory

Memory Pools and Memory Managers

Garbage Collection

Monitoring Thread Use

Detecting Deadlocked Threads

Monitoring Class Loading

Viewing VM Information

Monitoring and Managing MBeans

Constructing the MBean Tree

MBean Attributes

MBean Operations

MBean Notifications

HotSpot Diagnostic MXBean

Creating Custom Tabs

+ 4. Using the Platform MBean Server and Platform MXBeans

+ 5. SNMP Monitoring and Management

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

+ 2. Monitoring and Management Using JMX Technology

+ 3. Using JConsole

- 4. Using the Platform MBean Server and Platform MXBeans

Using the Platform MBean Server

Accessing Platform MXBeans

Accessing Platform MXBeans via the ManagementFactory Class

Accessing Platform MXBeans via an MXBean Proxy

Accessing Platform MXBeans via the MBeanServerConnection Class

Using Oracle JDK's Platform Extension

Accessing MXBean Attributes Directly

Accessing MXBean Attributes via MBeanServerConnection

Monitoring Thread Contention and CPU Time

Managing the Operating System

Logging Management

Detecting Low Memory

Memory Thresholds

Usage Threshold

Collection Usage Threshold

Memory MXBean

Memory Pool MXBean

Polling

Threshold Notifications

+ 5. SNMP Monitoring and Management

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

- Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

+ 2. Monitoring and Management Using JMX Technology

+ 3. Using JConsole

+ 4. Using the Platform MBean Server and Platform MXBeans

+ 5. SNMP Monitoring and Management

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

+ 2. Monitoring and Management Using JMX Technology

+ 3. Using JConsole

+ 4. Using the Platform MBean Server and Platform MXBeans

- 5. SNMP Monitoring and Management

Enabling the SNMP Agent

Access Control List File

To Enable the SNMP Agent in a Single-user Environment

To Enable the SNMP Agent in a Multiple-user Environment

SNMP Monitoring and Management Properties

Configuration Errors

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

- 2. Monitoring and Management Using JMX Technology

Setting System Properties

Enabling the Out-of-the-Box Management

Local Monitoring and Management

Local Monitoring and Management Using JConsole

Remote Monitoring and Management

Using Password Authentication

Disabling Password Authentication

Using SSL

Enabling RMI Registry Authentication

Enabling SSL Client Authentication

Disabling SSL

Disabling Security

Remote Monitoring with JConsole

Remote Monitoring with JConsole with SSL Disabled

Remote Monitoring with JConsole with SSL Enabled

Using Password and Access Files

Password Files

Access Files

Out-of-the-Box Monitoring and Management Properties

Configuration Errors

Connecting to the JMX Agent Programmatically

Setting up Monitoring and Management Programmatically

Mimicking Out-of-the-Box Management Using the JMX Remote API

Example of Mimicking Out-of-the-Box Management

Monitoring Applications through a Firewall

Using an Agent Class to Instrument an Application

+ 3. Using JConsole

+ 4. Using the Platform MBean Server and Platform MXBeans

+ 5. SNMP Monitoring and Management

+ A. Additional Security Information For Microsoft Windows
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

October 2006
++

+ Document Information

Preface

+ 1. Overview of Java SE Monitoring and Management

+ 2. Monitoring and Management Using JMX Technology

+ 3. Using JConsole

+ 4. Using the Platform MBean Server and Platform MXBeans

+ 5. SNMP Monitoring and Management

- A. Additional Security Information For Microsoft Windows

How to Secure a Password File on Microsoft Windows Systems

To Secure a Password File on Windows XP Professional Edition

To Secure a Password File on Windows XP Home Edition
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Monitoring and Management Guide

Documentation Contents
Java SE Monitoring and Management Guide

October 2006
--

Document Information

Preface

1. Overview of Java SE Monitoring and Management

Key Monitoring and Management Features

Java VM Instrumentation

Monitoring and Management API

Monitoring and Management Tools

Java Management Extensions (JMX) Technology

What are MBeans?

MBean Server

Creating and Registering MBeans

Instrumenting Applications

Platform MXBeans

Platform MBean Server

2. Monitoring and Management Using JMX Technology

Setting System Properties

Enabling the Out-of-the-Box Management

Local Monitoring and Management

Local Monitoring and Management Using JConsole

Remote Monitoring and Management

Using Password Authentication

Disabling Password Authentication

Using SSL

Enabling RMI Registry Authentication

Enabling SSL Client Authentication

Disabling SSL

Disabling Security

Remote Monitoring with JConsole

Remote Monitoring with JConsole with SSL Disabled

Remote Monitoring with JConsole with SSL Enabled

Using Password and Access Files

Password Files

Access Files

Out-of-the-Box Monitoring and Management Properties

Configuration Errors

Connecting to the JMX Agent Programmatically

Setting up Monitoring and Management Programmatically

Mimicking Out-of-the-Box Management Using the JMX Remote API

Example of Mimicking Out-of-the-Box Management

Monitoring Applications through a Firewall

Using an Agent Class to Instrument an Application

3. Using JConsole

Starting JConsole

Command Syntax

Setting up Local Monitoring

Setting up Remote Monitoring

Setting up Secure Remote Monitoring

Connecting to a JMX Agent

Dynamic Attach

Connecting JConsole to a Local Process

Connecting JConsole to a Remote Process

Connecting Using a JMX Service URL

Presenting the JConsole Tabs

Viewing Overview Information

Saving Chart Data

Monitoring Memory Consumption

Heap and Non-Heap Memory

Memory Pools and Memory Managers

Garbage Collection

Monitoring Thread Use

Detecting Deadlocked Threads

Monitoring Class Loading

Viewing VM Information

Monitoring and Managing MBeans

Constructing the MBean Tree

MBean Attributes

MBean Operations

MBean Notifications

HotSpot Diagnostic MXBean

Creating Custom Tabs

4. Using the Platform MBean Server and Platform MXBeans

Using the Platform MBean Server

Accessing Platform MXBeans

Accessing Platform MXBeans via the ManagementFactory Class

Accessing Platform MXBeans via an MXBean Proxy

Accessing Platform MXBeans via the MBeanServerConnection Class

Using Oracle JDK's Platform Extension

Accessing MXBean Attributes Directly

Accessing MXBean Attributes via MBeanServerConnection

Monitoring Thread Contention and CPU Time

Managing the Operating System

Logging Management

Detecting Low Memory

Memory Thresholds

Usage Threshold

Collection Usage Threshold

Memory MXBean

Memory Pool MXBean

Polling

Threshold Notifications

5. SNMP Monitoring and Management

Enabling the SNMP Agent

Access Control List File

To Enable the SNMP Agent in a Single-user Environment

To Enable the SNMP Agent in a Multiple-user Environment

SNMP Monitoring and Management Properties

Configuration Errors

A. Additional Security Information For Microsoft Windows

How to Secure a Password File on Microsoft Windows Systems

To Secure a Password File on Windows XP Professional Edition

To Secure a Password File on Windows XP Home Edition
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Monitoring and Management for the Java Platform

Documentation Contents

Monitoring and Management
for the Java Platform

The Java Platform Standard Edition provides comprehensive monitoring and management support for the Java platform.

API Specifications

Java SE includes the following APIs for monitoring and management:

  • java.lang.management - Enables monitoring and managing the Java virtual machine and the underlying operating system. The API enables applications to monitor themselves and enables JMX-compliant tools to monitor and manage a virtual machine locally and remotely.
  • com.sun.management - Oracle's platform extension to the java.lang.management API and the management interface for some other components of the platform.
  • java.util.logging.LoggingMXBean - Enables you to retrieve and set logging information.
  • The Java Management Extensions (JMX) APIs - Defines the architecture, design patterns, interfaces, and services for application and network management and monitoring in Java. For more information, see the JMX documentation.
  • The Attach API - Oracle's platform extension that allows a management agent to be dynamically loaded into a virtual machine.
  • The JConsole API - platform extension that provides a programmatic interface to access JConsole such as adding a JConsole plugin. JTop is an example JConsole plugin available at the JDK_HOME/demo/management/JTop directory.

Tutorials and Programmer's Guides

  • Java SE Monitoring and Management Guide, containing the following chapters:
    • Overview of Java SE Monitoring and Management
    • Monitoring and Management Using the JMX API
    • Using JConsole
    • Using the Platform MBean Server and Platform MXBeans
    • SNMP Monitoring and Management
    • Appendix: Additional Security Information For Microsoft Windows
  • JMX Technology Tutorial, providing an introduction to the JMX technology, via examples demonstrating key functions of the JMX API.
  • Frequently Asked Questions about JConsole and Remote Management of the Java platform.
  • Example code for monitoring and management is provided in the JDK_HOME/demo/management directory following installation of the Java SE platform.

Tools

  • Java Monitoring and Management Console (JConsole)
  • Monitoring Tools - Including jps, jstat, jstatd.

Enhancements

  • Enhancements in Java SE 6 - A list of monitoring and management enhancements introduced in the Java SE 6 platform.

More Information

  • Monitoring and Management Home Page
  • JMX Technology documentation
  • Java HotSpot Technology
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Monitoring and Management Using JMX Technology - Java SE Monitoring and Management Guide

Documentation Contents
Previous Previous Contents Next Next
Chapter 2

Monitoring and Management Using JMX Technology

The Java virtual machine (Java VM ) has built-in instrumentation that enables you to monitor and manage it using the Java Management Extensions (JMX) technology. These built-in management utilities are often referred to as out-of-the-box management tools for the Java VM. You can also monitor any appropriately instrumented applications using the JMX API.

Setting System Properties

To enable and configure the out-of-the-box JMX agent so that it can monitor and manage the Java VM, you must set certain system properties when you start the Java VM. You set a system property on the command-line as follows.

java -Dproperty=value ...

You can set any number of system properties in this way. If you do not specify a value for a management property, then the property is set with its default value. The full set of out-of-the-box management properties is described in Table 2-1 at the end of this chapter. You can also set system properties in a configuration file, as described in Out-of-the-Box Monitoring and Management Properties.

Note - To run the Java VM from the command line, you must add JRE_HOME/bin to your path, where JRE_HOME is the directory containing the Java Runtime Environment (JRE) implementation. Alternatively, you can enter the full path when you type the command.

The following documents describe the syntax and the full set of command-line options supported by the Java HotSpot VMs.

  • Java application launcher for Microsoft Windows

  • Java application launcher for Solaris, Linux, or Mac OS X

Enabling the Out-of-the-Box Management

To monitor a Java platform using the JMX API, you must do the following.

  1. Enable the JMX agent (another name for the platform MBean server) when you start the Java VM. You can enable the JMX agent for:

    • Local monitoring, for a client management application running on the local system.

    • Remote monitoring, for a client management application running on a remote system.

  2. Monitor the Java VM with a tool that complies to the JMX specification, such as JConsole. See Chapter 3, Using JConsole for more information about Console.

These steps are described in the next sections.

Local Monitoring and Management

Under previous releases of the Java SE platform, to allow the JMX client access to a local Java VM, you had to set the following system property when you started the Java VM or Java application.

com.sun.management.jmxremote

Setting this property registered the Java VM platform's MBeans and published the Remote Method Invocation (RMI) connector via a private interface to allow JMX client applications to monitor a local Java platform, that is, a Java VM running on the same machine as the JMX client.

In the Java SE 6 platform, it is no longer necessary to set this system property. Any application that is started on the Java SE 6 platform will support the Attach API, and so will automatically be made available for local monitoring and management when needed.

For example, previously, to enable the JMX agent for the Java SE sample application Notepad, you would have to run the following commands.

% cd JDK_HOME/demo/jfc/Notepad
% java -Dcom.sun.management.jmxremote -jar Notepad.jar

In the above command, JDK_HOME is the directory in which the Java Development Kit (JDK) is installed. In the Java SE 6 platform, you would simply have to run the following command to start Notepad.

% java -jar Notepad.jar

Once Notepad has been started, a JMX client using the Attach API can then enable the out-of-the-box management agent to monitor and manage the Notepad application.

Note - On Windows platforms, for security reasons, local monitoring and management is only supported if your default temporary directory is on a file system that allows the setting of permissions on files and directories (for example, on a New Technology File System (NTFS) file system). It is not supported on a File Allocation Table (FAT) file system, which provides insufficient access controls.

Local Monitoring and Management Using JConsole

Local monitoring with JConsole is useful for development and creating prototypes. Using JConsole locally is not recommended for production environments, because JConsole itself consumes significant system resources. Rather, you should use JConsole on a remote system to isolate it from the platform being monitored.

However, if you do wish to perform local monitoring using JConsole, you start the tool by typing jconsole in a command shell. When you start jconsole without any arguments, it will automatically detect all local Java applications, and display a dialog box that enables you to select the application you want to monitor. Both JConsole and the application must by executed by the same user, since the monitoring and management system uses the operating system's file permissions.

Note - To run JConsole from the command line, you must add JDK_HOME/bin to your path. Alternatively, you can enter the full path when you type the command.

For more information, see Chapter 3, Using JConsole.

Remote Monitoring and Management

To enable monitoring and management from remote systems, you must set the following system property when you start the Java VM.

com.sun.management.jmxremote.port=portNum

In the property above, portNum is the port number through which you want to enable JMX RMI connections. Be sure to specify an unused port number. In addition to publishing an RMI connector for local access, setting this property publishes an additional RMI connector in a private read-only registry at the specified port using a well known name, "jmxrmi".

Note - You must set the above system property in addition to any properties you might set for security.

Remote monitoring and management requires security, to ensure that unauthorized persons cannot control or monitor your application. Password authentication over the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) is enabled by default. You can disable password authentication and SSL separately, as described in the next sections.

For production systems, use SSL client certificates for authentication instead of passwords, or ensure that the client obtains the remote connector object securely, for example through a secure LDAP server or a file in a shared secure file system. See the topics Using SSL and Using LDAP Authentication for more information.

The Java platform supports pluggable login modules for authentication. You can plug in any login module depending on the authentication infrastructure in your organization. The section titled Using LDAP Authentication describes how to plug in the com.sun.security.auth.module.LdapLoginModule for Lightweight Directory Access Protocol (LDAP) based authentication.

After you have enabled the JMX agent for remote use, you can monitor your application using JConsole, as described in Remote Monitoring with JConsole. How to connect to the management agent programmatically is described in Connecting to the JMX Agent Programmatically.

Using Password Authentication

Using LDAP Authentication

The JMXAuthenticator implementation in the JMX agent is based on Java Authentication and Authorization Service (JAAS) technology. Authentication is performed by passing the user credentials to a JAAS javax.security.auth.spi.LoginModule object. The com.sun.security.auth.module.LdapLoginModule class enables authentication using LDAP. You can replace the default LoginModule class with the LdapLoginModule as described next.

Create a JAAS configuration file that would work in the required business organization. An example of a configuration file (ldap.config) is shown next:

ExampleCompanyConfig {
    com.sun.security.auth.module.LdapLoginModule REQUIRED
        userProvider="ldap://example-ds/ou=people,dc=examplecompany,dc=com"
        userFilter="(&(uid={USERNAME})(objectClass=inetOrgPerson))"
        authzIdentity=monitorRole;
    };

The options in the configuration file are briefly explained next. See documentation for the com.sun.security.auth.module.LdapLoginModule class for information about the configuration options shown in the code snippet.

  • The com.sun.security.auth.module.LdapLoginModule REQUIRED option means that authentication using LdapLoginModule is required in order for overall authentication to be successful
  • The userProvider option identifies the LDAP server and the position in the directory tree where user entries are located
  • The userFilter option specifies the search filter to use to locate a user entry in the LDAP directory. The token {USERNAME} is replaced with the username before the filter is used to search the directory.
  • The authzIdentity option specifies the access role for autheticated users. In the example, authenticated users will have the monitorRole. See the Access Files section for more information.

Start your application with the following properties set on the command line:

  • com.sun.management.jmxremote.login.config - This property configures the JMX agent to use the specified JAAS configuration entry.
  • java.security.auth.login.config - specifies the path to the JAAS configuration file.

A sample command line is shown next.

java -Dcom.sun.management.jmxremote.port=5000
     -Dcom.sun.management.jmxremote.login.config=ExampleCompanyConfig
     -Djava.security.auth.login.config=ldap.config
     -jar MyApplication.jar
Using File-Based Password Authentication

The file-based password authentication mechanism supported by the JMX agent stores the password in clear-text and is intended only for development use. For production use, it is strongly recommended that you use SSL client certificates for authentication or plug in a secure login configuration.

Caution - A potential security issue has been identified with password authentication for remote connectors when the client obtains the remote connector from an insecure RMI registry (the default). If an attacker starts a bogus RMI registry on the target server before the legitimate registry is started, then the attacker can steal clients' passwords. This scenario includes the case where you launch a Java VM with remote management enabled, using the system property com.sun.management.jmxremote.port=portNum, even when SSL is enabled. Although such attacks are likely to be noticed, it is nevertheless a vulnerability.

By default, when you enable the JMX agent for remote monitoring, it uses password authentication. However, the way you set it up depends on whether you are in a single-user environment or a multiple-user environment.

Since passwords are stored in clear-text in the password file, it is not advisable to use your regular user name and password for monitoring. Instead, use the user names specified in the password file such as monitorRole and controlRole. For more information, see Using Password and Access Files.

Single-User Environment To Set up a Single-User Environment

You set up the password file in the JRE_HOME/lib/management directory as follows.

  1. Copy the password template file, jmxremote.password.template, to jmxremote.password.
  2. Set file permissions so that only the owner can read and write the password file.
  3. Add passwords for roles such as monitorRole and controlRole.
Multiple-User Environment To Set up a Multiple-User Environment

You set up the password file in the JRE_HOME/lib/management directory as follows.

  1. Copy the password template file, jmxremote.password.template, to your home directory and rename it to jmxremote.password.
  2. Set file permissions so that only you can read and write the password file.
  3. Add passwords for the roles such as monitorRole and controlRole.
  4. Set the following system property when you start the Java VM.
    com.sun.management.jmxremote.password.file=pwFilePath

    In the above property, pwFilePath is the path to the password file.

Disabling Password Authentication

Password authentication for remote monitoring is enabled by default. To disable it, set the following system property when you start the Java VM.

com.sun.management.jmxremote.authenticate=false

Caution - This configuration is insecure. Any remote user who knows (or guesses) your JMX port number and host name will be able to monitor and control your Java application and platform. While it may be acceptable for development, it is not recommended for production systems.

When you disable password authentication, you can also disable SSL, as described in Disabling Security. You may also want to disable passwords, but use SSL client authentication, as described in Enabling SSL Client Authentication.

Using SSL

SSL is enabled by default when you enable remote monitoring and management. To use SSL, you need to set up a digital certificate on the system where the JMX agent (the MBean server) is running and then configure SSL properly. You use the command-line utility keytool to work with certificates. The general procedure is as follows.

Set up SSL To Set up SSL
  1. If you do not already have a key pair and certificate set up on the server:

    • Generate a key pair with the keytool -genkey command.

    • Request a signed certificate from a certificate authority (CA) with the keytool -certreq command.

    • Import the certificate into your keystore with the keytool -import command. See Importing Certificates in the keytool documentation.

      For more information and examples, see keytool - Key and Certificate Management Tool (Solaris, Linux, or Mac OS X) or (Windows platforms).

  2. Configure SSL on the server system.

    A full explanation of configuring and customizing SSL is beyond the scope of this document, but you generally need to set the system properties described in the list below.

    System Property

    Description

    javax.net.ssl.keyStore

    Keystore location.

    javax.net.ssl.keyStoreType

    Default keystore type.

    javax.net.ssl.keyStorePassword

    Default keystore password.

    javax.net.ssl.trustStore

    Truststore location.

    javax.net.ssl.trustStoreType

    Default truststore type.

    javax.net.ssl.trustStorePassword

    Default truststore password.

    For more information about setting system properties, see Setting System Properties above, or consult the following documents.

    • keytool - Key and Certificate Management Tool (Solaris, Linux, or Mac OS X platforms)

    • keytool - Key and Certificate Management Tool (Windows platforms)

    • The section Customizing the Default Key and Trust Stores, Store Types, and Store Passwordsin the JSSE Guide.

Enabling RMI Registry Authentication

When setting up connections for monitoring remote applications, you can optionally bind the RMI connector stub to an RMI registry that is protected by SSL. This allows clients with the appropriate SSL certificates to get the connector stub that is registered in the RMI registry. To protect the RMI registry using SSL, you must set the following system property.

com.sun.management.jmxremote.registry.ssl=true

When this property is set to true, an RMI registry protected by SSL will be created and configured by the out-of-the-box management agent when the Java VM is started. The default value of this property is false. If this property is set to true, in order to have full security then SSL client authentication must also be enabled, as described in the next section.

Enabling SSL Client Authentication

To enable SSL client authentication, set the following system property when you start the Java VM.

com.sun.management.jmxremote.ssl.need.client.auth=true

SSL must be enabled (the default), to use client SSL authentication. This configuration requires the client system to have a valid digital certificate. You must install a certificate and configure SSL on the client system, as described in Using SSL. As stated in the previous section, if RMI registry SSL protection is enabled, then client SSL authentication must be set to true.

Disabling SSL

To disable SSL when monitoring remotely, you must set the following system property when you start the Java VM.

com.sun.management.jmxremote.ssl=false

Password authentication will still be required unless you disable it, as specified in Disabling Password Authentication.

Disabling Security

To disable both password authentication and SSL (namely to disable all security), you should set the following system properties when you start the Java VM.

com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false

Caution - This configuration is insecure: any remote user who knows (or guesses) your port number and host name will be able to monitor and control your Java applications and platform. Furthermore, possible harm is not limited to the operations you define in your MBeans. A remote client could create a javax.management.loading.MLet MBean and use it to create new MBeans from arbitrary URLs, at least if there is no security manager. In other words, a rogue remote client could make your Java application execute arbitrary code.

Consequently, while disabling security might be acceptable for development, it is strongly recommended that you do not disable security for production systems.

Remote Monitoring with JConsole

You can remotely monitor an application using JConsole, with or without security enabled.

Remote Monitoring with JConsole with SSL Disabled

To monitor a remote application with SSL disabled, you would start JConsole with the following command.

% jconsole hostName:portNum

You can also omit the host name and port number, and enter them in the dialog box that JConsole provides.

Remote Monitoring with JConsole with SSL Enabled

To monitor a remote application with SSL enabled, you need to set up the truststore on the system where JConsole is running and configure SSL properly. For example, you can create a keystore as described in the JSSE Guide and start your application (called Server in this example) with the following commands.

% java -Djavax.net.ssl.keyStore=keystore \
  -Djavax.net.ssl.keyStorePassword=password Server

If you created the keystore and started Server as shown above, then you would have to start JConsole as follows.

% jconsole -J-Djavax.net.ssl.trustStore=truststore \
  -J-Djavax.net.ssl.trustStorePassword=trustword

The above configuration authenticates the server only. If SSL client authentication is set up, you will need to provide a similar keystore for JConsole's keys, and an appropriate truststore for the application.

See Customizing the Default Key and Trust Stores, Store Types, and Store Passwords in the JSSE Guide for information.

For more information on using JConsole, see Chapter 3, Using JConsole.

Using Password and Access Files

The password and access files control security for remote monitoring and management. These files are located by default in JRE_HOME/lib/management and are in the standard Java properties file format. For more information on the format, see the API reference for the java.util.Properties package.

Password Files

The password file defines the different roles and their passwords. The access control file (jmxremote.access by default) defines the permitted access for each role. To be functional, a role must have an entry in both the password and the access files.

The JRE implementation contains a password file template named jmxremote.password.template. Copy this file to JRE_HOME/lib/management/jmxremote.password or to your home directory, and add the passwords for the roles defined in the access file.

You must ensure that only the owner has read and write permissions on this file, since it contains the passwords in clear text. For security reasons, the system checks that the file is only readable by the owner and exits with an error if it is not. Thus in a multiple-user environment, you should store the password file in private location such as your home directory.

Property names are roles, and the associated value is the role's password. For example, the following are sample entries in the password file.

Example 2-1 An Example Password File
# specify actual password instead of the text password
monitorRole password
controlRole password

On Solaris, Linux, or Mac OS X operating systems, you can set the file permissions for the password file by running the following command.

chmod 600 jmxremote.password

For instructions on how to set file permissions on Windows platforms, see Appendix A, Additional Security Information For Microsoft Windows.

Access Files

By default, the access file is named jmxremote.access. Property names are identities from the same space as the password file. The associated value must be either readonly or readwrite.

The access file defines roles and their access levels. By default, the access file defines the two following primary roles.

  • monitorRole, which grants read-only access for monitoring.

  • controlRole, which grants read-write access for monitoring and management.

An access control entry consists of a role name and an associated access level. The role name cannot contain spaces or tabs and must correspond to an entry in the password file. The access level can be either one of the following.

  • readonly, which grants access to read an MBean's attributes. For monitoring, this means that a remote client in this role can read measurements but cannot perform any action that changes the environment of the running program. The remote client can also listen to MBean notifications.

  • readwrite, which grants access to read and write an MBean's attributes, to invoke operations on them, and to create or remove them. This access should be granted to only trusted clients, since they can potentially interfere with the operation of an application.

A role should have only one entry in the access file. If a role has no entry, it has no access. If a role has multiple entries, then the last entry takes precedence. Typical predefined roles in the access file resemble the following.

Example 2-2 An Example Access File
# The "monitorRole" role has readonly access.
# The "controlRole" role has readwrite access.
monitorRole readonly
controlRole readwrite

Out-of-the-Box Monitoring and Management Properties

You can set out-of-the-box monitoring and management properties in a configuration file or on the command line. Properties specified on the command line override properties in a configuration file. The default location for the configuration file is JRE_HOME/lib/management/management.properties. The Java VM reads this file if either of the command-line properties com.sun.management.jmxremote or com.sun.management.jmxremote.port are set. Management via the Simple Network Management Protocol (SNMP) uses the same configuration file. For more information about SNMP monitoring, see Chapter 5, SNMP Monitoring and Management.

You can specify a different location for the configuration file with the following command-line option.

com.sun.management.config.file=ConfigFilePath

In the property above, ConfigFilePath is the path to the configuration file.

Table 2-1 describes all the out-of-the-box monitoring and management properties.

Table 2-1 Out-of-the-Box Monitoring and Management Properties
Property | Description | Values
com.sun.management.jmxremote | Enables the JMX remote agent and local monitoring via a JMX connector published on a private interface used by JConsole and any other local JMX clients that use the Attach API. JConsole can use this connector if it is started by the same user as the user that started the agent. No password or access files are checked for requests coming via this connector. | true / false. Default is true.
com.sun.management.jmxremote. port | Enables the JMX remote agent and creates a remote JMX connector to listen through the specified port. By default, the SSL, password, and access file properties are used for this connector. It also enables local monitoring as described for the com.sun.management.jmxremote property. | Port number. No default.
com.sun.management.jmxremote. registry.ssl | Binds the RMI connector stub to an RMI registry protected by SSL. | true / false. Default is false.
com.sun.management.jmxremote. ssl | Enables secure monitoring via SSL. If false, then SSL is not used. | true / false. Default is true.
com.sun.management.jmxremote. ssl.enabled.protocols | A comma-delimited list of SSL/TLS protocol versions to enable. Used in conjunction with com.sun.management.jmxremote.ssl. | Default SSL/TLS protocol version.
com.sun.management.jmxremote. ssl.enabled.cipher.suites | A comma-delimited list of SSL/TLS cipher suites to enable. Used in conjunction with com.sun.management.jmxremote.ssl. | Default SSL/TLS cipher suites.
com.sun.management.jmxremote. ssl.need.client.auth | If this property is true and the property com.sun.management.jmxremote.ssl is also true, then client authentication will be performed. | true / false. Default is true.
com.sun.management.jmxremote. authenticate | If this property is false then JMX does not use passwords or access files: all users are allowed all access. | true / false. Default is true.
com.sun.management.jmxremote. password.file | Specifies location for password file. If com.sun.management.jmxremote.authenticate is false, then this property and the password and access files are ignored. Otherwise, the password file must exist and be in the valid format. If the password file is empty or nonexistent, then no access is allowed. | JRE_HOME/lib/management/ jmxremote.password
com.sun.management.jmxremote. access.file | Specifies location for the access file. If com.sun.management.jmxremote.authenticate is false, then this property and the password and access files are ignored. Otherwise, the access file must exist and be in the valid format. If the access file is empty or nonexistent, then no access is allowed. | JRE_HOME/lib/management/ jmxremote.access
com.sun.management.jmxremote.login.config | Specifies the name of a Java Authentication and Authorization Service (JAAS) login configuration entry to use when the JMX agent authenticates users. When using this property to override the default login configuration, the named configuration entry must be in a file that is loaded by JAAS. In addition, the login modules specified in the configuration should use the name and password callbacks to acquire the user's credentials. For more information, see the API documentation for javax.security.auth.callback.NameCallback and javax.security.auth.callback.PasswordCallback. | Default login configuration is a file-based password authentication.

Configuration Errors

If any errors occur during start up of the MBean server, the RMI registry, or the connector, the Java VM will throw an exception and exit. Configuration errors include the following.

  • Failure to bind to the port number.

  • Invalid password file.

  • Invalid access file.

  • Password file is readable by users other than the owner.

If your application runs a security manager, then additional permissions are required in the security permissions file.

Connecting to the JMX Agent Programmatically

Once you have enabled the JMX agent, a client can use the following URL to access the monitoring service.

service:jmx:rmi:///jndi/rmi://hostName:portNum/jmxrmi

A client can create a connector for the agent by instantiating a javax.management.remote.JMXServiceURL object using the URL, and then creating a connection using the JMXConnectorFactory.connect method, shown in Example 2-3.

Example 2-3 Creating a Connection Using JMXConnectorFactory.connect
MXServiceURL u = new JMXServiceURL(
  "service:jmx:rmi:///jndi/rmi://" + hostName + ":" + portNum +  "/jmxrmi");
  JMXConnector c = JMXConnectorFactory.connect(u);

Setting up Monitoring and Management Programmatically

As stated previously, in the Java SE platform version 6, you can create a JMX client that uses the Attach API to enable out-of-the-box monitoring and management of any applications that are started on the Java SE 6 platform, without having to configure the applications for monitoring when you launch them. The Attach API provides a way for tools to attach to and start agents in the target application. Once an agent is running, JMX clients (and other tools) are able to obtain the JMX connector address for that agent via a property list that is maintained by the Java VM on behalf of the agents. The properties in the list are accessible from tools that use the Attach API. So, if an agent is started in an application, and if the agent creates a property to represent a piece of configuration information, then that configuration information is available to tools that attach to the application.

The JMX agent creates a property with the address of the local JMX connector server. This allows JMX tools to attach to and get the connector address of an agent, if it is running.

Example 2-4 shows code that could be used in a JMX tool to attach to a target VM, get the connector address of the JMX agent and connect to it.

Example 2-4 Attaching a JMX tool to a connector and getting the agent's address
static final String CONNECTOR_ADDRESS =
 "com.sun.management.jmxremote.localConnectorAddress";

// attach to the target application
VirtualMachine vm = VirtualMachine.attach(id);

// get the connector address
String connectorAddress =
    vm.getAgentProperties().getProperty(CONNECTOR_ADDRESS);

// no connector address, so we start the JMX agent
if (connectorAddress == null) {
   String agent = vm.getSystemProperties().getProperty("java.home") +
       File.separator + "lib" + File.separator + "management-agent.jar";
   vm.loadAgent(agent);

   // agent is started, get the connector address
   connectorAddress =
       vm.getAgentProperties().getProperty(CONNECTOR_ADDRESS);
}

// establish connection to connector server
JMXServiceURL url = new JMXServiceURL(connectorAddress);
JMXConnector = JMXConnectorFactory.connect(url);

Example 2-4 uses the com.sun.tools.attach.VirtualMachine class's attach() method to attach to a given Java VM so that it can read the properties that the target Java VM maintains on behalf of any agents running in it. If an agent is already running, then the VirtualMachine class's getAgentProperties() method is called to obtain the agent's address. The getAgentProperties() method returns a string property for the local connector address com.sun.management.jmxremote.localConnectorAddress, that you can use to connect to the local JMX agent.

If no agent is running already, then one is loaded by the VirtualMachine from JRE_HOME/lib/management-agent.jar, and its connector address is obtained by getAgentProperties().

A connection to the agent is then established by calling JMXConnectorFactory.connect on a JMX service URL that has been constructed from this connector address.

Mimicking Out-of-the-Box Management Using the JMX Remote API

As explained above, remote access to the out-of-the-box management agent is protected by authentication and authorization, and by SSL encryption, and all configuration is performed by setting system properties or by defining a management.properties file. In most cases, using the out-of-the-box management agent and configuring it through the management.properties file is more than sufficient to provide secure management of remote Java VMs. However, in some cases greater levels of security are required and in other cases certain system configurations do not allow the use of a management.properties file. Such cases might involve exporting the RMI server's remote objects over a certain port to allow passage through a firewall, or exporting the RMI server's remote objects using a specific network interface in multi-homed systems. For such cases, the behavior of the out-of-the-box management agent can be mimicked by using the JMX Remote API directly to create, configure and deploy the management agent programmatically.

Example of Mimicking Out-of-the-Box Management

This section provides an example of how to implement a JMX agent that identically mimics an out-of-the-box management agent. In exactly the same way as the out-of-the-box management agent, the agent created in Example 2-5 will run on port 3000, will have a password file named password.properties, an access file named access.properties and it will implement the default configuration for SSL/TLS-based RMI Socket Factories, requiring server authentication only. This example assumes a keystore has already been created, as described in Using SSL. Information about how to set up the SSL configuration can be found in the JSSE Reference Guide.

To enable monitoring and management on an application named com.example.MyApp using the out-of-the-box JMX agent with the configuration described above, you would run com.example.MyApp with the following command.

% java -Dcom.sun.management.jmxremote.port=3000 \
     -Dcom.sun.management.jmxremote.password.file=password.properties \
     -Dcom.sun.management.jmxremote.access.file=access.properties \
     -Djavax.net.ssl.keyStore=keystore \
     -Djavax.net.ssl.keyStorePassword=password \
     com.example.MyApp

Note - The com.sun.management.jmxremote.* properties could have been specified in a management.properties file instead of passing them at the command line. In that case, the system property -Dcom.sun.management.config.file=management.properties would be required to specify the location of the management.properties file.

Example 2-5 shows the code you would need to write to create programmatically a JMX agent that will allow exactly the same monitoring and management on com.example.MyApp as would be possible using the command above.

Example 2-5 Mimicking an Out-of-the-Box JMX Agent Programmatically
package com.example;

import java.lang.management.*;
import java.rmi.registry.*;
import java.util.*;
import javax.management.*;
import javax.management.remote.*;
import javax.management.remote.rmi.*;
import javax.rmi.ssl.*;

public class MyApp {

    public static void main(String[] args) throws Exception {

        // Ensure cryptographically strong random number generator used
        // to choose the object number - see java.rmi.server.ObjID
        //
        System.setProperty("java.rmi.server.randomIDs", "true");

        // Start an RMI registry on port 3000.
        //
        System.out.println("Create RMI registry on port 3000");
        LocateRegistry.createRegistry(3000);

        // Retrieve the PlatformMBeanServer.
        //
        System.out.println("Get the platform's MBean server");
        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

        // Environment map.
        //
        System.out.println("Initialize the environment map");
        HashMap<String,Object> env = new HashMap<String,Object>();

        // Provide SSL-based RMI socket factories.
        //
        // The protocol and cipher suites to be enabled will be the ones
        // defined by the default JSSE implementation and only server
        // authentication will be required.
        //
        SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
        SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory();
        env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf);

        // Provide the password file used by the connector server to
        // perform user authentication. The password file is a properties
        // based text file specifying username/password pairs.
        //
        env.put("jmx.remote.x.password.file", "password.properties");

        // Provide the access level file used by the connector server to
        // perform user authorization. The access level file is a properties
        // based text file specifying username/access level pairs where
        // access level is either "readonly" or "readwrite" access to the
        // MBeanServer operations.
        //
        env.put("jmx.remote.x.access.file", "access.properties");

        // Create an RMI connector server.
        //
        // As specified in the JMXServiceURL the RMIServer stub will be
        // registered in the RMI registry running in the local host on
        // port 3000 with the name "jmxrmi". This is the same name the
        // out-of-the-box management agent uses to register the RMIServer
        // stub too.
        //
        System.out.println("Create an RMI connector server");
        JMXServiceURL url =
            new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:3000/jmxrmi");
        JMXConnectorServer cs =
            JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);

        // Start the RMI connector server.
        //
        System.out.println("Start the RMI connector server");
        cs.start();
    }
}

Start this application with the following command.

java -Djavax.net.ssl.keyStore=keystore \
     -Djavax.net.ssl.keyStorePassword=password \
     com.example.MyApp

The com.example.MyApp application will enable the JMX agent and will be able to be monitored and managed in exactly the same way as if the Java platform's out-of-the-box management agent had been used. However, there is one slight but important difference between the RMI registry used by the out-of-the-box management agent and the one used by a management agent that mimics it. The RMI registry used by the out-of-the-box management agent is read-only, namely a single entry can be bound to it and once bound this entry cannot be unbound. This is not true of the RMI registry created in Example 2-5.

Furthermore, both RMI registries are insecure as they do not use SSL/TLS. The RMI registries should be created using SSL/TLS-based RMI socket factories which require client authentication. This will prevent a client from sending its credentials to a rogue RMI server and will also prevent the RMI registry from giving access to the RMI server stub to a non-trusted client.

RMI registries which implement SSL/TLS RMI socket factories can be created by adding the following properties to your management.properties file.

com.sun.management.jmxremote.registry.ssl=true
com.sun.management.jmxremote.ssl.need.client.auth=true

Example 2-5 mimics the main behavior of the out-of-the-box JMX agent, but does not replicate all the existing properties in the management.properties file. However, you could add other properties by modifying com.example.MyApp appropriately.

Monitoring Applications through a Firewall

As stated above, the code in Example 2-5 can be used to monitor applications through a firewall, which might not be possible if you use the out-of-the-box monitoring solution. The com.sun.management.jmxremote.port management property specifies the port where the RMI Registry can be reached but the ports where the RMIServer and RMIConnection remote objects are exported is chosen by the RMI stack. To export the remote objects (RMIServer and RMIConnection) to a given port you need to create your own RMI connector server programmatically, as described in Example 2-5. However, you must specify the JMXServiceURL as follows:

JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:" +
      port1  + "/jndi/rmi://localhost:" + port2 + "/jmxrmi");

In the URL above, port1 is the port number on which the RMIServer and RMIConnection remote objects are exported and port2 is the port number of the RMI Registry.

Using an Agent Class to Instrument an Application

The Java SE platform provides services that allow Java programming language agents to instrument programs running on the Java VM. Creating an instrumentation agent means you do not have to add any new code to your application in order to allow it to be monitored. Instead of implementing monitoring and management in your application's static main method you implement it in a separate agent class, and start your application with the -javaagent option specified. See the API reference documentation for the java.lang.instrument package for full details about how to create an agent class to instrument your applications.

The following procedure shows how you can adapt the code of com.example.MyApp to make an agent to instrument any other application for monitoring and management.

Creating an Agent Class Creating an Agent Class to Instrument an Application

  1. Create a com.example.MyAgent class.

    Create a class called com.example.MyAgent, declaring a premain method rather than a main method.

    package com.example;

[...]

public class MyAgent {

    public static void premain(String args) throws Exception {

    [...]

    The rest of the code for the com.example.MyAgent class can be exactly the same as the com.example.MyApp class shown in Example 2-5.

  2. Compile the com.example.MyAgent class.
  3. Create a manifest file, MANIFEST.MF, with a Premain-Class entry.

    An agent is deployed as a Java archive (JAR) file. An attribute in the JAR file manifest specifies the agent class which will be loaded to start the agent. Create a file called MANIFEST.MF, containing the following line.

    Premain-Class: com.example.MyAgent
  4. Create a JAR file, MyAgent.jar.

    The JAR file should contain the following files.

    • META-INF/MANIFEST.MF

    • com/example/MyAgent.class

  5. Start an application, specifying the agent to provide monitoring and management services.

    You can use com.example.MyAgent to instrument any application for monitoring and management. This example uses the Notepad application.

    % java -javaagent:MyAgent.jar -Djavax.net.ssl.keyStore=keystore \
      -Djavax.net.ssl.keyStorePassword=password -jar Notepad.jar

    The com.example.MyAgent agent is specified using the -javaagent option when you start Notepad. Also, if your com.example.MyAgent application replicates the same code as the com.example.MyApp application shown in Example 2-5, then you will need to provide the keystore and password because the RMI connector server is protected by SSL.
Previous Previous Contents Next Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview of Java SE Monitoring and Management - Java SE Monitoring and Management Guide

Documentation Contents
arrow icon Previous Contents Next arrow icon
Chapter 1

Overview of Java SE Monitoring and Management

This chapter introduces the features and utilities that provide monitoring and management services to the Java Platform, Standard Edition (Java SE platform). The features introduced here will be expanded upon in the following chapters of this guide.

Key Monitoring and Management Features

The Java SE platform includes significant monitoring and management features. These features fall into four broad categories.

  • Instrumentation for the Java Virtual Machine (Java VM).

  • Monitoring and Management application programming interfaces (API).

  • Monitoring and Management tools.

  • The Java Management Extensions (JMX) technology.

These categories of monitoring and management features are introduced further in the next sections.

Java VM Instrumentation

The Java VM is instrumented for monitoring and management, enabling built-in (or out-of-the-box) management capabilities that can be accessed both remotely and locally. For more information, see Chapter 2, Monitoring and Management Using JMX Technology and Chapter 5, SNMP Monitoring and Management.

The Java VM includes a platform MBean server and platform MBeans for use by management applications that conform to the JMX specification. These are implementations of the monitoring and management API described in the next section. Platform MXBeans and MBean servers are introduced in Platform MXBeans and Platform MBean Server.

Example code is provided in the JDK_HOME/demo/management directory, where JDK_HOME is the directory in which the Java Development Kit (JDK) is installed.

Monitoring and Management API

The java.lang.management package provides the interface for monitoring and managing the Java VM. This API provides access to the following types of information.

  • Number of classes loaded and threads running.

  • Java VM uptime, system properties, and VM input arguments.

  • Thread state, thread contention statistics, and stack trace of live threads.

  • Memory consumption.

  • Garbage collection statistics.

  • Low memory detection.

  • On-demand deadlock detection.

  • Operating system information.

In addition to the java.lang.management API, the java.util.logging.LoggingMXBean API provides allows you to perform monitoring and management of logging.

Monitoring and Management Tools

The Java SE platform provides a graphical monitoring tool called JConsole. JConsole implements the JMX API and enables you to monitor the performance of a Java VM and any instrumented applications, by providing information to help you optimize performance. Introduced in the Java SE platform 5.0, JConsole became an officially supported feature of the platform in the Java SE 6.

Some of the enhancements that have been made to JConsole between these two releases of the Java SE platform are as follows.

  • JConsole Plug-in support, that allows you to build your own plug-ins to run with JConsole, for example, to add a custom tab for accessing your applications' MBeans.

  • Dynamic attach capability, allowing you to connect JConsole to any application that supports the Attach API, that was added to the Java SE platform, version 6.

  • Enhanced user interface, that makes data more easily accessible.

  • New Overview and VM Summary tabs, for a better presentation of general information about your Java VM.

  • The HotSpot Diagnostic MBean, which provides an API to request heap dump at runtime and also change the setting of certain VM options.

  • Improved presentation of MBeans, to make it easier to access your MBeans' operations and attributes.

JConsole is presented in full in Chapter 3, Using JConsole.

Other command-line tools are also supplied with the Java SE platform. See the Monitoring Tools section of the JDK Development Tools document for more information.

Java Management Extensions (JMX) Technology

The Java SE platform, version 8 includes the JMX specification, version 1.4. The JMX API allows you to instrument applications for monitoring and management. An RMI connector allows this instrumentation to be remotely accessible, for example by JConsole.

For more information, see the JMX technology documentation for the Java SE platform. A very brief introduction to the main components of the JMX API is included in the next sections.

What are MBeans?

JMX technology MBeans are managed beans, namely Java objects that represent resources to be managed. An MBean has a management interface consisting of the following.

  • Named and typed attributes that can be read and written.

  • Named and typed operations that can be invoked.

  • Typed notifications that can be emitted by the MBean.

For example, an MBean representing an application's configuration could have attributes representing different configuration parameters, such as a cache size. Reading the CacheSize attribute would return the current size of the cache. Writing CacheSize would update the size of the cache, potentially changing the behavior of the running application. An operation such as save could store the current configuration persistently. The MBean could send a notification such as ConfigurationChangedNotification when the configuration changes.

MBeans can be standard or dynamic. Standard MBeans are Java objects that conform to design patterns derived from the JavaBeans component model. Dynamic MBeans define their management interface at runtime. More recently, an additional type of MBean called an MXBean has also been added to the Java platform.

  • A standard MBean exposes the resource to be managed directly through its attributes and operations. Attributes are exposed through "getter" and "setter" methods. Operations are the other methods of the class that are available to managers. All these methods are defined statically in the MBean interface and are visible to a JMX agent through introspection. This is the most straightforward way of making a new resource manageable.

  • A dynamic MBean is an MBean that defines its management interface at runtime. For example, a configuration MBean could determine the names and types of the attributes it exposes by parsing an XML file.

  • An MXBean is a type of MBean that provides a simple way to code an MBean that only references a predefined set of types. In this way, you can be sure that your MBean will be usable by any client, including remote clients, without any requirement that the client have access to model-specific classes representing the types of your MBeans. The platform MBeans introduced below are all MXBeans.

MBean Server

To be useful, an MBean must be registered in an MBean server. An MBean Server is a repository of MBeans. Each MBean is registered with a unique name within the MBean server. Usually the only access to the MBeans is through the MBean server. In other words, code does not access an MBean directly, but rather accesses the MBean by name through the MBean server.

The Java SE platform includes a built-in platform MBean server. For more information, see Chapter 4, Using the Platform MBean Server and Platform MXBeans.

Creating and Registering MBeans

There are two ways to create an MBean. One is to construct a Java object that will be the MBean, then use the registerMBean method to register it in the MBean Server. The other is to create and register the MBean in a single operation using one of the createMBean methods.

The registerMBean method is simpler for local use, but cannot be used remotely. The createMBean method can be used remotely, but sometimes requires attention to class loading issues. An MBean can perform actions when it is registered in or unregistered from an MBean Server if it implements the MBeanRegistration interface.

Instrumenting Applications

General instructions on how to instrument your applications for management by the JMX API is beyond the scope of this document. See the documentation for the Java Management Extensions (JMX) Technology for information.

Platform MXBeans

A platform MXBean is an MBean for monitoring and managing the Java VM and other components of the Java Runtime Environment (JRE). Each MXBean encapsulates a part of VM functionality such as the class loading system, just-in-time (JIT) compilation system, garbage collector, and so on.

Table 1-1 lists all the platform MXBeans and the aspect of the VM that they manage. Each platform MXBean has a unique javax.management.ObjectName for registration in the platform MBean server. A Java VM may have zero, one, or more than one instance of each MXBean, depending on its function, as shown in the table.

Table 1-1 Platform MXBeans

Interface | Part of VM Managed | Object Name | Instances per VM
ClassLoadingMXBean | Class loading system | java.lang:type= ClassLoading | One
CompilationMXBean | Compilation system | java.lang:type= Compilation | Zero or one
GarbageCollectorMXBean | Garbage collector | java.lang:type= GarbageCollector, name=collectorName | One or more
LoggingMXBean | Logging system | java.util.logging:type =Logging | One
MemoryManagerMXBean (sub-interface of GarbageCollectorMXBean) | Memory pool | java.lang: typeMemoryManager, name=managerName | One or more
MemoryPoolMXBean | Memory | java.lang: type= MemoryPool, name=poolName | One or more
MemoryMXBean | Memory system | java.lang:type= Memory | One
OperatingSystemMXBean | Underlying operating system | java.lang:type= OperatingSystem | One
RuntimeMXBean | Runtime system | java.lang:type= Runtime | One
ThreadMXBean | Thread system | java.lang:type= Threading | One

See the package description in the API reference for the java.lang.management package for details of the platform MXBeans (apart from LoggingMXBean). See the API reference for java.util.logging for details of the LoggingMXBean.

Platform MBean Server

The platform MBean Server can be shared by different managed components running within the same Java VM. You can access the platform MBean Server with the method ManagementFactory.getPlatformMBeanServer(). The first call to this method, creates the platform MBean server and registers the platform MXBeans using their unique object names. Subsequently, it returns the initially created platform MBeanServer instance.

MXBeans that are created and destroyed dynamically (for example, memory pools and managers) will automatically be registered and unregistered in the platform MBean server. If the system property javax.management.builder.initial is set, the platform MBean server will be created by the specified MBeanServerBuilder.

You can use the platform MBean server to register other MBeans besides the platform MXBeans. This enables all MBeans to be published through the same MBean server and makes network publishing and discovery easier.
spacer img
arrow icon Previous Contents Next arrow icon
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface - Java SE Monitoring and Management Guide

Documentation Contents
arrow icon Previous Contents Next Next

Preface

The Java Platform, Standard Edition (Java SE platform) 6 features utilities that allow you to monitor and manage the performance of a Java Virtual Machine (Java VM) and the Java applications that are running in it. The Java SE Monitoring and Management Guide describes those monitoring and management utilities.

Who Should Use This Book

The Java SE Monitoring and Management Guide is intended for experienced users of the Java language, such as systems administrators and software developers, for whom the performance of the Java platform and their applications is of vital importance.

Before You Read This Book

It is recommended that users are familiar with several other features of the Java SE platform. The following documentation might be of use.

  • Java Management Extensions (JMX) Technology

  • Java HotSpot Technology

  • Java Virtual Machine Technology

  • Performance Documentation for the Java HotSpot VM

How This Book Is Organized

This book covers the following topics.

  • Chapter 1, Overview of Java SE Monitoring and Management introduces the monitoring and management utilities provides with the Java SE platform.

  • Chapter 2, Monitoring and Management Using JMX Technology describes how to configure your platform to allow monitoring and management using the JMX API.

  • Chapter 3, Using JConsole introduces the JConsole graphical user interface.

  • Chapter 4, Using the Platform MBean Server and Platform MXBeans presents the MBeans that are provided with the Java SE platform for monitoring and management purposes.

  • Chapter 5, SNMP Monitoring and Management explains how to perform monitoring and management using the Simple Network Management Protocol (SNMP).

  • Appendix A, Additional Security Information For Microsoft Windows provides security configuration information specific to Windows platforms.

Related Third-Party Web Site References

Third-party URLs are referenced in this document and provide additional, related information.

Note - Oracle is not responsible for the availability of third-party web sites mentioned in this document. Oracle does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Oracle will not be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services that are available on or through such sites or resources.

Documentation, Support, and Training

The Oracle web site provides information about the following additional resources:

  • Documentation

  • Support

  • Training

Typographic Conventions

The following table describes the typographic conventions that are used in this book.

Table P-1 Typographic Conventions

Typeface | Meaning | Example
AaBbCc123 | The names of commands, files, and directories, and onscreen computer output | Edit your .login file. Use ls -a to list all files. machine_name% you have mail.
AaBbCc123 | What you type, contrasted with onscreen computer output | machine_name% su Password:
aabbcc123 | Placeholder: replace with a real name or value | The command to remove a file is rm filename.
AaBbCc123 | Book titles, new terms, and terms to be emphasized | Read Chapter 6 in the User's Guide. A cache is a copy that is stored locally. Do not save the file. Note: Some emphasized items appear bold online.

Shell Prompts in Command Examples

The following table shows the default Solaris, Linux, or Mac OS X system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts

Shell | Prompt
C shell | machine_name%
C shell for superuser | machine_name#
Bourne shell and Korn shell | $
Bourne shell and Korn shell for superuser | #
arrow icon
arrow icon Previous Contents Next Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


SNMP Monitoring and Management - Java SE Monitoring and Management Guide

Documentation Contents
previous Previous Contents Next next
Chapter 5

SNMP Monitoring and Management

The Simple Network Management Protocol (SNMP) is an industry standard for network management. Objects managed by SNMP are arranged in management information bases (MIBs). The SNMP agent publishes the standard MIB for the Java virtual machine (Java VM) instrumentation. The file JVM-MANAGEMENT-MIB.mib is the standard MIB for monitoring and management of the Java VM.

Enabling the SNMP Agent

To monitor a Java VM with SNMP you must first enable an SNMP agent when you start the Java VM. You can enable the SNMP agent for either a single-user environment or a multiple-user environment. Then, you can monitor the Java VM with an SNMP-compliant tool.

For general information on setting system properties when you start the Java VM, see Setting System Properties in Chapter 2, Monitoring and Management Using JMX Technology. How to enable the SNMP agent in single and multiple-user environments is described below. The process is the same for both environments, but the actions performed are slightly different.

Access Control List File

An Access Control List (ACL) template file is provided with the Java Platform, Standard Edition (Java SE platform) in JRE_HOME/lib/management/snmp.acl.template, where JRE_HOME is the directory in which the Java Runtime Environment (JRE) implementation is installed. You will copy this file to either JRE_HOME/lib/management/snmp.acl or to your home directory, depending on whether you are operating in a single or a multiple-user environment. Ensure that only you have read permissions, since the file contains non-encrypted SNMP community strings. For security reasons, the system checks that only the owner has read permissions on the file and exits with an error if this is not the case. Thus, in a multiple-user environment, you should put this file in private location, such as your home directory.

Example 5-1 shows some possible entries in an ACL file.

Example 5-1 Sample ACL Entries
#The communities public and private are allowed access from the local host.
acl = {
        {
          communities = public, private
          access = read-only
          managers = localhost
        }
      }
# Traps are sent to localhost only
trap = {
          {
            trap-community = public
            hosts = localhost
          }
        }

procedure graphic To Enable the SNMP Agent in a Single-user Environment

  1. Set the following system property when you start the Java VM.
    com.sun.management.snmp.port=portNum

    In the property above, portNum is the port number to use for monitoring. Setting this property starts an SNMP agent that listens on the specified port number for incoming SNMP requests.

  2. Create an ACL File.

    Copy the ACL template file from JRE_HOME/lib/management/snmp.acl.template to JRE_HOME/lib/management/snmp.acl.

  3. Set the permissions on the ACL file.

    Make sure the ACL file is readable by only the owner, and add community strings as needed.

procedure graphic To Enable the SNMP Agent in a Multiple-user Environment

  1. Set the following system properties when you start the Java VM.
    com.sun.management.snmp.port=portNum
com.sun.management.snmp.acl.file=ACLFilePath

    Where ACLFilePath is the path to the ACL file.

  2. Create an ACL File.

    Copy the ACL template file from JRE_HOME/lib/management/snmp.acl.template to a file named snmp.acl in your home directory.

  3. Set the permissions on the ACL file.

    Make sure the ACL file is readable by only the owner, and add community strings as needed.

SNMP Monitoring and Management Properties

You can set SNMP monitoring and management properties in a configuration file or on the command line. Properties specified on the command line override properties in a configuration file. The default location for the configuration file is JRE_HOME/lib/management/management.properties. The Java VM reads this file if the command-line property com.sun.management.snmp.port is set.

You can specify a different location for the configuration file with the following command-line option.

com.sun.management.config.file=ConfigFilePath

In the property above, ConfigFilePath is the path to the configuration file.

You must specify all system properties when you start the Java VM. After the Java VM has started, any changes to system properties (for example, via the setProperty method), to the password file, to the ACL file, or to the configuration file will have no effect.

Table 5-1 describes all the SNMP management properties.

Table 5-1 SNMP monitoring and management Properties

Property Name | Description | Default
com.sun.management.snmp.trap | Remote port to which the SNMP agent sends traps. | 162
com.sun.management.snmp. interface | Optional. The local host InetAddress, to force the SNMP agent to bind to the given InetAddress. This is for multi-home hosts if one wants to listen to a specific subnet only. | Not applicable
com.sun.management.snmp.acl | Enables or disables SNMP ACL checks. | true
com.sun.management.snmp. acl.file | Path to a valid ACL file. After the Java VM has started, modifying the ACL file has no effect. | JRE_HOME/lib/management/snmp.acl

Configuration Errors

If any errors occur during start up of the SNMP agent, the Java VM will throw an exception and exit. Configuration errors include the following.

  • Failure to bind to the port number.

  • The password file is readable by anyone other than the owner.

  • Invalid SNMP ACL file.

If your application runs a security manager, then additional permissions are required in the security permissions file.
previous Previous Contents Next next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using JConsole - Java SE Monitoring and Management Guide

Documentation Contents
previous Previous Contents Next next
Chapter 3

Using JConsole

The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform.

In the Java SE 6, JConsole has been updated to present the look and feel of the Windows and GNOME desktops (other platforms will present the standard Java graphical look and feel). The screen captures presented in this document were taken from an instance of the interface running on Windows XP.

Starting JConsole

The jconsole executable can be found in JDK_HOME/bin, where JDK_HOME is the directory in which the Java Development Kit (JDK) is installed. If this directory is in your system path, you can start JConsole by simply typing jconsole in a command (shell) prompt. Otherwise, you have to type the full path to the executable file.

Command Syntax

You can use JConsole to monitor both local applications, namely those running on the same system as JConsole, as well as remote applications, namely those running on other systems.

Note - Using JConsole to monitor a local application is useful for development and for creating prototypes, but is not recommended for production environments, because JConsole itself consumes significant system resources. Remote monitoring is recommended to isolate the JConsole application from the platform being monitored.

For a complete reference on the syntax of the jconsole command, see the manual page for the jconsole command: (Solaris, Linux, or Mac OS X or Windows).

Setting up Local Monitoring

You start JConsole by typing the following command at the command line.

% jconsole

When JConsole starts, you will be given a choice of all the Java applications that are running locally that JConsole can connect to.

If you want to monitor a specific application, and you know that application's process ID, then you can also start JConsole so that it connects to that application. This application must be running with the same user ID as JConsole. The command syntax to start JConsole for local monitoring of a specific application is the following.

% jconsole processID

In the command above processID is the application's process ID (PID). You can determine an application's PID in the following ways:

  • On Solaris, Linux, or Mac OS X systems, you can use the ps command to find the PID of the java instance that is running.

  • On Windows systems, you can use the Task Manager to find the PID of java or javaw.

  • You can also use the jps command-line utility to determine PIDs. See the manual page for the jps tool (Solaris, Linux, or Mac OS X or Windows).

For example, if you determined that the process ID of the Notepad application is 2956, then you would start JConsole with the following command.

% jconsole 2956

Both JConsole and the application must by executed by the same user. The management and monitoring system uses the operating system's file permissions. If you do not specify a process ID, JConsole will automatically detect all local Java applications, and display a dialog box that lets you select which one you want to monitor (see Connecting to a JMX Agent).

For more information, see Local Monitoring and Management.

Setting up Remote Monitoring

To start JConsole for remote monitoring, you use the following command syntax.

% jconsole hostName:portNum

In the command above, hostName is the name of the system running the application and portNum is the port number you specified when you enabled the JMX agent when you started the Java VM. For more information, see Remote Monitoring and Management.

If you do not specify a host name/port number combination, then JConsole will display a connection dialog box (Connecting to a JMX Agent) to enable you to enter a host name and port number.

Setting up Secure Remote Monitoring

You can also start JConsole so that monitoring will be performed over a connection that is secured using Secure Sockets Layer (SSL). The command to start JConsole with a secure connection is given in Remote Monitoring with JConsole with SSL Enabled in Chapter 2, Monitoring and Management Using JMX Technology.

Connecting to a JMX Agent

If you start JConsole with arguments specifying a JMX agent to connect to, it will automatically start monitoring the specified Java VM. You can connect to a different host at any time by choosing Connection | New Connection and entering the necessary information.

Otherwise, if you do not provide any arguments when you start JConsole, the first thing you see is the connection dialog box. This dialog box has two options, allowing connections to either Local or Remote processes.

Dynamic Attach

Under previous releases of the Java SE platform, applications that you wanted to monitor with JConsole needed to be started with the following option.

% -Dcom.sun.management.jmxremote

However, the version of JConsole provided with the Java SE 6 platform can attach to any application that supports the Attach API. In other words, any application that is started in the Java SE 6 HotSpot VM is detected automatically by JConsole, and does not need to be started using the above command-line option.

Connecting JConsole to a Local Process

If you start JConsole without providing a specific JMX agent to connect to, you will see the following dialog window.

Figure 3-1 Creating a Connection to a Local Process

The dialog window for creating connections to local processes

The Local Process option lists any Java VMs running on the local system that were started with the same user ID as JConsole, along with their process ID and their class and/or argument information. To connect JConsole to your application, select the application you want to monitor, then click the Connect button. The list of local processes includes applications running in the following types of Java VM.

  • Applications with the management agent enabled. These include applications on the Java SE 6 platform or on the Java SE 5.0 platform that were started with the -Dcom.sun.management.jmxremote option or with the -Dcom.sun.management.jmxremote.port option specified. In addition, the list also includes any applications that were started on the Java SE 6 platform without any management properties but which are later attached to by JConsole, which enables the management agent at runtime.

  • Applications that are attachable, with the management agent disabled. An attachable application supports loading the management agent at runtime. Attachable applications include applications that are started on the Java SE 6 platform that support the Attach API. Applications which support dynamic attach do not require the management agent to be started by specifying the com.sun.management.jmxremote or com.sun.management.jmxremote.port options at the command line, and JConsole does not need to connect to the management agent before the application is started. If you select this application, you will be informed in a note onscreen that the management agent will be enabled when the connection is made. In the example connection dialog shown in Figure 3-1, the NetBeans IDE and JConsole itself were both started within a Java SE 6 platform VM. Both appear in normal text, meaning that JConsole can connect to them. In Figure 3-1, JConsole is selected, and the note is visible.

  • Applications that are not attachable, with the management agent disabled. These include applications started on a Java SE 1.4.2 platform or started on a Java SE 5.0 platform without the -Dcom.sun.management.jmxremote or com.sun.management.jmxremote.port options. These applications appear grayed-out in the table and JConsole cannot connect to them. In the example connection dialog shown in Figure 3-1, the Anagrams application was started with a Java SE 5.0 platform VM without any of the management properties to enable the JMX agent, and consequently shows up in gray and cannot be selected.

Figure 3-2 Attempting to Connect to an Application without the Management Agent Enabled

Attempting to connect to a local process without the management agent enabled. JConsole cannot connect to this application.

In the example connection dialog shown in Figure 3-2, you can see that the Anagrams application has been selected by clicking on it, but the Connect button remains grayed-out and a note has appeared informing you that the management agent is not enabled for this process. JConsole cannot connect to Anagrams because it was not started with the correct Java VM or with the correct options.

Connecting JConsole to a Remote Process

When the connection dialog opens, you are also given the option of connecting to a remote process.

Figure 3-3 Creating a Connection to a Remote Process

The dialog window for creating connections to remote processes

To monitor a process running on a remote Java VM, you must provide the following information.

  • Host name: name of the machine on which the Java VM is running.

  • Port number: the JMX agent port number you specified when you started the Java VM.

  • User name and password: the user name and password to use (required only if monitoring a Java VM through a JMX agent that requires password authentication).

For information about setting the port number of the JMX agent, see Enabling the Out-of-the-Box Management. For information about user names and passwords, see Using Password and Access Files.

To monitor the Java VM that is running JConsole, simply click Connect, using host localhost and the port 0.

Connecting Using a JMX Service URL

You can also use the Remote Process option to connect to other JMX agents by specifying their JMX service URL, and the user name and password. The syntax of a JMX service URL requires that you provide the transport protocol used to make the connection, as well as a service access point. The full syntax for a JMX service URL is described in the API documentation for javax.management.remote.JMXServiceURL.

Figure 3-4 Connecting to a JMX Agent Using the JMX Service URL

Connecting to a JMX Agent Using the JMX Service URL

If the JMX agent uses a connector which is not included in the Java platform, you need to add the connector classes to the class path when you run the jconsole command, as follows.

% jconsole -J-Djava.class.path=JAVA_HOME/lib/jconsole.jar:JAVA_HOME/lib/tools.jar:connector-path

In the command above, connector-path is the directory or the Java archive (Jar) file containing the connector classes that are not included in the JDK, that are to be used by JConsole.

Presenting the JConsole Tabs

Once you have connected JConsole to an application, JConsole is composed of six tabs.

  • Overview: Displays overview information about the Java VM and monitored values.

  • Memory: Displays information about memory use.

  • Threads: Displays information about thread use.

  • Classes: Displays information about class loading.

  • VM: Displays information about the Java VM.

  • MBeans: Displays information about MBeans.

You can use the green connection status icon in the upper right-hand corner of JConsole at any time, to disconnect from or reconnect to a running Java VM. You can connect to any number of running Java VMs at a time by selecting Connection then New Connection from the drop-down menu.

Viewing Overview Information

The Overview tab displays graphical monitoring information about CPU usage, memory usage, thread counts, and the classes loaded in the Java VM, all in a single screen.

Figure 3-5 Overview Tab

The JConsole Overview tab

The Overview tab provides an easy way to correlate information that was previously only available by switching between multiple tabs.

Saving Chart Data

JConsole allows you to save the data presented in the charts in a Comma Separated Values (CSV) file. To save data from a chart, simply right-click on any chart, select Save data as..., and then specify the file in which the data will be saved. You can save the data from any of the charts displayed in any of JConsole's different tabs in this way.

The CSV format is commonly used for data exchange between spreadsheet applications. The CSV file can be imported into spreadsheet applications and can be used to create diagrams in these applications. The data is presented as two or more named columns, where the first column represents the time stamps. After importing the file into a spreadsheet application, you will usually need to select the first column and change its format to be "date" or "date/time" as appropriate.

Monitoring Memory Consumption

The Memory tab provides information about memory consumption and memory pools.

Figure 3-6 Memory Tab

The JConsole Memory tab.

The Memory tab features a “Perform GC” button that you can click to perform garbage collection whenever you want. The chart shows the memory use of the Java VM over time, for heap and non-heap memory, as well as for specific memory pools. The memory pools available depend on which version of the Java VM is being used. For the HotSpot Java VM, the memory pools for serial garbage collection are the following.

  • Eden Space (heap): The pool from which memory is initially allocated for most objects.

  • Survivor Space (heap): The pool containing objects that have survived the garbage collection of the Eden space.

  • Tenured Generation (heap): The pool containing objects that have existed for some time in the survivor space.

  • Permanent Generation (non-heap): The pool containing all the reflective data of the virtual machine itself, such as class and method objects. With Java VMs that use class data sharing, this generation is divided into read-only and read-write areas.

  • Code Cache (non-heap): The HotSpot Java VM also includes a code cache, containing memory that is used for compilation and storage of native code.

You can display different charts for charting the consumption of these memory pools by choosing from the options in the Chart drop-down menu. Also, clicking on either of the Heap or Non-Heap bar charts in the bottom right-hand corner will switch the chart displayed. Finally, you can specify the time range over which you track memory usage by selecting from the options in the Time Range drop-down menu.

For more information about these memory pools, see Garbage Collection below.

The Details area shows several current memory metrics:

  • Used: the amount of memory currently used, including the memory occupied by all objects, both reachable and unreachable.

  • Committed: the amount of memory guaranteed to be available for use by the Java VM. The amount of committed memory may change over time. The Java virtual machine may release memory to the system and the amount of committed memory could be less than the amount of memory initially allocated at start up. The amount of committed memory will always be greater than or equal to the amount of used memory.

  • Max: the maximum amount of memory that can be used for memory management. Its value may change or be undefined. A memory allocation may fail if the Java VM attempts to increase the used memory to be greater than committed memory, even if the amount used is less than or equal to max (for example, when the system is low on virtual memory).

  • GC time: the cumulative time spent on garbage collection and the total number of invocations. It may have multiple rows, each of which represents one garbage collector algorithm used in the Java VM.

The bar chart on the lower right-hand side shows the memory consumed by the memory pools in heap and non-heap memory. The bar will turn red when the memory used exceeds the memory usage threshold. You can set the memory usage threshold through an attribute of the MemoryMXBean.

Heap and Non-Heap Memory

The Java VM manages two kinds of memory: heap and non-heap memory, both of which are created when the Java VM starts.

  • Heap memory is the runtime data area from which the Java VM allocates memory for all class instances and arrays. The heap may be of a fixed or variable size. The garbage collector is an automatic memory management system that reclaims heap memory for objects.

  • Non-heap memory includes a method area shared among all threads and memory required for the internal processing or optimization for the Java VM. It stores per-class structures such as a runtime constant pool, field and method data, and the code for methods and constructors. The method area is logically part of the heap but, depending on the implementation, a Java VM may not garbage collect or compact it. Like the heap memory, the method area may be of a fixed or variable size. The memory for the method area does not need to be contiguous.

In addition to the method area, a Java VM may require memory for internal processing or optimization which also belongs to non-heap memory. For example, the Just-In-Time (JIT) compiler requires memory for storing the native machine code translated from the Java VM code for high performance.

Memory Pools and Memory Managers

Memory pools and memory managers are key aspects of the Java VM's memory system.

  • A memory pool represents a memory area that the Java VM manages. The Java VM has at least one memory pool and it may create or remove memory pools during execution. A memory pool can belong either to heap or to non-heap memory.

  • A memory manager manages one or more memory pools. The garbage collector is a type of memory manager responsible for reclaiming memory used by unreachable objects. A Java VM may have one or more memory managers. It may add or remove memory managers during execution. A memory pool can be managed by more than one memory manager.

Garbage Collection

Garbage collection (GC) is how the Java VM frees memory occupied by objects that are no longer referenced. It is common to think of objects that have active references as being "alive" and non-referenced (or unreachable) objects as "dead." Garbage collection is the process of releasing memory used by the dead objects. The algorithms and parameters used by GC can have dramatic effects on performance.

The Java HotSpot VM garbage collector uses generational GC. Generational GC takes advantage of the observation that most programs conform to the following generalizations.

  • They create many objects that have short lives, for example, iterators and local variables.

  • They create some objects that have very long lives, for example, high level persistent objects.

Generational GC divides memory into several generations, and assigns one or more memory pools to each. When a generation uses up its allotted memory, the VM performs a partial GC (also called a minor collection) on that memory pool to reclaim memory used by dead objects. This partial GC is usually much faster than a full GC.

The Java HotSpot VM defines two generations: the young generation (sometimes called the "nursery") and the old generation. The young generation consists of an "Eden space" and two "survivor spaces." The VM initially assigns all objects to the Eden space, and most objects die there. When it performs a minor GC, the VM moves any remaining objects from the Eden space to one of the survivor spaces. The VM moves objects that live long enough in the survivor spaces to the "tenured" space in the old generation. When the tenured generation fills up, there is a full GC that is often much slower because it involves all live objects. The permanent generation holds all the reflective data of the virtual machine itself, such as class and method objects.

The default arrangement of generations looks something like Figure 3-7.

Figure 3-7 Generations of Data in Garbage Collection

The different generations of data defined by the Garbage Collector

If the garbage collector has become a bottleneck, you can improve performance by customizing the generation sizes. Using JConsole, you can investigate the sensitivity of your performance metric by experimenting with the garbage collector parameters. For more information, see Tuning Garbage Collection with the 5.0 HotSpot VM.

Monitoring Thread Use

The Threads tab provides information about thread use.

Figure 3-8 Threads Tab

The JConsole Threads tab.

The Threads list in the lower left corner lists all the active threads. If you enter a string in the Filter field, the Threads list will show only those threads whose name contains the string you enter. Click on the name of a thread in the Threads list to display information about that thread to the right, including the thread name, state, and stack trace.

The chart shows the number of live threads over time. Two lines are shown.

  • Red: peak number of threads

  • Blue: number of live threads.

The Threading MXBean provides several other useful operations that are not covered by the Threads tab.

  • findMonitorDeadlockedThreads: Detects if any threads are deadlocked on the object monitor locks. This operation returns an array of deadlocked thread IDs.

  • getThreadInfo: Returns the thread information. This includes the name, stack trace, and the monitor lock that the thread is currently blocked on, if any, and which thread is holding that lock, as well as thread contention statistics.

  • getThreadCpuTime: Returns the CPU time consumed by a given thread

You can access these additional features via the MBeans tab by selecting the Threading MXBean in the MBeans tree. This MXBean lists all the attributes and operations for accessing threading information in the Java VM being monitored. See Monitoring and Managing MBeans.

Detecting Deadlocked Threads

To check if your application has run into a deadlock (for example, your application seems to be hanging), deadlocked threads can be detected by clicking on the "Detect Deadlock" button. If any deadlocked threads are detected, these are displayed in a new tab that appears next to the "Threads" tab, as shown in Figure 3-9.

Figure 3-9 Deadlocked Threads

Deadlocked threads detected by JConsole.

The Detect Deadlock button will detect deadlock cycles involving object monitors and java.util.concurrent ownable synchronizers (see the API specification documentation for java.lang.management.LockInfo). Monitoring support for java.util.concurrent locks has been added in Java SE 6. If JConsole connects to a Java SE 5.0 VM, the Detect Deadlock mechanism will only find deadlocks related to object monitors. JConsole will not show any deadlocks related to ownable synchronizers.

See the API documentation for java.lang.Thread for more information about threads and daemon threads.

Monitoring Class Loading

The Classes tab displays information about class loading.

Figure 3-10 Classes Tab

The chart plots the number of classes loaded over time.

  • The red line is the total number of classes loaded (including those subsequently unloaded).

  • The blue line is the current number of classes loaded.

The Details section at the bottom of the tab displays the total number of classes loaded since the Java VM started, the number currently loaded and the number unloaded. You can set the tracing of class loading to verbose output by checking the checkbox in the top right-hand corner.

Viewing VM Information

The VM Summary tab provides information about the Java VM.

Figure 3-11 VM Summary Tab

The JConsole VM Summary tab.

The information presented in this tab includes the following.

  • Summary

    • Uptime: Total amount of time since the Java VM was started.

    • Process CPU Time: Total amount of CPU time that the Java VM has consumed since it was started.

    • Total Compile Time: Total accumulated time spent in JIT compilation. The Java VM determines when JIT compilation occurs. The Hotspot VM uses adaptive compilation, in which the VM launches an application using a standard interpreter, but then analyzes the code as it runs to detect performance bottlenecks, or "hot spots".

  • Threads

    • Live threads: Current number of live daemon threads plus non-daemon threads.

    • Peak: Highest number of live threads since Java VM started.

    • Daemon threads: Current number of live daemon threads.

    • Total threads started: Total number of threads started since Java VM started, including daemon, non-daemon, and terminated threads.

  • Classes

    • Current classes loaded: Number of classes currently loaded into memory.

    • Total classes loaded: Total number of classes loaded into memory since the Java VM started, including those that have subsequently been unloaded.

    • Total classes unloaded: Number of classes unloaded from memory since the Java VM started.

  • Memory

    • Current heap size: Number of kilobytes currently occupied by the heap.

    • Committed memory: Total amount of memory allocated for use by the heap.

    • Maximum heap size: Maximum number of kilobytes occupied by the heap.

    • Objects pending for finalization: Number of objects pending for finalization.

    • Garbage collector: Information about garbage collection, including the garbage collector names, number of collections performed, and total time spent performing GC.

  • Operating System

    • Total physical memory: Amount of random-access memory (RAM) the operating system has.

    • Free physical memory: Amount of free RAM available to the operating system.

    • Committed virtual memory: Amount of virtual memory guaranteed to be available to the running process.

  • Other Information

    • VM arguments: The input arguments the application passed to the Java VM, not including the arguments to the main method.

    • Class path: The class path that is used by the system class loader to search for class files.

    • Library path: The list of paths to search when loading libraries.

    • Boot class path: The boot class path is used by the bootstrap class loader to search for class files.

Monitoring and Managing MBeans

The MBeans tab displays information about all the MBeans registered with the platform MBean server in a generic way. The MBeans tab allows you to access the full set of the platform MXBean instrumentation, including that which is not visible in the other tabs. In addition, you can monitor and manage your application's MBeans using the MBeans tab.

Figure 3-12 MBeans Tab

The JConsole MBeans tab.

The tree on the left shows all the MBeans currently running. When you select an MBean in the tree, its MBeanInfo and its MBean Descriptor are both displayed on the right, and any attributes, operations or notifications appear in the tree below it.

All the platform MXBeans and their various operations and attributes are accessible via JConsole's MBeans tab.

Constructing the MBean Tree

By default, the MBeans are displayed in the tree based on their object names. The order of key properties specified when the object names are created is preserved by JConsole when it adds MBeans to the MBean tree. The exact key property list that JConsole will use to build the MBean tree will be the one returned by the method ObjectName.getKeyPropertyListString(), with type as the first key, and j2eeType, if present, as the second key.

However, relying on the default order of the ObjectName key properties can sometimes lead to unexpected behavior when JConsole renders the MBean tree. For example, if two object names have similar keys but their key order differs, then the corresponding MBeans will not be created under the same node in the MBean tree.

For example, suppose you create Triangle MBean objects with the following names.

com.sun.example:type=Triangle,side=isosceles,name=1
com.sun.example:type=Triangle,name=2,side=isosceles
com.sun.example:type=Triangle,side=isosceles,name=3

As far as the JMX technology is concerned, these objects will be treated in exactly the same way. The order of the keys in the object name makes no difference to the JMX technology. However, if JConsole connects to these MBeans and the default MBean tree rendering is used, then the object com.sun.example:type=Triangle,name=2,side=isosceles will end up being created under the Triangle node, in a node called 2, which in turn will contain a sub-node called isosceles. The other two isosceles triangles, name=1 and name=3, will be grouped together under Triangle in a different node called isosceles, as shown in Figure 3-13.

Figure 3-13 Example of Unexpected MBean Tree Rendering

Example of Unexpected MBean Tree Rendering

To avoid this problem, you can specify the order in which the MBeans are displayed in the tree by supplying an ordered key property list when you start JConsole at the command line. This is achieved by setting the system property com.sun.tools.jconsole.mbeans.keyPropertyList, as shown in the following command.

% jconsole -J-Dcom.sun.tools.jconsole.mbeans.keyPropertyList=key[,key]*

The key property list system property takes a comma-separated list of keys, in the order of your choosing, where key must be a string representing an object name key or an empty string. If a key specified in the list does not apply to a particular MBean, then that key will be discarded. If an MBean has more keys than the ones specified in the key property list, then the key order defined by the value returned by ObjectName.getKeyPropertyListString() will be used to complete the key order defined by keyPropertyList. Therefore, specifying an empty list of keys simply means that JConsole will display keys in the order they appear in the MBean's ObjectName.

So, returning to the example of the Triangle MBeans cited above, you could choose to start JConsole specifying the keyPropertyList system property, so that all your MBeans will be grouped according to their side key property first, and their name key property second. To do this, you would start JConsole with the following command.

% jconsole -J-Dcom.sun.tools.jconsole.mbeans.keyPropertyList=side,name

Starting JConsole with this system property specified would produce the MBean tree shown in Figure 3-14.

Figure 3-14 Example of MBean Tree Constructed Using keyPropertyList

Example of MBean Tree Constructed Using keyPropertyList

In Figure 3-14, the side key comes first, followed by the name key. The type key comes at the end because it was not specified in the key property list, so the MBean tree algorithm applied the original key order for the remaining keys. Consequently, the type key is appended at the end, after the keys which were defined by the keyPropertyList system property.

According to the object name convention defined by the JMX Best Practices Guidelines, the type key should always come first. So, to respect this convention you should start JConsole with the following system property.

% jconsole -J-Dcom.sun.tools.jconsole.mbeans.keyPropertyList=type,side,name

The above command will cause JConsole to render the MBean tree for the Triangle MBeans as shown in Figure 3-15.

Figure 3-15 Example of MBean Tree Constructed Respecting JMX Best Practices

Example of MBean Tree Constructed Respecting JMX Best Practices

This is obviously much more comprehensible than the MBean trees shown in Figure 3-13 and Figure 3-14.

MBean Attributes

Selecting the Attributes node displays all the attributes of an MBean. Figure 3-16 shows all the attributes of the Threading platform MXBean.

Figure 3-16 Viewing All MBean Attributes

Viewing the attributes of the Threading MBean.

Selecting an individual MBean attribute from the tree then displays the attribute's value, its MBeanAttributeInfo, and the associated Descriptor in the right pane, as you can see in Figure 3-17.

Figure 3-17 Viewing an Individual MBean Attribute

Viewing MBean attributes in the MBeans tab.

You can display additional information about an attribute by double-clicking on the attribute value, if it appears in bold text. For example, if you click on the value of the HeapMemoryUsage attribute of the java.lang.Memory MBean, you will see a chart that looks something like Figure 3-18.

Figure 3-18 Displaying Attribute Values

Viewing the values of MBean attributes.

Double-clicking on numeric attribute values will display a chart that plots changes in that numeric value. For example, double-clicking on the CollectionTime attribute of the Garbage Collector MBean PS Marksweep will plot the time spent performing garbage collection.

You can also use JConsole to set the values of writable attributes. The value of a writable attribute is displayed in blue. Here you can see the Memory MBean's Verbose attribute.

Figure 3-19 Setting Writable Attribute Values

Setting an MBean's writable attribute value.

You can set attributes by clicking on them and then editing them. For example, to enable or disable the verbose tracing of the garbage collector in JConsole, select the Memory MXBean in the MBeans tab and set the Verbose attribute to true or false. Similarly, the class loading MXBean also has the Verbose attribute, which can be set to enable or disable class loading verbose tracing.

MBean Operations

Selecting the Operations node displays all the operations of an MBean. The MBean operations appear as buttons, that you can click to invoke the operation.Figure 3-20 shows all the operations of the Threading platform MXBean.

Figure 3-20 Viewing All MBean Operations

Viewing the Threading platform MXBean's operations.

Selecting an individual MBean operation in the tree displays the button for invoking the MBean operation, and the operation's MBeanOperationInfo and its Descriptor, as shown in Figure 3-21.

Figure 3-21 Viewing Individual MBean Operations

Invoking an MBean's operations.
MBean Notifications

You can subscribe to receive notifications by selecting the Notifications node in the left-hand tree, and clicking the Subscribe button that appears on the right. The number of notifications received is displayed in square brackets, and the Notifications node itself will appear in bold text when new notifications are received. The notifications of the Memory platform MXBean are shown in Figure 3-22.

Figure 3-22 Viewing MBean Notifications

Viewing an MBean's notifications.

Selecting an individual MBean notification displays the MBeanNotificationInfo in the right pane, as shown in Figure 3-23.

Figure 3-23 Viewing Individual MBean Notifications

Subscribing to receive MBean Notifications.
HotSpot Diagnostic MXBean

JConsole's MBeans tab also allows you to tell the HotSpot VM to perform a heap dump, and to get or set a VM option via the HotSpotDiagnostic MXBean.

Figure 3-24 Viewing the HotSpot Diagnostic MBean

Performing heap dumps using the HotSpot VM Diagnostic MBean.

You can perform a heap dump manually by invoking the com.sun.management.HotSpotDiagnostic MXBean's dumpHeap operation. In addition, you can specify the HeapDumpOnOutOfMemoryError Java VM option using the setVMOption operation, so that the VM performs a heap dump automatically whenever it receives an OutOfMemoryError.

Creating Custom Tabs

In addition to the existing standard tabs, you can add your own custom tabs to JConsole, to perform your own monitoring activities. The JConsole plug-in API provides a mechanism by which you can, for example, add a tab to access your own application's MBeans. The JConsole plug-in API defines the com.sun.tools.jconsole.JConsolePlugin abstract class that you can extend to build your custom plug-in.

As stated above, your plug-in must extend JConsolePlugin, and implement the JConsolePlugin getTabs and newSwingWorker methods. The getTabs method returns either the list of tabs to be added to JConsole, or an empty list. The newSwingWorker method returns the SwingWorker to be responsible for the plug-in's GUI update.

Your plug-in must be provided in a Java archive (JAR) file that contains a file named META-INF/services/com.sun.tools.jconsole.JConsolePlugin. This JConsolePlugin file itself contains a list of all the fully-qualified class names of the plug-ins you want to add as new JConsole tabs. JConsole uses the service-provider loading facility to look up and load the plug-ins. You can have multiple plug-ins, with one entry per plug-in in the JConsolePlugin.

To load the new custom plug-ins into JConsole, start JConsole with the following command:

%  jconsole -pluginpath plugin-path

In the above command, plugin-path specifies the paths to the JConsole plug-ins to be looked up. These paths can either be to directory names or to JAR files, and multiple paths can be specified, using your platform's standard separator character.

An example JConsole plug-in is provided with the Java SE 6 platform. The JTop application is a JDK demonstration that shows the CPU usage of all threads running in the application. This demo is useful for identifying threads that have high CPU consumption, and it has been updated to be used as a JConsole plug-in as well as a standalone GUI. JTop is bundled with the Java SE 6 platform, as a demo application. You can run JConsole with the JTop plug-in by running the following command:

% JDK_HOME/bin/jconsole -pluginpath JDK_HOME/demo/management/JTop/JTop.jar

If you connect to this instance of JConsole, you will see that the JTop tab has been added, showing CPU usage of the various threads running.

Figure 3-25 Viewing a Custom Plug-in Tab

A custom tab showing connected to the JTop example program.
previous Previous Contents Next next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using the Platform MBean Server and Platform MXBeans - Java SE Monitoring and Management Guide

Documentation Contents
previous Previous Contents Next next
Chapter 4

Using the Platform MBean Server and Platform MXBeans

This chapter introduces the MBean server and the MXBeans that are provided as part of the Java Platform, Standard Edition (Java SE platform), which can be used for monitoring and management purposes. Java Management Extensions (JMX) technology MBeans and MBean servers were introduced briefly in Chapter 1, Overview of Java SE Monitoring and Management. More information about the JMX technology can be found in the JMX Technology documentation for the Java SE platform.

Using the Platform MBean Server

An MBean server is a repository of MBeans that provides management applications access to MBeans. Applications do not access MBeans directly, but instead access them through the MBean server via their unique ObjectName. An MBean server implements the interface javax.management.MBeanServer.

The platform MBean server was introduced in the Java SE 5.0, and is an MBean server that is built into the Java Virtual Machine (Java VM). The platform MBean server can be shared by all managed components that are running in the Java VM. You access the platform MBean server using the java.lang.management.ManagementFactory method getPlatformMBeanServer. Of course, you can also create your own MBean server using the javax.management.MBeanServerFactory class. However, there is generally no need for more than one MBean server, so using the platform MBean server is recommended.

Accessing Platform MXBeans

A platform MXBean, is an MBean for monitoring and managing the Java VM. Each MXBean encapsulates a part of the VM functionality. A full list of the MXBeans that are provided with the platform is provided in Table 1-1 in Chapter 1, Overview of Java SE Monitoring and Management.

A management application can access platform MXBeans in three different ways.

  • Direct access, via the ManagementFactory class.

  • Direct access, via an MXBean proxy.

  • Indirect access, via the MBeanServerConnection class.

These three ways of accessing the platform MXBeans are described in the next three sections.

Accessing Platform MXBeans via the ManagementFactory Class

An application can make direct calls to the methods of a platform MXBean that is running in the same Java VM as itself. To make direct calls, you can use the static methods of the ManagementFactory class. ManagementFactory has accessor methods for each of the different platform MXBeans, such as, getClassLoadingMXBean(), getGarbageCollectorMXBeans(), getRuntimeMXBean(), and so on. In cases where there are more than one platform MXBean, the method returns a list of the platform MXBeans found.

For example, Example 4-1 uses the static method of ManagementFactory to get the platform MXBean RuntimeMXBean, and then gets the vendor name from the platform MXBean.

Example 4-1 Accessing a Platform MXBean via the ManagementFactory Class
RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();
String vendor = mxbean.getVmVendor();

Accessing Platform MXBeans via an MXBean Proxy

An application can also call platform MXBean methods via an MXBean proxy. To do so, you must construct an MXBean proxy instance that forwards the method calls to a given MBean server by calling the static method ManagementFactory.newPlatformMXBeanProxy(). An application typically constructs a proxy to obtain remote access to a platform MXBean of another Java VM.

For example, Example 4-2 performs exactly the same operation as Example 4-1, but this time uses an MXBean proxy.

Example 4-2 Accessing a Platform MXBean via an MXBean Proxy
MBeanServerConnection mbs;
...
// Get a MBean proxy for RuntimeMXBean interface
RuntimeMXBean proxy =
    ManagementFactory.newPlatformMXBeanProxy(mbs,
                                             ManagementFactory.RUNTIME_MXBEAN_NAME,
                                             RuntimeMXBean.class);
// Get standard attribute "VmVendor"
String vendor = proxy.getVmVendor();

Accessing Platform MXBeans via the MBeanServerConnection Class

An application can indirectly call platform MXBean methods through an MBeanServerConnection that connects to the platform MBean server of another running Java VM. You use the MBeanServerConnection class's getAttribute() method to get an attribute of a platform MXBean, providing the MBean's ObjectName and the attribute name as parameters.

For example, Example 4-3 performs the same job as Example 4-1 and Example 4-2, but uses an indirect call through MBeanServerConnection.

Example 4-3 Accessing a Platform MXBean via the MBeanServerConnection Class
MBeanServerConnection mbs;
...
try {
  ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME);
  // Get standard attribute "VmVendor"
  String vendor = (String) mbs.getAttribute(oname, "VmVendor");
} catch (....) {
  // Catch the exceptions thrown by ObjectName constructor
  // and MBeanServer.getAttribute method
  ...
}

Using Oracle JDK's Platform Extension

Java VMs can extend the management interface by defining interfaces for platform-specific measurements and management operations. The static factory methods in the ManagementFactory class will return the MBeans with the platform extension.

The com.sun.management package contains Oracle JDK's platform extensions. The following sections provide examples of how to access a platform-specific attribute from Oracle JDK's implementation of the OperatingSystemMXBean.

Accessing MXBean Attributes Directly

Example 4-4 illustrates direct access to one of Oracle JDK's MXBean interfaces.

Example 4-4 Accessing an MXBean Attribute Directly
com.sun.management.OperatingSystemMXBean mxbean =
  (com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();

// Get the number of processors
int numProcessors = mxbean.getAvailableProcessors();

// Get the Oracle JDK-specific attribute Process CPU time
long cpuTime = mxbean.getProcessCpuTime();

Accessing MXBean Attributes via MBeanServerConnection

Example 4-5 illustrates access to one of Oracle JDK's MXBean interfaces via the MBeanServerConnection class.

Example 4-5 Accessing an MXBean Attribute via MBeanServerConnection
MBeanServerConnection mbs;

// Connect to a running Java VM (or itself) and get MBeanServerConnection
// that has the MXBeans registered in it
...

try {
    // Assuming the OperatingSystem MXBean has been registered in mbs
    ObjectName oname = new ObjectName(ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME);

    // Get standard attribute "Name"
    String vendor = (String) mbs.getAttribute(oname, "Name");

    // Check if this MXBean contains Oracle JDK's extension
    if (mbs.isInstanceOf(oname, "com.sun.management.OperatingSystemMXBean")) {
        // Get platform-specific attribute "ProcessCpuTime"
        long cpuTime = (Long) mbs.getAttribute(oname, "ProcessCpuTime");
    }
} catch (....) {
    // Catch the exceptions thrown by ObjectName constructor
    // and MBeanServer methods
    ...
}

Monitoring Thread Contention and CPU Time

The ThreadMXBean platform MXBean provides support for monitoring thread contention and thread Central Processing Unit (CPU) time.

The Oracle JDK's HotSpot VM supports thread contention monitoring. You use the ThreadMXBean.isThreadContentionMonitoringSupported() method to determine if a Java VM supports thread contention monitoring. Thread contention monitoring is disabled by default. Use the setThreadContentionMonitoringEnabled() method to enable it.

The Oracle JDK's HotSpot VM supports the measurement of thread CPU time on most platforms. The CPU time provided by this interface has nanosecond precision but not necessarily nanosecond accuracy.

You use the isThreadCpuTimeSupported() method to determine if a Java VM supports the measurement of the CPU time for any thread. You use isCurrentThreadCpuTimeSupported() to determine if a Java VM supports the measurement of the CPU time for the current thread. A Java VM that supports CPU time measurement for any thread will also support that for the current thread.

A Java VM can disable thread CPU time measurement. You use the isThreadCpuTimeEnabled() method to determine if thread CPU time measurement is enabled . You use the setThreadCpuTimeEnabled() method to enable or disable the measurement of thread CPU time.

Managing the Operating System

The OperatingSystem platform MXBean allows you to access certain operating system resource information, such as the following.

  • Process CPU time.

  • Amount of total and free physical memory.

  • Amount of committed virtual memory (that is, the amount of virtual memory guaranteed to be available to the running process).

  • Amount of total and free swap space.

  • Number of open file descriptors (only for Solaris, Linux, or Mac OS X platforms).

When the Operating System MXBean in the MBeans tab is selected in JConsole, you see all the attributes and operations including the platform extension. You can monitor the changes of a numerical attribute over time by double-clicking the value field of the attribute.

Logging Management

The Java SE platform provides a special MXBean for logging purposes, the LoggingMXBean interface.

The LoggingMXBean enables you to perform the following tasks.

  • Get the name of the log level associated with the specified logger.

  • Get the list of currently registered loggers.

  • Get the name of the parent for the specified logger.

  • Set the specified logger to the specified new level.

The unique ObjectName of the LoggingMXBean is java.util.logging:type=Logging. This object name is stored in LogManager.LOGGING_MXBEAN_NAME.

There is a single global instance of the LoggingMXBean, which you can get by calling LogManager.getLoggingMXBean().

The Logging MXBean defines a LoggerNames attribute describing the list of logger names. To find the list of loggers in your application, you can select the Logging MXBean under the java.util.logging domain in the MBeans tab, and double-click on the value field of the LoggerNames attribute. The Logging MXBean also supports two operations.

  • getLoggerLevel: Returns the log level of a given logger.

  • setLoggerLevel: Sets the log level of a given logger to a new level.

These operations take a logger name as the first parameter. To change the level of a logger, enter the logger name in the first parameter and the name of the level it should be set to in the second parameter of the setLoggerLevel operation.

Detecting Low Memory

Memory use is an important attribute of the memory system. It can be indicative of the following problems.

  • Excessive memory consumption by an application.

  • An excessive workload imposed on the automatic memory management system.

  • Potential memory leakages.

There are two kinds of memory thresholds you can use to detect low memory conditions: a usage threshold and a collection usage threshold. You can detect low memory conditions using either of these thresholds with polling or threshold notification. All these concepts are described in the next sections.

Memory Thresholds

A memory pool can have two kinds of memory thresholds: a usage threshold and a collection usage threshold. Either one of these thresholds may not be supported by a particular memory pool. The values for the usage threshold and collection usage threshold can both be set using the MBeans tab in JConsole.

Usage Threshold

The usage threshold is a manageable attribute of some memory pools. It enables you to monitor memory use with a low overhead. Setting the threshold to a positive value enables a memory pool to perform usage threshold checking. Setting the usage threshold to zero disables usage threshold checking. The default value is supplied by the Java VM.

A Java VM performs usage threshold checking on a memory pool at the most appropriate time, typically during garbage collection. Each memory pool increments a usage threshold count whenever the usage crosses the threshold.

You use the isUsageThresholdSupported() method to determine whether a memory pool supports a usage threshold, since a usage threshold is not appropriate for some memory pools. For example, in a generational garbage collector (such as the one in the HotSpot VM; see Garbage Collection in Chapter 3, Using JConsole), most of the objects are allocated in the young generation, from the Eden memory pool. The Eden pool is designed to be filled up. Garbage collecting the Eden memory pool will free most of its memory space since it is expected to contain mostly short-lived objects that are unreachable at garbage collection time. So, it is not appropriate for the Eden memory pool to support a usage threshold.

Collection Usage Threshold

The collection usage threshold is a manageable attribute of some garbage-collected memory pools. After a Java VM has performed garbage collection on a memory pool, some memory in the pool will still be in use. The collection usage threshold allows you to set a value for this memory. You use the isCollectionUsageThresholdSupported() method of MemoryPoolMXBean to determine if the pool supports a collection usage threshold.

A Java VM may check the collection usage threshold on a memory pool when it performs garbage collection. Set the collection usage threshold to a positive value to enable checking. Set the collection usage threshold to zero (the default) to disable checking.

The usage threshold and collection usage threshold can be set in the MBeans tab of JConsole.

Memory MXBean

The various memory thresholds can be managed via the platform MemoryMXBean. The MemoryMXBean defines the following four attributes.

  • HeapMemoryUsage: A read-only attribute describing the current heap memory usage.

  • NonHeapMemoryUsage: A read-only attribute describing non-heap memory usage.

  • ObjectPendingFinalizationCount: A read-only attribute describing the number of objects pending for finalization.

  • Verbose: A boolean attribute describing the Garbage Collection (GC) verbose tracing setting. This can be set dynamically. The GC verbose traces will be displayed at the location specified when you start the Java VM. The default location for GC verbose output of the Hotspot VM is stdout.

The Memory MXBean supports one operation, gc, for explicit garbage collection requests.

Details of the Memory MXBean interface are defined in the java.lang.management.MemoryMXBean specification.

Memory Pool MXBean

The MemoryPoolMXBean platform MXBean defines a set of operations to manage memory thresholds.

  • getUsageThreshold()

  • setUsageThreshold(long threshold)

  • isUsageThresholdExceeded()

  • isUsageThresholdSupported()

  • getCollectionUsageThreshold()

  • setCollectionUsageThreshold(long threshold)

  • isCollectionUsageThresholdSupported()

  • isCollectionUsageThresholdExceeded()

Each memory pool may have two kinds of memory thresholds for low memory detection support: a usage threshold and a collection usage threshold. Either one of these thresholds might not be supported by a particular memory pool. For more information, see the API reference documentation for the MemoryPoolMXBean class.

Polling

An application can continuously monitor its memory usage by calling either the getUsage() method for all memory pools or the isUsageThresholdExceeded() method for memory pools that support a usage threshold.

Example 4-6 has a thread dedicated to task distribution and processing. At every interval, it determines whether it should receive and process new tasks based on its memory usage. If the memory usage exceeds its usage threshold, it redistributes outstanding tasks to other VMs and stops receiving new tasks until the memory usage returns below the threshold.

Example 4-6 Using Polling
pool.setUsageThreshold(myThreshold);
....
boolean lowMemory = false;
while (true) {
  if (pool.isUsageThresholdExceeded()) {
    lowMemory = true;
    redistributeTasks();  // redistribute tasks to other VMs
    stopReceivingTasks();  // stop receiving new tasks
  } else {
    if (lowMemory) { // resume receiving tasks
      lowMemory = false;
      resumeReceivingTasks();
    }
    // processing outstanding task
    ...
  }
  // sleep for sometime
  try {
    Thread.sleep(sometime);
  } catch (InterruptedException e) {
    ...
  }
}

Example 4-6 does not differentiate the case in which the memory usage has temporarily dropped below the usage threshold from the case in which the memory usage remains above the threshold between two iterations. You can use the usage threshold count returned by getUsageThresholdCount() to determine if the memory usage has returned below the threshold between two polls.

To test the collection usage threshold instead, you use the isCollectionUsageThresholdSupported(), isCollectionThresholdExceeded() and getCollectionUsageThreshold() methods in the same way as above.

Threshold Notifications

When the MemoryMXBean detects that a memory pool has reached or exceeded its usage threshold, it emits a usage threshold exceeded notification. The MemoryMXBean will not issue another usage threshold exceeded notification until the usage has fallen below the threshold and then exceeded it again. Similarly, when the memory usage after garbage collection exceeds the collection usage threshold, the MemoryMXBean emits a collection usage threshold exceeded notification.

Example 4-7 implements the same logic as Example 4-6, but uses usage threshold notification to detect low memory conditions. Upon receiving a notification, the listener notifies another thread to perform actions such as redistributing outstanding tasks, refusing to accept new tasks, or allowing new tasks to be accepted again.

In general, you should design the handleNotification method to do a minimal amount of work, to avoid causing delay in delivering subsequent notifications. You should perform time-consuming actions in a separate thread. Since multiple threads can concurrently invoke the notification listener, the listener should synchronize the tasks it performs properly.

Example 4-7 Using Threshold Notifications
class MyListener implements javax.management.NotificationListener {
  public void handleNotification(Notification notification, Object handback)  {
    String notifType = notification.getType();
    if (notifType.equals(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED)) {
      // potential low memory, redistribute tasks to other VMs & stop receiving new tasks.
      lowMemory = true;
      notifyAnotherThread(lowMemory);
    }
  }
}

// Register MyListener with MemoryMXBean
MemoryMXBean mbean = ManagementFactory.getMemoryMXBean();
NotificationEmitter emitter = (NotificationEmitter) mbean;
MyListener listener = new MyListener();
emitter.addNotificationListener(listener, null, null);

Assuming this memory pool supports a usage threshold, you can set the threshold to some value (representing a number of bytes), above which the application will not accept new tasks.

pool.setUsageThreshold(myThreshold);

After this point, usage threshold detection is enabled and MyListener will handle notification.
previous Previous Contents Next next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Core Java Math

Math functionality includes floating point libraries (java.lang.Math and java.lang.StrictMath) and arbitrary-precision math (java.math package).

API Specification

Floating Point Libraries

  • java.lang.Math
  • java.lang.StrictMath

Arbitrary-Precision Math

  • java.math Package

Enhancements

  • Enhancements to java.math

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements to java.math

JDK 5.0

  • The BigDecimal class has added support for fixed-precision floating-point computation. Refer to JSR 13.
  • The Math and StrictMath libraries include hyperbolic transcendental functions (sinh, cosh, tanh), cube root, base 10 logarithm, etc.
  • Hexadecimal floating-point support - To allow precise and predictable specification of particular floating-point values, hexadecimal notation can be used for floating-point literals and for string to floating-point conversion methods in Float and Double.

JDK 1.4

  • Performance enhancements for prime generation in BigInteger
    New static method probablePrime has been added to class BigInteger for generating prime numbers. Previously, the sole means of generating a prime BigInteger required the caller to provide a 'certainty' (the log of the probability of compositeness that the caller was willing to tolerate). However, providing an unreasonable value for the certainty could lead to poor performance (if the certainty was too high) or serious bugs (if it was too low). The new prime-generation method provides an efficient algorithm for generating primes using an automatically determined, appropriate value for the certainty based on a draft ANSI specification (X9-80).

JDK 1.3

  • Performance enhancements in BigInteger
    Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on an underlying C library. On a high-quality VM, the new implementation performs all operations faster than the old implementation. The speed-up can be as much as 5x or more, depending on the operation being performed and the length of the operands.
  • More robust BigDecimal(String) constructor
    The BigDecimal(String) constructor has been enhanced to allow signed strings (for example, "+2.71828") and exponential notation (for example, "1.23E-23") as input.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Closing a URLClassLoader

How to Close a URLClassLoader?

The URLClassLoader close() method effectively eliminates the problem of how to support updated implementations of the classes and resources loaded from a particular codebase, and in particular from JAR files. In principle, once the application clears all references to a loader object, the garbage collector and finalization mechanisms will eventually ensure that all resources (such as the JarFile objects) are released and closed.

The application can then replace the JAR file, and create a new URLClassLoader instance to load from the same location, but this time using the new implementation of the classes/resources. However, since it can't be predicted exactly when finalization and garbage collection will occur, problems are caused for applications which need to be able to do this in a predictable and timely fashion. It is a problem on Windows, because open files cannot be deleted or replaced.

In Java SE 7, the URLClassLoader close() method effectively invalidates the loader, so that no new classes can be loaded from it. It also closes any JAR files that were opened by the loader. This allows the application to delete or replace these files and, if necessary, create new loaders using new implementations.

The close() method follows the familiar "Closeable" pattern, and URLClassLoader now implements the Closeable interface, which defines URLClassLoader.close(). The following sample code shows how one might use the method.

       //
       // create a class loader loading from "foo.jar"
       //
       URL url = new URL("file:foo.jar");
       URLClassLoader loader = new URLClassLoader (new URL[] {url});
       Class cl = Class.forName ("Foo", true, loader);
       Runnable foo = (Runnable) cl.newInstance();
       foo.run();
       loader.close ();

       // foo.jar gets updated somehow

       loader = new URLClassLoader (new URL[] {url});
       cl = Class.forName ("Foo", true, loader);
       foo = (Runnable) cl.newInstance();
       // run the new implementation of Foo
       foo.run();
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Cookie Management

Introduction

The HTTP state management mechanism specifies a way to create a stateful session with HTTP requests and responses. The specification for it can be found in RFC 2965: HTTP State Management Mechanism at http://www.ietf.org/rfc/rfc2965.txt?number=2965.

Prior to JDK 5.0 support

Prior to JDK 5.0, it was possible to add Cookie management to applications. But the supporting API was somewhat rudimentary. There was no single point of hook up with cookie management. Each application had to handle cookies for each HTTP request/response separately by using the following two methods from java.net.URLConnection class:

setRequestProperty()
getHeaderFields()

The first method should be called before sending out a HTTP request in order to set the appropriate cookies for the current URL in the HTTP headers. The second method should be used to retrieve the cookies from the response headers sent by the HTTP server.

Although doable, adding Cookie support in this way results in fragmented code, which is error prone and incurs high maintenance.

What's new in JDK 5.0?

JDK 5.0 introduced a new callback mechanism via an abstract class to hook up a HTTP state management policy implementation into the HTTP protocol handler. Applications and web containers can introduce Cookie management by providing a concrete subclass of the new API.

The new abstract class is called java.net.CookieHandler. It provides a mechanism to register and retrieve the current CookieHandler for the JVM, as well as methods to retrieve and record relevant cookies for a specific URI.

There are two static methods in CookieHandler getDefault() and setDefault() for retrieving and registering the default CookieHandler in the VM. As well as two instance methods get() and put() for returning a list of cookies based on a URL and stores a list of cookies from the response headers, respectively.

Cookies are represented as Map<String,List<String>>, a Map from the header field name for cookies to a list of cookies represented by Strings. There are two state management headers defined so far, "Set-Cookie2" and "Cookie". The former is used for returning cookies in response headers; while the latter is for setting cookies in HTTP request headers.

Here is an example from RFC2965:

1. User Agent -> Server

POST /acme/login HTTP/1.1
[form data]

2. Server -> User Agent

HTTP/1.1 200 OK
Set-Cookie2: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"

3. User Agent -> Server

POST /acme/pickitem HTTP/1.1
Cookie: $Version="1"; Customer="WILE_E_COYOTE"; $Path="/acme"
[form data]

A simple Example

Here's a simple example of a CookieHandler implementation. Basically there are two methods to implement, given a request URI and request headers (except the cookie headers), retrieve all the relevant cookies from your cookie cache; and record the applicable cookies to your cookie cache given the request URI and the response headers.

class MyCookieHandler extends CookieHandler {
        public Map<String, List<String>>
                get(URI uri, Map<String, List<String>> requestHeaders)
                throws IOException {
                // the cookies will be included in request
                Map<String, List<String>> map = new HashMap<String, List<String>>();
                List<String> l = retrieveCookies(uri, rqstHdrs);
                map.put("Cookie",l);
                return Collections.unmodifiableMap(map);
        }

        public void
                put(URI uri, Map responseHeaders)
                throws IOException {
            // check response has cookies[1]
                List l = (List)responseHeaders.get("Set-Cookie2");
            if (l != null) {
                        // save the cookies in a cookie cache
                 storeCookies(uri, l);
            }
        }
}

The methods retrieveCookies() and storeCookies() are "magic" functions for interacting with a backend cookie management facility, which is omitted in this example.

Once it is registered with the VM, it will take effect when you issue HTTP transactions.

public static void main(String args[]) throws Exception {
        ......
        CookieHandler.setDefault(new MyCookieHandler());
        HttpURLConnection http = (HttpURLConnection)url.openConnection();

        int respCode = http.getResponseCode();
        http.disconnect();
        ......
}

There is no default implementation of a cookie manager in Java SE. However, this may change in the future. Java Plugin and Java WebStart provides a default CookieHandler in their environment.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Extending Sockets in JDK 1.1

Some of the improvements to the java.net classes in JDK 1.1 allow sockets (Socket/ServerSocket) to be non-final, extendable classes. The basic goal is to allow extended sockets to be used whereever a base class Socket is used without rewriting application code. So for example an already-existing email client could be handed a subclass of Socket that does peer authentication or encryption, which the Socket subclass would handle transparently. Other examples include sockets that transparently use compression, or which add functionality such as mirroring traffic to multiple servers (e.g. using reliable ordered multicast).

This document has the following sections:

  • JDK 1.0: SocketImpl
  • JDK 1.1: Non-Final Socket and ServerSocket Classes
  • Socket: How to extend Socket
  • ServerSocket: How to extend ServerSocket

JDK 1.0: SocketImpl and SocketImplFactory

JDK 1.0 allows licensees to extend socket functionality in one very particular way: they can subclass java.net.SocketImpl , and provide an enhanced java.net.SocketImplFactory() which returns such classes as needed.

The SocketImpl/SocketImplFactory scheme is useful for, and was designed for, java apps/applications to be portable across environments that use different transport mechanisms. A client application that uses a java.net.Socket can work in the general case (where the runtime uses a PlainSocketImpl), as well as in environments where network connections must do something particular. For example, a java program should be able to work behind a firewall where connections to the Internet must be done through a proxy protocol, like SOCKS, assuming the right kind of SocketImpl is set for the java runtime in that environment.

Though the SocketImpl is useful for things like transparently providing proxy support to java apps, its utility is limited as a way to provide added functionality of network transport, or for layering other protocols on top of TCP. Additionally, it's only possible to have a single type of SocketImpl installed for a java runtime, which limits large-scale applications. It's cleaner and more intuitive to make ServerSocket and Socket extendable.

Note that the SocketImpl mechanism is designed to be orthogonal to the functionality provided by a subclass of Socket: for example, a subclass of Socket that is capable of doing compression on its streams would still want to use the system-default SocketImpl to get proxy support behind certain kinds of firewalls. The system-default SocketImpl can be thought of as an extension of the transport layer that applications needn't be aware of, and subclasses of Socket/ServerSocket provide richer functionality at the application layer.

Change in JDK 1.1

In JDK 1.1, Socket and ServerSocket are made non-final, which is a pretty simple change. The one basic caveat is that subclasses do not have direct access to the underlying SocketImpl in the base classes, primarily for security reasons. But other than that, subclasses of Socket/ServerSocket inherit and can override methods from their superclass.

The JDK changed by:

  • Removing the final modifier from the Socket and ServerSocket classes.
  • Reattaching that final modifier only to methods where it is needed to avoid bypassing security manager calls.
  • Defining a new method in ServerSocket with signature: protected final void implAccept(Socket client) to use when initializing a newly accepted socket.
  • Exposing a default Socket constructor so that Socket subclasses could initialize their superclass without doing an actual connection in the superclass. This is also required so that a ServerSocket subclasses can return the correct Socket subclass from accept() (e.g., FooServerSocket.accept() returns a FooSocket)

Changes to Socket

The public constructors to Socket of the general form:

        Socket(String host, int port) {
          ...
        }

can be used by subclasses to initialize the superclass, but they will also create a system-default SocketImpl and connect it to the specified host, port. Socket also has two protected constructors to initialize the superclass without connecting the Socket:

        protected Socket() {
          /* install system-default SocketImpl */
          ...
        }

        protected Socket(SocketImpl impl) {
          this.impl = impl;
        }

The first constructor installs a system-default SocketImpl (either from the factory or a PlainSocketImpl). The second allows for a subclass of Socket to install its own impl if need be. If the Socket subclass doesn't need the default SocketImpl, it's perfectly valid to use the second constructor and pass it null. (But in this case the subclass should of course override all the base class methods, since they all rely on the underlying SocketImpl).

Changes to ServerSocket

Subclasses of ServerSocket also have a protected constructor exposed to them that creates a default SocketImpl in the base class, but doesn't otherwise initialize it (e.g., doesn't call impl.create(), impl.bind() or impl.listen()). The public constructors of ServerSocket will initialize the underlying SocketImpl.

        protected ServerSocket() {
          /* install system-default SocketImpl */
          ...
        }

The only other thing about extending ServerSocket that should be explained is how to override accept() when the underlying SocketImpl for Socket/ServerSocket isn't accesible to subclasses. Since the base class can do this, ServerSocket has a method to make the necessary calls on the underlying SocketImpl's on behalf of subclasses:

public class ServerSocket {
        ...
        protected final void implAccept(Socket s) throws IOException {
           ...
           // on return from this call s will be connected to a client
        }
        ...

Note that subclasses of Socket/ServerSocket that don't use a SocketImpl needn't use this method. As an example of how this works, here's what some SSL code might look like.

class SSLServerSocket extends ServerSocket {
    ...
    public Socket accept () throws IOException
    {
        SSLSocket s = new SSLSocket (certChain, privateKey);
        // create an unconnected client SSLSocket, that we'll
        // return from accept

        implAccept (s);
        s.handshake ();
        return s;
    }
    ...
}

class SSLSocket extends java.net.Socket {
    ...
    public SSLSocket(CertChain c, PrivateKey k) {
        super();
        ...
    }
    ...
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Http Authentication

Overview

The HTTP protocol handler implements a number of authentication schemes. JDK 6 supports the following:
  • HTTP Basic authentication (RFC2617)
  • HTTP Digest authentication (RFC2617)
  • NTLM (defined by Microsoft)
  • Http SPNEGO Negotiate (defined by Microsoft), with the following underlying mechanisms:
    • Kerberos
    • NTLM
Each of these schemes is described in more detail below, but they are typically used by application code in much the same way. The java.net.Authenticator class is used to enable authentication and to provide access to a store of usernames and passwords which are then used in the respective authentication schemes.

Generally, all authentication schemes work with both proxies and servers. Some (basic and digest) can be used simultaneously with proxies and servers. See below for how to distinguish between proxy and server authentication.

How to use the Authenticator class

Authenticator is an abstract class which is extended by applications and once installed, is invoked to obtain usernames and passwords for authentication interactions.

Extending java.net.Authenticator

Application code must override the getPasswordAuthentication() method. Note, the method is not abstract, and the default implementation does nothing. The following is a minimal example:
    class MyAuthenticator extends Authenticator {

        public PasswordAuthentication getPasswordAuthentication () {
            return new PasswordAuthentication ("user", "password".toCharArray());
        }
    }

This simple example returns the username "user" and a password for every HTTP authentication interaction. A more realistic example would use the other methods of java.net.Authenticator to get more information about the HTTP request that needs to be authenticated. Any of the following methods may be called by the implementation of getPasswordAuthentication() in order to decide how to handle each request for credentials.

  • getRequestingHost()
  • getRequestingPort()
  • getRequestingPrompt()
  • getRequestingProtocol()
  • getRequestingScheme()
  • getRequestingURL()
  • getRequestingSite()
  • getRequestorType(). Returns whether requestor is a proxy or server.

Enabling authentication

Having defined a suitable authenticator implementation class, authentication is enabled by calling
        Authenticator.setDefault (authinstance);

where authinstance is an instance of the declared implementation class. If this is not called, then authentication is disabled, and server authentication errors will be returned to user code via IOException objects. Once installed, the http implementation will try to authenticate automatically where possible (via cached credentials, or credentials that can be acquired from the system). If the correct credentials are not available then the user's authenticator is invoked to provide them.

Controlling which authentication scheme is used

When a server needs a client to authenticate, it may propose a number of schemes to the client (for example digest and ntlm) and the client may choose from among them. Normally, applications do not care which scheme is used to and the implementation automatically chooses the strongest (most secure) protocol transparently.

If the user needs to ensure that a particular scheme is used, then the following system property can be set to modify the default behavior.

        -Dhttp.auth.preference="scheme"

-D is specified if the property is being set on the command line. "http.auth.preference" is the property name, and scheme is the name of the scheme to use. If the server does not include this scheme in its list of proposed schemes, then the default choice is made.

Details of each authentication scheme

Http Basic

Basic authentication is a simple and not very secure authentication scheme which is defined in RFC 2317. The username and password are encoded in base 64 and are therefore easily obtainable by anyone who has access to the packet data. The security of basic authentication can be improved when used with HTTPS, thus encrypting the request and response.

The getRequestingPrompt() method returns the Basic authentication realm as provided by the server.

Http digest

Digest is a relatively secure scheme based on cryptographic hashes of the username and password, using the MD5 hash algorithm. Digest also provides the ability for the server to prove to the client that it also knows the shared secret (password). This behavior is normally disabled, because not all servers support it. This can be switched on with the following system properties:
        -Dhttp.auth.digest.validateServer="true"
        -Dhttp.auth.digest.validateProxy="true"

The getRequestingPrompt() method returns the Digest authentication realm as provided by the server.

NTLM

NTLM is a scheme defined by Microsoft. It is more secure scheme than Basic, but less secure than Digest. NTLM can be used with proxies or servers, but not with both at the same time. If a proxy is being used, then it cannot be used for server authentication. This is because the protocol actually authenticates the TCP connection rather than the individual HTTP interactions.

On Microsoft Windows platforms, NTLM authentication attempts to acquire the user credentials from the system without prompting the user's authenticator object. If these credentials are not accepted by the server then the user's authenticator will be called.

Because the Authenticator class was defined prior to NTLM being supported, it was not possible to add support in the API for the NTLM domain field. There are three options for specifying the domain:

  1. Do not specify it. In some environments, the domain is not actually required and the application need not specify it.
  2. The domain name can be encoded within the username by prefixing the domain name followed by a back-slash '\' before the username. With this method, existing applications that use the Authenticator class do not need to be modified, so long as users are made aware that this notation must be used.
  3. If a domain name is not specified as in method 2) and the system property "http.auth.ntlm.domain" is defined, then the value of this property will be used as the domain name.

Http Negotiate (SPNEGO)

Negotiate is a scheme which potentially allows any GSS authentication mechanism to be used as a HTTP authentication protocol. Currently, the scheme only supports Kerberos and NTLM. NTLM has already been described above, so this section only describes how to set up Kerberos for Http authentication.

Kerberos 5 Configuration

Since the SPNEGO mechanism will call JGSS, which in turns calls the Kerberos V5 login module to do real works. Kerberos 5 configurations are needed. which includes:
  • Some way to provide Kerberos configurations. This can be achieved with the Java system property java.security.krb5.conf. For example:
            java -Djava.security.krb5.conf=krb5.conf \
                 -Djavax.security.auth.useSubjectCredsOnly=false \
                 ClassName
  • A JAAS config file denoting what login module to use. HTTP SPNEGO codes will look for the standard entry named com.sun.security.jgss.krb5.initiate.
For example, you can provide a file spnegoLogin.conf:
          com.sun.security.jgss.krb5.initiate {
              com.sun.security.auth.module.Krb5LoginModule
                  required useTicketCache=true;
          };
and run java with:
            java -Djava.security.krb5.conf=krb5.conf \
                 -Djava.security.auth.login.config=spnegoLogin.conf \
                 -Djavax.security.auth.useSubjectCredsOnly=false \
                 ClassName

Username and Password Retrieval

Just like any other HTTP authentication scheme, the client can provide a customized java.net.Authenticator to feed username and password to the HTTP SPNEGO module if they are needed (i.e. there is no credential cache available). The only authentication information needed to be checked in your Authenticator is the scheme which can be retrieved with getRequestingScheme(). The value should be "Negotiate". This means your Authenticator implementation will look like:
    class MyAuthenticator extends Authenticator {

        public PasswordAuthentication getPasswordAuthentication () {
            if (getRequestingScheme().equalsIgnoreCase("negotiate")) {
                String krb5user;
                char[] krb5pass;
                // get krb5user and krb5pass in your own way
                ....
                return (new PasswordAuthentication (krb5user,
                            krb5pass));
            } else {
                ....
            }
        }
    }
Attention : According to the specification of java.net.Authenticator, it's designed to get the username and password at the same time, so do not specify principal=xxx in the JAAS config file.

Scheme Preference

The client can still provide system property http.auth.preference to denote that a certain scheme should always be used as long as the server request for it. You can use "SPNEGO" or "Kerberos" for this system property. "SPNEGO" means you prefer to response the Negotiate scheme using the GSS/SPNEGO mechanism; "Kerberos" means you prefer to response the Negotiate scheme using the GSS/Kerberos mechanism. Normally, when authenticating against a Microsoft product, you can use "SPNEGO". The value "Kerberos" also works for Microsoft servers. It's only needed when you encounter a server which knows Negotiate but doesn't know about SPNEGO. If http.auth.preference is not set, the internal order choosen is:
  • GSS/SPNEGO -> Digest -> NTLM -> Basic
Noticed that Kerberos does not appear in this list, since whenever Negotiate is supported, GSS/SPNEGO is always chosen.

Fallback

If the server has provided more than one authentication schemes (including Negotiate), according to the processing order mentioned in the last section, Java will try to challenge the Negotiate scheme. However, if the protocol cannot be established successfully (e.g. The kerberos configuration is not correct, or the server's hostname is not recorded in the KDC principal DB, or the username and password provided by Authenticator is wrong), then the 2nd strongest scheme will be automatically used. Attention : If http.auth.preference is set to SPNEGO or Kerberos, then we assume you only want to try the Negotiate scheme even if it fails. we won't fallback to any other scheme and your program will result in throwing an IOException saying it receives a 401 or 407 error from the HTTP response.

Example

Suppose you have an IIS Server running on a Windows Server within an Active Directory. A web page on this server is configured to be protected by Integrated Windows Authentication. This means the server will prompt for both Negotiate and NTLM authentication.

You need to prepare these files to get the protected file:

Code listing for RunHttpSpnego.java

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URL;

public class RunHttpSpnego {

    static final String kuser = "username"; // your account name
    static final String kpass = password; // retrieve password for your account

    static class MyAuthenticator extends Authenticator {
        public PasswordAuthentication getPasswordAuthentication() {
            // I haven't checked getRequestingScheme() here, since for NTLM
            // and Negotiate, the usrname and password are all the same.
            System.err.println("Feeding username and password for " + getRequestingScheme());
            return (new PasswordAuthentication(kuser, kpass.toCharArray()));
        }
    }

    public static void main(String[] args) throws Exception {
        Authenticator.setDefault(new MyAuthenticator());
        URL url = new URL(args[0]);
        InputStream ins = url.openConnection().getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
        String str;
        while((str = reader.readLine()) != null)
            System.out.println(str);
    }
}

Code listing for krb5.conf

[libdefaults]
    default_realm = AD.LOCAL
[realms]
    AD.LOCAL = {
        kdc = kdc.ad.local
    }

Code listing for login.conf

com.sun.security.jgss.krb5.initiate {
  com.sun.security.auth.module.Krb5LoginModule required doNotPrompt=false useTicketCache=true;
};

Then, compile RunHttpSpnego.java and run:

java -Djava.security.krb5.conf=krb5.conf \
    -Djava.security.auth.login.config=login.conf \
    -Djavax.security.auth.useSubjectCredsOnly=false \
    RunHttpSpnego \
    http://www.ad.local/hello/hello.html

You will see:

Feeding username and password for Negotiate
<h1>Hello, You got me!</h1>

In fact, if you are running on a Windows machine as a domain user, or, you are running on a Linux or Solaris machine that has already issued the kinit command and got the credential cache. The class MyAuthenticator will be completely ignored, and the output will be simply

<h1>Hello, You got me!</h1>
which shows the username and password are not consulted. This is the so-called Single Sign-On. Also, You can just run
java RunHttpSpnego \
    http://www.ad.local/hello/hello.html
to see how the fallback is done, in which case you will see
Feeding username and password for ntlm
<h1>Hello, You got me!</h1>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


HTTP Persistent Connections

Documentation Contents

Persistent Connections

What is HTTP Persistent Connections?

HTTP persistent connections, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using the same TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new one for every single request/response pair. Using persistent connections is very important for improving HTTP performance.

There are several advantages of using persistent connections, including:

  • Network friendly. Less network traffic due to fewer setting up and tearing down of TCP connections.
  • Reduced latency on subsequent request. Due to avoidance of initial TCP handshake
  • Long lasting connections allowing TCP sufficient time to determine the congestion state of the network, thus to react appropriately.

The advantages are even more obvious with HTTPS or HTTP over SSL/TLS. There, persistent connections may reduce the number of costly SSL/TLS handshake to establish security associations, in addition to the initial TCP connection set up.

In HTTP/1.1, persistent connections are the default behavior of any connection. That is, unless otherwise indicated, the client SHOULD assume that the server will maintain a persistent connection, even after error responses from the server. However, the protocol provides means for a client and a server to signal the closing of a TCP connection.

What makes a connection reusable?

Since TCP by its nature is a stream based protocol, in order to reuse an existing connection, the HTTP protocol has to have a way to indicate the end of the previous response and the beginning of the next one. Thus, it is required that all messages on the connection MUST have a self-defined message length (i.e., one not defined by closure of the connection). Self demarcation is achieved by either setting the Content-Length header, or in the case of chunked transfer encoded entity body, each chunk starts with a size, and the response body ends with a special last chunk.

What happens if there are proxy servers in between?

Since persistent connections applies to only one transport link, it is important that proxy servers correctly signal persistent/or-non-persistent connections separately with its clients and the origin servers (or to other proxy servers). From a HTTP client or server's perspective, as far as persistence connection is concerned, the presence or absence of proxy servers is transparent.

What does the current JDK do for Keep-Alive?

The JDK supports both HTTP/1.1 and HTTP/1.0 persistent connections.

When the application finishes reading the response body or when the application calls close() on the InputStream returned by URLConnection.getInputStream(), the JDK's HTTP protocol handler will try to clean up the connection and if successful, put the connection into a connection cache for reuse by future HTTP requests.

The support for HTTP keep-Alive is done transparently. However, it can be controlled by system properties http.keepAlive, and http.maxConnections, as well as by HTTP/1.1 specified request and response headers.

The system properties that control the behavior of Keep-Alive are:

http.keepAlive=<boolean>
default: true

Indicates if keep alive (persistent) connections should be supported.

http.maxConnections=<int>
default: 5

Indicates the maximum number of connections per destination to be kept alive at any given time

HTTP header that influences connection persistence is:

Connection: close

If the "Connection" header is specified with the value "close" in either the request or the response header fields, it indicates that the connection should not be considered 'persistent' after the current request/response is complete.

The current implementation doesn't buffer the response body. Which means that the application has to finish reading the response body or call close() to abandon the rest of the response body, in order for that connection to be reused. Furthermore, current implementation will not try block-reading when cleaning up the connection, meaning if the whole response body is not available, the connection will not be reused.

What's new in JDK 5?

When the application encounters a HTTP 400 or 500 response, it may ignore the IOException and then may issue another HTTP request. In this case, the underlying TCP connection won't be Kept-Alive because the response body is still there to be consumed, so the socket connection is not cleared, therefore not available for reuse. What the application needs to do is call HttpURLConnection.getErrorStream() after catching the IOException , read the response body, then close the stream. However, some existing applications are not doing this. As a result, they do not benefit from persistent connections. To address this problem, we have introduced a workaround.

The workaround involves buffering the response body if the response is >=400, up to a certain amount and within a time limit, thus freeing up the underlying socket connection for reuse. The rationale behind this is that when the server responds with a >=400 error (client error or server error. One example is "404: File Not Found" error), the server usually sends a small response body to explain whom to contact and what to do to recover.

Several new Oracle JDK implementation specific properties are introduced to help clean up the connections after error response from the server.

The major one is:

sun.net.http.errorstream.enableBuffering=<boolean>
default: false

With the above system property set to true (default is false), when the response code is >=400, the HTTP handler will try to buffer the response body. Thus freeing up the underlying socket connection for reuse. Thus, even if the application doesn't call getErrorStream(), read the response body, and then call close(), the underlying socket connection may still be kept-alive and reused.

The following two system properties provide further control to the error stream buffering behavior:

sun.net.http.errorstream.timeout=<int> in millisecond
default: 300 millisecond

sun.net.http.errorstream.bufferSize=<int> in bytes
default: 4096 bytes

What can you do to help with Keep-Alive?

Do not abandon a connection by ignoring the response body. Doing so may results in idle TCP connections. That needs to be garbage collected when they are no longer referenced.

If getInputStream() successfully returns, read the entire response body.

When calling getInputStream() from HttpURLConnection, if an IOException occurs, catch the exception and call getErrorStream() to get the response body (if there is any).

Reading the response body cleans up the connection even if you are not interested in the response content itself. But if the response body is long and you are not interested in the rest of it after seeing the beginning, you can close the InputStream. But you need to be aware that more data could be on its way. Thus the connection may not be cleared for reuse.

Here's a code example that complies to the above recommendation:

try {
        URL a = new URL(args[0]);
        URLConnection urlc = a.openConnection();
        is = conn.getInputStream();
        int ret = 0;
        while ((ret = is.read(buf)) > 0) {
          processBuf(buf);
        }
        // close the inputstream
        is.close();
} catch (IOException e) {
        try {
                respCode = ((HttpURLConnection)conn).getResponseCode();
                es = ((HttpURLConnection)conn).getErrorStream();
                int ret = 0;
                // read the response body
                while ((ret = es.read(buf)) > 0) {
                        processBuf(buf);
                }
                // close the errorstream
                es.close();
        } catch(IOException ex) {
                // deal with the exception
        }
}

If you know ahead of time that you won't be interested in the response body, you should issue a HEAD request instead of a GET request. For example when you are only interested in the meta info of the web resource or when testing for its validity, accessibility and recent modification. Here's a code snippet:

URL a = new URL(args[0]);
URLConnection urlc = a.openConnection();
HttpURLConnection httpc = (HttpURLConnection)urlc;
// only interested in the length of the resource
httpc.setRequestMethod("HEAD");
int len = httpc.getContentLength();

Changes in JDK 6

Prior to JDK 6, if an application closes a HTTP InputStream when more than a small amount of data remains to be read, then the connection had to be closed, rather than being cached. Now in JDK 6, the behavior is to read up to 512 Kbytes off the connection in a background thread, thus allowing the connection to be reused. The exact amount of data which may be read is configurable through the http.KeepAlive.remainingData system property.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Networking

API Specification

  • java.netPackage
  • javax.netPackage
  • javax.net.ssl
  • com.sun.net.httpserver Package
  • com.sun.net.httpserver.spi Package

API Enhancements

  • Features and Enhancements in version 8
  • Features and Enhancements in version 7
  • Features and Enhancements in version 6
  • Features and Enhancements in version 5.0
  • New Features and Enhancements in version 1.4
  • Networking Release Notes for version 1.4.2
  • New Features and Enhancements in version 1.3

Tutorials and Programmer's Guides

  • Networking Overview
    Overview of networking facilities in java.net, including Addressing, Making TCP Connections, Sending/Receiving Datagram Packets via UDP, Locating/Identifying Network Resources, and Security.

  • HTTP client API. The following articles describe features of the HTTP client API. (See java.net.HttpURLConnection for an overview).

    • URLConnection Caching API
      Detailed overview, with code samples, of the new cache management API.
    • Cookie Management
      Overview of how to deal with cookies, often used as an HTTP state management mechanism, in Java SE 5.0.
    • Http authentication
      Overview of how to use HTTP authentication, which schemes and protocols are supported, and the system properties that affect its behavior.
    • Persistent Connections
      Overview of the HTTP persistent connections (aka keep alive mechanisms), and the means to control them.

  • Java Networking and Proxies
    In depth exploration, with code samples, of proxy management Java networking APIs including the newly introduced ProxySelector mechanism.
  • IPv6 Support
    IPv6 support, including special IPv6 address types and dual-stack node.
  • Networking Properties
    Descriptions of properties used by networking.
  • Orderly Versus Abortive Connection Release in Java
    How to ensure orderly or graceful release of TCP connections in Networking applications.
  • Extendable Socket and ServerSocket
    The design, rationale, and how to do it.
  • Socket Options
    Support for popular BSD-style options in the java base classes.
  • Socket Exceptions
    Subclasses of SocketException for finer granularity of handling network errors.
  • Sockets Direct Protocol, a trail in The Java Tutorials.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Networking and Proxies

1) Introduction

In today's networking environments, particularly corporate ones, application developers have to deal with proxies almost as often as system administrators. In some cases the application should use the system default settings, in other cases it will we want to have a very tight control over what goes through which proxy, and, somewhere in the middle, most applications will be happy to delegate the decision to their users by providing them with a GUI to set the proxy settings, as is the case in most browsers.

In any case, a development platform, like Java, should provide mechanisms to deal with these proxies that are both powerful and flexible. Unfortunately, until recently, the Java platform wasn't very flexible in that department. But all that changed in Java SE 5.0 as new API have been introduced to address this shortcoming, and the purpose of this document is to provide an in-depth explanation of all these APIs and mechanisms, the old ones, which are still valid, as well as the new ones.

2) System Properties

Up until Java SE 1.4 system properties were the only way to set proxy servers within the Java networking API for any of the protocol handlers. To make matters more complicated, the names of these properties have changed from one release to another and some of them are now obsolete even if they are still supported for compatibility's sake.

The major limitation of using system properties is that they are an “all or nothing” switch. Meaning that once a proxy has been set for a particular protocol, it will affect all connections for that protocol. It's a VM wide behavior.

There are 2 main ways to set system properties:

  • As a command line option when invoking the VM
  • Using the System.setProperty(String, String) method, assuming, of course that you have permission to do so.

Now, let's take a look, protocol by protocol, at the properties you can use to set proxies. All proxies are defined by a host name and a port number. The later is optional as, if it is not specified, a standard default port will be used.

2.1) HTTP

There are 3 properties you can set to specify the proxy that will be used by the http protocol handler:

  • http.proxyHost: the host name of the proxy server
  • http.proxyPort: the port number, the default value being 80.
  • http.nonProxyHosts:a list of hosts that should be reached directly, bypassing the proxy. This is a list of patterns separated by '|'. The patterns may start or end with a '*' for wildcards. Any host matching one of these patterns will be reached through a direct connection instead of through a proxy.

Let's look at a few examples assuming we're trying to execute the main method of the GetURL class:

$ java -Dhttp.proxyHost=webcache.example.com GetURL

All http connections will go through the proxy server at webcache.example.com listening on port 80 (we didn't specify any port, so the default one is used).

$ java -Dhttp.proxyHost=webcache.example.com -Dhttp.proxyPort=8080
-Dhttp.nonProxyHosts=”localhost|host.example.com” GetURL

In that second example, the proxy server will still be at webcache.example.com, but this time listening on port 8080. Also, the proxy won't be used when connecting to either localhost or host.mydonain.com.

As mentioned earlier, these settings affect all http connections during the entire lifetime of the VM invoked with these options. However it is possible, using the System.setProperty() method, to have a slightly more dynamic behavior.

Here is a code excerpt showing how this can be done:

//Set the http proxy to webcache.example.com:8080

System.setProperty("http.proxyHost", "webcache.example.com");
System.setProperty("http.proxyPort", "8080");

// Next connection will be through proxy.
URL url = new URL("http://java.example.org/");
InputStream in = url.openStream();

// Now, let's 'unset' the proxy.
System.setProperty("http.proxyHost", null);

// From now on http connections will be done directly.

Now,this works reasonably well, even if a bit cumbersome, but it can get tricky if your application is multi-threaded. Remember, system properties are “VM wide” settings, so all threads are affected. Which means that the code in one thread could, as a side effect, render the code in an other thread inoperative.

2.2) HTTPS

The https (http over SSL) protocol handler has its own set of properties:

  • htttps.proxyHost
  • https.proxyPort

As you probably guessed these work in the exact same manner as their http counterparts, so we won't go into much detail except to mention that the default port number, this time, is 443 and that for the "non proxy hosts" list, the HTTPS protocol handler will use the same as the http handler (i.e. http.nonProxyHosts).

2.3) FTP

Settings for the FTP protocol handler follow the same rules as for http, the only difference is that each property name is now prefixed with 'ftp.' instead of 'http.'

Therefore the system properties are:

  • ftp.proxHost
  • ftp.proxyPort
  • ftp.nonProxyHosts

Note that, this time, there is a separate property for the "non proxy hosts" list. Also, as for http, the default port number value is 80. It should be noted that when going through a proxy, the FTP protocol handler will actually use HTTP to issue commands to the proxy server, which explains why this is the same default port number.

Let's examine a quick example:

$ java -Dhttp.proxyHost=webcache.example.com
-Dhttp.proxyPort=8080 -Dftp.proxyHost=webcache.example.com -Dftp.proxyPort=8080 GetURL

Here, both the HTTP and the FTP protocol handlers will use the same proxy server at webcache.example.com:8080.

2.4) SOCKS

The SOCKS protocol, as defined in RFC 1928, provides a framework for client server applications to safely traverse a firewall both at the TCP and UDP level. In that sense it is a lot more generic than higher level proxies (like HTTP or FTP specific proxies). Java SE 5.0 provides SOCKS support for client TCP sockets.

There are 2 system properties related to SOCKS:

  • socksProxyHost for the host name of the SOCKS proxy server
  • socksProxyPort for the port number, the default value being 1080

Note that there is no dot ('.') after the prefix this time. This is for historical reasons and to ensure backward compatibility. Once a SOCKS proxy is specified in this manner, all TCP connections will be attempted through the proxy.

Example:

$ java -DsocksProxyHost=socks.example.com GetURL

Here, during the execution of the code, every outgoing TCP socket will go through the SOCKS proxy server at socks.example.com:1080.

Now, what happens when both a SOCKS proxy and a HTTP proxy are defined? Well the rule is that settings for higher level protocols, like HTTP or FTP, take precedence over SOCKS settings. So, in that particular case, when establishing a HTTP connection, the SOCKS proxy settings will be ignored and the HTTP proxy will be contacted. Let's look at an example:

$ java -Dhttp.proxyHost=webcache.example.com -Dhttp.proxyPort=8080
-DsocksProxyHost=socks.example.com GetURL

Here, an http URL will go through webcache.example.com:8080 because the http settings take precedence. But what about an ftp URL? Since no specific proxy settings were assigned for FTP, and since FTP is on top of TCP, then FTP connections will be attempted through the SOCKS proxy server at socks.mydomsain.com:1080. If an FTP proxy had been specified, then that proxy would have been used instead.

3) Proxy class

As we have seen, the system properties are powerful, but not flexible. The "all or nothing" behavior was justly deemed too severe a limitation by most developers. That's why it was decided to introduce a new, more flexible, API in Java SE 5.0 so that it would be possible to have connection based proxy settings.

The core of this new API is the Proxy class which represents a proxy definition, typically a type (http, socks) and a socket address. There are, as of Java SE 5.0, 3 possible types:

  • DIRECT which represents a direct connection, or absence of proxy.
  • HTTP which represents a proxy using the HTTP protocol.
  • SOCKS which represents proxy using either SOCKS v4 or v5.

So, in order to create an HTTP proxy object you would call:

SocketAddress addr = new
InetSocketAddress("webcache.example.com", 8080);
Proxy proxy = new Proxy(Proxy.Type.HTTP, addr);

Remember, this new proxy object represents a proxy definition, nothing more. How do we use such an object? A new openConnection() method has been added to the URL class and takes a Proxy as an argument, it works the same way as openConnection() with no arguments, except it forces the connection to be established through the specified proxy, ignoring all other settings, including the system properties mentioned above.

So completing the previous example, we can now add:

URL url = new URL("http://java.example.org/");
URConnection conn = url.openConnection(proxy);

Simple, isn't it?

The same mechanism can be used to specify that a particular URL has to be reached directly, because it's on the intranet for example. That's where the DIRECT type comes into play. But, you don't need to create a proxy instance with the DIRECT type, all you have to do is use the NO_PROXY static member:

URL url2 = new URL("http://infos.example.com/");
URLConnection conn2 = url2.openConnection(Proxy.NO_PROXY);

Now, this guarantees you that this specific URL will be retrieved though a direct connection bypassing any other proxy settings, which can be convenient.

Note that you can force a URLConnection to go through a SOCKS proxy as well:

SocketAddress addr = new InetSocketAddress("socks.example.com", 1080);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);
URL url = new URL("ftp://ftp.gnu.org/README");
URLConnection conn = url.openConnection(proxy);

That particular FTP connection will be attempted though the specified SOCKS proxy. As you can see, it's pretty straightforward.

Last, but not least, you can also specify a proxy for individual TCP sockets by using the newly introduced socket constructor:

SocketAddress addr = new InetSocketAddress("socks.example.com", 1080);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);
Socket socket = new Socket(proxy);
InetSocketAddress dest = new InetSocketAddress("server.example.org", 1234);
socket.connect(dest);

Here the socket will try to connect to its destination address (server.example.org:1234) through the specified SOCKS proxy.

As for URLs, the same mechanism can be used to ensure that a direct (i.e. not through any proxy) connection should be attempted no matter what the global settings are:

Socket socket = new Socket(Proxy.NO_PROXY);
socket.connect(new InetAddress("localhost", 1234));

Note that this new constructor, as of Java SE 5.0, accepts only 2 types of proxy: SOCKS or DIRECT (i.e. the NO_PROXY instance).

4) ProxySelector

As you can see, with Java SE 5.0, the developer gains quite a bit of control and flexibility when it comes to proxies. Still, there are situations where one would like to decide which proxy to use dynamically, for instance to do some load balancing between proxies, or depending on the destination, in which case the API described so far would be quite cumbersome. That's where the ProxySelector comes into play.

In a nutshell the ProxySelector is a piece of code that will tell the protocol handlers which proxy to use, if any, for any given URL. For example, consider the following code:

URL url = new URL("http://java.example.org/index.html");
URLConnection conn = url.openConnection();
InputStream in = conn.getInputStream();

At that point the HTTP protocol handler is invoked and it will query the proxySelector. The dialog might go something like that:

Handler: Hey dude, I'm trying to reach java.example.org, should I use a proxy?
ProxySelector: Which protocol do you intend to use?
Handler: http, of course!
ProxySelector: On the default port?
Handler: Let me check.... Yes, default port.
ProxySelector: I see. Then you shall use webcache.example.com on port 8080 as a proxy.
Handler: Thanks. <pause> Dude, webcache.example.com:8080 doesn't seem to be responding! Any other option?
ProxySelector: Dang! OK, try webcache2.example.com, on port 8080 as well.
Handler: Sure. Seems to be working. Thanks.
ProxySelector: No sweat. Bye.

Of course I'm embellishing a bit, but you get the idea.

The best thing about the ProxySelector is that it is plugable! Which means that if you have needs that are not covered by the default one, you can write a replacement for it and plug it in!

So what is a ProxySelector? Let's take a look at the class definition:

public abstract class ProxySelector {
        public static ProxySelector getDefault();
        public static void setDefault(ProxySelector ps);
        public abstract List<Proxy> select(URI uri);
        public abstract void connectFailed(URI uri,
                SocketAddress sa, IOException ioe);
}

As we can see, ProxySelector is an abstract class with 2 static methods to set, or get, the default implementation, and 2 instance methods that will be used by the protocol handlers to determine which proxy to use or to notify that a proxy seems to be unreachable. If you want to provide your own ProxySelector, all you have to do is extend this class, provide an implementation for these 2 instance methods then call ProxySelector.setDefault() passing an instance of your new class as an argument. At this point the protocol handlers, like http or ftp, will query the new ProxySelector when trying to decide what proxy to use.

Before we see in details how to write such a ProxySelector, let's talk about the default one. Java SE 5.0 provides a default implementation which enforces backward compatibility. In other terms, the default ProxySelector will check the system properties described earlier to determine which proxy to use. However, there is a new, optional feature: On recent Windows systems and on Gnome 2.x platforms it is possible to tell the default ProxySelector to use the system proxy settings (both recent versions of Windows and Gnome 2.x let you set proxies globally through their user interface). If the system property java.net.useSystemProxies is set to true (by default it is set to false for compatibility sake), then the default ProxySelector will try to use these settings. You can set that system property on the command line, or you can edit the JRE installation file lib/net.properties, that way you have to change it only once on a given system.

Now let's examine how to write, and install, a new ProxySelector.

Here is what we want to achieve: We're pretty happy with the default ProxySelector behavior, except when it comes to http and https. On our network we have more than one possible proxy for these protocols and we'd like our application to try them in sequence (i.e.: if the first one doesn't respond, then try the second one and so on). Even more, if one of them fails too many time, we'll remove it from the list in order to optimize things a bit.

All we need to do is subclass java.net.ProxySelector and provide implementations for both the select() and connectFailed() methods.

The select() method is called by the protocol handlers before trying to connect to a destination. The argument passed is a URI describing the resource (protocol, host and port number). The method will then return a List of Proxies. For instance the following code:

URL url = new URL("http://java.example.org/index.html");
InputStream in = url.openStream();

will trigger the following pseudo-call in the protocol handler:

List<Proxy> l = ProxySelector.getDefault().select(new URI("http://java.example.org/"));

In our implementation, all we'll have to do is check that the protocol from the URI is indeed http (or https), in which case we will return the list of proxies, otherwise we just delegate to the default one. To do that, we'll need, in the constructor, to store a reference to the old default, because ours will become the default.

So it is starting to look like this:

public class MyProxySelector extends ProxySelector {
        ProxySelector defsel = null;
        MyProxySelector(ProxySelector def) {
                defsel = def;
        }

        public java.util.List<Proxy> select(URI uri) {
                if (uri == null) {
                        throw new IllegalArgumentException("URI can't be null.");
                }
                String protocol = uri.getScheme();
                if ("http".equalsIgnoreCase(protocol) ||
                        "https".equalsIgnoreCase(protocol)) {
                        ArrayList<Proxy> l = new ArrayList<Proxy>();
                        // Populate the ArrayList with proxies
                        return l;
                }
                if (defsel != null) {
                        return defsel.select(uri);
                } else {
                        ArrayList<Proxy> l = new ArrayList<Proxy>();
                        l.add(Proxy.NO_PROXY);
                        return l;
                }
        }
}

First note the constructor that keeps a reference to the old default selector. Second, notice the check for illegal argument in the select() method in order to respect the specifications. Finally, notice how the code defers to the old default, if there was one, when necessary. Of course, in this example, I didn't detail how to populate the ArrayList, as it not of particular interest, but the complete code is available in the appendix if you're curious.

As it is, the class is incomplete since we didn't provide an implementation for the connectFailed() method. That's our very next step.

The connectFailed() method is called by the protocol handler whenever it failed to connect to one of the proxies returned by the select() method. 3 arguments are passed: the URI the handler was trying to reach, which should be the one used when select() was called, the SocketAddress of the proxy that the handler was trying to contact and the IOException that was thrown when trying to connect to the proxy. With that information, we'll just do the following: If the proxy is in our list, and it failed 3 times or more, we'll just remove it from our list, making sure it won't be used again in the future. So the code is now:

public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
        if (uri == null || sa == null || ioe == null) {
            throw new IllegalArgumentException("Arguments can't be null.");
        }
        InnerProxy p = proxies.get(sa);
        if (p != null) {
                if (p.failed() >= 3)
                   proxies.remove(sa);
        } else {
                if (defsel != null)
                    defsel.connectFailed(uri, sa, ioe);
        }
}

Pretty straightforward isn't it. Again we have to check the validity of the arguments (specifications again). The only thing we do take into account here is the SocketAddress, if it's one of the proxies in our list, then we do deal with it, otherwise we defer, again, to the default selector.

Now that our implementation is, mostly, complete, all we have to do in the application is to register it and we're done:

public static void main(String[] args) {
        MyProxySelector ps = new MyProxySelector(ProxySelector.getDefault());
        ProxySelector.setDefault(ps);
        // rest of the application
}

Of course, I simplified things a bit for the sake of clarity, in particular you've probably noticed I didn't do much Exception catching, but I'm confident you can fill in the blanks.

It should be noted that both Java Plugin and Java Webstart do replace the default ProxySelector with a custom one to integrate better with the underlying platform or container (like the web browser). So keep in mind, when dealing with ProxySelector, that the default one is typically specific to the underlying platform and to the JVM implementation. That's why it is a good idea, when providing a custom one, to keep a reference to the older one, as we've done in the above example, and use it when necessary.

5) Conclusion

As we have now established Java SE 5.0 provides quite a number of ways to deal with proxies. From the very simple (using the system proxy settings) to the very flexible (changing the ProxySelector, albeit for experienced developers only), including the per connection selection courtesy of the Proxy class.

Appendix

Here is the full source of the ProxySelector we developed in this document. Keep in mind that this was written for educational purposes only, and was therefore kept pretty simple on purpose.

import java.net.*;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
import java.io.IOException;

public class MyProxySelector extends ProxySelector {
        // Keep a reference on the previous default
    ProxySelector defsel = null;

        /*
         * Inner class representing a Proxy and a few extra data
         */
        class InnerProxy {
        Proxy proxy;
                SocketAddress addr;
                // How many times did we fail to reach this proxy?
                int failedCount = 0;

                InnerProxy(InetSocketAddress a) {
                        addr = a;
                        proxy = new Proxy(Proxy.Type.HTTP, a);
                }

                SocketAddress address() {
                        return addr;
                }

                Proxy toProxy() {
                        return proxy;
                }

                int failed() {
                        return ++failedCount;
                }
        }

        /*
         * A list of proxies, indexed by their address.
         */
        HashMap<SocketAddress, InnerProxy> proxies = new HashMap<SocketAddress, InnerProxy>();

        MyProxySelector(ProxySelector def) {
          // Save the previous default
          defsel = def;

          // Populate the HashMap (List of proxies)
          InnerProxy i = new InnerProxy(new InetSocketAddress("webcache1.example.com", 8080));
          proxies.put(i.address(), i);
          i = new InnerProxy(new InetSocketAddress("webcache2.example.com", 8080));
          proxies.put(i.address(), i);
          i = new InnerProxy(new InetSocketAddress("webcache3.example.com", 8080));
          proxies.put(i.address(), i);
          }

          /*
           * This is the method that the handlers will call.
           * Returns a List of proxy.
           */
          public java.util.List<Proxy> select(URI uri) {
                // Let's stick to the specs.
                if (uri == null) {
                        throw new IllegalArgumentException("URI can't be null.");
                }

                /*
                 * If it's a http (or https) URL, then we use our own
                 * list.
                 */
                String protocol = uri.getScheme();
                if ("http".equalsIgnoreCase(protocol) ||
                        "https".equalsIgnoreCase(protocol)) {
                        ArrayList<Proxy> l = new ArrayList<Proxy>();
                        for (InnerProxy p : proxies.values()) {
                          l.add(p.toProxy());
                        }
                        return l;
                }

                /*
                 * Not HTTP or HTTPS (could be SOCKS or FTP)
                 * defer to the default selector.
                 */
                if (defsel != null) {
                        return defsel.select(uri);
                } else {
                        ArrayList<Proxy> l = new ArrayList<Proxy>();
                        l.add(Proxy.NO_PROXY);
                        return l;
                }
        }

        /*
         * Method called by the handlers when it failed to connect
         * to one of the proxies returned by select().
         */
        public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
                // Let's stick to the specs again.
                if (uri == null || sa == null || ioe == null) {
                        throw new IllegalArgumentException("Arguments can't be null.");
                }

                /*
                 * Let's lookup for the proxy
                 */
                InnerProxy p = proxies.get(sa);
                        if (p != null) {
                                /*
                                 * It's one of ours, if it failed more than 3 times
                                 * let's remove it from the list.
                                 */
                                if (p.failed() >= 3)
                                        proxies.remove(sa);
                        } else {
                                /*
                                 * Not one of ours, let's delegate to the default.
                                 */
                                if (defsel != null)
                                  defsel.connectFailed(uri, sa, ioe);
                        }
     }
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Networking Enhancements

Documentation Contents

Networking Features and Enhancements

in Java SE 1.3

New Classes/Interfaces

  • java.net.DatagramSocketImplFactory

    New interface java.net.DatagramSocketImplFactory is used by DatagramSocket to create actual socket implementations. This addition makes DatagramSocket consistent with the other socket types, by allowing the user to set the DatagramSocketImplFactory through a public API.

Modified Classes/Interfaces

  • java.net.HttpURLConnection

    The following constants were added to java.net.HttpURLConnection to make the HTTP status codes match the HTTP 1.1 RFC:

    • public static final int HTTP_INTERNAL_ERROR = 500;
    • public static final int HTTP_NOT_IMPLEMENTED = 501;

    Two new methods were added to support following HTTP redirects (requests with response code 3xx) on a per-instance basis. The default is to use the class setting.

    • public boolean getInstanceFollowRedirects()
    • public void setInstanceFollowRedirects(boolean followRedirects)

  • java.net.Socket and java.net.SocketImpl

    Two new methods have been added to java.net.Socket. Java sockets now support the keepalive option.

    • public boolean getKeepAlive(boolean)
    • public void setKeepAlive(boolean on)

    Two new methods have been added to java.net.Socket and java.net.SocketImpl. This change is to support TCP half-closed sockets:

    • public void shutdownInput()
    • public void shutdownOutput()

  • java.net.URL,java.net.URLConnection, and java.net.ContentHandler

    Several access methods have been added to make java.net.URL consistent with the fields of a URL as described in the latest IETF specification, RFC2396.

    • public String getAuthority()
    • public String getPath()
    • public String getQuery()
    • public String getUserInfo()
    • public set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)

    An overloaded getContent() method was added to java.net.URL, java.net.URLConnection, and java.net.ContentHandler to allow requesting that the returned content object support one of an ordered list of Java types. This allows mapping of MIME types to more than one possible Java type, and improves system flexibility.

    varied implementation, see javadocs for each class.
    Static methods java.net.URLConnection.setDefaultRequestProperty() and java.net.URLConnection.getDefaultRequestProperty() are now deprecated.

  • java.net.URLDecoder

    The method java.net.URLDecoder.decode(String) no longer throws an exception.

  • java.net.URLStreamHandler

    Several new methods have been added to java.net.URLStreamHandler.

    These additions expose the concept of a handler's default port number and allow URL handlers to override aspects of URL equality and hashcode comparisons in URL protocol-specific ways. These changes enable cleaner access to the parsed component parts of a URL and enhance the ability of the various URL handlers to share common parsing code.

    • protected boolean equals(URL u1, URL u2)
    • protected getDefaultPort()
    • protected InetAddress getHostAddress(URL u)
    • protected int hashCode(URL u)
    • protected boolean hostsEqual(URL u1, URL u2)
    • protected boolean sameFile(URL u1, URL u2)
    • protected void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)

  • java.util.jar.JarFile and java.util.zip.ZipFile

    There is a new open mode for java.util.zip.ZipFile and java.util.jar.JarFile, which automatically deletes temporary (cached) files associated with each JarURLConnection when the Zip/Jar file opened in this mode is closed and the process exits. This is useful when downloading temporary jar files onto a local disk.

Miscellaneous Information

  • Added HTTP 1.1 client-side support and enhancements, such as http keepalives.
  • The SDK now does a better job of URL parsing by following RFC 2396 much more closely.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE 5 Network Enhancements

Documentation Contents

Networking Features and Enhancements

in Java SE 5.0

  • Complete support for IPv6 on Windows XP (SP1) and 2003 server has been provided in this release. (4608529)
  • The networking API now provides a way of setting timeouts on connect and read operations for protocol handlers. This will benefit any HTTP client application that must behave robustly in the event of server failure. (4700777)
  • A new API provides a mean for Java applications, which includes RMI applications, to be launched via inetd. (4295885, 4673940)
  • The InetAddress class now provides an API to allow testing for the reachability of a host. This features provides a ping-like capability in Java. (4639861)
  • Cookie support has been improved. Applications and web containers can provide Cookie management by implementing the new CookieHandler API. (4696506)
  • Proxy server configuration has been improved. It can now be dynamic and controlable by web containers and applications through the ProxySelector API, which can also handle failures to connect to the proxy. (4696512)
  • A new framework provides a way for protocol handlers to access a file caching mechanism implemented by the platform or by a third party. (4837267)
  • The specification of the URL class now mandates a minimum set of URL protocol handlers that are guaranteed to be present in Java SE. They are http, https, file, jar and ftp. (4180636)
  • There have been a number of enhancements for JSSE (SSL/TLS). For more information, please see: Java SE 5 Security Enhancements

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Miscellaneous changes to java.net

Documentation Contents

Miscellaneous changes to java.net worth mentioning:

Noteworthy bug fixes:

  • InetAddress
    A bug existed in JDK 1.0.2 where one could not create an InetAddress out of a IP address String (for example, "192.0.2.1") if a corresponding host name (for example, "www.example.com") could not be found. This resulted in an UnknownHostException. The bug is fixed in JDK 1.1. Additionally, when an InetAddress is created from an IP address, the corresponding hostname is not looked up until specifically requested (via InetAddress.getHostName()), as a performance enhancement.
  • ServerSocket/DatagramSocket close()
    A bug existed in JDK 1.0.2 where the close() method of ServerSocket and DatagramSocket were synchronized. The result was that if one thread were blocked indefinitely in DatagramSocket.receive() or ServerSocket.accept(), another thread couldn't break the blocking thread out by calling close(). This is fixed in JDK1.1 by making the close() methods unsynchronized.
  • URLConnection
    There was a bug in JDK 1.0.2 where the methods on URLConnection:
    • setRequestProperty()
    • getRequestProperty()
    • getHeaderField()
    • getHeaderFieldInt()
    • getContentLength()
    • getDate()
    etc, did not work. These are fixed in JDK 1.1.

Binding to local port/address:

  • Socket, ServerSocket, DatagramSocket
    These classes has overloaded constructors for binding to a specific local address and port. This is useful and necessary for applications like proxy servers that operate on multi-homed machines, and need particular control over which network interfaces are used.

MulticastSocket:

  • The MulticastSocket class was moved from package sun.net into the core API of java.net.

HttpURLConnection:

  • JDK1.1 introduces a new class, HttpURLConnection which extends URLConnection, and provides additional functionality specific to HTTP:
  • Ability to use all of the request methods with HTTP/1.1, like:
    • GET
    • POST
    • PUT
    • HEAD
    • TRACE
    • DELETE
    • OPTIONS
  • Control over whether to follow HTTP redirects.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Enhancements in Java SE 7

The URLClassLoader.close method has been added. This method effectively eliminates the problem of how to support updated implementations of the classes and resources loaded from a particular codebase, and in particular from JAR files. See Closing a URLClassLoader for more information.

The Sockets Direct Protocol (SDP) provides access to high performance network connections; see Understanding the Sockets Direct Protocol in The Java Tutorial.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Enhancements in Java SE 8

  • A new class java.net.URLPermission has been added. URLPermission represents a permission for accessing a resource (or set of resources) defined by a given URL, and for a given set of user-settable request methods and request headers.
  • In class HttpURLConnection, if a security manager is installed, and if a method is called which results in an attempt to open a connection, the caller must possess either:
    • a "connect" SocketPermission to the host/port combination of the destination URL or
    • a URLPermission that permits this request.

    If automatic redirection is enabled, and this request is redirected to another destination, then the caller must also have permission to connect to the redirected host/URL.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Features

Documentation Contents

Networking Features and Enhancements

in Java SE 6

Enhancement to Network Interface

Provides a number of new methods for accessing state and configuration information relating to a system's network adapters. This includes information such as the broadcast address, subnet mask, MAC addresses, and MTU size. See java.net.NetworkInterface

The new class java.net.InterfaceAddress encapsulates all information about a NetworkInterface's IP addresses, including the broadcast address, and subnet prefix length (subnet mask)

Support for Internationalized Domain Names

RFCs 3490, 3491, 3492, 3454 define a mechanism where domain names comprised of characters in alphabets other than US ASCII can be stored in the DNS. An algorithm is defined which provides a conversion from arbitrary Unicode strings to and from a "mangled" ASCII form. This feature provides a new class java.net.IDN, which allows applications to do this conversion so that IDNs can be looked up via java.net.InetAddress.

HTTP Negotiate authentication

This adds support for the "Negotiate" HTTP authentication scheme defined by Microsoft. Negotiate allows multiple underlying authentication mechanisms to be supported, and in each instance, one of these mechanisms is chosen for use. Currently, Kerberos is the only supported mechanism. This feature is described in more detail in the guide to Http Authentication.

Cross platform NTLM

Previously, the Microsoft defined NTLM authentication protocol for HTTP was only supported on Windows. Now, this protocol is supported on all platforms.

Default CookieManager implementation

The CookieHandler class was added in 1.5, but no implementation was provided in java.net. This feature provides a simple extensible implementation which separates the storage of cookies from the policy surrounding their acceptance. The default manager provides a number of standard policies and a simple in-memory storage mechanism. User defined policies and storage mechanisms can be used with this implementation. The following are the new classes related to this feature:

  • java.net.CookieManager
  • java.net.CookiePolicy
  • java.net.CookieStore
  • java.net.HttpCookie

Light-weight HTTP server

This provides a simple set of classes and interfaces for building light-weight HTTP server applications. The feature defines two new packages com.sun.net.httpserver and com.sun.net.httpserver.spi. The server supports HTTP and HTTPS.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Features

Documentation Contents

Networking Features and Enhancements

in Java SE version 1.4

IPv6 (Internet Protocol version 6)

Java SE 1.4 supports IPv6 in TCP and UDP-based applications, including multicast, and will support most end-user applications in use today. See the IPv6 User Guide.

HTTP Digest Authentication

The HTTP digest authentication implementation has been updated to support proxies as well as origin servers, and has also been updated to provide all capabilities defined in RFC2617, except for the auth-int mode.

A number of system properties have been added which modify the behavior of the digest authentication mechanism. These are identified in the Networking Properties document.

Unconnected/Unbound Socket Support

Allows more flexible socket creation, binding, and connection. Enables manipulation of socket options before establishing or accepting connections. In addition a timeout can be specified when establishing a connection.

New class javax.net.ssl.SSLSocket is a subclass of java.net.Socket that provides security through encryption. The mechanism is called the Java Secure Socket Extension (JSSE), and it provides encryption for data sent via sockets. See the JSSE Reference Guide for further information.

Connected UDP Socket Support

The DatagramSocket.connect method now establishes the address association at native level. Where supported, this allows an application to have visibility of ICMP port unreachable messages as an indication that the remote application is unavailable.

Uniform Resource Indentifier (URI)

Class java.net.URI is new in Java SE 1.4. It allows URI construction and parsing without the presence of a protocol handler, which is not possible with the URL class. The URI class is compliant with RFC 2396 and RFC 2732.

FTP Protocol Handler

Significant overhaul to make the functionality conform as much as possible to the current standards (RFC 1738 and 959). This enhancement fixes several bugs associated with FTP functionality. For example, passive mode for FTP works in Java SE 1.4.

JNDI DNS SP Support in InetAddress

This enhancement in class java.net.InetAddress enables applications to configure a pure Java name service provider by using a DNS name service provider through JNDI. See JNDI DNS service provider settings in the Network Properties document for information on enabling this support.

URLEncoder and URLDecoder Improvements

Methods URLEncoder.encode(String s, String enc) and URLDecoder.decode(String s, String enc) have been added to enable applications to use other character encoding/decoding schemes.

TCP Out-of-Band Data

Two new methods in class java.net.Socket, sendUrgentData() and getOOBInline(), provide limited support for TCP urgent data for support certain legacy applications. Urgent data may be sent on any TCP socket. However, only partial support for receiving urgent data is provided.

SOCKS

Full V5 (RFC 1928) & V4 TCP support with autonegociation with the proxy of which version to use. See the SOCKS protocol support settings in the Network Properties document for information about using properties to specify the SOCKS proxy server.

NetworkInterface

Class java.net.NetworkInterface is new in Java SE 1.4. It allows enumeration of interfaces and addresses. This new class should be useful to applications deployed on multihomed and machines with multiple network interfaces.

Other Major Improvements

Java SE 1.4 also offers the following.

  • Improved Http streaming performance.
  • Request and response headers processing functionality in the form of these new methods in class java.net.URLConnection"

    addRequestProperty
    getRequestProperties
    getHeaderFields

  • Improved error handling implementation for method HttpURLConnection.getErrorStream().

New Classes

Here are links to the API specifications for the new classes and exceptions in the java.net package.

  • Inet4Address
  • Inet6Address
  • InetSocketAddress
  • NetworkInterface
  • SocketAddress
  • URI
  • PortUnreachableException
  • SocketTimeoutException
  • URISyntaxException
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Properties

Java Properties

java.net.preferIPv4Stack (default: false)
If IPv6 is available on the operating system the underlying native socket will be an IPv6 socket. This allows Java(tm) applications to connect too, and accept connections from, both IPv4 and IPv6 hosts.

If an application has a preference to only use IPv4 sockets then this property can be set to true. The implication is that the application will not be able to communicate with IPv6 hosts.

java.net.preferIPv6Addresses (default: false)
If IPv6 is available on the operating system the default preference is to prefer an IPv4-mapped address over an IPv6 address. This is for backward compatibility reasons - for example applications that depend on access to an IPv4 only service or applications that depend on the %d.%d.%d.%d representation of an IP address. This property can be set to try to change the preferences to use IPv6 addresses over IPv4 addresses. This allows applications to be tested and deployed in environments where the application is expected to connect to IPv6 services.

networkaddress.cache.ttl
Specified in java.security to indicate the caching policy for successful name lookups from the name service.. The value is specified as integer to indicate the number of seconds to cache the successful lookup.

A value of -1 indicates "cache forever". The default behavior is to cache forever when a security manager is installed, and to cache for an implementation specific period of time, when a security manager is not installed.

networkaddress.cache.negative.ttl (default: 10)
Specified in java.security to indicate the caching policy for un-successful name lookups from the name service.. The value is specified as integer to indicate the number of seconds to cache the failure for un-successful lookups.

A value of 0 indicates "never cache". A value of -1 indicates "cache forever".

http.proxyHost (default: <none>)
http.proxyPort (default: 80 if http.proxyHost specified)
http.nonProxyHosts (default: <none>

ftp.proxyHost (default: <none>)
ftp.proxyPort (default: 80 if ftp.proxyHost specified)
ftp.nonProxyHosts (default: <none>)
http.proxyHost and http.proxyPort indicate the proxy server and port that the http protocol handler will use.

http.nonProxyHosts indicates the hosts which should be connected too directly and not through the proxy server. The value can be a list of hosts, each seperated by a |, and in addition a wildcard character (*) can be used for matching. For example: -Dhttp.nonProxyHosts="*.example.com|localhost".

ftp.proxyHost and ftp.proxyPort indicate the proxy server and port that the ftp protocol handler will use. ftp.nonProxyHosts is similiar to http.nonProxyHosts and indicates the hosts that should be connected too directly and not through the proxy server.

http.agent (default: Java1.4.0)
Indicates the User-Agent request header sent in http requests.
http.auth.digest.validateServer (default: false)
http.auth.digest.validateProxy (default: false)
http.auth.digest.cnonceRepeat (default: 5)
These system properties modify the behavior of the HTTP digest authentication mechanism. Digest authentication provides a limited ability for the server to authenticate itself to the client (ie. by proving that it knows the users password). However, not all servers support this capability and by default the check is switched off. The first two properties above can be set to true, to enforce this check, for either authentication with an origin, or a proxy server respectively.

It is not normally necessary to set the third property (http.auth.digest.cnonceRepeat). This determines how many times a cnonce value is reused. This can be useful when the MD5-sess algorithm is being used. Increasing the value reduces the computational overhead on both the client and the server by reducing the amount of material that has to be hashed for each HTTP request.

http.auth.ntlm.domain:
Similar to other HTTP authentication schemes, NTLM uses the java.net.Authenticator class to acquire usernames and passwords when they are needed. However, NTLM also needs the NT domain name. There are three options for specifying the domain:
  1. Do not specify it. In some environments, the domain is not actually required and the application need not specify it.
  2. The domain name can be encoded within the username by prefixing the domain name followed by a back-slash '\' before the username. With this method, existing applications that use the Authenticator class do not need to be modified, so long as users are made aware that this notation must be used.
  3. If a domain name is not specified as in method 2) and the system property "http.auth.ntlm.domain" is defined, then the value of this property will be used as the domain name.
http.keepAlive (default: true)
Indicates if keep alive (persistent) connections should be supported. Persistent connections improve performance by allowing the underlying socket connection be reused for multiple http requests.

The default is true and thus persistent connections will be used with http 1.1 servers. Set to 'false' to disable the use of persistent connections.

http.maxConnections (default: 5)
If HTTP keep-alive is enabled, this value is the number of idle connections that will be simultaneously kept alive, per-destination.

SOCKS protocol support settings

The SOCKS username and password are acquired in the following way. First, if the application has registered a java.net.Authenticator default instance, then this will be queried with the protocol set to the string "SOCKS5", and the prompt set to the string "SOCKS authentication". If the authenticator does not return a username/password or if no authenticator is registered then the system checks for the user preferences "java.net.socks.username" and "java.net.socks.password". If these preferences do not exist, then the system property "user.name" is checked for a username. In this case, no password is supplied.
socksProxyHost
socksProxyPort (default: 1080)
Indicates the name of the SOCKS proxy server and the port number that will be used by the SOCKS protocol layer. If socksProxyHost is specified then all TCP sockets will use the SOCKS proxy server to establish a connection or accept one. The SOCKS proxy server can either be a SOCKS v4 or v5 server and it has to allow for unauthenticated connections.
socksProxyVersion (default: 5)
The version of the SOCKS protocol supported by the server. The default is 5 indicating SOCKS V5, alternatively 4 can be specified for SOCKS V4. Setting the property to values other than these leads to unspecified behavior.

JDK implementation-specific properties

These properties may not be supported in future releases.
sun.net.inetaddr.ttl
This is a Oracle JDK private system property which corresponds to networkaddress.cache.ttl. It takes the same value and has the same meaning, but can be set as a command-line option. However, the preferred way is to use the security property mentioned above.
sun.net.inetaddr.negative.ttl
This is a Oracle JDK private system property which corresponds to networkaddress.cache.negative.ttl. It takes the same value and has the same meaning, but can be set as a command-line option. However, the preferred way is to use the security property mentioned above.
sun.net.client.defaultConnectTimeout (default: -1)
sun.net.client.defaultReadTimeout (default: -1)
These properties specify the default connect and read timeout (resp.) for the protocol handler used by java.net.URLConnection.

sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example for http connections it is the timeout when establishing the connection to the http server. For ftp connection it is the timeout when establishing the connection to ftp servers.

sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from input stream when a connection is established to a resource.

sun.net.http.retryPost (default: true)
It determines if an unsuccessful HTTP POST request will be automatically resent to the server. Unsuccessful in this case means the server did not send a valid HTTP response or an IOException occurred.

JNDI DNS service provider settings

These properties may not be supported in future releases.
sun.net.spi.nameservice.provider.<n>=<default|dns,sun|...>
Specifies the name service provider that you can use. By default, Java will use the system configured name lookup mechanism, such as file, nis, etc. You can specify your own by setting this option. <n> takes the value of a positive number, it indicates the precedence order with a small number takes higher precendence over a bigger number. Aside from the default provider, the JDK includes a DNS provider named "dns,sun".

Prior to JDK 7, the first provider that was successfully loaded was used. In JDK 7, providers are chained, which means that if a lookup on a provider fails, the next provider in the list is consulted to resolve the name.

sun.net.spi.nameservice.nameservers=<server1_ipaddr,server2_ipaddr ...>
You can specify a comma separated list of IP addresses that point to the DNS servers you want to use. If the sun.net.spi.nameservice.nameservers property is not defined, then the provider will use any name servers already configured in the platform DNS configuration.
sun.net.spi.nameservice.domain=<domainname>
This property specifies the default DNS domain name, for instance, eng.example.com. If the sun.net.spi.nameservice.domain property is not defined then the provider will use any domain or domain search list configured in the platform DNS configuration.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Release Notes

The following are known bugs and other networking issues for Java SE 1.4.2.
  • In releases prior to 1.4.2, it was possible to create an invalid URL instance such as the following: new URL ("http://www.example.com:-1/index.html"). Specifying a port number of -1 is not valid. However, in previous releases the -1 was stripped off when sending such URLS with HTTP commands. In 1.4.2, the -1 is left in the URL and this may cause problems for some HTTP servers or proxies. Applications should not create URL instances with a -1 port number. Assuming the -1 refers to the default port in this example, the correct way to create this URL is new URL ("http://www.example.com/index.html"). This note only applies to the single argument URL constructor.
  • On Microsoft Windows 98/ME, a read timeout set using Socket.setSoTimeout or an accept timeout set using ServerSocket.setSoTimeout may result in a timeout that is 500ms later than expected. This issue is observable with all Java SE releases and stems from a Microsoft Windows 98/ME bug. A patch for Microsoft Windows 98/ME is obtainable through the following page on the Microsoft website: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q257821&
  • Prior to Java SE 1.4.1 the java.net.InetAddress.getLocalHost() would cache the lookup of the IP address of the local machine for the entire session of the application. This behaviour poses a problem for applications running on machines that are connected to the internet via a dial-up connection or machines that acquired their addresses through DHCP. This has been corrected in 1.4.1 so that the local IP address is no longer cached. InetAddress.getLocalHost() will return the correct IP address for dial-up connections as well as for DHCP. See bug 4211819.
  • Prior to Java SE 1.4.1, the http/https protocol handlers would not redirect correctly from a http URL to a https URL (and vice versa). In particular, the redirect was attempted using the original URL scheme. This has been fixed in 1.4.1. by returning the server responses for such redirects (from http to https or https to http) to the application. Therefore, it is the applications responsibility to check the response code and recognize it as a redirect. The Location header field value can be checked for the redirect information, and then the application must decide whether or not to follow the redirect using the new protocol. See bug 4620571.
  • Prior to Java SE 1.4 the java.net.URLConnection class would handle errors from http servers inconsistently. In particular the getInputStream or other methods would throw a FileNotFoundException if the http server returned a response code >= 400 and the request was for a resource of a known file type.

    This has been corrected in 1.4 so that an IOException is thrown for any http error from the server and a specific exception of FileNotFoundExeption when the resource is not found (ie: 404 or 410 response codes). The exception is thrown irrespective of the file type.

    Applications that assumed an exception would not be thrown when an http error is returned from the server need to be aware of this change in 1.4 - see 4160499.

    Related to this issue is that HttpURLConnection.getErrorStream() method can now been used to read the error page from the http server when a http error is returned from the server. Previously getErrorStream() always returned null.

  • Prior to Java SE 1.4 the InetAddress.toString() would perform a lookup via the name service if the hostname wasn't previously resolved. This is no longer the case in 1.4 and toString will return immediately. If the hostname is not resolved the returned string will contain the dotted IP address only.

    Applications that depend on toString() returning a string with the resolved hostname should be aware of this correction in 1.4 - see 4239141.

  • Prior to Java SE 1.4 if InetAddress.getByName if a lookup to the name service failed then all subsequent lookups of that hostname would fail for the lifetime of the virtual machine. This arose because negative lookups were always cached. This has changed in 1.4 so that by default if a lookup fails it's possible for a subsequent lookup to succeed. This is particularly important in dial-up environments or environments where the name service is not reliable.

    Applications that depend on behaviour where subsequent lookups always failed need to be aware of this issue - see 4256129. In addition the caching of negative lookups can be controlled by the networkaddress.cache.negative.ttl property in the java.security file.

  • Java SE 1.4 introduces a new exception java.net.PortUnreachableException. This exception may be thrown by DatagramSocket.send or DatagramSocket.receive if the DatagramSocket is connected (via the connect method) and an ICMP port unreachable is received to indicate that the remote application is not running. The PortUnreachableException serves as a useful indication for some UDP based protocols.

    The following lists the known issues with PortUnreachableException:-

    1. On Solaris 8 if IPv6 is enabled then ICMP port unreachable packets from IPv4 hosts will appear to be discarded. This is a Solaris 8 bug and is tracked as bug 4422658.
    2. On some Microsoft Windows releases (specifically Windows 98 and Windows NT) ICMP port unreachable packets are incorrectly discarded by the operating system and thus the PortUnreachableException is not thrown. As this time we are not aware of any Windows Sockets updates from Microsoft to fix this issue.
    3. On Linux if UDP packets are sent to the loopback address and no UDP applicatiob to bound to the destination port no ICMP port unreachable indication is received and thus no PortUnreachableException is thrown. This is a Linux kernel issue and we are not aware of a patch at this time.
  • On many Linux installations InetAddress.getLocalHost() may return an InetAddress representing the loopback address (127.0.0.1). This stems from many Linux installations configuring /etc/hosts to map the hostname to the loopback address. If the host has a static IP address then the /etc/hosts file should be corrected to map the hostname to the host address.

    If DHCP is used in conjunction with dynamic DNS then there are two options (i) change the name service search order in /etc/nsswitch.conf to use dns before the hosts file (ie: "hosts: dns files"), or (ii) configure InetAddress to use the DNS name service provider instead of the default provider (-Dsun.net.spi.nameservice.provider.1=dns,sun). This issue is being tracked in 4665037.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


New SocketExceptions in JDK 1.1

Previously, all network errors in java raised a SocketException, which didn't provide enough information to decipher what went wrong. Was the connection refused by the remote machine (no one listening on that port)? Or was the host unreachable (connect attempt timed out)? JDK 1.1 adds three new classes that provide a finer granularity of reported errors:

  • java.net.BindException

    The local port is in use, or the requested bind address couldn't be assigned locally.

            public class BindException extends SocketException {
        ...
        }

  • java.net.ConnectException

    This exception is raised when a connection is refused at the remote host (i.e., no process is listening on that port).

            public class ConnectException extends SocketException {
        ...
        }

  • java.net.NoRouteToHostException

    The connect attempt timed out, or the remote host is otherwise unreachable.

            public class NoRouteToHostException extends SocketException {
        ...
        }

Simple Usage Examples:

  • On the Client Side:
    import java.net.*;
        ...
        Socket s = null;
        try {
           s = new Socket("example.org", 80);
        } catch (UnknownHostException e) {
           // check spelling of hostname
        } catch (ConnectException e) {
           // connection refused - is server down? Try another port.
        } catch (NoRouteToHostException e) {
           // The connect attempt timed out.  Try connecting through a proxy
        } catch (IOException e) {
           // another error occurred
        }
  • On the Server Side:
    import java.net.*;
        ...
        ServerSocket ss = null;
        try {
            /* try to bind to local address 192.0.2.254 */
            InetAddress in = InetAddress.getByName("192.0.2.254");
            int port = 8000;
            int backlog = 5;
            ss = new ServerSocket(port, backlog, in);
        } catch (BindException e) {
            // port 8000 in use, or can't bind to 192.0.2.254 as a local address
        } catch (SocketException e) {
            // another error occurred
        }
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Socket Options in Java

The C way

Programming in C, one sets options by using a system call along the lines of:
        setsockopt(int fd, int level, int optval, void *optdata,
                   int optdatalen);

        fd = already opened (possibly connected) socket fd;
        level = level in the protocol stack (IP, UDP, TCP) where
                the option applies;
        optval = the option, a CONSTANT;
        optdata = ptr to option dependent struct of parameters relevant
                 only to a particular option;

In java

The C way of setting options lacks the type-safety of object-oriented programming. The option one wishes to set/get is identified by an int, and the value to set/get into is an opaque void*. It is all too easy to pass the wrong option identifier, the wrong type object in the void* parameter, or the wrong for that parameter. Worse still, the code for these errors will typically compile, and the error will only be manifested at runtime.

Java now provides a type-safe way to set options. Each socket class has a get/set method for each option it supports, taking and returning the appropriate type. The options supported, for which socket classes and their meaning in brief:

  • TCP_NODELAY
    • Disable Nagle's algorithm.
    • Valid for (client) Sockets.
  • SO_LINGER
    • Specify a linger-on-close timeout.
    • Valid for (client) Sockets.
  • SO_TIMEOUT
    • Specify a timeout on blocking socket operations. (Don't block forever!
    • Valid for all sockets: Socket, ServerSocket, DatagramSocket.
  • SO_BINDADDR
    • Fetch the local address binding of a socket.
    • Valid for Socket, ServerSocket, DatagramSocket.
  • SO_REUSEADDR
    • Enable reuse address for a socket.
    • Valid for Socket, ServerSocket, DatagramSocket.
  • SO_BROADCAST
    • Enables a socket to send broadcast messages.
    • Valid for DatagramSocket.
  • SO_SNDBUF
    • Set a hint the size of the underlying buffers for outgoing network I/O.
    • Valid for all sockets: Socket, ServerSocket, DatagramSocket.
  • SO_RCVBUF
    • Get the size of the buffer actually used by the platform when receiving in data on this socket.
    • Valid for all sockets: Socket, ServerSocket, DatagramSocket.
  • SO_KEEPALIVE
    • Turn on socket keepalive.
    • Valid for Socket.
  • SO_OOBINLINE
    • Enable inline reception of TCP urgent data.
    • Valid for Socket.
  • IP_MULTICAST_IF
    • Specify the outgoing interface for multicast packets (on multihomed hosts).
    • Valid for MulticastSockets.
  • IP_MULTICAST_LOOP
    • Enables or disables local loopback of multicast datagrams.
    • Valid for MulticastSocket.
  • IP_TOS
    • Sets the type-of-service or traffic class field in the IP header for a TCP or UDP socket.
    • Valid for Socket, DatagramSocket

Fell by the wayside...

Some possible BSD options that are not supported in java:
  • RAW/ICMP SOCKETS:
    The main argument in favor of this one seemed to be so people could write "ping" in java. Security nightmare. Must be root on UNIX machines.

The implementation details...

...that you don't need to know, unless you subclass SocketImpl/DatagramSocketImpl. Every *Socket object has an underlying SocketImpl/DatagramSocketImpl that interfaces to native code. The Impl classes implement two methods to support options:
        void setOption(int optID, Object val) throws SocketException;
        Object getOption(int optID) throws SocketException;
that look much like C. These methods act as glue to the native methods, and ensure type safety before native methods are invoked.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


URLConnection caching API

HTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. While HTTP proxy servers normally caches recently visited web resources, it is sometimes also desirable to have a local cache. Examples are browser caches.

In Tiger, a new framework provides a way for protocol handlers to access a response caching mechanism implemented by the platform or by a third party.

Here is the API:

We have introduced three abstract classes in the java.net package. They are:

  • ResponseCache
  • CacheRequest
  • CacheResponse

A concrete subclass of ResponseCache represents the URLConnection cache itself. An instance of such a class can be registered with the system by calling ResponseCache.setDefault(), and the system will call this object in order to:

  • store resource data which has been retrieved from an external source into the cache;
  • try to fetch a requested resource that may have been stored in the cache.

ResponseCache has two methods: get() returns a CacheResponse based on URI and request headers; and put() allows cache to decide if resource should be cached, returns a CacheRequest.

A concrete subclass of CacheRequest is used to write an entry in the ResponseCache. Instances of such a class provide an OutputStream object which is called by protocol handlers to store the resource data into the cache, and also an abort() method which allows a cache store operation to be interrupted and abandoned.

CacheRequest class has two methods: getBody() returns a stream for writing the request body into cache; and abort() abandons a cache write.

A concrete subclass of CacheResponse returns an entry from the ResponseCache. Instances of such a class provide an InputStream that returns the entity body, and also a getHeaders() method which returns the associated response headers.

CacheResponse class has two methods: getBody() returns a stream for reading the request body from cache; and getHeaders() returns the headers stored.

Caching logic flow

The following example shows a simple file based caching. However, it is equally viable to use other mechanisms such as a database for caching.

MyCacheResponse class is an implementation of CacheResponse. What it does is to take a file name and retrieve the HTTP response headers and body from it.

class MyCacheResponse extends CacheResponse {
FileInputStream fis;
Map<String, List<String>> headers;
public MyCacheResponse(String filename) {
        try {
         fis = new FileInputStream(new File(filename));
         ObjectInputStream ois = new ObjectInputStream (fis);
         headers = (Map<String, List<String>>)  ois.readObject();
   } catch (IOException ex) {
        // handle exception
   }
}

public InputStream getBody() throws IOException {
   return fis;
}

 public Map getHeaders() throws IOException {
   return headers;
 }
}

MyCacheRequest is an implementation of the CacheRequest. It takes a filename and the response headers and stores the headers in the file and also returns an outputstream directed to the same file so that any response body can be cached there.

class MyCacheRequest extends CacheRequest {
FileOutputStream fos;
public MyCacheRequest(String filename,
   Map<String, List<String>> rspHeaders) {
   try {
        File file = new File(filename);
        fos = new FileOutputStream(file);
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(rspHeaders);
   } catch (Exception ex) {
        throw new RuntimeException(ex.getMessage());
   }
}
public OutputStream getBody() throws IOException {
   return fos;
}

public void abort() {
   // we abandon the cache by close the stream,
   // and delete the file
   fos.close();
   file.delete();
 }
}

Finally, we can tie it altogether with our implementation of the ResponseCache, it checks the URI for the network resource that is being retrieved or to be cached and returns the appropriate instantiations of our implementations of CacheResponse or CacheRequest. In this example, we only handles the case when the URI is equal to uri1 for retrieving from the cache, and for URI equals uri2 for storing to the cache. But it is easily expanded to handle a more complicated file based cache.

class MyResponseCache extends ResponseCache {
 public CacheResponse
 get(URI uri, String rqstMethod, Map rqstHeaders)
   throws IOException {
   // get the response from a cached file if available
   if (uri.equals(ParseUtil.toURI(uri1))) {
        return new MyCacheResponse(FNPrefix+"file1.cache");
   }
   return null;

public CacheRequest put(URI uri, URLConnection conn)
   throws IOException {
   // save cache to a file
   // 1. serialize headers into file2.cache
   // 2. write data to file2.cache
   if (uri.equals(ParseUtil.toURI(uri2))) {
       return new MyCacheRequest(OutFNPrefix+"file2.cache",
        conn.getHeaderFields());
   }
   return null;
 }
}

Once we have developed our own ResponseCache implementation, all left to be done is to register it and the JVM will use it.

public static void main(String args[]) throws Exception {
        ......
        ResponseCache.setDefault(new MyResponseCache());
        HttpURLConnection http = (HttpURLConnection)url1.openConnection();
        InputStream is = null;
        ......
}

There is no default implementation of URLConnection caching in the Java 2 Standard Edition. However, Java Plugin and Java WebStart do provide one out of the box.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Orderly (and Abortive) Connection Release in Java

Documentation Contents

Orderly Versus Abortive Connection Release in Java

This article covers the following topics:

  • Overview
  • Description of the Problem
  • How to Avoid the Problem

Overview

To ensure orderly or graceful release of TCP connections is a challenge with TCP networking applications. Abortive or ungraceful release may result if special care is not taken. In Java, an unexpected abortive release can manifest itself by the application receiving a java.net.SocketException when reading or writing to the socket. read() and write() normally return a numeric value indicating, respectively, the number of bytes received or sent. If an exception is received instead, this indicates the connection has been aborted and also that data may have been lost or discarded. This article explains what causes socket connections to be aborted and provides tips for avoiding the situation, except for the case where an application intends to abort the connection.

Description of the Problem

First, we need to distinguish the differences between an abortive and an orderly connection release. To understand this distinction we need to look at what happens at the TCP protocol level. It is helpful to imagine an established TCP connection as actually two separate, semi-independent streams of data. If the two peers are A and B, then one stream delivers data from A to B, and the other stream from B to A. An orderly release occurs in two stages. First one side (say A) decides to stop sending data and sends a FIN message across to B. When the TCP stack at B's side receives the FIN it knows that no more data is coming from A, and whenever B reads all preceding data off the socket, further reads will return the value -1 to indicate end-of-file. This procedure is known as the TCP half-close, because only one half of the connection is closed. Not surprisingly, the procedure for the other half is exactly the same. B sends a FIN message to A, who eventually receives a -1 after reading all preceding data sent by A off the socket.

By contrast, an abortive close uses the RST (Reset) message. If either side issues an RST, this means the entire connection is aborted and the TCP stack can throw away any queued data which has not been sent or received by either application.

So, how do Java applications perform orderly and abortive releases? Let's consider abortive releases first. A convention that has existed since the days of the original BSD sockets is that the "linger" socket option can be used to force an abortive connection release. Either application can call Socket.setLinger (true, 0) to tell the TCP stack that when this socket is closed, the abortive (RST) procedure is to be used. Setting the linger option has no immediate effect, except that when Socket.close() is called subsequently, the connection is aborted with an RST message. As we will see shortly, there are other ways that may cause a connection to be aborted, but this is the simplest way to make it happen.

The close() method is also used to perform orderly release, as well as abortive. So, at its simplest, the difference between an orderly release and an abortive release could be as little as not setting the linger(0) option, described above, prior to calling Socket.close(). Take the example of two connected peers A and B: If A calls Socket.close(), a FIN message is sent from A to B; and when B calls Socket.close(), a FIN is sent from B to A. In fact, the default setting for the linger option is to not use abortive close; so if two applications terminate their connection just by using Socket.close(), then the outcome should be an orderly release. So what, then, is the problem?

The problem is a slight mismatch between the semantics of Socket.close() and the TCP FIN message. Sending a TCP FIN message means "I am finished sending", whereas Socket.close() means "I am finished sending and receiving." When you call Socket.close(), clearly it is no longer possible to send data; nor, however, is it possible to receive data. So what happens, for example, when A attempts an orderly release by closing the socket, but B continues to send data? This is perfectly allowable in the TCP specification, because as far as TCP is concerned only one half of the connection has been closed. But since A's socket is closed there is nobody to read data if B should continue sending. In this situation A's TCP stack must send an RST to forcibly terminate the connection.

Another common scenario, which may result in an unintended SocketException, is the following: Say A has sent data to B, but B closes the socket without reading all the data. In this situation, B's TCP stack knows that some data is effectively lost and it will forcibly terminate with RST rather than use the orderly FIN procedure. A will get a SocketException if it then tries to send or receive data from the socket.

How to avoid the problem

There are a number of simple ways to avoid being surprised by this problem.

  1. Structure data with a higher-level protocol. Protocols such as HTTP, which are built on top of TCP, deal with the issue by making it clear to both sides when it is safe to close the socket.
  2. Always consume data from a socket before closing it. This will help avoid the second scenario described above.
  3. Use shutdownOutput(). This method has the same effect as close() in that a FIN is sent to indicate that this peer has finished sending, but it is still possible to read from the socket until such time as the remote peer sends a FIN and end-of-file is read from the stream. Then the socket can be closed with Socket.close().
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking IPv6 User Guide

Internet Protocol version 4 (IPv4) has long been the industry standard version of the Internet Protocol (IP) for delivering data over the Internet. Internet Protocol version 6 (IPv6) is the next generation Internet layer protocol. Both versions of IP are in use today. Java applications support both IPv4 and IPv6 automatically.

The most significant difference between IPv4 and IPv6 is the address size, which is only 32 bits in IPv6, but 128 bits in IPv6. See the section IPv4 and IPv6 incompatibility in The Java Tutorials for more information.

This document covers the following topics:

  • Using IPv6 in Java
    • How IPv6 Works on the Java Platform
  • Details on IPv6 Support in Java
    • Special IPv6 Address Types
    • IPv6-Related System Properties
    • Dual-Stack Node
    • Java Application Impact
    • IPv6 Networking Properties
    • JNDI DNS Service Provider Settings

Using IPv6 in Java

IPv6 in Java is transparent and automatic. Porting is not necessary; there is no need to recompile source files.

Consider the Echo Client example described in Reading from and Writing to a Socket in The Java Tutorials. The example connect to an echo server, which receives data from its client and echoes it back. You can run this example in IPv6 mode if the echo client and the echo server are running on IPv6-enabled computers.

You can run any Java applications, client or server, on an IPv6-enabled platform, and that application will automatically become IPv6-enabled.

How IPv6 Works on the Java Platform

The Java networking stack first checks whether IPv6 is supported on the underlying OS. If IPv6 is supported, it tries to use the IPv6 stack. More specifically, on dual-stack systems, it creates an IPv6 socket. On separate-stack systems things are much more complicated. The Java runtime creates two sockets, one for IPv4 and one for IPv6 communication. For client-side TCP applications, once the socket is connected, the Internet-protocol family type is fixed, and the extra socket can be closed. For server-side TCP applications, because there is no way to tell from which IP family type the next client request will come, two sockets need to be maintained. For UDP applications, both sockets are needed for the lifetime of the communication.

The Java runtime gets the IP address from a name service.

Details on IPv6 support in Java

You don't need to know the following in order to use IPv6 in Java. The following sections explains what happens under various circumstances.

Special IPv6 Address Types

Unspecified address (:: corresponding to 0.0.0.0 in IPv4)

This is also called anylocal or wildcard address. If a socket is bound to an IPv6 anylocal address on a dual-stack machine, it can accept both IPv6 and IPv4 traffic; if it is bound to an IPv4 (IPv4-mapped) anylocal address, it can only accept IPv4 traffic. The Java runtime always tries to bind to IPv6 anylocal address on a dual-stack machine unless a related system property is set to use IPv4 Stack.

When bound to ::, the method ServerSocket.accept accept connections from both IPv6 or IPv4 hosts. The Java platform API currently has no way to specify to accept connections only from IPv6 hosts.

Applications can enumerate the interfaces using NetworkInterface and bind a ServerSocketChannel to each IPv6 address, and then use a selector from the New I/O API to accept connections from these sockets.

However, there is a new socket option that changes the above behavior. Basic Socket Interface Extensions for IPv6 has introduced a new IP level socket option, IPV6_V6ONLY. This socket option restricts AF_INET6 sockets to IPv6 communications only. Normally, AF_INET6 sockets may be used for both IPv4 and IPv6 communications. Some applications may want to restrict their use of an AF_INET6 socket to IPv6 communications only. For these applications the IPV6_V6ONLY socket option is defined. When this option is turned on, the socket can be used to send and receive IPv6 packets only. By default, this option is turned off. Note that Java SE does not currently support this socket option, but it may be added in a future release

Loopback address (::1 corresponding to 127.0.0.1 in IPv4)

Packets with the loopback address must never be sent on a link or forwarded by an IPv6 router. There are two separate loopback addresses for IPv4 and IPv6 and they are treated as such.

IPv4 and IPv6 addresses are separate address spaces except when it comes to "::".

Compatibility address ::w.x.y.z

This address type was intended to be used for hosts and routers to dynamically tunnel IPv6 packets over IPv4 routing infrastructure but has been deprecated by the Internet Engineering Task Force (IETF).

IPv4-mapped address ::ffff:w.x.y.z

This is an IPv6 address that is used to represent an IPv4 address. It allows the native program to use the same address data structure and also the same socket when communicating with both IPv4 and IPv6 nodes. Thus, on a dual-stack node with IPv4-mapped address support, an IPv6 application can talk to both IPv4 and IPv6 peer. The OS will do the underlying plumbing required to send or receive an IPv4 datagram and to hand it to an IPv6 destination socket, and it will synthesize an IPv4-mapped IPv6 address when needed.

For Java, it is used for internal representation; it has no functional role. Java will never return an IPv4-mapped address. It understands IPv4-mapped address syntax, both in byte array and text representation. However, it will be converted into an IPv4 address.

IPv6-Related System Properties

On dual stack machines, system properties are provided for setting the preferred protocol stack—IPv4 or IPv6—as well as the preferred address family types—inet4 or inet6.

IPv6 stack is preferred by default, since on a dual-stack machine IPv6 socket can talk to both IPv4 and IPv6 peers.

This setting can be changed through the java.net.preferIPv4Stack=<true|false> system property.

By default, IPv4 addresses are preferred over IPv6 addresses, for example, when querying the name service (for instance, DNS service), IPv4 addresses would be returned ahead of IPv6 addresses. There are two reasons for this choice:

  1. There are some applications that expect an IPv4 address textual format, for example, %d.%d.%d.%d. Using an IPv4 address minimizes the surprises.
  2. Using IPv4 address, one call (with an IPv6 socket) can be used to reach either a legacy IPv4-only service, or an IPv6 service (unless the IPv6 service is on a Ipv6 only node).

This setting can be changed through the system property java.net.preferIPv6Addresses=<true|false>

Dual-Stack Node

For many years, if not forever, there will be a mix of IPv6 and IPv4 nodes on the Internet. Thus compatibility with the large installed base of IPv4 nodes is crucial for the success of the transition from IPv4 to IPv6. Dual stack, defined in RFC 1933, is one of the main mechanisms for guaranteeing a smooth transition. The other mechanism is IPv6 packet tunneling, which is relevant to the JDK only through the IPv4-compatible address. The former is the most relevant piece to the JDK. A dual stack includes implementations of both versions of the Internet Protocol, IPv4 and IPv6.

A general property of a dual-stack node is that an IPv6 socket can communicate both with an IPv4 and IPv6 peer at the transport layer (TCP or UDP) . At the native level, the IPv6 socket communicates with an IPv4 peer through an IPv4-mapped IPv6 address. However, unless a socket checks for the peers address type, it won't know whether it is talking to an IPv4 or an IPv6 peer. All the internal plumbing and conversion of address types is done by the dual-protocol stack.

Note: IPv4-mapped address has significance only at the implementation of a dual-protocol stack. It is used to fake (for example, appear in the same format as) an IPv6 address to be handed over to an IPv6 socket. At the conceptual level it has no role; its role is limited at the Java API level. Parsing of an IPv4-mapped address is supported, but an IPv4-mapped address is never returned.

Java Application Impact

  • There should be no change in Java application code if everything has been done appropriately. For example, there are no direct references to IPv4 literal addresses; instead, host names are used.
  • All the address or socket type information is encapsulated in the Java networking API.
  • Through setting system properties, address type and/or socket type preferences can be set.
  • For new applications IPv6-specific new classes and APIs can be used.

Communication Scenarios

(Nodes) | V4 Only | V4/V6 | V6 Only
V4 Only | x | x | No communication possible
V4/V6 | x | x | x
V6 Only | No communication possible | x | x

The top row and left column represent various node types attempting to communicate. An x indicates that these nodes can communicate with each other.

In the following communication scenarios, either host1 or host2 can be a native application:

  • host1 is server, host2 is client: If host2 wants to talk to host1, it will create a V6 socket. It then looks up the IP address for host1. Since host1 only has a v4 protocol stack, it will only have IPv4 records in the name lookup service. So host2 will try to reach host1 using an IPv4-mapped address. An IPv4 packet will be sent by host2, and host1 will think it is communicating with a v4 client.
  • host1 is client, host2 is server: If host2 is the server, it will first create a v6-type socket (by default), then it will wait for connections. Since host1 supports v4 only, it creates a v4-type socket. They resolves the name for host2. It only gets v4 address for host2, since it doesn't understand IPv6 address. So it connects to host2 using v4 address. A v4 packet will be sent on the wire. On host2, the dual stack will convert the v4 packet into a v6 packet with a v4-mapped address in it and hand it over to the v6 socket. The server application will handle it as if it is a connection from a v6 node.

IPv6 Networking Properties

java.net.preferIPv4Stack (default: false)

If IPv6 is available on the operating system, the underlying native socket will be an IPv6 socket. This allows Java applications to connect to, and accept connections from, both IPv4 and IPv6 hosts.

If an application has a preference to only use IPv4 sockets, then this property can be set to true. The implication is that the application will not be able to communicate with IPv6 hosts.

java.net.preferIPv6Addresses (default: false)

If IPv6 is available on the operating system, the default preference is to prefer an IPv4-mapped address over an IPv6 address. This is for backward compatibility reasons—for example, applications that depend on access to an IPv4-only service, or applications that depend on the %d.%d.%d.%d representation of an IP address.
This property can be set to try to change the preferences to use IPv6 addresses over IPv4 addresses. This allows applications to be tested and deployed in environments where the application is expected to connect to IPv6 services.

JNDI DNS Service Provider Settings

sun.net.spi.nameservice.provider.<n>=<default|dns,sun|...>

Specifies the name service provider that you can use. By default, the Java runtime will use the system-configured, name-lookup mechanism, such as file or Network Information Service (NIS). You can specify your own by setting this option. <n> takes the value of a positive number and it indicates the precedence order: a small number takes higher precedence over a bigger number. One DNS name service provider is provided through JNDI, which is called dns,sun.

sun.net.spi.nameservice.nameservers=<server1_ipaddr,server2_ipaddr ...>

You can specify a comma separated list of IP addresses that point to the DNS servers you want to use.

sun.net.spi.nameservice.domain=<domainname>

This property specifies the default DNS domain name, for example, eng.example.com.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

$Brelnotes.htmlC07/15/03o!

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Networking Overview

Documentation Contents

Java Networking Overview

The Java Networking API (java.net) provides the interfaces/classes for the following functions:

  • Addressing
  • Making TCP connections
  • Sending/Receiving Datagram Packets via UDP
  • Locating/Identifying Network Resources
  • Security
    • Authentication
    • Permissions

The goal of this document is to provide a high-level overview of the facilities the java.net package provides. For details about interfaces, classes, or factories, see the networking API. For basic networking concepts, see Trail: Custom Networking in the Java Tutorial.

Addressing

java.net provides the following addressing-related classes:

  • InetAddress
  • Inet4Address
  • Inet6Address
  • SocketAddress
  • InetSocketAddress

For IP addressing, three classes are provided: InetAddress, Inet4Address, and Inet6Address. InetAddress represents an IP address, which is either a 32- or 128-bit unsigned number used by IP, the lower-level protocol on which protocols like TCP and UDP are built. To represent 32-bit IPv4 address, Inet4Address is provided. (An IPv4 address has the familiar form nnn.nnn.nnn.nnn, where n is an integer; e.g., 192.0.2.254). It is a subclass of InetAddress. To represent 128-bit IPv6 addresses, Inet6Address is provided. It is also a subclass of InetAddress.

Flow chart showing the logic flows from InetAddress to Inet4Address and Inet6Address

For socket addressing, two classes are provided: SocketAddress and InetSocketAddress. SocketAddress is an abstract socket address, independent of a specific protocol. It is intended for subclassing for a specific protocol. InetSocketAddress below is an example. InetSocketAddress is a subclass of SocketAddress; it represents an IP socket address. It can include an IP address (e.g., 192.0.2.254) and port (e.g., 80); a hostname (e.g., example.com) and port (e.g., 1000); or port only (e.g., 1010). In the latter case, a wildcard IP address is assumed.

Diagram showing the logic flows between SocketAddress and InetSocketAddress

Making TCP Connections

These classes are related to making normal TCP connections:

  • ServerSocket
  • Socket

For simple connections between a client and a server, ServerSocket and Socket are all that you will probably need.

ServerSocket represents the socket on a server that waits and listens for requests for service from a client. Socket represents the endpoints for communication between a server and a client. When a server gets a request for service, it creates a Socket for communication with the client and continues to listen for other requests on the ServerSocket. The client also creates a Socket for communication with the server. The sequence is shown below:

See long description [D]

Once the connection is established, getInputStream() and getOutputSteam() may be used in communication between the sockets

Sending/Receiving Datagram Packets via UDP

The following are related to sending and receiving datagram packets via UDP.

  • DatagramPacket
  • DatagramSocket

DatagramPacket represents a datagram packet. Datagram packets are used for connectionless delivery and normally include destination address and port information. DatagramSocket is a socket used for sending and receiving datagram packets over a network via UDP. A DatagramPacket is sent from a DatagramSocket by calling the send(...) method of DatagramSocket with DatagramPacket as the argument: send(DatagramPacket dp). receive(DatagramPacket dp) is use for receiving a DatagramPacket. (The MulticastSocket class may be used for sending/receiving a DatagramPacket to a mulitcast group. It is a subclass of DatagramSocket that adds functionality for multicasting.)

See long description [D]

Locating/Identifying Network Resources

These classes are related to locating or identifying network resources:

  • URI
  • URL
  • URLClassLoader
  • URLConnection
  • URLStreamHandler
  • HttpURLConnection
  • JarURLConnection

The most commonly used classes are URI, URL, URLConnection, and HttpURLConnection.

URI represents a Uniform Resource Identifier for a resource; it is an identifier for a resource but not necessarily a locator for that resource. URL represents a Uniform Resource Locator for a resource. URLs are a subset of URIs, though the class URL is not a subclass of the URI class. In short, a URL tells how to access the resource, while a URI may or may not. The Uniform Resource Name (URN) is another subset of URI. No Java class exists for it.

Diagram showing URL and URN as subclasses of URI.

URLConnection is the abstract superclass of all classes that represent a connection between an application and a network resource identified by a URL. Given a URL and hence a protocol, URL.openConnection() returns an instance of the appropriate implementation of URLConnection for the protocol. (The protocol is known from the URL.) The instance provides the means with the method URLConnection.connect() to actually open the connection and access the URL.

See long description [D]

HttpURLConnection is the most commonly used implementation of URLConnection. It is for http protocol, the protocol used for accessing content on web servers. In the above diagram, if the access protocol for the URL were http, then an instance of HttpURLConnection would be returned by the openConnection() method.

Security

Security includes authentication- and permissions-related classes. Authentication relates to user authentication and involves username and password checking. Authentication of a user may be required in a number of situations, such as when a user tries to access a URL. Permissions relate to what actions may be performed; e.g., unless the NetPermission object "setDefaultAuthenticator" exists, then invoking the method Authenticator.setDefault(Authenticator a) will cause a security exception.

Authentication

Some proxies and origin servers require authentication information, using authentication schemes such as BASIC and DIGEST. For instance, when connecting with http via a proxy and the proxy requires authentication, we call the Authenticator class to obtain usernames, passwords, and other items needed to authenticate. The following classes relate to authentication:

  • Authenticator
  • PasswordAuthentication

In addition to methods for user authentication, the abstract class Authenticator also has methods for querying about the authentication being requested (see getRequestingXXX()). It is typically subclassed and an instance of the subclass is registered with the system by calling setDefault(Authenticator a). (Note that if there is a security manager, it checks to see that the security policy permits the NetPermission "setDefaultAthenticator".) Then, when the system requires authentication, it will call a method such as requestPasswordAuthentication().

PasswordAuthentication is simply a data holder for a user name and a password.

Permissions

  • SocketPermission
  • NetPermission

A SocketPermission consists of a host, with optional port range, and a set of actions that may be performed on that host: connect, accept, listen and/or resolve. It includes methods to determine if one SocketPermission is equal to another or implies another Permission. A SocketPermission may be included in a PermissionCollection for easy checking if a permission exists.

NetPermission is a class for various named network permissions. Currently there are three: setDefaultAuthenticator, as mentioned above; requestPasswordAuthentication; and specifyStreamHandler. A NetPermission may be included in a PermissionCollection for easy checking if a permission exists.

For more information about permissions, see the Permissions topic.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java Pack200

Documentation Contents

Enhancements to Pack200

  • Enhancements in Java SE 8
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 8

Pack200 Support for Constant Pool Entries and New Bytecodes Introduced by JSR 292

In Java SE 8, the Java class file format has been updated, in part, because of JSR 292: Supporting Dynamically Typed Languages on the Java Platform. (See also Java Virtual Machine Support for Non-Java Languages.)

Consequently, the Pack200 engine has been updated accordingly to ensure that Java SE 8 class files are compressed effectively. In particular, the Pack200 engine now recognizes constant pool entries and new bytecodes introduced by JSR 292. As a result, compressed files created with this version of the pack200 tool will not be compatible with older versions of the unpack200 tool. See Compression Formats for Network Development.

Enhancements in Java SE 6

No current changes to report.

Enhancements in Java SE 5.0

No current changes to report.

Enhancements in Java SE 1.4

No current changes to report.

Previous Enhancements

No current changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Pack200 API

API Specification

  • Pack200 API Specification
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Packed Class Archive Specification

Documentation Contents

Pack200: A Packed Class Deployment Format For Java Applications

Contents

Skip Navigation Links
  • 1. Introduction
  • 2. Archive Inputs
  • 3. Archive File Structure Summary
  • 4. Introduction to Integer Encodings
    • 4.1. Integer Encoding Schema
  • 5. Band Definitions
    • 5.1. Archive Segmentation
    • 5.2. Archive Header
      • 5.2.1. Archive Options and File Properties
      • 5.2.2. Archive Entity Counts and Class Format
    • 5.3. Constant Pools
      • 5.3.1. Scalar Constants
      • 5.3.2. Utf8 Constants
      • 5.3.3. Type Signatures
      • 5.3.4. Tuple Constants
      • 5.3.5. Extra Constants
    • 5.4. File Attributes
    • 5.5. Flags and Attributes
      • 5.5.1. Assignment of Flag Bits to Attributes
      • 5.5.2. Attribute Layout Definitions
      • 5.5.3. Recursive Layouts
      • 5.5.4. Default Attribute Layouts
      • 5.5.5. Stack Map Layouts
      • 5.5.6. Metadata Layouts
      • 5.5.7. Unusual Layout Usages
    • 5.6. Source File Abbreviation
    • 5.7. Nested Classes
    • 5.8. Class Schema
    • 5.9. Attribute Bands
      • 5.9.1. Metadata Transmission
    • 5.10. Bytecode Instructions
  • 6. Specification of Band Coding
    • 6.1. Encoding of Small Whole Numbers
      • 6.1.1. Scheme of Multiple Codings
      • 6.1.2. Definition of Encoding Byte Sequences
      • 6.1.3. Definition of Decoded Whole Number Values
    • 6.2. Encoding of Signed Integers
      • 6.2.1. Further Discussion of Sign Conversion
    • 6.3. Attributes of Codings
    • 6.4. Encoding of Correlated Sequences
    • 6.5. Encodings of Uncorrelated Values
      • 6.5.1. Table of Favorites
      • 6.5.2. Sequence of Tokens
      • 6.5.3. Sequence of Unfavored Values
    • 6.6. Adaptive Encodings
    • 6.7. Meta-Coding
      • 6.7.1. Coding Specifier Structure
      • 6.7.2. Coding Specifier Semantics
      • 6.7.3. Coding Specifier Meta-Encoding
      • 6.7.4. Canonical BHSD Codings
  • 7. Stability of Decompressor Output
    • 7.1. Ordering of Attribute Lists
    • 7.2. Ordering of Constant Pools
  • 8. Appendixes
    • 8.1. Appendix: List of Bands
    • 8.2. Appendix: Pseudo-Code Illustrations
      • 8.2.1. Representation of cp_Utf8 Constant Pool
      • 8.2.2. Representation of cp_Signature Constant Pool
      • 8.2.3. Representation of Byte Offsets
      • 8.2.4. Representation of Predictable Nested Class Names
    • 8.3. Appendix: Design FAQ
      • 8.3.1. General Questions

Revision History

Changes made to support JSR-308 Mar-2013

  • Added RuntimeVisibleTypeAnnotation and RuntimeInvisibleTypeAnnotation.

Changes made to support JSR-335 Feb-2013

  • Added two new pseudo-instructions "invokespecial_int" and "invokestatic_int" referencing cp_Imethod operands.

MethodParameters Flag changed Feb-2013

  • Changed flag from u4 to u2

Changes made to support MethodParameters Dec-2012

  • Increment the version number from 170.0 to 171.0
  • Added attribute structure

Changes made for JSR 292 support Aug-2011

  • Bump the pack200 file format version number from 160.* to 170.0
  • Add optional cp_extra_counts to the archive header.
  • Add 4 extra constant pools: cp_MethodHandle, cp_MethodType, cp_BootstrapMethod, cp_InvokeDynamic.
  • Defined the combined constant pool cp_AnyMember, comprising cp_{Field,Method,Imethod}.
  • Defined the combined constant pool cp_LoadableValue, comprising valid ldc operands.
  • Add new attribute layout codes for new constants: KM, KT, RY, RB.
  • Add combined layout codes KL (any ldc-able value) and RN (AnyMember), supplementing RQ.
  • Change the pseudo-instruction name "aldc" to "sldc", and add "qldc".

Changes made for MR #1 01-Jun-2005

  • Adjust StackMapTable based on JSR-202 changes.
  • Bump the pack200 file format version number from 160.0 to 160.1
  • Clarify inconsistent tie-breaker rule in centrality comparisons.

Changes made for MR #1 20-Apr-2005

  • Reinstate StackMap as StackMapTable JSR-202.

1. Introduction

This document specifies an archive format called "Pack200". It is optimized for applications written in the Java programming language. Such applications are usually delivered as collections of classes, sometimes with associated resource files.

This format allows any number (from one to hundreds of thousands) of Java classes to be encoded by a compressor, transmitted compactly in a single block of bytes, and decoded by a decompressor into equivalent Java class files. Because it can also represent class resources and other "side files", it can serve as an alternative to the JAR archive for some deployment tasks, notably downloading Java applications.

The Pack200 format can decrease the size of a Java application by a factor of seven to nine, compared with an equivalent JAR containing uncompressed ("stored") class files. By contrast, using the zip DEFLATE algorithm integral to JAR and ZIP archives gains a factor of two. The undocumented "crunch" mechanism, used to deploy JDK downloads in the past, gains a corresponding factor of five to six. Note that all these figures assume and incorporate the effects of a post-pass with DEFLATE or a similar off-the-shelf compression algorithm. (See DEFLATE Compressed Data Format Specification for more information.)

The main motivation for this format is to decrease disk and bandwidth requirements for Java application packaging, transmission, and delivery. An earlier version has been used to package the downloads for Java SE 1.4.1 and 1.4.2 (code names "Hopper" and "Mantis").

This format is not intended for fast loading into a virtual machine, and does not attempt to improve start-up speed or memory footprint in running Java applications. The heavy engineering requirements on a directly loadable file format would make optimal compression impossible. The decompressor of an aggressively compressed file will have a complex job to do, and must be allowed memory and CPU time to do this job. We assume that Pack200 archives will be unpacked on the same classes of machine that run Java SE and Java EE applications.

This format is batch-oriented, optimized for packaging and transmission of Java classes. It does not support random access of individually stored classes. In order to emphasize the sequential nature of this archive format, we will use the verb transmit, rather than store, to refer to the formatting of data produced by a compressor and accepted by a decompressor.

This format does not attempt to duplicate work performed by DEFLATE or other byte-oriented compression algorithms. Typically, tools using Pack200 will further compress archives by storing them in ZIP files or using some other compression technique. The presence of such a post-pass compressor is an assumption made by the design of Pack200.

This specification is complex, and may seen to some readers needlessly complex. The design decisions reflected here have been motivated by extensive testing and experimentation with actual Java class files found in real products. An attempt to remove complexity from this specification is likely also to remove measurably significant compression efficiency.

2. Archive Inputs

A Pack200 archive, like a JAR file, carries images of class files and other ("resource") files arranged in a hierarchical directory structure.

No special compression or transformation is performed on any file other than class files, other than (possibly) reordering them by file type. The post-pass compressor is assumed to provide adequate compression on those spans of the archive which carry images of non-class files.

Classes are represented in a form which suppresses their individual constant pools, in favor of a large constant pool that serves the entire archive. Thus, when a class file is extracted from a Pack200 archive, a new constant pool will be created for it, and all constant pool references adjusted. This does not change the semantics of the class, but it will generally modify the bitwise image of the file, and perhaps even its size, as unused constant pool entries are deleted.

Note that every class file must be fully parsed by the compressor, so that all constant pool indexes may be found and (later) renumbered. This requirement applies to any class, field, method, or code attribute which refers to the constant. The Pack200 format supports a moderate range of attributes. A modest variety of new attribute layouts may be declared to the compressor, and the Pack200 format provides a place to transmit such layouts for use by decompressors. See the section Attribute Layout Definitions for more information.

3. Archive File Structure Summary

The archive file consists of a short archive header, followed by a number of independent file sections called bands. (There are about 100 of them; this number can vary.) Each band transmits an array of small integers, called the elements of the band. After the archive header, the archive consists only of bands.

Logically, a band is an implicitly sized array of 32-bit unsigned integers. However, it is rare for a band to physically require more than one or two bytes per element, since element encodings are chosen to transmit the actual band values more compactly.

A band has no fixed header, not even an indication of its size. The count of band elements is deduced by the decompressor from the contents of previous bands, or (ultimately) from the archive header.

The elements of any given band have a common meaning and role. For example, the names of all transmitted classes are in a single band, while all the class field counts are in a different band. Each band is transmitted as a contiguous segment of bytes within the archive. This contiguity is the main reason that a Pack200 archive, while compact to begin with, is very compressible by utilities like zip.

In some bands, each element helps describe one object. For example, each class is associated with a count of fields, which is given in the archive as a corresponding value in the class_field_count band. In other bands, one object may be described by a run of zero or more elements in a band. For example, the interfaces implemented by a class are given in the archive as a corresponding run of zero or more values in the class_interface band; each such value is an index referring to a single class.

A very few bands (less than 10) contain non-homogeneous bytes, such as the images of resource files. These few are called byte bands. Many of the bands contain references into the constant pool. Some contain access modifier flags and related bits. One band, called the char band, contains string characters in a specially chosen encoding called "CHAR3" (somewhat akin to UTF8, but not identical). The rest of the bands transmit integers with a variety of other interpretations.

One of the integer bands (cp_Utf8_big_chars) carries the characters of a single CONSTANT_Utf8 string selected for special treatment. Uniquely, this band is repeated zero or more times, depending on how many strings are selected for this special treatment. (These specially-transmitted "big strings" are explained in the section Utf8 Constants.)

Most bands have an easily understood function, such as transmitting the number of methods in a class, or the name of a field, or the operand of a "getfield" bytecode instruction.

Except for the special case of byte bands, a band is never considered as a sized span of bytes, but rather as a counted series of elements which are encoded integers. Since integer encodings are typically variable-sized (when regarded as byte sequences), there is no firm rule for deriving a band's byte size from its element count. Indeed, finding the end of a band requires that it be parsed byte-by-byte.

4. Introduction to Integer Encodings

Each band uses one or more coding tactics to encode its elements as sequences of bytes. (The post-pass compressor is expected to turn these bytes into bit sequences, but its actions are not specified by this document.) The Pack200 compressor is free to choose and vary encoding tactics used by a band. The encoding tactics used in one band are independent of those used in other bands. The space of supported encoding tactics is an important part of the Pack200 specification. The present section introduces these encodings, which are defined in detail in the section Specification of Band Coding.

As one might expect, byte bands (which encode bytewise data such as the resource file images) encode their integers as unsigned 8-bit bytes. This encoding is named BYTE1 in this specification. (Compare the type "u1" in the class file definition.)

Other bands have values with a much larger dynamic range, including (in a few cases) negative numbers, and/or values all the way up to the 32-bit unsigned maximum. Most of these encodings are variable-length, in the expectation that the typical band element will be relatively small in magnitude, even though some elements may be large and require more bytes to represent. Some bands that are expected to exhibit strong correlations in their element sequences are encoded as successive differences (delta encoding) rather than absolute numeric values.

Each band is associated with a primary encoding which the compressor and decompressor agree to use when transmitting elements of that band. For any band after the end of the segment header, except for the byte bands, the compressor can optionally specify a secondary encoding to use instead of the primary encoding. In essence, the band's encoding defaults to the primary, unless there is an explicitly declared secondary. This allows the Pack200 format to adapt more closely to the actual statistics of band elements.

For example, most bands, such as those holding counts and sizes, have a primary encoding called UNSIGNED5. This is a general-purpose unsigned encoding which represents values in the range [0..191] as a single byte, and scales up to a maximum size of five bytes for numbers larger than about fifty million. However, if a band contains only numbers in the range [0,255], the BYTE1 encoding is more compact, and the compressor is allowed to instruct the decompressor to use this instead.

When the compressor specifies a secondary encoding, it must emit an optional band coding specifier, which is described in the section Meta-Coding. A customized encoding method often saves many bytes, if it matches more precisely the actual dynamic range of the band's element values.

4.1. Integer Encoding Schema

The Pack200 format is based on a schema of integer encoding systems, parameterized by four numbers (B,H,S,D). From this infinite set, about 10 selected encodings serve as primary encodings for bands, and about 100 more serve as optional encodings. The system of (B,H,S,D) encodings is explained at length in the section Specification of Band Coding. For the present purposes, a brief introduction will suffice.

The parameter B (1<=B<=5) is the maximum length in bytes of the encoding of a single integer. Less significant bits are always encoded in earlier bytes.

The parameter H (1<=H<=256) is the radix of the encoding. it also determines the conditions under which the encoding's byte sequences terminate. The co-parameter L (0<=L<=255) is defined as (256-H). Encoded byte sequences are allowed to contain only one byte with a value less than L, and that byte must be the last in the sequence. Thus, larger H values make for longer average encoding lengths. If H is 256 and L is zero, then the encoding method is fixed-length, because all encodings must be exactly B bytes long.

The parameter S (0<=S<=2) determines whether and how the encoding represents signed numbers. (More precisely, since band elements are conventionally regarded as unsigned 32-bit integers, S determines the coding of band elements larger than the largest 31-bit unsigned number, 2147483647. But we shall continue to refer to such numbers as negative, where the distinction is irrelevant.) S denotes the number of least-significant bits which serve as a sign bit. If S is zero, the numbers are unsigned. If S is one, the LSB of the unsigned number is exclusive-ored into the right-shifted remainder of the unsigned number to produce a corresponding signed number. If S is more than one, the signed number produced is negative only if all S least-significant bits are set, and otherwise these low bits contribute to the positive magnitude of the integer. This representation is efficient for bands containing mostly-positive numbers, such as bytecode branch offsets. The interpretation of sign bits is more precisely described in the section Encoding of Signed Integers.

The parameter D (0<=D<=1) determines whether the band transmits its data via successive differences (i.e., delta encoding). In writing these encodings, the parameters S and D may be omitted if both are zero, and D may be omitted if zero.

Thus, the encoding (1,256,0,0), also written as (1,256), represents numbers as unsigned bytes, while (4,256) represents numbers as unsigned little-endian 32-bit integers. The encoding (1,256,1) maps single bytes to numbers in the range [-128,127]. The encoding (1,256,1,1) expresses any sequence of numbers whose successive differences are in the range [-128,127] (and whose first number is in that range).

The very common encoding UNSIGNED5 can represent the full unsigned range of 32-bit integers. A byte sequence in this encoding consists either of four bytes less than 192 followed by an arbitrary byte, or else from zero to three bytes less than 192 followed by a byte greater than or equal to 192. The unsigned value is formed by scaling each succeeding byte by successive powers of the radix 64, and adding all the scaled byte values together.

value | byte 0 | byte 1 | byte 2 | byte 3 | byte 4
1 | 1 |  |  |  |
191 | 191 |  |  |  |
192 | 192 | 0 |  |  |
193 | 193 | 0 |  |  |
255 | 255 | 0 |  |  |
256 | 192 | 1 |  |  |
512 | 192 | 5 |  |  |
1024 | 192 | 13 |  |  |
2048 | 192 | 29 |  |  |
12479 | 255 | 191 |  |  |
12480 | 192 | 192 | 0 |  |
798911 | 255 | 255 | 191 |  |
798912 | 192 | 192 | 192 | 0 |
51130559 | 255 | 255 | 255 | 191 |
51130560 | 192 | 192 | 192 | 192 | 0
0xFFFFFFFF | 255 | 252 | 252 | 252 | 252

Here is the set of primary encodings used by at least one band:

Type | Name | Purpose
(1,256) | BYTE1 | bytes
(3,128) | CHAR3 | Java characters
(5,4) | BCI5 | bytecode positions
(5,4,2) | BRANCH5 | bytecode branch offsets
(5,64) | UNSIGNED5 | general unsigned ints
(5,64,1) | SIGNED5 | general signed ints
(5,64,0,1) | UDELTA5 | monotonic sequences
(5,64,1,1) | DELTA5 | autocorrelated sequences
(5,64,2,1) | MDELTA5 | mostly monotonic sequences

5. Band Definitions

The file as a whole consists of about 200 bands in four major groups. After a header, the constant pool contents come first, followed by most of the class schema, followed by a consolidation of all attribute information (for classes, fields, methods, codes, and the archive as a whole), and ending with bytecodes for all methods.

Rather than describe the bands in a long and dull sequence, we use a simple, non-recursive grammar to present them in an organized fashion. This grammar roughly parallels the grammar of a class file:

  pack200_segment:
        segment_header
        *band_headers :BYTE1
        cp_bands
        attr_definition_bands
        ic_bands
        class_bands
        bc_bands
        file_bands

The terminals of this grammar are scalars and bands. To make the terminals easier to recognize, scalar names begin with pound sign "#" and band names begin with a star "*". A scalar is an encoded integer (or a small fixed number of them) which appears within the header of the archive file. When a scalar is mentioned in the grammar, it is followed by a colon and the encoding and bracketed count of the scalar value(s). Whenever a band is mentioned, it is followed by a colon and its primary encoding, followed by a comment in square brackets indicating its length. If the band encodes references into some other data structure, such as a constant pool, that structure is mentioned as a comment in parentheses. If the references are allowed to be null, that fact is mentioned also.

Here is an example:

  example_non_terminal:
        other_non_terminal
        #single_scalar_integer :UNSIGNED5[1]
        #four_byte_scalar :BYTE1[4]
        *band_of_integers :UNSIGNED5 [#integer_count]
        *band_of_method_references :UNSIGNED5 [SUM(*ref_counts)] (cp_Method)
        *band_of_strings_and_nulls :UNSIGNED5 [...] (null or cp_String)

Many of the band lengths are simply references to previous scalars (such as [#class_count]) or sums of previous bands which transmit counts (e.g., [SUM(*class_method_count)]). These bracketed lengths must be regarded as comments in the grammar, since the text of the specification defines band lengths verbally. Band counts which cannot be briefly summarized as sometimes specified in a partial expression which contains an ellipsis.

Occasionally we use additional grammatical notations. We use the ordinary regular expression operators (X | Y) means a match for either X or Y, (X)* means any number of matches for X, (X)+ means one or more matches for X, and (X)? means either a match for X or nothing. In one case described in the section Utf8 Constants, where a band may have several instances, the expression (band1) ** length(band2) means that there are as many instances of band1 as there are elements in band2. Likewise, in three cases, the expression (band1) ** #scalar indicates that there are zero or one instances of band1 according to the value (zero or one, respectively) of the boolean scalar value.

5.1. Archive Segmentation

The entire Pack200 archive format may be repeated one or more times in a transmission to the decompressor. In this case, each complete set of transmitted bands bands is viewed as a segment of the whole transmission. The decompressor is required to accept multiple segments, and to process each segment independently in order. The output files resulting from each segment are accumulated in order. If the decompressor is producing a JAR file, multiple segments must be accumulated into one output JAR file, whose elements are made up of the respective elements transmitted in each segment, in order.
  pack200_archive:
        (pack200_segment)+
Note that each segment begins anew with the Pack200 magic number and version numbers.

(With one caveat, this means that Pack200 archives may be concatenated with the natural meaning of combining the archives they represent. As will be seen below, if the #archive_size field is not present in each segment header, it must be inserted before another segment is appended, so that the decompressor can find the end of each segment. The segment header format is such that this adjustment can be made easily.)

When combined with a streaming transport layer, segmentation provides a way for a compressor to decrease latency or to decrease the decompressor's memory requirements, at a cost in compressor efficiency.

Segmentation can also help solve a scaling problem with very large archives (of many tens of megabytes), in which the width of indexes into the combined global constant pools can grow beyond the benefits of global constant sharing. By starting a new segment, the compressor resets the decompressor's constant pools, clearing out useless constants, at the cost of restating constants that are still in use. (The trade-offs are similar in flavor to the design of copying garbage collectors.)

5.2. Archive Header

The header consists of a magic number and version information, in a format exactly parallel to the Java class file format. However, besides the magic number, there are no other big-endian integers in the Pack200 format. All integer encodings in bands present arithmetically less-significant bits first.

Only the archive magic numbers (the first four bytes of the segment header) are fixed in size. All other archive structures are variable in size and must therefore be parsed sequentially. Generally speaking, decompressors must perform two passes over each segment of the archive, one to size and parse the bands, and one to sequentially extract information from the bands into each JAR element in the output.

  segment_header:
        archive_magic archive_header

  archive_magic:
        #archive_magic_word :BYTE1[4]

  archive_header:
        #archive_minver :UNSIGNED5[1]
        #archive_majver :UNSIGNED5[1]
        #archive_options :UNSIGNED5[1]
        (archive_file_counts) ** (#have_file_headers)
        (archive_special_counts) ** (#have_special_formats)
        cp_counts
        class_counts

  archive_file_counts:
        #archive_size_hi :UNSIGNED5[1]
        #archive_size_lo :UNSIGNED5[1]
        #archive_next_count :UNSIGNED5[1]
        #archive_modtime :UNSIGNED5[1]
        #file_count :UNSIGNED5[1]

The archive_magic_word consists of the four bytes 0xCA, 0xFE, 0xD0, 0x0D. The #archive_minver must be the number 1. The #archive_majver must be the number 170. Both of the latter two values may be incremented in the future to reflect small revisions in this file format. Note that in previous versions of this standard, the minor and major version numbers were 7 and 150, or 1 and 160.

The header also contains initial counts of constant pool entries and other "top-level" entities. All of these counts are given in UNSIGNED5 format. Some of these counts are conditionally present, controlled by bits in the #archive_options word. The rule for a missing header value (and for missing values in general unless otherwise specified) is that the decompressor must behave as if it had received an explicit zero value.

5.2.1. Archive Options and File Properties

The #archive_options word is interpreted bitwise. Certain bits are given symbolic names as follows, where the LSB is numbered as bit zero:
Bit | Name | Meaning if set in #archive_options
0 | have_special_formats | archive_special_counts contains counts
1 | have_cp_numbers | cp_number_counts contains counts
2 | have_all_code_flags | code_flags_lo contains an element for every code
3 | have_cp_extra_counts | cp_extra_counts contains counts
4 | have_file_headers | archive_file_counts contains counts
5 | deflate_hint | request compressed JAR file for all elements
6 | have_file_modtime | file_modtime contains modtimes
7 | have_file_options | file_options contains option bits
8 | have_file_size_hi | file_size_hi contains high-order size words
9 | have_class_flags_hi | class_flags_hi contains extra attribute flags
10 | have_field_flags_hi | field_flags_hi contains extra attribute flags
11 | have_method_flags_hi | method_flags_hi contains extra attribute flags
12 | have_code_flags_hi | code_flags_hi contains extra attribute flags
13 |  | (unused, must be zero)
... |  | (unused, must be zero)
31 |  | (unused, must be zero)

If have_special_formats (the LSB) is set, the band archive_special_counts will have two elements, as specified in the grammar. Otherwise this band will have zero elements. Similarly, if have_cp_numbers is set, the band cp_number_counts will have four elements, as specified in the grammar. Otherwise this band will have zero elements. If have_all_code_flags is set, the band code_flags must contain one element for every Code attribute. Otherwise this band may have fewer elements. (This option is useful when Code attributes are rich in sub-attributes, perhaps because the JAR contains large amounts of debugging information.)

If have_cp_extra_counts is set, the band cp_extra_counts will contain four elements, as specified in the grammar. Otherwise this band will have zero elements. (The flag may only be set when #archive_majver is 170 or higher. These extra counts correspond to additional constant pool types introduced in recent revisions of the classfile format.)

If have_file_headers is set, the band archive_file_counts will have five elements, as specified in the grammar. Otherwise this band will have zero elements. If deflate_hint is set, the decompressor is requested (but not required) to reduce the size of its output. For example, if it produces a JAR file, it may deflate the JAR elements. If the option have_file_modtime (or have_file_options, have_file_size_hi, have_class_flags_hi, have_field_flags_hi, have_method_flags_hi, have_code_flags_hi, respectively) is set, the corresponding band file_modtime (or file_options, file_size_hi, class_flags_hi, field_flags_hi, method_flags_hi, code_flags_hi, respectively) may be non-empty, as specified below. Otherwise that band will have zero elements. Other bits in the archive options must be zero and are reserved for future use.

Immediately after the #archive_options word is a pair of 32-bit numbers which together form a 64-bit length that helps decompressors easily buffer incoming data up to the end of the archive segment without reading beyond the segment. The value #archive_size is the unsigned 64-bit value composed of the unsigned 32-bit words #archive_size_lo and #archive_size_hi, where the former value is the low-order 32-bit word and the latter value is the high-order 32-bit word. The value #archive_size is either zero or declares the number of bytes in the archive segment, starting immediately after #archive_size_lo and before #archive_next_count and ending with the last band, the *file_bits band. (That is, a non-zero size includes the size of #archive_next_count, *file_bits, and everything in between.) This value is redundant, but if non-zero must be correctly supplied by any compressor. If the archive segment is transmitted as part of a stream, and if other data (such as additional segments) follow the archive, the #archive_size value must not be zero. Although it may be completely ignored by the decompressor, this value may help some decompressors to buffer their inputs more efficiently.

Immediately after #archive_size is another value #archive_next_count which estimates the number of archive segments immediately following the current one. This number need not be correct, and may always be zero. It is intended to provide decompressors with a hint as to the amount of remaining decompression work to do. (Such hints are routinely displayed in progress bars.)

If the #archive_modtime value is non-zero, the decompressor is requested (but not required) to adjust the system-specific modification time for its output. For example, if the decompressor produces a JAR file, it may set the modification date of each JAR element, or of the JAR file itself, to that date, in the absence of any more specific directive, such a non-zero file_modtime value. The #archive_modtime value is interpreted as the number of seconds since the epoch used by System.currentTimeMillis, which is 1/1/1970, 00:00:00 GMT. However, the special value zero is reserved to indicate the absence of any modification time for the archive as a whole. A decompressor may supply an arbitrary value in place of a missing archive modification time. If this is done, and if file_modtime values are present, those values are interpreted relative to modification time supplied for #archive_modtime by the compressor.

The #file_count value gives the number of files which are described in detail by the archive. Note that a class file which is simple enough (as described below) does not need to be described as a file, because it is enough that the class itself is transmitted. Therefore, #file_count may be less than the number of transmitted classes. (This latter number is called #class_count.) On the other hand, transmitted files do not need to contain classes, so that #file_count can also be greater than the number of classes.

5.2.2. Archive Entity Counts and Class Format

The archive file contains up to sixteen sets of constants called "constant pools". (These structures are analogous, but not identical, to a similarly named structure in class files.) These constant pools are described in detail in the next section.

The cardinality of each constant pool is given in UNSIGNED5 format in elements of the cp_counts structure of the archive header:

  cp_counts:
        #cp_Utf8_count :UNSIGNED5[1]
        (cp_number_counts) ** (#have_cp_numbers)
        #cp_String_count :UNSIGNED5[1]
        #cp_Class_count :UNSIGNED5[1]
        #cp_Signature_count :UNSIGNED5[1]
        #cp_Descr_count :UNSIGNED5[1]
        #cp_Field_count :UNSIGNED5[1]
        #cp_Method_count :UNSIGNED5[1]
        #cp_Imethod_count :UNSIGNED5[1]
        (cp_extra_counts) ** (#have_cp_extra_counts)

  cp_number_counts:
        #cp_Int_count :UNSIGNED5[1]
        #cp_Float_count :UNSIGNED5[1]
        #cp_Long_count :UNSIGNED5[1]
        #cp_Double_count :UNSIGNED5[1]

  cp_extra_counts:
        #cp_MethodHandle_count :UNSIGNED5[1]
        #cp_MethodType_count :UNSIGNED5[1]
        #cp_BootstrapMethod_count :UNSIGNED5[1]
        #cp_InvokeDynamic_count :UNSIGNED5[1]

  archive_special_counts:
        #band_headers_size :UNSIGNED5[1]
        #attr_definition_count :UNSIGNED5[1]

  class_counts:
        #ic_count :UNSIGNED5[1]
        #default_class_minver :UNSIGNED5[1]
        #default_class_majver :UNSIGNED5[1]
        #class_count :UNSIGNED5[1]
The order in which these counts occur parallels the order in which the constant pools themselves are transmitted in the archive. This order is called the definition order of the constant pools.

The four numeric constant pools are sized by cp_number_counts. They specify numbers used occasionally by ldc bytecodes. Because a minority of classes actually use such bytecodes, the sizes are optional, under the control of #have_cp_numbers.

Likewise, the last four constant pools are sized by cp_extra_counts. They specify linkage information for the invokedynamic instruction, and certain types of constants (method handles and method types). As with the numeric entries, these sizes are optional, under the control of #have_cp_extra_counts.

Every class file has a header that includes magic number and a minor and major version numbers. The magic number (0xCAFEBABE), being a fixed constant, is not transmitted in the Pack200 archive. However, the version numbers, which can vary somewhat, must be recorded.

In the expectation that particular version numbers will be prevalent, the archive header transmits default major and minor version numbers. Both of these numbers are given in UNSIGNED5 format.

Individual classes in the archive (as described in the section Attribute Bands) may optionally specify their own version numbers in a pseudo-attribute which overrides the #default_class_minver and #default_class_majver given in the archive header.

The count #band_headers_size gives the size in bytes of band_headers. The format of these bytes, which help define band coding specifiers for secondary codings, will be discussed much later, in the section Meta-Coding.

The archive header also specifies the number of attribute types (#attr_definition_count), class definitions (#class_count), nested class declarations (#ic_count). These numbers are used to size various other bands, as noted in the definition of those bands.

The arithmetic sum of all numbers in cp_counts must be less than the value 536870912 (2^29). A compressor is forbidden to transmit an archive for which the sum reaches or exceeds this limit. This constraint is intended to allow decompressors to use, internally, a unified numbering of constants, even if certain constants (such as demangled inner class names or implicit SourceFile names) must be added on the fly during decompression to the constant pool.

Note on implementation: The archive_header directly contains 3 numbers, while cp_counts contains at least 8 numbers and class_counts contains exactly 4. Therefore, the minimum size of the archive_header is 15 bytes, and this is always preceded by 4 bytes of archive_magic. A decompressor which wished to avoid any spurious read-ahead could read and buffer an initial block of 19 bytes, which would be certain to contain the #archive_size fields. (This assumes that the version numbers are small, as they are.) It could then immediately parse enough information to determine how many additional bytes of buffer storage would be required to scan the rest of the archive, at least up to the resource file images. By the time the resource file images in *file_bits must be parsed, the decompressor will have already read the *file_size bands, and will be able to remove any uncertainty originally present in #archive_size. (If the #archive_size fields are zero, the decompressor may be forced to read blindly up to the end of all data on the input channel in order to parse the archive.)

5.3. Constant Pools

The format defines sixteen independent constant pools, eleven of which correspond directly to the eleven basic types of constants found in Java class files. In the Pack200 archive format, they are organized in a fixed logical ordering called their definition order. This order determines their presentation in the archive's band structure, and also the construction of certain constant numberings.

The constant pools consolidate the information in the constant pools of all input class files. Each constant pool contains a single type of constant value. Each of the eleven constant pool types found in Java 6 class files is placed in its own constant pool. A twelfth pool holds signatures, which in class files are UTF8 strings that represent method and field types, but in Pack200 archives are a separately compressed data type.

Three more constant pools hold constants defined as part of the Java 7 classfile format (major version 51 or later). One more constant pool holds constants to be assembled into the BootstrapMethods attribute, which may be viewed as an appendix to the classfile constant pool.

The following table gives the sixteen predefined constant pools in their definition order. It also defines their correspondence with the constant types found in the Java class file format.

Name | class file element | class file tag | Purpose
cp_Utf8 | CONSTANT_Utf8_info | CONSTANT_Utf8 | basic string data
cp_Int | CONSTANT_Integer_info | CONSTANT_Integer | int constant
cp_Float | CONSTANT_Float_info | CONSTANT_Float | float constant
cp_Long | CONSTANT_Long_info | CONSTANT_Long | long constant
cp_Double | CONSTANT_Double_info | CONSTANT_Double | double constant
cp_String | CONSTANT_String_info | CONSTANT_String | String constant
cp_Class | CONSTANT_Class_info | CONSTANT_Class | class reference
cp_Signature | (see below) | (none) | method, field, or variable type
cp_Descr | CONSTANT_NameAndType_info | CONSTANT_NameAndType | pair of (name, type)
cp_Field | CONSTANT_Fieldref_info | CONSTANT_Fieldref | field reference
cp_Method | CONSTANT_Methodref_info | CONSTANT_Methodref | method call
cp_Imethod | CONSTANT_InterfaceMethodref_info | CONSTANT_InterfaceMethodref | interface call
cp_MethodHandle | CONSTANT_MethodHandle_info | CONSTANT_MethodHandle | method handle constant
cp_MethodType | CONSTANT_MethodType_info | CONSTANT_MethodType | method type constant
cp_BootstrapMethod | BootstrapMethods_attribute.bootstrap_methods[i] | (none; side table to constant pool) | bootstrap method specifier
cp_InvokeDynamic | CONSTANT_InvokeDynamic_info | CONSTANT_InvokeDynamic | invokedynamic call

(Note that the definition order for these constant pools is similar to the numeric ordering of the corresponding class file tag. For example, CONSTANT_Utf8 is the first tag, and cp_Utf8 is the first constant pool in the definition order. However, there are differences in detail. In particular, note that cp_String comes before cp_Class, even though the corresponding class file tags are in the reverse order.)

Each constant pool is logically a set of symbolic or numeric values, all of one type. In the Pack200 archive, it is structured as a sequence of such values, each with a unique index within the sequence. Elsewhere in the archive, whenever a constant must be mentioned, its index within the appropriate constant pool (or within a subset of a pool, or within a group of pools) is given.

Unlike the class file format, constant pool indexing in the Pack200 archive format starts at zero. In the rare places where null references are expected, the possibility is documented, and the null references themselves are encoded by a zero index, while all other index values are incremented by one. Where null references are not expected, they may still be encoded by the 32-bit index value -1.

Also unlike class files, there are no "gaps" or unused indexes associated with long or double values. Occasionally, we will refer formally to an element of a constant pool by using array notation. For example, the first three integers in the cp_Int constant pool are cp_Int[0], cp_Int[1], and cp_Int[2], and the last integer is cp_Int[cp_Int_count-1]. Note that both bands and constant pools are treated in this specification as arrays with zero origin.

It is illegal for a compressor to transmit the same constant twice. That is, all constant pool entries must be unique.

In a class file, with a few exceptions, constant pool references are strongly typed, in that every reference either is null or refers to a constant pool entry of a fixed tag associated with the context of the reference. The exceptions are ConstantValue attributes and operand fields of the ldc, ldc_w, and ldc2_w instructions.

However, because constant pools in a Pack200 archive are separately indexed, all constant references must be strongly typed, so that there is only one constant pool (or subset of a pool) into which any given index applies. This is accomplished either by deducing the constant type from context (in the case of ConstantValue attributes) or adding extra information to the context of the reference. (Within the bytecode stream, ldc is split out by constant type into distinct instructions sldc, ildc, etc.)

The layout of constant pool bands in the archive follows the definition order of the constant pools themselves. Each constant pool is represented in its turn by a sequence of one or more bands. The sequence of constant pool bands is therefore structured as follows:

  cp_bands:
        cp_Utf8
        *cp_Int :UDELTA5 [#cp_Int_count]
        *cp_Float :UDELTA5 [#cp_Float_count]
        cp_Long
        cp_Double
        *cp_String :UDELTA5 [#cp_String_count] (cp_Utf8)
        *cp_Class :UDELTA5 [#cp_Class_count] (cp_Utf8)
        cp_Signature
        cp_Descr
        cp_Field
        cp_Method
        cp_Imethod
        cp_MethodHandle
        *cp_MethodType :UDELTA5 [#cp_MethodType_count] (cp_Signature)
        cp_BootstrapMethod
        cp_InvokeDynamic

As can be seen here, constant pools whose entries can be derived from a single 32-bit integer or a single reference are represented as single bands. The other constant pools are represented as groups of bands. Each constant pool gives its name to a corresponding grammar element. The production of cp_bands declares the order of each band or group of bands that transmits the constants in the eponymous constant pool.

Note the use of UDELTA5 as primary encodings for several bands. Although the Pack200 file format does not require any particular ordering of values in constant pools, it is generally advantageous to order them so that the encoded values in bands using UDELTA5 are monotonically increasing. (Negative deltas can be encoded, although expensively, by UDELTA5. Also, a signed secondary encoding may be chosen by the compressor instead of UDELTA5.) The choice of primary encodings in this specification reflects an expectation that high-quality compressors, when presented with a choice of output orderings, will make choices that result in good use of primary band encodings.

In a few cases, several of the sixteen constant pools are combined into a group, so that indexes can be formed to refer to elements of the group as a whole. Such a group is completely defined by its constituent constant pools. An index into a constant pool group is always formed consistently with the overall order of the constituent constant pools, as well as with the internal order of each pool. For example, if a group cp_ABC is formed of three pools cp_A, cp_B, and cp_C of sizes COUNT(cp_A), COUNT(cp_B), and COUNT(cp_C), respectively, then a group index selects from one of the three pools depending on whether it is in the range 0 .. COUNT(cp_A)-1, COUNT(cp_A) .. COUNT(cp_A)+COUNT(cp_B)-1, or COUNT(cp_A)+COUNT(cp_B) .. COUNT(cp_ABC)-1, respectively. The size of the pool group is of course the sum of the constituent pools.

In some other cases, subsets of constant pools are indexed in an abbreviated fashion. An index into a constant pool subset is always formed consistently with the order of the pool itself. For example, the index 0 always refers to the first element of the subset, the index 1 refers to the second, and so on.

Here are definitions of the pool groups used in this specification.

Name | Constituents | Purpose
cp_All | (all sixteen pools) | generic references
cp_LoadableValue | cp_Int, cp_Float, cp_Long, cp_Double, cp_String, cp_Class, cp_MethodHandle, cp_MethodType | qldc operand, bootstrap method argument
cp_AnyMember | cp_Field, cp_Method, cp_Imethod | get or invoke operand, method handle component
The group cp_All comprises the sequence of all constants, in their natural order of occurrence within the Pack200 archive. Thus, an index into cp_All is in effect an untyped reference to any constant.
5.3.1. Scalar Constants
The encoding of the cp_Utf8 constant pool will be described shortly. First we will describe the coding of the numeric, string, and class constant pools.

The values in the cp_Int constant pool are directly represented by the values encoded in its band. The values in the cp_Float constant pool are obtained as if by applying java.lang.Float.intBitsToFloat to the 32-bit values encoded in its band.

The 64-bit values of the cp_Long band are obtained by adjoining, as high and low words, corresponding 32-bit values from the two bands cp_Long_hi and cp_Long_lo. (They contain the high and low words, respectively.) Likewise, the values of the cp_Double band are obtained by first adjoining high and low words from two other bands, and then retyping the resulting 64-bit integers as if by applying java.lang.Double.longBitsToDouble. The high and low words are in the bands cp_Double_hi and cp_Double_lo, respectively.

  cp_Long:
        *cp_Long_hi :UDELTA5 [#cp_Long_count]
        *cp_Long_lo :DELTA5 [#cp_Long_count]

  cp_Double:
        *cp_Double_hi :UDELTA5 [#cp_Double_count]
        *cp_Double_lo :DELTA5 [#cp_Double_count]

When floating point values are eventually written to class files, their bits must be accurately stored, as if they were processed by java.lang.Float.floatToRawIntBits or java.lang.Double.doubleToRawLongBits. In this way "NaN" values are transmitted faithfully, without normalization.

(Note: Although it would be possible to extend the band-coding techniques of Pack200 to encode 64-bit values directly, this file format always transmits 64-bit values as pairs of 32-bit values, transmitted in pairs of bands. This simplifies implementations, allowing them to process band data with 32-bit data paths.)

Each string in a cp_String constant pool is represented in its band by a reference to the string's spelling, as a cp_Utf8 constant.

Likewise, each class in a cp_Class constant pool is represented in its band by a reference to the class's spelling, as a cp_Utf8 constant. (As in the class file and the VM, the spelling uses the slash character to delimit package prefix components.)

5.3.2. Utf8 Constants
Each value in the cp_Utf8 constant pool is an array of zero or more 16-bit Java characters. (The name "Utf8" is an anachronism, referring only to the basic character string type in Java class files. No part of the Pack200 file format uses any UTF encoding, but the term "Utf8" is retained to emphasize the connection with class files.) As in the class file format, all character string data is transmitted in this one kind of constant pool entry. When the context is clear enough, we loosely refer to these arrays as "strings", even though they are distinct from the Java constants in the cp_String constant pool.

If cp_Utf8 is not empty, its first value is always the empty string. Thus, the empty string is always given an index of zero. No band values are transmitted to represent this empty string. (Values in the bands cp_Utf8_prefix and cp_Utf8_suffix pertain to strings after the empty string in cp_Utf8.) Because constants cannot be duplicated, all other elements of cp_Utf8 contain at least one character.

Each string in the cp_Utf8 constant pool is represented in the archive file in two parts, a prefix and a suffix. The suffix is represented both by a count and a sequence of character codes. The prefix is represented only by a count; the characters of the prefix are duplicated from the previous string. This technique allows the compressor (if it chooses) to represent strings by means of their successive differences. The first suffix value and the first two prefix values are suppressed in the transmitted archive. The values, if transmitted, would always be zero, since the first cp_Utf8 string is always empty, and the second string can never share a non-empty prefix with the first string.

Each suffix is transmitted in exactly one of two ways, as a small suffix or a big suffix. Small suffixes are transmitted contiguously in one large band. Big suffixes are rare; they are intended as a way to compactly transmit strings with unusual statistics, such as strings which are really tables of numeric data. Each big suffix is transmitted in its own band. This allows the compressor the option to choose an efficiently customized secondary coding for the characters in each large, unusual string.

  cp_Utf8:
        *cp_Utf8_prefix :DELTA5      [MAX(0,#cp_Utf8_count-2)]
        *cp_Utf8_suffix :UNSIGNED5   [MAX(0,#cp_Utf8_count-1)]
        *cp_Utf8_chars :CHAR3        [SUM( *cp_Utf8_suffix )]
        *cp_Utf8_big_suffix :DELTA5  [COUNT(0, *cp_Utf8_suffix )]
        (*cp_Utf8_big_chars :DELTA5)
          ** length(cp_Utf8_big_suffix)  [SUM( *cp_Utf8_big_suffix )]
(Note: It is helpful, but not required by this specification, to order the strings lexicographically and find maximal common prefixes between adjacent strings. It is permissible to ignore the prefix sharing feature and declare all prefixes to be zero.)

The band cp_Utf8_suffix contains one less than #cp_Utf8_count elements. It specifies, in order, the small suffix length of each constant pool string (except the implicit first string, which is empty). The band cp_Utf8_prefix contains two less than #cp_Utf8_count elements. It specifies, in order, the prefix length of each constant pool string (except the first two strings, which always have zero prefix lengths). The prefix length encodes the length of a prefix substring shared by both cp_Utf8[i-1] and cp_Utf8[i]. If there are fewer than three strings in cp_Utf8, then cp_Utf8_prefix is empty. The prefix length is typically a large proportion (sometimes half) of the total length.

Each value in the band cp_Utf8_chars is a 16-bit number expressing a Java character. This band contains the characters of all small suffixes, in order. For each successive string, cp_Utf8_chars contains an additional run of values encoding the characters of its small suffix, if any. Therefore, the total length of this band is the sum of all values in the cp_Utf8_suffix band.

Whenever a small suffix length for a constant pool entry is zero, the string has no small suffix, but a big suffix instead. The length of each big suffix is given by an element of the cp_Utf8_big_suffix band. (Therefore, the length of this band is precisely the count of zero values in the cp_Utf8_suffix band.) Each big suffix is transmitted as a separate band of 16-bit character values, one band element per character. There is one such band per big suffix. These bands immediately follow the cp_Utf8_big_suffix band, and are collectively called the cp_Utf8_big_chars bands. Although normally data of the same type are collected into a single band, these strings are placed in separate bands so that they may be independently encoded. These strings typically encode arrays of binary data, rather than true Java characters.

A big suffix can have a length of zero, which means that the constant pool entry is a non-empty prefix of the previous string. In such a case, the corresponding suffix band will occupy no space in the archive file, since bands of zero length occupy no bytes at all.

Please see the Appendix section Representation of cp_Utf8 Constant Pool for pseudo-code explaining this concept.

5.3.3. Type Signatures
Each cp_Signature constant pool entry represents a type string, exactly as field and method types are declared in the class file format. Although the class file format uses simple Utf8 constant pool entries for such strings, the Pack200 file format allocates a separate constant pool for them, in order to use more compact representation than for general strings.

Signature constants are special in that they can contain embedded references to cp_Class constants. The signature constant is equivalent to a Utf8 constant, once the embedded class references are expanded into their spellings. Signature constants are flexible enough to represent arbitrary strings, but are intended for strings that often contain class names following the capital letter ell 'L'. These include field, method, and local variables types, and generic Signature attributes.

Each signature string is decomposed into a form and a sequence of zero or more class references. The class references are obtained by locating in the original signature string all sequences that match the pattern "L classname", removing the classname part, and treating it as a reference into the cp_Class constant pool. The form is defined as the residue after the class names have been removed from the original string.

The form is not allowed to contain any occurrences of the letter ell ('L'), other than those which mark removed class names.

Thus, the form will contain the character 'L' wherever the original type string refers to a class. By counting the number of these characters in a form, the decompressor may deduce the number of classes to which the original type string refers. This number is called the class length of the form.

Note that cp_Class constants are not required to refer to existing classes, nor are they even required to have valid class name spellings. Therefore, the compressor has considerable latitude in choosing which class names (if any) it will extract from signature strings. In an extreme case, the compressor can make each form identical to its corresponding signature string, and simply satisfy its class length by emitting references to a fictitious class with an empty name. (This class length would have to include any occurrences of 'L' in the class names themselves.)

Note also that these encoding rules do not require a class name to be followed by any particular character, although it will generally be a semicolon, or perhaps a left-angle bracket, in the case of an instance of a generic type in a Signature attribute.

The rules also allow the compressor to decide, arbitrarily, how many characters (if any) after each letter ell 'L' will be transmitted as part of a class name. Therefore, a given signature string may be representable by several forms, any of which the decompressor must be prepared to process.

Here are some examples:

Type Signature String | Form | Class Len. | Class...
F | F | 0 |
[Z | [Z | 0 |
[[[LLL; | [[[L; | 1 | LL
[[[LLL; | [[[LLL; | 3 | (empty), (empty), (empty)
([Ljava/lang/String;)V | ([L;)V | 1 | java/lang/String
Ljava/util/List<Lpkg/Item;>; | L<L;>; | 2 | java/util/List, pkg/Item
(Ljava/lang/String;II)Lpkg/Item; | (L;II)L; | 2 | java/lang/String, pkg/Item
Ljava/util/List<Ljava/lang/Byte;>; | L<L;>; | 2 | java/util/List, java/lang/Byte
<ELEM:>(Ljava/util/List<TELEM;>;)TELEM; | <EL:>(L<TEL;>;)TEL; | 1 | EM, java/util/List, EM, EM
ALLOWABLE | ALLOWABLE | 3 | (empty), (empty), (empty)
ALLOWABLE | AL | 1 | LOWABLE
ALLOWABLE | ALABL | 2 | LOW, E

The forms of all strings in the cp_Signature constant pool are given in order in the cp_Signature_form band, as one cp_Utf8 reference per signature string. For each form, the class-length sequence of classes required to reconstitute the signature string is transmitted as a run of cp_Class references in the cp_Signature_classes band. As a consequence of these definitions, the length of the cp_Signature_classes band is the total number of letter ell 'L' occurrences in the sequence of spellings of forms mentioned in cp_Signature_form.

  cp_Signature:
        *cp_Signature_form :DELTA5 [#cp_Signature_count](cp_Utf8)
        *cp_Signature_classes :UDELTA5 [COUNT('L',...)] (cp_Class)

Please see the Appendix section for Representation of cp_Signature Constant Pool pseudo-code explaining this concept.

5.3.4. Tuple Constants
The next four constant pools contain ordered pairs of various kinds of values (types, names, strings, or classes). Each cp_Descr constant is an ordered pair of a name (represented as a cp_Utf8 reference) and a type (represented as a cp_Signature reference). These references are transmitted in corresponding elements of the cp_Descr_name and cp_Descr_type bands.

Likewise, each cp_Field, cp_Method, or cp_Imethod constant is an ordered pair of a class (represented as a cp_Class reference) and a name-and-type descriptor (represented as a cp_Descr reference). Again, these references are transmitted in corresponding elements of the associated bands.

  cp_Descr:
        *cp_Descr_name :DELTA5 [#cp_Descr_count] (cp_Utf8)
        *cp_Descr_type :UDELTA5 [#cp_Descr_count] (cp_Signature)
  cp_Field:
        *cp_Field_class :DELTA5 [#cp_Field_count] (cp_Class)
        *cp_Field_desc :UDELTA5 [#cp_Field_count] (cp_Descr)
  cp_Method:
        *cp_Method_class :DELTA5 [#cp_Method_count] (cp_Class)
        *cp_Method_desc :UDELTA5 [#cp_Method_count] (cp_Descr)
  cp_Imethod:
        *cp_Imethod_class :DELTA5 [#cp_Imethod_count] (cp_Class)
        *cp_Imethod_desc :UDELTA5 [#cp_Imethod_count] (cp_Descr)
5.3.5. Extra Constants
For additional constant pools define symbolic references for invokedynamic instructions and related entities. (These constant pools are only non-empty if their corresponding counts are non-zero, which in turn can only be true if cp_extra_counts is present.) Each cp_MethodHandle is an ordered pair of a reference kind (a small integer) and a reference to an element of cp_Field, cp_Method, or cp_Imethod. (This reference is transmitted as an index into cp_AnyMember, which is defined above as a pool group containing those three pools.) Each cp_MethodType is represented as a cp_Signature reference. Each cp_InvokeDynamic is an ordered pair of a bootstrap method specifier (represented as a cp_BootstrapMethod) and a type (represented as a cp_Signature reference). Each cp_BootstrapMethod specifier is an ordered pair of a bootstrap method reference (represented as a cp_MethodHandle) and a counted series of zero or more constant pool references to constants which can be loaded onto the JVM stack. (These references are transmitted as indexes into the pool group cp_LoadableValue.) All these values and references are transmitted in associated bands as described below.
  cp_MethodHandle:
        *cp_MethodHandle_refkind :DELTA5 [#cp_MethodHandle_count]
        *cp_MethodHandle_member :UDELTA5 [#cp_MethodHandle_count] (cp_AnyMember)
  cp_BootstrapMethod:
        *cp_BootstrapMethod_ref :DELTA5 [#cp_BootstrapMethod_count] (cp_MethodHandle)
        *cp_BootstrapMethod_arg_count :UDELTA5 [#cp_BootstrapMethod_count]
        *cp_BootstrapMethod_arg :DELTA5 [SUM(*BootstrapMethod_arg_count)] (cp_LoadableValue)
  cp_InvokeDynamic:
        *cp_InvokeDynamic_spec :DELTA5 [#cp_InvokeDynamic_count] (cp_BootstrapMethod)
        *cp_InvokeDynamic_descr :UDELTA5 [#cp_InvokeDynamic_count] (cp_Descr)

5.4. File Attributes

Since a JAR archive consists of a sequence of files, each with contents and a few other attributes, the Pack200 archive can also represent a sequence of files with their attributes. Of course, the contents of class files are specially transmitted, but whether a file (i.e., a JAR archive element) contains a class or another resource, the Pack200 archive is able to transmit the following attributes:
  • name of file (optional for classes)
  • contents of file (optional for classes)
  • modification time of file (optional)
  • deflation hint for file (optional)
  • order of file in archive (optional for classes)

A class file whose contents are compressed by Pack200 is marked as a "stub" with a special option bit. A class stub file must be declared to have a length of zero. It may be declared to have the empty string for its name. If there are not enough class stub files transmitted to match with the number of classes transmitted, the decompressor must act as if the compressor had transmitted an additional series of trivial stubs, with no name or contents, and modification time and deflation hint copied from the archive header.

Each resource file is transmitted in the Pack200 archive as a simple bytewise image, under a relative pathname using slash '/' as a directory separator. (This is the same pathname convention as is used in ZIP archives.) Each file (both resource files and class files) can optionally be associated with a deflation hint and a modification date.

  file_bands:
        *file_name :UNSIGNED5 [#file_count] (cp_Utf8)
        *file_size_hi :UNSIGNED5 [#file_count*(#have_file_size_hi)]
        *file_size_lo :UNSIGNED5 [#file_count]
        *file_modtime :DELTA5 [#file_count*(#have_file_modtime)]
        *file_options :UNSIGNED5 [#file_count*(#have_file_options)]
        *file_bits :BYTE1 [SUM(*file_size)]

There are no additional file attributes, such as comments, extra attributes, or CRC values. An application which requires such attributes on some files may encode those files into an appropriate archive file format (such as ZIP), and transmit those archives as resource files in a Pack200 archive.

Each file name is transmitted as an element of the file_name band, and each length (in bytes) is transmitted in the corresponding elements of the file_size_lo band and (if present) the file_size_hi band. All three bands are of length #file_count, except that file_size_hi has zero elements if the have_file_size_hi bit in the #archive_options is clear.

The length in bytes of each file is the corresponding unsigned 32-bit value taken from the file_size_lo band, if the file_size_hi band is empty. Otherwise, the file length is the unsigned 64-bit value composed of the corresonding unsigned 32-bit elements of the file_size_lo and file_size_hi bands, where the former value is the low-order 32-bit word and the latter value is the high-order 32-bit word.

The bytes of all non-class (i.e., resource) files follow immediately in the file_bits band. Each file is given as a corresponding run of byte values.

The optional band file_modtime, if not empty, supplies a modification time for each resource file (and potentially for class files, if class file stubs are present). Each integer value gives a difference (in seconds) from the #archive_modtime value. (Therefore, if the #archive_modtime value is zero, the individual file times must be interpreted as absolute values.) The order of transmission of file_modtime is consistent with file_name. This band is empty if the have_file_modtime bit in the #archive_options is clear.

The optional band file_options, if not empty, supplies flag bits for each resource file (and potentially for class files, if class file stubs are present). This band is empty if the have_file_options bit in the #archive_options is clear. Each file_options word is interpreted bitwise. Certain bits are given symbolic names as follows, where the LSB is numbered as bit zero:

Bit | Name | Purpose
0 | deflate_hint | request compressed JAR file element
1 | is_class_stub | this file contains class bytecodes

If deflate_hint (the LSB) is set, the decompressor is requested (but not required) to reduce the size of its output. For example, if it produces a JAR file, it may deflate the JAR elements. Since the deflate_hint bit in the #archive_options word has the same effect, the two bits are in effect combined with a logical OR for each file. If is_class_stub (the second LSB) is set, this resource file description is actually a stub, and the file contents are defined as the bytecodes of one of the classes defined in the Pack200 archive. Other bits in the file options must be zero and are reserved for future use.

If a transmitted file is marked as a class stub, its contents must be transmitted as if the file were empty. (That is, file_size_hi and file_size_lo must both be zero, and there may not be any corresponding bytes in file_bits.) The decompressor is required to supply contents for the resource file by reconstituting the contents of a class file for a class transmitted in class_this, etc. Like any other resource file, the class stub is allowed to have a name, a modification time and a deflate_hint.

The class stubs and classes correspond in order. Define the derived parameter #class_stub_count as the number of files marked as class stubs. (It is also the count of is_class_stub bits set in file_options.) Then #class_stub_count must be no larger than #class_count. The first class stub defines a file which receives bytecodes for the first class, and so on. Although a class stub has a name (transmitted in file_name), this name may be the empty string. In this case, the decompressor is required to use the standard name for the class file, which is created from the class's bytecode name (using slash '/' for a package separator) by appending the string ".class". (Thus, a classfile can have an arbitrary non-standard name, but the compression works best if its name is derived from its class in the usual way.)

If #class_count is larger than #class_stub_count, then the decompressor must behave as if a sufficient number of trivial extra class stubs were transmitted after the last explicit file. These trivial stubs have an empty name string and a zero deflate_hint or file_modtime.

Thus, in the simple case where there are no class stubs at all (perhaps because have_file_options is zero), the decompressor must produce its files in their transmission order, followed by the transmission order of the classes. Each class file must have its standard name, and a modification time and deflation hint inherited from #archive_modtime and the deflate_hint bit in #archive_options. But at the cost of extra transmission size, the compressor can direct the decompressor to present the resources and class files in any fixed order, with arbitrary names, modification times, and deflation hints for each output file. The decompressor must honor this ordering, if its output is in a form (such as a JAR archive) where order is significant.

Compressors are free, unless otherwise directed, to choose any ordering of files. It is often advantageous to place files with similar statistics next to each other, so that the post-pass compressor (if any) may process their contents together (in the same window, in the case of the DEFLATE algorithm). It is likely that a compressor which is able to reorder its input files for efficient transmission will have a command option which forces it to retain the order in which input files were presented, because this order is significant to some (but not all) deployment applications.

Compressors are free to transmit class files as if they were resource files. This provides a way to transmit class files which must be preserved bit-for-bit, or which compressors cannot transmit compressed with sufficient accuracy. Decompressors are required to accept class files transmitted "bitwise" as resource files.

Note: The bands controlling files and their attributes are transmitted last in the archive, in order to ease decompressor implementation slightly, since the last thing a decompressor does is to assemble output files. In particular, resource files can be of arbitrary size, and placing their bits at the end of the archive allows the decompressor to avoid allocating temporary storage for them.

5.5. Flags and Attributes

The Pack200 file format directly supports up to 16 modifier bits in all output flags fields, as defined by the class file format. It also directly supports certain predefined attributes, such as Code, InnerClasses, and ConstantValue It is also possible for the compressor to define additional attributes, passing enough information to the decompressor to properly extract their data from bands and reconstitute them in class files. The presence or absence of all attributes is controlled by the setting of certain bits in flag bands.

Five sets of flag bands carry modifier bits and/or attribute control bits. The ic_flags band carries modifier bits for nested classes. Also, modifier and attribute control bits are carried by class_flags_lo, field_flags_lo, method_flags_lo, and code_flags_lo, and the four corresponding optional high word bands, class_flags_hi, field_flags_hi, method_flags_hi, and code_flags_hi. (There is no high word for ic_flags.) Each value in these bands is interpreted as an unsigned 32-bit binary number. Each bit in these bands independently specifies the presence of a Java access modifier (such as ACC_PRIVATE), or of a class, field, method, or code attribute (such as Deprecated or SourceFile), or of some other necessary control information (such as whether a class file has a non-default version number).

Every class (resp. field, method, Code attribute) has a corresponding flags value of up to 63 bits transmitted in class_flags_lo (resp., field_flags_lo, method_flags_lo, code_flags_lo) and optionally in class_flags_hi (resp., field_flags_hi, method_flags_hi, code_flags_hi). These flags values, assembled into 64-bit numbers, are named class_flags (resp., field_flags, method_flags, code_flags). Except for Code attributes, each of the low sixteen flag bits may be used to transmit access flags. The high sixteen bits (or forty-seven, if the optional high word is transmitted) are used to indicate the presence of attributes, either predefined or compressor-defined. The sixty-fourth bit position of a flags value (if transmitted) is reserved and must be zero.

The flags value for a Code attribute is optional and taken to be zero if missing. A Code attribute has a corresponding flags value transmitted if and only if either the have_all_code_flags bit in the #archive_options is set, or else the element of code_headers corresponding to the Code attribute has the special value zero. (See the discussion of code headers in the section Class Schema.)

For classes, nested classes, fields, and methods, the assignment of flag bit positions to modifiers is the same as that in the class file format. (For example, the LSB always represents ACC_PUBLIC, in both Pack200 archive and class file formats.) An overflow attribute is an attribute whose presence is not indicated directly via a flag bit, and but is instead indicated by a occurrence of its index in a separate band. For classes, fields, methods, and codes, bit 16 (as set in the mask 0x0001000) indicates the presence of overflow attributes. For nested classes, flag bit 16 indicates the presence of explicit outer class and name fields, as explained in the section Nested Classes.

Bit | Meaning
0 | ACC_PUBLIC
1 | ACC_PRIVATE
2 | ACC_PROTECTED
3 | ACC_STATIC
4 | ACC_FINAL
5 | ACC_SYNCHRONIZED (ACC_SUPER)
6 | ACC_VOLATILE (ACC_BRIDGE*)
7 | ACC_TRANSIENT (ACC_VARARGS*)
8 | ACC_NATIVE
9 | ACC_INTERFACE
10 | ACC_ABSTRACT
11 | ACC_STRICT
12 | ACC_SYNTHETIC
13 | ACC_ANNOTATION
14 | ACC_ENUM
16 | overflow (more band data elsewhere)
5.5.1. Assignment of Flag Bits to Attributes
The assignment of flag bit positions to attributes is done at the option of the compressor, and is independently specified by the compressor for the four kinds of flag words that have to do with attribute-carrying objects (in classes, fields, methods, and codes). When a flag bit position is assigned to an attribute, if that bit is visible in the class file, it must be forced clear before the decompressor writes it to the class file. Therefore, if the compressor expects the decompressor to reproduce a particular non-zero flag bit as output, the compressor must refrain from assigning that bit position to attributes.

In particular, the low-order 16 bits of class, field, and method flags are visible in the class file, and can thus carry modifier bits. None of the bits of a code flags word is visible in the class file; these flag bits are used only for code sub-attributes.

By contrast, the low-order 16 bits of nested class records are used solely for modifiers, since nested class records do not contain attributes. In the rest of this section on attributes, we will disregard the flag words associated with nested class records.

Any of the 63 bit positions in a flags value can be assigned by the compressor to indicate to the decompressor the presence of some particular attribute. The compressor may "take over" a modifier bit by assigning it an attribute definition. (This is done by emitting a definition for the attribute, which mentions that bit position.)

If the compressor "takes over" a bit (modifier or not) that is being used by default for another purpose, the bit loses its previous meaning. However, the compressor may not emit an explicit definition for the same bit twice (in the same context).

Each kind of attribute is defined by four pieces of information: the entity to which it applies (class, field, method, or code), the bit position, if any, to which it is assigned, the name of the attribute (as it appears in the class file), and the layout of the attribute (which allows the decompressor to properly format occurrences of the attribute in the class file). It is an error for the compressor to specify the same name and layout twice in the same context. It is not an error to repeat a name with a different layout, or a layout with a different name.

The first two items are bit-encoded into a single-byte "header", and transmitted in the attr_definition_headers band. The last two items are transmitted as cp_Utf8 references in corresponding elements of the attr_definition_name and attr_definition_layout. Thus there are three bands by which the compressor declares attribute types to the decompressor, and each band is of length #attr_definition_count.

  attr_definition_bands:
        *attr_definition_headers :BYTE1 [#attr_definition_count]
        *attr_definition_name :UNSIGNED5 [#attr_definition_count] (cp_Utf8)
        *attr_definition_layout :UNSIGNED5 [#attr_definition_count] (cp_Utf8)

The least significant two bits of an attribute definition header byte are treated as an unsigned field, and give the attribute's context type, which is type of entity to which the attribute applies:

(h & 0x03) | Context Type
0 | attribute applies to classes
1 | attribute applies to fields
2 | attribute applies to methods
3 | attribute applies to Code attributes

The most significant six bits of an attribute definition header byte are treated as an unsigned field, and give the optional bit position to which the attribute is assigned in the flags word.

(h >> 2) | Flag Bit Assignment
0 | overflow attribute, not assigned to any bit
1 | attribute assigned to bit 0 (LSB of lo word)
2 | attribute assigned to bit 1
3 | attribute assigned to bit 2
... |
32 | attribute assigned to bit 31 (MSB of lo word)
33 | attribute assigned to bit 32 (LSB of hi word)
... |
63 | attribute assigned to bit 62
(no value) | bit 63 must be zero (MSB of hi word)

Every class attribute, whether predefined in this specification or explicitly defined by the compressor, has a unique number called its attribute index. If the attribute is assigned a flag bit, then its attribute index is identical to the flag bit's position (a number in [0..62]). (All predefined attributes are assigned a flag bit by default.)

If a class attribute is not assigned a flag bit, it is an overflow attribute, and its index is assigned sequentially in the order in which class attributes are defined (i.e., transmitted). The first index to be assigned sequentially in this way is 32 if #have_class_flags_hi is clear, and 63 if it is set. These indexes are used within the archive to declare attribute occurrences for individual classes.

Likewise, field, method, and code attributes are assigned their own attribute indexes, independently of class attributes and of each other. Therefore, an attribute (i.e., a name and layout pair) is uniquely specified within the archive by its context type and attribute index. The field and method attributes may be assigned to flag bits, or else they are overflow attributes with indexes of 32 or larger. Like other attributes, code attributes may be assigned explicit numbers or implicitly assigned indexes starting with 32. (As with class attributes, if the high flag word bands are selected by the appropriate bit of #archive_options, then field, method, or code overflow attributes have indexes of 63 or larger.)

Some attributes are predefined, and do not require the compressor to emit definitions for them. They have implicitly defined layouts and flag bit assignments (i.e., indexes).

Attribute indexes less than 63 are usable in all cases, but they may conflict with those assigned to predefined attributes, including predefined attributes defined (in the range 16 to 62) in future expansions of the Pack200 format. In the present version, all predefined attributes have indexes in the range [17..31], so that modifier flags are not taken over by default, and high flag words do not need to be used routinely.

Here are the names and index assignments of the predefined attributes. (The predefined layouts are given below.)

Index | Context Type | Name
16 | C,F,M | (overflow attributes)
17 | Class | SourceFile
18 | Class | EnclosingMethod
19 | C,F,M | Signature
20 | C,F,M | Deprecated
21 | C,F,M | RuntimeVisibleAnnotations
22 | C,F,M | RuntimeInvisibleAnnotations
23 | Class | InnerClasses
24 | Class | "class-file version"
17 | Field | ConstantValue
17 | Method | Code
18 | Method | Exceptions
23 | Method | RuntimeVisibleParameterAnnotations
24 | Method | RuntimeInvisibleParameterAnnotations
25 | Method | AnnotationDefault
26 | Method | MethodParameters
27 | C,F,M,Code | RuntimeVisibleTypeAnnotations
28 | C,F,M,Code | RuntimeInvisibleTypeAnnotations
0 | Code | StackMapTable
1 | Code | LineNumberTable
2 | Code | LocalVariableTable
3 | Code | LocalVariableTypeTable
16 | Code | (overflow attributes)

Bit 16 is predefined as an indicator of the presence of overflow attributes for classes, fields, methods, and codes. If an entity has overflow attributes, it will possess a corresponding count in an "attr_count" band, and each overflow attribute will be part of a run of values in an "attr_indexes" band, which specifies the layouts of the overflow attributes. This processing of overflow attributes is described more fully in the section Attribute Bands.

These predefined attribute indexes determine not only which bit positions are used to select those attributes, but also the fixed band order in which the attribute data are transmitted, as described in the section Attribute Layout Definitions.

Certain bits are predefined to support the five types of metadata attributes on classes, fields, and methods, RuntimeVisibleAnnotations, RuntimeInvisibleAnnotations, RuntimeVisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations, and AnnotationDefault. (The last three types apply only to methods.) The meaning and format of these attributes is defined by JSR 175. Similarly type metadata attributes RuntimeVisibleTypeAnnotations and RuntimeInvisibleTypeAnnotations on classes, fields, methods and code, are predefined. The meaning and format of these attributes are defined and described by JSR 308.

It is permissible for a compressor to refrain from setting bits in any flag words except for bit 16, and transmit all attribute layout indexes explicitly in class_attr_indexes or a similar band. Decompressors are required to process either kind of occurrence of an attribute index. (It is also permissible, though useless, for an attribute count to be an explicitly transmitted as zero.) Compressors are encouraged to make clever choices and clear bit 16 and set other assigned flag bits when possible.

Note that none of the predefined bits interfere with any present or future flag bits in the 16-bit flag values stored in the class file format. However, compressors are free to reuse one of the low-order 16 bits of the flags word, by binding them to other attributes, if no file actually sets them.

The InnerClasses attribute is treated specially, as documented in the section Nested Classes, and it is an error for the compressor to emit an attribute definition for it in the class context. The Code attribute is also treated specially. It is an error to emit an attribute definition for it in the method context.

This specification does not define how a compressor is informed of the existence or format of attributes which are not predefined. It simply assumes that compressors are informed of such attributes, and it requires that compressors properly transmit this information to decompressors. As a special case, it is reasonable for any compressor to transmit an attribute containing no bytes (i.e., of zero length) as if its layout were known to be the empty string.

5.5.2. Attribute Layout Definitions
Attribute layouts govern the compressor as it parses attribute bodies from class files into collections of scalar values. Layouts also govern the decompressor as it decodes transmitted bands of those scalar values, and stores them, correctly formatted, into class files. For example, when a class file stores an unsigned integer in two bytes (in big-endian order) in an attribute, the decompressor uses a layout declaration to this effect, so that it can take a band element (which is a 32-bit integer that in this case happens to be less than 65536) and store it correctly into a class file. The transmission of such an integer is very different from the transmission of a constant pool reference, even though they appear as undifferentiated bytes in the class file format.

In what follows, we say that some given element of an attribute layout governs a scalar value stored in a class file attribute, if the decompressor must use that element to reconstitute, into a class file, the representation of that scalar value. We also say that the given layout element governs the band in which the scalar value is transmitted.

An attribute layout is defined by a string in a "little language". The string must be parsed by the decompressor into a sequence of layout elements, each of which governs the transmission and storage of attribute values. In particular, the layout declares the locations of all constant pool references, allowing their values to be transmitted with appropriate representations, either as constant pool indexes or else some other sort of number.

The simplest usable attribute layout would be a sequence of constant pool reference declarations, intermixed with one-byte declarations to govern everything else, and compressors are free to use such layouts to describe attributes. However, more specific attribute layouts lead to better compression.

Attributes typically contain constant pool references and small integers. They often contain integers which control the replication of subsequent patterns. Constant pool references are strongly typed where possible, and the encoding provision for null references must be declared also. Small integers which encode flag bits or bytecode indexes are also declared as such, so that special encoding techniques may be used on them.

Layout declarations are UTF8 strings formed according to the following grammar. (This grammar is independent of the grammar which describes band structure, or any other grammar appearing in other parts of this specification.)

  attribute_layout:
        ( layout_element )* | ( callable )+
  layout_element:
        ( integral | replication | union | call | reference )

  callable:
        '[' body ']'
  body:
        ( layout_element )+

  integral:
        ( unsigned_int | signed_int | bc_index | bc_offset | flag )
  unsigned_int:
        uint_type
  signed_int:
        'S' uint_type
  any_int:
        ( unsigned_int | signed_int )
  bc_index:
        ( 'P' uint_type | 'PO' uint_type )
  bc_offset:
        'O' any_int
  flag:
        'F' uint_type
  uint_type:
        ( 'B' | 'H' | 'I' | 'V' )

  replication:
        'N' uint_type '[' body ']'

  union:
        'T' any_int (union_case)* '(' ')' '[' (body)? ']'
  union_case:
        '(' union_case_tag (',' union_case_tag)* ')' '[' (body)? ']'
  union_case_tag:
        ( numeral | numeral '-' numeral )
  call:
        '(' numeral ')'

  reference:
        reference_type ( 'N' )? uint_type
  reference_type:
        ( constant_ref | schema_ref | utf8_ref | untyped_ref )
  constant_ref:
        ( 'KI' | 'KJ' | 'KF' | 'KD' | 'KS' | 'KQ' | 'KM' | 'KT' | 'KL' )
  schema_ref:
        ( 'RC' | 'RS' | 'RD' | 'RF' | 'RM' | 'RI' | 'RY' | 'RB' | 'RN' )
  utf8_ref:
        'RU'
  untyped_ref:
        'RQ'

  numeral:
        '(' ('-')? (digit)+ ')'
  digit:
        ( '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' )

Each occurrence of an attribute in a class file is associated (by the compressor) with a corresponding layout definition which describes accurately the meaning of that attribute's bytes. The compressor must assign each format element its own band for transmitting successive values of that format element. In the case of the predefined attributes, the bands assigned to their layout elements are defined by name in this specification.

Each value governed by an attribute layout element is converted by the compressor into a 32-bit value and transmitted as an element of a band uniquely created for and governed by that layout element. For integral layout elements, the conversion simply represents the number stored in the class file under the given type, while reference elements convert a local constant pool reference (local to the class file, that is) into a global, typed reference within the archive.

Multiple occurrences of the same kind of layout element are regarded as distinct layout elements. Also, bands are never shared by layouts. Therefore, every new layout definition transmitted by the compressor implicitly defines its own set of bands. Reassigning an previously defined attribute layout to a new index creates a new set of bands; it does not reuse the previously defined sets of bands.

If the compressor defines new attributes, it must also create the bands they govern. It must transmit these bands, immediately after the place reserved in the band grammar for predefined attributes (at the end of class_attr_bands, field_attr_bands, method_attr_bands, or code_attr_bands). The ordering of these bands must correspond to the definition order of the attribute layout elements that govern them. In this way, the decompressor will be able to find those attribute values.

The definition order of two layout elements in the same attribute layout string corresponds to their order of occurrence within that string. The definition order of two layout elements not in the same attribute layout string corresponds to the index order of their layout definitions in the attr_definition_layout band. (That is, bands for layouts with lower indexes precede bands for layouts of the same context type but with higher indexes. This is true even if the lower-indexed layout happens to be defined later in the attr_definition_layout band.) Note that the bands governed by predefined attributes appear to follow such an ordering also. However, the bands of predefined class attributes precede all the other class attribute bands, and likewise for fields, methods, and code attributes.

Integer values stored in attributes are sized as 1, 2, or 4 bytes, depending on the use of the format character 'B', 'H', or 'I', respectively. A integer type is normally unsigned but prefixed with 'S' becomes signed. This signing governs the lengthening of 1-byte and 2-byte types to 32-bit values (either sign extension or zero filling). It also determines the primary encoding used to transmit the 32-bit values. Because all integers stored in class files are "big-endian", all integral format elements refer to integers coded with higher-order bits in earlier bytes.

Integral layouts (i.e., those elements under the integral nonterminal) govern signed or unsigned integer values. Integral layouts whose declarations include the 'P' or 'O' characters use special primary encodings (BCI5 or BRANCH5) as described below. Any other integral layouts whose declarations include the 'S' character govern bands with a primary encoding of SIGNED5. Unsigned integer and flag layout elements govern bands with a primary encoding of UNSIGNED5, except that the integer layout 'B' (unsigned byte) governs a band with a primary encoding of BYTE1.

(Note that there is no special encoding for signed bytes. If an attribute contains a signed byte field, it may be just as well to treat that field as if it were unsigned, and give it a plain 'B' layout element. Besides completeness, the 'SB' layout is intended to allow small-magnitude one-byte integers to be transmitted using a byte alphabet in which sign bits are rare. This is desirable when the post-pass compressor uses Huffman coding to represent bytes; such codings perform best when a consistent byte alphabet is presented to the compressor.)

A stored bytecode index is declared with the layout prefix 'P'. This layout element may only be used on methods or codes. Any number may be stored in a bytecode index. However, before the stored numbers are transmitted as band elements, they are renumbered in the expectation that byte positions not on instruction boundaries will be rare.

The BCI renumbering compactly indexes instruction boundaries, and also provides a coding (somewhat less compact) for all other 32-bit integers, such as the addresses of bytes inside instructions or outside the bounds of the bytecodes. In particular, the first byte of the first instruction is numbered zero, the first byte of the second instruction is numbered one, and so on through all instructions. The byte position one past the last instruction is numbered with the next number (the number of instructions). The second byte of the first multibyte instruction is numbered with the next number, which is one more than the number of all instructions. All remaining unnumbered bytes are assigned subsequent numbers, without any further disturbances of ordering. For large enough positive numbers, and for negative numbers, the renumbering is the identity function.

For purposes of locating instruction boundaries for BCI renumbering, the _wide bytecode (0xc4) is taken to be part of the following instruction, whose format it helps determine. If the compressor transmits byte_escape (254) or ref_escape (253) pseudo-instructions, the decompressor must accept the bytecode sequences produced by each of these instructions as integral instructions, when computing BCI renumberings. Thus, there will be an instruction boundary for each byte in bc_codes (except _wide bytecodes), plus an extra boundary for each "aload_0_xxx" variation (such as "aload_0_getstatic_this"), because these pseudo-opcodes expand to pairs of bytecode instructions.

Please see the Appendix section Representation of Byte Offsets for pseudo-code explaining this concept.

If the layout element is prefixed by 'P' and not 'PO', then the renumbered bytecode index is transmitted. This renumbering is called the bytecode index renumbering. The primary encoding for bands containing bytecode indexes is BCI5.

Here is an example of how this works. Imagine a method with 20 bytes of bytecode data and five instructions, at the following positions: { 0, 4, 6, 10, 17 }. BCI renumbering translates these particular numbers compactly to [0..4]. More completely, BCI renumbering translates [0..20] to the numbers { 0, 6, 7, 8, 1, 9, 2, 10, 11, 12, 3, 13, 14, 15, 16, 17, 18, 4, 19, 20, 5 }, and anything outside the range [0..20] stays the same after BCI renumbering. If a attribute of this method has a 'P' layout element, and has the number 6 stored in the class file, the number 2 will be transmitted, since 6 is the offset of the third instruction.

If the layout prefix is 'PO', the previous layout element must also have been a bytecode index of layout type 'P' or 'PO'. (There must not be intervening structure, such as brackets '[' or ']'.) In this case, the value transmitted in the band governed by the 'PO' element is the difference between the renumbered bytecode index governed by the current 'PO' element, and the renumbered bytecode index governed by the previous 'P' or 'PO' element. (In the case of a previous 'P' element, this is in fact the value transmitted at the corresponding position in the previous band.)

The 'PO' layout elements govern the same kind of attribute data as 'P' elements, but they use an encoding which expects that adjacent bytecode indexes are correlated. This renumbering, including a difference with the previous element, is called the bytecode offset renumbering The primary encoding for bands containing bytecode offsets is BRANCH5. This encoding is used even if the layout element contains the 'S' or the 'B' character.

A bytecode offset is declared with the layout prefix 'O'. This layout element must immediately follow a previous bytecode index element (with prefix 'P' and not 'PO'). Any value governed by this layout element is regarded as an offset, which when applied to the corresponding previously stored bytecode index, produces another bytecode index. That is, both the previous value and the sum of the previous value and the current value are expected to refer to instruction boundaries. As with the 'PO' layout, the value transmitted is the difference of the two renumbered bytecode indexes. Bands governed by 'PO' layouts contain bytecode offsets, and use the BRANCH5 primary encoding. Unlike the 'PO' layout, the stored value governed by an 'O' layout is the difference between two bytecode indexes.

Thus, bands governed by both 'O' and 'PO' layouts contain bytecode offsets, and use BRANCH5 to encode those offsets. But attribute values governed by both 'P' and 'PO' layouts store absolute bytecode indexes; only 'O' layouts govern stored bytecode offsets. The stored offsets are treated as unsigned fields in the class file unless the 'S' character is present. By contrast, stored indexes are always treated as unsigned fields.

If the preceding example attribute for a 20-byte method also has a 'PO' layout element following its 'P' element, and the number 20 is stored in the class file, the number to be transmitted is found by renumbering 20 to 5, and then subtracting the previous transmitted number (5-2). The number 3 will therefore be transmitted. If instead the stored number is 7 (a BCI inside the instruction at position 6), the transmitted number will be (10-2) or 8. The same transmitted values (3, 8), if governed by an 'O' layout element instead of 'PO', would correspond to stored values of 14 (20-6) and 1 (7-6), instead of 20 and 7.

A flag element (with prefix 'F') encodes integer values which are expected to encode short array of bits, rather than arithmetic values. The bits are not required to be interpreted as access modifiers. The primary encoding for bands transmitting flag layout elements is UNSIGNED5, except that 'FB' layouts use a primary encoding of BYTE1.

Integral values transmitted under the 'V' format character instead of 'B', 'H', or 'I' occupy no bytes at all in the class file attribute. These layout elements allow the decompressor to use counts or tags to control transmission without having them appear directly in class file attributes. For example, consider an attribute which is an array of bytes that is not self-sizing but expands to fill the byte-count mentioned in the attribute header in the class file. Such an attribute might have a layout specification of 'NV[B]'. The compressor would be responsible to decide which values to transmit for a 'V' layout element. (Such decisions would have to make use of detailed information about attribute formats that is not part of this specification.) In all cases, the decompressor must respect these values (when used as counts or tags) but must not store them in the class file.

A replication is introduced by a prefix 'N', which is followed by an integer element called the replication count, and by then a series of elements, called the replication body, enclosed in square brackets. The attribute data governed by this layout consists of a replication count followed by an array of data counted by the replication count. Each array element is governed by the layouts in the replication body.

A replication count layout element governs a band transmitting the replication counts, which has a primary encoding of UNSIGNED5 (or BYTE1, if the layout starts with 'NB'). The bands governed by the corresponding replication body may be sized by summing the values transmitted in the band containing the counts.

A union is introduced by a prefix 'T', which is followed by an integer element called the union tag, and by then a series of labeled, bracketed groups of elements, called the union cases. (The numerals can have any number of digits, but their arithmetic values are truncated to 32-bit integers before being compared with band values, which also are 32 bits in size.) Each label but the last consists of one or more parenthesized, possibly signed decimal numerals, called union tags. The last label (which is the default case) must be an empty pair of parentheses. (No union may contain two occurrences of the same case tag.) The attribute data governed by this layout consists of an integral tag value followed by data whose format is determined by the tag. The data following the tag is governed by the (unique) union case whose label matches the tag's value, or else the default case. The bands governed by each union case may be sized by counting the number of values in the band governed by the tag's layout. As with plain integral bands, the primary encoding of union tag band is SIGNED5, BYTE1, or UNSIGNED5, depending on whether the layout contains an 'S' character, is 'TB', or otherwise.

In a union tag, two numerals separated by a hyphen specify an inclusive range. The second number must be greater than the first. This is an abbreviation for the list of all numerals from the first to the second, inclusive. The layout is treated exactly as if the abbreviation were replaced by the complete list.

Constant pool references in an attribute may be typed strongly, and transmitted as indexes into one of the archive's constant pools. The layout types beginning with 'KI', 'KJ', 'KF', 'KD', and 'KS' must govern stored indexes in the local constant pool to constants of type integer, long, float, double, and string. The layout types beginnig 'KM' and 'KT' govern indexes to constants of type MethodHandle and MethodType. Likewise, the layout types beginning with 'RC', 'RS', 'RD', 'RF', 'RM', 'RI', and 'RU' must govern stored indexes in the local constant pool to symbols of type class, signature, descriptor (pair of name and type), field reference, method reference, interface method reference, and UTF8 string. The layout type 'RY' governs indexes to invokedynamic descriptors, while the type 'RB' governs indexes to bootstrap method specifiers (which are elements of the BootstrapMethods attribute, not of the constant pool). All these references are transmitted as 32-bit indexes into the corresponding global constant pools, in bands with primary encoding of UNSIGNED5. (This is true even of layouts which contain 'B'.) See table below.

Note that signature references (layout 'RS') are identical to Utf8 references (layout 'RU') within a class file, but lead to different coding tactics in the archive file, since the cp_Utf8 and cp_Signature constant pools have independent indexes and are transmitted differently.

The layout elements beginning 'KQ' may only occur in attributes on fields. They refer to constants in a constant pool whose identity is determined by the field's signature. (This layout element is probably useful only for ConstantValue attributes, which are predefined.) The following table gives field signatures legal for use with 'KQ' layouts, and the corresponding constant pools in which the corresponding stored references must be found.

Field Signature | 'KQ' Constant Pool
B | cp_Int
S | cp_Int
C | cp_Int
Z | cp_Int
I | cp_Int
J | cp_Long
F | cp_Float
D | cp_Double
Ljava/lang/String; | cp_String
Ljava/lang/Class; | cp_Class

Three additional layout types transmit indexes into constant pool groups, instead of individual constant pools. They may be used when the compressor elects to use a layout which has references that are not strongly typed. The combined type 'KL' may be used for any index that refers to a valid operand of the 'ldc' instruction, and the transmitted indexes will be renumbered relative to the cp_LoadableValue pool group. Similarly, the combined layout type 'RN' may be used for any index that refers to a valid operand of any of the 'get' or 'invoke' instructions (except 'invokedynamic'), and these indexes will renumbered relative to the cp_AnyMember pool group.

Finally, if a constant pool reference cannot be typed at all, the compressor must use an untyped_ref ('RQ'), which transmits an index into the comprehensive constant pool group cp_All. For example, all the elements of the cp_Utf8 pool are numbered the same in the 'RQ' and 'RU' layouts. But the first element (element zero) of the cp_Int pool is numbered, for untyped references, as cp_Utf8_count, and the first element of the cp_Float pool is numbered, for untyped references, as cp_Utf8_count+cp_Int_count.

If a compressor is faced with an attribute which contains a constant pool index of an unexpected type, it may either refuse to transmit the attribute, or elect to transmit the attribute under a relaxed layout definition using 'RQ' or 'RQN' elements instead of more strongly-typed elements. (If the unexpected type is a loadable constant or member reference, the compressor may elect to use 'RN' or 'KL' elements instead.) Decompressors are required to honor all legal layout definitions transmitted by compressors, even if they might produce illegally formatted class files. (In an extreme case, a compressor may elect to transmit a class file as if it were a resource file, obtaining no class-specific compression, but preserving unusually formatted attributes with bit-for-bit accuracy.)

If a reference layout type includes the character 'N', all band values encoding constant pool entries are incremented by one, and the null value is encoded as zero. Otherwise, the null value is encoded as negative one (-1).

The effect on primary band encodings of the rules given above may be summarized as a list of prioritized rules for layout elements, where the first applicable rule determines the encoding:

  • If the layout contains 'O', use BRANCH5.
  • Otherwise, if the layout contains 'P', use BCI5.
  • Otherwise, if the layout contains 'S' but not 'KS' or 'RS', use SIGNED5.
  • Otherwise, if the layout contains 'B' but not 'RB', use BYTE1.
  • For all other layouts use UNSIGNED5.

Here is a table summarizing bands and encodings for various layout elements. (Not all possible combinations of types and integer sizes are shown.)

Layout Element | Stored Value | Transmitted Value | Primary Encoding
B | u1 | x | BYTE1
FB | u1 | x | BYTE1
SB | u1 | (byte)x | SIGNED5
H | u2 | x | UNSIGNED5
FH | u2 | x | UNSIGNED5
SH | u2 | (short)x | SIGNED5
I | u4 | x | UNSIGNED5
FI | u4 | x | UNSIGNED5
SI | u4 | x | SIGNED5
PH | u2 | renumber_bci(x) | BCI5
POH | u2 | renumber_bci(x) - renumber_bci(x0) | BRANCH5
OH | u2 | renumber_bci(x0+x) - renumber_bci(x0) | BRANCH5
NB[...] | u1 | x (also serves as size count) | BYTE1
NH[...] | u2 | x (also serves as size count) | UNSIGNED5
NI[...] | u4 | x (also serves as size count) | UNSIGNED5
TB... | u1 | x | BYTE1
TSB... | u1 | (byte)x | SIGNED5
TH... | u2 | x | UNSIGNED5
TSH... | u2 | (short)x | SIGNED5
KIB | u1 | indexOf(lcp[x], cp_Int) | UNSIGNED5
KIH | u2 | indexOf(lcp[x], cp_Int) | UNSIGNED5
KII | u4 | indexOf(lcp[x], cp_Int) | UNSIGNED5
KINH | u2 | 1+indexOf(lcp[x], cp_Int) | UNSIGNED5
KJH | u2 | indexOf(lcp[x], cp_Long) | UNSIGNED5
KFH | u2 | indexOf(lcp[x], cp_Float) | UNSIGNED5
KDH | u2 | indexOf(lcp[x], cp_Double) | UNSIGNED5
KSH | u2 | indexOf(lcp[x], cp_String) | UNSIGNED5
KQH | u2 | indexOf(lcp[x], cp_FieldSpecific) | UNSIGNED5
KMH | u2 | indexOf(lcp[x], cp_MethodHandle) | UNSIGNED5
KTH | u2 | indexOf(lcp[x], cp_MethodType) | UNSIGNED5
KLH | u2 | indexOf(lcp[x], cp_LoadableValue) | UNSIGNED5
RCH | u2 | indexOf(lcp[x], cp_Class) | UNSIGNED5
RSH | u2 | indexOf(lcp[x], cp_Signature) | UNSIGNED5
RDH | u2 | indexOf(lcp[x], cp_Descr) | UNSIGNED5
RFH | u2 | indexOf(lcp[x], cp_Field) | UNSIGNED5
RMH | u2 | indexOf(lcp[x], cp_Method) | UNSIGNED5
RIH | u2 | indexOf(lcp[x], cp_Imethod) | UNSIGNED5
RUH | u2 | indexOf(lcp[x], cp_Utf8) | UNSIGNED5
RQH | u2 | indexOf(lcp[x], cp_All) | UNSIGNED5
RQNH | u2 | 1+indexOf(lcp[x], cp_All) | UNSIGNED5
RQNI | u4 | 1+indexOf(lcp[x], cp_All) | UNSIGNED5
RYH | u2 | indexOf(lcp[x], cp_InvokeDynamic) | UNSIGNED5
RBH | u2 | indexOf(class.BootstrapMethods[x], cp_BootstrapMethod) | UNSIGNED5
RNH | u2 | indexOf(lcp[x], cp_AnyMember) | UNSIGNED5

Here, the variable x names a value stored in the attribute, governed by the layout element. The variable x0 names the stored value governed by the immediately previous layout element, which must have begun with 'P'. The expression renumber_bci(x) denotes the renumbering of a bytecode index x to shorten references to instruction boundaries, as described above. The expression lcp[x] denotes a local constant pool reference, with index x, or a distinct null value if x is zero.

The expression class.BootstrapMethods[x] denotes an element of the BootstrapMethods attribute of the current class. This attribute contains additional complex constants required by CONSTANT_InvokeDynamic constant pool entries.

The expression indexOf(lcp[x], cp) denotes the index (zero-based) in a Pack200 global constant pool cp of the constant lcp[x], which is assumed to be of a type appropriate to cp. This expression has the value -1 if lcp[x] has the distinct null value.

Note that a null reference can always be transmitted in a band containing references, by transmitting the value zero (if the band is specified to accept nulls) or by transmitting the value -1 (otherwise). The UNSIGNED5 encoding can represent -1 in five bytes.

The name cp_FieldSpecific refers to a global constant pool selected by the enclosing field's signature, as described above.

5.5.3. Recursive Layouts
The top-level structure of a layout specification may be a series of bodies which are independently callable layouts. In such a case, the attribute data governed by the whole layout specification is governed by the first body in the sequence of callables. The other callables can govern data, but they only do this if they are actually called. The effect is to define a mutually recursive set of layout specifications, and give control to the first. Note that callables may not be nested inside any other syntax. This feature is useful for supporting recursively structured class file attributes, such as metadata.

A call layout element is a parenthesized signed decimal numeral N. It refers to the Nth callable in the top-level structure of the layout specification, relative to the callable in which the call appears. (It is illegal for calls to appear outside of callables.) We will refer to this callable as the call's callee.

(For example, the layout element '(2)' calls the second callable layout after the one in which the call appears. There must be a matching callee for every callable. A call spelled '(1)' must not appear in the last callable of a layout, and likewise a call spelled '(-1)' must not occur in the first callable. Note that the self-call spelled '(0)' is always legal.)

A call layout element indirectly governs the attribute data more directly governed by the callable that the layout element calls. As far as class file format is concerned, the effect is the same as if the text within the callable's body were substituted instead of the call.

However, this substitution semantics does not describe the effect of a call layout element on band structure. A call layout element does not directly govern any bands, but rather specifies that the data it indirectly governs is to be transmitted in the bands governed more directly by the callee.

If a call's callee begins textually later than the call itself, the call is a forward call. The effect of a forward call is simply to make the bands of the callee sharable by the call and any other forward calls to the same callee. For example, the following layout specification has two bands, the latter of which transmits data indirectly governed by either of the union cases. (The default union case governs no bands, so that a tag byte other than ASCII 'A' or 'B' has no following bytes. Whitespace has been added to the layout for ease of reading.)

        [TB
          (65) [(1)]
          (66) [(1)]
          (  ) []
          ]
        [H]

A call's callee can also begin textually earlier than the call itself. Such a call, which must have a spelling of the form '(0)' or '(-N)', is referred to as a backward call. Its callee is referred to as a backward callable. (Callables which are the target of no calls or only of forward calls are not backward callables; all others are.) Backward calls and callables introduce the possibility of recursion and looping. Here is an example of an N-ary tree whose leaves are Utf8 strings preceded by a zero-byte, and whose internal nodes are counted arrays of tree nodes preceded by a one-byte: In this example, the callee encloses the call, for a direct recursion. The layout governs three bands, under the elements 'TB', 'NH', and 'RUH'.

        [TB
          (1) [NH[ (0) ]]
          (0) [RUH]
        ]

The sizing of bands governed by such mutually-recursive layouts is assisted by explicit counts of backward calls, transmitted before any of the layout's attribute bands, in class_attr_calls and three similar bands, which are described later.

5.5.4. Default Attribute Layouts
The layout definitions of the predefined attributes are as follows:
Context Type | Name | Layout Definition
Class | "class-file version" | (empty) *(see note)
Class | InnerClasses | (empty) *(see note)
Class | EnclosingMethod | RCHRDNH
Class | SourceFile | RUNH *(see note)
Class | Signature | RSH
Class | (metadata) | (see Metadata Layouts)
Class | Deprecated | (empty)
Class | (type metadata) | (see Metadata Layouts)
Field | ConstantValue | KQH
Field | Signature | RSH
Field | (metadata) | (see Metadata Layouts)
Field | Deprecated | (empty)
Field | (type metadata) | (see Metadata Layouts)
Method | Code | (empty) *(see note)
Method | Exceptions | NH[RCH]
Method | Signature | RSH
Method | (metadata) | (see Metadata Layouts)
Method | Deprecated | (empty)
Method | MethodParameters | NB[RUNHFH]
Method | (type metadata) | (see Metadata Layouts)
Code | StackMapTable | (see Stack Map Layouts)
Code | LineNumberTable | NH[PHH]
Code | LocalVariableTable | NH[PHOHRUHRSHH]
Code | LocalVariableTypeTable | NH[PHOHRUHRSHH]
Code | (type metadata) | (see Metadata Layouts)

The star '*' in the layout definitions of "class-file version", InnerClasses, SourceFile, and Code reflects the fact that these attributes are given special processing. For a class, the "class-file version" pseudo-attribute is transmitted as if using the format VV, but the decompressor does not store the result in a class file attribute, but rather in the class file header. (See the discussion in the section Attribute Bands.) For a class, the InnerClasses attribute is partially transmitted as if using the format NV[RCVTV[(0)[]()[RCNVRUNV]]], but the decompressor processes the received values further before (possibly) emitting an InnerClasses attribute. (See the discussion in the section Local InnerClasses Attributes.) When a SourceFile attribute is transmitted using the predefined layout, a special rule allows it to default to the obvious standard string. Finally, for a method, the Code attribute is transmitted under the code_bands.

5.5.5. Stack Map Layouts
There is a predefined attribute layout for the StackMapTable attribute of a Code attribute. With some whitespace and abbreviation added for readability, it is as follows:

  [NH[(1)]]
  [TB
    (64-127)  [(2)]
    (247)     [(1)(2)]
    (248-251) [(1)]
    (252)     [(1)(2)]
    (253)     [(1)(2)(2)]
    (254)     [(1)(2)(2)(2)]
    (255)     [(1)NH[(2)]NH[(2)]]
    ()        []
    ]
  [H]
  [TB
    (7) [RCH]
    (8) [PH]
    ()  []
    ]

The following observations may be deduced by comparing this layout specification with the class file format specification which defines the StackMapTable attribute. The second callable describes a stack_map_frame structure from the class file format specification. Within the union in the second callable, the cases stand for the following stack_map_frame union members, respectively: same_locals_1_stack_item_frame, same_locals_1_stack_item_extended, chop_frame (and also same_frame_extended), append_frame (for three layout union cases), full_frame, and (in the default layout union case) same_frame. The third and fourth callables describe an offset_delta value and a verification_type_info structure from the class file format specification.

5.5.6. Metadata Layouts
The predefined attribute layouts for non-parameter metadata annotations are the same in all three contexts. With some whitespace added for readability, the layout is as follows:

  [NH[(1)]]
  [RSH NH[RUH(1)]]
  [TB
    (66,67,73,83,90) [KIH]
    (68)  [KDH]
    (70)  [KFH]
    (74)  [KJH]
    (99)  [RSH]
    (101) [RSH RUH]
    (115) [RUH]
    (91)  [NH[(0)]]
    (64)  [RSH NH[RUH(0)]]
    ()    []
    ]
Both visible and invisible annotations use this layout. The second callable describes an annotation structure from the metadata specification. The third callable describes a element_value structure from the metadata specification. This last callable, all by itself, is used for the AnnotationDefault attribute on methods. Method parameter annotations (both visible and invisible) are also predefined using this layout, with a prepended callable to count the number of parameters:

  [NB[(1)]]
  [NH[(1)]]
  [RSH NH[RUH(1)]]
  [TB...]

Additionally RuntimeVisibleTypeAnnotation and RuntimeInvisibleTypeAnnotation are predefined, using similar strategies as before. Both visible and invisible type annotations use a common layout. (They were defined by JSR 308).

  [NH[(1)(2)(3)]]
  [TB
    (0-1)            [B]
    (16)             [FH]
    (17-18)          [BB]
    (19-21)          []
    (22)             [B]
    (23)             [H]
    (64-65)          [NH[PHOHH]]
    (66)             [H]
    (67-70)          [PH]
    (71-75)          [PHB]
    ()               []
    ]
   [NB[BB]]
   [RSH NH[RUH(1)]]
   [TB...]
The first callable defines the type_annotation as a whole. The second callable refers to target_type and target_info union structure, and the third callable refers to target_path structure. The remaining callables are identical with layouts specified above for metadata. Specifically the fourth and the fifth callables refers to the annotation and element_value structures specified for metadata. (These were defined in the JSR 175 specification). Like the previous metadata layouts, these type metadata layouts are predefined in the compressor, and are applicable to Class, Field, Method, and also Code structures.
5.5.7. Unusual Layout Usages
It is possible for the compressor to emit any number of definitions for the same attribute name. These definitions are assigned different attribute indexes (and perhaps flag bits), and are treated as distinct attributes, despite having the same name. If an attribute is too complex to define in the layout language, each occurrence of that attribute can be given a separate definition by the compressor. The minimum requirement is that each layout accurately declare the size of the corresponding attribute occurrence, and locate all constant pool references within that occurrence.

5.6. Source File Abbreviation

When a null reference is transmitted in the band governed by the predefined SourceFile attribute, the decompressor is required to replace it by a reference to a Utf8 string whose spelling consists of the associated class name string, with the following modifications made, in order:
  • Every character up to and including the last slash or dot ('/' or '.') is removed. (This removes any package prefix.)
  • If there is a character of code 0x2D or lower in the remaining string, the first such and all following characters are removed. (This removes any nested class name mangling.)
  • The suffix characters ".java" are appended.

This rule matches the historical behavior of many Java compilers, and allows the compressor to avoid allocating Utf8 strings for "obvious" derived SourceFile names. (If a compressor needs to transmit an irregular SourceFile attribute with a true null reference, it must use a non-standard layout.) Here is a table of examples of class names and the corresponding derived SourceFile names.

Class | SourceFile
foo | foo.java
foo/bar | bar.java
foo/bar$baz | bar.java
foo/bar#baz#1 | bar.java
foo.bar.baz#1 | baz.java

5.7. Nested Classes

A nested class record is a four-tuple specifying two classes, a name, and some flags, as documented for the InnerClasses attribute of class files. It is primarily represented in the Pack200 archive by four bands, whose contents are applied equally to all class files in the archive.
  ic_bands:
        *ic_this_class :UDELTA5 [#ic_count] (cp_Class)
        *ic_flags :UNSIGNED5 [#ic_count]
        *ic_outer_class :DELTA5 [COUNT(1<<16,...)]  (null or cp_Class)
        *ic_name :DELTA5 [LENGTH(*ic_outer_class)] (null or cp_Utf8)
These four-tuples are shared globally, like constant pool entries. In this specification, they are conventionally written <C,F,C2,N>, even though they are stored in a different order in the class file format. As a set, these globally defined four-tuples are called ic_All. There is usually no explicit linkage from individual classes in the archive to nested class records. Instead, when extracting a class file from a Pack200 archive, an subset of nested class records may be selected which is sufficient to describe all nested classes actually mentioned in the extracted class file's constant pool. For any class file X to be extracted, this subset will be called ic_Relevant(X), the relevant subset for X of ic_All. The algorithm for selecting the relevant subset is described in the section Ordering of Constant Pools. Optionally, the compressor can specify, for any given class, an adjustment to its relevant subset, by transmitting a local InnerClasses attribute. This also is described in the section Local InnerClasses Attributes.

The ic_this_class and ic_flags bands are both of length #ic_count, and the corresponding elements of these bands specify, for each tuple, the nested class identity (represented as a cp_Class reference) and the flags bitmask.

The nested class flag bit at position 16 (as set in the mask 0x00010000) is inside the archive file to indicate if there are corresponding entries for the tuple in the ic_outer_class and ic_name bands. Thus, the length of both of these bands is the sum of all flag bits at position 16. Typically, only a few percent of nested classes need to set this bit and specify outer and name fields explicitly.

If a tuple has an entry in the ic_outer_class and ic_name bands, these specify its outer class and simple name. (They are represented respectively as a possibly null cp_Class reference and a possibly null cp_Utf8 reference.) Otherwise, the tuple's outer class and name are said to be predicted. In this case, they must be correctly predictable from the name of the nested class itself, by parsing its spelling.

A nested class has a bytecode name which names the class within class files. The spelling of this name, sometimes called a "mangled name", has extra punctuation signs and perhaps digits as well as the name of a containing class. If the bytecode name can be parsed into an outer class and a class name, and this class and name are identical with the true outer class and class name of the nested class, then we say the outer class and class name are predictable.

The extraction of the predictable outer class and class name must follow the following grammar for class bytecode names, as applied to the spelling of the nested class name. (This grammar is independent of the grammar governing band structure, or any other grammar appearing in other parts of this specification.) The terminal DOLLAR refers to any character (such as '$' or '#') whose code is 0x2D or lower. The terminals SLASH refers to the slash or dot characters '/' or '.', which have the codes 0x2E and 0x2F. The terminal DIGIT refers to an ASCII decimal digit, one of the ten character codes from 0x30 to 0x39 inclusive. The terminal LETTER refers to any other character. That is, it refers to any character whose code is 0x3A or higher.

  bcn:
        (bcnCase1 | bcnCase2 | bcnCase3 | bcnCase4)
  bcnCase1:
        packageQual (namePart)? DOLLAR number
  bcnCase2:
        packageQual (namePart)? DOLLAR number DOLLAR predictableICName
  bcnCase3:
        predictableOuter DOLLAR predictableICName
  bcnCase4:
        packageQual (namePart)?

  predictableOuter:
        packageQual namePart
  predictableICName:
        LETTER (LETTER | DIGIT)*

  namePart:
        (LETTER | DIGIT | DOLLAR)+
  number:
        (DIGIT)+
  packageQual:
        (namePart SLASH)*

This grammar ambiguously divides an arbitrary class name into several parts, which may include an optional predictedOuter prefix, an optional predictedICName suffix, and a optional numeric suffix. Any ambiguity must be resolved by preferring the alternative cases for bcn nonterminal in the order given. E.g., if bcnCase1 matches, it is used, even though either or both other cases may match also.

The predictable nested class name is the string corresponding to the predictableICName nonterminal, if it was parsed. Otherwise the predictable nested class name is taken to be null.

If a predictableOuter outer nonterminal is parsed, the corresponding string is the predictable outer class name. Otherwise the predictable outer class reference is taken to be null. Note that if a number nonterminal is parsed, no predictableOuter can be parsed. Here are some examples of prediction, nonprediction, and misprediction:

Inner Class Prediction Examples
nested class: | member named Entry of java/util/Map
mangled name: | java/util/Map$Entry
outer, name: | java/util/Map, Entry
predictable? | yes (since Map.Entry is a member of Map)
nested class: | anonymous
mangled name: | java/util/AbstractList$1
outer, name: | (none), (none)
predictable? | yes (since the ic_name is null)
nested class: | non-member, named Local
mangled name: | java/util/AbstractList$2$Local
outer, name: | (none), Local
predictable? | yes (since the ic_name is Local)
nested class: | non-member, named Local
mangled name: | java/util/AbstractList#2#Local
outer, name: | (none), Local
predictable? | yes (since the ic_name is Local)
nested class: | member named $2$Local of Foo
mangled name: | Foo$$2$Local
outer, name: | (none), Local
predictable? | no (outer name missing, ic_name mispredicted)
nested class: | class named Red$Herring
mangled name: | Red$Herring
outer, name: | Red, Herring
predictable? | no (the predicted ic_name Herring)
nested class: | member named Q of X$1
mangled name: | X$1$Q
outer, name: | (none), Q
predictable? | no (since Q is a member of X$1)
nested class: | member named Z of X$Y
mangled name: | X$Y$Z
outer, name: | X$Y, Z
predictable? | yes (since X$Y.Z is a member of X$Y)
nested class: | member named Y$Z of X
mangled name: | X$Y$Z
outer, name: | X$Y, Z
predictable? | no (outer name and ic_name are mispredicted)

When a decompressor is processing a nested class name marked "predictable", it must parse the nested class's bytecode name into an enclosing class, an optional number, and an optional name. (The compressor might choose to always specify outer classes and names explicitly, in which case the decompressor would not be required to parse the nested class names at all. However, decompressors must always be prepared to perform this parsing.)

If the compressor did not transmit an entry in cp_Utf8 or cp_Class for a predicted name or outer class, the decompressor must create such a constant internally. It will be referred to as a cp_Utf8 or cp_Class entry, even though it is not in the constant transmission sequence cp_All. However, if the compressor did transmit a constant with the same spelling as the predicted name or outer class, the decompressor must use that constant rather than creating a new one. The creation of such internal constants within the decompressor is detectable in an output file because they are inserted in a special order in the output file's constant pool. (See discussion of the output ordering rules in the section Ordering of Constant Pools.)

Please see the Appendix section Representation of Byte Offsets for pseudo-code explaining this concept.

When the decompressor receives the ic_this_class, ic_flags, ic_name, and ic_outer_class bands, and performs any required name parsing, it creates the set ic_All of four-tuples. This set is the primary source of InnerClasses attributes synthesized for individual class files by the decompressor.

5.8. Class Schema

The purpose of the Pack200 archive is to transmit a set of classes in a form which a decompressor can later use to reconstruct class files. As a rule, each separate kind of data stored in class files is transmitted in a band dedicated to all values of that kind. Here is the band structure for all class-specific information except bytecodes:
  class_bands:
        *class_this :DELTA5 [#class_count] (cp_Class)
        *class_super :DELTA5 [#class_count] (cp_Class)
        *class_interface_count :DELTA5 [#class_count]
        *class_interface :DELTA5 [SUM(*class_interface_count)] (cp_Class)
        *class_field_count :DELTA5 [#class_count]
        *class_method_count :DELTA5 [#class_count]

        *field_descr :DELTA5 [SUM(*class_field_count)] (cp_Descr)
        field_attr_bands

        *method_descr :MDELTA5 [SUM(*class_method_count)] (cp_Descr)
        method_attr_bands

        class_attr_bands
        code_bands

The class_this, class_super, class_flags_lo, class_flags_hi (if present), class_interface_count, class_field_count, and class_method_count bands are all of length #class_count, and the corresponding elements of these bands transmit in turn each class's name and super-class, and the number of implemented interfaces, declared fields, and declared methods. (The access modifier bits in each class's flags word are mixed with attribute indicators, and are transmitted in class_flags_lo, as defined above.)

The class_interface band contains runs of class interface declarations, one run for each element of class_interface_count, and applying to the corresponding class.

Each element of class_this, class_super, and class_interface is a reference (in fact, a non-null reference) to the constant pool cp_Class.

In the unique case of java/lang/Object, the stored super-class must be a null reference. Rather than disturbing the transmission of all other elements of the class_super band, we use the convention that a compressor, when it encounters a null super-class reference, must transmit in its place a duplicate of the current class's reference. (Since it is illegal for a class to inherit from itself, this renumbering of null references is unambiguous.)

The field_descr bands contain one run of elements for each element of class_field_count, and apply to successive fields in the corresponding class. The method_descr bands contain one run of elements for each element of class_method_count, and apply to successive methods in the corresponding class.

(Unlike the class file format, field and method descriptors are stored as single references to a "name-and-type" constant pool, rather than as pairs of name references and type references.)

The method_descr band has a primary encoding which performs best if the method references are mostly sorted. Compressors may elect to take advantage of this fact by sorting the methods in each class. (Note: It is generally acceptable for compressors to reorder methods for best compression, but fields must not be reordered, since their order is apparent through reflection and significant to some facilities, such as serialization.)

Attribute bands are placed in the positions indicated by the grammar. They are described below. The attribute bands include flags bands, which carry both access modifiers and attribute indicators for the corresponding classes, fields, and methods.

The Pack200 archive ends with bands devoted to method code blocks and the bytecodes themselves. If a method has a code attribute, the compressor must mention it in the flags bit (the 6th LSB) to which it is assigned, or as an overflow attribute (with an index of 6). The fields of a Code attribute are transmitted in the bands organized under the code_bands nonterminal.

The specification of each Code attribute begins with three key parameters, which declare the number of stack and local slots, and the number of handlers. #Stack is the number of stack slots used by the code. #NALocal is the number of non-argument locals used by the code. (The actual number of locals declared in the class file will be #NALocal plus the number of locals required by method parameters, as determined by the method's signature.) #Handler is the number of exception handlers.

The code_headers band contains a series of bytes, each of which tersely encodes the first three key parameters of a code attribute: Each of the 255 non-zero byte values encodes a unique triple of #NALocal, #Stack, and #Handler. There is (of course) one code header for each Code attribute transmitted.

The special code header byte zero (0x00) indicates that the code attribute's three parameters are to be found, instead, in the code_max_stack, code_max_na_locals, and code_handler_count bands. If the code header byte is non-zero, these three bands do not transmit entries for the corresponding Code attribute.

The code_flags_lo band transmits an entry for a corresponding Code attribute if and only if one or both of the following is true: the Code attribute's code header byte is zero, or the have_all_code_flags bit is set in the #archive_options word. If a Code attribute does not have a transmitted code_flags_lo value, its flags word is taken to be zero, and it has no sub-attributes. The code_flags_hi band transmits a corresponding entry if and only if the code_flags_lo value was transmitted as just described, and also #have_code_flags_hi is set.

Non-zero code header bytes denote code attribute parameters according to the following scheme:

Header Range | #Stack | #NALocal | #Handler
1 <= x <= 144 | (x-1) % 12 | (x-1) / 12 | 0
145 <= x <= 208 | (x-145) % 8 | (x-145) / 8 | 1
209 <= x <= 255 | (x-209) % 7 | (x-209) / 7 | 2
x = 0 | code_max_stack | code_max_na_locals | code_handler_count
This scheme allows a single byte to describe a Code attribute in about 95% of all cases. (Note: If debugging attributes are not stripped, the compressor should probably set the have_all_code_flags bit, so that the presence of these attributes will not force the use of the special zero code header byte.)

Regardless of whether the exception handler count is encoded in the one-byte code header, or whether it is an explicit element of code_handler_count, for each code attribute there is a run of values in code_handler_start_P, code_handler_end_PO, code_handler_catch_PO, and code_handler_class_RCN, one for each handler, as if those bands were governed by an attribute layout 'NV[PHPOHPOHRCNH]' (there is no band governed by the 'NV' layout element itself; it is the handler count).

That is, each triplet of Handler.start, Handler.end, and Handler.catch values are transmitted as renumbered (by renumber_bci). Also, Handler.end is transmitted as a difference of its renumbering with that of Handler.start in the same triplet, and Handler.catch is transmitted as a difference of its renumbering with that of Handler.end in the same triplet. Finally, code_handler_class_RCN is transmitted as an incremented reference into cp_Class, or zero if the handler class reference is null.

  code_bands:
        *code_headers :BYTE1 [COUNT(Code,...)]

        *code_max_stack :UNSIGNED5 [COUNT(0,*code_headers)]
        *code_max_na_locals :UNSIGNED5 [COUNT(0,*code_headers)]

        *code_handler_count :UNSIGNED5 [COUNT(0,*code_headers)]
        *code_handler_start_P :BCI5 [SUM(*code_handler_count)]
        *code_handler_end_PO :BRANCH5 [SUM(*code_handler_count)]
        *code_handler_catch_PO :BRANCH5 [SUM(*code_handler_count)]
        *code_handler_class_RCN :UNSIGNED5 [SUM(*code_handler_count)] (null or cp_Class)

        code_attr_bands

5.9. Attribute Bands

Here, collected in one place, are the bands which transmit attributes. If the compressor sets bits in the flags word of a class, field, or method, and those bits are assigned (by the compressor) to attributes, then the compressor must also retrieve the stored values governed by each selected attribute layout and transmit them in the bands governed by that layout.

If the compressor marks a class (resp. field, method, or code) as having overflow attributes, it must transmit a corresponding element in the class_attr_count band (resp. field_attr_count, method_attr_count, or code_attr_count band). This count, in turn, specifies the size of a run in class_attr_indexes (resp. field_attr_indexes, method_attr_indexes, or code_attr_indexes) of indexes of attribute layouts governing attributes of the class (resp. field, method, or code). The compressor must transmit a attribute layout definition index for each overflow attribute.

For each attribute layout selected by a bit in an element of class_flags or by an element of class_attr_indexes, the compressor must retrieve data governed by the layout elements from the class attribute and transmit elements encoding this data in the bands governed by the layout. Similar conditions apply for field, method, and code attributes.

For each attribute layout that transmits data and contains backward calls, the compressor must transmit the number of times each backward callable will be the subject of a backward call as the decompressor works its way through attribute layouts. These call counts are transmitted in the class_attr_calls, field_attr_calls, method_attr_calls, and code_attr_calls bands, according to the context type of the layouts they apply to. The call counts are transmitted, one per backward callable, in the definition order of the callables. (See the section Attribute Layout Definitions.) Call counts are only transmitted for backward callables which occur within layouts that are used at least once. Call counts do not count entries to any callable because of a forward call, nor do they count the initial call to a callable which initiates attribute processing. A call count might be zero if a backward callable occurs in a layout that is used, but which does not happen to reach the backward callable. These call counts are needed to break a circularity inherent in the sizing of bands for mutually-recursive layouts. They provide the minimum information necessary for the decompressor to locate all the bands in the archive, prior to distributing the band values to the various output classes. For this reason, the call counts are supplied one per layout, summed over all attribute occurrences of that each layout.

The decompressor is responsible for processing any explicit attribute layout definitions transmitted by the compressor. It must prepare to receive the additional bands governed by those layouts. When it reads layout definition indexes, it must prepare to read in the correct number of values transmitted in each of those additional bands.

The grammar of bands defined in this specification includes bands governed by all predefined attribute layouts. For clarity, some band names mention a part of the layout element that created them. Note that the Deprecated attributes have no bands, because their layouts are empty.

Attributes named "Synthetic", although part of the standard class file format in earlier versions of Java, are not directly supported in this specification, because that attribute has been replaced by a new flag bit (ACC_SYNTHETIC, 0x1000) in more recent versions of Java. However, compressors are encouraged to process Synthetic attributes, and any other zero-length attributes not predefined here, by assigning them unused flag bits, and emitting explicit zero-length layout definitions for decompressors to follow.

If the compressor elects to define new layouts, the bands governed by those layouts are added immediately after the bands for the predefined layouts. (The order and structure of the predefined attribute bands reflects the predefined layout definitions in a regular way, as if the compressor had in fact defined them explicitly.)

  class_attr_bands:
        *class_flags_hi :UNSIGNED5 [#class_count*#have_class_flags_hi]
        *class_flags_lo :UNSIGNED5 [#class_count]
        *class_attr_count :UNSIGNED5 [COUNT(1<<16,...)]
        *class_attr_indexes :UNSIGNED5 [SUM(*class_attr_count)]
        *class_attr_calls :UNSIGNED5 [...]
        *class_SourceFile_RUN :UNSIGNED5 [COUNT(SourceFile,...)] (null or cp_Utf8)
        *class_EnclosingMethod_RC :UNSIGNED5 [COUNT(EnclosingMethod,...)] (cp_Class)
        *class_EnclosingMethod_RDN :UNSIGNED5 [COUNT(EnclosingMethod,...)] (null or cp_Descr)
        *class_Signature_RS :UNSIGNED5 [COUNT(Signature,..)] (cp_Signature)
        class_metadata_bands
        ic_local_bands
        *class_file_version_minor_H :UNSIGNED5 [COUNT(version,...)]
        *class_file_version_major_H :UNSIGNED5 [COUNT(version,...)]
        {class_attr_element_bands...}

  field_attr_bands:
        *field_flags_hi :UNSIGNED5 [SUM(*class_field_count)*#have_field_flags_hi]
        *field_flags_lo :UNSIGNED5 [SUM(*class_field_count)]
        *field_attr_count :UNSIGNED5 [COUNT(1<<16,...)]
        *field_attr_indexes :UNSIGNED5 [SUM(*field_attr_count)]
        *field_attr_calls :UNSIGNED5 [...]
        *field_ConstantValue_KQ :UNSIGNED5 [COUNT(ConstantValue,...)] (cp_Int, etc.; see note)
        *field_Signature_RS :UNSIGNED5 [COUNT(Signature,...)] (cp_Signature)
        field_metadata_bands

  method_attr_bands:
        *method_flags_hi :UNSIGNED5 [SUM(*class_method_count)*#have_method_flags_hi]
        *method_flags_lo :UNSIGNED5 [SUM(*class_method_count)]
        *method_attr_count :UNSIGNED5 [COUNT(1<<16,...)]
        *method_attr_indexes :UNSIGNED5 [SUM(*method_attr_count)]
        *method_attr_calls :UNSIGNED5 [...]
        *method_Exceptions_N :UNSIGNED5 [COUNT(Exceptions,...)]
        *method_Exceptions_RC :UNSIGNED5 [SUM(*method_Exceptions_N)] (cp_Class)
        *method_Signature_RS :UNSIGNED5 [COUNT(Signature,...)] (cp_Signature)
        method_metadata_bands
        *method_MethodParameters_NB :BYTE1 [...]
        *method_MethodParameters_name_RUN :UNSIGNED5 [...] (null or cp_Utf8)
        *method_MethodParameters_flag_FH :UNSIGNED5 [...] (flag)
        {method_attr_element_bands...}

  code_attr_bands:
        *code_flags_hi :UNSIGNED5 [...*#have_code_flags_hi]
        *code_flags_lo :UNSIGNED5 [...]
        *code_attr_count :UNSIGNED5 [COUNT(1<<16,...)]
        *code_attr_indexes :UNSIGNED5 [SUM(*code_attr_count)]
        *code_attr_calls :UNSIGNED5 [...]
        *code_StackMapTable_N :UNSIGNED5 [COUNT(StackMapTable,...)]
        *code_StackMapTable_frame_T :BYTE1 [SUM(*code_StackMapTable_N)]
        *code_StackMapTable_local_N :UNSIGNED5 [COUNT(255,*code_StackMapTable_frame_T)]
        *code_StackMapTable_stack_N :UNSIGNED5 [COUNT(255,*code_StackMapTable_frame_T)]
        *code_StackMapTable_offset :UNSIGNED5 [...]
        *code_StackMapTable_T :BYTE1 [...]
        *code_StackMapTable_RC :UNSIGNED5 [COUNT(7,*code_StackMapTable_T)]
        *code_StackMapTable_P :BCI5 [COUNT(8,*code_StackMapTable_T)]
        *code_LineNumberTable_N :UNSIGNED5 [...]
        *code_LineNumberTable_bci_P :BCI5 [...]
        *code_LineNumberTable_line :UNSIGNED5 [...]
        *code_LocalVariableTable_N :UNSIGNED5 [...]
        *code_LocalVariableTable_bci_P :BCI5 [...]
        *code_LocalVariableTable_span_O :BRANCH5 [...]
        *code_LocalVariableTable_name_RU :UNSIGNED5 [...] (cp_Utf8)
        *code_LocalVariableTable_type_RS :UNSIGNED5 [...] (cp_Signature)
        *code_LocalVariableTable_slot :UNSIGNED5 [...]
        *code_LocalVariableTypeTable_N :UNSIGNED5 [...]
        *code_LocalVariableTypeTable_bci_P :BCI5 [...]
        *code_LocalVariableTypeTable_span_O :BRANCH5 [...]
        *code_LocalVariableTypeTable_name_RU :UNSIGNED5 [...] (cp_Utf8)
        *code_LocalVariableTypeTable_type_RS :UNSIGNED5 [...] (cp_Signature)
        *code_LocalVariableTypeTable_slot :UNSIGNED5 [...]
        {code_attr_element_bands...}

A class possesses a "class-file version" pseudo-attribute if its class file's minor or major version differs from the #default_class_minver or #default_class_majver, respectively. This pseudo-attribute is a pair of 16-bit integers giving the major and minor version numbers of the class's file. These integers are stored in the header of the class's file, rather than in an attribute record. As is the convention with classfiles, the minor version number comes first. Thus minor version numbers are transmitted in the band class_file_version_minor_H, and major version numbers in class_file_version_major_H. Decompressors are not required to process archives with greater minor or major version numbers than those of the specification they were engineered to process. Decompressors are required to process archives with the same major and smaller or equal minor version numbers.

Local InnerClasses Attributes
A transmitted class may possess a local InnerClasses attribute, which is taken to be an adjustment to that class file's eventually written InnerClasses attribute. Specifically, the local InnerClasses attribute specifes a set of four-tuples which must be combined with a corresponding relevant subset drawn from ic_All. The algorithm for doing this is described in the section Ordering of Constant Pools, but it amounts to starting with the subset of four-tuples from ic_All which pertain to CONSTANT_Class entries of the output constant pool (barring CONSTANT_Class entries required only by the InnerClasses attribute itself), and then forming the set symmetric difference between that relevant set and the local InnerClasses attribute.

The four-tuples of all local InnerClasses attributes are transmitted in five bands:

  ic_local_bands:
        *class_InnerClasses_N :UNSIGNED5 [COUNT(InnerClasses,...)]
        *class_InnerClasses_RC :UNSIGNED5 [SUM(*class_InnerClasses_N)] (cp_Class)
        *class_InnerClasses_F :UNSIGNED5 [SUM(*class_InnerClasses_N)]
        *class_InnerClasses_outer_RCN :UNSIGNED5 [COUNT(!=0,*class_InnerClasses_F)]  (null or cp_Class)
        *class_InnerClasses_name_RUN :UNSIGNED5 [COUNT(!=0,*class_InnerClasses_F)] (null or cp_Utf8)

Each four-tuple <C,F,C2,N> transmitted in these attribute bands is called a local IC tuple. (Note that the class file format stores the elements of these four-tuples in a different order, (C,C2,N,F).) For a given class file X, the sequence of local IC tuples is called ic_Local(X).

For each local IC tuple, the compressor transmits, at minimum, a C value and an F value. If a transmitted flags value F is not zero, there are also corresponding transmitted constant pool references C2 and N. As a whole, the transmitted local tuple may or may not be equivalent to a global tuple from ic_All.

As an abbreviation, the compressor may transmit only a C and a flags value of zero, if the local IC tuple to be transmitted is equivalent to a member of ic_All, and no other member of ic_All defines the same class C. In this case the decompressor must behave exactly as if all four tuple components had been explicitly transmitted.

(If all four components of a local tuple are transmitted, and the flags value to be transmitted is in fact zero, the value 0x00010000 must be transmitted instead of zero for the flags.)

Frequently, the compressor will not need to transmit any local IC tuples at all, since the set of four-tuples to be stored in the class's InnerClasses attribute will be exactly ic_Relevant(X), with no adjustment required. If extraneous four-tuples (beyond those required by a minimized constant pool) are found in the input class file, then some local IC tuples will be needed (with zero flags), to provide local "roots" for the extra InnerClasses entries. This can occur if a compiler requires an InnerClasses entry for a class mentioned only in a signature. Compressors are required to predict which classes require such extra local roots, and transmit only the unexpected four-tuples.

5.9.1. Metadata Transmission
There are nine groups of bands governed by the metadata layouts. They are summarized here.
  class_metadata_bands:
        class_RVA_bands
        class_RIA_bands

  field_metadata_bands:
        field_RVA_bands
        field_RIA_bands

  method_metadata_bands:
        method_RVA_bands
        method_RIA_bands
        method_RVPA_bands
        method_RIPA_bands
        method_AD_bands

  class_RVA_bands:
        *class_RVA_anno_N :UNSIGNED5 [...]
        *class_RVA_type_RS :UNSIGNED5 [...] (cp_Signature)
        *class_RVA_pair_N :UNSIGNED5 [...]
        *class_RVA_name_RU :UNSIGNED5 [...] (cp_Utf8)
        *class_RVA_T :BYTE1 [...]
        *class_RVA_caseI_KI :UNSIGNED5 [...] (cp_Int)
        *class_RVA_caseD_KD :UNSIGNED5 [...] (cp_Double)
        *class_RVA_caseF_KF :UNSIGNED5 [...] (cp_Float)
        *class_RVA_caseJ_KJ :UNSIGNED5 [...] (cp_Long)
        *class_RVA_casec_RS :UNSIGNED5 [...] (cp_Signature)
        *class_RVA_caseet_RS :UNSIGNED5 [...] (cp_Signature)
        *class_RVA_caseec_RU :UNSIGNED5 [...] (cp_Utf8)
        *class_RVA_cases_RU :UNSIGNED5 [...] (cp_Utf8)
        *class_RVA_casearray_N :UNSIGNED5 [...]
        *class_RVA_nesttype_RS :UNSIGNED5 [...] (cp_Signature)
        *class_RVA_nestpair_N :UNSIGNED5 [...]
        *class_RVA_nestname_RU :UNSIGNED5 [...] (cp_Utf8)

  class_RIA_bands:
        *class_RIA_anno_N :UNSIGNED5 [...]
        (analogous to class_RVA_bands)

  field_RVA_bands:
        *field_RVA_anno_N :UNSIGNED5 [...]
        (analogous to class_RVA_bands)

  field_RIA_bands:
        *field_RIA_anno_N :UNSIGNED5 [...]
        (analogous to field_RVA_bands)

  method_RVA_bands:
        *method_RVA_anno_N :UNSIGNED5 [...]
        (analogous to class_RVA_bands)

  method_RIA_bands:
        *method_RIA_anno_N :UNSIGNED5 [...]
        (analogous to method_RIA_bands)

  method_RVPA_bands:
        *method_RVPA_param_NB :BYTE1 [...]
        *method_RVPA_anno_N :UNSIGNED5 [...]
        (analogous to method_RVA_bands)

  method_RIPA_bands:
        *method_RIPA_param_NB :BYTE1 [...]
        *method_RIPA_anno_N :UNSIGNED5 [...]
        (analogous to method_RVPA_bands)

  method_AD_bands
        *method_AD_T :BYTE1 [...]
        *method_AD_caseI_KI :UNSIGNED5 [...] (cp_Int)
        *method_AD_caseD_KD :UNSIGNED5 [...] (cp_Double)
        *method_AD_caseF_KF :UNSIGNED5 [...] (cp_Float)
        *method_AD_caseJ_KJ :UNSIGNED5 [...] (cp_Long)
        *method_AD_casec_RS :UNSIGNED5 [...] (cp_Signature)
        *method_AD_caseet_RS :UNSIGNED5 [...] (cp_Signature)
        *method_AD_caseec_RU :UNSIGNED5 [...] (cp_Utf8)
        *method_AD_cases_RU :UNSIGNED5 [...] (cp_Utf8)
        *method_AD_casearray_N :UNSIGNED5 [...]
        *method_AD_nesttype_RS :UNSIGNED5 [...] (cp_Signature)
        *method_AD_nestpair_N :UNSIGNED5 [...]
        *method_AD_nestname_RU :UNSIGNED5 [...] (cp_Utf8)

As an aid to understanding the metadata layout, here is a brief description of each of the method metadata bands, as used by classfiles which comply with JSR 175. The class and field metadata bands function in a similar way.

Note that JSR 175 does not allow embedded references to CONSTANT_Class entries, even where a reference to a class is required. Instead, JSR 175 requires that references to classes be encoded as field signatures. (Their names are bracketed by 'L' and ';'.) The Pack200 archive transmits all such values as references into cp_Signature, not cp_Class.

For each use of a parameter annotation attribute, the method_RVPA_param_NB band or method_RIPA_param_NB band (for invisible annotations) transmits an unsigned byte indicating the parameter count. For each use of a non-parameter annotation attribute, the method_RVA_anno_N band or method_RIA_anno_N band (for invisible annotations) transmits an annotation count. Likewise, for each annotated parameter, the method_RVPA_anno_N band or method_RIPA_anno_N band (for invisible annotations) transmits an annotation count.

For each visible non-parameter annotation, the method_RVA_type_RS band transmits an annotation's type, and the method_RVA_pair_N band transmits the number of that annotation's member-value pairs. Analogous values for invisible annotations and parameter annotations are transmitted in the bands method_RIA_type_RS, method_RIA_pair_N, method_RVPA_type_RS, method_RVPA_pair_N, method_RIPA_type_RS, and method_RIPA_pair_N. For each member-value pair transmitted as a direct part of a visible non-parameter annotation, the method_RVA_name_RU band transmits the member name. Analogous values for invisible annotations and parameter annotations are transmitted in the bands method_RIA_name_RU, method_RVPA_name_RU, and method_RIPA_name_RU.

For each value transmitted with a visible non-parameter annotation, whether directly, or indirectly via a nested value or annotation, the method_RVA_T band transmits a byte which selects the format of the annotation value, and analogous values are transmitted in the bands method_RIA_T, method_RVPA_T, method_RIPA_T, and (for annotation defaults) method_AD_T, Direct uses of these value tag bands are counted by summing the values of the corresponding preceding pair-count band (method_RVA_pair_N, etc.). This count also includes the sum of the corresponding following nested pair-count band (method_RVA_nestpair_N, etc.) and nested array length bands (method_RVA_casearray_N, etc.).

Since those latter sums come from backward calls in the attribute layout, they cannot be directly computed by the decompressor, but their sum is reported by the compressor as an element of method_attr_calls. (Note that the last callable in each metadata layout is the target of two backward calls from inside itself.) That band contains these backward call counts for method_RVA_T, method_RIA_T method_RVPA_T, method_RIPA_T method_AD_T, in that order. If there are no occurrences of a method metadata attribute, then the corresponding backward call is omitted. (Thus, there are up to five backward call counts transmitted for method metadata.) If there are compressor-defined recursive layouts used in the archive, their backward call counts follow the counts for metadata in method_attr_calls.

For each value tag of 'B', 'C', 'I', 'S', or 'Z', there is a corresponding element transmitted in method_RVA_caseI_KI which supplies the value as a cp_Int reference. Analogous integer references within invisible and parameter annotations and annotation defaults are transmitted in the bands method_RIA_caseI_KI, method_RVPA_caseI_KI, method_RIPA_caseI_KI, and method_AD_caseI_KI. For each value tag of 'e', the bands method_RVA_caseet_RS and method_RVA_caseec_RU transmit the signature of the class and name of the member of an enumeration constant, as references into cp_Signature and cp_Utf8. For each value tag of '[', the band method_RVA_casearray_N transmits the length of a nested value array. For each value tag of '@', the bands method_RVA_nesttype_RS and method_RVA_nestpair_N transmit the class signature of a nested annotation and the number of its pairs. For each pair in such a nested annotation, the band method_RVA_nestname_RU transmits the name of the pair.

The bands in the following table transmit appropriately-typed constant pool references for each occurrence of specific tag characters.

Tag(s) | Band | Reference
'B','C','I','S','Z' | method_RVA_caseI_KI | cp_Int
'D' | method_RVA_caseD_KD | cp_Double
'F' | method_RVA_caseF_KF | cp_Float
'J' | method_RVA_caseJ_KJ | cp_Long
'c' | method_RVA_casec_RS | cp_Signature
'e' | method_RVA_caseet_RS method_RVA_caseec_RU | cp_Signature cp_Utf8
's' | method_RVA_cases_RU | cp_Utf8

Analogous groups of bands transmit values within the other four method annotation types, and within the visible and invisible annotations of classes and fields.

5.10. Bytecode Instructions

The last part of the Pack200 archive is a series of bands transmitting the bytecodes themselves. The bytecodes of each method code are parsed into instructions and operands transmitted in their own bands. Each method code corresponds to a run of bytecodes which ends with the distinguished code value 0xFF (255), which serves as an end marker. (Note that it is unusual for band data to be delimited by an end marker: Usually it is sized by a count in a previous band.)

Here are the bands which transmit bytecode instructions:

  bc_bands:
        *bc_codes :BYTE1 [...]
        *bc_case_count :UNSIGNED5 [COUNT(switch,*bc_codes)]
        *bc_case_value :DELTA5 [...]
        *bc_byte :BYTE1 [...]
        *bc_short :DELTA5 [...]
        *bc_local :UNSIGNED5 [...]
        *bc_label :BRANCH5 [...]
        *bc_intref :DELTA5 [...] (cp_Int)
        *bc_floatref :DELTA5 [...] (cp_Float)
        *bc_longref :DELTA5 [...] (cp_Long)
        *bc_doubleref :DELTA5 [...] (cp_Double)
        *bc_stringref :DELTA5 [...] (cp_String)
        *bc_loadablevalueref :DELTA5 [...] (cp_LoadableValue)
        *bc_classref :UNSIGNED5 [...] (current class or cp_Class)
        *bc_fieldref :DELTA5 [...] (cp_Field)
        *bc_methodref :UNSIGNED5 [...] (cp_Method)
        *bc_imethodref :DELTA5 [...] (cp_Imethod)
        *bc_indyref :DELTA5 [...] (cp_InvokeDynamic)
        *bc_thisfield :UNSIGNED5 [...] (cp_Field, only for current class)
        *bc_superfield :UNSIGNED5 [...] (cp_Field, only for current super)
        *bc_thismethod :UNSIGNED5 [...] (cp_Method, only for current class)
        *bc_supermethod :UNSIGNED5 [...] (cp_Method, only for current super)
        *bc_initref :UNSIGNED5 [...] (cp_Field, only for most recent new)
        *bc_escref :UNSIGNED5 [COUNT(ref_escape,*bc_codes)] (cp_All)
        *bc_escrefsize :UNSIGNED5 [...]
        *bc_escsize :UNSIGNED5 [...]
        *bc_escbyte :BYTE1 [...]

In order to transmit bytecode instructions more efficiently, some instructions may be rewritten into a transmission form. The ldc, ldc_w, and ldc2_w bytecodes must be rewritten by the compressor into strongly-typed operations; see below. Some getstatic, putstatic, getfield, putfield, invokevirtual, invokespecial, and invokestatic bytecodes may (at the compressor's option) be rewritten into more specialized and compact forms which, because they are context sensitive, select their operands from a smaller set of possibilities.

In all cases, the first byte of each instruction (perhaps rewritten) is determined by a byte transmitted in bc_codes. All operand bytes are decoded into operands and transmitted in separate bands according to the type of operand encoded. The padding bytes of switch instructions and the last two bytes of invokeinterface instructions are discarded, because they can be reconstructed by the decompressor.

A "wide" prefix bytecode is transmitted in bc_codes. The instruction following the prefix is decoded in its wide format, but (except in the case of iinc) it is transmitted in the same way, and using the same bands, as the normal (non-wide) format. The wide format of the iinc instruction uses bc_short instead of bc_byte to transmit its second operand.

Every branch instruction transmits its target (or targets, in the case of the switches) in the bc_label band, encoded as the difference between the renumbered BCI of the branch target and the renumbered BCI of the branch itself. (The renumbering, as described in the section Attribute Layout Definition, numbers the first instruction as zero, the second as one, and so forth.) Differences between renumbered BCIs are very compact; the primary encoding of BRANCH5 also takes advantage of the fact that most such differences are positive, because most branches are forward branches.

The bc_classref band carries incremented indexes into the cp_Class constant pool. The incrementing (by unity) reserves the code zero, which always refers to the current class. (This provides a a compact form for the most common class reference, which is a self-reference.)

The bc_byte and bc_short bands carry fixed-sized operands. These operands are not transmitted as general 32-bit integers because their instructions, as originally defined, already serve as specially compressed transmission formats. Integer values of these bands are treated as unsigned, even when they are semantically signed as operands. The bc_byte band is used for the last operands of multianewarray and non-wide iinc instructions, and for the operands of bipush and newarray instructions. The bc_short band is used for the last operands of wide iinc instructions, and for the operands of sipush instructions.

The bands bc_intref, bc_floatref, bc_longref, bc_doubleref, bc_stringref, bc_fieldref, bc_methodref, and bc_imethodref transmit ordinary indexes into the constant pools cp_Int, cp_Float, cp_Long, cp_Double, cp_String, cp_Field, cp_Method, and cp_Imethod, respectively.

The band bc_indyref transmits indexes into cp_InvokeDynamic, for invokedynamic instructions.

The band bc_loadablevalueref transmits indexes into the constant pool group cp_LoadableValue, such that zero refers to the first CONSTANT_Integer constant, and so on. It is transmitted immediately after bc_stringref. (Typically, this band is used for cp_MethodHandle constants.)

(The invokedynamic instructions may only appear when #archive_majver is 170 or higher. They and their related constant pool types were introduced in recent revisions of the classfile format.)

For every lookupswitch or tableswitch instruction, the number of cases is transmitted in bc_case_count, and the default label is transmitted in bc_label. Each case value and case target of a lookupswitch is transmitted in bc_case_value and bc_label, respectively. The initial case value of a tableswitch is transmitted in bc_case_value, and each of its case targets is transmitted in bc_label.

If the first byte of an instruction has a code in the range [202..255], or if an instruction's operands cannot be parsed according to the requirements of this specification, it is a non-standard instruction. Every byte of a non-standard instruction must be transmitted in a special envelope in order to warn the decompressor to accept it literally. The envelope consists of a series of "byte_escape" and "ref_escape" opcodes in the bc_code band, corresponding sizes in bc_escsize and bc_escrefsize, bytes in bc_escbyte, and constant pool references in bc_escref. Every constant pool reference in a non-standard instruction must be escaped and transmitted in the bc_escref band. Each ref_escape wraps one such constant pool reference, of size up to four bytes. The transmitted reference is an index into cp_All, such that zero refers to the first CONSTANT_Utf8 constant, and so on.

Escape Opcode | Size Operand | Operand Size | Size Band | Data Band | Opcode Value
byte_escape | N<=255 | N bytes | bc_escsize | bc_escbyte | 254
ref_escape | N<=2 | N bytes | bc_escrefsize | bc_escref | 253

There is no need for special transmission of any other operand type within non-standard instructions, because the Pack200 format exactly preserves all instruction bytes except for constant pool references. This specification does not address the means by which compressors adapt to the presence and format of non-standard instructions. It simply requires decompressors to decode them correctly.

Here is a table of the specially rewritten transmission forms for instructions:

Original Instruction | Operand | Transmission Instruction | Rewrite Required? | Opcode
ldc | cp_String[i] | sldc | yes | 18 (=ldc)
ldc | cp_Class[i] | cldc | yes | 233
ldc | cp_Int[i] | ildc | yes | 234
ldc | cp_Float[i] | fldc | yes | 235
ldc_w | cp_String[i] | sldc_w | yes | 19 (=ldc_w)
ldc_w | cp_Class[i] | cldc_w | yes | 236
ldc_w | cp_Int[i] | ildc_w | yes | 237
ldc_w | cp_Float[i] | fldc_w | yes | 238
ldc2_w | cp_Long[i] | lldc2_w | yes | 20 (=ldc2_w)
ldc2_w | cp_Double[i] | dldc2_w | yes | 239
ldc | cp_LoadableValue[i] | qldc | yes | 240
ldc_w | cp_LoadableValue[i] | qldc_w | yes | 241
getstatic | (this class member) | getstatic_this | no | 202
putstatic | (this class member) | putstatic_this | no | 203
getfield | (this class member) | getfield_this | no | 204
putfield | (this class member) | putfield_this | no | 205
invokevirtual | (this class member) | invokevirtual_this | no | 206
invokespecial | (this class member) | invokespecial_this | no | 207
invokestatic | (this class member) | invokestatic_this | no | 208
aload_0; getstatic | (this class member) | aload_0_getstatic_this | no | 209
aload_0; putstatic | (this class member) | aload_0_putstatic_this | no | 210
aload_0; getfield | (this class member) | aload_0_getfield_this | no | 211
aload_0; putfield | (this class member) | aload_0_putfield_this | no | 212
aload_0; invokevirtual | (this class member) | aload_0_invokevirtual_this | no | 213
aload_0; invokespecial | (this class member) | aload_0_invokespecial_this | no | 214
aload_0; invokestatic | (this class member) | aload_0_invokestatic_this | no | 215
getstatic | (super class member) | getstatic_super | no | 216
putstatic | (super class member) | putstatic_super | no | 217
getfield | (super class member) | getfield_super | no | 218
putfield | (super class member) | putfield_super | no | 219
invokevirtual | (super class member) | invokevirtual_super | no | 220
invokespecial | (super class member) | invokespecial_super | no | 221
invokestatic | (super class member) | invokestatic_super | no | 222
aload_0; getstatic | (super class member) | aload_0_getstatic_super | no | 223
aload_0; putstatic | (super class member) | aload_0_putstatic_super | no | 224
aload_0; getfield | (super class member) | aload_0_getfield_super | no | 225
aload_0; putfield | (super class member) | aload_0_putfield_super | no | 226
aload_0; invokevirtual | (super class member) | aload_0_invokevirtual_super | no | 227
aload_0; invokespecial | (super class member) | aload_0_invokespecial_super | no | 228
aload_0; invokestatic | (super class member) | aload_0_invokestatic_super | no | 229
invokespecial | (this class <init>) | invokespecial_this_init | no | 230
invokespecial | (super class <init>) | invokespecial_super_init | no | 231
invokespecial | (new class <init>) | invokespecial_new_init | no | 232
invokespecial | cp_Imethod[i] | invokespecial_int | yes | 242
invokestatic | cp_Imethod[i] | invokestatic_int | yes | 243

The qldc and qldc_w instructions use indexes into the constant pool group cp_LoadableValue to select arbitrary loadable constants. (These instructions may only appear when #archive_majver is 170 or higher. Early versions of the classfile format do not require them.) Decompressors are required to accept any constant reference as an operand to one of these instructions, but compressors are encouraged to transmit only constants which cannot be encoded by other variants of ldc, specifically elements of cp_MethodHandle and cp_MethodType.

(Note: A previous version of this specification referred to the string-bearing variants of ldc, sldc and sldc_w, as aldc and aldc_w. Despite the new names, the code points and their interpretation have not changed. The old names are deprecated.)

Every bytecode instruction is contained by a class, called the current class. The superclass (if any) of the current class is the current super class. The operand of the textually most recent "new" instruction (in the same method) is called the current new class.

If an instruction refers to a field or method in the current class, it may (at the compressor's option) be rewritten for transmission as a corresponding opcode spelled with "_this". Likewise, an instruction referring to a field or method in the current super class may be rewritten as a corresponding opcode spelled with "_super". In either case, if the immediately preceding instruction is aload_0 (opcode 42), the transmission of that instruction may be suppressed by the compressor, and the corresponding opcode spelled with "aload_0_" selected instead; otherwise the "aload_0_" variant may not be selected.

If an invokespecial instruction refers to a method named <init> in the current class, the current super class, or the current new class, the compressor may choose to rewrite it as an invokespecial_this_init, invokespecial_super_init, or invokespecial_new_init, respectively.

If an invokespecial or an invokestatic instruction has an operand of type CONSTANT_InterfaceMethodref, then the compressor must transmit those methods using the pseudo-instructions invokespecial_int and invokestatic_int respectively. These instructions may only appear when #archive_majver is 171 or higher.

Field (resp. method) operands of rewritten instructions spelled with "_this" (but not "_init") are transmitted in the special band bc_thisfield (resp. bc_thismethod). The numbering of these operands is defined by taking the sequence of symbols in cp_Field (resp. cp_Method) and selecting only members of the current class. The resulting subset, without changing its order, is renumbered starting with zero. This provides a compact mapping of small integers to members of the current class.

Likewise, operands of rewritten instructions spelled with "_super" (but not "_init") are transmitted in the bc_superfield or bc_supermethod band, and renumbered as a subset of cp_Field or cp_Method, selecting only members of the current super class.

Finally, operands of the rewritten instructions spelled with "_init" are transmitted in the band bc_initref, and renumbered as a subset of cp_Method, selected according to the appropriate class (current, current super, or current new), and also selected to have the name <init>. (The index transmitted is usually very small; in effect it selects only the signature of the invoked method, and most classes possess only a few constructors.)

Here is a table summarizing the transmission of instructions of more than one byte.

Instruction | Operand | Transmitted Value | Band
bipush | (byte) x | x & 0xFF | bc_byte
sipush | (short) x | x & 0xFFFF | bc_short
ildc | cp_Int[i] | i | bc_intref
fldc | cp_Float[i] | i | bc_floatref
sldc | cp_String[i] | i | bc_stringref
qldc | cp_LoadableValue[i] | i | bc_loadablevalueref
cldc | current class | 0 | bc_classref
cldc | cp_Class[i] | i+1 | bc_classref
ildc_w | cp_Int[i] | i | bc_intref
fldc_w | cp_Float[i] | i | bc_floatref
sldc_w | cp_String[i] | i | bc_stringref
qldc_w | cp_LoadableValue[i] | i | bc_loadablevalueref
cldc_w | current class | 0 | bc_classref
cldc_w | cp_Class[i] | i+1 | bc_classref
lldc2_w | cp_Long[i] | i | bc_long
dldc2_w | cp_Double[i] | i | bc_double
*load | locals[i] | i | bc_local
*store | locals[i] | i | bc_local
ret | locals[i] | i | bc_local
iinc | locals[i] | i | bc_local
iinc (not wide) | (byte) x | x & 0xFF | bc_byte
iinc (wide) | (short) x | x & 0xFFFF | bc_short
if** | pc | (delta/renumbered) | bc_label
if_** | pc | (delta/renumbered) | bc_label
goto | pc | (delta/renumbered) | bc_label
jsr | pc | (delta/renumbered) | bc_label
goto_w | pc | (delta/renumbered) | bc_label
jsr_w | pc | (delta/renumbered) | bc_label
tableswitch | case count | count | bc_case_count
tableswitch | default pc | (delta/renumbered) | bc_label
tableswitch | first case value | value | bc_case_value
tableswitch | each case pc | (delta/renumbered) | bc_label
lookupswitch | case count | count | bc_case_count
lookupswitch | default pc | (delta/renumbered) | bc_label
lookupswitch | each case value | value | bc_case_value
lookupswitch | each case pc | (delta/renumbered) | bc_label
new | current class | 0 | bc_classref
new | cp_Class[i] | 1+i | bc_classref
newarray | type code | value | bc_byte
anewarray | current class | 0 | bc_classref
anewarray | cp_Class[i] | 1+i | bc_classref
checkcast | current class | 0 | bc_classref
checkcast | cp_Class[i] | 1+i | bc_classref
instanceof | current class | 0 | bc_classref
instanceof | cp_Class[i] | 1+i | bc_classref
multianewarray | cp_Class[i] | 1+i | bc_classref
multianewarray | rank | rank & 0xFF | bc_byte
getstatic | cp_Field[i] | i | bc_fieldref
putstatic | cp_Field[i] | i | bc_fieldref
getfield | cp_Field[i] | i | bc_fieldref
putfield | cp_Field[i] | i | bc_fieldref
invokevirtual | cp_Method[i] | i | bc_methodref
invokespecial | cp_Method[i] | i | bc_methodref
invokestatic | cp_Method[i] | i | bc_methodref
invokeinterface | cp_Imethod[i] | i | bc_imethodref
invokespecial_int | cp_Imethod[i] | i | bc_imethodref
invokestatic_int | cp_Imethod[i] | i | bc_imethodref
invokedynamic | cp_InvokeDynamic[i] | i | bc_indyref
**_this | this_fields[i] | i | bc_thisfield
**_this | this_methods[i] | i | bc_thismethod
**_super | super_fields[i] | i | bc_superfield
**_super | super_methods[i] | i | bc_supermethod
invokespecial_this_init | this_constructors[i] | i | bc_initref
invokespecial_super_init | super_constructors[i] | i | bc_initref
invokespecial_new_init | new_constructors[i] | i | bc_initref

6. Specification of Band Coding

A Pack200 band consists of a sequence of small integers, each of which is representable in 32 bits. Depending on the intended use of these numbers, they may be interpreted to possess a twos-complement sign.

Each integer is coded for transmission as a byte sequence, using between one and five bytes, according to a previously determined encoding. The encoding may by a primary encoding for the current band as specified as part of this Pack200 archive format specification, or the encoding may depend on information transmitted before the occurrence of the encoded integer.

(Note: In this account of encodings, bytes are indivisible octets which express unsigned values in [0,255].)

6.1. Encoding of Small Whole Numbers

There is a small but flexible set of possible encodings allowed by the archive. They are all based on a two-parameter scheme of codings for small unsigned integers, which is further parameterized by options for sign representation and delta encoding, and by special modes for slowly varying encodings, and for the compact renaming of frequent values.

6.1.1. Scheme of Multiple Codings

The encoding of a small whole number depends on two independent parameters B and H, and a derived parameter L:
Name | Range | Meaning
B | [1..5] | maximum byte length
H | [1..256] | number of high byte values
L | [0..255] | number of low byte values, defined as (256-H)

Given any two values B and H, there is a coding (B,H) which establishes a one-to-one correspondence between an initial sequence of non-negative integers, and an "encoding sets" of short sequences of bytes.

Moreover, no byte sequence in the encoding set is a proper prefix of another byte sequence in the same set. prefix. This means, informally, that encodings are self-sizing, or "parseable".

Also, the encoding set is as full as possible, so that every long-enough sequence of bytes begins with a unique prefix of bytes drawn from the encoding set. In particular, every sequence of B bytes has a (unique) prefix in the encoding set for the (B,H) coding.

6.1.2. Definition of Encoding Byte Sequences

Relative to a given (B,H) coding, we say that a byte is "high" if its value is in the range [256-H..255]. We also say that a byte is "low" if L is positive and the byte's value is in the range [0..L-1]

Given a (B,H) coding, a sequence of bytes is in its encoding set if and only if all of the following are true:

  • the sequence contains at least one and no more than B bytes
  • all bytes except the last are "high"
  • either the last byte is "low", or else the sequence has B bytes

As a consequence of this definition, the encoding set be regarded as satisfying this regular expression, in terms of high and low bytes:

  encoding_set = (high* low) | (high)^B

(Note: In this specification the up-caret sign '^' denotes exponentiation, either of regular expressions as above, or of numbers.)

If n is less than B then the number of (B,H) encodings of length exactly n is (H^(n-1) * L). The number of (B,H) encodings of length exactly B is (H^(B-1) * (L+H)). The sum of these values for all n in [1..B] is the total size of the encoding set for a (B,H) coding. It is called Card(B,H) and is therefore defined as:

  Card(B,H) = (L * (1-H^B)/(1-H)) + H^B
    if H>1, or else
  Card(B,1) = B*255+1

If H is 256, there are no low bytes, and the encoding set consists of all possible sequences of exactly B bytes, and Card(B,H) is 256^B.

Otherwise, the encoding set consists of sequences of various lengths, from 1 to B inclusive. In particular, there are L one-byte sequences. We will use these elsewhere to encode the "favored" integers of the highest frequency. Note that the encoding rules specified elsewhere in this document are designed to produce smaller integers more frequently than larger ones.

Note that L can be viewed as a "sharpness" parameter, expressing the sharpness of the distribution about zero of the expected values to be encoded. The larger L is, the more the encoding favors distributions of values which are close to zero, and rarely far from it. Larger H values favor "flatter" distributions, up to H=256, L=0, which favorably encodes completely random data within the range of the coding.

6.1.3. Definition of Decoded Whole Number Values

The range of a (B,H) coding is the integers in [0..Card(B,H)-1]. (Note that this range applies only to the unsigned codings introduced so far in this section.)

Given the sequence of N byte values b[0] .. b[N-1], the sorting-based definition given above implies that the decoded integer value of this byte sequence is the little-endian base-H scaled sum of the bytes, and is called Decode(B,H; b):

  Decode(B,H; b[*]) = Sum[0<=i<N]( b[i] * H^i )

As a consequence of this definition, each byte sequence in the encoding set corresponds uniquely to an arithmetic integer value in that range. This correspondence may be observed by ordering the byte sequences first by length, and second according to their antilexicographic (little-endian) order. Each element in resulting sequence decodes into its own zero-based index within the sequence.

Note that the number zero is always encoded by a sequence of B zero bytes (if H is 256) or else by single zero byte.

The largest encoded arithmetic value is always encoded by a sequence of B bytes of value 255.

Note that the (B,H) encodings (1,256), (2,256), and (4,256) are identical with the conventional little-endian representations of unsigned bytes, unsigned 16-bit integers, and unsigned 32-bit integers.

Note that some may represent arithmetic values greater than 2^31-1 or even 2^32-1. This is a feature of the (B,H) coding scheme. (But sometimes intermediate 64-bit values are required when multiple sign bits are being used, as described below. The rules given below for signed values require the compressor to emit the simplest encoding that will suffice to transmit the required 32-bit integer, even if more complex sequences would produce the same 32-bit value, after truncation.)

Note that implementations are not always free to truncate intermediate values when computing (B,H) coding values. However, the final decoded values (after restoration of signs) will always fit in 32 bits, as described in the next section.

6.2. Encoding of Signed Integers

In order to encode signed 32-bit numbers we add another parameter to the (B,H) coding scheme.
Name | Range | Meaning
B | [1..5] | maximum byte length
H | [1..256] | number of high byte values
L | [0..255] | number of low byte values, defined as (256-H)
S | [0..2] | number of sign bits

The whole number U obtained from a (B,H) coding is converted to a signed 32-bit value X in a manner which depends on the parameter S. This process is called sign conversion.

Informally, sign conversion is performed by 32-bit truncation if S=0. Otherwise, the low-order bits of U are collectively treated as a sign bit, so that X will be negative only if all sign bits are set. The two conversions from U to positive X and U to negative X are independently dense and monotonic in opposite directions, as defined below.

Unlike the (B,H) coding, a (B,H,S) coding represents only numbers in a specifically defined range, which is never larger than [-2^31..2^31-1].

In what follows, for each (B,H,S) coding, we define Range(B,H,S), and the method used to represent 32-bit signed values with that coding.

A (B,H) encoding byte sequence is not a legal input to a corresponding (B,H,S) coding if it represents a whole number U which does not convert into the range of the (B,H,S) coding. Also, if there are two byte sequences encoding values U1 and U2 which both map into the same point X in the signed range, only the byte sequence for the smaller of U1 and U2 is legal.

Thus, a (B,H,S) coding may have a smaller cardinality than the corresponding (B,H) coding, due to illegal encoding byte sequences.

The range of a (B,H,S) coding contains all 32-bit signed integers [-2^31..2^31-1] if Card(B,H) is 2^32 or more. (Negative values are represented by 31-bit unsigned overflow.) If the coding encodes fewer unsigned values, the top of its range is clipped to 2^31-1, and the bottom of its range is clipped to -2^31.

More precisely, the range of a (B,H,S) coding is called Range(B,H,S) and is defined (partially, for S=0) as:

  Range(B,H,S) = [-2^31..2^31-1]
    if S=0, Card(B,H) >= 2^32, or
  Range(B,H,S) = [0..2^31-1]
    if S=0, 2^31 < Card(B,H) < 2^32, or else
  Range(B,H,S) = [0..Card(B,H)-1]
    if S=0, Card(B,H) <= 2^31
A compressor is not allowed to emit a byte sequence which, when interpreted according to the current coding, decodes to a value outside of that coding's range.

(Note that decompressors can produce arbitrary answers for out-of-range codings, since compressors are not allowed to emit them. This allows decompressors to use 32-bit arithmetic for most calculations, ignoring the possibility of undesired wraparond.)

If S>0, the decoding of a byte sequence is performed first by decoding it as a (B,H) coding, and then by converting the decoded whole number into a signed 32-bit number. This sign conversion depends only on the arithmetic value U obtained from the (B,H) coding, and on the value of S. The arithmetic value must be preserved beyond 32 bits of precision, if the sign conversion will produce a value within the range of the coding. If the cardinality of the (B,H) coding is 2^32 or more, the (B,H,S) coding produces all possible signed 32-bit negative values, by 32-bit truncation of the intermediate unsigned whole number. The intermediate unsigned arithmetic can be carried out (with some care) using 32-bit unsigned numbers, or it can be carried out on 64-bit signed or unsigned numbers.

More precisely, the sign conversion operation SignConvert(S;U) is defined as:

  SignConvert(S; U) = Cast32(U)
    if S==0; or
  SignConvert(S; U) = U - Floor(U / 2^S)
    if S>0, (U % 2^S) < 2^S-1, Card(B,H) < 2^32
  SignConvert(S; U) = Cast32(U - Floor(U / 2^S))
    if S>0, (U % 2^S) < 2^S-1, Card(B,H) >= 2^32
  SignConvert(S; U) = -Floor(U / 2^S)-1
    if S>0, (U % 2^S) == 2^S-1
The conversion from a large unsigned number of a negative 32-bit number via wraparound is simply the familiar down-cast to a signed 32-bit int. It may be defined mathematically as:
  Cast32(U) = ((U + 2^31) mod 2^32) - 2^31
6.2.1. Further Discussion of Sign Conversion
Note that sign conversion always maps zero to zero. The reader may also verify that, if S>0, the range of SignConvert includes [-1..1], and that it is dense and monotonic in any wholly positive or wholly negative sub-range.

As a consequence of the definition of SignConvert(S;U), the S low-order bits of U function as a sign bit. In effect, U is partitioned into a sign field U0 (consisting of the S low-order bits) and a significand U1 (consisting of all other bits of U).

In this alternative view of the definition of SignConvert, if all S bits of U0 are set, then the decoded signed value is the ones complement of U1. (Since this includes the indefinite number of zero high-order bits of U, the resulting value is arithmetically negative.)

Otherwise, if some of the S bits of U0 are clear, then the significand U1 is scaled by the number of possible values of U0 (i.e., (2^2)-1 if S is 2) and U0 is added back in.

This provides a one-to-one correspondence between some portion of the arithmetic interval [0..Card(B,H)-1] and Range(B,H,S).

The integers "favored" by this encoding are those of small magnitude, but they can have either sign. If S is one, the encoding has a balanced number of positive and negative favored values. If S is two (or more), the encoding is skewed toward positive numbers, but also favors a few negative numbers. We use such codings elsewhere to encode values, such as branch displacements or deltas of mostly-sorted data, which are usually positive but sometimes negative.

Note that if S=1, this definition of sign conversion is equivalent to an unsigned right shift followed by an exclusive-or of the sign bit with all remaining bits:

  SignConvert(1; U) = (U >>> 1) ^ -(U & 1)

For S>0, Range(B,H,S) is simply defined as the intersection of the 32-bit signed range [-2^31..2^31-1] with the set SignConvert(S; [0..Card(B,H)-1]), obtained by element-wise application of sign conversion to every arithmetically representable value of (B,H). Therefore, we can complete the definition of Range as follows:

  Range(B,H,S) = [-2^31..2^31-1]
    if Card(B,H) >= 2^32, or
  Range(B,H,S) = [0..2^31-1]
    if S=0, 2^31 < Card(B,H) < 2^32, or else
  Range(B,H,S) = [0..Card(B,H)-1]
    if S=0, Card(B,H) <= 2^31

  Range(B,H,S) = [max(  -2^31, min SignConvert(S; Range(B,H,0)) )
               .. min( 2^31-1, max SignConvert(S; Range(B,H,0)) )]

(Note: When computing the bounds of a signed encoding (B,H,S), it is useful to start with the largest unsigned value M of (B,H,0) and perform sign-conversion on M, M-1, M-2, etc., noting the first positive and the first negative value to be encountered. These will be the inclusive bounds of the signed encoding's range.)

6.3. Attributes of Codings

The cardinality of a (B,H) coding was defined above:
  Card(B,H) = (L * (1-H^B)/(1-H)) + H^B

The cardinality of a (B,H,S) coding is determined by that of its range:

  Card(B,H,S) = Card Range(B,H,S) <= Card(B,H)

As defined, the range of any coding (B,H,S) is dense about zero and can therefore be expressed as a closed interval:

  Range(B,H,S) = [Min(B,H,S)..Max(B,H,S)]
  -2^31 <= Min(B,H,S) <= 0
  0     <  Max(B,H,S) <= 2^31-1

Certain additional attributes can be predicated of codings. A coding can either be signed or not, and it can be a full-range coding, or a sub-range coding (or neither).

A (B,H,S) coding is signed if it can encode at least one negative value. This is true if and only if S is non-zero or S is zero and Card(B,H) is 2^32 or more.

A (B,H,S) coding is full-range if Range(B,H,S) is [-2^31..2^31-1].

A sub-range coding delivers less than 2^31 distinct values. More precisely, a coding (B,H,S) is sub-range if Card(B,H,S) <= 2^31-1. (Some codings are neither full-range nor sub-range codings.)

As a consequence of these definitions, any coding for which B<=3 is a sub-range coding. Longer codings can also be sub-ranges if they are "sharp" enough. Some examples are (4,192,0), (5,32,0), and (5,32,1).

Also, the unsigned coding (4,256,0) is full-range, as is the signed version (4,256,1), but not the doubly-signed version (4,256,2).

The coding (4,255,0) is neither a sub-range nor a full-range coding, since its cardinality is 2^31. It represents only non-negative 32-bit integers, but its cardinality cannot be so represented.

6.4. Encoding of Correlated Sequences

Every single integer in the archive format is encoded according to some coding in the scheme of (B,H,S) codings. In addition, special attention is paid to sequences of integers (in the "bands" described elsewhere) which show statistical regularity. In particular, if a sequence of integers is found to exhibit a pattern of small, regular first-order differences, those differences may be encoded in place of the values themselves. This is described by a fourth coding parameter added to the (B,H,S) scheme.
Name | Range | Meaning
B | [1..5] | maximum byte length
H | [1..256] | number of high byte values
L | [0..255] | number of low byte values, defined as (256-H)
S | [0..2] | number of sign bits
D | [0..1] | delta encoding order

If D is zero, no differencing is performed, and the (B,H,S,0) coding is in all ways identical to the corresponding (B,H,S) coding. If D is one, the values are encoded in terms of their successive differences.

(Note: Sequences which are mostly monotonically ascending will often be favorably encoded using unsigned delta codings of the form (5,H,0,1).)

Suppose a sequence of values X[i] is given, for some range of i in [0..N-1]. This sequence will be representable by a (B,H,S,1) coding only if the (B,H,S) coding is a sub-range or a full-range coding. (If it is neither, there is no legal (B,H,S,1) coding.)

The sequence X[i] will be representable, only if there is a series of "delta values" D[i] whose partial sums Sum[j<=i](D[j]) can represent the values X[i].

Each (B,H,S,1) coding has a range, in which all X[i] values must lie. This range is defined as Range(B,H,S,1) = Range(B,H,0). The range of a delta coding (B,H,S,1) contains negative numbers only if it is based on a full-range coding (B,H,S). Otherwise, the delta coding can only represent non-negative numbers. In practice, this is not a severe restriction, since in practice very few band elements are negative.

The partial sums Sum[j<=i](D[j]) are allowed to leave the range, but the final X[i] values are always brought back into range by adding or subtracting a multiple of Card Range(B,H,0).

More precisely:

  X[i] = Sum[j<=i](D[j]) mod Card(B,H,0)
    if (B,H,S) is sub-range
  X[i] = (int32) Sum[j<=i](D[j])
    if (B,H,S) is full-range
(Here, the cast to int32 denotes truncation to 32 bits.)

Note that implementations can simply ignore 32-bit wraparound when computing partial sums, if the coding is full-range. Otherwise, more care must be taken to bring partial sums back into range by subtracting or adding multiples of the range cardinality. Also, 32-bit wraparound may be a hazard for ranges of size 2^30 or more. It is possible to implement this using only 32-bit signed arithmetic.

6.5. Encodings of Uncorrelated Values

The coding methods described so far are designed to favor values which, on average, tend to be near zero or near the preceding value. Some data sets have marked statistical patterns in which values have only weak arithmetic relations (to zero or to each other), but which show strong repetitive patterns, especially in their first-order statistics.

The compressor may elect to use a population-based coding transformation in such cases. This transformation takes a sequence S of N arithmetic values and converts it into three value sequences:

  • F a table (arbitrary length K+1 << N) of favored values
  • T a sequence (length N) of value tokens
  • U a sequence (length << N, depends on T) of unfavored values

Each of these sequences (F, T, and U) is in turn treated as a sub-band, and transmitted with an independent encoding. Each non-zero value in T indexes a value from F, while each zero value in T selects (in order) a value from U:

  S[i] = F[T[i]-1]
    if T[i] != 0
  U = { S[i] such that T[i] == 0 }
6.5.1. Table of Favorites
The table F contains any number of integer values. There is no restriction on their number or identity, except that no value in F may be repeated, except the last, and F must not contain unused values. The last value in F must be a repetition of an earlier occurrence of a "sentinel value" of F. This sentinel marks the end of the table F, allowing the decompressor to prepare to read T and U.

The "central value" X of F is defined as that element of F which is arithmetically closest to zero. If F contains both a positive X and a negative -X of minimal absolute value, then -X is defined as the central value. (I.e., a negative sign is the tie-breaker. The central value is chosen so as to have a favorable encoding.)

(Note that implementations may compare values for centrality by using the 32-bit signed int expression (X>>31)^(X<<1) as an unsigned comparison key.)

A valid sentinel value is either the central value of F, or the last value of F. Thus, while parsing F, the decompressor must look for a repetition of either the central value (so far) or of the immediately previous value.

Let K be the number of values in F, ignoring the repetition of the sentinel value. In the next band, values in [1..K] will refer (as 1-origin indexes) to corresponding elements of F.

6.5.2. Sequence of Tokens
The sequence T follows the table F, and encodes the input of the population transformation in a direct, element-by-element manner.

Each element of T is a token for either a favored or an unfavored value, encoded in the arithmetic range [0..K]. Each non-zero value corresponds in order to an element of F, and produces that favored value. Each zero value in T is a placeholder for an "unfavored" value, which is still unknown.

As mentioned above, each element of F must be referred to by at least one element of T. That is, the following two sets must be the same:

  { F[T[i]-1] such that T[i] != 0 }
  { F[j] }

The statistics of the sequence T are quite favorable for compact encoding in a suitable (B,H) scheme, assuming that the coder made good choices for the contents of F. Generally speaking, the most commonly occurring input values should be given early positions in F.

A greedy algorithm could sort the input values by number of occurrences and place the most common values at the front of F. This would be likely to produce an improved encoding for the input. Such techniques are neither mandated nor discouraged by this specification.

6.5.3. Sequence of Unfavored Values
The third subsequence consists of values which were not representable by indexes into the table F. Let Z be the number of zeroes encountered in T. There is a ordered, one-to-one correspondence between the Z zeroes in T and all the Z values of U.

Taken together, the elements of F and U selected by the elements of T must be identical in value and order to the input of the population transformation.

The decompressor can then read F into memory, read T into memory, and then make a second pass over T, translating token values, either referring to F or reading from U as necessary.

6.6. Adaptive Encodings

Sometimes, in a very long sequence of values, the statistics will change slowly, making an initially suitable coding tactic become unsuitable.

An adaptive coding method handles this situation by allowing value sequences to be partitioned (effectively into sub-bands), with an independent coding used locally in each part.

An adaptive coding method is specified by a count K, a coding method A which will be used to encode K values, and another coding method B which will handle the rest of the values.

Since bands are sized by context, when an adaptive coding method is applied to the bytes of an encoded band, the method will be provided in advance with the count N of values to decode. Thus, after the method A has decoded K values, the method B will be used to decode the rest of the (N-K) values in the band.

6.7. Meta-Coding

Every band in the Pack200 archive format whose primary encoding is not BYTE1 is optionally preceded by a series of bytes called a band coding specifier which specify a secondary coding or codings used in that band, instead of the primary coding. The decompressor must parse this coding specifier and save it away before it reads any of the band elements. In a few extra bytes of information, the coding specifier determines exactly how the subsequent bytes are to be decoded into band values.

Any compressor may elect not to provide a band coding specifier, in which case the band's primary encoding governs the transmission of elements. If the encoding of the first band element under the primary encoding accidentally appears to be a band coding specifier, the compressor is obligated to transmit an explicit band coding specifier that reaffirms the band's primary encoding. This is rare, because (as noted below) band coding specifiers present themselves as negative numbers in the primary encoding, and negative numbers are rare in most bands.

6.7.1. Coding Specifier Structure
The symbolic structure of a band coding specifier is determined by the following grammar. (This grammar is independent of the grammar governing band structure, or any other grammar appearing in other parts of this specification.)
  BandCodingSpecifier:
        (Default | BHSDCode | RunCode | PopCode)
  BHSDCode:
        CanonicalBHSDCode | ArbitraryBHSDCode
  CanonicalBHSDCode:
        ( '(1,256,0)' | '(1,256,1)' | ... )
  ArbitraryBHSDCode:
        'arb' ( B H S D )
  B, H, S, D:
        Integer
  RunCode:
        'run' K ACode BCode
  K:
        Integer
  ACode:
        (Default | BHSDCode | PopCode)
  BCode:
        (Default | BHSDCode | RunCode | PopCode)
  PopCode:
        'pop' ( FCode TCode UCode )
  FCode:
        (Default | BHSDCode | RunCode)
  TCode:
        (Default | BHSDCode | RunCode)
  UCode:
        (Default | BHSDCode | RunCode)
  Integer:
        ( '0' | '1' | ... )
  Default:
        'default'
Note that adaptive coding methods ("RunCode" nonterminals) can be chained via the "BCode" nonterminal, but cannot be nested directly via the "ACode" nonterminal. (As the grammar shows, they may be nested indirectly via the "PopCode" nonterminal.)

Also, population coding methods can contain adaptive coding methods, and vice versa. However, although the grammar does not show this fact, population coding methods must not be nested, even indirectly.

Not all possible integer values of K and L are equally well expressible. The intended values of K are commensurate with compressor windows, and the intended values of L are sharpness parameters for BHS encodings.

6.7.2. Coding Specifier Semantics
At any point, band contents are decoded under the control of three pieces of information:
  • N, an expected number of band values to decode, or "infinity"
  • D, a default BHSD coding
  • S, a coding specifier

We denote the application of S in the context of N and D as "S(N,D)". This application decodes up to N elements of transmitted band data.

Just before a band is received, the decompressor knows an expected band length N and a default coding method D, specified statically as the band's primary encoding. The decompressor then reads zero or more bytes which constitute a band encoding specifier, and decodes N elements of band data based on the band encoding specifier.

When the coding specifier is 'default', N values are decoded using the default coding D, which is the band's primary encoding. (This rule is necessary if the band's first element appears to introduce a non-empty coding specifier. Such a default coding specifier is the only kind that a compressor is obligated to emit; the rest are all optional.)

When the coding specifier is another BHSDCode, N values are decoded using that coding. The ambient default D is ignored.

When the coding specifier is a 'run' of K, ACode, BCode, two steps are taken. First, the specifier ACode is given control, as ACode(K,D). That is, N is temporarily set to K. Second, the specifier BCode is given control as BCode(N-K,D). (Note: If N is infinity, N-K will also be infinity.) In both steps, D remains unchanged, so that occurrences of 'default' for ACode or BCode cause D to be used.

It is illegal for a 'run' coding specifier to specify a K of zero, or for it to be used to decode a run of K or fewer values.

When the coding specifier is a 'pop' of FCode, TCode, UCode, three steps are taken. First, FCode is applied as FCode(infinity, D). The decoding of the F values stops when the first duplicate value is encountered. (As specified in the section above on population coding, that duplicate value acts as a sentinel, and must be either the most "central" value read, or else the value immediately previous to the sentinel value.) Let K be the number of unique decoded values.

During the decoding of the F values by FCode, every 'run' specifier in FCode must exhaust its count 'K' without decoding the sentinel value. That is, the sentinel must be decoded by the last simple BHSD coding in FCode.

In the second step, a different coding TCode is used, since the T values are expected to be a dense encoding. TCode is applied as TCode(N,D), and the tokens are read which determine the band values to be delivered. (Note that a 'pop' coding method can only be applied if the N value supplied is finite. This will be true, since the only bands which are read with an infinite N are byte bands such as bc_codes.) Let Z be the number of zeroes decoded using TCode.

The third step is to use UCode to decode Z values, using the original default encoding D. UCode is applied as U(Z,D). The resulting band is produced from the T sequence, as documented above, by replacing zeroes in the T sequence by successive U values, and replacing other elements of the T sequence by those indexed in the F sequence.

It is illegal for a 'pop' coding specifier to be used to decode a run of no values, or of an infinite number of values. If Z (the number of unfavored values) is zero, it is illegal for UCode to be anything other than 'default'.

6.7.3. Coding Specifier Meta-Encoding
The compressor uses a tense, byte-oriented encoding to transmit the band encoding specifier. Although the "little language" above allows a wide range of encodings, in practice many of them are similar in performance and applicability. It is not necessary or desirable to allow the compressor complete freedom to specify any conceivable band encoding specifier. Instead, the meta-encoding described in this section allows the compressor to select from a limited but useful set of secondary encodings. It is up to the compressor to make a choice that improves compression; the heuristic or algorithm that controls such a selection is beyond the scope of this specification.

The common band coding specifier of 'default' is encoded in a way that often requires no extra bytes. If the band has no elements, no parsing at all is done. Otherwise, if the band's default encoding is of variable length, the decompressor is obligated to decode one value X from the initial bytes of the band using the band's default coding D. If possible, the value X is converted into an unsigned byte value XB, which is taken to be the first byte of a band coding specifier, and X will be discarded. Otherwise, the band coding specifier is taken to be 'default', and so D is applied to the entire band, including the bytes which produced the initial value X.

D must be of the form (B,H,S) or (B,H,S,D), where B>1 and H<256. The value is D is irrelevant to the decoding of the first value, and the decoding of X is done using (B,H,S,0). If S is not zero, and if the value X is in the range [-256..-1], the coding specifier byte XB is defined as XB = (-1-X), and X is discarded. Otherwise, if S is zero, and if the value of X is in the range [(256-H)..(511-H)], the coding specifier byte XB is defined as XB = (X-(256-H)), and X is discarded. Otherwise, there is not a coding specifier byte XB, and X is the first band value, as described above.

The value XB, if produced, is taken to be the initial byte of a coding specifier preceding the actual band data. This specifier is parsed, starting with XB, and continuing (if necessary) with bytes bytes taken from band_headers. The parsed specifier is then used to control decoding, starting at the next byte, of all band elements.

If the band really does start with an element X1 in a range ([-256..-1] or [L,L+255]) that requires the production of a band specififer byte XB, but the compressor wishes to use the default encoding, the compressor is required to specify a band header, lest X1 mislead the decompressor. If the compressor wishes to keep the default coding, it must in such cases specify an explicit coding specifier of 'default', using an XB value of zero (as specified below). This zero XB is transmitted, depending on the default encoding, as an X value of -1 (usually the byte 1) or of L (usually the bytes 192,0).

(An immediate consequence of this design is that byte bands can never have non-default encodings, but all other bands can, since all the other bands have default encodigns which are variable length and have a large dynamic range. The "escape" values chosen for X are rare in practice, so they are not usually confused with real band data. Adding an extra zero value to reaffirm the default will always cost one extra byte before the actual band data, and no extra bytes in the band_headers band. In general, the encoding of explicit X values will always require two bytes if S is zero, and at most two bytes if S is not zero.)

The band band_headers transmits the non-initial band header bytes (if any) of each band that has a band header. The order of transmission is consistent with the overall order of all bands in the archive, as given in the present specification's band grammar. The length of band_headers is independently specified (as #band_headers_size) in the archive header. (It should be clear that the decompressor needs to find the end of band_headers before it can read any further bands.)

Thus, the encoding of a coding specifier consists of a sequence of bytes: an initial byte XB, and zero or more non-initial bytes taken from band_headers. The encodings of the little language specified in the previous section are as follows. The encoding 'default' is a zero byte. Of all the possible BHSDCode encodings, a sequence of 115 canonical encodings (defined below) is selected to cover the expected range of uses. A BHSDCode is represented as a single byte whose value is the index (1-based) of the selected canonical coding.

  Enc{default}  = (0)
  Enc{CanonicalBHSDCode} = value in [1..115]

The special value 116 introduces an arbitrary, possibly non-canonical BHSD code, described in the following byte.

  Enc{ arb ( B H S D ) } =
      116
    & (D:[0..1] + 2*S[0..2] + 8*(B:[1..5]-1))
    & (H[1..256]-1):
The B value must be in the range [1..5]. The S value must be in the range [0..2]. The H value must be in the range [1..256]. The D value must be in the range [0..1]. (These ranges are inclusive.) In addition, if B is 1, H must be 256, and if H is 256, B must not be 5.

The 'run' construct encodings begin with a byte in [117..140], and may be followed by an optional byte KB and then by one or two encoding specifiers ACode and BCode. The offset from 117 represents bitwise the following data:

  • a two-bit field KX
  • a bit KBFlag
  • a bit ADef (ABDef == 1)
  • a bit BDef (ABDef == 2)
The last two bits are jointly encoded in the value ABDef. They are never both true.
  Enc{ run ( K ACode BCode ) } =
      (117 + (KX:[0..3]) + 4*(KBFlag:[0..1]) + 8*(ABDef:[0..2]))
    & KB: one of [0..255] if KBFlag=1
    & Enc{ ACode } if ADef=0  (ABDef != 1)
    & Enc{ BCode } if BDef=0  (ABDef != 2)

After the leading byte is parsed, a byte KB is expected if the KBFlag is set, otherwise KB is implicitly given the value 3.

The K value for the 'run' construct can take a range of values, and is determined as follows:

  K = (KB+1) * 16^KX

The ACode coding is understood to be 'default' if the ADef bit is set. Otherwise, the representation of ACode is parsed next. Finally, the BCode coding is understood to be 'default' if the BDef bit is set. Otherwise, the representation of BCode is parsed last. Both ADef and BDef may be clear, but both may not be set.

The 'pop' construct encodings begin with a byte in [141..188], and may be followed by one, two, or three encoding specifiers, FCode, UCode, and TCode. The offset from 141 bitwise encodes the following data:

  • a bit FDef
  • a bit UDef
  • a bit TDef (TDefL > 0)
  • a value L in [1..11] if TDef=1
The last two values are jointly encoded in the value TDefL.
  Enc{ pop ( FCode TCode UCode ) }
    = (141 + (FDef:[0..1]) + 2*UDef:[0..1] + 4*(TDefL:[0..11]))
    & Enc{ FCode } if FDef=0
    & Enc{ TCode } if TDef=0  (TDefL==0)
    & Enc{ UCode } if UDef=0

If TDef is zero, an explicit encoding specifier determines TCode, and the L parameter is not present. If TDef is one, the L parameter is present and is derived from TDefL, according to the following table:

TDefL | L
1 | 4
2 | 8
3 | 16
4 | 32
5 | 64
6 | 128
7 | 192
8 | 224
9 | 240
10 | 248
11 | 252

If the L parameter is present, the TCode is derived from the K and L values. If K < 256, then TCode is BYTE1 (1,255,0), and L is ignored. Otherwise, TCode is the (B,H,S) coding where S=0, H=(256-L), and B is the smallest value such that [0..K] is contained in Range(B,H,S). (It is illegal to specify an L so large that Range(5,256-L,0) does not contain K.)

The FCode coding is understood to be 'default' if the FDef bit is set. Otherwise, the representation of FCode is parsed immediately after the initial byte. The TCode coding is understood to be derived from K and L if the TDef bit is set. Otherwise, the representation of TCode is parsed next. Finally, the UCode coding is understood to be 'default' if the UDef bit is set. Otherwise, the representation of UCode is parsed last.

6.7.4. Canonical BHSD Codings
Here is the list of all the canonical BHSD codings. These codings are designed to match a diverse variety of band value ranges and statistics.
index | BHSD Coding
1 | (1,256,0)
2 | (1,256,1)
3 | (1,256,0,1)
4 | (1,256,1,1)
5 | (2,256,0)
6 | (2,256,1)
7 | (2,256,0,1)
8 | (2,256,1,1)
9 | (3,256,0)
10 | (3,256,1)
11 | (3,256,0,1)
12 | (3,256,1,1)
13 | (4,256,0)
14 | (4,256,1)
15 | (4,256,0,1)
16 | (4,256,1,1)
17 | (5, 4,0)
18 | (5, 4,1)
19 | (5, 4,2)
20 | (5, 16,0)
21 | (5, 16,1)
22 | (5, 16,2)
23 | (5, 32,0)
24 | (5, 32,1)
25 | (5, 32,2)
26 | (5, 64,0)
27 | (5, 64,1)
28 | (5, 64,2)
29 | (5,128,0)
30 | (5,128,1)
31 | (5,128,2)
32 | (5, 4,0,1)
33 | (5, 4,1,1)
34 | (5, 4,2,1)
35 | (5, 16,0,1)
36 | (5, 16,1,1)
37 | (5, 16,2,1)
38 | (5, 32,0,1)
39 | (5, 32,1,1)
40 | (5, 32,2,1)
41 | (5, 64,0,1)
42 | (5, 64,1,1)
43 | (5, 64,2,1)
44 | (5,128,0,1)
45 | (5,128,1,1)
46 | (5,128,2,1)
47 | (2,192,0)
48 | (2,224,0)
49 | (2,240,0)
50 | (2,248,0)
51 | (2,252,0)
52 | (2, 8,0,1)
53 | (2, 8,1,1)
54 | (2, 16,0,1)
55 | (2, 16,1,1)
56 | (2, 32,0,1)
57 | (2, 32,1,1)
58 | (2, 64,0,1)
59 | (2, 64,1,1)
60 | (2,128,0,1)
61 | (2,128,1,1)
62 | (2,192,0,1)
63 | (2,192,1,1)
64 | (2,224,0,1)
65 | (2,224,1,1)
66 | (2,240,0,1)
67 | (2,240,1,1)
68 | (2,248,0,1)
69 | (2,248,1,1)
70 | (3,192,0)
71 | (3,224,0)
72 | (3,240,0)
73 | (3,248,0)
74 | (3,252,0)
75 | (3, 8,0,1)
76 | (3, 8,1,1)
77 | (3, 16,0,1)
78 | (3, 16,1,1)
79 | (3, 32,0,1)
80 | (3, 32,1,1)
81 | (3, 64,0,1)
82 | (3, 64,1,1)
83 | (3,128,0,1)
84 | (3,128,1,1)
85 | (3,192,0,1)
86 | (3,192,1,1)
87 | (3,224,0,1)
88 | (3,224,1,1)
89 | (3,240,0,1)
90 | (3,240,1,1)
91 | (3,248,0,1)
92 | (3,248,1,1)
93 | (4,192,0)
94 | (4,224,0)
95 | (4,240,0)
96 | (4,248,0)
97 | (4,252,0)
98 | (4, 8,0,1)
99 | (4, 8,1,1)
100 | (4, 16,0,1)
101 | (4, 16,1,1)
102 | (4, 32,0,1)
103 | (4, 32,1,1)
104 | (4, 64,0,1)
105 | (4, 64,1,1)
106 | (4,128,0,1)
107 | (4,128,1,1)
108 | (4,192,0,1)
109 | (4,192,1,1)
110 | (4,224,0,1)
111 | (4,224,1,1)
112 | (4,240,0,1)
113 | (4,240,1,1)
114 | (4,248,0,1)
115 | (4,248,1,1)

7. Stability of Decompressor Output

From what has been said so far, it may appear that a decompressor has considerable free choice in its arrangement of class file contents. In the class file format, there are numerous degrees of freedom which have no effect on the meaning of the file. For example, constant pool entries, attribute lists, and class methods are presented in no significant order, and could be shuffled at will by the decompressor without changing the meaning of the Java application.

However, for any given Pack200 archive, every decompressor is required to produce a particular byte-wise image for each class file transmitted. This requirement is placed on decompressors in order to make it possible for compressors to transmit information, such as message digests, which relates to the eventual byte-wise contents of transmitted class files. This section describes the restrictions placed on every decompressor that makes the byte-wise contents of its output files a well-defined function of its input.

In general, the order of elements in a decompressed class file must be consistent with the transmission order in the Pack200 archive. For example, the order of a class's fields declared in the class file must correspond to the order in which that class's field descriptors were transmitted in the field_descr band. (This also happens to correspond to the order in the field_flags bands.) This table gives all of the required correspondences of class file order with archive transmission order:

element in class file | band which determines order
implemented interfaces | class_interface
declared fields | field_descr
declared methods | method_descr
code handler list | code_handler_start_P
class attribute list | class_flags, class_attr_indexes
field attribute list | field_flags, field_attr_indexes
method attribute list | method_flags, method_attr_indexes
code attribute list | code_attr_indexes
constant pool entries | cp_Utf8, etc. (see below)

Together, these required correspondences of order determine the exact contents of the decompressed class file. The ordering of interfaces, fields, methods, and exception handlers is directly determined by the ordering of the bands that transmit them.

7.1. Ordering of Attribute Lists

Attribute lists for classes, fields, and methods must begin with all attributes transmitted because of set flag bits. The order must be index order (from LSB to MSB in the flag word). After any possible flag-caused attributes, the list must then contain any overflow attributes. Any attribute list with overflow attributes will present them in the same order as their layouts were transmitted in the corresponding series of values from class_attr_indexes, field_attr_indexes, method_attr_indexes, or code_attr_indexes. Note that an attribute layout whose index is less than 32 can be specified zero or one times via a flag bit. Independently, it can also be specified zero or more times via occurrences in a band transmitting overflow attribute layouts.

If an InnerClasses or BootstrapMethods attribute must be added to a class, under the rules given in the next section, those attributes must come last in the class's attribute list. If more than one such attribute is added, the relative ordering is BootstrapMethods, then InnerClasses.

7.2. Ordering of Constant Pools

The constant pool cp(X) of a decompressed class file X is defined as if by a post-processing of X and cp_All after the decompressor has already produced most of X. Specifically, suppose that the contents of X are determined, except that:
  • cp(X) is not yet defined,
  • there is no InnerClasses attribute in X (even if was an ic_Local(X) transmitted), and
  • the locations of constant references within X are noted but not initialized with numbers.

Then cp(X) is defined as if by the following steps, which populate it from the global constant pool cp_All, and also potentially produce an InnerClasses attribute for X.

  • cp(X) is initially empty.
  • Every constant referenced from X is added to cp(X).
  • In the next step, any constant from cp_Signature must be treated as making no additional references, despite its transmitted structure.
  • Every constant referenced from cp(X) is added to cp(X), if it is not already there. (For example, a constant from cp_Method refers to constants from cp_Class and cp_Descr.)
  • The previous step is iterated until no further changes occur. (There will be at most five more of these steps, with a longest chain of references consisting, for example, of a CONSTANT_InvokeDynamic, its cp_BootstrapMethod constant, a CONSTANT_MethodHandle, a CONSTANT_Methodref, a CONSTANT_NameAndType, and a CONSTANT_Utf8.)

At this point the constant pool cp(X) is well enough defined to allow the decompressor to compute the set of relevant nested classes, called ic_Relevant(X).

  • ic_Relevant(X) is initially empty.
  • Every four-tuple from ic_All which mentions the current class (defined by X) as an outer class is added to ic_Relevant(X).
  • For every class constant K referenced from both ic_this_class and cp(X), the corresponding four-tuple from ic_All is selected, and added to ic_Relevant(X), if not already there.
  • The previous step is repeated until closure. (That is, until ic_Relevant(X) no longer changes.)
  • The set ic_Relevant(X) is ordered into a sequence, so that its order is consistent with ic_All. (I.e., it is a subsequence of ic_All.)

With ic_Relevant(X) and an optionally transmitted ic_Local(X) in hand, the decompressor must next decide whether to store an InnerClasses attribute ic_Stored(X) for X, using these steps.

  • If ic_Local(X) is present and empty, no InnerClasses attribute will be stored for X, and none of the following steps will be taken.
  • Also, if ic_Local(X) is not present and ic_Relevant(X) is empty, no InnerClasses attribute will be stored for X.
  • Otherwise, ic_Stored(X) is set to be the elements in ic_Local(X) followed by the elements of ic_Relevant(X) (both in transmission order).
  • Next, any elements in both ic_Local(X) and ic_Relevant(X) are removed from ic_Stored(X), thus forming a symmetric difference.
  • The resulting sequence ic_Stored(X), even if empty, is added to the decompressor's output as an InnerClasses attribute.
  • All cp_Class and cp_Utf8 entries directly or indirectly required by ic_Stored(X), as well as the fixed cp_Utf8 entry spelled "InnerClasses", are added to cp(X) if not already there.

With the last contributions from nested class records, the decompressor finishes the constant pool using these steps:

  • Every cp_Signature entry in cp(X) is "flattened" into a cp_Utf8 entry with the same spelling.
  • If any cp_Utf8 entry E in cp(X) was not transmitted in cp_All but had an equivalently spelled signature S transmitted, then E is replaced by S in cp(X).
  • The elements of cp(X) which are also in cp_All are sorted into the same order as their occurrences in cp_All.
  • All cp_Utf8 constants in cp(X) not also in cp_All are moved to the end of cp(X), and are sorted in the order defined by String.compareTo.
  • Next, any cp_Class constants in cp(X) not also in cp_All are moved to the end of cp(X), in the order defined by String.compareTo on their class names.
  • (At this point, the decompressor has uniquely determined a position for every element of cp(X).)
  • All elements of cp(X) which are referred to via a one-byte index (i.e., a ldc bytecode) are moved in mass to the beginning of cp(X), without changing their relative order.
  • All elements of cp(X) are transformed into their equivalent class file constant types, with signatures being "flattened" into equivalently spelled CONSTANT_Utf8 constants.
  • All cp_BootstrapMethod constants in cp(X) are removed from cp(X) and placed (without reordering) in the BootstrapMethods attribute for X. (If there are no such elements, no such attribute is created.) If the attribute is created, cp_Utf8 entry spelled "BootstrapMethods" is added to cp(X) if not already there.
  • The resulting sequence of class file constants, cp(X), is stored as the constant pool of X.

After this process, the stored constant pool of X has referential integrity, and all constant references can be coded as indexes into cp(X), which has a definite order derived from cp_All. In particular, if a constant in cp(X) needs to refer to another constant, that constant must already have been inserted into cp(X), during the closure steps.

Note that the ordering of cp(X) is consistent with that of cp_All, except that some signature references are redirected to equivalent pre-existing elements of cp_Utf8, and all operands of ldc bytecodes are forced to the front of the constant pool.

When assigning local indexes to elements of cp(X), the decompressor must of course respect the reservation of empty constant pool slots for index zero, and for CONSTANT_Long and CONSTANT_Double constants, as required by the class file format. Together with these rules, the construction and ordering of cp(X) completely determines the assignment of concrete indexes to constant references within X.

8. Appendixes

8.1. Appendix: List of Bands

Here is a list of all bands in the order they must occur in the archive. This list is not part of the Pack200 specification, but it is presented to help clarify the meaning of the grammar in the specification proper which defines the names and ordering of the bands. Four occurrences of ellipsis ... refer to insertion points where the compressor may insert variable numbers of extra bands to help transmit unusual strings or non-standard attributes. The other ellipses refer to repetitions of metadata bands which it would be too tedious to include.
Band | Default coding | Length | Constant pool referred to
archive_magic | BYTE1 | [4] |
archive_header | UNSIGNED5 | [26] |
band_headers | BYTE1 | [...] |
cp_Utf8_prefix | DELTA5 | [MAX(0,#cp_Utf8_count-2)] |
cp_Utf8_suffix | UNSIGNED5 | [MAX(0,#cp_Utf8_count-1)] |
cp_Utf8_chars | CHAR3 | [SUM(*cp_Utf8_suffix)] |
cp_Utf8_big_suffix | DELTA5 | [COUNT(0,*cp_Utf8_suffix)] |
{cp_Utf8_big_chars...} | DELTA5 | [*cp_Utf8_big_suffix[i]] |
cp_Int | UDELTA5 | [#cp_Int_count] |
cp_Float | UDELTA5 | [#cp_Float_count] |
cp_Long_hi | UDELTA5 | [#cp_Long_count] |
cp_Long_lo | DELTA5 | [#cp_Long_count] |
cp_Double_hi | UDELTA5 | [#cp_Double_count] |
cp_Double_lo | DELTA5 | [#cp_Double_count] |
cp_String | UDELTA5 | [#cp_String_count] | cp_Utf8
cp_Class | UDELTA5 | [#cp_Class_count] | cp_Utf8
cp_Signature_form | DELTA5 | [#cp_Signature_count] | cp_Utf8
cp_Signature_classes | UDELTA5 | [COUNT('L',...)] | cp_Class
cp_Descr_name | DELTA5 | [#cp_Descr_count] | cp_Utf8
cp_Descr_type | UDELTA5 | [#cp_Descr_count] | cp_Signature
cp_Field_class | DELTA5 | [#cp_Field_count] | cp_Class
cp_Field_desc | UDELTA5 | [#cp_Field_count] | cp_Descr
cp_Method_class | DELTA5 | [#cp_Method_count] | cp_Class
cp_Method_desc | UDELTA5 | [#cp_Method_count] | cp_Descr
cp_Imethod_class | DELTA5 | [#cp_Imethod_count] | cp_Class
cp_Imethod_desc | UDELTA5 | [#cp_Imethod_count] | cp_Descr
cp_MethodHandle_refkind | DELTA5 | [#cp_MethodHandle_count] |
cp_MethodHandle_member | UDELTA5 | [#cp_MethodHandle_count] | cp_All
cp_MethodType | UDELTA5 | [#cp_MethodType_count] | cp_Signature
cp_BootstrapMethod_ref | DELTA5 | [#cp_BootstrapMethod_count] | cp_MethodHandle
cp_BootstrapMethod_arg_count | UDELTA5 | [#cp_BootstrapMethod_count]arg_tt> |
cp_BootstrapMethod_arg | DELTA5 | [SUM(*class_interface_count)] | cp_All
cp_InvokeDynamic_spec | DELTA5 | [#cp_InvokeDynamic_count] | cp_BootstrapMethod
cp_InvokeDynamic_descr | UDELTA5 | [#cp_InvokeDynamic_count] | cp_Descr
attr_definition_headers | BYTE1 | [#attr_definition_count] |
attr_definition_name | UNSIGNED5 | [#attr_definition_count] | cp_Utf8
attr_definition_layout | UNSIGNED5 | [#attr_definition_count] | cp_Utf8
ic_this_class | UDELTA5 | [#ic_count] | cp_Class
ic_flags | UNSIGNED5 | [#ic_count] |
ic_outer_class | DELTA5 | [COUNT(1<<16,...)] | cp_Class
ic_name | DELTA5 | [COUNT(1<<16,...)] | cp_Utf8
class_this | DELTA5 | [#class_count] | cp_Class
class_super | DELTA5 | [#class_count] | cp_Class
class_interface_count | DELTA5 | [#class_count] |
class_interface | DELTA5 | [SUM(*class_interface_count)] | cp_Class
class_field_count | DELTA5 | [#class_count] |
class_method_count | DELTA5 | [#class_count] |
field_descr | DELTA5 | [SUM(*class_field_count)] | cp_Descr
field_flags_hi | UNSIGNED5 | [SUM(*class_field_count)*#have_field_flags_hi] |
field_flags_lo | UNSIGNED5 | [SUM(*class_field_count)] |
field_attr_count | UNSIGNED5 | [COUNT(1<<16,...)] |
field_attr_indexes | UNSIGNED5 | [SUM(*field_attr_count)] |
field_attr_calls | UNSIGNED5 | [...] |
field_ConstantValue_KQ | UNSIGNED5 | [COUNT(ConstantValue,...)] | cp_Int, cp_Float, etc.
field_Signature_RS | UNSIGNED5 | [COUNT(Signature,...)] | cp_Signature
field_RVA_anno_N | UNSIGNED5 | [...] |
field_RVA_type_RS | UNSIGNED5 | [...] | cp_Signature
field_RVA_pair_N | UNSIGNED5 | [...] |
field_RVA_name_RU | UNSIGNED5 | [...] | cp_Utf8
field_RVA_T | BYTE1 | [...] |
field_RVA_caseI_KI | UNSIGNED5 | [...] | cp_Int
field_RVA_caseD_KD | UNSIGNED5 | [...] | cp_Double
field_RVA_caseF_KF | UNSIGNED5 | [...] | cp_Float
field_RVA_caseJ_KJ | UNSIGNED5 | [...] | cp_Long
field_RVA_casec_RS | UNSIGNED5 | [...] | cp_Signature
field_RVA_caseet_RS | UNSIGNED5 | [...] | cp_Signature
field_RVA_caseec_RU | UNSIGNED5 | [...] | cp_Utf8
field_RVA_cases_RU | UNSIGNED5 | [...] | cp_Utf8
field_RVA_casearray_N | UNSIGNED5 | [...] |
field_RVA_nesttype_RS | UNSIGNED5 | [...] | cp_Signature
field_RVA_nestpair_N | UNSIGNED5 | [...] |
field_RVA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
field_RIA_anno_N | UNSIGNED5 | [...] |
{field_RIA_...} |  |  |
field_RIA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
{field_attr_element_bands...} | (various) | [...] | (various)
method_descr | MDELTA5 | [SUM(*class_method_count)] | cp_Descr
method_flags_hi | UNSIGNED5 | [SUM(*class_method_count)*#have_method_flags_hi] |
method_flags_lo | UNSIGNED5 | [SUM(*class_method_count)] |
method_attr_count | UNSIGNED5 | [COUNT(1<<16,...)] |
method_attr_indexes | UNSIGNED5 | [SUM(*method_attr_count)] |
method_attr_calls | UNSIGNED5 | [...] |
method_Exceptions_N | UNSIGNED5 | [COUNT(Exceptions,...)] |
method_Exceptions_RC | UNSIGNED5 | [SUM(*method_Exceptions_N)] | cp_Class
method_Signature_RS | UNSIGNED5 | [COUNT(Signature,...)] | cp_Signature
method_RVA_anno_N | UNSIGNED5 | [...] |
method_RVA_type_RS | UNSIGNED5 | [...] | cp_Signature
method_RVA_pair_N | UNSIGNED5 | [...] |
method_RVA_name_RU | UNSIGNED5 | [...] | cp_Utf8
method_RVA_T | BYTE1 | [...] |
method_RVA_caseI_KI | UNSIGNED5 | [...] | cp_Int
method_RVA_caseD_KD | UNSIGNED5 | [...] | cp_Double
method_RVA_caseF_KF | UNSIGNED5 | [...] | cp_Float
method_RVA_caseJ_KJ | UNSIGNED5 | [...] | cp_Long
method_RVA_casec_RS | UNSIGNED5 | [...] | cp_Signature
method_RVA_caseet_RS | UNSIGNED5 | [...] | cp_Signature
method_RVA_caseec_RU | UNSIGNED5 | [...] | cp_Utf8
method_RVA_cases_RU | UNSIGNED5 | [...] | cp_Utf8
method_RVA_casearray_N | UNSIGNED5 | [...] |
method_RVA_nesttype_RS | UNSIGNED5 | [...] | cp_Signature
method_RVA_nestpair_N | UNSIGNED5 | [...] |
method_RVA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
method_RIA_anno_N | UNSIGNED5 | [...] |
{method_RIA_...} |  |  |
method_RIA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
method_RVPA_param_NB | BYTE1 | [...] |
method_RVPA_anno_N | UNSIGNED5 | [...] |
{method_RVPA_...} |  |  |
method_RVPA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
method_RIPA_param_NB | BYTE1 | [...] |
method_RIPA_anno_N | UNSIGNED5 | [...] |
{method_RIPA_...} |  |  |
method_RIPA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
method_AD_T | BYTE1 | [...] |
method_AD_caseI_KI | UNSIGNED5 | [...] | cp_Int
method_AD_caseD_KD | UNSIGNED5 | [...] | cp_Double
method_AD_caseF_KF | UNSIGNED5 | [...] | cp_Float
method_AD_caseJ_KJ | UNSIGNED5 | [...] | cp_Long
method_AD_casec_RS | UNSIGNED5 | [...] | cp_Signature
method_AD_caseet_RS | UNSIGNED5 | [...] | cp_Signature
method_AD_caseec_RU | UNSIGNED5 | [...] | cp_Utf8
method_AD_cases_RU | UNSIGNED5 | [...] | cp_Utf8
method_AD_casearray_N | UNSIGNED5 | [...] |
method_AD_nesttype_RS | UNSIGNED5 | [...] | cp_Signature
method_AD_nestpair_N | UNSIGNED5 | [...] |
method_AD_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
method_MethodParameters_NB | BYTE1 | [...] |
method_MethodParameters_name_RUN | UNSIGNED5 | [...] | null|cp_Utf8
method_MethodParameters_flag_FH | UNSIGNED5 | [...] |
{method_attr_element_bands...} | (various) | [...] | (various)
class_flags_hi | UNSIGNED5 | [#class_count*#have_class_flags_hi] |
class_flags_lo | UNSIGNED5 | [#class_count] |
class_attr_count | UNSIGNED5 | [COUNT(1<<16,...)] |
class_attr_indexes | UNSIGNED5 | [SUM(*class_attr_count)] |
class_attr_calls | UNSIGNED5 | [...] |
class_SourceFile_RUN | UNSIGNED5 | [COUNT(SourceFile,...)] | null|cp_Utf8
class_EnclosingMethod_RC | UNSIGNED5 | [COUNT(EnclosingMethod,...)] | cp_Class
class_EnclosingMethod_RDN | UNSIGNED5 | [COUNT(EnclosingMethod,...)] | null|cp_Descr
class_Signature_RS | UNSIGNED5 | [COUNT(Signature,...)] | cp_Signature
class_RVA_anno_N | UNSIGNED5 | [...] |
class_RVA_type_RS | UNSIGNED5 | [...] | cp_Signature
class_RVA_pair_N | UNSIGNED5 | [...] |
class_RVA_name_RU | UNSIGNED5 | [...] | cp_Utf8
class_RVA_T | BYTE1 | [...] |
class_RVA_caseI_KI | UNSIGNED5 | [...] | cp_Int
class_RVA_caseD_KD | UNSIGNED5 | [...] | cp_Double
class_RVA_caseF_KF | UNSIGNED5 | [...] | cp_Float
class_RVA_caseJ_KJ | UNSIGNED5 | [...] | cp_Long
class_RVA_casec_RS | UNSIGNED5 | [...] | cp_Signature
class_RVA_caseet_RS | UNSIGNED5 | [...] | cp_Signature
class_RVA_caseec_RU | UNSIGNED5 | [...] | cp_Utf8
class_RVA_cases_RU | UNSIGNED5 | [...] | cp_Utf8
class_RVA_casearray_N | UNSIGNED5 | [...] |
class_RVA_nesttype_RS | UNSIGNED5 | [...] | cp_Signature
class_RVA_nestpair_N | UNSIGNED5 | [...] |
class_RVA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
class_RIA_anno_N | UNSIGNED5 | [...] |
{class_RIA_...} |  |  |
class_RIA_nestname_RU | UNSIGNED5 | [...] | cp_Utf8
class_InnerClasses_N | UNSIGNED5 | [COUNT(InnerClasses,...)] |
class_InnerClasses_RC | UNSIGNED5 | [SUM(*class_InnerClasses_N)] | cp_Class
class_InnerClasses_F | UNSIGNED5 | [SUM(*class_InnerClasses_N)] |
class_InnerClasses_outer_RCN | UNSIGNED5 | [COUNT(!=0,*class_InnerClasses_F)] | null|cp_Class
class_InnerClasses_name_RUN | UNSIGNED5 | [COUNT(!=0,*class_InnerClasses_F)] | null|cp_Utf8
class_file_version_minor_H | UNSIGNED5 | [COUNT(version,...)] |
class_file_version_major_H | UNSIGNED5 | [COUNT(version,...)] |
{class_attr_element_bands...} | (various) | [...] | (various)
code_headers | BYTE1 | [COUNT(Code,...)] |
code_max_stack | UNSIGNED5 | [COUNT(0,*code_headers)] |
code_max_na_locals | UNSIGNED5 | [COUNT(0,*code_headers)] |
code_handler_count | UNSIGNED5 | [COUNT(0,*code_headers)] |
code_handler_start_P | BCI5 | [SUM(*code_header_count)] |
code_handler_end_PO | BRANCH5 | [SUM(*code_header_count)] |
code_handler_catch_PO | BRANCH5 | [SUM(*code_header_count)] |
code_handler_class_RCN | UNSIGNED5 | [SUM(*code_header_count)] | null|cp_Class
code_flags_hi | UNSIGNED5 | [...*#have_code_flags_hi] |
code_flags_lo | UNSIGNED5 | [...] |
code_attr_count | UNSIGNED5 | [COUNT(1<<16,...)] |
code_attr_indexes | UNSIGNED5 | [SUM(*code_attr_count)] |
code_attr_calls | UNSIGNED5 | [...] |
code_StackMapTable_N | UNSIGNED5 | [COUNT(StackMapTable,...)] |
code_StackMapTable_frame_T | BYTE1 | [SUM(*code_StackMapTable_N)] |
code_StackMapTable_local_N | UNSIGNED5 | [COUNT(255,*code_StackMapTable_frame_T)] |
code_StackMapTable_stack_N | UNSIGNED5 | [COUNT(255,*code_StackMapTable_frame_T)] |
code_StackMapTable_offset | UNSIGNED5 | [...] |
code_StackMapTable_T | BYTE1 | [...] |
code_StackMapTable_RC | UNSIGNED5 | [COUNT(7,*code_StackMapTable_T)] |
code_StackMapTable_P | BCI5 | [COUNT(8,*code_StackMapTable_T)] |
code_LineNumberTable_N | UNSIGNED5 | [...] |
code_LineNumberTable_bci_P | BCI5 | [...] |
code_LineNumberTable_line | UNSIGNED5 | [...] |
code_LocalVariableTable_N | UNSIGNED5 | [...] |
code_LocalVariableTable_bci_P | BCI5 | [...] |
code_LocalVariableTable_span_O | BRANCH5 | [...] |
code_LocalVariableTable_name_RU | UNSIGNED5 | [...] | cp_Utf8
code_LocalVariableTable_type_RS | UNSIGNED5 | [...] | cp_Signature
code_LocalVariableTable_slot | UNSIGNED5 | [...] |
code_LocalVariableTypeTable_N | UNSIGNED5 | [...] |
code_LocalVariableTypeTable_bci_P | BCI5 | [...] |
code_LocalVariableTypeTable_span_O | BRANCH5 | [...] |
code_LocalVariableTypeTable_name_RU | UNSIGNED5 | [...] | cp_Utf8
code_LocalVariableTypeTable_type_RS | UNSIGNED5 | [...] | cp_Signature
code_LocalVariableTypeTable_slot | UNSIGNED5 | [...] |
{code_attr_element_bands...} | (various) | [...] | (various)
bc_codes | BYTE1 | [...] |
bc_case_count | UNSIGNED5 | [COUNT(switch,*bc_codes)] |
bc_case_value | DELTA5 | [...] |
bc_byte | BYTE1 | [...] |
bc_short | DELTA5 | [...] |
bc_local | UNSIGNED5 | [...] |
bc_label | BRANCH5 | [...] |
bc_intref | DELTA5 | [...] | cp_Int
bc_floatref | DELTA5 | [...] | cp_Float
bc_longref | DELTA5 | [...] | cp_Long
bc_doubleref | DELTA5 | [...] | cp_Double
bc_stringref | DELTA5 | [...] | cp_String
bc_loadablevalueref | DELTA5 | [COUNT({qldc,qldc_w},*bc_codes)] | cp_All
bc_classref | UNSIGNED5 | [...] | cp_Class
bc_fieldref | DELTA5 | [...] | cp_Field
bc_methodref | UNSIGNED5 | [...] | cp_Method
bc_imethodref | DELTA5 | [...] | cp_Imethod
bc_thisfield | UNSIGNED5 | [...] | cp_Field subsequence
bc_superfield | UNSIGNED5 | [...] | cp_Field subsequence
bc_thismethod | UNSIGNED5 | [...] | cp_Method subsequence
bc_supermethod | UNSIGNED5 | [...] | cp_Method subsequence
bc_initref | UNSIGNED5 | [...] | cp_Method subsequence
bc_escref | UNSIGNED5 | [COUNT(ref_escape,*bc_codes)] | cp_All
bc_escrefsize | UNSIGNED5 | [...] |
bc_escsize | UNSIGNED5 | [...] |
bc_escbyte | BYTE1 | [...] |
file_name | UNSIGNED5 | [#file_count] | cp_Utf8
file_size_hi | UNSIGNED5 | [#file_count*(#have_file_size_hi)] |
file_size_lo | UNSIGNED5 | [#file_count] |
file_modtime | DELTA5 | [#file_count*(#have_file_modtime)] |
file_options | UNSIGNED5 | [#file_count*(#have_file_options)] |
file_bits | BYTE1 | [SUM(*file_size)] |

8.2. Appendix: Pseudo-Code Illustrations

8.2.1. Representation of cp_Utf8 Constant Pool

The following pseudo-code asserts the relations, as described in the section Utf8 Constants, between the band lengths and contents, and cp_Utf8 constant pool elements. (This code merely comments on the specification given above; it does not itself add new information to the specification.)
  assert(cp_Utf8[0].equals(""));
  int cursor = 0;
  int big_cursor = 0;
  for (int i = 1; i < cp_Utf8_count; i++) {
    String thisString = cp_Utf8[i];

    int prefix = (i == 1)? 0: cp_Utf8_prefix[i-2];
    int suffix = thisString.length() - prefix;
    String prevString = cp_Utf8[i-1];
    String prevPrefix = prevString.substring(0, prefix);
    String thisPrefix = thisString.substring(0, prefix);
    assert(prevPrefix.equals(thisPrefix));

    int small_suffix = cp_Utf8_suffix[i-1];
    char[] suffix_chars;
    int offset;
    if (small_suffix != 0) {
      assert(suffix == small_suffix);
      suffix_chars = cp_Utf8_chars;
      offset = cursor;
      cursor += suffix;
    } else {
      assert(suffix == cp_Utf8_big_suffix[big_cursor]);
      suffix_chars = cp_Utf8_big_chars[big_cursor];
      offset = 0;
      assert(suffix == suffix_chars.length);
      big_cursor += 1;
    }
    String thisSuffix = thisString.substring(prefix);
    String theseChars = new String(suffix_chars, offset, suffix);
    assert(thisSuffix.equals(theseChars));
  }
  assert(cp_Utf8_prefix.length == Math.max(0, cp_Utf8_count-2));
  assert(cp_Utf8_suffix.length == Math.max(0, cp_Utf8_count-1));
  assert(cp_Utf8_chars.length == cursor);
  assert(cp_Utf8_big_suffix.length == big_cursor);
  assert(cp_Utf8_big_chars.length == big_cursor);

8.2.2. Representation of cp_Signature Constant Pool

The following pseudo-code asserts the relations, as described in the section Type Signatures, between the band lengths and contents, and cp_Signature constant pool elements. (This code merely comments on the specification given above; it does not itself add new information to the specification.)
  int cursor = 0;
  for (int i = 0; i < cp_Signature_count; i++) {
    String sign = cp_Signature[i];
    String form = cp_Signature_form[i];
    int form_ptr = 0;
    int sign_ptr = 0;
    for (; form_ptr < form.length(); form_ptr++) {
      assert(form.charAt(form_ptr) == sign.charAt(sign_ptr));
      sign_ptr += 1;
      if (form.charAt(form_ptr) == 'L') {
        String cls = cp_Class[cursor];
        assert(sign.startsWith(cls, sign_ptr));
        cursor += 1;
        sign_ptr += cls.length();
      }
    }
    assert(sign_ptr == sign.length());
  }
  assert(cp_Signature_form.length == cp_Signature_count);
  assert(cp_Signature_classes.length == cursor);

8.2.3. Representation of Byte Offsets

The following pseudo-code asserts the relations, as described in the section Attribute Layout Definitions, between a byte offset and its encoding in a band governed by a bc_index layout element. (This code merely comments on the specification given above; it does not itself add new information to the specification.)
  // ins_pos is a display of all instruction boundaries
  int[] ins_pos;
  ...
  Arrays.sort(ins_pos);
  assert(ins_pos[0] == 0);
  assert(ins_pos[ins_pos.length-1] == bytecodes.length);
  int regulars = ins_pos.length; //  # instruction boundaries
  ...
  int renumber_bci(int bci) {
    int i = Arrays.binarySearch(ins_pos, bci);
    return (i >= 0) ? i : (i == -1) ? bci : ins_pos.length + bci - (-i-1);
  }
  ...
  for (int bci = -100; bci <= bytecodes.length+100; bci++) {
    int bci_numbering_for_band = renumber_bci(bci);
    int i = Arrays.binarySearch(ins_pos, bci);
    if (i >= 0) {
      assert(ins_pos[i] == bci);
      assert(bci_numbering_for_band < regulars);
      assert(bci_numbering_for_band == i);
    } else if (0 < bci && bci < bytecodes.length) {
      int nexti = (-i-1);  // index of next instruction
      assert(ins_pos[nexti-1] < bci && bci < ins_pos[nexti]);
      int prevRegulars = nexti;
      int prevAll = bci;
      int prevIrregulars = prevAll - prevRegulars;
      assert(bci_numbering_for_band >= regulars);
      assert(bci_numbering_for_band == regulars + prevIrregulars);
    } else {
      // other (random) numbers are unchanged by renumbering
      assert(bci_numbering_for_band >= bytecodes.length ||
             bci_numbering_for_band < 0);
      assert(bci_numbering_for_band == bci);
    }
  }

8.2.4. Representation of Predictable Nested Class Names

The following pseudo-code asserts the relations, as described in the section Nested Classes, between the nested class's mangled name and the predictable outer and simple names. Note that searches for the literal characters '/' and '$' must be replaced in real implementations by searches for the character ranges associated with the SLASH and DOLLAR nonterminals. (This code merely comments on the specification given above; it does not itself add new information to the specification.)
  String bcn, predictableOuter, predictableICName;
  ...
  String name = bcn.substring(bcn.lastIndexOf('/')+1);
  int dollar2 = name.lastIndexOf('$');
  assert(predictableICName == null ||
         (predictableICName.charAt(0) > '9' &&
          predictableICName.indexOf('$') < 0));
  if (predictableICName == null) {
    // bcnCase1 or bcnCase4
    assert(predictableOuter == null);
    assert(dollar2 == -1 ||
           dollar2+1 == name.length() ||
           isDigit(name.charAt(dollar2+1)));
  } else if (predictableOuter == null) {
    // bcnCase2
    assert(name.endsWith("$"+predictableICName));
    int dollar1 = name.substring(0, dollar2).lastIndexOf('$');
    assert(dollar1 >= 0 && dollar1+1 < dollar2);
    assert(isDigitString(name.substring(dollar1+1, dollar2)));
  } else {
    // bcnCase3
    assert(bcn.equals(predictableOuter+"$"+predictableICName));
  }

8.3. Appendix: Design FAQ

This collection of frequently asked questions concerning the Pack200 archive format is meant to serve as a design rationale.

8.3.1. General Questions

  1. Why not use an existing generic compression mechanism, such as .jar, .zip, or .tar.gz files? First, it is better to know the structure of a thing compressed. Second, a zip or jar archive is compressed element-wise not globally. This means that any symbol shared by several classes must be mentioned independently once in each class file. Third, the structure of an individual class file is really an interleaving of many different kind of data, each with their own statistics, which limits the effectiveness of a single-stream compressor such as gzip. The specific benefit of reordering the data into bands is about a factor of two, independently of the quality of the off-the-shelf compressor used as a post-pass. There are also significant marginal benefits from the various type-specific recoding techniques. The net result is to improve a compression factor from 2-4X to 7-9X.

  2. Why is this specification so complex? The techniques described here are the result of much experimentation over several years. Each feature of this specification is thought to contribute measurably to the overall compression ratio achieved by this technology. The authors would be happy to be shown, by benchmarks, that some given feature can be omitted without significant loss of compression performance.

    (A compression performance multiplier of 1.002 or more for some particular technique is significant, because such multipliers accumulate readily into performance that end-users notice. A multiplier of less than 1.0005 is insignificant.)

  3. The Pack200 transmission format is closely tied to the current class file format. Won't it go out of date as soon as the class file format evolves further? Further developments are likely to take the form of new attributes or perhaps new bytecodes. The layout language defined by Pack200 supports a very wide range of attribute formats, including arbitrary mixes of bytes and constant pool references. Likewise, the bytecode representation includes escape operators which can represent arbitrary mixes of data and constant pool references. Although such constructs will not compress as optimally as the features for which this specification is directly designed, it appears that reasonable future extensions will continue to be transmittable, without disturbing the compression of current features, and without requiring decompressors to be updated.

  4. Since Pack200 is a lossy compression algorithm, won't it break signed JAR files? Signed JAR files contain secure hashes over the bytewise contents of individual class files. Any change to the bits of a class file will change its hash code, making the innocuous changes of Pack200 indistinguishable from attacks on the application code.

    Pack200, like many other compression algorithms, allows the compressor many degrees of freedom in choosing the contents of the compressed archive, but no degrees of freedom in choosing the contents of the decompressed JAR file. Given a compressed archive, all compliant Pack200 decompressors must produce the same class file bytes, for each transmitted class file. This stability of output persists for class files even if a resource file (such as the manifest) changes its contents. Thus, for any given class file, compression may be lossy, but the decompression of each class file must be exact, in a useful way defined by the Pack200 specification.

    This means that a compressor with the right stability properties can be used to produce a signed, packed JAR using these steps:

    1. Pack the original signed JAR file.
    2. Unpack it, producing perturbed class files.
    3. Re-sign it, ensuring that only the manifest changes.
    4. Re-pack it, using the updated manifest.

    (Note: If this specification allows two compliant decompressors to produce different JAR archive elements for the same compressed archive input, it is a bug in the specification. The specification is thought to be free of such bugs, but if you find one please report it.)

  5. What is the relationship between file names in Pack200 archives and file names in JAR (or ZIP) archives or disk files? Pack200 specifies that file names are transmitted as Utf8 strings. Since these strings are intended to function as names of JAR elements in functioning Java applications, the strings must also conform to Java usage, which also represents pathnames as Utf8 strings in JAR files and 16-bit Unicode in memory. Also, in JAR files, pathname components are separated by the forward slash character ('/'), and not by any system-specific character. This allows class loaders to easily convert the internal representation of the class names (e.g., "java/lang/Object") to pathnames (e.g., "java/lang/Object.class").

    The Pack200 specification does not dictate the interpretation of file name strings with respect to any other tool or operating system. However, the natural mapping would be as coherent as possible with Java's usages.

  6. What is the relationship between file dates in JAR (or ZIP) archives or disk files? Pack200 specifies that file dates are transmitted as 32-bit counts of seconds relative to Java's time base (i.e., System.currentTimeMillis divided by one thousand). This provides absolute times relative to UTC, at a one-second granularity. If an operating system provides more accurate file times, they must be adjusted to a nearby whole second before transmission in a Pack200 archive.

    JAR and ZIP store dates in local format (i.e., "YYYY/MM/DD HH:MM:SS") with no timezone specification. This means that conversion to and from Java's UTC-based times requires a guess at the timezone under which the compressor was operating. (This problem is not unique to Pack200. It is a problem with all uses of ZIP and JAR archives.) For many purposes, the standard guess is that the decompressor and compressor were operating in the same timezone and during the same yearly daylight savings time regime. However, in order to provide more stability in the times transmitted in Pack200 archives, it is expected that most compressors and decompressors will agree to use UTC as the timezone when interpreting ZIP-style local times.

  7. Doesn't the JEFF file format also oprovide a class-specific compression algorithm? Yes, the JEFF Working Group has defined a standard file format (ISO/IEC 20970) which allows class files to be compressed about 50% and also loaded directly into memory for interpretive execution. As compression performance, it is comparable with the DEFLATE algorithm used within JAR archives. Pack200 provides much greater compression. However, Pack200 archives are not designed for direct execution by any virtual machine. The greater compression level of Pack200 is won at a cost of complexity in the unpacker, a complexity incompatible with any requirement of direct loading or execution.

  8. Why doesn't Pack200 use Huffman encoding? (Same question for LZW, or BWT, or move-to-front, or any other standard compression technique.) As a matter of simplicity and division of labor, Pack200 intentionally focuses on finding and removing large-scale redundancies specific to class files. Pack200 produces a byte-oriented output, hopefully with clear patterns and a simple alphabet statistics. It relies on a post-pass compressor to encode these bytes in some more efficient string-sharing, bit-sliced representation.

    The following considerations support this design:

    • Repeating similar compression tactics in two places in a pipeline of transformations can actually degrade overall compression. For example, doing move-to-front in Pack200 band transmission would make it harder for the DEFLATE algorithm to detect repeated patterns, because they would have varying spellings in the tokens DEFLATE would observe. (Delta encoding also has this risk, which is why it's optional in Pack200. But, off-the-shelf back ends don't generally do delta encoding.)
    • Relying on an off-the-shelf backend for final compression simplifies the Pack200 design.
    • It also lets Pack200 leverage the latest byte-oriented compression tools.
    • Such factoring also simplifies engineering of packer heuristics.
    • The job of Pack200 is to find redundancies and patterns at class and package scales. It seems cleaner to avoid messing with byte-level scales.
    • Some specific standard compression techniques may still be encumbered by patents, even on simple, self-evident techniques. Avoiding such patents is a significant cost in engineering a compressor. We would rather avoid this cost by using a standard tool.

  9. How does this specification cope with archive format changes? The major and minor version numbers of a Pack200 archive advertise which version of this standard has been generated by a packer. Because of the flexibility of attribute layouts, packers can sometimes represent new classfile formats in old archive formats, but newer archive formats may be required for reasons of functionality or performance.

    Unpacker implementations are strongly encouraged to support each standard version of the archive format, since there is not always a strong alignment between packer and unpacker versions at either end of a deployment channel. Packer implementations are encouraged to preserve the ability to emit older archive formats, to maintain maximum compatibility with unpackers.

    The reference implementation chooses to maintain backward compatibility by producing a 1.5 pack format if the input JAR archive contains no 1.6 (or newer) classfiles. In general, it will produce the oldest possible archive version compatible with all the input classfiles. An empty archive will default to the oldest archive version, which is 1.5.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Improvements to Program Execution Speed

Enhancements in JDK 6

Descriptions of the many performance enhancements in JDK 6 can be found on the performance web site in the Java SE 6 Performance Whitepaper.

Enhancements in JDK 5.0

The following are some of the enhancements made for improved program execution speed in JDK 5.0.
  • Garbage collection ergonomics - Provides for the automatic detection and choice of the client or server runtime compiler, which enhances performance on server-class machines. See "Server-Class Machine Detection" and "Garbage Collection Ergonomics" at Java Virtual Machines for more information.
  • StringBuilder class - The addition of a new class StringBuilder that works essentially as an unsynchronized StringBuffer for performance enhancement. You should replace all StringBuffer uses with StringBuilder unless you need the synchronization (which you almost certainly don't). StringBuilder is almost always faster than StringBuffer.
  • Java 2D technology - These Java 2D performance enhancements have spin-off performance benefits in other areas of functionality such as Swing/JFC. Examples include improved acceleration for BufferedImage objects, support for hardware-accelerated rendering using OpenGL, and improved text-rendering performance. See New Java 2D Features for more information.
  • Image I/O - Performance and memory usage improvements have been made when reading and writing JPEG images. See "Improved Performance" at Image I/O Features.

Enhancements in JDK 1.4

The following are some of the enhancements made for improved program execution speed in JDK 1.4.
  • Java 2D technology - These Java 2D performance enhancements have spin-off performance benefits in other areas of functionality such as Swing/JFC. One example of performance improvement in JDK 1.4 is that remote X display on Solaris is greatly improved. See New Java 2D Features for more information on Java 2D enhancements, including performance enhancements.
  • java.nio - The New I/O API provides for improved performance in the areas of buffer management, scalable network and file I/O, character-set support, and regular-expression matching. The New I/O APIs supplement the I/O facilities in the java.io package. For more information, see I/O APIs.
  • Reflection - Beginning with JDK 1.4.0, certain reflective operations, specifically java.lang.reflect.Field, java.lang.reflect.Method.invoke(), java.lang.reflect.Constructor.newInstance(), and Class.newInstance(), have been rewritten for higher performance. Reflective invocations and instantiations are several times faster than in previous releases.
  • Networking - The networking functionality in JDK 1.4 has improved performance for Http streaming.
  • java.math - New static method probablePrime has been added to class BigInteger for generating prime numbers. Previously, the sole means of generating a prime BigInteger required the caller to provide a 'certainty' (the log of the probability of compositeness that the caller was willing to tolerate). However, providing an unreasonable value for the certainty could lead to poor performance (if the certainty was too high) or serious bugs (if it was too low). The new prime-generation method provides an efficient algorithm for generating primes using an automatically determined, appropriate value for the certainty based on a draft ANSI specification (X9-80).
  • Hotspot - The Java HotSpot virtual machine now uses "full-speed debugging". In the previous version of HotSpot, when debugging was enabled, the program executed using only the interpreter. Now, the full performance advantage of HotSpot Technology is available to programs running with debugging enabled. The improved performance allows long running programs to be more easily debugged. It also allows testing to proceed at full speed and the launch of a debugger to occur on an exception.

Enhancements in JDK 1.3

The following are some of the changes made to improve the program execution speed and general runtime performance in previous release JDK 1.3. These enhancements have been carried forward into JDK 1.4.

Links to relevant bug reports on the Bug Database web site are provided were applicable for further information.

  • Improved Performance for readUTF and writeUTF - The implementations of the readUTF and writeUTF methods of DataInputStream and DataInputStream have been modified to improve performance. This is a fix for bug number 4219771 on the Bug Database web site.
  • Improved Performance of JScrollPane Painting - The implementation of JScrollPane has been improved so that it does not cause excessive painting and screen flashing when double buffering is not used.
  • Improved JTable Performance - The performance of the JTable's column-handling functionality has been improved. Previously, the performance of the operations of adding columns or recalculating column widths did not scale well as the number of columns became large. The implementation has been changed to improve scalability. This is a fix for bug number 4223642 on the Bug Database web site.
  • Paint Coalescing - Painting performance has been enhanced through the implementation of an improved paint coalescing algorithm. Areas that require repainting are coalesced into a single, non-rectangular repaint area as they are posted to the event queue. This has the effect batching repaints, executing multiple repaints simultaneously in a manner more efficient than in previous releases.
  • Frame Resizing - Resizing of top-level frames has been improved.
  • Internal Frame Blitting - By using Graphics.copyArea calls, Swing's DefaultDesktopManager now needs to redraw far less when frames are dragged.
  • Performance Enhancements in BigIntenger - Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on the Plumb C library. The new implementation performs all standard operations much faster than the old implementation. The speed-up realized in the new implemenation can be as much as 5x or more, depending on the operation being performed.
  • Provision for Better-Performing Numeric Operations - Java SE now contains two classes which provide API for performing general numeric operations.
    • java.lang.StrictMath - Class java.lang.StrictMath is a renaming of class java.lang.Math from previous versions of the Java platform, but otherwise retains the previous specification of Math. In particular, it is defined to return bit-for-bit reproducible results in all implementations.
    • java.lang.Math - Class java.lang.Math provides the same set of API as does class StrictMath. However, unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results, but can vary within specified constraints. This relaxation permits better-performing implementations where strict reproducibility is not required.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Performance-related APIs

Documentation Contents

Core Java Performance

Performance Enhancements

Improvements to Program Execution Speed

More Information

  • Java HotSpot Performance FAQ
  • Java HotSpot VM Options

* As used on this web site, the terms "Java Virtual Machine" and "JVM" mean a virtual machine for the Java platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Preferences API

Documentation Contents

Core Java Preferences API

Applications require preference and configuration data to adapt to the needs of different users and environments. The java.util.prefs package provides a way for applications to store and retrieve user and system preference and configuration data. The data is stored persistently in an implementation-dependent backing store. There are two separate trees of preference nodes, one for user preferences and one for system preferences.

Overview

  • Overview - An overview of the Preferences API.

API Specification

  • java.util.prefs package

More Information

  • Design FAQ - Answers to frequently asked questions concerning the Preferences API.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preferences API Design FAQ

Design FAQ

Following is a collection of frequently asked questions concerning the design of the Preferences API.

  1. How does this Preferences API relate to Properties API?

    It is intended to replace most common uses of Properties, rectifying many of its deficiencies, while retaining its light weight. When using Properties, the programmer must explicitly specify a pathname for each properties file, but there is no standard location or naming convention. Properties files are "brittle", as they are hand-editable but easily corrupted by careless editing. Support for non-string data types in properties is non-existent. Properties cannot easily be used with a persistence mechanism other than the file system. In sum, the Properties facility does not scale.

  2. How does Preferences API relate to JNDI?

    Like JNDI, it provides back-end neutral access to persistent key-value data. JNDI, however, is far more powerful, and correspondingly heavyweight. JNDI is appropriate for enterprise applications that need its power. Preferences API is intended as a simple, ubiquitous, back-end neutral preferences-management facility, enabling any Java application to easily tailor its behavior to user preferences and maintain small amounts of state from run to run.

  3. Why do all of the get methods require the caller to pass in a default?

    This forces the application authors to provide reasonable default values, so that applications have a reasonable chance of running even if the repository is unavailable.

  4. How was it decided which methods should throw BackingStoreException?

    Only methods whose semantics absolutely require the ability to communicate with the backing store throw this exception. Typical applications will have no need to call these methods. As long as these methods are avoided, applications will be able to run even if the backing store is unavailable, which was an explicit design goal.

  5. Why doesn't this API provide stronger guarantees concerning concurrent access by multiple VMs? Similarly, why doesn't the API allow multiple Preferences updates to be combined into a single "transaction", with all or nothing semantics?

    While the API does provide rudimentary persistent data storage, it is not intended as a substitute for a database. It is critical that it be possible to implement this API atop standard preference/configuration repositories, most of which do not provide database-like guarantees and functionality. Such repositories have proven adequate for the purposes for which this API is intended.

  6. Why does this API have case-sensitive keys and node-names, while other APIs playing in a similar space (such as the Microsoft Windows Registry and LDAP) do not?

    In the Java programming universe, case-sensitive String keys are ubiquitous. In particular, they are provided by the Properties class, which this API is intended to replace. It is not uncommon for people to use Properties in a fashion that demands case-sensitivity. For example, Java package names (which are case-sensitive) are sometimes used as keys. It is recognized that this design decision complicates the life of the systems programmer who implements Preferences atop a backing store with case-insensitive keys, but this is considered an acceptable price to pay, as far more programmers will use the Preferences API than will implement it.

  7. Why doesn't this API use the Java 2 Collections Framework?

    This API is designed for a very particular purpose, and is optimized for that purpose. In the absence of generic types (see JSR-14), the API would be less convenient for typical users. It would lack compile-time type safety, if forced to conform to the Map API. Also, it is not anticipated that interoperability with other Map implementations will be required (though it would be straightforward to implement an adapter class if this assumption turned out to be wrong). Preferences API is, by design, so similar to Map that programmers familiar with the latter should have no difficulties using the former.

  8. Why don't the put and remove methods return the old values?

    It is desirable that both of these methods be executable even if the backing store is unavailable. This would not be possible if they were required to return the old value. Further, it would have negative performance impact if the API were implemented atop some common back-end data stores.

  9. Why does the API permit, but not require, stored defaults?

    This functionality is required in enterprise settings for scalable, cost-effective administration of preferences across the enterprise, but would be overkill in a self-administered single-user setting.

  10. Why doesn't this API contain methods to read and write arbitrary serializable objects?

    Serialized objects are somewhat fragile: if the version of the program that reads such a property differs from the version that wrote it, the object may not deserialize properly (or at all). It is not impossible to store serialized objects using this API, but we do not encourage it, and have not provided a convenience method.

  11. Why is Preferences an abstract class rather than an interface?

    It was decided that the ability to add new methods in an upward compatible fashion outweighed the disadvantage that Preferences cannot be used as a "mixin" (That is to say, arbitrary classes cannot also be made to serve as Preferences objects.) Also, this obviates the need for a separate class for the static methods. (Interfaces cannot contain static methods.)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preferences API Enhancements

Documentation Contents

Java™ Preferences API Enhancements

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No changes to report.

Enhancements in J2SE 5.0

No changes to report.

Enhancements in Java 2 SDK v1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preferences API Overview

Introduction

All of the methods that modify preference data are permitted to operate asynchronously. They may return immediately, and changes will eventually propagate to the persistent backing store. The flush method can be used to force updates to the backing store.

The methods in the Preferences class may be invoked concurrently by multiple threads in a single JVM without the need for external synchronization, and the results will be equivalent to some serial execution. If this class is used concurrently by multiple JVMs that store their preference data in the same backing store, the data store will not be corrupted, but no other guarantees are made concerning the consistency of the preference data.

For more details, choose from the following links:

  • Comparing Preferences API to Other Mechanisms
  • Usage Notes
  • Design FAQ

Comparing Preferences API to Other Mechanisms

Prior to the introduction of the Preferences API, developers could choose to manage preference and configuration data in an ad hoc fashion, by using the Properties API or the JNDI API as described below.

Often, preference and configuration data was stored in properties files, accessed through the java.util.Properties API. However, there are no standards as to where such files should reside on disk, or what they should be called. Using this mechanism, it is extremely difficult to backup a user's preference data, or transfer it from one machine to another. As the number of applications increases, the possibility of file name conflicts increases. Also, this mechanism is of no help on platforms that lack a local disk, or where it is desirable that the data be stored in an external data store (such as an enterprise-wide LDAP directory service).

Less frequently, developers stored user preference and configuration data in a directory service, accessed through the Java Naming and Directory Interface (JNDI) API. Unlike the Properties API, JNDI allows the use of arbitrary data stores (back-end neutrality). While JNDI is extremely powerful, it is also rather large, consisting of 5 packages and 83 classes. JNDI provides no policy as to where in the directory name space the preference data should be stored, or in which name space.

Neither Properties nor JNDI provide a simple, ubiquitous, back-end neutral preferences management facility. The Preferences API does provide such a facility, combining the simplicity of Properties with the back-end neutrality of JNDI. It provides sufficient built-in policy to prevent name clashes, foster consistency, and encourage robustness in the face of inaccessibility of the backing data store.

  • See Also: Design FAQ

Usage Notes

The material contained in this section is not part of the Preferences API specification, instead it is intended to provide some examples of how the Preferences API might be used.

  • Obtaining Preferences Objects for an Enclosing Class
  • Obtaining Preferences Objects for a Static Method
  • Atomic Updates
  • Determining Backing Store Status

Obtaining Preferences Objects for an Enclosing Class

The following examples illustrate how you might obtain the Preferences objects (system and user) pertaining to the enclosing class. These examples would work only inside instance methods.

Note that static final fields, rather than inline String literals, are used for the key names (NUM_ROWS and NUM_COLS). This reduces the likelihood of runtime bugs from typographical errors in key names.

Note also that reasonable defaults are provided for each of the preference values obtained. These defaults will be returned if no preference value has been set, or if the backing store is inaccessible.

package com.acme.widget;
import  java.util.prefs.*;

public class Gadget {
    // Preference keys for this package
    private static final String NUM_ROWS = "num_rows";
    private static final String NUM_COLS = "num_cols";

    void foo() {
        Preferences prefs = Preferences.userNodeForPackage(Gadget.class);

        int numRows = prefs.getInt(NUM_ROWS, 40);
        int numCols = prefs.getInt(NUM_COLS, 80);

        ...
    }
}

The above example obtains per-user preferences. If a single, per-system value were desired, the first line in foo would be replaced by:

        Preferences prefs = Preferences.systemNodeForPackage(Gadget.class);

Obtaining Preferences Objects for a Static Method

The examples in the prior section illustrate obtaining Preferences objects pertaining to the enclosing class, and work inside instance methods. In a static method (or static initializer), you need to explicitly provide the name of the package:

    Static String ourNodeName = "/com/acme/widget";

    static void foo() {
        Preferences prefs = Preferences.userRoot().node(ourNodeName);

        ...
    }

It is always acceptable to obtain a system preferences object once, in a static initializer, and use it whenever system preferences are required:

    static Preferences prefs =  Preferences.systemRoot().node(ourNodeName);

In general, it is acceptable to do the same thing for a user preferences object, but not if the code in question is to be used in a server, wherein multiple users will be running concurrently or serially. In such a system, userNodeForPackage and userRoot will return the appropriate node for the calling user, thus it's critical that calls to userNodeForPackage or userRoot be made from the appropriate thread at the appropriate time. If a piece of code may eventually be used in such a server environment, it is good, conservative practice to obtain user preferences objects immediately before they are used, as in the prior example.

Atomic Updates

The preferences API does not provide database like "transactions" wherein multiple preferences are modified atomically. Occasionally, it is necessary to modify two or more preferences as a unit. For example, suppose you are storing the x and y coordinates where a window is to be placed. The only way to achieve atomicity is to store both values in a single preference. Many encodings are possible. Here's a simple one:

    int x, y;
    ...
    prefs.put(POSITION, x + "," + y);

When such a "compound preference" is read, it must be decoded. For robustness, allowances should be made for a corrupt (unparseable) value:

    static int X_DEFAULT = 50, Y_DEFAULT = 25;
    void baz() {
        String position = prefs.get(POSITION, X_DEFAULT + "," + Y_DEFAULT);
        int x, y;
        try {
            int i = position.indexOf(',');
            x = Integer.parseInt(coordinates.substring(0, i));
            y = Integer.parseInt(position.substring(i + 1));
        } catch(Exception e) {
            // Value was corrupt, just use defaults
            x = X_DEFAULT;
            y = Y_DEFAULT;
        }
        ...
    }

Determining Backing Store Status

Typical application code has no need to know whether the backing store is available. It should almost always be available, but if it isn't, the code should continue to execute using default values in place of preference values from the backing store. Very rarely, some advanced program might want to vary its behavior (or simply refuse to run) if the backing store were unavailable. Following is a method that determines whether the backing store is available by attempting to modify a preference value and flush the result to the backing store.

    private static final String BACKING_STORE_AVAIL = "BackingStoreAvail";

    private static boolean backingStoreAvailable() {
        Preferences prefs = Preferences.userRoot().node("<temporary>");
        try {
            boolean oldValue = prefs.getBoolean(BACKING_STORE_AVAIL, false);
            prefs.putBoolean(BACKING_STORE_AVAIL, !oldValue);
            prefs.flush();
        } catch(BackingStoreException e) {
            return false;
        }
        return true;
    }
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Core Java Reflection

Documentation Contents

Java Reflection API

Reflection enables Java code to discover information about the fields, methods and constructors of loaded classes, and to use reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions. The API accommodates applications that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class. It also allows programs to suppress default reflective access control.

API Specification

  • java.lang.reflect

Tutorials and Programmer's Guides

  • The Reflection API trail in the Java Tutorials
  • Dynamic Proxy Classes

Enhancements

  • Enhancements in Java SE 8
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Dynamic Proxy Classes

Contents

Introduction
Dynamic Proxy API
Serialization
Examples

Introduction

A dynamic proxy class is a class that implements a list of interfaces specified at runtime such that a method invocation through one of the interfaces on an instance of the class will be encoded and dispatched to another object through a uniform interface. Thus, a dynamic proxy class can be used to create a type-safe proxy object for a list of interfaces without requiring pre-generation of the proxy class, such as with compile-time tools. Method invocations on an instance of a dynamic proxy class are dispatched to a single method in the instance's invocation handler, and they are encoded with a java.lang.reflect.Method object identifying the method that was invoked and an array of type Object containing the arguments.

Dynamic proxy classes are useful to an application or library that needs to provide type-safe reflective dispatch of invocations on objects that present interface APIs. For example, an application can use a dynamic proxy class to create an object that implements multiple arbitrary event listener interfaces-- interfaces that extend java.util.EventListener-- to process a variety of events of different types in a uniform fashion, such as by logging all such events to a file.

Dynamic Proxy Class API

A dynamic proxy class (simply referred to as a proxy class below) is a class that implements a list of interfaces specified at runtime when the class is created.

A proxy interface is such an interface that is implemented by a proxy class.

A proxy instance is an instance of a proxy class.

Creating a Proxy Class

Proxy classes, as well as instances of them, are created using the static methods of the class java.lang.reflect.Proxy.

The Proxy.getProxyClass method returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces. The proxy class will be defined in the specified class loader and will implement all of the supplied interfaces. If a proxy class for the same permutation of interfaces has already been defined in the class loader, then the existing proxy class will be returned; otherwise, a proxy class for those interfaces will be generated dynamically and defined in the class loader.

There are several restrictions on the parameters that may be passed to Proxy.getProxyClass:

  • All of the Class objects in the interfaces array must represent interfaces, not classes or primitive types.
  • No two elements in the interfaces array may refer to identical Class objects.
  • All of the interface types must be visible by name through the specified class loader. In other words, for class loader cl and every interface i, the following expression must be true:
            Class.forName(i.getName(), false, cl) == i
  • All non-public interfaces must be in the same package; otherwise, it would not be possible for the proxy class to implement all of the interfaces, regardless of what package it is defined in.
  • For any set of member methods of the specified interfaces that have the same signature:
    • If the return type of any of the methods is a primitive type or void, then all of the methods must have that same return type.
    • Otherwise, one of the methods must have a return type that is assignable to all of the return types of the rest of the methods.
  • The resulting proxy class must not exceed any limits imposed on classes by the virtual machine. For example, the VM may limit the number of interfaces that a class may implement to 65535; in that case, the size of the interfaces array must not exceed 65535.

If any of these restrictions are violated, Proxy.getProxyClass will throw an IllegalArgumentException. If the interfaces array argument or any of its elements are null, a NullPointerException will be thrown.

Note that the order of the specified proxy interfaces is significant: two requests for a proxy class with the same combination of interfaces but in a different order will result in two distinct proxy classes. Proxy classes are distinguished by the order of their proxy interfaces in order to provide deterministic method invocation encoding in cases where two or more of the proxy interfaces share a method with the same name and parameter signature; this reasoning is described in more detail in the section below titled Methods Duplicated in Multiple Proxy Interfaces.

So that a new proxy class does not need to be generated each time Proxy.getProxyClass is invoked with the same class loader and list of interfaces, the implementation of the dynamic proxy class API should keep a cache of generated proxy classes, keyed by their corresponding loaders and interface list. The implementation should be careful not to refer to the class loaders, interfaces, and proxy classes in such a way as to prevent class loaders, and all of their classes, from being garbage collected when appropriate.

Proxy Class Properties

A proxy class has the following properties:

  • Proxy classes are public, final, and not abstract.
  • The unqualified name of a proxy class is unspecified. The space of class names that begin with the string "$Proxy" is, however, to be reserved for proxy classes.
  • A proxy class extends java.lang.reflect.Proxy.
  • A proxy class implements exactly the interfaces specified at its creation, in the same order.
  • If a proxy class implements a non-public interface, then it will be defined in the same package as that interface. Otherwise, the package of a proxy class is also unspecified. Note that package sealing will not prevent a proxy class from being successfully defined in a particular package at runtime, and neither will classes already defined in the same class loader and the same package with particular signers.
  • Since a proxy class implements all of the interfaces specified at its creation, invoking getInterfaces on its Class object will return an array containing the same list of interfaces (in the order specified at its creation), invoking getMethods on its Class object will return an array of Method objects that include all of the methods in those interfaces, and invoking getMethod will find methods in the proxy interfaces as would be expected.
  • The Proxy.isProxyClass method will return true if it is passed a proxy class-- a class returned by Proxy.getProxyClass or the class of an object returned by Proxy.newProxyInstance-- and false otherwise. The reliability of this method is important for the ability to use it to make security decisions, so its implementation should not just test if the class in question extends java.lang.reflect.Proxy.
  • The java.security.ProtectionDomain of a proxy class is the same as that of system classes loaded by the bootstrap class loader, such as java.lang.Object, because the code for a proxy class is generated by trusted system code. This protection domain will typically be granted java.security.AllPermission.

Creating a Proxy Instance

Each proxy class has one public constructor that takes one argument, an implementation of the interface InvocationHandler.

Each proxy instance has an associated invocation handler object, the one that was passed to its constructor. Rather than having to use the reflection API to access the public constructor, a proxy instance can be also be created by calling the Proxy.newProxyInstance method, which combines the actions of calling Proxy.getProxyClass with invoking the constructor with an invocation handler. Proxy.newProxyInstance throws IllegalArgumentException for the same reasons that Proxy.getProxyClass does.

Proxy Instance Properties

A proxy instance has the following properties:

  • Given a proxy instance proxy and one of the interfaces implemented by its proxy class Foo, the following expression will return true:
            proxy instanceof Foo
    and the following cast operation will succeed (rather than throwing a ClassCastException):
            (Foo) proxy
  • The static Proxy.getInvocationHandler method will return the invocation handler associated with the proxy instance passed as its argument. If the object passed to Proxy.getInvocationHandler is not a proxy instance, then an IllegalArgumentException will be thrown.
  • An interface method invocation on a proxy instance will be encoded and dispatched to the invocation handler's invoke method as described below.

    The proxy instance itself will be passed as the first argument of invoke, which is of type Object.

    The second argument passed to invoke will be the java.lang.reflect.Method instance corresponding to the interface method invoked on the proxy instance. The declaring class of the Method object will be the interface that the method was declared in, which may be a superinterface of the proxy interface that the proxy class inherits the method through.

    The third argument passed to invoke will be an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. Arguments of primitive types are wrapped in an instance of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean. The implementation of the invoke method is free to modify the contents of this array.

    The value returned by the invoke method will become the return value of the method invocation on the proxy instance. If the declared return value of the interface method is a primitive type, then the value returned by invoke must be an instance of the corresponding primitive wrapper class; otherwise, it must be a type assignable to the declared return type. If the value returned by invoke is null and the interface method's return type is primitive, then a NullPointerException will be thrown by the method invocation on the proxy instance. If the value returned by invoke is otherwise not compatible with the method's declared return type as described above, a ClassCastException will be thrown by the proxy instance.

    If an exception is thrown by the invoke method, it will be also thrown by the method invocation on the proxy instance. The exception's type must be assignable to either any of the exception types declared in the signature of the interface method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by invoke that is not assignable to any of the exception types declared in the throws clause of the interface method, then an UndeclaredThrowableException will be thrown by the method invocation on the proxy instance. The UndeclaredThrowableException will be constructed with the exception that was thrown by the invoke method.

  • An invocation of the hashCode, equals, or toString methods declared in java.lang.Object on a proxy instance will be encoded and dispatched to the invocation handler's invoke method in the same manner as interface method invocations are encoded and dispatched, as described above. The declaring class of the Method object passed to invoke will be java.lang.Object. Other public methods of a proxy instance inherited from java.lang.Object are not overridden by a proxy class, so invocations of those methods behave like they do for instances of java.lang.Object.

Methods Duplicated in Multiple Proxy Interfaces

When two or more interfaces of a proxy class contain a method with the same name and parameter signature, the order of the proxy class's interfaces becomes significant. When such a duplicate method is invoked on a proxy instance, the Method object passed to the invocation handler will not necessarily be the one whose declaring class is assignable from the reference type of the interface that the proxy's method was invoked through. This limitation exists because the corresponding method implementation in the generated proxy class cannot determine which interface it was invoked through. Therefore, when a duplicate method is invoked on a proxy instance, the Method object for the method in the foremost interface that contains the method (either directly or inherited through a superinterface) in the proxy class's list of interfaces is passed to the invocation handler's invoke method, regardless of the reference type through which the method invocation occurred.

If a proxy interface contains a method with the same name and parameter signature as the hashCode, equals, or toString methods of java.lang.Object, when such a method is invoked on a proxy instance, the Method object passed to the invocation handler will have java.lang.Object as its declaring class. In other words, the public, non-final methods of java.lang.Object logically precede all of the proxy interfaces for the determination of which Method object to pass to the invocation handler.

Note also that when a duplicate method is dispatched to an invocation handler, the invoke method may only throw checked exception types that are assignable to one of the exception types in the throws clause of the method in all of the proxy interfaces that it can be invoked through. If the invoke method throws a checked exception that is not assignable to any of the exception types declared by the method in one of the proxy interfaces that it can be invoked through, then an unchecked UndeclaredThrowableException will be thrown by the invocation on the proxy instance. This restriction means that not all of the exception types returned by invoking getExceptionTypes on the Method object passed to the invoke method can necessarily be thrown successfully by the invoke method.

Serialization

Since java.lang.reflect.Proxy implements java.io.Serializable, proxy instances can be serialized, as described in this section. If a proxy instance contains an invocation handler that is not assignable to java.io.Serializable, however, then a java.io.NotSerializableException will be thrown if such an instance is written to a java.io.ObjectOutputStream. Note that for proxy classes, implementing java.io.Externalizable has the same effect with respect to serialization as implementing java.io.Serializable: the writeExternal and readExternal methods of the Externalizable interface will never be invoked on a proxy instance (or an invocation handler) as part of its serialization process. As with all Class objects, the Class object for a proxy class is always serializable.

A proxy class has no serializable fields and a serialVersionUID of 0L. In other words, when the Class object for a proxy class is passed to the static lookup method of java.io.ObjectStreamClass, the returned ObjectStreamClass instance will have the following properties:

  • Invoking its getSerialVersionUID method will return 0L.
  • Invoking its getFields method will return an array of length zero.
  • Invoking its getField method with any String argument will return null.

The stream protocol for Object Serialization supports a type code named TC_PROXYCLASSDESC, which is a terminal symbol in the grammar for the stream format; its type and value are defined by the following constant field in the java.io.ObjectStreamConstants interface:

    final static byte TC_PROXYCLASSDESC = (byte)0x7D;

The grammar also includes the following two rules, the first being an alternate expansion of the original newClassDesc rule:

newClassDesc:
TC_PROXYCLASSDESC newHandle proxyClassDescInfo

proxyClassDescInfo:
(int)<count> proxyInterfaceName[count] classAnnotation superClassDesc

proxyInterfaceName:
(utf)

When an ObjectOutputStream serializes the class descriptor for a class that is a proxy class, as determined by passing its Class object to the Proxy.isProxyClass method, it uses the TC_PROXYCLASSDESC type code instead of TC_CLASSDESC, following the rules above. In the expansion of proxyClassDescInfo, the sequence of proxyInterfaceName items are the names of all of the interfaces implemented by the proxy class, in the order that they are returned by invoking the getInterfaces method on the Class object. The classAnnotation and superClassDesc items have the same meaning as they do in the classDescInfo rule. For a proxy class, superClassDesc is the class descriptor for its superclass, java.lang.reflect.Proxy; including this descriptor allows for the evolution of the serialized representation of the class Proxy for proxy instances.

For non-proxy classes, ObjectOutputStream calls its protected annotateClass method to allow subclasses to write custom data to the stream for a particular class. For proxy classes, instead of annotateClass, the following method in java.io.ObjectOutputStream is called with the Class object for the proxy class:

    protected void annotateProxyClass(Class cl) throws IOException;

The default implementation of annotateProxyClass in ObjectOutputStream does nothing.

When an ObjectInputStream encounters the type code TC_PROXYCLASSDESC, it deserializes the class descriptor for a proxy class from the stream, formatted as described above. Instead of calling its resolveClass method to resolve the Class object for the class descriptor, the following method in java.io.ObjectInputStream is called:

    protected Class resolveProxyClass(String[] interfaces)
        throws IOException, ClassNotFoundException;

The list of interface names that were deserialized in the proxy class descriptor are passed as the interfaces argument to resolveProxyClass.

The default implementation of resolveProxyClass in ObjectInputStream returns the results of calling Proxy.getProxyClass with the list of Class objects for the interfaces named in the interfaces parameter. The Class object used for each interface name i is the value retuned by calling

        Class.forName(i, false, loader)
where loader is the first non-null class loader up the execution stack, or null if no non-null class loaders are on the stack. This is the same class loader choice made by the default behavior of the resolveClass method. This same value of loader is also the class loader passed to Proxy.getProxyClass. If Proxy.getProxyClass throws an IllegalArgumentException, resolveClass will throw a ClassNotFoundException containing the IllegalArgumentException.

Since a proxy class never has its own serializable fields, the classdata[] in the stream representation of a proxy instance consists wholly of the instance data for its superclass, java.lang.reflect.Proxy. Proxy has one serializable field, h, which contains the invocation handler for the proxy instance.

Examples

Here is a simple example that prints out a message before and after a method invocation on an object that implements an arbitrary list of interfaces:

public interface Foo {
    Object bar(Object obj) throws BazException;
}

public class FooImpl implements Foo {
    Object bar(Object obj) throws BazException {
        // ...
    }
}

public class DebugProxy implements java.lang.reflect.InvocationHandler {

    private Object obj;

    public static Object newInstance(Object obj) {
        return java.lang.reflect.Proxy.newProxyInstance(
            obj.getClass().getClassLoader(),
            obj.getClass().getInterfaces(),
            new DebugProxy(obj));
    }

    private DebugProxy(Object obj) {
        this.obj = obj;
    }

    public Object invoke(Object proxy, Method m, Object[] args)
        throws Throwable
    {
        Object result;
        try {
            System.out.println("before method " + m.getName());
            result = m.invoke(obj, args);
        } catch (InvocationTargetException e) {
            throw e.getTargetException();
        } catch (Exception e) {
            throw new RuntimeException("unexpected invocation exception: " +
                                       e.getMessage());
        } finally {
            System.out.println("after method " + m.getName());
        }
        return result;
    }
}

To construct a DebugProxy for an implementation of the Foo interface and call one of its methods:

    Foo foo = (Foo) DebugProxy.newInstance(new FooImpl());
    foo.bar(null);

Here is an example of a utility invocation handler class that provides default proxy behavior for methods inherited from java.lang.Object and implements delegation of certain proxy method invocations to distinct objects depending on the interface of the invoked method:

import java.lang.reflect.*;

public class Delegator implements InvocationHandler {

    // preloaded Method objects for the methods in java.lang.Object
    private static Method hashCodeMethod;
    private static Method equalsMethod;
    private static Method toStringMethod;
    static {
        try {
            hashCodeMethod = Object.class.getMethod("hashCode", null);
            equalsMethod =
                Object.class.getMethod("equals", new Class[] { Object.class });
            toStringMethod = Object.class.getMethod("toString", null);
        } catch (NoSuchMethodException e) {
            throw new NoSuchMethodError(e.getMessage());
        }
    }

    private Class[] interfaces;
    private Object[] delegates;

    public Delegator(Class[] interfaces, Object[] delegates) {
        this.interfaces = (Class[]) interfaces.clone();
        this.delegates = (Object[]) delegates.clone();
    }

    public Object invoke(Object proxy, Method m, Object[] args)
        throws Throwable
    {
        Class declaringClass = m.getDeclaringClass();

        if (declaringClass == Object.class) {
            if (m.equals(hashCodeMethod)) {
                return proxyHashCode(proxy);
            } else if (m.equals(equalsMethod)) {
                return proxyEquals(proxy, args[0]);
            } else if (m.equals(toStringMethod)) {
                return proxyToString(proxy);
            } else {
                throw new InternalError(
                    "unexpected Object method dispatched: " + m);
            }
        } else {
            for (int i = 0; i < interfaces.length; i++) {
                if (declaringClass.isAssignableFrom(interfaces[i])) {
                    try {
                        return m.invoke(delegates[i], args);
                    } catch (InvocationTargetException e) {
                        throw e.getTargetException();
                    }
                }
            }

            return invokeNotDelegated(proxy, m, args);
        }
    }

    protected Object invokeNotDelegated(Object proxy, Method m,
                                        Object[] args)
        throws Throwable
    {
        throw new InternalError("unexpected method dispatched: " + m);
    }

    protected Integer proxyHashCode(Object proxy) {
        return new Integer(System.identityHashCode(proxy));
    }

    protected Boolean proxyEquals(Object proxy, Object other) {
        return (proxy == other ? Boolean.TRUE : Boolean.FALSE);
    }

    protected String proxyToString(Object proxy) {
        return proxy.getClass().getName() + '@' +
            Integer.toHexString(proxy.hashCode());
    }
}

Subclasses of Delegator can override invokeNotDelegated to implement the behavior of proxy method invocations not to be directly delegated to other objects, and they can override proxyHashCode, proxyEquals, and proxyToString to override the default behavior of the methods the proxy inherits from java.lang.Object.

To construct a Delegator for an implementation of the Foo interface:

    Class[] proxyInterfaces = new Class[] { Foo.class };
    Foo foo = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
        proxyInterfaces,
        new Delegator(proxyInterfaces, new Object[] { new FooImpl() }));

Note that the implementation of the Delegator class given above is intended to be more illustrative than optimized; for example, instead of caching and comparing the Method objects for the hashCode, equals, and toString methods, it could just match them by their string names, because none of those method names are overloaded in java.lang.Object.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements to the Java Reflection API

Documentation Contents

Enhancements to the Reflection API including java.lang.Class and java.lang.reflect

  • Enhancements in Java SE 8
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4

Enhancements in Java SE 8

  • Method Parameter Reflection (RFE: JDK-8004841): You can obtain the names of the formal parameters of any method or constructor with the method java.lang.reflect.Executable.getParameters. However, .class files do not store formal parameter names by default. To store formal parameter names in a particular .class file, and thus enable the Reflection API to retrieve formal parameter names, compile the source file with the -parameters option of the javac compiler.

Enhancements in Java SE 6

  • The following methods in java.lang.Class were generified: getInterfaces(), getClasses(). getConstructors(). getMethod(String, Class...), getConstructor(Class...), getDeclaredClasses(), getDeclaredConstructors(), getDeclaredMethod(String, Class...), and getDeclaredConstructor(Class...). As a result, code which uses these methods now produces warnings during compilation.

    For example, consider the following code which invokes getDeclaredMethod():

    import java.lang.reflect.Method;

public class Warning {
    void m() {
        try {
            Warning warn = new Warning();
            Class c = warn.getClass();
            Method m = c.getDeclaredMethod("m");
        } catch (NoSuchMethodException x) {
            x.printStackTrace();
        }
    }
}

$ javac Warning.java
Note: Warning.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
$ javac -Xlint:unchecked Warning.java
Warning.java:8: warning: [unchecked] unchecked call to getDeclaredMethod(java.lang.String,java.lang.Class<?>...) as a member of the raw type java.lang.Class
            Method m = c.getDeclaredMethod("m");
                                          ^
1 warning

  • To remove the warning, the declaration of c should be modified to include an appropriate generic type. In this case, the declation should be:

    Class<?> c = warn.getClass();

  • Method.toString() and Constructor.toString() now correctly display the set of modifiers.
  • The final parameter of Array.newInstance(Class, int...) is of variable arity.

Enhancements in Java SE 5.0

The changes in java.lang.Class and java.lang.reflect include:

  • Support for generics - In particular, the changes support structural program reflection on generic type information. In other words, they make it possible to examine a type, method, constructor or field declaration and obtain generic type information. Specifically, one can determine whether a type, method or constructor declares any type variables, and reflect those type variables to the application program (so that one may learn their names and bounds, for example). One can also obtain the non-erased form of the type of a field, a method or constructor parameter, a method return type or the throws clause of a method or constructor. The generified form of a type name is available via toGenericString(). However, note that we do not provide any support for determining which generic invocation an instance belongs to.
  • Support for annotations - This includes the ability to obtain annotations on types, methods, fields, constructors and formal parameters of methods and constructors that have been marked as available at run-time, using the getAnnotation() method. One can also determine whether an interface is an annotation type.
  • Support for enums - One can determine whether a class is an enum, and whether a field represents an enum constant.
  • Support for var args - One can determine whether a method or constructor is a of variable arity.
  • Convenience methods - for establishing whether a class is local, anonymous or a member class, and what a type's simple and cannoical names are. One can also determine whether a member is synthetic (an artifiact by the implementation).
  • The generification of class java.lang.Class - This allows the use of instances of java.lang.Class as type tokens. See the Generics lesson in the Java Tutorials.

Enhancements in Java SE 1.4

  • Performance enhancements - Certain reflective operations, specifically Field, Method.invoke(), Constructor.newInstance(), and Class.newInstance(), have been rewritten for higher performance. Reflective invocations and instantiations are several times faster than in previous releases.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applying the Factory Pattern to Java RMI

What is a "factory" and why would you want to use one? A factory, in this context, is a piece of software that implements one of the "factory" design patterns. In general, a factory implementation is useful when you need one object to control the creation of and/or access to other objects.By using a factory in Java Remote Method Invocation (Java RMI), you can reduce the number of objects that you need to register with the Java RMI registry.

Examples of Factories in the Real World:

The Bank

When you go to the bank to make a deposit to your account, you don't walk up to a vault, pull out a drawer with your name on it, drop in your money, shut the drawer and leave. Think about how you originally established, or opened, the account. You probably went to the bank, spoke with an Account Manager, and signed some papers. In return, they gave you some checks, a passbook, or a bank card so you could access your account in the future.

The Account Manager is an example of a factory. The person or Automated Teller Machine (ATM) that acts as account manager controls the creation of and/or access to individual accounts.

The Library

Let's think about how a book, compact disk, or video tape gets from the library shelf into your home. Before you can check out any material, you must first get a library card from the librarian. In this case, the librarian could be viewed as a library card factory because the librarian controls the creation of new library card instances.

Once you have a library card, you can go into the library, and without any further fuss, just walk out with all your materials, right? Of course not. Before you can walk out of the library without setting off the alarm system, you must check out the book, CD, or video tape you wish to take home. So you present your library card to, you guessed it, the librarian, who will use your card to access the library database to see if you owe any late fees, and to register these new materials as having been leased to you. In this case, the librarian could be seen as a book factory because the librarian controls your access to the books.

How Does a Factory Work in Java RMI?

Just like any other Java RMI program, there are a few basic players: a server that produces one or more remote objects, each of which implements a remote interface; a client that accesses a name server (the rmiregistry) to get a reference to one of the remote objects; and the rmiregistry, which facilitates the client's initial contact with the server.

For the picture below and the steps that follow, you may make the following assumptions:

  • There are two remote interfaces that the client understands, Factory and Product
  • The FactoryImpl implements the Factory interface and the ProductImpl implements the Product interface
Illustrates the 6 actions listed below.

  2. The FactoryImpl registers, or is registered, with the rmiregistry
  3. The client requests a reference to a Factory
  4. The rmiregistry returns a remote reference to a FactoryImpl
  5. The client invokes a remote method on the FactoryImpl to obtain a remote reference to a ProductImpl
  6. The FactoryImpl returns a remote reference to an existing ProductImpl or to one that it just created, based on the client request
  7. The client invokes a remote method on the ProductImpl

How Could the Bank and Library be Implemented in Java RMI?

The Bank

In code, AccountManager would be a remote interface with one or more remote methods. These methods would return objects that implement the Account interface. In a similar fashion, Account would be an interface that declared all of the operations a person could perform on an account instance, such as depositing or withdrawing money, getting an account balance, or listing the most recent account transactions.

In Java RMI, only the instance of the AccountManager implementation would be registered with the Java RMI registry. The AccountManager implementation would be the factory, returning remote references to (or serialized instances of) Account implementations, like your savings account.

The Library

In the library example, the Librarian would be a remote interface with one or more methods that would return objects that implement the LibraryCard interface. In addition, the Librarian interface would have methods to allow you access to books, CDs, or videotapes that implemented the Loanable interface.

In Java RMI, only the instance of the Librarian implementation would be registered with the Java RMI registry. The Librarian implementation would be the factory, returning remote references to (or serialized instances of) LibraryCard implementations and Loanable object implementations.

While the bank and library examples presented here may not be entirely complete they are not designed to be complete, but rather instructionally useful in describing the factory pattern in Java RMI.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Dynamic code downloading using Java RMI

Documentation Contents

Dynamic code downloading using Java RMI
(Using the java.rmi.server.codebase Property)

This tutorial is organized as follows:

  1. Starting out
  2. What is a codebase?
  3. How does it work?
  4. Using codebase in Java RMI for more than just stub downloading
  5. Command-line examples
  6. Troubleshooting tips

1.0 Starting out

One of the most significant capabilities of the Java platform is the ability to dynamically download Java software from any Uniform Resource Locator (URL) to a virtual machine (VM) running in a separate process, usually on a different physical system. The result is that a remote system can run a program, for example an applet, which has never been installed on its disk. For the first few sections of this document, codebase with regard to applets will be discussed in order to help describe codebase with regard to Java Remote Method Invocation (Java RMI).

For example, a VM running from within a web browser can download the bytecodes for subclasses of java.applet.Applet and any other classes needed by that applet. The system on which the browser is running has most likely never run this applet before, nor installed it on its disk. Once all the necessary classes have been downloaded from the server, the browser can start the execution of the applet program using the local resources of the system on which the client browser is running.

Java RMI takes advantage of this capability to download and execute classes and on systems where those classes have never been installed on disk. Using the Java RMI API any VM, not only those in browsers, can download any Java class file including specialized Java RMI stub classes, which enable the execution of method calls on a remote server using the server system's resources.

The notion of a codebase originates from the use of ClassLoaders in the Java programming language. When a Java program uses a ClassLoader, that class loader needs to know the location(s) from which it should be allowed to load classes. Usually, a class loader is used in conjunction with an HTTP server that is serving up compiled classes for the Java platform. Most likely, the first ClassLoader/codebase pairing that you came into contact with was the AppletClassLoader, and the "codebase" part of the <applet> HTML tag, so this tutorial will assume that you have some experience with Java RMI programming, as well as writing HTML files that contain applet tags. For example, the HTML source will contain something like:

<applet height=100 width=100 codebase="myclasses/" code="My.class">
        <param name="ticker">
</applet>

2.0 What is a codebase?

A codebase can be defined as a source, or a place, from which to load classes into a virtual machine. For example, if you invited a new friend over for dinner, you would need to give that friend directions to the place where you lived, so that he or she could locate your house. Similarly, you can think of a codebase as the directions that you give to a VM, so it can find your [potentially remote] classes.

You can think of your CLASSPATH as a "local codebase", because it is the list of places on disk from which you load local classes. When loading classes from a local disk-based source, your CLASSPATH variable is consulted. Your CLASSPATH can be set to take either relative or absolute path names to directories and/or archives of class files. So just as CLASSPATH is a kind of "local codebase", the codebase used by applets and remote objects can be thought of as a "remote codebase".

3.0 How does it work?

3.1 How codebase is used in applets

To interact with an applet, that applet and any classes that it needs to run must be accessible by remote clients. While applets can be accessed from "ftp://" or local "file:///" URLs, they are usually accessed from a remote HTTP server.

  1. The client browser requests an applet class that is not found in the client's CLASSPATH
  2. The class definition of the applet (and any other class(es) that it needs) is downloaded from the server to the client using HTTP
  3. The applet executes on the client
illustrates three steps above

Figure 1: Downloading applets

The applet's codebase is always relative to the URL of the HTML page in which the <applet> tag is contained.

3.2 How codebase is used in Java RMI

Using Java RMI, applications can create remote objects that accept method calls from clients in other VMs. In order for a client to call methods on a remote object, the client must have a way to communicate with the remote object. Rather than having to program the client to speak the remote object's protocol, Java RMI uses special classes called stubs that can be downloaded to the client that are used to communicate with (make method calls on) the remote object. The java.rmi.server.codebase property value represents one or more URL locations from which these stubs (and any classes needed by the stubs) can be downloaded.

Like applets, the classes needed to execute remote method calls can be downloaded from "file:///" URLs, but like applets, a "file:///" URL generally requires that the client and the server reside on the same physical host, unless the file system referred to by the URL is made available using some other protocol, such as NFS.

Generally, the classes needed to execute remote method calls should be made accessible from a network resource, such as an HTTP or FTP server.

illustrates the first 5 steps of the stub downloadling process, as listed below

Figure 2: Downloading Java RMI stubs

  1. The remote object's codebase is specified by the remote object's server by setting the java.rmi.server.codebase property. The Java RMI server registers a remote object, bound to a name, with the Java RMI registry. The codebase set on the server VM is annotated to the remote object reference in the Java RMI registry.
  2. The Java RMI client requests a reference to a named remote object. The reference (the remote object's stub instance) is what the client will use to make remote method calls to the remote object.
  3. The Java RMI registry returns a reference (the stub instance) to the requested class. If the class definition for the stub instance can be found locally in the client's CLASSPATH , which is always searched before the codebase, the client will load the class locally. However, if the definition for the stub is not found in the client's CLASSPATH, the client will attempt to retrieve the class definition from the remote object's codebase.
  4. The client requests the class definition from the codebase. The codebase the client uses is the URL that was annotated to the stub instance when the stub class was loaded by the registry. Back in step 1, the annotated stub for the exported object was then registered with the Java RMI registry bound to a name.
  5. The class definition for the stub (and any other class(es) that it needs) is downloaded to the client.
    Note: Steps 4 and 5 are the sames steps that the registry took to load the remote object class, when the remote object was bound to a name in (registered with) the Java RMI registry. When the registry attempted to load the remote object's stub class, it requested the class definition from the codebase associated with that remote object.
  6. Now the client has all the information that it needs to invoke remote methods on the remote object. The stub instance acts as a proxy to the remote object that exists on the server; so unlike the applet which uses a codebase to execute code in its local VM, the Java RMI client uses the remote object's codebase to execute code in another, potentially remote VM, as illustrated in Figure 3:
illustrates the final step of the above procedure

Figure 3: Java RMI client making a remote method call

4.0 Using codebase in Java RMI for more than just stub downloading

In addition to downloading stubs and their associated classes to clients, the java.rmi.server.codebase property can be used to specify a location from which any class, not only stubs, can be downloaded.

When a client makes a method call to a remote object, the method that it calls could be written to accept no arguments or a number of arguments. There are three distinct cases that may occur, based on the data type(s) of the method argument(s).

In the first case, all of the method parameters (and return value) are primitive data types, so the remote object knows how to interpret them as method parameters, and there is no need to check its CLASSPATH or any codebase.

In the second case, at least one remote method parameter or the return value is an object, for which the remote object can find the class definition locally in its CLASSPATH.

In the third case (shown as Step 6, in Figure 4), the remote method receives an object instance, for which the remote object cannot find the class definition locally in its CLASSPATH. This type of remote method call is illustrated in Figure 4. The class of the object sent by the client will be a subtype of the declared parameter type. A subtype is either:

  • An implementation of the interface that is declared as the method parameter (or return) type
  • A subclass of the class that is declared as the method parameter (or return) type
Illustrates passing an unknown subtype as a method parameter, as described above and below.

Figure 4: Java RMI client making a remote method call, passing an unknown subtype as a method parameter

7. Like the applet's codebase, the client-specified codebase is used to download Remote classes, non-remote classes, and interfaces to other VMs. If the codebase property is set on the client application, then that codebase is annotated to the subtype instance when the subtype class is loaded by the client. If the codebase is not set on the client, the remote object will mistakenly use its own codebase.

5.0 Command-line examples

In the case of an applet, the applet codebase value is embedded in an HTML page, as we saw in the HTML example in the first section of this tutorial.

In the case of Java RMI codebase, rather than having a reference to the class embedded in an HTML page, the client first contacts the Java RMI registry for a reference to the remote object. Because the remote object's codebase can refer to any URL, not just one that is relative to a known URL, the value of the Java RMI codebase must be an absolute URL to the location of the stub class and any other classes needed by the stub class. This value of the codebase property can refer to:

  • The URL of a directory in which the classes are organized in package-named sub-directories
  • The URL of a JAR file in which the classes are organized in package-named directories
  • A space-delimited string containing multiple instances of JAR files and/or directories that meet the criteria above

Note: When the codebase property value is set to the URL of a directory, the value must be terminated by a "/".

Examples

If the location of your downloadable classes is on an HTTP server named "webvector", in the directory "export" (under the web root), your codebase property setting might look like this:

        -Djava.rmi.server.codebase=http://webvector/export/

If the location of your downloadable classes is on an HTTP server named "webline", in a JAR file named "mystuff.jar", in the directory "public" (under the web root), your codebase property setting might look like this:

        -Djava.rmi.server.codebase=http://webline/public/mystuff.jar

Now let's suppose that the location of your downloadable classes has been split between two JAR files, "myStuff.jar" and "myOtherStuff.jar". If these JAR files are located on different servers (named "webfront" and "webwave"), your codebase property setting might look like this:

        -Djava.rmi.server.codebase="http://webfront/myStuff.jar http://webwave/myOtherStuff.jar"

6.0 Troubleshooting tips

Any serializable class, including Java RMI stubs, can be downloaded if your Java RMI programs are configured properly. Here are the conditions under which dynamic stub downloading will work:

  1. The stub class and any of the classes that the stub relies on are served up from a URL reachable from the client.
  2. The java.rmi.server.codebase property has been set on the server program (or in the case of activation, the "setup" program) that makes the call to bind or rebind, such that:
    • The value of the codebase property is the URL in step A

      and

    • If the URL specified as the value of the codebase property is a directory, it must end in a trailing "/"

  3. The rmiregistry cannot find the stub class or any of the classes that the stub relies on in its CLASSPATH. This is so the codebase gets annotated to the stub when the registry does its class load of the stub, as a result of calls to bind or rebind in the server or setup code.
  4. The client has installed a SecurityManager that allows the stub to be downloaded. This means that the client must also have a properly configured security policy file.

There are two common problems associated with the java.rmi.server.codebase property, which are discussed next.

6.1 If you encounter a problem running your Java RMI server

The first problem you might encounter is the receipt of a ClassNotFoundException when attempting to bind or rebind a remote object to a name in the registry. This exception is usually due to a malformed codebase property, resulting in the registry not being able to locate the remote object's stubs or other classes needed by the stub.

It is important to note that the remote object's stub implements all the same interfaces as the remote object itself, so those interfaces, as well as any other custom classes declared as method parameters or return values, must also be available for download from the specified codebase.

Most frequently, this exception is thrown as a result of omitting the trailing slash from the URL value of the property. Other reasons would include: the value of the property is not a URL; the path to the classes specified in the URL is incorrect or misspelled; the stub class or any other necessary classes are not all available from the specified URL.

The exception that you may encounter in such a case would look like this:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Compiled Code)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Compiled Code)
        at sun.rmi.server.UnicastRef.invoke(Compiled Code)
        at sun.rmi.registry.RegistryImpl_Stub.rebind(Compiled Code)
        at java.rmi.Naming.rebind(Compiled Code)
        at examples.callback.MessageReceiverImpl.main(Compiled Code)
RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub

6.2 If you encounter a problem running your Java RMI client

The second problem you could encounter is the receipt of a ClassNotFoundException when attempting to lookup a remote object in the registry. If you receive this exception in a stacktrace resulting from an attempt to run your Java RMI client code, then your problem is the CLASSPATH with which your Java RMI registry was started. See requirement C in section 6.0. Here is what the exception will look like:

java.rmi.UnmarshalException: Return value class not found; nested exception is:
        java.lang.ClassNotFoundException: MyImpl_Stub
        at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:109
        at java.rmi.Naming.lookup(Naming.java:60)
        at RmiClient.main(MyClient.java:28)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Enhancements in Java RMI

Documentation Contents

Enhancements to Java RMI

  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No current changes to report.

Enhancements in Java SE 5.0

No current changes to report.

Enhancements in Java SE 1.4

No current changes to report.

Previous Enhancements

No current changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Frequently Asked Questions - RMI and Object Serialization

Documentation Contents

Frequently Asked Questions
Java RMI and Object Serialization

Java RMI

Very Frequent Questions

  • A.1 Why do I get an exception for an unexpected hostname and/or port number when I call Naming.lookup?
  • A.2 Do I have to install the _Stub file in the client's CLASSPATH? I thought it could be downloaded.
  • A.3 Does Java Remote Method Invocation (Java RMI) require me to use an HTTP server?
  • A.4 Why am I getting a ClassNotFoundException?
  • A.5 Why does the Java RMI implementation create so many sockets when my application uses custom socket factories; or why are stubs (using a custom socket factory) that refer to the same remote object not equal; or why does the Java RMI implementation not reuse server-side ports when I use a custom server socket factory?

Debugging Java RMI programs

  • B.1 Will there be debugging mechanisms built into Java RMI?
  • B.2 I am having a problem debugging my program on Windows 95. Any suggestions?
  • B.3 Why do I get a java.lang.ClassMismatchError while running my program?
  • B.4 I am sending an array of remote objects and receive an ArrayStoreException. What's going on?
  • B.5 I have local objects that are synchronized. When I make them remote, my application hangs. What's the problem?
  • B.6 I am getting a ClassNotFoundException for my stub class when I try to register a remote object in the registry. What's happening?
  • B.7 My server died. Can I get a trace of the server activity?
  • B.8 Where can I find a list of system properties that might be useful for implementing and debugging Java RMI applications?

Networking

  • C.1 How do Java RMI clients contact remote Java RMI servers?
  • C.2 Why does my remote method or "callback" routine fail with a nested java.net.UnknownHostException?
  • C.3 My server is using a fully qualified domain name or IP address, so why do I still get an UnknownHostException?
  • C.4 I am using the latest release of the JDK and I have a host that has multiple IP addresses. Java RMI is choosing the wrong IP address for its server hostname, how do I work around this problem?
  • C.5 How does Java RMI obtain a server hostname in each of the versions of the JDK?
  • C.6 Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows?
  • C.7 How do I use Java RMI on a Windows 95 standalone machine, not connected to the network?
  • C.8 Why do I get the exception "java.net.SocketException: Address already in use" when I try to run the registry?
  • C.9 How can I use Java RMI through a firewall?
  • C.10 How can I make outgoing Java RMI calls through a local firewall?
  • C.11 How can I receive incoming Java RMI calls through a local firewall?
  • C.12 So what do I have to do to get Java RMI to operate through two firewalls?
  • C.13 Is it possible to replace the java-rmi.cgi script that comes with the JDK distribution with a servlet?

Using Java RMI to achieve X (for some X)

  • D.1 Is there a way to get automatic notification as soon as a remote virtual machine fails?
  • D.2 From within a virtual machine, can a new virtual machine be spawned on a remote machine?
  • D.3 Is it possible for a remote object to be notified when all clients disconnect?
  • D.4 Why doesn't my server program exit when all clients disconnect?
  • D.5 How does the distributed garbage collector detect a client that disconnects? Is it advisable to use System.exit for graceful client termination?
  • D.6 How can my server tell when a client crashes?
  • D.7 The unreferenced() method doesn't get called until ten minutes after I have stopped using the remote object! How can I shorten this delay?
  • D.8 Why can't I get an immediate notification when a client crashes?
  • D.9 How do I run the rmic command in a DOS batch file?
  • D.10 In a remote object implementation, how can I find the host name of the caller of a remote method?
  • D.11 Does RMI handle "out" and "inout" parameters (like CORBA)?
  • D.12 Normally in the Java programming language, it is possible to cast an interface instance to an instance of the class from which it was created and use the result. Why doesn't this work in Java RMI?

How does RMI work with X (for some X)

  • E.1 What if my browser does not support the Java SE version that I need?
  • E.2 Can I implement remote observer/observable objects in Java RMI?

Internals, resources, and performance

  • F.1 At what point is there a "live" connection between the client and the server and how are connections managed?
  • F.2 Does the Java platform replace all remote objects with their stubs during a remote method invocation?
  • F.3 Is it possible to write a new transport layer for Java RMI which does not use sockets? As a follow-up question, how about a transport layer that uses non-TCP based sockets?
  • F.4 I notice the registry continues to use CPU resources, as if it were polling rather than blocking on a select() call. Is the registry implemented by polling?
  • F.5 Is there only one socket connection between a client process and the server, no matter how many stubs exist in that client process?

Miscellaneous

  • G.1 What are the licensing issues surrounding the use of Java RMI?
  • G.2 I have a single-threaded program that waits on standard input for a user command which will initiate an Java RMI call. However, my remote object cannot service this incoming remote call as the program appears to be blocked on standard input. What's the problem?
  • G.3 I am copying array elements to my remote server and changing the values, but the incremented values are not copied back to the client. Why?
  • G.4 Am I allowed to have static fields in a remote interface?
  • G.5 I locate the registry, but then it seems that it's not there, what's happening?

Object Serialization

  1. Why must classes implement Serializable in order to be written to an ObjectOutputStream?
  2. Which JDK system classes are marked serializable?
  3. I am having problems deserializing AWT components. How can I make this work?
  4. Does object serialization support encryption?
  5. The object serialization classes are stream oriented. How do I write objects to a random-access file?
  6. When a local object is serialized and passed as a parameter in a Java RMI call, are the bytecodes for the local object's methods also passed? What about object coherency, if the remote virtual machine (VM) application "keeps" the object handle?
  7. How can I create an ObjectInputStream from an ObjectOutputStream without a file in between?
  8. I create an object and then send it across the net using the writeObject method and receive it using the readObject method. If I then change the value of a field in the object and send it as before, the object that the readObject method returns appears to be the same as the first object and does not reflect the new value of the field. Should I be experiencing this behavior?
  9. Are there any plans to support the serialization of thread objects?
  10. Can I compute diff(serial(x),serial(y))?
  11. Can I compress the serial representation of my objects using my own zip and unzip methods?
  12. Can I execute methods on compressed versions of my objects, for example isempty(zip(serial(x)))?
  13. If I try to serialize a font or image object and then try to reconstitute it in a different VM, my application dies. Why?
  14. How do I serialize a tree of objects?
  15. If class A does not implement Serializable but a subclass B implements Serializable, will the fields of class A be serialized when B is serialized?

Java RMI

A.1 Why do I get an exception for an unexpected hostname and/or port number when I call Naming.lookup?

The hostname and port number you see in the exception trace represent the address on which the looked-up server believes it is listening. While the Java Remote Method Invocation (Java RMI) server can theoretically be on any host, it is usually the same host as that on which the registry is running, and on a different port.

Even if the server is mistaken about its hostname or IP address (or has a hostname that simply isn't resolvable by clients), it will still export all of its objects using that mistaken hostname, but you will see an exception every time you try to receive one of those objects.

The hostname which you specified in Naming.lookup to locate the registry has no effect on the hostname which is already embedded in the remote reference to the server.

Usually, the mysterious hostname is the unqualified hostname of the server, or a private name unknown to the client's nameservice, or (in the case of Windows platforms) the server's Network->Identification->Machine Name.

The appropriate workaround is to set the system property java.rmi.server.hostname when starting the server. The value of the property should be the externally reachable hostname (or IP address) of the server -- whatever works when specified as the host-part in Naming.lookup is good enough.

For more detail, see the questions on callbacks and fully qualified domain names.

A.2 Do I have to install the _Stub file in the client's CLASSPATH? I thought it could be downloaded.

A stub class can be downloaded, if the server that is exporting the remote object annotates the marshalled stub instance with the java.rmi.server.codebase property, which indicates the location from where the stub class can be loaded. You should set the java.rmi.server.codebase property on the server exporting a remote object. While remote clients could set this property, they would then be limited to only getting remote objects from the specified codebase. You should not assume that any client VM will have specified a codebase that resolves to the location of your object.

When a remote object is marshalled by Java RMI (whether as an argument to a remote call or as a return value), the codebase for the stub class is retrieved by Java RMI and used to annotate the serialized stub. When the stub is unmarshalled, the codebase is used to load the stub classfile using the RMIClassLoader, unless the class can already be found in the CLASSPATH or by the context classloader for the receiving object, such as an applet codebase.

If the _Stub class was loaded by an RMIClassLoader, then Java RMI already knows which codebase to use for its annotation. If the _Stub class was loaded from the CLASSPATH, then there is no obvious codebase, and Java RMI consults the java.rmi.server.codebase system property to find the codebase. If the system property is not set, then the stub is marshalled with a null codebase, which means that it cannot be used unless the client has a matching copy of the _Stub classfile in the client's CLASSPATH.

It is easy to forget to specify the codebase property. One way to detect this error is to start the rmiregistry separately and without access to the application classes. This will force Naming.rebind to fail if the codebase is omitted.

For more information on the java.rmi.server.codebase property, please take a look at our tutorial, Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase Property).

A.3 Does Java RMI require me to use an HTTP server?

No. You can set your java.rmi.server.codebase property to use any valid URL protocol, such as file or ftp. Using an HTTP server just makes your life simpler by providing an automated mechanism for class file downloading.

A.4 Why am I getting a ClassNotFoundException?

Most likely the java.rmi.server.codebase property has not been set (or has not been set correctly) on a VM that is exporting your remote object(s). Please take a look at our tutorial, Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase Property).

A.5 Why does the Java RMI implementation create so many sockets when my application uses custom socket factories; or why are stubs (using a custom socket factory) that refer to the same remote object not equal; or why does the Java RMI implementation not reuse server-side ports when I use a custom server socket factory?

The Java RMI implementation attempts to reuse open sockets where possible for remote invocations. When a remote method is invoked on a stub that uses a custom socket factory, the Java RMI implementation will reuse an open connection (if any) as long as that socket was created by an equivalent socket factory. Since client socket factories are serialized to clients, a single client may have several distinct copies of the same logical socket factory. To ensure that the Java RMI implementation will reuse sockets created by custom socket factories, make sure your custom client socket factory classes implement the hashCode and equals methods appropriately. If the client socket factory does not implement these methods correctly, another ramification is that stubs (using the client socket factory) that refer to the same remote object will not be equal.

The Java RMI implementation attempts to reuse server-side ports as well. It will only do so if there is an existing server socket for the port created by an equivalent socket factory. Make sure the server socket factory class implements the hashCode and equals methods too.

If your socket factory has no instance state, a trivial implementation of the hashCode and equals methods are the following:

    public int hashCode() { return 57; }
    public boolean equals(Object o) { return this.getClass() == o.getClass() }

B.1 Will there be debugging mechanisms built into Java RMI?

Java RMI supports a simple call-logging facility for debugging. But there are no current plans to support a full-featured, interactive, remote debugger.

B.2 I am having a problem debugging my program on Windows 95. Any suggestions?

The javaw command throws away output to stdout and stderr, so for debugging purposes it is better to run the java command in a separate window so that you can see reported errors. To do this, execute a command like the following:
        start java EchoImpl

It is advised not to use the javaw command during development. To watch the server activity, start the server with -Djava.rmi.server.logCalls=true.

B.3 Why do I get a java.lang.ClassMismatchError while running my program?

You probably modified one or more classes that were being used by Java RMI programs while your program was running. Try restarting all Java RMI applications (including java.rmi.registry.RegistryImpl). This should clear things up.

B.4 I am sending an array of remote objects and receive an ArrayStoreException. What's going on?

Java RMI replaces the remote objects with the stub and therefore the type of the array must be that of the interface. The code would look like:
   FooRemote[] f = new FooRemote[10];
   for (int i = 0; i < f.length; i++) {
      f[i] = new FooRemoteImpl();
   }

Now Java RMI can put the stub into each cell of the array without an exception on the remote call.

B.5 I have local objects that are synchronized. When I make them remote, my application hangs. What's the problem?

What you encountered was distributed deadlock. In the local VM case, the VM can tell that the calling object "A" owns the lock and will allow the call back to "A" to proceed. In the distributed case, no such determination can be made, so the result is deadlock.

Distributed objects behave differently than local objects. If you simply reuse a local implementation without handling locking and failure, you will probably get unpredictable results.

B.6 I am getting a ClassNotFoundException for my stub class when I try to register a remote object in the registry. What's happening?

When you make a call to the registry to bind an object, the registry actually binds a reference to the stub for the remote object. In order to instantiate a stub object, the registry VM needs to be able to load its class definition. The VM (in this case the server VM) that sends the serialized forms of a stub in a remote method call to the registry is responsible for annotating the stub with the location from which its classes can be downloaded. If stubs are not annotated properly, Java RMI will throw a ClassNotFoundException when it tries to instantiate the stub.

To annotate classes properly, the server needs to set the value of the java.rmi.server.codebase property value to the location(s) of the stub classes. Java RMI will automatically annotate the serialized form of outgoing object instances with the value of the java.rmi.server.codebase property.

NOTE: It is possible (and in a small number of environments appropriate) to enable the rmiregistry to unmarshal stub objects by placing all relevant stub class files in the CLASSPATH of the rmiregistry. However, the rmiregistry does not have to download stub classes. If stub classes are available locally, it will use those classes. Using the rmiregistry's CLASSPATH for stub deployment requires that all VMs that reference a stub instance obtained from that registry have the stub's class file installed locally (in the VM's CLASSPATH).

For example, if the registry loads stub classes from its CLASSPATH, when the registry sends serialized stub objects to other VMs, those serialized objects will be annotated with the value of the registry's java.rmi.server.codebase property (which will almost always be null). If the VMs receiving serialized stub objects from the registry do not have the class files for those stubs installed locally then those VMs are likely to throw a ClassNotFoundException.

Instead, if classes are downloaded dynamically from a server VM's java.rmi.server.codebase annotation, only the server VM needs to have the stub classes in its CLASSPATH. With this approach, application deployment is simpler and it is possible to introduce new stub versions into a running distributed system.

For more information on dynamic code downloading in Java RMI, please see the tutorial, Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase).

B.7 My server died. Can I get a trace of the server activity?

To get a trace of the server activity, start the server as follows:
    java -Djava.rmi.server.logCalls=true YourServerImpl
where YourServerImpl is the name of your server. If your server has hung, you can get a monitor dump and thread dump by doing a ctrl-\ on the Solaris Operating System (Solaris OS) and a ctrl-break on Windows platforms.

B.8 Where can I find a list of system properties that might be useful for implementing and debugging Java RMI applications?

Properties that begin with "java.rmi." are elements of the public specification and are documented in the Java RMI Specification.

Properties that begin with "sun.rmi." are only supported by certain versions of the JDK. While these "sun.rmi.*" properties can be quite useful for debugging and tuning at runtime, please note that they are not considered part of the public API, and their use is subject to change (or may be removed completely) in future versions of the implementation.

C.1 How do Java RMI clients contact remote Java RMI servers?

Illustrates the means by which Java RMI clients contact remote Java RMI servers, as discussed below.

For an Java RMI client to contact a remote Java RMI server, the client must first hold a reference to the server. The Naming.lookup method call is the most common mechanism by which clients initially obtain references to remote servers. Remote references may be obtained by other means, for example: all remote method calls can return remote references. This is what Naming.lookup does; it uses a well-known stub to make a remote method call to the rmiregistry, which sends back the remote reference to the object requested by the lookup method.

Every remote reference contains a server hostname and port number that allow clients to locate the VM that is serving a particular remote object. Once a Java RMI client has a remote reference, the client will use the hostname and port provided in the reference to open a socket connection to the remote server.

Please note that with Java RMI the terms client and server can refer to the same program. A Java program that acts as a Java RMI server contains an exported remote object. A Java RMI client is a program that invokes one or more methods on a remote object in another virtual machine. If a VM performs both of these functions, it may be referred to as an RMI client and a Java RMI server.

C.2 Why does my remote method or "callback" routine fail with a nested java.net.UnknownHostException?

Java RMI may default to using an unresolvable server hostname (for example: unqualified names, Windows Internet Naming Service (WINS) names, or unqualified DHCP names). When a Java RMI client invokes a remote method using a reference that contains an unresolvable server hostname, the client will throw an UnknownHostException.

In order to generate functional remote references, Java RMI servers must be able to supply a fully qualified hostname or IP address that is resolvable from all Java RMI clients (an example of a fully qualified hostname is foo.bar.com). If a Java RMI program provides a remote callback operation, then that program serves a Java RMI object and consequently, must be able to determine a resolvable hostname to use as its server hostname in the remote references it passes to Java RMI clients. VMs that make calls to applets that serve remote objects may throw UnknownHostExceptions because the applet has failed to provide a usable server hostname.

If your Java RMI application throws an UnknownHostException, you can look at the resulting stack trace to see if the hostname that the client is using to contact its remote server is incorrect or not fully qualified. If necessary, you can set the java.rmi.server.hostname property on the server to the correct IP address or hostname of the server machine and Java RMI will use this property's value to generate remote references to the server.

C.3 My server is using a fully qualified domain name or IP address, so why do I still get an UnknownHostException?

Depending on the configuration of your network's name service, a fully qualified hostname that is recognized on one Java RMI host may not be resolvable from another Java RMI host. Some examples where this situation may arise are:
  • Misconfigured DHCP servers may set the fully qualified domain name of Java RMI server machines to be the domain name of the resolver domain instead of the domain in which the Java RMI server actually resides. In this case, Java RMI clients outside the server's DHCP domain will be unable to contact the server, because of its incorrect domain name.
  • The server machine is on a network that is configured to use WINS. Hosts that are only registered under WINS may not be reachable by hosts that rely solely upon DNS.
  • The Java RMI client and server reside on opposite sides of a firewall. If your Java RMI client lies outside a firewall and the server resides inside it, the client will not be able to make any remote calls to the server. If the Java RMI client lies inside the firewall, you will need to configure the Java RMI client to contact the server using HTTP.

C.4 I am using the latest release of the JDK and I have a host that has multiple IP addresses. Java RMI is choosing the wrong IP address for its server hostname. How do I work around this problem?

Set the java.rmi.server.hostname property to the correct IP address of the Java RMI server machine. You can also specify that your server use a fully qualified hostname obtained from a name service by setting the property:
    java.rmi.server.useLocalHostname=true

C.5 How does Java RMI obtain a server hostname?

Java RMI will use an IP address or a fully qualified domain name to identify a machine that serves a remote object. Server hostnames are initialized to the value obtained by performing the following actions:

  1. By default, Java RMI uses the IP address of the server host as the server name for remote references.
  2. If the property java.rmi.server.hostname is set, Java RMI will use its value as the server hostname, and will not attempt to find a fully qualified domain name through any other method. This property takes precedence over all other means of finding a Java RMI server name.
  3. If the property java.rmi.server.useLocalHostname is set to true (by default, the value of this property is false), Java RMI applies the following routine to obtain a hostname for the Java RMI server:
    1. If the value returned by the InetAddress.getLocalHost().getHostName() method contains a "." character, then Java RMI will assume that this value is the server's fully qualified domain name and will use it as the server hostname.
    2. Otherwise, Java RMI will spawn a thread to query the local name service for the fully qualified domain name of the Java RMI server. If the name service takes too long to return, or the name service returns but its response does not contain a "." then Java RMI will use the server's IP address obtained from InetAddress.getLocalHost().getHostAddress().
    Users can override the default time (10 seconds or 10000 milliseconds) that Java RMI will look for a fully qualified domain name by setting the following property:
    sun.rmi.transport.tcp.localHostnameTimeOut=timeOutMillis
    where timeOutMillis is the time that Java RMI will wait in milliseconds. For example:
                java -Dsun.rmi.transport.tcp.localHostnameTimeOut=2000 MyServerApp
When using activatable remote objects, it is recommended that Java RMI servers set the value of the java.rmi.server.useLocalHostname property to true. In general, hostnames are more stable than IP addresses. Activatable remote objects tend to last longer than transient remote objects (for example, surviving a reboot). A Java RMI client will be more likely to locate a remote object over a long period of time if it uses a qualified hostname rather than an explicit IP address.

C.6 Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows platforms?

Most likely, your host's networking setup is incorrect. Java RMI uses the Java API networking classes, in particular java.net.InetAddress, which will cause TCP/IP host name lookups - both host to address mapping and address to hostname mapping (the InetAddress class does this for security reasons). On Windows platforms, the lookup functions are performed by the native socket library, so the delays are happening not in Java RMI, but in the libraries. If your host is set up to use DNS, then it is usually a problem with the DNS server not knowing about the hosts involved in communication, and what you are experiencing are DNS lookup timeouts. Try specifying all the involved hostnames/addresses in the local file \winnt\system32\drivers\etc\hosts or \windows\hosts. The format of a typical host file is:
    IPAddress     Machine Name
e.g.:
    192.0.2.61   homer
This should dramatically cut down the time it takes to make the first lookup.

C.7 How do I use Java RMI on a Windows 95 standalone machine, not connected to the network?

To get Java RMI working on a Windows 95 machine that is not on a network, TCP/IP must be configured. One way to accomplish this is to configure an unused COM port as a dedicated PPP or SLIP connection. Then disable DHCP and manually configure an IP address (e.g. 192.168.1.1). You should then find that from a DOS Shell, you can ping yourself (for example, ping mymachine). You should now be able to use Java RMI on the machine.

C.8 Why do I get the exception "java.net.SocketException: Address already in use" when I try to run the registry?

This exception means that the port that the RegistryImpl uses (by default 1099) is already in use. You may have another registry running on your machine and will need to stop it.

C.9 How can I use Java RMI through a firewall?

It depends on whether you need to traverse a firewall for outgoing calls or for incoming calls.

C.10 How can I make outgoing Java RMI calls through a local firewall?

There are three main methods: HTTP tunnelling, SOCKS, and downloaded socket factories.

HTTP tunnelling

This well-worn method is popular since it requires almost no setup, and works quite well in firewalled environments which permit you to handle HTTP through a proxy, but disallow regular outbound TCP connections.

If Java RMI fails to make a normal (or SOCKS) connection to the intended server, and it notices that a HTTP proxy server is configured, it will attempt to tunnel Java RMI requests through that proxy server, one at a time.

There are two forms of HTTP tunnelling, tried in order. The first is http-to-port; the second is http-to-cgi.

In http-to-port tunneling, Java RMI attempts a HTTP POST request to a http: URL directed at the exact hostname and port number of the target server. The HTTP request contains a single Java RMI request. If the HTTP proxy accepts this URL, it will forward the POST request to the listening Java RMI server, which will recognize the request and unwrap it. The result of the call is wrapped in a HTTP reply, which is returned through the same proxy.

Often, HTTP proxies will refuse to proxy requests to unusual port numbers. In this case, Java RMI will fall back to http-to-cgi tunneling. The Java RMI request is encapsulated in a HTTP POST request as before, but the request URL is of the form http://hostname:80/cgi-bin/java-rmi.cgi?port=n (where hostname and n are the hostname and port number of the intended server). There must be a HTTP server listening on port 80 on the server host, which will run the java-rmi.cgi script (supplied with the JDK), which will in turn forward the request to a Java RMI server listening on port n. Java RMI can unwrap a HTTP-tunneled request without help from a http server, CGI script, or any other external entity. So, if the client's HTTP proxy can connect directly to the server's port, then you don't need a java-rmi.cgi script at all.

To trigger the use of HTTP tunneling, the standard system property http.proxyHost must be set to the hostname of the local HTTP proxy. (There are reports that some Navigator versions do not set this property.)

The major disadvantage of HTTP tunneling is that it does not permit inward calls or multiplexed connections. A secondary disadvantage is that the http-to-cgi method opens a dramatic security hole on the server side, since without modification it will redirect any incoming request to any port.

SOCKS

The default implementation of sockets in the JDK will use a SOCKS server if available and configured. The system property socksProxyHost must have been set to the hostname of the SOCKS server; if the port number of the SOCKS server is not 1080, it must be specified in the socksProxyPort property.

This approach would appear to be the most generally useful solution. As yet, ServerSockets do not use SOCKS, so incoming calls must use another mechanism.

Downloaded socket factories

This allows the server to specify the socket factory that the clients must use. See the tutorial Using Custom Socket Factories with Java RMI for details.

The disadvantage of this approach is that the traversal of the firewall must be done by code provided by the Java RMI server side, which does not necessarily know how that traversal must be done, nor does it automatically have sufficient privilege to traverse the firewall.

C.11 How can I receive incoming Java RMI calls through a local firewall?

There are three main methods: known ports, transport-level bridges, and application-level proxies.

Known Ports

If the exported objects are all exported on a known port on a known host, then that host and port can be explicitly permitted at the firewall. Normally, Java RMI asks for port 0 (which is code for "any port"). In the JDK, there is an extra argument to the exportObject method to specify the exact port number.

This approach has the disadvantage that it requires the assistance of the network administrator responsible for the local firewall. If the exported object is being run in a different location (because code was downloaded to that site), then the local firewall may be run by network administrators who don't know who you are.

Transport-level bridges

A transport-level bridge is a program that reads bytes from one TCP connection and writes them to another (and vice versa) without knowing or caring what the bytes represent.

The idea here is to export objects in such a way that anyone outside the firewall who wants to call remote methods on that object instead contacts a different port (perhaps on a different machine). That different port has a running program which makes a second connection to the real server and then pumps bytes each way.

The tricky part is convincing the client to connect to the bridge. A downloadable socket factory can do this efficiently; otherwise, it is possible to set the java.rmi.server.hostname property to name the bridge host and arrange for port numbers to be the same.

Application-level proxies

This approach is quite a bit of work, but leads to a very secure arrangement. A proxy program runs on a firewall host (one which can be accessed from outside as well as inside). When an internal server intends to make an exported object available to the world, it contacts the proxy server and gives it a remote reference. The proxy server creates a proxy object (a new remote object residing in the proxy server) which implements the same remote interfaces as the original. The proxy server returns a remote reference for the new proxy object to the internal server, which communicates it to the outside world (somehow).

When an outsider makes a call on the proxy, the proxy immediately forwards the call to its original object on the internal server. The use of the proxy is transparent to the outsider (but not to the internal server, who has to decide whether to pass the original reference or the proxy reference when talking to anyone).

Needless to say, this requires considerable setup and the cooperation of the local network administrators.

C.12 So what do I have to do to get Java RMI to operate through two firewalls?

First of all, what cooperation can you expect from the client-side firewall?

In the most pessimistic case, the client-side firewall allows no direct TCP connections and has only a HTTP proxy server so that firewalled clients can "surf the web". In this case, your server host will receive connections at port 80 containing Java RMI requests embedded in HTTP requests. You can use a HTTP server with the java-rmi.cgi program, or you can run the Java RMI server directly on port 80. Either way, the server cannot use callback objects exported by the clients..

A more optimistic case is that the client can make direct connections to the server but cannot receive incoming connections from the server. In this case, callback objects are not normally possible either.

The most conservative approach, assuming no help from the client firewall administrators, is:

  • Avoid using callback objects
  • Run your servers on `public' ports such as 80, 81, 8001, or 443
  • If the servers are not running on port 80, either:
    • Put a CGI-capable HTTP server on port 80 using the java-rmi.cgi script; or
    • Run a port redirector (such as DeleGate) on port 80, which will accept connections and immediately connect to the real server port to pass bytes back and forth. This will cause getClientHost() to return misleading information, so don't make the Registry available through this method unless it's on a different host.

C.13 Is it possible to replace the java-rmi.cgi script that comes with the JDK distribution with a servlet?

We've provided an example that demonstrates how to implement the java-rmi.cgi script using a servlet. The example also explains how to run a remote object inside a servlet VM.

Note: If you do not understand the role that java-rmi.cgi plays in tunnelling remote method calls over HTTP, please see the FAQ question regarding HTTP tunnelling in Java RMI.

D.1 Is there a way to get automatic notification as soon as a remote VM fails?

Not at this time.

D.2 From within a virtual machine, can a new virtual machine be spawned on a remote machine?

The JDK includes object activation, and there are several tutorials explaining how to use it.

D.3 Is it possible for a remote object to be notified when all clients disconnect?

Yes. Your remote object will need to implement the java.rmi.server.Unreferenced interface (in addition to any other necessary interfaces). Java RMI will provide the notification by calling the unreferenced method when all clients disconnect. Your implementation of the unreferenced method will determine what action your remote object should take upon receiving such a notification. However, if there is a reference in the registry, then the Unreferenced.unreferenced method will never be called.

D.4 Why doesn't my server program exit when all clients disconnect?

In Java RMI, a server VM should exit if there are
  • No outstanding client-held references to the remote objects in VM, and
  • No non-daemon threads executing in the VM.
However, just because there are no local or remote references to a remote object does not mean the object will be garbage collected in a timely fashion. It does mean that the remote object's memory can be collected to satisfy a memory allocation that would otherwise fail (with an OutOfMemoryError).

Although the Java API does not specify the timeliness of collection anyway, there is a particular reason for the what can seem like indefinitely delayed collection of remote objects. Under the covers, the Java RMI runtime holds a weak reference to exported remote objects in a table (to keep track of local as well as remote references to the object). The only weak reference mechanism available in the JDK VM uses a non-aggressive, caching collection policy (well-suited for a browser), so objects that are only "weakly reachable" will not get collected until the local GC decides that it really needs that memory to satisfy another allocation. For an idle server, this could never happen. But if memory is needed, an unreferenced server object will be collected.

The Java SE platform includes a new infrastructure that Java RMI will use to reduce significantly the number of conditions under which this problem occurs.

D.5 How does the distributed garbage collector detect a client that disconnects? Is it advisable to use System.exit for graceful client termination?

When the Java RMI runtime in a client VM detects that a remote object is no longer referenced locally, it asynchronously notifies the server relatively quickly so that the server can update the object's referenced set accordingly. The distributed garbage collector uses a lease associated with each client-held remote object reference, and renews leases to remote objects while the client still holds such references. The purpose of the lease renewal mechanism is to allow the server to detect the abnormal termination of clients, so that a server does not hold on to a remote object forever because of a client that was not able to send the appropriate "unreferenced" message before it stopped running. In this context, a client invoking System.exit() is considered abnormal termination, because it does not allow the RMI runtime to send the appropriate "unreferenced" messages to the server. Executing System.runFinalizersOnExit in the client before termination is not sufficient, because not all of the necessary processing is handled in a finalizer; i.e. the "unreferenced" message will not get sent to the server. (Using "runFinalizersOnExit" is generally ill-advised and deadlock-prone anyway.)

If you need to use System.exit() to terminate a client VM, to ensure that remote references held in that VM are cleaned up in a more timely fashion, you should make sure that there are no remote references still reachable. Explicitly null any local references to make them unreachable from running threads. It also may help to run a full garbage collection and to run finalizers before exiting:

    System.gc();
    System.runFinalization();

D.6 How can my server tell when a client crashes?

If you wait for the client's lease to run out, and the unreferenced() method will then be called by the Java RMI implementation (remember that the registry is also a client for this purpose, since it holds references for all its bindings).

If a client is holding a remote reference, it also holds a lease for that reference, which must be renewed (by contacting the server and making a dirty() call). When the final lease for an exported object has expired or closed, the object is considered unreferenced, and (if it implements java.rmi.Unreferenced) its unreferenced() method will be invoked.

If two or more clients have references to the same remote object, the unreferenced() method will not be called until all of them have expired their leases on it. Consequently, if you are using this technique to track individual clients, each client must have a reference to its own Unreferenced object.

D.7 The unreferenced() method doesn't get called until ten minutes after I have stopped using the remote object! How can I shorten this delay?

The lease expiration time is specified by the server, where it can be set using a system property, java.rmi.dgc.leaseValue, whose value is in milliseconds. To set this to a shorter time (for example: 30 seconds), start the server like this:
    java -Djava.rmi.dgc.leaseValue=30000 ServerMain

The default value is 600000 milliseconds (or 10 minutes).

The client will renew each lease when it is halfway expired. If the lease interval is too short, the client will waste a lot of network bandwidth needlessly renewing its lease. If the lease interval is much too short, the client will be unable to renew the lease in time, and the exported object may be deleted as a result.

Future releases of Java RMI may invalidate remote references if they fail to renew their leases (in order to preserve referential integrity); you should not rely on being able to use stale references to remote objects.

Note that you'll only have to wait for the timeout if the client machine crashes. If the client has some control when the disconnect occurs, it can send out the DGC clean call quickly, making the use of Unreferenced quite timely. You can help this process along by nulling out any references the client may have to the remote object and then calling System.gc().

D.8 Why can't I get an immediate notification when a client crashes?

Because nothing the server does can distinguish a crashed host from a network delay.

If or when the crashed client later restarts and contacts the server, the server can infer that the client has lost its state. If a TCP connection is held open between the client and the server throughout their interaction, then the server can detect the client reboot when a later attempt to write to the connection fails (including the hourly TCP keepalive packet, if enabled). However, Java RMI is designed not to require such permanent connections, as it impairs scalability and doesn't help very much.

Given that it is absolutely impossible to instantly determine when a network peer crashes or becomes otherwise unavailable, you must decide how your application should behave when a peer stops responding.

The major tools you have for this task are timeouts and resets. After a timeout, you may conclude that a peer is unreachable, but the peer must be aware of the timeout so that it gives up trying to reach you. The leasing mechanism is designed to do this semi-automatically.

A reset is a purge of existing state held for a peer. For example, a client may cause a reset when it first registers with its server, causing the server to discard any previous state held for that client (having deduced that the client has restarted without memory of the previous, dead, session).

Frequently, the aim is to have and maintain a definitive list of clients at the server, and to keep it up-to-date without error or failure. Since failure and delay can happen at any time in a networked system, some degree of error in the list must be anticipated. If a lease or other mechanism is used to enforce a timeout, then the problem of resource leakage is solved. If the problem of stale data is more serious -- that is, if it would interfere with correct operation -- then it must be explicitly purged in cases where it would otherwise have an effect.

For example, if a business object is locked for editing by a human, and the session dies, then the lock must be broken somehow. In this case, the lock would need a timeout, but if the same human logs in immediately and expects not to have to wait for the timeout to expire, the new session must either take over the lock or assert that the user holds no locks (allowing the server to safely kill the lock).

D.9 How do I run the rmic command in a DOS batch file?

In a DOS batch file, you have to insert the command call before the executable in order for control to return to the batch file. For example:
    call rmic ClientHandler
    call rmic Server
    call rmic ServerHandler
    call rmic Client

D.10 In a remote object implementation, how can I find the host name of the caller of a remote method?

The java.rmi.server.RemoteServer.getClientHost method returns the client host for the current invocation on the current thread.

D.11 Does Java RMI handle "out" and "inout" parameters (like CORBA)?

Java RMI does not support "out" or "inout" parameters, just like the rest of the core Java programming language. All remote calls are methods of a remote object. Local objects are passed by copy and remote objects are passed by reference to a stub. For more details, see Parameter Passing in Remote Method Invocation in the Java RMI Specification.

D.12 Normally in the Java programming language, it is possible to cast an interface instance to an instance of the class from which it was created and use the result. Why doesn't this work in Java RMI?

In Java RMI the client sees only a stub for the original object. The stub implements only the remote interfaces and their remote methods and cannot be cast back to the original implementation class because it's just a stub.

So, you cannot pass a remote object reference from a server to a client, and then send it back to the server and be able to cast it back to the original implementation class. You can, though, use the remote object reference on the server to make a remote call to the object.

If you need to find the implementation class again, you'll need to keep a table that maps the remote reference to the implementation class.

E.1 What if my browser does not support the JDK or Java SE version I need?

Try using the Java Plug-in for browsers that do not support the JDK or Java SE version you need.

E.2 Can I implement remote observer/observable objects in Java RMI?

What you can do is "wrap" java.util.Observable and java.util.Observer with new interfaces (you could call them RemoteObservable and RemoteObserver). In these new interfaces, make each of the methods throw java.rmi.RemoteException. Then, your remote objects can implement these interfaces.

Note that since the "wrapped" non-remote object does not extend java.rmi.server.UnicastRemoteObject, you will need to explicitly export the object using the exportObject method of UnicastRemoteObject. In doing this though, you lose the java.rmi.server.RemoteObject implementations of the equals, hashCode, and toString methods.

F.1 At what point is there a "live" connection between the client and the server and how are connections managed?

When a client does a "lookup" operation, a connection is made to the rmiregistry on the specified host. In general, a new connection may or may not be created for a remote call. Connections are cached by the Java RMI transport for future use, so if a connection is free to the right destination for a remote call, then it is used. A client cannot explicitly close a connection to a server, since connections are managed at the Java RMI transport level. Connections will time out if they are unused for a period of time.

F.2 Does the Java platform replace all remote objects with their stubs during a remote method invocation?

The JRMP and Java RMI-IIOP implementations will replace each remote object with a corresponding stub (of the same protocol), even deep inside graphs of serializable objects.

F.3 Is it possible to write a new transport layer for Java RMI which does not use sockets? As a follow-up question, how about a transport layer that uses non-TCP-based sockets?

We have designed the transport interfaces so that different implementations of these interfaces can be used by Java RMI. In earlier releases, this abstraction was used for our purposes and was not exposed for general use. Now, in the JDK, Java RMI supports client and server socket factories that can be used to make Java RMI calls over non-TCP-based sockets.

F.4 I notice the registry continues to use CPU resources, as if it were polling rather than blocking on a select() call. Is the registry implemented by polling?

Java RMI does not poll on select calls. There is a thread that wakes up every so often and polls the table of exported remote objects. This "reap" thread is used for the purposes of the distributed garbage collector.

F.5 Is there only one socket connection between a client process and the server, no matter how many stubs exist in that client process?

Java RMI reuses the socket connections between client and server whenever possible. The current implementation creates additional sockets on demand when they are needed. For example, if the existing socket is in use by a call then a new socket is created for the new call. Typically, there are at least two sockets open since the distributed garbage collector needs to make remote calls when remote objects are returned from the server. If a cached connection remains unused for a period of time, the connection is closed.

G.1 What are the licensing issues surrounding the use of Java RMI?

Java RMI is part of the Java SE platform and as such is subject to the licensing terms of Java SE.

G.2 I have a single-threaded program that waits on standard input for a user command which will initiate a Java RMI call. However, my remote object cannot service this incoming remote call as the program appears to be blocked on standard input. What's the problem?

This is a known problem, not with Java RMI, but with the thread that reads standard input. The thread does not yield on the blocking read, but instead stays running, hardly letting the listener get any cycles. We have tried two workarounds that seem successful: set the main thread (the one reading standard input) to a lower priority, or yield while bytes are not available in the stream before actually reading it.

G.3 I am copying array elements to my remote server and changing the values, but the incremented values are not copied back to the client. Why?

Non-remote objects are passed by copy, so if you want to have the new values of the array reflected in the client, you will have to send them back as a return argument.

G.4 Am I allowed to have static fields in a remote interface?

Yes. An initializer is run in each VM that loads the remote interface, creating a new static variable with the specified values. So, you have a separate copy of this static variable in each VM that loads the remote interface.

G.5 I locate the registry, but then it seems that it's not there, what's happening?

The method LocateRegistry.getRegistry(String host) does not contact the registry on the host, but rather just looks up the host to make sure it exists. So, even though this method succeeded, this does not necessarily mean that a registry is running on the specified host. It just returns a stub that can then access the registry.

Object Serialization

1. Why must classes implement Serializable in order to be written to an ObjectOutputStream?

The decision to require that classes implement the java.io.Serializable interface was not made lightly. The design called for a balance between the needs of developers and the needs of the system to be able to provide a predictable and safe mechanism. The most difficult design constraint to satisfy was the safety and security of classes for the Java programming language.

If classes were to be marked as being serializable the design team worried that a developer, either out of forgetfulness, laziness, or ignorance might not declare a class as being Serializable and then make that class useless for RMI or for purposes of persistence. We worried that the requirement would place on a developer the burden of knowing how a class was to be used by others in the future, an essentially unknowable condition. Indeed, our preliminary design, as reflected in the alpha API, concluded that the default case for a class ought to be that the objects in the class be serializable. We changed our design only after considerations of security and correctness convinced us that the default had to be that an object not be serialized.

Security restrictions

The first consideration that caused us to change the default behavior of objects had to do with security, and in particular in the privacy of fields declared to be private, package protected, or protected. The Java platform restricts access to such fields for either read or write to a subset of the objects within the runtime.

No such restriction can be made on an object once it has been serialized; the stream of bytes that is the result of object serialization can be read and altered by any object that has access to that stream. This allows any object access to the state of a serialized object, which can violate the privacy guarantees users of the language expect. Further, the bytes in the stream can be altered in arbitrary ways, allowing the reconstruction of an object that was never created within the protections of a Java platform. There are cases in which the re-creation of such an object could compromise not only the privacy guarantees expected by users of the Java platform, but the integrity of the platform itself.

These violations cannot be guarded against, since the whole idea of serialization is to allow an object to be converted into a form that can be moved outside of the Java platform (and therefore outside of the privacy and integrity guarantees of that environment) and then be brought back into the environment. Requiring objects to be declared serializable does mean that the class designer must make an active decision to allow the possibility of such a breach in privacy or integrity. A developer who does not know about serialization should not be open to compromise because of this lack of knowledge. In addition, we would hope that the developer who declares a class to be serializable does so after some thought about the possible consequences of that declaration.

Note that this sort of security problem is not one that can be dealt with by the mechanism of a security manager. Since serialization is intended to allow the transport of an object from one virtual machine to some other (either over space, as it is used in RMI, or over time, as when the stream is saved to a file), the mechanisms used for security need to be independent of the runtime environment of any particular virtual machine. We wanted to avoid as much as possible the problem of being able to serialize an object in one virtual machine and not being able to deserialize that object in some other virtual machine. Since the security manager is part of the runtime environment, using the security manager for serialization would have violated this requirement.

Forcing a conscious decision

While security concerns were the first reason for considering the design change, a reason that we feel is at least as convincing is that serialization should only be added to a class after some design consideration. It is far too easy to design a class that falls apart under serialization and re-construction. By requiring a class designer to declare support for the serialization interface, we hoped that the designer would also give some thought to the process of serializing that class.

Examples are easy to cite. Many classes deal with information that only makes sense in the context of the runtime in which the particular object exists; examples of such information include file handles, open socket connections, security information, etc. Such data can be dealt with easily by simply declaring the fields as transient, but such a declaration is only necessary if the object is going to be serialized. A novice (or forgetful, or hurried) programmer might neglect to mark fields as transient in much the same way he or she might neglect to mark the class as implementing the Serializable interface. Such a case should not lead to incorrect behavior; the way to avoid this is to not serialize objects not marked as implementing Serializable.

Another example of this sort is the "simple" object that is the root of a graph that spans a large number of objects. Serializing such an object could result in serializing lots of others, since serialization works over an entire graph. Doing something like this should be a conscious decision, not one that happens by default.

The need for this sort of thought was brought home to us in the group when we were going through the base Java API class libraries, marking the system classes as serializable (where appropriate). We had originally thought that this would be a fairly simple process, and that most of the system classes could just be marked as implementing Serializable and then use the default implementation with no other changes. What we found was that this was far less often the case than we had suspected. In a large number of the classes, careful thought had to be given to whether or not a field should be marked as transient or whether it made sense to serialize the class at all.

Of course, there is no way to guarantee that a programmer or class designer is actually going to think about these issues when marking a class as serializable. However, by requiring the class to declare itself as implementing the Serializable interface we do require that some thought be given by the programmer. Having serialization be the default state of an object would mean that lack of thought could cause bad effects in a program, something that the overall design of the Java platform has attempted to avoid.

2. Which JDK system classes are marked serializable?

Removed. This information is readily available from the API documentation generated by the javadoc tool.

3. I am having problems deserializing JDK AWT components. How can I make this work?

When you serialize AWT widgets, also serialized are the Peer objects that map the AWT functions to the local window system. When you deserialize (reconstitute) the AWT widgets, the old Peers are re-created, but they are out of date. Peers are native to the local window system and contain pointers to data structures in the local address space, and therefore cannot be moved.

As a work around, you should first remove the top-level widget from its container (so the widgets are no longer "live"). The peers are discarded at this point and you will save only the AWT widget state. When you later deserialize and read the widgets back in, add the top level widget to the frame to make the AWT widgets appear. You may need to add a show call.

AWT widgets are serializable. The java.awt.Component class implements Serializable.

4. Does object serialization support encryption?

Object serialization does not contain any encryption/decryption in itself. It writes to and reads from standard streams in the Java API, so it can be coupled with any available encryption technology. Object serialization can be used in many different ways. Other than just writing and reading to and from files, it can also be used for Java RMI to communicate between hosts.

RMI's use of serialization leaves encryption and decryption to the lower network transport. We expect that when a secure channel is needed the network connections will be made using SSL or the like (see Using RMI with SSL).

5. The object serialization classes are stream oriented. How do I write objects to a random-access file?

Currently there is no direct way to write objects to a random-access file.

You can use ByteArrayInputStream and ByteArrayOutputStream objects as intermediate places to write and read bytes to and from the random access file and create ObjectInputStreams and ObjectOutputStreams from the byte streams to transport the objects. You just have to make sure that you have the entire object in the byte stream or reading/writing the object will fail.

For example, java.io.ByteArrayOutputStream can be used to receive the bytes of ObjectOutputStream. From it you can get a result in the form of a byte array. That in turn can be used with ByteArrayInputStream as input to an ObjectInput stream.

6. When a local object is serialized and passed as a parameter in a Java RMI call, are the bytecodes for the local object's methods also passed? What about object coherency, if the remote VM application "keeps" the object handle?

The bytecodes for a local object's methods are not passed directly in the ObjectOutputStream, but the object's class may need to be loaded by the receiver if the class is not already available locally. The class files themselves are not serialized, just the names of the classes. All classes must be able to be loaded during deserialization using the normal class loading mechanisms. For applets, this means they are loaded by the AppletClassLoader.

There are no coherency guarantees for local objects passed to a remote VM since such objects are passed by copying their contents (a true pass-by-value).

7. How can I create an ObjectInputStream from an ObjectOutputStream without a file in between?

ObjectOutputStream and ObjectInputStream work to/from any stream object. You could use a ByteArrayOutputStream and then get the array and insert it into a ByteArrayInputStream. You could also use the piped stream classes as well. Any java.io class that extends the OutputStream and InputStream classes can be used.

8. I create an object and then send it across the net using the writeObject method and receive it using the readObject method. If I then change the value of a field in the object and send it as before, the object that the readObject method returns appears to be the same as the first object and does not reflect the new value of the field. Should I be experiencing this behavior?

The ObjectOutputStream class keeps track of each object it serializes and sends only the handle if that object is seen again. This is the way it deals with graphs of objects. The corresponding ObjectInputStream keeps track of all of the objects it has created and their handles so when the handle is seen again it can return the same object. Both output and input streams keep this state until they are freed.

Alternatively, the ObjectOutputStream class implements a reset method that discards the memory of having sent an object, so sending an object again will make a copy.

9. Are there any plans to support the serialization of thread objects?

Threads will NOT be serializable. In the present implementation, if you attempt to serialize and then deserialize a thread, there is NO explicit allocation of a new native thread or stack; all that happens is that the object is allocated system resources with none of the native implementation. In short, it just won't work and will fail in unpredictable ways.

The difficulty with threads is that they have so much state which is intricately tied into the virtual machine that it is difficult or impossible to re-establish the context somewhere else. For example, saving the VM call stack is insufficient because if there were native methods that had called C procedures that in turn called code for the Java platform, there would be an incredible mix of Java programming language constructs and C pointers to deal with. Also, serializing the stack would imply serializing any object reachable from any stack variable.

If a thread were resumed in the same VM, it would be sharing a lot of state with the original thread, and would therefore fail in unpredictable ways if both threads were running at once, just like two C threads trying to share a stack. When deserialized in a separate VM, it's hard to tell what might happen.

10. Can I compute diff(serial(x),serial(y))?

The diff will produce the same stream each time the same object is serialized. You will need to create a new ObjectOutputStream to serialize each object.

11. Can I compress the serial representation of my objects using my own zip and unzip methods?

ObjectOutputStream produces an OutputStream; if your zip object extends the OutputStream class there is no problem compressing it.

12. Can I execute methods on compressed versions of my objects, for example isempty(zip(serial(x)))?

This is not really viable for arbitrary objects because of the encoding of objects. For a particular object (such as a String) you can compare the resulting bit streams. The encoding is stable, in that every time the same object is encoded it is encoded to the same set of bits.

13. If I try to serialize a font or image object and then try to reconstitute it in a different VM, my application dies. Why?

Removed. Fonts are now serializable, but images are not.

14. How do I serialize a tree of objects?

Here's a brief example that shows how to serialize a tree of objects.

import java.io.*;

class tree implements java.io.Serializable {
    public tree left;
    public tree right;
    public int id;
    public int level;

    private static int count = 0;

    public tree(int depth) {
        id = count++;
        level = depth;
        if (depth > 0) {
            left = new tree(depth-1);
            right = new tree(depth-1);
        }
    }

    public void print(int levels) {
        for (int i = 0; i < level; i++)
            System.out.print("  ");
        System.out.println("node " + id);

        if (level <= levels && left != null)
            left.print(levels);

        if (level <= levels && right != null)
            right.print(levels);
    }

    public static void main (String argv[]) {

        try {
            /* Create a file to write the serialized tree to. */
            FileOutputStream ostream = new FileOutputStream("tree.tmp");
            /* Create the output stream */
            ObjectOutputStream p = new ObjectOutputStream(ostream);

            /* Create a tree with three levels. */
            tree base = new tree(3);

            p.writeObject(base); // Write the tree to the stream.
            p.flush();
            ostream.close();    // close the file.

            /* Open the file and set to read objects from it. */
            FileInputStream istream = new FileInputStream("tree.tmp");
            ObjectInputStream q = new ObjectInputStream(istream);

            /* Read a tree object, and all the subtrees */
            tree new_tree = (tree)q.readObject();

            new_tree.print(3);  // Print out the top 3 levels of the tree
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}

15. If class A does not implement Serializable but a subclass B implements Serializable, will the fields of class A be serialized when B is serialized?

Only the fields of Serializable objects are written out and restored. The object may be restored only if class A has a no-arg constructor that will initialize the fields of non-serializable supertypes. If the subclass has access to the state of the superclass it can implement writeObject and readObject to save and restore that state.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java RMI Implementation Logging

The Java Remote Method Invocation (Java RMI) implementation uses the Logging APIs to provide implementation logging output. The logging configuration file and programmatic API (java.util.logging) can be used to configure Java RMI implementation logging.

The java.rmi.server.logCalls system property and the implementation-specific sun.rmi.* logging properties that were recognized by previous JDK versions still function to set the default levels for the Java RMI implementation Logger objects and to cause their output to be directed to System.err as with earlier versions.

The table below shows the names of the Logger objects used by the Java RMI implementation and how they correspond to the logging properties supported by previous versions.

Note that the Java RMI implementation supports a logging category, client-side call logging, which is analogous to the server-side call logging activated by the java.rmi.server.logCalls property. Client-side call logging is output to the Logger named sun.rmi.client.call.

System Property Name | Logger Name | Information Logged
java.rmi.server.logCalls | sun.rmi.server.call | server-side remote calls and exceptions
sun.rmi.server.logLevel | sun.rmi.server.ref | server-side remote reference activity
sun.rmi.client.logCalls | sun.rmi.client.call | client-side remote calls and exceptions
sun.rmi.client.logLevel | sun.rmi.client.ref | client-side remote reference activity
sun.rmi.dgc.logLevel | sun.rmi.dgc | distributed garbage collection activity
sun.rmi.loader.logLevel | sun.rmi.loader | activity of default RMIClassLoader provider
sun.rmi.transport.logLevel | sun.rmi.transport.misc | transport-layer activity
sun.rmi.transport.tcp.logLevel | sun.rmi.transport.tcp | TCP binding and connection activity
sun.rmi.transport.proxy.logLevel | sun.rmi.transport.proxy | HTTP tunnelling activity
(none) | sun.rmi.runtime | miscellaneous runtime activity

For both the sun.rmi.client.call and the sun.rmi.server.call Loggers, exceptions thrown from remote calls are logged at the level Level.FINE, and each remote call is logged at the level Level.FINER. Setting the java.rmi.server.logCalls or sun.rmi.client.logCalls system properties to the value "true" causes the corresponding Logger to be set to the level Level.FINER.

For the sun.rmi.* logging properties that have names ending in ".logLevel", a value of "BRIEF" causes the corresponding Logger to be set to the level Level.FINE, and a value of "VERBOSE" causes the corresponding Logger to be set to the level Level.FINER. Use of the logging configuration file is now preferred over the use of these sun.rmi.* system properties for logging.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java RMI Release Notes

Documentation Contents

Java RMI Enhancements

Enhancements in JDK 6

java.rmi.MarshalledObject now generic
The class MarshalledObject now has a type parameter representing the type of the contained serialized object.
Bug fix: Explicit TCP ports freed after remote objects unexported (4457683)
In previous releases, after a remote object had been exported on an explicit (non-anonymous) TCP port, the RMI implementation would keep a server socket bound to that port open for the lifetime of the virtual machine, regardless of the life cycle of remote objects exported on that port. This bug has been fixed so that after all remote objects that had been exported on a given non-anonymous port have become unexported (either explicitly or through distributed garbage collection) then the associated server socket will be closed. (There is an equivalent bug for anonymous TCP ports: 6279965.)
Bug fix: Garbage collection of client socket factories (4486732)
In previous releases, after a remote invocation was made on a remote stub containing a non-null RMIClientSocketFactory in a given virtual machine, then either that factory object or an equivalent factory object would remain forever reachable in the virtual machine, preventing it (and its defining class loader) from ever being garbage collected; this bug has been fixed. (There is an equivalent bug for socket factories used to export a remote object: 6332603.)
Default GC interval lengthed to one hour (6200091)
In previous releases, the maximum interval between garbage collections of the local heap enforced by the RMI implementation (while there are live remote references or exported remote objects), which is controlled by the system properties sun.rmi.dgc.client.gcInterval and sun.rmi.dgc.server.gcInterval, was one minute by default. The default interval is now one hour, to better accommodate applications with large heap sizes without special configuration.

Enhancements and Changes in Previous Releases

Dynamic Generation of Stub Classes (since Java SE 5.0)
This release adds support for the dynamic generation of stub classes at runtime, obviating the need to use the Java Remote Method Invocation (Java RMI) stub compiler, rmic, to pregenerate stub classes for remote objects. Note that rmic must still be used to pregenerate stub classes for remote objects that need to support clients running on earlier versions.

When an application exports a remote object (using the constructors or static exportObject methods1 of the classes java.rmi.server.UnicastRemoteObject or java.rmi.activation.Activatable) and a pregenerated stub class for the remote object's class cannot be loaded, the remote object's stub will be a java.lang.reflect.Proxy instance (whose class is dynamically generated) with a java.rmi.server.RemoteObjectInvocationHandler as its invocation handler.

An existing application can be deployed to use dynamically generated stub classes unconditionally (that is, whether or not pregenerated stub classes exist) by setting the system property java.rmi.server.ignoreStubClasses to "true". If this property is set to "true", pregenerated stub classes are never used.

Notes:

  • If a remote object has pre-5.0 clients, that remote object should use a stub class pregenerated with rmic or the client will get an ClassNotFoundException deserializing the remote object's stub. Pre-5.0 clients will not be able to load an instance of a dynamically generated stub class, because such a class contains an instance of RemoteObjectInvocationHandler, which was not available prior to this release.
  • Prior to Java SE 5.0, exporting a remote object would throw a java.rmi.StubNotFoundException if the pregenerated stub class for the remote object's class could not be loaded. With the added support for dynamically generated stub classes, exporting a remote object that has no pregenerated stub class will silently succeed instead. A user deploying a server application to support pre-5.0 clients must still make sure to pregenerate stub classes for the server's remote object classes, even though missing stub classes are no longer reported at export time. Such errors will instead be reported to a pre-5.0 client when it deserializes a dynamically generated stub class.

1 The static method UnicastRemoteObject.exportObject(Remote) is declared to return java.rmi.server.RemoteStub and therefore cannot be used to export a remote object to use a dynamically generated stub class for its stub. An instance of a dynamically generated stub class is a java.lang.reflect.Proxy instance which is not assignable to RemoteStub.

Standard SSL/TLS Socket Factory Classes (since Java SE 5.0)
This release adds standard Java RMI socket factory classes, javax.rmi.ssl.SslRMIClientSocketFactory and javax.rmi.ssl.SslRMIServerSocketFactory, which communicate over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols using the Java Secure Socket Extension (JSSE). These socket factory classes provide a simple way to use JSSE with Java RMI, enabling enforcement of integrity, confidentiality (through encryption), server authentication, and (optionally) client authentication for remote method invocations. For more information on how to use custom socket factories with Java RMI, see the tutorial "Using Custom Socket Factories with Java RMI". For more information on JSSE (including how to configure it), see the JSSE Reference Guide.
Launching rmid or a Java RMI Server from inetd/xinetd (since Java SE 5.0)
A new feature, provided by the System.inheritedChannel method, allows an application to obtain a channel (java.nio.channels.SocketChannel or java.nio.channels.ServerSocketChannel, for example) inherited from a process that launched the virtual machine (VM). Such an inherited channel can be used to either service a single incoming connection (in the case of a SocketChannel) or accept multiple incoming connections (in the case of ServerSocketChannel). Therefore, Java networking applications launched by inetd (Solaris Operating System) or xinetd (Linux) can now obtain the SocketChannel or ServerSocketChannel inherited from inetd/xinetd.

With the addition of this feature, the Java RMI activation daemon rmid has been enhanced to support being launched from inetd/xinetd so that rmid can be started up only when it receives an incoming connection. For details on the enhancements to rmid to support this feature, see the tools page for rmid (for Solaris, Linux, or Mac OS X operating systems). For details on how to configure inetd to launch rmid, see the tutorial "Configuring inetd to Launch rmid".

An application using Java RMI can also be designed to be launched from inetd or xinetd. For an example on how to implement this technique, see the tutorial "Designing Services to be Launched from inetd."

rmic default stub protocol version option now -v1.2 (since Java SE 5.0)
When rmic is run without an option to specify the JRMP stub protocol version to be used by the generated classes, it now behaves as if the -v1.2 option were specified, instead of the -vcompat option as in previous releases.

This change means that by default, rmic does not generate any skeleton classes and generates stub classes that only implement the 1.2 stub protocol version. If a remote implementation class needs to be built to support clients running on JDK 1.1, then the -vcompat option must now be specified explicitly. (Also, note that as described above, if a remote implementation class does not need to support clients running on any release prior to Java SE 5.0, then rmic does not need to be run at all for that class.)

See the tools documentation for rmic [Solaris, Linux, or Mac OS X] [Windows] for more information about these command line options.

rmic no longer compiles arbitrary source files in the class path (since Java SE 5.0)
In previous releases, rmic would sometimes, while processing its input class files, attempt to compile arbitrary .java source files that it encountered in the class path. In Java SE 5.0, rmic does not attempt to compile any source files other than those for the stub, skeleton, or tie classes that it generates.

The expectation is that the remote implementation classes passed to rmic, as well as all classes and interfaces that they depend on, have already been successfully compiled with javac before rmic is run. If an existing build procedure depends on the previous behavior of rmic for compiling some of its application source files, then that build procedure will need to be modified to ensure that all necessary classes are correctly compiled with javac before running rmic.

Server-side Stack Traces Now Retained in Remote Exceptions (since Java SE 1.4)
The Java RMI runtime implementation will now preserve the server-side stack trace information of an exception that is thrown from a remote call, in addition to filling in the client-side stack trace as it did in previous releases. Therefore, when such an exception becomes accessible to client code, its stack trace will now contain all of its original server-side trace data followed by the client-side trace.

This feature is made possible by the new "programmatic access to stack trace information" feature of java.lang.Throwable in Java SE 1.4, which included making a Throwable's stack trace data part of its default serialized form. What the client-side Java RMI runtime implementation now does to cooperate with this feature is to append the client-side trace to the unmarshalled server-side trace, rather than simply overwriting with the client-side trace as it did in previous releases.

Certain server applications may wish to prevent any server-side stack trace data from accompanying an exception to be marshalled as the result of a remote call (as part of the exception's default serialized form in Java SE 1.4), perhaps for reasons of performance or confidentiality. In such cases, the implementation-specific system property

sun.rmi.server.suppressStackTraces
can be set to "true" to cause the server-side Java RMI runtime implementation to clear the stack traces of all exceptions thrown from the current virtual machine as the result of remote method invocations.
Service Provider Interface for RMIClassLoader (since Java SE 1.4)
Certain static methods of java.rmi.server.RMIClassLoader now delegate their behavior to an instance of a new service provider interface, java.rmi.server.RMIClassLoaderSpi. The service provider can be configured to augment the Java RMI dynamic class loading behavior for a given application. By default, the service provider implements the standard behavior of all of the static methods in RMIClassLoader. See the class documentation of RMIClassLoader and RMIClassLoaderSpi for more details.
Dynamic Server Host Name (since Java SE 1.4)
The java.rmi.server.hostname property can now be dynamically updated to indicate that future exports should use a new host name. Therefore, the new host name value will be contained in the stub for an object that is exported after the property is updated.
HTTP Fallback Is More Configurable (since Java SE 1.4.1)
The implementation-specific system property sun.rmi.transport.proxy.eagerHttpFallback has been added to allow additional control over when the Java RMI default socket factory will fall back to HTTP tunneling. This property configures the default socket factory so that any SocketException thrown by an initial (direct) connection attempt will trigger HTTP tunneling; this more "eager" fallback strategy can be useful when dealing with firewalls which deny instead of ignore connection attempts to unauthorized ports.
java.rmi.Naming.list Method No Longer Prepends a Scheme to Names Returned (since Java SE 1.4.1)
In previous releases, the Naming.list method prepended the scheme rmi: to each name contained in the returned array of strings. The Naming.list implementation now matches the specification, returning an array of names that are URL-formatted, but without the scheme component.
java.rmi.activation.ActivationGroupDesc (since Java SE 1.3)
The getClassName method, which returns the group's class name, can now return null, indicating the system's default group implementation. Previously, the getClassName method would return the name of the internal implementation class if the default group implementation was chosen when the descriptor was constructed.

Due to this change, if an application running in a Java SE 1.3 virtual machine registers an new activatable object with the ActivationSystem, rmid must also be upgraded to run Java SE 1.3, since a pre-1.3 rmid will not be able to activate the newly registered activatable object.

The Java RMI Stub Compiler, rmic (since Java SE 1.3)
By default, rmic [Solaris, Linux, or Mac OS X] [Windows] now assumes that the destination directory for generated stubs is the package-named subdirectory of the current working directory. If the "-d" option is not specified, the result is the same as though it were specified with the current working directory "." as an argument. The "-d" may still be used to override the default destination directory.

Two new options, "-idl" and "-iiop" have been added to generate IDL and stubs for IIOP, respectively.

The Java RMI Activation Daemon, rmid (since Java SE 1.3)
By default, rmid [Solaris, Linux, or Mac OS X] [Windows] now requires a security policy file.
Serializing remote objects (since Java SE 1.2.2)
Prior to Java SE 1.2.2, an attempt to pass an unexported remote object in a RMI call would result in a java.rmi.StubNotFoundException. This exception was a result of the RMI runtime's failure to locate a stub object during an attempt to replace a remote object implementation with its corresponding stub. In Java SE 1.2.2 and later releases, an unexported remote object passed in an RMI call will no longer result in an exception, but rather the remote object will be serialized instead of its stub. If the remote object implementation is not serializable, an attempt to pass an unexported object in an RMI call will result in a java.rmi.RemoteException with the nested exception java.io.NotSerializableException.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SE Remote Method Invocation APIs and Developer Guides

Documentation Contents

The Java Remote Method Invocation API
(Java RMI)

Overview

Java Remote Method Invocation (Java RMI) enables the programmer to create distributed Java technology-based to Java technology-based applications, in which the methods of remote Java objects can be invoked from other Java virtual machines, possibly on different hosts. RMI uses object serialization to marshal and unmarshal parameters and does not truncate types, supporting true object-oriented polymorphism.

API Specification

  • java.rmi Package
  • java.rmi.dgc Package
  • java.rmi.registry Package
  • java.rmi.server Package
  • java.rmi.activation Package

Architecture and Functional Specification

  • Java RMI Specification

Tutorials

  • Getting Started
    The Getting Started Tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using Java RMI. The Hello World applet makes a remote method call to the server from which it was downloaded to retrieve the message "Hello World!"
  • Using Custom Socket Factories with Java RMI
    The "Using Custom Socket Factories with Java RMI" tutorial shows you how to create a version of the distributed Hello World program in which the Java RMI runtime uses sockets of a type chosen by the programmer. This tutorial also includes a discussion of how Java RMI can be used over SSL sockets.
  • The Activation Tutorials
    The Activation Tutorials describe how to use the Java RMI APIs to implement, to register, and to use activatable objects. Each tutorial presents a different way to implement an activatable object. All tutorials use the same parameterized setup program that registers information about an activatable object with the Java RMI Activation System Daemon (rmid).

  • Configuring inetd to Launch rmid
    The Internet services daemon inetd, supported on the Solaris Operating System (Solaris OS), provides an alternative to starting up services at system boot time. This daemon, a server process for Internet standard services, can be configured to start services on demand.

  • Designing Services to be Launched from inetd
    This tutorial describes how to structure a service program (employing a specially exported local registry) so that the service can be started from inetd when clients connect to the service's local registry, and how to configure inetd to launch the service program.

  • Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase Property)
    One of the most significant capabilities of the Java platform is the ability to dynamically download Java software from any URL to a VM running in a separate process, usually on a different physical system. The result is that a remote system can run a program, for example an applet, which has never been installed on its disk. This tutorial describes the use of dynamic code downloading in a Java system, and how it can be used with Java RMI.
  • The Java RMI trail of The Java Tutorial
    This trail provides a brief overview of the Java RMI system and then walks through a complete client/server example that uses Java RMI's unique capabilities to load and to execute user-defined tasks at runtime. The server in the example implements a generic compute engine, which the client uses to compute the value of pi.

Enhancements

  • Java RMI Release Notes
    The release notes describe enhancements and changes to the Java RMI APIs and implementation, as well to the associated tools, rmic, rmiregistry, and rmid.

More Information

  • The Java RMI Home Page
  • Java RMI Tools (rmic, rmiregistry, rmid)
  • The Java RMI and Object Serialization FAQ
  • Useful java.rmi Properties
  • Useful sun.rmi Properties
  • Java RMI Implementation Logging
  • Applying the Factory Pattern to Java RMI
  • Using Java RMI with SSL

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


java.rmi Properties

Please Note: Unless otherwise stated, any output from these properties is sent to System.err.

Properties that are useful to set on virtual machines (VMs) that export remote objects

java.rmi.activation.port
This property is used to set the TCP port number on which this VM should communicate with rmid (by default, rmid listens on port 1098, but can be set to listen on a different port by using the -port option on the rmid command line). The default value of this property is 1098, so this property only needs to be set on VMs that need to communicate with an instance of rmid that is running on a port other than 1098.

java.rmi.dgc.leaseValue
The value of this property represents the lease duration (in milliseconds) granted to other VMs that hold remote references to objects which have been exported by this VM. Clients usually renew a lease when it is 50% expired, so a very short value will increase network traffic and risk late renewals in exchange for reduced latency in calls to Unreferenced.unreferenced. The default value of this property is 600000 milliseconds (10 minutes).
java.rmi.server.codebase
This property specifies the locations from which classes that are published by this VM (for example: stub classes, custom classes that implement the declared return type of a remote method call, or interfaces used by a proxy or stub class) may be downloaded. The value of this property is a string in URL format or a space-separated list of URLs that will be the codebase annotation for all classes loaded from the CLASSPATH of (and subsequently marshalled by) this VM.

Note: This property must be set correctly in order to dynamically download classes and interfaces using Java Remote Method Invocation (Java RMI). If this property is not set correctly, you will likely encounter exceptions when attempting to run your server or client. For more information on this property, see Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase Property).

java.rmi.server.hostname
The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. The default value of this property is the IP address of the local host, in "dotted-quad" format.
java.rmi.server.logCalls
If this value is true, incoming calls and exceptions thrown from incoming calls will be logged to System.err. Setting this property to true will greatly assist you in debugging your RMI programs. See also sun.rmi.server.exceptionTrace.
java.rmi.server.randomIDs
If this value is true, object identifiers for remote objects exported by this VM will be generated by using a cryptographically secure random number generator. The default value is false.
java.rmi.server.useCodebaseOnly
If this value is true, automatic loading of classes is prohibited except from the local CLASSPATH and from the java.rmi.server.codebase property set on this VM. Use of this property prevents client VMs from dynamically downloading bytecodes from other codebases.
java.rmi.server.useLocalHostname
Java RMI now uses an IP address to identify the local host when the java.rmi.server.hostname property is not specified and a fully qualified domain name for the localhost cannot be obtained. In order to force Java RMI to use the fully qualified domain name by default, you need to set the this property to true.

Properties that are useful to set on VMs that make remote method calls

java.rmi.server.codebase
This property specifies the locations from which classes that are published by this VM (for example, custom classes that implement an interface that is the declared parameter type of a remote method call) may be downloaded. The value of this property is a space-separated list of URLs that will be the codebase annotation for all classes loaded from the CLASSPATH of (and subsequently marshalled by) this VM.

Note: Classes that exist in both the server's codebase and the client's CLASSPATH will be loaded from the client's CLASSPATH, rather than from the server's codebase as intended. For more information on this property, see Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase Property).

java.rmi.server.disableHttp
If this value is true, HTTP tunneling is disabled, even when http.proxyHost is set. The default value is false. If you know that your program will never need to use HTTP tunneling, then by disabling HTTP tunneling, you should see shorter timeouts for failed connections.
java.rmi.server.useCodebaseOnly
If this value is true, automatic loading of classes is prohibited except from the local CLASSPATH and from the java.rmi.server.codebase property set on this VM. Use of this property prevents client VMs from dynamically downloading bytecodes from other codebases.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


sun.rmi Properties

WARNING: The properties described here are not supported, can change at any time, and only exist in certain implementations of the Java Remote Method Invocation (Java RMI). These properties are not part of the Java RMI public API. To see a list of the properties that are part of the public API, please refer to the page, java.rmi Properties.

Please Note: Unless otherwise stated, any output from these properties is sent to System.err.

Each of the properties that have names ending in ".logLevel" have possible values of "SILENT", "BRIEF", and "VERBOSE". These values are case insensitive and may be abbreviated as a string containing the first n letters, where n is greater than or equal to 1. If not specified, these properties have a default value of "SILENT". A value of "BRIEF" causes the corresponding Logger to be set to the level Level.FINE, and a value of "VERBOSE" causes the corresponding Logger to be set to the level Level.FINER. Use of the logging configuration file is now preferred over the use of these sun.rmi.* system properties for logging.

Logging messages are sent to System.err. For instance, if a property is said to send output to the "transport" log, this means that logging messages are sent to a LogStream returned by java.rmi.server.LogStream.log("transport"), which sends messages to System.err, unless you've set it to something else.

Properties that can be set on rmid

sun.rmi.activation.execPolicy
The value of this property controls the policy that rmid uses to determine whether or not the information in an ActivationGroupDesc may be used to launch a virtual machine for an activation group. The possible values for the property are default, none, or the fully qualified name of a class that implements a method named checkExecCommand that is called to verify ActivationGroupDesc information. For details, see the tools documentation for rmid [Solaris, Linux, or Mac OS X] [Windows].
sun.rmi.activation.execTimeout
The value of this property represents the time (in milliseconds) that the activation system will wait for a spawned activation group to start up. Setting this property gives you the ability to shorten or lengthen the maximum time that rmid will wait for an activation group to start up. The default value is 30000 milliseconds (30 seconds).
sun.rmi.activation.groupThrottle
The value of this property represents the maximum number of activation group VMs that rmid will allow to be in the "spawning but not yet active" state simultaneously. If more VMs need to be started, they will queue up until one of the current spawn attempts either succeeds or times out. Note that this property does not limit the maximum number of active VMs; it is intended to smooth out sudden spikes of activity to avoid reaching operating system limits. While setting the value of this property to a lower number may result in a longer start-up time for rmid, and setting the value to a higher number could shorten the start-up time, setting this value too high can crash rmid, because your system may run out of resources. The default value is 3. In previous releases, this property was named sun.rmi.rmid.maxstartgroup which is no longer supported.
sun.rmi.activation.groupTimeout
The value of this property represents the time (in milliseconds) that rmid will wait after destroying an activation group's process before creating a new incarnation of the activation group. The default value is 60000 milliseconds (60 seconds).
sun.rmi.activation.snapshotInterval
This property controls the number of updates for which the activation system will wait before it serializes a snapshot of its state to the rmid log file on disk. An "update" refers to a persistent change in the state of the activation system (for example, the registration of an Activatable object) since the last snapshot was taken. Changing the value of this property can be used to make rmid re-start more quickly (by taking snapshots of the log more often) or to make rmid more efficient (by taking snapshots of the log less often). The value of this property is a positive integer value. The default value is 200.
sun.rmi.log.debug
If this value is true, details of rmid's logging activity are sent to System.err.
sun.rmi.server.activation.debugExec
If this value is true, the activation system will print out debugging information to the command line that is used for spawning activation groups. By default, the value is false, so debugging information is not printed.

Properties that are useful to set on VMs that export remote objects

sun.rmi.dgc.ackTimeout
The value of this property represents the length of time (in milliseconds) that the server-side Java RMI runtime will strongly refer to a remote object (or a reference to a remote object) that has been returned from the current virtual machine as part of the result of a remote method call, until it receives positive acknowledgment from the client that the remote reference has been fully received and processed. This timeout only applies to failure situations (in which the client fails to send the acknowledgment). Setting the value too low can increase the risk of a remote object being prematurely garbage collected when the only known reference to the remote object is the one in transit as part of the remote method call result. The maximum value is Long.MAX_VALUE. The default value is 300000 (five minutes).
sun.rmi.dgc.checkInterval
The value of this property represents (in milliseconds) how often the Java RMI runtime checks for expired DGC leases. The default value is half the value of the java.rmi.dgc.leaseValue property.
sun.rmi.dgc.logLevel
This property controls the logging of incoming and outgoing calls related to DGC lease granting, renewing, and expiration. It sends output to the "dgc" log.
sun.rmi.dgc.server.gcInterval
When it is necessary to ensure that unreachable remote objects are unexported and garbage collected in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between garbage collections of the local heap. The default value is 3600000 milliseconds (one hour).
sun.rmi.loader.logLevel
This property controls the logging of each class name and codebase, whenever the Java RMI runtime attempts to load a class as a result of unmarshalling either an argument or return value. This property sends output to the "loader" log.

sun.rmi.server.exceptionTrace
This property controls the output of server-side stack traces from exceptions and errors that are thrown by dispatched, incoming remote calls. If this value is true, exception stack traces will be printed. By default (false), exception and error stack traces are not printed.

sun.rmi.server.suppressStackTraces
If this value is true, the server-side Java RMI runtime implementation will clear the stack traces of all exceptions thrown from the current virtual machine as the result of remote calls. This property is useful for certain server applications that may wish to prevent any server-side stack trace data from accompanying an exception to be marshalled out as the result of an incoming remote call, perhaps for reasons of performance or confidentiality.
sun.rmi.transport.logLevel
This property controls detailed logging throughout the transport layer. It sends output to the "transport" log.
sun.rmi.transport.tcp.localHostNameTimeOut
The value of this property represents the time (in milliseconds) that the Java RMI runtime will wait to obtain a fully qualified domain name for the local host. The default value is 10000 milliseconds (10 seconds).
sun.rmi.transport.tcp.logLevel
This property provides detailed logging for the TCP-specific transport sub-layer. It sends output to the "tcp" log.

sun.rmi.transport.tcp.readTimeout
The value of this property represents the time (in milliseconds) used as an idle timeout for incoming TCP connections the Java RMI runtime uses. The value is passed to java.net.Socket.setSoTimeout. This property is used only for cases where a client has not dropped an unused connection as it should (see sun.rmi.transport.connectionTimeout). The default value is 2*3600*1000 milliseconds (two hours).
sun.rmi.transport.tcp.maxConnectionThreads
The value of this property controls the maximum size of the pool of threads used to handle incoming connections, and thus it places an upper bound on the number of incoming remote method invocations that can execute concurrently. Setting this property to a lower value may improve the throughput of a Java RMI server application under heavy load, but setting it too low may (depending on the nature of the application's remote invocation patterns) lead to deadlock or starvation. The default value is the maximum, Integer.MAX_VALUE, which effectively means no limit.
sun.rmi.transport.tcp.threadKeepAliveTime
The value of this property controls the amount of time that a thread in the pool of threads used to handle incoming connections will remain idle before terminating. The default value is 60000 milliseconds (one minute).

Properties that are useful to set on VMs that make remote method calls

sun.rmi.client.logCalls
If the value of this property is true, the sun.rmi.client.call logger will be set to the level Level.FINER. Remote calls are logged at the level Level.FINER, and exceptions from remote calls are logged at the level Level.FINE.
sun.rmi.dgc.cleanInterval
The value of this property represents the maximum length of time (in milliseconds) that the Java RMI runtime will wait before retrying a failed DGC "clean" call. The default value is 180000 milliseconds (three minutes).
sun.rmi.dgc.client.gcInterval
When it is necessary to ensure that DGC clean calls for unreachable remote references are delivered in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between garbage collections of the local heap. The default value is 3600000 milliseconds (one hour).
sun.rmi.loader.logLevel
This property controls the logging of each class name and codebase, whenever the Java RMI runtime attempts to load a class as a result of unmarshalling either an argument or return value. This property sends output to the "loader" log.
sun.rmi.server.logLevel
This property controls the logging of information related to outgoing calls, including some connection-reuse information. It sends output to the "transport" log.

sun.rmi.transport.connectionTimeout
The value of this property represents the period (in milliseconds) for which socket connections may reside in an "unused" state, before the Java RMI runtime will allow those connections to be freed (closed). The default value is 15000 milliseconds (15 seconds). See also sun.rmi.transport.tcp.readTimeout.
sun.rmi.transport.logLevel
This property controls detailed logging throughout the transport layer. It sends output to the "transport" log.
sun.rmi.transport.proxy.connectTimeout
The value of this property represents the maximum length of time (in milliseconds) that the Java RMI runtime will wait for a connection attempt (createSocket) to complete, before attempting to contact the server using HTTP. This property is only used when the http.proxyHost property is set and the value of java.rmi.server.disableHttp is false. The default value is 15000 milliseconds (15 seconds).

sun.rmi.transport.proxy.eagerHttpFallback
If this value is true and the java.rmi.server.disableHttp system property is not set, then the default global RMISocketFactory will fall back to HTTP tunneling when any java.net.SocketException is thrown from an initial (direct) connection attempt, as opposed to the default behavior of falling back to HTTP tunneling only if an initial connection attempt throws a java.net.UnknownHostException or java.net.NoRouteToHostException.

This setting can be useful when dealing with firewalls that deny (instead of ignore) connection attempts to unauthorized ports, resulting in java.net.ConnectionExceptions inside the client's default global RMISocketFactory. If this system property is not enabled, then such ConnectionExceptions will not trigger HTTP fallback, since they are neither UnknownHostExceptions nor NoRouteToHostExceptions. However, if this system property is enabled, then the ConnectionExceptions will cause HTTP fallback to occur, because ConnectionException is a subclass of SocketException.

sun.rmi.transport.proxy.logLevel
This property controls the logging of events (createSocket and createServerSocket) when the default RMISocketFactory class is used. This type of logging is likely to be useful for applications that use Java RMI over HTTP. Events in custom socket factories are not logged by this property. It sends some messages to the "proxy" log, and others to the "transport" log.
sun.rmi.transport.tcp.handshakeTimeout
The value of this property represents the length of time (in milliseconds) that the client-side Java RMI runtime will use as a socket read timeout when reading initial handshake data (protocol acknowledgment) when establishing a new JRMP connection. This property is used to configure how long the Java RMI runtime will wait before deciding that a TCP connection accepted by a remote server cannot actually be used, either because the entity listening on the remote host's port is not actually a Java RMI server, or because the server is somehow not functioning correctly. The maximum value is Integer.MAX_VALUE, and a value of zero indicates an infinite timeout. The default value is 60000 (one minute).
sun.rmi.transport.tcp.responseTimeout
The value of this property represents the length of time (in milliseconds) that the client-side Java RMI runtime will use as a socket read timeout on an established JRMP connection when reading response data for a remote method invocation. Therefore, this property can be used to impose a timeout on waiting for the results of remote invocations; if this timeout expires, the associated invocation will fail with a java.rmi.RemoteException. Setting this property should be done with due consideration, however, because it effectively places an upper bound on the allowed duration of any successful outgoing remote invocation. The maximum value is Integer.MAX_VALUE, and a value of zero indicates an infinite timeout. The default value is zero (no timeout).
sun.rmi.transport.tcp.logLevel
This property provides detailed logging for the TCP-specific transport sub-layer. It sends output to the "tcp" log.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Extending Activatable

Documentation Contents

Using Activation: Extending Activatable

This tutorial describes how to implement an activatable remote object by extending the class java.rmi.activation.Activatable. This tutorial uses a Setup program (described in the tutorial Using Activation: the Setup Program) that registers information about an activatable remote object with the Java Remote Method Invocation (Java RMI) activation system daemon (rmid) and then binds a stub for that remote object in an rmiregistry so that clients can look it up. You may want to read that tutorial before this one.

This tutorial has the following steps:

  • Implement the activatable remote object
  • Implement the client
  • Compile the source files
  • Run the Setup program
  • Run the client

The files needed for this tutorial are:

  • MyRemoteInterface.java - a simple remote interface
  • ExtendsActivatable.java - an "activatable" implementation of the remote interface
  • Client.java - a client that uses the remote interface
  • client.policy - the security policy file for the client

Implement the activatable remote object

There are a few basic ways to implement an activatable remote object. This tutorial describes how to implement an activatable remote object by extending the class java.rmi.activation.Activatable which exports an activatable remote object during construction.

A remote object is activated when a client invokes a remote method on a stub for an activatable remote object. A stub for an activatable remote object contains the remote object's activation ID and information on how to contact the Java RMI activation system daemon (rmid) for the remote object. If the stub cannot connect to the last-known address (i.e., host/port) for the remote object, the stub will contact the remote object's activator (rmid) to activate the object. When rmid receives an activation request, it starts the remote object's activation group (or container) VM if the group is not already executing, and then rmid asks the group to make an instance of the remote object. Once the group constructs the remote object, it returns the remote object's stub to rmid which, in turn, returns the actual stub to the initiating stub so that the initiating stub can update its information on how to contact the remote object in the future.

Before any of this activation can take place, an application must register information about the activatable remote objects it needs to use. The following separate tutorial describes the information needed to activatate a remote object and how to register this information with rmid:

  • Using Activation: the Setup program

In this example, the activatable remote object implements the following remote interface examples.activation.MyRemoteInterface:

package examples.activation;

import java.rmi.*;

public interface MyRemoteInterface extends Remote {
    Object remoteMethod(Object obj) throws RemoteException;
}

The implementation class, examples.activation.ExtendsActivatable, for the activatable remote object is as follows:

package examples.activation;

import java.rmi.*;
import java.rmi.activation.*;

public class ExtendsActivatable
        extends Activatable
        implements MyRemoteInterface
{

    public ExtendsActivatable(ActivationID id, MarshalledObject data)
        throws RemoteException
    {
        super(id, 0);
    }

    public Object remoteMethod(Object obj) {
        return obj;
    }
}

The class ExtendsActivatable extends the class Activatable and implements the remote interface MyRemoteInterface.

The class ExtendsActivatable declares a special "activation" constructor that an activation group calls to construct an instance during the activation process. This special constructor takes two parameters:

  • The first parameter, ActivationID, is an identifier for the activatable remote object. When an application registers an activation descriptor with rmid, rmid assigns it an activation ID, which refers to the information associated with the descriptor. This same activation ID (also contained in the remote object's stub) is passed to this constructor when the remote object is activated.
  • The second parameter is a MarshalledObject that contains initialization data pre-registered with rmid. This initialization data may be a filename for the object's persistent state, for example. This example does not require any initialization data to construct the remote object.

The constructor simply calls a constructor in the superclass (Activatable) to export the object on an anoymous port.

Finally, the class implements the remote interface's single method, remoteMethod to return the object passed as an argument.

Implement the client

The Client program looks up a remote object's stub (one that implements the remote interface MyRemoteInterface) in the registry on the host supplied as the optional first argument, and then invokes the stub's remoteMethod method. When this client invokes a remote method on the stub acquired from the registry, the remote object will activate if not already active.

The source for the program is as follows:

package examples.activation;

import java.rmi.*;
import java.rmi.registry.*;

public class Client {

    public static void main(String args[])  throws Exception {

        String hostname = "localhost";
        if (args.length < 1) {
            System.err.println(
                "usage: java [options] examples.activation.Client <hostname>");
            System.exit(1);
        } else {
            hostname = args[0];
        }

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }

        String name = System.getProperty("examples.activation.name");
        Registry registry = LocateRegistry.getRegistry(hostname);
        MyRemoteInterface stub =
            (MyRemoteInterface) registry.lookup(name);
        System.err.println("Obtained stub from the registry.");

        System.err.println("Invoking remote method...");
        String result = (String) stub.remoteMethod("hello there!");
        System.err.println("Returned from remote call.");
        System.err.println("Result: " + result);
    }
}

This program should be run as follows:

java -cp clientDir                               \
     -Djava.security.policy=client.policy        \
     -Dexamples.activation.client.codebase=clientCodebase   \
     -Dexamples.activation.name=name             \
     examples.activation.Client [host]

where:

  • clientDir is the root directory for the client program (its class path),
  • client.policy is the security policy file for this program,
  • clientCodebase is the location (URL) for this program's class (used in granting permissions to this program in the client.policy file)
  • name is the name for the object's stub in the registry
  • host is the server's host

Note: rmid must be running on its default port, and rmiregistry must be running on its default port (both on the remote host) prior to running this program.

The following is an example client.policy file that grants the appropriate permissions for the activation examples:

grant codeBase "${examples.activation.client.codebase}" {

    // permissions to read system properties required by the client
    permission java.util.PropertyPermission "examples.activation.name","read";

    // permission to connect to the registry, activation system, and remote host
    permission java.net.SocketPermission "*:1024-","connect";
};

The codebase to which permissions are granted is a file URL specifying the location of the client's classes. This file URL is the value of the examples.activation.client.codebase system property, defined when the client program is run. The client needs two permissions:

  • java.util.PropertyPermission - to read the system property examples.activation.name that specifies the name for the stub in the registry
  • java.net.SocketPermission - to connect to the registry, activation system, and remote object's host

Compile the source files

The source files for this example can be compiled as follows:

javac -d implDir MyRemoteInterface.java ExtendsActivatable.java
javac -d clientDir MyRemoteInterface.java Client.java

where implDir is the destination directory to put the implementation's class files the class files in, and clientDir is the destination directory to put the client's class files in.

Run the Setup program

Once your implementation phase is complete, you need to register information about the activatable object so a client can use it. The Setup program, described by the tutorial Using Activation: the Setup Program, registers an activation descriptor for an activatable object with rmid, and then binds the remote object's stub in an rmiregistry so that clients can look it up.

To run the Setup program for this example, see the section Start rmid, rmiregistry, and the Setup program in the setup program tutorial, which describes how to start rmid, rmiregistry, and the Setup program itself.

After you run rmid and rmiregistry as instructed in the Setup tutorial, you will need to run the Setup program to register an activation descriptor for an activatable object that implements the class examples.activation.ExtendsActivatable. The following command line runs the Setup program, supplying an appropriate file URL for each codebase used:

java -cp setupDir:implDir                       \
     -Djava.security.policy=setup.policy                      \
     -Djava.rmi.server.codebase=file:/implDir/                \
     -Dexamples.activation.setup.codebase=file:/setupDir/     \
     -Dexamples.activation.impl.codebase=file:/impDir/        \
     -Dexamples.activation.name=examples.activation.MyRemoteInterface       \
     -Dexamples.activation.policy=group.policy                \
     examples.activation.Setup examples.activation.ExtendsActivatable

where:

  • setupDir is the root directory for the Setup program's class
  • implDir is the root directory for the implementation's classes
  • setup.policy is the security policy file for the Setup program
  • group.policy is the security policy file for the activation group

Note that the examples.activation.file system property does not need to be specified, because the ExtendsActivatable implementation class does not use it. Also note that each file URL above has the required trailing slash. Examples of group and setup policy files, suitable for this tutorial, are described in the setup tutorial, and are also listed below:

  • setup.policy
  • group.policy

The output from the Setup program should look like this:

Activation group descriptor registered.
Activation descriptor registered.
Stub bound in registry.

Run the client

Once you have successfully registered an activation descriptor for an ExtendsActivatable implementation, you can run the client program, which, during its first execution, will cause the activatable object to activate.

The following command line illustrates how to run the client program, specifying a file URL for the client codebase:

java -cp clientDir                                              \
     -Djava.security.policy=client.policy                       \
     -Dexamples.activation.client.codebase=file:/clientDir/     \
     -Dexamples.activation.name=examples.activation.MyRemoteInterface         \
     examples.activation.Client [host]

where:

  • clientDir is the root directory for the client program (its class path),
  • client.policy is the security policy file for this program,
  • name is the name for the object's stub in the registry
  • host is the server's host

Notes:

  • The client codebase must have a trailing slash.
  • The name must match the name supplied to the Setup program. In this example, we used the name examples.activation.MyRemoteInterface.
  • rmid and rmiregistry must be running on the server's host. If the server's host is not the local host, the host argument must specify the remote host that they are running on.

The output from the client should look like this:

Obtained stub from the registry.
Invoking remote method...
Returned from remote call.
Result: hello there!
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Not Extending Activatable

Documentation Contents

Using Activation: Not Extending Activatable

This tutorial describes how to implement an activatable remote object, but differs from the tutorial Using Activation: Extending Activatable in that the implementation for the remote object does not extend the class java.rmi.activation.Activatable. Instead, the implementation uses a static method of the class Activatable to export an activatable remote object. This tutorial uses a Setup program (described in the tutorial Using Activation: the Setup Program) that registers information about an activatable remote object with the Java Remote Method Invocation (Java RMI) activation system daemon (rmid) and then binds a stub for that remote object in an rmiregistry so that clients can look it up. You may want to read that tutorial before this one.

This tutorial has the following steps:

  • Implement the activatable remote object
  • Implement the client
  • Compile the source files
  • Run the Setup program
  • Run the client

The files needed for this tutorial are:

  • MyRemoteInterface.java - a simple remote interface
  • DoesNotExtendActivatable.java - an "activatable" implementation of the remote interface
  • Client.java - a client that uses the remote interface
  • client.policy - the security policy file for the client

Implement the activatable remote object

There are a few basic ways to implement an activatable remote object. This tutorial describes how to implement an activatable remote object by using a static method of the class java.rmi.activation.Activatable to export an activatable remote object.

A remote object is activated when a client invokes a remote method on a stub for an activatable remote object. A stub for an activatable remote object contains the remote object's activation ID and information on how to contact the Java RMI activation system daemon (rmid) for the remote object. If the stub cannot connect to the last-known address (i.e., host/port) for the remote object, the stub will contact the remote object's activator (rmid) to activate the object. When rmid receives an activation request, it starts the remote object's activation group (or container) VM if the group is not already executing, and then rmid asks the group to make an instance of the remote object. Once the group constructs the remote object, it returns the remote object's stub to rmid which, in turn, returns the actual stub to the initiating stub so that the initiating stub can update its information on how to contact the remote object in the future.

Before any of this activation can take place, an application must register information about the activatable remote objects it needs to use. The following separate tutorial describes the information needed to activatate a remote object and how to register this information with rmid:

  • Using Activation: the Setup program

In this example, the activatable remote object implements the following remote interface examples.activation.MyRemoteInterface:

package examples.activation;

import java.rmi.*;

public interface MyRemoteInterface extends Remote {
    Object remoteMethod(Object obj) throws RemoteException;
}

The implementation class, examples.activation.DoesNotExtendActivatable, for the activatable remote object is as follows:

package examples.activation;

import java.rmi.*;
import java.rmi.activation.*;

public class DoesNotExtendActivatable implements MyRemoteInterface {

    private final ActivationID id;

    public DoesNotExtendActivatable(ActivationID id, MarshalledObject data)
        throws RemoteException
    {
        this.id = id;
        Activatable.exportObject(this, id, 0);
    }

    public Object remoteMethod(Object obj) {
        return obj;
    }
}

The class DoesNotExtendActivatable implements the remote interface MyRemoteInterface, but does not extend any class.

The class DoesNotExtendActivatable declares a special "activation" constructor that an activation group calls to construct an instance during the activation process. This special constructor takes two parameters:

  • The first parameter, ActivationID, is an identifier for the activatable remote object. When an application registers an activation descriptor with rmid, rmid assigns it an activation ID, which refers to the information associated with the descriptor. This same activation ID (also contained in the remote object's stub) is passed to this constructor when the remote object is activated.
  • The second parameter is a MarshalledObject that contains initialization data pre-registered with rmid. This initialization data may be a filename for the object's persistent state, for example. This example does not require any initialization data to construct the remote object.

The constructor saves the activation ID in a private field, and then calls the static method Activatable.exportObject, passing the implementation itself (this), the activation ID, and the port number 0, indicating that the object should be exported on an anonymous TCP port. While this implementation does not actually use the activation ID it stores, this example saves the activation ID to demonstrate what a typical implementation of an activatable object might do. Such an implementation may need the activation ID in the future, in order to deactivate the object, for example.

Finally, the class implements the remote interface's single method, remoteMethod to return the object passed as an argument.

Implement the client

The Client program looks up a remote object's stub (one that implements the remote interface MyRemoteInterface) in the registry on the host supplied as the optional first argument, and then invokes the stub's remoteMethod method. The client program is the same as the one described in the tutorial Using Activation: Extending Activatable. For details, see the following section of that tutorial

  • Implement the client

Compile the source files

The source files for this example can be compiled as follows:

javac -d implDir MyRemoteInterface.java DoesNotExtendActivatable.java
javac -d clientDir MyRemoteInterface.java Client.java

where implDir is the destination directory to put the implementation's class files the class files in, and clientDir is the destination directory to put the client's class files in.

Run the Setup program

Once your implementation phase is complete, you need to register information about the activatable object so a client can use it. The Setup program, described by the tutorial Using Activation: the Setup Program, registers an activation descriptor for an activatable object with rmid, and then binds the remote object's stub in an rmiregistry so that clients can look it up.

To run the Setup program for this example, see the section Start rmid, rmiregistry, and the Setup program in the setup program tutorial, which describes how to start rmid, rmiregistry, and the Setup program itself.

After you run rmid and rmiregistry as instructed in the Setup tutorial, you will need to run the Setup program to register an activation descriptor for an activatable object that implements the class examples.activation.DoesNotExtendActivatable. The following command line runs the Setup program, supplying an appropriate file URL for each codebase used:

java -cp setupDir:implDir                       \
     -Djava.security.policy=setup.policy                      \
     -Djava.rmi.server.codebase=file:/implDir/                \
     -Dexamples.activation.setup.codebase=file:/setupDir/     \
     -Dexamples.activation.impl.codebase=file:/impDir/        \
     -Dexamples.activation.name=examples.activation.MyRemoteInterface       \
     -Dexamples.activation.policy=group.policy                \
     examples.activation.Setup examples.activation.DoesNotExtendActivatable

where:

  • setupDir is the root directory for the Setup program's class
  • implDir is the root directory for the implementation's classes
  • setup.policy is the security policy file for the Setup program
  • group.policy is the security policy file for the activation group

Note that the examples.activation.file system property does not need to be specified, because the DoesNotExtendActivatable implementation class does not use it. Also note that each file URL above has the required trailing slash. Examples of group and setup policy files, suitable for this tutorial, are described in the setup tutorial, and are also listed below:

  • setup.policy
  • group.policy

The output from the Setup program should look like this:

Activation group descriptor registered.
Activation descriptor registered.
Stub bound in registry.

Run the client

Once you have successfully registered an activation descriptor for a DoesNotExtendActivatable implementation, you can run the client program, which, during its first execution, will cause the activatable object to activate.

The client program is the same as the one described in the tutorial Using Activation: Extending Activatable. For details, see the following section of that tutorial:

  • Run the client
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview

Documentation Contents

Using Activation: Overview

This set of tutorials describes how to use the Java Remote Method Invocation (Java RMI) APIs to implement, to register, and to use activatable objects. Each tutorial presents a different way to implement an activatable object. All tutorials use the same parameterized setup program that registers information about an activatable object with the Java RMI Activation System Daemon (rmid).

The tutorials are as follows:

  • The Setup program

    A parameterized program for registering an activation descriptor for an activatable object with rmid, and binding a stub for that activatable object in a registry so that clients can look it up.

  • Extending Activatable

    An implementation that extends the class java.rmi.activation.Activatable, a class whose constructors export a remote object during construction.

  • Not Extending Activatable

    An implementation that does not extend the class Activatable, but instead uses its static methods to export a remote object.

  • Using Persistence

    An implementation that, during construction, uses a MarshalledObject in an object's activation descriptor to specify a file that contains the object's persistent state.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Persistence

Documentation Contents

Using Activation: Persistence

This tutorial describes how to implement an activatable remote object that uses persistent state in its implementation. This tutorial uses a Setup program (described in the tutorial Using Activation: the Setup Program) that registers information about an activatable remote object with the Java Remote Method Invocation (Java RMI) activation system daemon (rmid) and then binds a stub for that remote object in an rmiregistry so that clients can look it up. You may want to read that tutorial before this one.

This tutorial has the following steps:

  • Implement the activatable remote object
  • Implement the client
  • Compile the source files
  • Run the Setup program
  • Run the client

The files needed for this tutorial are:

  • Counter.java - a remote interface for counting
  • CounterImpl.java - an "activatable" implementation of the remote interface
  • CounterClient.java - a client that uses the remote interface
  • client.policy - the security policy file for the client

Implement the activatable remote object

There are a few basic ways to implement an activatable remote object. This tutorial describes how to implement an activatable remote object that uses persistent state in its implementation.

A remote object is activated when a client invokes a remote method on a stub for an activatable remote object. A stub for an activatable remote object contains the remote object's activation ID and information on how to contact the Java RMI activation system daemon (rmid) for the remote object. If the stub cannot connect to the last-known address (i.e., host/port) for the remote object, the stub will contact the remote object's activator (rmid) to activate the object. When rmid receives an activation request, it starts the remote object's activation group (or container) virtual machine (VM) if the group is not already executing, and then rmid asks the group to make an instance of the remote object. Once the group constructs the remote object, it returns the remote object's stub to rmid which, in turn, returns the actual stub to the initiating stub so that the initiating stub can update its information on how to contact the remote object in the future.

Before any of this activation can take place, an application must register information about the activatable remote objects it needs to use. The following separate tutorial describes the information needed to activatate a remote object and how to register this information with rmid:

  • Using Activation: the Setup program

This example defines the remote interface Counter with a single operation, increment. The implementation class CounterImpl persistently stores the result of the operation increment in a file, so that the result of the increment operation will survive across an object activation/deactivation cycle or even survive a machine reboot or crash. To make all this work, a CounterImpl object, when activated, needs the name of the file it will use to read and store counter values. A user can register an activation descriptor that contains this file name (in a MarshalledObject) as the "initialization data". The object's activation group will pass this pre-registered marshalled data (the file name) to the object's constructor when the group constructs the object during activation.

The remote interface examples.activation.Counter is defined as follows:

package examples.activation;

import java.rmi.Remote;
import java.io.IOException;

public interface Counter extends Remote {

    int increment() throws IOException;
}

The implementation class, examples.activation.CounterImpl, for the activatable remote object is as follows:

package examples.activation;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.rmi.MarshalledObject;
import java.rmi.activation.Activatable;
import java.rmi.activation.ActivationID;

public class CounterImpl implements Counter {
    private RandomAccessFile raf;
    private int count;
    private final Object countLock = new Object();

    public CounterImpl(ActivationID id, MarshalledObject data)
        throws Exception
    {
        if (data != null) {
            String filename = (String) data.get();
            synchronized (countLock) {
                count = openFile(filename);
            }
            System.err.println("count upon activation = " + count);
        }

        Activatable.exportObject(this, id, 0);
    }

    private int openFile(String filename) throws IOException {

        if (filename != null && !filename.equals("")) {
            File file = new File(filename);
            boolean fileExists = file.exists();
            raf = new RandomAccessFile(file, "rws");
            return (fileExists) ? raf.readInt() : writeCount(0);

        } else {
            throw new IOException("invalid filename");
        }
    }

    private int writeCount(int value) throws IOException {
        raf.setLength(0);
        raf.writeInt(value);
        return value;
    }

    public int increment() throws IOException {
        synchronized (countLock) {
            return writeCount(++count);
        }
    }
}

The class CounterImpl implements the remote interface Counter, but does not extend any class.

The class declares a special "activation" constructor that an activation group calls to construct an instance during the activation process. This special constructor takes two parameters:

  • The first parameter, ActivationID, is an identifier for the activatable remote object. When an application registers an activation descriptor with rmid, rmid assigns it an activation ID, which refers to the information associated with the descriptor. This same activation ID (also contained in the remote object's stub) is passed to this constructor when the remote object is activated.
  • The second parameter is a MarshalledObject that contains initialization data pre-registered with rmid. In this example, the marshalled data is the name of a file containing the object's persistent state which is the latest counter value.

The constructor obtains the file name contained in the MarshalledObject which was passed as the second parameter. Next, the constructor calls the local method openFile to open the file and return the current counter value. If the file exists, the openFile method reads the value last saved to the file; otherwise, it creates a new file and initializes the count to zero. The constructor then calls the static method Activatable.exportObject, passing the implementation itself (this), the activation ID, and the port number 0, indicating that the object should be exported on an anonymous TCP port. While this implementation does not use the activation ID passed as a parameter to the constructor, another implementation may wish to save the activation ID for future use, in order to deactivate the object, for example.

Finally, the class implements the remote interface's single method, increment to increment the count, save the count to the file, and return the incremented count. Note that there is a flaw in the implementation of the writeCount method. If the machine crashes between the calls to setLength and writeInt, the value of the counter will be lost. Making this implementation more robust to a crash within that small window is an exercise left to the reader.

Implement the client

The CounterClient program looks up a remote object's stub (one that implements the remote interface Counter) in the registry on the host supplied as the optional first argument, and then invokes the stub's increment method and displays the result. When this client invokes a remote method on the stub acquired from the registry, the remote object will activate if not already active.

The source for the program is as follows:

package examples.activation;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class CounterClient {

    public static void main(String args[])  throws Exception {

        String hostname = "localhost";
        if (args.length < 1) {
            System.err.println(
                "usage: java [options] examples.activation.CounterClient [host]");
            System.exit(1);
        } else {
            hostname = args[0];
        }

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }

        String name = System.getProperty("examples.activation.name");
        Registry registry = LocateRegistry.getRegistry(hostname);
        Counter stub = (Counter) registry.lookup(name);
        System.err.println("Obtained stub from the registry.");

        System.err.println("Invoking increment method...");
        int count = stub.increment();
        System.err.println("Returned from increment remote call.");
        System.err.println("count = " + count);
    }
}

This program should be run as follows:

java -cp clientDir                               \
     -Djava.security.policy=client.policy        \
     -Dexamples.activation.client.codebase=clientCodebase   \
     -Dexamples.activation.name=name             \
     examples.activation.CounterClient [host]

where:

  • clientDir is the root directory for the client program (its class path),
  • client.policy is the security policy file for this program,
  • clientCodebase is the location (URL) for this program's class (used in granting permissions to this program in the client.policy file)
  • name is the name for the object's stub in the registry
  • host is the server's host

Note: rmid must be running on its default port, and rmiregistry must be running on its default port (both on the remote host) prior to running this program.

The following is an example client.policy file that grants the appropriate permissions for the activation examples:

grant codeBase "${examples.activation.client.codebase}" {

    // permissions to read system properties required by the client
    permission java.util.PropertyPermission "examples.activation.name","read";

    // permission to connect to the registry, activation system, and remote host
    permission java.net.SocketPermission "*:1024-","connect";
};

The codebase to which permissions are granted is a file URL specifying the location of the client's classes. This file URL is the value of the examples.activation.client.codebase system property, defined when the client program is run. The client needs two permissions:

  • java.util.PropertyPermission - to read the system property examples.activation.name that specifies the name for the stub in the registry
  • java.net.SocketPermission - to connect to the registry, activation system, and remote object's host

Compile the source files

The source files for this example can be compiled as follows:

javac -d implDir Counter.java CounterImpl.java
javac -d clientDir Counter.java CounterClient.java

where implDir is the destination directory to put the implementation's class files in, and clientDir is the destination directory to put the client's class files in.

Run the Setup program

Once your implementation phase is complete, you need to register information about the activatable object so a client can use it. The Setup program, described by the tutorial Using Activation: the Setup Program, registers an activation descriptor for an activatable object with rmid, and then binds the remote object's stub in an rmiregistry so that clients can look it up.

To run the Setup program for this example, see the section Start rmid, rmiregistry, and the Setup program in the Setup program tutorial, which describes how to start rmid, rmiregistry, and the Setup program itself.

After you run rmid and rmiregistry as instructed in the Setup tutorial, you will need to run the Setup program to register an activation descriptor for an activatable object that implements the class examples.activation.CounterImpl. The following command line runs the Setup program, supplying an appropriate file URL for each codebase used:

java -cp setupDir:implDir                       \
     -Djava.security.policy=setup.policy                      \
     -Djava.rmi.server.codebase=file:/implDir/                \
     -Dexamples.activation.setup.codebase=file:/setupDir/     \
     -Dexamples.activation.impl.codebase=file:/impDir/        \
     -Dexamples.activation.name=examples.activation.Counter                 \
     -Dexamples.activation.policy=group.policy                \
     -Dexamples.activation.file=file                          \
         examples.activation.Setup examples.activation.CounterImpl

where:

  • setupDir is the root directory for the Setup program's class
  • implDir is the root directory for the implementation's classes
  • setup.policy is the security policy file for the Setup program
  • group.policy is the security policy file for the activation group
  • file is the name of a file containing the object's persistent state which is registered as the data in the object's activation descriptor

Note that each file URL above has the required trailing slash. Examples of group and setup policy files, suitable for this tutorial, are described in the Setup tutorial, and are listed below:

  • setup.policy
  • group.policy

The output from the Setup program should look like this:

Activation group descriptor registered.
Activation descriptor registered.
Stub bound in registry.

Run the client

Once you have successfully registered an activation descriptor for a CounterImpl implementation, you can run the client program, which, during its first execution, will cause the activatable object to activate.

The following command line illustrates how to run the client program, specifying a file URL for the client codebase:

java -cp clientDir                                              \
     -Djava.security.policy=client.policy                       \
     -Dexamples.activation.client.codebase=file:/clientDir/     \
     -Dexamples.activation.name=examples.activation.Counter                   \
     examples.activation.CounterClient [host]

where:

  • clientDir is the root directory for the client program (its class path).
  • client.policy is the security policy file for this program.
  • name is the name for the object's stub in the registry.
  • host is the server's host.

Notes:

  • The client codebase must have a trailing slash.
  • The name must match the name supplied to the Setup program. In this example, we used the name examples.activation.Counter.
  • rmid and rmiregistry must be running on the server's host. If the server's host is not the local host, the host argument must specify the remote host that they are running on.

The output from the client should look like this:

Obtained stub from the registry.
Invoking increment method...
Returned from increment remote call.
count = 1
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


the Setup Program

Documentation Contents

Using Activation: the Setup Program

This tutorial describes how to write a program that registers an activation descriptor for a remote object with the Java Remote Method Invocation (Java RMI) activation system daemon (rmid) and then binds a stub for that remote object in an rmiregistry so that clients can look it up.

This tutorial has the following steps:

  • Implement the Setup program
  • Compile the source file
  • Start rmid, rmiregistry, and the Setup program
The files needed for this tutorial are:
  • Setup.java - main Setup program
  • setup.policy - security policy file for the Setup program
  • rmid.policy - security policy file for rmid
  • group.policy - security policy file for the activation group

Implement the Setup program

The Setup program, implemented by the class examples.activation.Setup, registers an activation descriptor with rmid to enable future activation of the object specified by that activation descriptor. This program does not create an instance of a remote object, but instead registers a remote object's stub with an rmiregistry so that clients can look it up. This Setup program must be run prior to running any of the clients described in the other activation tutorials.

The Setup program uses a number of system properties to customize the information that is registered with rmid and rmiregistry. The program also takes a single command-line argument that specifies the package-qualified name of the implementation class for the activatable remote object being registered. The Setup program is run as follows:

java -cp classpath \
     -Djava.security.policy=setup.policy        \
     -Djava.rmi.server.codebase=codebase         \
     -Dexamples.activation.setup.codebase=setupCodebase  \
     -Dexamples.activation.impl.codebase=implCodebase \
     -Dexamples.activation.name=name             \
     [-Dexamples.activation.file=filename]       \
     [-Dexamples.activation.policy=group.policy] \
     examples.activation.Setup implClass

where:

  • classpath is a class path that includes the Setup program and the implementation classes
  • setup.policy is the security policy file for the Setup program
  • codebase is the location (URL) of the remote interface class(es)
  • setupCodebase is the location (URL) the Setup program class (used in granting permissions to the Setup program in the setup.policy file)
  • implCodebase is the location (URL) of the implementation class(es), used in the activation descriptor and also used in the group policy file as the codebase to grant permissions to
  • name is the name for the object's stub to be bound in the registry
  • file (optional) is the name of a file containing the object's persistent state which is registered as the data in the object's activation descriptor (no default)
  • group.policy (optional) is the security policy file for the activation group (defaults to group.policy), and
  • implClass is the fully-qualified name of the
  • implementation class.

The following is an example policy file for the Setup program:

  grant codeBase "${examples.activation.setup.codebase}" {

    // permissions to read system properties required by setup program
    permission java.util.PropertyPermission "examples.activation.impl.codebase","read";
    permission java.util.PropertyPermission "examples.activation.policy","read";
    permission java.util.PropertyPermission "examples.activation.file","read";
    permission java.util.PropertyPermission "examples.activation.name","read";

    // permission to connect to the activation system and the registry
    permission java.net.SocketPermission "*:1098-1099","connect";
};

The codebase to which permissions are granted is a URL specifying the location of the Setup program's implementation class(es). This URL is the value of the examples.activation.setup.codebase system property, which is defined when the Setup program is run. The Setup program needs the following permissions:

  • java.util.PropertyPermission - to read various system properties required by the Setup program
  • java.net.SocketPermission - to connect to the activation system (port 1098) to register an activation descriptor, and to connect to the registry (port 1099) to bind the activatable object's stub to a name

There are several steps to writing this Setup program:

  • Construct an activation group descriptor
  • Register the group descriptor
  • Construct an activation descriptor
  • Register the activation descriptor, and finally,
  • Bind the remote object's stub in an rmiregistry

The Setup class has a static main method that performs all of the above steps. But before doing so, the main method sets a SecurityManager and obtains the single command line argument that specifies the package-qualified name of the implementation class for the activatable remote object. The rest of the steps are described below. See Setup.java for the full source code.

Construct an activation group descriptor

Before an application registers information about a particular activatable remote object, it first needs to register information about the activation group that the object will be contained in. An activation group is a container virtual machine (VM) for a set of activatable objects. Each activation group manages the execution of one or more activatable objects. An activation group descriptor contains information that the activation system needs to start an activation group's VM. An application can register an activation group descriptor with the activation system rmid to obtain an activation group ID to use for the activatable object, or the application can use an activation group ID obtained from a previous group registration.

The activation group descriptor, an instance of the class java.rmi.activation.ActivationGroupDesc, can be constructed in several ways. This tutorial uses the two parameter constructor ActivationGroupDesc(Properties,CommandEnvironment). The Properties map contains overrides for system properties in the activation group VM. For this tutorial, an activation group VM needs the following system properties defined:

  • java.security.policy - the group's security policy file
  • java.class.path - a dummy class path to prevent an activation group from loading implementation classes from the local class path
  • examples.activation.impl.codebase - the location of the implementation classes, which the group's policy file uses to grant permissions to
  • examples.activation.file - a file containg the object's persistent state

The java.security.policy property is specified by the examples.activation.policy system property, and defaults to the file named group.policy which will, in practice, be in the working directory where rmid is run. The java.class.path property is defined as no_classpath. The examples.activation.impl.codebase and examples.activation.file properties are specified by their current values (respectively), defined when the Setup program runs.

The group descriptor is constructed as follows:

String policy =
    System.getProperty("examples.activation.policy", "group.policy");
String implCodebase =
    System.getProperty("examples.activation.impl.codebase");
String filename =
    System.getProperty("examples.activation.file", "");

Properties props = new Properties();
props.put("java.security.policy", policy);
props.put("java.class.path", "no_classpath");
props.put("examples.activation.impl.codebase", implCodebase);
if (filename != null && !filename.equals("")) {
    props.put("examples.activation.file", filename);
}

ActivationGroupDesc groupDesc = new ActivationGroupDesc(props, null);

The following is an example group.policy file that grants the appropriate permissions for the activation examples:

grant codeBase "${examples.activation.impl.codebase}" {

    // permission to read and write object's file
    permission java.io.FilePermission "${examples.activation.file}","read,write";

    // permission to listen on an anonymous port
    permission java.net.SocketPermission "*:1024-","accept";
};

The codebase to which permissions are granted is a URL specifying the location of the activatable object's implementation classes. This URL is the value of the examples.activation.impl.codebase system property, which will be defined in the activation group's VM. An activatable object in the group needs two permissions:

  • java.io.FilePermission - to read and write the file containing the activatable object's persistent state
  • java.net.SocketPermission - to export the activatable object to accept connections an anonymous port

Register the group descriptor

Next, the Setup program must register the activation group descriptor with the activation system to obtain the group's ID, an instance of the class java.rmi.activation.ActivationGroupID. The class java.rmi.activation.ActivationGroup has a static method getSystem for obtaining the stub for the activation system. The Setup program calls the activation system's remote method registerGroup, passing the group descriptor created above, to register the activation group:
ActivationGroupID groupID =
    ActivationGroup.getSystem().registerGroup(groupDesc);

Construct an activation descriptor

Once the activation group ID is obtained, the Setup program can register the activation descriptor. The activation descriptor has four basic pieces of information:

  • the activation group ID for the group that the object will be contained in
  • the implementation's class name
  • the location (URL) specifying where the implementation's classes can be loaded from
  • a marshalled object containing initialization information for the object

In this example, the activation group ID is the one obtained above; the implementation's class name is the class name, implClass, supplied as the command-line argument to the Setup program; the location (URL) is specified by the system property examples.activation.impl.codebase; and, the initialization data (which is optional) is a filename specified by the system property examples.activation.file.

The activation descriptor is constructed as follows:

MarshalledObject data = null;
if (filename != null && !filename.equals("")) {
    data = new MarshalledObject(filename);
}

ActivationDesc desc =
    new ActivationDesc(groupID, implClass, implCodebase, data);

Register the activation descriptor

Next, the Setup program must register the activation descriptor with the activation system. The class Activatable has a static convenience method, register, that registers an activation descriptor with the activation system and returns a stub for the activatable object specified by the descriptor.

Remote stub = Activatable.register(desc);

Note: The register method attempts to load a stub class for the implementation class in order to create a stub instance. If the register method is unable to load a pregenerated stub class, it will use an instance of a dynamically-generated proxy class that implements all the interfaces of the implementation class. In the latter case the register method needs load the implementation class in order to determine the remote interfaces that the implementation class implements. So, the register method has a slight behavioral difference, depending on whether a pregenerated or dynamically-generated stub class is used.

Bind the remote object's stub in a rmiregistry

Finally, the remote object's stub is bound to a name in the registry running on the default port of 1099. The name is specified by the system property examples.activation.name.

String name = System.getProperty("examples.activation.name");
LocateRegistry.getRegistry().rebind(name, stub);

Compile the source file

The source file for this example can be compiled as follows:

javac -d setupDir Setup.java
where setupDir is the root destination directory to put the class files in.

Start rmid, rmiregistry, and the Setup program

To run this the Setup program, you will need to do the following:

  • Start rmid
  • Start rmiregistry
  • Run the Setup program

Start rmid

To start rmid, run the rmid command on the server's host. This command should produce no output if it is run with a security policy file as specified below. For more information, see the tools documentation for rmid [Solaris, Linux, or Mac OS X, Windows].

For example, in the Solaris Operating System:

rmid -J-Djava.security.policy=rmid.policy \
     -J-Dexamples.activation.policy=group.policy &

Or, on Windows platforms:

start rmid -J-Djava.security.policy=rmid.policy \
           -J-Dexamples.activation.policy=group.policy

where:

  • rmid.policy is the security policy file for rmid
  • group.policy is the group policy file, used in rmid's policy file

The security policy file for rmid grants permissions for rmid to execute specific commands and to use specific command-line options in starting activation group VMs. For example, a user might grant specific permissions to start an activation group VM with one or more system properties or other java command-line options. This example allows rmid to start activation group VMs that define the system properties java.security.policy, java.class.path, examples.activation.impl.codebase, and examples.activation.file. The following example security policy file grants permission to start an activation group VM with these specific properties defined:

grant {
    // allow activation groups to use certain system properties
    permission com.sun.rmi.rmid.ExecOptionPermission "-Djava.security.policy=${examples.activation.policy}";
    permission com.sun.rmi.rmid.ExecOptionPermission "-Djava.class.path=no_classpath";
    permission com.sun.rmi.rmid.ExecOptionPermission "-Dexamples.activation.impl.codebase=*";
    permission com.sun.rmi.rmid.ExecOptionPermission "-Dexamples.activation.file=*";
};

The first ExecOptionPermission permission grant restricts the java.security.policy system property to be the file specified by the system property examples.activation.policy, defined when rmid is run. The next permission grant allows a group to define the system property java.class.path as no_classpath, a dummy class path that prevents the group from having a valid class path. The next permission grant allows the group to define the system property examples.activation.impl.codebase to be any value. The final permission grant allows the examples.activation.file system property to be any value.

Start rmiregistry

To start the registry, run the rmiregistry command on the server's host. This command produces no output (when successful) and is typically run in the background. For more information, see the tools documentation for rmiregistry [Solaris, Linux, or Mac OS X, Windows].

For example, in the Solaris Operating System:

rmiregistry &

Or, on Windows platforms:

start rmiregistry

By default, the registry runs on TCP port 1099. To start a registry on a different port, specify the port number from the command line. For example, to start the registry on port 2001 on a Windows platform:

start rmiregistry 2001

Note: Make sure that rmiregistry does not have any implementation classes in its class path to prevent it from loading any classes from its local class path.

If the registry will be running on a port other than 1099, you'll need to specify the port number in the calls to LocateRegistry.getRegistry in the Setup program, as well as any clients that access this registry. For example, if the registry is running on port 2001 in this example, the call to getRegistry would be:

Registry registry = LocateRegistry.getRegistry(2001);

Also note that if you use a registry port other than 1099, you will also need to modify the Setup and client program's policy files to grant permission to connect to the registry's port.

Run the Setup program

To start the Setup program, run the Setup class using the java command as follows:

java -cp setupDir:implDir \
     -Djava.security.policy=setup.policy        \
     -Djava.rmi.server.codebase=codebase         \
     -Dexamples.activation.setup.codebase=setupCodebase       \
     -Dexamples.activation.impl.codebase=implCodebase \
     -Dexamples.activation.name=name             \
     [-Dexamples.activation.file=file]       \
     [-Dexamples.activation.policy=group.policy] \
     examples.activation.Setup implClass

where:

  • setupDir is the root directory for the Setup program's class
  • implDir is the root directory for the implementation's classes
  • setup.policy is the security policy file for the Setup program
  • codebase is the location (URL) of the remote interface class(es)
  • setupCodebase is the location (URL) the Setup program class (used in granting permissions to the Setup program in the setup.policy file)
  • implCodebase is the location (URL) of the implementation class(es), used in the activation descriptor and also used in the group policy file as the codebase to grant permissions to
  • name is the name for the object's stub to be bound in the registry
  • file (optional) is the name of a file containing the object's persistent state which is registered as the data in the object's activation descriptor (no default)
  • group.policy (optional) is the security policy file for the activation group (defaults to group.policy), and
  • implClass is the fully-qualified name of the implementation class.

Note: If you use file URLs for any of the codebases listed above, make sure that each file URL has a trailing slash, or the codebase will be invalid.

The output from the Setup program should look like this:

Activation group descriptor registered.
Activation descriptor registered.
Stub bound in registry.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Getting Started Using Java RMI

This tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using Java Remote Method Invocation (Java RMI). While you work through this example, you will probably come up with a number of related questions. You may find answers in the Java RMI FAQ.

The distributed Hello World example uses a simple client to make a remote method invocation to a server which may be running on a remote host. The client receives the "Hello, world!" message from the server.

This tutorial has the following steps:

  • Define the remote interface
  • Implement the server
  • Implement the client
  • Compile the source files
  • Start the Java RMI registry, server, and client
The files needed for this tutorial are:
  • Hello.java - a remote interface
  • Server.java - a remote object implementation that implements the remote interface
  • Client.java - a simple client that invokes a method of the remote interface
Note: For the remainder of this tutorial, the terms "remote object implementation" and "implementation class" are used interchangeably to refer to the class example.hello.Server, which implements a remote interface.

Define the remote interface

A remote object is an instance of a class that implements a remote interface. A remote interface extends the interface java.rmi.Remote and declares a set of remote methods. Each remote method must declare java.rmi.RemoteException (or a superclass of RemoteException) in its throws clause, in addition to any application-specific exceptions.

Here is the interface definition for the remote interface used in this example, example.hello.Hello. It declares just one method, sayHello, which returns a string to the caller:

package example.hello;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface Hello extends Remote {
    String sayHello() throws RemoteException;
}
Remote method invocations can fail in many additional ways compared to local method invocations (such as network-related communication problems and server problems), and remote methods will report such failures by throwing a java.rmi.RemoteException.

Implement the server

A "server" class, in this context, is the class which has a main method that creates an instance of the remote object implementation, exports the remote object, and then binds that instance to a name in a Java RMI registry. The class that contains this main method could be the implementation class itself, or another class entirely.

In this example, the main method for the server is defined in the class Server which also implements the remote interface Hello. The server's main method does the following:

  • Create and export a remote object
  • Register the remote object with a Java RMI registry
Here is the source code for the class Server. Descriptions for writing this server class follow the source code:
package example.hello;

import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class Server implements Hello {

    public Server() {}

    public String sayHello() {
        return "Hello, world!";
    }

    public static void main(String args[]) {

        try {
            Server obj = new Server();
            Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0);

            // Bind the remote object's stub in the registry
            Registry registry = LocateRegistry.getRegistry();
            registry.bind("Hello", stub);

            System.err.println("Server ready");
        } catch (Exception e) {
            System.err.println("Server exception: " + e.toString());
            e.printStackTrace();
        }
    }
}

The implementation class Server implements the remote interface Hello, providing an implementation for the remote method sayHello. The method sayHello does not need to declare that it throws any exception because the method implementation itself does not throw RemoteException nor does it throw any other checked exceptions.

Note: A class can define methods not specified in the remote interface, but those methods can only be invoked within the virtual machine running the service and cannot be invoked remotely.

Create and export a remote object

The main method of the server needs to create the remote object that provides the service. Additionally, the remote object must be exported to the Java RMI runtime so that it may receive incoming remote calls. This can be done as follows:
Server obj = new Server();
Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0);
The static method UnicastRemoteObject.exportObject exports the supplied remote object to receive incoming remote method invocations on an anonymous TCP port and returns the stub for the remote object to pass to clients. As a result of the exportObject call, the runtime may begin to listen on a new server socket or may use a shared server socket to accept incoming remote calls for the remote object. The returned stub implements the same set of remote interfaces as the remote object's class and contains the host name and port over which the remote object can be contacted.

Note: For details on how to generate stub classes, see the tools documentation for rmic [UNIX, Windows]. For details on how to deploy your application along with pregenerated stub classes, see the codebase tutorial.

Register the remote object with a Java RMI registry

For a caller (client, peer, or applet) to be able to invoke a method on a remote object, that caller must first obtain a stub for the remote object. For bootstrapping, Java RMI provides a registry API for applications to bind a name to a remote object's stub and for clients to look up remote objects by name in order to obtain their stubs.

A Java RMI registry is a simplified name service that allows clients to get a reference (a stub) to a remote object. In general, a registry is used (if at all) only to locate the first remote object a client needs to use. Then, typically, that first object would in turn provide application-specific support for finding other objects. For example, the reference can be obtained as a parameter to, or a return value from, another remote method call. For a discussion on how this works, please take a look at Applying the Factory Pattern to Java RMI.

Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then invoke remote methods on the object.

The following code in the server obtains a stub for a registry on the local host and default registry port and then uses the registry stub to bind the name "Hello" to the remote object's stub in that registry:

Registry registry = LocateRegistry.getRegistry();
registry.bind("Hello", stub);
The static method LocateRegistry.getRegistry that takes no arguments returns a stub that implements the remote interface java.rmi.registry.Registry and sends invocations to the registry on server's local host on the default registry port of 1099. The bind method is then invoked on the registry stub in order to bind the remote object's stub to the name "Hello" in the registry.

Note: The call to LocateRegistry.getRegistry simply returns an appropriate stub for a registry. The call does not check to see if a registry is actually running. If no registry is running on TCP port 1099 of the local host when the bind method is invoked, the server will fail with a RemoteException.

Implement the client

The client program obtains a stub for the registry on the server's host, looks up the remote object's stub by name in the registry, and then invokes the sayHello method on the remote object using the stub.

Here is the source code for the client:

package example.hello;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class Client {

    private Client() {}

    public static void main(String[] args) {

        String host = (args.length < 1) ? null : args[0];
        try {
            Registry registry = LocateRegistry.getRegistry(host);
            Hello stub = (Hello) registry.lookup("Hello");
            String response = stub.sayHello();
            System.out.println("response: " + response);
        } catch (Exception e) {
            System.err.println("Client exception: " + e.toString());
            e.printStackTrace();
        }
    }
}

This client first obtains the stub for the registry by invoking the static LocateRegistry.getRegistry method with the hostname specified on the command line. If no hostname is specified, then null is used as the hostname indicating that the local host address should be used.

Next, the client invokes the remote method lookup on the registry stub to obtain the stub for the remote object from the server's registry.

Finally, the client invokes the sayHello method on the remote object's stub, which causes the following actions to happen:

  • The client-side runtime opens a connection to the server using the host and port information in the remote object's stub and then serializes the call data.
  • The server-side runtime accepts the incoming call, dispatches the call to the remote object, and serializes the result (the reply string "Hello, world!") to the client.
  • The client-side runtime receives, deserializes, and returns the result to the caller.

The response message returned from the remote invocation on the remote object is then printed to System.out.

Compile the source files

The source files for this example can be compiled as follows:

javac -d destDir Hello.java Server.java Client.java
where destDir is the destination directory to put the class files in.

Note: For details on how to deploy your application along with pregenerated stub classes, see the codebase tutorial.

Start the Java RMI registry, server, and client

To run this example, you will need to do the following:

  • Start the Java RMI registry
  • Start the server
  • Run the client

Start the Java RMI registry

To start the registry, run the rmiregistry command on the server's host. This command produces no output (when successful) and is typically run in the background. For more information, see the tools documentation for rmiregistry [UNIX, Windows].

For example, on the Solaris Operating System:

rmiregistry &

Or, on Windows platforms:

start rmiregistry

By default, the registry runs on TCP port 1099. To start a registry on a different port, specify the port number from the command line. For example, to start the registry on port 2001 on a Windows platform:

start rmiregistry 2001

If the registry will be running on a port other than 1099, you'll need to specify the port number in the calls to LocateRegistry.getRegistry in the Server and Client classes. For example, if the registry is running on port 2001 in this example, the call to getRegistry in the server would be:

Registry registry = LocateRegistry.getRegistry(2001);

Start the server

To start the server, run the Server class using the java command as follows:

On the Solaris Operating System:

java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server &

On Windows platforms:

start java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server

where classDir is the root directory of the class file tree. Setting the java.rmi.server.codebase system property ensures that the registry can load the remote interface definition (note that the trailing slash is important); for more information about using this property, see the codebase tutorial.

The output from the server should look like this:

Server ready

The server remains running until the process is terminated by the user (typically by killing the process).

Run the client

Once the server is ready, the client can be run as follows:

java  -classpath classDir example.hello.Client

where classDir is the root directory of the class file tree.

The output from the client is the following message:

response: Hello, world!

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Configuring inetd to Launch rmid

On the Solaris Operating System (Solaris OS), the Internet services daemon inetd provides an alternative to starting up services at system boot time. This daemon, a server process for Internet standard services, can be configured to start services on demand. For details on the Internet services daemon, see the Solaris OS inetd(1M) man page.

inetd can be configured to start the Java RMI activation daemon rmid on demand. In this case, rmid does not need to be started up at boot time or started up manually. Instead, rmid will be started when a client attempts to connect to it, such as in order to activate an object.

Note: If restartable services are registered with rmid, rmid should be started at system boot type (not by inetd) so that the restartable services are always running when the system is up.

To configure inetd to launch rmid, you will need to add an entry to each of two configuration files that inetd uses, /etc/inetd.conf and /etc/services. Editing these files requires root access to the machine that rmid will run on.

After inetd has been reconfigured, you should test your configuration to make sure that it works properly.

This tutorial has the following steps:

  • Configure /etc/inetd.conf
  • Configure /etc/services
  • Force inetd to read its new configuration
  • Test your configuration

Configure /etc/inetd.conf

The /etc/inetd.conf configuration file contains entries for the services to be launched when inetd receives a request over a socket. For details on the format of this configuration file see the Solaris OS inetd.conf(4) man page.

To configure inetd to launch rmid, add the following entry to the /etc/inetd.conf configuration file (requires root access to the machine):

rmid stream tcp wait nobody jreHome/bin/rmid  \
     rmid -log logDir/rmid.log rmidOptions
where jreHome is a path to the installed JRE, logDir is the directory for the log file, and rmidOptions is any other options for rmid (for example, property initializations). When rmid is launched by inetd the -log option must be specified, and the -port option must not be specified, since the port is derived from the /etc/services configuration.

If rmid needs to be run as a user other than nobody, replace nobody above with the user ID under which rmid should run.

Configure /etc/services

Next, rmid needs to be listed as a service in the /etc/services configuration file. For details on the format of this configuration file see the Solaris OS services(4) man page.

To list rmid as a service, add the following entry to the /etc/services configuration file (requires root access to the machine):

rmid        port/tcp

where port is the port number for the ActivationSystem and the Activator remote objects that rmid exports. This port number is typically 1098, but another port number can be used as long as the clients and activatable services define the system property java.rmi.activation.port to that port.

Force inetd to read its new configuration

Now that the configuration has been modified, inetd needs to read the new configuration so that it can listen on the appropriate ports for the services that are configured.

But first, it is important to make sure that rmid is not already running. To do this, run the following command:

% ps -ef | grep rmid

If the above command does not print out the information for a running rmid process, then rmid is not running. If it does, then you will need to shut down rmid first before continuing.

Next, inetd needs to read its new configuration. To force inetd to reread its configuration, the running inetd process must be sent a hangup signal. First, find the process ID for the running inetd process by running the following command:

% ps -ef | grep inetd

which will print out something like this:

root   171     1  0   Sep 30 ?        0:02 /usr/sbin/inetd -s

In this example, the process ID for inetd is 171. Now, the inetd process can be sent a hangup signal by running the following command and supplying the process ID (requires root access):

% kill -HUP 171

Now, inetd is all set to launch rmid when a program attempts to connect to the port configured above.

Test your configuration

To test that inetd is configured properly, you can run a simple program that looks up the ActivationSystem which will, in turn, cause inetd to launch rmid if the configuration is correct.

The following is a simple program to look up the ActivationSystem on a port, supplied as the value of the java.rmi.activation.port system property:

package example.inetd;

import java.rmi.activation.ActivationSystem;
import java.rmi.activation.ActivationGroup;

public class GetActivationSystem {

    public static void main(String[] args) throws Exception {

        ActivationSystem system = ActivationGroup.getSystem();
        System.err.println("ActivationSystem = " + system);
    }
}

Compile and run this program as follows:

% javac -d classDir GetActivationSystem.java
% java -classpath classDir -Djava.rmi.activation.port=port
example.inetd.GetActivationSystem
where classDir is the class path for this example class, and port is the port for the ActivationSystem configured for rmid in the /etc/services file.

If the program prints out the ActivationSystem successfully then rmid was launched by inetd.

If the program either hangs or prints an exception trace, check the output file produced by rmid. When rmid is launched by inetd, any output written to System.err is written to a file located in the directory specified by the property java.io.tmpdir, typically /var/tmp on the Solaris OS. The output file is prefixed with "rmid-err" and has the suffix of ".tmp". The file name also contains other characters (typically numbers) in between to keep the file name unique.

If rmid starts up successfully from inetd, the output file should contain text similar to the following (with no warning or error messages):

Tue Sep 30 13:07:38 EDT 2003
rmid startup with inherited channel: sun.nio.ch.ServerSocketChannelImpl[/192.0.2.120:1098]

If the file does not exist, the above text is not in the file, or additional error output is in the file, then recheck the configuration. Upon changing the inetd configuration, remember to send inetd a hangup signal so that it rereads its altered configuration, and remember to terminate any rmid process started from the previous attempt before continuing.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Designing Services to be Launched from inetd

On the Solaris Operating System (Solaris OS), the Internet services daemon inetd provides an alternative to starting up services at system boot time. This daemon, a server process for Internet standard services, can be configured to start services on demand. For details on the Internet services daemon, see the Solaris OS inetd(1M) man page.

Now, inetd can be configured to start Java Remote Method Invocation (Java RMI) services on demand. An application, however, must use a specific technique to enable that application and its constituent services to be started from inetd. First, the service program should create a local registry, exported to use the I/O socket inherited from inetd. The service program should then bind the service's proxy in this specially exported registry so that clients can look up the service. Once the service program is complete, inetd can be configured to start this program when a client attempts to connect to the service's local registry in order to look up the service by name.

This tutorial first describes how to structure a service program (employing a specially exported local registry) so that the service can be started from inetd when clients connect to the service's local registry.

Next, the tutorial describes how to configure inetd to launch the service program. You will need to add an entry to each of two configuration files that inetd uses, /etc/inetd.conf and /etc/services. Editing these files requires root access to the machine that the service will run on.

After inetd has been reconfigured, you should test your configuration to make sure that it works properly.

This tutorial has the following steps:

  • Implement the service program
  • Configure /etc/inetd.conf
  • Configure /etc/services
  • Force inetd to read its new configuration
  • Test your configuration using a simple client

Implement the service program

The server-side implementation uses the following source files:

  • ServiceInterface.java: remote interface for the service
  • InitializeRegistry.java: utility to create/export a registry using an inherited channel
  • Server.java: service program
The interface ServiceInterface defines a remote interface with a single method sendMessage specified to take a single argument, message, and return an acknowledgment that the message was received.

The class InitializeRegistry defines a static utility method initializeWithInheritedChannel that creates and exports a registry (using an inherited channel, if any), and binds a remote service's proxy in that registry for clients to look up.

The service program Server implements the interface ServiceInterface and defines a static main method for running the service. The static main method does the following:

  • Redirects System.err output to a file, in order to prevent the error output from being lost in the case that the service program is started from inetd.
  • Parses the optional argument, which is the port number for the local registry.
  • Creates and exports the server on an anonymous port.
  • Invokes the InitializeRegistry.initializeWithInheritedChannel utility method with the service's proxy, the name for the service in the registry, and an optional port number to use if the program is run from the command line instead of being started from inetd.
  • Prints out the message ready.
  • Waits forever.

The most interesting part of the implementation is in the initializeWithInheritedChannel utility method. This method uses the System.inheritedChannel method which allows an application to obtain a channel (java.nio.channels.SocketChannel or java.nio.channels.ServerSocketChannel, for example) inherited from a process that launched the virtual machine. Such an inherited channel can be used to either service a single incoming connection (in the case of a SocketChannel), or accept multiple incoming connections (in the case of ServerSocketChannel). In this way, applications launched by inetd can obtain the SocketChannel or ServerSocketChannel inherited from inetd.

The initializeWithInheritedChannel utility method first invokes the System.inheritedChannel method to obtain the inherited channel. The inherited channel must either be null or a ServerSocketChannel or the method will throw an IOException.

If the inherited channel is null, there is no inherited channel; that is, the program was run from the command line. In this case, the initializeWithInheritedChannel method simply exports a registry on the specified port (which must be nonzero) and binds the specified service proxy in that registry.

If the inherited channel is a ServerSocketChannel instance, then the program was started from inetd. In this case, the initializeWithInheritedChannel method exports a registry with an RMIServerSocketFactory whose createServerSocket method returns a ServerSocket that delays accepting requests from the inherited ServerSocketChannel until the specified proxy is bound in the registry.

In the case that the program is started from inetd, it is important that the registry not accept any incoming connections on the inherited ServerSocket until the service's proxy is bound in the local registry. If a connection is accepted before the service is bound in the registry, a client might receive a java.rmi.NotBoundException from attempting to look up the service proxy.

For details on how to implement a ServerSocket that delays accepting requests until a service is bound in the registry, see the private nested class DelayedAcceptServerSocket defined in the InitializeRegistry class.

Compile the service program as follows:

% javac -d classDir ServiceInterface.java InitializeRegistry.java Server.java
where classDir is the class path for this example.

The next three sections describe how to set up inetd to start the service program.

Configure /etc/inetd.conf

The /etc/inetd.conf configuration file contains entries for the services to be launched when inetd receives a request over a socket. For details on the format of this configuration file see the Solaris OS inetd.conf(4) man page.

To configure inetd to launch the service program, add the following entry to the /etc/inetd.conf configuration file (requires root access to the machine):

example-server stream tcp wait nobody jreHome/bin/java  \
     java -classpath classpath example.inetd.Server
where jreHome is a path to the installed JRE, and classpath is the class path for the example.

If the program needs to be run as a user other than nobody, replace nobody above with the user ID under which the program should run.

Configure /etc/services

Next, the name chosen to refer to the service, example-server, needs to be listed as a service in the /etc/services configuration file. For details on the format of this configuration file see the Solaris OS services(4) man page.

To list example-server as a service, add the following entry to the /etc/services configuration file (requires root access to the machine):

example-server        port/tcp
where port is the port number for the service's local registry.

Force inetd to read its new configuration

Now that the configuration has been modified, inetd needs to read the new configuration so that it can listen on the appropriate ports for the services that are configured.

But first, it is important to make sure that the service program is not already running. To do this, run the following command:

% ps -ef | grep example.inetd.Server
If the above command does not print out the information for a running java process for the service program, then the program is not running. If it does, then you will need to terminate the program first before continuing.

Next, inetd needs to read its new configuration. To force inetd to reread its configuration, the running inetd process must be sent a hangup signal. First, find the process ID for the running inetd process by running the following command:

% ps -ef | grep inetd
which will print out something like this:
root   171     1  0   Sep 30 ?        0:02 /usr/sbin/inetd -s
In this example, the process ID for inetd is 171. Now, the inetd process can be sent a hangup signal by running the following command and supplying the process ID (requires root access):
% kill -HUP 171
Now, inetd is all set to launch the service program when a client attempts to connect to the port configured above.

Test your configuration using a simple client

To test that inetd is configured properly, you can run a simple client program that looks up the service in the registry on the port configured above, and then invokes a method on the service. Attempting to connect to the service's local registry will, in turn, cause inetd to launch the service program if the configuration is correct.

The following is a simple program to look up the service and invoke a method on the service to send it a message. The program takes three command-line arguments, the host and port of the service's local registry, and the message to send to the service:

package example.inetd;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class Client {

    public static void main(String[] args) throws Exception {

        int port = 0;
        String host = "";
        String message = "";

        if (args.length > 2) {
            host = args[0];
            try {
                port = Integer.parseInt(args[1]);
                if (port == 0) {
                    goodbye("nonzero port argument required", null);
                }
            } catch (NumberFormatException e) {
                goodbye("malformed port argument", e);
            }
            message = args[2];
        } else {
            usage();
        }

        Registry registry = LocateRegistry.getRegistry(host, port);
        ServiceInterface proxy =
            (ServiceInterface) registry.lookup("ServiceInterface");
        System.out.println("sending message: " + message);
        System.out.println("received message from proxy: " +
                           proxy.sendMessage(message));

        System.out.println("done.");
    }

    private static void goodbye(String message, Exception e) {
        System.err.println("Client: " + message + (e != null ? ": " : ""));
        if (e != null) {
            e.printStackTrace();
        }
        System.exit(1);
    }

    private static void usage() {
        System.err.println("Client <host> <port> <message>");
        System.exit(1);
    }
}

The full source (including comments) for the client is:

  • ServiceInterface.java: remote interface for the service
  • Client.java: client program

Compile and run this program as follows:

% javac -d classDir ServiceInterface.java Client.java
% java -classpath classDir example.inetd.Client host port "message"
where classDir is the class path for this example, host is the host that the service is configured to run on, port is the port configured for the service in the /etc/services file, and message is a string to send to the service.

If the client program prints out that it sent a message to and received a message from the service, then the service program was successfully launched by inetd.

If the client program either hangs or prints an exception trace, check the output produced by the service program. The service program redirects any output written to System.err to a file located in the directory specified by the property java.io.tmpdir, typically /var/tmp on the Solaris OS. The output file is prefixed with "example-server-err" and has the suffix of ".tmp". The file name also contains other characters (typically numbers) in between to keep the file name unique.

If the service program starts up successfully from inetd, the output file should contain the text "ready" with no warning or error messages.

If the file does not exist, the "ready" message is not in the file, or additional error output is in the file, then recheck the configuration. Upon changing the inetd configuration, remember to send inetd a hangup signal so that it rereads its altered configuration, and remember to terminate any process started from the previous attempt before continuing.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Custom Socket Factories with Java RMI

This tutorial shows you steps to follow to implement and use custom socket factories with Java Remote Method Invocation (Java RMI). Custom socket factories can be used to control how remote method invocations are communicated at the network level. For example, they can be used to set socket options, control address binding, control connection establishment (such as to require authentication), and to control data encoding (such as to add encryption or compression).

When a remote object is exported, such as with the constructors or exportObject methods of java.rmi.server.UnicastRemoteObject or java.rmi.activation.Activatable, then it is possible to specify a custom client socket factory (a java.rmi.server.RMIClientSocketFactory instance) and a custom server socket factory (a java.rmi.server.RMIServerSocketFactory instance) to be used when communicating remote invocations for that remote object.

A client socket factory controls the creation of sockets used to initiate remote invocations and thus can be used to control how connections are established and the type of socket to use. A server socket factory controls the creation of server sockets used to receive remote invocations and thus can be used to control how incoming connections are listened for and accepted as well as the type of sockets to use for incoming connections.

The remote stub for a remote object contains the client socket factory, if any, that the remote object was exported with, and thus a client socket factory must be serializable, and its code may be downloaded by clients just like the code for stub classes or any other serializable object passed over a remote invocation.

There is also a LocateRegistry.createRegistry method for exporting a registry with custom socket factories and a LocateRegistry.getRegistry method for obtaining the stub for a registry with a custom client socket factory.

(Note that there is also a global socket factory for Java RMI, which can be set with the setSocketFactory method of java.rmi.server.RMISocketFactory. This global socket factory is used for creating sockets when a remote stub does not contain a custom client socket factory and for creating server sockets when a remote object was not exported with a custom server socket factory.)

This tutorial has three parts:

  • Implementing a Custom Socket Factory.
  • Using a Custom Socket Factory in an Application.
  • Compiling and Running the Application.

The source code for this tutorial is available in the following formats:

  • sockets.zip
  • sockets.tar
  • sockets.tar.Z
Many users are interested in secure communication between Java RMI clients and servers, such as with mutual authentication and encryption. Custom socket factories provide a hook for doing this. For more information, see Using Java RMI with SSL.

Implementing a Custom Socket Factory

Below are three steps for implementing a pair of custom socket factory classes:
  1. Implement a custom ServerSocket and Socket.
  2. Implement a custom RMIClientSocketFactory.
  3. Implement a custom RMIServerSocketFactory.

Step 1:
Implement a custom ServerSocket and Socket

The type of socket to use is an application-specific decision. If your server sends or receives sensitive data, you might want a socket that encrypts the data.

In this example, the custom socket factory creates sockets that perform simple XOR encryption and decryption. Note that this kind of encryption is easily decrypted by a knowledgeable cryptanalyst and is only used here to keep the example simple.

The custom XOR socket implementation includes the following sources. XOR sockets use special input and output stream implementations to handle XOR-ing the data written to or read from the socket.

  • XorInputStream.java
  • XorOutputStream.java
  • XorServerSocket.java
  • XorSocket.java

Step 2:
Implement a custom RMIClientSocketFactory

The client-side socket factory, XorClientSocketFactory, implements the java.rmi.server.RMIClientSocketFactory interface. The client socket factory needs to implement the createSocket method to return the approriate client socket instance, an XorSocket.

The client socket factory must implement the java.io.Serializable interface so that instances can be serialized to clients as part of remote stubs. It is also essential to implement the equals and hashCode methods so that the Java RMI implementation will correctly share resources among remote stub instances with equivalent client socket factories.

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class XorClientSocketFactory
    implements RMIClientSocketFactory, Serializable {

    private byte pattern;

    public XorClientSocketFactory(byte pattern) {
        this.pattern = pattern;
    }

    public Socket createSocket(String host, int port)
        throws IOException
    {
        return new XorSocket(host, port, pattern);
    }

    public int hashCode() {
        return (int) pattern;
    }

    public boolean equals(Object obj) {
        return (getClass() == obj.getClass() &&
                pattern == ((XorClientSocketFactory) obj).pattern);
    }
}

Step 3:
Implement a custom RMIServerSocketFactory

The server-side socket factory, XorServerSocketFactory, implements the java.rmi.server.RMIServerSocketFactory interface. The server socket factory needs to implement the createServerSocket method to return the appropriate server socket instance, an XorServerSocket.

The server socket factory does not need to implement the Serializable interface because server socket factory instances are not contained in remote stubs. It is still essential for the server socket factory to implement the equals and hashcode methods so that the Java RMI implementation will correctly share resources among remote objects exported with equivalent socket factories.

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class XorServerSocketFactory
    implements RMIServerSocketFactory {

    private byte pattern;

    public XorServerSocketFactory(byte pattern) {
        this.pattern = pattern;
    }

    public ServerSocket createServerSocket(int port)
        throws IOException
    {
        return new XorServerSocket(port, pattern);
    }

    public int hashCode() {
        return (int) pattern;
    }

    public boolean equals(Object obj) {
        return (getClass() == obj.getClass() &&
                pattern == ((XorServerSocketFactory) obj).pattern);
    }

}

Using a Custom Socket Factory in an Application

There are only two more steps to complete when using a custom socket factory for a remote object:
  1. Write a server application that creates a remote object and exports it to use your custom RMIClientSocketFactory and RMIServerSocketFactory implementations. Store a reference to the remote object's stub in a Java RMI registry so that clients can look it up.
  2. Write a client application that looks up the stub for the remote object and invokes a remote method. The custom socket factories do not need to be referenced in the client application. The client-side socket factory will be downloaded to the client when the client looks up the stub for the remote object.

Step 1:
Write a server application

If communication with a remote object requires the use of custom sockets, you need to specify which custom socket factories to use when you export the remote object. When your application exports the remote object specifying custom socket factories, the Java RMI runtime will use the corresponding custom RMIServerSocketFactory to create a server socket to accept incoming calls to the remote object, and it will create a stub that contains the corresponding custom RMIClientSocketFactory. That client socket factory will be used to create connections when remote invocations are made to the remote object using the stub.

This example is similar to the example in the tutorial Getting Started Using Java RMI, but it uses custom socket factories instead of the default sockets used by the Java RMI implementation.

The application uses the following Hello remote interface:

package examples.rmisocfac;

public interface Hello extends java.rmi.Remote {
    String sayHello() throws java.rmi.RemoteException;
}
The server application creates a remote object implementing the Hello remote interface and exports the object to use custom socket factories using the java.rmi.server.UnicastRemoteObject.exportObject method that takes the custom socket factories as arguments. Next, it creates a local registry and, in that registry, it binds a reference to the remote object's stub with the name "Hello".
package examples.rmisocfac;

import java.io.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;

public class HelloImpl implements Hello {

    public HelloImpl() {}

    public String sayHello() {
        return  "Hello World!";
    }

    public static void main(String args[]) {

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }

        byte pattern = (byte) 0xAC;
        try {
            /*
             * Create remote object and export it to use
             * custom socket factories.
             */
            HelloImpl obj = new HelloImpl();
            RMIClientSocketFactory csf = new XorClientSocketFactory(pattern);
            RMIServerSocketFactory ssf = new XorServerSocketFactory(pattern);
            Hello stub =
                (Hello) UnicastRemoteObject.exportObject(obj, 0, csf, ssf);

            /*
             * Create a registry and bind stub in registry.
             *
            LocateRegistry.createRegistry(2002);
            Registry registry = LocateRegistry.getRegistry(2002);
            registry.rebind("Hello", stub);
            System.out.println("HelloImpl bound in registry");

        } catch (Exception e) {
            System.out.println("HelloImpl exception: " + e.getMessage());
            e.printStackTrace();
        }
    }
}

Step 2:
Write a client application

The client application obtains a reference to the registry used by the server application. It then looks up the remote object's stub and invokes its remote method sayHello:

package examples.rmisocfac;

import java.rmi.*;
import java.rmi.registry.*;

public class HelloClient {

    public static void main(String args[]) {

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }

        try {
            Registry registry = LocateRegistry.getRegistry(2002);
            Hello obj = (Hello) registry.lookup("Hello");
            String message = obj.sayHello();
            System.out.println(message);

        } catch (Exception e) {
            System.out.println("HelloClient exception: " +
                               e.getMessage());
            e.printStackTrace();
        }
    }

}

Compiling and Running the Application

There are four steps to compile and run the application:

  1. Compile the remote interface, client, and server classes
  2. Start the server
  3. Run the client

Step 1:
Compile the remote interface, client, and server classes

javac -d . XorInputStream.java
javac -d . XorOutputStream.java
javac -d . XorSocket.java
javac -d . XorServerSocket.java
javac -d . XorServerSocketFactory.java
javac -d . XorClientSocketFactory.java
javac -d . Hello.java
javac -d . HelloClient.java
javac -d . HelloImpl.java

Step 2:
Start the server

java -Djava.security.policy=policy examples.rmisocfac.HelloImpl

The server output should look like this:

      HelloImpl bound in registry

Step 3:
Run the client

In another window start the client application making sure that the application classes are in the class path:

java -Djava.security.policy=policy examples.rmisocfac.HelloClient

The client output should look like this:

      Hello World!

Note: Both the server and client applications use a security policy file that grants permissions only to files in the local class path (the current directory). The server application needs permission to accept connections, and both the server and client applications need permission to make connections. The permission java.net.SocketPermission is granted to the specified codebase URL, a "file:" URL relative to the current directory. This permission grants the ability to both accept connections from and make connections to any host on unprivileged ports (that is ports >= 1024).

grant codeBase "file:." {

    permission java.net.SocketPermission "*:1024-", "connect,accept";
};

Note that if you want to customize the communication to the registry as well, such as to secure registry communication, then that can be done by passing the appropriate custom socket factories to the LocateRegistry.createRegistry and LocateRegistry.getRegstry invocations.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Java RMI with SSL

Many have asked how a Java Remote Method Invocation (Java RMI) application can make remote invocations over secure SSL connections. Below are some questions and answers about using Java RMI with SSL.

Q1: Is it possible to use Java RMI with SSL?

A1: Yes, it is possible, with the use of custom socket factories. An application can export a remote object to use custom socket factories that create sockets of a desired type (for example, SSL sockets). Using this technique, an application can use SSL socket communication instead of the default socket communication. For further details on using custom socket factories, see the tutorial: Using Custom Socket Factories with Java RMI.

Q2: Where can I find a pure Java programming language implementation of SSL?

A2: The JDK includes the Java Secure Socket Extension (JSSE) API which provides an implementation of SSL sockets. See the JSSE Reference Guide for more detailed information on the features and benefits of JSSE.

Q3: Where can I find an example using Java RMI with SSL?

A3: There is an example bundled with the JSSE code examples that illustrates how to use SSL-based connections for calls to a remote object. This is achieved by exporting a remote object to use custom socket factories that create SSL sockets. The JDK provides some standard SSL-based custom socket factory classes; see the javax.rmi.ssl package for more details.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


A Developer Guide

Documentation Contents

Enterprise JavaBeans Components and CORBA Clients: A Developer Guide

This paper discusses how to enable a client written in any language supported by CORBA to access Enterprise JavaBeans components (EJB components). This paper is directed at programmers with advanced knowledge of both the Java Platform, Enterprise Edition (Java EE) and CORBA (Common Object Request Broker Architecture).

Java EE technology simplifies enterprise applications by basing them on standardized, modular and re-usable components based on the Enterprise JavaBeans (EJB) architecture, providing a complete set of services to those components, and handling many details of application behavior automatically. By automating many of the time-consuming and difficult tasks of application development, Java EE technology allows enterprise developers to focus on adding value, that is, enhancing business logic, rather than building infrastructure.

The EJB server-side component model simplifies development of middleware components that are transactional, scalable, and portable. Enterprise JavaBeans servers reduce the complexity of developing middleware by providing automatic support for middleware services such as transactions, security, database connectivity, and more.

CORBA is an Object Management Group (OMG) standard that is an open, vendor-independent architecture and infrastructure that computer applications use to work together over networks. Using the standard Internet Inter-ORB Protocol (IIOP), a CORBA-based program from any vendor, on almost any computer, operating system, programming language, and network, can interoperate with a CORBA-based program from the same or another vendor, on almost any other computer, operating system, programming language, and network. To learn more about CORBA, see the Object Management Group website.

CORBA technology complements the Java platform by providing a distributed objects framework, services to support that framework, and interoperability with other languages. CORBA technology is an integral part of the Java SE platform, being used in Enterprise JavaBeans components, Java Remote Method Invocation APIs running over Internet Inter-ORB Protocol ("Java RMI-IIOP"), and Java IDL APIs ("Java IDL").

OMG Interface Definition Language (IDL) is used to describe the interfaces being implemented by the remote objects. IDL is used to define the name of the interface and the names of each of the attributes and methods. Once you create the IDL file, you can use an IDL compiler to generate the client stub and the server skeleton in any language for which the OMG has defined a specification for such language mapping. To learn more about OMG IDL, see the OMG IDL web page.

Java IDL makes it possible for distributed Java applications to transparently invoke operations on remote network services using the industry standard OMG IDL and IIOP defined by the Object Management Group (http://www.omg.org). Java RMI over IIOP APIs enable the programming of CORBA servers and applications via the javax.rmi API.

Developers who program EJB components follow the Java RMI programming model for their distributed object model, where the required transport common across all application servers is Java RMI-IIOP. In heterogeneous server environments, the standard mapping of the EJB architecture to CORBA enables the following interoperability:

  • A client using an ORB from one vendor can access enterprise beans residing on a server enabled with Enterprise JavaBeans technology ("EJB server") provided by another vendor.
  • Enterprise beans in one EJB server can access enterprise beans in another EJB server.
  • A CORBA client written in a language other than the Java programming language can access any EJB component as long as there is a mapping from OMG IDL to that programming language.

The rest of this document provides an example of a CORBA client application accessing an enterprise bean object. In this document, a CORBA client means a client application written in any language supported by CORBA, including the Java programming language, C++, C, Smalltalk, COBOL, Ada, Lisp, or Python. While the Java code in this example is specific to enterprise beans, the process for developing a CORBA client that accesses a server created using the Java RMI-IIOP APIs is the same.

Links to similar example applications from other vendors who implement Java EE can be found in Links to similar examples.

Developing a CORBA Client that Accesses an Enterprise JavaBean Component

This is an example of how to develop a CORBA client application that accesses an EJB component. In this example, the client is written in the C++ programming language, but the client could be written in any language supported by CORBA.

The general process for developing a CORBA client so that it can access an enterprise bean is demonstrated in the following sections:

  1. Write the Enterprise JavaBean component
  2. Generate the CORBA IDL
  3. Create a CORBA client
  4. Deploy the Enterprise JavaBean component
  5. Run the client executable

This document also includes:

  • Creating a Java RMI-IIOP client application
  • Where to go from here
  • Tips for complex interfaces
  • Links to similar examples

In order to make the example simple, we have taken a few shortcuts. For information on building more advanced solutions, see Tips for complex interfaces.

  1. Part I: Write the Enterprise JavaBean component

    The following examples show the code for an enterprise bean that will accept simple String log messages sent to the application server from Java RMI-IIOP and CORBA clients. The enterprise bean prints them on the server along with the current server time.

  2. Create the files Logger.java , LoggerHome.java , LoggerEJB.java , and LogMessage.java in the /Java/src/ejbinterop directory.

    Logger.java

    The file Logger.java is the enterprise bean's remote interface, and as such, it extends EJBObject . A remote interface provides the remote client view of an EJB object and defines the business methods callable by a remote client.

//Code Example 1: Logger.java
package ejbinterop;

import javax.ejb.EJBObject;
import java.rmi.RemoteException;

/**
 * Accepts simple String log messages and prints
 * them on the server.
 */
public interface Logger extends EJBObject
{
    /**
     * Logs the given message on the server with
     * the current server time.
     */
    void logString(String message) throws RemoteException;
}

    LoggerHome.java

    The file LoggerHome.java extends EJBHome . The EJBHome interface must be extended by all EJB component's remote home interfaces. A home interface defines the methods that allow a remote client to create, find, and remove EJB objects, as well as home business methods that are not specific to an EJB instance.

//Code Example 2: LoggerHome.java
package ejbinterop;

import java.rmi.RemoteException;
import javax.ejb.EJBHome;
import javax.ejb.CreateException;

public interface LoggerHome extends EJBHome
{
    Logger create() throws RemoteException, CreateException;
}

    LoggerEJB.java

    The file LoggerEJB.java contains the code for a session bean. A session bean is an enterprise bean that is created by a client and that usually exists only for the duration of a single client-server session. A session bean performs operations such as calculations or accessing a database for the client. In this example, the enterprise bean accepts simple String log messages from the client and prints them on the server.

//LoggerEJB.java
package ejbinterop;

import javax.ejb.*;
import java.util.*;
import java.rmi.*;
import java.io.*;

/**
 * Accepts simple String log messages and prints
 * them on the server.
 */
public class LoggerEJB implements SessionBean {

    public LoggerEJB() {}
    public void ejbCreate() {}
    public void ejbRemove() {}
    public void ejbActivate() {}
    public void ejbPassivate() {}
    public void setSessionContext(SessionContext sc) {}

    /**
     * Logs the given message on the server with
     * the current server time.
     */
    public void logString(String message) {
        LogMessage msg = new LogMessage(message);

        System.out.println(msg);
    }
}

    LogMessage.java

    The file LogMessage.java takes the current date and time, creates a formatted String showing the message, and prints the message to the server.

    //LogMessage.java
package ejbinterop;

import java.io.Serializable;
import java.util.Date;
import java.text.*;

/**
 * Simple message class that handles pretty
 * printing of log messages.
 */
public class LogMessage implements Serializable
{
    private String message;
    private long datetime;

    /**
     * Constructor taking the message. This will
     * take the current date and time.
     */
    public LogMessage(String msg) {
        message = msg;
        datetime = (new Date()).getTime();
    }

    /**
     * Creates a formatted String showing the message.
     */
    public String toString() {
        StringBuffer sbuf = new StringBuffer();
        DateFormat dformat
            = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
        DateFormat.LONG);
        FieldPosition fpos = new
            FieldPosition(DateFormat.DATE_FIELD);
        dformat.format(new Date(datetime), sbuf, fpos);
        sbuf.append(": ");
        sbuf.append(message);
        return sbuf.toString();
    }
}

  3. Compile the files written in this section, for example,
    javac -classpath $JAVA_EE_HOME/lib/java_ee.jar:.. *.java

    These commands create class files for all of the .java files in the current directory. This command and others in this paper assume that the JAVA_EE_HOME environment variable has been set correctly. Using $JAVA_EE_HOME is a convention of the UNIX operating environment. Substitute %JAVA_EE_HOME% when working in the Microsoft Windows operating environment.

    Part II: Generate the CORBA IDL

    This sections discusses generating the Interface Definition Language (IDL) files from the Java class files generated in the previous section. In this example, we will use the rmic compiler to map the Java code to IDL. IDL provides a purely declarative, programming language-independent way of specifying an object's API.

  4. Run the rmic compiler against the Java class files generated in the previous step as follows:
    rmic -idl -noValueMethods -classpath
  $JAVA_EE_HOME/lib/java_ee.jar:<path_to_ejbinterop_dir>
  -d <path_to_where_idl_files_should_be_generated>
  ejbinterop.Logger ejbinterop.LoggerHome

    In the preceding example, we are including the JAR file containing definitions for the javax.ejb package as well as the directory to our ejbinterop files. If you're using the Java Platform, Enterprise Edition (Java EE), Reference Implementation (RI), the JAR files are located in $JAVA_EE_HOME/lib/java_ee.jar .

    In the command line for rmic above, we recommend a shortcut -- using the noValueMethods option. This option tells rmic to skip any methods with parameter or return types that would be mapped to CORBA value types. The advantage is that it will prevent us from generating a lot of unnecessary IDL that we might have to implement in the C++ client. The disadvantage is that we can only use primitive data types, arrays, and Strings as parameters or return values, and not our own Java class types. Read more about this in Tips for complex interfaces

    Running the rmic compiler on the Java class files generates the following files to the directory indicated with the -d option in the rmic statement above:

    • java/lang/Ex.idl
    • java/lang/Exception.idl
    • java/lang/Object.idl
    • java/lang/Throwable.idl
    • java/lang/ThrowableEx.idl
    • javax/ejb/CreateEx.idl
    • javax/ejb/CreateException.idl
    • javax/ejb/EJBHome.idl
    • javax/ejb/EJBMetaData.idl
    • javax/ejb/EJBObject.idl
    • javax/ejb/Handle.idl
    • javax/ejb/HomeHandle.idl
    • javax/ejb/RemoveEx.idl
    • javax/ejb/RemoveException.idl
    • ejbinterop/Logger.idl
    • ejbinterop/LoggerHome.idl

    NOTE: A number of these generated files contain API that can only be used within a Java programming environment. For example, the EJBMetaData implementation is currently specific to each application server, and thus it will be difficult to develop equivalents that will continue to work over time on platforms other than the Java platform. One option is to remove these from the IDL, but if you do, you'll have to remove them from the IDL every time you change the Java interface and regenerate the IDL files from the rmic compiler.

    NOTE: Since CORBA exceptions don't support inheritance, the Java language to IDL mapping creates an Ex class that contains a CORBA value type representing the actual Java exception. In this basic example, we're not going to worry much about exception support. More information about exceptions can be found at Exceptions.

  5. Compile the IDL files with your C++ vendor's "IDL to C++" compiler to generate the C++ code corresponding to the IDL. The steps for this procedure vary by vendor, so consult your product documentation for the specific steps for your vendor.

    Part III: Create a CORBA client

    The client application can be written in any language supported by CORBA. The following example provides the code for a simple C++ client that, given an Object Request Broker (ORB) and a corbaname URL for a LoggerHome object, logs a simple String message on the server. You'll have to adjust the include statements and modify the code for registering the value factories based on your C++ ORB vendor's libraries. This example was written for ORBacus for C++ 4.0.5 and some of the C++ code in this example is specific to that product.

    A corbaname URL is a human-readable URL format that enables you to access CORBA objects. It is used to resolve a stringified name from a specific naming context. This is part of the CORBA Interoperable Naming Service (INS). INS is an extension to CORBA Object Services (COS) Naming Service, which was delivered in previous releases of the Java EE platform. To read more about INS, see Interoperable Naming Service.

    In this example, the client code does the following:

    • Creates an Object Request Broker (ORB). The ORB connects objects requesting services to the objects providing them.
    • Registers value factories.
    • Looks up the LoggerHome object in the naming context pointed to by the corbaname URL.
    • Performs a safe downcast from the object returned to a LoggerHome object.
    • Creates a LoggerEJB object reference.
    • Logs our message.
    • Tells the application server we won't use this EJB reference again.
  6. Create the client using C++ code similar to the following. The exact code may vary with your C++ implementation. This code was written for ORBacus for C++ 4.0.5 and some of the C++ code in this example may be specific to that product.
    //Code Example: Client.cpp
#include <fstream.h>

// C++ ORB Vendor specific include files
// These are from C++ ORBacus 4.0.5

#include <OB/CORBA.h>
#include <OB/OBORB.h>

// Include files generated from our IDL
#include <java/lang/Exception.h>
#include <java/lang/Throwable.h>
#include <javax/ejb/CreateException.h>
#include <javax/ejb/RemoveException.h>
#include <ejbinterop/Logger.h>
#include <ejbinterop/LoggerHome.h>

/**
 * Given an ORB and a corbaname URL for a LoggerHome
 * object, logs a simple string message on the server.
 */
void
run(CORBA::ORB_ptr orb, const char* logger_home_url)
{
  cout << "Looking for: " << logger_home_url << endl;

  // Look up the LoggerHome object in the naming context
  // pointed to by the corbaname URL
  CORBA::Object_var home_obj
    = orb->string_to_object(logger_home_url);

  // Perform a safe downcast
  ejbinterop::LoggerHome_var home
    = ejbinterop::LoggerHome::_narrow(home_obj.in());

  assert(!CORBA::is_nil(home));

  // Create a Logger EJB reference
  ejbinterop::Logger_var logger = home->create();

  CORBA::WStringValue_var msg =
    new CORBA::WStringValue((const CORBA::WChar*)L"Message
      from a C++ client");

  cout << "Logging..." << endl;

  // Log our message
  logger->logString(msg);

  // Tell the application server we won't use this
  // EJB reference any more
  logger->remove();

  cout << "Done" << endl;
}

/**
 * Simple main method that checks arguments, creates an
 * ORB, and handles exceptions.
 */
int
main(int argc, char* argv[])
{
  int exit_code = 0;
  CORBA::ORB_var orb;

  try {

  // Check the arguments
  if (argc != 2) {
    cerr << "Usage: Client <corbaname URL of LoggerHome>" << endl;
    return 1;
  }

  // Create an ORB
  orb = CORBA::ORB_init(argc, argv);

  // Register value factories

  // NOTE: This is overkill for the example since we'll never
  // get these exceptions.  Also, the _OB_id method is a
  // proprietary feature of ORBacus C++ generated code.
  CORBA::ValueFactory factory = new java::lang::Throwable_init;
  orb -> register_value_factory(java::lang::Throwable::_OB_id(),
    factory);
  factory -> _remove_ref();

  factory = new java::lang::Exception_init;
  orb -> register_value_factory(java::lang::Exception::_OB_id(),
    factory);
  factory -> _remove_ref();

  factory = new javax::ejb::CreateException_init;
  orb ->                 register_value_factory(javax::ejb::CreateException::_OB_id(),
      factory);
  factory -> _remove_ref();

  factory = new javax::ejb::RemoveException_init;
  orb ->
    register_value_factory(javax::ejb::RemoveException::_OB_id(),
      factory);
  factory -> _remove_ref();

  // Perform the work
  run(orb, argv[1]);

} catch(const CORBA::Exception& ex) {
  // Handle any CORBA related exceptions
  cerr << ex._to_string() << endl;
  exit_code = 1;
}

  // Release any ORB resources
  if (!CORBA::is_nil(orb)) {
    try {
      orb -> destroy();
    } catch(const CORBA::Exception& ex) {
      cerr << ex._to_string() << endl;
      exit_code = 1;
    }
  }

  return exit_code;
}
  7. Use your C++ compiler to compile all of the C++ files, including the Client.cpp file, to create a Client executable. Such tools vary widely across platforms, so consult your product documentation for instructions.

    Part IV: Deploy the Enterprise JavaBean component

  8. Deploy the enterprise bean using your favorite application server. The following steps describe how to deploy the LoggerEJB component using the Java EE Reference Implementation (RI).
    1. Start the RI application from a terminal window or command prompt by typing:
         $JAVA_EE_HOME/bin/java_ee -verbose
    2. When the Java EE RI indicates "Java EE server startup complete", run the deployment tool from another terminal window or command prompt by typing:
         $JAVA_EE_HOME/bin/deploytool
    3. From the deployment tool, select File -> New -> Application.
    4. In the Application File Name field, enter Logger.ear to indicate in which file to create the application.
    5. In the Application Display Name field, enter Logger
    6. Select OK to save the settings and close this dialog window.
    7. From the deployment tool, select File -> New -> Enterprise Bean.
    8. Select Next if you get the Introduction screen. If not, continue.
    9. In the New EnterpriseBean Wizard, select Edit in the Contents box.
    10. Expand the Available Files list, and add the following four .class files from our ejbinterop package: Logger.class , LoggerHome.class , LoggerEJB.class , LogMessage.class . Select OK, then Next.
    11. Select Stateless Session Bean Type.
    12. Select ejbinterop.LoggerEJB for the Enterprise Bean Class .
    13. Select ejbinterop.LoggerHome for the Remote Home Interface .
    14. Select ejbinterop.Logger for the Remote Interface .
    15. Select the Next button until you get to the Security Settings page.
    16. Select the Deployment Settings button.
    17. Select Support Client Choice .
    18. Select OK to save the settings and close this dialog window.
    19. Select Finish.
    20. From the deployment tool, select, Tools -> Deploy.
    21. If running the Java RMI-IIOP client only, select Return Client JAR.
    22. Select Next.
    23. Enter ejbinterop/logger in the JNDI Name for our LoggerEJB field.
    24. Select Finish.
    25. Select File -> Exit to exit the deploytool.

    Now, the Logger application with our LoggerEJB components are deployed and ready to receive messages.

    Part V: Run the client executable

  9. Run the client executable. One way you can run the client executable is to enter the following URL in a terminal window from the directory containing the executable client file:
    Client corbaname:iiop:1.2@localhost:1050#ejbinterop/logger

    In this URL,

    • Client is the name of the application to run.
    • corbaname specifies that we will resolve a stringified name from a specific naming context.
    • iiop:1.2 tells the ORB to use the IIOP protocol and GIOP 1.2.
    • The host machine on which to find the reference is localhost, the local machine. To expand this example to run on two machines, enter the IP address or host name of the machine on which the server is running instead of localhost.
    • 1050 is the port on which the naming service is listening for requests. By default in the Java EE RI, the default port the naming service listens on is port 1050. The portion of the reference up to this point at the hash mark (Client corbaname:iiop:1.2@localhost:1050 ) is the URL that returns the root naming context.
    • ejbinterop/logger is the name to resolve in the naming context.

    If you are using the Java EE Reference Implementation, you should see a message similar to the following printed on the application server:

Sep 21, 2001 3:33:07 PM PDT: Message from a C++ client ejbinterop/
logger is the name to be resolved from the Naming Service.

    Part VI: Stop the Java EE Server

  10. Stop the Java EE server. To stop the server, enter this command in a terminal window or command prompt.
    $JAVA_EE_HOME/bin/java_ee -stop

    Procedures for stopping running processes vary among operating systems, so if you are running a different server, consult your system documentation for details.

Creating a Java RMI-IIOP client application

Using the same example, we can easily develop a Java RMI-IIOP client that connects to an enterprise bean. The differences from the example using a C++ client are:

  • In your client CLASSPATH, you must include the location of the client JAR file created by the Java EE application server running the desired enterprise bean. That JAR file contains the necessary client stubs.
  • When deploying the application using the Java EE RI, check the box Return Client Jar in the Deploytool on the first page of the Deploy screen.

The following code is the Java RMI-IIOP version of a client for our LoggerEJB component. Follow the same steps as those presented for the C++ client example. When running the client, use the same URL as in the C++ example.

//Code Example: LogClient.java
package ejbinterop;

import java.rmi.RemoteException;
import javax.rmi.*;
import java.io.*;
import javax.naming.*;
import javax.ejb.*;

/**
 * Simple Java RMI-IIOP client that uses an EJB component.
 */
public class LogClient
{
    /**
     * Given a corbaname URL for a LoggerHome,
     * log a simple String message on the server.
     */
    public static void run(String loggerHomeURL)
        throws CreateException, RemoveException,
               RemoteException, NamingException
    {
        System.out.println("Looking for: " + loggerHomeURL);

        // Create an InitialContext. This will use the
        // CosNaming provider we will specify at runtime.
        InitialContext ic = new InitialContext();

        // Lookup the LoggerHome in the naming context
        // pointed to by the corbaname URL
        Object homeObj = ic.lookup(loggerHomeURL);

        // Perform a safe downcast
        LoggerHome home
            = (LoggerHome)PortableRemoteObject.narrow(homeObj,
        LoggerHome.class);

        // Create a Logger EJB reference
        Logger logger = home.create();

        System.out.println("Logging...");

        // Log our message
        logger.logString("Message from a Java RMI-IIOP client");

        // Tell the application server we won't use this
        // EJB reference anymore
        logger.remove();

        System.out.println("Done");
    }

    /**
     * Simple main method to check arguments and handle
     * exceptions.
     */
    public static void main(String args[])
    {
        try {

            if (args.length != 1) {
                System.out.println("Args: corbaname URL of LoggerHome");
                System.exit(1);
            }

            LogClient.run(args[0]);

        } catch (Throwable t) {
            t.printStackTrace();
            System.exit(1);
        }
    }
}

Running the application with the Java RMI-IIOP client

When running the example application with a Java RMI-IIOP client instead of a C++ client, follow these steps:

  1. Compile the .java files in the ejbinterop / directory with the following command:
    javac -classpath $JAVA_EE_HOME/lib/java_ee.jar:<ejbinterop_directory> *.java
  2. Deploy the Enterprise JavaBean component as described in Deploy the Enterprise JavaBean component. Remember to select Return Client JAR on the Tools -> Deploy page when running a Java RMI-IIOP client application. The commands in the Deployment topic instruct you to start the Java EE RI or other application server.
  3. Run the client application using a command similar to the following:
    java -classpath $JAVA_EE_HOME/lib/java_ee.jar:
<path to LoggerClient.jar>/LoggerClient.jar:
<directory_above_ejbinterop>:<ejbinterop_directory>
ejbinterop.LogClient
corbaname:iiop:1.2@localhost:1050#ejbinterop/logger

    In the window in which the Java EE RI is running, you will see this:

    Jan 31, 2002 2:27:47 PM PST: Message from a Java RMI-IIOP client

    In the window from where the client is run, you will see this:

    Looking for: corbaname:iiop:1.2@localhost:1050#ejbinterop/logger
Logging...
Done
  4. Stop the Java EE server.

Beyond the Basic Application

This section contains the following information:

  • Where to go from here
  • Tips for complex interfaces
  • Links to similar examples

Where to go from here

To enhance the application you could:

  • Develop the example to use valuetypes.

  • To do this, remove the -noValueMethods switch when you run rmic . Rerun your IDL to C++ language mapping compiler to verify that it supports the valuetypes that have been generated.

  • Add another method to Logger that actually takes a LogMessage .

Tips for complex interfaces

The interfaces are key to the communication between clients and servers speaking different languages. To increase the probability of success in this area, consider the following suggestions:

  • Avoid using complex Java classes, such as collections in java.util , for method parameters or return types.

  • After these types are mapped to IDL, you will be forced to implement them in your client programming language. In addition, since Java Object Serialization and RMI-IIOP APIs allow the wire format and internal representation of classes to evolve over time, your CORBA client applications may be incompatible across Java Platform, Standard Edition (Java SE) implementations or versions.

  • Start with IDL.

  • You may want complex data structures in your return types or method parameters. In this case, try starting with IDL. Define data structures and even exceptions in IDL, and then use them in your EJB interfaces. This will prevent artifacts of the reverse mapping from creeping into your CORBA interfaces.

    For instance, try defining the LogMessage class in IDL initially, and then using the resulting class of a Java language to IDL compilation as a method parameter in the Logger EJB component.

  • Avoid overloading in EJB interfaces.

  • CORBA IDL does not support method overloading, and the Java language to IDL mapping specification handles this by creating IDL method definitions that combine the method name with all its IDL parameter types. This leads to very unfriendly method names for developers using languages other than the Java programming language.

  • Consider using bridges.

  • If the available options are still too limited or impact the code you wish to write, consider using a server-side bridge. You can read more about constructing such bridges from the sites listed in the links section.

Links to similar examples

Several vendors implementing Java EE technology have excellent examples and tips for integrating CORBA and Enterprise JavaBeans technology. For example, see the EJB-to-CORBA/Java Simpapp Sample Application.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Getting Started Using RMI-IIOP

Documentation Contents

Tutorial: Getting Started Using RMI-IIOP

This tutorial shows you the steps to follow to create a distributed version of the classic "Hello World" program using Java Remote Method Invocation (RMI) over Internet Inter-ORB Protocol (IIOP). RMI-IIOP adds CORBA (Common Object Request Broker Architecture) capability to Java RMI, providing standards-based interoperability and connectivity to many other programming languages and platforms. RMI-IIOP enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IIOP defined by the Object Management Group. Runtime components include a Java ORB for distributed computing using IIOP communication.

RMI-IIOP is for Java programmers who want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJBs is RMI-based.

Other options for creating distributed applications are:

  • Java Interface Definition Language (IDL)

    Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

  • Java Remote Method Invocation (RMI).

    The Java RMI system allows an object running in one Java Virtual Machine (VM) to invoke methods on an object running in another Java VM. RMI provides for remote communication between programs written in the Java programming language via the Java Remote Method Protocol (JRMP).

Tutorial: The Hello World Application

The distributed Hello World example uses a client application to make a remote method call via IIOP to a server running on the host from which the client was downloaded. When the client runs, "Hello from MARS!" is displayed.

This tutorial is organized as follows:

  1. The steps to write the source files
  2. The steps to compile the example
  3. The steps to run the example

step icon Each step in the tutorial is indicated by this symbol.

Write or Download the Source Files

There are three tasks to complete in this section:

  1. Define the functions of the remote class as an interface written in the Java programming language
  2. Write the implementation class
  3. Write the server class
  4. Write a client program that uses the remote service
The source files used in this tutorial are:
  • HelloInterface.java - a remote interface
  • HelloImpl.java - a remote object implementation that implements HelloInterface
  • HelloServer.java - an RMI server that creates an instance of the remote object implementation and binds that instance to a name in the Naming Service
  • HelloClient.java - a client application that invokes the remote method, sayHello()

Follow the steps below to create the source files or download and unzip HelloRMIIIOP.zip.

Define the functions of the remote class as an interface written in the Java programming language

In the Java programming language, a remote object is an instance of a class that implements a Remote interface. Your remote interface will declare each of the methods that you would like to call from other machines. Remote interfaces have the following characteristics:
  • The remote interface must be declared public. Otherwise, a client will get an error when attempting to load a remote object that implements the remote interface, unless that client is in the same package as the remote interface.
  • The remote interface extends the java.rmi.Remote interface.
  • Each method must declare java.rmi.RemoteException (or a superclass of RemoteException) in its throws clause, in addition to any application-specific exceptions.
  • The data type of any remote object that is passed as an argument or return value (either directly or embedded within a local object) must be declared as the remote interface type (for example, HelloInterface) not the implementation class (HelloImpl).

For this example, create all of the source files in the same directory, for example, $HOME/mysrc/helloWorld.

step icon Create the file HelloInterface.java. The following code is the interface definition for the remote interface, HelloInterface, which contains just one method, sayHello:

//HelloInterface.java
import java.rmi.Remote;

public interface HelloInterface extends java.rmi.Remote {
   public void sayHello( String from ) throws java.rmi.RemoteException;
}
Because remote method invocations can fail in very different ways from local method invocations (due to network-related communication problems and server problems), remote methods will report communication failures by throwing a java.rmi.RemoteException.

Write The Implementation Class

At a minimum, a remote object implementation class, HelloImpl.java must:

  • Declare that it implements at least one remote interface
  • Define the constructor for the remote object
  • Provide implementations for the methods that can be invoked remotely

step icon Create the file HelloImpl.java. The code for this file follows. An explanation of each of the preceding steps follows the source code:

//HelloImpl.java
import javax.rmi.PortableRemoteObject;

public class HelloImpl extends PortableRemoteObject implements HelloInterface {
   public HelloImpl() throws java.rmi.RemoteException {
       super();     // invoke rmi linking and remote object initialization
   }

   public void sayHello( String from ) throws java.rmi.RemoteException {
       System.out.println( "Hello from " + from + "!!" );
       System.out.flush();
   }
}

Implement a remote interface

In the Java programming language, when a class declares that it implements an interface, a contract is formed between the class and the compiler. By entering into this contract, the class is promising that it will provide method bodies, or definitions, for each of the method signatures declared in that interface. Interface methods are implicitly public and abstract, so if the implementation class doesn't fulfill its contract, it becomes by definition an abstract class, and the compiler will point out this fact if the class was not declared abstract.

The implementation class in this example is HelloImpl. The implementation class declares which remote interface(s) it is implementing. Here is the HelloImpl class declaration:

  public class HelloImpl extends PortableRemoteObject
    implements HelloInterface{
As a convenience, the implementation class can extend a remote class, which in this example is javax.rmi.PortableRemoteObject. By extending PortableRemoteObject, the HelloImpl class can be used to create a remote object that uses IIOP-based transport for communication.

Define the constructor for the remote object

The constructor for a remote class provides the same functionality as the constructor for a non-remote class: it initializes the variables of each newly created instance of the class, and returns an instance of the class to the program which called the constructor.

In addition, the remote object instance will need to be "exported". Exporting a remote object makes it available to accept incoming remote method requests, by listening for incoming calls to the remote object on an anonymous port. When you extend javax.rmi.PortableRemoteObject, your class will be exported automatically upon creation.

Because the object export could potentially throw a java.rmi.RemoteException, you must define a constructor that throws a RemoteException, even if the constructor does nothing else. If you forget the constructor, javac will produce the following error message:

        HelloImpl.java:3: unreported exception java.rmi.RemoteException; must be
        caught or declared to be thrown.

        public class HelloImpl extends PortableRemoteObject implements HelloInterface{
               ^
        1 error
To review: The implementation class for a remote object needs to:
  • Implement a remote interface
  • Export the object so that it can accept incoming remote method calls
  • Declare its constructor(s) to throw at least a java.rmi.RemoteException
Here is the constructor for the HelloImpl class:
  public HelloImpl() throws java.rmi.RemoteException {
    super();
  }
Note the following:
  • The super method call invokes the no-argument constructor of javax.rmi.PortableRemoteObject, which exports the remote object.
  • The constructor must throw java.rmi.RemoteException, because RMI's attempt to export a remote object during construction might fail if communication resources are not available.

Although the call to the superclass's no-argument constructor, super(), occurs by default (even if omitted), it is included in this example to make clear the fact that the superclass will be constructed before the class.

Provide an implementation for each remote method

The implementation class for a remote object contains the code that implements each of the remote methods specified in the remote interface. For example, here is the implementation for the sayHello() method, which returns the string "Hello from MARS!!" to the caller:
   public void sayHello( String from ) throws java.rmi.RemoteException {
       System.out.println( "Hello from " + from + "!!");
       System.out.flush();
   }
Arguments to, or return values from, remote methods can be any data type for the Java platform, including objects, as long as those objects implement the interface java.io.Serializable. Most of the core classes in java.lang and java.util implement the Serializable interface. In RMI:
  • By default, local objects are passed by copy, which means that all data members (or fields) of an object are copied, except those marked as static or transient. Please refer to the Java Object Serialization Specification for information on how to alter the default serialization behavior.
  • Remote objects are passed by reference. A reference to a remote object is actually a reference to a stub, which is a client-side proxy for the remote object. We'll create them later in this tutorial in the section: Use rmic to generate stubs and skeletons.

Write The Server Class

A server class is the class which has a main method that creates an instance of the remote object implementation, and binds that instance to a name in the Naming Service. The class that contains this main method could be the implementation class itself, or another class entirely.

In this example, the main method is part of HelloServer.java, which does the following:

  • Creates an instance of the servant
  • Publishes the object reference

step icon Create the file HelloServer.java. The source code for this file follows. An explanation of each of the preceding steps follows the source code:

//HelloServer.java
import javax.naming.InitialContext;
import javax.naming.Context;

public class HelloServer {
    public static void main(String[] args) {
        try {
            // Step 1: Instantiate the Hello servant
            HelloImpl helloRef = new HelloImpl();

            // Step 2: Publish the reference in the Naming Service
            // using JNDI API
            Context initialNamingContext = new InitialContext();
            initialNamingContext.rebind("HelloService", helloRef );

            System.out.println("Hello Server: Ready...");

         } catch (Exception e) {
            System.out.println("Trouble: " + e);
            e.printStackTrace();
         }
     }
}

Create an instance of a remote object

The main method of the server needs to create an instance of the remote object implementation, or Servant. For example:
    HelloImpl helloRef = new HelloImpl();
The constructor exports the remote object, which means that once created, the remote object is ready to accept incoming calls.

Publish the object reference

For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

Once a remote object is registered on the server, callers can look up the object by name (using a naming service), obtain a remote object reference, and then remotely invoke methods on the object. In this example, we use the Naming Service that is part of the Object Request Broker Daemon (orbd for Solaris, Linux, or Mac OS X or Windows).

For example, the following code binds the name "HelloService" to a reference for the remote object:

            // Step 2: Publish the reference in the Naming Service
            // using JNDI API
            Context initialNamingContext = new InitialContext();
            initialNamingContext.rebind("HelloService", helloRef );

Note the following about the arguments to the rebind method call:

  • The first argument, "HelloService", is a java.lang.String, representing the name of the remote object to bind
  • The second argument, helloRef is the object id of the remote object to bind

Write a client program that uses the remote service

The client application in this example remotely invokes the sayHello method in order to get the string "Hello from MARS!!" to display when the client application runs.

step icon Create the file HelloClient.java. Here is the source code for the client application:

//HelloClient.java
import java.rmi.RemoteException;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import javax.rmi.*;
import java.util.Vector;
import javax.naming.NamingException;
import javax.naming.InitialContext;
import javax.naming.Context;

public class HelloClient {

    public static void  main( String args[] ) {
        Context ic;
        Object objref;
        HelloInterface hi;

        try {
            ic = new InitialContext();

        // STEP 1: Get the Object reference from the Name Service
        // using JNDI call.
            objref = ic.lookup("HelloService");
            System.out.println("Client: Obtained a ref. to Hello server.");

        // STEP 2: Narrow the object reference to the concrete type and
        // invoke the method.
            hi = (HelloInterface) PortableRemoteObject.narrow(
                objref, HelloInterface.class);
            hi.sayHello( " MARS " );

        } catch( Exception e ) {
            System.err.println( "Exception " + e + "Caught" );
            e.printStackTrace( );
            return;
        }
    }
}

First, the client application gets a reference to the remote object implementation (advertised as "HelloService") from the Naming Service using Java Naming and Directory Interface (JNDI) calls. Like the Naming.rebind method, the Naming.lookup method takes java.lang.String value representing the name of the object to look up. You supply Naming.lookup() the name of the object you want to look up, and it returns the object bound to that name. Naming.lookup() returns the stub for the remote implementation of the Hello interface to its caller (HelloClient).

  • The client application invokes the remote sayHello() method on the server's remote object, causing the string "Hello from MARS!!" to be displayed on the command line.

Compile the Example

The source code for this example is now complete and the directory contains four files:
  • HelloInterface.java contains the source code for the remote interface
  • HelloImpl.java contains the source code for the remote object implementation
  • HelloServer.java contains the source code for the server
  • HelloClient.java contains the source code for the client application
In this section, you compile the remote object implementation file, HelloImpl.java, in order to create the .class files needed to run rmic. You then run the rmic compiler to create stubs and skeletons. A stub is a client-side proxy for a remote object which forwards RMI-IIOP calls to the server-side dispatcher, which in turn forwards the call to the actual remote object implementation. The last task is to compile the remaining .java source files to create .class files.

The following tasks will be completed in this section:

  1. Compile the remote object implementation
  2. Use rmic to generate stubs and skeletons
  3. Compile the source files

Compile the remote object implementation

To create stub and skeleton files, the rmic compiler must be run on the fully-qualified package names of compiled class files that contain remote object implementations. In this example, the file that contains the remote object implementations is HelloImpl.java. To generate the stubs and skeletons:

step icon Compile HelloImpl.java, as follows:

    javac -d . -classpath . HelloImpl.java

The "-d ." option indicates that the generated files should be placed in the directory from which you are running the compiler. The "-classpath ." option indicates that files on which HelloImpl.java is dependent can be found in this directory.

Use rmic to generate skeletons and stubs

To create CORBA-compatible stub and skeleton files, run the rmic compiler with the -iiop option. The rmic -iiop command takes one or more class names as an argument and produces class files of the form _HelloImpl_Tie.class and _HelloInterface_Stub.class. The remote implementation file, HelloImpl.class, is the class name to pass in this example.

For an explanation of rmic options, you can refer to the Solaris, Linux, or Mac OS X rmic man page or the Windows rmic man page.

step icon To create the stub and skeleton for the HelloImpl remote object implementation, run rmic like this:

    rmic -iiop HelloImpl

The preceding command creates the following files:

  • _HelloInterface_Stub.class - the client stub
  • _HelloImpl_Tie.class - the server skeleton

Compile the source files

step icon Compile the source files as follows:

    javac -d . -classpath . HelloInterface.java HelloServer.java HelloClient.java

This command creates the class files HelloInterface.class, HelloServer.class, and HelloClient.class. These are the remote interface, the server, and the client application respectively. For an explanation of javac options, you can refer to the Solaris, Linux, or Mac OS X javac man page or the Windows javac man page.

Run the Example

The following tasks will be completed in this section:
  1. Start the Naming Service
  2. Start the server
  3. Run the client application

Start the Naming Service

For this example, we will use the Object Request Broker Daemon, orbd, which includes both a Transient and a Persistent Naming Service, and is available with every download of the JDK.

For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object.

step icon Start the Naming Service by running orbd from the command line.

For this example, on the Solaris operating system:

    orbd -ORBInitialPort 1050&

or, on the Windows operating system:

    start orbd -ORBInitialPort 1050

You must specify a port on which to run orbd. For this example the port of 1050 is chosen because in the Solaris operating environment, a user must become root to start a process on a port under 1024. For more on the orbd tool, you can refer to the orbd man page (Solaris, Linux, or Mac OS X or Windows).

You must stop and restart the server any time you modify a remote interface or use modified/additional remote interfaces in a remote object implementation. Otherwise, the type of the object reference bound in the Naming Service will not match the modified class.

Start the server

Open another terminal window and change to the directory containing the source files for this example. The command for running the client has been spread out below to make it easier to read, but should be typed without returns between the lines. The following command shows how to start the HelloServer server. If you used a port other than 1050 or a host other than localhost when starting the orbd tool, replace those values in the command below with the actual values used to start orbd.

step icon Start the Hello server, as follows:

    java
      -classpath .
      -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      -Djava.naming.provider.url=iiop://localhost:1050
      HelloServer

For an explanation of java options, you can refer to the Solaris, Linux, or Mac OS X java man page or the Windows java man page.

The output should look like this:

Hello Server: Ready ...

Run the client application

Once the Naming Service and server are running, the client application can be run. From a new terminal window, go to the source code directory, and run the client application from the command line, as shown below. The command for running the client has been spread out below to make it easier to read, but should be typed without returns between the lines. If you used a port other than 1050 or a host other than localhost when starting the orbd tool, replace those values in the command below with the actual values used to start orbd.

step icon Start the client application, as follows:

    java
      -classpath .
      -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      -Djava.naming.provider.url=iiop://localhost:1050
      HelloClient
After running the client application, you will see output similar to the following on your display in the client window:
Client: Obtained a ref. to Hello server.

The following message will display in the server window:

Hello from  MARS

ORBD and the Hello server will continue to run until they are explicitly stopped. On Solaris, Linux, or Mac OS X, you can stop these processes using the pkill orbd and pkill HelloServer commands from a terminal window. On Windows, you can type Ctrl+C in a prompt window to kill the process.

This completes the basic RMI-IIOP tutorial. If you are ready to move on to more complicated applications, here are some sources that may help:

  • EJB clients interact with the Java EE EJB tier using the RMI-IIOP protocol. For more information on using RMI-IIOP in this way, see the Java Platform, Enterprise Edition Blueprints or the Java EE Reference documentation.
  • Another RMI-IIOP tutorial includes support for the Portable Object Adapter (POA). POA support for RMI-IIOP is non-standard.
  • The Java IDL tutorial includes an example for running the client and server on different machines. The concepts of Running the Hello World Example on Two Machines apply to this example as well.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java RMI over IIOP APIs & Developer Guides

Documentation Contents

Java RMI over IIOP

Java Remote Method Invocation over Internet Inter-ORB Protocol technology (RMI-IIOP) is part of the Java Platform, Standard Edition (Java SE). The RMI Programming Model enables the programming of CORBA servers and applications via the rmi API. You can choose to work completely within the Java programming language using the Java Remote Method Protocol (JRMP) as the transport, or work with other CORBA-compliant programming languages using the Internet InterORB Protocol (IIOP).

RMI-IIOP utilizes the Java CORBA Object Request Broker (ORB) and IIOP, so you can write all of your code in the Java programming language, and use the rmic compiler to generate the code necessary for connecting your applications via the Internet InterORB Protocol (IIOP) to others written in any CORBA-compliant language. To work with CORBA applications in other languages, IDL can be generated from Java programming language interfaces using the rmic compiler with the -idl option. To generate IIOP stubs and tie classes, use the rmic compiler with the -iiop option.

Overview

  • Overview - An overview of when you should use RMI-IIOP and the options for distributed application development.

API Specification

  • org.omg.CORBA
  • org.omg.PortableServer
  • org.omg.CosNaming
  • javax.rmi.CORBA
  • javax.rmi (with a link to class PortableRemoteObject)

Tutorials and Programmer's Guides

  • Tutorial - Getting Started Using Java RMI over IIOP.
  • Example - RMI over IIOP with a POA server-side model.
  • Java RMI-IIOP Programmer's Guide.
  • Enterprise JavaBeans Components and CORBA Clients - A Developer's Guide.
  • Java IDL and Java RMI-IIOP Technologies: Using Portable Interceptors - For advanced CORBA developers.

API Enhancements

  • API Enhancements in Java SE 5.0 - Changes in CORBA (Java IDL, RMI-IIOP) Features.

Tools

  • Java IDL and RMI-IIOP Tools

More Information

See the Java RMI over IIOP Technology Home Page.

The Java IDL technology pages include a lot of information that is useful to developers using Java RMI-IIOP technology.

The Object Management Group is the official source of information for all CORBA and IIOP related information. The CORBA 2.3.1 Specification is available electronically from formal/99-10-07. The URLs for the CORBA specifications may change. If the link does not work, visit http://www.omg.org and search for the specification.

For more information on which specifications are implemented in this release of the Java platform, see the compliance document.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


POA Model

Documentation Contents

Getting Started Using RMI-IIOP:
Example Using POA-based server-side model

This tutorial shows you the steps to follow to create a distributed version of the classic "Hello World" program using Java Remote Method Invocation (RMI) over Internet Inter-ORB Protocol (IIOP). RMI-IIOP adds CORBA (Common Object Request Broker Architecture) capability to Java connectivity to many other programming languages and platforms. RMI-IIOP enables distributed Web-enabled Java remote Management Group. Runtime components include a Java ORB for distributed computing using IIOP communication.

RMI-IIOP is for Java programmers who want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJBs is RMI-based.

Another option for creating distributed applications is Java IDL. Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

Tutorial: The Hello World Application

The distributed Hello World example uses a client application to make a remote method call via IIOP to a server, running on the host from which the client was downloaded. When the client runs, "Hello World!" is displayed.

This tutorial is organized as follows:

  1. The steps to write the source files
  2. The steps to compile the class files
  3. The steps to start the Naming Service, server, and client

Write or Download the Source Files

There are three tasks to complete in this section:

  1. Define the functions of the remote class as an interface written in the Java programming language
  2. Write the implementation class
  3. Write the server class
  4. Write a client program that uses the remote service
The source files created in this tutorial (and which can be downloaded here) are:
  • HelloInterface.java - a remote interface
  • HelloImpl.java - a remote object implementation that implements HelloInterface
  • HelloServer.java - an RMI server that creates an instance of the remote object implementation and binds that instance to a name in the Naming Service
  • HelloClient.java - a client application that invokes the remote method, sayHello()

Define the functions of the remote class as an interface written in the Java programming language

In the Java programming language, a remote object is an instance of a class that implements a Remote interface. Your remote interface will declare each of the methods that you would like to call from other machines. Remote interfaces have the following characteristics:
  • The remote interface must be declared public. Otherwise, a client will get an error when attempting to load a remote object that implements the remote interface, unless that client is in the same package as the remote interface.
  • The remote interface extends the java.rmi.Remote interface.
  • Each method must declare java.rmi.RemoteException (or a superclass of RemoteException) in its throws clause, in addition to any application-specific exceptions.
  • The data type of any remote object that is passed as an argument or return value (either directly or embedded within a local object) must be declared as the remote interface type (for example, HelloInterface) not the implementation class (HelloImpl).

For this example, create all of the source files in the same directory, for example, $HOME/mysrc/RMIHelloPOA. Here is the interface definition for the remote interface, HelloInterface. The interface contains just one method, sayHello:

//HelloInterface.java
import java.rmi.Remote;

public interface HelloInterface extends java.rmi.Remote {
  public void sayHello() throws java.rmi.RemoteException;
}
Because remote method invocations can fail in very different ways from local method invocations (due to network-related communication problems and server problems), remote methods will report communication failures by throwing a java.rmi.RemoteException.

Write The Implementation Class

At a minimum, a remote object implementation class, HelloImpl.java must:

  • Declare that it implements at least one remote interface
  • Define the constructor for the remote object
  • Provide implementations for the methods that can be invoked remotely
An explanation of each of the preceding steps follows the source for HelloImpl.java:
//HelloImpl.java
import javax.rmi.PortableRemoteObject;

public class HelloImpl extends PortableRemoteObject implements HelloInterface {
  public HelloImpl() throws java.rmi.RemoteException {
    super();     // invoke rmi linking and remote object initialization
  }

  public void sayHello() throws java.rmi.RemoteException {
    System.out.println( "It works!  Hello World!!" );
  }
}

Implement a remote interface

In the Java programming language, when a class declares that it implements an interface, a contract is formed between the class and the compiler. By entering into this contract, the class is promising that it will provide method bodies, or definitions, for each of the method signatures declared in that interface. Interface methods are implicitly public and abstract, so if the implementation class doesn't fulfill its contract, it becomes by definition an abstract class, and the compiler will point out this fact if the class was not declared abstract.

The implementation class in this example is HelloImpl. The implementation class declares which remote interface(s) it is implementing. Here is the HelloImpl class declaration:

  public class HelloImpl extends PortableRemoteObject
    implements HelloInterface{
As a convenience, the implementation class can extend a remote class, which in this example is javax.rmi.PortableRemoteObject. By extending PortableRemoteObject, the HelloImpl class can be used to create a remote object that uses IIOP-based transport for communication.

Define the constructor for the remote object

The constructor for a remote class provides the same functionality as the constructor for a non-remote class: it initializes the variables of each newly created instance of the class, and returns an instance of the class to the program which called the constructor.

In addition, the remote object instance will need to be "exported". Exporting a remote object makes it available to accept incoming remote method requests, by listening for incoming calls to the remote object on an anonymous port. When you extend javax.rmi.PortableRemoteObject, your class will be exported automatically upon creation.

Because the object export could potentially throw a java.rmi.RemoteException, you must define a constructor that throws a RemoteException, even if the constructor does nothing else. If you forget the constructor, javac will produce the following error message:

        HelloImpl.java:3: unreported exception java.rmi.RemoteException; must be
        caught or declared to be thrown.

        public class HelloImpl extends PortableRemoteObject implements HelloInterface{
               ^
        1 error
To review: The implementation class for a remote object needs to:
  • Implement a remote interface
  • Export the object so that it can accept incoming remote method calls
  • Declare its constructor(s) to throw at least a java.rmi.RemoteException
Here is the constructor for the HelloImpl class:
  public HelloImpl() throws java.rmi.RemoteException {
    super();
  }
Note the following:
  • The super method call invokes the no-argument constructor of javax.rmi.PortableRemoteObject, which exports the remote object.
  • The constructor must throw java.rmi.RemoteException, because RMI's attempt to export a remote object during construction might fail if communication resources are not available.

java.rmi.RemoteException is a checked exception, not a runtime exception.

Although the call to the superclass's no-argument constructor, super(), occurs by default (even if omitted), it is included in this example to make clear the fact that the superclass will be constructed before the class.

Provide an implementation for each remote method

The implementation class for a remote object contains the code that implements each of the remote methods specified in the remote interface. For example, here is the implementation for the sayHello() method, which returns the string "It works! Hello World!!" to the caller:
  public void sayHello() throws java.rmi.RemoteException {
    System.out.println( "It works!  Hello World!!" );
  }
Arguments to, or return values from, remote methods can be any data type for the Java platform, including objects, as long as those objects implement the interface java.io.Serializable. Most of the core classes in java.lang and java.util implement the Serializable interface. In RMI:
  • By default, local objects are passed by copy, which means that all data members (or fields) of an object are copied, except those marked as static or transient.
  • Remote objects are passed by reference. A reference to a remote object is actually a reference to a stub, which is a client-side proxy for the remote object. We'll create stubs later in this tutorial in the section: Use rmic to generate stubs and skeletons.

Write The Server Class

A server class is the class which has a main method that creates an instance of the remote object implementation, and binds that instance to a name in the Naming Service. The class that contains this main method could be the implementation class itself, or another class entirely.

In this example, the main method is part of HelloServer.java, which does the following:

  • Creates a Portable Object Adapter (POA) with the appropriate policies
  • Activates the POA Managers
  • Creates an instance of the servant and activates the Tie, creates an instance of a remote object
  • Publishes the object reference
  • Prepares to accept requests from the client
An explanation of each of the preceding steps follows the source for HelloServer.java:
//HelloServer.java
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.rmi.PortableRemoteObject ;
//Please note that internal Oracle APIs
//may change in future releases.
import com.sun.corba.se.internal.POA.POAORB;
import org.omg.PortableServer.*;
import java.util.*;
import org.omg.CORBA.*;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;

public class HelloServer {
  public HelloServer(String[] args) {
    try {
      Properties p = System.getProperties();
      // add runtime properties here
      //Please note that the name of the servertool
      //class may change in future releases.
      p.put("org.omg.CORBA.ORBClass",
          "com.sun.corba.se.internal.POA.POAORB");
      p.put("org.omg.CORBA.ORBSingletonClass",
          "com.sun.corba.se.internal.corba.ORBSingleton");

      ORB orb = ORB.init( args, p );

      POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");

      // STEP 1: Create a POA with the appropriate policies
      Policy[] tpolicy = new Policy[3];
      tpolicy[0] = rootPOA.create_lifespan_policy(
        LifespanPolicyValue.TRANSIENT );
      tpolicy[1] = rootPOA.create_request_processing_policy(
        RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY );
      tpolicy[2] = rootPOA.create_servant_retention_policy(
        ServantRetentionPolicyValue.RETAIN);
      POA tPOA = rootPOA.create_POA("MyTransientPOA", null, tpolicy);

      // STEP 2: Activate the POA Manager, otherwise all calls to the
      // servant hang because, by default, POAManager will be in the
      // HOLD state.
      tPOA.the_POAManager().activate();

      // STEP 3: Instantiate the Servant and activate the Tie, If the
      // POA policy is USE_ACTIVE_OBJECT_MAP_ONLY
      HelloImpl helloImpl = new HelloImpl();
      _HelloImpl_Tie tie = (_HelloImpl_Tie)Util.getTie( helloImpl );
      String helloId = "hello";
      byte[] id = helloId.getBytes();
      tPOA.activate_object_with_id( id, tie );

      // STEP 4: Publish the object reference using the same object id
      // used to activate the Tie object.
      Context initialNamingContext = new InitialContext();
      initialNamingContext.rebind("HelloService",
        tPOA.create_reference_with_id(id,
          tie._all_interfaces(tPOA,id)[0]) );
      System.out.println("Hello Server: Ready...");

      // STEP 5: Get ready to accept requests from the client
      orb.run();
    }
      catch (Exception e) {
        System.out.println("Problem running HelloServer: " + e);
        e.printStackTrace();
      }
  }

  public static void main(String args[]) {
    new HelloServer( args );
  }
}

Create a Portable Object Adapter (POA) with the appropriate policies

The main method of the server first needs to create a Portable Object Adapter (POA) with the appropriate policies. For example:
      Policy[] tpolicy = new Policy[3];
      tpolicy[0] = rootPOA.create_lifespan_policy(
        LifespanPolicyValue.TRANSIENT );
      tpolicy[1] = rootPOA.create_request_processing_policy(
        RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY );
      tpolicy[2] = rootPOA.create_servant_retention_policy(
        ServantRetentionPolicyValue.RETAIN);
      POA tPOA = rootPOA.create_POA("MyTransientPOA", null, tpolicy);

The Portable Object Adaptor (POA) is designed to provide an object adapter that can be used with multiple ORB implementations with a minimum of rewriting needed to deal with different vendors' implementations.

The POA is also intended to allow persistent objects -- at least, from the client's perspective. That is, as far as the client is concerned, these objects are always alive, and maintain data values stored in them, even though physically, the server may have been restarted many times, or the implementation may be provided by many different object implementations.

The POA allows the object implementor a lot more control. Previously, the implementation of the object was responsible only for the code that is executed in response to method requests. Now, additionally, the implementor has more control over the object's identity, state, storage, and lifecycle.

In this example, the policy values include:

  • The LifespanPolicyValue can have the following values:
    • TRANSIENT - The objects implemented in the POA cannot outlive the POA instance in which they are first created.
    • PERSISTENT - The objects implemented in the POA can outlive the process in which they are first created.
  • The RequestProcessingPolicyValue can have the following values:
    • USE_ACTIVE_OBJECT_MAP_ONLY - If the object ID is not found in the Active Object Map, an OBJECT_NOT_EXIST exception is returned to the client. The RETAIN policy is also required.
    • USE_DEFAULT_SERVANT - If the object ID is not found in the Active Object Map or the NON_RETAIN policy is present, and a default servant has been registered with the POA using the set_servant operation, the request is dispatched to the default servant.
    • USE_SERVANT_MANAGER - If the object ID is not found in the Active Object Map or the NON_RETAIN policy is present, and a servant manager has been registered with the POA using the set_servant_manager operation, the servant manager is given the opportunity to locate a servant or raise an exception.
  • The ServantRetentionPolicyValue can have the following values.
    • RETAIN - to indicate that the POA will retain active servants in its Active Object Map. If no ServantRetentionPolicy is specified at POA creation, the default is RETAIN.
    • NON_RETAIN - to indicate Servants are not retained by the POA.

For more information on POA policies, refer to Chapter 11, Portable Object Adapter of the CORBA/IIOP 2.3.1 Specification at http://www.omg.org/cgi-bin/doc?formal/99-10-07

Activate the POA Managers

Each POA object has an associated POAManager object. A POA Manager may be associated with one or more POA objects. A POA Manager encapsulates the processing state of the POAs it is associated with. In this step, the POA Manager is activated. If this step is missing, all calls to the Servant would hang because, by default, the POA Manager will be in the HOLD state.

      tPOA.the_POAManager().activate();

Create an instance of a remote object and activate the Tie

The main method of the server needs to create an instance of the remote object implementation, or Servant. For example:
    HelloImpl helloImpl = new HelloImpl();
The constructor exports the remote object, which means that once created, the remote object is ready to accept incoming calls.

When using RMI-IIOP technology, your implementations use delegation (known as the Tie model) to associate your implementation with the interface. When you create an instance of your implementation, as above, you also need to create a Tie object to associate it with a CORBA interface. The next few lines of code activate the Tie, but only if the POA policy is USE_ACTIVE_OBJECT_MAP_ONLY.

      _HelloImpl_Tie tie = (_HelloImpl_Tie)Util.getTie( helloImpl );
      String helloId = "hello";
      byte[] id = helloId.getBytes();
      tPOA.activate_object_with_id( id, tie );

Publish the object reference using the same object id used to activate the Tie object

For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

Once a remote object is registered on the server, callers can look up the object by name (using a naming service), obtain a remote object reference, and then remotely invoke methods on the object. In this example, we use the Object Request Broken Daemon, orbd (Solaris, Linux, or Mac OS X or Windows), which is a daemon process containing a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager.

For example, the following code binds the name "HelloService" to a reference for the remote object:

      Context initialNamingContext = new InitialContext();
      initialNamingContext.rebind("HelloService",
        tPOA.create_reference_with_id(id,
          tie._all_interfaces(tPOA,id)[0]) );
      System.out.println("Hello Server: Ready...");

Note the following about the arguments to the rebind method call:

  • The first argument, "HelloService", is a java.lang.String, representing the name of the remote object to bind
  • The second argument, tPOA.create_reference_with_id(id, tie._all_interfaces(tPOA,id)[0] is the object id of the remote object to bind

Prepare to accept requests from the client

The following line of code, when called by the main thread, enables the ORB to perform work using the main thread.
      orb.run();

Write a client program that uses the remote service

The client application in this example remotely invokes the sayHello method in order to get the string "Hello World!" to display when the client application runs. Here is the code for the client application:

//HelloClient.java
import java.rmi.RemoteException;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import javax.rmi.*;
import java.util.Vector;
import javax.naming.NamingException;
import javax.naming.InitialContext;
import javax.naming.Context;

public class HelloClient {

  public static void  main( String args[] ) {
    Context ic;
    Object objref;
    HelloInterface hi;

    try {
      ic = new InitialContext();
    } catch (NamingException e) {
        System.out.println("failed to obtain context" + e);
        e.printStackTrace();
        return;
    }

    // STEP 1: Get the Object reference from the Name Service
    // using JNDI call.
    try {
      objref = ic.lookup("HelloService");
      System.out.println("Client: Obtained a ref. to Hello server.");
    } catch (NamingException e) {
        System.out.println("failed to lookup object reference");
        e.printStackTrace();
        return;
    }

    // STEP 2: Narrow the object reference to the concrete type and
    // invoke the method.
    try {
      hi = (HelloInterface) PortableRemoteObject.narrow(
        objref, HelloInterface.class);
      hi.sayHello();
    } catch (ClassCastException e) {
        System.out.println("narrow failed");
        e.printStackTrace();
        return;
      } catch( Exception e ) {
            System.err.println( "Exception " + e + "Caught" );
            e.printStackTrace( );
            return;
        }
  }
}

First, the client application gets a reference to the remote object implementation (advertised as "HelloService") from the Name Service using Java Naming and Directory Interface (JNDI) calls. Like the Naming.rebind method, the Naming.lookup method takes java.lang.String value representing the name of the object to look up. You supply Naming.lookup() the name of the object you want to look up, and it returns the object bound to that name.

  • Naming.lookup() takes care of these tasks:
    • The Name Service returns the _HelloImpl_Stub instance bound to that name
    • The lookup method receives the remote object's (HelloImpl) stub instance and loads the stub class (_HelloImpl_Stub)
    • Naming.lookup returns the stub to its caller (HelloClient)
  • The client application invokes the remote sayHello() method on the server's remote object, causing the string "It works! Hello World!!" to be displayed on the command line.

Compile Class Files

The source code for this example is now complete and the directory contains four files:
  • HelloInterface.java contains the source code for the remote interface
  • HelloImpl.java contains the source code for the remote object implementation
  • HelloServer.java contains the source code for the server
  • HelloClient.java contains the source code for the client application
In this section, you compile the remote object implementation file, HelloImpl.java, in order to create the .class files needed to run rmic. You then run the rmic compiler to create stubs and skeletons. A stub is a client-side proxy for a remote object which forwards RMI-IIOP calls to the server-side dispatcher, which in turn forwards the call to the actual remote object implementation. The last task is to compile the remaining .java source files to create .class files.

The following tasks will be completed in this section:

  1. Compile the remote object implementation
  2. Use rmic to generate stubs and skeletons
  3. Compile the source files

Compile the remote object implementation

To create stub and skeleton files, the rmic compiler must be run on the fully-qualified package names of compiled class files that contain remote object implementations. In this example, the file that contains the remote object implementations is HelloImpl.java. In order to generate the stubs and skeletons, we must first compile HelloImpl.java, as follows:

    javac -d . -classpath . HelloImpl.java

The "-d ." option indicates that the generated files should be placed in the directory from which you are running the compiler. The "-classpath ." option indicates that files on which HelloImpl.java is dependent can be found in this directory.

Use rmic to generate skeletons and stubs

To create CORBA-compatible stub and skeleton files, run the rmic compiler with the -poa -iiop option. The rmic -poa -iiop command takes one or more class names as an argument and produces class files of the form _MyImpl_Tie.class and _MyInterface_Stub.class. The remote implementation file, HelloImpl.class, is the class name to pass in this example.

For an explanation of rmic options, refer to the Solaris, Linux, or Mac OS X rmic man page or the Microsoft Windows rmic man page.

To create the stub and skeleton for the HelloImpl remote object implementation, run rmic like this:

    rmic -poa -iiop HelloImpl

The preceding command creates the following files:

  • _HelloInterface_Stub.class - the client stub
  • _HelloImpl_Tie.class - the server skeleton

Compile the source files

To compile the source files, run the javac command as follows:

    javac -d . -classpath . HelloInterface.java HelloServer.java HelloClient.java

This command creates the class files HelloInterface.class, HelloServer.class, and HelloClient.class. These are the remote interface, the server, and the client application respectively. For an explanation of javac options, you can refer to the Solaris, Linux, or Mac OS X javac man page or the Microsoft Windows javac man page.

Start the Naming Service, server, and client application

The following tasks will be completed in this section:
  1. Start the Naming Service
  2. Start the server
  3. Run the client application

Start the Naming Service

For this example, we will use the Object Request Broker Daemon, orbd, which includes both a Transient and a Persistent Naming Service, and is available with every download of the JDK.

For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object.

To start the Naming Service, run orbd from the command line. This command produces no output and is typically run in the background. For more on the orbd tool, you can refer to the orbd man page (Solaris, Linux, or Mac OS X or Windows).

For this example, on the Solaris operating system:

    orbd -ORBInitialPort 1060&

or, on the Microsoft Windows operating system:

    start orbd -ORBInitialPort 1060

You must specify a port on which to run orbd. For this example the port of 1060 is chosen because in the Solaris operating environment, a user must become root to start a process on a port under 1024.

You must stop and restart the server any time you modify a remote interface or use modified/additional remote interfaces in a remote object implementation. Otherwise, the type of the object reference bound in the Naming Service will not match the modified class.

Start the server

Open another terminal window and change to the directory containing the source files for this example. The command for running the client has been spread out below to make it easier to read, but should be typed without returns between the lines. The following command shows how to start the HelloServer server. Of course, if you used a port other than 1060 or a host other than localhost when starting the orbd tool, replace those values in the command below with the actual values used to start orbd.

    java
      -classpath .
      -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      -Djava.naming.provider.url=iiop://localhost:1060
      HelloServer

For an explanation of java options, you can refer to the Solaris, Linux, or Mac OS X java man page or the Microsoft Windows java man page.

The output should look like this:

Hello Server: Ready ...

Run the client application

Once the Naming Service and server are running, the client application can be run. From a new terminal window, go to the source code directory, and run the client application from the command line, as shown below. The command for running the client has been spread out below to make it easier to read, but should be typed without returns between the lines. Of course, if you used a port other than 1060 or a host other than localhost when starting the orbd tool, replace those values in the command below with the actual values used to start orbd.
    java
      -classpath .
      -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      -Djava.naming.provider.url=iiop://localhost:1060
      HelloClient
After running the client application, you will see output similar to the following in your terminal window or command prompt window:
Client: Obtained a ref. to Hello server.

The server window will return the following message:

It works! Hello World!!

This completes the tutorial. If you are ready to move on to more complicated applications, here are some sources that may help:

  • EJB clients interact with the Java EE EJB tier using the RMI-IIOP protocol. For more information on using RMI-IIOP in this way, see the Java Platform, Enterprise Edition Blueprints or the EJB Tutorials.
  • The Java IDL tutorial includes an example for running the client and server on different machines. The concepts of Running the Hello World Example on Two Machines apply to this example as well.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


RMI-IIOP Programmer's Guide

This document discusses how to write Java Remote Method Invocation (RMI) programs that can access remote objects by using the Internet Inter-ORB Protocol (IIOP). By making your RMI programs conform to a small set of restrictions, your CORBA clients in any language can access RMI-IIOP servers. RMI-IIOP gives you RMI ease-of-use coupled with CORBA/IIOP language interoperability.

What is RMI-IIOP?

RMI

With RMI you can write distributed programs in the Java programming language. RMI is easy to use, you don't need to learn a separate interface definition language (IDL), and you get Java's inherent "write once, run anywhere" benefit. Clients, remote interfaces, and servers are written entirely in Java. RMI uses the Java Remote Method Protocol (JRMP) for remote Java object communication. To get a quick introduction to writing RMI programs, see the RMI Tutorial web page. That document describes writing a simple "Hello World" RMI program.

RMI lacks interoperability with other languages because it does not use CORBA-IIOP as the communication protocol.

IIOP, CORBA, and Java IDL

IIOP is CORBA's communication protocol using TCP/IP as the transport. It specifies a standard for client and server communication. CORBA is a standard distributed object architecture developed by the Object Management Group (OMG). Interfaces to remote objects are described in a platform-neutral interface definition language (IDL). Mappings from IDL to specific programming languages are implemented, binding the language to CORBA/IIOP.

The Java SE CORBA/IIOP implementation is known as Java IDL. Along with the idlj compiler, Java IDL can be used to define, implement, and access CORBA objects from the Java programming language.

The Java IDL web page gives you a good, Java-centric view of CORBA/IIOP programming. To get a quick introduction to writing Java IDL programs, see the Getting Started: Hello World web page.

RMI-IIOP

Previously Java programmers had to choose between RMI and CORBA/IIOP (Java IDL) for distributed programming solutions. Now, by adhering to a few restrictions, RMI server objects can use the IIOP protocol and communicate with CORBA client objects written in any language. This solution is known as RMI-IIOP. RMI-IIOP combines RMI-style ease of use with CORBA cross-language interoperability.

Table of Contents

  • The rmic Compiler
  • The idlj Compiler
  • How to Make RMI Programs Use IIOP
  • Restrictions When Running RMI Programs Over IIOP
  • Other Things You Should Know

The rmic Compiler

The RMI-IIOP software comes with an rmic compiler that can generate IIOP stubs and ties, and emit IDL, in accordance with the Java Language to OMG IDL Language Mapping Specification, in accordance with the compliance statement.

Here are the primary rmic flags that support the CORBA/IIOP functionality:

-iiop -- Generates IIOP stubs/ties.
-iiop -poa -- Generates IIOP stubs/ties that work with a Portable Object Adapter (POA).
-idl -- Generates IDL.

The following options are used in conjunction with the -idl option.

-noValueMethods -- Stops generation of IDL for methods and constructors within IDL valuetypes.
-always -- Forces regeneration even when existing stubs/ties/idl are newer than the input class. Only valid when -iiop and/or -idl flags are present.
-idlModule <fromJavaPackage<.class>> <toIDLModule> -- Specifies IDLEntity package mapping. For example: -idlModule foo.bar my::real::idlmod
-idlFile <fromJavaPackage<.class>> <toIDLFile> -- Specifies IDLEntity file mapping. For example: -idlFile test.pkg.X TEST16.idl

For more detailed information on the rmic compiler, read the rmic documentation.

The -iiop Flag

Using rmic with the -iiop option generates IIOP stub and tie classes instead of Java Remote Method Protocol (JRMP) stub and skeleton classes. A stub class is a local proxy for a remote object. Stub classes are used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. The client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

Stub classes are also generated for abstract interfaces. An abstract interface is an interface that does not extend java.rmi.Remote, but whose methods all throw either java.rmi.RemoteException or a superclass of java.rmi.RemoteException. Interfaces that do not extend java.rmi.Remote and have no methods are also abstract interfaces.

QUESTION: I have a RMI-IIOP application which was running on Java SE. When I generate new stubs and skeletons using rmic -iiop -poa <RMI Interface>, it does not work. Why ?

ANSWER: There are 2 different ways to compile and run RMI-IIOP programs, which are listed below. We do not recommend that you combine these.

  1. The default RMI-IIOP behavior. An example of an application that uses the default RMI-IIOP behavior can be found at Tutorial: Getting Started Using RMI-IIOP.
  2. POA-based RMI-IIOP. An example of an application that uses the non-standard POA-based RMI-IIOP behavior can be found at Getting Started Using RMI-IIOP: Example Using POA-based server-side model.

The -iiop -poa Flag

Using the -iiop flag with the -poa option changes the inheritance from org.omg.CORBA_2_3.portable.ObjectImpl to org.omg.PortableServer.Servant. This type of mapping is nonstandard and is not specified by the Java Language to OMG IDL Language Mapping Specification.

The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior.

The -idl Flag

Using rmic with the -idl option generates OMG IDL for the classes specified and any classes referenced. You would want to use this option when you have a CORBA client in another language that wants to talk to an RMI-IIOP server.

Note: After the OMG IDL is generated using rmic -idl, use the generated IDL with an IDL-to-C++ or other language compiler, but not with the IDL-to-Java language compiler. "Round tripping" is not recommended and should not be necessary. The IDL generation facility is intended to be used with other languages such as C++. Java clients or servers can use the original RMI-IIOP types.

IDL provides a purely declarative, programming language independent means for specifying the API for an object. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the Java Language to IDL Mapping (OMG) document for a complete description.

Note: The generated IDL can only be compiled using an IDL compiler that supports the CORBA 2.3 extensions to IDL.

The -noValueMethods Flag

The -noValueMethods option, when used with -idl, ensures that methods and initializers are not included in valuetypes emitted during IDL Generation. These are optional for valuetypes and are otherwise omitted.

See the RMIC tool page (Solaris, Linux, or Mac OS X version/Windows version) for a complete rmic description.

The idlj Compiler

The RMI-IIOP software includes an IDL-to-Java compiler. This compiler supports the CORBA Objects By Value feature, which is required for interoperation with RMI-IIOP. It is written in Java, and so can run on any platform. See the man page for idlj (Solaris, Linux, or Mac OS X or Windows). for details of how to use this compiler.

How to Make RMI Programs Use IIOP

The following steps are a general guide to converting an RMI application to RMI-IIOP.
  1. If you are using the RMI registry for naming services, you need to switch to CosNaming. In the createORB() method, do not pass the org.omg.ORBClass property. Instead, use ORB.init( args, null ). You need to do the following:
    1. In both your client and server code, you need to create an InitialContext for JNDI using the following code:
               import javax.naming.*;
         ...
         Context ic = new InitialContext();
    2. Modify all uses of RMI registry lookup() and bind() to use JNDI lookup() and bind()instead. For example, instead of your RMI server using:
               import java.rmi.*;
         ...
         Naming.rebind("MyObject", myObj);
      use:
               import javax.naming.*;
         ...
         ic.rebind("MyObject", myObj);
    3. If the client is an applet, the client applet needs to pass this to the JNDI CosNaming plugin. Replace the above code with the following:
              import java.util.*;
        import javax.naming.*;
        ...
        Hashtable env = new Hashtable();
        env.put("java.naming.applet", this);
        Context ic = new InitialContext(env);
  2. If you are not using the RMI registry for naming services, you have some other way of bootstrapping your initial remote object reference. For example, your server code may be using Java serialization to write an RMI object reference to an ObjectOutputStream and passing this to your client code for deserializing into an RMI stub.

    On the server side, use the PortableRemoteObject.toStub() call to obtain a stub, then use writeObject() to serialize this stub to an ObjectOutputStream. The code to do this looks something like:

    org.omg.CORBA.ORB myORB = org.omg.CORBA.ORB.init(new String[0], null);
Wombat myWombat = new WombatImpl();
javax.rmi.CORBA.Stub myStub = (javax.rmi.CORBA.Stub)PortableRemoteObject.toStub(myWombat);
myStub.connect(myORB);
// myWombat is now connected to myORB.  To connect other objects to the
// same ORB, use PortableRemoteObject.connect(nextWombat, myWombat);
FileOutputStream myFile = new FileOutputStream("t.tmp");
ObjectOutputStream myStream = new ObjectOutputStream(myFile);
myStream.writeObject(myStub);
    On the client side, use readObject() to deserialize a remote reference to the object from an ObjectInputStream, with code like:
    FileInputStream myFile = new FileInputStream("t.tmp");
ObjectInputStream myStream = new ObjectInputStream(myFile);
Wombat myWombat = (Wombat)myStream.readObject();
org.omg.CORBA.ORB myORB = org.omg.CORBA.ORB.init(new String[0], null);
((javax.rmi.CORBA.Stub)myWombat).connect(myORB);
// myWombat is now connected to myORB.  To connect other objects to the
// same ORB, use PortableRemoteObject.connect(nextWombat, myWombat);
  3. Either change your remote implementation classes to inherit from javax.rmi.PortableRemoteObject, or explicitly export implementation objects after creation by calling PortableRemoteObject.exportObject(). For more discussion on this topic, read Connecting IIOP stubs to the ORB.
  4. Change all the places in your code where there is a Java cast of a remote interface to use javax.rmi.PortableRemoteObject.narrow().
  5. Don't depend on Distributed Garbage Collection (DGC) or use any of the RMI DGC facilities. Use PortableRemoteObject.unexportObject() to unexport objects that are no longer in use.
  6. Regenerate the RMI stubs and ties using the rmic command with the -iiop option. This will produce stub and tie files with the following names:
         _<implementionName>_Tie.class
     _<interfaceName>_Stub.class
  7. Before starting the server, start the CosNaming server (in its own process) using the following command:
         orbd -ORBInitialPort port#
    You must specify the port number when starting ORBD.
  8. When starting client and server applications, specify the following system properties:
         java -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
          -Djava.naming.provider.url=iiop://<hostname>:1050
           <appl_class>
    This example uses the name service port number of 1050. If you specified a different port in step 7, you need to use the same port number in the provider URL here. The <hostname> in the provider URL is the host name that was used to start the CosNaming server in step 7.

  9. If the client is an applet, specify the following properties in the applet tag:
         java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
     java.naming.provider.url=iiop://<hostname>:1050
    This example uses the name service port number of 1050. If you specified a different port in step 7, you need to use the same port number in the provider URL here. The <hostname> in the provider URL is the host name that was used to start the CosNaming server in step 7.

For tutorials that describe creating a new RMI-IIOP application, link to Getting Started Using RMI-IIOP: Example Using POA-based server-side model or Tutorial: Getting Started Using RMI-IIOP.

Connecting IIOP stubs to the ORB

When your application uses IIOP stubs, as opposed to JRMP stubs, you need to properly connect the IIOP stubs with the ORB before invoking operations on the IIOP stubs (this is not necessary with JRMP stubs). This section discusses the extra 'connect' step required for the IIOP stub case.

The PortableRemoteObject.exportObject() call only creates a tie object and caches it for future usage. The created tie does not have a delegate or an ORB associated. This is known as explicit invocation.

The PortableRemoteObject.exportObject() happens automatically when the servant instance is created. This happens when a PortableRemoteObject constructor is called as a base class. This is known as implicit invocation.

Later, when PortableRemoteObject.toStub() is called by the application, it creates the corresponding Stub object and associates it with the cached Tie object. But since the Tie is not connected and does not have a delegate, the newly created stub also does not have a delegate or ORB.

The delegate is set for the stub only when the application calls Stub.connect(orb). Thus, any operations on the stub made before the ORB connection is made will fail.

The Java Language to IDL Mapping Specification says the following about the Stub.connect() method:

The connect method makes the stub ready for remote communication using the specified ORB object orb. Connection normally happens implicitly when the stub is received or sent as an argument on a remote method call, but it is sometimes useful to do this by making an explicit call (e.g., following deserialization). If the stub is already connected to orb (i.e., has a delegate set for orb), then connect takes no action. If the stub is connected to some other ORB, then a RemoteException is thrown. Otherwise, a delegate is created for this stub and the ORB object orb.

For servants that are not POA-activated, Stub.connect(orb) is necessary as a required setup.

Restrictions When Running RMI Programs Over IIOP

To make existing RMI programs run over IIOP, you need to observe the following restrictions.
  1. Make sure all constant definitions in remote interfaces are of primitive types or String and evaluated at compile time.
  2. Don't use Java names that conflict with IDL mangled names generated by the Java to IDL mapping rules. See section 28.3.2 of the Java Language to IDL Mapping specification for the Java to IDL name mapping rules.
  3. Don't inherit the same method name into a remote interface more than once from different base remote interfaces.
  4. Be careful when using names that differ only in case. The use of a type name and a variable of that type whose name differs from the type name only in case is supported. Most other combinations of names that differ only in case are not supported.
  5. Don't depend on runtime sharing of object references to be preserved exactly when transmitting object references across IIOP. Runtime sharing of other objects is preserved correctly.
  6. Don't use the following features of RMI:
    • RMISocketFactory
    • UnicastRemoteObject
    • Unreferenced
    • The Distributed Garbage Collection (DGC) interfaces

Other Things You Should Know

Servers Need to be Thread Safe

Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.

Interoperating with Other ORBs

RMI-IIOP should interoperate with other ORBS that support the CORBA 2.3 specification. It will not interoperate with older ORBs, because these are unable to handle the IIOP encodings for Objects By Value. This support is needed to send RMI value classes (including strings) over IIOP.

NOTE: Although it is true that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

When do I use UnicastRemoteObject vs PortableRemoteObject?

Use UnicastRemoteObject as the superclass for the object implementation in RMI programming, which are scenarios where a distributed application is developed in a homogeneous Java environment and JRMP is used as the remote invocation mechanism. Use PortableRemoteObject when developing distributed applications where IIOP is the desired invocation mechanism, which provides a more standardized invocation substrate and allows interoperability with non-Java distributed application components. RMI-IIOP provides interoperability with distributed application components that are based on the OMG CORBA standards, and are developed in Java and other languages, such as C, C++, and Python.

A Java server component can also be structured to provide dual export of its services over both JRMP and IIOP simultaneously by designing the server to provide dual stack interoperability. Structure the server application component to use the exportObject methods of UnicastRemoteObject and PortableRemoteObject to "register" the service objects, which can then be invoked using JRMP and IIOP respectively. With this approach, distributed application developers use the exportObject method instead of inheritance to export their application objects. A server object that calls the PortableRemoteObject.exportObject() method to make its services available typically publishes a name for that object in the CosNaming service. A server object exported by the UnicastRemoteObject.exportObject() method typically has its name published in the rmiregistry, which provides a default naming service for RMI /JRMP (java.rmi.Naming).

The JMX framework provides this form of remote call duality.

Known Problems

  • JNDI 1.1 does not support java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory as an Applet parameter. Instead, it must be explicitly passed as a property to the InitialContext constructor. This capability is supported in JNDI 1.2.
  • When running the Naming Service on Solaris, you must use a port number greater than 1024.
  • On Solaris, you may experience an "out of file descriptors" problem when running RMI-IIOP applications. This may occur if you are using too many file descriptors, which can happen because each JAR file in the classpath consumes one file descriptor and the JDK setup adds numerous JAR files to the classpath. Before running applications, set the file descriptor limit to a number greater than its default value of 64. For example, set the ulimit number to 90 or higher, as follows:
  • ulimit -n 90

Background Reading

Here are some sites to get you up to speed with this technology:
  • The RMI-IIOP home page contains links to RMI-IIOP documentation, sample code, specifications, news, other related web sites, and more. Check it out!
  • The RMI-IIOP Tutorial gives a step-by-step example for creating and running a simple RMI-IIOP application.
  • The Java RMI home page contains links to RMI documentation, examples, specification, and more. Make sure you read this.
  • The RMI trail in the Java Tutorial.
  • The RMI API documentation.
  • The Java IDL web page will familiarize you with Oracle's CORBA/IIOP implementation.
  • The Java IDL Tutorial is the newest version of the IDL trail from the Java Tutorial.
  • The Java Language to IDL Mapping, ptc/00-01-06 document is a detailed technical specification of RMI-IIOP. For further information on how the specification is implemented in this version of Java SE, see the compliance document.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


When should I use RMI-IIOP?

RMI-IIOP is for developers who program in the Java programming language and want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJB components is based on the RMI API.

RMI-IIOP combines the best features of Java Remote Method Invocation (RMI) with the best features of CORBA. RMI-IIOP speeds distributed application development by allowing developers to work completely in the Java programming language, writing remote interfaces in the Java programming language and implementing them simply using Java technology and the Java RMI APIs.

When using RMI-IIOP to produce technology-based distributed applications written in the Java programming language, there is no separate Interface Definition Language (IDL) or mapping to learn: the remote interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces.

RMI-IIOP provides flexibility by allowing developers to pass any Java object between application components either by reference or by value.

Like CORBA, RMI-IIOP is based on open standards defined with the participation of hundreds of vendors and users in the Object Management Group. Like CORBA, RMI-IIOP uses Internet Inter-ORB Protocol (IIOP) as its communication protocol. IIOP eases legacy application and platform integration by allowing application components written in C++, Smalltalk, and other CORBA supported languages to communicate with components running on the Java platform.

What other options do I have for distributed application development?

Developers who program using the Java programming language can choose several solutions for creating distributed applications programs.

  • Java RMI technology - If all of your applications are written in the Java programming language, you will probably want to use Java RMI technology to enable communication between Java objects on different virtual machines and different physical machines. Using Java RMI technology without its IIOP option leverages its strengths of code portability, security, and garbage collection.
  • Java IDL technology - Java IDL technology are for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting the Java platform in exactly the same way as other languages like C++ or COBOL.
  • Enterprise JavaBeans technology - Enterprise JavaBeans (EJB) technology is part of the Java Platform, Enterprise Edition (Java EE). EJB components use the Java RMI/Java IDL technology for their distributed object model, and use the Java Transaction Service (JTS) for their distributed transaction model. When Enterprise JavaBeans components are implemented using the RMI-IIOP protocol for EJB component interoperability in heterogeneous server environments, the standard mapping of the EJB architecture to CORBA enables interoperability with multivendor ORBs, other EJB servers, and CORBA clients written in programming languages other than the Java programming language. For an example application that uses an EJB server with a CORBA client, look at Enterprise JavaBeans Components and CORBA Clients.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Scripting Enhancements

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 8

The JDK 8 release is co-bundled with the Nashorn, which is an implementation of the ECMAScript Edition 5.1 Language Specification.

Enhancements in Java SE 7

The JDK 7 release is co-bundled with the Mozilla Rhino JavaScript engine based on version 1.7R3 pre-release sources with Oracle modifications. You can download the Oracle modified Rhino sources at java.net.

Enhancements in Java SE 6

No changes to report.

Enhancements in Java SE 5.0

No changes to report.

Enhancements in Java SE 1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Scripting for the Java Platform

Many implementations of scripting and dynamically typed languages generate Java bytecodes so that programs can be run on the Java Platform, just as are actual Java programs. Implementing a language in this way (or as a Java interpreter class for the scripting language) provides all the advantages of the Java platform: scripting implementations can take advantage of the Java platform's binary portability, security, and high performance bytecode execution.

Java SE includes JSR 223: Scripting for the Java Platform API. This is a framework by which Java applications can "host" script engines. The scripting framework supports third-party script engines using the JAR service discovery mechanism. It is possible to drop any JSR-223 compliant script engine in the CLASSPATH and access the same from your Java applications (much like JDBC drivers, JNDI implementations are accessed).

Java SE Development Kit includes the Nashorn engine, which is an implementation of the ECMAScript Edition 5.1 Language Specification.

API Reference

  • javax.script Package

Guides

  • Java Scripting Programmer's Guide
  • Nashorn User's Guide

API Enhancements

  • Enhancements in Java SE 8
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Tools

  • Scripting Tools in JDK for Windows
  • Scripting Tools in JDK for Solaris, Linux, or Mac OS X

More Information

  • JSR-223 Scripting for the Java Platform
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous Next

1 Introduction

This chapter provides introductory information about the Nashorn engine and how it can be used to interpret JavaScript code in a Java application or from the command line.

The Nashorn engine is an implementation of the ECMAScript Edition 5.1 Language SpecificationFoot1. It was fully developed in the Java language as part of the Nashorn projectFoot2. The code is based on the new features of the Da Vinci MachineFoot3, which is the reference implementation of Java Specification Request (JSR) 292: Supporting Dynamically Typed Languages on the Java PlatformFoot4.

The Nashorn engine is included in the Java SE Development Kit (JDK). You can invoke Nashorn from a Java application using the Java Scripting API to interpret embedded scripts, or you can pass the script to the jjs or jrunscript tool.

Note:

Nashorn is the only JavaScript engine included in the JDK. However, you can use any script engine compliant with JSR 223: Scripting for the Java PlatformFoot1, or implement your own. For more information, see Java Scripting Programmer's Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/programmer_guide/index.html

Footnote1http://jcp.org/en/jsr/detail?id=223

1.1 Invoking Nashorn from Java Code

To invoke Nashorn in your Java application, create an instance of the Nashorn engine using the Java Scripting API.

To get an instance of the Nashorn engine:

  1. Import the javax.script package.

    The Java Scripting API is composed of classes and interfaces in this package. For more information about the javax.script package, see the specification at http://docs.oracle.com/javase/8/docs/api/javax/script/package-summary.html

  2. Create a ScriptEngineManager object.

    The ScriptEngineManager class is the starting point for the Java Scripting API. A ScriptEngineManager object is used to instantiate ScriptEngine objects and maintain global variable values shared by them.

  3. Get a ScriptEngine object from the manager using the getEngineByName() method.

    This method takes one String argument with the name of the script engine. To get an instance of the Nashorn engine, pass in "nashorn". Alternatively, you can use any of the following: "Nashorn", "javascript", "JavaScript", "js", "JS", "ecmascript", "ECMAScript".

After you have the Nashorn engine instance, you can use it to evaluate statements and script files, set variables, and so on. Example 1-1 provides simple Java application code that evaluates a print("Hello, World!"); statement using Nashorn.

Example 1-1 Evaluating a Script Statement Using Nashorn (EvalScript.java)

import javax.script.*;

public class EvalScript {
    public static void main(String[] args) throws Exception {
        // create a script engine manager
        ScriptEngineManager factory = new ScriptEngineManager();
        // create a Nashorn script engine
        ScriptEngine engine = factory.getEngineByName("nashorn");
        // evaluate JavaScript statement
        try {
            engine.eval("print('Hello, World!');");
        } catch (final ScriptException se) { se.printStackTrace(); }
    }
}

Note:

The eval() method throws a ScriptException that must be handled properly.

For more information about using scripts in Java code, see Java Scripting Programmer's Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/programmer_guide/index.html

1.2 Invoking Nashorn from the Command Line

There are two command-line tools that can be used to invoke the Nashorn engine:

  • jrunscript

    This is a generic command that invokes any available script engine compliant with JSR 223. By default, without any options, jrunscript invokes the Nashorn engine, because it is the default script engine in the JDK.

    For more information about jrunscript, see the tool's reference page at http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jrunscript.html

  • jjs

    This is the recommended tool, created specifically for Nashorn. To evaluate a script file using Nashorn, pass the name of the script file to the jjs tool. To launch an interactive shell that interprets statements passed in using standard input, start the jjs tool without specifying any script files.

    For more information about jjs, see the tool's reference page at http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jjs.html

Footnote Legend

Footnote1:http://www.ecma-international.org/publications/standards/Ecma-262.html
Footnote2:http://openjdk.java.net/projects/nashorn/
Footnote3:http://openjdk.java.net/projects/mlvm/
Footnote4:http://jcp.org/en/jsr/detail?id=292
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition/Nashorn User's Guide, Release 8

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous Next

Java Platform, Standard Edition

Nashorn User's Guide

Release 8

E41835-01

August 2013

Describes the use of the Nashorn engine for Java application development.

Java Platform, Standard Edition/Nashorn User's Guide, Release 8

E41835-01

Copyright 2013,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JavaFX Script Application Examples

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous

A JavaFX Script Application Examples

This appendix provides examples of JavaFX script applications.

For more information about writing JavaFX applications as scripts interpreted by the Nashorn engine, see Chapter 3, "Nashorn and JavaFX".

Example A-1 JavaFX 3-D

This example demonstrates how a complex task (in this case, rendering 3-D graphics with JavaFX) can be done with relatively little code using the Nashorn script engine capabilities. When you run this example, a window with three green shapes is shown: a box, a sphere, and a cylinder.

load("fx:base.js");
load("fx:controls.js");
load("fx:graphics.js");

var material = new PhongMaterial();
material.diffuseColor = Color.LIGHTGREEN;
material.specularColor = Color.rgb(30, 30, 30);

var meshView = Java.to([
    new Box(200, 200, 200),
    new Sphere(100),
    new Cylinder(100, 200)
], "javafx.scene.shape.Shape3D[]");

for (var i = 0; i != 3; i++) {
    meshView[i].material = material;
    meshView[i].translateX = (i + 1) * 220;
    meshView[i].translateY = 200;
    meshView[i].translateZ = 20;
    meshView[i].drawMode = DrawMode.FILL;
    meshView[i].cullFace = CullFace.BACK;
};

var pointLight = new PointLight(Color.WHITE);
pointLight.translateX = 800;
pointLight.translateY = -200;
pointLight.translateZ = -1000;

var root = new Group(meshView);
root.children.add(pointLight);

var scene = new Scene(root, 800, 400, true);
scene.fill = Color.rgb(127, 127, 127);
scene.camera = new PerspectiveCamera(false);
$STAGE.scene = scene;
$STAGE.show();

Example A-2 JavaFX Animation

This example demonstrates how to create a JavaFX animation using the Nashorn script engine capabilities. When you run this example, a window with colorful circles moving around is shown.

load("fx:base.js");
load("fx:controls.js");
load("fx:graphics.js");

var WIDTH = 500;
var HEIGHT = 600;
var animation;

function setup(primaryStage) {
 var root = new Group();
 primaryStage.resizable = false;
 var scene = new Scene(root, WIDTH, HEIGHT);
 scene.title = "Colourful Circles";
 primaryStage.scene = scene;

 // create first list of circles
 var layer1 = new Group();
 for(var i = 0; i < 15; i++) {
  var circle = new Circle(200, Color.web("white", 0.05));
  circle.strokeType = StrokeType.OUTSIDE;
  circle.stroke = Color.web("white", 0.2);
  circle.strokeWidth = 4;
  layer1.children.add(circle);
 }

 // create second list of circles
 var layer2 = new Group();
 for(var i = 0; i < 20; i++) {
  var circle = new Circle(70, Color.web("white", 0.05));
  circle.strokeType = StrokeType.OUTSIDE;
  circle.stroke = Color.web("white", 0.1);
  circle.strokeWidth = 2;
  layer2.children.add(circle);
 }

 // create third list of circles
 var layer3 = new Group();
 for(var i = 0; i < 10; i++) {
  var circle = new Circle(150, Color.web("white", 0.05));
  circle.strokeType = StrokeType.OUTSIDE;
  circle.stroke = Color.web("white", 0.16);
  circle.strokeWidth = 4;
  layer3.children.add(circle);
 }

 // set a blur effect on each layer
 layer1.effect = new BoxBlur(30, 30, 3);
 layer2.effect = new BoxBlur(2, 2, 2);
 layer3.effect = new BoxBlur(10, 10, 3);

 // create a rectangle size of window with colored gradient
 var colors = new Rectangle(WIDTH, HEIGHT,
   new LinearGradient(0, 1, 1, 0, true, CycleMethod.NO_CYCLE,
      new Stop(0,   Color.web("#f8bd55")),
      new Stop(0.14, Color.web("#c0fe56")),
      new Stop(0.28, Color.web("#5dfbc1")),
      new Stop(0.43, Color.web("#64c2f8")),
      new Stop(0.57, Color.web("#be4af7")),
      new Stop(0.71, Color.web("#ed5fc2")),
      new Stop(0.85, Color.web("#ef504c")),
      new Stop(1,   Color.web("#f2660f"))));
 colors.blendMode = BlendMode.OVERLAY;

 // create main content
 var group = new Group(new Rectangle(WIDTH, HEIGHT, Color.BLACK),
        layer1,
        layer2,
        layer3,
        colors);
 var clip = new Rectangle(WIDTH, HEIGHT);
 clip.smooth = false;
 group.clip = clip;
 root.children.add(group);

 // create list of all circles
 var allCircles = new java.util.ArrayList();
 allCircles.addAll(layer1.children);
 allCircles.addAll(layer2.children);
 allCircles.addAll(layer3.children);

 // Create a animation to randomly move every circle in allCircles
 animation = new Timeline();
 for each (var circle in allCircles) {
  animation.getKeyFrames().addAll(
     new KeyFrame(Duration.ZERO, // set start position at 0s
         new KeyValue(circle.translateXProperty(),
Math.random() * WIDTH),
         new KeyValue(circle.translateYProperty(),
Math.random() * HEIGHT)),
     new KeyFrame(new Duration(20000), // set end position at 20s
         new KeyValue(circle.translateXProperty(),
Math.random() * WIDTH),
         new KeyValue(circle.translateYProperty(),
Math.random() * HEIGHT))
     );
 }
 animation.autoReverse = true;
 animation.cycleCount = Animation.INDEFINITE;
}

function stop() {
 animation.stop();
}

function play() {
 animation.play();
}

function start(primaryStage) {
 setup(primaryStage);
 primaryStage.show();
 play();
}
Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


List of Examples

  • 1-1 Evaluating a Script Statement Using Nashorn (EvalScript.java)
  • 2-1 Extending a Java Class
  • 2-2 Extending a Java SAM Class
  • 3-1 JavaFX Application (HelloWorld.java)
  • 3-2 JavaFX Script Application (HelloWorld.js)
  • 3-3 Simpler Version of the JavaFX Script Application (HelloWorldSimple.js)
  • 3-4 JavaFX Script Application with Loaded Scripts
  • 4-1 Using the Shebang to Create an Executable Script (scriptArgs.js)
  • 4-2 Using a Heredoc in a Script (scriptHereArgs.js)
  • A-1 JavaFX 3-D
  • A-2 JavaFX Animation
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Nashorn and JavaFX

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous Next

3 Nashorn and JavaFX

This chapter describes how to create and run JavaFX applications using scripts interpreted by the Nashorn engine. It is assumed that you are familiar with JavaFX. For more information, see the JavaFX documentation at http://docs.oracle.com/javafx/

You can interpret a JavaFX script application with Nashorn using the jjs command with the -fx option. For example, the following command invokes Nashorn to interpret the JavaFXscript.js file:

jjs -fx JavaFXscript.js

For more information about jjs, see the tool's reference page at http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jjs.html

A JavaFX script application is similar to the Java equivalent, but Nashorn enables you to simplify many of the JavaFX constructs. Typically, a JavaFX script application contains only the start() function, which is equivalent to the start() method in its Java counterpart. It can also contain the init() and stop() functions.

Example 3-1 contains the source code for a simple JavaFX application that displays a button, which when clicked prints "Hello World!" to standard output.

Example 3-1 JavaFX Application (HelloWorld.java)

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloWorld extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });

        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.show();
    }
}

Example 3-2 contains the source code for a JavaFX script application that corresponds to the Java code in Example 3-1.

Example 3-2 JavaFX Script Application (HelloWorld.js)

var Button = javafx.scene.control.Button;
var StackPane = javafx.scene.layout.StackPane;
var Scene = javafx.scene.Scene;

function start(primaryStage) {
    primaryStage.title = "Hello World!";
    var button = new Button();
    button.text = "Say 'Hello World'";
    button.onAction = function() print("Hello World!");
    var root = new StackPane();
    root.children.add(button);
    primaryStage.scene = new Scene(root, 300, 250);
    primaryStage.show();
}

Both Example 3-1 and Example 3-2 produce the same result: a window titled Hello World! with a button labeled Say 'Hello World'.

Analyzing the two preceding examples, you can see how Nashorn enables you to simplify Java code when you write a JavaFX application as a script:

  • There is no need to declare variable types, import packages, use annotations, specify the class name, and implement its main() method.

  • Only the JavaFX classes that are instantiated must be declared.

  • JavaBeans do not require the get and set prefixes, and are treated as JavaScript properties instead of as Java methods. For more information, see Section 2.4, "Using JavaBeans".

  • Implementing the javafx.event.EventHandler interface does not require you to specify the implemented method explicitly. Because handle() is the only method, Nashorn automatically applies the provided function to the method. For more information, see Section 2.9, "Extending Java Classes".

The JavaFX primary stage is available to Nashorn as a global property $STAGE. This global property enables you to treat the whole script as one start() function (you can still add the init() and stop() functions). Example 3-3 contains the source code for a simplified version of the JavaFX script application from Example 3-2.

Example 3-3 Simpler Version of the JavaFX Script Application (HelloWorldSimple.js)

var Button = javafx.scene.control.Button;
var StackPane = javafx.scene.layout.StackPane;
var Scene = javafx.scene.Scene;

$STAGE.title = "Hello World!";
var button = new Button();
button.text = "Say 'Hello World'";
button.onAction = function() print("Hello World!");
var root = new StackPane();
root.children.add(button);
$STAGE.scene = new Scene(root, 300, 250);
$STAGE.show();

In most cases, you should only add the classes that you instantiate or use to access static fields. However, for prototyping purposes, Nashorn predefines a set of scripts that can be loaded to import groups of JavaFX packages and classes. You can load a script using the load() function that takes a string with the name of the script. The following table lists the predefined script objects that are available for inclusion:

This script ... | Imports ...
fx:base.js | javafx.stage.Stage javafx.scene.Scene javafx.scene.Group javafx/beans javafx/collections javafx/events javafx/util
fx:graphics.js | javafx/animation javafx/application javafx/concurrent javafx/css javafx/geometry javafx/print javafx/scene javafx/stage
fx:controls.js | javafx/scene/chart javafx/scene/control
fx:fxml.js | javafx/fxml
fx:web.js | javafx/scene/web
fx:media.js | javafx/scene/media
fx:swing.js | javafx/embed/swing
fx:swt.js | javafx/embed/swt

Example 3-4 contains the source code of the simplified JavaFX script application from Example 3-3 with load() functions used to import the necessary packages and classes.

Example 3-4 JavaFX Script Application with Loaded Scripts

load("fx:base.js");
load("fx:controls.js");
load("fx:graphics.js");

$STAGE.title = "Hello World!";
var button = new Button();
button.text = "Say 'Hello World'";
button.onAction = function() print("Hello World!");
var root = new StackPane();
root.children.add(button);
$STAGE.scene = new Scene(root, 300, 250);
$STAGE.show();

For more examples of JavaFX script applications, see Appendix A, "JavaFX Script Application Examples".

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Nashorn and Shell Scripting

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous Next

4 Nashorn and Shell Scripting

This chapter describes the extensions of the Nashorn engine that enable you to use UNIX shell scripting features for JavaScript scripts.

You can enable shell scripting extensions in Nashorn using the jjs command with the -scripting option. For example, the following command invokes Nashorn in interactive mode with shell scripting extensions enabled:

jjs -scripting

For more information about jjs, see the tool's reference page at http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jjs.html

In addition to the standard JavaScript comments (// and /* */), Nashorn supports shell-style comments using the number sign (#). If the number sign is the first character in a script, then the Nashorn shell scripting extensions are automatically enabled when you interpret the script, even if you use the jjs tool without the -scripting option. This is useful when specifying the shebang (#!) at the beginning of a script to run it as a shell executable. For more information, see Section 4.1, "Shebang".

4.1 Shebang

You can use the shebang (#!) at the beginning of a script file to enable the script file to run as a shell executable. If you specify the path to the jjs tool in the shebang, then when you execute the script, the shell runs the jjs tool instead, and passes the script file to it.

The jjs tool is located in the JAVA_HOME/bin directory, where JAVA_HOME is the installation directory of the JDK (or the JRE). When you install the JDK, the JAVA_HOME environment variable is usually set up automatically. If it was not set up automatically, or if you have several versions of the JDK installed, set the JAVA_HOME environment variable to the correct path of the JDK installation directory manually.

You can specify the direct path to the jjs tool in the shebang, but it is a good practice to create a symbolic link in the /usr/bin directory as follows:

>> cd /usr/bin
>> ln -s $JAVA_HOME/bin/jjs jjs
>>

Note:

You might have to run the ln command with root privileges using sudo.

After you set up the symbolic link, you can create Nashorn scripts that can be run as executables. Also, it is possible to add command-line options directly to the shebang statement. Example 4-1 shows an executable script that prints the version of the Nashorn engine and then the arguments passed to the script.

Example 4-1 Using the Shebang to Create an Executable Script (scriptArgs.js)

#!/usr/bin/jjs -fv
print("Arguments: " + arguments);

If you run the scriptArgs.js file as a shell executable, it is interpreted by the Nashorn engine as follows:

>> ./scriptArgs.js -- arg1 arg2 arg3
nashorn full version 1.8.0
Arguments: arg1,arg2,arg3
>>

Alternatively, if the path to the jjs tool is in the PATH environment variable, you can point the shebang to jjs as follows:

#!/usr/bin/env jjs

4.2 String Interpolation

String interpolation is used in UNIX shells to construct strings that contain values of variables or expressions. With shell scripting features enabled, Nashorn enables you to embed variables and expressions into string literals in the same way. For example, you can assign the result of the Date() constructor to the date variable, and then pass this variable to the string using the dollar sign ($) and braces ({}) as follows:

jjs> var date = Date()
jjs> "Date and time: ${date}"
Date and time: Mon Aug 19 2013 19:43:08 GMT+0400 (MSK)

The preceding example displays the date and time when the date variable was assigned the value returned by the Date() constructor. If you want to display the current date and time when the expression is evaluated, you can pass the Date() constructor directly as follows:

jjs> "Current date and time: ${Date()}"
Current date and time: Mon Aug 19 2013 19:49:53 GMT+0400 (MSK)

String interpolation works only for strings within double quotation marks. Strings within single quotation marks are not interpolated:

jjs> 'The variable is ${date}'
The variable is ${date}

4.3 Here Document

A here document (heredoc) specifies strings in UNIX shells that preserve line breaks and indentations. With shell scripting features enabled, you can use Nashorn to evaluate scripts with heredocs. Example 4-2 shows an executable script that prints the first passed-in argument on the first line, then the second argument indented on the second line, and the third argument on the forth line (after one blank line).

Example 4-2 Using a Heredoc in a Script (scriptHereArgs.js)

#!/usr/bin/jjs
print(<<EOD);
${arguments[0]} is normal
    ${arguments[1]} is indented

${arguments[2]} is separated by a blank line
EOD

If you run the scriptHereArgs.js file as a shell executable, it is interpreted by the Nashorn engine as follows:

>> ./scriptHereArgs.js -- Line1 Line2 Line3
Line1 is normal
    Line2 is indented

Line3 is separated by a blank line

4.4 Global Objects

With shell scripting features enabled, Nashorn defines several global objects:

$ARG

This global object can be used to access the arguments passed to the script, similar to how the arguments object is used, for example:

>> jjs -scripting -- arg1 arg2 arg3
jjs> $ARG
arg1,arg2,arg3
jjs> $ARG[1]
arg2
$ENV

This global object maps all the current environment variables, for example:

jjs> $ENV.USER
johndoe
jjs> $ENV.PWD
/foo/bar
$EXEC()

This global function launches processes to run commands, for example:

jjs> $EXEC("ls -l")
total 0
drwxr-xr-x+ 1 johndoe staff 4096 Aug 18 11:03 dir
-rwxrw-r--  1 johndoe staff  168 Aug 19 17:44 file.txt

jjs>

The $EXEC() function can also take a second argument, which is a string to be used as standard input (stdin) for the process:

jjs> $EXEC("cat", "Send this to stdout")
Send this to stdout
jjs>

Note:

If the command does not require any input, you can launch a process using the backtick string notation. For example, instead of $EXEC("ls -l"), you can use `ls -l`.

$OUT

This global object is used to store the latest standard output (stdout) of the process. For example, the result of $EXEC() is saved to $OUT.

$ERR

This global object is used to store the latest standard error (stderr) of the process.

$EXIT

This global object is used to store the exit code of the process. If the exit code is not zero, then the process failed.

4.5 Additional Nashorn Built-in Functions

With shell scripting features enabled, Nashorn defines several built-in functions:

quit()
exit()

These functions are synonymous, causing the current script process to exit to the system. You can pass an integer value as the argument that represents the exit code to be returned to the system. By default, without an argument, the exit code is set to 0, meaning that the process terminated correctly.

print()
echo()

These functions are synonymous, causing the values passed in as arguments to be converted to strings, printed to stdout separated by spaces, and followed by a new line. The implementation involves calls to java.lang.System.out.print(string) followed by java.lang.System.out.println().

>> jjs -scripting -- arg1
jjs> var a = "Hello"
jjs> print(123, $ARG[0], a, "World")
123 arg1 Hello World
jjs>
readLine()

This function reads one line of input from stdin and sends it to stdout, or you can assign the result to a variable. You can also pass a string to the readLine() function to get a prompt line as in the following example:

jjs> var name = readLine("What is your name? ")
What is your name? Bob
jjs> print("Hello, ${name}!")
Hello, Bob!
jjs>
readFully()

This function reads the entire contents of a file passed in as a string argument and sends it to stdout, or you can assign the result to a variable.

jjs> readFully("text.txt")
This is the contents of the text.txt file located in the current working directory.

jjs>
load()

This function loads and evaluates a script from a path, URL, or script object.

jjs> load("/foo/bar/script.js")
jjs> load("http://example.com/script.js")
jjs> load({name:"script.js", script:"var x = 1 + 1; x;"})
loadWithNewGlobal()

This function is similar to the load() function, but the script is evaluated with a new global object. This is the primary method for creating a fresh context for evaluating scripts. Additional arguments (after the script) passed to loadWithNewGlobal() are stored in the arguments global variable of the new context.

Object.bindProperties()

This function is used to bind the properties of the first passed-in object with properties of the second passed-in object. The function enables sharing of global properties. For example, in a Document Object Model (DOM) simulation, you can share properties between the global object and the document. In a multithreading application, you can share functions across global objects of threads.

The following example shows how you can bind the global object's properties to the properties of the obj object:

jjs> var obj = {x:34,y:100}
jjs> obj.x
34
jjs> obj.y
100
jjs> x
<shell>:1 ReferenceError: "x" is not defined
jjs> Object.bindProperties(this,obj)
[object global]
jjs> x
34
jjs> y = Math.PI
3.141592653589793
jjs> obj.y
3.141592653589793
jjs>
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document describes the use of the Nashorn engine for Java application development with scripting features provided by the Java Platform, Standard Edition (Java SE).

Audience

This document is intended for Java programmers who want to use the Nashorn engine for scripting features provided by Java SE. It is assumed that you are familiar with Java and a version of the ECMAScript language standard (JavaScript).

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For more information about scripting features provided by Java SE, see the following documents:

  • Java Scripting Programmer's Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/programmer_guide/index.html

  • The Java Scripting API (the javax.script package) specification at http://docs.oracle.com/javase/8/docs/api/javax/script/package-summary.html

For information about invoking the Nashorn engine from the command line, see the reference pages for the jjs and jrunscript tools at http://docs.oracle.com/javase/8/docs/technotes/tools/

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Next

Contents

List of Examples

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 Introduction

  • 1.1 Invoking Nashorn from Java Code
  • 1.2 Invoking Nashorn from the Command Line

2 The Nashorn Java API

  • 2.1 Accessing Java Classes
  • 2.2 Creating Java Objects
  • 2.3 Accessing Class and Instance Members
  • 2.4 Using JavaBeans
  • 2.5 Working with Java Arrays
  • 2.6 Working with Java Strings
  • 2.7 Working with Java Numbers
  • 2.8 Working with Java Collections
  • 2.9 Extending Java Classes

3 Nashorn and JavaFX

4 Nashorn and Shell Scripting

  • 4.1 Shebang
  • 4.2 String Interpolation
  • 4.3 Here Document
  • 4.4 Global Objects
  • 4.5 Additional Nashorn Built-in Functions

A JavaFX Script Application Examples

Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Nashorn Java API

Documentation Contents
Java Platform, Standard Edition Nashorn User's Guide
Contents Previous Next

2 The Nashorn Java API

This chapter describes how to access Java from a script interpreted by the Nashorn engine.

The sections in this chapter contain examples of script statements interpreted by the Nashorn engine in interactive language shell mode. This interactive shell is started by running the jjs command without any scripts passed to it. This is useful for trying things out, but the main purpose of the Nashorn Java API is to write Java applications as scripts that can be interpreted by the Nashorn engine.

2.1 Accessing Java Classes

There are two approaches to access packages and classes using Nashorn: the traditional approach is to use the Packages global object, and the recommended approach is to use the Java global object. This section describes both approaches.

The predefined top-level Packages object enables you to access Java packages and classes using their fully qualified names, as if they are properties of the Packages object. The following example shows how you can access the MyPackage package and its MyClass class if MyPackage.jar is in your class path:

jjs> Packages.MyPackage
[JavaPackage MyPackage]
jjs> Packages.MyPackage.MyClass
[JavaClass MyPackage.MyClass]

Accessing standard Java packages and classes is more straightforward than accessing custom packages and classes. For your convenience, there are global objects defined for each of the standard Java packages: com, edu, java, javafx, javax, and org. They have aliases that correspond to properties of the Packages object. The following example shows how you can access the java.lang package and the java.lang.System class:

jjs> java.lang
[JavaPackage java.lang]
jjs> typeof java.lang
object
jjs> java.lang.System
[JavaClass java.lang.System]
jjs> typeof java.lang.System
function

As you can see from the previous example, Nashorn interprets Java packages as JavaPackage objects, and Java classes as JavaClass function objects, which can be used as constructors for the classes. For more information about instantiating a class, see Section 2.2, "Creating Java Objects".

The traditional approach for accessing Java packages and classes is intuitive and straightforward, but at the same time, it can be inefficient, limited, and error-prone for the following reasons:

  • Each property access has a cost, so accessing a package or class in a deep hierarchy can be slow.

  • There is no special syntax for creating Java arrays. You must use the java.lang.reflect.Array class as a workaround.

  • If you misspell a class name, Nashorn assumes that you provided a package name, and interprets it as a JavaPackage object instead of a JavaClass function object. You might not be aware of this until an error is thrown when you attempt to use it as a class. To avoid this, use the typeof operator to conditionally test that the construct you are trying to access is interpreted as a function object. The following example shows how this conditional check works:

    jjs> typeof java.lang.System == "function"
true
jjs> typeof java.lang.Zyztem == "function"
false

To avoid the disadvantages of the approach previously described, Nashorn defines the Java global object that has several functions for working with Java classes. The Java.type() function takes a string with the fully qualified Java class name, and returns the corresponding JavaClass function object. The following example shows how you can access the java.lang.System class:

jjs> Java.type("java.lang.System")
[JavaClass java.lang.System]

Similar to importing classes in Java, it is a good practice to declare variables of JavaClass type at the beginning of a script. The following example shows how you can declare the System variable and give it a value of the java.lang.System class:

jjs> var System = Java.type("java.lang.System")
jjs> System
[JavaClass java.lang.System]

2.2 Creating Java Objects

To instantiate a class, pass the JavaClass function object to the new operator. Nashorn invokes the corresponding constructor based on the arguments passed to the function. The following example shows how you can instantiate the java.util.HashMap class with the default initial capacity and with the initial capacity set to 100:

jjs> var HashMap = Java.type("java.util.HashMap")
jjs> var mapDef = new HashMap()
jjs> var map100 = new HashMap(100)

2.3 Accessing Class and Instance Members

You can use the standard dot notation to access static fields, methods, and inner classes as follows:

jjs> Java.type("java.lang.Math").PI
3.141592653589793
jjs> Java.type("java.lang.System").currentTimeMillis()
1375813353330
jjs> Java.type("java.util.Map").Entry
[JavaClass java.util.Map$Entry]

An inner class can also be accessed using internal representation with the dollar sign ($) as the separator, or a dot, which is consistent with Java:

jjs> Java.type("java.util.Map$Entry")
[JavaClass java.util.Map$Entry]
jjs> Java.type("java.util.Map.Entry")
[JavaClass java.util.Map$Entry]

To invoke an instance method or access an instance field of an object, use the dot operator, similar to how it is done in Java. The following example shows how you can call the toUpperCase() method on a String object:

jjs> var String = Java.type("java.lang.String")
jjs> var str = new String("Hello")
jjs> str
Hello
jjs> var upper = str.toUpperCase()
jjs> upper
HELLO

Nashorn also supports member access using the bracket notation, where you specify the name of the member as a string between brackets ([]) that immediately follow the class (in case of a static member) or object (in case of an instance member). This method is defined by the ECMAScript as an alternative to the dot notation, and is not intuitive for Java developers. However, it can be used to resolve method overload ambiguity. By default, Nashorn uses the overloaded method that best matches the arguments, and this is not always what you expect. For example, if you want to print a double value, you must use the java.lang.System.out.println(double) method overload, as shown in the following example:

jjs> Java.type("java.lang.System").out.println(10)
10
jjs> Java.type("java.lang.System").out["println(double)"](10)
10.0

2.4 Using JavaBeans

Nashorn enables you to treat accessor and mutator methods in JavaBeans as equivalent JavaScript properties. The name of the property is the name of the JavaBean method without the get or set suffix, and starts with a lowecase letter. For example you can call the getYear() and setYear() methods in a java.util.Date object using the year property as follows:

jjs> var Date = Java.type("java.util.Date")
jjs> var date = new Date()
jjs> date.year + 1900
2013
jjs> date.year = 2014 - 1900
114
jjs> date.year + 1900
2014

2.5 Working with Java Arrays

To access a Java array class, pass to the Java.type() function the type of objects that comprise the array followed by a pair of brackets (similar to Java syntax). The following example shows how you can access a Java array of integers and a Java array of String objects:

jjs> Java.type("int[]")
[JavaClass [I]
jjs> Java.type("java.lang.String[]")
[JavaClass [Ljava.lang.String;]

After you have the array type object, you can use it to instantiate an array as you do any other class. You can access array entries by their indexes, and use the dot or bracket notation to access members (similar to Java syntax), as shown in the following example:

jjs> var IntArrayType = Java.type("int[]")
jjs> var arr = new IntArrayType(10)
jjs> arr[1] = 123
123
jjs> arr[2] = 321
321
jjs> arr[1] + arr[2]
444
jjs> arr[10]
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 10
jjs> arr.length
10

If you have an existing JavaScript array, you can convert it to a Java array using the Java.to() function. The following example shows how you can convert a JavaScript array of strings "a", "b", and "c", to a java.lang.String[] array with the same values:

jjs> var jsArr = ["a","b","c"]
jjs> var strArrType = Java.type("java.lang.String[]")
jjs> var javaArr = Java.to(jsArr, strArrType)
jjs> javaArr.class
class [Ljava.lang.String;
jjs> javaArr[0]
a

You can iterate through a Java array's indexes and values using the for and for each statements as follows:

jjs> for (var i in javaArr) print(i)
0
1
2
jjs> for each (var i in javaArr) print(i)
a
b
c

2.6 Working with Java Strings

Strings are interpreted by Nashorn as java.lang.String objects. However, if you concatenate two strings you get an instance of the jdk.nashorn.internal.runtime.ConsString class. This is not a problem for most scripts, because both classes implement the java.lang.CharSequence interface, but in some cases, Nashorn passes the ConsString object when a method expects a java.lang.Object argument. To avoid this, use the String() function to ensure that the string is a Java String object, as shown in the following example:

jjs> var a = "abc"
jjs> a.class
class java.lang.String
jjs> var b = a + "def"
jjs> b.class
class jdk.nashorn.internal.runtime.ConsString
jjs> var c = String(b)
jjs> c.class
class java.lang.String

2.7 Working with Java Numbers

Nashorn interprets numbers as java.lang.Double, java.lang.Long, or java.lang.Integer objects, depending on the computation performed. You can use the Number() function to force a number to be a Double object, as shown in the following example:

jjs> var intNum = 10
jjs> intNum.class
class java.lang.Integer
jjs> var dblNum = Number(intNum)
jjs> dblNum.class
class java.lang.Double

2.8 Working with Java Collections

Nashorn interprets Java collections as arrays. You can access collection elements using the index in brackets ([]) and iterate over the values of a collection using the for each statement, as shown in the following example:

jjs> var ArrayList = Java.type("java.util.ArrayList")
jjs> var alist = new ArrayList()
jjs> alist.add("a")
true
jjs> alist.add("b")
true
jjs> alist.add("c")
true
jjs> alist[1]
b
jjs> for each (var i in alist) print(i)
a
b
c

Unlike other collections, to iterate over keys and values in a map, you must use the keySet() and values() methods. The following example shows how you can create a HashMap object and iterate over its keys and values:

jjs> var HashMap = Java.type("java.util.HashMap")
jjs> var hm = new HashMap()
jjs> hm.put("name", "Bob")
jjs> hm.put("age", 40)
jjs> hm.put("weight", 180)
jjs> for each (var i in hm.keySet()) print(i)
weight
age
name
jjs> for each (var i in hm.values()) print(i)
180
40
Bob

2.9 Extending Java Classes

You can extend a class using the Java.extend() function that takes a Java type as the first argument and method implementations (in the form of JavaScript functions) as the other arguments. Example 2-1 shows a script that extends the java.lang.Runnable interface and uses it to construct a new java.lang.Thread object.

Example 2-1 Extending a Java Class

var Run = Java.type("java.lang.Runnable");
var MyRun = Java.extend(Run, {
    run: function() {
        print("Run in separate thread");
    }
});
var Thread = Java.type("java.lang.Thread");
var th = new Thread(new MyRun());

Nashorn can automatically extend single abstract method (SAM) classes if you provide the function for implementing the method as the argument to the constructor. Example 2-2 shows a script that extends the java.lang.Runnable interface and uses it to construct a new java.lang.Thread object, but it uses fewer lines of code than in Example 2-1, because the Java.extend() function is called automatically for a SAM class.

Example 2-2 Extending a Java SAM Class

var Thread = Java.type("java.lang.Thread")
var th = new Thread(function() print("Run in a separate thread"))

For more information about the capabilities of the Java.extend() function, see Java Scripting Programmer's Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/programmer_guide/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


List of Examples

  • 3-1 Accessing Methods of a Supreclass (super.js)
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Oracle Java Platform, Standard Edition/Java Scripting Programmer's Guide, Release 8

Documentation Contents
Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide
Contents Previous Next

Oracle Java Platform, Standard Edition

Java Scripting Programmer's Guide

Release 8

E41834-01

August 2013

Describes the use of scripting languages in Java applications, and how to access Java constructs from scripts.

Oracle Java Platform, Standard Edition/Java Scripting Programmer's Guide, Release 8

E41834-01

Copyright 2011, 2013,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document provides an overview of the scripting features in Java Platform, Standard Edition (Java SE).

Audience

This document is intended for Java application programmers who want to execute code written in scripting languages. It is assumed that the you are familiar with Java and a version of the ECMAScript language standard (JavaScript).

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For more information, see the Java Scripting API (the javax.script package) specification at http://docs.oracle.com/javase/7/docs/api/javax/script/package-summary.html

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Scripting Languages and Java

Documentation Contents
Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide
Contents Previous Next

1 Scripting Languages and Java

This chapter describes the characteristics of scripting languages and how they can be used by Java programmers.

Scripting languages are programming languages that support the ability to write scripts. Unlike source files for other programming languages that must be compiled into bytecode before you run them, scripts are evaluated by a runtime environment (in this case, by a script engine) directly.

Most scripting languages are dynamically typed. This enables you to create new variables without declaring the variable type (the interpreter assigns the type based on the type of the object associated with the variable), and you can reuse the same variable for objects of different types (type conversion is performed automatically).

Scripting languages generally have simple syntax; they allow complex tasks to be performed in relatively few steps.

Although scripting languages are usually interpreted at runtime, they can be compiled into Java bytecode that can then be executed on the Java Virtual Machine (JVM). Scripting languages can be faster and easier to use for certain problems, so it is sometimes chosen by developers of Java applications. However, if you write your Java application in a scripting language, then you lose the benefits of the Java language (such as type safety and access to the class library).

Java Specification Request (JSR) 223: Scripting for the Java Platform addresses the issue of integrating Java and scripting languages. It defines a standard framework and application programming interface (API) to embed scripts in your Java applications and access Java objects from scripts. You can find more information about JSR 223 on the Java Community Process (JCP) website at http://jcp.org/en/jsr/detail?id=223

By embedding scripts in your Java code, you can customize and extend the Java application. For example, you can have configuration parameters, business logic, math expressions, and other external parts written as scripts. When developing your Java application, you do not need to choose the scripting language. If you write your application with the Java Scripting API (defined by JSR 223), then users can write scripts in any language compliant with JSR 223. For information about using the Java Scripting API, see Chapter 2.

When writing a script in a language compliant with JSR 223, you have access to the entire standard Java library. For more information about accessing Java from scripts, see Chapter 3.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide
Next

Contents

List of Examples

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 Scripting Languages and Java

2 The Java Scripting API

3 Using Java From Scripts

  • 3.1 Accessing Java Classes
  • 3.2 Importing Java Packages and Classes
  • 3.3 Using Java Arrays
  • 3.4 Implementing Java Interfaces
  • 3.5 Extending Abstract Java Classes
  • 3.6 Extending Concrete Java Classes
  • 3.7 Accessing Methods of a Superclass
  • 3.8 Binding Implementations to Classes
  • 3.9 Selecting Method Overload Variant
  • 3.10 Mapping Data Types
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Java Scripting API

Documentation Contents
Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide
Contents Previous Next

2 The Java Scripting API

This chapter describes how the Java Scripting API (defined by JSR 223) is used to embed scripts in your Java applications, and provides a number of examples with Java classes, which demostrate the features of the Java Scripting API.

The Java Scripting API consists of classes and interfaces from the javax.script package. It is a relatively small and simple package with the ScriptEngineManager class as the starting point. A ScriptEngineManager object can discover script engines through the JAR file service discovery mechanism, and instantiate ScriptEngine objects that interpret scripts written in a specific scripting language. For more information about the javax.script package, see the Java SE specification at http://docs.oracle.com/javase/7/docs/api/javax/script/package-summary.html

The Nashorn engine is the default ECMAScript (JavaScript) engine bundled with the Java SE Development Kit (JDK). The Nashorn engine was developed fully in Java by Oracle as part of an OpenJDK project. You can find more information about the Nashorn project at http://openjdk.java.net/projects/nashorn/

Although Nashorn is the default ECMAScript engine used by the Java Scripting API, you can use any script engine compliant with JSR 223, or you can implement your own. This document does not cover the implementation of script engines compliant with JSR 223, but at the most basic level, you must implement the javax.script.ScriptEngine and javax.script.ScriptEngineFactory interfaces. The abstract class javax.script.AbstractScriptEngine provides useful defaults for a few methods in the ScriptEngine interface.

To use the Java Scripting API:

  1. Create a ScriptEngineManager object.

  2. Get a ScriptEngine object from the manager.

  3. Evaluate the script using the script engine's eval() method.

The following examples shows you how to use the Java Scripting API in Java. To keep the examples simple, exceptions are not handled. However, there are checked and runtime exceptions thrown by the Java Scripting API, and they should be properly handled. In every example, an instance of the ScriptEngineManager class is used to request the Nashorn engine (an object of the ScriptEngine class) using the getEngineByName() method. If the engine with the specified name is not present, null is returned. For more information about using the Nashorn engine, see the Nashorn User's Guide.

Note:

Each ScriptEngine object has its own variable scope. For information about using multiple variable scopes, see Example 8.

Example 1Evaluating a Statement

In this example, the eval() method is called on the script engine instance to execute JavaScript code from a String object.

import javax.script.*;

public class EvalScript {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code
        engine.eval("print('Hello, World')");
    }
}
Example 2Evaluating a Script File

In this example, the eval() method takes in a FileReader object that reads JavaScript code from a file named script.js. By wrapping various input stream objects as readers, it is possible to execute scripts from files, URLs, and other resources.

import javax.script.*;

public class EvalFile {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code
        engine.eval(new java.io.FileReader("script.js"));
    }
}
Example 3Exposing a Java Object as a Global Variable

In this example, a File object is created and exposed to the engine as a global variable named file using the put() method. Then the eval() method is called with JavaScript code that accesses the variable and calls the getAbsolutePath() method.

Note:

The syntax to access fields and call methods of Java objects exposed as variables depends on the scripting language. This example uses JavaScript syntax, which is similar to Java.

import javax.script.*;
import java.io.*;

public class ScriptVars {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // create File object
        File f = new File("test.txt");

        // expose File object as a global variable to the engine
        engine.put("file", f);

        // evaluate JavaScript code and access the variable
        engine.eval("print(file.getAbsolutePath())");
    }
}
Example 4Invoking a Script Function

In this example, the eval() method is called with JavaScript code that defines a function with one parameter. Then, an Invocable object is created and its invokeFunction() method is used to invoke the function.

Note:

Not all script engines implement the Invocable interface. This example uses the Nashorn engine, which can invoke functions in scripts that have previously been evaluated by this engine.

import javax.script.*;

public class InvokeScriptFunction {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code that defines a function with one parameter
        engine.eval("function hello(name) { print('Hello, ' + name) }");

        // create an Invocable object by casting the script engine object
        Invocable inv = (Invocable) engine;

        // invoke the function named "hello" with "Scripting!" as the argument
        inv.invokeFunction("hello", "Scripting!");
    }
}
Example 5Invoking a Script Object's Method

In this example, the eval() method is called with JavaScript code that defines an object with a method. This object is then exposed from the script to the Java application using the script engine's get() method. Then, an Invocable object is created, and its invokeMethod() method is used to invoke the method defined for the script object.

Note:

Not all script engines implement the Invocable interface. This example uses the Nashorn engine, which can invoke methods in scripts that have previously been evaluated by this engine.

import javax.script.*;

public class InvokeScriptMethod {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code that defines an object with one method
        engine.eval("var obj = new Object()");
        engine.eval("obj.hello = function(name) { print('Hello, ' + name) }");

        // expose object defined in the script to the Java application
        Object obj = engine.get("obj");

        // create an Invocable object by casting the script engine object
        Invocable inv = (Invocable) engine;

        // invoke the method named "hello" on the object defined in the script
        // with "Script Method!" as the argument
        inv.invokeMethod(obj, "hello", "Script Method!");
    }
}
Example 6Implementing a Java Interface with Script Functions

In this example, the eval() method is called with JavaScript code that defines a function. Then, an Invocable object is created, and its getInterface() method is used to create a Runnable interface object. The methods of the interface are implemented by script functions with matching names (in this case, the run() function is used to implement the run() method in the interface object). Finally, a new thread is started that runs the script function.

import javax.script.*;

public class ImplementRunnable {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code that defines a function with one parameter
        engine.eval("function run() { print('run() function called') }");

        // create an Invocable object by casting the script engine object
        Invocable inv = (Invocable) engine;

        // get Runnable interface object
        Runnable r = inv.getInterface(Runnable.class);

        // start a new thread that runs the script
        Thread th = new Thread(r);
        th.start();
        th.join();
    }
}
Example 7Implementing a Java Interface with the Script Object's Methods

In this example, the eval() method is called with JavaScript code that defines an object with a method. This object is then exposed from the script to the Java application using the script engine's get() method. Then, an Invocable object is created, and its getInterface() method is used to create a Runnable interface object. The methods of the interface are implemented by the script object's methods with matching names (in this case, the run method of the obj object is used to implement the run() method in the interface object). Finally, a new thread is started that runs the script object's method.

import javax.script.*;

public class ImplementRunnableObject {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // evaluate JavaScript code that defines a function with one parameter
        engine.eval("var obj = new Object()")
        engine.eval("obj.run = function() { print('obj.run() method called') }");

        // expose object defined in the script to the Java application
        Object obj = engine.get("obj");

        // create an Invocable object by casting the script engine object
        Invocable inv = (Invocable) engine;

        // get Runnable interface object
        Runnable r = inv.getInterface(obj, Runnable.class);

        // start a new thread that runs the script
        Thread th = new Thread(r);
        th.start();
        th.join();
    }
}
Example 8Using Multiple Scopes

In this example, the script engine's put() method is used to set the variable x to a String object hello. Then, the eval() method is used to print the variable in the default scope. Then, a different script context is defined, and its scope is used to set the same variable to a different value (a String object world). Finally, the variable is printed in the new script context that displays a different value.

A single scope is an instance of the javax.script.Bindings interface. This interface is derived from the java.util.Map<String, Object> interface. A scope is a set of name and value pairs where the name is a non-empty, non-null String object. The javax.script.ScriptContext interface supports multiple scopes with associated Bindings for each scope. By default, every script engine has a default script context. The default script context has at least one scope represented by the static field ENGINE_SCOPE. Various scopes supported by a script context are available through the getScopes() method.

import javax.script.*;

public class MultipleScopes {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("nashorn");

        // set global variable
        engine.put("x","hello");

        // evaluate JavaScript code that prints the variable (x = "hello")
        engine.eval("print(x)");

        // define a different script context
        ScriptContext newContext = new SimpleScriptContext();
        newContext.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
        Bindings engineScope = newContext.getBindings(ScriptContext.ENGINE_SCOPE);

        // set the variable to a different value in another scope
        engineScope.put("x", "world");

        // evaluate the same code but in a different script context (x = "world")
        engine.eval("print(x)", newContext);
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Java From Scripts

Documentation Contents
Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide
Contents Previous

3 Using Java From Scripts

This chapter describes how to access Java classes and interfaces from scripts.

The code snippets are written in JavaScript, but you can use any scripting language compliant with JSR 223. Examples can be used as script files, or can be run in an interactive shell one expression at a time. The syntax for accessing fields and methods of objects is the same in JavaScript as it is in Java.

This chapter contains the following sections:

  • Section 3.1, "Accessing Java Classes"

  • Section 3.2, "Importing Java Packages and Classes"

  • Section 3.3, "Using Java Arrays"

  • Section 3.4, "Implementing Java Interfaces"

  • Section 3.5, "Extending Abstract Java Classes"

  • Section 3.6, "Extending Concrete Java Classes"

  • Section 3.7, "Accessing Methods of a Superclass"

  • Section 3.8, "Binding Implementations to Classes"

  • Section 3.9, "Selecting Method Overload Variant"

  • Section 3.10, "Mapping Data Types"

3.1 Accessing Java Classes

To access primitive and reference Java types from JavaScript, call the Java.type() function, which returns a type object that corresponds to the full name of the class passed in as a string. The following example shows you how to get various type objects:

var ArrayList = Java.type("java.util.ArrayList");
var intType = Java.type("int");
var StringArrayType = Java.type("java.lang.String[]");
var int2DArrayType = Java.type("int[][]");

The type object returned by the Java.type() function can be used in JavaScript code similar to how a class name is used in Java. For example, you can can use it to instantiate new objects as follows:

var anArrayList = new Java.type("java.util.ArrayList");

Java type objects can be used to instantiate new Java objects. The following example shows you how to instantiate new objects using the default constructor and by passing arguments to another constructor:

var ArrayList = Java.type("java.util.ArrayList");
var defaultSizeArrayList = new ArrayList;
var customSizeArrayList = new ArrayList(16);

You can use the type object returned by the Java.type() function to access static fields and methods as follows:

var File = Java.type("java.io.File");
File.createTempFile("nashorn", ".tmp");

To access a static inner class, use the dollar sign ($) in the argument passed to the Java.type() method. The following example shows how to return the type object of the Float inner class in java.awt.geom.Arc2D:

var Float = Java.type("java.awt.geom.Arc2D$Float");

If you already have the outer class type object, then you can access the inner class as a property of the outer class as follows:

var Arc2D = Java.type("java.awt.geom.Arc2D")
var Float = Arc2D.Float

In case of a nonstatic inner class, you must pass an instance of the outer class as the first argument to the constructor.

Although a type object in JavaScript is used similar to the Java class, it is distinct from the java.lang.Class object, which is returned by the getClass() method. You can obtain one from the other using the class and static properties. The following example shows this distinction:

var ArrayList = Java.type("java.util.ArrayList");
var a = new ArrayList;

// All of the following are true:
print("Type acts as target of instanceof: " + (a instanceof ArrayList));
print("Class doesn't act as target of instanceof: " + !(a instanceof a.getClass()));
print("Type is not the same as instance's getClass(): " + (a.getClass() !== ArrayList));
print("Type's `class` property is the same as instance's getClass(): " + (a.getClass() === ArrayList.class));
print("Type is the same as the `static` property of the instance's getClass(): " + (a.getClass().static === ArrayList));

Syntactically and semantically, this distinction between compile-time class expressions and runtime class objects makes JavaScript similar to Java code. However, there is no equivalent of the static property for a Class object in Java, because compile-time class expressions are never expressed as objects.

3.2 Importing Java Packages and Classes

To access Java classes by their simple names, you can use the importPackage() and importClass() functions to import Java packages and classes. These functions are built into the compatibility script (mozilla_compat.js). The following example shows you how to use the importPackage() and importClass() functions:

// Load compatibility script
load("nashorn:mozilla_compat.js");
// Import the java.awt package
importPackage(java.awt);
// Import the java.awt.Frame class
importClass(java.awt.Frame);
// Create a new Frame object
var frame = new java.awt.Frame("hello");
// Call the setVisible() method
frame.setVisible(true);
// Access a JavaBean property
print(frame.title);

You can access Java packages using the Packages global variable (for example, Packages.java.util.Vector or Packages.javax.swing.JFrame), but standard Java SE packages have shortcuts (java for Packages.java, javax for Packages.javax, and org for Packages.org).

The java.lang package is not imported by default, because its classes would conflict with Object, Boolean, Math, and other built-in JavaScript objects. Furthermore, importing any Java package or class can lead to conflicts with the global variable scope in JavaScript. To avoid this, define a JavaImporter object and use the with statement to limit the scope of the imported Java packages and classes, as shown in the following example:

// Create a JavaImporter object with specified packages and classes to import
var Gui = new JavaImporter(java.awt, javax.swing);

// Pass the JavaImporter object to the "with" statement and access the classes
// from the imported packages by their simple names within the statement's body
with (Gui) {
    var awtframe = new Frame("AWT Frame");
    var jframe = new JFrame("Swing JFrame");
};

3.3 Using Java Arrays

To create a Java array object, you first have to get the Java array type object, and then instantiate it. The syntax for accessing array elements and the length property in JavaScript is the same as in Java, as shown in the following example:

var StringArray = Java.type("java.lang.String[]");
var a = new StringArray(5);

// Set the value of the first element
a[0] = "Scripting is great!";
// Print the length of the array
print(a.length);
// Print the value of the first element
print(a[0]);

Given a JavaScript array, you can convert it to a Java array using the Java.to() method. You must pass the JavaScript array variable to this method and the type of array to be returned, either as a string or a type object. You can also omit the array type argument to return an Object[] array. Conversion is performed according to the ECMAScript conversion rules. The following example shows you how to convert a JavaScript array to a Java array using various Java.to() method arguments:

// Create a JavaScript array
var anArray = [1, "13", false];

// Convert the JavaScript array to a Java int[] array
var javaIntArray = Java.to(anArray, "int[]");
print(javaIntArray[0]); // prints the number 1
print(javaIntArray[1]); // prints the number 13
print(javaIntArray[2]); // prints the number 0

// Convert the JavaScript array to a Java String[] array
var javaStringArray = Java.to(anArray, Java.type("java.lang.String[]"));
print(javaStringArray[0]); // prints the string "1"
print(javaStringArray[1]); // prints the string "13"
print(javaStringArray[2]); // prints the string "false"

// Convert the JavaScript array to a Java Object[] array
var javaObjectArray = Java.to(anArray);
print(javaObjectArray[0]); // prints the number 1
print(javaObjectArray[1]); // prints the string "13"
print(javaObjectArray[2]); // prints the boolean value "false"

Given a Java array, you can convert it to a JavaScript array using the Java.from() method. The following example shows you how to convert a Java array that contains a list of files in the current directory to a JavaScript array with the same contents:

// Get the Java File type object
var File = Java.type("java.io.File");
// Create a Java array of File objects
var listCurDir = new File(".").listFiles();
// Convert the Java array to a JavaScript array
var jsList = Java.from(listCurDir);
// Print the JavaScript array
print(jsList);

Note:

In most cases, you can use the Java array in scripts without converting the Java array to a JavaScript array.

3.4 Implementing Java Interfaces

The syntax for implementing a Java interface in JavaScript is similar to how anonymous classes are declared in Java. You instantiate an interface and implement its methods (as JavaScript functions) in the same expression. The following example shows you how to implement the Runnable interface:

// Create an object that implements the Runnable interface by implementing
// the run() method as a JavaScript function
var r  = new java.lang.Runnable() {
    run: function() {
        print("running...\n");
    }
};

// The r variable can be passed to Java methods that expect an object implementing
// the java.lang.Runnable interface
var th = new java.lang.Thread(r);
th.start();
th.join();

If a method expects an object that implements an interface with only one method, you can pass a script function to this method instead of the object. For instance, in the previous example, the Thread() constructor expects an object that implements the Runnable interface, which defines only one method. You can take advantage of automatic conversion and pass a script function to the Thread() constructor instead of the object. The following example shows you how you can create a Thread object without implementing the Runnable interface:

// Define a JavaScript function
function func() {
    print("I am func!");
};

// Pass the JavaScript function instead of an object that implements
// the java.lang.Runnable interface
var th = new java.lang.Thread(func);
th.start();
th.join();

You can implement multiple interfaces in a subclass by passing the relevant type objects to the Java.extend() function. For more information, see Extending Concrete Java Classes.

3.5 Extending Abstract Java Classes

You can instantiate an anonymous subclass of an abstract Java class by passing to its constructor a JavaScript object with properties whose values are functions that implement the abstract methods. If a method is overloaded, then the JavaScript function will provide implementations for all variants of the method. The following example shows you how to instantiate a subclass of the abstract TimerTask class:

var TimerTask =  Java.type("java.util.TimerTask");
var task = new TimerTask({ run: function() { print("Hello World!") } });

Instead of invoking the constructor and passing an argument to it, you can provide the argument directly after the new expression. The following example shows you how this syntax (similar to Java anonymous inner class definition) can simplify the second line in the previous example:

var task = new TimerTask {
    run: function() {
        print("Hello World!")
    }
};

If the abstract class has a single abstract method (a SAM type), then instead of passing a JavaScript object to the constructor, you can pass the function that implements the method. The following example shows how you can simplify the syntax when using a SAM type:

var task = new TimerTask(function() { print("Hello World!") });

Whichever syntax you choose, if you need to invoke a constructor with arguments, you can specify the arguments after the implementation object or function.

If you want to invoke a Java method that takes a SAM type as the argument, you can pass a JavaScript function to the method. Nashorn will instantiate a subclass of the expected class and use the function to implement its only abstract method. The following example shows you how to invoke the Timer.schedule() method, which expects a TimerTask object as the argument:

var Timer = Java.type("java.util.Timer");
Timer.schedule(function() { print("Hello World!") });

Note:

The previous syntax assumes that the expected SAM type is either an interface or it has a default constructor, which is used by Nashorn to instatiate a subclass of the expected class. It is not possible to use a non-default constructor.

3.6 Extending Concrete Java Classes

To avoid ambiguity, the syntax for extending abstract classes is not allowed for concrete classes. Because a concrete class can be instantiated, such syntax may be interpreted as an attempt to create a new instance of the class and pass to it an object of the type expected by the constructor (in case when the expected object type is an interface). As an illustration of this, consider the following example:

var t = new java.lang.Thread({ run: function() { print("Thread running!") } });

This code can be interpreted both as extending the Thread class with the specified implementation of the run() method, and the instantiation of the Thread class by passing to its constructor an object that implenents the Runnable interface (for more information, see Implementing Java Interfaces).

To extend a concrete Java class, pass its type object to the Java.extend() function that returns a type object of the subclass. Then, use the type object of the subclass as a JavaScript-to-Java adapter to create instances of the subclass with the specified method implementations. The following example shows you how to extend the Thread class with the specified implementation of the run() method:

var Thread = Java.type("java.lang.Thread");
var threadExtender = Java.extend(Thread);
var t = new threadExtender() {
    run: function() { print("Thread running!") }};

The Java.extend() function can take a list of multiple type objects. You can specify no more than one type object of a Java class, and as many type objects of Java interfaces as you want. The returned type object extends the specified class (or java.lang.Object if no class is specified) and implements all interfaces. The class type object does not have to be first in the list.

3.7 Accessing Methods of a Superclass

To access methods in the superclass, you can use the Java.super() function. Example 3-1 shows you how to extend the java.lang.Exception class and access the methods in the superclass.

Example 3-1 Accessing Methods of a Supreclass (super.js)

var Exception = Java.type("java.lang.Exception");
var ExceptionAdapter = Java.extend(Exception);

var exception = new ExceptionAdapter("My Exception Message") {
    getMessage: function() {
        var _super_ = Java.super(exception);
        return _super_.getMessage().toUpperCase();
    }
}

try {
    throw exception;
} catch (ex) {
    print(exception);
}

If you run the code in Example 3-1, the following will be printed to standard output:

jdk.nashorn.javaadapters.java.lang.Exception: MY EXCEPTION MESSAGE

3.8 Binding Implementations to Classes

The previous sections described how to extend Java classes and implement interfaces using an extra JavaScript object parameter in the constructor that specifies the implementation. The implementation is therefore bound to the actual instance created with new, and not to the whole class. This has some advantages, for example, in the memory footprint of the runtime, because Nashorn can create a single universal adapter for every combination of types being implemented. However, the following example shows that different instances have the same Java class regardless of them having different JavaScript implementation objects:

var Runnable = java.lang.Runnable;
var r1 = new Runnable(function() { print("I'm runnable 1!") });
var r2 = new Runnable(function() { print("I'm runnable 2!") });
r1.run();
r2.run();
print("We share the same class: " + (r1.class === r2.class));

The previous example prints the following:

I'm runnable 1!
I'm runnable 2!
We share the same class: true

If you want to pass the class for instantiation to an external API (for example, when using the JavaFX framework, the Application class is passed to the JavaFX API, which instantiates it), you must extend a Java class or implement an interface with the implementation bound to the class, rather than to its instances. You can bind the implementation to the class by passing a JavaScript object with the implementation as the last argument to the Java.extend() function. This creates a class with the same constructors as the original class, because they do not need an extra implementation object parameter. The following example shows you how to bind implementations to the class, and demonstrates that in this case the implementation classes for different invocations are different:

var RunnableImpl1 = Java.extend(java.lang.Runnable, function() { print("I'm runnable 1!") });
var RunnableImpl2 = Java.extend(java.lang.Runnable, function() { print("I'm runnable 2!") });
var r1 = new RunnableImpl1();var r2 = new RunnableImpl2();
r1.run();
r2.run();
print("We share the same class: " + (r1.class === r2.class));

The previous example prints the following:

I'm runnable 1!
I'm runnable 2!
We share the same class: false

Moving the implementation objects from the constructor invocations to the invocations of the Java.extend() functions eliminates the need for an extra argument in the constructor invocations. Every invocation of the Java.extend() function with a class-specific implementation object produces a new Java adapter class.The adapter classes with class-bound implementations can still take an additional constructor argument to further override the behavior for certain instances. Thus, you can combine the two approaches: you can provide part of the implementation in a class-based JavaScript implementation object passed to the Java.extend() function, and provide implementations for instances in objects passed to the constructor. A function defined by the object passed to the constructer overrides the function defined by the class-bound object. The following example shows you how to override the function defined in the class-bound object with a function passed to the constructor:

var RunnableImpl = Java.extend(java.lang.Runnable, function() { print("I'm runnable 1!") });
var r1 = new RunnableImpl();
var r2 = new RunnableImpl(function() { print("I'm runnable 2!") });
r1.run();
r2.run();
print("We share the same class: " + (r1.class === r2.class));

The previous example prints the following:

I'm runnable 1!
I'm runnable 2!
We share the same class: true

3.9 Selecting Method Overload Variant

Java methods can be overloaded by argument types. The Java Compiler (javac) selects the correct method variant during compilation. Overload resolution for Java methods called from Nashorn is performed when the method is invoked. The correct variant is selected automatically based on the argument types. However, if you run into genuine ambiguity with actual argument types, you can specify a particular overload variant explicitly. This may also improve performance, because the Nashorn engine will not need to perform overload resolution during invocation.

Overload variants are exposed as special properties. You can refer to them in the form of strings that contain the name of the method followed by the argument types within parantheses. The following example shows how to invoke the variant of the System.out.println() method that expects an Object class as the argument, and pass "hello" to it:

var out = java.lang.System.out;
out["println(Object)"]("hello");

In the previous example, the unqualified class name (Object) is sufficient, because it uniquely identifies the correct signature. The only case when you must use the fully qualified class names in the signature is when two overload variants use different parameter types with identical unqualified names (this is possible if parameter types with the same name are from different packages).

3.10 Mapping Data Types

Most conversions between Java and JavaScript work as you expect. Previous sections described some of the less evident data type mappings between Java and JavaScript. For example, arrays must be explicitly converted, and JavaScript functions are automatically converted to SAM types when they are passed as parameters to Java methods.Every JavaScript object implements the java.util.Map interface to enable APIs to receive maps directly. When numbers are passed to a Java API, they are converted to the expected target numeric type, either boxed or primitive. However, if the target type is less specific (for example, Number), you can only expect them to be of type Number, and must test specifically for whether the type is a boxed Double, Integer, Long, and so on. The number can be any boxed type due to internal optimizations. Also, you can pass any JavaScript value to a Java API expecting either a boxed or primitive number, because the ToNumber conversion algorithm defined by the JavaScript specification will be applied to the value.If a Java method expects a String or a Boolean object, the values will be converted using all conversions allowed by the ToString and ToBoolean conversions defined by the JavaScript specification.

Caution:

Due to internal performance optimizations of string operations, JavaScript strings are not always necessarily of type java.lang.String, but they are of type java.lang.CharSequence. If you pass a JavaScript string to a Java method that expects a java.lang.String argument, then you will receive a Java String, but if the signature of your method is more generic (that is, if it expects a java.lang.Object parameter, for example), you can get an object of the private engine implementation class that implements CharSequence but is not a Java String object.

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Access Control Lists

Documentation Contents

Access Control Abstractions

Last Modified: 30 April 2001

java.security.acl

Introduction

An Access Control List (ACL) is a data structure that guards access to resources. The java.security.acl package provides the interface to such a data structure and the sun.security.acl package provides a default implementation of the interfaces specified in the java.security.acl package.

Note: This API is not used internally for JDK system security. It was introduced in JDK 1.1, and remains for backwards compatibility. It may undergo substantial revision and extension or even replacement in future releases. This document describes the current interfaces.

An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type AclEntry, contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied.

An access control list is independent of the authentication scheme used to verify the validity of the principal. It is also independent of the encryption scheme used to transmit the data across the network. The ACL is consulted after the authentication phase. After the principal is verified to be an authenticated user in the system, the principal might access resources. For each such resource, the principal might or might not be granted access depending on the permissions that are granted to the principal in the ACL that guards the resource. The ACL itself is independent of the resource that it guards. The ACL can be consulted to find the list of permissions a particular principal has or to find out whether or not a principal is granted a particular permission.

ACL structure

An ACL is an object that implements the java.security.acl.Acl interface. Each Acl is a list of AclEntry objects. Each AclEntry associates a Principal or a Group object to a list of Permission objects. (Note: Group is a subclass of Principal.) Each AclEntry can also be designated as a positive entry or a negative entry. A positive entry grants the list of permissions in the entry to the principal or group and a negative entry denies the list of permissions to the principal or group.

Calculation of granted permissions

When calculating the net permissions a principal is granted, the following rules are used.

  1. Each principal or group can have at most one positive ACL entry and one negative entry; that is, multiple positive or negative ACL entries are not allowed for any principal or group.
  2. If there is no entry for a particular principal or a group, then the principal or the group has the null permission set.
  3. The net group positive permission set for a principal is the union of all the positive permissions of each group that the principal belongs to.
  4. The net group negative permission set for a principal is the union of all the negative permissions of each group that the principal belongs to.
  5. If there is a positive entry that grants a principal or a group a particular permission and a negative entry that denies the principal or group the same permission, then that permission is removed from both the positive permissions set and the negative permissions set.
  6. Individual permissions (permissions granted or denied to a specific principal) always override the Group permissions. Specifically, individual negative permissions (specific denial of permissions) override the group's positive permissions. And individual positive permissions override the group's negative permissions.
  7. Assume that the positive permission set of all the groups that the principal belongs to is g1 and the negative permission set of all the groups that the principal belongs to is g2. Also assume that the individual positive permission set for the principal is p1 and the individual negative permission set for the principal is p2. Then the resulting permissions that the principal is granted are (p1 + (g1 - p2)) - (p2 + (g2 - p1)).

Example permission calculations

Assume that a principal P belongs to groups G1 and G2. The table below shows 5 columns using some examples of permissions given to G1, G2 and P. The resulting permissions granted to P are shown in the last column.

 | Group G1 Permissions | Group G2 Permissions | Union (G1, G2) perms | Individual Permissions | Resulting Permissions
Positive | A | B | A+B | C | A+B+C
Negative | null set | null set | null set | null set | A+B+C
Positive | A | B | B | C | B+C
Negative | -C | -A | -C | null set | B+C
Positive | A | B | A+B | C | B+C
Negative | null set | null set | null set | -A | B+C
Positive | A | C | A | B | B
Negative | -C | -B | -B | -A | B

Example usage

/* Note: This sample program is meant just as an example
 * of the types of things that can be done with an
 * implementation of the java.security.acl interfaces.
 * This example uses the implementation supplied by the
 * sun.security.acl package. Please note that sun.* classes
 * are unsupported and subject to change.
*/

import java.security.Principal;
import java.security.acl.*;
import sun.security.acl.*;
import java.util.Enumeration;

public class AclEx {

  public static void main(String argv[])
    throws Exception
  {

    Principal p1 = new PrincipalImpl("user1");
    Principal p2 = new PrincipalImpl("user2");
    Principal owner = new PrincipalImpl("owner");

    Permission read = new PermissionImpl("READ");
    Permission write = new PermissionImpl("WRITE");

    System.out.println("Creating a new group with two members: user1 and
user2");
    Group g = new GroupImpl("group1");
    g.addMember(p1);
    g.addMember(p2);

    //
    // create a new acl with the name "exampleAcl"
    //
    System.out.println("Creating a new Acl named 'exampleAcl'");
    Acl acl = new AclImpl(owner, "exampleAcl");

    //
    // Allow group all permissions
    //
    System.out.println("Creating a new Acl Entry in exampleAcl for the
group, ");
    System.out.println("  with read & write permissions");
    AclEntry entry1 = new AclEntryImpl(g);
    entry1.addPermission(read);
    entry1.addPermission(write);
    acl.addEntry(owner, entry1);

    //
    // Take away WRITE permissions for
    // user1. All others in groups still have
    // WRITE privileges.
    //
    System.out.println("Creating a new Acl Entry in exampleAcl for user1");
    System.out.println("  without write permission");
    AclEntry entry2 = new AclEntryImpl(p1);
    entry2.addPermission(write);
    entry2.setNegativePermissions();
    acl.addEntry(owner, entry2);

    //
    // This enumeration is an enumeration of
    // Permission interfaces. It should return
    // only "READ" permission.
    Enumeration e1 = acl.getPermissions(p1);
    System.out.println("Permissions for user1 are:");
    while (e1.hasMoreElements()) {
        System.out.println("  " + e1.nextElement());
        };

    //
    // This enumeration should have "READ" and"WRITE"
    // permissions.
    Enumeration e2 = acl.getPermissions(p2);
    System.out.println("Permissions for user2 are:");
    while (e2.hasMoreElements()) {
        System.out.println("  " + e2.nextElement());
        };

    // This should return false.
    boolean b1 = acl.checkPermission(p1, write);
    System.out.println("user1 has write permission: " + b1);

    // This should all return true;
    boolean b2 = acl.checkPermission(p1, read);
    boolean b3 = acl.checkPermission(p2, read);
    boolean b4 = acl.checkPermission(p2, write);
    System.out.println("user1 has read permission: " + b2);
    System.out.println("user2 has read permission: " + b3);
    System.out.println("user2 has write permission: " + b4);
  }
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


API for Privileged Blocks

This document provides background information about what privileged code is and what it is used for, followed by illustrations of the use of the API. It covers the following topics:

  • What It Means to Have Privileged Code
  • Using the doPrivileged API
    • No Return Value, No Exception Thrown
    • Returning Values
    • Accessing Local Variables
    • Handling Exceptions
    • Asserting a Subset of Privileges
      • Least Privilege
      • More Privilege
  • Reflection

What It Means to Have Privileged Code

The policy for a JDK installation specifies what permissions — which types of system resource accesses — are allowed for code from specified code sources. A code source (of type CodeSource) essentially consists of the code location (URL) and a reference to the certificates containing the public keys corresponding to the private keys used to sign the code (if it was signed).

The policy is represented by a Policy object. More specifically, it is represented by a Policy subclass providing an implementation of the abstract methods in the Policy class (which is in the java.security package).

The source location for the policy information used by the Policy object depends on the Policy implementation. The Policy reference implementation obtains its information from policy configuration files. See Default Policy Implementation and Policy File Syntax for information about the Policy reference implementation and the syntax that must be used in policy files it reads. For information about using the Policy Tool to create a policy file (without needing to know the required syntax), see the Policy Tool documentation (for Unix) (for Windows).

A protection domain encompasses a CodeSource instance and the permissions granted to code from that CodeSource, as determined by the security policy currently in effect. Thus, classes signed by the same keys and from the same URL are typically placed in the same domain, and a class belongs to one and only one protection domain. (However, classes signed by the same keys and from the same URL but loaded by separate class loader instances are typically placed in separate domains.) Classes that have the same permissions but are from different code sources belong to different domains.

Currently, all classes shipped with the JDK are loaded with all permissions (this may change in future releases). Most of these classes are placed in a unique system domain. In addition, the extension class loader loads code from JAR files contained in the $JAVA_HOME/jre/lib/ext directory into separate domains (because the code in these JAR files have unique URLs), but these domains are separate from the unique system domain reserved for classes shipped with the JDK.

Each applet or application runs in its appropriate domain, determined by its code source. For an applet (or an application running under a security manager) to be allowed to perform a secured action (such as reading or writing a file), the applet or application must be granted permission for that particular action.

More specifically, whenever a resource access is attempted, all code traversed by the execution thread up to that point must have permission for that resource access, unless some code on the thread has been marked as privileged. That is, suppose that access control checking occurs in a thread of execution that has a chain of multiple callers. (Think of this as multiple method calls that potentially cross the protection domain boundaries.) When the AccessController.checkPermission method is invoked by the most recent caller, the basic algorithm for deciding whether to allow or deny the requested access is as follows: If the code for any caller in the call chain does not have the requested permission, then an AccessControlException is thrown, unless the following is true: a caller whose code is granted the said permission has been marked as privileged, and all parties subsequently called by this caller (directly or indirectly) have the said permission.

Note that the method AccessController.checkPermission is normally invoked indirectly through invocations of specific SecurityManager methods that begin with the word check such as checkConnect or through the method SecurityManager.checkPermission. Normally, these checks only occur if a SecurityManager has been installed; code checked by the AccessController.checkPermission method first checks if the method System.getSecurityManager returns null.

Marking code as privileged enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it. This is necessary in some situations. For example, an application might not be allowed direct access to files that contain fonts, but the system utility to display a document must obtain those fonts, on behalf of the user. The system utility must become privileged in order to obtain the fonts.

Using the doPrivileged API

The use of the privileged feature is described in the following sections.

No Return Value, No Exception Thrown

If you do not need to return a value from within the privileged block, your call to doPrivileged can look like the following example, which specifies privileged code three ways: in a class that implements the interface PrivilegedAction, in an anonymous class, and in a lambda expression:

import java.security.*;

public class NoReturnNoException {

    class MyAction implements PrivilegedAction<Void> {
        public Void run() {
            // Privileged code goes here, for example:
            System.loadLibrary("awt");
            return null; // nothing to return
        }
    }

    public void somemethod() {

        MyAction mya = new MyAction();

        // Become privileged:
        AccessController.doPrivileged(mya);

        // Anonymous class
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
            public Void run() {
                // Privileged code goes here, for example:
                System.loadLibrary("awt");
                return null; // nothing to return
            }
        });

        // Lambda expression
        AccessController.doPrivileged((PrivilegedAction<Void>)
            () -> {
                // Privileged code goes here, for example:
                System.loadLibrary("awt");
                return null; // nothing to return
            }
        );
    }

    public static void main(String... args) {
        NoReturnNoException myApplication = new NoReturnNoException();
        myApplication.somemethod();
    }
}

The AccessController.doPrivileged method takes an object of type java.security.PrivilegedAction and invokes its run method in privileged mode. The implementation guarantees that privileges will be revoked after the run method is executed, even if execution of doPrivileged is interrupted by an asynchronous exception. Note that the invocation of doPrivileged with a lambda expression explicitly casts the lambda expression as of type PrivilegedAction<Void>. Another version of the method doPrivileged exists that takes an object of type PrivilegedExceptionAction; see Handling Exceptions for more information about this version.

PrivilegedAction is a functional interface with a single abstract method, named run, that returns a value of type specified by its type parameter.

Note that this example ignores the return value of the run method. Also, depending on what privileged code actually consists of, you might have to make some changes due to the way inner classes work. For example, if privileged code throws an exception or attempts to access local variables, then you will have to make some changes, which is described later.

Be very careful in your use of the privileged construct, and always remember to make the privileged code section as small as possible. That is, try to limit the code within the run method to only what needs to be run with privileges, and do more general things outside the run method. Also note that the call to doPrivileged should be made in the code that wants to enable its privileges. Do not be tempted to write a utility class that itself calls doPrivileged as that could lead to security holes. You can write utility classes for PrivilegedAction classes though, as shown in the preceding example. See Guideline 9-3: Safely invoke java.security.AccessController.doPrivileged in Secure Coding Guidelines for the Java Programming Language for more information.

Returning Values

If you need to return a value, then you can do something like the following:

System.out.println(
    AccessController.doPrivileged((PrivilegedAction<String>)
        () -> System.getProperty("user.name")
    )
);

Accessing Local Variables

If you are using a lambda expression or anonymous inner class, then any local variables you access must be final or effectively final. For example:

String lib = "awt";
AccessController.doPrivileged((PrivilegedAction<Void>)
    () -> {
        System.loadLibrary(lib);
        return null; // nothing to return
    }
);

AccessController.doPrivileged(new PrivilegedAction<Void>() {
    public Object run() {
        System.loadLibrary(lib);
        return null; // nothing to return
    }
});

The variable lib is effectively final because its value has not been modified. For example, suppose you add the following assignment statement after the declaration of the variable lib:

lib = "swing";

The compiler generates the following errors when it encounters the invocation System.loadLibrary both in the lambda expression and the anonymous class:

  • error: local variables referenced from a lambda expression must be final or effectively final
  • error: local variables referenced from an inner class must be final or effectively final

See Accessing Members of an Enclosing Class in Local Classes for more information.

If there are cases where you cannot make an existing variable effectively final (because it gets set multiple times), then you can create a new final variable right before invoking the doPrivileged method, and set that variable equal to the other variable. For example:

String lib;

// The lib variable gets set multiple times so you can't make it
// effectively final.

// Create a final String that you can use inside of the run method
final String fLib = lib;

AccessController.doPrivileged((PrivilegedAction<Void>)
    () -> {
        System.loadLibrary(fLib);
        return null; // nothing to return
    }
);

Handling Exceptions

If the action performed in your run method could throw a checked exception (one that must be listed in the throws clause of a method), then you need to use the PrivilegedExceptionAction interface instead of the PrivilegedAction interface:

public void processSomefile() throws IOException {

    try {
        Path path = FileSystems.getDefault().getPath("somefile");
        BufferedReader br = AccessController.doPrivileged(
            (PrivilegedExceptionAction<BufferedReader>)
                () -> Files.newBufferedReader(path)
        );
        // ... read from file and do something
    } catch (PrivilegedActionException e) {

        // e.getException() should be an instance of IOException
        // as only checked exceptions will be wrapped in a
        // PrivilegedActionException.
        throw (IOException) e.getException();
    }
}

If a checked exception is thrown during execution of the run method, then it is placed in a PrivilegedActionException wrapper exception that is then thrown and should be caught by your code, as illustrated in this example.

Asserting a Subset of Privileges

As of JDK 8, a variant of AccessController.doPrivileged is available that enables code to assert a subset of its privileges, without preventing the full traversal of the stack to check for other permissions. This variant of the doPrivileged variant has three parameters, one of which you use to specify this subset of privileges. For example, the following excerpt asserts a privilege to retrieve system properties:

// Returns the value of the specified property. All code
// is allowed to read the app.version and app.vendor
// properties.

public String getProperty(final String prop) {
    return AccessController.doPrivileged(
        (PrivilegedAction<String>) () -> System.getProperty(prop),
        null,
        new java.util.PropertyPermission("app.version", "read"),
        new java.util.PropertyPermission("app.vendor", "read")
    );
}

The first parameter of this version of doPrivileged is of type java.security.PrivilegedAction. In this example, the first parameter is a lambda expression that implements the functional interface PrivilegedAction whose run method returns the value of the system property specified by the parameter prop.

The second parameter of this version of doPrivileged is of type AccessControlContext. Sometimes you need to perform an additional security check within a different context, such as a worker thread. You can obtain an AccessControlContext instance from a particular calling context with the method AccessControlContext.getContext. If you specify null for this parameter (as in this example), then the invocation of doPrivileged does not perform any additional security checks.

The third parameter of this version of doPrivileged is of type Permission..., which is a varargs parameter. This means that you can specify one or more Permission parameters or an array of Permission objects, as in Permission[]. In this example, the invocation of doPrivileged can retrieve the properties app.version and app.vendor.

You can use this three parameter variant of doPrivileged in a mode of least privilege or a mode of more privilege.

Least Privilege

The typical use case of the doPrivileged method is to enable the method that invokes it to perform one or more actions that require permission checks without requiring the callers of the current method to have all the necessary permissions. For example, the current method might need to open a file or make a network request for its own internal implementation purposes.

Before JDK 8, calls to doPrivileged methods had only two parameters. They worked by granting temporary privileges to the calling method and stopping the normal full traversal of the stack for access checking when it reached that class, rather than continuing up the call stack where it might reach a method whose defining class does not have the required permission. Typically, the class that is calling doPrivileged might have additional permissions that are not required in that code path and which might also be missing from some caller classes.

Normally, these extra permissions are not exercised at runtime. Not elevating them through use of doPrivileged helps to block exploitation of any incorrect code that could perform unintended actions. This is especially true when the PrivilegedAction is more complex than usual, or when it calls code outside the class or package boundary that might evolve independently over time.

The three-parameter variant of doPrivileged is generally safer to use because it avoids unnecessarily elevating permissions that are not intended to be required. However, it executes less efficiently so simple or performance-critical code paths might choose not to use it.

More Privilege

Sometimes when coding the current method, you want to temporarily extend the permission of the calling method to perform an action. For example, a framework I/O API might have a general purpose method for opening files of a particular data format. This API would take a normal file path parameter and use it to open an underlying FileInputStream using the calling code's permissions. However, this might also allow any caller to open the data files in a special directory that contains some standard demonstration samples.

The callers of this API could be directly granted a FilePermission for read access. However, it might not be convenient or possible for the security policy of the calling code to be updated. For example, the calling code could be a sandboxed applet.

One way to implement this is for the code to check the incoming path and determine if it refers to a file in the special directory. If it does, then it would call doPrivileged, enabling all permissions, then open the file inside the PrivilegedAction. If the file was not in the special directory, the code would open the file without using doPrivileged.

This technique requires the implementation to carefully handle the requested file path to determine if it refers to the special shared directory. The file path must be canonicalized before calling doPrivileged so that any relative path will be processed (and permission to read the user.dir system property will be checked) prior to determining if the path refers to a file in the special directory. It must also prevent malicious "../" path elements meant to escape out of the special directory.

A simpler and better implementation would use the variant of doPrivileged with the third parameter. It would pass a FilePermission with read access to the special directory as the third parameter. Then any manipulation of the file would be inside the PrivilegedAction. This implementation is simpler and much less prone to contain a security flaw.

Reflection

One subtlety that must be considered is the interaction of this API with reflection. The doPrivileged method can be invoked reflectively using java.lang.reflect.Method.invoke. In this case, the privileges granted in privileged mode are not those of Method.invoke but of the non-reflective code that invoked it. Otherwise, system privileges could erroneously (or maliciously) be conferred on user code. Note that similar requirements exist when using reflection in the existing API.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Blacklist Jar Feature

Support for blacklisting signed jar files has been added to 6u14. A blacklist is a list of signed jars that contain serious security vulnerabilities that can be exploited by untrusted applets or applications. A system-wide blacklist will be distributed with each JRE release. Java Plugin and Web Start will consult this blacklist and refuse to load any class or resource contained in a jar file that's on the blacklist. By default, blacklist checking is enabled. The deployment.security.blacklist.check deployment configuration property can be used to toggle this behavior. The blacklist is updated using the property deployment.blacklist.url which defaults to https://javadl-esd-secure.oracle.com/update/blacklist.

The blacklist entries are the union of the blacklist files pointed to by the deployment.system.security.blacklist and deployment.user.security.blacklist properties. By default, deployment.system.security.blacklist points to the blacklist file in the jre/lib/security directory, and deployment.user.security.blacklist points to a blacklist file that contains additional entries added by a user.

The blacklist is a text file with the following format:

    attribute : value

Each jar file on the blacklist is identified by the x-Digest-Manifest attribute where x is the name of the MessageDigest algorithm, and the value is the base64 encoded hash value of the Manifest. Comments are denoted by lines starting with the # (number) symbol.

Here is an example:

    # Buggy Utilities, version 1.0
    SHA1-Digest-Manifest : QONXbQg+EtNOguIOAgpUUOadhv8=
    # Malware Inc., version 99.99
    SHA-256-Digest-Manifest : SewaudBCZ3iXt1KX0BeFHpQiiM1xYLtvLw3Ow2RJfcs=
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Default Policy Implementation and Policy File Syntax

The policy for a Java™ programming language application environment (specifying which permissions are available for code from various sources, and executing as various principals) is represented by a Policy object. More specifically, it is represented by a Policy subclass providing an implementation of the abstract methods in the Policy class (which is in the java.security package).

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The Policy reference implementation obtains its information from static policy configuration files.

The rest of this document pertains to the Policy reference implementation and the syntax that must be used in policy files it reads. For information about using the Policy Tool to create a policy file (without needing to know the required syntax), see the Policy Tool documentation (for Solaris, Linux, or Mac OS X) (for Windows).

Here is an outline for the rest of this document:

Default Policy Implementation
Default Policy File Locations
Changing the Policy Implementation
Policy File Syntax
Policy File Examples
Property Expansion in Policy Files
General Expansion in Policy Files
Related Documentation

Default Policy Implementation

In the Policy reference implementation, the policy can be specified within one or more policy configuration files. The configuration file(s) specify what permissions are allowed for code from a specified code source, and executed by a specified principal. Each configuration file must be encoded in UTF-8.

A policy file can be composed via a simple text editor, or via the graphical Policy Tool utility.

There is by default a single system-wide policy file, and a single (optional) user policy file.

The Policy reference implementation is initialized the first time its getPermissions method is called, or whenever its refresh method is called. Initialization involves parsing the policy configuration file(s) (see Policy File Syntax), and then populating the Policy object.

Default Policy File Locations

As mentioned previously, there is by default a single system-wide policy file, and a single user policy file.

The system policy file is by default located at

java.home/lib/security/java.policy  (Solaris, Linux, or Mac OS X)
java.home\lib\security\java.policy  (Windows)

Note: java.home refers to the value of the system property named "java.home", which specifies the directory that houses the runtime environment -- either the jre directory in the Java SE Development Kit (JDK) or the top-level directory of the Java SE Runtime Environment (JRE).

The system policy file is meant to grant system-wide code permissions. The java.policy file installed with the JDK grants all permissions to standard extensions, allows anyone to listen on un-privileged ports, and allows any code to read certain "standard" properties that are not security-sensitive, such as the "os.name" and "file.separator" properties.

The user policy file is by default located at

user.home/.java.policy  (Solaris, Linux, or Mac OS X)
user.home\.java.policy  (Windows)

Note: user.home refers to the value of the system property named "user.home", which specifies the user's home directory.

When the Policy is initialized, the system policy is loaded in first, and then the user policy is added to it. If neither policy is present, a built-in policy is used. This built-in policy is the same as the java.policy file installed with the JRE.

Policy file locations are specified in the security properties file, which is located at

java.home/lib/security/java.security  (Solaris, Linux, or Mac OS X)
java.home\lib\security\java.security  (Windows)
As noted above, java.home indicates the directory that houses the runtime environment--either the jre directory in the JDK or the top-level directory of the JRE. The policy file locations are specified as the values of properties whose names are of the form
policy.url.n
where n is a number. You specify each such property value in a line of the following form:
policy.url.n=URL
Here, URL is a URL specification.

For example, the default system and user policy files are defined in the security properties file as

policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

(See Property Expansion for information about specifying property values via a special syntax, such as specifying the java.home property value via ${java.home}.)

You can actually specify a number of URLs (including ones of the form "http://"), and all the designated policy files will get loaded. You can also comment out or change the second one to disable reading the default user policy file.

The algorithm starts at policy.url.1, and keeps incrementing until it does not find a URL. Thus if you have policy.url.1 and policy.url.3, policy.url.3 will never be read.

Specifying an Additional Policy File at Runtime

It is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command line argument, which sets the value of the java.security.policy property. For example, if you use

    java -Djava.security.manager -Djava.security.policy=someURL SomeApp
where someURL is a URL specifying the location of a policy file, then the specified policy file will be loaded in addition to all the policy files that are specified in the security properties file.

Notes:

  • The URL can be any regular URL or simply the name of a policy file in the current directory, as in
        java -Djava.security.manager -Djava.security.policy=mypolicy SomeApp
  • The "-Djava.security.manager" argument ensures that the default security manager is installed, and thus the application is subject to policy checks. It is not required if the application SomeApp installs a security manager.

If you use

    java -Djava.security.manager -Djava.security.policy==someURL SomeApp
(note the double equals) then just the specified policy file will be used; all the ones indicated in the security properties file will be ignored.

If you want to pass a policy file to the appletviewer, then use a "-J-Djava.security.policy" argument as follows:

    appletviewer -J-Djava.security.policy=someURL myApplet
Note: The "-Djava.security.policy" policy file value will be ignored (for both java and appletviewer commands) if the "policy.allowSystemProperty" property in the security properties file is set to false. The default is true.

Changing the Policy Implementation

An alternative policy class can be given to replace the Policy reference implementation class, as long as the former is a subclass of the abstract Policy class and implements the getPermissions method (and other methods as necessary).

The Policy reference implementation can be changed by editing the security properties file, which is the java.security file in the lib/security directory of the JDK or JRE.

One of the types of properties you can set in java.security is of the following form:

    policy.provider=PolicyClassName

PolicyClassName must specify the fully qualified name of the desired Policy implementation class. The default security properties file entry for this property is the following:

    policy.provider=sun.security.provider.PolicyFile

To customize, you can change the property value to specify another class, as in

    policy.provider=com.mycom.MyPolicy

Policy File Syntax

The policy configuration file(s) for a JDK or JRE installation specifies what permissions (which types of system resource accesses) are granted to code from a specified code source, and executed as a specified principal.

For an applet (or an application running under a security manager) to be allowed to perform secured actions (such as reading or writing a file), the applet (or application) must be granted permission for that particular action. In the Policy reference implementation, that permission must be granted by a grant entry in a policy configuration file. See below and the "Java Security Architecture Specification" for more information. (The only exception is that code always automatically has permission to read files from its same (URL) location, and subdirectories of that location; it does not need explicit permission to do so.)

A policy configuration file essentially contains a list of entries. It may contain a "keystore" entry, and contains zero or more "grant" entries.

Keystore Entry

A keystore is a database of private keys and their associated digital certificates such as X.509 certificate chains authenticating the corresponding public keys. The keytool utility (for Solaris, Linux, or Mac OS X) (for Windows) is used to create and administer keystores. The keystore specified in a policy configuration file is used to look up the public keys of the signers specified in the grant entries of the file. A keystore entry must appear in a policy configuration file if any grant entries specify signer aliases, or if any grant entries specify principal aliases (see below).

At this time, there can be only one keystore/keystorePasswordURL entry in the policy file (other entries following the first one are ignored). This entry can appear anywhere outside the file's grant entries. It has the following syntax:

keystore "some_keystore_url", "keystore_type", "keystore_provider";
keystorePasswordURL "some_password_url";
some_keystore_url specifies the URL location of the keystore, some_password_url specifies the URL location of the keystore password, keystore_type specifies the keystore type, and keystore_provider specifies the keystore provider. Note that the input stream from some_keystore_url is passed to the KeyStore.load method. If NONE is specified as the URL, then a null stream is passed to the KeyStore.load method. NONE should be specified if the KeyStore is not file-based, for example, if it resides on a hardware token device.

The URL is relative to the policy file location. Thus if the policy file is specified in the security properties file as:

    policy.url.1=http://foo.example.com/fum/some.policy
and that policy file has an entry:
    keystore ".keystore";
then the keystore will be loaded from:
    http://foo.example.com/fum/.keystore
The URL can also be absolute.

A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. The default type supported by Sun Microsystems is a proprietary keystore type named "JKS". Thus, if the keystore type is "JKS", it does not need to be specified in the keystore entry.

Grant Entries

Code being executed is always considered to come from a particular "code source" (represented by an object of type CodeSource). The code source includes not only the location (URL) where the code originated from, but also a reference to the certificate(s) containing the public key(s) corresponding to the private key(s) used to sign the code. Certificates in a code source are referenced by symbolic alias names from the user's keystore. Code is also considered to be executed as a particular principal (represented by an object of type Principal), or group of principals.

Each grant entry includes one or more "permission entries" preceded by optional codeBase, signedBy, and principal name/value pairs that specify which code you want to grant the permissions. The basic format of a grant entry is the following:

  grant signedBy "signer_names", codeBase "URL",
        principal principal_class_name "principal_name",
        principal principal_class_name "principal_name",
        ... {

      permission permission_class_name "target_name", "action",
          signedBy "signer_names";
      permission permission_class_name "target_name", "action",
          signedBy "signer_names";
      ...
  };
All non-italicized items above must appear as is (although case doesn't matter and some are optional, as noted below). Italicized items represent variable values.

A grant entry must begin with the word grant.

The SignedBy, Principal, and CodeBase Fields

The signedBy, codeBase, and principal values are optional, and the order of these fields does not matter.

A signedBy value indicates the alias for a certificate stored in the keystore. The public key within that certificate is used to verify the digital signature on the code; you grant the permission(s) to code signed by the private key corresponding to the public key in the keystore entry specified by the alias.

The signedBy value can be a comma-separated list of multiple aliases. An example is "Adam,Eve,Charles", which means "signed by Adam and Eve and Charles"; the relationship is AND, not OR. To be more exact, a statement like "Code signed by Adam" means "Code in a class file contained in a JAR which is signed using the private key corresponding to the public key certificate in the keystore whose entry is aliased by Adam".

The signedBy field is optional in that, if it is omitted, it signifies "any signer". It doesn't matter whether the code is signed or not or by whom.

A principal value specifies a class_name/principal_name pair which must be present within the executing thread's principal set. The principal set is associated with the executing code by way of a Subject.

The principal_class_name may be set to the wildcard value, *, which allows it to match any Principal class. In addition, the principal_name may also be set to the wildcard value, *, allowing it to match any Principal name. When setting the principal_class_name or principal_name to *, do not surround the * with quotes. Also, if you specify a wildcard principal class, you must also specify a wildcard principal name.

The principal field is optional in that, if it is omitted, it signifies "any principals".

Note on KeyStore Alias Replacement:

If the principal class_name/principal_name pair is specified as a single quoted string, it is treated as a keystore alias. The keystore is consulted and queried (via the alias) for an X509 Certificate. If one is found, the principal class_name is automatically treated as javax.security.auth.x500.X500Principal, and the principal_name is automatically treated as the subject distinguished name from the certificate. If an X509 Certificate mapping is not found, the entire grant entry is ignored.

A codeBase value indicates the code source location; you grant the permission(s) to code from that location. An empty codeBase entry signifies "any code"; it doesn't matter where the code originates from.

Note: a codeBase value is a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the code source is actually on a Windows system. Thus, if the source location for code on a Windows system is actually C:\somepath\api\, then the policy codeBase entry should look like:

    grant codeBase "file:/C:/somepath/api/" {
        ...
    };
The exact meaning of a codeBase value depends on the characters at the end. A codeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A codeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A codeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory. The following table illustrates the different cases.
Codebase URL of Downloaded Code | Codebase URL in Policy | Match?
www.example.com/people/gong/ | www.example.com/people/gong | Y
www.example.com/people/gong/ | www.example.com/people/gong/ | Y
www.example.com/people/gong/ | www.example.com/people/gong/* | Y
www.example.com/people/gong/ | www.example.com/people/gong/- | Y
www.example.com/people/gong/appl.jar | www.example.com/people/gong/ | N
www.example.com/people/gong/appl.jar | www.example.com/people/gong/- | Y
www.example.com/people/gong/appl.jar | www.example.com/people/gong/* | Y
www.example.com/people/gong/appl.jar | www.example.com/people/- | Y
www.example.com/people/gong/appl.jar | www.example.com/people/* | N
www.example.com/people/gong/ | www.example.com/people/- | Y
www.example.com/people/gong/ | www.example.com/people/* | N

The Permission Entries

A permission entry must begin with the word permission. The word permission_class_name in the template above would actually be a specific permission type, such as java.io.FilePermission or java.lang.RuntimePermission.

The "action" is required for many permission types, such as java.io.FilePermission (where it specifies what type of file access is permitted). It is not required for categories such as java.lang.RuntimePermission where it is not necessary--you either have the permission specified by the "target_name" value following the permission_class_name or you don't.

The signedBy name/value pair for a permission entry is optional. If present, it indicates a signed permission. That is, the permission class itself must be signed by the given alias(es) in order for the permission to be granted. For example, suppose you have the following grant entry:

  grant {
      permission Foo "foobar", signedBy "FooSoft";
  };

Then this permission of type Foo is granted if the Foo.class permission was placed in a JAR file and the JAR file was signed by the private key corresponding to the public key in the certificate specified by the "FooSoft" alias, or if Foo.class is a system class, since system classes are not subject to policy restrictions.

Items that appear in a permission entry must appear in the specified order (permission, permission_class_name, "target_name", "action", and signedBy "signer_names"). An entry is terminated with a semicolon.

Case is unimportant for the identifiers (permission, signedBy, codeBase, etc.) but is significant for the permission_class_name or for any string that is passed in as a value.

Note Regarding File Path Specifications on Windows Systems

Note: When you are specifying a java.io.FilePermission, the "target_name" is a file path. On Windows systems, whenever you directly specify a file path in a string (but not in a codeBase URL), you need to include two backslashes for each actual single backslash in the path, as in

  grant {
      permission java.io.FilePermission "C:\\users\\cathy\\foo.bat", "read";
  };
The reason this is necessary is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (for example, "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above file path string, converting double backslashes to single backslashes, the end result is
    "C:\users\cathy\foo.bat"

Policy File Examples

An example of two entries in a policy configuration file is

  // If the code is signed by "Duke", grant it read/write access to all
  // files in /tmp:
  grant signedBy "Duke" {
      permission java.io.FilePermission "/tmp/*", "read,write";
  };

  // Grant everyone the following permission:
  grant {
      permission java.util.PropertyPermission "java.vendor", "read";
  };

The contents of another sample policy configuration file appear below.

  grant signedBy "sysadmin", codeBase "file:/home/sysadmin/*" {
      permission java.security.SecurityPermission "Security.insertProvider.*";
      permission java.security.SecurityPermission "Security.removeProvider.*";
      permission java.security.SecurityPermission "Security.setProperty.*";
  };
This specifies that only code that satisfies the following conditions can call methods in the Security class to add or remove providers or to set Security properties:
  • The code was loaded from a signed JAR file that is in the "/home/sysadmin/" directory on the local file system.
  • The signature can be verified using the public key referenced by the alias name "sysadmin" in the keystore.

Either component of the code source (or both) may be missing. An example where codeBase is missing is:

  grant signedBy "sysadmin" {
      permission java.security.SecurityPermission "Security.insertProvider.*";
      permission java.security.SecurityPermission "Security.removeProvider.*";
  };
If this policy is in effect, code that comes in a JAR File signed by "sysadmin" can add/remove providers, regardless of where the JAR File originated from.

An example without a signer is:

  grant codeBase "file:/home/sysadmin/-" {
      permission java.security.SecurityPermission "Security.insertProvider.*";
      permission java.security.SecurityPermission "Security.removeProvider.*";
  };
In this case, code that comes from anywhere beneath the "/home/sysadmin/" directory on the local filesystem can add/remove providers. The code does not need to be signed.

An example where neither codeBase nor signedBy is included is:

  grant {
      permission java.security.SecurityPermission "Security.insertProvider.*";
      permission java.security.SecurityPermission "Security.removeProvider.*";
  };
Here, with both code source components missing, any code (regardless of where it originated from, or whether or not it is signed, or who signed it) can add/remove providers.

The following represents a principal-based entry.

  grant principal javax.security.auth.x500.X500Principal "cn=Alice" {
      permission java.io.FilePermission "/home/Alice", "read, write";
  };
This permits any code executing as the X500Principal, "cn=Alice", permission to read and write to "/home/Alice".

The following represents a principal-based entry with a wildcard value.

  grant principal javax.security.auth.x500.X500Principal * {
      permission java.io.FilePermission "/tmp", "read, write";
  };
This permits any code executing as an X500Principal (regardless of the distinguished name), permission to read and write to "/tmp".

The following example shows a grant statement with both codesource and principal information.

  grant codebase "http://www.games.example.com",
        signedBy "Duke",
        principal javax.security.auth.x500.X500Principal "cn=Alice" {
      permission java.io.FilePermission "/tmp/games", "read, write";
  };
This allows code downloaded from "www.games.example.com", signed by "Duke", and executed by "cn=Alice", permission to read and write into the "/tmp/games" directory.

The following example shows a grant statement with KeyStore alias replacement:

  keystore "http://foo.example.com/blah/.keystore";

  grant principal "alice" {
      permission java.io.FilePermission "/tmp/games", "read, write";
  };
"alice" will be replaced by
    javax.security.auth.x500.X500Principal "cn=Alice"
assuming the X.509 certificate associated with the keystore alias, alice, has a subject distinguished name of "cn=Alice". This allows code executed by the X500Principal "cn=Alice" permission to read and write into the "/tmp/games" directory.

Property Expansion in Policy Files

Property expansion is possible in policy files and in the security properties file.

Property expansion is similar to expanding variables in a shell. That is, when a string like

    ${some.property}
appears in a policy file, or in the security properties file, it will be expanded to the value of the system property. For example,
    permission java.io.FilePermission "${user.home}", "read";
will expand "${user.home}" to use the value of the "user.home" system property. If that property's value is "/home/cathy", then the above is equivalent to
    permission java.io.FilePermission "/home/cathy", "read";
In order to assist in platform-independent policy files, you can also use the special notation of "${/}", which is a shortcut for "${file.separator}". This allows things like
    permission java.io.FilePermission "${user.home}${/}*", "read";
If the value of the "user.home" property is /home/cathy, and you are on Solaris, Linux, or Mac OS X, the above gets converted to:
    permission java.io.FilePermission "/home/cathy/*", "read";
If on the other hand the "user.home" value is C:\users\cathy and you are on a Windows system, the above gets converted to:
    permission java.io.FilePermission "C:\users\cathy\*", "read";
Also, as a special case, if you expand a property in a codebase, such as
    grant codeBase "file:${java.home}/lib/ext/"
then any file.separator characters will be automatically converted to /'s. Thus on a Windows system, the above would get converted to
    grant codeBase "file:C:/jdk1.4/jre/lib/ext/"
even if "java.home" is set to C:\jdk1.4\jre. Thus you don't need to use ${/} in codebase strings (and you shouldn't).

Property expansion takes place anywhere a double quoted string is allowed in the policy file. This includes the "signer_names", "URL", "target_name", and "action" fields.

Whether or not property expansion is allowed is controlled by the value of the "policy.expandProperties" property in the security properties file. If the value of this property is true (the default), expansion is allowed.

Note: You can't use nested properties; they will not work. For example,

    "${user.${foo}}"
doesn't work, even if the "foo" property is set to "home". The reason is the property parser doesn't recognize nested properties; it simply looks for the first "${", and then keeps looking until it finds the first "}" and tries to interpret the result (in this case, "${user.$foo}") as a property, but fails if there is no such property.

Note: If a property can't be expanded in a grant entry, permission entry, or keystore entry, that entry is ignored. For example, if the system property "foo" is not defined and you have:

    grant codeBase "${foo}" {
        permission ...;
        permission ...;
    };
then all the permissions in this grant entry are ignored. If you have
    grant {
        permission Foo "${foo}";
        permission Bar "barTarget";
    };
then only the "permission Foo..." entry is ignored. And finally, if you have
    keystore "${foo}";
then the keystore entry is ignored.

Windows Systems, File Paths, and Property Expansion

As noted above, on Windows systems, when you directly specify a file path in a string (but not in a codeBase URL), you need to include two backslashes for each actual single backslash in the path, as in
    grant {
        permission java.io.FilePermission "C:\\users\\cathy\\foo.bat", "read";
    };
This is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above file path string, converting double backslashes to single backslashes, the end result is
    "C:\users\cathy\foo.bat"
Expansion of a property in a string takes place after the tokenizer has processed the string. Thus if you have the string
    "${user.home}\\foo.bat"
then first the tokenizer processes the string, converting the double backslashes to a single backslash, and the result is
    "${user.home}\foo.bat"
Then the ${user.home} property is expanded and the end result is
    "C:\users\cathy\foo.bat"
assuming the "user.home" value is C:\users\cathy. Of course, for platform independence, it would be better if the string was initially specified without any explicit slashes, i.e., using the ${/} property instead, as in
    "${user.home}${/}foo.bat"

General Expansion in Policy Files

Generalized forms of expansion are also supported in policy files. For example, permission names may contain a string of the form:
${{protocol:protocol_data}}
If such a string occurs in a permission name, then the value in protocol determines the exact type of expansion that should occur, and protocol_data is used to help perform the expansion. protocol_data may be empty, in which case the above string should simply take the form:
${{protocol}}

There are two protocols supported in the default policy file implementation:

  1. ${{self}}

    The protocol, self, denotes a replacement of the entire string, ${{self}}, with one or more principal class/name pairs. The exact replacement performed depends upon the contents of the grant clause to which the permission belongs.

    If the grant clause does not contain any principal information, the permission will be ignored (permissions containing ${{self}} in their target names are only valid in the context of a principal-based grant clause). For example, BarPermission will always be ignored in the following grant clause:

                grant codebase "www.example.com", signedby "duke" {
                permission BarPermission "... ${{self}} ...";
            };
    If the grant clause contains principal information, ${{self}} will be replaced with that same principal information. For example, ${{self}} in BarPermission will be replaced with javax.security.auth.x500.X500Principal "cn=Duke" in the following grant clause:
    grant principal javax.security.auth.x500.X500Principal "cn=Duke" {
    permission BarPermission "... ${{self}} ...";
};
    If there is a comma-separated list of principals in the grant clause, then ${{self}} will be replaced by the same comma-separated list or principals. In the case where both the principal class and name are wildcarded in the grant clause, ${{self}} is replaced with all the principals associated with the Subject in the current AccessControlContext.

    The following example describes a scenario involving both self and KeyStore alias replacement together:

    keystore "http://foo.example.com/blah/.keystore";

grant principal "duke" {
    permission BarPermission "... ${{self}} ...";
};
    In the above example, "duke" will first be expanded into javax.security.auth.x500.X500Principal "cn=Duke" assuming the X.509 certificate associated with the KeyStore alias, "duke", has a subject distinguished name of "cn=Duke". Next, ${{self}} will be replaced with the same principal information that was just expanded in the grant clause: javax.security.auth.x500.X500Principal "cn=Duke".
  2. ${{alias:alias_name}}

    The protocol, alias, denotes a java.security.KeyStore alias substitution. The KeyStore used is the one specified in the KeyStore entry. alias_name represents an alias into the KeyStore. ${{alias:alias_name}} is replaced with javax.security.auth.x500.X500Principal "DN", where DN represents the subject distinguished name of the certificate belonging to alias_name. For example:

    keystore "http://foo.example.com/blah/.keystore";

grant codebase "www.example.com" {
    permission BarPermission "... ${{alias:duke}} ...";
};
    In the above example the X.509 certificate associated with the alias, duke, is retrieved from the KeyStore, foo.example.com/blah/.keystore. Assuming duke's certificate specifies "o=dukeOrg, cn=duke" as the subject distinguished name, then ${{alias:duke}} is replaced with javax.security.auth.x500.X500Principal "o=dukeOrg, cn=duke".

    The permission entry is ignored under the following error conditions:

    • The keystore entry is unspecified
    • The alias_name is not provided
    • The certificate for alias_name can not be retrieved
    • The certificate retrieved is not an X.509 certificate

Related Documentation

  • Permissions in the Java SE JDK
  • Policy Tool (for Solaris, Linux, or Mac OS X) (for Windows)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation

Documentation Contents

Security

Java security technology includes a large set of APIs, tools, and implementations of commonly-used security algorithms, mechanisms, and protocols. The Java security APIs span a wide range of areas, including cryptography, public key infrastructure, secure communication, authentication, and access control. Java security technology provides the developer with a comprehensive security framework for writing applications, and also provides the user or administrator with a a set of tools to securely manage applications.

Enhancements

  • JDK 8 Security Enhancements
  • JDK 7 Security Enhancements
  • JDK 6 Security Enhancements
  • Blacklist Jar Feature
  • Signature Timestamp Support

Programmer's Guides

General Security

  • Java Security Overview
  • Security Architecture
  • Java Cryptography Architecture (JCA) Reference Guide
  • How to Implement a Provider for the Java Cryptography Architecture
  • Standard Algorithm Names
  • Oracle Providers
  • Policy Permissions
  • Default Policy Implementation and Policy File Syntax
  • API for Privileged Blocks
  • Security Managers and the Java SE Development Kit
  • Security for Rich Internet Applications (RIAs)
  • Troubleshooting Security

Java Authentication and Authorization Service (JAAS)

  • JAAS Reference Guide
  • JAAS Tutorials
  • JAAS LoginModule Developer's Guide

Java Generic Security Services (Java GSS-API)

  • Java GSS-API and JAAS Tutorials for Use with Kerberos
  • Single Sign-on Using Kerberos in Java
  • Java GSS Security Features
  • Java GSS Advanced Security Programming

Java PKCS#11 Reference Guide

  • Java PKCS#11 Reference Guide

Java Secure Socket Extension (JSSE)

  • JSSE Reference Guide

Public Key Infrastructure (PKI)

  • Java PKI Programmer's Guide
  • X.509 Certificates and Certificate Revocation Lists

Simple Authentication and Security Layer (SASL)

  • The Java SASL API Programming and Deployment Guide

XML Digital Signature

  • The XML Digital Signature API Specification
  • The XML Digital Signature API Reference and Tutorial

API Specification

General Security

  • java.security Package
  • javax.crypto Package
  • java.security.cert Package
  • java.security.spec Package
  • javax.crypto.spec Package
  • java.security.interfaces Package
  • javax.crypto.interfaces Package
  • javax.rmi.ssl Package

Certification Path

  • java.security.cert Package

JAAS

  • javax.security.auth Package
  • javax.security.auth.callback Package
  • javax.security.auth.kerberos Package
  • javax.security.auth.login Package
  • javax.security.auth.spi Package
  • javax.security.auth.x500 Package
  • com.sun.security.auth Package
  • com.sun.security.auth.callback Package
  • com.sun.security.auth.login Package
  • com.sun.security.auth.module Package

Java GSS-API

  • org.ietf.jgss Package
  • com.sun.security.jgss Package

JSSE

  • javax.net Package
  • javax.net.ssl Package
  • javax.security.cert Package (Denigrated, use java.security.cert instead)

Java SASL

  • javax.security.sasl Package

SSL/TLS-based RMI Socket Factories

  • javax.rmi.ssl Package

XML Digital Signature

  • javax.xml.crypto Package
  • javax.xml.crypto.dom Package
  • javax.xml.crypto.dsig Package
  • javax.xml.crypto.dsig.dom Package
  • javax.xml.crypto.dsig.keyinfo Package
  • javax.xml.crypto.dsig.spec Package

Smart Card I/O

  • javax.smartcardio Package

Tools

  • Security Tools Summary
  • keytool (for Solaris, Linux or Mac OS X) (for Windows)
  • jarsigner (for Solaris, Linux or Mac OS X) (for Windows)
  • policytool (for Solaris, Unix, or Mac OS X) (for Windows)
  • kinit (for Windows)
  • klist (for Windows)
  • ktab (for Windows)

Tutorials

  • The Security Features in Java SE trail of the Java Tutorial
  • JAAS Tutorials.
  • Java GSS-API and JAAS Tutorials for Use with Kerberos
  • Policytool User's Guide

More Information

  • The Java SE Security Home Page
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Cryptography Architecture Oracle Providers Documentation

Documentation Contents

Java Cryptography Architecture Oracle Providers Documentation for JDK 8

The following topics are covered:

  • Introduction
  • Import Limits on Cryptographic Algorithms
  • SecureRandom Implementations
  • The SunPKCS11 Provider
  • The SUN Provider
  • The SunRsaSign Provider
  • The SunJSSE Provider
  • The SunJCE Provider
  • The SunJGSS Provider
  • The SunSASL Provider
  • The XMLDSig Provider
  • The SunPCSC Provider
  • The SunMSCAPI Provider
  • The SunEC Provider
  • The OracleUcrypto Provider
  • The Apple Provider

Note: The Standard Names Documentation contains more information about the standard names used in this document.

Introduction

The Java platform defines a set of APIs spanning major security areas, including cryptography, public key infrastructure, authentication, secure communication, and access control. These APIs allow developers to easily integrate security mechanisms into their application code. The Java Cryptography Architecture (JCA) and its Provider Architecture is a core concept of the Java Development Kit (JDK). It is assumed readers have a solid understanding of this architecture.

This document describes the technical details of the providers shipped as part of Oracle's Java Environment.

Reminder: Cryptographic implementations in the JDK are distributed through several different providers ("Sun", "SunJSSE", "SunJCE", "SunRsaSign") for both historical reasons and by the types of services provided. General purpose applications SHOULD NOT request cryptographic services from specific providers. That is:

getInstance("...", "SunJCE");  // not recommended

versus

getInstance("...");            // recommended

Otherwise, applications are tied to specific providers that may not be available on other Java implementations. They also might not be able to take advantage of available optimized providers (for example, hardware accelerators via PKCS11 or native OS implementations such as Microsoft's MSCAPI) that have a higher preference order than the specific requested provider.

Import Limits on Cryptographic Algorithms

Due to import regulations in some countries, the Oracle implementation provides a default cryptographic jurisdiction policy file that limits the strength of cryptographic algorithms. Here are the maximum key sizes allowed by this "strong" version of the jurisdiction policy files:

Algorithm | Maximum Keysize
DES | 64
DESede | *
RC2 | 128
RC4 | 128
RC5 | 128
RSA | *
all others | 128

If stronger algorithms are needed (for example, AES with 256-bit keys), the JCE Unlimited Strength Jurisdiction Policy Files must be obtained and installed in the JDK/JRE.

It is the user's responsibility to verify that this action is permissible under local regulations.

SecureRandom Implementations

The following table lists the default preference order of the available SecureRandom implementations.

OS | Algorithm Name | Provider Name
Solaris | 1. PKCS11* | SunPKCS11
 | 2. NativePRNG** | Sun
 | 3. SHA1PRNG** | Sun
 | 4. NativePRNGBlocking | Sun
 | 5. NativePRNGNonBlocking | Sun
Linux | 1. NativePRNG** | Sun
 | 2. SHA1PRNG** | Sun
 | 3. NativePRNGBlocking | Sun
 | 4. NativePRNGNonBlocking | Sun
OS X | 1. NativePRNG** | Sun
 | 2. SHA1PRNG** | Sun
 | 3. NativePRNGBlocking | Sun
 | 4. NativePRNGNonBlocking | Sun
Windows | 1. SHA1PRNG | Sun
 | 2. Windows-PRNG*** | SunMSCAPI

* The SunPKCS11 provider is available on all platforms, but is only enabled by default on Solaris as it is the only OS with a native PKCS11 implementation automatically installed and configured. On other platforms, applications or deployers must specifically install and configure a native PKCS11 library, and then configure and enable the SunPKCS11 provider to use it.

** On Solaris, Linux, and OS X, if the entropy gathering device in java.security is set to file:/dev/urandom or file:/dev/random, then NativePRNG is preferred to SHA1PRNG. Otherwise, SHA1PRNG is preferred.

*** There is currently no NativePRNG on Windows. Access to the equivalent functionality is via the SunMSCAPI provider.

If there are no SecureRandom implementations registered in the JCA framework, java.security.SecureRandom will use the hardcoded SHA1PRNG.

The SunPKCS11 Provider

The Cryptographic Token Interface Standard ( PKCS#11) provides native programming interfaces to cryptographic mechanisms, such as hardware cryptographic accelerators and Smart Cards. When properly configured, the SunPKCS11 provider enables applications to use the standard JCA/JCE APIs to access native PKCS#11 libraries. The SunPKCS11 provider itself does not contain cryptographic functionality, it is simply a conduit between the Java environment and the native PKCS11 providers. The Java PKCS#11 Reference Guide has a much more detailed treatment of this provider.

The SUN Provider

JDK 1.1 introduced the Provider architecture. The first JDK provider was named SUN, and contained two types of cryptographic services (MessageDigests and Signatures). In later releases, other mechanisms were added (SecureRandom number generators, KeyPairGenerators, KeyFactorys, and so on.).

United States export regulations in effect at the time placed significant restrictions on the type of cryptographic functionality that could be made available internationally in the JDK. For this reason, the SUN provider has historically contained cryptographic engines that did not directly encrypt or decrypt data.

The following algorithms are available in the SUN provider:

Engine | Algorithm Names
AlgorithmParameterGenerator | DSA
AlgorithmParameters | DSA
CertificateFactory | X.509
CertPathBuilder | PKIX
CertPathValidator | PKIX
CertStore Collection
LDAP
Configuration | JavaLoginConfig
KeyFactory | DSA
KeyPairGenerator | DSA
KeyStore JKS
DKS
MessageDigest MD2
MD5
SHA-1
SHA-224
SHA-256
SHA-384
SHA-512
Policy | JavaPolicy
SecureRandom SHA1PRNG (Initial seeding is currently done via a combination of system attributes and the java.security entropy gathering device)
NativePRNG (nextBytes() uses /dev/urandom, generateSeed() uses /dev/random)
NativePRNGBlocking (nextBytes() and generateSeed() use /dev/random)
NativePRNGNonBlocking (nextBytes() and generateSeed() use /dev/urandom)
Signature NONEwithDSA
SHA1withDSA
SHA224withDSA
SHA256withDSA

The following table lists OIDs associated with SHA Message Digests:

SHA Message Digest | OID
SHA-224 | 2.16.840.1.101.3.4.2.4
SHA-256 | 2.16.840.1.101.3.4.2.1
SHA-384 | 2.16.840.1.101.3.4.2.2
SHA-512 | 2.16.840.1.101.3.4.2.3

The following table lists OIDs associated with DSA Signatures:

DSA Signature | OID
SHA1withDSA | 1.2.840.10040.4.3 1.3.14.3.2.13 1.3.14.3.2.27
SHA224withDSA | 2.16.840.1.101.3.4.3.1
SHA256withDSA | 2.16.840.1.101.3.4.3.2

Keysize Restrictions

The SUN provider uses the following default keysizes (in bits) and enforces the following restrictions:

KeyPairGenerator

Alg. Name | Default Keysize | Restrictions/Comments
DSA | 1024 | Keysize must be a multiple of 64, ranging from 512 to 1024 (inclusive), or 2048.

AlgorithmParameterGenerator

Alg. Name | Default Keysize | Restrictions/Comments
DSA | 1024 | Keysize must be a multiple of 64, ranging from 512 to 1024 (inclusive), or 2048.

CertificateFactory/CertPathBuilder/CertPathValidator/CertStore Implementations

Additional details on the SUN provider implementations for CertificateFactory, CertPathBuilder, CertPathValidator and CertStore are documented in Appendix B of the PKI Programmer's Guide.

The SunRsaSign Provider

The SunRsaSign provider was introduced in JDK 1.3 as an enhanced replacement for the RSA signatures in the SunJSSE provider.

The following algorithms are available in the SunRsaSign provider:

Engine | Algorithm Names
KeyFactory | RSA
KeyPairGenerator | RSA
Signature | MD2withRSA MD5withRSA SHA1withRSA SHA224withRSA SHA256withRSA SHA384withRSA SHA512withRSA

Keysize Restrictions

The SunRsaSign provider uses the following default keysize (in bits) and enforces the following restriction:

KeyPairGenerator

Alg. Name | Default Keysize | Restrictions/Comments
RSA | 1024 | Keysize must range between 512 and 65536 bits, the latter of which is unnecessarily large.

The SunJSSE Provider

The Java Secure Socket Extension (JSSE) was originally released as a separate "Optional Package" (also briefly known as a "Standard Extension"), and was available for JDK 1.2.n and 1.3.n. The SunJSSE provider was introduced as part of this release.

In earlier JDK releases, there were no RSA signature providers available in the JDK, therefore SunJSSE had to provide its own RSA implementation in order to use commonly available RSA-based certificates. JDK 5 introduced the SunRsaSign provider, which provides all the functionality (and more) of the SunJSSE provider. Applications targeted at JDK 5.0 and later should request instances of the SunRsaSign provider instead. For backward compatibility, the RSA algorithms are still available through this provider, but are actually implemented in the SunRsaSign provider.

Algorithms

The following algorithms are available in the SunJSSE provider:

Engine | Algorithm Name(s)
KeyFactory | RSA
KeyManagerFactory

SunX509: A factory for X509ExtendedKeyManager instances that manage X.509 certificate-based key pairs for local side authentication according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. This KeyManagerFactory supports initialization using a Keystore object, but does not currently support initialization using the class javax.net.ssl.ManagerFactoryParameters.

PKIX: A factory for X509ExtendedKeyManager instances that manage X.509 certificate-based key pairs for local side authentication according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. This KeyManagerFactory currently supports initialization using a KeyStore object or javax.net.ssl.KeyStoreBuilderParameters.
KeyPairGenerator | RSA
KeyStore | PKCS12
Signature MD2withRSA
MD5withRSA
SHA1withRSA
SSLContext SSLv3
TLSv1
TLSv1.1
TLSv1.2
TrustManagerFactory

SunX509: A factory for X509ExtendedTrustManager instances that validate certificate chains according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. This TrustManagerFactory supports initialization using a Keystore object, but does not currently support initialization using the class javax.net.ssl.ManagerFactoryParameters.

PKIX: A factory for X509ExtendedTrustManager instances that validate certificate chains according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. This TrustManagerFactory currently supports initialization using a KeyStore object or javax.net.ssl.CertPathTrustManagerParameters.

Protocols

The SunJSSE provider supports the following protocol parameters:

Protocol | Enabled by Default for Client | Enabled by Default for Server
SSLv3 | Yes | Yes
TLSv1 | Yes | Yes
TLSv1.1 | Yes | Yes
TLSv1.2 | Yes | Yes
SSLv2Hello Footnote 1 | No | Yes

Footnote 1 The SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols allow you to send SSLv3, TLSv1, TLSv1.1 and TLSv1.2 hellos encapsulated in an SSLv2 format hello.

Cipher Suites

SunJSSE supports a large number of cipher suites. The two tables that follow show the cipher suites supported by SunJSSE in preference order and the release in which they were introduced.

The first table lists the cipher suites that are enable by default. The second table shows cipher suites that are supported by SunJSSE but disabled by default.

Default Enabled Cipher Suites
Cipher Suite | J2SE v1.4 | J2SE v1.4.1, v1.4.2 | J2SE 5.0 | JDK 6 | JDK 7 | JDK 8
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 |  |  |  |  | XFootnote 1 | X
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |  |  |  |  | XFootnote 1 | X
TLS_RSA_WITH_AES_256_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |  |  |  |  | XFootnote 1 | X
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 |  |  |  |  | XFootnote 1 | X
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA |  |  |  | X | X | X
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |  |  |  | X | X | X
TLS_RSA_WITH_AES_256_CBC_SHA |  | X | X | X | X | X
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA |  |  |  | X | X | X
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA |  |  |  | X | X | X
TLS_DHE_RSA_WITH_AES_256_CBC_SHA |  | X | X | X | X | X
TLS_DHE_DSS_WITH_AES_256_CBC_SHA |  | X | X | X | X | X
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_RSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 |  |  |  |  | XFootnote 1 | X
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA |  |  |  | X | X | X
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |  |  |  | X | X | X
TLS_RSA_WITH_AES_128_CBC_SHA |  | X | X | X | X | X
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA |  |  |  | X | X | X
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA |  |  |  | X | X | X
TLS_DHE_RSA_WITH_AES_128_CBC_SHA |  | X | X | X | X | X
TLS_DHE_DSS_WITH_AES_128_CBC_SHA |  | X | X | X | X | X
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA |  |  |  | X | X | X
TLS_ECDHE_RSA_WITH_RC4_128_SHA |  |  |  | X | X | X
SSL_RSA_WITH_RC4_128_SHA | X | X | X | X | X | X
TLS_ECDH_ECDSA_WITH_RC4_128_SHA |  |  |  | X | X | X
TLS_ECDH_RSA_WITH_RC4_128_SHA |  |  |  | X | X | X
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_RSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_RSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA |  |  |  | X | X | X
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |  |  |  | X | X | X
SSL_RSA_WITH_3DES_EDE_CBC_SHA | X | X | X | X | X | X
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA |  |  |  | X | X | X
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA |  |  |  | X | X | X
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA |  | X | X | X | X | X
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA | X | X | X | X | X | X
SSL_RSA_WITH_RC4_128_MD5 | X | X | X | X | X | X
TLS_EMPTY_RENEGOTIATION_INFO_SCSV Footnote 2 |  | 1.4.2u28+ | u26+ | u22+ | X | X

Footnote 1 Cipher suites with SHA384 and SHA256 are available only for TLS 1.2 or later.

Footnote 2 TLS_EMPTY_RENEGOTIATION_INFO_SCSV is a new pseudo-cipher suite to support RFC 5746. See the Transport Layer Security (TLS) Renegotiation Issue section of the JSEE Reference Guide for more information.

Default Disabled Cipher Suites
Cipher Suite | J2SE v1.4 | J2SE v1.4.1, v1.4.2 | J2SE 5.0 | JDK 6 | JDK 7 | JDK 8
TLS_DH_anon_WITH_AES_256_GCM_SHA384 |  |  |  |  |  | X
TLS_DH_anon_WITH_AES_128_GCM_SHA256 |  |  |  |  |  | X
TLS_DH_anon_WITH_AES_256_CBC_SHA256 |  |  |  |  | X | X
TLS_ECDH_anon_WITH_AES_256_CBC_SHA |  |  |  | X | X | X
TLS_DH_anon_WITH_AES_256_CBC_SHA |  | X | X | X | X | X
TLS_DH_anon_WITH_AES_128_CBC_SHA256 |  |  |  |  | X | X
TLS_ECDH_anon_WITH_AES_128_CBC_SHA |  |  |  | X | X | X
TLS_DH_anon_WITH_AES_128_CBC_SHA |  | X | X | X | X | X
TLS_ECDH_anon_WITH_RC4_128_SHA |  |  |  | X | X | X
SSL_DH_anon_WITH_RC4_128_MD5 | X | X | X | X | X | X
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA |  |  |  | X | X | X
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA | X | X | X | X | X | X
TLS_RSA_WITH_NULL_SHA256 |  |  |  |  | X | X
TLS_ECDHE_ECDSA_WITH_NULL_SHA |  |  |  | X | X | X
TLS_ECDHE_RSA_WITH_NULL_SHA |  |  |  | X | X | X
SSL_RSA_WITH_NULL_SHA | X | X | X | X | X | X
TLS_ECDH_ECDSA_WITH_NULL_SHA |  |  |  | X | X | X
TLS_ECDH_RSA_WITH_NULL_SHA |  |  |  | X | X | X
TLS_ECDH_anon_WITH_NULL_SHA |  |  |  | X | X | X
SSL_RSA_WITH_NULL_MD5 | X | X | X | X | X | X
SSL_RSA_WITH_DES_CBC_SHA | X | X | X | X | XFootnote 1 | X
SSL_DHE_RSA_WITH_DES_CBC_SHA |  | X | X | X | XFootnote 1 | X
SSL_DHE_DSS_WITH_DES_CBC_SHA | X | X | X | X | XFootnote 1 | X
SSL_DH_anon_WITH_DES_CBC_SHA | X | X | X | X | XFootnote 1 | X
SSL_RSA_EXPORT_WITH_RC4_40_MD5 | X | X | X | X | XFootnote 2 | X
SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 | X | X | X | X | XFootnote 2 | X
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA |  | X | X | X | XFootnote 2 | X
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA |  | X | X | X | XFootnote 2 | X
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA | X | X | X | X | XFootnote 2 | X
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA | X | X | X | X | XFootnote 2 | X
TLS_KRB5_WITH_RC4_128_SHA |  |  | X | X | X | X
TLS_KRB5_WITH_RC4_128_MD5 |  |  | X | X | X | X
TLS_KRB5_WITH_3DES_EDE_CBC_SHA |  |  | X | X | X | X
TLS_KRB5_WITH_3DES_EDE_CBC_MD5 |  |  | X | X | X | X
TLS_KRB5_WITH_DES_CBC_SHA |  |  | X | X | XFootnote 1 | X
TLS_KRB5_WITH_DES_CBC_MD5 |  |  | X | X | XFootnote 1 | X
TLS_KRB5_EXPORT_WITH_RC4_40_SHA |  |  | X | X | XFootnote 2 | X
TLS_KRB5_EXPORT_WITH_RC4_40_MD5 |  |  | X | X | XFootnote 2 | X
TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA |  |  | X | X | XFootnote 2 | X
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 |  |  | X | X | XFootnote 2 | X

Footnote 1 RFC 5246 TLS 1.2 forbids the use of these suites. These can be used in the SSLv3/TLS1.0/TLS1.1 protocols, but cannot be used in TLS 1.2 and later.

Footnote 2 RFC 4346 TLS 1.1 forbids the use of these suites. These can be used in the SSLv3/TLS1.0 protocols, but cannot be used in TLS 1.1 and later.

Cipher suites that use AES_256 require installation of the JCE Unlimited Strength Jurisdiction Policy Files. See Import Limits on Cryptographic Algorithms.

Cipher suites that use Elliptic Curve Cryptography (ECDSA, ECDH, ECDHE, ECDH_anon) require a JCE cryptographic provider that meets the following requirements:

  • The provider must implement ECC as defined by the classes and interfaces in the packages java.security.spec and java.security.interfaces. The getAlgorithm() method of elliptic curve key objects must return the string "EC".

  • The provider must support the Signature algorithms SHA1withECDSA and NONEwithECDSA, the KeyAgreement algorithm ECDH, and a KeyPairGenerator and a KeyFactory for algorithm EC. If one of these algorithms is missing, SunJSSE will not allow EC cipher suites to be used.

  • The provider must support all the SECG curves referenced in RFC 4492 specification, section 5.1.1 (see also appendix A). In certificates, points should be encoded using the uncompressed form and curves should be encoded using the namedCurve choice, that is, using an object identifier.

If these requirements are not met, EC cipher suites may not be negotiated correctly.

Tighter Checking of EncryptedPreMasterSecret Version Numbers

Prior to the JDK 7 release, the SSL/TLS implementation did not check the version number in PreMasterSecret, and the SSL/TLS client did not send the correct version number by default. Unless the system property com.sun.net.ssl.rsaPreMasterSecretFix is set to true, the TLS client sends the active negotiated version, but not the expected maximum version supported by the client.

For compatibility, this behavior is preserved for SSL version 3.0 and TLS version 1.0. However, for TLS version 1.1 or later, the implementation tightens checking the PreMasterSecret version numbers as required by RFC 5246. Clients always send the correct version number, and servers check the version number strictly. The system property, com.sun.net.ssl.rsaPreMasterSecretFix, is not used in TLS 1.1 or later.

The SunJCE Provider

As described briefly in The SUN Provider, US export regulations at the time restricted the type of cryptographic functionality that could be made available in the JDK. A separate API and reference implementation was developed that allowed applications to encrypt/decrypt data. The Java Cryptographic Extension (JCE) was released as a separate "Optional Package" (also briefly known as a "Standard Extension"), and was available for JDK 1.2.x and 1.3.x. During the development of JDK 1.4, regulations were relaxed enough that JCE (and SunJSSE) could be bundled as part of the JDK.

The following algorithms are available in the SunJCE provider:

Engine | Algorithm Names
AlgorithmParameterGenerator | DiffieHellman
AlgorithmParameters | AES Blowfish DES DESede DiffieHellman OAEP PBE PBES2 PBEWithHmacSHA1AndAES_128 PBEWithHmacSHA224AndAES_128 PBEWithHmacSHA256AndAES_128 PBEWithHmacSHA384AndAES_128 PBEWithHmacSHA512AndAES_128 PBEWithHmacSHA1AndAES_256 PBEWithHmacSHA224AndAES_256 PBEWithHmacSHA256AndAES_256 PBEWithHmacSHA384AndAES_256 PBEWithHmacSHA512AndAES_256 PBEWithMD5AndDES PBEWithMD5AndTripleDES PBEWithSHA1AndDESede PBEWithSHA1AndRC2_40 PBEWithSHA1AndRC2_128 PBEWithSHA1AndRC4_40 PBEWithSHA1AndPC4_128 RC2
Cipher | See the Cipher table.
KeyAgreement | DiffieHellman
KeyFactory | DiffieHellman
KeyGenerator | AES ARCFOUR Blowfish DES DESede HmacMD5 HmacSHA1 HmacSHA224 HmacSHA256 HmacSHA384 HmacSHA512 RC2
KeyPairGenerator | DiffieHellman
KeyStore | JCEKS
Mac | HmacMD5 HmacSHA1 HmacSHA224 HmacSHA256 HmacSHA384 HmacSHA512 HmacPBESHA1 PBEWithHmacSHA1 PBEWithHmacSHA224 PBEWithHmacSHA256 PBEWithHmacSHA384 PBEWithHmacSHA512
SecretKeyFactory | DES DESede PBEWithMD5AndDES PBEWithMD5AndTripleDES PBEWithSHA1AndDESede PBEWithSHA1AndRC2_40 PBEWithSHA1AndRC2_128 PBEWithSHA1AndRC4_40 PBEWithSHA1AndRC4_128 PBKDF2WithHmacSHA1 PBKDF2WithHmacSHA224 PBKDF2WithHmacSHA256 PBKDF2WithHmacSHA384 PBKDF2WithHmacSHA512 PBEWithHmacSHA1AndAES_128 PBEWithHmacSHA224AndAES_128 PBEWithHmacSHA256AndAES_128 PBEWithHmacSHA384AndAES_128 PBEWithHmacSHA512AndAES_128 PBEWithHmacSHA1AndAES_256 PBEWithHmacSHA224AndAES_256 PBEWithHmacSHA256AndAES_256 PBEWithHmacSHA384AndAES_256 PBEWithHmacSHA512AndAES_256

The following table lists cipher algorithms available in the SunJCE provider.

Algorithm Name | Modes | Paddings
AES | ECB, CBC, PCBC, CTR, CTS, CFB, CFB8..CFB128, OFB, OFB8..OFB128 | NoPadding, PKCS5Padding, ISO10126Padding
AESWrap | ECB | NoPadding
ARCFOUR | ECB | NoPadding
Blowfish, DES, DESede, RC2 | ECB, CBC, PCBC, CTR, CTS, CFB, CFB8..CFB64, OFB, OFB8..OFB64 | NoPadding, PKCS5Padding, ISO10126Padding
DESedeWrap | CBC | NoPadding
PBEWithMD5AndDES, PBEWithMD5AndTripleDES Footnote 1, PBEWithSHA1AndDESede, PBEWithSHA1AndRC2_40, PBEWithSHA1AndRC2_128, PBEWithSHA1AndRC4_40, PBEWithSHA1AndRC4_128, PBEWithHmacSHA1AndAES_128, PBEWithHmacSHA224AndAES_128, PBEWithHmacSHA256AndAES_128, PBEWithHmacSHA384AndAES_128, PBEWithHmacSHA512AndAES_128, PBEWithHmacSHA1AndAES_256, PBEWithHmacSHA224AndAES_256, PBEWithHmacSHA256AndAES_256, PBEWithHmacSHA384AndAES_256, PBEWithHmacSHA512AndAES_256 | CBC | PKCS5Padding
RSA | ECB | NoPadding, PKCS1Padding, OAEPWithMD5AndMGF1Padding, OAEPWithSHA1AndMGF1Padding, OAEPWithSHA-1AndMGF1Padding, OAEPWithSHA-224AndMGF1Padding, OAEPWithSHA-256AndMGF1Padding, OAEPWithSHA-384AndMGF1Padding, OAEPWithSHA-512AndMGF1Padding

Footnote 1 PBEWithMD5AndTripleDES is a proprietary algorithm that has not been standardized.

Keysize Restrictions

The SunJCE provider uses the following default keysizes (in bits) and enforces the following restrictions:

KeyGenerator

Algorithm Name | Default Keysize | Restrictions/Comments
AES | 128 | Keysize must be equal to 128, 192, or 256.
ARCFOUR (RC4) | 128 | Keysize must range between 40 and 1024 (inclusive).
Blowfish | 128 | Keysize must be a multiple of 8, ranging from 32 to 448 (inclusive).
DES | 56 | Keysize must be equal to 56.
DESede (Triple DES) 168 Keysize must be equal to 112 or 168.

A keysize of 112 will generate a Triple DES key with 2 intermediate keys, and a keysize of 168 will generate a Triple DES key with 3 intermediate keys.

Due to the "Meet-In-The-Middle" problem, even though 112 or 168 bits of key material are used, the effective keysize is 80 or 112 bits respectively.
HmacMD5 | 512 | No keysize restriction.
HmacSHA1 | 512 | No keysize restriction.
HmacSHA224 | 224 | No keysize restriction.
HmacSHA256 | 256 | No keysize restriction.
HmacSHA384 | 384 | No keysize restriction.
HmacSHA512 | 512 | No keysize restriction.
RC2 | 128 | Keysize must range between 40 and 1024 (inclusive).

NOTE: The various Password-Based Encryption (PBE) algorithms use various algorithms to generate key data, and ultimately depends on the targeted Cipher algorithm. For example, "PBEWithMD5AndDES" will always generate 56-bit keys.

KeyPairGenerator

Algorithm Name | Default Keysize | Restrictions/Comments
Diffie-Hellman (DH) | 1024 | Keysize must be a multiple of 64, ranging from 512 to 2048 (inclusive).

AlgorithmParameterGenerator

Alg. Name | Default Keysize | Restrictions/Comments
Diffie-Hellman (DH) | 1024 | Keysize must be a multiple of 64, ranging from 512 to 2048 (inclusive).

The SunJGSS Provider

The following algorithms are available in the SunJGSS provider:

OID | Name
1.2.840.113554.1.2.2 | Kerberos v5
1.3.6.1.5.5.2 | SPNEGO

The SunSASL Provider

The following algorithms are available in the SunSASL provider:

Engine | Algorithm Names
SaslClient | CRAM-MD5 DIGEST-MD5 EXTERNAL GSSAPI PLAIN
SaslServer | CRAM-MD5 DIGEST-MD5 GSSAPI

The XMLDSig Provider

The following algorithms are available in the XMLDSig provider:

Engine | Algorithm Names
KeyInfoFactory | DOM
TransformService | http://www.w3.org/TR/2001/REC-xml-c14n-20010315 - (CanonicalizationMethod.INCLUSIVE) http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments - (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS) http://www.w3.org/2001/10/xml-exc-c14n# - (CanonicalizationMethod.EXCLUSIVE) http://www.w3.org/2001/10/xml-exc-c14n#WithComments - (CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS) http://www.w3.org/2000/09/xmldsig#base64 - (Transform.BASE64) http://www.w3.org/2000/09/xmldsig#enveloped-signature - (Transform.ENVELOPED) http://www.w3.org/TR/1999/REC-xpath-19991116 - (Transform.XPATH) http://www.w3.org/2002/06/xmldsig-filter2 - (Transform.XPATH2) http://www.w3.org/TR/1999/REC-xslt-19991116 - (Transform.XSLT)
XMLSignatureFactory | DOM

The SunPCSC Provider

The SunPCSC provider enables applications to use the Java Smart Card I/O API to interact with the PC/SC Smart Card stack of the underlying operating system. On some operating systems, it may be necessary to enable and configure the PC/SC stack before it is usable. Consult your operating system documentation for details.

On Solaris and Linux platforms, SunPCSC accesses the PC/SC stack via the libpcsclite.so library. It looks for this library in the directories /usr/$LIBISA and /usr/local/$LIBISA, where $LIBISA is expanded to lib on 32-bit platforms, lib/64 on 64-bit Solaris platforms, and lib64 on 64-bit Linux platforms. The system property sun.security.smartcardio.library may also be set to the full filename of an alternate libpcsclite.so implementation. On Windows platforms, SunPCSC always calls into winscard.dll and no Java-level configuration is necessary or possible.

If PC/SC is available on the host platform, the SunPCSC implementation can be obtained via TerminalFactory.getDefault() and TerminalFactory.getInstance("PC/SC"). If PC/SC is not available or not correctly configured, a getInstance() call will fail with a NoSuchAlgorithmException and getDefault() will return a JRE built-in implementation that does not support any terminals.

The following algorithms are available in the SunPCSC provider:

Engine | Algorithm Names
TerminalFactory | PC/SC

The SunMSCAPI Provider

The SunMSCAPI provider enables applications to use the standard JCA/JCE APIs to access the native cryptographic libraries, certificates stores and key containers on the Microsoft Windows platform. The SunMSCAPI provider itself does not contain cryptographic functionality, it is simply a conduit between the Java environment and the native cryptographic services on Windows.

The following algorithms are available in the SunMSCAPI provider:

Engine | Algorithm Names
Cipher | RSA RSA/ECB/PKCS1Padding only
KeyPairGenerator | RSA
KeyStore Windows-MY

The keystore type that identifies the native Microsoft Windows MY keystore. It contains the user's personal certificates and associated private keys.

Windows-ROOT

The keystore type that identifies the native Microsoft Windows ROOT keystore. It contains the certificates of Root certificate authorities and other self-signed trusted certificates.
SecureRandom Windows-PRNG

The name of the native pseudo-random number generation (PRNG) algorithm.
Signature MD5withRSA
MD2withRSA
NONEwithRSA
SHA1withRSA
SHA256withRSA
SHA384withRSA
SHA512withRSA

Keysize Restrictions

The SunMSCAPI provider uses the following default keysizes (in bits) and enforce the following restrictions:

KeyGenerator

Alg. Name | Default Keysize | Restrictions/Comments
RSA | 1024 | Keysize ranges from 512 bits to 16,384 bits (depending on the underlying Microsoft Windows cryptographic service provider).

The SunEC Provider

The SunEC provider implements Elliptical Curve Cryptography (ECC). ECC is emerging as an attractive public-key cryptosystem for mobile/wireless and other environments. Compared to traditional cryptosystems like RSA, ECC offers equivalent security with smaller key sizes, which results in faster computations, lower power consumption, as well as memory and bandwidth savings.

Applications can now use the standard JCA/JCE APIs to access ECC functionality without the dependency on external ECC libraries(via SunPKCS11), as was the case in the JDK 6 release.

The following algorithms are available in the SunEC provider:

Engine | Algorithm Name(s)
AlgorithmParameters | EC
KeyAgreement | ECDH
KeyFactory | EC
KeyPairGenerator | EC
Signature | NONEwithECDSA SHA1withECDSA SHA224withECDSA SHA256withECDSA SHA384withECDSA SHA512withECDSA

Keysize Restrictions

The SunEC provider uses the following default keysizes (in bits) and enforces the following restrictions:

KeyPairGenerator

Alg. Name | Default Keysize | Restrictions/Comments
EC | 256 | Keysize must range from 112 to 571 (inclusive).

The OracleUcrypto Provider

The Solaris-only security provider OracleUcrypto leverages the Solaris Ucrypto library to offload and delegate cryptographic operations supported by the Oracle SPARC T4 based on-core cryptographic instructions. The OracleUcrypto provider itself does not contain cryptographic functionality; it is simply a conduit between the Java environment and the Solaris Ucrypto library.

If the underlying Solaris Ucrypto library does not support a particular algorithm, then the OracleUcrypto provider will not support it either. Consequently, at runtime, the supported algorithms consists of the intersection of those that the Solaris Ucrypto library supports and those that the OracleUcrypto provider recognizes.

Note that the OracleUcrypto provider is included only in Oracle's JDK. It is not part of OpenJDK.

The following algorithms are available in the OracleUcrypto provider:

Engine | Algorithm Name(s)
Cipher | AES RSA AES/ECB/NoPadding AES/ECB/PKCS5Padding AES/CBC/NoPadding AES/CBC/PKCS5Padding AES/CTR/NoPadding AES/GCM/NoPadding AES/CFB128/NoPadding AES/CFB128/PKCS5Padding RSA/ECB/PKCS1Padding RSA/ECB/NoPadding
Signature | MD5withRSA SHA1withRSA SHA256withRSA SHA384withRSA SHA512withRSA
MessageDigest | MD5 SHA SHA-256 SHA-384 SHA-512

Keysize Restrictions

The OracleUcrypto provider does not specify any default keysizes or keysize restrictions; these are specified by the underlying Solaris Ucrypto library.

OracleUcrypto Provider Configuration File

The OracleUcrypto provider has a configuration file named ucrypto-solaris.cfg that resides in the $JAVA_HOME/lib/security directory. Modify this configuration file to specify which algorithms to disable by default. For example, the following configuration file disables AES with CFB128 mode by default:

#
# Configuration file for the OracleUcrypto provider
#
disabledServices = {
  Cipher.AES/CFB128/PKCS5Padding
  Cipher.AES/CFB128/NoPadding
}

The Apple Provider

The Apple provider implements a java.security.KeyStore that provides access to the Mac OS X Keychain.

The following algorithms are available in the Apple provider:

Engine | Algorithm Name(s)
KeyStore | KeychainStore
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK 6 Security Enhancements

The Java Platform has added support for the following Security functionality in version 6:

  • Mixing Signed and Unsigned Code

    As of the Java SE 6 Update 19 release (or later), a warning dialog is raised when a Java Web Start application or applet contains both signed and unsigned components. See Mixing Signed and Unsigned Code for more information.

  • JSR 105, the XML Digital Signature API and implementation

    For details, see the XML Digital Signature API Specification and the XML Digital Signature API Overview and Tutorial

  • JSR 268, Smart Card I/O API

    Sun's Java SE 6 implementation bundles the Smart Card I/O API defined by JSR 268 as well as a provider called SunPCSC which uses the platform's native PC/SC Smart Card stack, if available. Note that neither the API nor the SunPCSC provider are part of the Java SE 6 platform specification and may not be present on other compliant Java SE implementations.

  • Elliptic Curve Cryptography (ECC) in SunPKCS11

    The SunPKCS11 provider now exposes ECC algorithms if the underlying PKCS#11 token supports them. This include ECDSA signing and verification, ECDH key agreement, and generation of EC keypairs. For more information about the supported mechanisms, see the supported algorithms section in the PKCS#11 reference guide.

  • Elliptic Curve CipherSuites in SunJSSE

    The SunJSSE now supports the ECC ciphersuites defined in RFC 4492, if a suitable crypto provider is available (for example, SunPKCS11 with an appropriate PKCS#11 library). For more information, see the list of supported ciphersuites and their requirements.

  • Access Network Security Services (NSS) using SunPKCS11

    The SunPKCS11 provider supports new configuration directives which allow it to access the NSS security library. This enables Java applications to read keys stored in the NSS database files, use ECC algorithms, and to use the NSS Softtoken as a FIPS 140 compliant cryptography provider. For more information see the NSS section in the PKCS#11 guide.

  • FIPS 140 compliance for SunJSSE

    The SunJSSE provider now supports an experimental FIPS 140 compliant mode. When enabled and used in combination with the SunPKCS11 provider and an appropriate FIPS 140 certified PKCS#11 token, SunJSSE is FIPS 140 compliant. For details, see the JSSE Reference Guide.

  • Pluggability restrictions have been removed from JSSE

    In earlier releases, the JSSE framework did not allow 3rd party JSSE providers that implemented non-standard ciphersuites due to export control issues.

  • Socket read timeouts are fully supported by SunJSSE SSLSockets

    In previous releases, calling setSoTimeout() would sometimes lead to unpredictable results. This has been corrected.

  • Cipher Text Stealing (CTS) mode added to SunJCE block ciphers

    CTS is described in Bruce Schneier's book "Applied Cryptography-Second Edition", John Wiley & Sons, 1996 (pg. 195-196), and is used by some Kerberos implementations.

  • New PBKDF2WithHmacSHA1 Secretkeyfactory algorithm added to SunJCE

    Constructs secret keys using the Password-Based Key Derivation Function function found in PKCS5 v2.0.

  • Removed the 2048 RSA keysize limit from local_policy.jar

    Implementations were previously restricted from obtaining RSA keys larger than 2048 bits without installing the unlimited crypto policy files.

  • New Certification Authority (CA) certificates added

    A number of new CA certificates were added to the default system lib/security/cacerts file. See the keytool docs for the complete list of CA certificates.

  • Added Two New Options to jarsigner Tool

    Options -digestalg and -sigalg have been added to the jarsigner tool to allow users to override the default signature and digest algorithms when signing a jar file

  • New Options for keytool Tool

    Options -genseckey and -importkeystore have been added to the keytool tool to allow users to generate a SecretKey inside a keystore and copy entries from one keystore to another. Options -genkey, -import and -export have been renamed to -genkeypair, -importcert and -exportcert.

  • User-Entered Passwords no longer echoed on the screen

    Security tools like keytool/jarsigner, and the JAAS login authentication modules use the new java.io.Console class so that user-entered passwords are no longer echoed on the screen.

  • Support for AES Encryption Type in Java GSS/Kerberos

    Support for AES encryption type (AES128 and AES256) in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Solaris 10 and MIT Kerberos. For details, see Java GSS Security Features.

  • Support for RC4-HMAC Encryption Type in Java GSS/Kerberos

    Support for RC4-HMAC encryption type in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Windows, Solaris 10 and MIT Kerberos. Windows Active Directory supports RC4-HMAC as the default Kerberos encryption type. For details, see Java GSS Security Features.

  • Support for SPNEGO in Java GSS

    Support for SPNEGO mechanism in Java GSS is now available. The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism is a pseudo security mechanism that enables GSS-API peers to securely negotiate a common security mechanism to be used.

    Support for SPNEGO authentication scheme in HTTP is also available. For details, see Java GSS Security Features.

  • Support for new Pre-Authentication Mechanisms

    Java GSS/Kerberos now includes support for the new pre-authentication mechanisms as described in the latest Kerberos specification. For details, see Java GSS Security Features.

  • Native Platform GSS Integration

    This feature allows Java GSS applications to take advantage of features in the native GSS implementation available on the platform. For details, see Java GSS Security Features.

  • Access to native PKI and cryptographic services on Microsoft Windows

    Added the SunMSCAPI JCE provider which uses the Microsoft CryptoAPI (CAPI) to offer a variety of RSA cryptographic functions. It acts as a bridge between Java applications and the services offered by the default RSA cryptographic service provider available via CAPI. It provides access to X.509 certificates and RSA key pairs, it performs RSA encryption and decryption, and it creates and validates RSA signatures. It also supports a cryptographic random number generator.

  • Enhancements to the implementation of PKI Certificate Path Validation

    Added support for segmented and indirect CRLs, resulting in improved performance and improved PKIX compliance (RFC 3280).

  • JAAS-based authentication using LDAP

    Added a JAAS login module which enables users to perform authentication using credentials stored in an LDAP directory service. It provides a drop-in solution for existing JAAS-enabled applications that wish to support authentication using LDAP. See LDAPLoginModule for more information.

  • Default SSLContext

    Added the static method getDefault() and setDefault() to SSLContext. getDefault() returns the default SSLContext, which is initialized in an implementation specific fashion, for example using system properties. setDefault() allows an application to programmatically set the default context to any initialized SSLContext object.

  • SSLParameters

    The new SSLParameters class encapsulates the configuration parameters of an SSL endpoint, in particular the ciphersuites, protocol versions, and for servers the client authentication requirements. They can be applied with a single call to SSLSocket.setSSLParameters() or SSLEngine.setSSLParameters().

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK 8 PKCS#11 Reference Guide

1.0 Introduction

2.0 Sun PKCS#11 Provider

2.1 Requirements
2.2 Configuration
2.3 Accessing Network Security Services (NSS)

3.0 Application Developers

3.1 Token Login
3.2 Token Keys
3.3 Delayed Provider Selection
3.4 JAAS KeyStoreLoginModule
3.5 Tokens as JSSE Keystores and Trust Stores

4.0 Tools

4.1 KeyTool and JarSigner
4.2 PolicyTool

5.0 Provider Developers

5.1 Provider Services
5.1.1 Instantiating Engine Classes
5.1.2 Parameter Support

Appendix A Sun PKCS#11 Provider's Supported Algorithms

Appendix B Sun PKCS#11 Provider's KeyStore Restrictions

Appendix C Example Provider

1.0 Introduction

The Java platform defines a set of programming interfaces for performing cryptographic operations. These interfaces are collectively known as the Java Cryptography Architecture (JCA) and the Java Cryptography Extension (JCE). Specifications are available at the Java SE Security Documentation page.

The cryptographic interfaces are provider-based. Specifically, applications talk to Application Programming Interfaces (APIs), and the actual cryptographic operations are performed in configured providers which adhere to a set of Service Provider Interfaces (SPIs). This architecture supports different provider implementations. Some providers may perform cryptographic operations in software; others may perform the operations on a hardware token (for example, on a smartcard device or on a hardware cryptographic accelerator).

The Cryptographic Token Interface Standard, PKCS#11, is produced by RSA Security and defines native programming interfaces to cryptographic tokens, such as hardware cryptographic accelerators and Smartcards. To facilitate the integration of native PKCS#11 tokens into the Java platform, a new cryptographic provider, the Sun PKCS#11 provider, has been introduced into the J2SE 5.0 release. This new provider enables existing applications written to the JCA and JCE APIs to access native PKCS#11 tokens. No modifications to the application are required. The only requirement is the proper configuration of the provider into the Java Runtime.

Although an application can make use of most PKCS#11 features using existing APIs, some applications might need more flexibility and capabilities. For example, an application might want to deal with Smartcards being removed and inserted dynamically more easily. Or, a PKCS#11 token might require authentication for some non-key-related operations and therefore, the application must be able to log into the token without using keystore. In J2SE 5.0, the JCA was enhanced to allow applications greater flexibility in dealing with different providers.

This document describes how native PKCS#11 tokens can be configured into the Java platform for use by Java applications. It also describes the enhancements that were made to the JCA to make it easier for applications to deal with different types of providers, including PKCS#11 providers.

2.0 Sun PKCS#11 Provider

The Sun PKCS#11 provider, in contrast to most other providers, does not implement cryptographic algorithms itself. Instead, it acts as a bridge between the Java JCA and JCE APIs and the native PKCS#11 cryptographic API, translating the calls and conventions between the two. This means that Java applications calling standard JCA and JCE APIs can, without modification, take advantage of algorithms offered by the underlying PKCS#11 implementations, such as, for example,

  • Cryptographic Smartcards,
  • Hardware cryptographic accelerators, and
  • High performance software implementations.
Note that Java SE only facilitates accessing native PKCS#11 implementations, it does not itself include a native PKCS#11 implementation. However, cryptographic devices such as Smartcards and hardware accelerators often come with software that includes a PKCS#11 implementation, which you need to install and configure according to manufacturer's instructions.

2.1 Requirements

The Sun PKCS#11 provider is supported on Solaris (SPARC and x86), Linux (x86), and Windows platforms in both 32-bit and 64-bit Java processes.

The Sun PKCS#11 provider requires an implementation of PKCS#11 v2.0 or later to be installed on the system. This implementation must take the form of a shared-object library (.so on Solaris and Linux) or dynamic-link library (.dll on Windows). Please consult your vendor documentation to find out if your cryptographic device includes such a PKCS#11 implementation, how to configure it, and what the name of the library file is.

The Sun PKCS#11 provider supports a number of algorithms, provided that the underlying PKCS#11 implementation offers them. The algorithms and their corresponding PKCS#11 mechanisms are listed in the table in Appendix A.

2.2 Configuration

The Sun PKCS#11 provider is implemented by the main class sun.security.pkcs11.SunPKCS11 and accepts the full pathname of a configuration file as an argument. To use the provider, you must first install it by using the Java Cryptography Architecture (JCA). As with all JCA providers, installation of the provider can be done either statically or programmatically. To install the provider statically, add the provider to the Java Security properties file ($JAVA_HOME/lib/security/java.security). For example, here's a fragment of the java.security file that installs the Sun PKCS#11 provider with the configuration file /opt/bar/cfg/pkcs11.cfg.
# configuration for security providers 1-6 ommitted
security.provider.7=sun.security.pkcs11.SunPKCS11 /opt/bar/cfg/pkcs11.cfg
To install the provider dynamically, create an instance of the provider with the appropriate configuration filename and then install it. Here is an example.
String configName = "/opt/bar/cfg/pkcs11.cfg";
Provider p = new sun.security.pkcs11.SunPKCS11(configName);
Security.addProvider(p);

To use more than one slot per PKCS#11 implementation, or to use more than one PKCS#11 implementation, simply repeat the installation for each with the appropriate configuration file. This will result in a Sun PKCS#11 provider instance for each slot of each PKCS#11 implementation.

The configuration file is a text file that contains entries in the following format.

attribute = value The valid values for attribute and value are described in the table in this section. The two mandatory attributes are name and library. Here is a sample configuration file.
name = FooAccelerator
library = /opt/foo/lib/libpkcs11.so
Comments are denoted by lines starting with the # (number) symbol.

Attribute | Value | Description
library | pathname of PKCS#11 implementation | This is the full pathname (including extension) of the PKCS#11 implementation; the format of the pathname is platform dependent. For example, /opt/foo/lib/libpkcs11.so might be the pathname of a PKCS#11 implementation on Solaris and Linux while C:\foo\mypkcs11.dll might be the pathname on Windows.
name | name suffix of this provider instance | This string is concatenated with the prefix SunPKCS11- to produce this provider instance's name (that is, the string returned by its Provider.getName() method). For example, if the name attribute is "FooAccelerator", then the provider instance's name will be "SunPKCS11-FooAccelerator".
description | description of this provider instance | This string will be returned by the provider instance's Provider.getInfo() method. If none is specified, a default description will be returned.
slot | slot id | This is the id of the slot that this provider instance is to be associated with. For example, you would use 1 for the slot with the id 1 under PKCS#11. At most one of slot or slotListIndex may be specified. If neither is specified, the default is a slotListIndex of 0.
slotListIndex | slot index | This is the slot index that this provider instance is to be associated with. It is the index into the list of all slots returned by the PKCS#11 function C_GetSlotList. For example, 0 indicates the first slot in the list. At most one of slot or slotListIndex may be specified. If neither is specified, the default is a slotListIndex of 0.
enabledMechanisms brace enclosed, whitespace-separated list of PKCS#11 mechanisms to enable This is the list PKCS#11 mechanisms that this provider instance should use, provided that they are supported by both the Sun PKCS#11 provider and PKCS#11 token. All other mechanisms will be ignored. Each entry in the list is the name of a PKCS#11 mechanism. Here is an example that lists two PKCS#11 mechanisms.
enabledMechanisms = {
  CKM_RSA_PKCS
  CKM_RSA_PKCS_KEY_PAIR_GEN
}
At most one of enabledMechanisms or disabledMechanisms may be specified. If neither is specified, the mechanisms enabled are those that are supported by both the Sun PKCS#11 provider and the PKCS#11 token.
disabledMechanisms brace enclosed, whitespace-separated list of PKCS#11 mechanisms to disable This is the list of PKCS#11 mechanism that this provider instance should ignore. Any mechanism listed will be ignored by the provider, even if they are supported by the token and the Sun PKCS#11 provider. The strings SecureRandom and KeyStore may be specified to disable those services.

At most one of enabledMechanisms or disabledMechanisms may be specified. If neither is specified, the mechanisms enabled are those that are supported by both the Sun PKCS#11 provider and the PKCS#11 token.
attributes | see below | The attributes option can be used to specify additional PKCS#11 that should be set when creating PKCS#11 key objects. This makes it possible to accomodate tokens that require particular attributes. For details, see the section below.

Attributes Configuration

The attributes option allows you to specify additional PKCS#11 attributes that should be set when creating PKCS#11 key objects. By default, the SunPKCS11 provider only specifies mandatory PKCS#11 attributes when creating objects. For example, for RSA public keys it specifies the key type and algorithm (CKA_CLASS and CKA_KEY_TYPE) and the key values for RSA public keys (CKA_MODULUS and CKA_PUBLIC_EXPONENT). The PKCS#11 library you are using will assign implementation specific default values to the other attributes of an RSA public key, for example that the key can be used to encrypt and verify messages (CKA_ENCRYPT and CKA_VERIFY = true).

The attributes option can be used if you do not like the default values your PKCS#11 implementation assigns or if your PKCS#11 implementation does not support defaults and requires a value to be specified explicitly. Note that specifying attributes that your PKCS#11 implementation does not support or that are invalid for the type of key in question may cause the operation to fail at runtime.

The option can be specified zero or more times, the options are processed in the order specified in the configuration file as described below. The attributes option has the format:

attributes(operation, keytype, keyalgorithm) = {
  name1 = value1
  [...]
}
Valid values for operation are:
  • generate, for keys generated via a KeyPairGenerator or KeyGenerator
  • import, for keys created via a KeyFactory or SecretKeyFactory. This also applies to Java software keys automatically converted to PKCS#11 key objects when they are passed to the initialization method of a cryptographic operation, for example Signature.initSign().
  • *, for keys created using either a generate or a create operation.
Valid values for keytype are CKO_PUBLIC_KEY, CKO_PRIVATE_KEY, and CKO_SECRET_KEY, for public, private, and secret keys, respectively, and * to match any type of key.

Valid values for keyalgorithm are one of the CKK_xxx constants from the PKCS#11 specification, or * to match keys of any algorithm. The algorithms currently supported by the SunPKCS11 provider are CKK_RSA, CKK_DSA, CKK_DH, CKK_AES, CKK_DES, CKK_DES3, CKK_RC4, CKK_BLOWFISH, and CKK_GENERIC.

The attribute names and values are specified as a list of one or more name-value pairs. name must be a CKA_xxx constant from the PKCS#11 specification, for example CKA_SENSITIVE. value can be one of the following:

  • a boolean value, true or false
  • an integer, in decimal form (default) or in hexadecimal form if it begins with 0x.
  • null, indicating that this attribute should not be specified when creating objects.
If the attributes option is specified multiple times, the entries are processed in the order specified with the attributes aggregated and later attributes overriding earlier ones. For example, consider the following configuration file excerpt:
attributes(*,CKO_PRIVATE_KEY,*) = {
  CKA_SIGN = true
}

attributes(*,CKO_PRIVATE_KEY,CKK_DH) = {
  CKA_SIGN = null
}

attributes(*,CKO_PRIVATE_KEY,CKK_RSA) = {
  CKA_DECRYPT = true
}
The first entry says to specify CKA_SIGN = true for all private keys. The second option overrides that with null for Diffie-Hellman private keys, so the CKA_SIGN attribute will not specified for them at all. Finally, the third option says to also specify CKA_DECRYPT = true for RSA private keys. That means RSA private keys will have both CKA_SIGN = true and CKA_DECRYPT = true set.

There is also a special form of the attributes option. You can write attributes = compatibility in the configuration file. That is a shortcut for a whole set of attribute statements. They are designed to provider maximum compatibility with existing Java applications, which may expect, for example, all key components to be accessible and secret keys to be useable for both encryption and decryption. The compatibility attributes line can be used together with other attributes lines, in which case the same aggregation and overriding rules apply as described earlier.

2.3 Accessing Network Security Services (NSS)

Network Security Services (NSS) is a set of open source security libraries used by the Mozilla/Firefox browsers, Sun's Java Enterprise System server software, and a number of other products. Its crypto APIs are based on PKCS#11 but it includes special features that are outside of the PKCS#11 standard. The Sun PKCS#11 provider includes code to interact with these NSS specific features, including several NSS specific configuration directives, which are described below.

For best results, we recommend that you use the latest version of NSS available. It should be at least version 3.12.

The Sun PKCS#11 provider uses NSS specific code when any of the nss configuration directives described below are used. In that case, the regular configuration commands library, slot, and slotListIndex cannot be used.

Attribute | Value | Description
nssLibraryDirectory directory containing the NSS and NSPR libraries This is the full pathname of the directory containing the NSS and NSPR libraries. It must be specified unless NSS has already been loaded and initialized by another component running in the same process as the Java VM.

Depending on your platform, you may have to set LD_LIBRARY_PATH or PATH (on Windows) to include this directory in order to allow the operating system to locate the dependent libraries.
nssSecmodDirectory | directory containing the NSS DB files | The full pathname of the directory containing the NSS configuration and key information (secmod.db, key3.db, and cert8.db). This directive must be specified unless NSS has already been initialized by another component (see above) or NSS is used without database files as described below.
nssDbMode one of readWrite, readOnly, and noDb This directives determines how the NSS database is accessed. In read-write mode, full access is possible but only one process at a time should be accessing the databases. Read-only mode disallows modifications to the files.

The noDb mode allows NSS to be used without database files purely as a cryptographic provider. It is not possible to create persistent keys using the PKCS11 KeyStore. This mode is useful because NSS includes highly optimized implementations and algorithms not currently available in Sun's bundled Java based crypto providers, for example Elliptic Curve Cryptography (ECC).
nssModule one of keystore, crypto, fips, and trustanchors NSS makes its functionality available using several different libraries and slots. This directive determines which of these modules is accessed by this instance of SunPKCS11.

The crypto module is the default in noDb mode. It supports crypto operations without login but no persistent keys.

The fips module is the default if the NSS secmod.db has been set to FIPS-140 compliant mode. In this mode, NSS restricts the available algorithms and the PKCS#11 attributes with which keys can be created.

The keystore module is the default in other configurations. It supports persistent keys using the PKCS11 KeyStore, which are stored in the NSS DB files. This module requires login.

The trustanchors module enables access to NSS trust anchor certificates via the PKCS11 KeyStore, if secmod.db has been configured to include the trust anchor library.

Example SunPKCS11 configuration files for NSS

NSS as a pure cryptography provider
name = NSScrypto
nssLibraryDirectory = /opt/tests/nss/lib
nssDbMode = noDb
attributes = compatibility
NSS as a FIPS 140 compliant crypto token:
name = NSSfips
nssLibraryDirectory = /opt/tests/nss/lib
nssSecmodDirectory = /opt/tests/nss/fipsdb
nssModule = fips

3.0 Application Developers

Java applications can use the existing JCA and JCE APIs to access PKCS#11 tokens via the Sun PKCS#11 provider. This is sufficient for many applications but it might be difficult for an application to deal with certain PKCS#11 features, such as unextractable keys and dynamically changing Smartcards. Consequently, a number of enhancements were made to the APIs to better support applications using certain PKCS#11 features. These enhancments are discussed in this section.

3.1 Token Login

Certain PKCS#11 operations, such as accessing private keys, require a login using a Personal Identification Number, or PIN, before the operations can proceed. The most common type of operations that require login are those that deal with keys on the token. In a Java application, such operations often involve first loading the keystore. When accessing the PKCS#11 token as a keystore via the java.security.KeyStore class, you can supply the PIN in the password input parameter to the load method, similar to how applications initialize a keystore prior to J2SE 5.0. The PIN will then be used by the Sun PKCS#11 provider for logging into the token. Here is an example.

char[] pin = ...;
KeyStore ks = KeyStore.getInstance("PKCS11");
ks.load(null, pin);

This is fine for an application that treats PKCS#11 tokens as static keystores. For an application that wants to accommodate PKCS#11 tokens more dynamically, such as Smartcards being inserted and removed, you can use the new KeyStore.Builder class. Here is an example of how to initialize the builder for a PKCS#11 keystore with a callback handler.

KeyStore.CallbackHandlerProtection chp =
    new KeyStore.CallbackHandlerProtection(new MyGuiCallbackHandler());
KeyStore.Builder builder =
    KeyStore.Builder.newInstance("PKCS11", null, chp);

For the Sun PKCS#11 provider, the callback handler must be able to satisfy a PasswordCallback, which is used to prompt the user for the PIN. Whenever the application needs access to the keystore, it uses the builder as follows.

KeyStore ks = builder.getKeyStore();
Key key = ks.getKey(alias, null);

The builder will prompt for a password as needed using the previously configured callback handler. The builder will prompt for a password only for the initial access. If the user of the application continues using the same Smartcard, the user will not be prompted again. If the user removes and inserts a different SmartCard, the builder will prompt for a password for the new card.

Depending on the PKCS#11 token, there may be non-key-related operations that also require token login. Applications that use such operations can use the newly introduced java.security.AuthProvider class. The AuthProvider class extends from java.security.Provider and defines methods to perform login and logout operations on a provider, as well as to set a callback handler for the provider to use.

For the Sun PKCS#11 provider, the callback handler must be able to satisfy a PasswordCallback, which is used to prompt the user for the PIN.

Here is an example of how an application might use an AuthProvider to log into the token.

AuthProvider aprov = (AuthProvider)Security.getProvider("SunPKCS11");
aprov.login(subject, new MyGuiCallbackHandler());

3.2 Token Keys

Java Key objects may or may not contain actual key material.

  • A software Key object does contain the actual key material and allows access to that material.
  • An unextractable key on a secure token (such as a Smartcard) is represented by a Java Key object that does not contain the actual key material. The Key object only contains a reference to the actual key.

Applications and providers must use the correct interfaces to represent these different types of Key objects. Software Key objects (or any Key object that has access to the actual key material) should implement the interfaces in the java.security.interfaces and javax.crypto.interfaces packages (such as DSAPrivateKey). Key objects representing unextractable token keys should only implement the relevant generic interfaces in the java.security and javax.crypto packages (PrivateKey, PublicKey, or SecretKey). Identification of the algorithm of a key should be performed using the Key.getAlgorithm() method.

Applications should note that a Key object for an unextractable token key can only be used by the provider associated with that token.

3.3 Delayed Provider Selection

Prior to J2SE 5.0, the Java cryptography getInstance() methods, such as Cipher.getInstance("DES"), returned the implementation from the first provider that implemented the requested algorithm. This is problematic if an application attempts to use a Key object for an unextractable token key with a provider that only accepts software key objects. In such a case, the provider would throw an InvalidKeyException. This is an issue for the Cipher, KeyAgreement, Mac, and Signature classes.

J2SE 5.0, addresses this issue by delaying the selection of the provider until the relevant initialization method is called. The initialization method accepts a Key object and can determine at that point which provider can accept the specified Key object. This ensures that the selected provider can use the specified Key object. The following represents the affected initialization methods.

  • Cipher.init(..., Key key, ...)
  • KeyAgreement.init(Key key, ...)
  • Mac.init(Key key, ...)
  • Signature.initSign(PrivateKey privateKey)
Furthermore, if an application calls the initialization method multiple times (each time with a different key, for example), the proper provider for the given key is selected each time. In other words, a different provider may be selected for each initialization call.

Although this delayed provider selection is hidden from the application, it does affect the behavior of the getProvider() method for Cipher, KeyAgreement, Mac, and Signature. If getProvider() is called before the initialization operation has occurred (and therefore before provider selection has occurred), then the first provider that supports the requested algorithm is returned. This may not be the same provider as the one selected after the initialization method is called. If getProvider() is called after the initialization operation has occurred, then the actual selected provider is returned. It is recommended that applications only call getProvider() after they have called the relevant initialization method.

In addition to getProvider(), the following additional methods are similarly affected.

  • Cipher.getBlockSize
  • Cipher.getExcemptionMechanism
  • Cipher.getIV
  • Cipher.getOutputSize
  • Cipher.getParameters
  • Mac.getMacLength
  • Signature.getParameters
  • Signature.setParameter

3.4 JAAS KeyStoreLoginModule

Java SE comes with a JAAS keystore login module, KeyStoreLoginModule that allows an application to authenticate using its identity in a specified keystore. After authentication, the application would have acquire its principal and credentials information (certificate and private key) from the keystore. By using this login module and configuring it to use a PKCS#11 token as a keystore, the application can acquire this information from a PKCS#11 token.

Use the following options to configure the KeyStoreLoginModule to use a PKCS#11 token as the keystore.

  • keyStoreURL="NONE"
  • keyStoreType="PKCS11"
  • keyStorePasswordURL=some_pin_url
where some_pin_url is the location of the PIN. If the keyStorePasswordURL option is omitted, then the login module will get the PIN via the application's callback handler, supplying it with a PasswordCallback. Here is an example of a configuration file that uses a PKCS#11 token as a keystore.
other {
    com.sun.security.auth.module.KeyStoreLoginModule required
        keyStoreURL="NONE"
  keyStoreType="PKCS11"
  keyStorePasswordURL="file:/home/joe/scpin";
};

If more than one Sun PKCS#11 provider has been configured dynamically or in the java.security security properties file, you can use the keyStoreProvider option to target a specific provider instance. The argument to this option is the name of the provider. For the Sun PKCS#11 provider, the provider name is of the form SunPKCS11-TokenName, where TokenName is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following configuration file names the PKCS#11 provider instance with name suffix SmartCard.

other {
    com.sun.security.auth.module.KeyStoreLoginModule required
        keyStoreURL="NONE"
  keyStoreType="PKCS11"
  keyStorePasswordURL="file:/home/joe/scpin"
  keyStoreProvider="SunPKCS11-SmartCard";
};

Some PKCS#11 tokens support login via a protected authentication path. For example, a Smartcard may have a dedicated PIN-pad to enter the pin. Biometric devices will also have their own means to obtain authentication information. If the PKCS#11 token has a protected authentication path, then use the protected=true option and omit the keyStorePasswordURL option. Here is an example of a configuration file for such a token.

other {
    com.sun.security.auth.module.KeyStoreLoginModule required
        keyStoreURL="NONE"
  keyStoreType="PKCS11"
  protected=true;
};

3.5 Tokens as JSSE Keystore and Trust Stores

To use PKCS#11 tokens as JSSE keystores or trust stores, the JSSE application can use the APIs described previously to instantiate a KeyStore that is backed by a PKCS#11 token and pass it to its key manager and trust manager. The JSSE application will then have access to the keys on the token.

JSSE also supports configuring the use of keystores and trust stores via system properties, as described in the JSSE Reference Guide. To use a PKCS#11 token as a keystore or trust store, set the javax.net.ssl.keyStoreType and javax.net.ssl.trustStoreType system properties, respectively, to "PKCS11", and set the javax.net.ssl.keyStore and javax.net.ssl.trustStore system properties, respectively, to NONE. To specify the use of a specific provider instance, use the javax.net.ssl.keyStoreProvider and javax.net.ssl.trustStoreProvider system properties (e.g., "SunPKCS11-SmartCard").

4.0 Tools

In J2SE 5.0, the security tools were updated to support operations using the new Sun PKCS#11 provider. The changes are discussed below.

4.1 KeyTool and JarSigner

If the Sun PKCS#11 provider has been configured in the java.security security properties file (located in the $JAVA_HOME/lib/security directory of the Java runtime), then keytool and jarsigner can be used to operate on the PKCS#11 token by specifying the following options.

  • -keystore NONE
  • -storetype PKCS11
Here an example of a command to list the contents of the configured PKCS#11 token.
keytool -keystore NONE -storetype PKCS11 -list
The PIN can be specified using the -storepass option. If none has been specified, then keytool and jarsigner will prompt for the token PIN. If the token has a protected authentication path (such as a dedicated PIN-pad or a biometric reader), then the -protected option must be specified, and no password options can be specified.

If more than one Sun PKCS#11 provider has been configured in the java.security security properties file, you can use the -providerName option to target a specific provider instance. The argument to this option is the name of the provider.

  • -providerName providerName
For the Sun PKCS#11 provider, providerName is of the form SunPKCS11-TokenName, where TokenName is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix SmartCard.
keytool -keystore NONE -storetype PKCS11 \
        -providerName SunPKCS11-SmartCard \
        -list

If the Sun PKCS#11 provider has not been configured in the java.security security properties file, you can use the following options to instruct keytool and jarsigner to install the provider dynamically.

  • -providerClass sun.security.pkcs11.SunPKCS11
  • -providerArg ConfigFilePath
ConfigFilePath is the path to the token configuration file. Here is an example of a command to list a PKCS#11 keystore when the Sun PKCS#11 provider has not been configured in the java.security file.
keytool -keystore NONE -storetype PKCS11 \
        -providerClass sun.security.pkcs11.SunPKCS11 \
        -providerArg /foo/bar/token.config \
        -list

4.2 PolicyTool

Prior to J2SE 5.0, the keystore entry in the default policy implementation had the following syntax.

keystore "some_keystore_url", "keystore_type";
This syntax was inadequate for accessing a PKCS#11 keystore because such access usually required a PIN, and there might be multiple PKCS#11 provider instances. To accommodate these requirements, the keystore entry syntax has been updated in J2SE 5.0, to the following.
keystore "some_keystore_url", "keystore_type", "keystore_provider";
keystorePasswordURL "some_password_url";
Where keystore_provider is the keystore provider name (for example, "SunPKCS11-SmartCard"), and some_password_url is a URL pointing to the location of the token PIN. Both keystore_provider and the keystorePasswordURL line are optional. If keystore_provider has not been specified, then the first configured provider that supports the specified keystore type is used. If the keystorePasswordURL line has not been specified, then no password is used.

The following is an example keystore policy entry for a PKCS#11 token.

keystore "NONE", "PKCS11", "SunPKCS11-SmartCard";
keystorePasswordURL "file:/foo/bar/passwordFile";

5.0 Provider Developers

J2SE 5.0 introduces new facilities in the java.security.Provider class for provider implementations to more easily support PKCS#11 tokens and cryptographic services in general. These new facilities are discussed below.

See Appendix C for an example of a simple provider designed to demonstrate the new facilties.

5.1 Provider Services

As described in the above provider documentation, prior to J2SE 5.0, providers were required to create java.util.Property entries describing the services they supported. For each service implemented by the provider, there must be a property whose name is the type of service (Cipher, Signature, etc), followed by a period and the name of the algorithm to which the service applies. The property value must specify the fully qualified name of the class implementing the service. Here is an example of a provider setting KeyAgreement.DiffieHellman property to have the value com.sun.crypto.provider.DHKeyAgreement.

put("KeyAgreement.DiffieHellman",
      "com.sun.crypto.provider.DHKeyAgreement")

J2SE 5.0 introduces a new public static nested class, Provider.Service, to help better encapsulate the properties of a provider service (including its type, attributes, algorithm name, and algorithm aliases). Providers can instantiate Provider.Service objects and register them by calling the Provider.putService() method. This is equivalent to creating a Property entry and calling the Provider.put() method (as was done prior to J2SE 5.0). Note that legacy Property entries registered via Provider.put are still supported.

Here is an example of a provider creating a Service object with the KeyAgreement type, for the DiffieHellman algorithm, implemented by the class com.sun.crypto.provider.DHKeyAgreement.

Service s = new Service(this, "KeyAgreement", "DiffieHellman",
    "com.sun.crypto.provider.DHKeyAgreement", null, null);
putService(s);

Using Provider.Servicee objects instead of legacy Property entries has a couple of major benefits. One benefit is that it allows the provider to have greater flexibility when instantiating engine classes. Another benefit is that it allows the provider to test parameter validity. These features are discussed in detail next.

5.1.1 Instantiating Engine Classes

Prior to J2SE 5.0, the Java Cryptography framework looked up the provider property for a particular service and directly instantiated the engine class registered for that property. J2SE 5.0, has the same behavior by default, but allows the provider to override this behavior and instantiate the engine class for the requested service itself.

To override the default behavior, the provider overrides the Provider.Service.newInstance() method to add its customer behavior. For example, the provider might call a custom constructor, or might perform initialization using information not accessible outside the provider (or that are only known by the provider).

5.1.2 Parameter Support

The Java Cryptography framework may attempt a fast check to determine whether a provider's service implementation can use an application-specified parameter. To perform this fast check, the framework calls Provider.Service.supportsParameter().

In J2SE 5.0, the framework relies on this fast test during delayed provider selection. When an application invokes an initialization method and passes it a Key object, the framework asks an underlying provider whether it supports the object by calling its Service.supportsParameter() method. If supportsParameter() returns false, the framework can immediately remove that provider from consideration. If supportsParameter() returns true, the framework passes the Key object to that provider's initialization engine class implementation. A provider that requires software Key objects should override this method to return false when it is passed non-software keys. Likewise, a provider for a PKCS#11 token that contains unextractable keys should only return true for Key objects that it created, and which therefore correspond to the Keys on its respective token.

Note that the default implementation of supportsParameter() returns true. This allows existing providers to work without modification. However, because of this lenient default implementation, the framework must be prepared to catch exceptions thrown by providers that reject the Key object inside their initialization engine class implementations. The framework treats these cases the same as when supportsParameter() returns false.

Appendix A: Sun PKCS#11 Provider's Supported Algorithms

The following table lists the Java algorithms supported by the Sun PKCS#11 provider and corresponding PKCS#11 mechanisms needed to support them. When multiple mechanisms are listed, they are given in the order of preference and any one of them is sufficent. Note that SunPKCS11 can be instructed to ignore mechanisms by using the disabledMechanisms and enabledMechanisms configuration directives.

For Elliptic Curve mechanisms, SunPKCS11 will only use keys that use the namedCurve choice as encoding for the parameters and only allow the uncompressed point format. The Sun PKCS#11 provider assumes that a token supports all standard named domain parameters.

Java Algorithm | PKCS#11 Mechanisms
Signature.MD2withRSA | CKM_MD2_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.MD5withRSA | CKM_MD5_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA1withRSA | CKM_SHA1_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA224withRSA | CKM_SHA224_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA256withRSA | CKM_SHA256_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA384withRSA | CKM_SHA384_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA512withRSA | CKM_SHA512_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509
Signature.SHA1withDSA | CKM_DSA_SHA1, CKM_DSA
Signature.NONEwithDSA | CKM_DSA
Signature.SHA1withECDSA | CKM_ECDSA_SHA1, CKM_ECDSA
Signature.SHA224withECDSA | CKM_ECDSA
Signature.SHA256withECDSA | CKM_ECDSA
Signature.SHA384withECDSA | CKM_ECDSA
Signature.SHA512withECDSA | CKM_ECDSA
Signature.NONEwithECDSA | CKM_ECDSA
Cipher.RSA/ECB/PKCS1Padding | CKM_RSA_PKCS
Cipher.ARCFOUR | CKM_RC4
Cipher.DES/CBC/NoPadding | CKM_DES_CBC
Cipher.DESede/CBC/NoPadding | CKM_DES3_CBC
Cipher.AES/CBC/NoPadding | CKM_AES_CBC
Cipher.Blowfish/CBC/NoPadding | CKM_BLOWFISH_CBC
Cipher.RSA/ECB/NoPadding | CKM_RSA_X_509
Cipher.AES/CTR/NoPadding | CKM_AES_CTR
KeyAgreement.ECDH | CKM_ECDH1_DERIVE
KeyAgreement.DiffieHellman | CKM_DH_PKCS_DERIVE
KeyPairGenerator.RSA | CKM_RSA_PKCS_KEY_PAIR_GEN
KeyPairGenerator.DSA | CKM_DSA_KEY_PAIR_GEN
KeyPairGenerator.EC | CKM_EC_KEY_PAIR_GEN
KeyPairGenerator.DiffieHellman | CKM_DH_PKCS_KEY_PAIR_GEN
KeyGenerator.ARCFOUR | CKM_RC4_KEY_GEN
KeyGenerator.DES | CKM_DES_KEY_GEN
KeyGenerator.DESede | CKM_DES3_KEY_GEN
KeyGenerator.AES | CKM_AES_KEY_GEN
KeyGenerator.Blowfish | CKM_BLOWFISH_KEY_GEN
Mac.HmacMD5 | CKM_MD5_HMAC
Mac.HmacSHA1 | CKM_SHA_1_HMAC
Mac.HmacSHA224 | CKM_SHA224_HMAC
Mac.HmacSHA256 | CKM_SHA256_HMAC
Mac.HmacSHA384 | CKM_SHA384_HMAC
Mac.HmacSHA512 | CKM_SHA512_HMAC
MessageDigest.MD2 | CKM_MD2
MessageDigest.MD5 | CKM_MD5
MessageDigest.SHA1 | CKM_SHA_1
MessageDigest.SHA-224 | CKM_SHA224
MessageDigest.SHA-256 | CKM_SHA256
MessageDigest.SHA-384 | CKM_SHA384
MessageDigest.SHA-512 | CKM_SHA512
KeyFactory.RSA | Any supported RSA mechanism
KeyFactory.DSA | Any supported DSA mechanism
KeyFactory.EC | Any supported EC mechanism
KeyFactory.DiffieHellman | Any supported Diffie-Hellman mechanism
SecretKeyFactory.ARCFOUR | CKM_RC4
SecretKeyFactory.DES | CKM_DES_CBC
SecretKeyFactory.DESede | CKM_DES3_CBC
SecretKeyFactory.AES | CKM_AES_CBC
SecretKeyFactory.Blowfish | CKM_BLOWFISH_CBC
SecureRandom.PKCS11 | CK_TOKEN_INFO has the CKF_RNG bit set
KeyStore.PKCS11 | Always available

Appendix B: Sun PKCS#11 provider's KeyStore Requirements

The following describes the requirements placed by the Sun PKCS#11 Provider's KeyStore implementation on the underlying native PKCS#11 library. Note that changes may be made in future releases to maximize interoperability with as many existing PKCS#11 libraries as possible.

Read-Only Access

To map existing objects stored on a PKCS#11 token to KeyStore entries, the Sun PKCS#11 Provider's KeyStore implementation performs the following operations.

  1. A search for all private key objects on the token is performed by calling C_FindObjects[Init|Final]. The search template includes the following attributes:
    • CKA_TOKEN = true
    • CKA_CLASS = CKO_PRIVATE_KEY
  2. A search for all certificate objects on the token is performed by calling C_FindObjects[Init|Final]. The search template includes the following attributes:
    • CKA_TOKEN = true
    • CKA_CLASS = CKO_CERTIFICATE
  3. Each private key object is matched with its corresponding certificate by retrieving their respective CKA_ID attributes. A matching pair must share the same unique CKA_ID.

    For each matching pair, the certificate chain is built by following the issuer->subject path. From the end entity certificate, a call fo C_FindObjects[Init|Final] is made with a search template that includes the following attributes:

    • CKA_TOKEN = true
    • CKA_CLASS = CKO_CERTIFICATE
    • CKA_SUBJECT = [DN of certificate issuer]

    This search is continued until either no certificate for the issuer is found, or until a self-signed certificate is found. If more than one certificate is found the first one is used.

    Once a private key and certificate have been matched (and its certificate chain built), the information is stored in a private key entry with the CKA_LABEL value from end entity certificate as the KeyStore alias.

    If the end entity certificate has no CKA_LABEL, then the alias is derived from the CKA_ID. If the CKA_ID can be determined to consist exclusively of printable characters, then a String alias is created by decoding the CKA_ID bytes using the UTF-8 charset. Otherwise, a hex String alias is created from the CKA_ID bytes ("0xFFFF...", for example).

    If multiple certificates share the same CKA_LABEL, then the alias is derived from the CKA_LABEL plus the end entity certificate issuer and serial number ("MyCert/CN=foobar/1234", for example).

  4. Each certificate not part of a private key entry (as the end entity certificate) is checked whether it is trusted. If the CKA_TRUSTED attribute is true, then a KeyStore trusted certificate entry is created with the CKA_LABEL value as the KeyStore alias. If the certificate has no CKA_LABEL, or if multiple certificates share the same CKA_LABEL, then the alias is derived as described above.

    If the CKA_TRUSTED attribute is not supported then no trusted certificate entries are created.

  5. Any private key or certificate object not part of a private key entry or trusted certificate entry is ignored.
  6. A search for all secret key objects on the token is performed by calling C_FindObjects[Init|Final]. The search template includes the following attributes:
    • CKA_TOKEN = true
    • CKA_CLASS = CKO_SECRET_KEY

    A KeyStore secret key entry is created for each secret key object, with the CKA_LABEL value as the KeyStore alias. Each secret key object must have a unique CKA_LABEL.

Write Access

To create new KeyStore entries on a PKCS#11 token to KeyStore entries, the Sun PKCS#11 Provider's KeyStore implementation performs the following operations.

  1. When creating a KeyStore entry (during KeyStore.setEntry, for example), C_CreateObject is called with CKA_TOKEN=true to create token objects for the respective entry contents.

    Private key objects are stored with CKA_PRIVATE=true. The KeyStore alias (UTF8-encoded) is set as the CKA_ID for both the private key and the corresponding end entity certificate. The KeyStore alias is also set as the CKA_LABEL for the end entity certificate object.

    Each certificate in a private key entry's chain is also stored. The CKA_LABEL is not set for CA certificates. If a CA certificate is already in the token, a duplicate is not stored.

    Secret key objects are stored with CKA_PRIVATE=true. The KeyStore alias is set as the CKA_LABEL.

  2. If an attempt is made to convert a session object to a token object (for example, if KeyStore.setEntry is called and the private key object in the specified entry is a session ojbect), then C_CopyObject is called with CKA_TOKEN=true.
  3. If multiple certificates in the token are found to share the same CKA_LABEL, then the write capabilities to the token are disabled.
  4. Since the PKCS#11 specification does not allow regular applications to set CKA_TRUSTED=true (only token initialization applications may do so), trusted certificate entries can not be created.

Miscellaneous

In addition to the searches listed above, the following searches may be used by the Sun PKCS#11 provider's KeyStore implementation to perform internal functions. Specifically, C_FindObjects[Init|Final] may be called with any of the following attribute templates:

  •     CKA_TOKEN    true
    CKA_CLASS    CKO_CERTIFICATE
    CKA_SUBJECT  [subject DN]

  •     CKA_TOKEN    true
    CKA_CLASS    CKO_SECRET_KEY
    CKA_LABEL    [label]

  •     CKA_TOKEN    true
    CKA_CLASS    CKO_CERTIFICATE or CKO_PRIVATE_KEY
    CKA_ID       [cka_id]

Appendix C: Example Provider

package com.foo;

import java.io.*;
import java.lang.reflect.*;
import java.security.*;
import javax.crypto.*;

/**
 * Example provider that demonstrates some of the new API features.
 *
 *  . implement multiple different algorithms in a single class.
 *    Previously each algorithm needed to be implemented in a separate class
 *    (e.g. one for MD5, one for SHA-1, etc.)
 *
 *  . multiple concurrent instances of the provider frontend class each
 *    associated with a different backend.
 *
 *  . it uses "unextractable" keys and lets the framework know which key
 *    objects it can and cannot support
 *
 * Note that this is only a simple example provider designed to demonstrate
 * several of the new features.  It is not explicitly designed for efficiency.
 */
public final class ExampleProvider extends Provider {

    // reference to the crypto backend that implements all the algorithms
    final CryptoBackend cryptoBackend;

    public ExampleProvider(String name, CryptoBackend cryptoBackend) {
        super(name, 1.0, "JCA/JCE provider for " + name);
        this.cryptoBackend = cryptoBackend;
        // register the algorithms we support (MD5, SHA1, DES, and AES)
        putService(new MyService
            (this, "MessageDigest", "MD5", "com.foo.ExampleProvider$MyMessageDigest"));
        putService(new MyService
            (this, "MessageDigest", "SHA1", "com.foo.ExampleProvider$MyMessageDigest"));
        putService(new MyCipherService
            (this, "Cipher", "DES", "com.foo.ExampleProvider$MyCipher"));
        putService(new MyCipherService
            (this, "Cipher", "AES", "com.foo.ExampleProvider$MyCipher"));
    }

    // the API of our fictitious crypto backend
    static abstract class CryptoBackend {
        abstract byte[] digest(String algorithm, byte[] data);
        abstract byte[] encrypt(String algorithm, KeyHandle key, byte[] data);
        abstract byte[] decrypt(String algorithm, KeyHandle key, byte[] data);
        abstract KeyHandle createKey(String algorithm, byte[] keyData);
    }

    // the shell of the representation the crypto backend uses for keys
    private static final class KeyHandle {
        // fill in code
    }

    // we have our own ServiceDescription implementation that overrides newInstance()
    // that calls the (Provider, String) constructor instead of the no-args constructor
    private static class MyService extends Service {

        private static final Class[] paramTypes = {Provider.class, String.class};

        MyService(Provider provider, String type, String algorithm,
                String className) {
            super(provider, type, algorithm, className, null, null);
        }

        public Object newInstance(Object param) throws NoSuchAlgorithmException {
            try {
                // get the Class object for the implementation class
                Class clazz;
                Provider provider = getProvider();
                ClassLoader loader = provider.getClass().getClassLoader();
                if (loader == null) {
                    clazz = Class.forName(getClassName());
                } else {
                    clazz = loader.loadClass(getClassName());
                }
                // fetch the (Provider, String) constructor
                Constructor cons = clazz.getConstructor(paramTypes);
                // invoke constructor and return the SPI object
                Object obj = cons.newInstance(new Object[] {provider, getAlgorithm()});
                return obj;
            } catch (Exception e) {
                throw new NoSuchAlgorithmException("Could not instantiate service", e);
            }
        }
    }

    // custom ServiceDescription class for Cipher objects. See supportsParameter() below
    private static class MyCipherService extends MyService {
        MyCipherService(Provider provider, String type, String algorithm,
                String className) {
            super(provider, type, algorithm, className);
        }
        // we override supportsParameter() to let the framework know which
        // keys we can support. We support instances of MySecretKey, if they
        // are stored in our provider backend, plus SecretKeys with a RAW encoding.
        public boolean supportsParameter(Object obj) {
            if (obj instanceof SecretKey == false) {
                return false;
            }
            SecretKey key = (SecretKey)obj;
            if (key.getAlgorithm().equals(getAlgorithm()) == false) {
                return false;
            }
            if (key instanceof MySecretKey) {
                MySecretKey myKey = (MySecretKey)key;
                return myKey.provider == getProvider();
            } else {
                return "RAW".equals(key.getFormat());
            }
        }
    }

    // our generic MessageDigest implementation. It implements all digest
    // algorithms in a single class. We only implement the bare minimum
    // of MessageDigestSpi methods
    private static final class MyMessageDigest extends MessageDigestSpi {
        private final ExampleProvider provider;
        private final String algorithm;
        private ByteArrayOutputStream buffer;
        MyMessageDigest(Provider provider, String algorithm) {
            super();
            this.provider = (ExampleProvider)provider;
            this.algorithm = algorithm;
            engineReset();
        }
        protected void engineReset() {
            buffer = new ByteArrayOutputStream();
        }
        protected void engineUpdate(byte b) {
            buffer.write(b);
        }
        protected void engineUpdate(byte[] b, int ofs, int len) {
            buffer.write(b, ofs, len);
        }
        protected byte[] engineDigest() {
            byte[] data = buffer.toByteArray();
            byte[] digest = provider.cryptoBackend.digest(algorithm, data);
            engineReset();
            return digest;
        }
    }

    // our generic Cipher implementation, only partially complete. It implements
    // all cipher algorithms in a single class. We implement only as many of the
    // CipherSpi methods as required to show how it could work
    private static abstract class MyCipher extends CipherSpi {
        private final ExampleProvider provider;
        private final String algorithm;
        private int opmode;
        private MySecretKey myKey;
        private ByteArrayOutputStream buffer;
        MyCipher(Provider provider, String algorithm) {
            super();
            this.provider = (ExampleProvider)provider;
            this.algorithm = algorithm;
        }
        protected void engineInit(int opmode, Key key, SecureRandom random)
                throws InvalidKeyException {
            this.opmode = opmode;
            myKey = MySecretKey.getKey(provider, algorithm, key);
            if (myKey == null) {
                throw new InvalidKeyException();
            }
            buffer = new ByteArrayOutputStream();
        }
        protected byte[] engineUpdate(byte[] b, int ofs, int len) {
            buffer.write(b, ofs, len);
            return new byte[0];
        }
        protected int engineUpdate(byte[] b, int ofs, int len, byte[] out, int outOfs) {
            buffer.write(b, ofs, len);
            return 0;
        }
        protected byte[] engineDoFinal(byte[] b, int ofs, int len) {
            buffer.write(b, ofs, len);
            byte[] in = buffer.toByteArray();
            byte[] out;
            if (opmode == Cipher.ENCRYPT_MODE) {
                out = provider.cryptoBackend.encrypt(algorithm, myKey.handle, in);
            } else {
                out = provider.cryptoBackend.decrypt(algorithm, myKey.handle, in);
            }
            buffer = new ByteArrayOutputStream();
            return out;
        }
        // code for remaining CipherSpi methods goes here
    }

    // our SecretKey implementation. All our keys are stored in our crypto
    // backend, we only have an opaque handle available. There is no
    // encoded form of these keys.
    private static final class MySecretKey implements SecretKey {

        final String algorithm;
        final Provider provider;
        final KeyHandle handle;

        MySecretKey(Provider provider, String algorithm, KeyHandle handle) {
            super();
            this.provider = provider;
            this.algorithm = algorithm;
            this.handle = handle;
        }
        public String getAlgorithm() {
            return algorithm;
        }
        public String getFormat() {
            return null; // this key has no encoded form
        }
        public byte[] getEncoded() {
            return null; // this key has no encoded form
        }
        // Convert the given key to a key of the specified provider, if possible
        static MySecretKey getKey(ExampleProvider provider, String algorithm, Key key) {
            if (key instanceof SecretKey == false) {
                return null;
            }
            // algorithm name must match
            if (!key.getAlgorithm().equals(algorithm)) {
                return null;
            }
            // if key is already an instance of MySecretKey and is stored
            // on this provider, return it right away
            if (key instanceof MySecretKey) {
                MySecretKey myKey = (MySecretKey)key;
                if (myKey.provider == provider) {
                    return myKey;
                }
            }
            // otherwise, if the input key has a RAW encoding, convert it
            if (!"RAW".equals(key.getFormat())) {
                return null;
            }
            byte[] encoded = key.getEncoded();
            KeyHandle handle = provider.cryptoBackend.createKey(algorithm, encoded);
            return new MySecretKey(provider, algorithm, handle);
        }
    }
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Permissions in the JDK

Documentation Contents

Permissions in the Java Development Kit (JDK)

A permission represents access to a system resource. In order for a resource access to be allowed for an applet (or an application running with a security manager), the corresponding permission must be explicitly granted to the code attempting the access.

A permission typically has a name (often referred to as a "target name") and, in some cases, a comma-separated list of one or more actions. For example, the following code creates a FilePermission object representing read access to the file named abc in the /tmp directory:

perm = new java.io.FilePermission("/tmp/abc", "read");

In this, the target name is "/tmp/abc" and the action string is "read".

Important Note: The above statement creates a permission object. A permission object represents, but does not grant access to, a system resource. Permission objects are constructed and assigned ("granted") to code based on the policy in effect. When a permission object is assigned to some code, that code is granted the permission to access the system resource specified in the permission object, in the specified manner. A permission object may also be constructed by the current security manager when making access decisions. In this case, the (target) permission object is created based on the requested access, and checked against the permission objects granted to and held by the code making the request.

The policy for a Java application environment is represented by a Policy object. In the "JavaPolicy" Policy implementation, the policy can be specified within one or more policy configuration files. The policy file(s) specify what permissions are allowed for code from specified code sources. A sample policy file entry that grants code from the /home/sysadmin directory read access to the file /tmp/abc is

grant codeBase "file:/home/sysadmin/" {
    permission java.io.FilePermission "/tmp/abc", "read";
};

For information about policy file locations and granting permissions in policy files, see Default Policy Implementation and Policy File Syntax. For information about using the Policy Tool to specify the permissions, see the Policy Tool documentation (for Solaris, Linux, or Mac OS X) (for Windows). Using the Policy Tool saves typing and eliminates the need for you to know the required syntax of policy files.

Technically, whenever a resource access is attempted, all code traversed by the execution thread up to that point must have permission for that resource access, unless some code on the thread has been marked as "privileged." See API for Privileged Blocks for more information about "privileged" code.

This document contains tables that describe the built-in JDK permission types and discuss the risks of granting each permission. It also contains tables showing the methods that require permissions to be in effect in order to be successful, and for each lists the required permission.

The following topics are covered:

  • Permission Descriptions and Risks
    • java.awt.AWTPermission
    • java.io.FilePermission
    • java.io.SerializablePermission
    • java.lang.management.ManagementPermission
    • java.lang.reflect.ReflectPermission
    • java.lang.RuntimePermission
      • NIO-Related Targets
    • java.net.NetPermission
    • java.net.SocketPermission
    • java.net.URLPermission
    • java.nio.file.LinkPermission
    • java.security.AllPermission
    • java.security.SecurityPermission
    • java.security.UnresolvedPermission
    • java.sql.SQLPermission
    • java.util.logging.LoggingPermission
    • java.util.PropertyPermission
    • javax.management.MBeanPermission
    • javax.management.MBeanServerPermission
    • javax.management.MBeanTrustPermission
    • javax.management.remote.SubjectDelegationPermission
    • javax.net.ssl.SSLPermission
    • javax.security.auth.AuthPermission
    • javax.security.auth.kerberos.DelegationPermission
    • javax.security.auth.kerberos.ServicePermission
    • javax.security.auth.PrivateCredentialPermission
    • javax.sound.sampled.AudioPermission
    • javax.xml.bind.JAXBPermission
    • javax.xml.ws.WebServicePermission
  • Methods and the Permissions They Require
  • java.lang.SecurityManager Method Permission Checks

For more information about permissions, including the superclasses java.security.Permission and java.security.BasicPermission, and examples of creating permission objects and granting permissions, see the Security Architecture Specification.

Permission Descriptions and Risks

The following tables describe the built-in JDK permission types and discuss the risks of granting each permission.

AWTPermission

A java.awt.AWTPermission is for AWT permissions.

The following table lists all the possible AWTPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.awt.AWTPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
accessClipboard | Posting and retrieval of information to and from the AWT clipboard | This would allow malfeasant code to share potentially sensitive or confidential information.
accessEventQueue | Access to the AWT event queue | After retrieving the AWT event queue, malicious code may peek at and even remove existing events from the system, as well as post bogus events which may purposefully cause the application or applet to misbehave in an insecure manner.
accessSystemTray | Access to the AWT SystemTray instance | This would allow malicious code to add tray icons to the system tray. First, such an icon may look like the icon of some known application (such as a firewall or anti-virus) and order a user to do something unsafe (with help of balloon messages). Second, the system tray may be glutted with tray icons so that no one could add a tray icon anymore.
createRobot | Create java.awt.Robot objects | The java.awt.Robot object allows code to generate native-level mouse and keyboard events as well as read the screen. It could allow malicious code to control the system, run other programs, read the display, and deny mouse and keyboard access to the user.
fullScreenExclusive | Enter full-screen exclusive mode | Entering full-screen exclusive mode allows direct access to low-level graphics card memory. This could be used to spoof the system, since the program is in direct control of rendering.
listenToAllAWTEvents | Listen to all AWT events, system-wide | After adding an AWT event listener, malicious code may scan all AWT events dispatched in the system, allowing it to read all user input (such as passwords). Each AWT event listener is called from within the context of that event queue's EventDispatchThread, so if the accessEventQueue permission is also enabled, malicious code could modify the contents of AWT event queues system-wide, causing the application or applet to misbehave in an insecure manner.
readDisplayPixels | Readback of pixels from the display screen | Interfaces such as the java.awt.Composite interface which allow arbitrary code to examine pixels on the display enable malicious code to snoop on the activities of the user.
replaceKeyboardFocusManager | Sets the KeyboardFocusManager for a particular thread. | When a SecurityManager is installed, the invoking thread must be granted this permission in order to replace the current KeyboardFocusManager. If permission is not granted, a SecurityException will be thrown.
setAppletStub | Setting the stub which implements Applet container services | Malicious code could set an applet's stub and result in unexpected behavior or denial of service to an applet.
setWindowsAlwaysOnTop | Setting always-on-top property of the window: Window.setAlwaysOnTop(boolean) | The malicious window might make itself look and behave like a real full desktop, so that information entered by the unsuspecting user is captured and subsequently misused.
showWindowWithoutWarningBanner | Display of a window without also displaying a banner warning that the window was created by an applet | Without this warning, an applet may pop up windows without the user knowing that they belong to an applet. Since users may make security-sensitive decisions based on whether or not the window belongs to an applet (entering a username and password into a dialog box, for example), disabling this warning banner may allow applets to trick the user into entering such information.
toolkitModality | Creating TOOLKIT_MODAL dialogs and setting the TOOLKIT_EXCLUDE window property. | When a toolkit-modal dialog is shown from an applet, it blocks all other applets in the browser. When launching applications from Java Web Start, its windows (such as the security dialog) may also be blocked by toolkit-modal dialogs, shown from these applications.
watchMousePointer | Getting the information about the mouse pointer position at any time | Constantly watching the mouse pointer, an applet can make guesses about what the user is doing, i.e. moving the mouse to the lower left corner of the screen most likely means that the user is about to launch an application. If a virtual keypad is used so that keyboard is emulated using the mouse, an applet may guess what is being typed.

FilePermission

A java.io.FilePermission represents access to a file or directory. A FilePermission consists of a pathname and a set of actions valid for that pathname.

Pathname is the pathname of the file or directory granted the specified actions. A pathname that ends in "/*" (where "/" is the file separator character, File.separatorChar) indicates a directory and all the files contained in that directory. A pathname that ends with "/-" indicates (recursively) all files and subdirectories contained in that directory. A pathname consisting of the special token "<<ALL FILES>>" matches any file.

A pathname consisting of a single "*" indicates all the files in the current directory, while a pathname consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords. The possible keywords are "read", "write", "execute", "delete", and "readLink." Their meanings are defined as follows:

Keyword | Meaning
read | Permission to read.
write | Permission to write (which includes permission to create).
execute | Permission to execute. Allows Runtime.exec to be called. Corresponds to SecurityManager.checkExec.
delete | Permission to delete. Allows File.delete to be called. Corresponds to SecurityManager.checkDelete.
readLink | Permission to read links. Allows the target of a symbolic link to be read by invoking the readSymbolicLink method.

The actions string is converted to lowercase before processing.

Be careful when granting FilePermissions. Think about the implications of granting read and especially write access to various files and directories. The "<<ALL FILES>>" permission with write action is especially dangerous. This grants permission to write to the entire file system. One thing this effectively allows is replacement of the system binary, including the JVM runtime environment.

Note: Code can always read a file from the same directory it is in (or a subdirectory of that directory); it does not need explicit permission to do so. Code can also obtain the pathname of the directory it is executed from, and this pathname may contain sensitive information. For example, if code is executed from a home directory (or a subdirectory of the home directory), the pathname may reveal the name of the current user.

SerializablePermission

A java.io.SerializablePermission is for serializable permissions. A SerializablePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the Serializable permission (see below).

The following table lists all the possible SerializablePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.io.SerializablePermission Target Name | What the Permission Allows | Risks of Allowing this Permission
enableSubclassImplementation | Implementing a subclass of ObjectOutputStream or ObjectInputStream to override the default serialization or deserialization, respectively, of objects | Code can use this to serialize or deserialize classes in a purposefully malfeasant manner. For example, during serialization, malicious code can use this to purposefully store confidential private field data in a way easily accessible to attackers. Or, during deserializaiton it could, for example, deserialize a class with all its private fields zeroed out.
enableSubstitution | Substitution of one object for another during serialization or deserialization | This is dangerous because malicious code can replace the actual object with one which has incorrect or malignant data.

ManagementPermission

The permission which the SecurityManager will check when code that is running with a SecurityManager calls methods defined in the management interface for the Java platform.

The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.
java.lang.management.ManagementPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
control | Ability to control the runtime characteristics of the Java virtual machine, for example, enabling and disabling the verbose output for the class loading or memory system, setting the threshold of a memory pool, and enabling and disabling the thread contention monitoring support. Some actions controlled by this permission can disclose information about the running application, like the -verbose:class flag. | This allows an attacker to control the runtime characteristics of the Java virtual machine and cause the system to misbehave. An attacker can also access some information related to the running application.
monitor | Ability to retrieve runtime information about the Java virtual machine such as thread stack trace, a list of all loaded class names, and input arguments to the Java virtual machine. | This allows malicious code to monitor runtime information and uncover vulnerabilities.

Programmers do not normally create ManagementPermission objects directly. Instead they are created by the security policy code based on reading the security policy file.

ReflectPermission

A java.lang.reflect.ReflectPermission is for reflective operations. A ReflectPermission is a named permission and has no actions. The suppressAccessChecks name allows suppressing the standard language access checks -- for public, default (package) access, protected, and private members -- performed by reflected objects at their point of use. The newProxyInPackage.{package name} provide the ability to create a proxy instance in the specified package of which the non-public interface that the proxy class implements.

The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

java.lang.reflect.ReflectPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
suppressAccessChecks | Warning: Extreme caution should be taken before granting this permission to code, for it provides the ability to access fields and invoke methods in a class. This includes not only public, but protected and private fields and methods as well. | This is dangerous in that information (possibly confidential) and methods normally unavailable would be accessible to malicious code.
newProxyInPackage.{package name} | Ability to create a proxy instance in the specified package of which the non-public interface that the proxy class implements. | This gives code access to classes in packages to which it normally does not have access and the dynamic proxy class is in the system protection domain. Malicious code may use these classes to help in its attempt to compromise security in the system.

RuntimePermission

A java.lang.RuntimePermission is for runtime permissions. A RuntimePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the runtime permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "loadLibrary.*" or "*" is valid, "*loadLibrary" or "a*b" is not valid.

The following table lists all the possible RuntimePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.lang.RuntimePermission Target Name | What the Permission Allows | Risks of Allowing this Permission
createClassLoader | Creation of a class loader | This is an extremely dangerous permission to grant. Malicious applications that can instantiate their own class loaders could then load their own rogue classes into the system. These newly loaded classes could be placed into any protection domain by the class loader, thereby automatically granting the classes the permissions for that domain.
getClassLoader | Retrieval of a class loader (e.g., the class loader for the calling class) | This would grant an attacker permission to get the class loader for a particular class. This is dangerous because having access to a class's class loader allows the attacker to load other classes available to that class loader. The attacker would typically otherwise not have access to those classes.
setContextClassLoader | Setting of the context class loader used by a thread | The context class loader is used by system code and extensions when they need to lookup resources that might not exist in the system class loader. Granting setContextClassLoader permission would allow code to change which context class loader is used for a particular thread, including system threads.
enableContextClassLoaderOverride | Subclass implementation of the thread context class loader methods | The context class loader is used by system code and extensions when they need to lookup resources that might not exist in the system class loader. Granting enableContextClassLoaderOverride permission would allow a subclass of Thread to override the methods that are used to get or set the context class loader for a particular thread.
closeClassLoader | Closing of a ClassLoader | Granting this permission allows code to close any URLClassLoader that it has a reference to.
setSecurityManager | Setting of the security manager (possibly replacing an existing one) | The security manager is a class that allows applications to implement a security policy. Granting the setSecurityManager permission would allow code to change which security manager is used by installing a different, possibly less restrictive security manager, thereby bypassing checks that would have been enforced by the original security manager.
createSecurityManager | Creation of a new security manager | This gives code access to protected, sensitive methods that may disclose information about other classes or the execution stack.
getenv.{variable name} | Reading of the value of the specified environment variable | This would allow code to read the value, or determine the existence, of a particular environment variable. This is dangerous if the variable contains confidential data.
exitVM.{exit status} | Halting of the Java Virtual Machine with the specified exit status | This allows an attacker to mount a denial-of-service attack by automatically forcing the virtual machine to halt. Note: The "exitVM.*" permission is automatically granted to all code loaded from the application class path, thus enabling applications to terminate themselves. Also, the "exitVM" permission is equivalent to "exitVM.*".
shutdownHooks | Registration and cancellation of virtual-machine shutdown hooks | This allows an attacker to register a malicious shutdown hook that interferes with the clean shutdown of the virtual machine.
setFactory | Setting of the socket factory used by ServerSocket or Socket, or of the stream handler factory used by URL | This allows code to set the actual implementation for the socket, server socket, stream handler, or RMI socket factory. An attacker may set a faulty implementation which mangles the data stream.
setIO | Setting of System.out, System.in, and System.err | This allows changing the value of the standard system streams. An attacker may change System.in to monitor and steal user input, or may set System.err to a "null" OutputSteam, which would hide any error messages sent to System.err.
modifyThread | Modification of threads, e.g., via calls to Thread interrupt, stop, suspend, resume, setDaemon, setPriority, setName and setUncaughtExceptionHandler methods | This allows an attacker to modify the behavior of any thread in the system.
stopThread | Stopping of threads via calls to the Thread stop method | This allows code to stop any thread in the system provided that it is already granted permission to access that thread. This poses as a threat, because that code may corrupt the system by killing existing threads.
modifyThreadGroup | Modification of thread groups, e.g., via calls to ThreadGroup destroy, getParent, resume, setDaemon, setMaxPriority, stop, and suspend methods | This allows an attacker to create thread groups and set their run priority.
getProtectionDomain | Retrieval of the ProtectionDomain for a class | This allows code to obtain policy information for a particular code source. While obtaining policy information does not compromise the security of the system, it does give attackers additional information, such as local file names for example, to better aim an attack.
getFileSystemAttributes | Retrieval of file system attributes | This allows code to obtain file system information such as disk usage or disk space available to the caller. This is potentially dangerous because it discloses information about the system hardware configuration and some information about the caller's privilege to write files.
readFileDescriptor | Reading of file descriptors | This would allow code to read the particular file associated with the file descriptor read. This is dangerous if the file contains confidential data.
writeFileDescriptor | Writing to file descriptors | This allows code to write to a particular file associated with the descriptor. This is dangerous because it may allow malicous code to plant viruses or at the very least, fill up your entire disk.
loadLibrary.{library name} | Dynamic linking of the specified library | It is dangerous to allow an applet permission to load native code libraries, because the Java security architecture is not designed to and does not prevent malicious behavior at the level of native code.
accessClassInPackage.
{package name} 		Access to the specified package via a class loader's loadClass method when that class loader calls the SecurityManager checkPackageAcesss method This gives code access to classes in packages to which it normally does not have access. Malicious code may use these classes to help in its attempt to compromise security in the system.
defineClassInPackage.
{package name} 		Definition of classes in the specified package, via a class loader's defineClass method when that class loader calls the SecurityManager checkPackageDefinition method. This grants code permission to define a class in a particular package. This is dangerous because malicious code with this permission may define rogue classes in trusted packages like java.security or java.lang, for example.
accessDeclaredMembers | Warning: Extreme caution should be taken before granting this permission to code, for it provides access to the declared members of a class. | This grants code permission to query a class for its public, protected, default (package) access, and private fields and/or methods. Although the code would have access to the private and protected field and method names, it would not have access to the private/protected field data and would not be able to invoke any private methods. Nevertheless, malicious code may use this information to better aim an attack. Additionally, it may invoke any public methods and/or access public fields in the class. This could be dangerous if the code would normally not be able to invoke those methods and/or access the fields because it can't cast the object to the class/interface with those methods and fields.
queuePrintJob | Initiation of a print job request | This could print sensitive information to a printer, or simply waste paper.
getStackTrace | Retrieval of the stack trace information of another thread. | This allows retrieval of the stack trace information of another thread. This might allow malicious code to monitor the execution of threads and discover vulnerabilities in applications.
setDefaultUncaughtExceptionHandler | Setting the default handler to be used when a thread terminates abruptly due to an uncaught exception. | This allows an attacker to register a malicious uncaught exception handler that could interfere with termination of a thread.
preferences | Represents the permission required to get access to the java.util.prefs.Preferences implementations user or system root which in turn allows retrieval or update operations within the Preferences persistent backing store. | This permission allows the user to read from or write to the preferences backing store if the user running the code has sufficient OS privileges to read/write to that backing store. The actual backing store may reside within a traditional filesystem directory or within a registry depending on the platform OS.
usePolicy | Granting this permission disables the Java Plug-In's default security prompting behavior. | For more information, refer to Java Plug-In's guides, Applet Security Basics and usePolicy Permission.

NIO-Related Targets

Two NIO-related RuntimePermission targets were added in the 1.4 release of the JavaSE JDK:
selectorProvider
charsetProvider
These RuntimePermissions are required to be granted to classes which subclass and implement java.nio.channel.spi.SelectorProvider or java.nio.charset.spi.CharsetProvider. The permission is checked during invocation of the abstract base class constructor. These permissions ensure trust in classes which implement these security-sensitive provider mechanisms.

See java.nio.channels.spi.SelectorProvider and java.nio.channels.spi.CharsetProvider for more information.

NetPermission

A java.net.NetPermission is for various network permissions. A NetPermission contains a name but no actions list; you either have the named permission or you don't.

The following table lists all the possible NetPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.net.NetPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
setDefaultAuthenticator | The ability to set the way authentication information is retrieved when a proxy or HTTP server asks for authentication | Malicious code can set an authenticator that monitors and steals user authentication input as it retrieves the input from the user.
requestPasswordAuthentication | The ability to ask the authenticator registered with the system for a password | Malicious code may steal this password.
specifyStreamHandler | The ability to specify a stream handler when constructing a URL | Malicious code may create a URL with resources that it would normally not have access to (like file:/foo/fum/), specifying a stream handler that gets the actual bytes from someplace it does have access to. Thus it might be able to trick the system into creating a ProtectionDomain/CodeSource for a class even though that class really didn't come from that location.
setProxySelector | The ability to set the proxy selector used to make decisions on which proxies to use when making network connections. | Malicious code can set a ProxySelector that directs network traffic to an arbitrary network host.
getProxySelector | The ability to get the proxy selector used to make decisions on which proxies to use when making network connections. | Malicious code can get a ProxySelector to discover proxy hosts and ports on internal networks, which could then become targets for attack.
setCookieHandler | The ability to set the cookie handler that processes highly security sensitive cookie information for an Http session. | Malicious code can set a cookie handler to obtain access to highly security sensitive cookie information. Some web servers use cookies to save user private information such as access control information, or to track user browsing habit.
getCookieHandler | The ability to get the cookie handler that processes highly security sensitive cookie information for an Http session. | Malicious code can get a cookie handler to obtain access to highly security sensitive cookie information. Some web servers use cookies to save user private information such as access control information, or to track user browsing habit.
setResponseCache | The ability to set the response cache that provides access to a local response cache. | Malicious code getting access to the local response cache could access security sensitive information, or create false entries in the response cache.
getResponseCache | The ability to get the response cache that provides access to a local response cache. | Malicious code getting access to the local response cache could access security sensitive information.

SocketPermission

A java.net.SocketPermission represents access to a network via sockets. A SocketPermission consists of a host specification and a set of "actions" specifying ways to connect to that host. The host is specified as

host = (hostname | IPaddress)[:portrange]
portrange = portnumber | -portnumber | portnumber-[portnumber]

The host is expressed as a DNS name, as a numerical IP address, or as "localhost" (for the local machine). The wildcard "*" may be included once in a DNS name host specification. If it is included, it must be in the leftmost position, as in "*.sun.com".

The port or portrange is optional. A port specification of the form "N-", where N is a port number, signifies all ports numbered N and above, while a specification of the form "-N" indicates all ports numbered N and below.

The possible ways to connect to the host are

accept
connect
listen
resolve

The "listen" action is only meaningful when used with "localhost". The "resolve" (resolve host/ip name service lookups) action is implied when any of the other actions are present.

As an example of the creation and meaning of SocketPermissions, note that if you have the following entry in your policy file:

grant signedBy "mrm" {
    permission java.net.SocketPermission "puffin.example.com:7777", "connect, accept";
};

this causes the following permission object to be generated and granted to code signed by "mrm."

p1 = new SocketPermission("puffin.example.com:7777", "connect,accept");

p1 represents a permission allowing connections to port 7777 on puffin.example.com, and also accepting connections on that port.

Similarly, if you have the following entry in your policy:

grant signedBy "paul" {
    permission java.net.SocketPermission "localhost:1024-", "accept, connect, listen";
};

this causes the following permission object to be generated and granted to code signed by "paul."

p2 = new SocketPermission("localhost:1024-", "accept,connect,listen");

p2 represents a permission allowing accepting connections on, connecting to, or listening on any port between 1024 and 65535 on the local host.

Note: Granting code permission to accept or make connections to remote hosts may be dangerous because malevolent code can then more easily transfer and share confidential data among parties who may not otherwise have access to the data.

URLPermission

Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-settable request methods and request headers. The name of the permission is the url string. The actions string is a concatenation of the request methods and headers. The range of method and header names is not restricted by this class.

The url

The url string has the following expected structure.

     scheme : // authority [ / path ]
scheme will typically be http or https, but is not restricted by this class. authority is specified as:
     authority = [ userinfo @ ] hostrange [ : portrange ]
     portrange = portnumber | -portnumber | portnumber-[portnumber] | *
     hostrange = ([*.] dnsname) | IPv4address | IPv6address
dnsname is a standard DNS host or domain name, ie. one or more labels separated by ".". IPv4address is a standard literal IPv4 address and IPv6address is as defined in RFC 2732. Literal IPv6 addresses must however, be enclosed in '[]' characters. The dnsname specification can be preceded by "*." which means the name will match any hostname whose right-most domain labels are the same as this name. For example, "*.oracle.com" matches "foo.bar.oracle.com"

portrange is used to specify a port number, or a bounded or unbounded range of ports that this permission applies to. If portrange is absent or invalid, then a default port number is assumed if the scheme is http (default 80) or https (default 443). No default is assumed for other schemes. A wildcard may be specified which means all ports.

userinfo is optional. A userinfo component if present, is ignored when creating a URLPermission, and has no effect on any other methods defined by this class.

The path component comprises a sequence of path segments, separated by '/' characters. path may also be empty. The path is specified in a similar way to the path in FilePermission. There are three different ways as the following examples show:
URL Examples
Example url | Description
http://www.oracle.com/a/b/c.html | A url which identifies a specific (single) resource
http://www.oracle.com/a/b/* | The '*' character refers to all resources in the same "directory" - in other words all resources with the same number of path components, and which only differ in the final path component, represented by the '*'.
http://www.oracle.com/a/b/- | The '-' character refers to all resources recursively below the preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this example).

The '*' and '-' may only be specified in the final segment of a path and must be the only character in that segment. Any query or fragment components of the url are ignored when constructing URLPermissions.

As a special case, urls of the form, "scheme:*" are accepted to mean any url of the given scheme.

The scheme and authority components of the url string are handled without regard to case. This means equals(Object), hashCode() and implies(Permission) are case insensitive with respect to these components. If the authority contains a literal IP address, then the address is normalized for comparison. The path component is case sensitive.

The actions string

The actions string of a URLPermission is a concatenation of the method list and the request headers list. These are lists of the permitted request methods and permitted request headers of the permission (respectively). The two lists are separated by a colon ':' character and elements of each list are comma separated. Some examples are:

         "POST,GET,DELETE"
         "GET:X-Foo-Request,X-Bar-Request"
         "POST,GET:Header1,Header2"
The first example specifies the methods: POST, GET and DELETE, but no request headers. The second example specifies one request method and two headers. The third example specifies two request methods, and two headers.

The colon separator need not be present if the request headers list is empty. No white-space is permitted in the actions string. The action strings supplied to the URLPermission constructors are case-insensitive and are normalized by converting method names to upper-case and header names to the form defines in RFC2616 (lower case with initial letter of each word capitalized). Either list can contain a wild-card '*' character which signifies all request methods or headers respectively.

Note: Depending on the context of use, some request methods and headers may be permitted at all times, and others may not be permitted at any time. For example, the HTTP protocol handler might disallow certain headers such as Content-Length from being set by application code, regardless of whether the security policy in force, permits it.

Note: Granting code permission to access resources on remote hosts may be dangerous because malevolent code can then more easily transfer and share confidential data among parties who may not otherwise have access to the data.

LinkPermission

The Permission class for link creation operations.

The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

java.nio.file.LinkPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
hard | Ability to add an existing file to a directory. This is sometimes known as creating a link, or hard link. | Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker access to all files.
symbolic | Ability to create symbolic links. | Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker to access to all files.

AllPermission

The java.security.AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions. Thus, it grants code the ability to run with security disabled. Extreme caution should be taken before granting such a permission to code. This permission should be used only during testing, or in extremely rare cases where an application or applet is completely trusted and adding the necessary permissions to the policy is prohibitively cumbersome.

SecurityPermission

A java.security.SecurityPermission is for security permissions. A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects.

The following table lists all the possible SecurityPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.security.SecurityPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
createAccessControlContext | Creation of an AccessControlContext | This allows someone to instantiate an AccessControlContext with a DomainCombiner. Extreme care must be taken when granting this permission. Malicious code could create a DomainCombiner that augments the set of permissions granted to code, and even grant the code AllPermission.
getDomainCombiner | Retrieval of an AccessControlContext's DomainCombiner | This allows someone to query the policy via the getPermissions call, which discloses which permissions would be granted to a given CodeSource. While revealing the policy does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack. It is wise not to divulge more information than necessary.
getPolicy | Retrieval of the system-wide security policy (specifically, of the currently-installed Policy object) | This allows someone to query the policy via the getPermissions call, which discloses which permissions would be granted to a given CodeSource. While revealing the policy does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack. It is wise not to divulge more information than necessary.
setPolicy | Setting of the system-wide security policy (specifically, the Policy object) | Granting this permission is extremely dangerous, as malicious code may grant itself all the necessary permissions it needs to successfully mount an attack on the system.
createPolicy.{policy type} | Getting an instance of a Policy via Policy.getInstance | Granting this permission enables code to obtain a Policy object. Malicious code may query the Policy object to determine what permissions have been granted to code other than itself.
getProperty.{key} | Retrieval of the security property with the specified key | Depending on the particular key for which access has been granted, the code may have access to the list of security providers, as well as the location of the system-wide and user security policies. while revealing this information does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack.
setProperty.{key} | Setting of the security property with the specified key | This could include setting a security provider or defining the location of the system-wide security policy. Malicious code that has permission to set a new security provider may set a rogue provider that steals confidential information such as cryptographic private keys. In addition, malicious code with permission to set the location of the system-wide security policy may point it to a security policy that grants the attacker all the necessary permissions it requires to successfully mount an attack on the system.
insertProvider | Addition of a new provider | This would allow somebody to introduce a possibly malicious provider (e.g., one that discloses the private keys passed to it) as the highest-priority provider. This would be possible because the Security object (which manages the installed providers) currently does not check the integrity or authenticity of a provider before attaching it. The "insertProvider" permission subsumes the "insertProvider.{provider name}" permission (see the section below for more information).
removeProvider.{provider name} | Removal of the specified provider | This may change the behavior or disable execution of other parts of the program. If a provider subsequently requested by the program has been removed, execution may fail. Also, if the removed provider is not explicitly requested by the rest of the program, but it would normally be the provider chosen when a cryptography service is requested (due to its previous order in the list of providers), a different provider will be chosen instead, or no suitable provider will be found, thereby resulting in program failure.
clearProviderProperties.{provider name} | "Clearing" of a Provider so that it no longer contains the properties used to look up services implemented by the provider | This disables the lookup of services implemented by the provider. This may thus change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.
putProviderProperty.{provider name} | Setting of properties for the specified Provider | The provider properties each specify the name and location of a particular service implemented by the provider. By granting this permission, you let code replace the service specification with another one, thereby specifying a different implementation.
removeProviderProperty.{provider name} | Removal of properties from the specified Provider | This disables the lookup of services implemented by the provider. They are no longer accessible due to removal of the properties specifying their names and locations. This may change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.

The following permissions are associated with classes that have been deprecated: Identity, IdentityScope, Signer. Use of them is discouraged. See the applicable classes for more information.

java.security.SecurityPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
insertProvider.{provider name} | Addition of a new provider, with the specified name | This would allow somebody to introduce a possibly malicious provider (e.g., one that discloses the private keys passed to it) as the highest-priority provider. This would be possible because the Security object (which manages the installed providers) currently does not check the integrity or authenticity of a provider before attaching it.
setSystemScope | Setting of the system identity scope | This would allow an attacker to configure the system identity scope with certificates that should not be trusted, thereby granting applet or application code signed with those certificates privileges that would have been denied by the system's original identity scope.
setIdentityPublicKey | Setting of the public key for an Identity | If the identity is marked as "trusted", this allows an attacker to introduce a different public key (e.g., its own) that is not trusted by the system's identity scope, thereby granting applet or application code signed with that public key privileges that would have been denied otherwise.
setIdentityInfo | Setting of a general information string for an Identity | This allows attackers to set the general description for an identity. This may trick applications into using a different identity than intended or may prevent applications from finding a particular identity.
addIdentityCertificate | Addition of a certificate for an Identity | This allows attackers to set a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes trusted to a wider audience than it otherwise would be.
removeIdentityCertificate | Removal of a certificate for an Identity | This allows attackers to remove a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes considered less trustworthy than it otherwise would be.
printIdentity | Viewing the name of a principal and optionally the scope in which it is used, and whether or not it is considered "trusted" in that scope. | The scope that is printed out may be a filename, in which case it may convey local system information. For example, here's a sample printout of an identity named "carol", who is marked not trusted in the user's identity database: carol[/home/luehe/identitydb.obj][not trusted]
getSignerPrivateKey | Retrieval of a Signer's private key | It is very dangerous to allow access to a private key; private keys are supposed to be kept secret. Otherwise, code can use the private key to sign various files and claim the signature came from the Signer.
setSignerKeyPair | Setting of the key pair (public key and private key) for a Signer | This would allow an attacker to replace somebody else's (the "target's") keypair with a possibly weaker keypair (e.g., a keypair of a smaller keysize). This also would allow the attacker to listen in on encrypted communication between the target and its peers. The target's peers might wrap an encryption session key under the target's "new" public key, which would allow the attacker (who possesses the corresponding private key) to unwrap the session key and decipher the communication data encrypted under that session key.

UnresolvedPermission

The java.security.UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized. An unresolved permission is one whose actual Permission class does not yet exist at the time the Policy is initialized (see below).

The policy for a Java runtime (specifying which permissions are available for code from various principals) is represented by a Policy object. Whenever a Policy is initialized or refreshed, Permission objects of appropriate classes are created for all permissions allowed by the Policy.

Many permission class types referenced by the policy configuration are ones that exist locally (i.e., ones that can be found on CLASSPATH). Objects for such permissions can be instantiated during Policy initialization. For example, it is always possible to instantiate a java.io.FilePermission, since the FilePermission class is found on the CLASSPATH.

Other permission classes may not yet exist during Policy initialization. For example, a referenced permission class may be in a JAR file that will later be loaded. For each such class, an UnresolvedPermission is instantiated. Thus, an UnresolvedPermission is essentially a "placeholder" containing information about the permission.

Later, when code calls AccessController.checkPermission on a permission of a type that was previously unresolved, but whose class has since been loaded, previously-unresolved permissions of that type are "resolved". That is, for each such UnresolvedPermission, a new object of the appropriate class type is instantiated, based on the information in the UnresolvedPermission. This new object replaces the UnresolvedPermission, which is removed.

SQLPermission

The permission for which the SecurityManager will check when code that is running in an applet, or an application with an instance of SecurityManager enabled, calls one of the following methods:

  • java.sql.DriverManager.setLogWriter
  • java.sql.DriverManager.setLogStream (deprecated)
  • javax.sql.rowset.spi.SyncFactory.setJNDIContext
  • javax.sql.rowset.spi.SyncFactory.setLogger
  • java.sql.Connection.setNetworktimeout
  • java.sql.Connection.abort

If there is no SQLPermission object, these methods throw a java.lang.SecurityException as a runtime exception.

A SQLPermission object contains a name (also referred to as a "target name") but no actions list; there is either a named permission or there is not. The target name is the name of the permission (see the following table that lists all the possible SQLPermission names). The naming convention follows the hierarchical property naming convention. In addition, an asterisk (*) may appear at the end of the name, following a dot (.), or by itself, to signify a wildcard match. For example: loadLibrary.* or * is valid, but *loadLibrary or a*b is not valid.

The following table lists all the possible SQLPermission target names. The table gives a description of what the permission allows and a discussion of the risks of granting code the permission.

java.sql.SQLPermission Target Name | What Permission Allows | Risks of Allowing This Permission
setLog | Setting of the logging stream | This is a dangerous permission to grant. The contents of the log can contain usernames and passwords, SQL statements, and SQL data.
callAbort | Invocation of the Connection method abort | Permits an application to terminate a physical connection to a database.
setSyncFactory | Invocation of the SyncFactory methods setJNDIContext and setLogger | Permits an application to specify the JNDI context from which the SyncProvider implementations can be retrieved from and the logging object to be used by the SyncProvider implementation.
setNetworkTimeout | Invocation of the Connection method setNetworkTimeout | Permits an application to specify the maximum period a Connection or objects created from the Connection object will wait for the database to reply to any one request.
deregisterDriver | Allows the invocation of the DriverManager method deregisterDriver. | Permits an application to remove a JDBC driver from the list of registered Drivers and release its resources.

LoggingPermission

A SecurityManager will check the java.util.logging.LoggingPermission object when code running with a SecurityManager calls one of the logging control methods (such as Logger.setLevel).

Currently there is only one named LoggingPermission, "control". control grants the ability to control the logging configuration; for example by adding or removing Handlers, by adding or removing Filters, or by changing logging levels.

Normally you do not create LoggingPermission objects directly; instead they are created by the security policy code based on reading the security policy file.

PropertyPermission

A java.util.PropertyPermission is for property permissions.

The name is the name of the property ("java.home", "os.name", etc). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords. The possible keywords are "read" and "write". Their meaning is defined as follows:

Keyword | Meaning
read | Permission to read. Allows System.getProperty to be called.
write | Permission to write. Allows System.setProperty to be called.

The actions string is converted to lowercase before processing.

Care should be taken before granting code permission to access certain system properties. For example, granting permission to access the "java.home" system property gives potentially malevolent code sensitive information about the system environment (the location of the runtime environment's directory). Also, granting permission to access the "user.name" and "user.home" system properties gives potentially malevolent code sensitive information about the user environment (the user's account name and home directory).

MBeanPermission

Permission controlling access to MBeanServer operations. If a security manager has been set using System.setSecurityManager(java.lang.SecurityManager), most operations on the MBeanServer require that the caller's permissions imply an MBeanPermission appropriate for the operation. This is described in detail in the documentation for the MBeanServer interface.

As with other Permission objects, an MBeanPermission can represent either a permission that you have or a permission that you need. When a sensitive operation is being checked for permission, an MBeanPermission is constructed representing the permission you need. The operation is only allowed if the permissions you have imply the permission you need.

An MBeanPermission contains four items of information:

  • The action. For a permission you need, this is one of the actions in the list below. For a permission you have, this is a comma-separated list of those actions, or *, representing all actions.

    The action is returned by getActions().

  • The class name.

    For a permission you need, this is the class name of an MBean you are accessing, as returned by MBeanServer.getMBeanInfo(name).getClassName(). Certain operations do not reference a class name, in which case the class name is null.

    For a permission you have, this is either empty or a class name pattern. A class name pattern is a string following the Java conventions for dot-separated class names. It may end with ".*" meaning that the permission grants access to any class that begins with the string preceding ".*". For instance, "javax.management.*" grants access to javax.management.MBeanServerDelegate and javax.management.timer.Timer, among other classes.

    A class name pattern can also be empty or the single character "*", both of which grant access to any class.

  • The member.

    For a permission you need, this is the name of the attribute or operation you are accessing. For operations that do not reference an attribute or operation, the member is null.

    For a permission you have, this is either the name of an attribute or operation you can access, or it is empty or the single character "*", both of which grant access to any member.

  • The object name.

    For a permission you need, this is the ObjectName of the MBean you are accessing. For operations that do not reference a single MBean, it is null. It is never an object name pattern.

    For a permission you have, this is the ObjectName of the MBean or MBeans you can access. It may be an object name pattern to grant access to all MBeans whose names match the pattern. It may also be empty, which grants access to all MBeans whatever their name.

If you have an MBeanPermission, it allows operations only if all four of the items match.

The class name, member, and object name can be written together as a single string, which is the name of this permission. The name of the permission is the string returned by getName(). The format of the string is:

className#member[objectName]

The object name is written using the usual syntax for ObjectName. It may contain any legal characters, including ]. It is terminated by a ] character that is the last character in the string.

One or more of the className, member, or objectName may be omitted. If the member is omitted, the # may be too (but does not have to be). If the objectName is omitted, the [] may be too (but does not have to be). It is not legal to omit all three items, that is to have a name that is the empty string.

One or more of the className, member, or objectName may be the character "-", which is equivalent to a null value. A null value is implied by any value (including another null value) but does not imply any other value.

The possible actions are these:

  • addNotificationListener
  • getAttribute
  • getClassLoader
  • getClassLoaderFor
  • getClassLoaderRepository
  • getDomains
  • getMBeanInfo
  • getObjectInstance
  • instantiate
  • invoke
  • isInstanceOf
  • queryMBeans
  • queryNames
  • registerMBean
  • removeNotificationListener
  • setAttribute
  • unregisterMBean

In a comma-separated list of actions, spaces are allowed before and after each action.

MBeanServerPermission

A Permission to perform actions related to MBeanServers. The name of the permission specifies the operation requested or granted by the permission. For a granted permission, it can be * to allow all of the MBeanServer operations specified below. Otherwise, for a granted or requested permission, it must be one of the following:
createMBeanServer
Create a new MBeanServer object using the method MBeanServerFactory.createMBeanServer() or MBeanServerFactory.createMBeanServer(java.lang.String).
findMBeanServer
Find an MBeanServer with a given name, or all MBeanServers in this JVM, using the method MBeanServerFactory.findMBeanServer(java.lang.String).
newMBeanServer
Create a new MBeanServer object without keeping a reference to it, using the method MBeanServerFactory.newMBeanServer() or MBeanServerFactory.newMBeanServer(java.lang.String).
releaseMBeanServer
Remove the MBeanServerFactory's reference to an MBeanServer, using the method MBeanServerFactory.releaseMBeanServer(javax.management.MBeanServer).
The name of the permission can also denote a list of one or more comma-separated operations. Spaces are allowed at the beginning and end of the name and before and after commas.

MBeanServerPermission("createMBeanServer") implies MBeanServerPermission("newMBeanServer").

MBeanTrustPermission

This permission represents "trust" in a signer or codebase.

MBeanTrustPermission contains a target name but no actions list. A single target name, "register", is defined for this permission. The target "*" is also allowed, permitting "register" and any future targets that may be defined. Only the null value or the empty string are allowed for the action to allow the policy object to create the permissions specified in the policy file.

If a signer, or codesource is granted this permission, then it is considered a trusted source for MBeans. Only MBeans from trusted sources may be registered in the MBeanServer.

SubjectDelegationPermission

Permission required by an authentication identity to perform operations on behalf of an authorization identity.

A SubjectDelegationPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the authorization principal classname followed by a period and the authorization principal name, that is "PrincipalClassName.PrincipalName".

An asterisk may appear by itself, or if immediately preceded by a "." may appear at the end of the target name, to signify a wildcard match.

For example, "*", "javax.management.remote.JMXPrincipal.*" and "javax.management.remote.JMXPrincipal.delegate" are valid target names. The first one denotes any principal name from any principal class, the second one denotes any principal name of the concrete principal class javax.management.remote.JMXPrincipal and the third one denotes a concrete principal name delegate of the concrete principal class javax.management.remote.JMXPrincipal.

SSLPermission

The javax.net.ssl.SSLPermission class is for various network permissions. An SSLPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the network permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "foo.*" or "*" is valid, "*foo" or "a*b" is not valid.

The following table lists all the possible SSLPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
setHostnameVerifier | The ability to set a callback which can decide whether to allow a mismatch between the host being connected to by an HttpsURLConnection and the common name field in server certificate. | Malicious code can set a verifier that monitors host names visited by HttpsURLConnection requests or that allows server certificates with invalid common names.
getSSLSessionContext | The ability to get the SSLSessionContext of an SSLSession. | Malicious code may monitor sessions which have been established with SSL peers or might invalidate sessions to slow down performance.
setDefaultSSLContext | The ability to set the default SSL context. | When applications use default SSLContext, by setting the default SSL context, malicious code may use unproved trust material, key material and random generator, or use dangerous SSL socket factory and SSL server socket factory.

AuthPermission

The javax.security.auth.AuthPermission class is for authentication permissions. An AuthPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

Currently the AuthPermission object is used to guard access to the Subject, SubjectDomainCombiner, LoginContext and Configuration objects.

The following table lists all the possible AuthPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
doAs | Invocation of the Subject.doAs methods | This enables an application to invoke code (Actions) under the identity of any Subject specified to the doAs method.
doAsPrivileged | Invocation of the Subject.doAsPrivileged methods | This enables an application to invoke code (Actions) under the identity of any Subject specified to the doAsPrivileged method. Additionally, the caller may remove itself from the call stack (and hence from subsequent security decisions) if it passes null as the AccessControlContext.
getSubject | Retrieving the Subject from the provided AccessControlContext | This permits an application to gain access to an authenticated Subject. The application can then access the Subject's authenticated Principals and public credentials.
getSubjectFromDomainCombiner | Retrieving the Subject from a SubjectDomainCombiner | This permits an application to gain access to the authenticated Subject associated with a SubjectDomainCombiner. The application can then access the Subject's authenticated Principals and public credentials.
setReadOnly | Setting a Subject read-only | This permits an application to set a Subject's Principal, public credential and private credential sets to be read-only. This can be potentially used as a type of denial of service attack.
modifyPrincipals | Make modifications to a Subject's Principal set | Access control decisions are based on the Principals associated with a Subject. This permission permits an application to make any modifications to a Subject's Principal set, thereby affecting subsequent security decisions.
modifyPublicCredentials | Make modifications to a Subject's public credential set | This permission permits an application to add or remove public credentials from a Subject. This may affect code that relies on the proper set of private credentials to exist in that Subject.
modifyPrivateCredentials | Make modifications to a Subject's private credential set | This permission permits an application to add or remove private credentials from a Subject. This may affect code that relies on the proper set of private credentials to exist in that Subject.
refreshCredential | Refresh a credential Object that implements the Refreshable interface | This permission permits an application to refresh a credential that is intended to expire.
destroyCredential | Destroy a credential Object that implements the Destroyable interface | This permission permits an application to potentially destroy a credential as a denial of service attack.
createLoginContext.{name} | Instantiate a LoginContext with the specified name | For security purposes, an administrator might not want an application to be able to authenticate to any LoginModule. This permission permits an application to authenticate to the LoginModules configured for the specified name.
getLoginConfiguration | Retrieve the system-wide login Configuration | Allows an application to determine all the LoginModules that are configured for every application in the system.
setLoginConfiguration | Set the system-wide login Configuration | Allows an application to configure the LoginModules for every application in the system.
createLoginConfiguration.{configuration type} | Obtain a Configuration object via Configuration.getInstance | Allows an application to see all the LoginModules that are specified in the configuration.
refreshLoginConfiguration | Refresh the system-wide login Configuration | Allows an application to refresh the login Configuration.

DelegationPermission

The javax.security.auth.kerberos.DelegationPermission class is used to restrict the usage of the Kerberos delegation model; ie, forwardable and proxiable tickets.

The target name of this Permission specifies a pair of kerberos service principals. The first is the subordinate service principal being entrusted to use the Ticket Granting Ticket (TGT). The second service principal designates the target service the subordinate service principal is to interact with on behalf of the initiating KerberosPrincipal. This latter service principal is specified to restrict the use of a proxiable ticket.

For example, to specify the "host" service use of a forwardable TGT, the target permission is specified as follows:

DelegationPermission("\"host/foo.example.com@EXAMPLE.COM\" \"krbtgt/EXAMPLE.COM@EXAMPLE.COM\"");
To give the "backup" service a proxiable NFS service ticket, the target permission might be specified:
DelegationPermission("\"backup/bar.example.com@EXAMPLE.COM\" \"nfs/home.EXAMPLE.COM@EXAMPLE.COM\"");

ServicePermission

The javax.security.auth.kerberos.ServicePermission class is used to protect Kerberos services and the credentials necessary to access those services. There is a one to one mapping of a service principal and the credentials necessary to access the service. Therefore granting access to a service principal implicitly grants access to the credential necessary to establish a security context with the service principal. This applies regardless of whether the credentials are in a cache or acquired via an exchange with the KDC. The credential can be either a ticket granting ticket, a service ticket or a secret key from a key table.

A ServicePermission contains a service principal name and a list of actions which specify the context the credential can be used within.

The service principal name is the canonical name of the KereberosPrincipal supplying the service, that is the KerberosPrincipal represents a Kerberos service principal. This name is treated in a case sensitive manner.

Granting this permission implies that the caller can use a cached credential (Ticket Granting Ticket, service ticket or secret key) within the context designated by the action. In the case of the TGT, granting this permission also implies that the TGT can be obtained by an Authentication Service exchange.

The possible actions are:

Action | Meaning
initiate | Allows the caller to use the credential to initiate a security context with a service principal.
accept | Allows the caller to use the credential to accept security context as a particular principal.
For example, to specify the permission to access to the TGT to initiate a security context the permission is constructed as follows:
     ServicePermission("krbtgt/EXAMPLE.COM@EXAMPLE.COM", "initiate");
To obtain a service ticket to initiate a context with the "host" service the permission is constructed as follows:
ServicePermission("host/foo.example.com@EXAMPLE.COM", "initiate");
For a Kerberized server the action is "accept". For example, the permission necessary to access and use the secret key of the Kerberized "host" service (telnet and the likes) would be constructed as follows:
ServicePermission("host/foo.example.com@EXAMPLE.COM", "accept");

PrivateCredentialPermission

The javax.security.auth.PrivateCredentialPermission class is used to protect access to private Credentials belonging to a particular Subject. The Subject is represented by a Set of Principals.

The target name of this Permission specifies a Credential class name, and a Set of Principals. The only valid value for this Permission's actions is, "read". The target name must abide by the following syntax:

CredentialClass {PrincipalClass "PrincipalName"}*
For example, the following permission grants access to the com.sun.PrivateCredential owned by Subjects which have a com.sun.Principal with the name, "duke".

Note: Although this example, as well as all the examples below, do not contain Codebase, SignedBy, or Principal information in the grant statement (for simplicity reasons), actual policy configurations should specify that information when appropriate.

grant {
    permission javax.security.auth.PrivateCredentialPermission
             "com.sun.PrivateCredential com.sun.Principal \"duke\"",
             "read";
};
If CredentialClass is "*", then access is granted to all private Credentials belonging to the specified Subject. If "PrincipalName" is "*", then access is granted to the specified Credential owned by any Subject that has the specified Principal (the actual PrincipalName doesn't matter). For example, the following grants access to the a.b.Credential owned by any Subject that has an a.b.Principal.
grant {
    permission javax.security.auth.PrivateCredentialPermission
             "a.b.Credential a.b.Principal "*"",
             "read";
};
If both the PrincipalClass and "PrincipalName" are "*", then access is granted to the specified Credential owned by any Subject. In addition, the PrincipalClass/PrincipalName pairing may be repeated:
grant {
    permission javax.security.auth.PrivateCredentialPermission
             "a.b.Credential a.b.Principal "duke" c.d.Principal "dukette"",
             "read";
};
The above code grants access to the private Credential, "a.b.Credential", belonging to a Subject with at least two associated Principals: "a.b.Principal" with the name, "duke", and "c.d.Principal", with the name, "dukette".

AudioPermission

The javax.sound.sampled.AudioPermission class represents access rights to the audio system resources. An AudioPermission contains a target name but no actions list; you either have the named permission or you don't.

The target name is the name of the audio permission (see the table below). The names follow the hierarchical property-naming convention. Also, an asterisk can be used to represent all the audio permissions.

The following table lists the possible AudioPermission target names. For each name, the table provides a description of exactly what that permission allows, as well as a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
play | Audio playback through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio playback (rendering). | In some cases use of this permission may affect other applications because the audio from one line may be mixed with other audio being played on the system, or because manipulation of a mixer affects the audio for all lines using that mixer.
record | Audio recording through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio recording (capture). | In some cases use of this permission may affect other applications because manipulation of a mixer affects the audio for all lines using that mixer. This permission can enable an applet or application to eavesdrop on a user.

JAXBPermission

This class is for JAXB permissions. A JAXBPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the JAXB permission (see below).

The following table lists all the possible JAXBPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

javax.xml.bind.JAXBPermission Target Name | What the Permission Allows | Risks of Allowing this Permission
setDatatypeConverter | Allows the code to set VM-wide DatatypeConverterInterface via the setDatatypeConverter method that all the methods on DatatypeConverter uses. | Malicious code can set DatatypeConverterInterface, which has VM-wide singleton semantics, before a genuine JAXB implementation sets one. This allows malicious code to gain access to objects that it may otherwise not have access to, such as Frame.getFrames() that belongs to another application running in the same JVM.

WebServicePermission

This class defines web service permissions.

Web service Permissions are identified by name (also referred to as a "target name") alone. There are no actions associated with them.

The following permission target name is defined:

publishEndpoint

The publishEndpoint permission allows publishing a web service endpoint using the publish methods defined by the javax.xml.ws.Endpoint class.

Granting publishEndpoint allows the application to be exposed as a network service. Depending on the security of the runtime and the security of the application, this may introduce a security hole that is remotely exploitable.

Methods and the Permissions They Require

The following table contains a list of all the methods that require permissions, and for each tells which SecurityManager method it calls and which permission is checked for by the default implementation of that SecurityManager method.

Note: This list is not complete and does not include several new methods that require permissions that have been introduced in recent versions of the JDK. See the the API Specification for additional information on methods that throw SecurityException and the permissions that are required.

Thus, with the default SecurityManager method implementations, a call to a method in the left-hand column can only be successful if the permission specified in the corresponding entry in the right-hand column is allowed by the policy currently in effect. For example, the following row:

Method SecurityManager Method Called Permission
java.awt.Toolkit
    getSystemEventQueue();
checkPermission java.awt.AWTPermission "accessEventQueue";

specifies that a call to the getSystemEventQueue method in the java.awt.Toolkit class results in a call to the checkPermission SecurityManager method, which can only be successful if the following permission is granted to code on the call stack:

  java.awt.AWTPermission "accessEventQueue";

The convention of:

Method SecurityManager Method Called Permission
 some.package.class
   public static void someMethod(String foo);
checkXXX SomePermission "{foo}";

means the runtime value of foo replaces the string {foo} in the permission name.

As an example, here is one table entry:

Method SecurityManager Method Called Permission
java.io.FileInputStream
    FileInputStream(String name)
checkRead(String) java.io.FilePermission "{name}", "read";

If the FileInputStream method (in this case, a constructor) is called with "/test/MyTestFile" as the name argument, as in

FileInputStream("/test/MyTestFile");

then in order for the call to succeed, the following permission must be set in the current policy, allowing read access to the file "/test/MyTestFile":

java.io.FilePermission "/test/MyTestFile", "read";

More specifically, the permission must either be explicitly set, as above, or implied by another permission, such as the following:

java.io.FilePermission "/test/*", "read";

which allows read access to any files in the "/test" directory.

In some cases, a term in braces is not exactly the same as the name of a specific method argument but is meant to represent the relevant value. Here is an example:

Method SecurityManager Method Called Permission
java.net.DatagramSocket
  public synchronized void
      receive(DatagramPacket p);
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept";

Here, the appropriate host and port values are calculated by the receive method and passed to checkAccept.

In most cases, just the name of the SecurityManager method called is listed. Where the method is one of multiple methods of the same name, the argument types are also listed, for example for checkRead(String) and checkRead(FileDescriptor). In other cases where arguments may be relevant, they are also listed.

The following table is ordered by package name. That is, the methods in classes in the java.awt package are listed first, followed by methods in classes in the java.io package, and so on.

Methods and the Permissions They Require
Method SecurityManager Method Called Permission
java.awt.Graphics2d
  public abstract void
    setComposite(Composite comp)
checkPermission java.awt.AWTPermission "readDisplayPixels" if this Graphics2D context is drawing to a Component on the display screen and the Composite is a custom object rather than an instance of the AlphaComposite class. Note: The setComposite method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the java.lang.SecurityManager checkPermission method with a java.awt.AWTPermission("readDisplayPixels") permission under the conditions noted.
java.awt.Robot
  public Robot()
  public Robot(GraphicsDevice screen)
checkPermission java.awt.AWTPermission "createRobot"
java.awt.Toolkit
  public void addAWTEventListener(
          AWTEventListener listener,
          long eventMask)
  public void removeAWTEventListener(
     AWTEventListener listener)
checkPermission java.awt.AWTPermission "listenToAllAWTEvents"
java.awt.Toolkit
  public abstract PrintJob getPrintJob(
           Frame frame, String jobtitle,
           Properties props)
checkPrintJobAccess

java.lang.RuntimePermission "queuePrintJob"

Note: The getPrintJob method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the java.lang.SecurityManager checkPrintJobAccess method, which is successful only if the java.lang.RuntimePermission "queuePrintJob" permission is currently allowed.

java.awt.Toolkit
  public abstract Clipboard
                    getSystemClipboard()
checkPermission

java.awt.AWTPermission "accessClipboard"

Note: The getSystemClipboard method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the checkPermission method, which is successful only if the java.awt.AWTPermission "accessClipboard" permission is currently allowed.

java.awt.Toolkit
  public final EventQueue
               getSystemEventQueue()
checkPermission java.awt.AWTPermission "accessEventQueue"
java.awt.Window
  Window()
checkPermission If java.awt.AWTPermission "showWindowWithoutWarningBanner" is set, the window will be displayed without a banner warning that the window was created by an applet. It it's not set, such a banner will be displayed.
java.beans.Beans
  public static void setDesignTime(
                 boolean isDesignTime)
  public static void setGuiAvailable(
                 boolean isGuiAvailable)

java.beans.Introspector
  public static synchronized void
    setBeanInfoSearchPath(String path[])

java.beans.PropertyEditorManager
  public static void registerEditor(
                 Class targetType,
                 Class editorClass)
  public static synchronized void
    setEditorSearchPath(String path[])
checkPropertiesAccess java.util.PropertyPermission "*", "read,write"
java.io.File
  public boolean delete()
  public void deleteOnExit()
checkDelete(String) java.io.FilePermission "{name}", "delete"
java.io.FileInputStream
  FileInputStream(FileDescriptor fdObj)
checkRead(FileDescriptor) java.lang.RuntimePermission "readFileDescriptor"
java.io.FileInputStream
  FileInputStream(String name)
  FileInputStream(File file)

java.io.File
  public boolean exists()
  public boolean canRead()
  public boolean isFile()
  public boolean isDirectory()
  public boolean isHidden()
  public long lastModified()
  public long length()
  public String[] list()
  public String[] list(
           FilenameFilter filter)
  public File[] listFiles()
  public File[] listFiles(
           FilenameFilter filter)
  public File[] listFiles(
           FileFilter filter)

java.io.RandomAccessFile
  RandomAccessFile(String name, String mode)
  RandomAccessFile(File file, String mode)
      (where mode is "r" in both of these)
checkRead(String) java.io.FilePermission "{name}", "read"
java.io.FileOutputStream
  FileOutputStream(FileDescriptor fdObj)
checkWrite(FileDescriptor) java.lang.RuntimePermission "writeFileDescriptor"
java.io.FileOutputStream
  FileOutputStream(File file)
  FileOutputStream(String name)
  FileOutputStream(String name,
                   boolean append)

java.io.File
  public boolean canWrite()
  public boolean createNewFile()
  public static File createTempFile(
          String prefix, String suffix)
  public static File createTempFile(
          String prefix,  String suffix,
          File directory)
  public boolean mkdir()
  public boolean mkdirs()
  public boolean renameTo(File dest)
  public boolean setLastModified(long time)
  public boolean setReadOnly()
checkWrite(String) java.io.FilePermission "{name}", "write"
java.io.ObjectInputStream
  protected final boolean
    enableResolveObject(boolean enable);

java.io.ObjectOutputStream
  protected final boolean
    enableReplaceObject(boolean enable)
checkPermission java.io.SerializablePermission "enableSubstitution"
java.io.ObjectInputStream
  protected ObjectInputStream()

java.io.ObjectOutputStream
  protected ObjectOutputStream()
checkPermission java.io.SerializablePermission "enableSubclassImplementation"
java.io.RandomAccessFile
  RandomAccessFile(String name, String mode)
      (where mode is "rw")
checkRead(String) and checkWrite(String) java.io.FilePermission "{name}", "read,write"
java.lang.Class
  public static Class forName(
     String name, boolean initialize,
     ClassLoader loader)
checkPermission If loader is null, and the caller's class loader is not null, then java.lang.RuntimePermission("getClassLoader")
java.lang.Class
  public ClassLoader getClassLoader()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the class loader for the class whose class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Class
  public Class[] getDeclaredClasses()
  public Field[] getDeclaredFields()
  public Method[] getDeclaredMethods()
  public Constructor[]
    getDeclaredConstructors()
  public Field getDeclaredField(
                       String name)
  public Method getDeclaredMethod(...)
  public Constructor
    getDeclaredConstructor(...)
checkMemberAccess(this, Member.DECLARED) and, if this class is in a package, checkPackageAccess({pkgName}) Default checkMemberAccess does not require any permissions if "this" class's classloader is the same as that of the caller. Otherwise, it requires java.lang.RuntimePermission "accessDeclaredMembers". If this class is in a package, java.lang.RuntimePermission "accessClassInPackage.{pkgName}" is also required.
java.lang.Class
  public Class[] getClasses()
  public Field[] getFields()
  public Method[] getMethods()
  public Constructor[] getConstructors()
  public Field getField(String name)
  public Method getMethod(...)
  public Constructor getConstructor(...)
checkMemberAccess(this, Member.PUBLIC) and, if class is in a package, checkPackageAccess({pkgName}) Default checkMemberAccess does not require any permissions when the access type is Member.PUBLIC. If this class is in a package, java.lang.RuntimePermission "accessClassInPackage.{pkgName}" is required.
java.lang.Class
   public ProtectionDomain
            getProtectionDomain()
checkPermission java.lang.RuntimePermission "getProtectionDomain"
java.lang.ClassLoader
  ClassLoader()
  ClassLoader(ClassLoader parent)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.lang.ClassLoader
  public static ClassLoader
           getSystemClassLoader()
  public ClassLoader getParent()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the class loader for the class whose class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Runtime
  public Process exec(String command)
  public Process exec(String command,
                      String envp[])
  public Process exec(String cmdarray[])
  public Process exec(String cmdarray[],
                      String envp[])
checkExec java.io.FilePermission "{command}", "execute"
java.lang.Runtime
  public void exit(int status)
  public static void
      runFinalizersOnExit(boolean value)
java.lang.System
  public static void exit(int status)
  public static void
      runFinalizersOnExit(boolean value)
checkExit(status) where status is 0 for runFinalizersOnExit java.lang.RuntimePermission "exitVM.{status}"
java.lang.Runtime
  public void addShutdownHook(Thread hook)
  public boolean removeShutdownHook(Thread hook)
checkPermission java.lang.RuntimePermission "shutdownHooks"
java.lang.Runtime
  public void load(String lib)
  public void loadLibrary(String lib)
java.lang.System
  public static void load(String filename)
  public static void loadLibrary(
                          String libname)
checkLink({libName}) where {libName} is the lib, filename or libname argument java.lang.RuntimePermission "loadLibrary.{libName}"
java.lang.SecurityManager methods
checkPermission See the next table.
java.lang.System
  public static Properties
      getProperties()
  public static void
      setProperties(Properties props)
checkPropertiesAccess java.util.PropertyPermission "*", "read,write"
java.lang.System
  public static String
      getProperty(String key)
  public static String
      getProperty(String key, String def)
checkPropertyAccess java.util.PropertyPermission "{key}", "read"
java.lang.System
  public static void setIn(InputStream in)
  public static void setOut(PrintStream out)
  public static void setErr(PrintStream err)
checkPermission java.lang.RuntimePermission "setIO"
java.lang.System
  public static String
    setProperty(String key, String value)
checkPermission java.util.PropertyPermission "{key}", "write"
java.lang.System
  public static synchronized void
    setSecurityManager(SecurityManager s)
checkPermission java.lang.RuntimePermission "setSecurityManager"
java.lang.Thread
  public ClassLoader getContextClassLoader()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the context class loader for the thread whose context class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Thread
  public void setContextClassLoader
                      (ClassLoader cl)
checkPermission java.lang.RuntimePermission "setContextClassLoader"
java.lang.Thread
  public final void checkAccess()
  public void interrupt()
  public final void suspend()
  public final void resume()
  public final void setPriority
                     (int newPriority)
  public final void setName(String name)
  public final void setDaemon(boolean on)
checkAccess(this) java.lang.RuntimePermission "modifyThread"
java.lang.Thread
  public static int
      enumerate(Thread tarray[])
checkAccess({threadGroup}) java.lang.RuntimePermission "modifyThreadGroup"
java.lang.Thread
  public final void stop()
checkAccess(this). Also checkPermission if the current thread is trying to stop a thread other than itself. java.lang.RuntimePermission "modifyThread".
Also java.lang.RuntimePermission "stopThread" if the current thread is trying to stop a thread other than itself.
java.lang.Thread
  public final synchronized void
                    stop(Throwable obj)
checkAccess(this). Also checkPermission if the current thread is trying to stop a thread other than itself or obj is not an instance of ThreadDeath. java.lang.RuntimePermission "modifyThread".
Also java.lang.RuntimePermission "stopThread" if the current thread is trying to stop a thread other than itself or obj is not an instance of ThreadDeath.
java.lang.Thread
  Thread()
  Thread(Runnable target)
  Thread(String name)
  Thread(Runnable target, String name)

java.lang.ThreadGroup
  ThreadGroup(String name)
  ThreadGroup(ThreadGroup parent,
              String name)
checkAccess({parentThreadGroup}) java.lang.RuntimePermission "modifyThreadGroup"
java.lang.Thread
  Thread(ThreadGroup group, ...)

java.lang.ThreadGroup
  public final void checkAccess()
  public int enumerate(Thread list[])
  public int enumerate(Thread list[],
      boolean recurse)
  public int enumerate(ThreadGroup list[])
  public int enumerate(ThreadGroup list[],
      boolean recurse)
  public final ThreadGroup getParent()
  public final void
      setDaemon(boolean daemon)
  public final void setMaxPriority(int pri)
  public final void suspend()
  public final void resume()
  public final void destroy()
checkAccess(this) for ThreadGroup methods, or checkAccess(group) for Thread methods java.lang.RuntimePermission "modifyThreadGroup"
java.lang.ThreadGroup
  public final void interrupt()
checkAccess(this) Requires java.lang.RuntimePermission "modifyThreadGroup".
Also requires java.lang.RuntimePermission "modifyThread", since the java.lang.Thread interrupt() method is called for each thread in the thread group and in all of its subgroups. See the Thread interrupt() method.
java.lang.ThreadGroup
  public final void stop()
checkAccess(this) Requires java.lang.RuntimePermission "modifyThreadGroup".
Also requires java.lang.RuntimePermission "modifyThread" and possibly java.lang.RuntimePermission "stopThread", since the java.lang.Thread stop() method is called for each thread in the thread group and in all of its subgroups. See the Thread stop() method.
java.lang.reflect.AccessibleObject
  public static void setAccessible(...)
  public void setAccessible(...)
checkPermission java.lang.reflect.ReflectPermission "suppressAccessChecks"
java.net.Authenticator
  public static PasswordAuthentication
       requestPasswordAuthentication(
             InetAddress addr,
             int port,
             String protocol,
             String prompt,
             String scheme)
checkPermission java.net.NetPermission "requestPasswordAuthentication"
java.net.Authenticator
  public static void
      setDefault(Authenticator a)
checkPermission java.net.NetPermission "setDefaultAuthenticator"
java.net.MulticastSocket
  public void
      joinGroup(InetAddress mcastaddr)
  public void
      leaveGroup(InetAddress mcastaddr)
checkMulticast(InetAddress) java.net.SocketPermission( mcastaddr.getHostAddress(), "accept,connect")
java.net.DatagramSocket
  public void send(DatagramPacket p)
checkMulticast(p.getAddress()) or checkConnect(
p.getAddress().getHostAddress(), p.getPort()) 		if (p.getAddress().isMulticastAddress()) {
java.net.SocketPermission(
(p.getAddress()).getHostAddress(), "accept,connect")
}
else {
port = p.getPort();
host = p.getAddress().getHostAddress();
if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect"
}
java.net.MulticastSocket
  public synchronized void
      send(DatagramPacket p, byte ttl)
checkMulticast(p.getAddress(), ttl) or checkConnect(
p.getAddress().getHostAddress(), p.getPort()) 		if (p.getAddress().isMulticastAddress()) {
java.net.SocketPermission(
(p.getAddress()).getHostAddress(), "accept,connect")
}
else {
port = p.getPort();
host = p.getAddress().getHostAddress();
if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect"
}
java.net.InetAddress
  public String getHostName()
  public static InetAddress[]
                  getAllByName(String host)
  public static InetAddress getLocalHost()

java.net.DatagramSocket
  public InetAddress getLocalAddress()
checkConnect({host}, -1) java.net.SocketPermission "{host}", "resolve"
java.net.ServerSocket
  ServerSocket(...)

java.net.DatagramSocket
  DatagramSocket(...)

java.net.MulticastSocket
  MulticastSocket(...)
checkListen({port}) java.net.SocketPermission "localhost:{port}","listen";
java.net.ServerSocket
  public Socket accept()
  protected final void implAccept(Socket s)
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept"
java.net.ServerSocket
  public static synchronized void
      setSocketFactory(...)

java.net.Socket
  public static synchronized void
      setSocketImplFactory(...)

java.net.URL
  public static synchronized void
      setURLStreamHandlerFactory(...)

 java.net.URLConnection
   public static synchronized void
      setContentHandlerFactory(...)
   public static void
      setFileNameMap(FileNameMap map)

java.net.HttpURLConnection
   public static void
       setFollowRedirects(boolean set)

java.rmi.activation.ActivationGroup
  public static synchronized
        ActivationGroup createGroup(...)
  public static synchronized void
      setSystem(ActivationSystem system)

java.rmi.server.RMISocketFactory
   public synchronized static void
      setSocketFactory(...)
checkSetFactory java.lang.RuntimePermission "setFactory"
java.net.Socket
  Socket(...)
checkConnect({host}, {port}) java.net.SocketPermission "{host}:{port}", "connect"
java.net.DatagramSocket
  public synchronized void
      receive(DatagramPacket p)
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept"
java.net.URL
  URL(...)
checkPermission java.net.NetPermission "specifyStreamHandler"
java.net.URLClassLoader
  URLClassLoader(...)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.security.AccessControlContext
  public AccessControlContext(AccessControlContext acc,
                                DomainCombiner combiner)
  public DomainCombiner getDomainCombiner()
checkPermission java.security.SecurityPermission "createAccessControlContext"
java.security.Identity
  public void addCertificate(...)
checkSecurityAccess(
"addIdentityCertificate") 		java.security.SecurityPermission "addIdentityCertificate"
java.security.Identity
  public void removeCertificate(...)
checkSecurityAccess(
"removeIdentityCertificate") 		java.security.SecurityPermission "removeIdentityCertificate"
java.security.Identity
  public void setInfo(String info)
checkSecurityAccess(
"setIdentityInfo") 		java.security.SecurityPermission "setIdentityInfo"
java.security.Identity
  public void setPublicKey(PublicKey key)
checkSecurityAccess(
"setIdentityPublicKey") 		java.security.SecurityPermission "setIdentityPublicKey"
java.security.Identity
  public String toString(...)
checkSecurityAccess(
"printIdentity") 		java.security.SecurityPermission "printIdentity"
java.security.IdentityScope
  protected static void setSystemScope()
checkSecurityAccess(
"setSystemScope") 		java.security.SecurityPermission "setSystemScope"
java.security.Permission
  public void checkGuard(Object object)
checkPermission(this) this Permission object is the permission checked
java.security.Policy
  public static Policy getPolicy()
checkPermission java.security.SecurityPermission "getPolicy"
java.security.Policy
  public static void
      setPolicy(Policy policy)
checkPermission java.security.SecurityPermission "setPolicy"
java.security.Policy
  public static Policy
      getInstance(String type, SpiParameter params)
      getInstance(String type, SpiParameter params, String provider)
      getInstance(String type, SpiParameter params, Provider provider)
checkPermission java.security.SecurityPermission "createPolicy.{type}"
java.security.Provider
  public synchronized void clear()
checkSecurityAccess(
"clearProviderProperties."+{name}) 		java.security.SecurityPermission "clearProviderProperties.{name}" where name is the provider name.
java.security.Provider
  public synchronized Object
      put(Object key, Object value)
checkSecurityAccess(
"putProviderProperty."+{name}) 		java.security.SecurityPermission "putProviderProperty.{name}" where name is the provider name.
java.security.Provider
  public synchronized Object
      remove(Object key)
checkSecurityAccess(
"removeProviderProperty."+{name}) 		java.security.SecurityPermission "removeProviderProperty.{name}" where name is the provider name.
java.security.SecureClassLoader
  SecureClassLoader(...)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.security.Security
  public static void getProperty(String key)
checkPermission java.security.SecurityPermission "getProperty.{key}"
java.security.Security
  public static int
      addProvider(Provider provider)
  public static int
      insertProviderAt(Provider provider,
                       int position);
checkSecurityAccess(
"insertProvider."+provider.getName()) 		java.security.SecurityPermission "insertProvider.{name}"
java.security.Security
  public static void
      removeProvider(String name)
checkSecurityAccess(
"removeProvider."+name) 		java.security.SecurityPermission "removeProvider.{name}"
java.security.Security
  public static void
    setProperty(String key, String datum)
checkSecurityAccess(
"setProperty."+key) 		java.security.SecurityPermission "setProperty.{key}"
java.security.Signer
  public PrivateKey getPrivateKey()
checkSecurityAccess(
"getSignerPrivateKey") 		java.security.SecurityPermission "getSignerPrivateKey"
java.security.Signer
  public final void
      setKeyPair(KeyPair pair)
checkSecurityAccess(
"setSignerKeypair") 		java.security.SecurityPermission "setSignerKeypair"
java.sql.DriverManager
  public static synchronized void
      setLogWriter(PrintWriter out)
checkPermission java.sql.SQLPermission "setLog"
java.sql.DriverManager
  public static synchronized void
      setLogStream(PrintWriter out)
checkPermission java.sql.SQLPermission "setLog"
java.util.Locale
  public static synchronized void
            setDefault(Locale newLocale)
checkPermission java.util.PropertyPermission "user.language","write"
java.util.zip.ZipFile
  ZipFile(String name)
checkRead java.io.FilePermission "{name}","read"
javax.security.auth.Subject
    public static Subject getSubject(final AccessControlContext acc)
checkPermission javax.security.auth.AuthPermission "getSubject"
javax.security.auth.Subject
    public void setReadOnly()
checkPermission javax.security.auth.AuthPermission "setReadOnly"
javax.security.auth.Subject
    public static Object doAs(final Subject subject,
                                final PrivilegedAction action)
checkPermission javax.security.auth.AuthPermission "doAs"
javax.security.auth.Subject
    public static Object doAs(final Subject subject,
                                final PrivilegedExceptionAction action)
        throws java.security.PrivilegedActionException
checkPermission javax.security.auth.AuthPermission "doAs"
javax.security.auth.Subject
    public static Object doAsPrivileged(final Subject subject,
                                final PrivilegedAction action,
                                final AccessControlContext acc)
checkPermission javax.security.auth.AuthPermission "doAsPrivileged"
javax.security.auth.Subject
    public static Object doAsPrivileged(final Subject subject,
                                final PrivilegedExceptionAction action,
                                final AccessControlContext acc)
        throws java.security.PrivilegedActionException
checkPermission javax.security.auth.AuthPermission "doAsPrivileged"
javax.security.auth.SubjectDomainCombiner
    public Subject getSubject()
checkPermission javax.security.auth.AuthPermission "getSubjectFromDomainCombiner"
javax.security.auth.SubjectDomainCombiner
    public Subject getSubject()
checkPermission javax.security.auth.AuthPermission "getSubjectFromDomainCombiner"
javax.security.auth.login.LoginContext
    public LoginContext(String name)
        throws LoginException
checkPermission javax.security.auth.AuthPermission "createLoginContext.{name}"
javax.security.auth.login.LoginContext
    public LoginContext(String name,
                        Subject subject)
         throws LoginException
checkPermission javax.security.auth.AuthPermission "createLoginContext.{name}"
javax.security.auth.login.LoginContext
    public LoginContext(String name,
                        CallbackHandler callbackHandler)
         throws LoginException
checkPermission javax.security.auth.AuthPermission "createLoginContext.{name}"
javax.security.auth.login.LoginContext
    public LoginContext(String name,
                        Subject subject,
                        CallbackHandler callbackHandler)
         throws LoginException
checkPermission javax.security.auth.AuthPermission "createLoginContext.{name}"
javax.security.auth.login.Configuration
    public static Configuration getConfiguration()
checkPermission javax.security.auth.AuthPermission "getLoginConfiguration"
javax.security.auth.login.Configuration
    public static void setConfiguration(Configuration configuration)
checkPermission javax.security.auth.AuthPermission "setLoginConfiguration"
javax.security.auth.login.Configuration
    public static void refresh()
checkPermission javax.security.auth.AuthPermission "refreshLoginConfiguration"
javax.security.auth.login.Configuration
  public static Configuration
      getInstance(String type, SpiParameter params)
      getInstance(String type, SpiParameter params, String provider)
      getInstance(String type, SpiParameter params, Provider provider)
checkPermission javax.security.auth.AuthPermission "createLoginConfiguration.{type}"

java.lang.SecurityManager Method Permission Checks

This table shows which permissions are checked for by the default implementations of the java.lang.SecurityManager methods.

Each of the specified check methods calls the SecurityManager checkPermission method with the specified permission, except for the checkConnect and checkRead methods that take a context argument. Those methods expect the context to be an AccessControlContext and they call the context's checkPermission method with the specified permission.

Method | Permission
public void checkAccept(String host, int port); | java.net.SocketPermission "{host}:{port}", "accept";
public void checkAccess(Thread t); | java.lang.RuntimePermission "modifyThread";
public void checkAccess(ThreadGroup g); | java.lang.RuntimePermission "modifyThreadGroup";
public void checkAwtEventQueueAccess();
Note: This method is deprecated; use instead
public void checkPermission(Permission perm); 		java.awt.AWTPermission "accessEventQueue";
public void checkConnect(String host, int port); if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect";
public void checkConnect(String host, int port, Object context); if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect";
public void checkCreateClassLoader(); | java.lang.RuntimePermission "createClassLoader";
public void checkDelete(String file); | java.io.FilePermission "{file}", "delete";
public void checkExec(String cmd); if cmd is an absolute path: java.io.FilePermission "{cmd}", "execute";
else java.io.FilePermission "<<ALL_FILES>>", "execute";
public void checkExit(int status); | java.lang.RuntimePermission "exitVM.{status}";
public void checkLink(String lib); | java.lang.RuntimePermission "loadLibrary.{lib}";
public void checkListen(int port); | java.net.SocketPermission "localhost:{port}","listen";
public void checkMemberAccess(Class clazz, int which);
Note: This method is deprecated; use instead
public void checkPermission(Permission perm);
if (which != Member.PUBLIC) {
  if (currentClassLoader() != clazz.getClassLoader()) {
    checkPermission(
      new java.lang.RuntimePermission("accessDeclaredMembers"));
  }
}
public void checkMulticast(InetAddress maddr); | java.net.SocketPermission(maddr.getHostAddress(),"accept,connect");
public void checkMulticast(InetAddress maddr, byte ttl);
Note: This method is deprecated; use instead
public void checkPermission(Permission perm); 		java.net.SocketPermission(maddr.getHostAddress(),"accept,connect");
public void checkPackageAccess(String pkg); | java.lang.RuntimePermission "accessClassInPackage.{pkg}";
public void checkPackageDefinition(String pkg); | java.lang.RuntimePermission "defineClassInPackage.{pkg}";
public void checkPrintJobAccess(); | java.lang.RuntimePermission "queuePrintJob";
public void checkPropertiesAccess(); | java.util.PropertyPermission "*", "read,write";
public void checkPropertyAccess(String key); | java.util.PropertyPermission "{key}", "read,write";
public void checkRead(FileDescriptor fd); | java.lang.RuntimePermission "readFileDescriptor";
public void checkRead(String file); | java.io.FilePermission "{file}", "read";
public void checkRead(String file, Object context); | java.io.FilePermission "{file}", "read";
public void checkSecurityAccess(String target); | java.security.SecurityPermission "{target}";
public void checkSetFactory(); | java.lang.RuntimePermission "setFactory";
public void checkSystemClipboardAccess();
Note: This method is deprecated; use instead
public void checkPermission(Permission perm); 		java.awt.AWTPermission "accessClipboard";
public boolean checkTopLevelWindow(Object window);
Note: This method is deprecated; use instead
public void checkPermission(Permission perm); 		java.awt.AWTPermission "showWindowWithoutWarningBanner";
public void checkWrite(FileDescriptor fd); | java.lang.RuntimePermission "writeFileDescriptor";
public void checkWrite(String file); | java.io.FilePermission "{file}", "write";
public SecurityManager(); | java.lang.RuntimePermission "createSecurityManager";
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


PKI Enhancements in Java SE 5

Documentation Contents

Public Key Infrastructure (PKI) Enhancements
for Java SE 5

1. Introduction

This document describes the PKI enhancements that have been made to Java SE 5.0 and how to use them.

The following PKI enhancements were made in version 5.0 of the JavaSE platform:

  • On-Line Certificate Service Protocol (OCSP)
  • API support for indirect certificate revocation lists (CRLs)
  • Clarified distinguished name usage in CertPath API
  • Passed PKIX RFC 3280 compliance test suite
  • Made java.security.cert.PolicyQualifierInfo non-final
  • Added more CA certificates
  • PKCS#11 Support
  • Enhanced PKCS#12 implementation
  • Enhanced TrustManager support

On-Line Certificate Service Protocol (OCSP)

Client-side support for the On-Line Certificate Status Protocol (OCSP) as defined in RFC 2560 has been added in this release. OCSP checking is controlled by the following five, new security properties:
Property Name | Description
ocsp.enable | This property's value is either true or false. If true, OCSP checking is enabled when doing certificate revocation checking; if false or not set, OCSP checking is disabled.
ocsp.responderURL This property's value is a URL that identifies the location of the OCSP responder. Here is an example.
ocsp.responderURL=http://ocsp.example.net:80

By default, the location of the OCSP responder is determined implicitly from the certificate being validated. The property is used when the Authority Information Access extension (defined in RFC 3280) is absent from the certificate or when it requires overriding.
ocsp.responderCertSubjectName This property's value is the subject name of the OCSP responder's certificate. Here is an example.
ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string distinguished name (defined in RFC 2253) which identifies a certificate in the set of certificates supplied during cert path validation. In cases where the subject name alone is not sufficient to uniquely identify the certificate, then both the ocsp.responderCertIssuerName and ocsp.responderCertSerialNumber properties must be used instead. When this property is set, then those two properties are ignored.
ocsp.responderCertIssuerName This property's value is the issuer name of the OCSP responder's certificate. Here is an example.
ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string distinguished name (defined in RFC 2253) which identifies a certificate in the set of certificates supplied during cert path validation. When this property is set then the ocsp.responderCertSerialNumber property must also be set. Note that this property is ignored when the ocsp.responderCertSubjectName property has been set.
ocsp.responderCertSerialNumber This property's value is the serial number of the OCSP responder's certificate Here is an example.
ocsp.responderCertSerialNumber=2A:FF:00

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string of hexadecimal digits (colon or space separators may be present) which identifies a certificate in the set of certificates supplied during cert path validation. When this property is set then the ocsp.responderCertIssuerName property must also be set. Note that this property is ignored when the ocsp.responderCertSubjectName property has been set.

These properties may be set either staticly in the Java runtime's $JAVA_HOME/jre/lib/security/java.security file, or dynamically using the java.security.Security.setProperty() method.

By default, OCSP checking is not enabled. It is enabled by setting the ocsp.enable property to "true". Use of the remaining properties is optional. Note that enabling OCSP checking only has an effect if revocation checking has also been enabled. Revocation checking is enabled via the PKIXParameters.setRevocationEnabled() method.

OCSP checking works in conjunction with Certificate Revocation Lists (CRLs) during revocation checking. Below is a summary of the interaction of OCSP and CRLs. Failover to CRLs occurs only if an OCSP problem is encountered. Failover does not occur if the OCSP responder confirms either that the certificate has been revoked or that it has not been revoked.

PKIXParameters RevocationEnabled (default=true) | ocsp.enable (default=false) | Behavior
true | true | Revocation checking using OCSP, failover to using CRLs
true | false | Revocation checking using CRLs only
false | true | No revocation checking
false | false | No revocation checking

See the Java Certification Path API Programming Guide for details about revocation checking and Certificate Revocation Lists.

API Support for Indirect Certificate Revocation Lists (CRLs)

Indirect CRLs are certificate revocation lists that include entries for certificates from issuers other than the CRL issuer. In Java SE 5, two changes were made to the CertPath API to better support indirect CRLs.

The java.security.cert.X509CRL class has a method, getRevokedCertificate(BigInteger), for getting a CRL entry given a certificate's serial number. However, for an indirect CRL, the serial number does not uniquely identify a certificate. In Java SE 5, an overloaded form of getRevokedCertificate() was added for getting a CRL entry given a certificate.

Prior to Java SE 5, the java.security.cert.X509CRLEntry class did not have any method for obtaining the issuer of the certificate described by the CRL entry. In Java SE 5, a method, getCertificateIssuer(), was added to address this gap.

Clarified Distinguished Name Usage in CertPath API

The CertPath API has constructors and methods that accept byte arrays and strings to represent distinguished names. However, in some classes, it lacked similar overloaded forms that accept X500Principal to represent distinguished names. Use of X500Principal to represent a distinguished name is preferred because it is more efficient and suitably typed. The following methods were added to the CertPath API.
  • java.security.cert.TrustAnchor

    public TrustAnchor(X500Principal caPrincipal, PublicKey pubKey,
    byte[] nameConstraints);
public final X500Principal getCA();
  • java.security.cert.X509CertSelector

    public X500Principal getIssuer();
public void setIssuer(X500Principal issuer);
public X500Principal getSubject();
public void setSubject(X500Principal subject);
  • java.security.cert.X509CRLSelector
    public void setIssuers(Collection<X500Principal> issuers);
public void addIssuer(X500Principal issuer);
public Collection<X500Principal> getIssuers();

The methods getSubjectDN() and getIssuerDN() in the X509Certificate class and getIssuerDN() in the X509CRL class are problematic because their specifications say that they return a distinguished name without being specific about its format. Consequently, different implementations may return implementation-specific objects, resulting in applications that have poor interoperability or are non-portable. Use of these methods are strongly discouraged. Instead, applications should use the methods that return an instance of X500Principal.

  • getSubjectX500Principal()
  • getIssuerX500Principal()
  • getIssuerX500Principal().

Passed PKIX Complaince Test Suite

The CertPath implementation in the SUN provider in Java SE 5 passed the Public Key Interoperability Test Suite (PKITS).

Made java.security.cert.PolicyQualifierInfo non-final

Prior to Java SE 5, java.security.cert.PolicyQualifierInfo was a final class. This prevented users from creating subclasses and adding methods that return fields of different types of policy qualifiers. In Java SE 5, this class was made non-final, but the following methods were made final to preserve the class' immutability contract.
public final String getPolicyQualifierId()
public final byte[] getEncoded()
public final byte[] getPolicyQualifier()

Added More CA Certificates

The following CA (Certification Authority) certificates were added to the cacerts file in the lib/security directory of the Java installation.
  Alias name: equifaxsecureebusinessca1
  Owner: CN=Equifax Secure eBusiness CA-1, O=Equifax Secure Inc., C=US

  Alias name: equifaxsecureca
  Owner: OU=Equifax Secure Certificate Authority, O=Equifax, C=US

  Alias name: geotrustglobalca
  Owner: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US

  Alias name: equifaxsecureglobalebusinessca1
  Owner: CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US

  Alias name: equifaxsecureebusinessca2
  Owner: OU=Equifax Secure eBusiness CA-2, O=Equifax Secure, C=US

  Alias name: verisignclass1g3ca
  Owner: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network,
  O="VeriSign, Inc.", C=US
  Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc.
  - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

  Alias name: verisignclass2g2ca
  Owner: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 2
  Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
  Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 2 Public Primary Certification Authority - G2, O="VeriSign,
  Inc.", C=US

  Alias name: verisignclass3g3ca
  Owner: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network,
  O="VeriSign, Inc.", C=US
  Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc.
  - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

  Alias name: verisignclass1g2ca
  Owner: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 1
  Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
  Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 1 Public Primary Certification Authority - G2, O="VeriSign,
  Inc.", C=US

  Alias name: verisignclass2g3ca
  Owner: CN=VeriSign Class 2 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network,
  O="VeriSign, Inc.", C=US
  Issuer: CN=VeriSign Class 2 Public Primary Certification Authority - G3, OU="(c)
  1999 VeriSign, Inc.
  - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US

  Alias name: verisignclass3g2ca
  Owner: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 3
  Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
  Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized
  use only", OU=Class 3 Public Primary Certification Authority - G2, O="VeriSign,
  Inc.", C=US

PKCS#11 Support

The Cryptographic Token Interface Standard, PKCS#11, is a standard that defines native programming interfaces to cryptographic tokens, such as hardware cryptographic accelerators and Smartcards. In Java SE 5, support was added for PKCS#11. This means that PKI applications can use PKCS#11 tokens (such as Smartcards) as keystores. See the PKCS#11 Guide for more information on how to use PKCS#11 tokens as keystores.

Enhanced PKCS#12 Implementation

PKCS#12 (Personal Information Exchange Syntax Standard) specifies a portable format for storage and/or transport of a user's private keys, certificates, miscellaneous secrets, and other items. Java SE 1.4.x provided read-only support for PKCS#12 keystores, and only for a small number of protection algorithms. The enhanced PKCS#12 keystore in Java SE 5 supports more protection algorithms (such as those supported by popular browsers) and also writing/updates to the keystore. This improves interoperability of PKCS#12 keystores imported/exported by Java SE, browsers, and other security applications.

Enhanced TrustManager Support

By default, the SunJSSE provider in Java SE 5 uses a X509 PKIX-compliant trust manager. See the What's New in the JSSE Reference Guide for details.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Policy Tool - Policy File Creation and Management Tool

Documentation Contents

Policy File Creation and Management

Creates and modifies the external policy configuration files that define your installation's Java security policy.

Table of Contents

Introduction

Policy Tool Usage
Starting Policy Tool
Creating a new Policy File
Opening a Different Policy File
Specifying the Keystore
Adding a New Policy Entry
Adding a New Principal
Editing a Principal
Removing a Principal
Adding a New Permission
Editing a Permission
Removing a Permission
Completing the Addition of a Policy Entry
Editing a Policy Entry
Removing a Policy Entry
Saving the Policy File
Exiting the Policy Tool
Viewing the Warning Log

Examples
Starting Creation of the User Policy File
Adding a Policy Entry
Specifying a Keystore
Adding a Policy Entry with a SignedBy Alias
Adding a Policy Entry with a Principal
Saving the User Policy File
Exiting Policy Tool

See Also

Introduction

The policy for a Java runtime (specifying which permissions are available for code from various sources, when executing as various principals) is represented by a Policy object. The default Policy implementation obtains its information from static ASCII policy configuration files.

A policy file can be composed via a simple text editor, or via the graphical Policy Tool utility described in this document. Using the Policy Tool saves typing and eliminates the need for you to know the required policy file syntax thus reducing errors.

The Policy Tool Usage section describes how to use the Policy Tool to create and modify policy files.

The Examples section provides detailed examples of the use of Policy Tool.

The See Also section provides links to related documentation.

Policy Tool Usage

Starting Policy Tool

To start Policy Tool, simply type the following at the command line.

  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Policy Tool window to add, edit, or remove a policy

You can then proceed to either open whatever policy file you want to work on or create a new policy file, by adding policy entries, optionally specifying a keystore, and saving the file).

The first time you run the Policy Tool, there will not be a user policy file (unless you created one manually).

Creating a new Policy File

To create a new policy file, start by simply selecting the New command from the File menu. This will close the currently open policy file (if any, after first prompting you to save it if needed) and bring up a new policy tool window, that is, a window with headings and buttons but no data in it.

Please Note: this is not necessary the first time you run the Policy Tool. Since the tool tries to open the user policy file and one doesn't exist yet (unless it was created manually), the tool will bring up a window without any data in it.

Once you have a new policy tool window, you can then create the policy entries, and specify the keystore (if any of the policy entries specify a keystore alias). At any point, you can save the policy file.

Opening a Different Policy File

To work on a different policy file than the one currently being worked on (if any), use the Open command in the File menu.

This will close the currently open policy file (if any, after first prompting you to save it if needed) and will present you with an Open dialog, which you can use to navigate the directory structure until you get to the directory containing the policy file you want to work on. Select that file, then select the OK button.

The "Policy Tool" window will then be filled in with information from the policy file, including the policy file name, the keystore URL (if any), and the CodeBase, SignedBy and Principal parts of each policy entry in the policy file.

Specifying the Keystore

To specify the keystore containing the key information for the aliases specified in the SignedBy parts of policy entries, select the Edit command in the Keystore menu.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the /tests/ directory, type the following file: URL into the text box labeled "New KeyStore URL".

  file:/tests/mykeystore

To also specify that the keystore type is "JKS" (the proprietary keystore type supported by Oracle), type the following into the text box labeled "New KeyStore Type".

  JKS

When you are done specifying the keystore URL and type (if any), select OK (or you can select Cancel to cancel the operation). If you didn't cancel, the text box labeled "Keystore:" is now filled in with the keystore URL and type.

Adding a New Policy Entry

To add a new policy entry, select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Policy Entry dialog to add a policy entry

Using this dialog box, you specify

  • an optional CodeBase entry indicating the URL location where the code originates from. For example, to indicate code from the local /TESTS/ directory, type the following file URL into the CodeBase text box:
      file:/TESTS/
  • an optional SignedBy entry indicating the alias name from the keystore used to reference the signer whose private key was used to sign the code. For example, to indicate the alias named "Signer", simply type the following into the SignedBy text box:
      Signer
  • an optional Principals entry indicating the list of principals that the code has to be executed as in order for the permission(s) to be granted. See Adding a New Principal.
  • one or more permission entries indicating which permissions are granted to the code from the source indicated by the CodeBase and SignedBy values (or to any code if no such values are specified) when running as the specified principals in the Principals list. See Adding a New Permission.

The SignedBy value is a string alias that is mapped (using the keystore) to a set of public keys that are associated with the signers. These keys are used to verify that classes from the specified code source are really signed by these signers.

The SignedBy value can be a comma-separated string containing names of multiple signers, an example of which is "Adam,Eve,Charles", which means "signed by Adam and Eve and Charles" (i.e., the relationship is AND, not OR).

The SignedBy value is optional in that, if it is omitted, it signifies "any signer," or in other words, it doesn't matter whether the code is signed or not. Similarly, if there is no CodeBase entry, then it signifies "any code"; it doesn't matter where the code originates from.

Thus, if there is no CodeBase entry, then all code signed by the specified alias(es) will be granted the specified permissions. If there is no SignedBy entry, then all code from the specified CodeBase will be granted the specified permissions, regardless of whether the code is signed or not, and by whom. If there is no CodeBase entry, and also no SignedBy entry, then all code will be granted the specified permissions.

Note: The exact meaning of a CodeBase value depends on the characters at the end. A CodeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A CodeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A CodeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory.

The Principals entry specifies a list of "principal values". Each principal value specifies a principal_type/principal_name pair which must be present within the executing thread's principal set. The Principals entry is optional in that, if it is omitted, it signifies "any principals".

If there is no principal_type specified and the principal_name is a quoted string, the string is treated as a keystore alias when the policy file is processed at runtime. The keystore is consulted and queried (via the alias) for an X509 Certificate. If one is found, the principal type is automatically assumed to be javax.security.auth.x500.X500Principal, and the actual principal name is assumed to be the subject distinguished name from the certificate. If an X509 Certificate mapping is not found, the entire policy entry granting permissions to the specified principal is ignored.

Adding a New Principal

To add a new principal, select the Add Principal button in the "Policy Entry" dialog box. This brings up the "Principals" dialog box:

Principals dialog to add a principal

To add the principal:

  1. Type or select a principal type.

    The drop-down list labeled "Principal Type:" contains a list of built-in principal types. If you want such a type, select it from the list, and the complete principal type name appears in the text box to the right of the drop-down list.

    If you instead want to specify a principal type defined by you or others, type the principal type into the text box.

  2. Type a principal name.

    Type the principal name directly into the text box to the right of the "Principal Name:" text box. For example, to specify the principal named Signer, type

    Signer

When you are done specifying the principal information, select the OK button (or Cancel to cancel). The new principal appears in a line in the "Principals" entry.

You can then add additional principals by following the same sequence of steps. Or you can edit or remove an existing principal.

Editing a Principal

To edit an existing principal, select the line for that principal in the "Principals:" entry, then select the Edit Principal button. Alternatively, you can simply double-click the line for that principal.

This brings up the same type of "Principals" dialog box as appears when you are adding a new principal, except in this case the dialog box is filled in with the existing principal information. To change the information, either make new selections from the drop-down lists or replace the information in the text boxes.

When you are done, select the OK button (or Cancel to cancel changes). The Principals:" entry now shows the principal with your modifications.

Removing a Principal

To remove an existing principal, select the line for that principal in the "Principals:" entry, then select the Remove Principal button.

Adding a New Permission

To add a new permission, select the Add Permission button in the "Policy Entry" dialog box. This brings up the "Permissions" dialog box:

Permissions dialog to add a new permission

To add the permission:

  1. Type or select a permission type.

    The drop-down list labeled "Permission:" contains a list of built-in permission types. If you want such a type, select it from the list, and the complete permission type name appears in the text box to the right of the drop-down list.

    If you instead want to specify a permission type defined by you or others, type the permission type into the text box.

  2. Type or select a permission target name.

    If you selected a built-in permission from the "Permission:" drop-down list, and permissions of that type have specific target name values, then the drop-down list labeled "Target Name:" contains a list of those values, from which you can choose.

    In some cases, where the target name possibilities are infinite but there are some built-in target name specifications that have special meaning, such target names will appear in the drop-down list. For example, the special target name of "<<All Files>>" will appear in the list for File Permissions.

    To specify a target name not available in the drop-down list, type the target name directly into the text box to the right of the "Target Name:" drop-down list. For example, to specify the file named data in the /ptTest/ directory, type

      /ptTest/data
  3. Type or select one or more actions, if actions are relevant.

    Some permissions just have a target name, but no actions. For such permissions, leave the text box to the right of the "Actions:" drop-down list blank. (It will automatically be darkened and unavailable for this type of built-in permission.)

    For permissions requiring action specifications, type the comma-separated list of actions into the text box, or select them from the drop-down list. For example, to specify both read and write access to a file specified for a File Permission, first select read (or write, order doesn't matter) from the list. The word "read" appears in the text box. Then select write, and the word "write" will be appended, preceded by a comma and a space.

  4. Type a SignedBy alias into the text box to the right of the "Signed By" label, if required. The SignedBy value for a permission entry is optional. If present, it indicates a signed permission. That is, the permission class itself must be signed by the given alias(es) in order for the permission to be granted.

When you are done specifying the permission information, select the OK button (or Cancel to cancel). The new permission appears in a line in the "Policy Entry" dialog.

You can then add additional permissions by following the same sequence of steps. Or you can edit an existing permission or remove a permission.

Editing a Permission

To edit an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Edit Permission button. Alternatively, you can simply double-click the line for that permission.

This brings up the same type of "Permissions" dialog box as appears when you are adding a new permission, except in this case the dialog box is filled in with the existing permission information. To change the information, either make new selections from the drop-down lists or replace the information in the text boxes.

When you are done, select the OK button (or Cancel to cancel changes). The "Policy Entry" dialog now shows the permission with any modifications you made.

Removing a Permission

To remove an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Remove Permission button.

Completing the Addition of a Policy Entry

Once you are done adding a policy entry, select the Done button in the "Policy Entry" dialog, or Cancel to cancel.

If you selected Done, the "Policy Tool" window now contains a line representing the policy entry. The line contains the CodeBase, SignedBy and Principals information (if any). If none was specified in the "Policy Entry" dialog, just

  CodeBase <ALL>

appears.

Note: a warning is displayed upon closing the policy entry if it contains any SignedBy aliases that don't yet exist in your keystore. Select OK and make a note to create such an alias, or edit the policy entry to fix the alias if was wrong.

Editing a Policy Entry

To edit an existing policy entry, select the line for that entry in the main "Policy Tool" window, then select the Edit Policy Entry button. Alternatively, you can simply double-click the line for that entry.

This brings up the same type of "Policy Entry" dialog box as appears when you are adding a new policy entry, except in this case the dialog box is filled in with the existing policy entry information. To change the information, simply retype it (for the CodeBase and SignedBy values) or use the buttons (for the Principals and Permissions values).

When you are done, select the Done button (or Cancel to cancel).

Removing a Policy Entry

To delete a policy entry from the policy file, select the line for that entry in the main "Policy Tool" window, then select the Remove Policy Entry button.

The complete policy entry is displayed, and you can then either select OK to remove the entry, or Cancel to keep it.

Saving the Policy File

To save changes to an existing policy file, simply select the Save command in the File menu.

To save a new policy file you've been creating, or to copy an existing policy file to a new policy file with a different name, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to the directory in which you want to save the policy file. Type the desired file name, then select the OK button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File:"

Exiting the Policy Tool

To exit Policy Tool, select the Exit command from the File menu.

Viewing the Warning Log

If Policy Tool ever reports that warnings have been stored in the Warning Log, you can view the log by selecting the View Warning Log command in the File menu.

For example, if you have a policy file with a Keystore URL specifying a keystore that doesn't yet exist, you will get such a warning at various times, e.g., when you open the file. You can continue to work on the policy file even if warnings exist.

Examples

The following examples show how to

  • create the user policy file from scratch
  • add a policy entry
  • specify a keystore
  • add a policy entry for signed code
  • add a policy entry for authenticated code
  • save the user policy file, and
  • exit the Policy Tool

Starting Creation of the User Policy File

Initially, there is no user policy file (unless you created one manually). So to create the user policy file, first simply start Policy Tool by typing the following at the command line.

  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Policy Tool window to create a user profile

You can now create the user policy file by adding entries and saving the file.

Adding a Policy Entry

Suppose you want to grant all classes from the /tests/ directory permission to read the file named mydata in the /temp/data/ directory. To do so, first select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Polity Entry dialog to add a policy entry

Using this dialog box, type the file URL

  file:/tests/

into the CodeBase text box.

Leave the SignedBy text box blank, since you aren't requiring the code to be signed.

Leave the Principals list blank, since you aren't requiring the code to be authenticated.

To add the permission, select the Add Permission button. This brings up the "Permissions" dialog box:

Permissions dialog to add a new permissions

To add the permission:

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.
  2. Type the following in the text box to the right of the list labeled "Target Name:":
      /temp/data/mydata
  3. Specify read access by either selecting "read" from the "Actions:" drop-down list or directly typing "read" into the text box to the right of the "Actions:" drop-down list.

Now the "Permission" dialog box looks like the following:

Permissions dialog showing the new permission to be added

When you are done specifying the permission information, select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Permission shown in the Policy Entry dialog

You are now done specifying this policy entry, so select the Done button. The "Policy Tool" window now contains a line representing the policy entry. The line just contains the CodeBase value:

Policy Tool window showing one CodeBase

Specifying a Keystore

Suppose you also want to grant any code from the URL "http://example.com/" and signed by the alias "Signer" read access to all files in the /tmp/ directory. Suppose you also want to give such code permission to initiate outgoing socket connections to any hosts. You need to do two things:

  1. Specify the keystore containing the alias, and
  2. Create the policy entry granting the permissions.

To specify the keystore containing the key information for the aliases specified in any SignedBy parts of policy entries, select the Edit command in the Keystore menu of the main "Policy Tool" window.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the /tests/ directory, type the following file: URL into the text box labeled "New KeyStore URL":

  file:/tests/mykeystore

If the keystore type is the default type, as specified by the "keystore.type" property value in the security properties file, you don't need to type a "New KeyStore Type" value. The default value of that property is "JKS" (the proprietary keystore type supported by Oracle).

To specify the keystore type, type its value into the text box labeled "New KeyStore Type." For example, to indicate that the keystore type is "JKS" type

  JKS

The result is:

Keystore dialog to specify keystore type and URL

When you are done specifying the keystore URL and type, select OK. The text box labeled "Keystore:" is now filled in with the URL and type.

Next, you need to specify the policy entry:

Adding a Policy Entry with a SignedBy Alias

Select the Add Policy Entry button in the main "Policy Tool" window. This brings up the "Policy Entry" dialog box. Type the following into the CodeBase text box:

  http://example.com/*

The "*" indicates that both class and JAR files in the specified directory are to be considered to match this CodeBase.

Now, type the following alias into the SignedBy text box:

  Signer

Leave the Principals list blank, since you aren't requiring the code to be authenticated.

To add the first permission, select the Add Permission button. This brings up the "Permissions" dialog box. Do the following

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.
  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all files in the /tmp/ directory:
      /tmp/*
  3. Specify read access by selecting "read" from the "Actions:" drop-down list.

Now the "Permissions" dialog box looks like the following:

Permission dialog showing the new permission to be added

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Now you need to add the other permission. Select the Add Permission button. In the "Permissions" dialog box, do the following

  1. Select "Socket Permission" from the "Permission:" drop-down list. The complete permission type name (java.net.SocketPermission) now appears in the text box to the right of the drop-down list.
  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all hosts:
      *
  3. Specify permission to make connections by selecting "connect" from the "Actions:" drop-down list.

Now the "Permissions" dialog box looks like the following:

Permission dialog showing the socket permission being selected

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Policy Entry dialog showing two permissions

You are now done specifying this policy entry, so select the Done button in the "Policy Entry" dialog. The "Policy Tool" window now contains a line representing the policy entry, showing the CodeBase, SignedBy and Principals values.

Policy Tool window showing two CodeBases

Adding a Policy Entry with a Principal

Suppose you want to grant the principal whose X500 name is

CN=Signer,O=Oracle,C=US

permission to write to the /tmp/ directory.

Select the Add Policy Entry button in the main "Policy Tool" window. This brings up the "Policy Entry" dialog box.

Leave the CodeBase text box blank since you aren't limiting where the code comes from.

Leave the SignedBy text box blank since you aren't requiring the code to be signed.

Select the Add Principal button. In the "Principals" dialog box, do the following

  1. Select "X500Principal" from the "Principal Type:" drop-down list. The complete principal type name (com.sun.security.auth.X500Principal) now appears in the text box to the right of the drop-down list.
  2. Type the following in the text box to the right of the list labeled "Principal Name:" to specify an X500 name for the X500Principal:
    CN=Signer,O=Oracle,C=US

Now the "Principals" dialog box looks like the following:

Principals dialog to add a X500Principal

Select the OK button. The new principal appears in a line in the "Principals" list.

Policy Entry dialog showing the X500Principal

To add the permission, select the Add Permission button. This brings up the "Permissions" dialog box. Do the following

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.
  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all files in the /tmp/ directory:
      /tmp/*
  3. Specify write access by first selecting "write" from the "Actions:" drop-down list.

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Policy Entry dialog showing the X500Principal and the file permission

You are now done specifying this policy entry, so select the Done button in the "Policy Entry" dialog. The "Policy Tool" window now contains a line representing the policy entry, showing the CodeBase, SignedBy and Principals values.

Policy Tool window showing three CodeBases

Saving the User Policy File

Let's assume you want to save the policy file you've been creating with the default name (.java.policy) in the default location (your home directory).

To save the user policy file, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to your home directory. Type

  .java.policy

(note the initial period) as the file name, then select the OK button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File:".

Policy Tool window showing three CodeBases, keystore, and policy file Name

Exiting Policy Tool

When you want to exit Policy Tool, do so by selecting the Exit command from the File menu.

See Also

  • Permissions in the Java ™ Development Kit
  • Default Policy Information and Policy File Syntax
  • keytool tool man page
  • Security Architecture Specification
  • The Security trail of the Java Tutorial for examples of the use of the security tools including Policy Tool
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security Enhancements in JDK 7

Documentation Contents

JDK 7 Security Enhancements

The following topics are covered:

  • Enhancements in JDK 7 Update 4
  • Enhancements in JDK 7 Update 2
  • Enhancements in JDK 7

Enhancements in JDK 7 Update 4

Area: JCE
Synopsis: The Apple provider has been introduced, which implements a java.security.KeyStore that provides access to the Mac OS X Keychain. This is part of RFE JDK-7113349, the JDK port for Mac OS X. See the section The Apple Provider in Java Cryptography Architecture Oracle Providers Documentation

Enhancements in JDK 7 Update 2

Area: Java Cryptography Extension
Synopsis: Public key certificates containing Elliptic Curve Cryptography (ECC) keys are parsed correctly by the SunPKCS11 JCE security provider on Solaris 11. See 7054637.

Enhancements in JDK 7

The JDK 7 release adds the following features:

  • Elliptic Curve Cryptography (ECC): A new native provider has been added to the Java SE 7 release that provides several ECC-based algorithms (ECDSA/ECDH). For more information, see The SunEC Provider's Supported Algorithms section in the Java Cryptography Architecture Oracle Providers Documentation.

  • CertPath Algorithm Disabling: Weak cryptographic algorithms can now be disabled. For example, the MD2 digest algorithm is no longer considered secure. The Java SE 7 release provides a mechanism for denying the use of specific algorithms in certification path processing and TLS handshaking. See Appendix D: Disabling Cryptographic Algorithms in Java PKI Programmer's Guide and Disabled Cryptographic Algorithms in Java Secure Socket Extension (JSSE) Reference Guide for more information.

  • JSSE (SSL/TLS):

    • TLS 1.1: The SunJSSE provider now supports TLS 1.1 as described in RFC 4346. The most important update is protection against cipher block chaining (CBC) attacks.

    • TLS 1.2: The SunJSSE provider now supports TLS 1.2 as described in RFC 5246. Among other things, it specifies different internal hashing algorithms, adds new cipher suites, and contains improved flexibility, particularly for negotiation of cryptographic algorithms.

    • Weak cipher suites deprecated: Per RFC 4346, RFC 5246, and RFC 5469, some cipher suites have been made obsolete and should not be used. These obsolete suites are all disabled by default in SunJSSE. For details, consult the cipher lists in the section The SunJSSE Provider in Java Cryptography Architecture Oracle Providers Documentation.

  • Connection-sensitive trust management: Both trust managers and key managers now have the ability to examine parameters of the TLS connection, specifically the SSLSession under construction, during the handshake. For example, a trust manager might restrict the types of certificates used based on the list of valid signature algorithms.

  • Endpoint verification: An endpoint identification algorithm can be specified to verify that a remote computer's host address matches its supplied certificate. Although this type of verification was previously performed for the HTTPS protocol (see HttpsURLConnection and HostnameVerifier), such verification can now be optionally performed at the TLS level.

  • TLS renegotiation: Java SE supports RFC 5746, which fixes a renegotiation issue in the TLS protocol. See the section Transport Layer Security (TLS) Renegotiation Issue in Java Secure Socket Extension (JSSE) Reference Guide.

  • SSLv2Hello disabled by default on the client: In Java SE 7, SSLv2Hello is removed from the default enabled protocol list on the client.

  • Algorithm disabling: Weak cryptographic algorithms can now be disabled, as previously described.

  • Server Name Indication (SNI) for JSSE client: The Java SE 7 release supports the Server Name Indication (SNI) extension in the JSSE client. SNI is described in RFC 4366. This enables TLS clients to connect to virtual servers.

  • Tighter checking of EncryptedPreMasterSecret version numbers: Java SE 7 tightens version number checking during TLS 1.1 and TLS 1.2 handshaking. See Tighter Checking of EncryptedPreMasterSecret Version Numbers in Java Cryptography Architecture Oracle Providers Documentation for more information.

In addition, the following enhancements are added:

Area: Security
Standard/Platform: Java SE 7
Synopsis: Security algorithm requirement have been defined for Java SE 7 that provide a list of algorithms that all implementations of Java SE 7 must support. The class summary of applicable classes (ex: java.security.Signature) has been updated to include the implementation requirements. Also, all of the requirements are listed in the Implementation Requirements section of the Standard Algorithms document.
RFE: 5001004

Area: API: JSSE
Standard/Platform: Java SE 7
Synopsis: In previous releases, except for the default algorithm, there was no standard algorithm name for KeyManagerFactory. In the Java SE 7 release, "PKIX" is exported as the standard algorithm name for KeymanagerFactory. The "PKIX" KeyManagerFactory algorithm is defined as:
A factory for X509ExtendedKeyManagers that manages X.509 certificate-based key pairs for the local side authentication according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. The KeyManagerFactory must support initialization using the class javax.net.ssl.KeyStoreBuilderParameters.
RFE: 7022855

Area: API: JSSE
Standard/Platform: Java SE 7
Synopsis: Support for TLS 1.2 has been added to the SunJSSE provider.
RFE: 6916074

Area: JSSE
Standard/Platform: JDK 7
Synopsis: The TLS renegotiation fix has been implemented. Please see TLS/SSLv3 Renegotiation Vulnerability Explained and Understanding the TLS Renegotiation Attack for more information.

Area: JSSE
Standard/Platform: JDK 7
Synopsis: Support for the Server Name Indication (SNI) extension has been added to the JSSE client in the SunJSSE provider.
RFE: 6985179

Area: SASL
Standard/Platform: JDK 7
Synopsis: NTLM is now supported as a SASL mechanism on both the client and server side. Only the authentication layer is implemented, and there is no privacy or integrations protection in communication.
RFE: 6911951

Area: Security
Standard/Platform: JDK 7
Synopsis: The implementation of PKIX has been enhanced to include an option to reject certificates if the corresponding key is not strong enough, for example MD2 hash functions or any RA key with key size less than 1024.
RFE: 6792180

Area: API: JSSE
Standard/Platform: JDK 7
Synopsis: Support for TLS 1.1 has been added to the SunJSSE provider, and the SSLv2Hello "pseudo protocol" is no longer active by default in the SunJSSE provider.
RFE: 4873177

Area: JGSS
Standard/Platform: JDK 7
Synopsis: Java now reads a keytab file whenever that keytab file changes. The file can be empty or nonexistent when the application that uses the file is started.

Area: JGSS
Standard/Platform: JDK 7
Synopsis: A default configuration file is now provided for JGSS with default krb5.conf settings for Windows and *nix systems. This makes deploying a JGSS/krb5 program very easy, especially for deploying Java applets.
RFE: 6483218, 6785456, 6552334

Area: JCE
Standard/Platform: JDK 7
Synopsis: SunPKCS11 provider now supports Raw RSA encryption, for example, Cipher.getInstance("RSA/ECB/NoPadding") calls, when the underlying PKCS11 library supports CKM-RSA_X_509 mechanism. In addition, SunPKCS11 provider recognizes "RSA" as an alias for the "RSA/ECB/PKCS1Padding" transformation when requesting a Cipher object.
RFE: 6994008

Area: JCE
Standard/Platform: JDK 7
Synopsis: The SunPKCS11 provider now supports ECB, CBC modes with PKCS5Padding for certain block ciphers. To be more specific, it supports the following transformations for Cipher.getInstance(...) calls when the corresponding PKCS11 mechanism is supported by the underlying PKCS11 library:
DES, DESede, AES, and Blowfish with CBC mode and PKCS5Padding
DES, DESede, AES with ECB mode and PKCS5Padding
DES, DESede, AES with ECB mode and NoPadding
RFE: 4898461

Area: JCE
Standard/Platform: JDK 7
Synopsis: The SunPKCS11 provider now supports AES encryption with Counter mode (CTR), (for example, Cipher.getInstance("AES/CTR/NoPadding") calls) when the underlying PKCS11 library supports CKM_AES_CTR mechanism.
RFE: 6604496

Area: JCE
Standard/Platform: JDK 7
Synopsis: Given that the relevant Solaris bug (i.e. 6306708 "CKM_SSL3_KEY_AND_MAC_DERIVE returns incorrect cipher keys for exportable ciphersuites") has been addressed in the Solaris 10 update 5 release, the SunPKCS11 provider no longer disables the following two mechanisms by default:
CKM_SSL3_KEY_AND_MAC_DERIVE
CKM_TLS_KEY_AND_MAC_DERIVE
RFE: 7036252

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security Enhancements in JDK 8

Documentation Contents

JDK 8 Security Enhancements

The JDK 8 release adds the following features and enhancements:

  • TLS 1.1 and TLS 1.2 Enabled by Default: The SunJSSE provider enables the protocols TLS 1.1 and TLS 1.2 on the client by default. See Protocols. Configure which SunJSSE protocols are enabled with the new system property jdk.tls.client.protocols. See Customizing JSSE.

  • Limited doPrivileged: A version of the method AccessController.doPrivileged has been added that enables code to assert a subset of its privileges, without preventing the full traversal of the stack to check for other permissions. See the section Asserting a Subset of Privileges in API for Privileged Blocks and RFE 7083329.

  • Stronger Algorithms for Password-Based Encryption: Several AES-based Password-Based Encryption (PBE) algorithms, such as PBEWithSHA256AndAES_128 and PBEWithSHA512AndAES_256, have been added to the SunJCE provider. See Oracle Providers Documentation, JEP 121, and RFE 6383200.

  • SSL/TLS Server Name Indication (SNI) Extension Support in JSSE Server: The SNI extension is a feature that extends the SSL/TLS protocols to indicate what server name the client is attempting to connect to during handshaking. Servers can use server name indication information to decide if specific SSLSocket or SSLEngine instances should accept a connection. SunJSSE has enabled SNI extension for client applications by default in JDK 7. JDK 8 supports the SNI extension for server applications.

    See the following sections in the JSSE Reference Guide for a general description with links to new class descriptions and examples:

    • Server Name Indication (SNI) Extension
    • The SNIServerName Class
    • The SNIMatcher Class
    • The SNIHostName Class

    See also JEP 114.

  • Support AEAD algorithms: The SunJCE provider is enhanced to support AES/GCM/NoPadding cipher implementation as well as GCM algorithm parameters. The SunJSSE provider is enhanced to support AEAD mode based cipher suites. See Oracle Providers Documentation, JEP 115.

  • KeyStore Enhancements: A new command option -importpassword is added to the keytool utility, to accept a password and store it securely as a secret key. A new class, java.security.DomainLoadStoreParameter is added to support DKS keystore type. Other new classes such as java.security.PKCS12Attribute are added and other security APIs are modified to support KeyStore enhancements.

    See Java Security Overview documentation.

    See also JEP 166 and JDK-8005408.

  • SHA-224 Message Digests: The cryptographic algorithms in JDK 8 have been enhanced with the SHA-224 variant of the SHA-2 family of message-digest implementations. See Oracle Providers Documentation, Standard Algorithm Name Documentation, PKCS#11 Reference Guide, JEP 130, and RFE 4963723.

  • Enhanced Support for NSA Suite B Cryptography: This includes the following:

    • OID registration for NSA Suite B cryptography algorithms
    • SUN provider: Support for 2048-bit DSA key pair generation and additional signature algorithms for 2048-bit DSA keys such as SHA224withDSA and SHA256withDSA.
    • SunJCE provider: Lifting of the keysize restriction from 1024 to 2048 for Diffie-Hellman (DH).

    See Oracle Providers Documentation, Standard Algorithm Name Documentation, and RFE 7044060.

  • Better Support for High Entropy Random Number Generation: The SecureRandom class provides the generation of cryptographically strong random numbers used for private or public keys, ciphers, signed messages, and so on. Some SecureRandom implementations are better than others. The getInstanceStrong() method was introduced in JDK 8, which returns an instance of the strongest SecureRandom implementation available on each platform. It should be used in cases when you need to create a high-value and long-lived secret, such as an RSA private and public key pair.

    For more information, see the SecureRandom section of the JCA Reference Guide and the SecureRandom API Specification.

    Other changes to SecureRandom include:

    • For UNIX-like platforms, two new implementations were introduced which provide blocking and non-blocking behavior: NativePRNGBlocking and NativePRNGNonBlocking.
    • SHA1PRNG and NativePRNG were fixed to properly respect the SecureRandom seed source properties in the java.security file. (The obscure workaround using file:///dev/urandom and file:/dev/./urandom is no longer required.)

    For details about changes to random number generation, see JEP 123.

  • New PKIXRevocationChecker Class: The PKIXRevocationChecker class checks the revocation status of certificates with the PKIX algorithm. It supports best-effort checking, end-entity certificate checking, and mechanism-specific options and parameters. See Check Revocation Status of Certificates with PKIXRevocationChecker Class in the Java PKI Programmer's Guide, JEP 124, and RFE 6854712.

  • 64-bit PKCS11 for Windows: The PKCS 11 provider support for Windows has been expanded to include 64-bit. See the 2.1 Requirements section of the JDK 8 PKCS#11 Reference Guide, JEP 131, and RFE 6880559.

  • New rcache Types in Kerberos 5 Replay Caching: Two new rcache types are added to Kerberos 5. Type none means no rcache at all, and type dfl means the DFL style file-based rcache. Also, the acceptor requested subkey is now supported. They are configured using the sun.security.krb5.rcache and sun.security.krb5.acceptor.subkey system properties.

  • Protocol Transition and Constrained Delegation for Kerberos 5: Kerberos 5 protocol transition and constrained delegation are supported within the same realm in JDK 8. See RFE 6355584.

  • Weak Encryption Disabled by Default: The DES-related Kerberos 5 encryption types are not supported by default. These encryption types can be enabled by adding allow_weak_crypto=true in the krb5.conf file, but DES-related encryption types are considered highly insecure and should be avoided. See RFE 8012679.

  • Unbound SASL for the GSS-API/Kerberos 5 mechanism: The Krb5LoginModule principal value in a JAAS configuration file can be set to asterisk (*) on the acceptor side to denote an unbound acceptor. This means that the initiator can access the server using any service principal name if the acceptor has the long term secret keys to that service. The name can be retrieved by the acceptor using the GSSContext.getTargName() method after the context is established. See RFE 8001104.

  • SASL service for multiple host names: When creating a SASL server, the server name can be set to null to denote an unbound server, which means a client can request for the service using any server name. After a context is established, the server can retrieve the name as a negotiated property with the key name SASL.BOUND_SERVER_NAME. See RFE 7110803.

  • JNI bridge to native JGSS on Mac OS X: JNI bridge to native JGSS is now supported on Mac OS X. Set the system property sun.security.jgss.native to true to enable it. See RFE 8010192.

  • Support stronger ephemeral DH keys in the SunJSSE provider: Make ephemeral DH key match the length of the certificate key during SSL/TLS handshaking in the SunJSSE provider. A new system property, jdk.tls.ephemeralDHKeySize, is defined to customize the ephemeral DH key sizes. The minimum acceptable DH key size is 1024 bits, except for exportable cipher suites or legacy mode (jdk.tls.ephemeralDHKeySize=legacy). See Customizing Size of Ephemeral DH Keys and RFE 6956398.

  • Support cipher suites preference customization in JSSE: By default, the SunJSSE provider honors the client's cipher suite preference. However, the behavior can be changed to respect the server's cipher suite preference by calling SSLParameters.setUseCipherSuitesOrder(true) in the server. See Cipher Suite Preference and RFE 7188657.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security Managers and the Java SE JDK

Introduction
Security Model Evolution
Security Manager Evolution
Security Manager Methods
Security Managers in JDK 1.1
Security Managers in the Java SE JDK
Installing java.lang.SecurityManager as the Default Security Manager
Changes to Methods For Class Loaders And Class Loader Depth
How to Port 1.1-Style Security Managers
SecurityManager Method Changes and Override Advice

Introduction

This document describes changes made to the security manager in the JDK that allow it to be used as-is as the default security manager in applications.

Security Model Evolution

In JDK 1.1, local applications and correctly digitally signed applets were generally trusted to have full access to vital system resources, such as the file system, while unsigned applets were not trusted and could access only limited resources. A security manager was responsible for determining which resource accesses were allowed.

The Java SE JDK security architecture is policy-based, and allows for fine-grained access control. When code is loaded, it is assigned "permissions" based on the security policy currently in effect. Each permission specifies a permitted access to a particular resource, such as "read" and "write" access to a specified file or directory, or "connect" access to a given host and port. The policy, specifying which permissions are available for code from various signers/locations, can be initialized from an external configurable policy file. Unless a permission is explicitly granted to code, it cannot access the resource that is guarded by that permission. These new concepts of permission and policy enable the JDK to offer fine-grain, highly configurable, flexible, and extensible access control. Such access control can now not only be specified for applets, but also for all Java code, including applications, beans, and servlets.

For more information on the Java security architecture, please see the security documentaton.

Security Manager Evolution

Security Manager Methods

The SecurityManager class contains many methods with names that begin with the word check. Examples are checkRead and checkConnect. Various methods in the Java libraries call a check method before performing each potentially security-sensitive operation. The security manager is thereby given an opportunity to prevent completion of the operation by throwing an exception. A security manager routine simply returns if the operation is permitted, but throws a SecurityException if the operation is not permitted. The only exception to this convention is checkTopLevelWindow, which returns a boolean value.

The other main type of methods contained in the SecurityManager class are those related to class loader existence and depth:

  • currentClassLoader
  • currentLoadedClass
  • inClassLoader
  • classLoaderDepth

Security Managers in JDK 1.1

In JDK 1.1, the class java.lang.SecurityManager was an abstract class. The default implementations of the security manager check methods threw exceptions. The class loader and depth-related classes were appropriately implemented, often in native code.

Any application (such as a browser) that wanted to install a security manager had to write their own, providing appropriate concrete implementations of the methods that threw exceptions by default -- primarily the check methods.

Security managers based on the JDK 1.1 applet security manager model typically based access control decisions on two things:

  1. Whether or not a class with a class loader (i.e., an applet in JDK 1.1) was on the stack.
  2. The class loader depth -- how far down the stack was the most recent occurrence of a method from a class defined using a class loader.

These types of decisions were made by calling the SecurityManager methods related to class loader existence and depth. For example, a typical 1.1-style security manager might have a checkExit method like the following:

     public void checkExit(int status) {
       if (inClassLoader()) {
        throw new SecurityException(..);
       }
     }

Such a checkExit method would not allow Runtime.exit to be called when any class defined with a class loader (an applet) was on the stack. This is an example of the first case, checking whether or not a class with a class loader is on the stack. An example of the second case (class loader depth) would be something like:

      public void checkCreateClassLoader() {
         if (classLoaderDepth() == 2) {
            throw new SecurityException();
         }
      }

This method is saying that the class loader depth can't be 2. That is, the method that called the method that called checkCreateClassLoader must not be in a class defined with a class loader. For example, the constructor for java.lang.ClassLoader calls checkCreateClassLoader, which means the method that calls the constructor for java.lang.ClassLoader must not have a class loader. This means applets can't directly create class loaders.

Note that there is a big difference between the two methods, even though both attempt to prevent applets from performing actions. In the first case, checkExit will throw an exception if an applet is anywhere on the stack. That means even built-in JDK code can't exit the VM if it was called from an applet. In the second case, JDK code is allowed to create a class loader, even if it was called by an applet. That is because the depth of a class with a class loader is used, and not the fact that there is one.

Security Managers in the Java SE JDK

In the JDK, the class java.lang.SecurityManager had a number of changes made to it in order to allow it to be used as the default security manager for applications. In particular:
  • It is no longer an abstract class, and can thus be installed as-is.
  • Most check methods call a new checkPermission method, which by default calls the method of the same name (checkPermission) in the new AccessController class. Those methods that don't call checkPermission have reasonable defaults.
  • Methods used in JDK 1.1 to determine if a class loader is on the stack and/or to calculate class loader depth have been modified in the JDK to ignore system class loaders and security contexts that have been granted java.security.AllPermission.

Installing java.lang.SecurityManager as the Default Security Manager

Since java.lang.SecurityManager is no longer abstract, you can install and use it as the default security manager. You can do this by setting a system property when launching the VM:

    java -Djava.security.manager YourApp
Alternatively, your application can install it directly via the following line of code:
    System.setSecurityManager(new SecurityManager());
You can customize the behavior of the default security manager by modifying policy files. See the security guide on policy files for more information.

Changes to Methods For Class Loaders And Class Loader Depth

In the JDK, the SecurityManager methods related to class loaders and class loader depth are not called by any of the check methods, and they are deprecated. They should not be used by any new security managers, and it is recommended that their use be eliminated from existing security managers as well. However, they are left in for backward compatibility and they have been modified in an attempt to enable old 1.1-style security managers to still work under the JDK, without modification.

These methods are:

  • currentClassLoader
  • currentLoadedClass
  • inClassLoader
  • classLoaderDepth

Modification of Class Loader/Depth-related Methods

The class loader/depth related methods have all been modified in three ways:

  1. These methods skip system class loaders. A system class loader is defined as being a class loader that is equal to the system class loader (as returned by ClassLoader.getSystemClassLoader) or one of its ancestors.

    Since classes loaded by the system class loader include application classes (loaded off of CLASSPATH), extension classes, and the built-in JDK classes, this modification enables these methods to ignore such code.

    Note that if you run an application that installs a custom security manager, and that security manager is loaded off of CLASSPATH in the JDK, it will have a system class loader associated with it. (Application classes did not have a class loader in JDK 1.1.) If you were to call a method like classLoaderDepth from within the custom security manager, and that method were not modified to ignore classes loaded by a system class loader, it would always return 0, which would not be very useful. Similarly, if class loader methods weren't changed to skip system classes and a custom security manager was loaded off of CLASSPATH, then this might also open up security holes in cases where the security manager is making decisions based on, for example, disallowing an operation if "classLoaderDepth() == 2". (It should really be "classLoaderDepth() <= 2".)

  2. These methods stop checking after they reach a method on the stack that has been marked as "privileged." (See java.security.AccessController.doPrivileged() and API for Privileged Blocks.)
  3. These methods treat security contexts that have been granted AllPermission as if there is no class loader on the stack.

As an example of the use of the first two modifications, note that there are now places in the JDK that open files, etc., after a security manager has been installed. Some 1.1-style security managers have a checkRead method that looks like the following:

       public void checkRead(String file) {
         if (inClassLoader()) {
          throw new SecurityException(..);
         }
       }

Without JDK code modifications, such a check run in the JDK would cause a security exception to be thrown when the JDK itself tries to read a file and there is a class with a non-system class loader on the stack. With the new security model, all such JDK code that tries to perform an operation that its caller might not be allowed to do has a doPrivileged block around it. Since inClassLoader just examines the stack up to and including the frame containing the "privileged" code, and the code at the top of the stack is JDK code, which is loaded by the system class loader or one of its ancestors, the inClassLoader method will return false, allowing the read to occur.

Maintenance of Class Loader Depths

As noted previously, security managers based on the 1.1 applet security manager based some of their access control decisions on class loader depth. As an example, the checkCreateClassLoader method previously presented is repeated here:

       public void checkCreateClassLoader() {
          if (classLoaderDepth() == 2) {
             throw new SecurityException();
          }
       }
In the JDK we have attempted to maintain the stack depth as used in 1.1-style security managers. For example, the constructor for java.security.SecureClassLoader has an explicit call to SecurityManager.checkCreateClassLoader even though the constructor for its super class (ClassLoader) also does. If the check was not placed in the constructor for SecureClassLoader, then a 1.1-style security manager would allow untrusted code to extend SecureClassLoader and construct class loaders, as the class loader depth would always be greater than 2.

How to Port 1.1-Style Security Managers

First and foremost, we highly recommend analyzing all your custom security manager methods before running your security manager under the JDK. Failure to do so could result in a security hole or prevent the proper operation of the JDK. This is due to the fragile nature of 1.1-style security managers.

Where possible, you should just use the default implementation of the 1.2 SecurityManager. This helps give users and administrators consistent behavior. If this is not possible, then you should at least try to call super.checkXXX in your checkXXX method before throwing a security exception. Doing so will allow the access controller algorithm to be used, and will allow the JDK itself to function correctly.

In the JDK, any existing code that used to call any of the SecurityManager check methods continues to do so. For new code that requires a security check, calls are made to SecurityManager.checkPermission instead of adding a new SecurityManager check method. For example, the new java.lang.System.setProperty method calls checkPermission with a java.util.PropertyPermission permission.

When extending the SecurityManager class and overriding existing methods, some care should be taken. For example, if you override the checkRead(String file) method so it always throws a security exception, then the JDK itself may fail to operate properly. That is, if some JDK code needs to open a file (to read a properties file, load a JAR file, etc.) then throwing a security exception for every read attempt would cause such opens to always fail.

In general, you should only override the default methods if you intend to loosen security, not to make it stronger. If you want to tighten security, you should modify the default policy files and/or install a custom java.security.Policy object. See the security guide on policy files for more information.

In general, when overriding security manager methods you should place a call to the super.checkXXX method at the point where your overridden checkXXX method would throw an exception. For example:

      public class MySecurityManager extends SecurityManager {

        public void checkRead(String file) {
          if (someCustomSecurityCheckFails()) {
             super.checkRead(file);
          }
        }
      }
If your custom security check fails, then super.checkRead gets called. The default implementation of checkRead invokes checkPermission, which by default consults the AccessController. By invoking the AccessController, system code that has done an AccessController.doPrivileged before trying to read a file will succeed in reading that file. All other code will be subjected to the current policy in effect, and an access control exception will be thrown if access to that file has not been granted.

Note, there are some checkXXX methods in which you should not call super.checkXXX methods when overriding them. That is because the default implementation of these methods may not be as strict as the policy you are implementing in the overridden method. For example, the default checkAccess(ThreadGroup g) method only protects the system thread group. If you intend to protect threads in distinct thread groups from each other (for example applet thread groups), then you would not want to call super.checkAccess at the point you would normally throw a security exception, as that would defeat the purpose of your customized check. Instead, you could place a call to super.checkAccess as the first statement in your overridden method.

For example:

      public class AppletSecurityManager extends SecurityManager {

        public void checkAccess(ThreadGroup g) {
          // a call to super will throw an exception if someone
          // is trying to modify the system thread group
          super.checkAccess(g);
          ...
          // now perform checks based on which applet thread group
          // the current caller is in to see if they can modify thread group g.
          ...
      }

We describe how to override each method in the following section.

SecurityManager Method Changes and Override Advice

This section lists changes made to java.lang.SecurityManager methods in the JDK and provides suggestions regarding any overrides you may wish to make. Please see the Java documentation for the SecurityManager class for more information on these methods.

protected boolean inCheck

This field has been deprecated, and any uses of this field within the JDK itself have been removed. Instead of using inCheck, you should use checkPermission along with doPrivileged.

public boolean getInCheck();

This method has also been deprecated.

public SecurityManager();

The constructor has been modified to allow multiple SecurityManagers to be created, assuming the caller has the RuntimePermission("createSecurityManager") permission.

protected native Class[] getClassContext();

No changes. This call can be used to emulate the 1.1 behavior of the methods that have been changed in the JDK ( currentClassLoader, currentLoadedClass, classLoaderDepth, inClassLoader).

protected ClassLoader currentClassLoader();

The typical use of this method in JDK 1.1-style security managers was to see if there was a class loader on the stack, and if not, treat the code as "trusted" and allow it to do anything. This method has been modified in the JDK to allow trusted JDK code (actually any code granted java.security.AllPermission) that calls doPrivileged to be treated as trusted by 1.1-style security managers. It has also been modified to skip system class loaders. A system class loader is defined as being a class loader that is equal to the system class loader (as returned by ClassLoader.getSystemClassLoader) or one of its ancestors.

This method will return null in the following three cases:

  1. All methods on the execution stack are from classes defined using the system class loader or one of its ancestors.
  2. All methods on the execution stack up to the first "privileged" caller (see java.security.AccessController.doPrivileged) are from classes defined using the system class loader or one of its ancestors.
  3. A call to checkPermission with java.security.AllPermission does not result in a SecurityException.

This method has been deprecated. Use checkPermission instead.

protected Class currentLoadedClass();

This method has been modified in the same fashion as currentClassLoader, and will return null if the current security context has been granted AllPermission or all the methods on the stack (up to the first privileged caller, if any) are from classes defined using the system class loader or one of its ancestors.

This method has been deprecated. Use checkPermission instead.

protected int classDepth(String name);

No changes in behavior. This method has been deprecated. Use checkPermission instead.

protected int classLoaderDepth();

This method has been modified in the same fashion as currentClassLoader, and will return -1 if the current security context has been granted AllPermission or all the methods on the stack (up to the first privileged caller, if any) are from classes defined using the system class loader or one of its ancestors.

This method has been deprecated. Use checkPermission instead.

protected boolean inClass(String name);

No changes in behavior. This method has been deprecated. Use checkPermission instead.

protected boolean inClassLoader();

This method returns true if currentClassLoader returns a non-null class loader, so it follows the same semantics that currentClassLoader does.

This method has been deprecated. Use checkPermission instead.

public Object getSecurityContext();

This method returns a java.security.AccessControlContext object that is created with a call to java.security.AccessController.getContext. In JDK1.1 it returned null by default.

public void checkPermission(Permission perm);

This method is new in the JDK. It calls java.security.AccessController.checkPermission with the given permission. Internally, the JDK always calls SecurityManager.checkPermission instead of calling the AccessController directly. This allows people to override this method to provide additional functionality such as auditing and/or GUI dialogs.

public void checkPermission(Permission perm, Object context);

This method is new in the JDK. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the specified permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

public void checkCreateClassLoader();

This method has been modified to call checkPermission with the RuntimePermission("createClassLoader") permission.

If this method is overridden, then a call to super.checkCreateClassLoader should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkCreateClassLoader() {
      if (someCustomSecurityCheckFails()) {
        super.checkCreateClassLoader();
      }
    }
  }

public void checkAccess(Thread t);

If the thread argument is a system thread (belongs to the thread group with a null parent) then this method calls checkPermission with the RuntimePermission("modifyThread") permission.

Applications that want a stricter policy should override this method.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

If this method is overridden, the method that overrides it should additionally check to see if the calling thread has the RuntimePermission("modifyThread") permission, and if so, return silently. This is to ensure that code granted that permission (such as the JDK itself) is allowed to manipulate any thread.

For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccess(Thread t) {
      // a call to super will throw an exception if someone
      // is trying to modify a system thread
      super.checkAccess(t);
      ...
      if (someCustomSecurityCheckForOtherThreadsFails()) {
        // if the check fails, instead of throwing an exception,
        // call checkPermission, which will throw an exception
        // if need be
        checkPermission(new RuntimePermission("modifyThread"));
      }
      ...
    }
  }

public void checkAccess(ThreadGroup g);

If the thread group argument is the system thread group (has a null parent) then this method calls checkPermission with the RuntimePermission("modifyThreadGroup") permission.

Applications that want a stricter policy should override this method.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

If this method is overridden, the method that overrides it should additionally check to see if the caller has the RuntimePermission("modifyThreadGroup") permission, and if so, return silently. This is to ensure that code granted that permission (such as the JDK itself) is allowed to manipulate any thread group.

For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccess(ThreadGroup g) {
      // a call to super will throw an exception if someone
      // is trying to modify the system thread group
      super.checkAccess(g);
      ...
      if (someCustomSecurityCheckForOtherThreadGroupsFails()) {
        // if the check fails, instead of throwing an exception,
        // call checkPermission, which will throw an exception
        // if need be
        checkPermission(new RuntimePermission("modifyThreadGroup"));
      }
      ...
    }
  }

public void checkExit(int status);

This method has been modified to call checkPermission with the RuntimePermission("exitVM") permission.

If this method is overridden, then a call to super.checkExit should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkExit(int status) {
      if (someCustomSecurityCheckFails()) {
        super.checkExit(status);
      }
    }
  }

public void checkExec(String cmd);

This method has been modified to call checkPermission with a FilePermission. If the cmd is an absolute path (see java.io.File.isAbsolute) then it is passed as-is as the target for the FilePermission. If cmd is not absolute, then the special target "<<ALL FILES>>" is used. This target is used because it is difficult to determine the actual path of the command that will be executed on an individual platform due to things such as environment variables, etc.

If this method is overridden, then a call to super.checkExec should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkExec(String cmd) {
      if (someCustomSecurityCheckFails()) {
        super.checkExec(cmd);
      }
    }
  }

public void checkLink(String lib);

This method has been modified to call checkPermission with the RuntimePermission("loadLibrary."+lib) permission.

If this method is overridden, then a call to super.checkLink should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkLink(String lib) {
      if (someCustomSecurityCheckFails()) {
        super.checkLink(lib);
      }
    }
  }

public void checkRead(FileDescriptor fd);

This method has been modified to call checkPermission with the RuntimePermission("readFileDescriptor") permission.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(FileDescriptor fd) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(fd);
      }
    }
  }

public void checkRead(String file);

This method has been modified to call checkPermission with the FilePermission(file,"read") permission.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(file);
      }
    }
  }

public void checkRead(String file, Object context);

This method has been modified. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the FilePermission(file,"read") permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(String file, Object context) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(file, context);
      }
    }
  }

public void checkWrite(FileDescriptor fd);

This method has been modified to call checkPermission with the RuntimePermission("writeFileDescriptor") permission.

If this method is overridden, then a call to super.checkWrite should be made at the point the overridden method would normally throw an exception. For Example:

  public class MySecurityManager extends SecurityManager {

    public void checkWrite(FileDescriptor fd) {
      if (someCustomSecurityCheckFails()) {
        super.checkWrite(fd);
      }
    }
  }

public void checkWrite(String file);

This method has been modified to call checkPermission with the FilePermission(file,"write") permission.

If this method is overridden, then a call to super.checkWrite should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkWrite(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkWrite(file);
      }
    }
  }

public void checkDelete(String file);

This method has been modified to call checkPermission with the FilePermission(file,"delete") permission.

If this method is overridden, then a call to super.checkDelete should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkDelete(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkDelete(file);
      }
    }
  }

public void checkConnect(String host, int port);

This method has been modified to call checkPermission with the SocketPermission(host+":"+port,"connect") permission if the port is not equal to -1. If the port is equal to -1, then it calls checkPermission with the SocketPermission(host,"resolve") permission.

This behavior is consistent with JDK 1.1, where a port equal to -1 indicates that an IP address lookup is being performed.

If this method is overridden, then a call to super.checkConnect should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkConnect(String host, int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkConnect(host, port);
      }
    }
  }

public void checkConnect(String host, int port, Object context);

This method has been modified. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the SocketPermission(host+":"+port,"connect") permission if the port is not equal to -1. If the port is equal to -1, then it calls checkPermission with the SocketPermission(host,"resolve") permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

If this method is overridden, then a call to super.checkConnect should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkConnect(String host, int port, Object context) {
      if (someCustomSecurityCheckFails()) {
        super.checkConnect(host, port, context);
      }
    }
  }

public void checkListen(int port)

This method has been modified. If port is not 0, it calls checkPermission with the SocketPermission("localhost:"+port,"listen"). If port is zero, it calls checkPermission with SocketPermission("localhost:1024-","listen").

If this method is overridden, then a call to super.checkListen should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkListen(int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkListen(port);
      }
    }
  }

public void checkAccept(String host, int port);

This method has been modified to call checkPermission with the SocketPermission(host+":"+port,"accept") permission.

If this method is overridden, then a call to super.checkAccept should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccept(String host, int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkAccept(host, port);
      }
    }
  }

public void checkMulticast(InetAddress maddr);

This method has been modified to call checkPermission with the SocketPermission(maddr.getHostAddress(),"accept,connect") permission.

If this method is overridden, then a call to super.checkMulticast should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkMultiCast(InetAddress maddr) {
      if (someCustomSecurityCheckFails()) {
        super.checkMultiCast(maddr);
      }
    }
  }

public void checkMulticast(InetAddress maddr, byte ttl);

This method has been modified to call checkPermission with the SocketPermission(maddr.getHostAddress(),"accept,connect") permission.

If this method is overridden, then a call to super.checkMulticast should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkMultiCast(InetAddress maddr, byte ttl) {
      if (someCustomSecurityCheckFails()) {
        super.checkMultiCast(maddr, ttl);
      }
    }
  }

public void checkPropertiesAccess();

This method has been modified to call checkPermission with the PropertyPermission("*", "read,write") permission.

If this method is overridden, then a call to super.checkPropertiesAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPropertiesAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkPropertiesAccess();
      }
    }
  }

public void checkPropertyAccess(String key);

This method has been modified to call checkPermission with the PropertyPermission(key, "read") permission.

If this method is overridden, then a call to super.checkPropertyAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPropertyAccess(String key) {
      if (someCustomSecurityCheckFails()) {
        super.checkPropertiesAccess(key);
      }
    }
  }

public boolean checkTopLevelWindow(Object window);

This method has been modified to call checkPermission with the AWTPermission("showWindowWithoutWarningBanner") permission, and returns true if an SecurityException is not thrown, otherwise it returns false.

If this method is overridden, then a call to super.checkTopLevelWindow should be made at the point the overridden method would normally return false, and the value of super.checkTopLevelWindow should be returned. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkTopLevelWindow(Object window) {
      if (someCustomSecurityCheckFails()) {
        return super.checkTopLevelWindow(window);
      } else {
        return true;
      }
    }
  }

public void checkPrintJobAccess();

This method has been modified to call checkPermission with the RuntimePermission("queuePrintJob") permission.

If this method is overridden, then a call to super.checkPrintJobAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPrintJobAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkPrintJobAccess();
      }
    }
  }

public void checkSystemClipboardAccess();

This method has been modified to call checkPermission with the AWTPermission("accessClipboard") permission.

If this method is overridden, then a call to super.checkSystemClipboardAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSystemClipboardAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkSystemClipboardAccess();
      }
    }
  }

public void checkAwtEventQueueAccess();

This method has been modified to call checkPermission with the AWTPermission("accessEventQueue") permission.

If this method is overridden, then a call to super.checkAwtEventQueueAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAwtEventQueueAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkAwtEventQueueAccess();
      }
    }
  }

public void checkPackageAccess(String pkg);

This method has been modified. It first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.access"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("accessClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageAccess should be called as the first line in the overridden method. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPackageAccess(String pkg) {
      super.checkPackageAccess(pkg);
      ...
      someCustomSecurityCheck();
      ...
    }
  }

public void checkPackageDefinition(String pkg);

This method has been modified. It first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.definition"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("defineClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageDefinition should be called as the first line in the overridden method. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPackageDefinition(String pkg) {
      super.checkPackageDefinition(pkg);
      ...
      someCustomSecurityCheck();
      ...
    }
  }

public void checkSetFactory();

This method has been modified to call checkPermission with the RuntimePermission("setFactory") permission.

If this method is overridden, then a call to super.checkSetFactory should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSetFactory() {
      if (someCustomSecurityCheckFails()) {
        super.checkSetFactory();
      }
    }
  }

public void checkMemberAccess(Class clazz, int which);

This method has been modified. The default policy is to allow access to PUBLIC members, as well as access to classes that have the same class loader as the caller. In all other cases call checkPermission with the RuntimePermission("accessDeclaredMembers") permission.

If this method is overridden, then a call to super.checkMemberAccess cannot be made, as the default implementation of checkMemberAccess relies on the code being checked being at a stack depth of 4. For example:

     someCaller[3]
     java.lang.Class.someReflectionAPI [2]
     java.lang.Class.checkMemberAccess [1]
     SecurityManager.checkMemberAccess [0]
In order to emulate this behavior, you would need to call getClassContext, and examine the class loader of the class at index 3, just as the default checkMemberAccess method does:
  if (which != Member.PUBLIC) {
    Class stack[] = getClassContext();
    /*
     * stack depth of 4 should be the caller of one of the
     * methods in java.lang.Class that invoke checkMember
     * access. The stack should look like:
     *
     * someCaller [3]
     * java.lang.Class.someReflectionAPI  [2]
     * java.lang.Class.checkMemberAccess [1]
     * MySecurityManager.checkMemberAccess [0]
     *
     */
    if ((stack.length<4) ||
      (stack[3].getClassLoader() != clazz.getClassLoader())) {
      if (checkMemberAccessPermission == null)
        checkMemberAccessPermission =
          new RuntimePermission("accessDeclaredMembers");
      checkPermission(checkMemberAccessPermission);
    }
  }

This is the only security manager method in the JDK that is still based on a caller's depth. This is to allow a caller to reflect on classes from the same class loader it came from.

public void checkSecurityAccess(String target);

This method has been modified to create a SecurityPermission object for the given permission target name and calls checkPermission with it.

If this method is overridden, then a call to super.checkSecurityAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSecurityAccess(String target) {
      if (someCustomSecurityCheckFails()) {
        super.checkSecurityAccess(target);
      }
    }
  }

public ThreadGroup getThreadGroup();

This method has not been changed.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Signature Time Stamp Support

Documentation Contents

Signature Timestamp Support

Introduction

This document describes the enhancements that have been added in Java SE 5.0 to support signature timestamps.

Prior to Java SE 5.0, the signature generated by jarsigner contained no information about when the signature was generated. With no other information available, systems/deployers (including users of the Java Plug-in) often based their validity assessment of a signed JAR file on the validity of the signing certificate. When the signing certificate expires, systems/deployers conclude that the signature, and hence, the JAR file, has expired. Because signing certificates typically expire annually, this caused customers significant problems by forcing them to re-sign deployed JAR files annually.

Starting in Java SE 5.0, jarsigner can generate signatures that include a timestamp, thus enabling systems/deployer (including Java Plug-in) to check whether the JAR file was signed while the signing certificate was still valid. In addition, APIs were added in Java SE 5.0 to allow applications to obtain the timestamp information.

The following time-of-signing enhancements and additions are supported in version 5.0 of the JavaSE platform:

  • Jarsigner Enhancements
  • Java Plug-in Enhancements
  • API Enhancements

Jarsigner Enhancements

The jarsigner tool can now generate and store a signature timestamp when signing a JAR file. In addition, jarsigner supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through the options described below.

Jarsigner Timestamp Options

The following options were added to the jarsigner tool to support signature timestamps:

-tsa url

If "-tsa http://example.tsa.url" appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, http://example.tsa.url, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the -tsacert option. The -tsa option does not require the TSA's public key certificate to be present in the keystore.

To generate the timestamp, jarsigner communicates with the TSA using the Time-Stamp Protocol (TSP) defined in RFC 3161. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file.

-tsacert alias

If "-tsacert alias" appears on the command line when signing a JAR file then a timestamp is generated for the signature. The alias identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA.

The TSA's public key certificate must be present in the keystore when using -tsacert.

Alternative Signing Options

Specifying an Alternative Signing Mechanism

-altsigner class Specifies that an alternative signing mechanism be used. The fully-qualified class name identifies a class file that extends the com.sun.jarsigner.ContentSigner abstract class. The path to this class file is defined by the -altsignerpath option. If the -altsigner option is used, jarsigner uses the signing mechanism provided by the specified class. Otherwise, jarsigner uses its default signing mechanism.

For example, to use the signing mechanism provided by a class named com.sun.sun.jarsigner.AuthSigner, use the jarsigner option "-altsigner com.sun.jarsigner.AuthSigner"

Specifying Path to Alternative Signing Mechanism

-altsignerpath classpathlist Specifies the path to the class file (the class file name is specified with the -altsigner option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below.

An absolute path or a path relative to the current directory may be specified. If classpathlist contains multiple paths or JAR files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the class is already in the search path.

Example of specifying the path to a jar file that contains the class file:

-altsignerpath /home/user/lib/authsigner.jar

Note that the JAR file name is included.

Example of specifying the path to the jar file that contains the class file:

-altsignerpath /home/user/classes/com/sun/tools/jarsigner/

Note that the JAR file name is omitted.

Java Plug-in Enhancements

In Java SE 5.0, the Java Plug-in was enhanced to check signature timestamps (if available) when validating JAR files. The Java Plug-in will no longer present a dialog when it encounters an expired or revoked certificate when validating a signed jar, provided that the signature timestamp confirms that the signature was generated prior to the expiration or revocation date.

The TSA's certificate must be available from the Plug-in's keystore or certificate stores when the Plug-in is validating a JAR file containing a signature timestamp.

The Plugin reverts to 1.4.x behavior if the signature does not contain a timestamp.

API Enhancements

The security and JAR APIs were enhanced to enable applications to access timestamp information.

Two new classes were added to the java.security package. These classes are CodeSigner, which maintains information associated with a signer, and Timestamp, which represents information associated with a signature timestamp.

New methods were added to the java.security.CodeSource class and java.util.jar.JarEntry class to allow access to this new, optional information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Standard Algorithm Name Documentation

Documentation Contents

Java Cryptography Architecture
Standard Algorithm Name Documentation for JDK 8

  • Standard Names
    • AlgorithmParameterGenerator Algorithms
    • AlgorithmParameters Algorithms
    • CertificateFactory Types
    • CertPathBuilder Algorithms
    • CertPath Encodings
    • CertPathValidator Algorithms
    • CertStore Types
    • Cipher (Encryption) Algorithms
    • Configuration Types
    • Exemption Mechanisms
    • GSSAPI Mechanisms
    • KeyAgreement Algorithms
    • KeyFactory Algorithms
    • KeyGenerator Algorithms
    • KeyManagerFactory Algorithms
    • KeyPairGenerator Algorithms
    • KeyStore Types
    • Mac Algorithms
    • MessageDigest Algorithms
    • Policy Types
    • SaslClient Mechanisms
    • SaslServer Mechanisms
    • SecretKeyFactory Algorithms
    • SecureRandom Number Generation (RNG) Algorithms
    • Service Attributes
    • Signature Algorithms
    • SSLContext Algorithms
    • TrustManagerFactory Algorithms
    • XML Signature (XMLSignatureFactory/KeyInfoFactory/TransformService) Mechanisms
    • XML Signature Transform (TransformService) Algorithms
    • JSSE Cipher Suite Names
    • Additional JSSE Standard Names
  • Algorithms
    • Specification Template
    • Algorithm Specifications
  • Implementation Requirements

Note: The Oracle Providers Documentation contains specific provider and algorithm information.

Standard Names

The JDK Security API requires and uses a set of standard names for algorithms, certificate and keystore types. This specification establishes the following names as standard names.

In some cases naming conventions are given for forming names that are not explicitly listed, to facilitate name consistency across provider implementations. Items in angle brackets (such as <digest> and <encryption>) are placeholders to be replaced by a specific message digest, encryption algorithm, or other name.

Note: Standard names are not case-sensitive.

This document includes corresponding lists of standard names relevant to the following security subareas:

  • Java PKI Programmer's Guide
  • JSSE Reference Guide
  • For standard name specifications, See Algorithms.
  • Cryptography Architecture
  • Single Sign-on Using Kerberos in Java
  • The Java SASL API Programming and Deployment Guide
  • The XML Digital Signature API Specification

AlgorithmParameterGenerator Algorithms

The algorithm names in this section can be specified when generating an instance of AlgorithmParameterGenerator.

Algorithm Name | Description
DiffieHellman | Parameters for use with the Diffie-Hellman algorithm.
DSA | Parameters for use with the Digital Signature Algorithm.

AlgorithmParameters Algorithms

The algorithm names in this section can be specified when generating an instance of AlgorithmParameters.

Algorithm Name | Description
AES | Parameters for use with the AES algorithm.
Blowfish | Parameters for use with the Blowfish algorithm.
DES | Parameters for use with the DES algorithm.
DESede | Parameters for use with the DESede algorithm.
DiffieHellman | Parameters for use with the DiffieHellman algorithm.
DSA | Parameters for use with the Digital Signature Algorithm.
OAEP | Parameters for use with the OAEP algorithm.
PBEWith<digest>And<encryption> | Parameters for use with the PBEWith<digest>And<encryption> algorithm. Examples: PBEWithMD5AndDES, and PBEWithHmacSHA1AndDESede.
PBE | Parameters for use with the PBE algorithm. This name should not be used, in preference to the more specific PBE-algorithm names previously listed.
RC2 | Parameters for use with the RC2 algorithm.

CertificateFactory Types

The type in this section can be specified when generating an instance of CertificateFactory.

Type | Description
X.509 | The certificate type defined in X.509, also available via RFC 3280

CertPathBuilder Algorithms

The algorithm in this section can be specified when generating an instance of CertPathBuilder.

Algorithm Name | Description
PKIX | The PKIX certification path validation algorithm as defined in the ValidationAlgorithm service attribute. The output of CertPathBuilder instances implementing this algorithm is a certification path validated against the PKIX validation algorithm.

CertPath Encodings

The following encodings may be passed to the getEncoded method of CertPath or the generateCertPath(InputStream inStream, String encoding) method of CertificateFactory.

Encoding | Description
PKCS7 | A PKCS#7 SignedData object, with the only significant field being certificates. In particular, the signature and the contents are ignored. If no certificates are present, a zero-length CertPath is assumed. Warning: PKCS#7 does not maintain the order of certificates in a certification path. This means that if a CertPath is converted to PKCS#7 encoded bytes and then converted back, the order of the certificates may change, potentially rendering the CertPath invalid. Users should be aware of this behavior. See RSA Security for details on PKCS7.
PkiPath an ASN.1 DER encoded sequence of certificates, defined as follows:
    PkiPath ::= SEQUENCE OF Certificate
Within the sequence, the order of certificates is such that the subject of the first certificate is the issuer of the second certificate, and so on. Each certificate in PkiPath shall be unique. No certificate may appear more than once in a value of Certificate in PkiPath. The PkiPath format is defined in defect report 279 against X.509 (2000) and is incorporated into Technical Corrigendum 1 (DTC 2) for the ITU-T Recommendation X.509 (2000). See the ITU web site for details.

CertPathValidator Algorithms

The algorithm in this section can be specified when generating an instance of CertPathValidator.

Algorithm Name | Description
PKIX | The PKIX certification path validation algorithm as defined in the ValidationAlgorithm service attribute.

CertStore Types

The type in this section can be specified when generating an instance of CertStore.

Type | Description
Collection | A CertStore implementation that retrieves certificates and CRLs from a Collection. This type of CertStore is particularly useful in applications where certificates or CRLs are received in a bag or some sort of attachment, such as with a signed email message or in an SSL negotiation.
LDAP | A CertStore implementation that fetches certificates and CRLs from an LDAP directory using the schema defined in the LDAPSchema service attribute.

Cipher (Encryption) Algorithms

Cipher Algorithm Names

The following names can be specified as the algorithm component in a transformation when requesting an instance of Cipher.

Algorithm Name | Description
AES

Advanced Encryption Standard as specified by NIST in FIPS 197. Also known as the Rijndael algorithm by Joan Daemen and Vincent Rijmen, AES is a 128-bit block cipher supporting keys of 128, 192, and 256 bits.

To use the AES cipher with only one valid key size, use the format AES_<n>, where <n> can be 128, 192, or 256.
AESWrap

The AES key wrapping algorithm as described in RFC 3394.

To use the AESWrap cipher with only one valid key size, use the format AESWrap_<n>, where <n> can be 128, 192, or 256.
ARCFOUR | A stream cipher believed to be fully interoperable with the RC4 cipher developed by Ron Rivest. For more information, see K. Kaukonen and R. Thayer, "A Stream Cipher Encryption Algorithm 'Arcfour'", Internet Draft (expired), draft-kaukonen-cipher-arcfour-03.txt.
Blowfish | The Blowfish block cipher designed by Bruce Schneier.
DES | The Digital Encryption Standard as described in FIPS PUB 46-3.
DESede | Triple DES Encryption (also known as DES-EDE, 3DES, or Triple-DES). Data is encrypted using the DES algorithm three separate times. It is first encrypted using the first subkey, then decrypted with the second subkey, and encrypted with the third subkey.
DESedeWrap | The DESede key wrapping algorithm as described in RFC 3217 .
ECIES | Elliptic Curve Integrated Encryption Scheme
PBEWith<digest>And<encryption> PBEWith<prf>And<encryption> The password-based encryption algorithm found in (PKCS5), using the specified message digest (<digest>) or pseudo-random function (<prf>) and encryption algorithm (<encryption>). Examples:
  • PBEWithMD5AndDES: The password-based encryption algorithm as defined in RSA Laboratories, "PKCS #5: Password-Based Encryption Standard," version 1.5, Nov 1993. Note that this algorithm implies CBC as the cipher mode and PKCS5Padding as the padding scheme and cannot be used with any other cipher modes or padding schemes.
  • PBEWithHmacSHA1AndDESede: The password-based encryption algorithm as defined in RSA Laboratories, "PKCS #5: Password-Based Cryptography Standard," version 2.0, March 1999.
RC2 | Variable-key-size encryption algorithms developed by Ron Rivest for RSA Data Security, Inc.
RC4 | Variable-key-size encryption algorithms developed by Ron Rivest for RSA Data Security, Inc. (See note prior for ARCFOUR.)
RC5 | Variable-key-size encryption algorithms developed by Ron Rivest for RSA Data Security, Inc.
RSA | The RSA encryption algorithm as defined in PKCS #1

Cipher Algorithm Modes

The following names can be specified as the mode component in a transformation when requesting an instance of Cipher.

Algorithm Name | Description
NONE | No mode.
CBC | Cipher Block Chaining Mode, as defined in FIPS PUB 81.
CCM | Counter/CBC Mode, as defined in NIST Special Publication SP 800-38C.
CFB, CFBx | Cipher Feedback Mode, as defined in FIPS PUB 81. Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher's actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the "DES/CFB8/NoPadding" and "DES/OFB32/PKCS5Padding" transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8-bit mode such as CFB8 or OFB8.
CTR | A simplification of OFB, Counter mode updates the input block as a counter.
CTS | Cipher Text Stealing, as described in Bruce Schneier's book Applied Cryptography-Second Edition, John Wiley and Sons, 1996.
ECB | Electronic Codebook Mode, as defined in FIPS PUB 81.
GCM | Galois/Counter Mode, as defined in NIST Special Publication SP 800-38D.
OFB, OFBx | Output Feedback Mode, as defined in FIPS PUB 81. Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher's actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the "DES/CFB8/NoPadding" and "DES/OFB32/PKCS5Padding" transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8-bit mode such as CFB8 or OFB8.
PCBC | Propagating Cipher Block Chaining, as defined by Kerberos V4.

Cipher Algorithm Padding

The following names can be specified as the padding component in a transformation when requesting an instance of Cipher.

Algorithm Name | Description
NoPadding | No padding.
ISO10126Padding | This padding for block ciphers is described in 5.2 Block Encryption Algorithms in the W3C's "XML Encryption Syntax and Processing" document.
OAEPPadding, OAEPWith<digest>And<mgf>Padding Optimal Asymmetric Encryption Padding scheme defined in PKCS1, where <digest> should be replaced by the message digest and <mgf> by the mask generation function. Examples: OAEPWithMD5AndMGF1Padding and OAEPWithSHA-512AndMGF1Padding.

If OAEPPadding is used, Cipher objects are initialized with a javax.crypto.spec.OAEPParameterSpec object to supply values needed for OAEPPadding.
PKCS1Padding | The padding scheme described in PKCS #1, used with the RSA algorithm.
PKCS5Padding | The padding scheme described in RSA Laboratories, "PKCS #5: Password-Based Encryption Standard," version 1.5, November 1993.
SSL3Padding The padding scheme defined in the SSL Protocol Version 3.0, November 18, 1996, section 5.2.3.2 (CBC block cipher):
    block-ciphered struct {
        opaque content[SSLCompressed.length];
        opaque MAC[CipherSpec.hash_size];
        uint8 padding[
            GenericBlockCipher.padding_length];
        uint8 padding_length;
    } GenericBlockCipher;
The size of an instance of a GenericBlockCipher must be a multiple of the block cipher's block length.

The padding length, which is always present, contributes to the padding, which implies that if:
    sizeof(content) + sizeof(MAC) % block_length = 0,
padding has to be (block_length - 1) bytes long, because of the existence of padding_length.

This makes the padding scheme similar (but not quite) to PKCS5Padding, where the padding length is encoded in the padding (and ranges from 1 to block_length). With the SSL scheme, the sizeof(padding) is encoded in the always present padding_length and therefore ranges from 0 to block_length-1.

Configuration Types

The type in this section can be specified when generating an instance of javax.security.auth.login.Configuration.

Type | Description
JavaLoginConfig | The default Configuration implementation from the SUN provider, as described in the ConfigFile class specification. This type accepts java.security.URIParameter as a valid Configuration.Parameter type. If this parameter is not specified, then the configuration information is loaded from the sources described in the ConfigFile class specification. If this parameter is specified, the configuration information is loaded solely from the specified URI.

Exemption Mechanisms

The following exemption mechanism names can be specified in the permission policy file that accompanies an application considered "exempt" from cryptographic restrictions.

Algorithm Name | Description
KeyEscrow | An encryption system with a backup decryption capability that allows authorized persons (users, officers of an organization, and government officials), under certain prescribed conditions, to decrypt ciphertext with the help of information supplied by one or more trusted parties who hold special data recovery keys.
KeyRecovery | A method of obtaining the secret key used to lock encrypted data. One use is as a means of providing fail-safe access to a corporation's own encrypted information in times of disaster.
KeyWeakening | A method in which a part of the key can be escrowed or recovered.

GSSAPI Mechanisms

The following mechanisms can be specified when using GSSAPI. Note that Object Identifiers (OIDs) are specified instead of names to be consistent with the GSSAPI standard.

Mechanism OID | Description
1.2.840.113554.1.2.2 | The Kerberos v5 GSS-API mechanism defined in RFC 4121.
1.3.6.1.5.5.2 | The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism defined in RFC 4178.

KeyAgreement Algorithms

The following algorithm names can be specified when requesting an instance of KeyAgreement.

Algorithm Name | Description
DiffieHellman | Diffie-Hellman Key Agreement as defined in PKCS #3: Diffie-Hellman Key-Agreement Standard, RSA Laboratories, version 1.4, November 1993.
ECDH | Elliptic Curve Diffie-Hellman as defined in ANSI X9.63 and as described in RFC 3278: "Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)."
ECMQV | Elliptic Curve Menezes-Qu-Vanstone as defined in "Elliptic Curve Cryptography" from www.secg.org.

KeyFactory Algorithms

(Except as noted, these classes create keys for which Key.getAlgorithm() returns the standard algorithm name.)

The algorithm names in this section can be specified when generating an instance of KeyFactory.

Algorithm Name | Description
DiffieHellman | Keys for the Diffie-Hellman KeyAgreement algorithm. Note: key.getAlgorithm() will return "DH" instead of "DiffieHellman".
DSA | Keys for the Digital Signature Algorithm.
RSA | Keys for the RSA algorithm (Signature/Cipher).
EC | Keys for the Elliptic Curve algorithm.

KeyGenerator Algorithms

The following algorithm names can be specified when requesting an instance of KeyGenerator.

Algorithm Name | Description
AES | Key generator for use with the AES algorithm.
ARCFOUR | Key generator for use with the ARCFOUR (RC4) algorithm.
Blowfish | Key generator for use with the Blowfish algorithm.
DES | Key generator for use with the DES algorithm.
DESede | Key generator for use with the DESede (triple-DES) algorithm.
HmacMD5 | Key generator for use with the HmacMD5 algorithm.
HmacSHA1 HmacSHA224 HmacSHA256 HmacSHA384 HmacSHA512 | Keys generator for use with the various flavors of the HmacSHA algorithms.
RC2 | Key generator for use with the RC2 algorithm.

KeyManagerFactory Algorithms

The algorithm name in this section can be specified when generating an instance of KeyManagerFactory.

Algorithm Name | Description
PKIX | A factory for X509ExtendedKeyManagers that manage X.509 certificate-based key pairs for local side authentication according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. The KeyManagerFactory must support initialization using the class javax.net.ssl.KeyStoreBuilderParameters.

KeyPairGenerator Algorithms

(Except as noted, these classes create keys for which Key.getAlgorithm() returns the standard algorithm name.)

The algorithm names in this section can be specified when generating an instance of KeyPairGenerator.

Algorithm Name | Description
DiffieHellman | Generates keypairs for the Diffie-Hellman KeyAgreement algorithm. Note: key.getAlgorithm() will return "DH" instead of "DiffieHellman".
DSA | Generates keypairs for the Digital Signature Algorithm.
RSA | Generates keypairs for the RSA algorithm (Signature/Cipher).
EC | Generates keypairs for the Elliptic Curve algorithm.

KeyStore Types

The types in this section can be specified when generating an instance of KeyStore.

Type | Description
jceks | The proprietary keystore implementation provided by the SunJCE provider.
jks | The proprietary keystore implementation provided by the SUN provider.
dks | A domain keystore is a collection of keystores presented as a single logical keystore. It is specified by configuration data whose syntax is described in DomainLoadStoreParameter.
pkcs11 | A keystore backed by a PKCS #11 token.
pkcs12 | The transfer syntax for personal identity information as defined in PKCS #12.

Mac Algorithms

The following algorithm names can be specified when requesting an instance of Mac.

Algorithm Name | Description
HmacMD5 | The HMAC-MD5 keyed-hashing algorithm as defined in RFC 2104 "HMAC: Keyed-Hashing for Message Authentication" (February 1997).
HmacSHA1 HmacSHA224 HmacSHA256 HmacSHA384 HmacSHA512 | The HmacSHA* algorithms as defined in RFC 2104 "HMAC: Keyed-Hashing for Message Authentication" (February 1997) with SHA-* as the message digest algorithm.
PBEWith<mac> | Mac for use with the PKCS #5 v 2.0 password-based message authentication standard, where <mac> is a Message Authentication Code algorithm name. Example: PBEWithHmacSHA1.

MessageDigest Algorithms

The algorithm names in this section can be specified when generating an instance of MessageDigest.

Algorithm Name | Description
MD2 | The MD2 message digest algorithm as defined in RFC 1319.
MD5 | The MD5 message digest algorithm as defined in RFC 1321.
SHA-1 SHA-224 SHA-256 SHA-384 SHA-512 | Hash algorithms defined in the FIPS PUB 180-4. Secure hash algorithms - SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 - for computing a condensed representation of electronic data (message). When a message of any length less than 2^64 bits (for SHA-1, SHA-224, and SHA-256) or less than 2^128 (for SHA-384 and SHA-512) is input to a hash algorithm, the result is an output called a message digest. A message digest ranges in length from 160 to 512 bits, depending on the algorithm.

Policy Types

The type in this section can be specified when generating an instance of Policy.

Type | Description
JavaPolicy | The default Policy implementation from the SUN provider, as described in the PolicyFile guide. This type accepts java.security.URIParameter as a valid Policy.Parameter type. If this parameter is not specified, then the policy information is loaded from the sources described in the Default Policy File Locations section of the PolicyFile guide. If this parameter is specified, the policy information is loaded solely from the specified URI.

SaslClient Mechanisms

The mechanisms in this section can be specified when generating an instance of SaslClient.

Mechanism | Description
CRAM-MD5 | See RFC 2195. This mechanism supports a hashed user name/password authentication scheme.
DIGEST-MD5 | See RFC 2831. This mechanism defines how HTTP Digest Authentication can be used as a SASL mechanism.
EXTERNAL | See RFC 2222. This mechanism obtains authentication information from an external channel (such as TLS or IPsec).
GSSAPI | See RFC 2222. This mechanism uses the GSSAPI for obtaining authentication information. It supports Kerberos v5 authentication.
PLAIN | See RFC 2595. This mechanism supports cleartext user name/password authentication.

SaslServer Mechanisms

The mechanisms in this section can be specified when generating an instance of SaslServer.

Mechanism | Description
CRAM-MD5 | See RFC 2195. This mechanism supports a hashed user name/password authentication scheme.
DIGEST-MD5 | See RFC 2831. This mechanism defines how HTTP Digest Authentication can be used as a SASL mechanism.
GSSAPI | See RFC 2222. This mechanism uses the GSSAPI for obtaining authentication information. It supports Kerberos v5 authentication.

SecretKeyFactory Algorithms

The following algorithm names can be specified when requesting an instance of SecretKeyFactory.

Algorithm Name | Description
AES | Constructs secret keys for use with the AES algorithm.
ARCFOUR | Constructs secret keys for use with the ARCFOUR algorithm.
DES | Constructs secrets keys for use with the DES algorithm.
DESede | Constructs secrets keys for use with the DESede (Triple-DES) algorithm.
PBEWith<digest>And<encryption>
PBEWith<prf>And<encryption> 		Secret-key factory for use with PKCS5 password-based encryption, where <digest> is a message digest, <prf> is a pseudo-random function, and <encryption> is an encryption algorithm.

Examples:

  • PBEWithMD5AndDES (PKCS #5, 1.5),
  • PBEWithHmacSHA1AndDESede (PKCS #5, 2.0)
Note: These all use only the low order 8 bits of each password character.
PBKDF2With<prf> | Password-based key-derivation algorithm found in PKCS #5 2.0 using the specified pseudo-random function (<prf>). Example: PBKDF2WithHmacSHA256.

SecureRandom Number Generation Algorithms

The algorithm name in this section can be specified when generating an instance of SecureRandom.

Algorithm Name | Description
NativePRNG | Obtains random numbers from the underlying native OS. No assertions are made as to the blocking nature of generating these numbers.
NativePRNGBlocking | Obtains random numbers from the underlying native OS, blocking if necessary. For example, /dev/random on UNIX-like systems.
NativePRNGNonBlocking | Obtains random numbers from the underlying native OS, without blocking to prevent applications from excessive stalling. For example, /dev/urandom on UNIX-like systems.
PKCS11 | Obtains random numbers from the underlying installed and configured PKCS11 library.
SHA1PRNG | The name of the pseudo-random number generation (PRNG) algorithm supplied by the SUN provider. This algorithm uses SHA-1 as the foundation of the PRNG. It computes the SHA-1 hash over a true-random seed value concatenated with a 64-bit counter which is incremented by 1 for each operation. From the 160-bit SHA-1 output, only 64 bits are used.
Windows-PRNG | Obtains random numbers from the underlying Windows OS.

Service Attributes

A cryptographic service is always associated with a particular algorithm or type. For example, a digital signature service is always associated with a particular algorithm (for example, DSA), and a CertificateFactory service is always associated with a particular certificate type (for example, X.509).

The attributes in this section are for cryptographic services. The service attributes can be used as filters for selecting providers.

Both the attribute name and value are case-insensitive.

Attribute | Description
KeySize | The maximum key size that the provider supports for the cryptographic service.
ImplementedIn | Whether the implementation for the cryptographic service is done by software or hardware. The value of this attribute is "software" or "hardware".
ValidationAlgorithm | The name of the specification that defines the certification path validation algorithm that an implementation of CertPathBuilder or CertPathValidator supports. RFCs should be specified as "RFC#" (ex: "RFC3280") and Internet Drafts as the name of the draft (ex: "draft-ietf-pkix-rfc2560bis-01.txt"). Values for this attribute that are specified as selection criteria to the Security.getProviders method will be compared using the String.equalsIgnoreCase method. All PKIX implementations of CertPathBuilder and CertPathValidator should provide a value for this attribute.
LDAPSchema | The name of the specification that defines the LDAP schema that an implementation of an LDAP CertStore uses to retrieve certificates and CRLs. The format and semantics of this attribute is the same as described for the ValidationAlgorithm attribute. All LDAP implementations of CertStore should provide a value for this attribute.

For example:

   map.put("KeyPairGenerator.DSA",
            "sun.security.provider.DSAKeyPairGenerator");
        map.put("KeyPairGenerator.DSA KeySize", "1024");
        map.put("KeyPairGenerator.DSA ImplementedIn", "Software");

Signature Algorithms

The algorithm names in this section can be specified when generating an instance of Signature.

Algorithm Name | Description
NONEwithRSA | The RSA signature algorithm, which does not use a digesting algorithm (for example, MD5/SHA1) before performing the RSA operation. For more information about the RSA Signature algorithms, see PKCS #1.
MD2withRSA MD5withRSA | The MD2/MD5 with RSA Encryption signature algorithm, which uses the MD2/MD5 digest algorithm and RSA to create and verify RSA digital signatures as defined in PKCS #1.
SHA1withRSA SHA224withRSA SHA256withRSA SHA384withRSA SHA512withRSA | The signature algorithm with SHA-* and the RSA encryption algorithm as defined in the OSI Interoperability Workshop, using the padding conventions described in PKCS #1.
NONEwithDSA | The Digital Signature Algorithm as defined in FIPS PUB 186-2. The data must be exactly 20 bytes in length. This algorithm is also known as rawDSA.
SHA1withDSA SHA224withDSA SHA256withDSA | The DSA signature algorithms that use the SHA-1, SHA-224, or SHA-256 digest algorithms to create and verify digital signatures as defined in FIPS PUB 186-3.
NONEwithECDSA SHA1withECDSA SHA224withECDSA SHA256withECDSA SHA384withECDSA SHA512withECDSA (ECDSA) | The ECDSA signature algorithms as defined in ANSI X9.62. Note:"ECDSA" is an ambiguous name for the "SHA1withECDSA" algorithm and should not be used. The formal name "SHA1withECDSA" should be used instead.
<digest>with<encryption> | Use this to form a name for a signature algorithm with a particular message digest (such as MD2 or MD5) and algorithm (such as RSA or DSA), just as was done for the explicitly defined standard names in this section (MD2withRSA, and so on). For the new signature schemes defined in PKCS #1 v 2.0, for which the <digest>with<encryption> form is insufficient, <digest>with<encryption>and<mgf> can be used to form a name. Here, <mgf> should be replaced by a mask generation function such as MGF1. Example: MD5withRSAandMGF1.

SSLContext Algorithms

The algorithm names in this section can be specified when generating an instance of SSLContext.

Algorithm Name | Description
SSL | Supports some version of SSL; may support other versions
SSLv2 | Supports SSL version 2 or later; may support other versions
SSLv3 | Supports SSL version 3; may support other versions
TLS | Supports some version of TLS; may support other versions
TLSv1 | Supports RFC 2246: TLS version 1.0 ; may support other versions
TLSv1.1 | Supports RFC 4346: TLS version 1.1 ; may support other versions
TLSv1.2 | Supports RFC 5246: TLS version 1.2 ; may support other versions

TrustManagerFactory Algorithms

The algorithm name in this section can be specified when generating an instance of TrustManagerFactory.

Algorithm Name | Description
PKIX | A factory for X509ExtendedTrustManager objects that validate certificate chains according to the rules defined by the IETF PKIX working group in RFC 3280 or its successor. The TrustManagerFactory must support initialization using the class javax.net.ssl.CertPathTrustManagerParameters.

XML Signature (XMLSignatureFactory/KeyInfoFactory/TransformService) Mechanisms

The mechanism in this section can be specified when generating an instance of XMLSignatureFactory, KeyInfoFactory, or TransformService. The mechanism identifies the XML processing mechanism that an implementation uses internally to parse and generate XML signature and KeyInfo structures. Also, note that each TransformService instance supports a specific transform algorithm in addition to a mechanism. The standard names for the transform algorithms are defined in the next section.

Mechanism | Description
DOM | The Document Object Model. See DOM Mechanism Requirements for additional requirements for DOM implementations.

XML Signature Transform (TransformService) Algorithms

The algorithms in this section can be specified when generating an instance of TransformService. Note that URIs are specified instead of names to be consistent with the XML Signature standard. API constants have been defined for each of these URIs, and these are listed in parentheses after each URI in the table that follows.

Algorithm URI | Description
http://www.w3.org/TR/2001/REC-xml-c14n-20010315 (CanonicalizationMethod.INCLUSIVE) | The Canonical XML (without comments) canonicalization algorithm.
http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS) | The Canonical XML with comments canonicalization algorithm.
http://www.w3.org/2001/10/xml-exc-c14n# (CanonicalizationMethod.EXCLUSIVE) | The Exclusive Canonical XML (without comments) canonicalization algorithm.
http://www.w3.org/2001/10/xml-exc-c14n#WithComments (CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS) | The Exclusive Canonical XML with comments canonicalization algorithm.
http://www.w3.org/2000/09/xmldsig#base64 (Transform.BASE64) | The Base64 transform algorithm.
http://www.w3.org/2000/09/xmldsig#enveloped-signature (Transform.ENVELOPED) | The Enveloped Signature transform algorithm.
http://www.w3.org/TR/1999/REC-xpath-19991116 (Transform.XPATH) | The XPath transform algorithm.
http://www.w3.org/2002/06/xmldsig-filter2 (Transform.XPATH2) | The XPath Filter 2 transform algorithm.
http://www.w3.org/TR/1999/REC-xslt-19991116 (Transform.XSLT) | The XSLT transform algorithm.

JSSE Cipher Suite Names

The following list contains the standard JSSE cipher suite names. Over time, various groups have added additional cipher suites to the SSL/TLS namespace. Some JSSE cipher suite names were defined before TLSv1.0 was finalized, and were therefore given the SSL_ prefix. The names mentioned in the TLS RFCs prefixed with TLS_ are functionally equivalent to the JSSE cipher suites prefixed with SSL_.

  • SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
  • SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
  • TLS_DH_anon_WITH_AES_128_CBC_SHA
  • TLS_DH_anon_WITH_AES_128_CBC_SHA256
  • TLS_DH_anon_WITH_AES_128_GCM_SHA256
  • TLS_DH_anon_WITH_AES_256_CBC_SHA
  • TLS_DH_anon_WITH_AES_256_CBC_SHA256
  • TLS_DH_anon_WITH_AES_256_GCM_SHA384
  • TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA
  • TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA
  • TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_DH_anon_WITH_DES_CBC_SHA
  • SSL_DH_anon_WITH_RC4_128_MD5
  • TLS_DH_anon_WITH_SEED_CBC_SHA
  • SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA
  • TLS_DH_DSS_WITH_AES_128_CBC_SHA
  • TLS_DH_DSS_WITH_AES_128_CBC_SHA256
  • TLS_DH_DSS_WITH_AES_128_GCM_SHA256
  • TLS_DH_DSS_WITH_AES_256_CBC_SHA
  • TLS_DH_DSS_WITH_AES_256_CBC_SHA256
  • TLS_DH_DSS_WITH_AES_256_GCM_SHA384
  • TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA
  • TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA
  • TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_DH_DSS_WITH_DES_CBC_SHA
  • TLS_DH_DSS_WITH_SEED_CBC_SHA
  • SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DH_RSA_WITH_AES_128_CBC_SHA
  • TLS_DH_RSA_WITH_AES_128_CBC_SHA256
  • TLS_DH_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DH_RSA_WITH_AES_256_CBC_SHA
  • TLS_DH_RSA_WITH_AES_256_CBC_SHA256
  • TLS_DH_RSA_WITH_AES_256_GCM_SHA384
  • TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA
  • TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA
  • TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_DH_RSA_WITH_DES_CBC_SHA
  • TLS_DH_RSA_WITH_SEED_CBC_SHA
  • SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA
  • SSL_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA
  • SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
  • TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
  • TLS_DHE_DSS_WITH_AES_256_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
  • TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
  • TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA
  • TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA
  • TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_DHE_DSS_WITH_DES_CBC_SHA
  • SSL_DHE_DSS_WITH_RC4_128_SHA
  • TLS_DHE_DSS_WITH_SEED_CBC_SHA
  • TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_PSK_WITH_AES_128_CBC_SHA
  • TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
  • TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
  • TLS_DHE_PSK_WITH_AES_256_CBC_SHA
  • TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
  • TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
  • TLS_DHE_PSK_WITH_NULL_SHA
  • TLS_DHE_PSK_WITH_NULL_SHA256
  • TLS_DHE_PSK_WITH_NULL_SHA384
  • TLS_DHE_PSK_WITH_RC4_128_SHA
  • SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
  • TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
  • TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_DHE_RSA_WITH_DES_CBC_SHA
  • TLS_DHE_RSA_WITH_SEED_CBC_SHA
  • TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_anon_WITH_AES_128_CBC_SHA
  • TLS_ECDH_anon_WITH_AES_256_CBC_SHA
  • TLS_ECDH_anon_WITH_NULL_SHA
  • TLS_ECDH_anon_WITH_RC4_128_SHA
  • TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDH_ECDSA_WITH_NULL_SHA
  • TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  • TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDH_RSA_WITH_NULL_SHA
  • TLS_ECDH_RSA_WITH_RC4_128_SHA
  • TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_NULL_SHA
  • TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  • TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
  • TLS_ECDHE_PSK_WITH_NULL_SHA
  • TLS_ECDHE_PSK_WITH_NULL_SHA256
  • TLS_ECDHE_PSK_WITH_NULL_SHA384
  • TLS_ECDHE_PSK_WITH_RC4_128_SHA
  • TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_RSA_WITH_NULL_SHA
  • TLS_ECDHE_RSA_WITH_RC4_128_SHA
  • TLS_EMPTY_RENEGOTIATION_INFO_SCSV *
  • SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA
  • SSL_FORTEZZA_DMS_WITH_NULL_SHA
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
  • TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5
  • TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA
  • TLS_KRB5_EXPORT_WITH_RC4_40_MD5
  • TLS_KRB5_EXPORT_WITH_RC4_40_SHA
  • TLS_KRB5_WITH_3DES_EDE_CBC_MD5
  • TLS_KRB5_WITH_3DES_EDE_CBC_SHA
  • TLS_KRB5_WITH_DES_CBC_MD5
  • TLS_KRB5_WITH_DES_CBC_SHA
  • TLS_KRB5_WITH_IDEA_CBC_MD5
  • TLS_KRB5_WITH_IDEA_CBC_SHA
  • TLS_KRB5_WITH_RC4_128_MD5
  • TLS_KRB5_WITH_RC4_128_SHA
  • TLS_PSK_WITH_3DES_EDE_CBC_SHA
  • TLS_PSK_WITH_AES_128_CBC_SHA
  • TLS_PSK_WITH_AES_128_CBC_SHA256
  • TLS_PSK_WITH_AES_128_GCM_SHA256
  • TLS_PSK_WITH_AES_256_CBC_SHA
  • TLS_PSK_WITH_AES_256_CBC_SHA384
  • TLS_PSK_WITH_AES_256_GCM_SHA384
  • TLS_PSK_WITH_NULL_SHA
  • TLS_PSK_WITH_NULL_SHA256
  • TLS_PSK_WITH_NULL_SHA384
  • TLS_PSK_WITH_RC4_128_SHA
  • SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
  • SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
  • SSL_RSA_EXPORT_WITH_RC4_40_MD5
  • SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA
  • SSL_RSA_EXPORT1024_WITH_RC4_56_SHA
  • SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA
  • SSL_RSA_FIPS_WITH_DES_CBC_SHA
  • TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_PSK_WITH_AES_128_CBC_SHA
  • TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
  • TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
  • TLS_RSA_PSK_WITH_AES_256_CBC_SHA
  • TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
  • TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
  • TLS_RSA_PSK_WITH_NULL_SHA
  • TLS_RSA_PSK_WITH_NULL_SHA256
  • TLS_RSA_PSK_WITH_NULL_SHA384
  • TLS_RSA_PSK_WITH_RC4_128_SHA
  • SSL_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA256
  • TLS_RSA_WITH_AES_128_GCM_SHA256
  • TLS_RSA_WITH_AES_256_CBC_SHA
  • TLS_RSA_WITH_AES_256_CBC_SHA256
  • TLS_RSA_WITH_AES_256_GCM_SHA384
  • TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
  • TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
  • TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
  • TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
  • SSL_RSA_WITH_DES_CBC_SHA
  • SSL_RSA_WITH_IDEA_CBC_SHA
  • SSL_RSA_WITH_NULL_MD5
  • SSL_RSA_WITH_NULL_SHA
  • TLS_RSA_WITH_NULL_SHA256
  • SSL_RSA_WITH_RC4_128_MD5
  • SSL_RSA_WITH_RC4_128_SHA
  • TLS_RSA_WITH_SEED_CBC_SHA
  • TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA
  • TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA
  • TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA
  • TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA
  • TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA
  • TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA
  • TLS_SRP_SHA_WITH_AES_128_CBC_SHA
  • TLS_SRP_SHA_WITH_AES_256_CBC_SHA

* TLS_EMPTY_RENEGOTIATION_INFO_SCSV is a new pseudo-cipher suite to support RFC 5746. Read the Transport Layer Security (TLS) Renegotiation Issue section of the JSEE Reference Guide for more information.

Additional JSSE Standard Names

The keyType parameter passed to the chooseClientAlias, chooseServerAlias, getClientAliases, and getServerAliases methods of X509KeyManager specifies the public key types. Each row of the table that follows lists the standard name that should be used for keyType, given the specified certificate type.

Name | Certificate Type
RSA | RSA
DSA | DSA
DH_RSA | Diffie-Hellman with RSA signature
DH_DSA | Diffie-Hellman with DSA signature
EC | Elliptic Curve
EC_EC | Elliptic Curve with ECDSA signature
EC_RSA | Elliptic Curve with RSA signature

The protocols parameter passed to the setEnabledProtocols method of SSLSocket specifies the protocol versions to be enabled for use on the connection. The table that follows lists the standard names that can be passed to setEnabledProtocols or that may be returned by the SSLSocket getSupportedProtocols and getEnabledProtocols methods.

Name | Protocol
SSLv2 | SSL version 2 protocol
SSLv3 | SSL version 3 protocol
TLSv1 | TLS version 1.0 protocol (defined in RFC 2246)
TLSv1.1 | TLS version 1.1 protocol (defined in RFC 4346)
TLSv1.2 | TLS version 1.2 protocol (defined in RFC 5246)
SSLv2Hello | Currently, the SSLv3, TLSv1, and TLSv1.1 protocols allow you to send SSLv3, TLSv1, and TLSv1.1 hellos encapsulated in an SSLv2 format hello. For more details on the reasons for allowing this compatibility in these protocols, see Appendix E in the appropriate RFCs (previously listed). Note that some SSL/TLS servers do not support the v2 hello format and require that client hellos conform to the SSLv3 or TLSv1 client hello formats. The SSLv2Hello option controls the SSLv2 encapsulation. If SSLv2Hello is disabled on the client, then all outgoing messages will conform to the SSLv3/TLSv1 client hello format. If SSLv2Hello is disabled on the server, then all incoming messages must conform to the SSLv3/TLSv1 client hello format.

The authType parameter passed to the checkClientTrusted and checkServerTrusted methods of X509TrustManager indicates the authentication type. The table that follows specifies what standard names should be used for the client or server certificate chains.

Client or Server Certificate Chain | Authentication Type Standard Name
Client | Determined by the actual certificate used. For instance, if RSAPublicKey is used, the authType should be "RSA".
Server | The key exchange algorithm portion of the cipher suites represented as a String, such as "RSA" or "DHE_DSS". Note: For some exportable cipher suites, the key exchange algorithm is determined at runtime during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be "RSA_EXPORT" when an ephemeral RSA key is used for the key exchange, and "RSA" when the key from the server certificate is used. Or it can take the value "UNKNOWN".

The JDK 8 release supports endpoint identification algorithms for TLS 1.2. The algorithm name can be passed to the setEndpointIdentificationAlgorithm() method of javax.net.ssl.SSLParameters. The following table shows the currently recognized names.

Endpoint Identification Algorithm Name | Specification
HTTPS | http://www.ietf.org/rfc/rfc2818.txt
LDAPS | http://www.ietf.org/rfc/rfc2830.txt

Algorithms

This section specifies details concerning some of the algorithms defined in this document. Any provider supplying an implementation of the listed algorithms must comply with the specifications in this section.

To add a new algorithm not specified here, you should first survey other people or companies supplying provider packages to see if they have already added that algorithm, and, if so, use the definitions they published, if available. Otherwise, you should create and make available a template, similar to those found in this section, with the specifications for the algorithm you provide.

Specification Template

The following table shows the fields of the algorithm specifications.

Field | Description
Name | The name by which the algorithm is known. This is the name passed to the getInstance method (when requesting the algorithm), and returned by the getAlgorithm method to determine the name of an existing algorithm object. These methods are in the relevant engine classes: Signature, MessageDigest, KeyPairGenerator, and AlgorithmParameterGenerator .
Type | The type of algorithm: Signature, MessageDigest, KeyPairGenerator, or AlgorithmParameterGenerator.
Description | General notes about the algorithm, including any standards implemented by the algorithm, applicable patents, and so on.
KeyPair Algorithm (optional) | The keypair algorithm for this algorithm.
Keysize (optional) | For a keyed algorithm or key generation algorithm: the valid keysizes.
Size (optional) | For an algorithm parameter generation algorithm: the valid "sizes" for algorithm parameter generation.
Parameter Defaults (optional) | For a key generation algorithm: the default parameter values.
Signature Format (optional) | For a Signature algorithm, the format of the signature, that is, the input and output of the verify and sign methods, respectively.

Algorithm Specifications

SHA-1 Message Digest Algorithm

Field | Description
Name | SHA-1
Type | MessageDigest
Description | The message digest algorithm as defined in NIST's FIPS 180-4. The output of this algorithm is a 160-bit digest.

SHA-256 Message Digest Algorithm

Field | Description
Name | SHA-256
Type | MessageDigest
Description | The message digest algorithm as defined in NIST's FIPS 180-4. The output of this algorithm is a 256-bit digest.

MD2 Message Digest Algorithm

Field | Description
Name | MD2
Type | MessageDigest
Description | The message digest algorithm as defined in RFC 1319. The output of this algorithm is a 128-bit (16 byte) digest.

MD5 Message Digest Algorithm

Field | Description
Name | MD5
Type | MessageDigest
Description | The message digest algorithm as defined in RFC 1321. The output of this algorithm is a 128-bit (16 byte) digest.

The Digital Signature Algorithm

Field | Description
Name | SHA1withDSA
Type | Signature
Description | This algorithm is the signature algorithm described in NIST FIPS 186, using DSA with the SHA-1 message digest algorithm.
KeyPair Algorithm | DSA
Signature Format | ASN.1 sequence of two INTEGER values: r and s, in that order: SEQUENCE ::= { r INTEGER, s INTEGER }

RSA-based Signature Algorithms, with MD2, MD5 or SHA-1

Field | Description
Names | MD2withRSA, MD5withRSA and SHA1withRSA
Type | Signature
Description | These are the signature algorithms that use the MD2, MD5, and SHA-1 message digest algorithms (respectively) with RSA encryption.
KeyPair Algorithm | RSA
Signature Format | DER-encoded PKCS1 block as defined in RSA Laboratories, PKCS #1. The data encrypted is the digest of the data signed.

DSA KeyPair Generation Algorithm

Field | Description
Name | DSA
Type | KeyPairGenerator
Description | This algorithm is the key pair generation algorithm described NIST FIPS 186 for DSA.
Keysize | The length, in bits, of the modulus p. This must be a multiple of 64, ranging from 512 to 1024 (inclusive), or 2048. The default keysize is 1024.
Parameter Defaults

The following are the default parameter values for keysizes of 512, 768, and 1024 bits:

512-bit Key Parameters

SEED =
b869c82b 35d70e1b 1ff91b28 e37a62ec dc34409b

counter = 123

p =
fca682ce 8e12caba 26efccf7 110e526d b078b05e decbcd1e b4a208f3
ae1617ae 01f35b91 a47e6df6 3413c5e1 2ed0899b cd132acd 50d99151
bdc43ee7 37592e17

q =
962eddcc 369cba8e bb260ee6 b6a126d9 346e38c5

g =
678471b2 7a9cf44e e91a49c5 147db1a9 aaf244f0 5a434d64 86931d2d
14271b9e 35030b71 fd73da17 9069b32e 2935630e 1c206235 4d0da20a
6c416e50 be794ca4

768-bit key parameters

SEED =
77d0f8c4 dad15eb8 c4f2f8d6 726cefd9 6d5bb399

counter = 263

p =
e9e64259 9d355f37 c97ffd35 67120b8e 25c9cd43 e927b3a9 670fbec5
d8901419 22d2c3b3 ad248009 3799869d 1e846aab 49fab0ad 26d2ce6a
22219d47 0bce7d77 7d4a21fb e9c270b5 7f607002 f3cef839 3694cf45
ee3688c1 1a8c56ab 127a3daf

q =
9cdbd84c 9f1ac2f3 8d0f80f4 2ab952e7 338bf511

g =
30470ad5 a005fb14 ce2d9dcd 87e38bc7 d1b1c5fa cbaecbe9 5f190aa7
a31d23c4 dbbcbe06 17454440 1a5b2c02 0965d8c2 bd2171d3 66844577
1f74ba08 4d2029d8 3c1c1585 47f3a9f1 a2715be2 3d51ae4d 3e5a1f6a
7064f316 933a346d 3f529252

1024-bit key parameters

SEED =
8d515589 4229d5e6 89ee01e6 018a237e 2cae64cd

counter = 92

p =
fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80
b6512669 455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b
801d346f f26660b7 6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6
1bf83b57 e7c6a8a6 150f04fb 83f6d3c5 1ec30235 54135a16 9132f675
f3ae2b61 d72aeff2 2203199d d14801c7

q =
9760508f 15230bcc b292b982 a2eb840b f0581cf5

g =
f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b
3d078267 5159578e bad4594f e6710710 8180b449 167123e8 4c281613
b7cf0932 8cc8a6e1 3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f
0bfa2135 62f1fb62 7a01243b cca4f1be a8519089 a883dfe1 5ae59f06
928b665e 807b5525 64014c3b fecf492a

The following are the default values for larger DSA key sizes identified by (L,N) pairs:

(L,N) = (2048, 256)

SEED =
b0b44176 01b59cbc 9d8ac8f9 35cadaec 4f5fbb2f 23785609 ae466748
d9b5a536

counter = 497

p =
95475cf5 d93e596c 3fcd1d90 2add02f4 27f5f3c7 210313bb 45fb4d5b
b2e5fe1c bd678cd4 bbdd84c9 836be1f3 1c077772 5aeb6c2f c38b85f4
8076fa76 bcd8146c c89a6fb2 f706dd71 9898c208 3dc8d896 f84062e2
c9c94d13 7b054a8d 8096adb8 d5195239 8eeca852 a0af12df 83e475aa
65d4ec0c 38a9560d 5661186f f98b9fc9 eb60eee8 b030376b 236bc73b
e3acdbd7 4fd61c1d 2475fa30 77b8f080 467881ff 7e1ca56f ee066d79
506ade51 edbb5443 a563927d bc4ba520 08674617 5c888592 5ebc64c6
14790677 3496990c b714ec66 7304e261 faee33b3 cbdf008e 0c3fa906
50d97d39 09c9275b f4ac86ff cb3d03e6 dfc8ada5 934242dd 6d3bcca2
a406cb0b

q =
f8183668 ba5fc5bb 06b5981e 6d8b795d 30b8978d 43ca0ec5 72e37e09
939a9773

g =
42debb9d a5b3d88c c956e087 87ec3f3a 09bba5f4 8b889a74 aaf53174
aa0fbe7e 3c5b8fcd 7a53bef5 63b0e985 60328960 a9517f40 14d3325f
c7962bf1 e049370d 76d1314a 76137e79 2f3f0db8 59d095e4 a5b93202
4f079ecf 2ef09c79 7452b077 0e135078 2ed57ddf 794979dc ef23cb96
f1830619 65c4ebc9 3c9c71c5 6b925955 a75f94cc cf1449ac 43d586d0
beee4325 1b0b2287 349d68de 0d144403 f13e802f 4146d882 e057af19
b6f6275c 6676c8fa 0e3ca271 3a3257fd 1b27d063 9f695e34 7d8d1cf9
ac819a26 ca9b04cb 0eb9b7b0 35988d15 bbac6521 2a55239c fc7e58fa
e38d7250 ab9991ff bc971340 25fe8ce0 4c4399ad 96569be9 1a546f49
78693c7a

(L,N) = (2048, 224)

SEED =
58423608 0cfa43c0 9b023541 35f4cc51 98a19efa da08bd86 6d601ba4

counter = 2666

p =
8f7935d9 b9aae9bf abed887a cf4951b6 f32ec59e 3baf3718 e8eac496
1f3efd36 06e74351 a9c41833 39b809e7 c2ae1c53 9ba7475b 85d011ad
b8b47987 75498469 5cac0e8f 14b33608 28a22ffa 27110a3d 62a99345
3409a0fe 696c4658 f84bdd20 819c3709 a01057b1 95adcd00 233dba54
84b6291f 9d648ef8 83448677 979cec04 b434a6ac 2e75e998 5de23db0
292fc111 8c9ffa9d 8181e733 8db792b7 30d7b9e3 49592f68 09987215
3915ea3d 6b8b4653 c633458f 803b32a4 c2e0f272 90256e4e 3f8a3b08
38a1c450 e4e18c1a 29a37ddf 5ea143de 4b66ff04 903ed5cf 1623e158
d487c608 e97f211c d81dca23 cb6e3807 65f822e3 42be484c 05763939
601cd667

q =
baf696a6 8578f7df dee7fa67 c977c785 ef32b233 bae580c0 bcd5695d

g =
16a65c58 20485070 4e7502a3 9757040d 34da3a34 78c154d4 e4a5c02d
242ee04f 96e61e4b d0904abd ac8f37ee b1e09f31 82d23c90 43cb642f
88004160 edf9ca09 b32076a7 9c32a627 f2473e91 879ba2c4 e744bd20
81544cb5 5b802c36 8d1fa83e d489e94e 0fa0688e 32428a5c 78c478c6
8d0527b7 1c9a3abb 0b0be12c 44689639 e7d3ce74 db101a65 aa2b87f6
4c6826db 3ec72f4b 5599834b b4edb02f 7c90e9a4 96d3a55d 535bebfc
45d4f619 f63f3ded bb873925 c2f224e0 7731296d a887ec1e 4748f87e
fb5fdeb7 5484316b 2232dee5 53ddaf02 112b0d1f 02da3097 3224fe27
aeda8b9d 4b2922d9 ba8be39e d9e103a6 3c52810b c688b7e2 ed4316e1
ef17dbde

RSA KeyPair Generation Algorithm

Field | Description
Names | RSA
Type | KeyPairGenerator
Description | This algorithm is the key pair generation algorithm described in PKCS #1.
Strength | Any integer that is a multiple of 8, greater than or equal to 512.

DSA Parameter Generation Algorithm

Field | Description
Names | DSA
Type | AlgorithmParameterGenerator
Description | This algorithm is the parameter generation algorithm described in NIST FIPS 186 for DSA.
Strength

The length, in bits, of the modulus p. This must be a multiple of 64, ranging from from 512 to 1024 (inclusive), or 2048. The default keysize is 1024.

Alternatively, generate DSA parameters with the DSAGenParameterSpec class. Note that this class supports the latest version of DSA standard, FIPS PUB 186-3, and only allows certain length of prime P and Q to be used. Valid sizes for length of prime P and sub-prime Q in bits are as follows:

  • (1024, 160)
  • (2048, 224)
  • (2048, 256)

Implementation Requirements

This section defines the security algorithm requirements for JDK 8 implementations. These requirements are intended to improve the interoperability of JDK 8 implementations and applications that use these algorithms.

Note that the requirements in this section are not a measure of the strength or security of the algorithm. For example, recent advances in cryptanalysis have found weaknesses in the strength of the MD5 MessageDigest algorithm. It is your responsibility to determine whether the algorithm meets the security requirements of your application.

Every implementation of the JDK 8 platform must support the specified algorithms in the table that follows. These requirements do not apply to 3rd party providers. Consult the release documentation for your implementation to see if any other algorithms are supported.

Class | Algorithm Name(s)
AlgorithmParameterGenerator Implementations must support the key sizes in parentheses. | DiffieHellman (1024) DSA (1024)
AlgorithmParameters | AES DES DESede DiffieHellman DSA
CertificateFactory | X.509
CertPath Encodings | PKCS7 PkiPath
CertPathBuilder | PKIX
CertPathValidator | PKIX
CertStore | Collection
Cipher The algorithms are specified as transformations. Implementations must support the key sizes in parentheses. | AES/CBC/NoPadding (128) AES/CBC/PKCS5Padding (128) AES/ECB/NoPadding (128) AES/ECB/PKCS5Padding (128) DES/CBC/NoPadding (56) DES/CBC/PKCS5Padding (56) DES/ECB/NoPadding (56) DES/ECB/PKCS5Padding (56) DESede/CBC/NoPadding (168) DESede/CBC/PKCS5Padding (168) DESede/ECB/NoPadding (168) DESede/ECB/PKCS5Padding (168) RSA/ECB/PKCS1Padding (1024, 2048) RSA/ECB/OAEPWithSHA-1AndMGF1Padding (1024, 2048) RSA/ECB/OAEPWithSHA-256AndMGF1Padding (1024, 2048)
Configuration [1] |
KeyAgreement | DiffieHellman
KeyFactory | DiffieHellman DSA RSA
KeyGenerator Implementations must support the key sizes in parentheses. | AES (128) DES (56) DESede (168) HmacSHA1 HmacSHA256
KeyPairGenerator Implementations must support the key sizes in parentheses. | DiffieHellman (1024) DSA (1024) RSA (1024, 2048)
KeyStore | PKCS12
Mac | HmacMD5 HmacSHA1 HmacSHA256
MessageDigest | MD5 SHA-1 SHA-256
Policy [1] |
SecretKeyFactory | DES DESede
SecureRandom [1] |
Signature | SHA1withDSA SHA1withRSA SHA256withRSA
SSLContext | TLSv1 [2]

[1] No specific Configuration type, Policy type or SecureRandom algorithm is required; however, an implementation-specific default must be provided.

[2] A TLSv1 implementation must support the cipher suite SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA as defined in RFC 2246 and the special signaling cipher suite TLS_EMPTY_RENEGOTIATION_INFO_SCSV for safe renegotiation as defined in RFC 5746.

XML Signature Algorithms

Every implementation of the JDK 8 platform must support the specified XML Signature algorithms in the table that follows. These requirements do not apply to 3rd party providers. Consult the release documentation for your implementation to see if any other algorithms are supported.

Class | Algorithm Name(s)
TransformService | http://www.w3.org/2001/10/xml-exc-c14n# (CanonicalizationMethod.EXCLUSIVE) http://www.w3.org/TR/2001/REC-xml-c14n-20010315 (CanonicalizationMethod.INCLUSIVE) http://www.w3.org/2000/09/xmldsig#base64 (Transform.BASE64) http://www.w3.org/2000/09/xmldsig#enveloped-signature (Transform.ENVELOPED)
XMLSignatureFactory | DOM
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Summary of Security Tools

Documentation Contents

Summary of Tools for Java Platform Security

Last Modified: 28 July, 2006

Below is a summary of the following security tools, with links to the more detailed documentation: keytool, jar, jarsigner, Policy Tool, kinit, klist, and ktab. All of these tools are command-line tools with the exception of Policy Tool, which has a graphical user interface.

The Tools

keytool (Solaris, Linux, or Mac OS X) (Windows)

Use keytool to manage your keystore, for example to

  • create public/private key pairs
  • issue certificate requests (which you send to the appropriate Certification Authority)
  • import certificate replies (obtained from the Certification Authority you contacted)
  • designate public keys belonging to other parties as trusted
  • copy entries between two keystores

Keys and certificates are used to digitally sign your applications and applets (see jarsigner below). A keystore is a protected database that holds keys and certificates for an enterprise. Access to a keystore is guarded by a password (defined at the time the keystore is created, by the person who creates the keystore, and changeable only when providing the current password). In addition, each private key in a keystore can be guarded by its own password.

jar (Solaris, Linux, or Mac OS X) (Windows)

Use the jar tool to create JAR files.

The Java ARchive (JAR) file format enables you to bundle multiple files into a single archive file. Typically a JAR file will contain the class files and auxiliary resources associated with applets and applications. When you want to "digitally sign" code, you use the jar tool to place it in a JAR file and the jarsigner tool to sign the JAR file (after generating or importing appropriate keys into your keystore using keytool).

jarsigner (Solaris, Linux, or Mac OS X) (Windows)

Use the jarsigner tool to sign JAR files, or to verify signatures on signed JAR files.

The jarsigner tool accesses a keystore that is created and managed by keytool, when it needs to find the private key and its associated certificate chain to use when signing a JAR file. Since accesses to the keystore and to private keys are protected by passwords, only people who know the passwords will be able to access the key and use it to sign a JAR file. The jarsigner tool prompts for needed passwords.

Policy Tool (Solaris, Linux, or Mac OS X) (Windows)

Use the Policy Tool (invoked by using the policytool command) to create and modify the external policy configuration files that define your installation's security policy.

The policy is described in the Security Architecture Specification. Further information is provided in Default Policy Implementation and Policy File Syntax.

This tool has a graphical user interface, so you select buttons and other options rather than type in commands as for the other tools. Please read the Policy Tool Users Guide for details.

kinit (Windows)

kinit is used to obtain and cache Kerberos ticket-granting tickets. This tool is similar in functionality to the kinit tool commonly found in other Kerberos implementations, such as SEAM and MIT Reference implementations.

The user must be registered as a principal with the Key Distribution Center (KDC) prior to running kinit.

Solaris - Equivalent functionality is available for Solaris users via the kinit tool that is part of the Solaris operating environment.

Linux - Equivalent functionality is available for Linux users via the kinit tool in any Kerberos 5 installation.

klist (Windows)

klist is a command-line tool that allows the user to view entries in the local credentials cache and key table.

Solaris - Equivalent functionality is available for Solaris users via the klist tool that is part of the Solaris operating environment.

Linux - Equivalent functionality is available for Linux users via the klist tool in any Kerberos 5 installation.

ktab (Windows)

ktab is a command-line tool that allows the user to manage the principal names and service keys stored in a local key table. Principal and key pairs listed in the keytab allow services running on a host to authenticate themselves to the Key Distribution Center (KDC). Before a server can be setup to use Kerberos, the user must setup a keytab on the host running the server. Note that any updates made to the keytab using ktab do not affect the Kerberos database. If you change the keys in the keytab, you must also make the corresponding changes to the Kerberos database. Also note that the command line options are not case-sensitive.

Solaris - Equivalent functionality is available for Solaris users via the ktutil or kadmin tool that is part of Solaris operating environment.

Linux - Equivalent functionality is available for Linux users via the ktutil or kadmin tool in any Kerberos 5 installation.

Examples of Use of the Tools

Examples of the use of several of these security tools can be found in the Security trail of the Java Tutorials.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting Security

If you want to monitor security access, you can set the java.security.debug System property. To see a list of all debugging options, use the help setting:

java -Djava.security.debug=help

Note: Separate multiple options with a comma

The following table lists java.security.debug options and links to further information about each option:

Option | Description | Further Information
all | Turn on all debugging
access

Print all results from the AccessController.checkPermission method.

You can use the following options with the access option:

  1. stack: Include stack trace
  2. domain: Dump all domains in context
  3. failure: Before throwing exception, dump stack and domain that do not have permission

You can use the following options with the stack and domain options:

  1. permission=<classname>: Only dump output if specified permission is being checked
  2. codebase=<URL>: Only dump output if specified codebase is being checked
  • Permissions
certpath Turns on debugging for the PKIX CertPathValidator and CertPathBuilder implementations
  • Java PKI Programmer's Guide
combiner SubjectDomainCombiner debugging
  • Permissions
gssloginconfig Java GSS (Generic Security Services) login configuration file debugging
  • Java Generic Security Services: (Java GSS) and Kerberos
  • Introduction to JAAS and Java GSS-API Tutorials
  • javax.security.auth.login.Configuration: A Configuration object is responsible for specifying which LoginModules should be used for a particular application, and in what order the LoginModules should be invoked.
  • JAAS Login Configuration File
  • Advanced Security Programming in Java SE Authentication, Secure Communication and Single Sign-On
configfile JAAS (Java Authentication and Authorization Service) configuration file loading
  • Java Authentication and Authorization Service (JAAS) Reference Guide
  • Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges
configparser JAAS configuration file parsing
  • Java Authentication and Authorization Service (JAAS) Reference Guide
  • Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges
jar JAR file verification
  • Verifying Signed JAR Files from The Java Tutorials
logincontext LoginContext results
  • Permissions
policy Loading and granting permissions with policy file
  • Set up the Policy File to Grant the Required Permissions (Controlling Applications) from The Java Tutorials
  • Set up a Policy File to Grant the Required Permission (Controlling Applets) from The Java Tutorials
  • policytool (Solaris, Unix, or Mac OS X)
  • policytool (Windows)
  • Default Policy Implementation and Policy File Syntax
provider Security provider debugging
  • The Security Manager from The Java Tutorials
scl Permissions SecureClassLoader assigns
  • Permissions
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


User Authentication and Authorization in the Java(TM) Platform

Documentation Contents
[Published in the Proceedings of the 15th Annual Computer Security Applications Conference, Phoenix, AZ, December 1999]

        USER AUTHENTICATION AND AUTHORIZATION IN THE JAVA(TM) PLATFORM

    Charlie Lai, Li Gong, Larry Koved, Anthony Nadalin, and Roland Schemers

                        charlie.lai,li.gong@sun.com
                        Sun Microsystems, Inc.

                        koved,drsecure@us.ibm.com
                        International Business Machines, Inc.

                        schemers@onebox.com
                        onebox.com

Abstract

        Java(TM) security technology originally focused on creating a
        safe environment in which to run potentially untrusted code downloaded
        from the public network.  With the latest release of the Java(TM)
        Platform (the Java(TM) 2 Software Development Kit, v 1.2),
        fine-grained access controls can be placed upon critical resources
        with regard to the identity of the running applets and applications,
        which are distinguished by where the code came from and who signed it.
        However, the Java platform still lacks the means to enforce access
        controls based on the identity of the user who runs the code.
        In this paper, we describe the design and implementation of the
        Java(TM) Authentication and Authorization Service (JAAS),
        a framework and programming interface that augments the Java(TM)
        platform with both user-based authentication and access control
        capabilities.

Introduction

        The Java(TM) technology [8,12] emerged in 1995 with a prominently
        stated goal of providing a safe programming environment.  This means
        that Java security must provide a secure, readily-built platform
        on which to run Java enabled applications.  It also means that
        Java security must provide adequate and extensive security tools and
        services implemented in Java technology that enable independent
        software vendors (ISVs) to build a wider range of security-sensitive
        applications, for example, in the enterprise world.

        The latest release of the Java platform (Java 2) introduces a
        new security architecture [7] that uses a security policy to decide
        the granting of individual access permissions to running code
        (according to the code's characteristics, e.g., where the code is
        coming from and whether it is digitally signed and if so by whom).
        Future attempts to access protected resources will invoke security
        checks that compare the granted permissions with the permissions
        needed for the attempted access.  If the former includes the latter,
        access is permitted; otherwise, access is denied.

        Such a code-centric style of access control is unusual in that
        traditional security measures, most commonly found in sophisticated
        operating systems, are user-centric in that they apply control on the
        basis of who is running an application and not on the basis of which
        application is running.  One major rationale behind code-centric
        access control is that when a user uses a web browser to surf the net
        and runs executable content (e.g., mobile code written in Java) as
        needed, the user variable remains essentially constant.  On the other
        hand, the user may trust one piece of mobile code more than others and
        would like to run this code with more privileges.  Thus it is in fact
        natural to control the security of mobile code in a code-centric
        style.

        Nevertheless, it is obvious that Java is becoming widely used in a
        multi-user environment.  For example, an enterprise application or
        a public Internet terminal must deal with different users, either
        concurrently or sequentially, and must grant these users different
        privileges based on their identities.  The Java Authentication and
        Authorization Service (JAAS) is designed to provide a framework and
        standard programming interface for authenticating users and for
        assigning privileges.  Together with Java 2, an application can
        provide code-centric access control, user-centric access control,
        or a combination of both.

        The rest of the paper is organized as follows.  Sections 2 and 3
        introduce the basic concepts used by JAAS.  Section 4 describes the
        authentication model implemented by JAAS.  Section 5 describes the
        authorization framework for JAAS, and is broken up into several
        subsections.  Section 5.1 defines the JAAS user-based security policy,
        Section 5.2 covers the JAAS access control implementation,
        and Section 5.3 discusses scalability issues regarding the
        security policy.  Section 6 discusses the issue of logging into the
        Java virtual machine.  Section 7 follows with a summary.

2  Subjects and Principals

        Users often depend on computing services to assist them in performing
        work.  Furthermore services themselves might subsequently interact
        with other services.  JAAS uses the term, subject, to refer to any
        user of a computing service [9,17].  Both users and computing services,
        therefore, represent subjects.  To identify the subjects with which it
        interacts, a computing service typically relies on names.  However,
        subjects might not have the same name for each service and, in fact,
        may even have a different name for each individual service.
        The term, principal, represents a name associated with a
        subject [11,17].  Since subjects may have multiple names
        (potentially one for each service with which it interacts),
        a subject comprises a set of principals.  See Figure 1.

            public interface Principal {
                public String getName();
            }

            public final class Subject {
                public Set getPrincipals() { }
            }

                Figure 1: Subject Class and Principals

        Principals can become associated with a subject upon successful
        authentication to a service.  Authentication represents
        the process by which one subject verifies the identity of another,
        and must be performed in a secure fashion; otherwise a perpetrator may
        impersonate others to gain access to a system.  Authentication
        typically involves the subject demonstrating some form of evidence to
        prove its identity.  Such evidence may be information only the subject
        would likely know or have (a password or fingerprint), or it may be
        information only the subject could produce (signed data using a
        private key).

        A service's reliance on named principals usually derives from
        the fact that it implements a conventional access control model of
        security [10].  This model allows a service to define a set of
        protected resources as well as the conditions under which
        named principals may access those resources.  Recent studies
        (PolicyMaker [4] and SPKI [5]) have focused on the limitations of using
        conventional names in large distributed systems for access control,
        and note that public keys, instead, provide a more practical and
        scalable name representation.  JAAS, and SPKI as well, do not impose
        any restrictions on principal names.  Localized environments that have
        limited namespaces, or that do not rely on public key cryptography,
        may define principals that have conventional names.
        Large-scale distributed systems may use principals that allow
        the principal name to be a public key (encoded as a hex string,
        as in PolicyMaker).

3  Credentials

        Some services may want to associate other security-related attributes
        and data with a subject in addition to principals.  JAAS refers to
        such generic security-related attributes as credentials.  A credential
        may contain information used to authenticate the subject to new
        services.  Such credentials include passwords, Kerberos tickets [16],
        and public key certificates (X.509 [9], PGP [21], etc.),
        and are used in environments that support single sign-on.
        Credentials might also contain data that simply enables
        the subject to perform certain activities.  Cryptographic keys, for
        example, represent credentials that enable the subject to sign or
        encrypt data.  JAAS credentials may be any type of object.  Therefore,
        existing credential implementations (java.security.cert.Certificate,
        for example) can be easily incorporated into JAAS.  Third-party
        credential implementations may also be plugged into the JAAS
        framework.

        JAAS credential implementations do not necessarily have to contain
        the actual security-related data; they might simply reference the data.
        This occurs when the data must physically reside on a separate server,
        or even possibly in hardware (private keys on a smart card,
        for instance).  Also, JAAS does not impose any restrictions
        regarding credential delegation to third parties.  Rather it allows
        each credential implementation to specify its own delegation protocol
        (as Kerberos does), or leaves delegation decisions up to the
        applications.

        JAAS divides each subject's credentials into two sets.  One set contains
        the subject's public credentials (public key certificates, Kerberos
        tickets, etc).  The second set stores the subject's private credentials
        (private keys, encryption keys, passwords, etc).  To access a subject's
        public credentials, no permissions are required.  However, access
        to a subject's private credential set is security checked.
        See Figure 2.

            public final class Subject {
                ...
                public Set getPublicCredentials() { }  // not security checked
                public Set getPrivateCredentials() { } // security checked
            }

                Figure 2: Subject Class and Credentials

4  Pluggable and Stackable Authentication

        Depending on the security parameters of a particular service,
        different kinds of proof may be required for authentication.
        The JAAS authentication framework is based on PAM [18,20],
        and therefore supports an architecture that allows system
        administrators to plug in the appropriate authentication
        services to meet their security requirements.  The architecture
        also enables applications to remain independent from the underlying
        authentication services.  Hence as new authentication services become
        available or as current services are updated, system administrators
        can easily plug them in without having to modify or recompile existing
        applications.

        The JAAS LoginContext class represents a Java implementation of the
        PAM framework.  The LoginContext consults a configuration that
        determines the authentication service, or LoginModule, that gets
        plugged in under that application (See Figure 3).
        The syntax and details of the configuration are defined by PAM.

            public final class LoginContext {
                public LoginContext(String name) { }
                public void login() { }         // two phase process
                public void logout() { }
                public Subject getSubject() { } // get the authenticated Subject
            }

            public interface LoginModule {
                boolean login();   // 1st authentication phase
                boolean commit();  // 2nd authentication phase
                boolean abort();
                boolean logout();
            }
                Figure 3: LoginContext Class and LoginModule Interface

        JAAS, like PAM, supports the notion of stacked LoginModules.
        To guarantee that either all LoginModules succeed or none succeed,
        the LoginContext performs the authentication steps in two phases.
        In the first phase, or the 'login' phase, the LoginContext invokes the
        configured LoginModules and instructs each to attempt the
        authentication only.  If all the necessary LoginModules successfully
        pass this phase, the LoginContext then enters the second phase and
        invokes the configured LoginModules again, instructing each to formally
        'commit' the authentication process.  During this phase each
        LoginModule associates the relevant authenticated principals and
        credentials with the subject.  If either the first phase or the
        second phase fails, the LoginContext invokes the configured
        LoginModules and instructs each to 'abort' the entire authentication
        attempt.  Each LoginModule then cleans up any relevant state they had
        associated with the authentication attempt.

        In addition to JAAS, the Generic Security Services Application
        Programmer's Interface (GSS-API) and Simple Authentication and
        Security Layer Application Programmer's Interface (SASL) [13,14]
        define frameworks that provide support for pluggable authentication.
        However, the GSS and SASL authentication frameworks
        are designed specifically for network communication protocols and,
        as such, provide additional support for securing network communications
        after authentication has completed.  While JAAS does accommodate
        general network-based authentication protocols (including
        Needham-Schroeder and EKE [15,2]) it also focuses on addressing the
        need to support pluggable authentication in stand-alone non-connection
        oriented environments.

5  Authorization

        Once authentication has successfully completed, JAAS provides
        the ability to enforce access controls upon the principals associated
        with the authenticated subject.  The JAAS principal-based access
        controls (access controls based on who runs code) supplement the
        existing Java 2 codesource-based access controls
        (access controls based on where code came from and who signed it).

5.1  Principal-Based Access Control

        As stated earlier, services typically implement the access control
        model of security, which defines a set of protected resources,
        as well as the conditions under which named principals
        may access those resources.  JAAS also follows this model,
        and defines a security policy to specify what resources are accessible
        to authorized principals.  The JAAS policy extends the existing
        default Java 2 security policy, and in fact, the two policies, together,
        form a single logical access control policy for the entire Java runtime.

        Figure 4 depicts an example codesource-based policy entry
        currently supported by the default policy provided with Java 2.
        This entry grants code loaded from 'foo.com', and signed by 'foo',
        permission to read all files in the 'cdrom' directory and its
        subdirectories.  Since no principal information is included
        with this policy entry, the code will always be able to read files
        from the 'cdrom' directory, regardless of who executes it.

            // Java 2 codesource-based policy
            grant Codebase "http://foo.com", Signedby "foo" {
                permission java.io.FilePermission "/cdrom/-", "read";
            }

                Figure 4: Codesource-Based Policy Entry

        Figure 5 depicts an example principal-based policy entry
        supported by JAAS.  This example entry grants code loaded from
        'bar.com', signed by 'bar', and executed by 'duke',
        permission to read only those files located in the '/cdrom/duke'
        directory.  To be executed by 'duke', the subject affiliated with the
        current access control context (see Section 5.2) must have an associated
        principal of class, 'bar.Principal', whose 'getName' method returns,
        'duke'.  Note that if the code from 'bar.com', signed by 'bar',
        ran stand-alone (it was not executed by 'duke'),
        or if the code was executed by any principal other than 'duke',
        then it would not be granted the FilePermission.
        Also note that if the JAAS policy entry did not specify
        the Codebase or Signedby information, then the entry's FilePermission
        would be granted to any code running as 'duke'.

            // JAAS principal-based policy
            grant Codebase "http://bar.com, Signedby "bar",
                  Principal bar.Principal "duke" {
                permission java.io.FilePermission "/cdrom/duke/-", "read";
            }

                Figure 5: Principal-Based Policy Entry

        JAAS treats roles and groups simply as named principals [10].
        Therefore access control can be imposed upon roles and groups just
        as they are with any other type of principal.
        See Figure 6.

            // an administrator role can access user passwords
            grant Principal foo.Role "administrator" {
                permission java.io.FilePermission "/passwords/-", "read, write";
            }

            // a basketball team (group) can read its directory
            grant Principal foo.Team "SlamDunk" {
                permission java.io.FilePermission "/teams/SlamDunk/-", "read";
            }

                Figure 6: Role-Based and Group-Based Policy Entries

        For flexibility, the JAAS policy also permits the
        Principal class specified in a grant entry to
        be a PrincipalComparator (the class implements the PrincipalComparator
        interface).  The permissions for such entries are granted to any subject
        that the PrincipalComparator implies.  See Figure 7.

            public interface PrincipalComparator {
                boolean implies(Subject subject);
            }

            // regular users can access a temporary working directory
            grant Principal bar.Role "user" {
                permission java.io.FilePermission "/tmp/-", "read, write";
            }

                Figure 7: PrincipalComparator Interface and Example Policy Entry

        Figure 7 demonstrates how PrincipalComparators can be used
        to support role hierarchies [19].  In this example
        assume that an administrator role is senior to a user role and, as such,
        administrators inherit all the permissions granted to regular users.
        To accommodate this hierarchy, 'bar.Role' must simply implement
        the PrincipalComparator interface, and its implies method must
        return, true, if the provided subject has an associated
        "administrator" role principal.  Note that although the JAAS policy
        supports role hierarchies via the PrincipalComparator interface,
        administrators are not limited by it.  JAAS can accommodate
        alternative role-based access control mechanisms (such as that deined
        in [6]), as long as the alternative access controls can be expressed
        either through the existing Java 2 policy or the new JAAS policy.

5.2  Access Control Implementation

        The Java 2 runtime enforces access controls via the
        java.lang.SecurityManager, and is consulted any time untrusted code
        attempts to perform a sensitive operation (accesses to the local file
        system, for example).  To determine whether the code has sufficient
        permissions, the SecurityManager implementation delegates
        responsibility to the java.security.AccessController,
        which first obtains an image of the current AccessControlContext,
        and then ensures that the retrieved AccessControlContext contains
        sufficient permissions for the operation to be permitted.

        JAAS supplements this architecture by providing the method,
        Subject.doAs, to dynamically associate an authenticated subject
        with the current AccessControlContext.  Hence, as subsequent access
        control checks are made, the AccessController can base its decisions
        upon both the executing code itself, and upon the principals
        associated with the subject.  See Figure 8.

            public final class Subject {
                ...
                // associate the subject with the current
                // AccessControlContext and execute the action
                public static Object doAs(Subject s,
                                java.security.PrivilegedAction action) { }
            }

                Figure 8: Subject doAs Method

        To illustrate a usage scenario for the doAs method,
        consider when a service authenticates a remote subject,
        and then performs some work on behalf of that subject.  For security
        reasons, the server should run in an AccessControlContext bound
        by the subject's permissions.  Using JAAS, the server can ensure
        this by preparing the work to be performed as a
        java.security.PrivilegedAction, and then by invoking the doAs method,
        providing both the authenticated subject, as well as the prepared
        PrivilegedAction.  The doAs implementation associates the subject with
        the current AccessControlContext and then executes the action.
        When security checks occur during execution, the Java 2 SecurityManager
        queries the JAAS policy, updates the current AccessControlContext
        with the permissions granted to the subject and the executing
        codesource, and then performs its regular permission checks.
        When the action finally completes, the doAs method simply removes
        the subject from the current AccessControlContext,
        and returns the result back to the caller.

        To associate a subject with the current AccessControlContext,
        the doAs method uses an internal JAAS implementation of the
        java.security.DomainCombiner interface, newly introduced in
        version 1.3 of the Java 2 SDK.  It is through the JAAS DomainCombiner
        that the existing Java 2 SecurityManager can be instructed to query
        the JAAS policy without requiring modifications to the SecurityManager
        itself.  Details of the interaction between the Java 2 SecurityManager
        and DomainCombiners are documented in the javadocs for the
        java.security.DomainCombiner interface.

Section 5.3  Scalability of the Access Control Policy

        The JAAS principal-based access control policy was intentionally
        designed to be consistent with the existing codesource-based policy
        in the Java 2 platform.  The default policy implementations provided
        with both Java 2 and JAAS reside in a local file, and assume that all
        policy decisions can be defined and made locally.  Obviously,
        this design does not scale beyond small localized environments.
        KeyNote [3] and SPKI both address the limitations of such
        access control designs, and discuss alternative solutions that
        enable the delegation of policy responsibilities to certified
        3rd parties.  By delegating policy-making responsibilities,
        access control policies can easily scale to serve larger systems.

        To improve scalability, both the Java 2 and JAAS file-based policy
        implementations can be replaced with alternative implementations
        that support delegation.  This is achieved by specifying the
        alternative implementations in the 'java.security' properties file
        located in the lib/security subdirectory from where the Java runtime
        environment was installed.  The designs of potential alternative
        implementations are beyond the scope of this paper.

Section 6  Logging in to the Java Virtual Machine

        With support from the JAAS framework, the Java virtual machine (VM)
        can be augmented to provide a general login facility for users.
        This would enable the VM itself to impose access controls based on who
        logged in.  In fact, [1] investigates and describes the constructs
        necessary to support a multi-user environment within a VM.
        In such an environment, individual users log into the VM and are
        each given an execution shell in which to launch commands and
        applications (similar to UNIX).  The VM imposes access controls
        based on the identity of the user, and special UserPermissions
        may be granted to code running as a particular user to permit access
        to particular resources.

        JAAS can serve as the underlying authentication architecture
        for such a system.  Also, the environment described in [1]
        focuses on user-based authentication and access control from
        the point of view of the Java virtual machine.  The JAAS framework
        supplements this environment by providing the support necessary for
        developers to build the same user-based authentication and
        access control capabilities into their own applications.

Section 7  Summary and Future Directions

        In this paper, we have outlined the design and implementation of the
        Java(TM) Authentication and Authorization Service (JAAS),
        a framework and programming interface that augments the
        Java(TM) platform with both pluggable authentication and
        principal-based access control capabilities, without requiring
        modifications to the Java 2 core.  Although individual pluggable
        LoginModules can be written in native code, the basic JAAS framework
        can be written entirely in Java.  A prototype implementation of the
        framework has been developed, and is currently packaged as a
        Java 2 standard extension consisting of approximately 25 classes
        partitioned into four packages.

        As Java technology is used to construct not just a single desktop but
        a full-fledged distributed system, a whole new range of distributed
        systems security issues (such as those we touched upon in the
        Introduction chapter) must be tackled.  For example, additional
        mechanisms are needed to make RMI secure in the presence of hostile
        network attacks.  For Jini, service registration and location must be
        securely managed if the environment contains coexisting but
        potentially mutually hostile parties.  There is a full set of
        higher-level concepts and services that must be secured, such
        as transactions for electronic commerce.  There are also many
        lower-level security protocols that we can leverage on, such as
        the network security protocols Kerberos and IPv6.  JAAS is a critical
        building block for all these issues.

Section 8  Acknowledgements

        We are grateful to Bob Scheifler for his comments and feedback on
        the JAAS architecture.  We also thank Bruce Rich, Kent Soper,
        Anat Sarig, Maryann Hondo, and David Edelsohn for their work in
        helping to define JAAS' functional requirements, and for their
        assistance in testing and documenting JAAS' features.
        Whitfield Diffie, Gary Ellison, Rosanna Lee, Jan Luehe, Peter Neumann,
        Jeff Nisewanger, Jerome Saltzer, Fred Schneider, Michael Schroeder,
        Scott Seligman, and Rob Weltman all contributed to early JAAS designs.
        Maxine Erlund provided management support for the JAAS project.
        Sriramulu Lakkaraju and Narendra Patil wrote product tests for JAAS.
        Scott Hommel helped edit this paper.

References

   [1]  D. Balfanz and L. Gong.  Experience with Secure Multi-Processing
        in Java.  In Proceedings of ICDCS, Amsterdam, The Netherlands, May 1998.

   [2]  S. Bellovin and M. Merritt.  Encrypted Key Exchange: Password-Based
        Protocols Secure Against Dictionary Attacks.  In Proceedings of the
        IEEE Symposium on Research in Security and Privacy, pages 72-84,
        Oakland, California, May 1992.

   [3]  M. Blaze, J. Feigenbaum, and J. Lacy.  Decentralized Trust Management.
        In Proceedings of the IEEE Conference on Security and Privacy,
        Oakland, California, May 1996.

   [4]  M. Blaze, J. Feigenbaum, and A. Keromytis.  KeyNote: Trust Management
        for Public-Key Infrastructures.  Security Protocols International
        Workshop, England, 1998.

   [5]  C.M. Ellison, B. Frantz, B. Lampson, R. Rivest, B.M. Thomas, and
        T. Ylonen.  SPKI Certificate Theory.  Internet Draft,
        Internet Engineering Task Force, November 1998.

   [6]  L. Giuri and F.U. Bordoni.  Role-Based Access Control in Java.
        In Proceedings of the 3rd ACM Workshop on Role-Based Access Control,
        Fairfax, Virginia, 1998.

   [7]  L. Gong, M. Mueller, H. Prafullchandra, and R. Schemers.
        Going Beyond the Sandbox: An Overview of the New Security Architecture
        in the Java(TM) Development Kit 1.2.  In Proceedings of the USENIX
        Symposium on Internet Technologies and Systems, pages 103-112,
        Monterey, California, December 1997.

   [8]  J. Gosling, Bill Joy, and Guy Steele.  The Java Language Specification.
        Addison-Wesley, Menlo Park, California, August 1996.

   [9]  R. Housley, W. Ford, T. Polk, and D. Solo.  Internet X.509 Public Key
        Infrastructure Certificate and CRL Profile.  Request for Comments 2459,
        Internet Engineering Task Force, January 1999.

   [10] B. Lampson.  Protection.  ACM Operating Systems Review,
        8(1):18-24, January 1974.

   [11] B. Lampson, M. Abadi, M. Burrows, and E. Wobber.  Authentication in
        Distributed Systems: Theory and Practice.  ACM Transactions on Computer
        Systems, 10(4):265-310, November 1992.

   [12] T. Lindholm and F. Yellin.  The Java Virtual Machine Specification.
        Addison-Wesley, Menlo Park, California, 1997.

   [13] J. Linn.  Generic Security Service Application Program Interface,
        Version 2.  Request for Comments 2078, Internet Engineering Task Force,
        January 1997.

   [14] J. Myers.  Simple Authentication and Security Layer (SASL).
        Request for Comments 2222, Internet Engineering Task Force,
        October 1997.

   [15] R.M. Needham and M.D. Schroeder.  Using Encryption for Authentication
        in Large Networks of Computers.  Communications of the ACM,
        21(12):993-999, December 1978.

   [16] B.C. Neuman and T. Ts'o.  Kerberos: An Authentication Service for
        Computer Networks.  IEEE Communications, 32(9):33-38, September 1994.

   [17] T. Ryutov and B.C. Neuman.  Access Control Framework for Distributed
        Applications.  Internet Draft, Internet Engineering Task Force,
        November 1998.

   [18] V. Samar and C. Lai.  Making Login Services Independent from
        Authentication Technologies.  In Proceedings of the SunSoft
        Developer's Conference, March 1996.

   [19] R.S Sandhu, E.J. Coyne, H.L. Feinstein, and C.E. Youman.  Role-Based
        Access Control Models.  IEEE Computer, 29(2):38-47, February 1996.

   [20] www.opengroup.org.  X/Open Single Sign-On Service (XSSO) - Pluggable
        Authentication.  Preliminary Specification P702, The Open Group,
        June 1997.

   [21] P. Zimmerman.  PGP User's Guide.  MIT Press, Cambridge, 1994.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


X.509 certificates

Documentation Contents

X.509 Certificates and Certificate Revocation Lists (CRLs)

In One Sentence: What is a Certificate?
What Applications use Certificates?
How do I get a Certificate?
What is Inside an X.509 Certificate?
What Java API Can Be Used to Access and Manage Certificates?
What Java Tool Can Generate, Display, Import, and Export X.509 Certificates?

In One Sentence: What is a Certificate?

A public-key certificate is a digitally signed statement from one entity, saying that the public key (and some other information) of another entity has some specific value.

Let us expand on some of the key terms used in this sentence:

Public Keys
These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.
Digitally Signed
If some data is digitally signed it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entitys' private key.
Identity
A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a UNIX UID to an Email address to an X.509 Distinguished Name.
Signature
A signature is computed over some data using the private key of an entity (the signer).
Private Keys
These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.
Entity
An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Basically, public key cryptography requires access to users' public keys. In a large-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a Trusted Third Party. CAs are entities (e.g., businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates as they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization.

What Applications use Certificates?

Probably the most widely visible application of X.509 certificates today is in web browsers (such as Mozilla Firefox and Microsoft Internet Explorer) that support the TLS protocol. TLS (Transport Layer Security) is a security protocol that provides privacy and authentication for your network traffic. These browsers can only use this protocol with web servers that support TLS.

Other technologies that rely on X.509 certificates include:

  • Various code-signing schemes, such as signed Java ARchives, and Microsoft Authenticode.
  • Various secure E-Mail standards, such as PEM and S/MIME.
  • E-Commerce protocols, such as SET.

How do I Get a Certificate?

There are two basic techniques used to get certificates:

  1. you can create one yourself (using the right tools, such as keytool), or
  2. you can ask a Certification Authority to issue you one (either directly or using a tool such as keytool to generate the request).
The main inputs to the certificate creation process are:
  • Matched public and private keys, generated using some special tools (such as keytool), or a browser. Only the public key is ever shown to anyone else. The private key is used to sign data; if someone knows your private key, they can masquerade as you ... perhaps forging legal documents attributed to you!
  • You need to provide information about the entity being certified (e.g., you). This normally includes information such as your name and organizational address. If you ask a CA to issue a certificate for you, you will normally need to provide proof to show correctness of the information.

If you are asking a CA to issue you a certificate, you provide your public key and some information about you. You'll use a tool (such as keytool or a browser that supports Certificate Signing Request generation). to digitally sign this information, and send it to the CA. The CA will then generate the certificate and return it.

If you're generating the certificate yourself, you'll take that same information, add a little more (dates during which the certificate is valid, a serial number), and just create the certificate using some tool (such as keytool). Not everyone will accept self-signed certificates; one part of the value provided by a CA is to serve as a neutral and trusted introduction service, based in part on their verification requirements, which are openly published in their Certification Service Practices (CSP).

What's Inside an X.509 Certificate?

The X.509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X.509 certificates have the following data, in addition to the signature:

Version
This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined.
Serial Number
The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).
Signature Algorithm Identifier
This identifies the algorithm used by the CA to sign the certificate.
Issuer Name
The X.500 name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate.)
Validity Period
Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised.
Subject Name
The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the Distinguished Name (DN) of the entity, for example,
    CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US
(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.)
Subject Public Key Information
This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters.

X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject and/or issuer names over time. Most certificate profile documents strongly recommend that names not be reused, and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

X.509 Version 3 is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: KeyUsage (limits the use of the keys to particular purposes such as "signing-only") and AlternativeNames (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

All the data in a certificate is encoded using two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data. People have been known to describe this combination simultaneously as "powerful and flexible" and as "cryptic and awkward".

The IETF PKIX working group is in the process of defining standards for the Internet Public Key Infrastructure. We are closely following their work, and support the X.509 Certificate and CRL Profile, which is specified in RFC 3280.

What Java API Can Be Used to Access and Manage Certificates?

The Certificate API, found in the java.security.cert package, includes the following:
  • the CertificateFactory class defines the functionality of a certificate factory, which is used to generate certificate, certificate revocation list (CRL), and certification path objects from their encoding.
  • the Certificate class is an abstract class for managing a variety of certificates. It is an abstraction for certificates that have different formats but important common uses. For example, different types of certificates, such as X.509 and PGP, share general certificate functionality (like encoding and verifying) and some types of information like public key.
  • the CRL class is an abstract class for managing a variety of Certificate Revocation Lists (CRLs).
  • the X509Certificate class is an abstract class for X.509 Certificates. It provides a standard way to access all the attributes of an X.509 certificate.
  • the X509Extension interface is an interface for an X.509 extension. The extensions defined for X.509 v3 certificates and v2 CRLs (Certificate Revocation Lists) provide mechanisms for associating additional attributes with users or public keys, such as for managing the certification hierarchy, and for managing CRL distribution.
  • the X509CRL class is an abstract class for an X.509 Certificate Revocation List (CRL). A CRL is a time-stamped list identifying revoked certificates. It is signed by a Certification Authority (CA) and made freely available in a public repository.
  • the X509CRLEntry class is an abstract class for a CRL entry.
In JDK 1.4, new classes were added to support building and validating chains of certificates, or certification paths. These classes are described in further detail in the PKI Programmer's Guide.

What Java Tool Can Generate, Display, Import, and Export X.509 Certificates?

There is a tool named keytool ( for Solaris, Linux, or Mac OS X) ( for Windows ) that can be used to create public/private key pairs and self-signed X.509 v3 certificates, and to manage keystores. Keys and certificates are used to digitally sign your Java applications and applets (see the jarsigner (for Solaris, Linux, or Mac OS X) (for Windows) tool).

A keystore is a protected database that holds keys and certificates. Access to a keystore is guarded by a password (defined at the time the keystore is created, by the person who creates the keystore, and changeable only when providing the current password). In addition, each private key in a keystore can be guarded by its own password.

Using keytool, it is possible to display, import, and export X.509 v1, v2, and v3 certificates stored as files, and to generate new self-signed v3 certificates. For examples, see the "EXAMPLES" section of the keytool documentation ( for Solaris, Linux, or Mac OS X ) ( for Windows ).

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java PKI API Programmer's Guide

Documentation Contents

Java PKI Programmer's Guide

Skip Table of Contents
  • Overview
    • Who Should Read This Document
    • Related Documentation
    • Introduction
  • Core Classes and Interfaces
    • Basic Classes
      • The CertPath Class
      • The CertificateFactory Class
      • The CertPathParameters Interface
    • Certification Path Validation Classes
      • The CertPathValidator Class
      • The CertPathValidatorResult Interface
    • Certification Path Building Classes
      • The CertPathBuilder Class
      • The CertPathBuilderResult Interface
    • Certificate/CRL Storage Classes
      • The CertStore Class
      • The CertStoreParameters Interface
        • The LDAPCertStoreParameters Class
        • The CollectionCertStoreParameters Class
      • The CertSelector and CRLSelector Interfaces
        • The X509CertSelector Class
        • The X509CRLSelector Class
    • PKIX Classes
      • The TrustAnchor Class
      • The PKIXParameters Class
      • The PKIXCertPathValidatorResult Class
      • The PolicyNode Interface and PolicyQualifierInfo Class
      • The PKIXBuilderParameters Class
      • The PKIXCertPathBuilderResult Class
      • The PKIXCertPathChecker Class
      • Using PKIXCertPathChecker in Certificate Path Validation
  • Implementing a Service Provider
  • Signature Timestamp Support
  • Appendix A: Standard Names
  • Appendix B: The "SUN" Provider
  • Appendix C: On-Line Certificate Status Protocol (OCSP) Support
  • Appendix D: Disabling Cryptographic Algorithms

Overview

The Java Certification Path API consists of classes and interfaces for handling certification paths (also known as "certificate chains"). A certification path is an ordered list of certificates. If a certification path meets certain validation rules, it may be used to securely establish the mapping of a public key to a subject.

This API defines interfaces and abstract classes for creating, building, and validating certification paths. Implementations may be plugged in using a provider-based interface. The API is based on the Cryptographic Service Provider architecture, described in the Java Cryptography Architecture Reference Guide.

The API also includes algorithm-specific classes for building and validating X.509 certification paths according to the PKIX standards. The PKIX standards are developed by the IETF PKIX working group.

This API was originally specified using the Java Community Process program as Java Specification Request (JSR) 000055. The API was included in the Java SDK, starting with Java SE Development Kit (JDK) 1.4. Please refer to JSR 55: Certification Path API for more information on the JSR.

Who Should Read This Document

This document is intended for two classes of experienced developers:

  1. those who want to design secure applications that build or validate certification paths.

  2. those who want to write a service provider implementation for building or validating certification paths.

Related Documentation

This document assumes you have already read the following documents:

  • X.509 Certificates and Certificate Revocation Lists (CRLs)

  • Java Cryptography Architecture Reference Guide

  • How to Implement a Provider for the Java Cryptography Architecture

Introduction

Users of public key applications and systems must be confident that a subject's public key is genuine, i.e., that the associated private key is owned by the subject. Public key certificates are used to establish this trust. A public key (or identity) certificate is a binding of a public key to an identity, which is digitally signed by the private key of another entity, often called a Certification Authority (CA). We shall use the term CA to refer to an entity that signs a certificate for the remainder of this section.

If the user does not have a trusted copy of the public key of the CA that signed the subject's public key certificate, then another public key certificate vouching for the signing CA is required. This logic can be applied recursively, until a chain of certificates (or a certification path) is discovered from a trust anchor or a most-trusted CA to the target subject (commonly referred to as the end-entity). The most-trusted CA is usually specified by a certificate issued to a CA that the user directly trusts. In general, a certification path is an ordered list of certificates, usually comprised of the end-entity's public key certificate and zero or more additional certificates. A certification path typically has one or more encodings, allowing it to be safely transmitted across networks and to different operating system architectures.

The following figure illustrates a certification path from a most-trusted CA's public key (CA 1) to the target subject (Alice). The certification path establishes trust in Alice's public key through an intermediate CA named CA2.

Certification path from a most-trusted CA's public key (CA 1) to the target subject (Alice)

Description of Figure Certification Path

A certification path must be validated before it can be relied on to establish trust in a subject's public key. Validation can consist of various checks on the certificates contained in the certification path, such as verifying the signatures and checking that each certificate has not been revoked. The PKIX standards define an algorithm for validating certification paths consisting of X.509 certificates.

Often a user may not have a certification path from a most-trusted CA to the subject. Providing services to build or discover certification paths is an important feature of public key enabled systems. RFC 2587 defines an LDAP (Lightweight Directory Access Protocol) schema definition which facilitates the discovery of X.509 certification paths using the LDAP directory service protocol.

Building and validating certification paths is an important part of many standard security protocols such as SSL/TLS, S/MIME, and IPSEC. The Java Certification Path API provides a set of classes and interfaces for developers who need to integrate this functionality into their applications. This API benefits two types of developers: those who need to write service provider implementations for a specific certification path building or validation algorithm; and those who need to access standard algorithms for creating, building, and validating certification paths in an implementation-independent manner.

Core Classes and Interfaces

The core classes of the Java Certification Path API consist of interfaces and classes that support certification path functionality in an algorithm- and implementation -independent manner. The API also includes a set of algorithm-specific classes for the PKIX standards that are discussed in the section titled PKIX Classes. The API builds on and extends the existing java.security.cert package for handling certificates. The core classes can be broken up into 4 class categories: Basic, Validation, Building, and Storage:

  • Basic Certification Path Classes

    • CertPath, CertificateFactory, CertPathParameters

  • Certification Path Validation Classes

    • CertPathValidator, CertPathValidatorResult

  • Certification Path Building Classes

    • CertPathBuilder, CertPathBuilderResult

  • Certificate/CRL Storage Classes

    • CertStore, CertStoreParameters, CertSelector, CRLSelector

The following sections describe the most commonly used methods of each class and interface. Usage examples for some of the classes are interspersed throughout the guide. The complete reference documentation for the relevant Certification Path API classes can be found in:

  • java.security.cert package summary

Most of the classes and interfaces in the CertPath API are not thread-safe. However, there are some exceptions which will be noted in this guide and the API specification. Multiple threads that need to access a single non-thread-safe object concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating separate objects need not synchronize.

Basic Certification Path Classes

The basic certification path classes provide fundamental functionality for encoding and representing certification paths. The key basic class in the Java Certification Path API is CertPath, which encapsulates the universal aspects shared by all types of certification paths. An application uses an instance of the CertificateFactory class to create a CertPath object.

The CertPath Class

The CertPath class is an abstract class for certification paths. It defines the functionality shared by all certification path objects. Various certification path types can be implemented by subclassing the CertPath class, even though they may have different contents and ordering schemes. All CertPath objects are serializable, immutable and thread-safe and share the following characteristics:

  • A type

    This corresponds to the type of the certificates in the certification path, for example: X.509. The type of a CertPath is obtained using the method:

        public String getType()

    See Appendix A in the Java Cryptography Architecture Reference Guide for information about standard certificate types.

  • A list of certificates

    The getCertificates method returns the list of certificates in the certification path:

        public abstract List<? extends Certificate> getCertificates()
    This method returns a List of zero or more java.security.cert.Certificate objects. The returned List and the Certificates contained within it are immutable, in order to protect the contents of the CertPath object. The ordering of the certificates returned depends on the type. By convention, the certificates in a CertPath object of type X.509 are ordered starting with the target certificate and ending with a certificate issued by the trust anchor. That is, the issuer of one certificate is the subject of the following one. The certificate representing the TrustAnchor should not be included in the certification path. Unvalidated X.509 CertPaths may not follow this convention. PKIX CertPathValidators will detect any departure from these conventions that cause the certification path to be invalid and throw a CertPathValidatorException.

  • One or more encodings

    Each CertPath object supports one or more encodings. These are external encoded forms for the certification path, used when a standard representation of the path is needed outside the Java Virtual Machine (as when transmitting the path over a network to some other party). Each path can be encoded in a default format, the bytes of which are returned using the method:

        public abstract byte[] getEncoded()
    Alternatively, the getEncoded(String) method returns a specific supported encoding by specifying the encoding format as a String (ex: "PKCS7"). A list of standard encoding formats are defined in Appendix A.

        public abstract byte[] getEncoded(String encoding)
    Also, the getEncodings method returns an iterator over the supported encoding format Strings (the default encoding format is returned first):

        public abstract Iterator<String> getEncodings()

All CertPath objects are also Serializable. CertPath objects are resolved into an alternate CertPathRep object during serialization. This allows a CertPath object to be serialized into an equivalent representation regardless of its underlying implementation.

CertPath objects are generated from an encoded byte array or list of Certificates using a CertificateFactory. Alternatively, a CertPathBuilder may be used to try to find a CertPath from a most-trusted CA to a particular subject. Once a CertPath object has been created, it may be validated by passing it to the validate method of CertPathValidator. Each of these concepts are explained in more detail in subsequent sections.

The CertificateFactory Class

The CertificateFactory class is an engine class that defines the functionality of a certificate factory. In releases prior to JDK 1.4 it was used to generate Certificate and CRL objects. It was enhanced in JDK 1.4 to also be used to generate certification path (CertPath) objects. A CertificateFactory should not be confused with a CertPathBuilder. A CertPathBuilder (discussed later) is used to discover or find a certification path when one does not exist. In contrast, a CertificateFactory is used when a certification path has already been discovered and the caller needs to instantiate a CertPath object from its contents which exist in a different form such as an encoded byte array or an array of Certificates.

Creating a CertificateFactory Object

See the CertificateFactory section in the Java Cryptography Architecture Reference Guide for details on creating a CertificateFactory object.

Generating CertPath Objects

A CertificateFactory instance generates CertPath objects from a List of Certificate objects or from an InputStream that contains the encoded form of a CertPath. Just like a CertPath, each CertificateFactory supports a default encoding format for certification paths (ex: PKCS#7). To generate a CertPath object and initialize it with the data read from an input stream (in the default encoding format), use the generateCertPath method:

    public final CertPath generateCertPath(InputStream inStream)

or from a particular encoding format:

    public final CertPath generateCertPath(InputStream inStream,
                                           String encoding)

To find out what encoding formats are supported, use the getCertPathEncodings method (the default encoding is returned first):

    public final Iterator<String> getCertPathEncodings()

To generate a certification path object from a List of Certificate objects, use the following method:

    public final CertPath generateCertPath(List<? extends Certificate> certificates)

A CertificateFactory always returns CertPath objects that consist of Certificates that are of the same type as the factory. For example, a CertificateFactory of type X.509 returns CertPath objects consisting of certificates that are an instance of java.security.cert.X509Certificate.

The following code sample illustrates generating a certification path from a PKCS#7 encoded certificate reply stored in a file:

    // open an input stream to the file
    FileInputStream fis = new FileInputStream(filename);
    // instantiate a CertificateFactory for X.509
    CertificateFactory cf = CertificateFactory.getInstance("X.509");
    // extract the certification path from
    // the PKCS7 SignedData structure
    CertPath cp = cf.generateCertPath(fis, "PKCS7");
    // print each certificate in the path
    List<Certificate> certs = cp.getCertificates();
    for (Certificate cert : certs) {
        System.out.println(cert);
    }
Here's another code sample that fetches a certificate chain from a KeyStore and converts it to a CertPath using a CertificateFactory:
    // instantiate a KeyStore with type JKS
    KeyStore ks = KeyStore.getInstance("JKS");
    // load the contents of the KeyStore
    ks.load(new FileInputStream("./keystore"),
        "password".toCharArray());
    // fetch certificate chain stored with alias "sean"
    Certificate[] certArray = ks.getCertificateChain("sean");
    // convert chain to a List
    List certList = Arrays.asList(certArray);
    // instantiate a CertificateFactory for X.509
    CertificateFactory cf = CertificateFactory.getInstance("X.509");
    // extract the certification path from
    // the List of Certificates
    CertPath cp = cf.generateCertPath(certList);

Note that there is an existing method in CertificateFactory named generateCertificates that parses a sequence of Certificates. For encodings consisting of multiple certificates, use generateCertificates when you want to parse a collection of possibly unrelated certificates. Otherwise, use generateCertPath when you want to generate a CertPath and subsequently validate it with a CertPathValidator (discussed later).

The CertPathParameters Interface

The CertPathParameters interface is a transparent representation of the set of parameters used with a particular certification path builder or validation algorithm. Its main purpose is to group (and provide type safety for) all certification path parameter specifications. The CertPathParameters interface extends the Cloneable interface and defines a clone() method that does not throw an exception. All concrete implementations of this interface should implement and override the Object.clone() method, if necessary. This allows applications to clone any CertPathParameters object.

Objects implementing the CertPathParameters interface are passed as arguments to methods of the CertPathValidator and CertPathBuilder classes. Typically, a concrete implementation of the CertPathParameters interface will hold a set of input parameters specific to a particular certification path build or validation algorithm. For example, the PKIXParameters class is an implementation of the CertPathParameters interface that holds a set of input parameters for the PKIX certification path validation algorithm. One such parameter is the set of most-trusted CAs that the caller trusts for anchoring the validation process. This parameter among others is discussed in more detail in the section discussing the PKIXParameters class.

Certification Path Validation Classes

The Java Certification Path API includes classes and interfaces for validating certification paths. An application uses an instance of the CertPathValidator class to validate a CertPath object. If successful, the result of the validation algorithm is returned in an object implementing the CertPathValidatorResult interface.

The CertPathValidator Class

The CertPathValidator class is an engine class used to validate a certification path.

Creating a CertPathValidator Object

As with all engine classes, the way to get a CertPathValidator object for a particular validation algorithm is to call one of the getInstance static factory methods on the CertPathValidator class:

        public static CertPathValidator getInstance(String algorithm)
        public static CertPathValidator getInstance(String algorithm,
                                                    String provider)
        public static CertPathValidator getInstance(String algorithm,
                                                    Provider provider)
The algorithm parameter is the name of a certification path validation algorithm (for example, "PKIX"). Standard CertPathValidator algorithm names are listed in Appendix A.
Validating a Certification Path

Once a CertPathValidator object is created, paths can be validated by calling the validate method, passing it the certification path to be validated and a set of algorithm-specific parameters:

        public final CertPathValidatorResult
                validate(CertPath certPath, CertPathParameters params)
                throws CertPathValidatorException,
                       InvalidAlgorithmParameterException

If the validation algorithm is successful, the result is returned in an object implementing the CertPathValidatorResult interface. Otherwise, a CertPathValidatorException is thrown. The CertPathValidatorException contains methods that return the CertPath, and if relevant, the index of the certificate that caused the algorithm to fail and the root exception or cause of the failure.

Note that the CertPath and CertPathParameters passed to the validate method must be of a type that is supported by the validation algorithm. Otherwise, an InvalidAlgorithmParameterException is thrown. For example, a CertPathValidator instance that implements the PKIX algorithm validates CertPath objects of type X.509 and CertPathParameters that are an instance of PKIXParameters.

The CertPathValidatorResult Interface

The CertPathValidatorResult interface is a transparent representation of the successful result or output of a certification path validation algorithm. Its main purpose is to group (and provide type safety for) all validation results. Like the CertPathParameters interface, CertPathValidatorResult extends Cloneable and defines a clone() method that does not throw an exception. This allows applications to clone any CertPathValidatorResult object.

Objects implementing the CertPathValidatorResult interface are returned by the validate method of CertPathValidator (only when successful; otherwise a CertPathValidatorException is thrown with a description of the failure). Typically, a concrete implementation of the CertPathValidatorResult interface will hold a set of output parameters specific to a particular certification path validation algorithm. For example, the PKIXCertPathValidatorResult class is an implementation of the CertPathValidatorResult interface which contains methods to get the output parameters of the PKIX certification path validation algorithm. One such parameter is the valid policy tree. This parameter among others is discussed in more detail in the section discussing the PKIXCertPathValidatorResult class.

Here's a simplified code sample that illustrates how to create a CertPathValidator and use it to validate a certification path. The sample assumes that the CertPath and CertPathParameters objects which are passed to the validate method have been previously created; a more complete example will be illustrated in the section describing the PKIX classes.

    // create CertPathValidator that implements the "PKIX" algorithm
    CertPathValidator cpv = null;
    try {
        cpv = CertPathValidator.getInstance("PKIX");
    } catch (NoSuchAlgorithmException nsae) {
        System.err.println(nsae);
        System.exit(1);
    }
    // validate certification path ("cp") with specified parameters ("params")
    try {
        CertPathValidatorResult cpvResult = cpv.validate(cp, params);
    } catch (InvalidAlgorithmParameterException iape) {
        System.err.println("validation failed: " + iape);
        System.exit(1);
    } catch (CertPathValidatorException cpve) {
        System.err.println("validation failed: " + cpve);
        System.err.println("index of certificate that caused exception: "
                + cpve.getIndex());
        System.exit(1);
    }

Certification Path Building Classes

The Java Certification Path API includes classes for building (or discovering) certification paths. An application uses an instance of the CertPathBuilder class to build a CertPath object. If successful, the result of the build is returned in an object implementing the CertPathBuilderResult interface.

The CertPathBuilder Class

The CertPathBuilder class is an engine class used to build a certification path.

Creating a CertPathBuilder Object

As with all engine classes, the way to get a CertPathBuilder object for a particular build algorithm is to call one of the getInstance static factory method on the CertPathBuilder class:

        public static CertPathBuilder getInstance(String algorithm)
        public static CertPathBuilder getInstance(String algorithm,
                                                  String provider)
        public static CertPathBuilder getInstance(String algorithm,
                                                  Provider provider)
The algorithm parameter is the name of a certification path builder algorithm (for example, "PKIX"). Standard CertPathBuilder algorithm names are listed in Appendix A.
Building a Certification Path

Once a CertPathBuilder object is created, paths can be constructed by calling the build method, passing it an algorithm-specific parameter specification:

        public final CertPathBuilderResult build(CertPathParameters params)
                throws CertPathBuilderException,
                       InvalidAlgorithmParameterException

If the build algorithm is successful, the result is returned in an object implementing the CertPathBuilderResult interface. Otherwise, a CertPathBuilderException is thrown containing information about the failure; for example, the underlying exception (if any) and an error message.

Note that the CertPathParameters passed to the build method must be of a type that is supported by the build algorithm. Otherwise, an InvalidAlgorithmParameterException is thrown.

The CertPathBuilderResult Interface

The CertPathBuilderResult interface is a transparent representation of the result or output of a certification path builder algorithm. This interface contains a method to return the certification path that has been successfully built:

        public CertPath getCertPath()

The purpose of the CertPathBuilderResult interface is to group (and provide type safety for) all build results. Like the CertPathValidatorResult interface, CertPathBuilderResult extends Cloneable and defines a clone() method that does not throw an exception. This allows applications to clone any CertPathBuilderResult object.

Objects implementing the CertPathBuilderResult interface are returned by the build method of CertPathBuilder.

Here's a simplified code sample that illustrates how to create a CertPathBuilder and use it to build a certification path. The sample assumes that the CertPathParameters object which is passed to the build method has been previously created; a more complete example will be illustrated in the section describing the PKIX classes.

    // create CertPathBuilder that implements the "PKIX" algorithm
    CertPathBuilder cpb = null;
    try {
        cpb = CertPathBuilder.getInstance("PKIX");
    } catch (NoSuchAlgorithmException nsae) {
        System.err.println(nsae);
        System.exit(1);
    }
    // build certification path using specified parameters ("params")
    try {
        CertPathBuilderResult cpbResult = cpb.build(params);
        CertPath cp = cpbResult.getCertPath();
        System.out.println("build passed, path contents: " + cp);
    } catch (InvalidAlgorithmParameterException iape) {
        System.err.println("build failed: " + iape);
        System.exit(1);
    } catch (CertPathBuilderException cpbe) {
        System.err.println("build failed: " + cpbe);
        System.exit(1);
    }

Certificate/CRL Storage Classes

The Java Certification Path API also includes the CertStore class for retrieving certificates and CRLs from a repository. This is useful because it allows a caller to specify the repository a CertPathValidator or CertPathBuilder implementation should use to find certificates and CRLs (see the addCertStores method of PKIXParameters for an example).

A CertPathValidator implementation may use the CertStore object that the caller specifies as a callback mechanism to fetch CRLs for performing revocation checks. Similarly, a CertPathBuilder may use the CertStore as a callback mechanism to fetch certificates and, if performing revocation checks, CRLs.

The CertStore Class

The CertStore class is an engine class used to provide the functionality of a certificate and certificate revocation list (CRL) repository. It can be used by CertPathBuilder and CertPathValidator implementations to find certificates and CRLs or as a general purpose certificate and CRL retrieval mechanism.

Unlike the java.security.KeyStore class, which provides access to a cache of private keys and trusted certificates, a CertStore is designed to provide access to a potentially vast repository of untrusted certificates and CRLs. For example, an LDAP implementation of CertStore provides access to certificates and CRLs stored in one or more directories using the LDAP protocol.

All public methods of CertStore objects are thread-safe. That is, multiple threads may concurrently invoke these methods on a single CertStore object (or more than one) with no ill effects. This allows a CertPathBuilder to search for a CRL while simultaneously searching for further certificates, for instance.

Creating a CertStore Object

As with all engine classes, the way to get a CertStore object for a particular repository type is to call one of the getInstance static factory methods on the CertStore class:

        public static CertStore getInstance(String type,
                CertStoreParameters params)
        public static CertStore getInstance(String type,
                CertStoreParameters params, String provider)
        public static CertStore getInstance(String type,
                CertStoreParameters params, Provider provider)
The type parameter is the name of a certificate repository type (for example, "LDAP"). Standard CertStore types are listed in Appendix A.

The initialization parameters (params) are specific to the repository type. For example, the initialization parameters for a server-based repository may include the hostname and the port of the server. An InvalidAlgorithmParameterException is thrown if the parameters are invalid for this CertStore type. The getCertStoreParameters method returns the CertStoreParameters that were used to initialize a CertStore:

        public final CertStoreParameters getCertStoreParameters()
Retrieving Certificates

Once you have created a CertStore object, you can retrieve certificates from the repository using the getCertificates method. This method takes a CertSelector (discussed in more detail later) object as an argument, which specifies a set of selection criteria for determining which certificates should be returned:

        public final Collection<? extends Certificate> getCertificates(CertSelector selector)
                throws CertStoreException

This method returns a Collection of java.security.cert.Certificate objects that satisfy the selection criteria. An empty Collection is returned if there are no matches. A CertStoreException is usually thrown if an unexpected error condition is encountered, such as a communications failure with a remote repository.

For some CertStore implementations, it may not be feasible to search the entire repository for certificates or CRLs that match the specified selection criteria. In these instances, the CertStore implementation may use information that is specified in the selectors to locate certificates and CRLs. For instance, an LDAP CertStore may not search all entries in the directory. Instead, it may just search entries that are likely to contain the certificates it is looking for. If the CertSelector provided does not provide enough information for the LDAP CertStore to determine which entries it should look in, the LDAP CertStore may throw a CertStoreException.

Retrieving CRLs

You can also retrieve CRLs from the repository using the getCRLs method. This method takes a CRLSelector (discussed in more detail later) object as an argument, which specifies a set of selection criteria for determining which CRLs should be returned:

        public final Collection<? extends CRL> getCRLs(CRLSelector selector)
                throws CertStoreException

This method returns a Collection of java.security.cert.CRL objects that satisfy the selection criteria. An empty Collection is returned if there are no matches.

The CertStoreParameters Interface

The CertStoreParameters interface is a transparent representation of the set of parameters used with a particular CertStore. Its main purpose is to group (and provide type safety for) all certificate storage parameter specifications. The CertStoreParameters interface extends the Cloneable interface and defines a clone method that does not throw an exception. Implementations of this interface should implement and override the Object.clone() method, if necessary. This allows applications to clone any CertStoreParameters object.

Objects implementing the CertStoreParameters interface are passed as arguments to the getInstance method of the CertStore class. Two classes implementing the CertStoreParameters interface are defined in this API: the LDAPCertStoreParameters and the CollectionCertStoreParameters classes.

The LDAPCertStoreParameters Class

The LDAPCertStoreParameters class is an implementation of the CertStoreParameters interface and holds a set of minimal initialization parameters (host and port number of the directory server) for retrieving certificates and CRLs from a CertStore of type LDAP.

Please refer to the LDAPCertStoreParameters API documentation for more detailed information on this class.

The CollectionCertStoreParameters Class

The CollectionCertStoreParameters class is an implementation of the CertStoreParameters interface and holds a set of initialization parameters for retrieving certificates and CRLs from a CertStore of type Collection.

Please refer to the CollectionCertStoreParameters API documentation for more detailed information on this class.

The CertSelector and CRLSelector Interfaces

The CertSelector and CRLSelector interfaces are a specification of the set of criteria for selecting certificates and CRLs from a collection or large group of certificates and CRLs. The interfaces group and provide type safety for all selector specifications. Each selector interface extends Cloneable and defines a clone() method that does not throw an exception. This allows applications to clone any CertSelector or CRLSelector object.

The CertSelector and CRLSelector interfaces each define a method named match. The match method takes a Certificate or CRL object as an argument and returns true if the object satisfies the selection criteria. Otherwise, it returns false. The match method for the CertSelector interface is defined as follows:

        public boolean match(Certificate cert)

and for the CRLSelector interface:

        public boolean match(CRL crl)

Typically, objects implementing these interfaces are passed as parameters to the getCertificates and getCRLs methods of the CertStore class. These methods return a Collection of Certificates or CRLs from the CertStore repository that match the specified selection criteria. CertSelectors may also be used to specify the validation constraints on a target or end-entity certificate in a certification path (see for example, the PKIXParameters.setTargetCertConstraints method.

The X509CertSelector Class

The X509CertSelector class is an implementation of the CertSelector interface that defines a set of criteria for selecting X.509 certificates. An X509Certificate object must match all of the specified criteria to be selected by the match method. The selection criteria are designed to be used by a CertPathBuilder implementation to discover potential certificates as it builds an X.509 certification path.

For example, the setSubject method of X509CertSelector allows a PKIX CertPathBuilder to filter out X509Certificates that do not match the issuer name of the preceding X509Certificate in a partially completed chain. By setting this and other criteria in an X509CertSelector object, a CertPathBuilder is able to discard irrelevant certificates and more easily find an X.509 certification path that meets the requirements specified in the CertPathParameters object.

Please refer to http://www.ietf.org/rfc/rfc3280.txt for definitions of the X.509 certificate extensions mentioned in this section.

Creating an X509CertSelector Object

An X509CertSelector object is created by calling the default constructor:

        public X509CertSelector()

No criteria are initially set (any X509Certificate will match).

Setting Selection Criteria

The selection criteria allow a caller to match on different components of an X.509 certificate. A few of the methods for setting selection criteria are described here. Please refer to the X509CertSelector API documentation for details on the other methods.

The setIssuer methods set the issuer criterion:

        public void setIssuer(X500Principal issuer)
        public void setIssuer(String issuerDN)
        public void setIssuer(byte[] issuerDN)

The specified distinguished name (in X500Principal, RFC 2253 String or ASN.1 DER encoded form) must match the issuer distinguished name in the certificate. If null, any issuer distinguished name will do. Note that use of an X500Principal to represent a distinguished name is preferred because it is more efficient and suitably typed.

Similarly, the setSubject methods set the subject criterion:

        public void setSubject(X500Principal subject)
        public void setSubject(String subjectDN)
        public void setSubject(byte[] subjectDN)

The specified distinguished name (in X500Principal, RFC 2253 String or ASN.1 DER encoded form) must match the subject distinguished name in the certificate. If null, any subject distinguished name will do.

The setSerialNumber method sets the serialNumber criterion:

        public void setSerialNumber(BigInteger serial)

The specified serial number must match the certificate serial number in the certificate. If null, any certificate serial number will do.

The setAuthorityKeyIdentifier method sets the authorityKeyIdentifier criterion:

        public void setAuthorityKeyIdentifier(byte[] authorityKeyID)

The certificate must contain an Authority Key Identifier extension matching the specified value. If null, no check will be done on the authorityKeyIdentifier criterion.

The setCertificateValid method sets the certificateValid criterion:

        public void setCertificateValid(Date certValid)

The specified date must fall within the certificate validity period for the certificate. If null, any date is valid.

The setKeyUsage method sets the keyUsage criterion:

        public void setKeyUsage(boolean[] keyUsage)

The certificate's Key Usage Extension must allow the specified key usage values (those which are set to true). If null, no keyUsage check will be done.

Getting Selection Criteria

The current values for each of the selection criteria can be retrieved using an appropriate get method. Please refer to the X509CertSelector API documentation for further details on these methods.

Example

Here is an example of retrieving X.509 certificates from an LDAP CertStore with the X509CertSelector class.

First, we create the LDAPCertStoreParameters object that we will use to initialize the CertStore object with the hostname and port of the LDAP server:

        LDAPCertStoreParameters lcsp = new
                LDAPCertStoreParameters("ldap.sun.com", 389);

Next, create the CertStore object, and pass it the LDAPCertStoreParameters object, as in the following statement:

        CertStore cs = CertStore.getInstance("LDAP", lcsp);

This call creates a CertStore object that retrieves certificates and CRLs from an LDAP repository using the schema defined in RFC 2587.

The following block of code establishes an X509CertSelector to retrieve all unexpired (as of the current date and time) end-entity certificates issued to a particular subject with 1) a key usage that allows digital signatures, and 2) a subject alternative name with a specific email address:

        X509CertSelector xcs = new X509CertSelector();
        // select only unexpired certificates
        xcs.setCertificateValid(new Date());
        // select only certificates issued to
        // 'CN=alice, O=xyz, C=us'
        xcs.setSubject(new X500Principal("CN=alice, O=xyz, C=us"));
        // select only end-entity certificates
        xcs.setBasicConstraints(-2);
        // select only certificates with a digitalSignature
        // keyUsage bit set (set the first entry in the
        // boolean array to true)
        boolean[] keyUsage = {true};
        xcs.setKeyUsage(keyUsage);
        // select only certificates with a subjectAltName of
        // 'alice@xyz.example.com' (1 is the integer value of
        // an RFC822Name)
        xcs.addSubjectAlternativeName(1, "alice@xyz.example.com");

Then we pass the selector to the getCertificates method of our CertStore object that we previously created:

        Collection<Certificate> certs = cs.getCertificates(xcs);

A PKIX CertPathBuilder may use similar code to help discover and sort through potential certificates by discarding those that do not meet validation constraints or other criteria.

The X509CRLSelector Class

The X509CRLSelector class is an implementation of the CRLSelector interface that defines a set of criteria for selecting X.509 CRLs. An X509CRL object must match all of the specified criteria to be selected by the match method. The selection criteria are designed to be useful to a CertPathValidator or CertPathBuilder implementation that must retrieve CRLs from a repository to check the revocation status of certificates in an X.509 certification path.

For example, the setDateAndTime method of X509CRLSelector allows a PKIX CertPathValidator to filter out X509CRLs that have been issued after or expire before the time indicated. By setting this and other criteria in an X509CRLSelector object, it allows the CertPathValidator to discard irrelevant CRLs and more easily check if a certificate has been revoked.

Please refer to http://www.ietf.org/rfc/rfc3280.txt for definitions of the X.509 CRL fields and extensions mentioned in this section.

Creating an X509CRLSelector Object

An X509CRLSelector object is created by calling the default constructor:

        public X509CRLSelector()

No criteria are initially set (any X509CRL will match).

Setting Selection Criteria

The selection criteria allow a caller to match on different components of an X.509 CRL. Most of the methods for setting selection criteria are described here. Please refer to the X509CRLSelector API documentation for details on the remaining methods.

The setIssuers and setIssuerNames methods set the issuerNames criterion:

        public void setIssuers(Collection<X500Principal> issuers)
        public void setIssuerNames(Collection<?> names)

The issuer distinguished name in the CRL must match at least one of the specified distinguished names. The setIssuers method is preferred as the use of X500Principals to represent distinguished names is more efficient and suitably typed. For the setIssuerNames method, each entry of the names argument is either a String or a byte array (representing the name, in RFC 2253 or ASN.1 DER encoded form, respectively). If null, any issuer distinguished name will do.

The setMinCRLNumber and setMaxCRLNumber methods set the minCRLNumber and maxCRLNumber criterion:

        public void setMinCRLNumber(BigInteger minCRL)
        public void setMaxCRLNumber(BigInteger maxCRL)

The CRL must have a CRL Number extension whose value is greater than or equal to the specified value if the setMinCRLNumber method is called, and less than or equal to the specified value if the setMaxCRLNumber method is called. If the value passed to one of these methods is null, the corresponding check is not done.

The setDateAndTime method sets the dateAndTime criterion:

        public void setDateAndTime(Date dateAndTime)

The specified date must be equal to or later than the value of the thisUpdate component of the CRL and earlier than the value of the nextUpdate component. If null, no dateAndTime check will be done.

The setCertificateChecking method sets the certificate whose revocation status is being checked:

        public void setCertificateChecking(X509Certificate cert)

This is not a criterion. Rather, it is optional information that may help a CertStore find CRLs that would be relevant when checking revocation for the specified certificate. If null is specified, then no such optional information is provided. An application should always call this method when checking revocation for a particular certificate, as it may provide the CertStore with more information for finding the correct CRLs and filtering out irrelevant ones.

Getting Selection Criteria

The current values for each of the selection criteria can be retrieved using an appropriate get method. Please refer to the X509CRLSelectorAPI documentation for further details on these methods.

Example

Creating an X509CRLSelector to retrieve CRLs from an LDAP repository is similar to the X509CertSelector example. Suppose we want to retrieve all current (as of the current date and time) CRLs issued by a specific CA and with a minimum CRL number. First, we create an X509CRLSelector object and call the appropriate methods to set the selection criteria:

        X509CRLSelector xcrls = new X509CRLSelector();
        // select CRLs satisfying current date and time
        xcrls.setDateAndTime(new Date());
        // select CRLs issued by 'O=xyz, C=us'
        xcrls.addIssuerName("O=xyz, C=us");
        // select only CRLs with a CRL number at least '2'
        xcrls.setMinCRLNumber(new BigInteger("2"));

Then we pass the selector to the getCRLs method of our CertStore object (created in the X509CertSelector example):

        Collection<CRL> crls = cs.getCRLs(xcrls);

PKIX Classes

The Java Certification Path API also includes a set of algorithm-specific classes modeled for use with the PKIX certification path validation algorithm defined in RFC 3280: Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile.

The TrustAnchor Class

This class represents a "most-trusted CA", which is used as a trust anchor for validating X.509 certification paths. A most-trusted CA includes the public key of the CA, the CA's name, and any constraints upon the set of paths which may be validated using this key. These parameters can be specified in the form of a trusted X509Certificate or as individual parameters.

All TrustAnchor objects are immutable and thread-safe. That is, multiple threads may concurrently invoke the methods defined in this class on a single TrustAnchor object (or more than one) with no ill effects. Requiring TrustAnchor objects to be immutable and thread-safe allows them to be passed around to various pieces of code without worrying about coordinating access.

Note that although this class is described as a PKIX class it may be used with other X.509 certification path validation algorithms.

Creating a TrustAnchor Object

To instantiate a TrustAnchor object, a caller must specify "the most-trusted CA" as a trusted X509Certificate or public key and distinguished name pair. The caller may also optionally specify name constraints that are applied to the trust anchor by the validation algorithm during initialization. Note that support for name constraints on trust anchors is not required by the PKIX algorithm, therefore a PKIX CertPathValidator or CertPathBuilder may choose not to support this parameter and instead throw an exception. Use one of the following constructors to create a TrustAnchor object:

        public TrustAnchor(X509Certificate trustedCert,
                byte[] nameConstraints)
        public TrustAnchor(X500Principal caPrincipal, PublicKey pubKey,
                byte[] nameConstraints)
        public TrustAnchor(String caName, PublicKey pubKey,
                byte[] nameConstraints)

The nameConstraints parameter is specified as a byte array containing the ASN.1 DER encoding of a NameConstraints extension. An IllegalArgumentException is thrown if the name constraints cannot be decoded (are not formatted correctly).

Getting Parameter Values

Each of the parameters can be retrieved using a corresponding get method:

        public final X509Certificate getTrustedCert()
        public final X500Principal getCA()
        public final String getCAName()
        public final PublicKey getCAPublicKey()
        public final byte[] getNameConstraints()
Note that the getTrustedCert method returns null if the trust anchor was specified as a public key and name pair. Likewise, the getCA, getCAName and getCAPublicKey methods return null if the trust anchor was specified as an X509Certificate.

The PKIXParameters Class

This class (which implements the CertPathParameters interface) specifies the set of input parameters defined by the PKIX certification path validation algorithm. It also includes a few additional useful parameters.

An X.509 CertPath object and a PKIXParameters object are passed as arguments to the validate method of a CertPathValidator instance implementing the PKIX algorithm. The CertPathValidator uses the parameters to initialize the PKIX certification path validation algorithm.

Creating a PKIXParameters Object

To instantiate a PKIXParameters object, a caller must specify "the most-trusted CA(s)" as defined by the PKIX validation algorithm. The most-trusted CAs can be specified using one of two constructors:

        public PKIXParameters(Set<TrustAnchor> trustAnchors)
            throws InvalidAlgorithmParameterException
        public PKIXParameters(KeyStore keystore)
            throws KeyStoreException, InvalidAlgorithmParameterException

The first constructor allows the caller to specify the most-trusted CAs as a Set of TrustAnchor objects. Alternatively, a caller can use the second constructor and specify a KeyStore instance containing trusted certificate entries, each of which will be considered as a most-trusted CA.

Setting Parameter Values

Once a PKIXParameters object has been created, a caller can set (or replace the current value of) various parameters. A few of the methods for setting parameters are described here. Please refer to the PKIXParameters API documentation for details on the other methods.

The setInitialPolicies method sets the initial policy identifiers, as specified by the PKIX validation algorithm. The elements of the Set are object identifiers (OIDs) represented as a String. If the initialPolicies parameter is null or not set, any policy is acceptable:

        public void setInitialPolicies(Set<String> initialPolicies)

The setDate method sets the time for which the validity of the path should be determined. If the date parameter is not set or is null, the current date is used:

        public void setDate(Date date)

The setPolicyMappingInhibited method sets the value of the policy mapping inhibited flag. The default value for the flag, if not specified, is false:

        public void setPolicyMappingInhibited(boolean val)

The setExplicitPolicyRequired method sets the value of the explicit policy required flag. The default value for the flag, if not specified, is false:

        public void setExplicitPolicyRequired(boolean val)

The setAnyPolicyInhibited method sets the value of the any policy inhibited flag. The default value for the flag, if not specified, is false:

        public void setAnyPolicyInhibited(boolean val)

The setTargetCertConstraints method allows the caller to set constraints on the target or end-entity certificate. For example, the caller can specify that the target certificate must contain a specific subject name. The constraints are specified as a CertSelector object. If the selector parameter is null or not set, no constraints are defined on the target certificate:

        public void setTargetCertConstraints(CertSelector selector)

The setCertStores method allows a caller to specify a List of CertStore objects that will be used by a PKIX implementation of CertPathValidator to find CRLs for path validation. This provides an extensible mechanism for specifying where to locate CRLs. The setCertStores method takes a List of CertStore objects as a parameter. The first CertStores in the list may be preferred to those that appear later.

        public void setCertStores(List<CertStore> stores)

The setCertPathCheckers method allows a caller to extend the PKIX validation algorithm by creating implementation-specific certification path checkers. For example, this mechanism can be used to process private certificate extensions. The setCertPathCheckers method takes a list of PKIXCertPathChecker (discussed later) objects as a parameter:

        public void setCertPathCheckers(List<PKIXCertPathChecker> checkers)

The setRevocationEnabled method allows a caller to disable revocation checking. Revocation checking is enabled by default, since it is a required check of the PKIX validation algorithm. However, PKIX does not define how revocation should be checked. An implementation may use CRLs or OCSP, for example. This method allows the caller to disable the implementation's default revocation checking mechanism if it is not appropriate. A different revocation checking mechanism can then be specified by calling the setCertPathCheckers method, and passing it a PKIXCertPathChecker that implements the alternate mechanism.

        public void setRevocationEnabled(boolean val)

The setPolicyQualifiersRejected method allows a caller to enable or disable policy qualifier processing. When a PKIXParameters object is created, this flag is set to true. This setting reflects the most common (and simplest) strategy for processing policy qualifiers. Applications that want to use a more sophisticated policy must set this flag to false.

        public void setPolicyQualifiersRejected(boolean qualifiersRejected)
Getting Parameter Values

The current values for each of the parameters can be retrieved using an appropriate get method. Please refer to the PKIXParameters API documentation for further details on these methods.

The PKIXCertPathValidatorResult Class

This class (which implements the CertPathValidatorResult interface) represents the result of the PKIX certification path validation algorithm. It holds the valid policy tree and subject public key resulting from the validation algorithm, and includes methods (getPolicyTree() and getPublicKey()) for returning them. Instances of PKIXCertPathValidatorResult are returned by the validate method of CertPathValidator objects implementing the PKIX algorithm.

Please refer to the PKIXCertPathValidatorResult API documentation for more detailed information on this class.

The PolicyNode Interface and PolicyQualifierInfo Class

The PKIX validation algorithm defines several outputs related to certificate policy processing. Most applications will not need to use these outputs, but all providers that implement the PKIX validation or building algorithm must support them.

The PolicyNode interface represents a node of a valid policy tree resulting from a successful execution of the PKIX certification path validation. An application can obtain the root of a valid policy tree using the getPolicyTree method of PKIXCertPathValidatorResult. Policy Trees are discussed in more detail in the PKIX Certificate and CRL Profile.

The getPolicyQualifiers method of PolicyNode returns a Set of PolicyQualifierInfo objects, each of which represents a policy qualifier contained in the Certificate Policies extension of the relevant certificate that this policy applies to.

Most applications will not need to examine the valid policy tree and policy qualifiers. They can achieve their policy processing goals by setting the policy-related parameters in PKIXParameters. However, the valid policy tree is available for more sophisticated applications, especially those that process policy qualifiers.

Please refer to the PolicyNode and PolicyQualifierInfo API documentation for more detailed information on these classes.

Example of Validating a Certification Path using the PKIX algorithm

This is an example of validating a certification path with the PKIX validation algorithm. The example ignores most of the exception handling and assumes that the certification path and public key of the trust anchor have already been created.

First, create the CertPathValidator, as in the following line:

    CertPathValidator cpv = CertPathValidator.getInstance("PKIX");

The next step is to create a TrustAnchor object. This will be used as an anchor for validating the certification path. In this example, the most-trusted CA is specified as a public key and name (name constraints are not applied and are specified as null):

    TrustAnchor anchor = new TrustAnchor("O=xyz,C=us", pubkey, null);

The next step is to create a PKIXParameters object. This will be used to populate the parameters used by the PKIX algorithm. In this example, we pass to the constructor a Set containing a single element - the TrustAnchor we created in the previous step:

    PKIXParameters params = new PKIXParameters(Collections.singleton(anchor));

Next, we populate the parameters object with constraints or other parameters used by the validation algorithm. In this example, we enable the explicitPolicyRequired flag and specify a set of initial policy OIDs (the contents of the set are not shown):

    // set other PKIX parameters here
    params.setExplicitPolicyRequired(true);
    params.setInitialPolicies(policyIds);

The final step is to validate the certification path using the input parameter set we have created:

    try {
        PKIXCertPathValidatorResult result =
            (PKIXCertPathValidatorResult) cpv.validate(certPath, params);
        PolicyNode policyTree = result.getPolicyTree();
        PublicKey subjectPublicKey = result.getPublicKey();
    } catch (CertPathValidatorException cpve) {
        System.out.println("Validation failure, cert["
            + cpve.getIndex() + "] :" + cpve.getMessage());
    }

If the validation algorithm is successful, the policy tree and subject public key resulting from the validation algorithm are obtained using the getPolicyTree and getPublicKey methods of PKIXCertPathValidatorResult.

Otherwise, a CertPathValidatorException is thrown and the caller can catch the exception and print some details about the failure, such as the error message and the index of the certificate that caused the failure.

The PKIXBuilderParameters Class

This class (which extends the PKIXParameters class) specifies the set of parameters to be used with CertPathBuilders that build certification paths validated against the PKIX certification path validation algorithm.

A PKIXBuilderParameters object is passed as an argument to the build method of a CertPathBuilder instance implementing the PKIX algorithm. All PKIX CertPathBuilders must return certification paths which have been validated according to the PKIX certification path validation algorithm.

Please note that the mechanism that a PKIX CertPathBuilder uses to validate a constructed path is an implementation detail. For example, an implementation might attempt to first build a path with minimal validation and then fully validate it using an instance of a PKIX CertPathValidator, whereas a more efficient implementation may validate more of the path as it is building it, and backtrack to previous stages if it encounters validation failures or dead-ends.

Creating a PKIXBuilderParameters Object

Creating a PKIXBuilderParameters object is similar to creating a PKIXParameters object. However, a caller must specify constraints on the target or end-entity certificate when creating a PKIXBuilderParameters object. These constraints should provide the CertPathBuilder with enough information to find the target certificate. The constraints are specified as a CertSelector object. Use one of the following constructors to create a PKIXBuilderParameters object:

        public PKIXBuilderParameters(Set<TrustAnchor> trustAnchors,
                CertSelector targetConstraints)
                throws InvalidAlgorithmParameterException
        public PKIXBuilderParameters(KeyStore keystore,
                CertSelector targetConstraints)
                throws KeyStoreException, InvalidAlgorithmParameterException
Getting/Setting Parameter Values

The PKIXBuilderParameters class inherits all of the parameters that can be set in the PKIXParameters class. In addition, the setMaxPathLength method can be called to place a limit on the maximum number of certificates in a certification path:

        public void setMaxPathLength(int maxPathLength)

The maxPathLength parameter specifies the maximum number of non-self-issued intermediate certificates that may exist in a certification path. A CertPathBuilder instance implementing the PKIX algorithm must not build paths longer than the length specified. If the value is 0, the path can only contain a single certificate. If the value is -1, the path length is unconstrained (i.e., there is no maximum). The default maximum path length, if not specified, is 5. This method is useful to prevent the CertPathBuilder from spending resources and time constructing long paths that may or may not meet the caller's requirements.

If any of the CA certificates in the path contain a Basic Constraints extension, the value of the pathLenConstraint component of the extension overrides the value of the maxPathLength parameter whenever the result is a certification path of smaller length. There is also a corresponding getMaxPathLength method for retrieving this parameter:

        public int getMaxPathLength()

Also, the setCertStores method (inherited from the PKIXParameters class) is typically used by a PKIX implementation of CertPathBuilder to find Certificates for path construction as well as finding CRLs for path validation. This provides an extensible mechanism for specifying where to locate Certificates and CRLs.

The PKIXCertPathBuilderResult Class

This class (which extends the PKIXCertPathValidatorResult class and implements the CertPathBuilderResult interface) represents the successful result of the PKIX certification path construction algorithm. Instances of PKIXCertPathBuilderResult are returned by the build method of CertPathBuilder objects implementing the PKIX algorithm.

The getCertPath method of a PKIXCertPathBuilderResult instance always returns a CertPath object validated using the PKIX certification path validation algorithm. The returned CertPath object does not include the most-trusted CA certificate that may have been used to anchor the path. Instead, use the getTrustAnchor method to get the Certificate of the most-trusted CA.

Please refer to the PKIXCertPathBuilderResult API documentation for more detailed information on this class.

Example of Building a Certification Path using the PKIX algorithm

This is an example of building a certification path validated against the PKIX algorithm. Some details have been left out, such as exception handling, and the creation of the trust anchors and certificates for populating the CertStore.

First, create the CertPathBuilder, as in the following example:

    CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");

This call creates a CertPathBuilder object that returns paths validated against the PKIX algorithm.

The next step is to create a PKIXBuilderParameters object. This will be used to populate the PKIX parameters used by the CertPathBuilder:

    // Create parameters object, passing it a Set of
    // trust anchors for anchoring the path
    // and a target subject DN.
    X509CertSelector targetConstraints = new X509CertSelector();
    targetConstraints.setSubject("CN=alice,O=xyz,C=us");
    PKIXBuilderParameters params =
        new PKIXBuilderParameters(trustAnchors, targetConstraints);

The next step is to specify the CertStore that the CertPathBuilder will use to look for certificates and CRLs. For this example, we will populate a Collection CertStore with the certificates and CRLs:

    CollectionCertStoreParameters ccsp =
        new CollectionCertStoreParameters(certsAndCrls);
    CertStore store = CertStore.getInstance("Collection", ccsp);
    params.addCertStore(store);

The next step is to build the certification path using the input parameter set we have created:

    try {
        PKIXCertPathBuilderResult result =
            (PKIXCertPathBuilderResult) cpb.build(params);
        CertPath cp = result.getCertPath();
    } catch (CertPathBuilderException cpbe) {
        System.out.println("build failed: " + cpbe.getMessage());
    }

If the CertPathBuilder cannot build a path that meets the supplied parameters it will throw a CertPathBuilderException. Otherwise, the validated certification path can be obtained from the PKIXCertPathBuilderResult using the getCertPath method.

The PKIXCertPathChecker Class

This section describes a powerful class that allows a user to extend a PKIX CertPathValidator or CertPathBuilder implementation. This is an advanced feature that most users will not need to understand. However, anyone implementing a PKIX service provider should read this section.

The PKIXCertPathChecker class is an abstract class that executes one or more checks on an X.509 certificate. Developers should create concrete implementations of the PKIXCertPathChecker class when it is necessary to dynamically extend a PKIX CertPathValidator or CertPathBuilder implementation at runtime. The following are a few examples of when a PKIXCertPathChecker implementation is useful:

  • If the revocation mechanism supplied by a PKIX CertPathValidator or CertPathBuilder implementation is not adequate: For example, you can use the PKIXRevocationChecker class (introduced in JDK 8; see Check Revocation Status of Certificates with PKIXRevocationChecker Class) to have more control over the revocation mechanism, or you can implement your own PKIXCertPathChecker to check that certificates have not been revoked.

  • If the user wants to recognize certificates containing a critical private extension. Since the extension is private, it will not be recognized by the PKIX CertPathValidator or CertPathBuilder implementation and a CertPathValidatorException will be thrown. In this case, a developer can implement a PKIXCertPathChecker that recognizes and processes the critical private extension.

  • If the developer wants to record information about each certificate processed for debugging or display purposes.

  • If the user wants to reject certificates with certain policy qualifiers.

The setCertPathCheckers method of the PKIXParameters class allows a user to pass a List of PKIXCertPathChecker objects to a PKIX CertPathValidator or CertPathBuilder implementation. Each of the PKIXCertPathChecker objects will be called in turn, for each certificate processed by the PKIX CertPathValidator or CertPathBuilder implementation.

Creating and using a PKIXCertPathChecker Object

The PKIXCertPathChecker class does not have a public constructor. This is intentional, since creating an instance of PKIXCertPathChecker is an implementation-specific issue. For example, the constructor for a PKIXCertPathChecker implementation that uses OCSP to check a certificate's revocation status may require the hostname and port of the OCSP server:

        PKIXCertPathChecker checker = new OCSPChecker("ocsp.sun.com", 1321);

Once the checker has been instantiated, it can be added as a parameter using the addCertPathChecker method of the PKIXParameters class:

        params.addCertPathChecker(checker);

Alternatively, a List of checkers can be added using the setCertPathCheckers method of the PKIXParameters class.

Implementing a PKIXCertPathChecker Object

The PKIXCertPathChecker class is abstract. It has four methods (check, getSupportedExtensions, init, and isForwardCheckingSupported) that all concrete subclasses must implement.

Implementing a PKIXCertPathChecker may be trivial or complex. A PKIXCertPathChecker implementation can be stateless or stateful. A stateless implementation does not maintain state between successive calls of the check method. For example, a PKIXCertPathChecker that checks that each certificate contains a particular policy qualifier is stateless. In contrast, a stateful implementation does maintain state between successive calls of the check method. The check method of a stateful implementation usually depends on the contents of prior certificates in the certification path. For example, a PKIXCertPathChecker that processes the NameConstraints extension is stateful.

Also, the order in which the certificates processed by a service provider implementation are presented (passed) to a PKIXCertPathChecker is very important, especially if the implementation is stateful. Depending on the algorithm used by the service provider, the certificates may be presented in reverse or forward order. A reverse ordering means that the certificates are ordered from the most trusted CA (if present) to the target subject, whereas a forward ordering means that the certificates are ordered from the target subject to the most trusted CA. The order must be made known to the PKIXCertPathChecker implementation, so that it knows how to process consecutive certificates.

Initializing a PKIXCertPathChecker Object

The init method initializes the internal state of the checker:

        public abstract void init(boolean forward)

All stateful implementations should clear or initialize any internal state in the checker. This prevents a service provider implementation from calling a checker that is in an uninitialized state. It also allows stateful checkers to be reused in subsequent operations without reinstantiating them. The forward parameter indicates the order of the certificates presented to the PKIXCertPathChecker. If forward is true, the certificates are presented from target to trust anchor; if false, from trust anchor to target.

Forward Checking

The isForwardCheckingSupported method returns a boolean that indicates if the PKIXCertPathChecker supports forward checking:

        public abstract boolean isForwardCheckingSupported()

All PKIXCertPathChecker implementations mustsupport reverse checking. A PKIXCertPathChecker implementation maysupport forward checking.

Supporting forward checking improves the efficiency of CertPathBuilders that build forward, since it allows paths to be checked as they are built. However, some stateful PKIXCertPathCheckers may find it difficult or impossible to support forward checking.

Supported Extensions

The getSupportedExtensions method returns an immutable Set of OID Strings for the X.509 extensions that the PKIXCertPathChecker implementation supports (i.e., recognizes, is able to process):

        public abstract Set<String> getSupportedExtensions()

The method should return null if no extensions are processed. All implementations should return the Set of OID Strings that the check method may process.

A CertPathBuilder can use this information to identify certificates with unrecognized critical extensions, even when performing a forward build with a PKIXCertPathChecker that does not support forward checking.

Executing the Check

The following method executes a check on the certificate:

        public abstract void
                check(Certificate cert, Collection<String> unresolvedCritExts)
                throws CertPathValidatorException

The unresolvedCritExts parameter contains a collection of OIDs as Strings. These OIDs represent the set of critical extensions in the certificate that have not yet been resolved by the certification path validation algorithm. Concrete implementations of the check method should remove any critical extensions that it processes from the unresolvedCritExts parameter.

If the certificate does not pass the check(s), a CertPathValidatorException should be thrown.

Cloning a PKIXCertPathChecker

The PKIXCertPathChecker class implements the Cloneable interface. All stateful PKIXCertPathChecker implementations must override the clone method if necessary. The default implementation of the clone method calls the Object.clone method, which performs a simple clone by copying all fields of the original object to the new object. A stateless implementation should not override the clone method. However, all stateful implementations must ensure that the default clone method is correct, and override it if necessary. For example, a PKIXCertPathChecker that stores state in an array must override the clone method to make a copy of the array, rather than just a reference to the array.

The reason that PKIXCertPathChecker objects are Cloneable is to allow a PKIX CertPathBuilder implementation to efficiently backtrack and try another path when a potential certification path reaches a dead end or point of failure. In this case, the implementation is able to restore prior path validation states by restoring the cloned objects.

Example

This is an example of a stateless PKIXCertPathChecker implementation. It checks if a private extension exists in a certificate and processes it according to some rules.

        import java.security.cert.Certificate;
        import java.security.cert.X509Certificate;
        import java.util.Collection;
        import java.util.Collections;
        import java.util.Set;
        import java.security.cert.PKIXCertPathChecker;
        import java.security.cert.CertPathValidatorException;

        public class MyChecker extends PKIXCertPathChecker {
            private static Set supportedExtensions =
                Collections.singleton("2.16.840.1.113730.1.1");

            /*
             * Initialize checker
             */
            public void init(boolean forward)
                throws CertPathValidatorException {
                // nothing to initialize
            }

            public Set getSupportedExtensions() {
                return supportedExtensions;
            }

            public boolean isForwardCheckingSupported() {
                return true;
            }

            /*
             * Check certificate for presence of Netscape's
             * private extension
             * with OID "2.16.840.1.113730.1.1"
             */
            public void check(Certificate cert,
                              Collection unresolvedCritExts)
                throws CertPathValidatorException
            {
                X509Certificate xcert = (X509Certificate) cert;
                byte[] ext =
                    xcert.getExtensionValue("2.16.840.1.113730.1.1");
                if (ext == null)
                    return;

                //
              // process private extension according to some
                // rules - if check fails, throw a
                // CertPathValidatorException ...
                // {insert code here}

                // remove extension from collection of unresolved
                // extensions (if it exists)
                if (unresolvedCritExts != null)
                    unresolvedCritExts.remove("2.16.840.1.113730.1.1");
            }
        }
How a PKIX Service Provider implementation should use a PKIXCertPathChecker

Each PKIXCertPathChecker object must be initialized by a service provider implementation before commencing the build or validation algorithm, for example:

        List<PKIXCertPathChecker> checkers = params.getCertPathCheckers();
        for (PKIXCertPathChecker checker : checkers) {
            checker.init(false);
        }

For each certificate that it validates, the service provider implementation must call the check method of each PKIXCertPathChecker object in turn, passing it the certificate and any remaining unresolved critical extensions:

        for (PKIXCertPathChecker checker : checkers) {
            checker.check(cert, unresolvedCritExts);
        }

If any of the checks throw a CertPathValidatorException, a CertPathValidator implementation should terminate the validation procedure. However, a CertPathBuilder implementation may simply log the failure and continue to search for other potential paths. If all of the checks are successful, the service provider implementation should check that all critical extensions have been resolved and if not, consider the validation to have failed. For example:

        if (unresolvedCritExts != null &&
            !unresolvedCritExts.isEmpty())
        {
            // note that a CertPathBuilder may have an enclosing
            // try block to catch the exception below and continue on error
            throw new CertPathValidatorException
                ("Unrecognized Critical Extension");
        }

As discussed in the previous section, a CertPathBuilder implementation may need to backtrack when a potential certification path reaches a dead end or point of failure. Backtracking in this context implies returning to the previous certificate in the path and checking for other potential paths. If the CertPathBuilder implementation is validating the path as it is building it, it will need to restore the previous state of each PKIXCertPathChecker. It can do this by making clones of the PKIXCertPathChecker objects before each certificate is processed, for example:

        /* clone checkers */
        List newList = new ArrayList(checkers);
        ListIterator li = newList.listIterator();
        while (li.hasNext()) {
            PKIXCertPathChecker checker = (PKIXCertPathChecker) li.next();
            li.set(checker.clone());
        }

Using PKIXCertPathChecker in Certificate Path Validation

Using a PKIXCertPathChecker to customize certificate path validation is relatively straightforward.

Basic Certification Path Validation

First, consider code that validates a certificate path:

Set<TrustAnchor> trustAnchors = getTrustAnchors();
CertPath cp = getCertPath();

PKIXParameters pkixp = new PKIXParameters(trustAnchors);
pkixp.setRevocationEnabled(false);

CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
PKIXCertPathValidatorResult pcpvr =
    (PKIXCertPathValidatorResult)cpv.validate(cp, pkixp);

If the validation fails, the validate() method throws an exception.

The fundamental steps are as follows:

  1. Obtain the CA root certificates and the certification path to be validated.
  2. Create a PKIXParameters with the trust anchors.
  3. Use a CertPathValidator to validate the certificate path.

In this example, getTrustAnchors() and getCertPath() are the methods that obtain CA root certificates and the certification path.

The getTrustAnchors() method in the example must return a Set of TrustAnchors that represent the CA root certificates you wish to use for validation. Here is one simple implementation that loads a single CA root certificate from a file:

public Set<TrustAnchor> getTrustAnchors()
    throws IOException, CertificateException {
  InputStream in = new FileInputStream("x509_ca-certificate.cer");
  CertificateFactory cf = CertificateFactory.getInstance("X.509");
  X509Certificate c = (X509Certificate)cf.generateCertificate(in);
  in.close();

  TrustAnchor anchor = new TrustAnchor(c, null);
  return Collections.singleton(anchor);
}

Similarly, here is a simple implementation of getCertPath() that loads a certificate path from a file:

public CertPath getCertPath() throws IOException, CertificateException {
  CertificateFactory cf = CertificateFactory.getInstance("X.509");

  InputStream in = new FileInputStream("certpath.pkcs7");
  CertPath cp = cf.generateCertPath(in, "PKCS7");
  in.close();

  return cp;
}

Note that PKCS#7 does not require a specific order for the certificates in the file, so this code only works for certification path validation when the certificates are ordered starting from the entity to be validated and progressing back toward the CA root. If the certificates are not in the right order, you need to do some additional processing. CertificateFactory has a generateCertPath() method that accepts a Collection, which is useful for this type of processing.

Adding in a PKIXCertPathChecker

To customize certification path validation, add a PKIXCertPathChecker as follows. In this example, SimpleChecker is a PKIXCertPathChecker subclass. The new lines are shown in bold.

Set<TrustAnchor> trustAnchors = getTrustAnchors();
CertPath cp = getCertPath();

PKIXParameters pkixp = new PKIXParameters(trustAnchors);
pkixp.setRevocationEnabled(false);

SimpleChecker sc = new SimpleChecker();
pkixp.addCertPathChecker(sc);

CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
PKIXCertPathValidatorResult pcpvr =
    (PKIXCertPathValidatorResult)cpv.validate(cp, pkixp);

SimpleChecker is a rudimentary subclass of PKIXCertPathChecker. Its check() method is called for every certificate in the certification path that is being validated. SimpleChecker uses an AlgorithmConstraints implementation to examine the signature algorithm and public key of each certificate.

import java.security.AlgorithmConstraints;
import java.security.CryptoPrimitive;
import java.security.Key;
import java.security.cert.*;
import java.util.*;

public class SimpleChecker extends PKIXCertPathChecker {
  private final static Set<CryptoPrimitive> SIGNATURE_PRIMITIVE_SET =
      EnumSet.of(CryptoPrimitive.SIGNATURE);

  public void init(boolean forward) throws CertPathValidatorException {}

  public boolean isForwardCheckingSupported() { return true; }

  public Set<String> getSupportedExtensions() { return null; }

  public void check(Certificate cert,
      Collection<String> unresolvedCritExts)
      throws CertPathValidatorException {
    X509Certificate c = (X509Certificate)cert;
    String sa = c.getSigAlgName();
    Key key = c.getPublicKey();

    AlgorithmConstraints constraints = new SimpleConstraints();

    if (constraints.permits(SIGNATURE_PRIMITIVE_SET, sa, null) == false)
      throw new CertPathValidatorException("Forbidden algorithm: " + sa);

    if (constraints.permits(SIGNATURE_PRIMITIVE_SET, key) == false)
      throw new CertPathValidatorException("Forbidden key: " + key);
  }
}

Finally, SimpleConstraints is a rather severe AlgorithmConstraints implementation that allows only RSA algorithms and requires keys to be 2048 bits or larger.

import java.security.AlgorithmConstraints;
import java.security.AlgorithmParameters;
import java.security.CryptoPrimitive;
import java.security.Key;
import java.security.interfaces.RSAKey;
import java.util.Set;

public class SimpleConstraints implements AlgorithmConstraints {
  public boolean permits(Set<CryptoPrimitive> primitives,
      String algorithm, AlgorithmParameters parameters) {
    return permits(primitives, algorithm, null, parameters);
  }

  public boolean permits(Set<CryptoPrimitive> primitives, Key key) {
    return permits(primitives, null, key, null);
  }

  public boolean permits(Set<CryptoPrimitive> primitives,
      String algorithm, Key key, AlgorithmParameters parameters) {
    if (algorithm == null) algorithm = key.getAlgorithm();

    if (algorithm.indexOf("RSA") == -1) return false;

    if (key != null) {
      RSAKey rsaKey = (RSAKey)key;
      int size = rsaKey.getModulus().bitLength();
      if (size < 2048) return false;
    }

    return true;
  }
}
Check Revocation Status of Certificates with PKIXRevocationChecker Class

The PKIXRevocationChecker class (introduced in JDK 8), which is a subclass of PKIXCertPathChecker, checks the revocation status of certificates with the PKIX algorithm.

An instance of PKIXRevocationChecker checks the revocation status of certificates with the Online Certificate Status Protocol (OCSP) or Certificate Revocation Lists (CRLs). OCSP is described in RFC 2560 and is a network protocol for determining the status of a certificate. A CRL is a time-stamped list identifying revoked certificates, and RFC 5280 describes an algorithm for determining the revocation status of certificates using CRLs.

Each PKIX CertPathValidator and CertPathBuilder instance provides a default revocation implementation that is enabled by default. If you want more control over the revocation settings used by that implementation, use the PKIXRevocationChecker class.

Follow these general steps to check the revocation status of a certificate path with the PKIXRevocationChecker class:

  1. Obtain a PKIXRevocationChecker instance by calling the getRevocationChecker method of a PKIX CertPathValidator or CertPathBuilder instance.

  2. Set additional parameters and options specific to certificate revocation with methods contained in the PKIXRevocationChecker class. These methods include setOCSPResponder(URI), which sets the URI that identifies the location of the OCSP responder (although normally the URI is included in the certificate and does not have to be set) and setOptions(Set<PKIXRevocationChecker.Option>), which sets revocation options. PKIXRevocationChecker.Option is an enumerated type used to specify the following options:

    • ONLY_END_ENTITY: Only check the revocation status of end-entity certificates.
    • PREFER_CRLS: By default, OCSP is the preferred mechanism for checking revocation status, with CRLs as the fallback mechanism. Switch this preference to CRLs with this option.
    • SOFT_FAIL: Ignore network failures.

  3. After obtaining an instance of PKIXRevocationChecker, add it to a PKIXParameters or PKIXBuilderParameters object with the addCertPathChecker or setCertPathCheckers method.

  4. Follow one of these steps depending on whether you are using a PKIX CertPathValidator or CertPathBuilder instance:

    • If you are using a PKIX CertPathValidator instance, call the validate method using as arguments the certificate path you want to validate and the PKIXParameters object that contains a revocation checker.

    • If you are using a PKIX CertPathBuilder instance, call the build method using as arguments the PKIXBuilderParameters object that contains a revocation checker.

  5. Call the validate method of the PKIX CertPathValidator or CertPathBuilder instance using as arguments the certificate path you want to validate and the PKIXParameters or PKIXBuilderParameters object that contains a revocation checker.

The following excerpt checks the revocation status of certificates contained in a certificate path. The CertPath object path is the certificate path, and params is an object of type PKIXParameters:

    CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
    PKIXRevocationChecker rc = (PKIXRevocationChecker)cpv.getRevocationChecker();
    rc.setOptions(EnumSet.of(Option.SOFT_FAIL));
    params.addCertPathChecker(rc);
    params.setRevocationEnabled(false);
    CertPathValidatorResult res = cpv.validate(path, params);

In this excerpt, the SOFT_FAIL option causes the revocation checker to ignore any network failures (such as failing to establish a connection to the OCSP server) when it checks the revocation status.

Implementing a Service Provider

This section is intended for experienced programmers wishing to create their own provider packages supplying certification path service implementations. This section assumes you have read the document: How to Implement a Provider for the Java Cryptography Architecture.

The following engine classes are defined in the Java Certification Path API:

  • CertPathValidator - used to validate certification paths

  • CertPathBuilder - used to build certification paths

  • CertStore - used to retrieve certificates and CRLs from a repository

In addition, the pre-existing CertificateFactory engine class was enhanced in the JDK 1.4 to support generation of certification paths.

The application interfaces supplied by an engine class are implemented in terms of a "Service Provider Interface" (SPI). The name of each SPI class is the same as that of the corresponding engine class, followed by "Spi". For example, the SPI class corresponding to the CertPathValidator engine class is the CertPathValidatorSpi class. Each SPI class is abstract. To supply the implementation of a particular type of service, for a specific algorithm or type, a provider must subclass the corresponding SPI class and provide implementations for all the abstract methods. For example, the CertStore class provides access to the functionality of retrieving certificates and CRLs from a repository. The actual implementation supplied in a CertStoreSpi subclass would be that for a specific type of certificate repository, such as LDAP.

Steps to Implement and Integrate a Provider

Developers should follow the required steps listed in the How To Implement A Provider for the Java Cryptography Architecture document. Here are some additional rules to follow for certain steps:

Step 3: Write your "Master Class", a subclass of Provider

These are the properties that must be defined for the certification path services, where the algorithm name is substituted for algName, and certstore type for storeType:

  • CertPathValidator.algName

  • CertPathBuilder.algName

  • CertStore.storeType

See Appendix A for the standard names that are defined for algName and storeType. The value of each property must be the fully qualified name of the class implementing the specified algorithm, or certstore type. That is, it must be the package name followed by the class name, where the two are separated by a period. For example, a provider sets the CertPathValidator.PKIX property to have the value "sun.security.provider.certpath.PKIXCertPathValidator" as follows:

put("CertPathValidator.PKIX", "sun.security.provider.certpath.PKIXCertPathValidator")

In addition, service attributes can be defined for the certification path services. These attributes can be used as filters for selecting service providers. See Appendix A for the definition of some standard service attributes. For example, a provider may set the ValidationAlgorithm service attribute to the name of an RFC or specification that defines the PKIX validation algorithm:

put("CertPathValidator.PKIX ValidationAlgorithm", "RFC3280");

Step 8: Document your Provider and its Supported Services

Certification path service providers should document the following information for each SPI:

Certificate Factories

A provider should document what types of certification paths (and the version numbers of the certificates in the path, if relevant) can be created by the factory. A provider should describe the ordering of the certificates in the certification path, as well as the contents.

A provider should document the list of encoding formats supported. This is not technically necessary, since the client can request them by calling the getCertPathEncodings method. However, the documentation should describe each encoding format in more detail and reference any standards when applicable.

Certification Path Validators

A provider should document any relevant information regarding the CertPathValidator implementation, including the types of certification paths that it validates. In particular, a PKIX CertPathValidator implementation should document the following information:

  • The RFC or specification it is compliant with.
  • The mechanism it uses to check that certificates have not been revoked.
  • Any optional certificate or CRL extensions that it recognizes and how it processes them.

Certification Path Builders

A provider should document any relevant information regarding the CertPathBuilder implementation, including the types of certification paths that it creates and whether or not they are validated. In particular a PKIX CertPathBuilder implementation should document the following information:

  • The RFC or specification it is compliant with.
  • The mechanism it uses to check that certificates have not been revoked.
  • Any optional certificate or CRL extensions that it recognizes and how it processes them.
  • Details on the algorithm it uses for finding certification paths. Ex: depth-first, breadth-first, forward (i.e., from target to trust anchor(s)), reverse (i.e., from trust anchor(s) to target).
  • The algorithm it uses to select and sort potential certificates. For example, given two certificates that are potential candidates for the next certificate in the path, what criteria are used to select one before the other? What criteria are used to reject a certificate?
  • If applicable, the algorithm it uses for backtracking or constructing another path (i.e., when potential paths do not meet constraints).
  • The types of CertStore implementations that have been tested. The implementation should be designed to work with any CertStore type, but this information may still be useful.

All CertPathBuilder implementations should provide additional debugging support, in order to analyze and correct potential path building problems. Details on how to access this debugging information should be documented.

Certificate/CRL Stores

A provider should document what types of certificates and CRLs (and the version numbers, if relevant) are retrieved by the CertStore.

A provider should also document any relevant information regarding the CertStore implementation (such as protocols used or formats supported). For example, an LDAP CertStore implementation should describe which versions of LDAP are supported and which standard attributes are used for finding certificates and CRLs. It should also document if the implementation caches results, and for how long (i.e., under what conditions are they refreshed).

If the implementation returns the certificates and CRLs in a particular order, it should describe the sorting algorithm. An implementation should also document any additional or default initialization parameters.

Finally, an implementation should document if and how it uses information in the CertSelector or CRLSelector objects to find certificates and CRLs.

Service Interdependencies

Here are some common types of algorithm interdependencies in certification path service implementations:

Certification Path Validation and Signature Algorithms

A CertPathValidator implementation often requires use of a signature algorithm to verify each certificate's digital signature. The setSigProvider method of the PKIXParameters class allows a user to specify a specific Signature provider.

Certification Path Builders and Certificate Factories

A CertPathBuilder implementation will often utilize a CertificateFactory to generate a certification path from a list of certificates.

CertStores and Certificate Factories

A CertStore implementation will often utilize a CertificateFactory to generate certificates and CRLs from their encodings. For example, an LDAP CertStore implementation may use an X.509 CertificateFactory to generate X.509 certificates and CRLs from their ASN.1 encoded form.

Certification Path Parameter Specification Interfaces

The Certification Path API contains two interfaces representing transparent specifications of parameters, the CertPathParameters and CertStoreParameters interfaces.

Two implementations of the CertPathParameters interface are included, the PKIXParameters and PKIXBuilderParameters classes. If you are working with PKIX certification path validation and algorithm parameters, you can utilize these classes. If you need parameters for a different algorithm, you will need to supply your own CertPathParameters implementation for that algorithm.

Two implementations of the CertStoreParameters interface are included, the LDAPCertStoreParameters and the CollectionCertStoreParameters classes. These classes are to be used with LDAP and Collection CertStore implementations, respectively. If you need parameters for a different repository type, you will need to supply your own CertStoreParameters implementation for that type.

The CertPathParameters and CertStoreParameters interfaces each define a clone method that implementations should override. A typical implementation will perform a "deep" copy of the object, such that subsequent changes to the copy will not affect the original (and vice versa). However, this is not an absolute requirement for implementations of CertStoreParameters. A shallow copy implementation of clone is more appropriate for applications that need to hold a reference to a parameter contained in the CertStoreParameters. For example, since CertStore.getInstance makes a clone of the specified CertStoreParamters, a shallow copy clone allows an application to hold a reference to and later release the resources of a particular CertStore initialization parameter, rather than waiting for the garbage collection mechanism. This should be done with the utmost care, since the CertStore may still be in use by other threads.

Certification Path Result Specification Interfaces

The Certification Path API contains two interfaces representing transparent specifications of results, the CertPathValidatorResult and CertPathBuilderResult interfaces.

One implementation for each of the interfaces is included: the PKIXCertPathValidatorResult and PKIXCertPathBuilderResult classes. If you are implementing PKIX certification path service providers, you can utilize these classes. If you need certification path results for a different algorithm, you will need to supply your own CertPathValidatorResult or CertPathBuilderResult implementation for that algorithm.

A PKIX implementation of a CertPathValidator or a CertPathBuilder may find it useful to store additional information in the PKIXCertPathValidatorResult or PKIXCertPathBuilderResult, such as debugging traces. In these cases, the implementation should implement a subclass of the appropriate result class with methods to retrieve the relevant information. These classes must be shipped with the provider classes, for example, as part of the provider JAR file.

Certification Path Exception Classes

The Certification Path API contains a set of exception classes for handling errors. CertPathValidatorException, CertPathBuilderException, and CertStoreException are subclasses of GeneralSecurityException.

You may need to extend these classes in your service provider implementation. For example, a CertPathBuilder implementation may provide additional information such as debugging traces when a CertPathBuilderException is thrown. The implementation may throw a subclass of CertPathBuilderException that holds this information. Likewise, a CertStore implementation can provide additional information when a failure occurs by throwing a subclass of CertStoreException. Also, you may want to implement a subclass of CertPathValidatorException to describe a particular failure mode of your CertPathValidator implementation.

In each case, the new exception classes must be shipped with the provider classes, for example, as part of the provider JAR file. Each provider should document the exception subclasses.

TrustAnchor Class

As previously mentioned, a PKIX CertPathValidator or CertPathBuilder is not required to support the nameConstraints parameter of the TrustAnchor class. Implementations should throw an InvalidAlgorithmParameterException if this parameter is not supported.

Signature Timestamp Support

Introduction

This section describes the enhancements that have been added to support signature timestamps.

Prior to Java SE 5.0, the signature generated by jarsigner contained no information about w hen the signature was generated. With no other information available, systems/deployers (including users of the Java Plug-in) often based their validity assessment of a signed JAR file on the validity of the signing certificate. When the signing certificate expires, systems/deployers conclude that the signature, and hence, the JAR file, has expired. Because signing certificates typically expire annually, this caused customers significant problems by forcing them to re-sign deployed JAR files annually.

Starting in Java SE 5.0, jarsigner can generate signatures that include a timestamp, thus enabling systems/deployer (including Java Plug-in) to check whether the JAR file was signed while the signing certificate was still valid. In addition, APIs were added in Java SE 5.0 to allow applications to obtain the timestamp information.

The following time-of-signing enhancements and additions are supported:

  • Jarsigner Enhancements
  • Java Plug-in Enhancements
  • API Enhancements

Jarsigner Enhancements

The jarsigner tool can now generate and store a signature timestamp when signing a JAR file. In addition, jarsigner supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through the options described below.

Jarsigner Timestamp Options

The following jarsigner options support signature timestamps:

-tsa url

If "-tsa http://example.tsa.url" appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, http://example.tsa.url, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the -tsacert option. The -tsa option does not require the TSA's public key certificate to be present in the keystore.

To generate the timestamp, jarsigner communicates with the TSA using the Time-Stamp Protocol (TSP) defined in RFC 3161. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file.

-tsacert alias

If "-tsacert alias" appears on the command line when signing a JAR file then a timestamp is generated for the signature. The alias identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA.

The TSA's public key certificate must be present in the keystore when using -tsacert.

Alternative Signing Options

Specifying an Alternative Signing Mechanism

-altsigner class

Specifies that an alternative signing mechanism be used. The fully-qualified class name identifies a class file that extends the com.sun.jarsigner.ContentSigner abstract class. The path to this class file is defined by the -altsignerpath option. If the -altsigner option is used, jarsigner uses the signing mechanism provided by the specified class. Otherwise, jarsigner uses its default signing mechanism.

For example, to use the signing mechanism provided by a class named com.sun.sun.jarsigner.AuthSigner, use the jarsigner option "-altsigner com.sun.jarsigner.AuthSigner"

Specifying Path to Alternative Signing Mechanism

-altsignerpath classpathlist

Specifies the path to the class file (the class file name is specified with the -altsigner option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below.

An absolute path or a path relative to the current directory may be specified. If classpathlist contains multiple paths or JAR files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the class is already in the search path.

Example of specifying the path to a jar file that contains the class file:

    -altsignerpath /home/user/lib/authsigner.jar

Note that the JAR file name is included.

Example of specifying the path to the jar file that contains the class file:

    -altsignerpath /home/user/classes/com/sun/tools/jarsigner/

Note that the JAR file name is omitted.

Java Plug-in Enhancements

In Java SE 5.0, the Java Plug-in was enhanced to check signature timestamps (if available) when validating JAR files. The Java Plug-in will no longer present a dialog when it encounters an expired or revoked certificate when validating a signed jar, provided that the signature timestamp confirms that the signature was generated prior to the expiration or revocation date.

The TSA's certificate must be available from the Plug-in's keystore or certificate stores when the Plug-in is validating a JAR file containing a signature timestamp.

The Plug-in reverts to 1.4.x behavior if the signature does not contain a timestamp.

API Enhancements

The security and JAR APIs were enhanced to enable applications to access timestamp information.

Two new classes were added to the java.security package. These classes are CodeSigner, which maintains information associated with a signer, and Timestamp, which represents information associated with a signature timestamp.

New methods were added to the java.security.CodeSource class and java.util.jar.JarEntry class to allow access to this new, optional information.

Appendix A: Standard Names

The Java Certification Path API requires and utilizes a set of standard names for certification path validation algorithms, encodings and certificate storage types. The standard names previously found here in Appendix A and in the other security specifications (JCA/JSSE/etc.) have been combined in the Standard Names document. Specific provider information can be found in the Sun Provider Documentation.

Please note that a service provider may choose to define a new name for a proprietary or non-standard algorithm that is not mentioned in the Standard Names document. However, to prevent name collisions, it is recommended that the name be prefixed with the reverse Internet domain name of the provider's organization (for example: com.sun.MyCertPathValidator).

Appendix B: The "SUN" Provider

The CertPath implementation in the SUN provider as of Java SE 5 passed the Public Key Interoperability Test Suite (PKITS).

The "SUN" provider supports the following standard algorithms, types and encodings:

  • CertificateFactory: X.509 CertPath type with PKCS7 and PkiPath encodings
  • CertPathValidator: PKIX algorithm
  • CertPathBuilder: PKIX algorithm
  • CertStore: LDAP and Collection CertStore types
Each of these service provider interface implementations is discussed in more detail below.

CertificateFactory

The "SUN" provider for the CertificateFactory engine class has been enhanced to support generation of X.509 CertPath objects. The PKCS7 and PkiPath encodings are supported. The PKCS#7 implementation supports a subset of RFC 2315 (only the SignedData ContentInfo type is supported). The certificates in the CertPath are ordered in the forward direction (from target to trust anchor). Each certificate in the CertPath is of type java.security.cert.X509Certificate, and versions 1, 2 and 3 are supported.

CertPathValidator

The "SUN" provider supplies a PKIX implementation of the CertPathValidator engine class. The implementation validates CertPaths of type X.509 and implements the certification path validation algorithm defined in RFC 3280: PKIX Certificate and CRL Profile. This implementation sets the ValidationAlgorithm service attribute to "RFC3280".

In the Java SE 7 release, weak cryptographic algorithms can be disabled in the "SUN" provider using a security property. The jdk.certpath.disabledAlgorithms property is a list of disabled algorithms that applies to certificate path verification.

From JDK 8 onwards the default value of jdk.certpath.disabledAlgorithms is as follows:

    jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024

This means that no signature algorithm involving MD2 will be used to verify a certificate. And use of certificates with RSA key size of less than 1024 bits in length is restricted. Appendix D has examples of values for jdk.certpath.disabledAlgorithms.

The PKIX Certificate and CRL Profile has many optional features. The "SUN" provider implements support for the policy mapping, authority information access and CRL distribution point certificate extensions, the issuing distribution point CRL extension, and the reason code and certificate issuer CRL entry extensions. It does not implement support for the freshest CRL or subject information access certificate extensions. It also does not include support for the freshest CRL and delta CRL Indicator CRL extensions and the invalidity date and hold instruction code CRL entry extensions.

The implementation supports a CRL revocation checking mechanism that conforms to section 6.3 of the PKIX Certificate and CRL Profile. OCSP (RFC 2560) is also currently supported as a built in revocation checking mechanism. See Appendix C for more details on the implementation and configuration and how it works in conjunction with CRLs.

The implementation does not support the nameConstraints parameter of the TrustAnchor class and the validate method throws an InvalidAlgorithmParameterException if it is specified.

CertPathBuilder

The "SUN" provider supplies a PKIX implementation of the CertPathBuilder engine class. The implementation builds CertPaths of type X.509. Each CertPath is validated according to the PKIX algorithm defined in RFC 3280: PKIX Certificate and CRL Profile. This implementation sets the ValidationAlgorithm service attribute to "RFC3280".

The implementation requires that the targetConstraints parameter of a PKIXBuilderParameters object is an instance of X509CertSelector and the subject criterion is set to a non-null value. Otherwise the build method throws an InvalidAlgorithmParameterException.

The implementation builds CertPath objects in a forward direction using a depth-first algorithm. It backtracks to previous states and tries alternate paths when a potential path is determined to be invalid or exceeds the PKIXBuilderParameters maxPathLength parameter.

Validation of the path is performed in the same manner as the CertPathValidator implementation. The implementation validates most of the path as it is being built, in order to eliminate invalid paths earlier in the process. Validation checks that cannot be executed on certificates ordered in a forward direction are delayed and executed on the path after it has been constructed (but before it is returned to the application).

As with CertPathValidator, the jdk.certpath.disabledAlgorithms security property can be used to exclude cryptographic algorithms that are not considered safe.

When two or more potential certificates are discovered that may lead to finding a path that meets the specified constraints, the implementation uses the following criteria to prioritize the certificates (in the examples below, assume a TrustAnchor distinguished name of "ou=D,ou=C,o=B,c=A" is specified):

  1. The issuer DN of the certificate matches the DN of one of the specified TrustAnchors (ex: issuerDN = "ou=D,ou=C,o=B,c=A").
  2. The issuer DN of the certificate is a descendant of the DN of one of the TrustAnchors, ordered by proximity to the anchor (ex: issuerDN = "ou=E,ou=D,ou=C,o=B,c=A").
  3. The issuer DN of the certificate is an ancestor of the DN of one of the TrustAnchors, ordered by proximity to the anchor (ex: issuerDN = "ou=C,o=B,c=A".
  4. The issuer DN of the certificate is in the same namespace of one of the TrustAnchors, ordered by proximity to the anchor (ex: issuerDN = "ou=G,ou=C,o=B,c=A").
  5. The issuer DN of the certificate is an ancestor of the subject DN of the certificate, ordered by proximity to the subject.
These are followed by certificates which don't meet any of the above criteria.

This implementation has been tested with the LDAP and Collection CertStore implementations included in this release of the "SUN" provider.

Debugging support can be enabled by setting the java.security.debug property to certpath. For example:

       java -Djava.security.debug=certpath BuildCertPath
This will print additional debugging information to standard error.

CertStore

The "SUN" provider supports two implementations of the CertStore engine class: Collection and LDAP.

Collection CertStore

The Collection CertStore implementation can hold any objects that are an instance of java.security.cert.Certificate or java.security.cert.CRL.

The certificates and CRLs are not returned in any particular order and will not contain duplicates.

LDAP CertStore

The LDAP CertStore implementation retrieves certificates and CRLs from an LDAP directory using the LDAP schema defined in RFC 2587. The LDAPSchema service attribute is set to "RFC2587".

The implementation fetches certificates from different locations, depending on the values of the subject, issuer, and basicConstraints selection criteria specified in the X509CertSelector. It performs as many of the following operations as possible:

  1. Subject non-null, basicConstraints <= -1

    Looks for certificates in the subject DN's "userCertificate" attribute.

  2. Subject non-null, basicConstraints >= -1

    Looks for certificates in the forward element of the subject DN's "crossCertificatePair" attribute AND in the subject's "caCertificate" attribute.

  3. Issuer non-null, basicConstraints >= -1

    Looks for certificates in the reverse element of the issuer DN's "crossCertificatePair" attribute AND in the issuer DN's "caCertificate" attribute.

In each case, certificates are checked using X509CertSelector.match() before adding them to the resulting collection.

If none of the conditions specified above applies, then an exception is thrown to indicate that it was impossible to fetch certificates using the criteria supplied. Note that even if one or more of the conditions apply, the Collection returned may still be empty if there are no certificates in the directory.

The implementation fetches CRLs from the issuer DNs specified in the setCertificateChecking, addIssuerName or setIssuerNames methods of the X509CRLSelector class. If no issuer DNs have been specified using one of these methods, the implementation throws an exception indicating it was impossible to fetch CRLs using the criteria supplied. Otherwise, the CRLs are searched as follows:

The implementation first creates a list of issuer names. If a certificate was specified in the setCertificateChecking method, it uses the issuer of that certificate. Otherwise, it uses the issuer names specified using the addIssuerName or setIssuerNames methods.

Next, the implementation iterates through the list of issuer names. For each issuer name, it searches first in the issuer's "authorityRevocationList" attribute and then, if no matching CRL was found there, in the issuer's "certificateRevocationList" attribute. One exception to the above is that if the issuer name was obtained from the certificate specified in the setCertificateChecking method, it only checks the issuer's "authorityRevocationList" attribute if the specified certificate is a CA certificate.

All CRLs are checked using X509CRLSelector.match() before adding them to the resulting collection.

If no CRLs satisfying the selection criteria can be found, an empty Collection is returned.

Caching

By default each LDAP CertStore instance caches lookups for a maximum of 30 seconds. The cache lifetime can be changed by setting the system property sun.security.certpath.ldap.cache.lifetime to a value in seconds. A value of 0 disables the cache completely. A value of -1 means unlimited lifetime.

Support for the CRL Distribution Points Extension

Support for the CRL Distribution Points extension is available. It is disabled by default for compatibility and can be enabled by setting the system property com.sun.security.enableCRLDP to the value true.

If set to true, Sun's PKIX implementation uses the information in a certificate's CRL Distribution Points extension (in addition to CertStores that are specified) to find the CRL, provided the distribution point is an X.500 distinguished name or a URI of type ldap, http, or ftp.

Note: Depending on your network and firewall setup, it may be necessary to also configure your networking proxy servers as described in the networking documentation.

Support for the Authority Information Access (AIA) Extension

Support for the caIssuers access method of the Authority Information Access extension is available. It is disabled by default for compatibility and can be enabled by setting the system property com.sun.security.enableAIAcaIssuers to the value true.

If set to true, Sun's PKIX implementation of CertPathBuilder uses the information in a certificate's AIA extension (in addition to CertStores that are specified) to find the issuing CA certificate, provided it is a URI of type ldap, http, or ftp.

Note: Depending on your network and firewall setup, it may be necessary to also configure your networking proxy servers as described in the networking documentation.

Appendix C: On-Line Certificate Status Protocol (OCSP) Support

Client-side support for the On-Line Certificate Status Protocol (OCSP) as defined in RFC 2560 is supported as of JDK 5.0. OCSP checking is controlled by the following five security properties:

Property Name | Description
ocsp.enable | This property's value is either true or false. If true, OCSP checking is enabled when doing certificate revocation checking; if false or not set, OCSP checking is disabled.
ocsp.responderURL This property's value is a URL that identifies the location of the OCSP responder. Here is an example.
ocsp.responderURL=http://ocsp.example.net:80

By default, the location of the OCSP responder is determined implicitly from the certificate being validated. The property is used when the Authority Information Access extension (defined in RFC 3280) is absent from the certificate or when it requires overriding.
ocsp.responderCertSubjectName This property's value is the subject name of the OCSP responder's certificate. Here is an example.
ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string distinguished name (defined in RFC 2253) which identifies a certificate in the set of certificates supplied during cert path validation. In cases where the subject name alone is not sufficient to uniquely identify the certificate, then both the ocsp.responderCertIssuerName and ocsp.responderCertSerialNumber properties must be used instead. When th is property is set, then those two properties are ignored.
ocsp.responderCertIssuerName This property's value is the issuer name of the OCSP responder's certificate . Here is an example.
ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string distinguished name (defined in RFC 2253) which identifies a certificate in the set of certificates supplied during cert path validation. When this property is set then the ocsp.responderCertSerialNumber property must also be set. Note that this property is ignored when the ocsp.responderCertSubjectName property has been set.
ocsp.responderCertSerialNumber This property's value is the serial number of the OCSP responder's certificate Here is an example.
ocsp.responderCertSerialNumber=2A:FF:00

By default, the certificate of the OCSP responder is that of the issuer of the certificate being validated. This property identifies the certificate of the OCSP responder when the default does not apply. Its value is a string of hexadecimal digits (colon or space separators may be present) which identifies a certificate in the set of certificates supplied during cert path validation. When this property is set then the ocsp.responderCertIssuerName property must also be set. Note that this property is ignored when the ocsp.responderCertSubjectName property has been set.

These properties may be set either staticly in the Java runtime's $JAVA_HOME/jre/lib/security/java.security file, or dynamically using the java.security.Security.setProperty() method.

By default, OCSP checking is not enabled. It is enabled by setting the ocsp.enable property to "true". Use of the remaining properties is optional. Note that enabling OCSP checking only has an effect if revocation checking has also been enabled. Revocation checking is enabled via the PKIXParameters.setRevocationEnabled() method.

OCSP checking works in conjunction with Certificate Revocation Lists (CRLs) during revocation checking. Below is a summary of the interaction of OCSP and CRLs. Failover to CRLs occurs only if an OCSP problem is encountered. Failover does not occur if the OCSP responder confirms either that the certificate has been revoked or that it has not been revoked.

PKIXParameters RevocationEnabled (default=true) | ocsp.enable (default=false) | Behavior
true | true | Revocation checking using OCSP, failover to using CRLs
true | false | Revocation checking using CRLs only
false | true | No revocation checking
false | false | No revocation checking

Appendix D: Disabling Cryptographic Algorithms

The jdk.certpath.disabledAlgorithms security property contains a list of cryptographic algorithms that will not be used during certification path processing. The exact syntax of the property is described in the jre/lib/security/java.security file, but is briefly summarized here.

The security property contains a list of cryptographic algorithms that must not be used. The algorithm names are separated by commas. Furthermore, you can also specify restrictions on key sizes.

For example, the following line in java.security specifies that the MD2 and DSA algorithms must not be used for certification path processing. Furthermore, RSA is disabled for key sizes less than 2048 bits.

jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure Certification Path

Documentation Contents

Description of Figure CertificationPath

Link to figure Certification Path.

This figure consists of three boxes arranged horizontally:

  • The first box is divided into three sections horizontally. These sections contain the following text, from top to bottom:

    • Issuer = CA2
    • Subject = Alice
    • Alice's Public Key

    The last section also contains an image of a key.

  • The second box is divided into three sections horizontally. These sections contain the following text, from top to bottom:

    • Issuer = CA1
    • Subject = CA2
    • CA2's Public Key

    The last section also contains an image of a key.

  • The third box contains the text "CA1's Public Key" and an image of a key.

Arrows connect the following boxes and sections

  • From "CA1's Public Key" to "Issuer = CA1"
  • From "Subject = CA2" to "Issuer = CA2"
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


How to Implement a Provider in the Java Cryptography Architecture

Skip Table of Contents
  • Introduction
    • Who Should Read This Document
    • Related Documentation
      • Notes on Terminology
  • Engine Classes and Corresponding SPI Classes
  • Steps to Implement and Integrate a Provider
    • Step 1: Write your Service Implementation Code
      • Step 1.1: Additional JCA Provider Requirements and Recommendations for Encryption Implementations
    • Step 2: Give your Provider a Name
    • Step 3: Write your Master Class, a subclass of Provider
      • Step 3.1: Additional Steps for Cipher Implementations
    • Step 4: Compile your Code
    • Step 5: Place your Provider in a Jar File
    • Step 6: Sign your JAR File
      • Step 6.1: Get a Code-Signing Certificate
      • Step 6.2: Sign Your Provider
    • Step 7: Prepare for Testing
      • Step 7.1: Install the Provider
      • Step 7.2: Set Provider Permissions
    • Step 8: Write and Compile your Test Programs
    • Step 9: Run your Test Programs
    • Step 10: Apply for U.S. Government Export Approval if Required
    • Step 11: Document your Provider and its Supported Services
      • Message Digests and MACs
    • Step 12: Make your Class Files and Documentation Available to Clients
  • How a Provider Can Do Self-Integrity Checking
    • Notes on the Sample Code
    • Finding the Provider JAR File: Basics
      • Determining the Provider's JAR File URL
      • Creating a JarFile Referring to the JAR File
    • Verifying the Provider JAR File: Basics
      • Verification Setup
      • JAR File Signature Check
      • Verifying Signatures
      • Ensuring Signers Are Trusted
        • Getting the List of Certificates
        • Identifying Each of the Signers and Determining If One is Trusted
    • Verifying Signatures
    • Ensuring Signers Are Trusted
      • Getting the List of Certificates
      • Identifying Each of the Signers and Determining If One is Trusted
      • Notes on myJCE Sample Code
  • Further Implementation Details and Requirements
    • Alias Names
    • Service Interdependencies
    • Default Initializations
    • Default Key Pair Generator Parameter Requirements
    • The Provider.Service Class
    • Signature Formats
    • DSA Interfaces and their Required Implementations
    • RSA Interfaces and their Required Implementations
    • Diffie-Hellman Interfaces and their Required Implementations
    • Interfaces for Other Algorithm Types
    • Algorithm Parameter Specification Interfaces and Classes
    • Key Specification Interfaces and Classes Required by Key Factories
    • Secret-Key Generation
    • Ensuring Exportability
  • Appendix A: The Sun Provider Master Class
  • Appendix B: The SunJCE Provider Master Class
  • Appendix C: The java.security Properties File

Introduction

The Java platform defines a set of APIs spanning major security areas, including cryptography, public key infrastructure, authentication, secure communication, and access control. These APIs allow developers to easily integrate security into their application code. They were designed around the following principles:

  1. Implementation independence

    Applications do not need to implement security themselves. Rather, they can request security services from the Java platform. Security services are implemented in providers (see below), which are plugged into the Java platform via a standard interface. An application may rely on multiple independent providers for security functionality.

  2. Implementation interoperability

    Providers are interoperable across applications. Specifically, an application is not bound to a specific provider, and a provider is not bound to a specific application.

  3. Algorithm extensibility

    The Java platform includes a number of built-in providers that implement a basic set of security services that are widely used today. However, some applications may rely on emerging standards not yet implemented, or on proprietary services. The Java platform supports the installation of custom providers that implement such services.

A Cryptographic Service Provider (provider) refers to a package (or a set of packages) that supply a concrete implementation of a subset of the cryptography aspects of the JDK Security API.

The java.security.Provider class encapsulates the notion of a security provider in the Java platform. It specifies the provider's name and lists the security services it implements. Multiple providers may be configured at the same time, and are listed in order of preference. When a security service is requested, the highest priority provider that implements that service is selected.

The following figure illustrate these options for requesting an MD5 message digest implementation. The figure consists of two diagrams, both of which show three providers that implement message digest algorithms. The providers are ordered by preference from left to right (1-3). In the diagram to the left, an application requests an MD5 algorithm implementation without specifying a provider name. The providers are searched in preference order and the implementation from the first provider supplying that particular algorithm, ProviderB, is returned. In the diagram to the right, the application requests the MD5 algorithm implementation from a specific provider, ProviderC. This time the implementation from that provider is returned, even though a provider with a higher preference order, ProviderB, also supplies an MD5 implementation.

MD5 Message Digest Implementation

Description of Figure Options for Requesting an MD5 Message Digest Implementation

Each installation has one or more provider packages installed. Clients may configure their runtimes with different providers, and specify a preference order for each of them. The preference order is the order in which providers are searched for requested algorithms when no particular provider is requested.

The Oracle version of the Java runtime environment (JRE) comes standard with a default provider, named "SUN". Other Java runtime environments may not necessarily supply the "SUN" provider.

Who Should Read This Document

Programmers that only need to use the Java Security API to access existing cryptography algorithms and other services do not need to read this document.

This document is intended for experienced programmers wishing to create their own provider packages supplying cryptographic service implementations. It documents what you need to do in order to integrate your provider into Java so that your algorithms and other services can be found when Java Security API clients request them.

Related Documentation

This document assumes you have already read the Java Cryptography Architecture Reference Guide.

It documents the packages which contain the various classes and interfaces in the Security API.

  • java.security
  • java.security.spec
  • java.security.interfaces
  • javax.crypto
  • javax.crypto.spec
  • javax.crypto.interfaces

Notes on Terminology

  • Prior to JDK 1.4, the JCE was an unbundled product, and as such, the JCA and JCE were regularly referred to as separate, distinct components. As JCE is now bundled in JDK, the distinction is becoming less apparent. Since the JCE uses the same architecture as the JCA, the JCE should be more properly thought of as a subset of the JCA.
  • The JCA within the JDK includes two software components:
    • the framework that defines and supports cryptographic services for which providers supply implementations. This framework includes packages such as java.security, javax.crypto, javax.crypto.spec, and javax.crypto.interfaces.
    • the actual providers such as Sun, SunRsaSign, SunJCE, which contain the actual cryptographic implementations.

Throughout this document, the terms JCA by itself refers to the JCA framework. Whenever this document notes a specific JCA provider, it will be referred to explicitly by the provider name.

Engine Classes and Corresponding Service Provider Interface Classes

An engine class defines a cryptographic service in an abstract fashion (without a concrete implementation).

A cryptographic service is always associated with a particular algorithm or type. It either provides cryptographic operations (like those for digital signatures or message digests, ciphers or key agreement protocols); generates or supplies the cryptographic material (keys or parameters) required for cryptographic operations; or generates data objects (keystores or certificates) that encapsulate cryptographic keys (which can be used in a cryptographic operation) in a secure fashion.

For example, here are four engine classes:

  • The Signature class provides access to the functionality of a digital signature algorithm.
  • A DSA KeyFactory class supplies a DSA private or public key (from its encoding or transparent specification) in a format usable by the initSign or initVerify methods, respectively, of a DSA Signature object.
  • The Cipher class provides access to the functionality of an encryption algorithm (such as DES)
  • the KeyAgreement class provides access to the functionality of a key agreement protocol (such as Diffie-Hellman)

The Java Cryptography Architecture encompasses the classes comprising the Security package that relate to cryptography, including the engine classes. Users of the API request and utilize instances of the engine classes to carry out corresponding operations. The JDK defines the following engine classes:

  • MessageDigest - used to calculate the message digest (hash) of specified data.
  • Signature - used to sign data and verify digital signatures.
  • KeyPairGenerator - used to generate a pair of public and private keys suitable for a specified algorithm.
  • KeyFactory - used to convert opaque cryptographic keys of type Key into key specifications (transparent representations of the underlying key material), and vice versa.
  • KeyStore - used to create and manage a keystore. A keystore is a database of keys. Private keys in a keystore have a certificate chain associated with them, which authenticates the corresponding public key. A keystore also contains certificates from trusted entities.
  • CertificateFactory - used to create public key certificates and Certificate Revocation Lists (CRLs).
  • AlgorithmParameters - used to manage the parameters for a particular algorithm, including parameter encoding and decoding.
  • AlgorithmParameterGenerator - used to generate a set of parameters suitable for a specified algorithm.
  • SecureRandom - used to generate random or pseudo-random numbers.
  • Cipher: used to encrypt or decrypt some specified data.
  • KeyAgreement: used to execute a key agreement (key exchange) protocol between 2 or more parties.
  • KeyGenerator: used to generate a secret (symmetric) key suitable for a specified algorithm.
  • Mac: used to compute the message authentication code of some specified data.
  • SecretKeyFactory: used to convert opaque cryptographic keys of type SecretKey into key specifications (transparent representations of the underlying key material), and vice versa.
  • ExemptionMechanism: used to provide the functionality of an exemption mechanism such as key recovery, key weakening, key escrow, or any other (custom) exemption mechanism. Applications or applets that use an exemption mechanism may be granted stronger encryption capabilities than those which don't. However, please note that cryptographic restrictions are no longer required for most countries, and thus exemption mechanisms may only be useful in those few countries whose governments mandate restrictions.

Note: A generator creates objects with brand-new contents, whereas a factory creates objects from existing material (for example, an encoding).

An engine class provides the interface to the functionality of a specific type of cryptographic service (independent of a particular cryptographic algorithm). It defines Application Programming Interface (API) methods that allow applications to access the specific type of cryptographic service it provides. The actual implementations (from one or more providers) are those for specific algorithms. For example, the Signature engine class provides access to the functionality of a digital signature algorithm. The actual implementation supplied in a SignatureSpi subclass (see next paragraph) would be that for a specific kind of signature algorithm, such as SHA1 with DSA, SHA1 with RSA, or MD5 with RSA.

The application interfaces supplied by an engine class are implemented in terms of a Service Provider Interface (SPI). That is, for each engine class, there is a corresponding abstract SPI class, which defines the Service Provider Interface methods that cryptographic service providers must implement.

Architecture of Service Provider Interface

Description of Architecture of Service Provider Interface

An instance of an engine class, the "API object", encapsulates (as a private field) an instance of the corresponding SPI class, the "SPI object". All API methods of an API object are declared "final", and their implementations invoke the corresponding SPI methods of the encapsulated SPI object. An instance of an engine class (and of its corresponding SPI class) is created by a call to the getInstance factory method of the engine class.

The name of each SPI class is the same as that of the corresponding engine class, followed by "Spi". For example, the SPI class corresponding to the Signature engine class is the SignatureSpi class.

Each SPI class is abstract. To supply the implementation of a particular type of service and for a specific algorithm, a provider must subclass the corresponding SPI class and provide implementations for all the abstract methods.

Another example of an engine class is the MessageDigest class, which provides access to a message digest algorithm. Its implementations, in MessageDigestSpi subclasses, may be those of various message digest algorithms such as SHA-1, MD5, or MD2.

As a final example, the KeyFactory engine class supports the conversion from opaque keys to transparent key specifications, and vice versa. See Key Specification Interfaces and Classes Required by Key Factories for details. The actual implementation supplied in a KeyFactorySpi subclass would be that for a specific type of keys, e.g., DSA public and private keys.

Steps to Implement and Integrate a Provider

Follow the steps below to implement a provider and integrate it into the JCA framework:

  • Step 1: Write your Service Implementation Code
    • Step 1.1: Additional JCA Provider Requirements and Recommendations for Encryption Implementations
  • Step 2: Give your Provider a Name
  • Step 3: Write your Master Class, a subclass of Provider
    • Step 3.1: Additional Steps for Cipher Implementations
  • Step 4: Compile your Code
  • Step 5: Place your Provider in a Jar File
  • Step 6: Sign your JAR File
    • Step 6.1: Get a Code-Signing Certificate
    • Step 6.2: Sign Your Provider
  • Step 7: Prepare for Testing
    • Step 7.1: Install the Provider
    • Step 7.2: Set Provider Permissions
  • Step 8: Write and Compile your Test Programs
  • Step 9: Run your Test Programs
  • Step 10: Apply for U.S. Government Export Approval if Required
  • Step 11: Document your Provider and its Supported Services
    • Message Digests and MACs
  • Step 12: Make your Class Files and Documentation Available to Clients

Step 1: Write your Service Implementation Code

The first thing you need to do is to write the code that provides algorithm-specific implementations of the cryptographic services you want to support.

Note that your provider may supply implementations of cryptographic services already available in one or more of the security components of the JDK.

For cryptographic services not defined in JCA (For example; signatures and message digests), please refer to Java Cryptography Architecture Reference Guide.

For each cryptographic service you wish to implement, create a subclass of the appropriate SPI class. JCA defines the following engine classes:

  • SignatureSpi
  • MessageDigestSpi
  • KeyPairGeneratorSpi
  • SecureRandomSpi
  • AlgorithmParameterGeneratorSpi
  • AlgorithmParametersSpi
  • KeyFactorySpi
  • CertificateFactorySpi
  • KeyStoreSpi
  • CipherSpi
  • KeyAgreementSpi
  • KeyGeneratorSpi
  • MacSpi
  • SecretKeyFactorySpi
  • ExemptionMechanismSpi

(See Engine Classes and Corresponding SPI Classes in this document for information on the JCA and other cryptographic classes.)

In your subclass, you need to:

  1. Supply implementations for the abstract methods, whose names usually begin with engine. See Further Implementation Details and Requirements for additional information.
  2. Ensure there is a public constructor without any arguments. Here's why: When one of your services is requested, Java Security looks up the subclass implementing that service, as specified by a property in your "master class" (see Step 3). Java Security then creates the Class object associated with your subclass, and creates an instance of your subclass by calling the newInstance method on that Class object. newInstance requires your subclass to have a public constructor without any parameters.
  3. A default constructor without arguments will automatically be generated if your subclass doesn't have any constructors. But if your subclass defines any constructors, you must explicitly define a public constructor without arguments.

Step 1.1: Additional JCA Provider Requirements and Recommendations for Encryption Implementations

When instantiating a provider's implementation (class) of a Cipher, KeyAgreement, KeyGenerator, MAC or SecretKey factory, the framework will determine the provider's codebase (JAR file) and verify its signature. In this way, JCA authenticates the provider and ensures that only providers signed by a trusted entity can be plugged into JCA. Thus, one requirement for encryption providers is that they must be signed, as described in later steps.

In addition, each provider should perform self-integrity checking to ensure that the JAR file containing its code has not been manipulated in an attempt to invoke provider methods directly rather than through JCA. For further information, see How a Provider Can Do Self-Integrity Checking.

In order for provider classes to become unusable if instantiated by an application directly, bypassing JCA, providers should implement the following:

  • All SPI implementation classes in a provider package should be declared final (so that they cannot be subclassed), and their (SPI) implementation methods should be declared protected.
  • All crypto-related helper classes in a provider package should have package-private scope, so that they cannot be accessed from outside the provider package.

For providers that may be exported outside the U.S., CipherSpi implementations must include an implementation of the engineGetKeySize method which, given a Key, returns the key size. If there are restrictions on available cryptographic strength specified in jurisdiction policy files, each Cipher initialization method calls engineGetKeySize and then compares the result with the maximum allowable key size for the particular location and circumstances of the applet or application being run. If the key size is too large, the initialization method throws an exception.

Additional optional features that providers may implement are

  • the engineWrap and engineUnwrap methods of CipherSpi. Wrapping a key enables secure transfer of the key from one place to another. Information about wrapping and unwrapping keys is provided in the Wrapping and Unwrapping Keys section of the Java Cryptography Architecture Reference Guide.
  • one or more exemption mechanisms. An exemption mechanism is something such as key recovery, key escrow, or key weakening which, if implemented and enforced, may enable reduced cryptographic restrictions for an application (or applet) that uses it. For information on the requirements for apps that utilize exemption mechanisms, see How to Make Applications "Exempt" from Cryptographic Restrictions in the Java Cryptography Architecture Reference Guide.

Step 2: Give your Provider a Name

Decide on a name for your provider. This is the name to be used by client applications to refer to your provider.

Step 3: Write your Master Class, a subclass of Provider

The third step is to create a subclass of the java.security.Provider class.

Your subclass should be a final class, and its constructor should

  • call super, specifying the provider name (see Step 2), version number, and a string of information about the provider and algorithms it supports. For example:
        super("CryptoX", 1.0, "CryptoX provider v1.0, implementing " +
        "RSA encryption and key pair generation, and DES encryption.");
  • set the values of various properties that are required for the Java Security API to look up the cryptographic services implemented by the provider. For each service implemented by the provider, there must be a property whose name is the type of service (for example; Signature, MessageDigest, Cipher, KeyAgreement) Signature, MessageDigest, KeyPairGenerator, SecureRandom, KeyFactory, KeyStore, CertificateFactory, AlgorithmParameterGenerator, AlgorithmParameters, Cipher, KeyAgreement, KeyGenerator, Mac, SecretKeyFactory, or ExemptionMechanism) followed by a period and the name of the algorithm to which the service applies. The property value must specify the fully qualified name of the class implementing the service.

  • The list below shows the various types of JCA services, where the actual algorithm name is substitued for algName:

    • Signature.algName
    • MessageDigest.algName
    • KeyPairGenerator.algName
    • SecureRandom.algName
    • AlgorithmParameterGenerator.algName
    • AlgorithmParameters.algName
    • KeyFactory.algName
    • CertificateFactory.algName
    • KeyStore.algName
    • Cipher.algName
    • KeyAgreement.algName
    • KeyGenerator.algName
    • Mac.algName
    • SecretKeyFactory.algName
    • ExemptionMechanism.algName

    In all of these except ExemptionMechanism and Cipher, algName, certType , or storeType is the "standard" name of the algorithm, certificate type, or keystore type. See Appendix A of the Java Cryptography Architecture Reference Guide for the standard names that should be used.)

    In the case of ExemptionMechanism, algName refers to the name of the exemption mechanism, which can be one of the following: KeyRecovery, KeyEscrow, or KeyWeakening. Case does not matter.

    In the case of Cipher, algName may actually represent a transformation, and may be composed of an algorithm name, a particular mode, and a padding scheme. See Appendix A of the Java Cryptography Architecture Reference Guide for details.

    The value of each property must be the fully qualified name of the class implementing the specified algorithm, certificate type, or keystore type. That is, it must be the package name followed by the class name, where the two are separated by a period.

    As an example, the default provider named SUN implements the Digital Signature Algorithm (whose standard name is SHA1withDSA) in a class named DSA in the sun.security.provider package. Its subclass of Provider (which is the Sun class in the sun.security.provider package) sets the Signature.SHA1withDSA property to have the value sun.security.provider.DSA via the following:

        put("Signature.SHA1withDSA", "sun.security.provider.DSA")

    The list below shows more properties that can be defined for the various types of services, where the actual algorithm name is substitued for algName, certificate type for certType, keystore type for storeType, and attribute name for attrName:

    • Signature.algName [one or more spaces] attrName
    • MessageDigest.algName [one or more spaces] attrName
    • KeyPairGenerator.algName [one or more spaces] attrName
    • SecureRandom.algName [one or more spaces] attrName
    • KeyFactory.algName [one or more spaces] attrName
    • CertificateFactory.certType [one or more spaces] attrName
    • KeyStore.storeType [one or more spaces] attrName
    • AlgorithmParameterGenerator.algName [one or more spaces] attrName
    • AlgorithmParameters.algName [one or more spaces] attrName
    • Cipher.algName [one or more spaces] attrName
    • KeyAgreement.algName [one or more spaces] attrName
    • KeyGenerator.algName [one or more spaces] attrName
    • Mac.algName [one or more spaces] attrName
    • SecretKeyFactory.algName [one or more spaces] attrName
    • ExemptionMechanism.algName [one or more spaces] attrName

In each of these, algName, certType, storeType, or attrName is the "standard" name of the algorithm, certificate type, keystore type, or attribute. (See Appendix A of the Java Cryptography Architecture Reference Guide for the standard names that should be used.)

For a property in the above format, the value of the property must be the value for the corresponding attribute. (See Appendix A of the Java Cryptography Architecture API Specification & Reference for the definition of each standard attribute.)

As an example, the default provider named "SUN" implements the SHA1withDSA Digital Signature Algorithm in software. In the master class for the provider "SUN", it sets the Signature.SHA1withDSA ImplementedIn to have the value Software via the following:

    put("Signature.SHA1withDSA ImplementedIn", "Software")

For further master class property setting examples, see Appendix A to view the current Sun.java source file or Appendix B to see the SunJCE provider. These files show how the Sun and SunJCE providers set properties.

Step 3.1: Additional Steps for Cipher Implementations

As mentioned above, in the case of a Cipher property, algName may actually represent a transformation. A transformation is a string that describes the operation (or set of operations) to be performed by a Cipher object on some given input. A transformation always includes the name of a cryptographic algorithm (e.g., DES), and may be followed by a mode and a padding scheme.

A transformation is of the form:

  • algorithm/mode/padding, or
  • algorithm

(In the latter case, provider-specific default values for the mode and padding scheme are used). For example, the following is a valid transformation:

    Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding");

When requesting a block cipher in stream cipher mode (for example; DES in CFB or OFB mode), a client may optionally specify the number of bits to be processed at a time, by appending this number to the mode name as shown in the following sample transformations:

    Cipher c1 = Cipher.getInstance("DES/CFB8/NoPadding");
    Cipher c2 = Cipher.getInstance("DES/OFB32/PKCS5Padding");

If a number does not follow a stream cipher mode, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits.)

A provider may supply a separate class for each combination of algorithm/mode/padding. Alternatively, a provider may decide to provide more generic classes representing sub-transformations corresponding to algorithm or algorithm/mode or algorithm//padding (note the double slashes); in this case the requested mode and/or padding are set automatically by the getInstance methods of Cipher, which invoke the engineSetMode and engineSetPadding methods of the provider's subclass of CipherSpi.

That is, a Cipher property in a provider master class may have one of the formats shown in the table below.

Cipher Property Format | Description
Cipher.algName | A provider's subclass of CipherSpi implements algName with pluggable mode and padding
Cipher.algName/mode | A provider's subclass of CipherSpi implements algName in the specified mode, with pluggable padding
Cipher.algName//padding | A provider's subclass of CipherSpi implements algName with the specified padding, with pluggable mode
Cipher.algName/mode/padding | A provider's subclass of CipherSpi implements algName with the specified mode and padding

(See Appendix A of the Java Cryptography Architecture Reference Guide for the standard algorithm names, modes, and padding schemes that should be used.)

For example, a provider may supply a subclass of CipherSpi that implements DES/ECB/PKCS5Padding, one that implements DES/CBC/PKCS5Padding, one that implements DES/CFB/PKCS5Padding, and yet another one that implements DES/OFB/PKCS5Padding. That provider would have the following Cipher properties in its master class:

  • Cipher.DES/ECB/PKCS5Padding
  • Cipher.DES/CBC/PKCS5Padding
  • Cipher.DES/CFB/PKCS5Padding
  • Cipher.DES/OFB/PKCS5Padding

Another provider may implement a class for each of the above modes (i.e., one class for ECB, one for CBC, one for CFB, and one for OFB), one class for PKCS5Padding, and a generic DES class that subclasses from CipherSpi. That provider would have the following Cipher properties in its master class:

  • Cipher.DES
  • Cipher.DES SupportedModes
    Example: "ECB|CBC|CFB|OFB"
  • Cipher.DES SupportedPaddings
    Example: "NOPADDING|PKCS5Padding"

The getInstance factory method of the Cipher engine class follows these rules in order to instantiate a provider's implementation of CipherSpi for a transformation of the form "algorithm":

  1. Check if the provider has registered a subclass of CipherSpi for the specified "algorithm".

    If the answer is YES, instantiate this class, for whose mode and padding scheme default values (as supplied by the provider) are used.

    If the answer is NO, throw a NoSuchAlgorithmException exception.

The getInstance factory method of the Cipher engine class follows these rules in order to instantiate a provider's implementation of CipherSpi for a transformation of the form "algorithm/mode/padding":

  1. Check if the provider has registered a subclass of CipherSpi for the specified "algorithm/mode/padding" transformation.

    If the answer is YES, instantiate it.

    If the answer is NO, go to the next step.
  2. Check if the provider has registered a subclass of CipherSpi for the sub-transformation "algorithm/mode".

    If the answer is YES, instantiate it, and call engineSetPadding(padding) on the new instance.

    If the answer is NO, go to the next step.
  3. Check if the provider has registered a subclass of CipherSpi for the sub-transformation "algorithm//padding" (note the double slashes).

    If the answer is YES, instantiate it, and call engineSetMode(mode) on the new instance.

    If the answer is NO, go to the next step.
  4. Check if the provider has registered a subclass of CipherSpi for the sub-transformation "algorithm".

    If the answer is YES, instantiate it, and call engineSetMode(mode) and engineSetPadding(padding) on the new instance.

    If the answer is NO, throw a NoSuchAlgorithmException exception.

Step 4: Compile your Code

After you have created your implementation code (Step 1), given your provider a name (Step 2), and created the master class (Step 3), use the Java compiler to compile your files.

Step 5: Place Your Provider in a JAR File

Place your provider code in a JAR file, in preparation for signing it in the next step. For more information on the jar tool, see jar (for Solaris, Linux, or Mac OS X) (for Microsoft Windows).

    jar cvf <JAR file name> <list of classes, separated by spaces>

This command creates a JAR file with the specified name containing the specified classes.

Step 6: Sign your JAR File

If your provider is supplying encryption algorithms through the Cipher KeyAgreement, KeyGenerator, Mac, or SecretKeyFactory classes, you will need to sign your JAR file so that the JCA can authenticate the code at runtime. For details, see Step 1a. If you are NOT providing an implementation of this type you can skip this step.

Step 6.1: Get a Code-Signing Certificate

The next step is to request a code-signing certificate so that you can use it to sign your provider prior to testing. The certificate will be good for both testing and production. It will be valid for 5 years.

Below are the steps you should use to get a code-signing certificate. For more information on the keytool tool, see keytool (for Solaris, Linux, or Mac OS X) (for Microsoft Windows).

  1. Use keytool to generate a DSA keypair, using DSA algorithm as an example:
        keytool -genkeypair -alias <alias> \
        -keyalg DSA -keysize 1024 \
        -dname "cn=<Company Name>, \
        ou=Java Software Code Signing,\
        o=Sun Microsystems Inc" \
        -keystore <keystore file name>\
        -storepass <keystore password>

    This will generate a DSA keypair (a public key and an associated private key) and store it in an entry in the specified keystore. The public key is stored in a self-signed certificate. The keystore entry can subsequently be accessed using the specified alias.

    The option values in angle brackets ("<" and ">") represent the actual values that must be supplied. For example, <alias> must be replaced with whatever alias name you wish to be used to refer to the newly-generated keystore entry in the future, and <keystore file name> must be replaced with the name of the keystore to be used. Note: Do not surround actual values with angle brackets. For example, if you want your alias to be myTestAlias, specify the -alias option as follows:

        -alias myTestAlias
    If you specify a keystore that doesn't yet exist, it will be created.

    Note: If command lines you type are not allowed to be as long as the keytool -genkeypair command you want to execute (for example, if you are typing to a Microsoft Windows DOS prompt), you can create and execute a plain-text batch file containing the command. That is, create a new text file that contains nothing but the full keytool -genkeypair command. (Remember to type it all on one line.) Save the file with a .bat extension. Then in your DOS window, type the file name (with its path, if necessary). This will cause the command in the batch file to be executed.

  2. Use keytool to generate a certificate signing request.
        keytool -certreq -alias <alias> \
        -file <csr file name> \
        -keystore <keystore file name> \
        -storepass <keystore password>
    Here, <alias> is the alias for the DSA keypair entry created in the previous step. This command generates a Certificate Signing Request (CSR), using the PKCS#10 format. It stores the CSR in the file whose name is specified in <csr file name>.
  3. Send the CSR, contact information, and other required documentation to the JCA Code Signing Certification Authority. See JCA Code Signing Certification Authority for contact info.
  4. After the JCA Code Signing Certification Authority has received your email message, they will send you a request number via email. Once you receive this request number, you should print, fill out and send the Certification Form for CSPs. See Sending Certification Form for CSPs for contact information.
  5. Use keytool to import the certificates received from the CA.

    Once you have received the two certificates from the JCA Code Signing Certification Authority, you can use keytool to import them into your keystore.

    First import the CA's certificate as a "trusted certificate":
        keytool -import -alias <alias for the CA cert> \
        -file <CA cert file name> \
        -keystore <keystore file name> \
        -storepass <keystore password>
    Then import the code-signing certificate:
        keytool -import -alias <alias> \
        -file <code-signing cert file name> \
        -keystore <keystore file name> \
        -storepass <keystore password>
    Here, <alias> is the same alias as that which you created in step 1 where you generated a DSA keypair. This command replaces the self-signed certificate in the keystore entry specified by <alias> with the one signed by the JCA Code Signing Certification Authority.

Now that you have in your keystore a certificate from an entity trusted by JCA (the JCA Code Signing Certification Authority), you can place your provider code in a JAR file (Step 5) and then use that certificate to sign the JAR file (Step 6.2).

Step 6.2: Sign Your Provider

Sign the JAR file created in step five with the code-signing certificate obtained in Step 6. For more information on the jarsigner tool, see jarsigner (for Solaris, Linux, or Mac OS X) (for Microsoft Windows).

    jarsigner -keystore <keystore file name> \
        -storepass <keystore password> \
        <JAR file name> <alias>

Here, <alias> is the alias into the keystore for the entry containing the code-signing certificate received from the JCA Code Signing Certification Authority (the same alias as that specified in the commands in Step 6.1).

You can test verification of the signature via the following:

    jarsigner -verify <JAR file name>

The text "jar verified" will be displayed if the verification was successful.

Note: If you bundle a signed JCE provider as part of an RIA (applet or webstart application), for the best user experience, you should apply a second signature to the JCE provider JAR with the same certificate/key that you used to sign the applet or webstart application. See the Java Rich Internet Applications Guide for more information on deploying RIAs, and the jarsigner (Solaris, Linux, or Mac OS X or Windows) man page for information on applying multiple signatures to a JAR file.

Step 7: Prepare for Testing

The next steps describe how to install and configure your new provider so that it is available via the JCA.

Step 7.1: Install the Provider

In order to prepare for testing your provider, you must install it in the same manner as will be done by clients wishing to use it. The installation enables Java Security to find your algorithm implementations when clients request them.

Installing a provider is done in two steps: installing the provider package classes, and configuring the provider.

Installing the Provider Classes

The first thing you must do is make your classes available so that they can be found when requested. You ship your provider classes as a JAR (Java ARchive) file.

There are a two possible ways to install provider classes:

  • Install the JAR file containing the provider classes as an installed or bundled extension.
  • Place the JAR file containing the provider classes in your CLASSPATH.

The provider JAR file will be considered an installed extension if it is placed in the standard place for the JAR files of an installed extension:

  • Solaris, Linux, or Mac OS X: <java-home>/lib/ext
  • Windows: <java-home>\lib\ext

Here <java-home> refers to the directory where the runtime software is installed, which is the top-level directory of the Java Runtime Environment (JRE) or the jre directory in the Java SE (JDK) software. For example, if you have the JDK installed on Solaris, Linux, or Mac OS X in a directory named /home/user1/jdk, or on Microsoft Windows in a directory named C:\jdk, then you need to install the JAR file in the following directory:

  • Solaris, Linux, or Mac OS X: /home/user1/jdk/jre/lib/ext
  • Windows: C:\jdk\jre\lib\ext

Similarly, if you have the JRE installed on Solaris, Linux, or Mac OS X in a directory named /home/user1/jre, or on Microsoft Windows in a directory named C:\jre, you need to install the JAR file in the following directory:

  • Solaris, Linux, or Mac OS X: /home/user1/jre/lib/ext
  • Windows: C:\jre\lib\ext

For more information on installed extensions, see Installed Extensions.

For more information on bundled extensions, see Bundled Extensions.

Configuring the Provider

The next step is to add the provider to your list of approved providers. This is done statically by editing the security properties file

  • Solaris, Linux, or Mac OS X: <java-home>/lib/security/java.security
  • Windows: <java-home>\lib\security\java.security

Here <java-home> refers to the directory where the JRE was installed. For example, if you have the JDK installed on Solaris, Linux, or Mac OS X in a directory named /home/user1/jdk, or on Microsoft Windows in a directory named C:\jdk, then you need to edit the following file:

  • Solaris, Linux, or Mac OS X: /home/user1/jdk/jre/lib/security/java.security
  • Windows: C:\jdk\jre\lib\security\java.security

Similarly, if you have the JRE installed on Solaris, Linux, or Mac OS X in a directory named /home/user1/jre, or on Windows in a directory named C:\jre, then you need to edit this file:

  • Solaris, Linux, or Mac OS X: /home/user1/jre/lib/security/java.security
  • Windows: C:\jre\lib\security\java.security

For each provider, this file should have a statement of the following form:

    security.provider.n=masterClassName

This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms when no specific provider is requested. The order is 1-based; 1 is the most preferred, followed by 2, and so on.

masterClassName must specify the fully qualified name of the provider's "master class", which you implemented in Step 3. This class is always a subclass of the Provider class.

Java comes standard with providers named SUN, SunRsaSign, and SunJCE which are automatically configured as a static provider in the java.security properties file, as follows:

    security.provider.2=sun.security.provider.Sun
    security.provider.3=sun.security.rsa.SunRsaSign
    security.provider.4=sun.security.provider.SunJCE

(The Sun provider's master class is the Sun class in the sun.security.provider package.)

The JCA provider SunJCE and other security-related providers shipped with the Java platform are also automatically configured as static providers.

To utilize another JCA provider, add a line registering the alternate provider, giving it a lower preference order than the SUN and SunRsaSign providers.

Suppose that your master class is the CryptoX class in the com.cryptox.provider package, and that you would like to make your provider the fourth preferred provider. To do so, edit the java.security file as seen below:

    security.provider.2=sun.security.provider.Sun
    security.provider.3=sun.security.rsa.SunRsaSign
    security.provider.4=com.cryptox.provider.CryptoX
    security.provider.5=sun.security.provider.SunJCE

Note: Providers may also be registered dynamically. To do so, a program (such as your test program, to be written in Step 8) can call either the addProvider or insertProviderAt method in the Security class. This type of registration is not persistent and can only be done by code which is granted the following permission:

    java.security.SecurityPermission "insertProvider.{name}"

where {name} is replaced by the actual provider name.

For example, if the provider name is "MyJCE" and if the provider's code is in the myjce_provider.jar file in the /localWork directory, then here is a sample policy file grant statement granting that permission:

    grant codeBase "file:/localWork/myjce_provider.jar" {
        permission java.security.SecurityPermission
            "insertProvider.MyJCE";
    };

Step 7.2: Set Provider Permissions

Whenever providers are not installed extensions, permissions must be granted for when applets or applications are run while a security manager is installed. There is typically a security manager installed whenever an applet is running, and a security manager may be installed for an application either via code in the application itself or via a command-line argument. Permissions do not need to be granted to installed extensions, since the default system policy file grants all permissions to installed extensions.

Whenever a client does not install your provider as an installed extension, your provider may need the following permissions granted to it in the client environment:

  • java.lang.RuntimePermission to get class protection domains. The provider may need to get its own protection domain in the process of doing self-integrity checking.
  • java.security.SecurityPermission to set provider properties.

To ensure your provider works when a security manager is installed and the provider is not an installed extension, you need to test such an installation and execution environment. In addition, prior to testing you need to grant appropriate permissions to your provider and to any other providers it uses. For example, a sample statement granting permissions to a provider whose name is "MyJCE" and whose code is in myjce_provider.jar appears below. Such a statement could appear in a policy file. In this example, the myjce_provider.jar file is assumed to be in the /localWork directory.

    grant codeBase "file:/localWork/myjce_provider.jar" {
        permission java.lang.RuntimePermission "getProtectionDomain";
        permission java.security.SecurityPermission
            "putProviderProperty.MyJCE";
    };

Step 8: Write and Compile your Test Programs

Write and compile one or more test programs that test your provider's incorporation into the Security API as well as the correctness of its algorithm(s). Create any supporting files needed, such as those for test data to be encrypted.

The first tests your program should perform are ones to ensure that your provider is found, and that its name, version number, and additional information is as expected. To do so, you could write code like the following, substituting your provider name for MyPro:

    import java.security.*;

    Provider p = Security.getProvider("MyPro");

    System.out.println("MyPro provider name is " + p.getName());
    System.out.println("MyPro provider version # is " + p.getVersion());
    System.out.println("MyPro provider info is " + p.getInfo());

Next, you should ensure that your services are found. For instance, if you implemented the DES encryption algorithm, you could check to ensure it's found when requested by using the following code (again substituting your provider name for "MyPro"):

    Cipher c = Cipher.getInstance("DES", "MyPro");

    System.out.println("My Cipher algorithm name is " + c.getAlgorithm());

If you don't specify a provider name in the call to getInstance, all registered providers will be searched, in preference order (see Configuring the Provider), until one implementing the algorithm is found.

If your provider implements an exemption mechanism, you should write a test applet or application that uses the exemption mechanism. Such an applet/application also needs to be signed, and needs to have a "permission policy file" bundled with it. See How to Make Applications "Exempt" from Cryptographic Restrictions in the Java Cryptography Architecture Reference Guide for complete information on creating and testing such an application.

Step 9: Run your Test Programs

Run your test program(s). Debug your code and continue testing as needed. If the Java Security API cannot seem to find one of your algorithms, review the steps above and ensure they are all completed.

Be sure to include testing of your programs using different installation options (e.g. making the provider an installed extension or placing it on the class path) and execution environments (with or without a security manager running). Installation options are discussed in Step 7.1. In particular, you need to ensure your provider works when a security manager is installed and the provider is not an installed extension -- and thus the provider must have permissions granted to it; therefore, you need to test such an installation and execution environment, after granting required permissions to your provider and to any other providers it uses, as described in Step 7.2.

If you find during testing that your code needs modification, make the changes, recompile (Step 4), place the updated provider code in a JAR file (Step 6), sign the JAR file if necessary (Step 6.2), re-install the provider (Step 7.1), if needed fix or add to the permissions (Step 7.2), and then re-test your programs. Repeat these steps as needed.

Step 10: Apply for U.S. Government Export Approval If Required

All U.S. vendors whose providers may be exported outside the U.S. should apply to the Bureau of Industry and Security in the U.S. Department of Commerce for export approval. Please consult your export counsel for more information.

Note: If your provider calls Cipher.getInstance() and the returned Cipher object needs to perform strong cryptography regardless of what cryptographic strength is allowed by the user's downloaded jurisdiction policy files, you should include a copy of the cryptoPerms permission policy file which you intend to bundle in the JAR file for your provider and which specifies an appropriate permission for the required cryptographic strength. The necessity for this file is just like the requirement that applets and applications "exempt" from cryptographic restrictions must include a cryptoPerms permission policy file in their JAR file. For more information on the creation and inclusion of such a file, see How to Make Applications "Exempt" from Cryptographic Restrictions in the Java Cryptography Architecture Reference Guide.

Here are two URLs that may be useful:

  • U.S. Department of Commerce: http://www.commerce.gov
  • Bureau of Industry and Security: http://www.bis.doc.gov

Step 11: Document your Provider and its Supported Services

The next step is to write documentation for your clients. At the minimum, you need to specify:

  • the name programs should use to refer to your provider. Note: As of this writing, provider name searches are case-sensitive. That is, if your master class specifies your provider name as "CryptoX" but a user requests "CRYPTOx", your provider will not be found. This behavior may change in the future, but for now be sure to warn your clients to use the exact case you specify.
  • the types of algorithms and other services implemented by your provider.
  • instructions for installing the provider, similar to those provided in Step 7.1, except that the information and examples should be specific to your provider.
  • the permissions your provider will require if it is not installed as an installed extension and if a security manager is run, as described in Step 7.2.

In addition, your documentation should specify anything else of interest to clients, such as any default algorithm parameters.

Message Digests and MACs

For each Message Digest and MAC algorithm, indicate whether or not your implementation is cloneable. This is not technically necessary, but it may save clients some time and coding by telling them whether or not intermediate Message Digests or MACs may be possible through cloning. Clients who do not know whether or not a MessageDigest or Mac implementation is cloneable can find out by attempting to clone the object and catching the potential exception, as illustrated by the following example:

    try {
        // try and clone it
        /* compute the MAC for i1 */
        mac.update(i1);
        byte[] i1Mac = mac.clone().doFinal();

        /* compute the MAC for i1 and i2 */
        mac.update(i2);
        byte[] i12Mac = mac.clone().doFinal();

        /* compute the MAC for i1, i2 and i3 */
        mac.update(i3);
        byte[] i123Mac = mac.doFinal();
    } catch (CloneNotSupportedException cnse) {
        // have to use an approach not involving cloning
    }

where:

  • mac is the MAC object they received when they requested one via a call to Mac.getInstance,
  • i1, i2 and i3 are input byte arrays, and
  • they want to calculate separate hashes for:
    • i1
    • i1 and i2
    • i1, i2, and i3

Key Pair Generators

For a key pair generator algorithm, in case the client does not explicitly initialize the key pair generator (via a call to an initialize method), each provider must supply and document a default initialization. For example, the Diffie-Hellman key pair generator supplied by the SunJCE provider uses a default prime modulus size (keysize) of 1024 bits.

Key Factories

A provider should document all the key specifications supported by its (secret-)key factory.

Algorithm Parameter Generators

In case the client does not explicitly initialize the algorithm parameter generator (via a call to an init method in the AlgorithmParameterGenerator engine class), each provider must supply and document a default initialization. For example, the SunJCE provider uses a default prime modulus size (keysize) of 1024 bits for the generation of Diffie-Hellman parameters, the Sun provider a default modulus prime size of 1024 bits for the generation of DSA parameters.

Signature Algorithms

If you implement a signature algorithm, you should document the format in which the signature (generated by one of the sign methods) is encoded. For example, the SHA1withDSA signature algorithm supplied by the "SUN" provider encodes the signature as a standard ASN.1 SEQUENCE of two integers, r and s.

Random Number Generation (SecureRandom) Algorithms

For a random number generation algorithm, provide information regarding how "random" the numbers generated are, and the quality of the seed when the random number generator is self-seeding. Also note what happens when a SecureRandom object (and its encapsulated SecureRandomSpi implementation object) is deserialized: If subsequent calls to the nextBytes method (which invokes the engineNextBytes method of the encapsulated SecureRandomSpi object) of the restored object yield the exact same (random) bytes as the original object would, then let users know that if this behaviour is undesirable, they should seed the restored random object by calling its setSeed method.

Certificate Factories

A provider should document what types of certificates (and their version numbers, if relevant), can be created by the factory.

Keystores

A provider should document any relevant information regarding the keystore implementation, such as its underlying data format.

Step 12: Make your Class Files and Documentation Available to Clients

After writing, configuring, testing, installing and documenting your provider software, make documentation available to your customers.

How a Provider Can Do Self-Integrity Checking

Each provider should do self-integrity checking to ensure that the JAR file containing its code has not been tampered with, for example in an attempt to invoke provider methods directly rather than through JCA. Providers that provide implementations for encryption services (Cipher, KeyAgreement, KeyGenerator, MAC or SecretKey factory) must be digitally signed and should be signed with a certificate issued by "trusted" Certification Authorities. Currently, the following two Certification Authorities are considered "trusted":

  • Sun Microsystems' JCA Code Signing CA, and
  • IBM JCA Code Signing CA.

Please refer to Step 6.2 for detailed information on how to get a code-signing certificate from Sun Microsystems' JCA Code Signing CA and the certificate of that CA.

After getting the signing certificate from above Certification Authority, provider packages should embed within themselves the bytes for its own signing certificate, for example in an array like the bytesOfProviderCert array referred to in the Identifying Each of the Signers and Determining If One is Trusted section below. At runtime, the embedded certificate will be used in determining whether or not the provider code is authentic.

The basic approach a provider can use to check its own integrity is:

  1. Determine the URL of the JAR file containing the provider code, and
  2. Verify the JAR file's digital signatures to ensure that at least one signer of each entry of the JAR file is trusted.

Each of these steps is described in the following sections:

  • Notes on the Sample Code
  • Finding the Provider JAR File: Basics
    • Determining the Provider's JAR File URL
    • Creating a JarFile Referring to the JAR File
  • Verifying the Provider JAR File: Basics
    • Verification Setup
    • JAR File Signature Check
    • Verifying Signatures
    • Ensuring Signers Are Trusted
      • Getting the List of Certificates
      • Identifying Each of the Signers and Determining If One is Trusted
  • Verifying Signatures
  • Ensuring Signers Are Trusted
    • Getting the List of Certificates
    • Identifying Each of the Signers and Determining If One is Trusted
    • Notes on myJCE Sample Code
Notes on the Sample Code

Note: The sample code MyJCE.java is a complete code example that implements these steps. You can download this code for your reference. The Notes on the Sample Code section traces how these concepts are implemented in the sample code.

IMPORTANT NOTE: In the unbundled version of JCE 1.2.x, (used with JDKs 1.2.x and 1.3.x), providers needed to include code to authenticate the JCA framework to assure themselves of the integrity and authenticity of the JCA that they plugged into. In JDK 6 and later, this is no longer necessary.

One implication is that a provider written just for JCE 1.2.2 will not work in JDK 6 because the provider's JCE framework authentication check will not work; the JCE framework code is no longer where the provider expects it to be. If you want your provider to work only with JDK 6, it should not have code to authenticate the JCE framework. On the other hand, if you want your provider to work both with JCE 1.2.2 and with JDK 6, then add a conditional statement. This way the provider code to authenticate the JCE framework is executed only when the provider is run with JCE 1.2.2. The following is sample code:

    Class cipherCls = Class.forName("javax.crypto.Cipher");

    CodeSource cs = cipherCls.getProtectionDomain().getCodeSource();
    if (cs != null) {
        // Authenticate JCE framework
         . . .
    }

Finding the Provider JAR File: Basics

Determining the Provider's JAR File URL

The URL for the provider's JAR file can be obtained by determining the provider's CodeSource and then calling the getLocation method on the CodeSource.

    URL providerURL = (URL) AccessController.doPrivileged(
        new PrivilegedAction) {
            public Object run() {
                CodeSource cs =
                    MyJCE.class.getProtectionDomain().getCodeSource();
                return cs.getLocation();
            }
        });

Creating a JarFile Referring to the JAR File

Once you have the URL for the provider's JAR file, you can create a java.util.jar.JarFile referring to the JAR file. This instance is needed in the step for verifying the Provider JAR file.

To create the JAR file, first open a connection to the specified URL by calling its openConnection method. Since the URL is a JAR URL, the type is java.net.JarURLConnection. Here's the basic code:

    // Prep the url with the appropriate protocol.
    jarURL =
        url.getProtocol().equalsIgnoreCase("jar") ? url :
            new URL("jar:" + url.toString() + "!/");

    // Retrieve the jar file using JarURLConnection
    JarFile jf = (JarFile) AccessController.doPrivileged(
        new PrivilegedExceptionAction() {
            public Object run() throws Exception {
                JarURLConnection conn =
                    (JarURLConnection) jarURL.openConnection();
        ...

Now that you have a JarURLConnection, you can call its getJarFile method to get the JAR file:

    // Always get a fresh copy, so we don't have to
    // worry about the stale file handle when the
    // cached jar is closed by some other application.
    conn.setUseCaches(false);
    jf = conn.getJarFile();

Verifying the Provider JAR File: Basics

Once you have determined the URL for your provider JAR file and you have created a JarFile referring to the JAR file, as shown in the steps above, you can then verify the file.

The basic approach is:

  1. Ensure that at least one of each entry's signer's certificates is equal to the provider's own code signing certificate.
  2. Go through all the entries in the JAR file and ensure the signature on each one verifies correctly.
  3. Ensure that at least one of each entry's signer's certificates can be traced back to a trusted Certification Authority.

Sample code for each of these steps is presented and described in the following sections:

  • Verification Setup
  • JAR File Signature Check
  • Verifying Signatures
  • Ensuring Signers Are Trusted
    • Getting the List of Certificates
    • Identifying Each of the Signers and Determining If One is Trusted

Verification Setup

Our approach is to define a class JarVerifier to handle the retrieval of a JAR file from a given URL and verify whether the JAR file is signed with the specified certificate.

The constructor of JarVerifier takes the provider URL as a parameter which will be used to retrieve the JAR file later.

The actual jar verification is implemented in the verify method which takes the provider code signing certificate as a parameter.

    public void verify(X509Certificate targetCert) throws IOException {
        // variable 'jarFile' is a JarFile object created
        // from the provider's Jar URL.
        ...
        Vector entriesVec = new Vector();

Basically the verify method will go through the JAR file entries twice: the first time checking the signature on each entry and the second time verifying the signer is trusted.

Note: In our code snippets the jarFile variable is the JarFile object of the provider's jar file.

JAR File Signature Check

An authentic provider JAR file is signed. So the JAR file has been tampered with if it isn't signed:

    // Ensure the jar file is signed.
    Manifest man = jarFile.getManifest();
    if (man == null) {
        throw new SecurityException("The provider is not signed");
    }

Verifying Signatures

The next step is to go through all the entries in the JAR file and ensure the signature on each one verifies correctly. One possible way to verify the signature on a JAR file entry is to simply read the file. If a JAR file is signed, the read method itself automatically performs the signature verification. Here is sample code:

    // Ensure all the entries' signatures verify correctly
    byte[] buffer = new byte[8192];
    Enumeration entries = jarFile.entries();

    while (entries.hasMoreElements()) {
        JarEntry je = (JarEntry) entries.nextElement();

        // Skip directories.
        if (je.isDirectory())
            continue;

        entriesVec.addElement(je);
        InputStream is = jarFile.getInputStream(je);

        // Read in each jar entry. A security exception will
        // be thrown if a signature/digest check fails.
        int n;
        while ((n = is.read(buffer, 0, buffer.length)) != -1) {
            // Don't care
        }
        is.close();
    }

Ensuring Signers Are Trusted

The code in the previous section verified the signatures of all the provider JAR file entries. The fact that they all verify correctly is a requirement, but it is not sufficient to verify the authenticity of the JAR file. A final requirement is that the signatures were generated by the same entity as the one that developed this provider. To test that the signatures are trusted, we can again go through each entry in the JAR file (this time using the entriesVec built in the previous step), and for each entry that must be signed (that is, each entry that is not a directory and that is not in the META-INF directory):

  1. Get the list of signer certificates for the entry.
  2. Identify each of the certificate chains and determine whether any of the certificate chains are trusted. At least one of the certificate chains must be trusted.

The loop setup is the following:

    Enumeration e = entriesVec.elements();
    while (e.hasMoreElements()) {
        JarEntry je = (JarEntry) e.nextElement();
        ...
    }

Getting the List of Certificates

The certificates for the signers of a JAR file entry JarEntry can be obtained simply by calling the JarEntry getCertificates method:

    Certificate[] certs = je.getCertificates();

Adding this line of code to the previous loop setup code, and adding code to ignore directories and files in the META-INF directory gives us:

    while (e.hasMoreElements()) {
        JarEntry je = (JarEntry) e.nextElement();

        // Every file must be signed except files in META-INF.
        Certificate[] certs = je.getCertificates();
        if ((certs == null) || (certs.length == 0)) {
            if (!je.getName().startsWith("META-INF"))
                throw new SecurityException(
                    "The provider has unsigned class files.");
            } else {
                // Check whether the file is signed by the expected
                // signer. The jar may be signed by multiple signers.
                // See if one of the signers is 'targetCert'.
                ...
            }
        ...

Identifying Each of the Signers and Determining If One is Trusted

The certificate array returned by the JarEntry getCertificates method contains one or more certificate chains. There is one chain per signer of the entry. Each chain contains one or more certificates. Each certificate in a chain authenticates the public key in the previous certificate.

The first certificate in a chain is the signer's certificate which contains the public key corresponding to the private key actually used to sign the entry. Each subsequent certificate is a certificate for the issuer of the previous certificate. Since the self-integrity check is based on whether the JAR file is signed with the provider's signing cert, the trust decision will be made upon only the first certificate, the signer's certificate.

We need to go through the array of certificate chains and check each chain and the associated signers until we find a trusted entity. For each JAR file entry, at least one of the signers must be trusted. A signer is considered "trusted" if and only if its certificate is equals to the embedded provider signing certificate.

The following sample code loops through all the certificate chains, compares the first certificate in a chain to the embedded provider signing certificate, and only returns true if a match is found.

    int startIndex = 0;
    X509Certificate[] certChain;
    boolean signedAsExpected = false;

    while ((certChain = getAChain(certs, startIndex)) != null) {
        if (certChain[0].equals(targetCert)) {
            // Stop since one trusted signer is found.
            signedAsExpected = true;
            break;
        }

        // Proceed to the next chain.
        startIndex += certChain.length;
    }

    if (!signedAsExpected) {
        throw new SecurityException(
            "The provider is not signed by a trusted signer");
    }

The getAChain method is defined as follows:

    /**
     * Extracts ONE certificate chain from the specified certificate array
     * which may contain multiple certificate chains, starting from index
     * 'startIndex'.
     */
    private static X509Certificate[] getAChain(
            Certificate[] certs, int startIndex) {

        if (startIndex > certs.length - 1)
            return null;

        int i;
        // Keep going until the next certificate is not the
        // issuer of this certificate.
        for (i = startIndex; i < certs.length - 1; i++) {
            if (!((X509Certificate)certs[i + 1]).getSubjectDN().
                    equals(((X509Certificate)certs[i]).getIssuerDN())) {
                break;
            }
        }

        // Construct and return the found certificate chain.
        int certChainSize = (i-startIndex) + 1;
        X509Certificate[] ret = new X509Certificate[certChainSize];
        for (int j = 0; j < certChainSize; j++ ) {
            ret[j] = (X509Certificate) certs[startIndex + j];
        }
        return ret;
    }

Notes on the myJCE Code Sample

The sample code, MyJCE.java, is a sample provider which has a method selfIntegrityChecking which performs self-integrity checking. It first determines the URL of its own provider JAR file and then verifies that the provider JAR file is signed with the embedded code-signing certificate.

Note: The method selfIntegrityChecking should be called by all the constructors of its cryptographic engine classes to ensure that its integrity is not compromised.

Provider MyJCE performs self-integrity checking in the following steps:

  1. Determine the URL to access the provider JAR file using its own class, MyJCE.class.
  2. Instantiate a JarVerifier object with the provider URL in Step 1.
  3. Create a X509Certificate object from the embedded byte array bytesOfProviderCert.
  4. Call the JarVerifier.verify method to verify all entries in the provider JAR file are signed and are signed with the same certificate instantiated in Step 3.

Note: The class JarVerifier will retrieve the JAR file from the given URL, make sure the JAR file is signed, all entries have valid signatures, and that entries are signed with the specified X509Certificate.

A security exception is thrown by JarVerifier.verify in several cases:

  • The certificate passed to verify is null (invalid).
  • When unable to retrieve JAR file from the given URL.
  • The provider is not signed. (The jar has no manifest.)
  • The provider has unsigned class files.
  • The provider is not signed with the specified certificate.

The MyJCE.java sample code is comprised of the code snippets shown above. In addition, it includes error handling, sample code signing certificate bytes, and code for instantiating a X509Certificate object from the embedded sample code signing certificate bytes.

Regarding the use of AccessController.doPrivileged, please see API For Privileged Blocks for information on the use of doPrivileged.

Further Implementation Details and Requirements

Alias Names

For many cryptographic algorithms and types, there is a single official "standard name" defined in Appendix A of the Java Cryptography Architecture Reference Guide.

For example, "MD5" is the standard name for the RSA-MD5 Message Digest algorithm defined by RSA DSI in RFC 1321. DiffieHellman is the standard for the Diffie-Hellman key agreement algorithm defined in PKCS3.

In the JDK, there is an aliasing scheme that enables clients to use aliases when referring to algorithms or types, rather than their standard names. For example, the "SUN" provider's master class (Sun.java) defines the alias "SHA1/DSA" for the algorithm whose standard name is "SHA1withDSA". Thus, the following statements are equivalent:

    Signature sig = Signature.getInstance("SHA1withDSA", "SUN");

    Signature sig = Signature.getInstance("SHA1/DSA", "SUN");

Aliases can be defined in your "master class" (see Step 3). To define an alias, create a property named

    Alg.Alias.engineClassName.aliasName

where engineClassName is the name of an engine class (e.g., Signature), and aliasName is your alias name. The value of the property must be the standard algorithm (or type) name for the algorithm (or type) being aliased.

As an example, the "SUN" provider defines the alias "SHA1/DSA" for the signature algorithm whose standard name is "SHA1withDSA" by setting a property named Alg.Alias.Signature.SHA1/DSA to have the value SHA1withDSA via the following:

    put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");

Note that aliases defined by one provider are available only to that provider and not to any other providers. Thus, aliases defined by the SunJCE provider are available only to the SunJCE provider.

Service Interdependencies

Some algorithms require the use of other types of algorithms. For example, a PBE algorithm usually needs to use a message digest algorithm in order to transform a password into a key.

If you are implementing one type of algorithm that requires another, you can do one of the following:

  1. Provide your own implementations for both.
  2. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by the default Sun provider that is included with every Java SE Platform installation. For example, if you are implementing a PBE algorithm that requires a message digest algorithm, you can obtain an instance of a class implementing the MD5 message digest algorithm by calling
        MessageDigest.getInstance("MD5", "SUN")
  3. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by another specific provider. This is only appropriate if you are sure that all clients who will use your provider will also have the other provider installed.
  4. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by another (unspecified) provider. That is, you can request an algorithm by name, but without specifying any particular provider, as in
        MessageDigest.getInstance("MD5")
    This is only appropriate if you are sure that there will be at least one implementation of the requested algorithm (in this case, MD5) installed on each Java platform where your provider will be used.

Here are some common types of algorithm interdependencies:

Signature and Message Digest Algorithms

A signature algorithm often requires use of a message digest algorithm. For example, the SHA1withDSA signature algorithm requires the SHA-1 message digest algorithm.

Signature and (Pseudo-)Random Number Generation Algorithms

A signature algorithm often requires use of a (pseudo-)random number generation algorithm. For example, such an algorithm is required in order to generate a DSA signature.

Key Pair Generation and Message Digest Algorithms

A key pair generation algorithm often requires use of a message digest algorithm. For example, DSA keys are generated using the SHA-1 message digest algorithm.

Algorithm Parameter Generation and Message Digest Algorithms

An algorithm parameter generator often requires use of a message digest algorithm. For example, DSA parameters are generated using the SHA-1 message digest algorithm.

KeyStores and Message Digest Algorithms

A keystore implementation will often utilize a message digest algorithm to compute keyed hashes (where the key is a user-provided password) to check the integrity of a keystore and make sure that the keystore has not been tampered with.

Key Pair Generation Algorithms and Algorithm Parameter Generators

A key pair generation algorithm sometimes needs to generate a new set of algorithm parameters. It can either generate the parameters directly, or use an algorithm parameter generator.

Key Pair Generation, Algorithm Parameter Generation, and (Pseudo-)Random Number Generation Algorithms

A key pair generation algorithm may require a source of randomness in order to generate a new key pair and possibly a new set of parameters associated with the keys. That source of randomness is represented by a SecureRandom object. The implementation of the key pair generation algorithm may generate the key parameters itself, or may use an algorithm parameter generator to generate them, in which case it may or may not initialize the algorithm parameter generator with a source of randomness.

Algorithm Parameter Generators and Algorithm Parameters

An algorithm parameter generator's engineGenerateParameters method must return an AlgorithmParameters instance.

Signature and Key Pair Generation Algorithms or Key Factories

If you are implementing a signature algorithm, your implementation's engineInitSign and engineInitVerify methods will require passed-in keys that are valid for the underlying algorithm (e.g., DSA keys for the DSS algorithm). You can do one of the following:

  1. Also create your own classes implementing appropriate interfaces (e.g. classes implementing the DSAPrivateKey and DSAPublicKey interfaces from the package java.security.interfaces), and create your own key pair generator and/or key factory returning keys of those types. Require the keys passed to engineInitSign and engineInitVerify to be the types of keys you have implemented, that is, keys generated from your key pair generator or key factory. Or you can,
  2. Accept keys from other key pair generators or other key factories, as long as they are instances of appropriate interfaces that enable your signature implementation to obtain the information it needs (such as the private and public keys and the key parameters). For example, the engineInitSign method for a DSS Signature class could accept any private keys that are instances of java.security.interfaces.DSAPrivateKey.

KeyStores and Key and Certificate Factories

A keystore implementation will often utilize a key factory to parse the keys stored in the keystore, and a certificate factory to parse the certificates stored in the keystore.

Default Initializations

In case the client does not explicitly initialize a key pair generator or an algorithm parameter generator, each provider of such a service must supply (and document) a default initialization. For example, the Sun provider uses a default modulus size (strength) of 1024 bits for the generation of DSA parameters, and the "SunJCE" provider uses a default modulus size (keysize) of 1024 bits for the generation of Diffie-Hellman parameters.

Default Key Pair Generator Parameter Requirements

If you implement a key pair generator, your implementation should supply default parameters that are used when clients don't specify parameters. The documentation you supply (Step 11) should state what the default parameters are.

For example, the DSA key pair generator in the Sun provider supplies a set of pre-computed p, q, and g default values for the generation of 512, 768, and 1024-bit key pairs. The following p, q, and g values are used as the default values for the generation of 1024-bit DSA key pairs:

p = fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80
    b6512669 455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b
    801d346f f26660b7 6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6
    1bf83b57 e7c6a8a6 150f04fb 83f6d3c5 1ec30235 54135a16 9132f675
    f3ae2b61 d72aeff2 2203199d d14801c7

q = 9760508f 15230bcc b292b982 a2eb840b f0581cf5

g = f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b
    3d078267 5159578e bad4594f e6710710 8180b449 167123e8 4c281613
    b7cf0932 8cc8a6e1 3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f
    0bfa2135 62f1fb62 7a01243b cca4f1be a8519089 a883dfe1 5ae59f06
    928b665e 807b5525 64014c3b fecf492a

(The p and q values given here were generated by the prime generation standard, using the 160-bit

SEED:  8d515589 4229d5e6 89ee01e6 018a237e 2cae64cd

With this seed, the algorithm found p and q when the counter was at 92.)

The Provider.Service Class

Since its introduction, security providers have published their service information via appropriately formatted key-value String pairs they put in their Hashtable entries. While this mechanism is simple and convenient, it limits the amount customization possible. As a result, JDK 5.0 introduced a second option, the Provider.Service class. It offers an alternative way for providers to advertise their services and supports additional features as described below. Note that this addition is fully compatible with the older method of using String valued Hashtable entries. A provider on JDK 5.0 can choose either method as it prefers, or even use both at the same time.

A Provider.Service object encapsulates all information about a service. This is the provider that offers the service, its type (e.g. MessageDigest or Signature), the algorithm name, and the name of the class that implements the service. Optionally, it also includes a list of alternate algorithm names for this service (aliases) and attributes, which are a map of (name, value) String pairs. In addition, it defines the methods newInstance() and supportsParameter(). They have default implementations, but can be overridden by providers if needed, as may be the case with providers that interface with hardware security tokens.

The newInstance() method is used by the security framework when it needs to construct new implementation instances. The default implementation uses reflection to invoke the standard constructor for the respective type of service. For all standard services except CertStore, this is the no-args constructor. The constructorParameter to newInstance() must be null in theses cases. For services of type CertStore, the constructor that takes a CertStoreParameters object is invoked, and constructorParameter must be a non-null instance of CertStoreParameters. A security provider can override the newInstance() method to implement instantiation as appropriate for that implementation. It could use direct invocation or call a constructor that passes additional information specific to the Provider instance or token. For example, if multiple Smartcard readers are present on the system, it might pass information about which reader the newly created service is to be associated with. However, despite customization all implementations must follow the conventions about constructorParameter described above.

The supportsParameter() tests whether the Service can use the specified parameter. It returns false if this service cannot use the parameter. It returns true if this service can use the parameter, if a fast test is infeasible, or if the status is unknown. It is used by the security framework with some types of services to quickly exclude non-matching implementations from consideration. It is currently only defined for the following standard services: Signature, Cipher, Mac, and KeyAgreement. The parameter must be an instance of Key in these cases. For example, for Signature services, the framework tests whether the service can use the supplied Key before instantiating the service. The default implementation examines the attributes SupportedKeyFormats and SupportedKeyClasses as described below. Again, a provider may override this methods to implement additional tests.

The SupportedKeyFormats attribute is a list of the supported formats for encoded keys (as returned by key.getFormat()) separated by the "|" (pipe) character. For example, X.509|PKCS#8. The SupportedKeyClasses attribute is a list of the names of classes of interfaces separated by the "|" character. A key object is considered to be acceptable if it is assignable to at least one of those classes or interfaces named. In other words, if the class of the key object is a subclass of one of the listed classes (or the class itself) or if it implements the listed interface. An example value is "java.security.interfaces.RSAPrivateKey|java.security.interfaces.RSAPublicKey" .

Four methods have been added to the Provider class for adding and looking up Services. As mentioned earlier, the implementation of those methods and also of the existing Properties methods have been specifically designed to ensure compatibility with existing Provider subclasses. This is achieved as follows:

If legacy Properties methods are used to add entries, the Provider class makes sure that the property strings are parsed into equivalent Service objects prior to lookup via getService(). Similarly, if the putService() method is used, equivalent property strings are placed into the provider's hashtable at the same time. If a provider implementation overrides any of the methods in the Provider class, it has to ensure that its implementation does not interfere with this conversion. To avoid problems, we recommend that implementations do not override any of the methods in the Provider class.

Signature Formats

If you implement a signature algorithm, the documentation you supply (Step 11) should specify the format in which the signature (generated by one of the sign methods) is encoded.

For example, the SHA1withDSA signature algorithm supplied by the Sun provider encodes the signature as a standard ASN.1 sequence of two ASN.1 INTEGER values: r and s, in that order:

SEQUENCE ::= {
        r INTEGER,
        s INTEGER }

DSA Interfaces and their Required Implementations

The Java Security API contains the following interfaces (in the java.security.interfaces package) for the convenience of programmers implementing DSA services:

  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey

The following sections discuss requirements for implementations of these interfaces.

DSAKeyPairGenerator

The interface DSAKeyPairGenerator is obsolete. It used to be needed to enable clients to provide DSA-specific parameters to be used rather than the default parameters your implementation supplies. However, in Java it is no longer necessary; a new KeyPairGenerator initialize method that takes an AlgorithmParameterSpec parameter enables clients to indicate algorithm-specific parameters.

DSAParams Implementation

If you are implementing a DSA key pair generator, you need a class implementing DSAParams for holding and returning the p, q, and g parameters.

A DSAParams implementation is also required if you implement the DSAPrivateKey and DSAPublicKey interfaces. DSAPublicKey and DSAPrivateKey both extend the DSAKey interface, which contains a getParams method that must return a DSAParams object. See DSAPrivateKey and DSAPublicKey Implementations for more information.

Note: there is a DSAParams implementation built into the JDK: the java.security.spec.DSAParameterSpec class.

DSAPrivateKey and DSAPublicKey Implementations

If you implement a DSA key pair generator or key factory, you need to create classes implementing the DSAPrivateKey and DSAPublicKey interfaces.

If you implement a DSA key pair generator, your generateKeyPair method (in your KeyPairGeneratorSpi subclass) will return instances of your implementations of those interfaces.

If you implement a DSA key factory, your engineGeneratePrivate method (in your KeyFactorySpi subclass) will return an instance of your DSAPrivateKey implementation, and your engineGeneratePublic method will return an instance of your DSAPublicKey implementation.

Also, your engineGetKeySpec and engineTranslateKey methods will expect the passed-in key to be an instance of a DSAPrivateKey or DSAPublicKey implementation. The getParams method provided by the interface implementations is useful for obtaining and extracting the parameters from the keys and then using the parameters, for example as parameters to the DSAParameterSpec constructor called to create a parameter specification from parameter values that could be used to initialize a KeyPairGenerator object for DSA.

If you implement a DSA signature algorithm, your engineInitSign method (in your SignatureSpi subclass) will expect to be passed a DSAPrivateKey and your engineInitVerify method will expect to be passed a DSAPublicKey.

Please note: The DSAPublicKey and DSAPrivateKey interfaces define a very generic, provider-independent interface to DSA public and private keys, respectively. The engineGetKeySpec and engineTranslateKey methods (in your KeyFactorySpi subclass) could additionally check if the passed-in key is actually an instance of their provider's own implementation of DSAPrivateKey or DSAPublicKey, e.g., to take advantage of provider-specific implementation details. The same is true for the DSA signature algorithm engineInitSign and engineInitVerify methods (in your SignatureSpi subclass).

To see what methods need to be implemented by classes that implement the DSAPublicKey and DSAPrivateKey interfaces, first note the following interface signatures:

In the java.security.interfaces package:

   public interface DSAPrivateKey extends DSAKey,
                java.security.PrivateKey

   public interface DSAPublicKey extends DSAKey,
                java.security.PublicKey

   public interface DSAKey

In the java.security package:

   public interface PrivateKey extends Key

   public interface PublicKey extends Key

   public interface Key extends java.io.Serializable

In order to implement the DSAPrivateKey and DSAPublicKey interfaces, you must implement the methods they define as well as those defined by interfaces they extend, directly or indirectly.

Thus, for private keys, you need to supply a class that implements

  • the getX method from the DSAPrivateKey interface.
  • the getParams method from the java.security.interfaces.DSAKey interface, since DSAPrivateKey extends DSAKey. Note: The getParams method returns a DSAParams object, so you must also have a DSAParams implementation.
  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DSAPrivateKey extends java.security.PrivateKey, and PrivateKey extends Key.

    Similarly, for public DSA keys, you need to supply a class that implements:

    • the getY method from the DSAPublicKey interface.
    • the getParams method from the java.security.interfaces.DSAKey interface, since DSAPublicKey extends DSAKey. Note: The getParams method returns a DSAParams object, so you must also have a DSAParams implementation.
    • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DSAPublicKey extends java.security.PublicKey, and PublicKey extends Key.

RSA Interfaces and their Required Implementations

The Java Security API contains the following interfaces (in the java.security.interfaces package) for the convenience of programmers implementing RSA services:

  • RSAPrivateKey
  • RSAPrivateCrtKey
  • RSAPublicKey

The following sections discuss requirements for implementations of these interfaces.

RSAPrivateKey, RSAPrivateCrtKey, and RSAPublicKey Implementations

If you implement an RSA key pair generator or key factory, you need to create classes implementing the RSAPrivateKey (and/or RSAPrivateCrtKey) and RSAPublicKey interfaces. (RSAPrivateCrtKey is the interface to an RSA private key, using the Chinese Remainder Theorem (CRT) representation.)

If you implement an RSA key pair generator, your generateKeyPair method (in your KeyPairGeneratorSpi subclass) will return instances of your implementations of those interfaces.

If you implement an RSA key factory, your engineGeneratePrivate method (in your KeyFactorySpi subclass) will return an instance of your RSAPrivateKey (or RSAPrivateCrtKey) implementation, and your engineGeneratePublic method will return an instance of your RSAPublicKey implementation.

Also, your engineGetKeySpec and engineTranslateKey methods will expect the passed-in key to be an instance of an RSAPrivateKey, RSAPrivateCrtKey, or RSAPublicKey implementation.

If you implement an RSA signature algorithm, your engineInitSign method (in your SignatureSpi subclass) will expect to be passed either an RSAPrivateKey or an RSAPrivateCrtKey, and your engineInitVerify method will expect to be passed an RSAPublicKey.

Please note: The RSAPublicKey, RSAPrivateKey, and RSAPrivateCrtKey interfaces define a very generic, provider-independent interface to RSA public and private keys. The engineGetKeySpec and engineTranslateKey methods (in your KeyFactorySpi subclass) could additionally check if the passed-in key is actually an instance of their provider's own implementation of RSAPrivateKey, RSAPrivateCrtKey, or RSAPublicKey, e.g., to take advantage of provider-specific implementation details. The same is true for the RSA signature algorithm engineInitSign and engineInitVerify methods (in your SignatureSpi subclass).

To see what methods need to be implemented by classes that implement the RSAPublicKey, RSAPrivateKey, and RSAPrivateCrtKey interfaces, first note the following interface signatures:

In the java.security.interfaces package:

    public interface RSAPrivateKey extends java.security.PrivateKey

    public interface RSAPrivateCrtKey extends RSAPrivateKey

    public interface RSAPublicKey extends java.security.PublicKey

In the java.security package:

    public interface PrivateKey extends Key

    public interface PublicKey extends Key

    public interface Key extends java.io.Serializable

In order to implement the RSAPrivateKey, RSAPrivateCrtKey, and RSAPublicKey interfaces, you must implement the methods they define as well as those defined by interfaces they extend, directly or indirectly.

Thus, for RSA private keys, you need to supply a class that implements:

  • the getModulus and getPrivateExponent methods from the RSAPrivateKey interface.
  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since RSAPrivateKey extends java.security.PrivateKey, and PrivateKey extends Key.

Similarly, for RSA private keys using the Chinese Remainder Theorem (CRT) representation, you need to supply a class that implements:

  • all the methods listed above for RSA private keys, since RSAPrivateCrtKey extends java.security.interfaces.RSAPrivateKey.
  • the getPublicExponent, getPrimeP, getPrimeQ, getPrimeExponentP, getPrimeExponentQ, and getCrtCoefficient methods from the RSAPrivateKey interface.

For public RSA keys, you need to supply a class that implements:

  • the getModulus and getPublicExponent methods from the RSAPublicKey interface.
  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since RSAPublicKey extends java.security.PublicKey, and PublicKey extends Key.

JCA contains a number of AlgorithmParameterSpec implementations for the most frequently used cipher and key agreement algorithm parameters. If you are operating on algorithm parameters that should be for a different type of algorithm not provided by JCA, you will need to supply your own AlgorithmParameterSpec implementation appropriate for that type of algorithm.

Diffie-Hellman Interfaces and their Required Implementations

JCA contains the following interfaces (in the javax.crypto.interfaces package) for the convenience of programmers implementing Diffie-Hellman services:

  • DHKey
  • DHPrivateKey
  • DHPublicKey

The following sections discuss requirements for implementations of these interfaces.

DHPrivateKey and DHPublicKey Implementations

If you implement a Diffie-Hellman key pair generator or key factory, you need to create classes implementing the DHPrivateKey and DHPublicKey interfaces.

If you implement a Diffie-Hellman key pair generator, your generateKeyPair method (in your KeyPairGeneratorSpi subclass) will return instances of your implementations of those interfaces.

If you implement a Diffie-Hellman key factory, your engineGeneratePrivate method (in your KeyFactorySpi subclass) will return an instance of your DHPrivateKey implementation, and your engineGeneratePublic method will return an instance of your DHPublicKey implementation.

Also, your engineGetKeySpec and engineTranslateKey methods will expect the passed-in key to be an instance of a DHPrivateKey or DHPublicKey implementation. The getParams method provided by the interface implementations is useful for obtaining and extracting the parameters from the keys. You can then use the parameters, for example, as parameters to the DHParameterSpec constructor called to create a parameter specification from parameter values used to initialize a KeyPairGenerator object for Diffie-Hellman.

If you implement the Diffie-Hellman key agreement algorithm, your engineInit method (in your KeyAgreementSpi subclass) will expect to be passed a DHPrivateKey and your engineDoPhase method will expect to be passed a DHPublicKey.

Note: The DHPublicKey and DHPrivateKey interfaces define a very generic, provider-independent interface to Diffie-Hellman public and private keys, respectively. The engineGetKeySpec and engineTranslateKey methods (in your KeyFactorySpi subclass) could additionally check if the passed-in key is actually an instance of their provider's own implementation of DHPrivateKey or DHPublicKey, e.g., to take advantage of provider-specific implementation details. The same is true for the Diffie-Hellman algorithm engineInit and engineDoPhase methods (in your KeyAgreementSpi subclass).

To see what methods need to be implemented by classes that implement the DHPublicKey and DHPrivateKey interfaces, first note the following interface signatures:

In the javax.crypto.interfaces package:

    public interface DHPrivateKey extends DHKey, java.security.PrivateKey

    public interface DHPublicKey extends DHKey, java.security.PublicKey

    public interface DHKey

In the java.security package:

    public interface PrivateKey extends Key

    public interface PublicKey extends Key

    public interface Key extends java.io.Serializable

To implement the DHPrivateKey and DHPublicKey interfaces, you must implement the methods they define as well as those defined by interfaces they extend, directly or indirectly.

Thus, for private keys, you need to supply a class that implements:

  • the getX method from the DHPrivateKey interface.
  • the getParams method from the javax.crypto.interfaces.DHKey interface, since DHPrivateKey extends DHKey.
  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DHPrivateKey extends java.security.PrivateKey, and PrivateKey extends Key.

Similarly, for public Diffie-Hellman keys, you need to supply a class that implements:

  • the getY method from the DHPublicKey interface.
  • the getParams method from the javax.crypto.interfaces.DHKey interface, since DHPublicKey extends DHKey.
  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DHPublicKey extends java.security.PublicKey, and PublicKey extends Key.

Interfaces for Other Algorithm Types

As noted above, the Java Security API contains interfaces for the convenience of programmers implementing services like DSA, RSA and ECC. If there are services without API support, you need to define your own APIs.

If you are implementing a key pair generator for a different algorithm, you should create an interface with one or more initialize methods that clients can call when they want to provide algorithm-specific parameters to be used rather than the default parameters your implementation supplies. Your subclass of KeyPairGeneratorSpi should implement this interface.

For algorithms without direct API support, it is recommended that you create similar interfaces and provide implementation classes. Your public key interface should extend the PublicKey interface. Similarly, your private key interface should extend the PrivateKey interface.

Algorithm Parameter Specification Interfaces and Classes

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm.

A transparent representation of parameters means that you can access each value individually, through one of the get methods defined in the corresponding specification class (e.g., DSAParameterSpec defines getP, getQ, and getG methods, to access the p, q, and g parameters, respectively).

This is contrasted with an opaque representation, as supplied by the AlgorithmParameters engine class, in which you have no direct access to the key material values; you can only get the name of the algorithm associated with the parameter set (via getAlgorithm) and some kind of encoding for the parameter set (via getEncoded).

If you supply an AlgorithmParametersSpi, AlgorithmParameterGeneratorSpi, or KeyPairGeneratorSpi implementation, you must utilize the AlgorithmParameterSpec interface, since each of those classes contain methods that take an AlgorithmParameterSpec parameter. Such methods need to determine which actual implementation of that interface has been passed in, and act accordingly.

JCA contains a number of AlgorithmParameterSpec implementations for the most frequently used signature, cipher and key agreement algorithm parameters. If you are operating on algorithm parameters that should be for a different type of algorithm not provided by JCA, you will need to supply your own AlgorithmParameterSpec implementation appropriate for that type of algorithm.

Java defines the following algorithm parameter specification interfaces and classes in the java.security.spec and javax.crypto.spec packages:

The AlgorithmParameterSpec Interface

AlgorithmParameterSpec is an interface to a transparent specification of cryptographic parameters.

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all parameter specifications. All parameter specifications must implement this interface.

The DSAParameterSpec Class

This class (which implements the AlgorithmParameterSpec and DSAParams interfaces) specifies the set of parameters used with the DSA algorithm. It has the following methods:

    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()

These methods return the DSA algorithm parameters: the prime p, the sub-prime q, and the base g.

Many types of DSA services will find this class useful - for example, it is utilized by the DSA signature, key pair generator, algorithm parameter generator, and algorithm parameters classes implemented by the Sun provider. As a specific example, an algorithm parameters implementation must include an implementation for the getParameterSpec method, which returns an AlgorithmParameterSpec. The DSA algorithm parameters implementation supplied by Sun returns an instance of the DSAParameterSpec class.

The IvParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the initialization vector (IV) used with a cipher in feedback mode.

Method in IvParameterSpec
Method | Description
byte[] getIV() | Returns the initialization vector (IV).

The OAEPParameterSpec Class

This class specifies the set of parameters used with OAEP Padding, as defined in the PKCS #1 standard.

Methods in OAEPParameterSpec
Method | Description
String getDigestAlgorithm() | Returns the message digest algorithm name.
String getMGFAlgorithm() | Returns the mask generation function algorithm name.
AlgorithmParameterSpec getMGFParameters() | Returns the parameters for the mask generation function.
PSource getPSource() | Returns the source of encoding input P.

The PBEParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the set of parameters used with a password-based encryption (PBE) algorithm.

Methods in PBEParameterSpec
Method | Description
int getIterationCount() | Returns the iteration count.
byte[] getSalt() | Returns the salt.

The RC2ParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the set of parameters used with the RC2 algorithm.

Methods in RC2ParameterSpec
Method | Description
boolean equals(Object obj) | Tests for equality between the specified object and this object.
int getEffectiveKeyBits() | Returns the effective key size in bits.
byte[] getIV() | Returns the IV or null if this parameter set does not contain an IV.
int hashCode() | Calculates a hash code value for the object.

The RC5ParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the set of parameters used with the RC5 algorithm.

Methods in RC5ParameterSpec
Method | Description
boolean equals(Object obj) | Tests for equality between the specified object and this object.
byte[] getIV() | Returns the IV or null if this parameter set does not contain an IV.
int getRounds() | Returns the number of rounds.
int getVersion() | Returns the version.
int getWordSize() | Returns the word size in bits.
int hashCode() | Calculates a hash code value for the object.

The DHParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the set of parameters used with the Diffie-Hellman algorithm.

Methods in DHParameterSpec
Method | Description
BigInteger getG() | Returns the base generator g.
int getL() | Returns the size in bits, l, of the random exponent (private value).
BigInteger getP() | Returns the prime modulus p.

Many types of Diffie-Hellman services will find this class useful; for example, it is used by the Diffie-Hellman key agreement, key pair generator, algorithm parameter generator, and algorithm parameters classes implemented by the "SunJCE" provider. As a specific example, an algorithm parameters implementation must include an implementation for the getParameterSpec method, which returns an AlgorithmParameterSpec. The Diffie-Hellman algorithm parameters implementation supplied by "SunJCE" returns an instance of the DHParameterSpec class.

Key Specification Interfaces and Classes Required by Key Factories

A key factory provides bi-directional conversions between opaque keys (of type Key) and key specifications. If you implement a key factory, you thus need to understand and utilize key specifications. In some cases, you also need to implement your own key specifications.

Further information about key specifications, the interfaces and classes supplied in Java, and key factory requirements with respect to specifications, is provided below.

Key specifications are transparent representations of the key material that constitutes a key. If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

A transparent representation of keys means that you can access each key material value individually, through one of the get methods defined in the corresponding specification class. For example, java.security.spec.DSAPrivateKeySpec defines getX, getP, getQ, and getG methods, to access the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

This is contrasted with an opaque representation, as defined by the Key interface, in which you have no direct access to the parameter fields. In other words, an "opaque" representation gives you limited access to the key - just the three methods defined by the Key interface: getAlgorithm, getFormat, and getEncoded.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec).

Java defines the following key specification interfaces and classes in the java.security.spec and javax.crypto.spec packages:

The KeySpec Interface

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all key specifications. All key specifications must implement this interface.

Java supplies several classes implementing the KeySpec interface: DSAPrivateKeySpec, DSAPublicKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec, EncodedKeySpec, PKCS8EncodedKeySpec, and X509EncodedKeySpec.

If your provider uses key types (e.g., Your_PublicKey_type and Your_PrivateKey_type) for which the JDK does not already provide corresponding KeySpec classes, there are two possible scenarios, one of which requires that you implement your own key specifications:

  1. If your users will never have to access specific key material values of your key type, you will not have to provide any KeySpec classes for your key type.

    In this scenario, your users will always create Your_PublicKey_type and Your_PrivateKey_type keys through the appropriate KeyPairGenerator supplied by your provider for that key type. If they want to store the generated keys for later usage, they retrieve the keys' encodings (using the getEncoded method of the Key interface). When they want to create an Your_PublicKey_type or Your_PrivateKey_type key from the encoding (e.g., in order to initialize a Signature object for signing or verification), they create an instance of X509EncodedKeySpec or PKCS8EncodedKeySpec from the encoding, and feed it to the appropriate KeyFactory supplied by your provider for that algorithm, whose generatePublic and generatePrivate methods will return the requested PublicKey (an instance of Your_PublicKey_type) or PrivateKey (an instance of Your_PrivateKey_type) object, respectively.
  2. If you anticipate a need for users to access specific key material values of your key type, or to construct a key of your key type from key material and associated parameter values, rather than from its encoding (as in the above case), you have to specify new KeySpec classes (classes that implement the KeySpec interface) with the appropriate constructor methods and get methods for returning key material fields and associated parameter values for your key type. You will specify those classes in a similar manner as is done by the DSAPrivateKeySpec and DSAPublicKeySpec classes. You need to ship those classes along with your provider classes, for example, as part of your provider JAR file.

The DSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA private key with its associated parameters. It has the following methods:

Method in DSAPrivateKeySpec | Description
public BigInteger getX() | Returns the private key x.
public BigInteger getP() | Returns the prime p.
public BigInteger getQ() | Returns the sub-prime q.
public BigInteger getG() | Returns the base g.

These methods return the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The DSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA public key with its associated parameters. It has the following methods:

Method in DSAPublicKeySpec | Description
public BigInteger getY() | returns the public key y.
public BigInteger getP() | Returns the prime p.
public BigInteger getQ() | Returns the sub-prime q.
public BigInteger getG() | Returns the base g.

These methods return the public key y, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The RSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA private key. It has the following methods:

Method in RSAPrivateKeySpec | Description
public BigInteger getModulus() | Returns the modulus.
public BigInteger getPrivateExponent() | Returns the private exponent.

These methods return the RSA modulus n and private exponent d values that constitute the RSA private key.

The RSAPrivateCrtKeySpec Class

This class (which extends the RSAPrivateKeySpec class) specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values. It has the following methods (in addition to the methods inherited from its superclass RSAPrivateKeySpec ):

Method in RSAPrivateCrtKeySpec | Description
public BigInteger getPublicExponent() | Returns the public exponent.
public BigInteger getPrimeP() | Returns the prime P.
public BigInteger getPrimeQ() | Returns the prime Q.
public BigInteger getPrimeExponentP() | Returns the primeExponentP.
public BigInteger getPrimeExponentQ() | Returns the primeExponentQ.
public BigInteger getCrtCoefficient() | Returns the crtCoefficient.

These methods return the public exponent e and the CRT information integers: the prime factor p of the modulus n, the prime factor q of n, the exponent d mod (p-1), the exponent d mod (q-1), and the Chinese Remainder Theorem coefficient (inverse of q) mod p.

An RSA private key logically consists of only the modulus and the private exponent. The presence of the CRT values is intended for efficiency.

The RSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA public key. It has the following methods:

Method in RSAPublicKeySpec | Description
public BigInteger getModulus() | Returns the modulus.
public BigInteger getPublicExponent() | Returns the public exponent.

These methods return the RSA modulus n and public exponent e values that constitute the RSA public key.

The EncodedKeySpec Class

This abstract class (which implements the KeySpec Interface) represents a public or private key in encoded format.

Method in EncodedKeySpec | Description
public abstract byte[] getEncoded() | Returns the encoded key.
public abstract String getFormat() | Returns the name of the encoding format.

The JDK supplies two classes implementing the EncodedKeySpec interface: PKCS8EncodedKeySpec and X509EncodedKeySpec. If desired, you can supply your own EncodedKeySpec implementations for those or other types of key encodings.

The PKCS8EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a private key, according to the format specified in the PKCS #8 standard.

Its getEncoded method returns the key bytes, encoded according to the PKCS #8 standard. Its getFormat method returns the string "PKCS#8".

The X509EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a public or private key, according to the format specified in the X.509 standard.

Its getEncoded method returns the key bytes, encoded according to the X.509 standard. Its getFormat method returns the string "X.509". DHPrivateKeySpec, DHPublicKeySpec, DESKeySpec, DESedeKeySpec, PBEKeySpec, and SecretKeySpec.

The DHPrivateKeySpec Class

This class (which implements the KeySpec interface) specifies a Diffie-Hellman private key with its associated parameters.

Method in DHPrivateKeySpec | Description
BigInteger getG() | Returns the base generator g.
BigInteger getP() | Returns the prime modulus p.
BigInteger getX() | Returns the private value x.

The DHPublicKeySpec Class

This class (which implements the KeySpec interface) specifies a Diffie-Hellman public key with its associated parameters.

Method in DHPublicKeySpec | Description
BigInteger getG() | Returns the base generator g.
BigInteger getP() | Returns the prime modulus p.
BigInteger getY() | Returns the public value y.

The DESKeySpec Class

This class (which implements the KeySpec interface) specifies a DES key.

Method in DESKeySpec | Description
byte[] getKey() | Returns the DES key bytes.
static boolean isParityAdjusted(byte[] key, int offset) | Checks if the given DES key material is parity-adjusted.
static boolean isWeak(byte[] key, int offset) | Checks if the given DES key material is weak or semi-weak.

The DESedeKeySpec Class

This class (which implements the KeySpec interface) specifies a DES-EDE (Triple DES) key.

Method in DESedeKeySpec | Description
byte[] getKey() | Returns the DES-EDE key.
static boolean isParityAdjusted(byte[] key, int offset) | Checks if the given DES-EDE key is parity-adjusted.

The PBEKeySpec Class

This class implements the KeySpec interface. A user-chosen password can be used with password-based encryption (PBE); the password can be viewed as a type of raw key material. An encryption mechanism that uses this class can derive a cryptographic key from the raw key material.

Method in PBEKeySpec | Description
void clearPassword | Clears the internal copy of the password.
int getIterationCount | Returns the iteration count or 0 if not specified.
int getKeyLength | Returns the to-be-derived key length or 0 if not specified.
char[] getPassword | Returns a copy of the password.
byte[] getSalt | Returns a copy of the salt or null if not specified.

The SecretKeySpec Class

This class implements the KeySpec interface. Since it also implements the SecretKey interface, it can be used to construct a SecretKey object in a provider-independent fashion, i.e., without having to go through a provider-based SecretKeyFactory.

Method in SecretKeySpec | Description
boolean equals (Object obj) | Indicates whether some other object is "equal to" this one.
String getAlgorithm() | Returns the name of the algorithm associated with this secret key.
byte[] getEncoded() | Returns the key material of this secret key.
String getFormat() | Returns the name of the encoding format for this secret key.
int hashCode() | Calculates a hash code value for the object.

Secret-Key Generation

If you provide a secret-key generator (subclass of javax.crypto.KeyGeneratorSpi) for a particular secret-key algorithm, you may return the generated secret-key object (which must be an instance of javax.crypto.SecretKey, see engineGenerateKey) in one of the following ways:

  • You implement a class whose instances represent secret-keys of the algorithm associated with your key generator. Your key generator implementation returns instances of that class. This approach is useful if the keys generated by your key generator have provider-specific properties.
  • Your key generator returns an instance of SecretKeySpec, which already implements the javax.crypto.SecretKey interface. You pass the (raw) key bytes and the name of the secret-key algorithm associated with your key generator to the SecretKeySpec constructor. This approach is useful if the underlying (raw) key bytes can be represented as a byte array and have no key-parameters associated with them.

Adding New Object Identifiers

The following information applies to providers who supply an algorithm that is not listed as one of the standard algorithms in Appendix A of the Java Cryptography Architecture Reference Guide.

Mapping from OID to Name

Sometimes the JCA needs to instantiate a cryptographic algorithm implementation from an algorithm identifier (for example, as encoded in a certificate), which by definition includes the object identifier (OID) of the algorithm. For example, in order to verify the signature on an X.509 certificate, the JCA determines the signature algorithm from the signature algorithm identifier that is encoded in the certificate, instantiates a Signature object for that algorithm, and initializes the Signature object for verification.

For the JCA to find your algorithm, you must provide the object identifier of your algorithm as an alias entry for your algorithm in the provider master file.

    put("Alg.Alias.<engine_type>.1.2.3.4.5.6.7.8",
        "<algorithm_alias_name>");

Note that if your algorithm is known under more than one object identifier, you need to create an alias entry for each object identifier under which it is known.

An example of where the JCA needs to perform this type of mapping is when your algorithm ("Foo") is a signature algorithm and users run the keytool command and specify your (signature) algorithm alias.

    % keytool -genkeypair -sigalg 1.2.3.4.5.6.7.8

In this case, your provider master file should contain the following entries:

    put("Signature.Foo", "com.xyz.MyFooSignatureImpl");
    put("Alg.Alias.Signature.1.2.3.4.5.6.7.8", "Foo");

Other examples of where this type of mapping is performed are (1) when your algorithm is a keytype algorithm and your program parses a certificate (using the X.509 implementation of the SUN provider) and extracts the public key from the certificate in order to initialize a Signature object for verification, and (2) when keytool users try to access a private key of your keytype (for example, to perform a digital signature) after having generated the corresponding keypair. In these cases, your provider master file should contain the following entries:

    put("KeyFactory.Foo", "com.xyz.MyFooKeyFactoryImpl");
    put("Alg.Alias.KeyFactory.1.2.3.4.5.6.7.8", "Foo");

Mapping from Name to OID

If the JCA needs to perform the inverse mapping (that is, from your algorithm name to its associated OID), you need to provide an alias entry of the following form for one of the OIDs under which your algorithm should be known:

    put("Alg.Alias.Signature.OID.1.2.3.4.5.6.7.8", "MySigAlg");

If your algorithm is known under more than one object identifier, prefix the preferred one with "OID."

An example of where the JCA needs to perform this kind of mapping is when users run keytool in any mode that takes a -sigalg option. For example, when the -genkeypair and -certreq commands are invoked, the user can specify your (signature) algorithm with the -sigalg option.

Ensuring Exportability

A key feature of JCA is the exportability of the JCA framework and of the provider cryptography implementations if certain conditions are met.

Due to import control restrictions by the governments of a few countries, the jurisdiction policy files shipped with the JDK specify that "strong" but limited cryptography may be used. An "unlimited" version of these files indicating no restrictions on cryptographic strengths is available for those living in eligible countries (which is most countries). But only the "strong" version can be imported into those countries whose governments mandate restrictions. The JCA framework will enforce the restrictions specified in the installed jurisdiction policy files.

As noted elsewhere, you can write just one version of your provider software, implementing cryptography of maximum strength. It is up to JCA, not your provider, to enforce any jurisdiction policy file-mandated restrictions regarding the cryptographic algorithms and maximum cryptographic strengths available to applets/applications in different locations.

The conditions that must be met by your provider in order to enable it to be plugged into JCA are the following:

  • The constructor of each SPI implementation class should do self-integrity checking, as described in How a Provider Can Do Self-Integrity Checking.
  • The provider code should be written in such a way that provider classes become unusable if instantiated by an application directly, bypassing JCA. See Step 1: Write Your Service Implementation Code in the Steps to Implement and Integrate a Provider section.
  • The provider package must be signed by an entity trusted by the JCA framework. (See Step 6.1 through Step 6.2.) U.S. vendors whose providers may be exported outside the U.S. first need to apply for U.S. government export approval. (See Step 10.)

Appendix A: The Sun Provider Master Class

Below is an edited version of the Sun.java file, which contains a class named Sun that is the master class for the provider named Sun.

As with all master classes, this class is a subclass of Provider. It specifies the class names and package locations of all service implementations supplied by the Sun provider. This information is used by the getInstance methods of the engine classes to look up the various algorithms and other services when they are requested.

This code is supplied as an example of a provider master class.

/*
 * @(#)Sun.java 1.28 99/05/27
 *
 * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package sun.security.provider;

import java.io.*;
import java.util.*;
import java.security.*;

/**
 * The SUN Security Provider.
 *
 * @author Benjamin Renaud
 *
 * @version 1.28, 05/27/99
 */

/**
 * Defines the SUN provider.
 *
 * Algorithms supported, and their names:
 *
 * - SHA is the message digest scheme described in FIPS 180-1.
 *   Aliases for SHA are SHA-1 and SHA1.
 *
 * - SHA1withDSA is the signature scheme described in FIPS 186.
 *   (SHA used in DSA is SHA-1: FIPS 186 with Change No 1.)
 *   Aliases for SHA1withDSA are DSA, DSS, SHA/DSA, SHA-1/DSA, SHA1/DSA,
 *   SHAwithDSA, DSAWithSHA1, and the object
 *   identifier strings "OID.1.3.14.3.2.13", "OID.1.3.14.3.2.27" and
 *   "OID.1.2.840.10040.4.3".
 *
 * - DSA is the key generation scheme as described in FIPS 186.
 *   Aliases for DSA include the OID strings "OID.1.3.14.3.2.12"
 *   and "OID.1.2.840.10040.4.1".
 *
 * - MD5 is the message digest scheme described in RFC 1321.
 *   There are no aliases for MD5.
 */

public final class Sun extends Provider {

    private static final String INFO = "SUN " +
    "(DSA key/parameter generation; DSA signing; " +
    "SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore)";

    public Sun() {
        /* We are the SUN provider */
        super("SUN", 1.2, INFO);

        AccessController.doPrivileged(new java.security.PrivilegedAction() {
            public Object run() {

                /*
                 * Signature engines
                 */
                put("Signature.SHA1withDSA", "sun.security.provider.DSA");

                put("Alg.Alias.Signature.DSA", "SHA1withDSA");
                put("Alg.Alias.Signature.DSS", "SHA1withDSA");
                put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
                put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
                put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
                put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
                put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
                put("Alg.Alias.Signature.OID.1.2.840.10040.4.3",
                    "SHA1withDSA");
                put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
                put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
                put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");

                /*
                 *  Key Pair Generator engines
                 */
                put("KeyPairGenerator.DSA",
                    "sun.security.provider.DSAKeyPairGenerator");
                put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
                put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
                put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");

                /*
                 * Digest engines
                 */
                put("MessageDigest.MD5", "sun.security.provider.MD5");
                put("MessageDigest.SHA", "sun.security.provider.SHA");

                put("Alg.Alias.MessageDigest.SHA-1", "SHA");
                put("Alg.Alias.MessageDigest.SHA1", "SHA");

                /*
                 * Algorithm Parameter Generator engines
                 */
                put("AlgorithmParameterGenerator.DSA",
                    "sun.security.provider.DSAParameterGenerator");

                /*
                 * Algorithm Parameter engines
                 */
                put("AlgorithmParameters.DSA",
                    "sun.security.provider.DSAParameters");
                put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.12", "DSA");
                put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1", "DSA");

                /*
                 * Key factories
                 */
                put("KeyFactory.DSA", "sun.security.provider.DSAKeyFactory");
                put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
                put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");

                /*
                 * SecureRandom
                 */
                 put("SecureRandom.SHA1PRNG",
                     "sun.security.provider.SecureRandom");

                /*
                 * Certificates
                 */
                put("CertificateFactory.X509",
                    "sun.security.provider.X509Factory");
                put("Alg.Alias.CertificateFactory.X.509", "X509");

                /*
                 * KeyStore
                 */
                put("KeyStore.JKS", "sun.security.provider.JavaKeyStore");

                /*
                 * KeySize
                 */
                put("Signature.SHA1withDSA KeySize", "1024");
                put("KeyPairGenerator.DSA KeySize", "1024");
                put("AlgorithmParameterGenerator.DSA KeySize", "1024");

                /*
                 * Implementation type: software or hardware
                 */
                put("Signature.SHA1withDSA ImplementedIn", "Software");
                put("KeyPairGenerator.DSA ImplementedIn", "Software");
                put("MessageDigest.MD5 ImplementedIn", "Software");
                put("MessageDigest.SHA ImplementedIn", "Software");
                put("AlgorithmParameterGenerator.DSA ImplementedIn",
                    "Software");
                put("AlgorithmParameters.DSA ImplementedIn", "Software");
                put("KeyFactory.DSA ImplementedIn", "Software");
                put("SecureRandom.SHA1PRNG ImplementedIn", "Software");
                put("CertificateFactory.X509 ImplementedIn", "Software");
                put("KeyStore.JKS ImplementedIn", "Software");

                return null;
            }
        });
    }
}

Appendix B: The SunJCE Provider Master Class

Below is an edited version of the SunJCE.java file, which contains a class named SunJCE that is the master class for the provider named SunJCE.

As with all master classes, this class is a subclass of Provider. It specifies the class names and package locations of all the cryptographic service implementations supplied by the SunJCE provider. This information is used by the getInstance methods of the engine classes to look up the various algorithms and other services when they are requested.

This code is supplied as an example of a provider master class.

/*
 * @(#)SunJCE.java      1.73 05/12/13
 *
 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.sun.crypto.provider;

import java.security.*;
import java.security.cert.*;
import java.net.URL;
import java.io.ByteArrayInputStream;

/**
 * The "SunJCE" Cryptographic Service Provider.
 *
 * @author Jan Luehe
 * @author Sharon Liu
 *
 * @version 1.73, 12/13/05
 */

/**
 * Defines the "SunJCE" provider.
 *
 * Supported algorithms and their names:
 *
 * ...edited for space...
 *
 */

public final class SunJCE extends Provider {

    private static final String info = "SunJCE Provider " +
    "(implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, "
    + "Diffie-Hellman, HMAC)";

    private static final String OID_PKCS5_MD5_DES = "1.2.840.113549.1.5.3";
    private static final String OID_PKCS3 = "1.2.840.113549.1.3.1";

    public SunJCE() {
        /* We are the "SunJCE" provider */
        super("SunJCE", 1.6d, info);

        final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
            "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
            "|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64";
        final String BLOCK_MODES128 = BLOCK_MODES +
            "|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128" +
            "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
        final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";

        AccessController.doPrivileged(new java.security.PrivilegedAction() {
                public Object run() {

                /*
                 * Cipher engines
                 */
                put("Cipher.RSA", "com.sun.crypto.provider.RSACipher");
                put("Cipher.RSA SupportedModes", "ECB");
                put("Cipher.RSA SupportedPaddings",
                        "NOPADDING|PKCS1PADDING|OAEPWITHMD5ANDMGF1PADDING"
                        + "|OAEPWITHSHA1ANDMGF1PADDING"
                        + "|OAEPWITHSHA-1ANDMGF1PADDING"
                        + "|OAEPWITHSHA-256ANDMGF1PADDING"
                        + "|OAEPWITHSHA-384ANDMGF1PADDING"
                        + "|OAEPWITHSHA-512ANDMGF1PADDING");
                put("Cipher.RSA SupportedKeyClasses",
                        "java.security.interfaces.RSAPublicKey" +
                        "|java.security.interfaces.RSAPrivateKey");

                put("Cipher.PBEWithMD5AndDES",
                    "com.sun.crypto.provider.PBEWithMD5AndDESCipher");
                put("Alg.Alias.Cipher.OID."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");
                put("Alg.Alias.Cipher."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");

                put("Cipher.AES", "com.sun.crypto.provider.AESCipher");
                put("Alg.Alias.Cipher.Rijndael", "AES");
                put("Cipher.AES SupportedModes", BLOCK_MODES128);
                put("Cipher.AES SupportedPaddings", BLOCK_PADS);
                put("Cipher.AES SupportedKeyFormats", "RAW");

                put("Cipher.AESWrap", "com.sun.crypto.provider.AESWrapCipher");
                put("Cipher.AESWrap SupportedModes", "ECB");
                put("Cipher.AESWrap SupportedPaddings", "NOPADDING");
                put("Cipher.AESWrap SupportedKeyFormats", "RAW");

                put("Cipher.ARCFOUR",
                    "com.sun.crypto.provider.ARCFOURCipher");
                put("Alg.Alias.Cipher.RC4", "ARCFOUR");
                put("Cipher.ARCFOUR SupportedModes", "ECB");
                put("Cipher.ARCFOUR SupportedPaddings", "NOPADDING");
                put("Cipher.ARCFOUR SupportedKeyFormats", "RAW");

                /*
                 *  Key(pair) Generator engines
                 */
                put("KeyGenerator.AES",
                    "com.sun.crypto.provider.AESKeyGenerator");
                put("Alg.Alias.KeyGenerator.Rijndael", "AES");

                put("KeyGenerator.ARCFOUR",
                    "com.sun.crypto.provider.KeyGeneratorCore$" +
                    "ARCFOURKeyGenerator");
                put("Alg.Alias.KeyGenerator.RC4", "ARCFOUR");

                put("KeyGenerator.HmacMD5",
                    "com.sun.crypto.provider.HmacMD5KeyGenerator");

                put("KeyGenerator.HmacSHA256",
                    "com.sun.crypto.provider.KeyGeneratorCore$HmacSHA256KG");

                put("KeyPairGenerator.DiffieHellman",
                    "com.sun.crypto.provider.DHKeyPairGenerator");
                put("Alg.Alias.KeyPairGenerator.DH", "DiffieHellman");
                put("Alg.Alias.KeyPairGenerator.OID."+OID_PKCS3,
                    "DiffieHellman");
                put("Alg.Alias.KeyPairGenerator."+OID_PKCS3,
                    "DiffieHellman");

                /*
                 * Algorithm parameter generation engines
                 */
                put("AlgorithmParameterGenerator.DiffieHellman",
                    "com.sun.crypto.provider.DHParameterGenerator");
                put("Alg.Alias.AlgorithmParameterGenerator.DH",
                    "DiffieHellman");
                put("Alg.Alias.AlgorithmParameterGenerator.OID."+OID_PKCS3,
                    "DiffieHellman");
                put("Alg.Alias.AlgorithmParameterGenerator."+OID_PKCS3,
                    "DiffieHellman");

                /*
                 * Key Agreement engines
                 */
                put("KeyAgreement.DiffieHellman",
                    "com.sun.crypto.provider.DHKeyAgreement");
                put("Alg.Alias.KeyAgreement.DH", "DiffieHellman");
                put("Alg.Alias.KeyAgreement.OID."+OID_PKCS3, "DiffieHellman");
                put("Alg.Alias.KeyAgreement."+OID_PKCS3, "DiffieHellman");

                put("KeyAgreement.DiffieHellman SupportedKeyClasses",
                    "javax.crypto.interfaces.DHPublicKey" +
                    "|javax.crypto.interfaces.DHPrivateKey");

                /*
                 * Algorithm Parameter engines
                 */
                put("AlgorithmParameters.DiffieHellman",
                    "com.sun.crypto.provider.DHParameters");
                put("Alg.Alias.AlgorithmParameters.DH", "DiffieHellman");
                put("Alg.Alias.AlgorithmParameters.OID."+OID_PKCS3,
                    "DiffieHellman");
                put("Alg.Alias.AlgorithmParameters."+OID_PKCS3,
                    "DiffieHellman");

                put("AlgorithmParameters.PBEWithMD5AndDES",
                    "com.sun.crypto.provider.PBEParameters");
                put("Alg.Alias.AlgorithmParameters.OID."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");
                put("Alg.Alias.AlgorithmParameters."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");

                put("AlgorithmParameters.OAEP",
                    "com.sun.crypto.provider.OAEPParameters");

                /*
                 * Key factories
                 */
                put("KeyFactory.DiffieHellman",
                    "com.sun.crypto.provider.DHKeyFactory");
                put("Alg.Alias.KeyFactory.DH", "DiffieHellman");
                put("Alg.Alias.KeyFactory.OID."+OID_PKCS3,
                    "DiffieHellman");
                put("Alg.Alias.KeyFactory."+OID_PKCS3, "DiffieHellman");

                /*
                 * Secret-key factories
                 */
                put("SecretKeyFactory.PBEWithMD5AndDES",
                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndDES"
                    );
                put("Alg.Alias.SecretKeyFactory.OID."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");
                put("Alg.Alias.SecretKeyFactory."+OID_PKCS5_MD5_DES,
                    "PBEWithMD5AndDES");

                /*
                 * MAC
                 */
                put("Mac.HmacMD5", "com.sun.crypto.provider.HmacMD5");
                put("Mac.HmacSHA256",
                    "com.sun.crypto.provider.HmacCore$HmacSHA256");

                put("Mac.HmacMD5 SupportedKeyFormats", "RAW");
                put("Mac.HmacSHA256 SupportedKeyFormats", "RAW");

                /*
                 * KeyStore
                 */
                put("KeyStore.JCEKS", "com.sun.crypto.provider.JceKeyStore");

                return null;
            }
        });
    }
}

Appendix C: The java.security.properties File

Below is part of the java.security file that shows the default list of installed providers. It appears in every JRE installation. The file also contains other entries, but for brevity, we show only part of the file here. See the complete file at:

  • Solaris, Linux, or Mac OS X: <java-home>/lib/security/java.security
  • Windows: <java-home>\lib\security\java.security

Here <java-home> refers to the directory where the JRE was installed.

See Step 5 for an example of adding information about your provider to this file.

#
# This is the "master security properties file".
#
# In this file, various security properties are set for use by
# java.security classes. This is where users can statically register
# Cryptography Package Providers ("providers" for short). The term
# "provider" refers to a package or set of packages that supply a
# concrete implementation of a subset of the cryptography aspects of
# the Java Security API. A provider may, for example, implement one or
# more digital signature algorithms or message digest algorithms.
#
# Each provider must implement a subclass of the Provider class.
# To register a provider in this master security properties file,
# specify the Provider subclass name and priority in the format
#
#    security.provider.<n>=<className>
#
# This declares a provider, and specifies its preference
# order n. The preference order is the order in which providers are
# searched for requested algorithms (when no specific provider is
# requested). The order is 1-based; 1 is the most preferred, followed
# by 2, and so on.
#
# <className> must specify the subclass of the Provider class whose
# constructor sets the values of various properties that are required
# for the Java Security API to look up the algorithms or other
# facilities implemented by the provider.
#
# There must be at least one provider specification in java.security.
# There is a default provider that comes standard with the JDK. It
# is called the "SUN" provider, and its Provider subclass
# named Sun appears in the sun.security.provider package. Thus, the
# "SUN" provider is registered via the following:
#
#    security.provider.1=sun.security.provider.Sun
#
# (The number 1 is used for the default provider.)
#
# Note: Providers can be dynamically registered instead by calls to
# either the addProvider or insertProviderAt method in the Security
# class.

#
# List of providers and their preference orders (see above):
#

security.provider.1=sun.security.pkcs11.SunPKCS11 \
    ${java.home}/lib/security/sunpkcs11-solaris.cfg
security.provider.2=sun.security.provider.Sun
security.provider.3=sun.security.rsa.SunRsaSign
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.9=sun.security.smartcardio.SunPCSC

# Rest of file deleted
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Cryptography Architecture (JCA) Reference Guide

Skip Table of Contents
  • Introduction
    • Design Principles
    • Architecture
    • JCA Concepts
  • Core Classes and Interfaces
    • The Provider Class
      • How Provider Implementations are Requested and Supplied
      • Installing Providers
    • The Security Class
    • The SecureRandom Class
    • The MessageDigest Class
    • The Signature Class
    • The Cipher Class
    • Other Cipher-based Classes
      • The Cipher Stream Classes
        • The CipherInputStream Class
        • The CipherOutputStream Class
      • The SealedObject Class
    • The Mac Class
    • Key Interfaces
    • The KeyPair Class
    • Key Specification Interfaces and Classes
      • The KeySpec Interface
      • The KeySpec Subinterfaces
      • The EncodedKeySpec Class
        • The PKCS8EncodedKeySpec Class
        • The X509EncodedKeySpec Class
    • Of Factories and Generators
    • The KeyFactory Class
    • The SecretKeyFactory Class
    • The KeyPairGenerator Class
    • The KeyGenerator Class
    • The KeyAgreement Class
    • Key Management
      • Keystore Location
      • Keystore Implementation
      • The KeyStore Class
    • Algorithm Parameters Classes
      • The AlgorithmParameterSpec Interface
      • The AlgorithmParameters Class
      • The AlgorithmParameterGenerator Class
    • The CertificateFactory Class
  • How the JCA Might Be Used in a SSL/TLS Implementation
  • How to Make Applications "Exempt" from Cryptographic Restrictions
  • Code Examples
    • Computing a MessageDigest Object
    • Generating a Pair of Keys
    • Generating and Verifying a Signature Using Generated Keys
    • Generating/Verifying Signatures Using Key Specifications and KeyFactory
    • Determining If Two Keys Are Equal
    • Reading Base64-Encoded Certificates
    • Parsing a Certificate Reply
    • Using Encryption
    • Using Password-Based Encryption
    • Using Key Agreement
  • Appendix A: Standard Names
  • Appendix B: Jurisdiction Policy File Format
  • Appendix C: Maximum Key Sizes Allowed by "Strong" Jurisdiction Policy Files
  • Appendix D: Sample Programs
    • Diffie-Hellman Key Exchange between 2 Parties
    • Diffie-Hellman Key Exchange between 3 Parties
    • Blowfish Cipher Example
    • HMAC-MD5 Example
    • Reading ASCII Passwords From an InputStream Example

Introduction

The Java platform strongly emphasizes security, including language safety, cryptography, public key infrastructure, authentication, secure communication, and access control.

The JCA is a major piece of the platform, and contains a "provider" architecture and a set of APIs for digital signatures, message digests (hashes), certificates and certificate validation, encryption (symmetric/asymmetric block/stream ciphers), key generation and management, and secure random number generation, to name a few. These APIs allow developers to easily integrate security into their application code. The architecture was designed around the following principles:

  • Implementation independence: Applications do not need to implement security algorithms. Rather, they can request security services from the Java platform. Security services are implemented in providers (see below), which are plugged into the Java platform via a standard interface. An application may rely on multiple independent providers for security functionality.

  • Implementation interoperability: Providers are interoperable across applications. Specifically, an application is not bound to a specific provider, and a provider is not bound to a specific application.

  • Algorithm extensibility: The Java platform includes a number of built-in providers that implement a basic set of security services that are widely used today. However, some applications may rely on emerging standards not yet implemented, or on proprietary services. The Java platform supports the installation of custom providers that implement such services.

Other cryptographic communication libraries available in the JDK use the JCA provider architecture, but are described elsewhere. The Java Secure Socket Extension (JSSE) provides access to Secure Socket Layer (SSL) and Transport Layer Security (TLS) implementations. The Java Generic Security Services (JGSS) (via Kerberos) APIs, and the Simple Authentication and Security Layer (SASL) can also be used for securely exchanging messages between communicating applications.

Notes on Terminology

  • Prior to JDK 1.4, the JCE was an unbundled product, and as such, the JCA and JCE were regularly referred to as separate, distinct components. As JCE is now bundled in the JDK, the distinction is becoming less apparent. Since the JCE uses the same architecture as the JCA, the JCE should be more properly thought of as a part of the JCA.

  • The JCA within the JDK includes two software components:

    1. the framework that defines and supports cryptographic services for which providers supply implementations. This framework includes packages such as java.security, javax.crypto, javax.crypto.spec, and javax.crypto.interfaces.
    2. the actual providers such as Sun, SunRsaSign, SunJCE, which contain the actual cryptographic implementations.

    Whenever a specific JCA provider is mentioned, it will be referred to explicitly by the provider's name.

WARNING: The JCA makes it easy to incorporate security features into your application. However, this document does not cover the theory of security/cryptography beyond an elementary introduction to concepts necessary to discuss the APIs. This document also does not cover the strengths/weaknesses of specific algorithms, not does it cover protocol design. Cryptography is an advanced topic and one should consult a solid, preferably recent, reference in order to make best use of these tools.

You should always understand what you are doing and why: DO NOT simply copy random code and expect it to fully solve your usage scenario. Many applications have been deployed that contain significant security or performance problems because the wrong tool or algorithm was selected.

Design Principles

The JCA was designed around these principles:

  • implementation independence and interoperability
  • algorithm independence and extensibility

Implementation independence and algorithm independence are complementary; you can use cryptographic services, such as digital signatures and message digests, without worrying about the implementation details or even the algorithms that form the basis for these concepts. While complete algorithm-independence is not possible, the JCA provides standardized, algorithm-specific APIs. When implementation-independence is not desirable, the JCA lets developers indicate a specific implementation.

Algorithm independence is achieved by defining types of cryptographic "engines" (services), and defining classes that provide the functionality of these cryptographic engines. These classes are called engine classes, and examples are the MessageDigest, Signature, KeyFactory, KeyPairGenerator, and Cipher classes.

Implementation independence is achieved using a "provider"-based architecture. The term Cryptographic Service Provider (CSP) (used interchangeably with "provider" in this document) refers to a package or set of packages that implement one or more cryptographic services, such as digital signature algorithms, message digest algorithms, and key conversion services. A program may simply request a particular type of object (such as a Signature object) implementing a particular service (such as the DSA signature algorithm) and get an implementation from one of the installed providers. If desired, a program may instead request an implementation from a specific provider. Providers may be updated transparently to the application, for example when faster or more secure versions are available.

Implementation interoperability means that various implementations can work with each other, use each other's keys, or verify each other's signatures. This would mean, for example, that for the same algorithms, a key generated by one provider would be usable by another, and a signature generated by one provider would be verifiable by another.

Algorithm extensibility means that new algorithms that fit in one of the supported engine classes can be added easily.

Architecture

Cryptographic Service Providers

java.security.Provider is the base class for all security providers. Each CSP contains an instance of this class which contains the provider's name and lists all of the security services/algorithms it implements. When an instance of a particular algorithm is needed, the JCA framework consults the provider's database, and if a suitable match is found, the instance is created.

Providers contain a package (or a set of packages) that supply concrete implementations for the advertised cryptographic algorithms. Each JDK installation has one or more providers installed and configured by default. Additional providers may be added statically or dynamically (see the Provider and Security classes). Clients may configure their runtime environment to specify the provider preference order. The preference order is the order in which providers are searched for requested services when no specific provider is requested.

To use the JCA, an application simply requests a particular type of object (such as a MessageDigest) and a particular algorithm or service (such as the "MD5" algorithm), and gets an implementation from one of the installed providers. Alternatively, the program can request the objects from a specific provider. Each provider has a name used to refer to it.

    md = MessageDigest.getInstance("MD5");
    md = MessageDigest.getInstance("MD5", "ProviderC");

The following figure illustrates requesting an "MD5" message digest implementation. The figure show three different providers that implement various message digest algorithms ("SHA-1", "MD5", "SHA-256", and "SHA-512"). The providers are ordered by preference from left to right (1-3). In the first illustration, an application requests an MD5 algorithm implementation without specifying a provider name. The providers are searched in preference order and the implementation from the first provider supplying that particular algorithm, ProviderB, is returned. In the second figure, the application requests the MD5 algorithm implementation from a specific provider, ProviderC. This time the implementation from ProviderC is returned, even though a provider with a higher preference order, ProviderB, also supplies an MD5 implementation.

MD5 Message Digest Implementation

Description of Figure MD5 Message Digest Implementation

Cryptographic implementations in the JDK are distributed via several different providers (Sun, SunJSSE, SunJCE, SunRsaSign) primarily for historical reasons, but to a lesser extent by the type of functionality and algorithms they provide. Other Java runtime environments may not necessarily contain these Sun providers, so applications should not request an provider-specific implementation unless it is known that a particular provider will be available.

The JCA offers a set of APIs that allow users to query which providers are installed and what services they support.

This architecture also makes it easy for end-users to add additional providers. Many third party provider implementations are already available. See The Provider Class for more information on how providers are written, installed, and registered.

How Providers Are Actually Implemented

As mentioned earlier, algorithm independence is achieved by defining a generic high-level Application Programming Interface (API) that all applications use to access a service type. Implementation independence is achieved by having all provider implementations conform to well-defined interfaces. Instances of engine classes are thus "backed" by implementation classes which have the same method signatures. Application calls are routed through the engine class and are delivered to the underlying backing implementation. The implementation handles the request and return the proper results.

The application API methods in each engine class are routed to the provider's implementations through classes that implement the corresponding Service Provider Interface (SPI). That is, for each engine class, there is a corresponding abstract SPI class which defines the methods that each cryptographic service provider's algorithm must implement. The name of each SPI class is the same as that of the corresponding engine class, followed by Spi. For example, the Signature engine class provides access to the functionality of a digital signature algorithm. The actual provider implementation is supplied in a subclass of SignatureSpi. Applications call the engine class' API methods, which in turn call the SPI methods in the actual implementation.

Each SPI class is abstract. To supply the implementation of a particular type of service for a specific algorithm, a provider must subclass the corresponding SPI class and provide implementations for all the abstract methods.

For each engine class in the API, implementation instances are requested and instantiated by calling the getInstance() factory method in the engine class. A factory method is a static method that returns an instance of a class. The engine classes use the framework provider selection mechanism described above to obtain the actual backing implementation (SPI), and then creates the actual engine object. Each instance of the engine class encapsulates (as a private field) the instance of the corresponding SPI class, known as the SPI object. All API methods of an API object are declared final and their implementations invoke the corresponding SPI methods of the encapsulated SPI object.

To make this clearer, review the following code and illustration:

    import javax.crypto.*;

    Cipher c = Cipher.getInstance("AES");
    c.init(ENCRYPT_MODE, key);
Example of How Application Retrieves AES Cipher Intstance

Description of Example of How Application Retrieves "AES" Cipher Instance

Here an application wants an "AES" javax.crypto.Cipher instance, and doesn't care which provider is used. The application calls the getInstance() factory methods of the Cipher engine class, which in turn asks the JCA framework to find the first provider instance that supports "AES". The framework consults each installed provider, and obtains the provider's instance of the Provider class. (Recall that the Provider class is a database of available algorithms.) The framework searches each provider, finally finding a suitable entry in CSP3. This database entry points to the implementation class com.foo.AESCipher which extends CipherSpi, and is thus suitable for use by the Cipher engine class. An instance of com.foo.AESCipher is created, and is encapsulated in a newly-created instance of javax.crypto.Cipher, which is returned to the application. When the application now does the init() operation on the Cipher instance, the Cipher engine class routes the request into the corresponding engineInit() backing method in the com.foo.AESCipher class.

Appendix A lists the Standard Names defined for the Java environment. Other third-party providers may define their own implementations of these services, or even additional services.

Key Management

A database called a "keystore" can be used to manage a repository of keys and certificates. Keystores are available to applications that need data for authentication, encryption, or signing purposes.

Applications can access a keystore via an implementation of the KeyStore class, which is in the java.security package. A default KeyStore implementation is provided by Sun Microsystems. It implements the keystore as a file, using a proprietary keystore type (format) named "jks". Other keystore formats are available, such as "jceks" which is an alternate proprietary keystore format with much stronger encryption than "jks", and "pkcs12", which is based on the RSA PKCS12 Personal Information Exchange Syntax Standard.

Applications can choose different keystore implementations from different providers, using the same provider mechanism described above.

See the Key Management section for more information.

JCA Concepts

This section introduces the major JCA APIs.

Engine Classes and Algorithms

An engine class provides the interface to a specific type of cryptographic service, independent of a particular cryptographic algorithm or provider. The engines either provide:

  • cryptographic operations (encryption, digital signatures, message digests, etc.),
  • generators or converters of cryptographic material (keys and algorithm parameters), or
  • objects (keystores or certificates) that encapsulate the cryptographic data and can be used at higher layers of abstraction.

The following engine classes are available:

  • SecureRandom: used to generate random or pseudo-random numbers.
  • MessageDigest: used to calculate the message digest (hash) of specified data.
  • Signature: initialized with keys, these are used to sign data and verify digital signatures.
  • Cipher: initialized with keys, these used for encrypting/decrypting data. There are various types of algorithms: symmetric bulk encryption (e.g. AES, DES, DESede, Blowfish, IDEA), stream encryption (e.g. RC4), asymmetric encryption (e.g. RSA), and password-based encryption (PBE).
  • Message Authentication Codes (MAC): like MessageDigests, these also generate hash values, but are first initialized with keys to protect the integrity of messages.
  • KeyFactory: used to convert existing opaque cryptographic keys of type Key into key specifications (transparent representations of the underlying key material), and vice versa.
  • SecretKeyFactory: used to convert existing opaque cryptographic keys of type SecretKey into key specifications (transparent representations of the underlying key material), and vice versa. SecretKeyFactorys are specialized KeyFactorys that create secret (symmetric) keys only.
  • KeyPairGenerator: used to generate a new pair of public and private keys suitable for use with a specified algorithm.
  • KeyGenerator: used to generate new secret keys for use with a specified algorithm.
  • KeyAgreement: used by two or more parties to agree upon and establish a specific key to use for a particular cryptographic operation.
  • AlgorithmParameters: used to store the parameters for a particular algorithm, including parameter encoding and decoding.
  • AlgorithmParameterGenerator : used to generate a set of AlgorithmParameters suitable for a specified algorithm.
  • KeyStore: used to create and manage a keystore. A keystore is a database of keys. Private keys in a keystore have a certificate chain associated with them, which authenticates the corresponding public key. A keystore also contains certificates from trusted entities.
  • CertificateFactory: used to create public key certificates and Certificate Revocation Lists (CRLs).
  • CertPathBuilder: used to build certificate chains (also known as certification paths).
  • CertPathValidator: used to validate certificate chains.
  • CertStore: used to retrieve Certificates and CRLs from a repository.

NOTE: A generator creates objects with brand-new contents, whereas a factory creates objects from existing material (for example, an encoding).

Core Classes and Interfaces

This section discusses the core classes and interfaces provided in the JCA:

  • the Provider and Security classes,
  • the SecureRandom, MessageDigest, Signature, Cipher, Mac, KeyFactory, SecretKeyFactory, KeyPairGenerator, KeyGenerator, KeyAgreement, AlgorithmParameters, AlgorithmParameterGenerator , KeyStore, and CertificateFactory, engine classes,
  • the Key interfaces and classes,
  • the Algorithm Parameter Specification Interfaces and Classes and the Key Specification Interfaces and Classes, and
  • miscellaneous support and convenience interfaces and classes.

NOTE: For more information on the CertPathBuilder, CertPathValidator, and CertStore engine classes, please see the Java PKI Programmer's Guide.

The guide will cover the most useful high-level classes first (Provider, Security, SecureRandom, MessageDigest, Signature, Cipher, and Mac), then delve into the various support classes. For now, it is sufficient to simply say that Keys (public, private, and secret) are generated and represented by the various JCA classes, and are used by the high-level classes as part of their operation.

This section shows the signatures of the main methods in each class and interface. Examples for some of these classes (MessageDigest, Signature, KeyPairGenerator, SecureRandom, KeyFactory, and key specification classes) are supplied in the corresponding Examples sections.

The complete reference documentation for the relevant Security API packages can be found in the package summaries:

  • java.security
  • javax.crypto
  • java.security.cert
  • java.security.spec
  • javax.crypto.spec
  • java.security.interfaces
  • javax.crypto.interfaces

The Provider Class

The term "Cryptographic Service Provider" (used interchangeably with "provider" in this document) refers to a package or set of packages that supply a concrete implementation of a subset of the JDK Security API cryptography features. The Provider class is the interface to such a package or set of packages. It has methods for accessing the provider name, version number, and other information. Please note that in addition to registering implementations of cryptographic services, the Provider class can also be used to register implementations of other security services that might get defined as part of the JDK Security API or one of its extensions.

To supply implementations of cryptographic services, an entity (e.g., a development group) writes the implementation code and creates a subclass of the Provider class. The constructor of the Provider subclass sets the values of various properties; the JDK Security API uses these values to look up the services that the provider implements. In other words, the subclass specifies the names of the classes implementing the services.

Example of Provider Subclass

Description of Figure Example of Provider Subclass

There are several types of services that can be implemented by provider packages; for more information, see Engine Classes and Algorithms.

The different implementations may have different characteristics. Some may be software-based, while others may be hardware-based. Some may be platform-independent, while others may be platform-specific. Some provider source code may be available for review and evaluation, while some may not. The JCA lets both end-users and developers decide what their needs are.

In this section we explain how end-users install the cryptography implementations that fit their needs, and how developers request the implementations that fit theirs.

NOTE: For information about implementing a provider, see the guide How To Implement a Provider for the Java Cryptography Architecture.

How Provider Implementations Are Requested and Supplied

For each engine class in the API, a implementation instance is requested and instantiated by calling one of the getInstance methods on the engine class, specifying the name of the desired algorithm and, optionally, the name of the provider (or the Provider class) whose implementation is desired.

static EngineClassName getInstance(String algorithm)
    throws NoSuchAlgorithmException

static EngineClassName getInstance(String algorithm, String provider)
    throws NoSuchAlgorithmException, NoSuchProviderException

static EngineClassName getInstance(String algorithm, Provider provider)
    throws NoSuchAlgorithmException
where EngineClassName is the desired engine type (MessageDigest/Cipher/etc). For example:
    MessageDigest md = MessageDigest.getInstance("MD5");
    KeyAgreement ka = KeyAgreement.getInstance("DH", "SunJCE");
return an instance of the "MD5" MessageDigest and "DH" KeyAgreement objects, respectively.

Appendix A contains the list of names that have been standardized for use with the Java environment. Some providers may choose to also include alias names that also refer to the same algorithm. For example, the "SHA-1" algorithm might be referred to as "SHA1". Applications should use standard names instead of an alias, as not all providers may alias algorithm names in the same way.

NOTE: The algorithm name is not case-sensitive. For example, all the following calls are equivalent:

MessageDigest.getInstance("SHA-1")
MessageDigest.getInstance("sha-1")
MessageDigest.getInstance("sHa-1")

If no provider is specified, getInstance searches the registered providers for an implementation of the requested cryptographic service associated with the named algorithm. In any given Java Virtual Machine (JVM), providers are installed in a given preference order, the order in which the provider list is searched if a specific provider is not requested. For example, suppose there are two providers installed in a JVM, PROVIDER_1 and PROVIDER_2. Assume that:

  • PROVIDER_1 implements SHA1withDSA, SHA-1, MD5, DES, and DES3.
    PROVIDER_1 has preference order 1 (the highest priority).
  • PROVIDER_2 implements SHA1withDSA, MD5withRSA, MD2withRSA, MD2, MD5, RC4, RC5, DES, and RSA.
    PROVIDER_2 has preference order 2.
Now let's look at three scenarios:
  1. If we are looking for an MD5 implementation. Both providers supply such an implementation. The PROVIDER_1 implementation is returned since PROVIDER_1 has the highest priority and is searched first.
  2. If we are looking for an MD5withRSA signature algorithm, PROVIDER_1 is first searched for it. No implementation is found, so PROVIDER_2 is searched. Since an implementation is found, it is returned.
  3. Suppose we are looking for a SHA1withRSA signature algorithm. Since no installed provider implements it, a NoSuchAlgorithmException is thrown.

The getInstance methods that include a provider argument are for developers who want to specify which provider they want an algorithm from. A federal agency, for example, will want to use a provider implementation that has received federal certification. Let's assume that the SHA1withDSA implementation from PROVIDER_1 has not received such certification, while the DSA implementation of PROVIDER_2 has received it.

A federal agency program would then have the following call, specifying PROVIDER_2 since it has the certified implementation:

Signature dsa = Signature.getInstance("SHA1withDSA", "PROVIDER_2");

In this case, if PROVIDER_2 was not installed, a NoSuchProviderException would be thrown, even if another installed provider implements the algorithm requested.

A program also has the option of getting a list of all the installed providers (using the getProviders method in the Security class) and choosing one from the list.

NOTE: General purpose applications SHOULD NOT request cryptographic services from specific providers. Otherwise, applications are tied to specific providers which may not be available on other Java implementations. They also might not be able to take advantage of available optimized providers (for example hardware accelerators via PKCS11 or native OS implementations such as Microsoft's MSCAPI) that have a higher preference order than the specific requested provider.

Installing Providers

In order to be used, a cryptographic provider must first be installed, then registered either statically or dynamically. There are a variety of Sun providers shipped with this release (SUN, SunJCE, SunJSSE, SunRsaSign, etc.) that are already installed and registered. The following sections describe how to install and register additional providers.

Installing the Provider Classes

There are two possible ways to install the provider classes:

  1. On the normal Java classpath

    Place a zip or JAR file containing the classes anywhere in your classpath. Some algorithms types (Ciphers) require the provider be a signed Jar file.

  2. As an Installed/Bundled Extension

    The provider will be considered an installed extension if it is placed in the standard extension directory. In the JDK, that would be located in:

    • Solaris, Linux, or Mac OS X: <java-home>/lib/ext
    • Windows: <java-home>\lib\ext

    Here <java-home> refers to the directory where the runtime software is installed, which is the top-level directory of the Java Runtime Environment (JRE) or the jre directory in the Java JDK software. For example, if you have JDK 6 installed on Solaris in a directory named /home/user1/JDK1.6.0, or on Microsoft Windows in a directory named C:\Java\JDK1.6.0, then you need to install the JAR file in the following directory:

    • Solaris, Linux, or Mac OS X: /home/user1/JDK1.6.0/jre/lib/ext
    • Windows: C:\JDK1.6.0\jre\lib\ext

    Similarly, if you have the JRE 6 installed on Solaris in a directory named /home/user1/jre1.6.0, or on Microsoft Windows in a directory named C:\jre1.6.0, you need to install the JAR file in the following directory:

    • Solaris, Linux, or Mac OS X: /home/user1/jre1.6.0/lib/ext
    • Windows: C:\jre1.6.0\lib\ext
    For more information on how to deploy an extension, see How is an extension deployed?

Registering the Provider

The next step is to add the provider to your list of registered providers. Providers can be registered statically by editing a security properties configuration file before running a Java application, or dynamically by calling a method at runtime. To prevent the installation of rogue providers being added to the runtime environment, applications attempting to dynamically register a provider must possess the appropriate runtime privilege.

Static Registration

The configuration file is located in the following location:

  • Solaris, Linux, or Mac OS X: <java-home>/lib/security/java.security
  • Windows: <java-home>\lib\security\java.security

For each registered provider, this file should have a statement of the following form:

    security.provider.n=masterClassName

This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). The order is 1-based: 1 is the most preferred, followed by 2, and so on.

masterClassName must specify the fully qualified name of provider's master class. The provider's documentation will specify its master class. This class is always a subclass of the Provider class. The subclass constructor sets the values of various properties that are required for the Java Cryptography API to look up the algorithms or other facilities the provider implements.

The JDK comes standard with automatically installed and configured providers such as "SUN" and "SunJCE". The "SUN" provider's master class is the SUN class in the sun.security.provider package, and the corresponding java.security file entry is as follows:

    security.provider.5=sun.security.provider.Sun

To utilize another JCA provider, add a line referencing the alternate provider, specify the preference order ( making corresponding adjustments to the other providers' orders, if needed).

Suppose that the master class of CompanyX's provider is com.companyx.provider.ProviderX, and that you would like to configure this provider as the eighth most-preferred. To do so, you would add the following line to the java.security file:

    security.provider.8=com.companyx.provider.ProviderX
Dynamic Registration
To register providers dynamically, applications call either the addProvider or insertProviderAt method in the Security class. This type of registration is not persistent across VM instances, and can only be done by "trusted" programs with the appropriate privilege. See Security.

Setting Provider Permissions

Whenever encryption providers are used (that is, those that supply implementations of Cipher, KeyAgreement, KeyGenerator, Mac, or SecretKeyFactory), and the provider is not an installed extension Permissions may need to be granted for when applets or applications using JCA are run while a security manager is installed. There is typically a security manager installed whenever an applet is running, and a security manager may be installed for an application either via code in the application itself or via a command-line argument. Permissions do not need to be granted to installed extensions, since the default system policy configuration file grants all permissions to installed extensions (that is, installed in the extensions directory).

The documentation from the vendor of each provider you will be using should include information as to which permissions it requires, and how to grant such permissions. For example, the following permissions may be needed by a provider if it is not an installed extension and a security manager is installed:

  • java.lang.RuntimePermission "getProtectionDomain" to get class protection domains. The provider may need to get its own protection domain in the process of doing self-integrity checking.
  • java.security.SecurityPermission "putProviderProperty.{name}" to set provider properties, where {name} is replaced by the actual provider name.

For example, a sample statement granting permissions to a provider whose name is "MyJCE" and whose code is in myjce_provider.jar appears below. Such a statement could appear in a policy file. In this example, the myjce_provider.jar file is assumed to be in the /localWork directory.

    grant codeBase "file:/localWork/myjce_provider.jar" {
        permission java.lang.RuntimePermission "getProtectionDomain";
        permission java.security.SecurityPermission
            "putProviderProperty.MyJCE";
     };

Provider Class Methods

Each Provider class instance has a (currently case-sensitive) name, a version number, and a string description of the provider and its services. You can query the Provider instance for this information by calling the following methods:

public String getName()
public double getVersion()
public String getInfo()

The Security Class

The Security class manages installed providers and security-wide properties. It only contains static methods and is never instantiated. The methods for adding or removing providers, and for setting Security properties, can only be executed by a trusted program. Currently, a "trusted program" is either

  • a local application not running under a security manager, or
  • an applet or application with permission to execute the specified method (see below).
The determination that code is considered trusted to perform an attempted action (such as adding a provider) requires that the applet is granted the proper permission(s) for that particular action. The policy configuration file(s) for a JDK installation specify what permissions (which types of system resource accesses) are allowed by code from specified code sources. (See below and the "Default Policy Implementation and Policy File Syntax" and "Java Security Architecture Specification" files for more information.)

Code being executed is always considered to come from a particular "code source". The code source includes not only the location (URL) where the code originated from, but also a reference to any public key(s) corresponding to the private key(s) that may have been used to sign the code. Public keys in a code source are referenced by (symbolic) alias names from the user's keystore.

In a policy configuration file, a code source is represented by two components: a code base (URL), and an alias name (preceded by signedBy), where the alias name identifies the keystore entry containing the public key that must be used to verify the code's signature.

Each "grant" statement in such a file grants a specified code source a set of permissions, specifying which actions are allowed.

Here is a sample policy configuration file:

grant codeBase "file:/home/sysadmin/", signedBy "sysadmin" {
    permission java.security.SecurityPermission "insertProvider.*";
    permission java.security.SecurityPermission "removeProvider.*";
    permission java.security.SecurityPermission "putProviderProperty.*";
};
This configuration file specifies that code loaded from a signed JAR file from beneath the /home/sysadmin/ directory on the local file system can add or remove providers or set provider properties. (Note that the signature of the JAR file can be verified using the public key referenced by the alias name sysadmin in the user's keystore.)

Either component of the code source (or both) may be missing. Here's an example of a configuration file where the codeBase is omitted:

grant signedBy "sysadmin" {
    permission java.security.SecurityPermission "insertProvider.*";
    permission java.security.SecurityPermission "removeProvider.*";
};
If this policy is in effect, code that comes in a JAR File signed by sysadmin can add/remove providers--regardless of where the JAR File originated.

Here's an example without a signer:

grant codeBase "file:/home/sysadmin/" {
    permission java.security.SecurityPermission "insertProvider.*";
    permission java.security.SecurityPermission "removeProvider.*";
};
In this case, code that comes from anywhere within the /home/sysadmin/ directory on the local filesystem can add/remove providers. The code does not need to be signed.

An example where neither codeBase nor signedBy is included is:

grant {
    permission java.security.SecurityPermission "insertProvider.*";
    permission java.security.SecurityPermission "removeProvider.*";
};
Here, with both code source components missing, any code (regardless of where it originates, or whether or not it is signed, or who signed it) can add/remove providers. Obviously, this is definitely NOT recommended, as this grant could open a security hole. Untrusted code could install a Provider, thus affecting later code that is depending on a properly functioning implementation. (For example, a rogue Cipher object might capture and store the sensitive information it receives.)

Managing Providers

The following tables summarize the methods in the Security class you can use to query which Providers are installed, as well as to install or remove providers at runtime.

Querying Providers
Method | Description
static Provider[] getProviders() | Returns an array containing all the installed providers (technically, the Provider subclass for each package provider). The order of the Providers in the array is their preference order.
static Provider getProvider
(String providerName) 		Returns the Provider named providerName. It returns null if the Provider is not found.

Adding Providers
Method | Description
static int addProvider(Provider provider) | Adds a Provider to the end of the list of installed Providers. It returns the preference position in which the Provider was added, or -1 if the Provider was not added because it was already installed.
static int insertProviderAt (Provider provider, int position) | Adds a new Provider at a specified position. If the given provider is installed at the requested position, the provider formerly at that position and all providers with a position greater than position are shifted up one position (towards the end of the list). This method returns the preference position in which the Provider was added, or -1 if the Provider was not added because it was already installed.

Removing Providers
Method | Description
static void removeProvider(String name) | Removes the Provider with the specified name. It returns silently if the provider is not installed. When the specified provider is removed, all providers located at a position greater than where the specified provider was are shifted down one position (towards the head of the list of installed providers).

NOTE: If you want to change the preference position of a provider, you must first remove it, and then insert it back in at the new preference position.

Security Properties

The Security class maintains a list of system-wide security properties. These properties are similar to the System properties, but are security-related. These properties can be set statically or dynamically. We have already seen an example of static security properties (that is, registering a provider statically via the "security.provider.i" security property). If you want to set properties dynamically, trusted programs can use the following methods:

static String getProperty(String key)
static void setProperty(String key, String datum)
Note: the list of security providers is established during VM startup, therefore the methods described above must be used to alter the provider list.

As a reminder, the configuration file is located in the following location:

  • Solaris, Linux, or Mac OS X: <java-home>/lib/security/java.security
  • Windows: <java-home>\lib\security\java.security

The SecureRandom Class

The SecureRandom class is an engine class that provides the functionality of a Random Number Generator (RNG). It differs from the java.lang.Random class in that it produces cryptographically strong random numbers. If there is insufficient randomness in a generator, it makes it much easier to compromise your protection mechanisms. Random numbers are used throughout cryptography, such as generating cryptographic keys, algorithmic parameters, and so on.

All Java SE implementations must indicate the strongest (most random) implementation of SecureRandom that they provide in the securerandom.strongAlgorithms property of the java.security.Security class. This implementation can be used when a particularly strong random value is required.

The SecureRandom Class

Description of The SecureRandom Class

Creating a SecureRandom Object

There are several ways to obtain an instance of SecureRandom:

  • All Java SE implementations provide a default SecureRandom using the no-argument constructor: new SecureRandom().

  • To get a specific implementation of SecureRandom, use one of the getInstance() static factory methods.

  • Use the getInstanceStrong() method to obtain a strong SecureRandom implementation as defined by the securerandom.strongAlgorithms property of the java.security.Security class. This property lists platform implementations that are suitable for generating important values.

Seeding or Re-Seeding the SecureRandom Object

The SecureRandom implementation attempts to completely randomize the internal state of the generator itself unless the caller follows the call to a getInstance method with a call to one of the setSeed methods:

synchronized public void setSeed(byte[] seed)
public void setSeed(long seed)

Once the SecureRandom object has been seeded, it will produce bits as random as the original seeds.

At any time a SecureRandom object may be re-seeded using one of the setSeed methods. The given seed supplements, rather than replaces, the existing seed; therefore, repeated calls are guaranteed never to reduce randomness.

Using a SecureRandom Object

To get random bytes, a caller simply passes an array of any length, which is then filled with random bytes:

synchronized public void nextBytes(byte[] bytes)

Generating Seed Bytes

If desired, it is possible to invoke the generateSeed method to generate a given number of seed bytes (to seed other random number generators, for example):

byte[] generateSeed(int numBytes)

The MessageDigest Class

The MessageDigest class is an engine class designed to provide the functionality of cryptographically secure message digests such as SHA-1 or MD5. A cryptographically secure message digest takes arbitrary-sized input (a byte array), and generates a fixed-size output, called a digest or hash.

The MessageDigest Class

Description of Figure The MessageDigest Class

For example, the MD5 algorithm produces a 16 byte digest, and SHA1's is 20 bytes.

A digest has two properties:

  • It should be computationally infeasible to find two messages that hash to the same value.
  • The digest should not reveal anything about the input that was used to generate it.

Message digests are used to produce unique and reliable identifiers of data. They are sometimes called "checksums" or the "digital fingerprints" of the data. Changes to just one bit of the message should produce a different digest value.

Message digests have many uses and can determine when data has been modified, intentionally or not. Recently, there has been considerable effort to determine if there are any weaknesses in popular algorithms, with mixed results. When selecting a digest algorithm, one should always consult a recent reference to determine its status and appropriateness for the task at hand.

Creating a MessageDigest Object

The first step for computing a digest is to create a message digest instance. MessageDigest objects are obtained by using one of the getInstance() static factory methods in the MessageDigest class. The factory method returns an initialized message digest object. It thus does not need further initialization.

Updating a Message Digest Object

The next step for calculating the digest of some data is to supply the data to the initialized message digest object. It can be provided all at once, or in chunks. Pieces can be fed to the message digest by calling one of the update methods:

void update(byte input)
void update(byte[] input)
void update(byte[] input, int offset, int len)

Computing the Digest

After the data chunks have been supplied by calls to update, the digest is computed using a call to one of the digest methods:

byte[] digest()
byte[] digest(byte[] input)
int digest(byte[] buf, int offset, int len)

The first method return the computed digest. The second method does a final update(input) with the input byte array before calling digest(), which returns the digest byte array. The last method stores the computed digest in the provided buffer buf, starting at offset. len is the number of bytes in buf allotted for the digest, the method returns the number of bytes actually stored in buf. If there is not enough room in the buffer, the method will throw an exception.

Please see the Computing a MessageDigest example in the Code Examples section for more details.

The Signature Class

The Signature class is an engine class designed to provide the functionality of a cryptographic digital signature algorithm such as DSA or RSAwithMD5. A cryptographically secure signature algorithm takes arbitrary-sized input and a private key and generates a relatively short (often fixed-size) string of bytes, called the signature, with the following properties:

  • Only the owner of a private/public key pair is able to create a signature. It should be computationally infeasible for anyone having a public key to recover the private key.
  • Given the public key corresponding to the private key used to generate the signature, it should be possible to verify the authenticity and integrity of the input.
  • The signature and the public key do not reveal anything about the private key.

It can also be used to verify whether or not an alleged signature is in fact the authentic signature of the data associated with it.

The Signature Class

Description of Figure The Signature Class

A Signature object is initialized for signing with a Private Key and is given the data to be signed. The resulting signature bytes are typically kept with the signed data. When verification is needed, another Signature object is created and initialized for verification and given the corresponding Public Key. The data and the signature bytes are fed to the signature object, and if the data and signature match, the Signature object reports success.

Even though a signature seems similar to a message digest, they have very different purposes in the type of protection they provide. In fact, algorithms such as "SHA1WithRSA" use the message digest "SHA1" to initially "compress" the large data sets into a more manageable form, then sign the resulting 20 byte message digest with the "RSA" algorithm.

Please see the Examples section for an example of signing and verifying data.

Signature Object States

Signature objects are modal objects. This means that a Signature object is always in a given state, where it may only do one type of operation. States are represented as final integer constants defined in their respective classes.

The three states a Signature object may have are:

  • UNINITIALIZED
  • SIGN
  • VERIFY
When it is first created, a Signature object is in the UNINITIALIZED state. The Signature class defines two initialization methods, initSign and initVerify, which change the state to SIGN and VERIFY, respectively.

Creating a Signature Object

The first step for signing or verifying a signature is to create a Signature instance. Signature objects are obtained by using one of the Signature getInstance() static factory methods.

Initializing a Signature Object

A Signature object must be initialized before it is used. The initialization method depends on whether the object is going to be used for signing or for verification.

If it is going to be used for signing, the object must first be initialized with the private key of the entity whose signature is going to be generated. This initialization is done by calling the method:

final void initSign(PrivateKey privateKey)
This method puts the Signature object in the SIGN state.

If instead the Signature object is going to be used for verification, it must first be initialized with the public key of the entity whose signature is going to be verified. This initialization is done by calling either of these methods:

    final void initVerify(PublicKey publicKey)

    final void initVerify(Certificate certificate)

This method puts the Signature object in the VERIFY state.

Signing

If the Signature object has been initialized for signing (if it is in the SIGN state), the data to be signed can then be supplied to the object. This is done by making one or more calls to one of the update methods:

final void update(byte b)
final void update(byte[] data)
final void update(byte[] data, int off, int len)

Calls to the update method(s) should be made until all the data to be signed has been supplied to the Signature object.

To generate the signature, simply call one of the sign methods:

final byte[] sign()
final int sign(byte[] outbuf, int offset, int len)

The first method returns the signature result in a byte array. The second stores the signature result in the provided buffer outbuf, starting at offset. len is the number of bytes in outbuf allotted for the signature. The method returns the number of bytes actually stored.

Signature encoding is algorithm specific. See the Standard Names document for more information about the use of ASN.1 encoding in the Java Cryptography Architecture.

A call to a sign method resets the signature object to the state it was in when previously initialized for signing via a call to initSign. That is, the object is reset and available to generate another signature with the same private key, if desired, via new calls to update and sign.

Alternatively, a new call can be made to initSign specifying a different private key, or to initVerify (to initialize the Signature object to verify a signature).

Verifying

If the Signature object has been initialized for verification (if it is in the VERIFY state), it can then verify if an alleged signature is in fact the authentic signature of the data associated with it. To start the process, the data to be verified (as opposed to the signature itself) is supplied to the object. The data is passed to the object by calling one of the update methods:

final void update(byte b)
final void update(byte[] data)
final void update(byte[] data, int off, int len)

Calls to the update method(s) should be made until all the data to be verified has been supplied to the Signature object. The signature can now be verified by calling one of the verify methods:

final boolean verify(byte[] signature)

final boolean verify(byte[] signature, int offset, int length)

The argument must be a byte array containing the signature. This byte array would hold the signature bytes which were returned by a previous call to one of the sign methods.

The verify method returns a boolean indicating whether or not the encoded signature is the authentic signature of the data supplied to the update method(s).

A call to the verify method resets the signature object to its state when it was initialized for verification via a call to initVerify. That is, the object is reset and available to verify another signature from the identity whose public key was specified in the call to initVerify.

Alternatively, a new call can be made to initVerify specifying a different public key (to initialize the Signature object for verifying a signature from a different entity), or to initSign (to initialize the Signature object for generating a signature).

The Cipher Class

The Cipher class provides the functionality of a cryptographic cipher used for encryption and decryption. Encryption is the process of taking data (called cleartext) and a key, and producing data (ciphertext) meaningless to a third-party who does not know the key. Decryption is the inverse process: that of taking ciphertext and a key and producing cleartext.

The Cipher Class

Description of Figure The Cipher Class

Symmetric vs. Asymmetric Cryptography

There are two major types of encryption: symmetric (also known as secret key), and asymmetric (or public key cryptography). In symmetric cryptography, the same secret key to both encrypt and decrypt the data. Keeping the key private is critical to keeping the data confidential. On the other hand, asymmetric cryptography uses a public/private key pair to encrypt data. Data encrypted with one key is decrypted with the other. A user first generates a public/private key pair, and then publishes the public key in a trusted database that anyone can access. A user who wishes to communicate securely with that user encrypts the data using the retrieved public key. Only the holder of the private key will be able to decrypt. Keeping the private key confidential is critical to this scheme.

Asymmetric algorithms (such as RSA) are generally much slower than symmetric ones. These algorithms are not designed for efficiently protecting large amounts of data. In practice, asymmetric algorithms are used to exchange smaller secret keys which are used to initialize symmetric algorithms.

Stream vs. Block Ciphers

There are two major types of ciphers: block and stream. Block ciphers process entire blocks at a time, usually many bytes in length. If there is not enough data to make a complete input block, the data must be padded: that is, before encryption, dummy bytes must be added to make a multiple of the cipher's block size. These bytes are then stripped off during the decryption phase. The padding can either be done by the application, or by initializing a cipher to use a padding type such as "PKCS5PADDING". In contrast, stream ciphers process incoming data one small unit (typically a byte or even a bit) at a time. This allows for ciphers to process an arbitrary amount of data without padding.

Modes Of Operation

When encrypting using a simple block cipher, two identical blocks of plaintext will always produce an identical block of cipher text. Cryptanalysts trying to break the ciphertext will have an easier job if they note blocks of repeating text. In order to add more complexity to the text, feedback modes use the previous block of output to alter the input blocks before applying the encryption algorithm. The first block will need an initial value, and this value is called the initialization vector (IV). Since the IV simply alters the data before any encryption, the IV should be random but does not necessarily need to be kept secret. There are a variety of modes, such as CBC (Cipher Block Chaining), CFB (Cipher Feedback Mode), and OFB (Output Feedback Mode). ECB (Electronic Cookbook Mode) is a mode with no feedback.

Some algorithms such as AES and RSA allow for keys of different lengths, but others are fixed, such as DES and 3DES. Encryption using a longer key generally implies a stronger resistance to message recovery. As usual, there is a trade off between security and time, so choose the key length appropriately.

Most algorithms use binary keys. Most humans do not have the ability to remember long sequences of binary numbers, even when represented in hexadecimal. Character passwords are much easier to recall. Because character passwords are generally chosen from a small number of characters (for example, [a-zA-Z0-9]), protocols such as "Password-Based Encryption" (PBE) have been defined which take character passwords and generate strong binary keys. In order to make the task of getting from password to key very time-consuming for an attacker (via so-called "dictionary attacks" where common dictionary word->value mappings are precomputed), most PBE implementations will mix in a random number, known as a salt, to increase the key randomness.

Newer cipher modes such as Authenticated Encryption with Associated Data (AEAD) (for example, Galois/Counter Mode (GCM)) encrypt data and authenticate the resulting message simultaneously. Additional Associated Data (AAD) can be used during the calculation of the resulting AEAD tag (Mac), but this AAD data is not output as ciphertext. (For example, some data might not need to be kept confidential, but should figure into the tag calculation to detect modifications.) The Cipher.updateAAD() methods can be used to include AAD in the tag calculations.

Creating a Cipher Object

Cipher objects are obtained by using one of the Cipher getInstance() static factory methods. Here, the algorithm name is slightly different than with other engine classes, in that it specifies not just an algorithm name, but a "transformation". A transformation is a string that describes the operation (or set of operations) to be performed on the given input to produce some output. A transformation always includes the name of a cryptographic algorithm (e.g., DES), and may be followed by a mode and padding scheme.

A transformation is of the form:

  • "algorithm/mode/padding" or
  • "algorithm"

For example, the following are valid transformations:

    "DES/CBC/PKCS5Padding"

    "DES"

If just a transformation name is specified, the system will determine if there is an implementation of the requested transformation available in the environment, and if there is more than one, returns there is a preferred one.

If both a transformation name and a package provider are specified, the system will determine if there is an implementation of the requested transformation in the package requested, and throw an exception if there is not.

If no mode or padding is specified, provider-specific default values for the mode and padding scheme are used. For example, the SunJCE provider uses ECB as the default mode, and PKCS5Padding as the default padding scheme for DES, DES-EDE and Blowfish ciphers. This means that in the case of the SunJCE provider:

    Cipher c1 = Cipher.getInstance("DES/ECB/PKCS5Padding");
and
    Cipher c1 = Cipher.getInstance("DES");
are equivalent statements.

Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher's actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the "DES/CFB8/NoPadding" and "DES/OFB32/PKCS5Padding" transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8 bit mode such as CFB8 or OFB8.

Appendix A of this document contains a list of standard names that can be used to specify the algorithm name, mode, and padding scheme components of a transformation.

The objects returned by factory methods are uninitialized, and must be initialized before they become usable.

Initializing a Cipher Object

A Cipher object obtained via getInstance must be initialized for one of four modes, which are defined as final integer constants in the Cipher class. The modes can be referenced by their symbolic names, which are shown below along with a description of the purpose of each mode:

ENCRYPT_MODE
Encryption of data.
DECRYPT_MODE
Decryption of data.
WRAP_MODE
Wrapping a java.security.Key into bytes so that the key can be securely transported.
UNWRAP_MODE
Unwrapping of a previously wrapped key into a java.security.Key object.

Each of the Cipher initialization methods takes an operational mode parameter (opmode), and initializes the Cipher object for that mode. Other parameters include the key (key) or certificate containing the key (certificate), algorithm parameters (params), and a source of randomness (random).

To initialize a Cipher object, call one of the following init methods:

    public void init(int opmode, Key key);

    public void init(int opmode, Certificate certificate);

    public void init(int opmode, Key key, SecureRandom random);

    public void init(int opmode, Certificate certificate,
                     SecureRandom random);

    public void init(int opmode, Key key,
                     AlgorithmParameterSpec params);

    public void init(int opmode, Key key,
                     AlgorithmParameterSpec params, SecureRandom random);

    public void init(int opmode, Key key,
                     AlgorithmParameters params);

    public void init(int opmode, Key key,
                     AlgorithmParameters params, SecureRandom random);

If a Cipher object that requires parameters (e.g., an initialization vector) is initialized for encryption, and no parameters are supplied to the init method, the underlying cipher implementation is supposed to supply the required parameters itself, either by generating random parameters or by using a default, provider-specific set of parameters.

However, if a Cipher object that requires parameters is initialized for decryption, and no parameters are supplied to the init method, an InvalidKeyException or InvalidAlgorithmParameterException exception will be raised, depending on the init method that has been used.

See the section about Managing Algorithm Parameters for more details.

The same parameters that were used for encryption must be used for decryption.

Note that when a Cipher object is initialized, it loses all previously-acquired state. In other words, initializing a Cipher is equivalent to creating a new instance of that Cipher, and initializing it. For example, if a Cipher is first initialized for decryption with a given key, and then initialized for encryption, it will lose any state acquired while in decryption mode.

Encrypting and Decrypting Data

Data can be encrypted or decrypted in one step (single-part operation) or in multiple steps (multiple-part operation). A multiple-part operation is useful if you do not know in advance how long the data is going to be, or if the data is too long to be stored in memory all at once.

To encrypt or decrypt data in a single step, call one of the doFinal methods:

    public byte[] doFinal(byte[] input);

    public byte[] doFinal(byte[] input, int inputOffset, int inputLen);

    public int doFinal(byte[] input, int inputOffset,
                       int inputLen, byte[] output);

    public int doFinal(byte[] input, int inputOffset,
                       int inputLen, byte[] output, int outputOffset)

To encrypt or decrypt data in multiple steps, call one of the update methods:

    public byte[] update(byte[] input);

    public byte[] update(byte[] input, int inputOffset, int inputLen);

    public int update(byte[] input, int inputOffset, int inputLen,
                      byte[] output);

    public int update(byte[] input, int inputOffset, int inputLen,
                      byte[] output, int outputOffset)

A multiple-part operation must be terminated by one of the above doFinal methods (if there is still some input data left for the last step), or by one of the following doFinal methods (if there is no input data left for the last step):

    public byte[] doFinal();

    public int doFinal(byte[] output, int outputOffset);

All the doFinal methods take care of any necessary padding (or unpadding), if padding (or unpadding) has been requested as part of the specified transformation.

A call to doFinal resets the Cipher object to the state it was in when initialized via a call to init. That is, the Cipher object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init) more data.

Wrapping and Unwrapping Keys

Wrapping a key enables secure transfer of the key from one place to another.

The wrap/unwrap API makes it more convenient to write code since it works with key objects directly. These methods also enable the possibility of secure transfer of hardware-based keys.

To wrap a Key, first initialize the Cipher object for WRAP_MODE, and then call the following:

    public final byte[] wrap(Key key);

If you are supplying the wrapped key bytes (the result of calling wrap) to someone else who will unwrap them, be sure to also send additional information the recipient will need in order to do the unwrap:

  1. the name of the key algorithm, and
  2. the type of the wrapped key (one of Cipher.SECRET_KEY, Cipher.PRIVATE_KEY, or Cipher.PUBLIC_KEY).

The key algorithm name can be determined by calling the getAlgorithm method from the Key interface:

    public String getAlgorithm();

To unwrap the bytes returned by a previous call to wrap, first initialize a Cipher object for UNWRAP_MODE, then call the following:

    public final Key unwrap(byte[] wrappedKey,
                            String wrappedKeyAlgorithm,
                            int wrappedKeyType));

Here, wrappedKey is the bytes returned from the previous call to wrap, wrappedKeyAlgorithm is the algorithm associated with the wrapped key, and wrappedKeyType is the type of the wrapped key. This must be one of Cipher.SECRET_KEY, Cipher.PRIVATE_KEY, or Cipher.PUBLIC_KEY.

Managing Algorithm Parameters

The parameters being used by the underlying Cipher implementation, which were either explicitly passed to the init method by the application or generated by the underlying implementation itself, can be retrieved from the Cipher object by calling its getParameters method, which returns the parameters as a java.security.AlgorithmParameters object (or null if no parameters are being used). If the parameter is an initialization vector (IV), it can also be retrieved by calling the getIV method.

In the following example, a Cipher object implementing password-based encryption (PBE) is initialized with just a key and no parameters. However, the selected algorithm for password-based encryption requires two parameters - a salt and an iteration count. Those will be generated by the underlying algorithm implementation itself. The application can retrieve the generated parameters from the Cipher object as follows:

    import javax.crypto.*;
    import java.security.AlgorithmParameters;

    // get cipher object for password-based encryption
    Cipher c = Cipher.getInstance("PBEWithMD5AndDES");

    // initialize cipher for encryption, without supplying
    // any parameters. Here, "myKey" is assumed to refer
    // to an already-generated key.
    c.init(Cipher.ENCRYPT_MODE, myKey);

    // encrypt some data and store away ciphertext
    // for later decryption
    byte[] cipherText = c.doFinal("This is just an example".getBytes());

    // retrieve parameters generated by underlying cipher
    // implementation
    AlgorithmParameters algParams = c.getParameters();

    // get parameter encoding and store it away
    byte[] encodedAlgParams = algParams.getEncoded();

The same parameters that were used for encryption must be used for decryption. They can be instantiated from their encoding and used to initialize the corresponding Cipher object for decryption, as follows:

    import javax.crypto.*;
    import java.security.AlgorithmParameters;

    // get parameter object for password-based encryption
    AlgorithmParameters algParams;
    algParams = AlgorithmParameters.getInstance("PBEWithMD5AndDES");

    // initialize with parameter encoding from above
    algParams.init(encodedAlgParams);

    // get cipher object for password-based encryption
    Cipher c = Cipher.getInstance("PBEWithMD5AndDES");

    // initialize cipher for decryption, using one of the
    // init() methods that takes an AlgorithmParameters
    // object, and pass it the algParams object from above
    c.init(Cipher.DECRYPT_MODE, myKey, algParams);

If you did not specify any parameters when you initialized a Cipher object, and you are not sure whether or not the underlying implementation uses any parameters, you can find out by simply calling the getParameters method of your Cipher object and checking the value returned. A return value of null indicates that no parameters were used.

The following cipher algorithms implemented by the SunJCE provider use parameters:

  • DES, DES-EDE, and Blowfish, when used in feedback (i.e., CBC, CFB, OFB, or PCBC) mode, use an initialization vector (IV). The javax.crypto.spec.IvParameterSpec class can be used to initialize a Cipher object with a given IV.
  • PBEWithMD5AndDES uses a set of parameters, comprising a salt and an iteration count. The javax.crypto.spec.PBEParameterSpec class can be used to initialize a Cipher object implementing PBEWithMD5AndDES with a given salt and iteration count.

Note that you do not have to worry about storing or transferring any algorithm parameters for use by the decryption operation if you use the SealedObject class. This class attaches the parameters used for sealing (encryption) to the encrypted object contents, and uses the same parameters for unsealing (decryption).

Cipher Output Considerations

Some of the update and doFinal methods of Cipher allow the caller to specify the output buffer into which to encrypt or decrypt the data. In these cases, it is important to pass a buffer that is large enough to hold the result of the encryption or decryption operation.

The following method in Cipher can be used to determine how big the output buffer should be:

    public int getOutputSize(int inputLen)

Other Cipher-based Classes

There are some helper classes which internally use Ciphers to provide easy access to common cipher uses.

The Cipher Stream Classes

The CipherInputStream Class

This class is a FilterInputStream that encrypts or decrypts the data passing through it. It is composed of an InputStream, or one of its subclasses, and a Cipher. CipherInputStream represents a secure input stream into which a Cipher object has been interposed. The read methods of CipherInputStream return data that are read from the underlying InputStream but have additionally been processed by the embedded Cipher object. The Cipher object must be fully initialized before being used by a CipherInputStream.

For example, if the embedded Cipher has been initialized for decryption, the CipherInputStream will attempt to decrypt the data it reads from the underlying InputStream before returning them to the application.

This class adheres strictly to the semantics, especially the failure semantics, of its ancestor classes java.io.FilterInputStream and java.io.InputStream. This class has exactly those methods specified in its ancestor classes, and overrides them all, so that the data are additionally processed by the embedded cipher. Moreover, this class catches all exceptions that are not thrown by its ancestor classes. In particular, the skip(long) method skips only data that has been processed by the Cipher.

It is crucial for a programmer using this class not to use methods that are not defined or overridden in this class (such as a new method or constructor that is later added to one of the super classes), because the design and implementation of those methods are unlikely to have considered security impact with regard to CipherInputStream.

As an example of its usage, suppose cipher1 has been initialized for encryption. The code below demonstrates how to use a CipherInputStream containing that cipher and a FileInputStream in order to encrypt input stream data:

    FileInputStream fis;
    FileOutputStream fos;
    CipherInputStream cis;

    fis = new FileInputStream("/tmp/a.txt");
    cis = new CipherInputStream(fis, cipher1);
    fos = new FileOutputStream("/tmp/b.txt");
    byte[] b = new byte[8];
    int i = cis.read(b);
    while (i != -1) {
        fos.write(b, 0, i);
        i = cis.read(b);
    }
    fos.close();

The above program reads and encrypts the content from the file /tmp/a.txt and then stores the result (the encrypted bytes) in /tmp/b.txt.

The following example demonstrates how to easily connect several instances of CipherInputStream and FileInputStream. In this example, assume that cipher1 and cipher2 have been initialized for encryption and decryption (with corresponding keys), respectively.

    FileInputStream fis;
    FileOutputStream fos;
    CipherInputStream cis1, cis2;

    fis = new FileInputStream("/tmp/a.txt");
    cis1 = new CipherInputStream(fis, cipher1);
    cis2 = new CipherInputStream(cis1, cipher2);
    fos = new FileOutputStream("/tmp/b.txt");
    byte[] b = new byte[8];
    int i = cis2.read(b);
    while (i != -1) {
        fos.write(b, 0, i);
        i = cis2.read(b);
    }
    fos.close();

The above program copies the content from file /tmp/a.txt to /tmp/b.txt, except that the content is first encrypted and then decrypted back when it is read from /tmp/a.txt. Of course since this program simply encrypts text and decrypts it back right away, it's actually not very useful except as a simple way of illustrating chaining of CipherInputStreams.

Note that the read methods of the CipherInputStream will block until data is returned from the underlying cipher. If a block cipher is used, a full block of cipher text will have to be obtained from the underlying InputStream.

The CipherOutputStream Class

This class is a FilterOutputStream that encrypts or decrypts the data passing through it. It is composed of an OutputStream, or one of its subclasses, and a Cipher. CipherOutputStream represents a secure output stream into which a Cipher object has been interposed. The write methods of CipherOutputStream first process the data with the embedded Cipher object before writing them out to the underlying OutputStream. The Cipher object must be fully initialized before being used by a CipherOutputStream.

For example, if the embedded Cipher has been initialized for encryption, the CipherOutputStream will encrypt its data, before writing them out to the underlying output stream.

This class adheres strictly to the semantics, especially the failure semantics, of its ancestor classes java.io.OutputStream and java.io.FilterOutputStream. This class has exactly those methods specified in its ancestor classes, and overrides them all, so that all data are additionally processed by the embedded cipher. Moreover, this class catches all exceptions that are not thrown by its ancestor classes.

It is crucial for a programmer using this class not to use methods that are not defined or overridden in this class (such as a new method or constructor that is later added to one of the super classes), because the design and implementation of those methods are unlikely to have considered security impact with regard to CipherOutputStream.

As an example of its usage, suppose cipher1 has been initialized for encryption. The code below demonstrates how to use a CipherOutputStream containing that cipher and a FileOutputStream in order to encrypt data to be written to an output stream:

    FileInputStream fis;
    FileOutputStream fos;
    CipherOutputStream cos;

    fis = new FileInputStream("/tmp/a.txt");
    fos = new FileOutputStream("/tmp/b.txt");
    cos = new CipherOutputStream(fos, cipher1);
    byte[] b = new byte[8];
    int i = fis.read(b);
    while (i != -1) {
        cos.write(b, 0, i);
        i = fis.read(b);
    }
    cos.flush();

The above program reads the content from the file /tmp/a.txt, then encrypts and stores the result (the encrypted bytes) in /tmp/b.txt.

The following example demonstrates how to easily connect several instances of CipherOutputStream and FileOutputStream. In this example, assume that cipher1 and cipher2 have been initialized for decryption and encryption (with corresponding keys), respectively:

    FileInputStream fis;
    FileOutputStream fos;
    CipherOutputStream cos1, cos2;

    fis = new FileInputStream("/tmp/a.txt");
    fos = new FileOutputStream("/tmp/b.txt");
    cos1 = new CipherOutputStream(fos, cipher1);
    cos2 = new CipherOutputStream(cos1, cipher2);
    byte[] b = new byte[8];
    int i = fis.read(b);
    while (i != -1) {
        cos2.write(b, 0, i);
        i = fis.read(b);
    }
    cos2.flush();

The above program copies the content from file /tmp/a.txt to /tmp/b.txt, except that the content is first encrypted and then decrypted back before it is written to /tmp/b.txt.

One thing to keep in mind when using block cipher algorithms is that a full block of plaintext data must be given to the CipherOutputStream before the data will be encrypted and sent to the underlying output stream.

There is one other important difference between the flush and close methods of this class, which becomes even more relevant if the encapsulated Cipher object implements a block cipher algorithm with padding turned on:

  • flush flushes the underlying OutputStream by forcing any buffered output bytes that have already been processed by the encapsulated Cipher object to be written out. Any bytes buffered by the encapsulated Cipher object and waiting to be processed by it will not be written out.
  • close closes the underlying OutputStream and releases any system resources associated with it. It invokes the doFinal method of the encapsulated Cipher object, causing any bytes buffered by it to be processed and written out to the underlying stream by calling its flush method.

The SealedObject Class

This class enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm.

Given any object that implements the java.io.Serializable interface, one can create a SealedObject that encapsulates the original object, in serialized format (i.e., a "deep copy"), and seals (encrypts) its serialized contents, using a cryptographic algorithm such as DES, to protect its confidentiality. The encrypted content can later be decrypted (with the corresponding algorithm using the correct decryption key) and de-serialized, yielding the original object.

A typical usage is illustrated in the following code segment: In order to seal an object, you create a SealedObject from the object to be sealed and a fully initialized Cipher object that will encrypt the serialized object contents. In this example, the String "This is a secret" is sealed using the DES algorithm. Note that any algorithm parameters that may be used in the sealing operation are stored inside of SealedObject:

    // create Cipher object
    // NOTE: sKey is assumed to refer to an already-generated
    // secret DES key.
    Cipher c = Cipher.getInstance("DES");
    c.init(Cipher.ENCRYPT_MODE, sKey);

    // do the sealing
    SealedObject so = new SealedObject("This is a secret", c);

The original object that was sealed can be recovered in two different ways:

  • by using a Cipher object that has been initialized with the exact same algorithm, key, padding scheme, etc., that were used to seal the object:
        c.init(Cipher.DECRYPT_MODE, sKey);
    try {
        String s = (String)so.getObject(c);
    } catch (Exception e) {
        // do something
    };

    This approach has the advantage that the party who unseals the sealed object does not require knowledge of the decryption key. For example, after one party has initialized the cipher object with the required decryption key, it could hand over the cipher object to another party who then unseals the sealed object.

  • by using the appropriate decryption key (since DES is a symmetric encryption algorithm, we use the same key for sealing and unsealing):
        try {
        String s = (String)so.getObject(sKey);
    } catch (Exception e) {
        // do something
    };

    In this approach, the getObject method creates a cipher object for the appropriate decryption algorithm and initializes it with the given decryption key and the algorithm parameters (if any) that were stored in the sealed object. This approach has the advantage that the party who unseals the object does not need to keep track of the parameters (e.g., the IV) that were used to seal the object.

The Mac Class

Similar to a MessageDigest, a Message Authentication Code (MAC) provides a way to check the integrity of information transmitted over or stored in an unreliable medium, but includes a secret key in the calculation. Only someone with the proper key will be able to verify the received message. Typically, message authentication codes are used between two parties that share a secret key in order to validate information transmitted between these parties.

The Mac Class

Description of Figure 8: The Mac Class

A MAC mechanism that is based on cryptographic hash functions is referred to as HMAC. HMAC can be used with any cryptographic hash function, e.g., MD5 or SHA-1, in combination with a secret shared key.

The Mac class provides the functionality of a Message Authentication Code (MAC). Please refer to the code example.

Creating a Mac Object

Mac objects are obtained by using one of the Mac getInstance() static factory methods.

Initializing a Mac Object

A Mac object is always initialized with a (secret) key and may optionally be initialized with a set of parameters, depending on the underlying MAC algorithm.

To initialize a Mac object, call one of its init methods:

    public void init(Key key);

    public void init(Key key, AlgorithmParameterSpec params);

You can initialize your Mac object with any (secret-)key object that implements the javax.crypto.SecretKey interface. This could be an object returned by javax.crypto.KeyGenerator.generateKey(), or one that is the result of a key agreement protocol, as returned by javax.crypto.KeyAgreement.generateSecret(), or an instance of javax.crypto.spec.SecretKeySpec.

With some MAC algorithms, the (secret-)key algorithm associated with the (secret-)key object used to initialize the Mac object does not matter (this is the case with the HMAC-MD5 and HMAC-SHA1 implementations of the SunJCE provider). With others, however, the (secret-)key algorithm does matter, and an InvalidKeyException is thrown if a (secret-)key object with an inappropriate (secret-)key algorithm is used.

Computing a MAC

A MAC can be computed in one step (single-part operation) or in multiple steps (multiple-part operation). A multiple-part operation is useful if you do not know in advance how long the data is going to be, or if the data is too long to be stored in memory all at once.

To compute the MAC of some data in a single step, call the following doFinal method:

    public byte[] doFinal(byte[] input);

To compute the MAC of some data in multiple steps, call one of the update methods:

    public void update(byte input);

    public void update(byte[] input);

    public void update(byte[] input, int inputOffset, int inputLen);

A multiple-part operation must be terminated by the above doFinal method (if there is still some input data left for the last step), or by one of the following doFinal methods (if there is no input data left for the last step):

    public byte[] doFinal();

    public void doFinal(byte[] output, int outOffset);

Key Interfaces

To this point, we have focused the high-level uses of the JCA without getting lost in the details of what keys are and how they are generated/represented. It is now time to turn our attention to keys.

The java.security.Key interface is the top-level interface for all opaque keys. It defines the functionality shared by all opaque key objects.

An opaque key representation is one in which you have no direct access to the key material that constitutes a key. In other words: "opaque" gives you limited access to the key--just the three methods defined by the Key interface (see below): getAlgorithm, getFormat, and getEncoded.

This is in contrast to a transparent representation, in which you can access each key material value individually, through one of the get methods defined in the corresponding specification class.

All opaque keys have three characteristics:

An Algorithm
The key algorithm for that key. The key algorithm is usually an encryption or asymmetric operation algorithm (such as AES, DSA or RSA), which will work with those algorithms and with related algorithms (such as MD5withRSA, SHA1withRSA, etc.) The name of the algorithm of a key is obtained using this method:
String getAlgorithm()
An Encoded Form
The external encoded form for the key used when a standard representation of the key is needed outside the Java Virtual Machine, as when transmitting the key to some other party. The key is encoded according to a standard format (such as X.509 or PKCS8), and is returned using the method:
byte[] getEncoded()
A Format
The name of the format of the encoded key. It is returned by the method:
String getFormat()
Keys are generally obtained through key generators such as KeyGenerator and KeyPairGenerator, certificates, key specifications (using a KeyFactory), or a KeyStore implementation accessing a keystore database used to manage keys. It is possible to parse encoded keys, in an algorithm-dependent manner, using a KeyFactory.

It is also possible to parse certificates, using a CertificateFactory.

Here is a list of interfaces which extend the Key interface in the java.security.interfaces and javax.crypto.interfaces packages:

  • SecretKey
    • PBEKey
  • PrivateKey
    • DHPrivateKey
    • DSAPrivateKey
    • ECPrivateKey
    • RSAMultiPrimePrivateCrtKey
    • RSAPrivateCrtKey
    • RSAPrivateKey
  • PublicKey
    • DHPublicKey
    • DSAPublicKey
    • ECPublicKey
    • RSAPublicKey

The PublicKey and PrivateKey Interfaces

The PublicKey and PrivateKey interfaces (which both extend the Key interface) are methodless interfaces, used for type-safety and type-identification.

The KeyPair Class

The KeyPair class is a simple holder for a key pair (a public key and a private key). It has two public methods, one for returning the private key, and the other for returning the public key:

PrivateKey getPrivate()
PublicKey getPublic()

Key Specification Interfaces and Classes

Key objects and key specifications (KeySpecs) are two different representations of key data. Ciphers use Key objects to initialize their encryption algorithms, but keys may need to be converted into a more portable format for transmission or storage.

A transparent representation of keys means that you can access each key material value individually, through one of the get methods defined in the corresponding specification class. For example, DSAPrivateKeySpec defines getX, getP, getQ, and getG methods, to access the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g. If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

This representation is contrasted with an opaque representation, as defined by the Key interface, in which you have no direct access to the key material fields. In other words, an "opaque" representation gives you limited access to the key--just the three methods defined by the Key interface: getAlgorithm, getFormat, and getEncoded.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec).

The KeyFactory and SecretKeyFactory classes can be used to convert between opaque and transparent key representations (that is, between Keys and KeySpecs, assuming that the operation is possible. (For example, private keys on smart cards might not be able leave the card. Such Keys are not convertible.)

In the following sections, we discuss the key specification interfaces and classes in the java.security.spec package.

The KeySpec Interface

This interface contains no methods or constants. Its only purpose is to group and provide type safety for all key specifications. All key specifications must implement this interface.

The KeySpec Subinterfaces

Like the Key interface, there are a similar set of KeySpec interfaces.

  • SecretKeySpec
  • EncodedKeySpec
    • PKCS8EncodedKeySpec
    • X509EncodedKeySpec
  • DESKeySpec
  • DESedeKeySpec
  • PBEKeySpec
  • DHPrivateKeySpec
  • DSAPrivateKeySpec
  • ECPrivateKeySpec
  • RSAPrivateKeySpec
    • RSAMultiPrimePrivateCrtKeySpec
    • RSAPrivateCrtKeySpec
  • DHPublicKeySpec
  • DSAPublicKeySpec
  • ECPublicKeySpec
  • RSAPublicKeySpec

The EncodedKeySpec Class

This abstract class (which implements the KeySpec interface) represents a public or private key in encoded format. Its getEncoded method returns the encoded key:

abstract byte[] getEncoded();
and its getFormat method returns the name of the encoding format:
abstract String getFormat();

See the next sections for the concrete implementations PKCS8EncodedKeySpec and X509EncodedKeySpec.

The PKCS8EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a private key, according to the format specified in the PKCS8 standard. Its getEncoded method returns the key bytes, encoded according to the PKCS8 standard. Its getFormat method returns the string "PKCS#8".

The X509EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a public key, according to the format specified in the X.509 standard. Its getEncoded method returns the key bytes, encoded according to the X.509 standard. Its getFormat method returns the string "X.509".

Of Generators and Factories

Newcomers to Java and the JCA APIs in particular sometimes do not grasp the distinction between generators and factories.

Differences Between Generators and Factories

Description of Figure Differences Between Generators and Factories

Generators are used to generate brand new objects. Generators can be initialized in either an algorithm-dependent or algorithm-independent way. For example, to create a Diffie-Hellman (DH) keypair, an application could specify the necessary P and G values, or the generator could simply be initialized with the appropriate key length, and the generator will select appropriate P and G values. In both cases, the generator will produce brand new keys based on the parameters.

On the other hand, factories are used to convert data from one existing object type to another. For example, an application might have available the components of a DH private key and can package them as a KeySpec, but needs to convert them into a PrivateKey object that can be used by a KeyAgreement object, or vice-versa. Or they might have the byte array of a certificate, but need to use a CertificateFactory to convert it into a X509Certificate object. Applications use factory objects to do the conversion.

The KeyFactory Class

The KeyFactory class is an engine class designed to perform conversions between opaque cryptographic Keys and key specifications (transparent representations of the underlying key material).

The KeyFactory Class<

Description of Figure The KeyFactory Class

Key factories are bi-directional. They allow you to build an opaque key object from a given key specification (key material), or to retrieve the underlying key material of a key object in a suitable format.

Multiple compatible key specifications can exist for the same key. For example, a DSA public key may be specified by its components y, p, q, and g (see java.security.spec.DSAPublicKeySpec), or it may be specified using its DER encoding according to the X.509 standard (see X509EncodedKeySpec).

A key factory can be used to translate between compatible key specifications. Key parsing can be achieved through translation between compatible key specifications, e.g., when you translate from X509EncodedKeySpec to DSAPublicKeySpec, you basically parse the encoded key into its components. For an example, see the end of the Generating/Verifying Signatures Using Key Specifications and KeyFactory section.

Creating a KeyFactory Object

KeyFactory objects are obtained by using one of the KeyFactory getInstance() static factory methods.

Converting Between a Key Specification and a Key Object

If you have a key specification for a public key, you can obtain an opaque PublicKey object from the specification by using the generatePublic method:

PublicKey generatePublic(KeySpec keySpec)

Similarly, if you have a key specification for a private key, you can obtain an opaque PrivateKey object from the specification by using the generatePrivate method:

PrivateKey generatePrivate(KeySpec keySpec)

Converting Between a Key Object and a Key Specification

If you have a Key object, you can get a corresponding key specification object by calling the getKeySpec method:

KeySpec getKeySpec(Key key, Class keySpec)
keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.

Please see the Examples section for more details.

The SecretKeyFactory Class

This class represents a factory for secret keys. Unlike KeyFactory, a javax.crypto.SecretKeyFactory object operates only on secret (symmetric) keys, whereas a java.security.KeyFactory object processes the public and private key components of a key pair.

The SecretKeyFactory Class

Description of The SecretKeyFactory Class

Key factories are used to convert Keys (opaque cryptographic keys of type java.security.Key) into key specifications (transparent representations of the underlying key material in a suitable format), and vice versa.

Objects of type java.security.Key, of which java.security.PublicKey, java.security.PrivateKey, and javax.crypto.SecretKey are subclasses, are opaque key objects, because you cannot tell how they are implemented. The underlying implementation is provider-dependent, and may be software or hardware based. Key factories allow providers to supply their own implementations of cryptographic keys.

For example, if you have a key specification for a Diffie Hellman public key, consisting of the public value y, the prime modulus p, and the base g, and you feed the same specification to Diffie-Hellman key factories from different providers, the resulting PublicKey objects will most likely have different underlying implementations.

A provider should document the key specifications supported by its secret key factory. For example, the SecretKeyFactory for DES keys supplied by the SunJCE provider supports DESKeySpec as a transparent representation of DES keys, the SecretKeyFactory for DES-EDE keys supports DESedeKeySpec as a transparent representation of DES-EDE keys, and the SecretKeyFactory for PBE supports PBEKeySpec as a transparent representation of the underlying password.

The following is an example of how to use a SecretKeyFactory to convert secret key data into a SecretKey object, which can be used for a subsequent Cipher operation:

    // Note the following bytes are not realistic secret key data
    // bytes but are simply supplied as an illustration of using data
    // bytes (key material) you already have to build a DESKeySpec.
    byte[] desKeyData = { (byte)0x01, (byte)0x02, (byte)0x03,
    (byte)0x04, (byte)0x05, (byte)0x06, (byte)0x07, (byte)0x08 };
    DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
    SecretKey secretKey = keyFactory.generateSecret(desKeySpec);

In this case, the underlying implementation of SecretKey is based on the provider of KeyFactory.

An alternative, provider-independent way of creating a functionally equivalent SecretKey object from the same key material is to use the javax.crypto.spec.SecretKeySpec class, which implements the javax.crypto.SecretKey interface:

    byte[] desKeyData = { (byte)0x01, (byte)0x02, ...};
    SecretKeySpec secretKey = new SecretKeySpec(desKeyData, "DES");

Creating a SecretKeyFactory Object

SecretKeyFactory objects are obtained by using one of the SecretKeyFactory getInstance() static factory methods.

Converting Between a Key Specification and a Secret Key Object

If you have a key specification for a secret key, you can obtain an opaque SecretKey object from the specification by using the generateSecret method:

SecretKey generateSecret(KeySpec keySpec)

Converting Between a Secret Key Object and a Key Specification

If you have a Secret Key object, you can get a corresponding key specification object by calling the getKeySpec method:

KeySpec getKeySpec(Key key, Class keySpec)
keySpec identifies the specification class in which the key material should be returned. It could, for example, be DESKeySpec.class, to indicate that the key material should be returned in an instance of the DESKeySpec class.

The KeyPairGenerator Class

The KeyPairGenerator class is an engine class used to generate pairs of public and private keys.

The KeyPairGenerator Class

Description of The KeyPairGenerator Class

There are two ways to generate a key pair: in an algorithm-independent manner, and in an algorithm-specific manner. The only difference between the two is the initialization of the object.

Please see the Examples section for examples of calls to the methods documented below.

Creating a KeyPairGenerator

All key pair generation starts with a KeyPairGenerator. KeyPairGenerator objects are obtained by using one of the KeyPairGenerator getInstance() static factory methods.

Initializing a KeyPairGenerator

A key pair generator for a particular algorithm creates a public/private key pair that can be used with this algorithm. It also associates algorithm-specific parameters with each of the generated keys.

A key pair generator needs to be initialized before it can generate keys. In most cases, algorithm-independent initialization is sufficient. But in other cases, algorithm-specific initialization can be used.

Algorithm-Independent Initialization

All key pair generators share the concepts of a keysize and a source of randomness. The keysize is interpreted differently for different algorithms. For example, in the case of the DSA algorithm, the keysize corresponds to the length of the modulus. (See the Standard Names document for information about the keysizes for specific algorithms.)

An initialize method takes two universally shared types of arguments:

void initialize(int keysize, SecureRandom random)
Another initialize method takes only a keysize argument; it uses a system-provided source of randomness:
void initialize(int keysize)

Since no other parameters are specified when you call the above algorithm-independent initialize methods, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with each of the keys.

If the algorithm is a "DSA" algorithm, and the modulus size (keysize) is 512, 768, or 1024, then the SUN provider uses a set of precomputed values for the p, q, and g parameters. If the modulus size is not one of the above values, the SUN provider creates a new set of parameters. Other providers might have precomputed parameter sets for more than just the three modulus sizes mentioned above. Still others might not have a list of precomputed parameters at all and instead always create new parameter sets.

Algorithm-Specific Initialization

For situations where a set of algorithm-specific parameters already exists (such as "community parameters" in DSA), there are two initialize methods that have an AlgorithmParameterSpec argument. One also has a SecureRandom argument, while the source of randomness is system-provided for the other:

void initialize(AlgorithmParameterSpec params,
                SecureRandom random)

void initialize(AlgorithmParameterSpec params)
See the Examples section for more details.

Generating a Key Pair

The procedure for generating a key pair is always the same, regardless of initialization (and of the algorithm). You always call the following method from KeyPairGenerator:

KeyPair generateKeyPair()
Multiple calls to generateKeyPair will yield different key pairs.

The KeyGenerator Class

A key generator is used to generate secret keys for symmetric algorithms.

The KeyGenerator Class

Description of Figure The KeyGenerator Class

Creating a KeyGenerator

KeyGenerator objects are obtained by using one of the KeyGenerator getInstance() static factory methods.

Initializing a KeyGenerator Object

A key generator for a particular symmetric-key algorithm creates a symmetric key that can be used with that algorithm. It also associates algorithm-specific parameters (if any) with the generated key.

There are two ways to generate a key: in an algorithm-independent manner, and in an algorithm-specific manner. The only difference between the two is the initialization of the object:

  • Algorithm-Independent Initialization

    All key generators share the concepts of a keysize and a source of randomness. There is an init method that takes these two universally shared types of arguments. There is also one that takes just a keysize argument, and uses a system-provided source of randomness, and one that takes just a source of randomness:

    public void init(SecureRandom random);

    public void init(int keysize);

    public void init(int keysize, SecureRandom random);

    Since no other parameters are specified when you call the above algorithm-independent init methods, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with the generated key.

  • Algorithm-Specific Initialization

    For situations where a set of algorithm-specific parameters already exists, there are two init methods that have an AlgorithmParameterSpec argument. One also has a SecureRandom argument, while the source of randomness is system-provided for the other:

        public void init(AlgorithmParameterSpec params);

    public void init(AlgorithmParameterSpec params, SecureRandom random);

In case the client does not explicitly initialize the KeyGenerator (via a call to an init method), each provider must supply (and document) a default initialization.

Creating a Key

The following method generates a secret key:

    public SecretKey generateKey();

The KeyAgreement Class

Key agreement is a protocol by which 2 or more parties can establish the same cryptographic keys, without having to exchange any secret information.

The KeyAgreement Class

Description of Figure The KeyAgreement Class

Each party initializes their key agreement object with their private key, and then enters the public keys for each party that will participate in the communication. In most cases, there are just two parties, but algorithms such as Diffie-Hellman allow for multiple parties (3 or more) to participate. When all the public keys have been entered, each KeyAgreement object will generate (agree upon) the same key.

The KeyAgreement class provides the functionality of a key agreement protocol. The keys involved in establishing a shared secret are created by one of the key generators (KeyPairGenerator or KeyGenerator), a KeyFactory, or as a result from an intermediate phase of the key agreement protocol.

Creating a KeyAgreement Object

Each party involved in the key agreement has to create a KeyAgreement object. KeyAgreement objects are obtained by using one of the KeyAgreement getInstance() static factory methods.

Initializing a KeyAgreement Object

You initialize a KeyAgreement object with your private information. In the case of Diffie-Hellman, you initialize it with your Diffie-Hellman private key. Additional initialization information may contain a source of randomness and/or a set of algorithm parameters. Note that if the requested key agreement algorithm requires the specification of algorithm parameters, and only a key, but no parameters are provided to initialize the KeyAgreement object, the key must contain the required algorithm parameters. (For example, the Diffie-Hellman algorithm uses a prime modulus p and a base generator g as its parameters.)

To initialize a KeyAgreement object, call one of its init methods:

    public void init(Key key);

    public void init(Key key, SecureRandom random);

    public void init(Key key, AlgorithmParameterSpec params);

    public void init(Key key, AlgorithmParameterSpec params,
                     SecureRandom random);

Executing a KeyAgreement Phase

Every key agreement protocol consists of a number of phases that need to be executed by each party involved in the key agreement.

To execute the next phase in the key agreement, call the doPhase method:

    public Key doPhase(Key key, boolean lastPhase);

The key parameter contains the key to be processed by that phase. In most cases, this is the public key of one of the other parties involved in the key agreement, or an intermediate key that was generated by a previous phase. doPhase may return an intermediate key that you may have to send to the other parties of this key agreement, so they can process it in a subsequent phase.

The lastPhase parameter specifies whether or not the phase to be executed is the last one in the key agreement: A value of FALSE indicates that this is not the last phase of the key agreement (there are more phases to follow), and a value of TRUE indicates that this is the last phase of the key agreement and the key agreement is completed, i.e., generateSecret can be called next.

In the example of Diffie-Hellman between two parties , you call doPhase once, with lastPhase set to TRUE. In the example of Diffie-Hellman between three parties, you call doPhase twice: the first time with lastPhase set to FALSE, the 2nd time with lastPhase set to TRUE.

Generating the Shared Secret

After each party has executed all the required key agreement phases, it can compute the shared secret by calling one of the generateSecret methods:

    public byte[] generateSecret();

    public int generateSecret(byte[] sharedSecret, int offset);

    public SecretKey generateSecret(String algorithm);

Key Management

A database called a "keystore" can be used to manage a repository of keys and certificates. (A certificate is a digitally signed statement from one entity, saying that the public key of some other entity has a particular value.)

Keystore Location

The user keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory. On Win32 systems, given user name uName, "user.home" defaults to:

  • C:\Winnt\Profiles\uName on multi-user Windows NT systems
  • C:\Windows\Profiles\uName on multi-user Windows 95/98/2000 systems
  • C:\Windows on single-user Windows 95/98/2000 systems

Of course, keystore files can be located as desired. In some environments, it may make sense for multiple keystores to exist. For example, in JSSE (SSL/TLS), one keystore might hold a user's private keys, and another might hold certificates used to establish trust relationships.

In addition to the user's keystore, the JDK also maintains a system-wide keystore which is used to store trusted certificates from a variety of Certificate Authorities (CA's). These CA certificates can be used to help make trust decisions. For example, in SSL/TLS when the SunJSSE provider is presented with certificates from a remote peer, the default trustmanager will consult the:

  • Solaris, Linux, or Mac OS X: <java-home>/lib/ext/cacerts
  • Windows: <java-home>\lib\ext\cacerts

file to determine if the connection is to be trusted. Instead of using the system-wide cacerts keystore, applications can set up and use their own keystores, or even use the user keystore described above.

Keystore Implementation

The KeyStore class supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, there are two command-line tools that make use of KeyStore: keytool and jarsigner, and also a GUI-based tool named policytool. It is also used by the Policy reference implementation when it processes policy files specifying the permissions (allowed accesses to system resources) to be granted to code from various sources. Since KeyStore is publicly available, JDK users can write additional security applications that use it.

Applications can choose different types of keystore implementations from different providers, using the getInstance factory method in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

There is a built-in default keystore implementation type known as "jks" that is provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format). It protects each private key with its own individual password, and also protects the integrity of the entire keystore with a (possibly different) password. The default is specified by the following line in the security properties file:

    keystore.type=jks

To have tools and other applications use a different default keystore implementation, you can change that line to specify a default type. If you have a provider package that supplies a keystore implementation for a keystore type called "jceks", change the line to:

    keystore.type=jceks

Some applications, such as keytool, also let you override the default keystore type (via the -storetype command-line parameter).

NOTE: Keystore type designations are case-insensitive. For example, "jks" would be considered the same as "JKS".

There are three other types of keystores that come with the JDK implementation.

  1. "jceks" is an alternate proprietary keystore format to "jks" that uses much stronger encryption in the form of Password-Based Encryption with Triple-DES.

    The Sun "jceks" implementation can parse and convert a "jks" keystore file to the "jceks" format. You may upgrade your keystore of type "jks" to a keystore of type "jceks" by changing the password of a private-key entry in your keystore and specifying "-storetype jceks" as the keystore type. To apply the cryptographically strong(er) key protection supplied to a private key named "signkey" in your default keystore, use the following command, which will prompt you for the old and new key passwords:

        keytool -keypasswd -alias signkey -storetype jceks
    See Security Tools for more information about keytool and about keystores and how they are managed.
    NOTE: Keystore type designations are case-insensitive. For example, "jceks" would be considered the same as "JCEKS".
  2. "pkcs12" is another option. This is a cross platform keystore based on the RSA PKCS12 Personal Information Exchange Syntax Standard. This standard is primarily meant for storing or transporting a user's private keys, certificates, and miscellaneous secrets. As of JDK 8, arbitrary attributes can be associated with individual entries in a PKCS12 keystore.
  3. "dks" is a domain keystore. It is a collection of keystores presented as a single logical keystore. The keystores that comprise a given domain are specified by configuration data whose syntax is described in DomainLoadStoreParameter.

Keystore implementations are provider-based. Developers interested in writing their own KeyStore implementations should consult How to Implement a Provider for the Java Cryptography Architecture for more information on this topic.

The KeyStore Class

The KeyStore class is an engine class that supplies well-defined interfaces to access and modify the information in a keystore.

The KeyStore Class

Description of Figure The KeyStore Class

This class represents an in-memory collection of keys and certificates. KeyStore manages two types of entries:

Key Entry

This type of keystore entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain authenticating the corresponding public key.

Private keys and certificate chains are used by a given entity for self-authentication using digital signatures. For example, software distribution organizations digitally sign JAR files as part of releasing and/or licensing software.

Trusted Certificate Entry

This type of entry contains a single public key certificate belonging to another party. It is called a trusted certificate because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the subject (owner) of the certificate.

This type of entry can be used to authenticate other parties.

Each entry in a keystore is identified by an "alias" string. In the case of private keys and their associated certificate chains, these strings distinguish among the different ways in which the entity may authenticate itself. For example, the entity may authenticate itself using different certificate authorities, or using different public key algorithms.

Whether keystores are persistent, and the mechanisms used by the keystore if it is persistent, are not specified here. This convention allows use of a variety of techniques for protecting sensitive (e.g., private or secret) keys. Smart cards or other integrated cryptographic engines (SafeKeyper) are one option, and simpler mechanisms such as files may also be used (in a variety of formats).

The main KeyStore methods are described below.

Creating a KeyStore Object

KeyStore objects are obtained by using one of the KeyStore getInstance() static factory methods.

Loading a Particular Keystore into Memory

Before a KeyStore object can be used, the actual keystore data must be loaded into memory via the load method:

final void load(InputStream stream, char[] password)

The optional password is used to check the integrity of the keystore data. If no password is supplied, no integrity check is performed.

To create an empty keystore, you pass null as the InputStream argument to the load method.

A DKS keystore is loaded by passing a DomainLoadStoreParameter to the alternative load method:

final void load(KeyStore.LoadStoreParameter param)

Getting a List of the Keystore Aliases

All keystore entries are accessed via unique aliases. The aliases method returns an enumeration of the alias names in the keystore:

final Enumeration aliases()

Determining Keystore Entry Types

As stated in The KeyStore Class, there are two different types of entries in a keystore. The following methods determine whether the entry specified by the given alias is a key/certificate or a trusted certificate entry, respectively:

final boolean isKeyEntry(String alias)
final boolean isCertificateEntry(String alias)

Adding/Setting/Deleting Keystore Entries

The setCertificateEntry method assigns a certificate to a specified alias:

final void setCertificateEntry(String alias, Certificate cert)

If alias doesn't exist, a trusted certificate entry with that alias is created. If alias exists and identifies a trusted certificate entry, the certificate associated with it is replaced by cert.

The setKeyEntry methods add (if alias doesn't yet exist) or set key entries:

final void setKeyEntry(String alias,
                       Key key,
                       char[] password,
                       Certificate[] chain)

final void setKeyEntry(String alias,
                       byte[] key,
                       Certificate[] chain)

In the method with key as a byte array, it is the bytes for a key in protected format. For example, in the keystore implementation supplied by the SUN provider, the key byte array is expected to contain a protected private key, encoded as an EncryptedPrivateKeyInfo as defined in the PKCS8 standard. In the other method, the password is the password used to protect the key.

The deleteEntry method deletes an entry:

final void deleteEntry(String alias)

PKCS #12 keystores support entries containing arbitrary attributes. Use the java.security.PKCS12Attribute class to create the attributes. When creating the new keystore entry use a constructor method that accepts attributes. Finally, use the following method to add the entry to the keystore:

final void setEntry(String alias, Entry entry,
                    ProtectionParameter protParam)

Getting Information from the Keystore

The getKey method returns the key associated with the given alias. The key is recovered using the given password:

final Key getKey(String alias, char[] password)

The following methods return the certificate, or certificate chain, respectively, associated with the given alias:

final Certificate getCertificate(String alias)
final Certificate[] getCertificateChain(String alias)

You can determine the name (alias) of the first entry whose certificate matches a given certificate via the following:

final String getCertificateAlias(Certificate cert)

PKCS #12 keystores support entries containing arbitrary attributes. Use the following method to retrieve an entry that may contain attributes:

final Entry getEntry(String alias, ProtectionParameter protParam)

and then use the KeyStore.Entry.getAttributes method to extract such attributes and use the methods of the KeyStore.Entry.Attribute interface to examine them.

Saving the KeyStore

The in-memory keystore can be saved via the store method:

final void store(OutputStream stream, char[] password)

The password is used to calculate an integrity checksum of the keystore data, which is appended to the keystore data.

A DKS keystore is stored by passing a DomainLoadStoreParameter to the alternative store method:

final void store(KeyStore.LoadStoreParameter param)

Algorithm Parameters Classes

Like Keys and Keyspecs, an algorithm's initialization parameters are represented by either AlgorithmParameters or AlgorithmParameterSpecs. Depending on the use situation, algorithms can use the parameters directly, or the parameters might need to be converted into a more portable format for transmission or storage.

A transparent representation of a set of parameters (via AlgorithmParameterSpec) means that you can access each parameter value in the set individually. You can access these values through one of the get methods defined in the corresponding specification class (e.g., DSAParameterSpec defines getP, getQ, and getG methods, to access p, q, and g, respectively).

In contrast, the AlgorithmParameters class supplies an opaque representation, in which you have no direct access to the parameter fields. You can only get the name of the algorithm associated with the parameter set (via getAlgorithm) and some kind of encoding for the parameter set (via getEncoded).

The AlgorithmParameterSpec Interface

AlgorithmParameterSpec is an interface to a transparent specification of cryptographic parameters. This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all parameter specifications. All parameter specifications must implement this interface.

The algorithm parameter specification interfaces and classes in the java.security.spec and javax.crypto.spec packages are described in the JDK javadocs:

  • DHParameterSpec
  • DHGenParameterSpec
  • DSAParameterSpec
  • ECGenParameterSpec
  • ECParameterSpec
  • GCMParameterSpec
  • IvParameterSpec
  • MGF1ParameterSpec
  • OAEPParameterSpec
  • PBEParameterSpec
  • PSSParameterSpec
  • RC2ParameterSpec
  • RC5ParameterSpec
  • RSAKeyGenParameterSpec

The following algorithm parameter specs are used specifically for digital signatures, as part of JSR 105.

  • C14NMethodParameterSpec
  • DigestMethodParameterSpec
  • SignatureMethodParameterSpec
  • TransformParameterSpec
  • ExcC14NParameterSpec
  • HMACParameterSpec
  • XPathFilter2ParameterSpec
  • XPathFilterParameterSpec
  • XSLTTransformParameterSpec

The AlgorithmParameters Class

The AlgorithmParameters class is an engine class that provides an opaque representation of cryptographic parameters. You can initialize the AlgorithmParameters class using a specific AlgorithmParameterSpec object, or by encoding the parameters in a recognized format. You can retrieve the resulting specification with the getParameterSpec method (see the following section).

Creating an AlgorithmParameters Object

AlgorithmParameters objects are obtained by using one of the AlgorithmParameters getInstance() static factory methods.

Initializing an AlgorithmParameters Object

Once an AlgorithmParameters object is instantiated, it must be initialized via a call to init, using an appropriate parameter specification or parameter encoding:

void init(AlgorithmParameterSpec paramSpec)
void init(byte[] params)
void init(byte[] params, String format)

In these init methods, params is an array containing the encoded parameters, and format is the name of the decoding format. In the init method with a params argument but no format argument, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for the parameters exists.

NOTE: AlgorithmParameters objects can be initialized only once. They are not reusable.

Obtaining the Encoded Parameters

A byte encoding of the parameters represented in an AlgorithmParameters object may be obtained via a call to getEncoded:

byte[] getEncoded()

This method returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

If you want the parameters returned in a specified encoding format, use

byte[] getEncoded(String format)
If format is null, the primary encoding format for parameters is used, as in the other getEncoded method.
NOTE: In the default AlgorithmParameters implementation, supplied by the SUN provider, the format argument is currently ignored.

Converting an AlgorithmParameters Object to a Transparent Specification

A transparent parameter specification for the algorithm parameters may be obtained from an AlgorithmParameters object via a call to getParameterSpec:

AlgorithmParameterSpec getParameterSpec(Class paramSpec)

paramSpec identifies the specification class in which the parameters should be returned. The specification class could be, for example, DSAParameterSpec.class to indicate that the parameters should be returned in an instance of the DSAParameterSpec class. (This class is in the java.security.spec package.)

The AlgorithmParameterGenerator Class

The AlgorithmParameterGenerator class is an engine class used to generate a set of brand-new parameters suitable for a certain algorithm (the algorithm is specified when an AlgorithmParameterGenerator instance is created). This object is used when you do not have an existing set of algorithm parameters, and want to generate one from scratch.

Creating an AlgorithmParameterGenerator Object

AlgorithmParameterGenerator objects are obtained by using one of the AlgorithmParameterGenerator getInstance() static factory methods.

Initializing an AlgorithmParameterGenerator Object

The AlgorithmParameterGenerator object can be initialized in two different ways: an algorithm-independent manner or an algorithm-specific manner.

The algorithm-independent approach uses the fact that all parameter generators share the concept of a "size" and a source of randomness. The measure of size is universally shared by all algorithm parameters, though it is interpreted differently for different algorithms. For example, in the case of parameters for the DSA algorithm, "size" corresponds to the size of the prime modulus, in bits. (See the Standard Names document for information about the sizes for specific algorithms.) When using this approach, algorithm-specific parameter generation values--if any--default to some standard values. One init method that takes these two universally shared types of arguments:

void init(int size, SecureRandom random);

Another init method takes only a size argument and uses a system-provided source of randomness:

void init(int size)

A third approach initializes a parameter generator object using algorithm-specific semantics, which are represented by a set of algorithm-specific parameter generation values supplied in an AlgorithmParameterSpec object:

void init(AlgorithmParameterSpec genParamSpec,
                          SecureRandom random)

void init(AlgorithmParameterSpec genParamSpec)

To generate Diffie-Hellman system parameters, for example, the parameter generation values usually consist of the size of the prime modulus and the size of the random exponent, both specified in number of bits.

Generating Algorithm Parameters

Once you have created and initialized an AlgorithmParameterGenerator object, you can use the generateParameters method to generate the algorithm parameters:

AlgorithmParameters generateParameters()

The CertificateFactory Class

The CertificateFactory class is an engine class that defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.

A certificate factory for X.509 must return certificates that are an instance of java.security.cert.X509Certificate, and CRLs that are an instance of java.security.cert.X509CRL.

Creating a CertificateFactory Object

CertificateFactory objects are obtained by using one of the getInstance() static factory methods.

Generating Certificate Objects

To generate a certificate object and initialize it with the data read from an input stream, use the generateCertificate method:

final Certificate generateCertificate(InputStream inStream)

To return a (possibly empty) collection view of the certificates read from a given input stream, use the generateCertificates method:

final Collection generateCertificates(InputStream inStream)

Generating CRL Objects

To generate a certificate revocation list (CRL) object and initialize it with the data read from an input stream, use the generateCRL method:

final CRL generateCRL(InputStream inStream)
To return a (possibly empty) collection view of the CRLs read from a given input stream, use the generateCRLs method:
final Collection generateCRLs(InputStream inStream)

Generating CertPath Objects

The certificate path builder and validator for PKIX is defined by the Internet X.509 Public Key Infrastructure Certificate and CRL Profile, RFC 3280.

A certificate store implementation for retrieving certificates and CRLs from Collection and LDAP directories, using the PKIX LDAP V2 Schema is also available from the IETF as RFC 2587.

To generate a CertPath object and initialize it with data read from an input stream, use one of the following generateCertPath methods (with or without specifying the encoding to be used for the data):

final CertPath generateCertPath(InputStream inStream)

final CertPath generateCertPath(InputStream inStream,
                                String encoding)

To generate a CertPath object and initialize it with a list of certificates, use the following method:

final CertPath generateCertPath(List certificates)

To retrieve a list of the CertPath encodings supported by this certificate factory, you can call the getCertPathEncodings method:

final Iterator getCertPathEncodings()
The default encoding will be listed first.

How the JCA Might Be Used in a SSL/TLS Implementation

With an understanding of the JCA classes, consider how these classes might be combined to implement an advanced network protocol like SSL/TLS. The SSL/TLS Overview section in the JSSE Reference Guide describes at a high level how the protocols work. As asymmetric (public key) cipher operations are much slower than symmetric operations (secret key), public key cryptography is used to establish secret keys which are then used to protect the actual application data. Vastly simplified, the SSL/TLS handshake involves exchanging initialization data, performing some public key operations to arrive at a secret key, and then using that key to encrypt further traffic.

NOTE: The details presented here simply show how some of the above classes might be employed. This section will not present sufficient information for building a SSL/TLS implementation. For more details, please see the JSSE Reference Guide and RFC 2246: The TLS Protocol.

Assume that this SSL/TLS implementation will be made available as a JSSE provider. A concrete implementation of the Provider class is first written that will eventually be registered in the Security class' list of providers. This provider mainly provides a mapping from algorithm names to actual implementation classes. (that is: "SSLContext.TLS"->"com.foo.TLSImpl") When an application requests an "TLS" instance (via SSLContext.getInstance("TLS"), the provider's list is consulted for the requested algorithm, and an appropriate instance is created.

Before discussing details of the actual handshake, a quick review of some of the JSSE's architecture is needed. The heart of the JSSE architecture is the SSLContext. The context eventually creates end objects (SSLSocket and SSLEngine) which actually implement the SSL/TLS protocol. SSLContexts are initialized with two callback classes, KeyManager and TrustManager, which allow applications to first select authentication material to send and second to verify credentials sent by a peer.

A JSSE KeyManager is responsible for choosing which credentials to present to a peer. Many algorithms are possible, but a common strategy is to maintain a RSA or DSA public/private key pair along with a X509Certificate in a KeyStore backed by a disk file. When a KeyStore object is initialized and loaded from the file, the file's raw bytes are converted into PublicKey and PrivateKey objects using a KeyFactory, and a certificate chain's bytes are converted using a CertificateFactory. When a credential is needed, the KeyManager simply consults this KeyStore object and determines which credentials to present.

A KeyStore's contents might have originally been created using a utility such as keytool. keytool creates a RSA or DSA KeyPairGenerator and initializes it with an appropriate keysize. This generator is then used to create a KeyPair which keytool would store along with the newly-created certificate in the KeyStore, which is eventually written to disk.

A JSSE TrustManager is responsible for verifying the credentials received from a peer. There are many ways to verify credentials: one of them is to create a CertPath object, and let the JDK's built-in Public Key Infrastructure (PKI) framework handle the validation. Internally, the CertPath implementation might create a Signature object, and use that to verify that the each of the signatures in the certificate chain.

With this basic understanding of the architecture, we can look at some of the steps in the SSL/TLS handshake. The client begins by sending a ClientHello message to the server. The server selects a ciphersuite to use, and sends that back in a ServerHello message, and begins creating JCA objects based on the suite selection. We'll use server-only authentication in the following examples.

SSL Messages

Description of Figure SSL Messages

In the first example, the server tries to use a RSA-based ciphersuite such as TLS_RSA_WITH_AES_128_CBC_SHA. The server's KeyManager is queried, and returns an appropriate RSA entry. The server's credentials (that is: certificate/public key) are sent in the server's Certificate message. The client's TrustManager verifies the server's certificate, and if accepted, the client generates some random bytes using a SecureRandom object. This is then encrypted using an encrypting asymmetric RSA Cipher object that has been initialized with the PublicKey found in the server's certificate. This encrypted data is sent in a Client Key Exchange message. The server would use its corresponding PrivateKey to recover the bytes using a similar Cipher in decrypt mode. These bytes are then used to establish the actual encryption keys.

In a different example, an ephemeral Diffie-Hellman key agreement algorithm along with the DSA signature algorithm is chosen, such as TLS_DHE_DSS_WITH_AES_128_CBC_SHA. The two sides must each establish a new temporary DH public/private keypair using a KeyPairGenerator. Each generator creates DH keys which can then be further converted into pieces using the KeyFactory and DHPublicKeySpec classes. Each side then creates a KeyAgreement object and initializes it with their respective DH PrivateKeys. The server sends its public key pieces in a ServerKeyExchange message (protected by the DSA signature algorithm, and the client sends its public key in a ClientKeyExchange message. When the public keys are reassembled using another KeyFactory, they are fed into the agreement objects. The KeyAgreement objects then generate agreed-upon bytes that are then used to establish the actual encryption keys.

Once the actual encryption keys have been established, the secret key is used to initialize a symmetric Cipher object, and this cipher is used to protect all data in transit. To help determine if the data has been modified, a MessageDigest is created and receives a copy of the data destined for the network. When the packet is complete, the digest (hash) is appended to data, and the entire packet is encrypted by the Cipher. If a block cipher such as AES is used, the data must be padded to make a complete block. On the remote side, the steps are simply reversed.

Again, this is vastly simplified, but gives one an idea of how these classes might be combined to create a higher level protocol.

How to Make Applications "Exempt" from Cryptographic Restrictions

Note 1: This section should be ignored by most application developers. It is only for people whose applications may be exported to those few countries whose governments mandate cryptographic restrictions, if it is desired that such applications have fewer cryptographic restrictions than those mandated. Note 2: Throughout this section, the term "application" is meant to encompass both applications and applets.]

The JCA framework includes an ability to enforce restrictions regarding the cryptographic algorithms and maximum cryptographic strengths available to applets/applications in different jurisdiction contexts (locations). Any such restrictions are specified in "jurisdiction policy files".

Due to import control restrictions by the governments of a few countries, the jurisdiction policy files shipped with the Java SE Development Kit 6 specify that "strong" but limited cryptography may be used. An "unlimited strength" version of these files indicating no restrictions on cryptographic strengths is available for those living in eligible countries (which is most countries). But only the "strong" version can be imported into those countries whose governments mandate restrictions. The JCA framework will enforce the restrictions specified in the installed jurisdiction policy files.

It is possible that the governments of some or all such countries may allow certain applications to become exempt from some or all cryptographic restrictions. For example, they may consider certain types of applications as "special" and thus exempt. Or they may exempt any application that utilizes an "exemption mechanism," such as key recovery. Applications deemed to be exempt could get access to stronger cryptography than that allowed for non-exempt applications in such countries.

In order for an application to be recognized as "exempt" at runtime, it must meet the following conditions:

  • It must have a permission policy file bundled with it in a JAR file. The permission policy file specifies what cryptography-related permissions the application has, and under what conditions (if any).
  • The JAR file containing the application and the permission policy file must have been signed using a code-signing certificate issued after the application was accepted as exempt.

Below are sample steps required in order to make an application exempt from some or all cryptographic restrictions. This is a basic outline that includes information about what is required by JCA in order to recognize and treat applications as being exempt. You will need to know the exemption requirements of the particular country or countries in which you would like your application to be able to be run but whose governments require cryptographic restrictions. You will also need to know the requirements of a JCA framework vendor that has a process in place for handling exempt applications. Consult such a vendor for further information. (NOTE: The SunJCE provider does not supply an implementation of the ExemptionMechanismSpi class.)

  • Step 1: Write and Compile Your Application Code
  • Step 2: Create a Permission Policy File Granting Appropriate Cryptographic Permissions
  • Step 3: Prepare for Testing
    • Step 3a: Apply for Government Approval From the Government Mandating Restrictions.
    • Step 3b: Get a Code-Signing Certificate
    • Step 3c: Bundle the Application and Permission Policy File into a JAR file
    • Step 3d: Sign the JAR file
    • Step 3e: Set Up Your Environment Like That of a User in a Restricted Country
    • Step 3f: (only for applications using exemption mechanisms) Install a Provider Implementing the Exemption Mechanism Specified by the entry in the Permission Policy File
  • Step 4: Test Your Application
  • Step 5: Apply for U.S. Government Export Approval If Required
  • Step 6: Deploy Your Application

Special Code Requirements for Applications that Use Exemption Mechanisms

When an application has a permission policy file associated with it (in the same JAR file) and that permission policy file specifies an exemption mechanism, then when the Cipher getInstance method is called to instantiate a Cipher, the JCA code searches the installed providers for one that implements the specified exemption mechanism. If it finds such a provider, JCA instantiates an ExemptionMechanism API object associated with the provider's implementation, and then associates the ExemptionMechanism object with the Cipher returned by getInstance.

After instantiating a Cipher, and prior to initializing it (via a call to the Cipher init method), your code must call the following Cipher method:

    public ExemptionMechanism getExemptionMechanism()

This call returns the ExemptionMechanism object associated with the Cipher. You must then initialize the exemption mechanism implementation by calling the following method on the returned ExemptionMechanism:

    public final void init(Key key)

The argument you supply should be the same as the argument of the same types that you will subsequently supply to a Cipher init method.

Once you have initialized the ExemptionMechanism, you can proceed as usual to initialize and use the Cipher.

Permission Policy Files

In order for an application to be recognized at runtime as being "exempt" from some or all cryptographic restrictions, it must have a permission policy file bundled with it in a JAR file. The permission policy file specifies what cryptography-related permissions the application has, and under what conditions (if any).

NOTE: The permission policy file bundled with an application must be named cryptoPerms.

The format of a permission entry in a permission policy file that accompanies an exempt application is the same as the format for a jurisdiction policy file downloaded with the JDK, which is:

    permission <crypto permission class name>[ <alg_name>
        [[, <exemption mechanism name>][, <maxKeySize>
        [, <AlgorithmParameterSpec class name>,
        <parameters for constructing an AlgorithmParameterSpec object>
        ]]]];

See Appendix B for more information about the jurisdiction policy file format.

Permission Policy Files for Exempt Applications

Some applications may be allowed to be completely unrestricted. Thus, the permission policy file that accompanies such an application usually just needs to contain the following:

    grant {
        // There are no restrictions to any algorithms.
        permission javax.crypto.CryptoAllPermission;
    };

If an application just uses a single algorithm (or several specific algorithms), then the permission policy file could simply mention that algorithm (or algorithms) explicitly, rather than granting CryptoAllPermission. For example, if an application just uses the Blowfish algorithm, the permission policy file doesn't have to grant CryptoAllPermission to all algorithms. It could just specify that there is no cryptographic restriction if the Blowfish algorithm is used. In order to do this, the permission policy file would look like the following:

    grant {
        permission javax.crypto.CryptoPermission "Blowfish";
    };

Permission Policy Files for Applications Exempt Due to Exemption Mechanisms

If an application is considered "exempt" if an exemption mechanism is enforced, then the permission policy file that accompanies the application must specify one or more exemption mechanisms. At runtime, the application will be considered exempt if any of those exemption mechanisms is enforced. Each exemption mechanism must be specified in a permission entry that looks like the following:

    // No algorithm restrictions if specified
    // exemption mechanism is enforced.
    permission javax.crypto.CryptoPermission *,
        "<ExemptionMechanismName>";

where <ExemptionMechanismName> specifies the name of an exemption mechanism. The list of possible exemption mechanism names includes:

  • KeyRecovery
  • KeyEscrow
  • KeyWeakening
As an example, suppose your application is exempt if either key recovery or key escrow is enforced. Then your permission policy file should contain the following:
    grant {
        // No algorithm restrictions if KeyRecovery is enforced.
        permission javax.crypto.CryptoPermission *,
            "KeyRecovery";
        // No algorithm restrictions if KeyEscrow is enforced.
        permission javax.crypto.CryptoPermission *,
            "KeyEscrow";
    };

NOTE: Permission entries that specify exemption mechanisms should not also specify maximum key sizes. The allowed key sizes are actually determined from the installed exempt jurisdiction policy files, as described in the next section.

How Bundled Permission Policy Files Affect Cryptographic Permissions

At runtime, when an application instantiates a Cipher (via a call to its getInstance method) and that application has an associated permission policy file, JCA checks to see whether the permission policy file has an entry that applies to the algorithm specified in the getInstance call. If it does, and the entry grants CryptoAllPermission or does not specify that an exemption mechanism must be enforced, it means there is no cryptographic restriction for this particular algorithm.

If the permission policy file has an entry that applies to the algorithm specified in the getInstance call and the entry does specify that an exemption mechanism must be enforced, then the exempt jurisdiction policy file(s) are examined. If the exempt permissions include an entry for the relevant algorithm and exemption mechanism, and that entry is implied by the permissions in the permission policy file bundled with the application, and if there is an implementation of the specified exemption mechanism available from one of the registered providers, then the maximum key size and algorithm parameter values for the Cipher are determined from the exempt permission entry.

If there is no exempt permission entry implied by the relevant entry in the permission policy file bundled with the application, or if there is no implementation of the specified exemption mechanism available from any of the registered providers, then the application is only allowed the standard default cryptographic permissions.

Code Examples

Here are some short examples which illustrate use of several of the JCA mechanisms. In addition, complete working examples can be found in Appendix D.

Computing a MessageDigest Object

First create the message digest object, as in the following example:

MessageDigest sha = MessageDigest.getInstance("SHA-1");
This call assigns a properly initialized message digest object to the sha variable. The implementation implements the Secure Hash Algorithm (SHA-1), as defined in the National Institute for Standards and Technology's (NIST) FIPS 180-2 document. See Appendix A for a complete discussion of standard names and algorithms.

Next, suppose we have three byte arrays, i1, i2 and i3, which form the total input whose message digest we want to compute. This digest (or "hash") could be calculated via the following calls:

sha.update(i1);
sha.update(i2);
sha.update(i3);
byte[] hash = sha.digest();

An equivalent alternative series of calls would be:

sha.update(i1);
sha.update(i2);
byte[] hash = sha.digest(i3);
After the message digest has been calculated, the message digest object is automatically reset and ready to receive new data and calculate its digest. All former state (i.e., the data supplied to update calls) is lost.

Some hash implementations may support intermediate hashes through cloning. Suppose we want to calculate separate hashes for:

  • i1
  • i1 and i2
  • i1, i2, and i3

A way to do it is:

/* compute the hash for i1 */
sha.update(i1);
byte[] i1Hash = sha.clone().digest();

/* compute the hash for i1 and i2 */
sha.update(i2);
byte[] i12Hash = sha.clone().digest();

/* compute the hash for i1, i2 and i3 */
sha.update(i3);
byte[] i123hash = sha.digest();
This code works only if the SHA-1 implementation is cloneable. While some implementations of message digests are cloneable, others are not. To determine whether or not cloning is possible, attempt to clone the MessageDigest object and catch the potential exception as follows:
try {
    // try and clone it
    /* compute the hash for i1 */
    sha.update(i1);
    byte[] i1Hash = sha.clone().digest();
    // ...
    byte[] i123hash = sha.digest();
} catch (CloneNotSupportedException cnse) {
    // do something else, such as the code shown below
}
If a message digest is not cloneable, the other, less elegant way to compute intermediate digests is to create several digests. In this case, the number of intermediate digests to be computed must be known in advance:
MessageDigest sha1 = MessageDigest.getInstance("SHA-1");
MessageDigest sha12 = MessageDigest.getInstance("SHA-1");
MessageDigest sha123 = MessageDigest.getInstance("SHA-1");

byte[] i1Hash = sha1.digest(i1);

sha12.update(i1);
byte[] i12Hash = sha12.digest(i2);

sha123.update(i1);
sha123.update(i2);
byte[] i123Hash = sha123.digest(i3);

Generating a Pair of Keys

In this example we will generate a public-private key pair for the algorithm named "DSA" (Digital Signature Algorithm), and use this keypair in future examples. We will generate keys with a 1024-bit modulus. We don't care which provider supplies the algorithm implementation.

Creating the Key Pair Generator

The first step is to get a key pair generator object for generating keys for the DSA algorithm:

KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");

Initializing the Key Pair Generator

The next step is to initialize the key pair generator. In most cases, algorithm-independent initialization is sufficient, but in some cases, algorithm-specific initialization is used.

Algorithm-Independent Initialization

All key pair generators share the concepts of a keysize and a source of randomness. The KeyPairGenerator class initialization methods at a minimum needs a keysize. If the source of randomness is not explicitly provided, a SecureRandom implementation of the highest-priority installed provider will be used. Thus to generate keys with a keysize of 1024, simply call:

SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
keyGen.initialize(1024, random);
The following code illustrates how to use a specific, additionally seeded SecureRandom object:
SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
random.setSeed(userSeed);
keyGen.initialize(1024, random);
Since no other parameters are specified when you call the above algorithm-independent initialize method, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with each of the keys. The provider may use precomputed parameter values or may generate new values.

Algorithm-Specific Initialization

For situations where a set of algorithm-specific parameters already exists (such as "community parameters" in DSA), there are two initialize methods that have an AlgorithmParameterSpec argument. Suppose your key pair generator is for the "DSA" algorithm, and you have a set of DSA-specific parameters, p, q, and g, that you would like to use to generate your key pair. You could execute the following code to initialize your key pair generator (recall that DSAParameterSpec is an AlgorithmParameterSpec):

DSAParameterSpec dsaSpec = new DSAParameterSpec(p, q, g);
SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
random.setSeed(userSeed);
keyGen.initialize(dsaSpec, random);
NOTE: The parameter named p is a prime number whose length is the modulus length ("size"). Therefore, you don't need to call any other method to specify the modulus length.

Generating the Pair of Keys

The final step is actually generating the key pair. No matter which type of initialization was used (algorithm-independent or algorithm-specific), the same code is used to generate the key pair:

KeyPair pair = keyGen.generateKeyPair();

Generating and Verifying a Signature Using Generated Keys

The following signature generation and verification examples use the KeyPair generated in the key pair example above.

Generating a Signature

We first create a signature object:

Signature dsa = Signature.getInstance("SHA1withDSA");

Next, using the key pair generated in the key pair example, we initialize the object with the private key, then sign a byte array called data.

/* Initializing the object with a private key */
PrivateKey priv = pair.getPrivate();
dsa.initSign(priv);

/* Update and sign the data */
dsa.update(data);
byte[] sig = dsa.sign();

Verifying a Signature

Verifying the signature is straightforward. (Note that here we also use the key pair generated in the key pair example.)

/* Initializing the object with the public key */
PublicKey pub = pair.getPublic();
dsa.initVerify(pub);

/* Update and verify the data */
dsa.update(data);
boolean verifies = dsa.verify(sig);
System.out.println("signature verifies: " + verifies);

Generating/Verifying Signatures Using Key Specifications and KeyFactory

Suppose that, rather than having a public/private key pair (as, for example, was generated in the key pair example above), you simply have the components of your DSA private key: x (the private key), p (the prime), q (the sub-prime), and g (the base).

Further suppose you want to use your private key to digitally sign some data, which is in a byte array named someData. You would do the following steps, which also illustrate creating a key specification and using a key factory to obtain a PrivateKey from the key specification (initSign requires a PrivateKey):

DSAPrivateKeySpec dsaPrivKeySpec = new DSAPrivateKeySpec(x, p, q, g);

KeyFactory keyFactory = KeyFactory.getInstance("DSA");
PrivateKey privKey = keyFactory.generatePrivate(dsaPrivKeySpec);

Signature sig = Signature.getInstance("SHA1withDSA");
sig.initSign(privKey);
sig.update(someData);
byte[] signature = sig.sign();

Suppose Alice wants to use the data you signed. In order for her to do so, and to verify your signature, you need to send her three things:

  1. the data,
  2. the signature, and
  3. the public key corresponding to the private key you used to sign the data.

You can store the someData bytes in one file, and the signature bytes in another, and send those to Alice.

For the public key, assume, as in the signing example above, you have the components of the DSA public key corresponding to the DSA private key used to sign the data. Then you can create a DSAPublicKeySpec from those components:

DSAPublicKeySpec dsaPubKeySpec = new DSAPublicKeySpec(y, p, q, g);

You still need to extract the key bytes so that you can put them in a file. To do so, you can first call the generatePublic method on the DSA key factory already created in the example above:

PublicKey pubKey = keyFactory.generatePublic(dsaPubKeySpec);
Then you can extract the (encoded) key bytes via the following:
byte[] encKey = pubKey.getEncoded();

You can now store these bytes in a file, and send it to Alice along with the files containing the data and the signature.

Now, assume Alice has received these files, and she copied the data bytes from the data file to a byte array named data, the signature bytes from the signature file to a byte array named signature, and the encoded public key bytes from the public key file to a byte array named encodedPubKey.

Alice can now execute the following code to verify the signature. The code also illustrates how to use a key factory in order to instantiate a DSA public key from its encoding (initVerify requires a PublicKey).

    X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(encodedPubKey);

    KeyFactory keyFactory = KeyFactory.getInstance("DSA");
    PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);

    Signature sig = Signature.getInstance("SHA1withDSA");
    sig.initVerify(pubKey);
    sig.update(data);
    sig.verify(signature);
NOTE: In the above, Alice needed to generate a PublicKey from the encoded key bits, since initVerify requires a PublicKey. Once she has a PublicKey, she could also use the KeyFactory getKeySpec method to convert it to a DSAPublicKeySpec so that she can access the components, if desired, as in:
    DSAPublicKeySpec dsaPubKeySpec =
        (DSAPublicKeySpec)keyFactory.getKeySpec(pubKey,
            DSAPublicKeySpec.class)

Now she can access the DSA public key components y, p, q, and g through the corresponding "get" methods on the DSAPublicKeySpec class (getY, getP, getQ, and getG).

Determining If Two Keys Are Equal

In many cases you would like to know if two keys are equal; however, the default method java.lang.Object.equals may not give the desired result. The most provider-independent approach is to compare the encoded keys. If this comparison isn't appropriate (for example, when comparing an RSAPrivateKey and an RSAPrivateCrtKey), you should compare each component. The following code demonstrates this idea:

static boolean keysEqual(Key key1, Key key2) {
    if (key1.equals(key2)) {
        return true;
    }

    if (Arrays.equals(key1.getEncoded(), key2.getEncoded())) {
        return true;
    }

    // More code for different types of keys here.
    // For example, the following code can check if
    // an RSAPrivateKey and an RSAPrivateCrtKey are equal:
    // if ((key1 instanceof RSAPrivateKey) &&
    //     (key2 instanceof RSAPrivateKey)) {
    //     if ((key1.getModulus().equals(key2.getModulus())) &&
    //         (key1.getPrivateExponent().equals(
    //                                      key2.getPrivateExponent()))) {
    //         return true;
    //     }
    // }

    return false;
}

Reading Base64-Encoded Certificates

The following example reads a file with Base64-encoded certificates, which are each bounded at the beginning by

-----BEGIN CERTIFICATE-----
and at the end by
-----END CERTIFICATE-----
We convert the FileInputStream (which does not support mark and reset) to a ByteArrayInputStream (which supports those methods), so that each call to generateCertificate consumes only one certificate, and the read position of the input stream is positioned to the next certificate in the file:
FileInputStream fis = new FileInputStream(filename);
BufferedInputStream bis = new BufferedInputStream(fis);

CertificateFactory cf = CertificateFactory.getInstance("X.509");

while (bis.available() > 0) {
    Certificate cert = cf.generateCertificate(bis);
    System.out.println(cert.toString());
}

Parsing a Certificate Reply

The following example parses a PKCS7-formatted certificate reply stored in a file and extracts all the certificates from it:

FileInputStream fis = new FileInputStream(filename);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Collection c = cf.generateCertificates(fis);
Iterator i = c.iterator();
while (i.hasNext()) {
   Certificate cert = (Certificate)i.next();
   System.out.println(cert);
}

Using Encryption

This section takes the user through the process of generating a key, creating and initializing a cipher object, encrypting a file, and then decrypting it. Throughout this example, we use the Advanced Encryption Standard (AES).

Generating a Key

To create an AES key, we have to instantiate a KeyGenerator for AES. We do not specify a provider, because we do not care about a particular AES key generation implementation. Since we do not initialize the KeyGenerator, a system-provided source of randomness and a default keysize will be used to create the AES key:

    KeyGenerator keygen = KeyGenerator.getInstance("AES");
    SecretKey aesKey = keygen.generateKey();

After the key has been generated, the same KeyGenerator object can be re-used to create further keys.

Creating a Cipher

The next step is to create a Cipher instance. To do this, we use one of the getInstance factory methods of the Cipher class. We must specify the name of the requested transformation, which includes the following components, separated by slashes (/):

  • the algorithm name
  • the mode (optional)
  • the padding scheme (optional)

In this example, we create an AES cipher in Electronic Codebook mode, with PKCS5-style padding. We do not specify a provider, because we do not care about a particular implementation of the requested transformation.

The standard algorithm name for AES is "AES", the standard name for the Electronic Codebook mode is "ECB", and the standard name for PKCS5-style padding is "PKCS5Padding":

    Cipher aesCipher;

    // Create the cipher
    aesCipher = Cipher.getInstance("AES/ECB/PKCS5Padding");

We use the generated aesKey from above to initialize the Cipher object for encryption:

    // Initialize the cipher for encryption
    aesCipher.init(Cipher.ENCRYPT_MODE, aesKey);

    // Our cleartext
    byte[] cleartext = "This is just an example".getBytes();

    // Encrypt the cleartext
    byte[] ciphertext = aesCipher.doFinal(cleartext);

    // Initialize the same cipher for decryption
    aesCipher.init(Cipher.DECRYPT_MODE, aesKey);

    // Decrypt the ciphertext
    byte[] cleartext1 = aesCipher.doFinal(ciphertext);

cleartext and cleartext1 are identical.

Using Password-Based Encryption

In this example, we prompt the user for a password from which we derive an encryption key.

It would seem logical to collect and store the password in an object of type java.lang.String. However, here's the caveat: Objects of type String are immutable, i.e., there are no methods defined that allow you to change (overwrite) or zero out the contents of a String after usage. This feature makes String objects unsuitable for storing security sensitive information such as user passwords. You should always collect and store security sensitive information in a char array instead.

For that reason, the javax.crypto.spec.PBEKeySpec class takes (and returns) a password as a char array. See the ReadPassword class in the sample code in Appendix D for one possible way of reading character array passwords from an input stream.

In order to use Password-Based Encryption (PBE) as defined in PKCS5, we have to specify a salt and an iteration count. The same salt and iteration count that are used for encryption must be used for decryption:

            PBEKeySpec pbeKeySpec;
            PBEParameterSpec pbeParamSpec;
            SecretKeyFactory keyFac;

            // Salt
            byte[] salt = {
                (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
                (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
            };

            // Iteration count
            int count = 20;

            // Create PBE parameter set
            pbeParamSpec = new PBEParameterSpec(salt, count);

            // Prompt user for encryption password.
            // Collect user password as char array (using the
            // "readPassword" method from above), and convert
            // it into a SecretKey object, using a PBE key
            // factory.
            System.out.print("Enter encryption password:  ");
            System.out.flush();
            pbeKeySpec = new PBEKeySpec(readPassword(System.in));
            keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
            SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);

            // Create PBE Cipher
            Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");

            // Initialize PBE Cipher with key and parameters
            pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);

            // Our cleartext
            byte[] cleartext = "This is another example".getBytes();

            // Encrypt the cleartext
            byte[] ciphertext = pbeCipher.doFinal(cleartext);

Using Key Agreement

Please refer to Appendix D for sample programs exercising the Diffie-Hellman key exchange between 2 and 3 parties.

Appendix A: Standard Names

The JDK Security API requires and uses a set of standard names for algorithms, certificate and keystore types. The specification names previously found here in Appendix A and in the other security specifications (JSSE/CertPath/etc.) have been combined in the Standard Names document. This document also contains more information about the algorithm specifications. Specific provider information can be found in the Sun Provider Documentation.

Cryptographic implementations in the JDK are distributed through several different providers primarily for historical reasons (Sun, SunJSSE, SunJCE, SunRsaSign). Note these providers may not be available on all JDK implementations, and therefore, truly portable applications should call getInstance() without specifying specific providers. Applications specifying a particular provider may not be able to take advantage of native providers tuned for an underlying operating environment (such as PKCS or Microsoft's CAPI).

The SunPKCS11 provider itself does not contain any cryptographic algorithms, but instead, directs requests into an underlying PKCS11 implementation. The PKCS11 Reference Guide and the underlying PKCS11 implementation should be consulted to determine if a desired algorithm will be available through the PKCS11 provider. Likewise, on Windows systems, the SunMSCAPI provider does not provide any cryptographic functionality, but instead routes requests to the underlying Operating System for handling.

Appendix B: Jurisdiction Policy File Format

JCA represents its jurisdiction policy files as Java style policy files with corresponding permission statements. As described in Default Policy Implementation and Policy File Syntax, a Java policy file specifies what permissions are allowed for code from specified code sources. A permission represents access to a system resource. In the case of JCA, the "resources" are cryptography algorithms, and code sources do not need to be specified, because the cryptographic restrictions apply to all code.

A jurisdiction policy file consists of a very basic "grant entry" containing one or more "permission entries."

grant {
    <permission entries>;
};

The format of a permission entry in a jurisdiction policy file is:

permission <crypto permission class name>[ <alg_name>
    [[, <exemption mechanism name>][, <maxKeySize>
    [, <AlgorithmParameterSpec class name>,
    <parameters for constructing an
        AlgorithmParameterSpec object>]]]];

A sample jurisdiction policy file that includes restricting the "Blowfish" algorithm to maximum key sizes of 64 bits is:

    grant {
        permission javax.crypto.CryptoPermission "Blowfish", 64;
        // ...
    };

A permission entry must begin with the word permission. The <crypto permission class name> in the template above would actually be a specific permission class name, such as javax.crypto.CryptoPermission. A crypto permission class reflects the ability of an application/applet to use certain algorithms with certain key sizes in certain environments. There are two crypto permission classes: CryptoPermission and CryptoAllPermission. The special CryptoAllPermission class implies all cryptography-related permissions, that is, it specifies that there are no cryptography-related restrictions.

The <alg_name>, when utilized, is a quoted string specifying the standard name (see Appendix A) of a cryptography algorithm, such as "DES" or "RSA".

The <exemption mechanism name>, when specified, is a quoted string indicating an exemption mechanism which, if enforced, enables a reduction in cryptographic restrictions. Exemption mechanism names that can be used include "KeyRecovery" "KeyEscrow", and "KeyWeakening".

<maxKeySize> is an integer specifying the maximum key size (in bits) allowed for the specified algorithm.

For some algorithms it may not be sufficient to specify the algorithm strength in terms of just a key size. For example, in the case of the "RC5" algorithm, the number of rounds must also be considered. For algorithms whose strength needs to be expressed as more than a key size, the permission entry should also specify an AlgorithmParameterSpec class name (such as javax.crypto.spec.RC5ParameterSpec) and a list of parameters for constructing the specified AlgorithmParameterSpec object.

Items that appear in a permission entry must appear in the specified order. An entry is terminated with a semicolon.

Case is unimportant for the identifiers (grant, permission) but is significant for the <crypto permission class name> or for any string that is passed in as a value.

NOTE: An "*" can be used as a wildcard for any permission entry option. For example, an "*" (without the quotes) for an <alg_name> option means "all algorithms."

Appendix C: Maximum Key Sizes Allowed by "Strong" Jurisdiction Policy Files

Due to import control restrictions, the jurisdiction policy files shipped with the Java SE Development Kit allow "strong" but limited cryptography to be used. For more info, please see Import Limits on Cryptographic Algorithms.

Appendix D: Sample Programs

Diffie-Hellman Key Exchange between 2 Parties

/*
 * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.io.*;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import java.security.interfaces.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import javax.crypto.interfaces.*;
import com.sun.crypto.provider.SunJCE;

/**
 * This program executes the Diffie-Hellman key agreement protocol
 * between 2 parties: Alice and Bob.
 *
 * By default, preconfigured parameters (1024-bit prime modulus and base
 * generator used by SKIP) are used.
 * If this program is called with the "-gen" option, a new set of
 * parameters is created.
 */

public class DHKeyAgreement2 {

    private DHKeyAgreement2() {}

    public static void main(String argv[]) {
        try {
            String mode = "USE_SKIP_DH_PARAMS";

            DHKeyAgreement2 keyAgree = new DHKeyAgreement2();

            if (argv.length > 1) {
                keyAgree.usage();
                throw new Exception("Wrong number of command options");
            } else if (argv.length == 1) {
                if (!(argv[0].equals("-gen"))) {
                    keyAgree.usage();
                    throw new Exception("Unrecognized flag: " + argv[0]);
                }
                mode = "GENERATE_DH_PARAMS";
            }

            keyAgree.run(mode);
        } catch (Exception e) {
            System.err.println("Error: " + e);
            System.exit(1);
        }
    }

    private void run(String mode) throws Exception {

        DHParameterSpec dhSkipParamSpec;

        if (mode.equals("GENERATE_DH_PARAMS")) {
            // Some central authority creates new DH parameters
            System.out.println
                ("Creating Diffie-Hellman parameters (takes VERY long) ...");
            AlgorithmParameterGenerator paramGen
                = AlgorithmParameterGenerator.getInstance("DH");
            paramGen.init(512);
            AlgorithmParameters params = paramGen.generateParameters();
            dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
                (DHParameterSpec.class);
        } else {
            // use some pre-generated, default DH parameters
            System.out.println("Using SKIP Diffie-Hellman parameters");
            dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
                                                  skip1024Base);
        }

        /*
         * Alice creates her own DH key pair, using the DH parameters from
         * above
         */
        System.out.println("ALICE: Generate DH keypair ...");
        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
        aliceKpairGen.initialize(dhSkipParamSpec);
        KeyPair aliceKpair = aliceKpairGen.generateKeyPair();

        // Alice creates and initializes her DH KeyAgreement object
        System.out.println("ALICE: Initialization ...");
        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
        aliceKeyAgree.init(aliceKpair.getPrivate());

        // Alice encodes her public key, and sends it over to Bob.
        byte[] alicePubKeyEnc = aliceKpair.getPublic().getEncoded();

        /*
         * Let's turn over to Bob. Bob has received Alice's public key
         * in encoded format.
         * He instantiates a DH public key from the encoded key material.
         */
        KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
        X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
            (alicePubKeyEnc);
        PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);

        /*
         * Bob gets the DH parameters associated with Alice's public key.
         * He must use the same parameters when he generates his own key
         * pair.
         */
        DHParameterSpec dhParamSpec = ((DHPublicKey)alicePubKey).getParams();

        // Bob creates his own DH key pair
        System.out.println("BOB: Generate DH keypair ...");
        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
        bobKpairGen.initialize(dhParamSpec);
        KeyPair bobKpair = bobKpairGen.generateKeyPair();

        // Bob creates and initializes his DH KeyAgreement object
        System.out.println("BOB: Initialization ...");
        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
        bobKeyAgree.init(bobKpair.getPrivate());

        // Bob encodes his public key, and sends it over to Alice.
        byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();

        /*
         * Alice uses Bob's public key for the first (and only) phase
         * of her version of the DH
         * protocol.
         * Before she can do so, she has to instantiate a DH public key
         * from Bob's encoded key material.
         */
        KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
        x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
        PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
        System.out.println("ALICE: Execute PHASE1 ...");
        aliceKeyAgree.doPhase(bobPubKey, true);

        /*
         * Bob uses Alice's public key for the first (and only) phase
         * of his version of the DH
         * protocol.
         */
        System.out.println("BOB: Execute PHASE1 ...");
        bobKeyAgree.doPhase(alicePubKey, true);

        /*
         * At this stage, both Alice and Bob have completed the DH key
         * agreement protocol.
         * Both generate the (same) shared secret.
         */
        byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
        int aliceLen = aliceSharedSecret.length;

        byte[] bobSharedSecret = new byte[aliceLen];
        int bobLen;
        try {
            // show example of what happens if you
            // provide an output buffer that is too short
            bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
        } catch (ShortBufferException e) {
            System.out.println(e.getMessage());
        }
        // provide output buffer of required size
        bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);

        System.out.println("Alice secret: " +
          toHexString(aliceSharedSecret));
        System.out.println("Bob secret: " +
          toHexString(bobSharedSecret));

        if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
            throw new Exception("Shared secrets differ");
        System.out.println("Shared secrets are the same");

        /*
         * Now let's return the shared secret as a SecretKey object
         * and use it for encryption. First, we generate SecretKeys for the
         * "DES" algorithm (based on the raw shared secret data) and
         * then we use DES in ECB mode
         * as the encryption algorithm. DES in ECB mode does not require any
         * parameters.
         *
         * Then we use DES in CBC mode, which requires an initialization
         * vector (IV) parameter. In CBC mode, you need to initialize the
         * Cipher object with an IV, which can be supplied using the
         * javax.crypto.spec.IvParameterSpec class. Note that you have to use
         * the same IV for encryption and decryption: If you use a different
         * IV for decryption than you used for encryption, decryption will
         * fail.
         *
         * NOTE: If you do not specify an IV when you initialize the
         * Cipher object for encryption, the underlying implementation
         * will generate a random one, which you have to retrieve using the
         * javax.crypto.Cipher.getParameters() method, which returns an
         * instance of java.security.AlgorithmParameters. You need to transfer
         * the contents of that object (e.g., in encoded format, obtained via
         * the AlgorithmParameters.getEncoded() method) to the party who will
         * do the decryption. When initializing the Cipher for decryption,
         * the (reinstantiated) AlgorithmParameters object must be passed to
         * the Cipher.init() method.
         */
        System.out.println("Return shared secret as SecretKey object ...");
        // Bob
        // NOTE: The call to bobKeyAgree.generateSecret above reset the key
        // agreement object, so we call doPhase again prior to another
        // generateSecret call
        bobKeyAgree.doPhase(alicePubKey, true);
        SecretKey bobDesKey = bobKeyAgree.generateSecret("DES");

        // Alice
        // NOTE: The call to aliceKeyAgree.generateSecret above reset the key
        // agreement object, so we call doPhase again prior to another
        // generateSecret call
        aliceKeyAgree.doPhase(bobPubKey, true);
        SecretKey aliceDesKey = aliceKeyAgree.generateSecret("DES");

        /*
         * Bob encrypts, using DES in ECB mode
         */
        Cipher bobCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
        bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);

        byte[] cleartext = "This is just an example".getBytes();
        byte[] ciphertext = bobCipher.doFinal(cleartext);

        /*
         * Alice decrypts, using DES in ECB mode
         */
        Cipher aliceCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
        aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey);
        byte[] recovered = aliceCipher.doFinal(ciphertext);

        if (!java.util.Arrays.equals(cleartext, recovered))
            throw new Exception("DES in CBC mode recovered text is " +
              "different from cleartext");
        System.out.println("DES in ECB mode recovered text is " +
            "same as cleartext");

        /*
         * Bob encrypts, using DES in CBC mode
         */
        bobCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
        bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);

        cleartext = "This is just an example".getBytes();
        ciphertext = bobCipher.doFinal(cleartext);
        // Retrieve the parameter that was used, and transfer it to Alice in
        // encoded format
        byte[] encodedParams = bobCipher.getParameters().getEncoded();

        /*
         * Alice decrypts, using DES in CBC mode
         */
        // Instantiate AlgorithmParameters object from parameter encoding
        // obtained from Bob
        AlgorithmParameters params = AlgorithmParameters.getInstance("DES");
        params.init(encodedParams);
        aliceCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
        aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey, params);
        recovered = aliceCipher.doFinal(ciphertext);

        if (!java.util.Arrays.equals(cleartext, recovered))
            throw new Exception("DES in CBC mode recovered text is " +
              "different from cleartext");
        System.out.println("DES in CBC mode recovered text is " +
            "same as cleartext");
    }

    /*
     * Converts a byte to hex digit and writes to the supplied buffer
     */
    private void byte2hex(byte b, StringBuffer buf) {
        char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
                            '9', 'A', 'B', 'C', 'D', 'E', 'F' };
        int high = ((b & 0xf0) >> 4);
        int low = (b & 0x0f);
        buf.append(hexChars[high]);
        buf.append(hexChars[low]);
    }

    /*
     * Converts a byte array to hex string
     */
    private String toHexString(byte[] block) {
        StringBuffer buf = new StringBuffer();

        int len = block.length;

        for (int i = 0; i < len; i++) {
             byte2hex(block[i], buf);
             if (i < len-1) {
                 buf.append(":");
             }
        }
        return buf.toString();
    }

    /*
     * Prints the usage of this test.
     */
    private void usage() {
        System.err.print("DHKeyAgreement usage: ");
        System.err.println("[-gen]");
    }

    // The 1024 bit Diffie-Hellman modulus values used by SKIP
    private static final byte skip1024ModulusBytes[] = {
        (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
        (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
        (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
        (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
        (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
        (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
        (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
        (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
        (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
        (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
        (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
        (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
        (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
        (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
        (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
        (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
        (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
        (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
        (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
        (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
        (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
        (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
        (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
        (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
        (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
        (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
        (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
        (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
        (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
        (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
        (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
        (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
    };

    // The SKIP 1024 bit modulus
    private static final BigInteger skip1024Modulus
    = new BigInteger(1, skip1024ModulusBytes);

    // The base used with the SKIP 1024 bit modulus
    private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}

Diffie-Hellman Key Exchange between 3 Parties

/*
 * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.io.*;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import java.security.interfaces.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import javax.crypto.interfaces.*;
import com.sun.crypto.provider.SunJCE;

/**
 * This program executes the Diffie-Hellman key agreement protocol
 * between 3 parties: Alice, Bob, and Carol.
 *
 * We use the same 1024-bit prime modulus and base generator that are
 * used by SKIP.
 */

public class DHKeyAgreement3 {

    private DHKeyAgreement3() {}

    public static void main(String argv[]) {
        try {
            DHKeyAgreement3 keyAgree = new DHKeyAgreement3();
            keyAgree.run();
        } catch (Exception e) {
            System.err.println("Error: " + e);
            System.exit(1);
        }
    }

    private void run() throws Exception {

        DHParameterSpec dhSkipParamSpec;

        System.out.println("Using SKIP Diffie-Hellman parameters");
        dhSkipParamSpec = new DHParameterSpec(skip1024Modulus, skip1024Base);

        // Alice creates her own DH key pair
        System.out.println("ALICE: Generate DH keypair ...");
        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
        aliceKpairGen.initialize(dhSkipParamSpec);
        KeyPair aliceKpair = aliceKpairGen.generateKeyPair();

        // Bob creates his own DH key pair
        System.out.println("BOB: Generate DH keypair ...");
        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
        bobKpairGen.initialize(dhSkipParamSpec);
        KeyPair bobKpair = bobKpairGen.generateKeyPair();

        // Carol creates her own DH key pair
        System.out.println("CAROL: Generate DH keypair ...");
        KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH");
        carolKpairGen.initialize(dhSkipParamSpec);
        KeyPair carolKpair = carolKpairGen.generateKeyPair();

        // Alice initialize
        System.out.println("ALICE: Initialize ...");
        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
        aliceKeyAgree.init(aliceKpair.getPrivate());

        // Bob initialize
        System.out.println("BOB: Initialize ...");
        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
        bobKeyAgree.init(bobKpair.getPrivate());

        // Carol initialize
        System.out.println("CAROL: Initialize ...");
        KeyAgreement carolKeyAgree = KeyAgreement.getInstance("DH");
        carolKeyAgree.init(carolKpair.getPrivate());

        // Alice uses Carol's public key
        Key ac = aliceKeyAgree.doPhase(carolKpair.getPublic(), false);

        // Bob uses Alice's public key
        Key ba = bobKeyAgree.doPhase(aliceKpair.getPublic(), false);

        // Carol uses Bob's public key
        Key cb = carolKeyAgree.doPhase(bobKpair.getPublic(), false);

        // Alice uses Carol's result from above
        aliceKeyAgree.doPhase(cb, true);

        // Bob uses Alice's result from above
        bobKeyAgree.doPhase(ac, true);

        // Carol uses Bob's result from above
        carolKeyAgree.doPhase(ba, true);

        // Alice, Bob and Carol compute their secrets
        byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
        System.out.println("Alice secret: " + toHexString(aliceSharedSecret));

        byte[] bobSharedSecret = bobKeyAgree.generateSecret();
        System.out.println("Bob secret: " + toHexString(bobSharedSecret));

        byte[] carolSharedSecret = carolKeyAgree.generateSecret();
        System.out.println("Carol secret: " + toHexString(carolSharedSecret));

        // Compare Alice and Bob
        if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
            throw new Exception("Alice and Bob differ");
        System.out.println("Alice and Bob are the same");

        // Compare Bob and Carol
        if (!java.util.Arrays.equals(bobSharedSecret, carolSharedSecret))
            throw new Exception("Bob and Carol differ");
        System.out.println("Bob and Carol are the same");
    }

    /*
     * Converts a byte to hex digit and writes to the supplied buffer
     */
    private void byte2hex(byte b, StringBuffer buf) {
        char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
                            '9', 'A', 'B', 'C', 'D', 'E', 'F' };
        int high = ((b & 0xf0) >> 4);
        int low = (b & 0x0f);
        buf.append(hexChars[high]);
        buf.append(hexChars[low]);
    }

    /*
     * Converts a byte array to hex string
     */
    private String toHexString(byte[] block) {
        StringBuffer buf = new StringBuffer();

        int len = block.length;

        for (int i = 0; i < len; i++) {
             byte2hex(block[i], buf);
             if (i < len-1) {
                 buf.append(":");
             }
        }
        return buf.toString();
    }

    /*
     * Prints the usage of this test.
     */
    private void usage() {
        System.err.print("DHKeyAgreement usage: ");
        System.err.println("[-gen]");
    }

    // The 1024 bit Diffie-Hellman modulus values used by SKIP
    private static final byte skip1024ModulusBytes[] = {
        (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
        (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
        (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
        (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
        (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
        (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
        (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
        (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
        (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
        (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
        (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
        (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
        (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
        (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
        (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
        (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
        (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
        (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
        (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
        (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
        (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
        (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
        (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
        (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
        (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
        (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
        (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
        (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
        (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
        (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
        (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
        (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
    };

    // The SKIP 1024 bit modulus
    private static final BigInteger skip1024Modulus
    = new BigInteger(1, skip1024ModulusBytes);

    // The base used with the SKIP 1024 bit modulus
    private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}

Blowfish Cipher Example

/*
 * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;

/**
 * This program generates a Blowfish key, retrieves its raw bytes, and
 * then reinstantiates a Blowfish key from the key bytes.
 * The reinstantiated key is used to initialize a Blowfish cipher for
 * encryption.
 */

public class BlowfishKey {

    public static void main(String[] args) throws Exception {

        KeyGenerator kgen = KeyGenerator.getInstance("Blowfish");
        SecretKey skey = kgen.generateKey();
        byte[] raw = skey.getEncoded();
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "Blowfish");

        Cipher cipher = Cipher.getInstance("Blowfish");
        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
        byte[] encrypted =
            cipher.doFinal("This is just an example".getBytes());
    }
}

HMAC-MD5 Example

/*
 * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.security.*;
import javax.crypto.*;

/**
 * This program demonstrates how to generate a secret-key object for
 * HMAC-MD5, and initialize an HMAC-MD5 object with it.
 */

public class initMac {

    public static void main(String[] args) throws Exception {

        // Generate secret key for HMAC-MD5
        KeyGenerator kg = KeyGenerator.getInstance("HmacMD5");
        SecretKey sk = kg.generateKey();

        // Get instance of Mac object implementing HMAC-MD5, and
        // initialize it with the above secret key
        Mac mac = Mac.getInstance("HmacMD5");
        mac.init(sk);
        byte[] result = mac.doFinal("Hi There".getBytes());
    }
}

Reading ASCII Passwords From an InputStream Example

/*
 * @(#)ReadPassword.java  1.1 06/06/07
 *
 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.util.*;
import java.io.*;
import java.security.*;

public class ReadPassword {
    /**
     * Read a password from the InputStream "in".
     * <p>
     * As Strings are immutable, passwords should be stored as an array
     * of characters, which can be blanked out when no longer needed.
     * <p>
     * If the provided InputStream is the System's Console, this method
     * uses the non-echoing readPassword() method of java.io.Console
     * (new to JDK 6).  If not, a fallback implementation is used.
     * <p>
     * NOTE:  For expository purposes, and because some applications do
     * not understand multi-byte characters, only 8-bit ASCII passwords
     * are handled here.
     * <p>
     * NOTE:  If a SecurityManager is used, the default standard
     * java.policy file found in the JDK (i.e.
     * <java-home>/lib/security/java.policy) allows reading the
     * line.separator property.  If your environment is different, this
     * code will need to be granted the appropriate privilege.
     *
     * @param   in
     *          the InputStream used to obtain the password.
     *
     * @return  A character array containing the password or passphrase,
     *          not including the line-termination characters,
     *          or null if an end of stream has been reached.
     *
     * @throws  IOException
     *          if an I/O problem occurs
     */
    public static final char[] readPassword(InputStream in)
            throws IOException {

        /*
         * If available, directly use the java.io.Console class to
         * avoid character echoing.
         */
        if (in == System.in && System.console() != null) {
            // readPassword returns "" if you just print ENTER,
            return System.console().readPassword();
        }

        /*
         * If a console is not available, read the InputStream
         * directly.  This approach may cause password echoing.
         *
         * Since different operating systems have different End-Of-Line
         * (EOL) sequences, this algorithm should allow for
         * platform-independent implementations.  Typical EOL sequences
         * are a single line feed ('\n'), or a carriage return/linefeed
         * combination ('\r\n').  However, some OS's use a single
         * a carriage return ('\r'), which complicates portability.
         *
         * Since we may not have the ability to push bytes back into the
         * InputStream, another approach is used here.  The javadoc for
         * <code>java.lang.System.getProperties()</code> specifies that
         * the set of system properties will contain a system-specific
         * value for the "line.separator".  Scan for this character
         * sequence instead of hard-coding a particular sequence.
         */

        /*
         * Enclose the getProperty in a doPrivileged block to minimize
         * the call stack permission required.
         */
        char [] EOL = AccessController.doPrivileged(
            new PrivilegedAction<char[]>() {
                public char[] run() {
                    String s = System.getProperty("line.separator");
                    // Shouldn't happen.
                    if (s == null) {
                        throw new RuntimeException(
                            "line.separator not defined");
                    }
                    return s.toCharArray();
                }
            });

        char [] buffer = new char[128];
        try {
            int len = 0;                // len of data in buffer.
            boolean done = false;       // found the EOL sequence
            int b;                      // byte read

            while (!done) {
                /*
                 * realloc if necessary
                 */
                if (len >= buffer.length) {
                    char [] newbuffer = new char[len + 128];
                    System.arraycopy(buffer, 0, newbuffer, 0, len);
                    Arrays.fill(buffer, ' ');
                    buffer = newbuffer;
                }

                /*
                 * End-of-Stream?
                 */
                if ((b = in.read()) == -1) {
                    // Return as much as we have, null otherwise.
                    if (len == 0) {
                        return null;
                    }
                    break;
                } else {
                    /*
                     * NOTE:  In the simple PBE example here,
                     * only 8 bit ASCII characters are handled.
                     */
                    buffer[len++] = (char) b;
                }

                /*
                 * check for the EOL sequence.  Do we have enough bytes?
                 */
                if (len >= EOL.length) {
                    int i = 0;
                    for (i = 0; i < EOL.length; i++) {
                        if (buffer[len - EOL.length + i] != EOL[i]) {
                            break;
                        }
                    }
                    done = (i == EOL.length);
                }
            }

            /*
             * If we found the EOL, strip the EOL chars.
             */
            char [] result = new char[done ? len - EOL.length : len];
            System.arraycopy(buffer, 0, result, 0, result.length);

            return result;
        } finally {
            /*
             * Zero out the buffer.
             */
            if (buffer != null) {
                Arrays.fill(buffer, ' ');
            }
        }
    }
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure Differences Between Generators and Factories

Link to figure Differences Between Generators and Factories

This figure consists of two diagrams:

Generators

This diagram contains the following caption: Generators — Generate new objects based on initialization parameters

It consists of boxes labeled as follows:

  • Initialization Parameters (Key Length)
  • Generator
  • Object Secret Key

Unlabeled arrows connect these boxes:

  • From Initialization Parameters (Key Length) to Generator
  • From Generator to Object Secret Key

Factories

This diagram contains the following caption: Factories — Transform existing specific objects into other object types

It consists of boxes labeled as follows:

  • Type 1 Key Spec
  • Factory
  • Type 2 Secret Key

Unlabeled arrows connect these boxes:

  • From Type 1 Key Spec to Factory
  • From Factory to Type 2 Secret Key
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure Example of How Application Retrieves "AES" Cipher Instance / Architecture of Service Provider Interface

Link to figure Example of How Application Retrieves "AES" Cipher Instance in Java Cryptography Architecture (JCA) Reference Guide

Link to figure Architecture of Service Provider Interface in How to Implement a Provider in the Java Cryptography Architecture

This figure consists of five boxes:

  • Application: This box contains the following pseudocode:

    c:Cipher.getInstance("AES");

  • JCA/JCE: This box contains the following list:

    • Signature
    • Message Digest
    • Key Script Generator
    • Key Factory
    • Algorithm Parameters
    • Cipher
    • Key Agreement
    • Key Generator
    • Secret Key Factory
    • MAC

  • CSP, CSP2, CSP3: These boxes represent cryptographic service providers

  • The fifth box represents CSP3. It contains the following headers and pseudocode:

    • Provider.class

      "Cipher.AES" -> "com.foo.AESCipher"

    • com.foo.AESCipher.class

      package com.foo:
  class AESCipher extends CipherSPi {
    .
    .
    .
  }

Arrows connect the boxes as follows:

  • From Application to JCA/JCE
  • From JCA/JCE to CSP1, CSP2, and CSP3 (the arrow branches)

A dotted line connects CSP3 to the headings Provider.class and com.foo.AESCipher.class

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure Example of Provider Subclass

Link to figure Example of Provider Subclass

This figure consists of a cylinder labeled Provider C and a box. Dotted lines are used to indicate that Provider C contains the contents of the box. The box contains the following headers and Java code:

  • provider.java

    public class fooJCA extends Provider {
    .
    .
    .
    put("MessageDigest.MD5", "com.foo.MD5");
    .
    .
    .
{}

  • com.foo.MD5.java

    package com.foo;
public class MD5 extends
    MessageDigestSpi {
    .
    .
    .
}
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure MD5 Message Digest Implementation / Options for Requesting an MD5 Message Digest Implementation

Link to figure MD5 Message Digest Implementation in Java Cryptography Architecture (JCA) Reference Guide.

Link to figure Options for Requesting an MD5 Message Digest Implementation in How to Implement a Provider.

This figure consists of two diagrams. The diagram to the left represents an application that requests and MD5 algorithm implementation without specifying a provider name. The diagram to the right represents an application that requests and MD5 algorithm implementation from a specific provider:

Without Specifying Provider Name

This figure consists of five cylinders arranged in three rows. These cylinders, from top to bottom, are labeled as follows:

  • Application
  • Provider Framework
  • This row contains three cylinders. Each cylinder in this row has an arrow pointing up towards the cylinder above it (Provider Framework):
    • ProviderA: Message Digest SHA-1 SHA-256 (this cylinder has an X on it)
    • ProviderB: Message Digest MD5 SHA-512 (this cylinder has a check mark on it)
    • ProviderC: Message Digest MD5 SHA-256

An arrow labeled MessageDigest_getInstance("MD5") with an arrow head labeled "MDS MessageDigest from ProviderB" starts from the Application cylinder and passes through the following objects:

  • Provider Framework cylinder
  • ProviderA arrow
  • ProviderB arrow
  • Provider Framework cylinder (again)

The arrow head points to the Application cylinder.

From Specific Provider

This figure consists of five cylinders arranged in three rows. These cylinders, from top to bottom, are labeled as follows:

  • Application
  • Provider Framework
  • This row contains three cylinders. Each cylinder in this row has an arrow pointing up towards the cylinder above it (Provider Framework):
    • ProviderA: Message Digest SHA-1 SHA-256
    • ProviderB: Message Digest MD5 SHA-512
    • ProviderC: Message Digest MD5 SHA-256 (this cylinder has a check mark on it)

An arrow labeled MessageDigest_getInstance("MD5", "ProviderC") with an arrow head labeled "MDS MessageDigest from ProviderC" starts from the Application cylinder and passes through the following objects:

  • Provider Framework cylinder
  • ProviderC arrow
  • Provider Framework cylinder (again)

The arrow head points to the Application cylinder.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure SSL Messages

Link to figure SSL Messages

This figure contains two lists of steps that are next to each other. The list to the left is labeled Client. The list to the right is labeled Server.

The Client list contains the following items:

  • 1. Client hello
  • 7. Certificate optional
  • 8. Client key exchange
  • 9. Certificate verify optional
  • 10. Change cipher spec
  • 11. Finished
  • 14. Encrypted data
  • 15. Close messages

Five empty lines separate item 1. Client hello and item 7. Certificate. Two empty lines separate item 11. Finished and item 14. Finished.

The Server list contains the following items:

  • 2. Server hello
  • 3. Certificate optional
  • 4. Certificate request optional
  • 5. Server key exchange optional
  • 6. Server hello done
  • 12. Change cipher spec
  • 13. Finished
  • 14. Encrypted data
  • 15. Close messages

Five empty lines separate item 6. Server hello done and item 12. Change cipher spec.

An arrow points from each item in the Client list to the corresponding empty line in the Server list. Similarly, an arrow points from each item in the Server list to the corresponding empty line in the Client list. For items 14 and 15 in the Client and Server lists, double-headed arrows connect them instead.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The Cipher Class

Link to figure The Cipher Class

This figure consists of boxes labeled as follows:

  • Key: Contains a box labeled Secret Key
  • Plaintext
  • These two boxes are attached to each other:
    • Cipher (AES): Box 1 of 2
    • Encrypt
  • Algorithm Parameters
  • Ciphertext
  • These two boxes are attached to each other:
    • Cipher (AES): Box 2 of 2
    • Decrypt
  • Plaintext

Labeled arrows connect these boxes:

  • update(): From Plaintext to the Cipher (AES) #1
  • doFinal(): From Plaintext to Encrypt
  • update(): From Ciphertext to the Cipher (AES) #2
  • doFinal(): From Ciphertext to Decrypt

Unlabeled arrows connect these boxes:

  • From Key to the Cipher (AES) #1 and Cipher (AES) #2 (the arrow branches)
  • From Cipher (AES) #1 to Algorithm Parameters
  • From Algorithm Parameters to the Cipher (AES) compartment of the Decrypt box
  • From Cipher (AES) #2 to Plaintext
  • From Decrypt to Plaintext
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The KeyAgreement Class

Link to figure The KeyAgreement Class

This figure is divided into halves by a dashed line. The top half is labeled Alice, and the bottom half is labeled Bob. The figure consists of boxes labeled as follows:

  • These boxes are in Alice's half:
    • Key: This box contains a box labeled Alice's Private
    • Key: This box contains a box labeled Bob's Public
    • Key Agreement (DH)
    • Bytes: This box has another label, Bytes
  • These boxes are in Bob's half:
    • Key: This box contains a box labeled Bob's Private
    • Key: This box contains a box labeled Alice's Public
    • Key Agreement (DH)
    • Bytes: This box has another label, Bytes

Labeled arrows connect these boxes:

  • These arrows are in Alice's half:
    • init(): From Alice's Private Key to Key Agreement (DH)
    • doPhase(): From Bob's Public Key to Key Agreement (DH)
    • generateSecret(): From Key Agreement (DH) to Bytes
  • These arrows are in Bob's half:
    • init(): From Bob's Private Key to Key Agreement (DH)
    • doPhase(): From Alice's Public Key to Key Agreement (DH)
    • generateSecret(): From Key Agreement (DH) to Bytes

A double-headed arrow joins the Bytes boxes in Alice's and Bob's halves. This arrow is labeled "Should be the same."

  • init(): From key length to Key Generator (AES)
  • init(): From AlgorithmParameterSpec to Key Generator (AES)
  • generateKey(): From Key Generator (AES) to Secret Pair
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The KeyFactory Class

Description of figure The KeyFactory Class

This figure consists of boxes labeled as follows:

  • Key Spec
  • Key Factory (RSA): Two boxes are labeled this
  • Private Key
  • Public Key
  • Key Spec

Labeled arrows connect these boxes:

  • generatePrivate(): From Key Factory (RSA) #1 to Private Key
  • generatePublic(): From Key Factory (RSA) #1 to Public Key
  • getKeySpec(): From Key Factory (RSA) #2 to Key Spec

Unlabeled arrows connect these boxes:

  • From Key Spec to Key Factory (RSA) #1
  • From Key to Key Factory (RSA) #2
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The KeyGenerator Class

Link to figure The KeyGenerator Class

This figure consists of boxes labeled as follows:

  • These boxes are joined by the word "or":
    • key length
    • AlgorithmParameterSpec
  • Key Generator (AES)
  • Secret Key

Labeled arrows connect these boxes:

  • init(): From key length to Key Generator (AES)
  • init(): From AlgorithmParameterSpec to Key Generator (AES)
  • generateKey(): From Key Generator (AES) to Secret Pair
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The KeyPairGenerator Class

Link to figure The KeyPairGenerator Class

This figure consists of boxes labeled as follows:

  • These boxes are joined by the word "or":
    • key length
    • AlgorithmParameterSpec
  • Key Pair Generator (DH)
  • Key Pair
  • Private Key
  • Public Key

Labeled arrows connect these boxes:

  • init(): From key length to Key Pair Generator (DH)
  • init(): From AlgorithmParameterSpec to Key Pair Generator (DH)
  • genKeyPair(): From Key Pair Generator (DH) to Key Pair
  • getPrivate(): From Key Pair to Private Key
  • getPublic(): From Key Pair to Public Key
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The KeyStore Class

Link to figure The KeyStore Class

This figure consists of a table labeled JKS and a cylinder labeled File.

The table JKS contains the following:

Alias | Type | Data
Brad | Secret Key | ...
Milton | Trusted Certificate | ...
Duke | Trusted Certificate | ...

An arrow labeled store() points from the JKS table to the File cylinder. An arrow labeled load() points from the File cylinder to the JKS cylinder.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The Mac Class

Link to figure The Mac Class

This figure consists of boxes labeled as follows:

  • Data: Two boxes are labeled this
  • MAC (HmacMD5): Two boxes are labeled this
  • Shared Secret Key
  • Signal Digest Hash: Two boxes are labeled this
  • If data was the same, the hash is the same

Labeled arrows connect these boxes:

  • update(): From Data #1 to MAC (HmacMD5) #1
  • doFinal(): From Data #1 to MAC (HmacMD5) #1
  • update(): From Data #2 to MAC (HmacMD5) #2
  • doFinal(): From Data #2 to MAC (HmacMD5) #2

Unlabeled arrows connect these boxes:

  • From Shared Secret Key to MAC (HmacMD5) (two separate arrows)
  • From MAC (HmacMD5) #1 to Signed Digest Hash #1
  • From MAC (HmacMD5) #2 to Signed Digest Hash #2
  • From Signed Digest Hash #1 to If data was the same, the hash is the same
  • From Signed Digest Hash #2 to If data was the same, the hash is the same
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The MessageDigest Class

Description of figure The MessageDigest Class

This figure consists of three boxes labeled as follows:

  • Data
  • Message Digest (MD5)
  • Digest/Hash

Labeled arrows connect these boxes:

  • update(): From Data to Message Digest (MD5)
  • digest(): From Message Digest (MD5) to Digest/Hash
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The SecretKeyFactory Class

Description of figure The SecretKeyFactory Class

This figure consists of boxes labeled as follows:

  • Key Spec: Two boxes are labeled this
  • Secret Key Factory (DES): This box has a sublabel, generateSecret()
  • Secret Key: Two boxes are labeled this
  • Secret Key Factory (DES): This box has a sublabel, getKeySpec()

Unlabeled arrows connect these boxes:

  • From Key Spec #1 to Secret Key Factory (DES), generateSecret()
  • From Secret Key Factory (DES), generateSecret() to Secret Key #1
  • From Secret Key #2 to Secret Key Factory (DES), getKeySpec()
  • From Secret Key Factory (DES), getKeySpec() to Key Spec #2
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The SecureRandom Class

Link to figure The SecureRandom Class

This figure consists of three boxes labeled as follows:

  • Seed
  • SecureRandom (SHA1PRNG)
  • data

Labeled arrows connect these boxes:

  • setSeed(): From Seed to SecureRandom (SHA1PRNG)
  • digest() and nextBytes(): From SecureRandom (SHA1PRNG) to data
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of Figure The Signature Class

Link to figure The Signature Class

This figure consists of boxes labeled as follows:

  • Generated by a Key Pair Generator: Contains a box labeled Private Key/Public Key
  • Data
  • These two boxes are attached to each other:
    • Signature (MD5withRSA): Box 1 of 2
    • Sign
  • Signature Bytes
  • These two boxes are attached to each other:
    • Signature (MD5withRSA): Box 2 of 2
    • Verify
  • Yes/No

Labeled arrows connect these boxes:

  • update(): From Data to Signature (MD5withRSA) #1
  • update(): From Data to Signature (MD5withRSA) #2
  • sign(): From Signature (MD5withRSA) #1 to Signature Bytes
  • verify(): From Signature Bytes Data to Signature (MD5withRSA) #2

Unlabeled arrows connect these boxes:

  • From Generated by a Key Pair Generator to Signature (MD5withRSA) #1 and Signature (MD5withRSA) #2 (the arrow branches)
  • From Signature (MD5withRSA) #2 to Yes/No
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Reference Guide

Documentation Contents

Java Authentication and Authorization Service (JAAS) Reference Guide

This guide covers the following topics:

Skip Navigation Links
  • Introduction
    • Who Should Read This Document
    • Related Documentation
  • Core Classes and Interfaces
    • Common Classes
      • Subject
      • Principals
      • Credentials
    • Authentication Classes and Interfaces
      • LoginContext
      • LoginModule
      • CallbackHandler
      • Callback
    • Authorization Classes
      • Policy
      • AuthPermission
      • PrivateCredentialPermission
  • JAAS Tutorials and Sample Programs
  • Appendix A: JAAS Settings in the java.security Security Properties File
  • Appendix B: Example Login Configurations

Introduction

The Java Authentication and Authorization Service (JAAS) was introduced as an optional package (extension) to the Java 2 SDK, Standard Edition (J2SDK), v 1.3. JAAS was integrated into the J2SDK 1.4.

JAAS can be used for two purposes:

  • for authentication of users, to reliably and securely determine who is currently executing Java code, regardless of whether the code is running as an application, an applet, a bean, or a servlet; and
  • for authorization of users to ensure they have the access control rights (permissions) required to do the actions performed.

JAAS implements a Java version of the standard Pluggable Authentication Module (PAM) framework. See Making Login Services Independent from Authentication Technologies for further information.

Traditionally Java has provided codesource-based access controls (access controls based on where the code originated from and who signed the code). It lacked, however, the ability to additionally enforce access controls based on who runs the code. JAAS provides a framework that augments the Java security architecture with such support.

JAAS authentication is performed in a pluggable fashion. This permits applications to remain independent from underlying authentication technologies. New or updated authentication technologies can be plugged under an application without requiring modifications to the application itself. Applications enable the authentication process by instantiating a LoginContext object, which in turn references a Configuration to determine the authentication technology(ies), or LoginModule(s), to be used in performing the authentication. Typical LoginModules may prompt for and verify a user name and password. Others may read and verify a voice or fingerprint sample.

Once the user or service executing the code has been authenticated, the JAAS authorization component works in conjunction with the core Java SE access control model to protect access to sensitive resources. Unlike in the J2SDK 1.3 and earlier, where access control decisions are based solely on code location and code signers (a CodeSource), in the J2SDK 1.4 access control decisions are based both on the executing code's CodeSource and on the user or service running the code, who is represented by a Subject object. The Subject is updated by a LoginModule with relevant Principals and credentials if authentication succeeds.

Who Should Read This Document

This document is intended for experienced developers who require the ability to design applications constrained by a CodeSource-based and Subject-based security model. It is also intended to be read by LoginModule developers (developers implementing an authentication technology) prior to reading the JAAS LoginModule Developer's Guide.

You may wish to first read the JAAS Authentication and JAAS Authorization tutorials to get an overview of how to use JAAS and to see sample code in action, and then return to this document for further information.

Related Documentation

This document assumes you have already read the following:

  • Java SE Security Architecture
  • JAAS white paper
  • Java SE Security Tutorial

A supplement to this guide is the JAAS LoginModule Developer's Guide, intended for experienced programmers who require the ability to write a LoginModule implementing an authentication technology.

If you wish to learn more about the standard Pluggable Authentication Module (PAM) framework (JAAS implements a Java version of PAM), see Making Login Services Independent from Authentication Technologies.

The following tutorials for JAAS authentication and authorization can be run by everyone:

  • JAAS Authentication Tutorial
  • JAAS Authorization Tutorial

Similar tutorials for JAAS authentication and authorization, but which demonstrate the use of a Kerberos LoginModule and thus which require a Kerberos installation, can be found at

  • JAAS Authentication
  • JAAS Authorization

These two tutorials are a part of the Java GSS-API and JAAS sequence of tutorials that utilize Kerberos as the underlying technology for authentication and secure communication.

Core Classes and Interfaces

The JAAS-related core classes and interfaces can be broken into three categories: Common, Authentication, and Authorization.
  • Common Classes
    • Subject, Principal, Credential (actually, any Object)
  • Authentication Classes and Interfaces
    • LoginContext, LoginModule, CallbackHandler, Callback
  • Authorization Classes
    • Policy, AuthPermission, PrivateCredentialPermission

Common Classes

Common classes are those shared by both the JAAS authentication and authorization components.

The key JAAS class is javax.security.auth.Subject, which represents a grouping of related information for a single entity such as a person. It encompasses the entity's Principals, public credentials, and private credentials.

Note that the java.security.Principal interface is used to represent a Principal. Also note that a credential, as defined by JAAS, may be any Object.

Subject

To authorize access to resources, applications first need to authenticate the source of the request. The JAAS framework defines the term subject to represent the source of a request. A subject may be any entity, such as a person or a service. Once the subject is authenticated, a javax.security.auth.Subject is populated with associated identities, or Principals. A Subject may have many Principals. For example, a person may have a name Principal ("John Doe") and a SSN Principal ("123-45-6789"), which distinguish it from other subjects.

A Subject may also own security-related attributes, which are referred to as credentials. Sensitive credentials that require special protection, such as private cryptographic keys, are stored within a private credential Set. Credentials intended to be shared, such as public key certificates, are stored within a public credential Set. Different permissions (described below) are required to access and modify the different credential Sets.

Subjects are created using these constructors:

    public Subject();

    public Subject(boolean readOnly, Set principals,
                   Set pubCredentials, Set privCredentials);
The first constructor creates a Subject with empty (non-null) Sets of Principals and credentials. The second constructor creates a Subject with the specified Sets of Principals and credentials. It also has a boolean argument which can be used to make the Subject read-only. In a read-only Subject, the Principal and credential Sets are immutable.

An application writer does not have to instantiate a Subject. If the application instantiates a LoginContext and does not pass a Subject to the LoginContext constructor, the LoginContext instantiates a new empty Subject. See the LoginContext section.

If a Subject was not instantiated to be in a read-only state, it can be set read-only by calling the following method:

    public void setReadOnly();
A javax.security.auth.AuthPermission with target "setReadOnly" is required to invoke this method. Once in a read-only state, any attempt to add or remove Principals or credentials will result in an IllegalStateException being thrown.

The following method may be called to test a Subject's read-only state:

    public boolean isReadOnly();

To retrieve the Principals associated with a Subject, two methods are available:

    public Set getPrincipals();
    public Set getPrincipals(Class c);

The first method returns all Principals contained in the Subject, while the second method only returns those Principals that are an instance of the specified Class c, or an instance of a subclass of Class c. An empty set will be returned if the Subject does not have any associated Principals.

To retrieve the public credentials associated with a Subject, these methods are available:

    public Set getPublicCredentials();
    public Set getPublicCredentials(Class c);

The behavior of these methods is similar to that for the getPrincipals methods, except in this case the public credentials are being obtained.

To access private credentials associated with a Subject, the following methods are available:

    public Set getPrivateCredentials();
    public Set getPrivateCredentials(Class c);

The behavior of these methods is similar to that for the getPrincipals and getPublicCredentials methods.

To modify or operate upon a Subject's Principal Set, public credential Set, or private credential Set, callers use the methods defined in the java.util.Set class. The following example demonstrates this:

    Subject subject;
    Principal principal;
    Object credential;

    . . .

    // add a Principal and credential to the Subject
    subject.getPrincipals().add(principal);
    subject.getPublicCredentials().add(credential);

Note: An AuthPermission with target "modifyPrincipals", "modifyPublicCredentials", or "modifyPrivateCredentials" is required to modify the respective Sets. Also note that only the sets returned via the getPrincipals(), getPublicCredentials(), and getPrivateCredentials() methods with no arguments are backed by the Subject's respective internal sets. Therefore any modification to the returned set affects the internal sets as well. The sets returned via the getPrincipals(Class c), getPublicCredentials(Class c), and getPrivateCredentials(Class c) methods are not backed by the Subject's respective internal sets. A new set is created and returned for each such method invocation. Modifications to these sets will not affect the Subject's internal sets.

In order to iterate through a Set of private credentials, you need a javax.security.auth.PrivateCredentialPermission to access each credential. See the PrivateCredentialPermission API documentation for further information.

A Subject may be associated with an AccessControlContext (see the doAs and doAsPrivileged method descriptions below). The following method returns the Subject associated with the specified AccessControlContext, or null if no Subject is associated with the specified AccessControlContext.

    public static Subject getSubject(final AccessControlContext acc);

An AuthPermission with target "getSubject" is required to call Subject.getSubject.

The Subject class also includes the following methods inherited from java.lang.Object.

    public boolean equals(Object o);
    public String toString();
    public int hashCode();

The doAs methods for performing an action as a particular Subject

The following static methods may be called to perform an action as a particular Subject:
    public static Object
        doAs(final Subject subject,
             final java.security.PrivilegedAction action);

    public static Object
        doAs(final Subject subject,
             final java.security.PrivilegedExceptionAction action)
             throws java.security.PrivilegedActionException;

Both methods first associate the specified subject with the current Thread's AccessControlContext, and then execute the action. This achieves the effect of having the action run as the subject. The first method can throw runtime exceptions but normal execution has it returning an Object from the run method of its action argument. The second method behaves similarly except that it can throw a checked exception from its PrivilegedExceptionAction run method. An AuthPermission with target "doAs" is required to call the doAs methods.

Subject.doAs Example

Here is an example utilizing the first doAs method. Assume that someone named "Bob" has been authenticated by a LoginContext (see the LoginContext section) and as a result a Subject was populated with a Principal of class com.ibm.security.Principal, and that Principal has the name "BOB". Also assume that a SecurityManager has been installed, and that the following exists in the access control policy (see the Policy section for more details on the policy file).

    // grant "BOB" permission to read the file "foo.txt"
    grant Principal com.ibm.security.Principal "BOB" {
        permission java.io.FilePermission "foo.txt", "read";
    };

Here is the sample application code:

    class ExampleAction implements java.security.PrivilegedAction {
        public Object run() {
            java.io.File f = new java.io.File("foo.txt");

            // the following call invokes a security check
            if (f.exists()) {
                System.out.println("File foo.txt exists");
            }
            return null;
        }
    }

    public class Example1 {
        public static void main(String[] args) {

            // Authenticate the subject, "BOB".
            // This process is described in the
            // LoginContext section.

            Subject bob;
            // Set bob to the Subject created during the
            // authentication process

            // perform "ExampleAction" as "BOB"
            Subject.doAs(bob, new ExampleAction());
        }
    }

During execution, ExampleAction will encounter a security check when it makes a call to f.exists(). However, since ExampleAction is running as "BOB", and the policy (above) grants the necessary FilePermission to "BOB", the ExampleAction will pass the security check. If the grant statement in the policy is altered (adding an incorrect CodeBase or changing the Principal to "MOE", for example), then a SecurityException will be thrown.

The doAsPrivileged methods

The following methods also perform an action as a particular Subject.

    public static Object doAsPrivileged(
        final Subject subject,
        final java.security.PrivilegedAction action,
        final java.security.AccessControlContext acc);

    public static Object doAsPrivileged(
        final Subject subject,
        final java.security.PrivilegedExceptionAction action,
        final java.security.AccessControlContext acc)
        throws java.security.PrivilegedActionException;

An AuthPermission with target "doAsPrivileged" is required to call the doAsPrivileged methods.

doAs versus doAsPrivileged

The doAsPrivileged methods behave exactly the same as the doAs methods, except that instead of associating the provided Subject with the current Thread's AccessControlContext, they use the provided AccessControlContext. In this way, actions can be restricted by AccessControlContexts different from the current one.

An AccessControlContext contains information about all the code executed since the AccessControlContext was instantiated, including the code location and the permissions the code is granted by the policy. In order for an access control check to succeed, the policy must grant each code item referenced by the AccessControlContext the required permissions.

If the AccessControlContext provided to doAsPrivileged is null, then the action is not restricted by a separate AccessControlContext. One example where this may be useful is in a server environment. A server may authenticate multiple incoming requests and perform a separate doAs operation for each request. To start each doAs action "fresh," and without the restrictions of the current server AccessControlContext, the server can call doAsPrivileged and pass in a null AccessControlContext.

Principals

As mentioned previously, Principals may be associated with a Subject if authentication is successful. Principals represent Subject identities, and must implement the java.security.Principal and java.io.Serializable interfaces. The Subject section describes ways to update the Principals associated with a Subject.

Credentials

Public and private credential classes are not part of the core JAAS class library. Any class can represent a credential. Developers, however, may elect to have their credential classes implement two interfaces related to credentials: Refreshable and Destroyable.

Refreshable

The javax.security.auth.Refreshable interface provides the capability for a credential to refresh itself. For example, a credential with a particular time-restricted lifespan may implement this interface to allow callers to refresh the time period for which it is valid. The interface has two abstract methods:

    boolean isCurrent();
This method determines whether the credential is current or valid.
    void refresh() throws RefreshFailedException;
This method updates or extends the validity of the credential. The method implementation should perform an AuthPermission("refreshCredential") security check to ensure the caller has permission to refresh the credential.

Destroyable

The javax.security.auth.Destroyable interface provides the capability of destroying the contents within a credential. The interface has two abstract methods:

    boolean isDestroyed();
Determines whether the credential has been destroyed.
    void destroy() throws DestroyFailedException;
Destroys and clears the information associated with this credential. Subsequent calls to certain methods on this credential will result in an IllegalStateException being thrown. The method implementation should perform an AuthPermission("destroyCredential") security check to ensure the caller has permission to destroy the credential.

Authentication Classes and Interfaces

To authenticate a subject (user or service), the following steps are performed:
  1. An application instantiates a LoginContext.
  2. The LoginContext consults a Configuration to load all of the LoginModules configured for that application.
  3. The application invokes the LoginContext's login method.
  4. The login method invokes all of the loaded LoginModules. Each LoginModule attempts to authenticate the subject. Upon success, LoginModules associate relevant Principals and credentials with a Subject object that represents the subject being authenticated.
  5. The LoginContext returns the authentication status to the application.
  6. If authentication succeeded, the application retrieves the Subject from the LoginContext.

The authentication classes are described below.

LoginContext

The javax.security.auth.login.LoginContext class provides the basic methods used to authenticate subjects, and provides a way to develop an application independent of the underlying authentication technology. The LoginContext consults a Configuration to determine the authentication services, or LoginModule(s), configured for a particular application. Therefore, different LoginModules can be plugged in under an application without requiring any modifications to the application itself.

LoginContext offers four constructors from which to choose:

    public LoginContext(String name) throws LoginException;

    public LoginContext(String name, Subject subject) throws LoginException;

    public LoginContext(String name, CallbackHandler callbackHandler)
           throws LoginException

    public LoginContext(String name, Subject subject,
           CallbackHandler callbackHandler) throws LoginException
All of the constructors share a common parameter: name. This argument is used by the LoginContext as an index into the login Configuration to determine which LoginModules are configured for the application instantiating the LoginContext. Constructors that do not take a Subject as an input parameter instantiate a new Subject. Null inputs are disallowed for all constructors. Callers require an AuthPermission with target "createLoginContext.<name>" to instantiate a LoginContext. Here, <name> refers to the name of the login configuration entry that the application references in the name parameter for the LoginContext instantiation.

See the CallbackHandler section for information on what a CallbackHandler is and when you may need one.

Actual authentication occurs with a call to the following method:

    public void login() throws LoginException;

When login is invoked, all of the configured LoginModules are invoked to perform the authentication. If the authentication succeeded, the Subject (which may now hold Principals, public credentials, and private credentials) can be retrieved by using the following method:

     public Subject getSubject();

To logout a Subject and remove its authenticated Principals and credentials, the following method is provided:

    public void logout() throws LoginException;

The following code sample demonstrates the calls necessary to authenticate and logout a Subject:

    // let the LoginContext instantiate a new Subject
    LoginContext lc = new LoginContext("entryFoo");
    try {
        // authenticate the Subject
        lc.login();
        System.out.println("authentication successful");

        // get the authenticated Subject
        Subject subject = lc.getSubject();

        ...

        // all finished -- logout
        lc.logout();
    } catch (LoginException le) {
        System.err.println("authentication unsuccessful: " +
            le.getMessage());
    }

LoginModule

The LoginModule interface gives developers the ability to implement different kinds of authentication technologies that can be plugged in under an application. For example, one type of LoginModule may perform a user name/password-based form of authentication. Other LoginModules may interface to hardware devices such as smart cards or biometric devices.

Note: If you are an application writer, you do not need to understand the workings of LoginModules. All you have to know is how to write your application and specify configuration information (such as in a login configuration file) such that the application will be able to utilize the LoginModule specified by the configuration to authenticate the user.

If, on the other hand, you are a programmer who wishes to write a LoginModule implementing an authentication technology, see the JAAS LoginModule Developer's Guide for detailed step-by-step instructions.

CallbackHandler

In some cases a LoginModule must communicate with the user to obtain authentication information. LoginModules use a javax.security.auth.callback.CallbackHandler for this purpose. Applications implement the CallbackHandler interface and pass it to the LoginContext, which forwards it directly to the underlying LoginModules. A LoginModule uses the CallbackHandler both to gather input from users (such as a password or smart card pin number) or to supply information to users (such as status information). By allowing the application to specify the CallbackHandler, underlying LoginModules can remain independent of the different ways applications interact with users. For example, the implementation of a CallbackHandler for a GUI application might display a window to solicit input from a user. On the other hand, the implementation of a CallbackHandler for a non-GUI tool might simply prompt the user for input directly from the command line.

CallbackHandler is an interface with one method to implement:
     void handle(Callback[] callbacks)
         throws java.io.IOException, UnsupportedCallbackException;

The LoginModule passes the CallbackHandler handle method an array of appropriate Callbacks, for example a NameCallback for the user name and a PasswordCallback for the password, and the CallbackHandler performs the requested user interaction and sets appropriate values in the Callbacks. For example, to process a NameCallback, the CallbackHandler may prompt for a name, retrieve the value from the user, and call the NameCallback's setName method to store the name.

The CallbackHandler documentation has a lengthy example not included in this document that readers may want to examine.

Callback

The javax.security.auth.callback package contains the Callback interface as well as several implementations. LoginModules may pass an array of Callbacks directly to the handle method of a CallbackHandler.

Please consult the various Callback APIs for more information on their use.

Authorization Classes

To make JAAS authorization take place, granting access control permissions based not just on what code is running but also on who is running it, the following is required:

  • The user must be authenticated, as described in the LoginContext section.
  • The Subject that is the result of authentication must be associated with an access control context, as described in the Subject section.
  • Principal-based entries must be configured in the security policy, as described below.

The Policy abstract class and the authorization-specific classes AuthPermission and PrivateCredentialPermission are described below.

Policy

The java.security.Policy class is an abstract class for representing the system-wide access control policy. The Policy API was upgraded in the J2SDK 1.4 to support Principal-based queries.

As a default, the J2SDK provides a file-based subclass implementation, which was upgraded to support Principal-based grant entries in policy files.

Policy files and the structure of entries within them are described in Default Policy Implementation and Policy File Syntax.

AuthPermission

The javax.security.auth.AuthPermission class encapsulates the basic permissions required for JAAS. An AuthPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

In addition to its inherited methods (from the java.security.Permission class), an AuthPermission has two public constructors:

    public AuthPermission(String name);
    public AuthPermission(String name, String actions);
The first constructor creates a new AuthPermission with the specified name. The second constructor also creates a new AuthPermission object with the specified name, but has an additional actions argument which is currently unused and should be null. This constructor exists solely for the Policy object to instantiate new Permission objects. For most other code, the first constructor is appropriate.

Currently the AuthPermission object is used to guard access to the Policy, Subject, LoginContext, and Configuration objects. Please refer to the AuthPermission javadocs for the list of valid names that are supported.

PrivateCredentialPermission

The javax.security.auth.PrivateCredentialPermission class protects access to a Subject's private credentials and provides one public constructor:

     public PrivateCredentialPermission(String name, String actions);
Please refer to the PrivateCredentialPermission javadocs for more detailed information on this class.

JAAS Tutorials and Sample Programs

The JAAS Authentication and JAAS Authorization tutorials contain the following samples:

  • SampleAcn.java is a sample application demonstrating JAAS authentication.
  • SampleAzn.java is a sample application used by the authorization tutorial. It demonstrates both authentication and authorization.
  • sample_jaas.config is a sample login configuration file used by both tutorials.
  • sampleacn.policy is a sample policy file granting permissions required by the code for the authentication tutorial.
  • sampleazn.policy is a sample policy file granting permissions required by the code for the authorization tutorial.
  • SampleLoginModule.java is the class specified by the tutorials' login configuration file (sample_jaas.config) as the class implementing the desired underlying authentication. SampleLoginModule's user authentication consists of simply verifying that the name and password specified by the user have specific values.
  • SamplePrincipal.java is a sample class implementing the Principal interface. It is used by SampleLoginModule.

See the tutorials for detailed information about the applications, the policy files, and the login configuration file.

Application writers do not need to understand the code for SampleLoginModule.java or SamplePrincipal.java, as explained in the tutorials. Programmers who wish to write LoginModules can learn how to do so by reading the JAAS LoginModule Developer's Guide.

Appendix A: JAAS Settings in the java.security Security Properties File

A number of JAAS-related settings can be configured in the java.security master security properties file, which is located in the lib/security directory of the Java runtime.

JAAS adds two new security properties to java.security:

  • login.configuration.provider
  • login.config.url.n

The following pre-existing properties are also relevant for JAAS users:

  • policy.provider
  • policy.url.n

The following example demonstrates how to configure these properties. In this example, we leave the values provided in the default java.security file for the policy.provider, policy.url.n, and login.configuration.provider properties. The default java.security file also lists a value for the login.config.url.n property, but it is commented out. In the example below, it is not commented.

...

#
# Class to instantiate as the javax.security.auth.login.Configuration
# provider.
#
login.configuration.provider=com.sun.security.auth.login.ConfigFile

#
# Default login configuration file
#
login.config.url.1=file:${user.home}/.java.login.config

#
# Class to instantiate as the system Policy. This is the name of the class
# that will be used as the Policy object.
#
policy.provider=sun.security.provider.PolicyFile

# The default is to have a single system-wide policy file,
# and a policy file in the user's home directory.
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

...

Note: Modifications made to this file may be overwritten by subsequent JRE updates. However, an alternate java.security properties file may be specified from the command line via the system property java.security.properties=<URL>. This properties file appends to the system properties file. If both properties files specify values for the same key, the value from command-line properties file is selected, as it is the last one loaded.

Also, specifying java.security.properties==<URL> (using two equals signs), then that properties file will completely override the system properties file.

To disable the ability to specify an additional properties file from the command line, set the key security.overridePropertiesFile to false in the system properties file. It is set to true by default.

Login Configuration Provider

The default JAAS login configuration implementation provided by Oracle gets its configuration information from files and expects the information to be provided in a specific format shown in the tutorials.

The default JAAS login configuration implementation can be replaced by specifying the alternative provider class implementation in the login.configuration.provider property.

For example:

  login.configuration.provider=com.foo.Config
If the Security property login.configuration.provider is not found, or is left unspecified, then it is set to the default value:
  login.configuration.provider=com.sun.security.auth.login.ConfigFile

Note that there is no means to dynamically set the login configuration provider from the command line.

Login Configuration URLs

If you are using a login configuration implementation that expects the configuration information to be specified in files (as does the default implementation from Oracle), the location of the login configuration file(s) can be statically set by specifying their respective URLs in the login.config.url.n property. 'n' is a consecutively numbered integer starting with 1. If multiple configuration files are specified (if n >= 2), they will be read and unioned into one single configuration.

For example:

  login.config.url.1=file:C:/config/.java.login.config
  login.config.url.2=file:C:/users/foo/.foo.login.config

If the location of the configuration files is not set in the java.security properties file, and also is not specified dynamically from the command line (via the -Djava.security.auth.login.config option), JAAS attempts to load a default configuration from

file:${user.home}/.java.login.config

Policy Provider

The default policy implementation can be replaced by specifying the alternative provider class implementation in the policy.provider property.

For example:

  policy.provider=com.foo.Policy
If the Security property policy.provider is not found, or is left unspecified, then the Policy is set to the default value:
  policy.provider=sun.security.provider.PolicyFile

Note that there is no means to dynamically set the policy provider from the command line.

Policy File URLs

The location of the access control policy files can be statically set by specifying their respective URLs in the auth.policy.url.n property. 'n' is a consecutively numbered integer starting with 1. If multiple policies are specified (if n >= 2), they will be read and unioned into one single policy.

For example:

  policy.url.1=file:C:/policy/.java.policy
  policy.url.2=file:C:/users/foo/.foo.policy

If the location of the policy file(s) is not set in the java.security properties file, and is not specified dynamically from the command line (via the -Djava.security.policy option), the access control policy defaults to the same policy as that of the system policy file installed with the J2SDK. That policy file

  • grants all permissions to standard extensions
  • allows anyone to listen on un-privileged ports
  • allows any code to read certain "standard" properties that are not security-sensitive, such as the "os.name" and "file.separator" properties.

Appendix B: Example Login Configurations

Login configurations are located using the login.config.url.n security properties found in the java.security file. For more information about this property and the location of the java.security file, see Appendix A.

The default Configuration implementation, ConfigFile, gets its configuration information from login configuration files. For details about the default login Configuration implementation provided with JAAS, please consult the javadocs for the com.sun.security.auth.login.ConfigFile class.

The following is a sample login configuration file.

    Login1 {
       sample.SampleLoginModule required debug=true;
    };

    Login2 {
       sample.SampleLoginModule required;
       com.sun.security.auth.module.NTLoginModule sufficient;
       com.foo.SmartCard requisite debug=true;
       com.foo.Kerberos optional debug=true;
    };

The application Login1 only has one configured LoginModule, SampleLoginModule. Therefore, an attempt by Login1 to authenticate a subject (user or service) will be successful if and only if the SampleLoginModule succeeds.

The authentication logic for the application Login2 is easier to explain with the table below. Note: the required, sufficient, requisite, and optional flags are described in the Configuration javadocs.

Login2 Authentication Status
Module Class | Flag | Authentication Attempt 1 | Authentication Attempt 2 | Authentication Attempt 3 | Authentication Attempt 4 | Authentication Attempt 5 | Authentication Attempt 6 | Authentication Attempt 7 | Authentication Attempt 8
SampleLoginModule | required | pass | pass | pass | pass | fail | fail | fail | fail
NTLoginModule | sufficient | pass | fail | fail | fail | pass | fail | fail | fail
SmartCard | requisite | * | pass | pass | fail | * | pass | pass | fail
Kerberos | optional | * | pass | fail | * | * | pass | fail | *
Overall Authentication | not applicable | pass | pass | pass | fail | fail | fail | fail | fail
* = trivial value due to control returning to the application because a previous requisite module failed or a previous sufficient module succeeded.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


LoginModule Developer's Guide

Documentation Contents

Java Authentication and Authorization Service (JAAS): LoginModule Developer's Guide

  • Overview
    • Who Should Read This Document
    • Related Documentation
    • Introduction
  • Steps to Implement a LoginModule
    • Step 1: Understand the Authentication Technology
    • Step 2: Name the LoginModule Implementation
    • Step 3: Implement the Abstract LoginModule Methods
    • Step 4: Choose or Write a Sample Application
    • Step 5: Compile the LoginModule and Application
    • Step 6: Prepare for Testing
    • Step 7: Test Use of the LoginModule
    • Step 8: Document Your LoginModule Implementation
    • Step 9: Make LoginModule JAR File and Documents Available

Overview

The Java Authentication and Authorization Service (JAAS) was introduced as an optional package to the Java 2 SDK, Standard Edition (J2SDK), v 1.3. JAAS was integrated into the Java Standard Edition Development Kit starting with J2SDK 1.4.

JAAS provides subject-based authorization on authenticated identities. This document focuses on the authentication aspect of JAAS, specifically the LoginModule interface.

Who Should Read This Document

This document is intended for experienced programmers who require the ability to write a LoginModule implementing an authentication technology.

Related Documentation

This document assumes you have already read the following:

  • JAAS Reference Guide

It also discusses various classes and interfaces in the JAAS API. Please reference the javadocs for the JAAS API specification for more detailed information:

  • javax.security.auth Package
  • javax.security.auth.callback Package
  • javax.security.auth.kerberos Package
  • javax.security.auth.login Package
  • javax.security.auth.spi Package
  • javax.security.auth.x500 Package
  • com.sun.security.auth Package
  • com.sun.security.auth.callback Package
  • com.sun.security.auth.login Package
  • com.sun.security.auth.module Package

The following tutorials for JAAS authentication and authorization can be run by everyone:

  • JAAS Authentication Tutorial
  • JAAS Authorization Tutorial

Similar tutorials for JAAS authentication and authorization, but which demonstrate the use of a Kerberos LoginModule and thus which require a Kerberos installation, can be found at

  • JAAS Authentication
  • JAAS Authorization

These two tutorials are a part of the Java GSS-API and JAAS sequence of tutorials that utilize Kerberos as the underlying technology for authentication and secure communication.

Introduction

The LoginModule documentation describes the interface that must be implemented by authentication technology providers. LoginModules are plugged in under applications to provide a particular type of authentication.

While applications write to the LoginContext Application Programming Interface (API), authentication technology providers implement the LoginModule interface. A Configuration specifies the LoginModule(s) to be used with a particular login application. Different LoginModules can be plugged in under the application without requiring any modifications to the application itself.

The LoginContext is responsible for reading the Configuration and instantiating the specified LoginModules. Each LoginModule is initialized with a Subject, a CallbackHandler, shared LoginModule state, and LoginModule-specific options.

The Subject represents the user or service currently being authenticated and is updated by a LoginModule with relevant Principals and credentials if authentication succeeds. LoginModules use the CallbackHandler to communicate with users (to prompt for user names and passwords, for example), as described in the login method description. Note that the CallbackHandler may be null. A LoginModule that requires a CallbackHandler to authenticate the Subject may throw a LoginException if it was initialized with a null CallbackHandler. LoginModules optionally use the shared state to share information or data among themselves.

The LoginModule-specific options represent the options configured for this LoginModule in the login Configuration. The options are defined by the LoginModule itself and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities. Options are defined using a key-value syntax, such as debug=true. The LoginModule stores the options as a Map so that the values may be retrieved using the key. Note that there is no limit to the number of options a LoginModule chooses to define.

The calling application sees the authentication process as a single operation invoked via a call to the LoginContext's login method. However, the authentication process within each LoginModule proceeds in two distinct phases. In the first phase of authentication, the LoginContext's login method invokes the login method of each LoginModule specified in the Configuration. The login method for a LoginModule performs the actual authentication (prompting for and verifying a password for example) and saves its authentication status as private state information. Once finished, the LoginModule's login method returns true (if it succeeded) or false (if it should be ignored), or it throws a LoginException to specify a failure. In the failure case, the LoginModule must not retry the authentication or introduce delays. The responsibility of such tasks belongs to the application. If the application attempts to retry the authentication, each LoginModule's login method will be called again.

In the second phase, if the LoginContext's overall authentication succeeded (calls to the relevant required, requisite, sufficient and optional LoginModules' login methods succeeded), then the commit method for each LoginModule gets invoked. (For an explanation of the LoginModule flags required, requisite, sufficient and optional, please consult the javax.security.auth.login.Configuration documentation and Appendix B: Login Configuration Files in the JAAS Reference Guide.) The commit method for a LoginModule checks its privately saved state to see if its own authentication succeeded. If the overall LoginContext authentication succeeded and the LoginModule's own authentication succeeded, then the commit method associates the relevant Principals (authenticated identities) and credentials (authentication data such as cryptographic keys) with the Subject.

If the LoginContext's overall authentication failed (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules' login methods did not succeed), then the abort method for each LoginModule gets invoked. In this case, the LoginModule removes/destroys any authentication state originally saved.

Logging out a Subject involves only one phase. The LoginContext invokes the LoginModule's logout method. The logout method for the LoginModule then performs the logout procedures, such as removing Principals or credentials from the Subject, or logging session information.

Steps to Implement a LoginModule

The steps required in order to implement and test a LoginModule are the following:

  • Step 1: Understand the Authentication Technology
  • Step 2: Name the LoginModule Implementation
  • Step 3: Implement the Abstract LoginModule Methods
  • Step 4: Choose or Write a Sample Application
  • Step 5: Compile the LoginModule and Application
  • Step 6: Prepare for Testing
    • Step 6a: Place Your LoginModule and Application Code in JAR Files
    • Step 6b: Decide Where to Store the JAR Files
    • Step 6c: Set LoginModule and Application JAR File Permissions
    • Step 6d: Create a Configuration Referencing the LoginModule
  • Step 7: Test Use of the LoginModule
  • Step 8: Document Your LoginModule Implementation
  • Step 9: Make LoginModule JAR File and Documents Available

The steps required to implement and test a new LoginModule follow. Please reference the SampleLoginModule and other files described in the JAAS Reference Guide for examples of what may be done for the various steps.

Step 1: Understand the Authentication Technology

The first thing you need to do is understand the authentication technology to be implemented by your new LoginModule provider, and determine its requirements.

One thing you will need to determine is whether or not your LoginModule will require some form of user interaction (retrieving a user name and password, for example). If so, you will need to become familiar with the CallbackHandler interface and the javax.security.auth.callback package. In that package you will find several possible Callback implementations to use. (Alternatively, you can create your own Callback implementations.) The LoginModule will invoke the CallbackHandler specified by the application itself and passed to the LoginModule's initialize method. The LoginModule passes the CallbackHandler an array of appropriate Callbacks. See the login method in Step 3.

Note that it is possible for LoginModule implementations not to have any end-user interactions. Such LoginModules would not need to access the callback package.

Another thing you should determine is what configuration options you want to make available to the user, who specifies configuration information in whatever form the current Configuration implementation expects (for example, in files). For each option, decide the option name and possible values. For example, if a LoginModule may be configured to consult a particular authentication server host, decide on the option's key name ("auth_server", for example), as well as the possible server hostnames valid for that option ("server_one.example.com" and "server_two.example.com", for example).

Step 2: Name the LoginModule Implementation

Decide on the proper package and class name for your LoginModule.

For example, a LoginModule developed by IBM might be called com.ibm.auth.Module where com.ibm.auth is the package name and Module is the name of the LoginModule class implementation.

Step 3: Implement the Abstract LoginModule Methods

The LoginModule interface specifies five abstract methods that require implementations:

  • initialize
  • login
  • commit
  • abort
  • logout

See below and the LoginModule API for more information on each method above.

In addition to these methods, a LoginModule implementation must provide a public constructor with no arguments. This allows for its proper instantiation by a LoginContext. Note that if no such constructor is provided in your LoginModule implementation, a default no-argument constructor is automatically inherited from the Object class.

LoginModule.initialize Method

public void initialize (
  Subject subject,
  CallbackHandler handler,
  Map<java.lang.String, ?> sharedState,
  Map<java.lang.String, ?> options) { ... }

The initialize method is called to initialize the LoginModule with the relevant authentication and state information.

This method is called by a LoginContext immediately after this LoginModule has been instantiated, and prior to any calls to its other public methods. The method implementation should store away the provided arguments for future use.

The initialize method may additionally peruse the provided sharedState to determine what additional authentication state it was provided by other LoginModules, and may also traverse through the provided options to determine what configuration options were specified to affect the LoginModule's behavior. It may save option values in variables for future use.

Note: JAAS LoginModules may use the options defined in PAM (use_first_pass, try_first_pass, use_mapped_pass, and try_mapped_pass) to achieve single-sign on. See Making Login Services Independent from Authentication Technologies for further information.

Below is a list of options commonly supported by LoginModules. Note that the following is simply a guideline. Modules are free to support a subset (or none) of the following options.

  • try_first_pass - If true, the first LoginModule in the stack saves the password entered, and subsequent LoginModules also try to use it. If authentication fails, the LoginModules prompt for a new password and retry the authentication.
  • use_first_pass - If true, the first LoginModule in the stack saves the password entered, and subsequent LoginModules also try to use it. LoginModules do not prompt for a new password if authentication fails (authentication simply fails).
  • try_mapped_pass - If true, the first LoginModule in the stack saves the password entered, and subsequent LoginModules attempt to map it into their service-specific password. If authentication fails, the LoginModules prompt for a new password and retry the authentication.
  • use_mapped_pass - If true, the first LoginModule in the stack saves the password entered, and subsequent LoginModules attempt to map it into their service-specific password. LoginModules do not prompt for a new password if authentication fails (authentication simply fails).
  • moduleBanner - If true, then when invoking the CallbackHandler, the LoginModule provides a TextOutputCallback as the first Callback, which describes the LoginModule performing the authentication.
  • debug - If true, instructs a LoginModule to output debugging information.

The initialize method may freely ignore state or options it does not understand, although it would be wise to log such an event if it does occur.

Note that the LoginContext invoking this LoginModule (and the other configured LoginModules, as well), all share the same references to the provided Subject and sharedState. Modifications to the Subject and sharedState will, therefore, be seen by all.

LoginModule.login Method

boolean login() throws LoginException;

The login method is called to authenticate a Subject. This is phase 1 of authentication.

This method implementation should perform the actual authentication. For example, it may cause prompting for a user name and password, and then attempt to verify the password against a password database. Another example implementation may inform the user to insert their finger into a fingerprint reader, and then match the input fingerprint against a fingerprint database.

If your LoginModule requires some form of user interaction (retrieving a user name and password, for example), it should not do so directly. That is because there are various ways of communicating with a user, and it is desirable for LoginModules to remain independent of the different types of user interaction. Rather, the LoginModule's login method should invoke the handle method of the CallbackHandler passed to the initialize method to perform the user interaction and set appropriate results, such as the user name and password. The LoginModule passes the CallbackHandler an array of appropriate Callbacks, for example a NameCallback for the user name and a PasswordCallback for the password, and the CallbackHandler performs the requested user interaction and sets appropriate values in the Callbacks. For example, to process a NameCallback, the CallbackHandler may prompt for a name, retrieve the value from the user, and call the NameCallback's setName method to store the name.

The authentication process may also involve communication over a network. For example, if this method implementation performs the equivalent of a kinit in Kerberos, then it would need to contact the KDC. If a password database entry itself resides in a remote naming service, then that naming service needs to be contacted, perhaps via the Java Naming and Directory Interface (JNDI). Implementations might also interact with an underlying operating system. For example, if a user has already logged into an operating system like Solaris, Linux, Mac OS X, or Windows NT, this method might simply import the underlying operating system's identity information.

The login method should

  1. Determine whether or not this LoginModule should be ignored. One example of when it should be ignored is when a user attempts to authenticate under an identity irrelevant to this LoginModule (if a user attempts to authenticate as root using NIS, for example). If this LoginModule should be ignored, login should return false. Otherwise, it should do the following:
  2. Call the CallbackHandler handle method if user interaction is required.
  3. Perform the authentication.
  4. Store the authentication result (success or failure).
  5. If authentication succeeded, save any relevant state information that may be needed by the commit method.
  6. Return true if authentication succeeds, or throw a LoginException such as FailedLoginException if authentication fails.

Note that the login method implementation should not associate any new Principal or credential information with the saved Subject object. This method merely performs the authentication, and then stores away the authentication result and corresponding authentication state. This result and state will later be accessed by the commit or abort method. Note that the result and state should typically not be saved in the sharedState Map, as they are not intended to be shared with other LoginModules.

An example of where this method might find it useful to store state information in the sharedState Map is when LoginModules are configured to share passwords. In this case, the entered password would be saved as shared state. By sharing passwords, the user only enters the password once, and can still be authenticated to multiple LoginModules. The standard conventions for saving and retrieving names and passwords from the sharedState Map are the following:

  • javax.security.auth.login.name - Use this as the shared state map key for saving/retrieving a name.
  • javax.security.auth.login.password - Use this as the shared state map key for saving/retrieving a password.

If authentication fails, the login method should not retry the authentication. This is the responsibility of the application. Multiple LoginContext login method calls by an application are preferred over multiple login attempts from within LoginModule.login().

LoginModule.commit Method

boolean commit() throws LoginException;

The commit method is called to commit the authentication process. This is phase 2 of authentication when phase 1 succeeds. It is called if the LoginContext's overall authentication succeeded (that is, if the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded.)

This method should access the authentication result and corresponding authentication state saved by the login method.

If the authentication result denotes that the login method failed, then this commit method should remove/destroy any corresponding state that was originally saved.

If the saved result instead denotes that this LoginModule's login method succeeded, then the corresponding state information should be accessed to build any relevant Principal and credential information. Such Principals and credentials should then be added to the Subject stored away by the initialize method.

After adding Principals and credentials, dispensable state fields should be destroyed expeditiously. Likely fields to destroy would be user names and passwords stored during the authentication process.

The commit method should save private state indicating whether the commit succeeded or failed.

The following chart depicts what a LoginModule's commit method should return. The different boxes represent the different situations that may occur. For example, the top-left corner box depicts what the commit method should return if both the previous call to login succeeded and the commit method itself succeeded.

LoginModule.commit method return values
 | COMMIT: SUCCESS | COMMIT: FAILURE
LOGIN: SUCCESS | return TRUE | throw EXCEPTION
LOGIN: FAILURE | return FALSE | return FALSE

LoginModule.abort Method

boolean abort() throws LoginException;

The abort method is called to abort the authentication process. This is phase 2 of authentication when phase 1 fails. It is called if the LoginContext's overall authentication failed.

This method first accesses this LoginModule's authentication result and corresponding authentication state saved by the login (and possibly commit) methods, and then clears out and destroys the information. Sample state to destroy would be user names and passwords.

If this LoginModule's authentication attempt failed, then there shouldn't be any private state to clean up.

The following charts depict what a LoginModule's abort method should return. This first chart assumes that the previous call to login succeeded. For instance, the top-left corner box depicts what the abort method should return if both the previous call to login and commit succeeded, and the abort method itself also succeeded.

LoginModule.abort method return values; login succeeded
 | ABORT: SUCCESS | ABORT: FAILURE
COMMIT: SUCCESS | return TRUE | throw EXCEPTION
COMMIT: FAILURE | return TRUE | throw EXCEPTION

The second chart depicts what a LoginModule's abort method should return, assuming that the previous call to login failed. For instance, the top-left corner box depicts what the abort method should return if the previous call to login failed, the previous call to commit succeeded, and the abort method itself also succeeded.

LoginModule.abort method return values; login failed
 | ABORT: SUCCESS | ABORT: FAILURE
COMMIT: SUCCESS | return FALSE | return FALSE
COMMIT: FAILURE | return FALSE | return FALSE

LoginModule.logout Method

boolean logout() throws LoginException;

The logout method is called to log out a Subject.

This method removes Principals, and removes/destroys credentials associated with the Subject during the commit operation. This method should not touch those Principals or credentials previously existing in the Subject, or those added by other LoginModules.

If the Subject has been marked read-only (the Subject's isReadOnly method returns true), then this method should only destroy credentials associated with the Subject during the commit operation (removing the credentials is not possible). If the Subject has been marked as read-only and the credentials associated with the Subject during the commit operation are not destroyable (they do not implement the Destroyable interface), then this method may throw a LoginException.

The logout method should return true if logout succeeds, or otherwise throw a LoginException.

Step 4: Choose or Write a Sample Application

Either choose an existing sample application for your testing, or write a new one. See JAAS Reference Guide for information about application requirements and a sample application you can use for your testing.

Step 5: Compile the LoginModule and Application

Compile your new LoginModule and the application you will use for testing.

Step 6: Prepare for Testing

Step 6a: Place Your LoginModule and Application Code in JAR Files

Place your LoginModule and application code in separate JAR files, in preparation for referencing the JAR files in the policy in Step 6c. Here is a sample command for creating a JAR file:

jar cvf <JAR file name> <list of classes, separated by spaces>

This command creates a JAR file with the specified name containing the specified classes.

For more information on the jar tool, see jar (for Solaris, Linux, or Mac OS X) (for Microsoft Windows).

Step 6b: Decide Where to Store the JAR Files

The application can be stored essentially anywhere you like.

Your LoginModule can also be placed anywhere you (and other clients) like. If the LoginModule is fully trusted, it can be placed in the JRE's lib/ext (standard extension) directory.

You will need to test the LoginModule being located both in the lib/ext directory and elsewhere because in one situation your LoginModule will need to explicitly be granted permissions required for any security-sensitive operations it does, while in the other case such permissions are not needed.

If your LoginModule is placed in the JRE's lib/ext directory, it will be treated as an installed extension and no permissions need to be granted, since the default system policy file grants all permissions to installed extensions.

If your LoginModule is placed anywhere else, the permissions need to be granted, for example by grant statements in a policy file.

Decide where you will store the LoginModule JAR file for testing the case where it is not an installed extension. In the next step, you grant permissions to the JAR file, in the specified location.

Step 6c: Set LoginModule and Application JAR File Permissions

If your LoginModule and/or application performs security-sensitive tasks that will trigger security checks (making network connections, reading or writing files on a local disk, etc), it will need to be granted the required permissions if it is not an installed extension (see Step 6b) and it is run while a security manager is installed.

Since LoginModules usually associate Principals and credentials with an authenticated Subject, some types of permissions a LoginModule will typically require are AuthPermissions with target names "modifyPrincipals", "modifyPublicCredentials", and "modifyPrivateCredentials".

A sample statement granting permissions to a LoginModule whose code is in MyLM.jar appears below. Such a statement could appear in a policy file. In this example, the MyLM.jar file is assumed to be in the /localWork directory.

grant codeBase "file:/localWork/MyLM.jar" {
  permission javax.security.auth.AuthPermission "modifyPrincipals";
  permission javax.security.auth.AuthPermission "modifyPublicCredentials";
  permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
};

Note: Since a LoginModule is always invoked within an AccessController.doPrivileged call, it should not have to call doPrivileged itself. If it does, it may inadvertently open up a security hole. For example, a LoginModule that invokes the application-provided CallbackHandler inside a doPrivileged call opens up a security hole by permitting the application's CallbackHandler to gain access to resources it would otherwise not have been able to access.

Step 6d: Create a Configuration Referencing the LoginModule

Because JAAS supports a pluggable authentication architecture, your new LoginModule can be used without requiring modifications to existing applications. Only the login Configuration needs to be updated in order to indicate use of a new LoginModule.

The default Configuration implementation from Oracle reads configuration information from configuration files, as described in com.sun.security.auth.login.ConfigFile.html.

Create a configuration file to be used for testing. For example, to configure the previously-mentioned hypothetical IBM LoginModule for an application, the configuration file might look like this:

    AppName {
        com.ibm.auth.Module REQUIRED debug=true;
    };

where AppName should be whatever name the application uses to refer to this entry in the login configuration file. The application specifies this name as the first argument to the LoginContext constructor.

Step 7: Test Use of the LoginModule

Finally, test your application and its use of the LoginModule. When you run the application, specify the login configuration file to be used. For example, suppose your application is named MyApp, it is located in MyApp.jar, and your configuration file is test.conf. You could run the application and specify the configuration file via the following:

java -classpath MyApp.jar
 -Djava.security.auth.login.config=test.conf MyApp

Type all that on one line. Multiple lines are used here for legibility.

To specify a policy file named my.policy and run the application with a security manager installed, do the following:

java -classpath MyApp.jar -Djava.security.manager
 -Djava.security.policy=my.policy
 -Djava.security.auth.login.config=test.conf MyApp

Again, type all that on one line.

You may want to configure the LoginModule with a debug option to help ensure that it is working correctly.

Debug your code and continue testing as needed. If you have problems, review the steps above and ensure they are all completed.

Be sure to vary user input and the LoginModule options specified in the configuration file.

Be sure to also include testing using different installation options (e.g., making the LoginModule an installed extension or placing it on the class path) and execution environments (with or without a security manager running). Installation options are discussed in Step 6b. In particular, in order to ensure your LoginModule works when a security manager is installed and the LoginModule and application are not installed extensions, you need to test such an installation and execution environment, after granting required permissions, as described in Step 6c.

If you find during testing that your LoginModule or application needs modifications, make the modifications, recompile (Step 5), place the updated code in a JAR file (Step 6a), re-install the JAR file (Step 6b), if needed fix or add to the permissions (Step 6c), if needed modify the login configuration file (Step 6d), and then re-run the application and repeat these steps as needed.

Step 8: Document Your LoginModule Implementation

The next step is to write documentation for clients of your LoginModule. Example documentation you may want to include is:

  • A README or User Guide describing
    • the authentication process employed by your LoginModule implementation.
    • information on how to install the LoginModule.
    • configuration options accepted by the LoginModule. For each option, specify the option name and possible values (or types of values), as well as the behavior the option controls.
    • the permissions required by your LoginModule when it is run with a security manager (and it is not an installed extension).
  • An example Configuration file that references your new LoginModule.
  • An example policy file granting your LoginModule the required permissions.
  • API documentation. Putting javadoc comments into your source code as you write it will make the API javadocs easy to generate.

Step 9: Make LoginModule JAR File and Documents Available

The final step is to make your LoginModule JAR file and documentation available to clients.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Authentication Tutorial

The Java Authentication and Authorization Service (JAAS) was introduced as an optional package in Java SE 1.3. JAAS was integrated into the JDK starting with JDK 1.4.

JAAS can be used for two purposes:

  • for authentication of users, to reliably and securely determine who is currently executing Java code, regardless of whether the code is running as an application, an applet, a bean, or a servlet; and
  • for authorization of users to ensure they have the access control rights (permissions) required to do the actions performed.

This section provides a basic tutorial for the authentication component. The authorization component will be described in the JAAS Authorization Tutorial.

JAAS authentication is performed in a pluggable fashion. This permits Java applications to remain independent from underlying authentication technologies. New or updated technologies can be plugged in without requiring modifications to the application itself. An implementation for a particular authentication technology to be used is determined at runtime. The implementation is specified in a login configuration file. The authentication technology used for this tutorial is very basic, just ensuring that the user specifies a particular name and password.

The rest of this tutorial consists of the following sections:

  1. The Authentication Tutorial Code
  2. The Login Configuration
  3. Running the Code
  4. Running the Code with a Security Manager

If you want to first see the tutorial code in action, you can skip directly to Running the Code and then go back to the other sections to learn about coding and configuration file details.

The Authentication Tutorial Code

The code for this tutorial consists of three files:

  • SampleAcn.java contains the sample application class (SampleAcn) and another class used to handle user input (MyCallbackHandler). The code in this file is the only code you need to understand for this tutorial. Your application will only indirectly use the other source files.
  • SampleLoginModule.java is the class specified by the tutorial's login configuration file as the class implementing the desired underlying authentication. SampleLoginModule's user authentication consists of simply verifying that the name and password specified by the user have specific values.
  • SamplePrincipal.java is a sample class implementing the java.security.Principal interface. It is used by SampleLoginModule.

SampleAcn.java

Our authentication tutorial application code is contained in a single source file, SampleAcn.java. That file contains two classes:

  • The SampleAcn Class
  • The MyCallbackHandler Class

The SampleAcn Class

The main method of the SampleAcn class performs the authentication and then reports whether or not authentication succeeded.

The code for authenticating the user is very simple, consisting of just two steps:

  1. Instantiate a LoginContext.
  2. Call the LoginContext's login method.

First the basic code is shown, followed by a complete listing of the SampleAcn class, complete with the import statement it requires and error handling.

Instantiating a LoginContext

In order to authenticate a user, you first need a javax.security.auth.login.LoginContext. Here is the basic way to instantiate a LoginContext:

import javax.security.auth.login.*;
. . .
LoginContext lc =
    new LoginContext(<config file entry name>,
           <CallbackHandler to be used for user interaction>);
and here is the specific way our tutorial code does the instantiation:
import javax.security.auth.login.*;
. . .
LoginContext lc =
    new LoginContext("Sample",
          new MyCallbackHandler());

The arguments are the following:

  1. The name of an entry in the JAAS login configuration file

    This is the name for the LoginContext to use to look up an entry for this application in the JAAS login configuration file, described here. Such an entry specifies the class(es) that implement the desired underlying authentication technology(ies). The class(es) must implement the LoginModule interface, which is in the javax.security.auth.spi package.

    In our sample code, we use the SampleLoginModule supplied with this tutorial. The SampleLoginModule performs authentication by ensuring that the user types a particular name and password.

    The entry in the login configuration file we use for this tutorial (see sample_jaas.config) has the name "Sample", so that is the name we specify as the first argument to the LoginContext constructor.

  2. A CallbackHandler instance.

    When a LoginModule needs to communicate with the user, for example to ask for a user name and password, it does not do so directly. That is because there are various ways of communicating with a user, and it is desirable for LoginModules to remain independent of the different types of user interaction. Rather, the LoginModule invokes a javax.security.auth.callback.CallbackHandler to perform the user interaction and obtain the requested information, such as the user name and password.

    An instance of the particular CallbackHandler to be used is specified as the second argument to the LoginContext constructor. The LoginContext forwards that instance to the underlying LoginModule (in our case SampleLoginModule). An application typically provides its own CallbackHandler implementation. A simple CallbackHandler, TextCallbackHandler, is provided in the com.sun.security.auth.callback package to output information to and read input from the command line. However, we instead demonstrate the more typical case of an application providing its own CallbackHandler implementation, described in The MyCallbackHandler Class.

Calling the LoginContext's login Method

Once we have a LoginContext lc, we can call its login method to carry out the authentication process:

lc.login();

The LoginContext instantiates a new empty javax.security.auth.Subject object (which represents the user or service being authenticated). The LoginContext constructs the configured LoginModule (in our case SampleLoginModule) and initializes it with this new Subject and MyCallbackHandler.

The LoginContext's login method then calls methods in the SampleLoginModule to perform the login and authentication. The SampleLoginModule will utilize the MyCallbackHandler to obtain the user name and password. Then the SampleLoginModule will check that the name and password are the ones it expects.

If authentication is successful, the SampleLoginModule populates the Subject with a Principal representing the user. The Principal the SampleLoginModule places in the Subject is an instance of SamplePrincipal, which is a sample class implementing the java.security.Principal interface.

See Subjects, Principals, Authentication, and Credentials for information on these terms.

The calling application can subsequently retrieve the authenticated Subject by calling the LoginContext's getSubject method, although doing so is not necessary for this tutorial.

The Complete SampleAcn Class Code

Now that you have seen the basic code required to authenticate the user, we can put it all together into the full class in SampleAcn.java, which includes relevant import statements and error handling:

package sample;

import javax.security.auth.login.*;
// . . . other import statements needed by MyCallbackHandler . . .

/**
 * This Sample application attempts to authenticate a user
 * and reports whether or not the authentication was
 * successful.
 */
public class SampleAcn {

   /**
    * Attempt to authenticate the user.
    *
    * @param args input arguments for this application.
    * These are ignored.
    */
    public static void main(String[] args) {

      // Obtain a LoginContext, needed for authentication.
      // Tell it to use the LoginModule implementation
      // specified by the entry named "Sample" in the
      // JAAS login configuration file and to also use the
      // specified CallbackHandler.
      LoginContext lc = null;
      try {
          lc = new LoginContext("Sample",
                          new MyCallbackHandler());
      } catch (LoginException le) {
          System.err.println("Cannot create LoginContext. "
              + le.getMessage());
          System.exit(-1);
      } catch (SecurityException se) {
          System.err.println("Cannot create LoginContext. "
              + se.getMessage());
          System.exit(-1);
      }

      // the user has 3 attempts to authenticate successfully
      int i;
      for (i = 0; i < 3; i++) {
          try {

              // attempt authentication
              lc.login();

              // if we return with no exception,
              // authentication succeeded
              break;

          } catch (LoginException le) {

              System.err.println("Authentication failed:");
              System.err.println("  " + le.getMessage());
              try {
                  Thread.currentThread().sleep(3000);
              } catch (Exception e) {
                  // ignore
              }

          }
      }

      // did they fail three times?
      if (i == 3) {
          System.out.println("Sorry");
          System.exit(-1);
      }

      System.out.println("Authentication succeeded!");

    }
}

The MyCallbackHandler Class

In some cases a LoginModule must communicate with the user to obtain authentication information. LoginModules use a javax.security.auth.callback.CallbackHandler for this purpose. An application can either use one of the sample implementations provided in the com.sun.security.auth.callback package or, more typically, write a CallbackHandler implementation. The application passes the CallbackHandler as an argument to the LoginContext instantiation. The LoginContext forwards the CallbackHandler directly to the underlying LoginModules.

The tutorial sample code supplies its own CallbackHandler implementation, the MyCallbackHandler class in SampleAcn.java.

CallbackHandler is an interface with one method to implement:

     void handle(Callback[] callbacks)
         throws java.io.IOException, UnsupportedCallbackException;

The LoginModule passes the CallbackHandler handle method an array of appropriate javax.security.auth.callback.Callbacks, for example a NameCallback for the user name and a PasswordCallback for the password, and the CallbackHandler performs the requested user interaction and sets appropriate values in the Callbacks.

The MyCallbackHandler handle method is structured as follows:

public void handle(Callback[] callbacks)
  throws IOException, UnsupportedCallbackException {

  for (int i = 0; i < callbacks.length; i++) {
    if (callbacks[i] instanceof TextOutputCallback) {

      // display a message according to a specified type
      . . .

    } else if (callbacks[i] instanceof NameCallback) {

      // prompt the user for a username
      . . .

    } else if (callbacks[i] instanceof PasswordCallback) {

      // prompt the user for a password
      . . .

    } else {
        throw new UnsupportedCallbackException
         (callbacks[i], "Unrecognized Callback");
    }
  }
}

A CallbackHandler handle method is passed an array of Callback instances, each of a particular type (NameCallback, PasswordCallback, etc.). It must handle each Callback, performing user interaction in a way that is appropriate for the executing application.

MyCallbackHandler handles three types of Callbacks: NameCallback to prompt the user for a user name, PasswordCallback to prompt for a password, and TextOutputCallback to report any error, warning, or other messages the SampleLoginModule wishes to send to the user.

The handle method handles a TextOutputCallback by extracting the message to be reported and then printing it to System.out, optionally preceded by additional wording that depends on the message type. The message to be reported is determined by calling the TextOutputCallback's getMessage method and the type by calling its getMessageType method. Here is the code for handling a TextOutputCallback:

if (callbacks[i] instanceof TextOutputCallback) {

  // display the message according to the specified type
  TextOutputCallback toc = (TextOutputCallback)callbacks[i];
  switch (toc.getMessageType()) {
     case TextOutputCallback.INFORMATION:
        System.out.println(toc.getMessage());
        break;
     case TextOutputCallback.ERROR:
        System.out.println("ERROR: " + toc.getMessage());
        break;
     case TextOutputCallback.WARNING:
        System.out.println("WARNING: " + toc.getMessage());
        break;
     default:
        throw new IOException("Unsupported message type: " +
            toc.getMessageType());
   }

The handle method handles a NameCallback by prompting the user for a user name. It does this by printing the prompt to System.err. It then sets the name for use by the SampleLoginModule by calling the NameCallback's setName method, passing it the name typed by the user:

} else if (callbacks[i] instanceof NameCallback) {

  // prompt the user for a username
  NameCallback nc = (NameCallback)callbacks[i];

  System.err.print(nc.getPrompt());
  System.err.flush();
  nc.setName((new BufferedReader
      (new InputStreamReader(System.in))).readLine());

Similarly, the handle method handles a PasswordCallback by printing a prompt to System.err to prompt the user for a password. It then sets the password for use by the SampleLoginModule by calling the PasswordCallback's setPassword method, passing it the password typed by the user, which it reads by calling the readPassword method (shown below):

} else if (callbacks[i] instanceof PasswordCallback) {

  // prompt the user for sensitive information
  PasswordCallback pc = (PasswordCallback)callbacks[i];

  System.err.print(pc.getPrompt());
  System.err.flush();
  pc.setPassword(readPassword(System.in));

The readPassword method is a basic method for reading a password from an InputStream:

private char[] readPassword(InputStream in) throws IOException {

    char[] lineBuffer;
    char[] buf;
    int i;

    buf = lineBuffer = new char[128];

    int room = buf.length;
    int offset = 0;
    int c;

  loop:
    while (true) {
      switch (c = in.read()) {
         case -1:
         case '\n':
            break loop;

         case '\r':
             int c2 = in.read();
             if ((c2 != '\n') && (c2 != -1)) {
                 if (!(in instanceof PushbackInputStream)) {
                     in = new PushbackInputStream(in);
                 }
                 ((PushbackInputStream)in).unread(c2);
             } else
                 break loop;

         default:
             if (--room < 0) {
                 buf = new char[offset + 128];
                 room = buf.length - offset - 1;
                 System.arraycopy(lineBuffer, 0, buf, 0, offset);
                 Arrays.fill(lineBuffer, ' ');
                 lineBuffer = buf;
             }
             buf[offset++] = (char) c;
             break;
        }
    }

    if (offset == 0) {
        return null;
    }

    char[] ret = new char[offset];
    System.arraycopy(buf, 0, ret, 0, offset);
    Arrays.fill(buf, ' ');

    return ret;
  }
}

SampleLoginModule.java and SamplePrincipal.java

SampleLoginModule.java implements the LoginModule interface. SampleLoginModule is the class specified by the tutorial's login configuration file as the class implementing the desired underlying authentication. SampleLoginModule's user authentication consists of simply verifying that the name and password specified by the user have specific values. This SampleLoginModule is specified by the tutorial's login configuration file as the LoginModule to use because (1) It performs a basic type of authentication suitable for any environment and thus is appropriate for a tutorial for all users, and (2) It provides an example LoginModule implementation for experienced programmers who require the ability to write a LoginModule implementing an authentication technology.

SamplePrincipal.java is a sample class implementing the java.security.Principal interface. If authentication is successful, the SampleLoginModule populates a Subject with a SamplePrincipal representing the user.

Important: If you are an application writer, you do not need to know how to write a LoginModule or a Principal implementation. You do not need to examine the SampleLoginModule or SamplePrincipal code. All you have to know is how to write your application and specify configuration information (such as in a login configuration file) such that the application will be able to utilize the LoginModule specified by the configuration to authenticate the user. You need to determine which LoginModule(s) you want to use and read the LoginModule's documentation to learn about what options you can specify values for (in the configuration) to control the LoginModule's behavior.

Any vendor can provide a LoginModule implementation that you can use. Some implementations are supplied with the JRE from Sun Microsystems, as listed in the JAAS Login Configuration File document.

Information for programmers who want to write a LoginModule can be found in the JAAS LoginModule Developer's Guide.

The Login Configuration

JAAS authentication is performed in a pluggable fashion, so applications can remain independent from underlying authentication technologies. A system administrator determines the authentication technologies, or LoginModules, to be used for each application and configures them in a login Configuration. The source of the configuration information (for example, a file or a database) is up to the current javax.security.auth.login.Configuration implementation. The default Configuration implementation from Sun Microsystems reads configuration information from configuration files, as described in com.sun.security.auth.login.ConfigFile.html.

See JAAS Login Configuration File for information as to what a login configuration file is, what it contains, and how to specify which login configuration file should be used.

The Login Configuration File for This Tutorial

As noted, the login configuration file we use for this tutorial, sample_jaas.config, contains just one entry, which is

Sample {
  sample.module.SampleLoginModule required debug=true;
};

This entry is named "Sample" and that is the name that our tutorial application, SampleAcn, uses to refer to this entry. The entry specifies that the LoginModule to be used to do the user authentication is the SampleLoginModule in the sample.module package and that this SampleLoginModule is required to "succeed" in order for authentication to be considered successful. The SampleLoginModule succeeds only if the name and password supplied by the user are the one it expects ("testUser" and "testPassword", respectively).

The SampleLoginModule also defines a "debug" option that can be set to true as shown. If this option is set to true, SampleLoginModule outputs extra information about the progress of authentication. A LoginModule can define as many options as it wants. The LoginModule documentation should specify the possible option names and values you can set in your configuration file.

Running the Code

To execute our JAAS authentication tutorial code, all you have to do is

  1. Place the following file into a directory:
    • the sample_jaas.config login configuration file
  2. Create a subdirectory named "sample" of that top-level directory, and place the following into it (note the SampleAcn and MyCallbackHandler classes, both in SampleAcn.java, are in a package named sample):
    • the SampleAcn.java application source file
  3. Create a subdirectory of the "sample" directory and name it "module". Place the following into it (note the SampleLoginModule class is in a package named sample.module):
    • the SampleLoginModule.java source file
  4. Create another subdirectory of the "sample" directory and name it "principal". Place the following into it (note the SamplePrincipal class is in a package named sample.principal):
    • the SamplePrincipal.java source file
  5. While in the top-level directory, compile SampleAcn.java, SampleLoginModule.java, and SamplePrincipal.java:
    javac sample/SampleAcn.java sample/module/SampleLoginModule.java
sample/principal/SamplePrincipal.java
    (Type all that on one line.)
  6. Execute the SampleAcn application, specifying
    • by -Djava.security.auth.login.config==sample_jaas.config that the login configuration file to be used is sample_jaas.config.

The full command is below.

java -Djava.security.auth.login.config==sample_jaas.config sample.SampleAcn

You will be prompted for your user name and password, and the SampleLoginModule specified in the login configuration file will check to ensure these are correct. The SampleLoginModule expects "testUser" for the user name and "testPassword" for the password.

You will see some messages output by SampleLoginModule as a result of the debug option being set to true in the login configuration file. Then, if your login is successful, you will see the following message output by SampleAcn:

Authentication succeeded!
If the login is not successful (for example, if you misspell the password), you will see
Authentication failed:
followed by a reason for the failure. For example, if you mistype the password, you may see a message like the following:
Authentication failed:
  Password Incorrect

SampleAcn gives you three chances to successfully log in.

Running the Code with a Security Manager

When a Java program is run with a security manager installed, the program is not allowed to access resources or otherwise perform security-sensitive operations unless it is explicitly granted permission to do so by the security policy in effect. The permission must be granted by an entry in a policy file.

Most browsers install a security manager, so applets typically run under the scrutiny of a security manager. Applications, on the other hand, do not, since a security manager is not automatically installed when an application is running. Thus an application, like our SampleAcn application, by default has full access to resources.

To run an application with a security manager, simply invoke the interpreter with a -Djava.security.manager argument included on the command line.

If you try invoking SampleAcn with a security manager but without specifying any policy file, you will get the following (unless you have a default policy setup elsewhere that grants the required permissions or grants AllPermission):

% java -Djava.security.manager \
 -Djava.security.auth.login.config==sample_jaas.config sample.SampleAcn
Exception in thread "main" java.security.AccessControlException:
  access denied (
  javax.security.auth.AuthPermission createLoginContext.Sample)

As you can see, you get an AccessControlException, because we haven't created and used a policy file granting our code the permission that is required in order to be allowed to create a LoginContext.

Here are the complete steps required in order to be able to run our SampleAcn application with a security manager installed. You can skip the first five steps if you have already done them, as described in Running the Code.

  1. Place the following file into a directory:
    • the sample_jaas.config login configuration file
  2. Create a subdirectory named "sample" of that top-level directory, and place the following into it (note the SampleAcn and MyCallbackHandler classes, both in SampleAcn.java, are in a package named sample):
    • the SampleAcn.java application source file
  3. Create a subdirectory of the "sample" directory and name it "module". Place the following into it (note the SampleLoginModule class is in a package named sample.module):
    • the SampleLoginModule.java source file
  4. Create another subdirectory of the "sample" directory and name it "principal". Place the following into it (note the SamplePrincipal class is in a package named sample.principal):
    • the SamplePrincipal.java source file
  5. While in the top-level directory, compile SampleAcn.java, SampleLoginModule.java, and SamplePrincipal.java:
    javac sample/SampleAcn.java sample/module/SampleLoginModule.java
sample/principal/SamplePrincipal.java
    (Type all that on one line.)
  6. Create a JAR file containing SampleAcn.class and MyCallbackHandler.class:
    jar -cvf SampleAcn.jar sample/SampleAcn.class
sample/MyCallbackHandler.class

    (Type all that on one line.) This command creates a JAR file, SampleAcn.jar, and places the SampleAcn.class and MyCallbackHandler.class files inside it.

  7. Create a JAR file containing SampleLoginModule.class and SamplePrincipal.class:
    jar -cvf SampleLM.jar sample/module/SampleLoginModule.class
sample/principal/SamplePrincipal.class
  8. Create a policy file granting the required permissions.

    The permission that is needed by code attempting to instantiate a LoginContext is a javax.security.auth.AuthPermission with target "createLoginContext.<entry name>". Here, <entry name> refers to the name of the login configuration file entry that the application references in its instantiation of LoginContext. The name used by our SampleAcn application's LoginContext instantiation is "Sample", as you can see in the code:

    LoginContext lc =
    new LoginContext("Sample",
          new MyCallbackHandler());

    Thus, the permission that needs to be granted to SampleAcn.jar is

    permission javax.security.auth.AuthPermission
  "createLoginContext.Sample";

    The SampleLM.jar file also needs to be granted a permission. The documentation for a LoginModule should tell you what permissions it needs to be granted. In the case of SampleLoginModule, it needs a javax.security.auth.AuthPermission with target "modifyPrincipals" in order to populate a Subject with a Principal:

    permission javax.security.auth.AuthPermission
  "modifyPrincipals";

    Copy the policy file sampleacn.policy to the same directory as that in which you stored SampleAcn.java, etc. The policy file contains the following grant statement to grant SampleAcn.jar (in the current directory) its required permission:

    grant codebase "file:./SampleAcn.jar" {
   permission javax.security.auth.AuthPermission
                    "createLoginContext.Sample";
};

    The policy file also contains the following grant statement to grant SampleLM.jar (also in the current directory) its required permission:

    grant codebase "file:./SampleLM.jar" {
   permission javax.security.auth.AuthPermission
                    "modifyPrincipals";
};

    Note: Policy files and the structure of entries within them are described in Default Policy Implementation and Policy File Syntax. Permissions are described here.

  9. Execute the SampleAcn application, specifying
    1. by an appropriate -classpath clause that classes should be searched for in the SampleAcn.jar and SampleLM.jar JAR files,
    2. by -Djava.security.manager that a security manager should be installed,
    3. by -Djava.security.policy==sampleacn.policy that the policy file to be used is sampleacn.policy, and
    4. by -Djava.security.auth.login.config==sample_jaas.config that the login configuration file to be used is sample_jaas.config.

    Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems. The only difference is that on Microsoft Windows systems you use semicolons to separate classpath items, while you use colons for that purpose on Solaris, Linux, and Mac OS X systems.

    Here is the full command for Microsoft Windows systems:

    java -classpath SampleAcn.jar;SampleLM.jar
 -Djava.security.manager
 -Djava.security.policy==sampleacn.policy \
 -Djava.security.auth.login.config==sample_jaas.config \
 sample.SampleAcn

    Here is the full command for Solaris, Linux, and Mac OS X systems:

    java -classpath SampleAcn.jar:SampleLM.jar
 -Djava.security.manager
 -Djava.security.policy==sampleacn.policy \
 -Djava.security.auth.login.config==sample_jaas.config \
 sample.SampleAcn

    Type all that on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Microsoft Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

    Since the specified policy file contains an entry granting the code the required permissions, execution should proceed without any exceptions indicating a required permission was not granted. You will be prompted for a user name and password (use "testUser" and "testPassword"), and the SampleLoginModule specified in the login configuration file will check the name and password. If your login is successful, you will see the message "Authentication succeeded!" and if not, you will see "Authentication failed:" followed by a reason for the failure.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Authorization Tutorial

This tutorial expands the program and policy file developed in the JAAS Authentication tutorial to demonstrate the JAAS authorization component, which ensures the authenticated caller has the access control rights (permissions) required to do subsequent security-sensitive operations. Since the authorization component requires that the user authentication first be completed, please read the JAAS Authentication tutorial first if you have not already done so.

The rest of this tutorial consists of the following sections:

  • What is JAAS Authorization?
  • How is JAAS Authorization Performed?
    • How Do You Make Principal-Based Policy File Statements?
    • How Do You Associate a Subject with an Access Control Context?
  • The Authorization Tutorial Code
  • The Login Configuration File
  • The Policy File
  • Running the Authorization Tutorial Code

If you want to first see the tutorial code in action, you can skip directly to Running the Authorization Tutorial Code and then go back to the other sections to learn more.

What is JAAS Authorization?

JAAS authorization extends the existing Java security architecture that uses a security policy to specify what access rights are granted to executing code. That architecture, introduced in the Java 2 platform, is code-centric. That is, the permissions are granted based on code characteristics: where the code is coming from and whether it is digitally signed and if so by whom. We saw an example of this in the sampleacn.policy file used in the JAAS Authentication tutorial. That file contains the following:

grant codebase "file:./SampleAcn.jar" {

   permission javax.security.auth.AuthPermission
                    "createLoginContext.Sample";
};

This grants the code in the SampleAcn.jar file, located in the current directory, the specified permission. (No signer is specified, so it doesn't matter whether the code is signed or not.)

JAAS authorization augments the existing code-centric access controls with new user-centric access controls. Permissions can be granted based not just on what code is running but also on who is running it.

When an application uses JAAS authentication to authenticate the user (or other entity such as a service), a Subject is created as a result. The purpose of the Subject is to represent the authenticated user. A Subject is comprised of a set of Principals, where each Principal represents an identity for that user. For example, a Subject could have a name Principal ("Susan Smith") and a Social Security Number Principal ("987-65-4321"), thereby distinguishing this Subject from other Subjects.

Permissions can be granted in the policy to specific Principals. After the user has been authenticated, the application can associate the Subject with the current access control context. For each subsequent security-checked operation (a local file access, for example), the Java runtime will automatically determine whether the policy grants the required permission only to a specific Principal and if so, the operation will be allowed only if the Subject associated with the access control context contains the designated Principal.

How is JAAS Authorization Performed?

To make JAAS authorization take place, the following is required:

  • The user must be authenticated, as described in the JAAS Authentication tutorial.
  • Principal-based entries must be configured in the security policy.
  • The Subject that is the result of authentication must be associated with the current access control context.

How Do You Make Principal-Based Policy File Statements?

Policy file grant statements can now optionally include one or more Principal fields. Inclusion of a Principal field indicates that the user or other entity represented by the specified Principal, executing the specified code, has the designated permissions.

Thus, the basic format of a grant statement is now

grant <signer(s) field>, <codeBase URL>
  <Principal field(s)> {
    permission perm_class_name "target_name", "action";
    ....
    permission perm_class_name "target_name", "action";
  };
where each of the signer, codeBase and Principal fields is optional and the order between the fields doesn't matter.

A Principal field looks like the following:

Principal Principal_class "principal_name"

That is, it is the word "Principal" (where case doesn't matter) followed by the (fully qualified) name of a Principal class and a principal name.

A Principal class is a class that implements the java.security.Principal interface. All Principal objects have an associated name that can be obtained by calling their getName method. The format used for the name is dependent on each Principal implementation.

The type of Principal placed in the Subject created by the basic authentication mechanism used by this tutorial is SamplePrincipal, so that is what should be used as the Principal_class part of our grant statement's Principal designation. User names for SamplePrincipals are of the form "name", and the only user name accepted for this tutorial is "testUser", so the principal_name designation to use in the grant statement is "testUser".

It is possible to include more than one Principal field in a grant statement. If multiple Principal fields are specified, then the permissions in that grant statement are granted only if the Subject associated with the current access control context contains all of those Principals.

To grant the same set of permissions to different Principals, create multiple grant statements where each lists the permissions and contains a single Principal field designating one of the Principals.

The policy file for this tutorial includes one grant statement with a Principal field:

grant codebase "file:./SampleAction.jar",
        Principal sample.principal.SamplePrincipal "testUser" {

   permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "user.home", "read";
   permission java.io.FilePermission "foo.txt", "read";
};

This specifies that the indicated permissions are granted to the specified principal executing the code in SampleAction.jar. (Note: the SamplePrincipal class is in the sample.principal package.)

How Do You Associate a Subject with an Access Control Context?

To create and associate a Subject with the current access control context, you need the following:

  • The user must first be authenticated, as described in JAAS Authentication.
  • The static doAs method from the Subject class must be called, passing it an authenticated Subject and a java.security.PrivilegedAction or java.security.PrivilegedExceptionAction. (See API for Privileged Blocks for a comparison of PrivilegedAction and PrivilegedExceptionAction.) The doAs method associates the provided Subject with the current access control context and then invokes the run method from the action. The run method implementation contains all the code to be executed as the specified Subject. The action thus executes as the specified Subject.

    The static doAsPrivileged method from the Subject class may be called instead of the doAs method, as will be done for this tutorial. In addition to the parameters passed to doAs, doAsPrivileged requires a third parameter: an AccessControlContext. Unlike doAs, which associates the provided Subject with the current access control context, doAsPrivileged associates the Subject with the provided access control context or with an empty access control context if the parameter passed in is null, as is the case for this tutorial. See doAs vs. doAsPrivileged in the JAAS Reference Guide for a comparison of those methods.

The Authorization Tutorial Code

The code for this tutorial consists of four files:

  • SampleAzn.java is exactly the same as the SampleAcn.java application file from the JAAS Authentication tutorial except for the additional code needed to call Subject.doAsPrivileged.
  • SampleAction.java contains the SampleAction class. This class implements PrivilegedAction and has a run method that contains all the code we want to be executed with Principal-based authorization checks.
  • SampleLoginModule.java is the class specified by the tutorial's login configuration file as the class implementing the desired underlying authentication. SampleLoginModule's user authentication consists of simply verifying that the name and password specified by the user have specific values. This class was also used by the JAAS Authentication tutorial and will not be discussed further here.
  • SamplePrincipal.java is a sample class implementing the java.security.Principal interface. It is used by SampleLoginModule. This class was also used by the JAAS Authentication tutorial and will not be discussed further here.

The SampleLoginModule.java and SamplePrincipal.java files were also used in the JAAS Authentication tutorial, so they are not described further here. The other source files are described below.

SampleAzn.java

Like SampleAcn, the SampleAzn class instantiates a LoginContext lc and calls its login method to perform the authentication. If successful, the authenticated Subject (which includes a SamplePrincipal representing the user) is obtained by calling the LoginContext's getSubject method:

Subject mySubject = lc.getSubject();

After providing the user some information about the Subject, such as which Principals it has, the main method then calls Subject.doAsPrivileged, passing it the authenticated Subject mySubject, a PrivilegedAction (SampleAction) and a null AccessControlContext, as described in the following.

The SampleAction class is instantiated via the following:

PrivilegedAction action = new SampleAction();

The call to Subject.doAsPrivileged is performed via:

Subject.doAsPrivileged(mySubject, action, null);

The doAsPrivileged method invokes execution of the run method in the PrivilegedAction action (SampleAction) to initiate execution of the rest of the code, which is considered to be executed on behalf of the Subject mySubject.

Passing null as the AccessControlContext (third) argument to doAsPrivileged indicates that mySubject should be associated with a new empty AccessControlContext. The result is that security checks occurring during execution of SampleAction will only require permissions for the SampleAction code itself (or other code it invokes), running as mySubject. Note that the caller of doAsPrivileged (and the callers on the execution stack at the time doAsPrivileged was called) do not require any permissions while the action executes.

SampleAction.java

SampleAction.java contains the SampleAction class. This class implements java.security.PrivilegedAction and has a run method that contains all the code we want to be executed as the Subject mySubject. For this tutorial, we will perform three operations, each of which cannot be done unless code has been granted required permissions. We will:

  • Read and print the value of the java.home system property,
  • Read and print the value of the user.home system property, and
  • Determine whether or not a file named foo.txt exists in the current directory.

Here is the code:

package sample;

import java.io.File;
import java.security.PrivilegedAction;

public class SampleAction implements PrivilegedAction {

  public Object run() {

    System.out.println("\nYour java.home property value is: "
                + System.getProperty("java.home"));

    System.out.println("\nYour user.home property value is: "
                + System.getProperty("user.home"));

    File f = new File("foo.txt");
    System.out.print("\nfoo.txt does ");
    if (!f.exists())
        System.out.print("not ");
    System.out.println("exist in the current working directory.");
    return null;
  }
}

The Login Configuration File

The login configuration file used for this tutorial can be exactly the same as that used by the JAAS Authentication tutorial. Thus we can use sample_jaas.config, which contains just one entry:

Sample {
  sample.module.SampleLoginModule required debug=true;
};

This entry is named "Sample" and that is the name that both our tutorial applications SampleAcn and SampleAzn use to refer to it. The entry specifies that the LoginModule to be used to do the user authentication is the SampleLoginModule in the sample.module package and that this SampleLoginModule is required to "succeed" in order for authentication to be considered successful. The SampleLoginModule succeeds only if the name and password supplied by the user are the one it expects ("testUser" and "testPassword", respectively).

The SampleLoginModule also defines a "debug" option that can be set to true as shown. If this option is set to true, SampleLoginModule outputs extra information about the progress of authentication.

The Policy File

The application for this authorization tutorial consists of two classes, SampleAzn and SampleAction. The code in each class contains some security-sensitive operations and thus relevant permissions are required in a policy file in order for the operations to be executed.

The LoginModule used by this tutorial, SampleLoginModule, also contains an operation requiring a permission.

The permissions required by each of these classes are described below, followed by a link to the full policy file.

Permissions Required by SampleAzn

The main method of the SampleAzn class does two operations for which permissions are required. It

  • creates a LoginContext, and
  • calls the doAsPrivileged static method of the Subject class.

The LoginContext creation is exactly the same as was done in the authentication tutorial, and it thus needs the same javax.security.auth.AuthPermission permission with target "createLoginContext.Sample".

In order to call the doAsPrivileged method of the Subject class, you need to have a javax.security.auth.AuthPermission with target "doAsPrivileged".

Assuming the SampleAzn class is placed in a JAR file named SampleAzn.jar, these permissions can be granted to the SampleAzn code via the following grant statement in the policy file:

grant codebase "file:./SampleAzn.jar" {
   permission javax.security.auth.AuthPermission
                    "createLoginContext.Sample";
   permission javax.security.auth.AuthPermission "doAsPrivileged";
};

Permissions Required by SampleAction

The SampleAction code does three operations for which permissions are required. It

  • reads the value of the "java.home" system property.
  • reads the value of the "user.home" system property.
  • checks to see whether or not a file named foo.txt exists in the current directory.

The permissions required for these operations are the following:

permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.io.FilePermission "foo.txt", "read";

We need to grant these permissions to the code in SampleAction.class, which we will place in a JAR file named SampleAction.jar. However, for this particular grant statement we want to grant the permissions not just to the code but to a specific user executing the code, to demonstrate how to restrict access to a particular user.

Thus, as explained in How Do You Make Principal-Based Policy File Statements?, our grant statement looks like the following:

grant codebase "file:./SampleAction.jar",
        Principal sample.principal.SamplePrincipal "testUser" {

   permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "user.home", "read";
   permission java.io.FilePermission "foo.txt", "read";
};

Permissions Required by SampleLoginModule

The SampleLoginModule code does one operation for which permissions are required. It needs a javax.security.auth.AuthPermission with target "modifyPrincipals" in order to populate a Subject with a Principal. The grant statement is the following:

grant codebase "file:./SampleLM.jar" {
    permission javax.security.auth.AuthPermission "modifyPrincipals";
};

The Full Policy File

The full policy file is sampleazn.policy.

Running the Authorization Tutorial Code

To execute our JAAS authorization tutorial code, all you have to do is

  1. Place the following files into a directory:
    • The sample_jaas.config login configuration file.
    • The sampleazn.policy policy file.
  2. Create a subdirectory named "sample" of that top-level directory, and place the following into it (note the SampleAzn and SampleAction classes are in a package named sample):
    • The SampleAzn.java source file.
    • The SampleAction.java source file.
  3. Create a subdirectory of the "sample" directory and name it "module". Place the following into it (note the SampleLoginModule class is in a package named sample.module):
    • the SampleLoginModule.java source file
  4. Create another subdirectory of the "sample" directory and name it "principal". Place the following into it (note the SamplePrincipal class is in a package named sample.principal):
    • the SamplePrincipal.java source file
  5. While in the top-level directory, compile all the source files:
    javac sample/SampleAction.java sample/SampleAzn.java
sample/module/SampleLoginModule.java sample/principal/SamplePrincipal.java
    (Type all that on one line.)
  6. Create a JAR file named SampleAzn.jar containing SampleAzn.class and MyCallbackHandler.class (Note the sources for both these classes are in SampleAzn.java):
    jar -cvf SampleAzn.jar sample/SampleAzn.class
sample/MyCallbackHandler.class

    (Type all that on one line.)

  7. Create a JAR file named SampleAction.jar containing SampleAction.class:
    jar -cvf SampleAction.jar sample/SampleAction.class
  8. Create a JAR file containing SampleLoginModule.class and SamplePrincipal.class:
    jar -cvf SampleLM.jar sample/module/SampleLoginModule.class
sample/principal/SamplePrincipal.class
  9. Execute the SampleAzn application, specifying
    1. by an appropriate -classpath clause that classes should be searched for in the SampleAzn.jar, SampleAction.jar, and SampleLM.jar JAR files,
    2. by -Djava.security.manager that a security manager should be installed,
    3. by -Djava.security.policy==sampleazn.policy that the policy file to be used is sampleazn.policy, and
    4. by -Djava.security.auth.login.config==sample_jaas.config that the login configuration file to be used is sample_jaas.config.

    Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems. The only difference is that on Windows systems you use semicolons to separate classpath items, while you use colons for that purpose on Solaris, Linux, and Mac OS X systems.

    Here is the full command for Windows systems:

    java -classpath SampleAzn.jar;SampleAction.jar;SampleLM.jar
 -Djava.security.manager
 -Djava.security.policy==sampleazn.policy
 -Djava.security.auth.login.config==sample_jaas.config sample.SampleAzn

    Here is the full command for Solaris, Linux, and Mac OS X systems:

    java -classpath SampleAzn.jar:SampleAction.jar:SampleLM.jar
 -Djava.security.manager
 -Djava.security.policy==sampleazn.policy
 -Djava.security.auth.login.config==sample_jaas.config sample.SampleAzn

    Type the full command on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

    You will be prompted for a user name and password (use "testUser" and "testPassword"), and the SampleLoginModule specified in the login configuration file will check the name and password. If your login is successful, you will see the message "Authentication succeeded!" and if not, you will see "Authentication failed:" followed by a reason for the failure.

    Once authentication is successfully completed, the rest of the program (in SampleAction) will be executed on behalf of you, the user, requiring you to have been granted appropriate permissions. The sampleazn.policy policy file grants you the required permissions, so you will see a display of the values of your java.home and user.home system properties and a statement as to whether or not you have a file named foo.txt in the current directory.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Login Configuration File

JAAS authentication is performed in a pluggable fashion, so Java applications can remain independent from underlying authentication technologies. Configuration information such as the desired authentication technology is specified at runtime. The source of the configuration information (for example, a file or a database) is up to the current javax.security.auth.login.Configuration implementation. The default Configuration implementation from Sun Microsystems reads configuration information from configuration files, which are described in this document.

Login Configuration File Structure and Contents

A login configuration file consists of one or more entries, each specifying which underlying authentication technology should be used for a particular application or applications. The structure of each entry is the following:

<name used by application to refer to this entry> {
    <LoginModule> <flag> <LoginModule options>;
    <optional additional LoginModules, flags and options>;
    };

Thus, each login configuration file entry consists of a name followed by one or more LoginModule-specific entries, where each LoginModule-specific entry is terminated by a semicolon and the entire group of LoginModule-specific entries is enclosed in braces. Each configuration file entry is terminated by a semicolon.

As an example, the login configuration file used for the JAAS Authentication tutorial contains just one entry, which is

Sample {
   sample.module.SampleLoginModule required debug=true;
};

Here, the entry is named "Sample" and that is the name that the JAAS Authentication tutorial application (SampleAcn.java) uses to refer to this entry. The entry specifies that the LoginModule to be used to do the user authentication is the SampleLoginModule in the sample.module package and that this SampleLoginModule is required to "succeed" in order for authentication to be considered successful. The SampleLoginModule succeeds only if the name and password supplied by the user are the ones it expects ("testUser" and "testPassword", respectively).

The name for an entry in a login configuration file is the name that applications use to refer to the entry when they instantiate a LoginContext, as described in Instantiating a LoginContext in the JAAS authentication tutorial. The name can be whatever name the application developer wishes to use. Here, the term "application" refers to whatever code does the JAAS login.

The specified LoginModules (described below) are used to control the authentication process. Authentication proceeds down the list in the exact order specified, as described here.

The subparts of each LoginModule-specific entry are the following:

  • LoginModule

    This specifies a class implementing the desired authentication technology. Specifically, the class must be a subclass of the LoginModule class, which is in the javax.security.auth.spi package. A typical LoginModule may prompt for and verify a user name and password, as is done by the SampleLoginModule (in the sample.module package) used for these tutorials. Any vendor can provide a LoginModule implementation that you can use. Some implementations are supplied with the JRE from Sun Microsystems. You can view the reference documentation for the various LoginModules, all in the com.sun.security.auth package:

    • JndiLoginModule
    • KeyStoreLoginModule
    • Krb5LoginModule
    • NTLoginModule
    • UnixLoginModule
  • flag

    The flag value indicates whether success of the preceding LoginModule is "required", "requisite", "sufficient", or "optional". If there is just one LoginModule-specific entry, as there is in our tutorials, then the flag for it should be "required". The options are described in more detail here.

  • LoginModule options

    If the specified LoginModule implementation has options that can be set, you specify any desired option values here. This is a space-separated list of values which are passed directly to the underlying LoginModule. Options are defined by the LoginModule itself, and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities.

    The correct way to specify options in the configuration file is by using a name-value pairing, for example debug=true, where the option name (in this case, "debug") and value (in this case, "true") should be separated by an "equals" symbol.

Where to Specify Which Login Configuration File Should Be Used

The configuration file to be used can be specified in one of two ways:

  1. On the command line.

    You can use a -Djava.security.auth.login.config interpreter command line argument to specify the login configuration file that should be used. We use this approach for all the tutorials. For example, we run our SampleAcn application in the JAAS Authentication tutorial using the following command, which specifies that the configuration file is the sample_jaas.config file in the current directory:

    java -Djava.security.auth.login.config==sample_jaas.config sample.SampleAcn
  2. In the Java security properties file.

    An alternate approach to specifying the location of the login configuration file is to indicate its URL as the value of a login.config.url.n property in the security properties file. The security properties file is the java.security file located in the lib/security directory of the JRE.

    Here, n indicates a consecutively-numbered integer starting with 1. Thus, if desired, you can specify more than one login configuration file by indicating one file's URL for the login.config.url.1 property, a second file's URL for the login.config.url.2 property, and so on. If more than one login configuration file is specified (that is, if n > 1), then the files are read and concatenated into a single configuration.

    Here is an example of what would need to be added to the security properties file in order to indicate the sample_jaas.config login configuration file used by this tutorial. This example assumes the file is in the C:\AcnTest directory on a Microsoft Windows system:

    login.config.url.1=file:C:/AcnTest/sample_jaas.config
    (Note that URLs always use forward slashes, regardless of what operating system the user is running.)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Tutorials

This page links to two tutorials demonstrating various aspects of the use of JAAS (Java Authentication and Authorization Service):

  • JAAS Authentication: Explains how an application can authenticate users using JAAS.
  • JAAS Authorization: Explains how to enforce user-based access controls using JAAS.

The authentication technology used for these tutorials is very basic, just ensuring that the user specifies a particular name and password. Thus, these tutorials can be run by everyone.

Related Documentation

API Specifications

  • com.sun.security.auth Package
  • com.sun.security.auth.callback Package
  • com.sun.security.auth.login Package
  • com.sun.security.auth.module Package

User Guides

  • Java Authentication and Authorization Service (JAAS) Reference Guide.

Papers

  • JAAS white paper

Tutorials

  • Similar tutorials for JAAS authentication and authorization, but which demonstrate the use of a Kerberos LoginModule and thus which require a Kerberos installation, can be found at

    • JAAS Authentication
    • JAAS Authorization

    These two tutorials are a part of the Java GSS-API and JAAS sequence of tutorials that utilize Kerberos as the underlying technology for authentication and secure communication.

  • Java Security Tutorial

Other Java Security Documentation

  • Java SE Security Documentation
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Subjects, Principals, Authentication, and Credentials

To authorize access to resources, applications first need to authenticate the source of the request. The JAAS framework defines the term subject to represent the source of a request. A subject may be any entity, such as a person or service. A subject is represented by the javax.security.auth.Subject class.

Authentication represents the process by which the identity of a subject is verified, and must be performed in a secure fashion; otherwise a perpetrator may impersonate others to gain access to a system. Authentication typically involves the subject demonstrating some form of evidence to prove its identity. Such evidence may be information only the subject would likely know or have (such as a password or fingerprint), or it may be information only the subject could produce (such as signed data using a private key).

Once authenticated, a Subject is populated with associated identities, or Principals (of type java.security.Principal). A Subject may have many Principals. For example, a person may have a name Principal ("John Doe") and an SSN Principal ("123-45-6789"), which distinguish it from other Subjects.

In addition to associated Principals, a Subject may own security-related attributes, which are referred to as credentials. A credential may contain information used to authenticate the subject to new services. Such credentials include passwords, Kerberos tickets, and public key certificates. Credentials might also contain data that simply enables the subject to perform certain activities. Cryptographic keys, for example, represent credentials that enable the subject to sign or encrypt data. Public and private credential classes are not part of the core JAAS class library. Any class, therefore, can represent a credential.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java GSS/Kerberos in Java SE 5

Documentation Contents

Java Generic Security Services (Java GSS) and Kerberos
Enhancements for Java SE 5

IMPORTANT NOTE: The APIs and features described in this document are SUBJECT TO CHANGE.

The following enhancements were made to the Java GSS/Kerberos implementation in Java SE 5.

  • Support for Triple DES encryption type.
    Prior to Java SE 5, only the DES encryption type was supported. Java SE 5 supports both DES and Triple DES encryption type. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Solaris 10 and MIT Kerberos.

    Triple DES encryption type is specified in the Kerberos configuration file under the "libdefaults" section. It is specified as "des3-cbc-sha1" with following tags: default_tkt_enctypes, default_tgs_enctypes, permitted_enctypes. "dec3-cbc-sha1" has the following aliases:

    des3-hmac-sha1
des3-cbc-sha1-kd
des3-cbc-hmac-sha1-kd
    For example, the libdefaults section in the configuration file might include the following.
    default_tkt_enctypes = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tgs_enctypes = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
permitted_enctypes   = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
    default_tkt_enctypes is used to specify the encryption types to use for the session key in the ticket-granting-ticket. It is used by the client to restrict the encryption types of session keys that will be used to communicate with the KDC. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1"

    default_tgs_enctypes is used to specify the encryption types to use for the session key in service tickets. It is used by the client to restrict the encryption types of session keys that are shared by the client and server. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1".

    permitted_enctypes is used to specify the encryption types permitted to be used by a service. It is used by the server to restrict the encryption types of session keys that it will accept. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1".

  • TCP vs. UDP Preference Configuration
    Java SE now supports the use of the "udp_preference_limit" property in the Kerberos configuration file (krb5.conf).

    When sending a message to the KDC, the Java SE Kerberos library will use TCP if the size of the message is above udp_preference_list. If the message is smaller than udp_preference_list, then UDP will be tried at most three times. If the KDC indicates that the request is too big, the Java SE Kerberos library will use TCP.

  • IPv6 Support in Kerberos
    Java SE now supports IPv6 addresses in Kerberos tickets. Prior to Java SE 5, only IPv4 addresses were supported in tickets.
  • TGT Renewals
    The Java Authentication and Authorizaton Server (JAAS) Kerberos login module in JDK 5.0, Krb5LoginModule, now supports Ticket Granting Ticket (TGT) renewal. This allows long-running services to renew their TGT automatically without user interaction or requiring the services to restart.

    With this feature, if Krb5LoginModule obtains an expired ticket from the ticket cache, the TGT will be automatically renewed and be added to Subject of the caller who requested the ticket. If the ticket cannot be renewed for any reason, then Krb5LoginModule will use its configured callback handler to retrieve a username and password to acquire a new TGT.

    To use this feature, configure Krb5LoginModule to use the ticket cache and set the newly introduced renewTGT option to true. Here is an example of a JAAS login configuration file that requests TGT renewal.

    server {
  com.sun.security.auth.module.Krb5LoginModule required
        principal=principal@your_realm
        useTicketCache=true
        renewTGT=true;
};
    Note that if renewTGT is set to true, then useTicketCache must also be set to true; otherwise, it results in a configuration error.
  • Login Entry Names for SunJSSE
    In JDK 5.0, the SunJSSE provider has added support for the Kerberos cipher suites, as described in RFC 2712 and the What's New in JSSE in Java SE 5 in the JSSE Reference Guide. The following JAAS login configuration index names are reserved for this feature.
    com.sun.net.ssl.server
com.sun.net.ssl.client
    When a JSSE application uses the Kerberos cipher suites without explicit JAAS program, the SunJSSE provider will use these index names to find and configure the JAAS login module to acquire the necessary Kerberos credentials. For example, such an application might have the following JAAS configuration file.
     com.sun.net.ssl.server {
  com.sun.security.auth.module.Krb5LoginModule required
        principal=service_principal@your_realm
        useKeyTab=true
        keyTab=keytab_name
        storeKey=true;
};
    If the entry is not found, the default "other" index name will be used. The service name for TLS is "host". For example, a TLS service running on a machine named "raven.example.com" in the realm named "KRBNT-OPERATIONS.EXAMPLE.COM" would have the service principal name
    host/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM
    There are no restrictions on the TLS client; it may use any valid Kerberos principal name.

    When a JSSE application uses the Kerberos cipher suites with explicit JAAS program, it can use any index name, including the ones listed above.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JGSS Enhancements List for Java™ 6

Documentation Contents

Java Generic Security Services (Java GSS)

and Kerberos Enhancements for Java 6

The following enhancements were added to the Java GSS/Kerberos implementation in Java SE 6. For details, see the JGSS Feature Enhancements List.

  • Support for AES Encryption Type

    Support for AES encryption type (AES128 and AES256) in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Solaris 10 and MIT Kerberos.

  • Support for RC4-HMAC Encryption Type

    Support for RC4-HMAC encryption type in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Windows, Solaris 10 and MIT Kerberos. Windows Active Directoiory supports RC4-HMAC as the default Kerberos encryption type.

  • Support for SPNEGO in Java GSS

    Support for SPNEGO mechanism in Java GSS is now available. The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism is a pseudo security mechanism that enables GSS-API peers to securely negotiate a common security mechanism to be used.

    Support for SPNEGO authentication scheme in HTTP is also available.

  • Support for new Pre-Authentication Mechanisms

    Java GSS/Kerberos now includes support for the new pre-authentication mechanisms as described in the latest Kerberos specification.

  • Native Platform GSS Integration

    This feature allows Java GSS applications to take advantage of features in the native GSS implementation available on the platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JGSS Security Enhancement List

Documentation Contents

Java Generic Security Services and Kerberos

Feature Enhancements Added to Java

Security Contents

This page describes and lists security features and enhancements added to the Java Generic Security Services API (Java GSS) and Kerberos, by major version number, from v1.4 through v1.8.

NOTE: The APIs and features described in this document are subject to change.

Java Generic Security Services API and Kerberos Enhancements for Java SE 8

The following enhancements were added to the Java GSS API and Kerberos implementation in Java SE 8.

MS-SFU Kerberos Extensions for JDK 8

MS-SFU refers to Microsoft Kerberos 5 extensions that allow a service to obtain a Kerberos service ticket on behalf of a client. This is useful when the authentication between the client and this service is not established through Kerberos (thus the standard Kerberos delegation cannot be used) but the service needs to access a Kerberos-secured back-end server in the name of the client.

Support for the MS-SFU extensions was added in JDK 8. This includes support for the S4U2self and S4U2proxy protocols, as defined in MS-SFU.

This feature is very useful in secure enterprise deployments. For example, in a typical network service, the front end (such as a web server) often needs to access the back end (such as a database server) on behalf of a client. Normal Kerberos 5 supports delegation, but demands that all layers in this chain explicitly use Kerberos authentication at each step, which is not always possible or desirable.

For example, if a client logs in to a web server using digest authentication, then there are no Kerberos credentials to be delegated, and normal step-by-step Kerberos 5 authentication cannot occur. However, because MS-SFU defines the Service for User (S4U2self) extension so that the front end can access the back end on behalf of the client without presenting the client's Kerberos credentials, MS-SFU could provide authentication in this situation.

In addition, there are potential security gaps in the standard Kerberos 5 delegation mechanism (which Microsoft calls open delegation). In this mechanism, once the service account has the client's delegated credentials, it has access to any service. Thus, great care is needed with open delegation.

In contrast, the MS-SFU delegation (implemented in S4U2proxy) is much more secure. Here the administrator can precisely control the services to which a particular service can delegate. (Microsoft calls this constrained delegation.)

MS-SFU Implementation Details

The original Kerberos 5 protocol was defined in RFC 4120. MS-SFU adds two extensions to that protocol: Service for User to Self (S4U2self), which allows a front-end service to obtain a Kerberos service ticket to itself on behalf of a user, and Service for User to Proxy (S4U2proxy), which enables it to obtain a service ticket on behalf of the user to a second, back-end service.

Together, these two extensions enable the front-end service to obtain a Kerberos service ticket on behalf of a user. The resulting service ticket can be used to access other services on the local or remote machines.

A new public method (GSSCredential::impersonate) has been added to the com.sun.security.jgss package to implement these extensions.

Java Generic Security Services API and Kerberos Enhancements for Java SE 6

The following enhancements were added to the Java Generic Security Services API (Java GSS) and Kerberos implementation in Java SE 6.

  • Support for AES encryption type

    Java SE 5.0 supports the DES and Triple DES encryption types, with the following aliases:

    des-cbc-md5
    des-cbc-crc
    des3-cbc-sha1

     Starting from Java SE 6, support for the AES encryption type (AES128 and AES256Triple DES encryption type is specified ) in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Solaris 10 and MIT Kerberos.

    The AES encryption type is specified in the Kerberos configuration file under the libdefaults section. It is specified as follows, with the following tags: default_tkt_enctypes, default_tgs_enctypes, permitted_enctypes.

    (AES128 encryption type)

    aes128-cts
    aes128-cts-hmac-sha1-96

     (AES256 encryption type)

    aes256-cts
    aes256-cts-hmac-sha1-96

     NOTE: The JCE framework within JDK includes an ability to enforce restrictions regarding the cryptographic algorithms and maximum cryptographic strengths available to applications. Such restrictions are specified in "jurisdiction policy files." The jurisdiction policy files bundled in Java SE limit the maximum key length. Hence, to use the AES256 encryption type, you will need to install the JCE crypto policy with the unlimited version to allow AES with 256-bit key.

    For example, the libdefaults section in the configuration file might include the following.

    default_tkt_enctypes = aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
    default_tgs_enctypes = aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
    permitted_enctypes = aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc

     default_tkt_enctypes is used to specify the encryption types to use for the session key in the ticket-granting-ticket. It is used by the client to restrict the encryption types of session keys that will be used to communicate with the KDC. The default value is des-cbc-md5 des-cbc-crc des3-cbc-sha1 aes128-cts .

    default_tgs_enctypes is used to specify the encryption types to use for the session key in service tickets. It is used by the client to restrict the encryption types of session keys that are shared by the client and server. The default value is des-cbc-md5 des-cbc-crc des3-cbc-sha1 aes128-cts.

    permitted_enctypes is used to specify the encryption types permitted to be used by a service. It is used by the server to restrict the encryption types of session keys that it will accept. The default value is des-cbc-md5 des-cbc-crc des3-cbc-sha1 aes128-cts.
  • Support for RC4-HMAC encryption type

    Java SE 5.0 already supports DES and Triple DES encryption type, with following aliases:
    des-cbc-md5
    des-cbc-crc
    des3-cbc-sha1

     Starting from Java SE 6, support for the RC4-HMAC encryption type in Java GSS/Kerberos is available. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Windows, Solaris 10, and MIT Kerberos. Windows Active Directory supports RC4-HMAC as the default Kerberos encryption type.

    The RC4-HMAC encryption type is specified in the Kerberos configuration file under the libdefaults section. It is specified as follows, with the following tags: default_tkt_enctypes, default_tgs_enctypes, permitted_enctypes.

    rc4-hmac
    arcfour-hmac
    arcfour-hmac-md5

     For example, the libdefaults section in the configuration file might include the following.

    default_tkt_enctypes = aes128-cts des3-cbc-sha1 rc4-hmac des-cbc-md5 des-cbc-crc
    default_tgs_enctypes = aes128-cts des3-cbc-sha1 rc4-hmac des-cbc-md5 des-cbc-crc
    permitted_enctypes = aes128-cts des3-cbc-sha1 rc4-hmac des-cbc-md5 des-cbc-crc

     default_tkt_enctypes is used to specify the encryption types to use for the session key in the ticket-granting-ticket. It is used by the client to restrict the encryption types of session keys that will be used to communicate with the KDC. The default value is des-cbc-md5 des-cbc-crc rc4-hmac des3-cbc-sha1 aes128-cts

    default_tgs_enctypes is used to specify the encryption types to use for the session key in service tickets. It is used by the client to restrict the encryption types of session keys that are shared by the client and server. The default value is des-cbc-md5 des-cbc-crc rc4-hmac des3-cbc-sha1 aes128-cts.

    permitted_enctypes is used to specify the encryption types permitted to be used by a service. It is used by the server to restrict the encryption types of session keys that it will accept. The default value is des-cbc-md5 des-cbc-crc rc4-hmac des3-cbc-sha1 aes128-cts.

  • Support for SPNEGO in the Java GSS API

    Java SE now supports SPNEGO mechanism in the Java GSS API.

    The Java GSS API is a framework that can support multiple security mechanisms; however GSS-API does not prescribe the method by which peers can establish whether they have a common security mechanism. The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism is a pseudo security mechanism that enables GSS-API peers to securely negotiate a common security mechanism to be used. The SPNEGO protocol is used to negotiate which security mechanism should be adopted.

    Currently Java GSS applications specify a unique object identifier (OID) to select the underlying security mechanism. For example, Java GSS applications specify the OID "1.2.840.113554.1.2.2 to use the Kerberos mechanism. This would be coded as follows:
    Oid mechOid = new Oid("1.2.840.113554.1.2.2");

    To select the SPNEGO security mechanism, Java GSS applications would need to specify the SPNEGO mechanism OID "1.3.6.1.5.5.2". Oid mechOid = new Oid("1.3.6.1.5.5.2);

    Support for SPNEGO improves interoperability with Microsoft products. The SPNEGO protocol is heavily used to interoperate with Microsoft server over HTTP, to support HTTP-Based Cross-Platform Authentication via the Negotiate Protocol. Java SE now supports the SPNEGO authentication scheme in HTTP as well. Check the list of new networking features for Java SE 6.

  • Support for new pre-authentication mechanisms

    Java SE now includes support for the new pre-authentication mechanisms.

    Kerberos is a protocol for verifying the identity of principals. The Kerberos protocol provides a mechanism called pre-authentication for proving the identity of a principal and for better protecting the long-term secret of the principal.

    The Kerberos specification defines a framework for Kerberos pre-authentication mechanisms. The latest Kerberos specification defines new pre-authentication mechanisms to notify the client which key to use, salt updates, and other additional parameters. The new pre-authentication mechanisms indicate a requirement for additional pre-authentication.

    With the support of new pre-authentication mechanisms, Java GSS/Kerberos client can now handle the salt value updates when required.

  • Native platform GSS integration

    This feature allows Java applications to take advantage of features in native GSS implementation available on the platform. To enable Java GSS to delegate to the native GSS library and its list of native mechanisms, set the system property "sun.security.jgss.native" to true. When enabled, Java GSS would look for a native GSS library using the operating system-specific name. For example, for Solaris, libgss.so or for Linux, libgssapi.so. If the desired GSS library has a different name or is not located under a directory for system libraries, then its full path should be specified using the system property "sun.security.jgss.lib".

    For Java SE 6, native GSS support is limited to Solaris and Linux. Setting these system properties on platforms where native GSS integration is not supported will be ignored.

    Unlike the default Java GSS implementation, which relies on the JAAS KerberosLoginModule for initial credential acquisition, when using native GSS, the initial credential should be acquired beforehand. That is, call kinit prior to calling JGSS APIs.

    In addition, when performing operations as a particular Subject, for example, Subject.doAs(...) or Subject.doAsPrivileged(...), the to-be-used GSSCredential should be added to Subject's private credential set. Otherwise, the GSS operations will fail since no credential is found.

  • JAAS Login Entry Names Changes

    The JAAS login entry names for both SunJSSE and JGSS are unified, and can be specified separately for different mechanisms. For Kerberos 5, the names are
    com.sun.security.jgss.krb5.initiate
com.sun.security.jgss.krb5.accept

Java Generic Security Services API and Kerberos Enhancements for Java SE 5.0

The following enhancements were added to the Java Generic Security Services API (Java GSS) and Kerberos implementation in Java SE 5.0.

  • Support for Triple DES encryption type
    Prior to Java SE 5.0, only the DES encryption type was supported. Java SE 5.0 supports both DES and Triple DES encryption types. This improves interoperability of the Java SE Kerberos implementation with other Kerberos implementations, such as Solaris 10 and MIT Kerberos.

    The Triple DES encryption type is specified in the Kerberos configuration file under the "libdefaults" section. It is specified as "des3-cbc-sha1" with the following tags: default_tkt_enctypes, default_tgs_enctypes, permitted_enctypes. "dec3-cbc-sha1" has the following aliases:

    des3-hmac-sha1
des3-cbc-sha1-kd
des3-cbc-hmac-sha1-kd
    For example, the libdefaults section in the configuration file might include the following.
    default_tkt_enctypes = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tgs_enctypes = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
permitted_enctypes   = des3-cbc-sha1 des-cbc-md5 des-cbc-crc
    default_tkt_enctypes is used to specify the encryption types to use for the session key in the ticket-granting-ticket. It is used by the client to restrict the encryption types of session keys that will be used to communicate with the KDC. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1".

    default_tgs_enctypes is used to specify the encryption types to use for the session key in service tickets. It is used by the client to restrict the encryption types of session keys that are shared by the client and server. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1".

    permitted_enctypes is used to specify the encryption types permitted to be used by a service. It is used by the server to restrict the encryption types of session keys that it will accept. The default value is "des-cbc-md5 des-cbc-crc des3-cbc-sha1".

  • TCP vs. UDP Preference Configuration
    Java SE now supports the use of the "udp_preference_limit" property in the Kerberos configuration file (krb5.conf).

    When sending a message to the KDC, the Java SE Kerberos library will use TCP if the size of the message is larger than udp_preference_list. If the message is smaller than udp_preference_list, then UDP will be tried at most three times. If the KDC indicates that the request is too big, the Java SE Kerberos library will use TCP.

  • IPv6 Support in Kerberos
    Java SE now supports IPv6 addresses in Kerberos tickets. Prior to Java SE 5, only IPv4 addresses were supported in tickets.
  • TGT Renewals
    The Java Authentication and Authorizaton Server (JAAS) Kerberos login module in JDK 5.0, Krb5LoginModule, now supports Ticket Granting Ticket (TGT) renewal. This allows long-running services to renew their TGT automatically without user interaction or requiring the services to restart.

    With this feature, if Krb5LoginModule obtains an expired ticket from the ticket cache, then the TGT will be automatically renewed and be added to Subject of the caller who requested the ticket. If the ticket cannot be renewed for any reason, then Krb5LoginModule will use its configured callback handler to retrieve a username and password to acquire a new TGT.

    To use this feature, configure Krb5LoginModule to use the ticket cache and set the newly introduced renewTGT option to true. Here is an example of a JAAS login configuration file that requests TGT renewal.

    server {
  com.sun.security.auth.module.Krb5LoginModule required
        principal=principal@your_realm
        useTicketCache=true
        renewTGT=true;
};
    Note that if renewTGT is set to true, then useTicketCache must also be set to true; otherwise, it results in a configuration error.
  • Login Entry Names for SunJSSE
    In JDK 5.0, the SunJSSE provider has added support for the Kerberos cipher suites, as described in RFC 2712 and the section Kerberos Requirements in the JSSE Reference Guide. The following JAAS login configuration index names are reserved for this feature.
    com.sun.net.ssl.server
com.sun.net.ssl.client
    When a JSSE application uses the Kerberos cipher suites without an explicit JAAS program, the SunJSSE provider will use these index names to find and configure the JAAS login module to acquire the necessary Kerberos credentials. For example, such an application might have the following JAAS configuration file.
     com.sun.net.ssl.server {
  com.sun.security.auth.module.Krb5LoginModule required
        principal=service_principal@your_realm
        useKeyTab=true
        keyTab=keytab_name
        storeKey=true;
};
    If the entry is not found, then the default "other" index name will be used. The service name for TLS is "host". For example, a TLS service running on a machine named "raven.example.com" in the realm named "KRBNT-OPERATIONS.EXAMPLE.COM" would have the service principal name
    host/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM
    There are no restrictions on the TLS client; it may use any valid Kerberos principal name.

    When a JSSE application uses the Kerberos cipher suites with an explicit JAAS program, it can use any index name, including the ones listed previously.

New Features in Java GSS for Java 2 SDK, Standard Edition, v 1.4.2

  • Configurable Kerberos Settings
    The Kerberos Key Distribution Center (KDC) name and realm settings are provided in the Kerberos configuration file or via the system properties java.security.krb5.kdc and java.security.krb5.realm. In previous releases, changes to the Kerberos configuration values would only take effect when an application was restarted.

    In the 1.4.2 release of the Java platform, a new boolean option refreshKrb5Config can be specified in the entry for Krb5LoginModule in the JAAS configuration file. If this option is set to true, then the configuration values will be refreshed before the login method of the Krb5LoginModule is called.

  • Support for Slave Kerberos Key Distribution Center
    Kerberos allows the use of slave KDCs so that if the master KDC is unavailable, the slave KDCs will respond to user requests. In earlier releases of Java SE, Sun's implementation of Kerberos tried only the master KDC and would give up if there was no response within the default KDC timeout specified in the Kerberos configuration file, or 30 seconds if no timeout had been specified.

    With this 1.4.2 release, Sun's implementation of Kerberos will retry with the slave KDCs, if they are specified. The slave KDCs can be specified in the Kerberos configuration file or via a list of KDCs separated by a colon (:) in the system property java.security.krb5.kdc.

  • Support TCP for Kerberos Key Distribution Center Transport
    Sun's implementation of Kerberos implements Kerberos version 5 according to RFC 1510 and uses UDP transport for ticket requests. A new Internet draft updates this RFC. One of the added features is required support for TCP as a transport in addition to UDP. As a result, in cases where Kerberos tickets exceed the UDP packet size limit, the KDC would return an error code indicating that the request should be resent over TCP.

    In the current 1.4.2 release, Sun's implementation of Kerberos now supports automatic fallback to TCP. Therefore, if the Kerberos ticket request using UDP fails and the KDC returns the error code KRB_ERR_RESPONSE_TOO_BIG, then TCP is automatically the default transport.

  • Kerberos Service Ticket in the Subject's Private Credentials
    The Kerberos service ticket is now stored in the Subject's private credentials. This change allows application developers access to the service ticket so that it can be used outside the JGSS (for example, in native applications or for proprietary uses). In addition, the service ticket can now be reused if the application tries to establish a security context to the same service again. The service ticket should be valid for it to be reusable.

    Previously, when using Java Generic Security Services API (JGSS) over Kerberos V5, if the useSubjectCredsOnly property was set to true, then the Ticket Granting Ticket (TGT) was retrieved from the Subject and used to establish a GSS Security context. The service ticket obtained was not stored in the Subject. Now the service ticket is also stored in the Subject if useSubjectCredsOnly is true.

    If a client application searches through the Subject's private credentials, in previous releases it would find only the TGT. As of this release, it also will find any Service tickets obtained.

    The bug report associated with this change is 4688866.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Single Sign-on Using Kerberos in Java

Mayank Upadhyay
Ram Marti

ABSTRACT

A significant enhancement to the Java security architecture is the capability to achieve single sign-on using Kerberos Version 5 in the next release of Java Standard Edition (J2SE). A single sign-on solution lets users authenticate themselves just once to access information on any of several systems. This is done using JAAS for authentication and authorization and Java GSS-API to establish a secure context for communication with a peer application. Our focus is on Kerberos V5 as the underlying security mechanism for single sign-on, although other security mechanisms may be added in the future.

INTRODUCTION

With the increasing use of distributed systems users need to access resources that are often remote. Traditionally users have had to sign-on to multiple systems, each of which may involve different usernames and authentication techniques. In contrast, with single sign-on, the user needs to authenticate only once and the authenticated identity is securely carried across the network to access resources on behalf of the user.

In this paper we discuss how to use single sign-on based on the Kerberos V5 protocol. We use the Java Authentication and Authorization Service (JAAS) to authenticate a principal to Kerberos and obtain credentials that prove its identity. We show how Sun's implementation of a Kerberos login module can be made to read credentials from an existing cache on platforms that contain native Kerberos support. We then use the Java Generic Security Service API (Java GSS-API) to authenticate to a remote peer using the previously obtained Kerberos credentials. We also show how to delegate Kerberos credentials for single sign-on in a multi-tier environment.

KERBEROS V5

Kerberos V5 is a trusted third party network authentication protocol designed to provide strong authentication using secret key cryptography. When using Kerberos V5, the user's password is never sent across the network, not even in encrypted form, except during Kerberos V5 administration. Kerberos was developed in the mid-1980's as part of MIT's Project Athena. A full description of the Kerberos V5 protocol is beyond the scope of this paper. For more information on the Kerberos V5 protocol please refer to [1] and [2]

Kerberos V5 is a mature protocol and has been widely deployed. It is available on Solaris as SEAM and on Windows 2000 and several other platforms. A free reference implementation in C is available from MIT. For these reasons we have selected Kerberos V5 as the underlying technology for single sign-on in J2SE.

JAVA AUTHENTICATION AND AUTHORIZATION SERVICE (JAAS)

Until recently the Java 2 security architecture solely determined privileges by the origin of the code and the public key certificates matching the code signers. However, in a multi-user environment it is desirable to further specify privileges based on the authenticated identity of the user running the code.

JAAS supplies such a capability. JAAS is a pluggable framework and programming interface specifically targeted for authentication and access control based on the authenticated identities.

Authentication and Authorization

The JAAS framework can be divided into two components: an authentication component and an authorization component.

The JAAS authentication component provides the ability to reliably and securely determine who is currently executing Java code, regardless of whether the code is running as an application, an applet, a bean, or a servlet.

The JAAS authorization component supplements the existing Java security framework by providing the means to restrict the executing Java code from performing sensitive tasks, depending on its codesource and depending on who is executing the code.

Pluggable and Stackable Framework

JAAS authentication framework is based on Pluggable Authentication Module (PAM)[3, 4]. JAAS authentication is performed in a pluggable fashion allowing system administrators to add appropriate authentication modules. This permits Java applications to remain independent of underlying authentication technologies, and new or updated authentication technologies can be seamlessly configured without requiring modifications to the application itself.

JAAS authentication framework also supports the stacking of authentication modules. Multiple modules can be specified and they are invoked by the JAAS framework in the order they were specified. The success of the overall authentication depends on the results of the individual authentication modules.

Subject

JAAS uses the term Subject to refer to any entity that is the source of a request to access resources. A Subject may be a user or a service. Since an entity may have many names or principals JAAS uses Subject as an extra layer of abstraction that handles multiple names per entity.Thus a Subject is comprised of a set of principals. There are no restrictions on principal names.

A Subject is only populated with authenticated principals. Authentication typically involves the user providing proof of identity, such as a password.

A Subject may also have security related attributes, which are referred to as credentials. The credentials can be public or private. Sensitive credentials such as private cryptographic keys are stored in the private credentials set of the Subject.

The Subject class has methods to retrieve the principals, public credentials and private credentials associated with it.

Please note that different permissions may be required for operations on these classes. For example AuthPermission("modifyPrincipals") may be required to modify the principal set of the Subject. Similar permissions are required to modify the public credentials, private credentials and to get the current Subject.

doAs and doAsPrivileged

Java 2 enforces runtime access controls via java.lang.SecurityManager. The SecurityManager is consulted anytime sensitive operations are attempted. The SecurityManager delegates this responsibility to java.security.AccessController. The AccessController obtains a current image of the AccessControlContext and verifies that it has sufficient permission to do the operation requested.

JAAS provides two methods doAs and doAsPrivileged that can be used to associate an authenticated Subject with the AccessControlContext dynamically.

The doAs method associates the Subject with the current thread's access control context and subsequent access control checks are made on the basis of the code being executed and the Subject executing it.

public static Object doAs(final Subject subject,
                          final  PrivilegedAction action)

public static Object doAs(final Subject subject,
                          final  PrivilegedExceptionAction action)
    throws  PrivilegedActionException;

Both forms of the doAs method first associate the specified subject with the current Thread's AccessControlContext, and then execute the action. This achieves the effect of having the action run as the Subject. The first method can throw runtime exceptions but normal execution has it returning an Object from the run() method of its action argument. The second method behaves similarly except that it can throw a checked PrivilegedActionException from its run() method. An AuthPermission("doAs") is required to call the doAs methods.

The following methods also execute code as a particular Subject:

public static Object doAsPrivileged(final Subject subject,
                                    final  PrivilegedAction action,
                                    final  AccessControlContext  acc);

public static Object doAsPrivileged(final Subject subject,
                                    final PrivilegedExceptionAction action,
                                    final  AccessControlContext acc)
   throws PrivilegedActionException;

The doAsPrivileged method behaves exactly as doAs, except that it allows the caller to specify an access control context. Thus it effectively throws away the current AccessControlContext and authorization decisions will be based on the AccessControlContext passed in.

Since the AccessControlContext is set on a per thread basis, different threads within the JVM can assume different identities. The Subject associated with a specific AccessControlContext can be retrieved by using the following method:

public static Subject getSubject(final AccessControlContext acc);

LoginContext

The LoginContext class provides the basic methods used to authenticate Subjects. It also allows an application to be independent of the underlying authentication technologies. The LoginContext consults a configuration that determines the authentication services or LoginModules configured for a particular application. If the application does not have a specific entry, it defaults to the entry identified as "other".

To support the stackable nature of LoginModules, LoginContext performs authentication in two phases. In the first phase or login phase, it invokes each configured LoginModule to attempt the authentication. If all the necessary LoginModules succeed, then LoginContext enters the second phase where it invokes each LoginModule again to formally commit the authentication process. During this phase the Subject is populated with the authenticated principals and their credentials. If either of the phase fails, then the LoginContext invokes each configured module to abort the entire authentication attempt. Each LoginModule then cleans up any relevant state associated with the authentication attempt.

LoginContext has four constructors that can be used to instantiate it. All of them require the configuration entry name to be passed. In addition the Subject and/or a CallbackHandler can also be passed to the constructors.

Callbacks

The login modules invoked by JAAS must be able to garner information from the caller for authentication. For example the Kerberos login module may require users to enter their Kerberos password for authentication.

The LoginContext allows the application to specify a callbackhandler that the underlying login modules use to interact with users. There are two callback handlers available in Merlin (J2SE 1.4) - one based on the command line and another based on a GUI.

LoginModules

Sun provides an implementation of the UnixLoginModule, NTLoginModule, JNDILoginModule, KeyStoreLoginModule and Krb5LoginModule in Merlin. A smart card based JAAS login module is available from GemPlus [5].

The Kerberos Login Module

The class com.sun.security.auth.module.Krb5LoginModule is Sun's implementation of a login module for the Kerberos version 5 protocol. Upon successful authentication the Ticket Granting Ticket (TGT) is stored in the Subject's private credentials set and the Kerberos principal is stored in the Subject's principal set.

Based on certain configurable options, Krb5LoginModule can also use an existing credentials cache, such as a native cache in the operating system, to acquire the TGT and/or use a keytab file containing the secret key to implicitly authenticate a principal. Both the Solaris and Windows 2000 platforms contain a credentials cache that Krb5LoginModule can use for fetching the TGT. Solaris also contains a system wide keytab file that Krb5LoginModule can use for fetching the secret key. On all platforms, Krb5LoginModule supports options to set the file path to a ticket cache or keytab file of choice. This is useful when third-party Kerberos support is installed and Java integration is desired. Please consult the documentation for Krb5LoginModule to learn about these options. In the absence of a native cache or keytab, the user will be prompted for the password and the TGT obtained from the KDC.

Figure 1 provides a sample JAAS login configuration entry for a client application. In this example, Krb5LoginModule will use the native ticket cache to get the TGT available in it. The authenticated identity will be the identity of the Kerberos principal that the TGT belongs to.

SampleClient {
    com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true
};
             Figure 1. Sample client  configuration entry

Figure 2 provides a sample login configuration entry for a server application. With this configuration, the secret key from the keytab is used to authenticate the principal "nfs/bar.example.com" and both the TGT obtained from the Kerberos KDC and the secret key are stored in the Subject's private credentials set. The stored key may be used later to validate a service ticket sent by a client (See the section on Java GSS-API.)

SampleServer {
     com.sun.security.auth.module.Krb5LoginModule
         required useKeyTab=true storeKey=true principal="nfs/bar.example.com"
};

             Figure 2. Sample server configuration entry

In the client code example shown in Figure 3, the configuration entry "SampleClient" will be used by the LoginContext. The TextCallbackHandler class will be used to prompt the user for the Kerberos password. Once the user has logged in, the Subject will be populated with the Kerberos Principal name and the TGT. Thereafter the user can execute code using Subject.doAs passing in the Subject obtained from the LoginContext.

LoginContext lc = null;

try {
        lc = new LoginContext("SampleClient", new TextCallbackHandler());
        // attempt authentication
        lc.login();
} catch (LoginException le) {
    ...
}

 // Now try to execute ClientAction as the authenticated Subject

 Subject mySubject = lc.getSubject();
 PrivilegedAction action = new ClientAction();
 Subject.doAs(mySubject, action);

            Figure 3. Sample client code

ClientAction could be an action that is allowed only for authenticated Kerberos client Principals with a specific value.

Figure 4 shows server side sample code. It is similar to the client code shown in Figure 4 except for the application entry name and the PrivilegedAction.

LoginContext lc = null;

try {
        lc = new LoginContext("SampleServer", new TextCallbackHandler());
        // attempt authentication
        lc.login();
} catch (LoginException le) {
   ...
}

// Now try to execute ServerAction as the authenticated Subject

Subject mySubject = lc.getSubject();
PrivilegedAction action = new ServerAction();
Subject.doAs(mySubject, action);

            Figure 4. Sample server code

Kerberos Classes

To enable other vendors to provide their own Kerberos login module implementation that can be used with Java GSS-API, three standard Kerberos classes have been introduced in the javax.security.auth.kerberos package. These are KerberosPrincipal for Kerberos principals, KerberosKey for the long-term Kerberos secret key and KerberosTicket for Kerberos tickets. All implementations of the Kerberos login module must use these classes to store principals, keys and tickets in the Subject.

Authorization

Upon successful authentication of a Subject, access controls can be enforced based upon the principals associated with the authenticated Subject. The JAAS principal based access controls augment the CodeSource access controls of Java 2. Permissions granted to a Subject are configured in Policy, which is an abstract class for representing the system wide access control policy. Sun provides a file based implementation of the Policy class. The Policy class is provider based so that others can provide their own policy implementation.

JAVA GENERIC SECURITY SERVICE APPLICATION PROGRAM INTERFACE (Java GSS-API)

Generic Security Service API (GSS-API)

Enterprise applications often have varying security requirements and deploy a range of underlying technologies to achieve this. In such a scenario how do we develop a client-server application so that it can easily migrate from one technology to another? The GSS-API was designed in the Common Authentication Technology working group of the IETF to solve this problem by providing a uniform application programming interface for peer to peer authentication and secure communication that insulates the caller from the details of the underlying technology.

The API, described in a language independent form in RFC 2743 [6], accommodates the following security services: authentication, message confidentiality and integrity, sequencing of protected messages, replay detection, and credential delegation. The underlying security technology or "security mechanism" being used, has a choice of supporting one or more of these features beyond the essential one way authentication.Footnote 1

There are mainly two standard security mechanisms that the IETF has defined: Kerberos V5 [6] and the Simple Public Key Mechanism (SPKM) [8].

The API is designed such that an implementation may support multiple mechanisms simultaneously, giving the application the ability to choose one at runtime. Mechanisms are identified by means of unique object identifier's (OID's) that are registered with the IANA. For instance, the Kerberos V5 mechanism is identified by the OID {iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) krb5(2)}.

Another important feature of the API is that it is token based. i.e., Calls to the API generate opaque octets that the application must transport to its peer. This enables the API to be transport independent.

Multi-mechanism GSS-API

Figure 5. A multi-mechanism GSS-API implementation

Java GSS-API

The Java API for the Generic Security Service was also defined at the IETF and is documented in RFC 2853 [10]. Sun is pursuing the standardization of this API under the Java Community Process (JCP) [11] and plans to deliver a reference implementation with Merlin. Because the JCP is merely endorsing this externally defined API, the IETF assigned package namespace "org.ietf.jgss" will be retained in Merlin.

Sun's implementation of Java GSS-API, will initially ship with support for the Kerberos V5 mechanism only. Kerberos V5 mechanism support is mandatory for all Java GSS-API implementations in Java SE, although they are free to support additional mechanisms. In a future release, a Service Provider Interface (SPI) will be added so that new mechanisms can be configured statically or even at runtime. Even now the reference implementation in Merlin will be modular and support a private provider SPI that will be converted to public when standardized.

The Java GSS-API framework itself is quite thin, and all security related functionality is delegated to components obtained from the underlying mechanisms. The GSSManager class is aware of all mechanism providers installed and is responsible for invoking them to obtain these components.

The implementation of the default GSSManager that will ship with Java SE is obtained as follows:

GSSManager manager = GSSManager.getInstance();

The GSSManager can be used to configure new providers and to list all mechanisms already present. The GSSManager also serves as a factory class for three important interfaces: GSSName, GSSCredential, and GSSContext. These interfaces are described below with the methods to instantiate their implementations. For a complete API specification, readers are referred to [9] and [11].

Most calls to Java GSS-API throw a GSSException that encapsulate problems that occur both within the GSS-API framework, and within the mechanism providers.

The GSSName Interface

This interface represents an entity for the purposes of Java GSS-API. An implementation of this interface is instantiated as follows:

GSSName GSSManager.createName(String name, Oid nameType)
    throws GSSException

For Example:

GSSName clientName = manager.createName("duke", GSSName.NT_USER_NAME);

This call returns a GSSName that represents the user principal "duke" at a mechanism independent level. Internally, it is assumed that each supported mechanism will map the generic representation of the user to a more mechanism specific form. For instance a Kerberos V5 mechanism provider might map this name to duke@EXAMPLE.COM where EXAMPLE.COM is the local Kerberos realm. Similarly, a public key based mechanism provider might map this name to an X.509 Distinguished Name.

If we were referring to a principal that was not a user, but some sort of service, we would indicate that to the Java GSS-API call so that the mechanism knows to interpret it differently.

Example:

GSSName serverName = manager.createName("nfs@bar.example.com",
                                         GSSName.NT_HOSTBASED_SERVICE);

The Kerberos V5 mechanism would map this name to the Kerberos specific form nfs/bar.example.com@EXAMPLE.COM where EXAMPLE.COM is the realm of the principal. This principal represents the service nfs running on the host machine bar.example.com.

Sun's implementation of the GSSName interface is a container class. The container class lazily asks the individual providers to perform their mapping when their mechanism is used and then stores each mapped element in a set of principals. In this respect an implementation of GSSName is similar to the principal set stored in a Subject. It may even contain the same elements that are in a Subject's principal set, but its use is restricted to the context of Java GSS-API.

The name element stored by the Sun Kerberos V5 provider is an instance of a subclass of javax.security.auth.kerberos.KerberosPrincipal.

The GSSCredential Interface

This interface encapsulates the credentials owned by one entity. Like the GSSName, this interface too is a multi-mechanism container.

Its implementation is instantiated as follows:

GSSCredential createCredential(GSSName name,
                               int lifetime,
                               Oid[] desiredMechs,
                               int usage)

    throws GSSException

Here is an example of this call on the client side:

GSSCredential clientCreds =
               manager.createCredential(clientName,
                                        8*3600,
                                        desiredMechs,
                                        GSSCredential.INITIATE_ONLY);

The GSSManager invokes the providers of the mechanisms listed in the desiredMechs for credentials that belong to the GSSName clientName. Additionally, it imposes the restriction that the credential must be the kind that can initiate outbound requests (i.e., a client credential), and requests a lifetime of 8 hours for it. The returned object contains elements from a subset of desiredMechs that had some credential available to satisfy this criteria. The element stored by the Kerberos V5 mechanism is an instance of a subclass of javax.security.auth.kerberos.KerberosTicket containing a TGT that belongs to the user.

Credential acquisition on the server side occurs as follows:

GSSCredential serverCreds =
          manager.createCredential(serverName,
                                   GSSCredential.INDEFINITE_LIFETIME,
                                   desiredMechs,
                                   GSSCredential.ACCEPT_ONLY);

The behavior is similar to the client case, except that the kind of credential requested is one that can accept incoming requests (i.e., a server credential). Moreover, servers are typically long lived and like to request a longer lifetime for the credentials such as the INDEFINITE_LIFETIME shown here. The Kerberos V5 mechanism element stored is an instance of a subclass of javax.security.auth.kerberos.KerberosKey containing the secret key of the server.

This step can be an expensive one, and applications generally acquire a reference at initialization time to all the credentials they expect to use during their lifetime.

The GSSContext Interface

The GSSContext is an interface whose implementation provides security services to the two peers.

On the client side a GSSContext implementation is obtained with the following API call:

GSSContext GSSManager.createContext(GSSName peer,
                                    Oid mech,
                                    GSSCredential clientCreds,
                                    int lifetime)
    throws GSSException

This returns an initialized security context that is aware of the peer that it must communicate with and the mechanism that it must use to do so. The client's credentials are necessary to authenticate to the peer.

On the server side the GSSContext is obtained as follows:

GSSContext GSSManager.createContext(GSSCredential serverCreds)
    throws GSSException

This returns an initialized security context on the acceptor's side. At this point it does not know the name of the peer (client) that will send a context establishment request or even the underlying mechanism that will be used. However, if the incoming request is not for service principal represented by the credentials serverCreds, or the underlying mechanism requested by the client side does not have a credential element in serverCreds, then the request will fail.

Before the GSSContext can be used for its security services it has to be established with an exchange of tokens between the two peers. Each call to the context establishment methods will generate an opaque token that the application must somehow send to its peer using a communication channel of its choice.

The client uses the following API call to establish the context:

byte[] GSSContext.initSecContext(byte[] inToken,
                                 int offset,
                                 int len)

   throws GSSException

The server uses the following call:

byte[] acceptSecContext(byte[] inToken,
                        int offset,
                        int len)

   throws GSSException

These two methods are complementary and the input accepted by one is the output generated by the other. The first token is generated when the client calls initSecContext for the first time. The arguments to this method are ignored during that call. The last token generated depends on the particulars of the security mechanism being used and the properties of the context being established.

The number of round trips of GSS-API tokens required to authenticate the peers varies from mechanism to mechanism and also varies with characteristics such as whether mutual authentication or one-way authentication is desired. Thus each side of the application must continue to call the context establishment methods in a loop until the process is complete.

In the case of the Kerberos V5 mechanism, there is no more than one round trip of tokens during context establishment. The client first sends a token generated by its initSecContext() containing the Kerberos AP-REQ message [2]. In order to generate the AP-REQ message, the Kerberos provider obtains a service ticket for the target server using the client's TGT. The service ticket is encrypted with the server's long-term secret key and is encapsulated as part of the AP-REQ message. After the server receives this token, it is passed to the acceptSecContext() method which decrypts the service ticket and authenticates the client. If mutual authentication was not requested, both the client and server side contexts would be established, and the server side acceptSecContext() would generate no output.

However, if mutual authentication were enabled, then the server's acceptSecContext() would generate an output token containing the Kerberos AP-REP [2] message. This token would need to be sent back to the client for processing by its initSecContext(), before the client side context is established.

Note that when a GSSContext is initialized on the client side, it is clear what underlying mechanism needs to be used. The Java GSS-API framework can obtain a context implementation from the appropriate mechanism provider. Thereafter, all calls made to the GSSContext object are delegated to the mechanism's context implementation. On the server side, the mechanism to use is not decided until the first token from the client side arrives.

Here is a class showing how the client side of an application would be coded. This is the ClientAction class that was executed using the doAs method in Figure 3:

class ClientAction implements PrivilegedAction {

    public Object run() {
        ...
        ...
        try {
            GSSManager manager = GSSManager.getInstance();
            GSSName clientName =
                manager.createName("duke", GSSName.NT_USER_NAME);
            GSSCredential clientCreds =
                manager.createCredential(clientName,
                                          8*3600,
                                          desiredMechs,
                                          GSSCredential.INITIATE_ONLY);
            GSSName peerName =
                manager.createName("nfs@bar.example.com",
                                    GSSName.NT_HOSTBASED_SERVICE);
            GSSContext secContext =
                manager.createContext(peerName,
                                      krb5Oid,
                                      clientCreds,
                                      GSSContext.DEFAULT_LIFETIME);
            secContext.requestMutualAuth(true);

            // The first input token is ignored
            byte[] inToken = new byte[0];

            byte[] outToken = null;

            boolean established = false;

           // Loop while the context is still not established
           while (!established) {
               outToken =
                   secContext.initSecContext(inToken, 0, inToken.length);

               // Send a token to the peer if one was generated
               if (outToken != null)
                  sendToken(outToken);

               if (!secContext.isEstablished()) {
                  inToken = readToken();
               else
                  established = true;
            }
        } catch (GSSException e) {
             ....
        }
        ...
        ...
    }
}

        Figure 6. Sample client using Java GSS-API

The corresponding section of code on the server side running the ServerAction class from Figure 5 is as follows:

class ServerAction implelemts PrivilegedAction {

    public Object run() {
        ...
        ...
        try {
            GSSManager manager = GSSManager.getInstance();
            GSSName serverName =
                manager.createName("nfs@bar.example.com",
                                    GSSName.NT_HOSTBASED_SERVICE);
            GSSCredential serverCreds =
             manager.createCredential(serverName,
                                       GSSCredential.INDEFINITE_LIFETIME,
                                       desiredMechs,
                                       GSSCredential.ACCEPT_ONLY);
            GSSContext secContext = manager.createContext(serverCreds);

            byte[] inToken = null;
            byte[] outToken = null;

            // Loop while the context is still not established
            while (!secContext.isEstablished()) {
                 inToken = readToken();
                 outToken =
                     secContext.acceptSecContext(inToken, 0, inToken.length);

                  // Send a token to the peer if one was generated
                  if (outToken != null)
                      sendToken(outToken);
            }
        } catch (GSSException e) {
          ...
        }
        ...
        ...
   }
}

             Figure 7. Sample server using Java GSS-API

Message Protection

Once the security context is established, it can be used for message protection. Java GSS-API provides both message integrity and message confidentiality. The two calls that enable this are as follows:

byte[] GSSContext.wrap(byte[] clearText,
                       int offset,
                       int len,
                       MessageProp properties)
    throws GSSException
and
byte[] unwrap(byte[] inToken,
              int offset,
              int len,
              MessageProp properties)
    throws GSSException

The wrap method is used to encapsulate a cleartext message in a token such that it is integrity protected. Optionally, the message can also be encrypted by requesting this through a properties object. The wrap method returns an opaque token that the caller sends to its peer. The original cleartext is returned by the peer's unwrap method when the token is passed to it. The properties object on the unwrap side returns information about whether the message was simply integrity protected or whether it was encrypted as well. It also contains sequencing and duplicate token warnings.

Credential Delegation

Java GSS-API allows the client to securely delegate its credentials to the server, such that the server can initiate other security contexts on behalf of the client. This feature is useful for single sign-on in a multi-tier environment.

Credential delegation in a multi-tier environment

Figure 8. Credential Delegation

The client requests credential delegation prior to making the first call to initSecContext():

void GSSContext.requestCredDeleg(boolean state)
    throws GSSException
by setting state to true.

The server receives the delegated credential after context establishment:

GSSCredential GSSContext.getDelegCred() throws GSSException

The server can then pass this GSSCredential to GSSManager.createContext() pretending to be the client.

In the case of the Kerberos V5 mechanism, the delegated credential is a forwarded TGT that is encapsulated as part of the first token sent from the client to the server. Using this TGT, the server can obtain a service ticket on behalf of the client for any other service.

DEFAULT CREDENTIAL ACQUISITION MODEL

Previously we discussed how an application uses the GSSManager.createCredential() method to populate a GSSCredential object with mechanism specific credentials.The next two sub-sections will focus on how Java GSS-API mechanisms obtain these credentials. The mechanisms do not themselves perform a user login. Instead, the login is performed prior to using Java GSS-API and the credentials are assumed to be stored in some cache that the mechanism provider is aware of. The GSSManager.createCredential() method merely obtains references to those credentials and returns them in a GSS-centric container, the GSSCredential.

In the Java 2 platform we impose the restriction that the credentials cache that Java GSS-API mechanism providers use to obtain these elements must exclusively be the public and private credential sets in the Subject that is on the current access control context.

This model has the advantage that credential management is simple and predictable from the application's point of view. An application, given the right permissions, can purge the credentials in the Subject or renew them using standard Java API's. If it purged the credentials, it would be sure that the Java GSS-API mechanism would fail, or if it renewed a time based credential it would be sure that the mechanism would succeed.

Here is the sequence of events relevant to credential acquisition when the Kerberos V5 mechanism is used by the client application in Figures 3 and 6:

  1. The application invokes a JAAS login, which in turn invokes the configured Krb5LoginModule
  2. Krb5LoginModule obtains a TGT (KerberosTicket) for the user either from the KDC or from an existing ticket cache, and stores this TGT in the private credentials set of a Subject
  3. The application retrieves the populated Subject, then calls Subject.doAs/doAsPrivileged which places this Subject on the access control context of the thread executing ClientAction
  4. ClientAction calls the GSSManager.createCredential method, passing it the Kerberos V5 OID in desiredMechs.
  5. GSSManager.createCredential invokes the Kerberos V5 GSS-API provider, asking for a Kerberos credential for initiating security contexts.
  6. The Kerberos provider obtains the Subject from the current access control context, and searches through its private credential set for a valid KerberosTicket that represents the TGT for the user.
  7. The KerberosTicket is returned to the GSSManager which stores it in a GSSCredential container instance to be returned to the caller.

On the server side, when the Kerberos login is successful in step 2, Krb5LoginModule stores the KerberosKey for the server in the Subject in addition to the KerberosTicket. Later on the KerberosKey is retrieved in steps 5 through 7 and used to decrypt the service ticket that the client sends.

EXCEPTIONS TO THE MODEL

The default credential acquisition model for Java GSS-API requires credentials to be present in the current Subject. Typically, the credentials are placed there after a JAAS login by the application.

There might be cases where an application wishes to use Kerberos credentials from outside the Subject. It is recommended that such credentials be read as part of the initial JAAS login, either by configuring Krb5LoginModule to read them, or by writing a custom login module that reads them. However, some applications might have constrains that either prevent them from using JAAS prior to calling Java GSS-API, or force them to use some Kerberos mechanism provider that does not retrieve credentials from the current Subject.

In order to accommodate such cases while still retaining the standard model for others, the system property javax.security.auth.useSubjectCredsOnly was added. This system property serves as a boolean where a value of true requires that the standard credential acquisition model be followed, and a value of false permits the provider to use any cache of it choice. The default value of this property (when it is not set) will be assumed to be true.

If there is no valid Kerberos credential in the current Subject, and this property is true, then the Kerberos mechanism throws a GSSException. Setting this property to false does not necessarily mean that the provider has to use a cache other than the current Subject, it only gives the provider the latitude to do so if it wishes.

The Sun provider for the Kerberos V5 GSS-API mechanism always obtains credentials from a Subject. If there are no valid credentials in the current Subject, and this property is set to false, then the provider attempts to obtain new credentials from a temporary Subject by invoking a JAAS login itself. It uses the text callback handler for input/output with the user, and the JAAS configuration entry identified by"other" for the list of modules and options to use.Footnote 2

The Sun provider for the Kerberos V5 GSS-API mechanism assumes that one of these modules will be a Kerberos login module. It is possible to configure the modules listed under "other" to read a pre-existing cache so that the user is not unexpectedly prompted for a password in the middle of a Java GSS-API call. The new Subject that is populated by this login is discarded by the Kerberos GSS-API mechanism just as soon as the required credentials are retrieved from it.

WEB-BROWSER INTEGRATION

An important class of applications that should be able to capitalize on Java single sign-on are applets. For this discussion we assume that the browser JRE has all the required packages or the Java plugin is used with a Merlin JRE installed by the user.

One complication in using applets arises mostly out of the fact that before an applet can use Java GSS-API, it must perform a JAAS login. The main problems with this are (a) an increase in the effort required on the part of the applet developer (b)unnecessary repeated login by the same user each time he or she starts an applet.

A good model to solve this problem would be to have the browser (or the Java plugin) perform a JAAS login once at startup. This would provide a Subject that could always be associated with the access control context whenever any Java code was run. As a result, the applet code would not need to perform a JAAS login prior to using Java GSS-API, and the user login would occur just once.

In the absence of this login functionality in the browser (or Java plugin), applets can still avoid having to perform a JAAS login themselves. To do so, the applets would have to set the javax.security.auth.useSubjectCredsOnly system property to false and use a GSS-API mechanism provider that is capable of obtaining credentials from sources other than current Subject. When using a Sun JRE with a Sun Kerberos GSS-API provider, expect the mechanism to perform a JAAS login to obtain new credentials as explained in the previous section. The applet deployer would only need to ensure that the appropriate modules and options are listed in the entry "other" in the JAAS configuration used by the JRE. This saves the applet developer from calling into JAAS API's directly, but it does not stop the repeated JAAS login that might happen with each applet the user runs. However, by configuring the login modules to read a pre-existing native cache, the deployer can both hide the login from the user, and minimize the overhead in the multiple logins. (See how this is done for the JAAS configuration entry "SampleClient" in Figure 1.)

SECURITY RISKS

The convenience of single sign-on also introduces new risks. What happens if a malicious user gains access to your unattended desktop from where he or she can start applets as you? What happens if malicious applets sign on as you to services that they are not supposed to?

For the former, we have no solution but to caution you against leaving your workstation unlocked! For the latter, we have many authorizations checks in place.

To illustrate some details of the permissions model consider an example where your browser has performed a JAAS login at startup time and associated a Subject with all applets that run in it.

The Subject is protected from rogue applets by means of the javax.security.auth.AuthPermission class. This permission is checked whenever code tries to obtain a reference to the Subject associated with any access control context.

Even if an applet were given access to a Subject, it needs a javax.security.auth.PrivateCredentialPermission to actually read the sensitive private credentials stored in it.

Other kinds of checks are to be done by Java GSS-API mechanism providers as they read credentials and establish security contexts on behalf of the credential's owner. In order to support the Kerberos V5 mechanism, two new permission classes have been added with the package javax.security.auth.kerberos:

ServicePermission(String servicePrinicipal, String action)
DelegationPermission(String principals)

As new GSS-API mechanisms are standardized for Java SE, more packages will be added that contain relevant permission classes for providers of those mechanisms.

The Kerberos GSS-API mechanism permission checks take place at the following points in the program's execution:

Credential Acquisition

The GSSManager.createCredential() method obtains mechanism specific credential elements from a cache such as the current Subject and stores them in a GSSCredential container. Allowing applets to acquire GSSCredential freely, even if they cannot use them to do much, is undesirable. Doing so leaks information about the existence of user and service principals. Thus, before an application can acquire a GSSCredential with any Kerberos credential elements in it, a ServicePermission check is made.

On the client side, a successful GSSCredential acquisition implies that a TGT has been accessed from a cache. Thus the following ServicePermission is checked:

ServicePermission("krbtgt/EXAMPLE.COM@EXAMPLE.COM", "initiate");

The service principal krbtgt/EXAMPLE.COM@EXAMPLE.COM represents the ticket granting service (TGS) in the Kerberos realm EXAMPLE.COM, and the action "initiate" suggests that a ticket to this service is being accessed. The TGS service principal will always be used in this permission check at the time of client side credential acquisition.

On the server side, a successful GSSCredential acquisition implies that a secret key has been accessed from a cache. Thus the following ServicePermission is checked:

ServicePermission("nfs/bar.example.com@EXAMPLE.COM", "accept");

Here the service principal nfs/bar.example.com represents the Kerberos service principal and the action "accept" suggests that the secret key for this service is being requested.

Context Establishment

An applet that has permissions to contact a particular server, say the LDAP server, must not instead contact a different server such as the FTP server. Of course, the applet might be restricted from doing so with the help of SocketPermission. However, it is possible to use ServicePermission to restrict it from authenticating using your identity, even if the network connection was permitted.

When the Kerberos mechanism provider is about to initiate context establishment it checks the ServicePermission:

ServicePermission("ftp@EXAMPLE.COM", "initiate");

This check prevents unauthorized code from obtaining and using a Kerberos service ticket for the principal ftp@EXAMPLE.COM.

Providing limited access to specific service principals using this permission is still dangerous. Downloaded code is allowed to communicate back with the host it originated from. A malicious applet could send back the initial GSS-API output token that contains a KerberosTicket encrypted in the target service principal's long-term secret key, thus exposing it to an offline dictionary attack. For this reason it is not advisable to grant any "initiate" ServicePermission to code downloaded from untrusted sites.

On the server side, the permission to use the secret key to accept incoming security context establishment requests is already checked during credential acquisition. Hence, no checks are made in the context establishment stage.

Credential Delegation

An applet that has permission to establish a security context with a server on your behalf also has the ability to request that your credentials be delegated to that server. But not all servers are trusted to the extent that your credentials can be delegated to them. Thus, before a Kerberos provider obtains a delegated credential to send to the peer, it checks the following permission:

DelegationPermission(" \"ftp@EXAMPLE.COM\" \"krbtgt/EXAMPLE.COM@EXAMPLE.COM\" ");

This permission allows the Kerberos service principal ftp@EXAMPLE.COM to receive a forwarded TGT (represented by the ticket granting service krbtgt/EXAMPLE.COM@EXAMPLE.COM).Footnote 3

CONCLUSIONS

In this paper we have presented a framework to enable single sign-on in Java. This requires sharing of credentials between JAAS which does the initial authentication to obtain credentials, and Java GSS-API which uses those credentials to communicate securely over the wire. We have focused on Kerberos V5 as the underlying security mechanism, but JAAS's stackable architecture and Java GSS-API's multi-mechanism nature allow us to use any number of different mechanisms simultaneously.

The Kerberos login module for JAAS is capable of reading native caches so that users do not have to authenticate themselves beyond desktop login on platforms that support Kerberos. Moreover, the Kerberos V5 mechanism for Java GSS-API allows credentials to be delegated which enables single sign-on in multi-tier environments.

Finally, a number of permissions checks are shown to prevent the unauthorized use of the single-sign on features provided by Kerberos.

ACKNOWLEDGMENTS

We thank Gary Ellison, Charlie Lai, and Jeff Nisewanger for their contribution at each stage of the Kerberos single sign-on project. JAAS 1.0 was implemented by Charlie as an optional package for Kestrel (J2SE 1.3). Gary has been instrumental in designing the permissions model for the Kerberos Java GSS-API mechanism. We are grateful to Bob Scheifler for his feedback on integrating JAAS 1.0 into Merlin and to Tim Blackman for the KeyStoreLoginModule and CallbackHandler implementations. We also thank Bruce Rich, Tony Nadalin, Thomas Owusu and Yanni Zhang for their comments and suggestions. We thank Mary Dageforde for the documentation and tutorials. Sriramulu Lakkaraju, Stuart Ke and Shital Shisode contributed tests for the projects. Maxine Erlund provided management support for the project.

REFERENCES

  1. Neuman, Clifford and Tso, Theodore (1994). Kerberos: An Authentication Service for Computer Networks, IEEE Communications, volume 39 pages 33-38
  2. J.Kohl and C.Neuman. The Kerberos Network Authentication Service (V5) Internet Engineering Task Force, September 1993 Request for Comments 1510
  3. V. Samar and C. Lai. Making Login Services Independent from Authentication Technologies. In Proceedings of the SunSoft Developer's Conference, March 1996.
  4. X/Open Single Sign-On Service (XSSO) - Pluggable Authentication. Preliminary Specification P702, The Open Group, June 1997. http://www.opengroup.org
  5. A Smart Card Login Module for Java Authentication and Authorization Service. http://www.gemplus.com/techno/smartjaas/index.html
  6. J. Linn. Generic Security Service Application Program Interface,Version 2. Internet Engineering Task Force, January 2000 Request for Comments 2743
  7. J. Linn. The Kerberos Version 5 GSS-API Mechanism. Internet Engineering Task Force, June 1996 Request for Comments 1964
  8. C.Adams. The Simple Public-Key GSS-API Mechanism (SPKM). Internet Engineering Task Force, October 1996 Request for Comments 2025
  9. J. Kabat and M.Upadhyay. Generic Security Service API Version 2: Java Bindings. Internet Engineering Task Force, January 1997 Request for Comments 2853
  10. JSR 000072 Generic Security Services API
  11. Java Platform, Standard Edition API Specification

Footnote 1 The GSS-API Kerberos mechanism performs client authentication at the minimum.

Footnote 2 Actually it first tries to use the JAAS configuration entry"com.sun.security.jgss.initiate" for the client and "com.sun.security.jgss.accept" for the server and falls back on the entry for "other", if these entries are missing. This gives system administrators some additional control over its behavior.

Footnote 3 The use of two principal names in this permission allows for finer grained delegation such as proxy tickets for specific services unlike a carte blanche forwarded TGT. Even though the GSS-API does not allow for proxy tickets, another API such as JSSE might support this idea at some point in the future.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The Kerberos 5 GSS-API Mechanism

(Return to Security Contents)

This topic describes and lists security features regarding Java Generic Security Services (Java GSS) for Kerberos 5.

This GSS-API mechanism is defined by RFC 1964, supplemented with RFC 4121 under the Official Internet Protocol Standards process. See RFC 1964 and RFC 4121.

This topic also describes the Object Identifier (OID) for the Kerberos V5 mechanism, in the Official Internet Protocol Standards process, the encryption types, and the krb5.conf settings supported by Java GSS.

Note: Java GSS features have been in each version of Java SE since 1.4.2.

The OID for the Kerberos V5 Mechanism

According to RFC 1964 section 1, the OID for Java Generic Security Services (Java GSS) for Kerberos 5 is defined as 1.2.840.113554.1.2.

Java GSS/Kerberos Supported Encryption Types

Each major release of Java SE has added features or additional supported encryption types for GSS/Kerberos. However, support for new encryption types have been included in update editions of Java SE 5 and Java SE 6.

The following table lists the preferred order of encryption types supported in editions of Java up to Java SE 8.

Java SE 7 Supported Encryption Types
Name | etype Number
aes256-cts | 18
aes128-cts | 17
aes128-cts | 23
des3-cbc-sha1 | 16
des-cbc-md5 | 3
des-cbc-crc | 1

Note that des-cbc-crc and dec-cbc-md5 are disabled by default in JDK 8.

A user can restrict the usage of encryption for various purposes in krb5.conf, in the [libdefaults] section.

For more detailed information about the AES encryption types (AES128 and AES256 and the RC4-HMAC encryption type, see Java GSS for Java SE 6.

For more detailed information about the DES and Triple DES encryption types, see Java GSS for Java SE 5 and Support for Triple DES Encryption.

Supported krb5.conf Settings

In Java SE 7, the following are the supported parameters.

[libdefaults]
default_realm
allow_weak_crypto

dns_lookup_kdc
dns_lookup_realm
dns_fallback

default_checksum
safe_checksum_type
ap_req_checksum_type
default_keytab_name

default_tkt_enctypes
permitted_enctypes
default_tgs_enctypes

no_addresses
noaddresses

renewable
proxiable
forwardable

kdc_default_options
clockskew

kdc_timeout
udp_preference_limit

[realms]
  REALM.NAME = {
    kdc =
  }

[capaths]
  A = {
    I = .
    B = I
  }

[domain_realm]
  domain=REALM

The following are the defaults for the krb5.conf file parameters.
no_addresses = true
noaddresses = true
dns_fallback = true (false in JDK 6)
dns_lookup_kdc = true (false in JDK 6)
dns_lookup_realm = true (false in JDK 6)
allow_weak_crypto = false (true in JDK 7)
kdc_timeout = 30000
max_retries = 3
udp_preference_limit = -1
clockskew = 300
renewable = false
proxiable = false
forwardable = false

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Part III : Deploying for Single Sign-On in a Kerberos Environment

Exercise 6: Deploying for Single Sign-On

Goal of this exercise

The goal of this exercise is to learn how to configure a JAAS application that uses Kerberos for authentication to achieve single sign-on. Single sign-on means that the user needs only authenticate once to a system or a collection of services. After the initial authentication, the user can access other services in the system using the same identity as he used for the initial authentication.

Single sign-on can be used to describe different types of authentication. There are HTTP-based network single sign-on protocols. There is Kerberos-based single sign-on for network services. In this particular exercise, we show how to achieve single sign-on in Kerberos-based systems by showing how to import already-acquired Kerberos credentials from the underlying native operating system.

Background and Resources for this exercise

Single Sign-On Using Kerberos in Java

In addition, see the information provided in Exercise 2 and Exercise 4 for background information about Kerberos and Java GSS.

Steps to follow

  1. Edit the jaas-krb5.conf configuration file.

    This file contains two entries: one named client and one named server. Add the line useTicketCache=true to the client entry.

  2. Perform Kerberos login to the native operating system. To login to Kerberos, use kinit command as follows:

    % kinit test

    Provide a secure password.

  3. Run the client and server programs in Exercises 1 through 5 and you will note that the client applications no longer ask you to enter a password.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Part IV : Secure Communications Using Stronger Encryption Algorithms

Exercise 7: Configuring to Use Stronger Encryption Algorithms in a Kerberos Environment, to Secure the Communication

Goal of this exercise

The goal of this exercise is to learn how to use various Kerberos encryption algorithms to secure the communication. Java GSS/Kerberos provides a wide range of encryption algorythms, including AES256, AES128, 3DES, RC4-HMAC, and DES.

The following is a list of all the encryption types supported by the Java GSS/Kerberos provider in Java SE:

  • AES256-CTS
  • AES128-CTS
  • RC4-HMAC
  • DES3-CBC-SHA1
  • DES-CBC-MD5
  • DES-CBC-CRC

Steps to follow

  1. Configure the Key Distribution Center (KDC) and update the Kerberos database.

    First, you need to update to use the KDC that supports the required Kerberos encryption types, such as Solaris 10 or the latest MIT Kerberos 1.4 from MIT distribution. If you are using Active Directory on a Windows platform, it supports only DES and RC4-HMAC encryption types.

    You need to update the Kerberos database to generate the new keys with stronger encryption algorithms. By default, Solaris 10 KDC will generate the keys for all the above encryption types listed. You can now create a keytab that will include all the keys for all the above encryption types.

    NOTE: If you want to use Windows 2000 KDC, you can configure to use the DES and RC4-HMAC encryption types that are available on Windows.

  2. Edit the Kerberos configuration file (src/krb5.conf).

    You will need to edit the Kerberos configuration file in order to select the desired encryption types used. The required parameters that you will need to insert under the libdefaults section of the Kerberos configuration file are listed below. For the purpose of this exercise, all the required entries have been added to a sample Kerberos configuration file included with the exercise, and the entries have been commented out. To enable the desired encryption type, you only need to uncomment the required entries.

    • To enable AES256-CTS encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = aes256-cts
default_tgs_enctypes = aes256-cts
permitted_enctypes = aes256-cts

      NOTE: Solaris 10 does not support AES256 by default. You will need to install the following packages: SUNWcry, SUNWcryr, SUNWcryptoint. In addition, JCE in Java SE also does not support AES256 by default. You will need to install the JCE crypto policy with the unlimited version to allow AES with 256-bit key.

    • To enable AES128-CTS encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = aes128-cts
default_tgs_enctypes = aes128-cts
permitted_enctypes = aes128-cts

    • To enable RC4-HMAC encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = rc4-hmac
default_tgs_enctypes = rc4-hmac
permitted_enctypes = rc4-hmac

    • To enable DES3-CBC-SHA1 encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = des3-cbc-sha1
default_tgs_enctypes = des3-cbc-sha1
permitted_enctypes = des3-cbc-sha1

    • To enable DES-CBC-MD5 encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = des-cbc-md5
default_tgs_enctypes = des-cbc-md5
permitted_enctypes = des-cbc-md5

    • To enable DES-CBC-CRC encryption type, add the following:

      [libdefaults]
default_tkt_enctypes = des-cbc-crc
default_tgs_enctypes = des-cbc-crc
permitted_enctypes = des-cbc-crc

    NOTE: If the above parameters are not added to the Kerberos configuration file, Solaris 10 will default to use AES128 enctype. If the exportable crypto packages have been installed, it will default to use AES256 enctype.

    NOTE: Destroy any pre-existing Kerberos TGT in the ticket cache from the previous exercise as follows:

    % kdestroy

  3. Launch a new window and start the server using the updated krb5.conf as follows:

    % xterm &
% java -Djava.security.auth.login.config=jaas-krb5.conf \
-Djava.security.krb5.conf=krb5.conf GSSServer

  4. Run the client application using the updated krb5.conf. The GSSClient class takes two parameters: the service name and the name of the server that the service is running on. For example, if the service is host running on the machine j1hol-001, use the following (provide a secure password when prompted):

    % java -Djava.security.auth.login.config=jaas-krb5.conf \
-Djava.security.krb5.conf=krb5.conf \
GSSClient host j1hol-001

Summary

In this exercise, you learned how to write a client-server application that uses Java GSS API to authenticate and communicate securely using stronger Kerberos encryption algorithms. You can enable Kerberos debugging (-Dsun.security.krb5.debug=true), to obtain information about the Kerberos encryption type used.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Part I : Secure Authentication using the Java Authentication and Authorization Service (JAAS)

Exercise 1 : Using the JAAS API

Goal of this exercise

The goal of this exercise is to learn how to use the Java Authentication and Authorization (JAAS) API to perform authentication.

Background for this exercise

JAAS provides a standard pluggable authentication framework (PAM) for the Java platform. An application uses the JAAS API to perform authentication - the process of verifying the identity of the user who is using the application and gathering his identity information into a container called a subject. The application can then use the identity information in the subject along with the JAAS API to make authorization decisions, to decide whether the authenticated user is allowed to access protected resources or perform restricted actions. This exercise demonstrates JAAS Authentication. It does not demonstrate JAAS Authorization.

Resources for this exercise

  • JAAS Reference Guide
  • JAAS Tutorials
  • JAAS javadocs: javax.security.auth, javax.security.auth.callback, javax.security.auth.kerberos, javax.security.auth.login, javax.security.auth.spi, javax.security.auth.x500
  • Java Authentication and Authorization Service

Steps to follow

  1. Read the Jaas.java sample code. The code performs the following tasks:

    1. Define a callback handler or use a predefined one.
    2. Create a LoginContext with a name that identifies which JAAS configuration entry to use.
    3. Perform the authentication.
    4. Define the task that the authenticated user is to perform.
    5. Perform the action as the authenticated user.
    6. Log out.

    Subject.doAs will run the code defined in MyAction as the authenticated user [lines 14-15]. This serves two purposes. First, code in MyAction that requires identity information for authentication to a service could get it from the subject. This exercise demonstrates this use. Second, if MyAction accesses any protected resources/operations, the identity information in the current subject would be used to make the corresponding access control decision. This second aspect is not covered in this exercise.

  2. Make sure that the %JAVA_HOME%/bin is in the PATH environment variable.
  3. Compile the modified sample code. You will run this code in subsequent exercises after doing some set up. That ends this exercise.

Summary

This exercise introduced the main classes of the JAAS APIs: LoginContext and Subject. You learned how to use LoginContext to authenticate a user and collect its identity information in a Subject. You then learned how to use the Subject to perform an action as the authenticated user.

Next Steps

Proceed to Exercise 2 to learn how to configure the sample application to use Kerberos for authentication.

Exercise 2: Configuring JAAS for Kerberos Authentication

Goal of this exercise

The goal of this exercise is to learn how to configure a JAAS application to use Kerberos for authentication.

Kerberos Background for this exercise

Kerberos is an Internet standard protocol for trusted-third party authentication defined in RFC 4120. It is available on most modern computing platforms today, including Solaris, Windows XP, and Linux.

The Kerberos architecture is centered around a trusted authentication service called the key distribution center, or KDC. Users and services in a Kerberos environment are referred to as principals; each principal shares a secret (such as a password) with the KDC. A principal authenticates to Kerberos by proving to the KDC that it knows the shared secret. If the authentication is successful, the KDC issues a ticket-granting-ticket (TGT) to the principal. When the principal subsequently wants to authenticate to a service on the network, such as a directory service or a file service, (thereby, acting as a "client" of the service), it gives the TGT to the KDC to obtain a service ticket to communicate with the service. Not only does the service ticket indicate the identities of the client and service principals, it also contains a session key that can be used by the client and service to subsequently establish secure communication. To authenticate to the service, the client sends the service ticket to the service. When the service receives the ticket, it decodes it using the secret it shares with the KDC.

In this architecture, a principal only authenticates directly (once) to the KDC. It authenticates indirectly to all other services via the use of service tickets. Service tickets are how the KDC vouches for the identity of a principal. The ability of a principal to access multiple secure services by performing explicit authentication only once is called single sign-on.

JAAS Background for this exercise:

In JAAS, for a client principal, "logging into Kerberos" means acquiring the TGT and placing it in the Subject, so that it can be used for authentication with services that the client will access. For a service principal, "logging into Kerberos" means obtaining the secret keys that the service needs to decode incoming client authentication requests.

Resources for this exercise

  • JAAS LoginModule Developer's Guide
  • The Kerberos Network Authentication Service (v5)
  • Example Login Configurations
  • Login module package javadocs: com.sun.security.auth.module
  • The JAAS and Java GSS-API Tutorials

Steps to follow

  1. Examine the jaas-krb5.conf configuration file.

    This file contains two entries, one named client and one named server. The client entry indicates that the LoginContext must use the com.sun.security.auth.module.Krb5LoginModule. The server entry indicates that the LoginContext must use the same login module, and use keys from the sample.keytab file for the principal host/machineName.

  2. Determine the hostname of your machine by executing the hostname command.

  3. Edit this file and change the entry for server principal to use the name of your machine. For example, if your machine name is j1hol-001, this line in the configuration file should look like this:

    principal="host/j1hol-001"

  4. Perform client authentication by typing the following command:

    % java -Djava.security.auth.login.config=jaas-krb5.conf Jaas client

    You will be prompted for a password. You should see the following output. Replace password with a password that is secure.

    Kerberos password for test: password
Authenticated principal: [test@J1LABS.EXAMPLE.COM]
Performing secure action...

  5. Perform server authentication by typing the following command:

    % java -Djava.security.auth.login.config=jaas-krb5.conf Jaas server

    You should see the following output:

    Authenticated principal: [host/j1hol-001@J1LABS.EXAMPLE.COM]
Performing secure action...

Summary

In this exercise, you learned how to configure a JAAS application to use a Kerberos login module, both as a client principal who enters his/her username/password interactively, and as a service principal who gets its keys from a keytab file.

Next Steps

Proceed to Part II to learn how to establish secure communication channels using Java security APIs.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Part V : Secure Authentication Using SPNEGO Java GSS Mechanism

Exercise 8: Using the Java Generic Security Services (GSS) API with SPNEGO

Java GSS is a framework that can support multiple security mechanisms; a way to negotiate a security mechanism underneath GSS-API is needed. This is available via SPNEGO.

SPNEGO is standardized at IETF in RFC 4178. It is a pseudo-security mechanism used to negotiate an underlying security mechanism. It provides the flexibility for client and server to securely negotiate a common GSS security mechanism.

Microsoft makes heavy use of SPNEGO. SPNEGO can be used to inter-operate with Microsoft Server over HTTP, to support HTTP-based cross-platform authentication via the Negotiate Protocol.

Currently, when using Java GSS with Kerberos, we specify the Kerberos OID as follows:

Oid krb5Oid = new Oid("1.2.840.113554.1.2.2");

In order to use SPNEGO, you only need to specify the SPNEGO OID as follows:

Oid spnegoOid = new Oid("1.3.6.1.5.5.2");

Then you can use the SPNEGO OID when creating a GSSCredential, GSSContext, etc.

Goal of this exercise

Currently the only security mechansim available with Java GSS is Kerberos. The goal of this exercise is to learn how to use other Java GSS mechanisms, such as the Simple and Protected GSS-API Negotiation Mechanism (SPNEGO), to secure the association.

Steps to follow

  1. Read the GssSpNegoClient.java code.

  2. Compile the sample code:

    % javac GssSpNegoClient.java

  3. Read the src/GssSpNegoServer.java code.

  4. Compile the sample code:

    % javac GssSpNegoServer.java

  5. Launch a new window and start the server:

    % xterm &
% java -Djava.security.auth.login.config=jaas-krb5.conf GssSpNegoServer

  6. Run the client application. GssSpNegoClient takes two parameters: the service name and the name of the server that the service is running on. For example, if the service is host running on the machine j1hol-001, use the following (provide a secure password when prompted):

    % java -Djava.security.auth.login.config=jaas-krb5.conf \
GssSpNegoClient host j1hol-001

Sample output for running GssSpNegoServer:

Authenticated principal: [host/j1hol-001@J1LABS.EXAMPLE.COM]
Waiting for incoming connections...
Got connection from client /129.145.128.102
SPNEGO Negotiated Mechanism = 1.2.840.113554.1.2.2 Kerberos V5
Context Established!
Client principal is test@J1LABS.EXAMPLE.COM
Server principal is
host/j1hol-001@J1LABS.EXAMPLE.COM
Mutual authentication took place!
Received data "Hello There!" of length 12
Confidentiality applied: true
Sending: Hello There! Thu May 06 12:11:15 PDT 2005

Sample output for running GssSpNegoClient (password is replaced with the password you provided before):

Kerberos password for test: password
Authenticated principal: [test@J1LABS.EXAMPLE.COM]
Connected to address j1hol-001/129.145.128.102
SPNEGO Negotiated Mechanism = 1.2.840.113554.1.2.2 Kerberos V5
Context Established!
Client principal is test@J1LABS.EXAMPLE.COM
Server principal is host@j1hol-001
Mutual authentication took place!
Sending message: Hello There!
Will read token of size 93
Received message: Hello There! Thu May 06 12:11:15 PDT 2005

Summary

In this exercise, you learned how to write a client-server application that uses the Java GSS API with SPNEGO to negotiate an underlying security mechanism, such as Kerberos, and communicate securely using Kerberos as the underlying authentication system.

NOTE: Microsoft has implemented certain variations of the SPNEGO protocol, hence to inter-operate with Microsoft, we have added a separate mode via a new system property sun.security.spnego.msinterop. This property is enabled to true by default. To disable it, you need to explicitly set this property to false. To enable SPNEGO debugging, you can set the system property sun.security.spnego.debug=true.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Advanced Security Programming in Java SE Authentication, Secure Communication and Single Sign-On

Java SE offers a rich set of APIs and features for developing secure Java applications and services. The exercise sessions listed here can help you to use the Java SE GSS APIs to build applications that authenticate their users, to communicate securely with other applications and services, and help you to configure your applications in a Kerberos environment to achieve Single Sign-On. In addition, you will also learn how to use stronger encryption algorithms in a Kerberos environment, and how to use Java GSS mechanisms such as SPNEGO to secure the association.

Setting up your Development Environment

Please download, install and configure the software listed below:

  1. Download and unzip the exercises in jgss-sample.zip.
  2. Install and set up a Solaris 10 machine (required for exercise 7)
  3. Configure a Kerberos server on a Solaris 10 machine with accounts used by the exercises. See Appendix A.
  4. Set the %JAVA_HOME% environment variable to point to the installation directory of the JDK.

Exercises

This session includes six lessons. Each part contains one or more coding exercises:

  1. Secure authentication using the Java Authentication and Authorization Service (JAAS)
  2. Secure communication using three different secure communication technologies in Java SE
  3. Deployment of secure applications for Single Sign-On in a Kerberos environment
  4. Secure Communication using stronger encryption algorithms
  5. Secure Authentication using SPNEGO Java GSS mechanism
  6. HTTP/SPNEGO Authentication

Things to check

Make sure you have verified the following configuration settings before proceding to the first Exercise:

  1. Set up the Key Distribution Center (KDC) on your Solaris 10 machine and start the Kerberos server.
  2. Set up the Kerberos configuration on your client machine.
  3. Set ip the JDK environment:
    • Set up the JAVA_HOME environment variable to point to the JDK installation directory
    • Place %JAVA_HOME%\bin (Windows) or $JAVA_HOME/bin (Solaris/Linux) in the PATH environment variable.

Resources

Java SE API Specification

Please work through these exercises in sequence:

Part I: Secure Authentication using the Java Authentication and Authorization Service (JAAS):

  1. Using the JAAS API
  2. Configuring JAAS for Kerberos Authentication

Part II: Secure Communications using Java SE Security APIs

  3. Using the Java Generic Security Services (GSS) API
  4. Using the Java Simple Authentication and Security Layer (SASL) API
  5. Using the Java Secure Socket Extension (JSSE) with Kerberos

Part III: Deploying for Single Sign-On in a Kerberos Environment

  6. Deploying for Single Sign-On

Part IV: Secure Communications using stronger encryption algorithms

  7. Configuring to use stronger Kerberos encryption algorithms, to secure the communication

Part V: Secure Authentication using SPNEGO Java GSS mechanism

  8. Using the Java Generic Security Services (GSS) API with other GSS mechanisms, such as SPNEGO

Part VI: HTTP/SPNEGO authentication

  9. Using HTTP/SPNEGO Authentication

Appendix A: Setting up Kerberos Accounts

Kerberos accounts are set up on the Key Distribution Center (KDC). Each entry in the Kerberos database contains a Kerberos principal. You should create a host-based principal for the machine that you will be running the servers (e.g., "host/j1hol-001") and a client principal (e.g., "test") for accessing the servers.

For Solaris, please refer to following documentation on how to setup Kerberos principals.

  • Administering Kerberos Principals
  • System Administration Guide: Security Services

For Windows, please refer to Microsoft documentation. Here are some pointers.

  • How To Create an Active Directory Server in Windows Server 2003
  • Microsoft Kerberos
  • Interoperability with Microsoft Windows 2000 Active Directory and Kerberos Services

The exercises assume that the operating system has been configured to use the correct Kerberos server. This configuration typically requires administration privileges. If you cannot configure the operating system, then you can use a Kerberos configuration file with your java command by using the -Djava.security.krb5.conf option. Here is an example of how to invoke one of the commands from the exercises to use the krb5.conf configuration file.

% java -Djava.security.auth.login.config=jaas-krb5.conf\
  -Djava.security.krb5.conf=krb5.conf Jaas client
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Advanced JGSS Security Programming

Documentation Contents

Part II : Secure Communications using the Java SE Security API

This part shows you how to build applications that perform secure communications. The Java SE platform provides three standard APIs that allow applications to perform secure communications: The Java Generic Security Service (GSS), the Java SASL API, and the Java Secure Socket Extension (JSSE). When building an application, which of these APIs should you use? The answer depends on many factors, including requirements of the protocol or service, deployment infrastructure, and integration with other security services. For example, if you are building an LDAP client library, you would need to use the Java SASL API because use of SASL is part of LDAP's protocol definition. As an other example, if the service supports SSL, then the client application attempting to access the service would need to use JSSE.

Exercise 3: Using the Java Generic Security Service (GSS) API

Goal of this exercise

The goal of this exercise is to learn how to use the Java GSS API to perform secure authentication and communication.

Background for this exercise

The Generic Security Service API provides a uniform C-language interface to access various security services, such as authentication, message integrity, and message confidentiality. The Java GSS API provides the corresponding interface for Java applications. It allows applications to perform authentication and establish secure communication with the peer. One of the most common security service accessed via the GSS-API and Java GSS-API is Kerberos.

Resources for this Exercise

  • The JAAS and Java GSS-API Tutorials
  • Generic Security Service API Version 2: Java Bindings (RFC 2853)
  • Java GSS javadocs: org.ietf.jgss.

Overview of this Exercise

This exercise is a client-server application that demonstrates how to communicate securely using the Java GSS API. The client and server parts first authenticate to Kerberos, as shown in Exercise 1. This stores the credentials in the subject. The application then executes an action that performs Java GSS operations (with Kerberos as the underlying GSS mechanism) inside of a Subject.doAs using the subject. The Java GSS Kerberos mechanism, because it is executing inside the doAs, obtains the Kerberos credentials from the subject, and uses them to authenticate with the peer and to exchange messages securely.

Steps to follow

  1. Read the GssServer.java code.

    This code fragment defines the action to execute after the service principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The code first creates an instance of GSSManager, which it uses to obtain its own credentials and to create an instance of GSSContext. It uses this context to perform authentication. Upon completing authentication, it accepts encrypted input from the client and uses the established security context to decrypt the data. It then uses the security context to encrypt a reply containing the original input and the date, and then sends it back to the client.

  2. Compile the sample code.

  3. Read the GssClient.java. code.

    This code fragment defines the action to execute after the client principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The code first creates an instance of GSSManager, which it uses to obtain a principal name for the service that it is going to communicate with. It then creates an instance of GSSContext to perform authentication with the service. Upon completing authentication, it uses the established security context to encrypt a message, and sends it to the server. It then reads an encrypted message from the server and decodes it using the established security context.

  4. Compile the sample code.

  5. Launch a new window and start the server:

    % xterm &
% java -Djava.security.auth.login.config=jaas-krb5.conf GssServer

  6. Run the client application. GssClient takes two parameters: the service name and the name of the server that the service is running on. For example, if the service is host running on the machine j1hol-001, you would enter the following:

    % java -Djava.security.auth.login.config=jaas-krb5.conf GssClient host j1hol-001

    When prompted for the password, enter change_it.

  7. Observe the following output in the respective client and server applications' windows.

    Output for running GssServer example:

    Authenticated principal: [host/j1hol-001@J1LABS.EXAMPLE.COM]
Waiting for incoming connections..
Got connection from client /192.0.2.102
Context Established!
Client principal is test@J1LABS.EXAMPLE.COM
Server principal is host/j1hol-001@J1LABS.EXAMPLE.COM
Mutual authentication took place!
Received data "Hello There!" of length 12
Confidentiality applied: true
Sending: Hello There! Thu May 06 12:11:15 PDT 2005

    Output for running GssClient example:

    Kerberos password for test: change_it
Authenticated principal: [test@J1LABS.EXAMPLE.COM]
Connected to address j1hol-001/192.0.2.102
Context Established!
Client principal is test@J1LABS.EXAMPLE.COM
Server principal is host@j1hol-001
Mutual authentication took place!
Sending message: Hello There!
Will read token of size 93
Received message: Hello There! Thu May 06 12:11:15 PDT 2005

Summary

In this exercise, you learned how to write a client-server application that uses the Java GSS API to authenticate and communicate securely with each other.

Next Steps

  1. Proceed to Exercise 4 to learn how to write a client/server application that uses the Java SASL API to authenticate and communicate securely with each other.
  2. Proceed to Exercise 5 to learn how to write a client/server application that uses the JSSE to authenticate and communicate securely with each other.
  3. Proceed to Exercise 6 to learn how to configure the sample programs that you have just used to achieve single sign-on in a Kerberos environment.

Exercise 4: Using the Java SASL API

Goal of this exercise

The goal of this exercise is to learn how to use the Java SASL API to perform secure authentication and communication.

Background for this exercise

Simple Authentication and Security Layer (SASL) specifies a challenge-response protocol in which data is exchanged between the client and the server for the purposes of authentication and (optional) establishment of a security layer on which to carry on subsequent communications. SASL allows different mechanisms to be used; each such mechanism is identified by a profile that defines the data to be exchanged and a name. SASL is used with connection-based protocols such as LDAPv3 and IMAPv4. SASL is described in RFC 4422.

The Java SASL API defines an API for applications to use SASL in a mechanism-independent way. For example, if you are writing a library for a networking protocol that uses SASL, you can use the Java SASL API to generate the data to be exchanged with the peer. When the library is deployed, you can dynamically configure the mechanisms to use with the library.

In addition to authentication, you can use SASL to negotiate a security layer to be used after authentication. But unlike the GSS-API, the properties of the security layer (such as whether you want integrity or confidentiality) is decided at negotiation time. (the GSS-API allows confidentiality to be turned on or off per message).

Resources for this exercise

  • The Java SASL API Programming and Deployment Guide
  • The Java SASL API javadocs
  • Simple Authentication and Security Layer (SASL) (RFC 4422)

Overview of this exercise

This exercise is a client-server application that demonstrates how to communicate securely using the Java SASL API. The client and server parts first authenticate to Kerberos using Exercise 1. This stores the credentials in the subject. The application then executes an action that performs Java SASL API operations (with Kerberos as the underlying SASL mechanism) inside of a Subject.doAs using the subject. The SASL/Kerberos mechanism, because it is executing inside the doAs, obtains the Kerberos credentials from the subject, and uses them to authenticate with the peer and to exchange messages securely.

This example uses a simple protocol implemented by the AppConnection class. This protocol exchanges authentication commands and data commands. Each command consists of a type (e.g., AppConnection.AUTH_CMD), the length of the data to follow, and the data itself. The data is a SASL buffer if it is for authentication or encrypted/integrity-protected application data; it is plain application data otherwise.

Steps to follow

  1. Read the SaslTestServer.java. sample code.

    This code fragment defines the action to execute after the service principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The server specifies the quality of protections (QOP) that it will support and then creates an instance of SaslServer to perform the authentication. The challenge-response protocol of SASL is performed in the while loop, with the server sending challenges to the client and processing the responses from the client. After authentication, the identity of the authenticated client can be obtained via a call to the getAuthorizedID() method. If a security layer was negotiated, the server can exchange data securely with the client.

  2. Compile the sample code.

  3. Read the SaslTestClient.java. sample code.

    This code fragment defines the action to execute after the client principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The program first specifies the quality of protections that it wants (in this case, confidentiality) and then creates an instance of SaslClient to use for authentication. It then checks whether the mechanism has an initial response and if so, gets the response by invoking the evaluateChallenge() method with an empty byte array. It then sends the response to the server to begin the authentication. The challenge-response protocol of SASL is performed in the while loop, with the client evaluating the challenges that it gets from the server and sending the server the corresponding responses to the challenges. After authentication, the client can proceed to communicate with the server using the negotiated security layer.

  4. Compile the sample code.

  5. Launch a new window and start the server. SaslTestServer takes two parameters: the service name and the name of the server that the service is running on. For example, if the service is host running on the machine j1hol-001, you would enter the following:

    % xterm &
% java -Djava.security.auth.login.config=jaas-krb5.conf SaslTestServer host j1hol-001

  6. Run the client application. SaslTestClient takes two parameters: the service name and the name of the server that the service is running on. For example, if the service is host running on the machine j1hol-001, you would enter the following:

    % java -Djava.security.auth.login.config=jaas-krb5.conf SaslTestClient host j1hol-001

    Provide a secure password.

  7. Observe the following output in the respective client and server applications' windows.

    Output for running the SaslTestServer example:

    Authenticated principal: [host/j1hol-001@J1LABS.EXAMPLE.COM]
Waiting for incoming connections...
Got connection from client /192.0.2.102
Client authenticated; authorized client is: test@J1LABS.EXAMPLE.COM
Negotiated QOP: auth-conf
Received: Hello There!
Sending: Hello There! Fri May 07 15:32:37 PDT 2005
Received data "Hello There!" of length 12

    Output for running the SaslTestClient example (password will be replaced by the password that you provided):

    Kerberos password for test: password
Authenticated principal: [test@J1LABS.EXAMPLE.COM]
Connected to address j1hol-001/192.0.2.102
Client authenticated.
Negotiated QOP: auth-conf
Sending: Hello There!
Received: Hello There! Fri May 07 15:32:37 PDT 2005

Summary

In this exercise, you learned how to write a client-server application that uses the Java SASL API to authenticate and communicate securely with each other.

Next Steps

  1. Proceed to Exercise 5 to learn how to write a client/server application that uses the JSSE to authenticate and communicate securely with each other.
  2. Proceed to Exercise 6 to learn how to configure the sample programs that you have just used to achieve single sign-on in a Kerberos environment.

Exercise 5: Using the Java Secure Socket Extension with Kerberos

Goal of this exercise

The goal of this exercise is to learn how to use the JSSE API to perform secure authentication and communication using Kerberos cipher suites.

Background for this exercise

Secure Socket Layer (SSL) and Transport Layer Security (TLS) are the most widely used protocols for implementing cryptography on the Internet. TLS is the Internet standard evolved from SSL. SSL/TLS provides application-level protocols (such as HTTP and LDAP) with secure authentication and communication. For example, HTTPS is the resulting protocol of using HTTP over SSL/TLS. SSL/TLS is used not only for standard protocols such as HTTP, it is also widely used when building custom applications using custom protocols that need to communicate securely.

SSL/TLS traditionally used certificate-based authentication and is commonly used for server-authentication. For example, when a Web client such as a browser accesses a secure Web site (server) on behalf of a user, the server sends its certificate to the browser so that the browser can verify the identity of the server. This ensures that the user does not divulge confidential information (such as credit card information) to a bogus server. Recently, a new standard allows the use of Kerberos with TLS. This means instead of using certificate-based authentication, an application can use Kerberos credentials and take advantage of the Kerberos infrastructure in the deployment environment. Using Kerberos cipher suites also provides automatic support for mutual authentication in which the client is also authenticated in addition to the server.

The decision of whether to use Java GSS, Java SASL, or JSSE for a particular application often depends upon several factors, including (the protocols being used by) the services with which the application interacts, the deployment environment (PKI or Kerberos-based), and the application's security requirements. JSSE provides a secure end-to-end channel that takes care of the I/O and transport, while Java GSS and Java SASL provide encryption and integrity-protection on the data, but the application is responsible for transporting the secured data to its peer. Some details about factors for deciding when to use JSSE versus Java GSS are presented in the document, When to use Java GSS vs. JSSE.

Resources for this exercise

  • Java Secure Socket Extension (JSSE) Reference Guide
  • The JSSE javadocs: javax.net and javax.net.ssl
  • The SSL Protocol version 3.0
  • The TLS Protocol Version 1.0 (RFC 2246)
  • Addition of Kerberos Cipher Suites to Transport Layer Security TLS (RFC 2712)
  • When to use Java GSS vs. JSSE

Overview of this exercise

This exercise is a client-server application that demonstrates how to communicate securely using the JSSE and Kerberos cipher suites. The client and server parts first authenticate to Kerberos using Exercise 1. This stores the credentials in the subject. The application then executes an action that performs JSSE operations (using a Kerberos cipher suite) inside of a Subject.doAs using the subject. The Kerberos cipher suite implementation, because it is executing inside the doAs, obtains the Kerberos credentials from the subject, and uses them to authenticate with the peer and to exchange messages securely. This example sends newline-terminated messages, encrypted using the negotiated cipher suite and integrity-protected, back and forth between client and server.

According to the standard (RFC 2712) all Kerberos-enabled TLS applications use the same service name (host). That is why in this exercise, you do not need to explicitly supply the Kerberos service name.

Steps to follow

  1. Read the JsseServer.java sample code.

    This code fragment defines the action to execute after the service principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The server first creates an SSLServerSocket. This is analogous to an application creating a plain ServerSocket except an SSLServerSocket will provide automatic authentication, encryption and decryption, as needed. The server then sets the cipher suites that it wants to use. The server then runs in a loop, accepting connections from SSL clients, and reads and writes from the SSL socket. The server can find out the identities of the owners of socket by invoking the getLocalPrincipal() and getPeerPrincipal() methods.

  2. Compile the sample code.

  3. Read the JsseClient.java sample code.

    This code fragment defines the action to execute after the client principal has authenticated to the KDC. It replaces the MyAction in Exercise 1. The client first creates an SSLSocket. The client then sets the cipher suites that it wants to use. The client then exchanges messages with the server using the SSLSocket by reading and writing to the socket's input/output streams. The client can find out the identities of the owners of socket by invoking the getLocalPrincipal() and getPeerPrincipal() methods.

  4. Compile the sample code.

  5. Launch a new window and start the server. JsseServer takes one parameter: the name of the server that the JSSE service is running on. For example, if it is running on the machine j1hol-001, you would enter the following:

    % xterm &
% java -Djava.security.auth.login.config=jaas-krb5.conf JsseServer j1hol-001

  6. Run the client application. JsseClient takes one parameter: the name of the server that the JSSE service is running on. For example, if the service is running on the machine j1hol-001, you would enter the following.

    % java -Djava.security.auth.login.config=jaas-krb5.conf JsseClient j1hol-001

    Provide a secure password.

  7. Observe the following output in the respective client and server applications' windows.

    Output for running the JsseServer example:

    Authenticated principal: [host/j1hol-001@J1LABS.EXAMPLE.COM]
Waiting for incoming connections...
Got connection from client /192.0.2.102
Received: Hello There!
Sending: Hello There! Fri May 07 15:32:37 PDT 2005
Cipher suite in use: TLS_KRB5_WITH_3DES_EDE_CBC_SHA
I am: host/j1hol-001@J1LABS.EXAMPLE.COM
Client is: test@J1LABS.EXAMPLE.COM

    Output for running the JsseClient example (password will be replaced by the password that you provided):

    Kerberos password for test: password
Authenticated principal: [test@J1LABS.EXAMPLE.COM]
Sending: Hello There!
Received: Hello There! Fri May 07 15:32:37 PDT 2005
Cipher suite in use: TLS_KRB5_WITH_3DES_EDE_CBC_SHA
I am: test@J1LABS.EXAMPLE.COM
Server is: host/j1hol-001@J1LABS.EXAMPLE.COM

Summary

In this exercise, you learned how to write a client-server application that uses JSSE to authenticate and communicate securely with each other, using Kerberos as the underlying authentication system.

Next Steps

Proceed to Exercise 6 to learn how to configure the sample programs in Exercises 3, 4, and 5 to achieve single sign-on in a Kerberos environment.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


SPEGNO Authenticatio

Documentation Contents

Part VI: HTTP/SPNEGO Authentication

  • Exercise 9: Using HTTP/SPNEGO Authentication

  • What is HTTP SPNEGO
    • Web Authentication
    • Proxy Authentication
  • How to use HTTP/SPNEGO Authentication
    • Kerberos 5 Configuration
    • Username and Password Retrieval
    • Scheme Preference
    • Fallback

  • Example

Exercise 9: Using HTTP/SPNEGO Authentication

What is HTTP SPNEGO

HTTP SPNEGO supports the Negotiate authentication scheme in an HTTP communication. SPNEGO supports types of authentication:

Web Authentication

The Web Server responds with

       HTTP/1.1 401 Unauthorized
       WWW-Authenticate: Negotiate

the client will need to send a header like

       Authorization: Negotiate YY.....

to authenticate itself to the server

Proxy Authentication

The Web Server responses with

       HTTP/1.1 407 Proxy Authentication Required
       Proxy-Authenticate: Negotiate

the client will need to send a header like

       Proxy-Authorization: Negotiate YY.....

to authenticate itself to the proxy server

This feature supports both types of authentication.

How to use HTTP/SPNEGO Authentication

There is no new public API function involved in the new feature, but several configurations are needed to perform a success communication:

Kerberos 5 Configuration

Since the SPNEGO mechanism will call JGSS, which in turns calls the Kerberos V5 login module to do real works. Kerberos 5 configurations are needed. This includes the following:

  • Some way to provide Kerberos configurations. This can be achieved with the Java system property java.security.krb5.conf. For example:

            java -Djava.security.krb5.conf=krb5.conf \
                 -Djavax.security.auth.useSubjectCredsOnly=false \
                 ClassName
  • A JAAS config file denoting what login module to use. HTTP SPNEGO codes will look for the standard entry named com.sun.security.jgss.krb5.initiate.
For example, you can provide a file spnegoLogin.conf:
          com.sun.security.jgss.krb5.initiate {
              com.sun.security.auth.module.Krb5LoginModule
                  required useTicketCache=true;
          };

and run java with:

            java -Djava.security.krb5.conf=krb5.conf \
                 -Djava.security.auth.login.config=spnegoLogin.conf \
                 -Djavax.security.auth.useSubjectCredsOnly=false \
                 ClassName

Username and Password Retrieval

Just like any other HTTP authentication scheme, the client can provide a customized java.net.Authenticator to feed username and password to the HTTP SPNEGO module if they are needed (i.e. there is no credential cache available). The only authentication information needed to be checked in your Authenticator is the scheme which can be retrieved with getRequestingScheme(). The value should be "Negotiate".

This means your Authenticator implementation will look like:
    class MyAuthenticator extends Authenticator {

        public PasswordAuthentication getPasswordAuthentication () {
            if (getRequestingScheme().equalsIgnoreCase("negotiate")) {
                String krb5user;
                char[] krb5pass;
                // get krb5user and krb5pass in your own way
                ....
                return (new PasswordAuthentication (krb5user,
                            krb5pass));
            } else {
                ....
            }
        }
    }

Note : According to the specification of java.net.Authenticator, it's designed to get the username and password at the same time, so do not specify principal=xxx in the JAAS config file.

Scheme Preference

The client can still provide system property http.auth.preference to denote that a certain scheme should always be used as long as the server request for it. You can use "SPNEGO" or "Kerberos" for this system property. "SPNEGO" means you prefer to response the Negotiate scheme using the GSS/SPNEGO mechanism; "Kerberos" means you prefer to response the Negotiate scheme using the GSS/Kerberos mechanism. Normally, when authenticating against a Microsoft product, you can use "SPNEGO". The value "Kerberos" also works for Microsoft servers. It's only needed when you encounter a server which knows Negotiate but doesn't know about SPNEGO.

If http.auth.preference is not set, the internal order choosen is:

  • GSS/SPNEGO -> Digest -> NTLM -> Basic

Noticed that Kerberos does not appear in this list, since whenever Negotiate is supported, GSS/SPNEGO is always chosen.

Fallback

If the server has provided more than one authentication scheme (including Negotiate), according to the processing order mentioned in the last section, Java will try to challenge the Negotiate scheme. However, if the protocol cannot be established successfully (for example; The kerberos configuration is not correct, or the server's hostname is not recorded in the KDC principal DB, or the username and password provided by Authenticator is wrong), then the second strongest scheme will be automatically used.

Note : If http.auth.preference is set to SPNEGO or Kerberos, then SPNEGO assumes you only want to try the Negotiate scheme even if it fails. SPNEGO will not fallback to any other scheme and your program will throw an IOException saying it received a 401 or 407 error from the HTTP response.

Example

Assume that you have an IIS Server running on a Windows Server within an Active Directory. A web page on this server is configured to be protected by Integrated Windows Authentication. This means the server will prompt for both Negotiate and NTLM authentication.

You need to prepare these files to get the protected file:

Code listing for RunHttpSpnego.java

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URL;

public class RunHttpSpnego {

    static final String kuser = "username"; // your account name
    static final String kpass = "password"; // your password for the account

    static class MyAuthenticator extends Authenticator {
        public PasswordAuthentication getPasswordAuthentication() {
            // I haven't checked getRequestingScheme() here, since for NTLM
            // and Negotiate, the usrname and password are all the same.
            System.err.println("Feeding username and password for "
               + getRequestingScheme());
            return (new PasswordAuthentication(kuser, kpass.toCharArray()));
        }
    }

    public static void main(String[] args) throws Exception {
        Authenticator.setDefault(new MyAuthenticator());
        URL url = new URL(args[0]);
        InputStream ins = url.openConnection().getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
        String str;
        while((str = reader.readLine()) != null)
            System.out.println(str);
    }
}

Code listing for krb.conf

[libdefaults]
    default_realm = AD.LOCAL
[realms]
    AD.LOCAL = {
        kdc = kdc.ad.local
    }

Code listing for login.conf

com.sun.security.jgss.krb5.initiate {
  com.sun.security.auth.module.Krb5LoginModule required
 doNotPrompt=false useTicketCache=true;
};

Then, compile RunHttpSpnego.java and run

java -Djava.security.krb5.conf=krb5.conf \
    -Djava.security.auth.login.config=login.conf \
    -Djavax.security.auth.useSubjectCredsOnly=false \
    RunHttpSpnego \
    http://www.ad.local/hello/hello.html

You will see:

Feeding username and password for Negotiate
<h1>Hello, You got me!</h1>

In fact, if you are running on a Windows machine as a domain user, or, you are running on a Linux or Solaris machine that has already issued the kinit command and got the credential cache. The class MyAuthenticator will be completely ignored, and the output will be simply

<h1>Hello, You got me!</h1>

which shows the username and password are not consulted. This is the so-called Single Sign-On.

Also, You can just run

java RunHttpSpnego \
    http://www.ad.local/hello/hello.html

to see how the fallback is done, in which case you will see

Feeding username and password for ntlm
<h1>Hello, You got me!</h1>
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction to JAAS and Java GSS-API Tutorials

This page links to a series of tutorials demonstrating various aspects of the use of JAAS (Java Authentication and Authorization Service) and Java GSS-API.

JAAS can be used for two purposes:

  • for authentication of users, to reliably and securely determine who is currently executing Java code, and
  • for authorization of users to ensure they have the access control rights (permissions) required to do security-sensitive operations.

Java GSS-API is used for securely exchanging messages between communicating applications. The Java GSS-API contains the Java bindings for the Generic Security Services Application Program Interface (GSS-API) defined in RFC 2853. GSS-API offers application programmers uniform access to security services atop a variety of underlying security mechanisms, including Kerberos.

Note: JSSE is another API that can be used for secure communication. For the differences between the two, see When to use Java GSS-API vs. JSSE.

The reason both JAAS and Java GSS-API tutorials are presented together is because JAAS authentication is typically performed prior to secure communication using Java GSS-API. Thus JAAS and Java GSS-API are related and often used together. However, it is possible for applications to use JAAS without Java GSS-API, and it is also possible to use Java GSS-API without JAAS. Furthermore, JAAS itself can be used simply for authentication or for both authentication and authorization.

The following tutorials provide working examples for all of the scenarios described above.

  1. Use of Java GSS-API for Secure Message Exchanges Without JAAS Programming

    Demonstrates the use of the Java GSS-API for secure message exchanges between a client application and a server application.

  2. JAAS Authentication

    Explains how an application can authenticate users using JAAS.

  3. JAAS Authorization

    Explains how to enforce user-based access controls using JAAS.

  4. Use of JAAS Login Utility

    Describes a utility program that authenticates a user using JAAS and executes any application as that user. The appropriate user-based access controls are enforced while the application executes. This utility, as a convenience, essentially performs the operations described in the JAAS Authentication and JAAS Authorization tutorials on your behalf. Therefore it is possible to skip directly to this tutorial if you do not need to know how to perform JAAS authentication and authorization directly.

  5. Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges

    The most comprehensive tutorial. The Login utility is used to authenticate a service user and to start up a server application as that user. The Login utility is also used to authenticate a client user and to start up a client application as that user. Finally the client and server applications, on behalf of their authenticated client and service users, exchange secure messages using the Java GSS-API.

  6. More Things You Can Do With Java GSS-API and JAAS

    Shows additional operations the server application in the previous tutorial can perform once communication has been established with the client application.

All applications in all tutorials in this series utilize Kerberos Version 5 as the underlying technology for authentication and secure communication. See Kerberos Requirements. The term "Kerberos" used throughout the tutorials is meant to refer to Kerberos Version 5.

Related Documentation

API Specifications

  • com.sun.security.jgss Package
  • com.sun.security.auth Package
  • com.sun.security.auth.callback Package
  • com.sun.security.auth.login Package
  • com.sun.security.auth.module Package

User Guides

  • Java Authentication and Authorization Service (JAAS) Reference Guide.

Papers

  • Single Sign-on Using Kerberos in Java
  • JAAS white paper

Tutorials

  • Java Security Tutorial

Other Java Security Documentation

  • Default Policy Implementation and Policy File Syntax
  • Permissions in the Java 2 SDK
  • Java 2 Security Architecture

Reference Document

  • Generic Security Service API Version 2: Java Bindings presented and requested comments on the Java bindings for GSS-API that are incorporated into Java GSS-API.
Next Tutorial
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Authentication

The Java Authentication and Authorization Service (JAAS) was introduced as an optional package to the Java 2 SDK, Standard Edition (J2SDK), v 1.3. JAAS has now been integrated into the J2SDK 1.4.

JAAS can be used for two purposes:

  • for authentication of users, to reliably and securely determine who is currently executing Java code, regardless of whether the code is running as an application, an applet, a bean, or a servlet; and
  • for authorization of users to ensure they have the access control rights (permissions) required to do the actions performed.

This section provides a basic tutorial for the authentication component. The authorization component will be described in the JAAS Authorization tutorial.

JAAS authentication is performed in a pluggable fashion. This permits Java applications to remain independent from underlying authentication technologies. New or updated technologies can be plugged in without requiring modifications to the application itself. An implementation for a particular authentication technology to be used is determined at runtime. The implementation is specified in a login configuration file. The authentication technology used for this tutorial is Kerberos. (See Kerberos Requirements.)

The rest of this tutorial consists of the following sections:

  1. The Authentication Tutorial Code
  2. The Login Configuration
  3. Running the Code
  4. Running the Code with a Security Manager

If you want to first see the tutorial code in action, you can skip directly to Running the Code and then go back to the other sections to learn about coding and configuration file details.

The Authentication Tutorial Code

Our authentication tutorial code is contained in a single source file, JaasAcn.java. This file's main method performs the authentication and then reports whether or not authentication succeeded.

The code for authenticating the user is very simple, consisting of just two steps:

  1. Instantiate a LoginContext.
  2. Call the LoginContext's login method.

First the basic code is shown, followed by a complete listing of the JaasAcn.java source file, complete with import statements and error handling.

Instantiating a LoginContext

In order to authenticate a user, you first need a javax.security.auth.login.LoginContext. Here is the basic way to instantiate a LoginContext:

import javax.security.auth.login.*;
. . .
LoginContext lc =
    new LoginContext(<config file entry name>,
           <CallbackHandler to be used for user interaction>);
and here is the specific way our tutorial code does the instantiation:
import javax.security.auth.login.*;
import com.sun.security.auth.callback.TextCallbackHandler;
. . .
LoginContext lc =
    new LoginContext("JaasSample",
          new TextCallbackHandler());

The arguments are the following:

  1. The name of an entry in the JAAS login configuration file

    This is the name for the LoginContext to use to look up an entry for this application in the JAAS login configuration file, described here. Such an entry specifies the class(es) that implement the desired underlying authentication technology(ies). The class(es) must implement the LoginModule interface, which is in the javax.security.auth.spi package.

    In our sample code, we use the Krb5LoginModule in the com.sun.security.auth.module package, which performs Kerberos authentication.

    The entry in the login configuration file we use for this tutorial (see jaas.conf) has the name "JaasSample", so that is the name we specify as the first argument to the LoginContext constructor.

  2. A CallbackHandler instance.

    When a LoginModule needs to communicate with the user, for example to ask for a user name and password, it does not do so directly. That is because there are various ways of communicating with a user, and it is desirable for LoginModules to remain independent of the different types of user interaction. Rather, the LoginModule invokes a CallbackHandler to perform the user interaction and obtain the requested information, such as the user name and password. (CallbackHandler is an interface in the javax.security.auth.callback pkg.)

    An instance of the particular CallbackHandler to be used is specified as the second argument to the LoginContext constructor. The LoginContext forwards that instance to the underlying LoginModule (in our case Krb5LoginModule). An application typically provides its own CallbackHandler implementation. A simple CallbackHandler, TextCallbackHandler, is provided in the com.sun.security.auth.callback package to output information to and read input from the command line.

Calling the LoginContext's login Method

Once we have a LoginContext lc, we can call its login method to carry out the authentication process:

lc.login();

The LoginContext instantiates a new empty javax.security.auth.Subject object (which represents the user or service being authenticated). The LoginContext constructs the configured LoginModule (in our case Krb5LoginModule) and initializes it with this new Subject and TextCallbackHandler.

The LoginContext's login method then calls methods in the Krb5LoginModule to perform the login and authentication. The Krb5LoginModule will utilize the TextCallbackHandler to obtain the user name and password. Then the Krb5LoginModule will use this information to get the user credentials from the Kerberos KDC. See the Kerberos reference documentation.

If authentication is successful, the Krb5LoginModule populates the Subject with (1) a Kerberos Principal representing the user and (2) the user's credentials (TGT). See Subjects, Principals, Authentication, and Credentials for information on these terms.

The calling application can subsequently retrieve the authenticated Subject by calling the LoginContext's getSubject method, although doing so is not necessary for this tutorial.

The Complete JaasAcn.java Code

Now that you have seen the basic code required to authenticate the user, we can put it all together into the full class in JaasAcn.java, which includes relevant import statements and error handling:

import javax.security.auth.*;
import javax.security.auth.callback.*;
import javax.security.auth.login.*;
import com.sun.security.auth.callback.TextCallbackHandler;

/**
 * This JaasAcn application attempts to authenticate a user
 * and reports whether or not the authentication was successful.
 */
public class JaasAcn {

  public static void main(String[] args) {

      // Obtain a LoginContext, needed for authentication. Tell
      // it to use the LoginModule implementation specified by
      // the entry named "JaasSample" in the JAAS login
      // configuration file and to also use the specified
      // CallbackHandler.
      LoginContext lc = null;
      try {
          lc = new LoginContext("JaasSample",
                      new TextCallbackHandler());
      } catch (LoginException le) {
          System.err.println("Cannot create LoginContext. "
              + le.getMessage());
          System.exit(-1);
      } catch (SecurityException se) {
          System.err.println("Cannot create LoginContext. "
              + se.getMessage());
          System.exit(-1);
      }

      try {

          // attempt authentication
          lc.login();

      } catch (LoginException le) {

          System.err.println("Authentication failed: "
          System.err.println("  " + le.getMessage());
          System.exit(-1);

      }

      System.out.println("Authentication succeeded!");

    }
}

The Login Configuration

JAAS authentication is performed in a pluggable fashion, so applications can remain independent from underlying authentication technologies. A system administrator determines the authentication technologies, or LoginModules, to be used for each application and configures them in a login Configuration. The source of the configuration information (for example, a file or a database) is up to the current javax.security.auth.login.Configuration implementation. The default Configuration implementation from Sun Microsystems reads configuration information from configuration files, as described in com.sun.security.auth.login.ConfigFile.html.

See JAAS Login Configuration File for information as to what a login configuration file is, what it contains, and how to specify which login configuration file should be used.

The Login Configuration File for This Tutorial

As noted, the login configuration file we use for this tutorial, jaas.conf, contains just one entry, which is

JaasSample {
  com.sun.security.auth.module.Krb5LoginModule required;
};

This entry is named "JaasSample" and that is the name that our tutorial application, JaasAcn, uses to refer to this entry. The entry specifies that the LoginModule to be used to do the user authentication is the Krb5LoginModule in the com.sun.security.auth.module package and that this Krb5LoginModule is required to "succeed" in order for authentication to be considered successful. The Krb5LoginModule succeeds only if the name and password supplied by the user are successfully used to log the user into the Kerberos KDC.

For information about all the possible options that can be passed to Krb5LoginModule, see the Krb5LoginModule documentation.

Running the Code

To execute our JAAS authentication tutorial code, all you have to do is

  1. Place the JaasAcn.java application source file and the jaas.conf login configuration file into a directory.
  2. Compile JaasAcn.java:
    javac JaasAcn.java
  3. Execute the JaasAcn application, specifying
    • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified. For example, if your realm is "KRBNT-OPERATIONS.EXAMPLE.COM" you'd put -Djava.security.krb5.realm=KRBNT-OPERATIONS.EXAMPLE.COM.
    • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified. For example, if your KDC is "samplekdc.example.com" you'd put -Djava.security.krb5.kdc=samplekdc.example.com.
    • by -Djava.security.auth.login.config=jaas.conf that the login configuration file to be used is jaas.conf.

The full command is below. Be sure to replace <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

java -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.auth.login.config=jaas.conf JaasAcn

Type all that on one line. Multiple lines are used here for legibility.

You will be prompted for your Kerberos user name and password, and the underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. If your login is successful, you will see the following message:

Authentication succeeded!
If the login is not successful (for example, if you misspell your password), you will see
Authentication failed:
followed by a reason for the failure. For example, if you mistype your user name, you may see a message like the following (where the formatting is slightly modified here to increase legibility):
Authentication failed:
  Kerberos Authentication Failed:
    javax.security.auth.login.LoginException:
      KrbException: Client not found in Kerberos database

For login troubleshooting suggestions, see Troubleshooting.

After fixing any problems, re-run the program to try again.

Running the Code with a Security Manager

When a Java program is run with a security manager installed, the program is not allowed to access resources or otherwise perform security-sensitive operations unless it is explicitly granted permission to do so by the security policy in effect. In Java platforms that are compatible with J2SE v 1.2 and later, the permission must be granted by an entry in a policy file.

Most browsers install a security manager, so applets typically run under the scrutiny of a security manager. Applications, on the other hand, do not, since a security manager is not automatically installed when an application is running. Thus an application, like our JaasAcn application, by default has full access to resources.

To run an application with a security manager, simply invoke the interpreter with a -Djava.security.manager argument included on the command line.

If you try invoking JaasAcn with a security manager but without specifying any policy file, you will get the following (unless you have a default policy setup elsewhere that grants the required permissions or grants AllPermission):

% java -Djava.security.manager \
 -Djava.security.krb5.realm=<your_realm> \
 -Djava.security.krb5.kdc=<your_kdc> \
 -Djava.security.auth.login.config=jaas.conf JaasAcn
Exception in thread "main" java.security.AccessControlException:
  access denied (
  javax.security.auth.AuthPermission createLoginContext.JaasSample)

As you can see, you get an AccessControlException, because we haven't created and used a policy file granting our code the permission that is required in order to be allowed to create a LoginContext.

Here are the complete steps required in order to be able to run our JaasAcn application with a security manager installed. You can skip the first two steps if you have already done them, as described in Running the Code.

  1. Place the JaasAcn.java application source file and the jaas.conf login configuration file into a directory.
  2. Compile JaasAcn.java:
    javac JaasAcn.java
  3. Create a JAR file containing JaasAcn.class:
    jar -cvf JaasAcn.jar JaasAcn.class

    This command creates a JAR file, JaasAcn.jar, and places the JaasAcn.class file inside it.

  4. Create a policy file granting the code in the JAR file the required permission.

    The permission that is needed by code attempting to instantiate a LoginContext is a javax.security.auth.AuthPermission with target "createLoginContext.<entry name>". Here, <entry name> refers to the name of the login configuration file entry that the application references in its instantiation of LoginContext. The name used by our JaasAcn application's LoginContext instantiation is "JaasSample", as you can see in the code:

    LoginContext lc =
    new LoginContext("JaasSample",
          new TextCallbackHandler());
    Thus, the permission that needs to be granted to JaasAcn.jar is
    permission javax.security.auth.AuthPermission
  "createLoginContext.JaasSample";
    Copy the policy file jaasacn.policy to the same directory as that in which you stored JaasAcn.java, etc. This is a text file containing the following grant statement to grant JaasAcn.jar (in the current directory) the required permission:
    grant codebase "file:./JaasAcn.jar" {
   permission javax.security.auth.AuthPermission
                    "createLoginContext.JaasSample";
};

    Note: Policy files and the structure of entries within them are described in Default Policy Implementation and Policy File Syntax. Permissions are described here.

  5. Execute the JaasAcn application, specifying
    1. by an appropriate -classpath clause that classes should be searched for in the JaasAcn.jar JAR file,
    2. by -Djava.security.manager that a security manager should be installed,
    3. by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified. For example, if your realm is "KRBNT-OPERATIONS.EXAMPLE.COM" you'd put -Djava.security.krb5.realm=KRBNT-OPERATIONS.EXAMPLE.COM.
    4. by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified. For example, if your KDC is "samplekdc.example.com" you'd put -Djava.security.krb5.kdc=samplekdc.example.com.
    5. by -Djava.security.policy=jaasacn.policy that the policy file to be used is jaasacn.policy, and
    6. by -Djava.security.auth.login.config=jaas.conf that the login configuration file to be used is jaas.conf.

    The full command is below. Be sure to replace <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

    java -classpath JaasAcn.jar -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=jaasacn.policy
 -Djava.security.auth.login.config=jaas.conf JaasAcn

    Type all that on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

    Since the specified policy file contains an entry granting the code the required permission, JaasAcn will be allowed to instantiate a LoginContext and continue execution. You will be prompted for your Kerberos user name and password, and the underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. If your login is successful, you will see the message "Authentication succeeded!" and if not, you will see "Authentication failed:" followed by a reason for the failure.

    For login troubleshooting suggestions, see Troubleshooting.

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Authorization

This tutorial expands the program and policy file developed in the JAAS Authentication tutorial to demonstrate the JAAS authorization component, which ensures the authenticated caller has the access control rights (permissions) required to do subsequent security-sensitive operations. Since the authorization component requires that the user authentication first be completed, please read the JAAS Authentication tutorial first if you have not already done so.

The rest of this tutorial consists of the following sections:

  • What is JAAS Authorization?
  • How is JAAS Authorization Performed?
    • How Do You Make Principal-Based Policy File Statements?
    • How Do You Associate a Subject with an Access Control Context?
  • The Authorization Tutorial Code
  • The Login Configuration File
  • The Policy File
  • Running the Authorization Tutorial Code

If you want to first see the tutorial code in action, you can skip directly to Running the Authorization Tutorial Code and then go back to the other sections to learn more.

What is JAAS Authorization?

JAAS authorization extends the existing Java security architecture that uses a security policy to specify what access rights are granted to executing code. That architecture, introduced in the Java 2 platform, is code-centric. That is, the permissions are granted based on code characteristics: where the code is coming from and whether it is digitally signed and if so by whom. We saw an example of this in the jaasacn.policy file used in the JAAS Authentication tutorial. That file contains the following:

grant codebase "file:./JaasAcn.jar" {
   permission javax.security.auth.AuthPermission
                    "createLoginContext.JaasSample";
};

This grants the code in the JaasAcn.jar file, located in the current directory, the specified permission. (No signer is specified, so it doesn't matter whether the code is signed or not.)

JAAS authorization augments the existing code-centric access controls with new user-centric access controls. Permissions can be granted based not just on what code is running but also on who is running it.

When an application uses JAAS authentication to authenticate the user (or other entity such as a service), a Subject is created as a result. The purpose of the Subject is to represent the authenticated user. A Subject is comprised of a set of Principals, where each Principal represents an identity for that user. For example, a Subject could have a name Principal ("Susan Smith") and a Social Security Number Principal ("987-65-4321"), thereby distinguishing this Subject from other Subjects.

Permissions can be granted in the policy to specific Principals. After the user has been authenticated, the application can associate the Subject with the current access control context. For each subsequent security-checked operation, (a local file access, for example), the Java runtime will automatically determine whether the policy grants the required permission only to a specific Principal and if so, the operation will be allowed only if the Subject associated with the access control context contains the designated Principal.

How is JAAS Authorization Performed?

To make JAAS authorization take place, the following is required:

  • The user must be authenticated, as described in the JAAS Authentication tutorial.
  • Principal-based entries must be configured in the security policy.
  • The Subject that is the result of authentication must be associated with the current access control context.

How Do You Make Principal-Based Policy File Statements?

Policy file grant statements can now optionally include one or more Principal fields. Inclusion of a Principal field indicates that the user or other entity represented by the specified Principal, executing the specified code, has the designated permissions.

Thus, the basic format of a grant statement is now

grant <signer(s) field>, <codeBase URL>
  <Principal field(s)> {
    permission perm_class_name "target_name", "action";
    ....
    permission perm_class_name "target_name", "action";
  };
where each of the signer, codeBase and Principal fields is optional and the order between the fields doesn't matter.

A Principal field looks like the following:

Principal Principal_class "principal_name"

That is, it is the word "Principal" (where case doesn't matter) followed by the (fully qualified) name of a Principal class and a principal name.

A Principal class is a class that implements the java.security.Principal interface. All Principal objects have an associated name that can be obtained by calling their getName method. The format used for the name is dependent on each Principal implementation.

The type of Principal placed in the Subject created by the Kerberos authentication mechanism used by this tutorial is javax.security.auth.kerberos.KerberosPrincipal, so that is what should be used as the Principal_class part of our grant statement's Principal designation. User names for KerberosPrincipals are of the form "name@realm". Thus, if the user name is "mjones" and the realm is "KRBNT-OPS.ABC.COM", the full principal_name designation to use in the grant statement is "mjones@KRBNT-OPS.ABC.COM".

It is possible to include more than one Principal field in a grant statement. If multiple Principal fields are specified, then the permissions in that grant statement are granted only if the Subject associated with the current access control context contains all of those Principals.

To grant the same set of permissions to different Principals, create multiple grant statements where each lists the permissions and contains a single Principal field designating one of the Principals.

The policy file for this tutorial includes one grant statement with a Principal field:

grant codebase "file:./SampleAction.jar",
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "your_user_name@your_realm"  {

   permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "user.home", "read";
   permission java.io.FilePermission "foo.txt", "read";
};
where you substitute your Kerberos user name (complete with "@" and realm) for "your_user_name@your_realm".

This specifies that the indicated permissions are granted to the specified principal executing the code in SampleAction.jar.

How Do You Associate a Subject with an Access Control Context?

To create and associate a Subject with an access control context, you need the following:

  • The user must first be authenticated, as described in JAAS Authentication.
  • The static doAs method from the Subject class must be called, passing it an authenticated Subject and a java.security.PrivilegedAction or java.security.PrivilegedExceptionAction. (See API for Privileged Blocks for a comparison of PrivilegedAction and PrivilegedExceptionAction.) The doAs method associates the provided Subject with the current access control context and then invokes the run method from the action. The run method implementation contains all the code to be executed as the specified Subject. The action thus executes as the specified Subject.

    The static doAsPrivileged method from the Subject class may be called instead of the doAs method. In addition to the parameters passed to doAs, doAsPrivileged requires a third parameter: an AccessControlContext. Unlike doAs, which associates the provided Subject with the current access control context, doAsPrivileged associates the Subject with the provided access control context. See doAs vs. doAsPrivileged in the JAAS Reference Guide for a comparison of those methods.

The Authorization Tutorial Code

The code for this tutorial consists of two files:

  • JaasAzn.java is exactly the same as the JaasAcn.java from the JAAS Authentication tutorial except for the additional code needed to call Subject.doAsPrivileged.
  • SampleAction.java contains the SampleAction class. This class implements PrivilegedAction and has a run method that contains all the code we want to be executed with Principal-based authorization checks.

JaasAzn.java

JaasAzn.java is exactly the same as the JaasAcn.java code used in the previous tutorial except with three statements added at the end of the main method, after the authentication is done. These statements result in (1) association of a Subject representing the authenticated user with the current access control context and (2) execution of the code in the run method of SampleAction. Associating the Subject with the access control context enables security-sensitive operations in the SampleAction run method (and any code it invokes directly or indirectly) to be executed if a Principal representing the authenticated user is granted the required permissions in the current policy.

Like JaasAcn.java, JaasAzn.java instantiates a LoginContext lc and calls its login method to perform the authentication. If successful, the authenticated Subject (which includes a Principal representing the user) is obtained by calling the LoginContext's getSubject method:

Subject mySubject = lc.getSubject();

The main method then calls Subject.doAsPrivileged, passing it the authenticated Subject mySubject, a PrivilegedAction (SampleAction) and a null AccessControlContext, as described in the following.

The SampleAction class is instantiated via the following:

PrivilegedAction action = new SampleAction();

The call to Subject.doAsPrivileged is performed via:

Subject.doAsPrivileged(mySubject, action, null);

The doAsPrivileged method invokes execution of the run method in the PrivilegedAction action (SampleAction) to initiate execution of the rest of the code, which is considered to be executed on behalf of the Subject mySubject.

Passing null as the AccessControlContext (third) argument to doAsPrivileged indicates that mySubject should be associated with a new empty AccessControlContext. The result is that security checks occurring during execution of SampleAction will only require permissions for the SampleAction code itself (or other code it invokes), running as mySubject. Note that the caller of doAsPrivileged (and the callers on the execution stack at the time doAsPrivileged was called) do not require any permissions while the action executes.

SampleAction.java

SampleAction.java contains the SampleAction class. This class implements java.security.PrivilegedAction and has a run method that contains all the code we want to be executed as the Subject mySubject. For this tutorial, we will perform three operations, each of which cannot be done unless code has been granted required permissions. We will:

  • Read and print the value of the java.home system property,
  • Read and print the value of the user.home system property, and
  • Determine whether or not a file named foo.txt exists in the current directory.

Here is the code:

import java.io.File;
import java.security.PrivilegedAction;

public class SampleAction implements PrivilegedAction {

  public Object run() {

    System.out.println("\nYour java.home property value is: "
                + System.getProperty("java.home"));

    System.out.println("\nYour user.home property value is: "
                + System.getProperty("user.home"));

    File f = new File("foo.txt");
    System.out.print("\nfoo.txt does ");
    if (!f.exists())
        System.out.print("not ");
    System.out.println("exist in the current working directory.");
    return null;
  }
}

The Login Configuration File

The login configuration file used for this tutorial can be exactly the same as that used by the JAAS Authentication tutorial. Thus we can use jaas.conf, which contains just one entry:

JaasSample {
  com.sun.security.auth.module.Krb5LoginModule required;
};

This entry is named "JaasSample" and that is the name that both our tutorial applications JaasAcn and JaasAzn use to refer to it. The entry specifies that the LoginModule to be used to do the user authentication is the Krb5LoginModule in the com.sun.security.auth.module package and that this Krb5LoginModule is required to "succeed" in order for authentication to be considered successful. The Krb5LoginModule succeeds only if the name and password supplied by the user are successfully used to log the user into the Kerberos KDC.

The Policy File

This authorization tutorial contains two classes, JaasAzn and SampleAction. The code in each class contains some security-sensitive operations and thus relevant permissions are required in a policy file in order for the operations to be executed.

Permissions Required by JaasAzn

The main method of the JaasAzn class does two operations for which permissions are required. It

  • creates a LoginContext, and
  • calls the doAsPrivileged static method of the Subject class.

The LoginContext creation is exactly the same as was done in the authentication tutorial, and it thus needs the same javax.security.auth.AuthPermission permission with target "createLoginContext.JaasSample".

In order to call the doAsPrivileged method of the Subject class, you need to have a javax.security.auth.AuthPermission with target "doAsPrivileged".

Assuming the JaasAzn class is placed in a JAR file named JaasAzn.jar, these permissions can be granted to the JaasAzn code via the following grant statement in the policy file:

grant codebase "file:./JaasAzn.jar" {
   permission javax.security.auth.AuthPermission
                    "createLoginContext.JaasSample";
   permission javax.security.auth.AuthPermission "doAsPrivileged";
};

Permissions Required by SampleAction

The SampleAction code does three operations for which permissions are required. It

  • reads the value of the "java.home" system property.
  • reads the value of the "user.home" system property.
  • checks to see whether or not a file named foo.txt exists in the current directory.

The permissions required for these operations are the following:

permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.io.FilePermission "foo.txt", "read";

We need to grant these permissions to the code in SampleAction.class, which we will place in a JAR file named SampleAction.jar. However, for this particular grant statement we want to grant the permissions not just to the code but to a specific user executing the code, to demonstrate how to restrict access to a particular user.

Thus, as explained in How Do You Make Principal-Based Policy File Statements?, our grant statement looks like the following:

grant codebase "file:./SampleAction.jar",
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "your_user_name@your_realm"  {

   permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "user.home", "read";
   permission java.io.FilePermission "foo.txt", "read";
};
You substitute your Kerberos user name (complete with "@" and realm) for "your_user_name@your_realm". For example, if your user name is "mjones" and your realm is "KRBNT-OPERATIONS.ABC.COM", you would use "mjones@KRBNT-OPERATIONS.ABC.COM" (complete with the quotes).

The Full Policy File

The full policy file is jaasazn.policy.

Running the Authorization Tutorial Code

To execute our JAAS authorization tutorial code, all you have to do is

  1. Place the following files into a directory:
    • The JaasAzn.java source file.
    • The SampleAction.java source file.
    • The jaas.conf login configuration file.
    • The jaasazn.policy policy file.
  2. Replace "your_user_name@your_realm" in jaasazn.policy with your user name and realm.
  3. Compile SampleAction.java and JaasAzn.java:
    javac SampleAction.java JaasAzn.java
  4. Create a JAR file named JaasAzn.jar containing JaasAzn.class:
    jar -cvf JaasAzn.jar JaasAzn.class
  5. Create a JAR file named SampleAction.jar containing SampleAction.class:
    jar -cvf SampleAction.jar SampleAction.class
  6. Execute the JaasAzn application, specifying
    1. by an appropriate -classpath clause that classes should be searched for in the JaasAzn.jar and SampleAction.jar JAR files,
    2. by -Djava.security.manager that a security manager should be installed,
    3. by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified.
    4. by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified.
    5. by -Djava.security.policy=jaasazn.policy that the policy file to be used is jaasazn.policy, and
    6. by -Djava.security.auth.login.config=jaas.conf that the login configuration file to be used is jaas.conf.

    Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems. The only difference is that on Windows systems you use semicolons to separate classpath items, while you use colons for that purpose on Solaris, Linux, and Mac OS X. Be sure to replace <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

    Here is the full command for Windows systems:

    java -classpath JaasAzn.jar;SampleAction.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=jaasazn.policy
 -Djava.security.auth.login.config=jaas.conf JaasAzn

    Here is the full command for Solaris, Linux, and Mac OS X systems:

    java -classpath JaasAzn.jar:SampleAction.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=jaasazn.policy
 -Djava.security.auth.login.config=jaas.conf JaasAzn

    Type the full command on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

    You will be prompted for your Kerberos user name and password, and the underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. If your login is successful, you will see the message "Authentication succeeded!" and if not, you will see "Authentication Failed."

    For login troubleshooting suggestions, see Troubleshooting.

    Once authentication is successfully completed, the rest of the program (in SampleAction) will be executed on behalf of you, the user, requiring you to have been granted appropriate permissions. The jaasazn.policy policy file grants you the required permissions, so you will see a display of the values of your java.home and user.home system properties and a statement as to whether or not you have a file named foo.txt in the current directory.

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAAS Login Configuration File

JAAS authentication is performed in a pluggable fashion, so Java applications can remain independent from underlying authentication technologies. Configuration information such as the desired authentication technology is specified at runtime. The source of the configuration information (for example, a file or a database) is up to the class javax.security.auth.login.Configuration. It reads configuration information from configuration files, which are described in this section.

Login Configuration File Structure and Contents

A login configuration file consists of one or more entries, each specifying which underlying authentication technology should be used for a particular application or applications. The structure of each entry is the following:

<entry name> {
    <LoginModule> <flag> <LoginModule options>;
    <LoginModule> <flag> <LoginModule options>;
    // ...
    };

Thus, each login configuration file entry consists of a name followed by one or more LoginModule-specific items. Each LoginModule-specific item specifies a LoginModule, a flag value, and options to be passed to the LoginModule. (These are described futher below.) Each LoginModule-specific item is terminated by a semicolon and the entire group of items is enclosed in braces. Each configuration file entry is terminated by a semicolon.

As an example, the login configuration file used for the JAAS Authentication tutorial contains just one entry, which is

JaasSample {
    com.sun.security.auth.module.Krb5LoginModule required;
};

Here, the entry is named "JaasSample" and that is the name that the JAAS Authentication tutorial application (JaasAcn.java) uses to refer to this entry. The entry specifies that the LoginModule to be used to do the user authentication is the Krb5LoginModule in the com.sun.security.auth.module package and that this Krb5LoginModule is required to "succeed" in order for authentication to be considered successful. The Krb5LoginModule succeeds only if the name and password supplied by the user are successfully used to log the user into the Kerberos KDC.

The name for an entry in a login configuration file is the name that applications use to refer to the entry when they instantiate a LoginContext, as described in Instantiating a LoginContext in the JAAS authentication tutorial. The name can be whatever name the application developer wishes to use. Here, the term "application" refers to whatever code does the JAAS login, whether it is your application (as shown in the JAAS Authentication and JAAS Authorization tutorials) or a Login utility that does the JAAS operations for you (as shown in the Use of JAAS Login Utility and Use of Java GSS-API for Secure Message Exchanges Using JAAS Login Utility tutorials.)

The subparts of each LoginModule-specific item are described by the following. See the Configuration documentation for more information.

  • LoginModule

    This specifies the fully qualified class name for a class that implements a particular authentication technology. Specifically, the class must implement the javax.security.auth.spi.LoginModule interface. A typical LoginModule may prompt for and verify a user name and password. Any vendor can provide a LoginModule implementation that you can use. Some implementations are supplied with the JRE from Sun Microsystems. Throughout these tutorials we use the Krb5LoginModule in the com.sun.security.auth.module package. The Krb5LoginModule uses Kerberos as the underlying authentication technology. You can view the reference documentation for the various LoginModules, all in the com.sun.security.auth package:

    • JndiLoginModule
    • KeyStoreLoginModule
    • Krb5LoginModule
    • NTLoginModule
    • UnixLoginModule

  • flag

    The flag value indicates whether success of the LoginModule is "required", "requisite", "sufficient", or "optional".

  • LoginModule options

    If the specified LoginModule implementation has options that can be set, you specify any desired option values here. This is a space-separated list of values which are passed directly to the underlying LoginModule. Options are defined by the LoginModule itself, and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities. See the Krb5LoginModule documentation for information about the options defined for the Krb5LoginModule used for all the tutorials in this series.

    The correct way to specify options in the configuration file is by using a name-value pairing, for example debug=true, where the option name (in this case, "debug") and value (in this case, "true") should be separated by an "equals" symbol.

Where to Specify Which Login Configuration File Should Be Used

The configuration file to be used can be specified in one of two ways:

  1. On the command line.

    You can use a -Djava.security.auth.login.config command line argument to specify the login configuration file that should be used. We use this approach for all the tutorials. For example, we run our JaasAcn application in the JAAS Authentication tutorial using the following command, which specifies that the configuration file is the jaas.conf file in the current directory:

    java -Djava.security.auth.login.config=jaas.conf JaasAcn

  2. In the Java security properties file.

    An alternate approach to specifying the location of the login configuration file is to indicate its URL as the value of a login.config.url.n property in the security properties file. The security properties file is the java.security file located in the lib/security directory of the JRE.

    Here, n indicates a consecutively-numbered integer starting with 1. Thus, if desired, you can specify more than one login configuration file by indicating one file's URL for the login.config.url.1 property, a second file's URL for the login.config.url.2 property, and so on. If more than one login configuration file is specified (that is, if n > 1), then the files are read and concatenated into a single configuration.

    Here is an example of what would need to be added to the security properties file in order to indicate the jaas.conf login configuration file used by this tutorial. This example assumes the file is in the C:\AcnTest directory on a Microsoft Windows system:

    login.config.url.1=file:C:/AcnTest/jaas.conf

    (Note that URLs always use forward slashes, regardless of what operating system the user is running.)

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Kerberos Requirements

Kerberos Version 5 is used for both the authentication and secure communication aspects of the client and server applications developed in this tutorial. The reader is assumed to already be familiar with Kerberos. See the Kerberos reference documentation.

The JAAS framework, and the Kerberos mechanism required by the Java GSS-API methods, are built into the version 1.4 and later JREs from all vendors. (JAAS was available as a separately-downloadable optional package starting in version 1.3.) The Kerberos LoginModule required for the JAAS authentication in this tutorial may not be available in all vendors' JREs. We will be using the LoginModule for Kerberos provided in the JRE from Sun Microsystems (versions 1.4 and later).

In order to run the sample programs, you will need access to a Kerberos installation. As described in the following sections, you may also need a krb5.conf Kerberos configuration file and an indication as to where that file is located.

As with all Kerberos installations, a Kerberos Key Distribution Center (KDC) is required. It needs to contain the user name and password you will use to be authenticated to Kerberos. Note: A KDC implementation is part of a Kerberos installation and not a part of the JRE v 1.4 and later.

As with most Kerberos installations, a Kerberos configuration file krb5.conf is consulted to determine such things as the default realm and KDC. If you are using a Kerberos implementation such as that from Microsoft for Windows 2000, which does not include a krb5.conf file, you will either need to create one or use system properties as described in Setting Properties to Indicate the Default Realm and KDC.

Setting Properties to Indicate the Default Realm and KDC

Typically, the default realm and the KDC for that realm are indicated in the Kerberos krb5.conf configuration file. However, if you like, you can instead specify these values by setting the following system properties to indicate the realm and KDC, respectively:

java.security.krb5.realm
java.security.krb5.kdc

If you set one of these properties you must set them both.

Also note that if you set these properties, then no cross-realm authentication is possible unless a krb5.conf file is also provided from which the additional information required for cross-realm authentication may be obtained.

If you set values for these properties, then they override the default realm and KDC values specified in krb5.conf (if such a file is found). The krb5.conf file is still consulted if values for items other than the default realm and KDC are needed. If no krb5.conf file is found, then the default values used for these items are implementation-specific.

Locating the krb5.conf Configuration File

The essential Kerberos configuration information is the default realm and the default KDC. As shown in Setting Properties to Indicate the Default Realm and KDC, if you set properties to indicate these values, they are not obtained from a krb5.conf configuration file.

If these properties do not have values set, or if other Kerberos configuration information is needed, an attempt is made to find the required information in a krb5.conf file. The algorithm to locate the krb5.conf file is the following:

  • If the system property java.security.krb5.conf is set, its value is assumed to specify the path and file name.

  • If that system property value is not set, then the configuration file is looked for in the directory

    • <java-home>\lib\security (Windows)
    • <java-home>/lib/security (Solaris and Linux)

    Here <java-home> refers to the directory where the JRE was installed. For example, if you have J2SE 5.0 installed on Solaris in a directory named /j2sdk1.5, the directory in which the configuration file is looked for is:

    /j2sdk1.5/jre/lib/security

  • If the file is still not found, then an attempt is made to locate it as follows:

    • /etc/krb5/krb5.conf (Solaris)
    • c:\winnt\krb5.ini (Windows)
    • /etc/krb5.conf (Linux)

  • If the file is still not found, and the configuration information being searched for is not the default realm and KDC, then implementation-specific defaults are used. If, on the other hand, the configuration information being searched for is the default realm and KDC because they weren't specified in system properties, and the krb5.conf file is not found either, then an exception is thrown.

Naming Conventions for Realm Names and Hostnames

By convention, all Kerberos realm names are uppercase and all DNS hostname and domain names are lowercase. On the Windows 2000 platform, domains are also Kerberos realms; however, the realm name is always the uppercase version of the domain name.

Hostnames are case insensitive and by convention they are all lowercase. They must resolve to the same hostname on the client and server by their respective naming services.

However, in the Kerberos database hostnames are case sensitive. In all host-based Kerberos service principals in the KDC, hostnames are case-sensitive. The hostnames used in the Kerberos service principal names must exactly match the hostnames returned by the naming service. For example, if the naming service returns a fully qualified lowercased DNS hostname, such as "raven.example.com", then the administrator must use the same fully qualified lowercased DNS hostname when creating host-based principal names in the KDC: "host/raven.example.com".

Cross-Realm Authentication

In cross-realm authentication, a principal in one realm can authenticate to principals in another realm.

In Kerberos, cross-realm authentication is implemented by sharing an encryption key between two realms. The KDCs in two different realms share a special cross-realm secret; this secret is used to prove identity when crossing the boundary between realms.

The key that is shared is the Ticket Granting Service principal's key. Here's a typical Ticket Granting Service principal for a single realm:

ktbtgt/EXAMPLE.COM@EXAMPLE.COM
In cross realm authentication, two principals are created on each participating realm. For two realms, ENG.EAST.EXAMPLE.COM and SALES.WEST.EXAMPLE.COM, these principals would be:
krbtgt/ENG.EAST.EXAMPLE.COM@SALES.WEST.EXAMPLE.COM
krbtgt/SALES.WEST.EXAMPLE.COM@ENG.EAST.EXAMPLE.COM
These principals, known as remote Ticket Granting Server principals, must be created on both realms.

On Windows 2000 KDC, the krbtgt account is created automatically when a Windows 2000 domain is created. This account cannot be deleted and renamed.

Types of Realms

When you set up multiple realms, you must decide if your realm configuration will be "hierarchical" (one realm is a superset of the other) or "direct" (the mapping between realms must be defined).

How to Set Up Cross-Realm Authentication

In transitive cross-realm authentication you can define a path of realms connected via cross-realm secrets and use this path to traverse realms until you get credentials in the desired realm.

The [capaths] section in the Kerberos configuration file defines a series of authentication paths used for transitive cross-realm authentication. Clients use [capaths] to determine the correct path for doing transitive cross-realm authentication. Application servers check the [capaths] section to determine if a cross-realm authentication path is valid.

For example, to set-up cross realm authentication between ENG.EAST.EXAMPLE.COM and SALES.WEST.EXAMPLE.COM, krb5.conf should include the following entry:

[capaths]
    ENG.EAST.EXAMPLE.COM = {
        SALES.WEST.EXAMPLE.COM = .
    }

    SALES.WEST.EXAMPLE.COM = {
         ENG.EAST.EXAMPLE.COM = .
    }
On Windows 2000, you must set up a trust relationship between the two realms. For configuration details, refer to Step-by-Step Guide to Kerberos 5 (krb5 1.0) Interoperability on Microsoft's Web site.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


More Things You Can Do With Java GSS-API and JAAS

The previous tutorial, Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges, demonstrated how two applications, in particular a client and a server, could use the Java GSS-API to establish a secure context between them and then securely exchange messages.

There are additional operations the context acceptor (the server in our client/server example) can perform once the context has been established with the context initiator (the client). Basically, the server can "impersonate" the client. The level of impersonation depends upon whether or not the client has delegated credentials to the server.

  • Executing Code on Behalf of the Client User
  • Using Credentials Delegated From the Client

Executing Code on Behalf of the Client User

One possible type of client impersonation the server can do is causing code to be executed on behalf of the same entity (user) the client code is executed on behalf of. Normally, a method executed by a thread uses the access control settings for that thread itself. However, when impersonating a client in this tutorial, the server uses the client's access control settings so that the server has access to exactly those resources that the client itself has when it runs.

One major benefit of the approach used in this tutorial is that the JAAS authorization component can be used for access control. Without the JAAS authorization component, the server principal would need access to any resources accessed by the code executed on behalf of the client user, and the server code would need to include access control logic to determine whether the user was authorized to access such resources. By utilizing JAAS authorization, providing principal-based access control, the access control is handled automatically. Permissions for the security-sensitive operations in such code only need to be granted to that user and not also to the server code. See the JAAS Authorization tutorial for more information on JAAS authorization.

  • Basic Approach
  • Sample Code and Policy File
  • Running the Sample Code

Basic Approach

How does the server "impersonate" the client to execute code on behalf of the user running the client code? Essentially the same way the client code is set up to be run on behalf of that user. All the server code needs to know is the user's principal name, which it can obtain from the context established with the client.

Recall that JAAS authentication of the user executing the client code results in creation of a Subject containing a Principal with the user (principal) name. The Subject is subsequently associated with a new access control context (via a Subject.doAsPrivileged call from the Login utility) and the client code is considered to be executed on behalf of the user; subsequent access control decisions are based on whether or not that particular user, executing the client code, is granted the required permissions.

The server code is similarly handled, except in that case the Principal specified for authentication is typically a "service principal", not a user principal. Again, a Subject containing a Principal with the specified principal name is created, Subject.doAsPrivileged is called, and the server code is considered to be executed on behalf of the specified principal; subsequent access control decisions are based on whether or not that particular principal, executing the server code, is granted the required permissions.

Once the client and server have established a mutual context, the context initiator's name (the client's principal name) can be determined by the following:

GSSName clientGSSName = context.getSrcName();

The context acceptor (the server) can use this name to construct a Subject containing a Principal that represents the same entity. For example, if you are using a JRE from Sun Microsystems, you can construct such a Subject via the following:

Subject client =
  com.sun.security.jgss.GSSUtil.createSubject(clientGSSName, null);

The createSubject method creates a new Subject from the GSSName and GSSCredential specified as arguments. If the server code is just going to execute code on behalf of the user in the local JVM, the user's credentials are not required - and in fact cannot even be obtained unless the client has delegated credentials to the server, as discussed in Using Credentials Delegated From the Client. Since the credentials are not needed here, we pass a null for the GSSCredential argument.

Note: If you are not using a JRE from Sun Microsystems, an alternative way to do this is to construct a KerberosPrincipal instance as follows:
KerberosPrincipal principal =
  new KerberosPrincipal(clientGSSName.toString());

Then use this principal to construct a new Subject or populate this principal in the principal set of an existing Subject.

The code that the server would like to execute on behalf of the user should be initiated from the run method of a class that implements java.security.PrivilegedAction (or java.security.PrivilegedExceptionAction). That is, the code can either be in such a run method or invoked from such a run method.

The server code can pass the Subject, along with an instance of the PrivilegedAction (or PrivilegedExceptionAction), to Subject.doAsPrivileged to execute the subsequent code, starting with the run method in the PrivilegedAction, on behalf of the principal (user) in the specified Subject.

For example, suppose the PrivilegedAction class is called ReadFileAction and it takes as an argument a String with the principal name. You can create an instance of this class by

String clientName = clientGSSName.toString();
PrivilegedAction readFile =
    new ReadFileAction(clientName);

The call to doAsPrivileged is then

Subject.doAsPrivileged(client, readFile, null);

Sample Code and Policy File

The following sample code and policy file illustrate the server impersonating the client in order to execute code whose security-sensitive operations are only permitted to be done by the specific user executing the client.

  • SampleServerImp.java
  • ReadFileAction.java
  • serverimp.policy

SampleServerImp.java

The SampleServerImp.java file is exactly the same as the SampleServer.java file from the previous (Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges) tutorial, except that after exchanging messages with the client, it has the following code to perform a ReadFileAction as the client user:

System.out.println("Impersonating client.");

/*
 * Extract the KerberosPrincipal from the client GSSName and
 * populate it in the principal set of a new Subject. Pass in a
 * null for credentials since credentials will not be needed.
 */
GSSName clientGSSName = context.getSrcName();
System.out.println("clientGSSName: " + clientGSSName);
Subject client =
   com.sun.security.jgss.GSSUtil.createSubject(clientGSSName,
        null);

/*
* Construct an action that will read a file meant only for the
* client
*/
String clientName = clientGSSName.toString();
PrivilegedAction readFile =
   new ReadFileAction(clientName);

/*
* Invoke the action via a doAsPrivileged. This allows the
* action to be executed as the client subject, and it also
* runs that code as privileged. This means that any permission
* checking that happens beyond this point applies only to
* the code being run as the client.
*/
Subject.doAsPrivileged(client, readFile, null);

ReadFileAction.java

The ReadFileAction.java file contains the ReadFileAction class. Its constructor takes as an argument a String for the name of the client user. The client username is used to construct a file name for a file from which ReadFileAction will attempt to read. The file name will be:

./data/<name>_info.txt
where <name> is the client username without its corresponding realm. For example, if the full username is mjones@KRBNT-OPERATIONS.EXAMPLE.COM, then the file name is
./data/mjones_info.txt
Note: On Microsoft Windows systems the forward slashes will be backward slashes.

The ReadFileAction run method reads the specified file and prints its contents.

serverimp.policy

ReadFileAction attempts to read a file, which is a security-checked operation. Since ReadFileAction is considered to be executed as the client user (Principal), the appropriate permission must be granted not only to the ReadFileAction code itself, but to the client Principal as well.

Assuming the ReadFileAction class is placed in a JAR file named ReadFileAction.jar, and the user principal name is mjones@KRBNT-OPERATIONS.EXAMPLE.COM, this permission can be granted via the following in a policy file:

grant CodeBase "file:./ReadFileAction.jar"
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "mjones@KRBNT-OPERATIONS.EXAMPLE.COM" {

    permission java.io.FilePermission "data/mjones_info.txt",
        "read";
};
The serverimp.policy file is exactly the same as the server.policy file from the previous (Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges) tutorial, except that it grants the SampleServer code the javax.security.auth.AuthPermission "doAsPrivileged" permission it needs in order to call the doAsPrivileged method, and it has the following placeholder for granting the FilePermission shown above:
grant CodeBase "file:./ReadFileAction.jar"
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "your_user_name@your_realm" {

    permission java.io.FilePermission "data/your_user_name_info.txt",
        "read";
};

You must substitute your Kerberos realm for your_realm, and your user name for your_user_name in both your_user_name@your_realm and data/your_user_name_info.txt. If you are working on a Microsoft Windows sytem, you also replace the "/" in data/your_user_name_info.txt with a "\".

Running the Sample Code

To run the sample code illustrating the server impersonating the client, do everything listed in Running the SampleClient and SampleServer Programs in the previous tutorial, except for the following:

  • In the "Prepare SampleServer for Execution" step:
    • Use SampleServerImp.java instead of SampleServer.java. Compile it and create a JAR file named SampleServerImp.jar containing SampleServerImp.class via the following:
      javac SampleServerImp.java
jar -cvf SampleServerImp.jar SampleServerImp.class
    • Use the serverimp.policy policy file instead of server.policy.
    • Use the csImpLogin.conf login configuration file instead of cs.conf.
    • Copy ReadFileAction.java to the same directory as the other files. Compile it and place it in a JAR file via the following:
      javac ReadFileAction.java
jar -cvf ReadFileAction.jar ReadFileAction.class
    • In csImpLogin.conf, replace "service_principal@your_realm" with the Kerberos name of the service principal that represents SampleServer.
    • In serverimp.policy, replace "service_principal@your_realm" in both places it appears with the Kerberos name of the service principal that represents SampleServer. (The same name as that used in the login configuration file.) In addition, substitute your Kerberos realm for your_realm, and your user name for your_user_name in both your_user_name@your_realm and data/your_user_name_info.txt. If you are running on a Microsoft Windows system, then replace the "/" in data/your_user_name_info.txt with a "\".
    • Create a data subdirectory of your current directory and create a short text file of the specified name in that directory. For example, if your user name is mjones, the file to be placed in the data subdirectory should be named mjones_info.txt.
  • In the "Execute SampleServer" step:
    • Use the following commands instead of those specified in that section so that SampleServerImp is executed, serverimp.policy and csImpLogin.conf are used, and ReadFileAction.jar is included.

      Important: In these commands, you must replace <port_number> with an appropriate port number (a high port number such as 4444), <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

      Here is the command for Microsoft Windows systems:

        java -classpath Login.jar;SampleServerImp.jar;ReadFileAction.jar
    -Djava.security.manager
    -Djava.security.krb5.realm=<your_realm>
    -Djava.security.krb5.kdc=<your_kdc>
    -Djava.security.policy=serverimp.policy
    -Djava.security.auth.login.config=csImpLogin.conf
    Login SampleServerImp <port_number>

      Here is the command for Solaris, Linux, and Mac OS X systems:

        java -classpath Login.jar:SampleServerImp.jar:ReadFileAction.jar
    -Djava.security.manager
    -Djava.security.krb5.realm=<your_realm>
    -Djava.security.krb5.kdc=<your_kdc>
    -Djava.security.policy=serverimp.policy
    -Djava.security.auth.login.config=csImpLogin.conf
    Login SampleServerImp <port_number>

      As usual, type the full command on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Microsoft Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

      As when running SampleServer, you will be prompted for the Kerberos password for the service principal under which SampleServerImp is expected to be run. The Kerberos login module specified in the login configuration file will log the service principal into Kerberos. Once authentication is successfully completed, the SampleServerImp code will be executed on behalf of the service principal. It will listen for socket connections on the specified port.

      After you follow the "Prepare SampleClient for Execution" and "Execute SampleClient" instructions as usual and perform the user login, the client code will request a socket connection with SampleServerImp. Once SampleServerImp accepts the connection, SampleClient and SampleServerImp establish a shared context and then exchange messages as described in the previous tutorial.

      After the message exchange, SampleServerImp determines the principal name of the user executing the client code, creates a new Subject containing a Principal with that name, and calls Subject.doAsPrivileged to execute the code in ReadFileAction on behalf of the specified user. ReadFileAction reads the file named your_user_name_info.txt (where your_user_name represents the actual user name) in the data subdirectory of the current directory, and prints out its contents.

      For login troubleshooting suggestions, see Troubleshooting.

Using Credentials Delegated From the Client

The most complete type of client impersonation is possible if the client delegates its credentials to the server.

Recall that prior to context establishment with the context acceptor (the server in our previous tutorial), the context initiator (the client) sets various context options. If the initiator calls the requestCredDeleg method on the context object with a true argument, as in

context.requestCredDeleg(true);
then this requests that the initiator's credentials be delegated to the acceptor during context establishment.

Delegation of credentials from the initiator to the acceptor enables the acceptor to authenticate itself as an agent or delegate of the initiator.

First, after context establishment, the acceptor must determine whether or not credential delegation actually took place. It does so by calling the getCredDelegState method:

boolean delegated = context.getCredDelegState();

If credentials were delegated, the acceptor can obtain those credentials by calling the getDelegCr method:

GSSCredential clientCr = context.getDelegCr();

The resulting GSSCredential object can then be used to initiate subsequent GSS-API contexts as a "delegate" of the initiator. For example, the server could authenticate as the client to a backend server that cares more about who the original client was than who the intermediate server is.

Acting as the client, the server can establish a connection with the backend server, establish a joint security context, and exchange messages in basically the same manner that the client and server did.

One way it could be done is that when the server calls the createContext method of a GSSManager, it could pass createContext the delegated credentials instead of passing a null.

Alternatively, the server code could first call the com.sun.security.jgss.GSSUtil createSubject method and pass it the delegated credentials. That method returns a Subject containing those credentials as the default credentials. The server could then associate this Subject with the current AccessControlContext, as described in How Do You Associate a Subject with an Access Control Context? in the JAAS Authorization tutorial. Then, when the server code calls the GSSManager createContext method, it can pass a null (indicating the credentials for the "current" Subject should be used). In other words, the server would effectively become the client. Subsequent connections to backend servers using GSS could be made exactly as described in the previous tutorials. This approach is useful if you want the code that will use the delegated credentials to be identical to the code that uses the default local credentials.

Permission Required In Order to Delegate Credentials

In order to delegate credentials, the context initiator (SampleClient in our previous tutorial) must have a javax.security.auth.kerberos.DelegationPermission. An example using placeholders in italics for actual values is the following:

permission javax.security.auth.kerberos.DelegationPermission
  "\"service_principal@your_realm\"
     \"krbtgt/your_realm@your_realm\"";

Note that DelegationPermission has a single target in quotes that contains two items, both of which are quoted. Each inner quote is escaped by a "\". Thus the first item is

"service_principal@your_realm"
and the second is
"krbtgt/your_realm@your_realm"

This basically gives the code executing on behalf of the client the permission to forward a Kerberos ticket to the specified peer (service_principal), where the Kerberos ticket is meant to avail service from krbtgt/your_realm@your_realm.

Substitute your realm for all places your_realm appears. Also substitute the service principal name for the service principal representing the server for service_principal@your_realm. (See Kerberos User and Service Principal Names in the previous tutorial.) Suppose your realm is KRBNT-OPERATIONS.EXAMPLE.COM and the service principal is "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM". Then the permission could appear in a policy file as

permission javax.security.auth.kerberos.DelegationPermission
  "\"sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM\"
     \"krbtgt/KRBNT-OPERATIONS.EXAMPLE.COM@KRBNT-OPERATIONS.EXAMPLE.COM\"";

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Subjects, Principals, Authentication, and Credentials

To authorize access to resources, applications first need to authenticate the source of the request. The JAAS framework defines the term subject to represent the source of a request. A subject may be any entity, such as a person or service. A subject is represented by the javax.security.auth.Subject class.

Authentication represents the process by which the identity of a subject is verified, and must be performed in a secure fashion; otherwise a perpetrator may impersonate others to gain access to a system. Authentication typically involves the subject demonstrating some form of evidence to prove its identity. Such evidence may be information only the subject would likely know or have (such as a password or fingerprint), or it may be information only the subject could produce (such as signed data using a private key).

Once authenticated, a Subject is populated with associated identities, or Principals (of type java.security.Principal). A Subject may have many Principals. For example, a person may have a name Principal ("John Doe") and an SSN Principal ("123-45-6789"), which distinguish it from other Subjects.

In addition to associated Principals, a Subject may own security-related attributes, which are referred to as credentials. A credential may contain information used to authenticate the subject to new services. Such credentials include passwords, Kerberos tickets, and public key certificates. Credentials might also contain data that enables the subject to perform certain activities. Cryptographic keys, for example, represent credentials that enable the subject to sign or encrypt data. Public and private credential classes are not part of the core Java SE API. Any class, therefore, can represent a credential.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting

Below are listed some problems that may occur when attempting a login, and suggestions for solving them.

  • Configurable Kerberos Settings:

    The Kerberos Key Distribution Center (KDC) name and realm settings are provided in the Kerberos configuration file or via the system properties java.security.krb5.kdx and java.security.krb5.realm. In previous releases, changes to the Kerberos configuration values would only take effect when an application was restarted.

    Starting from the JDK 1.4.2 release, a new boolean option refreshKrb5Config can be specified in the entry for Krb5LoginModule in the JAAS configuration file. If this option is set to true, the configuration values will be refreshed before the login method of the Krb5LoginModule is called.

    NOTE: When switching Kerberos configurations, it is REQUIRED that refreshKrb5Config should be set to true. Failure to set this value can lead to unexpected results.

  • java.lang.SecurityException at javax.security.auth.login.Configuration.getConfiguration

    Cause: There was a problem processing the JAAS login configuration file, possibly due to a syntax error in the file.

    Solution: Check the configuration file carefully for errors. See JAAS Login Configuration File for information about the syntax required in the login configuration file.

  • javax.security.auth.login.LoginException: KrbException: Pre-authentication information was invalid (24) - Preauthentication failed

    Cause 1: The password entered is incorrect.

    Solution 1: Verify the password.

    Cause 2: If you are using the keytab to get the key (e.g., by setting the useKeyTab option to true in the Krb5LoginModule entry in the JAAS login configuration file), then the key might have changed since you updated the keytab.

    Solution 2: Consult your Kerberos documentation to generate a new keytab and use that keytab.

    Cause 3: Clock skew - If the time on the KDC and on the client differ significanlty (typically 5 minutes), this error can be returned.

    Solution 3: Synchronize the clocks (or have a system administrator do so).

    Cause 4: The Kerberos realm name is not all uppercase.

    Solution 4: Make the Kerberos realm name all uppercase. Note: It is recommended to have all uppercase realm names. For details, refer to the Naming Conventions for the Realm Names and Hostnames section of this tutorial.

  • GSSException: No valid credentials provided (Mechanism level: Attempt to obtain new INITIATE credentials failed! (null)) . . . Caused by: javax.security.auth.login.LoginException: Clock skew too great

    Cause: Kerberos requires the time on the KDC and on the client to be loosely synchronized. (The default is within 5 minutes.) If that's not the case, you will get this error.

    Solution: Synchronize the clocks (or have a system administrator do so).

  • javax.security.auth.login.LoginException: KrbException: Null realm name (601) - default realm not specified

    Cause: The default realm is not specified in the Kerberos configuration file krb5.conf (if used), provided as a part of the user name, or specified via the java.security.krb5.realm system property.

    Solution: Verify that your Kerberos configuration file (if used) contains an entry specifying the default realm, or directly specify it by setting the value of the java.security.krb5.realm system property and/or including it in your user name when authenticating using Kerberos.

  • javax.security.auth.login.LoginException: java.net.SocketTimeoutException: Receive timed out

    Solution: Verify that the Kerberos KDC is up and running.

  • GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos Ticket)

    Cause: This may occur if no valid Kerberos credentials are obtained. In particular, this occurs if you want the underlying mechanism to obtain credentials but you forgot to indicate this by setting the javax.security.auth.useSubjectCredsOnly system property value to false (for example via -Djavax.security.auth.useSubjectCredsOnly=false in your execution command).

    Solution: Be sure to set the javax.security.auth.useSubjectCredsOnly system property value to false if you want the underlying mechanism to obtain credentials, rather than your application or a wrapper program (such as the Login utility used by some of the tutorials) performing authentication using JAAS.

  • javax.security.auth.login.LoginException: Could not load configuration file <krb5.conf> (No such file or directory)

    Cause: The tutorials' sample execution commands specify the default Kerberos realm and KDC by setting values for the java.security.krb5.realm and java.security.krb5.kdc system properties. If you like, you can instead have a krb5.conf Kerberos configuration file used. Such a file includes information about what the default realm and KDC are. To use a krb5.conf file, you either set the system property java.security.krb5.conf (instead of the realm and kdc properties) to specify the location of the file or you don't set any of these properties and therefore an attempt is made to locate the krb5.conf file in a default location. You will get the error "Could not load configuration file <krb5.conf> (No such file or directory)" if the file could not be found.

    Solution: Verify that the Kerberos configuration file krb5.conf is available and readable. Check Kerberos Requirements for information about how to specify the location of the krb5.conf file and where such a file is searched for by default if you don't explicitly indicate the location.

  • javax.security.auth.login.LoginException: KrbException: KDC has no support for encryption type (14) - KDC has no support for encryption type

    Cause 1: Your KDC does not support the encryption type requested.

    Solution 1: Sun's implementation of Kerberos supports the following encryption types: des-cbc-md5, des-cbc-crc and des3-cbc-sha1.

    Applications can select the desired encryption type by specifying following tags in the Kerberos Configuration file krb5.conf:

    [libdefaults]
default_tkt_enctypes = des-cbc-md5 des-cbc-crc des3-cbc-sha1
default_tgs_enctypes = des-cbc-md5 des-cbc-crc des3-cbc-sha1
permitted_enctypes = des-cbc-md5 des-cbc-crc des3-cbc-sha1
    If not specified, the default value is:
    des-cbc-md5 des-cbc-crc des3-cbc-sha1

    Cause 2: This exception is thrown when using native ticket cache on some Windows platforms. Microsoft has added a new feature in which they no longer export the session keys for Ticket-Granting Tickets (TGTs). As a result, the native TGT obtained on Windows has an "empty" session key and null EType. The effected platforms include: Windows Server 2003, Windows 2000 Server Service Pack 4 (SP4) and Windows XP SP2.

    Solution 2: You need to update the Windows registry to disable this new feature. The registry key allowtgtsessionkey should be added--and set correctly--to allow session keys to be sent in the Kerberos Ticket-Granting Ticket.

    On the Windows Server 2003 and Windows 2000 SP4, here is the required registry setting:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters
Value Name: allowtgtsessionkey
Value Type: REG_DWORD
Value: 0x01  ( default is 0 )
    By default, the value is 0; setting it to "0x01" allows a session key to be included in the TGT.

    Here is the location of the registry setting on Windows XP SP2:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\
Value Name: allowtgtsessionkey
Value Type: REG_DWORD
Value: 0x01
  • KDC reply did not match expectations

Cause: The KDC sent a response that cannot be understood by the client.

Solution: Verify that you have set correctly all the krb5.conf file configuration parameters and consult your KDC vendor's guide.

Note: A debugging mode can be enabled by setting the system property sun.security.krb5.debug to "true". This setting allows you to follow the program's execution of the Kerberos V5 protocol. If you send us feedback regarding a problem you are having, please include the complete debugging output.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Use of JAAS Login Utility

The previous two tutorials, JAAS Authentication and JAAS Authorization, show how you can use the LoginContext and Subject classes to write a program to

  • authenticate the user to verify his or her identity and
  • associate an instance of a particular class representing the user (a Subject instance) with an access control context in such a way that subsequent security-sensitive operations will be allowed if the current policy grants the user the required permissions.

This tutorial describes a Login utility that performs the above operations and then executes any specified application as the authenticated user.

Use of the Login utility with a sample application is demonstrated in this tutorial. The next tutorial, a client/server application using the Java GSS-API, also uses the Login utility.

It is not necessary to read the previous two tutorials on JAAS authentication and authorization prior to reading this one. However, you may want to refer to some sections in those tutorials to obtain further details regarding certain topics, such as how to make user-based policy file statements. You should also read JAAS Login Configuration File for information as to what a login configuration file is, since one is needed for this and all other tutorials in this series.

As with all tutorials in this series of tutorials, the underlying technology used to support authentication is Kerberos. See Kerberos Requirements.

  • What You Need to Know About the Login Utility
  • Application and Other File Requirements
  • The Sample Application Program
  • The Login Configuration File
  • The Policy File
  • Running the Sample Program with the Login Utility

If you want to first see the tutorial code in action, you can skip directly to Running the Sample Program with the Login Utility and then go back to the other sections to learn more.

What You Need to Know About the Login Utility

You do not need to understand the code contained in Login.java; you can just use it as is. However, you need to understand some facts about what it does so that your program, policy file, and login configuration file will properly work with it. Below is a summary of these facts, followed by sections with further information and examples.

The Login class does the following:

  • Assumes it is passed, as arguments, your application's top-level class name, followed by any arguments your application may require.
  • Assumes that the class name of your top-level application class is also used as the name of the entry to be looked up in your login configuration file.
  • Specifies the TextCallbackHandler class (from the com.sun.security.auth.callback package) as the class to be used when communicating with the user. This class can prompt the user for a user name and password.
  • Uses a LoginContext to authenticate the user. The LoginContext invokes the appropriate authentication technology, or LoginModule, to perform the authentication. LoginModules use a CallbackHandler (in our case, TextCallbackHandler) as needed to communicate with the user.
  • Allows the user three attempts to successfully log in.
  • Creates an instance of the MyAction class (also in Login.java), passing it the application arguments, if any.
  • Invokes Subject.doAsPrivileged, passing it a Subject representing the user, the MyAction instance, and a null AccessControlContext. The result is that the public static main method from your application is invoked and your application code is considered to be executed on behalf of the user.

Application and Other File Requirements

To utilize the Login utility to authenticate the user and execute your application, you may need a small number of additions or modifications to your login configuration file and policy file, as described in the following.

  • Application Requirements
  • Login Configuration File Requirements
  • Policy File Requirements

Application Requirements

In order to utilize the Login utility, your application code does not need anything special. All you need is for the entry point of your application to be the main method of a class you write, as usual.

The way to invoke Login such that it will authenticate the user and then instantiate MyAction to invoke your application is the following:

java <options> Login <AppName> <app arguments>
where <AppName> is your application's top-level class name and <app arguments> are any arguments required by your application. See Running the Sample Program with the Login Utility for the full command used for this tutorial.

Login Configuration File Requirements

Whenever a LoginContext is used to authenticate the user, you need a login configuration file to specify the desired login module. See the The Login Configuration File section in the JAAS authentication tutorial for more information as to what a login configuration file is and what it contains.

When you use the Login utility, the name for the login configuration file entry must be exactly the same as your top-level application class name. See The Login Configuration File in this tutorial for an example.

Policy File Requirements

Whenever you run an application with a security manager, you need a policy indicating the permissions granted to specific code, or to specific code being executed by a specific user (or users). One way of specifying the policy is by grant statements in a policy file. See The Policy File for more information.

If you use the Login utility to invoke your application, then you will need to grant it various permissions, as described in Permissions Required by the Login and MyAction Classes.

The Sample Application Program

The Sample.java application used for this tutorial performs the same actions as the SampleAction.java application did in the previous (JAAS Authorization) tutorial. It does the following:
  • Reads and prints the value of the java.home system property,
  • Reads and prints the value of the user.home system property, and
  • Determines whether or not a file named foo.txt exists in the current directory.

Here is the code:

import java.io.File;

public class Sample {

  public static void main (String[] args) throws SecurityException {

    // If there were any arguments to read, we'd do it here.

    System.out.println("\nYour java.home property value is: "
                +System.getProperty("java.home"));

    System.out.println("\nYour user.home property value is: "
                +System.getProperty("user.home"));

    File f = new File("foo.txt");
    System.out.print("\nfoo.txt does ");
    if (!f.exists())
        System.out.print("not ");
    System.out.println("exist in the current working directory.");
  }
}

The Login Configuration File

The sample.conf login configuration file for this tutorial contains a single entry, just like the login configuration file for the previous (JAAS Authorization) tutorial. The entry contents are the same since the class implementing the desired authentication technology in both cases is the Krb5LoginModule in the com.sun.security.auth.module package.

The only difference is the name used for the entry. In the previous tutorial we used the name "JaasSample", since that is the name used by the JaasAzn class to look up the entry. When you use the Login utility with your application, it expects the name for your login configuration file entry to be the same as the name of your top-level application class. That application class for this tutorial is named "Sample" so that must also be the name of the login configuration file entry. Thus the login configuration file looks like the following:

Sample {
   com.sun.security.auth.module.Krb5LoginModule required;
};

The "required" indicates that login using the Krb5LoginModule is required to "succeed" in order for authentication to be considered successful. The Krb5LoginModule succeeds only if the name and password supplied by the user are successfully used to log the user into the Kerberos KDC.

For information about all the possible options that can be passed to Krb5LoginModule, see the Krb5LoginModule documentation.

The Policy File

The Login, MyAction, and Sample classes all perform some security-sensitive operations and thus relevant permissions are required in a policy file in order for the operations to be executed.

Permissions Required by the Login and MyAction Classes

For this tutorial, you will create a Login.jar JAR file containing the Login.class and MyAction.class files. You need to grant Login.jar various permissions, specifically the ones required for invoking the security-sensitive methods the Login.jar classes call, as well as all the permissions required by your application. Otherwise, access control checks will fail.

The simplest thing to do, and what we recommend, is to grant Login.jar AllPermission. For this tutorial, the Login.jar file is assumed to be in the current directory and the policy file includes the following:

grant codebase "file:./Login.jar" {
   permission java.security.AllPermission;
};

Permissions Required by Sample

(Note: This section is essentially a modified copy of the Permissions Required by SampleAction section from the previous (JAAS Authorization) tutorial, since Sample and SampleAction perform the same operations and thus require the same permissions.)

The Sample code does three operations for which permissions are required. It

  • reads the value of the "java.home" system property.
  • reads the value of the "user.home" system property.
  • checks to see whether or not a file named foo.txt exists in the current directory.

The permissions required for these operations are the following:

permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.io.FilePermission "foo.txt", "read";

We need to grant these permissions to the code in Sample.class, which we will place in a JAR file named Sample.jar. However, our grant statement will grant the permissions not just to the code but to a specific authenticated user executing the code. This illustrates how you can use a Principal designation in a grant statement to restrict execution of security-sensitive operations in code to a specific user rather than allowing the permissions to all users executing the code.

Thus, as explained in How Do You Make Principal-Based Policy File Statements?, our grant statement looks like the following:

grant codebase "file:./Sample.jar",
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "your_user_name@your_realm"  {

   permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "user.home", "read";
   permission java.io.FilePermission "foo.txt", "read";
};
Important: You must substitute your Kerberos user name (complete with "@" and realm) for "your_user_name@your_realm". For example, if your user name is "mjones" and your realm is "KRBNT-OPERATIONS.ABC.COM", you would use "mjones@KRBNT-OPERATIONS.ABC.COM" (complete with the quotes).

The Full Policy File

The full policy file is sample.policy.

Running the Sample Program with the Login Utility

To execute the Sample application with the Login utility, do the following:

  1. Place the following files into a directory:
    • The Login.java source file.
    • The Sample.java source file.
    • The sample.conf login configuration file.
    • The sample.policy policy file.
  2. Replace "your_user_name@your_realm" in sample.policy with your user name and realm.
  3. Compile Login.java and Sample.java:
    javac Login.java Sample.java

    Note that Login.java contains two classes and thus compiling Login.java creates Login.class and MyAction.class.

  4. Create a JAR file named Login.jar containing Login.class and MyAction.class:
    jar -cvf Login.jar Login.class MyAction.class
  5. Create a JAR file named Sample.jar containing Sample.class:
    jar -cvf Sample.jar Sample.class
  6. Execute the Login class, specifying
    • by an appropriate -classpath clause that classes should be searched for in the Login.jar and Sample.jar JAR files,
    • by -Djava.security.manager that a security manager should be installed,
    • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified.
    • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified.
    • by -Djava.security.policy=sample.policy that the policy file to be used is sample.policy, and
    • by -Djava.security.auth.login.config=sample.conf that the login configuration file to be used is sample.conf.

    You pass the name of your application (in this case, "Sample") as an argument to Login. You would then add as arguments any arguments required by your application, but in our case Sample does not require any.

    Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems. The only difference is that on Windows systems you use semicolons to separate classpath items, while you use colons for that purpose on Solaris, Linux, and Mac OS X systems. Be sure to replace <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

    Here is the full command for Windows systems:

    java -classpath Login.jar;Sample.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=sample.policy
 -Djava.security.auth.login.config=sample.conf Login Sample

    Here is the full command for Solaris, Linux, and Mac OS X systems:

    java -classpath Login.jar:Sample.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=sample.policy
 -Djava.security.auth.login.config=sample.conf Login Sample

    Type the full command on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

    You will be prompted for your Kerberos user name and password, and the underlying Kerberos login module specified in the login configuration file will log you into Kerberos. Once authentication is successfully completed, the Sample code will be executed on behalf of you, the user. The sample.policy policy file grants you the required permissions, so you will see a display of the values of your java.home and user.home system properties and a statement as to whether or not you have a file named foo.txt in the current directory.

    For login troubleshooting suggestions, see Troubleshooting.

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges

This tutorial presents two sample applications to demonstrate the use of the Java GSS-API. This API permits secure exchanges of messages between communicating applications. Here are the sample client and server applications you'll need for this tutorial:

  • SampleClient
  • SampleServer
Note: This tutorial uses the same client and server applications as the Use of Java GSS-API for Secure Message Exchanges Without JAAS Programming tutorial. In that tutorial, JAAS (Java Authentication and Authorization Service) programming is not required. Instead, you let the underlying mechanism decide how to get credentials.
This tutorial uses policy files and a more complex login configuration file. The programs are run with a security manager; as a result, security-sensitive operations are not allowed unless the required permissions were explicitly granted. This tutorial also demonstrates how JAAS authorization adds user-centric access control that applies control based on who is running the code--not just on what code is running.

Contents:

  • Before You Start: Recommended Reading
  • Overview of the Client And Server Applications
  • Kerberos User and Service Principal Names
  • The Login Configuration File
  • The Policy Files
  • Running the SampleClient and SampleServer Programs

Before You Start: Recommended Reading

In this Java GSS-API tutorial, the first step is JAAS authentication. Previous tutorials demonstrated the use of JAAS for user authentication and authorization, and presented examples of policy files and of login configuration files (specifying the underlying authentication technology to be used) that JAAS requires. Applications in the JAAS introductory tutorials, JAAS Authentication and JAAS Authorization, made direct calls to JAAS methods. The Use of JAAS Login Utility tutorial showed the use of a utility program that frees the application from having to do this. The client and server applications in the current tutorial also use the same utility program, so we recommend you read the login utility tutorial first.

As with all tutorials in this series, the underlying technology used to support authentication and secure communication for the applications in this tutorial is Kerberos. See Kerberos Requirements.

Overview of the Client and Server Applications

The applications for this tutorial are named SampleClient and SampleServer.

Each is invoked by executing the Login utility supplied with this tutorial and passing it as arguments the name of the application (SampleClient or SampleServer), followed by the arguments needed by the application. The Login utility uses a JAAS LoginContext to authenticate the user using Kerberos. Finally, the Login utility invokes the main method of the application class, in our case either SampleClient or SampleServer, and passes the application its arguments.

Here is a summary of execution of the SampleClient and SampleServer applications:

  1. Run the SampleServer application by running the Login utility and passing it as arguments the name "SampleServer" followed by the arguments for the SampleServer program. The Login utility prompts you for the password for the principal that SampleServer should run as. (See Kerberos User and Service Principal Names.) After authentication is complete, SampleServer is run it:
    1. Reads its argument, the port number that it should listen on for client connections.
    2. Creates a ServerSocket for listening for client connections on that port.
    3. Listens for a connection.
  2. Run the SampleClient application (possibly on a different machine), by running the Login utility and passing it as arguments the name "SampleClient" followed by the arguments for the SampleClient program. The Login utility prompts you for your Kerberos name and password. After authentication is complete, SampleClient is run. It
    1. Reads its arguments: (1) The name of the Kerberos principal that represents SampleServer. (See Kerberos User and Service Principal Names.), (2) the name of the host (machine) on which SampleServer is running, and (3) the port number on which SampleServer listens for client connections.
    2. Attempts a socket connection with the SampleServer, using the host and port it was passed as arguments.
  3. The socket connection is accepted by SampleServer and both applications initialize a DataInputStream and a DataOutputStream from the socket input and output streams, to be used for future data exchanges.
  4. SampleClient and SampleServer each instantiate a GSSContext and establish a shared context that will enable subsequent secure data exchanges.
  5. SampleClient and SampleServer can now securely exchange messages.
  6. When SampleClient and SampleServer are done exchanging messages, they perform clean-up operations.
Note: Refer to "The SampleClient and SampleServer Code" section of the Use of Java GSS-API for Secure Message Exchanges Without JAAS Programming tutorial for a full discussion of the code used in this tutorial.

Kerberos User and Service Principal Names

Since the underlying authentication and secure communication technology used by this tutorial is Kerberos V5, we use Kerberos-style principal names wherever a user or service is called for.

For example, when you run SampleClient you are asked to provide your user name. Your Kerberos-style user name is simply the user name you were assigned for Kerberos authentication. It consists of a base user name (like "mjones") followed by an "@" and your realm (like "mjones@KRBNT-OPERATIONS.EXAMPLE.COM").

A server program like SampleServer is typically considered to offer a "service" and to be run on behalf of a particular "service principal." A service principal name for SampleServer is needed in several places:

  • When you run SampleServer you must log in as the appropriate service principal. The login configuration file for this tutorial actually specifies the service principal name (as an option to the Krb5LoginModule), so the JAAS authentication (done by the Login utility) just asks you to specify the password for that service principal. If you specify the correct password, the authentication is successful, a Subject is created containing a Principal with the service principal name, and that Subject is associated with a new access control context. The subsequently-executed code (the SampleServer code) is considered to be executed on behalf of the specified principal.
  • When you run SampleClient, one of the arguments is the service principal name. This is needed so SampleClient can initiate establishment of a security context with the appropriate service.
  • The client and server policy files each require a ServicePermission with name equal to the service principal name and action equal to "initiate" or "accept" (for initiating or accepting establishment of a security context).

Throughout this document, and in the accompanying login configuration file and policy files,

service_principal@your_realm
is used as a placeholder to be replaced by the actual name to be used in your environment. Any Kerberos principal can actually be used for the service principal name. So for the purposes of trying out this tutorial, you could use your user name as both the client user name and the service principal name.

In a production environment, system administrators typically like servers to be run as specific principals only and may assign a particular name to be used. Often the Kerberos-style service principal name assigned is of the form

service_name/machine_name@realm;

For example, an nfs service run on a machine named "raven" in the realm named "KRBNT-OPERATIONS.EXAMPLE.COM" could have the service principal name

nfs/raven@KRBNT-OPERATIONS.EXAMPLE.COM

Such multi-component names are not required, however. Single-component names, just like those of user principals, can be used. For example, an installation might use the same ftp service principal ftp@realm for all ftp servers in that realm, while another installation might have different ftp principals for different ftp servers, such as ftp/host1@realm and ftp/host2@realm on machines host1 and host2, respectively.

When the Realm is Required in Principal Names

If the realm of a user or service principal name is the default realm (see Kerberos Requirements), you can leave off the realm when you are logging into Kerberos (that is, when you are prompted for your username). Thus, for example, if your user name is "mjones@KRBNT-OPERATIONS.EXAMPLE.COM", and you run SampleClient, when it requests your user name you could just specify "mjones", leaving off the realm. The name is interpreted in the context of being a Kerberos principal name and the default realm is appended, as needed.

You can also leave off the realm if a principal name will be converted to a GSSName by a GSSManager createName method. For example, when you run SampleClient, one of the arguments is the server service principal name. You can specify the name without including the realm, because SampleClient passes the name to such a createName method, which appends the default realm as needed.

It is recommended that you always include realms when principal names are used in login configuration files and policy files, because the behavior of the parsers for such files may be implementation-dependent; they may or may not append the default realm before such names are utilized and subsequent actions may fail if there is no realm in the name.

The Login Configuration File

Whenever JAAS is used, a login configuration is required to specify the desired authentication technology. (See JAAS Login Configuration File for more information about what a login configuration file is.) Both SampleClient and SampleServer can use the same login configuration file, if that file contains two entries, one entry for the client side and one for the server side.

The csLogin.conf login configuration file used for this tutorial is the following:

SampleClient {
  com.sun.security.auth.module.Krb5LoginModule required;
};

SampleServer {
  com.sun.security.auth.module.Krb5LoginModule required storeKey=true
    principal="service_principal@your_realm";
};

Note that the name for each entry matches the respective class names for our two top-level applications, SampleClient and SampleServer. Recall that this is also the name that is passed to the Login utility that performs JAAS operations for the application. That utility expects the name of the entry to be looked up in your login configuration file to be the same as the name it is passed.

Both entries specify that Sun's Kerberos V5 LoginModule must be used to successfully authenticate the user. The Krb5LoginModule succeeds only if the attempt to log in to the Kerberos KDC as a specified entity is successful. In the case of SampleClient, the user will be prompted for their name and password. In the case of SampleServer, a name is already supplied in this login configuration file (the specified principal, as described below) and the user running SampleServer is just asked for the password for the entity specified by that name. They must specify the correct password in order for authentication to succeed.

The SampleServer entry storeKey=true indicates that a secret key should be calculated from the password provided during login and it should be stored in the private credentials of the Subject created as a result of login. This key is subsequently utilized during mutual authentication when establishing a security context between SampleClient and SampleServer.

The Krb5LoginModule has a principal option that can be used to specify that only the specified principal (entity/user) should be logged in for the given program. Here, the SampleClient entry does not specify a principal (although it could, if desired), so the user is prompted for a user name and password and anyone with a valid user name and password can run SampleClient. SampleServer, on the other hand, indicates a particular principal because system administrators usually like servers to be run as specific principals only. In this case, the user running SampleServer is prompted for that principal's password and must supply the correct one in order for authentication to succeed.

Note that you must replace "service_principal@your_realm" with the name of the service principal that represents SampleServer. (See Kerberos User and Service Principal Names.)

For information about all the possible options that can be passed to Krb5LoginModule, see the Krb5LoginModule documentation.

The Policy Files

The policy file used when running SampleClient is client.policy, and the policy file used when running SampleServer is server.policy. Their contents are described below.

The Client Policy File

Permissions Required by the Login utility Classes

A number of permissions are required by the classes in Login.java (Login and MyAction). As recommended in the previous tutorial on the use of Login, we create a Login.jar JAR file containing the Login.class and MyAction.class files and in the client.policy policy file we grant Login.jar AllPermission:

grant codebase "file:./Login.jar" {
   permission java.security.AllPermission;
};

Permissions Required by SampleClient

The SampleClient code does two types of operations for which permissions are required. It

  • opens a socket connection with the host machine running the SampleServer application.
  • initiates establishment of a security context with SampleServer.

The permission required to open a socket connection is

permission java.net.SocketPermission "*", "connect";

You may replace the "*" with the hostname or IP address of the machine that SampleServer will be running on.

The permission(s) required to initiate establishment of a security context will depend on the underlying mechanism. This tutorial uses Kerberos as the underlying mechanism, and for that two javax.security.auth.kerberos.ServicePermissions are required. A ServicePermission contains a service principal name and an action (or list of actions). To initiate establishment of a security context, you need two ServicePermissions with action "initiate", whose names specify:

  • the service principal name for the ticket granting service for your realm. Granting this permission essentially allows the use of Kerberos as a client.
  • the service principal name representing SampleServer. (See Kerberos User and Service Principal Names.) Granting this permission allows you to interact with the service, SampleServer, using Kerberos.

We want to grant the permissions to a specific authenticated user executing SampleClient, so we specify both the SampleClient code location (in SampleClient.jar) and a Principal designation indicating the user name and realm for the user (you, the person who will run SampleClient). (See How Do You Make Principal-Based Policy File Statements? in the second tutorial of this series for information on policy file grant statements that include Principal designations.)

Here is the basic form for the grant statement:

  grant CodeBase "file:./SampleClient.jar",
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "your_user_name@your_realm" {

    permission java.net.SocketPermission "*", "connect";

    permission javax.security.auth.kerberos.ServicePermission
        "krbtgt/your_realm@your_realm",
        "initiate";

    permission javax.security.auth.kerberos.ServicePermission
        "service_principal@your_realm",
        "initiate";
};

You must substitute your Kerberos user name (complete with "@" and realm) for "your_user_name@your_realm". For example, if your user name is "mjones" and your realm is "KRBNT-OPERATIONS.EXAMPLE.COM", you would use "mjones@KRBNT-OPERATIONS.EXAMPLE.COM" (complete with the quotes).

You must also substitute your realm in "krbtgt/your_realm@your_realm" and the service principal name for the service principal representing the server for "service_principal@your_realm". Suppose the former is "krbtgt/KRBNT-OPERATIONS.EXAMPLE.COM@KRBNT-OPERATIONS.EXAMPLE.COM" and the latter is "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM", and your user name is as specified in the previous paragraph. Then the grant statement would be

grant CodeBase "file:./SampleClient.jar",
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "mjones@KRBNT-OPERATIONS.EXAMPLE.COM" {

    permission java.net.SocketPermission "*", "connect";

    permission javax.security.auth.kerberos.ServicePermission
        "krbtgt/KRBNT-OPERATIONS.EXAMPLE.COM@KRBNT-OPERATIONS.EXAMPLE.COM",
        "initiate";

    permission javax.security.auth.kerberos.ServicePermission
        "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM",
        "initiate";
};

The Server Policy File

Permissions Required by the Login Utility Classes

The grant statement in the server policy file for the Login classes is exactly the same as the one in the client policy file, as described in Permissions Required by the Login Utility Classes:

grant codebase "file:./Login.jar" {
   permission java.security.AllPermission;
};

Permissions Required by SampleServer

The SampleServer code does two types of operations for which permissions are required. It

  • accepts socket connections.
  • accepts establishment of a security context, that is, it is the "acceptor" for security context establishment.

The permission required to accept socket connections is

permission java.net.SocketPermission "*", "accept";

You may replace the "*" with the hostname or IP address of the machine that SampleClient will be running on.

The permission required to accept establishment of a security context is

permission javax.security.auth.kerberos.ServicePermission
    "service_principal@your_realm",
    "accept";
where "service_principal@your_realm" is the Kerberos name of the service principal that represents SampleServer.

We want to grant the permissions to a specific authenticated user executing SampleServer (the service principal considered to represent SampleServer), so we specify both the SampleServer code location (in SampleServer.jar) and a Principal designation indicating the service principal. Suppose this name is "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM". Then the grant statement would be

  grant CodeBase "file:./SampleServer.jar"
    Principal javax.security.auth.kerberos.KerberosPrincipal
        "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM" {

    permission java.net.SocketPermission "*", "accept";

    permission javax.security.auth.kerberos.ServicePermission
        "sample/raven.example.com@KRBNT-OPERATIONS.EXAMPLE.COM", "accept";
};

Running the SampleClient and SampleServer Programs

To execute the SampleClient and SampleServer programs, do the following:

  • Prepare SampleServer for Execution
  • Prepare SampleClient for Execution
  • Execute SampleServer
  • Execute SampleClient

Prepare SampleServer for Execution

To prepare SampleServer for execution, do the following:

  1. Copy the following files into a directory accessible by the machine on which you will run SampleServer:
    • The Login.java source file.
    • The SampleServer.java source file.
    • The csLogin.conf login configuration file.
    • The server.policy policy file.
  2. Replace "service_principal@your_realm" in csLogin.conf with the name of the service principal representing SampleServer.
  3. In both places it appears, replace "service_principal@your_realm" in server.policy with the Kerberos name of the service principal that represents SampleServer. (The same name as that used in the login configuration file.)
  4. Compile Login.java and SampleServer.java:
    javac Login.java SampleServer.java

    Note that Login.java contains two classes and thus compiling Login.java creates Login.class and MyAction.class.

  5. Create a JAR file named Login.jar containing Login.class and MyAction.class:
    jar -cvf Login.jar Login.class MyAction.class
  6. Create a JAR file named SampleServer.jar containing SampleServer.class:
    jar -cvf SampleServer.jar SampleServer.class

Prepare SampleClient for Execution

To prepare SampleClient for execution, do the following:

  1. Copy the following files into a directory accessible by the machine on which you will run SampleClient:
    • The Login.java source file.
    • The SampleClient.java source file.
    • The csLogin.conf login configuration file.
    • The client.policy policy file.
  2. Replace parts of client.policy:
    • replace "your_user_name@your_realm" with your user name and realm.
    • replace your_realm in "krbtgt/your_realm@your_realm" with your realm.
    • replace "service_principal@your_realm" with the Kerberos name of the service principal that represents SampleServer.
  3. Compile Login.java and SampleClient.java:
    javac Login.java SampleClient.java
  4. Create a JAR file named Login.jar containing Login.class and MyAction.class:
    jar -cvf Login.jar Login.class MyAction.class
  5. Create a JAR file named SampleClient.jar containing SampleClient.class:
    jar -cvf SampleClient.jar SampleClient.class

Execute SampleServer

It is important to execute SampleServer before SampleClient because SampleClient will try to make a socket connection to SampleServer and that will fail if SampleServer is not yet running and accepting socket connections.

To execute SampleServer, be sure to run it on the machine it is expected to be run on. This machine name (host name) is specified as an argument to SampleClient. The service principal name appears in several places, including the login configuration file and the policy files.

Go to the directory in which you have prepared SampleServer for execution. Execute the Login class, specifying

  • by an appropriate -classpath clause that classes should be searched for in the Login.jar and SampleServer.jar JAR files,
  • by -Djava.security.manager that a security manager should be installed,
  • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified. For example, if your realm is "KRBNT-OPERATIONS.EXAMPLE.COM" you'd put -Djava.security.krb5.realm=KRBNT-OPERATIONS.EXAMPLE.COM.
  • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified. For example, if your KDC is "samplekdc.example.com" you'd put -Djava.security.krb5.kdc=samplekdc.example.com.
  • by -Djava.security.policy=server.policy that the policy file to be used is server.policy, and
  • by -Djava.security.auth.login.config=csLogin.conf that the login configuration file to be used is csLogin.conf.

You pass the name of your application (in this case, "SampleServer") as an argument to Login. You then add as arguments any arguments required by your application, which in the case of SampleServer is a single argument specifying the port number to be used for listening for client connections. Choose a high port number unlikely to be used for anything else. An example would be something like 4444.

Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems. The only difference is that on Microsoft Windows systems you use semicolons to separate classpath items, while you use colons for that purpose on Solaris, Linux, and Mac OS X systems.

Important: In these commands, you must replace <port_number> with an appropriate port number, <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

Here is the command for Microsoft Windows systems:

java -classpath Login.jar;SampleServer.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=server.policy
 -Djava.security.auth.login.config=csLogin.conf
 Login SampleServer <port_number>

Here is the command for Solaris, Linux, and Mac OS X systems:

java -classpath Login.jar:SampleServer.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=server.policy
 -Djava.security.auth.login.config=csLogin.conf
 Login SampleServer <port_number>

Type the full command on one line. Multiple lines are used here for legibility. If the command is too long for your system, you may need to place it in a .bat file (for Microsoft Windows) or a .sh file (for Solaris, Linux, and Mac OS X) and then run that file to execute the command.

You will be prompted for the Kerberos password for the service principal. The underlying Kerberos authentication mechanism specified in the login configuration file will log the service principal into Kerberos. Once authentication is successfully completed, the SampleServer code will be executed on behalf of the service principal. It will listen for socket connections on the specified port.

For login troubleshooting suggestions, see Troubleshooting.

Execute SampleClient

To execute SampleClient, go to the directory in which you have prepared SampleClient for execution. Then execute the Login class, specifying

  • by an appropriate -classpath clause that classes should be searched for in the Login.jar and SampleClient.jar JAR files,
  • by -Djava.security.manager that a security manager should be installed,
  • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified.
  • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified.
  • by -Djava.security.policy=client.policy that the policy file to be used is client.policy, and
  • by -Djava.security.auth.login.config=csLogin.conf that the login configuration file to be used is csLogin.conf.

Pass to Login the name of your application ("SampleClient") followed by the arguments required by SampleClient. The SampleClient arguments are (1) the Kerberos name of the service principal that represents SampleServer, (2) the name of the host (machine) on which SampleServer is running, and (3) the port number on which SampleServer is listening for client connections.

Below are the full commands to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems.

Important: In these commands, you must replace <service_principal>, <host>, <port_number>, <your_realm>, and <your_kdc> with appropriate values (and note that the port number must be the same as the port number passed as an argument to SampleServer). These values need not be placed in quotes.

Here is the command for Microsoft Windows systems:

java -classpath Login.jar;SampleClient.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=client.policy
 -Djava.security.auth.login.config=csLogin.conf
 Login SampleClient <service_principal> <host> <port_number>

Here is the command for Solaris, Linux, and Mac OS X systems:

java -classpath Login.jar:SampleClient.jar
 -Djava.security.manager
 -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djava.security.policy=client.policy
 -Djava.security.auth.login.config=csLogin.conf
 Login SampleClient <service_principal> <host> <port_number>

Type the full command on one line. Multiple lines are used here for legibility. As with the command for executing SampleServer, if the command is too long to type directly into your command window, place it in a .bat file (Microsoft Windows) or a .sh file (Solaris, Linux, and Mac OS X) and then execute that file.

When prompted, type your Kerberos user name and password. The underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. Once authentication is successfully completed, the SampleClient code will be executed on behalf of you. It will request a socket connection with SampleServer. Once SampleServer accepts the connection, SampleClient and SampleServer establish a shared context and then exchange messages as described in this tutorial.

For login troubleshooting suggestions, see Troubleshooting.

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Use of Java GSS-API for Secure Message Exchanges Without JAAS Programming

This tutorial presents two sample applications demonstrating the use of the Java GSS-API for secure exchanges of messages between communicating applications, in this case a client application and a server application.

Java GSS-API uses what is called a "security mechanism" to provide these services. The GSS-API implementation contains support for the Kerberos V5 mechanism in addition to any other vendor-specific choices. The Kerberos V5 mechanism is used for this tutorial.

In order to perform authentication between the client and server and to establish cryptographic keys for secure communication, a GSS-API mechanism needs access to certain credentials for the local entity on each side of the connection. In our case, the credential used on the client side consists of a Kerberos ticket, and on the server side, it consists of a long-term Kerberos secret key. Kerberos tickets can optionally include the host address and IPv4 and IPv6 host addresses are both supported. Java GSS-API requires that the mechanism obtain these credentials from the Subject associated with the thread's access control context.

To populate a Subject with such credentials, client and server applications typically will first perform JAAS authentication using a Kerberos module. The JAAS Authentication tutorial demonstrates how to do this. The JAAS Authorization tutorial then demonstrates how to associate the authenticated Subject with the thread's access control context. A utility has also been written as a convenience to automatically perform those operations on your behalf. The Use of JAAS Login Utility tutorial demonstrates how to use the Login utility.

For this tutorial, we will not have the client and server perform JAAS authentication, nor will we have them use the Login utility. Instead, we will rely on setting the system property javax.security.auth.useSubjectCredsOnly to false, which allows us to relax the restriction of requiring a GSS mechanism to obtain necessary credentials from an existing Subject, set up by JAAS. See The useSubjectCredsOnly System Property.

Note: This is a simplified introductory tutorial. For example, we do not include any policy files or run the sample code using a security manager. In real life, code using Java GSS-API should be run with a security manager, so that security-sensitive operations would not be allowed unless the required permissions were explicitly granted.

There is another tutorial, Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges, that is just like the tutorial you are reading except that it utilizes the Login utility, policy files, and a more complex login configuration file (A login configuration file, required whenever JAAS authentication is done, specifies the desired authentication module).

As with all tutorials in this series, the underlying technology used to support authentication and secure communication for the applications in this tutorial is Kerberos V5. See Kerberos Requirements.

  • Overview of the Client And Server Applications
  • The SampleClient and SampleServer Code
  • Kerberos User and Service Principal Names
  • The Login Configuration File
  • The useSubjectCredsOnly System Property
  • Running the SampleClient and SampleServer Programs

If you want to first see the tutorial code in action, you can skip directly to Running the SampleClient and SampleServer Programs and then go back to the other sections to learn more.

Overview of the Client And Server Applications

The applications for this tutorial are named SampleClient and SampleServer.

Here is a summary of execution of the SampleClient and SampleServer applications:

  1. Run the SampleServer application. SampleServer
    1. Reads its argument, the port number that it should listen on for client connections.
    2. Creates a ServerSocket for listening for client connections on that port.
    3. Listens for a connection.
  2. Run the SampleClient application (possibly on a different machine). SampleClient
    1. Reads its arguments: (1) The name of the Kerberos principal that represents SampleServer. (See Kerberos User and Service Principal Names.), (2) the name of the host (machine) on which SampleServer is running, and (3) the port number on which SampleServer listens for client connections.
    2. Attempts a socket connection with the SampleServer, using the host and port it was passed as arguments.
  3. The socket connection is accepted by SampleServer and both applications initialize a DataInputStream and a DataOutputStream from the socket input and output streams, to be used for future data exchanges.
  4. SampleClient and SampleServer each instantiate a GSSContext and follow a protocol for establishing a shared context that will enable subsequent secure data exchanges.
  5. SampleClient and SampleServer can now securely exchange messages.
  6. When SampleClient and SampleServer are done exchanging messages, they perform clean-up operations.

The actual code and further details are presented in the following sections.

The SampleClient and SampleServer Code

The entire code for both the SampleClient and SampleServer programs resides in their main methods and can be broken down into the following subparts:

  1. Obtain the Command-Line Arguments
  2. Establish a Socket Connection for Transfers Between SampleClient and SampleServer
  3. Establish a Security Context
  4. Securely Exchange Messages
  5. Clean Up

Note: The Java GSS-API classes utilized by these programs (GSSManager, GSSContext, GSSName, GSSCredential, MessageProp, and Oid) are found in the org.ietf.jgss package.

Obtaining the Command-Line Arguments

The first thing both our client and server main methods do is read the command-line arguments.

Arguments Read By SampleClient

SampleClient expects three arguments:

  1. A service principal name -- The name of the Kerberos principal that represents SampleServer. (See Kerberos User and Service Principal Names.)
  2. A host name -- The machine on which SampleServer is running.
  3. A port number -- The port number of the port on which SampleServer listens for connections.

Here is the code for reading the command-line arguments:

if (args.length < 3) {
    System.out.println("Usage: java <options> Login SampleClient "
       + " <servicePrincipal> <hostName> <port>");
    System.exit(-1);
}

String server = args[0];
String hostName = args[1];
int port = Integer.parseInt(args[2]);

Argument Read By SampleServer

SampleServer expects just one argument:

  • A local port number -- The port number used by SampleServer for listening for connections with clients. This number should be the same as the port number specified when running the SampleClient program.

Here is the code for reading the command-line argument:

if (args.length != 1) {
    System.out.println(
        "Usage: java <options> Login SampleServer <localPort>");
    System.exit(-1);
}

int localPort = Integer.parseInt(args[0]);

Establishing a Socket Connection for Message Exchanges

Java GSS-API provides methods for creating and interpreting tokens (opaque byte data). The tokens contain messages to be securely exchanged between two peers, but the method of actual token transfer is up to the peers. For our SampleClient and SampleServer applications, we establish a socket connection between the client and server and exchange data using the socket input and output streams.

SampleClient Code For Socket Connection

SampleClient was passed as arguments the name of the host machine SampleServer is running on, as well as the port number on which SampleServer will be listening for connections, so SampleClient has all it needs to establish a socket connection with SampleServer. It uses the following code to set up the connection and initialize a DataInputStream and a DataOutputStream for future data exchanges:

Socket socket = new Socket(hostName, port);

DataInputStream inStream =
  new DataInputStream(socket.getInputStream());
DataOutputStream outStream =
  new DataOutputStream(socket.getOutputStream());

System.out.println("Connected to server "
   + socket.getInetAddress());

SampleServer Code For Socket Connection

The SampleServer application was passed as an argument the port number to be used for listening for connections from clients. It creates a ServerSocket for listening on that port:

ServerSocket ss = new ServerSocket(localPort);

The ServerSocket can then wait for and accept a connection from a client, and then initialize a DataInputStream and a DataOutputStream for future data exchanges with the client :

Socket socket = ss.accept();

DataInputStream inStream =
    new DataInputStream(socket.getInputStream());
DataOutputStream outStream =
    new DataOutputStream(socket.getOutputStream());

System.out.println("Got connection from client "
    + socket.getInetAddress());

The accept method waits until a client (in our case, SampleClient) requests a connection on the host and port of the SampleServer, which SampleClient does via

Socket socket = new Socket(hostName, port);

When the connection is requested and established, the accept method returns a new Socket object bound to a new port. The server can communicate with the client over this new socket and continue to listen for other client connection requests on the ServerSocket bound to the original port. Thus, a server program typically has a loop which can handle multiple connection requests.

The basic loop structure for our SampleServer is the following:

while (true) {

    Socket socket = ss.accept();

    <Establish input and output streams for the connection>;
    <Establish a context with the client>;
    <Exchange messages with the client>;
    <Clean up>;
}

Client connections are queued at the original port, so with this program structure used by SampleServer, the interaction with the first client making a connection has to complete before the next connection can be accepted. The server could actually service multiple clients simultaneously through the use of threads - one thread per client connection, as in

while (true) {
    <accept a connection>;
    <create a thread to handle the client>;
}

Establishing a Security Context

Before two applications can use Java GSS-API to securely exchange messages between them, they must establish a joint security context using their credentials. (Note: In the case of SampleClient, the credentials were established when the Login utility authenticated the user on whose behalf the SampleClient was run, and similarly for SampleServer.) The security context encapsulates shared state information that might include, for example, cryptographic keys. One use of such keys might be to encrypt messages to be exchanged, if encryption is requested.

As part of the security context establishment, the context initiator (in our case, SampleClient) is authenticated to the acceptor (SampleServer), and may require that the acceptor also be authenticated back to the initiator, in which case we say that "mutual authentication" took place.

Both applications create and use a GSSContext object to establish and maintain the shared information that makes up the security context.

The instantiation of the context object is done differently by the context initiator and the context acceptor. After the initiator instantiates a GSSContext, it may choose to set various context options that will determine the characteristics of the desired security context, for example, specifying whether or not mutual authentication should take place. After all the desired characteristics have been set, the initiator calls the initSecContext method, which produces a token required by the acceptor's acceptSecContext method.

While Java GSS-API methods exist for preparing tokens to be exchanged between applications, it is the responsibility of the applications to actually transfer the tokens between them. So after the initiator has received a token from its call to initSecContext, it sends that token to the acceptor. The acceptor calls acceptSecContext, passing it the token. The acceptSecContext method may in turn return a token. If it does, the acceptor should send that token to the initiator, which should then call initSecContext again and pass it this token. Each time initSecContext or acceptSecContext returns a token, the application that called the method should send the token to its peer and that peer should pass the token to its appropriate method (acceptSecContext or initSecContext). This continues until the context is fully established (which is the case when the context's isEstablished method returns true).

The context establishment code for our sample applications is described in the following:

  • Context Establishment by SampleClient
  • Context Establishment by SampleServer

Context Establishment by SampleClient

In our client/server scenario, SampleClient is the context initiator. Here are the basic steps it takes to establish a security context. It

  1. Instantiates a GSSContext.
  2. Sets the desired optional features on the context.
  3. Loops while the context is not yet established, each time calling initSecContext, sending any returned token to SampleServer, and receiving a token (if any) from SampleServer.

SampleClient GSSContext Instantiation

A GSSContext is created by instantiating a GSSManager and then calling one of its createContext methods. The GSSManager class serves as a factory for other important GSS API classes. It can create instances of classes implementing the GSSContext, GSSCredential, and GSSName interfaces.

SampleClient obtains an instance of the default GSSManager subclass by calling the GSSManager static method getInstance:

GSSManager manager = GSSManager.getInstance();

The default GSSManager subclass is one whose create* methods (createContext, etc.) return classes whose implementations support Kerberos as the underlying technology.

The GSSManager factory method for creating a context on the initiator's side has the following signature:

GSSContext createContext(GSSName peer, Oid mech,
            GSSCredential myCred, int lifetime);

The arguments are described below, followed by the complete call to createContext.

The GSSName peer Argument

The peer in our client/server paradigm is the server. For the peer argument, we need a GSSName for the service principal representing the server. (See Kerberos User and Service Principal Names.) A String for the service principal name is passed as the first argument to SampleClient, which places the argument into its local String variable named server. The GSSManager manager is used to instantiate a GSSName by calling one of its createName methods. SampleClient calls the createName method with the following signature:

GSSName createName(String nameStr, Oid nameType);

SampleClient passes the server String for the nameStr argument.

The second argument is an Oid. An Oid represents a Universal Object Identifier. Oids are hierarchically globally-interpretable identifiers used within the GSS-API framework to identify mechanisms and name types. The structure and encoding of Oids is defined in the ISOIEC-8824 and ISOIEC-8825 standards. The Oid passed to the createName method is specifically a name type Oid (not a mechanism Oid).

In GSS-API, string names are often mapped from a mechanism-independent format into a mechanism-specific format. Usually, an Oid specifies what name format the string is in so that the mechanism knows how to do this mapping. Passing in a null Oid indicates that the name is already in a native format that the mechanism uses. This is the case for the server String; it is in the appropriate format for a Kerberos Version 5 name. Thus, SampleClient passes a null for the Oid. Here is the call:

GSSName serverName = manager.createName(server, null);

The Oid mech Argument

The second argument to the GSSManager createContext method is an Oid representing the mechanism to be used for the authentication between the client and the server during context establishment and for subsequent secure communication between them.

Our tutorial will use Kerberos V5 as the security mechanism. The Oid for the Kerberos V5 mechanism is defined in RFC 1964 as "1.2.840.113554.1.2.2" so we create such an Oid:

Oid krb5Oid = new Oid("1.2.840.113554.1.2.2");

SampleClient passes krb5Oid as the second argument to createContext.

The GSSCredential myCred Argument

The third argument to the GSSManager createContext method is a GSSCredential representing the caller's credentials. If you pass null for this argument, as SampleClient does, the default credentials are used.

The int lifetime Argument

The final argument to the GSSManager createContext method is an int specifying the desired lifetime, in seconds, for the context that is created. SampleClient passes GSSContext.DEFAULT_LIFETIME to request a default lifetime.

The Complete createContext Call

Now that we have all the required arguments, here is the call SampleClient makes to create a GSSContext:

GSSContext context =
    manager.createContext(serverName,
                          krb5Oid,
                          null,
                          GSSContext.DEFAULT_LIFETIME);

SampleClient Setting of Desired Options

After instantiating a context, and prior to actually establishing the context with the context acceptor, the context initiator may choose to set various options that determine the desired security context characteristics. Each such option is set by calling a request method on the instantiated context. Most request methods take a boolean argument for indicating whether or not the feature is requested. It is not always possible for a request to be satisfied, so whether or not it was can be determined after context establishment by calling one of the get methods.

SampleClient requests the following:

  1. Mutual authentication. The context initiator is always authenticated to the acceptor. If the initiator requests mutual authentication, then the acceptor is also authenticated to the initiator.
  2. Confidentiality. Requesting confidentiality means that you request the enabling of encryption for the context method named wrap. Encryption is actually used only if the MessageProp object passed to the wrap method requests privacy.
  3. Integrity. This requests integrity for the wrap and getMIC methods. When integrity is requested, a cryptographic tag known as a Message Integrity Code (MIC) will be generated when calling those methods. When getMIC is called, the generated MIC appears in the returned token. When wrap is called, the MIC is packaged together with the message (the original message or the result of encrypting the message, depending on whether confidentiality was applied) all as part of one token. You can subsequently verify the MIC against the message to ensure that the message has not been modified in transit.

The SampleClient code for making these requests on the GSSException context is the following:

context.requestMutualAuth(true);  // Mutual authentication
context.requestConf(true);  // Will use encryption later
context.requestInteg(true); // Will use integrity later

Note: When using the default GSSManager implementation and the Kerberos mechanism, these requests will always be granted.

SampleClient Context Establishment Loop

After SampleClient has instantiated a GSSContext and specified the desired context options, it can actually establish the security context with SampleServer. To do so, SampleClient has a loop. Each loop iteration

  1. Calls the context's initSecContext method. If this is the first call, the method is passed a null token. Otherwise, it is passed the token most recently sent to SampleClient by SampleServer (a token generated by a SampleServer call to acceptSecContext).
  2. Sends the token returned by initSecContext (if any) to SampleServer. The first call to initSecContext always produces a token. The last call might not return a token.
  3. Checks to see if the context is established. If not, SampleClient receives another token from SampleServer and then starts the next loop iteration.

The tokens returned by initSecContext or received from SampleServer are placed in a byte array. Tokens should be treated by SampleClient and SampleServer as opaque data to be passed between them and interpreted by Java GSS-API methods.

The initSecContext arguments are a byte array containing a token, the starting offset into that array of where the token begins, and the token length. For the first call, SampleClient passes a null token, since no token has yet been received from SampleServer.

To exchange tokens with SampleServer, SampleClient uses the DataInputStream inStream and DataOutputStream outStream it previously set up using the input and output streams for the socket connection made with SampleServer. Note that whenever a token is written, the number of bytes in the token is written first, followed by the token itself. The reasons are discussed in the introduction to the The SampleClient and SampleServer Message Exchanges section.

Here is the SampleClient context establishment loop, followed by code displaying information about who the client and server are and whether or not mutual authentication actually took place:

byte[] token = new byte[0];

while (!context.isEstablished()) {

    // token is ignored on the first call
    token = context.initSecContext(token, 0, token.length);

    // Send a token to the server if one was generated by
    // initSecContext
    if (token != null) {
        System.out.println("Will send token of size "
                   + token.length + " from initSecContext.");
        outStream.writeInt(token.length);
        outStream.write(token);
        outStream.flush();
    }

    // If the client is done with context establishment
    // then there will be no more tokens to read in this loop
    if (!context.isEstablished()) {
        token = new byte[inStream.readInt()];
        System.out.println("Will read input token of size "
                   + token.length
                   + " for processing by initSecContext");
        inStream.readFully(token);
    }
}

System.out.println("Context Established! ");
System.out.println("Client is " + context.getSrcName());
System.out.println("Server is " + context.getTargName());
if (context.getMutualAuthState())
    System.out.println("Mutual authentication took place!");

Context Establishment by SampleServer

In our client/server scenario, SampleServer is the context acceptor. Here are the basic steps it takes to establish a security context. It

  1. Instantiates a GSSContext.
  2. Loops while the context is not yet established, each time receiving a token from SampleClient, calling acceptSecContext and passing it the token, and sending any returned token to SampleClient.

SampleServer GSSContext Instantiation

As described in SampleClient GSSContext Instantiation, a GSSContext is created by instantiating a GSSManager and then calling one of its createContext methods.

Like SampleClient, SampleServer obtains an instance of the default GSSManager subclass by calling the GSSManager static method getInstance:

GSSManager manager = GSSManager.getInstance();

The GSSManager factory method for creating a context on the acceptor's side has the following signature:

GSSContext createContext(GSSCredential myCred);

If you pass null for the GSSCredential argument, as SampleServer does, the default credentials are used. The context is instantiated via the following:

GSSContext context = manager.createContext((GSSCredential)null);

SampleServer Context Establishment Loop

After SampleServer has instantiated a GSSContext, it can establish the security context with SampleClient. To do so, SampleServer has a loop that continues until the context is established. Each loop iteration does the following:

  1. Receives a token from SampleClient. This token is the result of a SampleClient initSecContext call.
  2. Calls the context's acceptSecContext method, passing it the token just received.
  3. If acceptSecContext returns a token, then SampleServer sends this token to SampleClient and then starts the next loop iteration if the context is not yet established.

The tokens returned by acceptSecContext or received from SampleClient are placed in a byte array.

The acceptSecContext arguments are a byte array containing a token, the starting offset into that array of where the token begins, and the token length.

To exchange tokens with SampleClient, SampleServer uses the DataInputStream inStream and DataOutputStream outStream it previously set up using the input and output streams for the socket connection made with SampleClient.

Here is the SampleServer context establishment loop:

byte[] token = null;

while (!context.isEstablished()) {

    token = new byte[inStream.readInt()];
    System.out.println("Will read input token of size "
       + token.length
       + " for processing by acceptSecContext");
    inStream.readFully(token);

    token = context.acceptSecContext(token, 0, token.length);

    // Send a token to the peer if one was generated by
    // acceptSecContext
    if (token != null) {
        System.out.println("Will send token of size "
           + token.length
           + " from acceptSecContext.");
        outStream.writeInt(token.length);
        outStream.write(token);
        outStream.flush();
    }
}

System.out.print("Context Established! ");
System.out.println("Client is " + context.getSrcName());
System.out.println("Server is " + context.getTargName());
if (context.getMutualAuthState())
    System.out.println("Mutual authentication took place!");

Exchanging Messages Securely

Once a security context has been established between SampleClient and SampleServer, they can use the context to securely exchange messages.

  • GSSContext Methods for Message Exchange
  • The SampleClient and SampleServer Message Exchanges

GSSContext Methods for Message Exchange

Two types of methods exist for preparing messages for secure exchange: wrap and getMIC. There are actually two wrap methods (and two getMIC methods), where the differences between the two are the indication of where the input message is (a byte array or an input stream) and where the output should go (to a byte array return value or to an output stream).

These methods for preparing messages for exchange, and the corresponding methods for interpretation by the peer of the resulting tokens, are described below.

wrap

The wrap method is the primary method for message exchanges.

The signature for the wrap method called by SampleClient is the following:

byte[] wrap (byte[] inBuf, int offset, interface len,
                MessageProp msgProp)

You pass wrap a message (in inBuf), the offset into inBuf where the message begins (offset), and the length of the message (len). You also pass a MessageProp, which is used to indicate the desired QOP (Quality-of-Protection) and to specify whether or not privacy (encryption) is desired. A QOP value selects the cryptographic integrity and encryption (if requested) algorithm(s) to be used. The algorithms corresponding to various QOP values are specified by the provider of the underlying mechanism. For example, the values for Kerberos V5 are defined in RFC 1964 in section 4.2. It is common to specify 0 as the QOP value to request the default QOP.

The wrap method returns a token containing the message and a cryptographic Message Integrity Code (MIC) over it. The message placed in the token will be encrypted if the MessageProp indicates privacy is desired. You do not need to know the format of the returned token; it should be treated as opaque data. You send the returned token to your peer application, which calls the unwrap method to "unwrap" the token to get the original message and to verify its integrity.

getMIC

If you simply want to get a token containing a cryptographic Message Integrity Code (MIC) for a supplied message, you call getMIC. A sample reason you might want to do this is to confirm with your peer that you both have the same data, by just transporting a MIC for that data without incurring the cost of transporting the data itself to each other.

The signature for the getMIC method called by SampleServer is the following:

byte[] getMIC (byte[] inMsg, int offset, int len,
            MessageProp msgProp)

You pass getMIC a message (in inMsg), the offset into inMsg where the message begins (offset), and the length of the message (len). You also pass a MessageProp, which is used to indicate the desired QOP (Quality-of-Protection). It is common to specify 0 as the QOP value to request the default QOP.

If you have a token created by getMIC and the message used to calculate the MIC (or a message purported to be the message on which the MIC was calculated), you can call the verifyMIC method to verify the MIC for the message. If the verification is successful (that is, if a GSSException is not thrown), it proves that the message is exactly the same as it was when the MIC was calculated. A peer receiving a message from an application typically expects a MIC as well, so that they can verify the MIC and be assured the message has not been modified or corrupted in transit. Note: If you know ahead of time that you will want the MIC as well as the message then it is more convenient to use the wrap and unwrap methods. But there could be situations where the message and the MIC are received separately.

The signature for the verifyMIC corresponding to the getMIC shown above is

void verifyMIC (byte[] inToken, int tokOffset, int tokLen,
        byte[] inMsg, int msgOffset, int msgLen,
        MessageProp msgProp);

This verifies the MIC contained in the inToken (of length tokLen, starting at offset tokOffset) over the message contained in inMsg (of length msgLen, starting at offset msgOffset). The MessageProp is used by the underlying mechanism to return information to the caller, such as the QOP indicating the strength of protection that was applied to the message.

The SampleClient and SampleServer Message Exchanges

The message exchanges between SampleClient and SampleServer are summarized below, followed by the coding details.

These steps are the "standard" steps used for verifying a GSS-API client and server. A group at MIT has written a GSS-API client and a GSS-API server that have become fairly popular test programs for checking interoperability between different implementations of the GSS-API library. (These GSS-API sample applications can be downloaded as a part of the Kerberos distribution available from MIT at http://web.mit.edu/kerberos.) This client and server from MIT follow the protocol that once the context is established, the client sends a message across and it expects back the MIC on that message. If you implement a GSS-API library, it is common practice to test it by running either the client or server using your library implementation against a corresponding peer server or client that uses another GSS-API library implementation. If both library implementations conform to the standards, then the two peers will be able to communicate successfully.

One implication of testing your client or server against ones written in C (like the MIT ones) is the way tokens must be exchanged. C implementations of GSS-API do not include stream-based methods. In the absence of stream-based methods on your peer, when you write a token you must first write the number of bytes and then write the token. Similarly, when you are reading a token, you first read the number of bytes and then read the token. This is what SampleClient and SampleServer do.

Here is the summary of the SampleClient and SampleServer message exchanges:

  1. SampleClient calls wrap to encrypt and calculate a MIC for a message.
  2. SampleClient sends the token returned from wrap to SampleServer.
  3. SampleServer calls unwrap to obtain the original message and verify its integrity.
  4. SampleServer calls getMIC to calculate a MIC on the decrypted message.
  5. SampleServer sends the token returned by getMIC (which contains the MIC) to SampleClient.
  6. SampleClient calls verifyMIC to verify that the MIC sent by SampleServer is a valid MIC for the original message.

SampleClient Code to Encrypt the Message and Send It

The SampleClient code for encrypting a message, calculating a MIC for it, and sending the result to SampleServer is the following:

byte[] messageBytes = "Hello There!\0".getBytes();

/*
 * The first MessageProp argument is 0 to request
 * the default Quality-of-Protection.
 * The second argument is true to request
 * privacy (encryption of the message).
 */
MessageProp prop =  new MessageProp(0, true);

/*
 * Encrypt the data and send it across. Integrity protection
 * is always applied, irrespective of encryption.
 */
token = context.wrap(messageBytes, 0, messageBytes.length,
    prop);
System.out.println("Will send wrap token of size "
    + token.length);
outStream.writeInt(token.length);
outStream.write(token);
outStream.flush();

SampleServer Code to Unwrap Token, Calculate MIC, and Send It

The following SampleServer code reads the wrapped token sent by SampleClient and "unwraps" it to obtain the original message and have its integrity verified. The unwrapping in this case includes decryption since the message was encrypted.

Note: Here the integrity check is expected to succeed. But note that in general if an integrity check fails it signifies that the message was changed in transit. If the unwrap method encounters an integrity check failure, it throws a GSSException with major error code GSSException.BAD_MIC.

/*
 * Create a MessageProp which unwrap will use to return
 * information such as the Quality-of-Protection that was
 * applied to the wrapped token, whether or not it was
 * encrypted, etc. Since the initial MessageProp values
 * are ignored, it doesn't matter what they are set to.
 */
MessageProp prop = new MessageProp(0, false);

/*
 * Read the token. This uses the same token byte array
 * as that used during context establishment.
 */
token = new byte[inStream.readInt()];
System.out.println("Will read token of size "
    + token.length);
inStream.readFully(token);

byte[] bytes = context.unwrap(token, 0, token.length, prop);
String str = new String(bytes);
System.out.println("Received data \""
    + str + "\" of length " + str.length());
System.out.println("Encryption applied: "
    + prop.getPrivacy());

Next, SampleServer generates a MIC for the decrypted message and sends it to SampleClient. This is not really necessary but simply illustrates generating a MIC on the decrypted message, which should be exactly the same as the original message SampleClient wrapped and sent to SampleServer. When SampleServer generates this and sends it to SampleClient, and SampleClient verifies it, this proves to SampleClient that the decrypted message SampleServer has is in fact exactly the same as the original message from SampleClient.

/*
 * First reset the QOP of the MessageProp to 0
 * to ensure the default Quality-of-Protection
 * is applied.
 */
prop.setQOP(0);

token = context.getMIC(bytes, 0, bytes.length, prop);

System.out.println("Will send MIC token of size "
                   + token.length);
outStream.writeInt(token.length);
outStream.write(token);
outStream.flush();

SampleClient Code to Verify the MIC

The following SampleClient code reads the MIC calculated by SampleServer on the decrypted message and then verifies that the MIC is a MIC for the original message, proving that the decrypted message SampleServer has is the same as the original message:

token = new byte[inStream.readInt()];
System.out.println("Will read token of size " + token.length);
inStream.readFully(token);

/*
 * Recall messageBytes is the byte array containing
 * the original message and prop is the MessageProp
 * already instantiated by SampleClient.
 */
context.verifyMIC(token, 0, token.length,
          messageBytes, 0, messageBytes.length,
          prop);

System.out.println("Verified received MIC for message.");

Clean Up

When SampleClient and SampleServer have finished exchanging messages, they need to perform cleanup operations. Both contain the following code to
  • close the socket connection and
  • release system resources and cryptographic information stored in the context object and then invalidate the context.
socket.close();
context.dispose();

Kerberos User and Service Principal Names

Since the underlying authentication and secure communication technology used by this tutorial is Kerberos V5, we use Kerberos-style principal names wherever a user or service is called for.

For example, when you run SampleClient you are asked to provide your user name. Your Kerberos-style user name is simply the user name you were assigned for Kerberos authentication. It consists of a base user name (like "mjones") followed by an "@" and your realm (like "mjones@KRBNT-OPERATIONS.EXAMPLE.COM").

A server program like SampleServer is typically considered to offer a "service" and to be run on behalf of a particular "service principal." A service principal name for SampleServer is needed in several places:

  • When you run SampleServer, and SampleClient attempts a connection to it, the underlying Kerberos mechanism will attempt to authenticate to the Kerberos KDC. It prompts you to log in. You should log in as the appropriate service principal.
  • When you run SampleClient, one of the arguments is the service principal name. This is needed so SampleClient can initiate establishment of a security context with the appropriate service.
  • If the SampleClient and SampleServer programs were run with a security manager (they're not for this tutorial), the client and server policy files would each require a ServicePermission with name equal to the service principal name and action equal to "initiate" or "accept" (for initiating or accepting establishment of a security context).

Throughout this document, and in the accompanying login configuration file,

service_principal@your_realm
is used as a placeholder to be replaced by the actual name to be used in your environment. Any Kerberos principal can actually be used for the service principal name. So for the purposes of trying out this tutorial, you could use your user name as both the client user name and the service principal name.

In a production environment, system administrators typically like servers to be run as specific principals only and may assign a particular name to be used. Often the Kerberos-style service principal name assigned is of the form

service_name/machine_name@realm;

For example, an nfs service run on a machine named "raven" in the realm named "KRBNT-OPERATIONS.EXAMPLE.COM" could have the service principal name

nfs/raven@KRBNT-OPERATIONS.EXAMPLE.COM

Such multi-component names are not required, however. Single-component names, just like those of user principals, can be used. For example, an installation might use the same ftp service principal ftp@realm for all ftp servers in that realm, while another installation might have different ftp principals for different ftp servers, such as ftp/host1@realm and ftp/host2@realm on machines host1 and host2, respectively.

When the Realm is Required in Principal Names

If the realm of a user or service principal name is the default realm (see Kerberos Requirements), you can leave off the realm when you are logging into Kerberos (that is, when you are prompted for your username). Thus, for example, if your user name is "mjones@KRBNT-OPERATIONS.EXAMPLE.COM", and you run SampleClient, when it requests your user name you could just specify "mjones", leaving off the realm. The name is interpreted in the context of being a Kerberos principal name and the default realm is appended, as needed.

You can also leave off the realm if a principal name will be converted to a GSSName by a GSSManager createName method. For example, when you run SampleClient, one of the arguments is the server service principal name. You can specify the name without including the realm, because SampleClient passes the name to such a createName method, which appends the default realm as needed.

It is recommended that you always include realms when principal names are used in login configuration files and policy files, because the behavior of the parsers for such files may be implementation-dependent; they may or may not append the default realm before such names are utilized and subsequent actions may fail if there is no realm in the name.

The Login Configuration File

For this tutorial, we are letting the underlying Kerberos mechanism obtain credentials of the users running SampleClient and SampleServer, rather than invoking JAAS methods directly (as in the JAAS Authentication and JAAS Authorization tutorials) or indirectly (for example, via the Login utility described in the Use of JAAS Login Utility tutorial and in the Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges tutorial).

The default Kerberos mechanism implementation supplied by Sun Microsystems actually prompts for a Kerberos name and password and authenticates the specified user (or service) to the Kerberos KDC. The mechanism relies on JAAS to perform this authentication.

JAAS supports a pluggable authentication framework, meaning that any type of authentication module can be plugged under a calling application. A login configuration specifies the login module to be used for a particular application. The default JAAS implementation from Sun Microsystems requires that the login configuration information be specified in a file. (Note: Some other vendors might not have file-based implementations.) See JAAS Login Configuration File for information as to what a login configuration file is, what it contains, and how to specify which login configuration file should be used.

For this tutorial, the Kerberos login module com.sun.security.auth.module.Krb5LoginModule is specified in the configuration file. This login module prompts for a Kerberos name and password and attempts to authenticate to the Kerberos KDC.

Both SampleClient and SampleServer can use the same login configuration file, if that file contains two entries, one entry for the client side and one for the server side.

The bcsLogin.conf login configuration file used for this tutorial is the following:

com.sun.security.jgss.initiate  {
  com.sun.security.auth.module.Krb5LoginModule required;
};

com.sun.security.jgss.accept  {
  com.sun.security.auth.module.Krb5LoginModule required storeKey=true
};

Entries with these two names (com.sun.security.jgss.initiate and com.sun.security.jgss.accept) are used by Sun implementations of GSS-API mechanisms when they need new credentials. Since the mechanism used in this tutorial is the Kerberos V5 mechanism, a Kerberos login module will need to be invoked in order to obtain these credentials. Thus we list Krb5LoginModule as a required module in these entries. The com.sun.security.jgss.initiate entry specifies the configuration for the client side and the com.sun.security.jgss.accept entry for the server side.

The Krb5LoginModule succeeds only if the attempt to log in to the Kerberos KDC as a specified entity is successful. When running SampleClient or SampleServer, the user will be prompted for a name and password.

The SampleServer entry storeKey=true indicates that a secret key should be calculated from the password provided during login and it should be stored in the private credentials of the Subject created as a result of login. This key is subsequently utilized during mutual authentication when establishing a security context between SampleClient and SampleServer.

For information about all the possible options that can be passed to Krb5LoginModule, see the Krb5LoginModule documentation.

The useSubjectCredsOnly System Property

For this tutorial, we set the system property javax.security.auth.useSubjectCredsOnly to false, which allows us to relax the usual restriction of requiring a GSS mechanism to obtain necessary credentials from an existing Subject, set up by JAAS. When this restriction is relaxed, it allows the mechanism to obtain credentials from some vendor-specific location. For example, some vendors might choose to use the operating system's cache if one exists, while others might choose to read from a protected file on disk.

When this restriction is relaxed, Sun Microsystem's Kerberos mechanism still looks for the credentials in the Subject associated with the thread's access control context, but if it doesn't find any there, it performs JAAS authentication using a Kerberos module to obtain new ones. The Kerberos module prompts you for a Kerberos principal name and password. Note that Kerberos mechanism implementations from other vendors may behave differently when this property is set to false. Consult their documentation to determine their implementation's behavior.

Running the SampleClient and SampleServer Programs

To execute the SampleClient and SampleServer programs, do the following:

  • Prepare SampleServer for Execution
  • Prepare SampleClient for Execution
  • Execute SampleServer
  • Execute SampleClient

Prepare SampleServer for Execution

To prepare SampleServer for execution, do the following:

  1. Copy the following files into a directory accessible by the machine on which you will run SampleServer:
    • The SampleServer.java source file.
    • The bcsLogin.conf login configuration file.
  2. Compile SampleServer.java:
    javac SampleServer.java

Prepare SampleClient for Execution

To prepare SampleClient for execution, do the following:

  1. Copy the following files into a directory accessible by the machine on which you will run SampleClient:
    • The SampleClient.java source file.
    • The bcsLogin.conf login configuration file.
  2. Compile SampleClient.java:
    javac SampleClient.java

Execute SampleServer

It is important to execute SampleServer before SampleClient because SampleClient will try to make a socket connection to SampleServer and that will fail if SampleServer is not yet running and accepting socket connections.

To execute SampleServer, be sure to run it on the machine it is expected to be run on. This machine name (host name) is specified as an argument to SampleClient. The service principal name appears in several places, including the login configuration file and the policy files.

Go to the directory in which you have prepared SampleServer for execution. Execute SampleServer, specifying

  • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified. For example, if your realm is "KRBNT-OPERATIONS.EXAMPLE.COM" you'd put -Djava.security.krb5.realm=KRBNT-OPERATIONS.EXAMPLE.COM.
  • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified. For example, if your KDC is "samplekdc.example.com" you'd put -Djava.security.krb5.kdc=samplekdc.example.com.
  • by -Djavax.security.auth.useSubjectCredsOnly=false that the underlying mechanism can decide how to get credentials. See The useSubjectCredsOnly System Property.
  • by -Djava.security.auth.login.config=bcsLogin.conf that the login configuration file to be used is bcsLogin.conf.

The only argument required by SampleServer is one specifying the port number to be used for listening for client connections. Choose a high port number unlikely to be used for anything else. An example would be something like 4444.

Below is the full command to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems.

Important: In this command, you must replace <port_number> with an appropriate port number, <your_realm> with your Kerberos realm, and <your_kdc> with your Kerberos KDC.

Here is the command:

java -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djavax.security.auth.useSubjectCredsOnly=false
 -Djava.security.auth.login.config=bcsLogin.conf
 SampleServer <port_number>

The full command should appear on one line (or, on Solaris, Linux, or Mac OS X systems, on multiple lines where each line but the last is terminated with " \" indicating that there is more to come). Multiple lines are used here just for legibility. Since this command is very long, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, or Mac OS X) and then run that file to execute the command.

The SampleServer code will listen for socket connections on the specified port. When prompted, type the Kerberos name and password for the service principal. The underlying Kerberos authentication mechanism specified in the login configuration file will log the service principal into Kerberos.

For login troubleshooting suggestions, see Troubleshooting.

Execute SampleClient

To execute SampleClient, first go to the directory in which you have prepared SampleClient for execution. Execute SampleClient, specifying

  • by -Djava.security.krb5.realm=<your_realm> that your Kerberos realm is the one specified.
  • by -Djava.security.krb5.kdc=<your_kdc> that your Kerberos KDC is the one specified.
  • by -Djavax.security.auth.useSubjectCredsOnly=false that the underlying mechanism can decide how to get credentials.
  • by -Djava.security.auth.login.config=bcsLogin.conf that the login configuration file to be used is bcsLogin.conf.

The SampleClient arguments are (1) the Kerberos name of the service principal that represents SampleServer, (2) the name of the host (machine) on which SampleServer is running, and (3) the port number on which SampleServer is listening for client connections.

Below is the full command to use for both Windows and Solaris, Linux, and Mac OS X systems.

Important: In this command, you must replace <service_principal>, <host>, <port_number>, <your_realm>, and <your_kdc> with appropriate values (and note that the port number must be the same as the port number passed as an argument to SampleServer). These values need not be placed in quotes.

Here is the command:

java -Djava.security.krb5.realm=<your_realm>
 -Djava.security.krb5.kdc=<your_kdc>
 -Djavax.security.auth.useSubjectCredsOnly=false
 -Djava.security.auth.login.config=bcsLogin.conf
 SampleClient <service_principal> <host> <port_number>

Type the full command on one line. Multiple lines are used here for legibility. As with the command for executing SampleServer, if the command is too long to type directly into your command window, place it in a .bat file (Windows) or a .sh file (Solaris, Linux, and Mac OS X) and then execute that file.

When prompted, type your Kerberos user name and password. The underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. The SampleClient code requests a socket connection with SampleServer. Once SampleServer accepts the connection, SampleClient and SampleServer establish a shared context and then exchange messages as described in this tutorial.

For login troubleshooting suggestions, see Troubleshooting.

Tutorials Introduction and TOC
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


When to use Java GSS-API vs. JSSE

Java GSS-API and JSSE provide you with the same basic set of security features:

  1. Client-server authentication
  2. Encryption and integrity protection of transmitted data

However, there are some key difference between the two. This document lists some of them to help you decide which might be more appropriate in your environment:

  1. Kerberos Single Sign-On Support

    In the Java 2 Standard Edition, GSS-API contains support for Kerberos as a mandatory security mechanism. This means that if your desktop has Kerberos support, you can write Java GSS-API based applications that never prompt the user for a password.

    At present JSSE does not support cipher suites to use Kerberos-based authentication. Support for such a cipher suite is dependent on its standarization in the TLS protocol at the Internet Engineering Task Force (IETF).

  2. Communications API

    JSSE supports a socket-based API. JSSE sockets extend the socket classes found in java.net and JSSE socket factories extend the socket factories found in javax.net. Thus, if your application is written such that its security needs to be configured via a socket factory, then JSSE might be more appropriate for you. JSSE sockets need to use some reliable transport. Typically, implementations use TCP.

    Java GSS-API, on the other hand, is a token-based API that relies on the application to do the communication. This means that the application can use TCP sockets, UDP datagrams, or any other channel that will allow it to transport Java GSS-API generated tokens. If your application has varying communication protocol needs, then Java GSS-API might be more appropriate for you. Java GSS-API can read and write its tokens using input and output streams. However, you will need to set up the streams yourself.

  3. Credential Delegation

    Java GSS-API allows the client to delegate its credentials to the server when using Kerberos. If your application will be deployed in a multi-tier environment where intermediaries need to impersonate clients when talking to backend layers, Java GSS-API might be more appropriate for you.

  4. Selective Encryption

    Because Java GSS-API is token-based, you can choose to selectively encrypt certain messages but not all. If your application needs to intersperse plaintext and ciphertext messages, Java GSS-API might be more appropriate for you.

  5. Protocol Requirements

    JSSE provides an implementation of the TLS protocol defined in RFC 2246. Java GSS-API provides an implementation of the GSS-API framework defined in RFC 2853, as well as an implementation of the Kerberos Version 5 mechanism defined in RFC 1964. (On Microsoft Windows platforms, this may be known as SSPI with Kerberos.) Some servers such as HTTPS servers will require you to use TLS, in which case JSSE will be appropriate for you. Other servers such as LDAP servers using SASL might need GSS-API with Kerberos, in which case Java GSS-API will be appropriate for you.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Debugging SSL/TLS Connections

Understanding SSL/TLS connection problems can sometimes be difficult, especially when it is not clear what messages are actually being sent and received. The SunJSSE has a built-in debug facility and is activated by the System property javax.net.debug.

What follows is a brief example how to read the debug output. Please be aware that the output is non-standard, and may change from release to release. We are using the default SunJSSE X509KeyManager and X509TrustManager which prints debug information.

This example assumes a basic understanding of the SSL/TLS protocol. Please see the The SSL Protocol Overview section of the JSSE Reference Guide for more information on the protocols (handshake messages, etc.).

In this example, we connect using the SSLSocketClientWithClientAuth sample application to a simple HTTPS server that requires client authentication, then send a HTTPS request and receive the reply.

    java  -Djavax.net.debug=all  \
        -Djavax.net.ssl.trustStore=trustStore
        SSLSocketClientWithClientAuth bongos 2001 /index.html
First, the X509KeyManager is initialized and discovers there is one keyEntry in the supplied KeyStore for a subject called "duke". If a server requests a client to authenticate itself, the X509KeyManager will search its list of keyEntries for an appropriate credential.
***
found key for : duke
chain [0] = [
[
  Version: V1
  Subject: CN=Duke, OU=Java Software, O="Sun Microsystems, Inc.",
  L=Cupertino, ST=CA, C=US
  Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

  Key:  Sun RSA public key, 1024 bits
  modulus: 134968166047563266914058280571444028986498087544923991226919517
  667593269213420979048109900052353578998293280426361122296881234393722020
  704208851688212064483570055963805034839797994154526862998272017486468599
  962268346037652120279791547218281230795146025359480589335682217749874703
  510467348902637769973696151441
  public exponent: 65537
  Validity: [From: Tue May 22 16:46:46 PDT 2001,
               To: Sun May 22 16:46:46 PDT 2011]
  Issuer: CN=Duke, OU=Java Software, O="Sun Microsystems, Inc.",
  L=Cupertino, ST=CA, C=US
  SerialNumber: [    3b0afa66]

]
  Algorithm: [MD5withRSA]
  Signature:
0000: 5F B5 62 E9 A0 26 1D 8E   A2 7E 7C 02 08 36 3A 3E  _.b..&.......6:>
0010: C9 C2 45 03 DD F9 BC 06   FC 25 CF 30 92 91 B1 4E  ..E......%.0...N
0020: 62 17 08 48 14 68 80 CF   DD 89 11 EA 92 7F CE DD  b..H.h..........
0030: B4 FD 12 A8 71 C7 9E D7   C3 D0 E3 BD BB DE 20 92  ....q......... .
0040: C2 3B C8 DE CB 25 23 C0   8B B6 92 B9 0B 64 80 63  .;...%#......d.c
0050: D9 09 25 2D 7A CF 0A 31   B6 E9 CA C1 37 93 BC 0D  ..%-z..1....7...
0060: 4E 74 95 4F 58 31 DA AC   DF D8 BD 89 BD AF EC C8  Nt.OX1..........
0070: 2D 18 A2 BC B2 15 4F B7   28 6F D3 00 E1 72 9B 6C  -.....O.(o...r.l

]
***
The X509TrustManager is next initialized, and finds a certificate for a Certificate Authority (CA) named "JSSE Test CA". Any server presenting valid credentials signed by this CA will be trusted.
trustStore is: trustkeys
trustStore type is : jks
trustStore provider is :
init truststore
adding as trusted cert:
  Subject: CN=JSSE Test CA, OU=JWS, O=Sun,
      L=Santa Clara, ST=CA, C=US
  Issuer:  CN=JSSE Test CA, OU=JWS, O=Sun,
      L=Santa Clara, ST=CA, C=US
  Algorithm: RSA; Serial number: 0x0
  Valid from Mon Jul 19 13:30:15 PDT 2004 until Fri Dec 05 12:30:15 PST 2031
We finish some additional initialization code, and after this, we are now finally ready to make the connection to the server.
trigger seeding of SecureRandom
done seeding SecureRandom
export control - checking the cipher suites
export control - no cached value available...
export control - storing legal entry into cache...
%% No cached client session
The connection to the server is made, and we see the initial ClientHello message, which contains:
  • random information to initialize the cryptographic routines,
  • the SessionID, which if non-null, would be used in reestablishing a previous session,
  • the list of ciphersuites that the client requests,
  • and no compression algorithms.
This is followed by the output of various filters, such as encapsulating the TLSv1 header into the SSLv2Hello header format (See setEnabledProtocols()).
*** ClientHello, TLSv1
RandomCookie:  GMT: 1073239164 bytes = { 10, 80, 71, 86, 124, 135, 104,
151, 72, 153, 70, 28, 97, 232, 160, 217, 146, 178, 87, 255, 122, 147, 83,
197, 60, 187, 227, 76 }
Session ID:  {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA,
SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5,
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods:  { 0 }
***
[write] MD5 and SHA1 hashes:  len = 73
0000: 01 00 00 45 03 01 40 F8   54 7C 0A 50 47 56 7C 87  ...E..@.T..PGV..
0010: 68 97 48 99 46 1C 61 E8   A0 D9 92 B2 57 FF 7A 93  h.H.F.a.....W.z.
0020: 53 C5 3C BB E3 4C 00 00   1E 00 04 00 05 00 2F 00  S.<..L......../.
0030: 33 00 32 00 0A 00 16 00   13 00 09 00 15 00 12 00  3.2.............
0040: 03 00 08 00 14 00 11 01   00                       .........
main, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes:  len = 98
0000: 01 03 01 00 39 00 00 00   20 00 00 04 01 00 80 00  ....9... .......
0010: 00 05 00 00 2F 00 00 33   00 00 32 00 00 0A 07 00  ..../..3..2.....
0020: C0 00 00 16 00 00 13 00   00 09 06 00 40 00 00 15  ............@...
0030: 00 00 12 00 00 03 02 00   80 00 00 08 00 00 14 00  ................
0040: 00 11 40 F8 54 7C 0A 50   47 56 7C 87 68 97 48 99  ..@.T..PGV..h.H.
0050: 46 1C 61 E8 A0 D9 92 B2   57 FF 7A 93 53 C5 3C BB  F.a.....W.z.S.<.
0060: E3 4C                                              .L
main, WRITE: SSLv2 client hello message, length = 98
Section labeled "[Raw write]" represent the actual data sent to the raw output object (in this case, an OutputStream).
[Raw write]: length = 100
0000: 80 62 01 03 01 00 39 00   00 00 20 00 00 04 01 00  .b....9... .....
0010: 80 00 00 05 00 00 2F 00   00 33 00 00 32 00 00 0A  ....../..3..2...
0020: 07 00 C0 00 00 16 00 00   13 00 00 09 06 00 40 00  ..............@.
0030: 00 15 00 00 12 00 00 03   02 00 80 00 00 08 00 00  ................
0040: 14 00 00 11 40 F8 54 7C   0A 50 47 56 7C 87 68 97  ....@.T..PGV..h.
0050: 48 99 46 1C 61 E8 A0 D9   92 B2 57 FF 7A 93 53 C5  H.F.a.....W.z.S.
0060: 3C BB E3 4C                                        <..L
After sending the initial ClientHello, we wait for the server's response, a ServerHello. "[Raw read]" displays the raw data read from the input device (InputStream), before any processing has been performed.
[Raw read]: length = 5
0000: 16 03 01 06 F0                                     .....
[Raw read]: length = 1776
0000: 02 00 00 46 03 01 40 FC   31 10 79 AB 17 66 FA 8B  ...F..@.1.y..f..
0010: 3F AA FD 5E 48 23 FA 90   31 D8 3C B9 A3 2C 8C F5  ?..^H#..1.<..,..
0020: E9 81 9B A2 63 6C 20 40   FC 31 10 BD 8D A5 91 06  ....cl @.1......
0030: 8B E1 E6 80 C6 5A 5C D9   8D 0A AE CA 58 4A BA 36  .....Z\.....XJ.6
0040: B1 3D 04 8D 82 21 B4 00   04 00 0B 00 06 1B 00 06  .=...!..........
0050: 18 00 03 11 30 82 03 0D   30 82 02 76 A0 03 02 01  ....0...0..v....
0060: 02 02 01 01 30 0D 06 09   2A 86 48 86 F7 0D 01 01  ....0...*.H.....
0070: 04 05 00 30 63 31 0B 30   09 06 03 55 04 06 13 02  ...0c1.0...U....
0080: 55 53 31 0B 30 09 06 03   55 04 08 13 02 43 41 31  US1.0...U....CA1
0090: 14 30 12 06 03 55 04 07   13 0B 53 61 6E 74 61 20  .0...U....Santa
00A0: 43 6C 61 72 61 31 0C 30   0A 06 03 55 04 0A 13 03  Clara1.0...U....
00B0: 53 75 6E 31 0C 30 0A 06   03 55 04 0B 13 03 4A 57  Sun1.0...U....JW
00C0: 53 31 15 30 13 06 03 55   04 03 13 0C 4A 53 53 45  S1.0...U....JSSE
00D0: 20 54 65 73 74 20 43 41   30 1E 17 0D 30 34 30 37   Test CA0...0407
00E0: 31 39 32 30 33 30 35 31   5A 17 0D 33 31 31 32 30  19203051Z..31120
00F0: 35 32 30 33 30 35 31 5A   30 48 31 0B 30 09 06 03  5203051Z0H1.0...
0100: 55 04 06 13 02 55 53 31   0B 30 09 06 03 55 04 08  U....US1.0...U..
0110: 13 02 43 41 31 0C 30 0A   06 03 55 04 0A 13 03 53  ..CA1.0...U....S
0120: 75 6E 31 0D 30 0B 06 03   55 04 0B 13 04 4A 61 76  un1.0...U....Jav
0130: 61 31 0F 30 0D 06 03 55   04 03 13 06 62 6F 6E 67  a1.0...U....bong
0140: 6F 73 30 81 9F 30 0D 06   09 2A 86 48 86 F7 0D 01  os0..0...*.H....
0150: 01 01 05 00 03 81 8D 00   30 81 89 02 81 81 00 CC  ........0.......
0160: 09 74 CB 43 AB 6D ED F6   35 AA 0E 49 29 D9 E0 F0  .t.C.m..5..I)...
0170: A1 D5 E2 3E 8F 5E C5 CE   F4 DE C1 A4 F3 CB 8C 45  ...>.^.........E
0180: 0B 0F 6E 21 E1 00 65 CB   3C D1 5C EF 6A FB 5D 96  ..n!..e.<.\.j.].
0190: 93 F4 71 41 41 45 FF 37   86 4C AB F9 EA 9A 3F A5  ..qAAE.7.L....?.
01A0: 82 60 BF 0A 81 84 C9 3E   AC 0F 3D 20 3D AC A0 69  .`.....>..= =..i
01B0: EF CA 4A A7 94 AD C8 A5   CE 37 66 52 D1 25 43 CB  ..J......7fR.%C.
01C0: 10 44 07 1E 93 74 D9 68   01 D7 06 48 C9 0D 52 2D  .D...t.h...H..R-
01D0: D5 6A 2E A6 48 4C 59 E2   5C C6 C1 5C C8 4C 1B 02  .j..HLY.\..\.L..
01E0: 03 01 00 01 A3 81 EB 30   81 E8 30 09 06 03 55 1D  .......0..0...U.
01F0: 13 04 02 30 00 30 2C 06   09 60 86 48 01 86 F8 42  ...0.0,..`.H...B
0200: 01 0D 04 1F 16 1D 4F 70   65 6E 53 53 4C 20 47 65  ......OpenSSL Ge
0210: 6E 65 72 61 74 65 64 20   43 65 72 74 69 66 69 63  nerated Certific
0220: 61 74 65 30 1D 06 03 55   1D 0E 04 16 04 14 58 D7  ate0...U......X.
0230: 3A A9 37 AA 3E 14 27 FC   EC CC 45 08 04 8E 2A 8B  :.7.>.'...E...*.
0240: 77 28 30 81 8D 06 03 55   1D 23 04 81 85 30 81 82  w(0....U.#...0..
0250: 80 14 08 A3 7E 35 96 15   FA B0 F5 1B 5F CD 4F 54  .....5......_.OT
0260: EF 31 33 70 E4 A7 A1 67   A4 65 30 63 31 0B 30 09  .13p...g.e0c1.0.
0270: 06 03 55 04 06 13 02 55   53 31 0B 30 09 06 03 55  ..U....US1.0...U
0280: 04 08 13 02 43 41 31 14   30 12 06 03 55 04 07 13  ....CA1.0...U...
0290: 0B 53 61 6E 74 61 20 43   6C 61 72 61 31 0C 30 0A  .Santa Clara1.0.
02A0: 06 03 55 04 0A 13 03 53   75 6E 31 0C 30 0A 06 03  ..U....Sun1.0...
02B0: 55 04 0B 13 03 4A 57 53   31 15 30 13 06 03 55 04  U....JWS1.0...U.
02C0: 03 13 0C 4A 53 53 45 20   54 65 73 74 20 43 41 82  ...JSSE Test CA.
02D0: 01 00 30 0D 06 09 2A 86   48 86 F7 0D 01 01 04 05  ..0...*.H.......
02E0: 00 03 81 81 00 05 3E 17   DA F2 05 CB 4E 9E BF 12  ......>.....N...
02F0: CE 13 76 FF B2 FB 7F 9C   3D 45 28 43 6C 98 28 E3  ..v.....=E(Cl.(.
0300: 92 17 C2 C6 F1 62 CA 60   C2 B0 EC E6 7E 4C 2F C2  .....b.`.....L/.
0310: 40 FE 06 CB 34 60 B1 F4   26 1C E8 46 39 24 E1 8A  @...4`..&..F9$..
0320: 71 F2 13 90 A4 0A 7B 0B   13 AB 51 68 53 D9 7A 31  q.........QhS.z1
0330: 5A C1 7E 3C 44 2C 49 70   57 25 F9 18 FE 5D A5 42  Z..<D,IpW%...].B
0340: 7F 3E 61 1F 29 A3 31 46   02 C6 D2 8C 27 79 40 76  .>a.).1F....'y@v
0350: 97 B6 25 19 BE 6C 6A 92   DC EF 11 BE E7 4A FF 2A  ..%..lj......J.*
0360: E6 D6 AC 39 31 00 03 01   30 82 02 FD 30 82 02 66  ...91...0...0..f
0370: A0 03 02 01 02 02 01 00   30 0D 06 09 2A 86 48 86  ........0...*.H.
0380: F7 0D 01 01 04 05 00 30   63 31 0B 30 09 06 03 55  .......0c1.0...U
0390: 04 06 13 02 55 53 31 0B   30 09 06 03 55 04 08 13  ....US1.0...U...
03A0: 02 43 41 31 14 30 12 06   03 55 04 07 13 0B 53 61  .CA1.0...U....Sa
03B0: 6E 74 61 20 43 6C 61 72   61 31 0C 30 0A 06 03 55  nta Clara1.0...U
03C0: 04 0A 13 03 53 75 6E 31   0C 30 0A 06 03 55 04 0B  ....Sun1.0...U..
03D0: 13 03 4A 57 53 31 15 30   13 06 03 55 04 03 13 0C  ..JWS1.0...U....
03E0: 4A 53 53 45 20 54 65 73   74 20 43 41 30 1E 17 0D  JSSE Test CA0...
03F0: 30 34 30 37 31 39 32 30   33 30 31 35 5A 17 0D 33  040719203015Z..3
0400: 31 31 32 30 35 32 30 33   30 31 35 5A 30 63 31 0B  11205203015Z0c1.
0410: 30 09 06 03 55 04 06 13   02 55 53 31 0B 30 09 06  0...U....US1.0..
0420: 03 55 04 08 13 02 43 41   31 14 30 12 06 03 55 04  .U....CA1.0...U.
0430: 07 13 0B 53 61 6E 74 61   20 43 6C 61 72 61 31 0C  ...Santa Clara1.
0440: 30 0A 06 03 55 04 0A 13   03 53 75 6E 31 0C 30 0A  0...U....Sun1.0.
0450: 06 03 55 04 0B 13 03 4A   57 53 31 15 30 13 06 03  ..U....JWS1.0...
0460: 55 04 03 13 0C 4A 53 53   45 20 54 65 73 74 20 43  U....JSSE Test C
0470: 41 30 81 9F 30 0D 06 09   2A 86 48 86 F7 0D 01 01  A0..0...*.H.....
0480: 01 05 00 03 81 8D 00 30   81 89 02 81 81 00 9A 0A  .......0........
0490: B6 45 66 D5 DE 4A D9 3C   8C AC A6 B5 A5 88 B4 CF  .Ef..J.<........
04A0: 14 E1 A6 1B 25 25 4F 44   C9 1F 22 38 32 29 CF A1  ....%%OD.."82)..
04B0: 7C 18 30 93 DC 2B EC 2B   67 EE 2E 08 66 2D 0F 47  ..0..+.+g...f-.G
04C0: E0 12 3A DC E0 03 E9 65   16 F6 18 C6 16 14 56 24  ..:....e......V$
04D0: 55 7D 32 3E F9 66 A2 DD   55 EB 4D 0A 67 C7 5D 21  U.2>.f..U.M.g.]!
04E0: 9B 29 EA 2E 51 C5 83 A3   55 FF 35 CA A6 99 8F 46  .)..Q...U.5....F
04F0: F8 8E 56 BB A2 B1 39 83   D8 61 42 79 E0 95 78 FA  ..V...9..aBy..x.
0500: C6 E3 65 B0 FD 74 2D 64   51 71 04 F2 A1 91 02 03  ..e..t-dQq......
0510: 01 00 01 A3 81 C0 30 81   BD 30 1D 06 03 55 1D 0E  ......0..0...U..
0520: 04 16 04 14 08 A3 7E 35   96 15 FA B0 F5 1B 5F CD  .......5......_.
0530: 4F 54 EF 31 33 70 E4 A7   30 81 8D 06 03 55 1D 23  OT.13p..0....U.#
0540: 04 81 85 30 81 82 80 14   08 A3 7E 35 96 15 FA B0  ...0.......5....
0550: F5 1B 5F CD 4F 54 EF 31   33 70 E4 A7 A1 67 A4 65  .._.OT.13p...g.e
0560: 30 63 31 0B 30 09 06 03   55 04 06 13 02 55 53 31  0c1.0...U....US1
0570: 0B 30 09 06 03 55 04 08   13 02 43 41 31 14 30 12  .0...U....CA1.0.
0580: 06 03 55 04 07 13 0B 53   61 6E 74 61 20 43 6C 61  ..U....Santa Cla
0590: 72 61 31 0C 30 0A 06 03   55 04 0A 13 03 53 75 6E  ra1.0...U....Sun
05A0: 31 0C 30 0A 06 03 55 04   0B 13 03 4A 57 53 31 15  1.0...U....JWS1.
05B0: 30 13 06 03 55 04 03 13   0C 4A 53 53 45 20 54 65  0...U....JSSE Te
05C0: 73 74 20 43 41 82 01 00   30 0C 06 03 55 1D 13 04  st CA...0...U...
05D0: 05 30 03 01 01 FF 30 0D   06 09 2A 86 48 86 F7 0D  .0....0...*.H...
05E0: 01 01 04 05 00 03 81 81   00 73 6A 46 A2 05 E3 D8  .........sjF....
05F0: 6E 5C F4 18 A2 74 BC CF   EB 0C 5B FF 81 1C 28 85  n\...t....[...(.
0600: C7 FA E4 ED 5C 4F 71 22   FB 26 E3 01 3D 0C 10 AA  ....\Oq".&..=...
0610: BB 3E 90 ED 0E 1F 0C 9B   B1 8C 49 6A 51 E4 C3 52  .>........IjQ..R
0620: D6 FB 42 6C B4 A9 A9 57   A5 84 00 42 6D 37 37 6D  ..Bl...W...Bm77m
0630: C7 6C 23 BC DC 60 D1 9D   6F B3 75 47 3A 15 33 1A  .l#..`..o.uG:.3.
0640: EC 90 09 9D F9 EB BD 88   96 E7 1D 41 BC 01 8D CA  ...........A....
0650: 88 D9 5B 04 09 8F 3E EA   C8 15 A0 AA 4E 85 95 AE  ..[...>.....N...
0660: 2F 0E 31 92 AC 3C FB 2F   C4 0D 00 00 7F 02 01 02  /.1..<./........
0670: 00 7A 00 78 30 76 31 0B   30 09 06 03 55 04 06 13  .z.x0v1.0...U...
0680: 02 55 53 31 0B 30 09 06   03 55 04 08 13 02 43 41  .US1.0...U....CA
0690: 31 12 30 10 06 03 55 04   07 13 09 43 75 70 65 72  1.0...U....Cuper
06A0: 74 69 6E 6F 31 1F 30 1D   06 03 55 04 0A 13 16 53  tino1.0...U....S
06B0: 75 6E 20 4D 69 63 72 6F   73 79 73 74 65 6D 73 2C  un Microsystems,
06C0: 20 49 6E 63 2E 31 16 30   14 06 03 55 04 0B 13 0D   Inc.1.0...U....
06D0: 4A 61 76 61 20 53 6F 66   74 77 61 72 65 31 0D 30  Java Software1.0
06E0: 0B 06 03 55 04 03 13 04   44 75 6B 65 0E 00 00 00  ...U....Duke....
main, READ: TLSv1 Handshake, length = 1776
The data is unpackaged, and if the message is in the SSL/TLS format, it is parsed into a ServerHello. If you connected to a non-SSL/TLS socket (plaintext?), the received data will not be in SSL/TLS format, and you'll have problems connecting.

The ServerHello specifies several things:

  • The server's random data, also used to initialize the cryptographic algorithms,
  • the identifier of this session (if the client wants to try to rejoin this session using a different connection, it can send this ID in its ClientHello. If the client session ID equals the server session ID, an abbreviated handshake takes place, and the previously established parameters are used),
  • the selected cipher suite,
  • and the compression method (none in this case).
Lastly note that the ServerHello has specified that the connection should use "TLSv1", rather than "SSLv3."

*** ServerHello, TLSv1
RandomCookie:  GMT: 1073492240 bytes = { 121, 171, 23, 102, 250, 139, 63,
170, 253, 94, 72, 35, 250, 144, 49, 216, 60, 185, 163, 44, 140, 245, 233,
129, 155, 162, 99, 108 }
Session ID:  {64, 252, 49, 16, 189, 141, 165, 145, 6, 139, 225, 230, 128,
198, 90, 92, 217, 141, 10, 174, 202, 88, 74, 186, 54, 177, 61, 4, 141, 130,
33, 180}
Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
Compression Method: 0
***
%% Created:  [Session-1, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
[read] MD5 and SHA1 hashes:  len = 74
0000: 02 00 00 46 03 01 40 FC   31 10 79 AB 17 66 FA 8B  ...F..@.1.y..f..
0010: 3F AA FD 5E 48 23 FA 90   31 D8 3C B9 A3 2C 8C F5  ?..^H#..1.<..,..
0020: E9 81 9B A2 63 6C 20 40   FC 31 10 BD 8D A5 91 06  ....cl @.1......
0030: 8B E1 E6 80 C6 5A 5C D9   8D 0A AE CA 58 4A BA 36  .....Z\.....XJ.6
0040: B1 3D 04 8D 82 21 B4 00   04 00                    .=...!....
The server next identifies itself to the client by passing a Certificate chain. In this example, we have a certificate for the subject "bongos", signed by the issuer "JSSE Test CA". We know that "JSSE Test CA" is a trusted CA, so if the certificate chain verifies correctly by our X509TrustManager, we can accept this connection.

There are many different ways of establishing trust, so if the default X509TrustManager is not doing the types of trust management you need, you can supply your own X509TrustManager to the SSLContext.

*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject:
  CN=bongos, OU=Java, O=Sun, ST=CA, C=US
  Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

  Key:  Sun RSA public key, 1024 bits
  modulus: 143279610700427050704216702734995283650706638118826657356308087
  682552751165540126665070195006746918193702313900836063802045448392771274
  463088345157808670190122017153821642985630288017629294930800445939721128
  735250668515619736933648548512047941708018130926985936894512063397816602
  623867976474763783110866258971
  public exponent: 65537
  Validity: [From: Mon Jul 19 13:30:51 PDT 2004,
               To: Fri Dec 05 12:30:51 PST 2031]
  Issuer: CN=JSSE Test CA, OU=JWS, O=Sun,
      L=Santa Clara, ST=CA, C=US
  SerialNumber: [    01]

Certificate Extensions: 3

[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 58 D7 3A A9 37 AA 3E 14   27 FC EC CC 45 08 04 8E  X.:.7.>.'...E...
0010: 2A 8B 77 28                                        *.w(
]
]

[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 08 A3 7E 35 96 15 FA B0   F5 1B 5F CD 4F 54 EF 31  ...5......_.OT.1
0010: 33 70 E4 A7                                        3p..
]

[CN=JSSE Test CA, OU=JWS, O=Sun, L=Santa Clara, ST=CA, C=US]
SerialNumber: [    00]
]

[3]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:false
PathLen: undefined
]

]
  Algorithm: [MD5withRSA]
  Signature:
0000: 05 3E 17 DA F2 05 CB 4E   9E BF 12 CE 13 76 FF B2  .>.....N.....v..
0010: FB 7F 9C 3D 45 28 43 6C   98 28 E3 92 17 C2 C6 F1  ...=E(Cl.(......
0020: 62 CA 60 C2 B0 EC E6 7E   4C 2F C2 40 FE 06 CB 34  b.`.....L/.@...4
0030: 60 B1 F4 26 1C E8 46 39   24 E1 8A 71 F2 13 90 A4  `..&..F9$..q....
0040: 0A 7B 0B 13 AB 51 68 53   D9 7A 31 5A C1 7E 3C 44  .....QhS.z1Z..<D
0050: 2C 49 70 57 25 F9 18 FE   5D A5 42 7F 3E 61 1F 29  ,IpW%...].B.>a.)
0060: A3 31 46 02 C6 D2 8C 27   79 40 76 97 B6 25 19 BE  .1F....'y@v..%..
0070: 6C 6A 92 DC EF 11 BE E7   4A FF 2A E6 D6 AC 39 31  lj......J.*...91

]
chain [1] = [
[
  Version: V3
  Subject: CN=JSSE Test CA, OU=JWS, O=Sun,
      L=Santa Clara, ST=CA, C=US
  Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

  Key:  Sun RSA public key, 1024 bits
  modulus: 108171861314934294923646852258201093253619460299818135230481040
  615923025149195168140458238629251726950220398889722590740552079782864577
  976838691751841449679901644183317203824143803940037883199193775839934767
  304560313841716869284745769157293013188246601563271959824290073095150730
  505329011956986145636520993169
  public exponent: 65537
  Validity: [From: Mon Jul 19 13:30:15 PDT 2004,
               To: Fri Dec 05 12:30:15 PST 2031]
  Issuer: CN=JSSE Test CA, OU=JWS, O=Sun,
      L=Santa Clara, ST=CA, C=US
  SerialNumber: [    00]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 08 A3 7E 35 96 15 FA B0   F5 1B 5F CD 4F 54 EF 31  ...5......_.OT.1
0010: 33 70 E4 A7                                        3p..
]
]

[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 08 A3 7E 35 96 15 FA B0   F5 1B 5F CD 4F 54 EF 31  ...5......_.OT.1
0010: 33 70 E4 A7                                        3p..
]

[CN=JSSE Test CA, OU=JWS, O=Sun, L=Santa Clara, ST=CA, C=US]
SerialNumber: [    00]
]

[3]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
]

]
  Algorithm: [MD5withRSA]
  Signature:
0000: 73 6A 46 A2 05 E3 D8 6E   5C F4 18 A2 74 BC CF EB  sjF....n\...t...
0010: 0C 5B FF 81 1C 28 85 C7   FA E4 ED 5C 4F 71 22 FB  .[...(.....\Oq".
0020: 26 E3 01 3D 0C 10 AA BB   3E 90 ED 0E 1F 0C 9B B1  &..=....>.......
0030: 8C 49 6A 51 E4 C3 52 D6   FB 42 6C B4 A9 A9 57 A5  .IjQ..R..Bl...W.
0040: 84 00 42 6D 37 37 6D C7   6C 23 BC DC 60 D1 9D 6F  ..Bm77m.l#..`..o
0050: B3 75 47 3A 15 33 1A EC   90 09 9D F9 EB BD 88 96  .uG:.3..........
0060: E7 1D 41 BC 01 8D CA 88   D9 5B 04 09 8F 3E EA C8  ..A......[...>..
0070: 15 A0 AA 4E 85 95 AE 2F   0E 31 92 AC 3C FB 2F C4  ...N.../.1..<./.

]
We recoginise this cert! We can trust it, and continue on with the handshake.
***
Found trusted certificate:
[
[
  Version: V3
  Subject: CN=JSSE Test CA, OU=JWS, O=Sun, L=Santa Clara, ST=CA, C=US
  Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

  Key:  Sun RSA public key, 1024 bits
  modulus: 108171861314934294923646852258201093253619460299818135230481040
  615923025149195168140458238629251726950220398889722590740552079782864577
  976838691751841449679901644183317203824143803940037883199193775839934767
  304560313841716869284745769157293013188246601563271959824290073095150730
  505329011956986145636520993169
  public exponent: 65537
  Validity: [From: Mon Jul 19 13:30:15 PDT 2004,
               To: Fri Dec 05 12:30:15 PST 2031]
  Issuer: CN=JSSE Test CA, OU=JWS, O=Sun, L=Santa Clara, ST=CA, C=US
  SerialNumber: [    00]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 08 A3 7E 35 96 15 FA B0   F5 1B 5F CD 4F 54 EF 31  ...5......_.OT.1
0010: 33 70 E4 A7                                        3p..
]
]

[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 08 A3 7E 35 96 15 FA B0   F5 1B 5F CD 4F 54 EF 31  ...5......_.OT.1
0010: 33 70 E4 A7                                        3p..
]

[CN=JSSE Test CA, OU=JWS, O=Sun, L=Santa Clara, ST=CA, C=US]
SerialNumber: [    00]
]

[3]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
]

]
  Algorithm: [MD5withRSA]
  Signature:
0000: 73 6A 46 A2 05 E3 D8 6E   5C F4 18 A2 74 BC CF EB  sjF....n\...t...
0010: 0C 5B FF 81 1C 28 85 C7   FA E4 ED 5C 4F 71 22 FB  .[...(.....\Oq".
0020: 26 E3 01 3D 0C 10 AA BB   3E 90 ED 0E 1F 0C 9B B1  &..=....>.......
0030: 8C 49 6A 51 E4 C3 52 D6   FB 42 6C B4 A9 A9 57 A5  .IjQ..R..Bl...W.
0040: 84 00 42 6D 37 37 6D C7   6C 23 BC DC 60 D1 9D 6F  ..Bm77m.l#..`..o
0050: B3 75 47 3A 15 33 1A EC   90 09 9D F9 EB BD 88 96  .uG:.3..........
0060: E7 1D 41 BC 01 8D CA 88   D9 5B 04 09 8F 3E EA C8  ..A......[...>..
0070: 15 A0 AA 4E 85 95 AE 2F   0E 31 92 AC 3C FB 2F C4  ...N.../.1..<./.

]
We read the next few bytes of the handshake...
[read] MD5 and SHA1 hashes:  len = 1567
0000: 0B 00 06 1B 00 06 18 00   03 11 30 82 03 0D 30 82  ..........0...0.
0010: 02 76 A0 03 02 01 02 02   01 01 30 0D 06 09 2A 86  .v........0...*.
0020: 48 86 F7 0D 01 01 04 05   00 30 63 31 0B 30 09 06  H........0c1.0..
0030: 03 55 04 06 13 02 55 53   31 0B 30 09 06 03 55 04  .U....US1.0...U.
0040: 08 13 02 43 41 31 14 30   12 06 03 55 04 07 13 0B  ...CA1.0...U....
0050: 53 61 6E 74 61 20 43 6C   61 72 61 31 0C 30 0A 06  Santa Clara1.0..
0060: 03 55 04 0A 13 03 53 75   6E 31 0C 30 0A 06 03 55  .U....Sun1.0...U
0070: 04 0B 13 03 4A 57 53 31   15 30 13 06 03 55 04 03  ....JWS1.0...U..
0080: 13 0C 4A 53 53 45 20 54   65 73 74 20 43 41 30 1E  ..JSSE Test CA0.
0090: 17 0D 30 34 30 37 31 39   32 30 33 30 35 31 5A 17  ..040719203051Z.
00A0: 0D 33 31 31 32 30 35 32   30 33 30 35 31 5A 30 48  .311205203051Z0H
00B0: 31 0B 30 09 06 03 55 04   06 13 02 55 53 31 0B 30  1.0...U....US1.0
00C0: 09 06 03 55 04 08 13 02   43 41 31 0C 30 0A 06 03  ...U....CA1.0...
00D0: 55 04 0A 13 03 53 75 6E   31 0D 30 0B 06 03 55 04  U....Sun1.0...U.
00E0: 0B 13 04 4A 61 76 61 31   0F 30 0D 06 03 55 04 03  ...Java1.0...U..
00F0: 13 06 62 6F 6E 67 6F 73   30 81 9F 30 0D 06 09 2A  ..bongos0..0...*
0100: 86 48 86 F7 0D 01 01 01   05 00 03 81 8D 00 30 81  .H............0.
0110: 89 02 81 81 00 CC 09 74   CB 43 AB 6D ED F6 35 AA  .......t.C.m..5.
0120: 0E 49 29 D9 E0 F0 A1 D5   E2 3E 8F 5E C5 CE F4 DE  .I)......>.^....
0130: C1 A4 F3 CB 8C 45 0B 0F   6E 21 E1 00 65 CB 3C D1  .....E..n!..e.<.
0140: 5C EF 6A FB 5D 96 93 F4   71 41 41 45 FF 37 86 4C  \.j.]...qAAE.7.L
0150: AB F9 EA 9A 3F A5 82 60   BF 0A 81 84 C9 3E AC 0F  ....?..`.....>..
0160: 3D 20 3D AC A0 69 EF CA   4A A7 94 AD C8 A5 CE 37  = =..i..J......7
0170: 66 52 D1 25 43 CB 10 44   07 1E 93 74 D9 68 01 D7  fR.%C..D...t.h..
0180: 06 48 C9 0D 52 2D D5 6A   2E A6 48 4C 59 E2 5C C6  .H..R-.j..HLY.\.
0190: C1 5C C8 4C 1B 02 03 01   00 01 A3 81 EB 30 81 E8  .\.L.........0..
01A0: 30 09 06 03 55 1D 13 04   02 30 00 30 2C 06 09 60  0...U....0.0,..`
01B0: 86 48 01 86 F8 42 01 0D   04 1F 16 1D 4F 70 65 6E  .H...B......Open
01C0: 53 53 4C 20 47 65 6E 65   72 61 74 65 64 20 43 65  SSL Generated Ce
01D0: 72 74 69 66 69 63 61 74   65 30 1D 06 03 55 1D 0E  rtificate0...U..
01E0: 04 16 04 14 58 D7 3A A9   37 AA 3E 14 27 FC EC CC  ....X.:.7.>.'...
01F0: 45 08 04 8E 2A 8B 77 28   30 81 8D 06 03 55 1D 23  E...*.w(0....U.#
0200: 04 81 85 30 81 82 80 14   08 A3 7E 35 96 15 FA B0  ...0.......5....
0210: F5 1B 5F CD 4F 54 EF 31   33 70 E4 A7 A1 67 A4 65  .._.OT.13p...g.e
0220: 30 63 31 0B 30 09 06 03   55 04 06 13 02 55 53 31  0c1.0...U....US1
0230: 0B 30 09 06 03 55 04 08   13 02 43 41 31 14 30 12  .0...U....CA1.0.
0240: 06 03 55 04 07 13 0B 53   61 6E 74 61 20 43 6C 61  ..U....Santa Cla
0250: 72 61 31 0C 30 0A 06 03   55 04 0A 13 03 53 75 6E  ra1.0...U....Sun
0260: 31 0C 30 0A 06 03 55 04   0B 13 03 4A 57 53 31 15  1.0...U....JWS1.
0270: 30 13 06 03 55 04 03 13   0C 4A 53 53 45 20 54 65  0...U....JSSE Te
0280: 73 74 20 43 41 82 01 00   30 0D 06 09 2A 86 48 86  st CA...0...*.H.
0290: F7 0D 01 01 04 05 00 03   81 81 00 05 3E 17 DA F2  ............>...
02A0: 05 CB 4E 9E BF 12 CE 13   76 FF B2 FB 7F 9C 3D 45  ..N.....v.....=E
02B0: 28 43 6C 98 28 E3 92 17   C2 C6 F1 62 CA 60 C2 B0  (Cl.(......b.`..
02C0: EC E6 7E 4C 2F C2 40 FE   06 CB 34 60 B1 F4 26 1C  ...L/.@...4`..&.
02D0: E8 46 39 24 E1 8A 71 F2   13 90 A4 0A 7B 0B 13 AB  .F9$..q.........
02E0: 51 68 53 D9 7A 31 5A C1   7E 3C 44 2C 49 70 57 25  QhS.z1Z..<D,IpW%
02F0: F9 18 FE 5D A5 42 7F 3E   61 1F 29 A3 31 46 02 C6  ...].B.>a.).1F..
0300: D2 8C 27 79 40 76 97 B6   25 19 BE 6C 6A 92 DC EF  ..'y@v..%..lj...
0310: 11 BE E7 4A FF 2A E6 D6   AC 39 31 00 03 01 30 82  ...J.*...91...0.
0320: 02 FD 30 82 02 66 A0 03   02 01 02 02 01 00 30 0D  ..0..f........0.
0330: 06 09 2A 86 48 86 F7 0D   01 01 04 05 00 30 63 31  ..*.H........0c1
0340: 0B 30 09 06 03 55 04 06   13 02 55 53 31 0B 30 09  .0...U....US1.0.
0350: 06 03 55 04 08 13 02 43   41 31 14 30 12 06 03 55  ..U....CA1.0...U
0360: 04 07 13 0B 53 61 6E 74   61 20 43 6C 61 72 61 31  ....Santa Clara1
0370: 0C 30 0A 06 03 55 04 0A   13 03 53 75 6E 31 0C 30  .0...U....Sun1.0
0380: 0A 06 03 55 04 0B 13 03   4A 57 53 31 15 30 13 06  ...U....JWS1.0..
0390: 03 55 04 03 13 0C 4A 53   53 45 20 54 65 73 74 20  .U....JSSE Test
03A0: 43 41 30 1E 17 0D 30 34   30 37 31 39 32 30 33 30  CA0...0407192030
03B0: 31 35 5A 17 0D 33 31 31   32 30 35 32 30 33 30 31  15Z..31120520301
03C0: 35 5A 30 63 31 0B 30 09   06 03 55 04 06 13 02 55  5Z0c1.0...U....U
03D0: 53 31 0B 30 09 06 03 55   04 08 13 02 43 41 31 14  S1.0...U....CA1.
03E0: 30 12 06 03 55 04 07 13   0B 53 61 6E 74 61 20 43  0...U....Santa C
03F0: 6C 61 72 61 31 0C 30 0A   06 03 55 04 0A 13 03 53  lara1.0...U....S
0400: 75 6E 31 0C 30 0A 06 03   55 04 0B 13 03 4A 57 53  un1.0...U....JWS
0410: 31 15 30 13 06 03 55 04   03 13 0C 4A 53 53 45 20  1.0...U....JSSE
0420: 54 65 73 74 20 43 41 30   81 9F 30 0D 06 09 2A 86  Test CA0..0...*.
0430: 48 86 F7 0D 01 01 01 05   00 03 81 8D 00 30 81 89  H............0..
0440: 02 81 81 00 9A 0A B6 45   66 D5 DE 4A D9 3C 8C AC  .......Ef..J.<..
0450: A6 B5 A5 88 B4 CF 14 E1   A6 1B 25 25 4F 44 C9 1F  ..........%%OD..
0460: 22 38 32 29 CF A1 7C 18   30 93 DC 2B EC 2B 67 EE  "82)....0..+.+g.
0470: 2E 08 66 2D 0F 47 E0 12   3A DC E0 03 E9 65 16 F6  ..f-.G..:....e..
0480: 18 C6 16 14 56 24 55 7D   32 3E F9 66 A2 DD 55 EB  ....V$U.2>.f..U.
0490: 4D 0A 67 C7 5D 21 9B 29   EA 2E 51 C5 83 A3 55 FF  M.g.]!.)..Q...U.
04A0: 35 CA A6 99 8F 46 F8 8E   56 BB A2 B1 39 83 D8 61  5....F..V...9..a
04B0: 42 79 E0 95 78 FA C6 E3   65 B0 FD 74 2D 64 51 71  By..x...e..t-dQq
04C0: 04 F2 A1 91 02 03 01 00   01 A3 81 C0 30 81 BD 30  ............0..0
04D0: 1D 06 03 55 1D 0E 04 16   04 14 08 A3 7E 35 96 15  ...U.........5..
04E0: FA B0 F5 1B 5F CD 4F 54   EF 31 33 70 E4 A7 30 81  ...._.OT.13p..0.
04F0: 8D 06 03 55 1D 23 04 81   85 30 81 82 80 14 08 A3  ...U.#...0......
0500: 7E 35 96 15 FA B0 F5 1B   5F CD 4F 54 EF 31 33 70  .5......_.OT.13p
0510: E4 A7 A1 67 A4 65 30 63   31 0B 30 09 06 03 55 04  ...g.e0c1.0...U.
0520: 06 13 02 55 53 31 0B 30   09 06 03 55 04 08 13 02  ...US1.0...U....
0530: 43 41 31 14 30 12 06 03   55 04 07 13 0B 53 61 6E  CA1.0...U....San
0540: 74 61 20 43 6C 61 72 61   31 0C 30 0A 06 03 55 04  ta Clara1.0...U.
0550: 0A 13 03 53 75 6E 31 0C   30 0A 06 03 55 04 0B 13  ...Sun1.0...U...
0560: 03 4A 57 53 31 15 30 13   06 03 55 04 03 13 0C 4A  .JWS1.0...U....J
0570: 53 53 45 20 54 65 73 74   20 43 41 82 01 00 30 0C  SSE Test CA...0.
0580: 06 03 55 1D 13 04 05 30   03 01 01 FF 30 0D 06 09  ..U....0....0...
0590: 2A 86 48 86 F7 0D 01 01   04 05 00 03 81 81 00 73  *.H............s
05A0: 6A 46 A2 05 E3 D8 6E 5C   F4 18 A2 74 BC CF EB 0C  jF....n\...t....
05B0: 5B FF 81 1C 28 85 C7 FA   E4 ED 5C 4F 71 22 FB 26  [...(.....\Oq".&
05C0: E3 01 3D 0C 10 AA BB 3E   90 ED 0E 1F 0C 9B B1 8C  ..=....>........
05D0: 49 6A 51 E4 C3 52 D6 FB   42 6C B4 A9 A9 57 A5 84  IjQ..R..Bl...W..
05E0: 00 42 6D 37 37 6D C7 6C   23 BC DC 60 D1 9D 6F B3  .Bm77m.l#..`..o.
05F0: 75 47 3A 15 33 1A EC 90   09 9D F9 EB BD 88 96 E7  uG:.3...........
0600: 1D 41 BC 01 8D CA 88 D9   5B 04 09 8F 3E EA C8 15  .A......[...>...
0610: A0 AA 4E 85 95 AE 2F 0E   31 92 AC 3C FB 2F C4     ..N.../.1..<./.
...and parse it to find that it's a CertificateRequest message.

The server is asking the client to identify itself with a X509 certificate subject having the common name (CN=) "Duke". The server's X509TrustManager has the option of rejecting any credentials provided by the client (or lack thereof). In a real-world situation, you'd probably use a certificate signed by a CA, and the list of trusted CA's would be included in this message instead.

Lastly, we receive the ServerHelloDone message, which signals to the client that the server has finished sending its part of the handshake.

*** CertificateRequest
Cert Types: RSA, DSS,
Cert Authorities:
CN=Duke, OU=Java Software, O="Sun Microsystems, Inc.",
L=Cupertino, ST=CA, C=US>
[read] MD5 and SHA1 hashes:  len = 131
0000: 0D 00 00 7F 02 01 02 00   7A 00 78 30 76 31 0B 30  ........z.x0v1.0
0010: 09 06 03 55 04 06 13 02   55 53 31 0B 30 09 06 03  ...U....US1.0...
0020: 55 04 08 13 02 43 41 31   12 30 10 06 03 55 04 07  U....CA1.0...U..
0030: 13 09 43 75 70 65 72 74   69 6E 6F 31 1F 30 1D 06  ..Cupertino1.0..
0040: 03 55 04 0A 13 16 53 75   6E 20 4D 69 63 72 6F 73  .U....Sun Micros
0050: 79 73 74 65 6D 73 2C 20   49 6E 63 2E 31 16 30 14  ystems, Inc.1.0.
0060: 06 03 55 04 0B 13 0D 4A   61 76 61 20 53 6F 66 74  ..U....Java Soft
0070: 77 61 72 65 31 0D 30 0B   06 03 55 04 03 13 04 44  ware1.0...U....D
0080: 75 6B 65                                           uke
*** ServerHelloDone
[read] MD5 and SHA1 hashes:  len = 4
0000: 0E 00 00 00                                        ....
We need to send client credentials back to the server, so the client's X509KeyManager is now consulted. We look for a match between the list of accepted issuers (above), and the certificates we have in our KeyStore. In this case (luckily?), there is a match: we have credentials for "duke". It's now up to the server's X509TrustManager to decide whether to accept these credentials.
matching alias: duke
*** Certificate chain
chain [0] = [
[
  Version: V1
  Subject: CN=Duke, OU=Java Software, O="Sun Microsystems, Inc.",
  L=Cupertino, ST=CA, C=US
  Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

  Key:  Sun RSA public key, 1024 bits
  modulus: 134968166047563266914058280571444028986498087544923991226919517
  667593269213420979048109900052353578998293280426361122296881234393722020
  704208851688212064483570055963805034839797994154526862998272017486468599
  962268346037652120279791547218281230795146025359480589335682217749874703
  510467348902637769973696151441
  public exponent: 65537
  Validity: [From: Tue May 22 16:46:46 PDT 2001,
               To: Sun May 22 16:46:46 PDT 2011]
  Issuer: CN=Duke, OU=Java Software, O="Sun Microsystems, Inc.",
  L=Cupertino, ST=CA, C=US
  SerialNumber: [    3b0afa66]

]
  Algorithm: [MD5withRSA]
  Signature:
0000: 5F B5 62 E9 A0 26 1D 8E   A2 7E 7C 02 08 36 3A 3E  _.b..&.......6:>
0010: C9 C2 45 03 DD F9 BC 06   FC 25 CF 30 92 91 B1 4E  ..E......%.0...N
0020: 62 17 08 48 14 68 80 CF   DD 89 11 EA 92 7F CE DD  b..H.h..........
0030: B4 FD 12 A8 71 C7 9E D7   C3 D0 E3 BD BB DE 20 92  ....q......... .
0040: C2 3B C8 DE CB 25 23 C0   8B B6 92 B9 0B 64 80 63  .;...%#......d.c
0050: D9 09 25 2D 7A CF 0A 31   B6 E9 CA C1 37 93 BC 0D  ..%-z..1....7...
0060: 4E 74 95 4F 58 31 DA AC   DF D8 BD 89 BD AF EC C8  Nt.OX1..........
0070: 2D 18 A2 BC B2 15 4F B7   28 6F D3 00 E1 72 9B 6C  -.....O.(o...r.l

]
***
In the case of this particular cipher suite, we must now pass a message called a ClientKeyExchange, which helps establish a shared secret between the two parties.

All of this data is eventually collected and written to the raw device.

*** ClientKeyExchange, RSA PreMasterSecret, TLSv1
Random Secret:  { 3, 1, 132, 84, 245, 214, 235, 245, 168, 8, 186, 250,
122, 34, 97, 45, 117, 220, 64, 232, 152, 249, 14, 178, 135, 128, 184,
26, 143, 104, 37, 184, 81, 208, 84, 69, 97, 138, 80, 201, 187, 14, 57,
83, 69, 120, 190, 121 }
[write] MD5 and SHA1 hashes:  len = 754
0000: 0B 00 02 68 00 02 65 00   02 62 30 82 02 5E 30 82  ...h..e..b0..^0.
0010: 01 C7 02 04 3B 0A FA 66   30 0D 06 09 2A 86 48 86  ....;..f0...*.H.
0020: F7 0D 01 01 04 05 00 30   76 31 0B 30 09 06 03 55  .......0v1.0...U
0030: 04 06 13 02 55 53 31 0B   30 09 06 03 55 04 08 13  ....US1.0...U...
0040: 02 43 41 31 12 30 10 06   03 55 04 07 13 09 43 75  .CA1.0...U....Cu
0050: 70 65 72 74 69 6E 6F 31   1F 30 1D 06 03 55 04 0A  pertino1.0...U..
0060: 13 16 53 75 6E 20 4D 69   63 72 6F 73 79 73 74 65  ..Sun Microsyste
0070: 6D 73 2C 20 49 6E 63 2E   31 16 30 14 06 03 55 04  ms, Inc.1.0...U.
0080: 0B 13 0D 4A 61 76 61 20   53 6F 66 74 77 61 72 65  ...Java Software
0090: 31 0D 30 0B 06 03 55 04   03 13 04 44 75 6B 65 30  1.0...U....Duke0
00A0: 1E 17 0D 30 31 30 35 32   32 32 33 34 36 34 36 5A  ...010522234646Z
00B0: 17 0D 31 31 30 35 32 32   32 33 34 36 34 36 5A 30  ..110522234646Z0
00C0: 76 31 0B 30 09 06 03 55   04 06 13 02 55 53 31 0B  v1.0...U....US1.
00D0: 30 09 06 03 55 04 08 13   02 43 41 31 12 30 10 06  0...U....CA1.0..
00E0: 03 55 04 07 13 09 43 75   70 65 72 74 69 6E 6F 31  .U....Cupertino1
00F0: 1F 30 1D 06 03 55 04 0A   13 16 53 75 6E 20 4D 69  .0...U....Sun Mi
0100: 63 72 6F 73 79 73 74 65   6D 73 2C 20 49 6E 63 2E  crosystems, Inc.
0110: 31 16 30 14 06 03 55 04   0B 13 0D 4A 61 76 61 20  1.0...U....Java
0120: 53 6F 66 74 77 61 72 65   31 0D 30 0B 06 03 55 04  Software1.0...U.
0130: 03 13 04 44 75 6B 65 30   81 9F 30 0D 06 09 2A 86  ...Duke0..0...*.
0140: 48 86 F7 0D 01 01 01 05   00 03 81 8D 00 30 81 89  H............0..
0150: 02 81 81 00 C0 33 77 E7   1F D0 CE CE BD 43 2F 8D  .....3w......C/.
0160: EB C6 D3 07 A9 00 F5 75   4D C8 4B 04 52 42 EE 69  .......uM.K.RB.i
0170: F3 30 E9 A0 C6 07 B7 C8   55 2D B9 5B 57 7A 4C AD  .0......U-.[WzL.
0180: 1A 30 63 5C 7D 6D 16 BF   ED 54 13 49 8A 1B E6 29  .0c\.m...T.I...)
0190: 26 20 85 F9 5E 2B 2F A7   12 9C 98 2D 83 F6 EE B1  &..^+/....-....
01A0: 85 68 DA B5 8E 4C 1D 2D   8E 21 97 B0 30 C8 3A 57  .h...L.-.!..0.:W
01B0: F4 E1 18 9E F6 98 B2 D5   3D 8E D5 2B 09 E2 E1 A0  ........=..+....
01C0: 49 C1 A6 43 CE EA 57 7F   3B 5C 3A C9 BA DB B7 F0  I..C..W.;\:.....
01D0: 89 69 BF 91 02 03 01 00   01 30 0D 06 09 2A 86 48  .i.......0...*.H
01E0: 86 F7 0D 01 01 04 05 00   03 81 81 00 5F B5 62 E9  ............_.b.
01F0: A0 26 1D 8E A2 7E 7C 02   08 36 3A 3E C9 C2 45 03  .&.......6:>..E.
0200: DD F9 BC 06 FC 25 CF 30   92 91 B1 4E 62 17 08 48  .....%.0...Nb..H
0210: 14 68 80 CF DD 89 11 EA   92 7F CE DD B4 FD 12 A8  .h..............
0220: 71 C7 9E D7 C3 D0 E3 BD   BB DE 20 92 C2 3B C8 DE  q......... ..;..
0230: CB 25 23 C0 8B B6 92 B9   0B 64 80 63 D9 09 25 2D  .%#......d.c..%-
0240: 7A CF 0A 31 B6 E9 CA C1   37 93 BC 0D 4E 74 95 4F  z..1....7...Nt.O
0250: 58 31 DA AC DF D8 BD 89   BD AF EC C8 2D 18 A2 BC  X1..........-...
0260: B2 15 4F B7 28 6F D3 00   E1 72 9B 6C 10 00 00 82  ..O.(o...r.l....
0270: 00 80 4E DD E7 77 F1 91   6B 31 4E FA D6 61 D9 69  ..N..w..k1N..a.i
0280: 82 BD 22 40 83 FD 76 E6   FF A7 18 95 A0 04 28 0D  .."@..v.......(.
0290: 0D F7 44 6F 0C 42 4F 17   77 A0 99 56 2A 13 77 28  ..Do.BO.w..V*.w(
02A0: 0B 09 48 C1 B9 8C 09 ED   9F C6 2E 32 18 DB BD ED  ..H........2....
02B0: AF C3 AB E7 AD 8F DF 9E   AB 07 43 B4 50 EF 74 98  ..........C.P.t.
02C0: EA FC E8 4D C9 DA FC B0   B2 C7 D4 83 50 B5 84 B8  ...M........P...
02D0: 44 86 7B 5D 8A C2 F8 04   80 06 E6 84 42 33 B2 EE  D..]........B3..
02E0: 05 E6 D3 48 0E 23 E5 1F   63 4C 53 98 B8 8C 45 BA  ...H.#..cLS...E.
02F0: C8 19                                              ..
main, WRITE: TLSv1 Handshake, length = 754
[Raw write]: length = 759
0000: 16 03 01 02 F2 0B 00 02   68 00 02 65 00 02 62 30  ........h..e..b0
0010: 82 02 5E 30 82 01 C7 02   04 3B 0A FA 66 30 0D 06  ..^0.....;..f0..
0020: 09 2A 86 48 86 F7 0D 01   01 04 05 00 30 76 31 0B  .*.H........0v1.
0030: 30 09 06 03 55 04 06 13   02 55 53 31 0B 30 09 06  0...U....US1.0..
0040: 03 55 04 08 13 02 43 41   31 12 30 10 06 03 55 04  .U....CA1.0...U.
0050: 07 13 09 43 75 70 65 72   74 69 6E 6F 31 1F 30 1D  ...Cupertino1.0.
0060: 06 03 55 04 0A 13 16 53   75 6E 20 4D 69 63 72 6F  ..U....Sun Micro
0070: 73 79 73 74 65 6D 73 2C   20 49 6E 63 2E 31 16 30  systems, Inc.1.0
0080: 14 06 03 55 04 0B 13 0D   4A 61 76 61 20 53 6F 66  ...U....Java Sof
0090: 74 77 61 72 65 31 0D 30   0B 06 03 55 04 03 13 04  tware1.0...U....
00A0: 44 75 6B 65 30 1E 17 0D   30 31 30 35 32 32 32 33  Duke0...01052223
00B0: 34 36 34 36 5A 17 0D 31   31 30 35 32 32 32 33 34  4646Z..110522234
00C0: 36 34 36 5A 30 76 31 0B   30 09 06 03 55 04 06 13  646Z0v1.0...U...
00D0: 02 55 53 31 0B 30 09 06   03 55 04 08 13 02 43 41  .US1.0...U....CA
00E0: 31 12 30 10 06 03 55 04   07 13 09 43 75 70 65 72  1.0...U....Cuper
00F0: 74 69 6E 6F 31 1F 30 1D   06 03 55 04 0A 13 16 53  tino1.0...U....S
0100: 75 6E 20 4D 69 63 72 6F   73 79 73 74 65 6D 73 2C  un Microsystems,
0110: 20 49 6E 63 2E 31 16 30   14 06 03 55 04 0B 13 0D   Inc.1.0...U....
0120: 4A 61 76 61 20 53 6F 66   74 77 61 72 65 31 0D 30  Java Software1.0
0130: 0B 06 03 55 04 03 13 04   44 75 6B 65 30 81 9F 30  ...U....Duke0..0
0140: 0D 06 09 2A 86 48 86 F7   0D 01 01 01 05 00 03 81  ...*.H..........
0150: 8D 00 30 81 89 02 81 81   00 C0 33 77 E7 1F D0 CE  ..0.......3w....
0160: CE BD 43 2F 8D EB C6 D3   07 A9 00 F5 75 4D C8 4B  ..C/........uM.K
0170: 04 52 42 EE 69 F3 30 E9   A0 C6 07 B7 C8 55 2D B9  .RB.i.0......U-.
0180: 5B 57 7A 4C AD 1A 30 63   5C 7D 6D 16 BF ED 54 13  [WzL..0c\.m...T.
0190: 49 8A 1B E6 29 26 20 85   F9 5E 2B 2F A7 12 9C 98  I...)& ..^+/....
01A0: 2D 83 F6 EE B1 85 68 DA   B5 8E 4C 1D 2D 8E 21 97  -.....h...L.-.!.
01B0: B0 30 C8 3A 57 F4 E1 18   9E F6 98 B2 D5 3D 8E D5  .0.:W........=..
01C0: 2B 09 E2 E1 A0 49 C1 A6   43 CE EA 57 7F 3B 5C 3A  +....I..C..W.;\:
01D0: C9 BA DB B7 F0 89 69 BF   91 02 03 01 00 01 30 0D  ......i.......0.
01E0: 06 09 2A 86 48 86 F7 0D   01 01 04 05 00 03 81 81  ..*.H...........
01F0: 00 5F B5 62 E9 A0 26 1D   8E A2 7E 7C 02 08 36 3A  ._.b..&.......6:
0200: 3E C9 C2 45 03 DD F9 BC   06 FC 25 CF 30 92 91 B1  >..E......%.0...
0210: 4E 62 17 08 48 14 68 80   CF DD 89 11 EA 92 7F CE  Nb..H.h.........
0220: DD B4 FD 12 A8 71 C7 9E   D7 C3 D0 E3 BD BB DE 20  .....q.........
0230: 92 C2 3B C8 DE CB 25 23   C0 8B B6 92 B9 0B 64 80  ..;...%#......d.
0240: 63 D9 09 25 2D 7A CF 0A   31 B6 E9 CA C1 37 93 BC  c..%-z..1....7..
0250: 0D 4E 74 95 4F 58 31 DA   AC DF D8 BD 89 BD AF EC  .Nt.OX1.........
0260: C8 2D 18 A2 BC B2 15 4F   B7 28 6F D3 00 E1 72 9B  .-.....O.(o...r.
0270: 6C 10 00 00 82 00 80 4E   DD E7 77 F1 91 6B 31 4E  l......N..w..k1N
0280: FA D6 61 D9 69 82 BD 22   40 83 FD 76 E6 FF A7 18  ..a.i.."@..v....
0290: 95 A0 04 28 0D 0D F7 44   6F 0C 42 4F 17 77 A0 99  ...(...Do.BO.w..
02A0: 56 2A 13 77 28 0B 09 48   C1 B9 8C 09 ED 9F C6 2E  V*.w(..H........
02B0: 32 18 DB BD ED AF C3 AB   E7 AD 8F DF 9E AB 07 43  2..............C
02C0: B4 50 EF 74 98 EA FC E8   4D C9 DA FC B0 B2 C7 D4  .P.t....M.......
02D0: 83 50 B5 84 B8 44 86 7B   5D 8A C2 F8 04 80 06 E6  .P...D..].......
02E0: 84 42 33 B2 EE 05 E6 D3   48 0E 23 E5 1F 63 4C 53  .B3.....H.#..cLS
02F0: 98 B8 8C 45 BA C8 19                               ...E...
At this point, we have everything we need to generate the actual secrets.
SESSION KEYGEN:
PreMaster Secret:
0000: 03 01 84 54 F5 D6 EB F5   A8 08 BA FA 7A 22 61 2D  ...T........z"a-
0010: 75 DC 40 E8 98 F9 0E B2   87 80 B8 1A 8F 68 25 B8  u.@..........h%.
0020: 51 D0 54 45 61 8A 50 C9   BB 0E 39 53 45 78 BE 79  Q.TEa.P...9SEx.y
CONNECTION KEYGEN:
Client Nonce:
0000: 40 FC 30 AE 2D 63 84 BB   C5 4B 27 FD 58 21 CA 90  @.0.-c...K'.X!..
0010: 05 F6 A7 7B 37 BB 72 E1   FC 1D 1B 6A F5 1C C8 9F  ....7.r....j....
Server Nonce:
0000: 40 FC 31 10 79 AB 17 66   FA 8B 3F AA FD 5E 48 23  @.1.y..f..?..^H#
0010: FA 90 31 D8 3C B9 A3 2C   8C F5 E9 81 9B A2 63 6C  ..1.<..,......cl
Master Secret:
0000: B0 00 22 34 59 03 16 B7   7A 6C 56 9B 89 D2 7A CC  .."4Y..<.c.
Server MAC write Secret:
0000: 1E 4D D1 D3 0A 78 EE B7   4F EC 15 79 B2 59 18 40  .M...x..O..y.Y.@
Client write key:
0000: 10 D0 D6 C2 D9 B7 62 CB   2C 74 BF 5F 85 3C 6F E7  ......b.,t._.<o.
Server write key:
0000: 06 65 DF BD 16 4B A5 7D   8C 66 2A 80 C1 45 B4 F3  .e...K...f*..E..
... no IV for cipher
>
Send a quick confirmation to the server verifying that we know the private key corresponding to the client certificate we just sent.
*** CertificateVerify
[write] MD5 and SHA1 hashes:  len = 134
0000: 0F 00 00 82 00 80 45 41   43 4B 47 1D F0 EE D1 14  ......EACKG.....
0010: AE F9 B3 2C 1F B9 FE 7B   3E 91 50 C5 0F F1 57 4F  ...,....>.P...WO
0020: 55 F1 4B C3 79 16 A8 F1   72 6B 10 CA CC 83 02 FC  U.K.y...rk......
0030: 97 3D 04 29 44 4C 58 74   84 94 19 63 BB 8A 2C 78  .=.)DLXt...c..,x
0040: 43 A0 DD 5E 54 52 AA 97   15 92 1C 39 6B 10 2E BF  C..^TR.....9k...
0050: F2 DA AE 2D 8F FB 50 44   9E E2 1F 7D C9 C5 CB A0  ...-..PD........
0060: 31 A0 F9 AA 93 2D 1B 07   1B FA E0 EE 95 E7 88 D7  1....-..........
0070: AD 4A 3A 40 DC FB DF 9E   EB 75 04 14 E2 F2 BB DC  .J:@.....u......
0080: 1B 7E 6E D5 8C 62                                  ..n..b
main, WRITE: TLSv1 Handshake, length = 134
[Raw write]: length = 139
0000: 16 03 01 00 86 0F 00 00   82 00 80 45 41 43 4B 47  ...........EACKG
0010: 1D F0 EE D1 14 AE F9 B3   2C 1F B9 FE 7B 3E 91 50  ........,....>.P
0020: C5 0F F1 57 4F 55 F1 4B   C3 79 16 A8 F1 72 6B 10  ...WOU.K.y...rk.
0030: CA CC 83 02 FC 97 3D 04   29 44 4C 58 74 84 94 19  ......=.)DLXt...
0040: 63 BB 8A 2C 78 43 A0 DD   5E 54 52 AA 97 15 92 1C  c..,xC..^TR.....
0050: 39 6B 10 2E BF F2 DA AE   2D 8F FB 50 44 9E E2 1F  9k......-..PD...
0060: 7D C9 C5 CB A0 31 A0 F9   AA 93 2D 1B 07 1B FA E0  .....1....-.....
0070: EE 95 E7 88 D7 AD 4A 3A   40 DC FB DF 9E EB 75 04  ......J:@.....u.
0080: 14 E2 F2 BB DC 1B 7E 6E   D5 8C 62                 .......n..b
Almost finished! Tell the server we're changing to the newly established cipher suite. All further messages will be encrypted using the parameters we just established. We send an encrypted Finished message to verify everything worked.
main, WRITE: TLSv1 Change Cipher Spec, length = 1
[Raw write]: length = 6
0000: 14 03 01 00 01 01                                  ......
*** Finished
verify_data:  { 242, 98, 66, 170, 124, 124, 204, 231, 73, 15, 237, 172 }
***
[write] MD5 and SHA1 hashes:  len = 16
0000: 14 00 00 0C F2 62 42 AA   7C 7C CC E7 49 0F ED AC  .....bB.....I...
Padded plaintext before ENCRYPTION:  len = 32
0000: 14 00 00 0C F2 62 42 AA   7C 7C CC E7 49 0F ED AC  .....bB.....I...
0010: FA 06 3C 9F 8C 41 1D ED   2B 06 D0 5A ED 31 F2 80  ..<..A..+..Z.1..
main, WRITE: TLSv1 Handshake, length = 32
Note next that when the message above is actually written to the raw output device (following the 5 bytes of header information), the message is now encrypted.
[Raw write]: length = 37
0000: 16 03 01 00 20 15 8C 25   BA 4E 73 F5 27 79 49 B1  .... ..%.Ns.'yI.
0010: E9 F5 7E C8 48 A7 D3 A6   9B BD 6F 8E A5 8E 2B B7  ....H.....o...+.
0020: EE DC BD F4 D7                                     .....
We now wait for the server to send the same (Change Cipher Spec/Finshed), so we can know it completed negotiations successfully.
[Raw read]: length = 5
0000: 14 03 01 00 01                                     .....
[Raw read]: length = 1
0000: 01                                                 .
main, READ: TLSv1 Change Cipher Spec, length = 1
[Raw read]: length = 5
0000: 16 03 01 00 20                                     ....
[Raw read]: length = 32
0000: 1F F5 FA C8 79 20 CE 91   AA 68 7F 6C F3 5A DB 7B  ....y ...h.l.Z..
0010: A5 1C 31 1F 6F 41 50 C5   C6 25 25 8D 48 50 3F F1  ..1.oAP..%%.HP?.
main, READ: TLSv1 Handshake, length = 32
Padded plaintext after DECRYPTION:  len = 32
0000: 14 00 00 0C 07 38 46 5F   62 AD 41 B3 DC 79 30 FD  .....8F_b.A..y0.
0010: 34 F2 3B 54 1C D4 68 0E   92 0B 9C 7E ED 47 9F 3B  4.;T..h......G.;
*** Finished
verify_data:  { 7, 56, 70, 95, 98, 173, 65, 179, 220, 121, 48, 253 }
***
[read] MD5 and SHA1 hashes:  len = 16
0000: 14 00 00 0C 07 38 46 5F   62 AD 41 B3 DC 79 30 FD  .....8F_b.A..y0.
Everything completed successfully! Let's cache the established session in case we want to reestablish this session after this connection is dropped.

At this point, a SSL/TLS client should examine the credentials of the peer to make sure that it is communicating with the expected server. A HttpsURLConnection would check the hostname and call HostnameVerifier if there was a problem, but the raw SSLSocket doesn't. This verification should be done by hand, but we're ignoring this for now.

So, after all that, we're finally ready to exchange application data. We send a "GET /index.html HTTP1.1" command.

%% Cached client session: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
Padded plaintext before ENCRYPTION:  len = 42
0000: 47 45 54 20 2F 69 6E 64   65 78 2E 68 74 6D 6C 20  GET /index.html
0010: 48 54 54 50 2F 31 2E 31   0A 0A CA CB D1 10 9D 0E  HTTP/1.1........
0020: 13 3C D9 66 6B 9E 36 87   ED 9B                    .<.fk.6...
main, WRITE: TLSv1 Application Data, length = 42
Note again the data over the wire is encrypted (skipping the 5 header bytes).
[Raw write]: length = 47
0000: 17 03 01 00 2A 8A E9 EC   2C 8D 19 B6 E2 50 C1 E2  ....*...,....P..
0010: 22 1A C0 97 95 23 99 E1   20 DD F3 2A B4 DC 14 57  "....#.. ..*...W
0020: 32 71 58 98 01 BE 70 11   A3 FC 8E 3A 7C 8D BF     2qX...p....:...
We get the application data back. First the HTTPS header, then the actual data.
[Raw read]: length = 5
0000: 17 03 01 00 50                                     ....P
[Raw read]: length = 80
0000: 70 10 0D D6 FA ED 51 FC   C2 7E CE 24 2E F1 2F F7  p.....Q....$../.
0010: E7 CD A5 D6 2D 1B 10 FD   48 56 9C 1B B5 EC 8F 1E  ....-...HV......
0020: DB DA F9 83 62 52 15 38   70 4B C1 85 13 EF CA 17  ....bR.8pK......
0030: 89 37 D3 45 C0 88 BB 92   63 F6 9C DE 69 E6 60 3E  .7.E....c...i.`>
0040: 1F F7 4D C1 56 61 79 01   49 55 FB 38 6B 16 81 BC  ..M.Vay.IU.8k...
main, READ: TLSv1 Application Data, length = 80
Padded plaintext after DECRYPTION:  len = 80
0000: 48 54 54 50 2F 31 2E 30   20 32 30 30 20 4F 4B 0D  HTTP/1.0 200 OK.
0010: 0A 43 6F 6E 74 65 6E 74   2D 4C 65 6E 67 74 68 3A  .Content-Length:
0020: 20 35 38 0D 0A 43 6F 6E   74 65 6E 74 2D 54 79 70   58..Content-Typ
0030: 65 3A 20 74 65 78 74 2F   68 74 6D 6C 0D 0A 0D 0A  e: text/html....
0040: 40 18 A1 FF 1D 5A D4 55   98 DB E3 95 01 A0 91 AF  @....Z.U........
HTTP/1.0 200 OK
Content-Length: 58
Content-Type: text/html
[Raw read]: length = 5
0000: 17 03 01 00 4A                                     ....J
[Raw read]: length = 74
0000: 75 DA F2 58 C3 5E 58 DE   14 AD FE 71 A3 78 07 58  u..X.^X....q.x.X
0010: EB E9 2B A2 D7 82 5C 6E   C9 9C 58 84 D7 A8 C6 F8  ..+...\n..X.....
0020: DE C6 5B BA 10 59 DF CC   11 AE 35 F7 C7 0F F6 C2  ..[..Y....5.....
0030: 3E 67 4E 95 30 AA 91 0B   E4 4F 5C C7 BF 50 AC 61  >gN.0....O\..P.a
0040: 87 B7 80 75 F0 81 F1 00   63 C9                    ...u....c.
main, READ: TLSv1 Application Data, length = 74
Padded plaintext after DECRYPTION:  len = 74
0000: 3C 48 54 4D 4C 3E 0A 3C   48 31 3E 48 65 6C 6C 6F  <HTML>.<H1>Hello
0010: 20 57 6F 72 6C 64 3C 2F   48 31 3E 0A 54 68 65 20   World</H1>.The
0020: 74 65 73 74 20 69 73 20   63 6F 6D 70 6C 65 74 65  test is complete
0030: 21 0A 3C 2F 48 54 4D 4C   3E 0A 38 2E 68 72 F1 47  !.</HTML>.8.hr.G
0040: E8 56 D1 EA A6 FC 3C 30   6F F3                    .V....<0o.
 <HTML>
<H1>Hello World<H1>
The test is complete!
<HTML>
Read from the socket again to see if there is any more data. We get a close_notify message, which means this connection is shutting down properly. We send our own in turn, then close the socket.
[Raw read]: length = 5
0000: 15 03 01 00 12                                     .....
[Raw read]: length = 18
0000: 09 AB 95 00 43 8D C8 7C   83 18 EB C4 8C 99 43 A6  ....C.........C.
0010: 76 49                                              vI
main, READ: TLSv1 Alert, length = 18
Padded plaintext after DECRYPTION:  len = 18
0000: 01 00 FA 44 D5 57 71 5C   CC C7 D9 D0 04 23 10 D8  ...D.Wq\.....#..
0010: 21 7B                                              !.
main, RECV TLSv1 ALERT:  warning, close_notify
main, called closeInternal(false)
main, SEND TLSv1 ALERT:  warning, description = close_notify
Padded plaintext before ENCRYPTION:  len = 18
0000: 01 00 8A 2C A2 36 9C 88   22 50 6E BC 95 3B B2 C4  ...,.6.."Pn..;..
0010: FE F2                                              ..
main, WRITE: TLSv1 Alert, length = 18
[Raw write]: length = 23
0000: 15 03 01 00 12 19 BE 10   8D FA F1 CA DD AB CC 91  ................
0010: 2E 49 08 71 2B C1 05                               .I.q+..
main, called close()
main, called closeInternal(true)
main, called close()
main, called closeInternal(true)
main, called close()
main, called closeInternal(true)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


FIPS 140 Compliant Mode for SunJSSE

In Sun's Java SE implementation version 6 or later, the SunJSSE provider, which contains the SSL/TLS implementation, can be configured to operate in a FIPS 140 compliant mode instead of its default mode. This document describes the FIPS 140 compliant mode (subsequently called "FIPS mode").

Configuring SunJSSE for FIPS Mode

SunJSSE is configured in FIPS mode by associating it with an appropriate FIPS 140 certified cryptographic provider that supplies the implementations for all cryptographic algorithms required by SunJSSE. This can be done in one of the following ways:

  1. edit the file ${java.home}/lib/security/java.security and modify the line that lists com.sun.net.ssl.internal.ssl.Provider to list the provider name of the FIPS 140 certified cryptographic provider. For example if the name of the cryptographic provider is SunPKCS11-NSS, change the line from

      security.provider.4=com.sun.net.ssl.internal.ssl.Provider

    to

      security.provider.4=com.sun.net.ssl.internal.ssl.Provider SunPKCS11-NSS

    The class for the provider of the given name must also be listed as a security provider in the java.security file.

  2. at runtime, call the constructor of the SunJSSE provider that takes a java.security.Provider object as a parameter. For example, if the variable cryptoProvider is a reference to the cryptographic provider, call new com.sun.net.ssl.internal.ssl.Provider(cryptoProvider).

  3. at runtime, call the constructor of the SunJSSE provider that takes a String object as a parameter. For example if the cryptographic provider is called SunPKCS11-NSS call new com.sun.net.ssl.internal.ssl.Provider("SunPKCS11-NSS"). A provider with the specified name must be one of the configured security providers.

Within a given Java process, SunJSSE can be used either in FIPS mode or in default mode, but not both at the same time. Once SunJSSE has been initialized, it is not possible to change the mode. This means that if one of the runtime configuration options is used (option 2 or 3), the configuration must take place before any SSL/TLS operation.

Note that only the specified configured provider will be used by the SunJSSE for any and all cryptographic operations. All other cryptographic providers including those included with the Java SE implementation will be ignored and not used.

Difference Between FIPS Mode and Default Mode

In FIPS mode, SunJSSE behaves in a way identical to default mode, except for the following differences.

In FIPS mode:

  • SunJSSE will perform all cryptographic operations using the cryptographic provider that was configured as described above. This includes symmetric and asymmetric encryption, signature generation and verification, message digests and message authentication codes, key generation and key derivation, random number generation, etc.

  • If the configured cryptographic provider reports any error by throwing an exception, SunJSSE will abort the current operation and propagate the exception to the application.

  • If the configured cryptographic provider believes it had a critical error such as a self test failure per FIPS guidelines, it needs to remain in an error state until it is re-initialized. The application using the SunJSSE configured with the FIPS cryptographic module will have to be restarted. This ensures that the FIPS module will not allow critical errors to compromise security.

  • Only TLS 1.0 and later can be used. SSL 2.0 and SSL 3.0 are not available. Any attempt to enable SSL 2.0 or 3.0 will fail with an exception.

  • The list of ciphersuites is limited to those that utilize appropriate algorithms. The current list of possible ciphersuites is given below. Any attempt to enable a ciphersuite not on the list will fail with an exception.

Ciphersuites Usable in FIPS Mode

The following is the current list of ciphersuites which can be used by SunJSSE in FIPS mode with their names and the id as assigned in the TLS protocol provided that the configured cryptographic FIPS module supports the necessary algorithms. Note that although SunJSSE uses the prefix SSL_ in the name of some of these ciphersuites, this is for compatibility with earlier versions of the specification only. In FIPS mode, SunJSSE will always use TLS 1.0 or later and implement the ciphersuites as required by those specifications.

Name Id

SSL_RSA_WITH_3DES_EDE_CBC_SHA

0x000a

SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA

0x0016

TLS_RSA_WITH_AES_128_CBC_SHA

0x002f

TLS_DHE_DSS_WITH_AES_128_CBC_SHA

0x0032

TLS_DHE_RSA_WITH_AES_128_CBC_SHA

0x0033

TLS_RSA_WITH_AES_256_CBC_SHA

0x0035

TLS_DHE_DSS_WITH_AES_256_CBC_SHA

0x0038

TLS_DHE_RSA_WITH_AES_256_CBC_SHA

0x0039

TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA

0xC003

TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA

0xC004

TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA

0xC005

TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA

0xC008

TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

0xC009

TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

0xC00A

TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA

0xC00D

TLS_ECDH_RSA_WITH_AES_128_CBC_SHA

0xC00E

TLS_ECDH_RSA_WITH_AES_256_CBC_SHA

0xC00F

TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA

0xC012

TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

0xC013

TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

0xC014

TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA

0xC017

TLS_ECDH_anon_WITH_AES_128_CBC_SHA

0xC018

TLS_ECDH_anon_WITH_AES_256_CBC_SHA

0xC019

Conclusion

When SunJSSE is configured in FIPS 140 compliant mode together with an appropriate FIPS 140 certified cryptographic provider, for example Network Security Services (NSS) in its FIPS mode, SunJSSE is FIPS 140 compliant.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JSSE Reference Guide

Documentation Contents

Java Secure Socket Extension (JSSE) Reference Guide

This guide covers the following topics:

Skip Navigation Links
  • Introduction
    • Features and Benefits
    • JSSE Standard API
    • SunJSSE Provider
    • Related Documentation
  • The JRE Installation Directory
  • Terms and Definitions
  • Secure Sockets Layer (SSL) Protocol Overview
    • Why Use SSL?
    • How SSL Works
  • JSSE Classes and Interfaces
    • Core Classes and Interfaces
      • SocketFactory and ServerSocketFactory Classes
      • SSLSocketFactory and SSLServerSocketFactory Classes
      • SSLSocket and SSLServerSocket Classes
      • SSLEngine Class
      • SSLSession and ExtendedSSLSession Interfaces
      • HttpsURLConnection Class
    • Support Classes and Interfaces
      • SSLContext Class
      • TrustManager Interface
      • TrustManagerFactory Class
      • X509TrustManager Interface
      • X509ExtendedTrustManager Class
      • KeyManager Interface
      • KeyManagerFactory Class
      • X509KeyManager Interface
      • X509ExtendedKeyManager Class
      • Relationship Between a TrustManager and a KeyManager
    • Secondary Support Classes and Interfaces
      • SSLParameters Class
        • Cipher Suite Preference
      • SSLSessionContext Interface
      • SSLSessionBindingListener Interface
      • SSLSessionBindingEvent Class
      • HandShakeCompletedListener Interface
      • HandShakeCompletedEvent Class
      • HostnameVerifier Interface
      • X509Certificate Class
      • AlgorithmConstraints Interface
      • StandardConstants Class
      • SNIServerName Class
      • SNIMatcher Class
      • SNIHostName Class
  • Customizing JSSE
  • Transport Layer Security (TLS) Renegotiation Issue
    • Phased Approach to Fixing This Issue
    • Description of the Phase 2 Fix
    • Workarounds and Alternatives to SSL/TLS Renegotiation
    • Implementation Details
    • Description of the Phase 1 Fix
  • Hardware Acceleration and Smartcard Support
    • Configuring JSSE to Use Smartcards as Keystores and Truststores
    • Multiple and Dynamic Keystores
  • Kerberos Cipher Suites
    • Kerberos Requirements
    • Peer Identity Information
    • Security Manager
  • Additional Keystore Formats (PKCS12)
  • Server Name Indication (SNI) Extension
  • Troubleshooting
    • Configuration Problems
    • Debugging Utilities
  • Code Examples
    • Converting an Unsecure Socket to a Secure Socket
    • Running the JSSE Sample Code
    • Creating a Keystore to Use with JSSE
    • Using the Server Name Indication (SNI) Extension
  • Appendix A: Standard Names
  • Appendix B: Provider Pluggability

Introduction

Data that travels across a network can easily be accessed by someone who is not the intended recipient. When the data includes private information, such as passwords and credit card numbers, steps must be taken to make the data unintelligible to unauthorized parties. It is also important to ensure that the data has not been modified, either intentionally or unintentionally, during transport. The Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols were designed to help protect the privacy and integrity of data while it is being transferred across a network.

The Java Secure Socket Extension (JSSE) enables secure Internet communications. It provides a framework and an implementation for a Java version of the SSL and TLS protocols and includes functionality for data encryption, server authentication, message integrity, and optional client authentication. Using JSSE, developers can provide for the secure passage of data between a client and a server running any application protocol (such as HTTP, Telnet, or FTP) over TCP/IP. For an introduction to SSL, see Secure Sockets Layer (SSL) Protocol Overview.

By abstracting the complex underlying security algorithms and handshaking mechanisms, JSSE minimizes the risk of creating subtle but dangerous security vulnerabilities. Furthermore, it simplifies application development by serving as a building block that developers can integrate directly into their applications.

JSSE provides both an application programming interface (API) framework and an implementation of that API. The JSSE API supplements the core network and cryptographic services defined by the java.security and java.net packages by providing extended networking socket classes, trust managers, key managers, SSL contexts, and a socket factory framework for encapsulating socket creation behavior. Because the SSLSocket class is based on a blocking I/O model, the Java Development Kit (JDK) includes a nonblocking SSLEngine class to enable implementations to choose their own I/O methods.

The JSSE API is capable of supporting SSL versions 2.0 and 3.0 and TLS version 1.0. These security protocols encapsulate a normal bidirectional stream socket, and the JSSE API adds transparent support for authentication, encryption, and integrity protection. The JSSE implementation shipped with the JDK supports SSL 3.0 and TLS 1.0. It does not implement SSL 2.0.

JSSE is a security component of the Java SE platform, and is based on the same design principles found elsewhere in the Java Cryptography Architecture (JCA) framework. This framework for cryptography-related security components allows them to have implementation independence and, whenever possible, algorithm independence. JSSE uses the cryptographic service providers defined by the JCA framework.

Other security components in the Java SE platform include the Java Authentication and Authorization Service (JAAS) and the Java Security Tools. JSSE encompasses many of the same concepts and algorithms as those in JCA but automatically applies them underneath a simple stream socket API.

The JSSE API was designed to allow other SSL/TLS protocol and Public Key Infrastructure (PKI) implementations to be plugged in seamlessly. Developers can also provide alternative logic to determine if remote hosts should be trusted or what authentication key material should be sent to a remote host.

Features and Benefits

JSSE includes the following important features:

  • Included as a standard component of the JDK
  • Extensible, provider-based architecture
  • Implemented in 100% pure Java
  • Provides API support for SSL versions 2.0 and 3.0, TLS 1.0 and later, and an implementation of SSL 3.0 and TLS 1.0
  • Includes classes that can be instantiated to create secure channels (SSLSocket, SSLServerSocket, and SSLEngine)
  • Provides support for cipher suite negotiation, which is part of the SSL handshaking used to initiate or verify secure communications
  • Provides support for client and server authentication, which is part of the normal SSL handshaking
  • Provides support for HTTP encapsulated in the SSL protocol, which allows access to data such as web pages using HTTPS
  • Provides server session management APIs to manage memory-resident SSL sessions
  • Provides support for several cryptographic algorithms commonly used in cipher suites, including those listed in Table 1.
Table 1: Cryptographic Functionality Available in JSSE
Cryptographic Algorithm Footnote 1 | Cryptographic Process | Key Lengths (Bits)
Rivest Shamir Adleman (RSA) | Authentication and key exchange | 512 and larger
Rivest Cipher 4 (RC4) | Bulk encryption | 128 128 (40 effective)
Data Encryption Standard (DES) | Bulk encryption | 64 (56 effective) 64 (40 effective)
Triple DES (3DES) | Bulk encryption | 192 (112 effective)
Advanced Encryption Standard (AES) | Bulk encryption | 256 Footnote 2 128
Diffie-Hellman (DH) | Key agreement | 1024 512
Digital Signature Algorithm (DSA) | Authentication | 1024

Footnote 1 The SunJSSE implementation uses the JCA for all its cryptographic algorithms.

Footnote 2 Cipher suites that use AES_256 require installation of the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. See Java SE Download Page.

JSSE Standard API

The JSSE standard API, available in the javax.net and javax.net.ssl packages, provides:

  • Secure sockets and server sockets.
  • A nonblocking engine for producing and consuming streams of SSL/TLS data (SSLEngine).
  • Factories for creating sockets, server sockets, SSL sockets, and SSL server sockets. By using socket factories, you can encapsulate socket creation and configuration behavior.
  • A class representing a secure socket context that acts as a factory for secure socket factories and engines.
  • Key and trust manager interfaces (including X.509-specific key and trust managers), and factories that can be used for creating them.
  • A class for secure HTTP URL connections (HTTPS).

SunJSSE Provider

Oracle's implementation of Java SE includes a JSSE provider named SunJSSE, which comes preinstalled and preregistered with the JCA. This provider supplies the following cryptographic services:

  • An implementation of the SSL 3.0 and TLS 1.0 security protocols.
  • An implementation of the most common SSL and TLS cipher suites, which encompass a combination of authentication, key agreement, encryption, and integrity protection.
  • An implementation of an X.509-based key manager that chooses appropriate authentication keys from a standard JCA keystore.
  • An implementation of an X.509-based trust manager that implements rules for certificate chain path validation.
  • An implementation of PKCS12 as JCA keystore type "pkcs12". Storing trust anchors in PKCS12 is not supported. Users should store trust anchors in the Java keystore (JKS) format and save private keys in PKCS12 format.

More information about this provider is available in the SunJSSE section of the Oracle Providers Documentation.

Related Documentation

The following list contains links to online documentation and names of books about related subjects:

  • JSSE API Documentation
    • javax.net package
    • javax.net.ssl package
    • javax.security.cert package
  • Java SE Security
    • The Java SE Security Documentation index page
    • The Java SE Security home page
    • The Security Features in Java SE trail of the Java Tutorial
    • Java PKI Programmer's Guide
    • Inside Java 2 Platform Security, Second Edition: Architecture, API Design and Implementation
  • Cryptography
    • The Cryptography and Security page by Dr. Ronald L. Rivest (no longer maintained)
    • Applied Cryptography, Second Edition by Bruce Schneier. John Wiley and Sons, Inc., 1996.
    • Cryptography Theory and Practice by Doug Stinson. CRC Press, Inc., 1995. Third edition published in 2005.
    • Cryptography & Network Security: Principles & Practice by William Stallings. Prentice Hall, 1998. Fifth edition published in 2010.
  • Secure Sockets Layer (SSL)
    • The SSL Protocol version 3.0 Internet Draft
    • The TLS Protocol Version 1.0 RFC
    • HTTP Over TLS RFC
    • SSL and TLS: Designing and Building Secure Systems by Eric Rescorla. Addison Wesley Professional, 2000.
    • SSL and TLS Essentials: Securing the Web by Stephen Thomas. John Wiley and Sons, Inc., 2000.
    • Java 2 Network Security, Second Edition, by Marco Pistoia, Duane F Reller, Deepak Gupta, Milind Nagnur, and Ashok K Ramani. Prentice Hall, 1999.
  • U.S. Encryption Policies
    • U.S. Department of Commerce: http://www.commerce.gov/
    • Computer Systems Public Policy http://www.techceocouncil.org/
    • Federal Information Processing Standards Publications (FIPS PUBS): http://csrc.nist.gov/publications/PubsFIPS.html
    • Revised U.S. Encryption Export Control Regulations: http://epic.org/crypto/export_controls/regs_1_00.html

The Java Runtime Environment (JRE) Installation Directory

The java-home variable placeholder is used throughout this document to refer to the directory where the Java Runtime Environment (JRE) is installed. This directory is determined based on whether you are running JSSE with or without the JDK installed. The JDK includes the JRE, but it is located on a different level in the file hierarchy.

To see the default location of java-home for different installations, refer to Table 2.

Table 2: The JRE Installation Directory
Operating System | JDK | JRE
Solaris/Linux | ~/jdk1.8.0/jre | ~/jre1.8.0
Windows | C:\jdk1.8.0\jre | C:\jre1.8.0

Note: The tilde (~) in the path name represents the current user's home directory on Solaris, Linux, or Mac OS X operating systems.

Terms and Definitions

Several terms relating to cryptography are used within this document. This section defines some of these terms.

authentication

The process of confirming the identity of a party with whom one is communicating.

cipher suite

A combination of cryptographic parameters that define the security algorithms and key sizes used for authentication, key agreement, encryption, and integrity protection.

certificate

A digitally signed statement vouching for the identity and public key of an entity (person, company, and so on). Certificates can either be self-signed or issued by a Certificate Authority (CA) â€” an entity that is trusted to issue valid certificates for other entities. Well-known CAs include VeriSign, Entrust, and GTE CyberTrust. X509 is a common certificate format that can be managed by the JDK's keytool.

cryptographic hash function

An algorithm that is used to produce a relatively small fixed-size string of bits (called a hash) from an arbitrary block of data. A cryptographic hash function is similar to a checksum and has three primary characteristics: it is a one-way function, meaning that it is not possible to produce the original data from the hash; a small change in the original data produces a large change in the resulting hash; and it does not require a cryptographic key.

Cryptographic Service Provider

Sometimes referred to simply as provider for short, the Java Cryptography Architecture (JCA) defines it as a package (or set of packages) that implements one or more engine classes for specific cryptographic algorithms. An engine class defines a cryptographic service in an abstract fashion without a concrete implementation.

decryption

See encryption/decryption.

digital signature

A digital equivalent of a handwritten signature. It is used to ensure that data transmitted over a network was sent by whoever claims to have sent it and that the data has not been modified in transit. For example, an RSA-based digital signature is calculated by first computing a cryptographic hash of the data and then encrypting the hash with the sender's private key.

encryption/decryption

Encryption is the process of using a complex algorithm to convert an original message (cleartext) to an encoded message (ciphertext) that is unintelligible unless it is decrypted. Decryption is the inverse process of producing cleartext from ciphertext.

The algorithms used to encrypt and decrypt data typically come in two categories: secret key (symmetric) cryptography and public key (asymmetric) cryptography.

handshake protocol

The negotiation phase during which the two socket peers agree to use a new or existing session. The handshake protocol is a series of messages exchanged over the record protocol. At the end of the handshake, new connection-specific encryption and integrity protection keys are generated based on the key agreement secrets in the session.

key agreement

A method by which two parties cooperate to establish a common key. Each side generates some data, which is exchanged. These two pieces of data are then combined to generate a key. Only those holding the proper private initialization data can obtain the final key. Diffie-Hellman (DH) is the most common example of a key agreement algorithm.

key exchange

A method by which keys are exchanged. One side generates a private key and encrypts it using the peer's public key (typically RSA). The data is transmitted to the peer, who decrypts the key using the corresponding private key.

key manager/trust manager

Key managers and trust managers use keystores for their key material. A key manager manages a keystore and supplies public keys to others as needed (for example, for use in authenticating the user to others). A trust manager decides who to trust based on information in the truststore it manages.

keystore/truststore

A keystore is a database of key material. Key material is used for a variety of purposes, including authentication and data integrity. Various types of keystores are available, including PKCS12 and Oracle's JKS.

Generally speaking, keystore information can be grouped into two categories: key entries and trusted certificate entries. A key entry consists of an entity's identity and its private key, and can be used for a variety of cryptographic purposes. In contrast, a trusted certificate entry contains only a public key in addition to the entity's identity. Thus, a trusted certificate entry cannot be used where a private key is required, such as in a javax.net.ssl.KeyManager. In the JDK implementation of JKS, a keystore may contain both key entries and trusted certificate entries.

A truststore is a keystore that is used when making decisions about what to trust. If you receive data from an entity that you already trust, and if you can verify that the entity is the one that it claims to be, then you can assume that the data really came from that entity.

An entry should only be added to a truststore if the user trusts that entity. By either generating a key pair or by importing a certificate, the user gives trust to that entry. Any entry in the truststore is considered a trusted entry.

It may be useful to have two different keystore files: one containing just your key entries, and the other containing your trusted certificate entries, including CA certificates. The former contains private information, whereas the latter does not. Using two files instead of a single keystore file provides a cleaner separation of the logical distinction between your own certificates (and corresponding private keys) and others' certificates. To provide more protection for your private keys, store them in a keystore with restricted access, and provide the trusted certificates in a more publicly accessible keystore if needed.

message authentication code (MAC)

Provides a way to check the integrity of information transmitted over or stored in an unreliable medium, based on a secret key. Typically, MACs are used between two parties that share a secret key in order to validate information transmitted between these parties.

A MAC mechanism that is based on cryptographic hash functions is referred to as HMAC. HMAC can be used with any cryptographic hash function, such as Message Digest 5 (MD5) and Secure Hash Algorithm (SHA), in combination with a secret shared key. HMAC is specified in RFC 2104.

public-key cryptography

A cryptographic system that uses an encryption algorithm in which two keys are produced. One key is made public, whereas the other is kept private. The public key and the private key are cryptographic inverses; what one key encrypts only the other key can decrypt. Public-key cryptography is also called asymmetric cryptography.

Record Protocol

A protocol that packages all data (whether application-level or as part of the handshake process) into discrete records of data much like a TCP stream socket converts an application byte stream into network packets. The individual records are then protected by the current encryption and integrity protection keys.

secret-key cryptography

A cryptographic system that uses an encryption algorithm in which the same key is used both to encrypt and decrypt the data. Secret-key cryptography is also called symmetric cryptography.

session

A named collection of state information including authenticated peer identity, cipher suite, and key agreement secrets that are negotiated through a secure socket handshake and that can be shared among multiple secure socket instances.

trust manager

See key manager/trust manager.

truststore

See keystore/truststore.

Secure Sockets Layer (SSL) Protocol Overview

Secure Sockets Layer (SSL) is the most widely used protocol for implementing cryptography on the web. SSL uses a combination of cryptographic processes to provide secure communication over a network. This section provides an introduction to SSL and the cryptographic processes it uses.

SSL provides a secure enhancement to the standard TCP/IP sockets protocol used for Internet communications. As shown in Table 3, the secure sockets layer is added between the transport layer and the application layer in the standard TCP/IP protocol stack. The application most commonly used with SSL is Hypertext Transfer Protocol (HTTP), the protocol for Internet web pages. Other applications, such as Net News Transfer Protocol (NNTP), Telnet, Lightweight Directory Access Protocol (LDAP), Interactive Message Access Protocol (IMAP), and File Transfer Protocol (FTP), can be used with SSL as well.

Note: There is currently no standard for secure FTP.

Table 3: TCP/IP Protocol Stack with SSL
TCP/IP Layer | Protocol
Application Layer | HTTP, NNTP, Telnet, FTP, and so on
Secure Sockets Layer | SSL
Transport Layer | TCP
Internet Layer | IP

SSL was developed by Netscape in 1994, and with input from the Internet community, has evolved to become a standard. It is now under the control of the international standards organization, the Internet Engineering Task Force (IETF). The IETF renamed SSL to Transport Layer Security (TLS), and released the first specification, version 1.0, in January 1999. TLS 1.0 is a modest upgrade to the most recent version of SSL, version 3.0. The differences between SSL 3.0 and TLS 1.0 are minor. TLS 1.1 was released in April 2006, and TLS 1.2 in August 2008. However, these updated versions are not as widely supported as TLS 1.0 and SSL 3.0.

Why Use SSL?

Transferring sensitive information over a network can be risky due to the following issues:

  • You cannot always be sure that the entity with whom you are communicating is really who you think it is.
  • Network data can be intercepted, so it is possible that it can be read by an unauthorized third party, sometimes known as an attacker.
  • An attacker who intercepts data may be able to modify it before sending it on to the receiver.

SSL addresses each of these issues. It addresses the first issue by optionally allowing each of two communicating parties to ensure the identity of the other party in a process called authentication. Once the parties are authenticated, SSL provides an encrypted connection between the two parties for secure message transmission. Encrypting the communication between the two parties provides privacy and therefore addresses the second issue. The encryption algorithms used with SSL include a secure hash function, which is similar to a checksum. This ensures that data is not modified in transit. The secure hash function addresses the third issue of data integrity.

Note: Both authentication and encryption are optional, and depend on the the negotiated cipher suites between the two entities.

An e-commerce transaction is an obvious example of when to use SSL. In an e-commerce transaction, it would be foolish to assume that you can guarantee the identity of the server with whom you are communicating. It would be easy enough for someone to create a phony web site promising great services if only you enter your credit card number. SSL allows you, the client, to authenticate the identity of the server. It also allows the server to authenticate the identity of the client, although in Internet transactions, this is seldom done.

Once the client and the server are comfortable with each other's identity, SSL provides privacy and data integrity through the encryption algorithms that it uses. This allows sensitive information, such as credit card numbers, to be transmitted securely over the Internet.

Although SSL provides authentication, privacy, and data integrity, it does not provide nonrepudiation services. Nonrepudiation means that an entity that sends a message cannot later deny sending it. When the digital equivalent of a signature is associated with a message, the communication can later be proved. SSL alone does not provide nonrepudiation.

How SSL Works

One of the reasons that SSL is effective is that it uses several different cryptographic processes. SSL uses public-key cryptography to provide authentication, and secret-key cryptography with digital signatures to provide for privacy and data integrity. Before you can understand SSL, it is helpful to understand these cryptographic processes.

Cryptographic Processes

The primary purpose of cryptography is to make it difficult for an unauthorized third party to access and understand private communication between two parties. It is not always possible to restrict all unauthorized access to data, but private data can be made unintelligible to unauthorized parties through the process of encryption. Encryption uses complex algorithms to convert the original message (cleartext) to an encoded message (ciphertext). The algorithms used to encrypt and decrypt data that is transferred over a network typically come in two categories: secret-key cryptography and public-key cryptography. These forms of cryptography are explained in the following subsections.

Both secret-key cryptography and public-key cryptography depend on the use of an agreed-upon cryptographic key or pair of keys. A key is a string of bits that is used by the cryptographic algorithm or algorithms during the process of encrypting and decrypting the data. A cryptographic key is like a key for a lock; only with the right key can you open the lock.

Safely transmitting a key between two communicating parties is not a trivial matter. A public key certificate enables a party to safely transmit its public key, while ensuring the receiver of the authenticity of the public key. Public key certificates are described in a later section.

The descriptions of the cryptographic processes that follow use conventions widely used by the security community: the two communicating parties are labeled with the names Alice and Bob. The unauthorized third party, also known as the attacker, is named Charlie.

Secret-Key Cryptography

With secret-key cryptography, both communicating parties, Alice and Bob, use the same key to encrypt and decrypt the messages. Before any encrypted data can be sent over the network, both Alice and Bob must have the key and must agree on the cryptographic algorithm that they will use for encryption and decryption.

One of the major problems with secret-key cryptography is the logistical issue of how to get the key from one party to the other without allowing access to an attacker. If Alice and Bob are securing their data with secret-key cryptography, and if Charlie gains access to their key, then Charlie can understand any secret messages he intercepts between Alice and Bob. Not only can Charlie decrypt Alice's and Bob's messages, but he can also pretend that he is Alice and send encrypted data to Bob. Bob will not know that the message came from Charlie, not Alice.

Once the problem of secret key distribution is solved, secret-key cryptography can be a valuable tool. The algorithms provide excellent security and encrypt data relatively quickly. The majority of the sensitive data sent in an SSL session is sent using secret-key cryptography.

Secret-key cryptography is also called symmetric cryptography because the same key is used to both encrypt and decrypt the data. Well-known secret-key cryptographic algorithms include the Data Encryption Standard (DES), Triple DES (3DES), Rivest Cipher 2 (RC2), and Rivest Cipher 4 (RC4).

Public-Key Cryptography

Public-key cryptography solves the logistical problem of key distribution by using both a public key and a private key. The public key can be sent openly through the network while the private key is kept private by one of the communicating parties. The public and the private keys are cryptographic inverses of each other; what one key encrypts, the other key will decrypt.

Assume that Bob wants to send a secret message to Alice using public-key cryptography. Alice has both a public key and a private key, so she keeps her private key in a safe place and sends her public key to Bob. Bob encrypts the secret message to Alice using Alice's public key. Alice can later decrypt the message with her private key.

If Alice encrypts a message using her private key and sends the encrypted message to Bob, then Bob can be sure that the data he receives comes from Alice; if Bob can decrypt the data with Alice's public key, the message must have been encrypted by Alice with her private key, and only Alice has Alice's private key. The problem is that anybody else can read the message as well because Alice's public key is public. Although this scenario does not allow for secure data communication, it does provide the basis for digital signatures. A digital signature is one of the components of a public key certificate, and is used in SSL to authenticate a client or a server. Public key certificates and digital signatures are described in later sections.

Public-key cryptography is also called asymmetric cryptography because different keys are used to encrypt and decrypt the data. A well-known public key cryptographic algorithm often used with SSL is the Rivest Shamir Adleman (RSA) algorithm. Another public key algorithm used with SSL that is designed specifically for secret key exchange is the Diffie-Hellman (DH) algorithm. Public-key cryptography requires extensive computations, making it very slow. It is therefore typically used only for encrypting small pieces of data, such as secret keys, rather than for the bulk of encrypted data communications.

Comparison Between Secret-Key and Public-Key Cryptography

Both secret-key cryptography and public-key cryptography have strengths and weaknesses. With secret-key cryptography, data can be encrypted and decrypted quickly, but because both communicating parties must share the same secret key information, the logistics of exchanging the key can be a problem. With public-key cryptography, key exchange is not a problem because the public key does not need to be kept secret, but the algorithms used to encrypt and decrypt data require extensive computations, and are therefore very slow.

Public Key Certificates

A public key certificate provides a safe way for an entity to pass on its public key to be used in asymmetric cryptography. The public key certificate avoids the following situation: if Charlie creates his own public key and private key, he can claim that he is Alice and send his public key to Bob. Bob will be able to communicate with Charlie, but Bob will think that he is sending his data to Alice.

A public key certificate can be thought of as the digital equivalent of a passport. It is issued by a trusted organization and provides identification for the bearer. A trusted organization that issues public key certificates is known as a Certificate Authority (CA). The CA can be likened to a notary public. To obtain a certificate from a CA, one must provide proof of identity. Once the CA is confident that the applicant represents the organization it says it represents, the CA signs the certificate attesting to the validity of the information contained within the certificate.

A public key certificate contains the following fields:

  • Issuer
    The CA that issued the certificate. If a user trusts the CA that issued the certificate, and if the certificate is valid, then the user can trust the certificate.
  • Period of validity
    A certificate has an expiration date. This date should be checked when verifying the validity of a certificate.
  • Subject
    Includes information about the entity that the certificate represents.
  • Subject's public key
    The primary piece of information that the certificate provides is the subject's public key. All the other fields are provided to ensure the validity of this key.
  • Signature
    The certificate is digitally signed by the CA that issued the certificate. The signature is created using the CA's private key and ensures the validity of the certificate. Because only the certificate is signed, not the data sent in the SSL transaction, SSL does not provide for nonrepudiation.

If Bob only accepts Alice's public key as valid when she sends it in a public key certificate, then Bob will not be fooled into sending secret information to Charlie when Charlie masquerades as Alice.

Multiple certificates may be linked in a certificate chain. When a certificate chain is used, the first certificate is always that of the sender. The next is the certificate of the entity that issued the sender's certificate. If more certificates are in the chain, then each is that of the authority that issued the previous certificate. The final certificate in the chain is the certificate for a root CA. A root CA is a public certificate authority that is widely trusted. Information for several root CAs is typically stored in the client's Internet browser. This information includes the CA's public key. Well-known CAs include VeriSign, Entrust, and GTE CyberTrust.

Cryptographic Hash Functions

When sending encrypted data, SSL typically uses a cryptographic hash function to ensure data integrity. The hash function prevents Charlie from tampering with data that Alice sends to Bob.

A cryptographic hash function is similar to a checksum. The main difference is that whereas a checksum is designed to detect accidental alterations in data, a cryptographic hash function is designed to detect deliberate alterations. When data is processed by a cryptographic hash function, a small string of bits, known as a hash, is generated. The slightest change to the message typically makes a large change in the resulting hash. A cryptographic hash function does not require a cryptographic key. Two hash functions often used with SSL are Message Digest 5 (MD5) and Secure Hash Algorithm (SHA). SHA was proposed by the U.S. National Institute of Standards and Technology (NIST).

Message Authentication Code

A message authentication code (MAC) is similar to a cryptographic hash, except that it is based on a secret key. When secret key information is included with the data that is processed by a cryptographic hash function, then the resulting hash is known as an HMAC.

If Alice wants to be sure that Charlie does not tamper with her message to Bob, then she can calculate an HMAC for her message and append the HMAC to her original message. She can then encrypt the message plus the HMAC using a secret key that she shares with Bob. When Bob decrypts the message and calculates the HMAC, he will be able to tell if the message was modified in transit. With SSL, an HMAC is used with the transmission of secure data.

Digital Signatures

Once a cryptographic hash is created for a message, the hash is encrypted with the sender's private key. This encrypted hash is called a digital signature.

The SSL Handshake

Communication using SSL begins with an exchange of information between the client and the server. This exchange of information is called the SSL handshake. The SSL handshake includes the following stages:

  1. Negotiating the cipher suite

    The SSL session begins with a negotiation between the client and the server as to which cipher suite they will use. A cipher suite is a set of cryptographic algorithms and key sizes that a computer can use to encrypt data. The cipher suite includes information about the public key exchange algorithms or key agreement algorithms, and cryptographic hash functions. The client tells the server which cipher suites it has available, and the server chooses the best mutually acceptable cipher suite.

  2. Authenticating the server's identity (optional)

    In SSL, the authentication step is optional, but in the example of an e-commerce transaction over the web, the client will generally want to authenticate the server. Authenticating the server allows the client to be sure that the server represents the entity that the client believes the server represents.

    To prove that a server belongs to the organization that it claims to represent, the server presents its public key certificate to the client. If this certificate is valid, then the client can be sure of the identity of the server.

    The client and server exchange information that allows them to agree on the same secret key. For example, with RSA, the client uses the server's public key, obtained from the public key certificate, to encrypt the secret key information. The client sends the encrypted secret key information to the server. Only the server can decrypt this message because the server's private key is required for this decryption.

  3. Agreeing on encryption mechanisms

    Both the client and the server now have access to the same secret key. With each message, they use the cryptographic hash function, chosen in the first step of the handshake, and shared secret information, to compute an HMAC that they append to the message. They then use the secret key and the secret key algorithm negotiated in the first step of the handshake to encrypt the secure data and the HMAC. The client and server can now communicate securely using their encrypted and hashed data.

The SSL Protocol

The previous section provides a high-level description of the SSL handshake, which is the exchange of information between the client and the server prior to sending the encrypted message. This section provides more detail.

Figure 1 shows the sequence of messages that are exchanged in the SSL handshake. Messages that are sent only in certain situations are noted as optional. Each of the SSL messages is described below the figure.

Figure 1: Sequence of Messages Exchanged in SSL Handshake
Sequence of messages exchanged in SSL handshake.

The SSL messages are sent in the following order:

  1. Client hello
    The client sends the server information including the highest version of SSL that it supports and a list of the cipher suites that it supports (TLS 1.0 is indicated as SSL 3.1). The cipher suite information includes cryptographic algorithms and key sizes.
  2. Server hello
    The server chooses the highest version of SSL and the best cipher suite that both the client and server support and sends this information to the client.
  3. Certificate (optional)
    The server sends the client a certificate or a certificate chain. A certificate chain typically begins with the server's public key certificate and ends with the certificate authority's root certificate. This message is optional, but is used whenever server authentication is required.
  4. Certificate request (optional)
    If the server must authenticate the client, then it sends the client a certificate request. In Internet applications, this message is rarely sent.
  5. Server key exchange (optional)
    The server sends the client a server key exchange message if the public key information from the certificate is not sufficient for key exchange. For example, in cipher suites based on Diffie-Hellman (DH), this message contains the server's DH public key.
  6. Server hello done
    The server tells the client that it is finished with its initial negotiation messages.
  7. Certificate (optional)
    If the server requested a certificate from the client, the client sends its certificate chain, just as the server did previously.

    Note: Only a few Internet server applications ask for a certificate from the client.

  8. Client key exchange
    The client generates information used to create a key to use for symmetric encryption. For RSA, the client then encrypts this key information with the server's public key and sends it to the server. For cipher suites based on DH, this message contains the client's DH public key.
  9. Certificate verify (optional)
    This message is sent by the client when the client presents a certificate as previously explained. Its purpose is to allow the server to complete the process of authenticating the client. When this message is used, the client sends information that it digitally signs using a cryptographic hash function. When the server decrypts this information with the client's public key, the server is able to authenticate the client.
  10. Change cipher spec
    The client sends a message telling the server to change to encrypted mode.
  11. Finished
    The client tells the server that it is ready for secure data communication to begin.
  12. Change cipher spec
    The server sends a message telling the client to change to encrypted mode.
  13. Finished
    The server tells the client that it is ready for secure data communication to begin. This is the end of the SSL handshake.
  14. Encrypted data
    The client and the server communicate using the symmetric encryption algorithm and the cryptographic hash function negotiated during the client hello and server hello, and using the secret key that the client sent to the server during the client key exchange. The handshake can be renegotiated at this time. See the next section for details.
  15. Close Messages
    At the end of the connection, each side sends a close_notify message to inform the peer that the connection is closed.

If the parameters generated during an SSL session are saved, then these parameters can sometimes be reused for future SSL sessions. Saving SSL session parameters allows encrypted communication to begin much more quickly.

Handshaking Again (Renegotiation)

Once the initial handshake is finished and application data is flowing, either side is free to initiate a new handshake at any time. An application might like to use a stronger cipher suite for especially critical operations, or a server application might want to require client authentication.

Regardless of the reason, the new handshake takes place over the existing encrypted session, and application data and handshake messages are interleaved until a new session is established.

Your application can initiate a new handshake by using one of the following methods:

  • SSLSocket.startHandshake()
  • SSLEngine.beginHandshake()

Note that a protocol flaw related to renegotiation was found in 2009. The protocol and the Java SE implementation have both been fixed. For more information, see Transport Layer Security (TLS) Renegotiation Issue.

Cipher Suite Choice and Remote Entity Verification

The SSL/TLS protocols define a specific series of steps to ensure a protected connection. However, the choice of cipher suite directly affects the type of security that the connection enjoys. For example, if an anonymous cipher suite is selected, then the application has no way to verify the remote peer's identity. If a suite with no encryption is selected, then the privacy of the data cannot be protected. Additionally, the SSL/TLS protocols do not specify that the credentials received must match those that peer might be expected to send. If the connection were somehow redirected to a rogue peer, but the rogue's credentials were acceptable based on the current trust material, then the connection would be considered valid.

When using raw SSLSocket and SSLEngine classes, you should always check the peer's credentials before sending any data. The SSLSocket and SSLEngine classes do not automatically verify that the host name in a URL matches the host name in the peer's credentials. An application could be exploited with URL spoofing if the host name is not verified.

Protocols such as HTTPS (HTTP Over TLS) do require host name verification. Applications can use HostnameVerifier to override the default HTTPS host name rules. See HttpsURLConnection for more information.

JSSE Classes and Interfaces

To communicate securely, both sides of the connection must be SSL-enabled. In the JSSE API, the endpoint classes of the connection are SSLSocket and SSLEngine. In Figure 2, the major classes used to create SSLSocket and SSLEngine are laid out in a logical ordering. The text following the diagram, explains the contents of the illustration.

Figure 2: Classes Used to Create SSLSocket and SSLEngine
Diagram of classes used to create SSLSocket and SSLEngine

An SSLSocket is created either by an SSLSocketFactory or by an SSLServerSocket accepting an inbound connection. In turn, an SSLServerSocket is created by an SSLServerSocketFactory. Both SSLSocketFactory and SSLServerSocketFactory objects are created by an SSLContext. An SSLEngine is created directly by an SSLContext, and relies on the application to handle all I/O.

Note: When using raw SSLSocket or SSLEngine classes, you should always check the peer's credentials before sending any data. The SSLSocket and SSLEngine classes do not automatically verify, for example, that the host name in a URL matches the host name in the peer's credentials. An application could be exploited with URL spoofing if the host name is not verified.

There are two ways to obtain and initialize an SSLContext:

  • The simplest way is to call the static getDefault() method on either the SSLSocketFactory or SSLServerSocketFactory class. This method creates a default SSLContext with a default KeyManager, TrustManager, and SecureRandom (a secure random number generator). A default KeyManagerFactory and TrustManagerFactory are used to create the KeyManager and TrustManager, respectively. The key material used is found in the default keystore and truststore, as determined by system properties described in Customizing the Default Keystores and Truststores, Store Types, and Store Passwords.
  • The approach that gives the caller the most control over the behavior of the created context is to call the static method getInstance() on the SSLContext class, and then initialize the context by calling the instance's proper init() method. One variant of the init() method takes three arguments: an array of KeyManager objects, an array of TrustManager objects, and a SecureRandom object. The KeyManager and TrustManager objects are created by either implementing the appropriate interfaces or using the KeyManagerFactory and TrustManagerFactory classes to generate implementations. The KeyManagerFactory and TrustManagerFactory can then each be initialized with key material contained in the KeyStore passed as an argument to the init() method of the TrustManagerFactory or KeyManagerFactory classes. Finally, the getTrustManagers() method (in TrustManagerFactory) and getKeyManagers() method (in KeyManagerFactory) can be called to obtain the array of trust managers or key managers, one for each type of trust or key material.

Once an SSL connection is established, an SSLSession is created which contains various information, such as identities established and cipher suite used. The SSLSession is then used to describe an ongoing relationship and state information between two entities. Each SSL connection involves one session at a time, but that session may be used on many connections between those entities, simultaneously or sequentially.

Core Classes and Interfaces

The core JSSE classes are part of the javax.net and javax.net.ssl packages.

SocketFactory and ServerSocketFactory Classes

The abstract javax.net.SocketFactory class is used to create sockets. Subclasses of this class are factories that create particular subclasses of sockets and thus provide a general framework for the addition of public socket-level functionality. For example, see SSLSocketFactory and SSLServerSocketFactory.

The abstract javax.net.ServerSocketFactory class is analogous to the SocketFactory class, but is used specifically for creating server sockets.

Socket factories are a simple way to capture a variety of policies related to the sockets being constructed, producing such sockets in a way that does not require special configuration of the code that asks for the sockets:

  • Due to polymorphism of both factories and sockets, different kinds of sockets can be used by the same application code just by passing different kinds of factories.
  • Factories can themselves be customized with parameters used in socket construction. For example, factories could be customized to return sockets with different networking timeouts or security parameters already configured.
  • The sockets returned to the application can be subclasses of java.net.Socket (or javax.net.ssl.SSLSocket), so that they can directly expose new APIs for features such as compression, security, record marking, statistics collection, or firewall tunneling.

SSLSocketFactory and SSLServerSocketFactory Classes

The javax.net.ssl.SSLSocketFactory class acts as a factory for creating secure sockets. This class is an abstract subclass of javax.net.SocketFactory.

Secure socket factories encapsulate the details of creating and initially configuring secure sockets. This includes authentication keys, peer certificate validation, enabled cipher suites, and the like.

The javax.net.ssl.SSLServerSocketFactory class is analogous to the SSLSocketFactory class, but is used specifically for creating server sockets.

Obtaining an SSLSocketFactory

The following ways can be used to obtain an SSLSocketFactory:

  • Get the default factory by calling the SSLSocketFactory.getDefault() static method.
  • Receive a factory as an API parameter. That is, code that must create sockets but does not care about the details of how the sockets are configured can include a method with an SSLSocketFactory parameter that can be called by clients to specify which SSLSocketFactory to use when creating sockets (for example, javax.net.ssl.HttpsURLConnection).
  • Construct a new factory with specifically configured behavior.

The default factory is typically configured to support server authentication only so that sockets created by the default factory do not leak any more information about the client than a normal TCP socket would.

Many classes that create and use sockets do not need to know the details of socket creation behavior. Creating sockets through a socket factory passed in as a parameter is a good way of isolating the details of socket configuration, and increases the reusability of classes that create and use sockets.

You can create new socket factory instances either by implementing your own socket factory subclass or by using another class which acts as a factory for socket factories. One example of such a class is SSLContext, which is provided with the JSSE implementation as a provider-based configuration class.

SSLSocket and SSLServerSocket Classes

The javax.net.ssl.SSLSocket class is a subclass of the standard Java java.net.Socket class. It supports all of the standard socket methods and adds methods specific to secure sockets. Instances of this class encapsulate the SSLContext under which they were created. There are APIs to control the creation of secure socket sessions for a socket instance, but trust and key management are not directly exposed.

The javax.net.ssl.SSLServerSocket class is analogous to the SSLSocket class, but is used specifically for creating server sockets.

To prevent peer spoofing, you should always verify the credentials presented to an SSLSocket.

Note: Due to the complexity of the SSL and TLS protocols, it is difficult to predict whether incoming bytes on a connection are handshake or application data, and how that data might affect the current connection state (even causing the process to block). In the Oracle JSSE implementation, the available() method on the object obtained by SSLSocket.getInputStream() returns a count of the number of application data bytes successfully decrypted from the SSL connection but not yet read by the application.

Obtaining an SSLSocket

Instances of SSLSocket can be obtained in one of the following ways:
  • An SSLSocket can be created by an instance of SSLSocketFactory via one of the several createSocket() methods of that class.
  • An SSLSocket can be created through the accept() method of the SSLServerSocket class.

SSLEngine Class

SSL/TLS is becoming increasingly popular. It is being used in a wide variety of applications across a wide range of computing platforms and devices. Along with this popularity come demands to use SSL/TLS with different I/O and threading models to satisfy the applications' performance, scalability, footprint, and other requirements. There are demands to use SSL/TLS with blocking and nonblocking I/O channels, asynchronous I/O, arbitrary input and output streams, and byte buffers. There are demands to use it in highly scalable, performance-critical environments, requiring management of thousands of network connections.

Abstraction of the I/O transport mechanism using the SSLEngine class in Java SE allows applications to use the SSL/TLS protocols in a transport-independent way, and thus frees application developers to choose transport and computing models that best meet their needs. Not only does this abstraction allow applications to use nonblocking I/O channels and other I/O models, it also accommodates different threading models. This effectively leaves the I/O and threading decisions up to the application developer. Because of this flexibility, the application developer must manage I/O and threading (complex topics in and of themselves), as well as have some understanding of the SSL/TLS protocols. The abstraction is therefore an advanced API: beginners should use SSLSocket.

Users of other Java programming language APIs such as the Java Generic Security Services (Java GSS) and the Java Simple Authentication Security Layer (Java SASL) will notice similarities in that the application is also responsible for transporting data.

The core class is javax.net.ssl.SSLEngine. It encapsulates an SSL/TLS state machine and operates on inbound and outbound byte buffers supplied by the user of the SSLEngine class. The diagram in Figure 3 illustrates the flow of data from the application, through SSLEngine, to the transport mechanism, and back.

Figure 3: Flow of Data Through SSLEngine
Flow of data through SSLEngine

The application, shown on the left, supplies application (plaintext) data in an application buffer and passes it to SSLEngine. The SSLEngine object processes the data contained in the buffer, or any handshaking data, to produce SSL/TLS encoded data and places it to the network buffer supplied by the application. The application is then responsible for using an appropriate transport (shown on the right) to send the contents of the network buffer to its peer. Upon receiving SSL/TLS encoded data from its peer (via the transport), the application places the data into a network buffer and passes it to SSLEngine. The SSLEngine object processes the network buffer's contents to produce handshaking data or application data.

An instance of the SSLEngine class can be in one of the following states:

  • Creation: Ready to be configured
  • Initial handshaking: Perform authentication and negotiate communication parameters
  • Application data: Ready for application exchange
  • Rehandshaking: Renegotiate communications parameters/authentication; handshaking data may be mixed with application data
  • Closure: Ready to shut down the connection

Creating an SSLEngine Object

To create an SSLEngine object, you use the SSLContext.createSSLEngine() method. You must configure the engine to act as a client or a server, and set other configuration parameters, such as which cipher suites to use and whether to require client authentication.

Example 1 illustrates how to create an SSLEngine object.

Note: The server name and port number are not used for communicating with the server (all transport is the responsibility of the application). They are hints to the JSSE provider to use for SSL session caching, and for Kerberos-based cipher suite implementations to determine which server credentials should be obtained.

Example 1: Creating an SSLEngine object
import javax.net.ssl.*;
import java.security.*;

// Create and initialize the SSLContext with key material
char[] passphrase = "passphrase".toCharArray();

// First initialize the key and trust material
KeyStore ksKeys = KeyStore.getInstance("JKS");
ksKeys.load(new FileInputStream("testKeys"), passphrase);
KeyStore ksTrust = KeyStore.getInstance("JKS");
ksTrust.load(new FileInputStream("testTrust"), passphrase);

// KeyManagers decide which key material to use
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ksKeys, passphrase);

// TrustManagers decide whether to allow connections
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init(ksTrust);

sslContext = SSLContext.getInstance("TLS");
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);

// Create the engine
SSLEngine engine = sslContext.createSSLengine(hostname, port);

// Use as client
engine.setUseClientMode(true);

Generating and Processing SSL/TLS Data

The two main SSLEngine methods are wrap() and unwrap(). They are responsible for generating and consuming network data respectively. Depending on the state of the SSLEngine object, this data might be handshake or application data.

Each SSLEngine object has several phases during its lifetime. Before application data can be sent or received, the SSL/TLS protocol requires a handshake to establish cryptographic parameters. This handshake requires a series of back-and-forth steps by the SSLEngine object. The "SSL Handshake" section provides more details about the handshake itself.

During the initial handshaking, the wrap() and unwrap() methods generate and consume handshake data, and the application is responsible for transporting the data. The wrap() and unwrap() method sequence is repeated until the handshake is finished. Each SSLEngine operation generates an instance of the SSLEngineResult class, in which the SSLEngineResult.HandshakeStatus field is used to determine what operation must occur next to move the handshake along.

Table 4 shows the sequence of methods called during a typical handshake, with corresponding messages and statuses.

Table 4: Typical Handshake
Client | SSL/TLS Message | HandshakeStatus
wrap() | ClientHello | NEED_UNWRAP
unwrap() | ServerHello/Cert/ServerHelloDone | NEED_WRAP
wrap() | ClientKeyExchange | NEED_WRAP
wrap() | ChangeCipherSpec | NEED_WRAP
wrap() | Finished | NEED_UNWRAP
unwrap() | ChangeCipherSpec | NEED_UNWRAP
unwrap() | Finished | FINISHED

When handshaking is complete, further calls to wrap() will attempt to consume application data and package it for transport. The unwrap() method will attempt the opposite.

To send data to the peer, the application first supplies the data that it wants to send via SSLEngine.wrap() to obtain the corresponding SSL/TLS encoded data. The application then sends the encoded data to the peer using its chosen transport mechanism. When the application receives the SSL/TLS encoded data from the peer via the transport mechanism, it supplies this data to the SSLEngine via SSLEngine.unwrap() to obtain the plaintext data sent by the peer.

Example 2 shows an SSL application that uses a nonblocking SocketChannel to communicate with its peer.

Note: The example can be made more robust and scalable by using a Selector with the nonblocking SocketChannel.

In Example 2, the string hello is sent to the peer by encoding it using the SSLEngine created in Example 1. It uses information from the SSLSession to determine how large the byte buffers should be.

Example 2: Using a Nonblocking SocketChannel
// Create a nonblocking socket channel
SocketChannel socketChannel = SocketChannel.open();
socketChannel.configureBlocking(false);
socketChannel.connect(new InetSocketAddress(hostname, port));

// Complete connection
while (!socketChannel.finishedConnect()) {
    // do something until connect completed
}

// Create byte buffers to use for holding application and encoded data
SSLSession session = engine.getSession();
ByteBuffer myAppData = ByteBuffer.allocate(session.getApplicationBufferSize());
ByteBuffer myNetData = ByteBuffer.allocate(session.getPacketBufferSize());
ByteBuffer peerAppData = ByteBuffer.allocate(session.getApplicationBufferSize());
ByteBuffer peerNetData = ByteBuffer.allocate(session.getPacketBufferSize());

// Do initial handshake
doHandshake(socketChannel, engine, myNetData, peerNetData);

myAppData.put("hello".getBytes());
myAppData.flip();

while (myAppData.hasRemaining()) {
    // Generate SSL/TLS encoded data (handshake or application data)
    SSLEngineResult res = engine.wrap(myAppData, myNetData);

    // Process status of call
    if (res.getStatus() == SSLEngineResult.Status.OK) {
        myAppData.compact();

        // Send SSL/TLS encoded data to peer
        while(myNetData.hasRemaining()) {
            int num = socketChannel.write(myNetData);
            if (num == 0) {
                // no bytes written; try again later
            }
        }
    }

    // Handle other status:  BUFFER_OVERFLOW, CLOSED
    ...
}

Example 3 illustrates how to read data from the same nonblocking SocketChannel and extract the plaintext data from it by using the SSLEngine created in Example 1. Each iteration of this code may or may not produce plaintext data, depending on whether handshaking is in progress.

Example 3: Reading Data From Nonblocking SocketChannel
// Read SSL/TLS encoded data from peer
int num = socketChannel.read(peerNetData);
if (num == -1) {
    // The channel has reached end-of-stream
} else if (num == 0) {
    // No bytes read; try again ...
} else {
    // Process incoming data
    peerNetData.flip();
    res = engine.unwrap(peerNetData, peerAppData);

    if (res.getStatus() == SSLEngineResult.Status.OK) {
        peerNetData.compact();

        if (peerAppData.hasRemaining()) {
            // Use peerAppData
        }
    }
    // Handle other status:  BUFFER_OVERFLOW, BUFFER_UNDERFLOW, CLOSED
    ...
}

Understanding SSLEngine Operation Statuses

To indicate the status of the engine and what actions the application should take, the SSLEngine.wrap() and SSLEngine.unwrap() methods return an SSLEngineResult instance, as shown in Example 2. This SSLEngineResult object contains two pieces of status information: the overall status of the engine and the handshaking status.

The possible overall statuses are represented by the SSLEngineResult.Status enum. The following statuses are available:

  • OK
    There was no error.
  • CLOSED
    The operation closed the SSLEngine or the operation could not be completed because it was already closed.
  • BUFFER_UNDERFLOW
    The input buffer had insufficient data, indicating that the application must obtain more data from the peer (for example, by reading more data from the network).
  • BUFFER_OVERFLOW
    The output buffer had insufficient space to hold the result, indicating that the application must clear or enlarge the destination buffer.

Example 4 illustrates how to handle the BUFFER_UNDERFLOW and BUFFER_OVERFLOW statuses of the SSLEngine.unwrap() method. It uses SSLSession.getApplicationBufferSize() and SSLSession.getPacketBufferSize() to determine how large to make the byte buffers.

Example 4: Handling BUFFER_UNDERFLOW and BUFFER_OVERFLOW
SSLEngineResult res = engine.unwrap(peerNetData, peerAppData);
switch (res.getStatus()) {

case BUFFER_OVERFLOW:
    // Maybe need to enlarge the peer application data buffer.
    if (engine.getSession().getApplicationBufferSize() > peerAppData.capacity()) {
        // enlarge the peer application data buffer
    } else {
        // compact or clear the buffer
    }
    // retry the operation
    break;

case BUFFER_UNDERFLOW:
    // Maybe need to enlarge the peer network packet buffer
    if (engine.getSession().getPacketBufferSize() > peerNetData.capacity()) {
        // enlarge the peer network packet buffer
    } else {
        // compact or clear the buffer
    }
    // obtain more inbound network data and then retry the operation
    break;

    // Handle other status: CLOSED, OK
    ...
}

The possible handshaking statuses are represented by the SSLEngineResult.HandshakeStatus enum. They represent whether handshaking has completed, whether the caller must obtain more handshaking data from the peer or send more handshaking data to the peer, and so on.

Having two statuses per result allows the SSLEngine to indicate that the application must take two actions: one in response to the handshaking and one representing the overall status of the wrap() and unwrap() methods. For example, the engine might, as the result of a single SSLEngine.unwrap() call, return SSLEngineResult.Status.OK to indicate that the input data was processed successfully and SSLEngineResult.HandshakeStatus.NEED_UNWRAP to indicate that the application should obtain more SSL/TLS encoded data from the peer and supply it to SSLEngine.unwrap() again so that handshaking can continue. As you can see, the previous examples were greatly simplified; they would need to be expanded significantly to properly handle all of these statuses.

Example 5 illustrates how to process handshaking data by checking handshaking status and the overall status of the wrap() and unwrap() methods.

Example 5: Checking and Processing Handshaking Statuses and Overall Statuses
void doHandshake(SocketChannel socketChannel, SSLEngine engine,
        ByteBuffer myNetData, ByteBuffer peerNetData) throws Exception {

    // Create byte buffers to use for holding application data
    int appBufferSize = engine.getSession().getApplicationBufferSize();
    ByteBuffer myAppData = ByteBuffer.allocate(appBufferSize);
    ByteBuffer peerAppData = ByteBuffer.allocate(appBufferSize);

    // Begin handshake
    engine.beginHandshake();
    SSLEngineResult.HandshakeStatus hs = engine.getHandshakeStatus();

    // Process handshaking message
    while (hs != SSLEngineResult.HandshakeStatus.FINISHED &&
        hs != SSLEngineResult.HandshakeStatus.NOT_HANDSHAKING) {

        switch (hs) {

        case NEED_UNWRAP:
            // Receive handshaking data from peer
            if (socketChannel.read(peerNetData) < 0) {
                // The channel has reached end-of-stream
            }

            // Process incoming handshaking data
            peerNetData.flip();
            SSLEngineResult res = engine.unwrap(peerNetData, peerAppData);
            peerNetData.compact();
            hs = res.getHandshakeStatus();

            // Check status
            switch (res.getStatus()) {
            case OK :
                // Handle OK status
                break;

            // Handle other status: BUFFER_UNDERFLOW, BUFFER_OVERFLOW, CLOSED
            ...
            }
            break;

        case NEED_WRAP :
            // Empty the local network packet buffer.
            myNetData.clear();

            // Generate handshaking data
            res = engine.wrap(myAppData, myNetData);
            hs = res.getHandshakeStatus();

            // Check status
            switch (res.getStatus()) {
            case OK :
                myNetData.flip();

                // Send the handshaking data to peer
                while (myNetData.hasRemaining()) {
                    socketChannel.write(myNetData);
                }
                break;

            // Handle other status:  BUFFER_OVERFLOW, BUFFER_UNDERFLOW, CLOSED
            ...
            }
            break;

        case NEED_TASK :
            // Handle blocking tasks
            break;

        // Handle other status:  // FINISHED or NOT_HANDSHAKING
        ...
        }
    }

    // Processes after handshaking
    ...
}

Dealing With Blocking Tasks

During handshaking, an SSLEngine might encounter tasks that can block or take a long time. For example, a TrustManager may need to connect to a remote certificate validation service, or a KeyManager might need to prompt a user to determine which certificate to use as part of client authentication. To preserve the nonblocking nature of SSLEngine, when the engine encounters such a task, it will return SSLEngineResult.HandshakeStatus.NEED_TASK. Upon receiving this status, the application should invoke SSLEngine.getDelegatedTask() to get the task, and then, using the threading model appropriate for its requirements, process the task. The application might, for example, obtain threads from a thread pool to process the tasks, while the main thread handles other I/O.

The following code executes each task in a newly created thread:

if (res.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.NEED_TASK) {
    Runnable task;
    while ((task = engine.getDelegatedTask()) != null) {
        new Thread(task).start();
    }
}

The SSLEngine will block future wrap() and unwrap() calls until all of the outstanding tasks are completed.

Shutting Down

For an orderly shutdown of an SSL/TLS connection, the SSL/TLS protocols require transmission of close messages. Therefore, when an application is done with the SSL/TLS connection, it should first obtain the close messages from the SSLEngine, then transmit them to the peer using its transport mechanism, and finally shut down the transport mechanism. Example 6 illustrates this.

Example 6: Shutting Down an SSL/TLS Connection
// Indicate that application is done with engine
engine.closeOutbound();

while (!engine.isOutboundDone()) {
    // Get close message
    SSLEngineResult res = engine.wrap(empty, myNetData);

    // Check res statuses

    // Send close message to peer
    while(myNetData.hasRemaining()) {
        int num = socketChannel.write(myNetData);
        if (num == 0) {
            // no bytes written; try again later
        }
        myNetData().compact();
    }
}

// Close transport
socketChannel.close();

In addition to an application explicitly closing the SSLEngine, the SSLEngine might be closed by the peer (via receipt of a close message while it is processing handshake data), or by the SSLEngine encountering an error while processing application or handshake data, indicated by throwing an SSLException. In such cases, the application should invoke SSLEngine.wrap() to get the close message and send it to the peer until SSLEngine.isOutboundDone() returns true (as shown in Example 6), or until the SSLEngineResult.getStatus() returns CLOSED.

In addition to orderly shutdowns, there can also be unexpected shutdowns when the transport link is severed before close messages are exchanged. In the previous examples, the application might get -1 or IOException when trying to read from the nonblocking SocketChannel, or get IOException when trying to write to the non-blocking SocketChannel. When you get to the end of your input data, you should call engine.closeInbound(), which will verify with the SSLEngine that the remote peer has closed cleanly from the SSL/TLS perspective. Then the application should still try to shut down cleanly by using the procedure in Example 6. Obviously, unlike SSLSocket, the application using SSLEngine must deal with more state transitions, statuses, and programming. For more information about writing an SSLEngine-based application, see Sample Code Illustrating the Use of an SSLEngine.

SSLSession and ExtendedSSLSession

The javax.net.ssl.SSLSession interface represents a security context negotiated between the two peers of an SSLSocket or SSLEngine connection. After a session has been arranged, it can be shared by future SSLSocket or SSLEngine objects connected between the same two peers.

In some cases, parameters negotiated during the handshake are needed later in the handshake to make decisions about trust. For example, the list of valid signature algorithms might restrict the certificate types that can be used for authentication. The SSLSession can be retrieved during the handshake by calling getHandshakeSession() on an SSLSocket or SSLEngine. Implementations of TrustManager or KeyManager can use the getHandshakeSession() method to get information about session parameters to help them make decisions.

A fully initialized SSLSession contains the cipher suite that will be used for communications over a secure socket as well as a nonauthoritative hint as to the network address of the remote peer, and management information such as the time of creation and last use. A session also contains a shared master secret negotiated between the peers that is used to create cryptographic keys for encrypting and guaranteeing the integrity of the communications over an SSLSocket or SSLEngine connection. The value of this master secret is known only to the underlying secure socket implementation and is not exposed through the SSLSession API.

In Java SE, a TLS 1.2 session is represented by ExtendedSSLSession, an implementation of SSLSession. The ExtendedSSLSession class adds methods that describe the signature algorithms that are supported by the local implementation and the peer. The getRequestedServerNames() method called on an ExtendedSSLSession instance is used to obtain a list of SNIServerName objects in the requested Server Name Indication (SNI) extension. The server should use the requested server names to guide its selection of an appropriate authentication certificate, and/or other aspects of the security policy. The client should use the requested server names to guide its endpoint identification of the peer's identity, and/or other aspects of the security policy.

Calls to the getPacketBufferSize() and getApplicationBufferSize() methods on SSLSession are used to determine the appropriate buffer sizes used by SSLEngine.

Note: The SSL/TLS protocols specify that implementations are to produce packets containing at most 16 kilobytes (KB) of plain text. However, some implementations violate the specification and generate large records up to 32 KB. If the SSLEngine.unwrap() code detects large inbound packets, then the buffer sizes returned by SSLSession will be updated dynamically. Applications should always check the BUFFER_OVERFLOW and BUFFER_UNDERFLOW statuses and enlarge the corresponding buffers if necessary. SunJSSE will always send standard compliant 16 KB records and allow incoming 32 KB records. For a workaround, see the System property jsse.SSLEngine.acceptLargeFragments in Customizing JSSE.

HttpsURLConnection Class

The HTTPS protocol is similar to HTTP, but HTTPS first establishes a secure channel via SSL/TLS sockets and then verifies the identity of the peer before requesting or receiving data. The javax.net.ssl.HttpsURLConnection class extends the java.net.HttpsURLConnection class and adds support for HTTPS-specific features. For more information about how HTTPS URLs are constructed and used, see the API specification sections about the java.net.URL, java.net.URLConnection, java.net.HttpURLConnection, and javax.net.ssl.HttpURLConnection classes.

Upon obtaining an HttpsURLConnection instance, you can configure a number of HTTP and HTTPS parameters before actually initiating the network connection via the URLConnection.connect() method. Of particular interest are:

  • Setting the Assigned SSLSocketFactory
  • Setting the Assigned HostnameVerifier

Setting the Assigned SSLSocketFactory

In some situations, it is desirable to specify the SSLSocketFactory that an HttpsURLConnection instance uses. For example, you might want to tunnel through a proxy type that is not supported by the default implementation. The new SSLSocketFactory could return sockets that have already performed all necessary tunneling, thus allowing HttpsURLConnection to use additional proxies.

The HttpsURLConnection class has a default SSLSocketFactory that is assigned when the class is loaded (this is the factory returned by the SSLSocketFactory.getDefault() method). Future instances of HttpsURLConnection will inherit the current default SSLSocketFactory until a new default SSLSocketFactory is assigned to the class via the static HttpsURLConnection.setDefaultSSLSocketFactory() method. Once an instance of HttpsURLConnection has been created, the inherited SSLSocketFactory on this instance can be overridden with a call to the setSSLSocketFactory() method.

Note: Changing the default static SSLSocketFactory has no effect on existing instances of HttpsURLConnection. A call to the setSSLSocketFactory() method is necessary to change the existing instances.

You can obtain the per-instance or per-class SSLSocketFactory by making a call to the getSSLSocketFactory() or getDefaultSSLSocketFactory() method, respectively.

Setting the Assigned HostnameVerifier

If the host name of the URL does not match the host name in the credentials received as part of the SSL/TLS handshake, then it is possible that URL spoofing has occurred. If the implementation cannot determine a host name match with reasonable certainty, then the SSL implementation performs a callback to the instance's assigned HostnameVerifier for further checking. The host name verifier can take whatever steps are necessary to make the determination, such as performing host name pattern matching or perhaps opening an interactive dialog box. An unsuccessful verification by the host name verifier closes the connection. For more information regarding host name verification, see RFC 2818.

The setHostnameVerifier() and
setDefaultHostnameVerifier() methods operate in a
similar manner to the setSSLSocketFactory() and
setDefaultSSLSocketFactory() methods, in that
HostnameVerifier objects are assigned on a
per-instance and per-class basis, and the current values can be
obtained by a call to the getHostnameVerifier() or
getDefaultHostnameVerifier() method.

Support Classes and Interfaces

The classes and interfaces in this section are provided to support the creation and initialization of SSLContext objects, which are used to create SSLSocketFactory, SSLServerSocketFactory, and SSLEngine objects. The support classes and interfaces are part of the javax.net.ssl package.

Three of the classes described in this section (SSLContext, KeyManagerFactory, and TrustManagerFactory) are engine classes. An engine class is an API class for specific algorithms (or protocols, in the case of SSLContext), for which implementations may be provided in one or more Cryptographic Service Provider (provider) packages. For more information about providers and engine classes, see the "Design Principles" and "Concepts" sections of the Java Cryptography Architecture Reference Guide.

The SunJSSE provider that comes standard with JSSE provides SSLContext, KeyManagerFactory, and TrustManagerFactory implementations, as well as implementations for engine classes in the standard java.security API. Table 5 lists implementations supplied by SunJSSE.

Table 5: Implementations Supplied by SunJSEE
Engine Class Implemented | Algorithm or Protocol
KeyStore | PKCS12
KeyManagerFactory | PKIX, SunX509
TrustManagerFactory | PKIX (X509 or SunPKIX), SunX509
SSLContext | SSLv3, TLSv1, TLSv1.1, TLSv1.2

The SSLContext Class

The javax.net.ssl.SSLContext class is an engine class for an implementation of a secure socket protocol. An instance of this class acts as a factory for SSL socket factories and SSL engines. An SSLContext object holds all of the state information shared across all objects created under that context. For example, session state is associated with the SSLContext when it is negotiated through the handshake protocol by sockets created by socket factories provided by the context. These cached sessions can be reused and shared by other sockets created under the same context.

Each instance is configured through its init method with the keys, certificate chains, and trusted root CA certificates that it needs to perform authentication. This configuration is provided in the form of key and trust managers. These managers provide support for the authentication and key agreement aspects of the cipher suites supported by the context.

Currently, only X.509-based managers are supported.

Creating an SSLContext Object

Like other JCA provider-based engine classes, SSLContext objects are created using the getInstance() factory methods of the SSLContext class. These static methods each return an instance that implements at least the requested secure socket protocol. The returned instance may implement other protocols, too. For example, getInstance("TLSv1") may return an instance that implements TLSv1, TLSv1.1, and TLSv1.2. The getSupportedProtocols() method returns a list of supported protocols when an SSLSocket, SSLServerSocket, or SSLEngine is created from this context. You can control which protocols are actually enabled for an SSL connection by using the setEnabledProtocols(String[] protocols) method.

Note: An SSLContext object is automatically created, initialized, and statically assigned to the SSLSocketFactory class when you call the SSLSocketFactory.getDefault() method. Therefore, you do not have to directly create and initialize an SSLContext object (unless you want to override the default behavior).

To create an SSLContext object by calling the getInstance() factory method, you must specify the protocol name. You may also specify which provider you want to supply the implementation of the requested protocol:

  • public static SSLContext getInstance(String protocol);
  • public static SSLContext getInstance(String protocol, String provider);
  • public static SSLContext getInstance(String protocol, Provider provider);

If just a protocol name is specified, then the system will determine whether an implementation of the requested protocol is available in the environment. If there is more than one implementation, then it will determine whether there is a preferred one.

If both a protocol name and a provider are specified, then the system will determine whether an implementation of the requested protocol is in the provider requested. If there is no implementation, an exception will be thrown.

A protocol is a string (such as "SSL") that describes the secure socket protocol desired. Common protocol names for SSLContext objects are defined in Appendix A.

An SSLContext can be obtained as follows:

    SSLContext sc = SSLContext.getInstance("SSL");

A newly created SSLContext should be initialized by calling the init method:

    public void init(KeyManager[] km, TrustManager[] tm, SecureRandom random);

If the KeyManager[] parameter is null, then an empty KeyManager will be defined for this context. If the TrustManager[] parameter is null, then the installed security providers will be searched for the highest-priority implementation of the TrustManagerFactory, from which an appropriate TrustManager will be obtained. Likewise, the SecureRandom parameter may be null, in which case a default implementation will be used.

If the internal default context is used, (for example, an SSLContext is created by SSLSocketFactory.getDefault() or SSLServerSocketFactory.getDefault()), then a default KeyManager and TrustManager are created. The default SecureRandom implementation is also chosen.

The TrustManager Interface

The primary responsibility of the TrustManager is to determine whether the presented authentication credentials should be trusted. If the credentials are not trusted, then the connection will be terminated. To authenticate the remote identity of a secure socket peer, you must initialize an SSLContext object with one or more TrustManager objects. You must pass one TrustManager for each authentication mechanism that is supported. If null is passed into the SSLContext initialization, then a trust manager will be created for you. Typically, a single trust manager supports authentication based on X.509 public key certificates (for example, X509TrustManager). Some secure socket implementations may also support authentication based on shared secret keys, Kerberos, or other mechanisms.

TrustManager objects are created either by a TrustManagerFactory, or by providing a concrete implementation of the interface.

The TrustManagerFactory Class

The javax.net.ssl.TrustManagerFactory is an engine class for a provider-based service that acts as a factory for one or more types of TrustManager objects. Because it is provider-based, additional factories can be implemented and configured to provide additional or alternative trust managers that provide more sophisticated services or that implement installation-specific authentication policies.

Creating a TrustManagerFactory

You create an instance of this class in a similar manner to SSLContext, except for passing an algorithm name string instead of a protocol name to the getInstance() method:
    TrustManagerFactory tmf = TrustManagerFactory.getInstance(String algorithm);

    TrustManagerFactory tmf = TrustManagerFactory.getInstance(String algorithm, String provider);

    TrustManagerFactory tmf = TrustManagerFactory.getInstance(String algorithm, Provider provider);

A sample call is as follows:

    TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX", "SunJSSE");

The preceding call creates an instance of the SunJSSE provider's PKIX trust manager factory. This factory can be used to create trust managers that provide X.509 PKIX-based certification path validity checking.

When initializing an SSLContext, you can use trust managers created from a trust manager factory, or you can write your own trust manager, for example, using the CertPath API. For details, see the Java PKI Programmer's Guide. You do not need to use a trust manager factory if you implement a trust manager using the X509TrustManager interface.

A newly created factory should be initialized by calling one of the init() methods:

    public void init(KeyStore ks);
    public void init(ManagerFactoryParameters spec);

Call whichever init() method is appropriate for the TrustManagerFactory you are using. If you are not sure, then ask the provider vendor.

For many factories, such as the SunX509 TrustManagerFactory from the SunJSSE provider, the KeyStore is the only information required to initialize the TrustManagerFactory and thus the first init method is the appropriate one to call. The TrustManagerFactory will query the KeyStore for information about which remote certificates should be trusted during authorization checks.

Sometimes, initialization parameters other than a KeyStore are needed by a provider. Users of that provider are expected to pass an implementation of the appropriate ManagerFactoryParameters as defined by the provider. The provider can then call the specified methods in the ManagerFactoryParameters implementation to obtain the needed information.

For example, suppose the TrustManagerFactory provider requires initialization parameters B, R, and S from any application that wants to use that provider. Like all providers that require initialization parameters other than a KeyStore, the provider requires the application to provide an instance of a class that implements a particular ManagerFactoryParameters subinterface. In the example, suppose that the provider requires the calling application to implement and create an instance of MyTrustManagerFactoryParams and pass it to the second init() method. The following example illustrates what MyTrustManagerFactoryParams can look like:

    public interface MyTrustManagerFactoryParams extends ManagerFactoryParameters {
        public boolean getBValue();
        public float getRValue();
        public String getSValue():
    }

Some trust managers can make trust decisions without being explicitly initialized with a KeyStore object or any other parameters. For example, they may access trust material from a local directory service via LDAP, use a remote online certificate status checking server, or access default trust material from a standard local location.

PKIX TrustManager Support

The default trust manager algorithm is PKIX. It can be changed by editing the ssl.TrustManagerFactory.algorithm property in the java.security file.

The PKIX trust manager factory uses the CertPath PKIX implementation from an installed security provider. The trust manager factory can be initialized using the normal init(KeyStore ks) method, or by passing CertPath parameters to the the PKIX trust manager using the javax.net.ssl.CertPathTrustManagerParameters class.

The following example illustrates how to get the trust manager to use a particular LDAP certificate store and enable revocation checking:

    import javax.net.ssl.*;
    import java.security.cert.*;
    import java.security.KeyStore;
    ...

    // Create PKIX parameters
    KeyStore anchors = KeyStore.getInstance("JKS");
    anchors.load(new FileInputStream(anchorsFile));
    CertPathParameters pkixParams = new PKIXBuilderParameters(anchors, new X509CertSelector());

    // Specify LDAP certificate store to use
    LDAPCertStoreParameters lcsp = new LDAPCertStoreParameters("ldap.imc.org", 389);
    pkixParams.addCertStore(CertStore.getInstance("LDAP", lcsp));

    // Specify that revocation checking is to be enabled
    pkixParams.setRevocationEnabled(true);

    // Wrap PKIX parameters as trust manager parameters
    ManagerFactoryParameters trustParams = new CertPathTrustManagerParameters(pkixParams);

    // Create TrustManagerFactory for PKIX-compliant trust managers
    TrustManagerFactory factory = TrustManagerFactory.getInstance("PKIX");

    // Pass parameters to factory to be passed to CertPath implementation
    factory.init(trustParams);

    // Use factory
    SSLContext ctx = SSLContext.getInstance("TLS");
    ctx.init(null, factory.getTrustManagers(), null);

If the init(KeyStore ks) method is used, then default PKIX parameters are used with the exception that revocation checking is disabled. It can be enabled by setting the com.sun.net.ssl.checkRevocation system property to true. This setting requires that the CertPath implementation can locate revocation information by itself. The PKIX implementation in the provider can do this in many cases but requires that the system property com.sun.security.enableCRLDP be set to true.

For more information about PKIX and the CertPath API, see the Java PKI Programmer's Guide.

The X509TrustManager Interface

The javax.net.ssl.X509TrustManager interface extends the general TrustManager interface. It must be implemented by a trust manager when using X.509-based authentication.

To support X.509 authentication of remote socket peers through JSSE, an instance of this interface must be passed to the init method of an SSLContext object.

Creating an X509TrustManager

You can either implement this interface directly yourself or obtain one from a provider-based TrustManagerFactory (such as that supplied by the SunJSSE provider). You could also implement your own interface that delegates to a factory-generated trust manager. For example, you might do this to filter the resulting trust decisions and query an end-user through a graphical user interface.

Note: If a null KeyStore parameter is passed to the SunJSSE PKIX or SunX509 TrustManagerFactory, then the factory uses the following process to try to find trust material:

  1. If the javax.net.ssl.trustStore property is defined, then the TrustManagerFactory attempts to find a file using the file name specified by that system property, and uses that file for the KeyStore parameter. If the javax.net.ssl.trustStorePassword system property is also defined, then its value is used to check the integrity of the data in the truststore before opening it.

    If the javax.net.ssl.trustStore property is defined but the specified file does not exist, then a default TrustManager using an empty keystore is created.

  2. If the javax.net.ssl.trustStore system property was not specified, then:
    • if the file java-home/lib/security/jssecacerts exists, that file is used;
    • if the file java-home/lib/security/cacerts exists, that file is used;
    • if neither of these files exists, then the SSL cipher suite is anonymous, does not perform any authentication, and thus does not need a truststore.

For information about what java-home refers to, see The Installation Directory.

The factory looks for a file specified via the javax.net.ssl.trustStore security property or for the jssecacerts file before checking for a cacerts file. Therefore, you can provide a JSSE-specific set of trusted root certificates separate from ones that might be present in cacerts for code-signing purposes.

Creating Your Own X509TrustManager

If the supplied X509TrustManager behavior is not suitable for your situation, then you can create your own X509TrustManager by either creating and registering your own TrustManagerFactory or by implementing the X509TrustManager interface directly.

The following example illustrates a MyX509TrustManager class that enhances the default SunJSSE X509TrustManager behavior by providing alternative authentication logic when the default X509TrustManager fails:

class MyX509TrustManager implements X509TrustManager {

     /*
      * The default PKIX X509TrustManager9.  Decisions are delegated
      * to it, and a fall back to the logic in this class is performed
      * if the default X509TrustManager does not trust it.
      */
     X509TrustManager pkixTrustManager;

     MyX509TrustManager() throws Exception {
         // create a "default" JSSE X509TrustManager.

         KeyStore ks = KeyStore.getInstance("JKS");
         ks.load(new FileInputStream("trustedCerts"), "passphrase".toCharArray());

         TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
         tmf.init(ks);

         TrustManager tms [] = tmf.getTrustManagers();

         /*
          * Iterate over the returned trust managers, looking
          * for an instance of X509TrustManager.  If found,
          * use that as the default trust manager.
          */
         for (int i = 0; i < tms.length; i++) {
             if (tms[i] instanceof X509TrustManager) {
                 pkixTrustManager = (X509TrustManager) tms[i];
                 return;
             }
         }

         /*
          * Find some other way to initialize, or else the
          * constructor fails.
          */
         throw new Exception("Couldn't initialize");
     }

     /*
      * Delegate to the default trust manager.
      */
     public void checkClientTrusted(X509Certificate[] chain, String authType)
                 throws CertificateException {
         try {
             pkixTrustManager.checkClientTrusted(chain, authType);
         } catch (CertificateException excep) {
             // do any special handling here, or rethrow exception.
         }
     }

     /*
      * Delegate to the default trust manager.
      */
     public void checkServerTrusted(X509Certificate[] chain, String authType)
                 throws CertificateException {
         try {
             pkixTrustManager.checkServerTrusted(chain, authType);
         } catch (CertificateException excep) {
             /*
              * Possibly pop up a dialog box asking whether to trust the
              * cert chain.
              */
         }
     }

     /*
      * Merely pass this through.
      */
     public X509Certificate[] getAcceptedIssuers() {
         return pkixTrustManager.getAcceptedIssuers();
     }
}

Once you have created such a trust manager, assign it to an SSLContext via the init() method, as in the following example. Future SocketFactories created from this SSLContext will use your new TrustManager when making trust decisions.

    TrustManager[] myTMs = new TrustManager[] { new MyX509TrustManager() };
    SSLContext ctx = SSLContext.getInstance("TLS");
    ctx.init(null, myTMs, null);

Updating the Keystore Dynamically

You can enhance MyX509TrustManager to handle dynamic keystore updates. When a checkClientTrusted or checkServerTrusted test fails and does not establish a trusted certificate chain, you can add the required trusted certificate to the keystore. You must create a new pkixTrustManager from the TrustManagerFactory initialized with the updated keystore. When you establish a new connection (using the previously initialized SSLContext), the newly added certificate will be used when making trust decisions.

X509ExtendedTrustManager Class

The X509ExtendedTrustManager class is an abstract implementation of the X509TrustManager interface. It adds methods for connection-sensitive trust management. In addition, it enables endpoint verification at the TLS layer.

In TLS 1.2 and later, both client and server can specify which hash and signature algorithms they will accept. To authenticate the remote side, authentication decisions must be based on both X509 certificates and the local accepted hash and signature algorithms. The local accepted hash and signature algorithms can be obtained using the ExtendedSSLSession.getLocalSupportedSignatureAlgorithms() method.

The ExtendedSSLSession object can be retrieved by calling the SSLSocket.getHandshakeSession() method or the SSLEngine.getHandshakeSession() method.

The X509TrustManager interface is not connection-sensitive. It provides no way to access SSLSocket or SSLEngine session properties.

Besides TLS 1.2 support, the X509ExtendedTrustManager class also supports algorithm constraints and SSL layer host name verification. For JSSE providers and trust manager implementations, the X509ExtendedTrustManager class is highly recommended over the legacy X509TrustManager interface.

Creating an X509ExtendedTrustManager

You can either create an X509ExtendedTrustManager subclass yourself (which is outlined in the following section) or obtain one from a provider-based TrustManagerFactory (such as that supplied by the SunJSSE provider). In Java SE 7, the PKIX or SunX509 TrustManagerFactory returns an X509ExtendedTrustManager instance.

Creating Your Own X509ExtendedTrustManager

This section outlines how to create a subclass of X509ExtendedTrustManager in nearly the same way as described for X509TrustManager.

The following example illustrates how to create a class that uses the PKIX TrustManagerFactory to locate a default X509ExtendedTrustManager that will be used to make decisions about trust. If the default trust manager fails for any reason, then the subclass is can add other behavior. In the example, these locations are indicated by comments in the catch clauses.

    import java.io.*;
    import java.net.*;

    import java.security.*;
    import java.security.cert.*;
    import javax.net.ssl.*;

    public class MyX509ExtendedTrustManager extends X509ExtendedTrustManager {

         /*
          * The default PKIX X509ExtendedTrustManager.  Decisions are
          * delegated to it, and a fall back to the logic in this class is
          * performed if the default X509ExtendedTrustManager does not
          * trust it.
          */
         X509ExtendedTrustManager pkixTrustManager;

         MyX509ExtendedTrustManager() throws Exception {
             // create a "default" JSSE X509ExtendedTrustManager.

             KeyStore ks = KeyStore.getInstance("JKS");
             ks.load(new FileInputStream("trustedCerts"), "passphrase".toCharArray());

             TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
             tmf.init(ks);

             TrustManager tms [] = tmf.getTrustManagers();

             /*
              * Iterate over the returned trust managers, looking
              * for an instance of X509ExtendedTrustManager. If found,
              * use that as the default trust manager.
              */
             for (int i = 0; i < tms.length; i++) {
                 if (tms[i] instanceof X509ExtendedTrustManager) {
                     pkixTrustManager = (X509ExtendedTrustManager) tms[i];
                     return;
                 }
             }

             /*
              * Find some other way to initialize, or else we have to fail the
              * constructor.
              */
             throw new Exception("Couldn't initialize");
         }

         /*
          * Delegate to the default trust manager.
          */
         public void checkClientTrusted(X509Certificate[] chain, String authType)
                     throws CertificateException {
             try {
                 pkixTrustManager.checkClientTrusted(chain, authType);
             } catch (CertificateException excep) {
                 // do any special handling here, or rethrow exception.
             }
         }

         /*
          * Delegate to the default trust manager.
          */
         public void checkServerTrusted(X509Certificate[] chain, String authType)
                     throws CertificateException {
             try {
                 pkixTrustManager.checkServerTrusted(chain, authType);
             } catch (CertificateException excep) {
                 /*
                  * Possibly pop up a dialog box asking whether to trust the
                  * cert chain.
                  */
             }
         }

         /*
          * Connection-sensitive verification.
          */
         public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket)
                     throws CertificateException {
           try {
               pkixTrustManager.checkClientTrusted(chain, authType, socket);
           } catch (CertificateException excep) {
               // do any special handling here, or rethrow exception.
           }
         }

         public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
                     throws CertificateException {
           try {
               pkixTrustManager.checkClientTrusted(chain, authType, engine);
           } catch (CertificateException excep) {
               // do any special handling here, or rethrow exception.
           }
         }

         public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)
                     throws CertificateException {
           try {
               pkixTrustManager.checkServerTrusted(chain, authType, socket);
           } catch (CertificateException excep) {
               // do any special handling here, or rethrow exception.
           }
         }

         public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
                     throws CertificateException {
           try {
               pkixTrustManager.checkServerTrusted(chain, authType, engine);
           } catch (CertificateException excep) {
               // do any special handling here, or rethrow exception.
           }
         }

         /*
          * Merely pass this through.
          */
         public X509Certificate[] getAcceptedIssuers() {
             return pkixTrustManager.getAcceptedIssuers();
         }
    }

The KeyManager Interface

The primary responsibility of the KeyManager is to select the authentication credentials that will eventually be sent to the remote host. To authenticate yourself (a local secure socket peer) to a remote peer, you must initialize an SSLContext object with one or more KeyManager objects. You must pass one KeyManager for each different authentication mechanism that will be supported. If null is passed into the SSLContext initialization, then an empty KeyManager will be created. If the internal default context is used (for example, an SSLContext created by SSLSocketFactory.getDefault() or SSLServerSocketFactory.getDefault()), then a default KeyManager is created. Typically, a single key manager supports authentication based on X.509 public key certificates. Some secure socket implementations may also support authentication based on shared secret keys, Kerberos, or other mechanisms.

KeyManager objects are created either by a KeyManagerFactory, or by providing a concrete implementation of the interface.

The KeyManagerFactory Class

The javax.net.ssl.KeyManagerFactory class is an engine class for a provider-based service that acts as a factory for one or more types of KeyManager objects. The SunJSSE provider implements a factory that can return a basic X.509 key manager. Because it is provider-based, additional factories can be implemented and configured to provide additional or alternative key managers.

Creating a KeyManagerFactory

You create an instance of this class in a similar manner to SSLContext, except for passing an algorithm name string instead of a protocol name to the getInstance() method:

    KeyManagerFactory kmf = getInstance(String algorithm);

    KeyManagerFactory kmf = getInstance(String algorithm, String provider);

    KeyManagerFactory kmf = getInstance(String algorithm, Provider provider);

A sample call as follows:

    KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509", "SunJSSE");

The preceding call creates an instance of the SunJSSE provider's default key manager factory, which provides basic X.509-based authentication keys.

A newly created factory should be initialized by calling one of the init methods:

    public void init(KeyStore ks, char[] password);
    public void init(ManagerFactoryParameters spec);

Call whichever init method is appropriate for the KeyManagerFactory you are using. If you are not sure, then ask the provider vendor.

For many factories, such as the default SunX509 KeyManagerFactory from the SunJSSE provider, the KeyStore and password are the only information required to initialize the KeyManagerFactory and thus the first init method is the appropriate one to call. The KeyManagerFactory will query the KeyStore for information about which private key and matching public key certificates should be used for authenticating to a remote socket peer. The password parameter specifies the password that will be used with the methods for accessing keys from the KeyStore. All keys in the KeyStore must be protected by the same password.

Sometimes initialization parameters other than a KeyStore and password are needed by a provider. Users of that provider are expected to pass an implementation of the appropriate ManagerFactoryParameters as defined by the provider. The provider can then call the specified methods in the ManagerFactoryParameters implementation to obtain the needed information.

Some factories can provide access to authentication material without being initialized with a KeyStore object or any other parameters. For example, they may access key material as part of a login mechanism such as one based on JAAS, the Java Authentication and Authorization Service.

As previously indicated, the SunJSSE provider supports a SunX509 factory that must be initialized with a KeyStore parameter.

The X509KeyManager Interface

The javax.net.ssl.X509KeyManager interface extends the general KeyManager interface. It must be implemented by a key manager for X.509-based authentication. To support X.509 authentication to remote socket peers through JSSE, an instance of this interface must be passed to the init() method of an SSLContext object.

Creating an X509KeyManager

You can either implement this interface directly yourself or obtain one from a provider-based KeyManagerFactory (such as that supplied by the SunJSSE provider). You could also implement your own interface that delegates to a factory-generated key manager. For example, you might do this to filter the resulting keys and query an end-user through a graphical user interface.

Creating Your Own X509KeyManager

If the default X509KeyManager behavior is not suitable for your situation, then you can create your own X509KeyManager in a way similar to that shown in Creating Your Own X509TrustManager.

The X509ExtendedKeyManager Class

The X509ExtendedKeyManager abstract class is an implementation of the X509KeyManager interface that allows for connection-specific key selection. It adds two methods that select a key alias for client or server based on the key type, allowed issuers, and current SSLEngine:

  • public String chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)
  • public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)

If a key manager is not an instance of the X509ExtendedKeyManager class, then it will not work with the SSLEngine class.

For JSSE providers and key manager implementations, the X509ExtendedKeyManager class is highly recommended over the legacy X509KeyManager interface.

In TLS 1.2 and later, both client and server can specify which hash and signature algorithms they will accept. To pass the authentication required by the remote side, local key selection decisions must be based on both X509 certificates and the remote accepted hash and signature algorithms. The remote accepted hash and signature algorithms can be retrieved using the ExtendedSSLSession.getPeerSupportedSignatureAlgorithms() method.

You can create your own X509ExtendedKeyManager subclass in a way similar to that shown in Creating Your Own X509ExtendedTrustManager.

Support for the Server Name Indication (SNI) extension on the server side enables the key manager to check the server name and select the appropriate key accordingly. For example, suppose there are three key entries with certificates in the keystore:

  • cn=www.example.com
  • cn=www.example.org
  • cn=www.example.net

If the ClientHello message requests to connect to www.example.net in the SNI extension, then the server should be able to select the certificate with subject cn=www.example.net.

Relationship Between a TrustManager and a KeyManager

Historically, there has been confusion regarding the functionality of a TrustManager and a KeyManager.

A TrustManager determines whether the remote authentication credentials (and thus the connection) should be trusted.

A KeyManager determines which authentication credentials to send to the remote host.

Secondary Support Classes and Interfaces

These classes are provided as part of the JSSE API to support the creation, use, and management of secure sockets. They are less likely to be used by secure socket applications than are the core and support classes. The secondary support classes and interfaces are part of the javax.net.ssl and javax.security.cert packages.

The SSLParameters Class

The SSLParameters class encapsulates the following parameters that affect a TLS connection:

  • The list of cipher suites to be accepted in an SSL/TLS handshake
  • The list of protocols to be allowed
  • The endpoint identification algorithm during SSL/TLS handshaking
  • The server names and server name matchers (see the Server Name Indication (SNI) Extension)
  • The algorithm constraints
  • Whether SSL/TLS servers should request or require client authentication
  • The cipher suite preference to be used in an SSL/TLS handshake

You can retrieve the current SSLParameters for an SSLSocket or SSLEngine by using the following methods:

  • getSSLParameters() in an SSLSocket, SSLServerSocket, and SSLEngine
  • getDefaultSSLParameters() and getSupportedSSLParamters() in an SSLContext

You can assign SSLParameters with the setSSLParameters() method in an SSLSocket, SSLServerSocket and SSLEngine.

You can explicitly set the server name indication with the SSLParameters.setServerNames() method. The server name indication in client mode also affects endpoint identification. In the implementation of X509ExtendedTrustManager, it uses the server name indication retrieved by the ExtendedSSLSession.getRequestedServerNames() method. The following example illustrates this functionality:

SSLSocketFactory factory = ...
SSLSocket sslSocket = factory.createSocket("172.16.10.6", 443);
// SSLEngine sslEngine = sslContext.createSSLEngine("172.16.10.6", 443);

SNIHostName serverName = new SNIHostName("www.example.com");
List<SNIServerName> serverNames = new ArrayList<>(1);
serverNames.add(serverName);

SSLParameters params = sslSocket.getSSLParameters();
params.setServerNames(serverNames);
sslSocket.setSSLParameters(params);
// sslEngine.setSSLParameters(params);

In the preceding example, the host name in the server name indication (www.example.com) will be used to make endpoint identification against the peer's identity presented in the end-entity's X.509 certificate.

Cipher Suite Preference

During TLS handshaking, the client requests to negotiate a cipher suite from a list of cryptographic options that it supports, starting with its first preference. Then, the server selects a single cipher suite from the list of cipher suites requested by the client. Normally, the selection honors the client's preference. However, to mitigate the risks of using weak cipher suites, the server may select cipher suites based on its own preference rather than the client's preference, by invoking the method SSLParameters.setUseCipherSuitesOrder(true).

The SSLSessionContext Interface

The javax.net.ssl.SSLSessionContext interface is a grouping of SSLSession objects associated with a single entity. For example, it could be associated with a server or client that participates in many sessions concurrently. The methods in this interface enable the enumeration of all sessions in a context and allow lookup of specific sessions via their session IDs.

An SSLSessionContext may optionally be obtained from an SSLSession by calling the SSLSession getSessionContext() method. The context may be unavailable in some environments, in which case the getSessionContext() method returns null.

The SSLSessionBindingListener Interface

The javax.net.ssl.SSLSessionBindingListener interface is implemented by objects that are notified when they are being bound or unbound from an SSLSession.

The SSLSessionBindingEvent Class

The javax.net.ssl.SSLSessionBindingEvent class defines the event communicated to an SSLSessionBindingListener when it is bound or unbound from an SSLSession.

The HandShakeCompletedListener Interface

The javax.net.ssl.HandShakeCompletedListener interface is an interface implemented by any class that is notified of the completion of an SSL protocol handshake on a given SSLSocket connection.

The HandShakeCompletedEvent Class

The javax.net.ssl.HandShakeCompletedEvent class define the event communicated to a HandShakeCompletedListener upon completion of an SSL protocol handshake on a given SSLSocket connection.

The HostnameVerifier Interface

If the SSL/TLS implementation's standard host name verification logic fails, then the implementation calls the verify() method of the class that implements this interface and is assigned to this HttpsURLConnection instance. If the callback class can determine that the host name is acceptable given the parameters, it reports that the connection should be allowed. An unacceptable response causes the connection to be terminated.

For example:

    public class MyHostnameVerifier implements HostnameVerifier {

        public boolean verify(String hostname, SSLSession session) {
            // pop up an interactive dialog box
            // or insert additional matching logic
            if (good_address) {
                return true;
            } else {
                return false;
            }
        }
    }

    //...deleted...

    HttpsURLConnection urlc = (HttpsURLConnection)
      (new URL("https://www.example.com/")).openConnection();
    urlc.setHostnameVerifier(new MyHostnameVerifier());

See The HttpsURLConnection Class for more information about how to assign the HostnameVerifier to the HttpsURLConnection.

The X509Certificate Class

Many secure socket protocols perform authentication using public key certificates, also called X.509 certificates. This is the default authentication mechanism for the SSL/TLS protocols.

The java.security.cert.X509Certificate abstract class provides a standard way to access the attributes of X.509 certificates.

Note: The javax.security.cert.X509Certificate class is supported only for backward compatibility with previous (1.0.x and 1.1.x) versions of JSSE. New applications should use the java.security.cert.X509Certificate class instead.

The AlgorithmConstraints Interface

The java.security.AlgorithmConstraints interface is used for controlling allowed cryptographic algorithms. AlgorithmConstraints defines three permits() methods. These methods tell whether an algorithm name or a key is permitted for certain cryptographic functions. Cryptographic functions are represented by a set of CryptoPrimitive, which is an enumeration containing fields like STREAM_CIPHER, MESSAGE_DIGEST, and SIGNATURE.

Thus, an AlgorithmConstraints implementation can answer questions like: Can I use this key with this algorithm for the purpose of a cryptographic operation?

An AlgorithmConstraints object can be associated with an SSLParameters object by using the new setAlgorithmConstraints() method. The current AlgorithmConstraints object for an SSLParameters object is retrieved using the getAlgorithmConstraints() method.

The StandardConstants Class

The StandardConstants class is used to represent standard constants definitions in JSSE.

StandardConstants.SNI_HOST_NAME represents a domain name server (DNS) host name in a Server Name Indication (SNI) extension, which can be used when instantiating an SNIServerName or SNIMatcher object.

The SNIServerName Class

An instance of the abstract SNIServerName class represents a server name in the Server Name Indication (SNI) extension. It is instantiated using the type and encoded value of the specified server name.

You can use the getType() and getEncoded() methods to return the server name type and a copy of the encoded server name value, respectively. The equals() method can be used to check if some other object is "equal" to this server name. The hashCode() method returns a hash code value for this server name. To get a string representation of the server name (including the server name type and encoded server name value), use the toString() method.

The SNIMatcher Class

An instance of the abstract SNIMatcher class performs match operations on an SNIServerName object. Servers can use information from the Server Name Indication (SNI) extension to decide if a specific SSLSocket or SSLEngine should accept a connection. For example, when multiple "virtual" or "name-based" servers are hosted on a single underlying network address, the server application can use SNI information to determine whether this server is the exact server that the client wants to access. Instances of this class can be used by a server to verify the acceptable server names of a particular type, such as host names.

The SNIMatcher class is instantiated using the specified server name type on which match operations will be performed. To match a given SNIServerName, use the matches() method. To return the server name type of the given SNIMatcher object, use the getType() method.

The SNIHostName Class

An instance of the SNIHostName class (which extends the SNIServerName class) represents a server name of type "host_name" (see The StandardConstants Class) in the Server Name Indication (SNI) extension. To instantiate an SNIHostName, specify the fully qualified DNS host name of the server (as understood by the client) as a String argument. The argument is illegal in the following cases:

  • The argument is empty.
  • The argument ends with a trailing period.
  • The argument is not a valid Internationalized Domain Name (IDN) compliant with the RFC 3490 specification.

You can also instantiate an SNIHostName by specifying the encoded host name value as a byte array. This method is typically used to parse the encoded name value in a requested SNI extension. Otherwise, use the SNIHostName(String hostname) constructor. The encoded argument is illegal in the following cases:

  • The argument is empty.
  • The argument ends with a trailing period.
  • The argument is not a valid Internationalized Domain Name (IDN) compliant with the RFC 3490 specification.
  • The argument is not encoded in UTF-8 or US-ASCII.

Note: The encoded byte array passed in as an argument is cloned to protect against subsequent modification.

To return the host name of an SNIHostName object in US-ASCII encoding, use the getAsciiName() method. To compare a server name to another object, use the equals() method (comparison is not case-sensitive). To return a hash code value of an SNIHostName, use the hashCode() method. To return a string representation of an SNIHostName, including the DNS host name, use the toString() method.

You can create an SNIMatcher object for an SNIHostName object by passing a regular expression representing one or more host names to match to the createSNIMatcher() method.

Customizing JSSE

JSSE includes a standard implementation that can be customized by plugging in different implementations or specifying the default keystore, and so on. Table 6 summarizes which aspects can be customized, what the defaults are, and which mechanisms are used to provide customization. The first column of the table provides links to more detailed descriptions of each designated aspect and how to customize it.

Some of the customizations are done by setting system property or security property values. Sections following the table explain how to set such property values.

Note: Many of the properties shown in this table are currently used by the JSSE implementation, but there is no guarantee that they will continue to have the same names and types (system or security) or even that they will exist at all in future releases. All such properties are flagged with an asterisk (*). They are documented here for your convenience for use with the JSSE implementation.

Table 6: Customizable Items in JSSE
Customizable Item | Default | How to Customize
X509Certificate implementation | X509Certificate implementation from Oracle | cert.provider.x509v1 security property
HTTPS protocol implementation | Implementation from Oracle | java.protocol.handler.pkgs system property
Provider implementation | SunJSSE | The security.provider.n= line in security properties file
Default SSLSocketFactory implementation | SSLSocketFactory implementation from Oracle | * ssl.SocketFactory.provider security property
Default SSLServerSocketFactory implementation | SSLServerSocketFactory implementation from Oracle | * ssl.ServerSocketFactory.provider security property
Default keystore | None | * javax.net.ssl.keyStore system property. Note that the value NONE may be specified. This setting is appropriate if the keystore is not file-based (for example, it resides in a hardware token).
Default keystore password | None | * javax.net.ssl.keyStorePassword system property. It is inadvisable to specify the password in a way that exposes it to discovery by other users, for example, specifying the password on the command line. To keep the password secure, have the application prompt for the password, or specify the password in a properly protected option file.
Default keystore provider | None | * javax.net.ssl.keyStoreProvider system property
Default keystore type | KeyStore.getDefaultType() | * javax.net.ssl.keyStoreType system property
Default truststore | jssecacerts, if it exists. Otherwise, cacerts. | * javax.net.ssl.trustStore system property
Default truststore password | None | * javax.net.ssl.trustStorePassword system property. It is inadvisable to specify the password in a way that exposes it to discovery by other users, for example, specifying the password on the command line. To keep the password secure, have the application prompt for the password, or specify the password in a properly protected option file.
Default truststore provider | None | * javax.net.ssl.trustStoreProvider system property
Default truststore type | KeyStore.getDefaultType() | * javax.net.ssl.trustStoreType system property Note that the value NONE may be specified. This setting is appropriate if the truststore is not file-based (for example, it resides in a hardware token).
Default key manager factory algorithm name | SunX509 | ssl.KeyManagerFactory.algorithm security property
Default trust manager factory algorithm name | PKIX | ssl.TrustManagerFactory.algorithm security property
Disabled certificate verification cryptographic algorithms | MD2, RSA keySize < 1024 | jdk.certpath.disabledAlgorithms security property
Disabled cipher suite cryptographic algorithms | None | jdk.tls.disabledAlgorithms security property
Default proxy host | None | * https.proxyHost system property
Default proxy port | 80 | * https.proxyPort system property
Server Name Indication option | true | * jsse.enableSNIExtension system property. Server Name Indication (SNI) is a TLS extension, defined in RFC 6066. It enables TLS connections to virtual servers, in which multiple servers for different network names are hosted at a single underlying network address. Some very old SSL/TLS vendors may not be able handle SSL/TLS extensions. In this case, set this property to false to disable the SNI extension.
Default cipher suites | Determined by the socket factory | * https.cipherSuites system property. This contains a comma-separated list of cipher suite names specifying which cipher suites to enable for use on this HttpsURLConnection. See the SSLSocket.setEnabledCipherSuites(String[]) method.
Default handshaking protocols | Determined by the socket factory | * https.protocols system property. This contains a comma-separated list of protocol suite names specifying which protocol suites to enable on this HttpsURLConnection. See the SSLSocket.setEnabledProtocols(String[]) method.
Default HTTPS port | 443 | * Customize via port field in the HTTPS URL.
JCE encryption algorithms used by the SunJSSE provider | SunJCE implementations | Give alternative JCE algorithm providers a higher preference order than the SunJCE provider
Default sizing buffers for large SSL/TLS packets | None | * jsse.SSLEngine.acceptLargeFragments system property. By setting this system property to true, SSLSession will size buffers to handle large data packets by default. This may cause applications to allocate unnecessarily large SSLEngine buffers. Instead, applications should dynamically check for buffer overflow conditions and resize buffers as appropriate.
Allow Unsafe SSL/TLS Renegotiations | false | * sun.security.ssl.allowUnsafeRenegotiation system property. Setting this system property to true permits full (unsafe) legacy renegotiation.
Allow Legacy Hello Messages (Renegotiations) | true | * sun.security.ssl.allowLegacyHelloMessages system property. Setting this system property to true allows the peer to handshake without requiring the proper RFC 5746 messages.
Default Enabled TLS Protocols | None | jdk.tls.client.protocols system property. To enable specific SunJSSE protocols on the client, specify them in a comma-separated list within quotation marks; all other supported protocols are then disabled on the client. For example, if the value of this property is "TLSv1,TLSv1.1", then the default protocol settings on the client for TLSv1 and TLSv1.1 are enabled on the client, while SSLv3, TLSv1.2, and SSLv2Hello are disabled on the client.
Size of ephemeral Diffie-Hellman keys | 1024 bits | jdk.tls.ephemeralDHKeySize system property.

* This property is currently used by the JSSE implementation, but it is not guaranteed to be examined and used by other implementations. If it is examined by another implementation, then that implementation should handle it in the same manner as the JSSE implementation does. There is no guarantee the property will continue to exist or be of the same type (system or security) in future releases.

Note: Some items are customized by setting java.lang.System properties, whereas others are customized by setting java.security.Security properties. The following sections explain how to set values for both types of properties.

How to Specify a java.lang.System Property

You can customize some aspects of JSSE by setting system properties. There are several ways to set these properties:

  • To set a system property statically, use the -D option of the java command. For example, to run an application named MyApp and set the javax.net.ssl.trustStore system property to specify a truststore named MyCacertsFile, enter the following:

            java -Djavax.net.ssl.trustStore=MyCacertsFile MyApp

  • To set a system property dynamically, call the java.lang.System.setProperty() method in your code:

            System.setProperty("propertyName", "propertyValue");

    For example, a setProperty() call corresponding to the previous example for setting the javax.net.ssl.trustStore system property to specify a truststore named "MyCacertsFile" would be:

            System.setProperty("javax.net.ssl.trustStore", "MyCacertsFile");

  • In the Java Deployment environment (Plug-In/Web Start), there are several ways to set the system properties. For more information, see Java Rich Internet Applications Development and Deployment.

    • Use the Java Control Panel to set the Runtime Environment Property on a local or per-VM basis. This creates a local deployment.properties file. Deployers can also distribute an enterprise wide deployment.properties file by using the deployment.config mechanism. For more information, see Deployment Configuration File and Properties.

    • To set a property for a specific applet, use the HTML subtag <PARAM> "java_arguments" within the <APPLET> tag. For more information, see the java_arguments section of the Java Rich Internet Applications Guide.

    • To set the property in a specific Java Web Start application or applet using Plugin2, use the JNLP property subelement of the resources element. For more information, see the resources Element section of the Java Web Start Guide.

How to Specify a java.security.Security Property

You can customize some aspects of JSSE by setting security properties. You can set a security property either statically or dynamically:

  • To set a security property statically, add a line to the security properties file. The security properties file is located at java-home/lib/security/java.security.

    java-home refers to the directory where the JRE is installed, as described in The Installation Directory.

    To specify a security property value in the security properties file, you add a line of the following form:

            propertyName=propertyValue

    For example, suppose that you want to specify a different key manager factory algorithm name than the default SunX509. You do this by specifying the algorithm name as the value of a security property named ssl.KeyManagerFactory.algorithm. For example, to set the value to MyX509, add the following line to the security properties file:

            ssl.KeyManagerFactory.algorithm=MyX509

  • To set a security property dynamically, call the java.security.Security.setProperty method in your code:

            Security.setProperty("propertyName," "propertyValue");

    For example, a call to the setProperty() method corresponding to the previous example for specifying the key manager factory algorithm name would be:

            Security.setProperty("ssl.KeyManagerFactory.algorithm", "MyX509");

Customizing the X509Certificate Implementation

The X509Certificate implementation returned by the X509Certificate.getInstance() method is by default the implementation from the JSSE implementation.

You can optionally cause a different implementation to be returned. To do so, specify the name (and package) of the other implementation's class as the value of a security property named cert.provider.x509v1. For example, if the class is called MyX509CertificateImpl and it appears in the com.cryptox package, then you should add the following line to the security properties file:

    cert.provider.x509v1=com.cryptox.MyX509CertificateImpl

Specifying an Alternative HTTPS Protocol Implementation

You can communicate securely with an SSL-enabled web server by using the HTTPS URL scheme for the java.net.URL class. The JDK provides a default HTTPS URL implementation.

If you want an alternative HTTPS protocol implementation to be used, set the java.protocol.handler.pkgs system property to include the new class name. This action causes the specified classes to be found and loaded before the JDK default classes. See the java.net.URL class documentation for details.

Note: In past JSSE releases, you had to set the java.protocol.handler.pkgs system property during JSSE installation. This step is no longer required unless you want to obtain an instance of com.sun.net.ssl.HttpsURLConnection. For more information, see Code Using the HttpsURLConnection Class in the "Troubleshooting" section.

Customizing the Provider Implementation

JDK 1.4 and later releases come standard with a JSSE Cryptographic Service Provider, or provider for short, named SunJSSE. Providers are essentially packages that implement one or more engine classes for specific cryptographic algorithms. The JSSE engine classes are SSLContext, KeyManagerFactory, and TrustManagerFactory. For more information about providers and engine classes, see the Java Cryptography Architecture Reference Guide.

Note: The transformation strings used when SunJSSE calls Cipher.getInstance() are "RSA/ECB/PKCS1Padding", "RC4", "DES/CBC/NoPadding", and "DESede/CBC/NoPadding". For further information about the Cipher class and transformation strings see the Java Cryptography Architecture Reference Guide.

Before it can be used, a provider must be registered, either statically or dynamically. You do not need to register the SunJSSE provider because it is preregistered. If you want to use other providers, read the following sections to see how to register them.

Registering the Cryptographic Service Provider Statically

You register a provider statically by adding a line of the following form to the security properties file:

    security.provider.n=providerClassName

This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). "1" is the most preferred, followed by "2", and so on.

The providerClassName is the fully qualified name of the provider class. You obtain this name from the provider vendor.

The standard security provider and the SunJSSE provider shipped with JDK 6 are automatically registered for you; the following lines appear in the java.security security properties file to register the SunJCE security provider with preference order 5 and the SunJSSE provider with preference order 4:

    security.provider.1=sun.security.pkcs11.SunPKCS11 \
    ${java.home}/lib/security/sunpkcs11-solaris.cfg
    security.provider.2=sun.security.provider.Sun
    security.provider.3=sun.security.rsa.SunRsaSign
    security.provider.4=com.sun.net.ssl.internal.ssl.Provider
    security.provider.5=com.sun.crypto.provider.SunJCE
    security.provider.6=sun.security.jgss.SunProvider
    security.provider.7=com.sun.security.sasl.Provider

To use another JSSE provider, add a line registering the other provider, giving it whatever preference order you prefer.

You can have more than one JSSE provider registered at the same time. The registered providers may include different implementations for different algorithms for different engine classes, or they may have support for some or all of the same types of algorithms and engine classes. When a particular engine class implementation for a particular algorithm is searched for, if no specific provider is specified for the search, then the providers are searched in preference order and the implementation from the first provider that supplies an implementation for the specified algorithm is used.

Registering the Cryptographic Service Provider Dynamically

Instead of registering a provider statically, you can add the provider dynamically at runtime by calling the Security.addProvider() method at the beginning of your program. For example, to dynamically add a provider whose provider class name is MyProvider and whose MyProvider class resides in the com.ABC package, you would call:

    Security.addProvider(new com.ABC.MyProvider());

The Security.addProvider() method adds the specified provider to the next available preference position.

This type of registration is not persistent and can only be done by a program with sufficient permissions.

Customizing the Default Keystores and Truststores, Store Types, and Store Passwords

Whenever a default SSLSocketFactory or SSLServerSocketFactory is created (via a call to SSLSocketFactory.getDefault or SSLServerSocketFactory.getDefault), and this default SSLSocketFactory (or SSLServerSocketFactory) comes from the JSSE reference implementation, a default SSLContext is associated with the socket factory. (The default socket factory will come from the JSSE implementation.)

This default SSLContext is initialized with a default KeyManager and a default TrustManager. If a keystore is specified by the javax.net.ssl.keyStore system property and an appropriate javax.net.ssl.keyStorePassword system property, then the KeyManager created by the default SSLContext will be a KeyManager implementation for managing the specified keystore. (The actual implementation will be as specified in Customizing the Default Key and Trust Managers.) If no such system property is specified, then the keystore managed by the KeyManager will be a new empty keystore.

Generally, the peer acting as the server in the handshake will need a keystore for its KeyManager in order to obtain credentials for authentication to the client. However, if one of the anonymous cipher suites is selected, then the server's KeyManager keystore is not necessary. And, unless the server requires client authentication, the peer acting as the client does not need a KeyManager keystore. Thus, in these situations it may be OK if no javax.net.ssl.keyStore system property value is defined.

Similarly, if a truststore is specified by the javax.net.ssl.trustStore system property, then the TrustManager created by the default SSLContext will be a TrustManager implementation for managing the specified truststore. In this case, if such a property exists but the file it specifies does not, then no truststore is used. If no javax.net.ssl.trustStore property exists, then a default truststore is searched for. If a truststore named java-home/lib/security/jssecacerts is found, it is used. If not, then a truststore named java-home/lib/security/cacerts is searched for and used (if it exists). For more information about java-home, see The Installation Directory. Finally, if a truststore is still not found, then the truststore managed by the TrustManager will be a new empty truststore.

Note: The JDK ships with a limited number of trusted root certificates in the java-home/lib/security/cacerts file. As documented in keytool reference pages, it is your responsibility to maintain (that is, add and remove) the certificates contained in this file if you use this file as a truststore.

Depending on the certificate configuration of the servers that you contact, you may need to add additional root certificates. Obtain the needed specific root certificates from the appropriate vendor.

If the javax.net.ssl.keyStoreType and/or javax.net.ssl.keyStorePassword system properties are also specified, then they are treated as the default KeyManager keystore type and password, respectively. If no type is specified, then the default type is that returned by the KeyStore.getDefaultType() method, which is the value of the keystore.type security property, or "jks" if no such security property is specified. If no keystore password is specified, then it is assumed to be a blank string "".

Similarly, if the javax.net.ssl.trustStoreType and/or javax.net.ssl.trustStorePassword system properties are also specified, then they are treated as the default truststore type and password, respectively. If no type is specified, then the default type is that returned by the KeyStore.getDefaultType() method. If no truststore password is specified, then it is assumed to be a blank string "".

Note: This section describes the current JSSE reference implementation behavior. The system properties described in this section are not guaranteed to continue to have the same names and types (system or security) or even to exist at all in future releases. They are also not guaranteed to be examined and used by any other JSSE implementations. If they are examined by an implementation, then that implementation should handle them in the same manner as the JSSE reference implementation does, as described herein.

Customizing the Default Key Managers and Trust Managers

As noted in Customizing the Default Keystores and Truststores, Store Types, and Store Passwords, whenever a default SSLSocketFactory or SSLServerSocketFactory is created, and this default SSLSocketFactory (or SSLServerSocketFactory) comes from the JSSE reference implementation, a default SSLContext is associated with the socket factory.

This default SSLContext is initialized with a KeyManager and a TrustManager. The KeyManager and/or TrustManager supplied to the default SSLContext will be an implementation for managing the specified keystore or truststore, as described in the aforementioned section.

The KeyManager implementation chosen is determined by first examining the ssl.KeyManagerFactory.algorithm security property. If such a property value is specified, then a KeyManagerFactory implementation for the specified algorithm is searched for. The implementation from the first provider that supplies an implementation is used. Its getKeyManagers() method is called to determine the KeyManager to supply to the default SSLContext. Technically, getKeyManagers() returns an array of KeyManager objects, one KeyManager for each type of key material. If no such security property value is specified, then the default value of SunX509 is used to perform the search.

Note: A KeyManagerFactory implementation for the SunX509 algorithm is supplied by the SunJSSE provider. The KeyManager that it specifies is a javax.net.ssl.X509KeyManager implementation.

Similarly, the TrustManager implementation chosen is determined by first examining the ssl.TrustManagerFactory.algorithm security property. If such a property value is specified, then a TrustManagerFactory implementation for the specified algorithm is searched for. The implementation from the first provider that supplies an implementation is used. Its getTrustManagers() method is called to determine the TrustManager to supply to the default SSLContext. Technically, getTrustManagers() returns an array of TrustManager objects, one TrustManager for each type of trust material. If no such security property value is specified, then the default value of PKIX is used to perform the search.

Note: A TrustManagerFactory implementation for the PKIX algorithm is supplied by the SunJSSE provider. The TrustManager that it specifies is a javax.net.ssl.X509TrustManager implementation.

Note: This section describes the current JSSE reference implementation behavior. The system properties described in this section are not guaranteed to continue to have the same names and types (system or security) or even to exist at all in future releases. They are also not guaranteed to be examined and used by any other JSSE implementations. If they are examined by an implementation, then that implementation should handle them in the same manner as the JSSE reference implementation does, as described herein.

Disabled Cryptographic Algorithms

The cryptographic hash algorithm MD2 is no longer considered secure. Java SE 7 included two new security properties and a new API that support disabling specific cryptographic algorithms.

The jdk.tls.disabledAlgorithms property applies to TLS handshaking, whereas the jdk.certpath.disabledAlgorithms property applies to certification path processing.

From JDK 8 onwards, the default value of jdk.certpath.disabledAlgorithms includes RSA keySize < 1024. This means the use of certificates with RSA key size less than 1024 bits in length is restricted. The default value of jdk.certpath.disabledAlgorithms is now as follows:

    jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024

This means that any certificate signed with MD2 or with a RSA key of size < 1024, is not acceptable.

Each security property contains a list of cryptographic algorithms that will not be used during certification path processing. The exact syntax of the properties is described in the java-home/lib/security/java.security file, but is briefly summarized here. The algorithm names are separated by commas. Furthermore, you can also specify certain key sizes that cannot be used.

For example, the following line in java.security specifies that the MD2 and DSA algorithms must not be used for certification path processing, and RSA is disabled for key sizes less than 2048 bits.

    jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048

Customizing the Encryption Algorithm Providers

The SunJSSE provider uses the SunJCE implementation for all its cryptographic needs. Although it is recommended that you leave the provider at its regular position, you can use implementations from other JCA or JCE providers by registering them before the SunJCE provider. The standard JCA mechanism can be used to configure providers, either statically via the security properties file java-home/lib/security/java.security, or dynamically via the addProvider() or insertProviderAt() method in the java.security.Security class. For information about java-home, see The Installation Directory.

Customizing Size of Ephemeral Diffie-Hellman Keys

Diffie-Hellman (DH) keys of sizes less than 1024 bits have been deprecated because of their insufficient strength. In JDK 8, you can customize the ephemeral DH key size with the system property jdk.tls.ephemeralDHKeySize. This system property does not impact DH key sizes in ServerKeyExchange messages for exportable cipher suites. It impacts only the DHE_RSA, DHE_DSS, and DH_anon-based cipher suites in the JSSE Oracle provider.

You can specify one of the following values for this property:

  • Undefined: A DH key of size 1024 bits will be used always for non-exportable cipher suites. This is the default value for this property.
  • legacy: The JSSE Oracle provider preserves the legacy behavior (for example, using ephemeral DH keys of sizes 512 bits and 768 bits) of JDK 7 and earlier releases.
  • matched: For non-exportable anonymous cipher suites, the DH key size in ServerKeyExchange messages is 1024 bits. For X.509 certificate based authentication (of non-exportable cipher suites), the DH key size matching the corresponding authentication key is used, except that the size must be between 1024 bits and 2048 bits. For example, if the public key size of an authentication certificate is 2048 bits, then the ephemeral DH key size should be 2048 bits unless the cipher suite is exportable. This key sizing scheme keeps the cryptographic strength consistent between authentication keys and key-exchange keys.
  • A valid integer between 1024 and 2048, inclusively: A fixed ephemeral DH key size of the specified value, in bits, will be used for non-exportable cipher suites.

The following table summaries the minimum and maximum acceptable DH key sizes for each of the possible values for the system property jdk.tls.ephemeralDHKeySize:

Value of jdk.tls.ephemeralDHKeySize | Undefined | legacy | matched | Integer value (fixed)
Exportable DH key size | 512 | 512 | 512 | 512
Non-exportable anonymous cipher suites | 1024 | 768 | 1024 | The fixed key size is specified by a valid integer property value, which must be between 1024 and 2048, inclusively.
Authentication certificate | 1024 | 768 | The key size is the same as the authentication certificate, but must be between 1024 bits and 2048 bits, inclusively. However, the SunJCE provider only supports 2048-bit DH keys larger than 1024 bits. Consequently, you may use the values 1024 or 2048 only. | The fixed key size is specified by a valid integer property value, which must be between 1024 and 2048, inclusively.

Transport Layer Security (TLS) Renegotiation Issue

In the fall of 2009, a flaw was discovered in the SSL/TLS protocols. A fix to the protocol was developed by the IETF TLS Working Group, and current versions of the JDK contain this fix. This section describes the situation in much more detail, along with interoperability issues when communicating with older implementations that do not contain this protocol fix.

The vulnerability allowed for man-in-the-middle (MITM) attacks where chosen plain text could be injected as a prefix to a TLS connection. This vulnerability did not allow an attacker to decrypt or modify the intercepted network communication once the client and server have successfully negotiated a session between themselves.

Additional information is available at CVE-2009-3555 (posted on Mitre's Common Vulnerabilities and Exposures List, 2009) and Understanding the TLS Renegotiation Attack (posted on Eric Rescorla's blog, Educated Guesswork, November 5, 2009).

Phased Approach to Fixing This Issue

The fix for this issue was handled in two phases:

  • Phase 1: Until a protocol fix could be developed, an interim fix that disabled SSL/TLS renegotiations by default was made available in the March 30, 2010 Java SE and Java for Business Critical Patch Update.

  • Phase 2: The IETF issued RFC 5746, which addresses the renegotiation protocol flaw. The following table lists the JDK and JRE releases that include the fix which implements RFC 5746 and supports secure renegotiation.

    Table 7: JDK and JRE Releases With Fixes to the TLS Renegotiation Issue
    JDK Family | Vulnerable Releases | Phase 1 Fix (Disable Renegotiations) | Phase 2 Fix (RFC 5746)
    JDK and JRE 6 | Update 18 and earlier | Updates 19 through 21 | Update 22
    JDK and JRE 5.0 | Update 23 and earlier | Updates 24 through 25 | Update 26
    JDK and JRE 1.4.2 | Update 25 and earlier | Updates 26 through 27 | Update 28

Note: Applications that do not require renegotiations are not affected by the Phase 2 default configuration. However applications that require renegotiations (for example, web servers that initially allow for anonymous client browsing, but later require SSL/TLS authenticated clients):

  • Are not affected if the peer is also compliant with RFC 5746
  • Are affected if the peer has not been upgraded to RFC 5746 (see next section for details)

Description of the Phase 2 Fix

The SunJSSE implementation reenables renegotiations by default for connections to peers compliant with RFC 5746. That is, both the client and server must support RFC 5746 in order to securely renegotiate. SunJSSE provides some interoperability modes for connections with peers that have not been upgraded, but users are strongly encouraged to update both their client and server implementations as soon as possible.

With the Phase 2 fix, SunJSSE has three renegotiation interoperability modes. Each mode fully supports the RFC 5746 secure renegotiation, but has these added semantics when communicating with a peer that has not been upgraded:

  • Strict mode: Requires both client and server be upgraded to RFC 5746 and to send the proper RFC 5746 messages. If not, the initial (or subsequent) handshaking will fail and the connection will be terminated.

  • Interoperable mode (default): Use of the proper RFC 5746 messages is optional; however, legacy (original SSL/TLS specifications) renegotiations are disabled if the proper messages are not used. Initial legacy connections are still allowed, but legacy renegotiations are disabled. This is the best mix of security and interoperability, and is the default setting.

  • Insecure mode: Permits full legacy renegotiation. Most interoperable with legacy peers but vulnerable to the original MITM attack.

The three mode distinctions only affect a connection with a peer that has not been upgraded. Ideally, strict (full RFC 5746) mode should be used for all clients and servers; however, it will take some time for all deployed SSL/TLS implementations to support RFC 5746, because the interoperable mode is the current default.

Table 8 contains interoperability information about the modes for various cases in which the client and/or server are either updated to support RFC 5746 or not.

Table 8: Interoperability Information
Client | Server | Mode
Updated Updated

Secure renegotiation in all modes.
Legacy Footnote 1 Updated
  • Strict
    If clients do not send the proper RFC 5746 messages, then initial connections will immediately be terminated by the server (SSLHandshakeException or handshake_failure).
  • Interoperable
    Initial connections from legacy clients are allowed (missing RFC 5746 messages), but renegotiations will not be allowed by the server.     Footnote 2 Footnote 3
  • Insecure
    Connections and renegotiations with legacy clients are allowed, but are vulnerable to the original MITM attack.
Updated Legacy Footnote 1
  • Strict
    If the server does not respond with the proper RFC 5746 messages, then the client will immediately terminate the connection (SSLHandshakeException or handshake_failure).
  • Interoperable
    Initial connections from legacy servers are allowed (missing RFC 5746 messages), but renegotiations will not be allowed by the server. Footnote 2 Footnote 3
  • Insecure
    Connections and renegotiations with legacy servers are allowed, but are vulnerable to the original MITM attack.
Legacy Footnote 1 | Legacy Footnote 1 | Existing SSL/TLS behavior, vulnerable to the MITM attack.

Footnote 1 "Legacy" means the original SSL/TLS specifications (that is, not RFC 5746).

Footnote 2 SunJSSE Phase 1 implementations reject renegotiations unless specifically reenabled. If renegotiations are reenabled, then they will be treated as "Legacy" by the peer that is compliant with RFC 5746, because they do not send the proper RFC 5746 messages.

Footnote 3 In SSL/TLS, renegotiations can be initiated by either side. Like the Phase 1 fix, applications communicating with a peer that has not been upgraded in Interoperable mode and that attempt to initiate renegotiation (via SSLSocket.startHandshake() or SSLEngine.beginHandshake()) will receive an SSLHandshakeException (IOException) and the connection will be shut down (handshake_failure). Applications that receive a renegotiation request from a peer that has not been upgraded will respond according to the type of connection in place:

  • TLSv1
    A warning alert message of type no_renegotiation(100) will be sent to the peer and the connection will remain open. Older versions of SunJSSE will shut down the connection when a no_renegotiation alert is received.
  • SSLv3
    The application will receive an SSLHandshakeException, and the connection will be closed (handshake_failure). The no_renegotiation alert is not defined in the SSLv3 specification.

The following system properties are used to set the mode:

  • sun.security.ssl.allowUnsafeRenegotiation (introduced in Phase 1) controls whether legacy (unsafe) renegotiations are permitted.
  • sun.security.ssl.allowLegacyHelloMessages (introduced in Phase 2) allows the peer to perform the handshake process without requiring the proper RFC 5746 messages.
Table 9: Values of the System Properties for Setting the Interoperability Mode
Mode | allowLegacyHelloMessages | allowUnsafeRenegotiation
Strict | false | false
Interoperable (default) | true | false
Insecure | true | true

Caution: Do not reenable the insecure SSL/TLS renegotiation, as this would reestablish the vulnerability.

For information about how to configure a specific mode by setting a system property, see How to Specify a java.lang.System Property.

Workarounds and Alternatives to SSL/TLS Renegotiation

All peers should be updated to RFC 5746-compliant implementation as soon as possible. Even with this RFC 5746 fix, communications with peers that have not been upgraded will be affected if a renegotiation is necessary. Here are a few suggested options:

  • Restructure the peer to not require renegotiation.

    Renegotiations are typically used by web servers that initially allow for anonymous client browsing but later require SSL/TLS authenticated clients, or that may initially allow weak cipher suites but later need stronger ones. The alternative is to require client authentication or strong cipher suites during the initial negotiation. There are a couple of options for doing so:

    • If an application has a browse mode until a certain point is reached and a renegotiation is required, then you can restructure the server to eliminate the browse mode and require all initial connections be strong.

    • Break the server into two entities, with the browse mode occurring on one entity, and using a second entity for the more secure mode. When the renegotiation point is reached, transfer any relevant information between the servers.

    Both of these options require a fair amount of work, but will not reopen the original security flaw.

  • Set renegotiation interoperability mode to "insecure" using the system properties.

    See the Description of the Phase 2 Fix for information and warnings.

Implementation Details

RFC 5746 defines two new data structures, which are mentioned here for advanced users:

  • A pseudo-cipher suite called the Signaling Cipher Suite Value (SCSV), "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
  • A TLS extension called the Renegotiation Info (RI).

Either of these can be used to signal that an implementation is RFC 5746-compliant and can perform secure renegotiations. For more relevant technical discussions, see the IETF email discussion from November 2009 to February 2010.

RFC 5746 enables clients to send either an SCSV or RI in the first ClientHello. For maximum interoperability, SunJSSE uses the SCSV by default, as a few TLS/SSL servers do not handle unknown extensions correctly. The presence of the SCSV in the enabled cipher suites (SSLSocket.setEnabledCipherSuites() or SSLEngine.setEnabledCipherSuites()) determines whether the SCSV is sent in the initial ClientHello, or if an RI should be sent instead.

SSLv2 does not support SSL/TLS extensions. If the SSLv2Hello protocol is enabled, then the SCSV is sent in the initial ClientHello.

Description of the Phase 1 fix

As previously mentioned, the Phase 1 Fix was to disable renegotiations by default until a fix compliant with RFC 5746 could be developed. Renegotiations could be reenabled by setting the sun.security.ssl.allowUnsafeRenegotiation system property. The Phase 2 fix uses the same sun.security.ssl.allowUnsafeRenegotiation system property, but also requires it to use RFC 5746 messages.

All applications should upgrade to the Phase 2 RFC 5746 fix as soon as possible.

Hardware Acceleration and Smartcard Support

The Java Cryptography Architecture (JCA) is a set of packages that provides a framework and implementations for encryption, key generation and key agreement, and message authentication code (MAC) algorithms. The SunJSSE provider uses JCA exclusively for all of its cryptographic operations and can automatically take advantage of JCE features and enhancements, including JCA's support for PKCS#11. This support enables the SunJSSE provider to use hardware cryptographic accelerators for significant performance improvements and to use smartcards as keystores for greater flexibility in key and trust management.

Use of hardware cryptographic accelerators is automatic if JCA has been configured to use the Oracle PKCS#11 provider, which in turn has been configured to use the underlying accelerator hardware. The provider must be configured before any other JCA providers in the provider list. For details on how to configure the Oracle PKCS#11 provider, see the PKCS#11 Guide.

Configuring JSSE to Use Smartcards as Keystores and Truststores

Support for PKCS#11 in JCA also enables access to smartcards as a keystore. For details on how to configure the type and location of the keystores to be used by JSSE, see the Customizing JSSE section. To use a smartcard as a keystore or truststore, set the javax.net.ssl.keyStoreType and javax.net.ssl.trustStoreType system properties, respectively, to pkcs11, and set the javax.net.ssl.keyStore and javax.net.ssl.trustStore system properties, respectively, to NONE. To specify the use of a specific provider, use the javax.net.ssl.keyStoreProvider and javax.net.ssl.trustStoreProvider system properties (for example, set them to SunPKCS11-joe). By using these properties, you can configure an application that previously depended on these properties to access a file-based keystore to use a smartcard keystore with no changes to the application.

Some applications request the use of keystores programmatically. These applications can continue to use the existing APIs to instantiate a Keystore and pass it to its key manager and trust manager. If the Keystore instance refers to a PKCS#11 keystore backed by a Smartcard, then the JSSE application will have access to the keys on the smartcard.

Multiple and Dynamic Keystores

smartcards (and other removable tokens) have additional requirements for an X509KeyManager. Different smartcards can be present in a smartcard reader during the lifetime of a Java application, and they can be protected using different passwords.

The java.security.KeyStore.Builder class abstracts the construction and initialization of a KeyStore object. It supports the use of CallbackHandler for password prompting, and its subclasses can be used to support additional features as desired by an application. For example, it is possible to implement a Builder that allows individual KeyStore entries to be protected with different passwords. The javax.net.ssl.KeyStoreBuilderParameters class then can be used to initialize a KeyManagerFactory using one or more of these Builder objects.

A X509KeyManager implementation in the SunJSSE provider called NewSunX509 supports these parameters. If multiple certificates are available, it attempts to pick a certificate with the appropriate key usage and prefers valid to expired certificates.

The following example illustrates how to tell JSSE to use both a PKCS#11 keystore (which might in turn use a smartcard) and a PKCS#12 file-based keystore.

import javax.net.ssl.*;
import java.security.KeyStore.*;
...

// Specify keystore builder parameters for PKCS#11 keystores
Builder scBuilder = Builder.newInstance("PKCS11", null,
    new CallbackHandlerProtection(myGuiCallbackHandler));

// Specify keystore builder parameters for a specific PKCS#12 keystore
Builder fsBuilder = Builder.newInstance("PKCS12", null,
    new File(pkcsFileName), new PasswordProtection(pkcsKsPassword));

// Wrap them as key manager parameters
ManagerFactoryParameters ksParams = new KeyStoreBuilderParameters(
    Arrays.asList(new Builder[] { scBuilder, fsBuilder }) );

// Create KeyManagerFactory
KeyManagerFactory factory = KeyManagerFactory.getInstance("NewSunX509");

// Pass builder parameters to factory
factory.init(ksParams);

// Use factory
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(factory.getKeyManagers(), null, null);

Kerberos Cipher Suites

The SunJSSE provider has support for Kerberos cipher suites, as described in RFC 2712. The following cipher suites are supported but not enabled by default:

  • TLS_KRB5_WITH_RC4_128_SHA
  • TLS_KRB5_WITH_RC4_128_MD5
  • TLS_KRB5_WITH_3DES_EDE_CBC_SHA
  • TLS_KRB5_WITH_3DES_EDE_CBC_MD5
  • TLS_KRB5_WITH_DES_CBC_SHA
  • TLS_KRB5_WITH_DES_CBC_MD5
  • TLS_KRB5_EXPORT_WITH_RC4_40_SHA
  • TLS_KRB5_EXPORT_WITH_RC4_40_MD5
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5

To enable the use of these cipher suites, you must do so explicitly. For more information, see the API documentation for the SSLEngine.setEnabledCipherSuites() and SSLSocket.setEnabledCipherSuites() methods. As with all other SSL/TLS cipher suites, if a cipher suite is not supported by the peer, then it will not be selected during cipher negotiation. Furthermore, if the application and/or server cannot acquire the necessary Kerberos credentials, then the Kerberos cipher suites also will not be selected.

The following is an example of a TLS client that will only use the TLS_KRB5_WITH_DES_CBC_SHA cipher suite:

// Create socket
SSLSocketFactory sslsf = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslSocket = (SSLSocket) sslsf.createSocket(tlsServer, serverPort);

// Enable only one cipher suite
String enabledSuites[] = { "TLS_KRB5_WITH_DES_CBC_SHA" };
sslSocket.setEnabledCipherSuites(enabledSuites);

Kerberos Requirements

You must have the Kerberos infrastructure set up in your deployment environment before you can use the Kerberos cipher suites with JSSE. In particular, both the TLS client and server must have accounts set up with the Kerberos Key Distribution Center (KDC). At runtime, if one or more of the Kerberos cipher suites have been enabled, then the TLS client and server will acquire their Kerberos credentials associated with their respective account from the KDC. For example, a TLS server running on the machine mach1.imc.org in the Kerberos realm IMC.ORG must have an account with the name host/mach1.imc.org@IMC.ORG and be configured to use the KDC for IMC.ORG. For information about using Kerberos with Java SE, see the Kerberos Requirements document.

An application can acquire its Kerberos credentials by using the Java Authentication and Authorization Service (JAAS) and a Kerberos login module. The JDK comes with a Kerberos login module. You can use the Kerberos cipher suites with JSSE with or without JAAS programming, similar to how you can use the Java Generic Security Services (Java GSS) with or without JAAS programming.

To use the Kerberos cipher suites with JSSE without JAAS programming, you must use the index names com.sun.net.ssl.server or other for the TLS server JAAS configuration entry, and com.sun.net.ssl.client or other for the TLS client, and set the javax.security.auth.useSubjectCredsOnly system property to false. For example, a TLS server that is not using JAAS programming might have the following JAAS configuration file:

    com.sun.net.ssl.server {
      com.sun.security.auth.module.Krb5LoginModule required
            principal="host/mach1.imc.org@IMC.ORG"
            useKeyTab=true
            keyTab=mach1.keytab
            storeKey=true;
    };

An example of how to use Java GSS and Kerberos without JAAS programming is described in the Java GSS Tutorial. You can adapt it to use JSSE by replacing Java GSS calls with JSSE calls.

To use the Kerberos cipher suites with JAAS programming, you can use any index name because your application is responsible for creating the JAAS LoginContext using the index name, and then wrapping the JSSE calls inside of a Subject.doAs() or Subject.doAsPrivileged() call. An example of how to use JAAS with Java GSS and Kerberos is described in the Java GSS Tutorial. You can adapt it to use JSSE by replacing Java GSS calls with JSSE calls.

If you have trouble using or configuring the JSSE application to use Kerberos, see the Troubleshooting section of the Java GSS Tutorial.

Peer Identity Information

To determine the identity of the peer of an SSL connection, use the getPeerPrincipal() method in the following classes:

  • javax.net.ssl.SSLSession
  • javax.net.ssl.HttpsURLConnection
  • javax.net.HandshakeCompletedEvent

Similarly, to get the identity that was sent to the peer (to identify the local entity), use the getLocalPrincipal() method in these classes. For X509-based cipher suites, these methods will return an instance of javax.security.auth.x500.X500Principal; for Kerberos cipher suites, these methods will return an instance of javax.security.auth.kerberos.KerberosPrincipal.

JSSE applications use getPeerCertificates() and similar methods in javax.net.ssl.SSLSession, javax.net.ssl.HttpsURLConnection, and javax.net.HandshakeCompletedEvent classes to obtain information about the peer. When the peer does not have any certificates, SSLPeerUnverifiedException is thrown.

If the application must determine only the identity of the peer or identity sent to the peer, then it should use the getPeerPrincipal() and getLocalPrincipal() methods, respectively. It should use getPeerCertificates() and getLocalCertificates() methods only if it must examine the contents of those certificates. Furthermore, the application must be prepared to handle the case where an authenticated peer might not have any certificate.

Security Manager

When the security manager has been enabled, in addition to the SocketPermission needed to communicate with the peer, a TLS client application that uses the Kerberos cipher suites also needs the following permission:

javax.security.auth.kerberos.ServicePermission(serverPrincipal, "initiate");

In the preceding code, serverPrincipal is the Kerberos principal name of the TLS server that the TLS client will be communicating with (such as host/mach1.imc.org@IMC.ORG). A TLS server application needs the following permission:

javax.security.auth.kerberos.ServicePermission(serverPrincipal, "accept");

In the preceding code, serverPrincipal is the Kerberos principal name of the TLS server (such as host/mach1.imc.org@IMC.ORG). If the server or client must contact the KDC (for example, if its credentials are not cached locally), then it also needs the following permission:

javax.security.auth.kerberos.ServicePermission(tgtPrincipal, "initiate");
In the preceding code, tgtPrincipal is the principal name of the KDC (such as krbtgt/IMC.ORG@IMC.ORG).

Additional Keystore Formats (PKCS12)

The PKCS#12 (Personal Information Exchange Syntax Standard) specifies a portable format for storage and/or transport of a user's private keys, certificates, miscellaneous secrets, and other items. The SunJSSE provider supplies a complete implementation of the PKCS12 java.security.KeyStore format for reading and writing PKCS12 files. This format is also supported by other toolkits and applications for importing and exporting keys and certificates, such as Netscape/Mozilla, Microsoft's Internet Explorer, and OpenSSL. For example, these implementations can export client certificates and keys into a file using the .p12 file name extension.

With the SunJSSE provider, you can access PKCS12 keys through the KeyStore API with a keystore type of PKCS12. In addition, you can list the installed keys and associated certificates by using the keytool command with the -storetype option set to pkcs12. For more information about keytool, see Security Tools.

Server Name Indication (SNI) Extension

The SNI extension is a feature that extends the SSL/TLS protocols to indicate what server name the client is attempting to connect to during handshaking. Servers can use server name indication information to decide if specific SSLSocket or SSLEngine instances should accept a connection. For example, when multiple virtual or name-based servers are hosted on a single underlying network address, the server application can use SNI information to determine whether this server is the exact server that the client wants to access. Instances of this class can be used by a server to verify the acceptable server names of a particular type, such as host names. For more information, see section 3 of TLS Extensions (RFC 6066).

Developers of client applications can explicitly set the server name indication using the SSLParameters.setServerNames(List<SNIServerName> serverNames) method. The following example illustrates this functionality:

SSLSocketFactory factory = ...
SSLSocket sslSocket = factory.createSocket("172.16.10.6", 443);
// SSLEngine sslEngine = sslContext.createSSLEngine("172.16.10.6", 443);

SNIHostName serverName = new SNIHostName("www.example.com");
List<SNIServerName> serverNames = new ArrayList<>(1);
serverNames.add(serverName);

SSLParameters params = sslSocket.getSSLParameters();
params.setServerNames(serverNames);
sslSocket.setSSLParameters(params);
// sslEngine.setSSLParameters(params);

Developers of server applications can use the SNIMatcher class to decide how to recognize server name indication. The following two examples illustrate this functionality:

Example 1

SSLSocket sslSocket = sslServerSocket.accept();

SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.(com|org)");
Collection<SNIMatcher> matchers = new ArrayList<>(1);
matchers.add(matcher);

SSLParameters params = sslSocket.getSSLParameters();
params.setSNIMatchers(matchers);
sslSocket.setSSLParameters(params);

Example 2

SSLServerSocket sslServerSocket = ...;

SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.(com|org)");
Collection<SNIMatcher> matchers = new ArrayList<>(1);
matchers.add(matcher);

SSLParameters params = sslServerSocket.getSSLParameters();
params.setSNIMatchers(matchers);
sslServerSocket.setSSLParameters(params);

SSLSocket sslSocket = sslServerSocket.accept();

The following list provides examples for the behavior of the SNIMatcher when receiving various server name indication requests in the ClientHello message:

  • Matcher configured to www\\.example\\.com:

    • If the requested host name is www.example.com, then it will be accepted and a confirmation will be sent in the ServerHello message.
    • If the requested host name is www.example.org, then it will be rejected with an unrecognized_name fatal error.
    • If there is no requested host name or it is empty, then the request will be accepted but no confirmation will be sent in the ServerHello message.

  • Matcher configured to www\\.invalid\\.com:

    • If the requested host name is www.example.com, then it will be rejected with an unrecognized_name fatal error.
    • If the requested host name is www.example.org, then it will be accepted and a confirmation will be sent in the ServerHello message.
    • If there is no requested host name or it is empty, then the request will be accepted but no confirmation will be sent in the ServerHello message.

  • Matcher is not configured:

    Any requested host name will be accepted but no confirmation will be sent in the ServerHello message.

For descriptions of new classes that implement the SNI extension, see:

  • StandardConstants Class
  • SNIServerName Class
  • SNIMatcher Class
  • SNIHostName Class

For examples, see Using the Server Name Indication (SNI) Extension.

Troubleshooting

This section contains information for troubleshooting JSSE. First, it provides some common configuration problems and ways to solve them, and then it describes helpful debugging utilities.

Configuration Problems

This section describes some common configuration problems that might arise when you use JSSE.

CertificateException While Handshaking

Problem: When negotiating an SSL connection, the client or server throws a CertificateException.

Cause 1: This is generally caused by the remote side sending a certificate that is unknown to the local side.

Solution 1: The best way to debug this type of problem is to turn on debugging (see Debugging Utilities) and watch as certificates are loaded and when certificates are received via the network connection. Most likely, the received certificate is unknown to the trust mechanism because the wrong trust file was loaded. Refer to the following sections for more information:

  • JSSE Classes and Interfaces
  • The TrustManager Interface
  • The KeyManager Interface

Cause 2: The system clock is not set correctly. In this case, the perceived time may be outside the validity period on one of the certificates, and unless the certificate can be replaced with a valid one from a truststore, the system must assume that the certificate is invalid, and therefore throw the exception.

Solution 2: Correct the system clock time.

java.security.KeyStoreException: TrustedCertEntry Not Supported

Problem: Attempt to store trusted certificates in PKCS12 keystore throws java.security.KeyStoreException: TrustedCertEntry not supported.

Cause: Storing trusted certificates in a PKCS12 keystore is not supported. PKCS12 is mainly used to deliver private keys with the associated certificate chains. It does not have any notion of "trusted" certificates. In terms of interoperability, other PKCS12 vendors have the same restriction. Browsers such as Mozilla and Internet Explorer do not accept a PKCS12 file with only trusted certificates.

Solution: Use the JKS keystore for storing trusted certificates.

Runtime Exception: SSL Service Not Available

Problem: When running a program that uses JSSE, an exception occurs indicating that an SSL service is not available. For example, an exception similar to one of the following is thrown:

    Exception in thread "main" java.net.SocketException:
        no SSL Server Sockets

    Exception in thread "main":
        SSL implementation not available

Cause: There was a problem with SSLContext initialization, for example, due to an incorrect password on a keystore or a corrupted keystore (a JDK vendor once shipped a keystore in an unknown format, and that caused this type of error).

Solution: Check initialization parameters. Ensure that any keystores specified are valid and that the passwords specified are correct. One way that you can check this is by trying to use the keytool command-line utility to examine the keystores and the relevant contents.

Runtime Exception: "No available certificate corresponding to the SSL cipher suites which are enabled"

Problem: When trying to run a simple SSL server program, the following exception is thrown:

    Exception in thread "main" javax.net.ssl.SSLException:
        No available certificate corresponding to the SSL cipher suites which are enabled...

Cause: Various cipher suites require certain types of key material. For example, if an RSA cipher suite is enabled, then an RSA keyEntry must be available in the keystore. If no such key is available, then this cipher suite cannot be used. This exception is thrown if there are no available key entries for all of the cipher suites enabled.

Solution: Create key entries for the various cipher suite types, or use an anonymous suite. Anonymous cipher suites are inherently dangerous because they are vulnerable to MITM (man-in-the-middle) attacks. For more information, see RFC 2246.

Refer to the following sections to learn how to pass the correct keystore and certificates:

  • JSSE Classes and Interfaces
  • Customizing the Default Keystores and Truststores, Store Types, and Store Passwords
  • Additional Keystore Formats

Runtime Exception: No Cipher Suites in Common

Problem 1: When handshaking, the client and/or server throw this exception.

Cause 1: Both sides of an SSL connection must agree on a common cipher suite. If the intersection of the client's cipher suite set with the server's cipher suite set is empty, then you will see this exception.

Solution 1: Configure the enabled cipher suites to include common cipher suites, and be sure to provide an appropriate keyEntry for asymmetric cipher suites. Also see Runtime Exception: "No available certificate..." in this section.)

Problem 2: When using Netscape Navigator or Microsoft Internet Explorer to access files on a server that only has DSA-based certificates, a runtime exception occurs indicating that there are no cipher suites in common.

Cause 2: By default, keyEntries created with keytool use DSA public keys. If only DSA keyEntries exist in the keystore, then only DSA-based cipher suites can be used. By default, Navigator and Internet Explorer send only RSA-based cipher suites. Because the intersection of client and server cipher suite sets is empty, this exception is thrown.

Solution 2: To interact with Navigator or Internet Explorer, you should create certificates that use RSA-based keys. To do this, specify the -keyalg RSA option when using keytool. For example:

    keytool -genkeypair -alias duke -keystore testkeys -keyalg rsa

Slowness of the First JSSE Access

Problem: JSSE seems to stall on first access.

Cause: JSSE must have a secure source of random numbers. The initialization takes a while.

Solution: Provide an alternative generator of random numbers, or initialize ahead of time when the overhead will not be noticed:

SecureRandom sr = new SecureRandom();
sr.nextInt();
SSLContext.init(..., ..., sr);

The java-home/lib/security/java.security file also provides a way to specify the source of seed data for SecureRandom. See the contents of the file for more information.

Code Using HttpsURLConnection Class Throws ClassCastException in JSSE 1.0.x

Problem: The following code snippet was written using com.sun.net.ssl.HttpsURLConnection in JSSE 1.0.x:

import com.sun.net.ssl.*;
...deleted...
HttpsURLConnection urlc = new URL("https://example.com/").openConnection();

When running under JSSE 1.0.x, this code returns a javax.net.ssl.HttpsURLConnection object and throws a ClassCastException.

Cause: By default, opening an HTTPS URL will create a javax.net.ssl.HttpsURLConnection.

Solution: Previous releases of the JDK (release 6 and earlier) did not ship with an HTTPS URL implementation. The JSSE 1.0.x implementation did provide such an HTTPS URL handler, and the installation guide described how to set the URL handler search path to obtain a JSSE 1.0.x com.sun.net.ssl.HttpsURLConnection implementation.

In the JDK, there is an HTTPS handler in the default URL handler search path. It returns an instance of javax.net.ssl.HttpsURLConnection. By prepending the old JSSE 1.0.x implementation path to the URL search path via the java.protocol.handler.pkgs variable, you can still obtain a com.sun.net.ssl.HttpsURLConnection, and the code will no longer throw cast exceptions.

See the following examples:
    % java -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol YourClass

    System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");

Socket Disconnected After Sending ClientHello Message

Problem: A socket attempts to connect, sends a ClientHello message, and is immediately disconnected.

Cause: Some SSL/TLS servers will disconnect if a ClientHello message is received in a format they do not understand or with a protocol version number that they do not support.

Solution: Try adjusting the enabled protocols on the client side. This involves modifying or invoking some of the following system properties and methods:

  • System property https.protocols for the HttpsURLConnection class
  • System property jdk.tls.client.protocols
  • SSLContext.getInstance method
  • SSLEngine.setEnabledProtocols method
  • SSLSocket.setEnabledProtocols method
  • SSLParameters.setProtocols and SSLEngine.setSSLParameters methods
  • SSLParameters.setProtocols and SSLSocket.setSSLParameters methods

Some older server implementations speak only SSLv3 and do not understand TLS. Ideally, these implementations should negotiate to SSLv3, but some simply hang up. For backwards compatibility, some SSL/TLS implementations (such as SunJSSE) can send SSLv3/TLS ClientHello messages encapsulated in an SSLv2 ClientHello packet. The SunJSSE provider supports this feature. (See the section Protocols, which lists the protocols that are enabled by default for the SunJSSE provider.) If you want to use this feature, add the SSLv2Hello protocol to the enabled protocol list, if necessary.

Similarly, some other older server implementations can speak to TLSv1 but do not understand TLSv1.1 or TLSv1.2. In this situation, consider using a SSL/TLS version fallback scheme:

  1. Fall back from TLSv1.2 to TLSv1.1 if the server does not understand TLSv1.2.
  2. Fall back from TLSv1.1 to TLSv1.0 if the previous step does not work.
  3. Fall back from TLSv1.0 to SSLv3.0 if the previous step does not work.

For example, if the enabled protocol list on the client is SSLv3, TLSv1, TLSv1.1, and TLSv1.2, a typical SSL/TLS version fallback scheme may look like:

  1. Try to connect to server. If server rejects the SSL/TLS connection request immediately, go to step 2.
  2. Try the version fallback scheme by removing the highest protocol version (for example, TLSv1.2 for the first failure) in the enabled protocol list.
  3. Try to connect to the server again. If server rejects the connection, go to step 2 unless there is no version to which the server can fall back.
  4. If the connection fails and SSLv2Hello is not on the enabled protocol list, restore the enable protocol list and enable SSLv2Hello. (For example, the enable protocol list should be SSLv2Hello, SSLv3, TLSv1, TLSv1.1, and TLSv1.2.) Start again from step 1.

Note: A fallback to a previous version normally means security strength downgrading to a weaker protocol. It is not suggested to use a fallback scheme unless it is really necessary, and you clearly know that the server does not support a higher protocol version.

SunJSSE Cannot Find a JCA Provider That Supports a Required Algorithm and Causes a NoSuchAlgorithmException

Problem: A handshake is attempted and fails when it cannot find a required algorithm. Examples might include:

Exception in thread ...deleted...
    ...deleted...
    Caused by java.security.NoSuchAlgorithmException: Cannot find any
        provider supporting RSA/ECB/PKCS1Padding
or
Caused by java.security.NoSuchAlgorithmException: Cannot find any
    provider supporting AES/CBC/NoPadding

Cause: SunJSSE uses JCE for all its cryptographic algorithms. By default, the Oracle JDK will use the Standard Extension ClassLoader to load the SunJCE provider located in java-home/lib/ext/sunjce_provider.jar. If the file cannot be found or loaded, or if the SunJCE provider has been deregistered from the Provider mechanism and an alternative implementation from JCE is not available, then this exception will be thrown.

Solution: Ensure that the SunJCE is available by checking that the file is loadable and that the provider is registered with the Provider interface. Try to run the following code in the context of your SSL connection:

import javax.crypto.*;

System.out.println("=====Where did you get AES=====");
Cipher c = Cipher.getInstance("AES/CBC/NoPadding");
System.out.println(c.getProvider());

FailedDownloadException Thrown When Trying to Obtain Application Resources from Web Server over SSL

Problem: If you receive a com.sun.deploy.net.FailedDownloadException when trying to obtain application resources from your web server over SSL, and your web server uses the virtual host with Server Name Indication (SNI) extension (such as Apache HTTP Server), then you may have not configured your web server correctly.

Cause: Because Java SE 7 supports the SNI extension in the JSSE client, the requested host name of the virtual server is included in the first message sent from the client to the server during the SSL handshake. The server may deny the client's request for a connection if the requested host name (the server name indication) does not match the expected server name, which should be specified in the virtual host's configuration. This triggers an SSL handshake unrecognized name alert, which results in a FailedDownloadException being thrown.

Solution: To better diagnose the problem, enable tracing through the Java Console. See Tracing and Logging for more information. If the cause of the problem is javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name, it is likely that the virtual host configuration for SNI is incorrect. If you are using Apache HTTP Server, see Name-based Virtual Host Support for information about configuring virtual hosts. In particular, ensure that the ServerName directive is configured properly in a <VirtualHost> block.

For more information, see the following:

  • SSL with Virtual Hosts Using SNI from Apache HTTP Server Wiki
  • SSL/TLS Strong Encryption: FAQ from Apache HTTP Server Documentation
  • RFC 3546, Transport Layer Security (TLS) Extensions
  • Bug 7194590: SSL handshaking error caused by virtual server misconfiguration

Debugging Utilities

JSSE provides dynamic debug tracing support. This is similar to the support used for debugging access control failures in the Java SE platform. The generic Java dynamic debug tracing support is accessed with the java.security.debug system property, whereas the JSSE-specific dynamic debug tracing support is accessed with the javax.net.debug system property.

Note: The debug utility is not an officially supported feature of JSSE.

To view the options of the JSSE dynamic debug utility, use the following command-line option on the java command:

-Djavax.net.debug=help

Note: If you specify the value help with either dynamic debug utility when running a program that does not use any classes that the utility was designed to debug, you will not get the debugging options.

The following complete example shows how to get a list of the debug options for an application named MyApp that uses some of the JSSE classes:

java -Djavax.net.debug=help MyApp

MyApp will not run after the debug help information is printed, as the help code causes the application to exit.

Current options are:

all        turn on all debugging
ssl        turn on ssl debugging

The following can be used with ssl:
    record          enable per-record tracing
    handshake       print each handshake message
    keygen          print key generation data
    session         print session activity
    defaultctx      print default SSL initialization
    sslctx          print SSLContext tracing
    sessioncache    print session cache tracing
    keymanager      print key manager tracing
    trustmanager    print trust manager tracing

handshake debugging can be widened with:
    data            hex dump of each handshake message
    verbose         verbose handshake message printing

record debugging can be widened with:
    plaintext       hex dump of record plaintext
    packet          print raw SSL/TLS packets

The javax.net.debug property value must be either all or ssl, optionally followed by debug specifiers. You can use one or more options. You do not have to have a separator between options, although a separator such as a colon (:) or a comma (,) helps readability. It does not matter what separators you use, and the ordering of the option keywords is also not important.

For an introduction to reading this debug information, see the guide, Debugging SSL/TLS Connections.

The following are examples of using the javax.net.debug property:

  • To view all debugging messages:

        java -Djavax.net.debug=all MyApp

  • To view the hexadecimal dumps of each handshake message, enter the following (the colons are optional):

        java -Djavax.net.debug=ssl:handshake:data MyApp

  • To view the hexadecimal dumps of each handshake message, and to print trust manager tracing, enter the following (the commas are optional):

        java -Djavax.net.debug=SSL,handshake,data,trustmanager MyApp

Code Examples

The following code examples are included in this section:

  • Converting an Unsecure Socket to a Secure Socket
    • Socket Example Without SSL
    • Socket Example With SSL
  • Running the JSSE Sample Code
    • Sample Code Illustrating a Secure Socket Connection Between a Client and a Server
      • Configuration Requirements
      • Running SSLSocketClient
      • Running SSLSocketClientWithTunneling
      • Running SSLSocketClientWithClientAuth
      • Running ClassFileServer
      • Running SSLSocketClientWithClientAuth with ClassFileServer
    • Sample Code Illustrating HTTPS Connections
      • Running URLReader
      • Running URLReaderWithOptions
    • Sample Code Illustrating a Secure RMI Connection
    • Sample Code Illustrating the Use of an SSLEngine
      • Running SSLEngineSimpleDemo
      • Running the NIO-based Server
  • Creating a Keystore to Use with JSSE
  • Using the Server Name Indication (SNI) Extension
    • Typical Client-Side Usage Examples
    • Typical Server-Side Usage Examples
    • Working with Virtual Infrastructures
      • Preparing the ClientHello Parser
      • Virtual Server Dispatcher Based on SSLSocket
      • Virtual Server Dispatcher Based on SSLEngine
      • No SNI Extension Available
      • Failover SSLContext

Converting an Unsecure Socket to a Secure Socket

This section provides examples of source code that illustrate how to use JSSE to convert an unsecure socket connection to a secure socket connection. The code in this section is excerpted from the book Java SE 6 Network Security by Marco Pistoia, et. al.

First, "Socket Example Without SSL" shows sample code that can be used to set up communication between a client and a server using unsecure sockets. This code is then modified in "Socket Example with SSL" to use JSSE to set up secure socket communication.

Socket Example Without SSL

The following examples demonstrates server-side and client-side code for setting up an unsecure socket connection.

In a Java program that acts as a server and communicates with a client using sockets, the socket communication is set up with code similar to the following:

    import java.io.*;
    import java.net.*;

    . . .

    int port = availablePortNumber;

    ServerSocket s;

    try {
        s = new ServerSocket(port);
        Socket c = s.accept();

        OutputStream out = c.getOutputStream();
        InputStream in = c.getInputStream();

        // Send messages to the client through
        // the OutputStream
        // Receive messages from the client
        // through the InputStream
    } catch (IOException e) { }

The client code to set up communication with a server using sockets is similar to the following:

    import java.io.*;
    import java.net.*;

    . . .

    int port = availablePortNumber;
    String host = "hostname";

    try {
        s = new Socket(host, port);

        OutputStream out = s.getOutputStream();
        InputStream in = s.getInputStream();

        // Send messages to the server through
        // the OutputStream
        // Receive messages from the server
        // through the InputStream
    } catch (IOException e) { }

Socket Example with SSL

The following examples demonstrate server-side and client-side code for setting up a secure socket connection.

In a Java program that acts as a server and communicates with a client using secure sockets, the socket communication is set up with code similar to the following. Differences between this program and the one for communication using unsecure sockets are highlighted in bold.

    import java.io.*;
    import javax.net.ssl.*;

    . . .

    int port = availablePortNumber;

    SSLServerSocket s;

    try {
        SSLServerSocketFactory sslSrvFact =
            (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
        s = (SSLServerSocket)sslSrvFact.createServerSocket(port);

        SSLSocket c = (SSLSocket)s.accept();

        OutputStream out = c.getOutputStream();
        InputStream in = c.getInputStream();

        // Send messages to the client through
        // the OutputStream
        // Receive messages from the client
        // through the InputStream
    }

    catch (IOException e) {
    }

The client code to set up communication with a server using secure sockets is similar to the following, where differences with the unsecure version are highlighted in bold:

    import java.io.*;
    import javax.net.ssl.*;

    . . .

    int port = availablePortNumber;
    String host = "hostname";

    try {
        SSLSocketFactory sslFact =
            (SSLSocketFactory)SSLSocketFactory.getDefault();
        SSLSocket s = (SSLSocket)sslFact.createSocket(host, port);

        OutputStream out = s.getOutputStream();
        InputStream in = s.getInputStream();

        // Send messages to the server through
        // the OutputStream
        // Receive messages from the server
        // through the InputStream
    }

    catch (IOException e) {
    }

Running the JSSE Sample Code

The JSSE sample programs illustrate how to use JSSE to:

  • Create a secure socket connection between a client and a server
  • Create a secure connection to an HTTPS website
  • Use secure communications with RMI
  • Illustrate SSLEngine usage

When you use the sample code, be aware that the sample programs are designed to illustrate how to use JSSE. They are not designed to be robust applications.

Note: Setting up secure communications involves complex algorithms. The sample programs provide no feedback during the setup process. When you run the programs, be patient: you may not see any output for a while. If you run the programs with the javax.net.debug system property set to all, you will see more feedback. For an introduction to reading this debug information, see the guide, Debugging SSL/TLS Connections.

Where to Find the Sample Code

Most of the sample code is located in the samples subdirectory of the same directory as that containing the document you are reading. Follow that link to see a listing of all the sample code files and text files. That page also provides a link to a ZIP file that you can download to obtain all the sample code files, which is helpful if you are viewing this documentation from the web.

The following sections describe the samples. For more information, see README.txt.

Sample Code Illustrating a Secure Socket Connection Between a Client and a Server

The sample programs in the samples/sockets directory illustrate how to set up a secure socket connection between a client and a server.

When running the sample client programs, you can communicate with an existing server, such as a commercial web server, or you can communicate with the sample server program, ClassFileServer. You can run the sample client and the sample server programs on different machines connected to the same network, or you can run them both on one machine but from different terminal windows.

All the sample SSLSocketClient* programs in the samples/sockets/client directory (and URLReader* programs described in Sample Code Illustrating HTTPS Connections) can be run with the ClassFileServer sample server program. An example of how to do this is shown in Running SSLSocketClientWithClientAuth with ClassFileServer. You can make similar changes to run URLReader, SSLSocketClient, or SSLSocketClientWithTunneling with ClassFileServer.

If an authentication error occurs during communication between the client and the server (whether using a web server or ClassFileServer), it is most likely because the necessary keys are not in the truststore (trust key database). For example, the ClassFileServer uses a keystore called testkeys containing the private key for localhost as needed during the SSL handshake. The testkeys keystore is included in the same samples/sockets/server directory as the ClassFileServer source. If the client cannot find a certificate for the corresponding public key of localhost in the truststore it consults, then an authentication error will occur. Be sure to use the samplecacerts truststore (which contains the public key and certificate of the localhost), as described in the next section.

Configuration Requirements

When running the sample programs that create a secure socket connection between a client and a server, you will need to make the appropriate certificates file (truststore) available. For both the client and the server programs, you should use the certificates file samplecacerts from the samples directory. Using this certificates file will allow the client to authenticate the server. The file contains all the common Certificate Authority (CA) certificates shipped with the JDK (in the cacerts file), plus a certificate for localhost needed by the client to authenticate localhost when communicating with the sample server ClassFileServer. The ClassFileServer uses a keystore containing the private key for localhost that corresponds to the public key in samplecacerts.

To make the samplecacerts file available to both the client and the server, you can either copy it to the file java-home/lib/security/jssecacerts, rename it to cacerts, and use it to replace the java-home/lib/security/cacerts file, or add the following option to the command line when running the java command for both the client and the server:

-Djavax.net.ssl.trustStore=path_to_samplecacerts_file

For more information about java-home, see The JRE Installation Directory.

The password for the samplecacerts truststore is changeit. You can substitute your own certificates in the samples by using the keytool utility.

If you use a browser, such as Netscape Navigator or Microsoft's Internet Explorer, to access the sample SSL server provided in the ClassFileServer example, then a dialog box may pop up with the message that it does not recognize the certificate. This is normal because the certificate used with the sample programs is self-signed and is for testing only. You can accept the certificate for the current session. After testing the SSL server, you should exit the browser, which deletes the test certificate from the browser's namespace.

For client authentication, a separate duke certificate is available in the appropriate directories. The public key and certificate is also stored in the samplecacerts file.

Running SSLSocketClient

The SSLSocketClient.java program demonstrates how to create a client that uses an SSLSocket to send an HTTP request and to get a response from an HTTPS server. The output of this program is the HTML source for https://www.verisign.com/index.html.

You must not be behind a firewall to run this program as provided. If you run it from behind a firewall, you will get an UnknownHostException because JSSE cannot find a path through your firewall to www.verisign.com. To create an equivalent client that can run from behind a firewall, set up proxy tunneling as illustrated in the sample program SSLSocketClientWithTunneling.

Running SSLSocketClientWithTunneling

The SSLSocketClientWithTunneling.java program illustrates how to do proxy tunneling to access a secure web server from behind a firewall. To run this program, you must set the following Java system properties to the appropriate values:

java -Dhttps.proxyHost=webproxy
-Dhttps.proxyPort=ProxyPortNumber
SSLSocketClientWithTunneling

Note: Proxy specifications with the -D options are optional. Replace webproxy with the name of your proxy host and ProxyPortNumber with the appropriate port number.

The program will return the HTML source file from https://www.verisign.com/index.html.

Running SSLSocketClientWithClientAuth

The SSLSocketClientWithClientAuth.java program shows how to set up a key manager to do client authentication if required by a server. This program also assumes that the client is not outside a firewall. You can modify the program to connect from inside a firewall by following the example in SSLSocketClientWithTunneling.

To run this program, you must specify three parameters: host, port, and requested file path. To mirror the previous examples, you can run this program without client authentication by setting the host to www.verisign.com, the port to 443, and the requested file path to https://www.verisign.com/. The output when using these parameters is the HTML for the website https://www.verisign.com/.

To run SSLSocketClientWithClientAuth to do client authentication, you must access a server that requests client authentication. You can use the sample program ClassFileServer as this server. This is described in the following sections.

Running ClassFileServer

The program referred to herein as ClassFileServer is made up of two files: ClassFileServer.java and ClassServer.java.

To execute them, run ClassFileServer.class, which requires the following parameters:

  • port can be any available unused port number, for example, you can use the number 2001.
  • docroot indicates the directory on the server that contains the file you want to retrieve. For example, on Solaris, you can use /home/userid/ (where userid refers to your particular UID), whereas on Microsoft Windows systems, you can use c:\.
  • TLS is an optional parameter that indicates that the server is to use SSL or TLS.
  • true is an optional parameter that indicates that client authentication is required. This parameter is only consulted if the TLS parameter is set.

Note: The TLS and true parameters are optional. If you omit them, indicating that an ordinary (not TLS) file server should be used, without authentication, then nothing happens. This is because one side (the client) is trying to negotiate with TLS, while the other (the server) is not, so they cannot communicate.

Note: The server expects GET requests in the form GET /path_to_file.

Running SSLSocketClientWithClientAuth with ClassFileServer

You can use the sample programs SSLSocketClientWithClientAuth and ClassFileServer to set up authenticated communication, where the client and server are authenticated to each other. You can run both sample programs on different machines connected to the same network, or you can run them both on one machine but from different terminal windows or command prompt windows. To set up both the client and the server, do the following:

  1. Run the program ClassFileServer from one machine or terminal window, as described in Running ClassFileServer.
  2. Run the program SSLSocketClientWithClientAuth on another machine or terminal window. SSLSocketClientWithClientAuth requires the following parameters:
    • host is the host name of the machine that you are using to run ClassFileServer.
    • port is the same port that you specified for ClassFileServer.

    • requestedfilepath indicates the path to the file that you want to retrieve from the server. You must give this parameter as /filepath. Forward slashes are required in the file path because it is used as part of a GET statement, which requires forward slashes regardless of what type of operating system you are running. The statement is formed as follows:

                                      "GET " + requestedfilepath + " HTTP/1.0"

Note: You can modify the other SSLClient* applications' GET commands to connect to a local machine running ClassFileServer.

Sample Code Illustrating HTTPS Connections

There are two primary APIs for accessing secure communications through JSSE. One way is through a socket-level API that can be used for arbitrary secure communications, as illustrated by the SSLSocketClient, SSLSocketClientWithTunneling, and SSLSocketClientWithClientAuth (with and without ClassFileServer) sample programs.

A second, and often simpler, way is through the standard Java URL API. You can communicate securely with an SSL-enabled web server by using the HTTPS URL protocol or scheme using the java.net.URL class.

Support for HTTPS URL schemes is implemented in many of the common browsers, which allows access to secured communications without requiring the socket-level API provided with JSSE.

An example URL is https://www.verisign.com.

The trust and key management for the HTTPS URL implementation is environment-specific. The JSSE implementation provides an HTTPS URL implementation. To use a different HTTPS protocol implementation, set the java.protocol.handler.pkgs system property to the package name. See the java.net.URL class documentation for details.

The samples that you can download with JSSE include two sample programs that illustrate how to create an HTTPS connection. Both of these sample programs (URLReader.java and URLReaderWithOptions.java) are in the samples/urls directory.

Running URLReader

The URLReader.java program illustrates using the URL class to access a secure site. The output of this program is the HTML source for https://www.verisign.com/. By default, the HTTPS protocol implementation included with JSSE is used. To use a different implementation, set the system property java.protocol.handler.pkgs value to be the name of the package containing the implementation.

If you are running the sample code behind a firewall, then you must set the https.proxyHost and https.proxyPort system properties. For example, to use the proxy host "webproxy" on port 8080, you can use the following options for the java command:

-Dhttps.proxyHost=webproxy
-Dhttps.proxyPort=8080

Alternatively, you can set the system properties within the source code with the java.lang.System method setProperty(). For example, instead of using the command-line options, you can include the following lines in your program:

System.setProperty("java.protocol.handler.pkgs", "com.ABC.myhttpsprotocol");

System.setProperty("https.proxyHost", "webproxy");

System.setProperty("https.proxyPort", "8080");

Running URLReaderWithOptions

The URLReaderWithOptions.java program is essentially the same as the URLReader.java program, except that it allows you to optionally input any or all of the following system properties as arguments to the program when you run it:

  • java.protocol.handler.pkgs
  • https.proxyHost
  • https.proxyPort
  • https.cipherSuites

To run URLReaderWithOptions, enter the following command:

java URLReaderWithOptions [-h proxyhost -p proxyport] [-k protocolhandlerpkgs] [-c ciphersarray]

Note: Multiple protocol handlers can be included in the protocolhandlerpkgs argument as a list with items separated by vertical bars. Multiple SSL cipher suite names can be included in the ciphersarray argument as a list with items separated by commas. The possible cipher suite names are the same as those returned by the SSLSocket.getSupportedCipherSuites() method. The suite names are taken from the SSL and TLS protocol specifications.

You need a protocolhandlerpkgs argument only if you want to use an HTTPS protocol handler implementation other than the default one provided by Oracle.

If you are running the sample code behind a firewall, then you must include arguments for the proxy host and the proxy port. Additionally, you can include a list of cipher suites to enable.

Here is an example of running URLReaderWithOptions and specifying the proxy host "webproxy" on port 8080:

java URLReaderWithOptions -h webproxy -p 8080

Sample Code Illustrating a Secure RMI Connection

The sample code in the samples/rmi directory illustrates how to create a secure Java Remote Method Invocation (RMI) connection. The sample code is based on an RMI example that is basically a "Hello World" example modified to install and use a custom RMI socket factory.

For more information about Java RMI, see the Java RMI documentation. This web page points to Java RMI tutorials and other information about Java RMI.

Sample Code Illustrating the Use of an SSLEngine

SSLEngine gives application developers flexibility when choosing I/O and compute strategies. Rather than tie the SSL/TLS implementation to a specific I/O abstraction (such as single-threaded SSLSockets), SSLEngine removes the I/O and compute constraints from the SSL/TLS implementation.

As mentioned earlier, SSLEngine is an advanced API, and is not appropriate for casual use. Some introductory sample code is provided here that helps illustrate its use. The first demo removes most of the I/O and threading issues, and focuses on many of the SSLEngine methods. The second demo is a more realistic example showing how SSLEngine might be combined with Java NIO to create a rudimentary HTTP/HTTPS server.

Running SSLEngineSimpleDemo

The SSLEngineSimpleDemo is a very simple application that focuses on the operation of the SSLEngine while simplifying the I/O and threading issues. This application creates two SSLEngine objects that exchange SSL/TLS messages via common ByteBuffer objects. A single loop serially performs all of the engine operations and demonstrates how a secure connection is established (handshaking), how application data is transferred, and how the engine is closed.

The SSLEngineResult provides a great deal of information about the current state of the SSLEngine. This example does not examine all of the states. It simplifies the I/O and threading issues to the point that this is not a good example for a production environment; nonetheless, it is useful to demonstrate the overall function of the SSLEngine.

Running the NIO-Based Server

To fully exploit the flexibility provided by SSLEngine, you must first understand complementary APIs, such as I/O and threading models.

An I/O model that large-scale application developers find of use is the NIO SocketChannel. NIO was introduced in part to solve some of the scaling problem inherent in the java.net.Socket API. SocketChannel has many different modes of operation including:

  • Blocking
  • Nonblocking
  • Nonblocking with selectors

Sample code for a basic HTTP server is provided that not only demonstrates many of the new NIO APIs, but also shows how SSLEngine can be employed to create a secure HTTPS server. The server is not production quality, but does show many of these new APIs in action.

Inside the samples directory is a README.txt file that introduces the server, explains how to build and configure the server, and provides a brief overview of the code layout. The files of most interest for SSLEngine users are ChannelIO.java and ChannelIOSecure.java.

Note: The server example discussed in this section is included in the JDK. You can find the code bundled in the jdk-home/samples/nio/server directory.

Creating a Keystore to Use with JSSE

This section demonstrates how you can use the keytool utility to create a simple JKS keystore suitable for use with JSSE. First you make a keyEntry (with public and private keys) in the keystore, and then you make a corresponding trustedCertEntry (public keys only) in a truststore. For client authentication, you follow a similar process for the client's certificates.

Note: Storing trust anchors in PKCS12 is not supported. Users should use JKS for storing trust anchors and PKCS12 for private keys.

Note: It is beyond the scope of this example to explain each step in detail. For more information, see the keytool documentation for Solaris, Linux, or Mac OS X or Microsoft Windows.

User input is shown in bold.

  1. Create a new keystore and self-signed certificate with corresponding public and private keys.

        % keytool -genkeypair -alias duke -keyalg RSA -validity 7 -keystore keystore

    Enter keystore password:  password
    What is your first and last name?
    [Unknown]:  Duke
    What is the name of your organizational unit?
    [Unknown]:  Java Software
    What is the name of your organization?
    [Unknown]:  Oracle, Inc.
    What is the name of your City or Locality?
    [Unknown]:  Palo Alto
    What is the name of your State or Province?
    [Unknown]:  CA
    What is the two-letter country code for this unit?
    [Unknown]:  US
    Is CN=Duke, OU=Java Software, O="Oracle, Inc.",
    L=Palo Alto, ST=CA, C=US correct?
    [no]:  yes

    Enter key password for <duke>
    (RETURN if same as keystore password):  <CR>

  2. Examine the keystore. Notice that the entry type is keyEntry, which means that this entry has a private key associated with it).

        % keytool -list -v -keystore keystore

    Enter keystore password:  password

    Keystore type: jks
    Keystore provider: SUN

    Your keystore contains 1 entry

    Alias name: duke
    Creation date: Dec 20, 2001
    Entry type: keyEntry
    Certificate chain length: 1
    Certificate[1]:
    Owner: CN=Duke, OU=Java Software, O="Oracle, Inc.",
    L=Palo Alto, ST=CA, C=US
    Issuer: CN=Duke, OU=Java Software, O="Oracle, Inc.", L=Palo Alto, ST=CA, C=US
    Serial number: 3c22adc1
    Valid from: Thu Dec 20 19:34:25 PST 2001 until: Thu Dec 27 19:34:25 PST 2001
    Certificate fingerprints:
    MD5: F1:5B:9B:A1:F7:16:CF:25:CF:F4:FF:35:3F:4C:9C:F0
    SHA1: B2:00:50:DD:B6:CC:35:66:21:45:0F:96:AA:AF:6A:3D:E4:03:7C:74

  3. Export and examine the self-signed certificate.

        % keytool -export -alias duke -keystore keystore -rfc -file duke.cer
    Enter keystore password:  password
    Certificate stored in file <duke.cer>
    % cat duke.cer
    -----BEGIN CERTIFICATE-----
    MIICXjCCAccCBDwircEwDQYJKoZIhvcNAQEEBQAwdjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB
    MRIwEAYDVQQHEwlQYWxvIEFsdG8xHzAdBgNVBAoTFlN1biBNaWNyb3N5c3RlbXMsIEluYy4xFjAU
    BgNVBAsTDUphdmEgU29mdHdhcmUxDTALBgNVBAMTBER1a2UwHhcNMDExMjIxMDMzNDI1WhcNMDEx
    MjI4MDMzNDI1WjB2MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVBhbG8gQWx0
    bzEfMB0GA1UEChMWU3VuIE1pY3Jvc3lzdGVtcywgSW5jLjEWMBQGA1UECxMNSmF2YSBTb2Z0d2Fy
    ZTENMAsGA1UEAxMERHVrZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1loObJzNXsi5aSr8
    N4XzDksD6GjTHFeqG9DUFXKEOQetfYXvA8F9uWtz8WInrqskLTNzwXgmNeWkoM7mrPpK6Rf5M3G1
    NXtYzvxyi473Gh1h9k7tjJvqSVKO7E1oFkQYeUPYifxmjbSMVirWZgvo2UmA1c76oNK+NhoHJ4qj
    eCUCAwEAATANBgkqhkiG9w0BAQQFAAOBgQCRPoQYw9rWWvfLPQuPXowvFmuebsTc28qI7iFWm6BJ
    TT/qdmzti7B5MHOt9BeVEft3mMeBU0CS2guaBjDpGlf+zsK/UUi1w9C4mnwGDZzqY/NKKWtLxabZ
    5M+4MAKLZ92ePPKGpobM2CPLfM8ap4IgAzCbBKd8+CMp8yFmifze9Q==
    -----END CERTIFICATE-----

    Alternatively, you could generate a Certificate Signing Request (CSR) with -certreq and send that to a Certificate Authority (CA) for signing, but that is beyond the scope of this example.

  4. Import the certificate into a new truststore.

        % keytool -import -alias dukecert -file duke.cer -keystore truststore
    Enter keystore password:  trustword
    Owner: CN=Duke, OU=Java Software, O="Oracle, Inc.", L=Palo Alto, ST=CA, C=US
    Issuer: CN=Duke, OU=Java Software, O="Oracle, Inc.", L=Palo Alto, ST=CA, C=US
    Serial number: 3c22adc1
    Valid from: Thu Dec 20 19:34:25 PST 2001 until: Thu Dec 27 19:34:25 PST 2001
    Certificate fingerprints:
    MD5: F1:5B:9B:A1:F7:16:CF:25:CF:F4:FF:35:3F:4C:9C:F0
    SHA1: B2:00:50:DD:B6:CC:35:66:21:45:0F:96:AA:AF:6A:3D:E4:03:7C:74
    Trust this certificate? [no]:  yes
    Certificate was added to keystore

  5. Examine the truststore. Note that the entry type is trustedCertEntry, which means that a private key is not available for this entry. It also means that this file is not suitable as a keystore of the KeyManager.

        % keytool -list -v -keystore truststore
    Enter keystore password:  trustword

    Keystore type: jks
    Keystore provider: SUN

    Your keystore contains 1 entry

    Alias name: dukecert
    Creation date: Dec 20, 2001
    Entry type: trustedCertEntry

    Owner: CN=Duke, OU=Java Software, O="Oracle, Inc.", L=Palo Alto, ST=CA, C=US
    Issuer: CN=Duke, OU=Java Software, O="Oracle, Inc.", L=Palo Alto, ST=CA, C=US
    Serial number: 3c22adc1
    Valid from: Thu Dec 20 19:34:25 PST 2001 until: Thu Dec 27 19:34:25 PST 2001
    Certificate fingerprints:
    MD5: F1:5B:9B:A1:F7:16:CF:25:CF:F4:FF:35:3F:4C:9C:F0
    SHA1: B2:00:50:DD:B6:CC:35:66:21:45:0F:96:AA:AF:6A:3D:E4:03:7C:74

  6. Now run your applications with the appropriate keystores. Because this example assumes that the default X509KeyManager and X509TrustManager are used, you select the keystores using the system properties described in Customizing JSSE.

        % java -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password Server

    % java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword Client

Note: This example authenticated the server only. For client authentication, provide a similar keystore for the client's keys and an appropriate truststore for the server.

Using the Server Name Indication (SNI) Extension

This section provides code examples that illustrate how you can use the Server Name Indication (SNI) extension for client-side and server-side applications, and how it can be applied to a virtual infrastructure.

For all examples in this section, to apply the parameters after you set them, call the setSSLParameters(SSLParameters) method on the corresponding SSLSocket, SSLEngine, or SSLServerSocket object.

Typical Client-Side Usage Examples

The following is a list of use cases that require understanding of the SNI extension for developing a client application:

  • Case 1. The client wants to access www.example.com.

    Set the host name explicitly:

        SNIHostName serverName = new SNIHostName("www.example.com");
    List<SNIServerName> serverNames = new ArrayList<>(1);
    serverNames.add(serverName);
    sslParameters.setServerNames(serverNames);

    The client should always specify the host name explicitly.

  • Case 2. The client does not want to use SNI because the server does not support it.

    Disable SNI with an empty server name list:

        List<SNIServerName> serverNames = new ArrayList<>(1);
    sslParameters.setServerNames(serverNames);

  • Case 3. The client wants to access URL https://www.example.com.

    Oracle providers will set the host name in the SNI extension by default, but third-party providers may not support the default server name indication. To keep your application provider-independent, always set the host name explicitly.

  • Case 4. The client wants to switch a socket from server mode to client mode.

    First switch the mode with the following method: sslSocket.setUseClientMode(true). Then reset the server name indication parameters on the socket.

Typical Server-Side Usage Examples

The following is a list of use cases that require understanding of the SNI extension for developing a server application:

  • Case 1. The server wants to accept all server name indication types.

    If you do not have any code dealing with the SNI extension, then the server ignores all server name indication types.

  • Case 2. The server wants to deny all server name indications of type host_name.

    Set an invalid server name pattern for host_name:

        SNIMatcher matcher = SNIHostName.createSNIMatcher("");
    Collection<SNIMatcher> matchers = new ArrayList<>(1);
    matchers.add(matcher);
    sslParameters.setSNIMatchers(matchers);

    Another way is to create an SNIMatcher subclass with a matches() method that always returns false:

        class DenialSNIMatcher extends SNIMatcher {
        DenialSNIMatcher() {
            super(StandardConstants.SNI_HOST_NAME);
        }

        @Override
        public boolean matches(SNIServerName serverName) {
            return false;
        }
    }

    SNIMatcher matcher = new DenialSNIMatcher();
    Collection<SNIMatcher> matchers = new ArrayList<>(1);
    matchers.add(matcher);
    sslParameters.setSNIMatchers(matchers);

  • Case 3. The server wants to accept connections to any host names in the example.com domain.

    Set the recognizable server name for host_name as a pattern that includes all *.example.com addresses:

        SNIMatcher matcher = SNIHostName.createSNIMatcher("(.*\\.)*example\\.com");
    Collection<SNIMatcher> matchers = new ArrayList<>(1);
    matchers.add(matcher);
    sslParameters.setSNIMatchers(matchers);

  • Case 4. The server wants to switch a socket from client mode to server mode.

    First switch the mode with the following method: sslSocket.setUseClientMode(false). Then reset the server name indication parameters on the socket.

Working with Virtual Infrastructures

This section describes how to use the Server Name Indication (SNI) extension from within a virtual infrastructure. It illustrates how to create a parser for ClientHello messages from a socket, provides examples of virtual server dispatchers using SSLSocket and SSLEngine, describes what happens when the SNI extension is not available, and demonstrates how to create a failover SSLContext.

Preparing the ClientHello Parser

Applications must implement an API to parse the ClientHello messages from a socket. The following examples illustrate the SSLCapabilities and SSLExplorer classes that can perform these functions.

SSLCapabilities.java encapsulates the SSL/TLS security capabilities during handshaking (that is, the list of cipher suites to be accepted in an SSL/TLS handshake, the record version, the hello version, and the server name indication). It can be retrieved by exploring the network data of an SSL/TLS connection via the SSLExplorer.explore() method.

SSLExplorer.java explores the initial ClientHello message from a TLS client, but it does not initiate handshaking or consume network data. The SSLExplorer.explore() method parses the ClientHello message, and retrieves the security parameters into SSLCapabilities. The method must be called before handshaking occurs on any TLS connections.

Virtual Server Dispatcher Based on SSLSocket

This section describes the procedure for using a virtual server dispatcher based on SSLSocket.

  1. Register the server name handler.

    At this step, the application may create different SSLContext objects for different server name indications, or link a certain server name indication to a specified virtual machine or distributed system.

    For example, if the server name is www.example.org, then the registered server name handler may be for a local virtual hosting web service. The local virtual hosting web service will use the specified SSLContext. If the server name is www.example.com, then the registered server name handler may be for a virtual machine hosting on 10.0.0.36. The handler may map this connection to the virtual machine.

  2. Create a ServerSocket and accept the new connection.

        ServerSocket serverSocket = new ServerSocket(serverPort);
    Socket socket = serverSocket.accept();

  3. Read and buffer bytes from the socket input stream, and then explore the buffered bytes.

        InputStream ins = socket.getInputStream();

    byte[] buffer = new byte[0xFF];
    int position = 0;
    SSLCapabilities capabilities = null;

    // Read the header of TLS record
    while (position < SSLExplorer.RECORD_HEADER_SIZE) {
        int count = SSLExplorer.RECORD_HEADER_SIZE - position;
        int n = ins.read(buffer, position, count);
        if (n < 0) {
            throw new Exception("unexpected end of stream!");
        }
        position += n;
    }

    // Get the required size to explore the SSL capabilities
    int recordLength = SSLExplorer.getRequiredSize(buffer, 0, position);
    if (buffer.length < recordLength) {
        buffer = Arrays.copyOf(buffer, recordLength);
    }

    while (position < recordLength) {
        int count = recordLength - position;
        int n = ins.read(buffer, position, count);
        if (n < 0) {
            throw new Exception("unexpected end of stream!");
        }
        position += n;
    }

    // Explore
    capabilities = SSLExplorer.explore(buffer, 0, recordLength);
    if (capabilities != null) {
        System.out.println("Record version: " + capabilities.getRecordVersion());
        System.out.println("Hello version: " + capabilities.getHelloVersion());
    }

  4. Get the requested server name from the explored capabilities.

        List<SNIServerName> serverNames = capabilities.getServerNames();

  5. Look for the registered server name handler for this server name indication.

    If the service of the host name is resident in a virtual machine or another distributed system, then the application must forward the connection to the destination. The application will need to read and write the raw internet data, rather then the SSL application from the socket stream.

        Socket destinationSocket = new Socket(serverName, 443);

    // Forward buffered bytes and network data from the current socket to the destinationSocket.

    If the service of the host name is resident in the same process, and the host name service can use the SSLSocket directly, then the application will need to set the SSLSocket instance to the server:

        // Get service context from registered handler
    // or create the context
    SSLContext serviceContext = ...

    SSLSocketFactory serviceSocketFac = serviceContext.getSSLSocketFactory();

    // wrap the buffered bytes
    ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, position);
    SSLSocket serviceSocket = (SSLSocket)serviceSocketFac.createSocket(socket, bais, true);

    // Now the service can use serviceSocket as usual.

Virtual Server Dispatcher Based on SSLEngine

This section describes the procedure for using a virtual server dispatcher based on SSLEngine.

  1. Register the server name handler.

    At this step, the application may create different SSLContext objects for different server name indications, or link a certain server name indication to a specified virtual machine or distributed system.

    For example, if the server name is www.example.org, then the registered server name handler may be for a local virtual hosting web service. The local virtual hosting web service will use the specified SSLContext. If the server name is www.example.com, then the registered server name handler may be for a virtual machine hosting on 10.0.0.36. The handler may map this connection to the virtual machine.

  2. Create a ServerSocket or ServerSocketChannel and accept the new connection.

        ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
    serverSocketChannel.bind(...);
    ...
    SocketChannel socketChannel = serverSocketChannel.accept();

  3. Read and buffer bytes from the socket input stream, and then explore the buffered bytes.

        ByteBuffer buffer = ByteBuffer.allocate(0xFF);
    SSLCapabilities capabilities = null;
    while (true) {
        // ensure the capacity
        if (buffer.remaining() == 0) {
            ByteBuffer oldBuffer = buffer;
            buffer = ByteBuffer.allocate(buffer.capacity() + 0xFF);
            buffer.put(oldBuffer);
        }

        int n = sc.read(buffer);
        if (n < 0) {
            throw new Exception("unexpected end of stream!");
        }

        int position = buffer.position();
        buffer.flip();
        capabilities = explorer.explore(buffer);
        buffer.rewind();
        buffer.position(position);
        buffer.limit(buffer.capacity());
        if (capabilities != null) {
            System.out.println("Record version: " +
                    capabilities.getRecordVersion());
            System.out.println("Hello version: " +
                    capabilities.getHelloVersion());
            break;
        }
    }
    buffer.flip();  // reset the buffer position and limitation

  4. Get the requested server name from the explored capabilities.

        List<SNIServerName> serverNames = capabilities.getServerNames();

  5. Look for the registered server name handler for this server name indication.

    If the service of the host name is resident in a virtual machine or another distributed system, then the application must forward the connection to the destination. The application will need to read and write the raw internet data, rather then the SSL application from the socket stream.

        Socket destinationSocket = new Socket(serverName, 443);

    // Forward buffered bytes and network data from the current socket to the destinationSocket.

    If the service of the host name is resident in the same process, and the host name service can use the SSLEngine directly, then the application will simply feed the net data to the SSLEngine instance:

        // Get service context from registered handler
    // or create the context
    SSLContext serviceContext = ...

    SSLEngine serviceEngine = serviceContext.createSSLEngine();

    // Now the service can use the buffered bytes and other byte buffer as usual.

No SNI Extension Available

If there is no server name indication in a ClientHello message, then there is no way to select the proper service according to SNI. For such cases, the application may need to specify a default service, so that the connection can be delegated to it if there is no server name indication.

Failover SSLContext

The SSLExplorer.explore() method does not check the validity of SSL/TLS contents. If the record format does not comply with SSL/TLS specification, or the explore() method is invoked after handshaking has started, then the method may throw an IOException and be unable to produce network data. In such cases, handle the exception thrown by SSLExplorer.explore() by using a failover SSLContext, which is not used to negotiate an SSL/TLS connection, but to close the connection with the proper alert message. The following example illustrates a failover SSLContext. You can find an example of the DenialSNIMatcher class in Case 2 of the Typical Server-Side Usage Examples.

    byte[] buffer = ...       // buffered network data
    boolean failed = true;    // SSLExplorer.explore() throws an exception

    SSLContext context = SSLContext.getInstance("TLS");
        // the failover SSLContext

    context.init(null, null, null);
    SSLSocketFactory sslsf = context.getSocketFactory();
    ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, position);
    SSLSocket sslSocket = (SSLSocket)sslsf.createSocket(socket, bais, true);

    SNIMatcher matcher = new DenialSNIMatcher();
    Collection<SNIMatcher> matchers = new ArrayList<>(1);
    matchers.add(matcher);
    SSLParameters params = sslSocket.getSSLParameters();
    params.setSNIMatchers(matchers);    // no recognizable server name
    sslSocket.setSSLParameters(params);

    try {
        InputStream sslIS = sslSocket.getInputStream();
        sslIS.read();
    } catch (Exception e) {
        System.out.println("Server exception " + e);
    } finally {
        sslSocket.close();
    }

Appendix A: Standard Names

The JDK Security API requires and uses a set of standard names for algorithms, certificates and keystore types. The specification names previously found here in Appendix A and in the other security specifications (JCA, CertPath) have been combined in the Standard Names document. Specific provider information can be found in the Oracle Provider Documentation.

Appendix B: Provider Pluggability

JSSE is fully pluggable and does not restrict the use of third-party JSSE providers in any way.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JSSE Sample Code

This directory contains subdirectories with JSSE sample files.

If you are viewing this page online, the best way to obtain all the samples files, including the binary keystore files, is to download this zip file: jssesamples.zip

Below is a list of directories and links to all the text files within the directories.

  • samples
    • README.txt
    • samplecacerts (binary)
    • rmi
      • Hello.java
      • HelloClient.java
      • HelloImpl.java
      • RMISSLClientSocketFactory.java
      • RMISSLServerSocketFactory.java
      • policy
      • readme.txt
      • testkeys (binary)
    • sni
      • SSLCapabilities.java
      • SSLExplorer.java
    • sockets
      • client
        • SSLSocketClient.java
        • SSLSocketClientWithClientAuth.java
        • SSLSocketClientWithTunneling.java
        • testkeys (binary)
      • server
        • ClassFileServer.java
        • ClassServer.java
        • testkeys (binary)
    • sslengine
      • SSLEngineSimpleDemo.java
      • testkeys (binary)
    • urls
      • URLReader.java
      • URLReaderWithOptions.java
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview of Java SE Security

Documentation Contents

Java™ Security Overview

1 Introduction

The Java™ platform was designed with a strong emphasis on security. At its core, the Java language itself is type-safe and provides automatic garbage collection, enhancing the robustness of application code. A secure class loading and verification mechanism ensures that only legitimate Java code is executed.

The initial version of the Java platform created a safe environment for running potentially untrusted code, such as Java applets downloaded from a public network. As the platform has grown and widened its range of deployment, the Java security architecture has correspondingly evolved to support an increasing set of services. Today the architecture includes a large set of application programming interfaces (APIs), tools, and implementations of commonly-used security algorithms, mechanisms, and protocols. This provides the developer a comprehensive security framework for writing applications, and also provides the user or administrator a set of tools to securely manage applications.

The Java security APIs span a wide range of areas. Cryptographic and public key infrastructure (PKI) interfaces provide the underlying basis for developing secure applications. Interfaces for performing authentication and access control enable applications to guard against unauthorized access to protected resources.

The APIs allow for multiple interoperable implementations of algorithms and other security services. Services are implemented in providers, which are plugged into the Java platform via a standard interface that makes it easy for applications to obtain security services without having to know anything about their implementations. This allows developers to focus on how to integrate security into their applications, rather than on how to actually implement complex security mechanisms.

The Java platform includes a number of providers that implement a core set of security services. It also allows for additional custom providers to be installed. This enables developers to extend the platform with new security mechanisms.

This paper gives a broad overview of security in the Java platform, from secure language features to the security APIs, tools, and built-in provider services, highlighting key packages and classes where applicable. Note that this paper is based on Java™ SE version 8.

2 Java Language Security and Bytecode Verification

The Java language is designed to be type-safe and easy to use. It provides automatic memory management, garbage collection, and range-checking on arrays. This reduces the overall programming burden placed on developers, leading to fewer subtle programming errors and to safer, more robust code.

In addition, the Java language defines different access modifiers that can be assigned to Java classes, methods, and fields, enabling developers to restrict access to their class implementations as appropriate. Specifically, the language defines four distinct access levels: private, protected, public, and, if unspecified, package. The most open access specifier is public access is allowed to anyone. The most restrictive modifier is private access is not allowed outside the particular class in which the private member (a method, for example) is defined. The protected modifier allows access to any subclass, or to other classes within the same package. Package-level access only allows access to classes within the same package.

A compiler translates Java programs into a machine-independent bytecode representation. A bytecode verifier is invoked to ensure that only legitimate bytecodes are executed in the Java runtime. It checks that the bytecodes conform to the Java Language Specification and do not violate Java language rules or namespace restrictions. The verifier also checks for memory management violations, stack underflows or overflows, and illegal data typecasts. Once bytecodes have been verified, the Java runtime prepares them for execution.

3 Basic Security Architecture

The Java platform defines a set of APIs spanning major security areas, including cryptography, public key infrastructure, authentication, secure communication, and access control. These APIs allow developers to easily integrate security into their application code. They were designed around the following principles:

Implementation independence
Applications do not need to implement security themselves. Rather, they can request security services from the Java platform. Security services are implemented in providers (see below), which are plugged into the Java platform via a standard interface. An application may rely on multiple independent providers for security functionality.
Implementation interoperability
Providers are interoperable across applications. Specifically, an application is not bound to a specific provider, and a provider is not bound to a specific application.
Algorithm extensibility
The Java platform includes a number of built-in providers that implement a basic set of security services that are widely used today. However, some applications may rely on emerging standards not yet implemented, or on proprietary services. The Java platform supports the installation of custom providers that implement such services.

Security Providers

The java.security.Provider class encapsulates the notion of a security provider in the Java platform. It specifies the provider's name and lists the security services it implements. Multiple providers may be configured at the same time, and are listed in order of preference. When a security service is requested, the highest priority provider that implements that service is selected.

Applications rely on the relevant getInstance method to obtain a security service from an underlying provider. For example, message digest creation represents one type of service available from providers. (Section 4 discusses message digests and other cryptographic services.) An application invokes the getInstance method in the java.security.MessageDigest class to obtain an implementation of a specific message digest algorithm, such as SHA-256.

MessageDigest md = MessageDigest.getInstance("SHA-256");

The program may optionally request an implementation from a specific provider, by indicating the provider name, as in the following:

MessageDigest md =
    MessageDigest.getInstance("SHA-256", "ProviderC");

Figures 1 and 2 illustrate these options for requesting an SHA-256 message digest implementation. Both figures show three providers that implement message digest algorithms. The providers are ordered by preference from left to right (1-3). In Figure 1, an application requests an SHA-256 algorithm implementation without specifying a provider name. The providers are searched in preference order and the implementation from the first provider supplying that particular algorithm, ProviderB, is returned. In Figure 2, the application requests the SHA-256 algorithm implementation from a specific provider, ProviderC. This time the implementation from that provider is returned, even though a provider with a higher preference order, ProviderB, also supplies an SHA-256 implementation.

diagram showing an application requesting an SHA-256 algorithem without specifying a provider name | diagram showing an application requesting an SHA-256 algorithem from a specific provider
Figure 1 Provider searching | Figure 2 Specific provider requested

The Java platform implementation from Oracle includes a number of pre-configured default providers that implement a basic set of security services that can be used by applications. Note that other vendor implementations of the Java platform may include different sets of providers that encapsulate vendor-specific sets of security services. When this paper mentions built-in default providers, it is referencing those available in Oracle's implementation.

The sections below on the various security areas (cryptography, authentication, etc.) each include descriptions of the relevant services supplied by the default providers. A table in Appendix C summarizes all of the default providers.

File Locations

Certain aspects of Java security mentioned in this paper, including the configuration of providers, may be customized by setting security properties. You may set security properties statically in the security properties file, which by default is the java.security file in the lib/security directory of the directory where the Java™ Runtime Environment (JRE) is installed. Security properties may also be set dynamically by calling appropriate methods of the Security class (in the java.security package).

The tools and commands mentioned in this paper are all in the ~jre/bin directory, where ~jre stands for the directory in which the JRE is installed. The cacerts file mentioned in Section 5 is in ~jre/lib/security.

4 Cryptography

The Java cryptography architecture is a framework for accessing and developing cryptographic functionality for the Java platform. It includes APIs for a large variety of cryptographic services, including

  • Message digest algorithms
  • Digital signature algorithms
  • Symmetric bulk encryption
  • Symmetric stream encryption
  • Asymmetric encryption
  • Password-based encryption (PBE)
  • Elliptic Curve Cryptography (ECC)
  • Key agreement algorithms
  • Key generators
  • Message Authentication Codes (MACs)
  • (Pseudo-)random number generators

For historical (export control) reasons, the cryptography APIs are organized into two distinct packages. The java.security package contains classes that are not subject to export controls (like Signature and MessageDigest). The javax.crypto package contains classes that are subject to export controls (like Cipher and KeyAgreement).

The cryptographic interfaces are provider-based, allowing for multiple and interoperable cryptography implementations. Some providers may perform cryptographic operations in software; others may perform the operations on a hardware token (for example, on a smartcard device or on a hardware cryptographic accelerator). Providers that implement export-controlled services must be digitally signed.

The Java platform includes built-in providers for many of the most commonly used cryptographic algorithms, including the RSA, DSA, and ECDSA signature algorithms, the DES, AES, and ARCFOUR encryption algorithms, the MD5, SHA-1, and SHA-256 message digest algorithms, and the Diffie-Hellman and ECDH key agreement algorithms. These default providers implement cryptographic algorithms in Java code.

The Java platform also includes a built-in provider that acts as a bridge to a native PKCS#11 (v2.x) token. This provider, named SunPKCS11, allows Java applications to seamlessly access cryptographic services located on PKCS#11-compliant tokens.

On Windows, the Java platform includes a built-in provider that acts as a bridge to the native Microsoft CryptoAPI. This provider, named SunMSCAPI, allows Java applications to seamlessly access cryptographic services on Windows through the CryptoAPI.

5 Public Key Infrastructure

Public Key Infrastructure (PKI) is a term used for a framework that enables secure exchange of information based on public key cryptography. It allows identities (of people, organizations, etc.) to be bound to digital certificates and provides a means of verifying the authenticity of certificates. PKI encompasses keys, certificates, public key encryption, and trusted Certification Authorities (CAs) who generate and digitally sign certificates.

The Java platform includes APIs and provider support for X.509 digital certificates and Certificate Revocation Lists (CRLs), as well as PKIX-compliant certification path building and validation. The classes related to PKI are located in the java.security and java.security.cert packages.

Key and Certificate Storage

The Java platform provides for long-term persistent storage of cryptographic keys and certificates via key and certificate stores. Specifically, the java.security.KeyStore class represents a key store, a secure repository of cryptographic keys and/or trusted certificates (to be used, for example, during certification path validation), and the java.security.cert.CertStore class represents a certificate store, a public and potentially vast repository of unrelated and typically untrusted certificates. A CertStore may also store CRLs.

KeyStore and CertStore implementations are distinguished by types. The Java platform includes the standard PKCS11 and PKCS12 key store types (whose implementations are compliant with the corresponding PKCS specifications from RSA Security). It also contains a proprietary file-based key store type called JKS (which stands for "Java Key Store"), and a type called DKS ("Domain Key Store") which is a collection of keystores that are presented as a single logical keystore.

The Java platform includes a special built-in JKS key store, cacerts, that contains a number of certificates for well-known, trusted CAs. The keytool utility is able to list the certificates included in cacerts (see the security features documentation link in Section 10).

The SunPKCS11 provider mentioned in the "Cryptography" section (Section 4) includes a PKCS11 KeyStore implementation. This means that keys and certificates residing in secure hardware (such as a smartcard) can be accessed and used by Java applications via the KeyStore API. Note that smartcard keys may not be permitted to leave the device. In such cases, the java.security.Key object reference returned by the KeyStore API may simply be a reference to the key (that is, it would not contain the actual key material). Such a Key object can only be used to perform cryptographic operations on the device where the actual key resides.

The Java platform also includes an LDAP certificate store type (for accessing certificates stored in an LDAP directory), as well as an in-memory Collection certificate store type (for accessing certificates managed in a java.util.Collection object).

PKI Tools

There are two built-in tools for working with keys, certificates, and key stores:

keytool is used to create and manage key stores. It can

  • Create public/private key pairs
  • Display, import, and export X.509 v1, v2, and v3 certificates stored as files
  • Create self-signed certificates
  • Issue certificate (PKCS#10) requests to be sent to CAs
  • Create certificates based on certificate requests
  • Import certificate replies (obtained from the CAs sent certificate requests)
  • Designate public key certificates as trusted
  • Accept a password and store it securely as a secret key

The jarsigner tool is used to sign JAR files, or to verify signatures on signed JAR files. The Java ARchive (JAR) file format enables the bundling of multiple files into a single file. Typically a JAR file contains the class files and auxiliary resources associated with applets and applications. When you want to digitally sign code, you first use keytool to generate or import appropriate keys and certificates into your key store (if they are not there already), then use the jar tool to place the code in a JAR file, and finally use the jarsigner tool to sign the JAR file. The jarsigner tool accesses a key store to find any keys and certificates needed to sign a JAR file or to verify the signature of a signed JAR file. Note: jarsigner can optionally generate signatures that include a timestamp. Systems (such as Java Plug-in) that verify JAR file signatures can check the timestamp and accept a JAR file that was signed while the signing certificate was valid rather than requiring the certificate to be current. (Certificates typically expire annually, and it is not reasonable to expect JAR file creators to re-sign deployed JAR files annually.)

6 Authentication

Authentication is the process of determining the identity of a user. In the context of the Java runtime environment, it is the process of identifying the user of an executing Java program. In certain cases, this process may rely on the services described in the "Cryptography" section (Section 4).

The Java platform provides APIs that enable an application to perform user authentication via pluggable login modules. Applications call into the LoginContext class (in the javax.security.auth.login package), which in turn references a configuration. The configuration specifies which login module (an implementation of the javax.security.auth.spi.LoginModule interface) is to be used to perform the actual authentication.

Since applications solely talk to the standard LoginContext API, they can remain independent from the underlying plug-in modules. New or updated modules can be plugged in for an application without having to modify the application itself. Figure 3 illustrates the independence between applications and underlying login modules:

diagram illustrating the independence between applications and login modules

Figure 3 Authentication login modules plugging into the authentication framework

It is important to note that although login modules are pluggable components that can be configured into the Java platform, they are not plugged in via security Providers. Therefore, they do not follow the Provider searching model described in Section 3. Instead, as is shown in the above diagram, login modules are administered by their own unique configuration.

The Java platform provides the following built-in LoginModules, all in the com.sun.security.auth.module package:

  • Krb5LoginModule for authentication using Kerberos protocols
  • JndiLoginModule for username/password authentication using LDAP or NIS databases
  • KeyStoreLoginModule for logging into any type of key store, including a PKCS#11 token key store

Authentication can also be achieved during the process of establishing a secure communication channel between two peers. The Java platform provides implementations of a number of standard communication protocols, which are discussed in the following section.

7 Secure Communication

The data that travels across a network can be accessed by someone who is not the intended recipient. When the data includes private information, such as passwords and credit card numbers, steps must be taken to make the data unintelligible to unauthorized parties. It is also important to ensure that you are sending the data to the appropriate party, and that the data has not been modified, either intentionally or unintentionally, during transport.

Cryptography forms the basis required for secure communication, and that is described in Section 4. The Java platform also provides API support and provider implementations for a number of standard secure communication protocols.

SSL/TLS

The Java platform provides APIs and an implementation of the SSL and TLS protocols that includes functionality for data encryption, message integrity, server authentication, and optional client authentication. Applications can use SSL/TLS to provide for the secure passage of data between two peers over any application protocol, such as HTTP on top of TCP/IP.

The javax.net.ssl.SSLSocket class represents a network socket that encapsulates SSL/TLS support on top of a normal stream socket (java.net.Socket). Some applications might want to use alternate data transport abstractions (e.g., New-I/O); the javax.net.ssl.SSLEngine class is available to produce and consume SSL/TLS packets.

The Java platform also includes APIs that support the notion of pluggable (provider-based) key managers and trust managers. A key manager is encapsulated by the javax.net.ssl.KeyManager class, and manages the keys used to perform authentication. A trust manager is encapsulated by the TrustManager class (in the same package), and makes decisions about who to trust based on certificates in the key store it manages.

The Java platform includes a built-in provider that implements the SSL/TLS protocols:

  • SSLv3
  • TLSv1
  • TLSv1.1
  • TLSv1.2

SASL

Simple Authentication and Security Layer (SASL) is an Internet standard that specifies a protocol for authentication and optional establishment of a security layer between client and server applications. SASL defines how authentication data is to be exchanged, but does not itself specify the contents of that data. It is a framework into which specific authentication mechanisms that specify the contents and semantics of the authentication data can fit. There are a number of standard SASL mechanisms defined by the Internet community for various security levels and deployment scenarios.

The Java SASL API defines classes and interfaces for applications that use SASL mechanisms. It is defined to be mechanism-neutral; an application that uses the API need not be hardwired into using any particular SASL mechanism. Applications can select the mechanism to use based on desired security features. The API supports both client and server applications. The javax.security.sasl.Sasl class is used to create SaslClient and SaslServer objects.

SASL mechanism implementations are supplied in provider packages. Each provider may support one or more SASL mechanisms and is registered and invoked via the standard provider architecture.

The Java platform includes a built-in provider that implements the following SASL mechanisms:

  • CRAM-MD5, DIGEST-MD5, EXTERNAL, GSSAPI, NTLM, and PLAIN client mechanisms
  • CRAM-MD5, DIGEST-MD5, GSSAPI, and NTLM server mechanisms

GSS-API and Kerberos

The Java platform contains an API with the Java language bindings for the Generic Security Service Application Programming Interface (GSS-API). GSS-API offers application programmers uniform access to security services atop a variety of underlying security mechanisms. The Java GSS-API currently requires use of a Kerberos v5 mechanism, and the Java platform includes a built-in implementation of this mechanism. At this time, it is not possible to plug in additional mechanisms. Note: The Krb5LoginModule mentioned in Section 6 can be used in conjunction with the GSS Kerberos mechanism.

The Java platform also includes a built-in implementation of the Simple and Protected GSSAPI Negotiation Mechanism (SPNEGO) GSS-API mechanism.

Before two applications can use the Java GSS-API to securely exchange messages between them, they must establish a joint security context. The context encapsulates shared state information that might include, for example, cryptographic keys. Both applications create and use an org.ietf.jgss.GSSContext object to establish and maintain the shared information that makes up the security context. Once a security context has been established, it can be used to prepare secure messages for exchange.

The Java GSS APIs are in the org.ietf.jgss package. The Java platform also defines basic Kerberos classes, like KerberosPrincipal, KerberosTicket, KerberosKey, and KeyTab, which are located in the javax.security.auth.kerberos package.

8 Access Control

The access control architecture in the Java platform protects access to sensitive resources (for example, local files) or sensitive application code (for example, methods in a class). All access control decisions are mediated by a security manager, represented by the java.lang.SecurityManager class. A SecurityManager must be installed into the Java runtime in order to activate the access control checks.

Java applets and Java™ Web Start applications are automatically run with a SecurityManager installed. However, local applications executed via the java command are by default not run with a SecurityManager installed. In order to run local applications with a SecurityManager, either the application itself must programmatically set one via the setSecurityManager method (in the java.lang.System class), or java must be invoked with a -Djava.security.manager argument on the commandline.

Permissions

When Java code is loaded by a class loader into the Java runtime, the class loader automatically associates the following information with that code:

  • Where the code was loaded from
  • Who signed the code (if anyone)
  • Default permissions granted to the code

This information is associated with the code regardless of whether the code is downloaded over an untrusted network (e.g., an applet) or loaded from the filesystem (e.g., a local application). The location from which the code was loaded is represented by a URL, the code signer is represented by the signer's certificate chain, and default permissions are represented by java.security.Permission objects.

The default permissions automatically granted to downloaded code include the ability to make network connections back to the host from which it originated. The default permissions automatically granted to code loaded from the local filesystem include the ability to read files from the directory it came from, and also from subdirectories of that directory.

Note that the identity of the user executing the code is not available at class loading time. It is the responsibility of application code to authenticate the end user if necessary (for example, as described in Section 6). Once the user has been authenticated, the application can dynamically associate that user with executing code by invoking the doAs method in the javax.security.auth.Subject class.

Policy

As mentioned earlier, a limited set of default permissions are granted to code by class loaders. Administrators have the ability to flexibly manage additional code permissions via a security policy.

The Java platform encapsulates the notion of a security policy in the java.security.Policy class. There is only one Policy object installed into the Java runtime at any given time. The basic responsibility of the Policy object is to determine whether access to a protected resource is permitted to code (characterized by where it was loaded from, who signed it, and who is executing it). How a Policy object makes this determination is implementation-dependent. For example, it may consult a database containing authorization data, or it may contact another service.

The Java platform includes a default Policy implementation that reads its authorization data from one or more ASCII (UTF-8) files configured in the security properties file. These policy files contain the exact sets of permissions granted to code: specifically, the exact sets of permissions granted to code loaded from particular locations, signed by particular entities, and executing as particular users. The policy entries in each file must conform to a documented proprietary syntax, and may be composed via a simple text editor or the graphical policytool utility.

Access Control Enforcement

The Java runtime keeps track of the sequence of Java calls that are made as a program executes. When access to a protected resource is requested, the entire call stack, by default, is evaluated to determine whether the requested access is permitted.

As mentioned earlier, resources are protected by the SecurityManager. Security-sensitive code in the Java platform and in applications protects access to resources via code like the following:

SecurityManager sm = System.getSecurityManager();
if (sm != null) {
   sm.checkPermission(perm);
}

where perm is the Permission object that corresponds to the requested access. For example, if an attempt is made to read the file /tmp/abc, the permission may be constructed as follows:

Permission perm =
    new java.io.FilePermission("/tmp/abc", "read");

The default implementation of SecurityManager delegates its decision to the java.security.AccessController implementation. The AccessController traverses the call stack, passing to the installed security Policy each code element in the stack, along with the requested permission (for example, the FilePermission in the above example). The Policy determines whether the requested access is granted, based on the permissions configured by the administrator. If access is not granted, the AccessController throws a java.lang.SecurityException.

Figure 4 illustrates access control enforcement. In this particular example, there are initially two elements on the call stack, ClassA and ClassB. ClassA invokes a method in ClassB, which then attempts to access the file /tmp/abc by creating an instance of java.io.FileInputStream. The FileInputStream constructor creates a FilePermission, perm, as shown above, and then passes perm to the SecurityManager's checkPermission method. In this particular case, only the permissions for ClassA and ClassB need to be checked, because all system code, including FileInputStream, SecurityManager, and AccessController, automatically receives all permissions.

In this example, ClassA and ClassB have different code characteristics – they come from different locations and have different signers. Each may have been granted a different set of permissions. The AccessController only grants access to the requested file if the Policy indicates that both classes have been granted the required FilePermission.

diagram showing how access is controlled to resources

Figure 4 Controlling access to resources

9 XML Signature

The Java XML Digital Signature API is a standard Java API for generating and validating XML Signatures.

XML Signatures can be applied to data of any type, XML or binary (see http://www.w3.org/TR/xmldsig-core/). The resulting signature is represented in XML. An XML Signature can be used to secure your data and provide data integrity, message authentication, and signer authentication.

The API is designed to support all of the required or recommended features of the W3C Recommendation for XML-Signature Syntax and Processing. The API is extensible and pluggable and is based on the Java Cryptography Service Provider Architecture.

The Java XML Digital Signature APIs consist of six packages:

  • javax.xml.crypto
  • javax.xml.crypto.dsig
  • javax.xml.crypto.dsig.keyinfo
  • javax.xml.crypto.dsig.spec
  • javax.xml.crypto.dom
  • javax.xml.crypto.dsig.dom

10 For More Information

Additional Java security documentation can be found online at

Java SE Security

and in the book Inside Java 2 Platform Security, Second Edition: Architecture, API Design and Implementation.

Note: Historically, as new types of security services were added to the Java platform (sometimes initially as extensions), various acronyms were used to refer to them. Since these acronyms are still in use in the Java security documentation, here is an explanation of what they represent: JSSE (Java™ Secure Socket Extension) refers to the SSL-related services described in Section 7, JCE (Java™ Cryptography Extension) refers to cryptographic services (Section 4), and JAAS (Java™ Authentication and Authorization Service) refers to the authentication and user-based access control services described in Sections 6 and 8, respectively.

Appendix A Classes Summary

Table 1 summarizes the names, packages, and usage of the Java security classes and interfaces mentioned in this paper.

Table 1 Key Java security packages and classes

Package | Class/Interface Name | Usage
com.sun.security.auth.module | JndiLoginModule | Performs username/password authentication using LDAP or NIS
com.sun.security.auth.module | KeyStoreLoginModule | Performs authentication based on key store login
com.sun.security.auth.module | Krb5LoginModule | Performs authentication using Kerberos protocols
java.lang | SecurityException | Indicates a security violation
java.lang | SecurityManager | Mediates all access control decisions
java.lang | System | Installs the SecurityManager
java.security | AccessController | Called by default implementation of SecurityManager to make access control decisions
java.security | DomainLoadStoreParameter | Stores parameters for the Domain keystore (DKS)
java.security | Key | Represents a cryptographic key
java.security | KeyStore | Represents a repository of keys and trusted certificates
java.security | MessageDigest | Represents a message digest
java.security | Permission | Represents access to a particular resource
java.security | PKCS12Attribute | Supports attributes in PKCS12 keystores
java.security | Policy | Encapsulates the security policy
java.security | Provider | Encapsulates security service implementations
java.security | Security | Manages security providers and security properties
java.security | Signature | Creates and verifies digital signatures
java.security.cert | Certificate | Represents a public key certificate
java.security.cert | CertStore | Represents a repository of unrelated and typically untrusted certificates
java.security.cert | CRL | Represents a CRL
javax.crypto | Cipher | Performs encryption and decryption
javax.crypto | KeyAgreement | Performs a key exchange
javax.net.ssl | KeyManager | Manages keys used to perform SSL/TLS authentication
javax.net.ssl | SSLEngine | Produces/consumes SSL/TLS packets, allowing the application freedom to choose a transport mechanism
javax.net.ssl | SSLSocket | Represents a network socket that encapsulates SSL/TLS support on top of a normal stream socket
javax.net.ssl | TrustManager | Makes decisions about who to trust in SSL/TLS interactions (for example, based on trusted certificates in key stores)
javax.security.auth | Subject | Represents a user
javax.security.auth.kerberos | KerberosPrincipal | Represents a Kerberos principal
javax.security.auth.kerberos | KerberosTicket | Represents a Kerberos ticket
javax.security.auth.kerberos | KerberosKey | Represents a Kerberos key
javax.security.auth.kerberos | KerberosTab | Represents a Kerberos keytab file
javax.security.auth.login | LoginContext | Supports pluggable authentication
javax.security.auth.spi | LoginModule | Implements a specific authentication mechanism
javax.security.sasl | Sasl | Creates SaslClient and SaslServer objects
javax.security.sasl | SaslClient | Performs SASL authentication as a client
javax.security.sasl | SaslServer | Performs SASL authentication as a server
org.ietf.jgss | GSSContext | Encapsulates a GSS-API security context and provides the security services available via the context

Appendix B Tools Summary

Table 2 summarizes the tools mentioned in this paper.

Table 2 Java security tools

Tool | Usage
jar | Creates Java Archive (JAR) files
jarsigner | Signs and verifies signatures on JAR files
keytool | Creates and manages key stores
policytool | Creates and edits policy files for use with default Policy implementation

There are also three Kerberos-related tools that are shipped with the Java platform for Windows. Equivalent functionality is provided in tools of the same name that are automatically part of the Solaris and Linux operating environments. Table 3 summarizes the Kerberos tools.

Table 3 Kerberos-related tools

Tool | Usage
kinit | Obtains and caches Kerberos ticket-granting tickets
klist | Lists entries in the local Kerberos credentials cache and key table
ktab | Manages the names and service keys stored in the local Kerberos key table

Appendix C Built-in Providers

The Java platform implementation from Oracle includes a number of built-in provider packages. For details, see the Java™ Cryptography Architecture Oracle Providers Documentation.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java SASL API

Documentation Contents

The Java SASL API
Programming and Deployment Guide

  1. Introduction
    • What is SASL
    • The Java SASL API
    • When to Use SASL
  2. API Overview
    • Creating the Mechanisms
    • Passing Input to the Mechanisms
    • Using the Mechanisms
    • Using the Negotiated Security Layer
  3. How SASL Mechanisms are Installed and Selected
  4. The SunSASL Provider
    • Client Mechanisms
    • Server Mechanisms
    • Debugging and Monitoring
  5. Implementing a SASL Security Provider

Introduction

What is SASL?

Simple Authentication and Security Layer, or SASL, is an Internet standard (RFC 2222) that specifies a protocol for authentication and optional establishment of a security layer between client and server applications. SASL defines how authentication data is to be exchanged but does not itself specify the contents of that data. It is a framework into which specific authentication mechanisms that specify the contents and semantics of the authentication data can fit.

SASL is used by protocols, such as the Lightweight Directory Access Protocol, version 3 (LDAP v3), and the Internet Message Access Protocol, version 4 (IMAP v4) to enable pluggable authentication. Instead of hardwiring an authentication method into the protocol, LDAP v3 and IMAP v4 use SASL to perform authentication, thus enabling authentication via various SASL mechanisms.

There are a number of standard SASL mechanisms defined by the Internet community for various levels of security and deployment scenarios. These range from no security (e.g., anonymous authentication) to high security (e.g., Kerberos authentication) and levels in between.

The Java SASL API

The Java SASL API defines classes and interfaces for applications that use SASL mechanisms. It is defined to be mechanism-neutral: the application that uses the API need not be hardwired into using any particular SASL mechanism. The API supports both client and server applications. It allows applications to select the mechanism to use based on desired security features, such as whether they are susceptible to passive dictionary attacks or whether they accept anonymous authentication.

The Java SASL API also allows developers to use their own, custom SASL mechanisms. SASL mechanisms are installed by using the Java Cryptography Architecture (JCA).

When to Use SASL

SASL provides pluggable authentication and security layer for network applications. There are other features in the Java SE that provide similar functionality, including the Java Secure Socket Extension (JSSE), and Java Generic Security Service (Java GSS). JSSE provides a framework and an implementation for a Java language version of the SSL and TLS protocols. Java GSS is the Java language bindings for the Generic Security Service Application Programming Interface (GSS-API). The only mechanism currently supported underneath this API on Java SE is Kerberos v5.

When compared with JSSE and Java GSS, SASL is relatively lightweight and is popular among more recent protocols. It also has the advantage that several popular, lightweight (in terms infrastructure support) SASL mechanisms have been defined. Primary JSSE and Java GSS mechanisms, on the other hand, have relatively heavyweight mechanisms that require more elaborate infrastructures (Public Key Infrastructure and Kerberos, respectively).

SASL, JSSE, and Java GSS are often used together. For example, a common pattern is for an application to use JSSE for establishing a secure channel, and to use SASL for client, username/password-based authentication. There are also SASL mechanisms layered on top of GSS-API mechanisms; one popular example is a SASL GSS-API/Kerberos v5 mechanism that is used with LDAP.

Except when defining and building protocols from scratch, often the biggest factor determining which API to use is the protocol definition. For example, LDAP and IMAP are defined to use SASL, so software related to these protocols should use the Java SASL API. When building Kerberos applications and services, the API to use is Java GSS. When building applications and services that use SSL/TLS as their protocol, the API to use is JSSE. See the Java Security Documentation for further details about when to use JSSE versus Java GSS.

API Overview

SASL is a challenge-response protocol. The server issues a challenge to the client, and the client sends a response based on the challenge. This exchange continues until the server is satisfied and issues no further challenge. These challenges and responses are binary tokens of arbitrary length. The encapsulating protocol (such as LDAP or IMAP) specifies how these tokens are encoded and exchanged. For example, LDAP specifies how SASL tokens are encapsulated within LDAP bind requests and responses.

The Java SASL API is modeled according to this style of interaction and usage. It has interfaces, SaslClient and SaslServer, that represent client-side and server-side mechanisms, respectively. The application interacts with the mechanisms via byte arrays that represent the challenges and responses. The server-side mechanism iterates, issuing challenges and processing responses, until it is satisfied, while the client-side mechanism iterates, evaluating challenges and issuing responses, until the server is satisfied. The application that is using the mechanism drives each iteration. That is, it extracts the challenge or response from a protocol packet and supplies it to the mechanism, and then puts the response or challenge returned by the mechanism into a protocol packet and sends it to the peer.

Creating the Mechanisms

The client and server code that uses the SASL mechanisms are not hardwired to use specific mechanism(s). In many protocols that use SASL, the server advertises (either statically or dynamically) a list of SASL mechanisms that it supports. The client then selects one of these based on its security requirements.

The Sasl class is used for creating instances of SaslClient and SaslServer. Here is an example of how an application creates a SASL client mechanism using a list of possible SASL mechanisms.

String[] mechanisms = new String[]{"DIGEST-MD5", "PLAIN"};
SaslClient sc = Sasl.createSaslClient(mechanisms, authzid, protocol,
                serverName, props, callbackHandler);

Based on the availability of the mechanisms supported by the platform and other configuration information provided via the parameters, the Java SASL framework selects one of the listed mechanisms and return an instance of SaslClient.

The name of the selected mechanism is usually transmitted to the server via the application protocol. Upon receiving the mechanism name, the server creates a corresponding SaslServer object to process client-sent responses. Here is an example of how the server would create an instance of SaslServer.

SaslServer ss = Sasl.createSaslServer(mechanism, protocol,
                  myName, props, callbackHandler);

Passing Input to the Mechanisms

Because the Java SASL API is a general framework, it must be able to accommodate many different types of mechanisms. Each mechanism needs to be initialized with input and may need input to make progress. The API provides three means by which an application gives input to a mechanism.

  1. Common input parameters. The application uses predefined parameters to supply information that are defined by the SASL specification and commonly required by mechanisms. For SASL client mechanisms, the input parameters are authorization id, protocol id, and server name. For SASL server mechanisms, the common input parameters are prototol id and (its own fully qualified) server name.
  2. Properties parameter. The application uses the properties parameter, a mapping of property names to (possibly non-string) property values, to supply configuration information. The Java SASL API defines some standard properties, such as quality-of-protection, cipher strength, and maximum buffer size. The parameter can also be used to pass in non-standard properties that are specific to particular mechanisms.
  3. Callbacks. The application uses the callback handler parameter to supply input that cannot be predetermined or might not be common across mechanisms. When a mechanism requires input data, it uses the callback handler supplied by the application to collect the data, possibly from the end-user of the application. For example, a mechanism might require the end-user of the application to supply a name and password.

    Mechanisms can use the callbacks defined in the javax.security.auth.callback package; these are generic callbacks useful for building applications that perform authentication. Mechanisms might also need SASL-specific callbacks, such as those for collecting realm and authorization information, or even (non-standardized) mechanism-specific callbacks. The application should be able to accommodate a variety of mechanisms. Consequently, its callback handler must be able to service all of the callbacks that the mechanisms might request. This is not possible in general for arbitrary mechanisms, but is usually feasible due to the limited number of mechanisms that are typically deployed and used.

Using the Mechanisms

Once the application has created a mechanism, it uses the mechanism to obtain SASL tokens to exchange with the peer. The client typically indicates to the server via the application protocol which mechanism to use. Some protocols allows the client to accompany the request with an optional initial response for mechanisms that have an initial response. This feature can be used to lower the number of message exchanges required for authentication. Here is an example of how a client might use SaslClient for authentication.
// Get optional initial response
byte[] response =
    (sc.hasInitialResponse() ? sc.evaluateChallenge(new byte[]) : null);

String mechanism = sc.getMechanismName();

// Send selected mechanism name and optional initial response to server
send(mechanism, response);

// Read response
msg = receive();
while (!sc.isComplete() && (msg.status == CONTINUE || msg.status == SUCCESS)) {
    // Evaluate server challenge
    response = sc.evaluateChallenge(msg.contents);

    if (msg.status == SUCCESS) {
        // done; server doesn't expect any more SASL data
        if (response != null) {
           throw new IOException(
               "Protocol error: attempting to send response after completion");
        }
        break;
    } else {
        send(mechanism, response);
        msg = receive();
    }

The client application iterates through each step of the authentication by using the mechanism (sc) to evaluate the challenge gotten from the server and to get a response to send back to the server. It continues this cycle until either the mechanism or application-level protocol indicates that the authentication has completed, or if the mechanism cannot evaluate a challenge. If the mechanism cannot evaluate the challenge, it throws an exception to indicate the error and terminates the authentication. Disagreement between the mechanism and protocol about the completion state must be treated as an error because it might indicate a compromise of the authentication exchange.

Here is an example of how a server might use SaslServer.

// Read request that contains mechanism name and optional initial response
msg.receive();

// Obtain a SaslServer to perform authentication
SaslServer ss = Sasl.createSaslServer(msg.mechanism,
    protocol, myName, props, callbackHandler);

// Perform authentication steps until done
while (!ss.isComplete()) {
    try {
        // Process response
        byte[] challenge = sc.evaluateResponse(msg.contents);

        if (ss.isComplete()) {
            send(mechanism, challenge, SUCCESS);
        } else {
            send(mechanism, challenge, CONTINUE);
            msg.receive();
        }
    } catch (SaslException e) {
        send(ERROR);
        sc.dispose();
        break;
    }
}
The server application iterates through each step of the authentication by giving the client's response to the mechanism (ss) to process. If the response is incorrect, the mechanism indicates the error by throwing a SaslException so that the server can report the error and terminate the authentication. If the response is correct, the mechanism returns challenge data to be sent to the client and indicates whether the authentication is complete. Note that challenge data can accompany a "success" indication. This might be used, for example, to tell the client to finalize some negotiated state.

Using the Negotiated Security Layer

Some SASL mechanisms support only authentication while others support use of a negotiated security layer after authentication. The security layer feature is often not used when the application uses some other means, such as SSL/TLS, to communicate securely with the peer.

When a security layer has been negotiated, all subsequent communication with the peer must take place using the security layer. To determine whether a security layer has been negotiated, get the negotiated quality-of-protection (QOP) from the mechanism. Here is an example of how to determine whether a security layer has been negotiated.

String qop = (String) sc.getNegotiatedProperty(Sasl.QOP);
boolean hasSecurityLayer = (qop != null &&
    (qop.equals("auth-int") || qop.equals("auth-conf")));

A security layer has been negotiated if the Sasl.QOP property indicates that either integrity and/or confidentiality has been negotiated.

To communicate with the peer using the negotiated layer, the application first uses the wrap method to encode the data to be sent to the peer to produce a "wrapped" buffer. It then transfers a length field representing the number of octets in the wrapped buffer followed by the contents of the wrapped buffer to the peer. The peer receiving the stream of octets passes the buffer (without the length field) to unwrap to obtain the decoded bytes sent by the peer. Details of this protocol are described in RFC 2222. Here is an example of how a client application sends and receives application data using a security layer.

// Send outgoing application data to peer
byte[] outgoing = ...;
byte[] netOut = sc.wrap(outgoing, 0, outgoing.length);

send(netOut.length, netOut);   // send to peer

// Receive incoming application data from peer
byte[] netIn = receive();      // read length and ensuing bytes from peer

byte[] incoming = sc.unwrap(netIn, 0, netIn.length);

How SASL Mechanisms are Installed and Selected

SASL mechanism implementations are provided by SASL security providers. Each provider may support one or more SASL mechanisms and is registered with the Java Cryptography Architecture (JCA). By default, in J2SE 5, the SunSASL provider is automatically registered as a JCA provider. To remove it or reorder its priority as a JCA provider, change the line
security.provider.7=com.sun.security.sasl.Provider
in the Java Security Properties file ($JAVA_HOME/lib/security/java.security).

To add or remove a SASL provider, you add or remove the corresponding line in the Security Properties file. For example, if you want to add a SASL provider and have its mechanisms be chosen over the same ones implemented by the SunSASL provider, then you would add a line to the Security Properties file with a lower number.

security.provider.7=com.example.MyProvider
security.provider.8=com.sun.security.sasl.Provider

Alternatively, you can programmatically add your own provider using the java.security.Security class. For example, the following sample code registers the com.example.MyProvider to the list of available SASL security providers.

Security.addProvider(new com.example.MyProvider());
When an application requests a SASL mechanism by supplying one or more mechanism names, the SASL framework looks for registered SASL providers that support that mechanism by going through, in order, the list of registered providers. The providers must then determine whether the requested mechanism matches the selection policy properties and if so, return an implementation for the mechanism.

The selection policy properties specify the security aspects of a mechanism, such as its susceptibility to certain attacks. These are characteristics of the mechanism (definition), rather than its implementation so all providers should come to the same conclusion about a particular mechanism. For example, the PLAIN mechanism is susceptible to plaintext attacks regardless of how it is implemented. If no selection policy properties are supplied, there are no restrictions on the selected mechanism. Using these properties, an application can ensure that it does not use unsuitable mechanisms that might be deployed in the execution environment. For example, an application might use the following sample code if it does not want to allow the use of mechanisms susceptible to plaintext attacks.

Map props = new HashMap();
props.add(Sasl.POLICY_NOPLAINTEXT, "true");
SaslClient sc = Sasl.createSaslClient(mechanisms,
    authzid, protocol, serverName, props, callbackHandler);
See the Sasl class for descriptions of the selection policy properties.

The SunSASL Provider

The SunSASL provider supports the following client and server mechanisms.
  • Client Mechanisms
    • PLAIN (RFC 2595). This mechanism supports cleartext username/password authentication.
    • CRAM-MD5 (RFC 2195). This mechanism supports a hashed username/password authentication scheme.
    • DIGEST-MD5 (RFC 2831). This mechanism defines how HTTP Digest Authentication can be used as a SASL mechanism.
    • GSSAPI (RFC 2222). This mechanism uses the GSSAPI for obtaining authentication information. It supports Kerberos v5 authentication.
    • EXTERNAL (RFC 2222). This mechanism obtains authentication information from an external channel (such as TLS or IPsec).
  • Server Mechanisms
    • CRAM-MD5
    • DIGEST-MD5
    • GSSAPI (Kerberos v5)

Client Mechanisms

The SunSASL provider supports several SASL mechanisms used in popular protocols such as LDAP, IMAP, and SMTP. The following table summarizes the client mechanisms and their required input.
Client Mechanism Name | Parameters/Input | Callbacks | Configuration Properties | Selection Policy
CRAM-MD5 | authorization id (as default username) | NameCallback PasswordCallback |  | Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT
DIGEST-MD5 | authorization id protocol id server name | NameCallback PasswordCallback RealmCallback RealmChoiceCallback | Sasl.QOP Sasl.STRENGTH Sasl.MAX_BUFFER Sasl.SERVER_AUTH "javax.security.sasl.sendmaxbuffer" "com.sun.security.sasl.digest.cipher" | Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT
EXTERNAL | authorization id external channel |  |  | Sasl.POLICY_NOPLAINTEXT Sasl.POLICY_NOACTIVE Sasl.POLICY_NODICTIONARY
GSSAPI | JAAS Subject authorization id protocol id server name |  | Sasl.QOP Sasl.MAX_BUFFER Sasl.SERVER_AUTH "javax.security.sasl.sendmaxbuffer" | Sasl.POLICY_NOACTIVE Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT
PLAIN | authorization id | NameCallback PasswordCallback |  | Sasl.POLICY_NOANONYMOUS

An application that uses these mechanisms from the SunSASL provider must supply the required parameters, callbacks and properties. The properties have reasonable defaults and only need to be set if the application wants to override the defaults. Most of the parameters, callbacks, and properties are described in the API documentation. The following sections describe mechanism-specific behaviors and parameters not already covered by the API documentation.

Cram-MD5

The Cram-MD5 client mechanism uses the authorization id parameter, if supplied, as the default username in the NameCallback to solicit the application/end-user for the authentication id. The authorization id is otherwise not used by the Cram-MD5 mechanism; only the authentication id is exchanged with the server.

Digest-MD5

The Digest-MD5 mechanism is used for digest authentication and optional establishment of a security layer. It specifies the following ciphers for use with the security layer: Triple DES, DES and RC4 (128, 56, and 40 bits). The Digest-MD5 mechanism can support only ciphers that are available on the platform. For example, if the platform does not support the RC4 ciphers, then the Digest-MD5 mechanism will not use those ciphers.

The Sasl.STRENGTH property supports "high", "medium", and "low" settings; its default is "high,medium,low". The ciphers are mapped to the strength settings as follows.

Strength | Cipher | Cipher Id
high | Triple DES RC4 128 bits | 3des rc4
medium | DES RC4 56 bits | des rc4-56
low | RC4 40 bits | rc4-40

When there is more than one choice for a particular strength, the cipher selected depends on the availability of the ciphers in the underlying platform. To explicitly name the cipher to use, set the "com.sun.security.sasl.digest.cipher" property to the corresponding cipher id. Note that this property setting must be compatible with Sasl.STRENGTH and the ciphers available in the underlying platform. For example, Sasl.STRENGTH being set to "low" and "com.sun.security.sasl.digest.cipher" being set to "3des" are incompatible. The "com.sun.security.sasl.digest.cipher" property has no default.

The "javax.security.sasl.sendmaxbuffer" property specifies (the string representation of) the maximum send buffer size in bytes. The default is 65536. The actual maximum number of bytes will be the minimum of this number and the peer's maximum receive buffer size.

GSSAPI

The GSSAPI mechanism is used for Kerberos v5 authentication and optional establishment of a security layer. The mechanism expects the calling thread's Subject to contain the client's Kerberos credentials or that the credentials could be obtained by implicitly logging in to Kerberos. To obtain the client's Kerberos credentials, use the Java Authentication and Authorization Service (JAAS) to log in using the Kerberos login module. See the Java GSS-API and JAAS Tutorials for Use with Kerberos for details and examples. After using JAAS authentication to obtain the Kerberos credentials, you put the code that uses the SASL GSSAPI mechanism within doAs or doAsPrivileged.
LoginContext lc = new LoginContext("JaasSample", new TextCallbackHandler());
lc.login();
lc.getSubject().doAs(new SaslAction());

class SaslAction implements java.security.PrivilegedAction {
   public class run() {
       ...
       String[] mechanisms = new String[]{"GSSAPI"};
       SaslClient sc = Sasl.createSaslClient(mechanisms,
           authzid, protocol, serverName, props, callbackHandler);
       ...
   }
}
To obtain Kerberos credentials without doing explicit JAAS programming, see the Java GSS-API and JAAS Tutorials for Use with Kerberos. When using this approach, there is no need to wrap the code within doAs or doAsPrivileged.

The "javax.security.sasl.sendmaxbuffer" property specifies (the string representation of) the maximum send buffer size in bytes. The default is 65536. The actual maximum number of bytes will be the minimum of this number and the peer's maximum receive buffer size.

Server Mechanisms

Here is a table that summarizes the server mechanisms and their required input.
Server Mechanism Name | Parameters/Input | Callbacks | Configuration Properties | Selection Policy
CRAM-MD5 | server name | AuthorizeCallback NameCallback PasswordCallback |  | Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT
DIGEST-MD5 | protocol id server name | AuthorizeCallback NameCallback PasswordCallback RealmCallback | Sasl.QOP Sasl.STRENGTH Sasl.MAX_BUFFER "javax.security.sasl.sendmaxbuffer" "com.sun.security.sasl.digest.realm" "com.sun.security.sasl.digest.utf8" | Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT
GSSAPI | JAAS Subject protocol id server name | AuthorizeCallback | Sasl.QOP Sasl.MAX_BUFFER "javax.security.sasl.sendmaxbuffer" | Sasl.POLICY_NOACTIVE Sasl.POLICY_NOANONYMOUS Sasl.POLICY_NOPLAINTEXT

An application that uses these mechanisms from the SunSASL provider must supply the required parameters, callbacks and properties. The properties have reasonable defaults and only need to be set if the application wants to override the defaults.

All users of server mechanisms must have a callback handler that deals with the AuthorizeCallback. This is used by the mechanisms to determine whether the authenticated user is allowed to act on behalf of the requested authorization id, and also to obtain the canonicalized name of the authorized user (if canonicalization is applicable).

Most of the parameters, callbacks, and properties are described in the API documentation. The following sections describe mechanism-specific behaviors and parameters not already covered by the API documentation.

Cram-MD5

The Cram-MD5 server mechanism uses the NameCallback and PasswordCallback to obtain the password required to verify the SASL client's response. The callback handler should use the NameCallback.getDefaultName() as the key to fetch the password.

Digest-MD5

The Digest-MD5 server mechanism uses the RealmCallback, NameCallback, and PasswordCallback to obtain the password required to verify the SASL client's response. The callback handler should use
RealmCallback.getDefaultText() and NameCallback.getDefaultName() as keys to fetch the password.

The "javax.security.sasl.sendmaxbuffer" property is described in the Digest-MD5 client section.

The "com.sun.security.sasl.digest.realm" property is used to specify a list of space-separated realm names that the server supports. The list is sent to the client as part of the challenge. If this property has not been set, the default realm is the server's name (supplied as a parameter).

The "com.sun.security.sasl.digest.utf8" property is used to specify the character encoding to use. "true" means to use UTF-8 encoding; "false" means to use ISO Latin 1 (ISO-8859-1). The default is "true".

GSSAPI

The GSSAPI server mechanism has the same requirements as the GSSAPI client mechanism in terms of Kerberos credentials and the "javax.security.sasl.sendmaxbuffer" property.

Debugging and Monitoring

The SunSASL provider uses the Logging APIs to provide implementation logging output. This output can be controlled by using the logging configuration file and programmatic API (java.util.logging). The logger name used by the SunSASL provider is "javax.security.sasl". Here is a sample logging configuration file that enables the FINEST logging level for the SunSASL provider.
javax.security.sasl.level=FINEST
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=FINEST

The table below shows the mechanisms and the logging output that they generate.

Mechanism | Logging Level | Information Logged
CRAM-MD5 | FINE | Configuration properties; challenge/response messages
DIGEST-MD5 | INFO | Message discarded due to encoding problem (e.g., unmatched MACs, incorrect padding)
DIGEST-MD5 | FINE | Configuration properties; challenge/response messages
DIGEST-MD5 | FINER | More detailed information about challenge/response messages
DIGEST-MD5 | FINEST | Buffers exchanged at the security layer
GSSAPI | FINE | Configuration properties; challenge/response messages
GSSAPI | FINER | More detailed information about challenge/response messages
GSSAPI | FINEST | Buffers exchanged at the security layer

Implementing a SASL Security Provider

There are three basic steps in implementing a SASL security provider.
  1. Write a class that implements the SaslClient or SaslServer interface.
  2. Write a factory class (that implements SaslClientFactory or SaslServerFactory) that creates instances of the class.
  3. Write a JCA provider that registers the factory.

The first step involves providing an implementation for the SASL mechanism. To implement a client mechanism, you need to implement the methods declared in the SaslClient interface. Similarly, for a server mechanism, you need to implement the methods declared in the SaslServer interface. For the purposes of this discussion, suppose you are developing an implementation for the client mechanism "SAMPLE-MECH", implemented by the class, com.example.SampleMechClient. You must decide what input are needed by the mechanism and how the implementation is going to collect them. For example, if the mechanism is username/password-based, then the implementation would likely need to collect that information via the callback handler parameter.

The next step involves providing a factory class that will create instances of com.example.SampleMechClient. The factory needs to determine the characteristics of the mechanism that it supports (as described by the Sasl.POLICY_* properties) so that it can return an instance of the mechanism when the API user requests it using compatible policy properties. The factory may also check for validity of the parameters before creating the mechanism. For the purposes of this discussion, suppose the factory class is named com.example.MySampleClientFactory. Although our sample factory is responsible for only one mechanism, a single factory can be responsible for any number of mechanisms.

The final step involves creating a JCA provider. The steps for creating a JCA provider is described in detail in the document, How to Implement a Provider for the Java Cryptography Architecture. SASL client factories are registered using property names of the form

SaslClientFactory.mechName

while SASL server factories are registered using property names of the form

SaslServerFactory.mechName

mechName is the SASL mechanism's name. This is what's returned by SaslClient.getMechanismName() and SaslServer.getMechanismName(). Continuing with our example, here is how the provider would register the "SAMPLE-MECH" mechanism.

put("SaslClientFactory.SAMPLE-MECH", "com.example.MySampleClientFactory");

A single SASL provider might be responsible for many mechanisms. Therefore, it might have many invocations of put to register the relevant factories. The completed SASL provider can then be made available to applications using the instructions given previously.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Contents

Documentation Contents
CONTENTS | PREV | NEXT

JavaTM SE Platform Security Architecture

Author: Li Gong

Version 1.2

This document gives an overview of the motivation of the major security features that are being implemented for JavaTM SE Platform Security, introduces the new classes and their usage, discusses the impact of this new architecture on existing code, and gives thoughts on writing security-sensitive code in the future.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Contents

Documentation Contents
CONTENTS | PREV | NEXT

JavaTM SE Platform Security Architecture

This document gives an overview of the motivation of the major security features that are being implemented for the Java 2 SDK, introduces the new classes and their usage, discusses the impact of this new architecture on existing code, and gives thoughts on writing security-sensitive code in the future.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

XML Digital Signature API

Overview and Tutorial

Table of Contents

Java XML Digital Signature API

Package Hierarchy

Service Providers

Introduction to XML Signatures

Example of an XML Signature

XML Digital Signature API Examples

validate Example

Validating an XML Signature

Instantiating the Document that Contains the Signature

Specifying the Signature Element to be Validated

Creating a Validation Context

Unmarshaling the XML Signature

Validating the XML Signature

What If the XML Signature Fails to Validate?

Using KeySelectors

genenveloped Example

Generating an XML Signature

Instantiating the Document to be Signed

Creating a Public Key Pair

Creating a Signing Context

Assembling the XML Signature

Generating the XML Signature

Printing or Displaying the Resulting Document

Java XML Digital Signature API

The Java XML Digital Signature API is a standard Java API for generating and validating XML Signatures. This API was defined under the Java Community Process as JSR 105 (see http://jcp.org/en/jsr/detail?id=105). This JSR is final and this release of Java SE contains an FCS access implementation of the Final version of the APIs.

XML Signatures can be applied to data of any type, XML or binary (see http://www.w3.org/TR/xmldsig-core/). The resulting signature is represented in XML. An XML Signature can be used to secure your data and provide data integrity, message authentication, and signer authentication.

After providing a brief overview of XML Signatures and the XML Digital Signature API, this document presents two examples that demonstrate how to use the API to validate and generate an XML Signature. This document assumes that you have a basic knowledge of cryptography and digital signatures.

The API is designed to support all of the required or recommended features of the W3C Recommendation for XML-Signature Syntax and Processing. The API is extensible and pluggable and is based on the Java Cryptography Service Provider Architecture. The API is designed for two types of developers:

  • Developers who want to use the XML Digital Signature API to generate and validate XML signatures
  • Developers who want to create a concrete implementation of the XML Digital Signature API and register it as a cryptographic service of a JCA provider

Package Hierarchy

The six packages listed below comprise the XML Digital Signature API:

  • javax.xml.crypto
  • javax.xml.crypto.dsig
  • javax.xml.crypto.dsig.keyinfo
  • javax.xml.crypto.dsig.spec
  • javax.xml.crypto.dom
  • javax.xml.crypto.dsig.dom

The javax.xml.crypto package contains common classes that are used to perform XML cryptographic operations, such as generating an XML signature or encrypting XML data. Two notable classes in this package are the KeySelector class, which allows developers to supply implementations that locate and optionally validate keys using the information contained in a KeyInfo object, and the URIDereferencer class, which allows developers to create and specify their own URI dereferencing implementations.

The javax.xml.crypto.dsig package includes interfaces that represent the core elements defined in the W3C XML digital signature specification. Of primary significance is the XMLSignature class, which allows you to sign and validate an XML digital signature. Most of the XML signature structures or elements are represented by a corresponding interface (except for the KeyInfo structures, which are included in their own package and are discussed in the next paragraph). These interfaces include: SignedInfo, CanonicalizationMethod, SignatureMethod, Reference, Transform, DigestMethod, XMLObject, Manifest, SignatureProperty, and SignatureProperties. The XMLSignatureFactory class is an abstract factory that is used to create objects that implement these interfaces.

The javax.xml.crypto.dsig.keyinfo package contains interfaces that represent most of the KeyInfo structures defined in the W3C XML digital signature recommendation, including KeyInfo, KeyName, KeyValue, X509Data, X509IssuerSerial, RetrievalMethod, and PGPData. The KeyInfoFactory class is an abstract factory that is used to create objects that implement these interfaces.

The javax.xml.crypto.dsig.spec package contains interfaces and classes representing input parameters for the digest, signature, transform, or canonicalization algorithms used in the processing of XML signatures.

Finally, the javax.xml.crypto.dom and javax.xml.crypto.dsig.dom packages contains DOM-specific classes for the javax.xml.crypto and javax.xml.crypto.dsig packages, respectively. Only developers and users who are creating or using a DOM-based XMLSignatureFactory or KeyInfoFactory implementation will need to make direct use of these packages.

Service Providers

A JSR 105 cryptographic service is a concrete implementation of the abstract XMLSignatureFactory and KeyInfoFactory classes and is responsible for creating objects and algorithms that parse, generate and validate XML Signatures and KeyInfo structures. A concrete implementation of XMLSignatureFactory must provide support for each of the required algorithms as specified by the W3C recommendation for XML Signatures. It can optionally support other algorithms as defined by the W3C recommendation or other specifications.

JSR 105 leverages the JCA provider model for registering and loading XMLSignatureFactory and KeyInfoFactory implementations.

Each concrete XMLSignatureFactory or KeyInfoFactory implementation supports a specific XML mechanism type that identifies the XML processing mechanism that an implementation uses internally to parse and generate XML signature and KeyInfo structures. This JSR supports one standard type, DOM. The XML Digital Signature provider implementation that is bundled with Java SE supports the DOM mechanism. Support for new standard types, such as JDOM, may be added in the future.

An XML Digital Signature API implementation should use underlying JCA engine classes, such as java.security.Signature and java.security.MessageDigest, to perform cryptographic operations.

In addition to the XMLSignatureFactory and KeyInfoFactory classes, JSR 105 supports a service provider interface for transform and canonicalization algorithms. The TransformService class allows you to develop and plug in an implementation of a specific transform or canonicalization algorithm for a particular XML mechanism type. The TransformService class uses the standard JCA provider model for registering and loading implementations. Each JSR 105 implementation should use the TransformService class to find a provider that supports transform and canonicalization algorithms in XML Signatures that it is generating or validating.

Introduction to XML Signatures

You can use an XML Signature to sign any arbitrary data, whether it is XML or binary. The data is identified via URIs in one or more Reference elements. XML Signatures are described in one or more of three forms: detached, enveloping, or enveloped. A detached signature is over data that is external, or outside of the signature element itself. Enveloping signatures are signatures over data that is inside the signature element, and an enveloped signature is a signature that is contained inside the data that it is signing.

Example of an XML Signature

The easiest way to describe the contents of an XML Signature is to show an actual sample and describe each component in more detail. The following is an example of an enveloped XML Signature generated over the contents of an XML document. The contents of the document before it is signed are:

<Envelope xmlns="urn:envelope">
</Envelope>

The resulting enveloped XML Signature, indented and formatted for readability, is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="urn:envelope">
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
      <CanonicalizationMethod
        Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
      <Reference URI="">
        <Transforms>
          <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        <DigestValue>uooqbWYa5VCqcJCbuymBKqm17vY=</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>
      KedJuTob5gtvYx9qM3k3gm7kbLBwVbEQRl26S2tmXjqNND7MRGtoew==
    </SignatureValue>
    <KeyInfo>
      <KeyValue>
        <DSAKeyValue>
          <P>
            /KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxe
            Eu0ImbzRMqzVDZkVG9xD7nN1kuFw==
          </P>
          <Q>li7dzDacuo67Jg7mtqEm2TRuOMU=</Q>
          <G>
            Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/
            XPaF5Bpsy4pNWMOHCBiNU0NogpsQW5QvnlMpA==
          </G>
          <Y>
            qV38IqrWJG0V/mZQvRVi1OHw9Zj84nDC4jO8P0axi1gb6d+475yhMjSc/
            BrIVC58W3ydbkK+Ri4OKbaRZlYeRA==
          </Y>
        </DSAKeyValue>
      </KeyValue>
    </KeyInfo>
  </Signature>
</Envelope>

The Signature element has been inserted inside the content that it is signing, thereby making it an enveloped signature. The required SignedInfo element contains the information that is actually signed:

<SignedInfo>
  <CanonicalizationMethod
    Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
  <Reference URI="">
    <Transforms>
      <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>uooqbWYa5VCqcJCbuymBKqm17vY=</DigestValue>
  </Reference>
</SignedInfo>

The required CanonicalizationMethod element defines the algorithm used to canonicalize the SignedInfo element before it is signed or validated. Canonicalization is the process of converting XML content to a canonical form, to take into account changes that can invalidate a signature over that data. Canonicalization is necessary due to the nature of XML and the way it is parsed by different processors and intermediaries, which can change the data such that the signature is no longer valid but the signed data is still logically equivalent.

The required SignatureMethod element defines the digital signature algorithm used to generate the signature, in this case DSA with SHA-1.

One or more Reference elements identify the data that is digested. Each Reference element identifies the data via a URI. In this example, the value of the URI is the empty String (""), which indicates the root of the document. The optional Transforms element contains a list of one or more Transform elements, each of which describes a transformation algorithm used to transform the data before it is digested. In this example, there is one Transform element for the enveloped transform algorithm. The enveloped transform is required for enveloped signatures so that the signature element itself is removed before calculating the signature value. The required DigestMethod element defines the algorithm used to digest the data, in this case SHA1. Finally the required DigestValue element contains the actual base64-encoded digested value.

The required SignatureValue element contains the base64-encoded signature value of the signature over the SignedInfo element.

The optional KeyInfo element contains information about the key that is needed to validate the signature:

<KeyInfo>
  <KeyValue>
    <DSAKeyValue>
      <P>
        /KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxe
        Eu0ImbzRMqzVDZkVG9xD7nN1kuFw==
      </P>
      <Q>li7dzDacuo67Jg7mtqEm2TRuOMU=</Q>
      <G>
        Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/
        XPaF5Bpsy4pNWMOHCBiNU0NogpsQW5QvnlMpA==
      </G>
      <Y>
        qV38IqrWJG0V/mZQvRVi1OHw9Zj84nDC4jO8P0axi1gb6d+475yhMjSc/
        BrIVC58W3ydbkK+Ri4OKbaRZlYeRA==
      </Y>
    </DSAKeyValue>
  </KeyValue>
</KeyInfo>

This KeyInfo element contains a KeyValue element, which in turn contains a DSAKeyValue element consisting of the public key needed to validate the signature. KeyInfo can contain various content such as X.509 certificates and PGP key identifiers. See the KeyInfo section of the XML Signature Recommendation for more information on the different KeyInfo types.

XML Digital Signature API Examples

The following sections describe two examples that show how to use the XML Digital Signature API:

  • Validate example
  • Signing example

validate Example

You can find the code shown in this section in the Validate.java file in the docs/technotes/guides/security/xmldsig directory. The file on which it operates, envelopedSignature.xml, is in the same directory.

To compile and run the example, execute the following commands from the docs/technotes/guides/security/xmldsig directory:

$ javac Validate.java
$ java Validate signature.xml

The sample program will validate the signature in the file signature.xml in the current working directory.

Validating an XML Signature

This example shows you how to validate an XML Signature using the JSR 105 API. The example uses DOM (the Document Object Model) to parse an XML document containing a Signature element and a JSR 105 DOM implementation to validate the signature.

Instantiating the Document that Contains the Signature

First we use a JAXP DocumentBuilderFactory to parse the XML document containing the Signature. An application obtains the default implementation for DocumentBuilderFactory by calling the following line of code:

DocumentBuilderFactory dbf =
  DocumentBuilderFactory.newInstance();

We must also make the factory namespace-aware:

dbf.setNamespaceAware(true);

Next, we use the factory to get an instance of a DocumentBuilder, which is used to parse the document:

DocumentBuilder builder = dbf.newDocumentBuilder();
Document doc = builder.parse(new FileInputStream(argv[0]));

Specifying the Signature Element to be Validated

We need to specify the Signature element that we want to validate, since there could be more than one in the document. We use the DOM method Document.getElementsByTagNameNS, passing it the XML Signature namespace URI and the tag name of the Signature element, as shown:

NodeList nl = doc.getElementsByTagNameNS
  (XMLSignature.XMLNS, "Signature");
if (nl.getLength() == 0) {
  throw new Exception("Cannot find Signature element");
}

This returns a list of all Signature elements in the document. In this example, there is only one Signature element.

Creating a Validation Context

We create an XMLValidateContext instance containing input parameters for validating the signature. Since we are using DOM, we instantiate a DOMValidateContext instance (a subclass of XMLValidateContext), and pass it two parameters, a KeyValueKeySelector object and a reference to the Signature element to be validated (which is the first entry of the NodeList we generated earlier):

DOMValidateContext valContext = new DOMValidateContext
  (new KeyValueKeySelector(), nl.item(0));

The KeyValueKeySelector is explained in greater detail in Using KeySelectors.

Unmarshaling the XML Signature

We extract the contents of the Signature element into an XMLSignature object. This process is called unmarshalling. The Signature element is unmarshalled using an XMLSignatureFactory object. An application can obtain a DOM implementation of XMLSignatureFactory by calling the following line of code:

XMLSignatureFactory factory =
  XMLSignatureFactory.getInstance("DOM");

We then invoke the unmarshalXMLSignature method of the factory to unmarshal an XMLSignature object, and pass it the validation context we created earlier:

XMLSignature signature =
  factory.unmarshalXMLSignature(valContext);

Validating the XML Signature

Now we are ready to validate the signature. We do this by invoking the validate method on the XMLSignature object, and pass it the validation context as follows:

boolean coreValidity = signature.validate(valContext);

The validate method returns "true" if the signature validates successfully according to the core validation rules in the W3C XML Signature Recommendation, and false otherwise.

What If the XML Signature Fails to Validate?

If the XMLSignature.validate method returns false, we can try to narrow down the cause of the failure. There are two phases in core XML Signature validation:

  • Signature validation (the cryptographic verification of the signature)
  • Reference validation (the verification of the digest of each reference in the signature)

Each phase must be successful for the signature to be valid. To check if the signature failed to cryptographically validate, we can check the status, as follows:

boolean sv =
  signature.getSignatureValue().validate(valContext);
System.out.println("signature validation status: " + sv);

We can also iterate over the references and check the validation status of each one, as follows:

Iterator i =
  signature.getSignedInfo().getReferences().iterator();
for (int j=0; i.hasNext(); j++) {
  boolean refValid = ((Reference)
    i.next()).validate(valContext);
  System.out.println("ref["+j+"] validity status: " +
    refValid);
}

Using KeySelectors

KeySelectors are used to find and select keys that are needed to validate an XMLSignature. Earlier, when we created a DOMValidateContext object, we passed a KeySelector object as the first argument:

DOMValidateContext valContext = new DOMValidateContext
  (new KeyValueKeySelector(), nl.item(0));

Alternatively, we could have passed a PublicKey as the first argument if we already knew what key is needed to validate the signature. However, we often don't know.

The KeyValueKeySelector is a concrete implementation of the abstract KeySelector class. The KeyValueKeySelector implementation tries to find an appropriate validation key using the data contained in KeyValue elements of the KeyInfo element of an XMLSignature. It does not determine if the key is trusted. This is a very simple KeySelector implementation, designed for illustration rather than real-world usage. A more practical example of a KeySelector is one that searches a KeyStore for trusted keys that match X509Data information (for example, X509SubjectName, X509IssuerSerial, X509SKI, or X509Certificate elements) contained in a KeyInfo.

The implementation of the KeyValueKeySelector is as follows:

private static class KeyValueKeySelector extends KeySelector {

  public KeySelectorResult select(KeyInfo keyInfo,
      KeySelector.Purpose purpose,
      AlgorithmMethod method,
      XMLCryptoContext context)
    throws KeySelectorException {

    if (keyInfo == null) {
      throw new KeySelectorException("Null KeyInfo object!");
    }
    SignatureMethod sm = (SignatureMethod) method;
    List list = keyInfo.getContent();

    for (int i = 0; i < list.size(); i++) {
      XMLStructure xmlStructure = (XMLStructure) list.get(i);
      if (xmlStructure instanceof KeyValue) {
        PublicKey pk = null;
        try {
          pk = ((KeyValue)xmlStructure).getPublicKey();
        } catch (KeyException ke) {
          throw new KeySelectorException(ke);
        }
        // make sure algorithm is compatible with method
        if (algEquals(sm.getAlgorithm(),
            pk.getAlgorithm())) {
          return new SimpleKeySelectorResult(pk);
        }
      }
    }
    throw new KeySelectorException("No KeyValue element
found!");
  }

  static boolean algEquals(String algURI, String algName) {
    if (algName.equalsIgnoreCase("DSA") &&
        algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) {
      return true;
    } else if (algName.equalsIgnoreCase("RSA") &&
        algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) {
      return true;
    } else {
      return false;
    }
  }
}

genenveloped Example

The code discussed in this section is in the GenEnveloped.java file in the docs/technotes/guides/security/xmldsig directory. The file on which it operates, envelope.xml, is in the same directory. It generates the file envelopedSignature.xml.

To compile and run this sample, execute the following command from the docs/technotes/guides/security/xmldsig directory:

$ javac GenEnveloped.java
$ java GenEnveloped envelope.xml envelopedSignature.xml

The sample program will generate an enveloped signature of the document in the file envelope.xml and store it in the file envelopedSignature.xml in the current working directory.

Generating an XML Signature

This example shows you how to generate an XML Signature using the XML Digital Signature API. More specifically, the example generates an enveloped XML Signature of an XML document. An enveloped signature is a signature that is contained inside the content that it is signing. The example uses DOM (the Document Object Model) to parse the XML document to be signed and a JSR 105 DOM implementation to generate the resulting signature.

A basic knowledge of XML Signatures and their different components is helpful for understanding this section. See http://www.w3.org/TR/xmldsig-core/ for more information.

Instantiating the Document to be Signed

First, we use a JAXP DocumentBuilderFactory to parse the XML document that we want to sign. An application obtains the default implementation for DocumentBuilderFactory by calling the following line of code:

DocumentBuilderFactory dbf =
  DocumentBuilderFactory.newInstance();

We must also make the factory namespace-aware:

dbf.setNamespaceAware(true);

Next, we use the factory to get an instance of a DocumentBuilder, which is used to parse the document:

DocumentBuilder builder = dbf.newDocumentBuilder();
Document doc = builder.parse(new FileInputStream(argv[0]));

Creating a Public Key Pair

We generate a public key pair. Later in the example, we will use the private key to generate the signature. We create the key pair with a KeyPairGenerator. In this example, we will create a DSA KeyPair with a length of 512 bytes :

KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
kpg.initialize(512);
KeyPair kp = kpg.generateKeyPair();

In practice, the private key is usually previously generated and stored in a KeyStore file with an associated public key certificate.

Creating a Signing Context

We create an XML Digital Signature XMLSignContext containing input parameters for generating the signature. Since we are using DOM, we instantiate a DOMSignContext (a subclass of XMLSignContext), and pass it two parameters, the private key that will be used to sign the document and the root of the document to be signed:

DOMSignContext dsc = new DOMSignContext
  (kp.getPrivate(), doc.getDocumentElement());

Assembling the XML Signature

We assemble the different parts of the Signature element into an XMLSignature object. These objects are all created and assembled using an XMLSignatureFactory object. An application obtains a DOM implementation of XMLSignatureFactory by calling the following line of code:

XMLSignatureFactory fac =
  XMLSignatureFactory.getInstance("DOM");

We then invoke various factory methods to create the different parts of the XMLSignature object as shown below. We create a Reference object, passing to it the following:

  • The URI of the object to be signed (We specify a URI of "", which implies the root of the document.)
  • The DigestMethod (we use SHA1)
  • A single Transform, the enveloped Transform, which is required for enveloped signatures so that the signature itself is removed before calculating the signature value
Reference ref = fac.newReference
  ("", fac.newDigestMethod(DigestMethod.SHA1, null),
    Collections.singletonList
      (fac.newTransform(Transform.ENVELOPED,
        (TransformParameterSpec) null)), null, null);

Next, we create the SignedInfo object, which is the object that is actually signed, as shown below. When creating the SignedInfo, we pass as parameters:

  • The CanonicalizationMethod (we use inclusive and preserve comments)
  • The SignatureMethod (we use DSA)
  • A list of References (in this case, only one)
SignedInfo si = fac.newSignedInfo
  (fac.newCanonicalizationMethod
    (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS,
      (C14NMethodParameterSpec) null),
    fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null),
    Collections.singletonList(ref));

Next, we create the optional KeyInfo object, which contains information that enables the recipient to find the key needed to validate the signature. In this example, we add a KeyValue object containing the public key. To create KeyInfo and its various subtypes, we use a KeyInfoFactory object, which can be obtained by invoking the getKeyInfoFactory method of the XMLSignatureFactory, as follows:

KeyInfoFactory kif = fac.getKeyInfoFactory();

We then use the KeyInfoFactory to create the KeyValue object and add it to a KeyInfo object:

KeyValue kv = kif.newKeyValue(kp.getPublic());
KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));

Finally, we create the XMLSignature object, passing as parameters the SignedInfo and KeyInfo objects that we created earlier:

XMLSignature signature = fac.newXMLSignature(si, ki);

Notice that we haven't actually generated the signature yet; we'll do that in the next step.

Generating the XML Signature

Now we are ready to generate the signature, which we do by invoking the sign method on the XMLSignature object, and pass it the signing context as follows:

signature.sign(dsc);

The resulting document now contains a signature, which has been inserted as the last child element of the root element.

Printing or Displaying the Resulting Document

You can use the following code to print the resulting signed document to a file or standard output:

OutputStream os;
if (args.length > 1) {
  os = new FileOutputStream(args[1]);
} else {
  os = System.out;
}
TransformerFactory tf = TransformerFactory.newInstance();
Transformer trans = tf.newTransformer();
trans.transform(new DOMSource(doc), new StreamResult(os));

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


XML Digital Signature API Specification

Documentation Contents

Java XML Digital Signature API Specification (JSR 105)

Table of Contents

  • Introduction
  • Acknowledgements
  • Requirements
  • API Dependencies
  • Non-Goals
  • Package Overview
  • Service Providers
  • DOM Mechanism Requirements
  • Open API Issues
  • Examples

Introduction

This document describes the Java XML Digital Signature API Specification (JSR 105). The purpose of this JSR is to define a standard Java API for generating and validating XML signatures.

When this specification is final, there will be a Reference Implementation which will demonstrate the capabilities of this API and will provide an operational definition of this specification. A Technology Compatibility Kit (TCK) will also be available that will verify whether an implementation of the specification is compliant. These are required as per the Java Community Process 2.1.

The JSR 105 API is intended to target the following two types of users:

  • Java programmers who want to use the JSR 105 API to generate and validate XML signatures.
  • Java programmers who want to create a concrete implementation of the JSR 105 API and register it as a cryptographic service of a JCA provider.

Acknowledgements

The JSR 105 Expert Group:
  • Nicolas Catania, Hewlett-Packard
  • Donald E. Eastlake 3rd, Motorola
  • Christian Geuer-Pollmann, Apache Software Foundation
  • Hans Granqvist, VeriSign
  • Kazuyuki Harada, Fujitsu
  • Anthony Ho, DSTC
  • Merlin Hughes, Baltimore Technologies
  • Joyce Leung, IBM
  • Gregor Karlinger, IAIK
  • Serge Mister, Entrust Technologies
  • Takuya Mori, NEC Corporation
  • Sean Mullan, Sun Microsystems (co-specification lead)
  • Anthony Nadalin, IBM (co-specification lead)
  • Erwin van der Koogh, Apache Software Foundation
  • Chris Yeung, XML Asia
Also, special thanks to: Valerie Peng, Vincent Ryan, Sharon Liu, Chok Poh, K. Venugopal Rao., Paul Rank, Alexey Gavrilov, Bill Situ, Eric Jendrock, Andrew Fan, Manveen Kaur, Tom Amiro, Michael Mi, Dmitri Silaev, Roman Makarchuk, Vanitha Venkatraman, Arkadiy Sutchilin, and Scott Fordin from Sun Microsystems, Vishal Mahajan from Apache, and Martin Centner from IAIK.

Requirements

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
  1. W3C Recommendation, XML-Signature Syntax and Processing.
    • The API MUST allow a programmer to generate and validate XML Signatures such that all of the SHOULD and MUST requirements specified by the W3C recommendation can be satisfied.
    • The API MUST allow an implementation of the API to be created such that all of the SHOULD and MUST requirements specified by the W3C recommendation can be satisfied.
  2. An implementation SHOULD support the W3C Recommendation, XML-Signature XPath Filter Transform 2.0.
  3. An implementation SHOULD support the W3C Recommendation, Exclusive XML Canonicalization Version 1.0.
  4. DOM-independent API. The API MUST NOT have dependencies on a specific XML representation, such as DOM. It MUST be possible to create implementations of the API for different XML processing and mechanism representations, such as DOM, JDOM or dom4j.
  5. Extensible, provider-based API. It MUST be possible for a third-party to create and plug in an implementation responsible for managing and creating cryptographic and transform algorithms, dereferencing URIs, and marshalling objects to/from XML.
  6. Support for a default XML mechanism type: DOM. An implementation MUST minimally support the default mechanism type: DOM. This ensures that all implementations of JSR 105 are guaranteed a minimal level of functionality. Implementations MAY support other mechanism types.
  7. Interoperability for the default XML mechanism type: DOM. The API SHOULD ensure that applications using a DOM implementation are portable and interoperable.
  8. J2SE requirements. Implementations of this technology MAY support J2SE 1.2 or later but MUST at a minimum support version 1.4 or later of J2SE.

API Dependencies

  • J2SE (JDK) 1.2 or higher
  • W3C DOM Level 2 API. This dependency is required by classes of the javax.xml.crypto.dom and javax.xml.crypto.dsig.dom packages.

Non-Goals

  1. Support for non-DOM implementations. While the API SHOULD allow non-DOM implementations to be created, it is beyond the scope of the first version to ensure interoperability between implementations other than DOM. Additional standard service provider types MAY be added in the future and necessary API enhancements MAY be considered for a maintenance revision of JSR 105.
  2. Support for a higher-level API. We expect that programmers MAY design high-level APIs which will be built on the JSR 105 API to hide low-level details, address common use-cases or apply profiling constraints. However, it is beyond the scope of the first version to support these requirements. A high-level API MAY be considered for a maintenance release of JSR 105.
  3. Support for user-pluggable algorithms (other than transform and canonicalization algorithms which is supported by the javax.xml.crypto.dsig.TransformService class): Allowing developers to plug in their own implementations of XML Signature algorithms without requiring them to create a complete JSR 105 implementation seems like a worthy goal but SHALL NOT be REQUIRED for this release of JSR 105. A solution we are investigating for a subsequent release of Java SE is to enhance the underlying JCA/JCE to add better support for registering, parsing and processing XML security algorithms, parameters, and key information.

Package Overview

The JSR 105 API consists of 6 packages:
  • javax.xml.crypto
  • javax.xml.crypto.dom
  • javax.xml.crypto.dsig
  • javax.xml.crypto.dsig.dom
  • javax.xml.crypto.dsig.keyinfo
  • javax.xml.crypto.dsig.spec
The javax.xml.crypto package contains common classes that are used to perform XML cryptographic operations, such as generating an XML signature or encrypting XML data. Two notable classes in this package are the KeySelector class, the purpose of which is to allow developers to supply implementations which locate and optionally validate keys using the information contained in a KeyInfo object, and the URIDereferencer class which allows developers to create and specify their own URI dereferencing implementations.

The javax.xml.crypto.dsig package includes interfaces that represent the core elements defined in the W3C XML digital signature specification. Of primary significance is the XMLSignature class, which allows you to sign and validate an XML digital signature. Most of the XML signature structures or elements are represented by a corresponding interface (except for the KeyInfo structures, which are included in their own package, and discussed in the next paragraph). These interfaces include: SignedInfo, CanonicalizationMethod, SignatureMethod, Reference, Transform, DigestMethod, XMLObject, Manifest, SignatureProperty, and SignatureProperties. The XMLSignatureFactory class is an abstract factory that is used to create objects that implement these interfaces.

The javax.xml.crypto.dsig.keyinfo package contains interfaces that represent most of the KeyInfo structures defined in the W3C XML digital signature recommendation, including KeyInfo, KeyName, KeyValue, X509Data, X509IssuerSerial, RetrievalMethod, and PGPData. The KeyInfoFactory class is an abstract factory that is used to create objects that implement these interfaces.

The javax.xml.crypto.dsig.spec package contains interfaces and classes representing input parameters for the digest, signature, transform, or canonicalization algorithms used in the processing of XML signatures.

Finally, the javax.xml.crypto.dom and javax.xml.crypto.dsig.dom packages contains DOM-specific classes for the javax.xml.crypto and javax.xml.crypto.dsig packages, respectively. Only developers and users who are creating or using a DOM-based XMLSignatureFactory or KeyInfoFactory implementation should need to make direct use of these packages.

Service Providers

A JSR 105 cryptographic service is a concrete implementation of the abstract XMLSignatureFactory and KeyInfoFactory classes and is responsible for creating objects and algorithms that parse, generate and validate XML Signatures and KeyInfo structures. A concrete implementation of XMLSignatureFactory MUST provide support for each of the REQUIRED algorithms as specified by the W3C recommendation for XML Signatures. It MAY support other algorithms as defined by the W3C recommendation or other specifications.

JSR 105 leverages the JCA provider model for registering and loading XMLSignatureFactory and KeyInfoFactory implementations.

Each concrete XMLSignatureFactory or KeyInfoFactory implementation supports a specific XML mechanism type that identifies the XML processing mechanism that an implementation uses internally to parse and generate XML signature and KeyInfo structures. This JSR supports one standard type: DOM. Support for new standard types (such as JDOM) MAY be added in the future.

A JSR 105 implementation SHOULD use underlying JCA engine classes, such as java.security.Signature and java.security.MessageDigest to perform cryptographic operations.

In addition to the XMLSignatureFactory and KeyInfoFactory classes, JSR 105 supports a service provider interface for transform and canonicalization algorithms. The TransformService class allows you to develop and plug in an implementation of a specific transform or canonicalization algorithm for a particular XML mechanism type. The TransformService class uses the standard JCA provider model for registering and loading implementations. Each JSR 105 implementation SHOULD use the TransformService class to find a provider that supports transform and canonicalization algorithms in XML Signatures that it is generating or validating.

DOM Mechanism Requirements

The following requirements MUST be abided by when implementing a DOM-based XMLSignatureFactory, KeyInfoFactory or TransformService in order to minimize interoperability problems:
  1. The unmarshalXMLSignature method of XMLSignatureFactory MUST support DOMValidateContext types. If the type is DOMValidateContext, it SHOULD contain an Element of type Signature. Additionally, the unmarshalXMLSignature method MAY populate the Id/Element mappings of the passed-in DOMValidateContext.
  2. The sign method of XMLSignatures produced by XMLSignatureFactory MUST support DOMSignContext types and the validate method MUST support DOMValidateContext types. This requirement also applies to the validate method of SignatureValue and the validate method of Reference.
  3. The implementation MUST support DOMStructures as the mechanism for the application to specify extensible content (any elements or mixed content).
  4. If the dereference method of user-specified URIDereferencers returns NodeSetData objects, the iterator method MUST return an iteration over objects of type org.w3c.dom.Node.
  5. URIReference objects passed to the dereference method of user-specified URIDereferencers MUST be of type DOMURIReference and XMLCryptoContext objects MUST implement DOMCryptoContext.
  6. The previous 2 requirements also apply to URIDereferencers returned by the getURIDereferencer method of XMLSignatureFactory and KeyInfoFactory.
  7. The unmarshalKeyInfo method of KeyInfoFactory MUST support DOMStructure types. If the type is DOMStructure, it SHOULD contain an Element of type KeyInfo.
  8. The transform method of Transform MUST support DOMCryptoContext context parameter types.
  9. The newtransform and newCanonicalizationMethod methods of XMLSignatureFactory MUST support DOMStructure parameter types.
  10. The init, and marshalParams methods of TransformService MUST support DOMStructure and DOMCryptoContext types.
  11. The unmarshalXMLSignature method of XMLSignatureFactory MUST support DOMStructure types. If the type is DOMStructure, it SHOULD contain an Element of type Signature.
  12. The marshal method of KeyInfo MUST support DOMStructure and DOMCryptoContext parameter types.
Note that a DOM implementation MAY internally use other XML parsing APIs other than DOM as long as it doesn't affect interoperability. For example, a DOM implementation of XMLSignatureFactory might use a SAX parser internally to canonicalize data.

Open API Issues

The following is a list of open API issues.
  1. ID attribute registration of external XML document references is not supported.
    Consider the following reference:

  <Reference URI="document.xml">
    <Transforms>
      <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
        <XPath>id("foo")</XPath>
      </Transform>
    </Transforms>
  </Reference>
    Dereferencing the external document results in an octet stream which is subsequently converted to a NodeSet by the JSR 105 implementation. But the API does not provide a mechanism for registering ID attributes of external documents and therefore the XPath Transform implementation may be unable to identify the "foo" ID.

Programming Examples

Examples 1-3 below demonstrate how to generate different types of simple XML Digital Signature using the JSR 105 API. Example 1 describes how to generate a detached signature using the DSA signature algorithm. Example 2 describes how to generate an enveloped signature. Example 3 decribes how to generate an enveloping signature. Example 4 describes how to validate an XML Signature.
  1. Generating a detached XML Digital Signature
  2. Generating an enveloped XML Digital Signature
  3. Generating an enveloping XML Digital Signature
  4. Validating an XML Digital Signature
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Object Serialization

Object Serialization supports the encoding of objects and the objects reachable from them, into a stream of bytes. Serialization also supports the complementary reconstruction of the object graph from a stream. Serialization is used for lightweight persistence and for communication via sockets or Java Remote Method Invocation (Java RMI). The default encoding of objects protects private and transient data, and supports the evolution of the classes. A class may implement its own external encoding and is then solely responsible for the external format.

Serialization now includes an API that allows the serialized data of an object to be specified independently of the fields of the class and allows those serialized data fields to be written to and read from the stream using the existing protocol to ensure compatiblity with the default writing and reading mechanisms.

Enhancements

  • Enhancements in Java SE 6 - Describes enhancements and improvements to Object Serialization in Java SE 6.
  • Previous Enhancements - Describes enhancements to Object Serialization made in previous releases of the Java SE Platform.

Specification

  • Specification - Describes the architecture of the Object Serialization system and the APIs.

API Reference

  • java.io Package - Documents all of the interfaces and classes.

More Information

  • FAQ - Answers the most frequently asked questions about Object Serialization.

Examples

  • Examples - Demonstrate different aspects of and uses for Object Serialization.

Tools

  • serialver - Explains the serialver command, which returns the serialVersionUID for a class.

For More Information

  • The Serialization Home Page.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Object Serialization Enhancements

The following topics are covered:

  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Enhancements in Java SE 1.3
  • Enhancements in Java SE 1.2

Enhancements in Java SE 6

java.io.ObjectStreamClass.lookupAny
In previous releases, it was difficult to programmatically obtain an ObjectStreamClass instance for a non-serializable Class, although doing so can be desirable when customizing the stream format for class descriptors (see 4413615 for more information). The new method ObjectStreamClass.lookupAny can now be used for this purpose.
Bug fix: delayed garbage collection
In previous releases, bug 6232010 could cause serializable classes and subclasses of ObjectOutputStream and ObjectInputStream to be strongly referenced long after their use in a serialization operation, thus possibly delaying garbage collection of their defining class loaders indefinitely. Internal caches in the serialization implementation have been restructured to fix this bug.

Enhancements in Java SE 5.0

Support for serialization of enumerated type instances
Support has been added to serialization to handle enumerated types, which are new in this release. The rules for serializing an enum instance differ from those for serializing an "ordinary" serializable object: the serialized form of an enum instance consists only of its enum constant name, along with information identifying its base enum type. Deserialization behavior differs as well--the class information is used to find the appropriate enum class, and the Enum.valueOf method is called with that class and the received constant name in order to obtain the enum constant to return.
Bug fix: java.io.StreamCorruptedException thrown due to java.lang.ClassNotFoundException
In previous releases starting with 1.4.0, a ClassNotFoundException thrown by the ObjectInputStream.readClassDescriptor method would be reflected to the top-level caller of ObjectInputStream.readObject as a StreamCorruptedException with an empty cause. It is now reflected to the top-level caller as an InvalidClassException with the original ClassNotFoundException as the cause.
Bug fix: thread waiting on a java.io.ObjectStreamClass$EntryFuture for notification from [sic]
In previous releases starting with 1.4.0, the ObjectStreamClass.lookup method could deadlock if called from within the static initializer of the class represented by the method's Class argument. Deadlock should no longer occur in this case.
Bug fix: no spec for serialVersionUID
The javadoc for the Serializable interface has been expanded to more completely specify the role and usage of serialVersionUIDs, and to emphasize the need to specify explicit serialVersionUIDs for serializable classes.

Enhancements in Java SE 1.4

Support for deserialization of unshared objects
Serialization now provides extra support for deserialization of objects which are known to be unshared in the data-serialization stream. The new support is provided by the following API additions in package java.io:
  • ObjectInputStream.readUnshared()
  • ObjectOutputStream.writeUnshared(Object obj)
  • ObjectStreamField(String name, Class type, boolean unshared)

These APIs can be used to more efficiently read contained array objects in a secure fashion.

Security permissions now required to override putFields, readFields
ObjectOutputStream's public one-argument constructor requires the "enableSubclassImplementation" SerializablePermission when invoked (either directly or indirectly) by a subclass which overrides ObjectOutputStream.putFields or ObjectOutputStream.writeUnshared.

ObjectInputStream's public one-argument constructor requires the "enableSubclassImplementation" SerializablePermission when invoked (either directly or indirectly) by a subclass which overrides ObjectInputStream.readFields or ObjectInputStream.readUnshared.

These changes will not affect the great majority of applications. However, it will affect any ObjectInputStream/ObjectOutputStream subclasses which override the putFields or readFields methods without also overriding the rest of the serialization infrastructure.

Support for class-defined readObjectNoData method
In addition to supporting class-defined writeObject() and readObject() methods, serialization now includes support for class-defined readObjectNoData() methods. Each class-defined readObjectNoData() method is required to have the following signature:
private void readObjectNoData() throws ObjectStreamException;
The readObjectNoData() method is analogous to the class-defined readObject() method, except that (if defined) it is called in cases where the class descriptor for a superclass of the object being deserialized (and hence the object data described by that class descriptor) is not present in the serialization stream. More formally: If object O of class C is being deserialized, and S is a superclass of C in the VM which is deserializing O, then S.readObjectNoData() is invoked by ObjectInputStream during the deserialization of O if and only if the following conditions are true:
  1. S implements java.io.Serializable (directly or indirectly).
  2. S defines an readObjectNoData() method with the signature listed above.
  3. The serialization stream containing O does not include a class descriptor for S among its list of superclass descriptors for C.
Note that readObjectNoData() is never invoked in cases where a class-defined readObject() method could be called, though serializable class implementors can call readObjectNoData() from within readObject() as a means of consolidating initialization code.

See the class description in the API specification of ObjectInputStream for more information.

Bug fix: Deserialization fails for Class object of primitive type
In previous releases, bug 4171142 caused attempts to deserialize Class objects of primitive types to fail with a ClassNotFoundException. The problem was that ObjectInputStream.resolveClass() did not work for ObjectStreamClass descriptors for primitive types. This bug is fixed in this release.
Bug fix: ObjectInputStream.resolveProxyClass can fail for non-public interface cases
In previous releases, ObjectInputStream.resolveProxyClass would not always select the proper class loader to define the proxy class in if one or more of the proxy interfaces were non-public. In this release, if ObjectInputStream.resolveProxyClass detects a non-public interface, it attempts to define the implementing proxy class in the same class loader as the interface (barring conflicts, in which case an exception is thrown), which is necessary in order for the proxy to implement the interface.
Bug fix: Invalid serialPersistentFields field name causes NullPointerException
In previous releases, bug 4387368 caused NullPointerExceptions to be thrown when serializing objects which used default serialization but also declared serialPersistentField entries which did not map to actual class fields. Serialization will now throw InvalidClassExceptions in such cases (since it is never necessary to define such "unbacked" serialPersistentFields when using default serialization).
Bug fix: ClassNotFoundException in skipped objects causes serialization to fail
In previous releases, ClassNotFoundExceptions triggered by "skipped" objects—objects associated with fields not present in the classes loaded by the deserializing party—would cause deserialization of the entire object graph to fail, even though the skipped values would not be included in the graph. This release of serialization addresses this problem by ignoring ClassNotFoundExceptions associated with such skipped objects, thus eliminating a class of unnecessary deserialization errors. Other miscellaneous changes have also been made to improve the overall robustness of serialization with regards to ClassNotFoundExceptions encountered during deserialization.

Enhancements in Java SE 1.3

Strings longer than 64K can now be serialized
Prior to this release, an attempt to serialize a string longer than 64K would result in a java.io.UTFDataFormatException being thrown. In this release, the serialization protocol has been enhanced to allow strings longer than 64K to be serialized. Note that if a 1.2 (or earlier) JVM attempts to read a long string written from a 1.3-compatible JVM, the 1.2 (or earlier) JVM will receive a java.io.StreamCorruptedException.
Serialization performance enhancements
Several changes have been made to serialization to improve overall performance:
  • UTF string reads/writes have been optimized to reduce unnecessary memory allocation and synchronization/method call overhead.
  • Code for reading and writing primitive data arrays has been streamlined. Float and double array reads/writes have been reimplemented to minimize the number of calls to native methods.
  • Internal buffering has been improved.
  • Reflective operations for getting/setting primitive field values have been batched to minimize the number of separate native method calls.
Improved exception reporting
If a class cannot be found during the class resolution process of deserialization, the original java.lang.ClassNotFoundException is thrown instead of a generic one so that more information about the failure is available. Also, deserialization exception reporting now includes maintaining the name of the original class that could not be found instead of reporting a higher-level class that was being deserialized. For example, if (in an RMI call) the stub class can be found but the remote interface class cannot, the serialization mechanism will now report correctly that the interface class was the class that could not be found instead of erroneously reporting that the stub class could not be found.
java.io.ObjectOutputStream.writeClassDescriptor,
java.io.ObjectInputStream.readClassDescriptor
The writeClassDescriptor and readClassDescriptor methods have been added to provide a means of customizing the serialized representation of java.io.ObjectStreamClass class descriptors. writeClassDescriptor is called when an instance of java.io.ObjectStreamClass needs to be serialized, and is responsible for writing the ObjectStreamClass to the serialization stream. Conversely, readClassDescriptor is called when the ObjectInputStream expects an ObjectStreamClass instance as the next item in the serialization stream. By overriding these methods, subclasses of ObjectOutputStream and ObjectInputStream can transmit class descriptors in an application-specific format. For more information, refer to sections 2.1 and 3.1 of the Java Object Serialization Specification.
java.io.ObjectOutputStream.annotateProxyClass,
java.io.ObjectInputStream.resolveProxyClass
These methods are similar in purpose to ObjectOutputStream.annotateClass and ObjectInputStream.resolveClass, except that they apply to dynamic proxy classes (see java.lang.reflect.Proxy), as opposed to non-proxy classes. Subclasses of ObjectOutputStream may override annotateProxyClass to store custom data in the stream along with descriptors for dynamic proxy classes. ObjectInputStream subclasses may then override resolveProxyClass to make use of the custom data in selecting a local class to associate with the given proxy class descriptor. For details, see section 4 of the Java Object Serialization Specification.
The javadoc tool tags @serial, @serialField, and @serialData
The javadoc tags @serial, @serialField, and @serialData have been added to provide a way to document the serialized form of a class. Javadoc generates a serialization specification based on the contents of these tags. For details, refer to section 1.6 of the Java Object Serialization Specification.

Enhancements in Java SE 1.2

Protocol versioning
Prior to this release, object serialization used a protocol that did not support skipping over objects implementing the java.io.Externalizable interface if the classes for those objects were not available. In this release, a new protocol version was added which addressed this deficiency. For backwards compatibility, ObjectOutputStream and ObjectInputStream can read and write serialization streams written in either protocol; the protocol version used can be selected by calling the ObjectOutputStream.useProtocolVersion method. For details and a discussion of compatibility issues, see section 6.3 of the Java Object Serialization Specification.
Class-defined writeReplace and readResolve methods
Classes can define writeReplace and readResolve methods which allow instances of the given classes to nominate replacements for themselves during serialization and deserialization. The required signatures of these methods, along with further details, are described in sections 2.5 and 3.6 of the Java Object Serialization Specification.
java.io.ObjectOutputStream.writeObjectOverride, java.io.ObjectInputStream.readObjectOverride
Subclasses of ObjectOutputStream and ObjectInputStream can implement a custom serialization protocol by overriding the writeObjectOverride and readObjectOverride methods. Note that these methods will only be called if the ObjectOutputStream/ObjectInputStream subclasses possess the permission java.io.SerializablePermission("enableSubclassImplementation"), and call the no-argument constructors of ObjectOutputStream/ObjectInputStream. See sections 2.1 and 3.1 of the Java Object Serialization Specification for more information.
Security permission checks
Subclasses of ObjectOutputStream and ObjectInputStream may override inherited methods to obtain "hooks" into certain aspects of the serialization process. Since this release, object serialization uses the 1.2 security model to verify that subclasses possess adequate permissions to override certain hooks. The permissions java.io.SerializablePermission("enableSubclassImplementation") and java.io.SerializablePermission("enableSubstitution") govern whether or not the methods ObjectOutputStream.writeObjectOverride, ObjectOutputStream.replaceObject, ObjectInputStream.readObjectOverride, and ObjectInputStream.resolveObject will be called during the course of serialization. See sections 2.1 and 3.1 of the Java Object Serialization Specifications for more information.
Defining serializable fields for a class
By default, the values of all non-static and non-transient fields of a serializable class are written when an instance of that class is serialized. In this release, a new mechanism was introduced to allow classes finer control of this process. By declaring a special field serialPersistentFields, serializable classes can dictate which fields will be written when instances of the class (or subclasses) are serialized. This feature also enables classes to "define" serializable fields which do not correspond directly to actual fields in the class. Used in conjunction with the serializable fields API (described below), this capability allows fields to be added or removed from a class without altering the serialized representation of the class. See sections 1.5 and 1.7 of the Java Object Serialization Specification for details.
Serializable fields API
Introduced in this release, the serializable fields API allows class-defined writeObject/readObject methods to explicitly set and retrieve serializable field values by name and type. This API is particularly useful for classes that need to maintain backwards compatibility with older class versions; in some cases, the older version of the class may have defined a set of serializable fields that cannot be mapped directly to the fields of the current class. In this case, newer versions of the class can define custom writeObject and readObject methods that convert the internal state of a given instance of the (new) class into the "old" serialized form, and vice versa. For more information, see section 1.7 of the Java Object Serialization Specification.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Serialization Release Notes

Documentation Contents

Serialization Changes and Enhancements
in Java SE Development Kit 6

The following are enhancements to serialization in Java SE Development Kit 6 (JDK). For a summary of enhancements in previous releases, see Enhancements in Previous Releases.
java.io.ObjectStreamClass.lookupAny
In previous releases, it was difficult to programmatically obtain an ObjectStreamClass instance for a non-serializable Class, although doing so can be desirable when customizing the stream format for class descriptors (see 4413615 for more information). The new method ObjectStreamClass.lookupAny can now be used for this purpose.
Bug fix: delayed garbage collection
In previous releases, bug 6232010 could cause serializable classes and subclasses of ObjectOutputStream and ObjectInputStream to be strongly referenced long after their use in a serialization operation, thus possibly delaying garbage collection of their defining class loaders indefinitely. Internal caches in the serialization implementation have been restructured to fix this bug.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Object Serialization Examples

The following examples demonstrate different aspects of and uses for Object Serialization:

  • Using Serialization with Sockets
  • Using Serialization with a Custom Data Format
  • Using Serialization with SuperClasses:
    • Serialization with a NonSerializable Superclass
    • Externalization with an Externalizable Superclass
    • Externalization with a NonExternalizable Superclass
  • Using Serialization with Evolution:
    • Serialization and Evolution
    • Externalization and Evolution
    • Serialization, Evolution, and the addition of a new SuperClass
    • Serialization, Evolution, and the Serializable Fields API
  • Using Substitution by Serializable Class
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


serialver - The Serial Version Command

The serialver command returns the serialVersionUID.

SYNOPSIS

serialver [ options ]

DESCRIPTION

serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line.

OPTIONS

-show
Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.

SEE ALSO

java.io.ObjectStreamClass

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization and the Serializable Fields API

Source Files

The following source files are provided:

OriginalClass.java, the Original Class
EvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization and the Serializable Fields API

Abstract

This example shows how to use the Serializable Fields API with Serialization, demonstrating that the class can define fields other than those already in the class to be serializable. This differs from just rewriting the writeObject method to customize the data format (see the Custom Data Format example) because, in this example, versioning support still holds.

Using the Serializable Fields API, this example specifically changes the internal representation of a rectangle from x1,y1,x2,y2 implementation (see OriginalClass.java) to Point(x1,y1), Point(x2,y2) (see EvolvedClass.java) while the external representation still remains x1, y1, x2, y2. This ensures bidirectional compatibility between the original and evolved representations.

As with all examples dealing with evolution, here the evolved class (ARectangle) must define a serialVersionUID field that is obtained using the command serialver on the original class (ARectangle).

Additional Information

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization and the Serializable Fields API

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/AlternatePersistentFieldAPI, compile the Original Class:
      javac OriginalClass.java
  2. Run the Original Class with the serialization flag:
      java OriginalClass -s
  3. Compile the Evolved Class:
      javac EvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java EvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a Custom Data Format

Source Files

The following source file is provided:

CustomDataExample.java

Additional Information:

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a Custom Data Format

Abstract

Demonstrates how to use the writeObject and readObject methods to encode a custom data format. When there is a large amount of persistent data, that data should be stored in a convenient, condensed format, such as the one used in this example.

This example uses a triangular array, a symmetrical, 2-dimensional array. During serialization only half of the array is saved. This example serializes half of the array in writeObject, then restores the whole array in readObject by deserializing half of the array and copying to restore the other half of the array.

This example differs from the Using Serialization and the Serializable Fields API Example in that this example does not support versioning. In addition, because this example does not use an Externalizable interface, superclasses are not a consideration.

Additional Information

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a Custom Data Format

Documentation Contents

Serialization and Custom Data Format

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserializationexamples/CustomDataFormat, compile the file CustomDataExample.java using JDK TM 1.1 or higher:
      javac CustomDataExample.java
  2. Run the file you just compiled:
      java CustomDataExample

Two arrays are printed:

  • The first array shows the array before serialization.
  • The second array shows the array after deserialization.

Additional Information:

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Serialization, Evolution, and the Addition of a New SuperClass

Source Files

The following source files are provided:

OriginalClass.java
EvolvedClass.java

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Serialization, Evolution, and the Addition of a New SuperClass

Abstract

Shows how to use versioning in serialization to evolve the class to have a new superclass. For example, if the initial class structure was as follows:

  class A {...};
  class C extends A {...};

and the evolved class structure is as follows:

  class A {...};
  class B extends A {...};
  class C extends B {...};

then the new version of subclass C should be able to read the old version of subclass C, and vice versa. The example demonstrates this principle.

The evolved classses (ASuperClass and ASubClass) must define a serialVersionUID field that is obtained using the command serialver on the original classes (ASuperClass and ASubClass).

Note that in this example, the superclasses (A and B) implement the Serializable interface. If they did not, subclass C would be responsible for saving and restoring the fields of A and B. See Serialization with a NonSerializable Superclass for additional information about this topic.

Additional Information:

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Serialization, Evolution, and the Addition of a New SuperClass

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/AddingNewSuperClassAndEvolution, compile the Original Class using JDK™ 1.2 or higher:
      javac OriginalClass.java
  2. Run the Original Class with the serialization flag:
      java OriginalClass -s
  3. Compile the Evolved Class:
      javac EvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java EvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

For more information:

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Evolution

Source Files

The following source files are provided:

EvolutionExampleOriginalClass.java, the Original Class
EvolutionExampleEvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Evolution

Abstract

Under certain circumstances, when Java objects use serialization to store objects, the version of the class reading the data could be different from the version of class that wrote that data.

This example demonstrates some of the compatible changes that Serialization handles without using class-specific methods.

As with all examples that deal with evolution, the evolved class (AClass) must define a serialVersionUID field that is obtained using the command serialver on the original class (AClass).

Additional Information

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Evolution

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/SerializationAndEvolution, compile the Original Class using JDK™ 1.2 or higher:
      javac EvolutionExampleOriginalClass.java
  2. Run the Original Class with the serialization flag:
      java EvolutionExampleOriginalClass -s
  3. Compile the Evolved Class:
      javac EvolutionExampleEvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
    java EvolutionExampleEvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Externalization and Evolution

Source Files

The following source files are provided:

ExternExampleOriginalClass.java, the Original Class
ExternExampleEvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Externalization and Evolution

Abstract

This example shows how to evolve a persistent format using the Externalizable interface. A class that uses the Externalizable interface is responsible for saving its own state, for saving the state of its supertype, and for versioning (including skipping over data).

This example specifically deals with versioning. For information about saving the state of the supertype, which may or may not be Externalizable, see the following examples:

  • Using Serialization with a NonSerializable Superclass
  • Using Externalization with an Externalizable Superclass
  • Using Externalization with a NonExternalizable Superclass

Additional Information

Running the Example
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Externalization and Evolution

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/ExternalizationandEvolution, compile the Original Class using JDK™ 1.2 or higher:
      javac ExternExampleOriginalClass.java
  2. Run the Original Class with the serialization flag:
      java ExternExampleOriginalClass -s
  3. Compile the Evolved Class:
      javac ExternExampleEvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java ExternExampleEvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an Externalizable SuperClass

">

Source Files

The following source files are provided:

Savesuper.java
Book.java, tThe subclass book
ReadingMaterial.java, the superclass ReadingMaterial
blue bar

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an Externalizable SuperClass

Abstract

When using the Externalizable interface, an externalizable object must implement a writeExternal method to save the state of the object and a readExternal method to restore the state of the object. The externalizable object must also coordinate with its supertype to save and restore its state.

This example demonstrates how an object saves and restores the state of its externalizable supertype. When the supertype of an externalizable object is also externalizable, the subclass object calls the writeExternal and readExternal methods of its superclass in its own writeExternal and readExternal methods.

Additional Information:

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an Externalizable SuperClass

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/ExternalizableSuperclass, compile the Savesuper.java file:
      javac Savesuper.java
  2. Run the file you just compiled: java Savesuper

The original book object is printed (showing the object before serialization) and then the new book object is printed (showing the object after serialization).

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an NonExternalizable SuperClass

Documentation Contents

Exernalization with an NonExternalizable SuperClass

Source Files

The following source files are provided:

Nonexternsuper.java
Book.java, the subclass book
ReadingMaterial.java, the superclass ReadingMaterial

Additional Information:

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an NonExternalizable SuperClass

Documentation Contents

Exernalization with an NonExternalizable SuperClass

Abstract

When using the Externalizable interface, an externalizable object must implement a writeExternal method to save the state of the object and a readExternal method to restore the state of the object. The externalizable object must also coordinate with its supertype to save and restore its state.

This example demonstrates how an object saves and restores the state of its nonexternalizable supertype. When the supertype of an externalizable object is not externalizable, the subclass object must explicitly save and restore the state of the fields of the superclass in its own writeExternal and readExternal methods.

Additional Information:

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Externalization with an NonExternalizable SuperClass

Documentation Contents

Exernalization with an NonExternalizable SuperClass

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserializationexamples/NonExternalizableSuperclass, compile the file Nonexternsuper.java:
      javac Nonexternsuper.java
  2. Run the compiled file:
      java Nonexternsuper

The book object prints out before and after serialization.

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a NonSerializable Superclass

Source Files

The following source files are provided:

NonSerialSuperExample.java
Book.java, the subclass Book
ReadingMaterial.java, the superclass ReadingMaterial

Additional Information:

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a NonSerializable Superclass

Abstract

Shows how to serialize a subclass which has a superclass that is not serializable.

When a superclass of a particular subclass is not serializable, the subclass must save and restore the state of the superclass.

Additional Information

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with a NonSerializable Superclass

Running the Example

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/NonSerializableSuperClass, compile the files:
      javac NonSerialSuperExample.java
  javac Book.java
  javac ReadingMaterial.java
  2. Run the compiled file:
      java NonSerialSuperExample

The book object prints out before and after serialization.

Additional Information:

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Sockets

Source Files

The following source files are provided:

  • Server.java
  • Client.java

Additional Information:

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Sockets

Abstract

Shows how to use sockets and serialization for sending and receiving objects.

In this example, the current date is sent from the client to the server. The file Client.java provides the code for sending the date and the file Server.java provides the code for receiving the date. The Server is the local host machine.

Additional Information:

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Serialization with Sockets

" WIDTH="610" HEIGHT="4">

Running the Example:

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/UsingSockets, compile the files Server.java and Client.java:
      javac Server.java
  javac Client.java
  2. Run the Server:
      java Server
  3. Suspend the Server, using Ctrl/Z on Solaris, Linux, or Mac OS X systems.
  4. Put the Server in the background, using the following command on Solaris, Linux, or Mac OS X systems:
      bg
  5. Run the Client:
      java Client

Using sockets and serialization, the current date is sent from the client to the server, which then prints out the date.

blue bar

Additional Information:

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Substitution by Serializable Classes

Documentation Contents

Serialization and the writeReplace/readResolve Methods

Source Files

The following source file is provided:

Substitute.java

Additional Information

Running the Example
Abstract
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Substitution by Serializable Classes

Documentation Contents

Serialization and the writeReplace/readResolve Methods

Abstract

This example demonstrates how to use the writeReplace/readResolve methods. The readResolve method resolves the object read from the stream before it is returned to the caller. The writeReplace method allows a Serializable class of an object to nominate its own replacement in the stream before the object is written.

This example creates a symbol class for which only one instance of each each symbol binding exists. The Symbol class defines the readResolve method. A symbol is created from outside using the symbollookup method. The symbollookup method finds and returns a symbol if one already and, if one does not already exist, creates one. This assures uniqueness within one VM. Then, when the readResolve method is called as the symbol is being read, a preexisting equivalent Symbol object is substituted from the hashtable to maintain the unique identity constraint, if such a symbol exists. If the symbol does not exist, the new symbol is added to the hashtable and returned. This assures uniqueness when dealing with more than one VM.

Additional Information

Source Files
Running the Example
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Substitution by Serializable Classes

Documentation Contents

Serialization and the writeReplace/readResolve Methods

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserialization/ReplaceableInterface, compile the file Substitute.java using JDK™ 1.2 or higher:
      javac Substitute.java
  2. Run the compiled file:
      java Substitute

Additional Information

Abstract
Sources
List of Examples
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Sound Enhancements in JDK 5.0

The following enhancements took effect at JDK 5.0.

  • Ports are available on all platforms (RFE 4782900).
  • MIDI device i/o is available on all platforms (RFE's 4812168, 4782924).
  • Optimized direct audio access is implemented on all platforms (RFEs 4908240 and 4908879). It is enabled by default on systems which offer native mixing (i.e. Linux ALSA with hardware mixing, Solaris Mixer enabled, Windows DirectSound).
  • The new real-time Sequencer works with all MIDI devices and allows unlimited Transmitters (RFE 4773012).
  • The sound.properties configuration file allows choice of default devices (RFE 4776511). For details, see MidiSystem and AudioSystem for details.
  • MidiDevices can query connected Receivers and Transmitters (RFE 4931387, methods MidiDevice.getReceiver and MidiDevice.getTransmitter).
  • AudioFormat, AudioFileFormat, and MidiFileFormat now have properties that allow further description and qualification of the format (RFEs 4925767 and 4666845).
  • A set of ease-of-use methods allow easier retrieval of lines from AudioSystem (RFE 4896221).
  • The Sequencer interface is extended with loop methods, for seamless looping of specific portions of a MIDI sequence (RFE 4204105).
  • Java Sound no longer prevents the VM from exiting (bug 4735740).
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Sound Enhancements in JDK 7

The following enhancement took effect in JDK 7:

New Software Synthesizer Implementation

Gervill, a software synthesizer implementation, has replaced the Java Sound software synthesizer implementation. Gervill has the following advantages over the old software synthesizer implementation:

  • Open source: The old software synthesizer implementation is part of a licensed library, which cannot be released as open source
  • Supports DLS and SF2: Gervill supports the standards DLS (Downloadable Sounds) Level 2.2 and SF2 (SoundFont) 2.04, both of which are widely used and whose file formats are publicly available; the old software synthesizer uses a proprietary soundbank file format (GM), which is not widely used
  • Supports extended General MIDI standards: Gervill supports General MIDI Level 2 (GM2) and MIDI Tuning; the old software synthesizer supports only GM1
  • Support for resampling (sample rate conversion): A new audio format conversion provider (which supports resampling) was developed as part of the Gervill project

Because Java SE 7 uses Gervill, the following features are not available:

  • GM soundbank support
  • RMF file playback support
  • OSS (Open Sound System) support on Linux

See RFE 6702956.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Sound Technology

The Java Platform includes a powerful API for capturing, processing, and playing back audio and MIDI (Musical Instrument Digital Interface) data. This API is supported by an efficient sound engine which guarantees high-quality audio mixing and MIDI synthesis capabilities for the platform.

The provided reference implementation of this API supports the following features:

  • Audio file formats: AIFF, AU and WAV
  • Music file formats: MIDI Type 0, MIDI Type 1, and Rich Music Format (RMF)
  • Sound formats: 8-bit and 16-bit audio data, in mono and stereo, with sample rates from 8 kHz to 48 kHz
  • Linear, a-law, and mu-law encoded data in any of the supported audio file formats
  • MIDI wavetable synthesis and sequencing in software, and access to hardware MIDI devices
  • An all-software mixer that can mix and render up to 64 total channels of digital audio and synthesized MIDI music

The above list describes the reference implementation, not the API itself. The API permits flexible configuration of the audio and MIDI system, including ways for applications to ask the system exactly what resources are installed and available.

API Reference

  • javax.sound.sampled Package
  • javax.sound.midi Package
  • javax.sound.sampled.spi Package
  • javax.sound.midi.spi Package

Tutorials and Programmer's Guides

  • The Sound Tutorial
  • Java Sound Programmer's Guide - A conceptual description of the Java Sound API, with code examples.

API Enhancements

  • Enhancements in JDK 7
  • Enhancements in JDK 5.0

More Information

  • The Java Sound Home Page
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Sound Architecture Overview

Design Goals

The Java Sound API is a low-level API for effecting and controlling input and output of audio media. It provides explicit control over the capabilities commonly required for audio input and output in a framework that promotes extensibility and flexibility.

Because sound is so fundamental, Java Sound fulfills the needs of a wide range of customers. Potential application areas include:

  • Communication frameworks, such as conferencing and telephony
  • End-user content delivery systems, such as media players and music using streamed content
  • Interactive applications, such as games and Web sites that use dynamic content
  • Content creation and editing
  • Tools, toolkits, and utilities

Java Sound enables applications to extend audio support with specialized capabilities, and integrates well with architectures that provide higher-level interfaces and integration with other media types.

Java Sound provides the lowest level of audio support on the Java platform. It provides a high degree of control over audio-specific functionality. For example, it provides mechanisms for installing, accessing, and manipulating system resources such as digital audio and MIDI (Musical Instrument Digital Interface) devices. It does not include sophisticated sound editors and GUI tools; rather, it provides a set of capabilities upon which such applications can be built. It emphasizes low-level control beyond that commonly expected by the end user, who benefits from higher-level interfaces built on top of Java Sound.

Note: Throughout this document, the word "application" refers generically to Java applets as well as Java applications.

Packages

The Java Sound API includes support for both digital audio and MIDI data. These two major modules of functionality are provided in separate packages:

javax.sound.sampled
This package specifies interfaces for capture, mixing, and playback of digital (sampled) audio.

javax.sound.midi
This package provides interfaces for MIDI synthesis, sequencing, and event transport.

Two other packages permit service providers (as opposed to application developers) to create custom components that can be installed on the system:

javax.sound.sampled.spi
javax.sound.midi.spi

The next section of this document discusses the sampled-audio system, including an overview of the javax.sound.sampled API. The final section covers the MIDI system and the javax.sound.midi API.

Sampled Audio

The javax.sound.sampled package handles digital audio data, also referred to as sampled audio. ("Samples" refer to successive snapshots of a signal, which in the case of digital audio is a sound wave. For example, the audio recorded for storage on compact discs is sampled 44100 times per second. Typically, sampled audio comes from a sound recording, but the sound could instead be synthetically generated. The term "sampled audio" refers to the type of data, not its origin. Sampled audio can be thought of as the sound itself, whereas MIDI data can be thought of as a recipe for creating musical sound.)

Java Sound does not assume a specific audio hardware configuration; it is designed to allow different sorts of audio components to be installed on a system and accessed by the API. Java Sound supports common functionality such as input and output from a sound card (for example, for recording and playback of sound files) as well as mixing of multiple streams of audio. Here is one example of a typical audio architecture for which Java Sound might be used:

The logic flows from the input device to the software mixer and finaly to the output device. Each device has various input and output ports.

A Typical Audio Architecture

In this example, a device such as a sound card has various input and output ports, and mixing is provided in software. The MIDI synthesizer shown as one of the mixer???s audio inputs might also be a feature of the sound card, or it might be implemented in software. (The javax.sound.midi package, discussed later, supplies a Java interface for synthesizers.)

The major concepts used in the javax.sound.sampled package are described in the sections below.

Lines

A line is an element of the digital audio "pipeline," such as an audio input or output port, a mixer, or an audio data path into or out of a mixer. The audio data flowing through a line can be mono or multichannel (for example, stereo). Each type of line will be described shortly, but first some of their functional relationships will be illustrated, showing the flow of audio through the "pipeline." The following diagram shows different types of lines in a simple audio-output system:

The following context describes this graphic.

A Possible Configuration of Lines for Audio Output

In this example, an application has asked a mixer for one or more available clips and source data lines. A clip is a mixer input into which you can load audio data prior to playback; a source data line is a mixer input that accepts a real-time stream of audio data. The application preloads audio data from a sound file into the clips, and then pushes other audio data into the source data lines. The mixer reads data from these lines, each of which may have its own reverberation, gain, and pan controls, and uses the reverb settings to mix the "dry" audio signals with the reverberated ("wet") mix. The mixer delivers its final output to one or more output ports, such as a speaker, a headphone jack, and a line-out jack.

Although the various lines are depicted as separate rectangles in the diagram, they are all "owned" by the mixer, and can be considered integral parts of the mixer. The reverb, gain, and pan rectangles represent processing controls (rather than lines) that can be applied by the mixer to data flowing through the lines. (Note that this is just one example of a possible audio system that is supported by the API. Not all audio configurations will have all the features illustrated. An individual source data line might not support panning, a mixer might not implement reverb, and so on.)

A simple audio-input system might be similar:

The following context describes this graphic.

A Possible Configuration of Lines for Audio Input

Here, data flows in to the mixer from one or more input ports, commonly the microphone or the line-in jack. Gain and pan are applied, and the mixer delivers the captured data to an application via the mixer's target data line. A target data line is a mixer output, containing the mixture of the streamed input sounds. The simplest mixer has just one target data line, but some mixers can deliver captured data to multiple target data lines simultaneously.

The different types of line will now be examined more closely. Several types of line are defined by subinterfaces of the basic Line interface. The interface hierarchy is shown below.

See long description [D]

The Line Interface Hierarchy

The base interface, Line, describes the minimal functionality common to all lines:

  • Routing

    A line has an information object (an instance of Line.Info) that indicates what mixer (if any) sends its mixed audio data as output directly to the line, and what mixer (if any) gets audio data as input directly from the line. Subinterfaces of Line may have corresponding subclasses of Line.Info that provide other kinds of information specific to the particular types of line.
  • Controls

    A line can have various types of controls, such as gain, pan, and reverb controls. Usually, a line has no more than one control of a given type, but this is not a necessary limitation. Controls are discussed in more detail below.
  • Open or closed status

    Opening and closing a line affects its resource allocation. Successful opening of a line guarantees that resources have been allocated to the line. Opening a mixer that has audio input and/or output ports normally involves acquiring the native platform hardware resource (sound card) and initializing any required software components. Opening a line that is a data path in or out of the mixer might involve device initialization as well as allocation of limited resources from the mixer. In other words, a mixer has a finite number of lines, so at some point multiple applications (or the same application) might vie for usage of the mixer.

    Closing a line indicates that any resources used by the line may now be released. To free up resources, applications should close lines whenever they are not in use, and must close all opened lines when exiting.

    Mixers are assumed to be shared system resources, and can be opened and closed repeatedly. Other lines may or may not support re-opening once they have been closed. Mechanisms for opening lines vary with the different sub-types and are documented where they are defined.

  • Events

    A line generates events when it opens or closes. The events are instances of the LineEvent class. Two types of LineEvent are OPEN and CLOSE, but subinterfaces of Line can introduce other types of events.

    When a line generates an OPEN or CLOSE event, the event is sent to all objects that have registered to "listen" for events on that line. Such objects must implement the LineListener interface. An application can create these objects, register them to listen for line events, and react to the events as desired.
Ports are simple lines for input or output of audio to or from audio devices. The Port interface has an inner class, Port.Info, that specifies the type of port. Some common types are the microphone, line input, CD-ROM drive, speaker, headphone, and line output.

The Mixer interface represents a hardware or software device that has one or more input lines and one or more output lines. This definition means that a mixer need not actually mix data; it might have only a single input. The Mixer API is intended to encompass a variety of devices, but the typical case supports mixing.

The Mixer interface provides methods for obtaining a mixer's lines. These can include target data lines, from which an application can read captured audio data, source data lines, to which an application can write audio data for playback (rendering), and clips, in which an application can preload sound data for playback. The mixer can lock these resources. For example, if the mixer has only one target data line and it is already in use, an attempt by an application to obtain a target data line will cause an exception to be thrown.

You can query a mixer for lines of different types, by passing the appropriate type of Line.Info. You can also ask the mixer how many lines of a particular type it supports.

A mixer maintains textual information about its specific device type in an inner class called Mixer.Info. This information include the product's name, version, and vendor, along with a textual description.

Notice that the generic Line interface does not provide a means to start and stop playback or recording. For that you need a data line. The DataLine interface supplies the following additional media-related features beyond those of a Line:

  • Audio format

    Each data line has an audio format associated with its data stream. The format (an instance of AudioFormat) specifies the arrangement of the bytes in the audio stream. Some of the format's properties are the number of channels, the sample rate, the sample size, and the encoding technique. Common encoding techniques include linear pulse-code modulation (PCM), mu-law encoding, and a-law encoding.
  • Media position

    A data line can report its current position in the media, expressed in sample frames. This represents the number of sample frames captured by or rendered from the data line since it was opened.
  • Buffer size

    This is the size of the data line???s internal buffer in sample frames. For a source data line, the internal buffer is one to which data can be written, and for a target data line it???s one from which data can be read.
  • Level

    The data line's level represents the current linear amplitude of the audio signal, from 0 to 1.
  • Start and stop playback or capture

  • Pause and resume

    Pausing a data line causes it to cease data I/O activity (capture or playback) without discarding data or releasing resources. Resuming the line enables it to continue data I/O activity. Pausing a data line can result in an audible discontinuity (such as a click) in playback or recording. To avoid overfilling the capture buffer, an application that is recording audio should pause the target data line from which it reads audio whenever it is not prepared to read captured data continuously. Resuming a paused source data line will play back the next samples from its queue, unless the data line has been flushed.
  • Flush

    Flushing a data line discards unprocessed data from the queue and returns. In some cases, not all queued data can be discarded. For example, a mixer can flush data from the buffers in its source data lines, but any unplayed data already in its internal buffer (which contains the mixed output data) will still be played.
  • Drain

    Draining a data line blocks until all unprocessed data has been drained from the queue, and the data line's buffer has become empty. If you attempt to drain a data line whose buffer is still being filled (either by the application or by a mixer), the draining might not complete.
  • Active status

    A data line is considered active if it is engaged in active presentation or capture of audio data to or from a mixer.
  • Events

    START and STOP events are produced when active presentation or capture of data from or to the data line starts or stops.

An application can obtain a data line from a mixer. If the data line cannot be allocated because of resource constraints (for example, if the mixer supports only one target data line and it is already in use), an exception is thrown.

A TargetDataLine receives audio data from a mixer. Commonly, the mixer has captured audio data from a port such as a microphone; it might process or mix this captured audio before placing the data in the target data line's buffer. The TargetDataLine interface provides methods for reading the data from the target data line's buffer and for determining how much data is currently available for reading. If an application attempts to read more data than is available, the read method blocks until the requested amount of data is available. This applies even if the amount of data requested is greater than the line's buffer size. The read method returns if the line is closed, paused, or flushed.

Applications recording audio should read data from the target data line fast enough to avoid overflow of the buffer, which results in discontinuities in the captured data. If the buffer does overflow, the oldest queued data is discarded and replaced by new data.

A SourceDataLine receives audio data for playback. It provides methods for writing data to the source data line's buffer for playback, and for determining how much data the line is prepared to receive without blocking. If an application attempts to write more data than is available, the read method blocks until the requested amount of data can be written. This applies even if the amount of data requested is greater than the line's buffer size. The write method also returns if the line is closed, paused, or flushed.

Applications playing audio should write data to the source data line fast enough to avoid underflow (emptying) of the buffer, which may result in discontinuities in audio playback. If audio playback stops due to underflow, a STOP event is generated. A START event is generated when presentation resumes.

A Clip is a data line into which audio data can be loaded prior to playback. Because the data is pre-loaded rather than streamed, the clip???s duration is known before playback, and you can choose any starting position in the media. Clips can be looped, meaning that upon playback, all the data between two specified loop points will repeat a specified number of times, or indefinitely.

A GroupLine is a synchronized group of data lines. If a mixer supports group lines, you can specify which data lines should be treated as a group. Then you can start, stop, or close all those data lines by sending a single message to the group, instead of having to control each line individually.

Controls

Data lines and ports often have a set of controls that affect the audio signal passing through the line. The way in which the signal is affected depends on the type of control. The Java Sound API defines the following subclasses of Control:

  • GainControl

    This control allows the signal's volume to be boosted or cut a specified number of decibels. A fade can be applied so that the volume increases or decreases gradually instead of instantly. The gain control includes a mute function to temporarily silence the line without altering its gain setting. A GainControl object can be queried for its resolution and for the minimum and maximum gain values it permits. The resolution is expressed as the number of increments over which the range of possible values is distributed.

    The types of gain control defined by the API include an overall gain control as well as gain controls for auxiliary send and return. The send and return typically control a line's contribution to a mixed and reverberated signal.
  • PanControl

    A pan control affects the sound's right-left positioning. For a stereo audio signal, the pan control affects the balance between the volumes of the left and right channels. An application can set the pan position and can query the control for its resolution. The resolution is expressed as the number of incremental values from "hard left" to "hard right."
  • ReverbControl

    This control gives access to any number of reverberation settings. Each setting might emulate a different time of room (small club, concert hall, cavern, etc.). The parameters used in constructing each setting consist of the delay time and intensity of early reflections, the delay time and intensity of late reflections, and an overall decay time.
  • SampleRateControl

    This control affects the rate of playback. Altering the audio sample rate changes the sound's pitch. As with GainControl, the change can be made gradually instead of immediately, and the control can be queried for its resolution and its minimum and maximum possible values.

Programmatically, you obtain a particular control object from a line through a reference to the control???s class. You can also obtain an array of all the controls for that line.

AudioSystem

The AudioSystem class serves as an application's entry point for accessing the installed sampled-audio resources. You can query the AudioSystem to learn what sorts of audio components have been installed, and then you can obtain access to them. For example, an application might start out by asking the AudioSystem class whether there is a mixer that has a certain configuration, such as one of the input or output configurations illustrated earlier in the discussion of lines. From the mixer, the application would then obtain data lines, and so on.

Here are some of the resources an application can obtain from the AudioSystem:

  • Mixers

    A mixer can be obtained by passing a specific Mixer.Info object. You can learn what mixers are available by invoking the getMixerInfo method, which returns an array of Mixer.Info objects.
  • Lines

    An application can get a target data line or source data line directly from the AudioSystem, without dealing explicitly with mixers.
  • Format conversions

    An application can use format conversions to translate audio data from one format to another. (See the discussion of AudioFormat above.) Format conversions are often used to compress and decompress audio data. An application can query the AudioSystem to learn what translations are supported. It can then pass the AudioSystem a stream of audio data and get back a translated stream in a particular format.

  • Files and streams

    An audio stream is an input stream with a specified audio data format (AudioFormat) and data length. The AudioInputStream class represents such a stream, from which you can read bytes. Some audio input streams permit you to remember positions in the stream and skip around in it. The AudioSystem class provides methods for translating between audio files and audio streams. The AudioSystem can also report the file format of a sound file and can write files in the different formats. A file format is represented by the AudioFileFormat class. An AudioFileFormat includes an AudioFormat, the file's length, and its type (WAV, AIFF, AU, etc.).

System configuration (SPI classes)

Service provider interfaces for the sampled audio system are defined in the javax.sound.sampled.spi package. Service providers can extend the classes defined here so that their own audio devices, sound file parsers and writers, and format converters can be installed and made available by a Java Sound implementation.

MIDI

Interfaces describing MIDI event transport, synthesis, and sequencing are defined in the javax.sound.midi package. The major concepts used in the package are described in the sections below.

Functional Overview

The diagram below illustrates the functional relationships between the major components in a typical Java Sound MIDI configuration. (Java Sound permits a variety of devices to be installed and interconnected. The system shown here is just one possible scenario.) The flow of data between components is indicated by arrows. The data can be in a standard file format, or (as indicated by the key in the lower right corner of the diagram), it can be audio, raw MIDI bytes, or Java Sound's MidiEvent objects.

The following context describes this graphic

A Typical MIDI Configuration

In this example, the application prepares a musical performance by loading a musical score that is stored as a Standard MIDI File on a disk (lower left corner of the diagram). Standard MIDI files contain tracks, each of which is a list of time-tagged MIDI events. This MIDI file is read into a Sequence object, whose data structure reflects the file. A Sequence contains a set of Track objects, each of which contains a set of MidiEvent objects. The Sequence is then "performed" by a Sequencer. A Sequencer performs its music by sending MidiEvents to some other device, such as an internal or external synthesizer.

As illustrated, MidiEvents must be translated into raw (non-time-tagged) MIDI before being sent through a MIDI output port to an external synthesizer. This conversion is accomplished by a a MIDI-output device called a StreamGenerator. Similarly, raw MIDI data coming into the computer from an external MIDI source is translated into MidiEvents by a StreamParser.

The internal synthesizer (the rectangle marked "Synthesizer" in the diagram) accepts MidiEvents directly from the Sequencer or StreamParser. It parses each event and usually dispatches a corresponding command (such as noteOn) to one of its MidiChannel objects, according to the MIDI channel number specified in the event. (The MIDI Specification calls for 16 MIDI channels, so a Synthesizer typically has 16 MidiChannel objects.)

The MidiChannel uses the note information in these messages to synthesize music. For example, a noteOn message specifies the note's pitch and "velocity" (volume). However, the note information is insufficient; the synthesizer also requires precise instructions on how to create the audio signal for each note. These instructions are represented by an Instrument. Each Instrument typically emulates a different real-world musical instrument or sound effect. The Instruments might come as presets with the synthesizer, or they might be loaded from soundbank files. In the synthesizer, the Instruments are arranged by bank number (the rows in the diagram) and program number (the columns). An Instrument can make use of stored digital audio, included as Sample objects in the soundbank. For example, to play the sound of a trumpet playing a 5-second-long note, the synthesizer might loop (cycle) through a half-second snippet of a recording of a trumpet.

Now that the components have been introduced from a functional perspective, we will take a brief look at the API from a programmatic perspective.

MidiEvent

A MidiEvent object specifies the type, data length, and status byte of the raw MIDI message for which it serves as a wrapper. In addition, it provides a tick value that is used by devices involved in MIDI timing, such as sequencers.

There are three categories of events, each represented by a MidiEvent subclass:

  • ShortEvents are the most common and have at most two data bytes following the status byte.
  • SysexEvents contain system-exclusive MIDI messages. They may have many bytes, and generally contain manufacturer-specific instructions.
  • MetaEvents occur in MIDI files, but not in raw MIDI data streams. Meta events contain data, such as lyrics or tempo settings, that might be useful to sequencers but are usually meaningless for synthesizers.

MidiDevice

The base interface for devices is MidiDevice. All devices provide methods for listing the set of MIDI modes that they support, and for querying and setting the current mode. (The mode is a combination of MIDI's Omni mode and Mono/Poly mode.) Devices can be opened and closed, and they provide descriptions of themselves through a MidiDevice.Info object.

The following diagram illustrates the MidiDevice interface hierarchy. Also depicted are two classes, connected by dashed lines to the MidiDevice interfaces they implement.

The following context describes this graphic

MidiDevice Hierarchy

Devices are generally either transmitters or receivers of MidiEvents. The Transmitter subinterface of MidiDevice includes methods for setting and querying the receivers to which the transmitter is sending MidiEvents. From the perspective of a transmitter, these receivers fall into two categories: MIDI Out and MIDI Thru. The transmitter sends events that it generates itself to its MIDI Out receivers. If the transmitter is itself also a receiver, it passes along events that it has received from elsewhere to its MIDI Thru receivers. The Receiver subinterface of MidiDevice consists of a single method for receiving MidiEvents. Typically, this method is invoked by a Transmitter.

Java Sound includes concrete classes for converting between MidiEvent objects and the raw byte stream used in MIDI wire protocol. A StreamGenerator is a Receiver that accepts MidiEvent objects from a Transmitter and writes out a raw MIDI byte stream. Similarly, a StreamParser is a Transmitter that accepts a raw MIDI byte stream and writes the corresponding MidiEvent objects to its Receiver.

Synthesis

A Synthesizer is a type of MidiDevice that generates sound. The Synthesizer interface extends both Receiver and Transmitter. It provides methods for manipulating soundbanks and instruments. In addition, it provides access to a set of MIDI channels through which sound is actually produced. A Synthesizer receives MidiEvents and invokes corresponding MidiChannel messages.

MidiChannels have methods representing the common MIDI voice messages such as "note on" and "control change." They also permit queries of the channel's current state.

Sequencing

Like Synthesizer, the Sequencer interface extends both Transmitter and Receiver (and therefore MidiDevice). Sequencer adds methods for basic MIDI sequencing operations. A sequencer can load and play back a sequence, query and set the tempo, and control the master and slave sync modes. An application can register to be notified when the sequencer processes MetaEvents and controller events. (A controller event occurs when a MIDI controller, such as a pitch-bend wheel or a data slider, changes its value. These events are not MidiEvents, but are created when the Sequencer encounters certain ShortEvents in the Sequence.)

The Sequence object represents a MIDI sequence as one or more tracks and associated timing information. A track contains a list of time-stamped MIDI events. Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the Tracks.

A track contains a list of time-stamped MIDI events. Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the Tracks.

It is not necessary to load a MIDI file into a Sequence object before playing the file. The setSequence(java.io.InputStream) method of Sequencer lets you read a MIDI file directly into a Sequencer, without creating a Sequence object first.

MidiSystem

MidiSystem acts as an application's entry point to the MIDI music system. It provides information about, and access to, the set of installed devices, including transmitters, receivers, synthesizers, and sequencers.

The MidiSystem class provides methods for reading MIDI files to create Sequence objects, and for writing Sequences to MIDI files. A MIDI Type 0 file contains only one track, while a Type 1 file may contain any number. MidiSystem also provides methods to create Soundbank objects by parsing soundbank files.

System configuration (SPI interfaces)

Configuration of the MIDI system is handled in the javax.sound.midi.spi package. The abstract classes in this package allow service providers to supply and install their own MIDI devices, MIDI file readers and writers, and soundbank file readers.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessing Audio System Resources

Documentation Contents

< Contents

Chapter 3: Accessing Audio System Resources

Notes

  1. The Port class was not available on all platforms before JDK 5.0.
  2. With version 5.0, the sound.properties file can be used to set default devices for Clip, Port, SourceDataLine, and TargetDataLine. For details, see the AudioSystem class in the API; for examples, see Appendix 2: sound.properties File in this guide.
  3. While the method for obtaining lines, as outlined below in Getting a Line of a Desired Type, is still valid, for 5.0 there are convenience methods for Clip, SourceDataLine, and TargetDataLine: AudioSystem.getClip(), AudioSystem.getSourceDataLine(), and AudioSystem.getTargetDataLine(). See the AudioSystem for details.

The Java Sound API takes a flexible approach to system configuration. Different sorts of audio devices (mixers) can be installed on a computer. The API makes few assumptions about what devices have been installed and what their capabilities are. Instead, it provides ways for the system to report about the available audio components, and ways for your program to access them.

This section shows how your program can learn what sampled-audio resources have been installed on the computer, and how it can gain access to the available resources. Among other things, the resources include mixers and the various types of lines owned by the mixers.

The AudioSystem Class

The AudioSystem class acts as a clearinghouse for audio components, including built-in services and separately installed services from third-party providers. AudioSystem serves as an application program's entry point for accessing these installed sampled-audio resources. You can query the AudioSystem to learn what sorts of resources have been installed, and then you can obtain access to them. For example, an application program might start out by asking the AudioSystem class whether there is a mixer that has a certain configuration, such as one of the input or output configurations illustrated earlier in the discussion of lines. From the mixer, the program would then obtain data lines, and so on.

Here are some of the resources an application program can obtain from the AudioSystem:

  • Mixers A system typically has multiple mixers installed. There is usually at least one for audio input and one for audio output. There might also be mixers that don't have I/O ports but instead accept audio from an application program and deliver the mixed audio back to the program. The AudioSystem class provides a list of all of the installed mixers.
  • Lines Even though every line is associated with a mixer, an application program can get a line directly from the AudioSystem, without dealing explicitly with mixers.
  • Format conversions An application program can use format conversions to translate audio data from one format to another. Conversions are described in Chapter 7, "Using Files and Format Converters."
  • Files and streams The AudioSystem class provides methods for translating between audio files and audio streams. It can also report the file format of a sound file and can write files in different formats. These facilities are discussed in Chapter 7, "Using Files and Format Converters."

Information Objects

Several classes in the Java Sound API provide useful information about associated interfaces. For example, Mixer.Info provides details about an installed mixer, such as the mixer's vendor, name, description, and version. Line.Info obtains the class of a specific line. Subclasses of Line.Info include Port.Info and DataLine.Info, which obtain details relevant to a specific port and data line, respectively. Each of these classes is described further in the appropriate section below. It's important not to confuse the Info object with the mixer or line object that it describes.

Getting a Mixer

Usually, one of the first things a program that uses the Java Sound API needs to do is to obtain a mixer, or at least one line of a mixer, so that you can get sound into or out of the computer. Your program might need a specific kind of mixer, or you might want to display a list of all the available mixers so that the user can select one. In either case, you need to learn what kinds of mixers are installed. AudioSystem provides the following method:

    static Mixer.Info[] getMixerInfo()
Each Mixer.Info object returned by this method identifies one type of mixer that is installed. (Usually a system has at most one mixer of a given type. If there happens to be more than one of a given type, the returned array still only has one Mixer.Info for that type.) An application program can iterate over the Mixer.Info objects to find an appropriate one, according to its needs. The Mixer.Info includes the following strings to identify the kind of mixer:
  • Name
  • Version
  • Vendor
  • Description

These are arbitrary strings, so an application program that needs a specific mixer must know what to expect and what to compare the strings to. The company that provides the mixer should include this information in its documentation. Alternatively, and perhaps more typically, the application program will display all the Mixer.Info objects' strings to the user and let the user choose the corresponding mixer.

Once an appropriate mixer is found, the application program invokes the following AudioSystem method to obtain the desired mixer:

    static Mixer getMixer(Mixer.Info info)
What if your program needs a mixer that has certain capabilities, but it doesn't need a specific mixer made by a specific vendor? And what if you can't depend on the user's knowing which mixer should be chosen? In that case, the information in the Mixer.Info objects won't be of much use. Instead, you can iterate over all the Mixer.Info objects returned by getMixerInfo, get a mixer for each by invoking getMixer, and query each mixer for its capabilities. For example, you might need a mixer that can write its mixed audio data to a certain number of target data lines simultaneously. In that case, you would query each mixer using this Mixer method: int getMaxLines(Line.Info info)

Here, the Line.Info would specify a TargetDataLine. The Line.Info class is discussed in the next section.

Getting a Line of a Desired Type

There are two ways to get a line:

  • Directly from the AudioSystem object
  • From a mixer that you have already obtained from the AudioSystem object (see "Getting a Mixer," in this chapter)

Getting a Line Directly from the AudioSystem

Let's assume you haven't obtained a mixer, and your program is a simple one that really only needs a certain kind of line; the details of the mixer don't matter to you. You can use the AudioSystem method:

    static Line getLine(Line.Info info)
which is analogous to the getMixer method discussed above. Unlike Mixer.Info, the Line.Info used as an argument doesn't store textual information to specify the desired line. Instead, it stores information about the class of line desired.

Line.Info is an abstract class, so you use one of its subclasses (Port.Info or DataLine.Info) to obtain a line. The following code excerpt uses the DataLine.Info subclass to obtain and open a target data line:

TargetDataLine line;
DataLine.Info info = new DataLine.Info(TargetDataLine.class,
    format); // format is an AudioFormat object
if (!AudioSystem.isLineSupported(info)) {
    // Handle the error.
    }
    // Obtain and open the line.
try {
    line = (TargetDataLine) AudioSystem.getLine(info);
    line.open(format);
} catch (LineUnavailableException ex) {
        // Handle the error.
    //...
}
This code obtains a TargetDataLine object without specifying any attributes other than its class and its audio format. You can use analogous code to obtain other kinds of lines. For a SourceDataLine or a Clip, just substitute that class for TargetDataLine as the class of the line variable, and also in the first argument to the DataLine.Info constructor.

For a Port, you can use static instances of Port.Info, in code like the following:

if (AudioSystem.isLineSupported(Port.Info.MICROPHONE)) {
    try {
        line = (Port) AudioSystem.getLine(
            Port.Info.MICROPHONE);
    }
}
Note the use of the method isLineSupported to see whether the mixer even has a line of the desired type.

Recall that a source line is an input to a mixer—namely, a Port object if the mixer represents an audio-input device, and a SourceDataLine or Clip object if the mixer represents an audio-output device. Similarly, a target line is an output of the mixer: a Port object for an audio-output mixer, and a TargetDataLine object for an audio-input mixer. What if a mixer doesn't connect to any external hardware device at all? For example, consider an internal or software-only mixer that gets audio from an application program and delivers its mixed audio back to the program. This kind of mixer has SourceDataLine or Clip objects for its input lines and TargetDataLine objects for its output lines.

You can also use the following AudioSystem methods to learn more about source and target lines of a specified type that are supported by any installed mixer:

    static Line.Info[] getSourceLineInfo(Line.Info info)
    static Line.Info[] getTargetLineInfo(Line.Info info)
Note that the array returned by each of these methods indicates unique types of lines, not necessarily all the lines. For example, if two of a mixer's lines, or two lines of different mixers, have identical Line.Info objects, the two lines will represented by only one Line.Info in the returned array.

Getting a Line from a Mixer

The Mixer interface includes variations on the AudioSystem access methods for source and target lines, described above. These Mixer methods include ones that take Line.Info arguments, just as AudioSystem's methods do. However, Mixer also includes these variants, which take no arguments:

    Line.Info[] getSourceLineInfo()
    Line.Info[] getTargetLineInfo()
These methods return arrays of all the Line.Info objects for the particular mixer. Once you've obtained the arrays, you can iterate over them, calling Mixer's getLine method to obtain each line, followed by Line's open method to reserve use of each line for your program.

Selecting Input and Output Ports

The previous section, regarding how to obtain a line of a desired type, applies to ports as well as other types of lines. You can obtain all of the source (i.e., input) and target (i.e, output) ports by passing a Port.Info object to the AudioSystem (or Mixer) methods getSourceLineInfo and getTargetLineInfo that take a Line.Info argument. You then iterate over the returned array of objects and invoke Mixer's getLine method to get each port.

You can then open each Port by invoking Line's open method. Opening a port means you turn it on—that is, you allow sound to come in or out the port. Similarly, you can close ports that you don't want sound to travel through, because some ports might already be open before you even obtain them. Some platforms leave all ports on by default; or a user or system administrator might have selected certain ports to be on or off, using another application program or operating-system software.

Warning: If you want to select a certain port and make sure that the sound is actually going in or out the port, you can open the port as described. However, this can be considered user-hostile behavior! For example, a user might have the speaker port turned off so as not to disturb her co-workers. She would be rather upset if your program suddenly overrode her wishes and started blaring music. As another example, a user might want to be assured that his computer's microphone is never turned on without his knowledge, to avoid eavesdropping. In general, it is recommended not to open or close ports unless your program is responding to the user's intentions, as expressed through the user interface. Instead, respect the settings that the user or the operating system has already selected.

It isn't necessary to open or close a port before the mixer it's attached to will function correctly. For example, you can start playing back sound into an audio-output mixer, even though all its output ports are closed. The data still flows into the mixer; the playback isn't blocked. The user just won't hear anything. As soon as the user opens an output port, the sound will be audible through that port, starting at whatever point in the media the playback has already reached.

Also, you don't need to access the ports to learn whether the mixer has certain ports. To learn whether a mixer is actually an audio-output mixer, for example, you can invoke getTargetLineInfo to see whether it has output ports. There's no reason to access the ports themselves unless you want to change their settings (such as their open-or-closed state, or the settings of any controls they might have).

Permission to Use Audio Resources

The Java Sound API includes an AudioPermission class that indicates what kinds of access an applet (or an application running with a security manager) can have to the sampled-audio system. Permission to record sound is controlled separately. This permission should be granted with care, to help prevent security risks such as unauthorized eavesdropping. By default, applets and applications are granted permissions as follows:

  • An applet running with the applet security manager can play, but not record, audio.
  • An application running with no security manager can both play and record audio.
  • An application running with the default security manager can play, but not record, audio.

In general, applets are run under the scrutiny of a security manager and aren't permitted to record sound. Applications, on the other hand, don't automatically install a security manager, and are able to record sound. (However, if the default security manager is invoked explicitly for an application, the application isn't permitted to record sound.)

Both applets and applications can record sound even when running with a security manager if they have been granted explicit permission to do so.

If your program doesn't have permission to record (or play) sound, an exception will be thrown when it attempts to open a line. There is nothing you can do about this in your program, other than to catch the exception and report the problem to the user, because permissions can't be changed through the API. (If they could, they would be pointless, because nothing would be secure!) Generally, permissions are set in one or more policy configuration files, which a user or system administrator can edit using a text editor or the Policy Tool program.

For more information on security and permissions, see "Security Architecture" and "Policy Permissions" in the Security guide and the specialized trail on security in the Java Tutorial.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Accessing MIDI System Resources

Documentation Contents

< Contents

Chapter 9: Accessing MIDI System Resources

Note

With version 5.0, the sound.properties file can be used to set default devices for Sequencer, Synthesizer, Transmitter, and Receiver. For details, see the MidiSystem class in the API; for examples, see Appendix 2: sound.properties File in this guide.

The Java Sound API offers a flexible model for MIDI system configuration, just as it does for configuration of the sampled-audio system. An implementation of the Java Sound API can itself provide different sorts of MIDI devices, and additional ones can be supplied by service providers and installed by users. You can write your program in such a way that it makes few assumptions about which specific MIDI devices are installed on the computer. Instead, the program can take advantage of the MIDI system's defaults, or it can allow the user to select from whatever devices happen to be available.

This section shows how your program can learn what MIDI resources have been installed, and how to get access to the desired ones. After you've accessed and opened the devices, you can connect them to each other, as discussed in the next chapter, "Transmitting and Receiving MIDI Messages."

The MidiSystem Class

The role of the MidiSystem class in the Java Sound API's MIDI package is directly analogous to the role of AudioSystem in the sampled-audio package. MidiSystem acts as a clearinghouse for accessing the installed MIDI resources.

You can query the MidiSystem to learn what sorts of devices are installed, and then you can iterate over the available devices and obtain access to the desired ones. For example, an application program might start out by asking the MidiSystem what synthesizers are available, and then display a list of them, from which the user can select one. A simpler application program might just use the system's default synthesizer.

The MidiSystem class also provides methods for translating between MIDI files and Sequences. It can report the file format of a MIDI file and can write files of different types.

An application program can obtain the following resources from the MidiSystem:

  • Sequencers
  • Synthesizers
  • Transmitters (such as those associated with MIDI input ports)
  • Receivers (such as those associated with MIDI output ports)
  • Data from standard MIDI files
  • Data from soundbank files

This chapter focuses on the first four of these types of resource. The MidiSystem class's file-handling facilities are discussed in Chapter 11, "Playing, Recording, and Editing MIDI Sequences," and Chapter 12, "Synthesizing Sound." To understand how the MIDI system itself gets access to all these resources, see Part III of this guide, "Service Provider Interfaces."

Obtaining Default Devices

A typical MIDI application program that uses the Java Sound API begins by obtaining the devices it needs, which can consist of one or more sequencers, synthesizers, input ports, or output ports.

There is a default synthesizer device, a default sequencer device, a default transmitting device, and a default receiving device. The latter two devices normally represent the MIDI input and output ports, respectively, if there are any available on the system. (It's easy to get confused about the directionality here. Think of the ports' transmission or reception in relation to the software, not in relation to any external physical devices connected to the physical ports. A MIDI input port transmits data from an external device to a Java Sound API Receiver, and likewise a MIDI output port receives data from a software object and relays the data to an external device.)

A simple application program might just use the default instead of exploring all the installed devices. The MidiSystem class includes the following methods for retrieving default resources:

    static Sequencer getSequencer()
    static Synthesizer getSynthesizer()
    static Receiver getReceiver()
    static Transmitter getTransmitter()

The first two of these methods obtain the system's default sequencing and synthesis resources, which either represent physical devices or are implemented wholly in software. The getReceiver method obtains a Receiver object that takes MIDI messages sent to it and relays them to the default receiving device. Similarly, the getTransmitter method obtains a Transmitter object that can send MIDI messages to some receiver on behalf of the default transmitting device.

Learning What Devices Are Installed

Instead of using the default devices, a more thorough approach is to select the desired devices from the full set of devices that are installed on the system. An application program can select the desired devices programmatically, or it can display a list of available devices and let the user select which ones to use. The MidiSystem class provides a method for learning which devices are installed, and a corresponding method to obtain a device of a given type.

Here is the method for learning about the installed devices:

    static MidiDevice.Info[] getMidiDeviceInfo()

As you can see, it returns an array of information objects. Each of these returned MidiDevice.Info objects identifies one type of sequencer, synthesizer, port, or other device that is installed. (Usually a system has at most one instance of a given type. For example, a given model of synthesizer from a certain vendor will be installed only once. ) The MidiDevice.Info includes the following strings to describe the device:

  • Name
  • Version number
  • Vendor (the company that created the device)
  • A description of the device

You can display these strings in your user interface to let the user select from the list of devices.

However, to use the strings programmatically to select a device (as opposed to displaying the strings to the user), you need to know in advance what they might be. The company that provides each device should include this information in its documentation. An application program that requires or prefers a particular device can use this information to locate that device. This approach has the drawback of limiting the program to device implementations that it knows about in advance.

Another, more general, approach is to go ahead and iterate over the MidiDevice.Info objects, obtaining each corresponding device, and determining programmatically whether it's suitable to use (or at least suitable to include in a list from which the user can choose). The next section describes how to do this.

Obtaining a Desired Device

Once an appropriate device's info object is found, the application program invokes the following MidiSystem method to obtain the corresponding device itself:

    static MidiDevice getMidiDevice(MidiDevice.Info info)

You can use this method if you've already found the info object describing the device you need. However, if you can't interpret the info objects returned by getMidiDeviceInfo to determine which device you need, and if you don't want to display information about all the devices to the user, you might be able to do the following instead: Iterate over all the MidiDevice.Info objects returned by getMidiDeviceInfo, get the corresponding devices using the method above, and test each device to see whether it's suitable. In other words, you can query each device for its class and its capabilities before including it in the list that you display to the user, or as a way to decide upon a device programmatically without involving the user. For example, if your program needs a synthesizer, you can obtain each of the installed devices, see which are instances of classes that implement the Synthesizer interface, and then display them in a list from which the user can choose one, as follows:

// Obtain information about all the installed synthesizers.
Vector synthInfos;
MidiDevice device;
MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
for (int i = 0; i < infos.length; i++) {
    try {
        device = MidiSystem.getMidiDevice(infos[i]);
    } catch (MidiUnavailableException e) {
          // Handle or throw exception...
    }
    if (device instanceof Synthesizer) {
        synthInfos.add(infos[i]);
    }
}
// Now, display strings from synthInfos list in GUI.

As another example, you might choose a device programmatically, without involving the user. Let's suppose you want to obtain the synthesizer that can play the most notes simultaneously. You iterate over all the MidiDevice.Info objects, as above, but after determining that a device is a synthesizer, you query its capabilities by invoking the getMaxPolyphony method of Synthesizer. You reserve the synthesizer that has the greatest polyphony, as described in the next section. Even though you're not asking the user to choose a synthesizer, you might still display strings from the chosen MidiDevice.Info object, just for the user's information.

Opening Devices

The previous section showed how to get an installed device. However, a device might be installed but unavailable. For example, another application program might have exclusive use of it. To actually reserve a device for your program, you need to use the MidiDevice method open:

if (!(device.isOpen())) {
    try {
      device.open();
  } catch (MidiUnavailableException e) {
          // Handle or throw exception...
  }
}

Once you've accessed a device and reserved it by opening it, you'll probably want to connect it to one or more other devices to let MIDI data flow between them. This procedure is described in Chapter 10, "Transmitting and Receiving MIDI Messages."

When done with a device, you release it for other programs' use by invoking the close method of MidiDevice.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AudioSystem.java

Documentation Contents

< Contents

Appendix 2: sound.properties File

The Java Sound Configuration file, sound.properties, can be used to specify default service providers for javax.sound.sampled.AudioSystem and javax.sound.midi.MidiSystem.

Properties Keys

The following keys are recognized by AudioSystem methods:

javax.sound.sampled.Clip
javax.sound.sampled.Port
javax.sound.sampled.SourceDataLine
javax.sound.sampled.TargetDataLine

The following keys are recognized by MidiSystem methods:

javax.sound.midi.Sequencer
javax.sound.midi.Synthesizer
javax.sound.midi.Transmitter
javax.sound.midi.Receiver

The values should specify the full class name of the service provider and/or the device name.

sound.properties is located at $JAVAHOME/jre/lib.

For more details, see the class descriptions for AudioSystem and MidiSystem.

Examples

To use MyDeviceProvider as the default for SourceDataLine lines, set the following key:

javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider

To specify the default Synthesizer by its name InternalSynth, set the following key:

javax.sound.midi.Synthesizer=#InternalSynth

To specify the default Receiver by provider and name, set the following key:

javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AudioSystem.java

Documentation Contents

< Contents

Appendix 1: Code Overview: AudioSystem.java

For the benefit of service providers and API implementers, a brief overview of the Java Sound source code is provided.

javax.sound.sampled.AudioSystem is the entry point to JavaSound for obtaining resources; i.e., mixers, lines, etc. And each method of AudioSystem involves getting the providers of some service—MixerProvider[], FormatConversionProvider[], AudioFileReader[], or AudioFileWriter[]. Then the method goes on to obtain some specific information or perform some task. There is much similarity in how these methods work. Let us take a look at how getMixerInfo() works.

The following is a sequence diagram of getMixerInfo() in AudioSystem.java:

Sequence diagram of getMixerInfo() in AudioSystem.java

getMixerInfo() in AudioSystem first calls getMixerProviders(), a private static method of AudioSystem. The first thing that getMixerProviders() does is attempt to load sun.misc.Service. If an exception is thrown, it means that a pre-1.3 JRE is in use and there is no service provider lookup mechanism present. If an exception is thrown, then sun.media.sound.DefaultServices is used to obtain service providers (not depicted in above diagram). If the 1.3 mechanims is present, then getJDK13Serives() is called (shown above) with "javax.sound.sampled.spi.MixerProvider" as the argument.

getJDK13Services() is another private static method of AudioSystem. It attempts to the load the class for "com.sun.media.sound.JDK13Services", and if it succeeds it set Class jdk13Services equal to it. A bit of trickery is then performed by using Class.getMethod() to get the getProviders() method of jdk13Services, which is returned as object Method m. The method is then invoked, which has the effect of invoking getProviders("javax.sound.sampled.spi.MixerProvider") on JDK13Services. This in turn uses the providers() method of sun.misc.Service to return a vector of mixer providers, MixerProvider[]. The getMixerInfo() method of MixerProvider is then called on each element of the vector to return info (Mixer.info) for all mixers of all mixer providers.

Other services are handled in a similar way. For
instance, getTargetEncodings() calls
getFormatConversionProviders(),
getAudioFileFormat() calls
getAudioFileReaders(), etc., which are similarly
structured to getMixerProviders().

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Capturing Audio

Documentation Contents

< Contents

Chapter 5: Capturing Audio

Capturing refers to the process of obtaining a signal from outside the computer. A common application of audio capture is recording, such as recording the microphone input to a sound file. However, capturing isn't synonymous with recording, because recording implies that the application always saves the sound data that's coming in. An application that captures audio doesn't necessarily store the audio. Instead it might do something with the data as it's coming in—such as transcribe speech into text—but then discard each buffer of audio as soon as it's finished with that buffer.

As discussed in Chapter 2, "Overview of the Sampled Package," a typical audio-input system in an implementation of the Java Sound API consists of:

  1. An input port, such as a microphone port or a line-in port, which feeds its incoming audio data into:
  2. A mixer, which places the input data in:
  3. One or more target data lines, from which an application can retrieve the data.

    Commonly, only one input port can be open at a time, but an audio-input mixer that mixes audio from multiple ports is also possible. Another scenario consists of a mixer that has no ports but instead gets its audio input over a network.

    The TargetDataLine interface was introduced briefly under "The Line Interface Hierarchy" in Chapter 2, "Overview of the Sampled Package." TargetDataLine is directly analogous to the SourceDataLine interface, which was discussed extensively in Chapter 4, "Playing Back Audio." Recall that the SourceDataLine interface consists of:

  • A write method to send audio to the mixer
  • An available method to determine how much data can be written to the buffer without blocking

Similarly, TargetDataLine consists of:
  • A read method to get audio from the mixer
  • An available method to determine how much data can be read from the buffer without blocking

Setting Up a TargetDataLine

The process of obtaining a target data line was described in Chapter 3, "Accessing Audio System Resources," but we repeat it here for convenience:

TargetDataLine line;
DataLine.Info info = new DataLine.Info(TargetDataLine.class,
    format); // format is an AudioFormat object
if (!AudioSystem.isLineSupported(info)) {
    // Handle the error ...
}
// Obtain and open the line.
try {
    line = (TargetDataLine) AudioSystem.getLine(info);
    line.open(format);
} catch (LineUnavailableException ex) {
    // Handle the error ...
}
You could instead invoke Mixer's getLine method, rather than AudioSystem's.

As shown in this example, once you've obtained a target data line, you reserve it for your application's use by invoking the DataLine method open, exactly as was described in the case of a source data line in Chapter 4, "Playing Back Audio." The single-parameter version of the open method causes the line's buffer to have the default size. You can instead set the buffer size according to your application's needs by invoking the two-parameter version:

    void open(AudioFormat format, int bufferSize)
When choosing a buffer size, keep in mind the tradeoff between the delays incurred by long buffers, on the one hand, and the risk of discontinuities in the audio if the buffers are so short that you can't retrieve the data fast enough, on the other hand. When capturing audio, you risk data overflow if you don't pull data from the filled buffers fast enough. If overflow occurs, some of the captured data will be discarded, which will probably cause audible clicks and skips in the sound. This is the opposite situation from playback, where you risk data underflow, which can result in gaps in the sound. (See Chapter 4, "Playing Back Audio," for more on choosing buffer sizes.)

Reading the Data from the TargetDataLine

Once the line is open, it is ready to start capturing data, but it isn't active yet. To actually commence the audio capture, use the DataLine method start. This begins delivering input audio data to the line's buffer for your application to read. Your application should invoke start only when it's ready to begin reading from the line; otherwise a lot of processing is wasted on filling the capture buffer, only to have it overflow (that is, discard data).

To start retrieving data from the buffer, invoke TargetDataLine's read method:

int read(byte[] b, int offset, int length)
This method attempts to read length bytes of data into the array b, starting at the byte position offset in the array. The method returns the number of bytes actually read.

As with SourceDataLine's write method, you can request more data than actually fits in the buffer, because the method blocks until the requested amount of data has been delivered, even if you request many buffers' worth of data.

To avoid having your application hang during recording, you can invoke the read method within a loop, until you've retrieved all the audio input, as in this example:

// Assume that the TargetDataLine, line, has already
// been obtained and opened.
ByteArrayOutputStream out  = new ByteArrayOutputStream();
int numBytesRead;
byte[] data = new byte[line.getBufferSize() / 5];

// Begin audio capture.
line.start();

// Here, stopped is a global boolean set by another thread.
while (!stopped) {
   // Read the next chunk of data from the TargetDataLine.
   numBytesRead =  line.read(data, 0, data.length);
   // Save this chunk of data.
   out.write(data, 0, numBytesRead);
}
Notice that in this example, the size of the byte array into which the data is read is set to be one-fifth the size of the line's buffer. If you instead make it as big as the line's buffer and try to read the entire buffer, you need to be very exact in your timing, because data will be dumped if the mixer needs to deliver data to the line while you are reading from it. By using some fraction of the line's buffer size, as shown here, your application will be more successful in sharing access to the line's buffer with the mixer.

The read method of TargetDataLine takes three arguments: a byte array, an offset into the array, and the number of bytes of input data that you would like to read. In this example, the third argument is simply the length of your byte array. The read method returns the number of bytes that were actually read into your array.

Typically, you read data from the line in a loop, as in this example. Within the while loop, each chunk of retrieved data is processed in whatever way is appropriate for the application—here, it's written to a ByteArrayOutputStream. Not shown here is the use of a separate thread to set the boolean stopped, which terminates the loop. This boolean's value might be set to true when the user clicks a Stop button, and also when a listener receives a CLOSE or STOP event from the line. The listener is necessary for CLOSE events and recommended for STOP events. Otherwise, if the line gets stopped somehow without stopped being set to true, the while loop will capture zero bytes on each iteration, running fast and wasting CPU cycles. A more thorough code example would show the loop being re-entered if capture becomes active again.

As with a source data line, it's possible to drain or flush a target data line. For example, if you're recording the input to a file, you'll probably want to invoke the drain method when the user clicks a Stop button. The drain method will cause the mixer's remaining data to get delivered to the target data line's buffer. If you don't drain the data, the captured sound might seem to be truncated prematurely at the end.

There might be some cases where you instead want to flush the data. In any case, if you neither flush nor drain the data, it will be left in the mixer. This means that when capture recommences, there will be some leftover sound at the beginning of the new recording, which might be undesirable. It can be useful, then, to flush the target data line before restarting the capture.

Monitoring the Line's Status

Because the TargetDataLine interface extends DataLine, target data lines generate events in the same way source data lines do. You can register an object to receive events whenever the target data line opens, closes, starts, or stops. For more information, see "Monitoring the Line's Status" in Chapter 4, "Playing Back Audio."

Processing the Incoming Audio

Like some source data lines, some mixers' target data lines have signal-processing controls, such as gain, pan, reverb, or sample-rate controls. The input ports might have similar controls, especially gain controls. For more information on how to determine whether a line has such controls, and how to use them if it does, see Chapter 6, "Processing Audio with Controls."

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction to the Java Sound API

Documentation Contents

< Contents

Chapter 1: Introduction to the Java Sound API

Design Goals

The Java Sound API is a low-level API for effecting and controlling the input and output of sound media, including both audio and Musical Instrument Digital Interface (MIDI) data. The Java Sound API provides explicit control over the capabilities normally required for sound input and output, in a framework that promotes extensibility and flexibility.

Who is the Java Sound API For?

Because sound is so fundamental, the Java Sound API fulfills the needs of a wide range of application developers. Potential application areas include:

  • Communication frameworks, such as conferencing and telephony
  • End-user content delivery systems, such as media players and music using streamed content
  • Interactive application programs, such as games and Web sites that use dynamic content
  • Content creation and editing
  • Tools, toolkits, and utilities

How Does the Java Sound API Relate to Other Interfaces?

The Java Sound API provides the lowest level of sound support on the Java platform. It provides application programs with a great amount of control over sound operations, and it is extensible. For example, the Java Sound API supplies mechanisms for installing, accessing, and manipulating system resources such as audio mixers, MIDI synthesizers, other audio or MIDI devices, file readers and writers, and sound format converters. The Java Sound API does not include sophisticated sound editors or graphical tools, but it provides capabilities upon which such programs can be built. It emphasizes low-level control beyond that commonly expected by the end user.

There are other Java platform APIs that have sound-related elements. The Java Media Framework (JMF) is a higher-level API that is currently available as a Standard Extension to the Java platform. JMF specifies a unified architecture, messaging protocol, and programming interface for capturing and playing back time-based media. JMF provides a simpler solution for basic media-player application programs, and it enables synchronization between different media types, such as audio and video. On the other hand, programs that focus on sound can benefit from the Java Sound API, especially if they require more advanced features, such as the ability to carefully control buffered audio playback or directly manipulate a MIDI synthesizer. Other Java APIs with sound aspects include Java 3D and APIs for telephony and speech. An implementation of any of these APIs might use an implementation of the Java Sound API internally, but is not required to do so.

Packages

The Java Sound API includes support for both digital audio and MIDI data. These two major modules of functionality are provided in separate packages:

  • javax.sound.sampled This package specifies interfaces for capture, mixing, and playback of digital (sampled) audio.
  • javax.sound.midi This package provides interfaces for MIDI synthesis, sequencing, and event transport.

Two other packages permit service providers (as opposed to application developers) to create custom software components that extend the capabilities of an implementation of the Java Sound API:
  • javax.sound.sampled.spi
  • javax.sound.midi.spi

The rest of this chapter briefly discusses the sampled-audio system, the MIDI system, and the SPI packages. Each of these is then discussed in detail in a subsequent part of the guide.

Sampled Audio

What Is Sampled Audio?

The javax.sound.sampled package handles digital audio data, which the Java Sound API refers to as sampled audio. Samples are successive snapshots of a signal. In the case of audio, the signal is a sound wave. A microphone converts the acoustic signal into a corresponding analog electrical signal, and an analog-to-digital converter transforms that analog signal into a sampled digital form. The following figure shows a brief moment in a sound recording.

A sampled sound wave A Sampled Sound Wave

This graph plots sound pressure (amplitude) on the vertical axis, and time on the horizontal axis. The amplitude of the analog sound wave is measured periodically at a certain rate, resulting in the discrete samples (the red data points in the figure) that comprise the digital audio signal. The center horizontal line indicates zero amplitude; points above the line are positive-valued samples, and points below are negative. The accuracy of the digital approximation of the analog signal depends on its resolution in time (the sampling rate) and its quantization, or resolution in amplitude (the number of bits used to represent each sample). As a point of reference, the audio recorded for storage on compact discs is sampled 44,100 times per second and represented with 16 bits per sample.

The term "sampled audio" is used here slightly loosely. A sound wave could be sampled at discrete intervals while being left in an analog form. For purposes of the Java Sound API, however, "sampled audio" is equivalent to "digital audio."

Typically, sampled audio on a computer comes from a sound recording, but the sound could instead be synthetically generated (for example, to create the sounds of a touch-tone telephone). The term "sampled audio" refers to the type of data, not its origin.

Further information about the structure of digital audio data is given under "What Is Formatted Audio Data?" in Chapter 2, "Overview of the Sampled Package."

Audio Configurations

The Java Sound API does not assume a specific audio hardware configuration; it is designed to allow different sorts of audio components to be installed on a system and accessed by the API. The Java Sound API supports common functionality such as input and output from a sound card (for example, for recording and playback of sound files) as well as mixing of multiple streams of audio. Here is one example of a typical audio architecture:

The following context describes this graphic

A Typical Audio Architecture

In this example, a device such as a sound card has various input and output ports, and mixing is provided in the software. The mixer might receive data that has been read from a file, streamed from a network, generated on the fly by an application program, or produced by a MIDI synthesizer. (The javax.sound.midi package, discussed next, supplies a Java language interface for synthesizers.) The mixer combines all its audio inputs into a single stream, which can be sent to an output device for rendering.

MIDI

The javax.sound.midi package contains APIs for transporting and sequencing MIDI events, and for synthesizing sound from those events.

What Is MIDI?

Whereas sampled audio is a direct representation of a sound itself, MIDI data can be thought of as a recipe for creating a sound, especially a musical sound. MIDI data, unlike audio data, does not describe sound directly. Instead, it describes events that affect the sound a synthesizer is making. MIDI data is analogous to a graphical user interface's keyboard and mouse events. In the case of MIDI, the events can be thought of as actions upon a musical keyboard, along with actions on various pedals, sliders, switches, and knobs on that musical instrument. These events need not actually originate with a hardware musical instrument; they can be simulated in software, and they can be stored in MIDI files. A program that can create, edit, and perform these files is called a sequencer. Many computer sound cards include MIDI-controllable music synthesizer chips to which sequencers can send their MIDI events. Synthesizers can also be implemented entirely in software. The synthesizers interpret the MIDI events that they receive and produce audio output. Usually the sound synthesized from MIDI data is musical sound (as opposed to speech, for example). MIDI synthesizers are also capable of generating various kinds of sound effects.

Some sound cards include MIDI input and output ports to which external MIDI hardware devices (such as keyboard synthesizers or other instruments) can be connected. From a MIDI input port, an application program can receive events generated by an external MIDI-equipped musical instrument. The program might play the musical performance using the computer's internal synthesizer, save it to disk as a MIDI file, or render it into musical notation. A program might use a MIDI output port to play an external instrument, or to control other external devices such as recording equipment.

More information about MIDI data is given in Chapter 8, "Overview of the MIDI Package," particularly in the section "A MIDI Refresher: Wires and Files."

MIDI Configurations

The diagram below illustrates the functional relationships between the major components in a possible MIDI configuration based on the Java Sound API. (As with audio, the Java Sound API permits a variety of MIDI software devices to be installed and interconnected. The system shown here is one potential scenario.) The flow of data between components is indicated by arrows. The data can be in a standard file format, or (as indicated by the key in the lower right corner of the diagram), it can be audio, raw MIDI bytes, or time-tagged MIDI messages.

The following context describes this graphic

A Possible MIDI Configuration

In this example, the application program prepares a musical performance by loading a musical score that's stored as a standard MIDI file on a disk (left side of the diagram). Standard MIDI files contain tracks, each of which is a list of time-tagged MIDI events. Most of the events represent musical notes (pitches and rhythms). This MIDI file is read and then "performed" by a software sequencer. A sequencer performs its music by sending MIDI messages to some other device, such as an internal or external synthesizer. The synthesizer itself may read a soundbank file containing instructions for emulating the sounds of certain musical instruments. If not, the synthesizer will play the notes stored in the MIDI file using whatever instrument sounds are already loaded into the synthesizer.

As illustrated, the MIDI events must be translated into raw (non-time-tagged) MIDI before being sent through a MIDI output port to an external synthesizer. Similarly, raw MIDI data coming into the computer from an external MIDI source (a keyboard instrument, in the diagram) is translated into time-tagged MIDI messages that can control a synthesizer, or that a sequencer can store for later use. All these aspects of MIDI data flow are explained in detail in the subsequent chapters on MIDI (see Part II of this guide).

Service Provider Interfaces

The javax.sound.sampled.spi and javax.sound.midi.spi packages contain APIs that let software developers create new audio or MIDI resources that can be provided separately to the user and "plugged in" to an existing implementation of the Java Sound API. Here are some examples of services (resources) that can be added in this way:

  • An audio mixer
  • A MIDI synthesizer
  • A file parser that can read or write a new type of audio or MIDI file
  • A converter that translates between different sound data formats

In some cases, services are software interfaces to the capabilities of hardware devices, such as sound cards, and the service provider might be the same as the vendor of the hardware. In other cases, the services exist purely in software. For example, a synthesizer or a mixer could be an interface to a chip on a sound card, or it could be implemented without any hardware support at all.

An implementation of the Java Sound API contains a basic set of services, but the service provider interface (SPI) packages allow third parties to create new services. These third-party services are integrated into the system in the same way as the built-in services. The AudioSystem class in the sampled package and the MidiSystem class in the midi package act as coordinators that let application programs access the services explicitly or implicitly. Often the existence of a service is completely transparent to an application program that uses it. The service-provider mechanism benefits users of application programs based on the Java Sound API, because new sound features can be added to a program without requiring a new release of the JDK or runtime environment, and, in many cases, without even requiring a new release of the application program itself.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction to the Service Provider Interfaces

Documentation Contents

< Contents

Chapter 13: Introduction to the Service Provider Interfaces

Note

For version 5.0, new constructors for AudioFormat, AudioFileFormat, and MidiFileFormat allow the description of more advanced formats.

What Are Services?

Services are units of sound-handling functionality that are automatically available when an application program makes use of an implementation of the Java Sound API. They consist of objects that do the work of reading, writing, mixing, processing, and converting audio and MIDI data. An implementation of the Java Sound API generally supplies a basic set of services, but mechanisms are also included in the API to support the development of new sound services by third-party developers (or by the vendor of the implementation itself). These new services can be "plugged into" an existing installed implementation to expand its functionality without requiring a new release. In the Java Sound API architecture, third-party services are integrated into the system in such a way that an application program's interface to them is the same as the interface to the "built-in" services. In some cases, application developers who use the javax.sound.sampled and javax.sound.midi packages might not even be aware that they are employing third-party services.

Examples of potential third-party, sampled-audio services include:

  • Sound file readers and writers
  • Converters that translate between different audio data formats
  • New audio mixers and input/output devices, whether implemented purely in software, or in hardware with a software interface
Third-party MIDI services might consist of:
  • MIDI file readers and writers
  • Readers for various types of soundbank files (which are often specific to particular synthesizers)
  • MIDI-controlled sound synthesizers, sequencers, and I/O ports, whether implemented purely in software, or in hardware with a software interface

How Services Work

The javax.sound.sampled and javax.sound.midi packages provide functionality to application developers who wish to include sound services in their application programs. These packages are for consumers of sound services, providing interfaces to get information about, control, and access audio and MIDI services. In addition, the Java Sound API also supplies two packages that define abstract classes to be used by providers of sound services: the javax.sound.sampled.spi and javax.sound.midi.spi packages.

Developers of new sound services implement concrete subclasses of the appropriate classes in the SPI packages. These subclasses, along with any additional classes required to support the new service, are placed in a Java Archive (JAR) archive file with a description of the included service or services. When this JAR file is installed in the user's CLASSPATH, the runtime system automatically makes the new service available, extending the functionality of the Java platform's runtime system.

Once the new service is installed, it can be accessed just like any previously installed service. Consumers of services can get information about the new service, or obtain instances of the new service class itself, by invoking methods of the AudioSystem and MidiSystem classes (in the javax.sound.sampled and javax.sound.midi packages, respectively) to return information about the new services, or to return instances of new or existing service classes themselves. Application programs need not—and should not—reference the classes in the SPI packages (and their subclasses) directly to make use of the installed services.

For example, suppose a hypothetical service provider called Acme Software, Inc. is interested in supplying a package that allows application programs to read a new format of sound file (but one whose audio data is in a standard data format). The SPI class AudioFileReader can be subclassed into a class called, say, AcmeAudioFileReader. In the new subclass, Acme would supply implementations of all the methods defined in AudioFileReader; in this case there are only two methods (with argument variants), getAudioFileFormat and getAudioInputStream. Then when an application program attempted to read a sound file that happened to be in Acme's file format, it would invoke methods of the AudioSystem class in javax.sound.sampled to access the file and information about it. The methods AudioSystem.getAudioInputStream and AudioSystem.getAudioFileFormat provide a standard API to read audio streams; with the AcmeAudioFileReader class installed, this interface is extended to support the new file type transparently. Application developers don't need direct access to the newly registered SPI classes: the AudioSystem object methods pass the query on to the installed AcmeAudioFileReader class.

What's the point of having these "factory" classes? Why not permit the application developer to get access directly to newly provided services? That is a possible approach, but having all management and instantiation of services pass through gatekeeper system objects shields the application developer from having to know anything about the identity of installed services. Application developers just use services of value to them, perhaps without even realizing it. At the same time this architecture permits service providers to effectively manage the available resources in their packages.

Often the use of new sound services is transparent to the application program. For example, imagine a situation where an application developer wants to read in a stream of audio from a file. Assuming that thePathName identifies an audio input file, the program does this:

    File theInFile = new File(thePathName);
    AudioInputStream theInStream = AudioSystem.getAudioInputStream(theInFile);
Behind the scenes, the AudioSystem determines what installed service can read the file and asks it to supply the audio data as an AudioInputStream object. The developer might not know or even care that the input audio file is in some new file format (such as Acme's), supported by installed third-party services. The program's first contact with the stream is through the AudioSystem object, and all its subsequent access to the stream and its properties are through the methods of AudioInputStream. Both of these are standard objects in the javax.sound.sampled API; the special handling that the new file format may require is completely hidden.

How Providers Prepare New Services

Service providers supply their new services in specially formatted JAR files, which are to be installed in a directory on the user's system where the Java runtime will find them. JAR files are archive files, each containing sets of files that might be organized in hierarchical directory structures within the archive. Details about the preparation of the class files that go into these archives are discussed in Chapters 14 and 15, which describe the specifics of the audio and MIDI SPI packages; here we'll just give an overview of the process of JAR file creation.

The JAR file for a new service or services should contain a class file for each service supported in the JAR file. Following the Java platform's convention, each class file has the name of the newly defined class, which is a concrete subclass of one of the abstract service provider classes. The JAR file also must include any supporting classes required by the new service implementation. So that the new service or services can be located by the runtime system's service provider mechanism, the JAR file must also contain special files (described below) that map the SPI class names to the new subclasses being defined.

To continue from our example above, say Acme Software, Inc. is distributing a package of new sampled-audio services. Let's suppose this package consists of two new services:

  • The AcmeAudioFileReader class, which was mentioned above, and which is a subclass of AudioFileReader
  • A subclass of AudioFileWriter called AcmeAudioFileWriter, which will write sound files in Acme's new format
Starting from an arbitrary directory—let's call it /devel—where we want to do the build, we create subdirectories and put the new class files in them, organized in such a manner as to give the desired pathname by which the new classes will be referenced:
    com/acme/AcmeAudioFileReader.class
    com/acme/AcmeAudioFileWriter.class
In addition, for each new SPI class being subclassed, we create a mapping file in a specially named directory META-INF/services. The name of the file is the name of the SPI class being subclassed, and the file contains the names of the new subclasses of that SPI abstract class.

We create the file

META-INF/services/javax.sound.sampled.spi.AudioFileReader, which consists of

    # Providers of sound file-reading services
    # (a comment line begins with a pound sign)
    com.acme.AcmeAudioFileReader

and also the file

META-INF/services/javax.sound.sampled.spi.AudioFileWriter, which consists of

   # Providers of sound file-writing services
    com.acme.AcmeAudioFileWriter

Now we run jar from any directory with the command line:

jar cvf acme.jar -C /devel .
The -C option causes jar to switch to the /devel directory, instead of using the directory in which the command is executed. The final period argument instructs jar to archive all the contents of that directory (namely, /devel), but not the directory itself.

This run will create the file acme.jar with the contents:

com/acme/AcmeAudioFileReader.class
com/acme/AcmeAudioFileWriter.class
META-INF/services/javax.sound.sampled.spi.AudioFileReader
META-INF/services/javax.sound.sampled.spi.AudioFileWriter
META-INF/Manifest.mf
The file Manifest.mf, which is generated by the jar utility itself, is a list of all the files contained in the archive.

How Users Install New Services

For end users (or system administrators) who wish to get access to a new service through their application programs, installation is simple. They place the provided JAR file in a directory in their CLASSPATH. Upon execution, the Java runtime will find the referenced classes when needed.

It's not an error to install more than one provider for the same service. For example, two different service providers might supply support for reading the same type of sound file. In such a case, the system arbitrarily chooses one of the providers. Users who care which provider is chosen should install only the desired one.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Sound Programmer Guide

Introductory Material

Preface

For Whom This Guide Is Intended
What this Guide Describes
For More Information

Chapter: 1 Introduction to the Java Sound API

Design Goals
Who is the Java Sound API For?
How Does the Java Sound API Relate to Other Interfaces?
Packages
Sampled Audio
What Is Sampled Audio?
Audio Configurations
MIDI
What Is MIDI?
MIDI Configurations
Service Provider Interfaces

Part I: Sampled Audio

Chapter 2: Overview of the Sampled Package

Design Goals
A Focus on Data Transport
Buffered and Unbuffered Handling of Audio
The Essentials: Format, Mixer, and Line
What Is Formatted Audio Data?
What Is a Mixer?
What Is a Line?
Lines in an Audio-output Configuration
Lines in an Audio-input Configuration
The Line Interface Hierarchy

Chapter 3: Accessing Audio System Resources

The AudioSystem Class
Information Objects
Getting a Mixer
Getting a Line of a Desired Type
Getting a Line Directly from the AudioSystem
Getting a Line from a Mixer
Selecting Input and Output Ports
Permission to Use Audio Resources

Chapter 4: Playing Back Audio

Using a Clip
Setting Up the Clip for Playback
Starting and Stopping Playback
Using a SourceDataLine
Setting Up the SourceDataLine for Playback
Starting and Stopping Playback
Monitoring a Line's Status
Synchronizing Playback on Multiple Lines
Processing the Outgoing Audio

Chapter 5: Capturing Audio

Setting Up a TargetDataLine
Reading the Data from the TargetDataLine
Monitoring the Line's Status
Processing the Incoming Audio

Chapter 6: Processing Audio with Controls

Introduction to Controls
Getting a Line that Has the Desired Controls
Getting the Controls from the Line
Using a Control to Change the Audio Signal
Controlling a Line's Mute State
Changing a Line's Volume
Selecting among Various Reverberation Presets
Manipulating the Audio Data Directly

Chapter 7: Using Files and Format Converters

Reading Sound Files
Writing Sound Files
Converting File and Data Formats
Converting from One File Format to Another
Converting Audio between Different Data Formats
Learning What Conversions Are Available

Part II: MIDI

Chapter 8: Overview of the MIDI Package

A MIDI Refresher: Wires and Files
Streaming Data in the MIDI Wire Protocol
Sequenced Data in Standard MIDI Files
The Java Sound API's Representation of MIDI Data
MIDI Messages
MIDI Events
Sequences and Tracks
The Java Sound API's Representation of MIDI Devices
The MidiDevice Interface
Transmitters and Receivers
Sequencers
Synthesizers

Chapter 9: Accessing MIDI System Resources

The MidiSystem Class
Obtaining Default Devices
Learning What Devices Are Installed
Obtaining a Desired Device
Opening Devices

Chapter 10: Transmitting and Receiving MIDI Messages

Understanding Devices, Transmitters, and Receivers
Sending a Message to a Receiver without Using a Transmitter
Understanding Time Stamps
Time Stamps on Messages Sent to Devices
Connecting Transmitters to Receivers
Connecting to a Single Device
Connecting to More than One Device
Closing Connections

Chapter 11: Playing, Recording, and Editing MIDI Sequences

Introduction to Sequencers
When to Use a Sequencer
Understanding Sequence Data
Sequences and Tracks
MidiEvents and Ticks
Overview of Sequencer Methods
Obtaining a Sequencer
Loading a Sequence
Playing a Sequence
Recording and Saving Sequences
Editing a Sequence
Using Advanced Sequencer Features
Moving to an Arbitrary Position in the Sequence
Changing the Playback Speed
Muting or Soloing Individual
Tracks in the Sequence
Synchronizing with Other MIDI Devices
Specifying Special Event Listeners

Chapter 12: Synthesizing Sound

Understanding MIDI Synthesis
Instruments
Channels
Soundbanks and Patches
Voices
Managing Instruments and Soundbanks
Learning What Instruments Are Loaded
Loading Different Instruments
Unloading Instruments
Accessing Soundbank Resources
Querying the Synthesizer's Capabilities and Current State
Using Channels
Controlling the Synthesizer without
Using a Sequencer
Getting a Channel's Current State
Muting and Soloing a Channel
Permission to Play Synthesized Sound

Part III: Service Provider Interfaces

Chapter 13: Introduction to the Service Provider Interfaces

What Are Services?
How Services Work
How Providers Prepare New Services
How Users Install New Services

Chapter 14: Providing Sampled-Audio Services

Introduction
Providing Audio File-Writing Services
Providing Audio File-Reading Services
Providing Format-Conversion Services
Providing New Types of Mixers

Chapter 15: Providing MIDI Services

Introduction
Providing MIDI File-Writing Services
Providing MIDI File-Reading Services
Providing Particular MIDI Devices
Providing Soundbank File-Reading Services

Appendices

Appendix 1: Code Overview: AudioSystem.java

Appendix 2: sound.properties File

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JavaSound API Programmer's Guide

Last Updated October 24, 2001

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview of the MIDI Package

Documentation Contents

< Contents

Chapter 8: Overview of the MIDI Package

Chapter 1,"Introduction to Java Sound," gave a glimpse into the MIDI capabilities of the Java Sound API. The present chapter assumes you've read Chapter 1. The discussion here provides a more detailed introduction to the Java Sound API's MIDI architecture, which is accessed through the javax.sound.midi package. Some basic features of MIDI itself are explained, as a refresher or introduction, to place the Java Sound API's MIDI features in context. The chapter then goes on to discuss the Java Sound API's approach to MIDI, as a preparation for the programming tasks that are explained in subsequent chapters. This chapter's discussion of the MIDI API is divided into two main areas: data and devices.

A MIDI Refresher: Wires and Files

The Musical Instrument Digital Interface (MIDI) standard defines a communication protocol for electronic music devices, such as electronic keyboard instruments and personal computers. MIDI data can be transmitted over special cables during a live performance, and can also be stored in a standard type of file for later playback or editing.

This section reviews some MIDI basics, without reference to the Java Sound API. The discussion is intended as a refresher for readers acquainted with MIDI, and as a brief introduction for those who are not, to provide background for the subsequent discussion of the Java Sound API's MIDI package. If you have a thorough understanding of MIDI, you can safely skip this section. Before writing substantial MIDI applications, programmers who are unfamiliar with MIDI will probably need a fuller description of MIDI than can be included in this programmer's guide. See the Complete MIDI 1.0 Detailed Specification, which is available only in hard copy from http://www.midi.org (although you might find paraphrased or summarized versions on the Web).

MIDI is both a hardware specification and a software specification. To understand MIDI's design, it helps to understand its history. MIDI was originally designed for passing musical events, such as key depressions, between electronic keyboard instruments such as synthesizers. (As mentioned in Chapter 1, MIDI data consists primarily of control events that communicate a musician's gestures. MIDI data doesn't contain the audio that results from these events.) Hardware devices known as sequencers stored sequences of notes that could control a synthesizer, allowing musical performances to be recorded and subsequently played back. Later, hardware interfaces were developed that connected MIDI instruments to a computer's serial port, allowing sequencers to be implemented in software. More recently, computer sound cards have incorporated hardware for MIDI I/O and for synthesizing musical sound. Today, many users of MIDI deal only with sound cards, never connecting to external MIDI devices. CPUs have become fast enough that synthesizers, too, can be implemented in software. A sound card is needed only for audio I/O and, in some applications, for communicating with external MIDI devices.

The brief hardware portion of the MIDI specification prescribes the pinouts for MIDI cables and the jacks into which these cables are plugged. This portion need not concern us. Because devices that originally required hardware, such as sequencers and synthesizers, are now implementable in software, perhaps the only reason for most programmers to know anything about MIDI hardware devices is simply to understand the metaphors in MIDI. However, external MIDI hardware devices are still essential for some important music applications, and so the Java Sound API supports input and output of MIDI data.

The software portion of the MIDI specification is extensive. This portion concerns the structure of MIDI data and how devices such as synthesizers should respond to that data. It is important to understand that MIDI data can be streamed or sequenced. This duality reflects two different parts of the Complete MIDI 1.0 Detailed Specification:

  • MIDI 1.0
  • Standard MIDI Files

We'll explain what's meant by streaming and sequencing by examining the purpose of each of these two parts of the MIDI specification.

Streaming Data in the MIDI Wire Protocol

The first of these two parts of the MIDI specification describes what is known informally as "MIDI wire protocol." MIDI wire protocol, which is the original MIDI protocol, is based on the assumption that the MIDI data is being sent over a MIDI cable (the "wire"). The cable transmits digital data from one MIDI device to another. Each of the MIDI devices might be a musical instrument or a similar device, or it might be a general-purpose computer equipped with a MIDI-capable sound card or a MIDI-to-serial-port interface.

MIDI data, as defined by MIDI wire protocol, is organized into messages. The different kinds of message are distinguished by the first byte in the message, known as the status byte. (Status bytes are the only bytes that have the highest-order bit set to 1.) The bytes that follow the status byte in a message are known as data bytes. Certain MIDI messages, known as channel messages, have a status byte that contains four bits to specify the kind of channel message and another four bits to specify the channel number. There are therefore 16 MIDI channels; devices that receive MIDI messages can be set to respond to channel messages on all or only one of these virtual channels. Often each MIDI channel (which shouldn't be confused with a channel of audio) is used to send the notes for a different instrument. As an example, two common channel messages are Note On and Note Off, which start a note sounding and then stop it, respectively. These two messages each take two data bytes: the first specifies the note's pitch and the second its "velocity" (how fast the key is depressed or released, assuming a keyboard instrument is playing the note).

MIDI wire protocol defines a streaming model for MIDI data. A central feature of this protocol is that the bytes of MIDI data are delivered in real time—in other words, they are streamed. The data itself contains no timing information; each event is processed as it's received, and it's assumed that it arrives at the correct time. That model is fine if the notes are being generated by a live musician, but it's insufficient if you want to store the notes for later playback, or if you want to compose them out of real time. This limitation is understandable when you realize that MIDI was originally designed for musical performance, as a way for a keyboard musician to control more than one synthesizer, back in the days before many musicians used computers. (The first version of the specification was released in 1984.)

Sequenced Data in Standard MIDI Files

The Standard MIDI Files part of the MIDI specification addresses the timing limitation in MIDI wire protocol. A standard MIDI file is a digital file that contains MIDI events. An event is simply a MIDI message, as defined in the MIDI wire protocol, but with an additional piece of information that specifies the event's timing. (There are also some events that don't correspond to MIDI wire protocol messages, as we'll see in the next section.) The additional timing information is a series of bytes that indicates when to perform the operation described by the message. In other words, a standard MIDI file specifies not just which notes to play, but exactly when to play each of them. It's a bit like a musical score.

The information in a standard MIDI file is referred to as a sequence. A standard MIDI file contains one or more tracks. Each track typically contains the notes that a single instrument would play if the music were performed by live musicians. A sequencer is a software or hardware device that can read a sequence and deliver the MIDI messages contained in it at the right time. A sequencer is a bit like an orchestra conductor: it has the information for all the notes, including their timings, and it tells some other entity when to perform the notes.

The Java Sound API's Representation of MIDI Data

Now that we've sketched the MIDI specification's approach to streamed and sequenced musical data, let's examine how the Java Sound API represents that data.

MIDI Messages

MidiMessage is an abstract class that represents a "raw" MIDI message. A "raw" MIDI message is usually a message defined by the MIDI wire protocol. It can also be one of the events defined by the Standard MIDI Files specification, but without the event's timing information. There are three categories of raw MIDI message, represented in the Java Sound API by these three respective MidiMessage subclasses:

  • ShortMessages are the most common messages and have at most two data bytes following the status byte. The channel messages, such as Note On and Note Off, are all short messages, as are some other messages.
  • SysexMessages contain system-exclusive MIDI messages. They may have many bytes, and generally contain manufacturer-specific instructions.
  • MetaMessages occur in MIDI files, but not in MIDI wire protocol. Meta messages contain data, such as lyrics or tempo settings, that might be useful to sequencers but that are usually meaningless for synthesizers.

MIDI Events

As we've seen, standard MIDI files contain events that are wrappers for "raw" MIDI messages along with timing information. An instance of the Java Sound API's MidiEvent class represents an event such as might be stored in a standard MIDI file.

The API for MidiEvent includes methods to set and get the event's timing value. There's also a method to retrieve its embedded raw MIDI message, which is an instance of a subclass of MidiMessage, discussed next. (The embedded raw MIDI message can be set only when constructing the MidiEvent.)

Sequences and Tracks

As mentioned earlier, a standard MIDI file stores events that are arranged into tracks. Usually the file represents one musical composition, and usually each track represents a part such as might have been played by a single instrumentalist. Each note that the instrumentalist plays is represented by at least two events: a Note On that starts the note, and a Note Off that ends it. The track may also contain events that don't correspond to notes, such as meta-events (which were mentioned above).

The Java Sound API organizes MIDI data in a three-part hierarchy:

  • Sequence
  • Track
  • MidiEvent

A Track is a collection of MidiEvents, and a Sequence is a collection of Tracks. This hierarchy reflects the files, tracks, and events of the Standard MIDI Files specification. (Note: this is a hierarchy in terms of containment and ownership; it's not a class hierarchy in terms of inheritance. Each of these three classes inherits directly from java.lang.Object.)

Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the tracks in the sequence.

The Java Sound API's Representation of MIDI Devices

The previous section explained how MIDI messages are represented in the Java Sound API. However, MIDI messages don't exist in a vacuum. They're typically sent from one device to another. A program that uses the Java Sound API can generate MIDI messages from scratch, but more often the messages are instead created by a software device, such as a sequencer, or received from outside the computer through a MIDI input port. Such a device usually sends these messages to another device, such as a synthesizer or a MIDI output port.

The MidiDevice Interface

In the world of external MIDI hardware devices, many devices can transmit MIDI messages to other devices and also receive messages from other devices. Similarly, in the Java Sound API, software objects that implement the MidiDevice interface can transmit and receive messages. Such an object can be implemented purely in software, or it can serve as an interface to hardware such as a sound card's MIDI capabilities. The base MidiDevice interface provides all the functionality generally required by a MIDI input or output port. Synthesizers and sequencers, however, further implement one of the subinterfaces of MidiDevice: Synthesizer or Sequencer, respectively.

The MidiDevice interface includes API for opening and closing a device. It also includes an inner class called MidiDevice.Info that provides textual descriptions of the device, including its name, vendor, and version. If you've read the sampled-audio portion of this programmer's guide, this API will probably sound familiar, because its design is similar to that of the javax.sampled.Mixer interface, which represents an audio device and which has an analogous inner class, Mixer.Info.

Transmitters and Receivers

Most MIDI devices are capable of sending MidiMessages, receiving them, or both. The way a device sends data is via one or more transmitter objects that it "owns." Similarly, the way a device receives data is via one or more of its receiver objects. The transmitter objects implement the Transmitter interface, and the receivers implement the Receiver interface.

Each transmitter can be connected to only one receiver at a time, and vice versa. A device that sends its MIDI messages to multiple other devices simultaneously does so by having multiple transmitters, each connected to a receiver of a different device. Similarly, a device that can receive MIDI messages from more than one source at a time must do so via multiple receivers.

Sequencers

A sequencer is a device for capturing and playing back sequences of MIDI events. It has transmitters, because it typically sends the MIDI messages stored in the sequence to another device, such as a synthesizer or MIDI output port. It also has receivers, because it can capture MIDI messages and store them in a sequence. To its superinterface, MidiDevice, Sequencer adds methods for basic MIDI sequencing operations. A sequencer can load a sequence from a MIDI file, query and set the sequence's tempo, and synchronize other devices to it. An application program can register an object to be notified when the sequencer processes certain kinds of events.

Synthesizers

A Synthesizer is a device for generating sound. It's the only object in the javax.sound.midi package that produces audio data. A synthesizer device controls a set of MIDI channel objects—typically 16 of them, since the MIDI specification calls for 16 MIDI channels. These MIDI channel objects are instances of a class that implements the MidiChannel interface, whose methods represent the MIDI specification's "channel voice messages" and "channel mode messages."

An application program can generate sound by directly invoking methods of a synthesizer's MIDI channel objects. More commonly, though, a synthesizer generates sound in response to messages sent to one or more of its receivers. These messages might be sent by a sequencer or MIDI input port, for example. The synthesizer parses each message that its receivers get, and usually dispatches a corresponding command (such as noteOn or controlChange) to one of its MidiChannel objects, according to the MIDI channel number specified in the event.

The MidiChannel uses the note information in these messages to synthesize music. For example, a noteOn message specifies the note's pitch and "velocity" (volume). However, the note information is insufficient; the synthesizer also requires precise instructions on how to create the audio signal for each note. These instructions are represented by an Instrument. Each Instrument typically emulates a different real-world musical instrument or sound effect. The Instruments might come as presets with the synthesizer, or they might be loaded from soundbank files. In the synthesizer, the Instruments are arranged by bank number (these can be thought of as rows) and program number (columns).

This chapter has provided a background for understanding MIDI data, and it has introduced some of the important interfaces and classes related to MIDI in the Java Sound API. Subsequent chapters show how you can access and use these objects in your application program.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview of the Sampled Package

Documentation Contents

< Contents

Chapter 2: Overview of the Sampled Package

Notes

  1. Direct Audio mixers are always the default on Windows. They are the default on Solaris if the Solaris audio mixer is enabled (see Solaris man page for mixer). On Linux, they are the default only if there is a device that supports mixing.
  2. Because they are "direct," Direct Audio mixers do not support SAMPLE_RATE control.
  3. The default mixer can be selected via the sound.properties file.

This chapter provides an introduction to the Java Sound API's digital audio architecture, which is accessed through the javax.sound.sampled package. First, an explanation is given of the package's focus: playback and capture of formatted audio data. Then this chapter describes the three fundamental components required for playback or capture: an audio data format, a line, and a mixer. The Line interface and its subinterfaces are introduced briefly.

Design Goals

Before examining the elements of the Java Sound API, it helps to understand the orientation of the javax.sound.sampled package.

A Focus on Data Transport

The javax.sound.sampled package is fundamentally concerned with audio transport—in other words, the Java Sound API focuses on playback and capture. The central task that the Java Sound API addresses is how to move bytes of formatted audio data into and out of the system. This task involves opening audio input and output devices and managing buffers that get filled with real-time sound data. It can also involve mixing multiple streams of audio into one stream (whether for input or output). The transport of sound into or out of the system has to be correctly handled when the user requests that the flow of sound be started, paused, resumed, or stopped.

To support this focus on basic audio input and output, the Java Sound API provides methods for converting between various audio data formats, and for reading and writing common types of sound files. However, it does not attempt to be a comprehensive sound-file toolkit. A particular implementation of the Java Sound API need not support an extensive set of file types or data format conversions. Third-party service providers can supply modules that "plug in" to an existing implementation to support additional file types and conversions.

Buffered and Unbuffered Handling of Audio

The Java Sound API can handle audio transport in both a streaming, buffered fashion and an in-memory, unbuffered fashion. "Streaming" is used here in a general sense to refer to real-time handling of audio bytes; it does not refer to the specific, well-known case of sending audio over the Internet in a certain format. In other words, a stream of audio is simply a continuous set of audio bytes that arrive more or less at the same rate that they are to be handled (played, recorded, etc.). Operations on the bytes commence before all the data has arrived. In the streaming model, particularly in the case of audio input rather than audio output, you do not necessarily know in advance how long the sound is and when it will finish arriving. You simply handle one buffer of audio data at a time, until the operation is halted. In the case of audio output (playback), you also need to buffer data if the sound you want to play is too large to fit in memory all at once. In other words, you deliver your audio bytes to the sound engine in chunks, and it takes care of playing each sample at the right time. Mechanisms are provided that make it easy to know how much data to deliver in each chunk.

The Java Sound API also permits unbuffered transport in the case of playback only, assuming you already have all the audio data at hand and it is not too large to fit in memory. In this situation, there is no need for the application program to buffer the audio, although the buffered, real-time approach is still available if desired. Instead, the entire sound can be preloaded at once into memory for subsequent playback. Because all the sound data is loaded in advance, playback can start immediately, for example, as soon as the user clicks a Start button. This can be an advantage compared to the buffered model, where the playback has to wait for the first buffer to fill. In addition, the in-memory, unbuffered model allows sounds to be easily looped (cycled) or set to arbitrary positions in the data.

These two models for playback are discussed further in Chapter 4, "Playing Back Audio." Buffered recording is discussed in Chapter 5, "Capturing Audio."

The Essentials: Format, Mixer, and Line

To play or capture sound using the Java Sound API, you need at least three things: formatted audio data, a mixer, and a line. Each of these is explained below.

What Is Formatted Audio Data?

Formatted audio data refers to sound in any of a number of standard formats. The Java Sound API distinguishes between data formats and file formats.

Data Formats

A data format tells you how to interpret a series of bytes of "raw" sampled audio data, such as samples that have already been read from a sound file, or samples that have been captured from the microphone input. You might need to know, for example, how many bits constitute one sample (the representation of the shortest instant of sound), and similarly you might need to know the sound's sample rate (how fast the samples are supposed to follow one another). When setting up for playback or capture, you specify the data format of the sound you are capturing or playing.

In the Java Sound API, a data format is represented by an AudioFormat object, which includes the following attributes:

  • Encoding technique, usually pulse code modulation (PCM)
  • Number of channels (1 for mono, 2 for stereo, etc.)
  • Sample rate (number of samples per second, per channel)
  • Number of bits per sample (per channel)
  • Frame rate
  • Frame size in bytes
  • Byte order (big-endian or little-endian)

PCM is one kind of encoding of the sound waveform. The Java Sound API includes two PCM encodings that use linear quantization of amplitude, and signed or unsigned integer values. Linear quantization means that the number stored in each sample is directly proportional (except for any distortion) to the original sound pressure at that instant and similarly proportional to the displacement of a loudspeaker or eardrum that is vibrating with the sound at that instant. Compact discs, for example, use linear PCM-encoded sound. Mu-law encoding and a-law encoding are common nonlinear encodings that provide a more compressed version of the audio data; these encodings are typically used for telephony or recordings of speech. A nonlinear encoding maps the original sound's amplitude to the stored value using a nonlinear function, which can be designed to give more amplitude resolution to quiet sounds than to loud sounds.

A frame contains the data for all channels at a particular time. For PCM-encoded data, the frame is simply the set of simultaneous samples in all channels, for a given instant in time, without any additional information. In this case, the frame rate is equal to the sample rate, and the frame size in bytes is the number of channels multiplied by the sample size in bits, divided by the number of bits in a byte.

For other kinds of encodings, a frame might contain additional information besides the samples, and the frame rate might be completely different from the sample rate. For example, consider the MP3 (MPEG-1 Audio Layer 3) encoding, which is not explicitly mentioned in the current version of the Java Sound API, but which could be supported by an implementation of the Java Sound API or by a third-party service provider. In MP3, each frame contains a bundle of compressed data for a series of samples, not just one sample per channel. Because each frame encapsulates a whole series of samples, the frame rate is slower than the sample rate. The frame also contains a header. Despite the header, the frame size in bytes is less than the size in bytes of the equivalent number of PCM frames. (After all, the purpose of MP3 is to be more compact than PCM data.) For such an encoding, the sample rate and sample size refer to the PCM data that the encoded sound will eventually be converted into before being delivered to a digital-to-analog converter (DAC).

File Formats

A file format specifies the structure of a sound file, including not only the format of the raw audio data in the file, but also other information that can be stored in the file. Sound files come in various standard varieties, such as WAVE (also known as WAV, and often associated with PCs), AIFF (often associated with Macintoshes), and AU (often associated with UNIX systems). The different types of sound file have different structures. For example, they might have a different arrangement of data in the file's "header." A header contains descriptive information that typically precedes the file's actual audio samples, although some file formats allow successive "chunks" of descriptive and audio data. The header includes a specification of the data format that was used for storing the audio in the sound file. Any of these types of sound file can contain various data formats (although usually there is only one data format within a given file), and the same data format can be used in files that have different file formats.

In the Java Sound API, a file format is represented by an AudioFileFormat object, which contains:

  • The file type (WAVE, AIFF, etc.)
  • The file's length in bytes
  • The length, in frames, of the audio data contained in the file
  • An AudioFormat object that specifies the data format of the audio data contained in the file

The AudioSystem class (described in Chapter 3, "Accessing Audio System Resources") provides methods for reading and writing sounds in different file formats, and for converting between different data formats. Some of the methods let you access a file's contents through a kind of stream called an AudioInputStream. An AudioInputStream is a subclass of the generic Java InputStream class, which encapsulates a series of bytes that can be read sequentially. To its superclass, the AudioInputStream class adds knowledge of the bytes' audio data format (represented by an AudioFormat object). By reading a sound file as an AudioInputStream, you get immediate access to the samples, without having to worry about the sound file's structure (its header, chunks, etc.). A single method invocation gives you all the information you need about the data format and the file type.

What Is a Mixer?

Many application programming interfaces (APIs) for sound make use of the notion of an audio device. A device is often a software interface to a physical input/output device. For example, a sound-input device might represent the input capabilities of a sound card, including a microphone input, a line-level analog input, and perhaps a digital audio input.

In the Java Sound API, devices are represented by Mixer objects. The purpose of a mixer is to handle one or more streams of audio input and one or more streams of audio output. In the typical case, it actually mixes together multiple incoming streams into one outgoing stream. A Mixer object can represent the sound-mixing capabilities of a physical device such as a sound card, which might need to mix the sound coming in to the computer from various inputs, or the sound coming from application programs and going to outputs.

Alternatively, a Mixer object can represent sound-mixing capabilities that are implemented entirely in software, without any inherent interface to physical devices.

In the Java Sound API, a component such as the microphone input on a sound card is not itself considered a device—that is, a mixer—but rather a port into or out of the mixer. A port typically provides a single stream of audio into or out of the mixer (although the stream can be multichannel, such as stereo). The mixer might have several such ports. For example, a mixer representing a sound card's output capabilities might mix several streams of audio together, and then send the mixed signal to any or all of various output ports connected to the mixer. These output ports could be (for example) a headphone jack, a built-in speaker, or a line-level output.

To understand the notion of a mixer in the Java Sound API, it helps to visualize a physical mixing console, such as those used in live concerts and recording studios. (See illustration that follows.)

Physical mixing console

A Physical Mixing Console

A physical mixer has "strips" (also called "slices"), each representing a path through which a single audio signal goes into the mixer for processing. The strip has knobs and other controls by which you can control the volume and pan (placement in the stereo image) for the signal in that strip. Also, the mixer might have a separate bus for effects such as reverb, and this bus can be connected to an internal or external reverberation unit. Each strip has a potentiometer that controls how much of that strip's signal goes into the reverberated mix. The reverberated ("wet") mix is then mixed with the "dry" signals from the strips. A physical mixer sends this final mixture to an output bus, which typically goes to a tape recorder (or disk-based recording system) and/or speakers.

Imagine a live concert that is being recorded in stereo. Cables (or wireless connections) coming from the many microphones and electric instruments on stage are plugged into the inputs of the mixing console. Each input goes to a separate strip of the mixer, as illustrated. The sound engineer decides on the settings of the gain, pan, and reverb controls. The output of all the strips and the reverb unit are mixed together into two channels. These two channels go to two outputs on the mixer, into which cables are plugged that connect to the stereo tape recorder's inputs. The two channels are perhaps also sent via an amplifier to speakers in the hall, depending on the type of music and the size of the hall.

Now imagine a recording studio, in which each instrument or singer is recorded to a separate track of a multitrack tape recorder. After the instruments and singers have all been recorded, the recording engineer performs a "mixdown" to combine all the taped tracks into a two-channel (stereo) recording that can be distributed on compact discs. In this case, the input to each of the mixer's strips is not a microphone, but one track of the multitrack recording. Once again, the engineer can use controls on the strips to decide each track's volume, pan, and reverb amount. The mixer's outputs go once again to a stereo recorder and to stereo speakers, as in the example of the live concert.

These two examples illustrate two different uses of a mixer: to capture multiple input channels, combine them into fewer tracks, and save the mixture, or to play back multiple tracks while mixing them down to fewer tracks.

In the Java Sound API, a mixer can similarly be used for input (capturing audio) or output (playing back audio). In the case of input, the source from which the mixer gets audio for mixing is one or more input ports. The mixer sends the captured and mixed audio streams to its target, which is an object with a buffer from which an application program can retrieve this mixed audio data. In the case of audio output, the situation is reversed. The mixer's source for audio is one or more objects containing buffers into which one or more application programs write their sound data; and the mixer's target is one or more output ports.

What Is a Line?

The metaphor of a physical mixing console is also useful for understanding the Java Sound API's concept of a line.

A line is an element of the digital audio "pipeline"—that is, a path for moving audio into or out of the system. Usually the line is a path into or out of a mixer (although technically the mixer itself is also a kind of line).

Audio input and output ports are lines. These are analogous to the microphones and speakers connected to a physical mixing console. Another kind of line is a data path through which an application program can get input audio from, or send output audio to, a mixer. These data paths are analogous to the tracks of the multitrack recorder connected to the physical mixing console.

One difference between lines in the Java Sound API and those of a physical mixer is that the audio data flowing through a line in the Java Sound API can be mono or multichannel (for example, stereo). By contrast, each of a physical mixer's inputs and outputs is typically a single channel of sound. To get two or more channels of output from the physical mixer, two or more physical outputs are normally used (at least in the case of analog sound; a digital output jack is often multichannel). In the Java Sound API, the number of channels in a line is specified by the AudioFormat of the data that is currently flowing through the line.

Lines in an Audio-output Configuration

Let's now examine some specific kinds of lines and mixers. The following diagram shows different types of lines in a simple audio-output system that could be part of an implementation of the Java Sound API:

Possible configuration of lines for audio output

A Possible Configuration of Lines for Audio Output

In this example, an application program has gotten access to some available inputs of an audio-input mixer: one or more clips and source data lines. A clip is a mixer input (a kind of line) into which you can load audio data prior to playback; a source data line is a mixer input that accepts a real-time stream of audio data. The application program preloads audio data from a sound file into the clips. It then pushes other audio data into the source data lines, a buffer at a time. The mixer reads data from all these lines, each of which may have its own reverberation, gain, and pan controls, and mixes the dry audio signals with the wet (reverberated) mix. The mixer delivers its final output to one or more output ports, such as a speaker, a headphone jack, and a line-out jack.

Although the various lines are depicted as separate rectangles in the diagram, they are all "owned" by the mixer, and can be considered integral parts of the mixer. The reverb, gain, and pan rectangles represent processing controls (rather than lines) that can be applied by the mixer to data flowing through the lines.

Note that this is just one example of a possible mixer that is supported by the API. Not all audio configurations will have all the features illustrated. An individual source data line might not support panning, a mixer might not implement reverb, and so on.

Lines in an Audio-input Configuration

A simple audio-input system might be similar:

Possible configuration of lines for audio input

A Possible Configuration of Lines for Audio Input

Here, data flows into the mixer from one or more input ports, commonly the microphone or the line-in jack. Gain and pan are applied, and the mixer delivers the captured data to an application program via the mixer's target data line. A target data line is a mixer output, containing the mixture of the streamed input sounds. The simplest mixer has just one target data line, but some mixers can deliver captured data to multiple target data lines simultaneously.

The Line Interface Hierarchy

Now that we've seen some functional pictures of what lines and mixers are, let's discuss them from a slightly more programmatic perspective. Several types of line are defined by subinterfaces of the basic Line interface. The interface hierarchy is shown below.

Line interface hierarchy

The Line Interface Hierarchy

The base interface, Line, describes the minimal functionality common to all lines:

  • Controls Data lines and ports often have a set of controls that affect the audio signal passing through the line. The Java Sound API specifies control classes that can be used to manipulate aspects of sound such as: gain (which affects the signal's volume in decibels), pan (which affects the sound's right-left positioning, reverb (which adds reverberation to the sound to emulate different kinds of room acoustics), and sample rate (which affects the rate of playback as well as the sound's pitch).
  • Open or closed status Successful opening of a line guarantees that resources have been allocated to the line. A mixer has a finite number of lines, so at some point multiple application programs (or the same one) might vie for usage of the mixer's lines. Closing a line indicates that any resources used by the line may now be released.
  • Events A line generates events when it opens or closes. Subinterfaces of Line can introduce other types of events. When a line generates an event, the event is sent to all objects that have registered to "listen" for events on that line. An application program can create these objects, register them to listen for line events, and react to the events as desired.

We'll now examine the subinterfaces of the Line interface.

Ports are simple lines for input or output of audio to or from audio devices. As mentioned earlier, some common types of ports are the microphone, line input, CD-ROM drive, speaker, headphone, and line output.

The Mixer interface represents a mixer, of course, which as we have seen represents either a hardware or a software device. The Mixer interface provides methods for obtaining a mixer's lines. These include source lines, which feed audio to the mixer, and target lines, to which the mixer delivers its mixed audio. For an audio-input mixer, the source lines are input ports such as the microphone input, and the target lines are TargetDataLines (described below), which deliver audio to the application program. For an audio-output mixer, on the other hand, the source lines are Clips or SourceDataLines (described below), to which the application program feeds audio data, and the target lines are output ports such as the speaker.

A Mixer is defined as having one or more source lines and one or more target lines. Note that this definition means that a mixer need not actually mix data; it might have only a single source line. The Mixer API is intended to encompass a variety of devices, but the typical case supports mixing.

The Mixer interface supports synchronization; that is, you can specify that two or more of a mixer's lines be treated as a synchronized group. Then you can start, stop, or close all those data lines by sending a single message to any line in the group, instead of having to control each line individually. With a mixer that supports this feature, you can obtain sample-accurate synchronization between lines.

The generic Line interface does not provide a means to start and stop playback or recording. For that you need a data line. The DataLine interface supplies the following additional media-related features beyond those of a Line:

  • Audio format Each data line has an audio format associated with its data stream.
  • Media position A data line can report its current position in the media, expressed in sample frames. This represents the number of sample frames captured by or rendered from the data line since it was opened.
  • Buffer size This is the size of the data line's internal buffer in bytes. For a source data line, the internal buffer is one to which data can be written, and for a target data line it's one from which data can be read.
  • Level (the current amplitude of the audio signal)

  • Start and stop playback or capture

  • Pause and resume playback or capture

  • Flush (discard unprocessed data from the queue)

  • Drain (block until all unprocessed data has been drained from the queue, and the data line's buffer has become empty)

  • Active status A data line is considered active if it is engaged in active presentation or capture of audio data to or from a mixer.
  • Events START and STOP events are produced when active presentation or capture of data from or to the data line starts or stops.

A TargetDataLine receives audio data from a mixer. Commonly, the mixer has captured audio data from a port such as a microphone; it might process or mix this captured audio before placing the data in the target data line's buffer. The TargetDataLine interface provides methods for reading the data from the target data line's buffer and for determining how much data is currently available for reading.

A SourceDataLine receives audio data for playback. It provides methods for writing data to the source data line's buffer for playback, and for determining how much data the line is prepared to receive without blocking.

A Clip is a data line into which audio data can be loaded prior to playback. Because the data is pre-loaded rather than streamed, the clip's duration is known before playback, and you can choose any starting position in the media. Clips can be looped, meaning that upon playback, all the data between two specified loop points will repeat a specified number of times, or indefinitely.

This chapter has introduced most of the important interfaces and classes of the sampled-audio API. Subsequent chapters show how you can access and use these objects in your application program.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Playing Back Audio

Documentation Contents

< Contents

Chapter 4: Playing Back Audio

Playback is sometimes referred to as presentation or rendering. These are general terms that are applicable to other kinds of media besides sound. The essential feature is that a sequence of data is delivered somewhere for eventual perception by a user. If the data is time-based, as sound is, it must be delivered at the correct rate. With sound even more than video, it's important that the rate of data flow be maintained, because interruptions to sound playback often produce loud clicks or irritating distortion. The Java Sound API is designed to help application programs play sounds smoothly and continuously, even very long sounds.

The previous chapter discussed how to obtain a line from the audio system or from a mixer. This chapter shows how to play sound through a line.

There are two kinds of line that you can use for playing sound: a Clip and a SourceDataLine. These two interfaces were introduced briefly under "The Line Interface Hierarchy" in Chapter 2, "Overview of the Sampled Package." The chief difference between the two is that with a Clip you specify all the sound data at one time, before playback, whereas with a SourceDataLine you keep writing new buffers of data continuously during playback. Although there are many situations in which you could use either a Clip or a SourceDataLine, the following criteria help identify which kind of line is better suited for a particular situation:

  • Use a Clip when you have non-real-time sound data that can be preloaded into memory.

    For example, you might read a short sound file into a clip. If you want the sound to play back more than once, a Clip is more convenient than a SourceDataLine, especially if you want the playback to loop (cycle repeatedly through all or part of the sound). If you need to start the playback at an arbitrary position in the sound, the Clip interface provides a method to do that easily. Finally, playback from a Clip generally has less latency than buffered playback from a SourceDataLine. In other words, because the sound is preloaded into a clip, playback can start immediately instead of having to wait for the buffer to be filled.

  • Use a SourceDataLine for streaming data, such as a long sound file that won't all fit in memory at once, or a sound whose data can't be known in advance of playback.

    As an example of the latter case, suppose you're monitoring sound input—that is, playing sound back as it's being captured. If you don't have a mixer that can send input audio right back out an output port, your application program will have to take the captured data and send it to an audio-output mixer. In this case, a SourceDataLine is more appropriate than a Clip. Another example of sound that can't be known in advance occurs when you synthesize or manipulate the sound data interactively in response to the user's input. For example, imagine a game that gives aural feedback by "morphing" from one sound to another as the user moves the mouse. The dynamic nature of the sound transformation requires the application program to update the sound data continuously during playback, instead of supplying it all before playback starts.

Using a Clip

You obtain a Clip as described earlier under "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources": Construct a DataLine.Info object with Clip.class for the first argument, and pass this DataLine.Info as an argument to the getLine method of AudioSystem or Mixer.

Setting Up the Clip for Playback

Obtaining a line just means you've gotten a way to refer to it; getLine doesn't actually reserve the line for you. Because a mixer might have a limited number of lines of the desired type available, it can happen that after you invoke getLine to obtain the clip, another application program jumps in and grabs the clip before you're ready to start playback. To actually use the clip, you need to reserve it for your program's exclusive use by invoking one of the following Clip methods:

   void open(AudioInputStream stream)
   void open(AudioFormat format, byte[] data, int offset,
   int bufferSize)
Despite the bufferSize argument in the second open method above, Clip (unlike SourceDataLine) includes no methods for writing new data to the buffer. The bufferSize argument here just specifies how much of the byte array to load into the clip. It's not a buffer into which you can subsequently load more data, as you can with a SourceDataLine's buffer.

After opening the clip, you can specify at what point in the data it should start playback, using Clip's setFramePosition or setMicroSecondPosition methods. Otherwise, it will start at the beginning. You can also configure the playback to cycle repeatedly, using the setLoopPoints method.

Starting and Stopping Playback

When you're ready to start playback, simply invoke the start method. To stop or pause the clip, invoke the stop method, and to resume playback, invoke start again. The clip remembers the media position where it stopped playback, so there's no need for explicit pause and resume methods. If you don't want it to resume where it left off, you can "rewind" the clip to the beginning (or to any other position, for that matter) using the frame- or microsecond-positioning methods mentioned above.

A Clip's volume level and activity status (active versus inactive) can be monitored by invoking the DataLine methods getLevel and isActive, respectively. An active Clip is one that is currently playing sound.

Using a SourceDataLine

Obtaining a SourceDataLine is similar to obtaining a Clip. See "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources."

Setting Up the SourceDataLine for Playback

Opening the SourceDataLine is also similar to opening a Clip, in that the purpose is once again to reserve the line. However, you use a different method, inherited from DataLine:

    void open(AudioFormat format)
Notice that when you open a SourceDataLine, you don't associate any sound data with the line yet, unlike opening a Clip. Instead, you just specify the format of the audio data you want to play. The system chooses a default buffer length.

You can also stipulate a certain buffer length in bytes, using this variant:

    void open(AudioFormat format, int bufferSize)
For consistency with similar methods, the buffersize argument is expressed in bytes, but it must correspond to an integral number of frames.

How would you select a buffer size? It depends on your program's needs.

To start with, shorter buffer sizes mean less latency. When you send new data, you hear it sooner. For some application programs, particularly highly interactive ones, this kind of responsiveness is important. For example, in a game, the onset of playback might need to be tightly synchronized with a visual event. Such programs might need a latency of less than 0.1 second. As another example, a conferencing application needs to avoid delays in both playback and capture. However, many application programs can afford a greater delay, up to a second or more, because it doesn't matter exactly when the sound starts playing, as long as the delay doesn't confuse or annoy the user. This might be the case for an application program that streams a large audio file using one-second buffers. The user probably won't care if playback takes a second to start, because the sound itself lasts so long and the experience isn't highly interactive.

On the other hand, shorter buffer sizes also mean a greater risk that you'll fail to write data fast enough into the buffer. If that happens, the audio data will contain discontinuities, which will probably be audible as clicks or breakups in the sound. Shorter buffer sizes also mean that your program has to work harder to keep the buffers filled, resulting in more intensive CPU usage. This can slow down the execution of other threads in your program, not to mention other programs.

So an optimal value for the buffer size is one that minimizes latency just to the degree that's acceptable for your application program, while keeping it large enough to reduce the risk of buffer underflow and to avoid unnecessary consumption of CPU resources. For a program like a conferencing application, delays are more annoying than low-fidelity sound, so a small buffer size is preferable. For streaming music, an initial delay is acceptable, but breakups in the sound are not. Thus for streaming music a larger buffer size—say, a second—is preferable. (Note that high sample rates make the buffers larger in terms of the number of bytes, which are the units for measuring buffer size in the DataLine API.)

Instead of using the open method described above, it's also possible to open a SourceDataLine using Line's open() method, without arguments. In this case, the line is opened with its default audio format and buffer size. However, you can't change these later. If you want to know the line's default audio format and buffer size, you can invoke DataLine's getFormat and getBufferSize methods, even before the line has ever been opened.

Starting and Stopping Playback

Once the SourceDataLine is open, you can start playing sound. You do this by invoking DataLine's start method, and then writing data repeatedly to the line's playback buffer.

The start method permits the line to begin playing sound as soon as there's any data in its buffer. You place data in the buffer by the following method:

    int write(byte[] b, int offset, int length)
The offset into the array is expressed in bytes, as is the array's length.

The line begins sending data as soon as possible to its mixer. When the mixer itself delivers the data to its target, the SourceDataLine generates a START event. (In a typical implementation of the Java Sound API, the delay between the moment that the source line delivers data to the mixer and the moment that the mixer delivers the data to its target is negligible—that is, much less than the time of one sample.) This START event gets sent to the line's listeners, as explained below under "Monitoring a Line's Status." The line is now considered active, so the isActive method of DataLine will return true. Notice that all this happens only once the buffer contains data to play, not necessarily right when the start method is invoked. If you invoked start on a new SourceDataLine but never wrote data to the buffer, the line would never be active and a START event would never be sent. (However, in this case, the isRunning method of DataLine would return true.)

So how do you know how much data to write to the buffer, and when to send the second batch of data? Fortunately, you don't need to time the second invocation of write to synchronize with the end of the first buffer! Instead, you can take advantage of the write method's blocking behavior:

  • The method returns as soon as the data has been written to the buffer. It doesn't wait until all the data in the buffer has finished playing. (If it did, you might not have time to write the next buffer without creating a discontinuity in the audio.)
  • It's all right to try to write more data than the buffer will hold. In this case, the method blocks (doesn't return) until all the data you requested has actually been placed in the buffer. In other words, one buffer's worth of your data at a time will be written to the buffer and played, until the remaining data all fits in the buffer, at which point the method returns. Whether or not the method blocks, it returns as soon as the last buffer's worth of data from this invocation can be written. Again, this means that your code will in all likelihood regain control before playback of the last buffer's worth of data has finished.
  • While in many contexts it is fine to write more data than the buffer will hold, if you want to be certain that the next write issued does not block, you can limit the number of bytes you write to the number that DataLine's available method returns.

Here's an example of iterating through chunks of data that are read from a stream, writing one chunk at a time to the SourceDataLine for playback:
// read chunks from a stream and write them to a source data
line
line.start();
while (total < totalToRead && !stopped)}
    numBytesRead = stream.read(myData, 0, numBytesToRead);
    if (numBytesRead == -1) break;
    total += numBytesRead;
    line.write(myData, 0, numBytesRead);

}
If you don't want the write method to block, you can first invoke the available method (inside the loop) to find out how many bytes can be written without blocking, and then limit the numBytesToRead variable to this number, before reading from the stream. In the example given, though, blocking won't matter much, since the write method is invoked inside a loop that won't complete until the last buffer is written in the final loop iteration. Whether or not you use the blocking technique, you'll probably want to invoke this playback loop in a separate thread from the rest of the application program, so that your program doesn't appear to freeze when playing a long sound. On each iteration of the loop, you can test whether the user has requested playback to stop. Such a request needs to set the stopped boolean, used in the code above, to true.

Since write returns before all the data has finished playing, how do you learn when the playback has actually completed? One way is to invoke the drain method of DataLine after writing the last buffer's worth of data. This method blocks until all the data has been played. When control returns to your program, you can free up the line, if desired, without fear of prematurely cutting off the playback of any audio samples:

line.write(b, offset, numBytesToWrite);
//this is the final invocation of write
line.drain();
line.stop();
line.close();
line = null;
You can intentionally stop playback prematurely, of course. For example, the application program might provide the user with a Stop button. Invoke DataLine's stop method to stop playback immediately, even in the middle of a buffer. This leaves any unplayed data in the buffer, so that if you subsequently invoke start, the playback resumes where it left off. If that's not what you want to happen, you can discard the data left in the buffer by invoking flush.

A SourceDataLine generates a STOP event whenever the flow of data has been stopped, whether this stoppage was initiated by the drain method, the stop method, or the flush method, or because the end of a playback buffer was reached before the application program invoked write again to provide new data. A STOP event doesn't necessarily mean that the stop method was invoked, and it doesn't necessarily mean that a subsequent invocation of isRunning will return false. It does, however, mean that isActive will return false. (When the start method has been invoked, the isRunning method will return true, even if a STOP event is generated, and it will begin to return false only once the stop method is invoked.) It's important to realize that START and STOP events correspond to isActive, not to isRunning.

Monitoring a Line's Status

Once you have started a sound playing, how do you find when it's finished? We saw one solution above—invoking the drain method after writing the last buffer of data—but that approach is applicable only to a SourceDataLine. Another approach, which works for both SourceDataLines and Clips, is to register to receive notifications from the line whenever the line changes its state. These notifications are generated in the form of LineEvent objects, of which there are four types: OPEN, CLOSE, START, and STOP.

Any object in your program that implements the LineListener interface can register to receive such notifications. To implement the LineListener interface, the object simply needs an update method that takes a LineEvent argument. To register this object as one of the line's listeners, you invoke the following Line method:

public void addLineListener(LineListener listener)

Whenever the line opens, closes, starts, or stops, it sends an update message to all its listeners. Your object can query the LineEvent that it receives. First you might invoke LineEvent.getLine to make sure the line that stopped is the one you care about. In the case we're discussing here, you want to know if the sound is finished, so you see whether the LineEvent is of type STOP. If it is, you might check the sound's current position, which is also stored in the LineEvent object, and compare it to the sound's length (if known) to see whether it reached the end and wasn't stopped by some other means (such as the user's clicking a Stop button, although you'd probably be able to determine that cause elsewhere in your code).

Along the same lines, if you need to know when the line is opened, closed, or started, you use the same mechanism. LineEvents are generated by different kinds of lines, not just Clips and SourceDataLines. However, in the case of a Port you can't count on getting an event to learn about a line's open or closed state. For example, a Port might be initially open when it's created, so you don't invoke the open method and the Port doesn't ever generate an OPEN event. (See "Selecting Input and Output Ports" in Chapter 3, "Accessing Audio System Resources.")

Synchronizing Playback on Multiple Lines

If you're playing back multiple tracks of audio simultaneously, you probably want to have them all start and stop at exactly the same time. Some mixers facilitate this behavior with their synchronize method, which lets you apply operations such as open, close, start, and stop to a group of data lines using a single command, instead of having to control each line individually. Furthermore, the degree of accuracy with which operations are applied to the lines is controllable.

To find out whether a particular mixer offers this feature for a specified group of data lines, invoke the Mixer interface's isSynchronizationSupported method:

boolean isSynchronizationSupported(Line[] lines,
  boolean  maintainSync)
The first parameter specifies a group of specific data lines, and the second parameter indicates the accuracy with which synchronization must be maintained. If the second parameter is true, the query is asking whether the mixer is capable of maintaining sample-accurate precision in controlling the specified lines at all times; otherwise, precise synchronization is required only during start and stop operations, not throughout playback.

Processing the Outgoing Audio

Some source data lines have signal-processing controls, such as gain, pan, reverb, and sample-rate controls. Similar controls, especially gain controls, might be present on the output ports as well. For more information on how to determine whether a line has such controls, and how to use them if it does, see Chapter 6, "Processing Audio with Controls."

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Playing, Recording and Editing MIDI Sequences

Documentation Contents

< Contents

Chapter 11: Playing, Recording and Editing MIDI Sequences

Note

With the 5.0 release, there is a new real-time Sequencer (implementation) that works with all Midi devices and, via its getTransmitter() method, an unlimited number of transmitters may be obtained. Prior to this release, it was not possible to get a Transmitter from a Sequencer.

In the world of MIDI, a sequencer is any hardware or software device that can precisely play or record a sequence of time-stamped MIDI messages. Similarly, in the Java Sound API, the Sequencer abstract interface defines the properties of an object that can play and record Sequences of MidiEvent objects. A Sequencer typically loads these MidiEvent sequences from a standard MIDI file or saves them to such a file. Sequences can also be edited. This chapter explains how to use Sequencer objects, along with related classes and interfaces, to accomplish such tasks.

Introduction to Sequencers

To develop an intuitive understanding of what a Sequencer is, think of it by analogy with a tape recorder, which a sequencer resembles in many respects. Whereas a tape recorder plays audio, a sequencer plays MIDI data. A sequence is a multi-track, linear, time-ordered recording of MIDI musical data, which a sequencer can play at various speeds, rewind, shuttle to particular points, record into, or copy to a file for storage.

Chapter 10, "Transmitting and Receiving MIDI Messages," explained that devices typically have Receiver objects, Transmitter objects, or both. To play music, a device generally receives MidiMessages through a Receiver, which in turn has usually received them from a Transmitter that belongs to a Sequencer. The device that owns this Receiver might be a Synthesizer, which will generate audio directly, or it might be a MIDI output port, which transmits MIDI data through a physical cable to some external piece of equipment. Similarly, to record music, a series of time-stamped MidiMessages are generally sent to a Receiver owned by a Sequencer, which places them in a Sequence object. Typically the object sending the messages is a Transmitter associated with a hardware input port, and the port relays MIDI data that it gets from an external instrument. However, the device responsible for sending the messages might instead be some other Sequencer, or any other device that has a Transmitter. Furthermore, as mentioned in Chapter 10, a program can send messages without using any Transmitter at all.

A Sequencer itself has both Receivers and Transmitters. When it's recording, it actually obtains MidiMessages via its Receivers. During playback, it uses its Transmitters to send MidiMessages that are stored in the Sequence that it has recorded (or loaded from a file).

One way to think of the role of a Sequencer in the Java Sound API is as an aggregator and "de-aggregator" of MidiMessages. A series of separate MidiMessages, each of which is independent, is sent to the Sequencer along with its own time stamp that marks the timing of a musical event. These MidiMessages are encapsulated in MidiEvent objects and collected in Sequence objects through the action of the Sequencer.record method. A Sequence is a data structure containing aggregates of MidiEvents, and it usually represents a series of musical notes, often an entire song or composition. On playback, the Sequencer again extracts the MidiMessages from the MidiEvent objects in the Sequence and then transmits them to one or more devices that will either render them into sound, save them, modify them, or pass them on to some other device.

Some sequencers might have neither transmitters nor receivers. For example, they might create MidiEvents from scratch as a result of keyboard or mouse events, instead of receiving MidiMessages through Receivers. Similarly, they might play music by communicating directly with an internal synthesizer (which could actually be the same object as the sequencer) instead of sending MidiMessages to a Receiver associated with a separate object. However, the rest of this chapter assumes the normal case of a sequencer that uses Receivers and Transmitters.

When to Use a Sequencer

It's possible for an application program to send MIDI messages directly to a device, without using a sequencer, as was described in Chapter 10, "Transmitting and Receiving MIDI Messages." The program simply invokes the Receiver.send method each time it wants to send a message. This is a straightforward approach that's useful when the program itself creates the messages in real time. For example, consider a program that lets the user play notes by clicking on an onscreen piano keyboard. When the program gets a mouse-down event, it immediately sends the appropriate Note On message to the synthesizer.

As mentioned in Chapter 10, the program can include a time stamp with each MIDI message it sends to the device's receiver. However, such time stamps are used only for fine-tuning the timing, to correct for processing latency. The caller can't generally set arbitrary time stamps; the time value passed to Receiver.send must be close to the present time, or the receiving device might not be able to schedule the message correctly. This means that if an application program wanted to create a queue of MIDI messages for an entire piece of music ahead of time (instead of creating each message in response to a real-time event), it would have to be very careful to schedule each invocation of Receiver.send for nearly the right time.

Fortunately, most application programs don't have to be concerned with such scheduling. Instead of invoking Receiver.send itself, a program can use a Sequencer object to manage the queue of MIDI messages for it. The sequencer takes care of scheduling and sending the messages—in other words, playing the music with the correct timing. Generally, it's advantageous to use a sequencer whenever you need to convert a non-real-time series of MIDI messages to a real-time series (as in playback), or vice versa (as in recording). Sequencers are most commonly used for playing data from MIDI files and for recording data from a MIDI input port.

Understanding Sequence Data

Before examining the Sequencer API, it helps to understand the kind of data that's stored in a sequence.

Sequences and Tracks

In the Java Sound API, sequencers closely follow the Standard MIDI Files specification in the way that they organize recorded MIDI data. As mentioned above, a Sequence is an aggregation of MidiEvents, organized in time. But there is more structure to a Sequence than just a linear series of MidiEvents: a Sequence actually contains global timing information plus a collection of Tracks, and it is the Tracks themselves that hold the MidiEvent data. So the data played by a sequencer consists of a three-level hierarchy of objects: Sequencer, Track, and MidiEvent.

In the conventional use of these objects, the Sequence represents a complete musical composition or section of a composition, with each Track corresponding to a voice or player in the ensemble. In this model, all the data on a particular Track would also therefore be encoded into a particular MIDI channel reserved for that voice or player.

This way of organizing data is convenient for purposes of editing sequences, but note that this is just a conventional way to use Tracks. There is nothing in the definition of the Track class per se that keeps it from containing a mix of MidiEvents on different MIDI channels. For example, an entire multi-channel MIDI composition can be mixed and recorded onto one Track. Also, standard MIDI files of Type 0 (as opposed to Type 1 and Type 2) contain by definition only one track; so a Sequence that's read from such a file will necessarily have a single Track object.

MidiEvents and Ticks

As discussed in Chapter 8, "Overview of the MIDI Package," the Java Sound API includes MidiMessage objects that correspond to the raw two- or three-byte sequences that make up most standard MIDI messages. A MidiEvent is simply a packaging of a MidiMessage along with an accompanying timing value that specifies when the event occurs. (We might then say that a sequence really consists of a four- or five-level hierarchy of data, rather than three-level, because the ostensible lowest level, MidiEvent, actually contains a lower-level MidiMessage, and likewise the MidiMessage object contains an array of bytes that comprises a standard MIDI message.)

In the Java Sound API, there are two different ways in which MidiMessages can be associated with timing values. One is the way mentioned above under "When to Use a Sequencer." This technique is described in detail under "Sending a Message to a Receiver without Using a Transmitter" and "Understanding Time Stamps" in Chapter 10, "Transmitting and Receiving MIDI Messages." There, we saw that the send method of Receiver takes a MidiMessage argument and a time-stamp argument. That kind of time stamp can only be expressed in microseconds.

The other way in which a MidiMessage can have its timing specified is by being encapsulated in a MidiEvent. In this case, the timing is expressed in slightly more abstract units called ticks.

What is the duration of a tick? It can vary between sequences (but not within a sequence), and its value is stored in the header of a standard MIDI file. The size of a tick is given in one of two types of units:

  • Pulses (ticks) per quarter note, abbreviated as PPQ
  • Ticks per frame, also known as SMPTE time code (a standard adopted by the Society of Motion Picture and Television Engineers)

If the unit is PPQ, the size of a tick is expressed as a fraction of a quarter note, which is a relative, not absolute, time value. A quarter note is a musical duration value that often corresponds to one beat of the music (a quarter of a measure in 4/4 time). The duration of a quarter note is dependent on the tempo, which can vary during the course of the music if the sequence contains tempo-change events. So if the sequence's timing increments (ticks) occur, say 96 times per quarter note, each event's timing value measures that event's position in musical terms, not as an absolute time value.

On the other hand, in the case of SMPTE, the units measure absolute time, and the notion of tempo is inapplicable. There are actually four different SMPTE conventions available, which refer to the number of motion-picture frames per second. The number of frames per second can be 24, 25, 29.97, or 30. With SMPTE time code, the size of a tick is expressed as a fraction of a frame.

In the Java Sound API, you can invoke Sequence.getDivisionType to learn which type of unit—namely, PPQ or one of the SMPTE units—is used in a particular sequence. You can then calculate the size of a tick after invoking Sequence.getResolution. The latter method returns the number of ticks per quarter note if the division type is PPQ, or per SMPTE frame if the division type is one of the SMPTE conventions. You can get the size of a tick using this formula in the case of PPQ:

ticksPerSecond =
    resolution * (currentTempoInBeatsPerMinute / 60.0);
tickSize = 1.0 / ticksPerSecond;

and this formula in the case of SMPTE:

framesPerSecond =
  (divisionType == Sequence.SMPTE_24 ? 24
    : (divisionType == Sequence.SMPTE_25 ? 25
      : (divisionType == Sequence.SMPTE_30 ? 30
        : (divisionType == Sequence.SMPTE_30DROP ?
            29.97))));
ticksPerSecond = resolution * framesPerSecond;
tickSize = 1.0 / ticksPerSecond;

The Java Sound API's definition of timing in a sequence mirrors that of the Standard MIDI Files specification. However, there's one important difference. The tick values contained in MidiEvents measure cumulative time, rather than delta time. In a standard MIDI file, each event's timing information measures the amount of time elapsed since the onset of the previous event in the sequence. This is called delta time. But in the Java Sound API, the ticks aren't delta values; they're the previous event's time value plus the delta value. In other words, in the Java Sound API the timing value for each event is always greater than that of the previous event in the sequence (or equal, if the events are supposed to be simultaneous). Each event's timing value measures the time elapsed since the beginning of the sequence.

To summarize, the Java Sound API expresses timing information in either MIDI ticks or microseconds. MidiEvents store timing information in terms of MIDI ticks. The duration of a tick can be calculated from the Sequence's global timing information and, if the sequence uses tempo-based timing, the current musical tempo. The time stamp associated with a MidiMessage sent to a Receiver, on the other hand, is always expressed in microseconds.

One goal of this design is to avoid conflicting notions of time. It's the job of a Sequencer to interpret the time units in its MidiEvents, which might have PPQ units, and translate these into absolute time in microseconds, taking the current tempo into account. The sequencer must also express the microseconds relative to the time when the device receiving the message was opened. Note that a sequencer can have multiple transmitters, each delivering messages to a different receiver that might be associated with a completely different device. You can see, then, that the sequencer has to be able to perform multiple translations at the same time, making sure that each device receives time stamps appropriate for its notion of time.

To make matters more complicated, different devices might update their notions of time based on different sources (such as the operating system's clock, or a clock maintained by a sound card). This means that their timings can drift relative to the sequencer's. To keep in synchronization with the sequencer, some devices permit themselves to be "slaves" to the sequencer's notion of time. Setting masters and slaves is discussed later under "Using Advanced Sequencer Features."

Overview of Sequencer Methods

The Sequencer interface provides methods in several categories:

  • Methods to load sequence data from a MIDI file or a Sequence object, and to save the currently loaded sequence data to a MIDI file.
  • Methods analogous to the transport functions of a tape recorder, for stopping and starting playback and recording, enabling and disabling recording on specific tracks, and shuttling the current playback or recording position in a Sequence.
  • Advanced methods for querying and setting the synchronization and timing parameters of the object. A Sequencer may play at different tempos, with some Tracks muted, and in various synchronization states with other objects.
  • Advanced methods for registering "listener" objects that are notified when the Sequencer processes certain kinds of MIDI events.

Regardless of which Sequencer methods you'll invoke, the first step is to obtain a Sequencer device from the system and reserve it for your program's use.

Obtaining a Sequencer

An application program doesn't instantiate a Sequencer; after all, Sequencer is just an interface. Instead, like all devices in the Java Sound API's MIDI package, a Sequencer is accessed through the static MidiSystem object. As mentioned in Chapter 9, "Accessing MIDI System Resources," the following MidiSystem method can be used to obtain the default Sequencer:

    static Sequencer getSequencer()

The following code fragment obtains the default Sequencer, acquires any system resources it needs, and makes it operational:

    Sequencer sequencer;
    // Get default sequencer.
    sequencer = MidiSystem.getSequencer();
    if (sequencer == null) {
        // Error -- sequencer device is not supported.
        // Inform user and return...
    } else {
         // Acquire resources and make operational.
        sequencer.open();
    }

The invocation of open reserves the sequencer device for your program's use. It doesn't make much sense to imagine sharing a sequencer, because it can play only one sequence at a time. When you're done using the sequencer, you can make it available to other programs by invoking close.

Non-default sequencers can be obtained as described in Chapter 9, "Accessing MIDI System Resources."

Loading a Sequence

Having obtained a sequencer from the system and reserved it, you then need load the data that the sequencer should play. There are three typical ways of accomplishing this:

  • Reading the sequence data from a MIDI file
  • Recording it in real time by receiving MIDI messages from another device, such as a MIDI input port
  • Building it programmatically "from scratch" by adding tracks to an empty sequence and adding MidiEvent objects to those tracks

We'll now look at the first of these ways of getting sequence data. (The other two ways are described later under "Recording and Saving Sequences" and "Editing a Sequence," respectively.) This first way actually encompasses two slightly different approaches. One approach is to feed MIDI file data to an InputStream that you then read directly to the sequencer by means of Sequencer.setSequence(InputStream). With this approach, you don't explicitly create a Sequence object. In fact, the Sequencer implementation might not even create a Sequence behind the scenes, because some sequencers have a built-in mechanism for handling data directly from a file.

The other approach is to create a Sequence explicitly. You'll need to use this approach if you're going to edit the sequence data before playing it. With this approach, you invoke MidiSystem's overloaded method getSequence. The method is able to get the sequence from an InputStream, a File, or a URL. The method returns a Sequence object that can then be loaded into a Sequencer for playback. Expanding on the previous code excerpt, here's an example of obtaining a Sequence object from a File and loading it into our sequencer:

    try {
        File myMidiFile = new File("seq1.mid");
        // Construct a Sequence object, and
        // load it into my sequencer.
         Sequence mySeq = MidiSystem.getSequence(myMidiFile);
        sequencer.setSequence(mySeq);
    } catch (Exception e) {
        // Handle error and/or return
    }

Like MidiSystem's getSequence method, setSequence may throw an InvalidMidiDataException—and, in the case of the InputStream variant, an IOException—if it runs into any trouble.

Playing a Sequence

Starting and stopping a Sequencer is accomplished using the following methods:

    void start()

and

    void stop()

The Sequencer.start method begins playback of the sequence. Note that playback starts at the current position in a sequence. Loading an existing sequence using the setSequence method, described above, initializes the sequencer's current position to the very beginning of the sequence. The stop method stops the sequencer, but it does not automatically rewind the current Sequence. Starting a stopped Sequence without resetting the position simply resumes playback of the sequence from the current position. In this case, the stop method has served as a pause operation. However, there are various Sequencer methods for setting the current sequence position to an arbitrary value before playback is started. (We'll discuss these methods below.)

As mentioned earlier, a Sequencer typically has one or more Transmitter objects, through which it sends MidiMessages to a Receiver. It is through these Transmitters that a Sequencer plays the Sequence, by emitting appropriately timed MidiMessages that correspond to the MidiEvents contained in the current Sequence. Therefore, part of the setup procedure for playing back a Sequence is to invoke the setReceiver method on the Sequencer's Transmitter object, in effect wiring its output to the device that will make use of the played-back data. For more details on Transmitters and Receivers, see Chapter 10, "Transmitting and Receiving MIDI Messages."

Recording and Saving Sequences

To capture MIDI data to a Sequence, and subsequently to a file, you need to perform some additional steps beyond those described above. The following outline shows the steps necessary to set up for recording to a Track in a Sequence:

  2. Use MidiSystem.getSequencer to get a new sequencer to use for recording, as above.
  3. Set up the "wiring" of the MIDI connections. The object that is transmitting the MIDI data to be recorded should be configured, through its setReceiver method, to send data to a Receiver associated with the recording Sequencer.
  4. Create a new Sequence object, which will store the recorded data. When you create the Sequence object, you must specify the global timing information for the sequence. For example:
          Sequence mySeq;
      try{
          mySeq = new Sequence(Sequence.PPQ, 10);
      } catch (Exception ex) {
          ex.printStackTrace();
      }
    The constructor for Sequence takes as arguments a divisionType and a timing resolution. The divisionType argument specifies the units of the resolution argument. In this case, we've specified that the timing resolution of the Sequence we're creating will be 10 pulses per quarter note. An additional optional argument to the Sequence constructor is a number of tracks argument, which would cause the initial sequence to begin with the specified number of (initially empty) Tracks. Otherwise the Sequence will be created with no initial Tracks; they can be added later as needed.
  5. Create an empty Track in the Sequence, with Sequence.createTrack. This step is unnecessary if the Sequence was created with initial Tracks.
  6. Using Sequencer.setSequence, select our new Sequence to receive the recording. The setSequence method ties together an existing Sequence with the Sequencer, which is somewhat analogous to loading a tape onto a tape recorder.
  7. Invoke Sequencer.recordEnable for each Track to be recorded. If necessary, get a reference to the available Tracks in the Sequence by invoking Sequence.getTracks.
  8. Invoke startRecording on the Sequencer.
  9. When done recording, invoke Sequencer.stop or Sequencer.stopRecording.
  10. Save the recorded Sequence to a MIDI file with MidiSystem.write. The write method of MidiSystem takes a Sequence as one of its arguments, and will write that Sequence to a stream or file.

Editing a Sequence

Many application programs allow a sequence to be created by loading it from a file, and quite a few also allow a sequence to be created by capturing it from live MIDI input (that is, recording). Some programs, however, will need to create MIDI sequences from scratch, whether programmatically or in response to user input. Full-featured sequencer programs permit the user to manually construct new sequences, as well as to edit existing ones.

These data-editing operations are achieved in the Java Sound API not by Sequencer methods, but by methods of the data objects themselves: Sequence, Track, and MidiEvent. You can create an empty sequence using one of the Sequence constructors, and then add tracks to it by invoking the following Sequence method:

    Track createTrack()
If your program allows the user to edit sequences, you'll need this Sequence method to remove tracks:
    boolean deleteTrack(Track track)

Once the sequence contains tracks, you can modify the contents of the tracks by invoking methods of the Track class. The MidiEvents contained in the Track are stored as a java.util.Vector in the Track object, and Track provides a set of methods for accessing, adding, and removing the events in the list. The methods add and remove are fairly self-explanatory, adding or removing a specified MidiEvent from a Track. A get method is provided, which takes an index into the Track's event list and returns the MidiEvent stored there. In addition, there are size and tick methods, which respectively return the number of MidiEvents in the track, and the track's duration, expressed as a total number of Ticks.

To create a new event before adding it to the track, you'll of course use the MidiEvent constructor. To specify or modify the MIDI message embedded in the event, you can invoke the setMessage method of the appropriate MidiMessage subclass (ShortMessage, SysexMessage, or MetaMessage). To modify the time that the event should occur, invoke MidiEvent.setTick.

In combination, these low-level methods provide the basis for the editing functionality needed by a full-featured sequencer program.

Using Advanced Sequencer Features

So far, this chapter has focused on simple playback and recording of MIDI data. This section will briefly describe some of the more advanced features available through methods of the Sequencer interface and the Sequence class.

Moving to an Arbitrary Position in the Sequence

There are two Sequencer methods that obtain the sequencer's current position in the sequence. The first of these:

    long getTickPosition()

returns the position measured in MIDI ticks from the beginning of the sequence. The second method:

long getMicrosecondPosition()

returns the current position in microseconds. This method assumes that the sequence is being played at the default rate as stored in the MIDI file or in the Sequence. It does not return a different value if you've changed the playback speed as described below.

You can similarly set the sequencer's current position according to one unit or the other:

void setTickPosition(long tick)

or

void setMicrosecondPosition(long microsecond)

Changing the Playback Speed

As indicated earlier, a sequence's speed is indicated by its tempo, which can vary over the course of the sequence. A sequence can contain events that encapsulate standard MIDI tempo-change messages. When the sequencer processes such an event, it changes the speed of playback to reflect the indicated tempo. In addition, you can programmatically change the tempo by invoking any of these Sequencer methods:

    public void setTempoInBPM(float bpm)
    public void setTempoInMPQ(float mpq)
    public void setTempoFactor(float factor)
The first two of these methods set the tempo in beats per minute or microseconds per quarter note, respectively. The tempo will stay at the specified value until one of these methods is invoked again, or until a tempo-change event is encountered in the sequence, at which point the current tempo is overridden by the newly specified one.

The third method, setTempoFactor, is different in nature. It scales whatever tempo is set for the sequencer (whether by tempo-change events or by one of the first two methods above). The default scalar is 1.0 (no change). Although this method causes the playback or recording to be faster or slower than the nominal tempo (unless the factor is 1.0), it doesn't alter the nominal tempo. In other words, the tempo values returned by getTempoInBPM and getTempoInMPQ are unaffected by the tempo factor, even though the tempo factor does affect the actual rate of playback or recording. Also, if the tempo is changed by a tempo-change event or by one of the first two methods, it still gets scaled by whatever tempo factor was last set. If you load a new sequence, however, the tempo factor is reset to 1.0.

Note that all these tempo-change directives are ineffectual when the sequence's division type is one of the SMPTE types, instead of PPQ.

Muting or Soloing Individual Tracks in the Sequence

It's often convenient for users of sequencers to be able to turn off certain tracks, to hear more clearly exactly what is happening in the music. A full-featured sequencer program lets the user choose which tracks should sound during playback. (Speaking more precisely, since sequencers don't actually create sound themselves, the user chooses which tracks will contribute to the stream of MIDI messages that the sequencer produces.) Typically, there are two types of graphical controls on each track: a mute button and a solo button. If the mute button is activated, that track will not sound under any circumstances, until the mute button is deactivated. Soloing is a less well-known feature. It's roughly the opposite of muting. If the solo button on any track is activated, only tracks whose solo buttons are activated will sound. This feature lets the user quickly audition a small number of tracks without having to mute all the other tracks. The mute button typically takes priority over the solo button: if both are activated, the track doesn't sound.

Using Sequencer methods, muting or soloing tracks (as well as querying a track's current mute or solo state) is easily accomplished. Let's assume we have obtained the default Sequencer and that we've loaded sequence data into it. Muting the fifth track in the sequence would be accomplished as follows:

    sequencer.setTrackMute(4, true);
    boolean muted = sequencer.getTrackMute(4);
    if (!muted) {
        return;         // muting failed
    }
There are a couple of things to note about the above code snippet. First, tracks of a sequence are numbered starting with 0 and ending with the total number of tracks minus 1. Also, the second argument to setTrackMute is a boolean. If it's true, the request is to mute the track; otherwise the request is to unmute the specified track. Lastly, in order to test that the muting took effect, we invoke the Sequencer getTrackMute method, passing it the track number we're querying. If it returns true, as we'd expect in this case, then the mute request worked. If it returns false, then it failed.

Mute requests may fail for various reasons. For example, the track number specified in the setTrackMute call might exceed the total number of tracks, or the sequencer might not support muting. By calling getTrackMute, we can determine if our request succeeded or failed.

As an aside, the boolean that's returned by getTrackMute can, indeed, tell us if a failure occurred, but it can't tell us why it occurred. We could test to see if a failure was caused by passing an invalid track number to the setTrackMute method. To do this, we would call the getTracks method of Sequence, which returns an array containing all of the tracks in the sequence. If the track number specified in the setTrackMute call exceeds the length of this array, then we know we specified an invalid track number.

If the mute request succeeded, then in our example, the fifth track will not sound when the sequence is playing, nor will any other tracks that are currently muted.

The method and techniques for soloing a track are very similar to those for muting. To solo a track, invoke the setTrackSolo method of Sequence:

void setTrackSolo(int track, boolean bSolo)
As in setTrackMute, the first argument specifies the zero-based track number, and the second argument, if true, specifies that the track should be in solo mode; otherwise the track should not be soloed.

By default, a track is neither muted nor soloed.

Synchronizing with Other MIDI Devices

Sequencer has an inner class called Sequencer.SyncMode. A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device. If the sequencer is being synchronized to a master, the sequencer revises its current time in response to certain MIDI messages from the master. If the sequencer has a slave, the sequencer similarly sends MIDI messages to control the slave's timing.

There are three predefined modes that specify possible masters for a sequencer: INTERNAL_CLOCK, MIDI_SYNC, and MIDI_TIME_CODE. The latter two work if the sequencer receives MIDI messages from another device. In these two modes, the sequencer's time gets reset based on system real-time timing clock messages or MIDI time code (MTC) messages, respectively. (See the MIDI specification for more information about these types of message.) These two modes can also be used as slave modes, in which case the sequencer sends the corresponding types of MIDI messages to its receiver. A fourth mode, NO_SYNC, is used to indicate that the sequencer should not send timing information to its receivers.

By calling the setMasterSyncMode method with a supported SyncMode object as the argument, you can specify how the sequencer's timing is controlled. Likewise, the setSlaveSyncMode method determines what timing information the sequencer will send to its receivers. This information controls the timing of devices that use the sequencer as a master timing source.

Specifying Special Event Listeners

Each track of a sequence can contain many different kinds of MidiEvents. Such events include Note On and Note Off messages, program changes, control changes, and meta events. The Java Sound API specifies "listener" interfaces for the last two of these event types (control change events and meta events). You can use these interfaces to receive notifications when such events occur during playback of a sequence.

Objects that support the ControllerEventListener interface can receive notification when a Sequencer processes particular control-change messages. A control-change message is a standard type of MIDI message that represents a change in the value of a MIDI controller, such as a pitch-bend wheel or a data slider. (See the MIDI specification for the complete list of control-change messages.) When such a message is processed during playback of a sequence, the message instructs any device (probably a synthesizer) that's receiving the data from the sequencer to update the value of some parameter. The parameter usually controls some aspect of sound synthesis, such as the pitch of the currently sounding notes if the controller was the pitch-bend wheel. When a sequence is being recorded, the control-change message means that a controller on the external physical device that created the message has been moved, or that such a move has been simulated in software.

Here's how the ControllerEventListener interface is used. Let's assume that you've developed a class that implements the ControllerEventListener interface, meaning that your class contains the following method:

    void controlChange(ShortMessage msg)
Let's also assume that you've created an instance of your class and assigned it to a variable called myListener. If you include the following statements somewhere within your program:
    int[] controllersOfInterest = { 1, 2, 4 };
    sequencer.addControllerEventListener(myListener,
        controllersOfInterest);
then your class's controlChange method will be invoked every time the sequencer processes a control-change message for MIDI controller numbers 1, 2, or 4. In other words, when the Sequencer processes a request to set the value of any of the registered controllers, the Sequencer will invoke your class's controlChange method. (Note that the assignments of MIDI controller numbers to specific control devices is detailed in the MIDI 1.0 Specification.)

The controlChange method is passed a ShortMessage containing the controller number affected, and the new value to which the controller was set. You can obtain the controller number using the ShortMessage.getData1 method, and the new setting of the controller's value using the ShortMessage.getData2 method.

The other kind of special event listener is defined by the MetaEventListener interface. Meta messages, according to the Standard MIDI Files 1.0 specification, are messages that are not present in MIDI wire protocol but that can be embedded in a MIDI file. They are not meaningful to a synthesizer, but can be interpreted by a sequencer. Meta messages include instructions (such as tempo change commands), lyrics or other text, and other indicators (such as end-of-track).

The MetaEventListener mechanism is analogous to ControllerEventListener. Implement the MetaEventListener interface in any class whose instances need to be notified when a MetaMessage is processed by the sequencer. This involves adding the following method to the class:

void meta(MetaMessage msg)

You register an instance of this class by passing it as the argument to the Sequencer addMetaEventListener method:

boolean b = sequencer.addMetaEventListener
        (myMetaListener);
This is slightly different from the approach taken by the ControllerEventListener interface, because you have to register to receive all MetaMessages, not just selected ones of interest. If the sequencer encounters a MetaMessage in its sequence, it will invoke myMetaListener.meta, passing it the MetaMessage encountered. The meta method can invoke getType on its MetaMessage argument to obtain an integer from 0 to 127 that indicates the message type, as defined by the Standard MIDI Files 1.0 specification.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

< Contents

Preface

For Whom This Guide Is Intended

This guide is intended for three groups of readers:

  • Application developers: software programmers who want to write Java applications or applets using audio or MIDI. Most readers will fall into this category.
  • Service providers: developers of software modules that extend the capabilities of an implementation of the Java Sound application programming interface (API). For example, a vendor might provide a new audio mixer or MIDI synthesizer, or the ability to read and write a new file format. The Java Sound API is designed to let programs automatically access all such "plug-in" modules available on a particular system.
  • API implementors: developers creating new implementations of the Java Sound API.

It is assumed that the reader has a basic knowledge of programming in the Java language. Familiarity with audio and MIDI is helpful but not assumed.

What This Guide Describes

This is a largely conceptual description of the Java Sound API, with some code snippets as programming examples. The Java Sound API specifies a software layer that allows application programs to communicate with an audio and MIDI engine. The Java Sound API is part of the Java Platform, Standard Edition (Java SE), version 1.3, which is the version described by this guide. The sound API is included in both the Java Development Kit (JDK), and the Java Runtime Environment, Standard Edition (JRE). Earlier implementations of the Java Sound API were supplied as a separate products and their programming interfacea differ from the one described here.

Note:

This guide is not a description of any particular implementation of the Java Sound API. For example, you will not find here a list of exactly which sound file formats are supported in the reference implementation. (Because the Java Sound API makes "plug-in" services possible, API implementors and/or third parties can add support for new formats, ports with special features, etc.) In general, this guide ignores unique features, extensions, limitations, or bugs of a particular implementation.

As a convenience for developers, it does make note of some current limitations of the reference implemenation. If you are having problems, it is highly recommended that you consult:

  • Java Bug Database
  • Java Sound Home Page

For More Information

See the links to the Java Sound API reference documentation at Java Sound Technology. This Web site also includes a brief description of the reference implementation, as well as links to other resources about the Java Sound API, such as demo programs, mailing lists, and Frequently Answered Questions (FAQs). Also see the Java Sound Home Page mentioned above.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Processing Audio with Controls

Documentation Contents

< Contents

Chapter 6: Processing Audio with Controls

Previous chapters have discussed how to play or capture audio samples. The implicit goal has been to deliver samples as faithfully as possible, without modification (other than possibly mixing the samples with those from other audio lines). Sometimes, however, you want to be able to modify the signal. The user might want it to sound louder, quieter, fuller, more reverberant, higher or lower in pitch, and so on. This chapter discusses the Java Sound API features that provide these kinds of signal processing.

There are two ways to apply signal processing:

  • You can use any processing supported by the mixer or its component lines, by querying for Control objects and then setting the controls as the user desires. Typical controls supported by mixers and lines include gain, pan, and reverberation controls.
  • If the kind of processing you need isn't provided by the mixer or its lines, your program can operate directly on the audio bytes, manipulating them as desired.

This chapter discusses the first technique in greater detail, because there is no special API for the second technique.

Introduction to Controls

A mixer can have various sorts of signal-processing controls on some or all of its lines. For example, a mixer used for audio capture might have an input port with a gain control, and target data lines with gain and pan controls. A mixer used for audio playback might have sample-rate controls on its source data lines. In each case, the controls are all accessed through methods of the Line interface.

Because the Mixer interface extends Line, the mixer itself can have its own set of controls. These might serve as master controls affecting all the mixer's source or target lines. For example, the mixer might have a master gain control whose value in decibels is added to the values of individual gain controls on its target lines.

Others of the mixer's own controls might affect a special line, neither a source nor a target, that the mixer uses internally for its processing. For example, a global reverb control might choose the sort of reverberation to apply to a mixture of the input signals, and this "wet" (reverberated) signal would get mixed back into the "dry" signal before delivery to the mixer's target lines.

If the mixer or any of its lines have controls, you might wish to expose the controls via graphical objects in your program's user interface, so that the user can adjust the audio characteristics as desired. The controls are not themselves graphical; they just allow you to retrieve and change their settings. It's up to you to decide what sort of graphical representations (sliders, buttons, etc.), if any, to use in your program.

All controls are implemented as concrete subclasses of the abstract class Control. Many typical audio-processing controls can be described by abstract subclasses of Control based on a data type (such as boolean, enumerated, or float). Boolean controls, for example, represent binary-state controls, such as on/off controls for mute or reverb. Float controls, on the other hand, are well suited to represent continuously variable controls, such as pan, balance, or volume.

The Java Sound API specifies the following abstract subclasses of Control:

  • BooleanControl—represents a binary-state (true or false) control. For example, mute, solo, and on/off switches would be good candidates for BooleanControls.
  • FloatControl—data model providing control over a range of floating-point values. For example, volume and pan are FloatControls that could be manipulated via a dial or slider.
  • EnumControl—offers a choice from a set of objects. For example, you might associate a set of buttons in the user interface with an EnumControl to select one of several preset reverberation settings.
  • CompoundControl—provides access to a collection of related items, each of which is itself an instance of a Control subclass. CompoundControls represent multi-control modules such as graphic equalizers. (A graphic equalizer would typically be depicted by a set of sliders, each affecting a FloatControl.)

Each subclass of Control above has methods appropriate for its underlying data type. Most of the classes include methods that set and get the control's current value(s), get the control's label(s), and so on.

Of course, each class has methods that are particular to it and the data model represented by the class. For example, EnumControl has a method that lets you get the set of its possible values, and FloatControl permits you to get its minimum and maximum values, as well as the precision (increment or step size) of the control.

Each subclass of Control has a corresponding Control.Type subclass, which includes static instances that identify specific controls.

The following table shows each Control subclass, its corresponding Control.Type subclass, and the static instances that indicate specific kinds of controls:

Control | Control.Type | Control.Type instances
BooleanControl | BooleanControl.Type | MUTE Mute status of line APPLY_REVERB Reverberation on/off
CompoundControl | CompoundControl.Type | (none)
EnumControl | EnumControl.Type | REVERB Access to reverb settings (each is an instance of ReverbType)
FloatControl | FloatControl.Type | AUX_RETURN Auxiliary return gain on a line AUX_SEND Auxiliary send gain on a line BALANCE Left-right volume balance MASTER_GAIN Overall gain on a line PAN Left-right position REVERB_RETURN Post-reverb gain on a line REVERB_SEND Pre-reverb gain on a line SAMPLE_RATE Playback sample rate VOLUME Volume on a line

An implementation of the Java Sound API can provide any or all of these control types on its mixers and lines. It can also supply additional control types not defined in the Java Sound API. Such control types could be implemented via concrete subclasses of any of these four abstract subclasses, or via additional Control subclasses that don't inherit from any of these four abstract subclasses. An application program can query each line to find what controls it supports.

Getting a Line that Has the Desired Controls

In many cases, an application program will simply display whatever controls happen to be supported by the line in question. If the line doesn't have any controls, so be it. But what if it's important to find a line that has certain controls? In that case, you can use a Line.Info to obtain a line that has the right characteristics, as described under "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources."

For example, suppose you prefer an input port that lets the user set the volume of the sound input. The following code excerpt shows how one might query the default mixer to determine whether it has the desired port and control:

Port lineIn;
FloatControl volCtrl;
try {
  mixer = AudioSystem.getMixer(null);
  lineIn = (Port)mixer.getLine(Port.Info.LINE_IN);
  lineIn.open();
  volCtrl = (FloatControl) lineIn.getControl(
      FloatControl.Type.VOLUME);
  // Assuming getControl call succeeds,
  // we now have our LINE_IN VOLUME control.
} catch (Exception e) {
  System.out.println("Failed trying to find LINE_IN"
    + " VOLUME control: exception = " + e);
}
if (volCtrl != null)
  // ...

Getting the Controls from the Line

An application program that needs to expose controls in its user interface might simply query the available lines and controls, and then display an appropriate user-interface element for every control on every line of interest. In such a case, the program's only mission is to provide the user with "handles" on the control; not to know what those controls do to the audio signal. As long as the program knows how to map a line's controls into user-interface elements, the Java Sound API architecture of Mixer, Line, and Control will generally take care of the rest.

For example, suppose your program plays back sound. You're using a SourceDataLine, which you've obtained as described under "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources." You can access the line's controls by invoking the Line method:

Control[] getControls()
Then, for each of the controls in this returned array, you then use the following Control method to get the control's type:
Control.Type getType()
Knowing the specific Control.Type instance, your program can display a corresponding user-interface element. Of course, choosing "a corresponding user-interface element" for a specific Control.Type depends on the approach taken by your program. On the one hand, you might use the same kind of element to represent all Control.Type instances of the same class. This would require you to query the class of the Control.Type instance using, for example, the Object.getClass method. Let's say the result matched BooleanControl.Type. In this case, your program might display a generic checkbox or toggle button, but if its class matched FloatControl.Type, then you might display a graphic slider.

On the other hand, your program might distinguish between different types of controls—even those of the same class—and use a different user-interface element for each one. This would require you to test the instance returned by Control's getType method. Then if, for example, the type matched BooleanControl.Type.APPLY_REVERB, your program might display a checkbox; while if the type matched BooleanControl.Type.MUTE, you might instead display a toggle button.

Using a Control to Change the Audio Signal

Note

The current implementation requires that to change the value of a Control its corresponding Line must be open.

Now that you know how to access a control and determine its type, this section will describe how to use Controls to change aspects of the audio signal. This section doesn't cover every available control; rather, it provides a few examples in this area to show you how to get started. These example include:

  • Controlling a line's mute state
  • Changing a line's volume
  • Selecting among various reverberation presets

Suppose that your program has accessed all of its mixers, their lines and the controls on those lines, and that it has a data structure to manage the logical associations between the controls and their corresponding user-interface elements. Then, translating the user's manipulations of those controls into the corresponding Control methods becomes a fairly straightforward matter.

The following subsections describe some of the methods that must be invoked to affect the changes to specific controls.

Controlling a Line's Mute State

Controlling the mute state of any line is simply a matter of calling the following BooleanControl method:

void setValue(boolean value)
(Presumably, the program knows, by referring to its control-management data structures, that the mute is an instance of a BooleanControl.) To mute the signal that's passing through the line, the program invokes the method above, specifying true as the value. To turn muting off, permitting the signal to flow through the line, the program invokes the method with the parameter set to false.

Changing a Line's Volume

Let's assume your program associates a particular graphic slider with a particular line's volume control. The value of a volume control (i.e., FloatControl.Type.VOLUME) is set using the following FloatControl method:

void setValue(float newValue)
Detecting that the user moved the slider, the program gets the slider's current value and passes it, as the parameter newValue, to the method above. This changes the volume of the signal flowing though the line that "owns" the control.

Selecting among Various Reverberation Presets

Let's suppose that our program has a mixer with a line that has a control of type EnumControl.Type.REVERB. Calling the EnumControl method:

java.lang.Objects[] getValues()
on that control produces an array of ReverbType objects. If desired, the particular parameter settings of each of these objects can be accessed using the following ReverbType methods:
int getDecayTime()
int getEarlyReflectionDelay()
float getEarlyReflectionIntensity()
int getLateReflectionDelay()
float getLateReflectionIntensity()
For example, if a program only wants a single reverb setting that sounds like a cavern, it can iterate over the ReverbType objects until it finds one for which getDecayTime returns a value greater than 2000. For a thorough explanation of these methods, including a table of representative return values, see the API reference documentation for javax.sound.sampled.ReverbType.

Typically, though, a program will create a user-interface element, for example, a radio button, for each of the ReverbType objects within the array returned by the getValues method. When the user clicks on one of these radio buttons, the program invokes the EnumControl method

void setValue(java.lang.Object value)
where value is set to the ReverbType that corresponds to the newly engaged button. The audio signal sent through the line that "owns" this EnumControl will then be reverberated according to the parameter settings that constitute the control's current ReverbType (i.e., the particular ReverbType specified in the value argument of the setValue method).

So, from our application program's perspective, enabling a user to move from one reverberation preset (i.e., ReverbType) to another is simply a matter of connecting each element of the array returned by getValues to a distinct radio button.

Manipulating the Audio Data Directly

The Control API allows an implementation of the Java Sound API, or a third-party provider of a mixer, to supply arbitrary sorts of signal processing through controls. But what if no mixer offers the kind of signal processing you need? It will take more work, but you might be able to implement the signal processing in your program. Because the Java Sound API gives you access to the audio data as an array of bytes, you can alter these bytes in any way you choose.

If you're processing incoming sound, you can read the bytes from a TargetDataLine and then manipulate them. An algorithmically trivial example that can yield sonically intriguing results is to play a sound backwards by arranging its frames in reverse order. This trivial example may not be of much use for your program, but there are numerous sophisticated digital signal processing (DSP) techniques that might be more appropriate. Some examples are equalization, dynamic-range compression, peak limiting, and time stretching or compression, as well as special effects such as delay, chorus, flanging, distortion, and so on.

To play back processed sound, you can place your manipulated array of bytes into a SourceDataLine or Clip. Of course, the array of bytes need not be derived from an existing sound. You can synthesize sounds from scratch, although this requires some knowledge of acoustics or else access to sound-synthesis functions. For either processing or synthesis, you may want to consult an audio DSP textbook for the algorithms in which you're interested, or else import a third-party library of signal-processing functions into your program. For playback of synthesized sound, consider whether the Synthesizer API in the javax.sound.midi package meets your needs instead. (See Chapter 12, "Synthesizing Sound.")

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Providing MIDI Services

Documentation Contents

< Contents

Chapter 15: Providing MIDI Services

Chapter 13, "Introduction to the Service Provider Interfaces," explained that the javax.sound.sampled.spi and javax.sound.midi.spi packages define abstract classes to be used by developers of sound services. By implementing a subclass of one of these abstract classes, a service provider can create a new service that extends the functionality of the runtime system. Chapter 14 covered the use of the javax.sound.sampled.spi package. The present chapter discusses how to use the javax.sound.midi.spi package to provide new services for handling MIDI devices and files.

Applications programmers who only use existing MIDI services in their programs can safely skip this chapter. For an overview of MIDI and the use of the installed MIDI services in an application program, see Part II, "MIDI," of this Programmer's Guide. This chapter assumes that the reader is familiar with the Java Sound API methods that application programs invoke to access installed MIDI services.

Introduction

There are four abstract classes in the javax.sound.midi.spi package, which represent four different types of services that you can provide for the MIDI system:

  • MidiFileWriter provides MIDI file-writing services. These services make it possible for an application program to save, to a MIDI file, a MIDI Sequence that it has generated or processed.
  • MidiFileReader provides file-reading services that return a MIDI Sequence from a MIDI file for use in an application program.
  • MidiDeviceProvider supplies instances of one or more specific types of MIDI device, possibly including hardware devices.
  • SoundbankReader supplies soundbank file-reading services. Concrete subclasses of SoundbankReader parse a given soundbank file, producing a Soundbank object that can be loaded into a Synthesizer.

An application program will not directly create an instance of a service object—whether a provider object, such as a MidiDeviceProvider, or an object, such as a Synthesizer, that is supplied by the provider object. Nor will the program directly refer to the SPI classes. Instead, the application program makes requests to the MidiSystem object in the javax.sound.midi package, and MidiSystem in turn uses concrete subclasses of the javax.sound.midi.spi classes to process these requests.

Providing MIDI File-Writing Services

There are three standard MIDI file formats, all of which an implementation of the Java Sound API can support: Type 0, Type 1, and Type 2. These file formats differ in their internal representation of the MIDI sequence data in the file, and are appropriate for different kinds of sequences. If an implementation doesn't itself support all three types, a service provider can supply the support for the unimplemented ones. There are also variants of the standard MIDI file formats, some of them proprietary, which similarly could be supported by a third-party vendor.

The ability to write MIDI files is provided by concrete subclasses of MidiFileWriter. This abstract class is directly analogous to javax.sampled.spi.AudioFileWriter. Again, the methods are grouped into query methods for learning what types of files can be written, and methods for actually writing a file. As with AudioFileWriter, two of the query methods are concrete:

boolean isFileTypeSupported(int fileType)
boolean isFileTypeSupported(int fileType, Sequence sequence)
The first of these provides general information about whether the file writer can ever write the specified type of MIDI file type. The second method is more specific: it asks whether a particular Sequence can be written to the specified type of MIDI file. Generally, you don't need to override either of these two concrete methods. In the default implementation, each invokes one of two other corresponding query methods and iterates over the results returned. Being abstract, these other two query methods need to be implemented in the subclass:
abstract int[] getMidiFileTypes()
abstract int[] getMidiFileTypes(Sequence sequence)
The first of these returns an array of all the file types that are supported in general. A typical implementation might initialize the array in the file writer's constructor and return the array from this method. From that set of file types, the second method finds the subset to which the file writer can write the given Sequence. In accordance with the MIDI specification, not all types of sequences can be written to all types of MIDI files.

The write methods of a MidiFileWriter subclass perform the encoding of the data in a given Sequence into the correct data format for the requested type of MIDI file, writing the coded stream to either a file or an output stream:

abstract int write(Sequence in, int fileType,
                   java.io.File out)
abstract int write(Sequence in, int fileType,
                   java.io.OutputStream out)
To do this, the write method must parse the Sequence by iterating over its tracks, construct an appropriate file header, and write the header and tracks to the output. The MIDI file's header format is, of course, defined by the MIDI specification. It includes such information as a "magic number" identifying this as a MIDI file, the header's length, the number of tracks, and the sequence's timing information (division type and resolution). The rest of the MIDI file consists of the track data, in the format defined by the MIDI specification.

Let's briefly look at how the application program, MIDI system, and service provider cooperate in writing a MIDI file. In a typical situation, an application program has a particular MIDI Sequence to save to a file. The program queries the MidiSystem object to see what MIDI file formats, if any, are supported for the particular Sequence at hand, before attempting to write the file. The MidiSystem.getMidiFileTypes(Sequence) method returns an array of all the MIDI file types to which the system can write a particular sequence. It does this by invoking the corresponding getMidiFileTypes method for each of the installed MidiFileWriter services, and collecting and returning the results in an array of integers that can be thought of as a master list of all file types compatible with the given Sequence. When it comes to writing the Sequence to a file, the call to MidiSystem.write is passed an integer representing a file type, along with the Sequence to be written and the output file; MidiSystem uses the supplied type to decide which installed MidiFileWriter should handle the write request, and dispatches a corresponding write to the appropriate MidiFileWriter.

Providing MIDI File-Reading Services

The MidiFileReader abstract class is directly analogous to javax.sampled.spi.AudioFileReader class. Both consist of two overloaded methods, each of which can take a File, URL, or InputStream argument. The first of the overloaded methods returns the file format of a specified file. In the case of MidiFileReader, the API is:

abstract MidiFileFormat getMidiFileFormat(java.io.File file)
abstract MidiFileFormat getMidiFileFormat(
    java.io.InputStream stream)
abstract MidiFileFormat getMidiFileFormat(java.net.URL url)
Concrete subclasses must implement these methods to return a filled-out MidiFileFormat object describing the format of the specified MIDI file (or stream or URL), assuming that the file is of a type supported by the file reader and that it contains valid header information. Otherwise, an InvalidMidiDataException should be thrown.

The other overloaded method returns a MIDI Sequence from a given file, stream, or URL :

abstract Sequence getSequence(java.io.File file)
abstract Sequence getSequence(java.io.InputStream stream)
abstract Sequence getSequence(java.net.URL url)
The getSequence method performs the actual work of parsing the bytes in the MIDI input file and constructing a corresponding Sequence object. This is essentially the inverse of the process used by MidiFileWriter.write. Because there is a one-to-one correspondence between the contents of a MIDI file as defined by the MIDI specification and a Sequence object as defined by the Java Sound API, the details of the parsing are straightforward. If the file passed to getSequence contains data that the file reader can't parse (for example, because the file has been corrupted or doesn't conform to the MIDI specification), an InvalidMidiDataException should be thrown.

Providing Particular MIDI Devices

A MidiDeviceProvider can be considered a factory that supplies one or more particular types of MIDI device. The class consists of a method that returns an instance of a MIDI device, as well as query methods to learn what kinds of devices this provider can supply.

As with the other javax.sound.midi.spi services, application developers get indirect access to a MidiDeviceProvider service through a call to MidiSystem methods, in this case MidiSystem.getMidiDevice and MidiSystem.getMidiDeviceInfo. The purpose of subclassing MidiDeviceProvider is to supply a new kind of device, so the service developer must also create an accompanying class for the device being returned—just as we saw with MixerProvider in the javax.sound.sampled.spi package. There, the returned device's class implemented the javax.sound.sampled.Mixer interface; here it implements the javax.sound.midi.MidiDevice interface. It might also implement a subinterface of MidiDevice, such as Synthesizer or Sequencer.

Because a single subclass of MidiDeviceProvider can provide more than one type of MidiDevice, the getDeviceInfo method of the class returns an array of MidiDevice.Info objects enumerating the different MidiDevices available:

abstract MidiDevice.Info[] getDeviceInfo()

The returned array can contain a single element, of course. A typical implementation of the provider might initialize an array in its constructor and return it here. This allows MidiSystem to iterate over all installed MidiDeviceProviders to construct a list of all installed devices. MidiSystem can then return this list (MidiDevice.Info[] array) to an application program.

MidiDeviceProvider also includes a concrete query method:

boolean isDeviceSupported(MidiDevice.Info info)
This method permits the system to query the provider about a specific kind of device. Generally, you don't need to override this convenience method. The default implementation iterates over the array returned by getDeviceInfo and compares the argument to each element.

The third and final MidiDeviceProvider method returns the requested device:

abstract MidiDevice getDevice(MidiDevice.Info info)
This method should first test the argument to make sure it describes a device that this provider can supply. If it doesn't, it should throw an IllegalArgumentException. Otherwise, it returns the device.

Providing Soundbank File-Reading Services

A SoundBank is a set of Instruments that can be loaded into a Synthesizer. An Instrument is an implementation of a sound-synthesis algorithm that produces a particular sort of sound, and includes accompanying name and information strings. A SoundBank roughly corresponds to a bank in the MIDI specification, but it's a more extensive and addressable collection; it can perhaps better be thought of as a collection of MIDI banks. (For more background information on SoundBanks and Synthesizers, see Chapter 12, "Synthesizing Sound.")

SoundbankReader consists of a single overloaded method, which the system invokes to read a Soundbank object from a soundbank file:

abstract Soundbank getSoundbank(java.io.File file)
abstract Soundbank getSoundbank(java.io.InputStream stream)
abstract Soundbank getSoundbank(java.net.URL url)

Concrete subclasses of SoundbankReader will work in tandem with particular provider-defined implementations of SoundBank, Instrument, and Synthesizer to allow the system to load a SoundBank from a file into an instance of a particular Synthesizer class. Synthesis techniques may differ wildly from one Synthesizer to another, and, as a consequence, the data stored in an Instrument or SoundBank providing control or specification data for the synthesis process of a Synthesizer can take a variety of forms. One synthesis technique may require only a few bytes of parameter data; another may be based on extensive sound samples. The resources present in a SoundBank will depend upon the nature of the Synthesizer into which they get loaded, and therefore the implementation of the getSoundbank method of a SoundbankReader subclass has access to knowledge of a particular kind of SoundBank. In addition, a particular subclass of SoundbankReader understands a particular file format for storing the SoundBank data. That file format may be vendor-specific and proprietary.

SoundBank is just an interface, with only weak constraints on the contents of a SoundBank object. The methods an object must support to implement this interface (getResources, getInstruments, getVendor, getName, etc.) impose loose requirements on the data that the object contains. For example, getResources and getInstruments can return empty arrays. The actual contents of a subclassed SoundBank object, in particular its instruments and its non-instrument resources, are defined by the service provider. Thus, the mechanism of parsing a soundbank file depends entirely on the specification of that particular kind of soundbank file.

Soundbank files are created outside the Java Sound API, typically by the vendor of the synthesizer that can load that kind of soundbank. Some vendors might supply end-user tools for creating such files.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Providing Sampled-Audio Services

Documentation Contents

< Contents

Chapter 14: Providing Sampled-Audio Services

As discussed in Chapter 13, "Introduction to the Service Provider Interfaces," the Java Sound API includes two packages, javax.sound.sampled.spi and javax.sound.midi.spi, that define abstract classes to be used by developers of sound services. By implementing and installing a subclass of one of these abstract classes, a service provider registers the new service, extending the functionality of the runtime system. The present chapter tells you how to go about using the javax.sound.sampled.spi package to provide new services for handling sampled audio.

This chapter can be safely skipped by application programmers who merely wish to use existing audio services in their programs. For the use of the installed audio services in an application program, see Part I, "Sampled Audio," of this Programmer's Guide. This chapter assumes that the reader is familiar with the Java Sound API methods that application programs invoke to access installed audio services.

Introduction

There are four abstract classes in the javax.sound.sampled.spi package, representing four different types of services that you can provide for the sampled-audio system:

  • AudioFileWriter provides sound file-writing services. These services make it possible for an application program to write a stream of audio data to a file of a particular type.
  • AudioFileReader provides file-reading services. These services enable an application program to ascertain a sound file's characteristics, and to obtain a stream from which the file's audio data can be read.
  • FormatConversionProvider provides services for converting audio data formats. These services allow an application program to translate audio streams from one data format to another.
  • MixerProvider provides management of a particular kind of mixer. This mechanism allows an application program to obtain information about, and access instances of, a given kind of mixer.

To recapitulate the discussion in Chapter 13, service providers can extend the functionality of the runtime system. A typical SPI class has two types of methods: ones that respond to queries about the types of services available from a particular provider, and ones that either perform the new service directly, or return instances of objects that actually provide the service. The runtime environment's service-provider mechanism provides registration of installed services with the audio system, and management of the new service provider classes.

In essence there is a double isolation of the service instances from the application developer. An application program never directly creates instances of the service objects, such as mixers or format converters, that it needs for its audio processing tasks. Nor does the program even directly request these objects from the SPI classes that administer them. The application program makes requests to the AudioSystem object in the javax.sound.sampled package, and AudioSystem in turn uses the SPI objects to process these queries and service requests.

The existence of new audio services might be completely transparent to both the user and the application programmer. All application references are through standard objects of the javax.sound.sampled package, primarily AudioSystem, and the special handling that new services might be providing is often completely hidden.

In this chapter, we'll continue the previous chapter's convention of referring to new SPI subclasses by names like AcmeMixer and AcmeMixerProvider.

Providing Audio File-Writing Services

Let's start with AudioFileWriter, one of the simpler SPI classes.

A subclass that implements the methods of AudioFileWriter must provide implementations of a set of methods to handle queries about the file formats and file types supported by the class, as well as provide methods that actually write out a supplied audio data stream to a File or OutputStream.

AudioFileWriter includes two methods that have concrete implementations in the base class:

boolean isFileTypeSupported(AudioFileFormat.Type fileType)
boolean isFileTypeSupported(AudioFileFormat.Type fileType,
    AudioInputStream stream)
The first of these methods informs the caller whether this file writer can write sound files of the specified type. This method is a general inquiry, it will return true if the file writer can write that kind of file, assuming the file writer is handed appropriate audio data. However, the ability to write a file can depend on the format of the specific audio data that's handed to the file writer. A file writer might not support every audio data format, or the constraint might be imposed by the file format itself. (Not all kinds of audio data can be written to all kinds of sound files.) The second method is more specific, then, asking whether a particular AudioInputStream can be written to a particular type of file.

Generally, you won't need to override these two concrete methods. Each is simply a wrapper that invokes one of two other query methods and iterates over the results returned. These other two query methods are abstract and therefore need to be implemented in the subclass:

abstract AudioFileFormat.Type[] getAudioFileTypes()
abstract AudioFileFormat.Type[]
    getAudioFileTypes(AudioInputStream stream)
These methods correspond directly to the previous two. Each returns an array of all the supported file types-all that are supported in general, in the case of the first method, and all that are supported for a specific audio stream, in the case of the second method. A typical implementation of the first method might simply return an array that the file writer's constructor initializes. An implementation of the second method might test the stream's AudioFormat object to see whether it's a data format that the requested type of file supports.

The final two methods of AudioFileWriter do the actual file-writing work:

abstract  int write(AudioInputStream stream,
    AudioFileFormat.Type fileType, java.io.File out)
 abstract  int write(AudioInputStream stream,
    AudioFileFormat.Type fileType, java.io.OutputStream out)
These methods write a stream of bytes representing the audio data to the stream or file specified by the third argument. The details of how this is done depend on the structure of the specified type of file. The write method must write the file's header and the audio data in the manner prescribed for sound files of this format (whether it's a standard type of sound file or a new, possibly proprietary one).

Providing Audio File-Reading Services

The AudioFileReader class consists of six abstract methods that your subclass needs to implement-actually, two different overloaded methods, each of which can take a File, URL, or InputStream argument. The first of these overloaded methods accepts queries about the file format of a specified file:

abstract AudioFileFormat getAudioFileFormat(
    java.io.File file)
abstract AudioFileFormat getAudioFileFormat(
    java.io.InputStream stream)
abstract AudioFileFormat getAudioFileFormat(
    java.net.URL url)
A typical implementation of getAudioFileFormat method reads and parses the sound file's header to ascertain its file format. See the description of the AudioFileFormat class to see what fields need to be read from the header, and refer to the specification for the particular file type to figure out how to parse the header.

Because the caller providing a stream as an argument to this method expects the stream to be unaltered by the method, the file reader should generally start by marking the stream. After reading to the end of the header, it should reset the stream to its original position.

The other overloaded AudioFileReader method provides file-reading services, by returning an AudioInputStream from which the file's audio data can be read:

abstract AudioInputStream getAudioInputStream(
    java.io.File file)
abstract AudioInputStream getAudioInputStream(
     java.io.InputStream stream)
abstract AudioInputStream getAudioInputStream(
     java.net.URL url)
Typically, an implementation of getAudioInputStream returns an AudioInputStream wound to the beginning of the file's data chunk (after the header), ready for reading. It would be conceivable, though, for a file reader to return an AudioInputStream whose audio format represents a stream of data that is in some way decoded from what is contained in the file. The important thing is that the method return a formatted stream from which the audio data contained in the file can be read. The AudioFormat encapsulated in the returned AudioInputStream object will inform the caller about the stream's data format, which is usually, but not necessarily, the same as the data format in the file itself.

Generally, the returned stream is an instance of AudioInputStream; it's unlikely you would ever need to subclass AudioInputStream.

Providing Format-Conversion Services

A FormatConversionProvider subclass transforms an AudioInputStream that has one audio data format into one that has another format. The former (input) stream is referred to as the source stream, and the latter (output) stream is referred to as the target stream. Recall from Chapter 2, "Overview of the Sampled Package," that an AudioInputStream contains an AudioFormat, and the AudioFormat in turn contains a particular type of data encoding, represented by an AudioFormat.Encoding object. The format and encoding in the source stream are called the source format and source encoding, and those in the target stream are likewise called the target format and target encoding.

The work of conversion is performed in the overloaded abstract method of FormatConversionProvider called getAudioInputStream. The class also has abstract query methods for learning about all the supported target and source formats and encodings. There are concrete wrapper methods for querying about a specific conversion.

The two variants of getAudioInputStream are:

abstract AudioInputStream getAudioInputStream(
    AudioFormat.Encoding targetEncoding,
    AudioInputStream sourceStream)
and
abstract AudioInputStream getAudioInputStream(
    AudioFormat targetFormat,
    AudioInputStream sourceStream)
These differ in the first argument, according to whether the caller is specifying a complete target format or just the format's encoding.

A typical implementation of getAudioInputStream works by returning a new subclass of AudioInputStream that wraps around the original (source) AudioInputStream and applies a data format conversion to its data whenever a read method is invoked. For example, consider the case of a new FormatConversionProvider subclass called AcmeCodec, which works with a new AudioInputStream subclass called AcmeCodecStream.

The implementation of AcmeCodec's second getAudioInputStream method might be:

public AudioInputStream getAudioInputStream
      (AudioFormat outputFormat, AudioInputStream stream) {
        AudioInputStream cs = null;
        AudioFormat inputFormat = stream.getFormat();
        if (inputFormat.matches(outputFormat) ) {
            cs = stream;
        } else {
            cs = (AudioInputStream)
                (new AcmeCodecStream(stream, outputFormat));
            tempBuffer = new byte[tempBufferSize];
        }
        return cs;
    }
The actual format conversion takes place in new read methods of the returned AcmeCodecStream, a subclass of AudioInputStream. Again, application programs that access this returned AcmeCodecStream simply operate on it as an AudioInputStream, and don't need to know the details of its implementation.

The other methods of a FormatConversionProvider all permit queries about the input and output encodings and formats that the object supports. The following four methods, being abstract, need to be implemented:

abstract AudioFormat.Encoding[] getSourceEncodings()
abstract AudioFormat.Encoding[] getTargetEncodings()
abstract AudioFormat.Encoding[] getTargetEncodings(
    AudioFormat sourceFormat)
abstract  AudioFormat[] getTargetFormats(
    AudioFormat.Encoding targetEncoding,
    AudioFormat sourceFormat)

As in the query methods of the AudioFileReader class discussed above, these queries are typically handled by checking private data of the object and, for the latter two methods, comparing them against the argument(s).

The remaining four FormatConversionProvider methods are concrete and generally don't need to be overridden:

boolean isConversionSupported(
    AudioFormat.Encoding targetEncoding,
    AudioFormat sourceFormat)
boolean isConversionSupported(AudioFormat targetFormat,
    AudioFormat sourceFormat)
boolean isSourceEncodingSupported(
    AudioFormat.Encoding sourceEncoding)
boolean isTargetEncodingSupported(
    AudioFormat.Encoding targetEncoding)
As with AudioFileWriter.isFileTypeSupported(), the default implementation of each of these methods is essentially a wrapper that invokes one of the other query methods and iterates over the results returned.

Providing New Types of Mixers

As its name implies, a MixerProvider supplies instances of mixers. Each concrete MixerProvider subclass acts as a factory for the Mixer objects used by an application program. Of course, defining a new MixerProvider only makes sense if one or more new implementations of the Mixer interface are also defined. As in the FormatConversionProvider example above, where our getAudioInputStream method returned a subclass of AudioInputStream that performed the conversion, our new class AcmeMixerProvider has a method getMixer that returns an instance of another new class that implements the Mixer interface. We'll call the latter class AcmeMixer. Particularly if the mixer is implemented in hardware, the provider might support only one static instance of the requested device. If so, it should return this static instance in response to each invocation of getMixer.

Since AcmeMixer supports the Mixer interface, application programs don't require any additional information to access its basic functionality. However, if AcmeMixer supports functionality not defined in the Mixer interface, and the vendor wants to make this extended functionality accessible to application programs, the mixer should of course be defined as a public class with additional, well-documented public methods, so that a program that wishes to make use of this extended functionality can import AcmeMixer and cast the object returned by getMixer to this type.

The other two methods of MixerProvider are:

abstract Mixer.Info[] getMixerInfo()
and
boolean isMixerSupported(Mixer.Info info)
These methods allow the audio system to determine whether this particular provider class can produce a device that an application program needs. In other words, the AudioSystem object can iterate over all the installed MixerProviders to see which ones, if any, can supply the device that the application program has requested of the AudioSystem. (See the discussion under "Getting a Mixer" in Chapter 3, "Accessing Audio System Resources.") The getMixerInfo method returns an array of objects containing information about the kinds of mixer available from this provider object. The system can pass these information objects, along with those from other providers, to an application program.

A single MixerProvider can provide more than one kind of mixer. When the system invokes the MixerProvider's getMixerInfo method, it gets a list of information objects identifying the different kinds of mixer that this provider supports. The system can then invoke MixerProvider.getMixer(Mixer.Info) to obtain each mixer of interest.

Your subclass needs to implement getMixerInfo, as it's abstract. The isMixerSupported method is concrete and doesn't generally need to be overridden. The default implementation simply compares the provided Mixer.Info to each one in the array returned by getMixerInfo.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Synthesizing Sound

Documentation Contents

< Contents

Chapter 12: Synthesizing Sound

Most programs that avail themselves of the Java Sound API's MIDI package do so to synthesize sound. The entire apparatus of MIDI files, events, sequences, and sequencers, which was discussed in other chapters, nearly always has the goal of eventually sending musical data to a synthesizer to convert into audio. (Possible exceptions include programs that convert MIDI into musical notation that can be read by a musician, and programs that send messages to external MIDI-controlled devices such as mixing consoles.)

The Synthesizer interface is therefore fundamental to the MIDI package. This chapter shows how to manipulate a synthesizer to play sound. Many programs will simply use a sequencer to send MIDI file data to the synthesizer, and won't need to invoke many Synthesizer methods directly. However, it's possible to control a synthesizer directly, without using sequencers or even MidiMessage objects, as explained near the end of this chapter.

The synthesis architecture might seem complex for readers who are unfamiliar with MIDI. Its API includes three interfaces:

  • Synthesizer
  • MidiChannel
  • Soundbank

and four classes:
  • Instrument
  • Patch
  • SoundbankResource
  • VoiceStatus

As orientation for all this API, the next section explains some of the basics of MIDI synthesis and how they're reflected in the Java Sound API. (Also see the brief section "Synthesizers" under "The Java Sound API's Representation of MIDI Devices" in Chapter 8, "Overview of the MIDI Package.") Subsequent sections give a more detailed look at the API.

Understanding MIDI Synthesis

How does a synthesizer generate sound? Depending on its implementation, it may use one or more sound-synthesis techniques. For example, many synthesizers use wavetable synthesis. A wavetable synthesizer reads stored snippets of audio from memory, playing them at different sample rates and looping them to create notes of different pitches and durations. For example, to synthesize the sound of a saxophone playing the note C#a4 (MIDI note number 61), the synthesizer might access a very short snippet from a recording of a saxophone playing the note Middle C (MIDI note number 60), and then cycle repeatedly through this snippet at a slightly faster sample rate than it was recorded at, which creates a long note of a slightly higher pitch. Other synthesizers use techniques such as frequency modulation (FM), additive synthesis, or physical modeling, which don't make use of stored audio but instead generate audio from scratch using different algorithms.

Instruments

What all synthesis techniques have in common is the ability to create many sorts of sounds. Different algorithms, or different settings of parameters within the same algorithm, create different-sounding results. An instrument is a specification for synthesizing a certain type of sound. That sound may emulate a traditional musical instrument, such as a piano or violin; it may emulate some other kind of sound source, for instance, a telephone or helicopter; or it may emulate no "real-world" sound at all. A specification called General MIDI defines a standard list of 128 instruments, but most synthesizers allow other instruments as well. Many synthesizers provide a collection of built-in instruments that are always available for use; some synthesizers also support mechanisms for loading additional instruments.

An instrument may be vendor-specific—in other words, applicable to only one synthesizer or several models from the same vendor. This incompatibility results when two different synthesizers use different sound-synthesis techniques, or different internal algorithms and parameters even if the fundamental technique is the same. Because the details of the synthesis technique are often proprietary, incompatibility is common. The Java Sound API includes ways to detect whether a given synthesizer supports a given instrument.

An instrument can usually be considered a preset; you don't have to know anything about the details of the synthesis technique that produces its sound. However, you can still vary aspects of its sound. Each Note On message specifies the pitch and volume of an individual note. You can also alter the sound through other MIDI commands such as controller messages or system-exclusive messages.

Channels

Many synthesizers are multimbral (sometimes called polytimbral), meaning that they can play the notes of different instruments simultaneously. (Timbre is the characteristic sound quality that enables a listener to distinguish one kind of musical instrument from other kinds.) Multimbral synthesizers can emulate an entire ensemble of real-world instruments, instead of only one instrument at a time. MIDI synthesizers normally implement this feature by taking advantage of the different MIDI channels on which the MIDI specification allows data to be transmitted. In this case, the synthesizer is actually a collection of sound-generating units, each emulating a different instrument and responding independently to messages that are received on a different MIDI channel. Since the MIDI specification provides only 16 channels, a typical MIDI synthesizer can play up to 16 different instruments at once. The synthesizer receives a stream of MIDI commands, many of which are channel commands. (Channel commands are targeted to a particular MIDI channel; for more information, see the MIDI specification.) If the synthesizer is multitimbral, it routes each channel command to the correct sound-generating unit, according to the channel number indicated in the command.

In the Java Sound API, these sound-generating units are instances of classes that implement the MidiChannel interface. A synthesizer object has at least one MidiChannel object. If the synthesizer is multimbral, it has more than one, normally 16. Each MidiChannel represents an independent sound-generating unit.

Because a synthesizer's MidiChannel objects are more or less independent, the assignment of instruments to channels doesn't have to be unique. For example, all 16 channels could be playing a piano timbre, as though there were an ensemble of 16 pianos. Any grouping is possible—for instance, channels 1, 5, and 8 could be playing guitar sounds, while channels 2 and 3 play percussion and channel 12 has a bass timbre. The instrument being played on a given MIDI channel can be changed dynamically; this is known as a program change.

Even though most synthesizers allow only 16 or fewer instruments to be active at a given time, these instruments can generally be chosen from a much larger selection and assigned to particular channels as required.

Soundbanks and Patches

Instruments are organized hierarchically in a synthesizer. As was mentioned in Chapter 8, "Overview of the MIDI Package," the instruments are arranged by bank number and program number. Banks and programs can be thought of as rows and columns in a two-dimensional table of instruments. A bank is a collection of programs. The MIDI specification allows up to 128 programs in a bank, and up to 128 banks. However, a particular synthesizer might support only one bank, or a few banks, and might support fewer than 128 programs per bank.

In the Java Sound API, there's a higher level to the hierarchy: a soundbank. Soundbanks can contain up to 128 banks, each containing up to 128 instruments. Some synthesizers can load an entire soundbank into memory.

To select an instrument from the current soundbank, you specify a bank number and a program number. The MIDI specification accomplishes this with two MIDI commands: bank select and program change. In the Java Sound API, the combination of a bank number and program number is encapsulated in a Patch object. You change a MIDI channel's current instrument by specifying a new patch. The patch can be considered the two-dimensional index of the instruments in the current soundbank.

You might be wondering if soundbanks, too, are indexed numerically. The answer is no; the MIDI specification does not provide for this. In the Java Sound API, a Soundbank object can be obtained by reading a soundbank file. If the soundbank is supported by the synthesizer, its instruments can be loaded into the synthesizer individually as desired, or all at once. Many synthesizers have a built-in or default soundbank; the instruments contained in this soundbank are always available to the synthesizer.

Voices

It's important to distinguish between the number of timbres a synthesizer can play simultaneously and the number of notes it can play simultaneously. The former was described above under "Channels." The ability to play multiple notes at once is referred to as polyphony. Even a synthesizer that isn't multitimbral can generally play more than one note at a time (all having the same timbre, but different pitches). For example, playing any chord, such as a G major triad or a B minor seventh chord, requires polyphony. Any synthesizer that generates sound in real time has a limitation on the number of notes it can synthesize at once. In the Java Sound API, the synthesizer reports this limitation through the getMaxPolyphony method.

A voice is a succession of single notes, such as a melody that a person can sing. Polyphony consists of multiple voices, such as the parts sung by a choir. A 32-voice synthesizer, for example, can play 32 notes simultaneously. (However, some MIDI literature uses the word "voice" in a different sense, similar to the meaning of "instrument" or "timbre.")

The process of assigning incoming MIDI notes to specific voices is known as voice allocation. A synthesizer maintains a list of voices, keeping track of which ones are active (meaning that they currently have notes sounding). When a note stops sounding, the voice becomes inactive, meaning that it's now free to accept the next note-on request that the synthesizer receives. An incoming stream of MIDI commands can easily request more simultaneous notes than the synthesizer is capable of generating. When all the synthesizer's voices are active, how should the next Note On request be handled? Synthesizers can implement different strategies: the most recently requested note can be ignored; or it can be played by discontinuing another note, such as the least recently started one.

Although the MIDI specification does not require it, a synthesizer can make public the contents of each of its voices. The Java Sound API includes a VoiceStatus class for this purpose.

A VoiceStatus reports on the voice's current active or inactive status, MIDI channel, bank and program number, MIDI note number, and MIDI volume.

With this background, let's examine the specifics of the Java Sound API for synthesis.

Managing Instruments and Soundbanks

In many cases, a program can make use of a Synthesizer object without explicitly invoking almost any of the synthesis API. For example, suppose you're playing a standard MIDI file. You load it into a Sequence object, which you play by having a sequencer send the data to the default synthesizer. The data in the sequence controls the synthesizer as intended, playing all the right notes at the right times.

However, there are cases when this simple scenario is inadequate. The sequence contains the right music, but the instruments sound all wrong! This unfortunate situation probably arose because the creator of the MIDI file had different instruments in mind than the ones that are currently loaded into the synthesizer.

The MIDI 1.0 Specification provides for bank-select and program-change commands, which affect which instrument is currently playing on each MIDI channel. However, the specification does not define what instrument should reside in each patch location (bank and program number). The more recent General MIDI specification addresses this problem by defining a bank containing 128 programs that correspond to specific instrument sounds. A General MIDI synthesizer uses 128 instruments that match this specified set. Different General MIDI synthesizers can sound quite different, even when playing what's supposed to be the same instrument. However, a MIDI file should for the most part sound similar (even if not identical), no matter which General MIDI synthesizer is playing it.

Nonetheless, not all creators of MIDI files want to be limited to the set of 128 timbres defined by General MIDI. This section shows how to change the instruments from the default set that the synthesizer comes with. (If there is no default, meaning that no instruments are loaded when you access the synthesizer, you'll have to use this API to start with in any case.)

Learning What Instruments Are Loaded

To learn whether the instruments currently loaded into the synthesizer are the ones you want, you can invoke this Synthesizer method:

Instrument[] getLoadedInstruments()
and iterate over the returned array to see exactly which instruments are currently loaded. Most likely, you would display the instruments' names in the user interface (using the getName method of Instrument), and let the user decide whether to use those instruments or load others. The Instrument API includes a method that reports which soundbank the instrument belongs to. The soundbank's name might help your program or the user ascertain exactly what the instrument is.

This Synthesizer method:

Soundbank getDefaultSoundbank()
gives you the default soundbank. The Soundbank API includes methods to retrieve the soundbank's name, vendor, and version number, by which the program or the user can verify the bank's identity. However, you can't assume when you first get a synthesizer that the instruments from the default soundbank have been loaded into the synthesizer. For example, a synthesizer might have a large assortment of built-in instruments available for use, but because of its limited memory it might not load them automatically.

Loading Different Instruments

The user might decide to load instruments that are different from the current ones (or you might make that decision programmatically). The following method tells you which instruments come with the synthesizer (versus having to be loaded from soundbank files):

Instrument[] getAvailableInstruments()
You can load any of these instruments by invoking:
boolean loadInstrument(Instrument instrument)
The instrument gets loaded into the synthesizer in the location specified by the instrument's Patch object (which can be retrieved using the getPatch method of Instrument).

To load instruments from other soundbanks, first invoke Synthesizer's isSupportedSoundbank method to make sure that the soundbank is compatible with this synthesizer (if it isn't, you can iterate over the system's synthesizers to try to find one that supports the soundbank). You can then invoke one of these methods to load instruments from the soundbank:

boolean loadAllInstruments(Soundbank soundbank)
boolean loadInstruments(Soundbank soundbank,
  Patch[] patchList)
As the names suggest, the first of these loads the entire set of instruments from a given soundbank, and the second loads selected instruments from the soundbank. You could also use Soundbank's getInstruments method to access all the instruments, then iterate over them and load selected instruments one at a time using loadInstrument.

It's not necessary for all the instruments you load to be from the same soundbank. You could use loadInstrument or loadInstruments to load certain instruments from one soundbank, another set from a different soundbank, and so on.

Each instrument has its own Patch object that specifies the location on the synthesizer where the instrument should be loaded. The location is defined by a bank number and a program number. There's no API to change the location by changing the patch's bank or program number.

However, it is possible to load an instrument into a location other than the one specified by its patch, using the following method of Synthesizer:

boolean remapInstrument(Instrument from, Instrument to)
This method unloads its first argument from the synthesizer, and places its second argument in whatever synthesizer patch location had been occupied by the first argument.

Unloading Instruments

Loading an instrument into a program location automatically unloads whatever instrument was already at that location, if any. You can also explicitly unload instruments without necessarily replacing them with new ones. Synthesizer includes three unloading methods that correspond to the three loading methods. If the synthesizer receives a program-change message that selects a program location where no instrument is currently loaded, there won't be any sound from the MIDI channel on which the program-change message was sent.

Accessing Soundbank Resources

Some synthesizers store other information besides instruments in their soundbanks. For example, a wavetable synthesizer stores audio samples that one or more instruments can access. Because the samples might be shared by multiple instruments, they're stored in the soundbank independently of any instrument. Both the Soundbank interface and the Instrument class provide a method call getSoundbankResources, which returns a list of SoundbankResource objects. The details of these objects are specific to the synthesizer for which the soundbank is designed. In the case of wavetable synthesis, a resource might be an object that encapsulates a series of audio samples, taken from one snippet of a sound recording. Synthesizers that use other synthesis techniques might store other kinds of objects in the synthesizer's SoundbankResources array.

Querying the Synthesizer's Capabilities and Current State

The Synthesizer interface includes methods that return information about the synthesizer's capabilities:

    public long getLatency()
    public int getMaxPolyphony()
The latency measures the worst-case delay between the time a MIDI message is delivered to the synthesizer and the time that the synthesizer actually produces the corresponding result. For example, it might take a synthesizer a few milliseconds to begin generating audio after receiving a note-on event.

The getMaxPolyphony method indicates how many notes the synthesizer can sound simultaneously, as discussed under "Voices" in the section "Understanding MIDI Synthesis" earlier in this chapter. As mentioned in the same discussion, a synthesizer can provide information about its voices. This is accomplished through the following method:

public VoiceStatus[] getVoiceStatus()
Each VoiceStatus in the returned array reports the voice's current active or inactive status, MIDI channel, bank and program number, MIDI note number, and MIDI volume. The array's length should normally be the same number returned by getMaxPolyphony. If the synthesizer isn't playing, all its VoiceStatus objects have their active field set to false.

You can learn additional information about the current status of a synthesizer by retrieving its MidiChannel objects and querying their state. This is discussed more in the next section.

Using Channels

Sometimes it's useful or necessary to access a synthesizer's MidiChannel objects directly. This section discusses such situations.

Controlling the Synthesizer without Using a Sequencer

When using a sequence, such as one read from a MIDI file, you don't need to send MIDI commands to the synthesizer yourself. Instead, you just load the sequence into a sequencer, connect the sequencer to the synthesizer, and let it run. The sequencer takes care of scheduling the events, and the result is a predictable musical performance. This scenario works fine when the desired music is known in advance, which is true when it's read from a file.

In some situations, however, the music is generated on the fly as it's playing. For example, the user interface might display a musical keyboard or a guitar fretboard and let the user play notes at will by clicking with the mouse. As another example, an application might use a synthesizer not to play music per se, but to generate sound effects in response to the user's actions. This scenario is typical of games. As a final example, the application might indeed be playing music that's read from a file, but the user interface allows the user to interact with the music, altering it dynamically. In all these cases, the application sends commands directly to the synthesizer, since the MIDI messages need to be delivered immediately, instead of being scheduled for some determinate point in the future.

There are at least two ways of sending a MIDI message to the synthesizer without using a sequencer. The first is to construct a MidiMessage and pass it to the synthesizer using the send method of Receiver. For example, to produce a Middle C (MIDI note number 60) on MIDI channel 5 (one-based) immediately, you could do the following:

    ShortMessage myMsg = new ShortMessage();
    // Play the note Middle C (60) moderately loud
    // (velocity = 93)on channel 4 (zero-based).
    myMsg.setMessage(ShortMessage.NOTE_ON, 4, 60, 93);
    Synthesizer synth = MidiSystem.getSynthesizer();
    Receiver synthRcvr = synth.getReceiver();
    synthRcvr.send(myMsg, -1); // -1 means no time stamp
The second way is to bypass the message-passing layer (that is, the MidiMessage and Receiver API) altogether, and interact with the synthesizer's MidiChannel objects directly. You first need to retrieve the synthesizer's MidiChannel objects, using the following Synthesizer method:
public MidiChannel[] getChannels()
after which you can invoke the desired MidiChannel methods directly. This is a more immediate route than sending the corresponding MidiMessages to the synthesizer's Receiver and letting the synthesizer handle the communication with its own MidiChannels. For example, the code corresponding to the preceding example would be:
    Synthesizer synth = MidiSystem.getSynthesizer();
    MidiChannel chan[] = synth.getChannels();
    // Check for null; maybe not all 16 channels exist.
    if (chan[4] != null) {
         chan[4].noteOn(60, 93);
    }

Getting a Channel's Current State

The MidiChannel interface provides methods that correspond one-to-one to each of the "channel voice" or "channel mode" messages defined by the MIDI specification. We saw one case with the use of the noteOn method in the previous example. However, in addition to these canonical methods, the Java Sound API's MidiChannel interface adds some "get" methods to retrieve the value most recently set by corresponding voice or mode "set" methods:

    int       getChannelPressure()
    int       getController(int controller)
    boolean   getMono()
    boolean   getOmni()
    int       getPitchBend()
    int       getPolyPressure(int noteNumber)
    int       getProgram()
These methods might be useful for displaying channel state to the user, or for deciding what values to send subsequently to the channel.

Muting and Soloing a Channel

The Java Sound API adds the notions of per-channel solo and mute, which are not required by the MIDI specification. These are similar to the solo and mute on the tracks of a MIDI sequence. (See "Muting or Soloing Individual Tracks in the Sequence" in Chapter 11, "Playing, Recording, and Editing MIDI Sequences.)"

If mute is on, this channel will not sound, but other channels are unaffected. If solo is on, this channel, and any other soloed channel, will sound (if it isn't muted), but no other channels will sound. A channel that is both soloed and muted will not sound. The MidiChannel API includes four methods:

    boolean      getMute()
    boolean      getSolo()
    void         setMute(boolean muteState)
    void         setSolo(boolean soloState)

Permission to Play Synthesized Sound

The audio produced by any installed MIDI synthesizer is typically routed through the sampled-audio system. If your program doesn't have permission to play audio, the synthesizer's sound won't be heard, and a security exception will be thrown. For more information on audio permissions, see "Permission to Use Audio Resources" in Chapter 3, "Accessing Audio System Resources."

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Transmitting and Receiving MIDI Messages

Documentation Contents

< Contents

Chapter 10: Transmitting and Receiving MIDI Messages

Understanding Devices, Transmitters, and Receivers

The Java Sound API specifies a message-routing architecture for MIDI data that's flexible and easy to use, once you understand how it works. The system is based on a module-connection design: distinct modules, each of which performs a specific task, can be interconnected (networked), enabling data to flow from one module to another.

The base module in the Java Sound API's messaging system is MidiDevice (a Java language interface). MidiDevices include sequencers (which record, play, load, and edit sequences of time-stamped MIDI messages), synthesizers (which generate sounds when triggered by MIDI messages), and MIDI input and output ports, through which data comes from and goes to external MIDI devices. The functionality typically required of MIDI ports is described by the base MidiDevice interface. The Sequencer and Synthesizer interfaces extend the MidiDevice interface to describe the additional functionality characteristic of MIDI sequencers and synthesizers, respectively. Concrete classes that function as sequencers or synthesizers should implement these interfaces.

A MidiDevice typically owns one or more ancillary objects that implement the Receiver or Transmitter interfaces. These interfaces represent the "plugs" or "portals" that connect devices together, permitting data to flow into and out of them. By connecting a Transmitter of one MidiDevice to a Receiver of another, you can create a network of modules in which data flows from one to another.

The MidiDevice interface includes methods for determining how many transmitter and receiver objects the device can support concurrently, and other methods for accessing those objects. A MIDI output port normally has at least one Receiver through which the outgoing messages may be received; similarly, a synthesizer normally responds to messages sent to its Receiver or Receivers. A MIDI input port normally has at least one Transmitter, which propagates the incoming messages. A full-featured sequencer supports both Receivers, which receive messages during recording, and Transmitters, which send messages during playback.

The Transmitter interface includes methods for setting and querying the receivers to which the transmitter sends its MidiMessages. Setting the receiver establishes the connection between the two. The Receiver interface contains a method that sends a MidiMessage to the receiver. Typically, this method is invoked by a Transmitter. Both the Transmitter and Receiver interfaces include a close method that frees up a previously connected transmitter or receiver, making it available for a different connection.

We'll now examine how to use transmitters and receivers. Before getting to the typical case of connecting two devices (such as hooking a sequencer to a synthesizer), we'll examine the simpler case where you send a MIDI message directly from your application program to a device. Studying this simple scenario should make it easier to understand how the Java Sound API arranges for sending MIDI messages between two devices.

Sending a Message to a Receiver without Using a Transmitter

Let's say you want to create a MIDI message from scratch and then send it to some receiver. You can create a new, blank ShortMessage and then fill it with MIDI data using the following ShortMessage method:

void setMessage(int command, int channel, int data1,
         int data2)

Once you have a message ready to send, you can send it to a Receiver object, using this Receiver method:

void send(MidiMessage message, long timeStamp)

The time-stamp argument will be explained momentarily. For now, we'll just mention that its value can be set to -1 if you don't care about specifying a precise time. In this case, the device receiving the message will try to respond to the message as soon as possible.

An application program can obtain a receiver for a MidiDevice by invoking the device's getReceiver method. If the device can't provide a receiver to the program (typically because all the device's receivers are already in use), a MidiUnavailableException is thrown. Otherwise, the receiver returned from this method is available for immediate use by the program. When the program has finished using the receiver, it should call the receiver's close method. If the program attempts to invoke methods on a receiver after calling close, an IllegalStateException may be thrown.

As a concrete simple example of sending a message without using a transmitter, let's send a Note On message to the default receiver, which is typically associated with a device such as the MIDI output port or a synthesizer. We do this by creating a suitable ShortMessage and passing it as an argument to Receiver's send method:

  ShortMessage myMsg = new ShortMessage();
  // Start playing the note Middle C (60),
  // moderately loud (velocity = 93).
  myMsg.setMessage(ShortMessage.NOTE_ON, 0, 60, 93);
  long timeStamp = -1;
  Receiver       rcvr = MidiSystem.getReceiver();
  rcvr.send(myMsg, timeStamp);

This code uses a static integer field of ShortMessage, namely, NOTE_ON, for use as the MIDI message's status byte. The other parts of the MIDI message are given explicit numeric values as arguments to the setMessage method. The zero indicates that the note is to be played using MIDI channel number 1; the 60 indicates the note Middle C; and the 93 is an arbitrary key-down velocity value, which typically indicates that the synthesizer that eventually plays the note should play it somewhat loudly. (The MIDI specification leaves the exact interpretation of velocity up to the synthesizer's implementation of its current instrument.) This MIDI message is then sent to the receiver with a time stamp of -1. We now need to examine exactly what the time stamp parameter means, which is the subject of the next section.

Understanding Time Stamps

Chapter 8, "Overview of the MIDI Package," explained that the MIDI specification has different parts. One part describes MIDI "wire" protocol (messages sent between devices in real time), and another part describes Standard MIDI Files (messages stored as events in "sequences"). In the latter part of the specification, each event stored in a standard MIDI file is tagged with a timing value that indicates when that event should be played. By contrast, messages in MIDI wire protocol are always supposed to be processed immediately, as soon as they're received by a device, so they have no accompanying timing values.

The Java Sound API adds an additional twist. It comes as no surprise that timing values are present in the MidiEvent objects that are stored in sequences (as might be read from a MIDI file), just as in the Standard MIDI Files specification. But in the Java Sound API, even the messages sent between devices—in other words, the messages that correspond to MIDI wire protocol—can be given timing values, known as time stamps. It is these time stamps that concern us here. (The timing values in MidiEvent objects are discussed in detail in Chapter 11, "Playing, Recording, and Editing MIDI Sequences.")

Time Stamps on Messages Sent to Devices

The time stamp that can optionally accompany messages sent between devices in the Java Sound API is quite different from the timing values in a standard MIDI file. The timing values in a MIDI file are often based on musical concepts such as beats and tempo, and each event's timing measures the time elapsed since the previous event. In contrast, the time stamp on a message sent to a device's Receiver object always measures absolute time in microseconds. Specifically, it measures the number of microseconds elapsed since the device that owns the receiver was opened.

This kind of time stamp is designed to help compensate for latencies introduced by the operating system or by the application program. It's important to realize that these time stamps are used for minor adjustments to timing, not to implement complex queues that can schedule events at completely arbitrary times (as MidiEvent timing values do).

The time stamp on a message sent to a device (through a Receiver) can provide precise timing information to the device. The device might use this information when it processes the message. For example, it might adjust the event's timing by a few milliseconds to match the information in the time stamp. On the other hand, not all devices support time stamps, so the device might completely ignore the message's time stamp.

Even if a device supports time stamps, it might not schedule the event for exactly the time that you requested. You can't expect to send a message whose time stamp is very far in the future and have the device handle it as you intended, and you certainly can't expect a device to correctly schedule a message whose time stamp is in the past! It's up to the device to decide how to handle time stamps that are too far off in the future or are in the past. The sender doesn't know what the device considers to be too far off, or whether the device had any problem with the time stamp. This ignorance mimics the behavior of external MIDI hardware devices, which send messages without ever knowing whether they were received correctly. (MIDI wire protocol is unidirectional.)

Some devices send time-stamped messages (via a Transmitter). For example, the messages sent by a MIDI input port might be stamped with the time the incoming message arrived at the port. On some systems, the event-handling mechanisms cause a certain amount of timing precision to be lost during subsequent processing of the message. The message's time stamp allows the original timing information to be preserved.

To learn whether a device supports time stamps, invoke the following method of MidiDevice:

    long getMicrosecondPosition()

This method returns -1 if the device ignores time stamps. Otherwise, it returns the device's current notion of time, which you as the sender can use as an offset when determining the time stamps for messages you subsequently send. For example, if you want to send a message with a time stamp for five milliseconds in the future, you can get the device's current position in microseconds, add 5000 microseconds, and use that as the time stamp. Keep in mind that the MidiDevice's notion of time always places time zero at the time the device was opened.

Now, with all that explanation of time stamps as a background, let's return to the send method of Receiver:

void send(MidiMessage message, long timeStamp)

The timeStamp argument is expressed in microseconds, according to the receiving device's notion of time. If the device doesn't support time stamps, it simply ignores the timeStamp argument. You aren't required to time-stamp the messages you send to a receiver. You can use -1 for the timeStamp argument to indicate that you don't care about adjusting the exact timing; you're just leaving it up to the receiving device to process the message as soon as it can. However, it's not advisable to send -1 with some messages and explicit time stamps with other messages sent to the same receiver. Doing so is likely to cause irregularities in the resultant timing.

Connecting Transmitters to Receivers

We've seen how you can send a MIDI message directly to a receiver, without using a transmitter. Now let's look at the more common case, where you aren't creating MIDI messages from scratch, but are simply connecting devices together so that one of them can send MIDI messages to the other.

Connecting to a Single Device

The specific case we'll take as our first example is connecting a sequencer to a synthesizer. After this connection is made, starting the sequencer running will cause the synthesizer to generate audio from the events in the sequencer's current sequence. For now, we'll ignore the process of loading a sequence from a MIDI file into the sequencer. Also, we won't go into the mechanism of playing the sequence. Loading and playing sequences is discussed in detail in Chapter 11, "Playing, Recording, and Editing MIDI Sequences." Loading instruments into the synthesizer is discussed in Chapter 12, "Synthesizing Sound." For now, all we're interested in is how to make the connection between the sequencer and the synthesizer. This will serve as an illustration of the more general process of connecting one device's transmitter to another device's receiver.

For simplicity, we'll use the default sequencer and the default synthesizer. (See Chapter 9, "Accessing MIDI System Resources," for more about default devices and how to access non-default devices.)

    Sequencer          seq;
    Transmitter         seqTrans;
    Synthesizer         synth;
    Receiver         synthRcvr;
    try {
          seq     = MidiSystem.getSequencer();
          seqTrans = seq.getTransmitter();
          synth   = MidiSystem.getSynthesizer();
          synthRcvr = synth.getReceiver();
          seqTrans.setReceiver(synthRcvr);
    } catch (MidiUnavailableException e) {
          // handle or throw exception
    }

An implementation might actually have a single object that serves as both the default sequencer and the default synthesizer. In other words, the implementation might use a class that implements both the Sequencer interface and the Synthesizer interface. In that case, it probably wouldn't be necessary to make the explicit connection that we did in the code above. For portability, though, it's safer not to assume such a configuration. If desired, you can test for this condition, of course:

if (seq instanceof Synthesizer)

although the explicit connection above should work in any case.

Connecting to More than One Device

The previous code example illustrated a one-to-one connection between a transmitter and a receiver. But, what if you need to send the same MIDI message to multiple receivers? For example, suppose you want to capture MIDI data from an external device to drive the internal synthesizer while simultaneously recording the data to a sequence. This form of connection, sometimes referred to as "fan out" or as a "splitter," is straightforward. The following statements show how to create a fan-out connection, through which the MIDI messages arriving at the MIDI input port are sent to both a Synthesizer object and a Sequencer object. We assume you've already obtained and opened the three devices: the input port, sequencer, and synthesizer. (To obtain the input port, you'll need to iterate over all the items returned by MidiSystem.getMidiDeviceInfo.)

    Synthesizer  synth;
    Sequencer    seq;
    MidiDevice   inputPort;
    // [obtain and open the three devices...]
    Transmitter   inPortTrans1, inPortTrans2;
    Receiver            synthRcvr;
    Receiver            seqRcvr;
    try {
          inPortTrans1 = inputPort.getTransmitter();
          synthRcvr = synth.getReceiver();
          inPortTrans1.setReceiver(synthRcvr);
          inPortTrans2 = inputPort.getTransmitter();
          seqRcvr = seq.getReceiver();
          inPortTrans2.setReceiver(seqRcvr);
    } catch (MidiUnavailableException e) {
          // handle or throw exception
    }

This code introduces a dual invocation of the MidiDevice.getTransmitter method, assigning the results to inPortTrans1 and inPortTrans2. As mentioned earlier, a device can own multiple transmitters and receivers. Each time MidiDevice.getTransmitter() is invoked for a given device, another transmitter is returned, until no more are available, at which time an exception will be thrown.

To learn how many transmitters and receivers a device supports, you can use the following MidiDevice method:

    int getMaxTransmitters()
    int getMaxReceivers()

These methods return the total number owned by the device, not the number currently available.

A transmitter can transmit MIDI messages to only one receiver at a time. (Every time you call Transmitter's setReceiver method, the existing Receiver, if any, is replaced by the newly specified one. You can tell whether the transmitter currently has a receiver by invoking Transmitter.getReceiver.) However, if a device has multiple transmitters, it can send data to more than one device at a time, by connecting each transmitter to a different receiver, as we saw in the case of the input port above.

Similarly, a device can use its multiple receivers to receive from more than one device at a time. The multiple-receiver code that's required is straightforward, being directly analogous to the multiple-transmitter code above. It's also possible for a single receiver to receive messages from more than one transmitter at a time.

Closing Connections

Once you're done with a connection, you can free up its resources by invoking the close method for each transmitter and receiver that you've obtained. The Transmitter and Receiver interfaces each have a close method. Note that invoking Transmitter.setReceiver doesn't close the transmitter's current receiver. The receiver is left open, and it can still receive messages from any other transmitter that's connected to it.

If you're also done with the devices, you can similarly make them available to other application programs by invoking MidiDevice.close(). Closing a device automatically closes all its transmitters and receivers.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Using Files and Format Converters

Documentation Contents

< Contents

Chapter 7: Using Files and Format Converters

Most application programs that deal with sound need to read sound files or audio streams. This is common functionality, regardless of what the program may subsequently do with the data it reads (such as play, mix, or process it). Similarly, many programs need to write sound files (or streams). In some cases, the data that has been read (or that will be written) needs to be converted to a different format.

As was briefly mentioned in Chapter 3, "Accessing Audio System Resources," the Java Sound API provides application developers with various facilities for file input/output and format translations. Application programs can read, write, and translate between a variety of sound file formats and audio data formats.

Chapter 2, "Overview of the Sampled Package," introduced the main classes related to sound files and audio data formats. As a review:

  • A stream of audio data, as might be read from or written to a file, is represented by an AudioInputStream object. (AudioInputStream inherits from java.io.InputStream.)
  • The format of this audio data is represented by an AudioFormat object.

    This format specifies how the audio samples themselves are arranged, but not the structure of a file that they might be stored in. In other words, an AudioFormat describes "raw" audio data, such as the system might hand your program after capturing it from a microphone input or after parsing it from a sound file. An AudioFormat includes such information as the encoding, the byte order, the number of channels, the sampling rate, and the number of bits per sample.

  • There are several well-known, standard formats for sound files, such as WAV, AIFF, or AU. The different types of sound file have different structures for storing audio data as well as for storing descriptive information about the audio data. A sound file format is represented in the Java Sound API by an AudioFileFormat object. The AudioFileFormat includes an AudioFormat object to describe the format of the audio data stored in the file, and also includes information about the file type and the length of the data in the file.
  • The AudioSystem class provides methods for (1) storing a stream of audio data from an AudioInputStream into an audio file of a particular type (in other words, writing a file), (2) extracting a stream of audio bytes (an AudioInputStream) from an audio file (in other words, reading a file), and (3) converting audio data from one data format to another. The present chapter, which is divided into three sections, explains these three kinds of activity.

Note that an implementation of the Java Sound API does not necessarily provide comprehensive facilities for reading, writing, and converting audio in different data and file formats. It might support only the most common data and file formats. However, service providers can develop and distribute conversion services that extend this set, as outlined in Chapter 14, "Providing Sampled-Audio Services." The AudioSystem class supplies methods that allow application programs to learn what conversions are available, as described later in this chapter under "Converting File and Data Formats."

Reading Sound Files

The AudioSystem class provides two types of file-reading services:

  • Information about the format of the audio data stored in the sound file
  • A stream of formatted audio data that can be read from the sound file

The first of these is given by three variants of the getAudioFileFormat method:

static AudioFileFormat getAudioFileFormat (java.io.File file)
static AudioFileFormat getAudioFileFormat(java.io.InputStream stream)
static AudioFileFormat getAudioFileFormat (java.net.URL url)

As mentioned above, the returned AudioFileFormat object tells you the file type, the length of the data in the file, encoding, the byte order, the number of channels, the sampling rate, and the number of bits per sample.

The second type of file-reading functionality is given by these AudioSystem methods

static AudioInputStream getAudioInputStream (java.io.File file)
static AudioInputStream getAudioInputStream (java.net.URL url)
static AudioInputStream getAudioInputStream (java.io.InputStream stream)

These methods give you an object (an AudioInputStream) that lets you read the file's audio data, using one of the read methods of AudioInputStream. We'll see an example momentarily.

Suppose you're writing a sound-editing application that allows the user to load sound data from a file, display a corresponding waveform or spectrogram, edit the sound, play back the edited data, and save the result in a new file. Or perhaps your program will read the data stored in a file, apply some kind of signal processing (such as an algorithm that slows the sound down without changing its pitch), and then play the processed audio. In either case, you need to get access to the data contained in the audio file. Assuming that your program provides some means for the user to select or specify an input sound file, reading that file's audio data involves three steps:

  2. Get an AudioInputStream object from the file.
  3. Create a byte array in which you'll store successive chunks of data from the file.
  4. Repeatedly read bytes from the audio input stream into the array. On each iteration, do something useful with the bytes in the array (for example, you might play them, filter them, analyze them, display them, or write them to another file).

The following code example outlines these steps.
int totalFramesRead = 0;
File fileIn = new File(somePathName);
// somePathName is a pre-existing string whose value was
// based on a user selection.
try {
  AudioInputStream audioInputStream =
    AudioSystem.getAudioInputStream(fileIn);
  int bytesPerFrame =
    audioInputStream.getFormat().getFrameSize();
  // Set an arbitrary buffer size of 1024 frames.
  int numBytes = 1024 * bytesPerFrame;
  byte[] audioBytes = new byte[numBytes];
  try {
    int numBytesRead = 0;
    int numFramesRead = 0;
    // Try to read numBytes bytes from the file.
    while ((numBytesRead =
      audioInputStream.read(audioBytes)) != -1) {
      // Calculate the number of frames actually read.
      numFramesRead = numBytesRead / bytesPerFrame;
      totalFramesRead += numFramesRead;
      // Here, do something useful with the audio data that's
      // now in the audioBytes array...
    }
  } catch (Exception ex) {
    // Handle the error...
  }
} catch (Exception e) {
  // Handle the error...
}
Let's take a look at what's happening in the above code sample. First, the outer try clause instantiates an AudioInputStream object through the call to the AudioSystem.getAudioInputStream(File) method. This method transparently performs all of the testing required to determine whether the specified file is actually a sound file of a type that is supported by the Java Sound API. If the file being inspected (fileIn in this example) is not a sound file, or is a sound file of some unsupported type, an UnsupportedAudioFileException exception is thrown. This behavior is convenient, in that the application programmer need not be bothered with testing file attributes, nor with adhering to any file-naming conventions. Instead, the getAudioInputStream method takes care of all the low-level parsing and verification that is required to validate the input file.

The outer try clause then creates a byte array, audioBytes, of an arbitrary fixed length. We make sure that its length in bytes equals an integral number of frames, so that we won't end up reading only part of a frame or, even worse, only part of a sample. This byte array will serve as a buffer to temporarily hold a chunk of audio data as it's read from the stream. If we knew we would be reading nothing but very short sound files, we could make this array the same length as the data in the file, by deriving the length in bytes from the length in frames, as returned by AudioInputStream's getFrameLength method. (Actually, we'd probably just use a Clip object instead.) But to avoid running out of memory in the general case, we instead read the file in chunks, one buffer at a time.

The inner try clause contains a while loop, which is where we read the audio data from the AudioInputStream into the byte array. You should add code in this loop to handle the audio data in this array in whatever way is appropriate for your program's needs. If you're applying some kind of signal processing to the data, you'll probably need to query the AudioInputStream's AudioFormat further, to learn the number of bits per sample and so on.

Note that the method AudioInputStream.read(byte[]) returns the number of bytes read—not the number of samples or frames. This method returns -1 when there's no more data to read. Upon detecting this condition, we break from the while loop.

Writing Sound Files

The previous section described the basics of reading a sound file, using specific methods of the AudioSystem and AudioInputStream classes. This section describes how to write audio data out to a new file.

The following AudioSystem method creates a disk file of a specified file type. The file will contain the audio data that's in the specified AudioInputStream:

static int write(AudioInputStream in,
  AudioFileFormat.Type fileType, File out)
Note that the second argument must be one of the file types supported by the system (for example, AU, AIFF, or WAV), otherwise the write method will throw an IllegalArgumentException. To avoid this, you can test whether or not a particular AudioInputStream may be written to a particular type of file, by invoking this AudioSystem method:
static boolean isFileTypeSupported
  (AudioFileFormat.Type fileType, AudioInputStream stream)
which will return true only if the particular combination is supported.

More generally, you can learn what types of file the system can write by invoking one of these AudioSystem methods:

static AudioFileFormat.Type[] getAudioFileTypes()
static AudioFileFormat.Type[]
  getAudioFileTypes(AudioInputStream stream)
The first of these returns all the types of file that the system can write, and the second returns only those that the system can write from the given audio input stream.

The following excerpt demonstrates one technique for creating an output file from an AudioInputStream using the write method mentioned above.

File fileOut = new File(someNewPathName);
AudioFileFormat.Type fileType = fileFormat.getType();
if (AudioSystem.isFileTypeSupported(fileType,
    audioInputStream)) {
  AudioSystem.write(audioInputStream, fileType, fileOut);
}
The first statement above, creates a new File object, fileOut, with a user- or program-specified pathname. The second statement gets a file type from a pre-existing AudioFileFormat object called fileFormat, which might have been obtained from another sound file, such as the one that was read in the "Reading Sound Files" section of this chapter. (You could instead supply whatever supported file type you want, instead of getting the file type from elsewhere. For example, you might delete the second statement and replace the other two occurrences of fileType in the code above with AudioFileFormat.Type.WAVE.)

The third statement tests whether a file of the designated type can be written from a desired AudioInputStream. Like the file format, this stream might have been derived from the sound file previously read. (If so, presumably you've processed or altered its data in some way, because otherwise there are easier ways to simply copy a file.) Or perhaps the stream contains bytes that have been freshly captured from the microphone input.

Finally, the stream, file type, and output file are passed to the AudioSystem.write method, to accomplish the goal of writing the file.

Converting File and Data Formats

Recall from the section "What Is Formatted Audio Data?" in Chapter 2, "Overview of the Sampled Package," that the Java Sound API distinguishes between audio file formats and audio data formats. The two are more or less independent. Roughly speaking, the data format refers to the way in which the computer represents each raw data point (sample), while the file format refers to the organization of a sound file as stored on a disk. Each sound file format has a particular structure that defines, for example, the information stored in the file's header. In some cases, the file format also includes structures that contain some form of meta-data, in addition to the actual "raw" audio samples. The remainder of this chapter examines methods of the Java Sound API that enable a variety of file-format and data-format conversions.

Converting from One File Format to Another

This section covers the fundamentals of converting audio file types in the Java Sound API. Once again we pose a hypothetical program whose purpose, this time, is to read audio data from an arbitrary input file and write it into a file whose type is AIFF. Of course, the input file must be of a type that the system is capable of reading, and the output file must be of a type that the system is capable of writing. (In this example, we assume that the system is capable of writing AIFF files.) The example program doesn't do any data format conversion. If the input file's data format can't be represented as an AIFF file, the program simply notifies the user of that problem. On the other hand, if the input sound file is an already an AIFF file, the program notifies the user that there is no need to convert it.

The following function implements the logic just described:

public void ConvertFileToAIFF(String inputPath,
  String outputPath) {
  AudioFileFormat inFileFormat;
  File inFile;
  File outFile;
  try {
    inFile = new File(inputPath);
    outFile = new File(outputPath);
  } catch (NullPointerException ex) {
    System.out.println("Error: one of the
      ConvertFileToAIFF" +" parameters is null!");
    return;
  }
  try {
    // query file type
    inFileFormat = AudioSystem.getAudioFileFormat(inFile);
    if (inFileFormat.getType() != AudioFileFormat.Type.AIFF)
    {
      // inFile is not AIFF, so let's try to convert it.
      AudioInputStream inFileAIS =
        AudioSystem.getAudioInputStream(inFile);
      inFileAIS.reset(); // rewind
      if (AudioSystem.isFileTypeSupported(
             AudioFileFormat.Type.AIFF, inFileAIS)) {
         // inFileAIS can be converted to AIFF.
         // so write the AudioInputStream to the
         // output file.
         AudioSystem.write(inFileAIS,
           AudioFileFormat.Type.AIFF, outFile);
         System.out.println("Successfully made AIFF file, "
           + outFile.getPath() + ", from "
           + inFileFormat.getType() + " file, " +
           inFile.getPath() + ".");
         inFileAIS.close();
         return; // All done now
       } else
         System.out.println("Warning: AIFF conversion of "
           + inFile.getPath()
           + " is not currently supported by AudioSystem.");
    } else
      System.out.println("Input file " + inFile.getPath() +
          " is AIFF." + " Conversion is unnecessary.");
  } catch (UnsupportedAudioFileException e) {
    System.out.println("Error: " + inFile.getPath()
        + " is not a supported audio file type!");
    return;
  } catch (IOException e) {
    System.out.println("Error: failure attempting to read "
      + inFile.getPath() + "!");
    return;
  }
}

As mentioned, the purpose of this example function, ConvertFileToAIFF, is to query an input file to determine whether it's an AIFF sound file, and if it isn't, to try to convert it to one, producing a new copy whose pathname is specified by the second argument. (As an exercise, you might try making this function more general, so that instead of always converting to AIFF, the function converts to the file type specified by a new function argument.) Note that the audio data format of the copy—that is, the new file-mimics the audio data format of original input file.

Most of this function is self-explanatory and is not specific to the Java Sound API. There are, however, a few Java Sound API methods used by the routine that are crucial for sound file-type conversions. These method invocations are all found in the second try clause, above, and include the following:

  • AudioSystem.getAudioFileFormat: used here to determine whether the input file is already an AIFF type. If so, the function quickly returns; otherwise the conversion attempt proceeds.
  • AudioSystem.isFileTypeSupported: Indicates whether the system can write a file of the specified type that contains audio data from the specified AudioInputStream. In our example, this method returns true if the specified audio input file can be converted to AIFF audio file format. If AudioFileFormat.Type.AIFF isn't supported, ConvertFileToAIFF issues a warning that the input file can't be converted, then returns.
  • AudioSystem.write: used here to write the audio data from the AudioInputStream inFileAIS to the output file outFile.

The second of these methods, isFileTypeSupported, helps to determine, in advance of the write, whether a particular input sound file can be converted to a particular output sound file type. In the next section we will see how, with a few modifications to this ConvertFileToAIFF sample routine, we can convert the audio data format, as well as the sound file type.

Converting Audio between Different Data Formats

The previous section showed how to use the Java Sound API to convert a file from one file format (that is, one type of sound file) to another. This section explores some of the methods that enable audio data format conversions.

In the previous section, we read data from a file of an arbitrary type, and saved it in an AIFF file. Note that although we changed the type of file used to store the data, we didn't change the format of the audio data itself. (Most common audio file types, including AIFF, can contain audio data of various formats.) So if the original file contained CD-quality audio data (16-bit sample size, 44.1-kHz sample rate, and two channels), so would our output AIFF file.

Now suppose that we want to specify the data format of the output file, as well as the file type. For example, perhaps we are saving many long files for use on the Internet, and are concerned about the amount of disk space and download time required by our files. We might choose to create smaller AIFF files that contain lower-resolution data-for example, data that has an 8-bit sample size, an 8-kHz sample rate, and a single channel.

Without going into as much coding detail as before, let's explore some of the methods used for data format conversion, and consider the modifications that we would need to make to the ConvertFileToAIFF function to accomplish the new goal.

The principal method for audio data conversion is, once again, found in the AudioSystem class. This method is a variant of getAudioInputStream:

AudioInputStream getAudioInputStream(AudioFormat
    format, AudioInputStream stream)
This function returns an AudioInputStream that is the result of converting the AudioInputStream, stream, using the indicated AudioFormat, format. If the conversion isn't supported by AudioSystem, this function throws an IllegalArgumentException.

To avoid that, we can first check whether the system can perform the required conversion by invoking this AudioSystem method:

boolean isConversionSupported(AudioFormat targetFormat,
    AudioFormat sourceFormat)
In this case, we'd pass stream.getFormat() as the second argument.

To create a specific AudioFormat object, we use one of the two AudioFormat constructors shown below, either

 AudioFormat(float sampleRate, int sampleSizeInBits,
    int channels, boolean signed, boolean bigEndian)
which constructs an AudioFormat with a linear PCM encoding and the given parameters, or
AudioFormat(AudioFormat.Encoding encoding,
    float sampleRate, int sampleSizeInBits, int channels,
    int frameSize, float frameRate, boolean bigEndian)
which also constructs an AudioFormat, but lets you specify the encoding, frame size, and frame rate, in addition to the other parameters.

Now, armed with the methods above, let's see how we might extend our ConvertFileToAIFF function to perform the desired "low-res" audio data format conversion. First, we would construct an AudioFormat object describing the desired output audio data format. The following statement would suffice and could be inserted near the top of the function:

AudioFormat outDataFormat = new AudioFormat((float) 8000.0,
(int) 8, (int) 1, true, false);
Since the AudioFormat constructor above is describing a format with 8-bit samples, the last parameter to the constructor, which specifies whether the samples are big or little endian, is irrelevant. (Big versus little endian is only an issue if the sample size is greater than a single byte.)

The following example shows how we would use this new AudioFormat to convert the AudioInputStream, inFileAIS, that we created from the input file:

AudioInputStream lowResAIS;
  if (AudioSystem.isConversionSupported(outDataFormat,
    inFileAIS.getFormat())) {
    lowResAIS = AudioSystem.getAudioInputStream
      (outDataFormat, inFileAIS);
  }
It wouldn't matter too much where we inserted this code, as long as it was after the construction of inFileAIS. Without the isConversionSupported test, the call would fail and throw an IllegalArgumentException if the particular conversion being requested was unsupported. (In this case, control would transfer to the appropriate catch clause in our function.)

So by this point in the process, we would have produced a new AudioInputStream, resulting from the conversion of the original input file (in its AudioInputStream form) to the desired low-resolution audio data format as defined by outDataFormat.

The final step to produce the desired low-resolution, AIFF sound file would be to replace the AudioInputStream parameter in the call to AudioSystem.write (that is, the first parameter) with our converted stream, lowResAIS, as follows:

AudioSystem.write(lowResAIS, AudioFileFormat.Type.AIFF,
  outFile);
These few modifications to our earlier function produce something that converts both the audio data and the file format of any specified input file, assuming of course that the system supports the conversion.

Learning What Conversions Are Available

Several AudioSystem methods test their parameters to determine whether the system supports a particular data format conversion or file-writing operation. (Typically, each method is paired with another that performs the data conversion or writes the file.) One of these query methods, AudioSystem.isFileTypeSupported, was used in our example function, ConvertFileToAIFF, to determine whether the system was capable of writing the audio data to an AIFF file. A related AudioSystem method, getAudioFileTypes(AudioInputStream), returns the complete list of supported file types for the given stream, as an array of AudioFileFormat.Type instances. The method:

boolean isConversionSupported(AudioFormat.Encoding encoding,
                              AudioFormat format)
is used to determine whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified audio format. Similarly, the method:
boolean isConversionSupported(AudioFormat newFormat,
                              AudioFormat oldFormat)

tells us whether an AudioInputStream with the specified audio format, newFormat, can be obtained through the conversion of an AudioInputStream that has the audio format oldFormat. (This method was invoked in the previous section's code excerpt that created a low-resolution audio input stream, lowResAIS.)

These format-related queries help prevent errors when attempting to perform format conversions with the Java Sound API.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Endorsed Standards Override Mechanism

The following topics are covered:

  • Introduction
  • Deploying Updated Packages
  • Endorsed Standards APIs
  • Standalone Technologies

Introduction

From time to time it is necessary to update the Java platform in order to incorporate newer versions of standards that are created outside of the Java Community Process (Endorsed Standards), or in order to update the version of a technology included in the platform to correspond to a later standalone version of that technology (Standalone Technologies).

The Endorsed Standards Override Mechanism provides a means whereby later versions of classes and interfaces that implement Endorsed Standards or Standalone Technologies may be incorporated into the Java Platform.

Deploying Updated Packages

Packages to be updated through this mechanism should be placed in JAR files. The system property java.endorsed.dirs specifies one or more directories that the Java runtime environment will search for such JAR files. If more than one directory path is specified by java.endorsed.dirs, they must be separated by File.pathSeparatorChar. If no value is set for java.endorsed.dirs, then Sun Microsystem's implementation of the Java platform looks for JAR files in a default standard location:

<java-home>\lib\endorsed          [Microsoft Windows]
<java-home>/lib/endorsed          [Solaris or Linux]

Here <java-home> refers to the directory where the runtime software is installed (which is the top-level directory of the Java SE Runtime Environment or the jre directory in the JDK).

The Java SE runtime environment will use classes in such JAR files to override the corresponding classes provided in the Java platform as it was shipped.

Endorsed Standards APIs

The Endorsed Standards for Java SE constitute all classes and interfaces that are defined in the packages listed in this section. Classes and interfaces defined in sub-packages of listed packages are not Endorsed Standards unless those sub-packages are themselves listed. The Endorsed Standards Override Mechanism may be used to override the Java SE platform packages in this list, and these packages may be overridden only by versions of the Endorsed Standard that are newer than that provided by the Java platform as released by Sun. With the exception of packages listed here and the technologies listed in the Standalone Technologies section below, no other packages from the Java SE platform API specification may be overridden.

javax.rmi.CORBA
org.omg.CORBA
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.portable
org.omg.CORBA.TypeCodePackage
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.portable
org.omg.PortableServer.ServantLocatorPackage
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers

In addition to the packages listed above, which are part of the Java SE specification, users of Sun's Java SE Reference Implementation are allowed to use the Endorsed Standards Override Mechanism to override implementation-specific classes associated with these packages, such as the org.w3c.dom sub-packages delivered in Sun's Reference Implementation.

Standalone Technologies

The Standalone Technologies for Java SE constitute all classes and interfaces that are defined and implemented in the technologies listed in this section. The Endorsed Standards Override Mechanism may be used to override the Java technologies in this list, and these technologies may be overridden only by providing a complete and newer implementation of the Standalone Technology than was provided in the original implementation of the Java Platform. With the exception of the technologies in this list and the packages listed in the Endorsed Standards APIs section above, no other packages from the Java SE platform API specification may be overridden.

Standalone Technology | Supported Implementation Version
Java API for XML Processing (JAXP) | 1.4.5
Java Architecture for XML Binding (JAXB) | 2.2.4-1
Java Compiler API | 1.0
Pluggable Annotation Processing API | 1.7
Common Annotations for the Java Platform | 1.1
Scripting for the Java Platform | 1.0
SOAP with Attachments API for Java (SAAJ) (package javax.xml.soap) | 1.3.9
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Standards Override API Enhancements

Documentation Contents

Java™ Standards Override API Enhancements

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No changes to report.

Enhancements in J2SE 5.0

No changes to report.

Enhancements in Java 2 SDK v1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Nimbus Look and Feel

Contents
  • Introduction
  • Activating Nimbus Look and Feel
    • Invoking UIManager.setLookAndFeel
    • -Dswing.defaultlaf command line option

Introduction

Nimbus, a cross platform look and feel introduced in the Java SE 6 update 10 release, is drawn with 2D vector graphics and can be rendered at any resolution.

Nimbus Look and Feel Example

Activating Nimbus Look and Feel

There are two ways to activate the Nimbus Look and Feel.

Invoking UIManager.setLookAndFeel

Add the following snippet to your source code:

try {
    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
            UIManager.setLookAndFeel(info.getClassName());
            break;
        }
    }
} catch (UnsupportedLookAndFeelException e) {
    // handle exception
} catch (ClassNotFoundException e) {
    // handle exception
} catch (InstantiationException e) {
    // handle exception
} catch (IllegalAccessException e) {
    // handle exception
}

-Dswing.defaultlaf command line option

To activate Nimbus Look and Feel for an application, specify the following when running the Java application

-Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing API changes in JDK 5.0

The API changes in Swing for Java SE 5.0 are broken down into the following sections:

  1. Major Changes
  2. Text Changes
  3. Miscellaneous Changes
  4. Incompatibilities

Major Swing Changes

4607364: Improve default look and feel of Swing

Description:

This is the most visible change to Swing in 5.0. If you use the Java look and feel your application will automatically get a new look, called Ocean, in 5.0. Ocean was designed with compatibility in mind so that we did not change the preferred size of any of the widgets, only the look and a small portion of the feel has changed. The old look can be obtained by setting the system property swing.metalTheme=steel.

Ocean is implemented as a custom MetalTheme that is currently private. The advantage of this approach is that if you have created a custom MetalTheme you will not be affected at all by Ocean, that is, your application will look as it did in 1.4.

Specification

Disabled Icons for AbstractButton subclasses are now generated from the UI. This resulted in revising the specification of getDisabledIcon to:

    /**
     * Returns the icon used by the button when it's disabled.
     * If no disabled icon has been set this will forward the call to
     * the ui to construct an appropriate disabled Icon.
     * <p>
     * Some types of look and feel might not render the disabled Icon, in which
     * case they will ignore this.
     *
     * @return the <code>disabledIcon</code> property
     * @see #getPressedIcon
     * @see #setDisabledIcon
     * @see javax.swing.plaf.ButtonUI#getDisabledIcon
     */
    public Icon getDisabledIcon();

And adding the method getDisabledIcon to ButtonUI.

    /**
     * Returns the icon to display when the developer has not specified
     * a disabled icon.
     * <p>
     * Some look and feels might not render the disabled Icon, in which
     * case they will ignore this.
     *
     * @param button AbstractButton requesting the Icon
     * @return Disabled icon, or null.
     * @see javax.swing.AbstractButton#setIcon
     * @see javax.swing.AbstractButton#setDisabledIcon
     * @throws NullPointerException if <code>button</code> is null
     * @since 1.5
     */
    public Icon getDisabledIcon(AbstractButton button);

To customize the look of disabled icons for JButton MetalButtonUI will override getDisabledIcon.

    /**
     * Returns the icon to display when the button is disabled.
     *
     * @param button AbstractButton requesting the Icon
     * @return Disabled icon, or null.
     * @see javax.swing.AbstractButton#setIcon
     * @see javax.swing.AbstractButton#setDisabledIcon
     * @throws NullPointerException if <code>button</code> is null
     * @since 1.5
     */
    public Icon getDisabledIcon(AbstractButton button);

To customize the look of JComboBox MetalCombBoxUI will override the following methods:

    /**
     * If necessary paints the currently selected item.
     *
     * @param g Graphics to paint to
     * @param bounds Region to paint current value to
     * @param hasFocus whether or not the JComboBox has focus
     * @throws NullPointerException if any of the arguments are null.
     * @since 1.5
     */
    public void paintCurrentValue(Graphics g, Rectangle bounds,
                                  boolean hasFocus);

    /**
     * If necessary paints the background of the currently selected item.
     *
     * @param g Graphics to paint to
     * @param bounds Region to paint background to
     * @param hasFocus whether or not the JComboBox has focus
     * @throws NullPointerException if any of the arguments are null.
     * @since 1.5
     */
    public void paintCurrentValueBackground(Graphics g, Rectangle bounds,
                                            boolean hasFocus);

To customize the look of JButton MetalButtonUI will override the following methods:

    /**
     * If necessary paints the background of the component, then
     * invokes <code>paint</code>.
     *
     * @param g Graphics to paint to
     * @param c JComponent painting on
     * @throws NullPointerException if <code>g</code> or <code>c</code> is
     *         null
     * @see javax.swing.plaf.ComponentUI#update
     * @see javax.swing.plaf.ComponentUI#paint
     * @since 1.5
     */
    public void update(Graphics g, JComponent c);

To customize the look of JMenuBar metal will now provide MetalMenuBarUI.

To customize the look of JToolBar MetalToolBarUI will now override update.

    /**
     * If necessary paints the background of the component, then invokes
     * <code>paint</code>.
     *
     * @param g Graphics to paint to
     * @param c JComponent painting on
     * @throws NullPointerException if <code>g</code> or <code>c</code> is
     *         null
     * @see javax.swing.plaf.ComponentUI#update
     * @see javax.swing.plaf.ComponentUI#paint
     * @since 1.5
     */
    public void update(Graphics g, JComponent c);

To customize the look of JToggleButton MetalToggleButtonUI will now override the following methods:

    /**
     * If necessary paints the background of the component, then invokes
     * <code>paint</code>.
     *
     * @param g Graphics to paint to
     * @param c JComponent painting on
     * @throws NullPointerException if <code>g</code> or <code>c</code> is
     *         null
     * @see javax.swing.plaf.ComponentUI#update
     * @see javax.swing.plaf.ComponentUI#paint
     * @since 1.5
     */
    public void update(Graphics g, JComponent c);

    /**
     * Paints the appropriate icon of the button <code>b</code> in the
     * space <code>iconRect</code>.
     *
     * @param g Graphics to paint to
     * @param b Button to render for
     * @param iconRect space to render in
     * @throws NullPointerException if any of the arguments are null.
     * @since 1.5
     */
    protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect);

    /**
     * Returns the icon to display when the button is disabled.
     *
     * @param button AbstractButton requesting the Icon
     * @return Disabled icon, or null.
     * @see javax.swing.AbstractButton#setIcon
     * @see javax.swing.AbstractButton#setDisabledIcon
     * @throws NullPointerException if <code>button</code> is null
     * @since 1.5
     */
    public Icon getDisabledIcon(AbstractButton button);

4632193: Swing Skins Look and Feel

Description:

One of Swing's early design goals was the ability for an application to support a multitude of look and feels without changing code. This feature allows developers to seamlessly run their applications with numerous look and feels. While there have been a handful of custom look and feels, most notably the Alloy Look and Feel and L2F's Skinnable Look and Feel, creating a new look and feel requires programming and an extensive knowledge of Swing's pluggable look-and-feel architecture, limiting this feature mostly to experts. In 5.0, a skinnable look and feel, named Synth, has been added to Swing which can be completely customized without writing code, enabling even non-programmers to create new look and feels.

Synth lives in the javax.swing.plaf.synth package. The package level javadoc gives a brief overview of Synth. Synth can be customized by way of a file. To enable Synth to extend javax.swing.plaf.basic the following changes were made:

The following methods were unnecessary (implementation identical to that of the superclass) and have been removed: BasicOptionPaneUI's getMinimumSize BasicOptionPaneUI's getMaximumSize BasicTabbedPaneUI's getPreferredSize BasicMenuBarUI's getPreferredSize BasicPopupMenuUI's getMinimumSize BasicPopupMenuUI's getPreferredSize BasicPopupMenuUI's getMaximumSize BasicScrollPaneUI's getPreferredSize BasicScrollPaneUI's getMinimumSize BasicListUI's getMinimumSize BasicListUI's getMaximumSize BasicScrollBarUI's getMinimumSize BasicToolBarSeparatorUI's getMinimumSize BasicToolBarSeparatorUI's getMaximumSize BasicToolBarUI's getMinimumSize BasicToolBarUI's getPreferredSize BasicToolBarUI's getMaximumSize.

Many of the JComponent subclasses have primitive properties. As the UIs need to install a value for these properties they have no way to determine if the property was set by the developer and may end up resetting the value a developer has specified. To enable the UI to only set a value if the developer hasn't specified we will route all primitive setters through a method in LookAndFeel:

    /**
     * Convenience method for installing a property with the specified name
     * and value on a component if that property has not already been set
     * by the client program.  This method is intended to be used by
     * UI delegate instances that need to specify a default value for a
     * property of primitive type (boolean, int, ..), but do not wish
     * to override a value set by the client.  Since primitive property
     * values cannot be wrapped with the UIResource marker, this method
     * uses private state to determine whether the property has been set
     * by the client.
     * @throws IllegalArgumentException if the specified property is not
     *         one which can be set using this method
     * @throws ClassCastException May be thrown if the propertyValue is not
     *         of the expected type.
     * @throws NullPointerException May be thrown if the JComponent is null,
     *         or the propertyValue is null.
     * @param c the target component for installing the property
     * @param propertyName String containing the name of the property to be set
     * @param propertyValue Object containing the value of the property
     * @since 1.5
     */
    public static void installProperty(JComponent c,
                                       String propertyName, Object propertyValue)

To allow subclasses of BasicTabbedPaneUI to create their own buttons the following method was added:

    /**
     * Creates and returns a JButton that will provide the user
     * with a way to scroll the tabs in a particular direction. The
     * returned JButton must be instance of UIResource.
     *
     * @param direction One of the SwingConstants constants:
     * SOUTH, NORTH, EAST or WEST
     * @return Widget for user to
     * @see javax.swing.JTabbedPane#setTabPlacement
     * @see javax.swing.SwingConstants
     * @throws IllegalArgumentException if direction is not one of
     *         NORTH, SOUTH, EAST or WEST
     * @since 1.5
     */
    protected JButton createScrollButton(int direction);

To allow subclasses of BasicTabbedPaneUI to determine which tab has focus the following was added:

    /**
     * Returns the index of the tab that has focus.
     *
     * @return index of tab that has focus
     * @since 1.5
     */
    protected int getFocusIndex();

To allow subclasses of BasicTabbedPaneUI to provide a rollover effect the following was added:

    /**
     * Sets the tab the mouse is currently over to index.
     * index will be -1 if the mouse is no longer over any
     * tab. No checking is done to ensure the passed in index identifies a
     * valid tab.
     *
     * @param index Index of the tab the mouse is over.
     * @since 1.5
     */
    protected void setRolloverTab(int index);

    /**
     * Returns the tab the mouse is currently over, or -1 if the mouse is no
     * longer over any tab.
     *
     * @param index Index of the tab the mouse is over.
     * @since 1.5
     */
    protected int getRolloverTab();

The following field was added to BasicColorChooserUI:

    /**
     * JColorChooser this BasicColorChooserUI is installed on.
     *
     * @since 1.5
     */
    protected JColorChooser chooser;

To allow BasicSpinnerUI subclasses to install their own keyboard actions the following method was added:

    /**
     * Installs the keyboard Actions onto the JSpinner.
     *
     * @since 1.5
     */
    protected void installKeyboardActions();

To allow BasicSpinnerUI subclasses to provide their own spin buttons the following methods were added:

    /**
     * Installs the necessary listeners on the next button, c,
     * to update the JSpinner in response to a user gesture.
     *
     * @param c Component to install the listeners on
     * @throws NullPointerException if c is null.
     * @see #createNextButton
     * @since 1.5
     */
    protected void installNextButtonListeners(Component c);

    /**
     * Installs the necessary listeners on the previous button, c,
     * to update the JSpinner in response to a user gesture.
     *
     * @param c Component to install the listeners on.
     * @throws NullPointerException if c is null.
     * @see #createPreviousButton
     * @since 1.5
     */
    protected void installPreviousButtonListeners(Component c);

To allow subclasses of BasicScrollBarUI to provide rollover feedback the following method were added:

    /**
     * Sets whether or not the mouse is currently over the thumb.
     *
     * @param active True indicates the thumb is currently active.
     * @since 1.5
     */
    protected void setThumbRollover(boolean active);

    /**
     * Returns true if the mouse is currently over the thumb.
     *
     * @return true if the thumb is currently active
     * @since 1.5
     */
    public boolean isThumbRollover();

    /**
     * Indicates whether the user can absolutely position the thumb with
     * a mouse gesture (usually the middle mouse button).
     *
     * @return true if a mouse gesture can absolutely position the thumb
     * @since 1.5
     */
    public boolean getSupportsAbsolutePositioning();

To cut down on class loads the following was added to BasicComboPopup:

    /**
     * Gets the AccessibleContext associated with this BasicComboPopup.
     * The AccessibleContext will have its parent set to the ComboBox.
     *
     * @return an AccessibleContext for the BasicComboPopup
     * @since 1.5
     */
    public AccessibleContext getAccessibleContext();

To enable subclasses of BasicSplitPaneDivider to provide mouse over feedback the following was added:

    /**
     * Sets whether or not the mouse is currently over the divider.
     *
     * @param mouseOver whether or not the mouse is currently over the divider
     * @since 1.5
     */
    protected void setMouseOver(boolean mouseOver);

    /**
     * Returns whether or not the mouse is currently over the divider
     *
     * @param Returns whether or not the mouse is currently over the divider
     */
    public boolean isMouseOver();

To allow subclasses of BasicTreeUI to alter the location of a particular row the following had been added:

    /**
     * Returns the location, along the x-axis, to render a particular row
     * at. The return value does not include any Insets specified on the JTree.
     * This does not check for the validity of the row or depth, it is assumed
     * to be correct and will not throw an Exception if the row or depth
     * doesn't match that of the tree.
     *
     * @param row Row to return x location for
     * @param depth Depth of the row
     * @return amount to indent the given row.
     * @since 1.5
     */
    protected int getRowX(int row, int depth);

To allow subclasses of BasicProgressBarUI to alter the size of the progress bar the following was added:

    /**
     * Used to hold the location and size of the bouncing box (returned
     * by getBox) to be painted.
     *
     * @since 1.5
     */
    protected Rectangle boxRect;

    /**
     * Returns the length
     * of the "bouncing box" to be painted.
     * This method is invoked by the
     * default implementation of <code>paintIndeterminate</code>
     * to get the width (if the progress bar is horizontal)
     * or height (if vertical) of the box.
     * For example:
     * <blockquote>
     * <pre>
     *boxRect.width = getBoxLength(componentInnards.width,
     *                             componentInnards.height);
     * </pre>
     * </blockquote>
     *
     * @param availableLength  the amount of space available
     *                         for the bouncing box to move in;
     *                         for a horizontal progress bar,
     *                         for example,
     *                         this should be
     *                         the inside width of the progress bar
     *                         (the component width minus borders)
     * @param otherDimension   for a horizontal progress bar, this should be
     *                         the inside height of the progress bar; this
     *                         value might be used to constrain or determine
     *                         the return value
     *
     * @return the size of the box dimension being determined;
     *         must be no larger than <code>availableLength</code>
     *
     * @see javax.swing.SwingUtilities#calculateInnerArea
     * @since 1.5
     */
    protected int getBoxLength(int availableLength, int otherDimension);

To enable subclasses of BasicSliderUI to specialize painting based on the state of the slider the following was added:

    /**
     * Returns true if the user is dragging the slider.
     *
     * @return true if the user is dragging the slider
     * @since 1.5
     */
    protected boolean isDragging();

To allow subclasses of BasicToolBarUI to specialize how the window used for dragging is painted the following was added:

    /**
     * Paints the contents of the window used for dragging.
     *
     * @param g Graphics to paint to.
     * @throws NullPointerException is g is null
     * @since 1.5
     */
    protected void paintDragWindow(Graphics g);

To allow subclasses of BasicDesktopIconUI to get a handle to the iconPane the following was added:

    /**
     * The title pane component used in the desktop icon.
     *
     * @since 1.5
     */
    protected JComponent iconPane;

4634626: Implement context popup menus for components

Description:

JPopupMenu allows for creating a popup menu. Prior to 5.0, developers using a JPopupMenu would have to install the necessary listeners and register the appropriate key bindings to show the JPopupMenu. In 5.0 we added a mechanism to take care of registering the appropriate listeners and key bindings. This resulted in the following methods being added to JComponent:

    /**
     * Sets whether or not <code>getComponentPopupMenu</code> should delegate
     * to the parent if this component does not have a <code>JPopupMenu</code>
     * assigned to it.
     * <p>
     * The default value for this is false, but some <code>JComponent</code>
     * subclasses that are implemented as a number of <code>JComponent</code>s
     * may set this to true.
     * <p>
     * This is a bound property.
     *
     * @param value whether or not the JPopupMenu is inherited
     * @see #setComponentPopupMenu
     * @beaninfo
     *        bound: true
     *  description: Whether or not the JPopupMenu is inherited
     * @since 1.5
     */
    public void setInheritsPopupMenu(boolean value);

    /**
     * Returns true if the JPopupMenu should be inherited from the parent.
     *
     * @see #setComponentPopupMenu
     * @since 1.5
     */
    public boolean getInheritsPopupMenu();

    /**
     * Sets the <code>JPopupMenu</code> for this <code>JComponent</code>.
     * The UI is responsible for registering bindings and adding the necessary
     * listeners such that the <code>JPopupMenu</code> will be shown at
     * the appropriate time. When the <code>JPopupMenu</code> is shown
     * depends upon the look and feel: some may show it on a mouse event,
     * some may enable a key binding.
     * <p>
     * If <code>popup</code> is null, and <code>getInheritsPopupMenu</code>
     * returns true, then <code>getComponentPopupMenu</code> will be delegated
     * to the parent. This provides for a way to make all child components
     * inherit the popupmenu of the parent.
     * <p>
     * This is a bound property.
     *
     * @param popup - the popup that will be assigned to this component
     *                may be null
     * @see #getComponentPopupMenu
     * @beaninfo
     *        bound: true
     *    preferred: true
     *  description: Popup to show
     * @since 1.5
     */
    public void setComponentPopupMenu(JPopupMenu popup);

    /**
     * Returns <code>JPopupMenu</code> that assigned for this component.
     * If this component does not have a <code>JPopupMenu</code> assigned
     * to it and <code>getInheritsPopupMenu</code> is true, this
     * will return <code>getParent().getComponentPopupMenu()</code> (assuming
     * the parent is valid.)
     *
     * @return <code>JPopupMenu</code> assigned for this component
     *         or <code>null</code> if no popup assigned
     * @see #setComponentPopupMenu
     * @since 1.5
     */
    public JPopupMenu getComponentPopupMenu();

The following was added to BasicLookAndFeel:

     /**
      * UIManager.setLookAndFeel calls this method before the first call
      * (and typically the only call) to getDefaults().
      *
      * @since 1.5
      */
     public void initialize() {

     /**
      * UIManager.setLookAndFeel calls this method just
      * before we're replaced by a new default look and feel.
      *
      * @since 1.5
      */
     public void uninitialize() {

4791650: JTable needs printing support

Description:

Synopsis says it all. The following has been added to JTable:

    /**
     * Printing modes, used in printing <code>JTable</code>s.
     *
     * @see #print(JTable.PrintMode, MessageFormat, MessageFormat,
     *             boolean, PrintRequestAttributeSet, boolean)
     * @see #getPrintable
     * @since 1.5
     */
    public enum PrintMode {

        /**
         * Printing mode that prints the table at its current size,
         * spreading both columns and rows across multiple pages if necessary.
         */
        NORMAL,

        /**
         * Printing mode that scales the output smaller, if necessary,
         * to fit the table's entire width (and thereby all columns) on each page;
         * Rows are spread across multiple pages as necessary.
         */
        FIT_WIDTH
    }
    /**
     * A convenience method that displays a printing dialog, and then prints
     * this <code>JTable</code> in mode <code>PrintMode.FIT_WIDTH</code>,
     * with no header or footer text. A modal progress dialog, with an abort
     * option, will be shown for the duration of printing.
     * <p>
     * Note: In headless mode, no dialogs will be shown.
     *
     * @return true, unless printing is cancelled by the user
     * @throws PrinterException if an error in the print system causes the job
     *                          to be aborted
     * @see #print(JTable.PrintMode, MessageFormat, MessageFormat,
     *             boolean, PrintRequestAttributeSet, boolean)
     * @see #getPrintable
     *
     * @since 1.5
     */
    public boolean print() throws PrinterException;

    /**
     * A convenience method that displays a printing dialog, and then prints
     * this <code>JTable</code> in the given printing mode,
     * with no header or footer text. A modal progress dialog, with an abort
     * option, will be shown for the duration of printing.
     * <p>
     * Note: In headless mode, no dialogs will be shown.
     *
     * @param  printMode        the printing mode that the printable should use
     * @return true, unless printing is cancelled by the user
     * @throws PrinterException if an error in the print system causes the job
     *                          to be aborted
     * @see #print(JTable.PrintMode, MessageFormat, MessageFormat,
     *             boolean, PrintRequestAttributeSet, boolean)
     * @see #getPrintable
     *
     * @since 1.5
     */
    public boolean print(PrintMode printMode) throws PrinterException;

    /**
     * A convenience method that displays a printing dialog, and then prints
     * this <code>JTable</code> in the given printing mode,
     * with the specified header and footer text. A modal progress dialog,
     * with an abort option, will be shown for the duration of printing.
     * <p>
     * Note: In headless mode, no dialogs will be shown.
     *
     * @param  printMode        the printing mode that the printable should use
     * @param  headerFormat     a <code>MessageFormat</code> specifying the text
     *                          to be used in printing a header,
     *                          or null for none
     * @param  footerFormat     a <code>MessageFormat</code> specifying the text
     *                          to be used in printing a footer,
     *                          or null for none
     * @return true, unless printing is cancelled by the user
     * @throws PrinterException if an error in the print system causes the job
     *                          to be aborted
     * @see #print(JTable.PrintMode, MessageFormat, MessageFormat,
     *             boolean, PrintRequestAttributeSet, boolean)
     * @see #getPrintable
     *
     * @since 1.5
     */
    public boolean print(PrintMode printMode,
                         MessageFormat headerFormat,
                         MessageFormat footerFormat) throws PrinterException;

    /**
     * Print this <code>JTable</code>. Takes steps that the majority of
     * developers would take in order to print a <code>JTable</code>.
     * In short, it prepares the table, calls <code>getPrintable</code> to
     * fetch an appropriate <code>Printable</code>, and then sends it to the
     * printer.
     * <p>
     * A <code>boolean</code> parameter allows you to specify whether or not
     * a printing dialog is displayed to the user. When it is, the user may
     * use the dialog to change printing attributes or even cancel the print.
     * Another parameter allows for printing attributes to be specified
     * directly. This can be used either to provide the initial values for the
     * print dialog, or to supply any needed attributes when the dialog is not
     * shown.
     * <p>
     * A second <code>boolean</code> parameter allows you to specify whether
     * or not to perform printing in an interactive mode. If <code>true</code>,
     * a modal progress dialog, with an abort option, is displayed for the
     * duration of printing . This dialog also prevents any user action which
     * may affect the table. However, it can not prevent the table from being
     * modified by code (for example, another thread that posts updates using
     * <code>SwingUtilities.invokeLater</code>). It is therefore the
     * responsibility of the developer to ensure that no other code modifies
     * the table in any way during printing (invalid modifications include
     * changes in: size, renderers, or underlying data). Printing behavior is
     * undefined when the table is changed during printing.
     * <p>
     * If <code>false</code> is specified for this parameter, no dialog will
     * be displayed and printing will begin immediately on the event-dispatch
     * thread. This blocks any other events, including repaints, from being
     * processed until printing is complete. Although this effectively prevents
     * the table from being changed, it doesn't provide a good user experience.
     * For this reason, specifying <code>false</code> is only recommended when
     * printing from an application with no visible GUI.
     * <p>
     * Note: Attempting to show the printing dialog or run interactively, while
     * in headless mode, will result in a <code>HeadlessException</code>.
     * <p>
     * Before fetching the printable, this method prepares the table in order
     * to get the most desirable printed result. If the table is currently
     * in an editing mode, it terminates the editing as gracefully as
     * possible. It also ensures that the table's current selection and
     * focused cell are not indicated in the printed output. This is handled on
     * the view level, and only for the duration of the printing, thus no
     * notification needs to be sent to the selection models.
     * <p>
     * See {@link #getPrintable} for further description on how the
     * table is printed.
     *
     * @param  printMode        the printing mode that the printable should use
     * @param  headerFormat     a <code>MessageFormat</code> specifying the text
     *                          to be used in printing a header,
     *                          or null for none
     * @param  footerFormat     a <code>MessageFormat</code> specifying the text
     *                          to be used in printing a footer,
     *                          or null for none
     * @param  showPrintDialog  whether or not to display a print dialog
     * @param  attr             a <code>PrintRequestAttributeSet</code>
     *                          specifying any printing attributes,
     *                          or null for none
     * @param  interactive      whether or not to print in an interactive mode
     * @return true, unless printing is cancelled by the user
     * @throws PrinterException if an error in the print system causes the job
     *                          to be aborted
     * @throws HeadlessException if the method is asked to show a printing
     *                           dialog or run interactively, and
     *                           <code>GraphicsEnvironment.isHeadless</code>
     *                           returns true
     * @see #getPrintable
     * @see java.awt.GraphicsEnvironment#isHeadless
     *
     * @since 1.5
     */
    public boolean print(PrintMode printMode,
                         MessageFormat headerFormat,
                         MessageFormat footerFormat,
                         boolean showPrintDialog,
                         PrintRequestAttributeSet attr,
                         boolean interactive) throws PrinterException,
                                                     HeadlessException;
    /**
     * Return a <code>Printable</code> for use in printing this JTable.
     * <p>
     * The <code>Printable</code> can be requested in one of two printing modes.
     * In both modes, it spreads table rows naturally in sequence across
     * multiple pages, fitting as many rows as possible per page.
     * <code>PrintMode.NORMAL</code> specifies that the table be
     * printed at its current size. In this mode, there may be a need to spread
     * columns across pages in a similar manner to that of the rows. When the
     * need arises, columns are distributed in an order consistent with the
     * table's <code>ComponentOrientation</code>.
     * <code>PrintMode.FIT_WIDTH</code> specifies that the output be
     * scaled smaller, if necessary, to fit the table's entire width
     * (and thereby all columns) on each page. Width and height are scaled
     * equally, maintaining the aspect ratio of the output.
     * <p>
     * The <code>Printable</code> heads the portion of table on each page
     * with the appropriate section from the table's <code>JTableHeader</code>,
     * if it has one.
     * <p>
     * Header and footer text can be added to the output by providing
     * <code>MessageFormat</code> arguments. The printing code requests
     * Strings from the formats, providing a single item which may be included
     * in the formatted string: an <code>Integer</code> representing the current
     * page number.
     * <p>
     * You are encouraged to read the documentation for
     * <code>MessageFormat</code> as some characters, such as single-quote,
     * are special and need to be escaped.
     * <p>
     * Here's an example of creating a <code>MessageFormat</code> that can be
     * used to print "Duke's Table: Page - " and the current page number:
     * <p>
     * <pre>
     *     // notice the escaping of the single quote
     *     // notice how the page number is included with "{0}"
     *     MessageFormat format = new MessageFormat("Duke''s Table: Page - {0}");
     * </pre>
     * <p>
     * The <code>Printable</code> constrains what it draws to the printable
     * area of each page that it prints. Under certain circumstances, it may
     * find it impossible to fit all of a page's content into that area. In
     * these cases the output may be clipped, but the implementation
     * makes an effort to do something reasonable. Here are a few situations
     * where this is known to occur, and how they may be handled by this
     * particular implementation:
     * <ul>
     *   <li>In any mode, when the header or footer text is too wide to fit
     *       completely in the printable area -- print as much of the text as
     *       possible starting from the beginning, as determined by the table's
     *       <code>ComponentOrientation</code>.
     *   <li>In any mode, when a row is too tall to fit in the
     *       printable area -- print the upper-most portion of the row
     *       and paint no lower border on the table.
     *   <li>In <code>PrintMode.NORMAL</code> when a column
     *       is too wide to fit in the printable area -- print the center
     *       portion of the column and leave the left and right borders
     *       off the table.
     * </ul>
     * <p>
     * It is entirely valid for this <code>Printable</code> to be wrapped
     * inside another in order to create complex reports and documents. You may
     * even request that different pages be rendered into different sized
     * printable areas. The implementation must be prepared to handle this
     * (possibly by doing its layout calculations on the fly). However,
     * providing different heights to each page will likely not work well
     * with <code>PrintMode.NORMAL</code> when it has to spread columns
     * across pages.
     * <p>
     * It is important to note that this <code>Printable</code> prints the
     * table at its current visual state, using the table's existing renderers.
     * <i>Before</i> calling this method, you may wish to <i>first</i> modify
     * the state of the table (such as to change the renderers, cancel editing,
     * or hide the selection).
     * <p>
     * You must not, however, modify the table in any way <i>after</i>
     * this <code>Printable</code> is fetched (invalid modifications include
     * changes in: size, renderers, or underlying data). The behavior of the
     * returned <code>Printable</code> is undefined once the table has been
     * changed.
     * <p>
     * Here's a simple example that calls this method to fetch a
     * <code>Printable</code>, shows a cross-platform print dialog, and then
     * prints the <code>Printable</code> unless the user cancels the dialog:
     * <p>
     * <pre>
     *     // prepare the table for printing here first (for example, hide selection)
     *
     *     // wrap in a try/finally so table can be restored even if something fails
     *     try {
     *         // fetch the printable
     *         Printable printable = table.getPrintable(JTable.PrintMode.FIT_WIDTH,
     *                                                  new MessageFormat("My Table"),
     *                                                  new MessageFormat("Page - {0}"));
     *
     *         // fetch a PrinterJob
     *         PrinterJob job = PrinterJob.getPrinterJob();
     *
     *         // set the Printable on the PrinterJob
     *         job.setPrintable(printable);
     *
     *         // create an attribute set to store attributes from the print dialog
     *         PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
     *
     *         // display a print dialog and record whether or not the user cancels it
     *         boolean printAccepted = job.printDialog(attr);
     *
     *         // if the user didn't cancel the dialog
     *         if (printAccepted) {
     *             // do the printing (may need to handle PrinterException)
     *             job.print(attr);
     *         }
     *     } finally {
     *         // restore the original table state here (for example, restore selection)
     *     }
     * </pre>
     *
     * @param  printMode     the printing mode that the printable should use
     * @param  headerFormat  a <code>MessageFormat</code> specifying the text to
     *                       be used in printing a header, or null for none
     * @param  footerFormat  a <code>MessageFormat</code> specifying the text to
     *                       be used in printing a footer, or null for none
     * @return a <code>Printable</code> for printing this JTable
     * @see Printable
     * @see PrinterJob
     *
     * @since 1.5
     */
    public Printable getPrintable(PrintMode printMode,
                                  MessageFormat headerFormat,
                                  MessageFormat footerFormat);

Changes to Swing's text classes

4201999: JTextArea's don't automatically scroll when appending() to them.

Description:

Some of Swing's text component methods are thread safe; particularly those that modify the content of the text component. Prior to 5.0 the location of the caret would only be updated if the modification happens on the event dispatching thread. In certain situations it is desirable to update the location regardless of what thread the modification happens on. In order to accomodate this the updatePolicy property was added to DefaultCaret. This property allows the developer to specify when the location should change when the content changes. For backward compatibility the policy is still to only update the location if the modification happens on the event dispatching thread.

The results in the following fields and methods being added to DefaultCaret.

     /**
      * Indicates that the caret position is to be updated only when
      * document changes are performed on the Event Dispatching Thread.
      * @see #setUpdatePolicy
      * @see #getUpdatePolicy
      * @since 1.5
      */
     public static final int UPDATE_WHEN_ON_EDT = 0;

     /**
      * Indicates that the caret should remain at the same
      * absolute position in the document regardless of any document
      * updates, except when the document length becomes less than
      * the current caret position due to removal. In that case the caret
      * position is adjusted to the end of the document.
      *
      * @see #setUpdatePolicy
      * @see #getUpdatePolicy
      * @since 1.5
      */
     public static final int NEVER_UPDATE = 1;

     /**
      * Indicates that the caret position is to be <b>always</b>
      * updated accordingly to the document changes regardless whether
      * the document updates are performed on the Event Dispatching Thread
      * or not.
      *
      * @see #setUpdatePolicy
      * @see #getUpdatePolicy
      * @since 1.5
      */
     public static final int ALWAYS_UPDATE = 2;

     /**
      * Sets the caret movement policy on the document updates. Normally
      * the caret updates its absolute position within the document on
      * insertions occurred before or at the caret position and
      * on removals before the caret position. 'Absolute position'
      * means here the position relative to the start of the document.
      * For example if
      * a character is typed within editable text component it is inserted
      * at the caret position and the caret moves to the next absolute
      * position within the document due to insertion and if
      * <code>BACKSPACE</code> is typed then caret decreases its absolute
      * position due to removal of a character before it. Sometimes
      * it may be useful to turn off the caret position updates so that
      * the caret stays at the same absolute position within the
      * document position regardless of any document updates.
      * <p>
      * The following update policies are allowed:
      * <ul>
      *   <li><code>NEVER_UPDATE</code>: the caret stays at the same
      *       absolute position in the document regardless of any document
      *       updates, except when document length becomes less than
      *       the current caret position due to removal. In that case caret
      *       position is adjusted to the end of the document.
      *       The caret doesn't try to keep itself visible by scrolling
      *       the associated view when using this policy. </li>
      *   <li><code>ALWAYS_UPDATE</code>: the caret always tracks document
      *       changes. For regular changes it increases its position
      *       if an insertion occurs before or at its current position,
      *       and decreases position if a removal occurs before
      *       its current position. For undo/redo updates it is always
      *       moved to the position where update occurred. The caret
      *       also tries to keep itself visible by calling
      *       <code>adjustVisibility</code> method.</li>
      *   <li><code>UPDATE_WHEN_ON_EDT</code>: acts like <code>ALWAYS_UPDATE</code>
      *       if the document updates are performed on the Event Dispatching Thread
      *       and like <code>NEVER_UPDATE</code> if updates are performed on
      *       other thread. </li>
      * </ul> <p>
      * The default property value is <code>UPDATE_WHEN_ON_EDT</code>.
      *
      * @param policy one of the following values : <code>UPDATE_WHEN_ON_EDT</code>,
      * <code>NEVER_UPDATE</code>, <code>ALWAYS_UPDATE</code>
      * @throws IllegalArgumentException if invalid value is passed
      *
      * @see #getUpdatePolicy
      * @see #adjustVisibility
      * @see #UPDATE_WHEN_ON_EDT
      * @see #NEVER_UPDATE
      * @see #ALWAYS_UPDATE
      *
      * @since 1.5
      */
     public void setUpdatePolicy(int policy)

     /**
      * Gets the caret movement policy on document updates.
      *
      * @return one of the following values : <code>UPDATE_WHEN_ON_EDT</code>,
      * <code>NEVER_UPDATE</code>, <code>ALWAYS_UPDATE</code>
      *
      * @see #getUpdatePolicy
      * @see #UPDATE_WHEN_ON_EDT
      * @see #NEVER_UPDATE
      * @see #ALWAYS_UPDATE
      *
      * @since 1.5
      */
     public int getUpdatePolicy()

4473401: Forms should generate a hyperlink event, not directly post/get the data

Description:

JEditorPane can be used to display HTML text. When a user clicks on a link an event is generated the allows the developer to customize what will happen. Currently if a HTML page has forms in it and the user triggers a submission the post happens automatically without allowing the developer to alter the behavior. To allow developers to customize the behavior the following methods have been added to HTMLEditorKit:

    /**
     * Indicates whether an html form submission is processed automatically
     * or only <code>FormSubmitEvent</code> is fired.
     *
     * @return true  if html form submission is processed automatically,
     *         false otherwise.
     *
     * @see #setAutoFormSubmission
     * @since 1.5
     */
    public boolean isAutoFormSubmission();

    /**
     * Specifies if an html form submission is processed
     * automatically or only <code>FormSubmitEvent</code> is fired.
     * By default it the property is set to true.
     *
     * @see #isAutoFormSubmission
     * @see FormSubmitEvent
     * @since 1.5
     */
    public void setAutoFormSubmission(boolean isAuto);

A crucial part of this work was making the class FormSubmitEvent public, refer to 4954126 for details on this.

4513720: DefaultCaret visibility should be separate from blinking

Description:

There is currently no way to determine if the caret in active and blinking. The isVisible method was intended for this purpose, but the implementation returns whether the caret is painted at the moment it is invoked, i.e. if the caret is blinking isVisible changes between true and false as the caret blinks. To maintain backward compatibility the interpretation of the isVisible method has been left the same, and an isActive property was added that tells if the caret is active but not necessarily visible at the time the method is invoked.

The following methods have been added to DefaultCaret:

    /**
     * Determines if the caret is currently active.
     * <p>
     * This method returns whether or not the <code>Caret</code>
     * is currently in a blinking state. It does not provide
     * information as to whether it is currently blinked on or off.
     * To determine if the caret is currently painted use the
     * <code>isVisible</code> method.
     *
     * @return <code>true</code> if active else <code>false</code>
     * @see #isVisible
     *
     * @since 1.5
     */
    public boolean isActive()

     * Sets the caret visibility, and repaints the caret.
     * It is important to understand the relationship between this method,
     * <code>isVisible</code> and <code>isActive</code>.
     * Calling this method with a value of <code>true</code> activates the
     * caret blinking. Setting it to <code>false</code> turns it completely off.
     * To determine whether the blinking is active, you should call
     * <code>isActive</code>. In effect, <code>isActive</code> is an
     * appropriate corresponding "getter" method for this one.
     * <code>isVisible</code> can be used to fetch the current
     * visibility status of the caret, meaning whether or not it is currently
     * painted. This status will change as the caret blinks on and off.
     * <p>
     * Here's a list showing the potential return values of both
     * <code>isActive</code> and <code>isVisible</code>
     * after calling this method:
     * <p>
     * <b><code>setVisible(true)</code></b>:
     * <ul>
     *     <li>isActive(): true</li>
     *     <li>isVisible(): true or false depending on whether
     *         or not the caret is blinked on or off</li>
     * </ul>
     * <p>
     * <b><code>setVisible(false)</code></b>:
     * <ul>
     *     <li>isActive(): false</li>
     *     <li>isVisible(): false</li>
     * </ul>
     *
     * @param e the visibility specifier
     * @see #isActive
     * @see Caret#setVisible
     */
    public void setVisible(boolean e)

The documentation for DefaultCaret's isVisible method has been updated to indicate the distinction between the two properties:

    /**
     * Indicates whether or not the caret is currently visible. As the
     * caret flashes on and off the return value of this will change
     * between true, when the caret is painted, and false, when the
     * caret is not painted. <code>isActive</code> indicates whether
     * or not the caret is in a blinking state, such that it <b>can</b>
     * be visible, and <code>isVisible</code> indicates whether or not
     * the caret <b>is</b> actually visible.
     * <p>
     * Subclasses that wish to render a different flashing caret
     * should override paint and only paint the caret if this method
     * returns true.
     *
     * @return true if visible else false
     * @see Caret#isVisible
     * @see #isActive
     */
    public boolean isVisible()

4530474: background-color CSS attribute in HTML font tag works in style but not class

Description:

The background attribute from css style sheet is ignored when rendering HTML text. To get this to work we added the following method to LabelView:

    /**
     * Sets the background color for the view. This method is typically
     * invoked as part of configuring this <code>View</code>. If you need
     * to customize the background color you should override
     * <code>setPropertiesFromAttributes</code> and invoke this method. A
     * value of null indicates no background should be rendered, so that the
     * background of the parent <code>View</code> will show through.
     *
     * @param bg background color, or null
     * @see #setPropertiesFromAttributes
     * @since 1.5
     */
    protected void setBackground(Color bg);

4829622: TabSet class does not override equals

Description:

The TabSet does not override the equals method, which causes comparisons to fail if the TabStop array does contain the same TabStops. It causes AttributeSet not to be equal, even though the only difference is another object instance of TabSet.

TabSet will now override equals and hashCode:

/**
* Indicates whether this <code>TabSet</code> is equal to another one.
* @param o the <code>TabSet</code> instance which this instance
* should be compared to.
* @return <code>true</code> if <code>o</code> is the instance of
* <code>TabSet</code>, has the same number of <code>TabStop</code>s
* and they are all equal, <code>false</code> otherwise.
*
* @since 1.5
*/
public boolean equals(Object o)

/**
* Returns a hashcode for this set of TabStops.
* @return a hashcode value for this set of TabStops.
*
* @since 1.5
*/
public int hashCode()

4838730: REGRESSION: In JTextArea setEditable(...) breaks focus traversal keys

Description:

Invoking JTextArea.setEditable resets the focus traversal keys. This is problmatic for developers that want to provide a custom set of focus traversal keys and conditionally change the editable property.

To fix this JComponent now overrides the following:

    /**
     * Sets the focus traversal keys for a given traversal operation for this
     * Component.
     * Refer to
     * {@link java.awt.Component#setFocusTraversalKeys}
     * for a complete description of this method.
     *
     * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
     *        KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
     *        KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
     * @param keystrokes the Set of AWTKeyStroke for the specified operation
     * @see java.awt.KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS
     * @see java.awt.KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS
     * @see java.awt.KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS
     * @throws IllegalArgumentException if id is not one of
     *         KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
     *         KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
     *         KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or if keystrokes
     *         contains null, or if any Object in keystrokes is not an
     *         AWTKeyStroke, or if any keystroke represents a KEY_TYPED event,
     *         or if any keystroke already maps to another focus traversal
     *         operation for this Component
     * @since 1.5
     * @beaninfo
     *       bound: true
     */
    public void setFocusTraversalKeys(int id, Set keystrokes);

4954126: Make FormSubmitEvent class and its accessor methods public

Description:

As requested FormSubmitEvent is not public.

Miscellaneous Swing Changes

4198834: ListDataEvent.getIndex0() should be <= getIndex1()

Description:

ListDataEvent's constructor has been changed to swap the two indices it is passed so that the return value from getIndex0() is always <= the return value from getIndex1.

Specification

   /**
    * Constructs a ListDataEvent object. If index0 is >
    * index1, index0 and index1 will be swapped such that
    * index0 will always be <= index1.
    *
    * @param source  the source Object (typically <code>this</code>)
    * @param type    an int specifying {@link #CONTENTS_CHANGED},
    *                {@link #INTERVAL_ADDED}, or {@link #INTERVAL_REMOVED}
    * @param index0  one end of the new interval
    * @param index1  the other end of the new interval
    */
public ListDataEvent(Object source, int type, int index0, int index1) {

4303294: Implement discontinuous selection from the keyboard for list-like components

Description:

JTable and JList currently provide no way to make discontinuous selections using the keyboard. To enable this the following was added to DefaultListSelectionModel:

/**
 * Set the lead selection index, leaving all selection values unchanged.
 * If leadAnchorNotificationEnabled is true, send a notification covering
 * the old and new lead cells.
 *
 * @param leadIndex the new lead selection index
 *
 * @see #setAnchorSelectionIndex
 * @see #setLeadSelectionIndex
 * @see #getLeadSelectionIndex
 *
 * @since 1.5
 */
public void moveLeadSelectionIndex(int leadIndex)

Additionally DefaultListSelectionModel's isLeadAnchorNotificationEnabled and changeSelection methods were revised.

4621323: Some swing constants are not constant.

Description:

The following static fields are now static final: JDesktopPane.LIVE_DRAG_MODE, JDesktopPane.OUTLINE_DRAG_MODE and DTD.FILE_VERSION.

4664885: Shadow colors are swapped depending on whether BevelBorder is raised/lowered

Description:

Bevel borders interchange their shadowInner and shadowOuter colors depending on whether they are raised or lowered. However, the BorderFactory and BevelBorder don't say this - it's written for a raised bevel border only. This resulted in adding the following to BevelBorder's constructor and BorderFactory's createBevelBorder method:

     * Note: The shadow inner and outer colors are
     * switched for a lowered bevel border.

4665148: javadoc for javax.swing.JScrollPane.isValidateRoot is completely wrong

Description:

Javadoc for JScrollPane.isValidateRoot is completely wrong and misleading and has been changed to:
    /**
     * Overridden to return true so that any calls to <code>revalidate</code>
     * on any descendants of this <code>JScrollPane</code> will cause the
     * entire tree beginning with this <code>JScrollPane</code> to be
     * validated.
     *
     * @return true
     * @see java.awt.Container#validate
     * @see JComponent#revalidate
     * @see JComponent#isValidateRoot
     *
     * @beaninfo
     *    hidden: true
     */

4682386: Refactoring SwingPropertyChangeSupport and PropertyChangeSupport

Description:

The PropertyChangeSupport class is a utility that makes it easy to register and fire PropertyChangeEvents - which is a notification that a JavaBean property has been modified. SwingPropertyChangeSupport is a subclass of PropertyChangeSupport and has a lot of redundant methods. Furthermore, in the 1.2 timeframe, support for property changes was added to Component. Rather than introduce a dependency on SwingPropertyChangeSupport, Component uses PropertyChangeSupport. JComponent maintains an instance of SwingPropertyChangeSupport and Component maintains an instance of PropertyChangeSupport. The results is every JComponent having two instances of PropertyChangeSupport - one of which is dormant. To cut down on the overlap between Component and JComponent as well as PropertyChangeSupport and SwingPropertyChangeSupport the following changes were made:

Promote the following methods from JComponent to Component:

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a byte)
     * @param newValue the new value of the property (as a byte)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
    public void firePropertyChange(String propertyName, byte oldValue, byte newValue);

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a char)
     * @param newValue the new value of the property (as a char)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
     public void firePropertyChange(String propertyName, char oldValue, char newValue);

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a short)
     * @param newValue the old value of the property (as a short)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
    public void firePropertyChange(String propertyName, short oldValue, short newValue);

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a long)
     * @param newValue the new value of the property (as a long)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
    public void firePropertyChange(String propertyName, long oldValue, long newValue);

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a float)
     * @param newValue the new value of the property (as a float)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
    public void firePropertyChange(String propertyName, float oldValue, float newValue);

    /**
     * Reports a bound property change.
     *
     * @param propertyName the programmatic name of the property
     *               that was changed
     * @param oldValue the old value of the property (as a double)
     * @param newValue the new value of the property (as a double)
     * @see #firePropertyChange(java.lang.String, java.lang.Object,
     *               java.lang.Object)
     * @since 1.5
     */
    public void firePropertyChange(String propertyName, double oldValue, double newValue);

The corresponding methods in JComponent have been removed.

All the methods from SwingPropertyChangeSupport have been removed, only the constructor remains.

4706356: Swing's default CellRenderers should override more methods for improved perf

Description:

Swing's cell rendenders override a handful of methods to do nothing as they are not needed for cell renderers. They should override a couple of methods that are now being called to do nothing.

The following methods were added to DefaultTableCellRenderer, DefaultListCellRenderer and DefaultTreeCellRenderer

    /**
     * Overridden for performance reasons.
     * See the <a href="#override">Implementation Note</a>
     * for more information.
     *
     * @since 1.5
     */
    public void invalidate();
    /**
     * Overridden for performance reasons.
     * See the <a href="#override">Implementation Note</a>
     * for more information.
     *
     * @since 1.5
     */
    public void repaint();

4716935: Invoking JLayeredPane.removeAll can result in a leak

Description:

JLayeredPane maintains a HashTable of the Components it contains. It does not currently override removeAll to update the HashTable, resulting in a possible leak. JLayeredPane will now override removeAll to do the necessary cleanup:

    /**
     * Removes all the components from this container.
     *
     * @since 1.5
     */
    public void removeAll();

4717180: Swing should document that UIs may change visual properties when installed

Description:

Swing classes document the default value of many properties. Custom look and feels may change these values so that it appears that the default isn't valid, this needs to be clarified. To document this, the following was added to JComponent's class level javadoc:

     * <code>JComponent</code> and its subclasses document default values
     * for certain properties.  For example, <code>JTable</code> documents the
     * default row height as 16.  Each <code>JComponent</code> subclass
     * that has a <code>ComponentUI</code> will create the
     * <code>ComponentUI</code> as part of its constructor.  In order
     * to provide a particular look and feel each
     * <code>ComponentUI</code> may set properties back on the
     * <code>JComponent</code> that created it.  For example, a custom
     * look and feel may require <code>JTable</code>s to have a row
     * height of 24. The documented defaults are the value of a property
     * BEFORE the <code>ComponentUI</code> has been installed.  If you
     * need a specific value for a particular property you should
     * explicitly set it.

4723745: Metal & Windows FileChooserUI classes cannot be used without ShellFolder

Description:

Since 1.4, the JFileChooser code has too strong a dependence on the native layer. An attempt was made to bypass this class for programs that use a customized "virtual" filesystem, but the algorithm is not 100% reliable. To toggle this behavior, use the client property FileChooser.useShellFolder, for example, to turn off use of the native set this to false:

    jFileChooser.putClientProperty("FileChooser.useShellFolder", Boolean.FALSE);

4749723: Spring and SpringLayout need some ease of methods methods

Description:

It is currently rather difficult to construct some common layouts with SpringLayout. Builders have requested a couple methods to make it easier to create common layouts with SpringLayout, as well as to make it easier to persist SpringLayout.

The following has been added to Spring:

    /**
     * Returns a spring whose <em>minimum</em>, <em>preferred</em>, <em>maximum</em>
     * and <em>value</em> properties are each multiples of the properties of the
     * argument spring, <code>s</code>. Minimum and maximum properties are
     * swapped when <code>factor</code> is negative (in accordance with the
     * rules of interval arithmetic).
     * <p>
     * When factor is, for example, 0.5f the result represents 'the mid-point'
     * of its input - an operation that is useful for centering components in
     * a container.
     *
     * @param s the spring to scale
     * @param factor amount to scale by.
     * @return  a spring whose properties are those of the input spring <code>s</code>
     * multiplied by <code>factor</code>
     * @throws NullPointerException if <code>s</code> is null
     * @since 1.5
     */
    public static Spring scale(Spring s, float factor);

    /**
     * Returns a spring whose <em>minimum</em>, <em>preferred</em>, <em>maximum</em>
     * and <em>value</em> properties are defined by the widths of the <em>minimumSize</em>,
     * <em>preferredSize</em>, <em>maximumSize</em> and <em>size</em> properties
     * of the supplied component. The returned spring is a 'wrapper' implementation
     * whose methods call the appropriate size methods of the supplied component.
     * The minimum, preferred, maximum and value properties of the returned spring
     * therefore report the current state of the appropriate properties in the
     * component and track them as they change.
     *
     * @param c Component used for calculating size
     * @return  a spring whose properties are defined by the horizontal component
     * of the component's size methods.
     * @throws NullPointerException if <code>c</code> is null
     * @since 1.5
     */
    public static Spring width(Component c);

    /**
     * Returns a spring whose <em>minimum</em>, <em>preferred</em>, <em>maximum</em>
     * and <em>value</em> properties are defined by the heights of the <em>minimumSize</em>,
     * <em>preferredSize</em>, <em>maximumSize</em> and <em>size</em> properties
     * of the supplied component. The returned spring is a 'wrapper' implementation
     * whose methods call the appropriate size methods of the supplied component.
     * The minimum, preferred, maximum and value properties of the returned spring
     * therefore report the current state of the appropriate properties in the
     * component and track them as they change.
     *
     * @param c Component used for calculating size
     * @return  a spring whose properties are defined by the vertical component
     * of the component's size methods.
     * @throws NullPointerException if <code>c</code> is null
     * @since 1.5
     */
    public static Spring height(Component c);

And the following has been added to SpringLayout.Constraints:

        /**
         * Creates a <code>Constraints</code> object with
         * suitable <code>x</code>, <code>y</code>, <code>width</code> and
         * <code>height</code> springs for component, <code>c</code>.
         * The <code>x</code> and <code>y</code> springs are constant
         * springs  initialised with the component's location at
         * the time this method is called. The <code>width</code> and
         * <code>height</code> springs are special springs, created by
         * the <code>Spring.width()</code> and <code>Spring.height()</code>
         * methods, which track the size characteristics of the component
         * when they change.
         *
         * @param c  the component whose characteristics will be reflected by this Constraints object
         * @throws NullPointerException if <code>c</code> is null.
         * @since 1.5
         */
        public Constraints(Component c);

4753342: Swing's top level component should redirect add/remove methods to ContentPane

Description:

Contrary to AWT programming, JFrame/JDialg/JWindow/JApplet/JInternalFrame do not allow you to add Components to it, instead you must learn about JRootPane and add children Components to it. This adds needless confusion to new developers.

Prior to 5.0, attempting to add or remove a Component from one of these top level Components would result in an exception be thrown. In 5.0, no exception will be thrown, instead the Component will be added or removed from the content pane. This resulted in several revisions to the javadoc of JFrame, JDialog, JWindow, JApplet and JInternalFrame. This has been summarized in RootPaneContainer's javadoc:

     * For conveniance
     * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
     * <code>JApplet</code> and <code>JInternalFrame</code>, by default,
     * forward all calls to <code>add</code> and its variants,
     * <code>remove</code> and <code>setLayout</code> to the
     * <code>contentPane</code>. This means rather than writing:
     * <pre>
     * rootPaneContainer.getContentPane().add(component);
     * </pre>
     * you can do:
     * <pre>
     * rootPaneContainer.add(component);
     * </pre>
     * <p>
     * The behavior of <code>add</code> and its variants and
     * <code>setLayout</code> for
     * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
     * <code>JApplet</code> and <code>JInternalFrame</code> is controlled by
     * the <code>rootPaneCheckingEnabled</code> property. If this property is
     * true, the default, then <code>add</code> and its variants and
     * <code>setLayout</code> are
     * forwarded to the <code>contentPane</code>, if it is false, then these
     * methods operate directly on the <code>RootPaneContainer</code>. This
     * property is only intended for subclasses, and is therefor protected.

4789491: JFileChooser doesn't say how to choose directories

Description:

The documentation for JFileChooser is not clear on where to tell the file chooser whether files, directories or both are to be selected. This resulted in revising the documentation for the following methods:

    /**
     * Adds a filter to the list of user choosable file filters.
     * For information on setting the file selection mode, see
     * {@link #setFileSelectionMode setFileSelectionMode}.
     *
     * @param filter the <code>FileFilter</code> to add to the choosable file
     *               filter list
     *
     * @beaninfo
     *   preferred: true
     *       bound: true
     * description: Adds a filter to the list of user choosable file filters.
     *
     * @see #getChoosableFileFilters
     * @see #removeChoosableFileFilter
     * @see #resetChoosableFileFilters
     * @see #setFileSelectionMode
     */
    public void addChoosableFileFilter(FileFilter filter);

    /**
     * Sets the <code>JFileChooser</code> to allow the user to just
     * select files, just select
     * directories, or select both files and directories.  The default is
     * <code>JFilesChooser.FILES_ONLY</code>.
     *
     * @param mode the type of files to be displayed:
     * <ul>
     * <li>JFileChooser.FILES_ONLY
     * <li>JFileChooser.DIRECTORIES_ONLY
     * <li>JFileChooser.FILES_AND_DIRECTORIES
     * </ul>
     *
     * @exception IllegalArgumentException  if <code>mode</code> is an
     *                          illegal file selection mode
     * @beaninfo
     *   preferred: true
     *       bound: true
     * description: Sets the types of files that the JFileChooser can choose.
     *        enum: FILES_ONLY JFileChooser.FILES_ONLY
     *              DIRECTORIES_ONLY JFileChooser.DIRECTORIES_ONLY
     *              FILES_AND_DIRECTORIES JFileChooser.FILES_AND_DIRECTORIES
     *
     *
     * @see #getFileSelectionMode
     */
    public void setFileSelectionMode(int mode);

4831322: JDesktopPane.setDesktopManager should update the desktop manager at the UI.

Description:

Invoking JDesktopPane.setDesktopManager does not take affect until the UI is reloaded.

To fix this BasicDesktopPaneUI will not override the following methods:

    /**
     * Installs the <code>PropertyChangeListener</code> returned from
     * <code>createPropertyChangeListener</code> on the <code>JDesktopPane</code>.
     *
     * @since 1.5
     * @see #createPropertyChangeListener
     */
    protected void installListeners()

    /**
     * Uninstalls the <code>PropertyChangeListener</code> returned from
     * <code>createPropertyChangeListener</code> from the <code>JDesktopPane</code>.
     *
     * @since 1.5
     * @see #createPropertyChangeListener
     */
    protected void uninstallListeners()

    /*
     * Returns the <code>PropertyChangeListener</code> to install on
     * the <code>JDesktopPane</code>.
     *
     * @since 1.5
     * @return The PropertyChangeListener that will be added to track
     * changes in the desktop pane.
     */
    protected PropertyChangeListener createPropertyChangeListener()

4864304: Improve memory consumption of Swing apps

Description:

To cut down on the per instance size of various JComponent subclasses the following changes have been made.

To avoid duplicate storage of the preferred, minimum and maximum size of JComponent's the following methods have been promoted to Component:

    /**
     * Sets the preferred size of this component to a constant
     * value.  Subsequent calls to <code>getPreferredSize</code> will always
     * return this value.  Setting the preferred size to <code>null</code>
     * restores the default behavior.
     *
     * @param preferredSize The new preferred size, or null
     * @see #getPreferredSize
     * @see #isPreferredSizeSet
     * @since 1.5
     */
    public void setPreferredSize(Dimension preferredSize);

    /**
     * Returns true if the preferred size has been set to a
     * non-<code>null</code> value otherwise returns false.
     *
     * @return true if <code>setPreferredSize</code> has been invoked
     *         with a non-null value.
     * @since 1.5
     */
    public boolean isPreferredSizeSet();

    /**
     * Sets the minimum size of this component to a constant
     * value.  Subsequent calls to <code>getMinimumSize</code> will always
     * return this value.  Setting the minimum size to <code>null</code>
     * restores the default behavior.
     *
     * @param minimumSize the new minimum size of this component
     * @see #getMinimumSize
     * @see #isMinimumSizeSet
     * @since 1.5
     */
    public void setMinimumSize(Dimension minimumSize);

    /**
     * Returns whether or not <code>setMinimumSize</code> has been
     * invoked with a non-null value.
     *
     * @return true if <code>setMinimumSize</code> has been invoked with a
     *              non-null value.
     * @since 1.5
     */
    public boolean isMinimumSizeSet();

    /**
     * Sets the maximum size of this component to a constant
     * value.  Subsequent calls to <code>getMaximumSize</code> will always
     * return this value.  Setting the maximum size to <code>null</code>
     * restores the default behavior.
     *
     * @param maximumSize a <code>Dimension</code> containing the
     *               desired maximum allowable size
     * @see #getMaximumSize
     * @see #isMaximumSizeSet
     * @since 1.5
     */
    public void setMaximumSize(Dimension maximumSize);

    /**
     * Returns true if the maximum size has been set to a non-<code>null</code>
     * value otherwise returns false.
     *
     * @return true if <code>maximumSize</code> is non-<code>null</code>,
     *               false otherwise
     * @since 1.5
     */
    public boolean isMaximumSizeSet();

To improve memory needed for autoscrolling JComponent will now override the following method:

    /**
     * Processes mouse events occurring on this component by
     * dispatching them to any registered
     * <code>MouseListener</code> objects, refer to
     * {@link java.awt.Component#processMouseEvent(MouseEvent)}
     * for a complete description of this method.
     *
     * @param       e the mouse event
     * @see         java.awt.Component#processMouseEvent
     * @since 1.5
     */
    protected void processMouseEvent(MouseEvent e);

To reduce the size of AbstractButton's the following methods will be overriden:

    /**
     * Adds the specified component to this container at the specified
     * index, refer to
     * {@link java.awt.Container#addImpl(Component, Object, int)}
     * for a complete description of this method.
     *
     * @param     comp the component to be added
     * @param     constraints an object expressing layout constraints
     *                 for this component
     * @param     index the position in the container's list at which to
     *                 insert the component, where <code>-1</code>
     *                 means append to the end
     * @exception IllegalArgumentException if <code>index</code> is invalid
     * @exception IllegalArgumentException if adding the container's parent
     *                  to itself
     * @exception IllegalArgumentException if adding a window to a container
     * @since 1.5
     */
    protected void addImpl(Component comp, Object constraints, int index);

    /**
     * Sets the layout manager for this container, refer to
     * {@link java.awt.Container#setLayout(LayoutManager)}
     * for a complete description of this method.
     *
     * @param mgr the specified layout manager
     * @since 1.5
     */
    public void setLayout(LayoutManager mgr);

4905905: Swing's key binding mapping documentation if out of date.

Description:

Swing documents the key bindings for various components in the files Key-Index.html, Key-Metal.html, Key-Motif.html and Key-Windows.html. These files are in the directory src/share/classes/javax/swing/doc-files and are referenced by a handful of Swing widgets. These files are extremely dated and never really documented all of Swing's key bindings, they have been removed along with all references to them.

4908889: GTKLookAndFeel should be the system look and feel for Solaris w/Gnome

Description:

Swing's UIManager class is used, among other things, to find out the name of the class that can be used to provide the look and feel for the current system. On Solaris w/Gnome the call getSystemLookAndFeelClassName should return the package name for the GTK look and feel.

This resulted in the following changes to UIManager:

    /**
     * Returns the name of the <code>LookAndFeel</code> class that implements
     * the native systems look and feel if there is one, otherwise
     * the name of the default cross platform <code>LookAndFeel</code>
     * class. If the system property <code>swing.systemlaf</code> has been
     * defined, it's value will be returned.
     *
     * @return the <code>String</code> of the <code>LookAndFeel</code>
     *               class
     *
     * @see #setLookAndFeel
     * @see #getCrossPlatformLookAndFeelClassName
     */
    public static String getSystemLookAndFeelClassName();

    /**
     * Returns the name of the <code>LookAndFeel</code> class that implements
     * the default cross platform look and feel -- the Java
     * Look and Feel (JLF).  If the system property
     * <code>swing.crossplatformlaf</code> has been
     * defined, it's value will be returned.
     *
     * @return  a string with the JLF implementation-class
     * @see #setLookAndFeel
     * @see #getSystemLookAndFeelClassName
     */
    public static String getCrossPlatformLookAndFeelClassName();

As part of this work we also created the WindowsClassicLookAndFeel. This class is useful to force the windows classic look to be used even if you are running XP.

4953840: Add override of getFontMetrics to JComponent

Description:

As a precursor to providing antialiased text in Swing JComponent will now override the following method:

    /**
     * Gets the <code>FontMetrics</code> for the specified <code>Font</code>.
     *
     * @param font the font for which font metrics is to be
     *          obtained
     * @return the font metrics for <code>font</code>
     * @throws NullPointerException if <code>font</code> is null
     * @since 1.5
     */
    public FontMetrics getFontMetrics(Font font);

Potential Incompatibilities

A handful of these API changes have introduced potential incompatibilities between 5.0 and previous releases. Very few developers will be affected by these changes. The possible incompatibilities are listed below:

4607364

Ocean draws a gradient on buttons. The gradient will only be drawn if the contentAreaFilled property is true, or the background property is an instance of UIResource. If you do not want the gradient, either set the contentAreaFilled property to false, or set the background to a non-UIResource. In most cases this is a simple as:

    button.setBackground(Color.RED);

If, for some reason, you are picking up a UIResource you need to create a new Color that is not a UIResource, for example:

    button.setBackground(new Color(oldColor));

4303294

JTree and JList interpret cursor movement relative to the lead. For example, if the lead is on row four in a JTree and you press the up key the selection changes to row three. Similarly, JTree and JList pass an argument to their renderers indicating whether the item being rendered has the focus; this is based on whether the item being rendered is the lead. Prior to 5.0, JTable used the anchor for these situations; in 5.0, JTable uses the lead. This could affect developers that were assuming the anchor was the cell that has the focus and could result in rendering a focus indicator in the wrong situations.

4864304

To render the popup for a JComboBox Sun's look and feels use an instance of JScrollPane. The JScrollPane is configured to never have a horizontal scroll bar. In 5.0 setHorizontalScrollBar(null) is now invoked.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing APIs and Developer Guides

Documentation Contents

Swing

Swing implements a set of components for building graphical user interfaces (GUIs) and adding rich graphics functionality and interactivity to Java applications. The Swing components are implemented entirely in the Java programming language. The pluggable look and feel lets you create GUIs that can either look the same across platforms or can assume the look and feel of the current OS platform (such as Microsoft Windows, Solaris™ or Linux).

Overview

  • About Swing from The Swing Tutorial.

API Specification

  • API Reference
  • Focus Model Specification

Tutorials and Programmer's Guides

  • The Swing Tutorial

API Enhancements

  • Swing Enhancements in Java SE 8
  • Swing Enhancements in Java SE 7
  • Swing Enhancements in Java SE 6.0
  • Swing Enhancements in Java SE 5.0
  • Swing Enhancements in Java SE 1.4.1 and 1.4.2
  • Swing Enhancements in Java SE 1.4

More Information

  • Java Desktop Community
  • Java SE Desktop Overview
  • JavaFX Documentation

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Enhancements in Java 6.0

Documentation Contents

Swing Enhancements in the Java Standard Edition 6.0

Major Features
  • Platform Look and Feel Improvements
  • SwingWorker
  • Text Printing
  • JTable Sorting and Filtering
  • Layout Enhancements
  • Arbitrary Components as Tabs of JTabbedPane
  • True Double Buffering
  • GroupLayout Layout Manager
  • Drag and Drop Enhancements
  • Nimbus Look and Feel
Miscellaneous Changes
  • Ability to Reset a ButtonGroup to Unselected State
  • New Constants for the javax.swing.Action Interface
  • Support for True Parentless JDialogs

Major Features

Platform Look and Feel Improvements

Both GTK and Windows look and feels were enhanced and improved by taking advantage of native rendering engines. All Swing components appear in accordance with the underlying platform's look and feel, provide appropriate feedback and have the correct size.

SwingWorker

An abstract class javax.swing.SwingWorker was added to the JDK. The SwingWorker class enables a long-running task to be executed on a background thread. A subclass of SwingWorker must implement the doInBackground() method, which performs the background computation. While the background task is being executed, the event dispatch thread processes events and provides any necessary updates to the UI. The SwingWorker class supports intermediate results. The background task can invoke the publish method, which sends partial data to the process method for processing on the event dispatch thread. In addition, the SwingWorker class supports property change listeners. Any change of a property triggers an event, which invokes event-handling methods on the event dispatch thread.

The use of the SwingWorker is recommended to accomplish time-consuming tasks. For details, see the Concurrency in Swing section of the Swing tutorial.

Text Printing

Several new methods of the javax.swing.JTextComponent class provide printing support for text documents. Supported formats include HTML, RTF, and plain text. The new API allows you to print the entire contents of a text component regardless of whether the component is visible or not. Features include printing interactively or non-interactively, displaying a print dialog, adding custom headers or footers, and automatic layout and pagination. The document content is formatted to fit the page size.

The new API includes the following methods:

  • boolean print()
  • boolean print(MessageFormat, MessageFormat)
  • boolean print(MessageFormat, MessageFormat, boolean, PrintService, PrintRequestAttributeSet, boolean)
  • Printable getPrintable(MessageFormat,MessageFormat)
For details, see the How to Print Text section of the Swing tutorial.

JTable Sorting and Filtering

To provide sorting and filtering capabilities, several new classes were added to the JDK. The basis for sorting and filtering is provided by the abstract RowSorter class. The DefaultRowSorter class is an implementation of the RowSorter class that deals with grid-based models. The TableRowSorter class was added to the javax.swing.table package as an implementation of the RowSorter class for JTables. The TableRowSorter class enables you to specify different Comparators and also provides a filtering option.

For details, see the How to Use Tables section of the Swing tutorial.

Layout Enhancements

The new API is intended for developers who write layout managers and includes the following two features: an ability to get the baseline for components and an ability to get the preferred spacing between components.

Professional layouts typically align components along their baseline. Previously, Swing provided no means to get the baseline of components. As a solution to this problem, the getBaseline(int,int) and getBaselineResizeBehavior() methods were added to the javax.swing.JComponent class to get the baseline and the baseline behavior when a component's size changes.

Each look and feel provides different guidelines regarding how far components should be placed from each other. In order to create a cross platform look and feel there should be an API for getting this information. As a solution, the javax.swing.LayoutStyle class was added. Layout managers can use this class to determine the preferred amount of space to place between components. Look and feel authors can provide a custom LayoutStyle by overriding the getLayoutStyle() method of the look and feel.

Arbitrary Components as Tabs of JTabbedPane

Prior to release 6, the content of a tabbed pane's tab was limited to a string or an icon (or both). The new API allows you to add custom components to tabs. The most common use of this feature is to add close buttons that remove tabs from tabbed panes. The following new methods were added to the javax.swing.JTabbedPane class:

  • setTabComponentAt(int, Component)
  • getTabComponentAt(int)
  • indexOfTabComponent(Component)

For details, see the How to Use Tabbed Panes section of the Swing tutorial.

True Double Buffering

Previously, when a Swing based application was exposed after being hidden by another application, there was a noticeable delay between the moment when the background of the window was erased and the moment when the window painted. The problem has been resolved with adding true double buffering to Swing.

Each window has an off-screen image that is synchronised with the corresponding on-screen image. As a window is exposed, its off-screen image is directly copied on the toolkit thread to the screen. Another benefit applies to applications that block the event dispatch thread. If a user hides and then exposes an application window, the application still paints while the EDT is being blocked.

In addition, the RepaintManager class now handles painting for Swing top-level components (JApplet, JWindow, JFrame, and JDialog) and supports new painting architecture based on a component's location in the window. The following new methods were added to the RepaintManager class:

  • addDirtyRegion(Applet, int, int, int, int)
  • addDirtyRegion(JComponent, int, int, int, int)
  • addDirtyRegion(WIndow, int, int, int, int)

All Swing top-level components override the repaint method, which calls the appropriate addDirtyRegion method.

The JRootPane class now overrides the setDoubleBuffered method, which defines whether this component should use a buffer for painting or not.

GroupLayout Layout Manager

The GroupLayout layout manager was added to the javax.swing package. This layout was developed for the GUI builder provided with the NetBeans IDE. The GroupLayout is primarily intended for use by GUI builders but may be hand-coded as well.

For details, see the How to Use GroupLayout section of the Swing tutorial.

Drag and Drop Enhancements

Two major enhancements were introduced to the Drag and Drop feature in release 6.

First, the Drag and Drop operation can be configured not to use a selection for showing a drop location (refer to the Bug Database, bug ID 4468566.) The new mechanism introduces the DropMode property for components that support drops such as JTree, JTable, JList, and JTextComponent. The DropMode property is used to determine the mode by which a component tracks and indicates a drop location. To set this property for a component, the setDropMode(DropMode) method was added to the component's class for each component mentioned above. Listed below are available drop modes and the components that support them:

  • ON - JList, JTree, JTable
  • INSERT - JList, JTree, JTable, JTextComponent
  • ON_OR_INSERT - JList, JTree, JTable
  • ON_OR_INSERT_ROWS, ON_OR_INSERT_COLS - JTable
  • USE_SELECTION - JList, JTree, JTable, JTextComponent

For backward compatibility the default value of this property is set to USE_SELECTION. To take advantage of the improved Drag and Drop feature, use one of the other drop modes mentioned above.

The second enhancement involves the TransferHandler class with regard to handling drop operations. Previously, the TransferHandler class was unable to accomplish common drop-related tasks since import handling methods lacked necessary information. The new TransferHandler.TransferSupport inner class provides details on every transfer operation.

New overloaded versions of the canImport and importData methods were added to the TransferHandler class. These methods take an instance of the TransferSupport class and thus allow developers to accept or reject transfers based on the details of the transfer. Developers can also customize drop behavior based on a Transferable, a drop location, or a drop action associated with a transfer retrieved from the TransferSupport instance. For example, the new canImport method can be implemented to detect an attempt to move data from a child to its parent and reject such a transfer. Unlike previous versions, the canImport method is called continuously by a component's TransferHandler, while a drag and drop operation takes place over the component. This feature provides the mechanism by which the acceptability of a transfer can be changed many times during the operation. For backward compatibility, the old version of the canImport method is called by the new version by default.

Another improvement includes addition of TransferHandler support to top-level components. This support is provided by means of the setTransferHandler and getTransferHandler methods added to the class of each top-level component (JApplet, JWindow, JFrame, and JDialog).

Previously users had to make a selection first and then click the selected item again to initiate a drag operation. Now a drag operation is initiated with a single mouse click (refer to the Bug Database, bug ID 4521075.)

For details, see the Drag and Drop and Data Transfer section of the Swing tutorial.

Nimbus Look and Feel

Nimbus, a cross platform look and feel introduced in the Java SE 6 update 10 release, is drawn with 2D vector graphics and can be rendered at any resolution. See Nimbus Look and Feel for more information.

Miscellaneous Changes

Ability to Reset a ButtonGroup to an Unselected State

The ButtonGroup class is used to create a multiple-exclusion scope for a set of buttons. Initially all buttons in a group are unselected. Previously there was no way to return to the unselected state after selecting a button. Now the clearSelection method allows developers to clear the selection so that none of the buttons in the group are selected.

New Constants for the javax.swing.Action Interface

The following constants were added to the Action interface.

  • SELECTED_KEY
    This key is used to store the selected state of a component. It is used for components with meaningful selection state such as JRadioButton and JCheckBox instances.
  • DISPLAYED_MNEMONIC_INDEX_KEY
    This key is used to specify an index in the text at which a mnemonic decoration should be placed.
  • LARGE_ICON_KEY
    This key is used to store an icon.
The hideActionText property determines whether a button displays the text from the Action. To set and get this property, the following new methods were added to the AbstractButton class: setHideActionText(boolean) and getHideActionText() correspondingly.

Support for True Parentless JDialogs

In JDK 5.0 and earlier versions, the following line of code threw an exception:

JDialog d = new JDialog((Dialog)null);

Swing only allowed you to pass null to the constructor JDialog(Frame):

JDialog d = new JDialog((Frame)null);

In the latter case an invisible shared-owner frame was a parent for all parentless JDialogs.

With the new Modality model added to the JDK 6, AWT allows creation of truly parentless dialogs. This means that d.getParent() returns null for these dialogs. To make use of new modality API, JDialogs also need to be truly parentless (refer to the Bug Database, bug ID 6300062.)

New constructors with a Window parameter as an owner were added to the JDialog class and a new method was added to the JOptionPane class. To create a parentless JDialog, you can now pass null to either of constructors JDialog(Dialog) or JDialog(Window). To create a parentless JOptionPane, use the createDialog(String) method.

As a summary, have a look at the three constuctors below:

JDialog d = new JDialog((Dialog)null);

JDialog d = new JDialog((Window)null);

JDialog d = new JDialog((Frame)null);

Note the difference: although all three constructors take null, only the first two dialogs are truly parentless and the operation d.getParent() returns null for them. For the third dialog d.getParent() returns the shared-owner frame.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Enhancements in Java SE 7

The following topics are covered:

  • JLayer Class
  • Nimbus Look & Feel
  • Heavyweight and Lightweight Components
  • Shaped and Translucent Windows
  • Hue-Saturation-Luminance (HSL) Color Selection in JColorChooser Class

JLayer Class

The JLayer class is a flexible and powerful decorator for Swing components. It enables you to draw on components and respond to component events without modifying the underlying component directly. For more information, read How to Decorate Components with JLayer in the Java Tutorial.

Nimbus Look & Feel

The Nimbus Look & Feel (L&F) has moved from com.sun.java.swing to a standard API namespace, javax.swing; see the javax.swing.plaf.nimbus package for more information. Although it is not the default L&F, you can easily use it. Consult the Nimbus Look and Feel section in the Java Tutorial for more information and examples of three simple methods for using Nimbus in your applications.

Heavyweight and Lightweight Components

Historically, mixing heavyweight (AWT) and lightweight (Swing) components in the same container has been problematic. However, mixing heavyweight and lightweight components is easy to accomplish in Java SE 7. The Mixing Heavyweight and Lightweight Components article shows you how.

Shaped and Translucent Windows

The Java SE 7 release supports windows with transparency and non-rectangular shapes. See How to Create Translucent and Shaped Windows, part of the Java Tutorial.

Hue-Saturation-Luminance (HSL) Color Selection in JColorChooser Class

An HSV tab has been added to the JColorChooser class, which allows users to select colors using the Hue-Saturation-Luminance (HSL) color model.

In addition, the following technologies feature related enhancements:

  • AWT Enhancements in JDK 7
  • Drag n Drop Enhancements in JDK 7
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Enhancements in Java SE 8

The following topics are covered:

  • Accessibility

Accessibility

The javax.swing.JComponent.accessibleFocusHandler method is deprecated. It duplicates the functionality of a field in the java.awt.Container.AccessibleAWTContainer superclass. Use the java.awt.Component.AccessibleAWTComponent.accessibleAWTFocusHandler field instead. For more information, see 7179482.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Formatted Text Fields

This document outlines the Swing implementation of formatted text fields. Formatted text fields provide a way for developers to specify the legal set of characters that can be input into a text component. This document is arranged in the following sections:

  • Using JFormattedTextField
  • How JFormattedTextField Works
  • Filtering Input
  • Filtering Navigation
  • JFormattedTextField.AbstractFormatter
  • JFormattedTextField.AbstractFormatterFactory
  • DefaultFormatter
  • AbstractFormatter implementations
  • java.text.Format changes
  • JavaDoc

Using JFormattedTextField

JFormattedTextField will allow formatting of dates, numbers, Strings and arbitrary Objects. JFormattedTextField will rely on the java.text.Format classes to handle formatting of dates and numbers. To create a JFormattedTextField to input dates in the current locale-specific format:

    new JFormattedTextField(new Date());

If you need to display the dates in a specific format, you can use one of the SimpleDateFormat constructors:

    new JFormattedTextField(new SimpleDateFormat("MM/dd/yy"));

Numbers will be handled by an instance of java.text.NumberFormat. The following shows several ways to create a JFormattedTextField to edit numbers.

   new JFormattedTextField(new Number(1000));
   new JFormattedTextField(new DecimalFormat("#,###"));
   new JFormattedTextField(new DecimalFormat("0.###E0"));

JFormattedTextField will also support editing of strings given a mask that specifies what the legal characters are at a given character position. To create a JFormattedTextField to edit US phone numbers the following could be used:

   new JFormattedTextField(new MaskFormatter("(###) ###-####"));

How JFormattedTextField Works

JFormattedTextField itself exposes a minimal amount of API in addition to that of its super class, JTextField. In its simplest terms, JFormattedTextField can be thought of as a JTextField with an additional value property (of type Object) and an object to handle the formatting (instance of AbstractFormatter).

As the value property is of type Object, it is necessary for the developer to cast the return type based on how the JFormattedTextField has been configured. The following shows a typical scenario of using a JFormattedTextField with dates:

  JFormattedTextField ftf = new JFormattedTextField();
  ftf.setValue(new Date());
  ...
  Date date = (Date)ftf.getValue();

A typical session for editing numbers looks like:

  JFormattedTextField ftf = new JFormattedTextField();
  ftf.setValue(new Integer(1000));
  ...
  int intValue = ((Number)ftf.getValue()).intValue();

Filtering Input

Constraining the input into a text component previously required creating a subclass of Document. This is a rather heavy operation for such a simple, and common, usage. To make this task easier, we have created a class, DocumentFilter, that can be plugged into a Document (Document is an interface, which has not changed, instead AbstractDocument now has a setter/getter for a DocumentFilter, and a property is set for Documents that do not descend from AbstractDocument so that others can support DocumentFilter should they want to). When a Document with a DocumentFilter is messaged to remove or insert content, the Document invokes the corresponding method on the DocumentFilter. It is the DocumentFilter's responsibility to issue a callback if the operation should proceed. In this manner the DocumentFilter has total control over how the Document can be mutated. DocumentFilter is defined by:

  public void remove(FilterBypass fb, int offset, int length) throws BadLocationException;
  public void insertString(FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException;
  public void replace(FilterBypass fb, int offset, int length, String string, AttributeSet attr) throws BadLocationException;

If the DocumentFilter wants to mutate the Document from inside the remove or insertString methods, it should either invoke super's implementation, or invoke the method on the FilterBypass. Invoking the method on super or FilterBypass provides a way to circumvent the filter so that the caller doesn't get stuck in stack recursion. The DocumentFilter is not limited to only invoking one method back on the FilterBypass. It can invoke any of the methods exposed by FilterBypass, and can invoke them as many times as it wishes (within the scope of one of DocumentFilter's methods). FilterBypass is defined by:

  public abstract Document getDocument();
  public abstract void remove(int offset, int length) throws BadLocationException;
  public abstract void insertString(int offset, String string, AttributeSet attr) throws BadLocationException;
  public abstract void replace(int offset, int length, String string, AttributeSet attr) throws BadLocationException;

The following example illustrates creating a DocumentFilter that maps lower case to upper case letters:

   DocumentFilter upperDF = new DocumentFilter() {
      public void insertString(FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException {
          super.insertString(fb, offset, string.toUpperCase(), attr);
      }

      public void replace(FilterBypass fb, int offset, int length, String string, AttributeSet attr) throws BadLocationException {
          if (string != null) {
              string = text.toUpperCase();
          }
          super.replace(fb, offset, length, string, attr);
      }
   };

Filtering Navigation

Similar to DocumentFilter, a new class, NavigationFilter, allows for filtering where the selection can be placed. NavigationFilter is called by the navigation actions (such as left, right, center) to determine the next position to place the selection from a given position. NavigationFilter is a property on JTextComponent, and is defined by:

    public void setDot(FilterBypass fb, int dot, Position.Bias bias);
    public void moveDot(FilterBypass fb, int dot, Position.Bias bias);
    public int getNextVisualPositionFrom(JTextComponent text, int pos, Position.Bias bias, int direction, Position.Bias[] biasRet) throws BadLocationException;

Note that getNextVisualPositionFrom is defined in View; for consistency, the method in NavigationFilter is named the same.

Similar to DocumentFilter, NavigationFilter is passed a FilterBypass that should be invoked to handle the actual mutation. NavigationFilter.FilterBypass is defined by:

    public abstract Caret getCaret();
    public abstract void setDot(int dot, Position.Bias bias);
    public abstract void moveDot(int dot, Position.Bias bias);

JFormattedTextField.AbstractFormatter

As previously mentioned, an instance of AbstractFormatter is used to format a particular Object value. AbstractFormatter can also impose an editing policy by defining a DocumentFilter; it can also impose a navigation policy by defining a NavigationFilter. AbstractFormatter is defined by:

    public void install(JFormattedTextField ftf);
    public void uninstall();
    public abstract Object stringToValue(String text) throws ParseException;
    public abstract String valueToString(Object value) throws ParseException;
    protected JFormattedTextField getFormattedTextField();
    protected void setEditValid(boolean valid);
    protected void invalidEdit();
    protected Action[] getActions();
    protected DocumentFilter getDocumentFilter();
    protected NavigationFilter getNavigationFilter();

Once JFormattedTextField is ready to use an AbstractFormatter it invokes install. AbstractFormatter.install performs the following:

  1. Sets the text of the JFormattedTextField to the return value of valueToString (if a ParseException is thrown, an empty String is used and setEditValid(false) is invoked).
  2. Installs the DocumentFilter returned from getDocumentFilter onto the JFormattedTextField's Document.
  3. Installs the NavigationFilter returned from getNavigationFilter onto the JFormattedTextField.
  4. Installs the Actions returned from getActions onto the JFormattedTextField's ActionMap.

Subclasses will typically only override install if they need to install additional Listeners beyond the DocumentFilter and NavigationFilter, or perhaps place the caret at an initial location.

Some AbstractFormatters allow the JFormattedTextField to contain an invalid value when editing. To allow the JFormattedTextField to provide an indication of this, the AbstractFormatter should invoke setEditValid(false) when the user enters an invalid value, and then invoke setEditValid(true) when the value is valid again.

When JFormattedTextField is done with an AbstractFormatter, it invokes uninstall. uninstall removes the previously installed Listeners.

JFormattedTextField.AbstractFormatterFactory

JFormattedTextField delegates the creation of AbstractFormatters to an instance of AbstractFormatterFactory (a public static inner class of JFormattedTextField). This makes it easy for developers to provide different formatters for different states of the JFormattedTextField. For example, you could provide a special AbstractFormatter if the current value is null, or one formatter when editing and another when displaying. AbstractFormatterFactory is defined by:

    public abstract AbstractFormatter getFormatter(JFormattedTextField ftf);

If the developer has not supplied an AbstractFormatterFactory, one will be created based on the Class of the value.

DefaultFormatter

DefaultFormatter extends JFormattedTextField.AbstractFormatter and is the superclass for all of the formatter implementations we provide. DefaultFormatter formats Objects using toString and creates the Object using the constructor that takes a String. DefaultFormatter allows a number of configuration options:

Option | Description
CommitsOnValidEdit | Determines when edits are published back to the JFormattedTextField. If true, commitEdit is invoked on the JFormattedTextField after every successful edit, otherwise commitEdit is invoked only when return is pressed.
OverwriteMode | Configures the behavior when inserting characters. If overwriteMode is true (the default), new characters overwrite existing characters in the model as they are inserted.
AllowsInvalid | Determines whether the value being edited is allowed to be invalid. It is often convenient to allow the user to enter invalid values until a commit is attempted.

AbstractFormatter implementations

The following table lists the AbstractFormatter implementations that we provide, as well as intended use:

AbstractFormatter | Object Type | Notes
DefaultFormatter | Object | valueToString uses Object.toString(), and stringToValue uses the single argument constructor that takes a String.
MaskFormatter | Strings | Behavior is dictated by a per character mask that specifies legal values (e.g. "###-####").
InternationalFormatter | Objects | Uses an instance of java.text.Format to handle valueToString and stringToValue.
NumberFormatter | Numbers | Uses an instance of NumberFormat to handle formatting, descends from InternationalFormatter.
DateFormatter | Date | Uses an instance of DateFormat to handle formatting, descends from InternationalFormatter.

java.text.Format changes

The Swing support for formatted dates and numbers made extensive use of the Format classes in the java.text package. The following problems were encountered using the previous API:

  • You could only get the limits of one field at a time. If you wanted more, you had to invoke format repeatedly.
  • The previous field constants were not sufficient to describe the entire text of the formatted strings. One glaring omission was the exponential part of formatted numbers.
  • Using integer IDs for a set of constants that pretended to be extensible wasn't very elegant. When new constants were added, there could potentially be a conflict with any Format subclasses out there that we didn't know about. Note that the constants for DateFormat and NumberFormat already overlap, so a NumberFormat would have happily interpreted YEAR_FIELD as FRACTION_FIELD. The problem was exacerbated by the existence of the polymorphic Format.format(Object, StringBuffer, FieldPosition) method.
  • The specification didn't define the behavior if a field didn't exist in a formatted string, and the actual results varied between different releases.
  • The specification didn't define the behavior if a field wasn't recognized by a formatter; for example, if I asked a NumberFormat for the MONTH_FIELD (the actual implementation of this case returned 0 for both begin index and end index).
  • Because of that, a caller could not find out which fields a Format subclass actually supported unless it knew the specific subclass. This, along with the fact that not all characters in a formatted string are part of fields, makes the implementation of a generic method that returns all fields impossible.

These issues have largely been addressed by adding the following method to java.text.Format:

    public AttributedCharacterIterator formatToCharacterIterator(Object obj);

Each Format class uses a type safe enumeration for the constants it supports.

JavaDoc

New Classes

The following classes are new to the 1.4 release:

  • JFormattedTextField
  • DocumentFilter
  • NavigationFilter
  • JFormattedTextField.AbstractFormatter
  • JFormattedTextField.AbstractFormatterFactory
  • DefaultFormatterFactory
  • DefaultFormatter
  • MaskFormatter
  • InternationalFormatter
  • Number Formatter
  • DateFormatter

Constants are renamed to conform to Java naming conventions

The bugtraq report that corresponds to this change is: 4468474.

The following constants have been replaced to conform Java to naming conventions:

  • CommitValueOnFocusLost has been replaced with COMMIT.
  • CommitOrRevertValueOnFocusLost has been replaced with COMMIT_OR_REVERT.
  • RevertValueOnFocusLost has been replaced with REVERT.
  • PersistValueOnFocusLost has been replaced with PERSIST.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Indeterminate Progress Bars

This document describes the changes we made to implement indeterminate progress bars -- GUI components that look similar to normal progress bars and, like normal progress bars, use animation to show that a time-consuming operation is occurring. Unlike normal progress bars, indeterminate progress bars do not show the degree of completeness of the operation. This document has the following sections:

  • New JProgressBar API
  • New UI Defaults
  • New BasicProgressBarUI API
  • Converting Existing Progress Bar Implementations
  • Implementation Details
  • Javadoc for New API

New JProgressBar API

By default, every progress bar (created using one of several JProgressBar constructors) is determinate. You may make any JProgressBar indeterminate using the setIndeterminate method:

    pb.setIndeterminate(true);

An indeterminate progress bar animates constantly. You can stop the animation and clear the progress bar by making the progress bar determinate and setting the current value to the minimum. For example:

    pb.setValue(pb.getMinimum());
    pb.setIndeterminate(false);

You can switch from determinate to indeterminate mode, and vice versa, at any time. You can check whether the progress bar is indeterminate using the isIndeterminate method.

When a progress bar is indeterminate, it ignores its model (a BoundedRangeModel). However, the model should exist and contain legal data, since L&Fs that haven't been updated for indeterminate progress bars might use the model.

New UI Defaults

To give developers control over the progress bar's speed of animation, we've added two new UI defaults:

  • "ProgressBar.repaintInterval"
  • "ProgressBar.cycleTime"

The "ProgressBar.cycleTime" UI default lets look and feel implementers (as well as other developers)specify how many milliseconds each animation cycle takes. For example, a cycle time of 500 means that the indeterminate-mode progress bar animation repeats twice per second. The default drawing code uses this value --along with the repaint interval, box length, and component inner area --to determine how far to move the bouncing box each time it's drawn. This value must be an even multiple of the repaint interval. For example, if the repaint interval is 100, then valid cycle times are 200, 1000, and 1200, but not 100 or 500. If the user specifies an invalid cycle time,the indeterminate progress bar code automatically increases the cycle time to a suitable value.

To set the repaint interval and cycle time defaults:

    UIManager.put("ProgressBar.repaintInterval", new Integer(250));
    UIManager.put("ProgressBar.cycleTime", new Integer(6000));

To get the repaint interval and cycle time:

    int interval = UIManager.getInt("ProgressBar.repaintInterval");
    int totalTime = UIManager.getInt("ProgressBar.cycleTime");

In the basic, JLF, Motif, and Windows implementations, these defaults are checked when (and only when) the progress bar is switching into indeterminate mode.

New BasicProgressBarUI API

To help programmers implement look-and-feel code for progress bars,we have added the following API to the BasicProgressBarUI class.

Methods related to painting:

  • protected void paintIndeterminate(Graphics g, JComponent c)
  • protected void paintDeterminate(Graphics g, JComponent c)
  • protected Rectangle getBox(Rectangle)

Methods for setting and getting the index of the current frame of animation:

  • protected int getAnimationIndex()
  • protected void setAnimationIndex(int newValue)
  • protected void incrementAnimationIndex()

Methods for starting and stopping custom animation threads:

  • protected void startAnimationTimer()
  • protected void stopAnimationTimer()

The paint method that previously performed all painting for the progress bar now delegates all its drawing to either paintDeterminate or paintIndeterminate, depending on the value of the progress bar's indeterminate property. When the progress bar is in indeterminate mode, the paint method (and thus the paintIndeterminate method) executes every repaint interval milliseconds.The paintIndeterminate method should paint the progress bar to match the animation state, which is specified by the getAnimationIndex method.

The getBox method allows implementations to customize bouncing box painting. For example, MetalProgressBarUI invokes getBox in its paintIndeterminate method to get the box drawn by the superclass (BasicProgressBarUI) and then to add an outline to the box. By overriding the getBox method, an implementer gets full control over the bouncing box's size and position without needing to reimplement paintIndeterminate.

If you override paintIndeterminate or getBox, you might also have to override incrementAnimationIndex so that it cycles correctly through the valid values. The first value (representing the first drawing) is 0. By convention, the second is 1, the third is 2, and so on. The last legal value is, by convention, the total number of drawings in the animation cycle, minus one. To determine the total number of drawings, you may need to take into account the repaint interval and perhaps the component size. As the "by convention" implies, you can implement the animation index to have any meaning and values you wish, as long as zero indicates the beginning of the animation cycle.

If you don't want to use the animation thread we provide, you must override the two xxx AnimationTimer methods. You can then provide your own implementation that periodically increments the animation index and invokes repaint on the progress bar.

As a side effect of the progress bar work, we've added a new method to SwingUtilities:

  • public static Rectangle calculateInnerArea(Component c, Rectangle r)

The calculateInnerArea method is useful to all classes that perform drawing. It returns the area in which the component can draw -- that is, the rectangle (in the component's coordinate system) that includes all of the component except its border area (the component's insets).

Converting Existing Progress Bar Implementations

Converting an existing L&F to indeterminate progress bars is relatively straightforward. If the L&F's progress bar UI class doesn't override paint (or does but also invokes super.paint), then support for indeterminate progress bars is automatic. WindowsProgressBarUI, MotifProgressBarUI, and MetalProgressBarUI are in this lucky camp.

If the L&F's progress bar UI class is a subclass of BasicProgressBarUI and overrides paint without invoking the superclass version, then determinate mode still works, but indeterminate mode looks the same as determinate mode.

Existing drawing code should be moved out of the paint method and into the new paintDeterminate method. Code for indeterminate painting should go in the new paintIndeterminate method. If at all possible, the paint method should not be overridden unless it invokes super.paint. The reason: the BasicProgressBarUI implementation of the paint method may work with the default animation thread to enhance performance and behavior.

The Mac look and feel (both the no-longer-maintained Oracle version and the Apple version) is an example of a look and feel that overrides paint without invoking the superclass version.

If you already have a thread scheme for indeterminate painting, you can continue to use that scheme by overriding startAnimationTimer and stopAnimationTimer. Or you can just delete your thread code and use our scheme.

Implementation Details

The BasicProgressBarUI class contains most of our implementation of indeterminate progress bars. Aside from the drawing code, most of the code is in two private inner classes: Animator, which implements the animation thread, andPropertyChangeHandler, which listens for changes to and from indeterminate mode.

The Animator implements the default animation thread, using the Swing Timer class. An Animator instance is created if necessary by the BasicProgressBarUI.startAnimationTimer method, which the property handler invokes when the progress bar switches to indeterminate mode. When the progress bar is indeterminate, the Animator timer fires an action event once every repaint interval milliseconds. Animator's action event handler invokes incrementAnimationIndex, followed by repaint (which causes paintIndeterminate to run). Repaint interval is specified by the ProgressBar.repaintInterval UI default, which is checked by startAnimationTimer.

The PropertyChangeHandler registers itself as a property listener on the progress bar. When it detects the "indeterminate" property changing,the handler notes the change and invokes either stopAnimationTimer or startAnimationTimer.

Javadoc for New API

In javax.swing.JProgressBar:

    public void setIndeterminate(boolean newValue)

    public boolean isIndeterminate()

In javax.swing.plaf.basic.BasicProgressBarUI:

    protected void paintIndeterminate(Graphics g, JComponent c)

    protected void paintDeterminate(Graphics g, JComponent c)

    protected int getAnimationIndex()

    protected void setAnimationIndex(int newValue)

    protected void incrementAnimationIndex()

    protected void startAnimationTimer()

    protected void stopAnimationTimer()

    protected Rectangle getBox(Rectangle r)

In javax.swing.SwingUtilities:

    public static Rectangle calculateInnerArea(JComponent c, Rectangle r)
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JSpinner - A Simple Sequence Container

This document describes the new Swing component, JSpinner.

One of the most commonly requested new Swing components is a spinner - a single line input field that lets the user select an number or an object value from an ordered set. Spinners typically provide a pair of tiny arrow buttons for stepping through the possible values, the up/down arrow keys also cycle through the values. The user may also be allowed to type a (legal) value directly into the spinner. Although combo boxes provide similar functionality, spinners are sometimes preferred because they don't require a drop down list that can obscure important data.

The bugtraq report that corresponds to this change is: 4290529.

A Short Catalog of Spinners

Spinners are common in modern GUIs. Here are some examples from some popular look and feels and from OpenWindows:

Windows spinner | CDE/Motif spinner | JLF spinner | Mac Aqua spinner | OpenWindows spinner
Windows | CDE/Motif | JLF | Mac Aqua | OpenWindows

All of the spinners deliver very simple behavior: clicking on the arrow buttons changes the fields value and, when the spinner has the focus, the keyboard up and down arrow keys do the same. In some applications the spinners up or down arrow button is disabled when the upper or lower limit of the spinner has been reached, in other cases the spinner just resets its value to the opposite extreme.

JSpinner, SpinnerModel, SpinnerListModel

The JSpinner class is a simple Swing container that manages three children: two arrow buttons and a single component, called the editor that displays the spinner's value. The value displayed by the spinner is encapsulated by model of a sequence of objects called a SpinnerModel.

public interface SpinnerModel {
    Object getValue();
    void setValue(Object);
    Object getNextValue();
    Object getPreviousValue();
    void addChangeListener(ChangeListener x);
    void removeChangeListener(ChangeListener x);}

The SpinnerModel interface is similar to ListModel - they both represent a sequence a values - however there are some important differences:

  • The model doesn't support random access to sequence elements. Only three sequence values are accessible at a time: current, next and previous.
  • The number of sequence elements isn't necessarily bounded so there's no sequence length returning size method.
  • The model's value property is read/write, unlike the elements of a ListModels sequence, which are read-only. This difference reflects the different roles of JList and JSpinner. The former was designed to simplify selecting one or more items from a list and the latter for entering a single value directly.

The relationship between the JSpinner and its model is simple. The editor component monitors the model with a ChangeListener and always displays the object returned by SpinnerModel.getValue(). The up and down arrow buttons update the value by calling setValue(getNextValue()) or setValue(getPreviousValue()) respectively. The getNextValue and getPreviousValue methods return null when the end or the beginning of the sequence has been reached, so the arrow button actions have to check for null before updating the models value. If the editor is a writable field of some kind, it's responsible for honoring the constraints defined by the model or handling the IllegalArgumentException thrown by setValue for invalid values.

The SpinnerListModel provides support for two common mutable sequence types: java.util.List, and an array of objects. For example to create a JSpinner that lets the user choose a day of the week in the default locale one could write:

    String[] days = new DateFormatSymbols().getWeekdays();
    SpinnerModel model = new SpinnerListModel(days);
    JSpinner spinner = new JSpinner(model);

In addition to initializing the model property of the spinner, these constructors create an editor component that displays the SpinnerModel's value and can be used to change it. The protected JSpinner.createEditor method is used for this and, by default, it creates a JFormattedTextField that has been configured to display the model.

To find or initialize a spinners current value one can either use the models value property or use the convenience JSpinner value property which just delegates to the model. For example, using the spinner configured in the example above, the following two statements are equivalent:

    String selectedDay = spinner.getModel().getValue().toString();
    String selectedDay = spinner.getValue().toString();

Setting the spinner's value is similar. Attempts to set the SpinnerModel value to an object that the model doesn't support cause an IllegalArgumentException to be thrown.

Dates and numbers are two of the most common applications for a spinner component. To simplify spinning these types, two additional SpinnerModel implementation classes are provided: SpinnerDateModel and SpinnerNumberModel.

SpinnerDateModel

One of the most common uses of a spinner is to compactly present an editable date. Here's a simple example of creating a JSpinner that allows the user to enter a (fully localized) date:

    SpinnerDateModel model = new SpinnerDateModel();
    JSpinner spinner = new JSpinner(model);
    Date value = model.getDate();

In this example, the JSpinner constructor has created a JFormattedTextField editor that's configured for editing dates and it has added a ChangeListener to the SpinnerDateModel to keep the editor and the model in sync.

Here's the SpinnerDateModel API. We've added three new read/write properties: start, end, and stepSize and a read-only date property that returns the models value cast to a Date.

public class SpinnerDateModel extends AbstractSpinnerModel {
    public SpinnerDateModel(Date value, Comparable start, Comparable end, int stepSize)
    public SpinnerDateModel()
    public void setStart(Comparable start)
    public Comparable getStart()
    public void setEnd(Comparable end)
    public Comparable getEnd()
    public Object getNextValue()
    public Object getPreviousValue()
    public Date getDate()
    public Object getValue()
    public void setValue(Object value)}

The startDate and endDate properties can be null to indicate that there is no lower or upper limit. The no-arguments SpinnerDateModel constructor initializes both the start and end date to null, the initial value of the model is the current date.

The value of the stepSize property must be one of the java.util.Calendar constants that specify a field within a Calendar. The getNextValue and getPreviousValue methods change the date forward or backwards by this amount. For example, if stepSize is Calendar.DAY_OF_WEEK, then nextValue produces a Date that's 24 hours after the current value, and previousValue produces a Date that's 24 hours earlier.

The legal values for stepSize are:

  • Calendar.ERA
  • Calendar.YEAR
  • Calendar.MONTH
  • Calendar.WEEK_OF_YEAR
  • Calendar.WEEK_OF_MONTH
  • Calendar.DAY_OF_MONTH
  • Calendar.DAY_OF_YEAR
  • Calendar.DAY_OF_WEEK
  • Calendar.DAY_OF_WEEK_IN_MONTH
  • Calendar.AM_PM
  • Calendar.HOUR
  • Calendar.HOUR_OF_DAY
  • Calendar.MINUTE
  • Calendar.SECOND
  • Calendar.MILLISECOND

The default SpinnerDateModel editor adjusts the stepSize property based on the text cursor position. For example if the cursor moves into the editor's month subfield then the incrementSize would be changed to Calendar.DAY_OF_MONTH.

SpinnerNumberModel

Spinners are often used to present editable integers and real numbers that represent everything from temperature to stock prices. The SpinnerNumberModel provides basic support for all of the basic Java Number types, from Byte to Double.

To create a spinner that allows the user to pick a real multiple of 1/8 between 0.0 and 1000.0, with an initial value of 500.0, one could write:

    SpinnerNumberModel model = new SpinnerNumberModel(500.0, 0.0, 1000.0, 0.625);
    JSpinner spinner = new JSpinner(model);
    double value = model.getNumber().doubleValue();

In this example, the JSpinner constructor has created a JFormattedTextField editor that's configured for editing real numbers and it has added a ChangeListener to the SpinnerNumberModel to keep the editor and the model in sync.

Here's a summary of the SpinnerNumberModel API. We've added three new read/write properties: minimum, maximum, and stepSize and a read-only number property that returns the models value cast to a Number.

public class SpinnerNumberModel extends AbstractSpinnerModel {
    public SpinnerNumberModel(Number value, Comparable minimum, Comparable maximum, Number stepSize)
    public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize)
    public SpinnerNumberModel(double value, double minimum, double maximum, double stepSize)
    public SpinnerNumberModel()
    public void setMinimum(Comparable minimum)
    public Comparable getMinimum()
    public void setMaximum(Comparable maximum)
    public Comparable getMaximum()
    public void setStepSize(Number stepSize)
    public Number getStepSize()
    public Object getNextValue()
    public Object getPreviousValue()
    public Number getNumber()
    public Object getValue()
    public void setValue(Object value)}

As with the SpinnerDateModel, the minimum and maximum properties can be null to indicate that there is no lower or upper limit. The stepSize property just specifies how much to add or subtract from the value to compute the nextValue or the previousValue.

Summary of the Spinner APIs

Support for spinners added six classes and one interface (SpinnerModel) to the javax.swing package:

  • JSpinner
  • SpinnerListModel
  • AbstractSpinnerModel
  • SpinnerDateModel
  • SpinnerModel
  • SpinnerNumberModel

Additionally, SpinnerUI has been added to the javax.swing.plaf package and BasicSpinnerUI to the javax.swing.plaf.basic package:

  • SpinnerUI
  • BasicSpinnerUI
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Popup & PopupFactory

The bugtraq report that corresponds to this change is: 4303635.

Certain Components, such as JPopupMenu and JToolTip, present themselves above all other Components in a particular containment hierarchy. Rather than each of these Components containing the same code to obtain the same behavior, they delegate to a Popup which can be obtained from a PopupFactory. A Popup is able to display a Component at a particular location on the screen. Based on the size and location of the requested Component, PopupFactory returns an appropriate Popup.

Previously, Popup and PopupFactory were package private. For JDK 1.4, we have exposed these classes to enable custom look and feel implementations to create their own Popups. This allows other look and feels to position menus in an appropriate manner for their look and feel. To this end, we have made these classes public:

public class PopupFactory {
    public static void setSharedInstance(PopupFactory factory);
    public static PopupFactory getSharedInstance();
    public Popup getPopup(Component owner, Component contents, int x, int y) throws IllegalArgumentException;
    }

public class Popup {
    protected Popup(Component owner, Component contents, int x, int y);
    protected Popup();
    public void show();
    public void hide();
    }

To enable the Popup used by JPopupMenu to be replaced by the UI, we added the following to PopupMenuUI:

    public Popup getPopup(JPopupMenu popup, int x, int y);

PopupMenuUI.getPopup's implementation obtains the Popup from the shared PopupFactory, but custom look and feel implementations may override this and return whatever Popup they desire.

Semantic Changes

JPopupMenu previously defined the method setLocation. Prior to this release, this method would invoke setLocation on the Popup, but as we have removed this method from Popup, JPopupMenu now recreates the Popup.

JPopupMenu also defined the method setPopupSize, which invoked setSize on the Popup if it was visible. Internally, we changed this method to set the preferred size of the JPopupMenu, which gives the same results. If the JPopupMenu is visible when this is invoked, the Popup will be recreated. The JPopupMenu javadoc changed to reflect the new behavior:

    public void setPopupSize(Dimension d);

    public void setPopupSize(int width, int height);
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Scrollable Tabs

Documentation Contents

JTabbedPane: Scrollable Tabs

Previously with JTabbedPane, if all the tabs did not fit within a single tab run, the JTabbedPane wrapped tabs onto multiple runs. There have been many requests to provide an alternative scheme, where the JTabbedPane would instead display a single, scrollable run of tabs. This document describes the new API for providing such scrollable tab support in JTabbedPane for the 1.4 release. The bugtraq report that corresponds to this change is: 4093898.

  • The Too-Many-Tabs Dilemma
  • New JTabbedPane API
  • Compatibility

The Too-Many-Tabs Dilemma

Wrapping tabs onto multiple lines provides the benefit of always allowing the user to view all possible tab selections at a given time:

Graphic with two rows of tabs. The first row has five, the second row has four.

However, the problem with multiple runs is in handling the case where the user selects a tab in a run which is not adjacent to the panel display area. For the Windows and Motif look and feel implementations, this action will cause the runs to rotate such that the run containing the selected tab is placed adjacent to the panel display area.

Graphic with selected tab adjacent to panel display area

This behavior can be extremely disorienting to the user because it constantly re-arranges the tabs, eliminating predictability in the UI. The Metal look and feel solved this problem by always leaving the runs fixed, even if the selected tab is not adjacent to the panel display area:

Graphic with selected tab is denoted by different color

Unfortunately the downside of the Metal solution is that it visually departs from the 'tabbed folder' metaphor (the selected tab is not 'attached' to its content). In fact, Chapter 7 of the Java Look and Feel Guidelines recommends against creating tabbed panes with multiple runs:

"If your tabbed pane requires multiple rows of tabs, consider dividing the content among several dialog boxes or components. Multiple rows of tabs can be confusing."

While constraining tabs in a tabbed pane to a number which will fit within a single run is an important UI guideline, there are circumstances where a proliferation of tabs cannot be avoided. This is often the case if the tabs are created dynamically by the application at runtime (perhaps driven off the content of a database).

An alternate solution for handling the tab proliferation case is to constrain the tabbed pane to a single, scrollable run of tabs:

Graphic with a single row of tabs that does not include all the possible choices

Naturally, this solution has its own set of usability problems, the most obvious of which is that the user can no longer view all possible selections at one time. However, this scrollable-tab behavior is becoming increasingly common in user interfaces and therefore Swing now supports it as an option.

New JTabbedPane API

To allow programs to define which tab layout behavior they require, we now provide a "tabLayoutPolicy" bound property on JTabbedPane:

    public void setTabLayoutPolicy(int layoutPolicy)

    public boolean getTabLayoutPolicy()

Additionally, constants for the supported policy values have been added to JTabbedPane:

    public static final int WRAP_TAB_LAYOUT = 0;

    public static final int SCROLL_TAB_LAYOUT = 1;

Compatibility

This feature had no impact on compatibility, as the default value for the tabLayoutPolicy property is WRAP_TAB_LAYOUT which matches the previous layout behavior of the tabbed pane.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Changes and New Features

Documentation Contents

Swing Changes and New Features for Java™ 2 SDK, Standard Edition, v 1.4

Changes Specific to releases 1.4.1 and 1.4.2

This document contains information relevant to all 1.4.* releases. For information specific to 1.4.1 and 1.4.2, see Swing Changes Since Java 2 SDK, Standard Edition, v 1.4.

Major Changes

Certain features, typically ones that have a large impact on Swing, have been extensively written up in separate documents. The following link to these documents:

  • Windows XP look and feel
  • GTK+ look and feel
  • Support for indeterminate progress bars
  • JTabbedPane with scrollable tabs
  • JSpinner
  • JFormattedTextField
  • Popup and PopupFactory
  • New Focus Model Specification and Javadoc
  • Windows look and feel update.
  • The new Drag and Drop architecture.

Minor Changes

Each section contains changes for a set of related classes. Most of the sections are focused on the classes that are part of a single Swing component like JEditorPane or JTable. Each API change is associated with a link to a report on the Bug Database , where you'll find the original bug or RFE ("request for enhancement") that motivated the change. In this document you'll also find the following information for each API change:

  • The method signatures with a link to the Javadoc for new methods or methods whose semantics have changed.
  • A brief description of the overall change and how to take advantage of it. You'll probably find this same material in the evaluation section of the bug/rfe report.
  • If the API change corrects a long standing bug or provides a missing feature - suggestions about how to migrate typical workarounds or extensions to the new feature.
  • Nearly all changes (even bugfixes!) introduce some kind of incompatibility. We've done our best to predict these incompatibilities and provide advice about how to avoid them.

Sections

  • Box
  • JButton
  • JComboBox
  • JFileChooser
  • JInternalFrame
  • JList
  • JOptionPane
  • JPopupMenu
  • JPanel
  • JRootPane
  • JScrollBar
  • JScrollPane
  • JTabbedPane
  • JTable
  • JTextComponent
  • JTree
  • RepaintManager
  • SpringLayout
  • Miscellaneous
  • Known Bugs

Box

Box now descends from JComponent

The bugtraq report that corresponds to this change is: 4304100.

Historically, the superclass for Box has been Component. Since Box did not descend from JComponent, you could not use it like a normal Swing component, for example, you couldn't set the borders, or issue revalidate. Not only this, but changing visibility, or other similiar visual properties, on a standard Swing component typically triggers a repaint or revalidate, but Box did not conform to this behavior. As of this release, Box and Box.Filler now descend from the JComponent superclass and therefore behave more like standard Swing components.

BoxLayout Now Supports Right-to-Left and Bottom-to-Top Component Orientations

The bugtraq report that corresponds to this change is: 4140833.

BoxLayout did not consider the ComponentOrientation of the Container it is laying out. Other AWT layout managers were made to do this when the ComponentOrientation feature was added in JDK 1.2. Adding this feature to BoxLayout makes it useful for programs that support Middle East locales. Because BoxLayout is also used internally by other Swing components, such as JOptionPane, JToolBar and JMenuBar, adding this feature is also necessary for these components to support ComponentOrientation.

To support this functionality, the constants LINE_AXIS and PAGE_AXIS, and the constructor, BoxLayout(Container, int), were added to BoxLayout.

There were also changes to several methods in SizeRequirements:

  • calculateTiledPositions(int,SizeRequirements,SizeRequirements[],int[],int[],boolean)
  • calculateTiledPositions(int,SizeRequirements,SizeRequirements[],int[],int[])
  • calculateAlignedPositions(int,SizeRequirements,SizeRequirements[],int[],int[],boolean)
  • calculateAlignedPositions(int,SizeRequirements,SizeRequirements[],int[],int[])

JButton

Default Button Follows the Focus on Windows LAF

The bugtraq report that corresponds to this change is: 4659800.

With this bug, introduced in 1.4.0, the default button did not always follow the focus. This has been fixed in 1.4.1.

New Control of Highlighted Characters

The bugtraq report that corresponds to this change is: 4138746.

AbstractButton and JLabel both allow the developer to set a character, called the mnemonic, that can be used to perform an action when typed at the keyboard. The javadoc for these methods states that the first case-insensitive occurrence of the character is decorated. While this suits most developers, often times a different occurrence of the character needs to be highlighted. For example: in Notepad, 'a' is the accelerator for Save As, but the second 'a' is decorated. Developers need a way to be able to specify this.

This is solved with the new AbstractButton.setDisplayedMnemonicIndex and JLabel.setDisplayedMnemonicIndex methods. Once you have specified a mnemonic, via the setMnemonic or setDisplayedMnemonic methods, you can then change the character that is highlighted via the setDisplayedMnemonicIndex method. There are also new AbstractButton.getDisplayedMnemonicIndex and JLabel.getDisplayedMnemonicIndex methods. Finally, drawStringUnderlineCharAt has been added to javax.swing.plaf.basic.BasicGraphicsUtils.

AbstractButton.configurePropertiesFromAction Now Honors ACTION_COMMAND_KEY Property

The bugtraq report that corresponds to this change is: 4457940.

Previously, the AbstractButton methods configurePropertiesFromAction(Action) and configurePropertiesFromAction(Action, String[]) did not honor the ACTION_COMMAND_KEY property. That has now been addressed. This affects the javadoc for the configurePropertiesFromAction methods in the following subclasses of AbstractButton:

  • JButton.configurePropertiesFromAction(Action)
  • JMenu.configurePropertiesFromAction(Action)
  • JCheckBox.configurePropertiesFromAction(Action)
  • JRadioButton.configurePropertiesFromAction(Action)

JComboBox

PopupMenuListener Added to JComboBox

The bugtraq report that corresponds to this change is: 4287690.

Many developers have requested support for listeners to be notified when a combo box's drop down menu is popped up, dismissed, or canceled. Applications could use these listeners to lazily populate the combo box's model with items.

This feature wasn't provided in earlier versions of Swing because there was some, probably academic, concern about supporting a listener for a feature (the drop down menu) that some look and feel implementations might not provide. All of the look and feels that are shipped with Java, and all of the ones we've come across, do use a drop down menu to show all of the combo box items. Some developers have resorted to non-portable hacks to get the menu state change notifications.

For this release, we added a PopupMenuListener to JComboBox. So long as the underlying look and feel supports an item menu, this listener can be used to perform actions before and after the combo box menu appears. Several new JComboBox methods were required to support this feature:

    public void addPopupMenuListener(PopupMenuListener l)
    public void removePopupMenuListener(PopupMenuListener l)
    public void firePopupMenuWillBecomeVisible()
    public void firePopupMenuWillBecomeInvisible()
    public void firePopupMenuCanceled()

JComboBox Now Supports Prototype Cell for Lists

The bugtraq report that corresponds to this change is: 4231298.

JComboBox previously configured a renderer for every item it displayed. For large lists this could take quite a while. Instead, developers needed the ability to specify a prototype that all cells match, so that the prototype is only checked once instead of every cell. For this release, getPrototypeDisplayValue and setPrototypeDisplayValue have been added to JComboBox.

Javadoc for JComboBox and Related Classes Has Improved Documentation

The bugtraq report that corresponds to this change is 4394300.

Previously, public API for JComboBox and its UI delegates contained javadoc which described the details of its implementation. Refactoring and bug fixing over the course of its history had made this javadoc out of date. The javadoc has been checked and revised so that it describes the behavior of the method rather than the implementation details. Also, some of the javadoc for "protected" methods and fields which should really have been private have been removed so that overriding or calling these methods are not encouraged.

The doc has been changed for JComboBox, ComboBoxModel, MutableComboBoxModel, javax.swing.plaf.basic.BasicComboBoxUI, javax.swing.plaf.basic.ComboPopup, and javax.swing.plaf.basic.BasicComboPopup.

JFileChooser

JFileChooser Windows Look and Feel Improved

The bugtraq report that corresponds to this change is 4290709.

Although Swing's JFileChooser closely resembles the Microsoft Windows common file dialog under the Windows look and feel, there are several deficiencies for which we have received complaints. In particular, the Microsoft Windows aesthetics guide mentions the following:

If you cannot use the [common] Open and Save As dialog boxes, you should incorporate the following features into your open and save dialog boxes to ensure that they are consistent with the shell, the Windows accessories, and other applications:

  • Support the same namespace hierarchy as the shell; that is, Desktop should be at the root of the hierarchy, followed by all folders and objects on the desktop, including My Computer, My Network, and so on. [...]
  • Support shortcuts (also known as shell links). [...]
  • Display filenames with the corresponding icons and filename extensions removed, as the shell does.
  • Allow the user to browse the network hierarchy directly.
  • Make sure that all of your dialog boxes (not just your open and save dialog boxes) use only nonbold fonts. [...]

The first four points are not possible in Swing without additional API support from the AWT. The AWT common file dialog is also currently an unacceptable solution for the following reasons:

  • It cannot be embedded into a frame or dialog like JFileChooser.
  • Filename filter is not implemented and is difficult to implement on Windows.

The new functionality is accomplished by adding the following public methods to the javax.swing.filechooser.FileSystemView class, providing file and directory information beyond the scope of the File class:

    public boolean isTraversable(File f)
    public String getSystemDisplayName(File f)
    public String getSystemTypeDescription
    public Icon getSystemIcon(File f)
    public boolean isParent(File folder, File file)
    public File getChild(File parent, String filename)
    public boolean isFileSystem(File f)
    public boolean isFileSystemRoot(File dir)
    public boolean isDrive(File dir)
    public boolean isFloppyDrive(File dir)
    public boolean isComputerNode(File dir)
    public File createFileSystemRoot(File f)
    public File[] getRoots()

The isTraversable method has been removed from javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView so that the superclass's implementation is used.

createListSelectionListener has been added to javax.swing.plaf.metal.MetalFileChooserUI.

Also, javax.swing.plaf.basic.BasicDirectoryModel has the following changes:

    public void intervalAdded(ListDataEvent e)
    public void intervalRemoved(ListDataEvent e)
    public void renameFile(File oldFile, File newFile)

New Ability to Specify Characteristics of Open Directory Button in JFileChooser

The bugtraq report that corresponds to this change is 4318785.

Look and feels need the ability to specify the text, tooltip text, and mnemonic for the button used to open a directory in JFileChooser.

To support this, several constants and methods were added to plaf.basic.BasicFileChooserUI:

    protected int directoryOpenButtonMnemonic = 0;
    protected String directoryOpenButtonText = null
    protected String directoryOpenButtonToolTipText = null
    protected boolean isDirectorySelected()
    protected void setDirectorySelected(boolean b)
    protected File getDirectory()
    protected void setDirectory(File f)

Multiple File Selection Supported

The bugtraq report that corresponds to this change is 4218431.

Multiple file selection was added to JFileChooser in the 1.4 release, but the javadoc for setMultiSelectionEnabled wasn't updated until the 1.4.1 release.

JInternalFrame

JInternalFrame Now Truncates Titles That are Too Long

The bugtraq report that corresponds to this change is 4134077.

Previously, the title of an internal frame would not be clipped if it was too long. This would lead to the title displaying over parts of the icons, as well no visual feedback to the user that the title had been clipped. To solve this, BasicInternalFrameTitlePane.getTitle was added.

JInternalFrame Titles in Windows Look and Feel May Now be Rendered with a Gradient

The bugtraq report that corresponds to this change is: 4389209.

To implement this correctly, we needed to create a class, com.sun.java.swing.plaf.windows.WindowsInternalFrameTitlePane, which extended javax.swing.plaf.basic.BasicInternalFrameTitlePane, but overrode the paint routine to render the gradient when appropriate. The best way to get code-reuse was to break out the portion of the paint method which paints just the background and override just that in WindowsInternalFrameTitlePane. The method paintTitleBackground was added to javax.swing.plaf.basic.BasicInternalFrameTitlePane.

JTextComponent

New Support for Tooltips for Images in JEditorPane

The bugtraq report that corresponds to this change is: 4252169.

In previous releases it was not possible for ImageView (the View responsible for rendering images in a JEditorPane) to show tooltip text because there was no way for a View to influence the tooltip text that is displayed for a JTextComponent. In this release, if the JTextComponent doesn't have a tooltip, then the view under the mouse is asked to provide one. If that View corresponds to an HTML element with an ALT attribute, then the tooltip text is the value of that attribute.

To make it possible for Views to affect the tooltip text, a number of methods were needed. getToolTipText was added to javax.swing.plaf.TextUI so that it is possible to get the tooltip text for a particular location. JTextComponent's getToolTipText method then forwards to the TextUI, assuming a tooltip was not set on the JTextComponent.

getToolTipText was also added to javax.swing.text.View. The default implementation of View.getToolTipText will forward the request to the View's child at the given location. To make it easy to determine the child at a particular location, getViewIndex was added to View.

The View implementation invokes getViewIndex and then getToolTipText on the child View. ImageView then overrides getToolTipText and returns the value from the ALT attribute of its AttributeSet.

ImageView Class is Now Public

The bugtraq report that corresponds to this change is: 4233811.

The package private class javax.swing.text.html.ImageView is now public so that it can be extended.

New HyperlinkEvent Read-Only elementOffset Property

The bugtraq report that corresponds to this change is: 4182124.

The HTML package exposes a way for developers to determine when the mouse moves over a link via the HyperlinkEvent and HyperlinkListener classes. Often times developers need a way to extract information from the document when the HyperlinkListener is notified. There was previously no way for a developer to determine the position in the document a HyperlinkEvent represents. To remedy this the constructor HyperlinkEvent(Object, EventType, URL, String, Element) and the method getSourceElement were added to HyperlinkEvent.

HTMLFrameHyperlinkEvent extends HyperlinkEvent, which already defines the method getSourceElement. Since the superclass now defines this method, the getSourceElement javadoc was removed from HTMLFrameHyperlinkEvent (the method is now inherited):

HTML Parser Change: Whitespace Reporting

The bugtraq report that corresponds to this change is: 4241788.

The semantics of the HTML parser ( javax.swing.text.html.parser.Parser) have slightly changed to better match that of the browser (Netscape and Internet Explorer). While no API was changed, those using the parser may notice a slight difference in the reporting of whitespace. Here is how things have changed: if strict (an instance variable of javax.swing.text.html.parser.Parser) == false (the default) an instance variable is used to try and mimic the behavior of Netscape and Explorer.

The problematic scenarios are:

'<b>blah <i> <strike> foo'

which can be treated as:

'<b>blah <i><strike>foo'

as well as:

'<p><a href="xx"> <em>Using</em></a></p>'

which appears to be treated as:

'<p><a href="xx"><em>Using</em></a></p>'

When a tag that breaks flow, or trailing whitespace is encountered an instance variable is set to true. From then on, all whitespace is ignored. The instance variable is set back to false the first time a non whitespace character is encountered.

Improved Support for Writing HTML Forms

The bugtraq report that corresponds to this change is: 4200439.

The HTML support provided in the JDK has never correctly supported writing out form elements. This was due, in large part, to the way that forms were modeled. To better match the document object model (see DOM at www.w3.org) we have changed how the forms are modeled internally. Previously, any attributes of a form would be stored in the attributeSet of all of the children character elements. As of this release, an element is created to represent the form, better matching that of the HTML file itself. This allows for better modeling of the form, as well as consistent writing of the form.

This affects developers that relied on forms being handled loosely. As an example, we would previously treat the following invalid HTML:

<table>
<form>
</table>
</form>

as:

<form>
<table>
</table>
</form>

With this release, we instead treat it as:

<table>
<form>
</form>
</table>

Static DefaultPainter in javax.swing.text.DefaultHighlighter Class is Now Final

The bugtraq report that corresponds to this change is: 4328938.

Prior to this release, the static field DefaultPainter of javax.swing.text.DefaultHighlighter was not final. This was a potential security problem. For this release, it is now Final.

PlainDocument Constructor is Now Public

The bugtraq report that corresponds to this change is: 4220001.

Prior to this release, the PlainDocument(AbstractDocument.Content) constructor was protected. This meant that developers wishing to use the constructor had to subclass. This constructor was intended to be public, and is now public in this release.

JEditorPane.scrollToReference Method is Now Public

The bugtraq report that corresponds to this change is: 4304676.

JEditorPane.scrollToReference was protected for no good reason. This method is intended to be useful without having to subclass, as such it has been made public in this release.

Document.getText Method Now Allows for Partial Returns

The bugtraq report that corresponds to this change is: 4156650.

For efficiently accessing the content of a text document, Document defines the method getText(int, int, Segment). Unfortunately, there has been no way for the caller to determine if the receiver could efficiently satisfy the request. For example, GapContent could efficiently implement the request as long as the request didn't span the last edited spot of the document (the gap). To facilitate efficient access of the content, the methods setPartialReturn and isPartialReturn have been added to Segment. The current semantics of Document.getText still hold, but for more efficient use callers should invoke segment.setPartialReturn(true) and be prepared to get back a portion of the document at a time.

JEditorPane Now Provides HTML Accessibility Support

The bugtraq report that corresponds to this change is: 4303259.

Assistive technologies for people with disabilities require programmatic access to the contents of JEditorPane using the Accessibility API. Previously, the only access was to hypertext links. This API change provided accessibility to all HTML components using the Accessibility API.

javax.swing.text.html.HTMLEditorKit now implements javax.accessibility.Accessible.

JEditorPane now implements getAccessibleContext().

Further Support for New AbstractDocument.replace Method

The bugtraq report that corresponds to this change is: 4458513.

As part of RFE 4431047, a replace method was added to AbstractDocument. In order to allow this method to call remove and insertString (the only methods defined in the interface for mutating a Document), the restrictions on when writeLock may be invoked have been relaxed. This allows replace to be compatible with old versions of AbstractDocument that only override remove and insertString.

JOptionPane

New showInputDialog Methods

The bugtraq report that corresponds to this change is: 4226644.

Prior to this release, if programs wished to display a simple input dialog containing a textfield with a default string, they had to invoke the complex JOptionPane.showInputDialog method which requires seven parameters. Two new methods, showInputDialog(Object, Object), and showInputDialog(Component, Object, Object), make it more convenient to create and display simple input dialogs.

JOptionPane Now Supports ComponentOrientation

The bugtraq report that corresponds to this change is: 4265463.

JOptionPane needed to support right-to-left layout. This was a bug fix and no actual API was required, however, the class spec for JOptionPane and javax.swing.plaf.basic.BasicOptionPane have been updated.

JOptionPane now uses Non-Resizable Dialogs

The bugtraq report that corresponds to this change is: 4829588.

As of release 1.4.0, JOptionPane is changed to use non-resizable dialogs. As a result, the dialogs displayed by many JOptionPane methods have slightly changed. The first two changes are desirable:

  • The dialogs are, obviously, no longer resizable.
  • The dialogs no longer show the system menu icon (that typically appears in the upper-left corner of the dialog on a left-to-right system).
A side effect of this change appears in the handling of extra-long text. Previously, long text was clipped, showing "..." at the end, as the dialog was restricted to the size of the screen. Now, extra-long text can cause the dialog to be sized larger than the screen in order to accomodate all of the text. Keep watching bug 4829588 to see how this undesirable behavior is resolved.

JPopupMenu

JPopupMenu and Focus

As of this release, showing a JPopupMenu causes focus to transfer to the parent JRootPane. This was done so that JPopupMenus would support keyboard traversal ( 4212563). This may cause problems for applications that are doing validation on focus lost. If this affects you, it is recommended that in the focusLost notification you check the temporary property of the FocusEvent and, if true, do nothing. In situations where you don't want JPopupMenu to grab focus, there is unfortunately no way to disable this in the current release. In release 1.4.1 the decision to transfer focus is based on the focusability of the JPopupMenu. Refer to bug 4632782 for details.

JPopupMenu Now Supports Key Bindings

The bugtraq report that corresponds to this change is: 4212563.

Previously, JPopupMenu didn't support key bindings. The arrow keys, mnemonics, the enter key, and escape did not work with a JPopupMenu unless it was used as part of a compound component (like a JMenu or a JComboBox).

This behavior can be traced to the fact that JPopupMenu did not always gain focus, and could therefore not get KeyEvents. It was previously not possible for light weight toolkits, such as Swing, to request focus and indicate that the focus change was temporary. The new focus architecture solved this problem, and Swing can now request a temporary focus change. Fixing this bug required making the JPopupMenu get focus so that the key bindings can be processed. Consumers that had previously not expected focus changes need to update their code to check the temporary property of the FocusEvents.

JPopupMenu.setVisible(true) Now Throws HeadlessException in Headless Mode

The bugtraq report that corresponds to this change is: 4401222.

When the new headless mode was introduced, JPopupMenu.setVisible(true) was implemented to throw NullPointerException when called in headless mode. It has now been fixed to throw HeadlessException instead, to indicate that this operation cannot be performed in headless mode.

JPanel

New setUI, getUI Methods

The bugtraq report that corresponds to this change is: 4226238.

The setUI/getUI methods were not implemented for JPanel, even though its look and feel is defined by pluggable look and feel (plaf). See javax.swing.plaf.basic.BasicPanelUI.java, for example.

JTabbedPane

JTabbedPane and Focus

The new focus specification states that focus requests on components that are not showing will fail. This can have subtle side effects. One such side effect is that requesting focus from a ChangeListener associated with a JTabbedPane may fail. At the same time, the ChangeListener is notified that the component is not currently visible and therefore the focus request fails in the same situation that it probably worked under the previous release. If you are running into this situation with JTabbedPane it is suggested you make the component visible before requesting focus. Other situations may require different approaches.

New indexAtLocation Method in JTabbedPane

The bugtraq report that corresponds to this change is: 4241787.

Prior to this change, there was no way for client programs to convert a coordinate location to a particular tab in a tabbedpane. This made it difficult to implement special event handling on a JTabbedPane (like popping up a menu over a tab).

The method indexAtLocation has been added to JTabbedPane.

New Mnemonic Support for Accessing Tabs in JTabbedPane

The bugtraq report that corresponds to this change is: 4284674.

The panes of a JTabbedPane did not previously allow for mnemonics. To facilitate this, the methods getDisplayedMnemonicIndexAt and setDisplayedMnemonicIndexAt have been added.

Exceptions Thrown by JTabbedPane Now Consistent

The bugtraq report that corresponds to this change is: 4287053.

The JTabbedPane class is a container that has many methods which take an integer index as a parameter. Unfortunately, these methods weren't inconsistent with their approach to throwing exceptions (some methods check/throw, some don't). Additionally, the javadoc was in error - it stated that an IllegalParameterException was thrown when in fact an ArrayIndexOutOfBoundsException was thrown (by the underlying Vector).

Any method which takes an index that must be in the valid range from 0 to tabCount-1 now documents that it throws an IndexOutOfBoundsException (note: the underlying code continues to throw ArrayIndexOutOfBoundsException for compatibility reasons).

The following doc change:

    * @exception IndexOutOfBoundsException if index is out of range
    *       (index < 0 || index >= tab count)
will be applied to the following JTabbedPane methods:
    public String getTitleAt(int index)
    public Icon getIconAt(int index)
    public Icon getDisabledIconAt(int index)
    public String getToolTipTextAt(int index)
    public Color getBackgroundAt(int index)
    public Color getForegroundAt(int index)
    public boolean isEnabledAt(int index)
    public Component getComponentAt(int index)
    public int getDisplayedMnemonicIndexAt(int index)
    public Rectangle getBoundsAt(int index)
    public void setTitleAt(int index, String title)
    public void setIconAt(int index, Icon icon)
    public void setDisabledIconAt(int index, Icon icon)
    public void setToolTipTextAt(int index, String toolTipText)
    public void setForegroundAt(int index, Color foreground)
    public void setBackgroundAt(int index, Color background)
    public void setEnabledAt(int index, boolean enabled)
    public void setComponentAt(int index, Component component)
    public void setDisplayedMnemonicIndexAt(int tabIndex, int mnemonicIndex)

The same exception handling will be added to the following methods which previously did nothing:

    public void setSelectedIndex(int index)
    public void remove(int index)

JTable

DefaultTableModel.moveRow Specification Clarified

The bugtraq report that corresponds to this change is: 4144295.

In JDK 1.3, the moveRow method in DefaultTableModel was documented in such a way that it did not clearly define whether the row at startIndex or the row at endIndex row would end up at toIndex. By inference from the examples, it appears that the startIndex should end up at toIndex when moving rows downward and the endIndex should end up at toIndex when moving rows upward.

That said, the implementation of moveRow had a bug such that whenever the number of rows being moved was more than one - the rows would end up in somewhat arbitrary positions and would not even be contiguous after the move. Bug 4144295 noted that the implementation did not even perform the example in its specification: the moveRow(1, 3, 5) example in practice left the vector in the following state:

a|C|e|B|D|f|g|h|i|j|k
The new implementation makes the observation that this operation is a simple rotation of elements between bounds that can be calculated from the inputs.

Since the previous implementation did not work we have taken the opportunity to simplify the definition to one where the startIndex is always moved to the toIndex, with all other elements appearing after toIndex in the same order that they were originally. Note that this performs the same operation as the previous implementation in the only case where it worked - when a single row was being moved.

The new implementation does not throw an exception when endIndex is less than startIndex - it does nothing instead having satisfied the implied contract to move all rows, r, where startIndex <= r <= endIndex.

Typing into a JTable Now Transfers Focus to the Cell

The bugtraq report that corresponds to this change is: 4274963.

The Excel application automatically gives focus to underlying editors when a user presses an alphanumeric key. We have received over 200 JDC votes requesting that we offer this behavior in JTable. While we can't change the default behavior for reasons of backwards compatibility, in this release we have added the new property, surrendersFocusOnKeystroke, to address this request. The new methods setSurrendersFocusOnKeystroke and getSurrendersFocusOnKeystrok support this feature. The default behavior remains unchanged.

DefaultTableModel Now Allows a Null For Name Argument

The bugtraq report that corresponds to this change is: 4474094.

The methods DefaultTableModel.addColumn(Object) and DefaultTableModel.addColumn(Object, Vector) did not previously allow null for the name argument - they threw an IllegalArgumentException. As it is possible to set the column name to null via other means (using constructors, or directly manipulating the field), the addColumn methods now also allows a null value.

JTree

DefaultTreeModel Now Allows a Null Root

The bugtraq report that corresponds to this change is: 4264897.

DefaultTreeModel now allows a null root node . Previously, the javadoc for TreeModel specified that a null root was valid, but DefaultTreeModel would not allow one. DefaultTreeModel now allows setting a null root, as well as a null root in the constructor. The javadoc for setRoot has been revised to reflect the change.

Added First Letter Navigation to JTree

The bugtraq report that corresponds to this change is: 4284709.

Often times users wish to navigate to cells in a JTree using alphanumeric keys. To facilitate this, a method named getNextMatch has been added to JTree. BasicTreeUI installs a KeyListener that invokes this method as keys are typed on the keyboard.

JList

ListDataEvent.toString Now Provides Useful Information

The bugtraq report that corresponds to this change is: 4134085.

Developers often rely on the toString method for useful debugging information. Unfortunately ListDataEvent's toString method did not really provide anything useful. For this release, it has been changed to return something useful.

JList Now Supports First Letter Key Navigation

The bugtraq report that corresponds to this change is: 4284709.

Often times users wish to navigate to cells in a JList using alphanumeric keys. To facilitate this, getNextMatch was added to JList. BasicListUI will then install a KeyListener that will invoke this method as keys are typed to update the selection.

JList Items May Now be Arranged Horizontally

The bugtraq report that corresponds to this change is: 4460016.

JList previously only allowed laying out its cells vertically, that is:

1
2
3
4

Numerous users have asked for the ability to lay out the list horizontally, something like:

1  3
2  4
or
1  2
3  4

To achieve this, three constants are added to JList, VERTICAL, VERTICAL_WRAP, and HORIZONTAL_WRAP. The methods getLayoutOrientation and setLayoutOrientation are also added to JList. The javadoc for the JList methods getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableBlockIncrement, and getPreferredScrollableViewportSize are updated accordingly. Likewise, the javadoc for getPreferredSize in javax.swing.plaf.basic.BasicListUI is updated.

Miscellaneous

Two default settings in Metal look and feel have changed

Two default settings have changed in the Metal look and feel:

  • The foreground color for JLabel has changed from dark blue to black.
  • The font for DefaultListCellRenderer has changed from normal to bold.

JColorChooser.setPreviewPanel doesn't remove the old one

The bugtraq report that corresponds to this change is: 4759306.

When calling this method the default PreviewPanel was not removed from the colorChooser, though the new panel was added. This resulted in strange artifacts. This has been fixed in release 1.4.2.

Deadlock in JColorChooser Fixed

The bugtraq report that corresponds to this change is: 4668511.

This bug when encountered in 1.4.0, caused a deadlock that would hang the entire application. This has been fixed in 1.4.1.

JFrame.setDefaultCloseOperation Can Now Throw SecurityException

As of release 1.4.1, the setDefaultCloseOperation method in JFrame may now throw SecurityException.

Metal Can Now Pick up Font Sizes from the Desktop on Microsoft Windows

The bugtraq reports that correspond to this change are: 4419964 and 4668963.

Prior to this release, the DefaultMetalTheme ignored the font size information from the Windows desktop. As of release 1.4.1, DefaultMetalTheme can use the font sizes specified in the Windows desktop. This can be disabled using the system property swing.useSystemFontSettings. An additional part of this bug is that our Windows look and feel was picking up the wrong fonts for a handful of components; this has been fixed.

Some Locales Will Honor Font Size Only from the Desktop on Windows

The bugtraq report that corresponds to this change is: 4615396.

On Microsoft Windows, with the WindowsLookAndFeel, in certain locales we only honor font size from the desktop. This has been addressed in 1.4.1.

Document Which Properties a Look and Feel May Ignore

The bugtraq report that corresponds to this change is: 4420209.

Some look and feel implementations may ignore certain properties which affect the look and feel. With this release, the documentation for certain methods has been modified to indicate that these properties may be ignored by some look and feels. Also, the class spec for UIManager and the documentation for the javax.swing.plaf.metal package were modified to specify that the Java look and feel is the default look and feel. This modification affects only documentation.

The affected methods are:

  • javax.swing.AbstractButton
    • public boolean isFocusPainted()
    • public void setFocusPainted(boolean b)
    • public boolean isRolloverEnabled()
    • public void setRolloverEnabled(boolean b)
  • javax.swing.JButton
    • public boolean isDefaultButton()
    • public boolean isDefaultCapable()
    • public void setDefaultCapable(boolean defaultCapable)
  • javax.swing.JCheckBox
    • public boolean isBorderPaintedFlat()
    • public void setBorderPaintedFlat(boolean b)
  • javax.swing.JColorChooser
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
  • javax.swing.JComboBox
    • public boolean isLightWeightPopupEnabled()
    • public void setLightWeightPopupEnabled(boolean aFlag)
  • javax.swing.JFileChooser
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
    • public boolean getControlButtonsAreShown()
    • public void setControlButtonsAreShown(boolean b)
  • javax.swing.JInternalFrame
    • public boolean isIconifiable()
    • public void setIconifiable(boolean b)
  • javax.swing.JList
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
  • javax.swing.JPopupMenu
    • public boolean isLightWeightPopupEnabled()
    • public void setLightWeightPopupEnabled(boolean aFlag)
  • javax.swing.JProgressBar
    • public boolean isStringPainted()
    • public void setStringPainted(boolean b)
    • public boolean isIndeterminate()
    • public void setIndeterminate(boolean newValue)
  • javax.swing.JSplitPane
    • public boolean isOneTouchExpandable()
    • public void setOneTouchExpandable(boolean newValue)
    • public boolean isContinuousLayout()
    • public void setContinuousLayout(boolean newContinuousLayout)
  • javax.swing.JTable
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
  • javax.swing.text.JTextComponent
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
  • javax.swing.JToolBar
    • public boolean isFloatable()
    • public void setFloatable(boolean b)
  • javax.swing.JTree
    • public boolean getDragEnabled()
    • public void setDragEnabled(boolean b)
    • public boolean getShowsRootHandles()
    • public void setShowsRootHandles(boolean newValue)
    • public boolean getScrollsOnExpand()
    • public void setScrollsOnExpand(boolean newValue)

SwingConstants Now Define NEXT and PREVIOUS

The bugtraq report that corresponds to this change is: 4175466.

SwingConstants defines constants that are used throughout Swing. A common UI operation is to locate the next/previous item in a sequence; as such, SwingConstants now defines constants for NEXT and PREVIOUS.

New Way to Process Bindings for Swing Components from a non-Swing Component

The bugtraq report that corresponds to this change is: 4344900.

Swing has an elaborate infrastructure to support associating actions with particular key strokes. This means that when the user types a character the action executes. The processing of these events is triggered from within JComponent.processKeyEvent (processKeyEvent is overridden from java.awt.Component). As the processing of these actions occurs within JComponent, there was previously no way for developers to process bindings from within non-JComponent subclasses that get focus. To facilitate this, a processKeyBindings method was added to SwingUtilities.

Auditory Feedback for Swing Components

The bugtraq report that corresponds to this change is: 4290988.

Note: Due to a handful of bugs in the sound package we default to playing no sounds. If you would like to turn on sounds, you can do the following:

    UIManager.put("AuditoryCues.playList",
        UIManager.get("AuditoryCues.allAuditoryCues"));

Previously, Swing components did not provide the same auditory feedback as native components on many platforms. MALF2, a set of modifications to Swing's PLAFs, is primarily intended for use as an output-only, non-speech audio user feedback mechanism. The MALF2 project is important from the perspective of Swing/JFC and the Java platform's goal of tight user interface integration with the underlying platform. The MALF2 project ensures that a user's experience with a native application and a Swing/JFC application is identical with regard to the auditory user feedback.

The implementation centers around adding API to BasicLookAndFeel to support loading an ActionMap containing Actions that play sounds. Various BasicComponentUI implementations then invoke actionPerformed on the Action at the appropriate time to play the sound. For example, BasicMenuItemUI uses doClick to perform the action. While BasicLookAndFeel plays sounds using the Java Sound API, subclasses can use an alternative method. For example, WindowsLookAndFeel maps the Strings to Runnables by way of Toolkit.getDefaultToolkit().getDesktopProperty(), to provide integration with the sounds provided by Windows.

The ActionMap containing the sounds can be accessed via BasicLookAndFeel.getAudioActionMap. When getAudioActionMap is first invoked, it performs the following:

  1. The default entry auditoryCues.cueList (an Object[]) is used to determine a list of sounds to load.
  2. Each entry in the array is passed to createAudioAction to obtain the Action responsible for playing the sound.
  3. The Object passed into BasicLookAndFeel.createAudioAction is used to look up a path to a sound file from the defaults table that can be loaded by Java Sound.
  4. When one of the BasicComponentUIs classes wishes to play a sound, it invokes BasicLookAndFeel.playSound, passing in the Action.
  5. BasicLookAndFeel.playSound invokes actionPerformed on the Action if the name of the Action is contained in the defaults entry AuditoryCues.playList.

This architecture allows the developer numerous ways to customize the sounds that are played:

  • The sounds associated with a particular JComponent can be manipulated by changing the Action in the ActionMap associated with the JComponent, eg:
    ActionMap map = menuItem.getActionMap();
map.put("MenuItem.commandSound", differentActionToPlaySound);
  • The sounds used by all Components of a particular type can be changed by manipulating the defaults table, eg:
    UIManager.put("MenuItem.commandSound", "pathToNewSoundFild");
  • Developers creating a custom look and feel may override one of the BasicLookAndFeel methods to load the sounds in an alternative manner, or perhaps play the sounds in a different way.

Alternatively, the set of sounds to be played can be manipulated by way of the defaults entry AuditoryCues.playList. This Object array contains the keys in the defaults table indicating which sounds to play. MetalLookAndFeel defines this to be:

new Object[]  {"OptionPane.errorSound",
          "OptionPane.informationSound",
          "OptionPane.questionSound",
          "OptionPane.warningSound" }
This has the effect of turning on only the sounds that JOptionPane supports.

JMenu Updated to Work with New Focus Architecture

The bugtraq report that corresponds to this change is: 4371580.

The new focus architecture introduced via RFE 4290675 allows for developers to request a temporary focus change. The request is done through the protected Component methods requestFocus(boolean) or requestFocusInWindow(boolean). These two methods are protected as they are not meant for general use, but only for implementors of lightweight toolkits, such as Swing. Swing is architected in such a way that code in different packages needs to temporarily request focus; as such, the parent class of all Swing Components, JComponent, needs to expose requestFocus(boolean) and requestFocusInWindow as public.

New Support for Changing ComponentOrientation in Tree of Components

The bugtraq report that corresponds to this change is: 4337186.

With the bulk of the Swing components paying attention to their ComponentOrientation property, we now need two features to make it easier to manage the ComponentOrientation settings of an entire hierarchy of components. It should be easy to set entire hierarchies of components to a consistent ComponentOrientation setting using the new SwingUtilities method applyComponentOrientation(Component c, ComponentOrientation o).

New Access to Desktop Properties

The bugtraq report that corresponds to this change is: 4290973.

As part of the Windows look and feel update, a method was added to LookAndFeel, getDesktopPropertyValue, to facilitate accessing desktop properties.

New Method to Offset Rectangle by Component's Insets

This was actually added as part of the update to JProgressBar to support an indeterminate state. The bugtraq report that corresponds to this change is: 4290717.

The new method is calculateInnerArea(Component, Rectangle) has been added to SwingUtilities.

New API for Mouse Wheels

The bugtraq report that corresponds to this change is: 4356268.

Wheel mice, with a scroll wheel as a middle mouse button, are increasingly popular. This proposal provides for built-in Java support for scrolling via the mouse wheel, as well as a new wheel event listener so developers can customize mouse wheel behavior.

A new class, MouseWheelListener, and a new interface, MouseWheelEvent, have been added. The constant, MOUSE_WHEEL_EVENT_MASK has been added to AWTEvent. AWTEventMulticaster has three new methods: mouseWheelMoved, add, and remove. Component has two new methods: addMouseWheelListener, and removeMouseWheelListener. ScrollPane also has two new methods: setWheelScrollingEnabled and isWheelScrollingEnabled. Finally, Robot has the new method mouseWheel.

JFrame, JDialog, and JApplet No Longer Override processKeyEvent

The bugtraq report that corresponds to this change is: 4462408.

Swing supports the option of registering key bindings on JComponents. In previous releases it was necessary for Swing top level components ( JFrame, JDialog, and JApplet) to override processKeyEvent (defined in java.awt.Component) to activate these bindings if the focus was ever on one of these top level components. With the addition of java.awt.KeyEventPostProcessor and Swing taking advantage of this ( RFE 4389332), it is no longer necessary for these methods to be overridden in the Swing top level components. As of this release, these methods have been removed at the top level and are now inherited.

Document Headless Exceptions for JWindow Constructors

The bugtraq report that corresponds to this change is: 4483258.

Though the headless mode was added to this release, two JWindow constructors did not indicate that HeadlessException may be thrown. This has been fixed in the doc for Window(Window, GraphicsConfiguration) and JWindow(GraphicsConfiguration).

Known Input Verifier Bug

The bugtraq report that corresponds to this change is: 4532517.

We've recently found an input verifier bug that has been causing problems for some of our users. Under 1.4, the shouldYieldFocus method does not allow side-effects such as popping up an OptionPane.

We do have the following workaround:

    public boolean shouldYieldFocus(JComponent input) {
      if (verify(input)) {
        return true;
      }

      // According to the documentation, should yield focus is allowed to cause
      // side effects.  So temporarily remove the input verifier on the text
      // field.
      input.setInputVerifier(null);
      System.out.println("Removed input verifier");

      // Pop up the message dialog.
      String message = "Roll over the 'JButton1' with mouse pointer "
        + "after closing this dialog.\nIt sometimes behaves correctly "
        + "for the first time\n but repeating action brings incorrect "
        + "behaviour of button.";
      JOptionPane.showMessageDialog(null, message , "invalid value",
        JOptionPane.WARNING_MESSAGE);
      System.out.println("Showed message.");

      // Reinstall the input verifier.
      input.setInputVerifier(this);
      System.out.println("Reinstalled input verifier");

      // Tell whomever called us that we don't want to yield focus.
      return false;
    }

Known Bugs

Focus Bug When Simultaneously Running Windows and a Remote Display Application

In certain circumstances showing a heavy weight Window that is not focusable causes focus to be lost. This specifically happens when running flavors of Windows and a remote display application, such as Reflection-X, at the same time. Note that this bug was filed against release 1.4, but is fixed in 1.4.1. Refer to bug 4628933 for details.

JRootPane

New Multi Implementation of RootPaneUI

The bugtraq report that corresponds to this change is: 4338458.

The classes in javax.swing.plaf.multi are used to multiplex between multiple look and feels. This is typically used by assistive technologies that use an auxiliary look and feel to provide additional information, such as auditory information. There is currently no implementation in multi for RootPaneUI which makes using an auxiliary look and feel problematic.

The new class javax.swing.plaf.multi.MultiRootPaneUI has been added.

Support for Look and Feels to Provide Window Decorations

The bugtraq report that corresponds to this change is: 4290471.

AWT recently provided API such that Windows may be undecorated. That is, when undecorated is true, the Window will not render any widgets for closing, moving, or resizing. As such, Swing has made it possible for the look and feel to render decorations for Windows.

This feature is primarily supported in javax.swing.JRootPane, but we encourage developers to use the switches provided in javax.swing.JFrame and javax.swing.JDialog.

The following changes were made to JRootPane:

    public static final int NONE;
    public static final int FRAME;
    public static final int PLAIN_DIALOG;
    public static final int INFORMATION_DIALOG;
    public static final int ERROR_DIALOG;
    public static final int COLOR_CHOOSER_DIALOG;
    public static final int FILE_CHOOSER_DIALOG;
    public static final int QUESTION_DIALOG;
    public static final int WARNING_DIALOG;

    public void setWindowDecorationStyle(int style)
    public int getWindowDecorationStyle()

Not all look and feels support the window decoration style; the method getSupportsWindowDecorations has been added to javax.swing.LookAndFeel to provide a way for look and feels to indicate whether they support this behavior.

The methods, isDefaultLookAndFeelDecorated(), and setDefaultLookAndFeelDecorated have been added to JFrame.

The methods, isDefaultLookAndFeelDecorated(), and setDefaultLookAndFeelDecorated have also been added to JDialog.

JScrollBar

JScrollBar Now Overrides setUI

The bugtraq report that corresponds to this change is: 4213298.

JScrollBar did not previously override the setUI method. For this release, it has been changed to conform to this behavior.

JScrollPane

JScrollPane Supports New MouseWheelListener

This was implemented as part of the mouse wheel support. This section only documents the changes to JScrollPane, for details of the other changes refer to this section. The bugtraq report that corresponds to this change is: 4356268.

The methods isWheelScrollingEnabled and setWheelScrollingEnabled were added to JScrollPane.

A new protected inner class, MouseWheelHandler, was added to javax.swing.plaf.basic.BasicScrollPaneUI. The relevant method in this inner class is mouseWheelMoved. Finally, the new method createMouseWheelListener has been added to BasicScrollPaneUI.

RepaintManager

New VolatileImage Support

The bugtraq report that corresponds to this change is: 4363288.

The Java 2D team has implemented a new VolatileImage mechanism that has the ability to take advantage of hardware acceleration for Image graphics and blit-to-screen operations.

By default, Swing uses double-buffering to paint the contents of GUI components (by rendering into an offscreen image and then copying that image to the screen) and has been changed to take advantage of the new VolatileImage support.

The double buffer that Swing uses to do painting is obtained from the RepaintManager by using the method getOffscreenBuffer. Since a VolatileImage object requires special handling (to test for failure conditions), we could not simply change this method to return a VolatileImage since there may be existing code out there that invokes this method and does not implement this additional handling. Therefore, we have added a method, getVolatileOffscreenBuffer, to javax.swing.RepaintManager to specifically return a VolatileImage object.

SpringLayout

New SpringLayout Class

The bugtraq report that corresponds to this change is: 4290203.

This release introduces the new layout manager, SpringLayout.

See How to Use SpringLayout in The Java Tutorial for examples of using SpringLayout.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Changes Since Java 2 SDK, v1.4

Documentation Contents

Swing Changes Since Java™ 2 SDK, Standard Edition, v 1.4

The Swing Changes and New Features for Java 2 SDK, Standard Edition, v 1.4 document describes changes for all the 1.4.* releases. This document provides links to changes specific to the 1.4.1 and 1.4.2 releases.

Changes for the Incremental Release, Java 2 SDK, S.E., v1.4.1

For Swing, this release primarily features bugfixes. Bugs that have been fixed include:

Focus related bugs:

  • 4632782: JPopupMenu may now be prevented from taking focus
  • 4628933: Heavy weight windows may lose focus when running on some versions of Microsoft Windows with a remote display application
  • 4659800: Default button should follow the focus on Microsoft Windows look and feel
  • JTabbedPane and Focus Clarification

Drag and drop related bugs:

  • 4513715: Drop no longer clobbers selected text
  • 4513638: Cut/copy/drag fixed for JEditorPane with RTFEditorKit
  • Import/export behavior has changed for the JEditorPane component

Miscellaneous:

  • 4532517: Workaround for input verifier bug
  • 4419964, 4668963: Metal look and feel can now pick up font sizes from the desktop on Microsoft Windows
  • 4615396: Some locales will only honor font size from the desktop
  • 4668511: Deadlock in JColorChooser
  • 4218431: Document that multiple file selection is supported in JFileChooser

Changes for the Incremental Release, Java 2 SDK, S.E., v1.4.2

In addition to many bugfixes, this release features these new enhancements:

JFileChooser Performance Enhancements

The bugtraq reports that correspond to this change are: 4679673 and 4712307.

This release features many performance improvements to JFileChooser. In some situations, JFileChooser now performs 300 times faster.

Windows XP look and feel

Release 1.4.2 introduces support for the standard Microsoft Windows XP appearance as the default when running on the Windows XP platform. This look and feel automatically appears if your app is using Swing's WindowsLookAndFeel class (either by way of UIManager.getSystemLookAndFeelClassName() or by explicitly using com.sun.java.swing.plaf.windows.WindowsLookAndFeel) on a machine running the Windows XP operating system. The following example illustrates the preferred way of setting the look and feel to match that of the native platform:

  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

If you prefer your Swing app to look like a classic Windows app you can turn of the XP look using the system property swing.noxp=true. This is typically used as a command line parameter, eg:

  java -Dswing.noxp=true -jar SwingSet2.jar

Note that the swing.noxp property may not be supported in future releases.

GTK+ look and feel

Release 1.4.2 introduces a look and feel based on GTK+ 2.0. In order to get this look and feel you need to explicitly ask for it by way of UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel") or by defining the system property swing.defaultlaf to be com.sun.java.swing.plaf.gtk.GTKLookAndFeel. In the next release we will make UIManager.getSystemLookAndFeelClassName() return this look and feel when appropriate.

The GTK+ look and feel can be customized by way of resource files. Swing's GTK+ look and feel uses the following algorithm to locate the resource files:

  1. If the system property swing.gtkthemefile exists, parse it and stop, for example: java -Dswing.gtkthemefile=/tmp/customTheme -jar SwingSet2.jar.
  2. If the file user.home/.gtkrc-2.0 exists, parse it and continue.
  3. Determine the user selected theme name (THEMENAME) by way of the desktop property gnome.net/ThemeName which is determined using XSETTINGS. If this property is null, use Default as THEMENAME.
    1. If the file user.home/.themes/THEMENAME/gtk-2.0/gtkrc exists parse it and stop.
    2. If the system property swing.gtkthemedir exists and the file swing.gtkthemedir/THEMENAME/gtk-2.0/gtkrc exists, parse it and stop.
    3. If the system property swing.gtkthemedir doesn't exist and the file /usr/share/themes/THEMENAME/gtk-2.0/gtkrc exists, parse it and stop.
    4. Lastly if swing.gtkthemedir is defined parse swing.gtkthemedir/THEMENAME/gtk/gtkrc, otherwise parse /usr/share/themes/THEMENAME/gtk/gtkrc.

One way GTK+ can be customized is by way of a theme engine. A handful of engines exist. In 1.4.2, Swing supports theme files for Default, pixmap, and bluecurve engines. We are investigating ways to open up the API to allow for the creation of additional GTK engines. Visit http://www.themes.org for examples.

GTK+ allows for specifying fonts in two ways: using an XLFD or using a pango string. Pango provides for facilities similar to the composite Fonts on the Java platform, that is, a font that consists of a number of different fonts for different code points. Because pango's composite fonts do not exactly match Java's composite fonts, a Swing app with the GTKLookAndFeel will not exactly match a native GTK+ app. We are investigating ways to deal with this. One option is to replace your pango font file with a version equivalent to Java's font.properties file. Additionally we currently ignore XLFDs and pass Pango strings (after mapping sans to sansserif and monospace to monospaced) directly to a java.awt.Font.

GTK+ does not provide MDI (JInternalFrame) capabilities nor does it directly support theming of top level windows, rather that is left up to the WindowManager. For Swing's MDI classes we support theming by way of Metacity. We currently only support the Crux and Bluecurve themes. If we can not locate either of these themes we fall back to our own custom theme. You can use the system property swing.metacitythemename to name a particular theme to use, otherwise we will look in user.dir/.gconf/apps/metacity/general/%gconf.xml to determine the name of theme and look in /usr/share/themes/THEMENAME/metacity-1/metacity-theme-1.xml or /usr/gnome/share/themes/THEMENAME/metacity-1/metacity-theme-1.xml for the actual resource file. The following example shows how to trigger Swing to use a specific metacity theme:

  java -Dswing.metacitythemename=Bluecurve -jar SwingSet2.jar

GTK+ resource files allow for customizing a number of look and feel options beyond the look. In 1.4.2 we support the primary style configurations (fg, bg, base ..), gtk-font-name, gtk-icon-sizes, stock icons (for optionpane), focus-line-width, focus-padding, focus-line-pattern, internal-padding, shadow-type (for menubars), and trough-border.

GTK provides a mechanism for which running applications can pick up a theme change and automatically update the UI, this will be supported in a future version of Swing's GTK look and feel.

GTK Incompatabilities

Correctly supporting a GTK+ look and feel posed a number of challenges to Swing's current architecture. In Swing an opaque component ALWAYS paints its background by way of ComponentUI's update method, in GTK+ a nonopaque component may or may not paint the background, depending upon the engine. To correctly mirror GTK+ a number of Components that previously were opaque have been made nonopaque (by way of the ComponentUI subclass's installUI method). Additionally because the look of a component can change based on the containment hierarchy the opacity may change after the constructor has completed. A ramification of this is that if you invoke setOpaque() on a component, it may change out from under you. We will fix this in the next release.

GTK+ calls into the engine to paint border decorations before the actual contents of the widget are painted. Some engines, most notably the pixmap engine, rely on this ordering to correctly render decorations behind the contents. In Swing the border is rendered after the widget contents are painted. In the GTKLookAndFeel we install a Border only to provide space, and let the UI do the actual rendering of the border decorations as part of the paint method. The ramification of this is that if you install a Border on a widget with the GTKLookAndFeel you will likely not get the effect you are after. Again, we are investigating alternatives and will provide a better solution in the next release.

1.4.2 Bugs

One bug worth mentioning:
  • 4759306: JColorChooser.setPreviewPanel does not remove the old one.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing Data Transfer

For the Java 2 Platform, Standard Edition, v 1.4 release, Swing has added support for data transfer between applications. A drag and drop operation is a data transfer request that has been specified by a gesture with a graphical pointing device. In the case of copy/paste, data transfer is often initiated with the keyboard. The ability to transfer data takes two forms:

  • Drag and drop (DnD) support
  • Clipboard transfer via cut/copy/paste
When adding data transfer support to Swing, the goal was to make it easy for developers using Swing components to add clipboard transfer as well as drag and drop to an application. Previous AWT support for drag and drop provided a great deal of flexibility, but also a fair amount of complexity, to implement. Also, AWT support for clipboard transfer had not been integrated into Swing in a natural way. For this release, data transfer support has been implemented so that the developer may take advantage of these powerful features with minimal effort.

Because the state of each Swing component is independent of the definition of the data model, it was easy to implement a mechanism for moving the data between components without worrying about the details of the data itself. The data transfer amounts to transferring part of one model to another model. (In the case of cut/copy/paste, the data is transferred between the model and the clipboard.) To support data transfer, we:

  • Added a small amount of API to enable data transfer with a few method calls.
  • Made it possible to disable the Swing DnD implementation so that the user can use the support provided by AWT to customize any special behavior.
  • Implemented the necessary changes in the look and feel implementations we provide.

Quick Reference: Components That Support DnD

Component | Supports Drag | Supports Drop
JColorChooser | Yes | Yes
JEditorPane | Yes | Yes
JFileChooser | Yes | No
JFormattedTextField | Yes | Yes
JLabel | see here | see here
JList | Yes | No
JPasswordField | No | Yes
JTable | Yes | No
JTextArea | Yes | Yes
JTextField | Yes | Yes
JTextPane | Yes | Yes
JTree | Yes | No

This document has the following sections:

  • Data Transfer Support
    • Default TransferHandler Support
    • Example of Adding Support to JLabel
  • Drag Support
    • Default Drag Support
    • Adding Drag Support to Subclasses of Swing Classes
    • Operation of TransferHandler.exportAsDrag
  • Drop Support
    • Default Drop Support
    • Using the Drop Support in Subclasses of Swing Classes
  • Clipboard Transfer Support
    • Default Clipboard Transfer
    • Using the Clipboard Transfer Support in Subclasses of Swing Classes
  • Implementation Details
  • Changes Since Beta
  • Known Bugs

Data Transfer Support

The foundation of data transfer is support for handling the transfer of data into and out of a component. With this functionality available on the component, the mechanics of managing a drag and drop can be provided automatically. In addition, support for cut/copy/paste can also be provided automatically. The crux of this implementation is the new class TransferHandler. The JComponent property methods, setTransferHandler and getTransferHandler, provide an entrypoint to the data transfer mechanism for any component which extends JComponent.

The table below details the extent of the cut, copy, paste, and drop support for each of the components when a non-null TransferHandler is installed. Note that this support is enabled by the look and feel code. Support for dragging is initially disabled, but may be enabled by calling setDragEnabled(true) on the component. If the component doesn't have such a method, the drag may be enabled by binding some kind of gesture to it.

Default TransferHandler Support

For the components listed below, Swing installs default implementations of TransferHandler. For those components that have default Swing support, the TransferHandler is installed by the ComponentUI if the value of the transferHandler property is null or marked by the presence of the UIResource interface. The default TransferHandler implementation installed by the ComponentUI is marked by the UIResource interface, enabling developers to override the default TransferHandler. The following table shows the support provided.

Components That Support DnD

Component | Exports (Drag, Cut, Copy) | Imports (Drop, Paste)
JColorChooser | The selected color is offered through the JavaBeans property handling of TransferHandler. The flavor offered is application/x-java-jvm-local-objectref; class=java.awt.Color. The value transferred is determined by getColor. | Accepts inserts of type Color. The data is imported by using setColor (from the bean property handling). Any flavor having class=java.awt.Color (or a subclass of java.awt.Color) is accepted.
JEditorPane | 1.4: If the content-type of the JEditorPane is text/plain, the selected text is offered as text/plain through the write method of the EditorKit. If the content-type is OTHER, it is exported both as text/plain using the getSelectedText method, and as OTHER using the write method of the EditorKit. 1.4.1: The selected text, as returned by the getSelectedText method, is exported as text/plain. In addition, if the content-type of the JEditorPane is other than text/plain, the selected content is also offered in that other flavor using the EditorKit's write method. | 1.4: Accepts inserts of type text/plain and whatever the current type returned by getContentType. If a type is found matching the current type (including text/plain), it is imported using the EditorKit's read method. Otherwise, text/plain is imported through the component's replaceSelection method. Paste: the contents of the selection, if any, are replaced. Drop: the data is inserted at the caret position. 1.4.1: Accepts inserts of type text/plain and whatever the current type returned by getContentType. If a type is found matching the current type (excluding text/plain), it is imported using the EditorKit's read method. Otherwise, text/plain is imported through the component's replaceSelection method. Paste: the contents of the selection, if any, are replaced. Drop: the data is inserted at the caret position.
JFileChooser | The selection is offered in the same manner as those from the native file chooser. | Imports not accepted. As the mouse is moved over the list, the potential drop point is indicated by highlighting the file/directory under the cursor. See Default Drop Support.
JFormattedTextField | The selected text is offered as text/plain. | Accepts inserts of type text/plain. Paste: the contents of the selection, if any, are replaced; otherwise the data is inserted at the caret position. Drop: the data is inserted at the caret position. Note that paste and drop employ the same code paths as typing from the keyboard, therefore code validation is preserved.
JList | If the selection is a single item, it is offered as text/plain. If multiple items are selected, they are offered as text/html. The format of the text/html is a <UL> tag followed by the selected list items each starting with an <LI> tag. | Imports not accepted. As the mouse is moved over the list, the potential drop point is indicated by highlighting the list item under the cursor. See Default Drop Support.
JPasswordField | For security reasons, cut, copy, and drag are not supported. | Accepts inserts of type text/plain. Paste: the contents of the selection, if any, are replaced; otherwise the data is inserted at the caret position. Drop: the data is inserted at the caret position.
JTable | If the selection is a single item, it is offered as text/plain. If multiple items are selected, they are offered as text/html. The format of the text/html is a <TABLE> tag followed by a <TR> tag for each row and a <TD> tag for each cell. | Imports not accepted. As the mouse is moved over the table, the potential drop point is indicated by highlighting the cell under the cursor. See Default Drop Support.
JTextArea | The selected text is offered as text/plain. | Accepts inserts of type text/plain. Paste: the contents of the selection, if any, are replaced; otherwise the data is inserted at the caret position. Drop: the data is inserted at the caret position.
JTextField | The selected text is offered as text/plain. | Accepts inserts of type text/plain. Paste: the contents of the selection, if any, are replaced; otherwise the data is inserted at the caret position. Drop: the data is inserted at the caret position.
JTextPane | Same as JEditorPane. | Same as JEditorPane.
JTree | If the selection is a single item, it is offered as text/plain. If multiple items are selected, they are offered as text/html. The format of the text/html is nested lists, similar to the format used for JList. | Imports not accepted. As the mouse is moved over the table, the potential drop point is indicated by highlighting the tree node under the cursor. See Default Drop Support.

Example of Adding Support to JLabel

The JLabel component does not support DnD by default. The following code fragment creates a JLabel that supports drag and drop on the "text" property (a String):

JLabel componentType = new JLabel();
componentType.setTransferHandler(new TransferHandler("text"));
MouseListener ml = new MouseAdapter() {
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler th = c.getTransferHandler();
        th.exportAsDrag(c, e, TransferHandler.COPY);
    }
};
componentType.addMouseListener(ml);

We have included a small example that implements drag and drop using a JTextField and a JLabel. You can type a value into the text field, highlight the text, then hold the mouse button down over the textfield and drag a few pixels. An icon appears under the cursor. Release the icon over the JLabel and see the text replace the "Drop Here" text. Simultaneously with the drop, the text is removed from the source textfield. The default behavior for drag and drop is MOVE. To change the behavior to COPY, hold down the CONTROL key while selecting the text. On Windows, a plus sign appears in the icon. When the text is released on the target, it is left intact in the source. You can likewise drag from the JLabel to the text field. Note that JLabel does not have bindings for copy/paste and is unable to get the focus that is required to support this feature.

See the JLabelDragNDrop.java example here.

Drag Support

Some components, such as text fields, support selections. For those kinds of components, a drag operation is typically initiated by dragging an existing selection with the mouse. A controller for this type of component can recognize this condition and initiate a drag. For those components that don't have selections, Swing can't automatically initiate the drag, but Swing can handle the mechanics of the drag if told that a drag attempt has been initiated as shown in the JLabel example.

With this level of drag support, the Swing developer can focus on implementing a TransferHandler that represents the desired transfer, and setting properties on the Swing component. This greatly simplifies the burden to the Swing developer wanting to support dragging in an application.

Note that we are currently investigating providing different visual appearances of the drag, hence the reference to Icon in the API. Stay tuned for future developments.

Default Drag Support

The simplest level of support is to set a flag that indicates the developer would like the default support enabled. The components that offer default support for dragging are described in the Exports column of the Components That Support DnD table; but to summarize, the classes that directly implement setDragEnabled and getDragEnabled are: JColorChooser, JFileChooser, JList, JTable, JTree, and JTextComponent. The drag gesture is defined as the press of the first mouse button over a selection and dragging a few pixels. Setting the dragEnabled property to true therefore has a subtle effect on mouse behavior.

When dragging is enabled on a component, the Swing controller (in the corresponding ComponentUI subclass) begins looking for a drag gesture, and if the transferHandler property is null, or marked by the presence of the UIResource interface, a default implementation is installed. The implementation provided by Swing is marked with the UIResource interface, so a developer can insert a new TransferHandler by replacing the default TransferHandler property with a custom implementation. When a drag gesture is recognized, the exportAsDrag method is called on the TransferHandler which initiates the drag mechanism. The actual transfer is handled by the java.awt.dnd mechanism, requiring no further effort from the developer.

Adding Drag Support to Subclasses of Swing Classes

The drag support provided by Swing is activated by the TransferHandler.exportAsDrag method. This makes adding drag support as easy as:

  1. Installing a TransferHandler implementation (so there is something to drag) by calling the setTransferHandler method.
  2. Recognizing a drag gesture.
  3. Calling the exportAsDrag method.

Some scenarios for accomplishing this are:

  • Add a MouseListener that watches for the desired gesture, then call getTransferHandler on the component and call the exportAsDrag method when the desired gesture is found. See the JLabel example.
  • Reimplement the processMouseEvent method in a subclass and call the exportAsDrag method on the ComponentUI variable when a drag gesture is seen, otherwise execute the superclass behavior.
  • In a component with a custom UI implementation, have the controller call exportAsDrag when a drag gesture has been seen.

Operation of TransferHandler.exportAsDrag

When the exportAsDrag method is called on TransferHandler, the drag is handled by Swing provided functionality. When this method is called, it is assumed that a valid drag gesture has been recognized. The method performs the following steps:

  1. A Swing implementation of a DragSource and DragListener is used to start the drag using the Transferable implementation returned by createTransferable as data transfer object.
  2. When the drop has completed, the exportDone method is called on the TransferHandler. For some operations, such as MOVE, it may be necessary to remove the data from the source. The default behavior for text-based components, for example, is that a standard drag implements MOVE behavior (following the drop the selected text is removed from the source component). The user may override this behavior by holding down the control key when the text is selected for dragging. On Windows, the drag icon visually reflects this behavior with a small plus-sign.

Drop Support

The primary support for handling a drop is the same as for a paste operation, the importData method on the TransferHandler. The semantics of inserting data into a component are generally more meaningful at the application level than the toolkit level. Users of an application can drop all kinds of Transferable implementations on components that are completely unknown to the Swing toolkit. It is up to the Swing developer to provide a TransferHandler with meaningful import semantics if the default TransferHandler is insufficient.

A drop operation does have some differences from a paste however:

  • Typically a potential drop site provides feedback of where the data would be accepted.
  • For components with selection capabilities, the insertion point is moved to indicate where the data would be placed.

Default Drop Support

To assist Swing developers in adding drop support to an application, Swing provides DropTarget implementations that use the TransferHandler property on the Swing component. For those components that have a non-null TransferHandler property, the drop target is installed by the ComponentUI if the value of the dropTarget property is null or marked by the presence of the UIResource interface. The default DropTarget implementations installed by the ComponentUI is marked by the UIResource interface, enabling developers to override the default DropTarget.

The components that provide a complete drop implementation by default are indicated in the Imports column of the Components That Support DnD table. There are four components that provide only some support for drop. JFileChooser, JList, JTable, and JTree by default have an installed DropTarget that indicates a potential insertion point. However, to fully support imports of data the developer must write and install a custom TransferHandler.

Using the Drop Support in Subclasses of Swing Classes

A well behaved DropTarget implementation uses the transferHandler property on JComponent to perform the drop. The Swing developer automatically gets a simple DropTarget implementation that links the drop to the TransferHandler when the transferHandler property is set and the dropTarget property is null.

Clipboard Transfer Support

Cut, copy, and paste operations perform data transfer in a manner that is more useful to those without a mouse, as they are typically initiated via a keyboard gesture. These operations can use the same TransferHandler services as the drag and drop support. This improves the accessibility of the data transfers, and enables Swing to provide keyboard bindings for these operations even though Swing may not know how to actually transfer the data to/from the clipboard. The keyboard bindings for clipboard transfer are dependent upon the current look and feel that is installed.

Default Clipboard Transfer

As with drag and drop, clipboard transfers are the most useful for those components that support selections. The list of components shown in the Exports column of the Components That Support DnD table have cut, copy, and paste actions in the component action map, along with a LAF dependent set of keyboard bindings in the input map of the component. Having Swing provide these bindings frees the developer from trying to track the current look and feel and change the bindings.

Using the Clipboard Transfer Support in Subclasses of Swing Classes

A well behaved cut, copy, and paste implementation uses the transferHandler property on JComponent to perform the transfer. When the transferHandler property is set on a JComponent, a simple Action implementation that links the transfer of between a Clipboard and TransferHandler is installed in the component's action map under the keys cut, copy, and paste if there is no action currently installed.

Implementation Details

Note: The following information outlines private implementation details and is subject to change. We are providing this information only to satisfy the curiosity of those who have access to the source code and feel compelled to thump the tires and peek under the hood.

If a TransferHandler is installed on a JComponent, the look and feel then enables cut, copy, and paste using the following TransferHandler methods:

  • getCutAction
  • getCopyAction
  • getPasteAction
If you bind some event to TransferHandler.exportAsDrag you also get drag support. This plumbing is located in package-private nested classes inside of the TransferHandler class.

The following package-private classes were added to the javax.swing.plaf.basic package for creating the default support:

BasicTransferable
The basis of the various Transferable implementations.
BasicDropTargetListener
Adds scrolling support and drop target feedback for those components supporting selection.
BasicDragGestureRecognizer
Supports the "select and move a few pixels" drag gesture recognition.

Each of the ComponentUI classes that support DnD then have some additional nested classes:

BasicTreeUI:

TreeTransferHandler
Default import/export support.
TreeTransferable
The actual tree data.
TreeDragGestureRecognizer
Tree drag gesture recognition, enabled by JTree.setDragEnabled.
TreeDropHandler
Shows drop target location.

BasicListUI, BasicTableUI, BasicTextUI all have a pattern similar to as BasicTreeUI.

BasicFileChooserUI
Uses the list support, but has a FileTransferHandler that produces the FileTransferable that extends the ListTransferable with the flavor used for file transfers.
BasicColorChooserUI
Uses the TransferHandler bean support and binds the "color" property. A mouse listener is added to the preview area to bind a mouse press to the exportAsDrag method on the TransferHandler.

Changes Since Beta

TransferHandler Actions Should be Registered by UI

The bugtraq report that corresponds to this change is: 4460011.

To implement drag and drop, bindings were provided in the Action class to support copying and pasting the data. In order for a look and feel, or other code, to override these Actions, the UI must install them - Actions are no longer automatically installed by the TransferHandler. The package-private methods getCutAction, getCopyAction, and getPasteAction in TransferHandler are now made public.

Ability to Disable DropTarget

The bugtraq report that corresponds to this change is: 4485914.

The drag and drop implementation causes a DropTarget to be added to a JComponent if that component has a TransferHandler installed. This may affect applications that are manually adding DropTargets. Therefore the System property suppressSwingDropSupport has been added. The JComponent methods setTransferHandler(TransferHandler) and getTransferHandler can be used to enable or disable this property.

Known Bugs

Drop Clobbers Selected Text in JTextComponent

The bugtraq report that corresponds to this problem is: 4513715.

Selecting text and then dragging and dropping that text within the selected region of the same text component causes the selected text to be clobbered and nothing to be pasted. This bug is fixed in release 1.4.1.

Occasional Errors in Restoring Caret when Exiting a Component

The bugtraq report that corresponds to this problem is: 4513720.

With the built-in drop support, Swing text components respond to DnD dragovers by setting the Caret to visible and using it to display the potential insert location. When the drag exits the component, the Caret's visibility is restored. Unfortunately, since the Caret uses the same "visible" property to represent the usual meaning of visible as well as when it is in mid-flash, we sometimes restore the Caret's visibility incorrectly.

Cut/Copy/Drag Broken for JEditorPane with RTFEditorKit

The bugtraq report that corresponds to this problem is: 4513638.

When using an RTFEditorKit set explicitly on a JEditorPane using setEditorKit, or by setting the content-type to text/rtf, cut, copy and drag no longer work. Note that this bug, filed against release 1.4, is fixed in release 1.4.1.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Windows Desktop Property Support

This feature involves two areas:

  • Honor More User Preferences
    • Color Properties
    • Geometry Properties
    • Font Properties
    • Visual Effect Properties
    • Audio Feedback Properties
    • Input Properties
  • Respond to Dynamic Changes

Honor More User Preferences

On the Windows platform, users may customize their GUIs via the"Properties" option off the desktop's popup menu. In order to ensure the Swing Windows Look and Feel properly implements the user's visual and behavioral preferences, it must obtain the values of these UI properties from the system registry. The values for these properties will be retrievable from the getDesktopProperty() method on java.awt.Toolkit.

Most of the properties accessible via this method are specific to the Windows platform and hence have a "win." prefix. The list of supported Windows property names can be obtained programmaticallyby querying the "win.propNames" property:

     String propnames[] = (String[])Toolkit.getDefaultToolkit().getDesktopProperty("win.propNames");
     System.out.println("Supported windows property names:");
         for(int i = 0; i < propnames.length; i++) {
             System.out.println(propnames[i]);
         }

Properties which are supported on all platforms begin with an "awt." prefix.

Programs do not need to access these properties directly; the Windows look and feel will automatically read and interpret these properties to provide proper visuals and behavior for the components.

Color Properties

User Preference | Java Property Name | Type
3D Object Background | "win.3d.backgroundColor" | java.awt.Color
3D Object Highlight | "win.3d.highlightColor" | java.awt.Color
3D Object Light Highlight | "win.3d.lightColor" | java.awt.Color
3D Object Shadow | "win.3d.shadowColor" | java.awt.Color
Active Title Bar color1 | "win.frame.activeCaptionColor" | java.awt.Color
Active Title Bar color2 | "win.frame.activeCaptionGradientColor"(TBI) | java.awt.Color
Active Title Bar font color | "win.frame.captionTextColor" | java.awt.Color
Active Window Border color | "win.frame.activeBorderColor" | java.awt.Color
Application Background color | "win.mdi.backgroundColor" | java.lang.Color
Desktop color | "win.desktop.backgroundColor" | java.awt.Color
Inactive Title Bar color1 | "win.frame.inactiveCaptionColor" | java.awt.Color
Inactive Title Bar color2 | "win.frame.inactiveCaptionGradientColor"(TBI) | java.awt.Color
Inactive Title Bar font color | "win.frame.inactiveCaptionTextColor" | java.awt.Color
Inactive Window Border color | "win.frame.inactiveBorderColor" | java.awt.Color
Menu color | "win.menu.backgroundColor" | java.awt.Color
Menu font color | "win.menu.textColor" | java.awt.Color
Message Box font color | "win.frame.textColor?????" | java.awt.Color
Selected Items color | "win.item.highlightColor" | java.awt.Color
Selected Items font color | "win.item.highlightTextColor" | java.awt.Color
ToolTip color | "win.tooltip.backgroundColor" | java.awt.Color
ToolTip font color | "win.tooltip.textColor" | java.awt.Color
Window color | "win.frame.backgroundColor" | java.awt.Color
Window font color | "win.frame.textColor" | java.awt.Color
Hot tracking color | "win.item.hotTrackedColor" | java.awt.Color

Geometry Properties

User Preference | Java Property Name | Type
Active Title Bar size | "win.frame.captionHeight" | java.lang.Integer
Active Window Border size | "win.frame.sizingBorderWidth" | java.lang.Integer
Caption Buttons size | "win.frame.captionButtonHeight" "win.frame.captionButtonWidth" win.frame.captionHeight" | java.lang.Integer
Icon size | "win.icon.hspacing" "win.icon.vspacing"??? | java.lang.Integer
Icon horizontal spacing | "win.icon.hspacing" | java.lang.Integer
Icon vertical spacing | "win.icon.vspacing" | java.lang.Integer
Inactive Title Bar size | "win.frame.captionButtonHeight" "win.frame.captionButtonWidth" "win.frame.captionHeight" | java.lang.Integer
Inactive Window Border size | "win.frame.sizingBorderWidth" | java.lang.Integer
Menu font size | "win.menu.font" "win.menu.height" | java.lang.Integer
Menu Size | "win.menu.height" "win.menu.buttonWidth" | java.awt.Integer
Palette Title size | "win.frame.smallCaptionHeight" "win.frame.smallCaptionButtonHeight" "win.frame.smallCaptionButtonWidth" | java.lang.Integer
Scrollbar width | "win.scrollbar.width" | java.lang.Integer
Scrollbar height | "win.scrollbar.height" | java.lang.Integer
Selected Items size | "win.menu.height" "win.menu.buttonWidth" | java.lang.Integer

Font Properties

User Preference | Java Property Name | Type
Active Title Bar font | "win.frame.captionFont" | java.awt.Font
Icon font | "win.icon.font" | java.awt.Font
Inactive Title Bar font | "win.frame.captionFont" | java.awt.Font
Menu font | "win.menu.font" | java.awt.Font
Message Box font | "win.messagebox.font" | java.awt.Font
Palette Title font | "win.frame.smallCaptionFont" | java.awt.Font
Selected Items font | "win.menu.font" | java.awt.Font
ToolTip font | "win.tooltip.font" | java.awt.Font

Font Compatibility

Now Swing programs running in the Windows look and feel will render with the system font set by the user instead of a Java-defined font. Since this may cause compatibility problems for programs which depend on the old behavior (because of geometry issues, localization dependencies on particular font glyphs, etc.), a runtime property has been provided to allow this feature to be turned off as necessary:

     java -Dswing.useSystemFontSettings=false MyJavaProgram

Visual Effect Properties

User Preference | Java Property Name | Type
Icon title wrapping | "win.icon.titleWrappingOn" | java.lang.Boolean
Window Drag effects | "win.frame.fullWindowDragOn" | java.lang.Boolean
Keyboard Navigation Display | "win.menu.keyboardCuesOn"(TBI) | java.lang.Boolean
Hot tracking on toolbars/menubars | "win.item.hotTrackingOn" | java.lang.Boolean
Title Bar Gradients | "win.frame.captionGradientsOn" | java.lang.Boolean

Audio-feedback Properties

User Preference | Java Property Name | Type
Default sound | "win.sound.default" | java.lang.Runnable
Close sound | "win.sound.close" | java.lang.Runnable
Maximize sound | "win.sound.maximize" | java.lang.Runnable
Minimize sound | "win.sound.minimize" | java.lang.Runnable
Menu Command sound | "win.sound.menuCommand" | java.lang.Runnable
Menu Popup sound | "win.sound.menuPopup" | java.lang.Runnable
Open sound | "win.sound.open" | java.lang.Runnable
Restore Down sound | "win.sound.restoreDown" | java.lang.Runnable
Restore Up sound | "win.sound.restoreUp" | java.lang.Runnable
System Asterisk sound | "win.sound.asterisk" | java.lang.Runnable
System Exclamation sound | "win.sound.exclamation" | java.lang.Runnable
System Exit sound | "win.sound.exit" | java.lang.Runnable
System Hand sound | "win.sound.hand" | java.lang.Runnable
System Question sound | "win.sound.question" | java.lang.Runnable
System Start sound | "win.sound.start" | java.lang.Runnable

Dynamic Changes to Sounds

Note that the object returned for a sound property is simply a Runnable that plays the current audio clip for that property. This means that there is no need for watching for dynamic changes to sound properties because the sound's property value is a live link to the current sound setting.

Input Properties

User Preference | Java Property Name | Type
Double click interval | "awt.multiClickInterval" | java.lang.Integer
Cursor blink rate | "awt.cursorBlinkRate"(TBI) | java.lang.Integer

Respond to Dynamic Changes

In JDK 1.3, AWT added the ability to register for notification when one of these desktop property values changes. This is supported via the addPropertyChangeListener() method on java.awt.Toolkit. Swing's Windows Look and Feel will use this mechanism to watch for dynamic property change events on visual properties, and update the GUI by uninstalling and reinstalling the UI delegates in order for the components to have the most up-to-date visual property values. This dynamic behavior will automatically occur for all Swing programs running the Windows look and feel.

This mechanism will update GUI components by traversing the GUI hierarchy (starting with Frame.getFrames() and traversing all windows/containers/components from there). If a client has any undisplayable components when this occurs (see the isDisplayable() method on java.awt.Component for a definition of when a component is displayable), those components will not update automatically and it will be the client program's responsibility to update the UI on those components to ensure their Look and Feel is up-to-date. For example, this occurs in the SwingSet2 demo because demo panels are created but not added to the GUI heirarchy until they are selected from the demo's tabbedpane. Therefore, before the newly selected demo panel is added to the hierarchy, its UI is updated to ensure it has the most current property settings:

    fragment from SwingSet2.java:  // Ensure panel's UI is current before making visible
    JComponent currentDemoPanel = demo.getDemoPanel();
    SwingUtilities.updateComponentTreeUI(currentDemoPanel);
    // Replace current demo with newly selected demo
    demoPanel.removeAll();
    demoPanel.add(currentDemoPanel, BorderLayout.CENTER);
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Windows Look and Feel Keyboard Navigation Hiding

Documentation Contents

Keyboard Navigation Hiding

One of the new features that was introduced in Windows 2000 has been a display property which will hide the keyboard mnemonic for a menu item or a dialog control until the Alt key is pressed. In other words, all the underlined characters which represent an Alt key combination to invoke that menu or control will not be drawn until the user indicates the intention to invoke a command with the keyboard rather than the mouse. The result of this behavior is to provide an interface which is not visually cluttered with underlined characters for people who choose to navigate the user interface with the mouse.

The keyboard navigation hiding feature will be automatically enabled on Windows 2000 if the application uses the Windows look and feel and the "Hide keyboard navigation indicators until I use the Alt key" property is enabled in the Windows 2000 "Display Properties" control panel applet.

Implementation Details

These details will be of use to developers who are extending look and feels. The keyboard navigation hiding feature will automatically be enabled when a Windows Look and Feel Java application is run on Windows 2000.

When the WindowsLookAndFeel is instantiated, it will read the DesktopProperty "win.menu.keyboardCuesOn". This value is stored in the UIManager and can be referenced using the key: "Button.isMnemonicHidingEnabled". The static methods setMnemonicHidden and isMnemonicHidden in WindowsLookAndFeelprovide access to this value.

Hiding the mnemonics in the menus

The existing BasicMenuItemUI.paintMenuItem() method is responsible for rendering the background, text, icon and mnemonic of a menu item. A new protected method, paintText() was extracted from paintMenuItem(), which is consistent in name and signature to a similar method in the BasicButtonUI hierarchy.

The paintText() methods are overloaded in WindowsMenuItemUI and WindowsMenuUI. The body of the overloaded paintText method checks the isMnemonicEnabled flag in the WindowsLookAndFeel class to determine if the mnemonic should be hidden and then appropriately renders the text.

Hiding the mnemonic in controls

BasicButtonUI already defined a protected method paintText. The WindowsButtonUI and similar classes overloaded this method in much the same manner. A new class was introduced, WindowsGraphicsUtils, to consolidate all the paintText methods. This was done because the Windows...UI classes don't follow the same inheritance hierarchy as the Basic..UI classes.

A new RootPaneUI delegate called WindowsRootPaneUI was created for the Windows look and feel. This class had an action registered to reset the mnemonic hidden bit and repaint the ui when the Alt key was pressed.

New API

All these methods were added as result of implementing this feature. These methods will only have value to developers who wish to extend or create a Look and Feel.

New method for BasicMenuItemUI:

    /**
     * Renders the text of the current menu item.
     *
     * @param g graphics context
     * @param menuItem menu item to render
     * @param textRect bounding rectangle for rendering the text
     * @param text String to render
     * @since 1.4
     */
     protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)

New class WindowsRootPaneUI:

    /**
     * Windows implementation of RootPaneUI. One WindowsRootPaneUI
     * object is shared between all JRootPane instances.
     *
     * @version 1.1 08/16/00
     * @author Mark Davidson
     * @since 1.4
     */
     public class WindowsRootPaneUI extends BasicRootPaneUI

New class WindowsGraphicsUtils:

    /**
     * A collection of static utility methods used for rendering the
     * Windows look and feel.
     *
     * @Version 1.1 08/16/00
     * @author Mark Davidson
     * @since 1.4
     */
     public class WindowsGraphicsUtils

New methods for WindowsLookAndFeel:

    /**
     * Sets the state of the hide mnemonic flag. This flag is used by the
     * component UI delegates to determine if the mnemonic should be rendered.
     * This method is a non operation if the underlying operating system
     * does not support the mnemonic hiding feature.
     *
     * @param hide true if mnemonics should be hidden
     * @since 1.4
     */
     public static void setMnemonicHidden(boolean hide)

    /**
     * Gets the state of the hide mnemonic flag. This only has meaning
     * if this feature is supported by the underlying OS.
     *
     * @return true if mnemonics are hidden, otherwise, false
     * @see #setMnemonicHidden
     * @since 1.4
     */
     public static Boolean isMnemonicHidden()

    /**
     * Gets the state of the flag which indicates if the old Windows
     * look and feel should be rendered. This flag is used by the
     * component UI delegates as a hint to determine which style the component
     * should be rendered.
     *
     * @return true if Windows 95 and Windows NT 4 look and feel should
     *     be rendered
     * @since 1.4
     */
     public static Boolean isClassicWindows()
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Windows Look and Feel Update

Overview

The ideal Swing application running under the Windows look and feel would be indistinguishable from its native running counterparts, however due to both changes in the native Windows look and feel (Windows 98, Windows 2000, etc.) and atrophy of our existing Windows look and feel implementation, this has not been the reality. However, for this release we have provided an updated Windows look and feel which integrates seamlessly into the Windows desktop.

This project was composed of a set of independent smaller projects, which involve either fixing a previous emulation deficiency or adding functionality to track 2000/98 features. In some cases the project spans both Swing and AWT:

  • Fix Emulation Bugs
  • Desktop Property Support
  • Column-Wrapping Lists
  • Hot-tracking Toolbar Buttons
  • Gradient Titlebars
  • Keyboard Navigation Hiding
  • Scroll Wheel Support
  • Menu/Tooltip Transition Effects
  • FileChooser Makeover

We chose to modify and enhance the com.sun.java.swing.plaf.windows look and feel package rather than introduce a new 'window2000' package. Almost all of the new functionality is keyed off of Windows native user preferences so that an updated windows look and feel package gracefully runs on eitherWindows 95, Windows 98, Windows NT or Windows 2000 machines. In other words, if a running Swing application detects that a particular user preference (such as Menu fading) doesn't exist, then the windows look and feel will not execute that feature.

The focus of this project was quality, not quantity. Where we deemed it difficult to implement a feature with a high quality result, we deferred that feature to a future release when we can emulate it with better fidelity.

Fix Emulation Bugs

There were many bugs filed against our Windows look and feel and we fixed many of these with this release. We are tracking these bugs witha "w2k" keyword. See Windows Look And Feel Buglist for a list of these windows look and feel bugs.

Desktop Property Support

The current Windows look and feel in Swing only tracks the user's desktop colorscheme (via AWT's SystemColor mechanism). However, on the Windowsdesktop, the user can set many more GUI preferences, such as fonts, sounds, metrics, and can change them at any time and have Windows programs dynamically reflect those changes. We have revised Swing to honor a wider range of user preferences and to also support responding to dynamic changes made by the user. See Windows Desktop Properties Support Specification for details.

Column-Wrapping Lists

List was only capable of displaying a single column and has been updated to support wrapping into multiple columns (like the Windows Explorer pane). This feature is also used to better support the Windows filechooser. See JList Spec update for details.

Hot-Tracking Toolbar Buttons

Buttons contained inside toolbars have become flat in appearance and only when they are 'rolled over' do the borders appear. This feature is supported by the Metal look and feel, but will be added as a general Swing toolbar feature.

Gradient Titlebars

The titlebars on toplevel windows in Windows 2000 by default use a gradient pattern instead of a solid bar color. We get this for free on toplevel windows such as JFrame, however we will use Java2D to implement this rendering for JInternalFrame.

Scroll Wheel Support

Almost all PCs these days come with a scroll-wheel on the mouse and to support this AWT is adding support for scroll wheel input and Swing's scrolling components (JScrollPane, JScrollbar) are being modified to handle this new event type. See MouseWheel API for details of AWT support and see JScrollPane changes for details of support in Swing.

Keyboard Navigation Hiding

In windows the user can set a desktop property which causes applications to hide their keyboard navigation cues *until* ALT is pressed, at which time they magically appear. If the user has this option set on the desktop, Swing will implement this behavior in its menus. See Keyboard Navigation Spec for more information.

Menu/Tooltip Transition Effects

The most obvious feature addition to the Windows look and feel is the new stylistic menu animation. In Windows 98, menus can be set to appear by sliding out. Windows 2000 then introduced a very hip fade-in/fade-out for menus and tooltips.

In order to ensure the most accurate visual effect, this feature is implemented by forcing menus/tooltips to be true toplevel "heavyweight" windows which can take advantage of Microsoft Windows native window animation functionality inside the AWT.

File Chooser Makeover

Although Swing's JFileChooser component closely resembles the Windows file chooser, there are some deficiencies which limit its use on the Windows platform, such as the lack of support for network browsing and the Windows virtual desktop("My Computer", "My Network", etc.). See JFileChooser Spec update for more information.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Windows Look&Feel Bugs

4146858: Wrong DefaultButton behavior in Windows & Motif L&Fs
4166803: Focus set incorrectly on JInternalFrames
4172991: Microsoft Windows PLAF: Alt key for menus doesn't work
4183333: Please provide different WindowsLookAndFeel Border for JPopupMenu
4196518: Windows L&F JInternalFrame menus Disabled system menu items should get focus
4199085: JButtons are too tall and too narrow in Windows look and feel.
4199382: Swing Menus - text/icon/checkmark alignment schemes severely broken
4201986: Swing Tooltips not honoring desktop setting for tooltip font
4249732: JComboBox (Windows L&F) does not resemble native Windows combo
4252279: JFileChooser behavior under the windows look and feel on a "new folder"
4253171: white JTabbedPane on a white JPanel in windows L&F does not paint correctly
4264764: JButton has wrong margin in a JToolBar with Windows LAF
4268204: Windows Look&Feel doesn't look and feel like Windows
4268306: JToolBar uses wrong interior padding w/ Windows LF
4302970: WindowsDesktopManager does not look and feel like Windows
4337049: Background color on JComboBox also changes color of drop down button

Note: There may be additional Windows look&feel bugs not on this list because they have not yet been tagged with the "w2k" keyword.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Applets and Java Web Start Applications

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

8 Applets and Java Web Start Applications

This chapter describes some problems and solutions related to deploying Java applications.

This chapter contains the following sections:

  • "Configuration Problems"

  • "Applet Troubleshooting"

  • "Avoiding Security Dialogs"

  • "Development Tips"

Configuration Problems

This section describes a number of problems concerning various configuration parameters and settings.

Validation

If your application will not run, perform the following checks:

Task 1Verify that the Java Plugin is working.

  1. Go to http://java.com/en/download/installed.jsp.

  2. Click Verify Java version.

  3. If you see that the expected Java technology version is reported, then the plugin is enabled and found.

Task 2Check that your browser knows about the Java plugin.

  • Chrome: Type about: plugins in the address bar.

  • Firefox: On the Tools menu, select Addons and click Plugins.

  • Internet Explorer: On the Tools menu, select Manage Addons.

Task 3Make sure the Java Runtime Environment is installed.

  • On Windows, check the list of installed programs in the Control Panel.

Common Configuration Problems

Issue 1There is no Java Runtime installed.

It is not sufficient to install the Java Developer Kit. A JRE is required to be able to run an applet or webstart. Note that if you use a 64-bit browser, then the 64-bit version of the JRE is required. Likewise, the 32-bit JRE is necessary for 32-bit browsers.

Issue 2Latest matching plugin/webstart is always used.

There could be just one plugin registered in the browser and the JRE will always register plugin from latest JRE on the system as active. The only way to ensure use of an older plugin is to uninstall newer JREs.

Issue 3Any change in the Java Runtime configuration requires the browser to be restarted.

Java is not enabled.

There are multiple places where Java could be disabled. Check the Java Control Panel and your browser plugins/addons list.

Issue 4Make sure new generation plugin is enabled.

Unless you need to run in the legacy mode, make sure New generation plugin is enabled in the Java Control Panel.

Issue 5Java Control Panel fails to make changes in the Java config.

On Windows 7 or Windows Vista systems with UAC on, the Java Control Panel may fail to update global registry settings. To work around this, make sure you launch Java Control Panel as Administrator if you need to alter these settings.

Issue 6JavaScript needs to be enabled.

If JavaScript is disabled, then an attempt to launch a Java applet may fail at very early stage.

Managing Java Runtimes

You can use the Java Control Panel tool to manage the list of installed Java Runtime Environments and their behavior. The Java Control Panel can be launched from the bin directory of the JRE installation folder. On Windows operating systems, you can also access it from Control Panel > Java.

Use Java Control Panel if you need to:

  • see what versions of JRE are installed and active

  • temporarily enable/disable use of particular version of JRE

  • set "global" parameters to be passed to JVM when applet or webstart application is launched

  • enable/disable use of Java Plugin in the particular browser

  • tune behavior of the plugin/webstart by specifying configuration parameters such as location of cache of temporary files or enable tracing

Figure 8-1 The Java Runtime Environment Settings Window

Description of Figure 8-1 follows
Description of "Figure 8-1 The Java Runtime Environment Settings Window"

Passing parameters to the JRE

Troubleshooting, debugging, profiling and other development activities may require launching JVM with a special set of parameters. One way to accomplish this is to use the Java Control Panel.

Open the Java Control Panel and click View on the Java tab. Select the Runtime Parameters cell for the JRE you wish to change and enter parameters into this cell.

Note:

These changes are "global", meaning that any Java Web Start application or applet that will be run using this version of JRE will have these parameters set (in addition to what the applet tag or JNLP file may specify).

To pass parameters to a specific JVM used with Java Web Start or an applet, use one of the following techniques:

  • Set environment variable before launching javaws or the browser process.

    • JAVAWS_VM_ARGS for Java Web Start apps. For example:

      JAVAWS_VM_ARGS = -Dsome.property=true

    • _JPI_VM_OPTIONS for applets. For example:

      _JPI_VM_OPTIONS = -Dsome.property=true

      Note:

      You need to restart your browser after you set the environment variable. If you are setting this environment variable in the command shell, then you must use the same command shell to launch the browser so that the browser inherits the value of the environment variable.

  • Use the -J option for the javaws command. For example:

    javaws -J-Dsome.property=true http://example.com/my.jnlp

Java Deployment Home

This is the place where main configuration files are kept. The location is specific to your operating system:

  • Windows XP: %HOME%\Application Data\Sun\Java\Deployment

  • Windows 7/Vista: %APPDATA%\..\LocalLow\Sun\Java\Deployment

  • Linux/Solaris: %HOME%/.java/deployment

Deployment Tracing Information

Both Java Plug-in and Java Web Start can print trace information into trace files. This includes log information from the JRE itself as well as everything your application may be printing to System.out or System.err.

To get access to trace information, follow these steps:

  1. Open the Java Control Panel (jre_home_dir/bin/ControlPanel).

  2. Select the Advanced tab.

  3. In the Debugging category, select the Enable tracing check box.

  4. Optionally, in the Java console category, select the Show console option to see trace information in the console window. The full trace still will be saved to a file.

The trace file is saved into the log directory in the Java deployment home folder (see Java Deployment Home). The file name has the prefix javaws or plugin, depending on what you are running. One trace file is produced per process, but one application can be launched using several processes.

To get the maximum level of detail in the trace file, edit the deployment.properties file (which is located in the Java deployment home directory) and add the following line:

deployment.trace.level=all

By default, a maximum of five trace files are created. The oldest trace files are automatically deleted. To change this limit of maximum number of trace files, add the following line to the deployment.properties file:

deployment.max.output.files=max_number_of_trace_files

You can use the Java console to view the trace log at runtime. By default, the Java console is hidden. Enable it in the Java Control Panel.

Deployment Cache

Application jars and resources are cached on the disk to avoid loading them the next time they are needed.

The default location of the cache depends on the operating system and can be overridden in the Java Control Panel.

Settings and controls for the cache are available in the General tab of the Java Control Panel, in the Temporary Internet Files section. Click Settings to change the location and size of the cache. Click View to see what files are in the cache.

You can clean the cache by running javaws -uninstall, or open the Java Control Panel's General tab, click View, and delete files manually. You can also use the Java Control Panel to uninstall individual applications and extensions.

Network Configuration

In general, Java Web Start applications use the system network configuration by default, and applets use the browser network settings. You can set network proxies explicitly using Java Control Panel.

In particular, the Java technology networking layer automatically detects what networking stack to use. However, sometimes autodetection does not work and you may observe Permission Denied exceptions trying to open a socket to download your application or applet, even while the same URL is accessible using the same proxy settings with other tools. This problem was observed on some Windows 7 systems when VPN software is used. This can be resolved by explicitly passing a parameter to the JVM:

-Djava.net.preferIPv4Stack=true

For details, see Passing parameters to the JRE.

Applet Troubleshooting

For modern browsers which support tabs, each tab might be a separate browser process. If a Java applet is embedded in a browser page and the next generation plugin is being used, usually the process associated with the browser tab creates a JVM within the process (browser VM). The browser VM will create another JVM process (client VM) which will run the applet and manage the applet's life cycle. The client VM is a Java process (java.exe on Windows and java on Linux/Solaris platforms).

Applet Does Not Start - Plugin Cheat Sheet

If your applet does not start, make sure to enable tracing and the Java console as explained previously. Then use hits below to find reason why applet does not work:

  • Do you get a trace file generated or see the Java console?

    • No

      Check if Java technology is detected at java.com (see Validation). Is Java technology detected?

      • Yes

        Proceed to "Browser JVM Troubleshooting".

      • No

        It is likely to be a configuration issue. See Common Configuration Problems for common configuration problems and if it does not help, proceed to "Browser JVM Troubleshooting".

    • Yes, I have a trace file

      It is unlikely to be a configuration issue (unless you have the new generation plugin disabled). The problem is likely to be specific to this applet. Try to launch some other applets to confirm. Proceed to "Client JVM Troubleshooting".

Consult the sections below for further advice.

Browser or Java Process Crash

A crash could be caused by a platform or application issue.

Typically, if a crash happens in the JVM then there should be hs_err_*log file created in the current working directory (on Windows it is often placed on the desktop). It is the same crash report file as for standalone applications. For details about the report file, see "Fatal Error Log".

If you can spot native libraries loaded from the deployment cache directory, especially if you see code from these libraries in the crash stack, it is very likely to be a bug in the application.

Otherwise it is a JRE bug and needs to be reported to bugs.sun.com.

Browser JVM Troubleshooting

To get more details about a JVM running in the browser process, set the following two environment variables before starting the browser:

JPI_PLUGIN2_DEBUG=1
JPI_PLUGIN2_VERBOSE=1

On Windows, there should be a command window associated with the browser process. All browser VM debug output goes into the command window. Check to see if any exceptions are visible there. A Java thread dump can be obtained by using the Control+Break key sequence on the command window.

On Linux and Solaris platforms, after setting the above variables, start the browser from the same session. All browser VM debug output goes into the terminal window. To get a Java thread dump, on a separate terminal, use kill -3 pid or kill -SIGQUIT pid, where pid is the process id of the browser process.

There are "heartbeat" messages sent between the client VM and browser VM. The "heartbeat" messages can be turned off by setting the JPI_PLUGIN2_NO_HEARTBEAT environment variable to 1. This will help isolate whether the problem is related to the "heartbeat".

If the log is not opening and environment variables are set in the browser process, then it is likely that the JRE is not installed correctly or Java is disabled. Check for configuration errors and try to reinstall the JRE if nothing else helps.

Client JVM Troubleshooting

Check the latest trace file for ideas.

Note that the same client JVM may be shared between multiple applets. Sometimes intermittent failures happen because the shared JVM does not have enough resources available (for example, heap size). In that case, a page reload often helps to resolve the problem.

If application fails with an Out of memory error, the heap size needs to be increased. This can be done in the application deployment descriptor (JNLP file) or in the Java Control Panel using Runtime Parameters for JRE in use.

If an application is signed and the user declined a security dialog, this may cause application failure. The decision made by the user is remembered until the JVM is restarted. To see the security dialog again, the user may need to restart the browser.

Note that an applet can be deployed to reduce the risk of being affected by other applets and tailor execution environment for the applet's needs. See Applet Deployment in the JDK documentation. In particular, consider using the separate_jvm parameter argument.

Unresponsive Web Page

If a page appears to be frozen while an applet starts, or in the runtime, the cause could be Liveconnect calls.

On startup, an attempt to access the Java applet from JavaScript may block the JavaScript engine until the applet initialization is complete. It is recommended to postpone JavaScript access until the applet is ready and use the enableStatusEvents parameter to unlock non-blocking access to applet status checks. See Applet Status And Event Handlers for details and examples.

To use Liveconnect in runtime, it is recommended to make JavaScript calls return quickly to avoid blocking the single-threaded JavaScript engine.

Applet or browser hangs

The best source of information in this case is the stack state for both client and browser JVMs.

Use the jstack utility to collect the JVM stack status for the browser JVM (by running jstack browser-pid) and client JVM. Note that jstack may highlight a deadlock if it happens in context of one of these VMs, but it cannot do this if the deadlock involves both processes. In this case, the thread stacks need to be examined manually.

For other approaches, read Troubleshooting Hanging or Looping Processes in the Troubleshooting Guide for Java SE 7 with HotSpot VM.

Avoiding Security Dialogs

The Java Runtime will automatically warn the user about possible security sensitive issues. If you are confident that applications you use are safe, then it is possible to bypass security dialogs to simplify user experience.

Signed Applications

If a Java applet/webstart application is signed, a certificate security warning dialog box will pop up and the user must click Run to give all permissions to the code of the application.

To avoid seeing this dialog, you can do one of the following:

  • User accepts the certificate used to sign the application and selects the Always trust content from this publisher check box. Then, next time permissions will be granted to this application automatically (until the certificate expires or is removed from the trusted key store).

  • The certificate can be manually imported into the JRE trusted certificate store. To import the certificate using the Java Control Panel, on the Security tab, click Certificates and then Trusted Certificates. To import a certificate into the certificate store from the command line, use the keytool utility (in the JRE's bin folder).

  • Grant AllPermissions in the Java policy file located at ${user.home}/.java.policy, or point to any Java policy file which has AllPermissions in the $(JRE_HOME)/lib/security/java.security file. Permissions can be granted to all applications or restricted to a particular URL. See Default Policy Implementation and Policy File Syntax for more details on .java.policy.

Note:

If automatic granting of permissions is not desired, then use the Java Control Panel to remove certificates from trusted certificate keystore. This will result in security dialog box popup again in the future.

Mixed Code Issues

Signed Java Web Start applications and applets that contain signed and unsigned components could potentially be unsafe unless the mixed code was intended by the application vendor. The latest versions of the Java runtime raise a mixed code warning dialog when a program contains both signed and unsigned components and suspicious use is detected.

Bypassing this dialog generally requires making changes to application implementation or repackaging the application. It is also possible to completely disable the software from checking for mixing trusted and untrusted code, but it is not recommended as this allows the user to run potentially unsafe code with no warning and without additional protections. For details on mixed code and ways to bypass this security warning dialog box, please refer to Mixing Signed and Unsigned Code - Ensuring Application and Applet Security.

Development Tips

For Java Web Start applications and applets, you can use most of techniques available to debug and profile standalone applications, except you will need to use the "attach" mechanism instead of direct launch.

Note that both plugin and Java Web Start will spawn additional java or javaw processes that will actually run the JVM executing the application or applet. You need to attach to those processes to be able to collect information about your app. For example, if you want to get a memory dump of your applet, then first you need to figure out the process id for the java process executing the PluginMain class. For example, use the jps utility from the JDK and then use jmap to get a memory dump.

Debugging Applets and Web Start Applications

Just as with standalone Java applications, any JPDA-based debugger can be used to debug your applet or Web Start application, for example jdb or the NetBeans debugger.

You will need to enable the JDWP agent for the JVM running your application and specify the port number. Once the JVM is started, you can use your favorite IDE or tools to attach to it.

For details on how to pass arguments to the JVM running applet or Java Web Start application, see Passing parameters to the JRE. For example, here is how you can pass details to the Java Web Start application from the command line:

bash$ javaws -J-agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=y http://acme.com/my/webstart.jnlp

This instructs the agent to suspend after the JVM is initialized and wait for a debugger to connect on port 4000. Please consult this guide for a full description of invocation options.

Profiling Applets and Java Web Start Applications

When you profile a standalone Java application, your favorite IDE is likely to be using the JVMTI agent to collect details on program execution. You can do the same for applets and Java Web Start applications but you may need to configure the JVMTI agent explicitly by passing the -agentpath option to the JVM. For details on how to pass options to the JVM, see Passing parameters to the JRE.

For example:

set _JPI_VM_OPTIONS="-agentpath:C:\Tools\NetBeans\profiler\lib\deployed\jdk16\windows\profilerinterface.dll=C:\Tools\NetBeans\profiler\lib,5140"

Now launch your browser. The NetBeans profile agent is enabled for any applet you will be running in this browser session. You can use NetBeans IDE to attach to the java process. Please consult your profiler documentation for exact details on what agent to use and how to configure it.

Debugging Memory Leaks

Use any techniques available for standalone applications on the process running your applet or application. For example, use jmap to obtain a heap dump, VisualVM or jconsole to observe threads, or pass -XX:+HeapDumpOnOutOfMemoryError to the JVM (see Passing parameters to the JRE) to get a memory dump on error. Use the jps utility to find the process id for the process running your application.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AWT

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

2 AWT

This chapter provides information and guidance on some specific procedures for troubleshooting common issues that might occur in the Java SE Abstract Window Toolkit (AWT).

This chapter contains the following sections:

  • "Debugging Tips for AWT"

  • "Layout Managers"

  • "Key Events"

  • "Modality"

  • "Memory Leaks"

  • "Crashes"

  • "Focus Events"

  • "Data Transfer"

  • "Other Issues"

  • "Heavyweight/Lightweight Components Mixing"

Debugging Tips for AWT

This section provides some helpful tips to be aware of when debugging issues related to AWT.

To dump the AWT component hierarchy, press Control+Shift+F1.

If the application hangs, get a stack trace by pressing Control+Break on Windows (which sends the SIGBREAK signal) or Control+\ on Solaris OS and Linux (which sends the SIGQUIT signal).

To trace X11 errors on Solaris OS and Linux, set the sun.awt.noisyerrorhandler system property to true. In Java SE 6 and earlier releases, the NOISY_AWT environment variable was used for this purpose.

Prior to Java SE 7, exceptions thrown in the AWT Event Dispatch Thread (EDT) could be caught by setting the system property sun.awt.exception.handler to the name of the class that implements the public void handle(Throwable) method. This mechanism has been updated in Java SE 7 to use the standard Thread.UncaughtExceptionHandler interface.

Loggers can produce helpful output when debugging AWT problems. For information on using loggers, consult the Java Logging Overview at

http://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html

and the java.util.logging package description at

http://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html

The following loggers are available:

java.awt
java.awt.focus
java.awt.event
java.awt.mixing
sun.awt
sun.awt.windows
sun.awt.X11

Layout Managers

This section describes some possible problems with layout managers and provides workarounds when available.

Issue 1Call to invalidate() and validate() increases component size

Cause: Due to some specifics of the GridBagLayout layout manager, if ipadx or ipady is set, and invalidate() and validate() are called, then the size of the component increases to the value of ipadx or ipady. This happens because the GridBagLayout layout manager iteratively calculates the amount of space needed to store the component within the container.

Workaround: The JDK does not provide a reliable and simple way to detect if the layout manager should rearrange components or not in such a case, but there is a very simple workaround. Use components with the overridden method getPreferredSize(), which always returns the current needed size.

public Dimension getPreferredSize(){
   return new Dimension(size+xpad*2+1, size+ypad*2+1);
}
Issue 2Infinite recursion with validate() from any Container.doLayout() method

Cause: Invoking validate() from any Container.doLayout() method can lead to infinite recursion because AWT itself invokes doLayout() from validate().

Key Events

This section describes issues related to handling key events.

The following keyboard issues are currently unresolved:

  • On some non-English keyboards certain accented keys are engraved on the keytop and therefore are primary layer characters. Nevertheless, they cannot be used for mnemonics because there is no corresponding Java keycode.

  • Changing the default locale at runtime does not change the text that is displayed for the menu accelerator keys.

  • On a standard 109-key Japanese keyboard, the yen key and the backslash key both generate a backslash, because they have the same character code for the WM_CHAR message. AWT should distinguish them. This will be fixed in a future release.

The following keyboard issues concern the Linux and Solaris 10 OS x86 systems.

  • Keyboard input in these systems is usually based on the X keyboard extension (XKB) of the X Window System. Users can configure one keyboard layout (for instance, Danish: dk) or several layouts to switch between (for example, us and dk).

  • With some keyboard layouts, for instance sk, hu, and cz, pressing the decimal separator on the numeric keypad not only enters a delimiter but also deletes the previous character. This is due to a native bug. A workaround is to use two layouts, for example, us and sk. In this case the numeric keypad works correctly in both layouts.

  • On UNIX systems that support dynamic keyboard changes, a running Java application does not recognize such a change. For instance, changing the keyboard from US to German does not change the keyboard mapping. Although the X server detects the change and sends out a MappingNotify event to interested clients, AWT does not refresh its notion of the keycode-keysym mapping.

Modality

This sections provides information about issues related to using modality.

With the Java SE 6 release, many problems were fixed and many improvements were implemented in the area of AWT modality. If you observe a modality problem with Java SE 1.5 or an earlier release, first upgrade to the latest Java SE release to see if the problem has been already fixed.

Some of the problems that were fixed in Java SE 6 are the following:

  • Modal dialog goes behind a blocked frame.

  • Two modal dialogs with the same parent window opened at the same time.

UNIX Window Managers

Many of the modality improvements are unavailable in some Solaris OS or Linux environments, for example, when using Common Desktop Environment (CDE) window managers. With Java SE 6 and later releases, to see if a modality type or modal exclusion type is supported in a particular configuration, use the following methods:

  • Toolkit.isModalityTypeSupported()

  • Toolkit.isModalExclusionTypeSupported()

When a modal dialog appears on the screen, the window manager might hide some of the Java top-level windows in the same application from the taskbar. This can confuse end users, but it does not affect their work much, because all the hidden windows are modal blocked and cannot be operated.

Applets

When your application runs as an applet in a browser and shows a modal dialog, the browser window might become blocked. The implementation of this blocking varies in different browsers and operating systems. For example, on Windows, both Internet Explorer and Mozilla Firefox work correctly, and on Solaris OS and Linux, Mozilla Firefox windows are not blocked. This will be corrected in a future release.

Other Modality Problems

For more information on modality-related features and how to use them, see the AWT Modality specification at

http://docs.oracle.com/javase/8/docs/api/java/awt/doc-files/Modality.html

One of the sections in that specification describes some AWT features that might be related to or affected by modal dialogs: always-on-top property, focus handling, window states, and so on. Application behavior in such cases is usually unspecified or depends on the platform; therefore, do not rely on any particular behavior.

Memory Leaks

This section first describes how to troubleshoot memory leaks and then presents some possible sources of memory leaks and provides workarounds.

To get more information on a memory leak, execute java with the heap profiler active. Specify that the output should be generated in binary format so that you can use the jhat utility to read the output.

$ java -agentlib:hprof=file=snapshot.hprof,format=b application

For more information on troubleshooting memory leaks, as well as descriptions of the jhat utility and other troubleshooting tools that are available, see the Java SE HotSpot VM Troubleshooting Guide.

Issue 1Memory leak in application

Cause: Frames and dialogs are sometimes not being garbage-collected. This bug will be corrected in a future version of Java SE.

Workaround: Known memory leaks occur in cases when the system starts to transfer focus to a focusable top-level element (window, dialog, frame), but the element is closed, hidden, or disposed of before the focus transfer is complete. Therefore, the application must wait for the focus transfer operation to finish before closing, hiding, or disposing of the element.

Note:

This problem normally occurs only when these actions are performed programmatically, since the user typically cannot physically perform these actions fast enough to cause the problem.

Crashes

This section describes how to determine if a crash is related to AWT, as well as how to troubleshoot such crashes.

How to Distinguish an AWT Crash

When a crash occurs, an error log is created with information and the state obtained at the time of the crash. For detailed information about the fatal error log file, see "Fatal Error Log".

A line near the top of the file indicates the library where the error occurred. The example below shows a part of the error log file in the case when the crash was related to the AWT library.

...
# Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b76 mixed mode, sharing)
# Problematic frame:
# C  [awt.dll+0x123456]
...

However, the crash can happen somewhere deep in the system libraries, although still caused by AWT. In such cases the indication awt.dll does not appear as a problematic frame, and you need to look further in the file, in the section Stack: Native frames: Java frames. Below is an example.

Stack: [0x0aeb0000,0x0aef0000),  sp=0x0aeefa44,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x00abc751
C  [USER32.dll+0x3a5f]
C  [USER32.dll+0x3b2e]
C  [USER32.dll+0x5874]
C  [USER32.dll+0x58a4]
C  [ntdll.dll+0x108f]
C  [USER32.dll+0x5e7e]
C  [awt.dll+0xec889]
C  [awt.dll+0xf877d]
j  sun.awt.windows.WToolkit.eventLoop()V+0
j  sun.awt.windows.WToolkit.run()V+69
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
V  [jvm.dll+0x83c86]
V  [jvm.dll+0xd870f]
V  [jvm.dll+0x83b48]
V  [jvm.dll+0x838a5]
V  [jvm.dll+0x9ebc8]
V  [jvm.dll+0x108ba1]
V  [jvm.dll+0x108b6f]
C  [MSVCRT.dll+0x27fb8]
C  [kernel32.dll+0x202ed]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.windows.WToolkit.eventLoop()V+0
j  sun.awt.windows.WToolkit.run()V+69
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

If the text awt.dll appears somewhere in the native frames, then the crash might be related to AWT.

How to Troubleshoot an AWT Crash

Most of the AWT crashes occur on the Windows platform and are caused by thread races. Many of these problems were fixed in Java SE 6, so if your crash occurred in an earlier release, first try to determine if the problem is already fixed in the latest release.

One of the possible causes of crashes is that many AWT operations are asynchronous. For example, if you show a frame with a call to frame.setVisible(true), then you cannot be sure that it will be the active window after the return from this call.

Another example concerns native file dialogs. It takes some time for the operating system to initialize and show these dialogs, and if you dispose of them immediately after the call to setVisible(true), then a crash might occur. Therefore, if your application contains some AWT calls running simultaneously or immediately one after another, it is a good idea to insert some delays between them or add some synchronization.

Focus Events

This section describes how to troubleshoot issues related to focus events. In particular, it contains the following subsections:

  • "How to Trace Focus Events"

  • "Native Focus System"

  • "Focus System in the Java Plug-in"

  • "Focus Models Supported by X Window Managers"

  • "Miscellaneous Problems With Focus"

How to Trace Focus Events

To troubleshoot a problem with focus, you can trace focus events. You can do it by adding a focus listener to the toolkit, as shown in the following example:

Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener(
   public void eventDispatched(AWTEvent e) {
      System.err.println(e);
   }
), FocusEvent.FOCUS_EVENT_MASK | WindowEvent.WINDOW_FOCUS_EVENT_MASK |
   WindowEvent.WINDOW_EVENT_MASK);

The System.err stream is used here because it does not buffer the output.

Remember that the correct order of focus events is the following:

  • FOCUS_LOST on component losing focus

  • WINDOW_LOST_FOCUS on top-level losing focus

  • WINDOW_DEACTIVATED on top-level losing activation

  • WINDOW_ACTIVATED on top-level becoming active widow

  • WINDOW_GAINED_FOCUS on top-level becoming focused window

  • FOCUS_GAINED on component gaining focus

When focus is transferred between components inside the focused window, only FOCUS_LOST and FOCUS_GAINED events should be generated. When focus is transferred between owned windows of the same owner or between an owned window and its owner, then the following events should be generated:

  • FOCUS_LOST

  • WINDOW_LOST_FOCUS

  • WINDOW_GAINED_FOCUS

  • FOCUS_GAINED

Note that events of losing focus or activation should come first.

Native Focus System

Sometimes a problem may be caused by the native platform. To check this, investigate the native events that are related to focus. Make sure that the window you want to be focused gets activated and the component you want to focus receives the native focus event.

On the Windows platform, the native focus events are the following:

  • WM_ACTIVATE for a top-level. WPARAM is WA_ACTIVE when activating and WA_INACTIVE when deactivating.

  • WM_SETFOCUS and WM_KILLFOCUS for a component.

On the Windows platform, a concept of synthetic focus has been implemented. It means that a focus owner component only emulates its focusable state whereas real native focus is set to a focus proxy component. This component receives key and input method native messages and dispatches them to a focus owner. Prior to JDK7 a focus proxy component was a dedicated hidden child component inside a frame/dialog. In JDK7 a frame/dialog itself serves as a focus proxy. Now it proxies focus not only for components in an owned window but for all child components as well. A simple window never receives native focus and relies on focus proxy of its owner. This mechanism is transparent for a user but should be taken into account when debugging.

On Solaris OS and Linux, XToolkit uses a focus model that allows AWT to manage focus itself. With this model the window manager does not directly set input focus on a top-level window, but instead it sends only the WM_TAKE_FOCUS client message to indicate that focus should be set. AWT then explicitly sets focus on the top-level window if it is allowed.

Note that X server and some window managers may nevertheless send focus events to a window. However all such events are discarded by AWT.

AWT does not generate the hierarchical chains of focus events when a component inside a top-level gains focus. Moreover, the native window mapped to the component itself does not get any native focus event. On the Solaris OS and Linux platforms, as well as on the Windows platform, AWT uses the focus proxy mechanism. Therefore, focus on the component is set by synthesizing a focus event, whereas the invisible focus proxy has native focus.

A native window that is mapped to a Window object (not a Frame or Dialog object) has the override-redirect flag set. Thus the window manager does not notify the window about focus change. Focus is requested on the window only in response to a mouse click. This window will not receive native focus events at all. Therefore, you can trace only FocusIn or FocusOut events on a frame or dialog. Since the major processing of focus occurs at the Java level, debugging focus with XToolkit is simpler than with WToolkit.

Focus System in the Java Plug-in

An applet is embedded in a browser as a child (though not a direct child) of an EmbeddedFrame. This is a special Frame that has the ability to communicate with the plugin. From the applet's perspective the EmbeddedFrame is a full top-level Frame.

Managing focus for an EmbeddedFrame requires special additional actions. When an applet first starts, the EmbeddedFrame does not get activated by default by the native system. The activation is performed by the plugin that triggers a special API provided by the EmbeddedFrame. When focus leaves the applet, the EmbeddedFrame is also deactivated in a synthesized manner.

Focus Models Supported by X Window Managers

The following focus models are supported by X window managers:

  • click-to-focus is a commonly used focus model. (For example, Microsoft Windows uses this model.)

  • focus-follows-mouse is a focus model in which focus goes to the window that the mouse hovers over.

The focus-follows-mouse model is not detected in XAWT in Java SE 7, and this causes problems for simple windows (objects of java.awt.Window class). Such windows have the override-redirect property, which means that they can be focused only when the mouse button is pressed, and not by hovering over the window. As a workaround, set MouseListener on the window and request focus on it when mouse crosses the window borders.

Miscellaneous Problems With Focus

This section describes some issues related to focus in AWT that can occur and suggests solutions.

Issue 1Linux + KDE, XToolkit. Focus cannot be switched between two frames when a frame's title is clicked.

Clicking a component inside a frame causes focus to change.

Solution: Check the version of your window manager and upgrade it to 3.0 or greater.

Issue 2You want to manage focus using KeyListener to transfer focus in response to Tab/Shift+Tab, but no key events appear.

Solution: To catch traversal key events, you must enable them by calling Component.setFocusTraversalKeysEnabled(true).

Issue 3A window is set modal excluded with Window.setModalExclusionType(ModalExclusionType).

The frame, its owner, is modal blocked. In this case the window will also remain modal blocked.

Solution: A window cannot become the focused window when its owner is not allowed to get focus. The solution is to exclude the owner from modality.

Issue 4On Windows, a component requests focus and is concurrently removed from its container.

Sometimes java.lang.NullPointerException: null pData is thrown.

Solution: The easiest way to avoid throwing the exception is to do the removal along with requesting focus on EDT. Another, more complicated, approach is to synchronize requesting focus and removal if you need to perform these actions on different threads.

Issue 5When focus is requested on a component and the focus owner is immediately removed, focus goes to the component after the removed component.

For example, Component A is the focus owner. Focus is requested on Component B, and immediately after this Component A is removed from its container. Eventually focus goes to Component C, which is located after Component A in the container, but not to Component B.

Solution: In this case, ensure that the requesting focus is executed after Component A is removed, not before.

Issue 6On Windows, when a window is set alwaysOnTop in an inactive frame, the window cannot receive key events.

For example, a frame is displayed, with a window that it owns. The frame is inactive, so the window is not focused. Then the window is set to alwaysOnTop. The window gains focus, but its owner remains inactive. Therefore, the window cannot receive key events.

Solution: Bring the frame to front (the Frame.toFront() method) before setting the window to alwaysOnTop.

Issue 7When a splash screen is shown and a frame is shown after the splash screen window closes, the frame does not get activated.

Solution: Bring the frame to front (the Frame.toFront() method) after showing it (the Frame.setVisible(true) method).

Issue 8The WindowFocusListener.windowGainedFocus(WindowEvent) method does not return the frame's most recent focus owner.

For example, a frame is the focused window, and one of its components is the focus owner. Another window is clicked, and then the frame is clicked again. WINDOW_GAINED_FOCUS comes to the frame and the WindowFocusListener.windowGainedFocus(WindowEvent) method is called. However, inside of this callback you cannot determine the frame's most recent focus owner, because Frame.getMostRecentFocusOwner() returns null.

Solution: You can get the frame's most recent focus owner inside the WindowListener.windowActivated(WindowEvent) callback. However, by this time the frame will have become the focused window only if it does not have owned windows.

Note:

This approach does not work for the window, only for the frame or dialog.

Issue 9An applet steals focus when it starts.

Solution: This behavior is the default since JDK 1.3. However you might need to prevent the applet from getting focus on startup, for example, if your applet is invisible and does not require focus at all. In this case, you can set the special parameter initial_focus to false in the HTML tag, as follows:

<applet code="MyApplet" width=50 height=50>
<param name=initial_focus value="false">
</applet>
Issue 10A window is disabled with Component.setEnabled(false), but does not get totally unfocusable.

Solution: Do not assume that the condition set by calling Component.setEnabled(false) or Component.setFocusable(false) will be maintained unfocusable along with all its content. Instead, use the Window.setFocusableWindowState(boolean) method.

Data Transfer

This section discusses possible problems with data transfer features, which allow you to add drag and drop (DnD) and cut, copy and paste (CCP) operations to the application.

Debugging Drag and Drop Applications

It is difficult to use a debugger to troubleshoot DnD features, because during the drag-and-drop operation all input is grabbed. Therefore, if you place a breakpoint during DnD, you might need to restart your X server. Try to use remote debugging instead.

Two simple methods can be used to troubleshoot most issues with DnD:

  • Printing all DataFlavor instances

  • Printing received data

An alternative to remote debugging is the System.err.println() function, which prints output without delay.

Frequent Issues With Data Transfer

This section describes some issues that frequently arise with data transfer operations in AWT and suggests troubleshooting solutions.

Issue 1Pasting a huge amount of data from the clipboard takes too much time.

Using the Clipboard.getContents() function for a paste operation sometimes causes the application to hang for a while, especially if a rich application provides the data to paste.

The Clipboard.getContents() function fetches clipboard data in all available flavors (for example, some text and image flavors), and this can be expensive and unnecessary.

Solution: Use the Clipboard.getData() method to get only specific data from the clipboard. If data in only one or a few flavors are needed, use one of the following Clipboard methods instead of getContents():

  • DataFlavor[] getAvailableDataFlavors()

  • boolean isDataFlavorAvailable(DataFlavor flavor)

  • Object getData(DataFlavor flavor)

Issue 2When a Java application uses Transferable.getTransferData() for DnD operations, the drag seems to take a long time.

In order to initialize transferred data only if it is needed, initialization code was put in Transferable.getTransferData().

Transferable data is expensive to generate, and during a DnD operation Transferable.getTransferData() is invoked more than once, causing a slowdown.

Solution: Cache the Transferable data so that it is generated only once.

Issue 3Files cannot be transferred between a Java application and the GNOME/KDE desktop and file browser.

On Windows and some window managers, transferred file lists can be represented as DataFlavor.javaFileListFlavor data flavor. But not all window managers represent lists of files in this format. For example, the GNOME window manager represents a file list as a list of URIs.

Workaround: To get files, request data of type String, and then translate the string to a list of files according to text/uri-list format described in RFC 2483. To enable dropping files from a Java application to GNOME/KDE desktop and file browser, export data in the text/uri-list format. For a code example, see the "WORK AROUND" section of this bug report:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4899516

Issue 4An image is passed to one of the startDrag() methods of DragGestureEvent or DragSource, but the image is not displayed during the subsequent DnD operation.

Solution: Move a window with an image rendered on it as the mouse cursor moves during a DnD operation. See the code example in the "WORK AROUND" section of the following request for enhancement (RFE):

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4899516

Issue 5There is no way to transfer an array using DnD.

The DataFlavor class has no constructor which handles arrays. The mime type for array contains characters which should be escaped. For example, the following code throws an IllegalArgumentException:

new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType +
"; class=" +
(new String[0]).getClass().getName())

Solution: Quote the value of the representation class parameter, as shown in the following code, where the quotation marks are escaped:

new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType +
"; class=" +
"\"" +
(new String[0]).getClass().getName() +
"\"")

For more information, see the following bug report:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4276926

Issue 6There are problems using AWT DnD support with Swing components.

Various problems can arise, for example, odd events are fired during a DnD operation, multiple items cannot be dragged and dropped, an InvalidDnDOperationException is thrown.

Solution: Use Swing's DnD support with Swing components. Although the Swing DnD implementation is based on the AWT DnD implementation, you cannot mix Swing and AWT DnD. For more information, refer to the DnD section of the Swing Tutorial at

http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html

and general Swing documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/swing/index.html

Issue 7There is no way to change the state of the source to depend on the target.

In order to change the state of the source to depend on the target, you need to have references to the source and target components in the same area of code, but this is not currently implemented in the DnD API.

Workaround: One workaround is to add flags to the transferable object that allow you to determine the context of the event.

For the transfer of data within one Java VM, the following workaround is proposed:

  1. Implement your target component as DragSourceListener.

  2. In DragGestureRecognizer.dragGestureRecognized() add the target at drag source listener, as follows:

    public void dragGestureRecognized(DragGestureEvent dge) {
             dge.startDrag(null, new StringSelection("SomeTransferedText"));
             dge.getDragSource().addDragSourceListener(target);
        }

  3. Now you can get the target and the source in the dragEnter(), dragOver(), dropActionChanged(), and dragDropEnd() methods of DragSourceListener().

Issue 8Transferring of objects in an application takes a long time.

The transferring of a big bundle of data or the creation of transferred objects takes too long. The user must wait a long time for the data transfer to complete.

This expensive operation makes transferring too long because you must wait until Transferable.getTransferData() finishes.

Solution: This solution is valid only for transferring data within one Java VM. Create or get expensive resources before the drag operation. For example, obtain file content when you create transferable, so that Transferable.getTransferData() will not be too long.

Other Issues

This section describes other issues with AWT and provides information for troubleshooting them. In particular, it contains the following subsections:

  • "Splash Screen Issues"

  • "Tray Icon Issues"

  • "Popup Menu Issues"

  • "Background/Foreground Color Inheritance"

  • "AWT Panel Size Restriction"

  • "Hangs when debugging popup menus and similar components on X11"

  • "Window.toFront()/toBack() behavior on X11"

Splash Screen Issues

This section describes some issues that can arise with the splash screen in AWT.

Issue 1The user specified a JAR file with an appropriate MANIFEST.MF in -classpath, but the splash screen does not work.

Solution: See solution to the next issue.

Issue 2It is not clear which of several JAR files in an application should contain the splash screen image.

Solution: The splash screen image will be picked from a JAR file only if the file is used with the -jar command-line option. This JAR file should contain both the "SplashScreen-Image" manifest option and the image file. JAR files in -classpath will never be checked for splash screens in MANIFEST.MF. If you do not use -jar, you can still use -splash to specify the splash screen image in the command line.

Issue 3Translucent PNG splash screens do not work on Solaris OS and Linux.

Solution: This is a native limitation of X11. On Solaris OS and Linux, the alpha channel of a translucent image will be compared with 50% threshold. Alpha values above 0.5 will make opaque pixels and pixels with alpha below 0.5 will be completely transparent. Translucency support might improve in future versions of Java SE.

Tray Icon Issues

With the Java SE 6 release on Windows 98, the method TrayIcon.displayMessage() is not supported because the native service to display a balloon is not supported on Windows 98.

If a SecurityManager is installed, the value of AWTPermission must be set to accessSystemTray in order to create a TrayIcon object.

Popup Menu Issues

In the JPopupMenu.setInvoker() method, the invoker is the component in which the popup menu is to be displayed. If this property is set to null, the popup menu does not function correctly.

The solution is to set the popup's invoker to itself.

Background/Foreground Color Inheritance

Many AWT components use their own defaults for background and foreground colors instead of using the colors of their parents.

This behavior is platform-dependent: the same component can behave differently on different platforms. In addition, some components use the default value for one of the background or foreground colors, but take the value from the parent for another color.

To ensure the consistency of your application on every platform, use explicit color assignment (both foreground and background) for every component or container.

AWT Panel Size Restriction

The AWT container has a size limitation. On most platforms, this limit is 32767 pixels. This means that, for example, if the canvas objects are 25 pixels high, a Java AWT panel cannot display more than 1310 objects.

Unfortunately there is no way to change this limit, neither with Java code nor with native code. The limit depends on what data type the operating system uses to store a widget size. For example, the Windows 2000/XP operating system and the Linux X operating system use integer type and are therefore limited to the maximum size of an integer. Other operating systems might use different types, such as long, and in this case the limit could be higher.

For more information, refer to the documentation for your platform.

The following are examples of workarounds for this limit that might be helpful:

  • Display components page by page.

  • Use tabs to display a few components at a time.

Hangs when debugging popup menus and similar components on X11

Certain graphical user interface (GUI) actions require grabbing all the input events in order to determine when the action should terminate (for example, navigating popup menus). While the grab is active, no other applications receive input events. If a Java application is being debugged, and a breakpoint is reached while the grab has been active, the operating system appears to hang. This happens because the Java application holding the grab is stopped by the debugger and cannot process any input events, and other applications simply do not receive the events due to the installed grab. In order to allow debugging such applications, the following system property should be set when running the application from the debugger:

-Dsun.awt.disablegrab=true

This effectively turns off setting the grab, and as such does not hang the system. However, with this option set, in some cases this may lead to inability to terminate a GUI actions that would normally be terminated. For example, popup menus may not be dismissed when clicking a window's title bar.

Window.toFront()/toBack() behavior on X11

Due to restrictions enforced by third-party software (in particular, by window managers such as the Metacity), the toFront()/toBack() methods may not always work as expected and cause the window to not change its stacking order in relation to other top-level windows. More details are available in the CR 6472274.

If an application ultimately wants to bring a window to top, it can try to workaround the issue by calling Window.setAlwaysOnTop(true) to temporarily make the window always stay on top and then calling setAlwaysOnTop(false) to reset the "always on top" state.

Note:

This workaround is not guaranteed to always work because window managers can enforce more restrictions in the future. Also please note that setting a window to "always on top" is available to trusted applications only. An unsigned applet or an unsigned Web Start application running in a sandbox cannot use this API, and thus is unable to work around the issue.

However, native applications experience similar issues, and as such this peculiarity makes Java applications behave similar to native applications. Therefore this issue cannot really be considered a bug.

Heavyweight/Lightweight Components Mixing

This section discusses possible issues with the heavyweight/lightweight (HW/LW) mixing feature. In particular, it contains the following subsections:

  • "The Requirement of Validating the Component Hierarchy"

  • "Validate Roots"

  • "Swing Painting Optimizations"

  • "Non-opaque LW Components"

  • "Disabling the Default HW/LW Mixing Feature Implementation"

The Requirement of Validating the Component Hierarchy

Changing any layout-related properties of a component, such as its size, location, or font, invalidates the component as well as its ancestors. In order for the HW/LW Mixing feature to function correctly, the component hierarchy must be validated after making such changes. By default, invalidation stops on the top-most container of the hierarchy (for example, a Frame object). Therefore, to restore the validity of the hierarchy, the application should call the Frame.validate() method. For example:

component.setFont(myFont);
frame.validate();

where frame refers to a frame which contains component. Note that Swing applications and the Swing library itself often use the following pattern:

component.setFont(myFont);
component.revalidate();

The revalidate() call is not sufficient because it validates the hierarchy starting from the nearest validate root of the component only, thus leaving the upper containers invalid. In that case, the HW/LW feature may not calculate correct shapes for HW components, and visual artifacts may be seen on the screen.

To verify the validity of the whole component hierarchy a user can use the key combination Control+Shift+F1 as described in "Debugging Tips for AWT". A component marked 'invalid' may indicate a missing validate() call somewhere.

Validate Roots

The concept of validate roots mentioned in "The Requirement of Validating the Component Hierarchy" has been introduced in Swing in order to speed up the process of validating component hierarchies because it may take a significant amount of time. While such optimization leaves upper parts of hierarchies invalid, this did not bring any issues because the layout of components inside a validate root does not affect the layout of outside component hierarchy (that is, the siblings of the validate root). However, when HW and LW components are mixed together in a hierarchy, this statement is no longer true. That is why the feature requires the whole component hierarchy to be valid.

Calling frame.validate() may be inefficient as well, and as such AWT supports an alternative, optimized way of handling invalidation/validation of component hierarchies. This feature is enabled with a system property:

-Djava.awt.smartInvalidate=true

Once this property is specified, the invalidate() method will stop invalidation of the hierarchy when it reaches the nearest validate root of a component on which the invalidate() method has been invoked. Afterwards, to restore the validity of the component hierarchy, the application should simply call:

component.revalidate();

Note that in this case calling frame.validate() would be effectively a no-op (a statement that does nothing) because frame is still valid. Since some applications rely on calling validate() directly on a component upper than the validate root of the hierarchy (for example, a frame), this new optimized behavior may cause incompatibility issues, and hence it is available only when specifying the system property.

If an application experiences any difficulties running in this new optimized mode, a user can use the key combination Control+Shift+F1 as described in "Debugging Tips for AWT" to investigate what parts of the component hierarchy are left invalid, and thus possibly cause the problems.

Swing Painting Optimizations

By default, the Swing library assumes that there are no HW components in the component hierarchy, and therefore uses optimized drawing techniques to boost performance of the Swing GUI. If a component hierarchy contains HW components, the optimizations must be turned off. This is relevant for Swing JScrollPanes in the first place. You can change the scrolling mode by using the JViewPort.setScrollMode(int) method.

Non-opaque LW Components

Non-opaque LW components are not supported by the HW/LW mixing feature implementation by default. In order to enable mixing non-rectangular LW components with HW components, the application must use the com.sun.awt.AWTUtilities.setComponentMixingCutoutShape() non-public API.

Note that non-rectangular LW components should still paint themselves using either opaque (alpha = 1.0) or transparent (alpha = 0.0) colors. Using translucent colors (with 0.0 < alpha < 1.0) is not supported.

Disabling the Default HW/LW Mixing Feature Implementation

In the past, some developers have implemented their own support for cases when HW and LW components must be mixed together. The built-in implementation of the feature available since JDK 6 update 12 and JDK 7 may cause problems with custom workarounds. In order to disable the built-in feature the application must be started with the following system property:

-Dsun.awt.disableMixing=true
Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Fatal Error Log

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous

B Fatal Error Log

This appendix describes the fatal error log, its location and contents.

The fatal error log is created when a fatal error occurs. It contains information and the state obtained at the time of the fatal error.

Note:

The format of this file can change slightly in update releases.

This appendix contains the following sections.

  • "Location of Fatal Error Log"

  • "Description of Fatal Error Log"

  • "Header Format"

  • "Thread Section Format"

  • "Process Section Format"

  • "System Section Format"

Location of Fatal Error Log

To specify where the log file will be created, use the product flag -XX:ErrorFile=file, where file represents the full path for the log file location. The substring %% in the file variable is converted to %, and the substring %p is converted to the PID of the process.

In the following example, the error log file will be written to the directory /var/log/java and will be named java_errorpid.log:

java -XX:ErrorFile=/var/log/java/java_error%p.log

If the -XX:ErrorFile=file flag is not specified, the default log file name is hs_err_pid.log, where pid is the PID of the process.

In addition, if the -XX:ErrorFile=file flag is not specified, the system attempts to create the file in the working directory of the process. In the event that the file cannot be created in the working directory (insufficient space, permission problem, or other issue), the file is created in the temporary directory for the operating system. On Solaris OS and Linux the temporary directory is /tmp. On Windows the temporary directory is specified by the value of the TMP environment variable; if that environment variable is not defined, the value of the TEMP environment variable is used.

Description of Fatal Error Log

The error log contains information obtained at the time of the fatal error, including the following information, where possible:

  • The operating exception or signal that provoked the fatal error

  • Version and configuration information

  • Details on the thread that provoked the fatal error and thread's stack trace

  • The list of running threads and their state

  • Summary information about the heap

  • The list of native libraries loaded

  • Command line arguments

  • Environment variables

  • Details about the operating system and CPU

Note:

In some cases only a subset of this information is output to the error log. This can happen when a fatal error is of such severity that the error handler is unable to recover and report all details.

The error log is a text file consisting of the following sections:

  • A header that provides a brief description of the crash. See "Header Format".

  • A section with thread information. See "Thread Section Format".

  • A section with process information. See "Process Section Format".

  • A section with system information. See "System Section Format".

Note:

The format of the fatal error log described here is based on Java SE 6. The format might be different with other releases.

Header Format

The header section at the beginning of every fatal error log file contains a brief description of the problem. The header is also printed to standard output and may show up in the application's output log.

The header includes a link to the HotSpot Virtual Machine Error Reporting Page, where the user can submit a bug report.

The following is a sample header from a crash.

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C  [libNativeSEGV.so+0x9d7]

#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

This example shows that the VM crashed on an unexpected signal. The next line describes the signal type, program counter (pc) that caused the signal, process ID and thread ID, as follows.

#  SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024
      |      |           |             |         +--- thread id
      |      |           |             +------------- process id
      |      |           +--------------------------- program counter
      |      |                                        (instruction pointer)
      |      +--------------------------------------- signal number
      +---------------------------------------------- signal name

The next line contains the VM version (Client VM or Server VM), an indication whether the application was run in mixed or interpreted mode, and an indication whether class file sharing was enabled. Here is an example:

# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode, sharing)

The next information is the function frame that caused the crash, as follows.

# Problematic frame:
# C  [libNativeSEGV.so+0x9d7]
  |              +-- Same as pc, but represented as library name and offset.
  |                  For position-independent libraries (JVM and most shared
  |                  libraries), it is possible to inspect the instructions
  |                  that caused the crash without a debugger or core file
  |                  by using a disassembler to dump instructions near the
  |                  offset.
  +----------------- Frame type

In this example, the "C" frame type indicates a native C frame. The following table shows the possible frame types.

Table B-1 Frame Types

Frame Type | Description
C | Native C frame
j | Interpreted Java frame
V | VM frame
v | VM-generated stub frame
J | Other frame types, including compiled Java frames

Internal errors will cause the VM error handler to generate a similar error dump. However, the header format is different. Examples of internal errors are guarantee() failure, assertion failure, ShouldNotReachHere(), and so forth. Here is an example of how the header looks for an internal error:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (4F533F4C494E55583F491418160E43505000F5), pid=10226, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode)

In the above header, there is no signal name or signal number. Instead the second line now contains Internal Error and a long hexadecimal string. This hexadecimal string encodes the source module and line number where the error was detected. In general this "error string" is useful only to engineers working on the HotSpot Virtual Machine.

The error string encodes a line number and therefore it changes with each code change and release. A crash with a given error string in one release (for example, 1.6.0) might not correspond to the same crash in an update release (for example, 1.6.0_01), even if the strings match.

Note:

Do not assume that a workaround or solution that worked in one situation associated with a given error string will work in another situation associated with that same error string. Note the following facts:

  • Errors with the same root cause might have different error strings.

  • Errors with the same error string might have completely different root causes.

Therefore, the error string should not be used as the sole criterion when troubleshooting bugs.

Thread Section Format

This section contains information about the thread that just crashed. If multiple threads crash at the same time, only one thread is printed.

Thread Information

The first part of the thread section shows the thread that provoked the fatal error, as follows.

Current thread (0x0805ac88):  JavaThread "main" [_thread_in_native, id=21139]
                    |             |         |            |          +-- ID
                    |             |         |            +------------- state
                    |             |         +-------------------------- name
                    |             +------------------------------------ type
                    +-------------------------------------------------- pointer

The thread pointer is the pointer to the Java VM internal thread structure. It is generally of no interest unless you are debugging a live Java VM or core file.

The following list shows possible thread types.

  • JavaThread

  • VMThread

  • CompilerThread

  • GCTaskThread

  • WatcherThread

  • ConcurrentMarkSweepThread

The following table shows the important thread states.

Table B-2 Thread States

Thread State | Description
_thread_uninitialized | Thread is not created. This occurs only in the case of memory corruption.
_thread_new | Thread has been created but it has not yet started.
_thread_in_native | Thread is running native code. The error is probably a bug in native code.
_thread_in_vm | Thread is running VM code.
_thread_in_Java | Thread is running either interpreted or compiled Java code.
_thread_blocked | Thread is blocked.
..._trans | If any of the above states is followed by the string _trans, that means that the thread is changing to a different state.

The thread ID in the output is the native thread identifier.

If a Java thread is a daemon thread, then the string daemon is printed before the thread state.

Signal Information

The next information in the error log describes the unexpected signal that caused the VM to terminate. On a Windows system the output appears as follows:

siginfo: ExceptionCode=0xc0000005, reading address 0xd8ffecf1

In the above example, the exception code is 0xc0000005 (ACCESS_VIOLATION), and the exception occurred when the thread attempted to read address 0xd8ffecf1.

On Solaris OS and Linux systems the signal number (si_signo) and signal code (si_code) are used to identify the exception, as follows:

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00004321

Register Context

The next information in the error log shows the register context at the time of the fatal error. The exact format of this output is processor-dependent. The following example shows output for the Intel (IA32) processor.

Registers:
EAX=0x00004321, EBX=0x41779dc0, ECX=0x080b8d28, EDX=0x00000000
ESP=0xbfffc1e0, EBP=0xbfffc1f8, ESI=0x4a6b9278, EDI=0x0805ac88
EIP=0x417789d7, CR2=0x00004321, EFLAGS=0x00010216

The register values might be useful when combined with instructions, as described below.

Machine Instructions

After the register values, the error log contains the top of stack followed by 32 bytes of instructions (opcodes) near the program counter (PC) when the system crashed. These opcodes can be decoded with a disassembler to produce the instructions around the location of the crash. Note that IA32 and AMD64 instructions are variable in length, and so it is not always possible to reliably decode instructions before the crash PC.

Top of Stack: (sp=0xbfffc1e0)
0xbfffc1e0:   00000000 00000000 0818d068 00000000
0xbfffc1f0:   00000044 4a6b9278 bfffd208 41778a10
0xbfffc200:   00004321 00000000 00000cd8 0818d328
0xbfffc210:   00000000 00000000 00000004 00000003
0xbfffc220:   00000000 4000c78c 00000004 00000000
0xbfffc230:   00000000 00000000 00180003 00000000
0xbfffc240:   42010322 417786ec 00000000 00000000
0xbfffc250:   4177864c 40045250 400131e8 00000000
Instructions: (pc=0x417789d7)
0x417789c7:   ec 14 e8 72 ff ff ff 81 c3 f2 13 00 00 8b 45 08
0x417789d7:   0f b6 00 88 45 fb 8d 83 6f ee ff ff 89 04 24 e8

Thread Stack

Where possible, the next output in the error log is the thread stack. This includes the addresses of the base and the top of the stack, the current stack pointer, and the amount of unused stack available to the thread. This is followed, where possible, by the stack frames, and up to 100 frames are printed. For C/C++ frames the library name may also be printed. It is important to note that in some fatal error conditions the stack may be corrupt, and in such case this detail may not be available.

Stack: [0x00040000,0x00080000),  sp=0x0007f9f8,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x83d77]
C  [App.dll+0x1047]
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub
V  [jvm.dll+0x80f13]
V  [jvm.dll+0xd3842]
V  [jvm.dll+0x80de4]
C  [java.exe+0x14c0]
C  [java.exe+0x64cd]
C  [kernel32.dll+0x214c7]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub

The log contains two thread stacks.

  • The first thread stack is Native frames, which prints the native thread showing all function calls. However this thread stack does not take into account the Java methods that are inlined by the runtime compiler; if methods are inlined they appear to be part of the parent's stack frame.

    The information in the thread stack for native frames provides important information about the cause of the crash. By analyzing the libraries in the list from the top down, you can generally determine which library might have caused the problem and report it to the appropriate organization responsible for that library.

  • The second thread stack is Java frames, which prints the Java frames including the inlined methods, skipping the native frames. Depending on the crash it might not be possible to print the native thread stack but it might be possible to print the Java frames.

Further Details

If the error occurred in the VM thread or in a compiler thread, then further details may be printed. For example, in the case of the VM thread, the VM operation is printed if the VM thread is executing a VM operation at the time of the fatal error. In the following output example, the compiler thread provoked the fatal error. The task is a compiler task and the HotSpot Client VM is compiling method hs101t004Thread.ackermann.

Current CompileTask:
HotSpot Client Compiler:754   b
nsk.jvmti.scenarios.hotswap.HS101.hs101t004Thread.ackermann(IJ)J (42 bytes)

For the HotSpot Server VM the output for the compiler task is slightly different but will also include the full class name and method.

Process Section Format

The process section is printed after the thread section. It contains information about the whole process, including thread list and memory usage of the process.

Thread List

The thread list includes the threads that the VM is aware of. This includes all Java threads and some VM internal threads, but does not include any native threads created by the user application that have not attached to the VM. The output format follows:

=>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139]
|      |         |        |             |             +----- ID
|      |         |        |             +------------------- state
|      |         |        |                                  (JavaThread only)
|      |         |        +--------------------------------- name
|      |         +------------------------------------------ type
|      +---------------------------------------------------- pointer
+------------------------------------------------------ "=>" current thread

An example of this output follows:

Java Threads: ( => current thread )
  0x080c8da0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=21147]
  0x080c7988 JavaThread "CompilerThread0" daemon [_thread_blocked, id=21146]
  0x080c6a48 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=21145]
  0x080bb5f8 JavaThread "Finalizer" daemon [_thread_blocked, id=21144]
  0x080ba940 JavaThread "Reference Handler" daemon [_thread_blocked, id=21143]
=>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139]

Other Threads:
  0x080b6070 VMThread [id=21142]
  0x080ca088 WatcherThread [id=21148]

The thread type and thread state are described in "Thread Section Format".

VM State

The next information is the VM state, which indicates the overall state of the virtual machine. The following table describes the general states.

Table B-3 VM States

General VM State | Description
not at a safepoint | Normal execution.
at safepoint | All threads are blocked in the VM waiting for a special VM operation to complete.
synchronizing | A special VM operation is required and the VM is waiting for all threads in the VM to block.

The VM state output is a single line in the error log, as follows:

VM state:not at safepoint (normal execution)

Mutexes and Monitors

The next information in the error log is a list of mutexes and monitors that are currently owned by a thread. These mutexes are VM internal locks rather than monitors associated with Java objects. Below is an example to show how the output might look when a crash happens when VM locks are held. For each lock the log contains the name of the lock, its owner, and the addresses of a VM internal mutex structure and its OS lock. In general this information is useful only to those who are very familiar with the HotSpot VM. The owner thread can be cross-referenced to the thread list.

VM Mutex/Monitor currently owned by a thread:
([mutex/lock_event])[0x007357b0/0x0000031c] Threads_lock - owner thread: 0x00996318
[0x00735978/0x000002e0] Heap_lock - owner thread: 0x00736218

Heap Summary

The next information is a summary of the heap. The output depends on the garbage collection (GC) configuration. In this example the serial collector is used, class data sharing is disabled, and the tenured generation is empty. This probably indicates that the fatal error occurred early or during start-up and a GC has not yet promoted any objects into the tenured generation. An example of this output follows:

Heap
 def new generation   total 576K, used 161K [0x46570000, 0x46610000, 0x46a50000)
  eden space 512K,  31% used [0x46570000, 0x46598768, 0x465f0000)
  from space 64K,   0% used [0x465f0000, 0x465f0000, 0x46600000)
  to   space 64K,   0% used [0x46600000, 0x46600000, 0x46610000)
 tenured generation   total 1408K, used 0K [0x46a50000, 0x46bb0000, 0x4a570000)
   the space 1408K,   0% used [0x46a50000, 0x46a50000, 0x46a50200, 0x46bb0000)
 compacting perm gen  total 8192K, used 1319K [0x4a570000, 0x4ad70000, 0x4e570000)
   the space 8192K,  16% used [0x4a570000, 0x4a6b9d48, 0x4a6b9e00, 0x4ad70000)
No shared spaces configured.

Memory Map

The next information in the log is a list of virtual memory regions at the time of the crash. This list can be long in the case of large applications. The memory map can be very useful when debugging some crashes, as it can tell you what libraries are actually being used, their location in memory, as well as the location of heap, stack, and guard pages.

The format of the memory map is operating-system-specific. On the Solaris Operating System, the base address and library name are printed. On the Linux system the process memory map (/proc/pid/maps) is printed. On the Windows system, the base and end addresses of each library are printed. The following example output was generated on Linux/x86. Note that most of the lines have been omitted from the example for the sake of brevity.

Dynamic libraries:
08048000-08056000 r-xp 00000000 03:05 259171     /h/jdk6/bin/java
08056000-08058000 rw-p 0000d000 03:05 259171     /h/jdk6/bin/java
08058000-0818e000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0a 400046     /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 03:0a 400046     /lib/ld-2.2.5.so
40014000-40015000 r--p 00000000 00:00 0
Lines omitted.
4123d000-4125a000 rwxp 00001000 00:00 0
4125a000-4125f000 rwxp 00000000 00:00 0
4125f000-4127b000 rwxp 00023000 00:00 0
4127b000-4127e000 ---p 00003000 00:00 0
4127e000-412fb000 rwxp 00006000 00:00 0
412fb000-412fe000 ---p 00083000 00:00 0
412fe000-4137b000 rwxp 00086000 00:00 0
Lines omitted.
44600000-46570000 rwxp 00090000 00:00 0
46570000-46610000 rwxp 00000000 00:00 0
46610000-46a50000 rwxp 020a0000 00:00 0
46a50000-46bb0000 rwxp 00000000 00:00 0
46bb0000-4a570000 rwxp 02640000 00:00 0
Lines omitted.

The format of a line in the above memory map is as follows:

40049000-4035c000 r-xp 00000000 03:05 824473 /jdk1.5/jre/lib/i386/client/libjvm.so
|<------------->|                        |<--------------------------------->|
  Memory region    |      |       |     |                      |
                   |      |       |     |                      |
  Permission   --- +      |       |     |                      |
    r: read               |       |     |                      |
    w: write              |       |     |                      |
    x: execute            |       |     |                      |
    p: private            |       |     |                      |
    s: share              |       |     |                      |
                          |       |     |                      |
  File offset   ----------+       |     |                      |
                                  |     |                      |
  Major ID and minor ID of -------+     |                      |
  the device where the file             |                      |
  is located (i.e. /dev/hda5)           |                      |
                                        |                      |
  inode number  ------------------------+                      |
                                                               |
  File name  --------------------------------------------------+

In the memory map output, each library has two virtual memory regions: one for code and one for data. The permission for the code segment is marked with r-xp (readable, executable, private), and the permission for the data segment is rw-p (readable, writable, private).

The Java heap is already included in the heap summary earlier in the output, but it can be useful to verify that the actual memory regions reserved for heap match the values in the heap summary and that the attributes are set to rwxp.

Thread stacks usually show up in the memory map as two back-to-back regions, one with permission ---p (guard page) and one with permission rwxp (actual stack space). In addition, it is useful to know the guard page size or stack size. For example, in this memory map, the stack is located from 4127b000 to 412fb000.

On a Windows system, the memory map output is the load and end address of each loaded module, as in the example below.

Dynamic libraries:
0x00400000 - 0x0040c000     c:\jdk6\bin\java.exe
0x77f50000 - 0x77ff7000     C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000     C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000     C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000     C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000     C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08183000     c:\jdk6\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcc000     C:\WINDOWS\system32\USER32.dll
0x7e090000 - 0x7e0d1000     C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000     C:\WINDOWS\System32\WINMM.dll
0x6d2f0000 - 0x6d2f8000     c:\jdk6\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000     C:\WINDOWS\System32\PSAPI.DLL
0x6d680000 - 0x6d68c000     c:\jdk6\jre\bin\verify.dll
0x6d370000 - 0x6d38d000     c:\jdk6\jre\bin\java.dll
0x6d6a0000 - 0x6d6af000     c:\jdk6\jre\bin\zip.dll
0x10000000 - 0x10032000     C:\bugs\crash2\App.dll

VM Arguments and Environment Variables

The next information in the error log is a list of VM arguments, followed by a list of environment variables. An example follows.

VM Arguments:
java_command: NativeSEGV 2

Environment Variables:
JAVA_HOME=/h/jdk
PATH=/h/jdk/bin:.:/h/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
     /usr/dist/local/exe:/usr/dist/exe:/bin:/usr/sbin:/usr/ccs/bin:
     /usr/ucb:/usr/bsd:/usr/etc:/etc:/usr/dt/bin:/usr/openwin/bin:
     /usr/sbin:/sbin:/h:/net/prt-web/prt/bin
USERNAME=user
LD_LIBRARY_PATH=/h/jdk6/jre/lib/i386/client:/h/jdk6/jre/lib/i386:
     /h/jdk6/jre/../lib/i386:/h/bugs/NativeSEGV
SHELL=/bin/tcsh
DISPLAY=:0.0
HOSTTYPE=i386-linux
OSTYPE=linux
ARCH=Linux
MACHTYPE=i386

Note:

The list of environment variables is not the full list but rather a subset of the environment variables that are applicable to the Java VM.

Signal Handlers

On Solaris OS and Linux, the next information in the error log is the list of signal handlers.

Signal Handlers:
SIGSEGV: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004

System Section Format

The final section in the error log is the system information. The output is operating-system-specific but in general includes the operating system version, CPU information, and summary information about the memory configuration.

The following example shows output on a Solaris 9 OS system.

---------------  S Y S T E M  ---------------

OS:                       Solaris 9 12/05 s9s_u5wos_08b SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 21 November 2005

uname:SunOS 5.9 Generic_112233-10 sun4u  (T2 libthread)
rlimit: STACK 8192k, CORE infinity, NOFILE 65536, AS infinity
load average:0.41 0.14 0.09

CPU:total 2 has_v8, has_v9, has_vis1, has_vis2, is_ultra3

Memory: 8k page, physical 2097152k(1394472k free)

vm_info: Java HotSpot(TM) Client VM (1.5-internal) for solaris-sparc,
built on Aug 12 2005 10:22:32 by unknown with unknown Workshop:0x550

On Solaris OS and Linux, the operating system information is contained in the file /etc/*release. This file describes the kind of system the application is running on, and in some cases the information string might include the patch level. Some system upgrades are not reflected in the /etc/*release file. This is especially true on the Linux system, where the user can rebuild any part of the system.

On Solaris OS the uname system call is used to get the name for the kernel. The thread library (T1 or T2) is also printed.

On the Linux system the uname system call is also used to get the kernel name. The libc version and the thread library type are also printed. An example follows.

uname:Linux 2.4.18-3smp #1 SMP Thu Apr 18 07:27:31 EDT 2002 i686
libc:glibc 2.2.5 stable linuxthreads (floating stack)
    |<- glibc version ->|<--  pthread type       -->|

On Linux there are three possible thread types, namely linuxthreads (fixed stack), linuxthreads (floating stack), and NPTL. They are normally installed in /lib, /lib/i686, and /lib/tls.

It is useful to know the thread type. For example, if the crash appears to be related to pthread, then you might be able to work around the issue by selecting a different pthread library. A different pthread library (and libc) can be selected by setting LD_LIBRARY_PATH or LD_ASSUME_KERNEL.

The glibc version usually does not include the patch level. The command rpm -q glibc might provide more detailed version information.

On Solaris OS and Linux, the next information is the rlimit information. Note that the default stack size of the VM is usually smaller than the system limit. An example follows:

rlimit: STACK 8192k, CORE 0k, NPROC 4092, NOFILE 1024, AS infinity
             |          |         |           |           virtual memory (-v)
             |          |         |           +--- max open files (ulimit -n)
             |          |         +----------- max user processes (ulimit -u)
             |          +------------------------- core dump size (ulimit -c)
             +---------------------------------------- stack size (ulimit -s)
load average:0.04 0.05 0.02

The next information specifies the CPU architecture and capabilities identified by the VM at start-up, as in the following example:

CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse
          |        | |<----- CPU features ---->|
          |        |
          |        +--- processor family (IA32 only):
          |                3 - i386
          |                4 - i486
          |                5 - Pentium
          |                6 - PentiumPro, PII, PIII
          |               15 - Pentium 4
          +------------ Total number of CPUs

The following table shows the possible CPU features on a SPARC system.

Table B-4 SPARC Features

SPARC Feature | Description
has_v8 | Supports v8 instructions.
has_v9 | Supports v9 instructions.
has_vis1 | Supports visualization instructions.
has_vis2 | Supports visualization instructions.
is_ultra3 | UltraSparc III.
no-muldiv | No hardware integer multiply and divide.
no-fsmuld | No multiply-add and multiply-subtract instructions.

The following table shows the possible CPU features on an Intel/IA32 system.

Table B-5 Intel/IA32 Features

Intel/IA32 Feature | Description
cmov | Supports cmov instruction.
cx8 | Supports cmpxchg8b instruction.
fxsr | Supports fxsave and fxrstor.
mmx | Supports MMX.
sse | Supports SSE extensions.
sse2 | Supports SSE2 extensions.
ht | Supports Hyper-Threading Technology.

The following table shows the possible CPU features on an AMD64/EM64T system.

Table B-6 AMD64/EM64T Features

AMD64/EM64T Feature | Description
amd64 | AMD Opteron, Athlon64, and so forth.
em64t | Intel EM64T processor.
3dnow | Supports 3DNow extension.
ht | Supports Hyper-Threading Technology.

The next information in the error log is memory information, as follows:

                                                  unused swap space
                              total amount of swap space        |
                   unused physical memory            |          |
total amount of physical memory       |              |          |
     page size              |         |              |          |
           v                v         v              v          v
Memory: 4k page, physical 513604k(11228k free), swap 530104k(497504k free)

Some systems require swap space to be at lease twice the size of real physical memory, whereas other systems do not have any such requirements. As a general rule, if both physical memory and swap space are almost full, there is good reason to suspect that the crash was due to insufficient memory.

On Linux systems the kernel may convert most of unused physical memory to file cache. When there is a need for more memory, the Linux kernel will give the cache memory back to the application. This is handled transparently by the kernel, but it does mean the amount of unused physical memory reported by fatal error handler could be close to zero when there is still sufficient physical memory available.

The final information in the SYSTEM section of the error log is vm_info, which is a version string embedded in libjvm.so/jvm.dll. Every Java VM has its own unique vm_info string. If you are in doubt about whether the fatal error log was generated by a particular Java VM, check the version string.

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

5 Internationalization

This chapter provides information and guidance on troubleshooting issues that might be found in the area of internationalization support.

For detailed information, visit the Java Internationalization site.

This chapter contains the following sections:

  • "Introduction"

  • "Troubleshooting"

Introduction

Before troubleshooting, make sure that you understand the difference between internationalization and localization:

  • Internationalization is the process of designing software so that it can be adapted (localized) to various languages and regions easily, in a cost-effective way, and without changes to the software. This process generally involves isolating the parts of a program that are dependent on language and culture. For example, the text of error messages are kept separate from program source code because the messages must be translated during localization.

  • Localization is the process of adapting a program for use in a specific locale. A locale is a geographic or political region that shares the same language and customs. Localization includes the translation of text such as user interface labels, error messages, and online help. It also includes the culture-specific formatting of data items such as monetary values, times, dates, and numbers.

The user interface libraries in the Java SE platform enable the development of rich interactive applications. The internationalization aspects include text input, text display, and user interface layout. The following descriptions show the relationship between internationalization and the functionality provided by the AWT, Java 2D, and Swing APIs:

  • Text input is the process of entering new text into a document, whether by typing on a keyboard or through front-end software such as input methods, handwriting recognition, or speech input.

  • Text display is a multistep process that includes selecting a font, arranging text into paragraphs and lines, selecting glyphs for characters or character sequences, and rendering these glyphs. Some writing systems require bidirectional text layout or complex character-to-glyph mappings. Text display is handled by the Java 2D graphics system and the Swing toolkit for lightweight user interface components and by AWT for peered user interface components.

  • User interface layout needs to accommodate text expansion or shrinkage caused by localization, and match the direction of the user's writing system.

Troubleshooting

The Java Internationalization FAQ document answers general questions, as well as specific questions such as the following:

  • Why doesn't my application display any Chinese, Japanese, or Korean characters even though I have fonts for these languages installed?

  • Why can I see some characters in Swing components, but not in peered AWT components?

  • Why can't my application display all Unicode characters even though I have a Unicode font installed?

  • Why does the response character encoding in my JSP-based application change after I set it?

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Introduction

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

1 Introduction

This chapter explains how the different Java SE Desktop technologies interact with each other. In addition, the chapter helps you pinpoint the technology from which you might start troubleshooting your problem and provides general troubleshooting tips.

This chapter contains the following sections:

  • "Java SE Desktop Overview"

  • "Troubleshooting an Issue"

  • "Identifying the Type of Issue"

  • "Basic Tools"

  • "Using JDWP"

Java SE Desktop Overview

Java SE Desktop consists of several technologies used to create rich client applications and applets. The desktop tools and libraries provide an interface between the Java application and the core tools and libraries of the platform.

Figure 1-1 Overview of Java SE Desktop

Description of Figure 1-1 follows
Description of "Figure 1-1 Overview of Java SE Desktop"

For information on all desktop technologies available in Java SE, visit the Java SE Desktop Overview website at

http://www.oracle.com/technetwork/java/javase/tech/index-jsp-142216.html

This guide describes troubleshooting procedures for the following Java SE Desktop technologies:

  • Abstract Window Toolkit (AWT) provides a set of application programming interfaces (APIs) for constructing graphical user interface (GUI) components such as menus, buttons, text fields, dialog boxes, checkboxes, and for handling user input through those components. In addition, AWT allows for rendering of simple shapes such as ovals and polygons and enables developers to control the interface layout and fonts used by their applications. It also includes data transfer classes (including drag and drop) that allow cut and paste through the native platform clipboard.

    The classes of this API are at the bottom of the software stack (closest to the underlying operating and desktop system).

    AWT also provides a set of heavyweight components.

    Purely AWT applications are usually not related to Swing. If an AWT application does custom rendering, it uses Java 2D.

    For more information about AWT, see the AWT documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/awt/index.html

  • Java 2D is a set of classes for advanced 2D graphics and imaging. It encompasses line art, text, and images in a single comprehensive model. The API provides extensive support for image compositing and alpha channel images, a set of classes to provide accurate color space definition and conversion, and a rich set of display-oriented imaging operators. These classes are provided as additions to the java.awt and java.awt.image packages.

    Like AWT, Java 2D is also at the bottom of the software stack (closest to the underlying operating and desktop system).

    For more information about Java 2D, see the Java 2D documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/2d/index.html

  • Swing provides a comprehensive set of GUI components and services which enables the development of commercial-quality desktop and Internet/Intranet applications.

    Swing is built on top of many of the other Java SE Desktop technologies, including AWT, Java2D and Internationalization. In most cases the Swing high-level components are recommended instead of those in AWT. However, there are many APIs in AWT that are important to understand when programming in Swing.

    Since Swing is a lightweight toolkit, it has very little interaction with the native platform. Swing uses Java 2D for rendering, and AWT provides creation and manipulation of top-level components, such as Windows, Frames, and Dialogs.

    For more information about Swing, see the Swing documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/swing/index.html

  • Internationalization is the process of designing software so that it can be adapted (localized) to various languages and regions easily, cost-effectively, and in particular without engineering changes to the software. Localization is performed by simply adding locale-specific components, such as translated text, data describing locale-specific behavior, fonts, and input methods.

    In Java SE, internationalization support is fully integrated into the classes and packages that provide language-dependent or culture-dependent functionality.

    For more information about internationalization APIs and features of Java SE, see the Internationalization documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/intl/index.html

  • Java Sound provides low-level support for audio operations such as audio playback and capture (recording), mixing, musical instrument digital interface (MIDI) sequencing, and MIDI synthesis in an extensible, flexible framework. This API is supported by an efficient sound engine which guarantees high-quality audio mixing and MIDI synthesis capabilities for the platform.

    For more information about Java Sound, see the Java Sound documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/sound/index.html

  • Java Plug-in extends the functionality of popular web browsers by connecting them to the Java platform. This connection enables Java applets on websites to be run within the web browser on the desktop.

    For more information about Java Plug-in, see the Java Plug-in documentation at

    http://docs.oracle.com/javase/8/docs/technotes/guides/plugin/index.html

The better you understand the relationships between these technologies, the more quickly you can pinpoint the area your problem falls into.

Troubleshooting an Issue

When you experience problems running your application, follow the steps below for troubleshooting the issue.

Step 1Identify the symptom.

  • Identify the type of issue. See "Identifying the Type of Issue".

  • Find the problem area.

  • Note relevant configuration information.

Step 2Eliminate non-issues.

  • Make sure the correct patches, drivers, and operating systems are installed.

  • Try earlier releases (back-tracing).

  • Minimize the test. Restrict the test to as few issues at a time as possible.

  • Minimize the hardware and software configuration. Determine if the problem is reproducible on single and multiple systems. Determine if the problem changes with the browser version.

  • Determine if the problem depends on whether multiple VMs are installed.

Step 3Find the cause.

  • Check for typical causes in the area.

  • Use flags to change defaults.

  • Use tracing.

  • In exceptional cases, use system properties to temporarily change the behavior of the painting system. Several unsupported properties are described on the System Properties for Java 2D Technology page at

    http://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html

Step 4Find the fix.

  • Find a possible workaround.

  • File a bug.

    For guidance on how to submit a bug report and suggestions on what data to collect for the report, see "Submitting Bug Reports".

  • Fix the setup.

  • Fix the application.

The Java SE HotSpot VM Troubleshooting Guide provides information that can help in troubleshooting problems between the Java application and the Java HotSpot virtual machine. A lot of that information can also be applied to problems with applications that use the Java SE Desktop technologies.

Identifying the Type of Issue

First of all, take a moment to categorize the problem you are experiencing. This will help you identify the specific area of the problem, find the cause, and ultimately determine a solution or a workaround.

The subsections below provide information about common issue types:

  • Crashes

  • Performance Problems

  • Behavior Problems

Some of these might seem obvious, but it is always helpful to consider every possibility and to eliminate what is not an issue.

Crashes

When a crash occurs, an error log is created with information and the state obtained at the time of the fatal error. The default name of the error log file is hs_err_pid.log where pid is the process identifier (PID) of the process that crashed. For a standalone Java application this file is created in the current directory, while for Java applets it is created in the browser binaries directory or user client folder.

For a detailed description of the fatal error log, see "Fatal Error Log".

A line near the top of the header section indicates the library where the error occurred. The example below shows that the crash was related to the AWT library.

...
# Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b76 mixed mode, sharing)
# Problematic frame:
# C  [awt.dll+0x123456]
...

If the crash occurred in the Java Native Interface (JNI), it was likely to have been caused by the desktop libraries. A crash in a native library typically means a problem in Java 2D or AWT, because Swing does not have much native code. The small amount of native code in Swing is mostly concerned with native look and feel, and if your application is using native look and feel, the crash may be related to this area.

The error log usually shows the exact library where the crash occurred, and this can give you a good idea of the cause. Crashes in libraries which are not part of the Java Development Kit (JDK) usually indicate problems with the environment, for example, bad video drivers or desktop managers.

In the case of a VM crash, see the Java SE HotSpot VM Troubleshooting Guide.

Performance Problems

Performance problems are harder to diagnose because you generally do not have as much information.

First, you must determine which technology has the problem. For example, rendering performance problems are probably in Java 2D, and responsiveness issues can be Swing-related.

Performance-related problems can be divided into the following categories:

  • Startup

    How long does the application take to start up and become useful to the user?

  • Footprint

    How much memory does the application take? This can be measured by tools such as Task Manager on Windows or top and prstat on Solaris OS and Linux.

  • Runtime

    How fast does the application complete the task it is designed to perform? For example, if the application computes something, how long does it take to finish the computations? In the case of a game, is the frame rate acceptable and does the animation look smooth?

    Note that this is not the same as responsiveness, which is the next topic.

  • Responsiveness

    How fast does the application respond to user interaction? If the user clicks a menu, how long does it take for the menu to appear? Can a long-running task be interrupted? Does the application repaint fast enough so that the it does not appear to be slow?

Behavior Problems

In addition to crashes, various behavior-related problems can occur. Some of these problems are listed below. Their descriptions can guide you to the Java SE Desktop technology to troubleshoot.

  • Hangs occur when the application stops responding to user input. For more information about dealing with such issues, see the chapter on troubleshooting hanging or looping processes in the Java SE HotSpot VM Troubleshooting Guide.

  • Exceptions in Java code are visibly thrown to the console or the application log files. An examination of this output will guide you to the problem area.

  • Rendering and repainting issues indicate a problem in Java 2D, or perhaps in Swing. For example, the application has an incorrect appearance after a repaint that was caused by another application being dragged over. Other examples are incorrect font, wrong colors, scrolling, damaging the application's frame by dragging another window over it, and updating a damaged area.

    A quick test is the following: if the problem is reproducible on a different platform (for example, the problem was originally seen on Windows, and it is also present on Solaris OS or Linux), it is very likely to be a Swing PaintManager problem.

    For ways of changing Java 2D rendering pipelines with some flags, see Chapter 3, "Java 2D". This can also help in determining if the problem is related to Java 2D or to Swing.

    Multiscreen-related repainting issues belong to Java 2D (for example, repainting problems when moving a window from one screen to another, or other unusual behavior caused by interaction with a non-default screen device).

  • Issues related to desktop interaction indicate a problem in AWT. Some examples of such issues occur when moving, resizing, minimizing and maximizing windows, handling focus, enumerating multiple screens, using modality, interacting with the notification area (system tray), and viewing splash screens.

  • Drag-and-drop problems are related to AWT.

  • Printing problems could be related either to Java 2D or AWT depending on the API that is used.

  • Text-rendering issues in AWT applications might be a problem in font properties or in internationalization.

    However, if your application is purely AWT, text rendering problems might also be caused by Java 2D. On Solaris OS or Linux text rendering is performed by Java 2D.

    Text rendering in Swing is performed by Java 2D. Therefore, if your application uses Swing and you have text rendering problems (such as missing glyphs, incorrect rendering of glyphs, incorrect spacing between lines or characters, bad quality of font rendering), the problem is likely to be in Java 2D.

  • Painting problems are most likely a Swing issue.

  • Full-screen issues are related to the Java 2D API.

  • Encoding and locales issues (for example, no locale-specific characters displayed) indicate internalization problems.

Basic Tools

This section simply lists a few tools that can help in troubleshooting certain types of issues. For more information on these and other tools, see the Java SE HotSpot VM Troubleshooting Guide.

  • Performance: benchmarks, profilers, DTrace, Java probes.

  • Footprint: jhat, jmap, profilers.

  • Crashes: native debuggers.

  • Hangs: JConsole, jstack, Control+Break.

  • Font-rendering: Font2DTest (delivered with the JDK in demo/jfc/Font2DTest)

You can also debug JDK builds from dev.java.net for various issues.

Using JDWP

The Java Debugging Wire Protocol (JDWP) is very useful for debugging applications as well as applets.

To debug an application using JDWP:

  1. Open the command line and set the PATH environment variable to jdk/bin where jdk is the installation directory of the JDK.

  2. Use the following command to run the application (called Test in this example) which you want to debug:

    • On Windows:

      java -Xdebug -Xrunjdwp:transport=dt_shmem,address=debug,server=y,suspend=y Test

    • On Solaris OS and Linux:

      java -Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=y Test

    The Test class will start in the debugging mode and wait for a debugger to attach to it at address debug (on Windows) or 8888 (on Solaris OS and Linux).

  3. Open another command line and use the following command to run jdb and attach it to the running debug server:

    • On Windows:

      jdb -attach 'debug'

    • On Solaris OS and Linux:

      jdb -attach 8888

    After jdb initializes and attaches to Test, you can perform Java-level debugging.

  4. Set your breakpoints and run the application. For example, to set the breakpoint at the beginning of the main method in Test, run the following command:

    stop in Test.main run

    When the jdb utility hits the breakpoint, you will be able to inspect the environment in which the application is running and see if it is functioning as expected.

  5. (Optional) To perform native-level debugging along with Java-level debugging, use native debuggers to attach to the Java process running with JDWP.

    On Solaris OS, you can use the dbx utility and on Linux you can use the gdb utility.

    In Windows, you can use Visual Studio for native-level debugging as follows:

    1. Open Visual Studio.

    2. On the Debug menu, select Attach to Process. Select the Java process that is running with JDWP.

    3. On the Project menu, select Settings, and open the Debug tab. In the Category drop-down list, select Additional DLLs and add the native DLL that you want to debug (for example, Test.dll).

    4. Open the source file (one or more) of Test.dll and set your breakpoints.

    5. Type cont in the jdb window. The process will hit the breakpoint in Visual Studio.

To debug an applet using JDWP:

  1. Launch the Java Control Panel, open the Java tab and click View. On the Java Runtime Environment Settings window, specify the following in the Runtime Parameters field for the necessary platform:

    • On Windows:

      Djavaplugin.trace=true -Xdebug -Xrunjdwp:transport=dt_shmem,address=debug,server=y,suspend=y

    • On Solaris OS and Linux:

      Djavaplugin.trace=true -Xdebug -Xrunjdwp:transport=dt_shmem,address=8888,server=y,suspend=y

    When you launch a web browser and load an applet, the Java Plug-in will start in the debugging mode and wait for a debugger to attach to it at the address debug (on Windows) or 8888 (on Solaris OS and Linux).

  2. Open the command line and use the following command to run jdb and attach it to the running debug server.

    • On Windows:

      jdb -attach 'debug'

    • On Solaris OS and Linux:

      jdb -attach 8888

    After jdb initializes and attaches to Test, you can perform Java-level debugging.

  3. Set your breakpoints and run the applet. For example, to set the breakpoint at the beginning of the func1 method in MyApplet, run the following command:

    stop in MyApplet.func1 run

    When the jdb utility hits the breakpoint, you will be able to inspect the environment in which the application is running and see if it is functioning as expected.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

3 Java 2D

This chapter provides information and guidance for troubleshooting some of the most common issues that might be found in the Java 2D API.

This chapter contains the following sections:

  • "Changing Rendering Pipelines and Their Properties"

  • "Generic Performance Issues"

  • "Text-Related Issues"

  • "Java 2D Printing"

For a summary of Java 2D properties, see Appendix A, "Java 2D Properties".

See also the Java 2D FAQ.

Changing Rendering Pipelines and Their Properties

Java 2D uses a set of pipelines, which can be roughly defined as different ways of rendering the primitives. These pipelines are as follows:

  • X11 pipeline, which is the default for Solaris OS and Linux

  • OpenGL pipeline, which is an alternative on Solaris OS and Linux, as well as Windows

  • DirectDraw/GDI pipeline, which is the default on Windows

  • Direct3D pipeline, which is an alternative on Windows

By choosing a different pipeline, or manipulating the properties of a pipeline, you might be able to determine the cause of the problem, and often find a workaround.

The following procedure can help you troubleshoot Java 2D issues:

  1. Determine the default pipeline used in your configuration.

  2. Either change the pipeline to another one, or modify the properties of the default pipeline.

  3. If the problem disappears, you have found a workaround.

  4. If the problem persists, try changing another property or pipeline.

This section describes how to change the Java 2D pipelines and their properties for each operating system: UNIX (Solaris OS and Linux), and Windows.

For the default X11 pipeline on Solaris OS and Linux, the following information is provided:

  • Properties related to the use of X11 pixmaps

    • Disabling the use of pixmaps by the X11 pipeline

    • Disabling/forcing the use of shared memory pixmaps by the X11 pipeline

  • Use of Shared Memory Extension by the X11 pipeline

    • Increasing the amount of shared memory available to X server and Java 2D

    • Disabling the use of Shared Memory Extension by the X11 pipeline

  • Solaris OS on SPARC: use of DGA in certain configurations

    • Detecting if the DGA extension is used for rendering to the screen

    • Typical issues caused by the use of DGA

    • Controlling the use of DGA by Java 2D

  • Solaris OS on SPARC: changing the default visual used by Java 2D

For the default DirectDraw/GDI pipeline on Windows, the following information is provided:

  • Disabling the use of DirectDraw

  • Forcing the use of DirectDraw pipeline

  • Disabling the built-in punting mechanism

  • Disabling the use of DirectDraw blit operations

For the alternative Direct3D pipeline on Windows, the following information is provided:

  • Disabling the Direct3D pipeline

  • Forcing the use of the Direct3D pipeline

  • Diagnosing rendering problems with the Direct3D pipeline

This section also provides information on using the OpenGL pipeline as an alternative pipeline on Solaris OS, Linux, and Windows.

Solaris OS and Linux: Using Default X11 Pipeline

On Unix platforms the default pipeline is the X11 pipeline. This pipeline uses the X protocol for rendering to the screen or to certain types of offscreen images, such as VolatileImages, or "compatible" images (images that are created with the GraphicsConfiguration.createCompatibleImage() method). Such types of images can be put into X11 pixmaps for improved performance, especially in the case of the Remote X server.

In addition, in certain cases Java 2D uses X server extensions, for example, the MIT X shared memory extension, or Direct Graphics Access extension, Double-buffer extension for double-buffering when using the BufferStrategy API.

An additional pipeline, the OpenGL pipeline, might offer greater performance in some configurations.

Properties Related to the Use of X11 Pixmaps

Java 2D by default uses X11 pixmaps for storing or caching certain types of offscreen images. Only the following types of images can be stored in pixmaps:

  • Opaque images, in which case ColorModel.getTransparency() returns Transparency.OPAQUE

  • 1-bit transparent images (also known as sprites, Transparency.BITMASK)

The advantage of using pixmaps for storing images is that they can be put into the framebuffer's Video memory at the driver's discretion, which improves the speed at which these pixmaps can be copied to the screen or another pixmap.

The use of pixmaps typically results in better performance. However, in certain cases, the opposite is true. Such cases typically involve the use of operations which cannot be performed using the X protocol, such as antialiasing, alpha compositing, and transforms that are more complex than simple translation transforms.

For these operations the X11 pipeline must do the rendering using the built-in software renderer. In most cases this includes reading the contents of the pixmap to a system memory (over the network in the case of remote X server), performing the rendering, and then sending the pixels back to the pixmap. Such operations could result in extremely poor performance, especially if the X server is remote.

Disabling the Use of Pixmaps by the X11 Pipeline

To disable the use of pixmaps by Java2D, pass the following property to the Java VM: -Dsun.java2d.pmoffscreen=false.

Disabling/Forcing the Use of Shared Memory Pixmaps by the X11 Pipeline

To minimize the effect of such operations requiring reading of pixels from a pixmap on overall performance, the X11 pipeline uses shared memory pixmaps for storing images which are often read from. Note that the shared memory pixmaps can only be used in the case of a local X server.

The advantage of using shared memory pixmaps is that the pipeline can get direct access to the pixels in the pipeline bypassing the X11 protocol, which results in better performance.

By default an image is stored in a normal X server pixmap, but it can be later moved to a shared memory pixmap if the pipeline detects excessive reading from such an image. The image can be moved back to a server pixmap if it is copied from often enough.

The pipeline allows two ways of controlling the use of shared memory pixmaps: either disabling them, or forcing all images to be always stored in shared memory pixmaps.

  • To disable shared memory pixmaps, set the J2D_PIXMAPS environment variable to server. This is the default in remote X server case.

  • To force all pixmaps to be created in shared memory, set J2D_PIXMAPS to shared.

First try forcing the shared memory pixmaps, as it often improves performance. However, with certain video board/driver configurations it may be necessary to disable the shared memory pixmaps to avoid rendering artifacts or crashes.

Use of MIT Shared Memory Extension by the X11 Pipeline

By default, the Java 2D X11 pipeline uses the MIT Shared Memory Extension (MIT SHM). This extension allows a faster exchange of data between the client (the Java application) and the X server, and this can significantly improve the performance of Java applications.

Increasing Shared Memory Available to X Server and Java 2D

On Solaris OS releases 8 and earlier it was sometimes necessary to increase the amount of shared memory available to the system (and to X server in particular) as the default was too low, resulting in poor rendering performance. Increasing the amount of shared memory and shared memory segments can result in better performance.

To change the default settings on Solaris OS, edit the /etc/system file, changing the shmsys:shminfo_* settings, as in the following example. Note that this is not needed on Solaris 9 OS and newer.

set shmsys:shminfo_shmmax=10000000
set shmsys:shminfo_shmni=200
set shmsys:shminfo_shminfo=150

On Linux this setting can be configured by editing the /proc/sys/kernel/shm* files.

Disabling Use of Shared Memory Extension by the X11 Pipeline

In case of problems (such as crashes, or rendering artifacts) with older X servers and Shared Memory Extension, it is useful to be able to disable the extension. To disable the use of MIT SHM, set the J2D_USE_MITSHM environment variable to false.

Solaris OS on SPARC: Use of DGA in Certain Configurations

On SPARC hardware, if the framebuffer supports Sun's DGA (Direct Graphics Access) X server extension, and Java 2D has a corresponding module for accessing the framebuffer, DGA will be used for rendering to the screen.

All offscreen images will reside in Java heap memory, and Java 2D's software-only rendering pipeline is used for rendering to them. This is different from a typical UNIX configuration, where X11 pixmaps are used for offscreen images.

Detecting Use of DGA Extension for Rendering to Screen

To detect if the DGA extension is used for rendering to the screen, run any Java application which does some rendering or displays a GUI, and check if a /tmp/wg* file was created when the application started. Exit the application and verify that the file has been deleted. If this is the case, then on this system Java 2D is using DGA.

Typical Issues Caused by Use of DGA

Since DGA allows direct access to the framebuffer's video memory, the typical problems include corruption outside of window bounds, complete system, and X server lock-ups.

Controlling Use of DGA by Java 2D

If it is determined that DGA is being used, the first thing to try is to disable it. This can be done by setting the NO_J2D_DGA environment variable to true. This forces the default UNIX path to use only X11 for rendering to the screen, and pixmaps for accelerating offscreen images.

In some cases it could be beneficial to enable the use of pixmaps, while also using DGA for rendering to the screen. To force the use of pixmaps for accelerating offscreen images, set the following property when starting the application: -Dsun.java2d.pmoffscreen=true.

Solaris OS on SPARC: Changing Default Visual Used by Java 2D

On certain video boards on the SPARC platform, more than one visual can be available from the X server. By default Java 2D tries to select the best visual, where "best" is typically a higher-bit depth visual. For example, on some Solaris OS releases the default X11 visual is 8-bit PseudoColor, although 24-bit visual is also available. In such cases Java 2D will select a 24-bit TrueColor visual as the default for Java windows.

While it is possible to create a Java top-level window with a GraphicsConfiguration object corresponding to a different visual, in some cases it is necessary to make Java use a different default visual instead. This can be done by setting the FORCEDEFVIS environment variable. It can be set to true to force the use of the default X server visual (even if it is not the best one), or it can be set to a hexadecimal number corresponding to the visual ID as reported by tools like xdpyinfo.

To determine your X server default visual, execute the xdpyinfo command and look at the default visual id field.

Windows OS: Using Default DirectDraw/GDI Pipeline

The default pipeline on the Windows platform is a mixture of the DirectDraw pipeline and the GDI pipeline, where some operations are performed with the DirectDraw pipeline and others with the GDI pipeline. DirectDraw and GDI APIs are used for rendering to accelerated offscreen and onscreen surfaces.

Starting with the Java SE 6 release, when the application enters full-screen mode, the new Direct3D pipeline can be used, if the drivers satisfy the requirements. Possible issues with the Direct3D pipeline include rendering artifacts, crashes, and performance-related problems.

An additional pipeline, the OpenGL pipeline, might offer greater performance in some configurations.

Disabling the Use of DirectDraw

When DirectDraw is disabled, all operations are performed with GDI. Provide the following flag to disable the use of DirectDraw: -Dsun.java2d.noddraw=true. In this case all offscreen images will be created in the Java heap, and rendered to with the default software pipeline. All onscreen rendering, as well as copies of offscreen images to the screen will be performed using GDI.

Forcing the Use of DirectDraw Pipeline

In case the pipeline was disabled by default for some reason, it can be enabled by providing the -Dsun.java2d.noddraw=false flag to the VM.

However, typically there was a reason why it was disabled in the first place, so it is better not to force it.

Disabling the Built-in Punting Mechanism

In general, the DirectDraw pipeline attempts to place the offscreen surfaces in the framebuffer's video memory, which provides fast copies from these surfaces to the screen or other accelerated surfaces, as well as hardware accelerated rendering of certain graphics operations.

However, if the pipeline cannot perform an operation using the DirectDraw API (operations using, for example, alpha compositing, or transforms, or antialiasing), the rendering is performed using the software pipeline. In some cases this means that the pixels of the destination surface, which resides in VRAM, need to be read into system memory, which is a very expensive operation.

To limit the impact of unaccelerated rendering to VRAM-based surfaces, there exists a punting mechanism, which moves the surface which is detected to be often read from to the system memory. If the surface is found to be copied from often enough, it may be promoted back to the video memory.

On certain video boards/drivers combinations the system-memory based DirectDraw surfaces are known to cause rendering artifacts and other issues. The DirectDraw pipeline provides a way to disable the punting mechanism so that the system memory surfaces are not used.

To defeat the built-in surface punting mechanism provide the following flag to the Java VM: -Dsun.java2d.ddforcevram=true.

Note:

This can result in performance degradation, as the software loops may be reading pixels from VRAM on each operation. In this case you may consider disabling the DirectDraw pipeline (see above).

Disabling the DirectDraw Blit Operations

In a blit operation (Bit Block Transfer), two bitmap patterns are combined. This operation basically corresponds to a call to the Graphics.drawImage() API.

In some cases it is possible to avoid rendering problems by disabling the DirectDraw blit operations. GDI blits will be used instead. Note that this might result in bad performance. Consider disabling the DirectDraw pipeline instead.

To disable the use of DirectDraw blit operations, pass the parameter -Dsun.java2d.ddblit=false to the Java VM.

Windows OS: Using Direct3D Pipeline (Full-Screen Mode)

Starting with the Java SE 6 release, the Direct3D pipeline uses the Direct3D API for rendering. This pipeline is enabled in full-screen mode by default, if the drivers support the required features and the level of rendering quality.

With both the Java SE 5 and later releases, it is possible to enable the Direct3D pipeline or to force its use, as described in the subsections below.

Consider enabling the Direct3D pipeline for your application if it makes heavy use of rendering operations such as alpha compositing, antialiasing, and transforms.

However, use caution when deciding to enable this pipeline in your application. For example, some built-in video chipsets (which are used in most notebooks) do not perform well using Direct3D, even if they satisfy the quality requirements for Java 2D pipelines.

Disabling the Direct3D Pipeline

Some older video boards/drivers combinations are known to cause issues (both rendering and performance) with the Direct3D pipeline. To disable the pipeline in such cases, with Java SE 5 and later releases, pass the parameter -Dsun.java2d.d3d=false to the Java VM, or set the J2D_D3D environment variable to false.

Forcing the Use of the Direct3D Pipeline

With Java SE 5 and later releases, to enable the Direct3D pipeline in both windowed and full-screen mode, use the parameter -Dsun.java2d.d3d=true, or set the J2D_D3D environment variable to true. Note that the pipeline is enabled only if the drivers support minimum required features.

Diagnosing Rendering Problems with Direct3D Pipeline

With the Java SE 6 release, some rendering issues (like missing pixels, garbled rendering) can be diagnosed by forcing different Direct3D rasterizers. Set the J2D_D3D_RASTERIZER environment variable to one of the following: ref, rgb, hal, or tnl.

Refer to Direct3D documentation for a description of these rasterizers. By default the best rasterizer is chosen based on its advertised capabilities. In particular, the ref rasterizer forces the use of the reference Direct3D rasterizer from Microsoft. If a rendering problem is not reproducible with this rasterizer, then it is very likely to be a video driver bug.

The rgb rasterizer is available only if the Direct3D SDK is installed. This SDK can be obtained from Microsoft Game Technologies Center.

For performance or quality problems with text rendering with the Direct3D pipeline, you can force the use of ARGB texture instead of the default Alpha texture for the Direct3D pipeline's glyph cache. To do this, set the J2D_D3D_NOALPHATEXTURE environment variable to true.

Using OpenGL Pipeline (Solaris OS, Linux, and Windows)

The OpenGL pipeline was first made available in the J2SE 5.0 release on Solaris OS, Linux, and Windows. This alternate pipeline uses the hardware-accelerated, cross-platform OpenGL API when rendering to VolatileImages, to backbuffers created with BufferStrategy API, and to the screen.

This pipeline can offer great performance advantages over the default (X11 or GDI/DirectDraw) pipelines for certain applications. Consider enabling the pipeline for your application if it makes heavy use of rendering operations like alpha compositing, antialiasing, and transforms.

For a complete list of Java 2D operations that are accelerated by the OpenGL pipeline, refer to the article Behind the Graphics2D: The OpenGL-based Pipeline.

Enabling the OpenGL Pipeline

The OpenGL pipeline is currently disabled by default. To attempt to enable the OpenGL pipeline, provide the following option to the JVM:

-Dsun.java2d.opengl=true

To receive verbose console output about whether the OpenGL pipeline is initialized successfully for a particular screen, set the option to True (note the uppercase "T"):

-Dsun.java2d.opengl=True

Minimum Requirements

The OpenGL pipeline will not be enabled if the hardware or drivers do not meet the minimum requirements. If for some reason one of the following requirements is not met, Java 2D will fall back and use the default pipeline (X11 on Solaris/Linux, GDI/DirectDraw on Windows), which means your application will continue to work correctly, but without the OpenGL acceleration.

The minimum requirements for Solaris OS and Linux are the following:

  • Hardware accelerated OpenGL/GLX libraries installed and configured properly

  • OpenGL version 1.2 or higher

  • GLX version 1.3 or higher

  • At least one TrueColor visual with an available depth buffer

The minimum requirements for Windows OS are the following:

  • Hardware accelerated drivers supporting the extensions WGL_ARB_pbuffer, WGL_ARB_render_texture, and WGL_ARB_pixel_format

  • OpenGL version 1.2 or higher

  • At least one pixel format with an available depth buffer

Latest OpenGL Drivers

Since the OpenGL pipeline relies heavily on the OpenGL API and the underlying graphics hardware and drivers, it is very important to ensure that you have the latest graphics drivers installed on your machine. Drivers can be downloaded from your graphics card manufacturer's web site, as shown in the following table.

Manufacturer | Web SIte | Platforms | Cards Known to Work
ATI | http://ati.com | Linux, Windows | Radeon 8500 and above, FireGL series
Nvidia | http://nvidia.com | Solaris OS on x64, Linux, Windows | GeForce 2 series and above, Quadro FX series and above
Sun | http://sun.com | Solaris OS on SPARC | Expert3D series, XVR-500, XVR-600, XVR-1200, XVR-2500
Xi Graphics | http://xig.com | Solaris OS on x86, Linux | Various (check with Xi Graphics)

Diagnosing Startup Issues

As mentioned above, the OpenGL pipeline might not be enabled on certain machines for various reasons. For example, the drivers might not be properly installed and might report an insufficient version number. Alternatively, your machine might have an older graphics card that does not support the appropriate OpenGL version or extensions.

In the Java SE 6 and later releases, you can get detailed information about the startup procedures of the OpenGL-based Java 2D pipeline by using the J2D_TRACE_LEVEL environment variable as follows.

On Windows:

# set J2D_TRACE_LEVEL=4
# java -Dsun.java2d.opengl=True YourApp

On Solaris OS and Linux:

# export J2D_TRACE_LEVEL=4
# java -Dsun.java2d.opengl=True YourApp

The output will be different depending on your platform and the installed graphics hardware, but it can give you some insight into the reasons why the OpenGL pipeline is not being successfully enabled for your configuration.

Note:

This output is especially useful when filing bug reports intended for the Java 2D team at Sun, as discussed below.

Diagnosing Rendering and Performance Issues

Since the OpenGL pipeline relies so heavily on the underlying graphics hardware and drivers, it might sometimes be difficult to determine whether rendering or performance issues are being caused by Java 2D or by the OpenGL drivers.

One feature new to the OpenGL pipeline in the Java SE 6 release is the use of the GL_EXT_framebuffer_object extension, which provides better performance for rendering and reduced VRAM consumption when using VolatileImages. This "FBO" codepath is enabled by default when the OpenGL pipeline is enabled, but only if your graphics hardware and driver support this OpenGL extension. This extension is generally available on Nvidia GeForce/Quadro FX series and newer, and on ATI Radeon 9500 and newer. If you suspect that the "FBO" codepath is causing problems in your application, you can disable it by setting the following system property:

-Dsun.java2d.opengl.fbobject=false

Setting this property will cause Java 2D to fall back on the older "pbuffer-based" codepath.

If you find that a certain Java 2D operation causes different visual results with the OpenGL pipeline enabled than without, it probably indicates a graphics driver bug. Similarly, if the performance of Java 2D rendering is significantly worse with the OpenGL pipeline enabled than without, it is most likely caused by a driver or hardware problem.

In either case, file a detailed bug report through the normal bug reporting channels (see "Submitting Bug Reports"). When filing bug reports, be as detailed as possible, and always include the following information:

  • Operating system (for example, Ubuntu Linux 6.06, Windows XP SP2)

  • Name of graphics hardware manufacturer and device (for example, Nvidia GeForce 2 MX 440)

  • Exact driver version (for example, ATI Catalyst 6.8, Nvidia 91.33)

  • Output when J2D_TRACE_LEVEL=4 is specified on the command line (as described in previous section)

  • If on Solaris OS or Linux, the output of the glxinfo command

Generic Performance Issues

This section contains the following subsections:

  • "Hardware Accelerated Rendering Primitives"

  • "Using Java 2D Primitive Tracing to Detect and Avoid Non-accelerated Rendering"

  • "Causes of Poor Rendering Performance"

  • "Improving Performance of Software-only Rendering"

Hardware Accelerated Rendering Primitives

In order to better understand what could be causing performance problems, take a look at what hardware acceleration means.

In general, hardware accelerated rendering could be divided into two categories.

  • Hardware-accelerated rendering to an "accelerated" destination. Examples of rendering destinations which can be hardware-accelerated are VolatileImage, screen, and BufferStrategy. If a destination is accelerated, rendering which goes to such surface may be performed by video hardware. So if you issue a drawRect call, Java 2D redirects this call to the underlying native API (such as GDI, DirectDraw, Direct3D or OpenGL, or X11), which performs the operation using hardware.

  • Caching images in accelerated memory (Video memory or pixmaps) so that they can be copied very fast to another accelerated surface. Such images are known as "managed images."

Ideally, all operations performed to an accelerated surface are hardware-accelerated. In this case the application takes the full advantage that is offered by the platform.

Unfortunately in many cases the default pipelines are not able to use the hardware for rendering. This can happen due to the pipeline limitations, or the underlying native API. For example, most X servers do not support rendering antialiased primitives, or alpha compositing.

One cause of performance issues is when operations performed are not hardware-accelerated. Even in cases when a destination surface is accelerated, some primitives may not be.

It is important to know how to detect the cases when hardware acceleration is not being used. Knowing this may help in improving performance.

Using Java 2D Primitive Tracing to Detect and Avoid Non-accelerated Rendering

To detect a non-accelerated rendering, you can use Java 2D primitive tracing.

Java 2D has built-in primitive tracing. See the description of the trace property at System Properties for Java 2D Technology.

Run your application with -Dsun.java2d.trace=count. When the application exits, a list of primitives and their counts is printed to the console.

Any time you see a MaskBlit or any of the General* primitives, it typically means that some of your rendering is going through software loops. Here is the output from performing drawImage on a translucent BufferedImage to a VolatileImage on Linux:

sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, "Integer BGR Pixmap")sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntBgr)

Here are some of the common non-accelerated primitives in the default pipelines, and their signatures in the tracing output. Note that most of this tracing was taken on Linux; you may see some differences depending on your platform and configuration.

  • Translucent images (Images with ColorModel.getTranslucency() returns Translucency.TRANSLUCENT), or with AlphaCompositing. Sample primitive tracing output:

    sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb,SrcOverNoEa, "Integer BGR Pixmap")sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntBgr)

  • Use of antialiasing (by setting the antialiasing hint). Sample primitive tracing output:

    sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntBgr)

  • Rendering antialiased text (setting the text antialising hint). Sample output can be one of the following:

    • sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(OpaqueColor, SrcNoEa, AnyInt)

    • sun.java2d.loops.DrawGlyphListLCD::DrawGlyphListLCD(AnyColor, SrcNoEa, IntBgr)

  • Alpha compositing, either by rendering with translucent Color (a Color with alpha value which is not 0xff), or by setting a non-default AlphaCompositing mode with Graphics2D.setComposite():

    sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOver, IntRgb)sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)

  • Non-trivial transforms (if the transform is more than only translation). Rendering a transformed opaque image to a VolatileImage:

    sun.java2d.loops.TransformHelper::TransformHelper(IntBgr, SrcNoEa, IntArgbPre)

  • Rendering a rotated line:

    sun.java2d.loops.DrawPath::DrawPath(AnyColor, SrcNoEa, AnyInt)

Run your application with the tracing and make sure you do not use unaccelerated primitives unless they are needed.

Causes of Poor Rendering Performance

Some of the possible causes of poor rendering performance are described in the following subsections:

  • "Mixing Accelerated and Non-accelerated Rendering"

  • "Using Non-optimal Rendering Primitives"

  • "Using Heap-based Destination Surface (a BufferedImage)"

  • "Defeating Built-in Acceleration Mechanisms"

Mixing Accelerated and Non-accelerated Rendering

A situation when only part of the primitives rendered by an application could be accelerated by the particular pipeline when rendering to an accelerated surface can cause thrashing, because the pipelines will be constantly trying to adjust for better rendering performance but with possibly little success.

If it is known beforehand that most of the rendering primitives will not be accelerated, it could be better to either render to a BufferedImage and then copy it to the back-buffer or the screen, or switch to a non-hardware accelerated pipeline using one of the flags discussed above.

Note:

This approach may limit your application's ability to take advantage of future improvements in Java 2D's use of hardware acceleration.

For example, if your application is often used in remote X server cases, but it heavily uses antialiasing, alpha compositing, and so forth, the performance can be severely degraded. To avoid this, disable the use of Pixmaps by setting the -Dsun.java2d.pmoffscreen=false property either by passing it to the Java runtime, or by setting it programmatically using the System.setProperty() API. Note that this property must be set prior to any GUI-related operations because it is read only once.

Using Non-optimal Rendering Primitives

It is preferable to use the simplest primitive possible to achieve the desired visual effect.

For example, use Graphics.drawLine() instead of new Line2D().draw(). The result looks the same. However, the second operation is much more computationally-intensive because it is rendered as a generic shape, which is typically much more expensive to render. Shapes show up in different ways in the primitive tracing, depending on antialiasing settings and the specific pipeline, but most likely they will show up as many *FillSpans or DrawPath primitives.

Another example of complicated attributes is GradientPaint. Although it may be hardware accelerated by some of the non-default pipelines (such as OpenGL), it is not hardware accelerated by the default pipelines. Therefore, you can restrict the use of GradientPaint if it causes performance problems.

Using Heap-based Destination Surface (a BufferedImage)

Rendering to a BufferedImage almost always uses software loops.

An exception is that on some SPARC systems the VIS instruction set may be used for accelerating certain imaging operations. Refer to web site for the VIS Instruction Set.

To ensure that the rendering has the opportunity of being hardware accelerated, choose a BufferStrategy or a VolatileImage object as the rendering destination.

Defeating Built-in Acceleration Mechanisms

Java 2D attempts to accelerate certain types of images. Contents of images may be cached in video memory for faster copying to accelerated destinations such as VolatileImages. These mechanisms can be unknowingly defeated by the application, for example, in the following cases:

  • Getting Direct Access to the Pixels with getDataBuffer()

  • Rendering to a Sprite Before Every Copy

  • Exhausting Accelerated Memory Resources

Getting Direct Access to the Pixels with getDataBuffer()

If an application gets access to BufferedImage pixels by using the getRaster().getDataBuffer() API, Java 2D will not be able to guarantee that the data in the cache is up to date, so it will disable any acceleration attempts of such image.

There are two ways to avoid this problem:

  • If possible, do not call getDataBuffer(). Instead, work with WriteableRaster, which can be obtained with the BufferedImage.getRaster() method.

  • If you do need to modify the pixels directly, you can manually cache your image in video memory by maintaining the cached copy of your image in a VolatileImage, and updating the cached data when the original image is touched.

Rendering to a Sprite Before Every Copy

If an application renders to an image every time before copying it to an accelerated surface (VolatileImage, BufferStrategy), the image cannot take advantage of being cached in accelerated memory. This is because the cached copy has to be updated every time the original image is updated, and therefore only the default system-memory based surface is used, and this means no acceleration.

Exhausting Accelerated Memory Resources

If the application uses many images, it may exhaust the available accelerated memory. If this is indeed the cause of performance issues for your application, you might need to handle the resources.

The following API can be used to request the amount of available accelerated memory: GraphicsDevice.getAvailableAcceleratedMemory().

In addition, the following API can be used to determine if your image is being accelerated: Image.getCapabilities().

If you determined that your application is exhausting the resources, you can handle the problem in the following ways:

  • Do not hold images you no longer need. For example, if your game advanced to the next level, release all images from the previous levels. You can also release accelerated resources associated with an image by using the Image.flush() API.

  • Use the acceleration priority API Image.getAccelerationPriority() and setAccelerationPriority() to specify the acceleration priority for your images. It is a good idea to make sure that at least your back-buffer is accelerated, so create it first, and with acceleration priority of 1 (default). You can also prohibit certain images from being accelerated if needed by setting the acceleration priority to 0.0.

Improving Performance of Software-only Rendering

If your application relies on software-only rendering (by only rendering to a BufferedImage, or changing the default pipeline to an unaccelerated one), or even if it does mixed rendering, there are certain approaches to improving performance:

  • "Use of Image Types or Operations With Optimized Support"

  • "Transparency vs Translucency"

Use of Image Types or Operations With Optimized Support

Due to overall platform size constraints, Java 2D has a limited number of optimized routines for converting from one image format to another. In situations where an optimized direct loop can not be found, Java 2D will do the conversion through an intermediate image format (IntArgb). This results in performance degradation.

Java 2D primitive tracing can be used for detecting such situations.

For each drawImage call there will be two primitives: the first one converting the image from the source format to an intermediate IntArgb format and the second one converting from intermediate IntArgb to the destination format.

Here are two ways to avoid such situations:

  • Use a different image format if possible.

  • Convert your image to an intermediate image of one of the better-supported formats, such as INT_RGB or INT_ARGB. In this way the conversion from the custom image format will happen only once instead of on every copy.

Transparency vs Translucency

Consider using 1-bit transparent (BITMASK) images for your sprites as opposed to images with full translucency (such as INT_ARGB) if possible.

Processing images with full alpha is more CPU-intensive.

You can get a 1-bit transparent image using a call to GraphicsConfiguration.createCompatibleImage(w,h, Transparency.BITMASK).

Text-Related Issues

This section describes some issues that can be related to text rendering, included in the following subsections:

  • "Application Crash During Text Rendering"

  • "Differences in Text Appearance"

  • "Metrics"

Application Crash During Text Rendering

If an application crashes during text rendering, first check the fatal error log file. See "Fatal Error Log" for detailed information about this error log file. If the crash occurred in fontmanager.dll or if fontmanager is present in the stack, then the crash occurred in the font processing code. Here is an example of typical native stack frames (excerpt from the full log file).

Stack: [0x008a0000,0x008f0000),  sp=0x008ef52c,  free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ntdll.dll+0x1888f]
C  [ntdll.dll+0x18238]
C  [ntdll.dll+0x11c76]
C  [MSVCR71.dll+0x16b3]
C  [MSVCR71.dll+0x16db]
C  [fontmanager.dll+0x21f9a]
C  [fontmanager.dll+0x22876]
C  [fontmanager.dll+0x1de40]
C  [fontmanager.dll+0x1da94]
C  [fontmanager.dll+0x48abb]
j  sun.font.FileFont.getGlyphImage(JI)J+0
j  sun.font.FileFontStrike.getGlyphImagePtrs([I[JI)V+92
j  sun.font.GlyphList.mapChars(Lsun/java2d/loops/FontInfo;I)Z+37
j  sun.font.GlyphList.setFromString(Lsun/java2d/loops/FontInfo;Ljava/lang/String;FF)Z+71
j  sun.java2d.pipe.GlyphListPipe.drawString(Lsun/java2d/SunGraphics2D;Ljava/lang/String;DD)V+148
j  sun.java2d.SunGraphics2D.drawString(Ljava/lang/String;II)V+60
j  FontCrasher.tryFont(Ljava/lang/String;)V+138
j  FontCrasher.main([Ljava/lang/String;)V+20
v  ~StubRoutines::call_stub

In this case, a particular font is probably the problem. If so, then removing this font from the system will likely resolve the problem.

To identify the font file, execute the application with -Dsun.java2d.debugfonts=true. The font that is mentioned last is usually the one that is causing problems. Here is an example of typical output.

INFO: Registered file C:\WINDOWS\Fonts\WINGDING.TTF as font ** TrueType Font: Family=Wingdings
 Name=Wingdings style=0 fileName=C:\WINDOWS\Fonts\WINGDING.TTF rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file SYMBOL.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager addToFontList
INFO: Add to Family Symbol, Font Symbol rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager registerFontFile
INFO: Registered file C:\WINDOWS\Fonts\SYMBOL.TTF as font ** TrueType Font: Family=Symbol
 Name=Symbol style=0 fileName=C:\WINDOWS\Fonts\SYMBOL.TTF rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager findFont2D
INFO: Search for font: Dialog
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file ARIALBD.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager addToFontList
INFO: Add to Family Arial, Font Arial Bold rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager registerFontFile
INFO: Registered file C:\WINDOWS\Fonts\ARIALBD.TTF as font ** TrueType Font: Family=Arial
 Name=Arial Bold style=1 fileName=C:\WINDOWS\Fonts\ARIALBD.TTF rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file WINGDING.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file SYMBOL.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager findFont2D
INFO: Search for font: Dialog
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file ARIAL.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager addToFontList
INFO: Add to Family Arial, Font Arial rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager registerFontFile
INFO: Registered file C:\WINDOWS\Fonts\ARIAL.TTF as font ** TrueType Font: Family=Arial
 Name=Arial style=0 fileName=C:\WINDOWS\Fonts\ARIAL.TTF rank=2
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file WINGDING.TTF
Aug 16, 2006 10:59:06 PM sun.font.FontManager initialiseDeferredFont
INFO: Opening deferred font file SYMBOL.TTF

Note:

In some cases the font that is last mentioned might be in fact innocent. Font names are printed when they are first used and subsequent uses are not shown.

To verify that this particular font is causing the problem, you can temporarily remove it from your system. You can easily find the file name associated with this particular family name from the above output.

Another verification approach is to use the Font2DTest tool (demo/jfc/Font2DTest) to test fonts that you suspect. You can specify a particular font size, style, and rasterization mode. If the process of viewing a particular font with Font2DTest causes the JDK to crash, then it is very likely that it is the font that is causing the problems.

If you found a font causing the JDK to crash, it is very important to report this problem, including the particular font and the operating system, at bugs.sun.com. See "Submitting Bug Reports" for more information about reporting bugs.

Differences in Text Appearance

Java has its own font rasterizer, and you can expect some small differences between the appearance of text in a Java application and in a native application.

One of the most typical sources of these differences is that the antialiasing settings can be different. In particular, a Swing application sometimes ignores the Linux desktop font antialiasing settings.

There are several likely reasons for this behavior:

  • Over remote X11 antialiasing is not enabled by default for performance reasons. For information about how to force antialiasing, see the Font and Test questions in the Java 2D FAQ.

  • CJK fonts that use embedded bitmaps may render using the bitmaps instead of subpixel text.

  • Some variants of unsupported desktops do not report their font smoothing settings properly. For example, KDE is unsupported but should generally work; however, some problem seems to prevent JDK from picking up the setting.

The best way to ensure that the configuration is what you expect is to run Font2DTest, explicitly select the font used by the native application, and set other parameters as appropriate. Here is a sample screen from the Font2DTest tool.

Figure 3-1 Sample Screen from Font2DTest Tool

Description of Figure 3-1 follows
Description of "Figure 3-1 Sample Screen from Font2DTest Tool"

Tip:

You can input your own string by choosing User Text in the drop-down list labeled Text to use.

The size of the font in the Java language is always expressed with 72 dpi. A native OS can use a different screen dpi, and therefore an adjustment needs to be made. Matching Java font size can be calculated as Toolkit.getScreenResolution() divided by 72 multiplied by the size of the native font.

In all "native" Swing look and feels, such as the Windows look and feel or the GTK look and feel (for Solaris OS and Linux), Swing components perform this adjustment automatically, but if you are running Font2DTest, the text display area will always use 72 dpi.

On operating systems other than Windows, the general recommendation is to use TrueType fonts instead of Type1 fonts. The easiest way to discover the type of font is to look at the file extension: extensions pfa and pfb indicate Type1 fonts, and ttf, ttc, and tte represent TrueType fonts.

Metrics

If you find that text bounds are different from what you expect, ensure that you are using the appropriate way to calculate them. For example, the height obtained from a FontMetrics is not specific to a particular piece of text and the stringWidth indicates logical advance, which is not the same thing as "width." For more details, refer to the Font and Text questions in the Java 2D FAQ.

Java 2D Printing

This section describes some issues that can arise with Java 2D printing and suggests causes and solutions.

See also the Printing questions in the Java 2D FAQ.

Issue 1On Windows, JRE crashes during printing.

Cause: The JRE uses Windows printer drivers and they might have problems.

Solution: Upgrade the Windows printer driver for the printer that is being used.

Issue 2On Windows, the printing seems to be successful, but the job does not print.

Cause: Some jobs fail to properly spool to the printer.

Solution: In the printer driver properties, disable Advanced Printing Options.

Issue 3On Windows, the print dialog takes a long time to appear.

Cause: Applications might cause the JRE to probe all printers, including those that are disconnected.

Solution: Look for disconnected or unreachable network printers and remove them from the list of printers.

Issue 4On Solaris OS and Linux, PrinterJob.printDialog() shows the error "No services found".

Cause: The cause is one of the following:

  • The lpc utility is not in the /usr/sbin directory.

  • The lpstat utility is not in the /usr/sbin directory.

Solution: Install lpc and lpstat in the standard location, as mentioned above.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java 2D Properties

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

A Java 2D Properties

This appendix presents properties that can be useful in troubleshooting Java 2D.

This appendix contains the following sections:

  • "Properties on Solaris OS and Linux"

  • "Properties on Windows"

Properties on Solaris OS and Linux

The following table describes the default values of some useful properties on Solaris OS and Linux platforms.

Table A-1 Default Java 2D Properties on Solaris OS and Linux

Setup | DGA | SHM | Pixmaps | OnScreen | OffScreen
Solaris SPARC with DGA support | On | On | Off | DGA/Software | Software
Solaris SPARC with no DGA, Solaris x86, Linux, SunRay, VNC | Off | On | On | X11/MITSHM | Shared/Server Pixmaps
J2SE 1.4 or greater: Remote X server, ssh | Off | Off | On | X11 | Server Pixmaps
J2SE 1.3.1 or less: Remote X server, ssh | Off | Off | Off | X11 | Software

The following list explains how to change the defaults.

  • The X11 pipeline is the default pipeline for Solaris OS and Linux. Change this default as follows:

    • -Dsun.java2d.opengl=true Attempt to enable the OpenGL pipeline.

  • The use of DGA is controlled as follows:

    • NO_J2D_DGA unset Use DGA, if available.

    • NO_J2D_DGA set Disable the use of DGA.

  • MIT Shared Memory Extension (SHM) is controlled as follows:

    • To use SHM, if available, specify either one of the following properties:

      • NO_J2D_MITSHM unset

      • J2D_USE_MITSHM=true

    • To not use SHM, specify either one of the following properties:

      • NO_J2D_MITSHM set

      • J2D_USE_MITSHM=false

  • The general use of pixmaps is controlled as follows:

    • -Dsun.java2d.pmoffscreen unset Use pixmaps if DGA is not available.

    • -Dsun.java2d.pmoffscreen=true Force the use of pixmaps.

    • -Dsun.java2d.pmoffscreen=false Disable the use of pixmaps.

  • The use of Shared and Server pixmaps is controlled as follows:

    • J2D_PIXMAPS unset Use both types.

    • J2D_PIXMAPS=shared Use only shared memory pixmaps.

    • J2D_PIXMAPS=sserver Use only server-side pixmaps.

  • The choice of default visual is controlled as follows:

    • FORCEDEFVIS unset (default) Use the best visual available.

    • FORCEDEFVIS set to a hexadecimal value Use the visual whose ID is the hexadecimal value.

    • FORCEDEFVIS set to any other value Use the default visual.

Properties on Windows

The following list describes some useful properties on Windows platforms.

  • The DirectDraw/GDI pipeline is the default pipeline for Windows. Change this default as follows:

    • -Dsun.java2d.noddraw=true Disable the use of DirectDraw pipeline. GDI will be used instead.

    • -Dsun.java2d.noddraw=false Enable the use of DirectDraw pipeline.

    • -Dsun.java2d.d3d=false Disable the use of Direct3D pipeline.

    • J2D_D3D=false Disable the use of Direct3D pipeline.

    • -Dsun.java2d.d3d=true Enable the use of Direct3D pipeline.

    • J2D_D3D=true Enable the use of Direct3D pipeline.

  • Control the use of the built-in surface punting mechanism as follows:

    • -Dsun.java2d.ddforcedram=true Keep volatile images in VRAM.

  • Control the use of DirectDraw blit operations as follows:

    • -Dsun.java2d.ddblit=false Disable the use of DirectDraw blit operations. GDI blits will be used instead.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide, Release 8

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

Java Platform, Standard Edition

Desktop Technologies Troubleshooting Guide

Release 8

E38386-01

March 2014

This document is a guide to help troubleshoot problems that might occur with Java applications created using desktop technologies of the Java Platform, Standard Edition (Java SE).

Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide, Release 8

E38386-01

Copyright 1995, 2014,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Sound

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

6 Java Sound

This chapter describes some issues that can arise with the Java Sound technology and suggests causes and workarounds.

This chapter contains the following sections:

  • "System Sound Configuration"

  • "Audio File Formats"

  • "Audio Formats"

  • "Overrun and Underrun Conditions"

System Sound Configuration

Make sure that your audio system is correctly configured (sound card driver/DirectSound for Windows, ALSA for Linux, Audio Mixer for Solaris OS). In addition, ensure that your speakers are connected and that your sound card volume and mute state are adjusted to the appropriate value. To test your sound configuration, run any native sound application and play some sound through it.

On Solaris OS and Linux, you might be unable to play sounds because an application (or sound daemon, such as esd or artsd) opens the audio device exclusively, thereby denying Java Sound access to the device.

Audio File Formats

Java Sound supports a set of audio file formats, for example AU, AIF, and WAV. Most of the file formats are only containers and can contain audio data in various compressed audio formats. Java Sound file readers support some formats (uncompressed PCM, a-law, mu-law), but do not support ADPCM, MP3, and others.

Java Sound also supports plug-ins for file readers and writers through the service provider interface (SPI). You can use Sun, third-party, or your own plug-ins to read various audio files. In any case you must handle the presence of the plug-in, for example, by distributing the required plug-ins with your application or by requiring plug-ins to be installed in the client Java environment.

Audio Formats

Java Sound supports various audio formats, but their availability depends on the operating system. To use some audio format for recording or playing, the format must be supported by your system (sound card drivers). Use supported formats as much as possible: PCM; 8 or 16 bits; 8000, 11025, 22050, 44100 Hz. The formats are supported by most if not all present sound cards. Most sound cards support only PCM formats, and even if the driver supports mu-law, it requires some modification to the software. If you need to play or record mu-law data, the preferred way is to convert it to PCM format through a format converter.

See the documentation for AudioSystem.getAudioInputStream for details about format conversion.

Overrun and Underrun Conditions

Recorded data is kept in a DataLine buffer. If you did not read from the line for a long time, an "overrun" condition will occur, and older data will be replaced with new. This will produce artifacts in the recorded audio data.

A similar situation occurs with playing. If all data from the buffer has been played and no new data has been written to the line, an "underrun" condition will occur and silence will be played until you write a new portion of audio data to the line.

The preferred way to record is to read data in a separate thread to prevent the possible influence of other tasks (for example, UI handling). If you use SourceDataLine for playing, a separate thread for writing data into the line is also the preferred method to use. If you use Clip for playing, the Clip implementation creates such a thread itself.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document helps in troubleshooting problems that might occur with Java applications created using desktop technologies of the Java Platform, Standard Edition (Java SE). The current release is Java SE 8, however, most information in this guide is applicable to previous releases.

Audience

The target audience for this document comprises developers who are using desktop technologies in Java SE 8.

This document is intended for readers with a detailed understanding of the desktop technologies, a high-level understanding of the components of the Java Virtual Machine (JVM), as well as some understanding of concepts such as garbage collection, threads, native libraries, and so on. In addition, it is assumed that the reader is reasonably proficient with the operating system where the Java application is developed and run.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For more information about Java SE and the relevant desktop technologies, visit the Java SE Home website at

http://www.oracle.com/technetwork/java/javase

For help on troubleshooting problems that might occur between the Java application and the Java HotSpot Virtual Machine, refer to the Java SE HotSpot VM Troubleshooting Guide.

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Submitting Bug Reports

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

9 Submitting Bug Reports

This chapter provides guidance on how to submit a bug report. It includes suggestions about what to try before submitting a report and what data to collect for the report.

This chapter contains the following sections:

  • "Checking for Existing Fixes in Update Releases"

  • "Preparing to Submit a Bug Report"

  • "Collecting Data for a Bug Report"

  • "Collecting Core Dumps"

Checking for Existing Fixes in Update Releases

The current platform is Java SE 8. Regularly scheduled updates to this release contain fixes for a set of critical bugs identified since the initial release of the platform. When an update release becomes available, it becomes the default download at the Java SE Downloads site.

The download site includes release notes that list the bug fixes in the release. Each bug in the list is linked to the bug description in the bug database. The release notes also include the list of fixes in previous update releases. If you encounter an issue, or suspect a bug, then, as an early step in the diagnosis, check the list of fixes that are available in the most recent update release.

Sometimes it is not obvious if an issue is a duplicate of a bug that is already fixed. Therefore, where possible, test with the latest update release to see if the problem persists.

Preparing to Submit a Bug Report

Before submitting a bug report, consider the following recommendations:

  • Collect as much relevant data as possible. For example, generate a thread-dump in the case of a deadlock, or locate the core file (where applicable) and hs_err file in the case of a crash. In all cases it is important to document the environment and the actions performed just before the problem is encountered.

  • Where applicable, try to restore the original state and reproduce the problem using the documented steps. This helps to determine if the problem is reproducible or an intermittent issue.

  • If the issue is reproducible, try to narrow down the problem. In some cases, a bug can be demonstrated with a small standalone test case. Bugs that are demonstrated by small test cases will typically be easy to diagnose when compared to test cases that consist of a large complex application.

  • Search the bug database to see if this bug or a similar bug has been reported. If the bug has already been reported, the bug report might have further information, such as the following:

    • If the bug has already been fixed, the release in which it was fixed.

    • A workaround for the problem.

    • Comments in the evaluation that explain, in further detail, the circumstances that cause the bug to arise.

    The bug database is located at http://bugs.java.com/bugdatabase/index.jsp.

  • If you conclude that the bug has not already been reported, submit a new bug.

Before submitting a bug, verify that the environment where the problem arises is a supported configuration. See the Supported System Configurations site.

In addition to the system configurations, check the list of supported locales. See the Supported Locales web page.

In the case of the Solaris Operating System, check the recommended patch cluster for the operating system release to ensure that the recommended patches are installed.

Collecting Data for a Bug Report

In general it is recommended to collect as much relevant data as possible when you create a bug report or submit a support call. This section suggests the data to collect and, where applicable, it provides recommendations for the commands or general procedure for obtaining the data.

The following sections provide information about data that can be collected prior to submitting a bug report:

  • "Hardware Details"

  • "Operating System"

  • "Java SE Version"

  • "Command-Line Options"

  • "Environment Variables"

  • "Fatal Error Log"

  • "Core or Crash Dump"

  • "Detailed Description of the Problem"

  • "Logs and Traces"

  • "Results from Troubleshooting Steps"

Hardware Details

Sometimes a bug arises or can be reproduced only on certain hardware configurations. If a fatal error occurs, the error log might contain the hardware details. If an error log is not available, document in the bug report the number and the type of processors in the machine, the clock speed, and, where applicable and if known, some details on the features of that processor. For example, in the case of Intel processors, it might be relevant that hyper-threading is available.

Operating System

On the Solaris Operating System, the showrev -a command prints the operating system version and patch information.

On Linux, it is important to know which distribution and version is used. Sometimes the /etc/*release file indicates the release information, but as components and packages can be upgraded independently, it is not always a reliable indication of the configuration. Therefore, in addition to the information from the *release file, collect the following information:

  • The kernel version. This can be obtained using the uname -a command.

  • The glibc version. The rpm -q glibc command indicates the patch level of glibc.

  • The thread library. There are two thread libraries for Linux, namely LinuxThreads and NPTL. The LinuxThreads library is used on 2.4 and older kernels and has "fixed stack" and "floating stack" variants. The Native POSIX Thread Library (NPTL) is used on the 2.6 kernel. Some Linux releases (such as RHEL3) include backports of NPTL to the 2.4 kernel. Use the command getconf GNU_LIBPTHREAD_VERSION to determine which thread library is used. If the getconf command returns an error to say that the variable does not exist, then it is likely that you are using an old kernel with the LinuxThreads library.

Java SE Version

The Java SE version string can be obtained using the java -version command.

Multiple versions of Java SE may be installed on the same machine. Therefore, ensure that you use the appropriate version of the java command by verifying that the installation bin directory appears in your PATH environment variable before other installations.

Command-Line Options

If the bug report does not include a fatal error log, it is important to document the full command line and all its options. This includes any options that specify heap settings (for example, the -mx option) or any -XX options that specify HotSpot specific options.

One of the features in Java SE is garbage collector ergonomics. On server-class machines the java command launches the HotSpot Server VM and a parallel garbage collector. A machine is considered to be a server machine if it has at least two processors and 2GB or more of memory.

The -XX:+PrintCommandLineFlags option can be used to verify the command-line options. This option prints all command-line flags to the VM. The command-line options can also be obtained for a running VM or core file using the jmap utility.

Environment Variables

Sometimes problems arise due to environment variable settings. When creating the bug report, indicate the values of the following Java environment variables (if set).

  • JAVA_HOME

  • JRE_HOME

  • JAVA_TOOL_OPTIONS

  • _JAVA_OPTIONS

  • CLASSPATH

  • JAVA_COMPILER

  • PATH

  • USERNAME

In addition, collect the following operating-system-specific environment variables.

  • On Solaris OS and Linux, collect the values of the following environment variables.

    • LD_LIBRARY_PATH

    • LD_PRELOAD

    • SHELL

    • DISPLAY

    • HOSTTYPE

    • OSTYPE

    • ARCH

    • MACHTYPE

  • On Linux, also collect the values of the following environment variables.

    • LD_ASSUME_KERNEL

    • _JAVA_SR_SIGNUM

  • On Windows, collect the values of the following environment variables.

    • OS

    • PROCESSOR_IDENTIFIER

    • _ALT_JAVA_HOME_DIR

Fatal Error Log

When a fatal error occurs, an error log is created. For detailed information about this file, see "Fatal Error Log".

The error log contains much information obtained at the time of the fatal error, such as version and environment information, details on the threads that provoked the crash, and so forth.

If the fatal error log is generated, be sure to include it in the bug report or support call.

Core or Crash Dump

Core and crash dumps can be very useful when trying to diagnose a system crash or hung process. The procedure for generating a dump is described in "Collecting Core Dumps".

Detailed Description of the Problem

When creating a problem description, try to include as much relevant information as possible. Describe the application, the environment, and most importantly the events leading up to the time when the problem was encountered.

  • If the problem is reproducible, list the steps that are required to demonstrate the problem.

  • If the problem can be demonstrated with a small test case, include the test case and the commands to compile and execute the test case.

  • If the test case or problem requires third-party code (for example, a commercial or open source library or package), provide details on where and how to obtain the library.

Sometimes the problem can be reproduced only in a complex application environment. In this case, the description, coupled with logs, core file, and other relevant information, might be the sole means to diagnose the issue. In these situations the description should indicate if the submitter is willing to run further diagnosis or run test binaries on the system where the issue arises.

Logs and Traces

In some cases, log or trace output can help to quickly determine the cause of a problem.

For example, in the case of a performance issue the output of the -verbose:gc option can help in diagnosing the problem. (This is the option to enable output from the garbage collector.)

In other cases the output from the jstat command can be used to capture statistical information over the time period leading up to the problem.

In the case of a deadlock or a hung VM (for example, due to a loop) the thread stacks can help diagnose the problem. The thread stacks are obtained by pressing Control+\ on Solaris OS and Linux and Control+Break on Windows.

In general, include all relevant logs, traces and other output in the bug report or support call.

Results from Troubleshooting Steps

Before submitting the bug report, be sure to document any troubleshooting steps that were performed.

For example, if the problem is a crash and the application has native libraries, you might have already run the application with the -Xcheck:jni option to reduce the likelihood that the bug is in the native code. Another case could be a crash that occurs with the HotSpot Server VM (-server option). If you have also tested with the HotSpot Client VM (-client option) and the problem does not occur, this gives an indication that the bug might be specific to the HotSpot Server VM.

In general, include in the bug report all troubleshooting steps and results that have already occurred. This type of information can often reduce the time that is required to diagnose an issue.

Collecting Core Dumps

This section explains how to generate and collect core dumps (also known as crash dumps). A core dump or a crash dump is a memory snapshot of a running process. A core dump can be automatically created by the operating system when a fatal or unhandled error (for example, signal or system exception) occurs. Alternatively, a core dump can be forced by means of system-provided command-line utilities. Sometimes a core dump is useful when diagnosing a process that appears to be hung; the core dump may reveal information about the cause of the hang.

When collecting a core dump, be sure to gather other information about the environment so that the core file can be analyzed (for example, OS version, patch information, and the fatal error log).

Core dumps do not usually contain all the memory pages of the crashed or hung process. With each of the operating systems discussed here, the text (or code) pages of the process are not included in core dumps. But to be useful, a core dump must consist of pages of heap and stack as a minimum. Collecting non-truncated good core dump files is essential for postmortem analysis of the crash.

Collecting Core Dumps on Solaris OS

With the Solaris Operating System, unhandled signals such as a segmentation violation, illegal instruction, and so forth, result in a core dump. By default, the core dump is created in the current working directory of the process and the name of the core dump file is core. The user can configure the location and name of the core dump using the core file administration utility, coreadm. This procedure is fully described in the man page for the coreadm utility.

The ulimit utility is used to get or set the limitations on the system resources available to the current shell and its descendants. Use the ulimit -c command to check or set the core file size limit. Make sure that the limit is set to unlimited; otherwise the core file could be truncated.

Note:

ulimit is a Bash shell built-in command; on a C shell, use the limit command.

Ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

The gcore utility can be used to get a core image of running processes. This utility accepts a process id (pid) of the process for which you want to force core dump.

To get the list of Java processes running on the machine, you can use any of the following commands:

  • ps -ef | grep java

  • pgrep java

  • jps

Note:

The jps command-line utility does not perform name matching (that is, looking for "java" in the process command name) and so it can list Java VM embedded processes as well as the Java processes.

Using the ShowMessageBoxOnError Option on Solaris OS

A Java process can be started with the -XX:+ShowMessageBoxOnError command-line option. When a fatal error is encountered, the process prints a message to standard error and waits for a yes or no response from standard input. Below is an example of output when an unexpected signal occurs.

=======================================================================
Unexpected Error
-----------------------------------------------------------------------
SIGSEGV (0xb) at pc=0xfeba31ac, pid=8677, tid=2
Do you want to debug the problem?
To debug, run 'dbx - 8677'; then switch to thread 2
Enter 'yes' to launch dbx automatically (PATH must include dbx)
Otherwise, press RETURN to abort...
=======================================================================

Before answering yes or pressing RETURN (Enter), use the gcore utility to force a core dump. Then you can type yes to launch the dbx debugger.

Suspending a Process using truss

In situations where it is not possible to specify the -XX:+ShowMessageBoxOnError option, you might be able to use the truss utility. This Solaris OS utility is used to trace system calls and signals. You can use this utility to suspend the process when it reaches a specific function or system call.

The following command shows how to use the truss utility to suspend a process when the exit system call is executed (in other words, the process is about to exit).

$ truss -t \!all -s \!all -T exit -p pid

When the process calls exit, it will be suspended. At this point, you can attach the debugger to the process or call gcore to force a core dump.

Collecting Core Dumps on Linux

On the Linux operating system, unhandled signals such as segmentation violation, illegal instruction, and so forth, result in a core dump. By default, the core dump is created in the current working directory of the process and the name of the core dump file is core.pid, where pid is the process id of the crashed Java process.

The ulimit utility is used to get or set the limitations on the system resources available to the current shell and its descendants. Use the ulimit -c command to check or set the core file size limit. Make sure that the limit is set to unlimited; otherwise the core file could be truncated.

Note:

ulimit is a Bash shell built-in command; on a C shell, use the limit command.

Ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

You can use the gcore command in the gdb (GNU Debugger) interface to get a core image of a running process. This utility accepts the pid of the process for which you want to force the core dump.

To get the list of Java processes running on the machine, you can use any of the following commands:

  • ps -ef | grep java

  • pgrep java

  • jps

Note:

The jps command-line utility does not perform name matching (that is, looking for "java" in the process command name) and so it can list Java VM embedded processes as well as the Java processes.

Using the ShowMessageBoxOnError Option on Linux

A Java process can be started with the -XX:+ShowMessageBoxOnError command-line option. When a fatal error is encountered, the process prints a message to standard error and waits for a yes or no response from standard input. Below is an example of output when an unexpected signal occurs.

=======================================================================
Unexpected Error
-----------------------------------------------------------------------
SIGSEGV (0xb) at pc=0x06232e5f, pid=11185, tid=8194
Do you want to debug the problem?
To debug, run 'gdb /proc/11185/exe 11185'; then switch to thread 8194
Enter 'yes' to launch gdb automatically (PATH must include gdb)
Otherwise, press RETURN to abort...
=======================================================================

Type yes to launch the gdb (GNU Debugger) interface, as suggested by the error report shown above. In the gdb prompt, you can give the gcore command. This command creates a core dump of the debugged process with the name core.pid, where pid is the process ID of the crashed process. Make sure that the gdb gcore command is supported in your versions of gdb. Look for help gcore in the gdb command prompt.

Reasons for Not Getting a Core File

The following list explains the major reasons that a core file might not be generated. This list pertains to both Solaris OS and Linux, unless specified otherwise.

  • The current user does not have permission to write in the current working directory of the process.

  • The current user has write permission on the current working directory, but there is already a file named core that has read-only permission.

  • The current directory does not have enough space or there is no space left.

  • The current directory has a subdirectory named core.

  • The current working directory is remote. It might be mapped by NFS (Network File System), and NFS failed just at the time the core dump was about to be created.

  • Solaris OS only: The coreadm tool has been used to configure the directory and name of the core file, but any of the above reasons apply for the configured directory or filename.

  • The core file size limit is too low. Check your core file limit using the ulimit -c command (Bash shell) or the limit -c command (C shell). If the output from this command is not unlimited, the core dump file size might not be large enough. If this is the case, you will get truncated core dumps or no core dump at all. In addition, ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

  • The process is running a setuid program and therefore the operating system will not dump core unless it is configured explicitly.

  • Java specific: If the process received SIGSEGV or SIGILL but no core dump, it is possible that the process handled it. For example, HotSpot VM uses the SIGSEGV signal for legitimate purposes, such as throwing NullPointerException, deoptimization, and so forth. The signal is unhandled by the Java VM only if the current instruction (PC) falls outside Java VM generated code. These are the only cases in which HotSpot dumps core.

  • Java specific: The JNI Invocation API was used to create the VM. The standard Java launcher was not used. The custom Java launcher program handled the signal by just consuming it and produced the log entry silently. This situation has occurred with certain Application Servers and Web Servers. These Java VM embedding programs transparently attempt to restart (fail over) the system after an abnormal termination. In this case, the fact that a core dump is not produced is a feature and not a bug.

Collecting Crash Dumps on Windows

On the Windows operating system there are three types of crash dumps:

  • Dr. Watson logfile, which is a text error log file that includes faulting stack trace and a few other details.

  • User minidump, which can be considered a "partial" core dump. It is not a complete core dump, because it does not contain all the useful memory pages of the process.

  • Dr. Watson full-dump, which is equivalent to a Unix core dump. This dump contains most memory pages of the process (except for code pages).

When an unexpected exception occurs on Windows, the action taken depends on two values in the following registry key:

\\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug

The two values are named Debugger and Auto. The Auto value indicates if the debugger specified in the value of the Debugger entry starts automatically when an application error occurs.

  • A value of 0 for Auto means that the system displays a message box notifying the user when an application error occurs.

  • A value of 1 for Auto means that the debugger starts automatically.

The value of Debugger is the debugger command that is to be used to debug program errors.

When a program error occurs, Windows examines the Auto value and if the value is 0 it executes the command in the Debugger value. If the value for Debugger is a valid command, a message box is created with two buttons: OK and Cancel. If the user clicks OK, the program is terminated. If the user clicks Cancel, the specified debugger is started. If the value for the Auto entry is set to 1 and the value for the Debugger entry specifies the command for a valid debugger, the system automatically starts the debugger and does not generate a message box.

Configuring Dr. Watson

The Dr. Watson debugger is used to create crash dump files. By default, the Dr. Watson debugger (drwtsn32.exe) is installed into the Windows system folder (%SystemRoot%\System32).

To install Dr. Watson as the postmortem debugger, run the following command:

drwtsn32 -i

To configure name and location of crash dump files, run drwtsn32 without any options.

In the Dr. Watson GUI window, make sure that the Create Crash Dump File check box is selected and that the crash dump file path and log file path are configured in their respective text fields.

Dr. Watson may be configured to create a full dump using the registry. The registry key is as follows:

System Key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DrWatson]
Entry Name: CreateCrashDump
Value: (0 = disabled, 1 = enabled)

Note that if the application handles the exception, then the registry-configured debugger is not invoked. In that case it might be appropriate to use the -XX:+ShowMessageBoxOnError command-line option to force the process to wait for user intervention on fatal error conditions.

Forcing a Crash Dump

On the Windows operating system, the userdump command-line utility can be used to force a Dr. Watson dump of a running process. The userdump utility does not ship with Windows but instead is released as a component of the OEM Support Tools package.

An alternative way to force a crash dump is to use the windbg debugger. The main advantage of using windbg is that it can attach to a process in a non-invasive manner (that is, read-only). Normally Windows terminates a process after a crash dump is obtained but with the non-invasive attach it is possible to obtain a crash dump and let the process continue. To attach the debugger non-invasively requires selecting the Attach to Process option and the Noninvasive checkbox.

When the debugger is attached, a crash dump can be obtained using the following command.

.dump /f crash.dmp

The windbg debugger is included in the "Debugging Tools for Windows" download.

An additional utility in this download is the dumpchk.exe utility, which can verify that a memory dump file has been created correctly.

Both userdump.exe and windbg require the pid of the process. The userdump -p command lists the process and program for all processes. This is useful if you know that the application is started with the java.exe launcher. However, if a custom launcher is used (embedded VM), it might be difficult to recognize the process. In that case you can use the jps command-line utility as it lists the pids of the Java processes only.

As with Solaris OS and Linux, you can also use the -XX:+ShowMessageBoxOnError command-line option on Windows. When a fatal error is encountered, the process shows a message box and waits for a yes or no response from the user.

Before clicking Yes or No, you can use the userdump.exe utility to generate the Dr. Watson dump for the Java process. This utility can also be used in cases when the process appears to be hung.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Swing

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

4 Swing

This chapter provides information and guidance on some specific procedures for troubleshooting some of the most common issues that might be found in the Java SE Swing API.

This chapter contains the following sections:

  • "General Debugging Tips for Swing"

  • "Specific Debugging Tips for Swing"

General Debugging Tips for Swing

Swing's painting infrastructure changed quite extensively in Java SE 6. If you notice painting artifacts specific in Java SE 6 or later releases, you can try turning off the new functionality. This can be done with the property swing.bufferPerWindow.

When you are debugging the Swing code which is executed while any menu is popped up, it is recommended to use the debugger remotely. Otherwise, the debugging process and the application execution block each other, and this prevents further work with the system. If that happens, the only action that can be taken is to kill the X server for Linux and Solaris. For more information, see the following bug in the Bug Database:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6517045

Some common Swing problems:

  • Painting problems.

  • Renderers.

  • Updating models from wrong thread.

  • Hangs.

  • Responsiveness.

  • Repainting issues.

  • isOpaque usage.

  • Startup: could be caused by small heap, loading unnecessary classes.

Some things to consider:

  • Buffer-per-window feature.

  • Native look-and-feel fidelity: Gnome vs Windows

  • Footprint of Swing applications.

  • JTable, JTree, and JList all use renderers.

  • Make sure that custom renderers do as little as possible.

  • Update models only from event dispatch thread. Otherwise the display will not reflect the state of the model.

Identifying bad renderers:

  • Sluggish application, especially when scrolling.

  • Use an optimizer to watch painting calls, look for calls to getTableCellTRendererComponent.

Specific Debugging Tips for Swing

The following subsections present some tips for troubleshooting Swing problems:

  • Incorrect Threading

  • Overlapping Children of a JComponent

  • Updating the Display

  • Changing the Model

  • Adding or Removing Components

  • Overriding Opaque

  • Permanent Changes to a Graphics

  • Custom Painting and Double Buffering

  • Opaque Content Pane

  • Performance: Call to Renderer for Each Cell

  • Possible Leaks

  • Mixing Heavyweight and Lightweight Components

  • Tips for Using Synth

  • Tracking Activity on Event Dispatch Thread

  • Differing Default Layout Managers

  • Listener Objects Dispatched to Deepest Component

  • Adding a Component to Content Pane

  • Drag and Drop Support in Swing

  • One Parent at a Time for a Component

  • Problem With JFileChooser and Shortcuts on Windows

Incorrect Threading

Random exceptions and painting problems are usually the result of incorrect threading usage of Swing. All access to Swing components, unless specifically noted in the javadoc, must be done on the event dispatch thread. This includes any models (TableModel, ListModel, and others) that are attached to Swing components.

The best way to check for bad usage of Swing is by way of an instrumented RepaintManager, as illustrated by the following code:

public class CheckThreadViolationRepaintManager extends RepaintManager {
     // it is recommended to pass the complete check
     private boolean completeCheck = true;

     public boolean isCompleteCheck() {
         return completeCheck;
     }

     public void setCompleteCheck(boolean completeCheck) {
         this.completeCheck = completeCheck;
     }

     public synchronized void addInvalidComponent(JComponent component) {
         checkThreadViolations(component);
         super.addInvalidComponent(component);
     }

     public void addDirtyRegion(JComponent component, int x, int y, int w, int
h) {
         checkThreadViolations(component);
         super.addDirtyRegion(component, x, y, w, h);
     }

     private void checkThreadViolations(JComponent c) {
         if (!SwingUtilities.isEventDispatchThread() && (completeCheck ||
c.isShowing())) {
             Exception exception = new Exception();
             boolean repaint = false;
             boolean fromSwing = false;
             StackTraceElement[] stackTrace = exception.getStackTrace();
             for (StackTraceElement st : stackTrace) {
                 if (repaint && st.getClassName().startsWith("javax.swing.")) {
                     fromSwing = true;
                 }
                 if ("repaint".equals(st.getMethodName())) {
                     repaint = true;
                 }
             }
             if (repaint && !fromSwing) {
                 //no problems here, since repaint() is thread safe
                 return;
             }
             exception.printStackTrace();
         }
     }
}

Overlapping Children of a JComponent

Another possible source of painting problems can occur if you allow children of a JComponent to overlap. In this case the parent must override isOptimizedDrawingEnabled to return false. If you do not override isOptimizedDrawingEnabled, components can randomly appear on top of others, depending upon which one repaint was invoked on.

Updating the Display

Another source of painting problems can occur if you do not invoke repaint correctly when you need to update the display. Changing a visible property of a Swing component, such as the font, will trigger a repaint or revalidate. If you are writing a custom component, you must invoke repaint and possibly revalidate whenever the display or sizing information has been updated. If you do not, the display will only update the next time someone triggers a repaint.

A good way to diagnose this is to resize the window. If the content appears after a resize, it implies that the component did not invoke repaint or revalidate correctly.

Changing the Model

Just as you do not need to invoke repaint when you change a visible property of a Swing component, you also need not invoke repaint when your model changes. If your model sends out the correct change notification, the JComponent will invoke repaint or revalidate as appropriate.

However, if you change your model but do not send out a notification, a repaint event may not even work. In particular this will not work with JTree. The correct thing to do is to send out the appropriate model notification. This can usually be diagnosed by again resizing the window and noticing that the display has not updated correctly.

Adding or Removing Components

When you add or remove components, you need to invoke repaint or revalidate. Swing and AWT will not invoke repaint or revalidate in these situations, and therefore you must invoke them yourself.

Overriding Opaque

Another possible area of painting problems is if a component does not override opaque. Here is the documentation warning on this:

Further, if you do not invoker super's implementation you must honor the opaque property, that is if this component is opaque, you must completely fill in the background in a non-opaque color. If you do not honor the opaque property you will likely see visual artifacts.

The only way to check for this is to look for consistent visual artifacts when the component invokes repaint.

Permanent Changes to a Graphics

Do not make any permanent changes to a Graphics passed to paint, paintComponent, or paintChildren. Here is the documentation warning on this:

If you override this in a subclass you should not make permanent changes to the passed in Graphics. For example, you should not alter the clip Rectangle or modify the transform. If you need to do these operations you may find it easier to create a new Graphics from the passed in Graphics and manipulate it.

Not honoring this restriction will result in clipping or other weird visual artifacts.

Custom Painting and Double Buffering

Although you can override paint and do custom painting in the override, you should instead override paintComponent. The JComponent.paint method ensures that painting happens to the double buffer. If you override paint directly, you may lose double buffering.

Opaque Content Pane

Swing's painting architecture requires an opaque content pane. Here is the documentation:

The painting architecture of Swing requires an opaque JComponent to exist in the containment hierarchy above all other components. This is typically provided by way of the content pane. If you replace the content pane, it is recommended that you make the content pane opaque by way of setOpaque(true). Additionally, if the content pane overrides paintComponent, it will need to completely fill in the background in an opaque color in paintComponent.

Performance: Call to Renderer for Each Cell

Renderers are painted for each cell, so ensure that the renderer does as little as possible. Any slowdown in the renderer is magnified across all cells. For example, if you repaint the visible region of a table with 50x20 visible cells, there will be 1000 calls to the renderer.

Possible Leaks

If the life cycle of your model is longer than that of a window with a component using the model, you must explicitly set the model of the Swing component to null. If you do not set the model to null, your model will retain a reference to the Component, which will keep all components in the window from being garbage-collected. For example, consider the following code:

TableModel myModel = ...;
JFrame frame = new JFrame();
frame.setContentPane(new JScrollPane(new JTable(myModel)));
frame.dispose();

If your application still holds a reference to myModel, then frame and all its children will still be reachable by way of the listener JTable installs on myModel. The solution is to invoke table.setModel(new DefaultTableModel()).

Mixing Heavyweight and Lightweight Components

Mixing heavyweight and lightweight components can work in certain scenarios, primarily as long as the heavyweight component does not overlap with any existing Swing components. For example, a heavyweight will not work in an internal frame, because when the user drags around the internal frame it will overlap with other internal frames. If you do use heavyweights, invoke the following methods:

  • JPopupMenu.setDefaultLightWeightPopupEnabled(false)

  • ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false)

Tips for Using Synth

Synth is an empty canvas. To use Synth you must either provide a complete XML file that configures the look and feel, or extend SynthLookAndFeel and provide your own SynthStyleFactory.

Tracking Activity on Event Dispatch Thread

If a Swing application tries to do too much on the event dispatch thread, the application will appear sluggish and unresponsive.

One way to detect this situation is to push a new EventQueue that can output logging information if an event takes too long to process. This approach is not perfect in that it has problems with focus events and modality, but it is good for ad-hoc testing.

Differing Default Layout Managers

Problems can be caused by differing default layout manager classes on a Swing component. For example, the default for the JPanel class is FlowLayout, but the default for the JFrame class is BorderLayout. This situation is easily fixed by specifying a LayoutManager.

Listener Objects Dispatched to Deepest Component

MouseListener objects are dispatched to the deepest component that has MouseListener objects (or has enabled MouseEvent objects). A ramification of this is that if you attach a MouseListener to a component whose descendants have MouseListener objects, your MouseListener object will never get called.

This is easily reproduced with a composite component, like an editable JComboBox. Because a JComboBox has child components that have a MouseListener, a MouseListener attached to an editable JComboBox will never get notified.

If your MouseListener suddenly stops getting events, it could be the result of a change in the application whereby a descendant component now has a MouseListener. A good way to check for this is to iterate over the descendants asking if they have any mouse listeners.

A similar scenario occurs with the KeyListener class. A KeyListener object is dispatched only to the focused component.

The JComboBox case is another example of this situation. In the editable JComboBox case the editor gets focus, not the JComboBox. As a result, a KeyListener attached to an editable JComboBox will never get notified.

Adding a Component to Content Pane

Prior to J2SE 1.5 you could not add a component to a JFrame, JWindow, JDialog or JApplet. Instead, you needed to add the component to the content pane. As of J2SE 1.5 it is still the case that a component added to a top-level Swing component must go to the content pane, but the add method (and a couple of other methods) on these classes redirect to the content pane. In other words, doing frame.getContentPane().add(component) is the same as frame.add(component).

The following methods redirect to the content pane for you: add (and its variants), remove (and its variants), and setLayout.

This is purely a convenience, but can cause confusion. In particular, getChildren, getLayout, and various others do not redirect to the content pane.

This change impacts LayoutManagers that only work with one component, such as GroupLayout and BoxLayout. For example, new GroupLayout(frame) will not work; instead, you need to do new GroupLayout(frame.getContentPane()).

Drag and Drop Support in Swing

When using Swing you should use Swing's drag-and-drop support as provided by TransferHandler. Otherwise, you will have to manage the selection and various other issues.

One Parent at a Time for a Component

Remember that a component can only exist in one parent at a time. Problems occur when you attempt to share menu items between menus. For example, JMenuItem is a component, and therefore can exist in only one menu at a time.

Problem With JFileChooser and Shortcuts on Windows

The JFileChooser class does not support shortcuts on Windows OS (.lnk files). Unlike the standard Windows file choosers, JFileChooser does not allow the user to follow Windows shortcuts when browsing the file system, because it does not show the correct path to the file.

To reproduce the problem, perform the following procedure:

  1. Create a text file on the Desktop called, for example, MyFile.txt. Open the text file and type some text, for example: This is the contents of MyFile.txt.

  2. Create a shortcut to the new text file in the following way: Drag the file with the right mouse button to another location on the Desktop and choose Create Shortcut(s) here.

  3. Run the JfileChooser test application, browse the Desktop, select Shortcut to MyFile.txt and click Open.

  4. The result File is PathToDesktop\Shortcut to MyFile.txt.lnk, but it should be PathToDesktop\MyFile.txt.

  5. In addition, the contents of the result File in the text area shows the contents of the file Shortcut to MyFile.txt.lnk, but the contents should be This is the contents of MyFile.txt, which was typed in step 1.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 Introduction

  • Java SE Desktop Overview
  • Troubleshooting an Issue
  • Identifying the Type of Issue
    • Crashes
    • Performance Problems
    • Behavior Problems
  • Basic Tools
  • Using JDWP

2 AWT

  • Debugging Tips for AWT
  • Layout Managers
  • Key Events
  • Modality
  • Memory Leaks
  • Crashes
    • How to Distinguish an AWT Crash
    • How to Troubleshoot an AWT Crash
  • Focus Events
    • How to Trace Focus Events
    • Native Focus System
    • Focus System in the Java Plug-in
    • Focus Models Supported by X Window Managers
    • Miscellaneous Problems With Focus
  • Data Transfer
    • Debugging Drag and Drop Applications
    • Frequent Issues With Data Transfer
  • Other Issues
    • Splash Screen Issues
    • Tray Icon Issues
    • Popup Menu Issues
    • Background/Foreground Color Inheritance
    • AWT Panel Size Restriction
    • Hangs when debugging popup menus and similar components on X11
    • Window.toFront()/toBack() behavior on X11
  • Heavyweight/Lightweight Components Mixing
    • The Requirement of Validating the Component Hierarchy
    • Validate Roots
    • Swing Painting Optimizations
    • Non-opaque LW Components
    • Disabling the Default HW/LW Mixing Feature Implementation

3 Java 2D

  • Changing Rendering Pipelines and Their Properties
    • Solaris OS and Linux: Using Default X11 Pipeline
    • Solaris OS on SPARC: Changing Default Visual Used by Java 2D
    • Windows OS: Using Default DirectDraw/GDI Pipeline
    • Windows OS: Using Direct3D Pipeline (Full-Screen Mode)
    • Using OpenGL Pipeline (Solaris OS, Linux, and Windows)
  • Generic Performance Issues
    • Hardware Accelerated Rendering Primitives
    • Using Java 2D Primitive Tracing to Detect and Avoid Non-accelerated Rendering
    • Causes of Poor Rendering Performance
    • Improving Performance of Software-only Rendering
  • Text-Related Issues
    • Application Crash During Text Rendering
    • Differences in Text Appearance
    • Metrics
  • Java 2D Printing

4 Swing

  • General Debugging Tips for Swing
  • Specific Debugging Tips for Swing
    • Incorrect Threading
    • Overlapping Children of a JComponent
    • Updating the Display
    • Changing the Model
    • Adding or Removing Components
    • Overriding Opaque
    • Permanent Changes to a Graphics
    • Custom Painting and Double Buffering
    • Opaque Content Pane
    • Performance: Call to Renderer for Each Cell
    • Possible Leaks
    • Mixing Heavyweight and Lightweight Components
    • Tips for Using Synth
    • Tracking Activity on Event Dispatch Thread
    • Differing Default Layout Managers
    • Listener Objects Dispatched to Deepest Component
    • Adding a Component to Content Pane
    • Drag and Drop Support in Swing
    • One Parent at a Time for a Component
    • Problem With JFileChooser and Shortcuts on Windows

5 Internationalization

  • Introduction
  • Troubleshooting

6 Java Sound

  • System Sound Configuration
  • Audio File Formats
  • Audio Formats
  • Overrun and Underrun Conditions

7 Time Zone Settings in the JRE

  • Native Time Zone Information and the JRE
    • Determine the Time Zone Data Version in Use
    • Troubleshooting Problems with Tzupdater
  • Determining the Default Time Zone on Windows
    • Check Which Time Zone the JRE Reports as Default
    • Determine the Setting in the Control Panel
    • Check Whether Automatic Daylight Saving Time Adjustment is Enabled
    • Set the Default Time Zone in the Control Panel
    • Check Whether You Can Use -Duser.timezone
    • Special Tools in Windows 7
    • JRE Internal Representation of Time Zone Mappings

8 Applets and Java Web Start Applications

  • Configuration Problems
    • Validation
    • Common Configuration Problems
    • Managing Java Runtimes
    • Passing parameters to the JRE
    • Java Deployment Home
    • Deployment Tracing Information
    • Deployment Cache
    • Network Configuration
  • Applet Troubleshooting
    • Applet Does Not Start - Plugin Cheat Sheet
    • Unresponsive Web Page
  • Avoiding Security Dialogs
    • Signed Applications
    • Mixed Code Issues
  • Development Tips
    • Debugging Applets and Web Start Applications
    • Profiling Applets and Java Web Start Applications
    • Debugging Memory Leaks

9 Submitting Bug Reports

  • Checking for Existing Fixes in Update Releases
  • Preparing to Submit a Bug Report
  • Collecting Data for a Bug Report
    • Hardware Details
    • Operating System
    • Java SE Version
    • Command-Line Options
    • Environment Variables
    • Fatal Error Log
    • Core or Crash Dump
    • Detailed Description of the Problem
    • Logs and Traces
    • Results from Troubleshooting Steps
  • Collecting Core Dumps
    • Collecting Core Dumps on Solaris OS
    • Collecting Core Dumps on Linux
    • Reasons for Not Getting a Core File
    • Collecting Crash Dumps on Windows

A Java 2D Properties

  • Properties on Solaris OS and Linux
  • Properties on Windows

B Fatal Error Log

  • Location of Fatal Error Log
  • Description of Fatal Error Log
  • Header Format
  • Thread Section Format
    • Thread Information
    • Signal Information
    • Register Context
    • Machine Instructions
    • Thread Stack
    • Further Details
  • Process Section Format
    • Thread List
    • VM State
    • Mutexes and Monitors
    • Heap Summary
    • Memory Map
    • VM Arguments and Environment Variables
    • Signal Handlers
  • System Section Format
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Time Zone Settings in the JRE

Documentation Contents
Java Platform, Standard Edition Desktop Technologies Troubleshooting Guide
Contents Previous Next

7 Time Zone Settings in the JRE

This chapter describes some issues that can arise with time zone settings with the Java Runtime Environment (JRE) on the Windows operating system. It also describes troubleshooting techniques and workarounds to solve these issues.

This chapter contains the following sections:

  • "Native Time Zone Information and the JRE"

  • "Determining the Default Time Zone on Windows"

Native Time Zone Information and the JRE

The JRE reads the native time zone information to determine your default time zone. For example, on Windows, the JRE queries the registry to determine the default time zone.

However, the JRE also maintains its own time zone database. This provides cross-platform support because the different operating system APIs are not sufficient to support the Java APIs. The Java time zone database supports time zone IDs and determines daylight saving time rules for all the time zones that the JRE supports. The Java time zone database can be found in <install_dir>/jre/lib/zi. The tzupdater tool is available to update the Java time zone database.

Modifications to the JRE for each specific operating system are necessary so that the operating system can deliver the system time to the JRE. Then, if a Java application requests the system date by calling date and time related constructors, the system time is returned.

Examples of such constructors are:

java.util.Date()
java.util.GregorianCalendar()

Constructors related to date and time include:

System.currentTimeMillis()
System.nanoTime()

Operating system-specific patches might be required to ensure that the correct system time is delivered to the JRE.

Determine the Time Zone Data Version in Use

The time zone database version that ships in any JRE from Oracle is documented in the Release Notes. However, the actual version can be different from the version mentioned there if the JRE has been patched using the tzupdater tool.

To determine the current time zone data version of your JRE either run the tzupdater tool with the Version option, or examine the header of the ZoneInfoMappings file.

Determine the Time Zone with Tzupdater

The Java time zone updater tool is called tzupdater. To determine the time zone database version of your JRE, run this tool as follows:

java -jar tzupdater.jar -V

Here is a typical output from running the tzupdater tool.

tzupdater version 1.3.33-b01JRE time zone data version: tzdata2010iEmbedded time zone data version: tzdata2010l

You can download the tzupdater tool from this web page: http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html

Examining the ZoneInfoMappings File

Even without the tzupdater tool, you can quickly check the version by examining the header of the file <java-home>/lib/zi/ZoneInfoMappings. This data is stored in a binary format that is specific to Java. On Linux, Solaris, and Mac OS X operating systems, you can use the octal dump command to see the header of this file. Here is the octal dump command format:

/usr/bin/od -c -j 11 -N 11 <java-home>/lib/zi/ZoneInfoMappings

Here is a typical result of such a dump command:

/usr/bin/od -c -j 11 -N 11 /farfaraway/jdks/jdk1.6.0_21/jre/lib/zi/ZoneInfoMappings0000000   t   z   d   a   t   a   2   0   1   0   i0000013

In this example the time zone data version that is embedded in that JRE is tzdata2010i.

On Microsoft Windows, you can use the findstr command to examine the ZoneInfoMappings file. Here is an example.

findstr tzdata <java-home>\lib\zi\ZoneInfoMappings

Troubleshooting Problems with Tzupdater

Sometimes when you run tzupdater it quits with the message: There's no tzdata available for this Java runtime. Here are two examples.

$ java -jar tzupdater.jar -Vtzupdater version 1.3.39-b01JRE time zone data version: tzdata2009iThere's no tzdata available for this Java runtime.

$ java -jar tzupdater.jar -u
There's no tzdata available for this Java runtime.

The likely cause is that you are using a JRE that is not from Oracle. Oracle provides the JRE for Solaris (x86, x64, SPARC), Linux (x86, x64, ARM), Microsoft Windows (x86, x64), and Mac OS X (x64). The java.vendor property value for these is Sun Microsystems Inc., Oracle Corporation or BEA Systems, Inc. Oracle does not provide the JRE for other platforms.

The output of running the java -version command does not provide enough information to determine the actual vendor of a JRE. However, running tzupdater in update mode with the -v option does print out the java.vendor property. Here is an example of attempting to run tzupdater when the environment is HP_UX from Hewlett Packard.

root@my_server:/opt/java6/bin> uname -a
HP-UX my_server B.11.23 U ia64 1114591084 unlimited-user license
root@my_server:/opt/java6/bin> ./java -version
java version "1.6.0.05"
Java(TM) SE Runtime Environment (build 1.6.0.05-jinteg_14_oct_2009_01_44-b00)
Java HotSpot(TM) Server VM (build 14.2-b01-jre1.6.0.05-rc5, mixed mode)
root@my_server:/opt/java6/bin> ./java -jar tzupdater.jar -v -u
java.home: /opt/java6/jre
java.vendor: Hewlett-Packard Co.
java.version: 1.6.0.05
JRE time zone data version: tzdata2009i
There's no tzdata available for this Java runtime.

In this example, java.vendor is set to Hewlett-Packard Co. The JRE that you are trying to update using tzupdater is not supported by Oracle.

A possible solution is visit the website of your JRE vendor and determine whether a time zone updater tool is available there. For example, the Hewlett-Packard version of the tzupdater tool is available at this URL:

http://h18012.www1.hp.com/java/DST/ivms/README.html

Determining the Default Time Zone on Windows

This section clarifies how the JRE determines the default time zone on the Windows Vista and Windows 7 operating systems. If Java doesn't report the expected time zone, use the troubleshooting techniques provided in the following sections:

  • Check which time zone the JRE reports as default

  • Determine the time zone setting in the Control Panel

  • Check whether automatic daylight saving time adjustment is enabled

  • Check whether you can use -Duser.timezone

  • Use the tzutil.exe tool in Windows 7

Check Which Time Zone the JRE Reports as Default

You can write a simple program to determine which time zone the JRE reports as the default time zone, based on a check with the native operating system.

The Java program in Example 7-1 returns the default time zone:

Example 7-1 Java Code Snippet to Check the Time Zone Setting in the JRE

public class DefaultTimeZone {
    public static void main(String[] args) {
        System.out.println(java.util.TimeZone.getDefault().getID());
    }
}

You can save the code snippet in Example 7-1 to a file named DefaultTimeZone.java and compile it using the javac command. Then you can run the compiled DefaultTimeZone class, as shown in Example 7-2.

Example 7-2 Compiling and Running the DefaultTimeZone Program

c:\tztest> javac DefaultTimeZone.java
c:\tztest> java DefaultTimeZone
Europe/Berlin

In Example 7-2, the default time zone is Europe/Berlin. Running the program should display your local time zone. If the output is not the expected time zone, then continue with the following troubleshooting steps.

Determine the Setting in the Control Panel

You can change or examine the system's default time zone using the Windows Control Panel. For example, you can select this time zone setting in Windows 7:

(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna

The corresponding value for the Registry key TimeZoneKeyName is W. Europe Standard Time.

Check Whether Automatic Daylight Saving Time Adjustment is Enabled

You can check whether automatic adjustment of daylight saving time is enabled through the graphical user interface (GUI) or through the Windows registry.

GUI Method

To use the Control Panel to check whether automatic adjustment of daylight saving time is enabled, follow these steps.

  1. Click the Windows Start button and then click Control Panel.

  2. Click Date and Time.

  3. Click the Change Time Zone button.

  4. There is a click box labeled Automatically adjust time for Daylight Savings Time. Observe whether or not this click box is clicked, and change the setting if you desire.

  5. Click OK. This returns you to the Date and Time dialog box.

Windows Registry Method

You can run Windows Registry Editor to check whether automatic adjustment of daylight saving time is enabled.

Caution:

It is a good practice to back up the Windows registry before examining or editing it. If you make a mistake in editing, you can damage the Windows registry.

To enable automatic adjustment of daylight saving time from the Windows registry:

  1. Click the Windows Start button.

  2. In the Search programs and files field, type regedit and then press Enter to open the Registry Editor.

  3. In the Registry Editor, search for the key DynamicDaylightTimeDisabled and examine the setting.

    • If the registry setting is 1, then dynamic daylight time is disabled.

    • If the registry setting is 0, then dynamic daylight time is enabled.

If you prefer, you can access the Windows registry from the Windows command window.

In Example 7-3, the registry setting is 1. With this setting, the clock is not automatically adjusted for daylight saving time.

Example 7-3 DynamicDaylightTimeDisabled Registry Key Set to True

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"DynamicDaylightTimeDisabled"=dword:00000001

If you have disabled the DynamicDaylightTimeDisabled option, then Java always returns a GMT (Greenwich mean time) offset and not a time zone ID that is compatible with the uniform naming convention (such as Europe/Berlin). For example, the offset will be expressed as GMT+01 and not Europe/Berlin.

Set the Default Time Zone in the Control Panel

You can change or examine the system's default time zone by using the Windows Control Panel.

To set the system's default time zone from the Control Panel:

  1. Click the Windows Start button and then click Control Panel.

  2. Click Date and Time.

  3. Click the Change Time Zone button.

  4. From the Time Zone menu, select your preferred time zone.

  5. Click OK. This returns you to the Date and Time dialog box.

  6. Click OK to close the Date and Time dialog box.

For example, you can select this time zone in Windows 7:

(UTC)+1:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna.

The corresponding value for the Registry key TimeZoneKeyName is W. Europe Standard Time.

Check Whether You Can Use -Duser.timezone

You can explicitly set a default time zone on the command line by using the Java system property called user.timezone. This bypasses the settings in the Windows operating system and can be a workaround in some cases. For instance, this setting is useful if you want DST (daylight saving time) only for a single Java program running on the system.

The following example examines the system property -Duser.timezone by running a Java program called DefaultTimeTestZone from the Windows Command Prompt window.

c:\tztest> java -Duser.timezone=America/New_York DefaultTimeZone
America/New_York

If setting a default time zone explicitly by specifying -Duser.timezone works for the DefaultTimeTestZone program, but does not work for your program, you should check whether your code overwrites the default Java time zone during runtime, with a method call such as this:

TimeZone.setDefault(TimeZone zone)

Special Tools in Windows 7

With Windows 7, a tool called tzutil.exe is available. With this tool, you can request the current time zone ID abbreviation without manually reading the registry.

Here is an example of running tzutil.exe. The first line is the command that you enter in Windows Command Prompt window. The second line is the system response.

tzutil /g

W. Europe Standard Time

JRE Internal Representation of Time Zone Mappings

On Windows, the JRE uses a file <java-home>\lib\tzmappings to represent the mapping between Windows and Java time zones. Each line in the file has four tokens. The first token is the Windows time zone registry key called TimeZoneKeyName. (See Determine the Setting in the Control Panel)

The second token is a time zone map ID. (This is not used in Windows Vista and Windows 7.) The third token is the locale. The fourth token represents the Java time zone ID. The important tokens are token number one, number three (which can be empty), and number four. (Note that this file is not a public interface.)

If you select the time zone called (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna in the Windows Control Panel, then the relevant line in the file tzmappings is:

W. Europe Standard Time:2,3::Europe/Berlin:

In this example, the JRE recognizes your default time zone (token number four) as Europe/Berlin.

If there is no appropriate mapping entry in the tzmappings file, then it is possible that Microsoft introduced a new time zone in a Windows update, and that the new time zone is not available to the JRE. In this situation, you can file a bug report for the JRE and request a new entry in the tzmappings file from the following URL:

http://bugs.sun.com

A similar disconnect between the operating system and the JRE is possible if you have run the tool tzedit.exe. This tool is posted by Microsoft on the Internet, and allows users to add new time zones. The JRE is unlikely to have a time zone introduced into the system by this tool. Again, the solution is to file a bug to request that a new entry be added to the tzmappings file.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration desktop-overview.gif

Documentation Contents

This diagram shows an overview of the Java SE desktop technologies within the context of the Java platform. It consists of a number of colored rectangular boxes.

The top element of the diagram is a green box labeled User Application.

Below it, in the middle of the diagram, is a grey box labeled Desktop Technologies which contains five smaller yellow boxes. The leftmost of the yellow boxes is labeled Deployment and the rightmost is labeled Media APIs. Between them, a box labeled Swing is placed above two smaller yellow boxes labeled AWT and Java 2D.

The bottom element of the diagram is a blue box labeled Core Tools and Libraries.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration font2dtest.png

Documentation Contents

This illustration shows a screenshot of the Font2DTest tool window. The menu bar at the top of the window contains two menus: File and Option.

Below the menu bar, the top half of the window contains four rows of various controls. The first row contains a drop-down list labeled Font with the Microsoft Sans Serif item selected, a text field labeled Size with 12 specified, and another drop-down list labeled Font Transform with the None item selected. The second row contains a grayed out drop-down list labeled Range with the Basic Latin item selected, a drop-down list labeled Style with the Plain item selected, and another drop-down list labeled Graphics Transform with the None item selected. The third row contains a grayed out drop-down list labeled Method with the drawGlyphVector item selected and another drop-down list labeled Text to use with the All Glyphs item selected. The fourth row contains a grayed out slider labeled LCD contrast with the value of 140 selected, a drop-down list labeled Antialiasing with the OFF item selected, and another drop-down list labeled Fractional metrics with the OFF item selected.

The bottom half of the window contains a table with a separate cell for each glyph of the selected font. There are 36 columns and 9 rows with a scrollbar on the right. Text under the table reads: Displaying Glyph Code 0000 to 0143.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration jres.png

Documentation Contents

This illustration shows a screenshot of the Java Runtime Environment Settings window. The window contains one group of settings labeled Java Runtime Versions. This group contains two tabs: User and System. The User tab is selected and it contains a table with the following column headings: Platform, Product, Location, Path, Runtime Parameters, and Enabled. There are two rows in the table. In the first row, Platform is set to 1.7, Product is set to 1.7.0-ea, Location starts with http://java..., Path starts with /home/buster/jd..., with no Runtime Parameters and a selected check box for Enabled. In the second row, Platform is set to 1.6, Product is set to 1.6.0-24, Location starts with http://java..., Path starts with /home/buster/A..., with no Runtime Parameters and a deselected check box for Enabled.

Under the table on the right, there are three buttons labeled Find, Add and Remove. The Remove button is grayed out.

Under those buttons and under the Java Runtime Versions group on the right, there are two buttons labeled OK and Cancel.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Command-Line Options

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

B Command-Line Options

This appendix describes some command-line options that can be useful in diagnosing problems with the Java HotSpot VM.

This appendix contains the following sections:

  • "HotSpot VM Command-Line Options"

  • "Other Command-Line Options"

HotSpot VM Command-Line Options

Command-line options that are prefixed with -XX are specific to the Java HotSpot Virtual Machine. Many of these options are important for performance tuning and diagnostic purposes, and are therefore described in this appendix. For information on all possible -XX options, see the Java HotSpot VM Options web page at

http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

You can dynamically set, unset, or change the value of certain Java VM flags for a specified Java process using the jinfo -flag command (see "The jinfo Utility") and the JConsole utility (see "JConsole").

For a complete list of these flags, use the MBeans tab of the JConsole utility. See the list of values for the DiagnosticOptions attribute of the HotSpotDiagnostic MBean, which is in the com.sun.management domain. These flags are the following:

  • HeapDumpOnOutOfMemoryError

  • HeapDumpPath

  • PrintGC

  • PrintGCDetails

  • PrintGCTimeStamps

  • PrintClassHistogram

  • PrintConcurrentLocks

The -XX:+HeapDumpOnOutOfMemoryError Option

This option tells the HotSpot VM to generate a heap dump when an allocation from the Java heap or the permanent generation cannot be satisfied. There is no overhead in running with this option, so it can be useful for production systems where the OutOfMemoryError exception takes a long time to surface.

You can also specify this option at runtime with the MBeans tab in the JConsole utility.

The heap dump is in HPROF binary format, and so it can be analyzed using any tools that can import this format. For example, the jhat tool can be used to do rudimentary analysis of the dump. For more information on the jhat tool, see "The jhat Utility".

The following example shows the result of running out of memory with this flag set:

$ java -XX:+HeapDumpOnOutOfMemoryError -mn256m -mx512m ConsumeHeap
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid2262.hprof ...
Heap dump file created [531535128 bytes in 14.691 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at ConsumeHeap$BigObject.(ConsumeHeap.java:22)
        at ConsumeHeap.main(ConsumeHeap.java:32)

The ConsumeHeap fills up the Java heap and runs out of memory. When the java.lang.OutOfMemoryError exception is thrown, a heap dump file is created. In this case the file is 507 MB and is created with the name java_pid2262.hprof in the current directory.

By default the heap dump is created in a file called java_pidpid.hprof in the working directory of the VM, as in the example above. You can specify an alternative file name or directory with the -XX:HeapDumpPath= option. For example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory.

The -XX:OnError= Option

When a fatal error occurs, the HotSpot VM can optionally execute a user-supplied script or command. The script or command is specified using the -XX:OnError=string command-line option, where string is a single command, or a list of commands separated by semicolons. Within this string, all occurrences of %p are replaced with the current PID, and all occurrences of %% are replaced by a single %. The following examples demonstrate how this option can be used when launching a Java application named MyApp with the java launcher.

Example 1java -XX:OnError="pmap %p" MyApp

On Solaris OS the pmap command displays information about the address space of a process. In the example above, if a fatal error occurs, the pmap command is executed to display the address space of the current process.

Example 2java -XX:OnError="cat hs_err_pid%p.log | mail support@acme.com" MyApp

In the example above, the contents of the fatal error log file are mailed to a support alias when a fatal error is encountered.

Example 3java -XX:OnError="gcore %p; dbx - %p" MyApp

On Solaris OS the gcore command creates a core image of the specified process, and the dbx command launches the debugger. In the example above, the gcore command is executed to create the core image of the current process, and the debugger is started to attach to the process when an unexpected error is encountered.

Example 4java -XX:OnError="gdb - %p" MyApp

On Linux the gdb command launches the debugger. In the example above, the gdb debugger is launched and attached to the current process when an unexpected error is encountered.

Example 5java -XX:OnError="userdump.exe %p" MyApp

On Windows the userdump.exe utility creates a crash dump of the specified process. The utility does not ship with Windows and should be downloaded from the Microsoft website as a part of the Microsoft OEM Support Tools package.

In the above example, the userdump.exe utility is executed to create a core dump of the current process in case of a fatal error.

Note:

The example assumes that the path to the userdump.exe utility is defined in the PATH variable.

Tip

If you do not have the userdump.exe utility installed, the Dr. Watson debugger can be configured as the post-mortem debugger so that a crash dump is created when an unexpected error is encountered.

For more information on creating crash dumps on Windows, see "Collecting Crash Dumps on Windows".

The -XX:+ShowMessageBoxOnError Option

When this option is set and a fatal error is encountered, the HotSpot VM will display information about the fatal error and prompt the user to specify whether the native debugger is to be launched. In the case of Solaris OS and Linux, the output and prompt are sent to the application console (standard input and standard output). In the case of Windows, a Windows message box pops up.

The following is an example of a fatal error encountered on a Linux system:

==============================================================================
Unexpected Error
------------------------------------------------------------------------------
SIGSEGV (0xb) at pc=0x2000000001164db1, pid=10791, tid=1026

Do you want to debug the problem?

To debug, run 'gdb /proc/10791/exe 10791'; then switch to thread 1026
Enter 'yes' to launch gdb automatically (PATH must include gdb)
Otherwise, press RETURN to abort...
==============================================================================

In this case a SIGSEGV error has occurred and the user is prompted to specify whether the gdb debugger is to be launched to attach to the process. If the user enters y or yes, gdb will be launched (assuming it is set in the PATH variable).

On Solaris OS the message is similar to the above except that the user is prompted to start the dbx debugger.

On Windows a message box is displayed. If the user clicks Yes, the VM will attempt to start the default debugger. This debugger is configured by a registry setting which is described in "Collecting Crash Dumps on Windows". If Microsoft Visual Studio is installed, the default debugger is typically configured to be msdev.exe.

In the above example the output includes the PID (pid=10791) and also the thread ID (tid=1026). If the debugger is launched, one of the initial steps in the debugger might be to select the thread and obtain its stack trace.

As the process is waiting for a response it is possible to use other tools to obtain a crash dump or query the state of the process. On Solaris OS, for example, a core dump can be obtained using the gcore utility.

On Windows a Dr. Watson crash dump can be obtained using the userdump or windbg programs. The windbg utility is included in Microsoft's Debugging Tools for Windows and is described in "Collecting Crash Dumps on Windows". In windbg, select the Attach to a Process menu option, which displays the list of processes and prompts for the PID. The HotSpot VM displays a message box, which includes the PID. Once selected the .dump /f command can be used to force a crash dump. In the following example a crash dump is created in a file named crash.dump.

Figure B-1 Example of a Crash Dump Created by windbg

Description of Figure B-1 follows
Description of "Figure B-1 Example of a Crash Dump Created by windbg"

In general the -XX:+ShowMessageBoxOnError option is more useful in a development environment where debugger tools are available. The -XX:OnError option is more suitable for production environments where a fixed sequence of commands or scripts are executed when a fatal error is encountered.

Other -XX Options

Several other -XX command-line options can be useful in troubleshooting:

-XX:OnOutOfMemoryError=string

This option can be used to specify a command or script to execute when an OutOfMemoryError exception is thrown.

-XX:ErrorFile=filename

This option can be used to specify a location for the fatal error log file (see "Location of Fatal Error Log").

-XX:HeapDumpPath=path

This option can be used to specify a location for the heap dump (see "The -XX:+HeapDumpOnOutOfMemoryError Option").

-XX:MaxPermSize=size

This option can be used to specify the size of the permanent generation memory (see "Exception in thread thread_name: java.lang.OutOfMemoryError: PermGen space").

-XX:+PrintCommandLineFlags

This option can be used to print all the VM command-line flags (see "Collecting Data for a Bug Report").

-XX:+PrintConcurrentLocks

This option can be used to cause the Control+Break handler to print a list of concurrent locks owned by each thread.

-XX:+PrintClassHistogram

This option can be used to cause the Control+Break handler to print a heap histogram.

-XX:+PrintGCDetails and -XX:+PrintGCTimeStamps

These options can be used to print detailed information about garbage collection (see "The -verbose:gc Option").

-XX:+UseAltSigs

On Solaris 8 and 9 OS, this option can be used to instruct the HotSpot VM to use alternate signals to SIGUSR1 and SIGUSR2 (see "Signal Handling on Solaris OS and Linux").

-XX:+UseConcMarkSweepGC, -XX:+UseSerialGC and -XX:+UseParallelGC

These options can be used to specify the garbage collection policy to be used (see "Working Around Crashes During Garbage Collection").

Other Command-Line Options

In addition to the -XX options, many other command-line options can provide troubleshooting information. This section describes a few of these options.

The -Xcheck:jni Option

This option is useful in diagnosing problems with applications that use the Java Native Interface (JNI). Sometimes bugs in the native code can cause the HotSpot VM to crash or behave incorrectly.

The -Xcheck:jni option is added to the command line that starts the application, as in the following example:

java -Xcheck:jni MyApp

The -Xcheck:jni option causes the VM to do additional validation on the arguments passed to JNI functions. Note that the option is not guaranteed to find all invalid arguments or diagnose logic bugs in the application code, but it can help diagnose a large number of such problems.

When an invalid argument is detected, the VM prints a message to the application console or to standard output, prints the stack trace of the offending thread, and aborts the VM.

In the following example, a null value was incorrectly passed to a JNI function that does not allow a null value.

FATAL ERROR in native method: Null object passed to JNI
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
    - locked <0x450b9f70> (a java.net.PlainSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:439)
    at java.net.ServerSocket.accept(ServerSocket.java:410)
    at org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket
                        (PoolTcpEndpoint.java:286)
    at org.apache.tomcat.service.TcpWorkerThread.runIt
                        (PoolTcpEndpoint.java:402)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
                        (ThreadPool.java:498)
    at java.lang.Thread.run(Thread.java:536)

In the following example, an incorrect argument was provided to a JNI function that expects a jfieldID argument.

FATAL ERROR in native method: Instance field not found in JNI get/set
                        field operations
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        - locked <0xf082f290> (a java.net.PlainSocketImpl)
        at java.net.ServerSocket.bind(ServerSocket.java:318)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at jvm003a.<init>(jvm003.java:190)
        at jvm003a.<init>(jvm003.java:151)
        at jvm003.run(jvm003.java:51)
        at jvm003.main(jvm003.java:30)

The following list presents examples of other problems that the -Xcheck:jni option can help diagnose:

  • Cases where the JNI environment for the wrong thread is used

  • Cases where an invalid JNI reference is used

  • Cases where a reference to a non-array type is provided to a function that requires an array type

  • Cases where a non-static field ID is provided to a function that expects a static field ID

  • Cases where a JNI call is made with an exception pending

In general, all errors detected by the -Xcheck:jni option are fatal errors (that is, the error is printed and the VM is aborted). There is one exception to this behavior, when a JNI call is made within a JNI critical region. In this case, the following non-fatal warning message is printed:

Warning: Calling other JNI functions in the scope of
Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical

A JNI critical region is created when native code uses the JNI functions GetPrimitiveArrayCritical or GetStringCritical to obtain a reference to an array or string in the Java heap. The reference is held until the native code calls the corresponding release function. The code between the get and release is called a JNI critical section and during that time the HotSpot VM cannot bring the VM to a state that allows garbage collection to occur. The general recommendation is not to use other JNI functions within a JNI critical section, and in particular any JNI function that could potentially cause a deadlock. The warning printed above by the -Xcheck:jni option is thus an indication of a potential issue; it does not always indicate an application bug.

For more information on JNI, refer to the Java Native Interface documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/jni/index.html

The -verbose:class Option

This option enables logging of class loading and unloading.

The -verbose:gc Option

This option enables logging of garbage collection (GC) information. It can be combined with other HotSpot VM specific options such as -XX:+PrintGCDetails and -XX:+PrintGCTimeStamps to get further information about GC. The information output includes the size of the generations before and after each GC, total size of the heap, the size of objects promoted, and the time taken.

These options, together with detailed information about GC analysis and tuning, are described in the GC Portal article at

http://www.oracle.com/technetwork/articles/javase/gcportal-136937.html

The -verbose:gc option can be dynamically enabled at runtime using the management API or JVM TI. For more information on these APIs, see "Custom Diagnostic Tools".

The JConsole monitoring and management tool can also enable or disable the option when the tool is attached to a management VM. For more information on JConsole, see "JConsole".

The -verbose:jni Option

This option enables logging of JNI. When a JNI or native method is resolved, the HotSpot VM prints a trace message to the application console (standard output). It also prints a trace message when a native method is registered using the JNI RegisterNative function. The -verbose:jni option can be useful in diagnosing issues with applications that use native libraries.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Detailed Tool Descriptions

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

2 Detailed Tool Descriptions

This chapter describes in detail the troubleshooting tools that are available in JDK 7 and tools specific to various operating systems. The chapter also explains how you can develop new tools using the application programing interfaces (APIs) provided by JDK 7.

This chapter contains the following sections:

  • "HPROF"

  • "Java VisualVM"

  • "JConsole"

  • "The jdb Utility"

  • "The jhat Utility"

  • "The jinfo Utility"

  • "The jmap Utility"

  • "The jps Utility"

  • "The jrunscript Utility"

  • "The jsadebugd Daemon"

  • "The jstack Utility"

  • "The jstat Utility"

  • "The jstatd Daemon"

  • "The visualgc Tool"

  • "Control+Break Handler"

  • "Native Operating System Tools"

  • "Custom Diagnostic Tools"

HPROF

HPROF is a tool for heap and CPU profiling shipped with every JDK release. It is a dynamically linked library (DLL) that interfaces with the Java Virtual Machine (JVM) using the Java Virtual Machine Tools Interface (JVM TI). The tool writes profiling information either to a file or to a socket in ASCII or binary format. This information can be further processed by a profiler front-end tool.

The HPROF tool is capable of presenting CPU usage, heap allocation statistics, and monitor contention profiles. In addition, it can report complete heap dumps and states of all the monitors and threads in the JVM. In terms of diagnosing problems, HPROF is useful when analyzing performance, lock contention, memory leaks, and other issues.

In addition to the HPROF library, the JDK release includes the source for HPROF as JVM TI demonstration code. This code is located in the $JAVA_HOME/demo/jvmti/hprof directory.

The HPROF tool is invoked as follows:

$ java -agentlib:hprof ToBeProfiledClass

Depending on the type of profiling requested, HPROF instructs the JVM to send it the relevant events. The tool then processes the event data into profiling information. For example, the following command obtains the heap allocation profile:

$ java -agentlib:hprof=heap=sites ToBeProfiledClass

The complete list of options is printed when the HPROF agent is provided with the help option, as shown below.

$ java -agentlib:hprof=help
     HPROF: Heap and CPU Profiling Agent (JVMTI Demonstration Code)
hprof usage: java -agentlib:hprof=[help]|[<option>=<value>, ...]
Option Name and Value  Description                    Default
---------------------  -----------                    -------
heap=dump|sites|all    heap profiling                 all
cpu=samples|times|old  CPU usage                      off
monitor=y|n            monitor contention             n
format=a|b             text(txt) or binary output     a
file=<file>            write data to file             java.hprof[{.txt}]
net=<host>:<port>      send data over a socket        off
depth=<size>           stack trace depth              4
interval=<ms>          sample interval in ms          10
cutoff=<value>         output cutoff point            0.0001
lineno=y|n             line number in traces?         y
thread=y|n             thread in traces?              n
doe=y|n                dump on exit?                  y
msa=y|n                Solaris micro state accounting n
force=y|n              force output to <file>         y
verbose=y|n            print messages about dumps     y
Obsolete Options
----------------
gc_okay=y|n
<>
Examples
--------
  - Get sample cpu information every 20 millisec, with a stack depth of 3:
      java -agentlib:hprof=cpu=samples,interval=20,depth=3 classname
  - Get heap usage information based on the allocation sites:
      java -agentlib:hprof=heap=sites classname
Notes
-----
  - The option format=b cannot be used with monitor=y.
  - The option format=b cannot be used with cpu=old|times.
  - Use of the -Xrunhprof interface can still be used, e.g.
       java -Xrunhprof:[help]|[<option>=<value>, ...]
    will behave exactly the same as:
       java -agentlib:hprof=[help]|[<option>=<value>, ...]
Warnings
--------
  - This is demonstration code for the JVMTI interface and use of BCI,
    it is not an official product or formal part of the JDK.
  - The -Xrunhprof interface will be removed in a future release.
  - The option format=b is considered experimental, this format may change
    in a future release.

By default, heap profiling information (sites and dump) is written out to java.hprof.txt (in ASCII) in the current working directory.

The output is normally generated when the JVM exits, although this can be disabled by setting the doe (dump on exit) option to n (doe=n). In addition, a profile is generated when Ctrl+\ (on Solaris OS and Linux) or Ctrl-Break (on Windows) is pressed. On Solaris OS and Linux a profile is also generated when a QUIT signal is received by a process (kill -QUIT pid). If Ctrl+\ or Ctrl-Break is pressed multiple times, multiple profiles are generated to the one file.

The output in most cases will contain IDs for traces, threads, and objects. Each type of ID will typically start with a different number than the other IDs. For example, traces might start with 300000.

Heap Allocation Profile (heap=sites)

The following is a heap allocation profile generated by running the Java compiler (javac) on a set of input files. Only parts of the profiler output are shown here.

$ javac -J-agentlib:hprof=heap=sites Hello.java
SITES BEGIN (ordered by live bytes) Wed Oct 4 13:13:42 2006
          percent          live          alloc'ed  stack class
 rank   self  accum     bytes objs     bytes  objs trace name
    1 44.13% 44.13%   1117360 13967  1117360 13967 301926 java.util.zip.ZipEntry
    2  8.83% 52.95%    223472 13967   223472 13967 301927 com.sun.tools.javac.util.List
    3  5.18% 58.13%    131088    1    131088     1 300996 byte[]
    4  5.18% 63.31%    131088    1    131088     1 300995 com.sun.tools.javac.util.Name[]

A crucial piece of information in the heap profile is the amount of allocation that occurs in various parts of the program. The SITES record above shows that 44.13% of the total space was allocated for the java.util.zip.ZipEntry objects.

A good way to relate allocation sites to the source code is to record the dynamic stack traces that led to the heap allocation. The following output shows another part of the profiler output. This output illustrates the stack traces referred to by the four allocation sites in output shown above.

TRACE 301926:
        java.util.zip.ZipEntry.<init>(ZipEntry.java:101)
        java.util.zip.ZipFile+3.nextElement(ZipFile.java:417)
        com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1374)
        com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1631)
TRACE 301927:
        com.sun.tools.javac.util.List.<init>(List.java:42)
        com.sun.tools.javac.util.List.<init>(List.java:50)
        com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:94)
        com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1374)
TRACE 300996:
        com.sun.tools.javac.util.Name$Table.<init>(Name.java:379)
        com.sun.tools.javac.util.Name$Table.<init>(Name.java:481)
        com.sun.tools.javac.util.Name$Table.make(Name.java:332)
        com.sun.tools.javac.util.Name$Table.instance(Name.java:349)
TRACE 300995:
        com.sun.tools.javac.util.Name$Table.<init>(Name.java:378)
        com.sun.tools.javac.util.Name$Table.<init>(Name.java:481)
        com.sun.tools.javac.util.Name$Table.make(Name.java:332)
        com.sun.tools.javac.util.Name$Table.instance(Name.java:349)

Each frame in the stack trace contains a class name, a method name, a source file name, and the line number. The user can set the maximum number of frames collected by the HPROF agent. The default limit is four. Stack traces reveal not only which methods performed heap allocation, but also which methods were ultimately responsible for making calls that resulted in memory allocation.

Heap Dump Profile (heap=dump)

A heap dump can be obtained using the heap=dump option. The heap dump is in either ASCII or binary format, depending on the setting of the format option. Tools such as jhat (see "The jhat Utility") use the binary format and therefore the format=b option is required. When the binary format is specified, the dump includes primitive type instance fields and primitive array content.

The following command produces a complete dump in ASCII text format of the current live objects in the heap from executing the javac compiler:

$ javac -J-agentlib:hprof=heap=dump Hello.java

The output is a large file. It consists of the root set as determined by the garbage collector, and an entry for each Java object in the heap that can be reached from the root set. The following is a selection of records from a sample heap dump.

HEAP DUMP BEGIN (39793 objects, 2628264 bytes) Wed Oct 4 13:54:03 2006
ROOT 50000114 (kind=<thread>, id=200002, trace=300000)
ROOT 50000006 (kind=<JNI global ref>, id=8, trace=300000)
ROOT 50008c6f (kind=<Java stack>, thread=200000, frame=5)
:
CLS 50000006 (name=java.lang.annotation.Annotation, trace=300000)
    loader        90000001
OBJ 50000114 (sz=96, trace=300001, class=java.lang.Thread@50000106)
    name        50000116
    group        50008c6c
    contextClassLoader    50008c53
    inheritedAccessControlContext    50008c79
    blockerLock    50000115
OBJ 50008c6c (sz=48, trace=300000, class=java.lang.ThreadGroup@50000068)
    name        50008c7d
    threads    50008c7c
    groups        50008c7b
ARR 50008c6f (sz=16, trace=300000, nelems=1,
     elem type=java.lang.String[]@5000008e)
    [0]        500007a5
CLS 5000008e (name=java.lang.String[], trace=300000)
    super        50000012
    loader        90000001
:
HEAP DUMP END

Each record is a ROOT, OBJ, CLS, or ARR to represent a root, an object instance, a class, or an array. The hexadecimal numbers are identifiers assigned by HPROF. These numbers are used to show the references from an object to another object. In the above example, the java.lang.Thread instance 50000114 has a reference to its thread group (50008c6c) and other objects.

In general, as the output is very large, it is necessary to use a tool to visualize or process the output of the heap dump. One such tool is jhat. See "The jhat Utility".

CPU Usage Sampling Profile (cpu=samples)

The HPROF tool can collect CPU usage information by sampling threads. The example below shows how to generate a CPU usage sampling profile by running the javac compiler.

$ javac -J-agentlib:hprof=cpu=samples Hello.java
CPU SAMPLES BEGIN (total = 462) Wed Oct 4 13:33:07 2006
rank   self  accum   count trace method
   1 49.57% 49.57%     229 300187 java.util.zip.ZipFile.getNextEntry
   2  6.93% 56.49%      32 300190 java.util.zip.ZipEntry.initFields
   3  4.76% 61.26%      22 300122 java.lang.ClassLoader.defineClass2
   4  2.81% 64.07%      13 300188 java.util.zip.ZipFile.freeEntry
   5  1.95% 66.02%       9 300129 java.util.Vector.addElement
   6  1.73% 67.75%       8 300124 java.util.zip.ZipFile.getEntry
   7  1.52% 69.26%       7 300125 java.lang.ClassLoader.findBootstrapClass
   8  0.87% 70.13%       4 300172 com.sun.tools.javac.main.JavaCompiler.<init>
   9  0.65% 70.78%       3 300030 java.util.zip.ZipFile.open
  10  0.65% 71.43%       3 300175 com.sun.tools.javac.main.JavaCompiler.<init>

...
CPU SAMPLES END

The HPROF agent periodically samples the stack of all running threads to record the most frequently active stack traces. The count field above indicates how many times a particular stack trace was found to be active. These stack traces correspond to the CPU usage hot spots in the application.

CPU Usage Times Profile (cpu=times)

The HPROF tool can collect CPU usage information by injecting code into every method entry and exit, thereby keeping track of exact method call counts and the time spent in each method. This process uses bytecode injection (BCI) and runs considerably slower than the cpu=samples option. Below is part of the CPU usage times profile output collected from a run of the javac compiler.

$ javac -J-agentlib:hprof=cpu=times Hello.java
CPU TIME (ms) BEGIN (total = 2082665289) Wed oct 4 13:43:42 2006
rank   self  accum   count trace method
   1  3.70%  3.70%       1 311243 com.sun.tools.javac.Main.compile
   2  3.64%  7.34%       1 311242 com.sun.tools.javac.main.Main.compile
   3  3.64% 10.97%       1 311241 com.sun.tools.javac.main.Main.compile
   4  3.11% 14.08%       1 311173 com.sun.tools.javac.main.JavaCompiler.compile
   5  2.54% 16.62%       8 306183 com.sun.tools.javac.jvm.ClassReader.listAll
   6  2.53% 19.15%      36 306182 com.sun.tools.javac.jvm.ClassReader.list
   7  2.03% 21.18%       1 307195 com.sun.tools.javac.comp.Enter.main
   8  2.03% 23.21%       1 307194 com.sun.tools.javac.comp.Enter.complete
   9  1.68% 24.90%       1 306392 com.sun.tools.javac.comp.Enter.classEnter
  10  1.68% 26.58%       1 306388 com.sun.tools.javac.comp.Enter.classEnter
...
CPU TIME (ms) END

In this output the count represents the true count of the number of times this method was entered, and the percentages represent a measure of thread CPU time spent in those methods.

Java VisualVM

Java VisualVM is one of the tools included in the JDK download (starting with JDK release 7 update 7). This tool is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' performance. With Java VisualVM you can generate and analyze heap dumps, track down memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU profiling. The tool is also useful for tuning, heap sizing, offline analysis, and post-mortem diagnosis.

In addition, you can use existing plug-ins that expand the functionality of Java VisualVM. For example, most of the functionality of the JConsole tool is available via the MBeans tab and the JConsole plug-in wrapper tab. You can choose from a catalog of standard Java VisualVM plug-ins by choosing Plugins from the Tools menu in the main Java VisualVM window.

For more information, see the Java VisualVM documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/visualvm/index.html

Java VisualVM allows you to perform the following troubleshooting activities:

  • View a list of local and remote Java applications.

  • View application configuration and runtime environment. For each application, the tool shows basic runtime information: PID, host, main class, arguments passed to the process, JVM version, JDK home, JVM flags, JVM arguments, system properties.

  • Enable and disable the creation of a heap dump when a specified application encounters an OutOfMemoryError exception.

  • Monitor application memory consumption, running threads, and loaded classes.

  • Trigger a garbage collection immediately.

  • Create a heap dump immediately. You can then view the heap dump in several views: summary, by class, by instance. You can also save the heap dump to your local file system.

  • Profile application performance or analyze memory allocation (for local applications only). You can also save the profiling data.

  • Create a thread dump (stack trace of the application's active threads) immediately. You can then view the thread dump.

  • Analyze core dumps (with Solaris OS and Linux).

  • Analyze applications offline, by taking application snapshots.

  • Get additional plug-ins contributed by the community.

  • Write and share your own plug-ins.

  • Display and interact with MBeans (after installing the MBeans tab plug-in).

When you start Java VisualVM, the main Application window opens, displaying a list of Java applications running on the local machine, a list of Java applications running on any connected remote machines, a list of any JVM core dumps that were taken and saved (with Solaris OS and Linux), and a list of any application snapshots that were taken and saved.

Java VisualVM will automatically detect and connect to the Java Management Extensions (JMX) agents for Java applications that are running on JDK 7 or that have been started with the correct system properties on version 5.0. In order for the tool to detect and connect to the agents on a remote machine, the jstatd daemon must be running on the remote machine (see "The jstatd Daemon"). In cases where Java VisualVM cannot automatically discover and connect to JMX agents that are running in a target application, the tool provides a means for you to explicitly create these connections.

JConsole

Another useful tool included in the JDK download is the JConsole monitoring tool. This tool is compliant with JMX. The tool uses the built-in JMX instrumentation in the JVM to provide information on the performance and resource consumption of running applications. Although the tool is included in the JDK download, it can also be used to monitor and manage applications deployed with the JRE.

The JConsole tool can attach to any Java application in order to display useful information such as thread usage, memory consumption, and details about class loading, runtime compilation, and the operating system.

This output helps with high-level diagnosis of problems such as memory leaks, excessive class loading, and running threads. It can also be useful for tuning and heap sizing.

In addition to monitoring, JConsole can be used to dynamically change several parameters in the running system. For example, the setting of the -verbose:gc option can be changed so that garbage collection trace output can be dynamically enabled or disabled for a running application.

The following list provides an idea of the data that can be monitored using the JConsole tool. Each heading corresponds to a tab pane in the tool.

  • Overview

    This pane displays graphs showing heap memory usage, number of threads, number of classes, and CPU usage over time. This overview allows you to visualize the activity of several resources at once.

  • Memory

    • For a selected memory area (heap, non-heap, various memory pools):

      • Graph showing memory usage over time

      • Current memory size

      • Amount of committed memory

      • Maximum memory size

    • Garbage collector information, including the number of collections performed, and the total time spent performing garbage collection.

    • Graph showing percentage of heap and non-heap memory currently used.

    In addition, on this pane you can request garbage collection to be performed.

  • Threads

    • Graph showing thread usage over time.

    • Live threads: Current number of live threads.

    • Peak: Highest number of live threads since the JVM started.

    • For a selected thread, the name, state, and stack trace, as well as, for a blocked thread, the synchronizer that the thread is waiting to acquire and the thread owning the lock.

    • The Deadlock Detection button sends a request to the target application to perform deadlock detection and displays each deadlock cycle in a separate tab.

  • Classes

    • Graph showing the number of loaded classes over time.

    • Number of classes currently loaded into memory.

    • Total number of classes loaded into memory since the JVM started, including those subsequently unloaded.

    • Total number of classes unloaded from memory since the JVM started.

  • VM Summary

    • General information, such as the JConsole connection data, uptime for the JVM, CPU time consumed by the JVM, complier name and total compile time, and so on.

    • Thread and class summary information.

    • Memory and garbage collection information, including number of objects pending finalization, and so on.

    • Information about the operating system, including physical characteristics, the amount of virtual memory for the running process, swap space, and so on.

    • Information about the JVM itself, such as arguments, class path, and so on.

  • MBeans

    This pane displays a tree structure showing all platform and application MBeans that are registered in the connected JMX agent. When you select an MBean in the tree, its attributes, operations, notifications, and other information are displayed.

    • You can invoke operations, if any. For example, the operation dumpHeap for the HotSpotDiagnostic MBean, which is in the com.sun.management domain, performs a heap dump. The input parameter for this operation is the pathname of the heap dump file on the machine where the target VM is running.

    • As another example of invoking an operation, you can set the value of writable attributes. For example, you can set, unset, or change the value of certain VM flags by invoking the setVMOption operation of the HotSpotDiagnostic MBean. The flags are indicated by the list of values of the DiagnosticOptions attribute.

    • You can subscribe to notifications, if any, by using the Subscribe and Unsubscribe buttons.

JConsole can monitor both local applications and remote applications. If you start the tool with an argument specifying a JMX agent to connect to, the tool will automatically start monitoring the specified application.

To monitor a local application, execute the command jconsole pid, where pid is the process ID of the application.

To monitor a remote application, execute the command jconsole hostname:portnumber, where hostname is the name of the host running the application, and portnumber is the port number you specified when you enabled the JMX agent.

If you execute the jconsole command without arguments, the tool will start by displaying the New Connection window, where you specify the local or remote process to be monitored. You can connect to a different host at any time by using the Connection menu.

With the JDK 1.5 release, you must start the application to be monitored with the -Dcom.sun.management.jmxremote option. With the JDK 7 release, no option is necessary when starting the application to be monitored.

As an example of the output of the monitoring tool, the following screen shows a chart of heap memory usage.

Figure 2-1 Sample Output from JConsole

Description of Figure 2-1 follows
Description of "Figure 2-1 Sample Output from JConsole"

A complete tutorial on the JConsole tool is beyond the scope of this document. However, for more details on the monitoring and management capabilities, and how to use JConsole, see the Java SE Monitoring and Management Guide at

http://docs.oracle.com/javase/8/docs/technotes/guides/management/index.html

You can also refer to the jconsole command man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jconsole.html

The jdb Utility

The jdb utility is included in the JDK release as the example command-line debugger. The jdb utility uses the Java Debug Interface (JDI) to launch or connect to the target JVM. The source code for jdb is included in $JAVA_HOME/demo/jpda/examples.jar.

JDI is a high-level Java API that provides information useful for debuggers and similar systems that need access to the running state of a (usually remote) virtual machine. JDI is a component of the Java Platform Debugger Architecture (JPDA). See "Java Platform Debugger Architecture".

In JDI a connector is the means by which the debugger connects to the target JVM. The JDK release has traditionally shipped with connectors that launch and establish a debugging session with a target JVM, as well as connectors that are used for remote debugging (using TCP/IP or shared memory transports).

This JDK release also ships with several Serviceability Agent (SA) connectors that allow a Java language debugger to attach to a crash dump or hung process. This can be useful in determining what the application was doing at the time of the crash or hang.

These connectors are SACoreAttachingConnector, SADebugServerAttachingConnector, and SAPIDAttachingConnector.

These connectors are generally used with enterprise debuggers, such as the NetBeans integrated development environment (IDE) or commercial IDEs. The following subsections demonstrate how these connectors can be used with the jdb command-line debugger.

For detailed information about the connectors, see the "Connectors" section of the JPDA documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html

The command jdb -listconnectors prints a list of the available connectors. The command jdb -help prints the command usage help.

For more information on the jdb utility, refer to the man pages:

  • Solaris OS and Linux:

    http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jdb.html

  • Windows:

    http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jdb.html

Attaching to a Process

This example uses the SA PID Attaching Connector to attach to a process. The target process is not started with any special options, that is, the -agentlib:jdwp option is not required. When this connector attaches to a process it does so in read-only mode: the debugger can examine threads and the running application but it cannot change anything. The process is frozen while the debugger is attached.

The command in the following example instructs jdb to use a connector named sun.jvm.hotspot.jdi.SAPIDAttachingConnector. This is a connector name rather than a class name. The connector takes one argument named pid, whose value is the process ID of the target process (9302 in this example).

$ jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=9302

Initializing jdb ...
> threads
Group system:
  (java.lang.ref.Reference$ReferenceHandler)0xa Reference Handler unknown
  (java.lang.ref.Finalizer$FinalizerThread)0x9  Finalizer         unknown
  (java.lang.Thread)0x8                         Signal Dispatcher running
  (java.lang.Thread)0x7                         Java2D Disposer   unknown
  (java.lang.Thread)0x2                         TimerQueue        unknown
Group main:
  (java.lang.Thread)0x6                         AWT-XAWT          running
  (java.lang.Thread)0x5                         AWT-Shutdown      unknown
  (java.awt.EventDispatchThread)0x4             AWT-EventQueue-0  unknown
  (java.lang.Thread)0x3                         DestroyJavaVM     running
  (sun.awt.image.ImageFetcher)0x1               Image Animator 0  sleeping
  (java.lang.Thread)0x0                         Intro             running
> thread 0x7
Java2D Disposer[1] where
  [1] java.lang.Object.wait (native method)
  [2] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:116)
  [3] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:132)
  [4] sun.java2d.Disposer.run (Disposer.java:125)
  [5] java.lang.Thread.run (Thread.java:619)
Java2D Disposer[1] up 1
Java2D Disposer[2] where
  [2] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:116)
  [3] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:132)
  [4] sun.java2d.Disposer.run (Disposer.java:125)
  [5] java.lang.Thread.run (Thread.java:619)

In this example the threads command is used to get a list of all threads. Then a specific thread is selected with the thread 0x7 command, and the where command is used to get a thread dump. Next the up 1 command is used to move up one frame in the stack, and the where command is used again to get a thread dump.

Attaching to a Core File on the Same Machine

The SA Core Attaching Connector is used to attach the debugger to a core file. The core file may have been created after a crash (see "Troubleshooting System Crashes"). The core file can also be obtained by using the gcore command on Solaris OS or the gcore command in gdb on Linux. Because the core file is a snapshot of the process at the time the core file was created, the connector attaches in read-only mode: the debugger can examine threads and the running application at the time of the crash.

The following command is an example of using this connector:

$ jdb -connect sun.jvm.hotspot.jdi.SACoreAttachingConnector:javaExecutable=$JAVA_HOME/bin/java,core=core.20441

This command instructs jdb to use a connector named sun.jvm.hotspot.jdi.SACoreAttachingConnector. The connector takes two arguments: javaExecutable and core. The javaExecutable argument indicates the name of the Java binary. The core argument is the core file name (the core from the process with PID 20441 in this example).

Attaching to a Core File or a Hung Process from a Different Machine

In order to debug a core file that has been transported from another machine, the OS versions and libraries must match. In this case you can first run a proxy server called the SA Debug Server. Then, on the machine where the debugger is installed, you can use the SA Debug Server Attaching Connector to connect to the debug server.

In the example below, there are two machines: machine1 and machine2. A core file is available on machine1 and the debugger is available on machine2. The SA Debug Server is started on machine1 as follows.

$ jsadebugd $JAVA_HOME/bin/java core.20441

The jsadebugd command takes two arguments. The first argument is the name of the executable. In most cases this is java, but it can be another name (in the case of embedded VMs, for example). The second argument is the name of the core file. In this example the core file was obtained for a process with PID 20441 using the gcore utility.

On machine2, the debugger connects to the remote SA Debug Server using the SA Debug Server Attaching Connector, as with the following command:

$ jdb -connect sun.jvm.hotspot.jdi.SADebugServerAttachingConnector:debugServerName=machine1

This command instructs jdb to use a connector named sun.jvm.hotspot.jdi.SADebugServerAttachingConnector. The connector has one argument debugServerName, which is the hostname or IP address of the machine where the SA Debug Server is running.

Note:

The SA Debug Server can also be used to remotely debug a hung process. In that case it takes a single argument which is the PID of the process. In addition, if it is required to run multiple debug servers on the same machine, each one must be provided with a unique ID. With the SA Debug Server Attaching Connector, this ID is provided as an additional connector argument. For more information on these and other related details, see the JPDA documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html

The jhat Utility

The jhat tool provides a convenient means to browse the object topology in a heap snapshot. This tool was introduced in the JDK 6 release to replace the Heap Analysis Tool (HAT).

For more information about the jhat utility, see the jhat man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jhat.html

The tool parses a heap dump in binary format, for example, a heap dump produced by jmap -dump.

This utility can help debug unintentional object retention. This term is used to describe an object that is no longer needed but is kept alive due to references through some path from the rootset. This can happen, for example, if an unintentional static reference to an object remains after the object is no longer needed, if an Observer or Listener fails to de-register itself from its subject when it is no longer needed, or if a Thread that refers to an object does not terminate when it should. Unintentional object retention is the Java language equivalent of a memory leak.

The tool provides a number of standard queries. For example, the Roots query displays all reference paths from the rootset to a specified object and is particularly useful for finding unnecessary object retention.

In addition to the standard queries, you can develop your own custom queries with the Object Query Language (OQL) interface.

When you issue the jhat command, the utility starts an HTTP server on a specified TCP port. You can then use any browser to connect to the server and execute queries on the specified heap dump.

The following example shows how to execute jhat to analyze a heap dump file named snapshot.hprof:

$ jhat snapshot.hprof
Started HTTP server on port 7000
Reading from java_pid2278.hprof...
Dump file created Fri May 19 17:18:38 BST 2006
Snapshot read, resolving...
Resolving 6162194 objects...
Chasing references, expect 12324 dots................................
Eliminating duplicate references.....................................
Snapshot resolved.
Server is ready.

At this point jhat has started an HTTP server on port 7000. Point your browser to http://localhost:7000 to connect to the jhat server.

When you are connected to the server, you can execute a standard query (see "Standard Queries") or create an OQL query (see "Custom Queries"). The All Classes query is displayed by default.

Standard Queries

This subsection describes the standard queries that you can execute once connected to the jhat server.

  • All Classes Query

    The default page is the All Classes query, which displays all of the classes present in the heap, excluding platform classes. This list is sorted by fully-qualified class name, and broken out by package. Click on the name of a class to go to the Class query.

    The second variant of this query includes the platform classes. Platform classes include classes whose fully-qualified names start with prefixes such as java, sun., javax.swing., or char[. The list of prefixes is in a system resource file called resources/platform_names.txt. You can override this list by replacing it in the JAR file, or by arranging for your replacement to occur first on the classpath when jhat is invoked.

  • Class Query

    The Class query displays information about a class. This includes its superclass, any subclasses, instance data members, and static data members. From this page you can navigate to any of the classes that are referenced, or you can navigate to an Instances query.

  • Object Query

    The Object query provides information about an object that was on the heap. From here, you can navigate to the class of the object and to the value of any object members. You can also navigate to objects that refer to the current object. Perhaps the most valuable query is at the end: the Roots query ("Reference Chains from Rootset").

    Note that the object query also provides a stack backtrace of the point of allocation of the object.

  • Instances Query

    The Instances query displays all instances of a given class. The allInstances variant includes instances of subclasses of the given class as well. From here, you can navigate back to the source class, or you can navigate to an Object query on one of the instances.

  • Roots Query

    The Roots query displays reference chains from the rootset to a given object. It provides one chain for each member of the rootset from which the given object is reachable. When calculating these chains, the tool does a depth-first search, so that it will provide reference chains of minimal length.

    There are two kinds of the Roots query: one that excludes weak references (Roots), and one that includes them (All Roots). A weak reference is a reference object that does not prevent its referent from being made finalizable, finalized, and then reclaimed. If an object is only referred to by a weak reference, it is usually not considered to be retained, because the garbage collector can collect it as soon as it needs the space.

    Note:

    This is probably the most valuable query in jhat for debugging unintentional object retention. Once you find an object that is being retained, this query tells you why it is being retained.

  • Reachable Objects Query

    This query is accessible from the Object query and shows the transitive closure of all objects reachable from a given object. This list is sorted in decreasing size, and alphabetically within each size. At the end, the total size of all of the reachable objects is given. This can be useful for determining the total runtime footprint of an object in memory, at least in systems with simple object topologies.

    This query is most valuable when used in conjunction with the -exclude command-line option. This is useful, for example, if the object being analyzed is an Observable. By default, all of its Observers would be reachable, which would count against the total size. The -exclude option allows you to exclude the data members java.util.Observable.obs and java.util.Observable.arr.

  • Instance Counts for All Classes Query

    This query shows the count of instances for every class in the system, excluding platform classes. It is sorted in descending order, by instance count. A good way to spot a problem with unintentional object retention is to run a program for a long time with a variety of input, then request a heap dump. Looking at the instance counts for all classes, you may recognize a number of classes because there are more instances than you expect. Then you can analyze them to determine why they are being retained (possibly using the Roots query). A variant of this query includes platform classes.

    For more information on platform classes, see "All Classes Query".

  • All Roots Query

    This query shows all members of the rootset, including weak references.

    For more information on weak references, see "All Roots Query".

  • New Instances Query

    The New Instances query is available only if you invoke the jhat server with two heap dumps. This query is similar to the Instances query, except that it shows only new instances. An instance is considered new if it is in the second heap dump and there is no object of the same type with the same ID in the baseline heap dump. An object's ID is a 32-bit or 64-bit integer that uniquely identifies the object.

  • Histogram Queries

    The built-in histogram and finalizer histogram queries also provide useful information.

Custom Queries

You can develop your own custom queries with the built-in Object Query Language (OQL) interface. Click on the Execute OQL Query button on the first page to display the OQL query page, where you can create and execute your custom queries. The OQL Help facility describes the built-in functions, with examples.

The syntax of the select statement is as follows:

select JavaScript-expression-to-select [from [instanceof] classname identifier [where JavaScript-boolean-expression-to-filter]]

The following is an example of the select statement:

select s from java.lang.String s where s.count >= 100

Heap Analysis Hints

To get useful information from jhat often requires some knowledge of the application and in addition some knowledge about the libraries and APIs that it uses. However in general the tool can be used to answer two important questions:

  • What is keeping an object alive?

    When viewing an object instance, you can check the objects listed in the section entitled "References to this object" to see which objects directly reference this object. More importantly you use the Roots query to determine the reference chains from the root set to the given object. These reference chains show a path from a root object to this object. With these chains you can quickly see how an object is reachable from the root set.

    As noted earlier, there are two kinds of Roots queries: one that excludes weak references (Roots), and one that includes them (All Roots). A weak reference is a reference object that does not prevent its referent from being made finalizable, finalized, and then reclaimed. If an object is only referred to by a weak reference, it usually is not considered to be retained, because the garbage collector can collect it as soon as it needs the space.

    The jhat tool sorts the rootset reference chains by the type of the root, in the following order:

    • Static data members of Java classes.

    • Java local variables. For these roots, the thread responsible for them is shown. Because a thread is a Java object, this link is clickable. This allows you, for example, to easily navigate to the name of the thread.

    • Native static values.

    • Native local variables. Again, such roots are identified with their thread.

  • Where was this object allocated?

    When an object instance is being displayed, the section entitled "Objects allocated from" shows the allocation site in the form of a stack trace. In this way, you can see where the object was created.

    Note that this allocation site information is available only if the heap dump was created with HPROF using the heap=all option. This HPROF option includes both the heap=dump option and the heap=sites option. For more information on HPROF and its options, see "HPROF".

    If the leak cannot be identified using a single object dump, then another approach is to collect a series of dumps and to focus on the objects created in the interval between each dump. The jhat tool provides this capability using the -baseline option.

    The -baseline option allows two dumps to be compared if they were produced by HPROF and from the same VM instance. If the same object appears in both dumps it will be excluded from the list of new objects reported. One dump is specified as a baseline and the analysis can focus on the objects that are created in the second dump since the baseline was obtained.

    The following example show how to specify the baseline:

    $ jhat -baseline snapshot.hprof#1 snapshot.hprof#2

    In the above example, the two dumps are in the file snapshot.hprof, and they are distinguished by appending #1 and #2 to the file name.

    When jhat is started with two heap dumps, the Instance Counts for All Classes query includes an additional column that is the count of the number of new objects for that type. An instance is considered new if it is in the second heap dump and there is no object of the same type with the same ID in the baseline. If you click on a new count, then jhat lists the new objects of that type. Then for each instance you can view where it was allocated, which objects these new objects reference, and which other objects reference the new object.

    In general, the -baseline option can be very useful if the objects that need to be identified are created in the interval between successive dumps.

The jinfo Utility

The jinfo command-line utility gets configuration information from a running Java process or crash dump and prints the system properties or the command-line flags that were used to start the JVM.

The utility can also use the jsadebugd daemon to query a process or core file on a remote machine. Note that the output takes longer to print in this case.

With the -flag option, the utility can dynamically set, unset, or change the value of certain JVM flags for the specified Java process. See "HotSpot VM Command-Line Options".

For more information on the jinfo utility, refer to the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jinfo.html

The following is an example of the output from a Java process with PID number 29620:

$ jinfo 29620
Attaching to process ID 29620, please wait...
Debugger attached successfully.
Client compiler detected.
JVM version is 1.6.0-rc-b100
Java System Properties:

java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = /usr/jdk/instances/jdk1.6.0/jre/lib/sparc
java.vm.version = 1.6.0-rc-b100
java.vm.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
path.separator = :
java.vm.name = Java HotSpot(TM) Client VM
file.encoding.pkg = sun.io
sun.java.launcher = SUN_STANDARD
sun.os.patch.level = unknown
java.vm.specification.name = Java Virtual Machine Specification
user.dir = /home/js159705
java.runtime.version = 1.6.0-rc-b100
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.endorsed.dirs = /usr/jdk/instances/jdk1.6.0/jre/lib/endorsed
os.arch = sparc
java.io.tmpdir = /var/tmp/
line.separator =

java.vm.specification.vendor = Sun Microsystems Inc.
os.name = SunOS
sun.jnu.encoding = ISO646-US
java.library.path = /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/client:/usr/jdk/instances/jdk1.6.0/jre/lib/sparc:
/usr/jdk/instances/jdk1.6.0/jre/../lib/sparc:/net/gtee.sfbay/usr/sge/sge6/lib/sol-sparc64:
/usr/jdk/packages/lib/sparc:/lib:/usr/lib
java.specification.name = Java Platform API Specification
java.class.version = 50.0
sun.management.compiler = HotSpot Client Compiler
os.version = 5.10
user.home = /home/js159705
user.timezone = US/Pacific
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = ISO646-US
java.specification.version = 1.6
java.class.path = /usr/jdk/jdk1.6.0/demo/jfc/Java2D/Java2Demo.jar
user.name = js159705
java.vm.specification.version = 1.0
java.home = /usr/jdk/instances/jdk1.6.0/jre
sun.arch.data.model = 32
user.language = en
java.specification.vendor = Sun Microsystems Inc.
java.vm.info = mixed mode, sharing
java.version = 1.6.0-rc
java.ext.dirs = /usr/jdk/instances/jdk1.6.0/jre/lib/ext:/usr/jdk/packages/lib/ext
sun.boot.class.path = /usr/jdk/instances/jdk1.6.0/jre/lib/resources.jar:
/usr/jdk/instances/jdk1.6.0/jre/lib/rt.jar:/usr/jdk/instances/jdk1.6.0/jre/lib/sunrsasign.jar:
/usr/jdk/instances/jdk1.6.0/jre/lib/jsse.jar:
/usr/jdk/instances/jdk1.6.0/jre/lib/jce.jar:/usr/jdk/instances/jdk1.6.0/jre/lib/charsets.jar:
/usr/jdk/instances/jdk1.6.0/jre/classes
java.vendor = Sun Microsystems Inc.
file.separator = /
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding = UnicodeBig
sun.cpu.endian = big
sun.cpu.isalist =

VM Flags:

If you start the target JVM with the -classpath and -Xbootclasspath arguments, the output from jinfo provides the settings for java.class.path and sun.boot.class.path. This information might be needed when investigating class loader issues.

In addition to obtaining information from a process, the jinfo tool can use a core file as input. On Solaris OS, for example, the gcore utility can be used to get a core file of the process in the above example. The core file will be named core.29620 and will be generated in the working directory of the process. The path to the Java executable and the core file must be specified as arguments to the jinfo utility, as in the following example:

$ jinfo $JAVA_HOME/bin/java core.29620

Sometimes the binary name will not be java. This occurs when the VM is created using the JNI invocation API. The jinfo tool requires the binary from which the core file was generated.

The jmap Utility

The jmap command-line utility prints memory related statistics for a running VM or core file.

The utility can also use the jsadebugd daemon to query a process or core file on a remote machine. Note that the output takes longer to print in this case.

If jmap is used with a process or core file without any command-line options, then it prints the list of shared objects loaded (the output is similar to the pmap utility on Solaris OS). For more specific information, you can use the options -heap, -histo, or -permstat. These options are described in the subsections that follow.

In addition, the JDK 7 release introduced the -dump:format=b,file=filename option, which causes jmap to dump the Java heap in binary HPROF format to a specified file. This file can then be analyzed with the jhat tool.

If the jmap pid command does not respond because of a hung process, the -F option can be used (on Solaris OS and Linux only) to force the use of the Serviceability Agent.

For more information on the jmap utility, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jmap.html

Heap Configuration and Usage

The -heap option is used to obtain the following Java heap information:

  • Information specific to the garbage collection (GC) algorithm, including the name of the GC algorithm (for example, Parallel GC) and algorithm specific details (such as number of threads for parallel GC).

  • Heap configuration that might have been specified as command-line options or selected by the VM based on the machine configuration.

  • Heap usage summary. For each generation (area of the heap), the tool prints the total heap capacity, in-use memory, and available free memory. If a generation is organized as a collection of spaces (for example, the new generation), then a space-wise memory size summary is included.

The following example shows output from the jmap -heap command.

$ jmap -heap 29620
Attaching to process ID 29620, please wait...
Debugger attached successfully.
Client compiler detected.
JVM version is 1.6.0-rc-b100

using thread-local object allocation.
Mark Sweep Compact GC

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 67108864 (64.0MB)
   NewSize          = 2228224 (2.125MB)
   MaxNewSize       = 4294901760 (4095.9375MB)
   OldSize          = 4194304 (4.0MB)
   NewRatio         = 8
   SurvivorRatio    = 8
   PermSize         = 12582912 (12.0MB)
   MaxPermSize      = 67108864 (64.0MB)

Heap Usage:
New Generation (Eden + 1 Survivor Space):
   capacity = 2031616 (1.9375MB)
   used     = 70984 (0.06769561767578125MB)
   free     = 1960632 (1.8698043823242188MB)
   3.4939673639112905% used
Eden Space:
   capacity = 1835008 (1.75MB)
   used     = 36152 (0.03447723388671875MB)
   free     = 1798856 (1.7155227661132812MB)
   1.9701276506696428% used
From Space:
   capacity = 196608 (0.1875MB)
   used     = 34832 (0.0332183837890625MB)
   free     = 161776 (0.1542816162109375MB)
   17.716471354166668% used
To Space:
   capacity = 196608 (0.1875MB)
   used     = 0 (0.0MB)
   free     = 196608 (0.1875MB)
   0.0% used
tenured generation:
   capacity = 15966208 (15.2265625MB)
   used     = 9577760 (9.134063720703125MB)
   free     = 6388448 (6.092498779296875MB)
   59.98769400974859% used
Perm Generation:
   capacity = 12582912 (12.0MB)
   used     = 1469408 (1.401336669921875MB)
   free     = 11113504 (10.598663330078125MB)
   11.677805582682291% used

Heap Histogram

The jmap command with the -histo option can be used to obtain a class-wise histogram of the heap. Depending on the parameter specified, the jmap -histo command can print out the heap histogram for a running process or a core file.

When the command is executed on a running process, the tool prints the number of objects, memory size in bytes, and fully qualified class name for each class. Internal classes in the HotSpot VM are enclosed in angle brackets. The histogram is useful in understanding how the heap is used. To get the size of an object you must divide the total size by the count of that object type.

The following example shows output from the jmap -histo command when it is executed on a process with PID number 29620:

$ jmap -histo 29620
num   #instances    #bytes  class name
--------------------------------------
  1:      1414     6013016  [I
  2:       793      482888  [B
  3:      2502      334928  <constMethodKlass>
  4:       280      274976  <instanceKlassKlass>
  5:       324      227152  [D
  6:      2502      200896  <methodKlass>
  7:      2094      187496  [C
  8:       280      172248  <constantPoolKlass>
  9:      3767      139000  [Ljava.lang.Object;
 10:       260      122416  <constantPoolCacheKlass>
 11:      3304      112864  <symbolKlass>
 12:       160       72960  java2d.Tools$3
 13:       192       61440  <objArrayKlassKlass>
 14:       219       55640  [F
 15:      2114       50736  java.lang.String
 16:      2079       49896  java.util.HashMap$Entry
 17:       528       48344  [S
 18:      1940       46560  java.util.Hashtable$Entry
 19:       481       46176  java.lang.Class
 20:        92       43424  javax.swing.plaf.metal.MetalScrollButton
... more lines removed here to reduce output...
1118:         1           8  java.util.Hashtable$EmptyIterator
1119:         1           8  sun.java2d.pipe.SolidTextRenderer
Total    61297    10152040

When the jmap -histo command is executed on a core file, the tool prints the size, count, and class name for each class. Internal classes in the HotSpot VM are prefixed with an asterisk (*).

The following example shows output of the jmap -histo command when it is executed on a core file:

& jmap -histo /net/koori.sfbay/onestop/jdk/6.0/promoted/all/b100/binaries/solaris-sparcv9/bin/java core
Attaching to core core from executable /net/koori.sfbay/onestop/jdk/6.0/
promoted/all/b100/binaries/solaris-sparcv9/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.6.0-rc-b100
Iterating over heap. This may take a while...
Heap traversal took 8.902 seconds.

Object Histogram:

Size    Count    Class description
-------------------------------------------------------
4151816    2941    int[]
2997816    26403    * ConstMethodKlass
2118728    26403    * MethodKlass
1613184    39750    * SymbolKlass
1268896    2011    * ConstantPoolKlass
1097040    2011    * InstanceKlassKlass
882048    1906    * ConstantPoolCacheKlass
758424    7572    char[]
733776    2518    byte[]
252240    3260    short[]
214944    2239    java.lang.Class
177448    3341    * System ObjArray
176832    7368    java.lang.String
137792    3756    java.lang.Object[]
121744    74    long[]
72960    160    java2d.Tools$3
63680    199    * ObjArrayKlassKlass
53264    158    float[]
... more lines removed here to reduce output...

Permanent Generation Statistics

The permanent generation is the area of the heap that holds all the reflective data of the virtual machine itself, such as class and method objects (also called "method area" in The Java Virtual Machine Specification).

Configuring the size of the permanent generation can be important for applications that dynamically generate and load a very large number of classes (for example, Java Server Pages/web containers). If an application loads "too many" classes, then it is possible it will abort with the following error:

Exception in thread thread_name java.lang.OutOfMemoryError: PermGen space

For a description of this and other variants of the OutOfMemoryError exception, see "Understanding the OutOfMemoryError Exception".

To get further information about the permanent generation, you can use the -permstat option of the jmap command to print statistics for the objects in the permanent generation. The following example shows output from the jmap -permstat command executed on a process with PID number 29620:

$ jmap -permstat 29620
Attaching to process ID 29620, please wait...
Debugger attached successfully.
Client compiler detected.
JVM version is 1.6.0-rc-b100
12674 intern Strings occupying 1082616 bytes.
finding class loader instances ..Unknown oop at 0xd0400900
Oop's klass is 0xd0bf8408
Unknown oop at 0xd0401100
Oop's klass is null
done.
computing per loader stat ..done.
please wait.. computing liveness.........................................done.
class_loader    classes bytes   parent_loader   alive?  type

<bootstrap>     1846 5321080  null        live   <internal>
0xd0bf3828  0      0      null         live    sun/misc/Launcher$ExtClassLoader@0xd8c98c78
0xd0d2f370  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0c99280  1   1440      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0b71d90  0      0   0xd0b5b9c0    live java/util/ResourceBundle$RBClassLoader@0xd8d042e8
0xd0d2f4c0  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0b5bf98  1    920   0xd0b5bf38      dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0c99248  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f488  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0b5bf38  6   11832  0xd0b5b9c0      dead    sun/reflect/misc/MethodUtil@0xd8e8e560
0xd0d2f338  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f418  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f3a8  1    904     null          dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0b5b9c0  317 1397448 0xd0bf3828     live    sun/misc/Launcher$AppClassLoader@0xd8cb83d8
0xd0d2f300  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f3e0  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0ec3968  1   1440      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0e0a248  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0c99210  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f450  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0d2f4f8  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50
0xd0e0a280  1    904      null         dead    sun/reflect/DelegatingClassLoader@0xd8c22f50

total = 22      2186    6746816   N/A   alive=4, dead=18       N/A

For each class loader object, the following details are printed:

  • The address of the class loader object at the snapshot when the utility was run

  • The number of classes loaded

  • The approximate number of bytes consumed by meta-data for all classes loaded by this class loader

  • The address of the parent class loader (if any)

  • A "live" or "dead" indication of whether the loader object will be garbage collected in the future

  • The class name of this class loader

The jps Utility

The jps utility lists the instrumented HotSpot VMs for the current user on the target system. The utility is very useful in environments where the VM is embedded, that is, it is started using the JNI Invocation API rather than the java launcher. In these environments it is not always easy to recognize the Java processes in the process list.

The following example demonstrates the usage of the jps utility.

$ jps
16217 MyApplication
16342 jps

The utility lists the virtual machines for which the user has access rights. This is determined by access-control mechanisms specific to the operating system. On Solaris OS, for example, if a non-root user executes the jps utility, the output is a list of the virtual machines that were started with that user's uid.

In addition to listing the PID, the utility provides options to output the arguments passed to the application's main method, the complete list of VM arguments, and the full package name of the application's main class. The jps utility can also list processes on a remote system if the remote system is running the jstatd daemon.

If you are running several Java Web Start applications on a system, they tend to look the same, as shown in the following example:

$ jps
1271 jps
     1269 Main
     1190 Main

In this case, use jps -m to distinguish them, as follows:

$ jps -m
1271 jps -m
     1269 Main http://bugster.central.sun.com/bugster.jnlp
     1190 Main http://webbugs.sfbay/IncidentManager/incident.jnlp

For more information on the jps utility, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jps.html

The utility is included in the JDK download for all operating system platforms supported by Sun.

Note:

The HotSpot instrumentation is not accessible on Windows 98 or Windows ME. In addition, the instrumentation might not be accessible on Windows if the temporary directory is on a FAT32 file system.

The jrunscript Utility

The jrunscript utility is a command-line script shell. It supports script execution in both interactive mode and in batch mode. By default, the shell uses JavaScript, but you can specify any other scripting language for which you supply the path to the script engines's JAR file of .class files.

Thanks to the communication between the Java language and the scripting language, the jrunscript utility supports an exploratory programming style.

For more information on the jrunscript utility, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jrunscript.html

The jsadebugd Daemon

The Java Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. This utility is currently available only on Solaris OS and Linux. Remote clients such as jstack, jmap, and jinfo can attach to the server using Java Remote Method Invocation (RMI).

For more information on jsadebugd, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jsadebugd.html

The jstack Utility

The jstack command-line utility attaches to the specified process or core file and prints the stack traces of all threads that are attached to the virtual machine, including Java threads and VM internal threads, and optionally native stack frames. The utility also performs deadlock detection.

The utility can also use the jsadebugd daemon to query a process or core file on a remote machine. Note that the output takes longer to print in this case.

A stack trace of all threads can be useful in diagnosing a number of issues such as deadlocks or hangs.

The JDK 7 release introduced the -l option, which instructs the utility to look for ownable synchronizers in the heap and print information about java.util.concurrent.locks. Without this option, the thread dump includes information only on monitors.

Starting with JDK 7, the output from the jstack pid option is the same as that obtained by pressing Ctrl+\ at the application console (standard input) or by sending the process a QUIT signal. See "Control+Break Handler" for an output example.

Thread dumps can also be obtained programmatically using the Thread.getAllStackTraces method, or in the debugger using the debugger option to print all thread stacks (the where command in the case of the jdb sample debugger).

For more information on the jstack utility, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstack.html

Forcing a Stack Dump

If the jstack pid command does not respond because of a hung process, the -F option can be used (on Solaris OS and Linux only) to force a stack dump, as in the following example:

$ jstack -F 8321
Attaching to process ID 8321, please wait...
Debugger attached successfully.
Client compiler detected.
JVM version is 1.6.0-rc-b100
Deadlock Detection:

Found one Java-level deadlock:
=============================

"Thread2":
  waiting to lock Monitor@0x000af398 (Object@0xf819aa10, a java/lang/String),
  which is held by "Thread1"
"Thread1":
  waiting to lock Monitor@0x000af400 (Object@0xf819aa48, a java/lang/String),
  which is held by "Thread2"

Found a total of 1 deadlock.

Thread t@2: (state = BLOCKED)

Thread t@11: (state = BLOCKED)
 - Deadlock$DeadlockMakerThread.run() @bci=108, line=32 (Interpreted frame)

Thread t@10: (state = BLOCKED)
 - Deadlock$DeadlockMakerThread.run() @bci=108, line=32 (Interpreted frame)

Thread t@6: (state = BLOCKED)

Thread t@5: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=-1107318896 (Interpreted frame)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2, line=132 (Interpreted frame)
 - java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Interpreted frame)

Thread t@4: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
 - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame)

Printing Stack Trace From Core Dump

To obtain stack traces from a core dump, execute the jstack command on a core file, as follows:

$ jstack $JAVA_HOME/bin/java core

Printing a Mixed Stack

The jstack utility can also be used to print a mixed stack, that is, it can print native stack frames in addition to the Java stack. Native frames are the C/C++ frames associated with VM code and JNI/native code.

To print a mixed stack, use the -m option, as in the following example:

$ jstack -m 21177
Attaching to process ID 21177, please wait...
Debugger attached successfully.
Client compiler detected.
JVM version is 1.6.0-rc-b100
Deadlock Detection:

Found one Java-level deadlock:
=============================

"Thread1":
  waiting to lock Monitor@0x0005c750 (Object@0xd4405938, a java/lang/String),
  which is held by "Thread2"
"Thread2":
  waiting to lock Monitor@0x0005c6e8 (Object@0xd4405900, a java/lang/String),
  which is held by "Thread1"

Found a total of 1 deadlock.

----------------- t@1 -----------------
0xff2c0fbc    __lwp_wait + 0x4
0xff2bc9bc    _thrp_join + 0x34
0xff2bcb28    thr_join + 0x10
0x00018a04    ContinueInNewThread + 0x30
0x00012480    main + 0xeb0
0x000111a0    _start + 0x108
----------------- t@2 -----------------
0xff2c1070    ___lwp_cond_wait + 0x4
0xfec03638    bool Monitor::wait(bool,long) + 0x420
0xfec9e2c8    bool Threads::destroy_vm() + 0xa4
0xfe93ad5c    jni_DestroyJavaVM + 0x1bc
0x00013ac0    JavaMain + 0x1600
0xff2bfd9c    _lwp_start
----------------- t@3 -----------------
0xff2c1070    ___lwp_cond_wait + 0x4
0xff2ac104    _lwp_cond_timedwait + 0x1c
0xfec034f4    bool Monitor::wait(bool,long) + 0x2dc
0xfece60bc    void VMThread::loop() + 0x1b8
0xfe8b66a4    void VMThread::run() + 0x98
0xfec139f4    java_start + 0x118
0xff2bfd9c    _lwp_start
----------------- t@4 -----------------
0xff2c1070    ___lwp_cond_wait + 0x4
0xfec195e8    void os::PlatformEvent::park() + 0xf0
0xfec88464    void ObjectMonitor::wait(long long,bool,Thread*) + 0x548
0xfe8cb974    void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0x148
0xfe8cb508    JVM_MonitorWait + 0x29c
0xfc40e548    * java.lang.Object.wait(long) bci:0 (Interpreted frame)
0xfc40e4f4    * java.lang.Object.wait(long) bci:0 (Interpreted frame)
0xfc405a10    * java.lang.Object.wait() bci:2 line:485 (Interpreted frame)
... more lines removed here to reduce output...
----------------- t@12 -----------------
0xff2bfe3c    __lwp_park + 0x10
0xfe9925e4    AttachOperation*AttachListener::dequeue() + 0x148
0xfe99115c    void attach_listener_thread_entry(JavaThread*,Thread*) + 0x1fc
0xfec99ad8    void JavaThread::thread_main_inner() + 0x48
0xfec139f4    java_start + 0x118
0xff2bfd9c    _lwp_start
----------------- t@13 -----------------
0xff2c1500    _door_return + 0xc
----------------- t@14 -----------------
0xff2c1500    _door_return + 0xc

Frames that are prefixed with an asterisk (*) are Java frames, while frames that are not prefixed with an asterisk are native C/C++ frames.

The output of the utility can be piped through c++filt to demangle C++ mangled symbol names. Because the HotSpot VM is developed in the C++ language, the jstack utility prints C++ mangled symbol names for the HotSpot internal functions. The c++filt utility is delivered with the native C++ compiler suite: SUNWspro on Solaris OS and gnu on Linux.

The jstat Utility

The jstat utility uses the built-in instrumentation in the HotSpot VM to provide information on performance and resource consumption of running applications. The tool can be used when diagnosing performance issues, and in particular issues related to heap sizing and garbage collection. The jstat utility does not require the VM to be started with any special options. The built-in instrumentation in the HotSpot VM is enabled by default. The utility is included in the JDK download for all operating system platforms supported by Oracle, Inc.

Note:

The instrumentation is not accessible on Windows 98 or Windows ME. In addition, instrumentation is not accessible on Windows NT, 2000, or XP if a FAT32 file system is used.

The jstat Utility Options

-class

Specify this option to print statistics on the behavior of the class loader.

-compiler

Specify this option to print statistics of the behavior of the HotSpot compiler.

-gc

Specify this option to print statistics of the behavior of the garbage collected heap.

-gccapacity

Specify this option to print statistics of the capacities of the generations and their corresponding spaces.

-gccause

Specify this option to print the summary of garbage collection statistics (same as -gcutil), with the cause of the last and current (if applicable) garbage collection events.

-gcnew

Specify this option to print statistics of the behavior of the new generation.

-gcnewcapacity

Specify this option to print statistics of the sizes of the new generations and its corresponding spaces.

-gcold

Specify this option to print statistics of the behavior of the old and permanent generations.

-gcoldcapacity

Specify this option to print statistics of the sizes of the old generation.

-gcmetacapacity

Specify this option to print statistics of the sizes of the metaspace.

-gcutil

Specify this option to print a summary of garbage collection statistics.

-printcompilation

Specify this option to print HotSpot compilation method statistics.

For more information on the jstat utility, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html

The documentation includes a number of examples, and a few of those examples are repeated here in this document.

The jstat utility uses the virtual machine identifier (VMID) to identify the target process. The documentation describes the syntax of the VMID but its only required component is the local virtual machine identifier (LVMID) which is typically the operating system's PID for the target JVM process. Note that this is typical but may not always be the case.

The jstat tool provides data similar to the data provided by the tools vmstat and iostat on Solaris OS and Linux.

For a graphical representation of the data, you can use the visualgc tool. See "The visualgc Tool".

The jstat Utility Examples

Example 1Using the -gcutil option.

Below is an example of using the -gcutil option where the jstat utility attaches to LVMID number 2834, takes nine samples at 250 millisecond intervals, and displays the output.

$ jstat -gcutil 2834 250 7
  S0     S1     E      O      M     YGC     YGCT    FGC    FGCT     GCT
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
  0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124

The output of this example shows that a young generation collection occurred between the third and fourth samples. The collection took 0.017 seconds and promoted objects from the eden space (E) to the old space (O), resulting in an increase of old space utilization from 46.56% to 54.60%.

Example 2Using the -gcnew option.

The following example illustrates the use of the -gcnew option where the jstat utility attaches to LVMID number 2834, takes samples at 250 millisecond intervals, and displays the output. In addition, it uses the -h3 option to display the column headers after every 3 lines of data.

$ jstat -gcnew -h3 2834 250
S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
 192.0  192.0    0.0    0.0 15  15   96.0   1984.0    942.0    218    1.999
 192.0  192.0    0.0    0.0 15  15   96.0   1984.0   1024.8    218    1.999
 192.0  192.0    0.0    0.0 15  15   96.0   1984.0   1068.1    218    1.999
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
 192.0  192.0    0.0    0.0 15  15   96.0   1984.0   1109.0    218    1.999
 192.0  192.0    0.0  103.2  1  15   96.0   1984.0      0.0    219    2.019
 192.0  192.0    0.0  103.2  1  15   96.0   1984.0     71.6    219    2.019
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
 192.0  192.0    0.0  103.2  1  15   96.0   1984.0     73.7    219    2.019
 192.0  192.0    0.0  103.2  1  15   96.0   1984.0     78.0    219    2.019
 192.0  192.0    0.0  103.2  1  15   96.0   1984.0    116.1    219    2.019

In addition to showing the repeating header string, this example shows that between the fourth and fifth samples, a young generation collection occurred, whose duration was 0.02 seconds. The collection found enough live data that the survivor space 1 utilization (S1U) would have exceeded the desired survivor size (DSS). As a result, objects were promoted to the old generation (not visible in this output), and the tenuring threshold (TT) was lowered from 15 to 1.

Example 3Using the -gcoldcapacity option.

The following example illustrates the use of the -gcoldcapacity option where the jstat utility attaches to LVMID number 21891 and takes three samples at 250 millisecond intervals. The -t option is used to generate a time stamp for each sample in the first column.

$ jstat -gcoldcapacity -t 21891 250 3
Timestamp    OGCMN     OGCMX       OGC        OC   YGC   FGC     FGCT     GCT
    150.1   1408.0   60544.0   11696.0   11696.0   194    80    2.874   3.799
    150.4   1408.0   60544.0   13820.0   13820.0   194    81    2.938   3.863
    150.7   1408.0   60544.0   13820.0   13820.0   194    81    2.938   3.863

The Timestamp column reports the elapsed time in seconds since the start of the target JVM. In addition, the -gcoldcapacity output shows the old generation capacity (OGC) and the old space capacity (OC) increasing as the heap expands to meet allocation or promotion demands. The OGC has grown from 11696 KB to 13820 KB after the 81st full generation capacity (FGC). The maximum capacity of the generation (and space) is 60544 KB (OGCMX), so it still has room to expand.

The jstatd Daemon

The jstatd daemon is an RMI server application that monitors the creation and termination of instrumented Java HotSpot VMs and provides an interface to allow remote monitoring tools to attach to JVMs running on the local host. For example, this daemon allows the jps utility to list processes on a remote system.

Note:

The instrumentation is not accessible on Windows 98 or Windows ME. In addition, instrumentation is not accessible on Windows NT, 2000, or XP if a FAT32 file system is used.

For more information about the jstatd daemon, including detailed usage examples, see the man page at

http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstatd.html

The visualgc Tool

The visualgc tool is related to the jstat tool (see "The jstat Utility"). The visualgc tool provides a graphical view of the garbage collection (GC) system. As with jstat, it uses the built-in instrumentation of the HotSpot VM.

The visualgc tool is not included in the JDK release but is available as a separate download from the jvmstat 3.0 web site at

http://www.oracle.com/technetwork/java/jvmstat-142257.html

The following screenshot output demonstrates how the GC and heap are visualized.

Figure 2-2 Sample Output from visualgc

Description of Figure 2-2 follows
Description of "Figure 2-2 Sample Output from visualgc"

Control+Break Handler

On Solaris OS or Linux, the combination of pressing the Control key and the backslash (\) key at the application console (standard input) causes the HotSpot VM to print a thread dump to the application's standard output. On Windows the equivalent key sequence is the Control and Break keys. The general term for these key combinations is the Control+Break handler.

On Solaris OS and Linux, a thread dump is printed if the Java process receives a QUIT signal. Therefore, the kill -QUIT pid command causes the process with the ID pid to print a thread dump to standard output.

The following sections describe the data printed by the Control+Break handler:

  • "Thread Dump"

  • "Detected Deadlocks"

  • "Heap Summary"

Thread Dump

The thread dump consists of the thread stack, including thread state, for all Java threads in the virtual machine. The thread dump does not terminate the application: it continues after the thread information is printed.

The following example illustrates a thread dump.

Full thread dump Java HotSpot(TM) Client VM (1.6.0-rc-b100 mixed mode):

"DestroyJavaVM" prio=10 tid=0x00030400 nid=0x2 waiting on condition [0x00000000..0xfe77fbf0]
   java.lang.Thread.State: RUNNABLE

"Thread2" prio=10 tid=0x000d7c00 nid=0xb waiting for monitor entry [0xf36ff000..0xf36ff8c0]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at Deadlock$DeadlockMakerThread.run(Deadlock.java:32)
        - waiting to lock <0xf819a938> (a java.lang.String)
        - locked <0xf819a970> (a java.lang.String)

"Thread1" prio=10 tid=0x000d6c00 nid=0xa waiting for monitor entry [0xf37ff000..0xf37ffbc0]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at Deadlock$DeadlockMakerThread.run(Deadlock.java:32)
        - waiting to lock <0xf819a970> (a java.lang.String)
        - locked <0xf819a938> (a java.lang.String)

"Low Memory Detector" daemon prio=10 tid=0x000c7800 nid=0x8 runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x000c5400 nid=0x7 waiting on condition [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x000c4400 nid=0x6 waiting on condition [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x000b2800 nid=0x5 in Object.wait() [0xf3f7f000..0xf3f7f9c0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0xf4000b40> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0xf4000b40> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x000ae000 nid=0x4 in Object.wait() [0xfe57f000..0xfe57f940]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0xf4000a40> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:485)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0xf4000a40> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x000ab000 nid=0x3 runnable

"VM Periodic Task Thread" prio=10 tid=0x000c8c00 nid=0x9 waiting on condition

The output consists of a number of thread entries separated by an empty line. The Java threads (threads that are capable of executing Java language code) are printed first, and these are followed by information on VM internal threads. Each thread entry consists of a header line followed by the thread stack trace.

The header line contains the following information about the thread:

  • Thread name

  • Indication if the thread is a daemon thread

  • Thread priority (prio)

  • Thread ID (tid), which is the address of a thread structure in memory

  • ID of the native thread (nid)

  • Thread state, which indicates what the thread was doing at the time of the thread dump (see table below)

  • Address range, which gives an estimate of the valid stack region for the thread

The following table lists the possible thread states that can be printed.

Table 2-1 Thread States

Thread State | Description
NEW | The thread has not yet started
RUNNABLE | The thread is executing in the JVM
BLOCKED | The thread is blocked waiting for a monitor lock
WAITING | The thread is waiting indefinitely for another thread to perform a particular action
TIMED_WAITING | The thread is waiting for another thread to perform an action for up to a specified waiting time
TERMINATED | The thread has exited

Detected Deadlocks

In addition to the thread stacks, the Control+Break handler executes a deadlock detection algorithm. If any deadlocks are detected, it prints additional information after the thread dump on each deadlocked thread.

Found one Java-level deadlock:
=============================
"Thread2":
  waiting to lock monitor 0x000af330 (object 0xf819a938, a java.lang.String),
  which is held by "Thread1"
"Thread1":
  waiting to lock monitor 0x000af398 (object 0xf819a970, a java.lang.String),
  which is held by "Thread2"

Java stack information for the threads listed above:
===================================================
"Thread2":
        at Deadlock$DeadlockMakerThread.run(Deadlock.java:32)
        - waiting to lock <0xf819a938> (a java.lang.String)
        - locked <0xf819a970> (a java.lang.String)
"Thread1":
        at Deadlock$DeadlockMakerThread.run(Deadlock.java:32)
        - waiting to lock <0xf819a970> (a java.lang.String)
        - locked <0xf819a938> (a java.lang.String)

Found 1 deadlock.

If the Java VM flag -XX:+PrintConcurrentLocks is set, Control+Break will also print the list of concurrent locks owned by each thread.

Heap Summary

Starting with JDK 7, the Control+Break handler also prints a heap summary. This output shows the different generations (areas of the heap), with the size, the amount used, and the address range. The address range is especially useful if you are also examining the process with tools such as pmap.

Heap
 def new generation   total 1152K, used 435K [0x22960000, 0x22a90000, 0x22e40000
)
  eden space 1088K,  40% used [0x22960000, 0x229ccd40, 0x22a70000)
  from space 64K,   0% used [0x22a70000, 0x22a70000, 0x22a80000)
  to   space 64K,   0% used [0x22a80000, 0x22a80000, 0x22a90000)
 tenured generation   total 13728K, used 6971K [0x22e40000, 0x23ba8000, 0x269600
00)
   the space 13728K,  50% used [0x22e40000, 0x2350ecb0, 0x2350ee00, 0x23ba8000)
 compacting perm gen  total 12288K, used 1417K [0x26960000, 0x27560000, 0x2a9600
00)
   the space 12288K,  11% used [0x26960000, 0x26ac24f8, 0x26ac2600, 0x27560000)
    ro space 8192K,  62% used [0x2a960000, 0x2ae5ba98, 0x2ae5bc00, 0x2b160000)
    rw space 12288K,  52% used [0x2b160000, 0x2b79e410, 0x2b79e600, 0x2bd60000)

If the Java VM flag -XX:+PrintClassHistogram is set, then the Control+Break handler will produce a heap histogram.

Native Operating System Tools

This section lists a number of native tools available on Windows, Linux, and Solaris OS that are useful for troubleshooting or monitoring purposes. A brief description is provided for each tool. For further details, refer to the operating system documentation (or man pages in the case of Solaris OS and Linux).

The section also contains information on some tools introduced or improved in Solaris OS version 10.

Table 2-2 Native Troubleshooting Tools on Windows

Tool | Description
dumpchk | Command-line utility to verify that a memory dump file has been created correctly This tool is included in the Debugging Tools for Windows download available from the Microsoft web site (see "Collecting Crash Dumps on Windows".
msdev debugger | Command-line utility that can be used to launch Visual C++ and the Win32 debugger.
userdump | The User Mode Process Dumper is included in the OEM Support Tools download available from the Microsoft web site (see "Collecting Crash Dumps on Windows").
windbg | Windows debugger which can be used to debug Windows applications or crash dumps. This tool is included in the Debugging Tools for Windows download available from the Microsoft web site (see "Collecting Crash Dumps on Windows").
/Md and /Mdd compiler options | Compiler options that automatically include extra support for tracking memory allocations.

You can also search for Windows-specific debug support on MSDN at

http://msdn.microsoft.com/library/default.asp

The table below lists troubleshooting tools available on Linux.

Table 2-3 Native Troubleshooting Tools on Linux

Tool | Description
c++filt | Demangle C++ mangled symbol names. This utility is delivered with the native C++ compiler suite: gcc on Linux.
gdb | GNU debugger.
libnjamd | Memory allocation tracking.
lsstack | Print thread stack (similar to pstack in Solaris OS). Not all distributions provide this tool by default; therefore, you might have to download it from www.sourceforge.net.
ltrace | Library call tracer (equivalent to truss -u in Solaris OS). Not all distributions provide this tool by default; therefore, you might have to download it from www.sourceforge.net.
mtrace and muntrace | GNU malloc tracer.
proc tools such as pmap and pstack | Some, but not all, of the proc tools on Solaris OS have equivalent tools on Linux. In addition, core file support is not as good as for Solaris OS; for example, pstack does not work for core dumps.
strace | System call tracer (equivalent to truss -t in Solaris OS).
top | Display most CPU-intensive processes.
vmstat | Report information about processes, memory, paging, block I/O, traps, and CPU activity.

The table below lists troubleshooting tools available on Solaris OS.

Table 2-4 Native Troubleshooting Tools on Solaris OS

Tool | Description
coreadm | Specify name and location of core files produced by the Java VM.
cpustat | Monitor system behavior using CPU performance counters.
cputrack | Monitor process and LWP behavior using CPU performance counters.
c++filt | Demangle C++ mangled symbol names. This utility is delivered with the native C++ compiler suite: SUNWspro on Solaris OS.
dtrace | Introduced in Solaris 10 OS, DTrace is a dynamic tracing compiler and tracing utility. It can perform dynamic tracing of kernel functions, system calls, and user functions. This tool allows arbitrary, safe scripting to be executed at entry, exit, and other probe points. The script is written in C-like but safe pointer semantics language called the D programming language. See also "Using the DTrace Tool".
gcore | Force a core dump of a process. The process continues after the core dump is written.
intrstat | Report statistics on CPU consumed by interrupt threads.
iostat | Report I/O statistics.
libumem | Introduced in Solaris 9 OS update 3, this library provides fast, scalable object-caching memory allocation and extensive debugging support. The tool can be used to find and fix memory management bugs (see "Using the libumem Tool to Find Leaks").
mdb | Modular debugger for kernel and user applications and crash dumps
netstat | Display the contents of various network-related data structures.
pargs | Print process arguments, environment variables, or auxiliary vector. Long output is not truncated as it would be by other commands, such as ps.
pfiles | Print information on process file descriptors. Starting with Solaris 10 OS, the tool prints the filename also.
pldd | Print shared objects loaded by a process.
pmap | Print memory layout of a process or core file, including heap, data, text sections. Starting with Solaris 10 OS, stack segments are clearly identified with the text [stack] along with the thread ID. See also "Improvements in the pmap Tool".
prstat | Report statistics for active Solaris OS processes. (Similar to top).
prun | Set the process to running mode (reverse of pstop).
ps | List all processes.
psig | List the signal handlers of a process.
pstack | Print stack of threads of a given process or core file. Starting with Solaris 10 OS, Java method names can be printed for Java frames. See also "Improvements in the pstack Tool".
pstop | Stop the process (suspend).
ptree | Print process tree containing the given PID.
sar | System activity reporter.
sdtprocess | Display most CPU-intensive processes. (Similar to top).
sdtperfmeter | Display graphs showing system performance, for example, CPU, disks, network, and so forth.
top | Display most CPU-intensive processes. This tool is available as freeware for Solaris OS but is not installed by default.
trapstat | Display runtime trap statistics. (SPARC only)
truss | Trace entry and exit events for system calls, user-mode functions, and signals; optionally stop the process at one of these events. This tool also prints the arguments of system calls and user functions.
vmstat | Report system virtual memory statistics.
watchmalloc | Track memory allocations.

Using the DTrace Tool

Solaris 10 OS includes the DTrace tool, which allows dynamic tracing of the operating system kernel and user-level programs. This tool supports scripting at system-call entry and exit, at user-mode function entry and exit, and at many other probe points. The scripts are written in the D programming language, which is a C-like language with safe pointer semantics. These scripts can help you in troubleshooting problems or solving performance issues.

The dtrace command is a generic front-end to the DTrace tool. This command provides a simple interface to invoke the D language, to retrieve buffered trace data, and to access a set of basic routines to format and print traced data.

You may write your own customized DTrace scripts, using the D language, or download and use one or more of the many scripts that are already available on various sites.

The probes are delivered and instrumented by kernel modules called providers. The types of tracing offered by the probe providers include user instruction tracing, function boundary tracing, kernel lock instrumentation, profile interrupt, system call tracing, and much more. If you write your own scripts, you use the D language to enable the probes; this language also allows conditional tracing and output formatting.

You can use the dtrace -l command to explore the set of providers and probes that are available on your Solaris OS.

The DTraceToolkit is a collection of useful documented scripts developed by the OpenSolaris DTrace community. For more information on the DTraceToolkit, see the DTraceToolkit web page at

http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/

For more information on dynamic tracing in general, see the Solaris Dynamic Tracing Guide at

http://docs.oracle.com/cd/E19253-01/817-6223/

Probe Providers in Java HotSpot VM

Starting with JDK 7, the Java HotSpot VM contains two built-in probe providers: hotspot and hotspot_jni. These providers deliver probes that can be used to monitor the internal state and activities of the VM, as well as the Java application that is running.

The JVM probe providers can be categorized as follows:

  • VM lifecycle: VM initialization begin and end, and VM shutdown.

  • Thread lifecycle: thread start and stop, thread name, thread ID, and so on.

  • Class-loading: Java class loading and unloading.

  • Garbage collection: start and stop of garbage collection, system-wide or by memory pool.

  • Method compilation: method compilation begin and end, and method loading and unloading.

  • Monitor probes: wait events, notification events, contended monitor entry and exit.

  • Application tracking: method entry and return, allocation of a Java object.

In order to call from native code to Java code, the native code must make a call through the JNI interface. The hotspot_jni provider manages DTrace probes at the entry point and return point for each of the methods that the JNI interface provides for invoking Java code and examining the state of the VM.

Example 2-1 Example of Using DTrace

At probe points, you can print the stack trace current thread using the ustack built-in function. This function prints Java method names in addition to C/C++ native function names. The following is a simple D script that prints a full stack trace whenever a thread calls the read system call:

#!/usr/sbin/dtrace -s
syscall::read:entry
/pid == $1 && tid == 1/ {
   ustack(50, 0x2000);
}

The above script is stored in a file named read.d and is run by specifying the PID of the Java process that is traced.

read.d pid

If your Java application generated a lot of I/O or had some unexpected latency, the use of the DTrace tool and its ustack() action can help you diagnose the problem.

Improvements in the pmap Tool

The pmap utility was improved in Solaris 10 OS to print stack segments with the text [stack]. This text helps you to locate the stack easily.

The following example shows the output from this tool:

19846:    /net/myserver/export1/user/j2sdk6/bin/java -Djava.endorsed.d
00010000      72K r-x--  /export/disk09/jdk/6/rc/b63/binaries/solsparc/bin/java
00030000      16K rwx--  /export/disk09/jdk/6/rc/b63/binaries/solsparc/bin/java
00034000   32544K rwx--    [ heap ]
D1378000      32K rwx-R    [ stack tid=44 ]
D1478000      32K rwx-R    [ stack tid=43 ]
D1578000      32K rwx-R    [ stack tid=42 ]
D1678000      32K rwx-R    [ stack tid=41 ]
D1778000      32K rwx-R    [ stack tid=40 ]
D1878000      32K rwx-R    [ stack tid=39 ]
D1974000      48K rwx-R    [ stack tid=38 ]
D1A78000      32K rwx-R    [ stack tid=37 ]
D1B78000      32K rwx-R    [ stack tid=36 ]
[.. more lines removed here to reduce output ..]
FF370000       8K r-x--  /usr/lib/libsched.so.1
FF380000       8K r-x--  /platform/sun4u-us3/lib/libc_psr.so.1
FF390000      16K r-x--  /lib/libthread.so.1
FF3A4000       8K rwx--  /lib/libthread.so.1
FF3B0000       8K r-x--  /lib/libdl.so.1
FF3C0000     168K r-x--  /lib/ld.so.1
FF3F8000       8K rwx--  /lib/ld.so.1
FF3FA000       8K rwx--  /lib/ld.so.1
FFB80000      24K -----    [ anon ]
FFBF0000      64K rwx--    [ stack ]
 total    167224K

Improvements in the pstack Tool

Prior to Solaris 10 OS, the pstack utility did not support Java. It printed hexadecimal addresses for both interpreted and compiled Java methods.

Starting from Solaris 10 OS, the pstack command-line tool prints mixed mode stack traces (Java and C/C++ frames) from a core file or a live process. The tool prints Java method names for interpreted, compiled and inlined Java methods.

Custom Diagnostic Tools

The JDK has extensive APIs for developing custom tools to observe, monitor, profile, debug, and diagnose issues in applications that are deployed in the JRE. The development of new tools is beyond the scope of this document. Instead this section provides a brief overview of the APIs available.

All the packages mentioned below are fully described in the Java SE API specification at

http://docs.oracle.com/javase/8/docs/api/index.html

Refer also to example and demonstration code that is included in the JDK download.

The java.lang.management Package

The java.lang.management package provides the management interface for monitoring and management of the JVM and the OS. Specifically it covers interfaces for the following systems:

  • Class loading

  • Compilation

  • Garbage collection

  • Memory manager

  • Runtime

  • Threads

The JDK release includes example code that demonstrates the usage of the java.lang.management package. These examples can be found in the $JAVA_HOME/demo/management directory. Some of these examples are as follows:

  • MemoryMonitor demonstrates the use of the java.lang.management API to observe the memory usage of all memory pools consumed by the application.

  • FullThreadDump demonstrates the use of the java.lang.management API to get a full thread dump and detect deadlocks programmatically.

  • VerboseGC demonstrates the use of the java.lang.management API to print the garbage collection statistics and memory usage of an application.

In addition to the java.lang.management package, the JDK release includes platform extensions in the com.sun.management package. The platform extensions include a management interface to obtain detailed statistics from garbage collectors that perform collections in cycles. These extensions also include a management interface to obtain additional memory statistics from the operating system.

For more information on the platform extensions, see the Java SE Monitoring and Management documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/management/index.html

The java.lang.instrument Package

The java.lang.instrument package provides services that allow Java programming language agents to instrument programs running on the Java VM. Instrumentation is used by tools such as profilers, tools for tracing method calls, and many others. The package facilitates both load-time and dynamic instrumentation. It also includes methods to obtain information on the loaded classes and information about the amount of storage consumed by a given object.

The java.lang.Thread Class

The java.lang.Thread class has a static method called getAllStackTraces, which returns a map of stack traces for all live threads. The Thread class also has a method called getState, which returns the thread state; states are defined by the java.lang.Thread.State enumeration. These methods can be useful when adding diagnostic or monitoring capabilities to an application.

Java Virtual Machine Tools Interface

The JVM Tools Interface (JVM TI) is a native (C/C++) programming interface that can be used to develop a wide range of developing and monitoring tools. JVM TI provides an interface for the full breadth of tools that need access to VM state, including but not limited to profiling, debugging, monitoring, thread analysis, and coverage analysis tools.

Some examples of agents that rely on JVM TI are the following:

  • HPROF

  • Java Debug Wire Protocol (JDWP)

  • The java.lang.instrument package

The specification for JVM TI can be found in the JVM Tool Interface documentation at

http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html

The JDK release includes example code that demonstrates the usage of JVM TI. These examples can be found in the $JAVA_HOME/demo/jvmti directory. Some of the examples are as follows:

  • mtrace is an agent library that tracks method call and return counts. It uses bytecode instrumentation to instrument all classes loaded into the virtual machine and prints a sorted list of the frequently used methods.

  • heapTracker is an agent library that tracks object allocation. It uses bytecode instrumentation to instrument constructor methods.

  • heapViewer is an agent library that prints heap statistics when the Control+Break handler is invoked (for more information, see "Control+Break Handler"). For each loaded class it prints an instance count of that class and the space used.

Java Platform Debugger Architecture

The Java Platform Debugger Architecture (JPDA) is the architecture designed for use by debuggers and debugger-like tools. It consists of two programming interfaces and a wire protocol.

  • The Java Virtual Machine Tools Interface (JVM TI) is the interface to the virtual machine (see "Java Virtual Machine Tools Interface").

  • The Java Debug Interface (JDI) defines information and requests at the user code level. It is a pure Java programming language interface for debugging Java programming language applications. In JPDA, the JDI is a remote view in the debugger process of a virtual machine in the debuggee process. It is implemented by the front end, while a debugger-like application (for example, IDE, debugger, tracer, monitoring tool, and so forth) is the client.

  • The Java Debug Wire Protocol (JDWP) defines the format of information and requests transferred between the process being debugged and the debugger front end, which implements the JDI.

A complete description (including specifications) for JPDA is located in the Java Platform Debugger Architecture documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html

The jdb utility is included in the JDK release as the example command-line debugger. The jdb utility uses the JDI to launch or connect to the target VM. For more information on the jdb utility, see "The jdb Utility".

In addition to traditional debugger-type tools, JDI can also be used to develop tools that help in post-mortem diagnostics and scenarios where the tool needs to attach to a process in a non-cooperative manner (for example, a hung process).

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Diagnostic Tools and Options

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

1 Diagnostic Tools and Options

This chapter introduces the various diagnostic and monitoring tools which can be used with the Java Development Kit (JDK).

The tools are described in detail in "Detailed Tool Descriptions".

For a list of tools available in the current release of the JDK, as well as the changes since the previous release, see "Summary of Tools in This Release".

Note:

Some of the command-line utilities described in this chapter are experimental. The jstack, jinfo, and jmap utilities are examples of utilities that are experimental. These utilities are subject to change in future JDK releases, and might not be included in future releases.

This chapter contains the following sections:

  • "Introduction"

  • "Summary of Tools and Options"

Introduction

Most of the command-line utilities described in this chapter are either included in the JDK release or are native operating system (OS) tools and utilities. Although the JDK command-line utilities are included in the JDK download, it is important to note that they can be used to diagnose issues and monitor applications that are deployed with the Java Runtime Environment (JRE).

In general, the diagnostic tools and options described in this chapter use various mechanisms to obtain the information they report. In many cases the mechanisms are specific to the VM implementation, OS, and release. Consequently, there is some overlap of the information reported by some of the tools. This should be viewed in the context of the various problems and issues for which these tools are intended. In many cases only a subset of the tools will be applicable to a given issue at a particular point in time.

Command-line options that are prefixed with -XX are specific to the Java HotSpot Virtual Machine. Many of these options are important for performance tuning and diagnostic purposes, and are therefore described in this guide. For more information on command-line options used by the HotSpot VM, see "HotSpot VM Command-Line Options".

Note:

The -XX options are not part of the Java API and can vary from one release to the next.

In some cases, the tools described here are available only for some operating systems. In addition, Solaris 10 OS introduced many advanced diagnostic features and tools that can be used in production environments, and many of the native tools are capable of providing information that is specific to the JRE.

The format of log files and of other output from command-line utilities or options depend on the release. For example, if you develop a script that relies on the format of the fatal error log, then this script might not work as expected if the format of the log file changes in a future release.

In addition to the tools described in this document, you can develop custom tools using the APIs that are provided with the JDK release. For more information on developing your own tools for troubleshooting, see "Custom Diagnostic Tools".

Summary of Tools and Options

The tools and options are divided into several categories, depending on the type of problem that you are troubleshooting. Certain tools and options might fall into more than one category.

  • Post-mortem diagnostics. These tools and options can be used to diagnose a problem after an application has crashed. See "Tools and Options for Post-Mortem Diagnostics".

  • Hung processes. These tools can be used to investigate a hung or deadlocked process. See "Tools and Options for Hung Processes".

  • Monitoring. These tools can be used to monitor a running application. See "Tools and Options for Monitoring".

  • Other. These tools and options can be used to help diagnose other issues. See "Other Tools, Options, Variables, and Properties".

  • Operating system tools. These tools are provided by the specific operating systems. See "Native Operating System Tools".

Tools and Options for Post-Mortem Diagnostics

The table in this section summarizes the options and tools that are designed for post-mortem diagnostics. If an application crashes, these options and tools can be used to obtain additional information, either at the time of the crash or later using information from the crash dump.

Table 1-1 Tools and Options for Post-Mortem Diagnostics

Tool or Option | Description and Usage
Fatal Error Log | When a fatal error occurs, an error log is created. This file contains much information obtained at the time of the fatal error. In many cases it is the first item to examine when a crash occurs. See "Fatal Error Log".
-XX:+HeapDumpOnOutOfMemoryError option | This command-line option specifies the generation of a heap dump when the VM detects a native out-of-memory error. See "The -XX:+HeapDumpOnOutOfMemoryError Option".
-XX:OnError option | This command-line option specifies a sequence of user-supplied scripts or commands to be executed when a fatal error occurs. For example, on Windows, this option can execute a command to force a crash dump. This option is very useful on systems where a post-mortem debugger is not configured. See "The -XX:OnError= Option".
-XX:+ShowMessageBoxOnError option | This command-line option suspends a process when a fatal error occurs. Depending on the user response, the option can launch the native debugger (for example, dbx, gdb, msdev) to attach to the VM. See "The -XX:+ShowMessageBoxOnError Option".
Other -XX options | Several other -XX command-line options can be useful in troubleshooting. See "Other -XX Options".
Java VisualVM (post-mortem use on Solaris OS and Linux only) | This utility can analyze a core dump by providing a readable display of the core dump in the form of a heap dump and a thread dump, as well as overview information (for example, JVM arguments, system properties, and so forth).
jdb utility | Debugger support includes an AttachingConnector, which allows jdb and other Java language debuggers to attach to a core file. This can be useful when trying to understand what each thread was doing at the time of a crash. See "The jdb Utility".
jhat utility | This utility provides a convenient means to browse the object topology in a heap dump. See "The jhat Utility".
jinfo utility (post-mortem use on Solaris OS and Linux only) | This utility can obtain configuration information from a core file obtained from a crash or from a core file obtained using the gcore utility. See "The jinfo Utility".
jmap utility (post-mortem use on Solaris OS and Linux only) | This utility can obtain memory map information, including a heap histogram, from a core file obtained from a crash or from a core obtained using the gcore utility. See "The jmap Utility".
jsadebugd daemon (Solaris OS and Linux only) | The Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. See "The jsadebugd Daemon".
jstack utility | This utility can obtain Java and native stack information from a Java process. On Solaris OS and Linux the utility can get the information also from a core file or a remote debug server. See "The jstack Utility".
Native tools | Each operating system has native tools and utilities that can be used for post-mortem diagnosis. See "Native Operating System Tools".

Tools and Options for Hung Processes

The table in this section summarizes the options and tools that can help in scenarios involving a hung or deadlocked process. These tools do not require any special options to start the application.

Table 1-2 Tools and Options for Hung Processes

Tool or Option | Description and Usage
Ctrl-Break handler (Control+\ or kill -QUIT pid on Solaris OS and Linux, and Control+Break on Windows) | This key combination performs a thread dump as well as deadlock detection. The Ctrl-Break handler can optionally print a list of concurrent locks and their owners, as well as a heap histogram. See "Control+Break Handler".
jdb utility | Debugger support includes attaching connectors, which allow jdb and other Java language debuggers to attach to a process. This can help show what each thread is doing at the time of a hang or deadlock. See "The jdb Utility".
jhat utility | This utility provides a convenient means to browse the object topology in a heap dump. See "The jhat Utility".
jinfo utility | This utility can obtain configuration information from a Java process. See "The jinfo Utility".
jmap utility | This utility can obtain memory map information, including a heap histogram, from a Java process. On Solaris OS and Linux, the -F option can be used if the process is hung. See "The jmap Utility".
jsadebugd daemon (Solaris OS and Linux only) | The Serviceability Agent Debug Daemon (jsadebugd) attaches to a Java process or to a core file and acts as a debug server. See "The jsadebugd Daemon".
jstack utility | This utility can obtain Java and native stack information from a Java process. On Solaris OS and Linux the -F option can be used if the process is hung. See "The jstack Utility".
Native tools | Each operating system has native tools and utilities that can be useful in hang or deadlock situations. See "Native Operating System Tools".

Tools and Options for Monitoring

The tools listed in the table below are designed for monitoring applications that are running at the time.

Table 1-3 Tools and Options for Monitoring

Tool or Option | Description and Usage
Java VisualVM | This utility provides a visual interface for viewing detailed information about Java applications while they are running on a Java virtual machine. This information can be used in troubleshooting local and remote applications, as well as for profiling local applications. See "Java VisualVM".
JConsole utility | This utility is a monitoring tool that is based on Java Management Extensions (JMX). The tool uses the built-in JMX instrumentation in the Java virtual machine to provide information on performance and resource consumption of running applications. See "JConsole".
jmap utility | This utility can obtain memory map information, including a heap histogram, from a Java process, a core file, or a remote debug server. See "The jmap Utility".
jps utility | This utility lists the instrumented HotSpot Virtual Machines on the target system. The utility is very useful in environments where the VM is embedded, that is, it is started using the JNI Invocation API rather than the java launcher. See "The jmap Utility".
jstack utility | This utility can obtain Java and native stack information from a Java process. On Solaris OS and Linux the utility can get the information also from a core file or a remote debug server. See "The jstack Utility".
jstat utility | This utility uses the built-in instrumentation in the HotSpot VM to provide information on performance and resource consumption of running applications. The tool can be used when diagnosing performance issues, and in particular issues related to heap sizing and garbage collection. See "The jstat Utility".
jstatd daemon | This tool is an RMI server application that monitors the creation and termination of instrumented Java virtual machines and provides an interface to allow remote monitoring tools to attach to VMs running on the local host. See "The jstatd Daemon".
visualgc utility | This utility provides a graphical view of the garbage collection system. As with jstat, it uses the built-in instrumentation of the HotSpot VM. See "The visualgc Tool".
Native tools | Each operating system has native tools and utilities that can be useful for monitoring purposes. For example, the dynamic tracing (DTrace) capability introduced in Solaris 10 OS performs advanced monitoring. See "Native Operating System Tools".

Other Tools, Options, Variables, and Properties

In addition to the tools that are designed for specific types of problems, the tools, options, variables, and properties listed in the table below can help in diagnosing other issues.

Table 1-4 General Troubleshooting Tools and Options

Tool or Option | Description and Usage
HPROF profiler | This simple profiler can present CPU usage, heap allocation statistics, contention profiles, heap dumps, and states of all the monitors and threads in the Java virtual machine. HPROF is useful in analyzing performance, lock contention, memory leaks, and other issues. See "HPROF".
jhat utility | This utility is useful in diagnosing unnecessary object retention (or memory leaks). It can be used to browse an object dump, view all reachable objects in the heap, and show which references are keeping an object alive. See "The jhat Utility".
jinfo utility | This utility can dynamically set, unset, and change the values of certain Java VM flags for a specified Java process. On Solaris OS and Linux, it can also print configuration information. See "The jinfo Utility".
jrunscript utility | This utility is a command-line script shell, which supports both interactive and batch-mode script execution. See "The jrunscript Utility".
Sun Studio dbx debugger | This is an interactive, command-line debugging tool, which allows you to have complete control of the dynamic execution of a program, including stopping the program and inspecting its state. For details, see the latest dbx documentation, located at the Sun Studio Program Debugging site.
Sun Studio Performance Analyzer | This tool can help you assess the performance of your code, identify potential performance problems, and locate the part of the code where the problems occur. The Performance Analyzer can be used from the command line or from a graphical user interface. For details, see the Sun Studio Performance Analyzer site.
Sun's Dataspace Profiling: DProfile | This tool provides insight into the flow of data within Sun computing systems, helping you identify bottlenecks in both software and hardware. DProfile is supported in the Sun Studio 11 compiler suite through the Performance Analyzer GUI. For information, see the Cool Tools Community site under Other Sun Tools.
-Xcheck:jni option | This option is useful in diagnosing problems with applications that use the Java Native Interface (JNI) or that employ third-party libraries (some JDBC drivers, for example). See "The -Xcheck:jni Option".
-verbose:class option | This option enables logging of class loading and unloading. See "The -verbose:class Option".
-verbose:gc option | This option enables logging of garbage collection information. See "The -verbose:gc Option".
-verbose:jni option | This option enables logging of JNI. See "The -verbose:jni Option".
JAVA_TOOL_OPTIONS environment variable | This environment variable allows you to specify the initialization of tools, specifically the launching of native or Java programming language agents using the -agentlib or -javaagent options. See "Environment Variables and System Properties".
java.security.debug system property | This system property controls whether the security checks in the JRE of the Java print trace messages during execution. See "The java.security.debug System Property".

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Environment Variables and System Properties

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

A Environment Variables and System Properties

This appendix describes environment variables and system properties that can be useful for troubleshooting problems with the Java HotSpot VM.

"Submitting Bug Reports" contains information on collecting environment variables in "Environment Variables".

The JAVA_HOME Environment Variable

This variable indicates the directory where the Java Development Kit (JDK) software is installed.

The JAVA_TOOL_OPTIONS Environment Variable

In many environments the command line is not readily accessible to start the application with necessary command-line options. This often arises with applications that use embedded VMs (meaning they use the Java Native Interface (JNI) Invocation API to start the VM), or where the startup is deeply nested in scripts. In these environments the JAVA_TOOL_OPTIONS environment variable can be useful to augment a command line.

When this environment variable is set, the JNI_CreateJavaVM function (in the JNI Invocation API) prepends the value of the environment variable to the options supplied in its JavaVMInitArgs argument.

Note:

In some cases this option is disabled for security reasons (for example, on Solaris OS the option is disabled when the effective user or group ID differs from the real ID).

This environment variable allows you to specify the initialization of tools, specifically the launching of native or Java programming language agents using the -agentlib or -javaagent options. In the following example the environment variable is set so that the HPROF profiler is launched when the application is started:

$ export JAVA_TOOL_OPTIONS="-agentlib:hprof"

This variable can also be used to augment the command line with other options for diagnostic purposes. For example, you can supply the -XX:OnError option to specify a script or command to be executed when a fatal error occurs.

Since this environment variable is examined at the time the JNI_CreateJavaVM function is called, it cannot be used to augment the command line with options that would normally be handled by the launcher, for example, VM selection using the -client option or the -server option.

For more information on using the JAVA_TOOL_OPTIONS environment variable, see the "JAVA_TOOL_OPTIONS" section of the JVM Tool Interface documentation at

http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#tooloptions

The java.security.debug System Property

This system property controls whether the security system of the Java Runtime Environment (JRE) prints trace messages during execution. This option can be useful when diagnosing an issue involving a security manager when a SecurityException is thrown.

The java.security.debug property can have the following values:

access

Print all checkPermission results.

The following additional options can be specified with the access option:

stack

Include stack trace.

domain

Dump all domains in context.

failure

Before throwing an exception, dump the stack and domain that did not have permission.

jar

Print JAR verification information.

policy

Print policy information.

scl

Print permissions that SecureClassLoader assigns.

For example, to print all checkPermission results and trace all domains in context, set the java.security.debug property to access,stack. To trace access failures, set the property to access,failure.

The following example shows the output of a checkPermission failure:

$ java -Djava.security.debug="access,failure" MyApp
access denied (java.net.SocketPermission server.foobar.com resolve
)
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1158)
    at java.security.AccessControlContext.checkPermission
                          (AccessControlContext.java:253)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
    at java.net.InetAddress.getAllByName(InetAddress.java:1061)
    at java.net.InetAddress.getByName(InetAddress.java:958)
    at java.net.InetSocketAddress.<init>(InetSocketAddress.java:124)
    at java.net.Socket.<init>(Socket.java:178)
    at MyApp.main(MyApp.java:7)

For more information on the java.security.debug system property, see the "Troubleshooting Security" section of the Java SE Security documentation at

http://docs.oracle.com/javase/8/docs/technotes/guides/security/troubleshooting-security.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Fatal Error Log

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

C Fatal Error Log

This appendix describes the fatal error log, its location and contents.

The fatal error log is created when a fatal error occurs. It contains information and the state obtained at the time of the fatal error.

Note:

The format of this file can change slightly in update releases.

This appendix contains the following sections.

  • "Location of Fatal Error Log"

  • "Description of Fatal Error Log"

  • "Header Format"

  • "Thread Section Format"

  • "Process Section Format"

  • "System Section Format"

Location of Fatal Error Log

To specify where the log file will be created, use the product flag -XX:ErrorFile=file, where file represents the full path for the log file location. The substring %% in the file variable is converted to %, and the substring %p is converted to the PID of the process.

In the following example, the error log file will be written to the directory /var/log/java and will be named java_errorpid.log:

java -XX:ErrorFile=/var/log/java/java_error%p.log

If the -XX:ErrorFile=file flag is not specified, the default log file name is hs_err_pid.log, where pid is the PID of the process.

In addition, if the -XX:ErrorFile=file flag is not specified, the system attempts to create the file in the working directory of the process. In the event that the file cannot be created in the working directory (insufficient space, permission problem, or other issue), the file is created in the temporary directory for the operating system. On Solaris OS and Linux the temporary directory is /tmp. On Windows the temporary directory is specified by the value of the TMP environment variable; if that environment variable is not defined, the value of the TEMP environment variable is used.

Description of Fatal Error Log

The error log contains information obtained at the time of the fatal error, including the following information, where possible:

  • The operating exception or signal that provoked the fatal error

  • Version and configuration information

  • Details on the thread that provoked the fatal error and thread's stack trace

  • The list of running threads and their state

  • Summary information about the heap

  • The list of native libraries loaded

  • Command line arguments

  • Environment variables

  • Details about the operating system and CPU

Note:

In some cases only a subset of this information is output to the error log. This can happen when a fatal error is of such severity that the error handler is unable to recover and report all details.

The error log is a text file consisting of the following sections:

  • A header that provides a brief description of the crash. See "Header Format".

  • A section with thread information. See "Thread Section Format".

  • A section with process information. See "Process Section Format".

  • A section with system information. See "System Section Format".

Note:

The format of the fatal error log described here is based on Java SE 6. The format might be different with other releases.

Header Format

The header section at the beginning of every fatal error log file contains a brief description of the problem. The header is also printed to standard output and may show up in the application's output log.

The header includes a link to the HotSpot Virtual Machine Error Reporting Page, where the user can submit a bug report.

The following is a sample header from a crash.

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C  [libNativeSEGV.so+0x9d7]

#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

This example shows that the VM crashed on an unexpected signal. The next line describes the signal type, program counter (pc) that caused the signal, process ID and thread ID, as follows.

#  SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024
      |      |           |             |         +--- thread id
      |      |           |             +------------- process id
      |      |           +--------------------------- program counter
      |      |                                        (instruction pointer)
      |      +--------------------------------------- signal number
      +---------------------------------------------- signal name

The next line contains the VM version (Client VM or Server VM), an indication whether the application was run in mixed or interpreted mode, and an indication whether class file sharing was enabled. Here is an example:

# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode, sharing)

The next information is the function frame that caused the crash, as follows.

# Problematic frame:
# C  [libNativeSEGV.so+0x9d7]
  |              +-- Same as pc, but represented as library name and offset.
  |                  For position-independent libraries (JVM and most shared
  |                  libraries), it is possible to inspect the instructions
  |                  that caused the crash without a debugger or core file
  |                  by using a disassembler to dump instructions near the
  |                  offset.
  +----------------- Frame type

In this example, the "C" frame type indicates a native C frame. The following table shows the possible frame types.

Table C-1 Frame Types

Frame Type | Description
C | Native C frame
j | Interpreted Java frame
V | VM frame
v | VM-generated stub frame
J | Other frame types, including compiled Java frames

Internal errors will cause the VM error handler to generate a similar error dump. However, the header format is different. Examples of internal errors are guarantee() failure, assertion failure, ShouldNotReachHere(), and so forth. Here is an example of how the header looks for an internal error:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (4F533F4C494E55583F491418160E43505000F5), pid=10226, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b63 mixed mode)

In the above header, there is no signal name or signal number. Instead the second line now contains Internal Error and a long hexadecimal string. This hexadecimal string encodes the source module and line number where the error was detected. In general this "error string" is useful only to engineers working on the HotSpot Virtual Machine.

The error string encodes a line number and therefore it changes with each code change and release. A crash with a given error string in one release (for example, 1.6.0) might not correspond to the same crash in an update release (for example, 1.6.0_01), even if the strings match.

Note:

Do not assume that a workaround or solution that worked in one situation associated with a given error string will work in another situation associated with that same error string. Note the following facts:

  • Errors with the same root cause might have different error strings.

  • Errors with the same error string might have completely different root causes.

Therefore, the error string should not be used as the sole criterion when troubleshooting bugs.

Thread Section Format

This section contains information about the thread that just crashed. If multiple threads crash at the same time, only one thread is printed.

Thread Information

The first part of the thread section shows the thread that provoked the fatal error, as follows.

Current thread (0x0805ac88):  JavaThread "main" [_thread_in_native, id=21139]
                    |             |         |            |          +-- ID
                    |             |         |            +------------- state
                    |             |         +-------------------------- name
                    |             +------------------------------------ type
                    +-------------------------------------------------- pointer

The thread pointer is the pointer to the Java VM internal thread structure. It is generally of no interest unless you are debugging a live Java VM or core file.

The following list shows possible thread types.

  • JavaThread

  • VMThread

  • CompilerThread

  • GCTaskThread

  • WatcherThread

  • ConcurrentMarkSweepThread

The following table shows the important thread states.

Table C-2 Thread States

Thread State | Description
_thread_uninitialized | Thread is not created. This occurs only in the case of memory corruption.
_thread_new | Thread has been created but it has not yet started.
_thread_in_native | Thread is running native code. The error is probably a bug in native code.
_thread_in_vm | Thread is running VM code.
_thread_in_Java | Thread is running either interpreted or compiled Java code.
_thread_blocked | Thread is blocked.
..._trans | If any of the above states is followed by the string _trans, that means that the thread is changing to a different state.

The thread ID in the output is the native thread identifier.

If a Java thread is a daemon thread, then the string daemon is printed before the thread state.

Signal Information

The next information in the error log describes the unexpected signal that caused the VM to terminate. On a Windows system the output appears as follows:

siginfo: ExceptionCode=0xc0000005, reading address 0xd8ffecf1

In the above example, the exception code is 0xc0000005 (ACCESS_VIOLATION), and the exception occurred when the thread attempted to read address 0xd8ffecf1.

On Solaris OS and Linux systems the signal number (si_signo) and signal code (si_code) are used to identify the exception, as follows:

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00004321

Register Context

The next information in the error log shows the register context at the time of the fatal error. The exact format of this output is processor-dependent. The following example shows output for the Intel (IA32) processor.

Registers:
EAX=0x00004321, EBX=0x41779dc0, ECX=0x080b8d28, EDX=0x00000000
ESP=0xbfffc1e0, EBP=0xbfffc1f8, ESI=0x4a6b9278, EDI=0x0805ac88
EIP=0x417789d7, CR2=0x00004321, EFLAGS=0x00010216

The register values might be useful when combined with instructions, as described below.

Machine Instructions

After the register values, the error log contains the top of stack followed by 32 bytes of instructions (opcodes) near the program counter (PC) when the system crashed. These opcodes can be decoded with a disassembler to produce the instructions around the location of the crash. Note that IA32 and AMD64 instructions are variable in length, and so it is not always possible to reliably decode instructions before the crash PC.

Top of Stack: (sp=0xbfffc1e0)
0xbfffc1e0:   00000000 00000000 0818d068 00000000
0xbfffc1f0:   00000044 4a6b9278 bfffd208 41778a10
0xbfffc200:   00004321 00000000 00000cd8 0818d328
0xbfffc210:   00000000 00000000 00000004 00000003
0xbfffc220:   00000000 4000c78c 00000004 00000000
0xbfffc230:   00000000 00000000 00180003 00000000
0xbfffc240:   42010322 417786ec 00000000 00000000
0xbfffc250:   4177864c 40045250 400131e8 00000000
Instructions: (pc=0x417789d7)
0x417789c7:   ec 14 e8 72 ff ff ff 81 c3 f2 13 00 00 8b 45 08
0x417789d7:   0f b6 00 88 45 fb 8d 83 6f ee ff ff 89 04 24 e8

Thread Stack

Where possible, the next output in the error log is the thread stack. This includes the addresses of the base and the top of the stack, the current stack pointer, and the amount of unused stack available to the thread. This is followed, where possible, by the stack frames, and up to 100 frames are printed. For C/C++ frames the library name may also be printed. It is important to note that in some fatal error conditions the stack may be corrupt, and in such case this detail may not be available.

Stack: [0x00040000,0x00080000),  sp=0x0007f9f8,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x83d77]
C  [App.dll+0x1047]
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub
V  [jvm.dll+0x80f13]
V  [jvm.dll+0xd3842]
V  [jvm.dll+0x80de4]
C  [java.exe+0x14c0]
C  [java.exe+0x64cd]
C  [kernel32.dll+0x214c7]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub

The log contains two thread stacks.

  • The first thread stack is Native frames, which prints the native thread showing all function calls. However this thread stack does not take into account the Java methods that are inlined by the runtime compiler; if methods are inlined they appear to be part of the parent's stack frame.

    The information in the thread stack for native frames provides important information about the cause of the crash. By analyzing the libraries in the list from the top down, you can generally determine which library might have caused the problem and report it to the appropriate organization responsible for that library.

  • The second thread stack is Java frames, which prints the Java frames including the inlined methods, skipping the native frames. Depending on the crash it might not be possible to print the native thread stack but it might be possible to print the Java frames.

Further Details

If the error occurred in the VM thread or in a compiler thread, then further details may be printed. For example, in the case of the VM thread, the VM operation is printed if the VM thread is executing a VM operation at the time of the fatal error. In the following output example, the compiler thread provoked the fatal error. The task is a compiler task and the HotSpot Client VM is compiling method hs101t004Thread.ackermann.

Current CompileTask:
HotSpot Client Compiler:754   b
nsk.jvmti.scenarios.hotswap.HS101.hs101t004Thread.ackermann(IJ)J (42 bytes)

For the HotSpot Server VM the output for the compiler task is slightly different but will also include the full class name and method.

Process Section Format

The process section is printed after the thread section. It contains information about the whole process, including thread list and memory usage of the process.

Thread List

The thread list includes the threads that the VM is aware of. This includes all Java threads and some VM internal threads, but does not include any native threads created by the user application that have not attached to the VM. The output format follows:

=>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139]
|      |         |        |             |             +----- ID
|      |         |        |             +------------------- state
|      |         |        |                                  (JavaThread only)
|      |         |        +--------------------------------- name
|      |         +------------------------------------------ type
|      +---------------------------------------------------- pointer
+------------------------------------------------------ "=>" current thread

An example of this output follows:

Java Threads: ( => current thread )
  0x080c8da0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=21147]
  0x080c7988 JavaThread "CompilerThread0" daemon [_thread_blocked, id=21146]
  0x080c6a48 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=21145]
  0x080bb5f8 JavaThread "Finalizer" daemon [_thread_blocked, id=21144]
  0x080ba940 JavaThread "Reference Handler" daemon [_thread_blocked, id=21143]
=>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139]

Other Threads:
  0x080b6070 VMThread [id=21142]
  0x080ca088 WatcherThread [id=21148]

The thread type and thread state are described in "Thread Section Format".

VM State

The next information is the VM state, which indicates the overall state of the virtual machine. The following table describes the general states.

Table C-3 VM States

General VM State | Description
not at a safepoint | Normal execution.
at safepoint | All threads are blocked in the VM waiting for a special VM operation to complete.
synchronizing | A special VM operation is required and the VM is waiting for all threads in the VM to block.

The VM state output is a single line in the error log, as follows:

VM state:not at safepoint (normal execution)

Mutexes and Monitors

The next information in the error log is a list of mutexes and monitors that are currently owned by a thread. These mutexes are VM internal locks rather than monitors associated with Java objects. Below is an example to show how the output might look when a crash happens when VM locks are held. For each lock the log contains the name of the lock, its owner, and the addresses of a VM internal mutex structure and its OS lock. In general this information is useful only to those who are very familiar with the HotSpot VM. The owner thread can be cross-referenced to the thread list.

VM Mutex/Monitor currently owned by a thread:
([mutex/lock_event])[0x007357b0/0x0000031c] Threads_lock - owner thread: 0x00996318
[0x00735978/0x000002e0] Heap_lock - owner thread: 0x00736218

Heap Summary

The next information is a summary of the heap. The output depends on the garbage collection (GC) configuration. In this example the serial collector is used, class data sharing is disabled, and the tenured generation is empty. This probably indicates that the fatal error occurred early or during start-up and a GC has not yet promoted any objects into the tenured generation. An example of this output follows:

Heap
 def new generation   total 576K, used 161K [0x46570000, 0x46610000, 0x46a50000)
  eden space 512K,  31% used [0x46570000, 0x46598768, 0x465f0000)
  from space 64K,   0% used [0x465f0000, 0x465f0000, 0x46600000)
  to   space 64K,   0% used [0x46600000, 0x46600000, 0x46610000)
 tenured generation   total 1408K, used 0K [0x46a50000, 0x46bb0000, 0x4a570000)
   the space 1408K,   0% used [0x46a50000, 0x46a50000, 0x46a50200, 0x46bb0000)
 compacting perm gen  total 8192K, used 1319K [0x4a570000, 0x4ad70000, 0x4e570000)
   the space 8192K,  16% used [0x4a570000, 0x4a6b9d48, 0x4a6b9e00, 0x4ad70000)
No shared spaces configured.

Memory Map

The next information in the log is a list of virtual memory regions at the time of the crash. This list can be long in the case of large applications. The memory map can be very useful when debugging some crashes, as it can tell you what libraries are actually being used, their location in memory, as well as the location of heap, stack, and guard pages.

The format of the memory map is operating-system-specific. On the Solaris Operating System, the base address and library name are printed. On the Linux system the process memory map (/proc/pid/maps) is printed. On the Windows system, the base and end addresses of each library are printed. The following example output was generated on Linux/x86. Note that most of the lines have been omitted from the example for the sake of brevity.

Dynamic libraries:
08048000-08056000 r-xp 00000000 03:05 259171     /h/jdk6/bin/java
08056000-08058000 rw-p 0000d000 03:05 259171     /h/jdk6/bin/java
08058000-0818e000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0a 400046     /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 03:0a 400046     /lib/ld-2.2.5.so
40014000-40015000 r--p 00000000 00:00 0
Lines omitted.
4123d000-4125a000 rwxp 00001000 00:00 0
4125a000-4125f000 rwxp 00000000 00:00 0
4125f000-4127b000 rwxp 00023000 00:00 0
4127b000-4127e000 ---p 00003000 00:00 0
4127e000-412fb000 rwxp 00006000 00:00 0
412fb000-412fe000 ---p 00083000 00:00 0
412fe000-4137b000 rwxp 00086000 00:00 0
Lines omitted.
44600000-46570000 rwxp 00090000 00:00 0
46570000-46610000 rwxp 00000000 00:00 0
46610000-46a50000 rwxp 020a0000 00:00 0
46a50000-46bb0000 rwxp 00000000 00:00 0
46bb0000-4a570000 rwxp 02640000 00:00 0
Lines omitted.

The format of a line in the above memory map is as follows:

40049000-4035c000 r-xp 00000000 03:05 824473 /jdk1.5/jre/lib/i386/client/libjvm.so
|<------------->|                        |<--------------------------------->|
  Memory region    |      |       |     |                      |
                   |      |       |     |                      |
  Permission   --- +      |       |     |                      |
    r: read               |       |     |                      |
    w: write              |       |     |                      |
    x: execute            |       |     |                      |
    p: private            |       |     |                      |
    s: share              |       |     |                      |
                          |       |     |                      |
  File offset   ----------+       |     |                      |
                                  |     |                      |
  Major ID and minor ID of -------+     |                      |
  the device where the file             |                      |
  is located (i.e. /dev/hda5)           |                      |
                                        |                      |
  inode number  ------------------------+                      |
                                                               |
  File name  --------------------------------------------------+

In the memory map output, each library has two virtual memory regions: one for code and one for data. The permission for the code segment is marked with r-xp (readable, executable, private), and the permission for the data segment is rw-p (readable, writable, private).

The Java heap is already included in the heap summary earlier in the output, but it can be useful to verify that the actual memory regions reserved for heap match the values in the heap summary and that the attributes are set to rwxp.

Thread stacks usually show up in the memory map as two back-to-back regions, one with permission ---p (guard page) and one with permission rwxp (actual stack space). In addition, it is useful to know the guard page size or stack size. For example, in this memory map, the stack is located from 4127b000 to 412fb000.

On a Windows system, the memory map output is the load and end address of each loaded module, as in the example below.

Dynamic libraries:
0x00400000 - 0x0040c000     c:\jdk6\bin\java.exe
0x77f50000 - 0x77ff7000     C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000     C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000     C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000     C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000     C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08183000     c:\jdk6\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcc000     C:\WINDOWS\system32\USER32.dll
0x7e090000 - 0x7e0d1000     C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000     C:\WINDOWS\System32\WINMM.dll
0x6d2f0000 - 0x6d2f8000     c:\jdk6\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000     C:\WINDOWS\System32\PSAPI.DLL
0x6d680000 - 0x6d68c000     c:\jdk6\jre\bin\verify.dll
0x6d370000 - 0x6d38d000     c:\jdk6\jre\bin\java.dll
0x6d6a0000 - 0x6d6af000     c:\jdk6\jre\bin\zip.dll
0x10000000 - 0x10032000     C:\bugs\crash2\App.dll

VM Arguments and Environment Variables

The next information in the error log is a list of VM arguments, followed by a list of environment variables. An example follows.

VM Arguments:
java_command: NativeSEGV 2

Environment Variables:
JAVA_HOME=/h/jdk
PATH=/h/jdk/bin:.:/h/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
     /usr/dist/local/exe:/usr/dist/exe:/bin:/usr/sbin:/usr/ccs/bin:
     /usr/ucb:/usr/bsd:/usr/etc:/etc:/usr/dt/bin:/usr/openwin/bin:
     /usr/sbin:/sbin:/h:/net/prt-web/prt/bin
USERNAME=user
LD_LIBRARY_PATH=/h/jdk6/jre/lib/i386/client:/h/jdk6/jre/lib/i386:
     /h/jdk6/jre/../lib/i386:/h/bugs/NativeSEGV
SHELL=/bin/tcsh
DISPLAY=:0.0
HOSTTYPE=i386-linux
OSTYPE=linux
ARCH=Linux
MACHTYPE=i386

Note:

The list of environment variables is not the full list but rather a subset of the environment variables that are applicable to the Java VM.

Signal Handlers

On Solaris OS and Linux, the next information in the error log is the list of signal handlers.

Signal Handlers:
SIGSEGV: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004
SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004

System Section Format

The final section in the error log is the system information. The output is operating-system-specific but in general includes the operating system version, CPU information, and summary information about the memory configuration.

The following example shows output on a Solaris 9 OS system.

---------------  S Y S T E M  ---------------

OS:                       Solaris 9 12/05 s9s_u5wos_08b SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 21 November 2005

uname:SunOS 5.9 Generic_112233-10 sun4u  (T2 libthread)
rlimit: STACK 8192k, CORE infinity, NOFILE 65536, AS infinity
load average:0.41 0.14 0.09

CPU:total 2 has_v8, has_v9, has_vis1, has_vis2, is_ultra3

Memory: 8k page, physical 2097152k(1394472k free)

vm_info: Java HotSpot(TM) Client VM (1.5-internal) for solaris-sparc,
built on Aug 12 2005 10:22:32 by unknown with unknown Workshop:0x550

On Solaris OS and Linux, the operating system information is contained in the file /etc/*release. This file describes the kind of system the application is running on, and in some cases the information string might include the patch level. Some system upgrades are not reflected in the /etc/*release file. This is especially true on the Linux system, where the user can rebuild any part of the system.

On Solaris OS the uname system call is used to get the name for the kernel. The thread library (T1 or T2) is also printed.

On the Linux system the uname system call is also used to get the kernel name. The libc version and the thread library type are also printed. An example follows.

uname:Linux 2.4.18-3smp #1 SMP Thu Apr 18 07:27:31 EDT 2002 i686
libc:glibc 2.2.5 stable linuxthreads (floating stack)
    |<- glibc version ->|<--  pthread type       -->|

On Linux there are three possible thread types, namely linuxthreads (fixed stack), linuxthreads (floating stack), and NPTL. They are normally installed in /lib, /lib/i686, and /lib/tls.

It is useful to know the thread type. For example, if the crash appears to be related to pthread, then you might be able to work around the issue by selecting a different pthread library. A different pthread library (and libc) can be selected by setting LD_LIBRARY_PATH or LD_ASSUME_KERNEL.

The glibc version usually does not include the patch level. The command rpm -q glibc might provide more detailed version information.

On Solaris OS and Linux, the next information is the rlimit information. Note that the default stack size of the VM is usually smaller than the system limit. An example follows:

rlimit: STACK 8192k, CORE 0k, NPROC 4092, NOFILE 1024, AS infinity
             |          |         |           |           virtual memory (-v)
             |          |         |           +--- max open files (ulimit -n)
             |          |         +----------- max user processes (ulimit -u)
             |          +------------------------- core dump size (ulimit -c)
             +---------------------------------------- stack size (ulimit -s)
load average:0.04 0.05 0.02

The next information specifies the CPU architecture and capabilities identified by the VM at start-up, as in the following example:

CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse
          |        | |<----- CPU features ---->|
          |        |
          |        +--- processor family (IA32 only):
          |                3 - i386
          |                4 - i486
          |                5 - Pentium
          |                6 - PentiumPro, PII, PIII
          |               15 - Pentium 4
          +------------ Total number of CPUs

The following table shows the possible CPU features on a SPARC system.

Table C-4 SPARC Features

SPARC Feature | Description
has_v8 | Supports v8 instructions.
has_v9 | Supports v9 instructions.
has_vis1 | Supports visualization instructions.
has_vis2 | Supports visualization instructions.
is_ultra3 | UltraSparc III.
no-muldiv | No hardware integer multiply and divide.
no-fsmuld | No multiply-add and multiply-subtract instructions.

The following table shows the possible CPU features on an Intel/IA32 system.

Table C-5 Intel/IA32 Features

Intel/IA32 Feature | Description
cmov | Supports cmov instruction.
cx8 | Supports cmpxchg8b instruction.
fxsr | Supports fxsave and fxrstor.
mmx | Supports MMX.
sse | Supports SSE extensions.
sse2 | Supports SSE2 extensions.
ht | Supports Hyper-Threading Technology.

The following table shows the possible CPU features on an AMD64/EM64T system.

Table C-6 AMD64/EM64T Features

AMD64/EM64T Feature | Description
amd64 | AMD Opteron, Athlon64, and so forth.
em64t | Intel EM64T processor.
3dnow | Supports 3DNow extension.
ht | Supports Hyper-Threading Technology.

The next information in the error log is memory information, as follows:

                                                  unused swap space
                              total amount of swap space        |
                   unused physical memory            |          |
total amount of physical memory       |              |          |
     page size              |         |              |          |
           v                v         v              v          v
Memory: 4k page, physical 513604k(11228k free), swap 530104k(497504k free)

Some systems require swap space to be at lease twice the size of real physical memory, whereas other systems do not have any such requirements. As a general rule, if both physical memory and swap space are almost full, there is good reason to suspect that the crash was due to insufficient memory.

On Linux systems the kernel may convert most of unused physical memory to file cache. When there is a need for more memory, the Linux kernel will give the cache memory back to the application. This is handled transparently by the kernel, but it does mean the amount of unused physical memory reported by fatal error handler could be close to zero when there is still sufficient physical memory available.

The final information in the SYSTEM section of the error log is vm_info, which is a version string embedded in libjvm.so/jvm.dll. Every Java VM has its own unique vm_info string. If you are in doubt about whether the fatal error log was generated by a particular Java VM, check the version string.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Integrating Signal and Exception Handling

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

6 Integrating Signal and Exception Handling

This chapter provides information on how signals and exceptions are handled by the Java HotSpot Virtual Machine. It also describes the signal chaining facility, available on Solaris OS and Linux, that facilitates writing applications that need to install their own signal handlers.

This chapter contains the following sections:

  • "Signal Handling on Solaris OS and Linux"

  • "Exception Handling on Windows"

Signal Handling on Solaris OS and Linux

The Java HotSpot VM installs signal handlers to implement various features and to handle fatal error conditions. For example, in an optimization to avoid explicit null checks in cases where java.lang.NullPointerException will be thrown rarely, the SIGSEGV signal is caught and handled, and the NullPointerException is thrown.

In general there are two categories of situations where signal/traps arise:

  • When signals are expected and handled, like the implicit null-handling cited above. Another example is the safepoint polling mechanism, which protects a page in memory when a safepoint is required. Any thread that accesses that page causes a SIGSEGV, which results in the execution of a stub that brings the thread to a safepoint.

  • Unexpected signals. This includes a SIGSEGV when executing in VM code, Java Native Interface (JNI) code, or native code. In these cases the signal is unexpected, so fatal error handling is invoked to create the error log and terminate the process.

The following table lists the signals that are currently used on Solaris OS and Linux.

Table 6-1 Signals Used on Solaris OS and Linux

Signal | Description
SIGSEGV, SIGBUS, SIGFPE, SIGPIPE, SIGILL | These signals are used in the implementation for implicit null check, and so forth.
SIGQUIT | This signal is used to dump Java stack traces to the standard error stream. (Optional)
SIGTERM, SIGINT, SIGHUP | These signals are used to support the shutdown hook mechanism (java.lang.Runtime.addShutdownHook) when the VM is terminated abnormally. (Optional)
SIGUSR1 | This signal is used in the implementation of the java.lang.Thread.interrupt method. Not used starting with Solaris 10 OS. Reserved on Linux. (Configurable)
SIGUSR2 | This signal is used internally. Not used starting with Solaris 10 OS. (Configurable)
SIGABRT | The HotSpot VM does not handle this signal. Instead it calls the abort function after fatal error handling. If an application uses this signal then it should terminate the process to preserve the expected semantics.

Signals tagged as "optional" are not used when the -Xrs option is specified to reduce signal usage. With this option fewer signals are used, although the VM installs its own signal handler for essential signals such as SIGSEGV. Specifying this option means that the shutdown hook mechanism will not execute if the process receives a SIGQUIT, SIGTERM, SIGINT, or SIGHUP. Shutdown hooks will execute, as expected, if the VM terminates normally (that is, when the last non-daemon thread completes or the System.exit method is invoked).

On Solaris 8 and 9 OS, signals tagged as "configurable" are substituted when the -XX:+UseAltSigs option is specified to use alternative signals. Starting with Solaris 10 OS, this option is ignored, as the operating system reserves two additional signals (called SIGJVM1 and SIGJVM2).

On Linux, the handler for SIGUSR1 cannot be overridden. SIGUSR2 is used to implement suspend and resume. However it is possible to specify an alternative signal to be used instead of SIGUSR2. This is done by specifying the _JAVA_SR_SIGNUM environment variable. If this environment variable is set, it must be set to a value larger than the maximum of SIGSEGV and SIGBUS.

Signal Chaining

If an application with native code requires its own signal handlers, then it might need to be used with the signal chaining facility. The signal chaining facility offers the following features:

  • Support for pre-installed signal handlers when the HotSpot VM is created.

    When the VM is first created, existing signal handlers (that is, handlers for signals that are used by the VM) are saved. During execution, when any of these signals are raised and found not to be targeted at the Java HotSpot VM, the pre-installed handlers are invoked. In other words, pre-installed handlers are chained behind the VM handlers for these signals.

  • Support for signal handler installation after the HotSpot VM is created, either inside JNI code or from another native thread.

    An application can link and load the libjsig.so shared library before libc/libthread/libpthread. This library ensures that calls such as signal(), sigset(), and sigaction() are intercepted so that they do not actually replace the Java HotSpot VM's signal handlers if the handlers conflict with those already installed by the VM. Instead, these calls save the new signal handlers (or chain them behind the VM-installed handlers). During execution, when any of these signals are raised and found not to be targeted at the Java HotSpot VM, the pre-installed handlers are invoked.

    If support for signal handler installation after the creation of the VM is not required, then the libjsig.so shared library is not needed.

    Perform one of these two procedures to use the libjsig.so shared library:

    • Link it with the application that creates/embeds the HotSpot VM:

      cc -L libjvm.so-directory -ljsig -ljvm java_application.c

    • Use the LD_PRELOAD environment variable:

      • KornShell (ksh):

        export LD_PRELOAD=libjvm.so-directory/libjsig.so; java_application(ksh)

      • C shell (csh):

        setenv LD_PRELOAD libjvm.so-directory/libjsig.so; java_application(csh)

    The interposed signal(), sigset(), and sigaction() return the saved signal handlers, not the signal handlers installed by the Java HotSpot VM and which are seen by the operating system.

Note that SIGUSR1 cannot be chained. If an application attempts to chain this signal on Solaris OS, then the HotSpot VM terminates with the following fatal error:

Signal chaining detected for VM interrupt signal, try -XX:+UseAltSigs

Also, the SIGQUIT, SIGTERM, SIGINT, and SIGHUP signals cannot be chained. If the application needs to handle these signals, consider using the -Xrs option.

On Solaris OS, the SIGUSR2 signal can be chained only for non-Java and non-VM threads (that is, it can only be used for native threads created by applications that do not attach to the VM).

Exception Handling on Windows

On Windows, an exception is an event that occurs during the execution of a program. There are two kinds of exceptions: hardware exceptions and software exceptions. Hardware exceptions are comparable to signals such as SIGSEGV and SIGKILL on Solaris OS and Linux. Software exceptions are initiated explicitly by applications or the operating system using the RaiseException() API.

On Windows, the mechanism for handling both hardware and software exceptions is called structured exception handling (SEH). This is stack frame-based exception handling similar to the C++ and Java exception handling mechanism. In C++ the __try and __except keywords are used to guard a section of code that might result in an exception, as in the following example:

__try {
     // guarded body of code
 } __except (filter-expression) {
     // exception-handler block
 }

The __except block is filtered by a filter expression that uses the integer exception code returned by the GetExceptionCode() API, exception information returned by the GetExceptionInformation() API, or both.

The filter expression should evaluate to one of the following values:

  • EXCEPTION_CONTINUE_EXECUTION = -1

    The filter expression has repaired the situation, and execution continues where the exception occurred. Unlike some exception schemes, SEH supports the resumption model as well. This is much like Unix signal handling in the sense that after the signal handler finishes, the execution continues where the program was interrupted. The difference is that the handler in this case is just the filter expression itself and not the __except block. However, the filter expression might also involve a function call.

  • EXCEPTION_CONTINUE_SEARCH = 0

    The current handler cannot handle this exception. Continue the handler search for the next handler. This is similar to the catch block not matching an exception type in C++ and Java.

  • EXCEPTION_EXECUTE_HANDLER = 1

    The current handler matches and can handle the exception. The __except block is executed.

The __try and __finally keywords are used to construct a termination handler as follows

__try {
    // guarded body of code
} __finally {
    // __finally block
}

When control leaves the __try block (after exception or without exception), the __finally block is executed. Inside the __finally block, the AbnormalTermination() API can be called to test whether control continued after the exception or not.

Windows programs can also install a top-level unhandled exception filter function to catch exceptions that are not handled in the __try/__except block. This function is installed on a process-wide basis using the SetUnhandledExceptionFilter() API. If there is no handler for an exception, then UnhandledExceptionFilter() is called, and this will call the top-level unhandled exception filter function, if any, to catch that exception. This function also shows a message box to notify the user about the unhandled exception.

Windows exceptions are comparable to Unix synchronous signals that are attributable to the current execution stream. In Windows, asynchronous events such as console events (for example, the user pressing Control+C at the console) are handled by the console control handler registered using the SetConsoleCtlHandler() API.

If an application uses the signal() API on Windows, then the C runtime library (CRT) maps both Windows exceptions and console events to appropriate signals or C runtime errors. For example, CRT maps Control+C to SIGINT and all other console events to SIGBREAK. Similarly, if you register the SIGSEGV handler, CRT translates the corresponding exception to a signal. CRT startup code implements a __try/__except block around the main() function. The CRT's exception filter function (named _XcptFilter) maps the Win32 exceptions to signals and dispatches signals to their appropriate handlers. If a signal's handler is set to SIG_DFL (default handling), then _XcptFilter calls UnhandledExceptionFilter.

With Windows XP or Windows 2003, the vectored exception handling mechanism can also be used. Vectored handlers are not frame-based handlers. A program can register zero or more vectored exception handlers using the AddVectoredExceptionHandler API. Vectored handlers are invoked before structured exception handlers, if any, are invoked, regardless of where the exception occurred.

Vectored exception handler returns one of the following values:

  • EXCEPTION_CONTINUE_EXECUTION: Skip next vectored and SEH handlers.

  • EXCEPTION_CONTINUE_SEARCH: Continue next vectored or SEH handler.

Refer to the Microsoft web site at http://www.microsoft.com for further information on Windows exception handling.

Exception Handling By the Java HotSpot VM

The HotSpot VM installs a top-level exception handler during initialization using the SetUnhandledExceptionFilter API for 32-bit systems, or the AddVectoredExceptionHandler API for 64-bit systems.

It also installs the win32 SEH using a __try /__except block in C++ around the thread (internal) start function call for each thread created.

Finally, it installs an exception handler around JNI functions.

If an application must handle structured exceptions in JNI code, it can use __try /__except statements in C++. However, if it must use the vectored exception handler in JNI code then the handler must return EXCEPTION_CONTINUE_SEARCH to continue to the VM's exception handler.

In general, there are two categories of situations in which exceptions arise:

  • When exceptions are expected and handled. Examples include the implicit null handling cited above where accessing a null causes an EXCEPTION_ACCESS_VIOLATION, which is handled.

  • Unexpected exceptions. An example is an EXCEPTION_ACCESS_VIOLATION when executing in VM code, or in JNI code, or in native code. In these cases the signal is unexpected, and fatal error handling is invoked to create the error log and terminate the process.

Console Handlers

The Java HotSpot VM registers console events as shown in the following table.

Table 6-2 Console Events

Console Event | Signal | Usage
CTRL_C_EVENT | SIGINT | This event and signal is used to terminate a process. (Optional)
CTRL_CLOSE_EVENT CTRL_LOGOFF_EVENT CTRL_SHUTDOWN_EVENT | SIGTERM | This event and signal is used by the shutdown hook mechanism when the VM is terminated abnormally. (Optional)
CTRL_BREAK_EVENT | SIGBREAK | This event and signal is used to dump Java stack traces at the standard error stream. (Optional)

If an application must register its own console handler, then the -Xrs option can be used. With this option, shutdown hooks are not run on SIGTERM (with above mapping of events) and thread dump support is not available on SIGBREAK (with above mapping of the Control+Break event).

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide, Release 8

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

Java Platform, Standard Edition

HotSpot Virtual Machine Troubleshooting Guide

Release 8

E38388-01

March 2014

This document is a guide to help troubleshoot problems that might occur between a Java application and the Java HotSpot Virtual Machine.

Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide, Release 8

E38388-01

Copyright 1995, 2014,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

This document is a guide to help troubleshoot problems that might occur between a Java application and the Java HotSpot Virtual Machine (JVM). The document provides a description of the available tools and command-line options that can help in analyzing problems. The document also provides guidance on how to approach some general issues, such as a crashes, hangs, or memory leaks. Finally, the document provides directions for data collection and bug report preparation.

Audience

The target audience for this document comprises developers who are using the Java Development Kit (JDK), which is Oracle's implementation of the Java Platform, Standard Edition (Java SE). The current release is Java SE 8 (and JDK 8). However, most of the information in this document can be applied to previous releases.

This document is intended for readers with a high-level understanding of the components of the JVM, as well as some understanding of concepts such as garbage collection, threads, native libraries, and so on. In addition, it is assumed that the reader is reasonably proficient with the operating system on which the Java application is developed and run.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For more information about Java SE, the JDK, and the JVM, visit the Java SE Home website at

http://www.oracle.com/technetwork/java/javase

For help on troubleshooting problems that might occur with Java applications created using desktop technologies in Java SE, refer to the Java SE Desktop Technologies Troubleshooting Guide.

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Submitting Bug Reports

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

7 Submitting Bug Reports

This chapter provides guidance on how to submit a bug report. It includes suggestions about what to try before submitting a report and what data to collect for the report.

This chapter contains the following sections:

  • "Checking for Existing Fixes in Update Releases"

  • "Preparing to Submit a Bug Report"

  • "Collecting Data for a Bug Report"

  • "Collecting Core Dumps"

Checking for Existing Fixes in Update Releases

The current platform is Java SE 8. Regularly scheduled updates to this release contain fixes for a set of critical bugs identified since the initial release of the platform. When an update release becomes available, it becomes the default download at the Java SE Downloads site.

The download site includes release notes that list the bug fixes in the release. Each bug in the list is linked to the bug description in the bug database. The release notes also include the list of fixes in previous update releases. If you encounter an issue, or suspect a bug, then, as an early step in the diagnosis, check the list of fixes that are available in the most recent update release.

Sometimes it is not obvious if an issue is a duplicate of a bug that is already fixed. Therefore, where possible, test with the latest update release to see if the problem persists.

Preparing to Submit a Bug Report

Before submitting a bug report, consider the following recommendations:

  • Collect as much relevant data as possible. For example, generate a thread-dump in the case of a deadlock, or locate the core file (where applicable) and hs_err file in the case of a crash. In all cases it is important to document the environment and the actions performed just before the problem is encountered.

  • Where applicable, try to restore the original state and reproduce the problem using the documented steps. This helps to determine if the problem is reproducible or an intermittent issue.

  • If the issue is reproducible, try to narrow down the problem. In some cases, a bug can be demonstrated with a small standalone test case. Bugs that are demonstrated by small test cases will typically be easy to diagnose when compared to test cases that consist of a large complex application.

  • Search the bug database to see if this bug or a similar bug has been reported. If the bug has already been reported, the bug report might have further information, such as the following:

    • If the bug has already been fixed, the release in which it was fixed.

    • A workaround for the problem.

    • Comments in the evaluation that explain, in further detail, the circumstances that cause the bug to arise.

    The bug database is located at http://bugs.java.com/bugdatabase/index.jsp.

  • If you conclude that the bug has not already been reported, submit a new bug.

Before submitting a bug, verify that the environment where the problem arises is a supported configuration. See the Supported System Configurations site.

In addition to the system configurations, check the list of supported locales. See the Supported Locales web page.

In the case of the Solaris Operating System, check the recommended patch cluster for the operating system release to ensure that the recommended patches are installed.

Collecting Data for a Bug Report

In general it is recommended to collect as much relevant data as possible when you create a bug report or submit a support call. This section suggests the data to collect and, where applicable, it provides recommendations for the commands or general procedure for obtaining the data.

The following sections provide information about data that can be collected prior to submitting a bug report:

  • "Hardware Details"

  • "Operating System"

  • "Java SE Version"

  • "Command-Line Options"

  • "Environment Variables"

  • "Fatal Error Log"

  • "Core or Crash Dump"

  • "Detailed Description of the Problem"

  • "Logs and Traces"

  • "Results from Troubleshooting Steps"

Hardware Details

Sometimes a bug arises or can be reproduced only on certain hardware configurations. If a fatal error occurs, the error log might contain the hardware details. If an error log is not available, document in the bug report the number and the type of processors in the machine, the clock speed, and, where applicable and if known, some details on the features of that processor. For example, in the case of Intel processors, it might be relevant that hyper-threading is available.

Operating System

On the Solaris Operating System, the showrev -a command prints the operating system version and patch information.

On Linux, it is important to know which distribution and version is used. Sometimes the /etc/*release file indicates the release information, but as components and packages can be upgraded independently, it is not always a reliable indication of the configuration. Therefore, in addition to the information from the *release file, collect the following information:

  • The kernel version. This can be obtained using the uname -a command.

  • The glibc version. The rpm -q glibc command indicates the patch level of glibc.

  • The thread library. There are two thread libraries for Linux, namely LinuxThreads and NPTL. The LinuxThreads library is used on 2.4 and older kernels and has "fixed stack" and "floating stack" variants. The Native POSIX Thread Library (NPTL) is used on the 2.6 kernel. Some Linux releases (such as RHEL3) include backports of NPTL to the 2.4 kernel. Use the command getconf GNU_LIBPTHREAD_VERSION to determine which thread library is used. If the getconf command returns an error to say that the variable does not exist, then it is likely that you are using an old kernel with the LinuxThreads library.

Java SE Version

The Java SE version string can be obtained using the java -version command.

Multiple versions of Java SE may be installed on the same machine. Therefore, ensure that you use the appropriate version of the java command by verifying that the installation bin directory appears in your PATH environment variable before other installations.

Command-Line Options

If the bug report does not include a fatal error log, it is important to document the full command line and all its options. This includes any options that specify heap settings (for example, the -mx option) or any -XX options that specify HotSpot specific options.

One of the features in Java SE is garbage collector ergonomics. On server-class machines the java command launches the HotSpot Server VM and a parallel garbage collector. A machine is considered to be a server machine if it has at least two processors and 2GB or more of memory.

The -XX:+PrintCommandLineFlags option can be used to verify the command-line options. This option prints all command-line flags to the VM. The command-line options can also be obtained for a running VM or core file using the jmap utility.

Environment Variables

Sometimes problems arise due to environment variable settings. When creating the bug report, indicate the values of the following Java environment variables (if set).

  • JAVA_HOME

  • JRE_HOME

  • JAVA_TOOL_OPTIONS

  • _JAVA_OPTIONS

  • CLASSPATH

  • JAVA_COMPILER

  • PATH

  • USERNAME

In addition, collect the following operating-system-specific environment variables.

  • On Solaris OS and Linux, collect the values of the following environment variables.

    • LD_LIBRARY_PATH

    • LD_PRELOAD

    • SHELL

    • DISPLAY

    • HOSTTYPE

    • OSTYPE

    • ARCH

    • MACHTYPE

  • On Linux, also collect the values of the following environment variables.

    • LD_ASSUME_KERNEL

    • _JAVA_SR_SIGNUM

  • On Windows, collect the values of the following environment variables.

    • OS

    • PROCESSOR_IDENTIFIER

    • _ALT_JAVA_HOME_DIR

Fatal Error Log

When a fatal error occurs, an error log is created. For detailed information about this file, see "Fatal Error Log".

The error log contains much information obtained at the time of the fatal error, such as version and environment information, details on the threads that provoked the crash, and so forth.

If the fatal error log is generated, be sure to include it in the bug report or support call.

Core or Crash Dump

Core and crash dumps can be very useful when trying to diagnose a system crash or hung process. The procedure for generating a dump is described in "Collecting Core Dumps".

Detailed Description of the Problem

When creating a problem description, try to include as much relevant information as possible. Describe the application, the environment, and most importantly the events leading up to the time when the problem was encountered.

  • If the problem is reproducible, list the steps that are required to demonstrate the problem.

  • If the problem can be demonstrated with a small test case, include the test case and the commands to compile and execute the test case.

  • If the test case or problem requires third-party code (for example, a commercial or open source library or package), provide details on where and how to obtain the library.

Sometimes the problem can be reproduced only in a complex application environment. In this case, the description, coupled with logs, core file, and other relevant information, might be the sole means to diagnose the issue. In these situations the description should indicate if the submitter is willing to run further diagnosis or run test binaries on the system where the issue arises.

Logs and Traces

In some cases, log or trace output can help to quickly determine the cause of a problem.

For example, in the case of a performance issue the output of the -verbose:gc option can help in diagnosing the problem. (This is the option to enable output from the garbage collector.)

In other cases the output from the jstat command can be used to capture statistical information over the time period leading up to the problem.

In the case of a deadlock or a hung VM (for example, due to a loop) the thread stacks can help diagnose the problem. The thread stacks are obtained by pressing Control+\ on Solaris OS and Linux and Control+Break on Windows.

In general, include all relevant logs, traces and other output in the bug report or support call.

Results from Troubleshooting Steps

Before submitting the bug report, be sure to document any troubleshooting steps that were performed.

For example, if the problem is a crash and the application has native libraries, you might have already run the application with the -Xcheck:jni option to reduce the likelihood that the bug is in the native code. Another case could be a crash that occurs with the HotSpot Server VM (-server option). If you have also tested with the HotSpot Client VM (-client option) and the problem does not occur, this gives an indication that the bug might be specific to the HotSpot Server VM.

In general, include in the bug report all troubleshooting steps and results that have already occurred. This type of information can often reduce the time that is required to diagnose an issue.

Collecting Core Dumps

This section explains how to generate and collect core dumps (also known as crash dumps). A core dump or a crash dump is a memory snapshot of a running process. A core dump can be automatically created by the operating system when a fatal or unhandled error (for example, signal or system exception) occurs. Alternatively, a core dump can be forced by means of system-provided command-line utilities. Sometimes a core dump is useful when diagnosing a process that appears to be hung; the core dump may reveal information about the cause of the hang.

When collecting a core dump, be sure to gather other information about the environment so that the core file can be analyzed (for example, OS version, patch information, and the fatal error log).

Core dumps do not usually contain all the memory pages of the crashed or hung process. With each of the operating systems discussed here, the text (or code) pages of the process are not included in core dumps. But to be useful, a core dump must consist of pages of heap and stack as a minimum. Collecting non-truncated good core dump files is essential for postmortem analysis of the crash.

Collecting Core Dumps on Solaris OS

With the Solaris Operating System, unhandled signals such as a segmentation violation, illegal instruction, and so forth, result in a core dump. By default, the core dump is created in the current working directory of the process and the name of the core dump file is core. The user can configure the location and name of the core dump using the core file administration utility, coreadm. This procedure is fully described in the man page for the coreadm utility.

The ulimit utility is used to get or set the limitations on the system resources available to the current shell and its descendants. Use the ulimit -c command to check or set the core file size limit. Make sure that the limit is set to unlimited; otherwise the core file could be truncated.

Note:

ulimit is a Bash shell built-in command; on a C shell, use the limit command.

Ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

The gcore utility can be used to get a core image of running processes. This utility accepts a process id (pid) of the process for which you want to force core dump.

To get the list of Java processes running on the machine, you can use any of the following commands:

  • ps -ef | grep java

  • pgrep java

  • jps

Note:

The jps command-line utility does not perform name matching (that is, looking for "java" in the process command name) and so it can list Java VM embedded processes as well as the Java processes.

Using the ShowMessageBoxOnError Option on Solaris OS

A Java process can be started with the -XX:+ShowMessageBoxOnError command-line option. When a fatal error is encountered, the process prints a message to standard error and waits for a yes or no response from standard input. Below is an example of output when an unexpected signal occurs.

=======================================================================
Unexpected Error
-----------------------------------------------------------------------
SIGSEGV (0xb) at pc=0xfeba31ac, pid=8677, tid=2
Do you want to debug the problem?
To debug, run 'dbx - 8677'; then switch to thread 2
Enter 'yes' to launch dbx automatically (PATH must include dbx)
Otherwise, press RETURN to abort...
=======================================================================

Before answering yes or pressing RETURN (Enter), use the gcore utility to force a core dump. Then you can type yes to launch the dbx debugger.

Suspending a Process using truss

In situations where it is not possible to specify the -XX:+ShowMessageBoxOnError option, you might be able to use the truss utility. This Solaris OS utility is used to trace system calls and signals. You can use this utility to suspend the process when it reaches a specific function or system call.

The following command shows how to use the truss utility to suspend a process when the exit system call is executed (in other words, the process is about to exit).

$ truss -t \!all -s \!all -T exit -p pid

When the process calls exit, it will be suspended. At this point, you can attach the debugger to the process or call gcore to force a core dump.

Collecting Core Dumps on Linux

On the Linux operating system, unhandled signals such as segmentation violation, illegal instruction, and so forth, result in a core dump. By default, the core dump is created in the current working directory of the process and the name of the core dump file is core.pid, where pid is the process id of the crashed Java process.

The ulimit utility is used to get or set the limitations on the system resources available to the current shell and its descendants. Use the ulimit -c command to check or set the core file size limit. Make sure that the limit is set to unlimited; otherwise the core file could be truncated.

Note:

ulimit is a Bash shell built-in command; on a C shell, use the limit command.

Ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

You can use the gcore command in the gdb (GNU Debugger) interface to get a core image of a running process. This utility accepts the pid of the process for which you want to force the core dump.

To get the list of Java processes running on the machine, you can use any of the following commands:

  • ps -ef | grep java

  • pgrep java

  • jps

Note:

The jps command-line utility does not perform name matching (that is, looking for "java" in the process command name) and so it can list Java VM embedded processes as well as the Java processes.

Using the ShowMessageBoxOnError Option on Linux

A Java process can be started with the -XX:+ShowMessageBoxOnError command-line option. When a fatal error is encountered, the process prints a message to standard error and waits for a yes or no response from standard input. Below is an example of output when an unexpected signal occurs.

=======================================================================
Unexpected Error
-----------------------------------------------------------------------
SIGSEGV (0xb) at pc=0x06232e5f, pid=11185, tid=8194
Do you want to debug the problem?
To debug, run 'gdb /proc/11185/exe 11185'; then switch to thread 8194
Enter 'yes' to launch gdb automatically (PATH must include gdb)
Otherwise, press RETURN to abort...
=======================================================================

Type yes to launch the gdb (GNU Debugger) interface, as suggested by the error report shown above. In the gdb prompt, you can give the gcore command. This command creates a core dump of the debugged process with the name core.pid, where pid is the process ID of the crashed process. Make sure that the gdb gcore command is supported in your versions of gdb. Look for help gcore in the gdb command prompt.

Reasons for Not Getting a Core File

The following list explains the major reasons that a core file might not be generated. This list pertains to both Solaris OS and Linux, unless specified otherwise.

  • The current user does not have permission to write in the current working directory of the process.

  • The current user has write permission on the current working directory, but there is already a file named core that has read-only permission.

  • The current directory does not have enough space or there is no space left.

  • The current directory has a subdirectory named core.

  • The current working directory is remote. It might be mapped by NFS (Network File System), and NFS failed just at the time the core dump was about to be created.

  • Solaris OS only: The coreadm tool has been used to configure the directory and name of the core file, but any of the above reasons apply for the configured directory or filename.

  • The core file size limit is too low. Check your core file limit using the ulimit -c command (Bash shell) or the limit -c command (C shell). If the output from this command is not unlimited, the core dump file size might not be large enough. If this is the case, you will get truncated core dumps or no core dump at all. In addition, ensure that any scripts that are used to launch the VM or your application do not disable core dump creation.

  • The process is running a setuid program and therefore the operating system will not dump core unless it is configured explicitly.

  • Java specific: If the process received SIGSEGV or SIGILL but no core dump, it is possible that the process handled it. For example, HotSpot VM uses the SIGSEGV signal for legitimate purposes, such as throwing NullPointerException, deoptimization, and so forth. The signal is unhandled by the Java VM only if the current instruction (PC) falls outside Java VM generated code. These are the only cases in which HotSpot dumps core.

  • Java specific: The JNI Invocation API was used to create the VM. The standard Java launcher was not used. The custom Java launcher program handled the signal by just consuming it and produced the log entry silently. This situation has occurred with certain Application Servers and Web Servers. These Java VM embedding programs transparently attempt to restart (fail over) the system after an abnormal termination. In this case, the fact that a core dump is not produced is a feature and not a bug.

Collecting Crash Dumps on Windows

On the Windows operating system there are three types of crash dumps:

  • Dr. Watson logfile, which is a text error log file that includes faulting stack trace and a few other details.

  • User minidump, which can be considered a "partial" core dump. It is not a complete core dump, because it does not contain all the useful memory pages of the process.

  • Dr. Watson full-dump, which is equivalent to a Unix core dump. This dump contains most memory pages of the process (except for code pages).

When an unexpected exception occurs on Windows, the action taken depends on two values in the following registry key:

\\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug

The two values are named Debugger and Auto. The Auto value indicates if the debugger specified in the value of the Debugger entry starts automatically when an application error occurs.

  • A value of 0 for Auto means that the system displays a message box notifying the user when an application error occurs.

  • A value of 1 for Auto means that the debugger starts automatically.

The value of Debugger is the debugger command that is to be used to debug program errors.

When a program error occurs, Windows examines the Auto value and if the value is 0 it executes the command in the Debugger value. If the value for Debugger is a valid command, a message box is created with two buttons: OK and Cancel. If the user clicks OK, the program is terminated. If the user clicks Cancel, the specified debugger is started. If the value for the Auto entry is set to 1 and the value for the Debugger entry specifies the command for a valid debugger, the system automatically starts the debugger and does not generate a message box.

Configuring Dr. Watson

The Dr. Watson debugger is used to create crash dump files. By default, the Dr. Watson debugger (drwtsn32.exe) is installed into the Windows system folder (%SystemRoot%\System32).

To install Dr. Watson as the postmortem debugger, run the following command:

drwtsn32 -i

To configure name and location of crash dump files, run drwtsn32 without any options.

In the Dr. Watson GUI window, make sure that the Create Crash Dump File check box is selected and that the crash dump file path and log file path are configured in their respective text fields.

Dr. Watson may be configured to create a full dump using the registry. The registry key is as follows:

System Key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DrWatson]
Entry Name: CreateCrashDump
Value: (0 = disabled, 1 = enabled)

Note that if the application handles the exception, then the registry-configured debugger is not invoked. In that case it might be appropriate to use the -XX:+ShowMessageBoxOnError command-line option to force the process to wait for user intervention on fatal error conditions.

Forcing a Crash Dump

On the Windows operating system, the userdump command-line utility can be used to force a Dr. Watson dump of a running process. The userdump utility does not ship with Windows but instead is released as a component of the OEM Support Tools package.

An alternative way to force a crash dump is to use the windbg debugger. The main advantage of using windbg is that it can attach to a process in a non-invasive manner (that is, read-only). Normally Windows terminates a process after a crash dump is obtained but with the non-invasive attach it is possible to obtain a crash dump and let the process continue. To attach the debugger non-invasively requires selecting the Attach to Process option and the Noninvasive checkbox.

When the debugger is attached, a crash dump can be obtained using the following command.

.dump /f crash.dmp

The windbg debugger is included in the "Debugging Tools for Windows" download.

An additional utility in this download is the dumpchk.exe utility, which can verify that a memory dump file has been created correctly.

Both userdump.exe and windbg require the pid of the process. The userdump -p command lists the process and program for all processes. This is useful if you know that the application is started with the java.exe launcher. However, if a custom launcher is used (embedded VM), it might be difficult to recognize the process. In that case you can use the jps command-line utility as it lists the pids of the Java processes only.

As with Solaris OS and Linux, you can also use the -XX:+ShowMessageBoxOnError command-line option on Windows. When a fatal error is encountered, the process shows a message box and waits for a yes or no response from the user.

Before clicking Yes or No, you can use the userdump.exe utility to generate the Dr. Watson dump for the Java process. This utility can also be used in cases when the process appears to be hung.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Summary of Tools in This Release

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous

D Summary of Tools in This Release

This appendix presents a summary of tools available in the current release of the JDK, as well as the changes since the previous release.

All the JDK troubleshooting tools that are described in this document are available in JDK 7 on both Solaris OS and Linux.

The following JDK troubleshooting tools are also available in JDK 7 on Windows:

  • HPROF

  • JConsole

  • jdb

  • jhat

  • jinfo

  • jmap

  • jps (not currently available on Windows 98 or Windows ME)

  • jrunscript

  • jstack

  • jstat (not currently available on Windows 98 or Windows ME)

  • jstatd (not currently available on Windows 98 or Windows ME)

  • visualgc (not currently available on Windows 98 or Windows ME)

Changes to Troubleshooting Tools in JDK 7

This is a list of changes to the JDK troubleshooting tools and options from JDK 1.5 to JDK 7.

  • The Java VisualVM tool is included in JDK releases starting with release 6 update 7.

  • The Heap Analysis Tool (HAT) has been replaced by the new jhat command-line tool. This new tool has the same functionality as HAT, with the following additional enhancements:

    • jhat can parse incomplete and truncated heap dumps.

    • jhat can read heap dumps generated on 64-bit systems.

    • jhat supports Object Query Language (OQL), which you can use to create your own queries on the heap dump.

  • The JConsole tool has the following changes:

    • A new user interface (button) is provided for deadlock detection, including java.util.concurrent locks.

    • The Connection dialog is new.

    • The Overview tab is new.

    • You no longer need to specify the -Dcom.sun.management.jmxremote command-line option when starting the application to be monitored.

    • You can connect to a VM using the attach mechanism.

    • You can pass a flag on the command line to the VM that is running JConsole.

    • The com.sun.management.HotSpotDiagnostic MBean property is new. In the MBean tab, you can use this property to dump heap, get and set VM options, and change management options dynamically.

  • The jdb tool has the following changes:

    • Shows return values in method and exit traces.

    • Trace method entry/exit without stopping.

    • The Java Platform Debugger Architecture (JPDA) ProcessAttachingConnector is new.

  • The jinfo tool has the following changes:

    • The new jinfo -flag option allows you to dynamically set, unset, and change the values of certain Java VM flags for a specified Java process.

    • The jinfo command is new to Windows, but it only supports the -flag option.

  • The jmap command has the following changes:

    • The jmap -finalizerinfo option is new. With this option, the command prints information on objects awaiting finalization.

    • The jmap -permstat option has been updated to print also the number and size of internalized String instances.

    • The jmap -dump:format=b,file=filename option is new. With this option, jmap obtains a heap dump from a running process or from a core file and writes it in binary HPROF format to a specified file. This file can then be analyzed with the jhat tool.

    • The jmap -F option is new and is supported on Solaris OS and Linux only. This option forces the use of the Serviceability Agent in case the process does not respond.

    • The jmap -J option is new and is supported on Solaris OS and Linux only. This option passes flags to the VM on which jmap is running.

    • The live sub-option is new for the -histo option. With this sub-option only live objects are counted.

    • The jmap command is new to Windows, but it only supports the -dump:dump-options option and the -histo[:live] option.

  • The jrunscript tool is new.

  • The jstack command has the following changes:

    • The jstack pid option has been changed to work like remote Control+Break (that is, the output of the thread dump is slightly different, and there is more information on deadlocks and JNI Global References).

    • The jstack -F option is new and is supported on Solaris OS and Linux only. This option forces a thread dump in case the VM is hung.

    • The jstack -l option is new. This option prints information about ownable synchronizers (locks) in the heap.

    • The jstack command is new to Windows, but it only supports the jstack pid option and the jstack -l pid option.

  • The -XX:OnOutOfMemoryError=string option allows you to specify a command or script to be run when an OutOfMemoryError exception is thrown. This is useful for data capture (for example, with jmap).

  • The -XX:+HeapDumpOnOutOfMemoryError command-line option is new as of JDK release 5 update 7. If this option is set and the VM detects a native OutOfMemoryError exception, a heap dump is generated. For more information, see The -XX:+HeapDumpOnOutOfMemoryError Option.

  • Other new environment variables to help in troubleshooting OutOfMemoryError exceptions are the following:

    • -XX:HeapDumpPath=pathname

    • -XX:SegmentedHeapDumpThreshold=threshold

    • -XX:HeapDumpSegmentSize=size

  • The fatal error log has the following changes:

    • You now have the ability to specify a location for the fatal error log (see "Location of Fatal Error Log").

    • There is now a URL at the beginning of the fatal error log for reporting incidents (see "Header Format").

  • The VM now contains two built-in DTrace probe providers: hotspot and hotspot_jni. (Solaris 10 OS only)

  • The fastdebug builds can be useful for testing, diagnosing, and isolating problems. However, they should not be used in production environments.

  • The Control+Break handler has the following changes:

    • Control+Break now shows the thread state.

    • Control+Break now shows the sizes of the heap areas.

    • With -XX:+PrintConcurrentLocks, Control+Break will also print the list of concurrent locks owned by each thread, as well as detect deadlocks involving both monitor locks and concurrent locks.

  • The format=b option for HPROF now includes primitive type instance fields and primitive array content in heap dumps.

  • When the java.lang.OutOfMemoryError exception is thrown, a stack trace is now printed also. In addition, when the specific message indicates that the system is almost out of swap space (Out of swap space?), a fatal error log is now generated.

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 Diagnostic Tools and Options

  • Introduction
  • Summary of Tools and Options
    • Tools and Options for Post-Mortem Diagnostics
    • Tools and Options for Hung Processes
    • Tools and Options for Monitoring
    • Other Tools, Options, Variables, and Properties

2 Detailed Tool Descriptions

  • HPROF
    • Heap Allocation Profile (heap=sites)
    • Heap Dump Profile (heap=dump)
    • CPU Usage Sampling Profile (cpu=samples)
    • CPU Usage Times Profile (cpu=times)
  • Java VisualVM
  • JConsole
  • The jdb Utility
    • Attaching to a Process
    • Attaching to a Core File on the Same Machine
    • Attaching to a Core File or a Hung Process from a Different Machine
  • The jhat Utility
    • Standard Queries
    • Custom Queries
    • Heap Analysis Hints
  • The jinfo Utility
  • The jmap Utility
    • Heap Configuration and Usage
    • Heap Histogram
    • Permanent Generation Statistics
  • The jps Utility
  • The jrunscript Utility
  • The jsadebugd Daemon
  • The jstack Utility
    • Forcing a Stack Dump
    • Printing Stack Trace From Core Dump
    • Printing a Mixed Stack
  • The jstat Utility
  • The jstatd Daemon
  • The visualgc Tool
  • Control+Break Handler
    • Thread Dump
    • Detected Deadlocks
    • Heap Summary
  • Native Operating System Tools
    • Using the DTrace Tool
    • Improvements in the pmap Tool
    • Improvements in the pstack Tool
  • Custom Diagnostic Tools
    • The java.lang.management Package
    • The java.lang.instrument Package
    • The java.lang.Thread Class
    • Java Virtual Machine Tools Interface
    • Java Platform Debugger Architecture

3 Troubleshooting Memory Leaks

  • Understanding the OutOfMemoryError Exception
  • Crash Instead of OutOfMemoryError
  • Diagnosing Leaks in Java Language Code
    • Creating a Heap Dump
    • Obtaining a Heap Histogram
    • Monitoring the Number of Objects Pending Finalization
  • Diagnosing Leaks in Native Code
    • Tracking All Memory Allocation and Free Calls
    • Tracking Memory Allocation in a JNI Library
    • Tracking Memory Allocation With OS Support
    • Using the dbx Debugger to Find Leaks
    • Using the libumem Tool to Find Leaks

4 Troubleshooting System Crashes

  • Determining Where the Crash Occurred
    • Crash in Native Code
    • Crash in Compiled Code
    • Crash in the HotSpot Compiler Thread
    • Crash in VMThread
    • Crash Due to Stack Overflow
  • Finding a Workaround
    • Working Around Crashes in the HotSpot Compiler Thread or Compiled Code
    • Working Around Crashes During Garbage Collection
    • Working Around Crashes Caused by Class Data Sharing
  • Microsoft Visual C++ Version Considerations

5 Troubleshooting Hanging or Looping Processes

  • Diagnosing a Looping Process
  • Diagnosing a Hung Process
    • Deadlock Detected
    • Deadlock Not Detected
    • No Thread Dump
  • Solaris 8 OS Thread Library

6 Integrating Signal and Exception Handling

  • Signal Handling on Solaris OS and Linux
    • Signal Chaining
  • Exception Handling on Windows
    • Exception Handling By the Java HotSpot VM
    • Console Handlers

7 Submitting Bug Reports

  • Checking for Existing Fixes in Update Releases
  • Preparing to Submit a Bug Report
  • Collecting Data for a Bug Report
    • Hardware Details
    • Operating System
    • Java SE Version
    • Command-Line Options
    • Environment Variables
    • Fatal Error Log
    • Core or Crash Dump
    • Detailed Description of the Problem
    • Logs and Traces
    • Results from Troubleshooting Steps
  • Collecting Core Dumps
    • Collecting Core Dumps on Solaris OS
    • Collecting Core Dumps on Linux
    • Reasons for Not Getting a Core File
    • Collecting Crash Dumps on Windows

A Environment Variables and System Properties

B Command-Line Options

  • HotSpot VM Command-Line Options
    • The -XX:+HeapDumpOnOutOfMemoryError Option
    • The -XX:OnError= Option
    • The -XX:+ShowMessageBoxOnError Option
    • Other -XX Options
  • Other Command-Line Options
    • The -Xcheck:jni Option
    • The -verbose:class Option
    • The -verbose:gc Option
    • The -verbose:jni Option

C Fatal Error Log

  • Location of Fatal Error Log
  • Description of Fatal Error Log
  • Header Format
  • Thread Section Format
    • Thread Information
    • Signal Information
    • Register Context
    • Machine Instructions
    • Thread Stack
    • Further Details
  • Process Section Format
    • Thread List
    • VM State
    • Mutexes and Monitors
    • Heap Summary
    • Memory Map
    • VM Arguments and Environment Variables
    • Signal Handlers
  • System Section Format

D Summary of Tools in This Release

  • Changes to Troubleshooting Tools in JDK 7
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting Hanging or Looping Processes

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

5 Troubleshooting Hanging or Looping Processes

This chapter provides information and guidance on some specific procedures for troubleshooting hanging or looping processes.

Problems can occur that involve hanging or looping processes. A hang can occur for many reasons but often stems from a deadlock in application code, API code, or library code. A hang can even be due to a bug in the Java HotSpot VM.

Sometimes an apparent hang turns out to be, in fact, a loop. For example, a bug in a VM process that causes one or more threads to go into an infinite loop can consume all available CPU cycles.

The initial step when diagnosing a hang is to find out if the VM process is idle or consuming all available CPU cycles. You can do this using a native operating system (OS) utility. If the process appears to be busy and is consuming all available CPU cycles then it is likely that the issue is a looping thread rather than a deadlock. On Solaris OS, for example, the command prstat -L -p pid can be used to report the statistics for all lightweight processes (LWPs) in the target process and thus will identify the threads that are consuming a lot of CPU cycles.

  • "Diagnosing a Looping Process"

  • "Diagnosing a Hung Process"

  • "Solaris 8 OS Thread Library"

Diagnosing a Looping Process

If a VM process appears to be looping, the first step is to try to get a thread dump. If a thread dump can be obtained, it will often be clear which thread is looping. If the looping thread can be identified, then the trace stack in the thread dump can provide direction on where (and maybe why) the thread is looping.

If the application console (standard input/output) is available, then press the Control+\ key combination (on Solaris OS or Linux) or the Control+Break key combination (on Windows) to cause the HotSpot VM to print a thread dump, including thread state. On Solaris OS and Linux the thread dump can also be obtained by sending a SIGQUIT to the process (command kill -QUIT pid). In this case the thread dump is printed to the standard output of the target process. The output might be directed to a file, depending on how the process was started.

If the Java process is started with the -XX:+PrintClassHistogram command-line option, then the Control+Break handler will produce a heap histogram.

If a thread dump can be obtained, then a good place to start is the thread stacks of the threads that are in the RUNNABLE state. See "Thread Dump" for information on the format of the thread dump, as well as a table of the possible thread states in the thread dump. In some cases it might be necessary to get a sequence of thread dumps in order to determine which threads appear to be continuously busy.

If the application console is not available (for example, the process is running in the background, or the VM output is directed to an unknown location), then the jstack utility can be used to obtain the stack thread. Use the jstack -F pid command to force a stack dump of the looping process. See "The jstack Utility" for information on the output of this utility. The jstack utility should also be used if the thread dump does not provide any evidence that a Java thread is looping.

When reviewing the output of the jstack utility, focus initially on the threads that are in the RUNNABLE state. This is the most likely state for threads that are busy and possibly looping. It might be necessary to execute jstack a number of times to get a more complete picture of which threads are looping. If a thread appears to be always in the RUNNABLE state, then the -m option can be used to print the native frames and provide a further hint on what the thread is doing. If a thread appears to be looping continuously while in the RUNNABLE state, this situation can indicate a potential HotSpot VM bug that needs further investigation.

If the VM does not respond to Control+\, this could indicate a VM bug rather than an issue with application or library code. In this case use jstack with the -m option (in addition to the -F option) to get a thread stack for all threads. The output will include the thread stacks for VM internal threads. In this stack trace, identify threads that do not appear to be waiting. For example, on Solaris OS you identify the threads that are not in functions such as __lwp_cond_wait, __lwp_park, ___pollsys, or other blocking functions. If it appears that the looping is caused by a VM bug, then collect as much data as possible and submit a bug report. See "Submitting Bug Reports" for more details on data collection.

Diagnosing a Hung Process

If the application appears to be hung and the process appears to be idle, then the first step is to try to obtain a thread dump. If the application console is available, then press Control+\ (on Solaris OS or Linux), or Control+Break (on Windows) to cause the HotSpot VM to print a thread dump. On Solaris OS and Linux the thread dump can also be obtained by sending a SIGQUIT to the process (command kill -QUIT pid). If the hung process is capable of generating a thread dump, then the output is printed to the standard output of the target process.

After printing the thread dump, the HotSpot VM executes a deadlock detection algorithm.

Deadlock Detected

If a deadlock is detected it will be printed along with the stack trace of the threads involved in the deadlock. Below is an example of this output.

Found one Java-level deadlock:
=============================
"AWT-EventQueue-0":
  waiting to lock monitor 0x000ffbf8 (object 0xf0c30560, a java.awt.Component$AWTTreeLock),
  which is held by "main"
"main":
  waiting to lock monitor 0x000ffe38 (object 0xf0c41ec8, a java.util.Vector),
  which is held by "AWT-EventQueue-0"

Java stack information for the threads listed above:
===================================================
"AWT-EventQueue-0":
        at java.awt.Container.removeNotify(Container.java:2503)
        - waiting to lock <0xf0c30560> (a java.awt.Component$AWTTreeLock)
        at java.awt.Window$1DisposeAction.run(Window.java:604)
        at java.awt.Window.doDispose(Window.java:617)
        at java.awt.Dialog.doDispose(Dialog.java:625)
        at java.awt.Window.dispose(Window.java:574)
        at java.awt.Window.disposeImpl(Window.java:584)
        at java.awt.Window$1DisposeAction.run(Window.java:598)
        - locked <0xf0c41ec8> (a java.util.Vector)
        at java.awt.Window.doDispose(Window.java:617)
        at java.awt.Window.dispose(Window.java:574)
        at javax.swing.SwingUtilities$SharedOwnerFrame.dispose(SwingUtilities.java:1743)
        at javax.swing.SwingUtilities$SharedOwnerFrame.windowClosed(SwingUtilities.java:1722)
        at java.awt.Window.processWindowEvent(Window.java:1173)
        at javax.swing.JDialog.processWindowEvent(JDialog.java:407)
        at java.awt.Window.processEvent(Window.java:1128)
        at java.awt.Component.dispatchEventImpl(Component.java:3922)
        at java.awt.Container.dispatchEventImpl(Container.java:2009)
        at java.awt.Window.dispatchEventImpl(Window.java:1746)
        at java.awt.Component.dispatchEvent(Component.java:3770)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:214)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
"main":
        at java.awt.Window.getOwnedWindows(Window.java:844)
        - waiting to lock <0xf0c41ec8> (a java.util.Vector)
        at javax.swing.SwingUtilities$SharedOwnerFrame.installListeners(SwingUtilities.java:1697)
        at javax.swing.SwingUtilities$SharedOwnerFrame.addNotify(SwingUtilities.java:1690)
        at java.awt.Dialog.addNotify(Dialog.java:370)
        - locked <0xf0c30560> (a java.awt.Component$AWTTreeLock)
        at java.awt.Dialog.conditionalShow(Dialog.java:441)
        - locked <0xf0c30560> (a java.awt.Component$AWTTreeLock)
        at java.awt.Dialog.show(Dialog.java:499)
        at java.awt.Component.show(Component.java:1287)
        at java.awt.Component.setVisible(Component.java:1242)
        at test01.main(test01.java:10)

Found 1 deadlock.

The default deadlock detection works with locks that are obtained using the synchronized keyword, as well as with locks that are obtained using the java.util.concurrent package. If the Java VM flag -XX:+PrintConcurrentLocks is set, then the stack trace also shows a list of lock owners.

If a deadlock is detected, then you must examine the output in more detail in order to understand the deadlock. In the above example the thread main is locking object 0xf0c30560 and is waiting to enter 0xf0c41ec8, which is locked by thread AWT-EventQueue-0. However, thread AWT-EventQueue-0 is waiting to enter 0xf0c30560, which is locked by main.

The detail in the stack traces provides information to help find the deadlock.

Deadlock Not Detected

If the thread dump is printed and no deadlocks are found, then the issue might be a bug in which a thread waiting on a monitor that is never notified. This could be a timing issue or a general logic bug.

To find out more about the issue, examine each of the threads in the thread dump and each thread that is blocked in Object.wait(). The caller frame in the stack trace indicates the class and method that is invoking the wait() method. If the code was compiled with line number information (the default), then this provides direction as to the code to examine. In most cases you must have some knowledge of the application logic or library in order to diagnose this issue further. In general you must understand how the synchronization works in the application and in particular the details and conditions for when and where monitors are notified.

No Thread Dump

If the VM does not respond to Control+\ or Control+Break, then it is possible that the VM is deadlocked or hung for some other reason. In that case use the jstack utility (see "The jstack Utility") to obtain a thread dump. Use the jstack -F pid command to force a stack dump of the hung process. This also applies in the case when the application is not accessible or the output is directed to an unknown location.

In the jstack output, examine each of the threads in the BLOCKED state. The top frame can sometimes indicate why the thread is blocked (for example, Object.wait or Thread.sleep). The rest of the stack will give an indication of what the thread is doing. This is particularly true when the source has been compiled with line number information (the default) and you can cross reference the source code.

If a thread is in the BLOCKED state and the reason is not clear, then use the -m option to get a mixed stack. With the mixed stack output, it should be possible to identify why the thread is blocked. If a thread is blocked trying to enter a synchronized method or block, then you will see frames such as ObjectMonitor::enter near the top of the stack. Below is an example.

----------------- t@13 -----------------
0xff31e8b8      ___lwp_cond_wait + 0x4
0xfea8c810      void ObjectMonitor::EnterI(Thread*) + 0x2b8
0xfeac86b8      void ObjectMonitor::enter2(Thread*) + 0x250
:

Threads in the RUNNABLE state might also be blocked. The top frames in the mixed stack should indicate what the thread is doing.

One specific thread to check is VMThread. This is the special thread used to execute operations like garbage collection (GC). It can be identified as the thread that is executing VMThread::run() in its initial frames. On Solaris OS it is typically t@4. On Linux it should be identifiable using the C++ mangled name _ZN8VMThread4loopEv.

In general the VM thread is in one of three states: waiting to execute a VM operation, synchronizing all threads in preparation for a VM operation, or executing a VM operation. If you suspect that a hang is a HotSpot VM bug rather than an application or class library deadlock, then pay special attention to the VM thread.

If the VM thread appears to be stuck in SafepointSynchronize::begin, then this could indicate an issue bringing the VM to a safepoint. A safepoint indicates that all threads executing in the VM are blocked and waiting for a special operation, such as GC, to complete.

If the VM thread appears to be stuck in function, where function ends in doit, then this could also indicate a VM problem.

In general, if you can execute the application from the command line, and you get to a state where the VM does not respond to Control+\ or Control+Break, it is more likely that you have uncovered a VM bug, a thread library issue, or a bug in another library. If this occurs, obtain a crash dump (see "Collecting Core Dumps" for instructions on how to do this), gather as much information as possible, and submit a bug report or support call.

One other tool to mention in the context of hung processes is the pstack utility on Solaris OS. On Solaris 8 and 9 OS, this utility prints the thread stacks for LWPs in the target process. On Solaris 10 OS and starting with the JDK 5.0 release, the output of pstack is similar, though not identical, to the output from jstack -m. As with jstack, the Solaris 10 OS implementation of pstack prints the fully qualified class name, method name, and bytecode index (BCI). It will also print line numbers for cases where the source was compiled with line number information (the default). This is useful for developers and administrators who are familiar with the other utilities on Solaris OS that exercise features of the /proc file system.

The equivalent tool of pstack on Linux is lsstack. This utility is included in some distributions and otherwise obtained from www.sourceforge.net. At the time of this writing, lsstack reported native frames only.

Solaris 8 OS Thread Library

The default thread library on Solaris 8 OS is often referred to as the T1 library. This thread library implemented the m:n threading model, where m user threads are mapped to n kernel-level threads (LWPs). Solaris 8 OS also shipped with an alternative and newer thread library in /usr/lib/lwp. The alternative thread library is often referred to as the T2 library, and it became the default thread library in Solaris 9 and 10 OS. In older releases of J2SE (pre-1.4.0 in particular) there were a number of issues with the default thread library (for example, bugs in the thread library, LWP synchronization problems, or LWP starvation). LWP starvation is a scenario in which there are user threads in the RUNNABLE state but there are no kernel level threads available.

Although the issues cited are historical, it should be noted that when the JDK software is deployed on Solaris 8 OS, it still uses the T1 library by default. LWP starvation type issues do not arise because the JDK release uses "bound threads" so that each user thread is bound to a kernel thread. However in the event that you encounter an issue, such as a hang, which you believe is a thread library issue, then you can instruct the HotSpot VM to use the T2 library by adding /usr/lib/lwp to the LD_LIBRARY_PATH. To check if the T2 library is in use, issue the command pldd pid to list the libraries loaded by the specified process.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting Memory Leaks

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

3 Troubleshooting Memory Leaks

This chapter provides some suggestions on diagnosing problems involving possible memory leaks.

If your application's execution time becomes longer and longer, or if the operating system (OS) seems to be performing slower and slower, this could be an indication of a memory leak. In other words, virtual memory is being allocated but is not being returned when it is no longer needed. Eventually the application or the system runs out of memory, and the application terminates abnormally.

This chapter contains the following sections:

  • "Understanding the OutOfMemoryError Exception"

  • "Crash Instead of OutOfMemoryError"

  • "Diagnosing Leaks in Java Language Code"

  • "Diagnosing Leaks in Native Code"

Understanding the OutOfMemoryError Exception

One common indication of a memory leak is the java.lang.OutOfMemoryError exception. This error is thrown when there is insufficient space to allocate an object in the Java heap or in a particular area of the heap. The garbage collector cannot make any further space available to accommodate a new object, and the heap cannot be expanded further.

When the java.lang.OutOfMemoryError exception is thrown, a stack trace is printed also.

The java.lang.OutOfMemoryError exception can also be thrown by native library code when a native allocation cannot be satisfied (for example, if swap space is low).

An early step to diagnose an OutOfMemoryError exception is to determine the cause of the exception. Was it thrown because the Java heap is full, or because the native heap is full? To help you find the cause, the text of the exception includes a detail message at the end. Below are several examples of the java.lang.OutOfMemoryError exception.

Exception in thread thread_name: java.lang.OutOfMemoryError: Java heap space
Cause: The detail message "Java heap space" indicates that an object could not be allocated in the Java heap. This error does not necessarily imply a memory leak. The problem can be as simple as a configuration issue, where the specified heap size (or the default size, if it is not specified) is insufficient for the application.

In other cases, and in particular for a long-lived application, the message might be an indication that the application is unintentionally holding references to objects, and this prevents the objects from being garbage collected. This is the Java language equivalent of a memory leak. Note that APIs that are called by an application could also be unintentionally holding object references.

One other potential source of this error arises with applications that make excessive use of finalizers. If a class has a finalize method, then objects of that type do not have their space reclaimed at garbage collection time. Instead, after garbage collection, the objects are queued for finalization, which occurs at a later time. In the Sun implementation, finalizers are executed by a daemon thread that services the finalization queue. If the finalizer thread cannot keep up with the finalization queue, then the Java heap could fill up and this type of the OutOfMemoryError exception would be thrown. One scenario that can cause this situation is when an application creates high-priority threads that cause the finalization queue to increase at a rate that is faster than the rate at which the finalizer thread is servicing that queue.

Action: You can find more information on how to monitor objects for which finalization is pending in "Monitoring the Number of Objects Pending Finalization".
Exception in thread thread_name: java.lang.OutOfMemoryError: PermGen space
Cause: The detail message "PermGen space" indicates that the permanent generation is full. The permanent generation is the area of the heap where class and method objects are stored.

When this kind of error occurs, the text ClassLoader.defineClass might appear near the top of the stack trace that is printed.

Note:

Interned java.lang.String objects are no longer stored in the permanent generation. The java.lang.String class maintains a pool of strings. When the java.lang.String.intern() method is invoked, the method checks the pool to see if an equal string is already in the pool. If there is, then the intern() method returns it; otherwise it adds the string to the pool. In more precise terms, the intern() method is used to obtain the canonical representation of the string. The result is a reference to the same class instance that would be returned if that string appeared as a literal.

Action: If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.

The jmap -permgen command prints statistics for the objects in the permanent generation and also information about internalized String instances. For more information on using the jmap -permgen command, see "Permanent Generation Statistics".

Exception in thread thread_name: java.lang.OutOfMemoryError: Requested array size exceeds VM limit
Cause: The detail message "Requested array size exceeds VM limit" indicates that the application (or APIs used by that application) attempted to allocate an array that is larger than the heap size. For example, if an application attempts to allocate an array of 512MB but the maximum heap size is 256MB then OutOfMemoryError will be thrown with the reason "Requested array size exceeds VM limit".
Action: In most cases the problem is either a configuration issue (heap size too small), or a bug that results in an application attempting to create a huge array (for example, when the number of elements in the array is computed using an algorithm that computes an incorrect size).
Exception in thread thread_name: java.lang.OutOfMemoryError: request size bytes for reason. Out of swap space?
Cause: The detail message "request size bytes for reason. Out of swap space?" appears to be an OutOfMemoryError exception. However, the HotSpot VM code reports this apparent exception when an allocation from the native heap failed and the native heap might be close to exhaustion. The message indicates the size (in bytes) of the request that failed and the reason for the memory request. In most cases the reason is the name of the source module reporting the allocation failure, although in some cases it indicates the actual reason.
Action: When this error message is thrown, the VM invokes the fatal error handling mechanism (that is, it generates a fatal error log file, which contains useful information about the thread, process, and system at the time of the crash). In the case of native heap exhaustion, the heap memory and memory map information in the log can be useful. For more information on understanding the fatal error log file, see "Fatal Error Log".

If this type of the OutOfMemoryError exception is thrown, you might need to use troubleshooting utilities on the OS to diagnose the issue further. For more information about tools available for various OS's, see "Native Operating System Tools".

Exception in thread thread_name: java.lang.OutOfMemoryError: reason stack_trace_with_native_method
Cause: If the detail part of the error message is "reason stack_trace_with_native_method" and a stack trace is printed in which the top frame is a native method, then this is an indication that a native method has encountered an allocation failure. The difference between this and the previous message is that the allocation failure was detected in a Java Native Interface (JNI) or native method rather than in the Java VM code.
Action: If this type of the OutOfMemoryError exception is thrown, you might need to use native utilities of the OS to further diagnose the issue. For more information about tools available for various OS's, see "Native Operating System Tools".

Crash Instead of OutOfMemoryError

Sometimes an application crashes soon after an allocation from the native heap fails. This occurs with native code that does not check for errors returned by memory allocation functions.

For example, the malloc system call returns null if there is no memory available. If the return from malloc is not checked, then the application might crash when it attempts to access an invalid memory location. Depending on the circumstances, this type of issue can be difficult to locate.

However, in some cases the information from the fatal error log or the crash dump might be sufficient to diagnose this issue. The fatal error log is covered in detail in Appendix C, Fatal Error Log. If the cause of the crash is determined to be a failure to check an allocation failure, then the reason for the allocation failure must be examined. As with any other native heap issue, the system might be configured with insufficient swap space, another process on the system might be consuming all memory resources, or there might be a leak in the application (or in the APIs that it calls) that causes the system to run out of memory.

Diagnosing Leaks in Java Language Code

Diagnosing leaks in Java language code can be a difficult task. In most cases it requires very detailed knowledge of the application. In addition the process is often iterative and lengthy. This section provides information on the tools you can use to diagnose memory leaks in Java language code.

Note:

Besides the tools mentioned in this section, there are a large number of third-party memory debuggers available. JProbe from Quest Software, and OptimizeIt from Borland are two examples of commercial tools with memory debugging capabilities. There are many others and no specific product is recommended.

The NetBeans Profiler

The NetBeans Profiler (previously known as JFluid) is an excellent profiler, which can locate memory leaks very quickly. Most commercial memory leak debugging tools can often take a long time to locate a leak in a large application. The NetBeans Profiler, however, uses the pattern of memory allocations and reclamations that such objects typically demonstrate. This process includes also the lack of memory reclamations. The profiler can check where these objects were allocated, which in many cases is sufficient to identify the root cause of the leak.

More details can be found at http://profiler.netbeans.org.

The jhat Utility

The jhat utility is useful when debugging unintentional object retention (or memory leaks). It provides a way to browse an object dump, view all reachable objects in the heap, and understand which references are keeping an object alive.

To use jhat you must obtain one or more heap dumps of the running application, and the dumps must be in binary format. Once the dump file is created, it can be used as input to jhat. See "The jhat Utility".

Creating a Heap Dump

A heap dump provides detailed information on the allocation of heap memory. There are several ways to create a heap dump:

  • HPROF can create a heap dump if it is launched together with the application. The following is an example of the command:

    $ java -agentlib:hprof=file=snapshot.hprof,format=b application

    Note:

    If the JVM is embedded or is not started using a command-line launcher that allows additional options to be provided, then it might be possible to use the JAVA_TOOLS_OPTIONS environment variable so that the -agentlib option is automatically added to the command line. See "The JAVA_TOOL_OPTIONS Environment Variable" for further information on this environment variable.

    Once the application is running with HPROF, a heap dump can be created by pressing Control+\ or Control+Break (depending on the platform) in the application console. An alternative approach on Solaris OS and Linux is to send a QUIT signal with the kill -QUIT pid command. When the signal is received, a heap dump is created for the process with the specified PID; in the above example the file snapshot.hprof will be created.

    The heap dump file contains all the primitive data and stack traces.

    A dump file can contain multiple heap dumps. If Control+\ or Control+Break is pressed a number of times then subsequent dumps are appended to the file. The jhat utility uses the #n syntax to distinguish the dumps, where n is the dump number. See "HPROF".

  • The jmap utility can be used to create a heap dump of a running process. The following is an example of the command:

    $ jmap -dump:format=b,file=snapshot.jmap pid

    Regardless of how the Java VM was started, the jmap tool will produce a head dump snapshot, in the above example in a file named snapshot.jmap. The jmap output files should contain all the primitive data, but will not include any stack traces showing where the objects have been created. See "The jmap Utility".

  • Another way to create a heap dump is using the JConsole utility. For this, in the MBeans tab, select the HotSpotDiagnostic MBean, then the Operations display, and choose the dumpHeap operation.

  • If you specify the -XX:+HeapDumpOnOutOfMemoryError command-line option while running your application, then when an OutOfMemoryError exception is thrown, the JVM will generate a heap dump.

Obtaining a Heap Histogram

You can try to quickly narrow down a memory leak by examining the heap histogram. It can be obtained in several ways:

  • If the Java process is started with the -XX:+PrintClassHistogram command-line option, then the Control+Break handler will produce a heap histogram.

  • You can use the jmap utility to obtain a heap histogram from a running process:

    jmap -histo pid

    The output shows the total size and instance count for each class type in the heap. If a sequence of histograms is obtained (for example, every 2 minutes), then you might be able to observe a trend that can lead to further analysis.

  • You can use the jmap utility to obtain a heap histogram from a core file:

    jmap -histo core_file

    For example, if you specify the -XX:+HeapDumpOnOutOfMemoryError command-line option while running your application, then when an OutOfMemoryError exception is thrown, the JVM will generate a heap dump. You can then execute jmap on the core file to get a histogram, as in the following example:

    $ jmap -histo \ /java/re/javase/6/latest/binaries/solaris-sparc/bin/java core.27421

Attaching to core core.27421 from executable
/java/re/javase/6/latest/binaries/solaris-sparc/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.6.0-beta-b63
Iterating over heap. This may take a while...
Heap traversal took 8.902 seconds.

Object Histogram:

Size      Count   Class description
-------------------------------------------------------
86683872  3611828 java.lang.String
20979136  204     java.lang.Object[]
403728    4225    * ConstMethodKlass
306608    4225    * MethodKlass
220032    6094    * SymbolKlass
152960    294     * ConstantPoolKlass
108512    277     * ConstantPoolCacheKlass
104928    294     * InstanceKlassKlass
68024     362     byte[]
65600     559     char[]
31592     359     java.lang.Class
27176     462     java.lang.Object[]
25384     423     short[]
17192     307     int[]
:

    The example shows that the OutOfMemoryError exception was caused by the number of java.lang.String objects (3,611,828 instances in the heap). Without further analysis it is not clear where the strings are allocated. However, the information is still useful and the investigation can continue with tools such as HPROF and jhat to find where the strings are allocated, as well as what references are keeping them alive and preventing them from being garbage collected.

Monitoring the Number of Objects Pending Finalization

When the OutOfMemoryError exception is thrown with the "Java heap space" detail message, the cause can be excessive use of finalizers. To diagnose this, you have several options for monitoring the number of objects that are pending finalization:

  • The JConsole management tool (see "JConsole") can be used to monitor the number of objects that are pending finalization. This tool reports the pending finalization count in the memory statistics on the Summary tab pane. The count is approximate but it can be used to characterize an application and understand if it relies a lot on finalization.

  • On Solaris OS and Linux, the jmap utility can be used with the -finalizerinfo option to print information on objects awaiting finalization.

  • An application can report the approximate number of objects pending finalization using the getObjectPendingFinalizationCount method of the java.lang.management.MemoryMXBean class. Links to the API documentation and example code can be found in "Custom Diagnostic Tools". The example code can easily be extended to include the reporting of the pending finalization count.

Diagnosing Leaks in Native Code

Several techniques can be used to find and isolate native code memory leaks. In general there is no single ideal solution for all platforms.

Tracking All Memory Allocation and Free Calls

A very common practice is to track all allocation and free calls of the native allocations. This can be a fairly simple process or a very sophisticated one. Many products over the years have been built up around the tracking of native heap allocations and the use of that memory.

Tools like Purify and the Run Time Checking functionality of Sun's dbx debugger can be used to find these leaks in normal native code situations and also find any access to native heap memory that represents assignments to uninitialized memory or accesses to freed memory. See "Using the dbx Debugger to Find Leaks".

Not all these types of tools will work with Java applications that use native code, and usually these tools are platform-specific. Since the virtual machine dynamically creates code at runtime, these tools can wrongly interpret the code and fail to run at all, or give false information. Check with your tool vendor to make sure the version of the tool works with the version of the virtual machine you are using.

Many simple and portable native memory leak detecting examples can be found at http://sourceforge.net/. Most of these libraries and tools assume that you can recompile or edit the source of the application and place wrapper functions over the allocation functions. The more powerful of these tools allow you to run your application unchanged by interposing over these allocation functions dynamically. This is the case with the library libumem.so, first introduced in Solaris 9 OS update 3; see "Using the libumem Tool to Find Leaks".

Tracking Memory Allocation in a JNI Library

If you write a JNI library, it would probably be wise to create some kind of localized way to make sure your library does not leak memory, using a simple wrapper approach.

The following procedure is an easy localized allocation tracking approach for a JNI library. First, define the following lines in all source files:

#include <stdlib.h>
#define malloc(n) debug_malloc(n, __FILE__, __LINE__)
#define free(p) debug_free(p, __FILE__, __LINE__)

Then you can use the following functions to watch for leaks.

/* Total bytes allocated */
static int total_allocated;
/* Memory alignment is important */
typedef union { double d; struct {size_t n; char *file; int line;} s; } Site;
void *
debug_malloc(size_t n, char *file, int line)
{
    char *rp;
    rp = (char*)malloc(sizeof(Site)+n);
    total_allocated += n;
    ((Site*)rp)->s.n = n;
    ((Site*)rp)->s.file = file;
    ((Site*)rp)->s.line = line;
    return (void*)(rp + sizeof(Site));
}
void
debug_free(void *p, char *file, int line)
{
    char *rp;
    rp = ((char*)p) - sizeof(Site);
    total_allocated -= ((Site*)rp)->s.n;
    free(rp);
}

The JNI library would then need to periodically (or at shutdown) check the value of the total_allocated variable to make sure that it made sense. The above code could also be expanded to save in a linked list the allocations that remained and report where the leaked memory was allocated. This is a localized and portable way to track memory allocations in a single set of sources. You would need to make sure that debug_free() was called only with the pointer that came from debug_malloc(), and you would also need to create similar functions for realloc(), calloc(), strdup(), and so forth, if they were used.

A more global way to look for native heap memory leaks would involve interposition of the library calls for the entire process.

Tracking Memory Allocation With OS Support

Most operating systems include some form of global allocation tracking support.

  • On Windows, search the MSDN library at http://msdn.microsoft.com/library/default.asp for debug support. The Microsoft C++ compiler has the /Md and /Mdd compiler options that will automatically include extra support for tracking memory allocation.

  • Linux systems have tools such as mtrace and libnjamd to help in dealing with allocation tracking.

  • Solaris OS provides the watchmalloc tool. Solaris 9 OS update 3 also introduced the libumem tool (see "Using the libumem Tool to Find Leaks").

Using the dbx Debugger to Find Leaks

Sun's dbx debugger includes the Runtime Checking (RTC) functionality, which can find leaks. The dbx debugger is also available on Linux.

Below is a sample dbx session.

$ dbx ${java_home}/bin/java
Reading java
Reading ld.so.1
Reading libthread.so.1
Reading libdl.so.1
Reading libc.so.1
(dbx) dbxenv rtc_inherit on
(dbx) check -leaks
leaks checking - ON
(dbx) run HelloWorld
Running: java HelloWorld
(process id 15426)
Reading rtcapihook.so
Reading rtcaudit.so
Reading libmapmalloc.so.1
Reading libgen.so.1
Reading libm.so.2
Reading rtcboot.so
Reading librtc.so
RTC: Enabling Error Checking...
RTC: Running program...
dbx: process 15426 about to exec("/net/bonsai.sfbay/export/home2/user/ws/j2se/build/solaris-i586/bin/java")
dbx: program "/net/bonsai.sfbay/export/home2/user/ws/j2se/build/solaris-i586/bin/java"
just exec'ed
dbx: to go back to the original program use "debug $oprog"
RTC: Enabling Error Checking...
RTC: Running program...
t@1 (l@1) stopped in main at 0x0805136d
0x0805136d: main       :        pushl    %ebp
(dbx) when dlopen libjvm { suppress all in libjvm.so; }
(2) when dlopen libjvm { suppress all in libjvm.so; }
(dbx) when dlopen libjava { suppress all in libjava.so; }
(3) when dlopen libjava { suppress all in libjava.so; }
(dbx) cont
Reading libjvm.so
Reading libsocket.so.1
Reading libsched.so.1
Reading libCrun.so.1
Reading libm.so.1
Reading libnsl.so.1
Reading libmd5.so.1
Reading libmp.so.2
Reading libhpi.so
Reading libverify.so
Reading libjava.so
Reading libzip.so
Reading en_US.ISO8859-1.so.3
hello world
hello world
Checking for memory leaks...

Actual leaks report    (actual leaks:           27  total size:      46851 bytes)

  Total     Num of  Leaked     Allocation call stack
  Size      Blocks  Block
                    Address
==========  ====== =========== =======================================
     44376       4      -      calloc < zcalloc
      1072       1  0x8151c70  _nss_XbyY_buf_alloc < get_pwbuf < _getpwuid <
                               GetJavaProperties < Java_java_lang_System_initProperties <
                               0xa740a89a< 0xa7402a14< 0xa74001fc
       814       1  0x8072518  MemAlloc < CreateExecutionEnvironment < main
       280      10      -      operator new < Thread::Thread
       102       1  0x8072498  _strdup < CreateExecutionEnvironment < main
        56       1  0x81697f0  calloc < Java_java_util_zip_Inflater_init < 0xa740a89a<
                               0xa7402a6a< 0xa7402aeb< 0xa7402a14< 0xa7402a14< 0xa7402a14
        41       1  0x8072bd8  main
        30       1  0x8072c58  SetJavaCommandLineProp < main
        16       1  0x806f180  _setlocale < GetJavaProperties <
                               Java_java_lang_System_initProperties < 0xa740a89a< 0xa7402a14<
                               0xa74001fc< JavaCalls::call_helper < os::os_exception_wrapper
        12       1  0x806f2e8  operator new < instanceKlass::add_dependent_nmethod <
                               nmethod::new_nmethod < ciEnv::register_method <
                               Compile::Compile #Nvariant 1 < C2Compiler::compile_method <
                               CompileBroker::invoke_compiler_on_method <
                               CompileBroker::compiler_thread_loop
        12       1  0x806ee60  CheckJvmType < CreateExecutionEnvironment < main
        12       1  0x806ede8  MemAlloc < CreateExecutionEnvironment < main
        12       1  0x806edc0  main
         8       1  0x8071cb8  _strdup < ReadKnownVMs < CreateExecutionEnvironment < main
         8       1  0x8071cf8  _strdup < ReadKnownVMs < CreateExecutionEnvironment < main

The output shows that the dbx debugger reports memory leaks if memory is not freed at the time the process is about to exit. However, memory that is allocated at initialization time and needed for the life of the process is often never freed in native code. Therefore, in such cases the dbx debugger can report memory leaks that are not leaks in reality.

Note that the example used two suppress commands to suppress the leaks reported in the virtual machine (libjvm.so) and the Java support library (libjava.so).

Using the libumem Tool to Find Leaks

First introduced in Solaris 9 OS update 3, the libumem.so library and the modular debugger mdb can be used to debug memory leaks. Before using libumem, you must preload the libumem library and set an environment variable as follows:

$ LD_PRELOAD=libumem.so
$ export LD_PRELOAD
$ UMEM_DEBUG=default
$ export UMEM_DEBUG

Now, run the Java application but stop it before it exits. The following example uses truss to stop the process when it calls the _exit system call:

$ truss -f -T _exit java MainClass arguments

At this point you can attach the mdb debugger, as follows:

$ mdb -p pid
>::findleaks

The ::findleaks command is the mdb command to find memory leaks. If a leak is found, the findleaks command prints the address of the allocation call, buffer address, and nearest symbol.

It is also possible to get the stack trace for the allocation which resulted in the memory leak by dumping the bufctl structure. The address of this structure can be obtained from the output of the ::findleaks command. The description of the commands to perform these functions, as well as more information on using libumem to identify memory managements bugs, is located at

http://docs.oracle.com/docs/cd/E19424-01/820-4814/geogv/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting System Crashes

Documentation Contents
Java Platform, Standard Edition HotSpot Virtual Machine Troubleshooting Guide
Contents Previous Next

4 Troubleshooting System Crashes

This chapter provides information and guidance on some specific procedures for troubleshooting system crashes.

A crash, or fatal error, causes a process to terminate abnormally. There are various possible reasons for a crash. For example, a crash can occur due to a bug in the Java HotSpot VM, in a system library, in a Java SE library or an API, in application native code, or even in the operating system (OS). External factors, such as resource exhaustion in the OS can also cause a crash.

Crashes caused by bugs in the Java HotSpot VM or in the Java SE library code are rare. This chapter provides suggestions on how to examine a crash and work around some of the issues (if possible) until the cause of the bug is diagnosed and fixed.

In general the first step with any crash is to locate the fatal error log. This is a text file that the Java HotSpot VM generates in the event of a crash. See "Fatal Error Log" for an explanation of how to locate this file, as well as a detailed description of the file.

This chapter contains the following sections:

  • "Determining Where the Crash Occurred"

  • "Finding a Workaround"

  • "Microsoft Visual C++ Version Considerations"

Determining Where the Crash Occurred

This section provides a number of examples which demonstrate how the error log can be used to find the cause of the crash, and suggests some tips for troubleshooting the problem depending on the cause.

The error log header indicates the type of error and the problematic frame, while the thread stack indicates the current thread and stack trace. See "Header Format".

Crash in Native Code

If the fatal error log indicates the problematic frame to be a native library, there might be a bug in native code or the Java Native Interface (JNI) library code. The crash could of course be caused by something else, but analysis of the library and any core file or crash dump is a good starting place. For example, consider the following extract from the header of a fatal error log:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024
#
# Java VM: Java HotSpot(TM) Server VM (6-beta2-b63 mixed mode)
# Problematic frame:
# C  [libApplication.so+0x9d7]

In this case a SIGSEGV occurred with a thread executing in the library libApplication.so.

In some cases a bug in a native library manifests itself as a crash in Java VM code. Consider the following crash where a JavaThread fails while in the _thread_in_vm state (meaning that it is executing in Java VM code):

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x08083d77, pid=3700, tid=2896
#
# Java VM: Java HotSpot(TM) Client VM (1.5-internal mixed mode)
# Problematic frame:
# V  [jvm.dll+0x83d77]

---------------  T H R E A D  ---------------

Current thread (0x00036960):  JavaThread "main" [_thread_in_vm, id=2896]
 :
Stack: [0x00040000,0x00080000),  sp=0x0007f9f8,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x83d77]
C  [App.dll+0x1047]          <========= C/native frame
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub
V  [jvm.dll+0x80f13]
V  [jvm.dll+0xd3842]
V  [jvm.dll+0x80de4]
V  [jvm.dll+0x87cd2]
C  [java.exe+0x14c0]
C  [java.exe+0x64cd]
C  [kernel32.dll+0x214c7]
 :

In this case, although the problematic frame is a VM frame, the thread stack shows that a native routine in App.dll has called into the VM (probably with JNI).

The first step to solving a crash in a native library is to investigate the source of the native library where the crash occurred.

  • If the native library is provided by your application, then investigate the source code of your native library. A significant number of issues with JNI code can be identified by running the application with the -Xcheck:jni option added to the command line. See "The -Xcheck:jni Option".

  • If the native library has been provided by another vendor and is used by your application, then file a bug report against this third-party application and provide the fatal error log information.

  • If the native library where the crash occurred is part of the Java Runtime Environment (JRE) (for example awt.dll, net.dll, and so forth), then it is possible that you have encountered a library or API bug. If so, gather as much data as possible and submit a bug or report, indicating the library name. You can find JRE libraries in the jre/lib or jre/bin directories of the JRE distribution. See "Submitting Bug Reports".

You can troubleshoot a crash in a native application library by attaching the native debugger to the core file or crash dump, if it is available. Depending on the OS, the native debugger is dbx, gdb, or windbg. See "Native Operating System Tools".

Crash in Compiled Code

If the fatal error log indicates that the crash occurred in compiled code, then it is possible that you have encountered a compiler bug that has resulted in incorrect code generation. You can recognize a crash in compiled code if the type of the problematic frame is J (meaning a compiled Java frame). Below is an example of a such a crash:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x0000002a99eb0c10, pid=6106, tid=278546
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0-beta-b51 mixed mode)
# Problematic frame:
# J  org.foobar.Scanner.body()V
#
:
Stack: [0x0000002aea560000,0x0000002aea660000),  sp=0x0000002aea65ddf0,
  free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J  org.foobar.Scanner.body()V

[error occurred during error reporting, step 120, id 0xb]

Note that a complete thread stack is not available. The output line "error occurred during error reporting" means that a problem arose trying to obtain the stack trace (this might indicate stack corruption).

It might be possible to temporarily work around the issue by switching the compiler (for example, by using the HotSpot Client VM instead of the HotSpot Server VM, or visa versa) or by excluding from compilation the method that provoked the crash. In this specific example it might not be possible to switch the compiler as it was taken from a 64-bit Server VM and hence it might not be feasible to switch to a 32-bit Client VM.

For more information on possible workarounds, see "Working Around Crashes in the HotSpot Compiler Thread or Compiled Code".

Crash in the HotSpot Compiler Thread

If the fatal error log output shows that the current thread is JavaThread named CompilerThread0, CompilerThread1, or AdapterCompiler, then it is possible that you have encountered a compiler bug. In this case it might be necessary to temporarily work around the issue by switching the compiler (for example, by using the HotSpot Client VM instead of the HotSpot Server VM, or visa versa), or by excluding from compilation the method that provoked the crash.

For more information on possible workarounds, see "Working Around Crashes in the HotSpot Compiler Thread or Compiled Code".

Crash in VMThread

If the fatal error log output shows that the current thread is VMThread, then look for the line containing VM_Operation in the THREAD section. VMThread is a special thread in the HotSpot VM. It performs special tasks in the VM such as garbage collection (GC). If the VM_Operation suggests that the operation is a GC, then it is possible that you have encountered an issue such as heap corruption.

Besides a GC issue, it could equally be something else (such as a compiler or runtime bug) that leaves object references in the heap in an inconsistent or incorrect state. In this case, collect as much information as possible about the environment and try possible workarounds. If the issue is related to GC, you might be able to temporarily work around the issue by changing the GC configuration.

For more information on possible workaronds, see "Working Around Crashes During Garbage Collection".

Crash Due to Stack Overflow

A stack overflow in Java language code will normally result in the offending thread throwing the java.lang.StackOverflowError exception. On the other hand, C and C++ write past the end of the stack and provoke a stack overflow. This is a fatal error which causes the process to terminate.

In the HotSpot implementation, Java methods share stack frames with C/C++ native code, namely user native code and the virtual machine itself. Java methods generate code that checks whether stack space is available a fixed distance towards the end of the stack so that the native code can be called without exceeding the stack space. This distance towards the end of the stack is called "Shadow Pages". The size of the shadow pages is between 3 and 20 pages, depending on the platform. This distance is tunable, so that applications with native code needing more than the default distance can increase the shadow page size. The option to increase shadow pages is -XX:StackShadowPages=n, where n is greater than the default stack shadow pages for the platform.

If your application gets a segmentation fault without a core file or fatal error log file (see Appendix C, Fatal Error Log), or a STACK_OVERFLOW_ERROR on Windows, or the message "An irrecoverable stack overflow has occurred", this indicates that the value of StackShadowPages was exceeded and more space is needed.

If you increase the value of StackShadowPages, you might also need to increase the default thread stack size using the -Xss parameter. Increasing the default thread stack size might decrease the number of threads that can be created, so be careful in choosing a value for the thread stack size. The thread stack size varies by platform from 256 KB to 1024 KB.

The following is a fragment from a fatal error log on a Windows system, where a thread has provoked a stack overflow in native code:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x10001011, pid=296, tid=2940
#
# Java VM: Java HotSpot(TM) Client VM (1.6-internal mixed mode, sharing)
# Problematic frame:
# C  [App.dll+0x1011]
#

---------------  T H R E A D  ---------------

Current thread (0x000367c0):  JavaThread "main" [_thread_in_native, id=2940]
:
Stack: [0x00040000,0x00080000),  sp=0x00041000,  free space=4k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [App.dll+0x1011]
C  [App.dll+0x1020]
C  [App.dll+0x1020]
:
C  [App.dll+0x1020]
C  [App.dll+0x1020]
...<more frames>...

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  Test.foo()V+0
j  Test.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub

Note the following information in the above output:

  • The exception is EXCEPTION_STACK_OVERFLOW.

  • The thread state is _thread_in_native, which means that the thread is executing native or JNI code.

  • In the stack information, the free space is only 4 KB (a single page on a Windows system). In addition, the stack pointer (sp) is at 0x00041000, which is close to the end of the stack at 0x00040000.

  • The printout of the native frames shows that a recursive native function is the issue in this case. The output notation ...<more frames>... indicates that additional frames exist but were not printed. The output is limited to 100 frames.

Finding a Workaround

If a crash occurs with a critical application, and the crash appears to be caused by a bug in the HotSpot VM, then it might be desirable to quickly find a temporary workaround. The purpose of this section is to suggest some possible workarounds. If the crash occurs with an application that is deployed with the most recent release of the JDK, then the crash should always be reported to Oracle.

WARNING:

Even if a workaround in this section successfully eliminates a crash, the workaround is not a fix for the problem, but merely a temporary solution. Submit a support call or bug report with the original configuration that demonstrated the issue.

Working Around Crashes in the HotSpot Compiler Thread or Compiled Code

If the fatal error log indicates that the crash occurred in a compiler thread, then it is possible (but not always the case) that you have encountered a compiler bug. Similarly, if the crash is in compiled code then it is possible that the compiler has generated incorrect code.

In case of the HotSpot Client VM (-client option), the compiler thread appears in the error log as CompilerThread0. With the HotSpot Server VM there are multiple compiler threads and these appear in the error log file as CompilerThread0, CompilerThread1, and AdapterThread.

Below is a fragment of an error log for a compiler bug that was encountered and fixed during the development of J2SE 5.0. The log file shows that the HotSpot Server VM is used and the crash occurred in CompilerThread1. In addition, the log file shows that the current CompileTask was the compilation of the java.lang.Thread.setPriority method.

# An unexpected error has been detected by HotSpot Virtual Machine:
#
:
# Java VM: Java HotSpot(TM) Server VM (1.5-internal-debug mixed mode)
:
---------------  T H R E A D  ---------------

Current thread (0x001e9350): JavaThread "CompilerThread1" daemon [_thread_in_vm, id=20]

Stack: [0xb2500000,0xb2580000),  sp=0xb257e500,  free space=505k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xc3b13c]
:

Current CompileTask:
opto: 11      java.lang.Thread.setPriority(I)V (53 bytes)

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x00229930 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=21]
=>0x001e9350 JavaThread "CompilerThread1" daemon [_thread_in_vm, id=20]
 :

In this case there are two potential workarounds:

  • The brute force approach: change the configuration so that the application is run with the -client option to specify the HotSpot Client VM.

  • The subtle approach: assume that the bug only occurs during the compilation of the java.lang.Thread.setPriority method and exclude this method from compilation.

The first approach (to use the -client option) might be trivial to configure in some environments. In others, it might be more difficult if the configuration is complex or if the command line to configure the VM is not readily accessible. In general, switching from the HotSpot Server VM to the HotSpot Client VM also reduces the peak performance of an application. Depending on the environment, this might be acceptable until the actual issue is diagnosed and fixed.

The second approach (exclude the method from compilation) requires creating the file .hotspot_compiler in the working directory of the application. Below is an example of this file:

exclude java/lang/Thread setPriority

In general the format of this file is exclude class method, where class is the class (fully qualified with the package name) and method is the name of the method. Constructor methods are specified as <init> and static initializers are specified as <clinit>.

Note:

The .hotspot_compiler file is an unsupported interface. It is documented here solely for the purposes of troubleshooting and finding a temporary workaround.

Once the application is restarted, the compiler will not attempt to compile any of the methods excluded in the .hotspot_compiler file. In some cases this can provide temporary relief until the root cause of the crash is diagnosed and the bug is fixed.

In order to verify that the HotSpot VM correctly located and processed the .hotspot_compiler file that is shown in the example above, look for the following log information at runtime. Note that the file name separator is a dot, not a slash.

### Excluding compile:    java.lang.Thread::setPriority

Working Around Crashes During Garbage Collection

If a crash occurs during garbage collection (GC), then the fatal error log reports that a VM_Operation is in progress. For the purposes of this discussion, assume that the mostly concurrent GC (-XX:+UseConcMarkSweep) is not in use. The VM_Operation is shown in the THREAD section of the log and indicates one of the following situations:

  • Generation collection for allocation

  • Full generation collection

  • Parallel gc failed allocation

  • Parallel gc failed permanent allocation

  • Parallel gc system gc

Most likely the current thread reported in the log is the VMThread. This is the special thread used to execute special tasks in the HotSpot VM. The following fragment of the fatal error log shows an example of a crash in the serial garbage collector:

---------------  T H R E A D  ---------------

Current thread (0x002cb720):  VMThread [id=3252]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x0000000a, EBX=0x00000001, ECX=0x00289530, EDX=0x00000000
ESP=0x02aefc2c, EBP=0x02aefc44, ESI=0x00289530, EDI=0x00289530
EIP=0x0806d17a, EFLAGS=0x00010246

Top of Stack: (sp=0x02aefc2c)
0x02aefc2c:   00289530 081641e8 00000001 0806e4b8
0x02aefc3c:   00000001 00000000 02aefc9c 0806e4c5
0x02aefc4c:   081641e8 081641c8 00000001 00289530
0x02aefc5c:   00000000 00000000 00000001 00000001
0x02aefc6c:   00000000 00000000 00000000 08072a9e
0x02aefc7c:   00000000 00000000 00000000 00035378
0x02aefc8c:   00035378 00280d88 00280d88 147fee00
0x02aefc9c:   02aefce8 0806e0f5 00000001 00289530
Instructions: (pc=0x0806d17a)
0x0806d16a:   15 08 83 3d c0 be 15 08 05 53 56 57 8b f1 75 0f
0x0806d17a:   0f be 05 00 00 00 00 83 c0 05 a3 c0 be 15 08 8b

Stack: [0x02ab0000,0x02af0000),  sp=0x02aefc2c,  free space=255k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x6d17a]
V  [jvm.dll+0x6e4c5]
V  [jvm.dll+0x6e0f5]
V  [jvm.dll+0x71771]
V  [jvm.dll+0xfd1d3]
V  [jvm.dll+0x6cd99]
V  [jvm.dll+0x504bf]
V  [jvm.dll+0x6cf4b]
V  [jvm.dll+0x1175d5]
V  [jvm.dll+0x1170a0]
V  [jvm.dll+0x11728f]
V  [jvm.dll+0x116fd5]
C  [MSVCRT.dll+0x27fb8]
C  [kernel32.dll+0x1d33b]

VM_Operation (0x0373f71c): generation collection for allocation, mode:
 safepoint, requested by thread 0x02db7108

Note:

A crash during garbage collection does not imply a bug in the garbage collection implementation. It could also indicate a compiler or runtime bug, or some other issue.

You can try the following workarounds if you get a repeated crash during garbage collection:

  • Switch GC configuration. For example, if you are using the serial collector, try the throughput collector, or visa versa.

  • If you are using the HotSpot Server VM, try the HotSpot Client VM.

If you are not sure which garbage collector is in use, you can use the jmap utility on Solaris OS and Linux (see "The jmap Utility") to obtain the heap information from the core file, if the core file is available. In general if the GC configuration is not specified on the command line, then the serial collector will be used on Windows. On Solaris OS and Linux it depends on the machine configuration. If the machine has at least 2 GB of memory and has at least 2 CPUs, then the throughput collector (Parallel GC) will be used. For smaller machines the serial collector is the default. The option to select the serial collector is -XX:+UseSerialGC and the option to select the throughput collector is -XX:+UseParallelGC. If, as a workaround, you switch from the throughput collector to the serial collector, then you might experience some performance degradation on multi-processor systems. This might be acceptable until the root issue is diagnosed and resolved.

Working Around Crashes Caused by Class Data Sharing

Class data sharing (CDS) was a new feature in J2SE 5.0. When the JRE is installed on 32-bit platforms using the Sun-provided installer, the installer loads a set of classes from the system JAR file into a private internal representation and dumps that representation to a file called a shared archive. When the VM is started, the shared archive is memory-mapped in. This saves on class loading and allows much of the metadata associated with the classes to be shared across multiple VM instances. In J2SE 5.0, CDS is enabled only when the HotSpot Client VM is used. In addition, sharing is supported only with the serial garbage collector.

The fatal error log prints the version string in the header of the log. If sharing is enabled, it is indicated by the text "sharing", as shown in the following example:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x08083d77, pid=3572, tid=784
#
# Java VM: Java HotSpot(TM) Client VM (1.5-internal mixed mode, sharing)
# Problematic frame:
# V  [jvm.dll+0x83d77]

CDS can be disabled by providing the -Xshare:off option on the command line. If the crash only occurs with sharing enabled, then it is possible that you have encountered a bug in this feature. In that case gather as much information as possible and submit a bug report.

Microsoft Visual C++ Version Considerations

The JDK 7 software is built on Windows using Microsoft Visual Studio 2010 Professional for both 32-bit and 64-bit platforms. If you experience a crash with a Java application and if you have native or JNI libraries that are compiled with a different release of the compiler, then you must consider compatibility issues between the runtimes. Specifically, your environment is supported only if you follow the Microsoft guidelines when dealing with multiple runtimes. For example, if you allocate memory using one runtime, then you must release it using the same runtime. Unpredictable behavior or crashes can arise if you release a resource using a different library than the one that allocated the resource.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration crash-dump-windbg.gif

Documentation Contents

This illustration contains a screenshot of the output from windbg a debugging tool for Windows. There is a single window with several dozens of lines of debugging information text.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration jconsole-memory-tab.gif

Documentation Contents

This illustration shows a screenshot of the JConsole window. At the top of the window, the title bar contains the following text: "Java Monitoring & Management Console - pid: 5500 sun.tools.jconsole.JConsole".

Below the title bar, there is a menu bar that consists of three menus: Connection, Window, and Help.

The window is divided into six tabs that are located below the menu bar: Overview, Memory, Threads, Classes, VM Summary, and MBeans.

The Memory tab is selected. At the top of the tab is a row of three elements: a dropdown list labeled Chart with the Heap Memory Usage item selected, a dropdown list labeled Time Range with the All item selected, and a button labeled Perform GC.

Below these elements is a graph with four time values on the horizontal axis ranging from 15:05 to 15:08 with an interval of one minute each. The vertical axis contains five memory size values ranging from 10 Mb to 50 Mb with an interval of 10 Mb each. At the place where the graph line breaks on the right, there is a label that says: "Used 17,909,604".

Below the graph, at the bottom of the window, there is a group labeled Details. In the left part of that group, there is a pane with a summary of five values:

Time: 2006-10-02 15:08:26
Used:       18,234 kbytes
Commited:   40,456 kbytes
Max:        65,088 kbytes
GC time: 0.709 seconds on Copy (194 collections)
         1.272 seconds on MarkSweepCompact (12 collections)

In the right part of the Details group, there are five vertical gauges (three of them are located above a box labeled Heap, and two above a box labeled Non-Heap). To the left of the gauges, there is a vertical scale axis with five values ranging from 0% to 100% with an interval of 25%.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Description of the illustration visualgc.gif

Documentation Contents

This illustration shows a screenshot of the visualgc tool's output. The window titled Graph is divided into eight time graphs, each spread across the whole width of the window.

The first time graph is labeled "Compile Time: 939 compiles - 2.321s".

The second time graph is labeled "Class Loader Time: 1636 loaded, 0 unloaded - 715.073ms".

The third time graph is labeled "GC Time: 100 collections, 3.877s".

The fourth time graph is labeled "Eden Space (7.125M, 7.125M): 1.379M, 89 collections, 660.35".

The fifth time graph is labeled "Survivor 0 (448.000K, 448.000K): 0".

The sixth time graph is labeled "Survivor 1 (448.000K, 448.000K): 80.711K".

The seventh time graph is labeled "Old Gen (24.000M, 24.000M): 5.342M, 11 collections, 3.217s".

The eighth time graph is labeled "Perm Gen (64.000M, 7.000M): 6.810M".

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Package Version Identification

The versioning feature enables package-level version control so that applications and applets can identify at runtime the version of a specific Java Runtime Environment, VM, and class package.

Package Versioning Specification

  • Versioning Specification

API Reference

  • java.lang.Class
  • java.lang.ClassLoader
  • java.lang.Package
  • java.lang.System
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Versioning API Enhancements

Documentation Contents

Java™ Versioning API Enhancements

  • Enhancements in Java SE 6
  • Enhancements in J2SE 5.0
  • Enhancements in J2SDK 1.4
  • Previous Enhancements

Enhancements in Java SE 6

No changes to report.

Enhancements in J2SE 5.0

No changes to report.

Enhancements in Java 2 SDK v1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

Java Product Versioning Specification
Contents | Previous | Next

Contents

Java™ Product Versioning Specification

Introduction

Requirements

Users

Product support

Webmasters and Administrators

Product Developers

Problems of Evolution in Distributed Systems

Design for Evolution

Java Language Specification on Backwards Compatibility

Object Serialization Specification on Backwards Compatibility

Package Version Specification

Specification Versioning

Virtual Machine Versioning

Version Identification of the Java Runtime

Package Versioning

API to Package Version Information

java.lang.Class Additions

java.lang.ClassLoader Additions

JAR Manifest Format

How Users Know What is Running

Rationale for limiting Implementation version numbers to identity

Documenting How to Develop

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java™ Product Versioning

Chapter 1

1.1 Introduction

In any system support must be provided for the system to evolve over time. Most existing systems have conventions and mechanisms that specify how change is accommodated. These systems have been based on the model where software programs are installed on a computer. Typically, developers have been able to specify what versions of other packages are required and the installation process has helped verify and configure the system.

In open distributed systems the static assumptions of existing systems does not work and evolution is more difficult because it is not possible to control how or when the packages change and correct operation depends on a greater number of dependencies between packages. What is needed is an updated set of conventions and mechanisms that specify how the packages of a system should evolve so that the goal of an open reliable scalable distributed system can be achieved.

This document specifies:

  • how classes, resources, and files that make up a Java package are versioned. Packages define the consistent unit that can be developed, packaged, verified, updated, and distributed. Per package manifest information identifies the contents of the package;
  • products are distributed by putting packages into archive files. Archives include a manifest to identify the product version and packages it contains;
  • the standards and conventions used by developers and administrators to build and deploy products that operate reliably as their packages and the packages they depend on are upgraded.

1.2 Requirements

The impact of changes within a distributed system has a significant impact on end users, support organizations, web administrators, and developers.

  • End Users
  • Product Support Organizations
  • Webmasters and Administrators
  • Product Developers

Each of these groups has different requirements on products deployed on the net that evolve over time.

Users

For users there is a need to build confidence that Java based products will be reliable and compatible over time. The reluctance to upgrade needs be addressed by building confidence in the Write Once Run Anywhere philosophy. With Java it should no longer be the norm that users will complain “if I upgrade it will break something” or “I won't be able to read/write data others can use”.

  • They need to know that upgrading will not break either other programs or will obsolete existing data or produce data unusable by others.
  • At the simplest level users want to know if the features they need are in the product version they have and what version to ask for to get particular features.
  • More knowledgeable users keep track of what bugs are in what product version so they can work around them or avoid them.

Product support

Product organizations rely on being able to easily and correctly identify the product that is being used, the environment in which it is being used, and the integrity of the product packaging.

  • Databases of known problems and solutions are indexed by product identification information.
  • The interoperation of products and packages can introduce new kinds of problems and require all of the packages in a system to be identified. Problems can originate from public interfaces that are under-specified, implementations that do not conform to the specification, or clients that use implementation specific details that are not part of the specification.

Webmasters and Administrators

Webmasters, administrators, and service providers need to deploy applications for their clients via the web or network filesystems in a way that is reliable and supportable.

  • The staff of these organizations must be able to support their sites, identifying problems with individual packages and interactions between packages.
  • Site configuration must be able to support the scaling up of sites with automated site management tools.
  • Installing updating packages must not present a risk to the correction operation of existing packages or active users.

Product Developers

Product developers need to know how to write and deploy applications and libraries that satisfy the requirements of the users, administrators and support personnel. The must be able to make products and packages that:

  • can operate correctly in the open dynamic environment of the web,
  • can be upgraded without breaking compatibility with clients,
  • can take advantage of upgrades in the packages they rely upon,
  • can take advantage of dynamic extensions of their packages,
  • can identify the packages they rely on for reporting of problems,
  • are packaged to support the needs of users, webmasters and support organizations,
  • can have known packages and combinations that satisfy the auditing and security requirements appropriate for the application and organization.

1.3 Problems of Evolution in Distributed Systems

In open distributed systems many problems can occur when the packages evolve and are updated independently. If the specified behavior inherent in the use of public interfaces are not maintained the system may fail in unexpected ways. Open systems are made up of many packages from different companies and organizations. These organizations operate asynchronously, introducing and upgrading their products on their own schedules. The distribution of those upgraded products takes time and adoption is not universal.

In Java, the components of local and distributed systems rely on the public interfaces and contracts for the behavior of other packages. Those packages will themselves evolve over time. In order for a package to operate correctly the packages it depends on must continue to provide the expected behavior even though they have been updated.

In distributed systems only partial consistency is possible, since it is impossible to have knowledge of the entire state of the system. Each process and package of the system has its own partial view of the current state of the system, accumulated incrementally by requesting information from other parts of the distributed system. Each piece of information whether from an applet that was started, a class that was loaded, a remote method invoked, or a web page retrieved must be treated carefully so that it can be used consistently with the rest of that partial view.

Many kinds of errors could result from inconsistencies in the classes that are loaded, including class verification errors, classes could compute incorrectly but without recognizable errors, or user requested functions could exhibit arbitrary failures.

Typical problems include:

  • If an applet is running and has loaded only some of its classes when the web server is updated with a new version. When the applet incrementally loads more classes they may be inconsistent with the classes already loaded.
  • If an application is using libraries from multiple websites and has loaded only some of the classes it needs, the libraries might be updated raising the potential of incompatibilities that the applet or user is left to detect.
  • If an application or applet is running and makes a RMI call that returns an object for which the class needs to be loaded. The class that is loaded could be inconsistent with respect to the other classes already loaded.
  • If an application or applet is running and makes a RMI call that returns an object that is for a newer or older version of the class.
  • Bugs may exist in a library, if the clients have worked around the bug a cascade of problems may be introduced when the bug is fixed.

These problems cannot be prevented or solved directly because they arise out of inconsistencies between dynamically loaded packages that are not under the control of a single system administrator and so cannot be addressed by current configuration management techniques.

1.4 Design for Evolution

The key to dealing with these problems and meeting the requirements stated above is the careful design of the packages and packaging of the system so that they may be updated, distributed, and loaded in consistent units. Typical to mass produced products is the notion of the field replacable unit. It is the smallest unit of a product that can be identified with a specification, a supplier, can be distributed and redistributed, and can be replaced if faulty. This same model is used for software distribution, products have a name, a version number, adhere to one or more specifications, are distributed on the network or cdrom and its problems can be reported to support organizations. These packages are the smallest unit that can be distributed, used, validated and replaced or upgraded when necessary. Packages can be assembled with other packages and each package can still be identified, verified, and distributed.

The Java language based package mechanism fits well with the idea of a replacable unit. Java packages expose only public interfaces and use only the public interfaces of other packages. The Java Language Specification define the approaches for compatible evolution of packages.

1.4.1 Java Language Specification on Backwards Compatibility

The Java Language Specification lays the groundwork for developing packages that can be expected to evolve gracefully over time. It defines how classes can change and still be backward compatible with other classes previously compiled and distributed. Essential to robust evolution is the stability of the public, protected, and package interfaces and behavior as the implementations evolve. It defines “compatible” changes as those changes that do not change existing interfaces or behavior. Thus, if a class defines a method, and the method had a particular behavior, that same contract must be supported by the all later evolutions of the class. Detailed rules are given in Chapter 13 of the Java Language Specification. One additional incompatible change has been added; it is incompatible to add methods to a public interface.

Incompatible changes are not permitted, but new or similar functionality can always be added in new or existing interfaces or classes.

By choosing the Java package as the unit of update the package and private methods of the classes may change allowing flexibility in the implementation of the package while the public and protected classes and methods maintain the external interfaces and semantics.

1.4.2 Object Serialization Specification on Backwards Compatibility

Robust persistent storage and robust communication between the components is important to distributed systems. Components must be able to maintain persistent storage as they evolve, being able to evolve classes and yet have them read data previously written to storage. Components in a distributed system evolve at different rates and must still be able to reliably communicate.

Adhering to the compatibility requirements of object serialization allows newer and older versions to communicate in a predictable and consistent way. The details are in Chapter 5 of the Java™ Object Serialization Specification.

1.5 Package Version Specification

There are several categories of artifacts that need to be identified including specifications, implementation, the Java Virtual Machine and Java Runtime Environment.

1.5.1 Specification Versioning

Open systems are based on the idea that a specification may have multiple implementations. Specifications evolve under the auspices of an organization or company. It is highly undesirable if a specification has multiple incompatible versions. Each version of a specification or implementation must evolve only into a single subsequent version. The philosophy of requiring specifications to be backward compatible allows specifications to be identified as supersets of the previous specification. Since there is a single sequence of version specifications they can meaningfully be identified by version numbers with specific semantics that imply the ordering. Specification version numbers use a Dewey decimal notation consisting of numbers seperated by periods.

A specification is identified by the:

  • Owner of the specification
  • Name of the Specification
  • Version number - major.minor.micro; major version numbers identify significant functional changes, minor version numbers identify smaller extensions to the functionality, micro versions are even finer grained versions. These version numbers are ordered with larger numbers specifying additions to the specification.

1.5.2 Virtual Machine Versioning

An implementation of the Java Virtual Machine should be identify both the specification and the implementation. These properties should be added to those already available using java.lang.System.getProperties.

  • java.vm.specification.version: Example, 1.8
  • java.vm.specification.vendor: Example, Oracle Corporation
  • java.vm.specification.name: Example, Java Virtual Machine Specification
  • java.vm.version: Example, 25.0-b05
  • java.vm.vendor: Example, Oracle Corporation
  • java.vm.name: Example, Java HotSpot(TM) Client VM

These properties are accessed using the method java.lang.System.getProperty and each returns a string.

1.5.3 Version Identification of the Java Runtime

The requirement to identify the Java Runtime is already partially met via the properties specified by the Java Language Specification, section 20.18.7 using java.lang.System.getProperties.

  • java.version: Example, 1.8.0
  • java.vendor: Example, Oracle Corporation

Currently these identify the implementation of the Java runtime and the core classes that are available. These properties do not identify the Java Language Specification version that this JDK implements.

Additional properties are needed to identify the version of the Java Runtime Environment specification that this implementation adheres to. The properties are:

  • java.specification.version: Example, 1.8
  • java.specification.name: Example: Java Language Specification
  • java.specification.vendor: Example, Oracle Corporation

These properties are accessed using the method java.lang.System.getProperty and return their values as strings.

1.5.4 Package Versioning

Each Java package is made up of class files plus optional resource files. The information needed to identify the contents of the package is stored with the package contents.

This specification applies to all packages regardless of whether they are developed as a core package distributed with a Java Runtime, a standard extension, an applet or application package.

Unlike version numbers for specifications version information for implementations cannot be used to identify the package as being backward compatible with earlier versions. Package version numbers are present to identify differences between the specification and the implementation, i.e. bugs. New versions of implementations are specifically produced to remove (bad or incorrect) behavior and thus are intended not to be backward compatible. Thus package version strings can have any unique value and can only be compared for equality. For a complete explanation of the rationale, see Section 1.5.10 "Rationale for limiting Implementation version numbers to identity”.

The following attribute names are defined for a package. The value of each attribute is a string:

  • Package-Title: Title of the package
  • Package-Version: Version number
  • Package-Vendor: Vendor's company or organization
  • Specification-Title: Title of the specification
  • Specification-Version: Version number
  • Specification-Vendor: Vendor's company or organization

These attributes are stored in the manifest and retrieved by programs using the java.lang.Package API described below.

1.5.5 API to Package Version Information

The java.lang.Package class provides a object to locate and access information about the package.

Package objects are created explicitly by class loaders and should be created before the first class in the package is defined. The attributes of each package are stored in the manifest and are retrieved by the classloader.

package java.lang;
public class Package {

        // Return the name of this package.
        public String getName();

        // Return the title of the specification of this package.
        public String getSpecificationTitle();

        // Return the version of the specification of this package.
        public String getSpecificationVersion();

        // Return the vendor of the specification of this package.
        public String getSpecificationVendor();

        // Return the title of the implementation of this package.
        public String getImplementationTitle();

        // Return the version of the implementation of this package.
        public String getImplementationVersion();

        // Return the vendor of the implementation of this package.
        public String getImplementationVendor();

        // Is this package is compatible with the requested version
        public boolean isCompatibleWith(String desired);

        // Get the Package for the named class
        public static Package getPackage(String classname);

        // Return the packages for currently loaded classes.
        public static Package[] getAllPackages();

        // Return true if this package is equal to another object.
        public boolean equals(Object obj);

        // Return the hashcode for this object
        public int hashCode();

        // Return the string describing this package.
        public String toString();
}

The getName method returns this package’s name, for example, java.lang.

The getSpecificationTitle method return this packages specification title if it is known and null otherwise.

The getSpecificationVersion method return this the version number of the specification this package implements. Null is returned if the version is not known.

The getSpecificationVendor returns the organization, group or vendor that owns the specification.

The getImplementationTitle method return this packages implementation title if it is known and null otherwise.

The getImplementationVersion method return this the version number of the implementation this package implements. Null is returned if the version is not known.

The getImplementationVendor returns the organization, group or vendor that owns this implementation.

The isCompatibleWith method returns true if this package’s specification version number is compatible with the desired version number. True is returned if this packages specification version number is greater than the supplied version string. A version string is a series of positive numbers separated by periods. The numbers are compared component by component from left to right. If any number is greater than the corresponding number of the supplied string the method returns true. If the number is less than it returns false. If the corresponding numbers are equal the next number is examined.

The getPackage method locates the package for the class by name. The current class loader is consulted to map the package name to the package object in that class loader. It returns the package object containing the attributes for the package. Null is returned if the package information has not yet been loaded or if no package information was defined by the classloader.

The getAllPackages method will return an array of the packages known to the current classloader. It includes the packages of both the system and classloaded classes. It does not identify all packages available to be loaded by the classloader. It only identifies those packages for which the classloader has provided information.

The equals method returns true if this package has the same name and classloader as the object passed in.

The hashCode method returns a hashcode consistent with definition of equals as required by the Java Language Specification.

The toString method returns a string consisting of “package” and the package name. If available the specification title and specification version number are appended to the string.

1.5.6 java.lang.Class Additions

A method has been added to java.lang.Class to get the package for this class.

package java.lang;
public class Class {
        ...
        public Package getPackage();
        ...
}

1.5.7 java.lang.ClassLoader Additions

In order to support Packages the classloader is extended to keep track of the mapping from classes to packages and to allow classloaders to define the Package instances for the classes they load. The additional methods are defined to allow subclasses to define packages in this classloader to allow the Package implementation to get information about packages defined by this classloader.

The java.lang.Package implementation needs to identify the current classloader in order to call it from system code.

package java.lang;
public class ClassLoader {
        ...
        // Return the non-null classloader of callers
        public static ClassLoader currentClassLoader();
        // Define a Package
        protected Package(String pkgname,
                        String spectitle, String specversion,
                        String specvendor,      String impltitle,
                        String implversion, String implvendor);
        ...
}

The currentClassLoader method is used to find the current ClassLoader even if called from a system class. When called from a classloader loaded class it will return the equivalent of this.getClass().getClassLoader(). It’s behavior is identical to the current SecurityManager.currentClassLoader method but is public.

The protected access definePackage method is used by subclasses to define the packages of the classes it is loading. Packages with a given name may only be defined once and must be defined before the first class of that package is loaded. The classloader should supply the versioning attributes from the manifest if they are available.

1.5.8 JAR Manifest Format

The current manifest format is extended to allow the specification of the attributes for package versioning information. A manifest entry should be created for each Java package. The name of the entry will be the directory within the archive that contains the package’s class and resource files. For example:

Manifest-Version: 1.0
Created-By: 1.8.0 (Oracle Corporation)
Name: java/util/
Specification-Title: Java Utility Classes
Specification-Version: 1.2
Specification-Vendor: Example Tech, Inc.
Implementation-Title: java.util
Implementation-Version: build57
Implementation-Vendor: Example Tech, Inc.

These attributes can be inserted in the manifest by creating a prototype manifest file and using the “-m” switch of the jar tool to merge them into the manifest when it is built. JarTool will be extended to browse and set the versioning attributes in the manifest.

1.5.9 How Users Know What is Running

Users need to be able to report the identities of the packages in use when bugs occur. It’s up to the application, applet or browser to expose the available information to the user on demand or when an error occurs. API’s are available to allow the following to be reported:

  • What are the packages loaded?
    The package.getAllPackages method will return the active packages.
  • What are the package versions?
    The java.lang.Package methods allow the attributes for names and versions to be examined as listed in Section 1.5.4 "Package Versioning”.
  • What version of the Java Runtime is active?
    The System.getProperties method can be used to get the properties of this virtual machine listed in Section 1.5.3 "Version Identification of the Java Runtime”.
  • What version of the Java VM is active?
    The System.getProperties method can be used to get the properties of this virtual machine listed in Section 1.5.2 "Virtual Machine Versioning”.

1.5.10 Rationale for limiting Implementation version numbers to identity

Implementations evolve independently over time to fix bugs, improve performance or add new functions called for by later revisions of the specifications. Packages implement specifications and must identify which version of each specification they implement. Interactions occur between packages only through their public and protected interfaces and classes. It is the public api and behavior that must remain stable over time so that changes can be allowed in the implementation of one package without affecting the behavior of another package.

If the classes of a package always faithfully implemented the specification it would be sufficient just to identify the specification. Since in the real world this rarely happens packages need to identify themselves so that bugs can be reported against the packages that may have contributed to the problem.

There is a significant tendency to try to attach some significance to version identifiers of implementations. If the purpose is to allow the tracking of bugs then a unique number is sufficient. It is also sufficient for a client package to workaround a bug in a particular version of a vendors package since that version can be tested for and the bug avoided.

However, many additional problems can occur when one package attempts to work around bugs in other packages. They need to identify behavior that is not part of the specification and may try to use behavior that is only part of one implementation. Such implementation specific behavior cannot be relied upon to be in any particular version other than the one(s) seen and tested by the developer.

A bug first appears in some version of a vendors package and may or may not continue to be a problem in subsequent versions. If the client of the buggy package uses a work around based on version numbers it could correctly work around the bug in the specific version. Now, if the buggy package was fixed, how would the client package know whether the bug was fixed or not. If it assumed that higher versions still contained the bug it would still try to work around the bug. The work around itself might not work correctly with the non-buggy package. This could cause a cascade of bugs caused by fixing a bug. Only the developer, through testing with a new version, can determine whether or not the workaround for a bug is still necessary or whether it will cause problems with the correctly behaving package. The developer only knows that the bug exists in a particular individual versions.

1.6 Documenting How to Develop

This section should discuss each aspect of product development and distributions giving direction on how to achieve a robust evolvable product.

  • Read the Java Language Specification, be backward compatible
  • Read Serialization Specification, be backward compatible
  • Develop on a platform that includes all of the functionality required.
  • Test for new functionality not included in each previous version of the platform specification and fall back or put up sensible messages
  • Author the package and product versioning information and create the necessary files
  • Depending on the archive model the entire contents will need to be signed and the manifests be created
  • Test on oldest platform
  • Distribute only in archives with manifests to insure consistency and integrity
  • Update only whole java packages or whole archive files

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java™ Product Versioning Specification

Documentation Contents
Contents | Previous | Next

Java Product Versioning Specification

Evolution in open distributed systems must be managed carefully because correct operation depends on a great number of dependencies between packages. The impact of changes within a distributed system has a significant impact on users, support organizations, web administrators, and developers. Packages within a distributed system must operate correctly given only partial knowledge about the state of the whole system. The difficulty is increased because the packages of the system must be able to evolve at different rates. Evolution in such a system is made possible by explicitly managing the dependencies between the packages using techniques of object oriented design to govern how individual packages evolve. The Java language defines packages that are a natural for the consistent unit of update, they expose only public interfaces and consume only public interfaces of other classes.

Contents | Previous | Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Introduction to Java VisualVM

Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). Java VisualVM organizes JVM data that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about the JVM software and save the data to your local system, and view the data later or share the data with others.

In order to benefit from all Java VisualVM's features, you should run the Java Platform, Standard Edition (Java SE) version 6.

Starting Java VisualVM

Java VisualVM is bundled with JDK version 6 update 7 or greater. Once you have installed an appropriate JDK version, navigate to your JDK software's bin directory and double-click the Java VisualVM executable. On Windows this directory will be the following:

C:\Program Files\Java\jdk1.6.0_update-number\bin

Alternatively, navigate to your JDK software's bin directory and type the following command at the command (shell) prompt:

jvisualvm

The first time that you launch Java VisualVM you are prompted to accept a license agreement.

Java VisualVM Userdir

On Windows, the default location for the Java VisualVM userdir is the following:

C:\Documents and Settings\<USER>\Application Data\.visualvm\JDK_update-number

To find the location of your Java VisualVM userdir, choose Help > About from the main menu and click Details in the About Java VisualVM window.

Java VisualVM Windows

When you start Java VisualVM, the main Java VisualVM window opens. The main Java VisualVM window is divided into two windows.

screenshot of VisualVM window with Start screen

When you first start Java VisualVM, the Applications window is visible in the left side of the window and the Start Page is visible in the right side in the main window. The Start Page contains links to Java VisualVM documentation web pages and additional resources.
Note: The Start Page opens by default each time you start Java VisualVM. You can open the Start Page at any time by choosing Help > Start Page from the main menu. You can also hide the Start page by unchecking the "Show On Startup" check-box.

Applications Window

The Applications window opens in the left side of the main Java VisualVM window when you launch the application. The Applications window is the main point of entry for exploring the details of running applications. The Applications window uses a tree structure to enable you to quickly view the applications running on the local machine and any connected remote machines. You can also access core dumps (Solaris/Linux) and saved snapshots from the Applications window.

Right-clicking a node in the Applications window opens a popup menu that enables you to perform actions related to that node, including opening application tabs, taking heap and thread dumps and opening snapshots in the main window.

For more details about how to use the Applications window to view and save data, see the following pages:

  • Using the Applications Window
  • Working with Local Applications
  • Working with Remote Applications
  • Working with VM Coredumps
  • Working with Snapshots

Main Window

Detailed information about applications is displayed in the main window. When you view data about an application, each application is represented by a tab in the main window that enables you to easily view and navigate the data. Saved thread dumps and heap dumps are also opened in the main window.

For information about the application data that can be displayed in the main window, see the following pages:

  • Application Overview Tab
  • Monitoring an Application in the Monitor Tab
  • Monitoring Threads in the Threads Tab
  • Browsing a Heap Dump
  • Profiling an Application in the Profiler Tab (local applications only)

Java VisualVM Plugins

You can add functionality to Java VisualVM by using the Plugins manager to install plugins from the Java VisualVM Plugins Center. You can also extend the functionality of Java VisualVM by developing your own plugins that can then be added to an update center.

For example, installing the Java VisualVM-MBeans plugin adds an MBeans tab to the application tab that enables you to monitor and manage MBeans from within Java VisualVM.

To install a Java VisualVM plugin:

  1. Choose Tools > Plugins from the main menu.
  2. In the Available Plugins tab, select the Install checkbox for the plugin. Click Install.
  3. Step through and complete the plugin installer.
screenshot of Plugins window

For more information about creating Java VisualVM plugins, see the following documents:

  • Getting Started Extending Java VisualVM
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Monitoring Application Threads

Java VisualVM presents data for local and remote applications in a tab specific for that application. Application tabs are displayed in the main window to the right of the Applications window. You can have multiple application tabs open at one time. Each application tab contains sub-tabs that display different types of information about the application.

Monitoring Thread Activity

Java VisualVM displays real-time, high-level data on thread activity in the Threads tab.
Note: The information displayed in the Threads tab is based on Java Management Extensions (JMX). The Threads tab is visible if Java VisualVM can make a JMX technology-based connection (JMX connection) with the target application and retrieve JMX instrumentation from the Java Virtual Machine (JVM). If the target application is a local application running on Java Development Kit (JDK) version 1.6, the JMX connection is made automatically. If the target application is not running on JDK version 1.6, you may need to explicitly establish a JMX connection with the JVM software. For more on establishing a JMX connection, see the following document:

  • Connecting to JMX Agents Explicitly

By default the Threads tab displays a timeline of current thread activity. You can click a thread in the timeline to view details about that thread in the Details tab.

Timeline Tab

This tab displays a timeline with real-time thread states. Use the buttons in the Timeline toolbar to zoom in/out on the current view and to switch to the Scale to Fit mode. The drop-down list enables you to select which threads are displayed. You can choose to view all threads, live threads or finished threads. You can also select a single thread or multiple threads to display a subset of the threads. You can double-click on a thread timeline to open that thread in the Details tab.

A timeline for each thread provides a quick overview of the thread's activity.

screenshot of timeline in Threads tab

Details Tab

The Details tab displays more detailed information about individual threads. Using the drop-down list, you can select to display all threads, all live threads or all finished threads. You can also choose to display only the details of threads selected in the Timeline view. For each thread, the name, classname and current status (alive/finished) are displayed. A short description of the thread is also provided.

Each thread displayed in the Details tab has the following tabs:

  • General. This tab displays thread states statistics.
  • Details. This tab contains full listings of thread states with timestamps.

A timeline for each thread provides a quick overview of the thread's activity.

screenshot of timeline in Threads tab

Taking a Thread Dump

You can use Java VisualVM to take a thread dump (stack trace) while a local application is running. Taking a thread dump does not stop the application. When you print the thread dump you get a printout of the thread stack that includes thread states for the Java threads.

When you print a thread dump in Java VisualVM, the tool prints a stack trace of the active threads of the application. Using Java VisualVM to take a thread dump can be very convenient in cases where you do not have a command-line console for the application. You can use a stack trace to help diagnose a number of issues such as deadlocks or when an application hangs.

Screenshot of thread dump (stack trace) in thread dump sub-tab.

screenshot of timeline in Threads tab
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Connecting to JMX Agents Explicitly

Java Management Extensions (JMX) technology can be used to monitor and manage any Java technology-based applications (Java applications) that are running in either a local or a remote Java Virtual Machine (JVM). Java applications are automatically exposed for monitoring and management by JMX agents if they are run on the Java platform, Standard Edition (Java SE platform) version 6. If the Java applications are running on the Java 2 platform, Standard Edition (J2SE platform) 5.0, you can expose them manually for monitoring and management by setting the com.sun.management.jmxremote.* system properties when the applications are launched. Setting these system properties, or running your applications on version 6 of the Java SE platform, enables the platform's out-of-the-box monitoring and management capability, automatically enabling the platform MBean server in the JVM software, and registering MBeans in it that expose the application for management by any appropriately configured JMX client application. VisualVM is one such JMX client application.

NOTE: For a very brief introduction to JMX technology, MBeans, the platform MBean server, and how to monitor and manage MBeans using Java VisualVM, see the Java VisualVM MBeans Tab page. For an introduction to the Java SE platform's out-of-the-box monitoring and management capability, see Monitoring and Management Using JMX Technology in the Java SE Platform Monitoring and Management Guide.

When Are Explicit JMX Connections Necessary?

As stated above, Java VisualVM will automatically detect and connect to Java applications that are running on version 6 of the Java SE platform or that have been started with the correct system properties on version 5.0. However, because there are cases in which Java VisualVM cannot automatically discover and connect to JMX agents that are running in a target Java application, a means of creating explicit JMX connections has also been added to Java VisualVM.

The circumstances in which Java VisualVM will not automatically discover JMX agents, and thus the Java applications they expose, are the following:

  • The target application is running on the J2SE 5.0 platform and the -Dcom.sun.management.jmxremote* properties have not been specified.
  • The target application is running on the same host as Java VisualVM but was started by a different user than the one who started Java VisualVM. Java VisualVM discovers running applications using the jps tool (Solaris, Linux, or Mac OS X or Windows), which can only discover Java applications started by the same user as the one who starts the Java VisualVM tool.
  • The target application is running on a remote host where jstatd (Solaris, Linux, or Mac OS X or Windows) is not running or is running but was started by a different user. The jstatd daemon provides an interface that allows remote monitoring applications to connect to Java applications on the host where it is running.

Making an Explicit JMX Connection

Before you can make an explicit JMX connection from Java VisualVM to a running application, this application must be started with the correct system properties. The system properties in question are the following:

  • com.sun.management.jmxremote.port, to specify the port number through which the application will be exposed
  • com.sun.management.jmxremote.ssl, to specify whether secure sockets layer (SSL) encryption will be activated to secure the connection to the application
  • com.sun.management.jmxremote.authenticate, to specify whether the connection will be password protected

Local JMX Connections

This section shows an example of how to connect Java VisualVM to a local application via an explicit JMX connection.

  1. Start a Java application on the J2SE platform version 5.0, setting the system properties to enable the Java SE platform's out-of-the-box monitoring and management capability, using the command shown below:
    java -Dcom.sun.management.jmxremote.port=3333 \
     -Dcom.sun.management.jmxremote.ssl=false \
     -Dcom.sun.management.jmxremote.authenticate=false \
     YourJavaApp
    In the command above, YourJavaApp is launched with the Java SE platform's out-of-the-box monitoring and management capability configured as follows:
    • The application is exposed for monitoring and management via port 3333.
    • SSL encryption is deactivated.
    • Password authentication is deactivated.
  2. Start Java VisualVM on the same machine.
  3. In Java VisualVM's Applications window, right click on the Local machine and select 'Add JMX Connection'.

    Adding a JMX connection to the local host.

  4. The Add JMX Connection dialog box opens.

    The Add JMX Connection dialog.

    The host name localhost is already filled in. You only need to add the port number on which the application is exposed for monitoring and management.

  5. Click OK. The JMX connection will appear in the application tree, with a special JMX connection icon.

    A JMX connection to the local host machine.

  6. Right click on the JMX connection, and select Open. The JVM software exposed via the JMX connection can now be monitored and managed via Java VisualVM.

    Monitoring an application via a JMX connection.

Remote JMX Connections

You can also make explicit JMX connections to applications running on remote hosts, as explained below:

  1. Right click anywhere in the blank area under the application tree and select Add JMX Connection.

    Adding a JMX connection to a remote application.

  2. Provide the machine name and port number for a running JMX agent, that has been started with the appropriate system properties to allow remote management. Here the JMX agent has been exposed on port 2222 of the machine curcuma.

    Adding a remote JMX connection.

    If you know that the JMX agent has been protected with a username and password, enter them in the Add JMX Connection dialog and specify whether you want the credentials to be saved so
    that when Java VisualVM restarts it will silently reconnect to the JMX agent without prompting the user for the security credentials again.

  3. If the JMX connection is secured and you did not provide a username and password in the Add JMX Connection dialog, you will be prompted to provide a username and password.

    JMX connector security credentials.

  4. If you know the correct username and password, the JMX connection will be established, and the JMX connection will appear in the application tree, with a special JMX connection icon.

    Remote JMX connection shown in application tree.

  5. Right click on the remote JMX connection and select Open. You can now monitor and manage remote applications via the JMX connection, and manipulate any MBeans that are registered in the MBean server exposed by this connection (note that the Java VisualVM-MBeans plugin must be installed if you want to access to the MBeans tab.)

    MBeans in a remote MBean server.

Further Reading About JMX Technology

For more information about JMX technology and monitoring and management of the Java SE platform, see the following documents.

  • JMX technology trail in the Java Tutorials
  • Java Management Extensions (JMX) product page
  • Monitoring and Management documentation for the Java SE Platform
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Using the Applications Window

When you start Java VisualVM, the Applications window is visible in the left side of the Java VisualVM window. The Applications window uses a tree structure to enable you to quickly view the applications that are running on local and connected remote JVM software instances. The Applications window also displays core dumps and application snapshots.

Applications Window Nodes

The Application window has nodes and sub-nodes that you can expand to view running applications and saved files. For most nodes in the Applications window, you can view additional information and perform actions by right-clicking a node and choosing an item from the popup menu. The actions available in the popup menu vary according to the node.

screenshot of VisualVM window

The Applications window has the following primary nodes:

Local Node

The Local node displays the name and process IDs (PID) of Java applications that are running on the same system as Java VisualVM. When you launch Java VisualVM and expand the Local node, Java VisualVM automatically displays the currently running Java applications. Java VisualVM is always listed as one of the local applications. When a new local Java application is launched, a node for that application appears under the Local node. The application node disappears when the application terminates.

If you use Java VisualVM to take thread dumps, heap dumps or profiling snapshots of an application, they are displayed as sub-nodes below the node for that application. You can right-click a dump or snapshot sub-node to save it to your local system. You can collect and archive all the information collected about an application and save it as an application snapshot.

For more information about how to view data about local applications, see the following pages:

  • Working with Local Applications
  • Working with Snapshots
  • Using the Java VisualVM Profiler

Remote Node

When Java VisualVM connects to a remote host, the remote host is listed as a node under the Remote node. When connected to a remote host, you can expand the node for the remote host to see the Java applications that are running on that host. When a Java application is launched on the remote host, a node for that application is displayed under the remote host node.

You need to explicitly add the location of remote hosts if you want Java VisualVM to be able to connect to the host. Once a remote host is added, Java VisualVM persists the address of the remote host and will make a connection to the host each time Java VisualVM is started. If you do not want Java VisualVM to connect to the host on startup, you should right-click the remote host node and choose Remove before quitting Java VisualVM.

Note: To retrieve and display information on applications running on the remote host, the jstatd utility needs to be running on the remote host. To start the utility, type jstatd on the command line. The jstatd utility is included as part of the Java Development Kit (JDK) version 6.

For more information about how to view data about remote applications, see the following pages:

  • Working with Remote Applications.
  • The jstatd man page for Solaris, Linux, or Mac OS X or Windows.

VM Coredumps

The VM Coredumps node lists open core dump binary files when you open the files in Java VisualVM. A core dump is a binary file that contains information about the runtime status of the machine at the time the core dump was taken. If you have a core dump you can then extract an overview of the system properties, a heap dump and a thread dump.

Note: The Core Dump node is only visible if Java VisualVM is running on Solaris or Linux.

For more information, see the following document:

  • Working with Core Dumps

Snapshots

The Snapshots node lists any application snapshots that are saved in the Java VisualVM userdir until they are explicitly deleted. An application snapshot captures the collected heap dumps, thread dumps and profiler snapshots of an application at the moment the snapshot is taken. You can expand the application snapshot node to see the data collected in the snapshot.

You can right-click an application snapshot node or any of the items listed under the node to open a popup menu enabling you to open, save, delete and rename the selected item.

For more information about taking and saving snapshots, see the following document:

  • Working with Snapshots
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Monitoring an Application

Java VisualVM presents data for local and remote applications in a tab specific for that application. When you open an application in Java VisualVM, each application opens in a new tab in the main window. You can have multiple application tabs open.

Monitoring an Application

You can use Java VisualVM to monitor a local application and view real-time, high-level data on the memory heap, thread activity, and the classes loaded in the Java Virtual Machine (JVM). Monitoring an application imposes low overhead and can be used for extended periods.

screenshot of Monitor tab

Monitoring data is displayed in the following graphs:

  • Heap. The Heap graph displays the total heap size and how much of the heap is currently used. These are the figures that a Java technology-based application (Java application) can obtain using the java.lang.Runtime.totalMemory() and java.lang.Runtime.freeMemory() calls.
  • PermGen. The PermGen graph displays changes in the permanent generation area over time. The permanent generation is the area of the heap where class and method objects are stored. If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.
  • Classes The Classes graph displays an overview of the total number of loaded classes and shared classes.
  • Threads. The Threads graphs displays an overview of the number of live and daemon threads in the application's JVM. You can use Java VisualVM to take a thread dump if you want to capture and view exact data on application threads at a specific point in time. For more about working with threads, see the following document:
    • Monitoring Application Threads

The Monitoring tab contains buttons that enable you to perform the following actions:

  • Perform GC. Click Perform GC to perform garbage collection immediately.
  • Heap Dump. Click Heap Dump to take a heap dump. When you take a heap dump, a tab displaying the heap dump opens in the application tab. A node for the heap dump appears under the node for the application in the Applications window. For more about working with a heap dump, see the following document:
    • Browsing a Heap Dump
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Browsing a Heap Dump

You can use Java VisualVM to browse the contents of a heap dump file and quickly see the allocated objects in the heap. Heap dumps are displayed in the heap dump sub-tab in the main window. You can open binary format heap dump files (.hprof) saved on your local system or use Java VisualVM to take heap dumps of running applications.

A heap dump is a snapshot of all the objects in the Java Virtual Machine (JVM) heap at a certain point in time. The JVM software allocates memory for objects from the heap for all class instances and arrays. The garbage collector reclaims the heap memory when an object is no longer needed and there are no references to the object. By examining the heap you can locate where objects are created and find the references to those objects in the source. If the JVM software is failing to remove unneeded objects from the heap, Java VisualVM can help you locate the nearest garbage collecting root for the object.

Opening a Heap Dump File

If you have a heap dump file saved on your local system, you can open the file in Java VisualVM by choosing File > Load from the main menu. Java VisualVM can open heap dumps saved in the .hprof file format. When you open a saved heap dump, the heap dump opens as a tab in the main window.

Taking a Heap Dump

You can use Java VisualVM to take a heap dump of a local running application. When you use Java VisualVM to take a heap dump, the file is only temporary until you explicitly save it. If you do not save the file, the file will be deleted when the application terminates.

You can take a heap dump by doing either of the following:

  • Right-click the application in the Applications window and choose Heap Dump.
  • Click Heap Dump in the Monitor tab of the application.

Heap dumps for a local application open as sub-tabs in the application's tab. The heap dump also appears as a time-stamped heap dump node under the application node in the Applications window. To save a heap dump to your local system, right-click the heap dump in the Applications window and choose Save As.

Browsing a Heap Dump

Java VisualVM enables you to visually browse heap dumps in the following views:

Summary View

When you open a heap dump, Java VisualVM displays the Summary view by default. The Summary view displays the running environment where the heap dump was taken and other system properties.

screenshot of Summary view of heap dump

Classes View

The Classes view displays a list of classes and the number and percentage of instances referenced by that class. You can view a list of the instances of a specific class by right-clicking the name and choosing Show in Instances View.

You can sort how results are displayed by clicking a column heading. You can use the filter below the list to filter the classes by name or limit the displayed results to sub-classes of a class by right-clicking a class name and choosing Show Only Subclasses.

screenshot of Classes view of heap dump

Instances View

The Instance view displays object instances for a selected class. When you select an instance from the Instance pane, Java VisualVM displays the fields of that class and references to that class in the respective panes. In the References pane, you can right-click an item and choose Show Nearest GC Root to display the nearest garbage collection root object.

screenshot of Instances view of heap dump
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Viewing Application Overview

Java VisualVM presents data for local and remote applications in a tab specific for that application. When you open an application in Java VisualVM, each application opens in a new tab in the main window. You can have multiple application tabs open.

The Overview tab is opened by default when viewing application data for local applications and remote applications.

screenshot of Overview tab

Overview

The Overview tab displays the following general information about the application and the runtime environment.

  • PID. This is the process ID of the application. The process ID is also displayed next to the application node in the Applications window.
  • Host. This is the location of the system that the application is running on.
  • Main class. The class containing the main method.
  • Arguments. Displays any options passed to the application on startup.
  • JVM. This is the JDK version of the JVM software.
  • Java Home. This is the location of the JDK software.
  • JVM flags. This displays any flags used by the JVM software when starting the JDK software.
  • Heap dump on OOME. This displays the status of the Heap Dump on OOME option. When enabled, a heap dump is taken when the application encounters an OutOfMemory exception. You can enabled or disable the option in the application popup menu.

Saved Data

This sub-tab displays application information that Java VisualVM has stored about the application.

JVM Software Arguments.

This sub-tab displays information about arguments passed to the JVM software on application startup.

System Properties

This sub-tab displays information about the system that the JVM software is running on.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Working with Remote Applications

Java VisualVM is able to access and display data about applications running on remote hosts. After connecting to a remote host, Java VisualVM can display general data about the application's runtime environment and can monitor memory heap and thread activity.

Note. Java VisualVM can retrieve monitoring information on remote applications but it cannot profile remote applications.

Connecting to a Remote Host

Connected remote hosts are displayed as nodes under the Remote node in the Applications window. When you are connected to a remote host, Java VisualVM displays applications running on the host as sub-nodes, and automatically updates the status of the remote applications, removing the applications when they stop and adding applications when they start.

To add a remote host, right-click the Remote node in the Applications window, choose Add Remote Host and type the host name or IP address in the Add Remote Host dialog box. (You can also specify a display name that will be used to refer to the host when listed under the Remote node.)

Add Remote Host dialog box

Note: To retrieve and display information on applications running on the remote host, the jstatd utility needs to be running on the remote host. To start the jstatd utility, type jstatd on the command line. The jstatd utility is included as part of Java Development Kit (JDK) version 6. For more on jstatd, see the man page for Solaris, Linux, or Mac OS X or Windows.

When Java VisualVM is connected to a remote host, a node for the remote host appears under the Remote node in the Applications window. You can expand the remote host node to view the applications running on the remote host.

Remote node in Applications window

Viewing Application Data

Java VisualVM displays data about each running remote application in a dedicated tab in the main window. To open the application tab, right-click the application node in the Applications window and choose Open. (Alternatively, you can double-click the application node.) When you click Open, the Overview tab of the application tab opens in the main window.

Overview tab of remote application

You can use the sub-tabs in the application tab to view details about the application.
For more see the following documents:

  • Viewing Application Overview
  • Monitoring an Application
  • Monitoring Application Threads
  • Connecting to JMX Agents Explicitly
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Profiling Applications

Java VisualVM presents data for local and remote applications in a tab specific for that application. You can have multiple application tabs open. Each application tab contains sub-tabs that display different types of information about the application.

Profiling applications

The Profiler tab of an application enables you to start and stop the profiling session of a local application. Profiling results are displayed in the Profiler tab. You can use the toolbar to refresh the profiling results, invoke garbage collection and save the profiling data.

By default the profiling tool is not running until you are ready to profile the application. You can choose from the following profiling options:

  • CPU Profiling. Choose this to profile the performance of the application.
  • Memory Profiling. Choose this to analyze the memory usage of the application. The results display the objects allocated by the application and the class allocating those objects.

When you start a profiling session, Java VisualVM attaches to the local application and starts collecting profiling data. When profiling results are available they are automatically displayed in the Profiler tab.

Using the toolbar

You can use the following buttons in the Profiling Results toolbar to work with profiling results:

  • Update Result Automatically. When active, the displayed profiling results are automatically updated at short intervals (about 2 seconds).
  • Update Result Now. Click to update results immediately.
  • Run Garbage Collection. Click to run garbage collection.
  • Reset Collected Results. Click to discard the already accumulated profiling results.
  • Take Snapshot. Click to take a snapshot of the current profile data. When you take a snapshot, the snapshot is opened in a new sub-tab.
  • Save Current View. Click to save the current view of the profiling results as a .png image file. When you click the button you are prompted to choose the location where you want to save the image.

Filtering profiling results

The filter box below the profiling results enables you to filter the displayed results according to the name of the method. To filter the results, enter a term in the method name filter box, select which filtering method to use and press Return. You can see and select previous filter terms by clicking the arrow to the right of the method name filter box.

Modifying profiling settings

The Java VisualVM profiling tool supplies default settings for profiling applications. You can view the default settings by selecting the Settings checkbox in the Profiler tab. You can modify the profiling settings when no profiling session is in progress.

CPU Profiling

This profile command returns detailed data on method-level CPU performance (execution time), showing the total execution time and number of invocations for each method. When analyzing application performance, Java VisualVM instruments all of the methods of the profiled application. Threads emit the "method entry" event when entering a method and generate the corresponding "method exit" event when exiting the method. Both of these events contain timestamps. This data is processed in real time.

Screenshot of Profiler tab showing CPU profiling results

screenshot of Profiler tab showing CPU profiling

Screenshot of Profiler tab showing CPU profiling settings

screenshot of Profiler tab showing CPU profiling

Memory Profiling

When you analyse memory usage, Java VisualVM starts instrumenting the loaded classes and displays the total number of objects allocated by each class (including array classes) in a table. For each class currently loaded class in the Java Virtual Machine (JVM), the profiling results display the size and number of objects allocated since the profiling session started. The results are automatically updated as new objects are allocated and as new classes are loaded.

Java VisualVM displays the number of objects as an absolute number and as a percentage. The bytes allocated are also displayed as a graph representing the percentage of bytes as well as the total number of bytes allocated by each class.

Screenshot of Profiler tab showing memory profiling results

screenshot of Profiler tab showing memory profiling

Screenshot of Profiler tab showing memory profiling settings

screenshot of Profiler tab showing memory profiling settings

Taking Profiler Snapshots

Java VisualVM enables you to take profiler snapshots to capture the results of a profiling session. A profiler snapshot captures the results at the moment the snapshot is taken. To take a snapshot, click the Take Snapshot of Collected Results button in the toolbar while a profiling session is in progress. When you take the snapshot, the snapshot opens as a tab in the application tab. A node for the snapshot also appears under the application node in the Applications window.

Screenshot of memory profiling snapshot

screenshot of memory profiling snapshot

Screenshot of CPU profiling snapshot

screenshot of CPU profiling snapshot

For more about profiler snapshots, see the following document:

  • Working with Snapshots
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Documentation Contents

Java VisualVM - Working with Local Applications

When you start Java VisualVM, a node for each local Java application is displayed under the Local node in the Applications window. You can expand an application node to see the profiler snapshots, thread dumps and heap dumps of the application. Right-clicking an application node or sub-node invokes a popup menu enabling you to choose various actions.
Note: The list of local applications always includes Java VisualVM.

screenshot of VisualVM Applications window showing popup menu options

A local application node generally has the following items available in the popup menu.

  • Open. Opens the tab for the application in the main window where you can view application data.
  • Thread Dump. Takes a thread dump for the application.
  • Heap Dump. Takes a heap dump for the application.
  • Profile. Opens the Profiler sub-tab for the application where you can choose to profile the application. (Note that even though Java VisualVM appears in the application tree, Java VisualVM cannot profile itself).
  • Profiler Snapshot. Creates a snapshot of the results from the profiling session. The snapshot opens in the main window and a node for the snapshot appears under the application node. This command is only available when Java VisualVM is profiling the application.
  • Application Snapshot. Creates an application snapshot containing all application dumps and snapshots. A node for the application snapshot appears under the Snapshots node.
  • Enable Heap Dump on OOME. Select this if you want Java VisualVM to automatically take a heap dump when the application encounters an OutOfMemoryException.

You can perform the following tasks directly from the popup menu.

View Application Data

Java VisualVM displays data about each running local application in a dedicated tab in the main window. Each application tab has sub-tabs where information about that application is displayed.

To open the application tab, right-click the application node in the Applications window and choose Open. (Alternatively, double-click the application node.) When you click Open, the Overview tab of the application tab opens in the main window.

The application tab for a local application has the following sub-tabs:

  • Overview. For more, see Viewing Application Overview
  • Monitor. For more, see Monitoring an Application
  • Threads. For more, see Monitoring Application Threads
  • Profiler. For more, see Profiling Applications

Additional tabs and sub-tabs may be visible depending on the installed plugins.

Take a Thread Dump

You can use Java VisualVM to take a thread dump to capture information about the active application threads at the time you take the thread dump. When you take a thread dump, the thread dump opens in a sub-tab of the application in the main window. A node for the thread dump appears under the application node in the Applications window.

You can take a thread dump in the following ways:

  • Right-click the application node in the Applications window and choose Thread Dump.
  • Click the Thread Dump button in the Threads tab of the application tab.

When you take a thread dump, the thread dump opens in a sub-tab of the application in the main window. A node for the thread dump appears under the application node.

For more about working with application threads, see the following document:

  • Monitoring Application Threads

Take a Heap Dump

You can take a heap dump of a local application to capture a snapshot of the objects on the heap.

You can take a heap dump in the following ways:

  • Right-click the application node in the Applications window and choose Heap Dump.
  • Click the Heap Dump button in the Monitor tab of the application tab.

When you take a heap dump, the heap dump opens in a sub-tab of the application in the main window. A node for the heap dump appears under the application node.

For more about working with the heap, see the following document:

  • Browsing a Heap Dump

Profile an Application

Java VisualVM includes a profiler that enables you to analyze the performance and memory usage of a local application. You can profile an application without restarting it. To start a profiling session, right-click the application node and choosing Profile from the popup menu to open the profiling tab.
Note: Java VisualVM cannot be used to Profile itself.

For more see the following document:

  • Profiling Applications

Take Snapshots

Java VisualVM enables you to take snapshots that capture application data at the time the snapshot is taken. You can save snapshots to your local system and then examine them later or send them to others.

Java VisualVM enables you to take the following types of snapshots:

  • Profiler snapshots. A profiler snapshot captures the profiling data at the moment the snapshot is takes. The snapshot is either a memory snapshot or a CPU snapshot. You can take a profiler snapshot only when you are profiling an application.
  • Application snapshots. An application snapshot is an archive that contains all the heap dumps, thread dumps and snapshots that are listed below the application node.

For more see the following document:

  • Working with Snapshots
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Working with Snapshots

Java VisualVM enables you to take snapshots of application data and save the snapshots to your local system. Snapshots are a convenient way to capture data about an application because after a snapshot is saved it can be opened and viewed at any time. The target application does not need to be running to view the snapshot. Snapshots can also be sent and viewed by other people.

Snapshot Types

Snapshots are basically archives of data captured at a point in time that can then be opened in Java VisualVM. You can take and save the following types of snapshots:

Profiler Snapshots

Profiler snapshots capture profiling data at the moment the snapshot is taken. You can take a profiler snapshot at any time during a profiling session. When you take a profiler snapshot, a node representing the snapshot appears below the application node in the Applications window and a temporary snapshot file is written to your local system in the Java VisualVM userdir.

Java VisualVM can take the following types of profiler snapshots

  • Memory Snapshot. A memory snapshot captures profiling data on allocated objects. You can take a memory snapshot when you are using the profiler to analyze memory usage.
  • CPU Snapshot. A CPU snapshot captures data on the performance of the application. You can take a CPU snapshot when you are using the profiler to analyze application performance.

Screenshot of memory profiling snapshot

screenshot of memory profiling snapshot

Screenshot of CPU profiling snapshot

screenshot of CPU profiling snapshot

If you want to view a profiler snapshot later, the snapshot must be explicitly saved to your local system, either as a profiler snapshot or archived in an application snapshot.

Taking Profiler Snapshots

You can take a profiler snapshot during a profiling session. When you take a memory or CPU snapshot, the snapshot opens in the application's tab in the main window.

To take a snapshot, do one of the following:

  • Click the Take Snapshot of Collected Results button in the Profiler tab
  • Right-click the application node and choose Profiler Snapshot.

The snapshot toolbar enables you to do the following:

  • Save Snapshot to Custom File. Click to save snapshot as Snapshot file (.nps to your local system).
  • Save Current View to Image. Click to save snapshot as an image (.png to your local system)
  • Find in Results. Click to find a search term in the profiling results.
  • Find Next Occurence. Click to find next occurrence of search term
  • Find Previous Occurence. Click to find previous occurrence of search term

Application Snapshots

An application snapshot captures the collected heap dumps, thread dumps and profiler snapshots of an application at the moment the snapshot is taken. An application snapshot also captures general information about the Java Virtual Machine (JVM).

You take an application snapshot by right-clicking an application node in the Applications window and choosing Application Snapshot from the popup menu. Application snapshots are persisted between Java VisualVM sessions.

When you take an application snapshot:

  • An application snapshot node appears under the Snapshots node in the Applications window
  • Application data is saved in a folder in the the repository/snapshots folder in the Java VisualVM user dir

Application snapshots are listed under the Snapshots node in the Applications window. Expand the application snapshot node to view the contents of the snapshot.

screenshot of Applications window showing application snapshots

After you take an application snapshot, you can view and modify the contents by expanding the application snapshot node in the Applications window. You can right-click an application snapshot node or any of the items listed under the application snapshot node to open the popup menu where you can choose to open, save, rename and delete the item. You can then save the application snapshot as a single application snapshot archive (.apps) to your local system.

The Overview tab of an application snapshot captures data about the JVM software.

screenshot of Overview tab of an application snapshot
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java VisualVM

Working with Core Dumps

When you start Java VisualVM, the Applications window is visible in the left of the Java VisualVM window. The Applications window enables you to quickly view running local and remote applications. The Applications also displays core dumps and profiling snapshots saved to your local system.

The Core Dump node is visible in the Applications window if Java VisualVM is running on Solaris or Linux. Generally, Java VisualVM can only open a core dump if the core dump was taken on the same machine. A core dump contains informaton on the Java Development Kit (JDK) and kernel of the machine where the core dump was taken. To open the core dump in Java VisualVM, this information must match the JDK software and kernel of the local system.

A core dump is a binary file capturing the entire heap contents at the moment the dump is captured. When you load a core dump in Java VisualVM, a node for the core dump appears below the Core Dump node.

screenshot of Applications window showing Core Dump node

To view an overview of the core dump, right-click the core dump node and choose Open. (Alternatively, double-click the node.)

screenshot of Overview tab of core dump

You can right-click the core dump node and choose Heap Dump or Thread Dump to view the heap dump and thread dump from the core dump.

screenshot of Overview tab of core dump

You can then save the thread dump and heap dump to your local system.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


VisualVM

Documentation Contents

Java VisualVM

Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a Java Virtual Machine (JVM), and for troubleshooting and profiling these applications. Various optional tools, including Java VisualVM, are provided with the Java Development Kit (JDK) for retrieving different types of data about running JVM software instances. For example, most of the previously standalone tools JConsole, jstat, jinfo, jstack, and jmap are part of Java VisualVM. Java VisualVM federates these tools to obtain data from the JVM software, then re-organizes and presents the information graphically, to enable you to view different data about multiple Java applications uniformly, whether they are running locally or on remote machines. Furthermore, developers can extend Java VisualVM to add new functionality by creating and posting plug-ins to the tool's built-in update center.

Java VisualVM can be used by Java application developers to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, browse the platform's MBeans and perform operations on those MBeans, perform and monitor garbage collection, and perform lightweight memory and CPU profiling.

Java VisualVM was first bundled with the the Java platform, Standard Edition (Java SE) in JDK version 6, update 7.

Overview

  • The following documents provide an introduction to Java VisualVM.
    • Introduction to Java VisualVM
      • Using the Applications Window
      • Working with Local Applications
        • Viewing Application Overview
        • Monitoring an Application
        • Monitoring Application Threads
        • Profiling Applications
        • Connecting to JMX Agents Explicitly
      • Working with Remote Applications
        • Viewing Application Overview
        • Monitoring an Application
        • Monitoring Application Threads
        • Connecting to JMX Agents Explicitly
      • Working with Coredumps
      • Working with Snapshots
      • Browsing a Heap Dump
  • The following pages provide information about optional plug-ins that are currently available for Java VisualVM. These plug-ins are evolving outside of the JDK platform's update cycle, so consequently these pages are hosted on Java.Net.
    • Working with MBeans
    • JConsole Plug-In Wrapper Tab

Tools

  • jvisualvm - the man page for Java VisualVM for Solaris, Linux, or Mac OS X or Windows.

Tutorials and Programmer's Guides

  • Getting Started Extending Java VisualVM - An introduction to the Java VisualVM APIs, providing details of how to write extensions for Java VisualVM to create customized monitoring, troubleshooting and profiling services for your applications. This document is hosted on Java.Net.
  • VisualVM API FAQs - This page is hosted on Java.Net.

More Information

  • Java VisualVM Developers' Site
  • Java SE Platform Monitoring and Management documentation
  • Troubleshooting the Java SE Platform
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Class Data Sharing

Overview

Class data sharing (CDS) helps reduce the startup time for Java programming language applications, in particular smaller applications, as well as reduce footprint. When the JRE is installed on 32-bit platforms using the installer, the installer loads a set of classes from the system jar file into a private internal representation, and dumps that representation to a file, called a "shared archive". Class data sharing is not supported in Microsoft Windows 95/98/ME. If the JRE installer is not being used, this can be done manually, as explained below. During subsequent JVM invocations, the shared archive is memory-mapped in, saving the cost of loading those classes and allowing much of the JVM's metadata for these classes to be shared among multiple JVM processes.

Class data sharing is supported only with the Java HotSpot Client VM, and only with the serial garbage collector.

The primary motivation for including CDS in Java SE is the decrease in startup time it provides. CDS produces better results for smaller applications because it eliminates a fixed cost: that of loading certain core classes. The smaller the application relative to the number of core classes it uses, the larger the saved fraction of startup time.

The footprint cost of new JVM instances has been reduced in two ways. First, a portion of the shared archive, currently between five and six megabytes, is mapped read-only and therefore shared among multiple JVM processes. Previously this data was replicated in each JVM instance. Second, since the shared archive contains class data in the form in which the Java Hotspot VM uses it, the memory which would otherwise be required to access the original class information in rt.jar is not needed. These savings allow more applications to be run concurrently on the same machine. On Microsoft Windows, the footprint of a process, as measured by various tools, may appear to increase, because a larger number of pages are being mapped in to the process' address space. This is offset by the reduction in the amount of memory (inside Microsoft Windows) which is needed to hold portions on rt.jar. Reducing footprint remains a high priority.

Regenerating the Shared Archive

Under some circumstances the system administrator may need to manually regenerate the shared archive. This is typically only necessary on Solaris if the Java SE packages were installed over the network to a machine of a different architecture than that performing the installation. Regardless, these regeneration instructions apply to all supported platforms.

The shared archive file is colocated with the shared library for the JVM. On Solaris, Linux, or Mac OS X platforms, it is stored in jre/lib/[arch]/client/classes.jsa and on Microsoft Windows platforms in jre/bin/client/classes.jsa. If this file exists, it must be manually removed before regeneration.

To regenerate the archive, log in as the administrator; in networked situations, log on to a machine of the same architecture as the Java SE installation and ensure that you have permission to write to the installation directory. Then execute the command

java -Xshare:dump Diagnostic information will be printed as the archive is generated.

Manually Controlling Class Data Sharing

The class data sharing feature is automatically enabled when conditions allow it to be used. The following command line options are present primarily for diagnostic and debugging purposes and may change or be removed in future releases.

-Xshare:off
Disable class data sharing.
-Xshare:on
Require class data sharing to be enabled. If it could not be enabled for various reasons, print an error message and exit.
-Xshare:auto
The default; enable class data sharing whenever possible.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Concurrent Mark Sweep Collector Enhancements

  • Description
  • System.gc() Performed Concurrently
  • Larger Default Young Generation Size
  • Parallel Marking
  • More Information

Description

The concurrent mark sweep collector, also known as the concurrent collector or CMS, is targeted at applications that are sensitive to garbage collection pauses. It performs most garbage collection activity concurrently, i.e., while the application threads are running, to keep garbage collection-induced pauses short. The key performance enhancements made to the CMS collector in JDK 6 are outlined below. See the documents referenced below for more detailed information on these changes, the CMS collector, and garbage collection in HotSpot.

Note that these features only apply when the CMS collector is in use; the option -XX:+UseConcMarkSweepGC selects the CMS collector.

System.gc() Performed Concurrently

The System.gc() and Runtime.getRuntime().gc() methods instruct the JVM to run the garbage collector to recycle unused objects. The HotSpot implementation of these methods currently stops all application threads to collect the entire heap, which can result in a lengthy pause particularly when the heap is large. This works against the goal of the CMS collector to keep pauses short.

In JDK 6, the CMS collector can optionally perform these collections concurrently, to avoid a lengthy pause in response to a System.gc() or Runtime.getRuntime().gc() call. To enable this feature, add the option

-XX:+ExplicitGCInvokesConcurrent

to the java command line.

Larger Default Young Generation Size

Several changes were made that increase the default size of the young generation when the CMS collector is used:

  • the minimum young generation size was increased from 4MB to 16MB.
  • the proportion of the overall heap used for the young generation was increased from 1/15 to 1/7.
  • the survivor spaces are now used by default, and their default size was increased. (In prior releases the survivor spaces were disabled by default with the CMS collector.)

The primary effect of these changes is to improve application performance by reducing garbage collection overhead. However, because the default young generation size is larger, applications may also see larger young generation pause times and a larger memory footprint. If necessary, please see the documents referenced below for more details on generations, survivor spaces and the options available for adjusting their sizes.

Parallel Marking

The CMS collector now uses multiple threads to perform the concurrent marking task in parallel on platforms with multiple processors. This reduces the duration of the concurrent marking cycle, allowing the collector to support applications with larger numbers of threads and higher object allocation rates, particularly on large multiprocessor machines. Prior releases used only a single thread for concurrent marking, limiting the collector's ability to keep up with applications with very high object allocation rates.

More Information

The HotSpot memory management whitepaper provides more detail about the CMS collector and the other collectors available in HotSpot, as well as descriptions of the generations, survivor spaces and other memory management concepts.

The HotSpot documentation page contains links to Garbage Collection Tuning Guides, specific to each release, which include guidelines for choosing the garbage collector that best suits your application and techniques that can help reduce garbage collection overhead.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


DTrace Probes in HotSpot VM

  • Overview
  • The hotspot Provider
    • VM Lifecycle Probes
    • Thread Lifecycle Probes
    • Classloading Probes
    • Garbage Collection Probes
    • Method Compilation Probes
    • Monitor Probes
    • Application Tracking Probes
  • The hotspot_jni Provider
  • Reference

Overview

With the introduction of DTrace on Solaris 10, DTrace support has been added to the Java SE 6 HotSpot VM. The hotspot and hotspot_jni providers make available probes that can be used to monitor JVM internal state and activities as well as the Java application that is running. All of the probes are USDT probes and are accessed using the process-id of the JVM process. The probe details are listed in the next section, and the API is provided in the reference section.

The hotspot Provider

The hotspot provider makes available probes that can be used to track the lifespan of the VM, thread start and stop events, GC and memory pool statistics, method compilations, and monitor activity. With a startup flag, additional probes are enabled which can be used to monitor the running Java program, such as method enter and return probes, and object allocations. All of the hotspot probes originate in the VM library (libjvm.so), so they are also provided from programs which embed the VM.

Many of the probes in the provider have arguments that can be examined to provide further details on the state of the VM. Many of these probes' arguments are opaque IDs which can be used to link probe firings to each other, however strings and other data are also provided. When string values are provided, they are always present as a pair: a pointer to unterminated modified UTF-8 data (see JVM spec :4.4.7) , and a length value which indicates the extent of that data. Because the string data (even when none of the characters are outside the ASCII range) is not guaranteed to be terminated by a NUL character, it is necessary to use the length-terminated copyinstr() intrinsic to read the string data from the process.

VM Life-cycle Probes

The probes that relate to the VM life-cycle are indicated below. None have any arguments at this time.

Probe | Description
vm-init-begin | Probe that fires just as the VM initialization begins
vm-init-end | Probe that fires when the VM initialization finishes, and the VM is ready to start running application code
vm-shutdown | Probe that fires as the VM is shutting down due to program termination or an error

Thread Lifecycle Probes

Two probes are available for tracking thread start and stop events.

Probe | Description
thread-start | Probe that fires when a thread is started. Provides the arguments listed below
thread-stop | Probe that fires when the thread has completed. Provides the arguments listed below

Each of these probes has the following arguments:

Probe Arguments | Description
args[0] | A pointer to UTF-8 string data which contains the thread name
args[1] | The length of the thread name data (in bytes)
args[2] | The Java thread ID. This is the value that will match other HotSpot VM probes which contain a thread argument
args[3] | The native/OS thread ID. This is the ID assigned by the host operating system
args[4] | A boolean value which indicates if this thread is a daemon or not. A value of 0 indicates a non-daemon thread

Classloading Probes

Two probes are available for tracking class loading and unloading activity.

Probe | Description
class-loaded | Probe that fires when a class has been loaded
class-unloaded | Probe that fires when a class has been unloaded from the system

Each of these probes has the following arguments:

Probe Arguments | Description
args[0] | A pointer to UTF-8 string data which contains the name of the class that was loaded
args[1] | The length of the class name data (in bytes)
args[2] | The class loader ID, which is a unique identifier for a class loader in the VM. This is the class loader that loaded the class
args[3] | A boolean value which indicates if the class is a shared class (if the class was loaded from the shared archive)

Garbage Collection Probes

Probes are available that can be used to measure the duration of a system-wide garbage collection cycle (for those garbage collectors that have a defined begin and end). Each memory pool can be tracked independently. The probes for individual pools pass the memory manager's name, the pool name, and pool usage information at both the begin and end of pool collection.

The provided GC-related probes are:

Probe | Description
gc-begin | Probe that fires when a system-wide collection is about to start. It's one argument (arg[0]) is a boolean value which indicates if this is to be a Full GC.
gc-end | Probe that fires when a system-wide collection has completed. No arguments.
mem-pool-gc-begin | Probe that fires when an individual memory pool is about to be collected. Provides the arguments listed below
mem-pool-gc-end | Probe that fires after an individual memory pool has been collected. Provides the arguments listed below

Memory pool probe arguments:

Probe Arguments | Description
args[0] | A pointer to UTF-8 string data which contains the name of the manager which manages this memory pool
args[1] | The length of the manager name data (in bytes)
args[2] | A pointer to UTF-8 string data which contains the name of the memory pool
args[3] | The length of the memory pool name data (in bytes)
args[4] | The initial size of the memory pool (in bytes)
args[5] | The amount of memory in use in the memory pool (in bytes)
args[6] | The number of committed pages in the memory pool
args[7] | The maximum size of the memory pool

Method Compilation Probes

Probes are available to indicate which methods are being compiled and by which compiler. Probes are also available to track the installing and uninstalling of compiled methods.

Probes that mark the begin and end of method compilation:

Probe | Description
method-compile-begin | Probe that fires as method compilation begins. Provides the arguments listed below
method-compile-end | Probe that fires when method compilation completes. In addition to the arguments listed below, argv[8] is a boolean value which indicates if the compilation was successful

Method compilation probe arguments:

Probe Arguments | Description
args[0] | A pointer to UTF-8 string data which contains the name of the compiler which is compiling this method
args[1] | The length of the compiler name data (in bytes)
args[2] | A pointer to UTF-8 string data which contains the name of the class of the method being compiled
args[3] | The length of the class name data (in bytes)
args[4] | A pointer to UTF-8 string data which contains the name of the method being compiled
args[5] | The length of the method name data (in bytes)
args[6] | A pointer to UTF-8 string data which contains the signature of the method being compiled
args[7] | The length of the signature data (in bytes)

When compiled methods are installed for execution or uninstalled, the following probes are fired:

Probe | Description
compiled-method-load | Probe that fires when a compiled method is installed. In addition to the arguments listed below, argv[6] contains a pointer to the compiled code, and argv[7] is the size of the compiled code
compiled-method-unload | Probe that fires when a compiled method is uninstalled. Provides the arguments listed below

Compiled method loading probe arguments:

Probe Arguments | Description
args[0] | A pointer to UTF-8 string data which contains the name of the class of the method being installed
args[1] | The length of the class name data (in bytes)
args[2] | A pointer to UTF-8 string data which contains the name of the method being installed
args[3] | The length of the method name data (in bytes)
args[4] | A pointer to UTF-8 string data which contains the signature of the method being installed
args[5] | The length of the signature data (in bytes)

Monitor Probes

As the Java application runs, threads will enter and exit monitors, wait on monitors, and perform notifications. Probes are available for all wait and notification events, as well as for contended monitor entry and exit events. A contended monitor entry is the situation where a thread attempts to enter a monitor when another thread is already in the monitor. A contended monitor exit event occurs when a thread leaves a monitor and other threads are waiting to enter to the monitor. Thus, contended enter and contended exit events may not match up to each other in relation to the thread that encounters these events, though it is expected that a contended exit from one thread should match up to a contended enter on another thread (the thread waiting to enter the monitor).

All monitor events provide the thread ID, a monitor ID, and the type of the class of the object as arguments. It is expected that the thread and the class will help map back to the Java program, while the monitor ID can provide matching information between probe firings.

Since the existence of these probes in the VM causes performance degradation, they will only fire if the VM flag -XX:+ExtendedDTraceProbes is set on the java command line. This flag can be turned on and off dynamically at runtime by using the jinfo utility.

If the above flag is off, the monitor probes are still present in the probe listing obtainable from dtrace, but will remain dormant and will never fire. It is intended that this restriction be removed in future releases of the VM, where these probes will be enabled all the time with no impact to performance.

The available probes:

Probe | Description
monitor-contended-enter | Probe that fires as a thread attempts to enter a contended monitor
monitor-contended-entered | Probe that fires when a thread successfully enters the contended monitor
monitor-contended-exit | Probe that fires when a thread leaves a monitor and other threads are waiting to enter
monitor-wait | Probe that fires as a thread begins a wait on a monitor via Object.wait(). The probe has an additional argument, args[4] which is a 'long' value which indicates the timeout being used.
monitor-waited | Probe that fires when a thread completes an Object.wait().
monitor-notify | Probe that fires when a thread calls Object.notify() to notify waiters on a monitor
monitor-notifyAll | Probe that fires when a thread calls Object.notifyAll() to notify waiters on a monitor

Monitor probe arguments:

Probe Arguments | Description
args[0] | The Java thread identifier for the thread performing the monitor operation
args[1] | A unique, but opaque identifier for the specific monitor that the action is performed upon
args[2] | A pointer to UTF-8 string data which contains the class name of the object being acted upon
args[3] | The length of the class name data (in bytes)

Application Tracking Probes

A few probes are provided to allow fine-grained examination of Java thread execution. These consist of probes that fire anytime a method is entered or returned from, as well as a probe that fires whenever a Java object has been allocated.

Since the existence of these probes in the VM causes performance degradation, they will only fire if the VM has the ExtendedDTraceProbes flag enabled. By default the probes are all present in any listing of the probes in the VM, but are dormant without the appropriate flag. It is intended that this restriction be removed in future releases of the VM, where these probes will be enabled all the time with no impact to performance.

The method entry and return probes:

Probe | Description
method-entry | Probe that fires when a method is being entered.
method-return | Probe that fires when a method returns, either normally or due to an exception.

Method probe arguments:

Probe Arguments | Description
args[0] | The Java thread ID of the thread that is entering or leaving the method
args[1] | A pointer to UTF-8 string data which contains the name of the class of the method
args[2] | The length of the class name data (in bytes)
args[3] | A pointer to UTF-8 string data which contains the name of the method
args[4] | The length of the method name data (in bytes)
args[5] | A pointer to UTF-8 string data which contains the signature of the method
args[6] | The length of the signature data (in bytes)

The available allocation probe:

Probe | Description
object-alloc | Probe that fires when any object is allocated, provided that the ExtendedDTraceProbes flag is enabled.

The object allocation probe has the following arguments:

Probe Arguments | Description
args[0] | The Java thread ID of the thread that is allocating the object
args[1] | A pointer to UTF-8 string data which contains the class name of the object being allocated
args[2] | The length of the class name data (in bytes)
args[3] | The size of the object being allocated

The hotspot_jni Provider

In order to call from native code to Java code, due to embedding of the VM in an application or execution of native code within a Java application, the native code must make a call through the JNI interface. The JNI interface provides a number of methods for invoking Java code and examining the state of the VM. DTrace probes are provided at the entry point and return point for each of these methods. The probes are provided by the hotspot_jni provider. The name of the probe is the name of the JNI method, appended with "-entry" for entry probes, and "-return" for return probes. The arguments available at each entry probe are the arguments that were provided to the function (with the exception of the Invoke* methods, which omit the arguments that are passed to the Java method). The return probes have the return value of the method as an argument (if available).

Reference

provider hotspot {
  probe vm-init-begin();
  probe vm-init-end();
  probe vm-shutdown();
  probe class-loaded(
      char* class_name, uintptr_t class_name_len, uintptr_t class_loader_id, bool is_shared);
  probe class-unloaded(
      char* class_name, uintptr_t class_name_len, uintptr_t class_loader_id, bool is_shared);
  probe gc-begin(bool is_full);
  probe gc-end();
  probe mem-pool-gc-begin(
      char* mgr_name, uintptr_t mgr_name_len, char* pool_name, uintptr_t pool_name_len,
      uintptr_t initial_size, uintptr_t used, uintptr_t committed, uintptr_t max_size);
  probe mem-pool-gc-end(
      char* mgr_name, uintptr_t mgr_name_len, char* pool_name, uintptr_t pool_name_len,
      uintptr_t initial_size, uintptr_t used, uintptr_t committed, uintptr_t max_size);
  probe thread-start(
      char* thread_name, uintptr_t thread_name_length,
      uintptr_t java_thread_id, uintptr_t native_thread_id, bool is_daemon);
  probe thread-stop(
      char* thread_name, uintptr_t thread_name_length,
      uintptr_t java_thread_id, uintptr_t native_thread_id, bool is_daemon);
  probe method-compile-begin(
      char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len);
  probe method-compile-end(
      char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len,
      bool is_success);
  probe compiled-method-load(
      char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len,
      void* code, uintptr_t code_size);
  probe compiled-method-unload(
      char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len);
  probe monitor-contended-enter(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe monitor-contended-entered(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe monitor-contended-exit(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe monitor-wait(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len,
      uintptr_t timeout);
  probe monitor-waited(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe monitor-notify(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe monitor-notifyAll(
      uintptr_t java_thread_id, uintptr_t monitor_id,
      char* class_name, uintptr_t class_name_len);
  probe method-entry(
      uintptr_t java_thread_id, char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len);
  probe method-return(
      uintptr_t java_thread_id, char* class_name, uintptr_t class_name_len,
      char* method_name, uintptr_t method_name_len,
      char* signature, uintptr_t signature_len);
  probe object-alloc(
      uintptr_t java_thread_id, char* class_name, uintptr_t class_name_len,
      uintptr_t size);
};

provider hotspot_jni {
  probe AllocObject-entry(void*, void*);
  probe AllocObject-return(void*);
  probe AttachCurrentThreadAsDaemon-entry(void*, void**, void*);
  probe AttachCurrentThreadAsDaemon-return(uint32_t);
  probe AttachCurrentThread-entry(void*, void**, void*);
  probe AttachCurrentThread-return(uint32_t);
  probe CallBooleanMethodA-entry(void*, void*, uintptr_t);
  probe CallBooleanMethodA-return(uintptr_t);
  probe CallBooleanMethod-entry(void*, void*, uintptr_t);
  probe CallBooleanMethod-return(uintptr_t);
  probe CallBooleanMethodV-entry(void*, void*, uintptr_t);
  probe CallBooleanMethodV-return(uintptr_t);
  probe CallByteMethodA-entry(void*, void*, uintptr_t);
  probe CallByteMethodA-return(char);
  probe CallByteMethod-entry(void*, void*, uintptr_t);
  probe CallByteMethod-return(char);
  probe CallByteMethodV-entry(void*, void*, uintptr_t);

  probe CallByteMethodV-return(char);
  probe CallCharMethodA-entry(void*, void*, uintptr_t);
  probe CallCharMethodA-return(uint16_t);
  probe CallCharMethod-entry(void*, void*, uintptr_t);
  probe CallCharMethod-return(uint16_t);
  probe CallCharMethodV-entry(void*, void*, uintptr_t);
  probe CallCharMethodV-return(uint16_t);
  probe CallDoubleMethodA-entry(void*, void*, uintptr_t);
  probe CallDoubleMethodA-return(double);
  probe CallDoubleMethod-entry(void*, void*, uintptr_t);
  probe CallDoubleMethod-return(double);
  probe CallDoubleMethodV-entry(void*, void*, uintptr_t);
  probe CallDoubleMethodV-return(double);
  probe CallFloatMethodA-entry(void*, void*, uintptr_t);
  probe CallFloatMethodA-return(float);
  probe CallFloatMethod-entry(void*, void*, uintptr_t);
  probe CallFloatMethod-return(float);
  probe CallFloatMethodV-entry(void*, void*, uintptr_t);
  probe CallFloatMethodV-return(float);
  probe CallIntMethodA-entry(void*, void*, uintptr_t);
  probe CallIntMethodA-return(uint32_t);
  probe CallIntMethod-entry(void*, void*, uintptr_t);
  probe CallIntMethod-return(uint32_t);
  probe CallIntMethodV-entry(void*, void*, uintptr_t);
  probe CallIntMethodV-return(uint32_t);
  probe CallLongMethodA-entry(void*, void*, uintptr_t);
  probe CallLongMethodA-return(uintptr_t);
  probe CallLongMethod-entry(void*, void*, uintptr_t);
  probe CallLongMethod-return(uintptr_t);
  probe CallLongMethodV-entry(void*, void*, uintptr_t);
  probe CallLongMethodV-return(uintptr_t);
  probe CallNonvirtualBooleanMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualBooleanMethodA-return(uintptr_t);
  probe CallNonvirtualBooleanMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualBooleanMethod-return(uintptr_t);
  probe CallNonvirtualBooleanMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualBooleanMethodV-return(uintptr_t);
  probe CallNonvirtualByteMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualByteMethodA-return(char);
  probe CallNonvirtualByteMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualByteMethod-return(char);
  probe CallNonvirtualByteMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualByteMethodV-return(char);
  probe CallNonvirtualCharMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualCharMethodA-return(uint16_t);
  probe CallNonvirtualCharMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualCharMethod-return(uint16_t);
  probe CallNonvirtualCharMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualCharMethodV-return(uint16_t);
  probe CallNonvirtualDoubleMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualDoubleMethodA-return(double);
  probe CallNonvirtualDoubleMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualDoubleMethod-return(double);
  probe CallNonvirtualDoubleMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualDoubleMethodV-return(double);
  probe CallNonvirtualFloatMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualFloatMethodA-return(float);
  probe CallNonvirtualFloatMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualFloatMethod-return(float);
  probe CallNonvirtualFloatMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualFloatMethodV-return(float);
  probe CallNonvirtualIntMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualIntMethodA-return(uint32_t);
  probe CallNonvirtualIntMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualIntMethod-return(uint3t);
  probe CallNonvirtualIntMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualIntMethodV-return(uint32_t);
  probe CallNonvirtualLongMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualLongMethodA-return(uintptr_t);
  probe CallNonvirtualLongMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualLongMethod-return(uintptr_t);
  probe CallNonvirtualLongMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualLongMethodV-return(uintptr_t);
  probe CallNonvirtualObjectMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualObjectMethodA-return(void*);
  probe CallNonvirtualObjectMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualObjectMethod-return(void*);
  probe CallNonvirtualObjectMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualObjectMethodV-return(void*);
  probe CallNonvirtualShortMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualShortMethodA-return(uint16_t);
  probe CallNonvirtualShortMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualShortMethod-return(uint16_t);
  probe CallNonvirtualShortMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualShortMethodV-return(uint16_t);
  probe CallNonvirtualVoidMethodA-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualVoidMethodA-return();
  probe CallNonvirtualVoidMethod-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualVoidMethod-return();
  probe CallNonvirtualVoidMethodV-entry(void*, void*, void*, uintptr_t);
  probe CallNonvirtualVoidMethodV-return();
  probe CallObjectMethodA-entry(void*, void*, uintptr_t);
  probe CallObjectMethodA-return(void*);
  probe CallObjectMethod-entry(void*, void*, uintptr_t);
  probe CallObjectMethod-return(void*);
  probe CallObjectMethodV-entry(void*, void*, uintptr_t);
  probe CallObjectMethodV-return(void*);
  probe CallShortMethodA-entry(void*, void*, uintptr_t);
  probe CallShortMethodA-return(uint16_t);
  probe CallShortMethod-entry(void*, void*, uintptr_t);
  probe CallShortMethod-return(uint16_t);
  probe CallShortMethodV-entry(void*, void*, uintptr_t);
  probe CallShortMethodV-return(uint16_t);
  probe CallStaticBooleanMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticBooleanMethodA-return(uintptr_t);
  probe CallStaticBooleanMethod-entry(void*, void*, uintptr_t);
  probe CallStaticBooleanMethod-return(uintptr_t);
  probe CallStaticBooleanMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticBooleanMethodV-return(uintptr_t);
  probe CallStaticByteMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticByteMethodA-return(char);
  probe CallStaticByteMethod-entry(void*, void*, uintptr_t);
  probe CallStaticByteMethod-return(char);
  probe CallStaticByteMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticByteMethodV-return(char);
  probe CallStaticCharMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticCharMethodA-return(uint16_t);
  probe CallStaticCharMethod-entry(void*, void*, uintptr_t);
  probe CallStaticCharMethod-return(uint16_t);
  probe CallStaticCharMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticCharMethodV-return(uint16_t);
  probe CallStaticDoubleMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticDoubleMethodA-return(double);
  probe CallStaticDoubleMethod-entry(void*, void*, uintptr_t);
  probe CallStaticDoubleMethod-return(double);
  probe CallStaticDoubleMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticDoubleMethodV-return(double);
  probe CallStaticFloatMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticFloatMethodA-return(float);
  probe CallStaticFloatMethod-entry(void*, void*, uintptr_t);
  probe CallStaticFloatMethod-return(float);
  probe CallStaticFloatMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticFloatMethodV-return(float);
  probe CallStaticIntMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticIntMethodA-return(uint32_t);
  probe CallStaticIntMethod-entry(void*, void*, uintptr_t);
  probe CallStaticIntMethod-return(uint32_t);
  probe CallStaticIntMethodentry(void*, void*, uintptr_t);
  probe CallStaticIntMethodV-return(uint32_t);
  probe CallStaticLongMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticLongMethodA-return(uintptr_t);
  probe CallStaticLongMethod-entry(void*, void*, uintptr_t);
  probe CallStaticLongMethod-return(uintptr_t);
  probe CallStaticLongMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticLongMethodV-return(uintptr_t);
  probe CallStaticObjectMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticObjectMethodA-return(void*);
  probe CallStaticObjectMethod-entry(void*, void*, uintptr_t);
  probe CallStaticObjectMethod-return(void*);
  probe CallStaticObjectMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticObjectMethodV-return(void*);
  probe CallStaticShortMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticShortMethodA-return(uint16_t);
  probe CallStaticShortMethod-entry(void*, void*, uintptr_t);
  probe CallStaticShortMethod-return(uint16_t);
  probe CallStaticShortMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticShortMethodV-return(uint16_t);
  probe CallStaticVoidMethodA-entry(void*, void*, uintptr_t);
  probe CallStaticVoidMethodA-return();
  probe CallStaticVoidMethod-entry(void*, void*, uintptr_t);
  probe CallStaticVoidMethod-return();
  probe CallStaticVoidMethodV-entry(void*, void*, uintptr_t);
  probe CallStaticVoidMethodV-return();
  probe CallVoidMethodA-entry(void*, void*, uintptr_t);
  probe CallVoidMethodA-return();
  probe CallVoidMethod-entry(void*, void*, uintptr_t);
  probe CallVoidMethod-return();
  probe CallVoidMethodV-entry(void*, void*, uintptr_t);
  probe CallVoidMethodV-return();
  probe CreateJavaVM-entry(void**, void**, void*);
  probe CreateJavaVM-return(uint32_t);
  probe DefineClass-entry(void*, const char*, void*, char, uintptr_t);
  probe DefineClass-return(void*);
  probe DeleteGlobalRef-entry(void*, void*);
  probe DeleteGlobalRef-return();
  probe DeleteLocalRef-entry(void*, void*);
  probe DeleteLocalRef-return();
  probe DeleteWeakGlobalRef-entry(void*, void*);
  probe DeleteWeakGlobalRef-return();
  probe DestroyJavaVM-entry(void*);
  probe DestroyJavaVM-return(uint32_t);
  probe DetachCurrentThread-entry(void*);
  probe DetachCurrentThread-return(uint32_t);
  probe EnsureLocalCapacity-entry(void*, uint32_t);
  probe EnsureLocalCapacity-return(uint32_t);
  probe ExceptionCheck-entry(void*);
  probe ExceptionCheck-return(uintptr_t);
  probe ExceptionClear-entry(void*);
  probe ExceptionClear-return();
  probe ExceptionDescribe-entry(void*);
  probe ExceptionDescribe-return();
  probe ExceptionOccurred-entry(void*);
  probe ExceptionOccurred-return(void*);
  probe FatalError-entry(void* env, const char*);
  probe FindClass-entry(void*, const char*);
  probe FindClass-return(void*);
  probe FromReflectedField-entry(void*, void*);
  probe FromReflectedField-return(uintptr_t);
  probe FromReflectedMethod-entry(void*, void*);
  probe FromReflectedMethod-return(uintptr_t);
  probe GetArrayLength-entry(void*, void*);
  probe GetArrayLength-return(uintptr_t);
  probe GetBooleanArrayElements-entry(void*, void*, uintptr_t*);
  probe GetBooleanArrayElements-return(uintptr_t*);
  probe GetBooleanArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*);
  probe GetBooleanArrayRegion-return();
  probe GetBooleanField-entry(void*, void*, uintptr_t);
  probe GetBooleanField-return(uintptr_t);
  probe GetByteArrayElements-entry(void*, void*, uintptr_t*);
  probe GetByteArrayElements-return(char*);
  probe GetByteArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, char*);
  probe GetByteArrayRegion-return();
  probe GetByteField-entry(void*, void*, uintptr_t);
  probe GetByteField-return(char);
  probe GetCharArrayElements-entry(void*, void*, uintptr_t*);
  probe GetCharArrayElements-return(uint16_t*);
  probe GetCharArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
  probe GetCharArrayRegion-return();
  probe GetCharField-entry(void*, void*, uintptr_t);
  probe GetCharField-return(uint16_t);
  probe GetCreatedJavaVMs-eintptr_t*);
  probe GetCreatedJavaVMs-return(uintptr_t);
  probe GetCreateJavaVMs-entry(void*, uintptr_t, uintptr_t*);
  probe GetCreateJavaVMs-return(uint32_t);
  probe GetDefaultJavaVMInitArgs-entry(void*);
  probe GetDefaultJavaVMInitArgs-return(uint32_t);
  probe GetDirectBufferAddress-entry(void*, void*);
  probe GetDirectBufferAddress-return(void*);
  probe GetDirectBufferCapacity-entry(void*, void*);
  probe GetDirectBufferCapacity-return(uintptr_t);
  probe GetDoubleArrayElements-entry(void*, void*, uintptr_t*);
  probe GetDoubleArrayElements-return(double*);
  probe GetDoubleArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, double*);
  probe GetDoubleArrayRegion-return();
  probe GetDoubleField-entry(void*, void*, uintptr_t);
  probe GetDoubleField-return(double);
  probe GetEnv-entry(void*, void*, void*);
  probe GetEnv-return(uint32_t);
  probe GetFieldID-entry(void*, void*, const char*, const char*);
  probe GetFieldID-return(uintptr_t);
  probe GetFloatArrayElements-entry(void*, void*, uintptr_t*);
  probe GetFloatArrayElements-return(float*);
  probe GetFloatArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, float*);
  probe GetFloatArrayRegion-return();
  probe GetFloatField-entry(void*, void*, uintptr_t);
  probe GetFloatField-return(float);
  probe GetIntArrayElements-entry(void*, void*, uintptr_t*);
  probe GetIntArrayElements-return(uint32_t*);
  probe GetIntArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, uint32_t*);
  probe GetIntArrayRegion-return();
  probe GetIntField-entry(void*, void*, uintptr_t);
  probe GetIntField-return(uint32_t);
  probe GetJavaVM-entry(void*, void**);
  probe GetJavaVM-return(uint32_t);
  probe GetLongArrayElements-entry(void*, void*, uintptr_t*);
  probe GetLongArrayElements-return(uintptr_t*);
  probe GetLongArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*);
  probe GetLongArrayRegion-return();
  probe GetLongField-entry(void*, void*, uintptr_t);
  probe GetLongField-return(uintptr_t);
  probe GetMethodID-entry(void*, void*, const char*, const char*);
  probe GetMethodID-return(uintptr_t);
  probe GetObjectArrayElement-entry(void*, void*, uintptr_t);
  probe GetObjectArrayElement-return(void*);
  probe GetObjectClass-entry(void*, void*);
  probe GetObjectClass-return(void*);
  probe GetObjectField-entry(void*, void*, uintptr_t);
  probe GetObjectField-return(void*);
  probe GetObjectRefType-entry(void*, void*);
  probe GetObjectRefType-return(void*);
  probe GetPrimitiveArrayCritical-entry(void*, void*, uintptr_t*);
  probe GetPrimitiveArrayCritical-return(void*);
  probe GetShortArrayElements-entry(void*, void*, uintptr_t*);
  probe GetShortArrayElements-return(uint16_t*);
  probe GetShortArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
  probe GetShortArrayRegion-return();
  probe GetShortField-entry(void*, void*, uintptr_t);
  probe GetShortField-return(uint16_t);
  probe GetStaticBooleanField-entry(void*, void*, uintptr_t);
  probe GetStaticBooleanField-return(uintptr_t);
  probe GetStaticByteField-entry(void*, void*, uintptr_t);
  probe GetStaticByteField-return(char);
  probe GetStaticCharField-entry(void*, void*, uintptr_t);
  probe GetStaticCharField-return(uint16_t);
  probe GetStaticDoubleField-entry(void*, void*, uintptr_t);
  probe GetStaticDoubleField-return(double);
  probe GetStaticFieldID-entry(void*, void*, const char*, const char*);
  probe GetStaticFieldID-return(uintptr_t);
  probe GetStaticFloatField-entry(void*, void*, uintptr_t);
  probe GetStaticFloatField-return(float);
  probe GetStaticIntField-entry(void*, void*, uintptr_t);
  probe GetStaticIntField-return(uint32_t);
  probe GetStaticLongField-entry(void*, void*, uintptr_t);
  probe GetStaticLongField-return(uintptr_t);
  probe GetStaticMethodID-entry(void*, void*, const char*, const char*);
  probe GetStaticMethodID-return(uintptr_t);
  probe GetStaticObjectField-entry(void*, void*, uintptr_t);
  probe GetStaticObjectField-return(void*);
  probe GetStaticShortField-entry(void*, void*, uintptr_t);
  probe GetStaticShortField-return(uint16_t);
  pro GetStringChars-entry(void*, void*, uintptr_t*);
  probe GetStringChars-return(const uint16_t*);
  probe GetStringCritical-entry(void*, void*, uintptr_t*);
  probe GetStringCritical-return(const uint16_t*);
  probe GetStringLength-entry(void*, void*);
  probe GetStringLength-return(uintptr_t);
  probe GetStringRegion-entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
  probe GetStringRegion-return();
  probe GetStringUTFChars-entry(void*, void*, uintptr_t*);
  probe GetStringUTFChars-return(const char*);
  probe GetStringUTFLength-entry(void*, void*);
  probe GetStringUTFLength-return(uintptr_t);
  probe GetStringUTFRegion-entry(void*, void*, uintptr_t, uintptr_t, char*);
  probe GetStringUTFRegion-return();
  probe GetSuperclass-entry(void*, void*);
  probe GetSuperclass-return(void*);
  probe GetVersion-entry(void*);
  probe GetVersion-return(uint32_t);
  probe IsAssignableFrom-entry(void*, void*, void*);
  probe IsAssignableFrom-return(uintptr_t);
  probe IsInstanceOf-entry(void*, void*, void*);
  probe IsInstanceOf-return(uintptr_t);
  probe IsSameObject-entry(void*, void*, void*);
  probe IsSameObject-return(uintptr_t);
  probe MonitorEnter-entry(void*, void*);
  probe MonitorEnter-return(uint32_t);
  probe MonitorExit-entry(void*, void*);
  probe MonitorExit-return(uint32_t);
  probe NewBooleanArray-entry(void*, uintptr_t);
  probe NewBooleanArray-return(void*);
  probe NewByteArray-entry(void*, uintptr_t);
  probe NewByteArray-return(void*);
  probe NewCharArray-entry(void*, uintptr_t);
  probe NewCharArray-return(void*);
  probe NewDirectByteBuffer-entry(void*, void*, uintptr_t);
  probe NewDirectByteBuffer-return(void*);
  probe NewDoubleArray-entry(void*, uintptr_t);
  probe NewDoubleArray-return(void*);
  probe NewFloatArray-entry(void*, uintptr_t);
  probe NewFloatArray-return(void*);
  probe NewGlobalRef-entry(void*, void*);
  probe NewGlobalRef-return(void*);
  probe NewIntArray-entry(void*, uintptr_t);
  probe NewIntArray-return(void*);
  probe NewLocalRef-entry(void*, void*);
  probe NewLocalRef-return(void*);
  probe NewLongArray-entry(void*, uintptr_t);
  probe NewLongArray-return(void*);
  probe NewObjectA-entry(void*, void*, uintptr_t);
  probe NewObjectA-return(void*);
  probe NewObjectArray-entry(void*, uintptr_t, void*, void*);
  probe NewObjectArray-return(void*);
  probe NewObject-entry(void*, void*, uintptr_t);
  probe NewObject-return(void*);
  probe NewObjectV-entry(void*, void*, uintptr_t);
  probe NewObjectV-return(void*);
  probe NewShortArray-entry(void*, uintptr_t);
  probe NewShortArray-return(void*);
  probe NewString-entry(void*, const uint16_t*, uintptr_t);
  probe NewString-return(void*);
  probe NewStringUTF-entry(void*, const char*);
  probe NewStringUTF-return(void*);
  probe NewWeakGlobalRef-entry(void*, void*);
  probe NewWeakGlobalRef-return(void*);
  probe PopLocalFrame-entry(void*, void*);
  probe PopLocalFrame-return(void*);
  probe PushLocalFrame-entry(void*, uint32_t);
  probe PushLocalFrame-return(uint32_t);
  probe RegisterNatives-entry(void*, void*, const void*, uint32_t);
  probe RegisterNatives-return(uint32_t);
  probe ReleaseBooleanArrayElements-entry(void*, void*, uintptr_t*, uint32_t);
  probe ReleaseBooleanArrayElements-return();
  probe ReleaseByteArrayElements-entry(void*, void*, char*, uint32_t);
  probe ReleaseByteArrayElements-return();
  probe ReleaseCharArrayElements-entry(void*, void*, uint16_t*, uint32_t);
  probe ReleaseCharArrayElements-return();
  probe ReleaseDoubleArrayElements-entry(void*, void*, double*, uint32_t);
  probe ReleaseDoubleArrayElements-return();
  probe ReleaseFloatArrayElements-entry(void*, void*, float*, uint32_t);
  probe ReleaseFloatArrayElements-return();
  probe ReleaseIntArrayElements-entry(void*, void*, uint32_t*, uint32_t);
  probe ReleaseIntArrayElements-return();
  probe ReleaseLongArrayElements-entry(void*, void*, uintptr_t*, uint32_t);
  probe ReleaseLongArrayElements-return();
  probe ReleaseObjectArrayElements-entry(void*, void*, void**, uint32_t);
  probe ReleaseObjectArrayElements-return();
  probe Releasey(void*, void*, void*, uint32_t);
  probe ReleasePrimitiveArrayCritical-return();
  probe ReleaseShortArrayElements-entry(void*, void*, uint16_t*, uint32_t);
  probe ReleaseShortArrayElements-return();
  probe ReleaseStringChars-entry(void*, void*, const uint16_t*);
  probe ReleaseStringChars-return();
  probe ReleaseStringCritical-entry(void*, void*, const uint16_t*);
  probe ReleaseStringCritical-return();
  probe ReleaseStringUTFChars-entry(void*, void*, const char*);
  probe ReleaseStringUTFChars-return();
  probe SetBooleanArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*);
  probe SetBooleanArrayRegion-return();
  probe SetBooleanField-entry(void*, void*, uintptr_t, uintptr_t);
  probe SetBooleanField-return();
  probe SetByteArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const char*);
  probe SetByteArrayRegion-return();
  probe SetByteField-entry(void*, void*, uintptr_t, char);
  probe SetByteField-return();
  probe SetCharArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*);
  probe SetCharArrayRegion-return();
  probe SetCharField-entry(void*, void*, uintptr_t, uint16_t);
  probe SetCharField-return();
  probe SetDoubleArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const double*);
  probe SetDoubleArrayRegion-return();
  probe SetDoubleField-entry(void*, void*, uintptr_t, double);
  probe SetDoubleField-return();
  probe SetFloatArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const float*);
  probe SetFloatArrayRegion-return();
  probe SetFloatField-entry(void*, void*, uintptr_t, float);
  probe SetFloatField-return();
  probe SetIntArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*);
  probe SetIntArrayRegion-return();
  probe SetIntField-entry(void*, void*, uintptr_t, uint32_t);
  probe SetIntField-return();
  probe SetLongArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*);
  probe SetLongArrayRegion-return();
  probe SetLongField-entry(void*, void*, uintptr_t, uintptr_t);
  probe SetLongField-return();
  probe SetObjectArrayElement-entry(void*, void*, uintptr_t, void*);
  probe SetObjectArrayElement-return();
  probe SetObjectField-entry(void*, void*, uintptr_t, void*);
  probe SetObjectField-return();
  probe SetShortArrayRegion-entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*);
  probe SetShortArrayRegion-return();
  probe SetShortField-entry(void*, void*, uintptr_t, uint16_t);
  probe SetShortField-return();
  probe SetStaticBooleanField-entry(void*, void*, uintptr_t, uintptr_t);
  probe SetStaticBooleanField-return();
  probe SetStaticByteField-entry(void*, void*, uintptr_t, char);
  probe SetStaticByteField-return();
  probe SetStaticCharField-entry(void*, void*, uintptr_t, uint16_t);
  probe SetStaticCharField-return();
  probe SetStaticDoubleField-entry(void*, void*, uintptr_t, double);
  probe SetStaticDoubleField-return();
  probe SetStaticFloatField-entry(void*, void*, uintptr_t, float);
  probe SetStaticFloatField-return();
  probe SetStaticIntField-entry(void*, void*, uintptr_t, uint32_t);
  probe SetStaticIntField-return();
  probe SetStaticLongField-entry(void*, void*, uintptr_t, uintptr_t);
  probe SetStaticLongField-return();
  probe SetStaticObjectField-entry(void*, void*, uintptr_t, void*);
  probe SetStaticObjectField-return();
  probe SetStaticShortField-entry(void*, void*, uintptr_t, uint16_t);
  probe SetStaticShortField-return();
  probe Throw-entry(void*, void*);
  probe ThrowNew-entry(void*, void*, const char*);
  probe ThrowNew-return(uint32_t);
  probe Throw-return(uint32_t);
  probe ToReflectedField-entry(void*, void*, uintptr_t, uintptr_t);
  probe ToReflectedField-return(void*);
  probe ToReflectedMethod-entry(void*, void*, uintptr_t, uintptr_t);
  probe ToReflectedMethod-return(void*);
  probe UnregisterNatives-entry(void*, void*);
  probe UnregisterNatives-return(uint32_t);
};
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Error Reporting

When the Java Virtual Machine (JVM) detects a crash in native code such as JNI code written by the developer or when the JVM itself crashes, it will print debug information about the crash. This error message normally will include information such as the function name, library name, source-file name and line number at which the error occurred. (Currently, information about file name and line number are available only available on Microsoft Windows platforms.) For an example of a message emitted by the error handler, see JNI Error example.

The information provided by the new error-reporting mechanism will allow developers to more easily and efficiently debug their applications. If an error message indicates a problem in the JVM code itself, it will allow a developer to submit a more accurate and helpful bug report.

Sometimes the error-reporting mechanism won't be able to determine the information that might be helpful in locating the source of a crash. To get the most out of the error handler, developers should be aware of the following guidelines and limitations.

Compile in debug mode

In some circumstances, the error-reporting mechanism won't be able to determine symbol names. The most common reason for this is that the binary code that crashed was not compiled in debug mode and therefore doesn't have symbol tables. Developers should compile their code in debug mode to ensure that it contains the necessary debug information. In Visual Studio, for example, this means choosing "Debug" rather than "Release" as the project's build mode. When using gcc or cc on Linux or on the Solaris operating environment, compile using the -g command-line option.

Non-exported functions

Even without debug information in the binary code, the error handler can still print the function name of the crash site. However, the function name might not be correct if the problematic function is not "exported" from the dynamic library. On Linux and Solaris, all functions are exported except those declared static. On Microsoft Windows platforms, no functions are exported unless explicitly declared so (using JNIEXPORT or __declspec(dllexport)).

Visual Studio limitation on Windows 98 and Windows NT

On Windows 98 and Windows NT platforms, the error handler uses the system's imagehlp.dll file to help determine the function name, source file, and line number of a crash site. (Windows 2000 and Windows ME use two files, imagehlp.dll and debughlp.dll to perform this task.) However, the imagehlp.dll file in Windows 98 and Windows NT does not work well with binary code and DLLs generated by Visual Studio 6.0.

This problem may cause the error handler to generate error messages with incorrect information about the function name, source file and line number of the crash site, though other information in the error message will be correct.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Garbage Collection Ergonomics

Documentation Contents

Garbage Collector Ergonomics

The following changes take effect with Java SE 5.0.

Garbage Collector of Server VM Changed to Parallel Garbage Collector

On server-class machines running the server VM, the garbage collector (GC) has changed from the previous serial collector (-XX:+UseSerialGC) to a parallel collector (-XX:+UseParallelGC). You can override this default by using the -XX:+UseSerialGC command-line option to the java command.

Initial Heap Size and Maximum Heap Size Changed for Parallel Garbage Collector

On server-class machines running either VM (client or server) with the parallel garbage collector (-XX:+UseParallelGC) the initial heap size and maximum heap size have changed as follows.

initial heap size

Larger of 1/64th of the machine's physical memory on the machine or some reasonable minimum. Before Java SE 5.0, the default initial heap size was a reasonable minimum, which varies by platform. You can override this default using the -Xms command-line option.

maximum heap size

Smaller of 1/4th of the physical memory or 1GB. Before Java SE 5.0, the default maximum heap size was 64MB. You can override this default using the -Xmx command-line option.

Note: The boundaries and fractions given for the heap size are correct for Java SE 5.0. They are likely to be different in subsequent releases as computers get more powerful.

Parallel Garbage Collector Throws Exception if Excessive Amount of Time Spent Collecting Small Amount of Heap

The parallel garbage collector (UseParallelGC) throws an out-of-memory exception if an excessive amount of time is being spent collecting a small amount of the heap. To avoid this exception, you can increase the size of the heap. You can also set the parameters -XX:GCTimeLimit=time-limit and -XX:GCHeapFreeLimit=space-limit where:

time-limit:

The upper limit on the amount of time spent in garbage collection in percent of total time (default is 98).

space-limit:

The lower limit on the amount of space freed during a garbage collection in percent of the maximum heap (default is 2).

Implementation of -XX:+UseAdaptiveSizePolicy Used by Parallel Garbage Collector Changed

The implementation of -XX:+UseAdaptiveSizePolicy used by default with the -XX:+UseParallelGC garbage collector has changed to consider three goals:
  • a desired maximum GC pause goal
  • a desired application throughput goal
  • minimum footprint

The implementation checks (in this order):

  1. If the GC pause time is greater than the pause time goal then reduce the generations sizes to better attain the goal.
  2. If the pause time goal is being met then consider the application's throughput goal. If the application's throughput goal is not being met, then increase the sizes of the generations to better attain the goal.
  3. If both the pause time goal and the throughput goal are being met, then the size of the generations are decreased to reduce footprint.

Flags

-XX:MaxGCPauseMillis=nnn
A hint to the virtual machine that pause times of nnn milliseconds or less are desired. The VM will adjust the java heap size and other GC-related parameters in an attempt to keep GC-induced pauses shorter than nnn milliseconds. Note that this may cause the VM to reduce overall throughput, and in some cases the VM will not be able to meet the desired pause time goal.

By default there is no pause time goal. There are definite limitations on how well a pause time goal can be met. The pause time for a GC depends on the amount of live data in the heap. The minor and major collections depend in different ways on the amount of live data. This parameter should be used with caution. A value that is too small will cause the system to spend an excessive amount of time doing garbage collection.

-XX:GCTimeRatio=nnn
A hint to the virtual machine that it's desirable that not more than 1 / (1 + nnn) of the application execution time be spent in the collector.

For example -XX:GCTimeRatio=19 sets a goal of 5% of the total time for GC and throughput goal of 95%. That is, the application should get 19 times as much time as the collector.

By default the value is 99, meaning the application should get at least 99 times as much time as the collector. That is, the collector should run for not more than 1% of the total time. This was selected as a good choice for server applications. A value that is too high will cause the size of the heap to grow to its maximum.

Suggested strategy

Do not choose a maximum value for the heap unless you know that the heap is greater than the default maximum heap size. Choose a throughput goal that is sufficient for your application.

In an ideal situation the heap will grow to a value (less than the maximum) that will support the chosen throughput goal.

If the heap grows to its maximum, the throughput cannot be met within that maximum. Set the maximum heap as large as you can, but no larger than the size of physical memory on the platform, and execute the application again. If the throughput goal can still not be met, then it is too high for the available memory on the platform.

If the throughput goal can be met but there are pauses that are too long, select a pause time goal. This will likely mean that your throughput goal will not be met, so choose values that are an acceptable compromise for the application.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Garbage-First Collector

Introduction

The Garbage-First (G1) garbage collector is fully supported in Oracle JDK 7 update 4 and later releases. The G1 collector is a server-style garbage collector, targeted for multi-processor machines with large memories. It meets garbage collection (GC) pause time goals with high probability, while achieving high throughput. Whole-heap operations, such as global marking, are performed concurrently with the application threads. This prevents interruptions proportional to heap or live-data size.

Technical description

The G1 collector achieves high performance and pause time goals through several techniques.

The heap is partitioned into a set of equal-sized heap regions, each a contiguous range of virtual memory. G1 performs a concurrent global marking phase to determine the liveness of objects throughout the heap. After the mark phase completes, G1 knows which regions are mostly empty. It collects in these regions first, which usually yields a large amount of free space. This is why this method of garbage collection is called Garbage-First. As the name suggests, G1 concentrates its collection and compaction activity on the areas of the heap that are likely to be full of reclaimable objects, that is, garbage. G1 uses a pause prediction model to meet a user-defined pause time target and selects the number of regions to collect based on the specified pause time target.

The regions identified by G1 as ripe for reclamation are garbage collected using evacuation. G1 copies objects from one or more regions of the heap to a single region on the heap, and in the process both compacts and frees up memory. This evacuation is performed in parallel on multi-processors, to decrease pause times and increase throughput. Thus, with each garbage collection, G1 continuously works to reduce fragmentation, working within the user defined pause times. This is beyond the capability of both the previous methods. CMS (Concurrent Mark Sweep ) garbage collection does not do compaction. ParallelOld garbage collection performs only whole-heap compaction, which results in considerable pause times.

It is important to note that G1 is not a real-time collector. It meets the set pause time target with high probability but not absolute certainty. Based on data from previous collections, G1 does an estimate of how many regions can be collected within the user specified target time. Thus, the collector has a reasonably accurate model of the cost of collecting the regions, and it uses this model to determine which and how many regions to collect while staying within the pause time target.

Recommended Use Cases for G1

The first focus of G1 is to provide a solution for users running applications that require large heaps with limited GC latency. This means heap sizes of around 6GB or larger, and stable and predictable pause time below 0.5 seconds.

Applications running today with either the CMS or the ParallelOld garbage collector would benefit switching to G1 if the application has one or more of the following traits.

  • More than 50% of the Java heap is occupied with live data.
  • The rate of object allocation rate or promotion varies significantly.
  • Undesired long garbage collection or compaction pauses (longer than 0.5 to 1 second)

Future

G1 is planned as the long term replacement for the Concurrent Mark-Sweep Collector (CMS). Comparing G1 with CMS, there are differences that make G1 a better solution. One difference is that G1 is a compacting collector. G1 compacts sufficiently to completely avoid the use of fine-grained free lists for allocation, and instead relies on regions. This considerably simplifies parts of the collector, and mostly eliminates potential fragmentation issues. Also, G1 offers more predictable garbage collection pauses than the CMS collector, and allows users to specify desired pause targets.

If you are interested in helping improving G1, please try it and give feedback via OpenJDK and the hotspot-gc-use@openjdk.java.net mailing list.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java ™ HotSpot Virtual Machine Performance Enhancements

Documentation Contents

Java HotSpot™ Virtual Machine Performance Enhancements

  • Tiered Compilation
  • Compressed Oops
  • Zero-Based Compressed Oops
  • Escape Analysis
  • NUMA Collector Enhancements

Tiered Compilation

Tiered compilation, introduced in Java SE 7, brings client startup speeds to the server VM. Normally, a server VM uses the interpreter to collect profiling information about methods that is fed into the compiler. In the tiered scheme, in addition to the interpreter, the client compiler is used to generate compiled versions of methods that collect profiling information about themselves. Since the compiled code is substantially faster than the interpreter, the program executes with greater performance during the profiling phase. In many cases, a startup that is even faster than with the client VM can be achieved because the final code produced by the server compiler may be already available during the early stages of application initialization. The tiered scheme can also achieve better peak performance than a regular server VM because the faster profiling phase allows a longer period of profiling, which may yield better optimization.

Tiered compilation is the default mode for the server VM. Both 32 and 64 bit modes are supported, as well as compressed oops (see the next section). Use the -XX:-TieredCompilation flag with the java command to disable tiered compilation.

Compressed Oops

An "oop", or ordinary object pointer in Java Hotspot parlance, is a managed pointer to an object. An oop is normally the same size as a native machine pointer, which means 64 bits on an LP64 system. On an ILP32 system, maximum heap size is somewhat less than 4 gigabytes, which is insufficient for many applications. On an LP64 system, the heap used by a given program might have to be around 1.5 times larger than when it is run on an ILP32 system. This requirement is due to the expanded size of managed pointers. Memory is inexpensive, but these days bandwidth and cache are in short supply, so significantly increasing the size of the heap and only getting just over the 4 gigabyte limit is undesirable.

Managed pointers in the Java heap point to objects which are aligned on 8-byte address boundaries. Compressed oops represent managed pointers (in many but not all places in the JVM software) as 32-bit object offsets from the 64-bit Java heap base address. Because they're object offsets rather than byte offsets, they can be used to address up to four billion objects (not bytes), or a heap size of up to about 32 gigabytes. To use them, they must be scaled by a factor of 8 and added to the Java heap base address to find the object to which they refer. Object sizes using compressed oops are comparable to those in ILP32 mode.

The term decode is used to express the operation by which a 32-bit compressed oop is converted into a 64-bit native address into the managed heap. The inverse operation is referred to as encoding.

Compressed oops is supported and enabled by default in Java SE 6u23 and later. In Java SE 7, use of compressed oops is the default for 64-bit JVM processes when -Xmx isn't specified and for values of -Xmx less than 32 gigabytes. For JDK 6 before the 6u23 release, use the -XX:+UseCompressedOops flag with the java command to enable the feature.

Zero-Based Compressed Ordinary Object Pointers (oops)

When using compressed oops in a 64-bit Java Virtual Machine process, the JVM software asks the operating system to reserve memory for the Java heap starting at virtual address zero. If the operating system supports such a request and can reserve memory for the Java heap at virtual address zero, then zero-based compressed oops are used.

Use of zero-based compressed oops means that a 64-bit pointer can be decoded from a 32-bit object offset without adding in the Java heap base address. For heap sizes less than 4 gigabytes, the JVM software can use a byte offset instead of an object offset and thus also avoid scaling the offset by 8. Encoding a 64-bit address into a 32-bit offset is correspondingly efficient.

For Java heap sizes up around 26 gigabytes, any of Solaris, Linux, and Windows operating systems will typically be able to allocate the Java heap at virtual address zero.

Escape Analysis

Escape analysis is a technique by which the Java Hotspot Server Compiler can analyze the scope of a new object's uses and decide whether to allocate it on the Java heap.

Escape analysis is supported and enabled by default in Java SE 6u23 and later.

The Java Hotspot Server Compiler implements the flow-insensitive escape analysis algorithm described in:

 [Choi99] Jong-Deok Choi, Manish Gupta, Mauricio Seffano,
          Vugranam C. Sreedhar, Sam Midkiff,
          "Escape Analysis for Java", Procedings of ACM SIGPLAN
          OOPSLA  Conference, November 1, 1999

Based on escape analysis, an object's escape state might be one of the following:

  • GlobalEscape – An object escapes the method and thread. For example, an object stored in a static field, or, stored in a field of an escaped object, or, returned as the result of the current method.
  • ArgEscape – An object passed as an argument or referenced by an argument but does not globally escape during a call. This state is determined by analyzing the bytecode of called method.
  • NoEscape – A scalar replaceable object, meaning its allocation could be removed from generated code.

After escape analysis, the server compiler eliminates scalar replaceable object allocations and associated locks from generated code. The server compiler also eliminates locks for all non-globally escaping objects. It does not replace a heap allocation with a stack allocation for non-globally escaping objects.

Some scenarios for escape analysis are described next.

  • The server compiler might eliminate certain object allocations. Consider the example where a method makes a defensive copy of an object and returns the copy to the caller.

    public class Person {
  private String name;
  private int age;
  public Person(String personName, int personAge) {
    name = personName;
                age = personAge;
  }

  public Person(Person p) { this(p.getName(), p.getAge()); }
  public int getName() { return name; }
  public int getAge() { return age; }
}

public class Employee {
  private Person person;

        // makes a defensive copy to protect against modifications by caller
        public Person getPerson() { return new Person(person) };

        public void printEmployeeDetail(Employee emp) {
          Person person = emp.getPerson();
          // this caller does not modify the object, so defensive copy was unnecessary
                System.out.println ("Employee's name: " + person.getName() + "; age: "  + person.getAge());
        }
}

    The method makes a copy to prevent modification of the original object by the caller. If the compiler determines that the getPerson method is being invoked in a loop, it will inline that method. In addition, through escape analysis, if the compiler determines that the original object is never modified, it might optimize and eliminate the call to make a copy.

  • The server compiler might eliminate synchronization blocks (lock elision) if it determines that an object is thread local. For example, methods of classes such as StringBuffer and Vector are synchronized because they can be accessed by different threads. However, in most scenarios, they are used in a thread local manner. In cases where the usage is thread local, the compiler might optimize and remove the synchronization blocks.

NUMA Collector Enhancements

The Parallel Scavenger garbage collector has been extended to take advantage of machines with NUMA (Non Uniform Memory Access) architecture. Most modern computers are based on NUMA architecture, in which it takes a different amount of time to access different parts of memory. Typically, every processor in the system has a local memory that provides low access latency and high bandwidth, and remote memory that is considerably slower to access.

In the Java HotSpot Virtual Machine, the NUMA-aware allocator has been implemented to take advantage of such systems and provide automatic memory placement optimizations for Java applications. The allocator controls the eden space of the young generation of the heap, where most of the new objects are created. The allocator divides the space into regions each of which is placed in the memory of a specific node. The allocator relies on a hypothesis that a thread that allocates the object will be the most likely to use the object. To ensure the fastest access to the new object, the allocator places it in the region local to the allocating thread. The regions can be dynamically resized to reflect the allocation rate of the application threads running on different nodes. That makes it possible to increase performance even of single-threaded applications. In addition, "from" and "to" survivor spaces of the young generation, the old generation, and the permanent generation have page interleaving turned on for them. This ensures that all threads have equal access latencies to these spaces on average.

The NUMA-aware allocator is available on the Solaris™ operating system starting in Solaris 9 12/02 and on the Linux operating system starting in Linux kernel 2.6.19 and glibc 2.6.1.

The NUMA-aware allocator can be turned on with the -XX:+UseNUMA flag in conjunction with the selection of the Parallel Scavenger garbage collector. The Parallel Scavenger garbage collector is the default for a server-class machine. The Parallel Scavenger garbage collector can also be turned on explicitly by specifying the -XX:+UseParallelGC option.

The -XX:+UseNUMA flag was added in Java SE 6u2.

Note: There was a known bug in the Linux Kernel that may cause the JVM to crash when being run with -XX:UseNUMA. The bug was fixed in 2012, so this should not affect the latest versions of the Linux Kernel. To see if your Kernel has this bug, you can run the native reproducer.

NUMA Performance Metrics

When evaluated against the SPEC JBB 2005 benchmark on an 8-chip Opteron machine, NUMA-aware systems showed the following performance increases:

  • 32 bit – About 30 percent increase in performance with NUMA-aware allocator
  • 64 bit – About 40 percent increase in performance with NUMA-aware allocator
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Virtual Machine Enhancements in Java SE 8

The follow pages introduce some of the larger changes relating to the Java Virtual Machine introduced in the Java SE 8 and JDK 8 release:

Area: Specification / vm and HotSpot
Standard/Platform: Java SE 8
Synopsis: The verification of invokespecial RFE: 7160765

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Virtual Machine Enhancements in JDK 7

The follow pages introduce some of the larger changes relating to the Java Virtual Machine introduced in the JDK 7 release:

  • Java Virtual Machine Support for Non-Java Languages: Java SE 7 introduces a new JVM instruction that simplifies the implementation of dynamically typed programming languages on the JVM.
  • Garbage-First Collector is a server-style garbage collector that replaces the Concurrent Mark-Sweep Collector (CMS).
  • Java HotSpot Virtual Machine Performance Enhancements

In addition, the following enhancements are added:

Area: HotSpot
Standard/Platform: Java SE 7 Update 1
Synopsis: JIT and Loop Bugs: Three bugs reported by various parties, including Apache Lucene developers, have been fixed in JDK 7 Update 1, in addition to a fourth related bug found by Oracle.
RFE: 7070134, 7068051, 7044738, 7077439

Area: HotSpot
Standard/Platform: Java SE 7
Synopsis: The JVM/TI version number was changed from 1.1 to 1.2 in order to add the GetLocalInstance method.
RFE: 7003782, 7004582

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: Classfiles with version number 51 are exclusively veritified using the type-checking verifier, and thus the methods must have StackMapTable attributes when appropriate. For classfiles with version 50, the HotSpot JVM would (and continues to) failover to the type-inferencing verifier if the stackmaps in the file were missing or incorrect. This failover behavior does not occur for classfiles with version 51 (the default version for JDK7).
Any tool the modifies bytecode in a version 51 classfile must be sure to update the stackmap information to be consistent with the bytecode in order to pass verification.
RFE: 6693236

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: In JDK 7, interned strings are no longer allocated in the permanent generation of the Java heap, but are instead allocated in the main part of the Java heap (known as the young and old generations), along with the other objects created by the application. This change will result in more data residing in the main Java heap, and lessw data in the permanent generation, and thus may require heap sizes to be adjusted. Most applications will see only relatively small differences in heap usage due to this change, but larger applications that load many classes or make heavy use of the String.intern() method will see more significant differences.
RFE: 6962931

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: The default out-of-the-box heap size and shape parameters for the concurrent mark sweep collector (CMS) have been modified. The new settings take advantage of faster platforms that have been introduced since JDK 6 was released. Like the other collectors in HotSpot, CMS will now use the available physical memory on the platform to size its heap, while attempting to shape that heap to keep pause times associated with minor collections "reasonable". The specific shape of the heap may be platform-depenent in other ways as well.
Users can override all or some of these default settings by explicitly sizing or shaping the heap, AKA "heap tuning", to suit their specific needs.
For more information on the default settings for this and other garbage collectors, please see the Heap Tuning Guide for JDK 6.
RFE: 6896099

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: The JDK 6 release notes included performance enhancements for CMS. To provide a mechanism to continue using the behavior provided by JDK 5, the CMSUseOldDefaults flag was provided. This flag restored a number of settings to a default state. During the last few years, this flag has received minimal use and most customers prefer the improved CMS performance. The CMSUseOldDefaults flag is now removed.
RFE: 7027529

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: The GarbageFirst (G1) garbage collector is experimental in this release. Some command line tools, such as jstack or jmap, may not work properly when using the G1 collector.
RFE: 6966967

Area: HotSpot
Standard/Platform: JDK 7
Synopsis: In previous releases of the JDK on Solaris only, the Thread.interrupt() method would interrupt some blocking I/O operatons resulting in InterruptedIOException thrown by the target thread and leaving socket or file streams in an inconsistent state. This so called "legacy interruptible I/O support" has been disabled in JDK 7. Applications that previously relied on this Solaris specific behavior can re-enable this support by running with the following option on the command line: -XX:+UseVMInterruptibleIO. A future release of the JDK may remove the legacy interruptible I/O support completely.
RFE: 6554406

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Virtual Machine Support for Non-Java Languages

The following topics are covered:

  • Introduction
  • Static and Dynamic Typing
  • The Challenge of Compiling Dynamically Typed Languages
  • The invokedynamic Instruction
  • Resources

Introduction

The Java SE platform enables the development of applications with the following features:

  • Can be written once and run anywhere
  • Can be run securely because of the Java sandbox security model
  • Easy to package and deliver

The Java SE platform also provides robust support with respect to the following areas (and more):

  • Concurrency
  • Garbage collection
  • Reflective access to classes and objects
  • JVM Tool Interface (JVM TI): A native programming interface for use by tools. It provides both a way to inspect the state and to control the execution of applications running in the JVM.

Oracle's HotSpot JVM also offers the following tools and features:

  • DTrace: A comprehensive dynamic tracing utility that monitors the behavior of applications programs as well as the operating system itself.
  • Performance optimizations
  • PrintAssembly: A Java HotSpot option that prints assembly code for bytecoded and native methods.

The Java SE 7 platform enables non-Java languages to exploit the infrastructure and potential performance optimizations of the JVM. The key mechanism is the invokedynamic instruction, which simplifies the implementation of compilers and runtime systems for dynamically typed languages on the JVM.

Static and Dynamic Typing

A programming language is statically typed if it performs type checking at compile time. Type checking is the process of verifying that a program is type safe. A program is type safe if the arguments of all of its operations are the correct type.

Java is a statically typed language. All typed information for class and instance variables, method parameters, return values, and other variables is available when a program is compiled. The compiler for the Java programming language uses this type information to produce strongly typed bytecode, which can then be efficiently executed by the JVM at runtime.

The following example of a Hello World program demonstrates static typing. Types are shown in bold.

import java.util.Date;

public class HelloWorld {
    public static void main(String[] argv) {
        String hello = "Hello ";
        Date currDate = new Date();
        for (String a : argv) {
            System.out.println(hello + a);
            System.out.println("Today's date is: " + currDate);
        }
    }
}

A programming language is dynamically typed if it performs type checking at runtime. JavaScript and Ruby are examples of dynamically typed languages. These languages verify at runtime, rather than at compile time, that values in an application conform to expected types. These languages typically do not have any type information available at compile time. The type of an object can be determined only at runtime. Hence, in the past, it was difficult to efficiently implement them on the JVM.

The following is an example of the Hello World program written in the Ruby programming language:

#!/usr/bin/env ruby
require 'date'

hello = "Hello "
currDate = DateTime.now
ARGV.each do|a|
  puts hello + a
  puts "Date and time: " + currDate.to_s
end

Note that every name is introduced without a type declaration. Also, the main program is not located inside of a holder type (the Java class HelloWorld. The Ruby equivalent of the Java for loop is inside the dynamic type of the variable ARGV. The body of the loop is contained in a block called a closure, a common feature in dynamic languages.

Statically Typed Languages Are Not Necessarily Strongly Typed Languages

A programming language that features strong typing specifies restrictions on the types of values supplied to its operations. If a computer language implements strong typing, it prevents the execution of an operation if its arguments have the wrong type. Conversely, a language that features weak typing would implicitly convert (or cast) arguments of an operation if those arguments have wrong or incompatible types.

Statically typed programming languages can employ strong typing or weak typing. Similarly, dynamically typed languages can also apply strong typing or weak typing. For example, the Ruby programming language is dynamically typed and strongly typed. Once a variable has been initialized with a value of some type, the Ruby programming language will not implicitly convert the variable into another data type. The Ruby programming language would not allow the following:

a = "40"
b = a + 2

In this example, the Ruby programming language will not implicitly cast the number 2, which has a Fixnum type, to a string.

The Challenge of Compiling Dynamically Typed Languages

Consider the following dynamically typed method, addtwo, that adds any two numbers (which can be of any numeric type) and returns the sum:

def addtwo(a, b)
       a + b;
end

Suppose your organization is implementing a compiler and runtime system for the programming language in which the method addtwo is written. In a strongly typed language, whether typed statically or dynamically, the behavior of + (the addition operator) depends on the types of the operands. A compiler for a statically-typed language chooses which implementation of + is appropriate based on the static types of a and b. For example, a Java compiler implements + with the iadd JVM instruction if the types of a and b are int. The addition operator will be compiled to a method call because the JVM's iadd instruction requires the operand types to be statically known.

In contrast, a compiler for a dynamically-typed language must defer the choice until runtime. The statement a + b is compiled as the method call +(a, b), where + is the method name. (Note a method named + is permitted in the JVM but not in the Java programming language.) Suppose then that the runtime system for the dynamically-typed language is able to identify that a and b are variables of integer type. The runtime system would prefer to call an implementation of + that is specialized for integer types rather than arbitrary object types.

The challenge of compiling dynamically typed languages is how to implement a runtime system that can choose the most appropriate implementation of a method or function — after the program has been compiled. Treating all variables as objects of Object type would not work efficiently; the Object class does not contain a method named +.

Java SE 7 introduces the invokedynamic instruction that enables the runtime system to customize the linkage between a call site and a method implementation. In this example, the invokedynamic call site is +. An invokedynamic call site is linked to a method by means of a bootstrap method, which is a method specified by the compiler for the dynamically-typed language that is called once by the JVM to link the site. Assuming the compiler emitted an invokedynamic instruction that invokes +, and assuming that the runtime system knows about the method adder(Integer,Integer), the runtime can link the invokedynamic call site to the adder method as follows:

IntegerOps.java

class IntegerOps {

  public static Integer adder(Integer x, Integer y) {
    return x + y;
  }
}

Example.java

import java.util.*;
import java.lang.invoke.*;
import static java.lang.invoke.MethodType.*;
import static java.lang.invoke.MethodHandles.*;

class Example {

  public static CallSite mybsm(
    MethodHandles.Lookup callerClass, String dynMethodName, MethodType dynMethodType)
    throws Throwable {

    MethodHandle mh =
      callerClass.findStatic(
        Example.class,
        "IntegerOps.adder",
        MethodType.methodType(Integer.class, Integer.class, Integer.class));

    if (!dynMethodType.equals(mh.type())) {
      mh = mh.asType(dynMethodType);
    }

    return new ConstantCallSite(mh);
  }
}

In this example, the IntegerOps class belongs to the library that accompanies the dynamic language's runtime system.

The method Example.mybsm is a bootstrap method that links the invokedynamic call site to the adder method.

The object callerClass is a lookup object, which is a factory for creating method handles.

The method MethodHandles.Lookup.findStatic (called from the callerClass lookup object) creates a static method handle for the method adder.

Note: This bootstrap method links an invokedynamic call site only to the code defined in the adder method, and it assumes that the arguments given to the invokedynamic call site will be Integer objects. A bootstrap method requires additional code to properly link invokedynamic call sites to the appropriate code to execute if the parameters of the bootstrap method (in this example, callerClass, dynMethodName, and dynMethodType) vary.

The classes java.lang.invoke.MethodHandles and java.lang.invoke.MethodHandle contain various methods that create method handles based on existing method handles. This example calls the method asType if the method type of the method handle mh does not match the method type specified by the parameter dynMethodType. This enables the bootstrap method to link invokedynamic call sites to Java methods whose method types do not exactly match.

The ConstantCallSite instance returned by the bootstrap method represents a call site to be associated with a distinct invokedynamic instruction. The target for a ConstantCallSite instance is permanent and can never be changed. In this case there is only one Java method, adder, which is a candidate for executing the call site. Note that this method does not have to be a Java method. Instead, if there were several such methods being available to the runtime system, each handling different argument types, the bootstrap method mybsm could dynamically select the correct method, based on the dynMethodType argument.

The invokedynamic Instruction

The invokedynamic instruction simplifies and potentially improves implementations of compilers and runtime systems for dynamic languages on the JVM. The invokedynamic instruction does this by allowing the language implementer to define custom linkage behavior. This contrasts with other JVM instructions such as invokevirtual, in which linkage behavior specific to Java classes and interfaces is hard-wired by the JVM.

Each instance of an invokedynamic instruction is called a dynamic call site. A dynamic call site is originally in an unlinked state, which means that there is no method specified for the call site to invoke. As previously mentioned, a dynamic call site is linked to a method by means of a bootstrap method. A dynamic call site's bootstrap method is a method specified by the compiler for the dynamically-typed language that is called once by the JVM to link the site. The object returned from the bootstrap method permanently determines the call site's behavior.

The invokedynamic instruction contains a constant pool index (in the same format as for the other invoke instructions). This constant pool index references a CONSTANT_InvokeDynamic entry. This entry specifies the bootstrap method (a CONSTANT_MethodHandle entry), the name of the dynamically linked method, and the argument types and return type of the call to the dynamically linked method.

The following is an example of an invokedynamic instruction. In this example, the runtime system links the dynamic call site specified by this invokedynamic instruction (which is +, the addition operator) to the IntegerOps.adder method by using the bootstrap method Example.mybsm. The methods adder and mybsm are defined in the section The Challenge of Compiling Dynamically Typed Languages (line breaks have been added for clarity):

invokedynamic   InvokeDynamic
  REF_invokeStatic:
    Example.mybsm:
      "(Ljava/lang/invoke/MethodHandles/Lookup;
        Ljava/lang/String;
        Ljava/lang/invoke/MethodType;)
      Ljava/lang/invoke/CallSite;":
    +:
      "(Ljava/lang/Integer;
        Ljava/lang/Integer;)
      Ljava/lang/Integer;";

Note: The bytecode examples in these sections use the syntax of the ASM Java bytecode manipulation and analysis framework.

Invoking a dynamically linked method with the invokedynamic instruction involves the following steps:

  1. Defining the Bootstrap Method
  2. Specifying Constant Pool Entries
  3. Using the invokedynamic Instruction

1. Defining the Bootstrap Method

At runtime, when the JVM first encounters an invokedynamic instruction, it calls the bootstrap method. This method links the name specified by the invokedynamic instruction with the code that should be executed (the target method), which is referenced by a method handle. If the JVM executes the same invokedynamic instruction again, it does not call the bootstrap method; it automatically calls the linked method handle.

The bootstrap method's return type must be java.lang.invoke.CallSite. A CallSite object represents the linked state of an invokedynamic instruction and the method handle to which it is linked.

The bootstrap method takes three or more parameters:

  1. A MethodHandles.Lookup object, which is a factory for creating method handles in the context of the invokedynamic instruction.
  2. A String object, the method name mentioned in the dynamic call site.
  3. A MethodType object, the resolved type signature of the dynamic call site.
  4. Optionally, one or more additional static arguments to the invokedynamic instruction. These arguments, drawn from the constant pool, are intended to help language implementers safely and compactly encode additional metadata useful to the bootstrap method. In principle, the name and extra arguments are redundant since each call site could be given its own unique bootstrap method. However, such a practice is likely to produce large class files and constant pools

See the section The Challenge of Compiling Dynamically Typed Languages for an example of a bootstrap method.

2. Specifying Constant Pool Entries

As mentioned previously, the invokedynamic instruction contains a reference to an entry in the constant pool with the tag CONSTANT_InvokeDynamic. This entry contains references to other entries in the constant pool and references to attributes. This section briefly describes constant pool entries used by the invokedynamic instruction. For more information, see the java.lang.invoke package documentation and The Java Virtual Machine Specification.

Example Constant Pool

The following is an excerpt from the constant pool for the class Example, which contains the bootstrap method Example.mybsm that links the method + with the Java method adder:

    class #159; // #47
    Utf8 "adder"; // #83
    Utf8 "(Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Integer;"; // #84
    Utf8 "mybsm"; // #87
    Utf8 "(Ljava/lang/invoke/MethodHandles/Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)
      java/lang/invoke/CallSite;"; // #88
    Utf8 "Example"; // #159
    Utf8 "+"; // #166

    // ...

    NameAndType #83 #84; // #228
    Method #47 #228; // #229
    MethodHandle 6b #229; // #230
    NameAndType #87 #88; // #231
    Method #47 #231; // #232
    MethodHandle 6b #232; // #233
    NameAndType #166 #84; // #234
    Utf8 "BootstrapMethods"; // #235
    InvokeDynamic 0s #234; // #236

The constant pool entry for the invokedynamic instruction in this example contains three values:

  • CONSTANT_InvokeDynamic tag
  • Unsigned short of value 0
  • Constant pool index #234.

The value 0 refers to the first bootstrap method specifier in the array of specifiers stored in the BootstrapMethods attribute. Bootstrap method specifiers are not in the constant pool table; they are contained in this separate array of specifiers. Each bootstrap method specifier contains an index to a CONSTANT_MethodHandle constant pool entry, which is the bootstrap method itself.

The following is an excerpt from the same constant pool that shows the BootstrapMethods attribute, which contains the array of bootstrap method specifiers:

  [3] { // Attributes

    // ...

    Attr(#235, 6) { // BootstrapMethods at 0x0F63
      [1] { // bootstrap_methods
        {  //  bootstrap_method
          #233; // bootstrap_method_ref
          [0] { // bootstrap_arguments
          }  //  bootstrap_arguments
        }  //  bootstrap_method
      }
    } // end BootstrapMethods
  } // Attributes

The constant pool entry for the bootstrap method mybsm method handle contains three values:

  • CONSTANT_MethodHandle tag
  • Unsigned byte of value 6
  • Constant pool index #232.

The value 6 is the subtag REF_invokeStatic. See the next section, 3. Using the invokedynamic Instruction, for more information about this subtag.

3. Using the invokedynamic Instruction

The following bytecode uses the invokedynamic instruction to call the bootstrap method mybsm, which links the dynamic call site (+, the addition operator) to the method adder. This example uses the + method to add the numbers 40 and 2 (line breaks have been inserted for clarity):

bipush  40;
invokestatic    Method java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
iconst_2;
invokestatic    Method java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
invokedynamic   InvokeDynamic
  REF_invokeStatic:
    Example.mybsm:
      "(Ljava/lang/invoke/MethodHandles/Lookup;
        Ljava/lang/String;
        Ljava/lang/invoke/MethodType;)
      Ljava/lang/invoke/CallSite;":
    +:
      "(Ljava/lang/Integer;
        Ljava/lang/Integer;)
      Ljava/lang/Integer;";

The first four instructions put the integers 40 and 2 on the stack and boxes them in the java.lang.Integer wrapper type. The fifth instruction invokes a dynamic method. This instruction refers to a constant pool entry with a CONSTANT_InvokeDynamic tag:

REF_invokeStatic:
  Example.mybsm:
    "(Ljava/lang/invoke/MethodHandles/Lookup;
      Ljava/lang/String;
      Ljava/lang/invoke/MethodType;)
    Ljava/lang/invoke/CallSite;":
  +:
    "(Ljava/lang/Integer;
      Ljava/lang/Integer;)
    Ljava/lang/Integer;";

Four bytes follow the CONSTANT_InvokeDynamic tag in this entry:

  • The first two bytes form a reference to a CONSTANT_MethodHandle entry that references a bootstrap method specifier:

    REF_invokeStatic:
  Example.mybsm:
    "(Ljava/lang/invoke/MethodHandles/Lookup;
      Ljava/lang/String;
      Ljava/lang/invoke/MethodType;)
    Ljava/lang/invoke/CallSite;"

    As mentioned previously, this reference to a bootstrap method specifier is not in the constant pool table; it is contained in a separate array defined by a class file attribute named BootstrapMethods. The bootstrap method specifier contains an index to a CONSTANT_MethodHandle constant pool entry, which is the bootstrap method itself.

    Three bytes follow this CONSTANT_MethodHandle constant pool entry:

    • The first byte is the subtag REF_invokeStatic. This means that this bootstrap method will create a method handle for a static method; note that this bootstrap method is linking the dynamic call site with the static Java method adder.

    • The next two bytes form a CONSTANT_Methodref entry that represents the method for which the method handle is to be created:

      Example.mybsm:
  "(Ljava/lang/invoke/MethodHandles/Lookup;
    Ljava/lang/String;
    Ljava/lang/invoke/MethodType;)
  Ljava/lang/invoke/CallSite;"

      In this example, the fully qualified name of the bootstrap method is Example.mybsm; the argument types are MethodHandles.Lookup, String, and MethodType; and the return type is CallSite.

  • The next two bytes form a reference to a CONSTANT_NameAndType entry:

    +:
  "(Ljava/lang/Integer;
    Ljava/lang/Integer;)
  Ljava/lang/Integer;"

    This constant pool entry specifies the method name (+), argument types (two Integer instances), and return type of the dynamic call site (Integer).

In this example, the dynamic call site is presented with boxed integer values, which exactly match the type of the eventual target, the adder method. In practice, the argument and return types do not need to exactly match. For example, the invokedynamic instruction could pass either or both of its operands on the JVM stack as primitive int values. Either or both operands could also be untyped Object values. The invokedynamic instruction could also receive its result as a primitive int value, or an untyped Object value. In any case, the dynMethodType argument to mybsm will accurately describe the method type required by the invokedynamic instruction.

Independently, the adder method could also have been given primitive or untyped arguments or return values. The bootstrap method is responsible for making up any difference between the dynMethodType and the type of the adder method. As shown in the code, this is easily done with an asType call on the target method.

Resources

  • java.lang.invoke package documentation
  • The Da Vinci Machine Project
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Virtual Machine Technology

The JDK provides one or more implementations of the Java virtual machine (VM):

  • On platforms typically used for client applications, the JDK comes with a VM implementation called the Java HotSpot Client VM (client VM). The client VM is tuned for reducing start-up time and memory footprint. It can be invoked by using the -client command-line option when launching an application.

  • On all platforms, the JDK comes with an implementation of the Java virtual machine called the Java HotSpot Server VM (server VM). The server VM is designed for maximum program execution speed. It can be invoked by using the -server command-line option when launching an application.

Some features of Java HotSpot technology, common to both VM implementations, are the following.

  • Adaptive compiler - Applications are launched using a standard interpreter, but the code is then analyzed as it runs to detect performance bottlenecks, or "hot spots". The Java HotSpot VMs compile those performance-critical portions of the code for a boost in performance, while avoiding unnecessary compilation of seldom-used code (most of the program). The Java HotSpot VMs also use the adaptive compiler to decide, on the fly, how best to optimize compiled code with techniques such as in-lining. The runtime analysis performed by the compiler allows it to eliminate guesswork in determining which optimizations will yield the largest performance benefit.
  • Rapid memory allocation and garbage collection - Java HotSpot technology provides for rapid memory allocation for objects, and it offers a choice of fast, efficient, state-of-the-art garbage collectors.
  • Thread synchronization - The Java programming language allows for use of multiple, concurrent paths of program execution (called "threads"). Java HotSpot technology provides a thread-handling capability that is designed to scale readily for use in large, shared-memory multiprocessor servers.

Tools

Some operating characteristics of the Java HotSpot VM can be controlled by the use of command-line flags. See documentation for the Java application launcher.

  • Microsoft Windows
  • Solaris, Linux, or Mac OS X operating system

Enhancements

  • Java Virtual Machine Enhancements in Java SE 8 and JDK 8
  • Java Virtual Machine Enhancements in JDK 7
  • Enhancements in JDK 6:
    • DTrace Probes
    • Garbage Collection Enhancements
      • Parallel Compaction
      • Concurrent Mark Sweep Collector Enhancements
    • Performance Enhancements
  • Enhancements in JDK 5.0:
    • Class Data Sharing
    • Server-Class Machine Detection
    • Garbage Collection Ergonomics
    • Thread Priority Changes
  • Enhancements in JDK 1.4:
    • Virtual Machine Enhancements in JDK 1.4.2, 1.4.1 and 1.4.0

More Information

  • Performance Improvements
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

Java™ Virtual Machine Enhancements

Enhancements in Java SE 1.4.2

  • Runtime Performance

    The following are enhancements to runtime performance in 1.4.2. Also see Virtual Machine release notes for issues.

    • The interpreter-only Itanium version of 1.4.1 has been enhanced by the addition of the server compiler. Performance is up to thirty times faster than for 1.4.1.
    • The performance of applications that make heavy use of Class.forName and related methods has been significantly improved.
    • Java Native Interface usage checking via the -Xcheck:jni switch is more extensive and robust than in 1.4.1.
    • Third-party memory managers now work properly when using JVMPI and JVMDI.

  • Client HotSpot Compiler

    The following are enhancements to the client HotSpot compiler in 1.4.2. Also see Virtual Machine release notes for issues.

    • Improvements in compile speed and footprint.

  • Server HotSpot Compiler

    The following are enhancements to the server HotSpot compiler in 1.4.2. Also see Virtual Machine release notes for issues.

    • Use of SSE and SSE2 instructions on IA32 platforms when they are supported by the processor and operating system.
    • Faster integer division by constants.
    • Faster floating-point division by powers of 2.
    • Faster NullPointerException handling.

Enhancements in Java SE 1.4.1

  • Java SE 1.4.1 is available in versions that support the 64-bit Intel Itanium processor on Linux Red Hat 7.2 and Windows XP 64-bit edition. Look for the downloads for these versions on the Java SE 1.4.1 download page.

    In this release, these 64-bit versions have the following limitations.

    • Applications can be run only in interpreted mode. The platform will run in interpreted mode by default, with no need to supply the -Xint flag on the command line when launching an application. When using the 64-bit versions of the Java SE 1.4.1 platform, the command java MyApp will launch and execute MyApp by interpreting the bytecode. Java HotSpot-technology-based dynamic compilers for 64-bit support is planned for a future release of the Java SE platform.
    • The 64-bit versions of Java SE 1.4.1 do not include the Java Plug-in and Java Web Start products.
    • The 64-bit versions of Java SE 1.4.1 do not have an installer application. These versions are available only as a tar bundle.
    The 32-bit versions of the Java SE 1.4.1 will not work on Intel Itanium machines.
  • A deadlock detection utility has been added to the Java HotSpot VM. The utility is invoked by a Ctrl+\ on the command line while an application is running. The utility detects Java-platform-level deadlocks, including locking done from the Java Native Interface (JNI), the Java Virtual Machine Profiler Interface (JVMPI), and Java Virtual Machine Debug Interface (JVMDI).

    When invoked, the utility displays a thread dump to standard out and indicates any Java-platform-level deadlocks it detects. Refer to this sample output. If the application is deadlocked because two or more threads are involved in a cylce to acquire monitors, then the list of such threads and monitors involved in the deadlocks are displayed. Note, however, that this will not find deadlocks involving threads waiting on monitors on which no signal will be forthcoming.

Enhancements in Java SE 1.4.0

  • Signal chaining
  • Error-reporting mechanism
  • The new -Xloggc:file option reports on each garbage-collection event, as with -verbose:gc, but logs this data to file. In addition to the information -verbose:gc provides, each reported event is preceeded by the time (in seconds) since the first garbage-collection event.
  • Beginning with J2SDK 1.4.0, the Classic Virtual Machine is no longer shipped as part of the Java 2 SDK. (On Solaris platforms, the Classic VM was removed in J2SDK 1.3.0.) If you have been running your applications on the Classic VM by using the -classic command-line option, you will need to use either the Java HotSpot Client VM (invoked by default or by using the -client option) or Java HotSpot Server VM (invoked with the -server option). Attempting to launch an application with the -classic option will result in this message: Error: Classic VM no longer supported.

  • The Solaris-SPARC platform edition of J2SDK 1.4.0 will support 64-bit operation on 64-bit Sparc-v9 platforms when using the Java HotSpot Server VM. With a 64-bit address space, more than four gigabytes of heap memory is available. The Java HotSpot Server VM includes support for both 32-bit and 64-bit operations, and users can select either 32-bit or 64-bit operation by using command-line flags -d32 or -d64, respectively.
    • Users of the Java Native Interface will need to recompile their code to be able to run it on the 64-bit VM.
    • There is no 64-bit support for the Java HotSpot Client VM. Only the Java HotSpot Server VM provides for optional 64-bit operation.
    • Users must install 64-bit Solaris support in order to run the virtual machine in 64-bit mode.
    • On older Sparcv9 systems, users must modify the file /platform/sun4u/boot.conf in order to enable 64-bit programs. See the text in the boot.conf file for more information.
  • The new -Xcheck:jni command-line option performs additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.
  • The Java SE 1.4.0 platform accepts class file versions in the range 45.3 to 48.0.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JRockit Command Flags Migrated to HotSpot

The following Java command flags have been ported from the Oracle JRockit VM and are now available in the HotSpot VM in JDK7 Update 4.

Comparison of Flags in HotSpot and JRockit

Jrockit | HotSpot | Definition
-Xlargepages | -XX:+UseLargePages | Use this flag to enable large page support. Large pages are enabled by default on Solaris.
-Xlargepages:exitOnFailure=true | (no equivalent) | In JRockit, if this flag is set to true, the JVM exits if a large page request fails. HotSpot doesn't have an equivalent flag. If a large page request fails at JVM initialization, the HotSpot JVM prints a error message. However, execution continues using the default page size.
-XX:MaxLargePageSize=N | -XXLargePageSizeInBytes=N | Sets the large page size in bytes.
-XX:+UseLargePagesForHeap | default behavior for HotSpot | If large pages are enabled in HotSpot, then they will always be used for the Java heap.
-Xms | -Xms | Sets the initial heap size
-Xmx | -Xmx | Sets the maximum heap size. For server deployments, -Xms and -Xms are often set to the same value
-Xns | -Xmn or -XX:NewSize | Sets the size of the young generation (nursery).
-XXaggressive | -XX:+AggressiveOpts | Enables aggressive optimization. The type and level of optimization varies between Jrockit and HotSpot, and between releases. Therefore it is not directly comparable between JVMs.
-Xgc:genpar | -XX:+UseParallelOldGC | Enables the parallel garbage collectors that are optimized for throughput and average response time.
-Xpausetarget | -XX:MaxGCPauseMillis=nnn | Sets a target for the maximum GC pause time. This is a soft goal, and the JVMs will both do their best effort to achieve it. In Jrockit, the default value is 500ms. In HotSpot, there is no maximum value set by default.
-XgcPrio:pausetime | -XX:+UseConcMarkSweepGC or -XX:+UseG1GC | In HotSpot, these flags enables either the Concurrent Mark Sweep (CMS) or the G1 garbage collectors.
-Xxgcthreads=n | -XX:ParallelGCThreads=n | Sets the number of GC threads in the parallel collectors.
-Xverbose:opt | -XX:+PrintCompilation | Prints verbose output from the HotSpot dynamic runtime compilers.
-Xverbose:gcpause | -XX:+PrintGCDetails -XX:+PrintGCTimeStamps | Prints garbage collection output along with time stamps.
-xverbose:compaction | -XX:+PrintGCDetails -XX:+PrintGCTimeStamps | Prints garbage collection output along with time stamps.
-XxcompressedRefs | -XX:+UseCompressedOops (default) | Enables compressed references in 64-bit JVMs. NOTE: Need to cross reference with HotSpot VM tuning options doc.
-XX:+UseCallProfiling | default behavior in HotSpot | In JRockit, this flag enables call profiling for use in JIT optimization. This is the default behavior in HotSpot.
-XX:+UseAllocPrefetch | -XX:AllocationPrefetchStyle=2 (default) | Sets the style of prefetch used during allocation.
-XX:tlasize:min=4k,preferred=2048k | -XX:TLABSize=n | This flag tunes the size of TLABs. Both Jrockit and HotSpot use TLABS by default, and HotSpot automatically sizes TLABs based on allocation patterns.
Jrockit is more aggressive processing soft references by default | -XX:SoftRefLRUPolicyMSPerMB=0 | This flag enabled aggressive processing of software references. Use this flag if HotSpot GC is impacted by software reference count.
Jrockit internal data structures are tuned for high class count by default. | -XX:+UnlockExperimentalVMOptions -XX:PredictedClassLoadCount=n | Use this flag if your application loads a lot of classes, and especially if class.forName() is used heavily. The recommended value is the number of classes loaded as shown in the output from -verbose:class.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Parallel Compaction

  • Description
  • Enabling Parallel Compaction
  • More Information

Description

Parallel compaction complements the existing parallel collector by performing full GCs in parallel to take advantage of multiprocessor (or multi-threaded) hardware. As the name suggests, it is best suited to platforms that have two or more CPUs or two or more hardware threads. It was first made available in JDK 5.0 update 6; the implementation in JDK 6 contains significant performance improvements.

Prior to the availability of parallel compaction, the parallel collector would perform young generation collections (young GCs) in parallel, but full GCs were performed single-threaded. (During a young GC, only the young generation is collected; during a full GC the entire heap is collected. See the documents referenced below for more details on generations and garbage collection.) Parallel compaction performs full GCs in parallel, resulting in lower garbage collection overhead and better application performance, particularly for applications with large heaps running on multiprocessor hardware.

Enabling Parallel Compaction

Parallel compaction is not enabled by default; add the option

-XX:+UseParallelOldGC

to the java command line to enable parallel compaction. (Parallel compaction will likely be enabled by default on multiprocessor hardware in a future release.)

Note that parallel compaction is not available in combination with the concurrent mark sweep collector; it can only be used with the parallel young generation collector. The documents referenced below provide more information on the available collectors and recommendations for their use.

More Information

The HotSpot documentation page contains links to Garbage Collection Tuning Guides, specific to each release, which include guidelines for choosing the garbage collector that best suits your requirements and techniques that can help reduce garbage collection overhead.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Sample Output from Deadlock Detection Utility

^\Full thread dump Java HotSpot(TM) Client VM (1.4.1 mixed mode):

"DestroyJavaVM" prio=5 tid=0x2c788 nid=0x1 waiting on condition [0..ffbee16c]

"Thread-7" prio=5 tid=0x119570 nid=0x11 waiting for monitor entry [f1681000..f168199c]
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f203fe18> (a java.lang.Object)
        - locked <f6112a88> (a java.lang.String)

"Thread-6" prio=5 tid=0x118a18 nid=0x10 waiting for monitor entry [f1781000..f178199c]
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f6112a88> (a java.lang.String)
        - locked <f203fe18> (a java.lang.Object)

"Thread-5" prio=5 tid=0x117660 nid=0xf waiting on condition [f1881000..f188199c]
        at java.lang.Thread.sleep(Native Method)
        at Deadlock$3.run(Deadlock.java:55)
        - locked <f203fe10> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:536)

"Thread-4" prio=5 tid=0x116ab8 nid=0xe waiting for monitor entry [f1981000..f198199c]
        at Deadlock.jniEnter(Native Method)
        at Deadlock$2.run(Deadlock.java:41)
        at java.lang.Thread.run(Thread.java:536)

"Thread-3" prio=5 tid=0x115f10 nid=0xd runnable [f1a81000..f1a8199c]
        at Deadlock.rawEnter(Deadlock.java:76)
        at Deadlock$1.run(Deadlock.java:24)
        at java.lang.Thread.run(Thread.java:536)

"Thread-2" prio=5 tid=0x1154a8 nid=0xc waiting for monitor entry [f1b81000..f1b8199c]
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f6112a60> (a java.lang.String)
        - locked <f203fe00> (a java.lang.Object)

"Thread-1" prio=5 tid=0x115270 nid=0xb waiting for monitor entry [f1c81000..f1c8199c]
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f203fe00> (a java.lang.Object)
        - locked <f203fdf8> (a java.lang.Object)

"Signal Dispatcher" daemon prio=10 tid=0xbac48 nid=0x9 waiting on condition [0..0]

"Finalizer" daemon prio=8 tid=0xb5590 nid=0x6 in Object.wait() [fa381000..fa38199c]
        at java.lang.Object.wait(Native Method)
        - waiting on <f2000490> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <f2000490> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0xb3c40 nid=0x5 in Object.wait() [fdf81000..fdf8199c]
        at java.lang.Object.wait(Native Method)
        - waiting on <f2000380> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:426)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
        - locked <f2000380> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=5 tid=0xb2808 nid=0x4 runnable

"VM Periodic Task Thread" prio=10 tid=0xb9190 nid=0x7 waiting on condition
"Suspend Checker Thread" prio=10 tid=0xb9ae8 nid=0x8 runnable

Found one Java-level deadlock:
=============================
"Thread-7":
  waiting to lock monitor 0xb48d8 (object 0xf203fe18, a java.lang.Object),
  which is held by "Thread-6"
"Thread-6":
  waiting to lock monitor 0xb48a0 (object 0xf6112a88, a java.lang.String),
  which is held by "Thread-7"

Java stack information for the threads listed above:
===================================================
"Thread-7":
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f203fe18> (a java.lang.Object)
        - locked <f6112a88> (a java.lang.String)
"Thread-6":
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f6112a88> (a java.lang.String)
        - locked <f203fe18> (a java.lang.Object)

Found one Java-level deadlock:
=============================
"Thread-4":
  waiting to lock monitor 0xb4868 (object 0xf203fdf8, a java.lang.Object)
  in JNI, which is held by "Thread-1"
"Thread-1":
  waiting to lock monitor 0xb4910 (object 0xf203fe00, a java.lang.Object),
  which is held by "Thread-2"
"Thread-2":
  waiting to lock monitor 0xb4830 (object 0xf6112a60, a java.lang.String),
  which is held by "Thread-3"
"Thread-3":
  waiting to lock monitor 0x119520 (JVMDI/JVMPI raw monitor),
  which is held by "Thread-4"

Java stack information for the threads listed above:
===================================================
"Thread-4":
        at Deadlock.jniEnter(Native Method)
        at Deadlock$2.run(Deadlock.java:41)
        at java.lang.Thread.run(Thread.java:536)
"Thread-1":
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f203fe00> (a java.lang.Object)
        - locked <f203fdf8> (a java.lang.Object)
"Thread-2":
        at Locker.run(Deadlock.java:98)
        - waiting to lock <f6112a60> (a java.lang.String)
        - locked <f203fe00> (a java.lang.Object)
"Thread-3":
        at Deadlock.rawEnter(Deadlock.java:76)
        at Deadlock$1.run(Deadlock.java:24)
        at java.lang.Thread.run(Thread.java:536)

Found 2 deadlocks.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Server-Class Machine Detection

Starting with Java SE 5.0, when an application starts up, the launcher can attempt to detect whether the application is running on a "server-class" machine and, if so, use the Java HotSpot Server Virtual Machine (server VM) instead of the Java HotSpot Client Virtual Machine (client VM). The aim is to improve performance even if no one configures the VM to reflect the application it's running. In general, the server VM starts up more slowly than the client VM, but over time runs more quickly.

Note: For Java SE 6, the definition of a server-class machine is one with at least 2 CPUs and at least 2GB of physical memory.

In Java SE 6, server-class detection occurs if neither -server nor -client is specified when launching the application on an i586 or Sparc 32-bit machine running Solaris or Linux. As the following table shows, the i586 Microsoft Windows platform uses the client VM by default. The remaining platforms use only the server VM.

Architecture | OS | Default client VM | if server-class, server VM; otherwise, client VM | Default server VM
SPARC 32-bit | Solaris |  | X |
i586 | Solaris |  | X |
i586 | Linux |  | X |
i586 | Microsoft Windows | X |  |
SPARC 64-bit | Solaris | — |  | X
AMD64 | Solaris | — |  | X
AMD64 | Linux | — |  | X
AMD64 | Microsoft Windows | — |  | X
Legend: X = default VM — = client VM not provided for this platform

For details of using command-line options for launching applications, see the java tool documentation for Solaris, Linux, or Mac OS X, or Microsoft Windows.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Signal Chaining

The Java 2 SDK, Standard Edition, (JDK) v1.4 contains a new signal-chaining facility. Signal-chaining enables the Java Platform to better interoperate with native code that installs its own signal handlers. The facility works on both Solaris and Linux platforms.

The signal-chaining facility was introduced to remedy a problem with signal handling in previous versions of the Java HotSpot VM. Prior to version 1.4, the Java HotSpot VM would not allow application-installed signal handlers for certain signals including, for example, SIGBUS, SIGSEGV, SIGILL, etc, since those signal handlers could conflict with the signal handlers used internally by the Java HotSpot VM.

The signal-chaining facility offers the following:

  • Support for pre-installed signal handlers when the HotSpot VM is created.
  • Support for signal handler installation after the HotSpot VM is created, inside JNI code or from another native thread.

Pre-installed signal handlers (A) are supported by means of saving existing signal handlers, for signals that are used by the VM, when the VM is first created. Later, when any of these signals are raised and found not to be targeted at the Java HotSpot VM, the pre-installed handlers are invoked. In other words, pre-installed handlers are "chained" behind the VM handlers for these signals.

The signal-chaining facility also allows an application to link and load a shared library libjsig.so before libc/libthread/libpthread. This library ensures that calls such as signal(), sigset(), and sigaction() are intercepted so that they do not actually replace the Java HotSpot VM's signal handlers if the handlers conflict with those already installed by the Java HotSpot VM (B). Instead, these calls save the new signal handlers, or "chain" them behind the VM-installed handlers. Later, when any of these signals are raised and found not to be targeted at the Java HotSpot VM, the pre-installed handlers are invoked. libjsig.so is not needed if (B) is not required.

To use libjsig.so, either link it with the application that creates/embeds a HotSpot VM, for example:

cc -L <libjvm.so dir> -ljsig -ljvm java_application.c
or use LD_PRELOAD environment variable, for example:
export LD_PRELOAD=<libjvm.so dir>/libjsig.so; java_application (ksh)

setenv LD_PRELOAD <libjvm.so dir>/libjsig.so; java_application (csh)
The interposed signal()/sigset()/sigaction() return the saved signal handlers, not the signal handlers installed by the Java HotSpot VM which are seen by the OS.

The signal-chaining facility was introduced to address Request for Enhancement number 4381843.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Thread Priority on Solaris

Documentation Contents

Thread Priority on the Solaris Platform

This document discusses how the Java virtual machine (JVM) maps priorities for threads executing in the JVM (Java threads) onto native thread priorities on Solaris. It covers both current and past implementations of Solaris threads and the JVM.

  • Background Information: Java Threads
  • Background Information: Solaris Threads
    • Libthread Variants: T1 and T2
    • Native LWP Priorities
    • Summary
  • Historical Thread Priority Implementations
    • Before JRE 1.4.2
    • JRE 1.4.2
    • JRE 5.0
  • Miscellany
  • General Scheduling Issues: Priority, Yielding, and Monitor Fairness

Background Information: Java Threads

The JVM defines a range of ten logical priorities for Java threads, including:

java.lang.Thread.MIN_PRIORITY  = 1
java.lang.Thread.NORM_PRIORITY = 5
java.lang.Thread.MAX_PRIORITY  = 10

These values [1..10] are passed into Thread.setPriority(int) to assign priorities to Java threads. The default priority of a Java thread is NORM_PRIORITY. (A Java thread that doesn't explicitly call setPriority runs at NORM_PRIORITY.) A JVM is free to implement priorities in any way it chooses, including ignoring the value.

The Java HotSpot virtual machine currently associates each Java thread with a unique native thread. The relationship between the Java thread and the native thread is stable and persists for the lifetime of the Java thread.

Background Information: Solaris

Libthread Variants: T1 and T2

Prior to Solaris 9 the default libthread was the so-called T1 libthread. T1 provided an M:N threading model where M native threads were multiplexed on top of N kernel threads (LWPs). The relationship between native threads and LWPs was fluid and dynamic and could change even while a thread was running and without the knowledge of the thread. Solaris provided the priocntl() system call to change the dispatching priority of an LWP, but because the relationship between LWPs and native threads was unstable so there was no reliable way to change to change the dispatching priority of a native thread. (The JVM could change the priority of the LWP on which a Java thread was currently running, but the thread could switch to another LWP without the JVM's knowledge).

T2, the default libthread in Solaris 9 and better, implements a much more simple and robust 1:1 threading model. Each native thread is assigned to a unique LWP, and that relationship is stable for the lifetime of the native thread.

Both T1 and T2 expose a thr_setprio() API that applications use to set a thread's process-local priority. The value assigned by thr_setprio() is a process-local attribute and is not visible to the kernel scheduler. The thr_setprio()-priority controls the placement and ordering of threads on user-level process-local sleep queues, such as the queue of threads associated with a contended process-local mutex. In HotSpot most mutexes are uncontended and condvars have usually have either 0 or 1 threads. As such, the ordering imposed by thr_setprio()-priority has very little effect on most Java threads. The thr_setprio() function supports priority values in the range 0 through 127, inclusive, with 127 representing the highest priority.

T1 also uses thread priority to implement rudimentary user-mode preemption. T1 maintains an invariant that the thr_setprio()-priority of any thread on the local ready queue must be less than or equal to the priority of any unbound thread that's currently running and associated with an LWP. If the invariant is threatened, T1 preempts the lowest priority executing thread to "steal" its LWP in order to reestablish the invariant.

Preemption can occur in these cases:

  • When a running native thread lowers its own priority
  • When a running native thread increases the priority of a ready thread
  • When a native thread becomes ready, and its priority is higher than any "running" native thread. This could happen, for example, when a Java thread exits a monitor or calls notify and the JVM is using user-level Solaris synchronization primitives.

An early version of T2, referred to as the alternate libthread, appeared in Solaris 8.

Native LWP Priorities

In Solaris an LWP's priority influences how many CPU cycles a thread receives relative to other threads. The Solaris scheduler uses priority (among other factors) to determine if one thread should preempt another thread, how often a thread runs, and how long a thread runs. Native LWP priorities are assigned by the priocntl() system call.

Summary

To recap, we have Java threads, with priorities set by the Thread.setPriority method. Java threads run on native threads. The thr_setprio() function is used to change the priority of native threads. Native threads run on LWPs. The priocntl() system call is used to change the priority of LWPs.

Historical Thread Priority Implementations

Before 1.4.2

In releases earlier than 1.4.2, when a Java thread called the Thread.setPriority method or when a thread was created, HotSpot would call thr_setprio() to map the Java priority to an native priority. Calling thr_setprio() had very little effect on the execution behavior of a Java thread. The JVM did not call priocntl() to adjust the priority of the underlying LWP. This was a conscious design decision because in the 1.4.2 time frame the only libthread available on Solaris was the older T1 libthread.

Note: The JVM could have forced native threads to be bound 1:1 to LWPs under T1 by specifying THR_BOUND when threads are created. THR_BOUND is not sufficient, however, as threads that attach to the JVM might not be THR_BOUND and the primordial thread is not THR_BOUND. Given that there's no way in Solaris to force a thread to be bound after it's been created, the HotSpot implementors decided that it was prudent not to change LWP priority when a Java thread called setPriority()

1.4.2

In 1.4.2 HotSpot was able to determine at startup time if it was running under T1 or T2. If the JVM started under T1 the effect of priorities would be precisely the same as in earlier releases.

Under T2, however, 1.4.2 translated calls to the Thread.setPriority method into calls to both thr_setprio() (to change the native process-local priority) and to priocntl() (to change the dispatching priority of the underlying LWP). The JVM called priocntl() only for threads that are running in the TS (timeshare), IA (interactive), and RT (real-time) scheduling classes. Refer to the Solaris priocntl(2) man page for a description of scheduling classes. If a Java thread was not in the TS, IA, or RT scheduling classes the JVM would not attempt to set the priority of the underlying LWP with priocntl().

Unfortunately the default priority of native threads in the TS and IA scheduling classes is the highest possible priority. The default logical priority for Java threads is NORM_PRIORITY, which is midway in domain of Java thread priorities. When the JVM maps NORM_PRIORITY to native and LWP priorities, the outcome is a value that is less then the default native priority. Let's say we have a 2-CPU system running a JVM, and that JVM has two Java threads, both at NORM_PRIORITY. Assume that the threads are in the IA or TS scheduling class, as is commonly the case. When the Java threads are created, the JVM calls priocntl() to map NORM_PRIORITY to the middle of the TS or IA priority bands. Furthermore, assume that 2 native "C" threads in another process are running/ready concurrently with the Java threads. Both the native C threads and the Java threads are CPU-bound and spin, computing. The native threads will run at the highest priority in the TS or IA scheduling class, and the JVM threads will run at the middle priority. Since all four threads are competing for CPU cycles, the native threads will receive relatively more CPU cycles and the Java threads will, in a sense, be disadvantaged. This effect occurs only when Java threads compete with normal threads and the system is entirely saturated.

Conversely, a benefit of using lower relative priorities is that in the TS and IA scheduling classes a thread running at lower priorities receives a longer quantum, assuming that it's not preempted mid-quantum by higher priority threads that become ready. A longer quantum is often beneficial for threads in server applications as the context switch rate from preemption decreases. A thread is permitted to run on a CPU for a longer period and the cache-reload transient (the period immediately after a thread is scheduled on to a CPU: when a thread incurs a high cache miss rate as it repopulates the CPU's data caches and displaces the previous thread's data) is amortized over a longer quantum.

JRE 5.0

JRE 5.0 provides the same priority mapping as 1.4.2 except that Java priorities in the range [10...5] are all mapped to the highest possible TS or IA priority, while priorities in the range [1..4] are mapped to correspondingly lower native TS or IA priorities. The advantage of this change is that Java threads at NORM_PRIORITY can now compete as expected with native threads. If neither the Java threads nor the native threads have explicitly set priorities (which is commonly the case), both classes of thread will compete on an equal footing, running at the highest priority in the TS or IA scheduling class.

Assuming that Java threads don't explicitly set their priority with setPriority(), this change restores the behavior and effective LWP priority of Java threads that was used prior to 1.4.2. The disadvantage to this implementation is that Java priorities from 5 to 10 are not differentiated. A Java thread at logical priority 8 maps to the same LWP priority as a Java thread at priority 9, for instance.

Miscellany

The following statements apply to all versions of HotSpot:

  • The JVM never changes the scheduling class of an LWP.
  • Calling the Thread.setPriority method may be an expensive operation. Frivolous priority adjustments can reduce performance.
  • If a foreign thread attaches to a JVM, the JVM sets that thread's priority to NORM_PRIORITY. This, in turn, changes the thread's native priority and potentially changes the priority of the LWP on which the native thread is running. Specifically, if a native thread adjusts its priority and then attaches to a JVM, the JVM overwrites the previous priority settings of the thread. The JVM does not "undo" or restore a native thread's priority if the thread detaches.

General Scheduling Issues: Priority, Yielding, and Monitor Fairness

The Thread.setPriority and Thread.yield methods are advisory. They constitute hints from the application to the JVM. Properly written, robust, platform-independent code can use setPriority() and yield() to optimize the performance of the application, but should not depend on these attributes for correctness. Likewise, no assumptions should be made about the order in which threads are granted ownership of a monitor or the order in which threads wake in response to the notify or notifyAll method.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java XML Technology Enhancements

The following topics are covered:

  • Enhancements in Java SE 7u45
  • Enhancements in Java SE 7u40
  • Enhancements in Java SE 7
  • Enhancements in Java SE 6
  • Enhancements in Java SE 5.0
  • Enhancements in Java SE 1.4
  • Previous Enhancements

Enhancements in Java SE 7u45

Three processing limits have been added to JAXP in the 7u45 release. For more information, see the new Processing Limits lesson in the Java Tutorial.

Enhancements in Java SE 7u40

The 7u40 release contains Java API for XML Processing (JAXP) 1.5, which adds the ability to restrict the set of network protocols that may be used to fetch external resources. For more information, see JEP 185: JAXP 1.5: Restrict Fetching of External Resources and the new JAXP 1.5 and New Properties lesson in the Java Tutorial.

Enhancements in Java SE 7

JAXP

  • The Java SE 7 release now contains Java API for XML Processing (JAXP) 1.4.5.
  • There have been many bug fixes and some improvements over the previous version, particularly in the areas of conformance, security, and performance.
  • The specification is still JAXP 1.4, however StAX has been upgraded to StAX 1.2 in accordance with the JSR 173 Maintenance Review 3.
For more information, see the JAXP 1.4.5 Release Notes and the JAXP 1.4.5 Change log.

JAXB

The Java SE 7 release supports Java Architecture for XML Binding (JAXB) 2.2.3. For more information, see the JAXB Change log for JAXB RI 2.2 and above.

JAX-WS

The Java SE 7 release supports Java API for XML Web Services (JAX-WS) 2.2.4. For more information, see the JAX-WS Change log for JAX-WS RI 2.2 and above.

Enhancements in Java SE 6

No changes to report.

Enhancements in Java SE 5.0

No changes to report.

Enhancements in Java SE 1.4

No changes to report.

Previous Enhancements

No changes to report.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


XML in Java SE

XML (Extensible Markup Language) is a flexible way to create common information formats and share both the format and the data on the World Wide Web, intranets, and elsewhere. XML can be used by any individual or group of individuals or companies that wants to share information in a consistent way. XML, a formal recommendation from the World Wide Web Consortium (W3C), is similar to the language of today's Web pages, the Hypertext Markup Language (HTML). Both XML and HTML contain markup symbols to describe the contents of a page or file. HTML, however, describes the content of a Web page (mainly text and graphic images) only in terms of how it is to be displayed and interacted with. For example, a <P> starts a new paragraph. XML describes the content in terms of what data is being described. For example, a <PHONENUM> could indicate that the data that followed it was a phone number. This means that an XML file can be processed purely as data by a program or it can be stored with similar data on another computer or, like an HTML file, that it can be displayed. For example, depending on how the application in the receiving computer wanted to handle the phone number, it could be stored, displayed, or dialed.

XML Features Java SE

  • The Java API For XML Processing (JAXP)
  • The Java Architecture For XML Binding (JAXB)
  • The Java API for XML Web Services (JAX-WS)

API Enhancements

  • Enhancements

More Information

  • Java Technology XML Home Page
  • The Java EE 6 Tutorial
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java API for XML Web Services

The Java API for XML Web Services (JAX-WS) simplifies creating and deploying web services and web services clients.

The Java Platform, Standard Edition (Java SE) includes JAX-WS 2.2.

Backward Compatibility

Two small source compatibility anomalies exist between JAX-WS versions 2.1 and 2.2. The changes in the API are as follows:

  • In the FaultAction annotation, the className element's type changed from being a plain vanilla java.lang.Class to being java.lang.Class<? extends java.lang.Exception>.
  • In the WebServiceRef annotation, the value element's type is now more specific. Instead of being java.lang.Class, the type is now java.lang.Class<? extends Service>.

Because of these changes, some applications that compile with Java SE 6 might not compile with Java SE 7. There will be a deployment error if incorrect types are used with JAX-WS 2.1 API. In Java SE 7, these type errors are caught at compile time instead of deployment time.

References

  • API reference
  • Building Web Services with JAX-WS , part of the Java EE 6 Tutorial
  • JAX-WS Reference Implementation project

Specification

  • JSR 224: Java API for XML-Based Web Services (JAX-WS) 2.0
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Architecture for XML Binding

The Java Architecture for XML Binding (JAXB) provides an API and tools that automate the mapping between XML documents and Java objects.

The JAXB framework enables developers to perform the following operations:

  • Unmarshal XML content into a Java representation
  • Access and update the Java representation
  • Marshal the Java representation of the XML content into XML content

JAXB gives Java developers an efficient and standard way of mapping between XML and Java code. Java developers using JAXB are more productive because they can write less code themselves and do not have to be experts in XML. JAXB makes it easier for developers to extend their applications with XML and Web Services technologies.

Tutorials and Programmer's Guides

  • Running the binding compiler (XJC): [command-line instructions, using the XJC Ant task]
  • Running the schema generator (schemagen): [command-line instructions, using the SchemaGen Ant task]
  • Unofficial JAXB User's Guide
  • Sample Applications
  • JAXB FAQ

API Enhancements

  • Release Notes

API Specification

  • Javadoc API documentation (javax.xml.bind.*)
  • JAXB Specification

More Information

  • JAXB Project Community Page
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP

Documentation Contents

Java API for XML Processing

Java API for XML Processing (JAXP) enables applications to parse, transform, validate and query XML documents using an API that is independent of a particular XML processor implementation. JAXP provides a pluggability layer to enable vendors to provide their own implementations without introducing dependencies in application code. Using this software, application and tool developers can build fully-functional XML-enabled Java applications for e-commerce, application integration, and web publishing.

The Java SE 7 Update 40 release includes JAXP 1.5.0. The Java SE 8 release includes JAXP 1.6. For information about the current development activities, please refer to the JAXP project.

API Specification

The JAXP API includes the following packages:

  • javax.xml.datatype
  • javax.xml.namespace
  • javax.xml.parsers
  • javax.xml.stream
  • javax.xml.stream.events
  • javax.xml.stream.util
  • javax.xml.transform
  • javax.xml.transform.dom
  • javax.xml.transform.sax
  • javax.xml.transform.stax
  • javax.xml.transform.stream
  • javax.xml.validation
  • javax.xml.xpath
  • org.w3c.dom
  • org.w3c.dom.ranges
  • org.w3c.dom.traversal
  • org.w3c.dom.bootstrap
  • org.w3c.dom.events
  • org.w3c.dom.ls
  • org.xml.sax
  • org.xml.sax.ext
  • org.xml.sax.helpers

Enhancements

  • JAXP 1.6 Enhancements in Java SE 8
  • JAXP 1.4 (Java SE 6) Release Notes
  • JAXP 1.4 (Java SE 6) Compatibility Guide
  • JAXP 1.3 (Java SE 5) Release Notes
  • JAXP 1.3 (Java SE 5) Compatibility Guide

Guides and Tutorials

  • JAXP Tutorial, part of the Java Tutorial.
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP 1.3 Release Notes

Documentation Contents

Java API for XML Processing Release Notes

Specification Version: 1.3
Reference Implementation (RI) Version: 1.3.0

This document contains installation instructions and other notes that may help you use this software library more effectively. See also the JAXP FAQ for more information.

Note:
If you are reading this page online, this is the most current version of the release notes. If this page was downloaded as part of the release bundle, please see the JAXP Documentation page for the most current version of the release notes.

Contents

  • Component Versions
  • Identifying the JAR Files
  • XML Parsing
    • Known Schema Processing Limitations
    • Known Migration Issues
      • from JAXP 1.1
      • from JAXP 1.2
  • The Compiling XSLT Processor (XSLTC)
    • Custom Class Loader Issue
  • JWSDP Security Considerations
  • Changes in JAXP RI Versions

Component Versions

These versions of the relevant technologies have been incorporated into the reference implementation.
  • Xerces version 2.6.2 + (Xerces version 2.6.2 with controlled bug fixes)
  • XSLTC version 2.6.0 + (XSLTC version 2.6.0 , with controlled bug fixes, based on the Xalan 2.6.0 release)

Identifying the JAR Files

This release is contained in six JAR files:

jaxp-api.jar
The javax.xml.parsers, javax.xml.transform, javax.xml.xpath, javax.xml.validation, javax.xml.datatype, and javax.xml.namespace components of JAXP. These packages contain the APIs that give applications a consistent way to obtain instances of XML processing implementations. The javax.xml.xpath package supports the standard XPath API.
sax.jar
The APIs and helper classes for the Simple API for XML (SAX), used for serial access to XML data. The APIs support SAX version 2.0.2.
dom.jar
The APIs and helper classes for the Document Object Model (DOM), used to create an in-memory tree structure from the XML data. The APIs support DOM Level 3.
xercesImpl.jar
The implementation classes for the SAX and DOM parsers, as well as Xerces-specific implementations of the JAXP APIs..
xalan.jar
Contains XSLTC the compiling XSLT processor from the Xalan project.

XML Parsing

The information in this section pertains to the Xerces technology. The latest updates can be found at https://jaxp.java.net. For information on known bugs and recent fixes in the latest Apache version, see http://xml.apache.org/xerces2-j/releases.html.

Known Schema Processing Limitations

This section discusses known schema processing bugs, limitations, and implementation-dependent operations.

Limitations

These limitations specify known upper bounds on values.
  • Length, minLength, and maxLength facets are limited to the value 2147483647.
    Items larger than this limit will not be validated correctly.
  • Year and seconds values in date/time datatypes are limited to the value 2147483647.
    Items larger than this limit will not be validated correctly.

Implementation-Dependent Operations

This implementation-dependent operation is not fully clarified by the W3C XML Schema specification (http://www.w3.org/2001/XMLSchema). As a result, differing implementations exist.
  • The JAXP 1.2 reference implementation parser (Xerces 2.0.1), <keyref> Identity Constraints refers to <key> or <unique> identity constraints within the scope of the elements to which the <keyref> is attached, as defined in the XML Schema Part 1: Structures. (The introductory section of XML Schema, on the other hand, (XML Schema Part 0: Primer) contains an example with a <keyref> declared on an element used inside the element of its corresponding <key>. The discrepancy is noted here in an effort to avoid confusion.)

Known Migration Issues

This section covers known issues that arise when migrating from earlier versions of JAXP.

Migrating from JAXP 1.2

JAXP 1.2 is built into JWSDP and J2EE 1.4. These sections of the Compatibility Guide cover the relevant migration issues:

  • IOException added to SAX EntityResolver API
    This is a change to the SAX 2.0.1 API.
  • Methods added to DOM interfaces
    This is a change in the DOM Level 3 API.
  • Package Name Changes
    This change affects applications that access implementation-specific features.

Migrating from JAXP 1.1

JAXP 1.1 is built into J2EE 1.3 and Java SE 1.4. For differences in functionality from JAXP 1.1, see the JAXP Compatibility Guide.

DOM Level 3 Implementation Notes

This section contains implementation notes for DOM Level 3 Core and DOM Level 3 Load and Save.

DOM Level 3 Core

Not implemented:

  • DOMConfiguration "infoset" parameter - value "true" is not supported.

Supported parameters:

  • error-handler [ DOMErrorHandler ]
  • resource-resolver [ DOMResourceResolver ]
  • schema-type [ String ]
  • schema-location [ String ]
  • canonical-form [ false ]
  • cdata-sections [ true/false ]
  • comments [ true/false ]
  • namespaces [ true/false ]
  • entities [ true/false ]
  • infoset [ false ]
  • namespace-declarations [ true ]
  • normalize-characters [ false ]
  • split-cdata-sections [ true/false ]
  • validate-if-schema [ true/false ]
  • whitespace-in-element-content [ true ]
  • datatype-normalization [ true/false ]
  • validate [ true/false ] -- revalidation is supported only against XML Schemas. For more information, please refer to How to revalidate DOM in memory? .
  • validate-if-schema [ true/false ]
  • check-character-normalization [ false ]
  • well-formed [ true/false ]
  • psvi [ true/false ] -- (NON-DOM) setting the value of this parameter to true will include PSVI information in the DOM tree. To access the information, cast dom.Element to org.apache.xerces.xs.ElementPSVI and dom.Attr to org.apache.xerces.xs.AttributePSVI.

DOM Level 3 Load and Save

Not supported:

  • LSParser parserWithContext
  • DOMImplementationLS MODE_ASYNCHRONOUS
  • LSSerializer - the following parameters are not supported:
    • ignore-unknown-character-denormalizations [ true ]
    • normalize-characters [ true ]
    • well-formed [ true ]

The Compiling XSLT Processor (XSLTC)

The XSLTC transformer generates a transformation engine, or translet, from an XSL stylesheet. This approach separates the interpretation of stylesheet instructions from their runtime application to XML data.

XSLTC works by compiling a stylesheet into Java byte code (translets), which can then be used to perform XSLT transformations. This approach greatly improves the performance of XSLT transformations where a given stylesheet is compiled once and used many times. It also generates an extremely lightweight translet, because only the XSLT instructions that are actually used by the stylesheet are included.

Note:
XSLT is supported by the JAXP transform package. See javax.xml.transform for details on accessing basic XSLT functionality in an implementation-independent manner.

Custom Class Loader Issue

A problem can occur when using a custom class loader with a transformation factory.

Transformation factories in JAXP always prefer the use of the "context class loader" to the use of the "system class loader". Thus, if an application uses a custom class loader, it may need to set the custom class loader as the context class loader for transformation factory to use it. Setting a custom class loader on the current thread can be done as follows:

try {
  Thread currentThread = Thread.currentThread();
  currentThread.setContextClassLoader(customClassLoader);
}
catch (SecurityException e) {
  // ...
}

If the application is multi-threaded, the custom class loader may need to be set in all threads (every time a new thread is created). A security exception is thrown if an application does not have permission to set the context class loader.

JWSDP Security Considerations

When an application is running on a web server, such as the Java Web Services Developer Pack (JWSDP), with security enabled, the following permissions must be set:

permission java.io.FilePermission

    "/${webserver.home}/common/endorsed/xercesImpl.jar", "read";
permission java.io.FilePermission
    "/${webserver.home}/common/endorsed/xalan.jar", "read";

permission java.util.PropertyPermission
    "javax.xml.parser.SAXParserFactory", "read, write";
permission java.util.PropertyPermission
    "javax.xml.transform.TransformerFactory", "read, write";

permission java.util.PropertyPermission "user.dir",        "read";
permission java.util.PropertyPermission "file.separator",  "read";
permission java.util.PropertyPermission "line.separator",  "read";
permission java.util.PropertyPermission "JavaClass.debug", "read";

permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "accessDeclaredMembers";

Note:
If read permission is not set for xercesImpl.jar, a FactoryConfigurationError is thrown that says:
Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

Changes in JAXP RI Versions

Changes in JAXP RI version 1.3

  • Xerces version changed from 2.3.0 to 2.6.2 (+ controlled bug fixes).
  • The two XSL transformation engines available in the standalone version of JAXP 1.3 are Xalan interpretive and XSLTC (based on Xalan 2.6.0 (+ controlled bugfixes)). The JAXP 1.3 version included in Java SE 5 includes only the XSLTC transformer (based on Xalan 2.6.0 (+ controlled bug fixes)).
  • New features and functionality added, as described in the What's New section of the Compatibility Guide.
  • A denial of service vulnerability was rectified by adding the system property elementAttributeLimit, which can be used to limit the number of attributes in a element. The default limit is 10,000 attributes for an element.

Changes in JAXP RI version 1.2.4

  • Fix for a Java SE 1.4.2 compilation bug in Xerces.

Changes in JAXP RI version 1.2.3

  • Xerces version changed from 2.2.1 to 2.3.0 (+ controlled bug fixes). This version Includes many bug fixes.
  • All Decimal value that should be invalid according to the Schema specification are now found by the parser (removing a 1.2.2 limitation).
  • Solved the problem of Xerces compilation under JDK 1.4.1.
  • XML Schema loading performance improved dramatically (virtually cut in half).

Changes in JAXP RI version 1.2.2

  • New properties were implemented for increased security, as described in the Security Issue section.
  • Parser implementation changed from Xerces 2.0.1_04 to Xerces 2.2.1 with controlled bug fixes.
  • XSLT processor imlpementation changed from Xalan 2.3.1_01 to Xalan 2.4.1 with controlled bug fixes..
  • XSLTC is included in this release.

Changes in JAXP Ri version 1.2.1

Performance of Xerces parser improved significantly.

XSLTC was not included as part of this release, which was destined solely for the J2EE platform.

Changes in JAXP RI version 1.2.0-FCS

The parser implementation changed from Xerces 2.0.0_01 to Xerces-J 2.0.1_01
(Xerces 2.0.1 final with controlled bug fixes). The Xalan XSLT processor
implementation was updated to xalan-j 2.3.1_01 (Xalan version 2.3.1 with
controlled bug fixes).

Finally, this release fully supports the proposed 1.2 JAXP specification,
which implements document validation using W3C XML Schema.

Changes In JAXP RI version 1.2.0-EA2

The parser implementation changed from Xerces 2.0.0 beta3 to Xerces-J 2.0.0_01 (Xerces 2.0.0 final with controlled bug fixes). The Xalan XSLT processor implementation was updated to xalan-j 2.3.0_01 (Xalan version 2.3.0 with controlled bug fixes).

The Xalan XSLTC processor was also added in this release. (It is used to compile a stylesheet into a transformation engine (translet) that is ready to run.)

This release fully supports the proposed 1.2 JAXP specification, which implements document validation using W3C XML Schema.

Changes in JAXP RI version 1.2.0-EA1

The parser implementation changed from Apache Crimson to Xerces 2 version 2.0.0 beta3. The XSLT processor implementation was updated to Xalan classic version 2.2.D14.

The parser supports W3C XML Schema but does not support all aspects of the proposed JAXP 1.2 specification. In particular, the ability to enforce that an instance document conforms to a particular schema has not been implemented. However, the validation portions of the specification can be used along with schema hints in the instance document.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP 1.4 Release Notes

Documentation Contents

Java API for XML Processing Release Notes

Specification Version: 1.4
Reference Implementation Version: 1.4.0

This document contains installation instructions and other notes that may help you use this software library more effectively. For more information, see the JAXP Reference Implementation Project web site.

Note:
If you are reading this page online, this is the most current version of the release notes. If this page was downloaded as part of the release bundle, please see the JAXP Reference Implementation Project web site.

Contents

  • Feature Changes
  • gMonth
  • JAXP Specification Changes since 1.3

Feature Changes

An important technical change in JAXP 1.4 is the addition of the javax.xml.stream.* packages from StAX, the Streaming API for XML (JSR 173). With this addition, JAXP 1.4 now supports validation and transformation of documents with the streaming API. Since JAXP 1.4 is integrated in Java SE, StAX support is transparent on any system running the latest Java platform.

gMonth

JAXP 1.4 changed its XML Schema validation logic for gMonth to reflect the changes made in the XML Schema 1.0 Specification Errata: E2-12 Error. Specifically, it will now reject gMonths with a lexical representation of "--MM--" as invalid.

JAXP Specification Changes since 1.3

Refer to JAXP FAQ.

The following sections summarize the significant changes introduced in JAXP 1.4. For additional details, please see the appropriate JavaDoc.

1. Package javax.xml.datatype

1.1. Class DatatypeFactory

  • Changed DATATYPEFACTORY_IMPLEMENTATION_CLASS to com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.

  • Added newInstance(String, ClassLoader) method.

1.2. Class Duration

  • Return false if the argument to equals() is null instead of throwing NullPointerException.

1.3. Class XMLGregorianCalendar

  • Return false if the argument to equals() is null instead of throwing NullPointerException.

2. Package javax.xml.parsers

2.1. Class DocumentBuilderFactory

  • Added newInstance(String, ClassLoader) method.

2.2. Class SAXParserFactory

  • Added newInstance(String, ClassLoader) method.

3. Package javax.xml.stream

Added the javax.xml.stream package to support StAX. The package consists of the following interfaces:

  • EventFilter

  • Location

  • StreamFilter

  • XMLEventReader

  • XMLEventWriter

  • XMLReporter

  • XMLResolver

  • XMLStreamConstants

  • XMLStreamReader

  • XMLStreamWriter

Classes:

  • XMLEventFactory

  • XMLInputFactory

  • XMLOutputFactory

Exceptions:

  • XMLStreamException

And errors:

  • FactoryConfigurationError

4. Package javax.xml.stream.events

Added the javax.xml.stream.events package to support StAX. The package consists of the following interfaces:

  • Attribute

  • Characters

  • Comment

  • DTD

  • EndDocument

  • EndElement

  • EntityDeclaration

  • EntityReference

  • Namespace

  • NotationDeclaration

  • ProcessingInstruction

  • StartDocument

  • StartElement

  • XMLEvent

4.1. Package javax.xml.stream.util

Added the javax.xml.stream.util package to support StAX. The package consists of the following interfaces:

  • XMLEventAllocator

  • XMLEventConsumer

And classes:

  • EventReaderDelegate

  • StreamReaderDelegate

5. Package javax.xml.transform

5.1. Class ErrorListener

  • Clarified the semantics of fatalError().

5.2. Class Transformer

  • Clarified the semantics of getOutputProperty() with respect to properties that have not been set explicitly with either setOutputProperty() or xsl:output in the stylesheet.

5.3. Class TransformerFactory

  • Added newInstance(String, ClassLoader) method.

5.4. Package javax.xml.transform.stax

Added the javax.xml.transform.stax package to support StAX. The package consists of the following interfaces:

  • TemplatesHandler

  • TransformerHandler

And classes:

  • StAXResult

  • StAXSource

6. Package javax.xml.validation

6.1. Class Schema

  • Clarified that the features set on the SchemaFactory should be passed to the Validator created with newValidator().

  • Clarified that the features set on the SchemaFactory should be passed to the ValidatorHandler created with newValidatorHandler().

6.2. Class SchemaFactory

  • Added newInstance(String, ClassLoader) method.

  • Clarified that the features set on the SchemaFactory should be passed to the Schemas created with newSchema(). Included a note to implementors and developers about the subtleties associated with newSchema() in this context.

  • Clarified that the inputs to newSchema(Source[]) are expected to be XML documents or elements.

  • Updated documentation of setFeature() to clarify that the features set on the SchemaFactory should be passed to the Schemas created with this factory and by extension to the Validator and ValidatorHandlers created from that Schema.

6.3. Class SchemaFactoryLoader

The SchemaFactoryLoader class was created during the JAXP 1.3 development process. Shortly before JAXP 1.3 was finished, the factory mechanisms associated with validation were changed, and this class was removed. Unfortunately, the file was left in a repository and it slipped into the Java Platform, Standard Edition 5.0 API Specification.

Since the class can neither be added to JAXP 1.3 nor removed from the Java 5.0 API Specification due to backwards compatibility issues, it is being added to JAXP 1.4. The class is harmless and should not be used. It is being added simply to avoid the confusion that arises when developers notice that it's defined in the platform but not in JAXP.

Do not use this class.

6.4. Class TypeInfoProvider

  • Extended the semantics of getElementTypeInfo(), allowing it to be called from either the startElement event or the endElement event. This allows the API to support W3C XML Schema union types more usefully.

    When W3C XML Schema validation is being performed, in the case where an element has a union type, the TypeInfo returned by a call to getElementTypeInfo() from the startElement event will be the union type. The TypeInfo returned by a call from the endElement event will be the actual member type used to validate the element.

6.5. Class Validator

  • The Validator may now accept Sources other than DOMSource and SAXSource; for example, StAXSource.

  • Clarified that the inputs to validate() are expected to be XML documents or elements.

7. Package javax.xml.xpath

7.1. Class XPath

  • Clarified that it is the XPathVariableResolver in effect at compile time that is used to resolve any variables that appear in the expression.

7.2. Class XPathFactory

  • Added newInstance(String, ClassLoader) method.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP 1.6 Enhancements in Java SE 8

The Java SE 8 release contains Java API for XML Processing (JAXP) 1.6, which requires the use of the service provider loader facility defined by java.util.ServiceLoader to load services from service configuration files. The rationale for this is to allow for future modularization of the Java SE platform where service providers may be deployed by means other than JAR files and perhaps without the service configuration files. Note that the JAXP has always specified the use of the 'Services API' without reference to a specific API or service provider loading facility.

For more information see JEP 162: Prepare for Modularization as well as the JAXP 1.6 Change List.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP Compatibility

Documentation Contents

JAXP Compatibility Guide
for the Java SE 5 Platform

Contents

  • What's New
  • DOM Level 3
    • Methods added to DOM interfaces
    • Preserving the XML format
  • SAX 2.0.2
  • Invoking XSLT
    • Programmatic Access to Xalan XPath
  • Package Name Changes
    • What Changed, and Why
    • Using System Properties and Implementation Classes
  • Security Issue Posed by Nested Entity Definitions

Introduction

The Java SE 1.4 platform included the "Crimson" reference implementation for JAXP 1.1. The Java SE 5 platform includes a reference implementation for JAXP 1.3 based on the Apache "Xerces" library.

Because these implementations come from entirely different codebases, and because the JAXP standard has evolved from 1.1 to 1.3, there are some subtle differences between the impementations, even they both conform to the JAXP standard. These two factors combine to create the compatibility issues described in this guide.

What's New

However, while XML applications written for 1.4 do suffer some incompatibilities, JAXP 1.3 in the
Java SE 5 platform provides some compelling advantages:

  • A built-in validation processor for XML Schema.
  • The ability to use other schema validators, as well, with the javax.xml.validation package.
  • A thorough implementation of XML Schema data types in javax.xml.datatype, including Gregorian Calendar dates and times that previously had no natural analogues in the Java platform.
  • XSLTC, the fast, compiling transformer, which is now the default engine for XSLT processing.
  • DOM Level 3 core, which provides:
  • XML 1.1 and Namespaces 1.1 (javax.xml.namespace) which provide better support for unicode characters in tag names and namespaces.
  • Support for normalization of documents
    Support for schema datatypes (TypeInfo)
  • Better ErrorHandling and identification of an error's location
  • Bootstrapping. DOMLevel 3 supports implementation independent way to obtain DOMImplementation.
  • DOMLevel 3 allows setting of application data in a node, also allows setting of UserDataHandler which gets called whenever a node is cloned, removed, renamed.
  • Java-Centric XPath APIs in javax.xml.xpath, which provide a more java-friendly way to use an XPath expression. It was designed to be applicable to any data model that implements the interface. You can use it now to process the reference implementation DOM. In the future, it is likely to be available when processing a JDom, or STAX data model, as well.
  • An implementation of XInclude, which makes it possible to build a document using text or XML stored in reusable segments elsewhere.
  • Grammar pre-parsing and caching, which has a major impact on performance for high-volume XML processing.
  • APIs that tell you implementation and version of the parser, so that when you install new libraries you can make sure the application is using them.

That's the good news. The bad news is that some compatibility issues have survived all attempts at eradication. The remainder of this document discusses those issues.

DOM Level 3

While the reference implementation in Java SE 1.4 supported the DOM Level 2 API, the implementation in Java SE 5 supports the DOM Level 3 family of APIs. This section covers the impact of those changes on programs that used the JAXP 1.1 reference implementation:

  • Methods added to DOM interfaces
  • Preserving the XML format

For more information, see the complete list of changes in the DOM Level 3 Changes appendix.

Methods added to DOM interfaces

In DOM level 3, additional methods were defined in the following interfaces:

  • Attr
  • Document
  • DOMImplementation
  • Element
  • Entity
  • Node
  • Text

The added methods only affect applications that implement the interfaces directly, and only then when the application is recompiled. Applications that use the factory methods to obtain implementation classes for these interfaces will have no problems.

Preserving the XML format

These changes affect an application that reads in XML data into a DOM, makes modifications, and then writes it out in a way that preserves the original formatting.

In JAXP 1.1, extraneous whitespace was automatically removed on input, and a single property (ignoringLexicalInfo) was set to false to preserve entity nodes and CDATA nodes, for example. Including the additional nodes made the DOM somewhat more complex to process, but because they were there, adding whitespace output (indentation and newlines) produced highly readable, formatted version of the XML data which closely approximated the input.

In JAXP 1.3, there are four APIs that the application uses to determine how much lexical (formatting) information is available to process, using the following DocumentBuilderFactory methods:

  • setCoalescing()
    To convert CDATA nodes to Text node and append
    to an adjacent Text node (if any).
  • setExpandEntityReferences()
    To expand entity reference nodes.
  • setIgnoringComments()
    To ignore comments.
  • setIgnoringElementContentWhitespace()
    To ignore whitespace that is not a significant part
    of element content.

The default values for all of these properties is false, which preserves all the lexical information necessary to reconstruct the incoming document in its original form. Setting them all to true lets you construct the simplest possible DOM, so the application can focus on the data's semantic content, without having to worry about lexical syntax details.

Note:
When adding new nodes, the application must add any indentation and newline formatting that is needed for readability, since it is not provided automatically.

SAX 2.0.2

Following are the changes made between SAX 2.0.0 and SAX 2.0.2 that might affect compatibility.

  • DeclHandler.externalEntityDecl now requires the parser to return the absolute system identifier for consistency with DTDHandler.unparsedEntityDecl. This may cause some incompatibilities.

  • In SAX 2.0.1, an application can set ErrorHandler, EntityResolver, ContentHandler, or DTDHandler to null. This is a relaxation of the previous restriction in SAX 2.0, which generated a NullPointerException (NPE) in such circumstances.

    So the following code is legal in JAXP 1.3:

    SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    XMLReader reader = sp.getXMLReader();

    reader.setErrorHandler(null);
    reader.setContentHandler(null);
    reader.setEntityResolver(null);
    reader.setDTDHandler(null);
  • The resolveEntity() method in the EntityResolver API now throws IOException, as well as SAXException. (Before, it only threw SAXException.)

    The vast majority of applications are unaffected by this change, because the DefaultHandler implementation class has been modified to declare the additional exception, and very few applications use the DefaultHandler in such a way that they will run into a problem.

    The only way an application can be affected is if it overrides the resolveEntity() method and also invokes super.resolveEntity(). In that case, the application won't compile in Java SE 5 until the method is modified to handle the IOExceptions that super.resolveEntity() could throw.

  • The following new features are recognized :
    • http://xml.org/sax/features/external-general-entities
       To include external general entities.
    • http://xml.org/sax/features/external-parameter-entities
       To include external parameter entities and the external DTD subset.

    and the following new property:

    • http://xml.org/sax/properties/xml-string
       To get the string of characters associated with the current event.

    For a complete list of Xerces features and properties, see http://xml.apache.org/xerces2-j/features.html and http://xml.apache.org/xerces2-j/properties.html.

Note:
One point of compatibility is also worth mentioning. Namespace recognition was turned off by default in Java SE 1.4 (JAXP 1.1). For backward compatibility, that policy is continued in Java SE 5 (JAXP 1.3). However, namespace recognition is turned on by default in the official SAX implementation at www.saxproject.org. While not strictly a compatibility issue from the standpoint of JAXP, it is an issue that sometimes comes as a surprise.

Using XSLT

Code that uses the standard JAXP APIs to create and access an XSL transformer does not need to be changed. The output will be the same, but will in general be produced much faster, since the XSLTC compiling transformer will be used by default, instead of the interpreting Xalan transformer.

Note:
There is no significant difference between Xalan and XSLTC performance for a single run on a small data set, as when you are developing and testing an XSL stylesheet. But there is a major performance benefit when using XSLTC on anything larger.

Programmatic Access to Xalan XPath

JAXP 1.3 provides the standard XPath API for evaluating XPath expressions. We encourage users to use this API. Xalan-interpretive is not included in the reference implementation. If an application explicitly uses the Xalan XPath API to evaluate a standalone XPath expression (one that is not part of an XSLT stylesheet), you'll need to download and install the Apache libraries for Xalan, put them on the classpath.

Package Name Changes

This change does not affect applications that confine themselves to using the standard JAXP APIs. But applications that access implementation-specific features of the XML processors defined in previous JAXP versions will have to be modified to take into account package names that changed in JAXP 1.3.

The change has several effects on previous applications:

  1. The property-values that were used to access the internal implementations must be changed.
  2. Applications that used internal APIs that from the Xalan implementation classes must change the import statements that gave them access to those APIs.
  3. Applications that used internal APIs from the Crimson implementation must be recoded -- ideally, by using newer JAXP APIs or, if necessary, by using Xerces APIs.

What Changed, and Why

In Java SE 1.4, the fact that JAXP was built into the Java platform was a mixed blessing. On the one hand, an application could rely on that fact that it was there. On the other, most applications needed features and bug fixes that were available in later versions.

But adding new libarires had no effect, because internal classes always take precedence over the classpath. The solution for that problem in 1.4 was to use the endorsed standards mechanism. However, that was a new mechanism, and one which frequently placed an additional burden on the end user, as well as the application developer.

The solution in the JAXP 1.3 reference name is to change the package names of the Apache libraries used in the implementation. That change lets you reference newer Apache libraries in the classpath, so application developers can use them in the same way that would use any other additions to the Java platform.

The new names given to the Apache packages in the JAXP 1.3 reference implementation are shown below:

 | JAXP 1.1 | JAXP 1.3
JAXP | org.apache.crimson | -/- com.sun.org.apache.xerces.internal
 | org.apache.xml | com.sun.org.apache.xml.internal
XSLT | org.apache.xalan org.apache.xpath org.apache.xalan.xsltc | com.sun.org.apache.xalan.internal com.sun.org.apache.xpath.internal com.sun.org.apache.xalan.internal.xsltc

Using System Properties and Implementation Classes

Applications that specifying system properties on the command line with -D, in the JRE's lib/jaxp.properties file, or by hard-coding them into the application, generally do so in order to access functionality that is not present in the standard APIs.

JAXP 1.3 contains many new additions. When upgrading such applications, it is advisable to look for standard APIs in the javax.xml.* packages that will do the same job, because that's the best way to keep from having to change the application in the future. If absolutely necessary (either because of functionality restrictions or lack of time to investigate the new APIs), the property values can be changed by converting old-format package names into the format:

org.apache.somePackage --> com.sun.org.apache.SomePackage.internal

Similarly, internal implementation classes all use the new package names. If your application is using implementaton classes (it shouldn't!) those package names will have to change, as well.

Security Issue Posed by Nested Entity Definitions

While XML does not allow recursive entity definitions, it does permit nested entity definitions, which produces the potential for Denial of Service attacks on a server which accepts XML data from external sources. For example, a SOAP document like the following that has very deeply nested entity definitions can consume 100% of CPU time and large amounts of memory in entity expansions:

<?xml version="1.0" encoding ="UTF-8"?>
  <!DOCTYPE foobar[
 <!ENTITY x100 "foobar">
  <!ENTITY  x99 "&x100;&x100;">
  <!ENTITY  x98 "&x99;&x99;">
  ...
  <!ENTITY   x2 "&x3;&x3;">
  <!ENTITY   x1 "&x2;&x2;">
  ]>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=...>
<SOAP-ENV:Body>
<ns1:aaa xmlns:ns1="urn:aaa" SOAP-ENV:encodingStyle="...">
<foobar xsi:type="xsd:string">&x1;</foobar>
</ns1:aaa>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

A system that doesn't take in external XML data need not be concerned with the issue, but one that does can utilize one of the following safeguards to prevent the problem:

New system property to limit entity expansion
The entityExpansionLimit system property lets existing applications constrain the total number of entity expansions without recompiling the code. The parser throws a fatal error once it has reached the entity expansion limit. (By default, the limit is set to 64000.)

To set the entity expansion limit using the system property, use an option like the following on the java command line: -DentityExpansionLimit=100000

New parser property to disallow DTDs
The application can also set the http://apache.org/xml/features/disallow-doctype-decl parser property to true. A fatal error is then thrown if the incoming XML document contains a DOCTYPE declaration. (The default value for this property is false.) This property is typically useful for SOAP based applications where a SOAP message must not contain a Document Type Declaration.

New feature for Secure Processing
JAXP 1.3 includes a new secure processing feature in which an application can configure theSAXParserFactory or DocumentBuilderFactory to get an XML processor that behaves in a secured fashion. Setting this feature to true sets the entity expansion limit to 64000. Note that the default limit can be increased using the entityExpansionLimit system property.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JAXP Compatibility

Documentation Contents

JAXP Compatibility Guide for Java SE 6 Platform

Contents

  • What's New

  • DOM Level 3

    • Methods added to DOM interfaces

    • Preserving the XML format

  • SAX 2.0.2

  • Invoking XSLT

    • Programmatic Access to Xalan XPath

  • Package Name Changes

    • What Changed, and Why

  • Security Issue Posed by Nested Entity Definitions

Introduction

The Java Platform, Standared Edition 1.4 (Java SE 1.4) included the Crimson reference implementation for JAXP 1.1. The Java platform, Standard Edition 6 (Java SE 6) includes a reference implementation for JAXP 1.4 based on the Apache Xerces library.

Because these implementations come from entirely different codebases, and because the JAXP standard has evolved from 1.1 to 1.4, there are some subtle differences between the implementations, even they both conform to the JAXP standard. These two factors combine to create the compatibility issues described in this guide.

What's New

See Release Notes.

DOM Level 3

While the reference implementation in Java SE 1.4 supported the DOM Level 2 API, the implementation in Java SE 6 supports the DOM Level 3 family of APIs. This section covers the impact of those changes on programs that used the JAXP 1.1 reference implementation:

  • Methods added to DOM interfaces

  • Preserving the XML format

For more information, see the complete list of changes in the DOM Level 3 Changes appendix.

Methods added to DOM interfaces

In DOM level 3, additional methods were defined in the following interfaces:

  • Attr

  • Document

  • DOMImplementation

  • Element

  • Entity

  • Node

  • Text

The added methods only affect applications that implement the interfaces directly, and only when the application is recompiled. Applications that use the factory methods to obtain implementation classes for these interfaces will have no problems.

Preserving the XML format

These changes affect an application that reads in XML data into a DOM, makes modifications, and then writes it out in a way that preserves the original formatting.

In JAXP 1.1, extraneous whitespace was automatically removed on input, and a single property (ignoringLexicalInfo) was set to false to preserve entity nodes and CDATA nodes, for example. Including the additional nodes made the DOM somewhat more complex to process, but because they were there, adding whitespace output (indentation and newlines) produced highly readable, formatted version of the XML data which closely approximated the input.

In JAXP 1.4, there are four APIs that the application uses to determine how much lexical (formatting) information is available to process, using the following DocumentBuilderFactory methods:

  • setCoalescing()
    To convert CDATA nodes to Text node and append
    to an adjacent Text node (if any).

  • setExpandEntityReferences()
    To expand entity reference nodes.

  • setIgnoringComments()
    To ignore comments.

  • setIgnoringElementContentWhitespace()
    To ignore whitespace that is not a significant part
    of element content.

The default values for all of these properties is false, which preserves all the lexical information necessary to reconstruct the incoming document in its original form. Setting them all to true lets you construct the simplest possible DOM, so the application can focus on the data's semantic content, without having to worry about lexical syntax details.

Note:
When adding new nodes, the application must add any indentation and newline formatting that is needed for readability, since it is not provided automatically.

SAX 2.0.2

Following are the changes made between SAX 2.0.0 and SAX 2.0.2 that might affect compatibility.

  • DeclHandler.externalEntityDecl now requires the parser to return the absolute system identifier for consistency with DTDHandler.unparsedEntityDecl. This may cause some incompatibilities.

  • In SAX 2.0.1, an application can set ErrorHandler, EntityResolver, ContentHandler, or DTDHandler to null. This is a relaxation of the previous restriction in SAX 2.0, which generated a NullPointerException (NPE) in such circumstances.

    So the following code is legal in JAXP 1.3:

    SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader reader = sp.getXMLReader();
reader.setErrorHandler(null);
reader.setContentHandler(null);
reader.setEntityResolver(null);
reader.setDTDHandler(null);

  • The resolveEntity() method in the EntityResolver API now throws IOException, as well as SAXException. (Before, it only threw SAXException.)

    The vast majority of applications are unaffected by this change, because the DefaultHandler implementation class has been modified to declare the additional exception, and very few applications use the DefaultHandler in such a way that they will run into a problem.

    The only way an application can be affected is if it overrides the resolveEntity() method and also invokes super.resolveEntity(). In that case, the application won't compile in Java SE 5 until the method is modified to handle the IOExceptions that super.resolveEntity() could throw.

  • The following new features are recognized :

    • http://xml.org/sax/features/external-general-entities
      To include external general entities.

    • http://xml.org/sax/features/external-parameter-entities
      To include external parameter entities and the external DTD subset.

    and the following new property:

    • http://xml.org/sax/properties/xml-string
      To get the string of characters associated with the current event.

    For a complete list of Xerces features and properties, see http://xerces.apache.org/xerces2-j/features.html and http://xerces.apache.org/xerces2-j/properties.html.

Note:
One point of compatibility is also worth mentioning. Namespace recognition was turned off by default in Java SE 1.4 (JAXP 1.1). For backward compatibility, that policy is continued in Java SE 6 (JAXP 1.4). However, namespace recognition is turned on by default in the official SAX implementation at www.saxproject.org. While not strictly a compatibility issue from the standpoint of JAXP, it is an issue that sometimes comes as a surprise.

Using XSLT

Code that uses the standard JAXP APIs to create and access an XSL transformer does not need to be changed. The output will be the same, but will in general be produced much faster, since the XSLTC compiling transformer will be used by default, instead of the interpreting Xalan transformer.

Note:
There may be no significant difference between Xalan and XSLTC performance for a single run on a small data set, as when you are developing and testing an XSL stylesheet. But there is a major performance benefit when using XSLTC on anything larger.

Programmatic Access to Xalan XPath

JAXP 1.4 provides the standard XPath API for evaluating XPath expressions. We encourage users to use this API. Xalan-interpretive is not included in the reference implementation. If an application explicitly uses the Xalan XPath API to evaluate a standalone XPath expression (one that is not part of an XSLT stylesheet), you'll need to download and install the Apache libraries for Xalan.

Package Name Changes

This change does not affect applications that confine themselves to using the standard JAXP APIs. But applications that access implementation-specific features of the XML processors defined in JAXP versions prior to 1.3 will have to be modified.

The change has several effects on previous applications:

  1. The property-values that were used to access the internal implementations must be changed.

  2. Applications that used internal APIs that from the Xalan implementation classes must change the import statements that gave them access to those APIs.

  3. Applications that used internal APIs from the Crimson implementation must be re-coded -- ideally, by using newer JAXP APIs or, if necessary, by using Xerces APIs.

What Changed, and Why

In Java SE 1.4, the fact that JAXP was built into the Java platform was a mixed blessing. On the one hand, an application could rely on that fact that it was there. On the other, most applications needed features and bug fixes that were available in later versions.

But adding new libraries had no effect, because internal classes always take precedence over the classpath. The solution for that problem in 1.4 was to use the endorsed standards mechanism. However, that was a new mechanism, and one which frequently placed an additional burden on the end user, as well as the application developer.

The solution since JAXP 1.3 is to change the package names of the Apache libraries used in the implementation. That change lets a user reference newer Apache libraries in the classpath, so application developers can use them in the same way that would use any other additions to the Java platform.

The new names given to the Apache packages in the JAXP 1.3 reference implementation are shown below:

Changes in JAXP package names

JAXP 1.1

Since JAXP 1.3

org.apache.crimson

-/-
com.sun.org.apache.xerces.internal

org.apache.xml

com.sun.org.apache.xml.internal

Changes in XSLT package names

JAXP 1.1

Since JAXP 1.3

org.apache.xalan
org.apache.xpath
org.apache.xalan.xsltc

com.sun.org.apache.xalan.internal
com.sun.org.apache.xpath.internal
com.sun.org.apache.xalan.internal.xsltc

Security Issue Posed by Nested Entity Definitions

While XML does not allow recursive entity definitions, it does permit nested entity definitions, which produces the potential for Denial of Service attacks on a server which accepts XML data from external sources. For example, a SOAP document like the following that has very deeply nested entity definitions can consume 100% of CPU time and large amounts of memory in entity expansions:

<?xml version="1.0" encoding ="UTF-8"?>
 <!DOCTYPE foobar[
 <!ENTITY x100 "foobar">
 <!ENTITY  x99 "&x100;&x100;">
 <!ENTITY  x98 "&x99;&x99;">
 ...
 <!ENTITY   x2 "&x3;&x3;">
 <!ENTITY   x1 "&x2;&x2;">
 ]>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=...>
<SOAP-ENV:Body>
<ns1:aaa xmlns:ns1="urn:aaa" SOAP-ENV:encodingStyle="...">
<foobar xsi:type="xsd:string">&x1;</foobar>
</ns1:aaa>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

A system that doesn't take in external XML data need not be concerned with the issue, but one that does can utilize one of the following safeguards to prevent the problem:

New system property to limit entity expansion
The entityExpansionLimit system property lets existing applications constrain the total number of entity expansions without recompiling the code. The parser throws a fatal error once it has reached the entity expansion limit. (By default, the limit is set to 64000.)

To set the entity expansion limit using the system property, use an option like the following on the java command line: -DentityExpansionLimit=100000

New parser property to disallow DTDs
The application can also set the http://apache.org/xml/features/disallow-doctype-decl parser property to true. A fatal error is then thrown if the incoming XML document contains a DOCTYPE declaration. (The default value for this property is false.) This property is typically useful for SOAP based applications where a SOAP message must not contain a Document Type Declaration.
New feature for Secure Processing
JAXP 1.3 includes a new secure processing feature in which an application can configure the SAXParserFactory or DocumentBuilderFactory to get an XML processor that behaves in a secured fashion. Setting this feature to true sets the entity expansion limit to 64000. Note that the default limit can be increased using the entityExpansionLimit system property.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


A Heap/CPU Profiling Tool

Documentation Contents

HPROF: A Heap/CPU Profiling Tool

The Java 2 Platform Standard Edition (J2SE) has always provided a simple command line profiling tool called HPROF for heap and cpu profiling. HPROF is actually a JVM native agent library which is dynamically loaded through a command line option, at JVM startup, and becomes part of the JVM process. By supplying HPROF options at startup, users can request various types of heap and/or cpu profiling features from HPROF. The data generated can be in textual or binary format, and can be used to track down and isolate performance problems involving memory usage and inefficient code. The binary format file from HPROF can be used with tools such as jhat to browse the allocated objects in the heap.

In J2SE Version 5.0, HPROF has been implemented on the new Java Virtual Machine Tool Interface (JVM TI).

HPROF Startup

HPROF is capable of presenting CPU usage, heap allocation statistics, and monitor contention profiles. In addition, it can also report complete heap dumps and states of all the monitors and threads in the Java virtual machine. HPROF can be invoked by:

java -agentlib:hprof[=options] ToBeProfiledClass

-OR-

java -Xrunhprof[:options] ToBeProfiledClass

Depending on the type of profiling requested, HPROF instructs the virtual machine to send it the relevant JVM TI events and processes the event data into profiling information. For example, the following command obtains the heap allocation profile:

java -agentlib:hprof=heap=sites ToBeProfiledClass

Following is the complete list of options that can be passed to HPROF:

java -agentlib:hprof=help
     HPROF: Heap and CPU Profiling Agent (JVM TI Demonstration Code)

hprof usage: java -agentlib:hprof=[help]|[<option>=<value>, ...]

Option Name and Value  Description                    Default
---------------------  -----------                    -------
heap=dump|sites|all    heap profiling                 all
cpu=samples|times|old  CPU usage                      off
monitor=y|n            monitor contention             n
format=a|b             text(txt) or binary output     a
file=<file>            write data to file             java.hprof[.txt]
net=<host>:<port>      send data over a socket        off
depth=<size>           stack trace depth              4
interval=<ms>          sample interval in ms          10
cutoff=<value>         output cutoff point            0.0001
lineno=y|n             line number in traces?         y
thread=y|n             thread in traces?              n
doe=y|n                dump on exit?                  y
msa=y|n                Solaris micro state accounting n
force=y|n              force output to <file>         y
verbose=y|n            print messages about dumps     y

Obsolete Options
----------------
gc_okay=y|n

Examples
--------
  - Get sample cpu information every 20 millisec, with a stack depth of 3:
      java -agentlib:hprof=cpu=samples,interval=20,depth=3 classname
  - Get heap usage information based on the allocation sites:
      java -agentlib:hprof=heap=sites classname

Notes
-----
  - The option format=b cannot be used with monitor=y.
  - The option format=b cannot be used with cpu=old|times.
  - Use of the -Xrunhprof interface can still be used, e.g.
       java -Xrunhprof:[help]|[<option>=<value>, ...]
    will behave exactly the same as:
       java -agentlib:hprof=[help]|[<option>=<value>, ...]

Warnings
--------
  - This is demonstration code for the JVM TI interface and use of BCI,
    it is not an official product or formal part of the J2SE.
  - The -Xrunhprof interface will be removed in a future release.
  - The option format=b is considered experimental, this format may change
    in a future release.

By default, heap profiling information (sites and dump) is written out to java.hprof.txt (ascii). The output in most cases will contain ID's for traces, threads,and objects. Each type of ID will typically start with a different number than the other ID's. For example, traces might start with 300000.

Normally the default (force=y) will clobber any existing information in the output file, so if you have multiple VMs running with HPROF enabled, you should use force=n, which will append additional characters to the output filename as needed.

The interval option only applies to cpu=samples and controls the time that the sampling thread sleeps between samples of the thread stacks.

The msa option only applies to Solaris and causes the Solaris Micro State Accounting to be used.

The interval, msa, and force options are new HPROF options in J2SE 1.5.

Example Usage

We could create an application, but let's instead pick on an existing Java application in the J2SE, javac. With javac I need to pass Java options in with -J. If you were running Java directly, you would not use the -J prefix.

There is also a way to pass in J2SE 5.0 Java options with an environment variable JAVA_TOOL_OPTIONS, but with all environment variables you need to be careful that you don't impact more VMs than you intend.

Heap Allocation Profiles (heap=sites)

Following is the heap allocation profile generated by running the Java compiler (javac) on a set of input files. Only parts of the profiler output file (java.hprof.txt) are shown here.

Command used: javac -J-agentlib:hprof=heap=sites Hello.java

SITES BEGIN (ordered by live bytes) Fri Oct 22 11:52:24 2004
          percent          live          alloc'ed  stack class
 rank   self  accum     bytes objs     bytes  objs trace name
    1 44.73% 44.73%   1161280 14516  1161280 14516 302032 java.util.zip.ZipEntry
    2  8.95% 53.67%    232256 14516   232256 14516 302033 com.sun.tools.javac.util.List
    3  5.06% 58.74%    131504    2    131504     2 301029 com.sun.tools.javac.util.Name[]
    4  5.05% 63.79%    131088    1    131088     1 301030 byte[]
    5  5.05% 68.84%    131072    1    131072     1 301710 byte[]

A crucial piece of information in heap profile is the amount of allocation that occurs in various parts of the program. The SITES record above tells us that 44.73% of the total space was allocated for java.util.zip.ZipEntry objects at a particular SITE (a unique stack trace of a fixed depth). Note that the amount of live data matches the total allocated numbers, which means that a garbage collection may have happened shortly before HPROF iterated over the heap. Normally the amount of live data will be less than or equal to the total allocation that has occurred at a given site.

A good way to relate allocation sites to the source code is to record the dynamic stack traces that led to the heap allocation. Following is another part of the java.hprof.txt file that illustrates the stack traces referred to by the top two allocation sites in the output shown above.

TRACE 302032:
        java.util.zip.ZipEntry.<init>(ZipEntry.java:101)
        java.util.zip.ZipFile$3.nextElement(ZipFile.java:435)
        java.util.zip.ZipFile$3.nextElement(ZipFile.java:413)
        com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1442)
TRACE 302033:
        com.sun.tools.javac.util.List.<init>(List.java:43)
        com.sun.tools.javac.util.List.<init>(List.java:51)
        com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:98)
        com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1442)

Each frame in the stack trace contains class name, method name, source file name, and the line number. The user can set the maximum number of frames collected by the HPROF agent (depth option). The default depth is 4. Stack traces reveal not only which methods performed heap allocation, but also which methods were ultimately responsible for making calls that resulted in memory allocation.

The above stack traces are shared with all the running threads, if it was necessary to separate the stack traces of different threads the thread option would need to be used. This will increase the space used and the number of stack traces in the output file.

If the depth of the stacks wasn't deep enough, the depth option could be used to increase the stack depth. Currently, recursion is not treated specially, so getting the caller information on very deep recursion stacks can be difficult. The larger the depth, the more space is needed to save the stack traces.

So what does the above information tell us? For javac, having lots of ZipEntry and List class instances makes sense, so other than the fact that javac relies heavily on these classes there isn't much else to say. Normally you want to watch out for large accumulations of objects, allocated at the same location, that seem excessive.

Don't expect the above information to reproduce on identical runs with applications that are highly multi-threaded.

This option can impact the application performance due to the data gathering (stack traces) on object allocation and garbage collection.

Heap Dump (heap=dump)

A complete dump of the current live objects in the heap can be obtained with:

Command used: javac -J-agentlib:hprof=heap=dump Hello.java

This is a very large output file, but can be viewed and searched in any editor. But a better way to look at this kind of detail is with HAT. All the information of the above heap=sites option is included, plus the specific details on every object allocated and the references to all objects.

This option causes the greatest amount of memory to be used because it stores details on every object allocated, it can also impact the application performance due to the data gathering (stack traces) on object allocation and garbage collection.

CPU Usage Sampling Profiles (cpu=samples)

h2>

HPROF can collect CPU usage information by sampling threads. Following is part of the output collected from a run of the javac compiler.

Command used: javac -J-agentlib:hprof=cpu=samples Hello.java

CPU SAMPLES BEGIN (total = 126) Fri Oct 22 12:12:14 2004
rank   self  accum   count trace method
   1 53.17% 53.17%      67 300027 java.util.zip.ZipFile.getEntry
   2 17.46% 70.63%      22 300135 java.util.zip.ZipFile.getNextEntry
   3  5.56% 76.19%       7 300111 java.lang.ClassLoader.defineClass2
   4  3.97% 80.16%       5 300140 java.io.UnixFileSystem.list
   5  2.38% 82.54%       3 300149 java.lang.Shutdown.halt0
   6  1.59% 84.13%       2 300136 java.util.zip.ZipEntry.initFields
   7  1.59% 85.71%       2 300138 java.lang.String.substring
   8  1.59% 87.30%       2 300026 java.util.zip.ZipFile.open
   9  0.79% 88.10%       1 300118 com.sun.tools.javac.code.Type$ErrorType.<init>
  10  0.79% 88.89%       1 300134 java.util.zip.ZipFile.ensureOpen

The HPROF agent periodically samples the stack of all running threads to record the most frequently active stack traces. The count field above indicates how many times a particular stack trace was found to be active (not how many times a method was called). These stack traces correspond to the CPU usage hot spots in the application. This option does not require BCI or modifications of the classes loaded and of all the options causes the least disturbance of the application being profiled.

The interval option can be used to adjust the sampling time or the time that the sampling thread sleeps between samples.

So what does the above information tell us? First, statistically it's a pretty poor sample, only 126 samples, compiling a larger Java source file would probably yield better information, or better yet a large batch of Java sources. Second, this data pretty much matches the heap=sites data in that we know that javac relies heavily on the ZipFile class, which makes sense. It appears that any performance improvements in ZipFile will probably improve the performance of javac. The stack traces of interest here are:

TRACE 300027:

java.util.zip.ZipFile.getEntry(ZipFile.java:Unknown line)

java.util.zip.ZipFile.getEntry(ZipFile.java:253)

java.util.jar.JarFile.getEntry(JarFile.java:197)

java.util.jar.JarFile.getJarEntry(JarFile.java:180)

TRACE 300135:

java.util.zip.ZipFile.getNextEntry(ZipFile.java:Unknown line)

java.util.zip.ZipFile.access$700(ZipFile.java:35)

java.util.zip.ZipFile$3.nextElement(ZipFile.java:419)

java.util.zip.ZipFile$3.nextElement(ZipFile.java:413)

Don't expect the above information to reproduce on identical runs with highly multi-threaded applications, especially when the sample count is low.

CPU Usage Times Profile (cpu=times)

HPROF can collect CPU usage information by injecting code into every method entry and exit, keeping track of exact method call counts and the time spent in each method. This uses Byte Code Injection (BCI) and runs considerably slower than cpu=samples. Following is part of the output collected from a run of the javac compiler.

Command used: javac -J-agentlib:hprof=cpu=times Hello.java

CPU TIME (ms) BEGIN (total = 103099259) Fri Oct 22 12:21:23 2004
rank   self  accum   count trace method
   1  5.28%  5.28%       1 308128 com.sun.tools.javac.Main.compile
   2  5.16% 10.43%       1 308127 com.sun.tools.javac.main.Main.compile
   3  5.15% 15.58%       1 308126 com.sun.tools.javac.main.Main.compile
   4  4.07% 19.66%       1 308060 com.sun.tools.javac.main.JavaCompiler.compile
   5  3.90% 23.56%       1 306652 com.sun.tools.javac.comp.Enter.main
   6  3.90% 27.46%       1 306651 com.sun.tools.javac.comp.Enter.complete
   7  3.74% 31.21%       4 305626 com.sun.tools.javac.jvm.ClassReader.listAll
   8  3.74% 34.95%      18 305625 com.sun.tools.javac.jvm.ClassReader.list
   9  3.24% 38.18%       1 305831 com.sun.tools.javac.comp.Enter.classEnter
  10  3.24% 41.42%       1 305827 com.sun.tools.javac.comp.Enter.classEnter
  11  3.24% 44.65%       1 305826 com.sun.tools.javac.tree.Tree$TopLevel.accept
  12  3.24% 47.89%       1 305825 com.sun.tools.javac.comp.Enter.visitTopLevel
  13  3.23% 51.12%       1 305725 com.sun.tools.javac.code.Symbol.complete
  14  3.23% 54.34%       1 305724 com.sun.tools.javac.jvm.ClassReader.complete
  15  3.23% 57.57%       1 305722 com.sun.tools.javac.jvm.ClassReader.fillIn
  16  1.91% 59.47%      16 305611 com.sun.tools.javac.jvm.ClassReader.openArchive
  17  1.30% 60.78%     330 300051 java.lang.ClassLoader.loadClass
  18  1.28% 62.06%     330 300050 java.lang.ClassLoader.loadClass
  19  1.22% 63.28%     512 300695 java.net.URLClassLoader.findClass
  20  1.21% 64.48%     512 300693 java.net.URLClassLoader$1.run
  21  1.09% 65.57%   14516 305575 java.util.zip.ZipFile$3.nextElement
  22  0.98% 66.55%   14516 305574 java.util.zip.ZipFile$3.nextElement
  23  0.96% 67.52%       1 304560 com.sun.tools.javac.main.JavaCompiler.instance
  24  0.96% 68.48%       1 304559 com.sun.tools.javac.main.JavaCompiler.<init>
  25  0.71% 69.19%     256 302078 java.net.URLClassLoader.access$100

Here the count represents the true count of the times this method was entered, and the percentages represent a measure of thread time spent in those method.

The traces normally don't include line numbers but can be added with the lineno option.

Looking at the above data, it appears that even though some of the ZipFile$3 class methods are called over 14,000 times, they don't seem to be consuming vast amounts of CPU time. Again, this is probably represents a poor sample and I would not put much time into analyzing the above information.

Using HAT with HPROF

HAT (Heap Analysis Tool) is a browser based tool that uses the HPROF binary format to construct web pages so you can browse all the objects in the heap, and see all the references to and from objects.

A Bit of HPROF History

Previous releases of J2SE (1.2 through 1.4) contained an HPROF agent built on the experimental JVMPI. JVMPI worked fairly reliably in the old 1.2 Classic VM, but it was unreliable and difficult to maintain with the newer HotSpot VM and the different garbage collectors in the 1.3 and 1.4 releases. The newer JVM TI in J2SE 5.0 replaces both JVMDI and JVMPI. In the 5.0 release, JVMPI is still available, and the older HPROF JVMPI based agent from 1.4.2 can actually be used with 5.0, but it isn't recommended. The new HPROF, in J2SE 5.0, is (with minor exceptions) a fully functional replacement for the old HPROF but source wise was close to being a complete rewrite. All the old options are available, and the output format is basically the same. So if you are used to the old HPROF output, or you have tools that read any HPROF format, you won't see many differences and hopefully you will see fewer problems that you have seen in the past with the JVMPI-based HPROF. The source to HPROF is available with the full JDK download in the demo/jvmti/hprof installation directory.

How Does HPROF Work?

HPROF is a dynamically-linked native library that uses JVM TI and writes out profiling information either to a file descriptor or to a socket in ascii or binary format. This information can be further processed by a profiler front-end tool or dumped to a file. It generates this information through calls to JVM TI, event callbacks from JVM TI, and through Byte Code Insertion (BCI) on all class file images loaded into the VM. JVM TI has an event called JVMTI_EVENT_CLASS_FILE_LOAD_HOOK which gives HPROF access to the class file image and an opportunity to modify that class file image before the VM actually loads it. Sound scary? It is, don't take BCI lightly. In the case of HPROF the BCI operations only instrument and don't change the behavior of the bytecodes. Use of JVM TI was pretty critical here for HPROF to do BCI because we needed to do BCI on ALL the classes, including early classes like java.lang.Object. Of course, the instrumentation code needs to be made inoperable until the VM has reached a stage where this inserted code can be executed, normally the event JVMTI_EVENT_VM_INIT.

The amount of BCI that HPROF does depends on the options supplied, cpu=times triggers insertions into all method entries and exits, and the heap options trigger BCI on the <init> method of java.lang.object and any 'newarray' opcodes seen in any method. This BCI work is actually done through the shared library java_crw_demo, which accepts a set of options, a class file image, and returns a new class file image. The java_crw_demo library is part of the sources delivered with the J2SE 5.0 in the demo/jvmti directory.

Currently HPROF injects calls to static Java methods which in turn call a native method that is in the HPROF agent library itself. This was an early design choice to limit the extra Java code introduced during profiling. So the combination of the requested JVM TI events, and the created BCI events, provides the basics for HPROF to work.

The cpu=samples option doesn't use BCI, HPROF just spawns a separate thread that sleeps for a fixed number of micro seconds, and wakes up and samples all the running thread stacks using JVM TI.

The cpu=times option attempts to track the running stack of all threads, and keep accurate CPU time usage on all methods. This option probably places the greatest strain on the VM, where every method entry and method exit is tracked. Applications that make many method calls will be impacted more than others.

The heap=sites and heap=dump options are the ones that need to track object allocations. These options can be memory intensive (less so with hprof=sites) and applications that allocate many objects or allocate and free many objects will be impacted more with these options. On each object allocation, the stack must be sampled so we know where the object was allocated, and that stack information must be saved. HPROF has a series of tables allocated in the C or malloc() heap that track all it's information. HPROF currently does not allocate any Java objects.

Summary

As you can see, the HPROF agent can be used to generate a wide variety of profiles. But as the above examples using javac demonstrate, make sure you have a large enough sampling to know that your data makes sense.

Brave C/JNI programmers could even take the source to HPROF (it's available in the J2SE SDK download in the demo/jvmti/hprof directory) and customize it or create their own special profiling tool.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


About Sample / Test Applications and Code

Sample Applications and Code

The source code provided with samples and demos for the JDK is meant to illustrate the usage of a given feature or technique and has been deliberately simplified.

Additional steps required for a production-quality application, such as security checks, input validation, and proper error handling, might not be present in the sample code.

Usage of sample code in production environments is strongly discouraged.

Applications Used For Testing

Applications such as the lightweight HTTP server are shipped with the JDK to help developers deploy and test their code easily. They have not been developed in accordance with software development standards for production-quality applications.

Usage of such test and/or support applications in production environments is strongly discouraged.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK Demos

Documentation Contents

Demonstration
Applets and Applications

Applets

Demonstration applets and source code are available at:
  • Demo applets and source code
  • Demo applets and source code in the JDK installation demo/applets directory

To run the applets, use your browser to go to the HTML page and click on the applet link, or use AppletViewer to open the HTML page.

Running an applet in a browser requires the JavaTM Plug-in, which is installed by default with the JDK and JRE. The AppletViewer is provided with the JDK, at bin\appletviewer. For information about how to use the AppletViewer and other JDK tools, see JDK Tools and Utilities.

Applications

Applications and sample code are also available in the JDK installation. These demonstrate various features of the Java 2 platform. The available demos are described in the following sections.

JFC Applications and Applets

These applications and applets, located in the JDK demo/jfc directory, demonstrate Swing and Java 2DTM technology.

Java Platform Debugger Architecture

The demo/jpda/examples.jar file in the JDK contains JPDA examples, including source code for the jdb Java Debugger and the prototype javadt GUI debugger.

The Poller Demo (SolarisTM Operating System only)

This demo, located in the JDK demo/jni/Poller directory, demonstrates access to the input/output multiplexing functionality from the Java programming language. See the Solaris poll man page.

Additional Applications and Applets

Additional applets and applications may be found at:
  • Guide to Features - Examples are included in the documentation for particular features.
  • Applets Page - Located on Sun Java Software web site
  • The Java Tutorial - Located on Sun Java Software web site
    • First Cup of Java
    • "Hello World" Applet and Application

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK Samples

Documentation Contents

Java Web Start Samples

The JDK contains a sample/jnlp directory that includes five samples:

  • CORBA
  • JRE auto-download installer
  • Random-access file
  • servlet
  • WebPad Application

Each is briefly described below. For more information, see the README files for each in the samples/jnlp directory in the SDK.

CORBA

This sample demonstrates how to use CORBA within Java Web Start. It shows how a simple Java program using CORBA can be packaged, downloaded, and executed as a JNLP application by Java Web Start. RMI-IIOP utilizes the Java CORBA Object Request Broker (ORB) and IIOP. This lets you can write all your code in Java and use the rmic compiler to generate the code necessary for connecting your applications via the Internet InterORB Protocol (IIOP) to other applications written in any CORBA-compliant language. Please note that this sample doesn't use any of the JNLP APIs.

JRE auto-download installer

This example shows how to build a Java Web Start JRE auto-download installer.

Random-access file

This sample demonstrates features of the JNLPRandomAccessFile API. The file, which the user picks, is opened as a random file for both writing and reading. The application first writes some hard-coded strings to the file selected by the user. It then reads whatever was written to the file and displays it on to the screen using the awt Container and TextArea components.

servlet

Java Web Start includes a servlet in the sample/jnlp/servlet directory that can be used to package a JNLP file and its associated resources in a Web Archive (.war) file. The purpose of the servlet is to provide a simple and convenient packaging format for JNLP applications, so they can be easily deployed in a Web Container, such as Tomcat or a J2EE-compliant Application Server.

WebPad Application

This simple word-processing application allows users to Create, Open, Modify, Save, and Print files. Webpad application extensively uses the following JNLP APIs to access local resources even when running in the untrusted execution environment: FileOpenService, FileContent, FileSaveService, ClipboardService, PrintService, DownloadService, BasicService, and PersistenceService.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


AppletViewer Tags

The applet viewer makes it possible to run a Java applet without using a browser. AppletViewer ignores any HTML that is not immediately relevant to launching an applet. However, it recognizes a wide variety of applet-launching syntax. The HTML code that AppletViewer recognizes is shown below. All other HTML code is ignored.

object

The object tag is the HTML 4.0 tag for embedding applets and mult-media objects into an HTML page. It is also an Internet Explorer 4.x extension to HTML 3.2 which allows IE to run a Java applet using the latest Java plugin from Sun.

<object
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="code" value="yourClass.class">
  <param name="object" value="serializedObjectOrJavaBean">
  <param name="codebase" value="classFileDirectory">
   ...
  alternate-text
</object>

Notes:

  • AppletViewer ignores the "classID" attribute, on the assumption that it is pointing to the Java plugin, with the value:

    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

  • AppletViewer also ignores the "codebase" attribute that is usually included as part of the object tag, assuming that it points to a Java plugin in a network cab file with a value like:

    codebase="http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,1,0,0"

  • The optional codebase param tag supplies a relative URL that specifies the location of the applet class.

  • Either code or object is specified, not both.

  • The type param tag is not used by AppletViewer, but should be present so that browsers load the plugin properly.

    For an applet, the value should be something like:

    <param name="type" value="application/x-java-applet;version=1.1">

    or

    <param name="type__1" value="application/x-java-applet">

    For a serialized object or JavaBean, the type param value should be something like:

       <param name="type__2" value="application/x-java-bean;version=1.1">

    or

      <param name="type__3" value="application/x-java-bean">

  • Other param tags are argument values supplied to the applet.

  • The object tag recognized by IE4.x and the embed tag recognized by Netscape 4.x can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet.

    For more information, see Java PlugIn HTML Specification

  • AppletViewer does not recognize the java_code, java_codebase, java_object, or java_type param tags. These tags are only needed when the applet defines parameters with the names code, codebase, object, or type, respectively. (In that situation, the plugin recognizes and uses the java_ version in preference to the version that will be used by the applet.) If the applet requires a parameter with one of these 4 names, it may not run in AppletViewer.

embed

The embed tag is the Netscape extension to HTML 3.2 that allows embedding an applet or a multimedia object in an HTML page. It allows a Netscape 4.x browser (which supports HTML 3.2) to run a Java applet using the latest Java plugin from Sun.

<embed
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
   ...
</embed>

Notes:

  • The object and embed tags can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet.

    For more information, see the Java PlugIn HTML Specification

  • Unlike the object tag, all values specified in an embed tag are attributes (part of the tag) rather than parameters (between the start tag and end tag, specified with a param tag.

  • To supply argument values for applet parameters, you add additional attributes to the <embed> tag.

  • AppletViewer ignores the "src" attribute that is usually part of an <embed> tag.

  • Either code or object is specified, not both.

  • The optional codebase attribute supplies a relative URL that specifies the location of the applet class.

  • The type attribute is not used by AppletViewer, but should be present so that browsers load the plugin properly.

    For an applet, the value should be something like:

    <type="application/x-java-applet;version=1.1">...

    or

    <type="application/x-java-applet">...

    For a serialized object or JavaBean, the type param value should be something like:

    <type="application/x-java-bean;version=1.1">...

    or

    <type="application/x-java-bean">...

  • The "pluginspage" attribute is not used by AppletViewer, but should be present so that browsers load the plugin properly. It should point to a Java plugin in a network cab file with a value like:

    pluginspage="http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,1,0,0"

applet

The applet tag is the original HTML 3.2 tag for embedding an applet in an HTML page. Applets loaded using the applet tag are run by the browser, which may not be using the latest version of the Java platform. To ensure that the applet runs with the latest version, use the object tag to load the Java plugin into the browser. The plugin will then run the applet.

<applet
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="..." value="...">
   ...
  alternate-text
</applet>

Notes:

  • Either code or object is specified, not both.

  • The optional codebase attribute supplies a relative URL that specifies the location of the applet class.

  • Param tags supply argument values for applet parameters.

app

The app tag was a short-lived abbreviation for applet that is no longer supported. AppletViewer translates the tag and prints out an equivalent tag that is supported.

<app
  class="classFileName" (without a .class suffix)
  src="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
<param name="..." value="...">
 ...
</app>

For more information on the tags that AppletViewer supports and how to combine them, see the Java PlugIn HTML Specification.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


How Classes are Found

  • How the Java Launcher Finds Classes
    • How the Java Launcher Finds Bootstrap Classes
    • How the Java Launcher Finds Extension Classes
    • How the Java Launcher Finds User Classes
    • How the Java Launcher Finds JAR-class-path Classes
  • How Javac and Javadoc Find Classes
  • Class Loading and Security Policies

How the Java Launcher Finds Classes

The Java launcher, java, initiates the Java virtual machine. The virtual machine searches for and loads classes in this order:

  • Bootstrap classes - Classes that comprise the Java platform, including the classes in rt.jar and several other important jar files.
  • Extension classes - Classes that use the Java Extension mechanism. These are bundled as .jar files located in the extensions directory.
  • User classes - Classes defined by developers and third parties that do not take advantage of the extension mechanism. You identify the location of these classes using the -classpath option on the command line (the preferred method) or by using the CLASSPATH environment variable. (See Setting the Classpath for Windows or Unix.)

In effect, these three search paths are joined to form a simple class path. This is similar to the "flat" class path previously used, but the current model has some important differences:

  • It is relatively difficult to accidentally "hide" or omit the bootstrap classes.
  • In general, you only have to specify the location of user classes. Bootstrap classes and extension classes are found "automatically".
  • The tools classes are now in a separate archive (tools.jar) and can only be used if included in the user class path (to be explained shortly).

How the Java Launcher Finds Bootstrap Classes

Bootstrap classes are the classes that implement the Java 2 Platform. Bootstrap classes are in the rt.jar and several other jar files in the jre/lib directory. These archives are specified by the value of the bootstrap class path which is stored in the sun.boot.class.path system property. This system property is for reference only, and should not be directly modified.

It is very unlikely that you will need to redefine the bootstrap class path. The nonstandard option, -Xbootclasspath, allows you to do so in those rare cicrcumstances in which it is necessary to use a different set of core classes.

Note that the classes which implement the Java 2 SDK tools are in a separate archive from the bootstrap classes. The tools archive is the SDK's/lib/tools.jar file. The development tools add this archive to the user class path when invoking the launcher. However, this augmented user class path is only used to execute the tool. The tools that process source code, javac and javadoc, use the original class path, not the augmented version. (For more information, see How Javac and Javadoc Find Classes, below.)

How the Java Launcher Finds Extension Classes

Extension classes are classes which extend the Java platform. Every .jar file in the extension directory, jre/lib/ext, is assumed to be an extension and is loaded using the Java Extension Framework. Loose class files in the extension directory will not be found. They must be contained in a .jar file (or .zip file). There is no option provided for changing the location of the extension directory.

If the jre/lib/ext directory contains multiple .jar files, and those files contain classes with the same name, such as:

smart-extension1_0.jar contains class smart.extension.Smart
smart-extension1_1.jar contains class smart.extension.Smart

the class that actually gets loaded is undefined.

How the Java Launcher Finds User Classes

User classes are classes which build on the Java platform. To find user classes, the launcher refers to the user class path -- a list of directories, JAR archives, and ZIP archives which contain class files.

A class file has a subpath name that reflects the class's fully-qualified name. For example, if the class com.mypackage.MyClass is stored under /myclasses, then /myclasses must be in the user class path and the full path to the class file must be /myclasses/com/mypackage/MyClass.class. If the class is stored in an archive named myclasses.jar, then myclasses.jar must be in the user class path, and the class file must be stored in the archive as com/mypackage/MyClass.class.

The user class path is specified as a string, with a colon (:) separating the class path entries on Solaris, and a semi-colon (;) separating entries on Microsoft Windows systems. The java launcher puts the user class path string in the java.class.path system property. The possible sources of this value are:

  • The default value, ".", meaning that user class files are all the class files in the current directory (or under it, if in a package).
  • The value of the CLASSPATH environment variable, which overrides the default value.
  • The value of the -cp or -classpath command line option, which overrides both the default value and the CLASSPATH value.
  • The JAR archive specified by the -jar option, which overrides all other values. If this option is used, all user classes must come from the specified archive.

How the Java Launcher Finds JAR-class-path Classes

A JAR file usually contains a "manifest" -- a file which lists the contents of the JAR. The manifest can define a JAR-class-path, which further extends the class path (but only while loading classes from that JAR). Classes accessed by a JAR-class-path are found in the following order:

  • In general, classes referenced by a JAR-class-path entry are found as though they were part of the JAR file. The JAR files that appear in the JAR-class-path are searched after any earlier class path entries, and before any entries that appear later in the class path.
  • However, if the JAR-class-path points to a JAR file that was already searched (for example, an extension, or a JAR file that was listed earlier in the class path) then that JAR file will not be searched again. (This optimization improves efficiency and prevents circular searches.) Such a JAR file is searched at the point that it appears, earlier in the class path.
  • If a JAR file is installed as an extension, then any JAR-class-path it defines is ignored. All the classes required by an extension are presumed to be part of the SDK or to have themselves been installed as extensions.

How Javac and JavaDoc Find Classes

The javac and javadoc tools use class files in two distinct ways:

  • Like any Java application, javac and javadoc must load various class files in order to run.
  • To process the source code they operate on, javac and javadoc must obtain information on object types used in the source code.

The class files used to resolve source code references are mostly the same class files used to run javac and javadoc. But there are some important exceptions:

  • Both javac and javadoc often resolve references to classes and interfaces that having nothing to do with the implementation of javac or javadoc. Information on referenced user classes and interfaces may be present in the form of class files, source code files, or both.
  • The tools classes in tools.jar are only used to run javac and javadoc. The tools classes are not used to resolve source code references unless tools.jar is in the user class path.
  • A programmer may want to resolve boot class or extension class references using an alternative Java platform implementation. Both javac and javadoc support this with their -bootclasspath and -extdirs options. Use of these options does not modify the set of class files used to run the javac or javadoc tools themselves.

If a referenced class is defined in both a class file and source file, javadoc always uses the source file (javadoc never compiles source files). In the same situation javac uses class files, but automatically recompiles any class files it determines to be out of date. The rules for automatic recompilation are documented in the javac document for Windows or Unix.

By default, javac and javadoc search the user class path for both class files and source code files. If the -sourcepath option is specified, javac and javadoc search for source files only on the specified source file path, while still searching the user class path for class files.

Class Loading and Security Policies

To be used, a class or interface must be loaded by a class loader. Use of a particular class loader determines a security policy associated with the class loader.

A program can load a class or interface by calling the loadClass method of a class loader object. But usually a program loads a class or interface simply by referring to it. This invokes an internal class loader, which can apply a security policy to extension and user classes. If the security policy has not been enabled, all classes are "trusted". Even if the security policy is enabled, it does not apply to bootstrap classes, which are always "trusted."

When enabled, security policy is configured by system and user policy files. The Java 2 SDK includes a system policy file that grants "trusted" status to extension classes and places basic restrictions on user classes.

To enable or configure the security policy, refer to Security Features.

Note: Some security programming techniques that worked with the Java 1.1 platform are incompatible with the class loading model of the Java 2 Platform.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK Development Tools

Documentation Contents

JDK Tools and Utilities

General

  • General Information (file structure, classpath, how classes are found, changes)
  • Enhancements

Standard JDK Tools and Utilities

  • Basic Tools (appletviewer, extcheck, jar, java, javac, javadoc, javah, javap, jdb)
  • Security Tools (keytool, jarsigner, policytool, kinit, klist, ktab)
  • Internationalization Tools (native2ascii)
  • Remote Method Invocation (RMI) Tools (rmic, rmiregistry, rmid, serialver)
  • Java IDL and RMI-IIOP Tools (tnameserv, idlj, orbd, servertool)
  • Java Deployment Tools (javafxpackager, pack200, unpack200)
  • Java Web Start Tools (javaws)
  • Java Troubleshooting, Profiling, Monitoring and Management Tools (JConsole)
  • Java Web Services Tools (schemagen, wsgen, wsimport, xjc)

Experimental JDK Tools and Utilities

NOTE - The tools described in this section are unsupported and experimental in nature and should be used with that in mind. They might not be available in future JDK versions.

  • Monitoring Tools (jps, jstat, jstatd)
  • Troubleshooting Tools (jinfo, jhat, jmap, jsadebugd, jstack)
  • Scripting Tools (jrunscript)

Troubleshooting Documentation

  • Java™ SE Troubleshooting web site (tools, options, and other items for use in analyzing problems)

NOTE - The Windows and Unix references pages for some tools have minor differences in configuration and usage -- for example, the character used to specify directory separators may be different.

General Information

The following documents contain important information you will need to know to get the most out of the JDK tools.

Document Type | Platform
JDK File Structure | [Unix] [Windows]
Setting the Classpath | [Unix] [Windows]
How Classes are Found | [Unix and Windows]

Enhancements

The man page for each tool reflects the latest behavior for that tool, but the following page details the tools changes specific to a release.

  • Enhancements in JDK 7
  • Enhancements in JDK 8

Basic Tools

These tools are the foundation of the JDK. They are the tools you use to create and build applications.

Tool Name | Brief Description | Links to Reference Pages
appletviewer | Run and debug applets without a web browser. | [Unix] [Windows]
extcheck | Utility to detect Jar conflicts. | [Unix] [Windows]
jar | Create and manage Java Archive (JAR) files. See Java Archive Files page for the JAR specification. | [Unix] [Windows]
java | The launcher for Java applications. In this release, a single launcher is used both for development and deployment. The old deployment launcher, jre, is no longer provided. | [Unix] [Windows]
javac | The compiler for the Java programming language. | [Unix] [Windows]
javadoc | API documentation generator. See Javadoc Tool page for doclet and taglet APIs. | [Unix] [Windows]
javah | C header and stub generator. Used to write native methods. | [Unix] [Windows]
javap | Class file disassembler | [Unix] [Windows]
jdb | The Java Debugger. See JPDA for the debugger architecture specifications. | [Unix] [Windows]

Security Tools

These security tools help you set security policies on your system and create applications that can work within the scope of security policies set at remote sites.
Tool Name | Brief Description | Links to Reference Pages
keytool | Manage keystores and certificates. | [Unix] [Windows]
jarsigner | Generate and verify JAR signatures. | [Unix] [Windows]
policytool | GUI tool for managing policy files. | [Unix] [Windows]

These security tools help you obtain, list, and manage Kerberos tickets.

Tool Name | Brief Description | Links to Reference Pages
kinit | Tool for obtaining Kerberos v5 tickets. Equivalent functionality is available on the Solaris operating system via the kinit tool. For example, for Solaris 11, see the kinit reference page. | [Windows]
klist | Command-line tool to list entries in credential cache and key tab. Equivalent functionality is available on the Solaris operating system via the klist tool. For example, for Solaris 11, see the klist reference page. | [Windows]
ktab | Command-line tool to help the user manage entries in the key table. Equivalent functionality is available on the Solaris operating system via the kadmin tool. For example, for Solaris 11, see the kadmin reference page. | [Windows]

Internationalization Tools

This tool helps to create localizable applications.
Tool Name | Brief Description | Links to Reference Pages
native2ascii | Convert text to Unicode Latin-1. | [Unix] [Windows]

Remote Method Invocation (RMI) Tools

These tools help to create applications that interact over the Web or other network.
Tool Name | Brief Description | Links to Reference Pages
rmic | Generate stubs and skeletons for remote objects. | [Unix] [Windows]
rmiregistry | Remote object registry service. | [Unix] [Windows]
rmid | RMI activation system daemon. | [Unix] [Windows]
serialver | Return class serialVersionUID. | [Unix] [Windows]

Java IDL and RMI-IIOP Tools

These tools are used when creating applications that use OMG-standard IDL and CORBA/IIOP.
Tool Name | Brief Description | Links to Reference Pages
tnameserv | Provides access to the naming service. | [Unix] [Windows]
idlj | Generates .java files that map an OMG IDL interface and enable an application written in the Java programming language to use CORBA functionality. | [Unix] [Windows]
orbd | Provides support for clients to transparently locate and invoke persistent objects on servers in the CORBA environment. ORBD is used instead of the Transient Naming Service, tnameserv. ORBD includes both a Transient Naming Service and a Persistent Naming Service. The orbd tool incorporates the functionality of a Server Manager, an Interoperable Naming Service, and a Bootstrap Name Server. When used in conjunction with the servertool, the Server Manager locates, registers, and activates a server when a client wants to access the server. | [Unix] [Windows]
servertool | Provides ease-of-use interface for the application programmers to register, unregister, startup, and shutdown a server. | [Unix] [Windows]

Java Deployment Tools

Utilities for use in conjunction with deployment of java applications and applets on the web.
Tool Name | Brief Description | Links to Reference Pages
javafxpackager | Packages JavaFX applications for deployment. See Deploying JavaFX Applications for more information. | [Unix and Windows]
pack200 | Transforms a JAR file into a compressed pack200 file using the Java gzip compressor. The compressed packed files are highly compressed JARs, which can be directly deployed, saving bandwidth and reducing download time. | [Unix] [Windows]
unpack200 | Transforms a packed file produced by pack200 into a JAR file. | [Unix] [Windows]

Java Web Start Tools

Utilities for use in conjunction with Java Web Start.
Tool Name | Brief Description | Links to Reference Pages
javaws | Command line tool for launching Java Web Start and setting various options. See Java Web Start Guide for more information. | [Unix] [Windows]

Java Troubleshooting, Profiling, Monitoring and Management Tools

Tool Name | Brief Description | Links to Reference Pages
jconsole | A JMX-compliant graphical tool for monitoring a Java virtual machine. It can monitor both local and remote JVMs. It can also monitor and manage an application. See Monitoring and Management for the Java Platform for more information. | [Unix] [Windows]

Java Web Services Tools

Tool Name | Brief Description | Links to Reference Pages
schemagen | Schema generator for Java Architecture for XML Binding. | [Unix] [Windows]
wsgen | Tool to generate JAX-WS portable artifacts. | [Unix] [Windows]
wsimport | Tool to generate JAX-WS portable artifacts. | [Unix] [Windows]
xjc | Binding compiler for Java Architecture for XML Binding. | [Unix] [Windows]

Monitoring Tools

You can use the following tools to monitor JVM performance statistics. The tools described in this section are unsupported and experimental, and should be used with that in mind. They may not be available in future JDK versions.

These tools are supported on all platforms except Windows 98 and Windows ME.

Tool Name | Brief Description | Links to Reference Pages
jcmd | Experimental: JVM Diagnostic Commands tool - Sends diagnostic command requests to a running Java Virtual Machine. | [Unix] [Windows]
jps | Experimental: JVM Process Status Tool - Lists instrumented HotSpot Java virtual machines on a target system. | [Unix] [Windows]
jstat | Experimental: JVM Statistics Monitoring Tool - Attaches to an instrumented HotSpot Java virtual machine and collects and logs performance statistics as specified by the command line options. | [Unix] [Windows]
jstatd | Experimental: JVM jstat Daemon - Launches an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines and provides a interface to allow remote monitoring tools to attach to Java virtual machines running on the local system. | [Unix] [Windows]

Troubleshooting Tools

The following tools can be used for specific troubleshooting tasks. The tools described in this section are unsupported and experimental in nature and should be used with that in mind. They may not be available in future JDK versions.

Some of these tools are not currently available on Windows platforms.

Tool Name | Brief Description | Links to Reference Pages
jinfo | Experimental - Configuration Info for Java - Prints configuration information for a given process or core file or a remote debug server. | [Unix] [Windows]
jhat | Experimental - Heap Dump Browser - Starts a web server on a heap dump file (for example, produced by jmap -dump), allowing the heap to be browsed. | [Unix] [Windows]
jmap | Experimental - Memory Map for Java - Prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. | [Unix] [Windows]
jsadebugd | Experimental - Serviceability Agent Debug Daemon for Java - Attaches to a process or core file and acts as a debug server. | [Unix] [Windows]
jstack | Experimental - Stack Trace for Java - Prints a stack trace of threads for a given process or core file or remote debug server. | [Unix] [Windows]

Refer to the Java™ SE Troubleshooting web site for descriptions of tools, options, and other information to use in analyzing problems. The documents at this site contain suggestions about what to try before submitting a bug report and what data to collect for a report.

Scripting Tools

The following tools can be used to run scripts that interact with the Java platform.

Tool Name | Brief Description | Links to Reference Pages
jjs | Runs the Nashorn command-line script shell. | [Unix] [Windows]
jrunscript | Experimental - Script shell for Java - Runs a script. This tool is unsupported and experimental in nature and should be used with that in mind. It might not be available in future JDK versions. | [Unix] [Windows]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Tools Enhancements in JDK 7

JDK Tools and Utilities

The following enhancements are introduced:

Area: Tools
Standard/Platform: JDK 7
Synopsis: A succinct and concise error message is printed, as appropriate, when an error occurs during the Java launcher initialization. The full stack trace will be printed when applicable, or when the error has trickled up from the ClassLoader or Reflection APIs.
RFE: 6968053

Area: Tools
Standard/Platform: JDK 7
Synopsis: Previously, the pack200 tool defaulted to using java6 packfiles in the absence of any java6 (or newer) classfiles in a segment. Starting with JDK 7, the pack200 tool defaults to using java5 packfiles for maximum compatibility.
RFE: 6712743

Area: Tools
Standard/Platform: JDK 7
Synopsis: On Solaris only, the JRE and JDK distributions had the following symbolic link (symlink): jre/lib/libjvm.so->client/libjvm.so. This was provided as a transition aid from Solaris Production JRE to the Java Reference version (more precisely ExactVM to HotSpot). This symlink will cease to exist and is no longer supported.
Applications (usually legacy Solaris applications with a custom launcher) that have assumed the existence of this symlink, must relink with the desired library (implementing server or client), or must dynamically link with the desired VM. They can also create that symlink manually or copy the desired library implementing the VM, though this is not a recommended practice and may cause undesired side effects.
RFE: 6899834

Area: Tools
Standard/Platform: JDK 7
Synopsis: The HtmlConverter tool is no longer part of the JDK 7 distribution (starting with b128).
RFE: 4523289

Area: Tools
Standard/Platform: JDK 7
Synopsis: The default values for the cryptographic algorithms used by the keytool and jarsigner utilities have been updated to be stronger. See the keytool and jarsigner tool docs for more information.
RFE: 6561126

Area: Tools
Standard/Platform: JDK 7
Synopsis: The keytool and jarsigner tools now support the ECC algorithm in keypair generation and jar signing.
RFE: 6870812

Area: Tools
Standard/Platform: JDK 7
Synopsis: A new keytool command (-gencert) is provided to generate a non self-signed certificate. A new option (-ext) is provided to generate several X.509 v3 extensions for the -gencert, -genkeypair, and -certreq commands. There are also other new commands and options for the keytool and jarsigner tools. See the keytool and jarsigner tool docs for more information.
RFE: 6780416, 6802846, 6324292, 6890872

Area: Tools
Standard/Platform: JDK 7
Synopsis: In JDK 7, the javadoc tool has been updated to use style markup classes that can control the styles of the generated pages. With the -stylesheetfile option, you can provide an alternate stylesheet file to be used. Without this option, the javadoc tool automatically creates a stylesheet file called "stylesheet.css". You can override this default with another file name, for example:

C:> javadoc -stylesheetfile C:\user\exampleStylesheet.css com.examplePackage
The generated pages have style markups for various sections. Through the stylesheet file you can define styles for these sections. The default stylesheet file is sorted according to each style in that section. You can customize the styles for:
  • Page navigation
  • Headers and Footers
  • Content
  • Overall document
RFE: 7052425, 6851834
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Tools Enhancements in JDK 8

JDK Tools and Utilities

The following enhancements were introduced in JDK 8:

  • The jjs command was introduced, which invokes the Nashorn engine either in interactive shell mode, or to interpret script files. For more information, see the Nashorn User's Guide.

  • The java command is capable of launching JavaFX applications, provided that the JavaFX application is packaged correctly. See How Classes are Found.

  • The java command man page (both nroff and HTML) has been completely reworked. The advanced options are now divided into Runtime, Compiler, Garbage Collection, and Serviceability, according to the area that they affect. Several previously missing options are now described. There is also a section for options that were deprecated or removed since the previous release.

  • The new jdeps command-line tool allows the developer to analyze class files to determine package-level or class-level dependencies. See JDK-8003562.

  • JDK 8 provides remote access to diagnostic commands which were previously accessible only locally via the jcmd tool. Remote access is provided using the Java Management Extensions (JMX), so diagnostic commands are exposed to a platform MBean registered to the platform MBean server. The MBean is the com.sun.management.DiagnosticCommandMBean interface. See the jcmd for Unix or Windows.

  • The jarsigner tool contains a new option -tsapolicyid which enables you to request a signed time stamp from a Time Stamping Authority and attach it to a signed JAR file. See JDK-8009636

  • You can obtain the names of the formal parameters of any method or constructor with the method java.lang.reflect.Executable.getParameters. However, .class files do not store formal parameter names by default. To store formal parameter names in a particular .class file, and thus enable the Reflection API to retrieve formal parameter names, compile the source file with the -parameters option of the javac compiler. See JDK-8004727.

  • The type rules for binary comparisons in the Java Language Specification (JLS) Section 15.21 will now be correctly enforced by javac. Since JDK5, javac has accepted some programs with Object-primitive comparisons that are incorrectly typed according to JLS 15.21. These comparisons will now be correctly identified as type errors. See JDK-8013357.

  • The apt tool and its associated API contained in the package com.sun.mirror have been removed in this release. Use the options available in the javac tool and the APIs contained in the packages javax.annotation.processing and javax.lang.model to process annotations. See JDK-7041249

For enhancements pertaining to the javadoc tool, see the What's New page for Javadoc.

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


appletviewer

Runs applets outside of a web browser.

Synopsis

appletviewer [options] url...

options

The command-line options separated by spaces. See Options.

url

The location of the documents or resources to be displayed. You can specify multiple URLs separated by spaces.

Description

The appletviewer command connects to the documents or resources designated by urls and displays each applet referenced by the documents in its own window. If the documents referred to by urls do not reference any applets with the OBJECT, EMBED, or APPLET tag, then the appletviewer command does nothing. For details about the HTML tags that the appletviewer command supports, see AppletViewer Tags at
http://docs.oracle.com/javase/8/docs/technotes/tools/appletviewertags.html

The appletviewer command requires encoded URLs according to the escaping mechanism defined in RFC2396. Only encoded URLs are supported. However, file names must be unencoded, as specified in RFC2396.

Note: The appletviewer command is intended for development purposes only. For more information, see About Sample/Test Applications and Code at
http://docs.oracle.com/javase/8/docs/technotes/samples/aboutCodeSamples.html

Options

-debug

Starts the Applet Viewer in the Java debugger with the jdb command to debug the applets in the document.

-encoding encoding-name

Specifies the input HTML file encoding name.

-Jjavaoption

Passes the string javaoption as a single argument to the Java interpreter, which runs the Applet Viewer. The argument should not contain spaces. Multiple argument words must all begin with the prefix -J. This is useful for adjusting the compiler's execution environment or memory usage.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Command Reference

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

4 Command Reference

This section lists and describes the Java Platform Standard Edition, Java SE) commands.

The Java SE commands provide a way for developers to handle development tasks such as compiling and running a program, packaging source files in to a JAR file, applying security policies to a JAR file, and more.

Command Reference Pages

This command reference describes the full set of JDK commands. The JDK commands that perform related functions are grouped into parts, as follows.

Create and Build Applications

appletviewer: Runs applets outside of a web browser.

extcheck: Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files.

jar: Combines multiple files into a single JAR file.

java: Starts a Java application.

javac: Reads Java class and interface definitions and compiles them into bytecode and class files.

javadoc: Generates HTML pages of API documentation from Java source files.

javah: Generates C header and source files from a Java class.

javap: Disassembles one or more class files.

jdb: Finds and fixes bugs in Java platform programs.

Security

These commands set security policies on your local system and create applications that can work within the scope of the security policies set at remote sites.

keytool: Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

jarsigner: Signs and verifies JAR files.

policytool: Reads and writes a plain text policy file based on user input through the utility GUI.

Internationalization

native2ascii: Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes (\uxxxx) notation for all characters that are not part of the ASCII character set, or vice versa.

Remote Method Invocation (RMI)

These commands create applications that interact over the web or with another network.

rmic: Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP). Also generates Object Management Group (OMG) Interface Definition Language (IDL).

rmiregistry: Starts a remote object registry on the specified port on the current host.

rmid: Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM).

serialver: Returns the serial version UID for specified classes.

Java IDL and RMI-IIOP

These commands create applications that use OMG-standard IDL and CORBA/IIOP.

tnameserv: Starts the Java Interface Definition Language (IDL) name server.

idlj: Generates Java bindings for a given Interface Definition Language (IDL) file.

orbd: Enables clients to locate and call persistent objects on servers in the CORBA environment.

servertool: Provides an easy-to-use interface for the application programmers to register, unregister, start up, and shut down a server.

Deploy Applications and Applets

pack200: Packages a JAR file into a compressed pack200 file for web deployment.

unpack200: Transforms a packed file produced by pack200(1) into a JAR file for web deployment.

Java Web Start

javaws: Starts Java Web Start.

Monitor Java Applications

jconsole: Starts a graphical console that lets you monitor and manage Java applications.

jvisualvm: Visually monitors, troubleshoots, and profiles Java applications.

Monitor the Java Virtual Machine

These commands are unsupported and experimental and might not be available in future JDK release. These command are not supported on Windows 98 and Windows ME.

jps: Experimental. Lists the instrumented Java Virtual Machines (JVMs) on the target system.

jstat: Experimental. Monitors JVM statistics

jstatd: Experimental. Monitors JVMs and enables remote monitoring tools to attach to JVMs.

Web Services

schemagen: Generates a schema for every name space that is referenced in your Java classes.

wsgen: Reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation.

wsimport: Generates JAX-WS portable artifacts that can be packaged in a web application archive (WAR) file and provides an Ant task.

xjc: Compiles an XML schema file into fully annotated Java classes.

Troubleshooting

Most of these commands are unsupported and experimental and might not be available in future JDK releases. Some of these commands are not available on Windows platforms.

jcmd: Sends diagnostic command requests to a running JVM.

jinfo: Experimental. Generates configuration information.

jhat: Experimental. Analyzes the Java heap.

jmap: Experimental. Prints shared object memory maps or heap memory details for a process, core file, or remote debug server.

jsadebugd: Experimental. Attaches to a Java process or core file and acts as a debug server.

jstack: Experimental. Prints Java thread stack traces for a Java process, core file, or remote debug server.

Scripting

This command is unsupported and experimental and might not be available in future JDK releases.

jrunscript: Experimental. Runs a command-line script shell that supports interactive and batch modes.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Create and Build Applications

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

5 Create and Build Applications

Use the following commands to create and build applications:

This section contains the following commands:

appletviewer: Runs applets outside of a web browser.

extcheck: Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files.

jar: Combines multiple files into a single JAR file.

java: Starts a Java application.

javac: Reads Java class and interface definitions and compiles them into bytecode and class files.

javadoc: Generates HTML pages of API documentation from Java source files.

javah: Generates C header and source files from a Java class.

javap: Disassembles one or more class files.

jdb: Finds and fixes bugs in Java platform programs.

jdeps: Java class dependency analyzer

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Deploy Applications and Applets

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

10 Deploy Applications and Applets

Use these commands to deploy Java applications and applets to the web.

This section contains the following commands:

pack200: Packages a JAR file into a compressed pack200 file for web deployment.

unpack200: Transforms a packed file produced by pack200(1) into a JAR file for web deployment.

javafxpackager: Performs tasks related to packaging and signing JavaFX applications.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


extcheck

Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files.

Synopsis

extcheck [options] targetfile.jar

options

The command-line options. See Options.

targetfile.jar

The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts.

Description

The extcheck command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed.

The extcheck command compares the Specification-title and Specification-version headers in the manifest of the targetfile.jar file against the corresponding headers in all JAR files currently installed in the extension directory. By default, the extension directory is jre/lib/ext on Oracle Solaris and \jre\lib\ext on Windows. The extcheck command compares version numbers in the same way as the java.lang.Package.isCompatibleWith method.

If no conflict is detected, then the return code is 0.

If the manifest of any JAR file in the extensions directory has the same Specification-title and the same or a newer Specification-version number, then a non-zero error code is returned. A non-zero error code is also returned when targetfile.jar does not have the Specification-title or Specification-version attributes in its manifest file.

Options

-verbose

Lists JAR files in the extension directory as they are checked. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported.

-Joption

Passes option to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

See Also

  • jar(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


How Classes are Found

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

1 How Classes are Found

The java command is called the Java launcher because it launches Java applications. When the Java launcher is called, it gathers input from the user and the user's environment (such as the class path and the boot class path), interfaces with the Virtual Machine (VM), and gets it started via some bootstrapping. The Java Virtual Machine (JVM) does the rest of the work.

This chapter covers the following topics:

  • How the Java Runtime Finds Classes

  • How the javac and javadoc Commands Find Classes

  • Class Loading and Security Policies

How the Java Runtime Finds Classes

The JVM searches for and loads classes in this order:

  1. Bootstrap classes, which are classes that comprise the Java platform, including the classes in rt.jar and several other important JAR files.

  2. Extension classes, which use the Java Extension mechanism. These classes are bundled as JAR files and located in the extensions directory.

  3. User classes are classes that are defined by developers and third parties and that do not take advantage of the extension mechanism. You identify the location of these classes with the -classpath option on the command line (preferred) or with the CLASSPATH environment variable. See Setting the Class Path.

In effect, the three search paths together form a simple class path. This is similar to the flat class path previously used, but the current model has the following improvements:

  • It is relatively difficult to accidentally hide or omit the bootstrap classes.

  • In general, you only have to specify the location of user classes. Bootstrap classes and extension classes are found automatically.

  • The tools classes are now in a separate archive (tools.jar) and can only be used if included in the user class path described in How the Java Runtime Finds Bootstrap Classes.

How the Java Runtime Finds Bootstrap Classes

Bootstrap classes are the classes that implement Java SE. Bootstrap classes are in the rt.jar file and several other JAR files in the jre/lib directory. These archives are specified by the value of the bootstrap class path that is stored in the sun.boot.class.path system property. This system property is for reference only and should not be directly modified.It is unlikely that you will need to redefine the bootstrap class path. The nonstandard option, -Xbootclasspath, allows you to do so in those rare circumstances in which it is necessary to use a different set of core classes.

Note that the classes that implement the JDK tools are in a separate archive from the bootstrap classes. The tools archive is the JDK /lib/tools.jar file. The development tools add this archive to the user class path when invoking the launcher. However, this augmented user class path is only used to execute the tool. The tools that process source code, the javac command, and the javadoc command, use the original class path, not the augmented version. For more information, see How the javac and javadoc Commands Find Classes.

How the Java Runtime Finds Extension Classes

Extension classes are classes that extend the Java platform. Every .jar file in the extension directory, jre/lib/ext, is assumed to be an extension and is loaded with the Java Extension Framework. Loose class files in the extension directory are not found. They must be contained in a JAR file or Zip file. There is no option provided for changing the location of the extension directory.

If the jre/lib/ext directory contains multiple JAR files, and those files contain classes with the same name such as in the following example, the class that actually gets loaded is undefined.

smart-extension1_0.jar contains class smart.extension.Smart

smart-extension1_1.jar contains class smart.extension.Smart

How the Java Runtime Finds User Classes

To find user classes, the launcher refers to the user class path, which is a list of directories, JAR files, and Zip files that contain class files.

A class file has a subpath name that reflects the fully-qualified name of the class. For example, if the class com.mypackage.MyClass is stored under myclasses, then myclasses must be in the user class path, and the full path to the class file must be /myclasses/com/mypackage/MyClass.class on Oracle Solaris or in \myclasses\com\mypackage\MyClass.class on Windows.

If the class is stored in an archive named myclasses.jar, then myclasses.jar must be in the user class path, and the class file must be stored in the archive as com/mypackage/MyClass.class on Windows or in com\mypackage\MyClass.class on Oracle Solaris.

The user class path is specified as a string, with a colon (:) to separate the class path entries on Oracle Solaris, and a semicolon (;) to separate the entries on Windows systems. The Java launcher puts the user class path string in the java.class.path system property. The possible sources of this value are:

  • The default value, *.*, which means that user class files are all the class files in or under the current directory.

  • The value of the CLASSPATH environment variable that overrides the default value.

  • The value of the -cp or -classpath command-line option that overrides both the default value and the CLASSPATH value.

  • The JAR archive specified by the -jar option overrides all other values if it contains a Class-Path entry in its manifest. If this option is used, all user classes must come from the specified archive.

How the Java Runtime Finds JAR-class-path Classes

A JAR file usually contains a manifest, which is a file that lists the contents of the JAR file. The manifest can define a JAR class path, which further extends the class path, but only while loading classes from that JAR file. Classes accessed by a JAR class path are found in the following order:

  1. In general, classes referenced by a JAR class path entry are found as though they are part of the JAR file. The JAR files that appear in the JAR-class-path are searched after any earlier class path entries and before any entries that appear later in the class path.

  2. If the JAR class path points to a JAR file that was already searched, for example, an extension or a JAR file that was listed earlier in the class path, then that JAR file is not searched again. This optimization improves efficiency and prevents circular searches. This type of JAR file is searched at the point that it appears, which is earlier in the class path.

  3. If a JAR file is installed as an extension, then any JAR class path it defines is ignored. All of the classes required by an extension are presumed to be part of the JDK or to have been installed as extension.

How the javac and javadoc Commands Find Classes

The javac and javadoc commands use class files in the following two ways:

  • To run, the javac and javadoc commands must load various class files.

  • To process the source code they operate on, the javac and javadoc commands must obtain information on object types used in the source code.

The class files used to resolve source code references are mostly the same class files used to run the javac and javadoc commands. But there are some important exceptions, as follows:

  • Both the javac and javadoc commands often resolve references to classes and interfaces that have nothing to do with the implementation of the javac or javadoc commands. Information on referenced user classes and interfaces might be present in the form of class files, source code files, or both.

  • The tools classes in the tools.jar file are only used to run the javac and javadoc commands. The tools classes are not used to resolve source code references unless the tools.jar file is in the user class path.

  • A programmer might want to resolve boot class or extension class references with an alternative Java platform implementation. Both the javac and javadoc commands support this with their -bootclasspath and -extdirs options. Use of these options does not modify the set of class files used to run the javac or javadoc commands themselves.

If a referenced class is defined in both a class file and a source file, the javadoc command always uses the source file. The javadoc command never compiles source files. In the same situation the javac command uses class files, but automatically recompiles any class files it determines to be out of date. The rules for automatic recompilation are documented in javac.

By default, the javac and javadoc commands search the user class path for both class files and source code files. If the -sourcepath option is specified, the javac and javadoc commands search for source files only on the specified source file path, while still searching the user class path for class files.

Class Loading and Security Policies

To be used, a class or interface must be loaded by a class loader. Use of a particular class loader determines a security policy associated with the class loader.

A program can load a class or interface by calling the loadClass method of a class loader object. But usually a program loads a class or interface by referring to it. This invokes an internal class loader, which can apply a security policy to extension and user classes. If the security policy has not been enabled, all classes are trusted. Even if the security policy is enabled, it does not apply to bootstrap classes, which are always trusted.

When enabled, security policy is configured by system and user policy files. The Java platform SDK includes a system policy file that grants trusted status to extension classes and places basic restrictions on user classes.

To enable or configure the security policy, refer to Security Features.

Note: Some security programming techniques that worked with earlier releases of Java SE are incompatible with the class loading model of the current release.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


idlj

Generates Java bindings for a specified Interface Definition Language (IDL) file.

Synopsis

idlj [ options ] idlfile

options

The command-line options. See Options. Options can appear in any order, but must precede the idlfile.

idlfile

The name of a file that contains Interface Definition Language (IDL) definitions.

Description

The IDL-to-Java Compiler generates the Java bindings for a specified IDL file. For binding details, see Java IDL: IDL to Java Language Mapping at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping.html

Some earlier releases of the IDL-to-Java compiler were named idltojava.

Emit Client and Server Bindings

The following idlj command generates an IDL file named My.idl with client-side bindings.

idlj My.idl

The previous syntax is equivalent to the following:

idlj -fclient My.idl

The next example generates the server-side bindings, and includes the client-side bindings plus the skeleton, all of which are POA (Inheritance Model).

idlg -fserver My.idl

If you want to generate both client and server-side bindings, then use one of the following (equivalent) commands:

idlj -fclient -fserver My.idl
idlj -fall My.idl

There are two possible server-side models: the Portal Servant Inheritance Model and the Tie Model. See Tie Delegation Model.

Portable Servant Inheritance Model

The default server-side model is the Portable Servant Inheritance Model. Given an interface My defined in My.idl, the file MyPOA.java is generated. You must provide the implementation for the My interface, and the My interface must inherit from the MyPOA class. MyPOA.java is a stream-based skeleton that extends the org.omg.PortableServer.Servant class at
http://docs.oracle.com/javase/8/docs/api/org/omg/PortableServer/Servant.html

The My interface implements the callHandler interface and the operations interface associated with the IDL interface the skeleton implements.

The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. See Portable Object Adapter (POA) at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/POA.html

In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior.

Another option for the Inheritance Model is to use the -oldImplBase flag to generate server-side bindings that are compatible with releases of the Java programming language before Java SE 1.4. The -oldImplBase flag is nonstandard, and these APIs are deprecated. You would use this flag only for compatibility with existing servers written in Java SE 1.3. In that case, you would need to modify an existing make file to add the -oldImplBase flag to the idlj compiler. Otherwise POA-based server-side mappings are generated. To generate server-side bindings that are backward compatible, do the following:

idlj -fclient -fserver -oldImplBase My.idl
idlj -fall -oldImplBase My.idl

Given an interface My defined in My.idl, the file _MyImplBase.java is generated. You must provide the implementation for the My interface, and the My interface must inherit from the _MyImplBase class.

Tie Delegation Model

The other server-side model is called the Tie Model. This is a delegation model. Because it is not possible to generate ties and skeletons at the same time, they must be generated separately. The following commands generate the bindings for the Tie Model:

idlj -fall My.idl
idlj -fallTIE My.idl

For the My interface, the second command generates MyPOATie.java. The constructor to the MyPOATie class takes a delegate. In this example, using the default POA model, the constructor also needs a POA. You must provide the implementation for the delegate, but it does not have to inherit from any other class, only the interface MyOperations. To use it with the ORB, you must wrap your implementation within the MyPOATie class, for example:

ORB orb = ORB.init(args, System.getProperties());

// Get reference to rootpoa & activate the POAManager
POA rootpoa = (POA)orb.resolve_initial_references("RootPOA");
rootpoa.the_POAManager().activate();

// create servant and register it with the ORB
MyServant myDelegate = new MyServant();
myDelegate.setORB(orb);

// create a tie, with servant being the delegate.
MyPOATie tie = new MyPOATie(myDelegate, rootpoa);

// obtain the objectRef for the tie
My ref = tie._this(orb);

You might want to use the Tie model instead of the typical Inheritance model when your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, then that slot is used up. With the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when a method is called.

For server-side generation, Tie model bindings that are compatible with versions of the IDL to Java language mapping in versions earlier than Java SE 1.4.

idlj -oldImplBase -fall My.idl
idlj -oldImplBase -fallTIE My.idl

For the My interface, the this generates My_Tie.java. The constructor to the My_Tie class takes an impl object. You must provide the implementation for impl, but it does not have to inherit from any other class, only the interface HelloOperations. But to use it with the ORB, you must wrap your implementation within My_Tie, for example:

ORB orb = ORB.init(args, System.getProperties());

// create servant and register it with the ORB
MyServant myDelegate = new MyServant();
myDelegate.setORB(orb);

// create a tie, with servant being the delegate.
MyPOATie tie = new MyPOATie(myDelegate);

// obtain the objectRef for the tie
My ref = tie._this(orb);

Specify Alternate Locations for Emitted Files

If you want to direct the emitted files to a directory other than the current directory, then call the compiler this way: idlj -td /altdir My.idl.

For the My interface, the bindings are emitted to /altdir/My.java, etc., instead of ./My.java.

Specify Alternate Locations for Include Files

If the My.idl file includes another idl file, MyOther.idl, then the compiler assumes that the MyOther.idl file resides in the local directory. If it resides in /includes, for example, then you call the compiler with the following command:

idlj -i /includes My.idl

If My.idl also included Another.idl that resided in /moreIncludes, for example, then you call the compiler with the following command:

idlj -i /includes -i /moreIncludes My.idl

Because this form of include can become long, another way to indicate to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named idl.config in a directory that is listed in your CLASSPATH variable. Inside of idl.config, provide a line with the following form:

includes=/includes;/moreIncludes

The compiler will find this file and read in the includes list. Note that in this example the separator character between the two directories is a semicolon (;). This separator character is platform dependent. On the Windows platform, use a semicolon, on the Unix platform, use a colon, and so on.

Emit Bindings for Include Files

By default, only those interfaces, structures, and so on, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files:

My.idl file:

#include <MyOther.idl>
interface My
{
};

MyOther.idl file:

interface MyOther
{
};

There is a caveat to the default rule. Any #include statements that appear at the global scope are treated as described. These #include statements can be thought of as import statements. The #include statements that appear within an enclosed scope are treated as true #include statements, which means that the code within the included file is treated as though it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example:

My.idl file:

#include <MyOther.idl>
interface My
{
  #include <Embedded.idl>
};

MyOther.idl file:

interface MyOther
{
};

Embedded.idl

enum E {one, two, three};

Run idlj My.idl to generate the following list of Java files. Notice that MyOther.java is not generated because it is defined in an import-like #include. But E.java was generated because it was defined in a true #include. Notice that because the Embedded.idl file is included within the scope of the interface My, it appears within the scope of My (in MyPackage). If the -emitAll flag had been used, then all types in all included files would have been emitted.

./MyHolder.java
./MyHelper.java
./_MyStub.java
./MyPackage
./MyPackage/EHolder.java
./MyPackage/EHelper.java
./MyPackage/E.java
./My.java

Insert Package Prefixes

Suppose that you work for a company named ABC that has constructed the following IDL file:

Widgets.idl file:

module Widgets
{
  interface W1 {...};
  interface W2 {...};
};

If you run this file through the IDL-to-Java compiler, then the Java bindings for W1 and W2 are placed within the Widgets package. There is an industry convention that states that a company's packages should reside within a package named com.<company name>. To follow this convention, the package name should be com.abc.Widgets. To place this package prefix onto the Widgets module, execute the following:

idlj -pkgPrefix Widgets com.abc Widgets.idl

If you have an IDL file that includes Widgets.idl, then the -pkgPrefix flag must appear in that command also. If it does not, then your IDL file will be looking for a Widgets package rather than a com.abc.Widgets package.

If you have a number of these packages that require prefixes, then it might be easier to place them into the idl.config file described previously. Each package prefix line should be of the form: PkgPrefix.<type>=<prefix>. The line for the previous example would be PkgPrefix.Widgets=com.abc. This option does not affect the Repository ID.

Define Symbols Before Compilation

You might need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command idlj -d MYDEF My.idl is equivalent to putting the line #define MYDEF inside My.idl.

Preserve Preexisting Bindings

If the Java binding files already exist, then the -keep flag keeps the compiler from overwriting them. The default is to generate all files without considering that they already exist. If you have customized those files (which you should not do unless you are very comfortable with their contents), then the -keep option is very useful. The command idlj -keep My.idl emits all client-side bindings that do not already exist.

View Compilation Progress

The IDL-to-Java compiler generates status messages as it progresses through its phases of execution. Use the -v option to activate the verbose mode: idlj -v My.idl.

By default the compiler does not operate in verbose mode

Display Version Information

To display the build version of the IDL-to-Java compiler, specify the -version option on the command-line: idlj -version.

Version information also appears within the bindings generated by the compiler. Any additional options appearing on the command-line are ignored.

Options

-d symbol

This is equivalent to the following line in an IDL file:

#define symbol
-demitAll

Emit all types, including those found in #include files.

-fside

Defines what bindings to emit. The side parameter can be client, server, serverTIE, all, or allTIE. The -fserverTIE and -fallTIE options cause delegate model skeletons to be emitted. Defaults to -fclient when the flag is not specified.

-i include-path

By default, the current directory is scanned for included files. This option adds another directory.

-i keep

If a file to be generated already exists, then do not overwrite it. By default it is overwritten.

-noWarn

Suppress warning messages.

-oldImplBase

Generates skeletons compatible with pre-1.4 JDK ORBs. By default, the POA Inheritance Model server-side bindings are generated. This option provides backward-compatibility with earlier releases of the Java programming language by generating server-side bindings that are ImplBase Inheritance Model classes.

-pkgPrefix type prefix

Wherever type is encountered at file scope, prefix the generated Java package name with prefix for all files generated for that type. The type is the simple name of either a top-level module, or an IDL type defined outside of any module.

-pkgTranslate type package

Whenever the module name type is encountered in an identifier, replace it in the identifier with package for all files in the generated Java package. Note that pkgPrefix changes are made first. The type value is the simple name of either a top-level module, or an IDL type defined outside of any module and must match the full package name exactly.

If more than one translation matches an identifier, then the longest match is chosen as shown in the following example:

Command:

pkgTranslate type pkg -pkgTranslate type2.baz pkg2.fizz

Resulting Translation:

type => pkg
type.ext => pkg.ext
type.baz => pkg2.fizz
type2.baz.pkg => pkg2.fizz.pkg

The following package names org, org.omg, or any subpackages of org.omg cannot be translated. Any attempt to translate these packages results in uncompilable code, and the use of these packages as the first argument after -pkgTranslate is treated as an error.

-skeletonName xxx%yyy

Use xxx%yyy as the pattern for naming the skeleton. The defaults are: %POA for the POA base class (-fserver or -fall), and _%ImplBase for the oldImplBase class (-oldImplBase) and (-fserver or -fall)).

-td dir

Use dir for the output directory instead of the current directory.

-tieName xxx%yyy

Use xxx%yyy according to the pattern. The defaults are: %POA for the POA base class (-fserverTie or -fallTie), and _%Tie for the oldImplBase tie class (-oldImplBase) and (-fserverTie or -fallTie))

-nowarn, -verbose

Displays release information and terminates.

-version

Displays release information and terminates.

Restrictions

Escaped identifiers in the global scope cannot have the same spelling as IDL primitive types, Object, or ValueBase. This is because the symbol table is preloaded with these identifiers. Allowing them to be redefined would overwrite their original definitions. Possible permanent restriction.

The fixed IDL type is not supported.

Known Problems

No import is generated for global identifiers. If you call an unexported local impl object, then you do get an exception, but it seems to be due to a NullPointerException in the ServerDelegate DSI code.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Internationalization

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

7 Internationalization

Use these command to create localizable Java applications.

This section contains the following command:

native2ascii: Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes (\uxxxx) notation for all characters that are not part of the ASCII character set, or vice versa.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jar

Manipulates Java Archive (JAR) files.

Synopsis

Create JAR file

jar c[efmMnv0] [entrypoint] [jarfile] [manifest] [-C dir] file ... [-Joption ...] [@arg-file ...]

Update JAR file

jar u[efmMnv0] [entrypoint] [jarfile] [manifest] [-C dir] file ... [-Joption ...] [@arg-file ...]

Extract JAR file

jar x[vf] [jarfile] file ... [-Joption ...] [@arg-file ...]

List Contents of JAR file

jar t[vf] [jarfile] file ... [-Joption ...] [@arg-file ...]

Add Index to JAR file

jar i jarfile [-Joption ...] [@arg-file ...]

Description

The jar command is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, the jar command was designed mainly to package Java applets or applications into a single archive. When the components of an applet or application (files, images and sounds) are combined into a single archive, they can be downloaded by a Java agent (such as a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. The jar command also compresses files, which further improves download time. The jar command also allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. A JAR file can be used as a class path entry, whether or not it is compressed.

The syntax for the jar command resembles the syntax for the tar command. It has several operation modes, defined by one of the mandatory operation arguments. Other arguments are either options that modify the behavior of the operation, or operands required to perform the operation.

Operation Arguments

When using the jar command, you have to select an operation to be performed by specifying one of the following operation arguments. You can mix them up with other one-letter options on the command line, but usually the operation argument is the first argument specified.

c

Create a new JAR archive.

i

Generate index information for a JAR archive.

t

List the contents of a JAR archive.

u

Update a JAR archive.

x

Extract files from a JAR archive.

Options

Use the following options to customize how the JAR file is created, updated, extracted, or viewed:

e

Sets the class specified by the entrypoint operand to be the entry point for a standalone Java application bundled into an executable JAR file. The use of this option creates or overrides the Main-Class attribute value in the manifest file. The e option can be used when creating (c) or updating (u) the JAR file.

For example, the following command creates the Main.jar archive with the Main.class file where the Main-Class attribute value in the manifest is set to Main:

jar cfe Main.jar Main Main.class

The Java Runtime Environment (JRE) can directly call this application by running the following command:

java -jar Main.jar

If the entry point class name is in a package, then it could use either the dot (.) or slash (/) as the delimiter. For example, if Main.class is in a package called mydir, then the entry point can be specified in one of the following ways:

jar -cfe Main.jar mydir/Main mydir/Main.class
jar -cfe Main.jar mydir.Main mydir/Main.class

Note:

Specifying both m and e options together when a particular manifest also contains the Main-Class attribute results in an ambiguous Main-Class specification. The ambiguity leads to an error and the jar command creation or update operation is terminated.

f

Sets the file specified by the jarfile operand to be the name of the JAR file that is created (c), updated (u), extracted (x) from, or viewed (t). Omitting the f option and the jarfile operand instructs the jar command to accept the JAR file name from stdin (for x and t) or send the JAR file to stdout (for c and u).

m

Includes names and values of attributes from the file specified by the manifest operand in the manifest file of the jar command (located in the archive at META-INF/MANIFEST.MF). The jar command adds the attribute's name and value to the JAR file unless an entry already exists with the same name, in which case the jar command updates the value of the attribute. The m option can be used when creating (c) or updating (u) the JAR file.

You can add special-purpose name-value attribute pairs to the manifest that are not contained in the default manifest file. For example, you can add attributes that specify vendor information, release information, package sealing, or to make JAR-bundled applications executable. For examples of using the m option, see Packaging Programs at
http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

M

Does not create a manifest file entry (for c and u), or delete a manifest file entry when one exists (for u). The M option can be used when creating (c) or updating (u) the JAR file.

n

When creating (c) a JAR file, this option normalizes the archive so that the content is not affected by the packing and unpacking operations of the pack200(1) command. Without this normalization, the signature of a signed JAR can become invalid.

v

Generates verbose output to standard output. See Examples.

0

(Zero) Creates (c) or updates (u) the JAR file without using ZIP compression.

-C dir

When creating (c) or updating (u) a JAR file, this option temporarily changes the directory while processing files specified by the file operands. Its operation is intended to be similar to the -C option of the UNIX tar utility.For example, the following command changes to the classes directory and adds the Bar.class file from that directory to my.jar:

jar uf my.jar -C classes Bar.class

The following command changes to the classes directory and adds to my.jar all files within the classes directory (without creating a classes directory in the JAR file), then changes back to the original directory before changing to the bin directory to add Xyz.class to my.jar.

jar uf my.jar -C classes . -C bin Xyz.class

If classes contained files bar1 and bar2, then the JAR file will contain the following after running the previous command:

% jar tf my.jar
META-INF/
META-INF/MANIFEST.MF
bar1
bar2
Xyz.class
-Joption

Sets the specified JVM option to be used when the JRE runs the JAR file. JVM options are described on the reference page for the java(1) command. For example, -J-Xms48m sets the startup memory to 48 MB.

Operands

The following operands are recognized by the jar command.

file

When creating (c) or updating (u) a JAR file, the file operand defines the path and name of the file or directory that should be added to the archive. When extracting (x) or listing the contents (t) of a JAR file, the file operand defines the path and name of the file to be extracted or listed. At least one valid file or directory must be specified. Separate multiple file operands with spaces. If the entrypoint, jarfile, or manifest operands are used, the file operands must be specified after them.

entrypoint

When creating (c) or updating (u) a JAR file, the entrypoint operand defines the name of the class that should be the entry point for a standalone Java application bundled into an executable JAR file. The entrypoint operand must be specified if the e option is present.

jarfile

Defines the name of the file to be created (c), updated (u), extracted (x), or viewed (t). The jarfile operand must be specified if the f option is present. Omitting the f option and the jarfile operand instructs the jar command to accept the JAR file name from stdin (for x and t) or send the JAR file to stdout (for c and u).

When indexing (i) a JAR file, specify the jarfile operand without the f option.

manifest

When creating (c) or updating (u) a JAR file, the manifest operand defines the preexisting manifest files with names and values of attributes to be included in MANIFEST.MF in the JAR file. The manifest operand must be specified if the f option is present.

@arg-file

To shorten or simplify the jar command, you can specify arguments in a separate text file and pass it to the jar command with the at sign (@) as a prefix. When the jar command encounters an argument beginning with the at sign, it expands the contents of that file into the argument list.

An argument file can include options and arguments of the jar command (except the -J options, because they are passed to the launcher, which does not support argument files). The arguments within a file can be separated by spaces or newline characters. File names within an argument file are relative to the current directory from which you run the jar command, not relative to the location of the argument file. Wild cards, such as the asterisk (*), that might otherwise be expanded by the operating system shell, are not expanded.

The following example, shows how to create a classes.list file with names of files from the current directory output by the find command:

find . -name '*.class' -print > classes.list

You can then execute the jar command and pass the classes.list file to it using the @arg-file syntax:

jar cf my.jar @classes.list

An argument file can be specified with a path, but any file names inside the argument file that have relative paths are relative to the current working directory of the jar command, not to the path passed in, for example:

jar @dir/classes.list

Notes

The e, f, and m options must appear in the same order on the command line as the entrypoint, jarfile, and manifest operands, for example:

jar cmef myManifestFile MyMainClass myFile.jar *.class

Examples

Example 1Adding All Files From the Current Directory With Verbose Output
% ls
1.au          Animator.class    monkey.jpg
2.au          Wave.class        spacemusic.au
3.au          at_work.gif

% jar cvf bundle.jar *
added manifest
adding: 1.au(in = 2324) (out= 67)(deflated 97%)
adding: 2.au(in = 6970) (out= 90)(deflated 98%)
adding: 3.au(in = 11616) (out= 108)(deflated 99%)
adding: Animator.class(in = 2266) (out= 66)(deflated 97%)
adding: Wave.class(in = 3778) (out= 81)(deflated 97%)
adding: at_work.gif(in = 6621) (out= 89)(deflated 98%)
adding: monkey.jpg(in = 7667) (out= 91)(deflated 98%)
adding: spacemusic.au(in = 3079) (out= 73)(deflated 97%)
Example 2Adding Files From Subdirectories
% ls -F
audio/ classes/ images/
% jar cvf bundle.jar audio classes images
added manifest
adding: audio/(in = 0) (out= 0)(stored 0%)
adding: audio/1.au(in = 2324) (out= 67)(deflated 97%)
adding: audio/2.au(in = 6970) (out= 90)(deflated 98%)
adding: audio/3.au(in = 11616) (out= 108)(deflated 99%)
adding: audio/spacemusic.au(in = 3079) (out= 73)(deflated 97%)
adding: classes/(in = 0) (out= 0)(stored 0%)
adding: classes/Animator.class(in = 2266) (out= 66)(deflated 97%)
adding: classes/Wave.class(in = 3778) (out= 81)(deflated 97%)
adding: images/(in = 0) (out= 0)(stored 0%)
adding: images/monkey.jpg(in = 7667) (out= 91)(deflated 98%)
adding: images/at_work.gif(in = 6621) (out= 89)(deflated 98%)

% ls -F
audio/ bundle.jar classes/ images/
Example 3Listing the Contents of JAR
% jar tf bundle.jar

META-INF/
META-INF/MANIFEST.MF
audio/1.au
audio/2.au
audio/3.au
audio/spacemusic.au
classes/Animator.class
classes/Wave.class
images/monkey.jpg
images/at_work.gif
Example 4Adding an Index

Use the i option when you split the interdependent classes for a stock trade application into three JAR files: main.jar, buy.jar, and sell.jar. If you specify the Class-Path attribute in the main.jar manifest, then you can use the i option to speed up the class loading time for your application:

Class-Path: buy.jar sell.jar
jar i main.jar

An INDEX.LIST file is inserted to the META-INF directory. This enables the application class loader to download the specified JAR files when it is searching for classes or resources.

The application class loader uses the information stored in this file for efficient class loading. To copy directories, first compress files in dir1 to stdout, then pipeline and extract from stdin to dir2 (omitting the -f option from both jar commands):

(cd dir1; jar c .) | (cd dir2; jar x)

See Also

  • pack200(1).

  • The JAR section of The Java Tutorials at
    http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jarsigner

Signs and verifies Java Archive (JAR) files.

Synopsis

jarsigner [ options ] jar-file alias

jarsigner -verify [ options ] jar-file [alias ...]

options

The command-line options. See Options.

-verify

The -verify option can take zero or more keystore alias names after the JAR file name. When the -verify option is specified, the jarsigner command checks that the certificate used to verify each signed entry in the JAR file matches one of the keystore aliases. The aliases are defined in the keystore specified by -keystore or the default keystore.

If you also specified the -strict option, and the jarsigner command detected severe warnings, the message, "jar verified, with signer errors" is displayed.

jar-file

The JAR file to be signed.

If you also specified the -strict option, and the jarsigner command detected severe warnings, the message, "jar signed, with signer errors" is displayed.

alias

The aliases are defined in the keystore specified by -keystore or the default keystore.

Description

The jarsigner tool has two purposes:

  • To sign Java Archive (JAR) files.

  • To verify the signatures and integrity of signed JAR files.

The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution. A tool named jar enables developers to produce JAR files. (Technically, any zip file can also be considered a JAR file, although when created by the jar command or processed by the jarsigner command, JAR files also contain a META-INF/MANIFEST.MF file.)

A digital signature is a string of bits that is computed from some data (the data being signed) and the private key of an entity (a person, company, and so on). Similar to a handwritten signature, a digital signature has many useful characteristics:

  • Its authenticity can be verified by a computation that uses the public key corresponding to the private key used to generate the signature.

  • It cannot be forged, assuming the private key is kept secret.

  • It is a function of the data signed and thus cannot be claimed to be the signature for other data as well.

  • The signed data cannot be changed. If the data is changed, then the signature cannot be verified as authentic.

To generate an entity's signature for a file, the entity must first have a public/private key pair associated with it and one or more certificates that authenticate its public key. A certificate is a digitally signed statement from one entity that says that the public key of another entity has a particular value.

The jarsigner command uses key and certificate information from a keystore to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains that authenticate the corresponding public keys. The keytool command is used to create and administer keystores.

The jarsigner command uses an entity's private key to generate a signature. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file. The jarsigner command can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file).

The jarsigner command can generate signatures that include a time stamp that lets a systems or deployer (including Java Plug-in) to check whether the JAR file was signed while the signing certificate was still valid. In addition, APIs allow applications to obtain the timestamp information.

At this time, the jarsigner command can only sign JAR files created by the jar command or zip files. JAR files are the same as zip files, except they also have a META-INF/MANIFEST.MF file. A META-INF/MANIFEST.MF file is created when the jarsigner command signs a zip file.

The default jarsigner command behavior is to sign a JAR or zip file. Use the -verify option to verify a signed JAR file.

The jarsigner command also attempts to validate the signer's certificate after signing or verifying. If there is a validation error or any other problem, the command generates warning messages. If you specify the -strict option, then the command treats severe warnings as errors. See Errors and Warnings.

Keystore Aliases

All keystore entities are accessed with unique aliases.

When you use the jarsigner command to sign a JAR file, you must specify the alias for the keystore entry that contains the private key needed to generate the signature. For example, the following command signs the JAR file named MyJARFile.jar with the private key associated with the alias duke in the keystore named mystore in the working directory. Because no output file is specified, it overwrites MyJARFile.jar with the signed JAR file.

jarsigner -keystore /working/mystore -storepass <keystore password>
      -keypass <private key password> MyJARFile.jar duke

Keystores are protected with a password, so the store password must be specified. You are prompted for it when you do not specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password must be specified, and you are prompted for the password when you do not specify it on the command line and it is not the same as the store password.

Keystore Location

The jarsigner command has a -keystore option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the user.home system property.

On Oracle Solaris systems, user.home defaults to the user's home directory.

The input stream from the -keystore option is passed to the KeyStore.load method. If NONE is specified as the URL, then a null stream is passed to the KeyStore.load method. NONE should be specified when the KeyStore class is not file based, for example, when it resides on a hardware token device.

Keystore Implementation

The KeyStore class provided in the java.security package supplies a number of well-defined interfaces to access and modify the information in a keystore. You can have multiple different concrete implementations, where each implementation is for a particular type of keystore.

Currently, there are two command-line tools that use keystore implementations (keytool and jarsigner), and a GUI-based tool named Policy Tool. Because the KeyStore class is publicly available, JDK users can write additional security applications that use it.

There is a built-in default implementation provided by Oracle that implements the keystore as a file, that uses a proprietary keystore type (format) named JKS. The built-in implementation protects each private key with its individual password and protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based, which means the application interfaces supplied by the KeyStore class are implemented in terms of a Service Provider Interface (SPI). There is a corresponding abstract KeystoreSpi class, also in the java.security package, that defines the Service Provider Interface methods that providers must implement. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider in the Java Cryptography Architecture at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider.html

Applications can choose different types of keystore implementations from different providers, with the getInstance factory method in the KeyStore class. A keystore type defines the storage and data format of the keystore information and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

The jarsigner and policytool commands can read file-based keystores from any location that can be specified using a URL. In addition, these commands can read non-file-based keystores such as those provided by MSCAPI on Windows and PKCS11 on all platforms.

For the jarsigner and keytool commands, you can specify a keystore type at the command line with the -storetype option. For Policy Tool, you can specify a keystore type with the Edit command in the KeyStore menu.

If you do not explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the JDK security properties directory, java.home/lib/security, where java.home is the runtime environment's directory. The jre directory in the JDK or the top-level directory of the Java Runtime Environment (JRE).

Each tool gets the keystore.type value and then examines all the installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type as specified in the keystore.type property:

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is jks (the proprietary type of the keystore implementation provided by Oracle). This is specified by the following line in the security properties file:

keystore.type=jks

Case does not matter in keystore type designations. For example, JKS is the same as jks.

To have the tools use a keystore implementation other than the default, change that line to specify a different keystore type. For example, if you have a provider package that supplies a keystore implementation for a keystore type called pkcs12, then change the line to the following:

keystore.type=pkcs12

Note: If you use the PKCS 11 provider package, then see "KeyTool" and "JarSigner" in Java PKCS #11 Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html

Supported Algorithms

By default, the jarsigner command signs a JAR file using one of the following algorithms:

  • Digital Signature Algorithm (DSA) with the SHA1 digest algorithm

  • RSA algorithm with the SHA256 digest algorithm

  • Elliptic Curve (EC) cryptography algorithm with the SHA256 with Elliptic Curve Digital Signature Algorithm (ECDSA).

If the signer's public and private keys are DSA keys, then jarsigner signs the JAR file with the SHA1withDSA algorithm. If the signer's keys are RSA keys, then jarsigner attempts to sign the JAR file with the SHA256withRSA algorithm. If the signer's keys are EC keys, then jarsigner signs the JAR file with the SHA256withECDSA algorithm.

These default signature algorithms can be overridden using the -sigalg option.

The Signed JAR File

When the jarsigner command is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory:

  • A signature file with an .SF extension

  • A signature block file with a .DSA, .RSA, or .EC extension

The base file names for these two files come from the value of the -sigFile option. For example, when the option is -sigFile MKSIGN, the files are named MKSIGN.SF and MKSIGN.DSA

If no -sigfile option appears on the command line, then the base file name for the .SF and .DSA files is the first 8 characters of the alias name specified on the command line, all converted to uppercase. If the alias name has fewer than 8 characters, then the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, then each such character is converted to an underscore (_) character in forming the file name. Valid characters include letters, digits, underscores, and hyphens.

Signature File

A signature file (.SF file) looks similar to the manifest file that is always included in a JAR file when the jarsigner command is used to sign the file. For each source file included in the JAR file, the .SF file has three lines, such as in the manifest file, that list the following:

  • File name

  • Name of the digest algorithm (SHA)

  • SHA digest value

In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. In the .SF file, the digest value for a specified source file is the hash of the three lines in the manifest file for the source file.

The signature file, by default, includes a header with a hash of the whole manifest file. The header also contains a hash of the manifest header. The presence of the header enables verification optimization. See JAR File Verification.

Signature Block File

The .SF file is signed and the signature is placed in the signature block file. This file also contains, encoded inside it, the certificate or certificate chain from the keystore that authenticates the public key corresponding to the private key used for signing. The file has the extension .DSA, .RSA, or .EC, depending on the digest algorithm used.

Signature Time Stamp

The jarsigner command can generate and store a signature time stamp when signing a JAR file. In addition, jarsigner supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options. See Options.

-tsa url
-tsacert alias
-altsigner class
-altsignerpath classpathlist
-tsapolicyid policyid

JAR File Verification

A successful JAR file verification occurs when the signatures are valid, and none of the files that were in the JAR file when the signatures were generated have changed since then. JAR file verification involves the following steps:

  1. Verify the signature of the .SF file.

    The verification ensures that the signature stored in each signature block (.DSA) file was generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file was not tampered with.

  2. Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest.

    The .SF file by default includes a header that contains a hash of the entire manifest file. When the header is present, the verification can check to see whether or not the hash in the header matches the hash of the manifest file. If there is a match, then verification proceeds to the next step.

    If there is no match, then a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. See Signature File.

    One reason the hash of the manifest file that is stored in the .SF file header might not equal the hash of the current manifest file is that one or more files were added to the JAR file (with the jar tool) after the signature and .SF file were generated. When the jar tool is used to add files, the manifest file is changed by adding sections to it for the new files, but the .SF file is not changed. A verification is still considered successful when none of the files that were in the JAR file when the signature was generated have been changed since then. This happens when the hashes in the non-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file.

  3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest and compare the result with the digest for this file in the manifest section. The digests should be the same or verification fails.

    If any serious verification failures occur during the verification process, then the process is stopped and a security exception is thrown. The jarsigner command catches and displays the exception.

Note: You should read any addition warnings (or errors if you specified the -strict option), as well as the content of the certificate (by specifying the -verbose and -certs options) to determine if the signature can be trusted.

Multiple Signatures for a JAR File

A JAR file can be signed by multiple people by running the jarsigner command on the file multiple times and specifying the alias for a different person each time, as follows:

jarsigner myBundle.jar susan
jarsigner myBundle.jar kevin

When a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. In the previous example, the output JAR file includes files with the following names:

SUSAN.SF
SUSAN.DSA
KEVIN.SF
KEVIN.DSA

Options

The following sections describe the various jarsigner options. Be aware of the following standards:

  • All option names are preceded by a minus sign (-).

  • The options can be provided in any order.

  • Items that are in italics or underlined (option values) represent the actual values that must be supplied.

  • The -storepass, -keypass, -sigfile, -sigalg, -digestalg, -signedjar, and TSA-related options are only relevant when signing a JAR file; they are not relevant when verifying a signed JAR file. The -keystore option is relevant for signing and verifying a JAR file. In addition, aliases are specified when signing and verifying a JAR file.

-keystore url

Specifies the URL that tells the keystore location. This defaults to the file .keystore in the user's home directory, as determined by the user.home system property.

A keystore is required when signing. You must explicitly specify a keystore when the default keystore does not exist or if you want to use one other than the default.

A keystore is not required when verifying, but if one is specified or the default exists and the -verbose option was also specified, then additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore.

The -keystore argument can be a file name and path specification rather than a URL, in which case it is treated the same as a file: URL, for example, the following are equivalent:

-keystore filePathAndName
-keystore file:filePathAndName

If the Sun PKCS #11 provider was configured in the java.security security properties file (located in the JRE's $JAVA_HOME/lib/security directory), then the keytool and jarsigner tools can operate on the PKCS #11 token by specifying these options:

-keystore NONE
-storetype PKCS11

For example, the following command lists the contents of the configured PKCS#11 token:

keytool -keystore NONE -storetype PKCS11 -list
-storetype storetype

Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the keystore.type property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

The PIN for a PCKS #11 token can also be specified with the -storepass option. If none is specified, then the keytool and jarsigner commands prompt for the token PIN. If the token has a protected authentication path (such as a dedicated PIN-pad or a biometric reader), then the -protected option must be specified and no password options can be specified.

-storepass[:env | :file] argument

Specifies the password that is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a -storepass option is not provided at the command line, then the user is prompted for the password.

If the modifier env or file is not specified, then the password has the value argument. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.

-keypass [:env | :file] argument

Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line. The password is required when using jarsigner to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, then the user is prompted for it.

If the modifier env or file is not specified, then the password has the value argument. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.

-sigfile file

Specifies the base file name to be used for the generated .SF and .DSA files. For example, if file is DUKESIGN, then the generated .SF and .DSA files are named DUKESIGN.SF and DUKESIGN.DSA, and placed in the META-INF directory of the signed JAR file.

The characters in the file must come from the set a-zA-Z0-9_-. Only letters, numbers, underscore, and hyphen characters are allowed. All lowercase characters are converted to uppercase for the .SF and .DSA file names.

If no -sigfile option appears on the command line, then the base file name for the .SF and .DSA files is the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, then the full alias name is used. If the alias name contains any characters that are not valid in a signature file name, then each such character is converted to an underscore (_) character to form the file name.

-sigalg algorithm

Specifies the name of the signature algorithm to use to sign the JAR file.

For a list of standard signature algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, then SHA1withDSA, SHA256withRSA, or SHA256withECDSA are used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the -providerClass option; otherwise, the command will not succeed.

-digestalg algorithm

Specifies the name of the message digest algorithm to use when digesting the entries of a JAR file.

For a list of standard message digest algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

If this option is not specified, then SHA256 is used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the -providerClass option; otherwise, the command will not succeed.

-certs

If the -certs option appears on the command line with the -verify and -verbose options, then the output includes certificate information for each signer of the JAR file. This information includes the name of the type of certificate (stored in the .DSA file) that certifies the signer's public key, and if the certificate is an X.509 certificate (an instance of the java.security.cert.X509Certificate), then the distinguished name of the signer.

The keystore is also examined. If no keystore value is specified on the command line, then the default keystore file (if any) is checked. If the public key certificate for a signer matches an entry in the keystore, then the alias name for the keystore entry for that signer is displayed in parentheses.

-certchain file

Specifies the certificate chain to be used when the certificate chain associated with the private key of the keystore entry that is addressed by the alias specified on the command line is not complete. This can happen when the keystore is located on a hardware token where there is not enough capacity to hold a complete certificate chain. The file can be a sequence of concatenated X.509 certificates, or a single PKCS#7 formatted data block, either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. See Internet RFC 1421 Certificate Encoding Standard and http://tools.ietf.org/html/rfc1421.

-verbose

When the -verbose option appears on the command line, it indicates verbose mode, which causes jarsigner to output extra information about the progress of the JAR signing or verification.

-internalsf

In the past, the .DSA (signature block) file generated when a JAR file was signed included a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default does not contain a copy of the .SF file anymore. If -internalsf appears on the command line, then the old behavior is utilized. This option is useful for testing. In practice, do not use the -internalsf option because it incurs higher overhead.

-sectionsonly

If the -sectionsonly option appears on the command line, then the .SF file (signature file) generated when a JAR file is signed does not include a header that contains a hash of the whole manifest file. It contains only the information and hashes related to each individual source file included in the JAR file. See Signature File.

By default, this header is added, as an optimization. When the header is present, whenever the JAR file is verified, the verification can first check to see whether the hash in the header matches the hash of the whole manifest file. When there is a match, verification proceeds to the next step. When there is no match, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. See JAR File Verification.

The -sectionsonly option is primarily used for testing. It should not be used other than for testing because using it incurs higher overhead.

-protected

Values can be either true or false. Specify true when a password must be specified through a protected authentication path such as a dedicated PIN reader.

-providerClass provider-class-name

Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the java.security security properties file.

Used with the -providerArg ConfigFilePath option, the keytool and jarsigner tools install the provider dynamically and use ConfigFilePath for the path to the token configuration file. The following example shows a command to list a PKCS #11 keystore when the Oracle PKCS #11 provider was not configured in the security properties file.

jarsigner -keystore NONE -storetype PKCS11 \
          -providerClass sun.security.pkcs11.SunPKCS11 \
          -providerArg /mydir1/mydir2/token.config \
          -list
-providerName providerName

If more than one provider was configured in the java.security security properties file, then you can use the -providerName option to target a specific provider instance. The argument to this option is the name of the provider.

For the Oracle PKCS #11 provider, providerName is of the form SunPKCS11-TokenName, where TokenName is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following command lists the contents of the PKCS #11 keystore provider instance with name suffix SmartCard:

jarsigner -keystore NONE -storetype PKCS11 \
        -providerName SunPKCS11-SmartCard \
        -list
-Jjavaoption

Passes through the specified javaoption string directly to the Java interpreter. The jarsigner command is a wrapper around the interpreter. This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

-tsa url

If -tsa http://example.tsa.url appears on the command line when signing a JAR file then a time stamp is generated for the signature. The URL, http://example.tsa.url, identifies the location of the Time Stamping Authority (TSA) and overrides any URL found with the -tsacert option. The -tsa option does not require the TSA public key certificate to be present in the keystore.

To generate the time stamp, jarsigner communicates with the TSA with the Time-Stamp Protocol (TSP) defined in RFC 3161. When successful, the time stamp token returned by the TSA is stored with the signature in the signature block file.

-tsacert alias

When -tsacert alias appears on the command line when signing a JAR file, a time stamp is generated for the signature. The alias identifies the TSA public key certificate in the keystore that is in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA.

The TSA public key certificate must be present in the keystore when using the -tsacert option.

-tsapolicyid policyid

Specifies the object identifier (OID) that identifies the policy ID to be sent to the TSA server. If this option is not specified, no policy ID is sent and the TSA server will choose a default policy ID.

Object identifiers are defined by X.696, which is an ITU Telecommunication Standardization Sector (ITU-T) standard. These identifiers are typically period-separated sets of non-negative digits like 1.2.3.4, for example.

-altsigner class

This option specifies an alternative signing mechanism. The fully qualified class name identifies a class file that extends the com.sun.jarsigner.ContentSigner abstract class. The path to this class file is defined by the -altsignerpath option. If the -altsigner option is used, then the jarsigner command uses the signing mechanism provided by the specified class. Otherwise, the jarsigner command uses its default signing mechanism.

For example, to use the signing mechanism provided by a class named com.sun.sun.jarsigner.AuthSigner, use the jarsigner option -altsigner com.sun.jarsigner.AuthSigner.

-altsignerpath classpathlist

Specifies the path to the class file and any JAR file it depends on. The class file name is specified with the -altsigner option. If the class file is in a JAR file, then this option specifies the path to that JAR file.

An absolute path or a path relative to the current directory can be specified. If classpathlist contains multiple paths or JAR files, then they should be separated with a colon (:) on Oracle Solaris and a semicolon (;) on Windows. This option is not necessary when the class is already in the search path.

The following example shows how to specify the path to a JAR file that contains the class file. The JAR file name is included.

-altsignerpath /home/user/lib/authsigner.jar

The following example shows how to specify the path to the JAR file that contains the class file. The JAR file name is omitted.

-altsignerpath /home/user/classes/com/sun/tools/jarsigner/
-strict

During the signing or verifying process, the command may issue warning messages. If you specify this option, the exit code of the tool reflects the severe warning messages that this command found. See Errors and Warnings.

-verbose suboptions

For the verifying process, the -verbose option takes suboptions to determine how much information is shown. If the -certs option is also specified, then the default mode (or suboption all) displays each entry as it is being processed, and after that, the certificate information for each signer of the JAR file. If the -certs and the -verbose:grouped suboptions are specified, then entries with the same signer info are grouped and displayed together with their certificate information. If -certs and the -verbose:summary suboptions are specified, then entries with the same signer information are grouped and displayed together with their certificate information. Details about each entry are summarized and displayed as one entry (and more). See Examples.

Errors and Warnings

During the signing or verifying process, the jarsigner command may issue various errors or warnings.

If there is a failure, the jarsigner command exits with code 1. If there is no failure, but there are one or more severe warnings, the jarsigner command exits with code 0 when the -strict option is not specified, or exits with the OR-value of the warning codes when the -strict is specified. If there is only informational warnings or no warning at all, the command always exits with code 0.

For example, if a certificate used to sign an entry is expired and has a KeyUsage extension that does not allow it to sign a file, the jarsigner command exits with code 12 (=4+8) when the -strict option is specified.

Note: Exit codes are reused because only the values from 0 to 255 are legal on Unix-based operating systems.

The following sections describes the names, codes, and descriptions of the errors and warnings that the jarsigner command can issue.

Failure

Reasons why the jarsigner command fails include (but are not limited to) a command line parsing error, the inability to find a keypair to sign the JAR file, or the verification of a signed JAR fails.

failure

Code 1. The signing or verifying fails.

Severe Warnings

Note: Severe warnings are reported as errors if you specify the -strict option.

Reasons why the jarsigner command issues a severe warning include the certificate used to sign the JAR file has an error or the signed JAR file has other problems.

hasExpiredCert

Code 4. This jar contains entries whose signer certificate has expired.

notYetValidCert

Code 4. This jar contains entries whose signer certificate is not yet valid.

chainNotValidated

Code 4. This jar contains entries whose certificate chain is not validated.

badKeyUsage

Code 8. This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing.

badExtendedKeyUsage

Code 8. This jar contains entries whose signer certificate's ExtendedKeyUsage extension doesn't allow code signing.

badNetscapeCertType

Code 8. This jar contains entries whose signer certificate's NetscapeCertType extension doesn't allow code signing.

hasUnsignedEntry

Code 16. This jar contains unsigned entries which have not been integrity-checked.

notSignedByAlias

Code 32. This jar contains signed entries which are not signed by the specified alias(es).

aliasNotInStore

Code 32. This jar contains signed entries that are not signed by alias in this keystore.

Informational Warnings

Informational warnings include those that are not errors but regarded as bad practice. They do not have a code.

hasExpiringCert

This jar contains entries whose signer certificate will expire within six months.

noTimestamp

This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this JAR file after the signer certificate's expiration date (YYYY-MM-DD) or after any future revocation date.

Examples

Sign a JAR File

Use the following command to sign bundle.jar with the private key of a user whose keystore alias is jane in a keystore named mystore in the working directory and name the signed JAR file sbundle.jar:

jarsigner -keystore /working/mystore
    -storepass <keystore password>
    -keypass <private key password>
    -signedjar sbundle.jar bundle.jar jane

There is no -sigfile specified in the previous command so the generated .SF and .DSA files to be placed in the signed JAR file have default names based on the alias name. They are named JANE.SF and JANE.DSA.

If you want to be prompted for the store password and the private key password, then you could shorten the previous command to the following:

jarsigner -keystore /working/mystore
    -signedjar sbundle.jar bundle.jar jane

If the keystore is the default keystore (.keystore in your home directory), then you do not need to specify a keystore, as follows:

jarsigner -signedjar sbundle.jar bundle.jar jane

If you want the signed JAR file to overwrite the input JAR file (bundle.jar), then you do not need to specify a -signedjar option, as follows:

jarsigner bundle.jar jane

Verify a Signed JAR File

To verify a signed JAR file to ensure that the signature is valid and the JAR file was not been tampered with, use a command such as the following:

jarsigner -verify sbundle.jar

When the verification is successful, jar verified is displayed. Otherwise, an error message is displayed. You can get more information when you use the -verbose option. A sample use of jarsigner with the -verbose option follows:

jarsigner -verify -verbose sbundle.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
    smk    849 Fri Sep 26 16:12:46 PDT 1997 test.class

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

Verification with Certificate Information

If you specify the -certs option with the -verify and -verbose options, then the output includes certificate information for each signer of the JAR file. The information includes the certificate type, the signer distinguished name information (when it is an X.509 certificate), and in parentheses, the keystore alias for the signer when the public key certificate in the JAR file matches the one in a keystore entry, for example:

jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF
          1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class

      X.509, CN=Test Group, OU=Java Software, O=Oracle, L=CUP, S=CA, C=US (javatest)
      X.509, CN=Jane Smith, OU=Java Software, O=Oracle, L=cup, S=ca, C=us (jane)

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

If the certificate for a signer is not an X.509 certificate, then there is no distinguished name information. In that case, just the certificate type and the alias are shown. For example, if the certificate is a PGP certificate, and the alias is bob, then you would get: PGP, (bob).

See Also

  • jar(1)

  • keytool(1)

  • Trail: Security Features in Java SE at
    http://docs.oracle.com/javase/tutorial/security/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


java

Launches a Java application.

Synopsis

java [options] classname [args]

java [options] -jar filename [args]

options

Command-line options separated by spaces. See Options.

classname

The name of the class to be launched.

filename

The name of the Java Archive (JAR) file to be called. Used only with the -jar option.

args

The arguments passed to the main() method separated by spaces.

Description

The java command starts a Java application. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class's main() method. The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. The method declaration has the following form:

public static void main(String[] args)

The java command can be used to launch a JavaFX application by loading a class that either has a main() method or that extends javafx.application.Application. In the latter case, the launcher constructs an instance of the Application class, calls its init() method, and then calls the start(javafx.stage.Stage) method.

By default, the first argument that is not an option of the java command is the fully qualified name of the class to be called. If the -jar option is specified, its argument is the name of the JAR file containing class and resource files for the application. The startup class must be indicated by the Main-Class manifest header in its source code.

The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user's class path.

Arguments after the class file name or the JAR file name are passed to the main() method.

Options

The java command supports a wide range of options that can be divided into the following categories:

  • Standard Options

  • Non-Standard Options

  • Advanced Runtime Options

  • Advanced JIT Compiler Options

  • Advanced Serviceability Options

  • Advanced Garbage Collection Options

Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM). They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on.

Non-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change. These options start with -X.

Advanced options are not recommended for casual use. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters. They are also not guaranteed to be supported by all JVM implementations, and are subject to change. Advanced options start with -XX.

To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document.

Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default. Such options do not require a parameter. Boolean -XX options are enabled using the plus sign (-XX:+OptionName) and disabled using the minus sign (-XX:-OptionName).

For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option). If you are expected to specify the size in bytes, you can use no suffix, or use the suffix k or K for kilobytes (KB), m or M for megabytes (MB), g or G for gigabytes (GB). For example, to set the size to 8 GB, you can specify either 8g, 8192m, 8388608k, or 8589934592 as the argument. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify 0.25 for 25%).

Standard Options

These are the most commonly used options that are supported by all implementations of the JVM.

-agentlib:libname[=options]

Loads the specified native agent library. After the library name, a comma-separated list of options specific to the library can be used.

If the option -agentlib:foo is specified, then the JVM attempts to load the library named libfoo.so in the location specified by the LD_LIBRARY_PATH system variable (on OS X this variable is DYLD_LIBRARY_PATH).

The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:

-agentlib:hprof=cpu=samples,interval=20,depth=3

The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:

-agentlib:jdwp=transport=dt_socket,server=y,address=8000

For more information about the native agent libraries, refer to the following:

  • The java.lang.instrument package description at http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

  • Agent Command Line Options in the JVM Tools Interface guide at http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#starting

-agentpath:pathname[=options]

Loads the native agent library specified by the absolute path name. This option is equivalent to -agentlib but uses the full path and file name of the library.

-client

Selects the Java HotSpot Client VM. The 64-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM.

For default JVM selection, see Server-Class Machine Detection at
http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

-Dproperty=value

Sets a system property value. The property variable is a string with no spaces that represents the name of the property. The value variable is a string that represents the value of the property. If value is a string with spaces, then enclose it in quotation marks (for example -Dfoo="foo bar").

-d32

Runs the application in a 32-bit environment. If a 32-bit environment is not installed or is not supported, then an error will be reported. By default, the application is run in a 32-bit environment unless a 64-bit system is used.

-d64

Runs the application in a 64-bit environment. If a 64-bit environment is not installed or is not supported, then an error will be reported. By default, the application is run in a 32-bit environment unless a 64-bit system is used.

Currently only the Java HotSpot Server VM supports 64-bit operation, and the -server option is implicit with the use of -d64. The -client option is ignored with the use of -d64. This is subject to change in a future release.

-disableassertions[:[packagename]...|:classname]
-da[:[packagename]...|:classname]

Disables assertions. By default, assertions are disabled in all packages and classes.

With no arguments, -disableassertions (-da) disables assertions in all packages and classes. With the packagename argument ending in ..., the switch disables assertions in the specified package and any subpackages. If the argument is simply ..., then the switch disables assertions in the unnamed package in the current working directory. With the classname argument, the switch disables assertions in the specified class.

The -disableassertions (-da) option applies to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes. This makes it easy to disable assertions in all classes except for system classes. The -disablesystemassertions option enables you to disable assertions in all system classes.

To explicitly enable assertions in specific packages or classes, use the -enableassertions (-ea) option. Both options can be used at the same time. For example, to run the MyClass application with assertions enabled in package com.wombat.fruitbat (and any subpackages) but disabled in class com.wombat.fruitbat.Brickbat, use the following command:

java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass
-disablesystemassertions
-dsa

Disables assertions in all system classes.

-enableassertions[:[packagename]...|:classname]
-ea[:[packagename]...|:classname]

Enables assertions. By default, assertions are disabled in all packages and classes.

With no arguments, -enableassertions (-ea) enables assertions in all packages and classes. With the packagename argument ending in ..., the switch enables assertions in the specified package and any subpackages. If the argument is simply ..., then the switch enables assertions in the unnamed package in the current working directory. With the classname argument, the switch enables assertions in the specified class.

The -enableassertions (-ea) option applies to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes. This makes it easy to enable assertions in all classes except for system classes. The -enablesystemassertions option provides a separate switch to enable assertions in all system classes.

To explicitly disable assertions in specific packages or classes, use the -disableassertions (-da) option. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes. For example, to run the MyClass application with assertions enabled only in package com.wombat.fruitbat (and any subpackages) but disabled in class com.wombat.fruitbat.Brickbat, use the following command:

java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass
-enablesystemassertions
-esa

Enables assertions in all system classes.

-help
-?

Displays usage information for the java command without actually running the JVM.

-jar filename

Executes a program encapsulated in a JAR file. The filename argument is the name of a JAR file with a manifest that contains a line in the form Main-Class:classname that defines the class with the public static void main(String[] args) method that serves as your application's starting point.

When you use the -jar option, the specified JAR file is the source of all user classes, and other class path settings are ignored.

For more information about JAR files, see the following resources:

  • jar(1)

  • The Java Archive (JAR) Files guide at http://docs.oracle.com/javase/8/docs/technotes/guides/jar/index.html

  • Lesson: Packaging Programs in JAR Files at
    http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

-javaagent:jarpath[=options]

Loads the specified Java programming language agent. For more information about instrumenting Java applications, see the java.lang.instrument package description in the Java API documentation at http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

-jre-restrict-search

Includes user-private JREs in the version search.

-no-jre-restrict-search

Excludes user-private JREs from the version search.

-server

Selects the Java HotSpot Server VM. The 64-bit version of the JDK supports only the Server VM, so in that case the option is implicit.

For default JVM selection, see Server-Class Machine Detection at
http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

-showversion

Displays version information and continues execution of the application. This option is equivalent to the -version option except that the latter instructs the JVM to exit after displaying version information.

-splash:imgname

Shows the splash screen with the image specified by imgname. For example, to show the splash.gif file from the images directory when starting your application, use the following option:

-splash:images/splash.gif
-verbose:class

Displays information about each loaded class.

-verbose:gc

Displays information about each garbage collection (GC) event.

-verbose:jni

Displays information about the use of native methods and other Java Native Interface (JNI) activity.

-version

Displays version information and then exits. This option is equivalent to the -showversion option except that the latter does not instruct the JVM to exit after displaying version information.

-version:release

Specifies the release version to be used for running the application. If the version of the java command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used.

The release argument specifies either the exact version string, or a list of version strings and ranges separated by spaces. A version string is the developer designation of the version number in the following form: 1.x.0_u (where x is the major version number, and u is the update version number). A version range is made up of a version string followed by a plus sign (+) to designate this version or later, or a part of a version string followed by an asterisk (*) to designate any version string with a matching prefix. Version strings and ranges can be combined using a space for a logical OR combination, or an ampersand (&) for a logical AND combination of two version strings/ranges. For example, if running the class or JAR file requires either JRE 6u13 (1.6.0_13), or any JRE 6 starting from 6u10 (1.6.0_10), specify the following:

-version:"1.6.0_13 1.6* & 1.6.0_10+"

Quotation marks are necessary only if there are spaces in the release parameter.

For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line.

Non-Standard Options

These options are general purpose options that are specific to the Java HotSpot Virtual Machine.

-X

Displays help for all available -X options.

-Xbatch

Disables background compilation. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished. The -Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.

This option is equivalent to -XX:-BackgroundCompilation.

-Xbootclasspath:path

Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to search for boot class files. These are used in place of the boot class files included in the JDK.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xbootclasspath/a:path

Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to append to the end of the default bootstrap class path.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xbootclasspath/p:path

Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to prepend to the front of the default bootstrap class path.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xboundthreads

Binds user-level threads to kernel threads.

-Xcheck:jni

Performs additional checks for Java Native Interface (JNI) functions. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases. Expect a performance degradation when this option is used.

-Xcomp

Forces compilation of methods on first invocation. By default, the Client VM (-client) performs 1,000 interpreted method invocations and the Server VM (-server) performs 10,000 interpreted method invocations to gather information for efficient compilation. Specifying the -Xcomp option disables interpreted method invocations to increase compilation performance at the expense of efficiency.

You can also change the number of interpreted method invocations before compilation using the -XX:CompileThreshold option.

-Xdebug

Does nothing. Provided for backward compatibility.

-Xdiag

Shows additional diagnostic messages.

-Xfuture

Enables strict class-file format checks that enforce close conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases.

-Xint

Runs the application in interpreted-only mode. Compilation to native code is disabled, and all bytecode is executed by the interpreter. The performance benefits offered by the just in time (JIT) compiler are not present in this mode.

-Xinternalversion

Displays more detailed JVM version information than the -version option, and then exits.

-Xloggc:filename

Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command.

Example:

-Xloggc:garbage-collection.log
-Xmaxjitcodesize=size

Specifies the maximum code cache size (in bytes) for JIT-compiled code. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the value is set to 48 MB:

-Xmaxjitcodesize=48m

This option is equivalent to -XX:ReservedCodeCacheSize.

-Xmixed

Executes all bytecode by the interpreter except for hot methods, which are compiled to native code.

-Xmnsize

Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The young generation region of the heap is used for new objects. GC is performed in this region more often than in other regions. If the size for the young generation is too small, then a lot of minor garbage collections will be performed. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size.

The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:

-Xmn256m
-Xmn262144k
-Xmn268435456

Instead of the -Xmn option to set both the initial and maximum size of the heap for the young generation, you can use -XX:NewSize to set the initial size and -XX:MaxNewSize to set the maximum size.

-Xmssize

Sets the initial size (in bytes) of the heap. This value must be a multiple of 1024 and greater than 1 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The following examples show how to set the size of allocated memory to 6 MB using various units:

-Xms6291456
-Xms6144k
-Xms6m

If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation. The initial size of the heap for the young generation can be set using the -Xmn option or the -XX:NewSize option.

-Xmxsize

Specifies the maximum size (in bytes) of the memory allocation pool in bytes. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For server deployments, -Xms and -Xmx are often set to the same value. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:

-Xmx83886080
-Xmx81920k
-Xmx80m

The -Xmx option is equivalent to -XX:MaxHeapSize.

-Xnoclassgc

Disables garbage collection (GC) of classes. This can save some GC time, which shortens interruptions during the application run.

When you specify -Xnoclassgc at startup, the class objects in the application will be left untouched during GC and will always be considered live. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception.

-Xprof

Profiles the running program and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be used in production systems.

-Xrs

Reduces the use of operating system signals by the JVM.

Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly.

The JVM catches signals to implement shutdown hooks for unexpected termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks.

The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes. The JVM uses SIGQUIT to perform thread dumps.

Applications embedding the JVM frequently need to trap signals such as SIGINT or SIGTERM, which can lead to interference with the JVM signal handlers. The -Xrs option is available to address this issue. When -Xrs is used, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.

There are two consequences of specifying -Xrs:

  • SIGQUIT thread dumps are not available.

  • User code is responsible for causing shutdown hooks to run, for example, by calling System.exit() when the JVM is to be terminated.

-Xshare:mode

Sets the class data sharing mode. Possible mode arguments for this option include the following:

auto

Use shared class data if possible. This is the default value for Java HotSpot 32-Bit Client VM.

on

Require the use of class data sharing. Print an error message and exit if class data sharing cannot be used.

off

Do not use shared class data. This is the default value for Java HotSpot 32-Bit Server VM, Java HotSpot 64-Bit Client VM, and Java HotSpot 64-Bit Server VM.

dump

Manually generate the class data sharing archive.

-XshowSettings:category

Shows settings and continues. Possible category arguments for this option include the following:

all

Shows all categories of settings. This is the default value.

locale

Shows settings related to locale.

properties

Shows settings related to system properties.

vm

Shows the settings of the JVM.

-Xsssize

Sets the thread stack size (in bytes). Append the letter k or K to indicate KB, m or M to indicate MB, g or G to indicate GB. The default value depends on the platform:

  • Linux/ARM (32-bit): 320 KB

  • Linux/i386 (32-bit): 320 KB

  • Linux/x64 (64-bit): 1024 KB

  • OS X (64-bit): 1024 KB

  • Oracle Solaris/i386 (32-bit): 320 KB

  • Oracle Solaris/x64 (64-bit): 1024 KB

  • Windows: depends on virtual memory

The following examples set the thread stack size to 1024 KB in different units:

-Xss1m
-Xss1024k
-Xss1048576

This option is equivalent to -XX:ThreadStackSize.

-Xusealtsigs

Use alternative signals instead of SIGUSR1 and SIGUSR2 for JVM internal signals. This option is equivalent to -XX:+UseAltSigs.

-Xverify:mode

Sets the mode of the bytecode verifier. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application. Possible mode arguments for this option include the following:

none

Do not verify the bytecode. This reduces startup time and also reduces the protection provided by Java.

remote

Verify only those classes that are loaded remotely over the network. This is the default behavior if you do not specify the -Xverify option.

all

Verify all classes.

Advanced Runtime Options

These options control the runtime behavior of the Java HotSpot VM.

-XX:+DisableAttachMechanism

Enables the option that disables the mechanism that lets tools attach to the JVM. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as jcmd, jstack, jmap, and jinfo.

-XX:ErrorFile=filename

Specifies the path and file name to which error data is written when an irrecoverable error occurs. By default, this file is created in the current working directory and named hs_err_pid pid.log where pid is the identifier of the process that caused the error. The following example shows how to set the default log file (note that the identifier of the process is specified as %p):

-XX:ErrorFile=./hs_err_pid%p.log

The following example shows how to set the error log to /var/log/java/java_error.log:

-XX:ErrorFile=/var/log/java/java_error.log

If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system. The temporary directory is /tmp.

-XX:+FlightRecorder

Enables the use of the Java Flight Recorder (JFR) during the runtime of the application. This is a commercial feature that requires you to also specify the -XX:+UnlockCommercialFeatures option as follows:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
-XX:FlightRecorderOptions=parameter=value

Sets the parameters that control the behavior of JFR. This option can be used only when JFR is enabled (that is, the -XX:+FlightRecorder option is specified).

The following list contains all available JFR parameters:

defaultrecording={true|false}

Specifies whether the recording is a continuous background recording or if it runs for a limited time. By default, this parameter is set to false (recording runs for a limited time). To make the recording run continuously, set the parameter to true.

disk={true|false}

Specifies whether JFR should write a continuous recording to disk. By default, this parameter is set to false (continuous recording to disk is disabled). To enable it, set the parameter to true, and also set defaultrecording=true.

dumponexit={true|false}

Specifies whether a dump file of JFR data should be generated when the JVM terminates in a controlled manner. By default, this parameter is set to false (dump file on exit is not generated). To enable it, set the parameter to true, and also set defaultrecording=true.

The dump file is written to the location defined by the dumponexitpath parameter.

dumponexitpath=path

Specifies the path and name of the dump file with JFR data that is created when the JVM exits in a controlled manner if you set the dumponexit=true parameter. Setting the path makes sense only if you also set defaultrecording=true.

If the specified path is a directory, the JVM assigns a file name that shows the creation date and time. If the specified path includes a file name and if that file already exists, the JVM creates a new file by appending the date and time stamp to the specified file name.

globalbuffersize=size

Specifies the total amount of primary memory (in bytes) used for data retention. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the size is set to 462848 bytes.

loglevel={quiet|error|warning|info|debug|trace}

Specify the amount of data written to the log file by JFR. By default, it is set to info.

maxage=time

Specifies the maximum age of disk data to keep for the default recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 30s means 30 seconds). By default, the maximum age is set to 15 minutes (15m).

This parameter is valid only if you set the disk=true parameter.

maxchunksize=size

Specifies the maximum size (in bytes) of the data chunks in a recording. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size of data chunks is set to 12 MB.

maxsize=size

Specifies the maximum size (in bytes) of disk data to keep for the default recording. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size of disk data is not limited, and this parameter is set to 0.

This parameter is valid only if you set the disk=true parameter.

repository=path

Specifies the repository (a directory) for temporary disk storage. By default, the system's temporary directory is used.

samplethreads={true|false}

Specifies whether thread sampling is enabled. Thread sampling occurs only if the sampling event is enabled along with this parameter. By default, this parameter is enabled.

settings=path

Specifies the path and name of the event settings file (of type JFC). By default, the default.jfc file is used, which is located in JAVA_HOME/jre/lib/jfr.

stackdepth=depth

Stack depth for stack traces by JFR. By default, the depth is set to 64 method calls. The maximum is 2048, minimum is 1.

threadbuffersize=size

Specifies the per-thread local buffer size (in bytes). Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. Higher values for this parameter allow more data gathering without contention to flush it to the global storage. It can increase application footprint in a thread-rich environment. By default, the local buffer size is set to 5 KB.

You can specify values for multiple parameters by separating them with a comma. For example, to instruct JFR to write a continuous recording to disk, and set the maximum size of data chunks to 10 MB, specify the following:

-XX:FlightRecorderOptions=defaultrecording=true,disk=true,maxchunksize=10M
-XX:LargePageSizeInBytes=size

Sets the maximum size (in bytes) for large pages used for Java heap. The size argument must be a power of 2 (2, 4, 8, 16, ...). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically.

The following example illustrates how to set the large page size to 4 megabytes (MB):

-XX:LargePageSizeInBytes=4m
-XX:MaxDirectMemorySize=size

Sets the maximum total size (in bytes) of the New I/O (the java.nio package) direct-buffer allocations. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically.

The following examples illustrate how to set the NIO size to 1024 KB in different units:

-XX:MaxDirectMemorySize=1m
-XX:MaxDirectMemorySize=1024k
-XX:MaxDirectMemorySize=1048576
-XX:NativeMemoryTracking=mode

Specifies the mode for tracking JVM native memory usage. Possible mode arguments for this option include the following:

off

Do not track JVM native memory usage. This is the default behavior if you do not specify the -XX:NativeMemoryTracking option.

summary

Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread.

detail

In addition to tracking memory usage by JVM subsystems, track memory usage by individual CallSite, individual virtual memory region and its committed regions.

-XX:OnError=string

Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs. If the string contains spaces, then it must be enclosed in quotation marks.

The following example shows how the -XX:OnError option can be used to run the gcore command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the %p designates the current process):

-XX:OnError="gcore %p;dbx - %p"
-XX:OnOutOfMemoryError=string

Sets a custom command or a series of semicolon-separated commands to run when an OutOfMemoryError exception is first thrown. If the string contains spaces, then it must be enclosed in quotation marks. For an example of a command string, see the description of the -XX:OnError option.

-XX:+PrintCommandLineFlags

Enables printing of ergonomically selected JVM flags that appeared on the command line. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector. By default, this option is disabled and flags are not printed.

-XX:+PrintNMTStatistics

Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see -XX:NativeMemoryTracking). By default, this option is disabled and native memory tracking data is not printed.

-XX:+ShowMessageBoxOnError

Enables displaying of a dialog box when the JVM experiences an irrecoverable error. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error. By default, this option is disabled.

-XX:StartFlightRecording=parameter=value

Starts a JFR recording for the Java application. This option is equivalent to the JFR.start diagnostic command that starts a recording during runtime. You can set the following parameters when starting a JFR recording:

compress={true|false}

Specifies whether to compress the JFR recording log file (of type JFR) on the disk using the gzip file compression utility. This parameter is valid only if the filename parameter is specified. By default it is set to false (recording is not compressed). To enable compression, set the parameter to true.

defaultrecording={true|false}

Specifies whether the recording is a continuous background recording or if it runs for a limited time. By default, this parameter is set to false (recording runs for a limited time). To make the recording run continuously, set the parameter to true.

delay=time

Specifies the delay between the Java application launch time and the start of the recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 10m means 10 minutes). By default, there is no delay, and this parameter is set to 0.

duration=time

Specifies the duration of the recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 5h means 5 hours). By default, the duration is not limited, and this parameter is set to 0.

filename=path

Specifies the path and name of the JFR recording log file.

name=identifier

Specifies the identifier for the JFR recording. By default, it is set to Recording x.

maxage=time

Specifies the maximum age of disk data to keep for the default recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 30s means 30 seconds). By default, the maximum age is set to 15 minutes (15m).

maxsize=size

Specifies the maximum size (in bytes) of disk data to keep before it is flushed from the thread buffer to the global buffer. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size is not limited, and this parameter is set to 0.

This parameter is valid only for size-bound recordings.

settings=path

Specifies the path and name of the event settings file (of type JFC). By default, the default.jfc file is used, which is located in JAVA_HOME/jre/lib/jfr.

You can specify values for multiple parameters by separating them with a comma. For example, to save the recording to test.jfr in the current working directory, and instruct JFR to compress the log file, specify the following:

-XX:StartFlightRecording=filename=test.jfr,compress=true
-XX:ThreadStackSize=size

Sets the thread stack size (in bytes). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value depends on the platform:

  • Linux/ARM (32-bit): 320 KB

  • Linux/i386 (32-bit): 320 KB

  • Linux/x64 (64-bit): 1024 KB

  • OS X (64-bit): 1024 KB

  • Oracle Solaris/i386 (32-bit): 320 KB

  • Oracle Solaris/x64 (64-bit): 1024 KB

  • Windows: depends on virtual memory

The following examples show how to set the thread stack size to 1024 KB in different units:

-XX:ThreadStackSize=1m
-XX:ThreadStackSize=1024k
-XX:ThreadStackSize=1048576

This option is equivalent to -Xss.

-XX:+TraceClassLoading

Enables tracing of classes as they are loaded. By default, this option is disabled and classes are not traced.

-XX:+TraceClassLoadingPreorder

Enables tracing of all loaded classes in the order in which they are referenced. By default, this option is disabled and classes are not traced.

-XX:+TraceClassResolution

Enables tracing of constant pool resolutions. By default, this option is disabled and constant pool resolutions are not traced.

-XX:+TraceClassUnloading

Enables tracing of classes as they are unloaded. By default, this option is disabled and classes are not traced.

-XX:+TraceLoaderConstraints

Enables tracing of the loader constraints recording. By default, this option is disabled and loader constraints recoding is not traced.

-XX:+UnlockCommercialFeatures

Enables the use of commercial features. Commercial features are included with Oracle Java SE Advanced or Oracle Java SE Suite packages, as defined on the Java SE Products page at http://www.oracle.com/technetwork/java/javase/terms/products/index.html

By default, this option is disabled and the JVM runs without the commercial features. Once they were enabled for a JVM process, it is not possible to disable their use for that process.

-XX:+UseAltSigs

Enables the use of alternative signals instead of SIGUSR1 and SIGUSR2 for JVM internal signals. By default, this option is disabled and alternative signals are not used. This option is equivalent to -Xusealtsigs.

-XX:+UseBiasedLocking

Enables the use of biased locking. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www.oracle.com/technetwork/java/tuning-139912.html#section4.2.5

By default, this option is disabled and biased locking is not used.

-XX:+UseCompressedOops

Enables the use of compressed pointers. When this option is enabled, object references are represented as 32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB. This option works only for 64-bit JVMs.

By default, this option is disabled and compressed pointers are not used.

-XX:+UseLargePages

Enables the use of large page memory. This option is enabled by default. To disable the use of large page memory, specify -XX:-UseLargePages.

For more information, see Java Support for Large Memory Pages at http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html

-XX:+UseMembar

Enables issuing of membars on thread state transitions. This option is disabled by default on all platforms except Power PC and ARM servers, where it is enabled. To disable issuing of membars on thread state transitions for Power PC and ARM, specify -XX:-UseMembar.

-XX:+UsePerfData

Enables the perfdata feature. This option is enabled by default to allow JVM monitoring and performance testing. Disabling it suppresses the creation of the hsperfdata_userid directories. To disable the perfdata feature, specify -XX:-UsePerfData.

-XX:+AllowUserSignalHandlers

Enables installation of signal handlers by the application. By default, this option is disabled and the application is not allowed to install signal handlers.

Advanced JIT Compiler Options

These options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM.

-XX:+AggressiveOpts

Enables the use of aggressive performance optimization features, which are expected to become default in upcoming releases. By default, this option is disabled and experimental performance features are not used.

-XX:AllocateInstancePrefetchLines=lines

Sets the number of lines to prefetch ahead of the instance allocation pointer. By default, the number of lines to prefetch is set to 1:

-XX:AllocateInstancePrefetchLines=1
-XX:AllocatePrefetchInstr=instruction

Sets the prefetch instruction to prefetch ahead of the allocation pointer. Possible values are from 0 to 3. The actual instructions behind the values depend on the platform. By default, the prefetch instruction is set to 0:

-XX:AllocatePrefetchInstr=0
-XX:AllocatePrefetchStepSize=size

Sets the step size (in bytes) for sequential prefetch instructions. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the step size is set to 16 bytes:

-XX:AllocatePrefetchStepSize=16
-XX:+BackgroundCompilation

Enables background compilation. This option is enabled by default. To disable background compilation, specify -XX:-BackgroundCompilation (this is equivalent to specifying -Xbatch).

-XX:CICompilerCount=threads

Sets the number of compiler threads to use for compilation. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used. The following example shows how to set the number of threads to 2:

-XX:CICompilerCount=2
-XX:CodeCacheMinimumFreeSpace=size

Sets the minimum free space (in bytes) required for compilation. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. When less than the minimum free space remains, compiling stops. By default, this option is set to 500 KB. The following example shows how to set the minimum free space to 1024 MB:

-XX:CodeCacheMinimumFreeSpace=1024m
-XX:CompileCommand=command,method[,option]

Specifies a command to perform on a method. For example, to exclude the indexOf() method of the String class from being compiled, use the following:

-XX:CompileCommand=exclude,java/lang/String.indexOf

Note that the full class name is specified, including all packages and subpackages separated by a slash (/). For easier cut and paste operations, it is also possible to use the method name format produced by the -XX:+PrintCompilation and -XX:+LogCompilation options:

-XX:CompileCommand=exclude,java.lang.String::indexOf

If the method is specified without the signature, the command will be applied to all methods with the specified name. However, you can also specify the signature of the method in the class file format. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end. For example, if you want to exclude only the indexOf(String) method of the String class from being compiled, use the following:

-XX:CompileCommand="exclude,java/lang/String.indexOf,(Ljava/lang/String;)I"

You can also use the asterisk (*) as a wildcard for class and method names. For example, to exclude all indexOf() methods in all classes from being compiled, use the following:

-XX:CompileCommand=exclude,*.indexOf

The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell. You can pass arguments to -XX:CompileCommand using spaces as separators by enclosing the argument in quotation marks:

-XX:CompileCommand="exclude java/lang/String indexOf"

Note that after parsing the commands passed on the command line using the -XX:CompileCommand options, the JIT compiler then reads commands from the .hotspot_compiler file. You can add commands to this file or specify a different file using the -XX:CompileCommandFile option.

To add several commands, either specify the -XX:CompileCommand option multiple times, or separate each argument with the newline separator (\n). The following commands are available:

break

Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method.

compileonly

Exclude all methods from compilation except for the specified method. As an alternative, you can use the -XX:CompileOnly option, which allows to specify several methods.

dontinline

Prevent inlining of the specified method.

exclude

Exclude the specified method from compilation.

help

Print a help message for the -XX:CompileCommand option.

inline

Attempt to inline the specified method.

log

Exclude compilation logging (with the -XX:+LogCompilation option) for all methods except for the specified method. By default, logging is performed for all compiled methods.

option

This command can be used to pass a JIT compilation option to the specified method in place of the last argument (option). The compilation option is set at the end, after the method name. For example, to enable the BlockLayoutByFrequency option for the append() method of the StringBuffer class, use the following:

-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency

You can specify multiple compilation options, separated by commas or spaces.

print

Print generated assembler code after compilation of the specified method.

quiet

Do not print the compile commands. By default, the commands that you specify with the -XX:CompileCommand option are printed; for example, if you exclude from compilation the indexOf() method of the String class, then the following will be printed to standard output:

CompilerOracle: exclude java/lang/String.indexOf

You can suppress this by specifying the -XX:CompileCommand=quiet option before other -XX:CompileCommand options.

-XX:CompileCommandFile=filename

Sets the file from which JIT compiler commands are read. By default, the .hotspot_compiler file is used to store commands performed by the JIT compiler.

Each line in the command file represents a command, a class name, and a method name for which the command is used. For example, this line prints assembly code for the toString() method of the String class:

print java/lang/String toString

For more information about specifying the commands for the JIT compiler to perform on methods, see the -XX:CompileCommand option.

-XX:CompileOnly=methods

Sets the list of methods (separated by commas) to which compilation should be restricted. Only the specified methods will be compiled. Specify each method with the full class name (including the packages and subpackages). For example, to compile only the length() method of the String class and the size() method of the List class, use the following:

-XX:CompileOnly=java/lang/String.length,java/util/List.size

Note that the full class name is specified, including all packages and subpackages separated by a slash (/). For easier cut and paste operations, it is also possible to use the method name format produced by the -XX:+PrintCompilation and -XX:+LogCompilation options:

-XX:CompileOnly=java.lang.String::length,java.util.List::size

Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:

-XX:CompileOnly=java/lang/String
-XX:CompileOnly=java/lang
-XX:CompileOnly=.length
-XX:CompileThreshold=invocations

Sets the number of interpreted method invocations before compilation. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation. For the client JVM, the default setting is 1,500 invocations. The following example shows how to set the number of interpreted method invocations to 5,000:

-XX:CompileThreshold=5000

You can completely disable interpretation of Java methods before compilation by specifying the -Xcomp option.

-XX:+DoEscapeAnalysis

Enables the use of escape analysis. This option is enabled by default. To disable the use of escape analysis, specify -XX:-DoEscapeAnalysis.

-XX:+FailOverToOldVerifier

Enables automatic failover to the old verifier when the new type checker fails. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version. You can enable it for classes with older versions of the bytecode.

-XX:InitialCodeCacheSize=size

Sets the initial code cache size (in bytes). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is set to 500 KB. The following example shows how to set the initial code cache size to 32 KB:

-XX:InitialCodeCacheSize=32k
-XX:+Inline

Enables method inlining. This option is enabled by default to increase performance. To disable method inlining, specify -XX:-Inline.

-XX:InlineSmallCode=size

Sets the maximum code size (in bytes) for compiled methods that should be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. Only compiled methods with the size smaller than the specified size will be inlined. By default, the maximum code size is set to 1000 bytes:

-XX:InlineSmallCode=1000
-XX:+LogCompilation

Enables logging of compilation activity to a file named hotspot.log in the current working directory. You can specify a different log file path and name using the -XX:LogFile option.

By default, this option is disabled and compilation activity is not logged. The -XX:+LogCompilation option has to be used together with the -XX:UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the -XX:+PrintCompilation option.

-XX:MaxInlineSize=size

Sets the maximum bytecode size (in bytes) of a method to be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the maximum bytecode size is set to 35 bytes:

-XX:MaxInlineSize=35
-XX:MaxNodeLimit=nodes

Sets the maximum number of nodes to be used during single method compilation. By default, the maximum number of nodes is set to 65,000:

-XX:MaxNodeLimit=65000
-XX:MaxTrivialSize=size

Sets the maximum bytecode size (in bytes) of a trivial method to be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the maximum bytecode size of a trivial method is set to 6 bytes:

-XX:MaxTrivialSize=6
-XX:+OptimizeStringConcat

Enables the optimization of String concatenation operations. This option is enabled by default. To disable the optimization of String concatenation operations, specify -XX:-OptimizeStringConcat.

-XX:+PrintAssembly

Enables printing of assembly code for bytecoded and native methods by using the external disassembler.so library. This enables you to see the generated code, which may help you to diagnose performance issues.

By default, this option is disabled and assembly code is not printed. The -XX:+PrintAssembly option has to be used together with the -XX:UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

-XX:+PrintCompilation

Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled. This enables you to see which methods actually get compiled. By default, this option is disabled and diagnostic output is not printed.

You can also log compilation activity to a file by using the -XX:+LogCompilation option.

-XX:+PrintInlining

Enables printing of inlining decisions. This enables you to see which methods are getting inlined.

By default, this option is disabled and inlining information is not printed. The -XX:+PrintInlining option has to be used together with the -XX:+UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

-XX:+RelaxAccessControlCheck

Decreases the amount of access control checks in the verifier. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version. You can enable it for classes with older versions of the bytecode.

-XX:ReservedCodeCacheSize=size

Sets the maximum code cache size (in bytes) for JIT-compiled code. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. This option is equivalent to -Xmaxjitcodesize.

-XX:+TieredCompilation

Enables the use of tiered compilation. By default, this option is disabled and tiered compilation is not used.

-XX:+UseCodeCacheFlushing

Enables flushing of the code cache before shutting down the compiler. This option is enabled by default. To disable flushing of the code cache before shutting down the compiler, specify -XX:-UseCodeCacheFlushing.

-XX:+UseCondCardMark

Enables checking of whether the card is already marked before updating the card table. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations.

-XX:+UseSuperWord

Enables the transformation of scalar operations into superword operations. This option is enabled by default. To disable the transformation of scalar operations into superword operations, specify -XX:-UseSuperWord.

Advanced Serviceability Options

These options provide the ability to gather system information and perform extensive debugging.

-XX:+ExtendedDTraceProbes

Enables additional dtrace tool probes that impact the performance. By default, this option is disabled and dtrace performs only standard probes.

-XX:+HeapDumpOnOutOfMemory

Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a java.lang.OutOfMemoryError exception is thrown. You can explicitly set the heap dump file path and name using the -XX:HeapDumpPath option. By default, this option is disabled and the heap is not dumped when an OutOfMemoryError exception is thrown.

-XX:HeapDumpPath=path

Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the -XX:+HeapDumpOnOutOfMemoryError option is set. By default, the file is created in the current working directory, and it is named java_pid pid.hprof where pid is the identifier of the process that caused the error. The following example shows how to set the default file explicitly (%p represents the current process identificator):

-XX:HeapDumpPath=./java_pid%p.hprof

The following example shows how to set the heap dump file to /var/log/java/java_heapdump.hprof:

-XX:HeapDumpPath=/var/log/java/java_heapdump.hprof
-XX:LogFile=path

Sets the path and file name where log data is written. By default, the file is created in the current working directory, and it is named hotspot.log.

The following example shows how to set the log file to /var/log/java/hotspot.log:

-XX:LogFile=/var/log/java/hotspot.log
-XX:+PrintClassHistogram

Enables printing of a class instance histogram after a Control+C event (SIGTERM). By default, this option is disabled.

Setting this option is equivalent to running the jmap -histo command, or the jcmd pid GC.class_histogram command, where pid is the current Java process identifier.

-XX:+PrintConcurrentLocks

Enables printing of java.util.concurrent locks after a Control+C event (SIGTERM). By default, this option is disabled.

Setting this option is equivalent to running the jstack -l command or the jcmd pid Thread.print -l command, where pid is the current Java process identifier.

-XX:+UnlockDiagnosticVMOptions

Unlocks the options intended for diagnosing the JVM. By default, this option is disabled and diagnostic options are not available.

Advanced Garbage Collection Options

These options control how garbage collection (GC) is performed by the Java HotSpot VM.

-XX:+AggressiveHeap

Enables Java heap optimization. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU). By default, the option is disabled and the heap is not optimized.

-XX:AllocatePrefetchDistance=size

Sets the size (in bytes) of the prefetch distance for object allocation. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object. Each Java thread has its own allocation point.

Negative values denote that prefetch distance is chosen based on the platform. Positive values are bytes to prefetch. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is set to -1.

The following example shows how to set the prefetch distance to 1024 bytes:

-XX:AllocatePrefetchDistance=1024
-XX:AllocatePrefetchLines=lines

Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code. The default value is 1 if the last allocated object was an instance, and 3 if it was an array.

The following example shows how to set the number of loaded cache lines to 5:

-XX:AllocatePrefetchLines=5
-XX:AllocatePrefetchStyle=style

Sets the generated code style for prefetch instructions. The style argument is an integer from 0 to 3:

0

Do not generate prefetch instructions.

1

Execute prefetch instructions after each allocation. This is the default parameter.

2

Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed.

3

Use BIS instruction on SPARC for allocation prefetch.

-XX:+AlwaysPreTouch

Enables touching of every page on the Java heap during JVM initialization. This gets all pages into the memory before entering the main() method. The option can be used in testing to simulate a long-running system with all virtual memory mapped to physical memory. By default, this option is disabled and all pages are committed as JVM heap space fills.

-XX:+CMSClassUnloadingEnabled

Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector. This option is enabled by default. To disable class unloading for the CMS garbage collector, specify -XX:-CMSClassUnloadingEnabled.

-XX:CMSExpAvgFactor=percent

Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics. By default, the exponential averages factor is set to 25%. The following example shows how to set the factor to 15%:

-XX:CMSExpAvgFactor=15
-XX:CMSInitiatingOccupancyFraction=percent

Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle. The default value is set to -1. Any negative value (including the default) implies that -XX:CMSTriggerRatio is used to define the value of the initiating occupancy fraction.

The following example shows how to set the occupancy fraction to 20%:

-XX:CMSInitiatingOccupancyFraction=20
-XX:+CMSScavengeBeforeRemark

Enables scavenging attempts before the CMS remark step. By default, this option is disabled.

-XX:CMSTriggerRatio=percent

Sets the percentage (0 to 100) of the value specified by -XX:MinHeapFreeRatio that is allocated before a CMS collection cycle commences. The default value is set to 80%.

The following example shows how to set the occupancy fraction to 75%:

-XX:CMSTriggerRatio=75
-XX:ConcGCThreads=threads

Sets the number of threads used for concurrent GC. The default value depends on the number of CPUs available to the JVM.

For example, to set the number of threads for concurrent GC to 2, specify the following option:

-XX:ConcGCThreads=2
-XX:+DisableExplicitGC

Enables the option that disables processing of calls to System.gc(). This option is disabled by default, meaning that calls to System.gc() are processed. If processing of calls to System.gc() is disabled, the JVM still performs GC when necessary.

-XX:+ExplicitGCInvokesConcurrent

Enables invoking of concurrent GC by using the System.gc() request. This option is disabled by default and can be enabled only together with the -XX:+UseConcMarkSweepGC option.

-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses

Enables invoking of concurrent GC by using the System.gc() request and unloading of classes during the concurrent GC cycle. This option is disabled by default and can be enabled only together with the -XX:+UseConcMarkSweepGC option.

-XX:G1HeapRegionSize=size

Sets the size of the regions into which the Java heap is subdivided when using the garbage-first (G1) collector. The value can be between 1 MB and 32 MB. The default region size is determined ergonomically based on the heap size.

The following example shows how to set the size of the subdivisions to 16 MB:

-XX:G1HeapRegionSize=16m
-XX:+G1PrintHeapRegions

Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector. By default, this option is disabled.

-XX:G1ReservePercent=percent

Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector. By default, this option is set to 10%.

The following example shows how to set the reserved heap to 20%:

-XX:G1ReservePercent=20
-XX:InitialHeapSize=size

Sets the initial size (in bytes) of the memory allocation pool. This value must be either 0, or a multiple of 1024 and greater than 1 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the size of allocated memory to 6 MB using various units:

-XX:InitialHeapSize=6291456
-XX:InitialHeapSize=6144k
-XX:InitialHeapSize=6m

If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation. The size of the heap for the young generation can be set using the -XX:NewSize option.

-XX:InitialSurvivorRatio=ratio

Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the -XX:+UseParallelGC and/or -XX:+UseParallelOldGC options). Adaptive sizing is enabled by default with the throughput garbage collector by using the -XX:+UseParallelGC and -XX:+UseParallelOldGC options, and survivor space is resized according to the application behavior, starting with the initial value. If adaptive sizing is disabled (using the -XX:-UseAdaptiveSizePolicy option), then the -XX:SurvivorRatio option should be used to set the size of the survivor space for the entire execution of the application.

The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):

S=Y/(R+2)

The 2 in the equation denotes two survivor spaces. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size.

By default, the initial survivor space ratio is set to 8. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0.2 MB.

The following example shows how to set the initial survivor space ratio to 4:

-XX:InitialSurvivorRatio=4
-XX:InitiatingHeapOccupancyPercent=percent

Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector).

By default, the initiating value is set to 45%. A value of 0 implies nonstop GC cycles. The following example shows how to set the initiating heap occupancy to 75%:

-XX:InitiatingHeapOccupancyPercent=75
-XX:MaxGCPauseMillis=time

Sets a target for the maximum GC pause time (in milliseconds). This is a soft goal, and the JVM will make its best effort to achieve it. By default, there is no maximum pause time value.

The following example shows how to set the maximum target pause time to 500 ms:

-XX:MaxGCPauseMillis=500
-XX:MaxHeapSize=size

Sets the maximum size (in byes) of the memory allocation pool. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For server deployments, -XX:InitialHeapSize and -XX:MaxHeapSize are often set to the same value. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:

-XX:MaxHeapSize=83886080
-XX:MaxHeapSize=81920k
-XX:MaxHeapSize=80m

On Oracle Solaris 7 and Oracle Solaris 8 SPARC platforms, the upper limit for this value is approximately 4,000 MB minus overhead amounts. On Oracle Solaris 2.6 and x86 platforms, the upper limit is approximately 2,000 MB minus overhead amounts. On Linux platforms, the upper limit is approximately 2,000 MB minus overhead amounts.

The -XX:MaxHeapSize option is equivalent to -Xmx.

-XX:MaxHeapFreeRatio=percent

Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space expands above this value, then the heap will be shrunk. By default, this value is set to 70%.

The following example shows how to set the maximum free heap ratio to 75%:

-XX:MaxHeapFreeRatio=75
-XX:MaxMetaspaceSize=size

Sets the maximum amount of native memory that can be allocated for class metadata. By default, the size is not limited. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system.

The following example shows how to set the maximum class metadata size to 256 MB:

-XX:MaxMetaspaceSize=256m
-XX:MaxNewSize=size

Sets the maximum size (in bytes) of the heap for the young generation (nursery). The default value is set ergonomically.

-XX:MaxTenuringThreshold=threshold

Sets the maximum tenuring threshold for use in adaptive GC sizing. The largest value is 15. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector.

The following example shows how to set the maximum tenuring threshold to 10:

-XX:MaxTenuringThreshold=10
-XX:MetaspaceSize=size

Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used. The default size depends on the platform.

-XX:MinHeapFreeRatio=percent

Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space falls below this value, then the heap will be expanded. By default, this value is set to 40%.

The following example shows how to set the minimum free heap ratio to 25%:

-XX:MinHeapFreeRatio=25
-XX:NewRatio=ratio

Sets the ratio between young and old generation sizes. By default, this option is set to 2. The following example shows how to set the young/old ratio to 1:

-XX:NewRatio=1
-XX:NewSize=size

Sets the initial size (in bytes) of the heap for the young generation (nursery). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The young generation region of the heap is used for new objects. GC is performed in this region more often than in other regions. If the size for the young generation is too low, then a large number of minor GCs will be performed. If the size is too high, then only full GCs will be performed, which can take a long time to complete. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size.

The following examples show how to set the initial size of young generation to 256 MB using various units:

-XX:NewSize=256m
-XX:NewSize=262144k
-XX:NewSize=268435456

The -XX:NewSize option is equivalent to -Xmn.

-XX:ParallelGCThreads=threads

Sets the number of threads used for parallel garbage collection in the young and old generations. The default value depends on the number of CPUs available to the JVM.

For example, to set the number of threads for parallel GC to 2, specify the following option:

-XX:ParallelGCThreads=2
-XX:+ParallelRefProcEnabled

Enables parallel reference processing. By default, this option is disabled.

-XX:+PrintAdaptiveSizePolicy

Enables printing of information about adaptive generation sizing. By default, this option is disabled.

-XX:+PrintGC

Enables printing of messages at every GC. By default, this option is disabled.

-XX:+PrintGCApplicationConcurrentTime

Enables printing of how much time elapsed since the last pause (for example, a GC pause). By default, this option is disabled.

-XX:+PrintGCApplicationStoppedTime

Enables printing of how much time the pause (for example, a GC pause) lasted. By default, this option is disabled.

-XX+PrintGCDateStamp

Enables printing of a date stamp at every GC. By default, this option is disabled.

-XX:+PrintGCDetails

Enables printing of detailed messages at every GC. By default, this option is disabled.

-XX:+PrintGCTaskTimeStamps

Enables printing of time stamps for every individual GC worker thread task. By default, this option is disabled.

-XX:+PrintGCTimeStamp

Enables printing of time stamps at every GC. By default, this option is disabled.

-XX:+PrintTenuringDistribution

Enables printing of tenuring age information. The following is an example of the output:

Desired survivor size 48286924 bytes, new threshold 10 (max 10)
- age 1: 28992024 bytes, 28992024 total
- age 2: 1366864 bytes, 30358888 total
- age 3: 1425912 bytes, 31784800 total
...

Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space). Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next). And so on.

In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc. The third value in each row is the cumulative size of objects of age n or less.

By default, this option is disabled.

-XX:+ScavengeBeforeFullGC

Enables GC of the young generation before each full GC. This option is enabled by default. Oracle recommends that you do not disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space. To disable GC of the young generation before each full GC, specify -XX:-ScavengeBeforeFullGC.

-XX:SoftRefLRUPolicyMSPerMB=time

Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced. The default value is one second of lifetime per free megabyte in the heap. The -XX:SoftRefLRUPolicyMSPerMB option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM). This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references. In the latter case, the value of the -Xmx option has a significant effect on how quickly soft references are garbage collected.

The following example shows how to set the value to 2.5 seconds:

-XX:SoftRefLRUPolicyMSPerMB=2500
-XX:SurvivorRatio=ratio

Sets the ratio between eden space size and survivor space size. By default, this option is set to 8. The following example shows how to set the eden/survivor space ratio to 4:

-XX:SurvivorRatio=4
-XX:TargetSurvivorRatio=percent

Sets the desired percentage of survivor space (0 to 100) used after young garbage collection. By default, this option is set to 50%.

The following example shows how to set the target survivor space ratio to 30%:

-XX:TargetSurvivorRatio=30
-XX:TLABSize=size

Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. If this option is set to 0, then the JVM chooses the initial size automatically.

The following example shows how to set the initial TLAB size to 512 KB:

-XX:TLABSize=512k
-XX:+UseAdaptiveSizePolicy

Enables the use of adaptive generation sizing. This option is enabled by default. To disable adaptive generation sizing, specify -XX:-UseAdaptiveSizePolicy and set the size of the memory allocation pool explicitly (see the -XX:SurvivorRatio option).

-XX:+UseCMSInitiatingOccupancyOnly

Enables the use of the occupancy value as the only criterion for initiating the CMS collector. By default, this option is disabled and other criteria may be used.

-XX:+UseConcMarkSweepGC

Enables the use of the CMS garbage collector for the old generation. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (-XX:+UseParallelGC) garbage collector. The G1 garbage collector (-XX:+UseG1GC) is another alternative.

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM. When this option is enabled, the -XX:+UseParNewGC option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8: -XX:+UseConcMarkSweepGC -XX:-UseParNewGC.

-XX:+UseG1GC

Enables the use of the G1 garbage collector. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM. It meets GC pause time goals with high probability, while maintaining good throughput. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0.5 seconds).

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM.

-XX:+UseGCOverheadLimit

Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an OutOfMemoryError exception is thrown. This option is enabled, by default and the parallel GC will throw an OutOfMemoryError if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress. To disable this option, specify -XX:-UseGCOverheadLimit.

-XX:+UseNUMA

Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application's use of lower latency memory. By default, this option is disabled and no optimization for NUMA is made. The option is only available when the parallel garbage collector is used (-XX:+UseParallelGC).

-XX:+UseParallelGC

Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors.

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM. If it is enabled, then the -XX:+UseParallelOldGC option is automatically enabled, unless you explicitly disable it.

-XX:+UseParallelOldGC

Enables the use of the parallel garbage collector for full GCs. By default, this option is disabled. Enabling it automatically enables the -XX:+UseParallelGC option.

-XX:+UseParNewGC

Enables the use of parallel threads for collection in the young generation. By default, this option is disabled. It is automatically enabled when you set the -XX:+UseConcMarkSweepGC option. Using the -XX:+UseParNewGC option without the -XX:+UseConcMarkSweepGC option was deprecated in JDK 8.

-XX:+UseSerialGC

Enables the use of the serial garbage collector. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM.

-XX:+UseTLAB

Enables the use of thread-local allocation blocks (TLABs) in the young generation space. This option is enabled by default. To disable the use of TLABs, specify -XX:-UseTLAB.

Deprecated and Removed Options

These options were included in the previous release, but have since been considered unnecessary.

-Xincgc

Enables incremental garbage collection. This option was deprecated in JDK 8 with no replacement.

-Xrunlibname

Loads the specified debugging/profiling library. This option was superseded by the -agentlib option.

-XX:CMSIncrementalDutyCycle=percent

Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSIncrementalDutyCycleMin=percent

Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when -XX:+CMSIncrementalPacing is enabled. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:+CMSIncrementalMode

Enables the incremental mode for the CMS collector. This option was deprecated in JDK 8 with no replacement, along with other options that start with CMSIncremental.

-XX:CMSIncrementalOffset=percent

Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:+CMSIncrementalPacing

Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSIncrementalSafetyFactor=percent

Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSInitiatingPermOccupancyFraction=percent

Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC. This option was deprecated in JDK 8 with no replacement.

-XX:MaxPermSize=size

Sets the maximum permanent generation space size (in bytes). This option was deprecated in JDK 8, and superseded by the -XX:MaxMetaspaceSize option.

-XX:PermSize=size

Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded. This option was deprecated un JDK 8, and superseded by the -XX:MetaspaceSize option.

-XX:+UseSplitVerifier

Enables splitting of the verification process. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime). This option was deprecated in JDK 8, and verification is now split by default without a way to disable it.

-XX:+UseStringCache

Enables caching of commonly allocated strings. This option was removed from JDK 8 with no replacement.

Performance Tuning Examples

The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time.

Example 1Tuning for Higher Throughput
java -d64 -server -XX:+AggressiveOpts -XX:+UseLargePages -Xmn10g  -Xms26g -Xmx26g
Example 2Tuning for Lower Response Time
java -d64 -XX:+UseG1GC -Xms26g Xmx26g -XX:MaxGCPauseMillis=500 -XX:+PrintGCTimeStamp

Exit Status

The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM. However, a Java application may choose to return any value by using the API call System.exit(exitValue). The values are:

  • 0: Successful completion

  • >0: An error occurred

See Also

  • javac(1)

  • jdb(1)

  • javah(1)

  • jar(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java IDL and RMI-IIOP

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

9 Java IDL and RMI-IIOP

These commands create applications that use OMG-standard IDL and CORBA/IIOP.

This section contains the following commands:

tnameserv: Starts the Java IDL name server.

idlj: Generates Java bindings for a specified Interface Definition Language (IDL) file.

orbd: Enables clients to locate and call persistent objects on servers in the CORBA environment.

servertool: Provides an easy-to-use interface for the application programmers to register, unregister, start up, and shut down a server.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition Tools Reference Release 8 for Oracle JDK on UNIX

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

Java Platform, Standard Edition

Tools Reference

Release 8 for Oracle JDK on UNIX

E38209-02

March 2014

This document contains reference information for the tools that are installed with Java Development Kit (JDK).

Java Platform, Standard Edition Tools Reference Release 8 for Oracle JDK on UNIX

E38209-02

Copyright 1993, 2014,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Web Start

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

11 Java Web Start

Use these tools to start Java Web Start.

This section contains the following command:

javaws: Starts Java Web Start.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javac

Reads Java class and interface definitions and compiles them into bytecode and class files.

Synopsis

javac [ options ] [ sourcefiles ] [ classes] [ @argfiles ]

Arguments can be in any order:

options

Command-line options. See Options.

sourcefiles

One or more source files to be compiled (such as MyClass.java).

classes

One or more classes to be processed for annotations (such as MyPackage.MyClass).

@argfiles

One or more files that list options and source files. The -J options are not allowed in these files. See Command-Line Argument Files.

Description

The javac command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. The javac command can also process annotations in Java source files and classes.

There are two ways to pass source code file names to javac.

  • For a small number of source files, list the file names on the command line.

  • For a large number of source files, list the file names in a file that is separated by blanks or line breaks. Use the list file name preceded by an at sign (@) with the javac command.

Source code file names must have .java suffixes, class file names must have .class suffixes, and both source and class files must have root names that identify the class. For example, a class called MyClass would be written in a source file called MyClass.java and compiled into a bytecode class file called MyClass.class.

Inner class definitions produce additional class files. These class files have names that combine the inner and outer class names, such as MyClass$MyInnerClass.class.

Arrange source files in a directory tree that reflects their package tree. For example, if all of your source files are in /workspace, then put the source code for com.mysoft.mypack.MyClass in /workspace/com/mysoft/mypack/MyClass.java.

By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with the -d option.

Options

The compiler has a set of standard options that are supported on the current development environment. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Nonstandard options begin with the -X option.

  • See also Cross-Compilation Options

  • See also Nonstandard Options

Standard Options

-Akey[=value]

Specifies options to pass to annotation processors. These options are not interpreted by javac directly, but are made available for use by individual processors. The key value should be one or more identifiers separated by a dot (.).

-cp path or -classpath path

Specifies where to find user class files, and (optionally) annotation processors and source files. This class path overrides the user class path in the CLASSPATH environment variable. If neither CLASSPATH, -cp nor -classpath is specified, then the user class path is the current directory. See Setting the Class Path.

If the -sourcepath option is not specified, then the user class path is also searched for source files.

If the -processorpath option is not specified, then the class path is also searched for annotation processors.

-Djava.ext.dirs=directories

Overrides the location of installed extensions.

-Djava.endorsed.dirs=directories

Overrides the location of the endorsed standards path.

-d directory

Sets the destination directory for class files. The directory must already exist because javac does not create it. If a class is part of a package, then javac puts the class file in a subdirectory that reflects the package name and creates directories as needed.

If you specify -d /home/myclasses and the class is called com.mypackage.MyClass, then the class file is /home/myclasses/com/mypackage/MyClass.class.

If the -d option is not specified, then javac puts each class file in the same directory as the source file from which it was generated.

Note: The directory specified by the -d option is not automatically added to your user class path.

-deprecation

Shows a description of each use or override of a deprecated member or class. Without the -deprecation option, javac shows a summary of the source files that use or override deprecated members or classes. The -deprecation option is shorthand for -Xlint:deprecation.

-encoding encoding

Sets the source file encoding name, such as EUC-JP and UTF-8. If the -encoding option is not specified, then the platform default converter is used.

-endorseddirs directories

Overrides the location of the endorsed standards path.

-extdirs directories

Overrides the location of the ext directory. The directories variable is a colon-separated list of directories. Each JAR file in the specified directories is searched for class files. All JAR files found become part of the class path.

If you are cross-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes. See Cross-Compilation Options for more information.

-g

Generates all debugging information, including local variables. By default, only line number and source file information is generated.

-g:none

Does not generate any debugging information.

-g:[keyword list]

Generates only some kinds of debugging information, specified by a comma separated list of keywords. Valid keywords are:

source

Source file debugging information.

lines

Line number debugging information.

vars

Local variable debugging information.

-help

Prints a synopsis of standard options.

-implicit:[class, none]

Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use -implicit:class. To suppress class file generation, use -implicit:none. If this option is not specified, then the default is to automatically generate class files. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing. The warning is not issued when the -implicit option is set explicitly. See Searching for Types.

-Joption

Passes option to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Note: The CLASSPATH, -classpath, -bootclasspath, and -extdirs options do not specify the classes used to run javac. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want. If you must customize the complier implementation, then use the -J option to pass options through to the underlying Java launcher.

-nowarn

Disables warning messages. This option operates the same as the -Xlint:none option.

-parameters

Stores formal parameter names of constructors and methods in the generated class file so that the method java.lang.reflect.Executable.getParameters from the Reflection API can retrieve them.

-proc: [none, only]

Controls whether annotation processing and compilation are done. -proc:none means that compilation takes place without annotation processing. -proc:only means that only annotation processing is done, without any subsequent compilation.

-processor class1 [,class2,class3...]

Names of the annotation processors to run. This bypasses the default discovery process.

-processorpath path

Specifies where to find annotation processors. If this option is not used, then the class path is searched for processors.

-s dir

Specifies the directory where to place the generated source files. The directory must already exist because javac does not create it. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed.

If you specify -s /home/mysrc and the class is called com.mypackage.MyClass, then the source file is put in /home/mysrc/com/mypackage/MyClass.java.

-source release

Specifies the version of source code accepted. The following values for release are allowed:

1.3

The compiler does not support assertions, generics, or other language features introduced after Java SE 1.3.

1.4

The compiler accepts code containing assertions, which were introduced in Java SE 1.4.

1.5

The compiler accepts code containing generics and other language features introduced in Java SE 5.

5

Synonym for 1.5.

1.6

No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition.

6

Synonym for 1.6.

1.7

This is the default value. The compiler accepts code with features introduced in Java SE 7.

7

Synonym for 1.7.

-sourcepath sourcepath

Specifies the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives. If packages are used, then the local path name within the directory or archive must reflect the package name.

Note: Classes found through the class path might be recompiled when their source files are also found. See Searching for Types.

-verbose

Uses verbose output, which includes information about each class loaded and each source file compiled.

-version

Prints release information.

-werror

Terminates compilation when warnings occur.

-X

Displays information about nonstandard options and exits.

Cross-Compilation Options

By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use the -bootclasspath and -extdirs options when cross-compiling.

-target version

Generates class files that target a specified release of the virtual machine. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM. Valid targets are 1.1, 1.2, 1.3, 1.4, 1.5 (also 5), 1.6 (also 6), and 1.7 (also 7).

The default for the -target option depends on the value of the -source option:

  • If the -source option is not specified, then the value of the -target option is 1.7

  • If the -source option is 1.2, then the value of the -target option is 1.4

  • If the -source option is 1.3, then the value of the -target option is 1.4

  • If the -source option is 1.5, then the value of the -target option is 1.7

  • If the -source option is 1.6, then the value of the -target is option 1.7

  • For all other values of the -source option, the value of the -target option is the value of the -source option.

-bootclasspath bootclasspath

Cross-compiles against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives.

Compact Profile Option

Beginning with JDK 8, the javac compiler supports compact profiles. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint. The compact profiles feature could be used to shorten the download time for applications from app stores. This feature makes for more compact deployment of Java applications that bundle the JRE. This feature is also useful in small devices.

The supported profile values are compact1, compact2, and compact3. These are additive layers. Each higher-numbered compact profile contains all of the APIs in profiles with smaller number names.

-profile

When using compact profiles, this option specifies the profile name when compiling. For example:

javac -profile compact1 Hello.java

javac does not compile source code that uses any Java SE APIs that is not in the specified profile. Here is an example of the error message that results from attempting to compile such source code:

cd jdk1.8.0/bin
./javac -profile compact1 Paint.java
Paint.java:5: error: Applet is not available in profile 'compact1'
import java.applet.Applet;

In this example, you can correct the error by modifying the source to not use the Applet class. You could also correct the error by compiling without the -profile option. Then the compilation would be run against the full set of Java SE APIs. (None of the compact profiles include the Applet class.)

An alternative way to compile with compact profiles is to use the -bootclasspath option to specify a path to an rt.jar file that specifies a profile's image. Using the -profile option instead does not require a profile image to be present on the system at compile time. This is useful when cross-compiling.

Nonstandard Options

-Xbootclasspath/p:path

Adds a suffix to the bootstrap class path.

-Xbootclasspath/a:path

Adds a prefix to the bootstrap class path.

-Xbootclasspath/:path

Overrides the location of the bootstrap class files.

-Xdoclint:[-]group [/access]

Enables or disables specific groups of checks, where group is one of the following values: accessibility, syntax, reference, html or missing. For more information about these groups of checks see the -Xdoclint option of the javadoc command. The -Xdoclint option is disabled by default in the javac command.

The variable access specifies the minimum visibility level of classes and members that the -Xdoclint option checks. It can have one of the following values (in order of most to least visible) : public, protected, package and private. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):

-Xdoclint:all/protected

The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):

-Xdoclint:all,-html/package
-Xdoclint:none

Disables all groups of checks.

-Xdoclint:all[/access]

Enables all groups of checks.

-Xlint

Enables all recommended warnings. In this release, enabling all available warnings is recommended.

-Xlint:all

Enables all recommended warnings. In this release, enabling all available warnings is recommended.

-Xlint:none

Disables all warnings.

-Xlint:name

Disables warning name. See Enable or Disable Warnings with the -Xlint Option for a list of warnings you can disable with this option.

-Xlint:-name

Disables warning name. See Enable or Disable Warnings with the -Xlint Option with the -Xlint option to get a list of warnings that you can disable with this option.

-Xmaxerrs number

Sets the maximum number of errors to print.

-Xmaxwarns number

Sets the maximum number of warnings to print.

-Xstdout filename

Sends compiler messages to the named file. By default, compiler messages go to System.err.

-Xprefer:[newer,source]

Specifies which file to read when both a source file and class file are found for a type. (See Searching for Types). If the -Xprefer:newer option is used, then it reads the newer of the source or class file for a type (default). If the -Xprefer:source option is used, then it reads the source file. Use -Xprefer:source when you want to be sure that any annotation processors can access annotations declared with a retention policy of SOURCE.

-Xpkginfo:[always,legacy,nonempty]

Control whether javac generates package-info.class files from package-info.java files. Possible mode arguments for this option include the following.

always

Always generate a package-info.class file for every package-info.java file. This option may be useful if you use a build system such as Ant, which checks that each .java file has a corresponding .class file.

legacy

Generate a package-info.class file only if package-info.java contains annotations. Don't generate a package-info.class file if package-info.java only contains comments.

Note: A package-info.class file might be generated but be empty if all the annotations in the package-info.java file have RetentionPolicy.SOURCE.

nonempty

Generate a package-info.class file only if package-info.java contains annotations with RetentionPolicy.CLASS or RetentionPolicy.RUNTIME.

-Xprint

Prints a textual representation of specified types for debugging purposes. Perform neither annotation processing nor compilation. The format of the output could change.

-XprintProcessorInfo

Prints information about which annotations a processor is asked to process.

-XprintRounds

Prints information about initial and subsequent annotation processing rounds.

Enable or Disable Warnings with the -Xlint Option

Enable warning name with the -Xlint:name option, where name is one of the following warning names. Note that you can disable a warning with the -Xlint:-name: option.

cast

Warns about unnecessary and redundant casts, for example:

String s = (String) "Hello!"
classfile

Warns about issues related to class file contents.

deprecation

Warns about the use of deprecated items, for example:

java.util.Date myDate = new java.util.Date();
int currentDay = myDate.getDay();

The method java.util.Date.getDay has been deprecated since JDK 1.1

dep-ann

Warns about items that are documented with an @deprecated Javadoc comment, but do not have a @Deprecated annotation, for example:

/**
  * @deprecated As of Java SE 7, replaced by {@link #newMethod()}
  */
public static void deprecatedMethood() { }
public static void newMethod() { }
divzero

Warns about division by the constant integer 0, for example:

int divideByZero = 42 / 0;
empty

Warns about empty statements after if statements, for example:

class E {
    void m() {
         if (true) ;
    }
}
fallthrough

Checks the switch blocks for fall-through cases and provides a warning message for any that are found. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case. For example, the code following the case 1 label in this switch block does not end with a break statement:

switch (x) {
case 1:
  System.out.println("1");
  // No break statement here.
case 2:
  System.out.println("2");
}

If the -Xlint:fallthrough option was used when compiling this code, then the compiler emits a warning about possible fall-through into case, with the line number of the case in question.

finally

Warns about finally clauses that cannot complete normally, for example:

public static int m() {
  try {
     throw new NullPointerException();
  }  catch (NullPointerException(); {
     System.err.println("Caught NullPointerException.");
     return 1;
   } finally {
     return 0;
   }
  }

The compiler generates a warning for the finally block in this example. When the int method is called, it returns a value of 0. A finally block executes when the try block exits. In this example, when control is transferred to the catch block, the int method exits. However, the finally block must execute, so it is executed, even though control was transferred outside the method.

options

Warns about issues that related to the use of command-line options. See Cross-Compilation Options.

overrides

Warns about issues regarding method overrides. For example, consider the following two classes:

public class ClassWithVarargsMethod {
  void varargsMethod(String... s) { }
}

public class ClassWithOverridingMethod extends ClassWithVarargsMethod {
   @Override
   void varargsMethod(String[] s) { }
}

The compiler generates a warning similar to the following:.

warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod
overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding
method is missing '...'

When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. In the method ClassWithVarargsMethod.varargsMethod, the compiler translates the varargs formal parameter String... s to the formal parameter String[] s, an array, which matches the formal parameter of the method ClassWithOverridingMethod.varargsMethod. Consequently, this example compiles.

path

Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths). Such warnings cannot be suppressed with the @SuppressWarnings annotation, for example:

javac -Xlint:path -classpath /nonexistentpath Example.java
processing

Warn about issues regarding annotation processing. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception. For example, the following is a simple annotation processor:

Source file AnnocProc.java:

import java.util.*;
import javax.annotation.processing.*;
import javax.lang.model.*;
import.javaz.lang.model.element.*;

@SupportedAnnotationTypes("NotAnno")
public class AnnoProc extends AbstractProcessor {
  public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){
     return true;
  }

  public SourceVersion getSupportedSourceVersion() {
     return SourceVersion.latest();
   }
}

Source file AnnosWithoutProcessors.java:

@interface Anno { }

@Anno
class AnnosWithoutProcessors { }

The following commands compile the annotation processor AnnoProc, then run this annotation processor against the source file AnnosWithoutProcessors.java:

javac AnnoProc.java
javac -cp . -Xlint:processing -processor AnnoProc -proc:only AnnosWithoutProcessors.java

When the compiler runs the annotation processor against the source file AnnosWithoutProcessors.java, it generates the following warning:

warning: [processing] No processor claimed any of these annotations: Anno

To resolve this issue, you can rename the annotation defined and used in the class AnnosWithoutProcessors from Anno to NotAnno.

rawtypes

Warns about unchecked operations on raw types. The following statement generates a rawtypes warning:

void countElements(List l) { ... }

The following example does not generate a rawtypes warning

void countElements(List<?> l) { ... }

List is a raw type. However, List<?> is an unbounded wildcard parameterized type. Because List is a parameterized interface, always specify its type argument. In this example, the List formal argument is specified with an unbounded wildcard (?) as its formal type parameter, which means that the countElements method can accept any instantiation of the List interface.

Serial

Warns about missing serialVersionUID definitions on serializable classes, for example:

public class PersistentTime implements Serializable
{
  private Date time;

   public PersistentTime() {
     time = Calendar.getInstance().getTime();
   }

   public Date getTime() {
     return time;
   }
}

The compiler generates the following warning:

warning: [serial] serializable class PersistentTime has no definition of
serialVersionUID

If a serializable class does not explicitly declare a field named serialVersionUID, then the serialization runtime environment calculates a default serialVersionUID value for that class based on various aspects of the class, as described in the Java Object Serialization Specification. However, it is strongly recommended that all serializable classes explicitly declare serialVersionUID values because the default process of computing serialVersionUID vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected InvalidClassExceptions during deserialization. To guarantee a consistent serialVersionUID value across different Java compiler implementations, a serializable class must declare an explicit serialVersionUID value.

static

Warns about issues relating to the use of statics, for example:

class XLintStatic {
    static void m1() { }
    void m2() { this.m1(); }
}

The compiler generates the following warning:

warning: [static] static method should be qualified by type name,
XLintStatic, instead of by an expression

To resolve this issue, you can call the static method m1 as follows:

XLintStatic.m1();

Alternately, you can remove the static keyword from the declaration of the method m1.

try

Warns about issues relating to use of try blocks, including try-with-resources statements. For example, a warning is generated for the following statement because the resource ac declared in the try block is not used:

try ( AutoCloseable ac = getResource() ) {    // do nothing}
unchecked

Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:

List l = new ArrayList<Number>();
List<String> ls = l;       // unchecked warning

During type erasure, the types ArrayList<Number> and List<String> become ArrayList and List, respectively.

The ls command has the parameterized type List<String>. When the List referenced by l is assigned to ls, the compiler generates an unchecked warning. At compile time, the compiler and JVM cannot determine whether l refers to a List<String> type. In this case, l does not refer to a List<String> type. As a result, heap pollution occurs.

A heap pollution situation occurs when the List object l, whose static type is List<Number>, is assigned to another List object, ls, that has a different static type, List<String>. However, the compiler still allows this assignment. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics. Because of type erasure, List<Number> and List<String> both become List. Consequently, the compiler allows the assignment of the object l, which has a raw type of List, to the object ls.

varargs

Warns about unsafe usages of variable arguments (varargs) methods, in particular, those that contain non-reifiable arguments, for example:

public class ArrayBuilder {
  public static <T> void addToList (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }
}

Note: A non-reifiable type is a type whose type information is not fully available at runtime.

The compiler generates the following warning for the definition of the method ArrayBuilder.addToList

warning: [varargs] Possible heap pollution from parameterized vararg type T

When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method ArrayBuilder.addToList, the compiler translates the varargs formal parameter T... elements to the formal parameter T[] elements, an array. However, because of type erasure, the compiler converts the varargs formal parameter to Object[] elements. Consequently, there is a possibility of heap pollution.

Command-Line Argument Files

To shorten or simplify the javac command, you can specify one or more files that contain arguments to the javac command (except -J options). This enables you to create javac commands of any length on any operating system.

An argument file can include javac options and source file names in any combination. The arguments within a file can be separated by spaces or new line characters. If a file name contains embedded spaces, then put the whole file name in double quotation marks.

File Names within an argument file are relative to the current directory, not the location of the argument file. Wild cards (*) are not allowed in these lists (such as for specifying *.java). Use of the at sign (@) to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.

When executing the javac command, pass in the path and name of each argument file with the at sign (@) leading character. When the javac command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list.

Example 1Single Argument File

You could use a single argument file named argfile to hold all javac arguments:

javac @argfile

This argument file could contain the contents of both files shown in Example 2

Example 2Two Argument Files

You can create two argument files: one for the javac options and the other for the source file names. Note that the following lists have no line-continuation characters.

Create a file named options that contains the following:

-d classes
-g
-sourcepath /java/pubs/ws/1.3/src/share/classes

Create a file named classes that contains the following:

MyClass1.java
MyClass2.java
MyClass3.java

Then, run the javac command as follows:

javac @options @classes
Example 3Argument Files with Paths

The argument files can have paths, but any file names inside the files are relative to the current working directory (not path1 or path2):

javac @path1/options @path2/classes

Annotation Processing

The javac command provides direct support for annotation processing, superseding the need for the separate annotation processing command, apt.

The API for annotation processors is defined in the javax.annotation.processing and javax.lang.model packages and subpackages.

How Annotation Processing Works

Unless annotation processing is disabled with the -proc:none option, the compiler searches for any annotation processors that are available. The search path can be specified with the -processorpath option. If no path is specified, then the user class path is used. Processors are located by means of service provider-configuration files named META-INF/services/javax.annotation.processing.Processor on the search path. Such files should contain the names of any annotation processors to be used, listed one per line. Alternatively, processors can be specified explicitly, using the -processor option.

After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process. When a match is found, the processor is called. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations. After all of the annotations are claimed, the compiler does not search for additional processors.

If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before. Any processors called on previous rounds are also called on all subsequent rounds. This continues until no new source files are generated.

After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work. Finally, unless the -proc:only option is used, the compiler compiles the original and all generated source files.

Implicitly Loaded Source Files

To compile a set of source files, the compiler might need to implicitly load additional source files. See Searching for Types. Such files are currently not subject to annotation processing. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled. The -implicit option provides a way to suppress the warning.

Searching for Types

To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance.

For example, when you create a subclass java.applet.Applet, you are also using the ancestor classes of Applet: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.

When the compiler needs type information, it searches for a source file or class file that defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath option.

If you set the -sourcepath option, then the compiler searches the indicated path for source files. Otherwise, the compiler searches the user class path for both class files and source files.

You can specify different bootstrap or extension classes with the -bootclasspath and the -extdirs options. See Cross-Compilation Options.

A successful type search may produce a class file, a source file, or both. If both are found, then you can use the -Xprefer option to instruct the compiler which to use. If newer is specified, then the compiler uses the newer of the two files. If source is specified, the compiler uses the source file. The default is newer.

If a type search finds a source file for a required type, either by itself, or as a result of the setting for the -Xprefer option, then the compiler reads the source file to get the information it needs. By default the compiler also compiles the source file. You can use the -implicit option to specify the behavior. If none is specified, then no class files are generated for the source file. If class is specified, then class files are generated for the source file.

The compiler might not discover the need for some type information until after annotation processing completes. When the type information is found in a source file and no -implicit option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the -implicit option to specify whether or not class files should be generated for such source files.

Programmatic Interface

The javac command supports the new Java Compiler API defined by the classes and interfaces in the javax.tools package.

Example

To compile as though providing command-line arguments, use the following syntax:

JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();

The example writes diagnostics to the standard output stream and returns the exit code that javac would give when called from the command line.

You can use other methods in the javax.tools.JavaCompiler interface to handle diagnostics, control where files are read from and written to, and more.

Old Interface

Note: This API is retained for backward compatibility only. All new code should use the newer Java Compiler API.

The com.sun.tools.javac.Main class provides two static methods to call the compiler from a program:

public static int compile(String[] args);
public static int compile(String[] args, PrintWriter out);

The args parameter represents any of the command-line arguments that would typically be passed to the compiler.

The out parameter indicates where the compiler diagnostic output is directed.

The return value is equivalent to the exit value from javac.

Note: All other classes and methods found in a package with names that start with com.sun.tools.javac (subpackages of com.sun.tools.javac) are strictly internal and subject to change at any time.

Examples

Example 1Compile a Simple Program

This example shows how to compile the Hello.java source file in the greetings directory. The class defined in Hello.java is called greetings.Hello. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory. This makes it possible to use the default user class path. It also makes it unnecessary to specify a separate destination directory with the -d option.

The source code in Hello.java:

package greetings;

public class Hello {
    public static void main(String[] args) {
        for (int i=0; i < args.length; i++) {
            System.out.println("Hello " + args[i]);
        }
    }
}

Compile greetings.Hello:

javac greetings/Hello.java

Run greetings.Hello:

java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone
Example 2Compile Multiple Source Files

This example compiles the Aloha.java, GutenTag.java, Hello.java, and Hi.java source files in the greetings package.

% javac greetings/*.java
% ls greetings
Aloha.class         GutenTag.class      Hello.class         Hi.class
Aloha.java          GutenTag.java       Hello.java          Hi.java
Example 3Specify a User Class Path

After changing one of the source files in the previous example, recompile it:

pwd
/examples
javac greetings/Hi.java

Because greetings.Hi refers to other classes in the greetings package, the compiler needs to find these other classes. The previous example works because the default user class path is the directory that contains the package directory. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting CLASSPATH. This example uses the -classpath option.

javac -classpath /examples /examples/greetings/Hi.java

If you change greetings.Hi to use a banner utility, then that utility also needs to be accessible through the user class path.

javac -classpath /examples:/lib/Banners.jar \
            /examples/greetings/Hi.java

To execute a class in the greetings package, the program needs access to the greetings package, and to the classes that the greetings classes use.

java -classpath /examples:/lib/Banners.jar greetings.Hi
Example 4Separate Source Files and Class Files

The following example uses javac to compile code that runs on JVM 1.6.

javac -source 1.6 -target 1.6 -bootclasspath jdk1.6.0/lib/rt.jar \
-extdirs "" OldCode.java

The -source 1.6 option specifies that release 1.6 (or 6) of the Java programming language be used to compile OldCode.java. The option -target 1.6 option ensures that the generated class files are compatible with JVM 1.6. Note that in most cases, the value of the -target option is the value of the -source option; in this example, you can omit the -target option.

You must specify the -bootclasspath option to specify the correct version of the bootstrap classes (the rt.jar library). If not, then the compiler generates a warning:

javac -source 1.6 OldCode.java
warning: [options] bootstrap class path not set in conjunction with
-source 1.6

If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included.

Example 5Cross Compile

This example uses javac to compile code that runs on JVM 1.6.

javac -source 1.6 -target 1.6 -bootclasspath jdk1.6.0/lib/rt.jar \
            -extdirs "" OldCode.java

The -source 1.6 option specifies that release 1.6 (or 6) of the Java programming language to be used to compile OldCode.java. The -target 1.6 option ensures that the generated class files are compatible with JVM 1.6. In most cases, the value of the -target is the value of -source. In this example, the -target option is omitted.

You must specify the -bootclasspath option to specify the correct version of the bootstrap classes (the rt.jar library). If not, then the compiler generates a warning:

javac -source 1.6 OldCode.java
warning: [options] bootstrap class path not set in conjunction with -source 1.6

If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes. This combination can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included. In this example, the compiler uses release 1.6 of the Java programming language.

See Also

  • java(1)

  • jdb(1)

  • javah(1)

  • javadoc(1)

  • jar(1)

  • jdb(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javadoc

Generates HTML pages of API documentation from Java source files.

Synopsis

javadoc {packages|source-files} [options] [@argfiles]

packages

Names of packages that you want to document, separated by spaces, for example java.lang java.lang.reflect java.awt. If you want to also document the subpackages, use the -subpackages option to specify the packages.

By default, javadoc looks for the specified packages in the current directory and subdirectories. Use the -sourcepath option to specify the list of directories where to look for packages.

source-files

Names of Java source files that you want to document, separated by spaces, for example Class.java Object.java Button.java. By default, javadoc looks for the specified classes in the current directory. However, you can specify the full path to the class file and use wildcard characters, for example /home/src/java/awt/Graphics*.java. You can also specify the path relative to the current directory.

options

Command-line options, separated by spaces. See Options.

@argfiles

Names of files that contain a list of javadoc command options, package names and source file names in any order.

Description

The javadoc command parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages that describe (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use the javadoc command to generate the API documentation or the implementation documentation for a set of source files.

You can run the javadoc command on entire packages, individual source files, or both. When documenting entire packages, you can either use the -subpackages option to recursively traverse a directory and its subdirectories, or to pass in an explicit list of package names. When you document individual source files, pass in a list of Java source file names. See Simple Examples.

Process Source Files

The javadoc command processes files that end in source and other files described in Source Files. If you run the javadoc command by passing in individual source file names, then you can determine exactly which source files are processed. However, that is not how most developers want to work, because it is simpler to pass in package names. The javadoc command can be run three ways without explicitly specifying the source file names. You can pass in package names, use the -subpackages option, or use wild cards with source file names. In these cases, the javadoc command processes a source file only when the file fulfills all of the following requirements:

  • The file name prefix (with .java removed) is a valid class name.

  • The path name relative to the root of the source tree is a valid package name after the separators are converted to dots.

  • The package statement contains the valid package name.

Processing Links

During a run, the javadoc command adds cross-reference links to package, class, and member names that are being documented as part of that run. Links appear in the following places. See Javadoc Tags for a description of the @ tags.

  • Declarations (return types, argument types, and field types).

  • See Also sections that are generated from @see tags.

  • Inline text generated from {@link} tags.

  • Exception names generated from @throws tags.

  • Specified by links to interface members and Overrides links to class members. See Method Comment Inheritance.

  • Summary tables listing packages, classes and members.

  • Package and class inheritance trees.

  • The index.

You can add links to existing text for classes not included on the command line (but generated separately) by way of the -link and -linkoffline options.

Processing Details

The javadoc command produces one complete document every time it runs. It does not do incremental builds that modify or directly incorporate the results from earlier runs. However, the javadoc command can link to results from other runs.

The javadoc command implementation requires and relies on the Java compiler. The javadoc command calls part of the javac command to compile the declarations and ignore the member implementations. The javadoc command builds a rich internal representation of the classes that includes the class hierarchy and use relationships to generate the HTML. The javadoc command also picks up user-supplied documentation from documentation comments in the source code. See Documentation Comments.

The javadoc command runs on source files that are pure stub files with no method bodies. This means you can write documentation comments and run the javadoc command in the early stages of design before API implementation.

Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the javadoc command documents default constructors that are present in the compiled class files but not in the source code.

In many cases, the javadoc command lets you generate documentation for source files with incomplete or erroneous code. You can generate documentation before all debugging and troubleshooting is done. The javadoc command does primitive checking of documentation comments.

When the javadoc command builds its internal structure for the documentation, it loads all referenced classes. Because of this, the javadoc command must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. See How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Typically, classes you create must either be loaded as an extension or in the javadoc command class path.

Javadoc Doclets

You can customize the content and format of the javadoc command output with doclets. The javadoc command has a default built-in doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or make a subclass of the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you want.

When a custom doclet is not specified with the -doclet option, the javadoc command uses the default standard doclet. The javadoc command has several options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command-line options. See Options.

Source Files

The javadoc command generates output that originates from the following types of source files: Java language source files for classes (.java), package comment files, overview comment files, and miscellaneous unprocessed files. This section also describes test files and template files that can also be in the source tree, but that you want to be sure not to document.

Class Source Files

Each class or interface and its members can have their own documentation comments contained in a source file. See Documentation Comments.

Package Comment Files

Each package can have its own documentation comment, contained in its own source file, that the javadoc command merges into the generated package summary page. You typically include in this comment any documentation that applies to the entire package.

To create a package comment file, you can place your comments in one of the following files:

  • The package-info.java file can contain the package declaration, package annotations, package comments, and Javadoc tags. This file is preferred.

  • The package.html file contains only package comments and Javadoc tags. No package annotations.

A package can have a single package.html file or a single package-info.java file, but not both. Place either file in the package directory in the source tree with your source files.

The package-info.java File

The package-info.java file can contain a package comment of the following structure. The comment is placed before the package declaration.

Note: The comment separators /** and */ must be present, but the leading asterisks on the intermediate lines can be left off.

/**
 * Provides the classes necessary to create an
 * applet and the classes an applet uses
 * to communicate with its applet context.
 * <p>
 * The applet framework involves two entities:
 * the applet and the applet context.
 * An applet is an embeddable window (see the
 * {@link java.awt.Panel} class) with a few extra
 * methods that the applet context can use to
 * initialize, start, and stop the applet.
 *
 * @since 1.0
 * @see java.awt
 */
package java.lang.applet;

The package.html File

The package.html file can contain a package comment of the following structure. The comment is placed in the <body> element.

File: java/applet/package.html

<HTML>
<BODY>
Provides the classes necessary to create an applet and the
classes an applet uses to communicate with its applet context.
<p>
The applet framework involves two entities: the applet
and the applet context. An applet is an embeddable
window (see the {@link java.awt.Panel} class) with a
few extra methods that the applet context can use to
initialize, start, and stop the applet.

@since 1.0
@see java.awt
</BODY>
</HTML>

The package.html file is a typical HTML file and does not include a package declaration. The content of the package comment file is written in HTML with one exception. The documentation comment should not include the comment separators /** and */ or leading asterisks. When writing the comment, make the first sentence a summary about the package, and do not put a title or any other text between the <body> tag and the first sentence. You can include package tags. All block tags must appear after the main description. If you add an @see tag in a package comment file, then it must have a fully qualified name.

Processing the Comment File

When the javadoc command runs, it searches for the package comment file. If the package comment file is found, then the javadoc command does the following:

  • Copies the comment for processing. For package.html, the javadoc command copies all content between the <body> and </body> HTML tags. You can include a <head> section to put a <title> tag, source file copyright statement, or other information, but none of these appear in the generated documentation.

  • Processes the package tags. See Package Tags.

  • Inserts the processed text at the bottom of the generated package summary page. See Java Platform, Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

  • Copies the first sentence of the package comment to the top of the package summary page. The javadoc command also adds the package name and this first sentence to the list of packages on the overview page. See Java Platform, Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

    The end of the sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions.

Overview Comment Files

Each application or set of packages that you are documenting can have its own overview documentation comment that is kept in its own source file, that the javadoc command merges into the generated overview page. You typically include in this comment any documentation that applies to the entire application or set of packages.

You can name the file anything you want such as overview.html and place it anywhere. A typical location is at the top of the source tree.

For example, if the source files for the java.applet package are contained in the /home/user/src/java/applet directory, then you could create an overview comment file at /home/user/src/overview.html.

You can have multiple overview comment files for the same set of source files in case you want to run the javadoc command multiple times on different sets of packages. For example, you could run the javadoc command once with -private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file.

The content of the overview comment file is one big documentation comment that is written in HTML. Make the first sentence a summary about the application or set of packages. Do not put a title or any other text between the <body> tag and the first sentence. All tags except inline tags, such as an {@link} tag, must appear after the main description. If you add an @see tag, then it must have a fully qualified name.

When you run the javadoc command, specify the overview comment file name with the -overview option. The file is then processed similarly to that of a package comment file. The javadoc command does the following:

  • Copies all content between the <body> and </body> tags for processing.

  • Processes the overview tags that are present. See Overview Tags.

  • Inserts the processed text at the bottom of the generated overview page. See Java Platform Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

  • Copies the first sentence of the overview comment to the top of the overview summary page.

Unprocessed Files

Your source files can include any files that you want the javadoc command to copy to the destination directory. These files usually include graphic files, example Java source and class files, and self-standing HTML files with a lot of content that would overwhelm the documentation comment of a typical Java source file.

To include unprocessed files, put them in a directory called doc-files. The doc-files directory can be a subdirectory of any package directory that contains source files. You can have one doc-files subdirectory for each package.

For example, if you want to include the image of a button in the java.awt.Button class documentation, then place the image file in the /home/user/src/java/awt/doc-files/ directory. Do not place the doc-files directory at /home/user/src/java/doc-files, because java is not a package. It does not contain any source files.

All links to the unprocessed files must be included in the code because the javadoc command does not look at the files. The javadoc command copies the directory and all of its contents to the destination. The following example shows how the link in the Button.java documentation comment might look:

/**
 * This button looks like this:
 * <img src="doc-files/Button.gif">
 */

Test and Template Files

You can store test and template files in the source tree in the same directory with or in a subdirectory of the directory where the source files reside. To prevent test and template files from being processed, run the javadoc command and explicitly pass in individual source file names.

Test files are valid, compilable source files. Template files are not valid, compatible source files, but they often have the .java suffix.

Test Files

If you want your test files to belong to either an unnamed package or to a package other than the package that the source files are in, then put the test files in a subdirectory underneath the source files and give the directory an invalid name. If you put the test files in the same directory with the source and call the javadoc command with a command-line argument that indicates its package name, then the test files cause warnings or errors. If the files are in a subdirectory with an invalid name, then the test file directory is skipped and no errors or warnings are issued. For example, to add test files for source files in com.package1, put them in a subdirectory in an invalid package name. The following directory name is invalid because it contains a hyphen:

com/package1/test-files/

If your test files contain documentation comments, then you can set up a separate run of the javadoc command to produce test file documentation by passing in their test source file names with wild cards, such as com/package1/test-files/*.java.

Template Files

If you want a template file to be in the source directory, but not generate errors when you execute the javadoc command, then give it an invalid file name such as Buffer-Template.java to prevent it from being processed. The javadoc command only processes source files with names, when stripped of the .java suffix, that are valid class names.

Generated Files

By default, the javadoc command uses a standard doclet that generates HTML-formatted documentation. The standard doclet generates basic content, cross-reference, and support pages described here. Each HTML page corresponds to a separate file. The javadoc command generates two types of files. The first type is named after classes and interfaces. The second type contain hyphens (such as package-summary.html) to prevent conflicts with the first type of file.

Basic Content Pages

  • One class or interface page (classname.html) for each class or interface being documented.

  • One package page (package-summary.html) for each package being documented. The javadoc command includes any HTML text provided in a file with the name package.html or package-info.java in the package directory of the source tree.

  • One overview page (overview-summary.html) for the entire set of packages. The overview page is the front page of the generated document. The javadoc command includes any HTML text provided in a file specified by the -overview option. The Overview page is created only when you pass two or more package names into the javadoc command. See HTML Frames and Options.

Cross-Reference Pages

  • One class hierarchy page for the entire set of packages (overview-tree.html). To view the hierarchy page, click Overview in the navigation bar and click Tree.

  • One class hierarchy page for each package (package-tree.html) To view the hierarchy page, go to a particular package, class, or interface page, and click Tree to display the hierarchy for that package.

  • One use page for each package (package-use.html) and a separate use page for each class and interface (class-use/classname.html). The use page describes what packages, classes, methods, constructors and fields use any part of the specified class, interface, or package. For example, given a class or interface A, its use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. To view the use page, go to the package, class, or interface and click the Use link in the navigation bar.

  • A deprecated API page (deprecated-list.html) that lists all deprecated APIs and their suggested replacements. Avoid deprecated APIs because they can be removed in future implementations.

  • A constant field values page (constant-values.html) for the values of static fields.

  • A serialized form page (serialized-form.html) that provides information about serializable and externalizable classes with field and method descriptions. The information on this page is of interest to reimplementors, and not to developers who want to use the API. To access the serialized form page, go to any serialized class and click Serialized Form in the See Also section of the class comment. The standard doclet generates a serialized form page that lists any class (public or non-public) that implements Serializable with its readObject and writeObject methods, the fields that are serialized, and the documentation comments from the @serial, @serialField, and @serialData tags. Public serializable classes can be excluded by marking them (or their package) with @serial exclude, and package-private serializable classes can be included by marking them (or their package) with an @serial include. As of Release 1.4, you can generate the complete serialized form for public and private classes by running the javadoc command without specifying the -private option. See Options.

  • An index page (index-*.html) of all class, interface, constructor, field and method names, in alphabetical order. The index page is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as AZ for English).

Support Pages

  • A help page (help-doc.html) that describes the navigation bar and the previous pages. Use -helpfile to override the default help file with your own custom help file.

  • One index.html file that creates the HTML frames for display. Load this file to display the front page with frames. The index.html file contains no text content.

  • Several frame files (*-frame.html) that contains lists of packages, classes, and interfaces. The frame files display the HTML frames.

  • A package list file (package-list) that is used by the -link and -linkoffline options. The package list file is a text file that is not reachable through links.

  • A style sheet file (stylesheet.css) that controls a limited amount of color, font family, font size, font style, and positioning information on the generated pages.

  • A doc-files directory that holds image, example, source code, or other files that you want copied to the destination directory. These files are not processed by the javadoc command. This directory is not processed unless it exists in the source tree.

See Options.

HTML Frames

The javadoc command generates the minimum number of frames (two or three) necessary based on the values passed to the command. It omits the list of packages when you pass a single package name or source files that belong to a single package as an argument to the javadoc command. Instead, the javadoc command creates one frame in the left-hand column that displays the list of classes. When you pass two or more package names, the javadoc command creates a third frame that lists all packages and an overview page (overview-summary.html). To bypass frames, click the No Frames link or enter the page set from the overview-summary.html page.

Generated File Structure

The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage.

For example, the document generated for the java.applet.Applet class would be located at java/applet/Applet.html.

The file structure for the java.applet package follows, assuming that the destination directory is named apidocs. All files that contain the word frame appear in the upper-left or lower-left frames, as noted. All other HTML files appear in the right-hand frame.

Directories are bold. The asterisks (*) indicate the files and directories that are omitted when the arguments to the javadoc command are source file names rather than package names. When arguments are source file names, an empty package list is created. The doc-files directory is not created in the destination unless it exists in the source tree. See Generated Files.

  • apidocs: Top-level directory

    • index.html: Initial Page that sets up HTML frames

    • *overview-summary.html: Package list with summaries

    • overview-tree.html: Class hierarchy for all packages

    • deprecated-list.html: Deprecated APIs for all packages

    • constant-values.html: Static field values for all packages

    • serialized-form.html: Serialized forms for all packages

    • *overview-frame.html: All packages for display in upper-left frame

    • allclasses-frame.html: All classes for display in lower-left frame

    • help-doc.html: Help about Javadoc page organization

    • index-all.html: Default index created without -splitindex option

    • index-files: Directory created with -splitindex option

      • index-<number>.html: Index files created with -splitindex option

    • package-list: Package names for resolving external references

    • stylesheet.css: Defines fonts, colors, positions, and so on

  • java: Package directory

    • applet: Subpackage directory

      • Applet.html: Applet class page

      • AppletContext.html: AppletContext interface

      • AppletStub.html: AppletStub interface

      • AudioClip.html: AudioClip interface

      • package-summary.html: Classes with summaries

      • package-frame.html: Package classes for display in lower-left frame

      • package-tree.html: Class hierarchy for this package

      • package-use.html: Where this package is used

      • doc-files: Image and example files directory

      • class-use: Image and examples file location

        - Applet.html: Uses of the Applet class

        - AppletContext.html: Uses of the AppletContext interface

        - AppletStub.html: Uses of the AppletStub interface

        - AudioClip.html: Uses of the AudioClip interface

  • src-html: Source code directory

    • java: Package directory

      • applet: Subpackage directory

        - Applet.html: Applet source code

        - AppletContext.html: AppletContext source code

        - AppletStub.html: AppletStub source code

        - AudioClip.html: AudioClip source code

Generated API Declarations

The javadoc command generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the Boolean class is:

public final class Boolean
extends Object
implements Serializable

The declaration for the Boolean.valueOf method is:

public static Boolean valueOf(String s)

The javadoc command can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. The synchronized and native modifiers are considered implementation detail and not part of the API specification.

Rather than relying on the keyword synchronized, APIs should document their concurrency semantics in the main description of the comment. For example, a description might be: A single enumeration cannot be used by multiple threads concurrently. The document should not describe how to achieve these semantics. As another example, while the Hashtable option should be thread-safe, there is no reason to specify that it is achieved by synchronizing all of its exported methods. It is better to reserve the right to synchronize internally at the bucket level for higher concurrency.

Documentation Comments

This section describes source code comments and comment inheritance.

Source Code Comments

You can include documentation comments in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create documentation comments for each package and another one for the overview, though their syntax is slightly different. A documentation comment consists of the characters between /** and */ that end it. Leading asterisks are allowed on each line and are described further in the following section. The text in a comment can continue onto multiple lines.

/**
 * This is the typical format of a simple documentation comment
 * that spans two lines.
 */

To save space you can put a comment on one line:

/** This comment takes up only one line. */

Placement of Comments

Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations. Documentation comments placed in the body of a method are ignored. The javadoc command recognizes only one documentation comment per declaration statement. See Where Tags Can Be Used.

A common mistake is to put an import statement between the class comment and the class declaration. Do not put an import statement at this location because the javadoc command ignores the class comment.

/**
 * This is the class comment for the class Whatever.
 */

import com.example;   // MISTAKE - Important not to put import statement here

public class Whatever{ }

Parts of Comments

A documentation comment has a main description followed by a tag section. The main description begins after the starting delimiter /** and continues until the tag section. The tag section starts with the first block tag, which is defined by the first @ character that begins a line (ignoring leading asterisks, white space, and leading separator /**). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags, and some types of tags can be repeated while others cannot. For example, this @see tag starts the tag section:

/**
 * This sentence holds the main description for this documentation comment.
 * @see java.lang.Object
 */

Block and inline Tags

A tag is a special keyword within a documentation comment that the javadoc command processes. There are two kinds of tags: block tags, which appear as an @tag tag (also known as standalone tags), and inline tags, which appear within braces, as an {@tag} tag. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and the separator (/**). This means you can use the @ character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the @ character and not have it be interpreted, then use the HTML entity &#064;. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the documentation comment. This associated text can span multiple lines. An inline tag is allowed and interpreted anywhere that text is allowed. The following example contains the @deprecated block tag and the {@link} inline tag. See Javadoc Tags.

/**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */

Write Comments in HTML

The text must be written in HTML with HTML entities and HTML tags. You can use whichever version of HTML your browser supports. The standard doclet generates HTML 3.2-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. HTML 4.0 is preferred for generated files because of the frame sets.

For example, entities for the less than symbol (<) and the greater than symbol (>) should be written as &lt; and &gt;. Similarly, the ampersand (&) should be written as &amp;. The bold HTML tag <b> is shown in the following example.

/**
 * This is a <b>doc</b> comment.
 * @see java.lang.Object
 */

Leading Asterisks

When the javadoc command parses a documentation comment, leading asterisks (*) on each line are discarded, and blanks and tabs that precede the initial asterisks (*) are also discarded. If you omit the leading asterisk on a line, then the leading white space is no longer removed so that you can paste code examples directly into a documentation comment inside a <PRE> tag with its indentation preserved. Spaces are interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator /** or <PRE> tag).

First Sentence

The first sentence of each documentation comment should be a summary sentence that contains a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag. The javadoc command copies this first sentence to the member summary at the top of the HTML page.

Multiple-Field Declarations

The Java platform lets you declare multiple fields in a single statement, but this statement can have only one documentation comment that is copied for all fields. If you want individual documentation comments for each field, then declare each field in a separate statement. For example, the following documentation comment does not make sense written as a single declaration and would be better handled as two declarations:

/**
 * The horizontal and vertical distances of point (x,y)
 */
public int x, y;      // Avoid this

The javadoc command generates the following documentation from the previous code:

public int x

The horizontal and vertical distances of point (x, y).

public int y

The horizontal and vertical distances of point (x, y).

Use of Header Tags

When writing documentation comments for members, it is best not to use HTML heading tags such as <H1> and <H2>, because the javadoc command creates an entire structured document, and these structural tags might interfere with the formatting of the generated document. However, you can use these headings in class and package comments to provide your own structure.

Method Comment Inheritance

The javadoc command allows method comment inheritance in classes and interfaces to fill in missing text or to explicitly inherit method comments. Constructors, fields, and nested classes do not inherit documentation comments.

Note: The source file for an inherited method must be on the path specified by the -sourcepath option for the documentation comment to be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with Release 1.3.n and earlier releases, where the class had to be a documented class.

Fill in Missing Text

When a main description, or @return, @param, or @throws tag is missing from a method comment, the javadoc command copies the corresponding main description or tag comment from the method it overrides or implements (if any). See Method Comment Inheritance.

When an @param tag for a particular parameter is missing, the comment for that parameter is copied from the method further up the inheritance hierarchy. When an @throws tag for a particular exception is missing, the @throws tag is copied only when that exception is declared.

This behavior contrasts with Release 1.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited.

See Javadoc Tags and Options.

Explicit Inheritance

Insert the {@inheritDoc} inline tag in a method main description or @return, @param, or @throws tag comment. The corresponding inherited main description or tag comment is copied into that spot.

Class and Interface Inheritance

Comment inheritance occurs in all possible cases of inheritance from classes and interfaces:

  • When a method in a class overrides a method in a superclass

  • When a method in an interface overrides a method in a superinterface

  • When a method in a class implements a method in an interface

In the first two cases, the javadoc command generates the subheading Overrides in the documentation for the overriding method. A link to the method being overridden is included, whether or not the comment is inherited.

In the third case, when a method in a specified class implements a method in an interface, the javadoc command generates the subheading Specified by in the documentation for the overriding method. A link to the method being implemented is included, whether or not the comment is inherited.

Method Comments Algorithm

If a method does not have a documentation comment, or has an {@inheritDoc} tag, then the javadoc command uses the following algorithm to search for an applicable comment. The algorithm is designed to find the most specific applicable documentation comment, and to give preference to interfaces over superclasses:

  1. Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first documentation comment found for this method.

  2. If Step 1 failed to find a documentation comment, then recursively apply this entire algorithm to each directly implemented (or extended) interface in the same order they were examined in Step 1.

  3. When Step 2 fails to find a documentation comment and this is a class other than the Object class, but not an interface:

    1. If the superclass has a documentation comment for this method, then use it.

    2. If Step 3a failed to find a documentation comment, then recursively apply this entire algorithm to the superclass.

Javadoc Tags

The javadoc command parses special tags when they are embedded within a Java documentation comment. The javadoc tags let you autogenerate a complete, well-formatted API from your source code. The tags start with an at sign (@) and are case-sensitive. They must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk), or it is treated as text. By convention, tags with the same name are grouped together. For example, put all @see tags together. For more information, see Where Tags Can Be Used.

Tags have the following types:

  • Bock tags: Place block tags only in the tag section that follows the description. Block tags have the form: @tag.

  • Inline tags: Place inline tags anywhere in the main description or in the comments for block tags. Inline tags are enclosed within braces: {@tag}.

For custom tags, see -tag tagname:Xaoptcmf:"taghead". See also Where Tags Can Be Used.

Tag Descriptions

@author name-text

Introduced in JDK 1.0

Adds an Author entry with the specified name text to the generated documents when the -author option is used. A documentation comment can contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, the javadoc command inserts a comma (,) and space between names. In the latter case, the entire text is copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than a comma. See @author in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@author

{@code text}

Introduced in JDK 1.5

Equivalent to <code>{@literal}</code>.

Displays text in code font without interpreting the text as HTML markup or nested Javadoc tags. This enables you to use regular angle brackets (< and >) instead of the HTML entities (&lt; and &gt;) in documentation comments, such as in parameter types (<Object>), inequalities (3 < 4), or arrows (<-). For example, the documentation comment text {@code A<B>C} displayed in the generated HTML page unchanged as A<B>C. This means that the <B> is not interpreted as bold and is in code font. If you want the same functionality without the code font, then use the {@literal} tag.

@deprecated deprecated-text

Introduced in JDK 1.0

Adds a comment indicating that this API should no longer be used (even though it may continue to work). The javadoc command moves deprecated-text ahead of the main description, placing it in italics and preceding it with a bold warning: Deprecated. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field.

The first sentence of deprecated text should tell the user when the API was deprecated and what to use as a replacement. The javadoc command copies the first sentence to the summary section and index. Subsequent sentences can also explain why it was deprecated. You should include an {@link} tag (for Javadoc 1.2 or later) that points to the replacement API.

Use the @deprecated annotation tag to deprecate a program element. See How and When to Deprecate APIs at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/deprecation/deprecation.html

See also @deprecated in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@deprecated

{@docRoot}

Introduced in JDK 1.3

Represents the relative path to the generated document's (destination) root directory from any generated page. This tag is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common.

This {@docRoot} tag can be used both on the command line and in a documentation comment. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, and includes the text portion of any tag (such as the @return, @param and @deprecated tags).

  • On the command line, where the header, footer, or bottom are defined: javadoc -bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'.

    When you use the {@docRoot} tag this way in a make file, some makefile programs require a special way to escape for the brace {} characters. For example, the Inprise MAKE version 5.2 running on Windows requires double braces: {{@docRoot}}. It also requires double (rather than single) quotation marks to enclose arguments to options such as the -bottom option (with the quotation marks around the href argument omitted).

  • In a documentation comment:

    /**
 * See the <a href="{@docRoot}/copyright.html">Copyright</a>.
 */

    This tag is needed because the generated documents are in hierarchical directories, as deep as the number of subpackages. The expression: <a href="{@docRoot}/copyright.html"> resolves to <a href="../../copyright.html"> for java/lang/Object.java and <a href="../../../copyright.html"> for java/lang/ref/Reference.java.

@exception class-name description

Introduced in JDK 1.0

Identical to the @throws tag. See @throws class-name description.

{@inheritDoc}

Introduced in JDK 1.4

Inherits (copies) documentation from the nearest inheritable class or implementable interface into the current documentation comment at this tag's location. This enables you to write more general comments higher up the inheritance tree and to write around the copied text.

This tag is valid only in these places in a documentation comment:

  • In the main description block of a method. In this case, the main description is copied from a class or interface up the hierarchy.

  • In the text arguments of the @return, @param, and @throws tags of a method. In this case, the tag text is copied from the corresponding tag up the hierarchy.

See Method Comment Inheritance for a description of how comments are found in the inheritance hierarchy. Note that if this tag is missing, then the comment is or is not automatically inherited according to rules described in that section.

{@link package.class#member label}

Introduced in JDK 1.2

Inserts an inline link with a visible text label that points to the documentation for the specified package, class, or member name of a referenced class. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag, such as the @return, @param and @deprecated tags. See @link in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#{@link

This tag is similar to the @see tag. Both tags require the same references and accept the same syntax for package.class#member and label. The main difference is that the {@link} tag generates an inline link rather than placing the link in the See Also section. The {@link} tag begins and ends with braces to separate it from the rest of the inline text. If you need to use the right brace (}) inside the label, then use the HTML entity notation &#125;.

There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the main description part of any documentation comment or in the text portion of any tag, such as the @deprecated, @return or @param tags.

For example, here is a comment that refers to the getComponentAt(int, int) method:

Use the {@link #getComponentAt(int, int) getComponentAt} method.

From this code, the standard doclet generates the following HTML (assuming it refers to another class in the same package):

Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.

The previous line appears on the web page as:

Use the getComponentAt method.
{@linkplain package.class#member label}

Introduced in JDK 1.4

Behaves the same as the {@link} tag, except the link label is displayed in plain text rather than code font. Useful when the label is plain text. For example, Refer to {@linkplain add() the overridden method}. displays as: Refer to the overridden method.

{@literal text}

Introduced in JDK 1.5

Displays text without interpreting the text as HTML markup or nested Javadoc tags. This enables you to use angle brackets (< and >) instead of the HTML entities (&lt; and &gt;) in documentation comments, such as in parameter types (<Object>), inequalities (3 < 4), or arrows (<-). For example, the documentation comment text {@literal A<B>C} displays unchanged in the generated HTML page in your browser, as A<B>C. The <B> is not interpreted as bold (and it is not in code font). If you want the same functionality with the text in code font, then use the {@code} tag.

@param parameter-name description

Introduced in JDK 1.0

Adds a parameter with the specified parameter-name followed by the specified description to the Parameters section. When writing the documentation comment, you can continue the description onto multiple lines. This tag is valid only in a documentation comment for a method, constructor, or class. See @param in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@param

The parameter-name can be the name of a parameter in a method or constructor, or the name of a type parameter of a class, method, or constructor. Use angle brackets around this parameter name to specify the use of a type parameter.

Example of a type parameter of a class:

/**
 * @param <E> Type of element stored in a list
 */
public interface List<E> extends Collection<E> {
}

Example of a type parameter of a method:

/**
 * @param string  the string to be converted
 * @param type    the type to convert the string to
 * @param <T>     the type of the element
 * @param <V>     the value of the element
 */
<T, V extends T> V convert(String string, Class<T> type) {
}
@return description

Introduced in JDK 1.0

Adds a Returns section with the description text. This text should describe the return type and permissible range of values. This tag is valid only in a documentation comment for a method. See @return in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@return

@see reference

Introduced in JDK 1.0

Adds a See Also heading with a link or text entry that points to a reference. A documentation comment can contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations. The form is the most common. This tag is valid in any documentation comment: overview, package, class, interface, constructor, method, or field. For inserting an inline link within a sentence to a package, class, or member, see {@link}.

Form 1. The @see string tag form adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. The javadoc command distinguishes this from the previous cases by searching for a double quotation mark (") as the first character. For example, @see "The Java Programming Language" that generates the following text:

See Also:

"The Java Programming Language"

Form 2. The @see <a href="URL#value">label</a> form adds a link as defined by URL#value. The URL#value parameter is a relative or absolute URL. The javadoc command distinguishes this from other cases by searching for a less-than symbol (<) as the first character. For example, @see <a href="spec.html#section">Java Spec</a> generates the following link:

See Also:

Java Spec

Form 3. The @see package.class#member label form adds a link with a visible text label that points to the documentation for the specified name in the Java Language that is referenced. The label is optional. If the label is omitted, then the name appears instead as visible text, suitably shortened. Use the -noqualifier option to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the autogenerated visible text. See How a Name Appears.

In Java SE 1.2 only, the name but not the label automatically appears in <code> HTML tags. Starting with Java SE 1.2.2, the <code> tag is always included around the visible text, whether or not a label is used.

  • package.class#member is any valid program element name that is referenced, such as a package, class, interface, constructor, method or field name, except that the character ahead of the member name should be a number sign (#). The class represents any top-level or nested class or interface. The member represents any constructor, method, or field (not a nested class or interface). If this name is in the documented classes, then the javadoc command create a link to it. To create links to external referenced classes, use the -link option. Use either of the other two @see tag forms to refer to the documentation of a name that does not belong to a referenced class. See Specify a Name.

    Note: External referenced classes are classes that are not passed into the javadoc command on the command line. Links in the generated documentation to external referenced classes are called external references or external links. For example, if you run the javadoc command on only the java.awt package, then any class in java.lang, such as Object, is an external referenced class. Use the -link and -linkoffline options to link to external referenced classes. The source comments of external referenced classes are not available to the javadoc command run.

  • label is optional text that is visible as the link label. The label can contain white space. If label is omitted, then package.class.member appears, suitably shortened relative to the current class and package. See How a Name Appears.

  • A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces can be used between parameters in a method.

In the following example, an @see tag (in the Character class) refers to the equals method in the String class. The tag includes both arguments: the name String#equals(Object) and the label equals.

/**
 * @see String#equals(Object) equals
 */

The standard doclet produces HTML that is similar to:

<dl>
<dt><b>See Also:</b>
<dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a>
</dl>

The previous code looks similar to the following in a browser, where the label is the visible link text:

See Also:

equals

Specify a Name

This package.class#member name can be either fully qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If the name is less than fully qualified, then the javadoc command uses the standard Java compiler search order to find it. See Search Order for the @see Tag. The name can contain white space within parentheses, such as between method arguments.The advantage to providing shorter, partially qualified names is that they are shorter to type and there is less clutter in the source code. The following listing shows the different forms of the name, where Class can be a class or interface; Type can be a class, interface, array, or primitive; and method can be a method or constructor.

Typical forms for @see package.class#member
Referencing a member of the current class
@see #field
@see #method(Type, Type,...)
@see #method(Type argname, Type argname,...)
@see #constructor(Type, Type,...)
@see #constructor(Type argname, Type argname,...)

Referencing another class in the current or imported packages
@see Class#field
@see Class#method(Type, Type,...)
@see Class#method(Type argname, Type argname,...)
@see Class#constructor(Type, Type,...)
@see Class#constructor(Type argname, Type argname,...)
@see Class.NestedClass
@see Class

Referencing an element in another package (fully qualified)
@see package.Class#field
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type argname, Type argname,...)
@see package.Class#constructor(Type, Type,...)
@see package.Class#constructor(Type argname, Type argname,...)
@see package.Class.NestedClass
@see package.Class
@see package

Notes about the previous listing:

  • The first set of forms with no class or package causes the javadoc command to search only through the current class hierarchy. It finds a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search Items 13). It does not search the rest of the current package or other packages (search Items 45). See Search Order for the @see Tag.

  • If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, then the javadoc command still creates a link to the method. If this method is overloaded, then the javadoc command links to the first method its search encounters, which is unspecified.

  • Nested classes must be specified as outer.inner, not simply inner, for all forms.

  • As stated, the number sign (#), rather than a dot (.) separates a member from its class. This enables the javadoc command to resolve ambiguities, because the dot also separates classes, nested classes, packages, and subpackages. However, the javadoc command properly parses a dot when there is no ambiguity, but prints a warning to alert you.

Search Order for the @see Tag

The javadoc command processes an @see tag that appears in a source file, package file, or overview file. In the latter two files, you must fully qualify the name you supply with the @see tag. In a source file, you can specify a name that is fully qualified or partially qualified.

The following is the search order for the @see tag.

  1. The current class or interface.

  2. Any enclosing classes and interfaces searching the closest first.

  3. Any superclasses and superinterfaces, searching the closest first.

  4. The current package.

  5. Any imported packages, classes, and interfaces, searching in the order of the import statement.

The javadoc command continues to search recursively through Items 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it searches through the superclasses of E before the enclosing classes of E. In Items 4 and 5, the javadoc command does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In Item 5, the javadoc command searches in java.lang because that is imported by all programs.

When the javadoc command encounters an @see tag in a source file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would, except the javadoc command does not detect certain name space ambiguities because it assumes the source code is free of these errors. This search order is formally defined in the Java Language Specification. The javadoc command searches for that name through all related and imported classes and packages. In particular, it searches in this order:

  1. The current class or interface.

  2. Any enclosing classes and interfaces, searching the closest first.

  3. Any superclasses and superinterfaces, searching the closest first.

  4. The current package.

  5. Any imported packages, classes, and interfaces, searching in the order of the import statements.

The javadoc command does not necessarily look in subclasses, nor will it look in other packages even when their documentation is being generated in the same run. For example, if the @see tag is in the java.awt.event.KeyEvent class and refers to a name in the java.awt package, then the javadoc command does not look in that package unless that class imports it.

How a Name Appears

If label is omitted, then package.class.member appears. In general, it is suitably shortened relative to the current class and package. Shortened means the javadoc command displays only the minimum name necessary. For example, if the String.toUpperCase() method contains references to a member of the same class and to a member of a different class, then the class name is displayed only in the latter case, as shown in the following listing. Use the -noqualifier option to globally remove the package names.

Type of reference: The @see tag refers to a member of the same class, same package
Example in: @see String#toLowerCase()
Appears as: toLowerCase() - omits the package and class names

Type of reference: The @see tag refers to a member of a different class, same package
Example in: @see Character#toLowerCase(char)
Appears as: Character.toLowerCase(char) - omits the package name, includes the class name

Type of reference: The @see tag refers to a member of a different class, different package
Example in: @see java.io.File#exists()
Appears as: java.io.File.exists() - includes the package and class names

Examples of the @see Tag

The comment to the right shows how the name appears when the @see tag is in a class in another package, such as java.applet.Applet. See @see in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@see

                                            See also:
@see java.lang.String                   //  String
@see java.lang.String The String class  //  The String class
@see String                             //  String
@see String#equals(Object)              //  String.equals(Object)
@see String#equals                      //  String.equals(java.lang.Object)
@see java.lang.Object#wait(long)        //  java.lang.Object.wait(long)
@see Character#MAX_RADIX                //  Character.MAX_RADIX
@see <a href="spec.html">Java Spec</a>  //  Java Spec
@see "The Java Programming Language"    //  "The Java Programming Language"

Note: You can extend the @see tag to link to classes not being documented with the -link option.

@serial field-description | include | exclude

Introduced in JDK 1.2

Used in the documentation comment for a default serializable field. See Documenting Serializable Fields and Data for a Class at
http://docs.oracle.com/javase/8/docs/platform/serialization/spec/serial-arch.html#5251

See also Oracle's Criteria for Including Classes in the Serialized Form Specification at
http://www.oracle.com/technetwork/java/javase/documentation/serialized-criteria-137781.html

An optional field-description should explain the meaning of the field and list the acceptable values. When needed, the description can span multiple lines. The standard doclet adds this information to the serialized form page. See Cross-Reference Pages.

If a serializable field was added to a class after the class was made serializable, then a statement should be added to its main description to identify at which version it was added.

The include and exclude arguments identify whether a class or package should be included or excluded from the serialized form page. They work as follows:

  • A public or protected class that implements Serializable is included unless that class (or its package) is marked with the @serial exclude tag.

  • A private or package-private class that implements Serializable is excluded unless that class (or its package) is marked with the @serial include tag.

For example, the javax.swing package is marked with the @serial exclude tag in package.html or package-info.java. The public class java.security.BasicPermission is marked with the @serial exclude tag. The package-private class java.util.PropertyPermissionCollection is marked with the @serial include tag.

The @serial tag at the class level overrides the @serial tag at the package level.

@serialData data-description

Introduced in JDK 1.2

Uses the data description value to document the types and order of data in the serialized form. This data includes the optional data written by the writeObject method and all data (including base classes) written by the Externalizable.writeExternal method.

The @serialData tag can be used in the documentation comment for the writeObject, readObject, writeExternal, readExternal, writeReplace, and readResolve methods.

@serialField field-name field-type field-description

Introduced in JDK 1.2

Documents an ObjectStreamField component of the serialPersistentFields member of a Serializable class. Use one @serialField tag for each ObjectStreamField component.

@since since-text

Introduced in JDK 1.1

Adds a Since heading with the specified since-text value to the generated documentation. The text has no special internal structure. This tag is valid in any documentation comment: overview, package, class, interface, constructor, method, or field. This tag means that this change or feature has existed since the software release specified by the since-text value, for example: @since 1.5.

For Java platform source code, the @since tag indicates the version of the Java platform API specification, which is not necessarily when the source code was added to the reference implementation. Multiple @since tags are allowed and are treated like multiple @author tags. You could use multiple tags when the program element is used by more than one API.

@throws class-name description

Introduced in JDK 1.2

Behaves the same as the @exception tag. See @throws in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@exception

The @throws tag adds a Throws subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that might be thrown by the method. This tag is valid only in the documentation comment for a method or constructor. If this class is not fully specified, then the javadoc command uses the search order to look up this class. Multiple @throws tags can be used in a specified documentation comment for the same or different exceptions. See Search Order for the @see Tag.

To ensure that all checked exceptions are documented, when an @throws tag does not exist for an exception in the throws clause, the javadoc command adds that exception to the HTML output (with no description) as though it were documented with the @throws tag.

The @throws documentation is copied from an overridden method to a subclass only when the exception is explicitly declared in the overridden method. The same is true for copying from an interface method to an implementing method. You can use the {@inheritDoc} tag to force the @throws tag to inherit documentation.

{@value package.class#field}

Introduced in JDK 1.4

Displays constant values. When the {@value} tag is used without an argument in the documentation comment of a static field, it displays the value of that constant:

/**
 * The value of this constant is {@value}.
 */
public static final String SCRIPT_START = "<script>"

When used with the argument package.class#field in any documentation comment, he {@value} tag displays the value of the specified constant:

/**
 * Evaluates the script starting with {@value #SCRIPT_START}.
 */
public String evalScript(String script) {}

The argument package.class#field takes a form similar to that of the @see tag argument, except that the member must be a static field.

The values of these constants are also displayed in Constant Field Values at
http://docs.oracle.com/javase/8/docs/api/constant-values.html

@version version-text

Introduced in JDK 1.0

Adds a Version subheading with the specified version-text value to the generated documents when the -version option is used. This tag is intended to hold the current release number of the software that this code is part of, as opposed to the @since tag, which holds the release number where this code was introduced. The version-text value has no special internal structure. See @version in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@version

A documentation comment can contain multiple @version tags. When it makes sense, you can specify one release number per @version tag or multiple release numbers per tag. In the former case, the javadoc command inserts a comma (,) and a space between the names. In the latter case, the entire text is copied to the generated document without being parsed. Therefore, you can use multiple names per line when you want a localized name separator other than a comma.

Where Tags Can Be Used

The following sections describe where tags can be used. Note that the following tags can be used in all documentation comments: @see, @since, @deprecated, {@link}, {@linkplain}, and {@docroot}.

Overview Tags

Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html). Similar to any other documentation comments, these tags must appear after the main description

Note: The {@link} tag has a bug in overview documents in Java SE 1.2. The text appears correctly but has no link. The {@docRoot} tag does not currently work in overview documents.

The overview tags are the following:

@see reference || @since since-text || @serialField field-name field-type field-description || @author name-text || @version version-text || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Package Tags

Package tags are tags that can appear in the documentation comment for a package, that resides in the source file named package.html or package-info.java. The @serial tag can only be used here with the include or exclude argument.

The package tags are the following:

@see reference || @since since-text || @serial field-description | include | exclude || @author name-text || @version version-text || {@linkplain package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Class and Interface Tags

The following are tags that can appear in the documentation comment for a class or interface. The @serial tag can only be used within the documentation for a class or interface with an include or exclude argument.

@see reference || @since since-text || @deprecated deprecated-text || @serial field-description | include | exclude || @author name-text || @version version-text || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Class comment example:

/**
 * A class representing a window on the screen.
 * For example:
 * <pre>
 *    Window win = new Window(parent);
 *    win.show();
 * </pre>
 *
 * @author  Sami Shaio
 * @version 1.13, 06/08/06
 * @see     java.awt.BaseWindow
 * @see     java.awt.Button
 */
class Window extends BaseWindow {
   ...
}

Field Tags

These tags can appear in fields:

@see reference || @since since-text || @deprecated deprecated-text || @serial field-description | include | exclude || @serialField field-name field-type field-description || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} || {@value package.class#field}

Field comment example:

    /**
     * The X-coordinate of the component.
     *
     * @see #getLocation()
     */
    int x = 1263732;

Constructor and Method Tags

The following tags can appear in the documentation comment for a constructor or a method, except for the @return tag, which cannot appear in a constructor, and the {@inheritDoc} tag, which has restrictions.

@see reference || @since since-text || @deprecated deprecated-text || @param parameter-name description || @return description || @throws class-name description || @exception class-name description || @serialData data-description || {@link package.class#member label} || {@linkplain package.class#member label} || {@inheritDoc} || {@docRoot}

Note: The @serialData tag can only be used in the documentation comment for the writeObject, readObject, writeExternal, readExternal, writeReplace, and readResolve methods.

Method comment example:

/**
     * Returns the character at the specified index. An index
     * ranges from <code>0</code> to <code>length() - 1</code>
     *
     * @param     index the index of the desired character.
     * @return    the desired character.
     * @exception StringIndexOutOfRangeException
     *              if the index is not in the range <code>0</code>
     *              to <code>length()-1</code>
     * @see       java.lang.Character#charValue()
     */
    public char charAt(int index) {
       ...
    }

Options

The javadoc command uses doclets to determine its output. The javadoc command uses the default standard doclet unless a custom doclet is specified with the -doclet option. The javadoc command provides a set of command-line options that can be used with any doclet. These options are described in Javadoc Options. The standard doclet provides an additional set of command-line options that are described in Standard Doclet Options. All option names are not case-sensitive, but their arguments are case-sensitive.

  • See also Javadoc Options

  • See also Standard Doclet Options

The options are:

-1.1 || -author || -bootclasspath classpathlist || -bottom text || -breakiterator || -charset name || -classpath classpathlist || -d directory || -docencoding name || -docfilesubdirs || -doclet class || -docletpath classpathlist || -doctitle title || -encoding || -exclude packagename1:packagename2:... || -excludedocfilessubdir name1:name2 || -extdirs dirist || -footer footer || -group groupheading packagepattern:packagepattern || -header header || -help || -helpfile path\filename || -Jflag || -keywords || -link extdocURL || -linkoffline extdocURL packagelistLoc || -linksource || -locale language_country_variant || -nocomment || -nodeprecated || -nodeprecatedlist || -nohelp || -noindex || -nonavbar || -noqualifier all | packagename1:packagename2... || -nosince || -notimestamp || -notree || -overview path/filename || -package || -private || -protected || -public || -quiet || -serialwarn || -source release || -sourcepath sourcepathlist || -sourcetab tablength || -splitindex || -stylesheet path/filename || -subpackages package1:package2:... || -tag tagname:Xaoptcmf:"taghead" || -taglet class || -tagletpath tagletpathlist || -title title || -top || -use || -verbose || -version || -windowtitle title

The following options are the core Javadoc options that are available to all doclets. The standard doclet provides the rest of the doclets: -bootclasspath, -breakiterator, -classpath, -doclet, -docletpath, -encoding, -exclude, -extdirs, -help, -locale, -overview, -package, -private, -protected, -public, -quiet, -source, -sourcepath, -subpackages, and -verbose.

Javadoc Options

-overview path/filename

Specifies that the javadoc command should retrieve the text for the overview documentation from the source file specified by the path/filename and place it on the Overview page (overview-summary.html). The path/filename is relative to the current directory.

While you can use any name you want for the filename value and place it anywhere you want for the path, it is typical to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, because the -sourcepath option points to this file.

For example, if the source tree for the java.lang package is /src/classes/java/lang/, then you could place the overview file at /src/classes/overview.html

See Real-World Examples.

For information about the file specified by path/filename, see Overview Comment Files.

The overview page is created only when you pass two or more package names to the javadoc command. For a further explanation, see HTML Frames. The title on the overview page is set by -doctitle.

-Xdoclint:(all|none|[-]<group>)

Reports warnings for bad references, lack of accessibility and missing Javadoc comments, and reports errors for invalid Javadoc syntax and missing HTML tags.

This option enables the javadoc command to check for all documentation comments included in the generated output. As always, you can select which items to include in the generated output with the standard options -public, -protected, -package and -private.

When the -Xdoclint is enabled, it reports issues with messages similar to the javac command. The javadoc command prints a message, a copy of the source line, and a caret pointing at the exact position where the error was detected. Messages may be either warnings or errors, depending on their severity and the likelihood to cause an error if the generated documentation were run through a validator. For example, bad references or missing Javadoc comments do not cause the javadoc command to generate invalid HTML, so these issues are reported as warnings. Syntax errors or missing HTML end tags cause the javadoc command to generate invalid output, so these issues are reported as errors.

By default, the -Xdoclint option is enabled. Disable it with the option -Xdoclint:none.

Change what the -Xdoclint option reports with the following options:

  • -Xdoclint
    none     : disable the -Xdoclint option

  • -Xdoclint
    group : enable group checks

  • -Xdoclint
    all     : enable all groups of checks

  • -Xdoclint
    all,    -group : enable all except group checks

The variable group has one of the following values:

  • accessibility : Checks for the issues to be detected by an accessibility checker (for example, no caption or summary attributes specified in a <table> tag).

  • html : Detects high-level HTML issues, like putting block elements inside inline elements, or not closing elements that require an end tag. The rules are derived from the HTML 4.01 Specification. This type of check enables the javadoc command to detect HTML issues that many browsers might accept.

  • missing : Checks for missing Javadoc comments or tags (for example, a missing comment or class, or a missing @return tag or similar tag on a method).

  • reference : Checks for issues relating to the references to Java API elements from Javadoc tags (for example, item not found in @see , or a bad name after @param).

  • syntax : Checks for low level issues like unescaped angle brackets (< and >) and ampersands (&) and invalid Javadoc tags.

You can specify the -Xdoclint option multiple times to enable the option to check errors and warnings in multiple categories. Alternatively, you can specify multiple error and warning categories by using the preceding options. For example, use either of the following commands to check for the HTML, syntax, and accessibility issues in the file filename.

javadoc -Xdoclint:html -Xdoclint:syntax -Xdoclint:accessibility filename
javadoc -Xdoclint:html,syntax,accessibility filename

Note: The javadoc command does not guarantee the completeness of these checks. In particular, it is not a full HTML compliance checker. The goal of the -Xdoclint option is to enable the javadoc command to report majority of common errors.

The javadoc command does not attempt to fix invalid input, it just reports it.

-public

Shows only public classes and members.

-protected

Shows only protected and public classes and members. This is the default.

-package

Shows only package, protected, and public classes and members.

-private

Shows all classes and members.

-help

Displays the online help, which lists all of the javadoc and doclet command-line options.

-doclet class

Specifies the class file that starts the doclet used in generating the documentation. Use the fully qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, then the javadoc command uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

-docletpath classpathlist

Specifies the path to the doclet starting class file (specified with the -doclet option) and any JAR files it depends on. If the starting class file is in a JAR file, then this option specifies the path to that JAR file. You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or JAR files, then they should be separated with a colon (:) on Oracle Solaris and a semi-colon (;) on Windows. This option is not necessary when the doclet starting class is already in the search path. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

-1.1

Removed from Javadoc 1.4 with no replacement. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, then use Javadoc 1.2 or 1.3 instead.

-source release

Specifies the release of source code accepted. The following values for the release parameter are allowed. Use the value of release that corresponds to the value used when you compile code with the javac command.

  • Release Value: 1.5. The javadoc command accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior when the -source option is not used.

  • Release Value: 1.4. The javadoc command accepts code containing assertions, which were introduced in JDK 1.4.

  • Release Value: 1.3. The javadoc command does not support assertions, generics, or other language features introduced after JDK 1.3.

-sourcepath sourcepathlist

Specifies the search paths for finding source files when passing package names or the -subpackages option into the javadoc command. Separate multiple paths with a colon (:). The javadoc command searches all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented, but whose comments are inherited by the source files being documented.

You can use the -sourcepath option only when passing package names into the javadoc command. This will not locate source files passed into the javadoc command. To locate source files, change to that directory or include the path ahead of each file, as shown at Document One or More Classes. If you omit -sourcepath, then the javadoc command uses the class path to find the source files (see -classpath). The default -sourcepath is the value of class path. If -classpath is omitted and you pass package names into the javadoc command, then the javadoc command searches in the current directory and subdirectories for the source files.

Set sourcepathlist to the root directory of the source tree for the package you are documenting.

For example, suppose you want to document a package called com.mypackage, whose source files are located at:/home/user/src/com/mypackage/*.java. Specify the sourcepath to /home/user/src, the directory that contains com\mypackage, and then supply the package name, as follows:

javadoc -sourcepath /home/user/src/ com.mypackage

Notice that if you concatenate the value of sourcepath and the package name together and change the dot to a slash (/), then you have the full path to the package:

/home/user/src/com/mypackage

To point to two source paths:

javadoc -sourcepath /home/user1/src:/home/user2/src com.mypackage
-classpath classpathlist

Specifies the paths where the javadoc command searches for referenced classes These are the documented classes plus any classes referenced by those classes. Separate multiple paths with a colon (:). The javadoc command searches all subdirectories of the specified paths. Follow the instructions in the class path documentation for specifying the classpathlist value.

If you omit -sourcepath, then the javadoc command uses -classpath to find the source files and class files (for backward compatibility). If you want to search for source and class files in separate paths, then use both -sourcepath and -classpath.

For example, if you want to document com.mypackage, whose source files reside in the directory /home/user/src/com/mypackage, and if this package relies on a library in /home/user/lib, then you would use the following command:

javadoc -sourcepath /home/user/lib -classpath /home/user/src com.mypackage

Similar to other tools, if you do not specify -classpath, then the javadoc command uses the CLASSPATH environment variable when it is set. If both are not set, then the javadoc command searches for classes from the current directory.

For an in-depth description of how the javadoc command uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

A class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR.

For example, if directory mydir contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of JAR files is unspecified. All JAR files in the specified directory including hidden files are included in the list. A class path entry that consists of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable is similarly expanded. Any class path wildcard expansion occurs before the Java Virtual Machine (JVM) starts. No Java program ever sees unexpanded wild cards except by querying the environment, for example, by calling System.getenv("CLASSPATH").

-subpackages package1:package2:...

Generates documentation from source files in the specified packages and recursively in their subpackages. This option is useful when adding new subpackages to the source code because they are automatically included. Each package argument is any top-level subpackage (such as java) or fully qualified package (such as javax.swing) that does not need to contain source files. Arguments are separated by colons on all operating systems. Wild cards are not allowed. Use -sourcepath to specify where to find the packages. This option does not process source files that are in the source tree but do not belong to the packages. See Process Source Files.

For example, the following command generates documentation for packages named java and javax.swing and all of their subpackages.

javadoc -d docs -sourcepath /home/user/src  -subpackages java:javax.swing
-exclude packagename1:packagename2:...

Unconditionally excludes the specified packages and their subpackages from the list formed by -subpackages. It excludes those packages even when they would otherwise be included by some earlier or later -subpackages option.

The following example would include java.io, java.util, and java.math (among others), but would exclude packages rooted at java.net and java.lang. Notice that this example excludes java.lang.ref, which is a subpackage of java.lang.

javadoc -sourcepath /home/user/src -subpackages java -exclude
    java.net:java.lang
-bootclasspath classpathlist

Specifies the paths where the boot classes reside. These are typically the Java platform classes. The bootclasspath is part of the search path the javadoc command uses to look up source and class files. For more information, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Separate directories in the classpathlist parameters with semicolons (;) for Windows and colons (:) for Oracle Solaris.

-extdirs dirist

Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs option is part of the search path the javadoc command uses to look up source and class files. See the -classpath option for more information. Separate directories in dirlist with semicolons (;) for Windows and colons (:) for Oracle Solaris.

-verbose

Provides more detailed messages while the javadoc command runs. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages that specify the number of milliseconds to parse each Java source file.

-quiet

Shuts off messages so that only the warnings and errors appear to make them easier to view. It also suppresses the version string.

-breakiterator

Uses the internationalized sentence boundary of java.text.BreakIterator to determine the end of the first sentence in the main description of a package, class, or member for English. All other locales already use the BreakIterator class, rather than an English language, locale-specific algorithm. The first sentence is copied to the package, class, or member summary and to the alphabetic index. From JDK 1.2 and later, the BreakIterator class is used to determine the end of a sentence for all languages except for English. Therefore, the -breakiterator option has no effect except for English from 1.2 and later. English has its own default algorithm:

  • English default sentence-break algorithm. Stops at a period followed by a space or an HTML block tag, such as <P>.

  • Breakiterator sentence-break algorithm. Stops at a period, question mark, or exclamation point followed by a space when the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but will not handle "Mr. Smith"). The -breakiterator option does not stop at HTML tags or sentences that begin with numbers or symbols. The algorithm stops at the last period in ../filename, even when embedded in an HTML tag.

In Java SE 1.5 the -breakiterator option warning messages are removed, and the default sentence-break algorithm is unchanged. If you have not modified your source code to eliminate the -breakiterator option warnings in Java SE 1.4.x, then you do not have to do anything. The warnings go away starting with Java SE 1.5.0.

-locale language_country_variant

Specifies the locale that the javadoc command uses when it generates documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

Note: The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars appear in English. This is the only command-line option that depends on order. See Standard Doclet Options.

Specifying a locale causes the javadoc command to choose the resource files of that locale for messages such as strings in the navigation bar, headings for lists and tables, help file contents, comments in the stylesheet.css file, and so on. It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. The -locale option does not determine the locale of the documentation comment text specified in the source files of the documented classes.

-encoding

Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, then the platform default converter is used. See also the -docencoding name and -charset name options.

-Jflag

Passes flag directly to the Java Runtime Environment (JRE) that runs the javadoc command. For example, if you must ensure that the system sets aside 32 MB of memory in which to process the generated documentation, then you would call the -Xmx option as follows: javadoc -J-Xmx32m -J-Xms32m com.mypackage. Be aware that -Xms is optional because it only sets the size of initial memory, which is useful when you know the minimum amount of memory required.

There is no space between the J and the flag.

Use the -version option to find out what version of the javadoc command you are using. The version number of the standard doclet appears in its output stream. See Running the Javadoc Command.

javadoc -J-version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

Standard Doclet Options

-d directory

Specifies the destination directory where the javadoc command saves the generated HTML files. If you omit the -d option, then the files are saved to the current directory. The directory value can be absolute or relative to the current working directory. As of Java SE 1.4, the destination directory is automatically created when the javadoc command runs.

For example, the following command generates the documentation for the package com.mypackage and saves the results in the /user/doc/ directory: javadoc -d /user/doc/ com.mypackage.

-use

Includes one Use page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the specified class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C. For example, you can look at the Use page for the String type. Because the getName method in the java.awt.Font class returns type String, the getName method uses String and so the getName method appears on the Use page for String.This documents only uses of the API, not the implementation. When a method uses String in its implementation, but does not take a string as an argument or return a string, that is not considered a use of String.To access the generated Use page, go to the class or package and click the Use link in the navigation bar.

-version

Includes the @version text in the generated docs. This text is omitted by default. To find out what version of the javadoc command you are using, use the -J-version option.

-author

Includes the @author text in the generated docs.

-splitindex

Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical symbols.

-windowtitle title

Specifies the title to be placed in the HTML <title> tag. The text specified in the title tag appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags because the browser does not interpret them correctly. Use escape characters on any internal quotation marks within the title tag. If the -windowtitle option is omitted, then the javadoc command uses the value of the -doctitle option for the -windowtitle option. For example, javadoc -windowtitle "Java SE Platform" com.mypackage.

-doctitle title

Specifies the title to place near the top of the overview summary file. The text specified in the title tag is placed as a centered, level-one heading directly beneath the top navigation bar. The title tag can contain HTML tags and white space, but when it does, you must enclose the title in quotation marks. Internal quotation marks within the title tag must be escaped. For example, javadoc -header "<b>Java Platform </b><br>v1.4" com.mypackage.

-title title

No longer exists. It existed only in Beta releases of Javadoc 1.2. It was renamed to -doctitle. This option was renamed to make it clear that it defines the document title, rather than the window title.

-header header

Specifies the header text to be placed at the top of each output file. The header is placed to the right of the upper navigation bar. The header can contain HTML tags and white space, but when it does, the header must be enclosed in quotation marks. Use escape characters for internal quotation marks within a header. For example, javadoc -header "<b>Java Platform </b><br>v1.4" com.mypackage.

-footer footer

Specifies the footer text to be placed at the bottom of each output file. The footer value is placed to the right of the lower navigation bar. The footer value can contain HTML tags and white space, but when it does, the footer value must be enclosed in quotation marks. Use escape characters for any internal quotation marks within a footer.

-top

Specifies the text to be placed at the top of each output file.

-bottom text

Specifies the text to be placed at the bottom of each output file. The text is placed at the bottom of the page, underneath the lower navigation bar. The text can contain HTML tags and white space, but when it does, the text must be enclosed in quotation marks. Use escape characters for any internal quotation marks within text.

-link extdocURL

Creates links to existing Javadoc-generated documentation of externally referenced classes. The extdocURL argument is the absolute or relative URL of the directory that contains the external Javadoc-generated documentation you want to link to. You can specify multiple -link options in a specified javadoc command run to link to multiple documents.

The package-list file must be found in this directory (otherwise, use the -linkoffline option). The javadoc command reads the package names from the package-list file and links to those packages at that URL. When the javadoc command runs, the extdocURL value is copied into the <A HREF> links that are created. Therefore, extdocURL must be the URL to the directory, and not to a file. You can use an absolute link for extdocURL to enable your documents to link to a document on any web site, or you can use a relative link to link only to a relative location. If you use a relative link, then the value you pass in should be the relative path from the destination directory (specified with the -d option) to the directory containing the packages being linked to.When you specify an absolute link, you usually use an HTTP link. However, if you want to link to a file system that has no web server, then you can use a file link. Use a file link only when everyone who wants to access the generated documentation shares the same file system.In all cases, and on all operating systems, use a slash as the separator, whether the URL is absolute or relative, and http: or file: as specified in the URL Memo: Uniform Resource Locators at
http://www.ietf.org/rfc/rfc1738.txt

-link  http://<host>/<directory>/<directory>/.../<name>
-link file://<host>/<directory>/<directory>/.../<name>
-link <directory>/<directory>/.../<name>

Differences between the -linkoffline and -link options

Use the -link option in the following cases:

  • When you use a relative path to the external API document.

  • When you use an absolute URL to the external API document if your shell lets you open a connection to that URL for reading.

Use the -linkoffline option when you use an absolute URL to the external API document, if your shell does not allow a program to open a connection to that URL for reading. This can occur when you are behind a firewall and the document you want to link to is on the other side.

Example 1Absolute Link to External Documents

Use the following command if you want to link to the java.lang, java.io and other Java platform packages, shown at
http://docs.oracle.com/javase/8/docs/api/index.html

javadoc -link http://docs.oracle.com/javase/8/docs/api/ com.mypackage

The command generates documentation for the package com.mypackage with links to the Java SE packages. The generated documentation contains links to the Object class, for example, in the class trees. Other options, such as the -sourcepath and -d options, are not shown.

Example 2Relative Link to External Documents

In this example, there are two packages with documents that are generated in different runs of the javadoc command, and those documents are separated by a relative path. The packages are com.apipackage, an API, and com.spipackage, an Service Provide Interface (SPI). You want the documentation to reside in docs/api/com/apipackage and docs/spi/com/spipackage. Assuming that the API package documentation is already generated, and that docs is the current directory, you document the SPI package with links to the API documentation by running: javadoc -d ./spi -link ../api com.spipackage.

Notice the -link option is relative to the destination directory (docs/spi).

Notes

The -link option lets you link to classes referenced to by your code, but not documented in the current javadoc command run. For these links to go to valid pages, you must know where those HTML pages are located and specify that location with extdocURL. This allows third-party documentation to link to java.* documentation at
http://docs.oracle.com.Omit the -link option when you want the javadoc command to create links only to APIs within the documentation it is generating in the current run. Without the -link option, the javadoc command does not create links to documentation for external references because it does not know whether or where that documentation exists.The -link option can create links in several places in the generated documentation. See Process Source Files. Another use is for cross-links between sets of packages: Execute the javadoc command on one set of packages, then run the javadoc command again on another set of packages, creating links both ways between both sets.

How to Reference a Class

For a link to an externally referenced class to appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an import statement or in a declaration. Here are examples of how the class java.io.File can be referenced:

In any kind of import statement. By wildcard import, import explicitly by name, or automatically import for java.lang.*.

In Java SE 1.3.n and 1.2.n, only an explicit import by name works. A wildcard import statement does not work, nor does the automatic import java.lang.*.

In a declaration: void mymethod(File f) {}

The reference can be in the return type or parameter type of a method, constructor, field, class, or interface, or in an implements, extends, or throws statement.

An important corollary is that when you use the -link option, there can be many links that unintentionally do not appear due to this constraint. The text would appear without being a link. You can detect these by the warnings they emit. The simplest way to properly reference a class and add the link would be to import that class.

Package List

The -link option requires that a file named package-list, which is generated by the javadoc command, exists at the URL you specify with the -link option. The package-list file is a simple text file that lists the names of packages documented at that location. In the earlier example, the javadoc command searches for a file named package-list at the specified URL, reads in the package names, and links to those packages at that URL.

For example, the package list for the Java SE API is located at
http://docs.oracle.com/javase/8/docs/api/package-list

The package list starts as follows:

java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
and so on ....

When javadoc is run without the -link option and encounters a name that belongs to an externally referenced class, it prints the name with no link. However, when the -link option is used, the javadoc command searches the package-list file at the specified extdocURL location for that package name. When it finds the package name, it prefixes the name with extdocURL.

For there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The javadoc command does not check that these pages exist, but only that the package-list exists.

Multiple Links

You can supply multiple -link options to link to any number of externally generated documents. Javadoc 1.2 has a known bug that prevents you from supplying more than one -link options. This was fixed in Javadoc 1.2.2. Specify a different link option for each external document to link to javadoc -link extdocURL1 -link extdocURL2 ... -link extdocURLn com.mypackage where extdocURL1, extdocURL2, ... extdocURLn point respectively to the roots of external documents, each of which contains a file named package-list.

Cross Links

Note that bootstrapping might be required when cross-linking two or more documents that were previously generated. If package-list does not exist for either document when you run the javadoc command on the first document, then the package-list does not yet exist for the second document. Therefore, to create the external links, you must regenerate the first document after you generate the second document.

In this case, the purpose of first generating a document is to create its package-list (or you can create it by hand if you are certain of the package names). Then, generate the second document with its external links. The javadoc command prints a warning when a needed external package-list file does not exist.

-linkoffline extdocURL packagelistLoc

This option is a variation of the -link option. They both create links to Javadoc-generated documentation for externally referenced classes. Use the -linkoffline option when linking to a document on the web when the javadoc command cannot access the document through a web connection. Use the -linkoffline option when package-list file of the external document is not accessible or does not exist at the extdocURL location, but does exist at a different location that can be specified by packageListLoc (typically local). If extdocURL is accessible only on the World Wide Web, then the -linkoffline option removes the constraint that the javadoc command must have a web connection to generate documentation. Another use is as a work-around to update documents: After you have run the javadoc command on a full set of packages, you can run the javadoc command again on a smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples follow. The -linkoffline option takes two arguments. The first is for the string to be embedded in the <a href> links, and the second tells the -linkoffline option where to find package-list:

  • The extdocURL value is the absolute or relative URL of the directory that contains the external Javadoc-generated documentation you want to link to. When relative, the value should be the relative path from the destination directory (specified with the -d option) to the root of the packages being linked to. For more information, see extdocURL in the -link option.

  • The packagelistLoc value is the path or URL to the directory that contains the package-list file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. When relative, make it relative to the current directory from where the javadoc command was run. Do not include the package-list file name.

    You can specify multiple -linkoffline options in a specified javadoc command run. Before Javadoc 1.2.2, the -linkfile options could be specified once.

Absolute Links to External Documents

You might have a situation where you want to link to the java.lang, java.io and other Java SE packages at
http://docs.oracle.com/javase/8/docs/api/index.html

However, your shell does not have web access. In this case, do the following:

  1. Open the package-list file in a browser at http://docs.oracle.com/javase/8/docs/api/package-list

  2. Save the file to a local directory, and point to this local copy with the second argument, packagelistLoc. In this example, the package list file was saved to the current directory (.).

The following command generates documentation for the package com.mypackage with links to the Java SE packages. The generated documentation will contain links to the Object class, for example, in the class trees. Other necessary options, such as -sourcepath, are not shown.

javadoc -linkoffline http://docs.oracle.com/javase/8/docs/api/ .  com.mypackage

Relative Links to External Documents

It is not very common to use -linkoffline with relative paths, for the simple reason that the -link option is usually enough. When you use the -linkoffline option, the package-list file is usually local, and when you use relative links, the file you are linking to is also local, so it is usually unnecessary to give a different path for the two arguments to the -linkoffline option When the two arguments are identical, you can use the -link option.

Create a package-list File Manually

If a package-list file does not exist yet, but you know what package names your document will link to, then you can manually create your own copy of this file and specify its path with packagelistLoc. An example would be the previous case where the package list for com.spipackage did not exist when com.apipackage was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating package-list files for packages generated with Javadoc 1.0 or 1.1, where package-list files were not generated. Similarly, two companies can share their unpublished package-list files so they can release their cross-linked documentation simultaneously.

Link to Multiple Documents

You can include the -linkoffline option once for each generated document you want to refer to:

javadoc -linkoffline extdocURL1 packagelistLoc1 -linkoffline extdocURL2
packagelistLoc2 ...

Update Documents

You can also use the -linkoffline option when your project has dozens or hundreds of packages. If you have already run the javadoc command on the entire source tree, then you can quickly make small changes to documentation comments and rerun the javadoc command on a portion of the source tree. Be aware that the second run works properly only when your changes are to documentation comments and not to declarations. If you were to add, remove, or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, Use page, and other places.

First, create a new destination directory, such as update, for this new small run. In this example, the original destination directory is named html. In the simplest example, change directory to the parent of html. Set the first argument of the -linkoffline option to the current directory (.) and set the second argument to the relative path to html, where it can find package-list and pass in only the package names of the packages you want to update:

javadoc -d update -linkoffline . html com.mypackage

When the javadoc command completes, copy these generated class pages in update/com/package (not the overview or index) to the original files in html/com/package.

-linksource

Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation. Links are created for classes, interfaces, constructors, methods, and fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes.

This option exposes all private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, regardless of the -public, -package, -protected, and -private options. Unless you also use the -private option, not all private classes or interfaces are accessible through links.

Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the Button class would be on the word Button:

public class Button extends Component implements Accessible

The link to the source code of the getLabel method in the Button class is on the word getLabel:

public String getLabel()
-group groupheading packagepattern:packagepattern

Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different -group option. The groups appear on the page in the order specified on the command line. Packages are alphabetized within a group. For a specified -group option, the packages matching the list of packagepattern expressions appear in a table with the heading groupheading.

  • The groupheading can be any text and can include white space. This text is placed in the table heading for the group.

  • The packagepattern value can be any package name at the start of any package name followed by an asterisk (*). The asterisk is the only wildcard allowed and means match any characters. Multiple patterns can be included in a group by separating them with colons (:). If you use an asterisk in a pattern or pattern list, then the pattern list must be inside quotation marks, such as "java.lang*:java.util".

When you do not supply a -group option, all packages are placed in one group with the heading Packages and appropriate subheadings. If the subheadings do not include all documented packages (all groups), then the remaining packages appear in a separate group with the subheading Other Packages.

For example, the following javadoc command separates the three documented packages into Core, Extension, and Other Packages. The trailing dot (.) does not appear in java.lang*. Including the dot, such as java.lang.* omits the java.lang package.

javadoc -group "Core Packages" "java.lang*:java.util"
        -group "Extension Packages" "javax.*"
        java.lang java.lang.reflect java.util javax.servlet java.new

Core Packages

java.lang

java.lang.reflect

java.util

Extension Packages

javax.servlet

Other Packages

java.new

-nodeprecated

Prevents the generation of any deprecated API in the documentation. This does what the -nodeprecatedlist option does, and it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code when you do not want to be distracted by the deprecated code.

-nodeprecatedlist

Prevents the generation of the file that contains the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page. The javadoc command continues to generate the deprecated API throughout the rest of the document. This is useful when your source code contains no deprecated APIs, and you want to make the navigation bar cleaner.

-nosince

Omits from the generated documents the Since sections associated with the @since tags.

-notree

Omits the class/interface hierarchy pages from the generated documents. These are the pages you reach using the Tree button in the navigation bar. The hierarchy is produced by default.

-noindex

Omits the index from the generated documents. The index is produced by default.

-nohelp

Omits the HELP link in the navigation bars at the top and bottom of each page of output.

-nonavbar

Prevents the generation of the navigation bar, header, and footer, that are usually found at the top and bottom of the generated pages. The -nonavbar option has no affect on the -bottom option. The -nonavbar option is useful when you are interested only in the content and have no need for navigation, such as when you are converting the files to PostScript or PDF for printing only.

-helpfile path\filename

Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to. Without this option, the javadoc command creates a help file help-doc.html that is hard-coded in the javadoc command. This option lets you override the default. The file name can be any name and is not restricted to help-doc.html. The javadoc command adjusts the links in the navigation bar accordingly, for example:

javadoc -helpfile /home/user/myhelp.html java.awt.
-stylesheet path/filename

Specifies the path of an alternate HTML stylesheet file. Without this option, the javadoc command automatically creates a stylesheet file stylesheet.css that is hard-coded in the javadoc command. This option lets you override the default. The file name can be any name and is not restricted to stylesheet.css, for example:

javadoc -stylesheet file /home/user/mystylesheet.css com.mypackage
-serialwarn

Generates compile-time warnings for missing @serial tags. By default, Javadoc 1.2.2 and later versions generate no serial warnings. This is a reversal from earlier releases. Use this option to display the serial warnings, which helps to properly document default serializable fields and writeExternal methods.

-charset name

Specifies the HTML character set for this document. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at
http://www.iana.org/assignments/character-sets

For example, javadoc -charset "iso-8859-1" mypackage inserts the following line in the head of every generated page:

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

This META tag is described in the HTML standard (4197265 and 4137321), HTML Document Representation, at
http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

See also the -encoding and -docencoding name options.

-docencoding name

Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at
http://www.iana.org/assignments/character-sets

If you omit the -docencoding option but use the -encoding option, then the encoding of the generated HTML files is determined by the -encoding option, for example: javadoc -docencoding "iso-8859-1" mypackage. See also the -encoding and -docencoding name options.

-keywords

Adds HTML keyword <META> tags to the generated file for each class. These tags can help search engines that look for <META> tags find the pages. Most search engines that search the entire Internet do not look at <META> tags, because pages can misuse them. Search engines offered by companies that confine their searches to their own website can benefit by looking at <META> tags. The <META> tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords:

<META NAME="keywords" CONTENT="java.lang.String class">
<META NAME="keywords" CONTENT="CASE_INSENSITIVE_ORDER">
<META NAME="keywords" CONTENT="length()">
<META NAME="keywords" CONTENT="charAt()">
-tag tagname:Xaoptcmf:"taghead"

Enables the javadoc command to interpret a simple, one-argument @tagname custom block tag in documentation comments. For the javadoc command to spell-check tag names, it is important to include a -tag option for every custom tag that is present in the source code, disabling (with X) those that are not being output in the current run.The colon (:) is always the separator. The -tag option outputs the tag heading taghead in bold, followed on the next line by the text from its single argument. Similar to any block tag, the argument text can contain inline tags, which are also interpreted. The output is similar to standard one-argument tags, such as the @return and @author tags. Omitting a value for taghead causes tagname to be the heading.

Placement of tags: The Xaoptcmf arguments determine where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using X). You can supply either a, to allow the tag in all places, or any combination of the other letters:

X (disable tag)

a (all)

o (overview)

p (packages)

t (types, that is classes and interfaces)

c (constructors)

m (methods)

f (fields)

Examples of single tags: An example of a tag option for a tag that can be used anywhere in the source code is: -tag todo:a:"To Do:".

If you want the @todo tag to be used only with constructors, methods, and fields, then you use: -tag todo:cmf:"To Do:".

Notice the last colon (:) is not a parameter separator, but is part of the heading text. You would use either tag option for source code that contains the @todo tag, such as: @todo The documentation for this method needs work.

Colons in tag names: Use a backslash to escape a colon that you want to use in a tag name. Use the -tag ejb\\:bean:a:"EJB Bean:" option for the following documentation comment:

/**
 * @ejb:bean
 */

Spell-checking tag names: Some developers put custom tags in the source code that they do not always want to output. In these cases, it is important to list all tags that are in the source code, enabling the ones you want to output and disabling the ones you do not want to output. The presence of X disables the tag, while its absence enables the tag. This gives the javadoc command enough information to know whether a tag it encounters is unknown, which is probably the results of a typographical error or a misspelling. The javadoc command prints a warning in these cases. You can add X to the placement values already present, so that when you want to enable the tag, you can simply delete the X. For example, if the @todo tag is a tag that you want to suppress on output, then you would use: -tag todo:Xcmf:"To Do:". If you would rather keep it simple, then use this: -tag todo:X. The syntax -tag todo:X works even when the @todo tag is defined by a taglet.

Order of tags: The order of the -tag and -taglet options determines the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order. They take only the standard tag's name. Subheadings for standard tags cannot be altered. This is illustrated in the following example.If the -tag option is missing, then the position of the -taglet option determines its order. If they are both present, then whichever appears last on the command line determines its order. This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if the -taglet and -tag options have the name todo value, then the one that appears last on the command line determines the order.

Example of a complete set of tags: This example inserts To Do after Parameters and before Throws in the output. By using X, it also specifies that the @example tag might be encountered in the source code that should not be output during this run. If you use the @argfile tag, then you can put the tags on separate lines in an argument file similar to this (no line continuation characters needed):

-tag param
-tag return
-tag todo:a:"To Do:"
-tag throws
-tag see
-tag example:X

When the javadoc command parses the documentation comments, any tag encountered that is neither a standard tag nor passed in with the -tag or -taglet options is considered unknown, and a warning is thrown.

The standard tags are initially stored internally in a list in their default order. Whenever the -tag options are used, those tags get appended to this list. Standard tags are moved from their default position. Therefore, if a -tag option is omitted for a standard tag, then it remains in its default position.

Avoiding conflicts: If you want to create your own namespace, then you can use a dot-separated naming convention similar to that used for packages: com.mycompany.todo. Oracle will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Oracle. If you create a @todo tag or taglet, then it always has the same behavior you define, even when Oracle later creates a standard tag of the same name.

Annotations vs. Javadoc tags: In general, if the markup you want to add is intended to affect or produce documentation, then it should be a Javadoc tag. Otherwise, it should be an annotation. See Custom Tags and Annotations in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#annotations

You can also create more complex block tags or custom inline tags with the -taglet option.

-taglet class

Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully qualified name for the class value. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see: Taglet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/taglet/overview.html

Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. A taglet cannot do things such as remove a class name from the list of included classes. However, it can execute side effects, such as printing the tag's text to a file or triggering another process. Use the -tagletpath option to specify the path to the taglet. The following example inserts the To Do taglet after Parameters and ahead of Throws in the generated pages. Alternately, you can use the -taglet option in place of its -tag option, but that might be difficult to read.

-taglet com.sun.tools.doclets.ToDoTaglet
-tagletpath /home/taglets
-tag return
-tag param
-tag todo
-tag throws
-tag see
-tagletpath tagletpathlist

Specifies the search paths for finding taglet class files. The tagletpathlist can contain multiple paths by separating them with a colon (:). The javadoc command searches all subdirectories of the specified paths.

-docfilesubdirs

Enables deep copying of doc-files directories. Subdirectories and all contents are recursively copied to the destination. For example, the directory doc-files/example/images and all of its contents would be copied. There is also an option to exclude subdirectories.

-excludedocfilessubdir name1:name2

Excludes any doc-files subdirectories with the specified names. This prevents the copying of SCCS and other source-code-control subdirectories.

-noqualifier all | packagename1:packagename2...

Omits qualifying package names from class names in output. The argument to the -noqualifier option is either all (all package qualifiers are omitted) or a colon-separate list of packages, with wild cards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. See Process Source Files.

The following example omits all package qualifiers: -noqualifier all.

The following example omits java.lang and java.io package qualifiers: -noqualifier java.lang:java.io.

The following example omits package qualifiers starting with java, and com.sun subpackages, but not javax: -noqualifier java.*:com.sun.*.

Where a package qualifier would appear due to the previous behavior, the name can be suitably shortened. See How a Name Appears. This rule is in effect whether or not the -noqualifier option is used.

-notimestamp

Suppresses the time stamp, which is hidden in an HTML comment in the generated HTML near the top of each page. The -notimestamp option is useful when you want to run the javadoc command on two source bases and get the differences between diff them, because it prevents time stamps from causing a diff (which would otherwise be a diff on every page). The time stamp includes the javadoc command release number, and currently appears similar to this: <!-- Generated by javadoc (build 1.5.0_01) on Thu Apr 02 14:04:52 IST 2009 -->.

-nocomment

Suppresses the entire comment body, including the main description and all tags, and generate only declarations. This option lets you reuse source files that were originally intended for a different purpose so that you can produce skeleton HTML documentation at the early stages of a new project.

-sourcetab tablength

Specifies the number of spaces each tab uses in the source.

Command-Line Argument Files

To shorten or simplify the javadoc command, you can specify one or more files that contain arguments to the javadoc command (except -J options). This enables you to create javadoc commands of any length on any operating system.

An argument file can include javac options and source file names in any combination. The arguments within a file can be space-separated or newline-separated. If a file name contains embedded spaces, then put the whole file name in double quotation marks.

File Names within an argument file are relative to the current directory, not the location of the argument file. Wild cards (*) are not allowed in these lists (such as for specifying *.java). Using the at sign (@) to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.

When you run the javadoc command, pass in the path and name of each argument file with the @ leading character. When the javadoc command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list.

Example 1Single Argument File

You could use a single argument file named argfile to hold all javadoc command arguments: javadoc @argfile. The argument file contains the contents of both files, as shown in the next example.

Example 2Two Argument Files

You can create two argument files: One for the javadoc command options and the other for the package names or source file names. Notice the following lists have no line-continuation characters.

Create a file named options that contains:

-d docs-filelist
-use
-splitindex
-windowtitle 'Java SE 7 API Specification'
-doctitle 'Java SE 7 API Specification'
-header '<b>Java SE 7</b>'
-bottom 'Copyright &copy; 1993-2011 Oracle and/or its affiliates. All rights reserved.'
-group "Core Packages" "java.*"
-overview /java/pubs/ws/1.7.0/src/share/classes/overview-core.html
-sourcepath /java/pubs/ws/1.7.0/src/share/classes

Create a file named packages that contains:

com.mypackage1
com.mypackage2
com.mypackage3

Run the javadoc command as follows:

javadoc @options @packages
Example 3Argument Files with Paths

The argument files can have paths, but any file names inside the files are relative to the current working directory (not path1 or path2):

javadoc @path1/options @path2/packages
Example 4Option Arguments

The following example saves an argument to a javadoc command option in an argument file. The -bottom option is used because it can have a lengthy argument. You could create a file named bottom to contain the text argument:

<font size="-1">
    <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
    Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved. <br/>
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
    Other names may be trademarks of their respective owners.</font>

Run the javadoc command as follows: javadoc -bottom @bottom @packages.

You can also include the -bottom option at the start of the argument file and run the javadoc command as follows: javadoc @bottom @packages.

Running the Javadoc Command

The release number of the javadoc command can be determined with the javadoc -J-version option. The release number of the standard doclet appears in the output stream. It can be turned off with the -quiet option.

Use the public programmatic interface to call the javadoc command from within programs written in the Java language. This interface is in com.sun.tools.javadoc.Main (and the javadoc command is reentrant). For more information, see The Standard Doclet at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/standard-doclet.html#runningprogrammatically

The following instructions call the standard HTML doclet. To call a custom doclet, use the -doclet and -docletpath options. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

Simple Examples

You can run the javadoc command on entire packages or individual source files. Each package name has a corresponding directory name.

In the following examples, the source files are located at /home/src/java/awt/*.java. The destination directory is /home/html.

Document One or More Packages

To document a package, the source files for that package must be located in a directory that has the same name as the package.

If a package name has several identifiers (separated by dots, such as java.awt.color), then each subsequent identifier must correspond to a deeper subdirectory (such as java/awt/color).

You can split the source files for a single package among two such directory trees located at different places, as long as -sourcepath points to them both. For example, src1/java/awt/color and src2/java/awt/color.

You can run the javadoc command either by changing directories (with the cd command) or by using the -sourcepath option. The following examples illustrate both alternatives.

Example 1Recursive Run from One or More Packages

This example uses -sourcepath so the javadoc command can be run from any directory and -subpackages (a new 1.4 option) for recursion. It traverses the subpackages of the java directory excluding packages rooted at java.net and java.lang. Notice this excludes java.lang.ref, a subpackage of java.lang. To also traverse down other package trees, append their names to the -subpackages argument, such as java:javax:org.xml.sax.

javadoc -d /home/html -sourcepath /home/src -subpackages java -exclude
Example 2Change to Root and Run Explicit Packages

Change to the parent directory of the fully qualified package. Then, run the javadoc command with the names of one or more packages that you want to document:

cd /home/src/
javadoc -d /home/html java.awt java.awt.event

To also traverse down other package trees, append their names to the -subpackages argument, such as java:javax:org.xml.sax.

Example 3Run from Any Directory on Explicit Packages in One Tree

In this case, it does not matter what the current directory is. Run the javadoc command and use the -sourcepath option with the parent directory of the top-level package. Provide the names of one or more packages that you want to document:

javadoc -d /home/html -sourcepath /home/src java.awt java.awt.event
Example 4Run from Any Directory on Explicit Packages in Multiple Trees

Run the javadoc command and use the -sourcepath option with a colon-separated list of the paths to each tree's root. Provide the names of one or more packages that you want to document. All source files for a specified package do not need to be located under a single root directory, but they must be found somewhere along the source path.

javadoc -d /home/html -sourcepath /home/src1:/home/src2 java.awt java.awt.event

The result is that all cases generate HTML-formatted documentation for the public and protected classes and interfaces in packages java.awt and java.awt.event and save the HTML files in the specified destination directory. Because two or more packages are being generated, the document has three HTML frames: one for the list of packages, another for the list of classes, and the third for the main class pages.

Document One or More Classes

The second way to run the javadoc command is to pass one or more source files. You can run javadoc either of the following two ways: by changing directories (with the cd command) or by fully specifying the path to the source files. Relative paths are relative to the current directory. The -sourcepath option is ignored when passing source files. You can use command-line wild cards, such as an asterisk (*), to specify groups of classes.

Example 1Change to the Source Directory

Change to the directory that holds the source files. Then run the javadoc command with the names of one or more source files you want to document.

This example generates HTML-formatted documentation for the classes Button, Canvas, and classes that begin with Graphics. Because source files rather than package names were passed in as arguments to the javadoc command, the document has two frames: one for the list of classes and the other for the main page.

cd /home/src/java/awt
javadoc -d /home/html Button.java Canvas.java Graphics*.java
Example 2Change to the Root Directory of the Package

This is useful for documenting individual source files from different subpackages off of the same root. Change to the package root directory, and supply the source files with paths from the root.

cd /home/src/
javadoc -d /home/html java/awt/Button.java java/applet/Applet.java
Example 3Document Files from Any Directory

In this case, it does not matter what the current directory is. Run the javadoc command with the absolute path (or path relative to the current directory) to the source files you want to document.

javadoc -d /home/html /home/src/java/awt/Button.java
/home/src/java/awt/Graphics*.java

Document Packages and Classes

You can document entire packages and individual classes at the same time. Here is an example that mixes two of the previous examples. You can use the -sourcepath option for the path to the packages but not for the path to the individual classes.

javadoc -d /home/html -sourcepath /home/src java.awt
/home/src/java/applet/Applet.java

Real-World Examples

The following command-line and makefile versions of the javadoc command run on the Java platform APIs. It uses 180 MB of memory to generate the documentation for the 1500 (approximately) public and protected classes in the Java SE 1.2. Both examples use absolute paths in the option arguments, so that the same javadoc command can be run from any directory.

Command-Line Example

The following command might be too long for some shells. You can use a command-line argument file (or write a shell script) to overcome this limitation.

In the example, packages is the name of a file that contains the packages to process, such as java.applet java.lang. None of the options should contain any newline characters between the single quotation marks. For example, if you copy and paste this example, then delete the newline characters from the -bottom option.

javadoc -sourcepath /java/jdk/src/share/classes \
-overview /java/jdk/src/share/classes/overview.html \
-d /java/jdk/build/api \
-use \
-splitIndex \
-windowtitle 'Java Platform, Standard Edition 7 API Specification' \
-doctitle 'Java Platform, Standard Edition 7 API Specification' \
-header '<b>Java SE 7</b>' \
-bottom '<font size="-1">
<a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/>
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.</font>' \
-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \
-group "Extension Packages" "javax.*" \
-J-Xmx180m \
@packages

Programmatic Interface

The Javadoc Access API enables the user to invoke the Javadoc tool directly from a Java application without executing a new process.

For example, the following statements are equivalent to the command javadoc -d /home/html -sourcepath /home/src -subpackages java -exclude java.net:java.lang com.example:

import javax.tools.DocumentationTool;
import javax.tools.ToolProvider;

public class JavaAccessSample{
    public static void main(String[] args){
        DocumentationTool javadoc = ToolProvider.getSystemDocumentationTool();
        int rc = javadoc.run( null, null, null,
                 "-d", "/home/html",
                 "-sourcepath", "home/src",
                 "-subpackages", "java",
                 "-exclude", "java.net:java.lang",
                 "com.example");
     }
 }

The first three arguments of the run method specify input, standard output, and standard error streams. Null is the default value for System.in, System.out, and System.err, respectively.

The makefile Example

This is an example of a GNU makefile. Single quotation marks surround makefile arguments. For an example of a Windows makefile, see the makefiles section of the Javadoc FAQ at
http://www.oracle.com/technetwork/java/javase/documentation/index-137483.html#makefiles

javadoc -sourcepath $(SRCDIR)              \   /* Sets path for source files   */
        -overview $(SRCDIR)/overview.html  \   /* Sets file for overview text  */
        -d /java/jdk/build/api             \   /* Sets destination directory   */
        -use                               \   /* Adds "Use" files             */
        -splitIndex                        \   /* Splits index A-Z             */
        -windowtitle $(WINDOWTITLE)        \   /* Adds a window title          */
        -doctitle $(DOCTITLE)              \   /* Adds a doc title             */
        -header $(HEADER)                  \   /* Adds running header text     */
        -bottom $(BOTTOM)                  \   /* Adds text at bottom          */
        -group $(GROUPCORE)                \   /* 1st subhead on overview page */
        -group $(GROUPEXT)                 \   /* 2nd subhead on overview page */
        -J-Xmx180m                         \   /* Sets memory to 180MB         */
        java.lang java.lang.reflect        \   /* Sets packages to document    */
        java.util java.io java.net         \
        java.applet

WINDOWTITLE = 'Java SE 7 API Specification'
DOCTITLE = 'Java Platform Standard Edition 7 API Specification'
HEADER = '<b>Java SE 7</font>'
BOTTOM = '<font size="-1">
      <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
      Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/>
      Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
      Other names may be trademarks of their respective owners.</font>'
GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
GROUPEXT  = '"Extension Packages" "javax.*"'
SRCDIR = '/java/jdk/1.7.0/src/share/classes'

Notes

  • If you omit the -windowtitle option, then the javadoc command copies the document title to the window title. The -windowtitle option text is similar to the the -doctitle option, but without HTML tags to prevent those tags from appearing as raw text in the window title.

  • If you omit the -footer option, then the javadoc command copies the header text to the footer.

  • Other important options you might want to use, but were not needed in the previous example, are the -classpath and -link options.

General Troubleshooting

  • The javadoc command reads only files that contain valid class names. If the javadoc command is not correctly reading the contents of a file, then verify that the class names are valid. See Process Source Files.

  • See the Javadoc FAQ for information about common bugs and for troubleshooting tips at
    http://www.oracle.com/technetwork/java/javase/documentation/index-137483.html

Errors and Warnings

Error and warning messages contain the file name and line number to the declaration line rather than to the particular line in the documentation comment.

For example, this message error: cannot read: Class1.java means that the javadoc command is trying to load Class1.java in the current directory. The class name is shown with its path (absolute or relative).

Environment

CLASSPATH

CLASSPATH is the environment variable that provides the path that the javadoc command uses to find user class files. This environment variable is overridden by the -classpath option. Separate directories with a semicolon for Windows or a colon for Oracle Solaris.

Windows example: .;C:\classes;C:\home\java\classes

Oracle Solaris example: .:/home/classes:/usr/local/java/classes.

See Also

  • javac(1)

  • java(1)

  • jdb(1)

  • javah(1)

  • javap(1)

Related Documents

  • Javadoc Technology at
    http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/index.html

  • How Classes Are Found
    http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

  • How to Write Doc Comments for the Javadoc Tool
    http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

  • URL Memo, Uniform Resource Locators
    http://www.ietf.org/rfc/rfc1738.txt

  • HTML standard, HTML Document Representation (4197265 and 4137321)
    http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javafxpackager

Performs tasks related to packaging and signing JavaFX applications.

Synopsis

javafxpackager command [options]

command

The task that should be performed.

options

One or more options for the command separated by spaces.

Commands

You can specify one of the following commands. After the command, specify the options for it.

-createbss

Converts CSS files into binary form.

-createjar

Produces a JAR archive according to other parameters.

-deploy

Assembles the application package for redistribution. By default, the deploy task will generate the base application package, but it can also generate a self-contained application package if requested.

-makeall

Performs compilation, createjar, and deploy steps as one call, with most arguments predefined. By default, it attempts to generate all applicable self-contained application packages. The source files must be located in a folder called src, and the resulting files (JAR, JNLP, HTML, and self-contained application packages) are put in a folder called dist. This command can only be configured in a minimal way and is as automated as possible.

-signjar

Signs JAR file(s) with a provided certificate.

Options for the createbss Command

-outdir dir

Name of the directory that will receive generated output files.

-srcdir dir

Base directory of the files to package.

-srcfiles files

List of files in the directory specified by the -srcdir option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.

Options for the createjar Command

-appclass app-class

Qualified name of the application class to be executed.

-argument arg

An unnamed argument to be inserted into the JNLP file as an <fx:argument> element.

-classpath files

List of dependent JAR file names.

-manifestAttrs manifest-attributes

List of names and values for additional manifest attributes. Syntax:

"name1=value1,name2=value2,name3=value3"
-nocss2bin

The packager will not convert CSS files to binary form before copying to JAR.

-noembedlauncher

If present, the packager will not add the JavaFX launcher classes to the JAR file.

-outdir dir

Name of the directory that will receive generated output files.

-outfile filename

Name (without the extension) of the file that will be generated.

-paramfile file

A properties file with default named application parameters.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-runtimeversion version

Version of the required JavaFX Runtime.

-srcdir dir

Base directory of the files to package.

-srcfiles files

List of files in the directory specified by the -srcdir option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.

Options for the deploy Command

-allpermissions

If present, the application will require all security permissions in the JNLP file.

-appclass app-class

Qualified name of the application class to be executed.

-argument arg

An unnamed argument to be inserted into an <fx:argument> element in the JNLP file.

-callbacks

Specifies user callback methods in generated HTML. The format is the following:

"name1:value1,name2:value2,..."
-description description

Description of the application.

-embedCertificates

If present, the certificates will be embedded in the JNLP file.

-embedjnlp

If present, the JNLP file will be embedded in the HTML document.

-height height

Height of the application.

-htmlparamfile file

Properties file with parameters for the resulting application when it is run in the browser.

-isExtension

If present, the srcfiles are treated as extensions.

-name name

Name of the application.

-native type

Generate self-contained application bundles (if possible). If type is specified, then only a bundle of this type is created. List of supported types includes: installer, image, exe, msi, dmg, rpm, deb.

-outdir dir

Name of the directory that will receive generated output files.

-outfile filename

Name (without the extension) of the file that will be generated.

-paramfile file

Properties file with default named application parameters.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-srcdir dir

Base directory of the files to package.

-srcfiles files

List of files in the directory specified by the -srcdir option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.

-templateId

Application ID of the application for template processing.

-templateInFilename

Name of the HTML template file. Placeholders are in the following form:

#XXXX.YYYY(APPID)#

Where APPID is the identifier of an application and XXX is one of following:

  • DT.SCRIPT.URL

    Location of dtjava.js in the Deployment Toolkit. By default, the location is

    http://java.com/js/dtjava.js

  • DT.SCRIPT.CODE

    Script element to include dtjava.js of the Deployment Toolkit.

  • DT.EMBED.CODE.DYNAMIC

    Code to embed the application into a given placeholder. It is expected that the code will be wrapped in the function() method.

  • DT.EMBED.CODE.ONLOAD

    All the code needed to embed the application into a web page using the onload hook (except inclusion of dtjava.js).

  • DT.LAUNCH.CODE

    Code needed to launch the application. It is expected that the code will be wrapped in the function() method.

-templateOutFilename

Name of the HTML file that will be generated from the template.

-title title

Title of the application.

-vendor vendor

Vendor of the application.

-width width

Width of the application.

-updatemode update-mode

Sets the update mode for the JNLP file.

Options for the makeall Command

-appclass app-class

Qualified name of the application class to be executed.

-classpath files

List of dependent JAR file names.

-height height

Height of the application.

-name name

Name of the application.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-width width

Width of the application.

Options for the signjar Command

-alias

Alias for the key.

-keyPass

Password for recovering the key.

-keyStore file

Keystore file name.

-outdir dir

Name of the directory that will receive generated output files.

-srcdir dir

Base directory of the files to be signed.

-srcfiles files

List of files in the directory specified by the -srcdir option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.

-storePass

Password to check integrity of the keystore or unlock the keystore

-storeType

Keystore type. The default value is "jks".

Notes

  • A -v option can be used with any task command to enable verbose output.

  • When the -srcdir option is allowed in a command, it can be used more than once. If the -srcfiles option is specified, the files named in the argument will be looked for in the location specified in the preceding srcdir option. In case there is no -srcdir preceding -srcfiles, the directory where the javafxpackager command is executed will be used.

Examples

Example 1Using the -createjar Command
javafxpackager -createjar -appclass package.ClassName
  -srcdir classes -outdir out -outfile outjar -v

Packages the contents of the classes directory to outjar.jar, sets the application class to package.ClassName.

Example 2Using the -deploy Command
javafxpackager -deploy -outdir outdir -outfile outfile -width 34 -height 43
  -name AppName -appclass package.ClassName -v -srcdir compiled

Generates outfile.jnlp and the corresponding outfile.html files in outdir for application AppName, which is started by package.ClassName and has dimensions of 34 by 43 pixels.

Example 3Using the -makeall Command
javafxpackager -makeall -appclass brickbreaker.Main -name BrickBreaker -width 600
-height 600

Does all the packaging work including compilation, createjar, and deploy.

Example 4Using the -signjar Command
javafxpackager -signJar --outdir dist -keyStore sampleKeystore.jks -storePass ****
-alias javafx -keypass **** -srcdir dist

Signs all of the JAR files in the dist directory, attaches a certificate with the specified alias, keyStore and storePass, and puts the signed JAR files back into the dist directory.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javah

Generates C header and source files from a Java class.

Synopsis

javah [ options ] fully-qualified-class-name ...

options

The command-line options. See Options.

fully-qualified-class-name

The fully qualified location of the classes to be converted to C header and source files.

Description

The javah command generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition with a layout that parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class.

The name of the header file and the structure declared within it are derived from the name of the class. When the class passed to the javah command is inside a package, the package name is added to the beginning of both the header file name and the structure name. Underscores (_) are used as name delimiters.

By default the javah command creates a header file for each class listed on the command line and puts the files in the current directory. Use the -stubs option to create source files. Use the -o option to concatenate the results for all listed classes into a single file.

The Java Native Interface (JNI) does not require header information or stub files. The javah command can still be used to generate native method function prototypes needed for JNI-style native methods. The javah command produces JNI-style output by default and places the result in the .h file.

Options

-o outputfile

Concatenates the resulting header or source files for all the classes listed on the command line into an output file. Only one of -o or -d can be used.

-d directory

Sets the directory where the javah command saves the header files or the stub files. Only one of -d or -o can be used.

-stubs

Causes the javah command to generate C declarations from the Java object file.

-verbose

Indicates verbose output and causes the javah command to print a message to stdout about the status of the generated files.

-help

Prints a help message for javah usage.

-version

Prints javah command release information.

-jni

Causes the javah command to create an output file containing JNI-style native method function prototypes. This is the default output; use of -jni is optional.

-classpath path

Specifies the path the javah command uses to look up classes. Overrides the default or the CLASSPATH environment variable when it is set. Directories are separated by colons on Oracle Solaris and semicolons on Windows. The general format for path is:

Oracle Solaris:

.:your-path

Example: .:/home/avh/classes:/usr/local/java/classes

Windows:

.;your-path

Example: .;C:\users\dac\classes;C:\tools\java\classes

As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR.

For example, if directory mydir contains a.jar and b.JAR, then the class path element mydir/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified. All JAR files in the specified directory, including hidden ones, are included in the list. A class path entry that consists of * expands to a list of all the JAR files in the current directory. The CLASSPATH environment variable, where defined, is similarly expanded. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started. A Java program will never see unexpanded wild cards except by querying the environment. For example, by calling System.getenv("CLASSPATH").

-bootclasspath path

Specifies the path from which to load bootstrap classes. By default, the bootstrap classes are the classes that implement the core Java platform located in jre\lib\rt.jar and several other JAR files.

-old

Specifies that old JDK 1.0-style header files should be generated.

-force

Specifies that output files should always be written.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

See Also

  • javah(1)

  • java(1)

  • jdb(1)

  • javap(1)

  • javadoc(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javap

Disassembles one or more class files.

Synopsis

javap [options] classfile...

options

The command-line options. See Options.

classfile

One or more classes separated by spaces to be processed for annotations such as DocFooter.class. You can specify a class that can be found in the class path, by its file name or with a URL such as file:///home/user/myproject/src/DocFooter.class.

Description

The javap command disassembles one or more class files. The output depends on the options used. When no options are used, then the javap command prints the package, protected and public fields, and methods of the classes passed to it. The javap command prints its output to stdout.

Options

-help
--help
-?

Prints a help message for the javap command.

-version

Prints release information.

-l

Prints line and local variable tables.

-public

Shows only public classes and members.

-protected

Shows only protected and public classes and members.

-private
-p

Shows all classes and members.

-Joption

Passes the specified option to the JVM. For example:

javap -J-version
javap -J-Djava.security.manager -J-Djava.security.policy=MyPolicy MyClassName

For more information about JVM options, see the java command documentation.

-s

Prints internal type signatures.

-sysinfo

Shows system information (path, size, date, MD5 hash) of the class being processed.

-constants

Shows static final constants.

-c

Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class.

-verbose

Prints stack size, number of locals and arguments for methods.

-classpath path

Specifies the path the javap command uses to look up classes. Overrides the default or the CLASSPATH environment variable when it is set.

-bootclasspath path

Specifies the path from which to load bootstrap classes. By default, the bootstrap classes are the classes that implement the core Java platform located in jre/lib/rt.jar and several other JAR files.

-extdir dirs

Overrides the location at which installed extensions are searched for. The default location for extensions is the value of java.ext.dirs.

Example

Compile the following DocFooter class:

import java.awt.*;
import java.applet.*;

public class DocFooter extends Applet {
        String date;
        String email;

        public void init() {
                resize(500,100);
                date = getParameter("LAST_UPDATED");
                email = getParameter("EMAIL");
        }

        public void paint(Graphics g) {
                g.drawString(date + " by ",100, 15);
                g.drawString(email,290,15);
        }
}

The output from the javap DocFooter.class command yields the following:

Compiled from "DocFooter.java"
public class DocFooter extends java.applet.Applet {
  java.lang.String date;
  java.lang.String email;
  public DocFooter();
  public void init();
  public void paint(java.awt.Graphics);
}

The output from javap -c DocFooter.class command yields the following:

Compiled from "DocFooter.java"
public class DocFooter extends java.applet.Applet {
  java.lang.String date;
  java.lang.String email;

  public DocFooter();
    Code:
       0: aload_0
       1: invokespecial #1                  // Method
java/applet/Applet."<init>":()V
       4: return

  public void init();
    Code:
       0: aload_0
       1: sipush        500
       4: bipush        100
       6: invokevirtual #2                  // Method resize:(II)V
       9: aload_0
      10: aload_0
      11: ldc           #3                  // String LAST_UPDATED
      13: invokevirtual #4                  // Method
 getParameter:(Ljava/lang/String;)Ljava/lang/String;
      16: putfield      #5                  // Field date:Ljava/lang/String;
      19: aload_0
      20: aload_0
      21: ldc           #6                  // String EMAIL
      23: invokevirtual #4                  // Method
 getParameter:(Ljava/lang/String;)Ljava/lang/String;
      26: putfield      #7                  // Field email:Ljava/lang/String;
      29: return

  public void paint(java.awt.Graphics);
    Code:
       0: aload_1
       1: new           #8                  // class java/lang/StringBuilder
       4: dup
       5: invokespecial #9                  // Method
 java/lang/StringBuilder."<init>":()V
       8: aload_0
       9: getfield      #5                  // Field date:Ljava/lang/String;
      12: invokevirtual #10                 // Method
 java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      15: ldc           #11                 // String  by
      17: invokevirtual #10                 // Method
 java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      20: invokevirtual #12                 // Method
 java/lang/StringBuilder.toString:()Ljava/lang/String;
      23: bipush        100
      25: bipush        15
      27: invokevirtual #13                 // Method
 java/awt/Graphics.drawString:(Ljava/lang/String;II)V
      30: aload_1
      31: aload_0
      32: getfield      #7                  // Field email:Ljava/lang/String;
      35: sipush        290
      38: bipush        15
      40: invokevirtual #13                 // Method
java/awt/Graphics.drawString:(Ljava/lang/String;II)V
      43: return
}

See Also

  • javac(1)

  • java(1)

  • jdb(1)

  • javah(1)

  • javadoc(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javaws

Starts Java Web Start.

Synopsis

javaws [ run-options ] jnlp

javaws [ control-options ]

run-options

Command-line run-options. The run-options can be in any order. See Run-Options.

jnlp

Either the path of or the Uniform Resource Locator (URL) of the Java Network Launching Protocol (JNLP) file.

control-options

Command-line control-options. The control-options can be in any order. See Control-Options.

Description

Note: The javaws command is not available on Oracle Solaris.

The javaws command starts Java Web Start, which is the reference implementation of the JNLP. Java Web Start starts Java applications and applets hosted on a network.

If a JNLP file is specified, then the javaws command starts the Java application or applet specified in the JNLP file.

The javaws launcher has a set of options that are supported in the current release. However, the options may be removed in a future release.

Run-Options

-offline

Runs Java Web Start in offline mode.

-Xnosplash

Does not display the initial splash screen.

-open arguments

When specified, this option replaces the arguments in the JNLP file with -open arguments.

-print arguments

When specified, this option replaces the arguments in the JNLP file with -print arguments.

-online

Uses online mode. This is the default behavior.

-wait

The javaws process does not exit until the application exits. This option does not function as described on Windows platforms.

-verbose

Displays additional output.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

-system

Runs the application from the system cache only.

Control-Options

-viewer

Shows the cache viewer in the Java Control Panel.

-clearcache

Removes all non-installed applications from the cache.

-userConfig property-name

Clears the specified deployment property.

-userConfig property-name property-value

Sets the specified deployment property to the specified value.

-uninstall

Removes all applications from the cache.

-uninstall jnlp

Removes the application from the cache.

-print import-options jnlp

Imports the application to the cache.

Import-Options

-silent

Imports silently (with no user interface).

-system

Imports application to the system cache.

-codebase url

Retrieves resources from the specified codebase.

-shortcut

Installs shortcuts if the user allows a prompt. This option has no effect unless the -silent option is also used.

-association

Installs associations if the user allows a prompt. This option has no effect unless the -silent option is also used.

Note: The command javaws -shortcut -uninstall removes both association as well as the implementation.

Files

For information about the user and system cache and deployment.properties files, see Deployment Configuration File and Properties at
http://docs.oracle.com/javase/8/docs/technotes/guides/deployment/deployment-guide/properties.html

See Also

  • Java Web Start at
    http://docs.oracle.com/javase/8/docs/technotes/guides/javaws/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jcmd

Sends diagnostic command requests to a running Java Virtual Machine (JVM).

Synopsis

jcmd [-l|-h|-help]

jcmd pid|main-class PerfCounter.print

jcmd pid|main-class -f filename

jcmd pid|main-class command[ arguments]

Description

The jcmd utility is used to send diagnostic command requests to the JVM. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM.

Note: To invoke diagnostic commands from a remote machine or with different identifiers, you can use the com.sun.management.DiagnosticCommandMBean interface. For more information about the DiagnosticCommandMBean interface, see the API documentation at http://download.java.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean.html

If you run jcmd without arguments or with the -l option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process. Running jcmd with the -h or -help option prints the tool's help message.

If you specify the processes identifier (pid) or the main class (main-class) as the first argument, jcmd sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class. You can also send the diagnostic command request to all available Java processes by specifying 0 as the process identifier. Use one of the following as the diagnostic command request:

Perfcounter.print

Prints the performance counters available for the specified Java process. The list of performance counters might vary with the Java process.

-f filename

The name of the file from which to read diagnostic commands and send them to the specified Java process. Used only with the -f option. Each command in the file must be written on a single line. Lines starting with a number sign (#) are ignored. Processing of the file ends when all lines have been read or when a line containing the stop keyword is read.

command [arguments]

The command to be sent to the specified Java process. The list of available diagnostic commands for a given process can be obtained by sending the help command to this process. Each diagnostic command has its own set of arguments. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the help command.

Note: If any arguments contain spaces, you must surround them with single or double quotation marks (' or "). In addition, you must escape single or double quotation marks with a backslash (\) to prevent the operating system shell from processing quotation marks. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks).

Options

Options are mutually exclusive.

-f filename

Reads commands from the specified file. This option can be used only if you specify the process identifier or the main class as the first argument. Each command in the file must be written on a single line. Lines starting with a number sign (#) are ignored. Processing of the file ends when all lines have been read or when a line containing the stop keyword is read.

-h
-help

Prints a help message.

-l

Prints the list of running Java processes identifiers with the main class and command-line arguments.

See Also

  • jps(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jconsole

Starts a graphical console that lets you monitor and manage Java applications.

Synopsis

jconsole [ options ] [ connection ... ]

options

The command-line options. See Options.

connection = pid | host:port | jmxURL

The pid value is the process ID of a local Java Virtual Machine (JVM). The JVM must be running with the same user ID as the user ID running the jconsole command.The host:port values are the name of the host system on which the JVM is running, and the port number specified by the system property com.sun.management.jmxremote.port when the JVM was started.The jmxUrl value is the address of the JMX agent to be connected to as described in JMXServiceURL.

For more information about the connection parameter, see Monitoring and Management Using JMX Technology at
http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html

See also the JMXServiceURL class description at
http://docs.oracle.com/javase/8/docs/api/javax/management/remote/JMXServiceURL.html

Description

The jconsole command starts a graphical console tool that lets you monitor and manage Java applications and virtual machines on a local or remote machine.

On Windows, the jconsole command does not associate with a console window. It does, however, display a dialog box with error information when the jconsole command fails.

Options

-interval=n

Sets the update interval to n seconds (default is 4 seconds).

-notile

Does not tile windows initially (for two or more connections).

-pluginpath plugins

Specifies a list of directories or JAR files to be searched for JConsole plug-ins. The plugins path should contain a provider-configuration file named META-INF/services/com.sun.tools.jconsole.JConsolePlugin that contains one line for each plug-in. The line specifies the fully qualified class name of the class implementing the com.sun.tools.jconsole.JConsolePlugin class.

-version

Displays release information and exits.

-help

Displays a help message.

-Jflag

Passes flag to the JVM on which the jconsole command is run.

See Also

  • Using JConsole at
    http://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html

  • Monitoring and Management Using JMX Technology at
    http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html

  • The JMXServiceURL class description at
    http://docs.oracle.com/javase/8/docs/api/javax/management/remote/JMXServiceURL.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jdb

Finds and fixes bugs in Java platform programs.

Synopsis

jdb [options] [classname] [arguments]

options

Command-line options. See Options.

classname

Name of the main class to debug.

arguments

Arguments passed to the main() method of the class.

Description

The Java Debugger (JDB) is a simple command-line debugger for Java classes. The jdb command and its options call the JDB. The jdb command demonstrates the Java Platform Debugger Architecture (JDBA) and provides inspection and debugging of a local or remote Java Virtual Machine (JVM). See Java Platform Debugger Architecture (JDBA) at
http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html

Start a JDB Session

There are many ways to start a JDB session. The most frequently used way is to have JDB launch a new JVM with the main class of the application to be debugged. Do this by substituting the jdb command for the java command in the command line. For example, if your application's main class is MyClass, then use the following command to debug it under JDB:

jdb MyClass

When started this way, the jdb command calls a second JVM with the specified parameters, loads the specified class, and stops the JVM before executing that class's first instruction.

Another way to use the jdb command is by attaching it to a JVM that is already running. Syntax for starting a JVM to which the jdb command attaches when the JVM is running is as follows. This loads in-process debugging libraries and specifies the kind of connection to be made.

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass

You can then attach the jdb command to the JVM with the following command:

jdb -attach 8000

The MyClass argument is not specified in the jdb command line in this case because the jdb command is connecting to an existing JVM instead of launching a new JVM.

There are many other ways to connect the debugger to a JVM, and all of them are supported by the jdb command. The Java Platform Debugger Architecture has additional documentation on these connection options.

Basic jdb Commands

The following is a list of the basic jdb commands. The JDB supports other commands that you can list with the -help option.

help or ?

The help or ? commands display the list of recognized commands with a brief description.

run

After you start JDB and set breakpoints, you can use the run command to execute the debugged application. The run command is available only when the jdb command starts the debugged application as opposed to attaching to an existing JVM.

cont

Continues execution of the debugged application after a breakpoint, exception, or step.

print

Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the dump command to find out how to get more information about an object.

Note: To display local variables, the containing class must have been compiled with the javac -g option.

The print command supports many simple Java expressions including those with method invocations, for example:

print MyClass.myStaticField
print myObj.myInstanceField
print i + j + k (i, j, k are primities and either fields or local variables)
print myObj.myMethod() (if myMethod returns a non-null)
print new java.lang.String("Hello").length()
dump

For primitive values, the dump command is identical to the print command. For objects, the dump command prints the current value of each field defined in the object. Static and instance fields are included. The dump command supports the same set of expressions as the print command.

threads

List the threads that are currently running. For each thread, its name and current status are printed and an index that can be used in other commands. In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is main, and it is currently running.

4. (java.lang.Thread)0x1 main      running
thread

Select a thread to be the current thread. Many jdb commands are based on the setting of the current thread. The thread is specified with the thread index described in the threads command.

where

The where command with no arguments dumps the stack of the current thread. The where all command dumps the stack of all threads in the current thread group. The where threadindex command dumps the stack of the specified thread.

If the current thread is suspended either through an event such as a breakpoint or through the suspend command, then local variables and fields can be displayed with the print and dump commands. The up and down commands select which stack frame is the current stack frame.

Breakpoints

Breakpoints can be set in JDB at line numbers or at the first instruction of a method, for example:

  • The command stop at MyClass:22 sets a breakpoint at the first instruction for line 22 of the source file containing MyClass.

  • The command stop in java.lang.String.length sets a breakpoint at the beginning of the method java.lang.String.length.

  • The command stop in MyClass.<clinit> uses <clinit> to identify the static initialization code for MyClass.

When a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, MyClass.myMethod(int,java.lang.String) or MyClass.myMethod().

The clear command removes breakpoints using the following syntax: clear MyClass:45. Using the clear or stop command with no argument displays a list of all breakpoints currently set. The cont command continues execution.

Stepping

The step command advances execution to the next line whether it is in the current stack frame or a called method. The next command advances execution to the next line in the current stack frame.

Exceptions

When an exception occurs for which there is not a catch statement anywhere in the throwing thread's call stack, the JVM typically prints an exception trace and exits. When running under JDB, however, control returns to JDB at the offending throw. You can then use the jdb command to diagnose the cause of the exception.

Use the catch command to cause the debugged application to stop at other thrown exceptions, for example: catch java.io.FileNotFoundException or catch mypackage.BigTroubleException. Any exception that is an instance of the specified class or subclass stops the application at the point where it is thrown.

The ignore command negates the effect of an earlier catch command. The ignore command does not cause the debugged JVM to ignore specific exceptions, but only to ignore the debugger.

Options

When you use the jdb command instead of the java command on the command line, the jdb command accepts many of the same options as the java command, including -D, -classpath, and -X options. The following list contains additional options that are accepted by the jdb command.

Other options are supported to provide alternate mechanisms for connecting the debugger to the JVM it is to debug. For additional documentation about these connection alternatives, see Java Platform Debugger Architecture (JPDA) at
http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html

-help

Displays a help message.

-sourcepath dir1:dir2: . . .

Uses the specified path to search for source files in the specified path. If this option is not specified, then use the default path of dot (.).

-attach address

Attaches the debugger to a running JVM with the default connection mechanism.

-listen address

Waits for a running JVM to connect to the specified address with a standard connector.

-launch

Starts the debugged application immediately upon startup of JDB. The -launch option removes the need for the run command. The debugged application is launched and then stopped just before the initial application class is loaded. At that point, you can set any necessary breakpoints and use the cont command to continue execution.

-listconnectors

List the connectors available in this JVM.

-connect connector-name:name1=value1

Connects to the target JVM with the named connector and listed argument values.

-dbgtrace [flags]

Prints information for debugging the jdb command.

-tclient

Runs the application in the Java HotSpot VM client.

-tserver

Runs the application in the Java HotSpot VM server.

-Joption

Passes option to the JVM, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Options Forwarded to the Debugger Process

-v -verbose[:class|gc|jni]

Turns on verbose mode.

-Dname=value

Sets a system property.

-classpath dir

Lists directories separated by colons in which to look for classes.

-Xoption

Nonstandard target JVM option.

See Also

  • javac(1)

  • java(1)

  • javah(1)

  • javap(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jdeps

Java class dependency analyzer.

Synopsis

jdeps [options] classes ...

options

Command-line options. See Options.

classes

Name of the classes to analyze. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file.

Description

The jdeps command shows the package-level or class-level dependencies of Java class files. The input class can be a path name to a .class file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files. The options determine the output. By default, jdeps outputs the dependencies to the system output. It can generate the dependencies in DOT language (see the -dotoutput option).

Options

-dotoutput <dir>

Destination directory for DOT file output. If specified, jdeps will generate one dot file per each analyzed archive named <archive-file-name>.dot listing the dependencies, and also a summary file named summary.dot listing the dependencies among the archives.

-s
-summary

Prints dependency summary only.

-v
-verbose

Prints all class-level dependencies.

-verbose:package

Prints package-level dependencies excluding dependencies within the same archive.

-verbose:class

Prints class-level dependencies excluding dependencies within the same archive.

-cp <path>
-classpath <path>

Specifies where to find class files.

See also Setting the Class Path.

-p <pkg name>
-package <pkg name>

Finds dependencies in the specified package. You can specify this option multiple times for different packages. The -p and -e options are mutually exclusive.

-e <regex>
-regex <regex>

Finds dependencies in packages matching the specified regular expression pattern. The -p and -e options are mutually exclusive.

-include <regex>

Restricts analysis to classes matching pattern. This option filters the list of classes to be analyzed. It can be used together with -p and -e which apply pattern to the dependencies.

-jdkinternals

Finds class-level dependences in JDK internal APIs. By default, it analyzes all classes specified in the -classpath option and in input files unless you specified the -include option. You cannot use this option with the -p, -e, and -s options.

Warning: JDK internal APIs may not be accessible in upcoming releases.

-P
-profile

Shows profile or the file containing a package.

-apionly

Restricts analysis to APIs, for example, dependences from the signature of public and protected members of public classes including field type, method parameter types, returned type, and checked exception types.

-R
-recursive

Recursively traverses all dependencies.

-version

Prints version information.

-h
-?
-help

Prints help message for jdeps.

Examples

Analyzing the dependencies of Notepad.jar.

$ jdeps demo/jfc/Notepad/Notepad.jar

demo/jfc/Notepad/Notepad.jar -> /usr/java/jre/lib/rt.jar
   <unnamed> (Notepad.jar)
      -> java.awt
      -> java.awt.event
      -> java.beans
      -> java.io
      -> java.lang
      -> java.net
      -> java.util
      -> java.util.logging
      -> javax.swing
      -> javax.swing.border
      -> javax.swing.event
      -> javax.swing.text
      -> javax.swing.tree
      -> javax.swing.undo

Use -P or -profile option to show on which profile that Notepad depends.

$ jdeps -profile demo/jfc/Notepad/Notepad.jar
demo/jfc/Notepad/Notepad.jar -> /usr/java/jre/lib/rt.jar (Full JRE)
   <unnamed> (Notepad.jar)
      -> java.awt                                           Full JRE
      -> java.awt.event                                     Full JRE
      -> java.beans                                         Full JRE
      -> java.io                                            compact1
      -> java.lang                                          compact1
      -> java.net                                           compact1
      -> java.util                                          compact1
      -> java.util.logging                                  compact1
      -> javax.swing                                        Full JRE
      -> javax.swing.border                                 Full JRE
      -> javax.swing.event                                  Full JRE
      -> javax.swing.text                                   Full JRE
      -> javax.swing.tree                                   Full JRE
      -> javax.swing.undo                                   Full JRE

Analyzing the immediate dependencies of a specific class in a given classpath, for example the com.sun.tools.jdeps.Main class in the tools.jar file.

$ jdeps -cp lib/tools.jar com.sun.tools.jdeps.Main
lib/tools.jar -> /usr/java/jre/lib/rt.jar
   com.sun.tools.jdeps (tools.jar)
      -> java.io
      -> java.lang

Use the -verbose:class option to find class-level dependencies or use the -v or -verbose option to include dependencies from the same JAR file.

$ jdeps -verbose:class -cp lib/tools.jar com.sun.tools.jdeps.Main

lib/tools.jar -> /usr/java/jre/lib/rt.jar
   com.sun.tools.jdeps.Main (tools.jar)
      -> java.io.PrintWriter
      -> java.lang.Exception
      -> java.lang.Object
      -> java.lang.String
      -> java.lang.System

Use the -R or -recursive option to analyze the transitive dependencies of the com.sun.tools.jdeps.Main class.

$ jdeps -R -cp lib/tools.jar com.sun.tools.jdeps.Main
lib/tools.jar -> /usr/java/jre/lib/rt.jar
   com.sun.tools.classfile (tools.jar)
      -> java.io
      -> java.lang
      -> java.lang.reflect
      -> java.nio.charset
      -> java.nio.file
      -> java.util
      -> java.util.regex
   com.sun.tools.jdeps (tools.jar)
      -> java.io
      -> java.lang
      -> java.nio.file
      -> java.nio.file.attribute
      -> java.text
      -> java.util
      -> java.util.jar
      -> java.util.regex
      -> java.util.zip
/usr/java/jre/lib/jce.jar -> /usr/java/jre/lib/rt.jar
   javax.crypto (jce.jar)
      -> java.io
      -> java.lang
      -> java.lang.reflect
      -> java.net
      -> java.nio
      -> java.security
      -> java.security.cert
      -> java.security.spec
      -> java.util
      -> java.util.concurrent
      -> java.util.jar
      -> java.util.regex
      -> java.util.zip
      -> javax.security.auth
      -> sun.security.jca                                   JDK internal API (rt.jar)
      -> sun.security.util                                  JDK internal API (rt.jar)
   javax.crypto.spec (jce.jar)
      -> java.lang
      -> java.security.spec
      -> java.util
/usr/java/jre/lib/rt.jar -> /usr/java/jre/lib/jce.jar
   java.security (rt.jar)
      -> javax.crypto

Generate dot files of the dependencies of Notepad demo.

$ jdeps -dotoutput dot demo/jfc/Notepad/Notepad.jar

jdeps will create one dot file for each given JAR file named <filename>.dot in the dot directory specified in the -dotoutput option, and also a summary file named summary.dot that will list the dependencies among the JAR files

$ cat dot/Notepad.jar.dot
digraph "Notepad.jar" {
    // Path: demo/jfc/Notepad/Notepad.jar
   "<unnamed>"                                        -> "java.awt";
   "<unnamed>"                                        -> "java.awt.event";
   "<unnamed>"                                        -> "java.beans";
   "<unnamed>"                                        -> "java.io";
   "<unnamed>"                                        -> "java.lang";
   "<unnamed>"                                        -> "java.net";
   "<unnamed>"                                        -> "java.util";
   "<unnamed>"                                        -> "java.util.logging";
   "<unnamed>"                                        -> "javax.swing";
   "<unnamed>"                                        -> "javax.swing.border";
   "<unnamed>"                                        -> "javax.swing.event";
   "<unnamed>"                                        -> "javax.swing.text";
   "<unnamed>"                                        -> "javax.swing.tree";
   "<unnamed>"                                        -> "javax.swing.undo";
}

$ cat dot/summary.dot
digraph "summary" {
   "Notepad.jar"                  -> "rt.jar";
}

See Also

  • javap(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


JDK and JRE File Structure

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

3 JDK and JRE File Structure

This chapter introduces the JDK directories and the files they contain. The file structure of the JRE is identical to the structure of the jre directory in the JDK.

This chapter covers the following topics:

  • Demos and Samples

  • Development Files and Directories

  • Additional Files and Directories

Demos and Samples

Demos and samples that show you how to program for the Java platform are available as a separate download at the Java SE Downloads page at
http://www.oracle.com/technetwork/java/javase/downloads/index.html

These are available as separate .tar.z compressed packages and .tar.gz compressed binaries. Similar to other 64-bit bundles on Oracle Solaris, the 64-bit demos and samples bundles on Oracle Solaris require that the 32-bit demos and samples bundles to also be installed.

Development Files and Directories

This section describes the most important files and directories required to develop applications for the Java platform. Some of the directories that are not required include Java source code and C header files. See Additional Files and Directories.

jdk1.8.0
     bin
          java*
          javac*
          javap*
          javah*
          javadoc*
     lib
          tools.jar
          dt.jar
     jre
          bin
               java*
          lib
               applet
               ext
                    jfxrt.jar
                    localdata.jar
               fonts
               security
               sparc
                    server
                    client
               rt.jar
               charsets.jar

Assuming the JDK software is installed at /jdk1.8.0, here are some of the most important directories:

/jdk1.8.0

Root directory of the JDK software installation. Contains copyright, license, and README files. Also contains src.zip, the archive of source code for the Java platform.

/jdk1.8.0/bin

Executables for all the development tools contained in the JDK. The PATH environment variable should contain an entry for this directory.

/jdk1.8.0/lib

Files used by the development tools. Includes tools.jar, which contains non-core classes for support of the tools and utilities in the JDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDEs) how to display the Java components and how to let the developer customize them for an application.

/jdk1.8.0/jre

Root directory of the Java Runtime Environment (JRE) used by the JDK development tools. The runtime environment is an implementation of the Java platform. This is the directory referred to by the java.home system property.

/jdk1.8.0/jre/bin

Executable files for tools and libraries used by the Java platform. The executable files are identical to files in /jdk1.8.0/bin. The java launcher tool serves as an application launcher (and replaced the earlier jre command that shipped with 1.1 releases of the JDK). This directory does not need to be in the PATH environment variable.

/jdk1.8.0/jre/lib

Code libraries, property settings, and resource files used by the JRE. For example rt.jar contains the bootstrap classes, which are the run time classes that comprise the Java platform core API, and charsets.jar contains the character-conversion classes. Aside from the ext subdirectory, there are several additional resource subdirectories not described here.

/jdk1.8.0/jre/lib/ext

Default installation directory for extensions to the Java platform. This is where the JavaHelp JAR file goes when it is installed, for example. This directory includes the jfxrt.jar file, which contains the JavaFX runtime libraries and the localedata.jar file, which contains the locale data for the java.text and java.util packages. See The Extension Mechanism at
http://docs.oracle.com/javase/8/docs/technotes/guides/extensions/index.html

/jdk1.8.0/jre/lib/security

Contains files used for security management. These include the security policy java.policy and security properties java.security files.

/jdk1.8.0/jre/lib/sparc

Contains the .so (shared object) files used by the Oracle Solaris release of the Java platform.

/jdk1.8.0/jre/lib/sparc/client

Contains the .so file used by the Java HotSpot VM client, which is implemented with Java HotSpot VM technology. This is the default Java Virtual Machine (JVM).

/jdk1.8.0/jre/lib/sparc/server

Contains the .so file used by the Java HotSpot VM server.

/jdk1.8.0/jre/lib/applet

JAR files that contain support classes for applets can be placed in the lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be preloaded from the local file system by the applet class loader and provides the same protections as though they had been downloaded over the Internet.

/jdk1.8.0/jre/lib/fonts

Font files used by the platform.

Additional Files and Directories

This section describes the directory structure for Java source code, C header files, and other additional directories and files.

jdk1.8.0
     db
     include
     man
     src.zip
/jdk1.8.0/src.zip

Archive that contains the source code for the Java platform.

/jdk1.8.0/db

Contains Java DB. See Java DB Technical Documentation at
http://docs.oracle.com/javadb/

/jdk1.8.0/include

C-language header files that support native-code programming with the Java Native Interface and the Java Virtual Machine (JVM) Debugger Interface. See Java Native Interface at
http://docs.oracle.com/javase/8/docs/technotes/guides/jni/index.html

See also Java Platform Debugger Architecture (JPDA) at
http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html

/jdk1.8.0/man

Contains man pages for the JDK tools.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jhat

Analyzes the Java heap. This command is experimental and unsupported.

Synopsis

jhat [ options ] heap-dump-file

options

The command-line options. See Options.

heap-dump-file

Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you can specify which dump in the file by appending #<number> to the file name, for example, myfile.hprof#3.

Description

The jhat command parses a Java heap dump file and starts a web server. The jhat command lets you to browse heap dumps with your favorite web browser. The jhat command supports predesigned queries such as show all instances of a known class MyClass, and Object Query Language (OQL). OQL is similar to SQL, except for querying heap dumps. Help on OQL is available from the OQL help page shown by the jhat command. With the default port, OQL help is available at http://localhost:7000/oqlhelp/

There are several ways to generate a Java heap dump:

  • Use the jmap -dump option to obtain a heap dump at runtime. See jmap(1).

  • Use the jconsole option to obtain a heap dump through HotSpotDiagnosticMXBean at runtime. See jconsole(1) and the HotSpotDiagnosticMXBean interface description at
    http://docs.oracle.com/javase/8/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html

  • Heap dump is generated when an OutOfMemoryError is thrown by specifying the -XX:+HeapDumpOnOutOfMemoryError Java Virtual Machine (JVM) option.

  • Use the hprof command. See the HPROF: A Heap/CPU Profiling Tool at
    http://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html

Options

-stack false|true

Turns off tracking object allocation call stack. If allocation site information is not available in the heap dump, then you have to set this flag to false. The default is true.

-refs false|true

Turns off tracking of references to objects. Default is true. By default, back pointers, which are objects that point to a specified object such as referrers or incoming references, are calculated for all objects in the heap.

-port port-number

Sets the port for the jhat HTTP server. Default is 7000.

-exclude exclude-file

Specifies a file that lists data members that should be excluded from the reachable objects query. For example, if the file lists java.lang.String.value, then, then whenever the list of objects that are reachable from a specific object o are calculated, reference paths that involve java.lang.String.value field are not considered.

-baseline exclude-file

Specifies a baseline heap dump. Objects in both heap dumps with the same object ID are marked as not being new. Other objects are marked as new. This is useful for comparing two different heap dumps.

-debug int

Sets the debug level for this tool. A level of 0 means no debug output. Set higher values for more verbose modes.

-version

Reports the release number and exits

-h

Displays a help message and exits.

-help

Displays a help message and exits.

-Jflag

Passes flag to the Java Virtual Machine on which the jhat command is running. For example, -J-Xmx512m to use a maximum heap size of 512 MB.

See Also

  • jmap(1)

  • jconsole(1)

  • HPROF: A Heap/CPU Profiling Tool at
    http://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jinfo

Generates configuration information. This command is experimental and unsupported.

Synopsis

jinfo [ option ] pid

jinfo [ option ] executable core

jinfo [ option ] [ servier-id ] remote-hostname-or-IP

option

The command-line options. See Options.

pid

The process ID for which the configuration information is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, use the jps(1) command.

executable

The Java executable from which the core dump was produced.

core

The core file for which the configuration information is to be printed.

remote-hostname-or-IP

The remote debug server hostname or IP address. See jsadebugd(1).

server-id

An optional unique ID to use when multiple debug servers are running on the same remote host.

Description

The jinfo command prints Java configuration information for a specified Java process or core file or a remote debug server. The configuration information includes Java system properties and Java Virtual Machine (JVM) command-line flags. If the specified process is running on a 64-bit JVM, then you might need to specify the -J-d64 option, for example: jinfo -J-d64 -sysprops pid.

This utility is unsupported and might not be available in future releases of the JDK. In Windows Systems where dbgeng.dll is not present, Debugging Tools For Windows must be installed to have these tools working. The PATH environment variable should contain the location of the jvm.dll that is used by the target process or the location from which the crash dump file was produced. For example, set PATH=%JDK_HOME%\jre\bin\client;%PATH% .

Options

no-option

Prints both command-line flags and system property name-value pairs.

-flag name

Prints the name and value of the specified command-line flag.

-flag [+|-]name

enables or disables the specified Boolean command-line flag.

-flag name=value

Sets the specified command-line flag to the specified value.

-flags

Prints command-line flags passed to the JVM.

-sysprops

Prints Java system properties as name-value pairs.

-h

Prints a help message.

-help

Prints a help message.

See Also

  • jps(1)

  • jsadebugd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jjs

Invokes the Nashorn engine.

Synopsis

jjs [options] [script-files] [-- arguments]
options

One or more options of the jjs command, separated by spaces. For more information, see Options.

script-files

One or more script files which you want to interpret using Nashorn, separated by spaces. If no files are specified, an interactive shell is started.

arguments

All values after the double hyphen marker (--) are passed through to the script or the interactive shell as arguments. These values can be accessed by using the arguments property (see Example 3).

Description

The jjs command-line tool is used to invoke the Nashorn engine. You can use it to interpret one or several script files, or to run an interactive shell.

Options

The options of the jjs command control the conditions under which scripts are interpreted by Nashorn.

-ccs=size
--class-cache-size=size

Sets the class cache size (in bytes). Append the letter k or K to indicate kilobytes (KB), m or M to indicate megabytes (MB), g or G to indicate gigabytes (GB). By default, the class cache size is set to 50 bytes. The following example shows how to set it to 1024 bytes (1 KB):

-css=100
-css=1k
-co
--compile-only

Compiles the script without running it.

-cp path
--classpath path

Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:).

-Dname=value

Sets a system property to be passed to the script by assigning a value to a property name. The following example shows how to invoke Nashorn in interactive mode and assign myValue to the property named myKey:

>> jjs -DmyKey=myValue
jjs> java.lang.System.getProperty("myKey")
myValue
jjs>

This option can be repeated to set multiple properties.

-d=path
--dump-debug-dir=path

Specifies the path to the directory where class files are dumped.

--debug-lines

Generates a line number table in the class file. By default, this option is enabled. To disable it, specify --debug-lines=false.

--debug-locals

Generates a local variable table in the class file.

-doe
--dump-on-error

Provides a full stack trace when an error occurs. By default, only a brief error message is printed.

--early-lvalue-error

Reports invalid lvalue expressions as early errors (that is, when the code is parsed). By default, this option is enabled. To disable it, specify --early-lvalue-error=false. When disabled, invalid lvalue expressions will not be reported until the code is executed.

--empty-statements

Preserves empty statements in the Java abstract syntax tree.

-fv
--fullversion

Prints the full Nashorn version string.

--function-statement-error

Prints an error message when a function declaration is used as a statement.

--function-statement-warning

Prints a warning message when a function declaration is used as a statement.

-fx

Launches the script as a JavaFX application.

-h
-help

Prints the list of options and their descriptions.

-Joption

Passes the specified java launcher option to the JVM. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB:

>> jjs -J-Xmx4g
jjs> java.lang.Runtime.getRuntime().maxMemory()
3817799680
jjs>

This option can be repeated to pass multiple java command options.

--lazy-compilation

Enables lazy code generation strategies (that is, the entire script is not compiled at once). This option is experimental.

--loader-per-compile

Creates a new class loader per compile. By default, this option is enabled. To disable it, specify --loader-per-compile=false.

--log=subsystem:level

Performs logging at a given level for the specified subsystems. You can specify logging levels for multiple subsystems separating them with commas. For example:

--log=fields:finest,codegen:info
--package=name

Specifies the package to which generated class files are added.

--parse-only

Parses the code without compiling.

--print-ast

Prints the abstract syntax tree.

--print-code

Prints bytecode.

--print-lower-ast

Prints the lowered abstract syntax tree.

--print-lower-parse

Prints the lowered parse tree.

--print-no-newline

Forces other --print* options to print the output on one line.

--print-parse

Prints the parse tree.

--print-symbols

Prints the symbol table.

-pcs
--profile-callsites

Dumps callsite profile data.

-scripting

Enables shell scripting features.

--stderr=filename|stream|tty

Redirects the standard error stream to the specified file, stream (for example, to stdout), or text terminal.

--stdout=filename|stream|tty

Redirects the standard output stream to the specified file, stream (for example, to stderr), or text terminal.

-strict

Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5.1), making it easier to detect common coding errors.

-t=zone
-timezone=zone

Sets the specified time zone for script execution. It overrides the time zone set in the OS and used by the Date object.

-tcs=parameter
--trace-callsites=parameter

Enables callsite trace mode. Possible parameters are the following:

miss

Trace callsite misses.

enterexit

Trace callsite enter/exit.

objects

Print object properties.

--verify-code

Verifies bytecode before running.

-v
-version

Prints the Nashorn version string.

-xhelp

Prints extended help for command-line options.

Examples

Example 1Running a Script with Nashorn
jjs script.js
Example 2Running Nashorn in Interactive Mode
>> jjs
jjs> println("Hello, World!")
Hello, World!
jjs> quit()
>>
Example 3Passing Arguments to Nashorn
>> jjs -- a b c
jjs> arguments.join(", ")
a, b, c
jjs>

See Also

jrunscript

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jmap

Prints shared object memory maps or heap memory details for a process, core file, or remote debug server. This command is experimental and unsupported.

Synopsis

jmap [ options ] pid

jmap [ options ] executable core

jmap [ options ] [ pid ] server-id@ ] remote-hostname-or-IP

options

The command-line options. See Options.

pid

The process ID for which the memory map is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, use the jps(1) command.

executable

The Java executable from which the core dump was produced.

core

The core file for which the memory map is to be printed.

remote-hostname-or-IP

The remote debug server hostname or IP address. See jsadebugd(1).

server-id

An optional unique ID to use when multiple debug servers are running on the same remote host.

Description

The jmap command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server. If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the -J-d64 option, for example: jmap -J-d64 -heap pid.

Note: This utility is unsupported and might not be available in future releases of the JDK. On Windows Systems where the dbgeng.dll file is not present, Debugging Tools For Windows must be installed to make these tools work. The PATH environment variable should contain the location of the jvm.dll file that is used by the target process or the location from which the crash dump file was produced, for example: set PATH=%JDK_HOME%\jre\bin\client;%PATH%.

Options

<no option>

When no option is used, the jmap command prints shared object mappings. For each shared object loaded in the target JVM, the start address, size of the mapping, and the full path of the shared object file are printed. This behavior is similar to the Oracle Solaris pmap utility.

-dump:[live,] format=b, file=filename

Dumps the Java heap in hprof binary format to filename. The live suboption is optional, but when specified, only the active objects in the heap are dumped. To browse the heap dump, you can use the jhat(1) command to read the generated file.

-finalizerinfo

Prints information about objects that are awaiting finalization.

-heap

Prints a heap summary of the garbage collection used, the head configuration, and generation-wise heap usage. In addition, the number and size of interned Strings are printed.

-histo[:live]

Prints a histogram of the heap. For each Java class, the number of objects, memory size in bytes, and the fully qualified class names are printed. The JVM internal class names are printed with an asterisk (*) prefix. If the live suboption is specified, then only active objects are counted.

-clstats

Prints class loader wise statistics of Java heap. For each class loader, its name, how active it is, address, parent class loader, and the number and size of classes it has loaded are printed.

-F

Force. Use this option with the jmap -dump or jmap -histo option when the pid does not respond. The live suboption is not supported in this mode.

-h

Prints a help message.

-help

Prints a help message.

-Jflag

Passes flag to the Java Virtual Machine where the jmap command is running.

See Also

  • jhat(1)

  • jps(1)

  • jsadebugd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jmc

Java Mission Control is a Profiling, Monitoring, and Diagnostics Tools Suite.

Synopsis

jmc [ options ]

Options, if used, should follow immediately after the command name. Options may be in any order. For more information about the options used with the jmc command, see Options.

Description

Java Mission Control is a tool for production time profiling and diagnostics for the HotSpot JVM. The two main features of Java Mission Control are the Management Console and Java Flight Recorder, but several more features are offered as plug-ins, which can be downloaded from the tool. Java Mission Control is also available as a set of plug-ins for the Eclipse IDE.

Options

The following options are available when you launch Java Mission Control.

-help

Prints jmc command help.

-version

Prints the version of Java Mission Control and exit.

-showversion

Prints the version of Java Mission Control and continue.

-debug

Enables debug output.

-consoleLog

Prints the Eclipse log on the console. (Flag from Eclipse).

-data workspace

Sets the workspace used while running Java Mission Control. The default workspace is $HOME/.jmc. (Flag from Eclipse).

-open file

Opens the file in Java Mission Control. For example, to open a Flight Recording file (.jfr file).

eclipse-option

Passes this eclipse-option to the underlying Eclipse platform.

-Jjvm-option

Passes this jvm-option to the running Java Virtual Machine.

See Also

  •

    Oracle Java SE Advanced and Oracle Java SE Suite at http://www.oracle.com/us/technologies/java/standard-edition/advanced-suite/overview/index.html

    •

  •

    JMC Developer Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/jmc/index.html

    •

                Contents
                Previous
                Next

  Oracle and/or its affiliates

Copyright
© 1993, 2014, Oracle and/or its affiliates. All rights
reserved.

Contact
Us


jps

Lists the instrumented Java Virtual Machines (JVMs) on the target system. This command is experimental and unsupported.

Synopsis

jps [ options ] [ hostid ]

options

Command-line options. See Options.

hostid

The identifier of the host for which the process report should be generated. The hostid can include optional components that indicate the communications protocol, port number, and other implementation specific data. See Host Identifier.

Description

The jps command lists the instrumented Java HotSpot VMs on the target system. The command is limited to reporting information on JVMs for which it has the access permissions.

If the jps command is run without specifying a hostid, then it searches for instrumented JVMs on the local host. If started with a hostid, then it searches for JVMs on the indicated host, using the specified protocol and port. A jstatd process is assumed to be running on the target host.

The jps command reports the local JVM identifier, or lvmid, for each instrumented JVM found on the target system. The lvmid is typically, but not necessarily, the operating system's process identifier for the JVM process. With no options, jps lists each Java application's lvmid followed by the short form of the application's class name or jar file name. The short form of the class name or JAR file name omits the class's package information or the JAR files path information.

The jps command uses the Java launcher to find the class name and arguments passed to the main method. If the target JVM is started with a custom launcher, then the class or JAR file name and the arguments to the main method are not available. In this case, the jps command outputs the string Unknown for the class name or JAR file name and for the arguments to the main method.

The list of JVMs produced by the jps command can be limited by the permissions granted to the principal running the command. The command only lists the JVMs for which the principle has access rights as determined by operating system-specific access control mechanisms.

Options

The jps command supports a number of options that modify the output of the command. These options are subject to change or removal in the future.

-q

Suppresses the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local JVM identifiers.

-m

Displays the arguments passed to the main method. The output may be null for embedded JVMs.

-l

Displays the full package name for the application's main class or the full path name to the application's JAR file.

-v

Displays the arguments passed to the JVM.

-V

Suppresses the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local JVM identifiers.

-Joption

Passes option to the JVM, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Host Identifier

The host identifier, or hostid is a string that indicates the target system. The syntax of the hostid string corresponds to the syntax of a URI:

[protocol:][[//]hostname][:port][/servername]
protocol

The communications protocol. If the protocol is omitted and a hostname is not specified, then the default protocol is a platform-specific, optimized, local protocol. If the protocol is omitted and a host name is specified, then the default protocol is rmi.

hostname

A hostname or IP address that indicates the target host. If you omit the hostname parameter, then the target host is the local host.

port

The default port for communicating with the remote server. If the hostname parameter is omitted or the protocol parameter specifies an optimized, local protocol, then the port parameter is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol, the port parameter indicates the port number for the rmiregistry on the remote host. If the port parameter is omitted, and the protocol parameter indicates rmi, then the default rmiregistry port (1099) is used.

servername

The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the rmi protocol, this parameter is a string that represents the name of the RMI remote object on the remote host. See the jstatd command -n option for more information.

Output Format

The output of the jps command follows the following pattern:

lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [ jvmarg* ] ]

All output tokens are separated by white space. An arg value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters.

Note: It is recommended that you do not write scripts to parse jps output because the format might change in future releases. If you write scripts that parse jps output, then expect to modify them for future releases of this tool.

Examples

This section provides examples of the jps command.

List the instrumented JVMs on the local host:

jps
18027 Java2Demo.JAR
18032 jps
18005 jstat

The following example lists the instrumented JVMs on a remote host. This example assumes that the jstat server and either the its internal RMI registry or a separate external rmiregistry process are running on the remote host on the default port (port 1099). It also assumes that the local host has appropriate permissions to access the remote host. This example also includes the -l option to output the long form of the class names or JAR file names.

jps -l remote.domain
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
2857 sun.tools.jstatd.jstatd

The following example lists the instrumented JVMs on a remote host with a non-default port for the RMI registry. This example assumes that the jstatd server, with an internal RMI registry bound to port 2002, is running on the remote host. This example also uses the -m option to include the arguments passed to the main method of each of the listed Java applications.

jps -m remote.domain:2002
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
3102 sun.tools.jstatd.jstatd -p 2002

See Also

  • java(1)

  • jstat(1)

  • jstatd(1)

  • rmiregistry(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jrunscript

Runs a command-line script shell that supports interactive and batch modes. This command is experimental and unsupported.

Synopsis

jrunscript [options] [arguments]

options

The command-line options. See Options.

arguments

Arguments, when used, follow immediately after options or the command name. See Arguments.

Description

The jrunscript command is a language-independent command-line script shell. The jrunscript command supports both an interactive (read-eval-print) mode and a batch (-f option) mode of script execution. By default, JavaScript is the language used, but the -l option can be used to specify a different language. By using Java to scripting language communication, the jrunscript command supports an exploratory programming style.

Options

-classpath path

Indicate where any class files are that the script needs to access.

-cp path

Same as -classpath path.

-Dname=value

Sets a Java system property.

-Jflag

Passes flag directly to the Java Virtual Machine where the jrunscript command is running.

-I language

Uses the specified scripting language. By default, JavaScript is used. To use other scripting languages, you must specify the corresponding script engine's JAR file with the -cp or -classpath option.

-e script

Evaluates the specified script. This option can be used to run one-line scripts that are specified completely on the command line.

-encoding encoding

Specifies the character encoding used to read script files.

-f script-file

Evaluates the specified script file (batch mode).

-f -

Reads and evaluates a script from standard input (interactive mode).

-help

Displays a help message and exits.

-?

Displays a help message and exits.

-q

Lists all script engines available and exits.

Arguments

If arguments are present and if no -e or -f option is used, then the first argument is the script file and the rest of the arguments, if any, are passed to the script. If arguments and -e or the -f option are used, then all arguments are passed to the script. If arguments, -e and -f are missing, then interactive mode is used. Script arguments are available to a script in an engine variable named arguments of type String array.

Examples

Execute Inline Scripts

jrunscript -e "print('hello world')"
jrunscript -e "cat('http://www.example.com')"

Use Specified Language and Evaluate the Script File

jrunscript -l js -f test.js

Interactive Mode

jrunscript
js> print('Hello World\n');
Hello World
js> 34 + 55
89.0
js> t = new java.lang.Thread(function() { print('Hello World\n'); })
Thread[Thread-0,5,main]
js> t.start()
js> Hello World

js>

Run Script File with Script Arguments

The test.js file is the script file. The arg1, arg2 and arg3 arguments are passed to the script. The script can access these arguments with an arguments array.

jrunscript test.js arg1 arg2 arg3

See Also

If JavaScript is used, then before it evaluates a user defined script, the jrunscript command initializes certain built-in functions and objects, which are documented in the API Specification for jrunscript JavaScript built-ins:

http://docs.oracle.com/javase/7/docs/technotes/tools/share/jsdocs/overview-summary.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jsadebugd

Attaches to a Java process or core file and acts as a debug server. This command is experimental and unsupported.

Synopsis

jsadebugd pid [ server-id ]

jsadebugd executable core [ server-id ]

pid

The process ID of the process to which the debug server attaches. The process must be a Java process. To get a list of Java processes running on a machine, use the jps(1) command. At most one instance of the debug server can be attached to a single process.

executable

The Java executable from which the core dump was produced.

core

The core file to which the debug server should attach.

server-id

An optional unique ID that is needed when multiple debug servers are started on the same machine. This ID must be used by remote clients to identify the particular debug server to which to attach. Within a single machine, this ID must be unique.

Description

The jsadebugd command attaches to a Java process or core file and acts as a debug server. Remote clients such as jstack, jmap, and jinfo can attach to the server through Java Remote Method Invocation (RMI). Before you start the jsadebugd command, start the RMI registry with the rmiregistry command as follows where $JAVA_HOME is the JDK installation directory:

rmiregistry -J-Xbootclasspath/p:$JAVA_HOME/lib/sajdi.jar

If the RMI registry was not started, then the jsadebugd command starts an RMI registry in a standard (1099) port internally. The debug server can be stopped by sending a SIGINT to it. To send a SIGINT press Ctrl+C.

Note: This utility is unsupported and may or may not be available in future releases of the JDK. In Windows Systems where dbgeng.dll is not present, Debugging Tools For Windows must be installed to have these tools working. The PATH environment variable should contain the location of jvm.dll used by the target process or the location from which the crash dump file was produced. For example, set PATH=%JDK_HOME%\jre\bin\client;%PATH%.

See Also

  • jinfo(1)

  • jmap(1)

  • jps(1)

  • jstack(1)

  • rmiregistry(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jstack

Prints Java thread stack traces for a Java process, core file, or remote debug server. This command is experimental and unsupported.

Synopsis

jstack [ options ] pid

jstack [ options ] executable core

jstack [ options ] [ server-id@ ] remote-hostname-or-IP

options

The command-line options. See Options.

pid

The process ID for which the stack trace is printed. The process must be a Java process. To get a list of Java processes running on a machine, use the jps(1) command.

executable

The Java executable from which the core dump was produced.

core

The core file for which the stack trace is to be printed.

remote-hostname-or-IP

The remote debug server hostname or IP address. See jsadebugd(1).

server-id

An optional unique ID to use when multiple debug servers are running on the same remote host.

Description

The jstack command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed. With the -m option, the jstack command prints both Java and native frames of all threads with the program counter (PC). For each native frame, the closest native symbol to PC, when available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command can be piped to c++filt. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the -J-d64 option, for example: jstack -J-d64 -m pid.

Note: This utility is unsupported and might not be available in future release of the JDK. In Windows Systems where the dbgeng.dll file is not present, Debugging Tools For Windows must be installed so these tools work. The PATH environment variable needs to contain the location of the jvm.dll that is used by the target process, or the location from which the crash dump file was produced. For example:

set PATH=<jdk>\jre\bin\client;%PATH%

Options

-F

Force a stack dump when jstack [-l] pid does not respond.

-l

Long listing. Prints additional information about locks such as a list of owned java.util.concurrent ownable synchronizers. See the AbstractOwnableSynchronizer class description at
http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html

-m

Prints a mixed mode stack trace that has both Java and native C/C++ frames.

-h

Prints a help message.

-help

Prints a help message.

Known Bugs

In mixed mode stack trace, the -m option does not work with the remote debug server.

See Also

  • pstack(1)

  • C++filt(1)

  • jps(1)

  • jsadebugd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jstat

Monitors Java Virtual Machine (JVM) statistics. This command is experimental and unsupported.

Synopsis

jstat [ generalOption | outputOptions vmid [ interval[s|ms] [ count ] ]

generalOption

A single general command-line option -help or -options. See General Options.

outputOptions

One or more output options that consist of a single statOption, plus any of the -t, -h, and -J options. See Output Options.

vmid

Virtual machine identifier, which is a string that indicates the target JVM. The general syntax is the following:

[protocol:][//]lvmid[@hostname[:port]/servername]

The syntax of the vmid string corresponds to the syntax of a URI. The vmid string can vary from a simple integer that represents a local JVM to a more complex construction that specifies a communications protocol, port number, and other implementation-specific values. See Virtual Machine Identifier.

interval [s|ms]

Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds. Must be a positive integer. When specified, the jstat command produces its output at each interval.

count

Number of samples to display. The default value is infinity which causes the jstat command to display statistics until the target JVM terminates or the jstat command is terminated. This value must be a positive integer.

Description

The jstat command displays performance statistics for an instrumented Java HotSpot VM. The target JVM is identified by its virtual machine identifier, or vmid option.

Virtual Machine Identifier

The syntax of the vmid string corresponds to the syntax of a URI:

[protocol:][//]lvmid[@hostname[:port]/servername]
protocol

The communications protocol. If the protocol value is omitted and a host name is not specified, then the default protocol is a platform-specific optimized local protocol. If the protocol value is omitted and a host name is specified, then the default protocol is rmi.

lvmid

The local virtual machine identifier for the target JVM. The lvmid is a platform-specific value that uniquely identifies a JVM on a system. The lvmid is the only required component of a virtual machine identifier. The lvmid is typically, but not necessarily, the operating system's process identifier for the target JVM process. You can use the jps command to determine the lvmid. Also, you can determine the lvmid on UNIX platforms with the ps command, and on Windows with the Windows Task Manager.

hostname

A hostname or IP address that indicates the target host. If the hostname value is omitted, then the target host is the local host.

port

The default port for communicating with the remote server. If the hostname value is omitted or the protocol value specifies an optimized, local protocol, then the port value is ignored. Otherwise, treatment of the port parameter is implementation-specific. For the default rmi protocol, the port value indicates the port number for the rmiregistry on the remote host. If the port value is omitted and the protocol value indicates rmi, then the default rmiregistry port (1099) is used.

servername

The treatment of the servername parameter depends on implementation. For the optimized local protocol, this field is ignored. For the rmi protocol, it represents the name of the RMI remote object on the remote host.

Options

The jstat command supports two types of options, general options and output options. General options cause the jstat command to display simple usage and version information. Output options determine the content and format of the statistical output.

All options and their functionality are subject to change or removal in future releases.

General Options

If you specify one of the general options, then you cannot specify any other option or parameter.

-help

Displays a help message.

-options

Displays a list of static options. See Output Options.

Output Options

If you do not specify a general option, then you can specify output options. Output options determine the content and format of the jstat command's output, and consist of a single statOption, plus any of the other output options (-h, -t, and -J). The statOption must come first.

Output is formatted as a table, with columns that are separated by spaces. A header row with titles describes the columns. Use the -h option to set the frequency at which the header is displayed. Column header names are consistent among the different options. In general, if two options provide a column with the same name, then the data source for the two columns is the same.

Use the -t option to display a time stamp column, labeled Timestamp as the first column of output. The Timestamp column contains the elapsed time, in seconds, since the target JVM started. The resolution of the time stamp is dependent on various factors and is subject to variation due to delayed thread scheduling on heavily loaded systems.

Use the interval and count parameters to determine how frequently and how many times, respectively, the jstat command displays its output.

Note: Do not to write scripts to parse the jstat command's output because the format might change in future releases. If you write scripts that parse jstat command output, then expect to modify them for future releases of this tool.

-statOption

Determines the statistics information the jstat command displays. The following lists the available options. Use the -options general option to display the list of options for a particular platform installation. See Stat Options and Output.

class: Displays statistics about the behavior of the class loader.

compiler: Displays statistics about the behavior of the Java HotSpot VM Just-in-Time compiler.

gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcnew: Displays statistics of the behavior of the new generation.

gcnewcapacity: Displays statistics about the sizes of the new generations and its corresponding spaces.

gcold: Displays statistics about the behavior of the old generation and Metaspace Statistics.

gcoldcapacity: Displays statistics about the sizes of the old generation.

gcmetacapacity: Displays statistics about the sizes of the metaspace.

gcutil: Displays a summary about garbage collection statistics.

printcompilation: Displays Java HotSpot VM compilation method statistics.

-h n

Displays a column header every n samples (output rows), where n is a positive integer. Default value is 0, which displays the column header the first row of data.

-t

Displays a timestamp column as the first column of output. The time stamp is the time since the start time of the target JVM.

-JjavaOption

Passes javaOption to the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. For a complete list of options, see java(1).

Stat Options and Output

The following information summarizes the columns that the jstat command outputs for each statOption.

-class option

Class loader statistics.

Loaded: Number of classes loaded.

Bytes: Number of KBs loaded.

Unloaded: Number of classes unloaded.

Bytes: Number of Kbytes unloaded.

Time: Time spent performing class loading and unloading operations.

-compiler option

Java HotSpot VM Just-in-Time compiler statistics.

Compiled: Number of compilation tasks performed.

Failed: Number of compilations tasks failed.

Invalid: Number of compilation tasks that were invalidated.

Time: Time spent performing compilation tasks.

FailedType: Compile type of the last failed compilation.

FailedMethod: Class name and method of the last failed compilation.

-gc option

Garbage-collected heap statistics.

S0C: Current survivor space 0 capacity (KB).

S1C: Current survivor space 1 capacity (KB).

S0U: Survivor space 0 utilization (KB).

S1U: Survivor space 1 utilization (KB).

EC: Current eden space capacity (KB).

EU: Eden space utilization (KB).

OC: Current old space capacity (KB).

OU: Old space utilization (KB).

MC: Metaspace capacity (KB).

MU: Metacspace utilization (KB).

YGC: Number of young generation garbage collection events.

YGCT: Young generation garbage collection time.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total garbage collection time.

-gccapacity option

Memory pool generation and space capacities.

NGCMN: Minimum new generation capacity (KB).

NGCMX: Maximum new generation capacity (KB).

NGC: Current new generation capacity (KB).

S0C: Current survivor space 0 capacity (KB).

S1C: Current survivor space 1 capacity (KB).

EC: Current eden space capacity (KB).

OGCMN: Minimum old generation capacity (KB).

OGCMX: Maximum old generation capacity (KB).

OGC: Current old generation capacity (KB).

OC: Current old space capacity (KB).

MCMN: Minimum metaspace capacity (KB).

MCMX: Maximum metaspace capacity (KB).

MC: Metaspace capacity (KB).

YGC: Number of Young generation GC Events.

FGC: Number of Full GC Events.

-gccause option

This option displays the same summary of garbage collection statistics as the -gcutil option, but includes the causes of the last garbage collection event and (when applicable) the current garbage collection event. In addition to the columns listed for -gcutil, this option adds the following columns.

Garbage collection statistics, including garbage collection Events.

LGCC: Cause of last garbage collection.

GCC: Cause of current garbage collection.

-gcnew option

New generation statistics.

S0C: Current survivor space 0 capacity (KB).

S1C: Current survivor space 1 capacity (KB).

S0U: Survivor space 0 utilization (KB).

S1U: Survivor space 1 utilization (KB).

TT: Tenuring threshold.

MTT: Maximum tenuring threshold.

DSS: Desired survivor size (KB).

EC: Current eden space capacity (KB).

EU: Eden space utilization (KB).

YGC: Number of young generation GC events.

YGCT: Young generation garbage collection time.

-gcnewcapacity option

New generation space size statistics.

NGCMN: Minimum new generation capacity (KB).

NGCMX: Maximum new generation capacity (KB).

NGC: Current new generation capacity (KB).

S0CMX: Maximum survivor space 0 capacity (KB).

S0C: Current survivor space 0 capacity (KB).

S1CMX: Maximum survivor space 1 capacity (KB).

S1C: Current survivor space 1 capacity (KB).

ECMX: Maximum eden space capacity (KB).

EC: Current eden space capacity (KB).

YGC: Number of young generation GC events.

FGC: Number of Full GC Events.

-gcold option

old and permanent generation statistics.

MC: Metaspace capacity (KB).

MU: Metaspace utilization (KB).

OC: Current old space capacity (KB).

OU: old space utilization (KB).

YGC: Number of young generation GC events.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total garbage collection time.

-gcoldcapacity option

Old generation statistics.

OGCMN: Minimum old generation capacity (KB).

OGCMX: Maximum old generation capacity (KB).

OGC: Current old generation capacity (KB).

OC: Current old space capacity (KB).

YGC: Number of young generation GC events.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total garbage collection time.

-gcmetacapacity option

Permanent generation statistics.

MCMN: Minimum metaspace capacity (KB).

MCMX: Maximum metaspace capacity (KB).

MC: Metaspace capacity (KB).

YGC: Number of young generation GC events.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total garbage collection time.

-gcutil option

Summary of garbage collection statistics.

S0: Survivor space 0 utilization as a percentage of the space's current capacity.

S1: Survivor space 1 utilization as a percentage of the space's current capacity.

E: Eden space utilization as a percentage of the space's current capacity.

O: Old space utilization as a percentage of the space's current capacity.

M: Metaspace utilization as a percentage of the space's current capacity.

YGC: Number of young generation GC events.

YGCT: Young generation garbage collection time.

FGC: Number of full GC events.

FGCT: Full garbage collection time.

GCT: Total garbage collection time.

-printcompilation option

Java HotSpot VM compiler method statistics.

Compiled: Number of compilation tasks performed by the most recently compiled method.

Size: Number of bytes of byte code of the most recently compiled method.

Type: Compilation type of the most recently compiled method.

Method: Class name and method name identifying the most recently compiled method. Class name uses slash (/) instead of dot (.) as a name space separator. Method name is the method within the specified class. The format for these two fields is consistent with the HotSpot -XX:+PrintCompilation option.

Examples

This section presents some examples of monitoring a local JVM with an lvmid of 21891.

The gcutil Option

This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and displays the output as specified by the -gcutil option.

The output of this example shows that a young generation collection occurred between the third and fourth sample. The collection took 0.001 seconds and promoted objects from the eden space (E) to the old space (O), resulting in an increase of old space utilization from 9.49% to 9.51%. Before the collection, the survivor space was 12.44% utilized, but after this collection it is only 7.74% utilized.

jstat -gcutil 21891 250 7
  S0     S1     E      O      M       YGC    YGCT    FGC    FGCT     GCT
0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.49   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.80   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.80   7.86  95.82      3    0.124     0    0.000    0.124
0.00  99.74  13.80   7.86  95.82      3    0.124     0    0.000    0.124

Repeat the Column Header String

This example attaches to lvmid 21891 and takes samples at 250 millisecond intervals and displays the output as specified by -gcutil option. In addition, it uses the -h3 option to output the column header after every 3 lines of data.

In addition to showing the repeating header string, this example shows that between the second and third samples, a young GC occurred. Its duration was 0.001 seconds. The collection found enough active data that the survivor space 0 utilization (S0U) would have exceeded the desired survivor Size (DSS). As a result, objects were promoted to the old generation (not visible in this output), and the tenuring threshold (TT) was lowered from 31 to 2.

Another collection occurs between the fifth and sixth samples. This collection found very few survivors and returned the tenuring threshold to 31.

jstat -gcnew -h3 21891 250
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
  64.0   64.0    0.0   31.7 31  31   32.0    512.0    178.6    249    0.203
  64.0   64.0    0.0   31.7 31  31   32.0    512.0    355.5    249    0.203
  64.0   64.0   35.4    0.0  2  31   32.0    512.0     21.9    250    0.204
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
  64.0   64.0   35.4    0.0  2  31   32.0    512.0    245.9    250    0.204
  64.0   64.0   35.4    0.0  2  31   32.0    512.0    421.1    250    0.204
  64.0   64.0    0.0   19.0 31  31   32.0    512.0     84.4    251    0.204
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT
  64.0   64.0    0.0   19.0 31  31   32.0    512.0    306.7    251    0.204

Include a Time Stamp for Each Sample

This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals. The -t option is used to generate a time stamp for each sample in the first column.

The Timestamp column reports the elapsed time in seconds since the start of the target JVM. In addition, the -gcoldcapacity output shows the old generation capacity (OGC) and the old space capacity (OC) increasing as the heap expands to meet allocation or promotion demands. The old generation capacity (OGC) has grown to from 11,696 KB to 13820 KB after the eighty-first full garbage collection (FGC). The maximum capacity of the generation (and space) is 60,544 KB (OGCMX), so it still has room to expand.

Timestamp      OGCMN    OGCMX     OGC       OC       YGC   FGC    FGCT    GCT
          150.1   1408.0  60544.0  11696.0  11696.0   194    80    2.874   3.799
          150.4   1408.0  60544.0  13820.0  13820.0   194    81    2.938   3.863
          150.7   1408.0  60544.0  13820.0  13820.0   194    81    2.938   3.863

Monitor Instrumentation for a Remote JVM

This example attaches to lvmid 40496 on the system named remote.domain using the -gcutil option, with samples taken every second indefinitely.

The lvmid is combined with the name of the remote host to construct a vmid of 40496@remote.domain. This vmid results in the use of the rmi protocol to communicate to the default jstatd server on the remote host. The jstatd server is located using the rmiregistry on remote.domain that is bound to the default rmiregistry port (port 1099).

jstat -gcutil 40496@remote.domain 1000
... output omitted

See Also

  • java(1)

  • jps(1)

  • jstatd(1)

  • rmiregistry(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jstatd

Monitors Java Virtual Machines (JVMs) and enables remote monitoring tools to attach to JVMs. This command is experimental and unsupported.

Synopsis

jstatd [ options ]

options

The command-line options. See Options.

Description

The jstatd command is an RMI server application that monitors for the creation and termination of instrumented Java HotSpot VMs and provides an interface to enable remote monitoring tools to attach to JVMs that are running on the local host.

The jstatd server requires an RMI registry on the local host. The jstatd server attempts to attach to the RMI registry on the default port, or on the port you specify with the -p port option. If an RMI registry is not found, then one is created within the jstatd application that is bound to the port that is indicated by the -p port option or to the default RMI registry port when the -p port option is omitted. You can stop the creation of an internal RMI registry by specifying the -nr option.

Options

-nr

Does not attempt to create an internal RMI registry within the jstatd process when an existing RMI registry is not found.

-p port

The port number where the RMI registry is expected to be found, or when not found, created if the -nr option is not specified.

-n rminame

Name to which the remote RMI object is bound in the RMI registry. The default name is JStatRemoteHost. If multiple jstatd servers are started on the same host, then the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so requires that the unique server name be included in the monitoring client's hostid and vmid strings.

-Joption

Passes option to the JVM, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Security

The jstatd server can only monitor JVMs for which it has the appropriate native access permissions. Therefore, the jstatd process must be running with the same user credentials as the target JVMs. Some user credentials, such as the root user in UNIX-based systems, have permission to access the instrumentation exported by any JVM on the system. A jstatd process running with such credentials can monitor any JVM on the system, but introduces additional security concerns.

The jstatd server does not provide any authentication of remote clients. Therefore, running a jstatd server process exposes the instrumentation export by all JVMs for which the jstatd process has access permissions to any user on the network. This exposure might be undesirable in your environment, and therefore, local security policies should be considered before you start the jstatd process, particularly in production environments or on networks that are not secure.

The jstatd server installs an instance of RMISecurityPolicy when no other security manager is installed, and therefore, requires a security policy file to be specified. The policy file must conform to Default Policy Implementation and Policy File Syntax at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html

The following policy file allows the jstatd server to run without any security exceptions. This policy is less liberal than granting all permissions to all code bases, but is more liberal than a policy that grants the minimal permissions to run the jstatd server.

grant codebase "file:${java.home}/../lib/tools.jar" {
    permission java.security.AllPermission;
};

To use this policy setting, copy the text into a file called jstatd.all.policy and run the jstatd server as follows:

jstatd -J-Djava.security.policy=jstatd.all.policy

For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP address spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the jstatd server and use the jstat and jps tools locally.

Remote Interface

The interface exported by the jstatd process is proprietary and guaranteed to change. Users and developers are discouraged from writing to this interface.

Examples

The following are examples of the jstatd command. The jstatd scripts automatically start the server in the background

Internal RMI Registry

This example shows how to start a jstatd session with an internal RMI registry. This example assumes that no other server is bound to the default RMI registry port (port 1099).

jstatd -J-Djava.security.policy=all.policy

External RMI Registry

This example starts a jstatd session with a external RMI registry.

rmiregistry&
jstatd -J-Djava.security.policy=all.policy

This example starts a jstatd session with an external RMI registry server on port 2020.

jrmiregistry 2020&
jstatd -J-Djava.security.policy=all.policy -p 2020

This example starts a jstatd session with an external RMI registry on port 2020 that is bound to AlternateJstatdServerName.

rmiregistry 2020&
jstatd -J-Djava.security.policy=all.policy -p 2020
    -n AlternateJstatdServerName

Stop the Creation of an In-Process RMI Registry

This example starts a jstatd session that does not create an RMI registry when one is not found. This example assumes an RMI registry is already running. If an RMI registry is not running, then an error message is displayed.

jstatd -J-Djava.security.policy=all.policy -nr

Enable RMI Logging

This example starts a jstatd session with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.

jstatd -J-Djava.security.policy=all.policy
    -J-Djava.rmi.server.logCalls=true

See Also

  • java(1)

  • jps(1)

  • jstat(1)

  • rmiregistry(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jvisualvm

Visually monitors, troubleshoots, and profiles Java applications.

Synopsis

jvisualvm [ options ]

options

The command-line options. See Options.

Description

Java VisualVM is an intuitive graphical user interface that provides detailed information about Java technology-based applications (Java applications) while they are running on a specified Java Virtual Machine (JVM). The name Java VisualVM comes from the fact that Java VisualVM provides information about the JVM software visually.

Java VisualVM combines several monitoring, troubleshooting, and profiling utilities into a single tool. For example, most of the functionality offered by the standalone tools jmap, jinfo, jstat, and jstack were integrated into Java VisualVM. Other functionality, such as some that offered by the jconsole command, can be added as optional plug-ins.

Java VisualVM is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM enables developers to generate and analyze heap dumps, track down memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU profiling. You can expand the Java VisualVM functionality with plug-ins. For example, most of the functionality of the jconsole command is available through the MBeans Tab and JConsole Plug-in Wrapper plug-ins. You can choose from a catalog of standard Java VisualVM plug-ins by selecting Tools and then Plugins in the Java VisualVM menus.

Start Java VisualVM with the following command:

%  jvisualvm <options>

Options

The following option is available when you launch Java VisualVM

-Jjvm_option

Pass this jvm_option to the JVM software

See Also

  • Java VisualVM developer's site
    http://visualvm.java.net/

  • Java VisualVM in Java SE documentation
    http://docs.oracle.com/javase/8/docs/technotes/guides/visualvm/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


keytool

Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

Synopsis

keytool [commands]

commands

See Commands. These commands are categorized by task as follows:

  • Create or Add Data to the Keystore

    • -gencert

    • -genkeypair

    • -genseckey

    • -importcert

    • -importpassword

  • Import Contents From Another Keystore

    • -importkeystore

  • Generate Certificate Request

    • -certreq

  • Export Data

    • -exportcert

  • Display Data

    • -list

    • -printcert

    • -printcertreq

    • -printcrl

  • Manage the Keystore

    • -storepasswd

    • -keypasswd

    • -delete

    • -changealias

  • Get Help

    • -help

Description

The keytool command is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself or herself to other users and services) or data integrity and authentication services, using digital signatures. The keytool command also enables users to cache the public keys (in the form of certificates) of their communicating peers.

A certificate is a digitally signed statement from one entity (person, company, and so on.), that says that the public key (and some other information) of some other entity has a particular value. (See Certificate.) When data is digitally signed, the signature can be verified to check the data integrity and authenticity. Integrity means that the data has not been modified or tampered with, and authenticity means the data comes from whoever claims to have created and signed it.

The keytool command also enables users to administer secret keys and passphrases used in symmetric encryption and decryption (DES).

The keytool command stores the keys and certificates in a keystore. See KeyStore aliases.

Command and Option Notes

See Commands for a listing and description of the various commands.

  • All command and option names are preceded by a minus sign (-).

  • The options for each command can be provided in any order.

  • All items not italicized or in braces or brackets are required to appear as is.

  • Braces surrounding an option signify that a default value will be used when the option is not specified on the command line. See Option Defaults. Braces are also used around the -v, -rfc, and -J options, which only have meaning when they appear on the command line. They do not have any default values other than not existing.

  • Brackets surrounding an option signify that the user is prompted for the values when the option is not specified on the command line. For the -keypass option, if you do not specify the option on the command line, then the keytool command first attempts to use the keystore password to recover the private/secret key. If this attempt fails, then the keytool command prompts you for the private/secret key password.

  • Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command:

    keytool -printcert {-file cert_file} {-v}

    When you specify a -printcert command, replace cert_file with the actual file name, as follows: keytool -printcert -file VScert.cer

  • Option values must be put in quotation marks when they contain a blank (space).

  • The -help option is the default. The keytool command is the same as keytool -help.

Option Defaults

The following examples show the defaults for various option values.

-alias "mykey"

-keyalg
    "DSA" (when using -genkeypair)
    "DES" (when using -genseckey)

-keysize
    2048 (when using -genkeypair and -keyalg is "RSA")
    1024 (when using -genkeypair and -keyalg is "DSA")
    256 (when using -genkeypair and -keyalg is "EC")
    56 (when using -genseckey and -keyalg is "DES")
    168 (when using -genseckey and -keyalg is "DESede")

-validity 90

-keystore <the file named .keystore in the user's home directory>

-storetype <the value of the "keystore.type" property in the
    security properties file, which is returned by the static
    getDefaultType method in java.security.KeyStore>

-file
    stdin (if reading)
    stdout (if writing)

-protected false

In generating a public/private key pair, the signature algorithm (-sigalg option) is derived from the algorithm of the underlying private key:

  • If the underlying private key is of type DSA, then the -sigalg option defaults to SHA1withDSA.

  • If the underlying private key is of type RSA, then the -sigalg option defaults to SHA256withRSA.

  • If the underlying private key is of type EC, then the -sigalg option defaults to SHA256withECDSA.

For a full list of -keyalg and -sigalg arguments, see Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

Common Options

The -v option can appear for all commands except -help. When the -v option appears, it signifies verbose mode, which means that more information is provided in the output.

There is also a -Jjavaoption argument that can appear for any command. When the -Jjavaoption appears, the specified javaoption string is passed directly to the Java interpreter. This option does not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

These options can appear for all commands operating on a keystore:

-storetype storetype

This qualifier specifies the type of keystore to be instantiated.

-keystore keystore

The keystore location.

If the JKS storetype is used and a keystore file does not yet exist, then certain keytool commands can result in a new keystore file being created. For example, if keytool -genkeypair is called and the -keystore option is not specified, the default keystore file named .keystore in the user's home directory is created when it does not already exist. Similarly, if the -keystore ks_file option is specified but ks_file does not exist, then it is created. For more information on the JKS storetype, see the KeyStore Implementation section in KeyStore aliases.

Note that the input stream from the -keystore option is passed to the KeyStore.load method. If NONE is specified as the URL, then a null stream is passed to the KeyStore.load method. NONE should be specified if the keystore is not file-based. For example, when it resides on a hardware token device.

-storepass[:env| :file] argument

The password that is used to protect the integrity of the keystore.

If the modifier env or file is not specified, then the password has the value argument, which must be at least 6 characters long. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: All other options that require passwords, such as -keypass, -srckeypass, -destkeypass, -srcstorepass, and -deststorepass, accept the env and file modifiers. Remember to separate the password option and the modifier with a colon (:).

The password must be provided to all commands that access the keystore contents. For such commands, when the -storepass option is not provided at the command line, the user is prompted for it.

When retrieving information from the keystore, the password is optional. If no password is specified, then the integrity of the retrieved information cannot be verified and a warning is displayed.

-providerName provider_name

Used to identify a cryptographic service provider's name when listed in the security properties file.

-providerClass provider_class_name

Used to specify the name of a cryptographic service provider's master class file when the service provider is not listed in the security properties file.

-providerArg provider_arg

Used with the -providerClass option to represent an optional string input argument for the constructor of provider_class_name.

-protected

Either true or false. This value should be specified as true when a password must be specified by way of a protected authentication path such as a dedicated PIN reader.Because there are two keystores involved in the -importkeystore command, the following two options -srcprotected and -destprotected are provided for the source keystore and the destination keystore respectively.

-ext {name{:critical} {=value}}

Denotes an X.509 certificate extension. The option can be used in -genkeypair and -gencert to embed extensions into the certificate generated, or in -certreq to show what extensions are requested in the certificate request. The option can appear multiple times. The name argument can be a supported extension name (see Named Extensions) or an arbitrary OID number. The value argument, when provided, denotes the argument for the extension. When value is omitted, that means that the default value of the extension or the extension requires no argument. The :critical modifier, when provided, means the extension's isCritical attribute is true; otherwise, it is false. You can use :c in place of :critical.

Named Extensions

The keytool command supports these named extensions. The names are not case-sensitive).

BC or BasicContraints

Values: The full form is: ca:{true|false}[,pathlen:<len>] or <len>, which is short for ca:true,pathlen:<len>. When <len> is omitted, you have ca:true.

KU or KeyUsage

Values: usage(,usage)*, where usage can be one of digitalSignature, nonRepudiation (contentCommitment), keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly, decipherOnly. The usage argument can be abbreviated with the first few letters (dig for digitalSignature) or in camel-case style (dS for digitalSignature or cRLS for cRLSign), as long as no ambiguity is found. The usage values are case-sensitive.

EKU or ExtendedKeyUsage

Values: usage(,usage)*, where usage can be one of anyExtendedKeyUsage, serverAuth, clientAuth, codeSigning, emailProtection, timeStamping, OCSPSigning, or any OID string. The usage argument can be abbreviated with the first few letters or in camel-case style, as long as no ambiguity is found. The usage values are case-sensitive.

SAN or SubjectAlternativeName

Values: type:value(,type:value)*, where type can be EMAIL, URI, DNS, IP, or OID. The value argument is the string format value for the type.

IAN or IssuerAlternativeName

Values: Same as SubjectAlternativeName.

SIA or SubjectInfoAccess

Values: method:location-type:location-value (,method:location-type:location-value)*, where method can be timeStamping, caRepository or any OID. The location-type and location-value arguments can be any type:value supported by the SubjectAlternativeName extension.

AIA or AuthorityInfoAccess

Values: Same as SubjectInfoAccess. The method argument can be ocsp,caIssuers, or any OID.

When name is OID, the value is the hexadecimal dumped DER encoding of the extnValue for the extension excluding the OCTET STRING type and length bytes. Any extra character other than standard hexadecimal numbers (0-9, a-f, A-F) are ignored in the HEX string. Therefore, both 01:02:03:04 and 01020304 are accepted as identical values. When there is no value, the extension has an empty value field.

A special name honored, used in -gencert only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma separated list of all (all requested extensions are honored), name{:[critical|non-critical]} (the named extension is honored, but using a different isCritical attribute) and -name (used with all, denotes an exception). Requested extensions are not honored by default.

If, besides the -ext honored option, another named or OID -ext option is provided, this extension is added to those already honored. However, if this name (or OID) also appears in the honored value, then its value and criticality overrides the one in the request.

The subjectKeyIdentifier extension is always created. For non-self-signed certificates, the authorityKeyIdentifier is created.

Note: Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Certificate Conformance Warning.

Commands

-gencert

{-rfc} {-infile infile} {-outfile outfile} {-alias alias} {-sigalg sigalg} {-dname dname} {-startdate startdate {-ext ext}* {-validity valDays} [-keypass keypass] {-keystore keystore} [-storepass storepass] {-storetype storetype} {-providername provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a certificate as a response to a certificate request file (which can be created by the keytool -certreq command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and outputs the X.509 certificate into outfile (if omitted, to the standard output). When-rfc is specified, the output format is Base64-encoded PEM; otherwise, a binary DER is created.

The sigalg value specifies the algorithm that should be used to sign the certificate. The startdate argument is the start time and date that the certificate is valid. The valDays argument tells the number of days for which the certificate should be considered valid.

When dname is provided, it is used as the subject of the generated certificate. Otherwise, the one from the certificate request is used.

The ext value shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of -ext.

The -gencert option enables you to create certificate chains. The following example creates a certificate, e1, that contains three certificates in its certificate chain.

The following commands creates four key pairs named ca, ca1, ca2, and e1:

keytool -alias ca -dname CN=CA -genkeypair
keytool -alias ca1 -dname CN=CA -genkeypair
keytool -alias ca2 -dname CN=CA -genkeypair
keytool -alias e1 -dname CN=E1 -genkeypair

The following two commands create a chain of signed certificates; ca signs ca1 and ca1 signs ca2, all of which are self-issued:

keytool -alias ca1 -certreq |
    keytool -alias ca -gencert -ext san=dns:ca1 |
    keytool -alias ca1 -importcert

keytool -alias ca2 -certreq |
    $KT -alias ca1 -gencert -ext san=dns:ca2 |
    $KT -alias ca2 -importcert

The following command creates the certificate e1 and stores it in the file e1.cert, which is signed by ca2. As a result, e1 should contain ca, ca1, and ca2 in its certificate chain:

keytool -alias e1 -certreq | keytool -alias ca2 -gencert > e1.cert
-genkeypair

{-alias alias} {-keyalg keyalg} {-keysize keysize} {-sigalg sigalg} [-dname dname] [-keypass keypass] {-startdate value} {-ext ext}* {-validity valDays} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v3 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by alias.

The keyalg value specifies the algorithm to be used to generate the key pair, and the keysize value specifies the size of each key to be generated. The sigalg value specifies the algorithm that should be used to sign the self-signed certificate. This algorithm must be compatible with the keyalg value.

The dname value specifies the X.500 Distinguished Name to be associated with the value of alias, and is used as the issuer and subject fields in the self-signed certificate. If no distinguished name is provided at the command line, then the user is prompted for one.

The value of keypass is a password used to protect the private key of the generated key pair. If no password is provided, then the user is prompted for it. If you press the Return key at the prompt, then the key password is set to the same password as the keystore password. The keypass value must be at least 6 characters.

The value of startdate specifies the issue time of the certificate, also known as the "Not Before" value of the X.509 certificate's Validity field.

The option value can be set in one of these two forms:

([+-]nnn[ymdHMS])+

[yyyy/mm/dd] [HH:MM:SS]

With the first form, the issue time is shifted by the specified value from the current time. The value is a concatenation of a sequence of subvalues. Inside each subvalue, the plus sign (+) means shift forward, and the minus sign (-) means shift backward. The time to be shifted is nnn units of years, months, days, hours, minutes, or seconds (denoted by a single character of y, m, d, H, M, or S respectively). The exact value of the issue time is calculated using the java.util.GregorianCalendar.add(int field, int amount) method on each subvalue, from left to right. For example, by specifying, the issue time will be:

Calendar c = new GregorianCalendar();
c.add(Calendar.YEAR, -1);
c.add(Calendar.MONTH, 1);
c.add(Calendar.DATE, -1);
return c.getTime()

With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local time zone). The user can provide only one part, which means the other part is the same as the current date (or time). The user must provide the exact number of digits as shown in the format definition (padding with 0 when shorter). When both the date and time are provided, there is one (and only one) space character between the two parts. The hour should always be provided in 24 hour format.

When the option is not provided, the start date is the current time. The option can be provided at most once.

The value of valDays specifies the number of days (starting at the date specified by -startdate, or the current date when -startdate is not specified) for which the certificate should be considered valid.

This command was named -genkey in earlier releases. The old name is still supported in this release. The new name, -genkeypair, is preferred going forward.

-genseckey

-genseckey {-alias alias} {-keyalg keyalg} {-keysize keysize} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a secret key and stores it in a new KeyStore.SecretKeyEntry identified by alias.

The value of keyalg specifies the algorithm to be used to generate the secret key, and the value of keysize specifies the size of the key to be generated. The keypass value is a password that protects the secret key. If no password is provided, then the user is prompted for it. If you press the Return key at the prompt, then the key password is set to the same password that is used for the keystore. The keypass value must be at least 6 characters.

-importcert

-importcert {-alias alias} {-file cert_file} [-keypass keypass] {-noprompt} {-trustcacerts} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Reads the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted reply or a sequence of X.509 certificates) from the file cert_file, and stores it in the keystore entry identified by alias. If no file is specified, then the certificate or certificate chain is read from stdin.

The keytool command can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a string that starts with -----BEGIN, and bounded at the end by a string that starts with -----END.

You import a certificate for two reasons: To add it to the list of trusted certificates, and to import a certificate reply received from a certificate authority (CA) as the result of submitting a Certificate Signing Request to that CA (see the -certreq option in Commands).

Which type of import is intended is indicated by the value of the -alias option. If the alias does not point to a key entry, then the keytool command assumes you are adding a trusted certificate entry. In this case, the alias should not already exist in the keystore. If the alias does already exist, then the keytool command outputs an error because there is already a trusted certificate for that alias, and does not import the certificate. If the alias points to a key entry, then the keytool command assumes you are importing a certificate reply.

-importpassword

{-alias alias} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Imports a passphrase and stores it in a new KeyStore.SecretKeyEntry identified by alias. The passphrase may be supplied via the standard input stream; otherwise the user is prompted for it. keypass is a password used to protect the imported passphrase. If no password is provided, the user is prompted for it. If you press the Return key at the prompt, the key password is set to the same password as that used for the keystore. keypass must be at least 6 characters long.

-importkeystore

{-srcstoretype srcstoretype} {-deststoretype deststoretype} [-srcstorepass srcstorepass] [-deststorepass deststorepass] {-srcprotected} {-destprotected} {-srcalias srcalias {-destalias destalias} [-srckeypass srckeypass] } [-destkeypass destkeypass] {-noprompt} {-srcProviderName src_provider_name} {-destProviderName dest_provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Imports a single entry or all entries from a source keystore to a destination keystore.

When the -srcalias option is provided, the command imports the single entry identified by the alias to the destination keystore. If a destination alias is not provided with destalias, then srcalias is used as the destination alias. If the source entry is protected by a password, then srckeypass is used to recover the entry. If srckeypass is not provided, then the keytool command attempts to use srcstorepass to recover the entry. If srcstorepass is either not provided or is incorrect, then the user is prompted for a password. The destination entry is protected with destkeypass. If destkeypass is not provided, then the destination entry is protected with the source entry password. For example, most third-party tools require storepass and keypass in a PKCS #12 keystore to be the same. In order to create a PKCS #12 keystore for these tools, always specify a -destkeypass to be the same as -deststorepass.

If the -srcalias option is not provided, then all entries in the source keystore are imported into the destination keystore. Each destination entry is stored under the alias from the source entry. If the source entry is protected by a password, then srcstorepass is used to recover the entry. If srcstorepass is either not provided or is incorrect, then the user is prompted for a password. If a source keystore entry type is not supported in the destination keystore, or if an error occurs while storing an entry into the destination keystore, then the user is prompted whether to skip the entry and continue or to quit. The destination entry is protected with the source entry password.

If the destination alias already exists in the destination keystore, then the user is prompted to either overwrite the entry or to create a new entry under a different alias name.

If the -noprompt option is provided, then the user is not prompted for a new destination alias. Existing entries are overwritten with the destination alias name. Entries that cannot be imported are skipped and a warning is displayed.

-printcertreq

{-file file}

Prints the content of a PKCS #10 format certificate request, which can be generated by the keytool -certreq command. The command reads the request from file. If there is no file, then the request is read from the standard input.

-certreq

{-alias alias} {-dname dname} {-sigalg sigalg} {-file certreq_file} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a Certificate Signing Request (CSR) using the PKCS #10 format.

A CSR is intended to be sent to a certificate authority (CA). The CA authenticates the certificate requestor (usually off-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self-signed certificate) in the keystore.

The private key associated with alias is used to create the PKCS #10 certificate request. To access the private key, the correct password must be provided. If keypass is not provided at the command line and is different from the password used to protect the integrity of the keystore, then the user is prompted for it. If dname is provided, then it is used as the subject in the CSR. Otherwise, the X.500 Distinguished Name associated with alias is used.

The sigalg value specifies the algorithm that should be used to sign the CSR.

The CSR is stored in the file certreq_file. If no file is specified, then the CSR is output to stdout.

Use the importcert command to import the response from the CA.

-exportcert

{-alias alias} {-file cert_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-rfc} {-v} {-protected} {-Jjavaoption}

Reads from the keystore the certificate associated with alias and stores it in the cert_file file. When no file is specified, the certificate is output to stdout.

The certificate is by default output in binary encoding. If the -rfc option is specified, then the output in the printable encoding format defined by the Internet RFC 1421 Certificate Encoding Standard.

If alias refers to a trusted certificate, then that certificate is output. Otherwise, alias refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by alias.

This command was named -export in earlier releases. The old name is still supported in this release. The new name, -exportcert, is preferred going forward.

-list

{-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v | -rfc} {-protected} {-Jjavaoption}

Prints to stdout the contents of the keystore entry identified by alias. If no alias is specified, then the contents of the entire keystore are printed.

This command by default prints the SHA1 fingerprint of a certificate. If the -v option is specified, then the certificate is printed in human-readable format, with additional information such as the owner, issuer, serial number, and any extensions. If the -rfc option is specified, then the certificate contents are printed using the printable encoding format, as defined by the Internet RFC 1421 Certificate Encoding Standard.

You cannot specify both -v and -rfc.

-printcert

{-file cert_file | -sslserver host[:port]} {-jarfile JAR_file {-rfc} {-v} {-Jjavaoption}

Reads the certificate from the file cert_file, the SSL server located at host:port, or the signed JAR file JAR_file (with the -jarfile option and prints its contents in a human-readable format. When no port is specified, the standard HTTPS port 443 is assumed. Note that -sslserver and -file options cannot be provided at the same time. Otherwise, an error is reported. If neither option is specified, then the certificate is read from stdin.

When-rfc is specified, the keytool command prints the certificate in PEM mode as defined by the Internet RFC 1421 Certificate Encoding standard. See Internet RFC 1421 Certificate Encoding Standard.

If the certificate is read from a file or stdin, then it might be either binary encoded or in printable encoding format, as defined by the RFC 1421 Certificate Encoding standard.

If the SSL server is behind a firewall, then the -J-Dhttps.proxyHost=proxyhost and -J-Dhttps.proxyPort=proxyport options can be specified on the command line for proxy tunneling. See Java Secure Socket Extension (JSSE) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html

Note: This option can be used independently of a keystore.

-printcrl

-file crl_ {-v}

Reads the Certificate Revocation List (CRL) from the file crl_. A CRL is a list of digital certificates that were revoked by the CA that issued them. The CA generates the crl_ file.

Note: This option can be used independently of a keystore.

-storepasswd

[-new new_storepass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-Jjavaoption}

Changes the password used to protect the integrity of the keystore contents. The new password is new_storepass, which must be at least 6 characters.

-keypasswd

{-alias alias} [-keypass old_keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-Jjavaoption}

Changes the password under which the private/secret key identified by alias is protected, from old_keypass to new_keypass, which must be at least 6 characters.

If the -keypass option is not provided at the command line, and the key password is different from the keystore password, then the user is prompted for it.

If the -new option is not provided at the command line, then the user is prompted for it

-delete

[-alias alias] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Deletes from the keystore the entry identified by alias. The user is prompted for the alias, when no alias is provided at the command line.

-changealias

{-alias alias} [-destalias destalias] [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Move an existing keystore entry from the specified alias to a new alias, destalias. If no destination alias is provided, then the command prompts for one. If the original entry is protected with an entry password, then the password can be supplied with the -keypass option. If no key password is provided, then the storepass (if provided) is attempted first. If the attempt fails, then the user is prompted for a password.

-help

Lists the basic commands and their options.

For more information about a specific command, enter the following, where command_name is the name of the command: keytool -command_name -help.

Examples

This example walks through the sequence of steps to create a keystore for managing public/private key pair and certificates from trusted entities.

Generate the Key Pair

First, create a keystore and generate the key pair. You can use a command such as the following typed as a single line:

keytool -genkeypair -dname "cn=Mark Jones, ou=Java, o=Oracle, c=US"
    -alias business -keypass <new password for private key>
    -keystore /working/mykeystore
    -storepass <new password for keystore> -validity 180

The command creates the keystore named mykeystore in the working directory (assuming it does not already exist), and assigns it the password specified by <new password for keystore>. It generates a public/private key pair for the entity whose distinguished name has a common name of Mark Jones, organizational unit of Java, organization of Oracle and two-letter country code of US. It uses the default DSA key generation algorithm to create the keys; both are 1024 bits.

The command uses the default SHA1withDSA signature algorithm to create a self-signed certificate that includes the public key and the distinguished name information. The certificate is valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias business. The private key is assigned the password specified by <new password for private key>.

The command is significantly shorter when the option defaults are accepted. In this case, no options are required, and the defaults are used for unspecified options that have default values. You are prompted for any required values. You could have the following:

keytool -genkeypair

In this case, a keystore entry with the alias mykey is created, with a newly generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named .keystore in your home directory. The keystore is created when it does not already exist. You are prompted for the distinguished name information, the keystore password, and the private key password.

The rest of the examples assume you executed the -genkeypair command without options specified, and that you responded to the prompts with values equal to those specified in the first -genkeypair command. For example, a distinguished name of cn=Mark Jones, ou=Java, o=Oracle, c=US).

Request a Signed Certificate from a CA

Generating the key pair created a self-signed certificate. A certificate is more likely to be trusted by others when it is signed by a Certification Authority (CA). To get a CA signature, first generate a Certificate Signing Request (CSR), as follows:

keytool -certreq -file MarkJ.csr

This creates a CSR for the entity identified by the default alias mykey and puts the request in the file named MarkJ.csr. Submit this file to a CA, such as VeriSign. The CA authenticates you, the requestor (usually off-line), and returns a certificate, signed by them, authenticating your public key. In some cases, the CA returns a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.

Import a Certificate for the CA

You now need to replace the self-signed certificate with a certificate chain, where each certificate in the chain authenticates the public key of the signer of the previous certificate in the chain, up to a root CA.

Before you import the certificate reply from a CA, you need one or more trusted certificates in your keystore or in the cacerts keystore file. See -importcert in Commands.

  • If the certificate reply is a certificate chain, then you need the top certificate of the chain. The root CA certificate that authenticates the public key of the CA.

  • If the certificate reply is a single certificate, then you need a certificate for the issuing CA (the one that signed it). If that certificate is not self-signed, then you need a certificate for its signer, and so on, up to a self-signed root CA certificate.

The cacerts keystore file ships with several VeriSign root CA certificates, so you probably will not need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key was not added to cacerts, then you must import a certificate from the CA as a trusted certificate.

A certificate from a CA is usually either self-signed or signed by another CA, in which case you need a certificate that authenticates that CA's public key. Suppose company ABC, Inc., is a CA, and you obtain a file named ABCCA.cer that is supposed to be a self-signed certificate from ABC, that authenticates that CA's public key. Be careful to ensure the certificate is valid before you import it as a trusted certificate. View it first with the keytool -printcert command or the keytool -importcert command without the -noprompt option, and make sure that the displayed certificate fingerprints match the expected ones. You can call the person who sent the certificate, and compare the fingerprints that you see with the ones that they show or that a secure public key repository shows. Only when the fingerprints are equal is it guaranteed that the certificate was not replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack takes place, and you did not check the certificate before you imported it, then you would be trusting anything the attacker has signed.

If you trust that the certificate is valid, then you can add it to your keystore with the following command:

keytool -importcert -alias abc -file ABCCA.cer

This command creates a trusted certificate entry in the keystore, with the data from the file ABCCA.cer, and assigns the alias abc to the entry.

Import the Certificate Reply from the CA

After you import a certificate that authenticates the public key of the CA you submitted your certificate signing request to (or there is already such a certificate in the cacerts file), you can import the certificate reply and replace your self-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (when the CA reply is a chain), or one constructed (when the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the cacerts keystore file.

For example, if you sent your certificate signing request to VeriSign, then you can import the reply with the following, which assumes the returned certificate is named VSMarkJ.cer:

keytool -importcert -trustcacerts -file VSMarkJ.cer

Export a Certificate That Authenticates the Public Key

If you used the jarsigner command to sign a Java Archive (JAR) file, then clients that want to use the file will want to authenticate your signature. One way the clients can authenticate you is by first importing your public key certificate into their keystore as a trusted entry.

You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named MJ.cer with the following command that assumes the entry has an alias of mykey:

keytool -exportcert -alias mykey -file MJ.cer

With the certificate and the signed JAR file, a client can use the jarsigner command to authenticate your signature.

Import Keystore

The command importkeystore is used to import an entire keystore into another keystore, which means all entries from the source keystore, including keys and certificates, are all imported to the destination keystore within a single command. You can use this command to import entries from a different type of keystore. During the import, all new entries in the destination keystore will have the same alias names and protection passwords (for secret keys and private keys). If the keytool command cannot recover the private keys or secret keys from the source keystore, then it prompts you for a password. If it detects alias duplication, then it asks you for a new alias, and you can specify a new alias or simply allow the keytool command to overwrite the existing one.

For example, to import entries from a typical JKS type keystore key.jks into a PKCS #11 type hardware-based keystore, use the command:

keytool -importkeystore
    -srckeystore key.jks -destkeystore NONE
    -srcstoretype JKS -deststoretype PKCS11
    -srcstorepass <src keystore password>
    -deststorepass <destination keystore pwd>

The importkeystore command can also be used to import a single entry from a source keystore to a destination keystore. In this case, besides the options you see in the previous example, you need to specify the alias you want to import. With the -srcalias option specified, you can also specify the destination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. The following command demonstrates this:

keytool -importkeystore
    -srckeystore key.jks -destkeystore NONE
    -srcstoretype JKS -deststoretype PKCS11
    -srcstorepass <src keystore password>
    -deststorepass <destination keystore pwd>
    -srcalias myprivatekey -destalias myoldprivatekey
    -srckeypass <source entry password>
    -destkeypass <destination entry password>
    -noprompt

Generate Certificates for an SSL Server

The following are keytool commands to generate key pairs and certificates for three entities: Root CA (root), Intermediate CA (ca), and SSL server (server). Ensure that you store all the certificates in the same keystore. In these examples, RSA is the recommended the key algorithm.

keytool -genkeypair -keystore root.jks -alias root -ext bc:c
keytool -genkeypair -keystore ca.jks -alias ca -ext bc:c
keytool -genkeypair -keystore server.jks -alias server

keytool -keystore root.jks -alias root -exportcert -rfc > root.pem

keytool -storepass <storepass> -keystore ca.jks -certreq -alias ca |
    keytool -storepass <storepass> -keystore root.jks
    -gencert -alias root -ext BC=0 -rfc > ca.pem
keytool -keystore ca.jks -importcert -alias ca -file ca.pem

keytool -storepass <storepass> -keystore server.jks -certreq -alias server |
    keytool -storepass <storepass> -keystore ca.jks -gencert -alias ca
    -ext ku:c=dig,kE -rfc > server.pem
cat root.pem ca.pem server.pem |
    keytool -keystore server.jks -importcert -alias server

Terms

Keystore

A keystore is a storage facility for cryptographic keys and certificates.

Keystore entries

Keystores can have different types of entries. The two most applicable entry types for the keytool command include the following:

Key entries: Each entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain for the corresponding public key. See Certificate Chains. The keytool command can handle both types of entries, while the jarsigner tool only handles the latter type of entry, that is private keys and their associated certificate chains.

Trusted certificate entries: Each entry contains a single public key certificate that belongs to another party. The entry is called a trusted certificate because the keystore owner trusts that the public key in the certificate belongs to the identity identified by the subject (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate.

KeyStore aliases

All keystore entries (key and trusted certificate entries) are accessed by way of unique aliases.

An alias is specified when you add an entity to the keystore with the -genseckey command to generate a secret key, the -genkeypair command to generate a key pair (public and private key), or the -importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent keytool commands must use this same alias to refer to the entity.

For example, you can use the alias duke to generate a new public/private key pair and wrap the public key into a self-signed certificate with the following command. See Certificate Chains.

keytool -genkeypair -alias duke -keypass dukekeypasswd

This example specifies an initial password of dukekeypasswd required by subsequent commands to access the private key associated with the alias duke. If you later want to change Duke's private key password, use a command such as the following:

keytool -keypasswd -alias duke -keypass dukekeypasswd -new newpass

This changes the password from dukekeypasswd to newpass. A password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you do not specify a required password option on a command line, then you are prompted for it.

KeyStore implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, two command-line tools (keytool and jarsigner) and a GUI-based tool named Policy Tool make use of keystore implementations. Because the KeyStore class is public, users can write additional security applications that use it.

There is a built-in default implementation, provided by Oracle. It implements the keystore as a file with a proprietary keystore type (format) named JKS. It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a Service Provider Interface (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that providers must implement. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider in the Java Cryptography Architecture at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider.html

Applications can choose different types of keystore implementations from different providers, using the getInstance factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private/secret keys in the keystore and the integrity of the keystore. Keystore implementations of different types are not compatible.

The keytool command works on any file-based keystore implementation. It treats the keystore location that is passed to it at the command line as a file name and converts it to a FileInputStream, from which it loads the keystore information.)The jarsigner and policytool commands can read a keystore from any location that can be specified with a URL.

For keytool and jarsigner, you can specify a keystore type at the command line, with the -storetype option. For Policy Tool, you can specify a keystore type with the Keystore menu.

If you do not explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and resides in the security properties directory, java.home\lib\security on Windows and java.home/lib/security on Oracle Solaris, where java.home is the runtime environment directory. The jre directory in the SDK or the top-level directory of the Java Runtime Environment (JRE).

Each tool gets the keystore.type value and then examines all the currently installed providers until it finds one that implements a keystores of that type. It then uses the keystore implementation from that provider.The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type as specified in the keystore.type property:

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is jks, which is the proprietary type of the keystore implementation provided by Oracle. This is specified by the following line in the security properties file:

keystore.type=jks

To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. For example, if you have a provider package that supplies a keystore implementation for a keystore type called pkcs12, then change the line to the following:

keystore.type=pkcs12

Note: Case does not matter in keystore type designations. For example, JKS would be considered the same as jks.

Certificate

A certificate (or public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key and some other information of another entity (the subject) has some specific value. The following terms are related to certificates:

Public Keys: These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.

Digitally Signed: If some data is digitally signed, then it is stored with the identity of an entity and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key.

Identity: A known way of addressing an entity. In some systems, the identity is the public key, and in others it can be anything from an Oracle Solaris UID to an email address to an X.509 distinguished name.

Signature: A signature is computed over some data using the private key of an entity. The signer, which in the case of a certificate is also known as the issuer.

Private Keys: These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it is supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as public key crypto systems). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.

Entity: An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Public key cryptography requires access to users' public keys. In a large-scale networked environment, it is impossible to guarantee that prior relationships between communicating entities were established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a trusted third party. CAs are entities such as businesses that are trusted to sign (issue) certificates for other entities. It is assumed that CAs only create valid and reliable certificates because they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on.

You can also run your own Certification Authority using products such as Microsoft Certificate Server or the Entrust CA product for your organization. With the keytool command, it is possible to display, import, and export certificates. It is also possible to generate self-signed certificates.

The keytool command currently handles X.509 certificates.

X.509 Certificates

The X.509 standard defines what information can go into a certificate and describes how to write it down (the data format). All the data in a certificate is encoded with two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data.

All X.509 certificates have the following data, in addition to the signature:

Version: This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. The keytool command can import and export v1, v2, and v3 certificates. It generates v3 certificates.

X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject or issuer names over time. Most certificate profile documents strongly recommend that names not be reused and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

X.509 Version 3 is the most recent (1996) and supports the notion of extensions where anyone can define an extension and include it in the certificate. Some common extensions are: KeyUsage (limits the use of the keys to particular purposes such as signing-only) and AlternativeNames (allows other identities to also be associated with this public key, for example. DNS names, email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced or used. For example, if a certificate has the KeyUsage extension marked critical and set to keyCertSign, then when this certificate is presented during SSL communication, it should be rejected because the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

Serial number: The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways. For example, when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).

Signature algorithm identifier: This identifies the algorithm used by the CA to sign the certificate.

Issuer name: The X.500 Distinguished Name of the entity that signed the certificate. See X.500 Distinguished Names. This is typically a CA. Using this certificate implies trusting the entity that signed this certificate. In some cases, such as root or top-level CA certificates, the issuer signs its own certificate.

Validity period: Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate, or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, when the associated private key has not been compromised.

Subject name: The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity. See X.500 Distinguished Names. For example,

CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US

These refer to the subject's common name (CN), organizational unit (OU), organization (O), and country (C).

Subject public key information: This is the public key of the entity being named with an algorithm identifier that specifies which public key crypto system this key belongs to and any associated key parameters.

Certificate Chains

The keytool command can create and manage keystore key entries that each contain a private key and an associated certificate chain. The first certificate in the chain contains the public key that corresponds to the private key.

When keys are first generated, the chain starts off containing a single element, a self-signed certificate. See -genkeypair in Commands. A self-signed certificate is one for which the issuer (signer) is the same as the subject. The subject is the entity whose public key is being authenticated by the certificate. Whenever the -genkeypair command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

Later, after a Certificate Signing Request (CSR) was generated with the -certreq command and sent to a Certification Authority (CA), the response from the CA is imported with -importcert, and the self-signed certificate is replaced by a chain of certificates. See the -certreq and -importcert options in Commands. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject's public key. The next certificate in the chain is one that authenticates the CA's public key.

In many cases, this is a self-signed certificate, which is a certificate from the CA authenticating its own public key, and the last certificate in the chain. In other cases, the CA might return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key entry), but the second certificate in the chain is a certificate signed by a different CA that authenticates the public key of the CA you sent the CSR to. The next certificate in the chain is a certificate that authenticates the second CA's key, and so on, until a self-signed root certificate is reached. Each certificate in the chain (after the first) authenticates the public key of the signer of the previous certificate in the chain.

Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore.

A different reply format (defined by the PKCS #7 standard) includes the supporting certificate chain in addition to the issued certificate. Both reply formats can be handled by the keytool command.

The top-level (root) CA certificate is self-signed. However, the trust into the root's public key does not come from the root certificate itself, but from other sources such as a newspaper. This is because anybody could generate a self-signed certificate with the distinguished name of, for example, the VeriSign root CA. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a vehicle to transport the root CA's public key. Before you add the root CA certificate to your keystore, you should view it with the -printcert option and compare the displayed fingerprint with the well-known fingerprint obtained from a newspaper, the root CA's Web page, and so on.

The cacerts Certificates File

A certificates file named cacerts resides in the security properties directory, java.home\lib\security on Windows and java.home/lib/security on Oracle Solaris, where java.home is the runtime environment's directory, which would be the jre directory in the SDK or the top-level directory of the JRE.

The cacerts file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file with the keytool command by specifying jks as the keystore type. The cacerts keystore file ships with a default set of root CA certificates. You can list the default certificates with the following command:

keytool -list -keystore java.home/lib/security/cacerts

The initial password of the cacerts keystore file is changeit. System administrators should change that password and the default access permission of that file upon installing the SDK.

Note: It is important to verify your cacerts file. Because you trust the CAs in the cacerts file as entities for signing and issuing certificates to other entities, you must manage the cacerts file carefully. The cacerts file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the cacerts file and make your own trust decisions.

To remove an untrusted CA certificate from the cacerts file, use the delete option of the keytool command. You can find the cacerts file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file

Internet RFC 1421 Certificate Encoding Standard

Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as Base64 encoding, makes it easy to export certificates to other applications by email or through some other mechanism.

Certificates read by the -importcert and -printcert commands can be in either this format or binary encoded. The -exportcert command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, when the -rfc option is specified.

The -list command by default prints the SHA1 fingerprint of a certificate. If the -v option is specified, then the certificate is printed in human-readable format. If the -rfc option is specified, then the certificate is output in the printable encoding format.

In its printable encoding format, the encoded certificate is bounded at the beginning and end by the following text:

-----BEGIN CERTIFICATE-----

encoded certificate goes here.

-----END CERTIFICATE-----
X.500 Distinguished Names

X.500 Distinguished Names are used to identify entities, such as those that are named by the subject and issuer (signer) fields of X.509 certificates. The keytool command supports the following subparts:

commonName: The common name of a person such as Susan Jones.

organizationUnit: The small organization (such as department or division) name. For example, Purchasing.

localityName: The locality (city) name, for example, Palo Alto.

stateName: State or province name, for example, California.

country: Two-letter country code, for example, CH.

When you supply a distinguished name string as the value of a -dname option, such as for the -genkeypair command, the string must be in the following format:

CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode

All the italicized items represent actual values and the previous keywords are abbreviations for the following:

CN=commonName
OU=organizationUnit
O=organizationName
L=localityName
S=stateName
C=country

A sample distinguished name string is:

CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US

A sample command using such a string is:

keytool -genkeypair -dname "CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino,
S=California, C=US" -alias mark

Case does not matter for the keyword abbreviations. For example, CN, cn, and Cn are all treated the same.

Order matters; each subcomponent must appear in the designated order. However, it is not necessary to have all the subcomponents. You can use a subset, for example:

CN=Steve Meier, OU=Java, O=Oracle, C=US

If a distinguished name string value contains a comma, then the comma must be escaped by a backslash (\) character when you specify the string on a command line, as in:

cn=Peter Schuster, ou=Java\, Product Development, o=Oracle, c=US

It is never necessary to specify a distinguished name string on a command line. When the distinguished name is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma does not need to be escaped by a backslash (\).

Warnings

Importing Trusted Certificates Warning

Important: Be sure to check a certificate very carefully before importing it as a trusted certificate.

Windows Example:

View the certificate first with the -printcert command or the -importcert command without the -noprompt option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose sends or emails you a certificate that you put it in a file named \tmp\cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as follows:

  keytool -printcert -file \tmp\cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4

Oracle Solaris Example:

View the certificate first with the -printcert command or the -importcert command without the -noprompt option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose someone sends or emails you a certificate that you put it in a file named /tmp/cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as follows:

  keytool -printcert -file /tmp/cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4

Then call or otherwise contact the person who sent the certificate and compare the fingerprints that you see with the ones that they show. Only when the fingerprints are equal is it guaranteed that the certificate was not replaced in transit with somebody else's certificate such as an attacker's certificate. If such an attack took place, and you did not check the certificate before you imported it, then you would be trusting anything the attacker signed, for example, a JAR file with malicious class files inside.

Note: It is not required that you execute a -printcert command before importing a certificate. This is because before you add a certificate to the list of trusted certificates in the keystore, the -importcert command prints out the certificate information and prompts you to verify it. You can then stop the import operation. However, you can do this only when you call the -importcert command without the -noprompt option. If the -noprompt option is specified, then there is no interaction with the user.

Passwords Warning

Most commands that operate on a keystore require the store password. Some commands require a private/secret key password. Passwords can be specified on the command line in the -storepass and -keypass options. However, a password should not be specified on a command line or in a script unless it is for testing, or you are on a secure system. When you do not specify a required password option on a command line, you are prompted for it.

Certificate Conformance Warning

The Internet standard RFC 5280 has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. See the standard at
http://tools.ietf.org/rfc/rfc5280.txt

The keytool command does not enforce all of these rules so it can generate certificates that do not conform to the standard. Certificates that do not conform to the standard might be rejected by JRE or other applications. Users should ensure that they provide the correct options for -dname, -ext, and so on.

Notes

Import a New Trusted Certificate

Before you add the certificate to the keystore, the keytool command verifies it by attempting to construct a chain of trust from that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore.

If the -trustcacerts option was specified, then additional certificates are considered for the chain of trust, namely the certificates in a file named cacerts.

If the keytool command fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the cacerts file), then the certificate information is printed, and the user is prompted to verify it by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner. Be very careful to ensure the certificate is valid before importing it as a trusted certificate. See Importing Trusted Certificates Warning. The user then has the option of stopping the import operation. If the -noprompt option is specified, then there is no interaction with the user.

Import a Certificate Reply

When you import a certificate reply, the certificate reply is validated with trusted certificates from the keystore, and optionally, the certificates configured in the cacerts keystore file when the -trustcacerts option is specified. See The cacerts Certificates File.

The methods of determining whether the certificate reply is trusted are as follows:

  • If the reply is a single X.509 certificate, then the keytool command attempts to establish a trust chain, starting at the certificate reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates is used to authenticate the certificate reply from the new certificate chain of aliases. If a trust chain cannot be established, then the certificate reply is not imported. In this case, the keytool command does not print the certificate and prompt the user to verify it, because it is very difficult for a user to determine the authenticity of the certificate reply.

  • If the reply is a PKCS #7 formatted certificate chain or a sequence of X.509 certificates, then the chain is ordered with the user certificate first followed by zero or more CA certificates. If the chain ends with a self-signed root CA certificate and the -trustcacerts option was specified, the keytool command attempts to match it with any of the trusted certificates in the keystore or the cacerts keystore file. If the chain does not end with a self-signed root CA certificate and the -trustcacerts option was specified, the keytool command tries to find one from the trusted certificates in the keystore or the cacerts keystore file and add it to the end of the chain. If the certificate is not found and the -noprompt option is not specified, the information of the last certificate in the chain is printed, and the user is prompted to verify it.

If the public key in the certificate reply matches the user's public key already stored with alias, then the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced with a valid keypass, and so the password used to protect the private key of the entry is supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it.

This command was named -import in earlier releases. This old name is still supported in this release. The new name, -importcert, is preferred going forward.

See Also

  • jar(1)

  • jarsigner(1)

  • Trail: Security Features in Java SE at
    http://docs.oracle.com/javase/tutorial/security/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Monitor Java Applications

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

12 Monitor Java Applications

Use these commands to monitor and manage Java applications.

This section contains the following commands:

jconsole: Starts a graphical console that lets you monitor and manage Java applications.

jvisualvm: Visually monitors, troubleshoots, and profiles Java applications.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Monitor the JVM

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

13 Monitor the JVM

Use these commands to monitor and manage the Java Virtual Machine (JVM). These commands are unsupported and experimental and might not be available in future JDK release. These command are not supported on Windows 98 and Windows ME.

This section contains the following commands:

jps: Experimental. Lists the instrumented Java Virtual Machines on the target system.

jstat: Experimental. Monitors Java virtual machine statistics

jstatd: Experimental. Monitors Java Virtual Machines and enables remote monitoring tools to attach to JVMs.

jmc: Starts Java Mission Controla tool for monitoring and managing running Java applications and JVMs.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


native2ascii

Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes or vice versa.

Synopsis

native2ascii [ inputfile ] [ outputfile ]

inputfile

The encoded file to be converted to ASCII.

outputfile

The converted ASCII file.

Description

The native2ascii command converts encoded files supported by the Java Runtime Environment (JRE) to files encoded in ASCII, using Unicode escapes (\uxxxx) notation for all characters that are not part of the ASCII character set. This process is required for properties files that contain characters not in ISO-8859-1 character sets. The tool can also perform the reverse conversion.

If the outputfile value is omitted, then standard output is used for output. If, in addition, the inputfile value is omitted, then standard input is used for input.

Options

-reverse

Perform the reverse operation: Converts a file encoded in ISO-8859-1 with Unicode escapes to a file in any character encoding supported by the JRE.

-encoding encoding_name

Specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, then the default character encoding (as determined by the java.nio.charset.Charset.defaultCharset method) is used. The encoding_name string must be the name of a character encoding that is supported by the JRE. See Supported Encodings at
http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html

-Joption

Passes option to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


orbd

Enables clients to locate and call persistent objects on servers in the CORBA environment.

Synopsis

orbd [ options ]

options

Command-line options. See Options.

Description

The orbd command enables clients to transparently locate and call persistent objects on servers in the CORBA environment. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the naming service, include the port number of the ORBD in the object reference instead of the port number of the server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:

  • The object reference in the naming service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shut down, the ORBD returns the correct object reference to the calling client.

  • The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle.

To access the ORBD Server Manager, the server must be started using servertool, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server. For more information on the Server Manager, see Server Manager.

When orbd starts, it also starts a naming service. For more information about the naming service. See Start and Stop the Naming Service.

Options

-ORBInitialPort nameserverport

Required. Specifies the port on which the name server should be started. After it is started, orbd listens for incoming requests on this port. On Oracle Solaris software, you must become the root user to start a process on a port below 1024. For this reason, Oracle recommends that you use a port number above or equal to 1024.

Nonrequired Options

-port port

Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR).

-defaultdb directory

Specifies the base where the ORBD persistent storage directory, orb.db, is created. If this option is not specified, then the default value is ./orb.db.

-serverPollingTime milliseconds

Specifies how often ORBD checks for the health of persistent servers registered through servertool. The default value is 1000 ms. The value specified for milliseconds must be a valid positive integer.

-serverStartupDelay milliseconds

Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through servertool is restarted. The default value is 1000 ms. The value specified for milliseconds must be a valid positive integer.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Start and Stop the Naming Service

A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference.

Before running a client or a server, you will start ORBD. ORBD includes a persistent naming service and a transient naming service, both of which are an implementation of the COS Naming Service.

The Persistent Naming Service provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).

For backward compatibility, tnameserv, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, then the naming context graph is lost.

The -ORBInitialPort argument is a required command-line argument for orbd, and is used to set the port number on which the naming service runs. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024. For this reason, it is recommended that you use a port number above or equal to 1024. You can substitute a different port when necessary.

To start orbd from a UNIX command shell, enter:

orbd -ORBInitialPort 1050&

From an MS-DOS system prompt (Windows), enter:

start orbd -ORBInitialPort 1050

Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, when applicable) where the Naming Service is running. One way to do this is to add the following code to your application:

Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", "1050");
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
ORB orb = ORB.init(args, props);

In this example, the naming service is running on port 1050 on host MyHost. Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your HelloApplication with the following command line:

java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost

To stop the naming service, use the relevant operating system command, such as pkill orbd on Oracle Solaris, or Ctrl+C in the DOS window in which orbd is running. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service. The Java IDL naming service will run until it is explicitly stopped.

For more information about the naming service included with ORBD, see Naming Service at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html

Server Manager

To access the ORBD Server Manager and run a persistent server, the server must be started with servertool, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server. When a server is started using servertool, it must be started on the same host and port on which orbd is executing. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly.

See Java IDL: The "Hello World" Example at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlExample.html

In this example, you run the idlj compiler and javac compiler as shown in the tutorial. To run the ORBD Server Manager, follow these steps for running the application:

Start orbd.

UNIX command shell, enter: orbd -ORBInitialPort 1050.

MS-DOS system prompt (Windows), enter: start orbd -ORBInitialPort 1050.

Port 1050 is the port on which you want the name server to run. The -ORBInitialPort option is a required command-line argument. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024. For this reason, it is recommended that you use a port number above or equal to 1024.

Start the servertool: servertool -ORBInitialPort 1050.

Make sure the name server (orbd) port is the same as in the previous step, for example, -ORBInitialPort 1050. The servertool must be started on the same port as the name server.

In the servertool command line interface, start the Hello server from the servertool prompt:

servertool  > register -server HelloServer -classpath . -applicationName
                HelloServerApName

The servertool registers the server, assigns it the name HelloServerApName, and displays its server ID with a listing of all registered servers.Run the client application from another terminal window or prompt:

java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost

For this example, you can omit -ORBInitialHost localhost because the name server is running on the same host as the Hello client. If the name server is running on a different host, then use the -ORBInitialHost nameserverhost option to specify the host on which the IDL name server is running.Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (orbd) and servertool. To shut down orbd from am MS-DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down.

To shut down orbd from an Oracle Solaris shell, find the process, and terminate with the kill command. The server continues to wait for invocations until it is explicitly stopped. To shut down the servertool, type quit and press the Enter key.

See Also

  • servertool(1)

  • Naming Service at
    http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


pack200

Packages a JAR file into a compressed pack200 file for web deployment.

Synopsis

pack200 [options] output-file JAR-file

Options can be in any order. The last option on the command line or in a properties file supersedes all previously specified options.

options

The command-line options. See Options.

output-file

Name of the output file.

JAR-file

Name of the input file.

Description

The pack200 command is a Java application that transforms a JAR file into a compressed pack200 file with the Java gzip compressor. The pack200 files are highly compressed files that can be directly deployed to save bandwidth and reduce download time.

The pack200 command has several options to fine-tune and set the compression engine. The typical usage is shown in the following example, where myarchive.pack.gz is produced with the default pack200 command settings:

pack200 myarchive.pack.gz myarchive.jar

Options

-r
--repack

Produces a JAR file by packing and unpacking a JAR file. The resulting file can be used as an input to the jarsigner(1) tool. The following example packs and unpacks the myarchive.jar file:

pack200 --repack myarchive-packer.jar myarchive.jar
pack200 --repack myarchive.jar

The following example preserves the order of files in the input file.

-g
--no-gzip

Produces a pack200 file. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser.

pack200 --no-gzip myarchive.pack myarchive.jar
-G
--strip-debug

Strips debugging attributes from the output. These include SourceFile, LineNumberTable, LocalVariableTable and LocalVariableTypeTable. Removing these attributes reduces the size of both downloads and installations, but reduces the usefulness of debuggers.

--keep-file-order

Preserve the order of files in the input file. This is the default behavior.

-O
--no-keep-file-order

The packer reorders and transmits all elements. The packer can also remove JAR directory names to reduce the download size. However, certain JAR file optimizations, such as indexing, might not work correctly.

-Svalue
--segment-limit=value

The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires more than N bytes, then its own archive segment is provided. As a special case, a value of -1 produces a single large segment with all input files, while a value of 0 produces one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.

The size of each segment is estimated by counting the size of each input file to be transmitted in the segment with the size of its name and other transmitted properties.

The default is -1, which means that the packer creates a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.

A 10 MB JAR packed without this limit typically packs about 10 percent smaller, but the packer might require a larger Java heap (about 10 times the segment limit).

-Evalue
--effort=value

If the value is set to a single decimal digit, then the packer uses the indicated amount of effort in compressing the archive. Level 1 might produce somewhat larger size and faster compression speed, while level 9 takes much longer, but can produce better compression. The special value 0 instructs the pack200 command to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass-through of the entire archive.

The default is 5, to invest a modest amount of time to produce reasonable compression.

-Hvalue
--deflate-hint=value

Overrides the default, which preserves the input information, but can cause the transmitted archive to be larger. The possible values are: true, false, or keep.

If the value is true or false, then the packer200 command sets the deflation hint accordingly in the output archive and does not transmit the individual deflation hints of archive elements.

The keep value preserves deflation hints observed in the input JAR. This is the default.

-mvalue
--modification-time=value

The possible values are latest and keep.

If the value is latest, then the packer attempts to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value is transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.

If the value is keep, then modification times observed in the input JAR are preserved. This is the default.

-Pfile
--pass-file=file

Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files can be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator forward slash (/). The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, then all files under that directory are passed.

-Uaction
--unknown-attribute=action

Overrides the default behavior, which means that the class file that contains the unknown attribute is passed through with the specified action. The possible values for actions are error, strip, or pass.

If the value is error, then the entire pack200 command operation fails with a suitable explanation.

If the value is strip, then the attribute is dropped. Removing the required Java Virtual Machine (JVM) attributes can cause class loader failures.

If the value is pass, then the entire class is transmitted as though it is a resource.

-Cattribute-name=layout
--class-attribute=attribute-name=action

See next option.

-Fattribute-name=layout
--field-attribute=attribute-name=action

See next option.

-Mattribute-name=layout
--method-attribute=attribute-name=action

See next option.

-Dattribute-name=layout
--code-attribute=attribute-name=action

With the previous four options, the attribute layout can be specified for a class entity, such as class-attribute, field-attribute, method-attribute, and code-attribute. The attribute-name is the name of the attribute for which the layout or action is being defined. The possible values for action are some-layout-string, error, strip, pass.

some-layout-string: The layout language is defined in the JSR 200 specification, for example: --class-attribute=SourceFile=RUH.

If the value is error, then the pack200 operation fails with an explanation.

If the value is strip, then the attribute is removed from the output. Removing JVM-required attributes can cause class loader failures. For example, --class-attribute=CompilationID=pass causes the class file that contains this attribute to be passed through without further action by the packer.

If the value is pass, then the entire class is transmitted as though it is a resource.

-f pack.properties
--config-file=pack.properties

A configuration file, containing Java properties to initialize the packer, can be specified on the command line.

pack200 -f pack.properties myarchive.pack.gz myarchive.jar
more pack.properties
# Generic properties for the packer.
modification.time=latest
deflate.hint=false
keep.file.order=false
# This option will cause the files bearing new attributes to
# be reported as an error rather than passed uncompressed.
unknown.attribute=error
# Change the segment limit to be unlimited.
segment.limit=-1
-v
--verbose

Outputs minimal messages. Multiple specification of this option will create more verbose messages.

-q
--quiet

Specifies quiet operation with no messages.

-lfilename
--log-file=filename

Specifies a log file to output messages.

-?
-h
--help

Prints help information about this command.

-V
--version

Prints version information about this command.

-Joption

Passes the specified option to the Java Virtual Machine. For more information, see the reference page for the java(1) command. For example, -J-Xms48m sets the startup memory to 48 MB.

Exit Status

The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs.

Notes

This command should not be confused with pack(1). The pack and pack200 commands are separate products.

The Java SE API Specification provided with the JDK is the superseding authority, when there are discrepancies.

See Also

  • unpack200(1)

  • jar(1)

  • jarsigner(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


policytool

Reads and writes a plain text policy file based on user input through the utility GUI.

Synopsis

policytool [ -file ] [ filename ]

-file

Directs the policytool command to load a policy file.

filename

The name of the file to be loaded.

Examples:

Run the policy tool administrator utility:

policytool

Run the policytool command and load the specified file:

policytool-file mypolicyfile

Description

The policytool command calls an administrator's GUI that enables system administrators to manage the contents of local policy files. A policy file is a plain-text file with a .policy extension, that maps remote requestors by domain, to permission objects. For details, see Default Policy Implementation and Policy File Syntax at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html

Options

-file

Directs the policytool command to load a policy file.

See Also

  • Default Policy Implementation and Policy File Syntax at
    http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html

  • Policy File Creation and Management at
    http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyGuide.html

  • Permissions in Java SE Development Kit (JDK) at
    http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html

  • Java Security Overview at
    http://docs.oracle.com/javase/8/docs/technotes/guides/security/overview/jsoverview.html

  • Java Cryptography Architecture (JCA) Reference Guide at
    http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Preface

The Java Platform, Standard Edition (Java SE) Command Reference describes the valid options and arguments for Java SE commands. In many cases, examples are included to show correct usage. If you want conceptual information or need step-by-step instructions about these topics, see The Java Tutorials at
http://docs.oracle.com/javase/tutorial/index.html

Audience

This document is intended for Java SE developers who want to use the commands provided in the JDK.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

For more information, see the following documents in the Java SE Release 7.0 documentation set:

  • Java Platform, Standard Edition, Release Notes

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Remote Method Invocation

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

8 Remote Method Invocation (RMI)

These commands create applications that interact over the web or with another network.

This section contains the following commands:

rmic: Generates stub, skeleton, and tie classes for remote objects that use the JRMP or IIOP protocols. Also generates OMG IDL.

rmiregistry: Starts a remote object registry on the specified port on the current host.

rmid: Starts the activation system daemon that allows objects to be registered and activated in a Java Virtual Machine (JVM).

serialver: Returns the serial version UID for specified classes.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


rmic

Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP). Also generates Object Management Group (OMG) Interface Definition Language (IDL)

Synopsis

rmic [ options ] package-qualified-class-names

options

The command-line options. See Options.

package-qualified-class-names

Class names that include their packages, for example, java.awt.Color.

Description

Deprecation Note: Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated. Oracle recommends that you use dynamically generated JRMP stubs instead, eliminating the need to use this tool for JRMP-based applications. See the java.rmi.server.UnicastRemoteObject specification at http://docs.oracle.com/javase/8/docs/api/java/rmi/server/UnicastRemoteObject.html for further information.

The rmic compiler generates stub and skeleton class files using the Java Remote Method Protocol (JRMP) and stub and tie class files (IIOP protocol) for remote objects. These class files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface java.rmi.Remote. The class names in the rmic command must be for classes that were compiled successfully with the javac command and must be fully package qualified. For example, running the rmic command on the class file name HelloImpl as shown here creates the HelloImpl_Stub.class file in the hello subdirectory (named for the class's package):

rmic hello.HelloImpl

A skeleton for a remote object is a JRMP protocol server-side entity that has a method that dispatches calls to the remote object implementation.

A tie for a remote object is a server-side entity similar to a skeleton, but communicates with the client with the IIOP protocol.

A stub is a client-side proxy for a remote object that is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub.

By default, the rmic command generates stub classes that use the 1.2 JRMP stub protocol version only, as though the -v1.2 option was specified. The -vcompat option was the default in releases before 5.0. Use the -iiop option to generate stub and tie classes for the IIOP protocol. See Options.

A stub implements only the remote interfaces, and not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object, a client can use the Java programming language built-in operators for casting and type checking. For IIOP, the PortableRemoteObject.narrow method must be used.

Options

-bootclasspath path

Overrides the location of bootstrap class files.

-classpath path

Specifies the path the rmic command uses to look up classes. This option overrides the default or the CLASSPATH environment variable when it is set. Directories are separated by colons. The general format for path is: .:<your_path>, for example: .:/usr/local/java/classes.

-d directory

Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the following command places the stub and skeleton classes derived from MyClass into the directory /java/classes/exampleclass.

rmic -d /java/classes exampleclass.MyClass

If the -d option is not specified, then the default behavior is as if -d . was specified. The package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. In some earlier releases of the rmic command, if the -d option was not specified, then the package hierarchy was not created, and all of the output files were placed directly in the current directory.

-extdirs path

Overrides the location of installed extensions.

-g

Enables the generation of all debugging information, including local variables. By default, only line number information is generated.

-idl

Causes the rmic command to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language-independent way to specify an API for an object. The IDL is used as a specification for methods and data that can be written in and called from any language that provides CORBA bindings. This includes Java and C++ among others. See Java IDL: IDL to Java Language Mapping at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping.html

When the -idl option is used, other options also include:

  • The -always or -alwaysgenerate options force regeneration even when existing stubs/ties/IDL are newer than the input class.

  • The -factory option uses the factory keyword in generated IDL.

  • The -idlModule from JavaPackage[.class] toIDLModule specifies IDLEntity package mapping, for example: -idlModule my.module my::real::idlmod.

  • -idlFile fromJavaPackage[.class] toIDLFile specifies IDLEntity file mapping, for example: -idlFile test.pkg.X TEST16.idl.

-iiop

Causes the rmic command to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client reference to a remote object is a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

If you call the rmic command with the -iiop, then it generates stubs and ties that conform to this naming convention:

_<implementationName>_stub.class
_<interfaceName>_tie.class

  • When you use the -iiop option, other options also include:

  • The -always or -alwaysgenerate options force regeneration even when existing stubs/ties/IDL are newer than the input class.

  • The -nolocalstubs option means do not create stubs optimized for same-process clients and servers.

  • The -noValueMethods option must be used with the -idl option. The -noValueMethods option prevents the addition of valuetype methods and initializers to emitted IDL. These methods and initializers are optional for valuetypes, and are generated unless the -noValueMethods option is specified with the -idl option.

  • The -poa option changes the inheritance from org.omg.CORBA_2_3.portable.ObjectImpl to org.omg.PortableServer.Servant. The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00-01-08.pdf.

-J

Used with any Java command, the -J option passes the argument that follows the -J (no spaces between the -J and the argument) to the Java interpreter

-keep or -keepgenerated

Retains the generated .java source files for the stub, skeleton, and tie classes and writes them to the same directory as the .class files.

-nowarn

Turns off warnings. When the -nowarn options is used. The compiler does not print out any warnings.

-nowrite

Does not write compiled classes to the file system.

-vcompat (deprecated)

Generates stub and skeleton classes that are compatible with both the 1.1 and 1.2 JRMP stub protocol versions. This option was the default in releases before 5.0. The generated stub classes use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large to support both modes of operation. Note: This option has been deprecated. See Description.

-verbose

Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.

-v1.1 (deprecated)

Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. The -v1.1 option is only useful for generating stub classes that are serialization-compatible with preexisting, statically deployed stub classes that were generated by the rmic command from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used). Note: This option has been deprecated. See Description.

-v1.2 (deprecated)

(Default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes do not work when they are loaded into a JDK 1.1 virtual machine. Note: This option has been deprecated. See Description.

Environment Variables

CLASSPATH

Used to provide the system a path to user-defined classes. Directories are separated by colons, for example: .:/usr/local/java/classes.

See Also

  • javac(1)

  • java(1)

  • Setting the Class Path

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


rmid

Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM).

Synopsis

rmid [options]

options

The command-line options. See Options.

Description

The rmid command starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM. For details on how to write programs that use activatable objects, the Using Activation tutorial at http://docs.oracle.com/javase/8/docs/technotes/guides/rmi/activation/overview.html

Start the daemon by executing the rmid command and specifying a security policy file, as follows:

rmid -J-Djava.security.policy=rmid.policy

When you run Oracle's implementation of the rmid command, by default you must specify a security policy file so that the rmid command can verify whether or not the information in each ActivationGroupDesc is allowed to be used to start a JVM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any properties passed to an ActivationGroupDesc constructor must now be explicitly allowed in the security policy file for the rmid command. The value of the sun.rmi.activation.execPolicy property dictates the policy that the rmid command uses to determine whether or not the information in an ActivationGroupDesc can be used to start a JVM for an activation group. For more information see the description of the -J-Dsun.rmi.activation.execPolicy=policy option.

Executing the rmid command starts the Activator and an internal registry on the default port1098 and binds an ActivationSystem to the name java.rmi.activation.ActivationSystem in this internal registry.

To specify an alternate port for the registry, you must specify the -port option when you execute the rmid command. For example, the following command starts the activation system daemon and a registry on the registry's default port, 1099.

rmid -J-Djava.security.policy=rmid.policy -port 1099

Start RMID on Demand

An alternative to starting rmid from the command line is to configure inetd (Oracle Solaris) or xinetd (Linux) to start rmid on demand.

When RMID starts, it attempts to obtain an inherited channel (inherited from inetd/xinetd) by calling the System.inheritedChannel method. If the inherited channel is null or not an instance of java.nio.channels.ServerSocketChannel, then RMID assumes that it was not started by inetd/xinetd, and it starts as previously described.

If the inherited channel is a ServerSocketChannel instance, then RMID uses the java.net.ServerSocket obtained from the ServerSocketChannel as the server socket that accepts requests for the remote objects it exports: The registry in which the java.rmi.activation.ActivationSystem is bound and the java.rmi.activation.Activator remote object. In this mode, RMID behaves the same as when it is started from the command line, except in the following cases:

  • Output printed to System.err is redirected to a file. This file is located in the directory specified by the java.io.tmpdir system property (typically /var/tmp or /tmp) with the prefix rmid-err and the suffix tmp.

  • The -port option is not allowed. If this option is specified, then RMID exits with an error message.

  • The -log option is required. If this option is not specified, then RMID exits with an error message

See the man pages for inetd (Oracle Solaris) or xinetd (Linux) for details on how to configure services to be started on demand.

Options

-Coption

Specifies an option that is passed as a command-line argument to each child process (activation group) of the rmid command when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon:

rmid -C-Dsome.property=value

This ability to pass command-line arguments to child processes can be useful for debugging. For example, the following command enables server-call logging in all child JVMs.

rmid -C-Djava.rmi.server.logCalls=true
-Joption

Specifies an option that is passed to the Java interpreter running RMID. For example, to specify that the rmid command use a policy file named rmid.policy, the -J option can be used to define the java.security.policy property on the rmid command line, for example:

rmid -J-Djava.security.policy-rmid.policy
-J-Dsun.rmi.activation.execPolicy=policy

Specifies the policy that RMID employs to check commands and command-line options used to start the JVM in which an activation group runs. Please note that this option exists only in Oracle's implementation of the Java RMI activation daemon. If this property is not specified on the command line, then the result is the same as though -J-Dsun.rmi.activation.execPolicy=default were specified. The possible values of policy can be default, policyClassName, or none.

  • default

    The default or unspecified value execPolicy allows the rmid command to execute commands with specific command-line options only when the rmid command was granted permission to execute those commands and options in the security policy file that the rmid command uses. Only the default activation group implementation can be used with the default execution policy.

    The rmid command starts a JVM for an activation group with the information in the group's registered activation group descriptor, an ActivationGroupDesc. The group descriptor specifies an optional ActivationGroupDesc.CommandEnvironment that includes the command to execute to start the activation group and any command-line options to be added to the command line. By default, the rmid command uses the java command found in java.home. The group descriptor also contains properties overrides that are added to the command line as options defined as: -D<property>=<value>.The com.sun.rmi.rmid.ExecPermission permission grants the rmid command permission to execute a command that is specified in the group descriptor's CommandEnvironment to start an activation group. The com.sun.rmi.rmid.ExecOptionPermission permission enables the rmid command to use command-line options, specified as properties overrides in the group descriptor or as options in the CommandEnvironment when starting the activation group.When granting the rmid command permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission must be granted to all code sources.

    ExecPermission

    The ExecPermission class represents permission for the rmid command to execute a specific command to start an activation group.

    Syntax: The name of an ExecPermission is the path name of a command to grant the rmid command permission to execute. A path name that ends in a slash (/) and an asterisk (*) indicates that all of the files contained in that directory where slash is the file-separator character, File.separatorChar. A path name that ends in a slash (/) and a minus sign (-) indicates all files and subdirectories contained in that directory (recursively). A path name that consists of the special token <<ALL FILES>> matches any file.

    A path name that consists of an asterisk (*) indicates all the files in the current directory. A path name that consists of a minus sign (-) indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

    ExecOptionPermission

    The ExecOptionPermission class represents permission for the rmid command to use a specific command-line option when starting an activation group. The name of an ExecOptionPermission is the value of a command-line option.

    Syntax: Options support a limited wild card scheme. An asterisk signifies a wild card match, and it can appear as the option name itself (matches any option), or an asterisk (*) can appear at the end of the option name only when the asterisk (*) follows a dot (.) or an equals sign (=).

    For example: * or -Dmydir.* or -Da.b.c=* is valid, but *mydir or -Da*b or ab* is not.

    Policy file for rmid

    When you grant the rmid command permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission must be granted to all code sources (universally). It is safe to grant these permissions universally because only the rmid command checks these permissions.

    An example policy file that grants various execute permissions to the rmid command is:

    grant {
    permission com.sun.rmi.rmid.ExecPermission
        "/files/apps/java/jdk1.7.0/solaris/bin/java";

    permission com.sun.rmi.rmid.ExecPermission
        "/files/apps/rmidcmds/*";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Djava.security.policy=/files/policies/group.policy";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Djava.security.debug=*";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Dsun.rmi.*";
};

    The first permission granted allows the rmid command to execute the 1.7.0 release of the java command, specified by its explicit path name. By default, the version of the java command found in java.home is used (the same one that the rmid command uses), and does not need to be specified in the policy file. The second permission allows the rmid command to execute any command in the directory /files/apps/rmidcmds.

    The third permission granted, an ExecOptionPermission, allows the rmid command to start an activation group that defines the security policy file to be /files/policies/group.policy. The next permission allows the java.security.debug property to be used by an activation group. The last permission allows any property in the sun.rmi property name hierarchy to be used by activation groups.

    To start the rmid command with a policy file, the java.security.policy property needs to be specified on the rmid command line, for example:

    rmid -J-Djava.security.policy=rmid.policy.

  • <policyClassName>

    If the default behavior is not flexible enough, then an administrator can provide, when starting the rmid command, the name of a class whose checkExecCommand method is executed to check commands to be executed by the rmid command.

    The policyClassName specifies a public class with a public, no-argument constructor and an implementation of the following checkExecCommand method:

     public void checkExecCommand(ActivationGroupDesc desc, String[] command)
        throws SecurityException;

    Before starting an activation group, the rmid command calls the policy's checkExecCommand method and passes to it the activation group descriptor and an array that contains the complete command to start the activation group. If the checkExecCommand throws a SecurityException, then the rmid command does not start the activation group and an ActivationException is thrown to the caller attempting to activate the object.

  • none

    If the sun.rmi.activation.execPolicy property value is none, then the rmid command does not perform any validation of commands to start activation groups.

-log dir

Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a log, in the directory in which the rmid command was executed.

-port port

Specifies the port the registry uses. The activation system daemon binds the ActivationSystem, with the name java.rmi.activation.ActivationSystem, in this registry. The ActivationSystem on the local machine can be obtained using the following Naming.lookup method call:

import java.rmi.*;
    import java.rmi.activation.*;

    ActivationSystem system; system = (ActivationSystem)
    Naming.lookup("//:port/java.rmi.activation.ActivationSystem");
-stop

Stops the current invocation of the rmid command for a port specified by the -port option. If no port is specified, then this option stops the rmid invocation running on port 1098.

Environment Variables

CLASSPATH

Used to provide the system a path to user-defined classes. Directories are separated by colons, for example: .:/usr/local/java/classes.

See Also

  • java(1)

  • Setting the Class Path

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


rmiregistry

Starts a remote object registry on the specified port on the current host.

Synopsis

rmiregistry [ port ]

port

The number of a port on the current host at which to start the remote object registry.

Description

The rmiregistry command creates and starts a remote object registry on the specified port on the current host. If the port is omitted, then the registry is started on port 1099. The rmiregistry command produces no output and is typically run in the background, for example:

rmiregistry &

A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names. Clients on local and remote hosts can then look up remote objects and make remote method invocations.

The registry is typically used to locate the first remote object on which an application needs to call methods. That object then provides application-specific support for finding other objects.

The methods of the java.rmi.registry.LocateRegistry class are used to get a registry operating on the local host or local host and port.

The URL-based methods of the java.rmi.Naming class operate on a registry and can be used to look up a remote object on any host and on the local host. Bind a simple name (string) to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URL bound in the registry.

Options

-J

Used with any Java option to pass the option following the -J (no spaces between the -J and the option) to the Java interpreter.

See Also

  • java(1)

  • java.rmi.registry.LocateRegistry class description at
    http://docs.oracle.com/javase/8/docs/api/java/rmi/registry/LocateRegistry.html

  • java.rmi.Naming class description at
    http://docs.oracle.com/javase/8/docs/api/java/rmi/Naming.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


schemagen

Generates a schema for every name space that is referenced in your Java classes.

Synopsis

schemagen [ options ] java-files

options

The command-line options. See Options.

java-files

The Java class files to be processed.

Description

The schema generator creates a schema file for each name space referenced in your Java classes. Currently, you cannot control the name of the generated schema files. To control the schema file names, see Using SchemaGen with Ant at
http://jaxb.java.net/nonav/2.2.3u1/docs/schemagenTask.html

Start the schema generator with the appropriate schemagen shell script in the bin directory for your platform. The current schema generator can process either Java source files or class files.

schemagen.sh Foo.java Bar.java ...
Note: Writing schema1.xsd

If your java files reference other classes, then those classes must be accessible on your system CLASSPATH environment variable, or they need to be specified in the schemagen command line with the class path options. See Options. If the referenced files are not accessible or specified, then you get errors when you generate the schema.

Options

-d path

The location where the schemagen command places processor-generated and javac-generated class files.

-cp path

The location where the schemagen command places user-specified files.

-classpath path

The location where the schemagen command places user-specified files.

-encoding encoding

Specifies the encoding to use for apt or javac command invocations.

-episode file

Generates an episode file for separate compilation.

-version

Displays release information.

-help

Displays a help message.

See Also

  • Using SchemaGen with Ant at
    http://jaxb.java.net/nonav/2.2.3u1/docs/schemagenTask.html

  • Java Architecture for XML Binding (JAXB) at
    http://docs.oracle.com/javase/8/docs/technotes/guides/xml/jaxb/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Scripting

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

16 Scripting

Use this command to run scripts that interact with the Java platform. This command is unsupported and experimental and might not be available in future JDK releases.

This part contains the following command:

jjs: Runs the Nashorn command-line script shell.

jrunscript: Experimental. Runs a command-line script shell that supports interactive and batch modes.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

6 Security

These commands set security policies on your local system and create applications that can work within the scope of the security policies set at remote sites.

This section contains the following commands:

keytool: Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

jarsigner: Signs and verifies Java Archive (JAR) files.

policytool: Reads and writes a plain text policy file based on user input through the utility GUI.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


serialver

Returns the serial version UID for specified classes.

Synopsis

serialver [ options ] [ classnames ]

options

The command-line options. See Options.

classnames

The classes for which the serialVersionUID is to be returned.

Description

The serialver command returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. When called with no arguments, the serialver command prints a usage line.

Options

-classpath path-files

Sets the search path for application classes and resources. Separate classes and resources with a colon (:).

-show

Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Notes

The serialver command loads and initializes the specified classes in its virtual machine, and by default, it does not set a security manager. If the serialver command is to be run with untrusted classes, then a security manager can be set with the following option:

-J-Djava.security.manager

When necessary, a security policy can be specified with the following option:

-J-Djava.security.policy=<policy file>

See Also

  • policytool(1)

  • The java.io.ObjectStream class description at
    http://docs.oracle.com/javase/8/docs/api/java/io/ObjectStreamClass.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


servertool

Provides an easy-to-use interface for developers to register, unregister, start up, and shut down a persistent server.

Synopsis

servertool -ORBInitialPort nameserverport [ options ] [ commands ]

options

The command-line options. See Options.

commands

The command-line commands. See Commands.

If you did not enter a command when starting servertool, the command-line tool displays with a servertool > prompt. Enter commands at the servertool > prompt.

If you enter a command when starting servertool, the Java IDL Server Tool starts, runs the command, and exits.

The -ORBInitialPort nameserverport option is required. The value for nameserverport must specify the port on which orbd is running and listening for incoming requests.

Note: On Oracle Solaris, you must become a root user to start a process on a port below 1024. Oracle recommends that you use a port number above or equal to 1024 for the nameserverport value.

Description

The servertool command provides the command-line interface for developers to register, unregister, start up, and shut down a persistent server. Command-line commands let you obtain various statistical information about the server. See Commands.

Options

-ORBInitialHost nameserverhost

This options is required. It specifies the host machine on which the name server runs and listens for incoming requests. The nameserverhost value must specify the port on which the orb is running and listening for requests. The value defaults to localhost when this option is not specified. If orbd and servertool are running on different machines, then you must specify the name or IP address of the host on which orbd is running.

Note: On Oracle Solaris, you must become a root user to start a process on a port below 1024. Oracle recommends that you use a port number above or equal to 1024 for the nameserverport value.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Commands

You can start the servertool command with or without a command-line command.

  • If you did not specify a command when you started servertool, then the command-line tool displays the servertool prompt where you can enter commands: servertool >.

  • If you specify a command when you start servertool, then the Java IDL Server Tool starts, executes the command, and exits.

register -server server-class-name -classpath classpath-to-server [ -applicationName application-name -args args-to-server -vmargs flags-for-JVM ]

Registers a new persistent server with the Object Request Broker Daemon (ORBD). If the server is not already registered, then it is registered and activated. This command causes an installation method to be called in the main class of the server identified by the -server option. The installation method must be public static void install(org.omg.CORBA.ORB). The install method is optional and lets developers provide their own server installation behavior, such as creating a database schema.

unregister -serverid server-id | -applicationName application-name

Unregisters a server from the ORBD with either its server ID or its application name. This command causes an uninstallation method to be called in the main class of the server identified by the -server option. The uninstall method must be public static void uninstall(org.omg.CORBA.ORB). The uninstall method is optional and lets developers provide their own server uninstallation behavior, such as undoing the behavior of the install method.

getserverid -applicationName application-name

Returns the server ID that corresponds to the application-name value.

list

Lists information about all persistent servers registered with the ORBD.

listappnames

Lists the application names for all servers currently registered with the ORBD.

listactive

Lists information about all persistent servers that were started by the ORBD and are currently running.

locate -serverid server-id | -applicationName application-name [ -endpointType endpointType ]

Locates the endpoints (ports) of a specific type for all ORBs created by a registered server. If a server is not already running, then it is activated. If an endpointType value is not specified, then the plain/non-protected endpoint associated with each ORB in a server is returned.

locateperorb -serverid server-id | -applicationName application-name [ -orbid ORB-name ]

Locates all the endpoints (ports) registered by a specific Object Request Broker (ORB) of registered server. If a server is not already running, then it is activated. If an orbid is not specified, then the default value of "" is assigned to the orbid. If any ORBs are created with an orbid of empty string, then all ports registered by it are returned.

orblist -serverid server-id | -applicationName application-name

Lists the ORBId of the ORBs defined on a server. An ORBId is the string name for the ORB created by the server. If the server is not already running, then it is activated.

shutdown -serverid server-id | -applicationName application-name

Shut down an active server that is registered with ORBD. During execution of this command, the shutdown method defined in the class specified by either the -serverid or -applicationName parameter is also called to shut down the server process.

startup -serverid server-id | -applicationName application-name

Starts up or activate a server that is registered with ORBD. If the server is not running, then this command starts the server. If the server is already running, then an error message is displayed.

help

Lists all the commands available to the server through the servertool command.

quit

Exits the servertool command.

See Also

  • orbd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Setting the Class Path

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

2 Setting the Class Path

The class path is the path that the Java Runtime Environment (JRE) searches for classes and other resource files.

This chapter covers the following topics:

  • Synopsis

  • Description

  • JDK Commands Class Path Options

  • CLASSPATH Environment Variable

  • Class Path Wild Cards

  • Class Path and Package Names

Synopsis

The class search path (class path) can be set using either the -classpath option when calling a JDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.

sdkTool -classpath classpath1:classpath2...

setenv CLASSPATH classpath1:classpath2...

sdkTool

A command-line tool, such as java, javac, javadoc, or apt. For a listing, see JDK Tools and Utilities at
http://docs.oracle.com/javase/8/docs/technotes/tools/index.html

classpath1:classpath2

Class paths to the JAR, zip or class files. Each class path should end with a file name or directory depending on what you are setting the class path to, as follows:

  • For a JAR or zip file that contains class files, the class path ends with the name of the zip or JAR file.

  • For class files in an unnamed package, the class path ends with the directory that contains the class files.

  • For class files in a named package, the class path ends with the directory that contains the root package, which is the first package in the full package name.

Multiple path entries are separated by semicolons with no spaces around the equals sign (=) in Windows and colons in Oracle Solaris.

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, then you must include a dot (.) in the new settings.

Class path entries that are neither directories nor archives (.zip or JAR files) nor the asterisk (*) wildcard character are ignored.

Description

The class path tells the JDK tools and applications where to find third-party and user-defined classes that are not extensions or part of the Java platform. See The Extension Mechanism at
http://docs.oracle.com/javase/8/docs/technotes/guides/extensions/index.html

The class path needs to find any classes you have compiled with the javac compiler. The default is the current directory to conveniently enable those classes to be found.

The JDK, the JVM and other JDK tools find classes by searching the Java platform (bootstrap) classes, any extension classes, and the class path, in that order. For details about the search strategy, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Class libraries for most applications use the extensions mechanism. You only need to set the class path when you want to load a class that is (a) not in the current directory or in any of its subdirectories, and (b) not in a location specified by the extensions mechanism.

If you upgrade from an earlier release of the JDK, then your startup settings might include CLASSPATH settings that are no longer needed. You should remove any settings that are not application-specific, such as classes.zip. Some third-party applications that use the Java Virtual Machine (JVM) can modify your CLASSPATH environment variable to include the libraries they use. Such settings can remain.

You can change the class path by using the -classpath or -cp option of some Java commands when you call the JVM or other JDK tools or by using the CLASSPATH environment variable. See JDK Commands Class Path Options. Using the -classpath option is preferred over setting the CLASSPATH environment variable because you can set it individually for each application without affecting other applications and without other applications modifying its value. See CLASSPATH Environment Variable.

Classes can be stored in directories (folders) or in archive files. The Java platform classes are stored in rt.jar. For more details about archives and information about how the class path works, see Class Path and Package Names.

Note: Some earlier releases of the JDK had a <jdk-dir>/classes entry in the default class path. That directory exists for use by the JDK software and should not be used for application classes. Application classes should be placed in a directory outside of the JDK directory hierarchy. That way, installing a new JDK does not force you to reinstall application classes. For compatibility with earlier releases, applications that use the <jdk-dir>/classes directory as a class library run in the current release, but there is no guarantee that they will run in future releases.

JDK Commands Class Path Options

The following commands have a -classpath option that replaces the path or paths specified by the CLASSPATH environment variable while the tool runs: java, jdb, javac, javah and jdeps.

The -classpath option is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.The java command also has a -cp option that is an abbreviation for -classpath.

For very special cases, both the java and javac commands have options that let you change the path they use to find their own class libraries. Most users will never need to use those options.

CLASSPATH Environment Variable

As explained in JDK Commands Class Path Options, the -classpath command-line option is preferred over the CLASSPATH environment variable. However, if you decide to use the CLASSPATH environment variable, this section explains how to set and clear it.

Set CLASSPATH

In csh, the CLASSPATH environment variable is modified with the setenv command. The format is:

setenv CLASSPATH path1:path2

In sh, the CLASSPATH environment variable can be modified with these commands:

CLASSPATH = path1:path2:...
export CLASSPATH

Clear CLASSPATH

If your CLASSPATH environment variable was set to a value that is not correct, or if your startup file or script is setting an incorrect path, then you can unset CLASSPATH with:

unsetenv CLASSPATH

In sh, you would use:

unset CLASSPATH

These commands unset CLASSPATH for the current shell only. You should also delete or modify your startup settings to ensure that you have the correct CLASSPATH settings in future sessions.

Change Startup Settings

If the CLASSPATH variable is set at system startup, then the place to look for it depends on your operating system:

Windows 95 and 98: Examine autoexec.bat for the set command.

Other (Windows NT, Windows 2000, ...): The CLASSPATH environment variable can be set with the System utility in the Control Panel.

If the CLASSPATH variable is set at system startup, then the place to look for it depends on the shell you are running:

The csh, tcsh shells: Examine your .cshrc file for the setenv command.

The sh, ksh shells: Examine your .profile file for the export command.

Class Path Wild Cards

Class path entries can contain the base name wildcard character (*), which is considered equivalent to specifying a list of all of the files in the directory with the extension .jar or .JAR. For example, the class path entry mydir/* specifies all JAR files in the directory named mydir. A class path entry consisting of * expands to a list of all the jar files in the current directory. Files are considered regardless of whether they are hidden (have names beginning with '.').

A class path entry that contains an asterisk (*) does not match class files. To match both classes and JAR files in a single directory mydir, use either mydir:mydir/* or mydir/*:mydir. The order chosen determines whether the classes and resources in mydir are loaded before JAR files in mydir or vice versa.

Subdirectories are not searched recursively. For example, mydir/* searches for JAR files only in mydir, not in mydir/subdir1, mydir/subdir2, and so on.

The order in which the JAR files in a directory are enumerated in the expanded class path is not specified and may vary from platform to platform and even from moment to moment on the same machine. A well-constructed application should not depend upon any particular order. If a specific order is required, then the JAR files can be enumerated explicitly in the class path.

Expansion of wild cards is done early, before the invocation of a program's main method, rather than late, during the class-loading process. Each element of the input class path that contains a wildcard is replaced by the (possibly empty) sequence of elements generated by enumerating the JAR files in the named directory. For example, if the directory mydir contains a.jar, b.jar, and c.jar, then the class path mydir/* is expanded into mydir/a.jar:mydir/b.jar:mydir/c.jar, and that string would be the value of the system property java.class.path.

The CLASSPATH environment variable is not treated any differently from the -classpath or -cp options. Wild cards are honored in all of these cases. However, class path wild cards are not honored in the Class-Path jar-manifest header.

Class Path and Package Names

Java classes are organized into packages that are mapped to directories in the file system. But, unlike the file system, whenever you specify a package name, you specify the whole package name and never part of it. For example, the package name for java.awt.Button is always specified as java.awt.

For example, suppose you want the JRE to find a class named Cool.class in the package utility.myapp. If the path to that directory is /java/MyClasses/utility/myapp, then you would set the class path so that it contains /java/MyClasses. To run that application, you could use the following java command:

java -classpath /java/MyClasses utility.myapp.Cool

When the application runs, the JVM uses the class path settings to find any other classes defined in the utility.myapp package that are used by the Cool class.

The entire package name is specified in the command. It is not possible, for example, to set the class path so it contains /java/MyClasses/utility and use the command java myapp.Cool. The class would not be found.

You might wonder what defines the package name for a class. The answer is that the package name is part of the class and cannot be modified, except by recompiling the class.

An interesting consequence of the package specification mechanism is that files that are part of the same package can exist in different directories. The package name is the same for each class, but the path to each file might start from a different directory in the class path.

Folders and Archive Files

When classes are stored in a directory (folder), such as /java/MyClasses/utility/myapp, then the class path entry points to the directory that contains the first element of the package name. (in this case, /java/MyClasses, because the package name is utility.myapp).

When classes are stored in an archive file (a zip or JAR file) the class path entry is the path to and including the zip or JAR file. For example, the command to use a class library that is in a JAR file as follows:

java -classpath /java/MyClasses/myclasses.jar utility.myapp.Cool

Multiple Specifications

To find class files in the directory /java/MyClasses and classes in /java/OtherClasses, you would set the class path to the following. Note that the two paths are separated by a colon.

java -classpath /java/MyClasses:/java/OtherClasses ...

Specification Order

The order in which you specify multiple class path entries is important. The Java interpreter will look for classes in the directories in the order they appear in the class path variable. In the previous example, the Java interpreter will first look for a needed class in the directory /java/MyClasses. Only when it does not find a class with the proper name in that directory will the interpreter look in the /java/OtherClasses directory.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Tools Reference
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 How Classes are Found

  • How the Java Runtime Finds Classes
    • How the Java Runtime Finds Bootstrap Classes
    • How the Java Runtime Finds Extension Classes
    • How the Java Runtime Finds User Classes
    • How the Java Runtime Finds JAR-class-path Classes
  • How the javac and javadoc Commands Find Classes
  • Class Loading and Security Policies

2 Setting the Class Path

  • Synopsis
  • Description
  • JDK Commands Class Path Options
  • CLASSPATH Environment Variable
    • Set CLASSPATH
    • Clear CLASSPATH
    • Change Startup Settings
  • Class Path Wild Cards
  • Class Path and Package Names
    • Folders and Archive Files
    • Multiple Specifications
    • Specification Order

3 JDK and JRE File Structure

  • Demos and Samples
  • Development Files and Directories
  • Additional Files and Directories

4 Command Reference

  • Command Reference Pages
    • Create and Build Applications
    • Security
    • Internationalization
    • Remote Method Invocation (RMI)
    • Java IDL and RMI-IIOP
    • Deploy Applications and Applets
    • Java Web Start
    • Monitor Java Applications
    • Monitor the Java Virtual Machine
    • Web Services
    • Troubleshooting
    • Scripting

5 Create and Build Applications

  • appletviewer
  • extcheck
  • jar
  • java
  • javac
  • javadoc
  • javah
  • javap
  • jdb
  • jdeps

6 Security

  • keytool
  • jarsigner
  • policytool

7 Internationalization

  • native2ascii

8 Remote Method Invocation (RMI)

  • rmic
  • rmiregistry
  • rmid
  • serialver

9 Java IDL and RMI-IIOP

  • tnameserv
  • idlj
  • orbd
  • servertool

10 Deploy Applications and Applets

  • pack200
  • unpack200
  • javafxpackager

11 Java Web Start

  • javaws

12 Monitor Java Applications

  • jconsole
  • jvisualvm

13 Monitor the JVM

  • jps
  • jstat
  • jstatd
  • jmc

14 Web Services

  • schemagen
  • wsgen
  • wsimport
  • xjc

15 Troubleshooting

  • jcmd
  • jinfo
  • jhat
  • jmap
  • jsadebugd
  • jstack

16 Scripting

  • jrunscript
  • jjs
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


tnameserv

Interface Definition Language (IDL).

Synopsis

tnameserve -ORBInitialPort [ nameserverport ]

-ORBInitialPort nameserverport

The initial port where the naming service listens for the bootstrap protocol used to implement the ORB resolve_initial_references and list_initial_references methods.

Description

Java IDL includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process that contains a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager. The Java IDL tutorials all use ORBD, but you can substitute the tnameserv command for the orbd command in any of the examples that use a Transient Naming Service.

See orbd(1) or Naming Service at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html

The CORBA Common Object Services (COS) Naming Service provides a tree-structure directory for object references similar to a file system that provides a directory structure for files. The Transient Naming Service provided with Java IDL, tnameserv, is a simple implementation of the COS Naming Service specification.

Object references are stored in the name space by name and each object reference-name pair is called a name binding. Name bindings can be organized under naming contexts. Naming contexts are name bindings and serve the same organizational function as a file system subdirectory. All bindings are stored under the initial naming context. The initial naming context is the only persistent binding in the name space. The rest of the name space is lost when the Java IDL naming service process stops and restarts.

For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to an initial naming context string for that naming service. The naming service can either be the Java IDL naming service or another COS-compliant naming service.

Start the Naming Service

You must start the Java IDL naming service before an application or applet that uses its naming service. Installation of the Java IDL product creates a script (Oracle Solaris: tnameserv) or executable file (Windows: tnameserv.exe) that starts the Java IDL naming service. Start the naming service so it runs in the background.

If you do not specify otherwise, then the Java IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB resolve_initial_references and list_initial_references methods, as follows:

tnameserv -ORBInitialPort nameserverport&

If you do not specify the name server port, then port 900 is used by default. When running Oracle Solaris software, you must become the root user to start a process on a port below 1024. For this reason, it is recommended that you use a port number greater than or equal to 1024. To specify a different port, for example, 1050, and to run the naming service in the background, from a UNIX command shell, enter:

tnameserv -ORBInitialPort 1050&

From an MS-DOS system prompt (Windows), enter:

start tnameserv -ORBInitialPort 1050

Clients of the name server must be made aware of the new port number. Do this by setting the org.omg.CORBA.ORBInitialPort property to the new port number when you create the ORB object.

Run the Server and Client on Different Hosts

In most of the Java IDL and RMI-IIOP tutorials, the naming service, server, and client are all running on the development machine. In real-world deployment, the client and server probably run on different host machines from the Naming Service.

For the client and server to find the Naming Service, they must be made aware of the port number and host on which the naming service is running. Do this by setting the org.omg.CORBA.ORBInitialPort and org.omg.CORBA.ORBInitialHost properties in the client and server files to the machine name and port number on which the Naming Service is running. An example of this is shown in Getting Started Using RMI-IIOP at
http://docs.oracle.com/javase/8/docs/technotes/guides/rmi-iiop/rmiiiopexample.html

You could also use the command-line options -ORBInitialPort nameserverport# and -ORBInitialHost nameserverhostname to tell the client and server where to find the naming service. For one example of doing this using the command-line option, see Java IDL: The Hello World Example on Two Machines at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/tutorial/jidl2machines.html

For example, suppose the Transient Naming Service, tnameserv is running on port 1050 on host nameserverhost. The client is running on host clienthost, and the server is running on host serverhost.

Start tnameserv on the host nameserverhost:

tnameserv -ORBInitialPort 1050

Start the server on the serverhost:

java Server -ORBInitialPort 1050 -ORBInitialHost nameserverhost

Start the client on the clienthost:

java Client -ORBInitialPort 1050 -ORBInitialHost nameserverhost

Stop the Naming Service

To stop the Java IDL naming service, use the relevant operating system command, such as kill for a Unix process or Ctrl+C for a Windows process. The naming service continues to wait for invocations until it is explicitly shut down. Note that names registered with the Java IDL naming service disappear when the service is terminated.

Options

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Examples

Add Objects to the Name Space

The following example shows how to add names to the name space. It is a self-contained Transient Naming Service client that creates the following simple tree.

Initial Naming Context
     plans
     Personal
          calendar
          schedule

In this example, plans is an object reference and Personal is a naming context that contains two object references: calendar and schedule.

import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClient {

    public static void main(String args[]) {

        try {

In Start the Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.

            Properties props = new Properties();
            props.put("org.omg.CORBA.ORBInitialPort", "1050");
            ORB orb = ORB.init(args, props);

This code obtains the initial naming context and assigns it to ctx. The second line copies ctx into a dummy object reference objref that is attached to various names and added into the name space.

            NamingContext ctx =
                NamingContextHelper.narrow(
                    orb.resolve_initial_references("NameService"));
             NamingContext objref = ctx;

This code creates a name plans of type text and binds it to the dummy object reference. plans is then added under the initial naming context using the rebind method. The rebind method enables you to run this program over and over again without getting the exceptions from using the bind method.

            NameComponent nc1 = new NameComponent("plans", "text");
            NameComponent[] name1 = {nc1};
            ctx.rebind(name1, objref);
            System.out.println("plans rebind successful!");

This code creates a naming context called Personal of type directory. The resulting object reference, ctx2, is bound to the name and added under the initial naming context.

            NameComponent nc2 = new NameComponent("Personal", "directory");
            NameComponent[] name2 = {nc2};
            NamingContext ctx2 = ctx.bind_new_context(name2);
            System.out.println("new naming context added..");

The remainder of the code binds the dummy object reference using the names schedule and calendar under the Personal naming context (ctx2).

            NameComponent nc3 = new NameComponent("schedule", "text");
            NameComponent[] name3 = {nc3};
            ctx2.rebind(name3, objref);
            System.out.println("schedule rebind successful!");

            NameComponent nc4 = new NameComponent("calender", "text");
            NameComponent[] name4 = {nc4};
            ctx2.rebind(name4, objref);
            System.out.println("calender rebind successful!");
        } catch (Exception e) {
            e.printStackTrace(System.err);
        }
    }
}

Browsing the Name Space

The following sample program shoes how to browse the name space.

import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClientList {

    public static void main(String args[]) {

        try {

In Start the Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.

            Properties props = new Properties();
            props.put("org.omg.CORBA.ORBInitialPort", "1050");
            ORB orb = ORB.init(args, props);

The following code obtains the initial naming context.

            NamingContext nc =
            NamingContextHelper.narrow(
                orb.resolve_initial_references("NameService"));

The list method lists the bindings in the naming context. In this case, up to 1000 bindings from the initial naming context will be returned in the BindingListHolder; any remaining bindings are returned in the BindingIteratorHolder.

            BindingListHolder bl = new BindingListHolder();
            BindingIteratorHolder blIt= new BindingIteratorHolder();
            nc.list(1000, bl, blIt);

This code gets the array of bindings out of the returned BindingListHolder. If there are no bindings, then the program ends.

            Binding bindings[] = bl.value;
            if (bindings.length == 0) return;

The remainder of the code loops through the bindings and prints outs the names.

            for (int i=0; i < bindings.length; i++) {

                // get the object reference for each binding
                org.omg.CORBA.Object obj = nc.resolve(bindings[i].binding_name);
                String objStr = orb.object_to_string(obj);
                int lastIx = bindings[i].binding_name.length-1;

                // check to see if this is a naming context
                if (bindings[i].binding_type == BindingType.ncontext) {
                    System.out.println("Context: " +
                        bindings[i].binding_name[lastIx].id);
                } else {
                    System.out.println("Object: " +
                        bindings[i].binding_name[lastIx].id);
                }
            }
        } catch (Exception e) {
            e.printStackTrace(System.err)
        }
    }
}

See Also

  • orbd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Troubleshooting

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

15 Troubleshooting

Use these commands to troubleshoot Java applications and the Java Virtual Machine (JVM). Most of these commands are unsupported and experimental and might not be available in future JDK releases. Some of these commands are not available on Windows platforms.

This section contains the following commands:

jcmd: Sends diagnostic command requests to a running JVM.

jinfo: Experimental. Generates configuration information.

jhat: Experimental. Analyzes the Java heap.

jmap: Experimental. Prints shared object memory maps or heap memory details for a process, core file, or remote debug server.

jsadebugd: Experimental. Attaches to a Java process or core file and acts as a debug server.

jstack: Experimental. Prints Java thread stack traces for a Java process, core file, or remote debug server.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


unpack200

Transforms a packed file produced by pack200(1) into a JAR file for web deployment.

Synopsis

unpack200 [ options ] input-file JAR-file

options

The command-line options. See Options.

input-file

Name of the input file, which can be a pack200 gzip file or a pack200 file. The input can also be JAR file produced by pack200(1) with an effort of 0, in which case the contents of the input file are copied to the output JAR file with the Pack200 marker.

JAR-file

Name of the output JAR file.

Description

The unpack200 command is a native implementation that transforms a packed file produced by pack200(1) into a JAR file. A typical usage follows. In the following example, the myarchive.jar file is produced from myarchive.pack.gz with the default unpack200 command settings.

unpack200 myarchive.pack.gz myarchive.jar

Options

-Hvalue --deflate-hint=value

Sets the deflation to be true, false, or keep on all entries within a JAR file. The default mode is keep. If the value is true or false, then the --deflate=hint option overrides the default behavior and sets the deflation mode on all entries within the output JAR file.

-r --remove-pack-file

Removes the input pack file.

-v --verbose

Displays minimal messages. Multiple specifications of this option displays more verbose messages.

-q --quiet

Specifies quiet operation with no messages.

-lfilename --log-file=filename

Specifies a log file where output messages are logged.

-? -h --help

Prints help information about the unpack200 command.

-V --version

Prints version information about the unpack200 command.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Notes

This command should not be confused with the unpack command. They are distinctly separate products.

The Java SE API Specification provided with the JDK is the superseding authority in case of discrepancies.

Exit Status

The following exit values are returned: 0 for successful completion, and a value that is greater than 0 when an error occurred.

See Also

  • pack200(1)

  • jar(1)

  • jarsigner(1)

  • Pack200 and Compression at
    http://docs.oracle.com/javase/8/docs/technotes/guides/deployment/deployment-guide/pack200.html

  • The Java SE Technical Documentation page at
    http://docs.oracle.com/javase/

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Web Services

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

14 Web Services

Use these commands to create and manage web service resources.

This section contains the following commands:

schemagen: Generates a schema for every name space that is referenced in your Java classes.

wsgen: Reads a web service endpoint implementation class (SEI) and generates all of the required artifacts for web service deployment and invocation.

wsimport: Generates JAX-WS portable artifacts that can be packaged in a WAR file and provides an Ant task.

xjc: Compiles an XML schema file into fully annotated Java classes.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


wsgen

Reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation.

Synopsis

wsgen [ options ] SEI

options

The command-line options. See Options.

SEI

The web service endpoint implementation class (SEI) to be read.

Description

The wsgen command generates JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment and invocation. JAXWS 2.1.1 RI also provides a wsgen Ant task, see the Tools tab of the JAX-WS (wsgen) page at
http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html

To start the wsgen command, do the following:

export JAXWS_HOME=/pathto/jaxws-ri
$JAXWS_HOME/bin/wsgen.sh -help

Options

-classpath path

The location of the input class files.

-cp path

The location of the input class files.

-d directory

The location for where to place generated output files.

-extension

Allow vendor extensions. Use of extensions can result in applications that are not portable or that do not work with other implementations.

-help

Displays a help message about the wsgen command.

-keep

Keeps the generated files.

-r directory

Uses this option with the -wsdl option to specify where to place generated resource files such as WSDLs.

-s directory

The location for where to place generated source files.

-verbose

Displays compiler messages.

-version

Prints release information.

-wsdl [ :protocol ]

An optional command that generates a WSDL file to review before endpoint deployment. The WSDL files contains a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.

By default the wsgen command does not generate a WSDL file. The protocol value is optional and is used to specify what protocol should be used for the WSDL binding (wsdl:binding). Valid protocols are soap1.1 and Xsoap1.2. The default is soap1.1. The Xsoap1.2 protocol is not standard and can only be used with the -extension option.

-servicename name

Used only with the -wsdl option to specify a particular WSDL service (wsdl:service) name to be generated in the WSDL, for example: -servicename "{http://mynamespace/}MyService".

-portname name

Used only with the -wsdl option to specify a particular WSDL port (wsdl:port) name to be generated in the WSDL, for example: -portname "{http://mynamespace/}MyPort".

Examples

The following example generates the wrapper classes for StockService with @WebService annotations inside stock directory.

wsgen -d stock -cp myclasspath stock.StockService

The following example generates a SOAP 1.1 WSDL and schema for the stock.StockService class with @WebService annotations.

wsgen -wsdl -d stock -cp myclasspath stock.StockService

The following example generates a SOAP 1.2 WSDL.

wsgen -wsdl:Xsoap1.2 -d stock -cp myclasspath stock.StockService

Note: You do not have to generate WSDL at development time because the JAXWS run time environment generates a WSDL for you when you deploy your service.

See Also

  • wsimport(1)

  • The Tools tab of the JAX-WS (wsgen) page
    http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


wsimport

Generates JAX-WS portable artifacts that can be packaged in a web application archive (WAR) file and provides an Ant task.

Synopsis

wsimport [ options ] wsdl

options

The command-line options. See Options.

wsdl

The file that contains the machine-readable description of how the web service can be called, what parameters it expects, and what data structures it returns.

Description

The wsimport command generates the following JAX-WS portable artifacts. These artifacts can be packaged in a WAR file with the WSDL and schema documents and the endpoint implementation to be deployed. The wsimport command also provides a wsimport Ant task, see the Tools tab of the Wsimport Ant Task page at
http://jax-ws.java.net/nonav/2.1.1/docs/wsimportant.html

  • Service Endpoint Interface (SEI)

  • Service

  • Exception class is mapped from wsdl:fault (if any)

  • Async Response Bean is derived from response wsdl:message (if any)

  • JAXB generated value types (mapped java classes from schema types)

To start the wsgen command, do the following:

Oracle Solaris/Linux:

/bin/wsimport.sh -help

Windows:

\bin\wsimport.bat -help

Options

-d directory

Specifies where to place generated output files.

-b path

Specifies external JAX-WS or JAXB binding files. Multiple JAX-WS and JAXB binding files can be specified with the -b option. You can use these files to customize package names, bean names, and so on. For more information about JAX-WS and JAXB binding files, see the Users Guide tab of WSDL Customization at
http://jax-ws.java.net/nonav/2.1.1/docs/wsimportant.html

-B jaxbOption

Passes the jaxbOption option to the JAXB schema compiler.

-catalog

Specifies a catalog file to resolve external entity references. The -catalog option supports the TR9401, XCatalog, and OASIS XML Catalog formats. See the Users Guide tab of the Catalog Support page at
http://jax-ws.java.net/nonav/2.1.1/docs/catalog-support.html

-extension

Allows vendor extensions. Use of extensions can result in applications that are not portable or that do not work with other implementations.

-help

Displays a help message for the wsimport command.

-httpproxy: host:port

Specifies an HTTP proxy server. The default is 8080.

-keep

Keeps generated files.

-p name

Specifies a target package name to override the WSDL and schema binding customizations, and the default algorithm defined in the specification.

-s directory

Specifies where to place generated source files.

-verbose

Displays compiler messages.

-version

Prints release information.

-wsdllocation location

Specifies the @WebServiceClient.wsdlLocation value.

-target

Generates code according to the specified JAX-WS specification version. Version 2.0 generates compliant code for the JAX-WS 2.0 specification.

-quiet

Suppresses the wsimport command output.

Multiple JAX-WS and JAXB binding files can be specified using the -b option, and they can be used to customize various things such as package names and bean names. More information about JAX-WS and JAXB binding files can be found in the customization documentation at
https://jax-ws.dev.java.net/nonav/2.1.1/docs/customizations.html

Nonstandard Options

-XadditionalHeaders

Maps headers not bound to a request or response message to Java method parameters.

-Xauthfile file

The WSDL URI that specifies the file that contains authorization information. This URI is in the following format:

http://user-name:password@host-name/web-service-name>?wsdl.

-Xdebug

Prints debugging information.

-Xno-addressing-databinding

Enables binding of W3C EndpointReferenceType to Java.

-Xnocompile

Does not compile the generated Java files.

Example

The following example generates the Java artifacts and compiles the artifacts by importing http://stockquote.example.com/quote?wsdl

wsimport -p stockquote http://stockquote.example.com/quote?wsdl

See Also

  • wsgen(1)

  • The Tools tab of Wsimport Ant Task page
    http://jax-ws.java.net/nonav/2.1.1/docs/wsimportant.html

  • The Users Guide tab of Catalog Support page
    http://jax-ws.java.net/nonav/2.1.1/docs/catalog-support.html

  • The Users Guide tab of WSDL Customization page
    http://jax-ws.java.net/nonav/2.1.1/docs/wsimportant.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


xjc

Compiles an XML schema file into fully annotated Java classes.

Synopsis

xjc [ options ] schema file/URL/dir/jar ... [-b bindinfo ] ...

options

The command-line options. See Options.

schema file/URL/dir/jar ...

The location of the XML schema file. If dir is specified, then all schema files in it are compiled. If jar is specified, then the /META-INF/sun-jaxb.episode binding file is compiled.

-b bindinfo

The location of the bindings files.

Description

Start the binding compiler with the appropriate xjc shell script in the bin directory for your platform. There is also an Ant task to run the binding complier. See Using the XJC with Ant at
http://jaxb.java.net/nonav/2.1.3/docs/xjcTask.html

Options

  • See also Nonstandard Options

  • See also Deprecated and Removed Options

-nv

By default, the XJC binding compiler performs strict validation of the source schema before processing it. Use this option to disable strict schema validation. This does not mean that the binding compiler will not perform any validation, but means that it will perform a less-strict validation.

-extension

By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification. Appendix E.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1.0. In some cases, you may be allowed to use them in the -extension mode enabled by this switch. In the default (strict) mode, you are also limited to using only the binding customization defined in the specification. By using the -extension switch, you will be allowed to use the JAXB Vendor Extensions.

-b file

Specifies one or more external binding files to process. Each binding file must have its own -b switch. The syntax of the external binding files is flexible. You can have a single binding file that contains customization for multiple schemas or you can break the customization into multiple bindings files: xjc schema1.xsd schema2.xsd schema3.xsd -b bindings123.xjb xjc schema1.xsd schema2.xsd schema3.xsd -b bindings1.xjb -b bindings2.xjb -b bindings3.xjb. In addition, the ordering of the schema files and binding files on the command line does not matter.

-d dir

By default, the XJC binding compiler generates the Java content classes in the current directory. Use this option to specify an alternate output directory. The output directory must already exist. The XJC binding compiler does not create it for you.

-p pkg

When you specify a target package with this command-line option, it overrides any binding customization for the package name and the default package name algorithm defined in the specification.

-httpproxy proxy

Specifies the HTTP or HTTPS proxy in the format [user[:password]@]proxyHost[:proxyPort]. The old -host and -port options are still supported by the RI for backward compatibility, but they were deprecated. The password specified with this option is an argument that is visible to other users who use the top command. For greater security, use the -httpproxyfile option.

-httpproxyfile file

Specifies the HTTP or HTTPS proxy with a file. The same format as the -httpproxy option, but the password specified in the file is not visible to other users.

-classpath arg

Specifies where to find client application class files used by the jxb:javaType and xjc:superClass customization.

-catalog file

Specifies catalog files to resolve external entity references. Supports the TR9401, XCatalog, and OASIS XML Catalog formats. See XML Entity and URI Resolvers at
http://xerces.apache.org/xml-commons/components/resolver/resolver-article.html

-readOnly

By default, the XJC binding compiler does not write-protect the Java source files it generates. Use this option to force the XJC binding compiler to mark the generated Java sources as read-only.

-npa

Suppresses the generation of package level annotations into **/package-info.java. Using this switch causes the generated code to internalize those annotations into the other generated classes.

-no-header

Suppresses the generation of a file header comment that includes some note and time stamp. Using this makes the generated code more compatible with the diff command.

-target 2.0

Avoids generating code that relies on any JAXB 2.1 features. This will allow the generated code to run with JAXB 2.0 runtime environment (such as Java SE 6).

-xmlschema

Treats input schemas as W3C XML Schema (default). If you do not specify this switch, then your input schemas are treated as though they are W3C XML Schemas.

-relaxing

Treats input schemas as RELAX NG (experimental and unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.

-relaxing-compact

Treat input schemas as RELAX NG compact syntax (experimental and unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.

-dtd

Treats input schemas as XML DTD (experimental and unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.

-wsdl

Treats input as WSDL and compiles schemas inside it (experimental and unsupported).

-quiet

Suppress compiler output, such as progress information and warnings.

-verbose

Be extra verbose, such as printing informational messages or displaying stack traces upon some errors.

-help

Displays a brief summary of the compiler switches.

-version

Displays the compiler version information.

schema file/URL/dir

Specifies one or more schema files to compile. If you specify a directory, then the xjc command scans it for all schema files and compiles them.

Nonstandard Options

-XLocator

Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling.

-Xsync-methods

Causes all of the generated method signatures to include the synchronized keyword.

-mark-generated

Marks the generated code with the annotation @javax.annotation.Generated.

-episode file

Generates the specified episode file for separate compilation.

Deprecated and Removed Options

-host & -port

These options are replaced with the -httpproxy option. For backward compatibility, these options are supported, but will not be documented and might be removed from future releases.

-use-runtime

Because the JAXB 2.0 specification has defined a portable runtime environment, it is no longer necessary for the JAXB RI to generate **/impl/runtime packages. Therefore, this switch is obsolete and was removed.

-source

The -source compatibility switch was introduced in the first JAXB 2.0 Early Access release. This switch is removed from future releases of JAXB 2.0. If you need to generate 1.0.x code, then use an installation of the 1.0.x code base.

Compiler Restrictions

In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches. Keep the following list of restrictions in mind when running the xjc command. Most of these issues only apply when you compile multiple schemas with multiple invocations of the xjc command.

To compile multiple schemas at the same time, keep the following precedence rules for the target Java package name in mind:

  1. The -p option has the highest precedence.

  2. jaxb:package customization.

  3. If targetNamespace is declared, then apply the targetNamespace to the Java package name algorithm defined in the specification.

  4. If no targetNamespace is declared, then use a hard coded package named generated.

You cannot have more than one jaxb:schemaBindings per name space, so it is impossible to have two schemas in the same target name space compiled into different Java packages.

All schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time. They cannot be compiled independently and work as expected.

Element substitution groups that are spread across multiple schema files must be compiled at the same time.

See Also

  • Binding Compiler (xjc) at
    http://jaxb.java.net/nonav/2.2.3u1/docs/xjc.html

  • Java Architecture for XML Binding (JAXB) at
    http://www.oracle.com/technetwork/articles/javase/index-140168.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jar

Manipulates Java Archive (JAR) files.

Synopsis

Create JAR file

jar c[efmMnv0] [entrypoint] [jarfile] [manifest] [-C dir] file ... [-Joption ...] [@arg-file ...]

Update JAR file

jar u[efmMnv0] [entrypoint] [jarfile] [manifest] [-C dir] file ... [-Joption ...] [@arg-file ...]

Extract JAR file

jar x[vf] [jarfile] file ... [-Joption ...] [@arg-file ...]

List Contents of JAR file

jar t[vf] [jarfile] file ... [-Joption ...] [@arg-file ...]

Add Index to JAR file

jar i jarfile [-Joption ...] [@arg-file ...]

Description

The jar command is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, the jar command was designed mainly to package Java applets or applications into a single archive. When the components of an applet or application (files, images and sounds) are combined into a single archive, they can be downloaded by a Java agent (such as a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. The jar command also compresses files, which further improves download time. The jar command also allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. A JAR file can be used as a class path entry, whether or not it is compressed.

The syntax for the jar command resembles the syntax for the tar command. It has several operation modes, defined by one of the mandatory operation arguments. Other arguments are either options that modify the behavior of the operation, or operands required to perform the operation.

Operation Arguments

When using the jar command, you have to select an operation to be performed by specifying one of the following operation arguments. You can mix them up with other one-letter options on the command line, but usually the operation argument is the first argument specified.

c

Create a new JAR archive.

i

Generate index information for a JAR archive.

t

List the contents of a JAR archive.

u

Update a JAR archive.

x

Extract files from a JAR archive.

Options

Use the following options to customize how the JAR file is created, updated, extracted, or viewed:

e

Sets the class specified by the entrypoint operand to be the entry point for a standalone Java application bundled into an executable JAR file. The use of this option creates or overrides the Main-Class attribute value in the manifest file. The e option can be used when creating (c) or updating (u) the JAR file.

For example, the following command creates the Main.jar archive with the Main.class file where the Main-Class attribute value in the manifest is set to Main:

jar cfe Main.jar Main Main.class

The Java Runtime Environment (JRE) can directly call this application by running the following command:

java -jar Main.jar

If the entry point class name is in a package, then it could use either the dot (.) or slash (/) as the delimiter. For example, if Main.class is in a package called mydir, then the entry point can be specified in one of the following ways:

jar -cfe Main.jar mydir/Main mydir/Main.class
jar -cfe Main.jar mydir.Main mydir/Main.class

Note:

Specifying both m and e options together when a particular manifest also contains the Main-Class attribute results in an ambiguous Main-Class specification. The ambiguity leads to an error and the jar command creation or update operation is terminated.

f

Sets the file specified by the jarfile operand to be the name of the JAR file that is created (c), updated (u), extracted (x) from, or viewed (t). Omitting the f option and the jarfile operand instructs the jar command to accept the JAR file name from stdin (for x and t) or send the JAR file to stdout (for c and u).

m

Includes names and values of attributes from the file specified by the manifest operand in the manifest file of the jar command (located in the archive at META-INF/MANIFEST.MF). The jar command adds the attribute's name and value to the JAR file unless an entry already exists with the same name, in which case the jar command updates the value of the attribute. The m option can be used when creating (c) or updating (u) the JAR file.

You can add special-purpose name-value attribute pairs to the manifest that are not contained in the default manifest file. For example, you can add attributes that specify vendor information, release information, package sealing, or to make JAR-bundled applications executable. For examples of using the m option, see Packaging Programs at
http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

M

Does not create a manifest file entry (for c and u), or delete a manifest file entry when one exists (for u). The M option can be used when creating (c) or updating (u) the JAR file.

n

When creating (c) a JAR file, this option normalizes the archive so that the content is not affected by the packing and unpacking operations of the pack200(1) command. Without this normalization, the signature of a signed JAR can become invalid.

v

Generates verbose output to standard output. See Examples.

0

(Zero) Creates (c) or updates (u) the JAR file without using ZIP compression.

-C dir

When creating (c) or updating (u) a JAR file, this option temporarily changes the directory while processing files specified by the file operands. Its operation is intended to be similar to the -C option of the UNIX tar utility.For example, the following command changes to the classes directory and adds the Bar.class file from that directory to my.jar:

jar uf my.jar -C classes Bar.class

The following command changes to the classes directory and adds to my.jar all files within the classes directory (without creating a classes directory in the JAR file), then changes back to the original directory before changing to the bin directory to add Xyz.class to my.jar.

jar uf my.jar -C classes . -C bin Xyz.class

If classes contained files bar1 and bar2, then the JAR file will contain the following after running the previous command:

% jar tf my.jar
META-INF/
META-INF/MANIFEST.MF
bar1
bar2
Xyz.class
-Joption

Sets the specified JVM option to be used when the JRE runs the JAR file. JVM options are described on the reference page for the java(1) command. For example, -J-Xms48m sets the startup memory to 48 MB.

Operands

The following operands are recognized by the jar command.

file

When creating (c) or updating (u) a JAR file, the file operand defines the path and name of the file or directory that should be added to the archive. When extracting (x) or listing the contents (t) of a JAR file, the file operand defines the path and name of the file to be extracted or listed. At least one valid file or directory must be specified. Separate multiple file operands with spaces. If the entrypoint, jarfile, or manifest operands are used, the file operands must be specified after them.

entrypoint

When creating (c) or updating (u) a JAR file, the entrypoint operand defines the name of the class that should be the entry point for a standalone Java application bundled into an executable JAR file. The entrypoint operand must be specified if the e option is present.

jarfile

Defines the name of the file to be created (c), updated (u), extracted (x), or viewed (t). The jarfile operand must be specified if the f option is present. Omitting the f option and the jarfile operand instructs the jar command to accept the JAR file name from stdin (for x and t) or send the JAR file to stdout (for c and u).

When indexing (i) a JAR file, specify the jarfile operand without the f option.

manifest

When creating (c) or updating (u) a JAR file, the manifest operand defines the preexisting manifest files with names and values of attributes to be included in MANIFEST.MF in the JAR file. The manifest operand must be specified if the f option is present.

@arg-file

To shorten or simplify the jar command, you can specify arguments in a separate text file and pass it to the jar command with the at sign (@) as a prefix. When the jar command encounters an argument beginning with the at sign, it expands the contents of that file into the argument list.

An argument file can include options and arguments of the jar command (except the -J options, because they are passed to the launcher, which does not support argument files). The arguments within a file can be separated by spaces or newline characters. File names within an argument file are relative to the current directory from which you run the jar command, not relative to the location of the argument file. Wild cards, such as the asterisk (*), that might otherwise be expanded by the operating system shell, are not expanded.

The following example, shows how to create a classes.list file with names of files from the current directory output by the find command:

find . -name '*.class' -print > classes.list

You can then execute the jar command and pass the classes.list file to it using the @arg-file syntax:

jar cf my.jar @classes.list

An argument file can be specified with a path, but any file names inside the argument file that have relative paths are relative to the current working directory of the jar command, not to the path passed in, for example:

jar @dir/classes.list

Notes

The e, f, and m options must appear in the same order on the command line as the entrypoint, jarfile, and manifest operands, for example:

jar cmef myManifestFile MyMainClass myFile.jar *.class

Examples

Example 1Adding All Files From the Current Directory With Verbose Output
C:\Java> dir
12/09/96  12:20a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/09/96  12:18a                   946 1.au
12/09/96  12:18a                 1,039 2.au
12/09/96  12:18a                   993 3.au
12/09/96  12:19a                48,072 spacemusic.au
12/09/96  12:19a                   527 at_work.gif
12/09/96  12:19a                12,818 monkey.jpg
12/09/96  12:19a                16,242 Animator.class
12/09/96  12:20a                 3,368 Wave.class
 10 File(s)        91,118 bytes

C:\Java> jar cvf bundle.jar *
adding manifest
adding: 1.au
adding: 2.au
adding: 3.au
adding: Animator.class
adding: Wave.class
adding: at_work.gif
adding: monkey.jpg
adding: spacemusic.au
Example 2Adding Files From Subdirectories
C:\Java> dir
12/09/96  12:11a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/03/96  06:54p        <DIR>          audio
12/06/96  02:02p        <DIR>          images
12/09/96  12:10a        <DIR>          classes
5 File(s)        207,360 bytes

C:\Java> jar cvf bundle.jar audio classes images
adding: audio/1.au
adding: audio/2.au
adding: audio/3.au
adding: audio/spacemusic.au
adding: classes/Animator.class
adding: classes/Wave.class
adding: images/monkey.jpg
adding: images/at_work.gif

C:\Java> dir
12/09/96  12:11a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/09/96  12:11a               207,360 bundle.jar
Example 3Listing the Contents of JAR
C:\Java> jar tf bundle.jar

META-INF/
META-INF/MANIFEST.MF
audio/1.au
audio/2.au
audio/3.au
audio/spacemusic.au
classes/Animator.class
classes/Wave.class
images/monkey.jpg
images/at_work.gif
Example 4Adding an Index

Use the i option when you split the interdependent classes for a stock trade application into three JAR files: main.jar, buy.jar, and sell.jar. If you specify the Class-Path attribute in the main.jar manifest, then you can use the i option to speed up the class loading time for your application:

Class-Path: buy.jar sell.jar
jar i main.jar

An INDEX.LIST file is inserted to the META-INF directory. This enables the application class loader to download the specified JAR files when it is searching for classes or resources.

The application class loader uses the information stored in this file for efficient class loading. To copy directories, first compress files in dir1 to stdout, then pipeline and extract from stdin to dir2 (omitting the -f option from both jar commands):

(cd dir1; jar c .) | (cd dir2; jar x)

See Also

  • pack200(1).

  • The JAR section of The Java Tutorials at
    http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jarsigner

Signs and verifies Java Archive (JAR) files.

Synopsis

jarsigner [ options ] jar-file alias

jarsigner -verify [ options ] jar-file [alias ...]

options

The command-line options. See Options.

-verify

The -verify option can take zero or more keystore alias names after the JAR file name. When the -verify option is specified, the jarsigner command checks that the certificate used to verify each signed entry in the JAR file matches one of the keystore aliases. The aliases are defined in the keystore specified by -keystore or the default keystore.

If you also specified the -strict option, and the jarsigner command detected severe warnings, the message, "jar verified, with signer errors" is displayed.

jar-file

The JAR file to be signed.

If you also specified the -strict option, and the jarsigner command detected severe warnings, the message, "jar signed, with signer errors" is displayed.

alias

The aliases are defined in the keystore specified by -keystore or the default keystore.

Description

The jarsigner tool has two purposes:

  • To sign Java Archive (JAR) files.

  • To verify the signatures and integrity of signed JAR files.

The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution. A tool named jar enables developers to produce JAR files. (Technically, any zip file can also be considered a JAR file, although when created by the jar command or processed by the jarsigner command, JAR files also contain a META-INF/MANIFEST.MF file.)

A digital signature is a string of bits that is computed from some data (the data being signed) and the private key of an entity (a person, company, and so on). Similar to a handwritten signature, a digital signature has many useful characteristics:

  • Its authenticity can be verified by a computation that uses the public key corresponding to the private key used to generate the signature.

  • It cannot be forged, assuming the private key is kept secret.

  • It is a function of the data signed and thus cannot be claimed to be the signature for other data as well.

  • The signed data cannot be changed. If the data is changed, then the signature cannot be verified as authentic.

To generate an entity's signature for a file, the entity must first have a public/private key pair associated with it and one or more certificates that authenticate its public key. A certificate is a digitally signed statement from one entity that says that the public key of another entity has a particular value.

The jarsigner command uses key and certificate information from a keystore to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains that authenticate the corresponding public keys. The keytool command is used to create and administer keystores.

The jarsigner command uses an entity's private key to generate a signature. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file. The jarsigner command can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file).

The jarsigner command can generate signatures that include a time stamp that lets a systems or deployer (including Java Plug-in) to check whether the JAR file was signed while the signing certificate was still valid. In addition, APIs allow applications to obtain the timestamp information.

At this time, the jarsigner command can only sign JAR files created by the jar command or zip files. JAR files are the same as zip files, except they also have a META-INF/MANIFEST.MF file. A META-INF/MANIFEST.MF file is created when the jarsigner command signs a zip file.

The default jarsigner command behavior is to sign a JAR or zip file. Use the -verify option to verify a signed JAR file.

The jarsigner command also attempts to validate the signer's certificate after signing or verifying. If there is a validation error or any other problem, the command generates warning messages. If you specify the -strict option, then the command treats severe warnings as errors. See Errors and Warnings.

Keystore Aliases

All keystore entities are accessed with unique aliases.

When you use the jarsigner command to sign a JAR file, you must specify the alias for the keystore entry that contains the private key needed to generate the signature. For example, the following command signs the JAR file named MyJARFile.jar with the private key associated with the alias duke in the keystore named mystore in the working directory. Because no output file is specified, it overwrites MyJARFile.jar with the signed JAR file.

jarsigner -keystore /working/mystore -storepass <keystore password>
      -keypass <private key password> MyJARFile.jar duke

Keystores are protected with a password, so the store password must be specified. You are prompted for it when you do not specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password must be specified, and you are prompted for the password when you do not specify it on the command line and it is not the same as the store password.

Keystore Location

The jarsigner command has a -keystore option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the user.home system property.

The input stream from the -keystore option is passed to the KeyStore.load method. If NONE is specified as the URL, then a null stream is passed to the KeyStore.load method. NONE should be specified when the KeyStore class is not file based, for example, when it resides on a hardware token device.

Keystore Implementation

The KeyStore class provided in the java.security package supplies a number of well-defined interfaces to access and modify the information in a keystore. You can have multiple different concrete implementations, where each implementation is for a particular type of keystore.

Currently, there are two command-line tools that use keystore implementations (keytool and jarsigner), and a GUI-based tool named Policy Tool. Because the KeyStore class is publicly available, JDK users can write additional security applications that use it.

There is a built-in default implementation provided by Oracle that implements the keystore as a file, that uses a proprietary keystore type (format) named JKS. The built-in implementation protects each private key with its individual password and protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based, which means the application interfaces supplied by the KeyStore class are implemented in terms of a Service Provider Interface (SPI). There is a corresponding abstract KeystoreSpi class, also in the java.security package, that defines the Service Provider Interface methods that providers must implement. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider in the Java Cryptography Architecture at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider.html

Applications can choose different types of keystore implementations from different providers, with the getInstance factory method in the KeyStore class. A keystore type defines the storage and data format of the keystore information and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

The jarsigner and policytool commands can read file-based keystores from any location that can be specified using a URL. In addition, these commands can read non-file-based keystores such as those provided by MSCAPI on Windows and PKCS11 on all platforms.

For the jarsigner and keytool commands, you can specify a keystore type at the command line with the -storetype option. For Policy Tool, you can specify a keystore type with the Edit command in the KeyStore menu.

If you do not explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the JDK security properties directory, java.home/lib/security, where java.home is the runtime environment's directory. The jre directory in the JDK or the top-level directory of the Java Runtime Environment (JRE).

Each tool gets the keystore.type value and then examines all the installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type as specified in the keystore.type property:

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is jks (the proprietary type of the keystore implementation provided by Oracle). This is specified by the following line in the security properties file:

keystore.type=jks

Case does not matter in keystore type designations. For example, JKS is the same as jks.

To have the tools use a keystore implementation other than the default, change that line to specify a different keystore type. For example, if you have a provider package that supplies a keystore implementation for a keystore type called pkcs12, then change the line to the following:

keystore.type=pkcs12

Note: If you use the PKCS 11 provider package, then see "KeyTool" and "JarSigner" in Java PKCS #11 Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html

Supported Algorithms

By default, the jarsigner command signs a JAR file using one of the following algorithms:

  • Digital Signature Algorithm (DSA) with the SHA1 digest algorithm

  • RSA algorithm with the SHA256 digest algorithm

  • Elliptic Curve (EC) cryptography algorithm with the SHA256 with Elliptic Curve Digital Signature Algorithm (ECDSA).

If the signer's public and private keys are DSA keys, then jarsigner signs the JAR file with the SHA1withDSA algorithm. If the signer's keys are RSA keys, then jarsigner attempts to sign the JAR file with the SHA256withRSA algorithm. If the signer's keys are EC keys, then jarsigner signs the JAR file with the SHA256withECDSA algorithm.

These default signature algorithms can be overridden using the -sigalg option.

The Signed JAR File

When the jarsigner command is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory:

  • A signature file with an .SF extension

  • A signature block file with a .DSA, .RSA, or .EC extension

The base file names for these two files come from the value of the -sigFile option. For example, when the option is -sigFile MKSIGN, the files are named MKSIGN.SF and MKSIGN.DSA

If no -sigfile option appears on the command line, then the base file name for the .SF and .DSA files is the first 8 characters of the alias name specified on the command line, all converted to uppercase. If the alias name has fewer than 8 characters, then the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, then each such character is converted to an underscore (_) character in forming the file name. Valid characters include letters, digits, underscores, and hyphens.

Signature File

A signature file (.SF file) looks similar to the manifest file that is always included in a JAR file when the jarsigner command is used to sign the file. For each source file included in the JAR file, the .SF file has three lines, such as in the manifest file, that list the following:

  • File name

  • Name of the digest algorithm (SHA)

  • SHA digest value

In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. In the .SF file, the digest value for a specified source file is the hash of the three lines in the manifest file for the source file.

The signature file, by default, includes a header with a hash of the whole manifest file. The header also contains a hash of the manifest header. The presence of the header enables verification optimization. See JAR File Verification.

Signature Block File

The .SF file is signed and the signature is placed in the signature block file. This file also contains, encoded inside it, the certificate or certificate chain from the keystore that authenticates the public key corresponding to the private key used for signing. The file has the extension .DSA, .RSA, or .EC, depending on the digest algorithm used.

Signature Time Stamp

The jarsigner command can generate and store a signature time stamp when signing a JAR file. In addition, jarsigner supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options. See Options.

-tsa url
-tsacert alias
-altsigner class
-altsignerpath classpathlist
-tsapolicyid policyid

JAR File Verification

A successful JAR file verification occurs when the signatures are valid, and none of the files that were in the JAR file when the signatures were generated have changed since then. JAR file verification involves the following steps:

  1. Verify the signature of the .SF file.

    The verification ensures that the signature stored in each signature block (.DSA) file was generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file was not tampered with.

  2. Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest.

    The .SF file by default includes a header that contains a hash of the entire manifest file. When the header is present, the verification can check to see whether or not the hash in the header matches the hash of the manifest file. If there is a match, then verification proceeds to the next step.

    If there is no match, then a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. See Signature File.

    One reason the hash of the manifest file that is stored in the .SF file header might not equal the hash of the current manifest file is that one or more files were added to the JAR file (with the jar tool) after the signature and .SF file were generated. When the jar tool is used to add files, the manifest file is changed by adding sections to it for the new files, but the .SF file is not changed. A verification is still considered successful when none of the files that were in the JAR file when the signature was generated have been changed since then. This happens when the hashes in the non-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file.

  3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest and compare the result with the digest for this file in the manifest section. The digests should be the same or verification fails.

    If any serious verification failures occur during the verification process, then the process is stopped and a security exception is thrown. The jarsigner command catches and displays the exception.

Note: You should read any addition warnings (or errors if you specified the -strict option), as well as the content of the certificate (by specifying the -verbose and -certs options) to determine if the signature can be trusted.

Multiple Signatures for a JAR File

A JAR file can be signed by multiple people by running the jarsigner command on the file multiple times and specifying the alias for a different person each time, as follows:

jarsigner myBundle.jar susan
jarsigner myBundle.jar kevin

When a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. In the previous example, the output JAR file includes files with the following names:

SUSAN.SF
SUSAN.DSA
KEVIN.SF
KEVIN.DSA

Options

The following sections describe the various jarsigner options. Be aware of the following standards:

  • All option names are preceded by a minus sign (-).

  • The options can be provided in any order.

  • Items that are in italics or underlined (option values) represent the actual values that must be supplied.

  • The -storepass, -keypass, -sigfile, -sigalg, -digestalg, -signedjar, and TSA-related options are only relevant when signing a JAR file; they are not relevant when verifying a signed JAR file. The -keystore option is relevant for signing and verifying a JAR file. In addition, aliases are specified when signing and verifying a JAR file.

-keystore url

Specifies the URL that tells the keystore location. This defaults to the file .keystore in the user's home directory, as determined by the user.home system property.

A keystore is required when signing. You must explicitly specify a keystore when the default keystore does not exist or if you want to use one other than the default.

A keystore is not required when verifying, but if one is specified or the default exists and the -verbose option was also specified, then additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore.

The -keystore argument can be a file name and path specification rather than a URL, in which case it is treated the same as a file: URL, for example, the following are equivalent:

-keystore filePathAndName
-keystore file:filePathAndName

If the Sun PKCS #11 provider was configured in the java.security security properties file (located in the JRE's $JAVA_HOME/lib/security directory), then the keytool and jarsigner tools can operate on the PKCS #11 token by specifying these options:

-keystore NONE
-storetype PKCS11

For example, the following command lists the contents of the configured PKCS#11 token:

keytool -keystore NONE -storetype PKCS11 -list
-storetype storetype

Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the keystore.type property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

The PIN for a PCKS #11 token can also be specified with the -storepass option. If none is specified, then the keytool and jarsigner commands prompt for the token PIN. If the token has a protected authentication path (such as a dedicated PIN-pad or a biometric reader), then the -protected option must be specified and no password options can be specified.

-storepass[:env | :file] argument

Specifies the password that is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a -storepass option is not provided at the command line, then the user is prompted for the password.

If the modifier env or file is not specified, then the password has the value argument. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.

-keypass [:env | :file] argument

Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line. The password is required when using jarsigner to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, then the user is prompted for it.

If the modifier env or file is not specified, then the password has the value argument. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: The password should not be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system.

-sigfile file

Specifies the base file name to be used for the generated .SF and .DSA files. For example, if file is DUKESIGN, then the generated .SF and .DSA files are named DUKESIGN.SF and DUKESIGN.DSA, and placed in the META-INF directory of the signed JAR file.

The characters in the file must come from the set a-zA-Z0-9_-. Only letters, numbers, underscore, and hyphen characters are allowed. All lowercase characters are converted to uppercase for the .SF and .DSA file names.

If no -sigfile option appears on the command line, then the base file name for the .SF and .DSA files is the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, then the full alias name is used. If the alias name contains any characters that are not valid in a signature file name, then each such character is converted to an underscore (_) character to form the file name.

-sigalg algorithm

Specifies the name of the signature algorithm to use to sign the JAR file.

For a list of standard signature algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, then SHA1withDSA, SHA256withRSA, or SHA256withECDSA are used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the -providerClass option; otherwise, the command will not succeed.

-digestalg algorithm

Specifies the name of the message digest algorithm to use when digesting the entries of a JAR file.

For a list of standard message digest algorithm names, see "Appendix A: Standard Names" in the Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

If this option is not specified, then SHA256 is used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the -providerClass option; otherwise, the command will not succeed.

-certs

If the -certs option appears on the command line with the -verify and -verbose options, then the output includes certificate information for each signer of the JAR file. This information includes the name of the type of certificate (stored in the .DSA file) that certifies the signer's public key, and if the certificate is an X.509 certificate (an instance of the java.security.cert.X509Certificate), then the distinguished name of the signer.

The keystore is also examined. If no keystore value is specified on the command line, then the default keystore file (if any) is checked. If the public key certificate for a signer matches an entry in the keystore, then the alias name for the keystore entry for that signer is displayed in parentheses.

-certchain file

Specifies the certificate chain to be used when the certificate chain associated with the private key of the keystore entry that is addressed by the alias specified on the command line is not complete. This can happen when the keystore is located on a hardware token where there is not enough capacity to hold a complete certificate chain. The file can be a sequence of concatenated X.509 certificates, or a single PKCS#7 formatted data block, either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. See Internet RFC 1421 Certificate Encoding Standard and http://tools.ietf.org/html/rfc1421.

-verbose

When the -verbose option appears on the command line, it indicates verbose mode, which causes jarsigner to output extra information about the progress of the JAR signing or verification.

-internalsf

In the past, the .DSA (signature block) file generated when a JAR file was signed included a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default does not contain a copy of the .SF file anymore. If -internalsf appears on the command line, then the old behavior is utilized. This option is useful for testing. In practice, do not use the -internalsf option because it incurs higher overhead.

-sectionsonly

If the -sectionsonly option appears on the command line, then the .SF file (signature file) generated when a JAR file is signed does not include a header that contains a hash of the whole manifest file. It contains only the information and hashes related to each individual source file included in the JAR file. See Signature File.

By default, this header is added, as an optimization. When the header is present, whenever the JAR file is verified, the verification can first check to see whether the hash in the header matches the hash of the whole manifest file. When there is a match, verification proceeds to the next step. When there is no match, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. See JAR File Verification.

The -sectionsonly option is primarily used for testing. It should not be used other than for testing because using it incurs higher overhead.

-protected

Values can be either true or false. Specify true when a password must be specified through a protected authentication path such as a dedicated PIN reader.

-providerClass provider-class-name

Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the java.security security properties file.

Used with the -providerArg ConfigFilePath option, the keytool and jarsigner tools install the provider dynamically and use ConfigFilePath for the path to the token configuration file. The following example shows a command to list a PKCS #11 keystore when the Oracle PKCS #11 provider was not configured in the security properties file.

jarsigner -keystore NONE -storetype PKCS11 \
          -providerClass sun.security.pkcs11.SunPKCS11 \
          -providerArg /mydir1/mydir2/token.config \
          -list
-providerName providerName

If more than one provider was configured in the java.security security properties file, then you can use the -providerName option to target a specific provider instance. The argument to this option is the name of the provider.

For the Oracle PKCS #11 provider, providerName is of the form SunPKCS11-TokenName, where TokenName is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following command lists the contents of the PKCS #11 keystore provider instance with name suffix SmartCard:

jarsigner -keystore NONE -storetype PKCS11 \
        -providerName SunPKCS11-SmartCard \
        -list
-Jjavaoption

Passes through the specified javaoption string directly to the Java interpreter. The jarsigner command is a wrapper around the interpreter. This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

-tsa url

If -tsa http://example.tsa.url appears on the command line when signing a JAR file then a time stamp is generated for the signature. The URL, http://example.tsa.url, identifies the location of the Time Stamping Authority (TSA) and overrides any URL found with the -tsacert option. The -tsa option does not require the TSA public key certificate to be present in the keystore.

To generate the time stamp, jarsigner communicates with the TSA with the Time-Stamp Protocol (TSP) defined in RFC 3161. When successful, the time stamp token returned by the TSA is stored with the signature in the signature block file.

-tsacert alias

When -tsacert alias appears on the command line when signing a JAR file, a time stamp is generated for the signature. The alias identifies the TSA public key certificate in the keystore that is in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA.

The TSA public key certificate must be present in the keystore when using the -tsacert option.

-tsapolicyid policyid

Specifies the object identifier (OID) that identifies the policy ID to be sent to the TSA server. If this option is not specified, no policy ID is sent and the TSA server will choose a default policy ID.

Object identifiers are defined by X.696, which is an ITU Telecommunication Standardization Sector (ITU-T) standard. These identifiers are typically period-separated sets of non-negative digits like 1.2.3.4, for example.

-altsigner class

This option specifies an alternative signing mechanism. The fully qualified class name identifies a class file that extends the com.sun.jarsigner.ContentSigner abstract class. The path to this class file is defined by the -altsignerpath option. If the -altsigner option is used, then the jarsigner command uses the signing mechanism provided by the specified class. Otherwise, the jarsigner command uses its default signing mechanism.

For example, to use the signing mechanism provided by a class named com.sun.sun.jarsigner.AuthSigner, use the jarsigner option -altsigner com.sun.jarsigner.AuthSigner.

-altsignerpath classpathlist

Specifies the path to the class file and any JAR file it depends on. The class file name is specified with the -altsigner option. If the class file is in a JAR file, then this option specifies the path to that JAR file.

An absolute path or a path relative to the current directory can be specified. If classpathlist contains multiple paths or JAR files, then they should be separated with a colon (:) on Oracle Solaris and a semicolon (;) on Windows. This option is not necessary when the class is already in the search path.

The following example shows how to specify the path to a JAR file that contains the class file. The JAR file name is included.

-altsignerpath /home/user/lib/authsigner.jar

The following example shows how to specify the path to the JAR file that contains the class file. The JAR file name is omitted.

-altsignerpath /home/user/classes/com/sun/tools/jarsigner/
-strict

During the signing or verifying process, the command may issue warning messages. If you specify this option, the exit code of the tool reflects the severe warning messages that this command found. See Errors and Warnings.

-verbose suboptions

For the verifying process, the -verbose option takes suboptions to determine how much information is shown. If the -certs option is also specified, then the default mode (or suboption all) displays each entry as it is being processed, and after that, the certificate information for each signer of the JAR file. If the -certs and the -verbose:grouped suboptions are specified, then entries with the same signer info are grouped and displayed together with their certificate information. If -certs and the -verbose:summary suboptions are specified, then entries with the same signer information are grouped and displayed together with their certificate information. Details about each entry are summarized and displayed as one entry (and more). See Examples.

Errors and Warnings

During the signing or verifying process, the jarsigner command may issue various errors or warnings.

If there is a failure, the jarsigner command exits with code 1. If there is no failure, but there are one or more severe warnings, the jarsigner command exits with code 0 when the -strict option is not specified, or exits with the OR-value of the warning codes when the -strict is specified. If there is only informational warnings or no warning at all, the command always exits with code 0.

For example, if a certificate used to sign an entry is expired and has a KeyUsage extension that does not allow it to sign a file, the jarsigner command exits with code 12 (=4+8) when the -strict option is specified.

Note: Exit codes are reused because only the values from 0 to 255 are legal on Unix-based operating systems.

The following sections describes the names, codes, and descriptions of the errors and warnings that the jarsigner command can issue.

Failure

Reasons why the jarsigner command fails include (but are not limited to) a command line parsing error, the inability to find a keypair to sign the JAR file, or the verification of a signed JAR fails.

failure

Code 1. The signing or verifying fails.

Severe Warnings

Note: Severe warnings are reported as errors if you specify the -strict option.

Reasons why the jarsigner command issues a severe warning include the certificate used to sign the JAR file has an error or the signed JAR file has other problems.

hasExpiredCert

Code 4. This jar contains entries whose signer certificate has expired.

notYetValidCert

Code 4. This jar contains entries whose signer certificate is not yet valid.

chainNotValidated

Code 4. This jar contains entries whose certificate chain is not validated.

badKeyUsage

Code 8. This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing.

badExtendedKeyUsage

Code 8. This jar contains entries whose signer certificate's ExtendedKeyUsage extension doesn't allow code signing.

badNetscapeCertType

Code 8. This jar contains entries whose signer certificate's NetscapeCertType extension doesn't allow code signing.

hasUnsignedEntry

Code 16. This jar contains unsigned entries which have not been integrity-checked.

notSignedByAlias

Code 32. This jar contains signed entries which are not signed by the specified alias(es).

aliasNotInStore

Code 32. This jar contains signed entries that are not signed by alias in this keystore.

Informational Warnings

Informational warnings include those that are not errors but regarded as bad practice. They do not have a code.

hasExpiringCert

This jar contains entries whose signer certificate will expire within six months.

noTimestamp

This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this JAR file after the signer certificate's expiration date (YYYY-MM-DD) or after any future revocation date.

Examples

Sign a JAR File

Use the following command to sign bundle.jar with the private key of a user whose keystore alias is jane in a keystore named mystore in the working directory and name the signed JAR file sbundle.jar:

jarsigner -keystore /working/mystore
    -storepass <keystore password>
    -keypass <private key password>
    -signedjar sbundle.jar bundle.jar jane

There is no -sigfile specified in the previous command so the generated .SF and .DSA files to be placed in the signed JAR file have default names based on the alias name. They are named JANE.SF and JANE.DSA.

If you want to be prompted for the store password and the private key password, then you could shorten the previous command to the following:

jarsigner -keystore /working/mystore
    -signedjar sbundle.jar bundle.jar jane

If the keystore is the default keystore (.keystore in your home directory), then you do not need to specify a keystore, as follows:

jarsigner -signedjar sbundle.jar bundle.jar jane

If you want the signed JAR file to overwrite the input JAR file (bundle.jar), then you do not need to specify a -signedjar option, as follows:

jarsigner bundle.jar jane

Verify a Signed JAR File

To verify a signed JAR file to ensure that the signature is valid and the JAR file was not been tampered with, use a command such as the following:

jarsigner -verify sbundle.jar

When the verification is successful, jar verified is displayed. Otherwise, an error message is displayed. You can get more information when you use the -verbose option. A sample use of jarsigner with the -verbose option follows:

jarsigner -verify -verbose sbundle.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
    smk    849 Fri Sep 26 16:12:46 PDT 1997 test.class

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

Verification with Certificate Information

If you specify the -certs option with the -verify and -verbose options, then the output includes certificate information for each signer of the JAR file. The information includes the certificate type, the signer distinguished name information (when it is an X.509 certificate), and in parentheses, the keystore alias for the signer when the public key certificate in the JAR file matches the one in a keystore entry, for example:

jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF
          1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class

      X.509, CN=Test Group, OU=Java Software, O=Oracle, L=CUP, S=CA, C=US (javatest)
      X.509, CN=Jane Smith, OU=Java Software, O=Oracle, L=cup, S=ca, C=us (jane)

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

If the certificate for a signer is not an X.509 certificate, then there is no distinguished name information. In that case, just the certificate type and the alias are shown. For example, if the certificate is a PGP certificate, and the alias is bob, then you would get: PGP, (bob).

See Also

  • jar(1)

  • keytool(1)

  • Trail: Security Features in Java SE at
    http://docs.oracle.com/javase/tutorial/security/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


java

Launches a Java application.

Synopsis

java [options] classname [args]

java [options] -jar filename [args]

javaw [options] classname [args]

javaw [options] -jar filename [args]

options

Command-line options separated by spaces. See Options.

classname

The name of the class to be launched.

filename

The name of the Java Archive (JAR) file to be called. Used only with the -jar option.

args

The arguments passed to the main() method separated by spaces.

Description

The java command starts a Java application. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class's main() method. The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. The method declaration has the following form:

public static void main(String[] args)

The java command can be used to launch a JavaFX application by loading a class that either has a main() method or that extends javafx.application.Application. In the latter case, the launcher constructs an instance of the Application class, calls its init() method, and then calls the start(javafx.stage.Stage) method.

By default, the first argument that is not an option of the java command is the fully qualified name of the class to be called. If the -jar option is specified, its argument is the name of the JAR file containing class and resource files for the application. The startup class must be indicated by the Main-Class manifest header in its source code.

The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user's class path.

Arguments after the class file name or the JAR file name are passed to the main() method.

The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you do not want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails.

Options

The java command supports a wide range of options that can be divided into the following categories:

  • Standard Options

  • Non-Standard Options

  • Advanced Runtime Options

  • Advanced JIT Compiler Options

  • Advanced Serviceability Options

  • Advanced Garbage Collection Options

Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM). They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on.

Non-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change. These options start with -X.

Advanced options are not recommended for casual use. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters. They are also not guaranteed to be supported by all JVM implementations, and are subject to change. Advanced options start with -XX.

To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document.

Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default. Such options do not require a parameter. Boolean -XX options are enabled using the plus sign (-XX:+OptionName) and disabled using the minus sign (-XX:-OptionName).

For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option). If you are expected to specify the size in bytes, you can use no suffix, or use the suffix k or K for kilobytes (KB), m or M for megabytes (MB), g or G for gigabytes (GB). For example, to set the size to 8 GB, you can specify either 8g, 8192m, 8388608k, or 8589934592 as the argument. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify 0.25 for 25%).

Standard Options

These are the most commonly used options that are supported by all implementations of the JVM.

-agentlib:libname[=options]

Loads the specified native agent library. After the library name, a comma-separated list of options specific to the library can be used.

If the option -agentlib:foo is specified, then the JVM attempts to load the library named foo.dll in the location specified by the PATH system variable.

The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:

-agentlib:hprof=cpu=samples,interval=20,depth=3

The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:

-agentlib:jdwp=transport=dt_socket,server=y,address=8000

For more information about the native agent libraries, refer to the following:

  • The java.lang.instrument package description at http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

  • Agent Command Line Options in the JVM Tools Interface guide at http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#starting

-agentpath:pathname[=options]

Loads the native agent library specified by the absolute path name. This option is equivalent to -agentlib but uses the full path and file name of the library.

-client

Selects the Java HotSpot Client VM. The 64-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM.

For default JVM selection, see Server-Class Machine Detection at
http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

-Dproperty=value

Sets a system property value. The property variable is a string with no spaces that represents the name of the property. The value variable is a string that represents the value of the property. If value is a string with spaces, then enclose it in quotation marks (for example -Dfoo="foo bar").

-disableassertions[:[packagename]...|:classname]
-da[:[packagename]...|:classname]

Disables assertions. By default, assertions are disabled in all packages and classes.

With no arguments, -disableassertions (-da) disables assertions in all packages and classes. With the packagename argument ending in ..., the switch disables assertions in the specified package and any subpackages. If the argument is simply ..., then the switch disables assertions in the unnamed package in the current working directory. With the classname argument, the switch disables assertions in the specified class.

The -disableassertions (-da) option applies to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes. This makes it easy to disable assertions in all classes except for system classes. The -disablesystemassertions option enables you to disable assertions in all system classes.

To explicitly enable assertions in specific packages or classes, use the -enableassertions (-ea) option. Both options can be used at the same time. For example, to run the MyClass application with assertions enabled in package com.wombat.fruitbat (and any subpackages) but disabled in class com.wombat.fruitbat.Brickbat, use the following command:

java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass
-disablesystemassertions
-dsa

Disables assertions in all system classes.

-enableassertions[:[packagename]...|:classname]
-ea[:[packagename]...|:classname]

Enables assertions. By default, assertions are disabled in all packages and classes.

With no arguments, -enableassertions (-ea) enables assertions in all packages and classes. With the packagename argument ending in ..., the switch enables assertions in the specified package and any subpackages. If the argument is simply ..., then the switch enables assertions in the unnamed package in the current working directory. With the classname argument, the switch enables assertions in the specified class.

The -enableassertions (-ea) option applies to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes. This makes it easy to enable assertions in all classes except for system classes. The -enablesystemassertions option provides a separate switch to enable assertions in all system classes.

To explicitly disable assertions in specific packages or classes, use the -disableassertions (-da) option. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes. For example, to run the MyClass application with assertions enabled only in package com.wombat.fruitbat (and any subpackages) but disabled in class com.wombat.fruitbat.Brickbat, use the following command:

java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass
-enablesystemassertions
-esa

Enables assertions in all system classes.

-help
-?

Displays usage information for the java command without actually running the JVM.

-jar filename

Executes a program encapsulated in a JAR file. The filename argument is the name of a JAR file with a manifest that contains a line in the form Main-Class:classname that defines the class with the public static void main(String[] args) method that serves as your application's starting point.

When you use the -jar option, the specified JAR file is the source of all user classes, and other class path settings are ignored.

For more information about JAR files, see the following resources:

  • jar(1)

  • The Java Archive (JAR) Files guide at http://docs.oracle.com/javase/8/docs/technotes/guides/jar/index.html

  • Lesson: Packaging Programs in JAR Files at
    http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

-javaagent:jarpath[=options]

Loads the specified Java programming language agent. For more information about instrumenting Java applications, see the java.lang.instrument package description in the Java API documentation at http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

-jre-restrict-search

Includes user-private JREs in the version search.

-no-jre-restrict-search

Excludes user-private JREs from the version search.

-server

Selects the Java HotSpot Server VM. The 64-bit version of the JDK supports only the Server VM, so in that case the option is implicit.

For default JVM selection, see Server-Class Machine Detection at
http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

-showversion

Displays version information and continues execution of the application. This option is equivalent to the -version option except that the latter instructs the JVM to exit after displaying version information.

-splash:imgname

Shows the splash screen with the image specified by imgname. For example, to show the splash.gif file from the images directory when starting your application, use the following option:

-splash:images/splash.gif
-verbose:class

Displays information about each loaded class.

-verbose:gc

Displays information about each garbage collection (GC) event.

-verbose:jni

Displays information about the use of native methods and other Java Native Interface (JNI) activity.

-version

Displays version information and then exits. This option is equivalent to the -showversion option except that the latter does not instruct the JVM to exit after displaying version information.

-version:release

Specifies the release version to be used for running the application. If the version of the java command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used.

The release argument specifies either the exact version string, or a list of version strings and ranges separated by spaces. A version string is the developer designation of the version number in the following form: 1.x.0_u (where x is the major version number, and u is the update version number). A version range is made up of a version string followed by a plus sign (+) to designate this version or later, or a part of a version string followed by an asterisk (*) to designate any version string with a matching prefix. Version strings and ranges can be combined using a space for a logical OR combination, or an ampersand (&) for a logical AND combination of two version strings/ranges. For example, if running the class or JAR file requires either JRE 6u13 (1.6.0_13), or any JRE 6 starting from 6u10 (1.6.0_10), specify the following:

-version:"1.6.0_13 1.6* & 1.6.0_10+"

Quotation marks are necessary only if there are spaces in the release parameter.

For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line.

Non-Standard Options

These options are general purpose options that are specific to the Java HotSpot Virtual Machine.

-X

Displays help for all available -X options.

-Xbatch

Disables background compilation. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished. The -Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.

This option is equivalent to -XX:-BackgroundCompilation.

-Xbootclasspath:path

Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (;) to search for boot class files. These are used in place of the boot class files included in the JDK.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xbootclasspath/a:path

Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (;) to append to the end of the default bootstrap class path.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xbootclasspath/p:path

Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (;) to prepend to the front of the default bootstrap class path.

Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.

-Xcheck:jni

Performs additional checks for Java Native Interface (JNI) functions. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases. Expect a performance degradation when this option is used.

-Xcomp

Forces compilation of methods on first invocation. By default, the Client VM (-client) performs 1,000 interpreted method invocations and the Server VM (-server) performs 10,000 interpreted method invocations to gather information for efficient compilation. Specifying the -Xcomp option disables interpreted method invocations to increase compilation performance at the expense of efficiency.

You can also change the number of interpreted method invocations before compilation using the -XX:CompileThreshold option.

-Xdebug

Does nothing. Provided for backward compatibility.

-Xdiag

Shows additional diagnostic messages.

-Xfuture

Enables strict class-file format checks that enforce close conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases.

-Xint

Runs the application in interpreted-only mode. Compilation to native code is disabled, and all bytecode is executed by the interpreter. The performance benefits offered by the just in time (JIT) compiler are not present in this mode.

-Xinternalversion

Displays more detailed JVM version information than the -version option, and then exits.

-Xloggc:filename

Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command.

Example:

-Xloggc:garbage-collection.log
-Xmaxjitcodesize=size

Specifies the maximum code cache size (in bytes) for JIT-compiled code. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the value is set to 48 MB:

-Xmaxjitcodesize=48m

This option is equivalent to -XX:ReservedCodeCacheSize.

-Xmixed

Executes all bytecode by the interpreter except for hot methods, which are compiled to native code.

-Xmnsize

Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The young generation region of the heap is used for new objects. GC is performed in this region more often than in other regions. If the size for the young generation is too small, then a lot of minor garbage collections will be performed. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size.

The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:

-Xmn256m
-Xmn262144k
-Xmn268435456

Instead of the -Xmn option to set both the initial and maximum size of the heap for the young generation, you can use -XX:NewSize to set the initial size and -XX:MaxNewSize to set the maximum size.

-Xmssize

Sets the initial size (in bytes) of the heap. This value must be a multiple of 1024 and greater than 1 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The following examples show how to set the size of allocated memory to 6 MB using various units:

-Xms6291456
-Xms6144k
-Xms6m

If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation. The initial size of the heap for the young generation can be set using the -Xmn option or the -XX:NewSize option.

-Xmxsize

Specifies the maximum size (in bytes) of the memory allocation pool in bytes. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For server deployments, -Xms and -Xmx are often set to the same value. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:

-Xmx83886080
-Xmx81920k
-Xmx80m

The -Xmx option is equivalent to -XX:MaxHeapSize.

-Xnoclassgc

Disables garbage collection (GC) of classes. This can save some GC time, which shortens interruptions during the application run.

When you specify -Xnoclassgc at startup, the class objects in the application will be left untouched during GC and will always be considered live. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception.

-Xprof

Profiles the running program and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be used in production systems.

-Xrs

Reduces the use of operating system signals by the JVM.

Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly.

The JVM watches for console control events to implement shutdown hooks for unexpected termination. Specifically, the JVM registers a console control handler that begins shutdown-hook processing and returns TRUE for CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.

The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes. The JVM uses CTRL_BREAK_EVENT to perform thread dumps.

If the JVM is run as a service (for example, as a servlet engine for a web server), then it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown because the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs option can be used. When the -Xrs option is used, the JVM does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT.

There are two consequences of specifying -Xrs:

  • Ctrl + Break thread dumps are not available.

  • User code is responsible for causing shutdown hooks to run, for example, by calling System.exit() when the JVM is to be terminated.

-Xshare:mode

Sets the class data sharing mode. Possible mode arguments for this option include the following:

auto

Use shared class data if possible. This is the default value for Java HotSpot 32-Bit Client VM.

on

Require the use of class data sharing. Print an error message and exit if class data sharing cannot be used.

off

Do not use shared class data. This is the default value for Java HotSpot 32-Bit Server VM, Java HotSpot 64-Bit Client VM, and Java HotSpot 64-Bit Server VM.

dump

Manually generate the class data sharing archive.

-XshowSettings:category

Shows settings and continues. Possible category arguments for this option include the following:

all

Shows all categories of settings. This is the default value.

locale

Shows settings related to locale.

properties

Shows settings related to system properties.

vm

Shows the settings of the JVM.

-Xsssize

Sets the thread stack size (in bytes). Append the letter k or K to indicate KB, m or M to indicate MB, g or G to indicate GB. The default value depends on the platform:

  • Linux/ARM (32-bit): 320 KB

  • Linux/i386 (32-bit): 320 KB

  • Linux/x64 (64-bit): 1024 KB

  • OS X (64-bit): 1024 KB

  • Oracle Solaris/i386 (32-bit): 320 KB

  • Oracle Solaris/x64 (64-bit): 1024 KB

  • Windows: depends on virtual memory

The following examples set the thread stack size to 1024 KB in different units:

-Xss1m
-Xss1024k
-Xss1048576

This option is equivalent to -XX:ThreadStackSize.

-Xverify:mode

Sets the mode of the bytecode verifier. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application. Possible mode arguments for this option include the following:

none

Do not verify the bytecode. This reduces startup time and also reduces the protection provided by Java.

remote

Verify only those classes that are loaded remotely over the network. This is the default behavior if you do not specify the -Xverify option.

all

Verify all classes.

Advanced Runtime Options

These options control the runtime behavior of the Java HotSpot VM.

-XX:+DisableAttachMechanism

Enables the option that disables the mechanism that lets tools attach to the JVM. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as jcmd, jstack, jmap, and jinfo.

-XX:ErrorFile=filename

Specifies the path and file name to which error data is written when an irrecoverable error occurs. By default, this file is created in the current working directory and named hs_err_pid pid.log where pid is the identifier of the process that caused the error. The following example shows how to set the default log file (note that the identifier of the process is specified as %p):

-XX:ErrorFile=./hs_err_pid%p.log

The following example shows how to set the error log file to C:/log/java/java_error.log:

-XX:ErrorFile=C:/log/java/java_error.log

If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system. The temporary directory is specified by the value of the TMP environment variable; if that environment variable is not defined, then the value of the TEMP environment variable is used.

-XX:+FlightRecorder

Enables the use of the Java Flight Recorder (JFR) during the runtime of the application. This is a commercial feature that requires you to also specify the -XX:+UnlockCommercialFeatures option as follows:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
-XX:FlightRecorderOptions=parameter=value

Sets the parameters that control the behavior of JFR. This option can be used only when JFR is enabled (that is, the -XX:+FlightRecorder option is specified).

The following list contains all available JFR parameters:

defaultrecording={true|false}

Specifies whether the recording is a continuous background recording or if it runs for a limited time. By default, this parameter is set to false (recording runs for a limited time). To make the recording run continuously, set the parameter to true.

disk={true|false}

Specifies whether JFR should write a continuous recording to disk. By default, this parameter is set to false (continuous recording to disk is disabled). To enable it, set the parameter to true, and also set defaultrecording=true.

dumponexit={true|false}

Specifies whether a dump file of JFR data should be generated when the JVM terminates in a controlled manner. By default, this parameter is set to false (dump file on exit is not generated). To enable it, set the parameter to true, and also set defaultrecording=true.

The dump file is written to the location defined by the dumponexitpath parameter.

dumponexitpath=path

Specifies the path and name of the dump file with JFR data that is created when the JVM exits in a controlled manner if you set the dumponexit=true parameter. Setting the path makes sense only if you also set defaultrecording=true.

If the specified path is a directory, the JVM assigns a file name that shows the creation date and time. If the specified path includes a file name and if that file already exists, the JVM creates a new file by appending the date and time stamp to the specified file name.

globalbuffersize=size

Specifies the total amount of primary memory (in bytes) used for data retention. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the size is set to 462848 bytes.

loglevel={quiet|error|warning|info|debug|trace}

Specify the amount of data written to the log file by JFR. By default, it is set to info.

maxage=time

Specifies the maximum age of disk data to keep for the default recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 30s means 30 seconds). By default, the maximum age is set to 15 minutes (15m).

This parameter is valid only if you set the disk=true parameter.

maxchunksize=size

Specifies the maximum size (in bytes) of the data chunks in a recording. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size of data chunks is set to 12 MB.

maxsize=size

Specifies the maximum size (in bytes) of disk data to keep for the default recording. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size of disk data is not limited, and this parameter is set to 0.

This parameter is valid only if you set the disk=true parameter.

repository=path

Specifies the repository (a directory) for temporary disk storage. By default, the system's temporary directory is used.

samplethreads={true|false}

Specifies whether thread sampling is enabled. Thread sampling occurs only if the sampling event is enabled along with this parameter. By default, this parameter is enabled.

settings=path

Specifies the path and name of the event settings file (of type JFC). By default, the default.jfc file is used, which is located in JAVA_HOME/jre/lib/jfr.

stackdepth=depth

Stack depth for stack traces by JFR. By default, the depth is set to 64 method calls. The maximum is 2048, minimum is 1.

threadbuffersize=size

Specifies the per-thread local buffer size (in bytes). Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. Higher values for this parameter allow more data gathering without contention to flush it to the global storage. It can increase application footprint in a thread-rich environment. By default, the local buffer size is set to 5 KB.

You can specify values for multiple parameters by separating them with a comma. For example, to instruct JFR to write a continuous recording to disk, and set the maximum size of data chunks to 10 MB, specify the following:

-XX:FlightRecorderOptions=defaultrecording=true,disk=true,maxchunksize=10M
-XX:LargePageSizeInBytes=size

Sets the maximum size (in bytes) for large pages used for Java heap. The size argument must be a power of 2 (2, 4, 8, 16, ...). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically.

The following example illustrates how to set the large page size to 4 megabytes (MB):

-XX:LargePageSizeInBytes=4m
-XX:MaxDirectMemorySize=size

Sets the maximum total size (in bytes) of the New I/O (the java.nio package) direct-buffer allocations. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically.

The following examples illustrate how to set the NIO size to 1024 KB in different units:

-XX:MaxDirectMemorySize=1m
-XX:MaxDirectMemorySize=1024k
-XX:MaxDirectMemorySize=1048576
-XX:NativeMemoryTracking=mode

Specifies the mode for tracking JVM native memory usage. Possible mode arguments for this option include the following:

off

Do not track JVM native memory usage. This is the default behavior if you do not specify the -XX:NativeMemoryTracking option.

summary

Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread.

detail

In addition to tracking memory usage by JVM subsystems, track memory usage by individual CallSite, individual virtual memory region and its committed regions.

-XX:OnError=string

Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs. If the string contains spaces, then it must be enclosed in quotation marks.

The following example shows how the -XX:OnError option can be used to run the userdump.exe utility to obtain a crash dump in case of an irrecoverable error (the %p designates the current process):

-XX:OnError="userdump.exe %p"

The preceding example assumes that the path to the userdump.exe utility is specified in the PATH environment variable.

-XX:OnOutOfMemoryError=string

Sets a custom command or a series of semicolon-separated commands to run when an OutOfMemoryError exception is first thrown. If the string contains spaces, then it must be enclosed in quotation marks. For an example of a command string, see the description of the -XX:OnError option.

-XX:+PrintCommandLineFlags

Enables printing of ergonomically selected JVM flags that appeared on the command line. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector. By default, this option is disabled and flags are not printed.

-XX:+PrintNMTStatistics

Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see -XX:NativeMemoryTracking). By default, this option is disabled and native memory tracking data is not printed.

-XX:+ShowMessageBoxOnError

Enables displaying of a dialog box when the JVM experiences an irrecoverable error. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error. By default, this option is disabled.

-XX:StartFlightRecording=parameter=value

Starts a JFR recording for the Java application. This option is equivalent to the JFR.start diagnostic command that starts a recording during runtime. You can set the following parameters when starting a JFR recording:

compress={true|false}

Specifies whether to compress the JFR recording log file (of type JFR) on the disk using the gzip file compression utility. This parameter is valid only if the filename parameter is specified. By default it is set to false (recording is not compressed). To enable compression, set the parameter to true.

defaultrecording={true|false}

Specifies whether the recording is a continuous background recording or if it runs for a limited time. By default, this parameter is set to false (recording runs for a limited time). To make the recording run continuously, set the parameter to true.

delay=time

Specifies the delay between the Java application launch time and the start of the recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 10m means 10 minutes). By default, there is no delay, and this parameter is set to 0.

duration=time

Specifies the duration of the recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 5h means 5 hours). By default, the duration is not limited, and this parameter is set to 0.

filename=path

Specifies the path and name of the JFR recording log file.

name=identifier

Specifies the identifier for the JFR recording. By default, it is set to Recording x.

maxage=time

Specifies the maximum age of disk data to keep for the default recording. Append s to specify the time in seconds, m for minutes, h for hours, or d for days (for example, specifying 30s means 30 seconds). By default, the maximum age is set to 15 minutes (15m).

maxsize=size

Specifies the maximum size (in bytes) of disk data to keep before it is flushed from the thread buffer to the global buffer. Append k or K, to specify the size in KB, m or M to specify the size in MB, g or G to specify the size in GB. By default, the maximum size is not limited, and this parameter is set to 0.

This parameter is valid only for size-bound recordings.

settings=path

Specifies the path and name of the event settings file (of type JFC). By default, the default.jfc file is used, which is located in JAVA_HOME/jre/lib/jfr.

You can specify values for multiple parameters by separating them with a comma. For example, to save the recording to test.jfr in the current working directory, and instruct JFR to compress the log file, specify the following:

-XX:StartFlightRecording=filename=test.jfr,compress=true
-XX:ThreadStackSize=size

Sets the thread stack size (in bytes). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value depends on the platform:

  • Linux/ARM (32-bit): 320 KB

  • Linux/i386 (32-bit): 320 KB

  • Linux/x64 (64-bit): 1024 KB

  • OS X (64-bit): 1024 KB

  • Oracle Solaris/i386 (32-bit): 320 KB

  • Oracle Solaris/x64 (64-bit): 1024 KB

  • Windows: depends on virtual memory

The following examples show how to set the thread stack size to 1024 KB in different units:

-XX:ThreadStackSize=1m
-XX:ThreadStackSize=1024k
-XX:ThreadStackSize=1048576

This option is equivalent to -Xss.

-XX:+TraceClassLoading

Enables tracing of classes as they are loaded. By default, this option is disabled and classes are not traced.

-XX:+TraceClassLoadingPreorder

Enables tracing of all loaded classes in the order in which they are referenced. By default, this option is disabled and classes are not traced.

-XX:+TraceClassResolution

Enables tracing of constant pool resolutions. By default, this option is disabled and constant pool resolutions are not traced.

-XX:+TraceClassUnloading

Enables tracing of classes as they are unloaded. By default, this option is disabled and classes are not traced.

-XX:+TraceLoaderConstraints

Enables tracing of the loader constraints recording. By default, this option is disabled and loader constraints recoding is not traced.

-XX:+UnlockCommercialFeatures

Enables the use of commercial features. Commercial features are included with Oracle Java SE Advanced or Oracle Java SE Suite packages, as defined on the Java SE Products page at http://www.oracle.com/technetwork/java/javase/terms/products/index.html

By default, this option is disabled and the JVM runs without the commercial features. Once they were enabled for a JVM process, it is not possible to disable their use for that process.

-XX:+UseBiasedLocking

Enables the use of biased locking. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www.oracle.com/technetwork/java/tuning-139912.html#section4.2.5

By default, this option is disabled and biased locking is not used.

-XX:+UseCompressedOops

Enables the use of compressed pointers. When this option is enabled, object references are represented as 32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB. This option works only for 64-bit JVMs.

By default, this option is disabled and compressed pointers are not used.

-XX:+UseLargePages

Enables the use of large page memory. By default, this option is disabled and large page memory is not used.

For more information, see Java Support for Large Memory Pages at http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html

-XX:+UseMembar

Enables issuing of membars on thread state transitions. This option is disabled by default on all platforms except Power PC and ARM servers, where it is enabled. To disable issuing of membars on thread state transitions for Power PC and ARM, specify -XX:-UseMembar.

-XX:+UsePerfData

Enables the perfdata feature. This option is enabled by default to allow JVM monitoring and performance testing. Disabling it suppresses the creation of the hsperfdata_userid directories. To disable the perfdata feature, specify -XX:-UsePerfData.

Advanced JIT Compiler Options

These options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM.

-XX:+AggressiveOpts

Enables the use of aggressive performance optimization features, which are expected to become default in upcoming releases. By default, this option is disabled and experimental performance features are not used.

-XX:AllocateInstancePrefetchLines=lines

Sets the number of lines to prefetch ahead of the instance allocation pointer. By default, the number of lines to prefetch is set to 1:

-XX:AllocateInstancePrefetchLines=1
-XX:AllocatePrefetchInstr=instruction

Sets the prefetch instruction to prefetch ahead of the allocation pointer. Possible values are from 0 to 3. The actual instructions behind the values depend on the platform. By default, the prefetch instruction is set to 0:

-XX:AllocatePrefetchInstr=0
-XX:AllocatePrefetchStepSize=size

Sets the step size (in bytes) for sequential prefetch instructions. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the step size is set to 16 bytes:

-XX:AllocatePrefetchStepSize=16
-XX:+BackgroundCompilation

Enables background compilation. This option is enabled by default. To disable background compilation, specify -XX:-BackgroundCompilation (this is equivalent to specifying -Xbatch).

-XX:CICompilerCount=threads

Sets the number of compiler threads to use for compilation. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used. The following example shows how to set the number of threads to 2:

-XX:CICompilerCount=2
-XX:CodeCacheMinimumFreeSpace=size

Sets the minimum free space (in bytes) required for compilation. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. When less than the minimum free space remains, compiling stops. By default, this option is set to 500 KB. The following example shows how to set the minimum free space to 1024 MB:

-XX:CodeCacheMinimumFreeSpace=1024m
-XX:CompileCommand=command,method[,option]

Specifies a command to perform on a method. For example, to exclude the indexOf() method of the String class from being compiled, use the following:

-XX:CompileCommand=exclude,java/lang/String.indexOf

Note that the full class name is specified, including all packages and subpackages separated by a slash (/). For easier cut and paste operations, it is also possible to use the method name format produced by the -XX:+PrintCompilation and -XX:+LogCompilation options:

-XX:CompileCommand=exclude,java.lang.String::indexOf

If the method is specified without the signature, the command will be applied to all methods with the specified name. However, you can also specify the signature of the method in the class file format. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end. For example, if you want to exclude only the indexOf(String) method of the String class from being compiled, use the following:

-XX:CompileCommand="exclude,java/lang/String.indexOf,(Ljava/lang/String;)I"

You can also use the asterisk (*) as a wildcard for class and method names. For example, to exclude all indexOf() methods in all classes from being compiled, use the following:

-XX:CompileCommand=exclude,*.indexOf

The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell. You can pass arguments to -XX:CompileCommand using spaces as separators by enclosing the argument in quotation marks:

-XX:CompileCommand="exclude java/lang/String indexOf"

Note that after parsing the commands passed on the command line using the -XX:CompileCommand options, the JIT compiler then reads commands from the .hotspot_compiler file. You can add commands to this file or specify a different file using the -XX:CompileCommandFile option.

To add several commands, either specify the -XX:CompileCommand option multiple times, or separate each argument with the newline separator (\n). The following commands are available:

break

Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method.

compileonly

Exclude all methods from compilation except for the specified method. As an alternative, you can use the -XX:CompileOnly option, which allows to specify several methods.

dontinline

Prevent inlining of the specified method.

exclude

Exclude the specified method from compilation.

help

Print a help message for the -XX:CompileCommand option.

inline

Attempt to inline the specified method.

log

Exclude compilation logging (with the -XX:+LogCompilation option) for all methods except for the specified method. By default, logging is performed for all compiled methods.

option

This command can be used to pass a JIT compilation option to the specified method in place of the last argument (option). The compilation option is set at the end, after the method name. For example, to enable the BlockLayoutByFrequency option for the append() method of the StringBuffer class, use the following:

-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency

You can specify multiple compilation options, separated by commas or spaces.

print

Print generated assembler code after compilation of the specified method.

quiet

Do not print the compile commands. By default, the commands that you specify with the -XX:CompileCommand option are printed; for example, if you exclude from compilation the indexOf() method of the String class, then the following will be printed to standard output:

CompilerOracle: exclude java/lang/String.indexOf

You can suppress this by specifying the -XX:CompileCommand=quiet option before other -XX:CompileCommand options.

-XX:CompileCommandFile=filename

Sets the file from which JIT compiler commands are read. By default, the .hotspot_compiler file is used to store commands performed by the JIT compiler.

Each line in the command file represents a command, a class name, and a method name for which the command is used. For example, this line prints assembly code for the toString() method of the String class:

print java/lang/String toString

For more information about specifying the commands for the JIT compiler to perform on methods, see the -XX:CompileCommand option.

-XX:CompileOnly=methods

Sets the list of methods (separated by commas) to which compilation should be restricted. Only the specified methods will be compiled. Specify each method with the full class name (including the packages and subpackages). For example, to compile only the length() method of the String class and the size() method of the List class, use the following:

-XX:CompileOnly=java/lang/String.length,java/util/List.size

Note that the full class name is specified, including all packages and subpackages separated by a slash (/). For easier cut and paste operations, it is also possible to use the method name format produced by the -XX:+PrintCompilation and -XX:+LogCompilation options:

-XX:CompileOnly=java.lang.String::length,java.util.List::size

Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:

-XX:CompileOnly=java/lang/String
-XX:CompileOnly=java/lang
-XX:CompileOnly=.length
-XX:CompileThreshold=invocations

Sets the number of interpreted method invocations before compilation. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation. For the client JVM, the default setting is 1,500 invocations. The following example shows how to set the number of interpreted method invocations to 5,000:

-XX:CompileThreshold=5000

You can completely disable interpretation of Java methods before compilation by specifying the -Xcomp option.

-XX:+DoEscapeAnalysis

Enables the use of escape analysis. This option is enabled by default. To disable the use of escape analysis, specify -XX:-DoEscapeAnalysis.

-XX:+FailOverToOldVerifier

Enables automatic failover to the old verifier when the new type checker fails. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version. You can enable it for classes with older versions of the bytecode.

-XX:InitialCodeCacheSize=size

Sets the initial code cache size (in bytes). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is set to 500 KB. The following example shows how to set the initial code cache size to 32 KB:

-XX:InitialCodeCacheSize=32k
-XX:+Inline

Enables method inlining. This option is enabled by default to increase performance. To disable method inlining, specify -XX:-Inline.

-XX:InlineSmallCode=size

Sets the maximum code size (in bytes) for compiled methods that should be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. Only compiled methods with the size smaller than the specified size will be inlined. By default, the maximum code size is set to 1000 bytes:

-XX:InlineSmallCode=1000
-XX:+LogCompilation

Enables logging of compilation activity to a file named hotspot.log in the current working directory. You can specify a different log file path and name using the -XX:LogFile option.

By default, this option is disabled and compilation activity is not logged. The -XX:+LogCompilation option has to be used together with the -XX:UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the -XX:+PrintCompilation option.

-XX:MaxInlineSize=size

Sets the maximum bytecode size (in bytes) of a method to be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the maximum bytecode size is set to 35 bytes:

-XX:MaxInlineSize=35
-XX:MaxNodeLimit=nodes

Sets the maximum number of nodes to be used during single method compilation. By default, the maximum number of nodes is set to 65,000:

-XX:MaxNodeLimit=65000
-XX:MaxTrivialSize=size

Sets the maximum bytecode size (in bytes) of a trivial method to be inlined. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the maximum bytecode size of a trivial method is set to 6 bytes:

-XX:MaxTrivialSize=6
-XX:+OptimizeStringConcat

Enables the optimization of String concatenation operations. This option is enabled by default. To disable the optimization of String concatenation operations, specify -XX:-OptimizeStringConcat.

-XX:+PrintAssembly

Enables printing of assembly code for bytecoded and native methods by using the external disassembler.so library. This enables you to see the generated code, which may help you to diagnose performance issues.

By default, this option is disabled and assembly code is not printed. The -XX:+PrintAssembly option has to be used together with the -XX:UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

-XX:+PrintCompilation

Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled. This enables you to see which methods actually get compiled. By default, this option is disabled and diagnostic output is not printed.

You can also log compilation activity to a file by using the -XX:+LogCompilation option.

-XX:+PrintInlining

Enables printing of inlining decisions. This enables you to see which methods are getting inlined.

By default, this option is disabled and inlining information is not printed. The -XX:+PrintInlining option has to be used together with the -XX:+UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.

-XX:+RelaxAccessControlCheck

Decreases the amount of access control checks in the verifier. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version. You can enable it for classes with older versions of the bytecode.

-XX:ReservedCodeCacheSize=size

Sets the maximum code cache size (in bytes) for JIT-compiled code. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. This option is equivalent to -Xmaxjitcodesize.

-XX:+TieredCompilation

Enables the use of tiered compilation. By default, this option is disabled and tiered compilation is not used.

-XX:+UseCodeCacheFlushing

Enables flushing of the code cache before shutting down the compiler. This option is enabled by default. To disable flushing of the code cache before shutting down the compiler, specify -XX:-UseCodeCacheFlushing.

-XX:+UseCondCardMark

Enables checking of whether the card is already marked before updating the card table. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations.

-XX:+UseSuperWord

Enables the transformation of scalar operations into superword operations. This option is enabled by default. To disable the transformation of scalar operations into superword operations, specify -XX:-UseSuperWord.

Advanced Serviceability Options

These options provide the ability to gather system information and perform extensive debugging.

-XX:+HeapDumpOnOutOfMemory

Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a java.lang.OutOfMemoryError exception is thrown. You can explicitly set the heap dump file path and name using the -XX:HeapDumpPath option. By default, this option is disabled and the heap is not dumped when an OutOfMemoryError exception is thrown.

-XX:HeapDumpPath=path

Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the -XX:+HeapDumpOnOutOfMemoryError option is set. By default, the file is created in the current working directory, and it is named java_pid pid.hprof where pid is the identifier of the process that caused the error. The following example shows how to set the default file explicitly (%p represents the current process identificator):

-XX:HeapDumpPath=./java_pid%p.hprof

The following example shows how to set the heap dump file to C:/log/java/java_heapdump.log:

-XX:HeapDumpPath=C:/log/java/java_heapdump.log
-XX:LogFile=path

Sets the path and file name where log data is written. By default, the file is created in the current working directory, and it is named hotspot.log.

The following example shows how to set the log file to C:/log/java/hotspot.log:

-XX:LogFile=C:/log/java/hotspot.log
-XX:+PrintClassHistogram

Enables printing of a class instance histogram after a Control+Break event. By default, this option is disabled.

Setting this option is equivalent to running the jmap -histo command, or the jcmd pid GC.class_histogram command, where pid is the current Java process identifier.

-XX:+PrintConcurrentLocks

Enables printing of java.util.concurrent locks after a Control+Break event. By default, this option is disabled.

Setting this option is equivalent to running the jstack -l command or the jcmd pid Thread.print -l command, where pid is the current Java process identifier.

-XX:+UnlockDiagnosticVMOptions

Unlocks the options intended for diagnosing the JVM. By default, this option is disabled and diagnostic options are not available.

Advanced Garbage Collection Options

These options control how garbage collection (GC) is performed by the Java HotSpot VM.

-XX:+AggressiveHeap

Enables Java heap optimization. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU). By default, the option is disabled and the heap is not optimized.

-XX:AllocatePrefetchDistance=size

Sets the size (in bytes) of the prefetch distance for object allocation. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object. Each Java thread has its own allocation point.

Negative values denote that prefetch distance is chosen based on the platform. Positive values are bytes to prefetch. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is set to -1.

The following example shows how to set the prefetch distance to 1024 bytes:

-XX:AllocatePrefetchDistance=1024
-XX:AllocatePrefetchLines=lines

Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code. The default value is 1 if the last allocated object was an instance, and 3 if it was an array.

The following example shows how to set the number of loaded cache lines to 5:

-XX:AllocatePrefetchLines=5
-XX:AllocatePrefetchStyle=style

Sets the generated code style for prefetch instructions. The style argument is an integer from 0 to 3:

0

Do not generate prefetch instructions.

1

Execute prefetch instructions after each allocation. This is the default parameter.

2

Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed.

3

Use BIS instruction on SPARC for allocation prefetch.

-XX:+AlwaysPreTouch

Enables touching of every page on the Java heap during JVM initialization. This gets all pages into the memory before entering the main() method. The option can be used in testing to simulate a long-running system with all virtual memory mapped to physical memory. By default, this option is disabled and all pages are committed as JVM heap space fills.

-XX:+CMSClassUnloadingEnabled

Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector. This option is enabled by default. To disable class unloading for the CMS garbage collector, specify -XX:-CMSClassUnloadingEnabled.

-XX:CMSExpAvgFactor=percent

Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics. By default, the exponential averages factor is set to 25%. The following example shows how to set the factor to 15%:

-XX:CMSExpAvgFactor=15
-XX:CMSInitiatingOccupancyFraction=percent

Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle. The default value is set to -1. Any negative value (including the default) implies that -XX:CMSTriggerRatio is used to define the value of the initiating occupancy fraction.

The following example shows how to set the occupancy fraction to 20%:

-XX:CMSInitiatingOccupancyFraction=20
-XX:+CMSScavengeBeforeRemark

Enables scavenging attempts before the CMS remark step. By default, this option is disabled.

-XX:CMSTriggerRatio=percent

Sets the percentage (0 to 100) of the value specified by -XX:MinHeapFreeRatio that is allocated before a CMS collection cycle commences. The default value is set to 80%.

The following example shows how to set the occupancy fraction to 75%:

-XX:CMSTriggerRatio=75
-XX:ConcGCThreads=threads

Sets the number of threads used for concurrent GC. The default value depends on the number of CPUs available to the JVM.

For example, to set the number of threads for concurrent GC to 2, specify the following option:

-XX:ConcGCThreads=2
-XX:+DisableExplicitGC

Enables the option that disables processing of calls to System.gc(). This option is disabled by default, meaning that calls to System.gc() are processed. If processing of calls to System.gc() is disabled, the JVM still performs GC when necessary.

-XX:+ExplicitGCInvokesConcurrent

Enables invoking of concurrent GC by using the System.gc() request. This option is disabled by default and can be enabled only together with the -XX:+UseConcMarkSweepGC option.

-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses

Enables invoking of concurrent GC by using the System.gc() request and unloading of classes during the concurrent GC cycle. This option is disabled by default and can be enabled only together with the -XX:+UseConcMarkSweepGC option.

-XX:G1HeapRegionSize=size

Sets the size of the regions into which the Java heap is subdivided when using the garbage-first (G1) collector. The value can be between 1 MB and 32 MB. The default region size is determined ergonomically based on the heap size.

The following example shows how to set the size of the subdivisions to 16 MB:

-XX:G1HeapRegionSize=16m
-XX:+G1PrintHeapRegions

Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector. By default, this option is disabled.

-XX:G1ReservePercent=percent

Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector. By default, this option is set to 10%.

The following example shows how to set the reserved heap to 20%:

-XX:G1ReservePercent=20
-XX:InitialHeapSize=size

Sets the initial size (in bytes) of the memory allocation pool. This value must be either 0, or a multiple of 1024 and greater than 1 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the size of allocated memory to 6 MB using various units:

-XX:InitialHeapSize=6291456
-XX:InitialHeapSize=6144k
-XX:InitialHeapSize=6m

If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation. The size of the heap for the young generation can be set using the -XX:NewSize option.

-XX:InitialSurvivorRatio=ratio

Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the -XX:+UseParallelGC and/or -XX:+UseParallelOldGC options). Adaptive sizing is enabled by default with the throughput garbage collector by using the -XX:+UseParallelGC and -XX:+UseParallelOldGC options, and survivor space is resized according to the application behavior, starting with the initial value. If adaptive sizing is disabled (using the -XX:-UseAdaptiveSizePolicy option), then the -XX:SurvivorRatio option should be used to set the size of the survivor space for the entire execution of the application.

The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):

S=Y/(R+2)

The 2 in the equation denotes two survivor spaces. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size.

By default, the initial survivor space ratio is set to 8. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0.2 MB.

The following example shows how to set the initial survivor space ratio to 4:

-XX:InitialSurvivorRatio=4
-XX:InitiatingHeapOccupancyPercent=percent

Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector).

By default, the initiating value is set to 45%. A value of 0 implies nonstop GC cycles. The following example shows how to set the initiating heap occupancy to 75%:

-XX:InitiatingHeapOccupancyPercent=75
-XX:MaxGCPauseMillis=time

Sets a target for the maximum GC pause time (in milliseconds). This is a soft goal, and the JVM will make its best effort to achieve it. By default, there is no maximum pause time value.

The following example shows how to set the maximum target pause time to 500 ms:

-XX:MaxGCPauseMillis=500
-XX:MaxHeapSize=size

Sets the maximum size (in byes) of the memory allocation pool. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For server deployments, -XX:InitialHeapSize and -XX:MaxHeapSize are often set to the same value. For more information, see Garbage Collector Ergonomics at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gc-ergonomics.html

The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:

-XX:MaxHeapSize=83886080
-XX:MaxHeapSize=81920k
-XX:MaxHeapSize=80m

The -XX:MaxHeapSize option is equivalent to -Xmx.

-XX:MaxHeapFreeRatio=percent

Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space expands above this value, then the heap will be shrunk. By default, this value is set to 70%.

The following example shows how to set the maximum free heap ratio to 75%:

-XX:MaxHeapFreeRatio=75
-XX:MaxMetaspaceSize=size

Sets the maximum amount of native memory that can be allocated for class metadata. By default, the size is not limited. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system.

The following example shows how to set the maximum class metadata size to 256 MB:

-XX:MaxMetaspaceSize=256m
-XX:MaxNewSize=size

Sets the maximum size (in bytes) of the heap for the young generation (nursery). The default value is set ergonomically.

-XX:MaxTenuringThreshold=threshold

Sets the maximum tenuring threshold for use in adaptive GC sizing. The largest value is 15. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector.

The following example shows how to set the maximum tenuring threshold to 10:

-XX:MaxTenuringThreshold=10
-XX:MetaspaceSize=size

Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used. The default size depends on the platform.

-XX:MinHeapFreeRatio=percent

Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space falls below this value, then the heap will be expanded. By default, this value is set to 40%.

The following example shows how to set the minimum free heap ratio to 25%:

-XX:MinHeapFreeRatio=25
-XX:NewRatio=ratio

Sets the ratio between young and old generation sizes. By default, this option is set to 2. The following example shows how to set the young/old ratio to 1:

-XX:NewRatio=1
-XX:NewSize=size

Sets the initial size (in bytes) of the heap for the young generation (nursery). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes.

The young generation region of the heap is used for new objects. GC is performed in this region more often than in other regions. If the size for the young generation is too low, then a large number of minor GCs will be performed. If the size is too high, then only full GCs will be performed, which can take a long time to complete. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size.

The following examples show how to set the initial size of young generation to 256 MB using various units:

-XX:NewSize=256m
-XX:NewSize=262144k
-XX:NewSize=268435456

The -XX:NewSize option is equivalent to -Xmn.

-XX:ParallelGCThreads=threads

Sets the number of threads used for parallel garbage collection in the young and old generations. The default value depends on the number of CPUs available to the JVM.

For example, to set the number of threads for parallel GC to 2, specify the following option:

-XX:ParallelGCThreads=2
-XX:+ParallelRefProcEnabled

Enables parallel reference processing. By default, this option is disabled.

-XX:+PrintAdaptiveSizePolicy

Enables printing of information about adaptive generation sizing. By default, this option is disabled.

-XX:+PrintGC

Enables printing of messages at every GC. By default, this option is disabled.

-XX:+PrintGCApplicationConcurrentTime

Enables printing of how much time elapsed since the last pause (for example, a GC pause). By default, this option is disabled.

-XX:+PrintGCApplicationStoppedTime

Enables printing of how much time the pause (for example, a GC pause) lasted. By default, this option is disabled.

-XX+PrintGCDateStamp

Enables printing of a date stamp at every GC. By default, this option is disabled.

-XX:+PrintGCDetails

Enables printing of detailed messages at every GC. By default, this option is disabled.

-XX:+PrintGCTaskTimeStamps

Enables printing of time stamps for every individual GC worker thread task. By default, this option is disabled.

-XX:+PrintGCTimeStamp

Enables printing of time stamps at every GC. By default, this option is disabled.

-XX:+PrintTenuringDistribution

Enables printing of tenuring age information. The following is an example of the output:

Desired survivor size 48286924 bytes, new threshold 10 (max 10)
- age 1: 28992024 bytes, 28992024 total
- age 2: 1366864 bytes, 30358888 total
- age 3: 1425912 bytes, 31784800 total
...

Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space). Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next). And so on.

In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc. The third value in each row is the cumulative size of objects of age n or less.

By default, this option is disabled.

-XX:+ScavengeBeforeFullGC

Enables GC of the young generation before each full GC. This option is enabled by default. Oracle recommends that you do not disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space. To disable GC of the young generation before each full GC, specify -XX:-ScavengeBeforeFullGC.

-XX:SoftRefLRUPolicyMSPerMB=time

Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced. The default value is one second of lifetime per free megabyte in the heap. The -XX:SoftRefLRUPolicyMSPerMB option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM). This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references. In the latter case, the value of the -Xmx option has a significant effect on how quickly soft references are garbage collected.

The following example shows how to set the value to 2.5 seconds:

-XX:SoftRefLRUPolicyMSPerMB=2500
-XX:SurvivorRatio=ratio

Sets the ratio between eden space size and survivor space size. By default, this option is set to 8. The following example shows how to set the eden/survivor space ratio to 4:

-XX:SurvivorRatio=4
-XX:TargetSurvivorRatio=percent

Sets the desired percentage of survivor space (0 to 100) used after young garbage collection. By default, this option is set to 50%.

The following example shows how to set the target survivor space ratio to 30%:

-XX:TargetSurvivorRatio=30
-XX:TLABSize=size

Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB). Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. If this option is set to 0, then the JVM chooses the initial size automatically.

The following example shows how to set the initial TLAB size to 512 KB:

-XX:TLABSize=512k
-XX:+UseAdaptiveSizePolicy

Enables the use of adaptive generation sizing. This option is enabled by default. To disable adaptive generation sizing, specify -XX:-UseAdaptiveSizePolicy and set the size of the memory allocation pool explicitly (see the -XX:SurvivorRatio option).

-XX:+UseCMSInitiatingOccupancyOnly

Enables the use of the occupancy value as the only criterion for initiating the CMS collector. By default, this option is disabled and other criteria may be used.

-XX:+UseConcMarkSweepGC

Enables the use of the CMS garbage collector for the old generation. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (-XX:+UseParallelGC) garbage collector. The G1 garbage collector (-XX:+UseG1GC) is another alternative.

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM. When this option is enabled, the -XX:+UseParNewGC option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8: -XX:+UseConcMarkSweepGC -XX:-UseParNewGC.

-XX:+UseG1GC

Enables the use of the G1 garbage collector. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM. It meets GC pause time goals with high probability, while maintaining good throughput. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0.5 seconds).

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM.

-XX:+UseGCOverheadLimit

Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an OutOfMemoryError exception is thrown. This option is enabled, by default and the parallel GC will throw an OutOfMemoryError if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress. To disable this option, specify -XX:-UseGCOverheadLimit.

-XX:+UseNUMA

Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application's use of lower latency memory. By default, this option is disabled and no optimization for NUMA is made. The option is only available when the parallel garbage collector is used (-XX:+UseParallelGC).

-XX:+UseParallelGC

Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors.

By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM. If it is enabled, then the -XX:+UseParallelOldGC option is automatically enabled, unless you explicitly disable it.

-XX:+UseParallelOldGC

Enables the use of the parallel garbage collector for full GCs. By default, this option is disabled. Enabling it automatically enables the -XX:+UseParallelGC option.

-XX:+UseParNewGC

Enables the use of parallel threads for collection in the young generation. By default, this option is disabled. It is automatically enabled when you set the -XX:+UseConcMarkSweepGC option. Using the -XX:+UseParNewGC option without the -XX:+UseConcMarkSweepGC option was deprecated in JDK 8.

-XX:+UseSerialGC

Enables the use of the serial garbage collector. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM.

-XX:+UseTLAB

Enables the use of thread-local allocation blocks (TLABs) in the young generation space. This option is enabled by default. To disable the use of TLABs, specify -XX:-UseTLAB.

Deprecated and Removed Options

These options were included in the previous release, but have since been considered unnecessary.

-Xincgc

Enables incremental garbage collection. This option was deprecated in JDK 8 with no replacement.

-Xrunlibname

Loads the specified debugging/profiling library. This option was superseded by the -agentlib option.

-XX:CMSIncrementalDutyCycle=percent

Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSIncrementalDutyCycleMin=percent

Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when -XX:+CMSIncrementalPacing is enabled. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:+CMSIncrementalMode

Enables the incremental mode for the CMS collector. This option was deprecated in JDK 8 with no replacement, along with other options that start with CMSIncremental.

-XX:CMSIncrementalOffset=percent

Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:+CMSIncrementalPacing

Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSIncrementalSafetyFactor=percent

Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle. This option was deprecated in JDK 8 with no replacement, following the deprecation of the -XX:+CMSIncrementalMode option.

-XX:CMSInitiatingPermOccupancyFraction=percent

Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC. This option was deprecated in JDK 8 with no replacement.

-XX:MaxPermSize=size

Sets the maximum permanent generation space size (in bytes). This option was deprecated in JDK 8, and superseded by the -XX:MaxMetaspaceSize option.

-XX:PermSize=size

Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded. This option was deprecated un JDK 8, and superseded by the -XX:MetaspaceSize option.

-XX:+UseSplitVerifier

Enables splitting of the verification process. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime). This option was deprecated in JDK 8, and verification is now split by default without a way to disable it.

-XX:+UseStringCache

Enables caching of commonly allocated strings. This option was removed from JDK 8 with no replacement.

Performance Tuning Examples

The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time.

Example 1Tuning for Higher Throughput
java -d64 -server -XX:+AggressiveOpts -XX:+UseLargePages -Xmn10g  -Xms26g -Xmx26g
Example 2Tuning for Lower Response Time
java -d64 -XX:+UseG1GC -Xms26g Xmx26g -XX:MaxGCPauseMillis=500 -XX:+PrintGCTimeStamp

Exit Status

The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM. However, a Java application may choose to return any value by using the API call System.exit(exitValue). The values are:

  • 0: Successful completion

  • >0: An error occurred

See Also

  • javac(1)

  • jdb(1)

  • javah(1)

  • jar(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Java Platform, Standard Edition Tools Reference Release 8 for Oracle JDK on Windows

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

Java Platform, Standard Edition

Tools Reference

Release 8 for Oracle JDK on Windows

E38210-02

March 2014

This document contains reference information for the tools that are installed with Java Development Kit (JDK).

Java Platform, Standard Edition Tools Reference Release 8 for Oracle JDK on Windows

E38210-02

Copyright 1993, 2014,Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

 Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


javac

Reads Java class and interface definitions and compiles them into bytecode and class files.

Synopsis

javac [ options ] [ sourcefiles ] [ classes] [ @argfiles ]

Arguments can be in any order:

options

Command-line options. See Options.

sourcefiles

One or more source files to be compiled (such as MyClass.java).

classes

One or more classes to be processed for annotations (such as MyPackage.MyClass).

@argfiles

One or more files that list options and source files. The -J options are not allowed in these files. See Command-Line Argument Files.

Description

The javac command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. The javac command can also process annotations in Java source files and classes.

There are two ways to pass source code file names to javac.

  • For a small number of source files, list the file names on the command line.

  • For a large number of source files, list the file names in a file that is separated by blanks or line breaks. Use the list file name preceded by an at sign (@) with the javac command.

Source code file names must have .java suffixes, class file names must have .class suffixes, and both source and class files must have root names that identify the class. For example, a class called MyClass would be written in a source file called MyClass.java and compiled into a bytecode class file called MyClass.class.

Inner class definitions produce additional class files. These class files have names that combine the inner and outer class names, such as MyClass$MyInnerClass.class.

Arrange source files in a directory tree that reflects their package tree. For example, if all of your source files are in \workspace, then put the source code for com.mysoft.mypack.MyClass in /workspace in \workspace\com\mysoft\mypack\MyClass.java.

By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with the -d option.

Options

The compiler has a set of standard options that are supported on the current development environment. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Nonstandard options begin with the -X option.

  • See also Cross-Compilation Options

  • See also Nonstandard Options

Standard Options

-Akey[=value]

Specifies options to pass to annotation processors. These options are not interpreted by javac directly, but are made available for use by individual processors. The key value should be one or more identifiers separated by a dot (.).

-cp path or -classpath path

Specifies where to find user class files, and (optionally) annotation processors and source files. This class path overrides the user class path in the CLASSPATH environment variable. If neither CLASSPATH, -cp nor -classpath is specified, then the user class path is the current directory. See Setting the Class Path.

If the -sourcepath option is not specified, then the user class path is also searched for source files.

If the -processorpath option is not specified, then the class path is also searched for annotation processors.

-Djava.ext.dirs=directories

Overrides the location of installed extensions.

-Djava.endorsed.dirs=directories

Overrides the location of the endorsed standards path.

-d directory

Sets the destination directory for class files. The directory must already exist because javac does not create it. If a class is part of a package, then javac puts the class file in a subdirectory that reflects the package name and creates directories as needed.

If you specify -d C:\myclasses and the class is called com.mypackage.MyClass, then the class file is C:\myclasses\com\mypackage\MyClass.class.

If the -d option is not specified, then javac puts each class file in the same directory as the source file from which it was generated.

Note: The directory specified by the -d option is not automatically added to your user class path.

-deprecation

Shows a description of each use or override of a deprecated member or class. Without the -deprecation option, javac shows a summary of the source files that use or override deprecated members or classes. The -deprecation option is shorthand for -Xlint:deprecation.

-encoding encoding

Sets the source file encoding name, such as EUC-JP and UTF-8. If the -encoding option is not specified, then the platform default converter is used.

-endorseddirs directories

Overrides the location of the endorsed standards path.

-extdirs directories

Overrides the location of the ext directory. The directories variable is a colon-separated list of directories. Each JAR file in the specified directories is searched for class files. All JAR files found become part of the class path.

If you are cross-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes. See Cross-Compilation Options for more information.

-g

Generates all debugging information, including local variables. By default, only line number and source file information is generated.

-g:none

Does not generate any debugging information.

-g:[keyword list]

Generates only some kinds of debugging information, specified by a comma separated list of keywords. Valid keywords are:

source

Source file debugging information.

lines

Line number debugging information.

vars

Local variable debugging information.

-help

Prints a synopsis of standard options.

-implicit:[class, none]

Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use -implicit:class. To suppress class file generation, use -implicit:none. If this option is not specified, then the default is to automatically generate class files. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing. The warning is not issued when the -implicit option is set explicitly. See Searching for Types.

-Joption

Passes option to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Note: The CLASSPATH, -classpath, -bootclasspath, and -extdirs options do not specify the classes used to run javac. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want. If you must customize the complier implementation, then use the -J option to pass options through to the underlying Java launcher.

-nowarn

Disables warning messages. This option operates the same as the -Xlint:none option.

-parameters

Stores formal parameter names of constructors and methods in the generated class file so that the method java.lang.reflect.Executable.getParameters from the Reflection API can retrieve them.

-proc: [none, only]

Controls whether annotation processing and compilation are done. -proc:none means that compilation takes place without annotation processing. -proc:only means that only annotation processing is done, without any subsequent compilation.

-processor class1 [,class2,class3...]

Names of the annotation processors to run. This bypasses the default discovery process.

-processorpath path

Specifies where to find annotation processors. If this option is not used, then the class path is searched for processors.

-s dir

Specifies the directory where to place the generated source files. The directory must already exist because javac does not create it. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed.

If you specify -s C:\mysrc and the class is called com.mypackage.MyClass, then the source file is put in in C:\mysrc\com\mypackage\MyClass.java.

-source release

Specifies the version of source code accepted. The following values for release are allowed:

1.3

The compiler does not support assertions, generics, or other language features introduced after Java SE 1.3.

1.4

The compiler accepts code containing assertions, which were introduced in Java SE 1.4.

1.5

The compiler accepts code containing generics and other language features introduced in Java SE 5.

5

Synonym for 1.5.

1.6

No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition.

6

Synonym for 1.6.

1.7

This is the default value. The compiler accepts code with features introduced in Java SE 7.

7

Synonym for 1.7.

-sourcepath sourcepath

Specifies the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives. If packages are used, then the local path name within the directory or archive must reflect the package name.

Note: Classes found through the class path might be recompiled when their source files are also found. See Searching for Types.

-verbose

Uses verbose output, which includes information about each class loaded and each source file compiled.

-version

Prints release information.

-werror

Terminates compilation when warnings occur.

-X

Displays information about nonstandard options and exits.

Cross-Compilation Options

By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use the -bootclasspath and -extdirs options when cross-compiling.

-target version

Generates class files that target a specified release of the virtual machine. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM. Valid targets are 1.1, 1.2, 1.3, 1.4, 1.5 (also 5), 1.6 (also 6), and 1.7 (also 7).

The default for the -target option depends on the value of the -source option:

  • If the -source option is not specified, then the value of the -target option is 1.7

  • If the -source option is 1.2, then the value of the -target option is 1.4

  • If the -source option is 1.3, then the value of the -target option is 1.4

  • If the -source option is 1.5, then the value of the -target option is 1.7

  • If the -source option is 1.6, then the value of the -target is option 1.7

  • For all other values of the -source option, the value of the -target option is the value of the -source option.

-bootclasspath bootclasspath

Cross-compiles against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives.

Compact Profile Option

Beginning with JDK 8, the javac compiler supports compact profiles. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint. The compact profiles feature could be used to shorten the download time for applications from app stores. This feature makes for more compact deployment of Java applications that bundle the JRE. This feature is also useful in small devices.

The supported profile values are compact1, compact2, and compact3. These are additive layers. Each higher-numbered compact profile contains all of the APIs in profiles with smaller number names.

-profile

When using compact profiles, this option specifies the profile name when compiling. For example:

javac -profile compact1 Hello.java

javac does not compile source code that uses any Java SE APIs that is not in the specified profile. Here is an example of the error message that results from attempting to compile such source code:

cd jdk1.8.0/bin
./javac -profile compact1 Paint.java
Paint.java:5: error: Applet is not available in profile 'compact1'
import java.applet.Applet;

In this example, you can correct the error by modifying the source to not use the Applet class. You could also correct the error by compiling without the -profile option. Then the compilation would be run against the full set of Java SE APIs. (None of the compact profiles include the Applet class.)

An alternative way to compile with compact profiles is to use the -bootclasspath option to specify a path to an rt.jar file that specifies a profile's image. Using the -profile option instead does not require a profile image to be present on the system at compile time. This is useful when cross-compiling.

Nonstandard Options

-Xbootclasspath/p:path

Adds a suffix to the bootstrap class path.

-Xbootclasspath/a:path

Adds a prefix to the bootstrap class path.

-Xbootclasspath/:path

Overrides the location of the bootstrap class files.

-Xdoclint:[-]group [/access]

Enables or disables specific groups of checks, where group is one of the following values: accessibility, syntax, reference, html or missing. For more information about these groups of checks see the -Xdoclint option of the javadoc command. The -Xdoclint option is disabled by default in the javac command.

The variable access specifies the minimum visibility level of classes and members that the -Xdoclint option checks. It can have one of the following values (in order of most to least visible) : public, protected, package and private. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):

-Xdoclint:all/protected

The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):

-Xdoclint:all,-html/package
-Xdoclint:none

Disables all groups of checks.

-Xdoclint:all[/access]

Enables all groups of checks.

-Xlint

Enables all recommended warnings. In this release, enabling all available warnings is recommended.

-Xlint:all

Enables all recommended warnings. In this release, enabling all available warnings is recommended.

-Xlint:none

Disables all warnings.

-Xlint:name

Disables warning name. See Enable or Disable Warnings with the -Xlint Option for a list of warnings you can disable with this option.

-Xlint:-name

Disables warning name. See Enable or Disable Warnings with the -Xlint Option with the -Xlint option to get a list of warnings that you can disable with this option.

-Xmaxerrs number

Sets the maximum number of errors to print.

-Xmaxwarns number

Sets the maximum number of warnings to print.

-Xstdout filename

Sends compiler messages to the named file. By default, compiler messages go to System.err.

-Xprefer:[newer,source]

Specifies which file to read when both a source file and class file are found for a type. (See Searching for Types). If the -Xprefer:newer option is used, then it reads the newer of the source or class file for a type (default). If the -Xprefer:source option is used, then it reads the source file. Use -Xprefer:source when you want to be sure that any annotation processors can access annotations declared with a retention policy of SOURCE.

-Xpkginfo:[always,legacy,nonempty]

Control whether javac generates package-info.class files from package-info.java files. Possible mode arguments for this option include the following.

always

Always generate a package-info.class file for every package-info.java file. This option may be useful if you use a build system such as Ant, which checks that each .java file has a corresponding .class file.

legacy

Generate a package-info.class file only if package-info.java contains annotations. Don't generate a package-info.class file if package-info.java only contains comments.

Note: A package-info.class file might be generated but be empty if all the annotations in the package-info.java file have RetentionPolicy.SOURCE.

nonempty

Generate a package-info.class file only if package-info.java contains annotations with RetentionPolicy.CLASS or RetentionPolicy.RUNTIME.

-Xprint

Prints a textual representation of specified types for debugging purposes. Perform neither annotation processing nor compilation. The format of the output could change.

-XprintProcessorInfo

Prints information about which annotations a processor is asked to process.

-XprintRounds

Prints information about initial and subsequent annotation processing rounds.

Enable or Disable Warnings with the -Xlint Option

Enable warning name with the -Xlint:name option, where name is one of the following warning names. Note that you can disable a warning with the -Xlint:-name: option.

cast

Warns about unnecessary and redundant casts, for example:

String s = (String) "Hello!"
classfile

Warns about issues related to class file contents.

deprecation

Warns about the use of deprecated items, for example:

java.util.Date myDate = new java.util.Date();
int currentDay = myDate.getDay();

The method java.util.Date.getDay has been deprecated since JDK 1.1

dep-ann

Warns about items that are documented with an @deprecated Javadoc comment, but do not have a @Deprecated annotation, for example:

/**
  * @deprecated As of Java SE 7, replaced by {@link #newMethod()}
  */
public static void deprecatedMethood() { }
public static void newMethod() { }
divzero

Warns about division by the constant integer 0, for example:

int divideByZero = 42 / 0;
empty

Warns about empty statements after if statements, for example:

class E {
    void m() {
         if (true) ;
    }
}
fallthrough

Checks the switch blocks for fall-through cases and provides a warning message for any that are found. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case. For example, the code following the case 1 label in this switch block does not end with a break statement:

switch (x) {
case 1:
  System.out.println("1");
  // No break statement here.
case 2:
  System.out.println("2");
}

If the -Xlint:fallthrough option was used when compiling this code, then the compiler emits a warning about possible fall-through into case, with the line number of the case in question.

finally

Warns about finally clauses that cannot complete normally, for example:

public static int m() {
  try {
     throw new NullPointerException();
  }  catch (NullPointerException(); {
     System.err.println("Caught NullPointerException.");
     return 1;
   } finally {
     return 0;
   }
  }

The compiler generates a warning for the finally block in this example. When the int method is called, it returns a value of 0. A finally block executes when the try block exits. In this example, when control is transferred to the catch block, the int method exits. However, the finally block must execute, so it is executed, even though control was transferred outside the method.

options

Warns about issues that related to the use of command-line options. See Cross-Compilation Options.

overrides

Warns about issues regarding method overrides. For example, consider the following two classes:

public class ClassWithVarargsMethod {
  void varargsMethod(String... s) { }
}

public class ClassWithOverridingMethod extends ClassWithVarargsMethod {
   @Override
   void varargsMethod(String[] s) { }
}

The compiler generates a warning similar to the following:.

warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod
overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding
method is missing '...'

When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. In the method ClassWithVarargsMethod.varargsMethod, the compiler translates the varargs formal parameter String... s to the formal parameter String[] s, an array, which matches the formal parameter of the method ClassWithOverridingMethod.varargsMethod. Consequently, this example compiles.

path

Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths). Such warnings cannot be suppressed with the @SuppressWarnings annotation, for example:

javac -Xlint:path -classpath C:\nonexistentpath Example.java
processing

Warn about issues regarding annotation processing. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception. For example, the following is a simple annotation processor:

Source file AnnocProc.java:

import java.util.*;
import javax.annotation.processing.*;
import javax.lang.model.*;
import.javaz.lang.model.element.*;

@SupportedAnnotationTypes("NotAnno")
public class AnnoProc extends AbstractProcessor {
  public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){
     return true;
  }

  public SourceVersion getSupportedSourceVersion() {
     return SourceVersion.latest();
   }
}

Source file AnnosWithoutProcessors.java:

@interface Anno { }

@Anno
class AnnosWithoutProcessors { }

The following commands compile the annotation processor AnnoProc, then run this annotation processor against the source file AnnosWithoutProcessors.java:

javac AnnoProc.java
javac -cp . -Xlint:processing -processor AnnoProc -proc:only AnnosWithoutProcessors.java

When the compiler runs the annotation processor against the source file AnnosWithoutProcessors.java, it generates the following warning:

warning: [processing] No processor claimed any of these annotations: Anno

To resolve this issue, you can rename the annotation defined and used in the class AnnosWithoutProcessors from Anno to NotAnno.

rawtypes

Warns about unchecked operations on raw types. The following statement generates a rawtypes warning:

void countElements(List l) { ... }

The following example does not generate a rawtypes warning

void countElements(List<?> l) { ... }

List is a raw type. However, List<?> is an unbounded wildcard parameterized type. Because List is a parameterized interface, always specify its type argument. In this example, the List formal argument is specified with an unbounded wildcard (?) as its formal type parameter, which means that the countElements method can accept any instantiation of the List interface.

Serial

Warns about missing serialVersionUID definitions on serializable classes, for example:

public class PersistentTime implements Serializable
{
  private Date time;

   public PersistentTime() {
     time = Calendar.getInstance().getTime();
   }

   public Date getTime() {
     return time;
   }
}

The compiler generates the following warning:

warning: [serial] serializable class PersistentTime has no definition of
serialVersionUID

If a serializable class does not explicitly declare a field named serialVersionUID, then the serialization runtime environment calculates a default serialVersionUID value for that class based on various aspects of the class, as described in the Java Object Serialization Specification. However, it is strongly recommended that all serializable classes explicitly declare serialVersionUID values because the default process of computing serialVersionUID vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected InvalidClassExceptions during deserialization. To guarantee a consistent serialVersionUID value across different Java compiler implementations, a serializable class must declare an explicit serialVersionUID value.

static

Warns about issues relating to the use of statics, for example:

class XLintStatic {
    static void m1() { }
    void m2() { this.m1(); }
}

The compiler generates the following warning:

warning: [static] static method should be qualified by type name,
XLintStatic, instead of by an expression

To resolve this issue, you can call the static method m1 as follows:

XLintStatic.m1();

Alternately, you can remove the static keyword from the declaration of the method m1.

try

Warns about issues relating to use of try blocks, including try-with-resources statements. For example, a warning is generated for the following statement because the resource ac declared in the try block is not used:

try ( AutoCloseable ac = getResource() ) {    // do nothing}
unchecked

Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:

List l = new ArrayList<Number>();
List<String> ls = l;       // unchecked warning

During type erasure, the types ArrayList<Number> and List<String> become ArrayList and List, respectively.

The ls command has the parameterized type List<String>. When the List referenced by l is assigned to ls, the compiler generates an unchecked warning. At compile time, the compiler and JVM cannot determine whether l refers to a List<String> type. In this case, l does not refer to a List<String> type. As a result, heap pollution occurs.

A heap pollution situation occurs when the List object l, whose static type is List<Number>, is assigned to another List object, ls, that has a different static type, List<String>. However, the compiler still allows this assignment. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics. Because of type erasure, List<Number> and List<String> both become List. Consequently, the compiler allows the assignment of the object l, which has a raw type of List, to the object ls.

varargs

Warns about unsafe usages of variable arguments (varargs) methods, in particular, those that contain non-reifiable arguments, for example:

public class ArrayBuilder {
  public static <T> void addToList (List<T> listArg, T... elements) {
    for (T x : elements) {
      listArg.add(x);
    }
  }
}

Note: A non-reifiable type is a type whose type information is not fully available at runtime.

The compiler generates the following warning for the definition of the method ArrayBuilder.addToList

warning: [varargs] Possible heap pollution from parameterized vararg type T

When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method ArrayBuilder.addToList, the compiler translates the varargs formal parameter T... elements to the formal parameter T[] elements, an array. However, because of type erasure, the compiler converts the varargs formal parameter to Object[] elements. Consequently, there is a possibility of heap pollution.

Command-Line Argument Files

To shorten or simplify the javac command, you can specify one or more files that contain arguments to the javac command (except -J options). This enables you to create javac commands of any length on any operating system.

An argument file can include javac options and source file names in any combination. The arguments within a file can be separated by spaces or new line characters. If a file name contains embedded spaces, then put the whole file name in double quotation marks.

File Names within an argument file are relative to the current directory, not the location of the argument file. Wild cards (*) are not allowed in these lists (such as for specifying *.java). Use of the at sign (@) to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.

When executing the javac command, pass in the path and name of each argument file with the at sign (@) leading character. When the javac command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list.

Example 1Single Argument File

You could use a single argument file named argfile to hold all javac arguments:

javac @argfile

This argument file could contain the contents of both files shown in Example 2

Example 2Two Argument Files

You can create two argument files: one for the javac options and the other for the source file names. Note that the following lists have no line-continuation characters.

Create a file named options that contains the following:

-d classes
-g
-sourcepath C:\java\pubs\ws\1.3\src\share\classes

Create a file named classes that contains the following:

MyClass1.java
MyClass2.java
MyClass3.java

Then, run the javac command as follows:

javac @options @classes

Example 3Argument Files with Paths

The argument files can have paths, but any file names inside the files are relative to the current working directory (not path1 or path2):

javac @path1/options @path2/classes

Annotation Processing

The javac command provides direct support for annotation processing, superseding the need for the separate annotation processing command, apt.

The API for annotation processors is defined in the javax.annotation.processing and javax.lang.model packages and subpackages.

How Annotation Processing Works

Unless annotation processing is disabled with the -proc:none option, the compiler searches for any annotation processors that are available. The search path can be specified with the -processorpath option. If no path is specified, then the user class path is used. Processors are located by means of service provider-configuration files named META-INF/services/javax.annotation.processing.Processor on the search path. Such files should contain the names of any annotation processors to be used, listed one per line. Alternatively, processors can be specified explicitly, using the -processor option.

After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process. When a match is found, the processor is called. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations. After all of the annotations are claimed, the compiler does not search for additional processors.

If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before. Any processors called on previous rounds are also called on all subsequent rounds. This continues until no new source files are generated.

After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work. Finally, unless the -proc:only option is used, the compiler compiles the original and all generated source files.

Implicitly Loaded Source Files

To compile a set of source files, the compiler might need to implicitly load additional source files. See Searching for Types. Such files are currently not subject to annotation processing. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled. The -implicit option provides a way to suppress the warning.

Searching for Types

To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance.

For example, when you create a subclass java.applet.Applet, you are also using the ancestor classes of Applet: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.

When the compiler needs type information, it searches for a source file or class file that defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath option.

If you set the -sourcepath option, then the compiler searches the indicated path for source files. Otherwise, the compiler searches the user class path for both class files and source files.

You can specify different bootstrap or extension classes with the -bootclasspath and the -extdirs options. See Cross-Compilation Options.

A successful type search may produce a class file, a source file, or both. If both are found, then you can use the -Xprefer option to instruct the compiler which to use. If newer is specified, then the compiler uses the newer of the two files. If source is specified, the compiler uses the source file. The default is newer.

If a type search finds a source file for a required type, either by itself, or as a result of the setting for the -Xprefer option, then the compiler reads the source file to get the information it needs. By default the compiler also compiles the source file. You can use the -implicit option to specify the behavior. If none is specified, then no class files are generated for the source file. If class is specified, then class files are generated for the source file.

The compiler might not discover the need for some type information until after annotation processing completes. When the type information is found in a source file and no -implicit option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the -implicit option to specify whether or not class files should be generated for such source files.

Programmatic Interface

The javac command supports the new Java Compiler API defined by the classes and interfaces in the javax.tools package.

Example

To compile as though providing command-line arguments, use the following syntax:

JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();

The example writes diagnostics to the standard output stream and returns the exit code that javac would give when called from the command line.

You can use other methods in the javax.tools.JavaCompiler interface to handle diagnostics, control where files are read from and written to, and more.

Old Interface

Note: This API is retained for backward compatibility only. All new code should use the newer Java Compiler API.

The com.sun.tools.javac.Main class provides two static methods to call the compiler from a program:

public static int compile(String[] args);
public static int compile(String[] args, PrintWriter out);

The args parameter represents any of the command-line arguments that would typically be passed to the compiler.

The out parameter indicates where the compiler diagnostic output is directed.

The return value is equivalent to the exit value from javac.

Note: All other classes and methods found in a package with names that start with com.sun.tools.javac (subpackages of com.sun.tools.javac) are strictly internal and subject to change at any time.

Examples

Example 1Compile a Simple Program

This example shows how to compile the Hello.java source file in the greetings directory. The class defined in Hello.java is called greetings.Hello. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory. This makes it possible to use the default user class path. It also makes it unnecessary to specify a separate destination directory with the -d option.

The source code in Hello.java:

package greetings;

public class Hello {
    public static void main(String[] args) {
        for (int i=0; i < args.length; i++) {
            System.out.println("Hello " + args[i]);
        }
    }
}

Compile greetings.Hello:

javac greetings/Hello.java

Run greetings.Hello:

java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone

Example 2Compile Multiple Source Files

This example compiles the Aloha.java, GutenTag.java, Hello.java, and Hi.java source files in the greetings package.

C:\>javac greetings\*.java
C:\>dir greetings
Aloha.class         GutenTag.class      Hello.class         Hi.class
Aloha.java          GutenTag.java       Hello.java          Hi.java

Example 3Specify a User Class Path

After changing one of the source files in the previous example, recompile it:

C:\>cd
\examples
C:\>javac greetings\Hi.java

Because greetings.Hi refers to other classes in the greetings package, the compiler needs to find these other classes. The previous example works because the default user class path is the directory that contains the package directory. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting CLASSPATH. This example uses the -classpath option.

C:\>javac -classpath \examples \examples\greetings\Hi.java

If you change greetings.Hi to use a banner utility, then that utility also needs to be accessible through the user class path.

C:\>javac -classpath \examples;\lib\Banners.jar
            \examples\greetings\Hi.java

To execute a class in the greetings package, the program needs access to the greetings package, and to the classes that the greetings classes use.

C:\>java -classpath \examples;\lib\Banners.jar greetings.Hi

Example 4Separate Source Files and Class Files

The following example uses javac to compile code that runs on JVM 1.6.

javac -source 1.6 -target 1.6 -bootclasspath jdk1.6.0/lib/rt.jar \
-extdirs "" OldCode.java

The -source 1.6 option specifies that release 1.6 (or 6) of the Java programming language be used to compile OldCode.java. The option -target 1.6 option ensures that the generated class files are compatible with JVM 1.6. Note that in most cases, the value of the -target option is the value of the -source option; in this example, you can omit the -target option.

You must specify the -bootclasspath option to specify the correct version of the bootstrap classes (the rt.jar library). If not, then the compiler generates a warning:

javac -source 1.6 OldCode.java
warning: [options] bootstrap class path not set in conjunction with
-source 1.6

If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included.

Example 5Cross Compile

This example uses javac to compile code that runs on JVM 1.6.

javac -source 1.6 -target 1.6 -bootclasspath C:\jdk1.6.0\lib\rt.jar
            -extdirs "" OldCode.java

The -source 1.6 option specifies that release 1.6 (or 6) of the Java programming language to be used to compile OldCode.java. The -target 1.6 option ensures that the generated class files are compatible with JVM 1.6. In most cases, the value of the -target is the value of -source. In this example, the -target option is omitted.

You must specify the -bootclasspath option to specify the correct version of the bootstrap classes (the rt.jar library). If not, then the compiler generates a warning:

javac -source 1.6 OldCode.java
warning: [options] bootstrap class path not set in conjunction with -source 1.6

If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes. This combination can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included. In this example, the compiler uses release 1.6 of the Java programming language.

See Also

  •

    java(1)

    •

  •

    jdb(1)

    •

  •

    javah(1)

    •

  •

    javadoc(1)

    •

  •

    jar(1)

    •

  •

    jdb(1)

    •

                Contents
                Previous
                Next

  Oracle and/or its affiliates

Copyright
© 1993, 2014, Oracle and/or its affiliates. All rights
reserved.

Contact
Us


javadoc

Generates HTML pages of API documentation from Java source files.

Synopsis

javadoc {packages|source-files} [options] [@argfiles]

packages

Names of packages that you want to document, separated by spaces, for example java.lang java.lang.reflect java.awt. If you want to also document the subpackages, use the -subpackages option to specify the packages.

By default, javadoc looks for the specified packages in the current directory and subdirectories. Use the -sourcepath option to specify the list of directories where to look for packages.

source-files

Names of Java source files that you want to document, separated by spaces, for example Class.java Object.java Button.java. By default, javadoc looks for the specified classes in the current directory. However, you can specify the full path to the class file and use wildcard characters, for example /home/src/java/awt/Graphics*.java. You can also specify the path relative to the current directory.

options

Command-line options, separated by spaces. See Options.

@argfiles

Names of files that contain a list of javadoc command options, package names and source file names in any order.

Description

The javadoc command parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages that describe (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use the javadoc command to generate the API documentation or the implementation documentation for a set of source files.

You can run the javadoc command on entire packages, individual source files, or both. When documenting entire packages, you can either use the -subpackages option to recursively traverse a directory and its subdirectories, or to pass in an explicit list of package names. When you document individual source files, pass in a list of Java source file names. See Simple Examples.

Process Source Files

The javadoc command processes files that end in source and other files described in Source Files. If you run the javadoc command by passing in individual source file names, then you can determine exactly which source files are processed. However, that is not how most developers want to work, because it is simpler to pass in package names. The javadoc command can be run three ways without explicitly specifying the source file names. You can pass in package names, use the -subpackages option, or use wild cards with source file names. In these cases, the javadoc command processes a source file only when the file fulfills all of the following requirements:

  • The file name prefix (with .java removed) is a valid class name.

  • The path name relative to the root of the source tree is a valid package name after the separators are converted to dots.

  • The package statement contains the valid package name.

Processing Links

During a run, the javadoc command adds cross-reference links to package, class, and member names that are being documented as part of that run. Links appear in the following places. See Javadoc Tags for a description of the @ tags.

  • Declarations (return types, argument types, and field types).

  • See Also sections that are generated from @see tags.

  • Inline text generated from {@link} tags.

  • Exception names generated from @throws tags.

  • Specified by links to interface members and Overrides links to class members. See Method Comment Inheritance.

  • Summary tables listing packages, classes and members.

  • Package and class inheritance trees.

  • The index.

You can add links to existing text for classes not included on the command line (but generated separately) by way of the -link and -linkoffline options.

Processing Details

The javadoc command produces one complete document every time it runs. It does not do incremental builds that modify or directly incorporate the results from earlier runs. However, the javadoc command can link to results from other runs.

The javadoc command implementation requires and relies on the Java compiler. The javadoc command calls part of the javac command to compile the declarations and ignore the member implementations. The javadoc command builds a rich internal representation of the classes that includes the class hierarchy and use relationships to generate the HTML. The javadoc command also picks up user-supplied documentation from documentation comments in the source code. See Documentation Comments.

The javadoc command runs on source files that are pure stub files with no method bodies. This means you can write documentation comments and run the javadoc command in the early stages of design before API implementation.

Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the javadoc command documents default constructors that are present in the compiled class files but not in the source code.

In many cases, the javadoc command lets you generate documentation for source files with incomplete or erroneous code. You can generate documentation before all debugging and troubleshooting is done. The javadoc command does primitive checking of documentation comments.

When the javadoc command builds its internal structure for the documentation, it loads all referenced classes. Because of this, the javadoc command must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. See How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Typically, classes you create must either be loaded as an extension or in the javadoc command class path.

Javadoc Doclets

You can customize the content and format of the javadoc command output with doclets. The javadoc command has a default built-in doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or make a subclass of the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you want.

When a custom doclet is not specified with the -doclet option, the javadoc command uses the default standard doclet. The javadoc command has several options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command-line options. See Options.

Source Files

The javadoc command generates output that originates from the following types of source files: Java language source files for classes (.java), package comment files, overview comment files, and miscellaneous unprocessed files. This section also describes test files and template files that can also be in the source tree, but that you want to be sure not to document.

Class Source Files

Each class or interface and its members can have their own documentation comments contained in a source file. See Documentation Comments.

Package Comment Files

Each package can have its own documentation comment, contained in its own source file, that the javadoc command merges into the generated package summary page. You typically include in this comment any documentation that applies to the entire package.

To create a package comment file, you can place your comments in one of the following files:

  • The package-info.java file can contain the package declaration, package annotations, package comments, and Javadoc tags. This file is preferred.

  • The package.html file contains only package comments and Javadoc tags. No package annotations.

A package can have a single package.html file or a single package-info.java file, but not both. Place either file in the package directory in the source tree with your source files.

The package-info.java File

The package-info.java file can contain a package comment of the following structure. The comment is placed before the package declaration.

Note: The comment separators /** and */ must be present, but the leading asterisks on the intermediate lines can be left off.

/**
 * Provides the classes necessary to create an
 * applet and the classes an applet uses
 * to communicate with its applet context.
 * <p>
 * The applet framework involves two entities:
 * the applet and the applet context.
 * An applet is an embeddable window (see the
 * {@link java.awt.Panel} class) with a few extra
 * methods that the applet context can use to
 * initialize, start, and stop the applet.
 *
 * @since 1.0
 * @see java.awt
 */
package java.lang.applet;

The package.html File

The package.html file can contain a package comment of the following structure. The comment is placed in the <body> element.

File: java/applet/package.html

<HTML>
<BODY>
Provides the classes necessary to create an applet and the
classes an applet uses to communicate with its applet context.
<p>
The applet framework involves two entities: the applet
and the applet context. An applet is an embeddable
window (see the {@link java.awt.Panel} class) with a
few extra methods that the applet context can use to
initialize, start, and stop the applet.

@since 1.0
@see java.awt
</BODY>
</HTML>

The package.html file is a typical HTML file and does not include a package declaration. The content of the package comment file is written in HTML with one exception. The documentation comment should not include the comment separators /** and */ or leading asterisks. When writing the comment, make the first sentence a summary about the package, and do not put a title or any other text between the <body> tag and the first sentence. You can include package tags. All block tags must appear after the main description. If you add an @see tag in a package comment file, then it must have a fully qualified name.

Processing the Comment File

When the javadoc command runs, it searches for the package comment file. If the package comment file is found, then the javadoc command does the following:

  • Copies the comment for processing. For package.html, the javadoc command copies all content between the <body> and </body> HTML tags. You can include a <head> section to put a <title> tag, source file copyright statement, or other information, but none of these appear in the generated documentation.

  • Processes the package tags. See Package Tags.

  • Inserts the processed text at the bottom of the generated package summary page. See Java Platform, Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

  • Copies the first sentence of the package comment to the top of the package summary page. The javadoc command also adds the package name and this first sentence to the list of packages on the overview page. See Java Platform, Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

    The end of the sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions.

Overview Comment Files

Each application or set of packages that you are documenting can have its own overview documentation comment that is kept in its own source file, that the javadoc command merges into the generated overview page. You typically include in this comment any documentation that applies to the entire application or set of packages.

You can name the file anything you want such as overview.html and place it anywhere. A typical location is at the top of the source tree.

For example, if the source files for the java.applet package are contained in the C:\user\src\java\applet directory, then you could create an overview comment file at C:\user\src\overview.html.

You can have multiple overview comment files for the same set of source files in case you want to run the javadoc command multiple times on different sets of packages. For example, you could run the javadoc command once with -private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file.

The content of the overview comment file is one big documentation comment that is written in HTML. Make the first sentence a summary about the application or set of packages. Do not put a title or any other text between the <body> tag and the first sentence. All tags except inline tags, such as an {@link} tag, must appear after the main description. If you add an @see tag, then it must have a fully qualified name.

When you run the javadoc command, specify the overview comment file name with the -overview option. The file is then processed similarly to that of a package comment file. The javadoc command does the following:

  • Copies all content between the <body> and </body> tags for processing.

  • Processes the overview tags that are present. See Overview Tags.

  • Inserts the processed text at the bottom of the generated overview page. See Java Platform Standard Edition API Specification Overview at
    http://docs.oracle.com/javase/8/docs/api/overview-summary.html

  • Copies the first sentence of the overview comment to the top of the overview summary page.

Unprocessed Files

Your source files can include any files that you want the javadoc command to copy to the destination directory. These files usually include graphic files, example Java source and class files, and self-standing HTML files with a lot of content that would overwhelm the documentation comment of a typical Java source file.

To include unprocessed files, put them in a directory called doc-files. The doc-files directory can be a subdirectory of any package directory that contains source files. You can have one doc-files subdirectory for each package.

For example, if you want to include the image of a button in the java.awt.Button class documentation, then place the image file in the \src\java\awt\doc-files directory. Do not place the doc-files directory at \src\java\doc-files, because java is not a package. It does not contain any source files.

All links to the unprocessed files must be included in the code because the javadoc command does not look at the files. The javadoc command copies the directory and all of its contents to the destination. The following example shows how the link in the Button.java documentation comment might look:

/**
 * This button looks like this:
 * <img src="doc-files/Button.gif">
 */

Test and Template Files

You can store test and template files in the source tree in the same directory with or in a subdirectory of the directory where the source files reside. To prevent test and template files from being processed, run the javadoc command and explicitly pass in individual source file names.

Test files are valid, compilable source files. Template files are not valid, compatible source files, but they often have the .java suffix.

Test Files

If you want your test files to belong to either an unnamed package or to a package other than the package that the source files are in, then put the test files in a subdirectory underneath the source files and give the directory an invalid name. If you put the test files in the same directory with the source and call the javadoc command with a command-line argument that indicates its package name, then the test files cause warnings or errors. If the files are in a subdirectory with an invalid name, then the test file directory is skipped and no errors or warnings are issued. For example, to add test files for source files in com.package1, put them in a subdirectory in an invalid package name. The following directory name is invalid because it contains a hyphen:

com\package1\test-files\

If your test files contain documentation comments, then you can set up a separate run of the javadoc command to produce test file documentation by passing in their test source file names with wild cards, such as com/package1/test-files/*.java.

Template Files

If you want a template file to be in the source directory, but not generate errors when you execute the javadoc command, then give it an invalid file name such as Buffer-Template.java to prevent it from being processed. The javadoc command only processes source files with names, when stripped of the .java suffix, that are valid class names.

Generated Files

By default, the javadoc command uses a standard doclet that generates HTML-formatted documentation. The standard doclet generates basic content, cross-reference, and support pages described here. Each HTML page corresponds to a separate file. The javadoc command generates two types of files. The first type is named after classes and interfaces. The second type contain hyphens (such as package-summary.html) to prevent conflicts with the first type of file.

Basic Content Pages

  • One class or interface page (classname.html) for each class or interface being documented.

  • One package page (package-summary.html) for each package being documented. The javadoc command includes any HTML text provided in a file with the name package.html or package-info.java in the package directory of the source tree.

  • One overview page (overview-summary.html) for the entire set of packages. The overview page is the front page of the generated document. The javadoc command includes any HTML text provided in a file specified by the -overview option. The Overview page is created only when you pass two or more package names into the javadoc command. See HTML Frames and Options.

Cross-Reference Pages

  • One class hierarchy page for the entire set of packages (overview-tree.html). To view the hierarchy page, click Overview in the navigation bar and click Tree.

  • One class hierarchy page for each package (package-tree.html) To view the hierarchy page, go to a particular package, class, or interface page, and click Tree to display the hierarchy for that package.

  • One use page for each package (package-use.html) and a separate use page for each class and interface (class-use/classname.html). The use page describes what packages, classes, methods, constructors and fields use any part of the specified class, interface, or package. For example, given a class or interface A, its use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. To view the use page, go to the package, class, or interface and click the Use link in the navigation bar.

  • A deprecated API page (deprecated-list.html) that lists all deprecated APIs and their suggested replacements. Avoid deprecated APIs because they can be removed in future implementations.

  • A constant field values page (constant-values.html) for the values of static fields.

  • A serialized form page (serialized-form.html) that provides information about serializable and externalizable classes with field and method descriptions. The information on this page is of interest to reimplementors, and not to developers who want to use the API. To access the serialized form page, go to any serialized class and click Serialized Form in the See Also section of the class comment. The standard doclet generates a serialized form page that lists any class (public or non-public) that implements Serializable with its readObject and writeObject methods, the fields that are serialized, and the documentation comments from the @serial, @serialField, and @serialData tags. Public serializable classes can be excluded by marking them (or their package) with @serial exclude, and package-private serializable classes can be included by marking them (or their package) with an @serial include. As of Release 1.4, you can generate the complete serialized form for public and private classes by running the javadoc command without specifying the -private option. See Options.

  • An index page (index-*.html) of all class, interface, constructor, field and method names, in alphabetical order. The index page is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as AZ for English).

Support Pages

  • A help page (help-doc.html) that describes the navigation bar and the previous pages. Use -helpfile to override the default help file with your own custom help file.

  • One index.html file that creates the HTML frames for display. Load this file to display the front page with frames. The index.html file contains no text content.

  • Several frame files (*-frame.html) that contains lists of packages, classes, and interfaces. The frame files display the HTML frames.

  • A package list file (package-list) that is used by the -link and -linkoffline options. The package list file is a text file that is not reachable through links.

  • A style sheet file (stylesheet.css) that controls a limited amount of color, font family, font size, font style, and positioning information on the generated pages.

  • A doc-files directory that holds image, example, source code, or other files that you want copied to the destination directory. These files are not processed by the javadoc command. This directory is not processed unless it exists in the source tree.

See Options.

HTML Frames

The javadoc command generates the minimum number of frames (two or three) necessary based on the values passed to the command. It omits the list of packages when you pass a single package name or source files that belong to a single package as an argument to the javadoc command. Instead, the javadoc command creates one frame in the left-hand column that displays the list of classes. When you pass two or more package names, the javadoc command creates a third frame that lists all packages and an overview page (overview-summary.html). To bypass frames, click the No Frames link or enter the page set from the overview-summary.html page.

Generated File Structure

The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage.

For example, the document generated for the java.applet.Applet class would be located at java\applet\Applet.html.

The file structure for the java.applet package follows, assuming that the destination directory is named apidocs. All files that contain the word frame appear in the upper-left or lower-left frames, as noted. All other HTML files appear in the right-hand frame.

Directories are bold. The asterisks (*) indicate the files and directories that are omitted when the arguments to the javadoc command are source file names rather than package names. When arguments are source file names, an empty package list is created. The doc-files directory is not created in the destination unless it exists in the source tree. See Generated Files.

  • apidocs: Top-level directory

    • index.html: Initial Page that sets up HTML frames

    • *overview-summary.html: Package list with summaries

    • overview-tree.html: Class hierarchy for all packages

    • deprecated-list.html: Deprecated APIs for all packages

    • constant-values.html: Static field values for all packages

    • serialized-form.html: Serialized forms for all packages

    • *overview-frame.html: All packages for display in upper-left frame

    • allclasses-frame.html: All classes for display in lower-left frame

    • help-doc.html: Help about Javadoc page organization

    • index-all.html: Default index created without -splitindex option

    • index-files: Directory created with -splitindex option

      • index-<number>.html: Index files created with -splitindex option

    • package-list: Package names for resolving external references

    • stylesheet.css: Defines fonts, colors, positions, and so on

  • java: Package directory

    • applet: Subpackage directory

      • Applet.html: Applet class page

      • AppletContext.html: AppletContext interface

      • AppletStub.html: AppletStub interface

      • AudioClip.html: AudioClip interface

      • package-summary.html: Classes with summaries

      • package-frame.html: Package classes for display in lower-left frame

      • package-tree.html: Class hierarchy for this package

      • package-use.html: Where this package is used

      • doc-files: Image and example files directory

      • class-use: Image and examples file location

        - Applet.html: Uses of the Applet class

        - AppletContext.html: Uses of the AppletContext interface

        - AppletStub.html: Uses of the AppletStub interface

        - AudioClip.html: Uses of the AudioClip interface

  • src-html: Source code directory

    • java: Package directory

      • applet: Subpackage directory

        - Applet.html: Applet source code

        - AppletContext.html: AppletContext source code

        - AppletStub.html: AppletStub source code

        - AudioClip.html: AudioClip source code

Generated API Declarations

The javadoc command generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the Boolean class is:

public final class Boolean
extends Object
implements Serializable

The declaration for the Boolean.valueOf method is:

public static Boolean valueOf(String s)

The javadoc command can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. The synchronized and native modifiers are considered implementation detail and not part of the API specification.

Rather than relying on the keyword synchronized, APIs should document their concurrency semantics in the main description of the comment. For example, a description might be: A single enumeration cannot be used by multiple threads concurrently. The document should not describe how to achieve these semantics. As another example, while the Hashtable option should be thread-safe, there is no reason to specify that it is achieved by synchronizing all of its exported methods. It is better to reserve the right to synchronize internally at the bucket level for higher concurrency.

Documentation Comments

This section describes source code comments and comment inheritance.

Source Code Comments

You can include documentation comments in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create documentation comments for each package and another one for the overview, though their syntax is slightly different. A documentation comment consists of the characters between /** and */ that end it. Leading asterisks are allowed on each line and are described further in the following section. The text in a comment can continue onto multiple lines.

/**
 * This is the typical format of a simple documentation comment
 * that spans two lines.
 */

To save space you can put a comment on one line:

/** This comment takes up only one line. */

Placement of Comments

Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations. Documentation comments placed in the body of a method are ignored. The javadoc command recognizes only one documentation comment per declaration statement. See Where Tags Can Be Used.

A common mistake is to put an import statement between the class comment and the class declaration. Do not put an import statement at this location because the javadoc command ignores the class comment.

/**
 * This is the class comment for the class Whatever.
 */

import com.example;   // MISTAKE - Important not to put import statement here

public class Whatever{ }

Parts of Comments

A documentation comment has a main description followed by a tag section. The main description begins after the starting delimiter /** and continues until the tag section. The tag section starts with the first block tag, which is defined by the first @ character that begins a line (ignoring leading asterisks, white space, and leading separator /**). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags, and some types of tags can be repeated while others cannot. For example, this @see tag starts the tag section:

/**
 * This sentence holds the main description for this documentation comment.
 * @see java.lang.Object
 */

Block and inline Tags

A tag is a special keyword within a documentation comment that the javadoc command processes. There are two kinds of tags: block tags, which appear as an @tag tag (also known as standalone tags), and inline tags, which appear within braces, as an {@tag} tag. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and the separator (/**). This means you can use the @ character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the @ character and not have it be interpreted, then use the HTML entity &#064;. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the documentation comment. This associated text can span multiple lines. An inline tag is allowed and interpreted anywhere that text is allowed. The following example contains the @deprecated block tag and the {@link} inline tag. See Javadoc Tags.

/**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */

Write Comments in HTML

The text must be written in HTML with HTML entities and HTML tags. You can use whichever version of HTML your browser supports. The standard doclet generates HTML 3.2-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. HTML 4.0 is preferred for generated files because of the frame sets.

For example, entities for the less than symbol (<) and the greater than symbol (>) should be written as &lt; and &gt;. Similarly, the ampersand (&) should be written as &amp;. The bold HTML tag <b> is shown in the following example.

/**
 * This is a <b>doc</b> comment.
 * @see java.lang.Object
 */

Leading Asterisks

When the javadoc command parses a documentation comment, leading asterisks (*) on each line are discarded, and blanks and tabs that precede the initial asterisks (*) are also discarded. If you omit the leading asterisk on a line, then the leading white space is no longer removed so that you can paste code examples directly into a documentation comment inside a <PRE> tag with its indentation preserved. Spaces are interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator /** or <PRE> tag).

First Sentence

The first sentence of each documentation comment should be a summary sentence that contains a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag. The javadoc command copies this first sentence to the member summary at the top of the HTML page.

Multiple-Field Declarations

The Java platform lets you declare multiple fields in a single statement, but this statement can have only one documentation comment that is copied for all fields. If you want individual documentation comments for each field, then declare each field in a separate statement. For example, the following documentation comment does not make sense written as a single declaration and would be better handled as two declarations:

/**
 * The horizontal and vertical distances of point (x,y)
 */
public int x, y;      // Avoid this

The javadoc command generates the following documentation from the previous code:

public int x

The horizontal and vertical distances of point (x, y).

public int y

The horizontal and vertical distances of point (x, y).

Use of Header Tags

When writing documentation comments for members, it is best not to use HTML heading tags such as <H1> and <H2>, because the javadoc command creates an entire structured document, and these structural tags might interfere with the formatting of the generated document. However, you can use these headings in class and package comments to provide your own structure.

Method Comment Inheritance

The javadoc command allows method comment inheritance in classes and interfaces to fill in missing text or to explicitly inherit method comments. Constructors, fields, and nested classes do not inherit documentation comments.

Note: The source file for an inherited method must be on the path specified by the -sourcepath option for the documentation comment to be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with Release 1.3.n and earlier releases, where the class had to be a documented class.

Fill in Missing Text

When a main description, or @return, @param, or @throws tag is missing from a method comment, the javadoc command copies the corresponding main description or tag comment from the method it overrides or implements (if any). See Method Comment Inheritance.

When an @param tag for a particular parameter is missing, the comment for that parameter is copied from the method further up the inheritance hierarchy. When an @throws tag for a particular exception is missing, the @throws tag is copied only when that exception is declared.

This behavior contrasts with Release 1.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited.

See Javadoc Tags and Options.

Explicit Inheritance

Insert the {@inheritDoc} inline tag in a method main description or @return, @param, or @throws tag comment. The corresponding inherited main description or tag comment is copied into that spot.

Class and Interface Inheritance

Comment inheritance occurs in all possible cases of inheritance from classes and interfaces:

  • When a method in a class overrides a method in a superclass

  • When a method in an interface overrides a method in a superinterface

  • When a method in a class implements a method in an interface

In the first two cases, the javadoc command generates the subheading Overrides in the documentation for the overriding method. A link to the method being overridden is included, whether or not the comment is inherited.

In the third case, when a method in a specified class implements a method in an interface, the javadoc command generates the subheading Specified by in the documentation for the overriding method. A link to the method being implemented is included, whether or not the comment is inherited.

Method Comments Algorithm

If a method does not have a documentation comment, or has an {@inheritDoc} tag, then the javadoc command uses the following algorithm to search for an applicable comment. The algorithm is designed to find the most specific applicable documentation comment, and to give preference to interfaces over superclasses:

  1. Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first documentation comment found for this method.

  2. If Step 1 failed to find a documentation comment, then recursively apply this entire algorithm to each directly implemented (or extended) interface in the same order they were examined in Step 1.

  3. When Step 2 fails to find a documentation comment and this is a class other than the Object class, but not an interface:

    1. If the superclass has a documentation comment for this method, then use it.

    2. If Step 3a failed to find a documentation comment, then recursively apply this entire algorithm to the superclass.

Javadoc Tags

The javadoc command parses special tags when they are embedded within a Java documentation comment. The javadoc tags let you autogenerate a complete, well-formatted API from your source code. The tags start with an at sign (@) and are case-sensitive. They must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk), or it is treated as text. By convention, tags with the same name are grouped together. For example, put all @see tags together. For more information, see Where Tags Can Be Used.

Tags have the following types:

  • Bock tags: Place block tags only in the tag section that follows the description. Block tags have the form: @tag.

  • Inline tags: Place inline tags anywhere in the main description or in the comments for block tags. Inline tags are enclosed within braces: {@tag}.

For custom tags, see -tag tagname:Xaoptcmf:"taghead". See also Where Tags Can Be Used.

Tag Descriptions

@author name-text

Introduced in JDK 1.0

Adds an Author entry with the specified name text to the generated documents when the -author option is used. A documentation comment can contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, the javadoc command inserts a comma (,) and space between names. In the latter case, the entire text is copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than a comma. See @author in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@author

{@code text}

Introduced in JDK 1.5

Equivalent to <code>{@literal}</code>.

Displays text in code font without interpreting the text as HTML markup or nested Javadoc tags. This enables you to use regular angle brackets (< and >) instead of the HTML entities (&lt; and &gt;) in documentation comments, such as in parameter types (<Object>), inequalities (3 < 4), or arrows (<-). For example, the documentation comment text {@code A<B>C} displayed in the generated HTML page unchanged as A<B>C. This means that the <B> is not interpreted as bold and is in code font. If you want the same functionality without the code font, then use the {@literal} tag.

@deprecated deprecated-text

Introduced in JDK 1.0

Adds a comment indicating that this API should no longer be used (even though it may continue to work). The javadoc command moves deprecated-text ahead of the main description, placing it in italics and preceding it with a bold warning: Deprecated. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field.

The first sentence of deprecated text should tell the user when the API was deprecated and what to use as a replacement. The javadoc command copies the first sentence to the summary section and index. Subsequent sentences can also explain why it was deprecated. You should include an {@link} tag (for Javadoc 1.2 or later) that points to the replacement API.

Use the @deprecated annotation tag to deprecate a program element. See How and When to Deprecate APIs at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/deprecation/deprecation.html

See also @deprecated in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@deprecated

{@docRoot}

Introduced in JDK 1.3

Represents the relative path to the generated document's (destination) root directory from any generated page. This tag is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common.

This {@docRoot} tag can be used both on the command line and in a documentation comment. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, and includes the text portion of any tag (such as the @return, @param and @deprecated tags).

  • On the command line, where the header, footer, or bottom are defined: javadoc -bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'.

    When you use the {@docRoot} tag this way in a make file, some makefile programs require a special way to escape for the brace {} characters. For example, the Inprise MAKE version 5.2 running on Windows requires double braces: {{@docRoot}}. It also requires double (rather than single) quotation marks to enclose arguments to options such as the -bottom option (with the quotation marks around the href argument omitted).

  • In a documentation comment:

    /**
 * See the <a href="{@docRoot}/copyright.html">Copyright</a>.
 */

    This tag is needed because the generated documents are in hierarchical directories, as deep as the number of subpackages. The expression: <a href="{@docRoot}/copyright.html"> resolves to <a href="../../copyright.html"> for java/lang/Object.java and <a href="../../../copyright.html"> for java/lang/ref/Reference.java.

@exception class-name description

Introduced in JDK 1.0

Identical to the @throws tag. See @throws class-name description.

{@inheritDoc}

Introduced in JDK 1.4

Inherits (copies) documentation from the nearest inheritable class or implementable interface into the current documentation comment at this tag's location. This enables you to write more general comments higher up the inheritance tree and to write around the copied text.

This tag is valid only in these places in a documentation comment:

  • In the main description block of a method. In this case, the main description is copied from a class or interface up the hierarchy.

  • In the text arguments of the @return, @param, and @throws tags of a method. In this case, the tag text is copied from the corresponding tag up the hierarchy.

See Method Comment Inheritance for a description of how comments are found in the inheritance hierarchy. Note that if this tag is missing, then the comment is or is not automatically inherited according to rules described in that section.

{@link package.class#member label}

Introduced in JDK 1.2

Inserts an inline link with a visible text label that points to the documentation for the specified package, class, or member name of a referenced class. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag, such as the @return, @param and @deprecated tags. See @link in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#{@link

This tag is similar to the @see tag. Both tags require the same references and accept the same syntax for package.class#member and label. The main difference is that the {@link} tag generates an inline link rather than placing the link in the See Also section. The {@link} tag begins and ends with braces to separate it from the rest of the inline text. If you need to use the right brace (}) inside the label, then use the HTML entity notation &#125;.

There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the main description part of any documentation comment or in the text portion of any tag, such as the @deprecated, @return or @param tags.

For example, here is a comment that refers to the getComponentAt(int, int) method:

Use the {@link #getComponentAt(int, int) getComponentAt} method.

From this code, the standard doclet generates the following HTML (assuming it refers to another class in the same package):

Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.

The previous line appears on the web page as:

Use the getComponentAt method.
{@linkplain package.class#member label}

Introduced in JDK 1.4

Behaves the same as the {@link} tag, except the link label is displayed in plain text rather than code font. Useful when the label is plain text. For example, Refer to {@linkplain add() the overridden method}. displays as: Refer to the overridden method.

{@literal text}

Introduced in JDK 1.5

Displays text without interpreting the text as HTML markup or nested Javadoc tags. This enables you to use angle brackets (< and >) instead of the HTML entities (&lt; and &gt;) in documentation comments, such as in parameter types (<Object>), inequalities (3 < 4), or arrows (<-). For example, the documentation comment text {@literal A<B>C} displays unchanged in the generated HTML page in your browser, as A<B>C. The <B> is not interpreted as bold (and it is not in code font). If you want the same functionality with the text in code font, then use the {@code} tag.

@param parameter-name description

Introduced in JDK 1.0

Adds a parameter with the specified parameter-name followed by the specified description to the Parameters section. When writing the documentation comment, you can continue the description onto multiple lines. This tag is valid only in a documentation comment for a method, constructor, or class. See @param in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@param

The parameter-name can be the name of a parameter in a method or constructor, or the name of a type parameter of a class, method, or constructor. Use angle brackets around this parameter name to specify the use of a type parameter.

Example of a type parameter of a class:

/**
 * @param <E> Type of element stored in a list
 */
public interface List<E> extends Collection<E> {
}

Example of a type parameter of a method:

/**
 * @param string  the string to be converted
 * @param type    the type to convert the string to
 * @param <T>     the type of the element
 * @param <V>     the value of the element
 */
<T, V extends T> V convert(String string, Class<T> type) {
}
@return description

Introduced in JDK 1.0

Adds a Returns section with the description text. This text should describe the return type and permissible range of values. This tag is valid only in a documentation comment for a method. See @return in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@return

@see reference

Introduced in JDK 1.0

Adds a See Also heading with a link or text entry that points to a reference. A documentation comment can contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations. The form is the most common. This tag is valid in any documentation comment: overview, package, class, interface, constructor, method, or field. For inserting an inline link within a sentence to a package, class, or member, see {@link}.

Form 1. The @see string tag form adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. The javadoc command distinguishes this from the previous cases by searching for a double quotation mark (") as the first character. For example, @see "The Java Programming Language" that generates the following text:

See Also:

"The Java Programming Language"

Form 2. The @see <a href="URL#value">label</a> form adds a link as defined by URL#value. The URL#value parameter is a relative or absolute URL. The javadoc command distinguishes this from other cases by searching for a less-than symbol (<) as the first character. For example, @see <a href="spec.html#section">Java Spec</a> generates the following link:

See Also:

Java Spec

Form 3. The @see package.class#member label form adds a link with a visible text label that points to the documentation for the specified name in the Java Language that is referenced. The label is optional. If the label is omitted, then the name appears instead as visible text, suitably shortened. Use the -noqualifier option to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the autogenerated visible text. See How a Name Appears.

In Java SE 1.2 only, the name but not the label automatically appears in <code> HTML tags. Starting with Java SE 1.2.2, the <code> tag is always included around the visible text, whether or not a label is used.

  • package.class#member is any valid program element name that is referenced, such as a package, class, interface, constructor, method or field name, except that the character ahead of the member name should be a number sign (#). The class represents any top-level or nested class or interface. The member represents any constructor, method, or field (not a nested class or interface). If this name is in the documented classes, then the javadoc command create a link to it. To create links to external referenced classes, use the -link option. Use either of the other two @see tag forms to refer to the documentation of a name that does not belong to a referenced class. See Specify a Name.

    Note: External referenced classes are classes that are not passed into the javadoc command on the command line. Links in the generated documentation to external referenced classes are called external references or external links. For example, if you run the javadoc command on only the java.awt package, then any class in java.lang, such as Object, is an external referenced class. Use the -link and -linkoffline options to link to external referenced classes. The source comments of external referenced classes are not available to the javadoc command run.

  • label is optional text that is visible as the link label. The label can contain white space. If label is omitted, then package.class.member appears, suitably shortened relative to the current class and package. See How a Name Appears.

  • A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces can be used between parameters in a method.

In the following example, an @see tag (in the Character class) refers to the equals method in the String class. The tag includes both arguments: the name String#equals(Object) and the label equals.

/**
 * @see String#equals(Object) equals
 */

The standard doclet produces HTML that is similar to:

<dl>
<dt><b>See Also:</b>
<dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a>
</dl>

The previous code looks similar to the following in a browser, where the label is the visible link text:

See Also:

equals

Specify a Name

This package.class#member name can be either fully qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If the name is less than fully qualified, then the javadoc command uses the standard Java compiler search order to find it. See Search Order for the @see Tag. The name can contain white space within parentheses, such as between method arguments.The advantage to providing shorter, partially qualified names is that they are shorter to type and there is less clutter in the source code. The following listing shows the different forms of the name, where Class can be a class or interface; Type can be a class, interface, array, or primitive; and method can be a method or constructor.

Typical forms for @see package.class#member
Referencing a member of the current class
@see #field
@see #method(Type, Type,...)
@see #method(Type argname, Type argname,...)
@see #constructor(Type, Type,...)
@see #constructor(Type argname, Type argname,...)

Referencing another class in the current or imported packages
@see Class#field
@see Class#method(Type, Type,...)
@see Class#method(Type argname, Type argname,...)
@see Class#constructor(Type, Type,...)
@see Class#constructor(Type argname, Type argname,...)
@see Class.NestedClass
@see Class

Referencing an element in another package (fully qualified)
@see package.Class#field
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type argname, Type argname,...)
@see package.Class#constructor(Type, Type,...)
@see package.Class#constructor(Type argname, Type argname,...)
@see package.Class.NestedClass
@see package.Class
@see package

Notes about the previous listing:

  • The first set of forms with no class or package causes the javadoc command to search only through the current class hierarchy. It finds a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search Items 13). It does not search the rest of the current package or other packages (search Items 45). See Search Order for the @see Tag.

  • If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, then the javadoc command still creates a link to the method. If this method is overloaded, then the javadoc command links to the first method its search encounters, which is unspecified.

  • Nested classes must be specified as outer.inner, not simply inner, for all forms.

  • As stated, the number sign (#), rather than a dot (.) separates a member from its class. This enables the javadoc command to resolve ambiguities, because the dot also separates classes, nested classes, packages, and subpackages. However, the javadoc command properly parses a dot when there is no ambiguity, but prints a warning to alert you.

Search Order for the @see Tag

The javadoc command processes an @see tag that appears in a source file, package file, or overview file. In the latter two files, you must fully qualify the name you supply with the @see tag. In a source file, you can specify a name that is fully qualified or partially qualified.

The following is the search order for the @see tag.

  1. The current class or interface.

  2. Any enclosing classes and interfaces searching the closest first.

  3. Any superclasses and superinterfaces, searching the closest first.

  4. The current package.

  5. Any imported packages, classes, and interfaces, searching in the order of the import statement.

The javadoc command continues to search recursively through Items 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it searches through the superclasses of E before the enclosing classes of E. In Items 4 and 5, the javadoc command does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In Item 5, the javadoc command searches in java.lang because that is imported by all programs.

When the javadoc command encounters an @see tag in a source file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would, except the javadoc command does not detect certain name space ambiguities because it assumes the source code is free of these errors. This search order is formally defined in the Java Language Specification. The javadoc command searches for that name through all related and imported classes and packages. In particular, it searches in this order:

  1. The current class or interface.

  2. Any enclosing classes and interfaces, searching the closest first.

  3. Any superclasses and superinterfaces, searching the closest first.

  4. The current package.

  5. Any imported packages, classes, and interfaces, searching in the order of the import statements.

The javadoc command does not necessarily look in subclasses, nor will it look in other packages even when their documentation is being generated in the same run. For example, if the @see tag is in the java.awt.event.KeyEvent class and refers to a name in the java.awt package, then the javadoc command does not look in that package unless that class imports it.

How a Name Appears

If label is omitted, then package.class.member appears. In general, it is suitably shortened relative to the current class and package. Shortened means the javadoc command displays only the minimum name necessary. For example, if the String.toUpperCase() method contains references to a member of the same class and to a member of a different class, then the class name is displayed only in the latter case, as shown in the following listing. Use the -noqualifier option to globally remove the package names.

Type of reference: The @see tag refers to a member of the same class, same package
Example in: @see String#toLowerCase()
Appears as: toLowerCase() - omits the package and class names

Type of reference: The @see tag refers to a member of a different class, same package
Example in: @see Character#toLowerCase(char)
Appears as: Character.toLowerCase(char) - omits the package name, includes the class name

Type of reference: The @see tag refers to a member of a different class, different package
Example in: @see java.io.File#exists()
Appears as: java.io.File.exists() - includes the package and class names

Examples of the @see Tag

The comment to the right shows how the name appears when the @see tag is in a class in another package, such as java.applet.Applet. See @see in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@see

                                            See also:
@see java.lang.String                   //  String
@see java.lang.String The String class  //  The String class
@see String                             //  String
@see String#equals(Object)              //  String.equals(Object)
@see String#equals                      //  String.equals(java.lang.Object)
@see java.lang.Object#wait(long)        //  java.lang.Object.wait(long)
@see Character#MAX_RADIX                //  Character.MAX_RADIX
@see <a href="spec.html">Java Spec</a>  //  Java Spec
@see "The Java Programming Language"    //  "The Java Programming Language"

Note: You can extend the @see tag to link to classes not being documented with the -link option.

@serial field-description | include | exclude

Introduced in JDK 1.2

Used in the documentation comment for a default serializable field. See Documenting Serializable Fields and Data for a Class at
http://docs.oracle.com/javase/8/docs/platform/serialization/spec/serial-arch.html#5251

See also Oracle's Criteria for Including Classes in the Serialized Form Specification at
http://www.oracle.com/technetwork/java/javase/documentation/serialized-criteria-137781.html

An optional field-description should explain the meaning of the field and list the acceptable values. When needed, the description can span multiple lines. The standard doclet adds this information to the serialized form page. See Cross-Reference Pages.

If a serializable field was added to a class after the class was made serializable, then a statement should be added to its main description to identify at which version it was added.

The include and exclude arguments identify whether a class or package should be included or excluded from the serialized form page. They work as follows:

  • A public or protected class that implements Serializable is included unless that class (or its package) is marked with the @serial exclude tag.

  • A private or package-private class that implements Serializable is excluded unless that class (or its package) is marked with the @serial include tag.

For example, the javax.swing package is marked with the @serial exclude tag in package.html or package-info.java. The public class java.security.BasicPermission is marked with the @serial exclude tag. The package-private class java.util.PropertyPermissionCollection is marked with the @serial include tag.

The @serial tag at the class level overrides the @serial tag at the package level.

@serialData data-description

Introduced in JDK 1.2

Uses the data description value to document the types and order of data in the serialized form. This data includes the optional data written by the writeObject method and all data (including base classes) written by the Externalizable.writeExternal method.

The @serialData tag can be used in the documentation comment for the writeObject, readObject, writeExternal, readExternal, writeReplace, and readResolve methods.

@serialField field-name field-type field-description

Introduced in JDK 1.2

Documents an ObjectStreamField component of the serialPersistentFields member of a Serializable class. Use one @serialField tag for each ObjectStreamField component.

@since since-text

Introduced in JDK 1.1

Adds a Since heading with the specified since-text value to the generated documentation. The text has no special internal structure. This tag is valid in any documentation comment: overview, package, class, interface, constructor, method, or field. This tag means that this change or feature has existed since the software release specified by the since-text value, for example: @since 1.5.

For Java platform source code, the @since tag indicates the version of the Java platform API specification, which is not necessarily when the source code was added to the reference implementation. Multiple @since tags are allowed and are treated like multiple @author tags. You could use multiple tags when the program element is used by more than one API.

@throws class-name description

Introduced in JDK 1.2

Behaves the same as the @exception tag. See @throws in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@exception

The @throws tag adds a Throws subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that might be thrown by the method. This tag is valid only in the documentation comment for a method or constructor. If this class is not fully specified, then the javadoc command uses the search order to look up this class. Multiple @throws tags can be used in a specified documentation comment for the same or different exceptions. See Search Order for the @see Tag.

To ensure that all checked exceptions are documented, when an @throws tag does not exist for an exception in the throws clause, the javadoc command adds that exception to the HTML output (with no description) as though it were documented with the @throws tag.

The @throws documentation is copied from an overridden method to a subclass only when the exception is explicitly declared in the overridden method. The same is true for copying from an interface method to an implementing method. You can use the {@inheritDoc} tag to force the @throws tag to inherit documentation.

{@value package.class#field}

Introduced in JDK 1.4

Displays constant values. When the {@value} tag is used without an argument in the documentation comment of a static field, it displays the value of that constant:

/**
 * The value of this constant is {@value}.
 */
public static final String SCRIPT_START = "<script>"

When used with the argument package.class#field in any documentation comment, he {@value} tag displays the value of the specified constant:

/**
 * Evaluates the script starting with {@value #SCRIPT_START}.
 */
public String evalScript(String script) {}

The argument package.class#field takes a form similar to that of the @see tag argument, except that the member must be a static field.

The values of these constants are also displayed in Constant Field Values at
http://docs.oracle.com/javase/8/docs/api/constant-values.html

@version version-text

Introduced in JDK 1.0

Adds a Version subheading with the specified version-text value to the generated documents when the -version option is used. This tag is intended to hold the current release number of the software that this code is part of, as opposed to the @since tag, which holds the release number where this code was introduced. The version-text value has no special internal structure. See @version in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@version

A documentation comment can contain multiple @version tags. When it makes sense, you can specify one release number per @version tag or multiple release numbers per tag. In the former case, the javadoc command inserts a comma (,) and a space between the names. In the latter case, the entire text is copied to the generated document without being parsed. Therefore, you can use multiple names per line when you want a localized name separator other than a comma.

Where Tags Can Be Used

The following sections describe where tags can be used. Note that the following tags can be used in all documentation comments: @see, @since, @deprecated, {@link}, {@linkplain}, and {@docroot}.

Overview Tags

Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html). Similar to any other documentation comments, these tags must appear after the main description

Note: The {@link} tag has a bug in overview documents in Java SE 1.2. The text appears correctly but has no link. The {@docRoot} tag does not currently work in overview documents.

The overview tags are the following:

@see reference || @since since-text || @serialField field-name field-type field-description || @author name-text || @version version-text || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Package Tags

Package tags are tags that can appear in the documentation comment for a package, that resides in the source file named package.html or package-info.java. The @serial tag can only be used here with the include or exclude argument.

The package tags are the following:

@see reference || @since since-text || @serial field-description | include | exclude || @author name-text || @version version-text || {@linkplain package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Class and Interface Tags

The following are tags that can appear in the documentation comment for a class or interface. The @serial tag can only be used within the documentation for a class or interface with an include or exclude argument.

@see reference || @since since-text || @deprecated deprecated-text || @serial field-description | include | exclude || @author name-text || @version version-text || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} ||

Class comment example:

/**
 * A class representing a window on the screen.
 * For example:
 * <pre>
 *    Window win = new Window(parent);
 *    win.show();
 * </pre>
 *
 * @author  Sami Shaio
 * @version 1.13, 06/08/06
 * @see     java.awt.BaseWindow
 * @see     java.awt.Button
 */
class Window extends BaseWindow {
   ...
}

Field Tags

These tags can appear in fields:

@see reference || @since since-text || @deprecated deprecated-text || @serial field-description | include | exclude || @serialField field-name field-type field-description || {@link package.class#member label} || {@linkplain package.class#member label} || {@docRoot} || {@value package.class#field}

Field comment example:

    /**
     * The X-coordinate of the component.
     *
     * @see #getLocation()
     */
    int x = 1263732;

Constructor and Method Tags

The following tags can appear in the documentation comment for a constructor or a method, except for the @return tag, which cannot appear in a constructor, and the {@inheritDoc} tag, which has restrictions.

@see reference || @since since-text || @deprecated deprecated-text || @param parameter-name description || @return description || @throws class-name description || @exception class-name description || @serialData data-description || {@link package.class#member label} || {@linkplain package.class#member label} || {@inheritDoc} || {@docRoot}

Note: The @serialData tag can only be used in the documentation comment for the writeObject, readObject, writeExternal, readExternal, writeReplace, and readResolve methods.

Method comment example:

/**
     * Returns the character at the specified index. An index
     * ranges from <code>0</code> to <code>length() - 1</code>
     *
     * @param     index the index of the desired character.
     * @return    the desired character.
     * @exception StringIndexOutOfRangeException
     *              if the index is not in the range <code>0</code>
     *              to <code>length()-1</code>
     * @see       java.lang.Character#charValue()
     */
    public char charAt(int index) {
       ...
    }

Options

The javadoc command uses doclets to determine its output. The javadoc command uses the default standard doclet unless a custom doclet is specified with the -doclet option. The javadoc command provides a set of command-line options that can be used with any doclet. These options are described in Javadoc Options. The standard doclet provides an additional set of command-line options that are described in Standard Doclet Options. All option names are not case-sensitive, but their arguments are case-sensitive.

  • See also Javadoc Options

  • See also Standard Doclet Options

The options are:

-1.1 || -author || -bootclasspath classpathlist || -bottom text || -breakiterator || -charset name || -classpath classpathlist || -d directory || -docencoding name || -docfilesubdirs || -doclet class || -docletpath classpathlist || -doctitle title || -encoding || -exclude packagename1:packagename2:... || -excludedocfilessubdir name1:name2 || -extdirs dirist || -footer footer || -group groupheading packagepattern:packagepattern || -header header || -help || -helpfile path\filename || -Jflag || -keywords || -link extdocURL || -linkoffline extdocURL packagelistLoc || -linksource || -locale language_country_variant || -nocomment || -nodeprecated || -nodeprecatedlist || -nohelp || -noindex || -nonavbar || -noqualifier all | packagename1:packagename2... || -nosince || -notimestamp || -notree || -overview path\filename || -package || -private || -protected || -public || -quiet || -serialwarn || -source release || -sourcepath sourcepathlist || -sourcetab tablength || -splitindex || -stylesheet path\filename || -subpackages package1:package2:... || -tag tagname:Xaoptcmf:"taghead" || -taglet class || -tagletpath tagletpathlist || -title title || -top || -use || -verbose || -version || -windowtitle title

The following options are the core Javadoc options that are available to all doclets. The standard doclet provides the rest of the doclets: -bootclasspath, -breakiterator, -classpath, -doclet, -docletpath, -encoding, -exclude, -extdirs, -help, -locale, -overview, -package, -private, -protected, -public, -quiet, -source, -sourcepath, -subpackages, and -verbose.

Javadoc Options

-overview path\filename

Specifies that the javadoc command should retrieve the text for the overview documentation from the source file specified by the path\filename and place it on the Overview page (overview-summary.html). The path\filename is relative to the current directory.

While you can use any name you want for the filename value and place it anywhere you want for the path, it is typical to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, because the -sourcepath option points to this file.

For example, if the source tree for the java.lang package is \src\classes\java\lang\, then you could place the overview file at \src\classes\overview.html

See Real-World Examples.

For information about the file specified by path\filename, see Overview Comment Files.

The overview page is created only when you pass two or more package names to the javadoc command. For a further explanation, see HTML Frames. The title on the overview page is set by -doctitle.

-Xdoclint:(all|none|[-]<group>)

Reports warnings for bad references, lack of accessibility and missing Javadoc comments, and reports errors for invalid Javadoc syntax and missing HTML tags.

This option enables the javadoc command to check for all documentation comments included in the generated output. As always, you can select which items to include in the generated output with the standard options -public, -protected, -package and -private.

When the -Xdoclint is enabled, it reports issues with messages similar to the javac command. The javadoc command prints a message, a copy of the source line, and a caret pointing at the exact position where the error was detected. Messages may be either warnings or errors, depending on their severity and the likelihood to cause an error if the generated documentation were run through a validator. For example, bad references or missing Javadoc comments do not cause the javadoc command to generate invalid HTML, so these issues are reported as warnings. Syntax errors or missing HTML end tags cause the javadoc command to generate invalid output, so these issues are reported as errors.

By default, the -Xdoclint option is enabled. Disable it with the option -Xdoclint:none.

Change what the -Xdoclint option reports with the following options:

  • -Xdoclint
    none     : disable the -Xdoclint option

  • -Xdoclint
    group : enable group checks

  • -Xdoclint
    all     : enable all groups of checks

  • -Xdoclint
    all,    -group : enable all except group checks

The variable group has one of the following values:

  • accessibility : Checks for the issues to be detected by an accessibility checker (for example, no caption or summary attributes specified in a <table> tag).

  • html : Detects high-level HTML issues, like putting block elements inside inline elements, or not closing elements that require an end tag. The rules are derived from the HTML 4.01 Specification. This type of check enables the javadoc command to detect HTML issues that many browsers might accept.

  • missing : Checks for missing Javadoc comments or tags (for example, a missing comment or class, or a missing @return tag or similar tag on a method).

  • reference : Checks for issues relating to the references to Java API elements from Javadoc tags (for example, item not found in @see , or a bad name after @param).

  • syntax : Checks for low level issues like unescaped angle brackets (< and >) and ampersands (&) and invalid Javadoc tags.

You can specify the -Xdoclint option multiple times to enable the option to check errors and warnings in multiple categories. Alternatively, you can specify multiple error and warning categories by using the preceding options. For example, use either of the following commands to check for the HTML, syntax, and accessibility issues in the file filename.

javadoc -Xdoclint:html -Xdoclint:syntax -Xdoclint:accessibility filename
javadoc -Xdoclint:html,syntax,accessibility filename

Note: The javadoc command does not guarantee the completeness of these checks. In particular, it is not a full HTML compliance checker. The goal of the -Xdoclint option is to enable the javadoc command to report majority of common errors.

The javadoc command does not attempt to fix invalid input, it just reports it.

-public

Shows only public classes and members.

-protected

Shows only protected and public classes and members. This is the default.

-package

Shows only package, protected, and public classes and members.

-private

Shows all classes and members.

-help

Displays the online help, which lists all of the javadoc and doclet command-line options.

-doclet class

Specifies the class file that starts the doclet used in generating the documentation. Use the fully qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, then the javadoc command uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

-docletpath classpathlist

Specifies the path to the doclet starting class file (specified with the -doclet option) and any JAR files it depends on. If the starting class file is in a JAR file, then this option specifies the path to that JAR file. You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or JAR files, then they should be separated with a colon (:) on Oracle Solaris and a semi-colon (;) on Windows. This option is not necessary when the doclet starting class is already in the search path. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

-1.1

Removed from Javadoc 1.4 with no replacement. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, then use Javadoc 1.2 or 1.3 instead.

-source release

Specifies the release of source code accepted. The following values for the release parameter are allowed. Use the value of release that corresponds to the value used when you compile code with the javac command.

  • Release Value: 1.5. The javadoc command accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior when the -source option is not used.

  • Release Value: 1.4. The javadoc command accepts code containing assertions, which were introduced in JDK 1.4.

  • Release Value: 1.3. The javadoc command does not support assertions, generics, or other language features introduced after JDK 1.3.

-sourcepath sourcepathlist

Specifies the search paths for finding source files when passing package names or the -subpackages option into the javadoc command. Separate multiple paths with a. semicolon (;). The javadoc command searches all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented, but whose comments are inherited by the source files being documented.

You can use the -sourcepath option only when passing package names into the javadoc command. This will not locate source files passed into the javadoc command. To locate source files, change to that directory or include the path ahead of each file, as shown at Document One or More Classes. If you omit -sourcepath, then the javadoc command uses the class path to find the source files (see -classpath). The default -sourcepath is the value of class path. If -classpath is omitted and you pass package names into the javadoc command, then the javadoc command searches in the current directory and subdirectories for the source files.

Set sourcepathlist to the root directory of the source tree for the package you are documenting.

For example, suppose you want to document a package called com.mypackage, whose source files are located at:\user\src\com\mypackage\*.java . Specify the sourcepath to \user\src, the directory that contains com\mypackage, and then supply the package name as follows:

javadoc -sourcepath C:\user\src com.mypackage

Notice that if you concatenate the value of sourcepath and the package name together and change the dot to a backslash (\), then you have the full path to the package:

\user\src\com\mypackage.

To point to two source paths:

javadoc -sourcepath \user1\src;\user2\src com.mypackage
-classpath classpathlist

Specifies the paths where the javadoc command searches for referenced classes These are the documented classes plus any classes referenced by those classes. Separate multiple paths with a semicolon (;). The javadoc command searches all subdirectories of the specified paths. Follow the instructions in the class path documentation for specifying the classpathlist value.

If you omit -sourcepath, then the javadoc command uses -classpath to find the source files and class files (for backward compatibility). If you want to search for source and class files in separate paths, then use both -sourcepath and -classpath.

For example, if you want to document com.mypackage, whose source files reside in the directory \user\src\com\mypackage, and if this package relies on a library in , \user\lib, then you would use the following command:

javadoc -sourcepath \user\lib -classpath \user\src com.mypackage

Similar to other tools, if you do not specify -classpath, then the javadoc command uses the CLASSPATH environment variable when it is set. If both are not set, then the javadoc command searches for classes from the current directory.

For an in-depth description of how the javadoc command uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

A class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR.

For example, if directory mydir contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of JAR files is unspecified. All JAR files in the specified directory including hidden files are included in the list. A class path entry that consists of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable is similarly expanded. Any class path wildcard expansion occurs before the Java Virtual Machine (JVM) starts. No Java program ever sees unexpanded wild cards except by querying the environment, for example, by calling System.getenv("CLASSPATH").

-subpackages package1:package2:...

Generates documentation from source files in the specified packages and recursively in their subpackages. This option is useful when adding new subpackages to the source code because they are automatically included. Each package argument is any top-level subpackage (such as java) or fully qualified package (such as javax.swing) that does not need to contain source files. Arguments are separated by colons on all operating systems. Wild cards are not allowed. Use -sourcepath to specify where to find the packages. This option does not process source files that are in the source tree but do not belong to the packages. See Process Source Files.

For example, the following command generates documentation for packages named java and javax.swing and all of their subpackages.

javadoc -d docs -sourcepath \user\src -subpackages java:javax.swing
-exclude packagename1:packagename2:...

Unconditionally excludes the specified packages and their subpackages from the list formed by -subpackages. It excludes those packages even when they would otherwise be included by some earlier or later -subpackages option.

The following example would include java.io, java.util, and java.math (among others), but would exclude packages rooted at java.net and java.lang. Notice that this example excludes java.lang.ref, which is a subpackage of java.lang.

javadoc -sourcepath \user\src -subpackages java -exclude
    java.net:java.lang
-bootclasspath classpathlist

Specifies the paths where the boot classes reside. These are typically the Java platform classes. The bootclasspath is part of the search path the javadoc command uses to look up source and class files. For more information, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Separate directories in the classpathlist parameters with semicolons (;) for Windows and colons (:) for Oracle Solaris.

-extdirs dirist

Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs option is part of the search path the javadoc command uses to look up source and class files. See the -classpath option for more information. Separate directories in dirlist with semicolons (;) for Windows and colons (:) for Oracle Solaris.

-verbose

Provides more detailed messages while the javadoc command runs. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages that specify the number of milliseconds to parse each Java source file.

-quiet

Shuts off messages so that only the warnings and errors appear to make them easier to view. It also suppresses the version string.

-breakiterator

Uses the internationalized sentence boundary of java.text.BreakIterator to determine the end of the first sentence in the main description of a package, class, or member for English. All other locales already use the BreakIterator class, rather than an English language, locale-specific algorithm. The first sentence is copied to the package, class, or member summary and to the alphabetic index. From JDK 1.2 and later, the BreakIterator class is used to determine the end of a sentence for all languages except for English. Therefore, the -breakiterator option has no effect except for English from 1.2 and later. English has its own default algorithm:

  • English default sentence-break algorithm. Stops at a period followed by a space or an HTML block tag, such as <P>.

  • Breakiterator sentence-break algorithm. Stops at a period, question mark, or exclamation point followed by a space when the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but will not handle "Mr. Smith"). The -breakiterator option does not stop at HTML tags or sentences that begin with numbers or symbols. The algorithm stops at the last period in ../filename, even when embedded in an HTML tag.

In Java SE 1.5 the -breakiterator option warning messages are removed, and the default sentence-break algorithm is unchanged. If you have not modified your source code to eliminate the -breakiterator option warnings in Java SE 1.4.x, then you do not have to do anything. The warnings go away starting with Java SE 1.5.0.

-locale language_country_variant

Specifies the locale that the javadoc command uses when it generates documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

Note: The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars appear in English. This is the only command-line option that depends on order. See Standard Doclet Options.

Specifying a locale causes the javadoc command to choose the resource files of that locale for messages such as strings in the navigation bar, headings for lists and tables, help file contents, comments in the stylesheet.css file, and so on. It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. The -locale option does not determine the locale of the documentation comment text specified in the source files of the documented classes.

-encoding

Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, then the platform default converter is used. See also the -docencoding name and -charset name options.

-Jflag

Passes flag directly to the Java Runtime Environment (JRE) that runs the javadoc command. For example, if you must ensure that the system sets aside 32 MB of memory in which to process the generated documentation, then you would call the -Xmx option as follows: javadoc -J-Xmx32m -J-Xms32m com.mypackage. Be aware that -Xms is optional because it only sets the size of initial memory, which is useful when you know the minimum amount of memory required.

There is no space between the J and the flag.

Use the -version option to find out what version of the javadoc command you are using. The version number of the standard doclet appears in its output stream. See Running the Javadoc Command.

javadoc -J-version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

Standard Doclet Options

-d directory

Specifies the destination directory where the javadoc command saves the generated HTML files. If you omit the -d option, then the files are saved to the current directory. The directory value can be absolute or relative to the current working directory. As of Java SE 1.4, the destination directory is automatically created when the javadoc command runs.

For example, the following command generates the documentation for the package com.mypackage and saves the results in the \user\doc\ directory: javadoc -d \user\doc\ com.mypackage.

-use

Includes one Use page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the specified class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C. For example, you can look at the Use page for the String type. Because the getName method in the java.awt.Font class returns type String, the getName method uses String and so the getName method appears on the Use page for String.This documents only uses of the API, not the implementation. When a method uses String in its implementation, but does not take a string as an argument or return a string, that is not considered a use of String.To access the generated Use page, go to the class or package and click the Use link in the navigation bar.

-version

Includes the @version text in the generated docs. This text is omitted by default. To find out what version of the javadoc command you are using, use the -J-version option.

-author

Includes the @author text in the generated docs.

-splitindex

Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical symbols.

-windowtitle title

Specifies the title to be placed in the HTML <title> tag. The text specified in the title tag appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags because the browser does not interpret them correctly. Use escape characters on any internal quotation marks within the title tag. If the -windowtitle option is omitted, then the javadoc command uses the value of the -doctitle option for the -windowtitle option. For example, javadoc -windowtitle "Java SE Platform" com.mypackage.

-doctitle title

Specifies the title to place near the top of the overview summary file. The text specified in the title tag is placed as a centered, level-one heading directly beneath the top navigation bar. The title tag can contain HTML tags and white space, but when it does, you must enclose the title in quotation marks. Internal quotation marks within the title tag must be escaped. For example, javadoc -header "<b>Java Platform </b><br>v1.4" com.mypackage.

-title title

No longer exists. It existed only in Beta releases of Javadoc 1.2. It was renamed to -doctitle. This option was renamed to make it clear that it defines the document title, rather than the window title.

-header header

Specifies the header text to be placed at the top of each output file. The header is placed to the right of the upper navigation bar. The header can contain HTML tags and white space, but when it does, the header must be enclosed in quotation marks. Use escape characters for internal quotation marks within a header. For example, javadoc -header "<b>Java Platform </b><br>v1.4" com.mypackage.

-footer footer

Specifies the footer text to be placed at the bottom of each output file. The footer value is placed to the right of the lower navigation bar. The footer value can contain HTML tags and white space, but when it does, the footer value must be enclosed in quotation marks. Use escape characters for any internal quotation marks within a footer.

-top

Specifies the text to be placed at the top of each output file.

-bottom text

Specifies the text to be placed at the bottom of each output file. The text is placed at the bottom of the page, underneath the lower navigation bar. The text can contain HTML tags and white space, but when it does, the text must be enclosed in quotation marks. Use escape characters for any internal quotation marks within text.

-link extdocURL

Creates links to existing Javadoc-generated documentation of externally referenced classes. The extdocURL argument is the absolute or relative URL of the directory that contains the external Javadoc-generated documentation you want to link to. You can specify multiple -link options in a specified javadoc command run to link to multiple documents.

The package-list file must be found in this directory (otherwise, use the -linkoffline option). The javadoc command reads the package names from the package-list file and links to those packages at that URL. When the javadoc command runs, the extdocURL value is copied into the <A HREF> links that are created. Therefore, extdocURL must be the URL to the directory, and not to a file. You can use an absolute link for extdocURL to enable your documents to link to a document on any web site, or you can use a relative link to link only to a relative location. If you use a relative link, then the value you pass in should be the relative path from the destination directory (specified with the -d option) to the directory containing the packages being linked to.When you specify an absolute link, you usually use an HTTP link. However, if you want to link to a file system that has no web server, then you can use a file link. Use a file link only when everyone who wants to access the generated documentation shares the same file system.In all cases, and on all operating systems, use a slash as the separator, whether the URL is absolute or relative, and http: or file: as specified in the URL Memo: Uniform Resource Locators at
http://www.ietf.org/rfc/rfc1738.txt

-link  http://<host>/<directory>/<directory>/.../<name>
-link file://<host>/<directory>/<directory>/.../<name>
-link <directory>/<directory>/.../<name>

Differences between the -linkoffline and -link options

Use the -link option in the following cases:

  • When you use a relative path to the external API document.

  • When you use an absolute URL to the external API document if your shell lets you open a connection to that URL for reading.

Use the -linkoffline option when you use an absolute URL to the external API document, if your shell does not allow a program to open a connection to that URL for reading. This can occur when you are behind a firewall and the document you want to link to is on the other side.

Example 1Absolute Link to External Documents

Use the following command if you want to link to the java.lang, java.io and other Java platform packages, shown at
http://docs.oracle.com/javase/8/docs/api/index.html

javadoc -link http://docs.oracle.com/javase/8/docs/api/ com.mypackage

The command generates documentation for the package com.mypackage with links to the Java SE packages. The generated documentation contains links to the Object class, for example, in the class trees. Other options, such as the -sourcepath and -d options, are not shown.

Example 2Relative Link to External Documents

In this example, there are two packages with documents that are generated in different runs of the javadoc command, and those documents are separated by a relative path. The packages are com.apipackage, an API, and com.spipackage, an Service Provide Interface (SPI). You want the documentation to reside in docs/api/com/apipackage and docs/spi/com/spipackage. Assuming that the API package documentation is already generated, and that docs is the current directory, you document the SPI package with links to the API documentation by running: javadoc -d ./spi -link ../api com.spipackage.

Notice the -link option is relative to the destination directory (docs/spi).

Notes

The -link option lets you link to classes referenced to by your code, but not documented in the current javadoc command run. For these links to go to valid pages, you must know where those HTML pages are located and specify that location with extdocURL. This allows third-party documentation to link to java.* documentation at
http://docs.oracle.com.Omit the -link option when you want the javadoc command to create links only to APIs within the documentation it is generating in the current run. Without the -link option, the javadoc command does not create links to documentation for external references because it does not know whether or where that documentation exists.The -link option can create links in several places in the generated documentation. See Process Source Files. Another use is for cross-links between sets of packages: Execute the javadoc command on one set of packages, then run the javadoc command again on another set of packages, creating links both ways between both sets.

How to Reference a Class

For a link to an externally referenced class to appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an import statement or in a declaration. Here are examples of how the class java.io.File can be referenced:

In any kind of import statement. By wildcard import, import explicitly by name, or automatically import for java.lang.*.

In Java SE 1.3.n and 1.2.n, only an explicit import by name works. A wildcard import statement does not work, nor does the automatic import java.lang.*.

In a declaration: void mymethod(File f) {}

The reference can be in the return type or parameter type of a method, constructor, field, class, or interface, or in an implements, extends, or throws statement.

An important corollary is that when you use the -link option, there can be many links that unintentionally do not appear due to this constraint. The text would appear without being a link. You can detect these by the warnings they emit. The simplest way to properly reference a class and add the link would be to import that class.

Package List

The -link option requires that a file named package-list, which is generated by the javadoc command, exists at the URL you specify with the -link option. The package-list file is a simple text file that lists the names of packages documented at that location. In the earlier example, the javadoc command searches for a file named package-list at the specified URL, reads in the package names, and links to those packages at that URL.

For example, the package list for the Java SE API is located at
http://docs.oracle.com/javase/8/docs/api/package-list

The package list starts as follows:

java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
and so on ....

When javadoc is run without the -link option and encounters a name that belongs to an externally referenced class, it prints the name with no link. However, when the -link option is used, the javadoc command searches the package-list file at the specified extdocURL location for that package name. When it finds the package name, it prefixes the name with extdocURL.

For there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The javadoc command does not check that these pages exist, but only that the package-list exists.

Multiple Links

You can supply multiple -link options to link to any number of externally generated documents. Javadoc 1.2 has a known bug that prevents you from supplying more than one -link options. This was fixed in Javadoc 1.2.2. Specify a different link option for each external document to link to javadoc -link extdocURL1 -link extdocURL2 ... -link extdocURLn com.mypackage where extdocURL1, extdocURL2, ... extdocURLn point respectively to the roots of external documents, each of which contains a file named package-list.

Cross Links

Note that bootstrapping might be required when cross-linking two or more documents that were previously generated. If package-list does not exist for either document when you run the javadoc command on the first document, then the package-list does not yet exist for the second document. Therefore, to create the external links, you must regenerate the first document after you generate the second document.

In this case, the purpose of first generating a document is to create its package-list (or you can create it by hand if you are certain of the package names). Then, generate the second document with its external links. The javadoc command prints a warning when a needed external package-list file does not exist.

-linkoffline extdocURL packagelistLoc

This option is a variation of the -link option. They both create links to Javadoc-generated documentation for externally referenced classes. Use the -linkoffline option when linking to a document on the web when the javadoc command cannot access the document through a web connection. Use the -linkoffline option when package-list file of the external document is not accessible or does not exist at the extdocURL location, but does exist at a different location that can be specified by packageListLoc (typically local). If extdocURL is accessible only on the World Wide Web, then the -linkoffline option removes the constraint that the javadoc command must have a web connection to generate documentation. Another use is as a work-around to update documents: After you have run the javadoc command on a full set of packages, you can run the javadoc command again on a smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples follow. The -linkoffline option takes two arguments. The first is for the string to be embedded in the <a href> links, and the second tells the -linkoffline option where to find package-list:

  • The extdocURL value is the absolute or relative URL of the directory that contains the external Javadoc-generated documentation you want to link to. When relative, the value should be the relative path from the destination directory (specified with the -d option) to the root of the packages being linked to. For more information, see extdocURL in the -link option.

  • The packagelistLoc value is the path or URL to the directory that contains the package-list file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. When relative, make it relative to the current directory from where the javadoc command was run. Do not include the package-list file name.

    You can specify multiple -linkoffline options in a specified javadoc command run. Before Javadoc 1.2.2, the -linkfile options could be specified once.

Absolute Links to External Documents

You might have a situation where you want to link to the java.lang, java.io and other Java SE packages at
http://docs.oracle.com/javase/8/docs/api/index.html

However, your shell does not have web access. In this case, do the following:

  1. Open the package-list file in a browser at http://docs.oracle.com/javase/8/docs/api/package-list

  2. Save the file to a local directory, and point to this local copy with the second argument, packagelistLoc. In this example, the package list file was saved to the current directory (.).

The following command generates documentation for the package com.mypackage with links to the Java SE packages. The generated documentation will contain links to the Object class, for example, in the class trees. Other necessary options, such as -sourcepath, are not shown.

javadoc -linkoffline http://docs.oracle.com/javase/8/docs/api/ .  com.mypackage

Relative Links to External Documents

It is not very common to use -linkoffline with relative paths, for the simple reason that the -link option is usually enough. When you use the -linkoffline option, the package-list file is usually local, and when you use relative links, the file you are linking to is also local, so it is usually unnecessary to give a different path for the two arguments to the -linkoffline option When the two arguments are identical, you can use the -link option.

Create a package-list File Manually

If a package-list file does not exist yet, but you know what package names your document will link to, then you can manually create your own copy of this file and specify its path with packagelistLoc. An example would be the previous case where the package list for com.spipackage did not exist when com.apipackage was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating package-list files for packages generated with Javadoc 1.0 or 1.1, where package-list files were not generated. Similarly, two companies can share their unpublished package-list files so they can release their cross-linked documentation simultaneously.

Link to Multiple Documents

You can include the -linkoffline option once for each generated document you want to refer to:

javadoc -linkoffline extdocURL1 packagelistLoc1 -linkoffline extdocURL2
packagelistLoc2 ...

Update Documents

You can also use the -linkoffline option when your project has dozens or hundreds of packages. If you have already run the javadoc command on the entire source tree, then you can quickly make small changes to documentation comments and rerun the javadoc command on a portion of the source tree. Be aware that the second run works properly only when your changes are to documentation comments and not to declarations. If you were to add, remove, or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, Use page, and other places.

First, create a new destination directory, such as update, for this new small run. In this example, the original destination directory is named html. In the simplest example, change directory to the parent of html. Set the first argument of the -linkoffline option to the current directory (.) and set the second argument to the relative path to html, where it can find package-list and pass in only the package names of the packages you want to update:

javadoc -d update -linkoffline . html com.mypackage

When the javadoc command completes, copy these generated class pages in update\com\package (not the overview or index) to the original files in html\com\package.

-linksource

Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation. Links are created for classes, interfaces, constructors, methods, and fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes.

This option exposes all private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, regardless of the -public, -package, -protected, and -private options. Unless you also use the -private option, not all private classes or interfaces are accessible through links.

Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the Button class would be on the word Button:

public class Button extends Component implements Accessible

The link to the source code of the getLabel method in the Button class is on the word getLabel:

public String getLabel()
-group groupheading packagepattern:packagepattern

Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different -group option. The groups appear on the page in the order specified on the command line. Packages are alphabetized within a group. For a specified -group option, the packages matching the list of packagepattern expressions appear in a table with the heading groupheading.

  • The groupheading can be any text and can include white space. This text is placed in the table heading for the group.

  • The packagepattern value can be any package name at the start of any package name followed by an asterisk (*). The asterisk is the only wildcard allowed and means match any characters. Multiple patterns can be included in a group by separating them with colons (:). If you use an asterisk in a pattern or pattern list, then the pattern list must be inside quotation marks, such as "java.lang*:java.util".

When you do not supply a -group option, all packages are placed in one group with the heading Packages and appropriate subheadings. If the subheadings do not include all documented packages (all groups), then the remaining packages appear in a separate group with the subheading Other Packages.

For example, the following javadoc command separates the three documented packages into Core, Extension, and Other Packages. The trailing dot (.) does not appear in java.lang*. Including the dot, such as java.lang.* omits the java.lang package.

javadoc -group "Core Packages" "java.lang*:java.util"
        -group "Extension Packages" "javax.*"
        java.lang java.lang.reflect java.util javax.servlet java.new

Core Packages

java.lang

java.lang.reflect

java.util

Extension Packages

javax.servlet

Other Packages

java.new

-nodeprecated

Prevents the generation of any deprecated API in the documentation. This does what the -nodeprecatedlist option does, and it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code when you do not want to be distracted by the deprecated code.

-nodeprecatedlist

Prevents the generation of the file that contains the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page. The javadoc command continues to generate the deprecated API throughout the rest of the document. This is useful when your source code contains no deprecated APIs, and you want to make the navigation bar cleaner.

-nosince

Omits from the generated documents the Since sections associated with the @since tags.

-notree

Omits the class/interface hierarchy pages from the generated documents. These are the pages you reach using the Tree button in the navigation bar. The hierarchy is produced by default.

-noindex

Omits the index from the generated documents. The index is produced by default.

-nohelp

Omits the HELP link in the navigation bars at the top and bottom of each page of output.

-nonavbar

Prevents the generation of the navigation bar, header, and footer, that are usually found at the top and bottom of the generated pages. The -nonavbar option has no affect on the -bottom option. The -nonavbar option is useful when you are interested only in the content and have no need for navigation, such as when you are converting the files to PostScript or PDF for printing only.

-helpfile path\filename

Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to. Without this option, the javadoc command creates a help file help-doc.html that is hard-coded in the javadoc command. This option lets you override the default. The file name can be any name and is not restricted to help-doc.html. The javadoc command adjusts the links in the navigation bar accordingly, for example:

javadoc -helpfile C:\user\myhelp.html java.awt.
-stylesheet path\filename

Specifies the path of an alternate HTML stylesheet file. Without this option, the javadoc command automatically creates a stylesheet file stylesheet.css that is hard-coded in the javadoc command. This option lets you override the default. The file name can be any name and is not restricted to stylesheet.css, for example:

javadoc -stylesheet file C:\user\mystylesheet.css com.mypackage
-serialwarn

Generates compile-time warnings for missing @serial tags. By default, Javadoc 1.2.2 and later versions generate no serial warnings. This is a reversal from earlier releases. Use this option to display the serial warnings, which helps to properly document default serializable fields and writeExternal methods.

-charset name

Specifies the HTML character set for this document. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at
http://www.iana.org/assignments/character-sets

For example, javadoc -charset "iso-8859-1" mypackage inserts the following line in the head of every generated page:

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

This META tag is described in the HTML standard (4197265 and 4137321), HTML Document Representation, at
http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

See also the -encoding and -docencoding name options.

-docencoding name

Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at
http://www.iana.org/assignments/character-sets

If you omit the -docencoding option but use the -encoding option, then the encoding of the generated HTML files is determined by the -encoding option, for example: javadoc -docencoding "iso-8859-1" mypackage. See also the -encoding and -docencoding name options.

-keywords

Adds HTML keyword <META> tags to the generated file for each class. These tags can help search engines that look for <META> tags find the pages. Most search engines that search the entire Internet do not look at <META> tags, because pages can misuse them. Search engines offered by companies that confine their searches to their own website can benefit by looking at <META> tags. The <META> tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords:

<META NAME="keywords" CONTENT="java.lang.String class">
<META NAME="keywords" CONTENT="CASE_INSENSITIVE_ORDER">
<META NAME="keywords" CONTENT="length()">
<META NAME="keywords" CONTENT="charAt()">
-tag tagname:Xaoptcmf:"taghead"

Enables the javadoc command to interpret a simple, one-argument @tagname custom block tag in documentation comments. For the javadoc command to spell-check tag names, it is important to include a -tag option for every custom tag that is present in the source code, disabling (with X) those that are not being output in the current run.The colon (:) is always the separator. The -tag option outputs the tag heading taghead in bold, followed on the next line by the text from its single argument. Similar to any block tag, the argument text can contain inline tags, which are also interpreted. The output is similar to standard one-argument tags, such as the @return and @author tags. Omitting a value for taghead causes tagname to be the heading.

Placement of tags: The Xaoptcmf arguments determine where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using X). You can supply either a, to allow the tag in all places, or any combination of the other letters:

X (disable tag)

a (all)

o (overview)

p (packages)

t (types, that is classes and interfaces)

c (constructors)

m (methods)

f (fields)

Examples of single tags: An example of a tag option for a tag that can be used anywhere in the source code is: -tag todo:a:"To Do:".

If you want the @todo tag to be used only with constructors, methods, and fields, then you use: -tag todo:cmf:"To Do:".

Notice the last colon (:) is not a parameter separator, but is part of the heading text. You would use either tag option for source code that contains the @todo tag, such as: @todo The documentation for this method needs work.

Colons in tag names: Use a backslash to escape a colon that you want to use in a tag name. Use the -tag ejb\\:bean:a:"EJB Bean:" option for the following documentation comment:

/**
 * @ejb:bean
 */

Spell-checking tag names: Some developers put custom tags in the source code that they do not always want to output. In these cases, it is important to list all tags that are in the source code, enabling the ones you want to output and disabling the ones you do not want to output. The presence of X disables the tag, while its absence enables the tag. This gives the javadoc command enough information to know whether a tag it encounters is unknown, which is probably the results of a typographical error or a misspelling. The javadoc command prints a warning in these cases. You can add X to the placement values already present, so that when you want to enable the tag, you can simply delete the X. For example, if the @todo tag is a tag that you want to suppress on output, then you would use: -tag todo:Xcmf:"To Do:". If you would rather keep it simple, then use this: -tag todo:X. The syntax -tag todo:X works even when the @todo tag is defined by a taglet.

Order of tags: The order of the -tag and -taglet options determines the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order. They take only the standard tag's name. Subheadings for standard tags cannot be altered. This is illustrated in the following example.If the -tag option is missing, then the position of the -taglet option determines its order. If they are both present, then whichever appears last on the command line determines its order. This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if the -taglet and -tag options have the name todo value, then the one that appears last on the command line determines the order.

Example of a complete set of tags: This example inserts To Do after Parameters and before Throws in the output. By using X, it also specifies that the @example tag might be encountered in the source code that should not be output during this run. If you use the @argfile tag, then you can put the tags on separate lines in an argument file similar to this (no line continuation characters needed):

-tag param
-tag return
-tag todo:a:"To Do:"
-tag throws
-tag see
-tag example:X

When the javadoc command parses the documentation comments, any tag encountered that is neither a standard tag nor passed in with the -tag or -taglet options is considered unknown, and a warning is thrown.

The standard tags are initially stored internally in a list in their default order. Whenever the -tag options are used, those tags get appended to this list. Standard tags are moved from their default position. Therefore, if a -tag option is omitted for a standard tag, then it remains in its default position.

Avoiding conflicts: If you want to create your own namespace, then you can use a dot-separated naming convention similar to that used for packages: com.mycompany.todo. Oracle will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Oracle. If you create a @todo tag or taglet, then it always has the same behavior you define, even when Oracle later creates a standard tag of the same name.

Annotations vs. Javadoc tags: In general, if the markup you want to add is intended to affect or produce documentation, then it should be a Javadoc tag. Otherwise, it should be an annotation. See Custom Tags and Annotations in How to Write Doc Comments for the Javadoc Tool at
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#annotations

You can also create more complex block tags or custom inline tags with the -taglet option.

-taglet class

Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully qualified name for the class value. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see: Taglet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/taglet/overview.html

Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. A taglet cannot do things such as remove a class name from the list of included classes. However, it can execute side effects, such as printing the tag's text to a file or triggering another process. Use the -tagletpath option to specify the path to the taglet. The following example inserts the To Do taglet after Parameters and ahead of Throws in the generated pages. Alternately, you can use the -taglet option in place of its -tag option, but that might be difficult to read.

-taglet com.sun.tools.doclets.ToDoTaglet
-tagletpath /home/taglets
-tag return
-tag param
-tag todo
-tag throws
-tag see
-tagletpath tagletpathlist

Specifies the search paths for finding taglet class files. The tagletpathlist can contain multiple paths by separating them with a colon (:). The javadoc command searches all subdirectories of the specified paths.

-docfilesubdirs

Enables deep copying of doc-files directories. Subdirectories and all contents are recursively copied to the destination. For example, the directory doc-files/example/images and all of its contents would be copied. There is also an option to exclude subdirectories.

-excludedocfilessubdir name1:name2

Excludes any doc-files subdirectories with the specified names. This prevents the copying of SCCS and other source-code-control subdirectories.

-noqualifier all | packagename1:packagename2...

Omits qualifying package names from class names in output. The argument to the -noqualifier option is either all (all package qualifiers are omitted) or a colon-separate list of packages, with wild cards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. See Process Source Files.

The following example omits all package qualifiers: -noqualifier all.

The following example omits java.lang and java.io package qualifiers: -noqualifier java.lang:java.io.

The following example omits package qualifiers starting with java, and com.sun subpackages, but not javax: -noqualifier java.*:com.sun.*.

Where a package qualifier would appear due to the previous behavior, the name can be suitably shortened. See How a Name Appears. This rule is in effect whether or not the -noqualifier option is used.

-notimestamp

Suppresses the time stamp, which is hidden in an HTML comment in the generated HTML near the top of each page. The -notimestamp option is useful when you want to run the javadoc command on two source bases and get the differences between diff them, because it prevents time stamps from causing a diff (which would otherwise be a diff on every page). The time stamp includes the javadoc command release number, and currently appears similar to this: <!-- Generated by javadoc (build 1.5.0_01) on Thu Apr 02 14:04:52 IST 2009 -->.

-nocomment

Suppresses the entire comment body, including the main description and all tags, and generate only declarations. This option lets you reuse source files that were originally intended for a different purpose so that you can produce skeleton HTML documentation at the early stages of a new project.

-sourcetab tablength

Specifies the number of spaces each tab uses in the source.

Command-Line Argument Files

To shorten or simplify the javadoc command, you can specify one or more files that contain arguments to the javadoc command (except -J options). This enables you to create javadoc commands of any length on any operating system.

An argument file can include javac options and source file names in any combination. The arguments within a file can be space-separated or newline-separated. If a file name contains embedded spaces, then put the whole file name in double quotation marks.

File Names within an argument file are relative to the current directory, not the location of the argument file. Wild cards (*) are not allowed in these lists (such as for specifying *.java). Using the at sign (@) to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.

When you run the javadoc command, pass in the path and name of each argument file with the @ leading character. When the javadoc command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list.

Example 1Single Argument File

You could use a single argument file named argfile to hold all javadoc command arguments: javadoc @argfile. The argument file contains the contents of both files, as shown in the next example.

Example 2Two Argument Files

You can create two argument files: One for the javadoc command options and the other for the package names or source file names. Notice the following lists have no line-continuation characters.

Create a file named options that contains:

-d docs-filelist
-use
-splitindex
-windowtitle 'Java SE 7 API Specification'
-doctitle 'Java SE 7 API Specification'
-header '<b>Java SE 7</b>'
-bottom 'Copyright &copy; 1993-2011 Oracle and/or its affiliates. All rights reserved.'
-group "Core Packages" "java.*"
-overview \java\pubs\ws\1.7.0\src\share\classes\overview-core.html
-sourcepath \java\pubs\ws\1.7.0\src\share\classes

Create a file named packages that contains:

com.mypackage1
com.mypackage2
com.mypackage3

Run the javadoc command as follows:

javadoc @options @packages
Example 3Argument Files with Paths

The argument files can have paths, but any file names inside the files are relative to the current working directory (not path1 or path2):

javadoc @path1\options @path2\packages
Example 4Option Arguments

The following example saves an argument to a javadoc command option in an argument file. The -bottom option is used because it can have a lengthy argument. You could create a file named bottom to contain the text argument:

<font size="-1">
    <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
    Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved. <br/>
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
    Other names may be trademarks of their respective owners.</font>

Run the javadoc command as follows: javadoc -bottom @bottom @packages.

You can also include the -bottom option at the start of the argument file and run the javadoc command as follows: javadoc @bottom @packages.

Running the Javadoc Command

The release number of the javadoc command can be determined with the javadoc -J-version option. The release number of the standard doclet appears in the output stream. It can be turned off with the -quiet option.

Use the public programmatic interface to call the javadoc command from within programs written in the Java language. This interface is in com.sun.tools.javadoc.Main (and the javadoc command is reentrant). For more information, see The Standard Doclet at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/standard-doclet.html#runningprogrammatically

The following instructions call the standard HTML doclet. To call a custom doclet, use the -doclet and -docletpath options. See Doclet Overview at
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html

Simple Examples

You can run the javadoc command on entire packages or individual source files. Each package name has a corresponding directory name.

In the following examples, the source files are located at C:\home\src\java\awt\*java. The destination directory is C:\home\html.

Document One or More Packages

To document a package, the source files for that package must be located in a directory that has the same name as the package.

If a package name has several identifiers (separated by dots, such as java.awt.color), then each subsequent identifier must correspond to a deeper subdirectory (such as java\awt\color).

You can split the source files for a single package among two such directory trees located at different places, as long as -sourcepath points to them both. For example, src1\java\awt\color and src2\java\awt\color.

You can run the javadoc command either by changing directories (with the cd command) or by using the -sourcepath option. The following examples illustrate both alternatives.

Example 1Recursive Run from One or More Packages

This example uses -sourcepath so the javadoc command can be run from any directory and -subpackages (a new 1.4 option) for recursion. It traverses the subpackages of the java directory excluding packages rooted at java.net and java.lang. Notice this excludes java.lang.ref, a subpackage of java.lang. To also traverse down other package trees, append their names to the -subpackages argument, such as java:javax:org.xml.sax.

javadoc -d /home/html -sourcepath /home/src -subpackages java -exclude
Example 2Change to Root and Run Explicit Packages

Change to the parent directory of the fully qualified package. Then, run the javadoc command with the names of one or more packages that you want to document:

cd C:\home\src\
javadoc -d C:\home\html java.awt java.awt.event

To also traverse down other package trees, append their names to the -subpackages argument, such as java:javax:org.xml.sax.

Example 3Run from Any Directory on Explicit Packages in One Tree

In this case, it does not matter what the current directory is. Run the javadoc command and use the -sourcepath option with the parent directory of the top-level package. Provide the names of one or more packages that you want to document:

javadoc -d C:\home\html -sourcepath C:\home\src java.awt java.awt.event
Example 4Run from Any Directory on Explicit Packages in Multiple Trees

Run the javadoc command and use the -sourcepath option with a colon-separated list of the paths to each tree's root. Provide the names of one or more packages that you want to document. All source files for a specified package do not need to be located under a single root directory, but they must be found somewhere along the source path.

javadoc -d C:\home\html -sourcepath C:\home\src1;C:\home\src2 java.awt java.awt.event

The result is that all cases generate HTML-formatted documentation for the public and protected classes and interfaces in packages java.awt and java.awt.event and save the HTML files in the specified destination directory. Because two or more packages are being generated, the document has three HTML frames: one for the list of packages, another for the list of classes, and the third for the main class pages.

Document One or More Classes

The second way to run the javadoc command is to pass one or more source files. You can run javadoc either of the following two ways: by changing directories (with the cd command) or by fully specifying the path to the source files. Relative paths are relative to the current directory. The -sourcepath option is ignored when passing source files. You can use command-line wild cards, such as an asterisk (*), to specify groups of classes.

Example 1Change to the Source Directory

Change to the directory that holds the source files. Then run the javadoc command with the names of one or more source files you want to document.

This example generates HTML-formatted documentation for the classes Button, Canvas, and classes that begin with Graphics. Because source files rather than package names were passed in as arguments to the javadoc command, the document has two frames: one for the list of classes and the other for the main page.

cd C:\home\src\java\awt
javadoc -d C:\home\html Button.java Canvas.java Graphics*.java
Example 2Change to the Root Directory of the Package

This is useful for documenting individual source files from different subpackages off of the same root. Change to the package root directory, and supply the source files with paths from the root.

cd C:\home\src
javadoc -d \home\html java\awt\Button.java java\applet\Applet.java
Example 3Document Files from Any Directory

In this case, it does not matter what the current directory is. Run the javadoc command with the absolute path (or path relative to the current directory) to the source files you want to document.

javadoc -d C:\home\html C:\home\src\java\awt\Button.java
C:\home\src\java\awt\Graphics*.java

Document Packages and Classes

You can document entire packages and individual classes at the same time. Here is an example that mixes two of the previous examples. You can use the -sourcepath option for the path to the packages but not for the path to the individual classes.

javadoc -d C:\home\html -sourcepath C:\home\src java.awt
C:\home\src\java\applet\Applet.java

Real-World Examples

The following command-line and makefile versions of the javadoc command run on the Java platform APIs. It uses 180 MB of memory to generate the documentation for the 1500 (approximately) public and protected classes in the Java SE 1.2. Both examples use absolute paths in the option arguments, so that the same javadoc command can be run from any directory.

Command-Line Example

The following command might be too long for some shells. You can use a command-line argument file (or write a shell script) to overcome this limitation.

In the example, packages is the name of a file that contains the packages to process, such as java.applet java.lang. None of the options should contain any newline characters between the single quotation marks. For example, if you copy and paste this example, then delete the newline characters from the -bottom option.

javadoc -sourcepath \java\jdk\src\share\classes
-overview \java\jdk\src\share\classes\overview.html
-d \java\jdk\build\api
-use
-splitIndex
-windowtitle 'Java Platform, Standard Edition 7 API Specification'
-doctitle 'Java Platform, Standard Edition 7 API Specification'
-header '<b>Java SE 7</b>'
-bottom '<font size="-1">
<a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/>
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.</font>'
-group "Core Packages" "java.*:com.sun.java.*:org.omg.*"
-group "Extension Packages" "javax.*"
-J-Xmx180m
@packages

Programmatic Interface

The Javadoc Access API enables the user to invoke the Javadoc tool directly from a Java application without executing a new process.

For example, the following statements are equivalent to the command javadoc -d /home/html -sourcepath /home/src -subpackages java -exclude java.net:java.lang com.example:

import javax.tools.DocumentationTool;
import javax.tools.ToolProvider;

public class JavaAccessSample{
    public static void main(String[] args){
        DocumentationTool javadoc = ToolProvider.getSystemDocumentationTool();
        int rc = javadoc.run( null, null, null,
                 "-d", "/home/html",
                 "-sourcepath", "home/src",
                 "-subpackages", "java",
                 "-exclude", "java.net:java.lang",
                 "com.example");
     }
 }

The first three arguments of the run method specify input, standard output, and standard error streams. Null is the default value for System.in, System.out, and System.err, respectively.

The makefile Example

This is an example of a GNU makefile. Single quotation marks surround makefile arguments. For an example of a Windows makefile, see the makefiles section of the Javadoc FAQ at
http://www.oracle.com/technetwork/java/javase/documentation/index-137483.html#makefiles

javadoc -sourcepath $(SRCDIR)                 /* Sets path for source files   */
        -overview $(SRCDIR)\overview.html     /* Sets file for overview text  */
        -d \java\jdk\build\api                /* Sets destination directory   */
        -use                                  /* Adds "Use" files             */
        -splitIndex                           /* Splits index A-Z             */
        -windowtitle $(WINDOWTITLE)           /* Adds a window title          */
        -doctitle $(DOCTITLE)                 /* Adds a doc title             */
        -header $(HEADER)                     /* Adds running header text     */
        -bottom $(BOTTOM)                     /* Adds text at bottom          */
        -group $(GROUPCORE)                   /* 1st subhead on overview page */
        -group $(GROUPEXT)                    /* 2nd subhead on overview page */
        -J-Xmx180m                            /* Sets memory to 180MB         */
        java.lang java.lang.reflect           /* Sets packages to document    */
        java.util java.io java.net
        java.applet

WINDOWTITLE = 'Java Platform, Standard Edition 6 API Specification'
DOCTITLE = 'Java Platform, Standard Edition 6 API Specification'
HEADER = '<b>Java Platform, Standard Edition 6'
BOTTOM = '<font size="-1">
      <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/>
      Copyright &copy; 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/>
      Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
      Other names may be trademarks of their respective owners.</font>'
GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
GROUPEXT  = '"Extension Packages" "javax.*"'
SRCDIR = '/java/jdk/1.7.0/src/share/classes'

Notes

  • If you omit the -windowtitle option, then the javadoc command copies the document title to the window title. The -windowtitle option text is similar to the the -doctitle option, but without HTML tags to prevent those tags from appearing as raw text in the window title.

  • If you omit the -footer option, then the javadoc command copies the header text to the footer.

  • Other important options you might want to use, but were not needed in the previous example, are the -classpath and -link options.

General Troubleshooting

  • The javadoc command reads only files that contain valid class names. If the javadoc command is not correctly reading the contents of a file, then verify that the class names are valid. See Process Source Files.

  • See the Javadoc FAQ for information about common bugs and for troubleshooting tips at
    http://www.oracle.com/technetwork/java/javase/documentation/index-137483.html

Errors and Warnings

Error and warning messages contain the file name and line number to the declaration line rather than to the particular line in the documentation comment.

For example, this message error: cannot read: Class1.java means that the javadoc command is trying to load Class1.java in the current directory. The class name is shown with its path (absolute or relative).

Environment

CLASSPATH

CLASSPATH is the environment variable that provides the path that the javadoc command uses to find user class files. This environment variable is overridden by the -classpath option. Separate directories with a semicolon for Windows or a colon for Oracle Solaris.

Windows example: .;C:\classes;C:\home\java\classes

Oracle Solaris example: .:/home/classes:/usr/local/java/classes.

See Also

  • javac(1)

  • java(1)

  • jdb(1)

  • javah(1)

  • javap(1)

Related Documents

  • Javadoc Technology at
    http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/index.html

  • How Classes Are Found
    http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

  • How to Write Doc Comments for the Javadoc Tool
    http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

  • URL Memo, Uniform Resource Locators
    http://www.ietf.org/rfc/rfc1738.txt

  • HTML standard, HTML Document Representation (4197265 and 4137321)
    http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jdeps

Java class dependency analyzer.

Synopsis

jdeps [options] classes ...

options

Command-line options. See Options.

classes

Name of the classes to analyze. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file.

Description

The jdeps command shows the package-level or class-level dependencies of Java class files. The input class can be a path name to a .class file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files. The options determine the output. By default, jdeps outputs the dependencies to the system output. It can generate the dependencies in DOT language (see the -dotoutput option).

Options

-dotoutput <dir>

Destination directory for DOT file output. If specified, jdeps will generate one dot file per each analyzed archive named <archive-file-name>.dot listing the dependencies, and also a summary file named summary.dot listing the dependencies among the archives.

-s
-summary

Prints dependency summary only.

-v
-verbose

Prints all class-level dependencies.

-verbose:package

Prints package-level dependencies excluding dependencies within the same archive.

-verbose:class

Prints class-level dependencies excluding dependencies within the same archive.

-cp <path>
-classpath <path>

Specifies where to find class files.

See also Setting the Class Path.

-p <pkg name>
-package <pkg name>

Finds dependencies in the specified package. You can specify this option multiple times for different packages. The -p and -e options are mutually exclusive.

-e <regex>
-regex <regex>

Finds dependencies in packages matching the specified regular expression pattern. The -p and -e options are mutually exclusive.

-include <regex>

Restricts analysis to classes matching pattern. This option filters the list of classes to be analyzed. It can be used together with -p and -e which apply pattern to the dependencies.

-jdkinternals

Finds class-level dependences in JDK internal APIs. By default, it analyzes all classes specified in the -classpath option and in input files unless you specified the -include option. You cannot use this option with the -p, -e, and -s options.

Warning: JDK internal APIs may not be accessible in upcoming releases.

-P
-profile

Shows profile or the file containing a package.

-apionly

Restricts analysis to APIs, for example, dependences from the signature of public and protected members of public classes including field type, method parameter types, returned type, and checked exception types.

-R
-recursive

Recursively traverses all dependencies.

-version

Prints version information.

-h
-?
-help

Prints help message for jdeps.

Examples

Analyzing the dependencies of Notepad.jar.

$ jdeps demo\jfc\Notepad\Notepad.jar

demo\jfc\Notepad\Notepad.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar
   <unnamed> (Notepad.jar)
      -> java.awt
      -> java.awt.event
      -> java.beans
      -> java.io
      -> java.lang
      -> java.net
      -> java.util
      -> java.util.logging
      -> javax.swing
      -> javax.swing.border
      -> javax.swing.event
      -> javax.swing.text
      -> javax.swing.tree
      -> javax.swing.undo

Use -P or -profile option to show on which profile that Notepad depends.

$ jdeps -profile demo\jfc\Notepad\Notepad.jar
demo\jfc\Notepad\Notepad.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar (Full JRE)
   <unnamed> (Notepad.jar)
      -> java.awt                                           Full JRE
      -> java.awt.event                                     Full JRE
      -> java.beans                                         Full JRE
      -> java.io                                            compact1
      -> java.lang                                          compact1
      -> java.net                                           compact1
      -> java.util                                          compact1
      -> java.util.logging                                  compact1
      -> javax.swing                                        Full JRE
      -> javax.swing.border                                 Full JRE
      -> javax.swing.event                                  Full JRE
      -> javax.swing.text                                   Full JRE
      -> javax.swing.tree                                   Full JRE
      -> javax.swing.undo                                   Full JRE

Analyzing the immediate dependencies of a specific class in a given classpath, for example the com.sun.tools.jdeps.Main class in the tools.jar file.

$ jdeps -cp lib\tools.jar com.sun.tools.jdeps.Main
lib\tools.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar
   com.sun.tools.jdeps (tools.jar)
      -> java.io
      -> java.lang

Use the -verbose:class option to find class-level dependencies or use the -v or -verbose option to include dependencies from the same JAR file.

$ jdeps -verbose:class -cp lib\tools.jar com.sun.tools.jdeps.Main

lib\tools.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar
   com.sun.tools.jdeps.Main (tools.jar)
      -> java.io.PrintWriter
      -> java.lang.Exception
      -> java.lang.Object
      -> java.lang.String
      -> java.lang.System

Use the -R or -recursive option to analyze the transitive dependencies of the com.sun.tools.jdeps.Main class.

$ jdeps -R -cp lib\tools.jar com.sun.tools.jdeps.Main
lib\tools.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar
   com.sun.tools.classfile (tools.jar)
      -> java.io
      -> java.lang
      -> java.lang.reflect
      -> java.nio.charset
      -> java.nio.file
      -> java.util
      -> java.util.regex
   com.sun.tools.jdeps (tools.jar)
      -> java.io
      -> java.lang
      -> java.nio.file
      -> java.nio.file.attribute
      -> java.text
      -> java.util
      -> java.util.jar
      -> java.util.regex
      -> java.util.zip
c:\Program Files\Java\jdk1.8.0\jre\lib\jce.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar
   javax.crypto (jce.jar)
      -> java.io
      -> java.lang
      -> java.lang.reflect
      -> java.net
      -> java.nio
      -> java.security
      -> java.security.cert
      -> java.security.spec
      -> java.util
      -> java.util.concurrent
      -> java.util.jar
      -> java.util.regex
      -> java.util.zip
      -> javax.security.auth
      -> sun.security.jca                                   JDK internal API (rt.jar)
      -> sun.security.util                                  JDK internal API (rt.jar)
   javax.crypto.spec (jce.jar)
      -> java.lang
      -> java.security.spec
      -> java.util
c:\Program Files\Java\jdk1.8.0\jre\lib\rt.jar -> c:\Program Files\Java\jdk1.8.0\jre\lib\jce.jar
   java.security (rt.jar)
      -> javax.crypto

Generate dot files of the dependencies of Notepad demo.

$ jdeps -dotoutput dot demo\jfc\Notepad\Notepad.jar

jdeps will create one dot file for each given JAR file named <filename>.dot in the dot directory specified in the -dotoutput option, and also a summary file named summary.dot that will list the dependencies among the JAR files

$ cat dot\Notepad.jar.dot
digraph "Notepad.jar" {
    // Path: demo\jfc\Notepad\Notepad.jar
   "<unnamed>"                                        -> "java.awt";
   "<unnamed>"                                        -> "java.awt.event";
   "<unnamed>"                                        -> "java.beans";
   "<unnamed>"                                        -> "java.io";
   "<unnamed>"                                        -> "java.lang";
   "<unnamed>"                                        -> "java.net";
   "<unnamed>"                                        -> "java.util";
   "<unnamed>"                                        -> "java.util.logging";
   "<unnamed>"                                        -> "javax.swing";
   "<unnamed>"                                        -> "javax.swing.border";
   "<unnamed>"                                        -> "javax.swing.event";
   "<unnamed>"                                        -> "javax.swing.text";
   "<unnamed>"                                        -> "javax.swing.tree";
   "<unnamed>"                                        -> "javax.swing.undo";
}

$ cat dot\summary.dot
digraph "summary" {
   "Notepad.jar"                  -> "rt.jar";
}

See Also

  • javap(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jjs

Invokes the Nashorn engine.

Synopsis

jjs [options] [script-files] [-- arguments]
options

One or more options of the jjs command, separated by spaces. For more information, see Options.

script-files

One or more script files which you want to interpret using Nashorn, separated by spaces. If no files are specified, an interactive shell is started.

arguments

All values after the double hyphen marker (--) are passed through to the script or the interactive shell as arguments. These values can be accessed by using the arguments property (see Example 3).

Description

The jjs command-line tool is used to invoke the Nashorn engine. You can use it to interpret one or several script files, or to run an interactive shell.

Options

The options of the jjs command control the conditions under which scripts are interpreted by Nashorn.

-ccs=size
--class-cache-size=size

Sets the class cache size (in bytes). Append the letter k or K to indicate kilobytes (KB), m or M to indicate megabytes (MB), g or G to indicate gigabytes (GB). By default, the class cache size is set to 50 bytes. The following example shows how to set it to 1024 bytes (1 KB):

-css=100
-css=1k
-co
--compile-only

Compiles the script without running it.

-cp path
--classpath path

Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a semicolon (;).

-Dname=value

Sets a system property to be passed to the script by assigning a value to a property name. The following example shows how to invoke Nashorn in interactive mode and assign myValue to the property named myKey:

>> jjs -DmyKey=myValue
jjs> java.lang.System.getProperty("myKey")
myValue
jjs>

This option can be repeated to set multiple properties.

-d=path
--dump-debug-dir=path

Specifies the path to the directory where class files are dumped.

--debug-lines

Generates a line number table in the class file. By default, this option is enabled. To disable it, specify --debug-lines=false.

--debug-locals

Generates a local variable table in the class file.

-doe
--dump-on-error

Provides a full stack trace when an error occurs. By default, only a brief error message is printed.

--early-lvalue-error

Reports invalid lvalue expressions as early errors (that is, when the code is parsed). By default, this option is enabled. To disable it, specify --early-lvalue-error=false. When disabled, invalid lvalue expressions will not be reported until the code is executed.

--empty-statements

Preserves empty statements in the Java abstract syntax tree.

-fv
--fullversion

Prints the full Nashorn version string.

--function-statement-error

Prints an error message when a function declaration is used as a statement.

--function-statement-warning

Prints a warning message when a function declaration is used as a statement.

-fx

Launches the script as a JavaFX application.

-h
-help

Prints the list of options and their descriptions.

-Joption

Passes the specified java launcher option to the JVM. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB:

>> jjs -J-Xmx4g
jjs> java.lang.Runtime.getRuntime().maxMemory()
3817799680
jjs>

This option can be repeated to pass multiple java command options.

--lazy-compilation

Enables lazy code generation strategies (that is, the entire script is not compiled at once). This option is experimental.

--loader-per-compile

Creates a new class loader per compile. By default, this option is enabled. To disable it, specify --loader-per-compile=false.

--log=subsystem:level

Performs logging at a given level for the specified subsystems. You can specify logging levels for multiple subsystems separating them with commas. For example:

--log=fields:finest,codegen:info
--package=name

Specifies the package to which generated class files are added.

--parse-only

Parses the code without compiling.

--print-ast

Prints the abstract syntax tree.

--print-code

Prints bytecode.

--print-lower-ast

Prints the lowered abstract syntax tree.

--print-lower-parse

Prints the lowered parse tree.

--print-no-newline

Forces other --print* options to print the output on one line.

--print-parse

Prints the parse tree.

--print-symbols

Prints the symbol table.

-pcs
--profile-callsites

Dumps callsite profile data.

-scripting

Enables shell scripting features.

--stderr=filename|stream|tty

Redirects the standard error stream to the specified file, stream (for example, to stdout), or text terminal.

--stdout=filename|stream|tty

Redirects the standard output stream to the specified file, stream (for example, to stderr), or text terminal.

-strict

Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5.1), making it easier to detect common coding errors.

-t=zone
-timezone=zone

Sets the specified time zone for script execution. It overrides the time zone set in the OS and used by the Date object.

-tcs=parameter
--trace-callsites=parameter

Enables callsite trace mode. Possible parameters are the following:

miss

Trace callsite misses.

enterexit

Trace callsite enter/exit.

objects

Print object properties.

--verify-code

Verifies bytecode before running.

-v
-version

Prints the Nashorn version string.

-xhelp

Prints extended help for command-line options.

Examples

Example 1Running a Script with Nashorn
jjs script.js
Example 2Running Nashorn in Interactive Mode
>> jjs
jjs> println("Hello, World!")
Hello, World!
jjs> quit()
>>
Example 3Passing Arguments to Nashorn
>> jjs -- a b c
jjs> arguments.join(", ")
a, b, c
jjs>

See Also

jrunscript

Contents Previous
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


jmc

Java Mission Control is a Profiling, Monitoring, and Diagnostics Tools Suite.

Synopsis

jmc [ options ]

Options, if used, should follow immediately after the command name. Options may be in any order. For more information about the options used with the jmc command, see Options.

Description

Java Mission Control is a tool for production time profiling and diagnostics for the HotSpot JVM. The two main features of Java Mission Control are the Management Console and Java Flight Recorder, but several more features are offered as plug-ins, which can be downloaded from the tool. Java Mission Control is also available as a set of plug-ins for the Eclipse IDE.

Options

The following options are available when you launch Java Mission Control.

-help

Prints jmc command help.

-version

Prints the version of Java Mission Control and exit.

-showversion

Prints the version of Java Mission Control and continue.

-debug

Enables debug output.

-consoleLog

Prints the Eclipse log on the console. (Flag from Eclipse).

On Windows, use this option as follows:

JAVA_HOME\bin\jmc.exe -consoleLog 2>&1 | more

-data workspace

Sets the workspace used while running Java Mission Control. The default workspace is $HOME/.jmc. (Flag from Eclipse).

-open file

Opens the file in Java Mission Control. For example, to open a Flight Recording file (.jfr file).

eclipse-option

Passes this eclipse-option to the underlying Eclipse platform.

-Jjvm-option

Passes this jvm-option to the running Java Virtual Machine.

See Also

  •

    Oracle Java SE Advanced and Oracle Java SE Suite at http://www.oracle.com/us/technologies/java/standard-edition/advanced-suite/overview/index.html

    •

  •

    JMC Developer Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/jmc/index.html

    •

                Contents
                Previous
                Next

  Oracle and/or its affiliates

Copyright
© 1993, 2014, Oracle and/or its affiliates. All rights
reserved.

Contact
Us


jstack

Prints Java thread stack traces for a Java process, core file, or remote debug server. This command is experimental and unsupported.

Synopsis

jstack [ options ] pid

jstack [ options ] executable core

jstack [ options ] [ server-id@ ] remote-hostname-or-IP

options

The command-line options. See Options.

pid

The process ID for which the stack trace is printed. The process must be a Java process. To get a list of Java processes running on a machine, use the jps(1) command.

executable

The Java executable from which the core dump was produced.

core

The core file for which the stack trace is to be printed.

remote-hostname-or-IP

The remote debug server hostname or IP address. See jsadebugd(1).

server-id

An optional unique ID to use when multiple debug servers are running on the same remote host.

Description

The jstack command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed. With the -m option, the jstack command prints both Java and native frames of all threads with the program counter (PC). For each native frame, the closest native symbol to PC, when available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command can be piped to c++filt. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the -J-d64 option, for example: jstack -J-d64 -m pid.

Note: This utility is unsupported and might not be available in future release of the JDK. In Windows Systems where the dbgeng.dll file is not present, Debugging Tools For Windows must be installed so these tools work. The PATH environment variable needs to contain the location of the jvm.dll that is used by the target process, or the location from which the crash dump file was produced. For example:

set PATH=<jdk>\jre\bin\client;%PATH%

Options

-F

Force a stack dump when jstack [-l] pid does not respond.

-l

Long listing. Prints additional information about locks such as a list of owned java.util.concurrent ownable synchronizers. See the AbstractOwnableSynchronizer class description at
http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html

-m

Prints a mixed mode stack trace that has both Java and native C/C++ frames.

-h

Prints a help message.

-help

Prints a help message.

Known Bugs

In mixed mode stack trace, the -m option does not work with the remote debug server.

See Also

  • jps(1)

  • jsadebugd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


keytool

Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

Synopsis

keytool [commands]

commands

See Commands. These commands are categorized by task as follows:

  • Create or Add Data to the Keystore

    • -gencert

    • -genkeypair

    • -genseckey

    • -importcert

    • -importpassword

  • Import Contents From Another Keystore

    • -importkeystore

  • Generate Certificate Request

    • -certreq

  • Export Data

    • -exportcert

  • Display Data

    • -list

    • -printcert

    • -printcertreq

    • -printcrl

  • Manage the Keystore

    • -storepasswd

    • -keypasswd

    • -delete

    • -changealias

  • Get Help

    • -help

Description

The keytool command is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself or herself to other users and services) or data integrity and authentication services, using digital signatures. The keytool command also enables users to cache the public keys (in the form of certificates) of their communicating peers.

A certificate is a digitally signed statement from one entity (person, company, and so on.), that says that the public key (and some other information) of some other entity has a particular value. (See Certificate.) When data is digitally signed, the signature can be verified to check the data integrity and authenticity. Integrity means that the data has not been modified or tampered with, and authenticity means the data comes from whoever claims to have created and signed it.

The keytool command also enables users to administer secret keys and passphrases used in symmetric encryption and decryption (DES).

The keytool command stores the keys and certificates in a keystore. See KeyStore aliases.

Command and Option Notes

See Commands for a listing and description of the various commands.

  • All command and option names are preceded by a minus sign (-).

  • The options for each command can be provided in any order.

  • All items not italicized or in braces or brackets are required to appear as is.

  • Braces surrounding an option signify that a default value will be used when the option is not specified on the command line. See Option Defaults. Braces are also used around the -v, -rfc, and -J options, which only have meaning when they appear on the command line. They do not have any default values other than not existing.

  • Brackets surrounding an option signify that the user is prompted for the values when the option is not specified on the command line. For the -keypass option, if you do not specify the option on the command line, then the keytool command first attempts to use the keystore password to recover the private/secret key. If this attempt fails, then the keytool command prompts you for the private/secret key password.

  • Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command:

    keytool -printcert {-file cert_file} {-v}

    When you specify a -printcert command, replace cert_file with the actual file name, as follows: keytool -printcert -file VScert.cer

  • Option values must be put in quotation marks when they contain a blank (space).

  • The -help option is the default. The keytool command is the same as keytool -help.

Option Defaults

The following examples show the defaults for various option values.

-alias "mykey"

-keyalg
    "DSA" (when using -genkeypair)
    "DES" (when using -genseckey)

-keysize
    2048 (when using -genkeypair and -keyalg is "RSA")
    1024 (when using -genkeypair and -keyalg is "DSA")
    256 (when using -genkeypair and -keyalg is "EC")
    56 (when using -genseckey and -keyalg is "DES")
    168 (when using -genseckey and -keyalg is "DESede")

-validity 90

-keystore <the file named .keystore in the user's home directory>

-storetype <the value of the "keystore.type" property in the
    security properties file, which is returned by the static
    getDefaultType method in java.security.KeyStore>

-file
    stdin (if reading)
    stdout (if writing)

-protected false

In generating a public/private key pair, the signature algorithm (-sigalg option) is derived from the algorithm of the underlying private key:

  • If the underlying private key is of type DSA, then the -sigalg option defaults to SHA1withDSA.

  • If the underlying private key is of type RSA, then the -sigalg option defaults to SHA256withRSA.

  • If the underlying private key is of type EC, then the -sigalg option defaults to SHA256withECDSA.

For a full list of -keyalg and -sigalg arguments, see Java Cryptography Architecture (JCA) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA

Common Options

The -v option can appear for all commands except -help. When the -v option appears, it signifies verbose mode, which means that more information is provided in the output.

There is also a -Jjavaoption argument that can appear for any command. When the -Jjavaoption appears, the specified javaoption string is passed directly to the Java interpreter. This option does not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

These options can appear for all commands operating on a keystore:

-storetype storetype

This qualifier specifies the type of keystore to be instantiated.

-keystore keystore

The keystore location.

If the JKS storetype is used and a keystore file does not yet exist, then certain keytool commands can result in a new keystore file being created. For example, if keytool -genkeypair is called and the -keystore option is not specified, the default keystore file named .keystore in the user's home directory is created when it does not already exist. Similarly, if the -keystore ks_file option is specified but ks_file does not exist, then it is created. For more information on the JKS storetype, see the KeyStore Implementation section in KeyStore aliases.

Note that the input stream from the -keystore option is passed to the KeyStore.load method. If NONE is specified as the URL, then a null stream is passed to the KeyStore.load method. NONE should be specified if the keystore is not file-based. For example, when it resides on a hardware token device.

-storepass[:env| :file] argument

The password that is used to protect the integrity of the keystore.

If the modifier env or file is not specified, then the password has the value argument, which must be at least 6 characters long. Otherwise, the password is retrieved as follows:

  • env: Retrieve the password from the environment variable named argument.

  • file: Retrieve the password from the file named argument.

Note: All other options that require passwords, such as -keypass, -srckeypass, -destkeypass, -srcstorepass, and -deststorepass, accept the env and file modifiers. Remember to separate the password option and the modifier with a colon (:).

The password must be provided to all commands that access the keystore contents. For such commands, when the -storepass option is not provided at the command line, the user is prompted for it.

When retrieving information from the keystore, the password is optional. If no password is specified, then the integrity of the retrieved information cannot be verified and a warning is displayed.

-providerName provider_name

Used to identify a cryptographic service provider's name when listed in the security properties file.

-providerClass provider_class_name

Used to specify the name of a cryptographic service provider's master class file when the service provider is not listed in the security properties file.

-providerArg provider_arg

Used with the -providerClass option to represent an optional string input argument for the constructor of provider_class_name.

-protected

Either true or false. This value should be specified as true when a password must be specified by way of a protected authentication path such as a dedicated PIN reader.Because there are two keystores involved in the -importkeystore command, the following two options -srcprotected and -destprotected are provided for the source keystore and the destination keystore respectively.

-ext {name{:critical} {=value}}

Denotes an X.509 certificate extension. The option can be used in -genkeypair and -gencert to embed extensions into the certificate generated, or in -certreq to show what extensions are requested in the certificate request. The option can appear multiple times. The name argument can be a supported extension name (see Named Extensions) or an arbitrary OID number. The value argument, when provided, denotes the argument for the extension. When value is omitted, that means that the default value of the extension or the extension requires no argument. The :critical modifier, when provided, means the extension's isCritical attribute is true; otherwise, it is false. You can use :c in place of :critical.

Named Extensions

The keytool command supports these named extensions. The names are not case-sensitive).

BC or BasicContraints

Values: The full form is: ca:{true|false}[,pathlen:<len>] or <len>, which is short for ca:true,pathlen:<len>. When <len> is omitted, you have ca:true.

KU or KeyUsage

Values: usage(,usage)*, where usage can be one of digitalSignature, nonRepudiation (contentCommitment), keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly, decipherOnly. The usage argument can be abbreviated with the first few letters (dig for digitalSignature) or in camel-case style (dS for digitalSignature or cRLS for cRLSign), as long as no ambiguity is found. The usage values are case-sensitive.

EKU or ExtendedKeyUsage

Values: usage(,usage)*, where usage can be one of anyExtendedKeyUsage, serverAuth, clientAuth, codeSigning, emailProtection, timeStamping, OCSPSigning, or any OID string. The usage argument can be abbreviated with the first few letters or in camel-case style, as long as no ambiguity is found. The usage values are case-sensitive.

SAN or SubjectAlternativeName

Values: type:value(,type:value)*, where type can be EMAIL, URI, DNS, IP, or OID. The value argument is the string format value for the type.

IAN or IssuerAlternativeName

Values: Same as SubjectAlternativeName.

SIA or SubjectInfoAccess

Values: method:location-type:location-value (,method:location-type:location-value)*, where method can be timeStamping, caRepository or any OID. The location-type and location-value arguments can be any type:value supported by the SubjectAlternativeName extension.

AIA or AuthorityInfoAccess

Values: Same as SubjectInfoAccess. The method argument can be ocsp,caIssuers, or any OID.

When name is OID, the value is the hexadecimal dumped DER encoding of the extnValue for the extension excluding the OCTET STRING type and length bytes. Any extra character other than standard hexadecimal numbers (0-9, a-f, A-F) are ignored in the HEX string. Therefore, both 01:02:03:04 and 01020304 are accepted as identical values. When there is no value, the extension has an empty value field.

A special name honored, used in -gencert only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma separated list of all (all requested extensions are honored), name{:[critical|non-critical]} (the named extension is honored, but using a different isCritical attribute) and -name (used with all, denotes an exception). Requested extensions are not honored by default.

If, besides the -ext honored option, another named or OID -ext option is provided, this extension is added to those already honored. However, if this name (or OID) also appears in the honored value, then its value and criticality overrides the one in the request.

The subjectKeyIdentifier extension is always created. For non-self-signed certificates, the authorityKeyIdentifier is created.

Note: Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Certificate Conformance Warning.

Commands

-gencert

{-rfc} {-infile infile} {-outfile outfile} {-alias alias} {-sigalg sigalg} {-dname dname} {-startdate startdate {-ext ext}* {-validity valDays} [-keypass keypass] {-keystore keystore} [-storepass storepass] {-storetype storetype} {-providername provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a certificate as a response to a certificate request file (which can be created by the keytool -certreq command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and outputs the X.509 certificate into outfile (if omitted, to the standard output). When-rfc is specified, the output format is Base64-encoded PEM; otherwise, a binary DER is created.

The sigalg value specifies the algorithm that should be used to sign the certificate. The startdate argument is the start time and date that the certificate is valid. The valDays argument tells the number of days for which the certificate should be considered valid.

When dname is provided, it is used as the subject of the generated certificate. Otherwise, the one from the certificate request is used.

The ext value shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of -ext.

The -gencert option enables you to create certificate chains. The following example creates a certificate, e1, that contains three certificates in its certificate chain.

The following commands creates four key pairs named ca, ca1, ca2, and e1:

keytool -alias ca -dname CN=CA -genkeypair
keytool -alias ca1 -dname CN=CA -genkeypair
keytool -alias ca2 -dname CN=CA -genkeypair
keytool -alias e1 -dname CN=E1 -genkeypair

The following two commands create a chain of signed certificates; ca signs ca1 and ca1 signs ca2, all of which are self-issued:

keytool -alias ca1 -certreq |
    keytool -alias ca -gencert -ext san=dns:ca1 |
    keytool -alias ca1 -importcert

keytool -alias ca2 -certreq |
    $KT -alias ca1 -gencert -ext san=dns:ca2 |
    $KT -alias ca2 -importcert

The following command creates the certificate e1 and stores it in the file e1.cert, which is signed by ca2. As a result, e1 should contain ca, ca1, and ca2 in its certificate chain:

keytool -alias e1 -certreq | keytool -alias ca2 -gencert > e1.cert
-genkeypair

{-alias alias} {-keyalg keyalg} {-keysize keysize} {-sigalg sigalg} [-dname dname] [-keypass keypass] {-startdate value} {-ext ext}* {-validity valDays} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v3 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by alias.

The keyalg value specifies the algorithm to be used to generate the key pair, and the keysize value specifies the size of each key to be generated. The sigalg value specifies the algorithm that should be used to sign the self-signed certificate. This algorithm must be compatible with the keyalg value.

The dname value specifies the X.500 Distinguished Name to be associated with the value of alias, and is used as the issuer and subject fields in the self-signed certificate. If no distinguished name is provided at the command line, then the user is prompted for one.

The value of keypass is a password used to protect the private key of the generated key pair. If no password is provided, then the user is prompted for it. If you press the Return key at the prompt, then the key password is set to the same password as the keystore password. The keypass value must be at least 6 characters.

The value of startdate specifies the issue time of the certificate, also known as the "Not Before" value of the X.509 certificate's Validity field.

The option value can be set in one of these two forms:

([+-]nnn[ymdHMS])+

[yyyy/mm/dd] [HH:MM:SS]

With the first form, the issue time is shifted by the specified value from the current time. The value is a concatenation of a sequence of subvalues. Inside each subvalue, the plus sign (+) means shift forward, and the minus sign (-) means shift backward. The time to be shifted is nnn units of years, months, days, hours, minutes, or seconds (denoted by a single character of y, m, d, H, M, or S respectively). The exact value of the issue time is calculated using the java.util.GregorianCalendar.add(int field, int amount) method on each subvalue, from left to right. For example, by specifying, the issue time will be:

Calendar c = new GregorianCalendar();
c.add(Calendar.YEAR, -1);
c.add(Calendar.MONTH, 1);
c.add(Calendar.DATE, -1);
return c.getTime()

With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local time zone). The user can provide only one part, which means the other part is the same as the current date (or time). The user must provide the exact number of digits as shown in the format definition (padding with 0 when shorter). When both the date and time are provided, there is one (and only one) space character between the two parts. The hour should always be provided in 24 hour format.

When the option is not provided, the start date is the current time. The option can be provided at most once.

The value of valDays specifies the number of days (starting at the date specified by -startdate, or the current date when -startdate is not specified) for which the certificate should be considered valid.

This command was named -genkey in earlier releases. The old name is still supported in this release. The new name, -genkeypair, is preferred going forward.

-genseckey

-genseckey {-alias alias} {-keyalg keyalg} {-keysize keysize} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a secret key and stores it in a new KeyStore.SecretKeyEntry identified by alias.

The value of keyalg specifies the algorithm to be used to generate the secret key, and the value of keysize specifies the size of the key to be generated. The keypass value is a password that protects the secret key. If no password is provided, then the user is prompted for it. If you press the Return key at the prompt, then the key password is set to the same password that is used for the keystore. The keypass value must be at least 6 characters.

-importcert

-importcert {-alias alias} {-file cert_file} [-keypass keypass] {-noprompt} {-trustcacerts} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Reads the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted reply or a sequence of X.509 certificates) from the file cert_file, and stores it in the keystore entry identified by alias. If no file is specified, then the certificate or certificate chain is read from stdin.

The keytool command can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a string that starts with -----BEGIN, and bounded at the end by a string that starts with -----END.

You import a certificate for two reasons: To add it to the list of trusted certificates, and to import a certificate reply received from a certificate authority (CA) as the result of submitting a Certificate Signing Request to that CA (see the -certreq option in Commands).

Which type of import is intended is indicated by the value of the -alias option. If the alias does not point to a key entry, then the keytool command assumes you are adding a trusted certificate entry. In this case, the alias should not already exist in the keystore. If the alias does already exist, then the keytool command outputs an error because there is already a trusted certificate for that alias, and does not import the certificate. If the alias points to a key entry, then the keytool command assumes you are importing a certificate reply.

-importpassword

{-alias alias} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Imports a passphrase and stores it in a new KeyStore.SecretKeyEntry identified by alias. The passphrase may be supplied via the standard input stream; otherwise the user is prompted for it. keypass is a password used to protect the imported passphrase. If no password is provided, the user is prompted for it. If you press the Return key at the prompt, the key password is set to the same password as that used for the keystore. keypass must be at least 6 characters long.

-importkeystore

{-srcstoretype srcstoretype} {-deststoretype deststoretype} [-srcstorepass srcstorepass] [-deststorepass deststorepass] {-srcprotected} {-destprotected} {-srcalias srcalias {-destalias destalias} [-srckeypass srckeypass] } [-destkeypass destkeypass] {-noprompt} {-srcProviderName src_provider_name} {-destProviderName dest_provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Imports a single entry or all entries from a source keystore to a destination keystore.

When the -srcalias option is provided, the command imports the single entry identified by the alias to the destination keystore. If a destination alias is not provided with destalias, then srcalias is used as the destination alias. If the source entry is protected by a password, then srckeypass is used to recover the entry. If srckeypass is not provided, then the keytool command attempts to use srcstorepass to recover the entry. If srcstorepass is either not provided or is incorrect, then the user is prompted for a password. The destination entry is protected with destkeypass. If destkeypass is not provided, then the destination entry is protected with the source entry password. For example, most third-party tools require storepass and keypass in a PKCS #12 keystore to be the same. In order to create a PKCS #12 keystore for these tools, always specify a -destkeypass to be the same as -deststorepass.

If the -srcalias option is not provided, then all entries in the source keystore are imported into the destination keystore. Each destination entry is stored under the alias from the source entry. If the source entry is protected by a password, then srcstorepass is used to recover the entry. If srcstorepass is either not provided or is incorrect, then the user is prompted for a password. If a source keystore entry type is not supported in the destination keystore, or if an error occurs while storing an entry into the destination keystore, then the user is prompted whether to skip the entry and continue or to quit. The destination entry is protected with the source entry password.

If the destination alias already exists in the destination keystore, then the user is prompted to either overwrite the entry or to create a new entry under a different alias name.

If the -noprompt option is provided, then the user is not prompted for a new destination alias. Existing entries are overwritten with the destination alias name. Entries that cannot be imported are skipped and a warning is displayed.

-printcertreq

{-file file}

Prints the content of a PKCS #10 format certificate request, which can be generated by the keytool -certreq command. The command reads the request from file. If there is no file, then the request is read from the standard input.

-certreq

{-alias alias} {-dname dname} {-sigalg sigalg} {-file certreq_file} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Generates a Certificate Signing Request (CSR) using the PKCS #10 format.

A CSR is intended to be sent to a certificate authority (CA). The CA authenticates the certificate requestor (usually off-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self-signed certificate) in the keystore.

The private key associated with alias is used to create the PKCS #10 certificate request. To access the private key, the correct password must be provided. If keypass is not provided at the command line and is different from the password used to protect the integrity of the keystore, then the user is prompted for it. If dname is provided, then it is used as the subject in the CSR. Otherwise, the X.500 Distinguished Name associated with alias is used.

The sigalg value specifies the algorithm that should be used to sign the CSR.

The CSR is stored in the file certreq_file. If no file is specified, then the CSR is output to stdout.

Use the importcert command to import the response from the CA.

-exportcert

{-alias alias} {-file cert_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-rfc} {-v} {-protected} {-Jjavaoption}

Reads from the keystore the certificate associated with alias and stores it in the cert_file file. When no file is specified, the certificate is output to stdout.

The certificate is by default output in binary encoding. If the -rfc option is specified, then the output in the printable encoding format defined by the Internet RFC 1421 Certificate Encoding Standard.

If alias refers to a trusted certificate, then that certificate is output. Otherwise, alias refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by alias.

This command was named -export in earlier releases. The old name is still supported in this release. The new name, -exportcert, is preferred going forward.

-list

{-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v | -rfc} {-protected} {-Jjavaoption}

Prints to stdout the contents of the keystore entry identified by alias. If no alias is specified, then the contents of the entire keystore are printed.

This command by default prints the SHA1 fingerprint of a certificate. If the -v option is specified, then the certificate is printed in human-readable format, with additional information such as the owner, issuer, serial number, and any extensions. If the -rfc option is specified, then the certificate contents are printed using the printable encoding format, as defined by the Internet RFC 1421 Certificate Encoding Standard.

You cannot specify both -v and -rfc.

-printcert

{-file cert_file | -sslserver host[:port]} {-jarfile JAR_file {-rfc} {-v} {-Jjavaoption}

Reads the certificate from the file cert_file, the SSL server located at host:port, or the signed JAR file JAR_file (with the -jarfile option and prints its contents in a human-readable format. When no port is specified, the standard HTTPS port 443 is assumed. Note that -sslserver and -file options cannot be provided at the same time. Otherwise, an error is reported. If neither option is specified, then the certificate is read from stdin.

When-rfc is specified, the keytool command prints the certificate in PEM mode as defined by the Internet RFC 1421 Certificate Encoding standard. See Internet RFC 1421 Certificate Encoding Standard.

If the certificate is read from a file or stdin, then it might be either binary encoded or in printable encoding format, as defined by the RFC 1421 Certificate Encoding standard.

If the SSL server is behind a firewall, then the -J-Dhttps.proxyHost=proxyhost and -J-Dhttps.proxyPort=proxyport options can be specified on the command line for proxy tunneling. See Java Secure Socket Extension (JSSE) Reference Guide at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html

Note: This option can be used independently of a keystore.

-printcrl

-file crl_ {-v}

Reads the Certificate Revocation List (CRL) from the file crl_. A CRL is a list of digital certificates that were revoked by the CA that issued them. The CA generates the crl_ file.

Note: This option can be used independently of a keystore.

-storepasswd

[-new new_storepass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-Jjavaoption}

Changes the password used to protect the integrity of the keystore contents. The new password is new_storepass, which must be at least 6 characters.

-keypasswd

{-alias alias} [-keypass old_keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-Jjavaoption}

Changes the password under which the private/secret key identified by alias is protected, from old_keypass to new_keypass, which must be at least 6 characters.

If the -keypass option is not provided at the command line, and the key password is different from the keystore password, then the user is prompted for it.

If the -new option is not provided at the command line, then the user is prompted for it

-delete

[-alias alias] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Deletes from the keystore the entry identified by alias. The user is prompted for the alias, when no alias is provided at the command line.

-changealias

{-alias alias} [-destalias destalias] [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v} {-protected} {-Jjavaoption}

Move an existing keystore entry from the specified alias to a new alias, destalias. If no destination alias is provided, then the command prompts for one. If the original entry is protected with an entry password, then the password can be supplied with the -keypass option. If no key password is provided, then the storepass (if provided) is attempted first. If the attempt fails, then the user is prompted for a password.

-help

Lists the basic commands and their options.

For more information about a specific command, enter the following, where command_name is the name of the command: keytool -command_name -help.

Examples

This example walks through the sequence of steps to create a keystore for managing public/private key pair and certificates from trusted entities.

Generate the Key Pair

First, create a keystore and generate the key pair. You can use a command such as the following typed as a single line:

keytool -genkeypair -dname "cn=Mark Jones, ou=Java, o=Oracle, c=US"
    -alias business -keypass <new password for private key>
    -keystore /working/mykeystore
    -storepass <new password for keystore> -validity 180

The command creates the keystore named mykeystore in the working directory (assuming it does not already exist), and assigns it the password specified by <new password for keystore>. It generates a public/private key pair for the entity whose distinguished name has a common name of Mark Jones, organizational unit of Java, organization of Oracle and two-letter country code of US. It uses the default DSA key generation algorithm to create the keys; both are 1024 bits.

The command uses the default SHA1withDSA signature algorithm to create a self-signed certificate that includes the public key and the distinguished name information. The certificate is valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias business. The private key is assigned the password specified by <new password for private key>.

The command is significantly shorter when the option defaults are accepted. In this case, no options are required, and the defaults are used for unspecified options that have default values. You are prompted for any required values. You could have the following:

keytool -genkeypair

In this case, a keystore entry with the alias mykey is created, with a newly generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named .keystore in your home directory. The keystore is created when it does not already exist. You are prompted for the distinguished name information, the keystore password, and the private key password.

The rest of the examples assume you executed the -genkeypair command without options specified, and that you responded to the prompts with values equal to those specified in the first -genkeypair command. For example, a distinguished name of cn=Mark Jones, ou=Java, o=Oracle, c=US).

Request a Signed Certificate from a CA

Generating the key pair created a self-signed certificate. A certificate is more likely to be trusted by others when it is signed by a Certification Authority (CA). To get a CA signature, first generate a Certificate Signing Request (CSR), as follows:

keytool -certreq -file MarkJ.csr

This creates a CSR for the entity identified by the default alias mykey and puts the request in the file named MarkJ.csr. Submit this file to a CA, such as VeriSign. The CA authenticates you, the requestor (usually off-line), and returns a certificate, signed by them, authenticating your public key. In some cases, the CA returns a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.

Import a Certificate for the CA

You now need to replace the self-signed certificate with a certificate chain, where each certificate in the chain authenticates the public key of the signer of the previous certificate in the chain, up to a root CA.

Before you import the certificate reply from a CA, you need one or more trusted certificates in your keystore or in the cacerts keystore file. See -importcert in Commands.

  • If the certificate reply is a certificate chain, then you need the top certificate of the chain. The root CA certificate that authenticates the public key of the CA.

  • If the certificate reply is a single certificate, then you need a certificate for the issuing CA (the one that signed it). If that certificate is not self-signed, then you need a certificate for its signer, and so on, up to a self-signed root CA certificate.

The cacerts keystore file ships with several VeriSign root CA certificates, so you probably will not need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key was not added to cacerts, then you must import a certificate from the CA as a trusted certificate.

A certificate from a CA is usually either self-signed or signed by another CA, in which case you need a certificate that authenticates that CA's public key. Suppose company ABC, Inc., is a CA, and you obtain a file named ABCCA.cer that is supposed to be a self-signed certificate from ABC, that authenticates that CA's public key. Be careful to ensure the certificate is valid before you import it as a trusted certificate. View it first with the keytool -printcert command or the keytool -importcert command without the -noprompt option, and make sure that the displayed certificate fingerprints match the expected ones. You can call the person who sent the certificate, and compare the fingerprints that you see with the ones that they show or that a secure public key repository shows. Only when the fingerprints are equal is it guaranteed that the certificate was not replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack takes place, and you did not check the certificate before you imported it, then you would be trusting anything the attacker has signed.

If you trust that the certificate is valid, then you can add it to your keystore with the following command:

keytool -importcert -alias abc -file ABCCA.cer

This command creates a trusted certificate entry in the keystore, with the data from the file ABCCA.cer, and assigns the alias abc to the entry.

Import the Certificate Reply from the CA

After you import a certificate that authenticates the public key of the CA you submitted your certificate signing request to (or there is already such a certificate in the cacerts file), you can import the certificate reply and replace your self-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (when the CA reply is a chain), or one constructed (when the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the cacerts keystore file.

For example, if you sent your certificate signing request to VeriSign, then you can import the reply with the following, which assumes the returned certificate is named VSMarkJ.cer:

keytool -importcert -trustcacerts -file VSMarkJ.cer

Export a Certificate That Authenticates the Public Key

If you used the jarsigner command to sign a Java Archive (JAR) file, then clients that want to use the file will want to authenticate your signature. One way the clients can authenticate you is by first importing your public key certificate into their keystore as a trusted entry.

You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named MJ.cer with the following command that assumes the entry has an alias of mykey:

keytool -exportcert -alias mykey -file MJ.cer

With the certificate and the signed JAR file, a client can use the jarsigner command to authenticate your signature.

Import Keystore

The command importkeystore is used to import an entire keystore into another keystore, which means all entries from the source keystore, including keys and certificates, are all imported to the destination keystore within a single command. You can use this command to import entries from a different type of keystore. During the import, all new entries in the destination keystore will have the same alias names and protection passwords (for secret keys and private keys). If the keytool command cannot recover the private keys or secret keys from the source keystore, then it prompts you for a password. If it detects alias duplication, then it asks you for a new alias, and you can specify a new alias or simply allow the keytool command to overwrite the existing one.

For example, to import entries from a typical JKS type keystore key.jks into a PKCS #11 type hardware-based keystore, use the command:

keytool -importkeystore
    -srckeystore key.jks -destkeystore NONE
    -srcstoretype JKS -deststoretype PKCS11
    -srcstorepass <src keystore password>
    -deststorepass <destination keystore pwd>

The importkeystore command can also be used to import a single entry from a source keystore to a destination keystore. In this case, besides the options you see in the previous example, you need to specify the alias you want to import. With the -srcalias option specified, you can also specify the destination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. The following command demonstrates this:

keytool -importkeystore
    -srckeystore key.jks -destkeystore NONE
    -srcstoretype JKS -deststoretype PKCS11
    -srcstorepass <src keystore password>
    -deststorepass <destination keystore pwd>
    -srcalias myprivatekey -destalias myoldprivatekey
    -srckeypass <source entry password>
    -destkeypass <destination entry password>
    -noprompt

Generate Certificates for an SSL Server

The following are keytool commands to generate key pairs and certificates for three entities: Root CA (root), Intermediate CA (ca), and SSL server (server). Ensure that you store all the certificates in the same keystore. In these examples, RSA is the recommended the key algorithm.

keytool -genkeypair -keystore root.jks -alias root -ext bc:c
keytool -genkeypair -keystore ca.jks -alias ca -ext bc:c
keytool -genkeypair -keystore server.jks -alias server

keytool -keystore root.jks -alias root -exportcert -rfc > root.pem

keytool -storepass <storepass> -keystore ca.jks -certreq -alias ca |
    keytool -storepass <storepass> -keystore root.jks
    -gencert -alias root -ext BC=0 -rfc > ca.pem
keytool -keystore ca.jks -importcert -alias ca -file ca.pem

keytool -storepass <storepass> -keystore server.jks -certreq -alias server |
    keytool -storepass <storepass> -keystore ca.jks -gencert -alias ca
    -ext ku:c=dig,kE -rfc > server.pem
cat root.pem ca.pem server.pem |
    keytool -keystore server.jks -importcert -alias server

Terms

Keystore

A keystore is a storage facility for cryptographic keys and certificates.

Keystore entries

Keystores can have different types of entries. The two most applicable entry types for the keytool command include the following:

Key entries: Each entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain for the corresponding public key. See Certificate Chains. The keytool command can handle both types of entries, while the jarsigner tool only handles the latter type of entry, that is private keys and their associated certificate chains.

Trusted certificate entries: Each entry contains a single public key certificate that belongs to another party. The entry is called a trusted certificate because the keystore owner trusts that the public key in the certificate belongs to the identity identified by the subject (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate.

KeyStore aliases

All keystore entries (key and trusted certificate entries) are accessed by way of unique aliases.

An alias is specified when you add an entity to the keystore with the -genseckey command to generate a secret key, the -genkeypair command to generate a key pair (public and private key), or the -importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent keytool commands must use this same alias to refer to the entity.

For example, you can use the alias duke to generate a new public/private key pair and wrap the public key into a self-signed certificate with the following command. See Certificate Chains.

keytool -genkeypair -alias duke -keypass dukekeypasswd

This example specifies an initial password of dukekeypasswd required by subsequent commands to access the private key associated with the alias duke. If you later want to change Duke's private key password, use a command such as the following:

keytool -keypasswd -alias duke -keypass dukekeypasswd -new newpass

This changes the password from dukekeypasswd to newpass. A password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you do not specify a required password option on a command line, then you are prompted for it.

KeyStore implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, two command-line tools (keytool and jarsigner) and a GUI-based tool named Policy Tool make use of keystore implementations. Because the KeyStore class is public, users can write additional security applications that use it.

There is a built-in default implementation, provided by Oracle. It implements the keystore as a file with a proprietary keystore type (format) named JKS. It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a Service Provider Interface (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that providers must implement. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider in the Java Cryptography Architecture at
http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider.html

Applications can choose different types of keystore implementations from different providers, using the getInstance factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private/secret keys in the keystore and the integrity of the keystore. Keystore implementations of different types are not compatible.

The keytool command works on any file-based keystore implementation. It treats the keystore location that is passed to it at the command line as a file name and converts it to a FileInputStream, from which it loads the keystore information.)The jarsigner and policytool commands can read a keystore from any location that can be specified with a URL.

For keytool and jarsigner, you can specify a keystore type at the command line, with the -storetype option. For Policy Tool, you can specify a keystore type with the Keystore menu.

If you do not explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and resides in the security properties directory, java.home\lib\security on Windows and java.home/lib/security on Oracle Solaris, where java.home is the runtime environment directory. The jre directory in the SDK or the top-level directory of the Java Runtime Environment (JRE).

Each tool gets the keystore.type value and then examines all the currently installed providers until it finds one that implements a keystores of that type. It then uses the keystore implementation from that provider.The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type as specified in the keystore.type property:

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is jks, which is the proprietary type of the keystore implementation provided by Oracle. This is specified by the following line in the security properties file:

keystore.type=jks

To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. For example, if you have a provider package that supplies a keystore implementation for a keystore type called pkcs12, then change the line to the following:

keystore.type=pkcs12

Note: Case does not matter in keystore type designations. For example, JKS would be considered the same as jks.

Certificate

A certificate (or public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key and some other information of another entity (the subject) has some specific value. The following terms are related to certificates:

Public Keys: These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.

Digitally Signed: If some data is digitally signed, then it is stored with the identity of an entity and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key.

Identity: A known way of addressing an entity. In some systems, the identity is the public key, and in others it can be anything from an Oracle Solaris UID to an email address to an X.509 distinguished name.

Signature: A signature is computed over some data using the private key of an entity. The signer, which in the case of a certificate is also known as the issuer.

Private Keys: These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it is supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as public key crypto systems). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.

Entity: An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Public key cryptography requires access to users' public keys. In a large-scale networked environment, it is impossible to guarantee that prior relationships between communicating entities were established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a trusted third party. CAs are entities such as businesses that are trusted to sign (issue) certificates for other entities. It is assumed that CAs only create valid and reliable certificates because they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on.

You can also run your own Certification Authority using products such as Microsoft Certificate Server or the Entrust CA product for your organization. With the keytool command, it is possible to display, import, and export certificates. It is also possible to generate self-signed certificates.

The keytool command currently handles X.509 certificates.

X.509 Certificates

The X.509 standard defines what information can go into a certificate and describes how to write it down (the data format). All the data in a certificate is encoded with two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data.

All X.509 certificates have the following data, in addition to the signature:

Version: This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. The keytool command can import and export v1, v2, and v3 certificates. It generates v3 certificates.

X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject or issuer names over time. Most certificate profile documents strongly recommend that names not be reused and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

X.509 Version 3 is the most recent (1996) and supports the notion of extensions where anyone can define an extension and include it in the certificate. Some common extensions are: KeyUsage (limits the use of the keys to particular purposes such as signing-only) and AlternativeNames (allows other identities to also be associated with this public key, for example. DNS names, email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced or used. For example, if a certificate has the KeyUsage extension marked critical and set to keyCertSign, then when this certificate is presented during SSL communication, it should be rejected because the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

Serial number: The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways. For example, when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).

Signature algorithm identifier: This identifies the algorithm used by the CA to sign the certificate.

Issuer name: The X.500 Distinguished Name of the entity that signed the certificate. See X.500 Distinguished Names. This is typically a CA. Using this certificate implies trusting the entity that signed this certificate. In some cases, such as root or top-level CA certificates, the issuer signs its own certificate.

Validity period: Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate, or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, when the associated private key has not been compromised.

Subject name: The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity. See X.500 Distinguished Names. For example,

CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US

These refer to the subject's common name (CN), organizational unit (OU), organization (O), and country (C).

Subject public key information: This is the public key of the entity being named with an algorithm identifier that specifies which public key crypto system this key belongs to and any associated key parameters.

Certificate Chains

The keytool command can create and manage keystore key entries that each contain a private key and an associated certificate chain. The first certificate in the chain contains the public key that corresponds to the private key.

When keys are first generated, the chain starts off containing a single element, a self-signed certificate. See -genkeypair in Commands. A self-signed certificate is one for which the issuer (signer) is the same as the subject. The subject is the entity whose public key is being authenticated by the certificate. Whenever the -genkeypair command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

Later, after a Certificate Signing Request (CSR) was generated with the -certreq command and sent to a Certification Authority (CA), the response from the CA is imported with -importcert, and the self-signed certificate is replaced by a chain of certificates. See the -certreq and -importcert options in Commands. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject's public key. The next certificate in the chain is one that authenticates the CA's public key.

In many cases, this is a self-signed certificate, which is a certificate from the CA authenticating its own public key, and the last certificate in the chain. In other cases, the CA might return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key entry), but the second certificate in the chain is a certificate signed by a different CA that authenticates the public key of the CA you sent the CSR to. The next certificate in the chain is a certificate that authenticates the second CA's key, and so on, until a self-signed root certificate is reached. Each certificate in the chain (after the first) authenticates the public key of the signer of the previous certificate in the chain.

Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore.

A different reply format (defined by the PKCS #7 standard) includes the supporting certificate chain in addition to the issued certificate. Both reply formats can be handled by the keytool command.

The top-level (root) CA certificate is self-signed. However, the trust into the root's public key does not come from the root certificate itself, but from other sources such as a newspaper. This is because anybody could generate a self-signed certificate with the distinguished name of, for example, the VeriSign root CA. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a vehicle to transport the root CA's public key. Before you add the root CA certificate to your keystore, you should view it with the -printcert option and compare the displayed fingerprint with the well-known fingerprint obtained from a newspaper, the root CA's Web page, and so on.

The cacerts Certificates File

A certificates file named cacerts resides in the security properties directory, java.home\lib\security on Windows and java.home/lib/security on Oracle Solaris, where java.home is the runtime environment's directory, which would be the jre directory in the SDK or the top-level directory of the JRE.

The cacerts file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file with the keytool command by specifying jks as the keystore type. The cacerts keystore file ships with a default set of root CA certificates. You can list the default certificates with the following command:

keytool -list -keystore java.home\lib\security\cacerts

The initial password of the cacerts keystore file is changeit. System administrators should change that password and the default access permission of that file upon installing the SDK.

Note: It is important to verify your cacerts file. Because you trust the CAs in the cacerts file as entities for signing and issuing certificates to other entities, you must manage the cacerts file carefully. The cacerts file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the cacerts file and make your own trust decisions.

To remove an untrusted CA certificate from the cacerts file, use the delete option of the keytool command. You can find the cacerts file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file

Internet RFC 1421 Certificate Encoding Standard

Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as Base64 encoding, makes it easy to export certificates to other applications by email or through some other mechanism.

Certificates read by the -importcert and -printcert commands can be in either this format or binary encoded. The -exportcert command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, when the -rfc option is specified.

The -list command by default prints the SHA1 fingerprint of a certificate. If the -v option is specified, then the certificate is printed in human-readable format. If the -rfc option is specified, then the certificate is output in the printable encoding format.

In its printable encoding format, the encoded certificate is bounded at the beginning and end by the following text:

-----BEGIN CERTIFICATE-----

encoded certificate goes here.

-----END CERTIFICATE-----
X.500 Distinguished Names

X.500 Distinguished Names are used to identify entities, such as those that are named by the subject and issuer (signer) fields of X.509 certificates. The keytool command supports the following subparts:

commonName: The common name of a person such as Susan Jones.

organizationUnit: The small organization (such as department or division) name. For example, Purchasing.

localityName: The locality (city) name, for example, Palo Alto.

stateName: State or province name, for example, California.

country: Two-letter country code, for example, CH.

When you supply a distinguished name string as the value of a -dname option, such as for the -genkeypair command, the string must be in the following format:

CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode

All the italicized items represent actual values and the previous keywords are abbreviations for the following:

CN=commonName
OU=organizationUnit
O=organizationName
L=localityName
S=stateName
C=country

A sample distinguished name string is:

CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US

A sample command using such a string is:

keytool -genkeypair -dname "CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino,
S=California, C=US" -alias mark

Case does not matter for the keyword abbreviations. For example, CN, cn, and Cn are all treated the same.

Order matters; each subcomponent must appear in the designated order. However, it is not necessary to have all the subcomponents. You can use a subset, for example:

CN=Steve Meier, OU=Java, O=Oracle, C=US

If a distinguished name string value contains a comma, then the comma must be escaped by a backslash (\) character when you specify the string on a command line, as in:

cn=Peter Schuster, ou=Java\, Product Development, o=Oracle, c=US

It is never necessary to specify a distinguished name string on a command line. When the distinguished name is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma does not need to be escaped by a backslash (\).

Warnings

Importing Trusted Certificates Warning

Important: Be sure to check a certificate very carefully before importing it as a trusted certificate.

Windows Example:

View the certificate first with the -printcert command or the -importcert command without the -noprompt option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose sends or emails you a certificate that you put it in a file named \tmp\cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as follows:

  keytool -printcert -file \tmp\cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4

Oracle Solaris Example:

View the certificate first with the -printcert command or the -importcert command without the -noprompt option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose someone sends or emails you a certificate that you put it in a file named /tmp/cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as follows:

  keytool -printcert -file /tmp/cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
         SHA256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90:
                 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4

Then call or otherwise contact the person who sent the certificate and compare the fingerprints that you see with the ones that they show. Only when the fingerprints are equal is it guaranteed that the certificate was not replaced in transit with somebody else's certificate such as an attacker's certificate. If such an attack took place, and you did not check the certificate before you imported it, then you would be trusting anything the attacker signed, for example, a JAR file with malicious class files inside.

Note: It is not required that you execute a -printcert command before importing a certificate. This is because before you add a certificate to the list of trusted certificates in the keystore, the -importcert command prints out the certificate information and prompts you to verify it. You can then stop the import operation. However, you can do this only when you call the -importcert command without the -noprompt option. If the -noprompt option is specified, then there is no interaction with the user.

Passwords Warning

Most commands that operate on a keystore require the store password. Some commands require a private/secret key password. Passwords can be specified on the command line in the -storepass and -keypass options. However, a password should not be specified on a command line or in a script unless it is for testing, or you are on a secure system. When you do not specify a required password option on a command line, you are prompted for it.

Certificate Conformance Warning

The Internet standard RFC 5280 has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. See the standard at
http://tools.ietf.org/rfc/rfc5280.txt

The keytool command does not enforce all of these rules so it can generate certificates that do not conform to the standard. Certificates that do not conform to the standard might be rejected by JRE or other applications. Users should ensure that they provide the correct options for -dname, -ext, and so on.

Notes

Import a New Trusted Certificate

Before you add the certificate to the keystore, the keytool command verifies it by attempting to construct a chain of trust from that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore.

If the -trustcacerts option was specified, then additional certificates are considered for the chain of trust, namely the certificates in a file named cacerts.

If the keytool command fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the cacerts file), then the certificate information is printed, and the user is prompted to verify it by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner. Be very careful to ensure the certificate is valid before importing it as a trusted certificate. See Importing Trusted Certificates Warning. The user then has the option of stopping the import operation. If the -noprompt option is specified, then there is no interaction with the user.

Import a Certificate Reply

When you import a certificate reply, the certificate reply is validated with trusted certificates from the keystore, and optionally, the certificates configured in the cacerts keystore file when the -trustcacerts option is specified. See The cacerts Certificates File.

The methods of determining whether the certificate reply is trusted are as follows:

  • If the reply is a single X.509 certificate, then the keytool command attempts to establish a trust chain, starting at the certificate reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates is used to authenticate the certificate reply from the new certificate chain of aliases. If a trust chain cannot be established, then the certificate reply is not imported. In this case, the keytool command does not print the certificate and prompt the user to verify it, because it is very difficult for a user to determine the authenticity of the certificate reply.

  • If the reply is a PKCS #7 formatted certificate chain or a sequence of X.509 certificates, then the chain is ordered with the user certificate first followed by zero or more CA certificates. If the chain ends with a self-signed root CA certificate and the -trustcacerts option was specified, the keytool command attempts to match it with any of the trusted certificates in the keystore or the cacerts keystore file. If the chain does not end with a self-signed root CA certificate and the -trustcacerts option was specified, the keytool command tries to find one from the trusted certificates in the keystore or the cacerts keystore file and add it to the end of the chain. If the certificate is not found and the -noprompt option is not specified, the information of the last certificate in the chain is printed, and the user is prompted to verify it.

If the public key in the certificate reply matches the user's public key already stored with alias, then the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced with a valid keypass, and so the password used to protect the private key of the entry is supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it.

This command was named -import in earlier releases. This old name is still supported in this release. The new name, -importcert, is preferred going forward.

See Also

  • jar(1)

  • jarsigner(1)

  • Trail: Security Features in Java SE at
    http://docs.oracle.com/javase/tutorial/security/index.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


kinit

Obtains and caches Kerberos ticket-granting tickets. This tool is similar in functionality to the kinit tool that is commonly found in other Kerberos implementations, such as SEAM and MIT Reference implementations. The user must be registered as a principal with the Key Distribution Center (KDC) prior to running kinit.

Synopsis

kinit [-fp] [-c cache_name] [-k] [-t keytab_filename] [principal] [password] [-help]]

Description

By default, on Windows, a cache file named USER_HOME\krb5cc_USER_NAME is generated.

The identifier USER_HOME is obtained from the java.lang.System property user.home. USER_NAME is obtained from the java.lang.System property user.name. If USER_HOME is null, the cache file is stored in the current directory from which the program is running. USER_NAME is the operating system's login user name. This user name could be different than the user's principal name. For example, on Windows NT, the cache file could be C:\winnt\profiles\duke\krb5cc_duke, in which duke is the USER_NAME and C:\winnt\profiles\duke is the USER_HOME.

By default, the keytab name is retrieved from the Kerberos configuration file. If the keytab name is not specified in the Kerberos configuration file, the kinit tool assumes that the name is USER_HOME\krb5.keytab

If you do not specify the password using the password option on the command line, the kinit tool prompts you for the password.

Note:

The password option is provided only for testing purposes. Do not specify your password in a script or provide your password on the command line. Doing so will compromise your password.

Commands

You can specify one of the following commands. After the command, specify the options for it.

-A

Do not include addresses.

-f

Issue a forwardable ticket.

-p

Issue a proxiable ticket.

-c cache_name

The cache name (for example, FILE:D:\temp\mykrb5cc).

-k

Use keytab

-t keytab_filename

The keytab name (for example, D:\winnt\profiles\duke\krb5.keytab).

principal

The principal name (for example, duke@example.com).

password

The principal's Kerberos password. Do not specify this on the command line or in a script.

-help

Displays instructions.

Examples

Request credentials valid for authentication from the current client host, for the default services, storing the credentials cache in the default location (C:\winnt\profiles\duke\krb5cc_duke):

kinit duke@example.com

Request proxiable credentials for a different principal and store these credentials in a specified file cache:

kinit -p -c FILE:C:\winnt\profiles\duke\credentials\krb5cc_cafebeef
    cafebeef@example.com

Request proxiable and forwardable credentials for a different principal and store these credentials in a specified file cache:

kinit -f -p -c FILE:C:\winnt\profiles\duke\credentials\krb5cc_cafebeef
    cafebeef@example.com

Display the help menu for the kinit tool:

kinit -help

See Also

  • klist(1)

  • ktab(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


klist

Enables you to view entries in the local credentials cache and key table.

Synopsis

klist [ [-c] [-f] [-e] [-a [-n]] ] [-k [-t] [-K] ] [name] [-help]]

Description

The klist tool displays the entries in the local credentials cache and key table. After you modify the credentials cache with the kinit tool or modify the keytab with the ktab tool, the only way to verify the changes is to view the contents of the credentials cache or keytab using the klist tool. The klist tool does not change the Kerberos database.

Commands

-c

List the credential cache entries. The following are the options for credential cache entries:

-f

Show credential flags.

-e

Show the encryption type.

-a

Show addresses.

-n

If the -a option is specified, do not reverse resolve addresses.

-k

List the keytab entries. The following are the options for keytab entries:

-t

Show keytab entry timestamps.

-K

Show keytab entry DES keys.

name

Specifies the credential cache name or the keytab name. If the name is not specified, the klist tool uses default values for the cache name and keytab. The kinit documentation lists these default values.

-help

Displays instructions.

Examples

List entries in the keytable specified including keytab entry timestamps and DES keys:

klist -k -t -K FILE:\temp\mykrb5cc

List entries in the credentials cache specified including credentials flag and address list:

klist -c -f FILE:\temp\mykrb5cc

See Also

  • kinit(1)

  • ktab(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


ktab

Enables the user to manage the principal names and service keys stored in a local key table. Principal and key pairs listed in the keytab enables services running on a host to authenticate themselves to the Key Distribution Center (KDC). Before configuring a server to use Kerberos, you must setup a keytab on the host running the server. Note that any updates made to the keytab using the ktab tool do not affect the Kerberos database. If you change the keys in the keytab, you must also make the corresponding changes to the Kerberos database.

Synopsis

ktab -help

ktab -l [-e -t] [-k keytab_name]

ktab [-a principal_name password] [-k keytab_name]

ktab [-d principal_name] [etype]] [-k keytab_name]

Description

The ktab tool manages principal name and key pairs in the key table. The ktab tool enables you to list, add, update or delete principal names and key pairs in the key table. None of these operations affect the Kerberos database.

A keytab is a host's copy of its own keylist, which is analogous to a user's password. An application server that needs to authenticate itself to the Key Distribution Center (KDC) must have a keytab which contains its own principal and key. Just as it is important for users to protect their passwords, it is equally important for hosts to protect their keytabs. You should always store keytab files on the local disk and make them readable only by root. You should never send a keytab file over a network in the clear.

Commands

-l [-e -t]

List the keytab name and entries. When -e is specified, the encryption type for each entry is displayed. When -t is specified, timestamp for each entry is displayed.

-a principal_name password

Add an entry to the keytab. No changes are made to the Kerberos database. Do not specify the password on the command line or in a script.

-d principal_name [etype]

Delete one or more entries from the keytab. No changes are made to the Kerberos database. When etype is provided, only the entry matching this encryption type is deleted. Otherwise, all entries are deleted.

-k keytab_name

Specify keytab name and path with the FILE: prefix.

-help

Displays instructions.

Examples

List all the entries in the default keytable:

ktab -l

Add a new principal to the key table (note that you will be prompted for your password):

ktab -a duke@example.com

Delete a principal from the key table:

ktab -d duke@example.com

Security Alert

Do not specify your password on the command line. Doing so is a security vulnerability. For example, an attacker could discover your password while running the UNIX ps command.

See Also

  • kinit(1)

  • klist(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


rmic

Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP). Also generates Object Management Group (OMG) Interface Definition Language (IDL)

Synopsis

rmic [ options ] package-qualified-class-names

options

The command-line options. See Options.

package-qualified-class-names

Class names that include their packages, for example, java.awt.Color.

Description

Deprecation Note: Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated. Oracle recommends that you use dynamically generated JRMP stubs instead, eliminating the need to use this tool for JRMP-based applications. See the java.rmi.server.UnicastRemoteObject specification at http://docs.oracle.com/javase/8/docs/api/java/rmi/server/UnicastRemoteObject.html for further information.

The rmic compiler generates stub and skeleton class files using the Java Remote Method Protocol (JRMP) and stub and tie class files (IIOP protocol) for remote objects. These class files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface java.rmi.Remote. The class names in the rmic command must be for classes that were compiled successfully with the javac command and must be fully package qualified. For example, running the rmic command on the class file name HelloImpl as shown here creates the HelloImpl_Stub.class file in the hello subdirectory (named for the class's package):

rmic hello.HelloImpl

A skeleton for a remote object is a JRMP protocol server-side entity that has a method that dispatches calls to the remote object implementation.

A tie for a remote object is a server-side entity similar to a skeleton, but communicates with the client with the IIOP protocol.

A stub is a client-side proxy for a remote object that is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub.

By default, the rmic command generates stub classes that use the 1.2 JRMP stub protocol version only, as though the -v1.2 option was specified. The -vcompat option was the default in releases before 5.0. Use the -iiop option to generate stub and tie classes for the IIOP protocol. See Options.

A stub implements only the remote interfaces, and not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object, a client can use the Java programming language built-in operators for casting and type checking. For IIOP, the PortableRemoteObject.narrow method must be used.

Options

-bootclasspath path

Overrides the location of bootstrap class files.

-classpath path

Specifies the path the rmic command uses to look up classes. This option overrides the default or the CLASSPATH environment variable when it is set. Directories are separated by semicolons. The general format for path is: .;<your_path>, for example: .;/usr/local/java/classes.

-d directory

Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the following command places the stub and skeleton classes derived from MyClass into the directory C:\java\classes\exampleclass

rmic -d C:\java\classes exampleclass.MyClass

If the -d option is not specified, then the default behavior is as though -d . was specified. The package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. In some earlier versions of the rmic command, if the -d option was not specified, then the package hierarchy was not created, and all of the output files were placed directly in the current directory.

-extdirs path

Overrides the location of installed extensions.

-g

Enables the generation of all debugging information, including local variables. By default, only line number information is generated.

-idl

Causes the rmic command to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language-independent way to specify an API for an object. The IDL is used as a specification for methods and data that can be written in and called from any language that provides CORBA bindings. This includes Java and C++ among others. See Java IDL: IDL to Java Language Mapping at
http://docs.oracle.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping.html

When the -idl option is used, other options also include:

  • The -always or -alwaysgenerate options force regeneration even when existing stubs/ties/IDL are newer than the input class.

  • The -factory option uses the factory keyword in generated IDL.

  • The -idlModule from JavaPackage[.class] toIDLModule specifies IDLEntity package mapping, for example: -idlModule my.module my::real::idlmod.

  • -idlFile fromJavaPackage[.class] toIDLFile specifies IDLEntity file mapping, for example: -idlFile test.pkg.X TEST16.idl.

-iiop

Causes the rmic command to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client reference to a remote object is a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

If you call the rmic command with the -iiop, then it generates stubs and ties that conform to this naming convention:

_<implementationName>_stub.class
_<interfaceName>_tie.class

  • When you use the -iiop option, other options also include:

  • The -always or -alwaysgenerate options force regeneration even when existing stubs/ties/IDL are newer than the input class.

  • The -nolocalstubs option means do not create stubs optimized for same-process clients and servers.

  • The -noValueMethods option must be used with the -idl option. The -noValueMethods option prevents the addition of valuetype methods and initializers to emitted IDL. These methods and initializers are optional for valuetypes, and are generated unless the -noValueMethods option is specified with the -idl option.

  • The -poa option changes the inheritance from org.omg.CORBA_2_3.portable.ObjectImpl to org.omg.PortableServer.Servant. The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00-01-08.pdf.

-J

Used with any Java command, the -J option passes the argument that follows the -J (no spaces between the -J and the argument) to the Java interpreter

-keep or -keepgenerated

Retains the generated .java source files for the stub, skeleton, and tie classes and writes them to the same directory as the .class files.

-nowarn

Turns off warnings. When the -nowarn options is used. The compiler does not print out any warnings.

-nowrite

Does not write compiled classes to the file system.

-vcompat (deprecated)

Generates stub and skeleton classes that are compatible with both the 1.1 and 1.2 JRMP stub protocol versions. This option was the default in releases before 5.0. The generated stub classes use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large to support both modes of operation. Note: This option has been deprecated. See Description.

-verbose

Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.

-v1.1 (deprecated)

Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. The -v1.1 option is only useful for generating stub classes that are serialization-compatible with preexisting, statically deployed stub classes that were generated by the rmic command from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used). Note: This option has been deprecated. See Description.

-v1.2 (deprecated)

(Default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes do not work when they are loaded into a JDK 1.1 virtual machine. Note: This option has been deprecated. See Description.

Environment Variables

CLASSPATH

Used to provide the system a path to user-defined classes. Directories are separated by colons, for example: .;C:\usr\local\java\classes.

See Also

  • javac(1)

  • java(1)

  • Setting the Class Path

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


rmid

Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM).

Synopsis

rmid [options]

options

The command-line options. See Options.

Description

The rmid command starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM. For details on how to write programs that use activatable objects, the Using Activation tutorial at http://docs.oracle.com/javase/8/docs/technotes/guides/rmi/activation/overview.html

Start the daemon by executing the rmid command and specifying a security policy file, as follows:

rmid -J-Djava.security.policy=rmid.policy

When you run Oracle's implementation of the rmid command, by default you must specify a security policy file so that the rmid command can verify whether or not the information in each ActivationGroupDesc is allowed to be used to start a JVM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any properties passed to an ActivationGroupDesc constructor must now be explicitly allowed in the security policy file for the rmid command. The value of the sun.rmi.activation.execPolicy property dictates the policy that the rmid command uses to determine whether or not the information in an ActivationGroupDesc can be used to start a JVM for an activation group. For more information see the description of the -J-Dsun.rmi.activation.execPolicy=policy option.

Executing the rmid command starts the Activator and an internal registry on the default port1098 and binds an ActivationSystem to the name java.rmi.activation.ActivationSystem in this internal registry.

To specify an alternate port for the registry, you must specify the -port option when you execute the rmid command. For example, the following command starts the activation system daemon and a registry on the registry's default port, 1099.

rmid -J-Djava.security.policy=rmid.policy -port 1099

Options

-Coption

Specifies an option that is passed as a command-line argument to each child process (activation group) of the rmid command when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon:

rmid -C-Dsome.property=value

This ability to pass command-line arguments to child processes can be useful for debugging. For example, the following command enables server-call logging in all child JVMs.

rmid -C-Djava.rmi.server.logCalls=true
-Joption

Specifies an option that is passed to the Java interpreter running RMID. For example, to specify that the rmid command use a policy file named rmid.policy, the -J option can be used to define the java.security.policy property on the rmid command line, for example:

rmid -J-Djava.security.policy-rmid.policy
-J-Dsun.rmi.activation.execPolicy=policy

Specifies the policy that RMID employs to check commands and command-line options used to start the JVM in which an activation group runs. Please note that this option exists only in Oracle's implementation of the Java RMI activation daemon. If this property is not specified on the command line, then the result is the same as though -J-Dsun.rmi.activation.execPolicy=default were specified. The possible values of policy can be default, policyClassName, or none.

  • default

    The default or unspecified value execPolicy allows the rmid command to execute commands with specific command-line options only when the rmid command was granted permission to execute those commands and options in the security policy file that the rmid command uses. Only the default activation group implementation can be used with the default execution policy.

    The rmid command starts a JVM for an activation group with the information in the group's registered activation group descriptor, an ActivationGroupDesc. The group descriptor specifies an optional ActivationGroupDesc.CommandEnvironment that includes the command to execute to start the activation group and any command-line options to be added to the command line. By default, the rmid command uses the java command found in java.home. The group descriptor also contains properties overrides that are added to the command line as options defined as: -D<property>=<value>.The com.sun.rmi.rmid.ExecPermission permission grants the rmid command permission to execute a command that is specified in the group descriptor's CommandEnvironment to start an activation group. The com.sun.rmi.rmid.ExecOptionPermission permission enables the rmid command to use command-line options, specified as properties overrides in the group descriptor or as options in the CommandEnvironment when starting the activation group.When granting the rmid command permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission must be granted to all code sources.

    ExecPermission

    The ExecPermission class represents permission for the rmid command to execute a specific command to start an activation group.

    Syntax: The name of an ExecPermission is the path name of a command to grant the rmid command permission to execute. A path name that ends in a slash (/) and an asterisk (*) indicates that all of the files contained in that directory where slash is the file-separator character, File.separatorChar. A path name that ends in a slash (/) and a minus sign (-) indicates all files and subdirectories contained in that directory (recursively). A path name that consists of the special token <<ALL FILES>> matches any file.

    A path name that consists of an asterisk (*) indicates all the files in the current directory. A path name that consists of a minus sign (-) indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

    ExecOptionPermission

    The ExecOptionPermission class represents permission for the rmid command to use a specific command-line option when starting an activation group. The name of an ExecOptionPermission is the value of a command-line option.

    Syntax: Options support a limited wild card scheme. An asterisk signifies a wild card match, and it can appear as the option name itself (matches any option), or an asterisk (*) can appear at the end of the option name only when the asterisk (*) follows a dot (.) or an equals sign (=).

    For example: * or -Dmydir.* or -Da.b.c=* is valid, but *mydir or -Da*b or ab* is not.

    Policy file for rmid

    When you grant the rmid command permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission must be granted to all code sources (universally). It is safe to grant these permissions universally because only the rmid command checks these permissions.

    An example policy file that grants various execute permissions to the rmid command is:

    grant {
    permission com.sun.rmi.rmid.ExecPermission
        "c:\\files\\apps\\java\\jdk1.7.0\\win\\bin\\java";

    permission com.sun.rmi.rmid.ExecPermission
        "c:\\files\\apps\\rmidcmds\\*";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Djava.security.policy=c:\\files\\policies\\group.policy";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Djava.security.debug=*";

    permission com.sun.rmi.rmid.ExecOptionPermission
        "-Dsun.rmi.*";
};

    The first permission granted allows the rmid command to execute the 1.7.0 release of the java command, specified by its explicit path name. By default, the version of the java command found in java.home is used (the same one that the rmid command uses), and does not need to be specified in the policy file. The second permission allows the rmid command to execute any command in the directory c:\files\apps\rmidcmds\.

    The third permission granted, an ExecOptionPermission, allows the rmid command to start an activation group that defines the security policy file to be c:\files\policies\group.policy. The next permission allows the java.security.debug property to be used by an activation group. The last permission allows any property in the sun.rmi property name hierarchy to be used by activation groups.

    To start the rmid command with a policy file, the java.security.policy property needs to be specified on the rmid command line, for example:

    rmid -J-Djava.security.policy=rmid.policy.

  • <policyClassName>

    If the default behavior is not flexible enough, then an administrator can provide, when starting the rmid command, the name of a class whose checkExecCommand method is executed to check commands to be executed by the rmid command.

    The policyClassName specifies a public class with a public, no-argument constructor and an implementation of the following checkExecCommand method:

     public void checkExecCommand(ActivationGroupDesc desc, String[] command)
        throws SecurityException;

    Before starting an activation group, the rmid command calls the policy's checkExecCommand method and passes to it the activation group descriptor and an array that contains the complete command to start the activation group. If the checkExecCommand throws a SecurityException, then the rmid command does not start the activation group and an ActivationException is thrown to the caller attempting to activate the object.

  • none

    If the sun.rmi.activation.execPolicy property value is none, then the rmid command does not perform any validation of commands to start activation groups.

-log dir

Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a log, in the directory in which the rmid command was executed.

-port port

Specifies the port the registry uses. The activation system daemon binds the ActivationSystem, with the name java.rmi.activation.ActivationSystem, in this registry. The ActivationSystem on the local machine can be obtained using the following Naming.lookup method call:

import java.rmi.*;
    import java.rmi.activation.*;

    ActivationSystem system; system = (ActivationSystem)
    Naming.lookup("//:port/java.rmi.activation.ActivationSystem");
-stop

Stops the current invocation of the rmid command for a port specified by the -port option. If no port is specified, then this option stops the rmid invocation running on port 1098.

Environment Variables

CLASSPATH

Used to provide the system a path to user-defined classes. Directories are separated by semicolons, for example: .;C:\usr\local\java\classes.

See Also

  • java(1)

  • Setting the Class Path

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Security

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

6 Security

These commands set security policies on your local system and create applications that can work within the scope of the security policies set at remote sites.

This section contains the following commands:

keytool: Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

jarsigner: Signs and verifies Java Archive (JAR) files.

policytool: Reads and writes a plain text policy file based on user input through the utility GUI.

kinit: Obtains Kerberos v5 tickets.

klist: Lists entries in credential cache and keytab.

ktab: Manages entries in the key table.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


servertool

Provides an easy-to-use interface for developers to register, unregister, start up, and shut down a persistent server.

Synopsis

servertool -ORBInitialPort nameserverport [ options ] [ commands ]

options

The command-line options. See Options.

commands

The command-line commands. See Commands.

If you did not enter a command when starting servertool, the command-line tool displays with a servertool > prompt. Enter commands at the servertool > prompt.

If you enter a command when starting servertool, the Java IDL Server Tool starts, runs the command, and exits.

The -ORBInitialPort nameserverport option is required. The value for nameserverport must specify the port on which orbd is running and listening for incoming requests.

Description

The servertool command provides the command-line interface for developers to register, unregister, start up, and shut down a persistent server. Command-line commands let you obtain various statistical information about the server. See Commands.

Options

-ORBInitialHost nameserverhost

This options is required. It specifies the host machine on which the name server runs and listens for incoming requests. The nameserverhost value must specify the port on which the orb is running and listening for requests. The value defaults to localhost when this option is not specified. If orbd and servertool are running on different machines, then you must specify the name or IP address of the host on which orbd is running.

-Joption

Passes option to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher. For example, -J-Xms48m sets the startup memory to 48 MB. See java(1).

Commands

You can start the servertool command with or without a command-line command.

  • If you did not specify a command when you started servertool, then the command-line tool displays the servertool prompt where you can enter commands: servertool >.

  • If you specify a command when you start servertool, then the Java IDL Server Tool starts, executes the command, and exits.

register -server server-class-name -classpath classpath-to-server [ -applicationName application-name -args args-to-server -vmargs flags-for-JVM ]

Registers a new persistent server with the Object Request Broker Daemon (ORBD). If the server is not already registered, then it is registered and activated. This command causes an installation method to be called in the main class of the server identified by the -server option. The installation method must be public static void install(org.omg.CORBA.ORB). The install method is optional and lets developers provide their own server installation behavior, such as creating a database schema.

unregister -serverid server-id | -applicationName application-name

Unregisters a server from the ORBD with either its server ID or its application name. This command causes an uninstallation method to be called in the main class of the server identified by the -server option. The uninstall method must be public static void uninstall(org.omg.CORBA.ORB). The uninstall method is optional and lets developers provide their own server uninstallation behavior, such as undoing the behavior of the install method.

getserverid -applicationName application-name

Returns the server ID that corresponds to the application-name value.

list

Lists information about all persistent servers registered with the ORBD.

listappnames

Lists the application names for all servers currently registered with the ORBD.

listactive

Lists information about all persistent servers that were started by the ORBD and are currently running.

locate -serverid server-id | -applicationName application-name [ -endpointType endpointType ]

Locates the endpoints (ports) of a specific type for all ORBs created by a registered server. If a server is not already running, then it is activated. If an endpointType value is not specified, then the plain/non-protected endpoint associated with each ORB in a server is returned.

locateperorb -serverid server-id | -applicationName application-name [ -orbid ORB-name ]

Locates all the endpoints (ports) registered by a specific Object Request Broker (ORB) of registered server. If a server is not already running, then it is activated. If an orbid is not specified, then the default value of "" is assigned to the orbid. If any ORBs are created with an orbid of empty string, then all ports registered by it are returned.

orblist -serverid server-id | -applicationName application-name

Lists the ORBId of the ORBs defined on a server. An ORBId is the string name for the ORB created by the server. If the server is not already running, then it is activated.

shutdown -serverid server-id | -applicationName application-name

Shut down an active server that is registered with ORBD. During execution of this command, the shutdown method defined in the class specified by either the -serverid or -applicationName parameter is also called to shut down the server process.

startup -serverid server-id | -applicationName application-name

Starts up or activate a server that is registered with ORBD. If the server is not running, then this command starts the server. If the server is already running, then an error message is displayed.

help

Lists all the commands available to the server through the servertool command.

quit

Exits the servertool command.

See Also

  • orbd(1)

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Setting the Class Path

Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents Previous Next

2 Setting the Class Path

The class path is the path that the Java Runtime Environment (JRE) searches for classes and other resource files.

This chapter covers the following topics:

  • Synopsis

  • Description

  • JDK Commands Class Path Options

  • CLASSPATH Environment Variable

  • Class Path Wild Cards

  • Class Path and Package Names

Synopsis

The class search path (class path) can be set using either the -classpath option when calling a JDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.

sdkTool -classpath classpath1:classpath2...

set CLASSPATH=classpath1;classpath2...

sdkTool

A command-line tool, such as java, javac, javadoc, or apt. For a listing, see JDK Tools and Utilities at
http://docs.oracle.com/javase/8/docs/technotes/tools/index.html

classpath1:classpath2

Class paths to the JAR, zip or class files. Each class path should end with a file name or directory depending on what you are setting the class path to, as follows:

  • For a JAR or zip file that contains class files, the class path ends with the name of the zip or JAR file.

  • For class files in an unnamed package, the class path ends with the directory that contains the class files.

  • For class files in a named package, the class path ends with the directory that contains the root package, which is the first package in the full package name.

Multiple path entries are separated by semicolons with no spaces around the equals sign (=) in Windows and colons in Oracle Solaris.

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, then you must include a dot (.) in the new settings.

Class path entries that are neither directories nor archives (.zip or JAR files) nor the asterisk (*) wildcard character are ignored.

Description

The class path tells the JDK tools and applications where to find third-party and user-defined classes that are not extensions or part of the Java platform. See The Extension Mechanism at
http://docs.oracle.com/javase/8/docs/technotes/guides/extensions/index.html

The class path needs to find any classes you have compiled with the javac compiler. The default is the current directory to conveniently enable those classes to be found.

The JDK, the JVM and other JDK tools find classes by searching the Java platform (bootstrap) classes, any extension classes, and the class path, in that order. For details about the search strategy, see How Classes Are Found at
http://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html

Class libraries for most applications use the extensions mechanism. You only need to set the class path when you want to load a class that is (a) not in the current directory or in any of its subdirectories, and (b) not in a location specified by the extensions mechanism.

If you upgrade from an earlier release of the JDK, then your startup settings might include CLASSPATH settings that are no longer needed. You should remove any settings that are not application-specific, such as classes.zip. Some third-party applications that use the Java Virtual Machine (JVM) can modify your CLASSPATH environment variable to include the libraries they use. Such settings can remain.

You can change the class path by using the -classpath or -cp option of some Java commands when you call the JVM or other JDK tools or by using the CLASSPATH environment variable. See JDK Commands Class Path Options. Using the -classpath option is preferred over setting the CLASSPATH environment variable because you can set it individually for each application without affecting other applications and without other applications modifying its value. See CLASSPATH Environment Variable.

Classes can be stored in directories (folders) or in archive files. The Java platform classes are stored in rt.jar. For more details about archives and information about how the class path works, see Class Path and Package Names.

Note: Some earlier releases of the JDK had a <jdk-dir>/classes entry in the default class path. That directory exists for use by the JDK software and should not be used for application classes. Application classes should be placed in a directory outside of the JDK directory hierarchy. That way, installing a new JDK does not force you to reinstall application classes. For compatibility with earlier releases, applications that use the <jdk-dir>/classes directory as a class library run in the current release, but there is no guarantee that they will run in future releases.

JDK Commands Class Path Options

The following commands have a -classpath option that replaces the path or paths specified by the CLASSPATH environment variable while the tool runs: java, jdb, javac, javah and jdeps.

The -classpath option is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.The java command also has a -cp option that is an abbreviation for -classpath.

For very special cases, both the java and javac commands have options that let you change the path they use to find their own class libraries. Most users will never need to use those options.

CLASSPATH Environment Variable

As explained in JDK Commands Class Path Options, the -classpath command-line option is preferred over the CLASSPATH environment variable. However, if you decide to use the CLASSPATH environment variable, this section explains how to set and clear it.

Set CLASSPATH

The CLASSPATH environment variable is modified with the set command. The format is:

set CLASSPATH=path1;path2
...

The paths should begin with the letter specifying the drive, for example, C:\. That way, the classes will still be found if you happen to switch to a different drive. If the path entries start with backslash (\) and you are on drive D:, for example, then the classes will be expected on D:, rather than C:.

Clear CLASSPATH

If your CLASSPATH environment variable was set to a value that is not correct, or if your startup file or script is setting an incorrect path, then you can unset CLASSPATH with:

set CLASSPATH=

This command unsets CLASSPATH for the current command prompt window only. You should also delete or modify your startup settings to ensure that you have the correct CLASSPATH settings in future sessions.

Change Startup Settings

If the CLASSPATH variable is set at system startup, then the place to look for it depends on your operating system:

Windows 95 and 98: Examine autoexec.bat for the set command.

Other (Windows NT, Windows 2000, ...): The CLASSPATH environment variable can be set with the System utility in the Control Panel.

If the CLASSPATH variable is set at system startup, then the place to look for it depends on the shell you are running:

The csh, tcsh shells: Examine your .cshrc file for the setenv command.

The sh, ksh shells: Examine your .profile file for the export command.

Class Path Wild Cards

Class path entries can contain the base name wildcard character (*), which is considered equivalent to specifying a list of all of the files in the directory with the extension .jar or .JAR. For example, the class path entry mydir/* specifies all JAR files in the directory named mydir. A class path entry consisting of * expands to a list of all the jar files in the current directory. Files are considered regardless of whether they are hidden (have names beginning with '.').

A class path entry that contains an asterisk (*) does not match class files. To match both classes and JAR files in a single directory mydir, use either mydir:mydir/* or mydir/*:mydir. The order chosen determines whether the classes and resources in mydir are loaded before JAR files in mydir or vice versa.

Subdirectories are not searched recursively. For example, mydir/* searches for JAR files only in mydir, not in mydir/subdir1, mydir/subdir2, and so on.

The order in which the JAR files in a directory are enumerated in the expanded class path is not specified and may vary from platform to platform and even from moment to moment on the same machine. A well-constructed application should not depend upon any particular order. If a specific order is required, then the JAR files can be enumerated explicitly in the class path.

Expansion of wild cards is done early, before the invocation of a program's main method, rather than late, during the class-loading process. Each element of the input class path that contains a wildcard is replaced by the (possibly empty) sequence of elements generated by enumerating the JAR files in the named directory. For example, if the directory mydir contains a.jar, b.jar, and c.jar, then the class path mydir/* is expanded into mydir/a.jar:mydir/b.jar:mydir/c.jar, and that string would be the value of the system property java.class.path.

The CLASSPATH environment variable is not treated any differently from the -classpath or -cp options. Wild cards are honored in all of these cases. However, class path wild cards are not honored in the Class-Path jar-manifest header.

Class Path and Package Names

Java classes are organized into packages that are mapped to directories in the file system. But, unlike the file system, whenever you specify a package name, you specify the whole package name and never part of it. For example, the package name for java.awt.Button is always specified as java.awt.

For example, suppose you want the Java JRE to find a class named Cool.class in the package utility.myapp. If the path to that directory is C:\java\MyClasses\utility\myapp, then you would set the class path so that it contains C:\java\MyClasses. To run that application, you could use the following java command:

java -classpath C:\java\MyClasses utility.myapp.Cool

The entire package name is specified in the command. It is not possible, for example, to set the class path so it contains C:\java\MyClasses\utility and use the command java myapp.Cool. The class would not be found.

You might wonder what defines the package name for a class. The answer is that the package name is part of the class and cannot be modified, except by recompiling the class.

An interesting consequence of the package specification mechanism is that files that are part of the same package can exist in different directories. The package name is the same for each class, but the path to each file might start from a different directory in the class path.

Folders and Archive Files

When classes are stored in a directory (folder), such as c:\java\MyClasses\utility\myapp, then the class path entry points to the directory that contains the first element of the package name (in this case, C:\java\MyClasses, because the package name is utility.myapp).

When classes are stored in an archive file (a zip or JAR file) the class path entry is the path to and including the zip or JAR file. For example, the command to use a class library that is in a JAR file as follows:

java -classpath C:\java\MyClasses\myclasses.jar utility.myapp.Cool

Multiple Specifications

To find class files in the directory C:\java\MyClasses and classes in C:\java\OtherClasses, you would set the class path to the following. Note that the two paths are separated by a semicolon.

java -classpath C:\java\MyClasses;C:\java\OtherClasses ...

Specification Order

The order in which you specify multiple class path entries is important. The Java interpreter will look for classes in the directories in the order they appear in the class path variable. In the previous example, the Java interpreter will first look for a needed class in the directory C:\java\MyClasses. Only when it does not find a class with the proper name in that directory will the interpreter look in the C:\java\OtherClasses directory.

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Table of Contents

Documentation Contents
Java Platform, Standard Edition Tools Reference
Next

Contents

Title and Copyright Information

Preface

  • Audience
  • Documentation Accessibility
  • Related Documents
  • Conventions

1 How Classes are Found

  • How the Java Runtime Finds Classes
    • How the Java Runtime Finds Bootstrap Classes
    • How the Java Runtime Finds Extension Classes
    • How the Java Runtime Finds User Classes
    • How the Java Runtime Finds JAR-class-path Classes
  • How the javac and javadoc Commands Find Classes
  • Class Loading and Security Policies

2 Setting the Class Path

  • Synopsis
  • Description
  • JDK Commands Class Path Options
  • CLASSPATH Environment Variable
    • Set CLASSPATH
    • Clear CLASSPATH
    • Change Startup Settings
  • Class Path Wild Cards
  • Class Path and Package Names
    • Folders and Archive Files
    • Multiple Specifications
    • Specification Order

3 JDK and JRE File Structure

  • Demos and Samples
  • Development Files and Directories
  • Additional Files and Directories

4 Command Reference

  • Command Reference Pages
    • Create and Build Applications
    • Security
    • Internationalization
    • Remote Method Invocation (RMI)
    • Java IDL and RMI-IIOP
    • Deploy Applications and Applets
    • Java Web Start
    • Monitor Java Applications
    • Monitor the Java Virtual Machine
    • Web Services
    • Troubleshooting
    • Scripting

5 Create and Build Applications

  • appletviewer
  • extcheck
  • jar
  • java
  • javac
  • javadoc
  • javah
  • javap
  • jdb
  • jdeps

6 Security

  • keytool
  • jarsigner
  • policytool
  • kinit
  • klist
  • ktab

7 Internationalization

  • native2ascii

8 Remote Method Invocation (RMI)

  • rmic
  • rmiregistry
  • rmid
  • serialver

9 Java IDL and RMI-IIOP

  • tnameserv
  • idlj
  • orbd
  • servertool

10 Deploy Applications and Applets

  • pack200
  • unpack200
  • javafxpackager

11 Java Web Start

  • javaws

12 Monitor Java Applications

  • jconsole
  • jvisualvm

13 Monitor the JVM

  • jps
  • jstat
  • jstatd
  • jmc

14 Web Services

  • schemagen
  • wsgen
  • wsimport
  • xjc

15 Troubleshooting

  • jcmd
  • jinfo
  • jhat
  • jmap
  • jsadebugd
  • jstack

16 Scripting

  • jrunscript
  • jjs
Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


wsgen

Reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation.

Synopsis

wsgen [ options ] SEI

options

The command-line options. See Options.

SEI

The web service endpoint implementation class (SEI) to be read.

Description

The wsgen command generates JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment and invocation. JAXWS 2.1.1 RI also provides a wsgen Ant task, see the Tools tab of the JAX-WS (wsgen) page at
http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html

To start the wsgen command, do the following:

set JAXWS_HOME=c:\pathto\jaxws-ri
%JAXWS_HOME%\bin\wsgen.bat -help

Options

-classpath path

The location of the input class files.

-cp path

The location of the input class files.

-d directory

The location for where to place generated output files.

-extension

Allow vendor extensions. Use of extensions can result in applications that are not portable or that do not work with other implementations.

-help

Displays a help message about the wsgen command.

-keep

Keeps the generated files.

-r directory

Uses this option with the -wsdl option to specify where to place generated resource files such as WSDLs.

-s directory

The location for where to place generated source files.

-verbose

Displays compiler messages.

-version

Prints release information.

-wsdl [ :protocol ]

An optional command that generates a WSDL file to review before endpoint deployment. The WSDL files contains a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.

By default the wsgen command does not generate a WSDL file. The protocol value is optional and is used to specify what protocol should be used for the WSDL binding (wsdl:binding). Valid protocols are soap1.1 and Xsoap1.2. The default is soap1.1. The Xsoap1.2 protocol is not standard and can only be used with the -extension option.

-servicename name

Used only with the -wsdl option to specify a particular WSDL service (wsdl:service) name to be generated in the WSDL, for example: -servicename "{http://mynamespace/}MyService".

-portname name

Used only with the -wsdl option to specify a particular WSDL port (wsdl:port) name to be generated in the WSDL, for example: -portname "{http://mynamespace/}MyPort".

Examples

The following example generates the wrapper classes for StockService with @WebService annotations inside stock directory.

wsgen -d stock -cp myclasspath stock.StockService

The following example generates a SOAP 1.1 WSDL and schema for the stock.StockService class with @WebService annotations.

wsgen -wsdl -d stock -cp myclasspath stock.StockService

The following example generates a SOAP 1.2 WSDL.

wsgen -wsdl:Xsoap1.2 -d stock -cp myclasspath stock.StockService

Note: You do not have to generate WSDL at development time because the JAXWS run time environment generates a WSDL for you when you deploy your service.

See Also

  • wsimport(1)

  • The Tools tab of the JAX-WS (wsgen) page
    http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html

Contents Previous Next
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Overview List

Java™ Platform
Standard Ed. 8

All ClassesAll Profiles

Packages

  • java.applet
  • java.awt
  • java.awt.color
  • java.awt.datatransfer
  • java.awt.dnd
  • java.awt.event
  • java.awt.font
  • java.awt.geom
  • java.awt.im
  • java.awt.im.spi
  • java.awt.image
  • java.awt.image.renderable
  • java.awt.print
  • java.beans
  • java.beans.beancontext
  • java.io
  • java.lang
  • java.lang.annotation
  • java.lang.instrument
  • java.lang.invoke
  • java.lang.management
  • java.lang.ref
  • java.lang.reflect
  • java.math
  • java.net
  • java.nio
  • java.nio.channels
  • java.nio.channels.spi
  • java.nio.charset
  • java.nio.charset.spi
  • java.nio.file
  • java.nio.file.attribute
  • java.nio.file.spi
  • java.rmi
  • java.rmi.activation
  • java.rmi.dgc
  • java.rmi.registry
  • java.rmi.server
  • java.security
  • java.security.acl
  • java.security.cert
  • java.security.interfaces
  • java.security.spec
  • java.sql
  • java.text
  • java.text.spi
  • java.time
  • java.time.chrono
  • java.time.format
  • java.time.temporal
  • java.time.zone
  • java.util
  • java.util.concurrent
  • java.util.concurrent.atomic
  • java.util.concurrent.locks
  • java.util.function
  • java.util.jar
  • java.util.logging
  • java.util.prefs
  • java.util.regex
  • java.util.spi
  • java.util.stream
  • java.util.zip
  • javax.accessibility
  • javax.activation
  • javax.activity
  • javax.annotation
  • javax.annotation.processing
  • javax.crypto
  • javax.crypto.interfaces
  • javax.crypto.spec
  • javax.imageio
  • javax.imageio.event
  • javax.imageio.metadata
  • javax.imageio.plugins.bmp
  • javax.imageio.plugins.jpeg
  • javax.imageio.spi
  • javax.imageio.stream
  • javax.jws
  • javax.jws.soap
  • javax.lang.model
  • javax.lang.model.element
  • javax.lang.model.type
  • javax.lang.model.util
  • javax.management
  • javax.management.loading
  • javax.management.modelmbean
  • javax.management.monitor
  • javax.management.openmbean
  • javax.management.relation
  • javax.management.remote
  • javax.management.remote.rmi
  • javax.management.timer
  • javax.naming
  • javax.naming.directory
  • javax.naming.event
  • javax.naming.ldap
  • javax.naming.spi
  • javax.net
  • javax.net.ssl
  • javax.print
  • javax.print.attribute
  • javax.print.attribute.standard
  • javax.print.event
  • javax.rmi
  • javax.rmi.CORBA
  • javax.rmi.ssl
  • javax.script
  • javax.security.auth
  • javax.security.auth.callback
  • javax.security.auth.kerberos
  • javax.security.auth.login
  • javax.security.auth.spi
  • javax.security.auth.x500
  • javax.security.cert
  • javax.security.sasl
  • javax.sound.midi
  • javax.sound.midi.spi
  • javax.sound.sampled
  • javax.sound.sampled.spi
  • javax.sql
  • javax.sql.rowset
  • javax.sql.rowset.serial
  • javax.sql.rowset.spi
  • javax.swing
  • javax.swing.border
  • javax.swing.colorchooser
  • javax.swing.event
  • javax.swing.filechooser
  • javax.swing.plaf
  • javax.swing.plaf.basic
  • javax.swing.plaf.metal
  • javax.swing.plaf.multi
  • javax.swing.plaf.nimbus
  • javax.swing.plaf.synth
  • javax.swing.table
  • javax.swing.text
  • javax.swing.text.html
  • javax.swing.text.html.parser
  • javax.swing.text.rtf
  • javax.swing.tree
  • javax.swing.undo
  • javax.tools
  • javax.transaction
  • javax.transaction.xa
  • javax.xml
  • javax.xml.bind
  • javax.xml.bind.annotation
  • javax.xml.bind.annotation.adapters
  • javax.xml.bind.attachment
  • javax.xml.bind.helpers
  • javax.xml.bind.util
  • javax.xml.crypto
  • javax.xml.crypto.dom
  • javax.xml.crypto.dsig
  • javax.xml.crypto.dsig.dom
  • javax.xml.crypto.dsig.keyinfo
  • javax.xml.crypto.dsig.spec
  • javax.xml.datatype
  • javax.xml.namespace
  • javax.xml.parsers
  • javax.xml.soap
  • javax.xml.stream
  • javax.xml.stream.events
  • javax.xml.stream.util
  • javax.xml.transform
  • javax.xml.transform.dom
  • javax.xml.transform.sax
  • javax.xml.transform.stax
  • javax.xml.transform.stream
  • javax.xml.validation
  • javax.xml.ws
  • javax.xml.ws.handler
  • javax.xml.ws.handler.soap
  • javax.xml.ws.http
  • javax.xml.ws.soap
  • javax.xml.ws.spi
  • javax.xml.ws.spi.http
  • javax.xml.ws.wsaddressing
  • javax.xml.xpath
  • org.ietf.jgss
  • org.omg.CORBA
  • org.omg.CORBA_2_3
  • org.omg.CORBA_2_3.portable
  • org.omg.CORBA.DynAnyPackage
  • org.omg.CORBA.ORBPackage
  • org.omg.CORBA.portable
  • org.omg.CORBA.TypeCodePackage
  • org.omg.CosNaming
  • org.omg.CosNaming.NamingContextExtPackage
  • org.omg.CosNaming.NamingContextPackage
  • org.omg.Dynamic
  • org.omg.DynamicAny
  • org.omg.DynamicAny.DynAnyFactoryPackage
  • org.omg.DynamicAny.DynAnyPackage
  • org.omg.IOP
  • org.omg.IOP.CodecFactoryPackage
  • org.omg.IOP.CodecPackage
  • org.omg.Messaging
  • org.omg.PortableInterceptor
  • org.omg.PortableInterceptor.ORBInitInfoPackage
  • org.omg.PortableServer
  • org.omg.PortableServer.CurrentPackage
  • org.omg.PortableServer.POAManagerPackage
  • org.omg.PortableServer.POAPackage
  • org.omg.PortableServer.portable
  • org.omg.PortableServer.ServantLocatorPackage
  • org.omg.SendingContext
  • org.omg.stub.java.rmi
  • org.w3c.dom
  • org.w3c.dom.bootstrap
  • org.w3c.dom.events
  • org.w3c.dom.ls
  • org.w3c.dom.views
  • org.xml.sax
  • org.xml.sax.ext
  • org.xml.sax.helpers


Overview List

Java™ Platform
Standard Ed. 8

All ClassesAll Packages

Profiles

  • compact1
  • compact2
  • compact3


_-Index

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Letter
  • Next Letter
  • Frames
  • No Frames
  • All Classes
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

_

_ACTIVE - Static variable in class org.omg.PortableServer.POAManagerPackage.State
_ADD_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The int constant for the enum value ADD_OVERRIDE.
_all_interfaces(POA, byte[]) - Method in class org.omg.CosNaming.BindingIteratorPOA
_all_interfaces(POA, byte[]) - Method in class org.omg.CosNaming.NamingContextExtPOA
_all_interfaces(POA, byte[]) - Method in class org.omg.CosNaming.NamingContextPOA
_all_interfaces(POA, byte[]) - Method in class org.omg.PortableServer.Servant
Used by the ORB to obtain complete type information from the servant.
_all_interfaces(POA, byte[]) - Method in class org.omg.PortableServer.ServantActivatorPOA
_all_interfaces(POA, byte[]) - Method in class org.omg.PortableServer.ServantLocatorPOA
_BindingIteratorImplBase - Class in org.omg.CosNaming
_BindingIteratorImplBase() - Constructor for class org.omg.CosNaming._BindingIteratorImplBase
_BindingIteratorStub - Class in org.omg.CosNaming
The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
_BindingIteratorStub() - Constructor for class org.omg.CosNaming._BindingIteratorStub
_COMPLETED_MAYBE - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_COMPLETED_NO - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_COMPLETED_YES - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_create_request(Context, String, NVList, NamedValue) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_create_request(Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_create_request(Context, String, NVList, NamedValue) - Method in interface org.omg.CORBA.Object
Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
_create_request(Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in interface org.omg.CORBA.Object
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
_create_request(Context, String, NVList, NamedValue) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object that contains the given context, method, argument list, and container for the result.
_create_request(Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
_default_POA() - Method in class org.omg.PortableServer.Servant
Returns the root POA from the ORB instance associated with the servant.
_DISCARDING - Static variable in class org.omg.PortableServer.POAManagerPackage.State
_dk_AbstractInterface - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Alias - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_all - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Array - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Attribute - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Constant - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Enum - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Exception - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Fixed - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Interface - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Module - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Native - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_none - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Operation - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Primitive - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Repository - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Sequence - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_String - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Struct - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Typedef - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Union - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Value - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_ValueBox - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_ValueMember - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Wstring - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_duplicate() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_duplicate() - Method in interface org.omg.CORBA.Object
Returns a duplicate of this CORBA object reference.
_duplicate() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a duplicate of this ObjectImpl object.
_DynAnyFactoryStub - Class in org.omg.DynamicAny
DynAny objects can be created by invoking operations on the DynAnyFactory object.
_DynAnyFactoryStub() - Constructor for class org.omg.DynamicAny._DynAnyFactoryStub
_DynAnyStub - Class in org.omg.DynamicAny
Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
_DynAnyStub() - Constructor for class org.omg.DynamicAny._DynAnyStub
_DynArrayStub - Class in org.omg.DynamicAny
DynArray objects support the manipulation of IDL arrays.
_DynArrayStub() - Constructor for class org.omg.DynamicAny._DynArrayStub
_DynEnumStub - Class in org.omg.DynamicAny
DynEnum objects support the manipulation of IDL enumerated values.
_DynEnumStub() - Constructor for class org.omg.DynamicAny._DynEnumStub
_DynFixedStub - Class in org.omg.DynamicAny
DynFixed objects support the manipulation of IDL fixed values.
_DynFixedStub() - Constructor for class org.omg.DynamicAny._DynFixedStub
_DynSequenceStub - Class in org.omg.DynamicAny
DynSequence objects support the manipulation of IDL sequences.
_DynSequenceStub() - Constructor for class org.omg.DynamicAny._DynSequenceStub
_DynStructStub - Class in org.omg.DynamicAny
DynStruct objects support the manipulation of IDL struct and exception values.
_DynStructStub() - Constructor for class org.omg.DynamicAny._DynStructStub
_DynUnionStub - Class in org.omg.DynamicAny
DynUnion objects support the manipulation of IDL unions.
_DynUnionStub() - Constructor for class org.omg.DynamicAny._DynUnionStub
_DynValueStub - Class in org.omg.DynamicAny
DynValue objects support the manipulation of IDL non-boxed value types.
_DynValueStub() - Constructor for class org.omg.DynamicAny._DynValueStub
_get_codebase() - Method in class org.omg.CORBA_2_3.portable.ObjectImpl
Returns the codebase for this object reference.
_get_delegate() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
_get_delegate() - Method in class org.omg.PortableServer.Servant
Gets the ORB vendor-specific implementation of PortableServer::Servant.
_get_domain_managers() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
_get_domain_managers() - Method in interface org.omg.CORBA.Object
Retrieves the DomainManagers of this object.
_get_domain_managers() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves a list of the domain managers for this ObjectImpl object.
_get_interface() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
_get_interface_def() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_get_interface_def() - Method in interface org.omg.CORBA.Object
Obtains an InterfaceDef for the object implementation referenced by this object reference.
_get_interface_def() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the interface definition for this ObjectImpl object.
_get_interface_def() - Method in class org.omg.PortableServer.Servant
Returns an InterfaceDef object as a CORBA::Object that defines the runtime type of the CORBA::Object implemented by the Servant.
_get_policy(int) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
_get_policy(int) - Method in interface org.omg.CORBA.Object
Returns the Policy object of the specified type which applies to this object.
_get_policy(int) - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the Policy object for this ObjectImpl object that has the given policy type.
_hash(int) - Method in class org.omg.CORBA.LocalObject
Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum.
_hash(int) - Method in interface org.omg.CORBA.Object
Returns an ORB-internal identifier for this object reference.
_hash(int) - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
_HOLDING - Static variable in class org.omg.PortableServer.POAManagerPackage.State
_IDLTypeStub - Class in org.omg.CORBA
The Stub for IDLType.
_IDLTypeStub() - Constructor for class org.omg.CORBA._IDLTypeStub
Constructs a default _IDLTypeStub object.
_IDLTypeStub(Delegate) - Constructor for class org.omg.CORBA._IDLTypeStub
Constructs an _IDLTypeStub object initialized with the given Delegate object.
_ids() - Method in class org.omg.CORBA._IDLTypeStub
_ids() - Method in class org.omg.CORBA._PolicyStub
_ids() - Method in class org.omg.CORBA.DynamicImplementation
Deprecated.
_ids() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
_ids() - Method in class org.omg.CosNaming._BindingIteratorImplBase
_ids() - Method in class org.omg.CosNaming._BindingIteratorStub
_ids() - Method in class org.omg.CosNaming._NamingContextExtStub
_ids() - Method in class org.omg.CosNaming._NamingContextImplBase
_ids() - Method in class org.omg.CosNaming._NamingContextStub
_ids() - Method in class org.omg.DynamicAny._DynAnyFactoryStub
_ids() - Method in class org.omg.DynamicAny._DynAnyStub
_ids() - Method in class org.omg.DynamicAny._DynArrayStub
_ids() - Method in class org.omg.DynamicAny._DynEnumStub
_ids() - Method in class org.omg.DynamicAny._DynFixedStub
_ids() - Method in class org.omg.DynamicAny._DynSequenceStub
_ids() - Method in class org.omg.DynamicAny._DynStructStub
_ids() - Method in class org.omg.DynamicAny._DynUnionStub
_ids() - Method in class org.omg.DynamicAny._DynValueStub
_ids() - Method in class org.omg.PortableServer._ServantActivatorStub
_ids() - Method in class org.omg.PortableServer._ServantLocatorStub
_ids() - Method in class org.omg.stub.java.rmi._Remote_Stub
Returns an array of repository ids that an object implements.
_IMPLICIT_ACTIVATION - Static variable in class org.omg.PortableServer.ImplicitActivationPolicyValue
_INACTIVE - Static variable in class org.omg.PortableServer.POAManagerPackage.State
_invoke(OutputStream) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_invoke(String, InputStream, ResponseHandler) - Method in interface org.omg.CORBA.portable.InvokeHandler
Invoked by the ORB to dispatch a request to the servant.
_invoke(OutputStream) - Method in class org.omg.CORBA.portable.ObjectImpl
Invokes an operation and returns an InputStream object for reading the response.
_invoke(String, InputStream, ResponseHandler) - Method in class org.omg.CosNaming.BindingIteratorPOA
_invoke(String, InputStream, ResponseHandler) - Method in class org.omg.CosNaming.NamingContextExtPOA
_invoke(String, InputStream, ResponseHandler) - Method in class org.omg.CosNaming.NamingContextPOA
_invoke(String, InputStream, ResponseHandler) - Method in class org.omg.PortableServer.ServantActivatorPOA
_invoke(String, InputStream, ResponseHandler) - Method in class org.omg.PortableServer.ServantLocatorPOA
_is_a(String) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
_is_a(String) - Method in interface org.omg.CORBA.Object
Checks whether this object is an instance of a class that implements the given interface.
_is_a(String) - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the object identified by the given repository identifier is an ObjectImpl object.
_is_a(String) - Method in class org.omg.PortableServer.Servant
Checks to see if the specified repository_id is present on the list returned by _all_interfaces() or is the repository_id for the generic CORBA Object.
_is_equivalent(Object) - Method in class org.omg.CORBA.LocalObject
Determines whether the two object references are equivalent, so far as the ORB can easily determine.
_is_equivalent(Object) - Method in interface org.omg.CORBA.Object
Determines whether the two object references are equivalent, so far as the ORB can easily determine.
_is_equivalent(Object) - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
_is_local() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_is_local() - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether this ObjectImpl object is implemented by a local servant.
_missing_node - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_MULTIPLE_ID - Static variable in class org.omg.PortableServer.IdUniquenessPolicyValue
_NamingContextExtStub - Class in org.omg.CosNaming
NamingContextExt is the extension of NamingContext which contains a set of name bindings in which each name is unique and is part of Interoperable Naming Service.
_NamingContextExtStub() - Constructor for class org.omg.CosNaming._NamingContextExtStub
_NamingContextImplBase - Class in org.omg.CosNaming
_NamingContextImplBase() - Constructor for class org.omg.CosNaming._NamingContextImplBase
_NamingContextStub - Class in org.omg.CosNaming
A naming context is an object that contains a set of name bindings in which each name is unique.
_NamingContextStub() - Constructor for class org.omg.CosNaming._NamingContextStub
_ncontext - Static variable in class org.omg.CosNaming.BindingType
_NO_IMPLICIT_ACTIVATION - Static variable in class org.omg.PortableServer.ImplicitActivationPolicyValue
_nobject - Static variable in class org.omg.CosNaming.BindingType
_non_existent() - Method in class org.omg.CORBA.LocalObject
Always returns false.
_non_existent() - Method in interface org.omg.CORBA.Object
Determines whether the server object for this object reference has been destroyed.
_non_existent() - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the server object for this ObjectImpl object has been destroyed.
_non_existent() - Method in class org.omg.PortableServer.Servant
Checks for the existence of an Object.
_NON_RETAIN - Static variable in class org.omg.PortableServer.ServantRetentionPolicyValue
_not_context - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_not_object - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_object_id() - Method in class org.omg.PortableServer.Servant
Allows easy execution of common methods, equivalent to calling PortableServer::Current::get_object_id.
_opsClass - Static variable in class org.omg.DynamicAny._DynAnyFactoryStub
_opsClass - Static variable in class org.omg.DynamicAny._DynAnyStub
_opsClass - Static variable in class org.omg.DynamicAny._DynArrayStub
_opsClass - Static variable in class org.omg.DynamicAny._DynEnumStub
_opsClass - Static variable in class org.omg.DynamicAny._DynFixedStub
_opsClass - Static variable in class org.omg.DynamicAny._DynSequenceStub
_opsClass - Static variable in class org.omg.DynamicAny._DynStructStub
_opsClass - Static variable in class org.omg.DynamicAny._DynUnionStub
_opsClass - Static variable in class org.omg.DynamicAny._DynValueStub
_opsClass - Static variable in class org.omg.PortableServer._ServantActivatorStub
_opsClass - Static variable in class org.omg.PortableServer._ServantLocatorStub
_orb() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_orb() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a reference to the ORB associated with this object and its delegate.
_orb() - Method in class org.omg.PortableServer.Servant
Returns the instance of the ORB currently associated with the Servant (convenience method).
_ORB_CTRL_MODEL - Static variable in class org.omg.PortableServer.ThreadPolicyValue
_PARAM_IN - Static variable in class org.omg.CORBA.ParameterMode
_PARAM_INOUT - Static variable in class org.omg.CORBA.ParameterMode
_PARAM_OUT - Static variable in class org.omg.CORBA.ParameterMode
_PERSISTENT - Static variable in class org.omg.PortableServer.LifespanPolicyValue
_poa() - Method in class org.omg.PortableServer.Servant
Allows easy execution of common methods, equivalent to PortableServer::Current:get_POA.
_PolicyStub - Class in org.omg.CORBA
The Stub for Policy.
_PolicyStub() - Constructor for class org.omg.CORBA._PolicyStub
Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.
_PolicyStub(Delegate) - Constructor for class org.omg.CORBA._PolicyStub
Constructs a _PolicyStub object initialized with the given Delegate object.
_postEdit(UndoableEdit) - Method in class javax.swing.undo.UndoableEditSupport
Called only from postEdit and endUpdate.
_read(InputStream) - Method in class org.omg.CORBA.AnyHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.AnySeqHolder
_read(InputStream) - Method in class org.omg.CORBA.BooleanHolder
Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
_read(InputStream) - Method in class org.omg.CORBA.BooleanSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ByteHolder
Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.CharHolder
Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.CharSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.CurrentHolder
_read(InputStream) - Method in class org.omg.CORBA.DoubleHolder
Read a double value from the input stream and store it in the value member.
_read(InputStream) - Method in class org.omg.CORBA.DoubleSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.FixedHolder
Read a fixed point value from the input stream and store it in the value member.
_read(InputStream) - Method in class org.omg.CORBA.FloatHolder
Read a float from an input stream and initialize the value member with the float value.
_read(InputStream) - Method in class org.omg.CORBA.FloatSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.IntHolder
Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
_read(InputStream) - Method in class org.omg.CORBA.LongHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.LongLongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.LongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ObjectHolder
Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.OctetSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ParameterModeHolder
_read(InputStream) - Method in class org.omg.CORBA.PolicyErrorHolder
_read(InputStream) - Method in class org.omg.CORBA.PolicyHolder
_read(InputStream) - Method in class org.omg.CORBA.PolicyListHolder
_read(InputStream) - Method in interface org.omg.CORBA.portable.Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_read(InputStream) - Method in class org.omg.CORBA.ServiceInformationHolder
Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
_read(InputStream) - Method in class org.omg.CORBA.ShortHolder
Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.ShortSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.StringHolder
Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
_read(InputStream) - Method in class org.omg.CORBA.StringSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.TypeCodeHolder
Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.ULongLongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ULongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.UnknownUserExceptionHolder
_read(InputStream) - Method in class org.omg.CORBA.UShortSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ValueBaseHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.WCharSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.WrongTransactionHolder
_read(InputStream) - Method in class org.omg.CORBA.WStringSeqHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingIteratorHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingListHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingTypeHolder
_read(InputStream) - Method in class org.omg.CosNaming.NameComponentHolder
_read(InputStream) - Method in class org.omg.CosNaming.NameHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextExtHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_read(InputStream) - Method in class org.omg.IOP.IORHolder
_read(InputStream) - Method in class org.omg.IOP.MultipleComponentProfileHolder
_read(InputStream) - Method in class org.omg.IOP.ServiceContextHolder
_read(InputStream) - Method in class org.omg.IOP.ServiceContextListHolder
_read(InputStream) - Method in class org.omg.IOP.TaggedComponentHolder
_read(InputStream) - Method in class org.omg.IOP.TaggedProfileHolder
_read(InputStream) - Method in class org.omg.PortableInterceptor.IORInterceptor_3_0Holder
_read(InputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceFactoryHolder
_read(InputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateHolder
_read(InputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder
_read(InputStream) - Method in class org.omg.PortableServer.ServantLocatorPackage.CookieHolder
_release() - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_release() - Method in interface org.omg.CORBA.Object
Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released.
_release() - Method in class org.omg.CORBA.portable.ObjectImpl
Releases the resources associated with this ObjectImpl object.
_releaseReply(InputStream) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_releaseReply(InputStream) - Method in class org.omg.CORBA.portable.ObjectImpl
Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
_Remote_Stub - Class in org.omg.stub.java.rmi
This class provides the Stub for the Remote Type.
_Remote_Stub() - Constructor for class org.omg.stub.java.rmi._Remote_Stub
_request(String) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_request(String, boolean) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_request(String) - Method in interface org.omg.CORBA.Object
Creates a Request instance for use in the Dynamic Invocation Interface.
_request(String) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
_request(String, boolean) - Method in class org.omg.CORBA.portable.ObjectImpl
Returns an OutputStream object to use for marshalling the arguments of the given method.
_RETAIN - Static variable in class org.omg.PortableServer.ServantRetentionPolicyValue
_servant_postinvoke(ServantObject) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_servant_postinvoke(ServantObject) - Method in class org.omg.CORBA.portable.ObjectImpl
Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
_servant_preinvoke(String, Class) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
_servant_preinvoke(String, Class) - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a Java reference to the local servant that should be used for sending a request for the method specified.
_ServantActivatorStub - Class in org.omg.PortableServer
When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
_ServantActivatorStub() - Constructor for class org.omg.PortableServer._ServantActivatorStub
_ServantLocatorStub - Class in org.omg.PortableServer
When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
_ServantLocatorStub() - Constructor for class org.omg.PortableServer._ServantLocatorStub
_set_delegate(Delegate) - Method in class org.omg.CORBA.portable.ObjectImpl
Sets the Delegate for this ObjectImpl instance to the given Delegate object.
_set_delegate(Delegate) - Method in class org.omg.PortableServer.Servant
Supports the Java ORB portability interfaces by providing a method for classes that support ORB portability through delegation to set their delegate.
_SET_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The int constant for the enum value SET_OVERRIDE.
_set_policy_override(Policy[], SetOverrideType) - Method in class org.omg.CORBA.LocalObject
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented.
_set_policy_override(Policy[], SetOverrideType) - Method in interface org.omg.CORBA.Object
Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
_set_policy_override(Policy[], SetOverrideType) - Method in class org.omg.CORBA.portable.ObjectImpl
Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
_SINGLE_THREAD_MODEL - Static variable in class org.omg.PortableServer.ThreadPolicyValue
_SYSTEM_ID - Static variable in class org.omg.PortableServer.IdAssignmentPolicyValue
_this() - Method in class org.omg.CosNaming.BindingIteratorPOA
_this(ORB) - Method in class org.omg.CosNaming.BindingIteratorPOA
_this() - Method in class org.omg.CosNaming.NamingContextExtPOA
_this(ORB) - Method in class org.omg.CosNaming.NamingContextExtPOA
_this() - Method in class org.omg.CosNaming.NamingContextPOA
_this(ORB) - Method in class org.omg.CosNaming.NamingContextPOA
_this() - Method in class org.omg.PortableServer.ServantActivatorPOA
_this(ORB) - Method in class org.omg.PortableServer.ServantActivatorPOA
_this() - Method in class org.omg.PortableServer.ServantLocatorPOA
_this(ORB) - Method in class org.omg.PortableServer.ServantLocatorPOA
_this_object() - Method in class org.omg.PortableServer.Servant
Allows the servant to obtain the object reference for the target CORBA object it is incarnating for that request.
_this_object(ORB) - Method in class org.omg.PortableServer.Servant
Allows the servant to obtain the object reference for the target CORBA Object it is incarnating for that request.
_tk_abstract_interface - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type abstract interface.
_tk_alias - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type alias.
_tk_any - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type any.
_tk_array - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type array.
_tk_boolean - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type boolean.
_tk_char - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type char.
_tk_double - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type double.
_tk_enum - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type enum.
_tk_except - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type except.
_tk_fixed - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type fixed.
_tk_float - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type float.
_tk_long - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type long.
_tk_longdouble - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type longdouble.
_tk_longlong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type longlong.
_tk_native - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type native.
_tk_null - Static variable in class org.omg.CORBA.TCKind
The int constant for a null IDL data type.
_tk_objref - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type objref.
_tk_octet - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type octet.
_tk_Principal - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type Principal.
_tk_sequence - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type sequence.
_tk_short - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type short.
_tk_string - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type string.
_tk_struct - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type struct.
_tk_TypeCode - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type TypeCode.
_tk_ulong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ulong.
_tk_ulonglong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ulonglong.
_tk_union - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type union.
_tk_ushort - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ushort.
_tk_value - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type value.
_tk_value_box - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type value_box.
_tk_void - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type void.
_tk_wchar - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type wchar.
_tk_wstring - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type wstring.
_TRANSIENT - Static variable in class org.omg.PortableServer.LifespanPolicyValue
_truncatable_ids() - Method in interface org.omg.CORBA.portable.ValueBase
Provides truncatable repository ids.
_type() - Method in class org.omg.CORBA.AnyHolder
Returns the TypeCode object corresponding to the value held in this AnyHolder object.
_type() - Method in class org.omg.CORBA.AnySeqHolder
_type() - Method in class org.omg.CORBA.BooleanHolder
Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
_type() - Method in class org.omg.CORBA.BooleanSeqHolder
_type() - Method in class org.omg.CORBA.ByteHolder
Returns the TypeCode corresponding to the value held in this ByteHolder object.
_type() - Method in class org.omg.CORBA.CharHolder
Returns the TypeCode object corresponding to the value held in this CharHolder object.
_type() - Method in class org.omg.CORBA.CharSeqHolder
_type() - Method in class org.omg.CORBA.CurrentHolder
_type() - Method in class org.omg.CORBA.DoubleHolder
Return the TypeCode of this holder object.
_type() - Method in class org.omg.CORBA.DoubleSeqHolder
_type() - Method in class org.omg.CORBA.FixedHolder
Return the TypeCode of this holder object.
_type() - Method in class org.omg.CORBA.FloatHolder
Return the TypeCode of this Streamable.
_type() - Method in class org.omg.CORBA.FloatSeqHolder
_type() - Method in class org.omg.CORBA.IntHolder
Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
_type() - Method in class org.omg.CORBA.LongHolder
Returns the TypeCode object corresponding to the value held in the Holder.
_type() - Method in class org.omg.CORBA.LongLongSeqHolder
_type() - Method in class org.omg.CORBA.LongSeqHolder
_type() - Method in class org.omg.CORBA.ObjectHolder
Returns the TypeCode corresponding to the value held in this ObjectHolder object
_type() - Method in class org.omg.CORBA.OctetSeqHolder
_type() - Method in class org.omg.CORBA.ParameterModeHolder
_type() - Method in class org.omg.CORBA.PolicyErrorHolder
_type() - Method in class org.omg.CORBA.PolicyHolder
_type() - Method in class org.omg.CORBA.PolicyListHolder
_type() - Method in interface org.omg.CORBA.portable.Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
_type() - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_type() - Method in class org.omg.CORBA.ServiceInformationHolder
Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
_type() - Method in class org.omg.CORBA.ShortHolder
Returns the TypeCode corresponding to the value held in this ShortHolder object.
_type() - Method in class org.omg.CORBA.ShortSeqHolder
_type() - Method in class org.omg.CORBA.StringHolder
Retrieves the TypeCode object that corresponds to the value held in this StringHolder object.
_type() - Method in class org.omg.CORBA.StringSeqHolder
_type() - Method in class org.omg.CORBA.TypeCodeHolder
Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
_type() - Method in class org.omg.CORBA.ULongLongSeqHolder
_type() - Method in class org.omg.CORBA.ULongSeqHolder
_type() - Method in class org.omg.CORBA.UnknownUserExceptionHolder
_type() - Method in class org.omg.CORBA.UShortSeqHolder
_type() - Method in class org.omg.CORBA.ValueBaseHolder
Returns the TypeCode object corresponding to the value held in the Holder.
_type() - Method in class org.omg.CORBA.WCharSeqHolder
_type() - Method in class org.omg.CORBA.WrongTransactionHolder
_type() - Method in class org.omg.CORBA.WStringSeqHolder
_type() - Method in class org.omg.CosNaming.BindingHolder
_type() - Method in class org.omg.CosNaming.BindingIteratorHolder
_type() - Method in class org.omg.CosNaming.BindingListHolder
_type() - Method in class org.omg.CosNaming.BindingTypeHolder
_type() - Method in class org.omg.CosNaming.NameComponentHolder
_type() - Method in class org.omg.CosNaming.NameHolder
_type() - Method in class org.omg.CosNaming.NamingContextExtHolder
_type() - Method in class org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder
_type() - Method in class org.omg.CosNaming.NamingContextHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_type() - Method in class org.omg.IOP.IORHolder
_type() - Method in class org.omg.IOP.MultipleComponentProfileHolder
_type() - Method in class org.omg.IOP.ServiceContextHolder
_type() - Method in class org.omg.IOP.ServiceContextListHolder
_type() - Method in class org.omg.IOP.TaggedComponentHolder
_type() - Method in class org.omg.IOP.TaggedProfileHolder
_type() - Method in class org.omg.PortableInterceptor.IORInterceptor_3_0Holder
_type() - Method in class org.omg.PortableInterceptor.ObjectReferenceFactoryHolder
_type() - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateHolder
_type() - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder
_type() - Method in class org.omg.PortableServer.ServantLocatorPackage.CookieHolder
_UNIQUE_ID - Static variable in class org.omg.PortableServer.IdUniquenessPolicyValue
_USE_ACTIVE_OBJECT_MAP_ONLY - Static variable in class org.omg.PortableServer.RequestProcessingPolicyValue
_USE_DEFAULT_SERVANT - Static variable in class org.omg.PortableServer.RequestProcessingPolicyValue
_USE_SERVANT_MANAGER - Static variable in class org.omg.PortableServer.RequestProcessingPolicyValue
_USER_ID - Static variable in class org.omg.PortableServer.IdAssignmentPolicyValue
_write(OutputStream) - Method in class org.omg.CORBA.AnyHolder
Marshals to output the value in this AnyHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.AnySeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.BooleanHolder
Marshals the value in this BooleanHolder object's value field to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.BooleanSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ByteHolder
Marshals to output the value in this ByteHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.CharHolder
Marshals to output the value in this CharHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.CharSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.CurrentHolder
_write(OutputStream) - Method in class org.omg.CORBA.DoubleHolder
Write the double value stored in this holder to an OutputStream.
_write(OutputStream) - Method in class org.omg.CORBA.DoubleSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.FixedHolder
Write the fixed point value stored in this holder to an OutputStream.
_write(OutputStream) - Method in class org.omg.CORBA.FloatHolder
Write the float value into an output stream.
_write(OutputStream) - Method in class org.omg.CORBA.FloatSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.IntHolder
Marshals the value in this IntHolder object's value field to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.LongHolder
Marshals to output the value in the Holder.
_write(OutputStream) - Method in class org.omg.CORBA.LongLongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.LongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ObjectHolder
Marshals to output the value in this ObjectHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.OctetSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ParameterModeHolder
_write(OutputStream) - Method in class org.omg.CORBA.PolicyErrorHolder
_write(OutputStream) - Method in class org.omg.CORBA.PolicyHolder
_write(OutputStream) - Method in class org.omg.CORBA.PolicyListHolder
_write(OutputStream) - Method in interface org.omg.CORBA.portable.Streamable
Marshals to ostream the value in the value field of the Holder.
_write(OutputStream) - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_write(OutputStream) - Method in class org.omg.CORBA.ServiceInformationHolder
Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
_write(OutputStream) - Method in class org.omg.CORBA.ShortHolder
Marshals to output the value in this ShortHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.ShortSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.StringHolder
Marshals the value held by this StringHolder object to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.StringSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.TypeCodeHolder
Marshals to output the value in this TypeCodeHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.ULongLongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ULongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.UnknownUserExceptionHolder
_write(OutputStream) - Method in class org.omg.CORBA.UShortSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ValueBaseHolder
Marshals to output the value in the Holder.
_write(OutputStream) - Method in class org.omg.CORBA.WCharSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.WrongTransactionHolder
_write(OutputStream) - Method in class org.omg.CORBA.WStringSeqHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingIteratorHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingListHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingTypeHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NameComponentHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NameHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextExtHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_write(OutputStream) - Method in class org.omg.IOP.IORHolder
_write(OutputStream) - Method in class org.omg.IOP.MultipleComponentProfileHolder
_write(OutputStream) - Method in class org.omg.IOP.ServiceContextHolder
_write(OutputStream) - Method in class org.omg.IOP.ServiceContextListHolder
_write(OutputStream) - Method in class org.omg.IOP.TaggedComponentHolder
_write(OutputStream) - Method in class org.omg.IOP.TaggedProfileHolder
_write(OutputStream) - Method in class org.omg.PortableInterceptor.IORInterceptor_3_0Holder
_write(OutputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceFactoryHolder
_write(OutputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateHolder
_write(OutputStream) - Method in class org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder
_write(OutputStream) - Method in class org.omg.PortableServer.ServantLocatorPackage.CookieHolder
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Letter
  • Next Letter
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.applet

Interfaces

  • AppletContext
  • AppletStub
  • AudioClip

Classes

  • Applet


java.awt

Interfaces

  • ActiveEvent
  • Adjustable
  • Composite
  • CompositeContext
  • ItemSelectable
  • KeyEventDispatcher
  • KeyEventPostProcessor
  • LayoutManager
  • LayoutManager2
  • MenuContainer
  • Paint
  • PaintContext
  • PrintGraphics
  • SecondaryLoop
  • Shape
  • Stroke
  • Transparency

Classes

  • AlphaComposite
  • AWTEvent
  • AWTEventMulticaster
  • AWTKeyStroke
  • AWTPermission
  • BasicStroke
  • BorderLayout
  • BufferCapabilities
  • BufferCapabilities.FlipContents
  • Button
  • Canvas
  • CardLayout
  • Checkbox
  • CheckboxGroup
  • CheckboxMenuItem
  • Choice
  • Color
  • Component
  • ComponentOrientation
  • Container
  • ContainerOrderFocusTraversalPolicy
  • Cursor
  • DefaultFocusTraversalPolicy
  • DefaultKeyboardFocusManager
  • Desktop
  • Dialog
  • Dimension
  • DisplayMode
  • Event
  • EventQueue
  • FileDialog
  • FlowLayout
  • FocusTraversalPolicy
  • Font
  • FontMetrics
  • Frame
  • GradientPaint
  • Graphics
  • Graphics2D
  • GraphicsConfigTemplate
  • GraphicsConfiguration
  • GraphicsDevice
  • GraphicsEnvironment
  • GridBagConstraints
  • GridBagLayout
  • GridBagLayoutInfo
  • GridLayout
  • Image
  • ImageCapabilities
  • Insets
  • JobAttributes
  • JobAttributes.DefaultSelectionType
  • JobAttributes.DestinationType
  • JobAttributes.DialogType
  • JobAttributes.MultipleDocumentHandlingType
  • JobAttributes.SidesType
  • KeyboardFocusManager
  • Label
  • LinearGradientPaint
  • List
  • MediaTracker
  • Menu
  • MenuBar
  • MenuComponent
  • MenuItem
  • MenuShortcut
  • MouseInfo
  • MultipleGradientPaint
  • PageAttributes
  • PageAttributes.ColorType
  • PageAttributes.MediaType
  • PageAttributes.OrientationRequestedType
  • PageAttributes.OriginType
  • PageAttributes.PrintQualityType
  • Panel
  • Point
  • PointerInfo
  • Polygon
  • PopupMenu
  • PrintJob
  • RadialGradientPaint
  • Rectangle
  • RenderingHints
  • RenderingHints.Key
  • Robot
  • Scrollbar
  • ScrollPane
  • ScrollPaneAdjustable
  • SplashScreen
  • SystemColor
  • SystemTray
  • TextArea
  • TextComponent
  • TextField
  • TexturePaint
  • Toolkit
  • TrayIcon
  • Window

Enums

  • Component.BaselineResizeBehavior
  • Desktop.Action
  • Dialog.ModalExclusionType
  • Dialog.ModalityType
  • GraphicsDevice.WindowTranslucency
  • MultipleGradientPaint.ColorSpaceType
  • MultipleGradientPaint.CycleMethod
  • TrayIcon.MessageType
  • Window.Type

Exceptions

  • AWTException
  • FontFormatException
  • HeadlessException
  • IllegalComponentStateException

Errors

  • AWTError


java.awt.color

Classes

  • ColorSpace
  • ICC_ColorSpace
  • ICC_Profile
  • ICC_ProfileGray
  • ICC_ProfileRGB

Exceptions

  • CMMException
  • ProfileDataException


java.awt.datatransfer

Interfaces

  • ClipboardOwner
  • FlavorListener
  • FlavorMap
  • FlavorTable
  • Transferable

Classes

  • Clipboard
  • DataFlavor
  • FlavorEvent
  • StringSelection
  • SystemFlavorMap

Exceptions

  • MimeTypeParseException
  • UnsupportedFlavorException


java.awt.dnd

Interfaces

  • Autoscroll
  • DragGestureListener
  • DragSourceListener
  • DragSourceMotionListener
  • DropTargetListener

Classes

  • DnDConstants
  • DragGestureEvent
  • DragGestureRecognizer
  • DragSource
  • DragSourceAdapter
  • DragSourceContext
  • DragSourceDragEvent
  • DragSourceDropEvent
  • DragSourceEvent
  • DropTarget
  • DropTarget.DropTargetAutoScroller
  • DropTargetAdapter
  • DropTargetContext
  • DropTargetDragEvent
  • DropTargetDropEvent
  • DropTargetEvent
  • MouseDragGestureRecognizer

Exceptions

  • InvalidDnDOperationException


java.awt.event

Interfaces

  • ActionListener
  • AdjustmentListener
  • AWTEventListener
  • ComponentListener
  • ContainerListener
  • FocusListener
  • HierarchyBoundsListener
  • HierarchyListener
  • InputMethodListener
  • ItemListener
  • KeyListener
  • MouseListener
  • MouseMotionListener
  • MouseWheelListener
  • TextListener
  • WindowFocusListener
  • WindowListener
  • WindowStateListener

Classes

  • ActionEvent
  • AdjustmentEvent
  • AWTEventListenerProxy
  • ComponentAdapter
  • ComponentEvent
  • ContainerAdapter
  • ContainerEvent
  • FocusAdapter
  • FocusEvent
  • HierarchyBoundsAdapter
  • HierarchyEvent
  • InputEvent
  • InputMethodEvent
  • InvocationEvent
  • ItemEvent
  • KeyAdapter
  • KeyEvent
  • MouseAdapter
  • MouseEvent
  • MouseMotionAdapter
  • MouseWheelEvent
  • PaintEvent
  • TextEvent
  • WindowAdapter
  • WindowEvent


java.awt.font

Interfaces

  • MultipleMaster
  • OpenType

Classes

  • FontRenderContext
  • GlyphJustificationInfo
  • GlyphMetrics
  • GlyphVector
  • GraphicAttribute
  • ImageGraphicAttribute
  • LayoutPath
  • LineBreakMeasurer
  • LineMetrics
  • NumericShaper
  • ShapeGraphicAttribute
  • TextAttribute
  • TextHitInfo
  • TextLayout
  • TextLayout.CaretPolicy
  • TextMeasurer
  • TransformAttribute

Enums

  • NumericShaper.Range


java.awt.geom

Interfaces

  • PathIterator

Classes

  • AffineTransform
  • Arc2D
  • Arc2D.Double
  • Arc2D.Float
  • Area
  • CubicCurve2D
  • CubicCurve2D.Double
  • CubicCurve2D.Float
  • Dimension2D
  • Ellipse2D
  • Ellipse2D.Double
  • Ellipse2D.Float
  • FlatteningPathIterator
  • GeneralPath
  • Line2D
  • Line2D.Double
  • Line2D.Float
  • Path2D
  • Path2D.Double
  • Path2D.Float
  • Point2D
  • Point2D.Double
  • Point2D.Float
  • QuadCurve2D
  • QuadCurve2D.Double
  • QuadCurve2D.Float
  • Rectangle2D
  • Rectangle2D.Double
  • Rectangle2D.Float
  • RectangularShape
  • RoundRectangle2D
  • RoundRectangle2D.Double
  • RoundRectangle2D.Float

Exceptions

  • IllegalPathStateException
  • NoninvertibleTransformException


java.awt.im

Interfaces

  • InputMethodRequests

Classes

  • InputContext
  • InputMethodHighlight
  • InputSubset


java.awt.im.spi

Interfaces

  • InputMethod
  • InputMethodContext
  • InputMethodDescriptor


java.awt.image

Interfaces

  • BufferedImageOp
  • ImageConsumer
  • ImageObserver
  • ImageProducer
  • RasterOp
  • RenderedImage
  • TileObserver
  • WritableRenderedImage

Classes

  • AffineTransformOp
  • AreaAveragingScaleFilter
  • BandCombineOp
  • BandedSampleModel
  • BufferedImage
  • BufferedImageFilter
  • BufferStrategy
  • ByteLookupTable
  • ColorConvertOp
  • ColorModel
  • ComponentColorModel
  • ComponentSampleModel
  • ConvolveOp
  • CropImageFilter
  • DataBuffer
  • DataBufferByte
  • DataBufferDouble
  • DataBufferFloat
  • DataBufferInt
  • DataBufferShort
  • DataBufferUShort
  • DirectColorModel
  • FilteredImageSource
  • ImageFilter
  • IndexColorModel
  • Kernel
  • LookupOp
  • LookupTable
  • MemoryImageSource
  • MultiPixelPackedSampleModel
  • PackedColorModel
  • PixelGrabber
  • PixelInterleavedSampleModel
  • Raster
  • ReplicateScaleFilter
  • RescaleOp
  • RGBImageFilter
  • SampleModel
  • ShortLookupTable
  • SinglePixelPackedSampleModel
  • VolatileImage
  • WritableRaster

Exceptions

  • ImagingOpException
  • RasterFormatException


java.awt.image.renderable

Interfaces

  • ContextualRenderedImageFactory
  • RenderableImage
  • RenderedImageFactory

Classes

  • ParameterBlock
  • RenderableImageOp
  • RenderableImageProducer
  • RenderContext


java.awt.print

Interfaces

  • Pageable
  • Printable
  • PrinterGraphics

Classes

  • Book
  • PageFormat
  • Paper
  • PrinterJob

Exceptions

  • PrinterAbortException
  • PrinterException
  • PrinterIOException


java.beans

Interfaces

  • AppletInitializer
  • BeanInfo
  • Customizer
  • DesignMode
  • ExceptionListener
  • PropertyChangeListener
  • PropertyEditor
  • VetoableChangeListener
  • Visibility

Classes

  • BeanDescriptor
  • Beans
  • DefaultPersistenceDelegate
  • Encoder
  • EventHandler
  • EventSetDescriptor
  • Expression
  • FeatureDescriptor
  • IndexedPropertyChangeEvent
  • IndexedPropertyDescriptor
  • Introspector
  • MethodDescriptor
  • ParameterDescriptor
  • PersistenceDelegate
  • PropertyChangeEvent
  • PropertyChangeListenerProxy
  • PropertyChangeSupport
  • PropertyDescriptor
  • PropertyEditorManager
  • PropertyEditorSupport
  • SimpleBeanInfo
  • Statement
  • VetoableChangeListenerProxy
  • VetoableChangeSupport
  • XMLDecoder
  • XMLEncoder

Exceptions

  • IntrospectionException
  • PropertyVetoException

Annotation Types

  • ConstructorProperties
  • Transient


java.beans.beancontext

Interfaces

  • BeanContext
  • BeanContextChild
  • BeanContextChildComponentProxy
  • BeanContextContainerProxy
  • BeanContextMembershipListener
  • BeanContextProxy
  • BeanContextServiceProvider
  • BeanContextServiceProviderBeanInfo
  • BeanContextServiceRevokedListener
  • BeanContextServices
  • BeanContextServicesListener

Classes

  • BeanContextChildSupport
  • BeanContextEvent
  • BeanContextMembershipEvent
  • BeanContextServiceAvailableEvent
  • BeanContextServiceRevokedEvent
  • BeanContextServicesSupport
  • BeanContextServicesSupport.BCSSServiceProvider
  • BeanContextSupport
  • BeanContextSupport.BCSIterator


compact1 - java.io

Interfaces

  • Closeable
  • DataInput
  • DataOutput
  • Externalizable
  • FileFilter
  • FilenameFilter
  • Flushable
  • ObjectInput
  • ObjectInputValidation
  • ObjectOutput
  • ObjectStreamConstants
  • Serializable

Classes

  • BufferedInputStream
  • BufferedOutputStream
  • BufferedReader
  • BufferedWriter
  • ByteArrayInputStream
  • ByteArrayOutputStream
  • CharArrayReader
  • CharArrayWriter
  • Console
  • DataInputStream
  • DataOutputStream
  • File
  • FileDescriptor
  • FileInputStream
  • FileOutputStream
  • FilePermission
  • FileReader
  • FileWriter
  • FilterInputStream
  • FilterOutputStream
  • FilterReader
  • FilterWriter
  • InputStream
  • InputStreamReader
  • LineNumberInputStream
  • LineNumberReader
  • ObjectInputStream
  • ObjectInputStream.GetField
  • ObjectOutputStream
  • ObjectOutputStream.PutField
  • ObjectStreamClass
  • ObjectStreamField
  • OutputStream
  • OutputStreamWriter
  • PipedInputStream
  • PipedOutputStream
  • PipedReader
  • PipedWriter
  • PrintStream
  • PrintWriter
  • PushbackInputStream
  • PushbackReader
  • RandomAccessFile
  • Reader
  • SequenceInputStream
  • SerializablePermission
  • StreamTokenizer
  • StringBufferInputStream
  • StringReader
  • StringWriter
  • Writer

Exceptions

  • CharConversionException
  • EOFException
  • FileNotFoundException
  • InterruptedIOException
  • InvalidClassException
  • InvalidObjectException
  • IOException
  • NotActiveException
  • NotSerializableException
  • ObjectStreamException
  • OptionalDataException
  • StreamCorruptedException
  • SyncFailedException
  • UncheckedIOException
  • UnsupportedEncodingException
  • UTFDataFormatException
  • WriteAbortedException

Errors

  • IOError


io

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.io

Provides for system input and output through data streams, serialization and the file system.

See: Description

  • Interface Summary
    Interface Description
    Closeable
    A Closeable is a source or destination of data that can be closed.
    DataInput
    The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
    DataOutput
    The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
    Externalizable
    Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
    FileFilter
    A filter for abstract pathnames.
    FilenameFilter
    Instances of classes that implement this interface are used to filter filenames.
    Flushable
    A Flushable is a destination of data that can be flushed.
    ObjectInput
    ObjectInput extends the DataInput interface to include the reading of objects.
    ObjectInputValidation
    Callback interface to allow validation of objects within a graph.
    ObjectOutput
    ObjectOutput extends the DataOutput interface to include writing of objects.
    ObjectStreamConstants
    Constants written into the Object Serialization Stream.
    Serializable
    Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
  • Class Summary
    Class Description
    BufferedInputStream
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
    BufferedOutputStream
    The class implements a buffered output stream.
    BufferedReader
    Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
    BufferedWriter
    Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
    ByteArrayInputStream
    A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
    ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array.
    CharArrayReader
    This class implements a character buffer that can be used as a character-input stream.
    CharArrayWriter
    This class implements a character buffer that can be used as an Writer.
    Console
    Methods to access the character-based console device, if any, associated with the current Java virtual machine.
    DataInputStream
    A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
    DataOutputStream
    A data output stream lets an application write primitive Java data types to an output stream in a portable way.
    File
    An abstract representation of file and directory pathnames.
    FileDescriptor
    Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
    FileInputStream
    A FileInputStream obtains input bytes from a file in a file system.
    FileOutputStream
    A file output stream is an output stream for writing data to a File or to a FileDescriptor.
    FilePermission
    This class represents access to a file or directory.
    FileReader
    Convenience class for reading character files.
    FileWriter
    Convenience class for writing character files.
    FilterInputStream
    A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
    FilterOutputStream
    This class is the superclass of all classes that filter output streams.
    FilterReader
    Abstract class for reading filtered character streams.
    FilterWriter
    Abstract class for writing filtered character streams.
    InputStream
    This abstract class is the superclass of all classes representing an input stream of bytes.
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset.
    LineNumberInputStream Deprecated
    This class incorrectly assumes that bytes adequately represent characters.
    LineNumberReader
    A buffered character-input stream that keeps track of line numbers.
    ObjectInputStream
    An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
    ObjectInputStream.GetField
    Provide access to the persistent fields read from the input stream.
    ObjectOutputStream
    An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
    ObjectOutputStream.PutField
    Provide programmatic access to the persistent fields to be written to ObjectOutput.
    ObjectStreamClass
    Serialization's descriptor for classes.
    ObjectStreamField
    A description of a Serializable field from a Serializable class.
    OutputStream
    This abstract class is the superclass of all classes representing an output stream of bytes.
    OutputStreamWriter
    An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset.
    PipedInputStream
    A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
    PipedOutputStream
    A piped output stream can be connected to a piped input stream to create a communications pipe.
    PipedReader
    Piped character-input streams.
    PipedWriter
    Piped character-output streams.
    PrintStream
    A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
    PrintWriter
    Prints formatted representations of objects to a text-output stream.
    PushbackInputStream
    A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
    PushbackReader
    A character-stream reader that allows characters to be pushed back into the stream.
    RandomAccessFile
    Instances of this class support both reading and writing to a random access file.
    Reader
    Abstract class for reading character streams.
    SequenceInputStream
    A SequenceInputStream represents the logical concatenation of other input streams.
    SerializablePermission
    This class is for Serializable permissions.
    StreamTokenizer
    The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
    StringBufferInputStream Deprecated
    This class does not properly convert characters into bytes.
    StringReader
    A character stream whose source is a string.
    StringWriter
    A character stream that collects its output in a string buffer, which can then be used to construct a string.
    Writer
    Abstract class for writing to character streams.
  • Exception Summary
    Exception Description
    CharConversionException
    Base class for character conversion exceptions.
    EOFException
    Signals that an end of file or end of stream has been reached unexpectedly during input.
    FileNotFoundException
    Signals that an attempt to open the file denoted by a specified pathname has failed.
    InterruptedIOException
    Signals that an I/O operation has been interrupted.
    InvalidClassException
    Thrown when the Serialization runtime detects one of the following problems with a Class.
    InvalidObjectException
    Indicates that one or more deserialized objects failed validation tests.
    IOException
    Signals that an I/O exception of some sort has occurred.
    NotActiveException
    Thrown when serialization or deserialization is not active.
    NotSerializableException
    Thrown when an instance is required to have a Serializable interface.
    ObjectStreamException
    Superclass of all exceptions specific to Object Stream classes.
    OptionalDataException
    Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
    StreamCorruptedException
    Thrown when control information that was read from an object stream violates internal consistency checks.
    SyncFailedException
    Signals that a sync operation has failed.
    UncheckedIOException
    Wraps an IOException with an unchecked exception.
    UnsupportedEncodingException
    The Character Encoding is not supported.
    UTFDataFormatException
    Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.
    WriteAbortedException
    Signals that one of the ObjectStreamExceptions was thrown during a write operation.
  • Error Summary
    Error Description
    IOError
    Thrown when a serious I/O error has occurred.

Package java.io Description

Provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Package Specification

  • Java Object Serialization Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Serialization Enhancements
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.io

Interfaces

  • Closeable
  • DataInput
  • DataOutput
  • Externalizable
  • FileFilter
  • FilenameFilter
  • Flushable
  • ObjectInput
  • ObjectInputValidation
  • ObjectOutput
  • ObjectStreamConstants
  • Serializable

Classes

  • BufferedInputStream
  • BufferedOutputStream
  • BufferedReader
  • BufferedWriter
  • ByteArrayInputStream
  • ByteArrayOutputStream
  • CharArrayReader
  • CharArrayWriter
  • Console
  • DataInputStream
  • DataOutputStream
  • File
  • FileDescriptor
  • FileInputStream
  • FileOutputStream
  • FilePermission
  • FileReader
  • FileWriter
  • FilterInputStream
  • FilterOutputStream
  • FilterReader
  • FilterWriter
  • InputStream
  • InputStreamReader
  • LineNumberInputStream
  • LineNumberReader
  • ObjectInputStream
  • ObjectInputStream.GetField
  • ObjectOutputStream
  • ObjectOutputStream.PutField
  • ObjectStreamClass
  • ObjectStreamField
  • OutputStream
  • OutputStreamWriter
  • PipedInputStream
  • PipedOutputStream
  • PipedReader
  • PipedWriter
  • PrintStream
  • PrintWriter
  • PushbackInputStream
  • PushbackReader
  • RandomAccessFile
  • Reader
  • SequenceInputStream
  • SerializablePermission
  • StreamTokenizer
  • StringBufferInputStream
  • StringReader
  • StringWriter
  • Writer

Exceptions

  • CharConversionException
  • EOFException
  • FileNotFoundException
  • InterruptedIOException
  • InvalidClassException
  • InvalidObjectException
  • IOException
  • NotActiveException
  • NotSerializableException
  • ObjectStreamException
  • OptionalDataException
  • StreamCorruptedException
  • SyncFailedException
  • UncheckedIOException
  • UnsupportedEncodingException
  • UTFDataFormatException
  • WriteAbortedException

Errors

  • IOError


io

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.io

Provides for system input and output through data streams, serialization and the file system.

See: Description

  • Interface Summary
    Interface Description
    Closeable
    A Closeable is a source or destination of data that can be closed.
    DataInput
    The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
    DataOutput
    The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
    Externalizable
    Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
    FileFilter
    A filter for abstract pathnames.
    FilenameFilter
    Instances of classes that implement this interface are used to filter filenames.
    Flushable
    A Flushable is a destination of data that can be flushed.
    ObjectInput
    ObjectInput extends the DataInput interface to include the reading of objects.
    ObjectInputValidation
    Callback interface to allow validation of objects within a graph.
    ObjectOutput
    ObjectOutput extends the DataOutput interface to include writing of objects.
    ObjectStreamConstants
    Constants written into the Object Serialization Stream.
    Serializable
    Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
  • Class Summary
    Class Description
    BufferedInputStream
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
    BufferedOutputStream
    The class implements a buffered output stream.
    BufferedReader
    Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
    BufferedWriter
    Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
    ByteArrayInputStream
    A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
    ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array.
    CharArrayReader
    This class implements a character buffer that can be used as a character-input stream.
    CharArrayWriter
    This class implements a character buffer that can be used as an Writer.
    Console
    Methods to access the character-based console device, if any, associated with the current Java virtual machine.
    DataInputStream
    A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
    DataOutputStream
    A data output stream lets an application write primitive Java data types to an output stream in a portable way.
    File
    An abstract representation of file and directory pathnames.
    FileDescriptor
    Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
    FileInputStream
    A FileInputStream obtains input bytes from a file in a file system.
    FileOutputStream
    A file output stream is an output stream for writing data to a File or to a FileDescriptor.
    FilePermission
    This class represents access to a file or directory.
    FileReader
    Convenience class for reading character files.
    FileWriter
    Convenience class for writing character files.
    FilterInputStream
    A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
    FilterOutputStream
    This class is the superclass of all classes that filter output streams.
    FilterReader
    Abstract class for reading filtered character streams.
    FilterWriter
    Abstract class for writing filtered character streams.
    InputStream
    This abstract class is the superclass of all classes representing an input stream of bytes.
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset.
    LineNumberInputStream Deprecated
    This class incorrectly assumes that bytes adequately represent characters.
    LineNumberReader
    A buffered character-input stream that keeps track of line numbers.
    ObjectInputStream
    An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
    ObjectInputStream.GetField
    Provide access to the persistent fields read from the input stream.
    ObjectOutputStream
    An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
    ObjectOutputStream.PutField
    Provide programmatic access to the persistent fields to be written to ObjectOutput.
    ObjectStreamClass
    Serialization's descriptor for classes.
    ObjectStreamField
    A description of a Serializable field from a Serializable class.
    OutputStream
    This abstract class is the superclass of all classes representing an output stream of bytes.
    OutputStreamWriter
    An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset.
    PipedInputStream
    A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
    PipedOutputStream
    A piped output stream can be connected to a piped input stream to create a communications pipe.
    PipedReader
    Piped character-input streams.
    PipedWriter
    Piped character-output streams.
    PrintStream
    A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
    PrintWriter
    Prints formatted representations of objects to a text-output stream.
    PushbackInputStream
    A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
    PushbackReader
    A character-stream reader that allows characters to be pushed back into the stream.
    RandomAccessFile
    Instances of this class support both reading and writing to a random access file.
    Reader
    Abstract class for reading character streams.
    SequenceInputStream
    A SequenceInputStream represents the logical concatenation of other input streams.
    SerializablePermission
    This class is for Serializable permissions.
    StreamTokenizer
    The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
    StringBufferInputStream Deprecated
    This class does not properly convert characters into bytes.
    StringReader
    A character stream whose source is a string.
    StringWriter
    A character stream that collects its output in a string buffer, which can then be used to construct a string.
    Writer
    Abstract class for writing to character streams.
  • Exception Summary
    Exception Description
    CharConversionException
    Base class for character conversion exceptions.
    EOFException
    Signals that an end of file or end of stream has been reached unexpectedly during input.
    FileNotFoundException
    Signals that an attempt to open the file denoted by a specified pathname has failed.
    InterruptedIOException
    Signals that an I/O operation has been interrupted.
    InvalidClassException
    Thrown when the Serialization runtime detects one of the following problems with a Class.
    InvalidObjectException
    Indicates that one or more deserialized objects failed validation tests.
    IOException
    Signals that an I/O exception of some sort has occurred.
    NotActiveException
    Thrown when serialization or deserialization is not active.
    NotSerializableException
    Thrown when an instance is required to have a Serializable interface.
    ObjectStreamException
    Superclass of all exceptions specific to Object Stream classes.
    OptionalDataException
    Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
    StreamCorruptedException
    Thrown when control information that was read from an object stream violates internal consistency checks.
    SyncFailedException
    Signals that a sync operation has failed.
    UncheckedIOException
    Wraps an IOException with an unchecked exception.
    UnsupportedEncodingException
    The Character Encoding is not supported.
    UTFDataFormatException
    Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.
    WriteAbortedException
    Signals that one of the ObjectStreamExceptions was thrown during a write operation.
  • Error Summary
    Error Description
    IOError
    Thrown when a serious I/O error has occurred.

Package java.io Description

Provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Package Specification

  • Java Object Serialization Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Serialization Enhancements
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.io

Interfaces

  • Closeable
  • DataInput
  • DataOutput
  • Externalizable
  • FileFilter
  • FilenameFilter
  • Flushable
  • ObjectInput
  • ObjectInputValidation
  • ObjectOutput
  • ObjectStreamConstants
  • Serializable

Classes

  • BufferedInputStream
  • BufferedOutputStream
  • BufferedReader
  • BufferedWriter
  • ByteArrayInputStream
  • ByteArrayOutputStream
  • CharArrayReader
  • CharArrayWriter
  • Console
  • DataInputStream
  • DataOutputStream
  • File
  • FileDescriptor
  • FileInputStream
  • FileOutputStream
  • FilePermission
  • FileReader
  • FileWriter
  • FilterInputStream
  • FilterOutputStream
  • FilterReader
  • FilterWriter
  • InputStream
  • InputStreamReader
  • LineNumberInputStream
  • LineNumberReader
  • ObjectInputStream
  • ObjectInputStream.GetField
  • ObjectOutputStream
  • ObjectOutputStream.PutField
  • ObjectStreamClass
  • ObjectStreamField
  • OutputStream
  • OutputStreamWriter
  • PipedInputStream
  • PipedOutputStream
  • PipedReader
  • PipedWriter
  • PrintStream
  • PrintWriter
  • PushbackInputStream
  • PushbackReader
  • RandomAccessFile
  • Reader
  • SequenceInputStream
  • SerializablePermission
  • StreamTokenizer
  • StringBufferInputStream
  • StringReader
  • StringWriter
  • Writer

Exceptions

  • CharConversionException
  • EOFException
  • FileNotFoundException
  • InterruptedIOException
  • InvalidClassException
  • InvalidObjectException
  • IOException
  • NotActiveException
  • NotSerializableException
  • ObjectStreamException
  • OptionalDataException
  • StreamCorruptedException
  • SyncFailedException
  • UncheckedIOException
  • UnsupportedEncodingException
  • UTFDataFormatException
  • WriteAbortedException

Errors

  • IOError


io

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.io

Provides for system input and output through data streams, serialization and the file system.

See: Description

  • Interface Summary
    Interface Description
    Closeable
    A Closeable is a source or destination of data that can be closed.
    DataInput
    The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
    DataOutput
    The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
    Externalizable
    Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
    FileFilter
    A filter for abstract pathnames.
    FilenameFilter
    Instances of classes that implement this interface are used to filter filenames.
    Flushable
    A Flushable is a destination of data that can be flushed.
    ObjectInput
    ObjectInput extends the DataInput interface to include the reading of objects.
    ObjectInputValidation
    Callback interface to allow validation of objects within a graph.
    ObjectOutput
    ObjectOutput extends the DataOutput interface to include writing of objects.
    ObjectStreamConstants
    Constants written into the Object Serialization Stream.
    Serializable
    Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
  • Class Summary
    Class Description
    BufferedInputStream
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
    BufferedOutputStream
    The class implements a buffered output stream.
    BufferedReader
    Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
    BufferedWriter
    Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
    ByteArrayInputStream
    A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
    ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array.
    CharArrayReader
    This class implements a character buffer that can be used as a character-input stream.
    CharArrayWriter
    This class implements a character buffer that can be used as an Writer.
    Console
    Methods to access the character-based console device, if any, associated with the current Java virtual machine.
    DataInputStream
    A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
    DataOutputStream
    A data output stream lets an application write primitive Java data types to an output stream in a portable way.
    File
    An abstract representation of file and directory pathnames.
    FileDescriptor
    Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
    FileInputStream
    A FileInputStream obtains input bytes from a file in a file system.
    FileOutputStream
    A file output stream is an output stream for writing data to a File or to a FileDescriptor.
    FilePermission
    This class represents access to a file or directory.
    FileReader
    Convenience class for reading character files.
    FileWriter
    Convenience class for writing character files.
    FilterInputStream
    A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
    FilterOutputStream
    This class is the superclass of all classes that filter output streams.
    FilterReader
    Abstract class for reading filtered character streams.
    FilterWriter
    Abstract class for writing filtered character streams.
    InputStream
    This abstract class is the superclass of all classes representing an input stream of bytes.
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset.
    LineNumberInputStream Deprecated
    This class incorrectly assumes that bytes adequately represent characters.
    LineNumberReader
    A buffered character-input stream that keeps track of line numbers.
    ObjectInputStream
    An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
    ObjectInputStream.GetField
    Provide access to the persistent fields read from the input stream.
    ObjectOutputStream
    An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
    ObjectOutputStream.PutField
    Provide programmatic access to the persistent fields to be written to ObjectOutput.
    ObjectStreamClass
    Serialization's descriptor for classes.
    ObjectStreamField
    A description of a Serializable field from a Serializable class.
    OutputStream
    This abstract class is the superclass of all classes representing an output stream of bytes.
    OutputStreamWriter
    An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset.
    PipedInputStream
    A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
    PipedOutputStream
    A piped output stream can be connected to a piped input stream to create a communications pipe.
    PipedReader
    Piped character-input streams.
    PipedWriter
    Piped character-output streams.
    PrintStream
    A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
    PrintWriter
    Prints formatted representations of objects to a text-output stream.
    PushbackInputStream
    A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
    PushbackReader
    A character-stream reader that allows characters to be pushed back into the stream.
    RandomAccessFile
    Instances of this class support both reading and writing to a random access file.
    Reader
    Abstract class for reading character streams.
    SequenceInputStream
    A SequenceInputStream represents the logical concatenation of other input streams.
    SerializablePermission
    This class is for Serializable permissions.
    StreamTokenizer
    The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
    StringBufferInputStream Deprecated
    This class does not properly convert characters into bytes.
    StringReader
    A character stream whose source is a string.
    StringWriter
    A character stream that collects its output in a string buffer, which can then be used to construct a string.
    Writer
    Abstract class for writing to character streams.
  • Exception Summary
    Exception Description
    CharConversionException
    Base class for character conversion exceptions.
    EOFException
    Signals that an end of file or end of stream has been reached unexpectedly during input.
    FileNotFoundException
    Signals that an attempt to open the file denoted by a specified pathname has failed.
    InterruptedIOException
    Signals that an I/O operation has been interrupted.
    InvalidClassException
    Thrown when the Serialization runtime detects one of the following problems with a Class.
    InvalidObjectException
    Indicates that one or more deserialized objects failed validation tests.
    IOException
    Signals that an I/O exception of some sort has occurred.
    NotActiveException
    Thrown when serialization or deserialization is not active.
    NotSerializableException
    Thrown when an instance is required to have a Serializable interface.
    ObjectStreamException
    Superclass of all exceptions specific to Object Stream classes.
    OptionalDataException
    Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
    StreamCorruptedException
    Thrown when control information that was read from an object stream violates internal consistency checks.
    SyncFailedException
    Signals that a sync operation has failed.
    UncheckedIOException
    Wraps an IOException with an unchecked exception.
    UnsupportedEncodingException
    The Character Encoding is not supported.
    UTFDataFormatException
    Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.
    WriteAbortedException
    Signals that one of the ObjectStreamExceptions was thrown during a write operation.
  • Error Summary
    Error Description
    IOError
    Thrown when a serious I/O error has occurred.

Package java.io Description

Provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Package Specification

  • Java Object Serialization Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Serialization Enhancements
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.io

Interfaces

  • Closeable
  • DataInput
  • DataOutput
  • Externalizable
  • FileFilter
  • FilenameFilter
  • Flushable
  • ObjectInput
  • ObjectInputValidation
  • ObjectOutput
  • ObjectStreamConstants
  • Serializable

Classes

  • BufferedInputStream
  • BufferedOutputStream
  • BufferedReader
  • BufferedWriter
  • ByteArrayInputStream
  • ByteArrayOutputStream
  • CharArrayReader
  • CharArrayWriter
  • Console
  • DataInputStream
  • DataOutputStream
  • File
  • FileDescriptor
  • FileInputStream
  • FileOutputStream
  • FilePermission
  • FileReader
  • FileWriter
  • FilterInputStream
  • FilterOutputStream
  • FilterReader
  • FilterWriter
  • InputStream
  • InputStreamReader
  • LineNumberInputStream
  • LineNumberReader
  • ObjectInputStream
  • ObjectInputStream.GetField
  • ObjectOutputStream
  • ObjectOutputStream.PutField
  • ObjectStreamClass
  • ObjectStreamField
  • OutputStream
  • OutputStreamWriter
  • PipedInputStream
  • PipedOutputStream
  • PipedReader
  • PipedWriter
  • PrintStream
  • PrintWriter
  • PushbackInputStream
  • PushbackReader
  • RandomAccessFile
  • Reader
  • SequenceInputStream
  • SerializablePermission
  • StreamTokenizer
  • StringBufferInputStream
  • StringReader
  • StringWriter
  • Writer

Exceptions

  • CharConversionException
  • EOFException
  • FileNotFoundException
  • InterruptedIOException
  • InvalidClassException
  • InvalidObjectException
  • IOException
  • NotActiveException
  • NotSerializableException
  • ObjectStreamException
  • OptionalDataException
  • StreamCorruptedException
  • SyncFailedException
  • UncheckedIOException
  • UnsupportedEncodingException
  • UTFDataFormatException
  • WriteAbortedException

Errors

  • IOError


compact1 - java.lang

Interfaces

  • Appendable
  • AutoCloseable
  • CharSequence
  • Cloneable
  • Comparable
  • Iterable
  • Readable
  • Runnable
  • Thread.UncaughtExceptionHandler

Classes

  • Boolean
  • Byte
  • Character
  • Character.Subset
  • Character.UnicodeBlock
  • Class
  • ClassLoader
  • ClassValue
  • Compiler
  • Double
  • Enum
  • Float
  • InheritableThreadLocal
  • Integer
  • Long
  • Math
  • Number
  • Object
  • Package
  • Process
  • ProcessBuilder
  • ProcessBuilder.Redirect
  • Runtime
  • RuntimePermission
  • SecurityManager
  • Short
  • StackTraceElement
  • StrictMath
  • String
  • StringBuffer
  • StringBuilder
  • System
  • Thread
  • ThreadGroup
  • ThreadLocal
  • Throwable
  • Void

Enums

  • Character.UnicodeScript
  • ProcessBuilder.Redirect.Type
  • Thread.State

Exceptions

  • ArithmeticException
  • ArrayIndexOutOfBoundsException
  • ArrayStoreException
  • ClassCastException
  • ClassNotFoundException
  • CloneNotSupportedException
  • EnumConstantNotPresentException
  • Exception
  • IllegalAccessException
  • IllegalArgumentException
  • IllegalMonitorStateException
  • IllegalStateException
  • IllegalThreadStateException
  • IndexOutOfBoundsException
  • InstantiationException
  • InterruptedException
  • NegativeArraySizeException
  • NoSuchFieldException
  • NoSuchMethodException
  • NullPointerException
  • NumberFormatException
  • ReflectiveOperationException
  • RuntimeException
  • SecurityException
  • StringIndexOutOfBoundsException
  • TypeNotPresentException
  • UnsupportedOperationException

Errors

  • AbstractMethodError
  • AssertionError
  • BootstrapMethodError
  • ClassCircularityError
  • ClassFormatError
  • Error
  • ExceptionInInitializerError
  • IllegalAccessError
  • IncompatibleClassChangeError
  • InstantiationError
  • InternalError
  • LinkageError
  • NoClassDefFoundError
  • NoSuchFieldError
  • NoSuchMethodError
  • OutOfMemoryError
  • StackOverflowError
  • ThreadDeath
  • UnknownError
  • UnsatisfiedLinkError
  • UnsupportedClassVersionError
  • VerifyError
  • VirtualMachineError

Annotation Types

  • Deprecated
  • FunctionalInterface
  • Override
  • SafeVarargs
  • SuppressWarnings


lang

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.lang

Provides classes that are fundamental to the design of the Java programming language.

See: Description

  • Interface Summary
    Interface Description
    Appendable
    An object to which char sequences and values can be appended.
    AutoCloseable
    An object that may hold resources (such as file or socket handles) until it is closed.
    CharSequence
    A CharSequence is a readable sequence of char values.
    Cloneable
    A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
    Comparable<T>
    This interface imposes a total ordering on the objects of each class that implements it.
    Iterable<T>
    Implementing this interface allows an object to be the target of the "for-each loop" statement.
    Readable
    A Readable is a source of characters.
    Runnable
    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
    Thread.UncaughtExceptionHandler
    Interface for handlers invoked when a Thread abruptly terminates due to an uncaught exception.
  • Class Summary
    Class Description
    Boolean
    The Boolean class wraps a value of the primitive type boolean in an object.
    Byte
    The Byte class wraps a value of primitive type byte in an object.
    Character
    The Character class wraps a value of the primitive type char in an object.
    Character.Subset
    Instances of this class represent particular subsets of the Unicode character set.
    Character.UnicodeBlock
    A family of character subsets representing the character blocks in the Unicode specification.
    Class<T>
    Instances of the class Class represent classes and interfaces in a running Java application.
    ClassLoader
    A class loader is an object that is responsible for loading classes.
    ClassValue<T>
    Lazily associate a computed value with (potentially) every type.
    Compiler
    The Compiler class is provided to support Java-to-native-code compilers and related services.
    Double
    The Double class wraps a value of the primitive type double in an object.
    Enum<E extends Enum<E>>
    This is the common base class of all Java language enumeration types.
    Float
    The Float class wraps a value of primitive type float in an object.
    InheritableThreadLocal<T>
    This class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child receives initial values for all inheritable thread-local variables for which the parent has values.
    Integer
    The Integer class wraps a value of the primitive type int in an object.
    Long
    The Long class wraps a value of the primitive type long in an object.
    Math
    The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    Number
    The abstract class Number is the superclass of platform classes representing numeric values that are convertible to the primitive types byte, double, float, int, long, and short.
    Object
    Class Object is the root of the class hierarchy.
    Package
    Package objects contain version information about the implementation and specification of a Java package.
    Process
    The ProcessBuilder.start() and Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
    ProcessBuilder
    This class is used to create operating system processes.
    ProcessBuilder.Redirect
    Represents a source of subprocess input or a destination of subprocess output.
    Runtime
    Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
    RuntimePermission
    This class is for runtime permissions.
    SecurityManager
    The security manager is a class that allows applications to implement a security policy.
    Short
    The Short class wraps a value of primitive type short in an object.
    StackTraceElement
    An element in a stack trace, as returned by Throwable.getStackTrace().
    StrictMath
    The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    String
    The String class represents character strings.
    StringBuffer
    A thread-safe, mutable sequence of characters.
    StringBuilder
    A mutable sequence of characters.
    System
    The System class contains several useful class fields and methods.
    Thread
    A thread is a thread of execution in a program.
    ThreadGroup
    A thread group represents a set of threads.
    ThreadLocal<T>
    This class provides thread-local variables.
    Throwable
    The Throwable class is the superclass of all errors and exceptions in the Java language.
    Void
    The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the Java keyword void.
  • Enum Summary
    Enum Description
    Character.UnicodeScript
    A family of character subsets representing the character scripts defined in the Unicode Standard Annex #24: Script Names.
    ProcessBuilder.Redirect.Type
    The type of a ProcessBuilder.Redirect.
    Thread.State
    A thread state.
  • Exception Summary
    Exception Description
    ArithmeticException
    Thrown when an exceptional arithmetic condition has occurred.
    ArrayIndexOutOfBoundsException
    Thrown to indicate that an array has been accessed with an illegal index.
    ArrayStoreException
    Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
    ClassCastException
    Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
    ClassNotFoundException
    Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
    CloneNotSupportedException
    Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
    EnumConstantNotPresentException
    Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name.
    Exception
    The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
    IllegalAccessException
    An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor.
    IllegalArgumentException
    Thrown to indicate that a method has been passed an illegal or inappropriate argument.
    IllegalMonitorStateException
    Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
    IllegalStateException
    Signals that a method has been invoked at an illegal or inappropriate time.
    IllegalThreadStateException
    Thrown to indicate that a thread is not in an appropriate state for the requested operation.
    IndexOutOfBoundsException
    Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
    InstantiationException
    Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated.
    InterruptedException
    Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
    NegativeArraySizeException
    Thrown if an application tries to create an array with negative size.
    NoSuchFieldException
    Signals that the class doesn't have a field of a specified name.
    NoSuchMethodException
    Thrown when a particular method cannot be found.
    NullPointerException
    Thrown when an application attempts to use null in a case where an object is required.
    NumberFormatException
    Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
    ReflectiveOperationException
    Common superclass of exceptions thrown by reflective operations in core reflection.
    RuntimeException
    RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
    SecurityException
    Thrown by the security manager to indicate a security violation.
    StringIndexOutOfBoundsException
    Thrown by String methods to indicate that an index is either negative or greater than the size of the string.
    TypeNotPresentException
    Thrown when an application tries to access a type using a string representing the type's name, but no definition for the type with the specified name can be found.
    UnsupportedOperationException
    Thrown to indicate that the requested operation is not supported.
  • Error Summary
    Error Description
    AbstractMethodError
    Thrown when an application tries to call an abstract method.
    AssertionError
    Thrown to indicate that an assertion has failed.
    BootstrapMethodError
    Thrown to indicate that an invokedynamic instruction has failed to find its bootstrap method, or the bootstrap method has failed to provide a call site with a target of the correct method type.
    ClassCircularityError
    Thrown when the Java Virtual Machine detects a circularity in the superclass hierarchy of a class being loaded.
    ClassFormatError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
    Error
    An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
    ExceptionInInitializerError
    Signals that an unexpected exception has occurred in a static initializer.
    IllegalAccessError
    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
    IncompatibleClassChangeError
    Thrown when an incompatible class change has occurred to some class definition.
    InstantiationError
    Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
    InternalError
    Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
    LinkageError
    Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
    NoClassDefFoundError
    Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
    NoSuchFieldError
    Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
    NoSuchMethodError
    Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
    OutOfMemoryError
    Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
    StackOverflowError
    Thrown when a stack overflow occurs because an application recurses too deeply.
    ThreadDeath
    An instance of ThreadDeath is thrown in the victim thread when the (deprecated) Thread.stop() method is invoked.
    UnknownError
    Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
    UnsatisfiedLinkError
    Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
    UnsupportedClassVersionError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
    VerifyError
    Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
    VirtualMachineError
    Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
  • Annotation Types Summary
    Annotation Type Description
    Deprecated
    A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
    FunctionalInterface
    An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification.
    Override
    Indicates that a method declaration is intended to override a method declaration in a supertype.
    SafeVarargs
    A programmer assertion that the body of the annotated method or constructor does not perform potentially unsafe operations on its varargs parameter.
    SuppressWarnings
    Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).

Package java.lang Description

Provides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time.

Frequently it is necessary to represent a value of primitive type as if it were an object. The wrapper classes Boolean, Character, Integer, Long, Float, and Double serve this purpose. An object of type Double, for example, contains a field whose type is double, representing that value in such a way that a reference to it can be stored in a variable of reference type. These classes also provide a number of methods for converting among primitive values, as well as supporting such standard methods as equals and hashCode. The Void class is a non-instantiable class that holds a reference to a Class object representing the type void.

The class Math provides commonly used mathematical functions such as sine, cosine, and square root. The classes String, StringBuffer, and StringBuilder similarly provide commonly used operations on character strings.

Classes ClassLoader, Process, ProcessBuilder, Runtime, SecurityManager, and System provide "system operations" that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.

Class Throwable encompasses objects that may be thrown by the throw statement. Subclasses of Throwable represent errors and exceptions.

Character Encodings

The specification of the java.nio.charset.Charset class describes the naming conventions for character encodings as well as the set of standard encodings that must be supported by every implementation of the Java platform.
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.lang

Interfaces

  • Appendable
  • AutoCloseable
  • CharSequence
  • Cloneable
  • Comparable
  • Iterable
  • Readable
  • Runnable
  • Thread.UncaughtExceptionHandler

Classes

  • Boolean
  • Byte
  • Character
  • Character.Subset
  • Character.UnicodeBlock
  • Class
  • ClassLoader
  • ClassValue
  • Compiler
  • Double
  • Enum
  • Float
  • InheritableThreadLocal
  • Integer
  • Long
  • Math
  • Number
  • Object
  • Package
  • Process
  • ProcessBuilder
  • ProcessBuilder.Redirect
  • Runtime
  • RuntimePermission
  • SecurityManager
  • Short
  • StackTraceElement
  • StrictMath
  • String
  • StringBuffer
  • StringBuilder
  • System
  • Thread
  • ThreadGroup
  • ThreadLocal
  • Throwable
  • Void

Enums

  • Character.UnicodeScript
  • ProcessBuilder.Redirect.Type
  • Thread.State

Exceptions

  • ArithmeticException
  • ArrayIndexOutOfBoundsException
  • ArrayStoreException
  • ClassCastException
  • ClassNotFoundException
  • CloneNotSupportedException
  • EnumConstantNotPresentException
  • Exception
  • IllegalAccessException
  • IllegalArgumentException
  • IllegalMonitorStateException
  • IllegalStateException
  • IllegalThreadStateException
  • IndexOutOfBoundsException
  • InstantiationException
  • InterruptedException
  • NegativeArraySizeException
  • NoSuchFieldException
  • NoSuchMethodException
  • NullPointerException
  • NumberFormatException
  • ReflectiveOperationException
  • RuntimeException
  • SecurityException
  • StringIndexOutOfBoundsException
  • TypeNotPresentException
  • UnsupportedOperationException

Errors

  • AbstractMethodError
  • AssertionError
  • BootstrapMethodError
  • ClassCircularityError
  • ClassFormatError
  • Error
  • ExceptionInInitializerError
  • IllegalAccessError
  • IncompatibleClassChangeError
  • InstantiationError
  • InternalError
  • LinkageError
  • NoClassDefFoundError
  • NoSuchFieldError
  • NoSuchMethodError
  • OutOfMemoryError
  • StackOverflowError
  • ThreadDeath
  • UnknownError
  • UnsatisfiedLinkError
  • UnsupportedClassVersionError
  • VerifyError
  • VirtualMachineError

Annotation Types

  • Deprecated
  • FunctionalInterface
  • Override
  • SafeVarargs
  • SuppressWarnings


lang

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.lang

Provides classes that are fundamental to the design of the Java programming language.

See: Description

  • Interface Summary
    Interface Description
    Appendable
    An object to which char sequences and values can be appended.
    AutoCloseable
    An object that may hold resources (such as file or socket handles) until it is closed.
    CharSequence
    A CharSequence is a readable sequence of char values.
    Cloneable
    A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
    Comparable<T>
    This interface imposes a total ordering on the objects of each class that implements it.
    Iterable<T>
    Implementing this interface allows an object to be the target of the "for-each loop" statement.
    Readable
    A Readable is a source of characters.
    Runnable
    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
    Thread.UncaughtExceptionHandler
    Interface for handlers invoked when a Thread abruptly terminates due to an uncaught exception.
  • Class Summary
    Class Description
    Boolean
    The Boolean class wraps a value of the primitive type boolean in an object.
    Byte
    The Byte class wraps a value of primitive type byte in an object.
    Character
    The Character class wraps a value of the primitive type char in an object.
    Character.Subset
    Instances of this class represent particular subsets of the Unicode character set.
    Character.UnicodeBlock
    A family of character subsets representing the character blocks in the Unicode specification.
    Class<T>
    Instances of the class Class represent classes and interfaces in a running Java application.
    ClassLoader
    A class loader is an object that is responsible for loading classes.
    ClassValue<T>
    Lazily associate a computed value with (potentially) every type.
    Compiler
    The Compiler class is provided to support Java-to-native-code compilers and related services.
    Double
    The Double class wraps a value of the primitive type double in an object.
    Enum<E extends Enum<E>>
    This is the common base class of all Java language enumeration types.
    Float
    The Float class wraps a value of primitive type float in an object.
    InheritableThreadLocal<T>
    This class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child receives initial values for all inheritable thread-local variables for which the parent has values.
    Integer
    The Integer class wraps a value of the primitive type int in an object.
    Long
    The Long class wraps a value of the primitive type long in an object.
    Math
    The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    Number
    The abstract class Number is the superclass of platform classes representing numeric values that are convertible to the primitive types byte, double, float, int, long, and short.
    Object
    Class Object is the root of the class hierarchy.
    Package
    Package objects contain version information about the implementation and specification of a Java package.
    Process
    The ProcessBuilder.start() and Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
    ProcessBuilder
    This class is used to create operating system processes.
    ProcessBuilder.Redirect
    Represents a source of subprocess input or a destination of subprocess output.
    Runtime
    Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
    RuntimePermission
    This class is for runtime permissions.
    SecurityManager
    The security manager is a class that allows applications to implement a security policy.
    Short
    The Short class wraps a value of primitive type short in an object.
    StackTraceElement
    An element in a stack trace, as returned by Throwable.getStackTrace().
    StrictMath
    The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    String
    The String class represents character strings.
    StringBuffer
    A thread-safe, mutable sequence of characters.
    StringBuilder
    A mutable sequence of characters.
    System
    The System class contains several useful class fields and methods.
    Thread
    A thread is a thread of execution in a program.
    ThreadGroup
    A thread group represents a set of threads.
    ThreadLocal<T>
    This class provides thread-local variables.
    Throwable
    The Throwable class is the superclass of all errors and exceptions in the Java language.
    Void
    The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the Java keyword void.
  • Enum Summary
    Enum Description
    Character.UnicodeScript
    A family of character subsets representing the character scripts defined in the Unicode Standard Annex #24: Script Names.
    ProcessBuilder.Redirect.Type
    The type of a ProcessBuilder.Redirect.
    Thread.State
    A thread state.
  • Exception Summary
    Exception Description
    ArithmeticException
    Thrown when an exceptional arithmetic condition has occurred.
    ArrayIndexOutOfBoundsException
    Thrown to indicate that an array has been accessed with an illegal index.
    ArrayStoreException
    Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
    ClassCastException
    Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
    ClassNotFoundException
    Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
    CloneNotSupportedException
    Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
    EnumConstantNotPresentException
    Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name.
    Exception
    The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
    IllegalAccessException
    An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor.
    IllegalArgumentException
    Thrown to indicate that a method has been passed an illegal or inappropriate argument.
    IllegalMonitorStateException
    Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
    IllegalStateException
    Signals that a method has been invoked at an illegal or inappropriate time.
    IllegalThreadStateException
    Thrown to indicate that a thread is not in an appropriate state for the requested operation.
    IndexOutOfBoundsException
    Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
    InstantiationException
    Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated.
    InterruptedException
    Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
    NegativeArraySizeException
    Thrown if an application tries to create an array with negative size.
    NoSuchFieldException
    Signals that the class doesn't have a field of a specified name.
    NoSuchMethodException
    Thrown when a particular method cannot be found.
    NullPointerException
    Thrown when an application attempts to use null in a case where an object is required.
    NumberFormatException
    Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
    ReflectiveOperationException
    Common superclass of exceptions thrown by reflective operations in core reflection.
    RuntimeException
    RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
    SecurityException
    Thrown by the security manager to indicate a security violation.
    StringIndexOutOfBoundsException
    Thrown by String methods to indicate that an index is either negative or greater than the size of the string.
    TypeNotPresentException
    Thrown when an application tries to access a type using a string representing the type's name, but no definition for the type with the specified name can be found.
    UnsupportedOperationException
    Thrown to indicate that the requested operation is not supported.
  • Error Summary
    Error Description
    AbstractMethodError
    Thrown when an application tries to call an abstract method.
    AssertionError
    Thrown to indicate that an assertion has failed.
    BootstrapMethodError
    Thrown to indicate that an invokedynamic instruction has failed to find its bootstrap method, or the bootstrap method has failed to provide a call site with a target of the correct method type.
    ClassCircularityError
    Thrown when the Java Virtual Machine detects a circularity in the superclass hierarchy of a class being loaded.
    ClassFormatError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
    Error
    An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
    ExceptionInInitializerError
    Signals that an unexpected exception has occurred in a static initializer.
    IllegalAccessError
    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
    IncompatibleClassChangeError
    Thrown when an incompatible class change has occurred to some class definition.
    InstantiationError
    Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
    InternalError
    Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
    LinkageError
    Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
    NoClassDefFoundError
    Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
    NoSuchFieldError
    Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
    NoSuchMethodError
    Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
    OutOfMemoryError
    Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
    StackOverflowError
    Thrown when a stack overflow occurs because an application recurses too deeply.
    ThreadDeath
    An instance of ThreadDeath is thrown in the victim thread when the (deprecated) Thread.stop() method is invoked.
    UnknownError
    Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
    UnsatisfiedLinkError
    Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
    UnsupportedClassVersionError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
    VerifyError
    Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
    VirtualMachineError
    Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
  • Annotation Types Summary
    Annotation Type Description
    Deprecated
    A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
    FunctionalInterface
    An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification.
    Override
    Indicates that a method declaration is intended to override a method declaration in a supertype.
    SafeVarargs
    A programmer assertion that the body of the annotated method or constructor does not perform potentially unsafe operations on its varargs parameter.
    SuppressWarnings
    Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).

Package java.lang Description

Provides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time.

Frequently it is necessary to represent a value of primitive type as if it were an object. The wrapper classes Boolean, Character, Integer, Long, Float, and Double serve this purpose. An object of type Double, for example, contains a field whose type is double, representing that value in such a way that a reference to it can be stored in a variable of reference type. These classes also provide a number of methods for converting among primitive values, as well as supporting such standard methods as equals and hashCode. The Void class is a non-instantiable class that holds a reference to a Class object representing the type void.

The class Math provides commonly used mathematical functions such as sine, cosine, and square root. The classes String, StringBuffer, and StringBuilder similarly provide commonly used operations on character strings.

Classes ClassLoader, Process, ProcessBuilder, Runtime, SecurityManager, and System provide "system operations" that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.

Class Throwable encompasses objects that may be thrown by the throw statement. Subclasses of Throwable represent errors and exceptions.

Character Encodings

The specification of the java.nio.charset.Charset class describes the naming conventions for character encodings as well as the set of standard encodings that must be supported by every implementation of the Java platform.
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.lang

Interfaces

  • Appendable
  • AutoCloseable
  • CharSequence
  • Cloneable
  • Comparable
  • Iterable
  • Readable
  • Runnable
  • Thread.UncaughtExceptionHandler

Classes

  • Boolean
  • Byte
  • Character
  • Character.Subset
  • Character.UnicodeBlock
  • Class
  • ClassLoader
  • ClassValue
  • Compiler
  • Double
  • Enum
  • Float
  • InheritableThreadLocal
  • Integer
  • Long
  • Math
  • Number
  • Object
  • Package
  • Process
  • ProcessBuilder
  • ProcessBuilder.Redirect
  • Runtime
  • RuntimePermission
  • SecurityManager
  • Short
  • StackTraceElement
  • StrictMath
  • String
  • StringBuffer
  • StringBuilder
  • System
  • Thread
  • ThreadGroup
  • ThreadLocal
  • Throwable
  • Void

Enums

  • Character.UnicodeScript
  • ProcessBuilder.Redirect.Type
  • Thread.State

Exceptions

  • ArithmeticException
  • ArrayIndexOutOfBoundsException
  • ArrayStoreException
  • ClassCastException
  • ClassNotFoundException
  • CloneNotSupportedException
  • EnumConstantNotPresentException
  • Exception
  • IllegalAccessException
  • IllegalArgumentException
  • IllegalMonitorStateException
  • IllegalStateException
  • IllegalThreadStateException
  • IndexOutOfBoundsException
  • InstantiationException
  • InterruptedException
  • NegativeArraySizeException
  • NoSuchFieldException
  • NoSuchMethodException
  • NullPointerException
  • NumberFormatException
  • ReflectiveOperationException
  • RuntimeException
  • SecurityException
  • StringIndexOutOfBoundsException
  • TypeNotPresentException
  • UnsupportedOperationException

Errors

  • AbstractMethodError
  • AssertionError
  • BootstrapMethodError
  • ClassCircularityError
  • ClassFormatError
  • Error
  • ExceptionInInitializerError
  • IllegalAccessError
  • IncompatibleClassChangeError
  • InstantiationError
  • InternalError
  • LinkageError
  • NoClassDefFoundError
  • NoSuchFieldError
  • NoSuchMethodError
  • OutOfMemoryError
  • StackOverflowError
  • ThreadDeath
  • UnknownError
  • UnsatisfiedLinkError
  • UnsupportedClassVersionError
  • VerifyError
  • VirtualMachineError

Annotation Types

  • Deprecated
  • FunctionalInterface
  • Override
  • SafeVarargs
  • SuppressWarnings


lang

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang

Provides classes that are fundamental to the design of the Java programming language.

See: Description

  • Interface Summary
    Interface Description
    Appendable
    An object to which char sequences and values can be appended.
    AutoCloseable
    An object that may hold resources (such as file or socket handles) until it is closed.
    CharSequence
    A CharSequence is a readable sequence of char values.
    Cloneable
    A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
    Comparable<T>
    This interface imposes a total ordering on the objects of each class that implements it.
    Iterable<T>
    Implementing this interface allows an object to be the target of the "for-each loop" statement.
    Readable
    A Readable is a source of characters.
    Runnable
    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
    Thread.UncaughtExceptionHandler
    Interface for handlers invoked when a Thread abruptly terminates due to an uncaught exception.
  • Class Summary
    Class Description
    Boolean
    The Boolean class wraps a value of the primitive type boolean in an object.
    Byte
    The Byte class wraps a value of primitive type byte in an object.
    Character
    The Character class wraps a value of the primitive type char in an object.
    Character.Subset
    Instances of this class represent particular subsets of the Unicode character set.
    Character.UnicodeBlock
    A family of character subsets representing the character blocks in the Unicode specification.
    Class<T>
    Instances of the class Class represent classes and interfaces in a running Java application.
    ClassLoader
    A class loader is an object that is responsible for loading classes.
    ClassValue<T>
    Lazily associate a computed value with (potentially) every type.
    Compiler
    The Compiler class is provided to support Java-to-native-code compilers and related services.
    Double
    The Double class wraps a value of the primitive type double in an object.
    Enum<E extends Enum<E>>
    This is the common base class of all Java language enumeration types.
    Float
    The Float class wraps a value of primitive type float in an object.
    InheritableThreadLocal<T>
    This class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child receives initial values for all inheritable thread-local variables for which the parent has values.
    Integer
    The Integer class wraps a value of the primitive type int in an object.
    Long
    The Long class wraps a value of the primitive type long in an object.
    Math
    The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    Number
    The abstract class Number is the superclass of platform classes representing numeric values that are convertible to the primitive types byte, double, float, int, long, and short.
    Object
    Class Object is the root of the class hierarchy.
    Package
    Package objects contain version information about the implementation and specification of a Java package.
    Process
    The ProcessBuilder.start() and Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
    ProcessBuilder
    This class is used to create operating system processes.
    ProcessBuilder.Redirect
    Represents a source of subprocess input or a destination of subprocess output.
    Runtime
    Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
    RuntimePermission
    This class is for runtime permissions.
    SecurityManager
    The security manager is a class that allows applications to implement a security policy.
    Short
    The Short class wraps a value of primitive type short in an object.
    StackTraceElement
    An element in a stack trace, as returned by Throwable.getStackTrace().
    StrictMath
    The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
    String
    The String class represents character strings.
    StringBuffer
    A thread-safe, mutable sequence of characters.
    StringBuilder
    A mutable sequence of characters.
    System
    The System class contains several useful class fields and methods.
    Thread
    A thread is a thread of execution in a program.
    ThreadGroup
    A thread group represents a set of threads.
    ThreadLocal<T>
    This class provides thread-local variables.
    Throwable
    The Throwable class is the superclass of all errors and exceptions in the Java language.
    Void
    The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the Java keyword void.
  • Enum Summary
    Enum Description
    Character.UnicodeScript
    A family of character subsets representing the character scripts defined in the Unicode Standard Annex #24: Script Names.
    ProcessBuilder.Redirect.Type
    The type of a ProcessBuilder.Redirect.
    Thread.State
    A thread state.
  • Exception Summary
    Exception Description
    ArithmeticException
    Thrown when an exceptional arithmetic condition has occurred.
    ArrayIndexOutOfBoundsException
    Thrown to indicate that an array has been accessed with an illegal index.
    ArrayStoreException
    Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
    ClassCastException
    Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
    ClassNotFoundException
    Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
    CloneNotSupportedException
    Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
    EnumConstantNotPresentException
    Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name.
    Exception
    The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
    IllegalAccessException
    An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor.
    IllegalArgumentException
    Thrown to indicate that a method has been passed an illegal or inappropriate argument.
    IllegalMonitorStateException
    Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
    IllegalStateException
    Signals that a method has been invoked at an illegal or inappropriate time.
    IllegalThreadStateException
    Thrown to indicate that a thread is not in an appropriate state for the requested operation.
    IndexOutOfBoundsException
    Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
    InstantiationException
    Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated.
    InterruptedException
    Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
    NegativeArraySizeException
    Thrown if an application tries to create an array with negative size.
    NoSuchFieldException
    Signals that the class doesn't have a field of a specified name.
    NoSuchMethodException
    Thrown when a particular method cannot be found.
    NullPointerException
    Thrown when an application attempts to use null in a case where an object is required.
    NumberFormatException
    Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
    ReflectiveOperationException
    Common superclass of exceptions thrown by reflective operations in core reflection.
    RuntimeException
    RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
    SecurityException
    Thrown by the security manager to indicate a security violation.
    StringIndexOutOfBoundsException
    Thrown by String methods to indicate that an index is either negative or greater than the size of the string.
    TypeNotPresentException
    Thrown when an application tries to access a type using a string representing the type's name, but no definition for the type with the specified name can be found.
    UnsupportedOperationException
    Thrown to indicate that the requested operation is not supported.
  • Error Summary
    Error Description
    AbstractMethodError
    Thrown when an application tries to call an abstract method.
    AssertionError
    Thrown to indicate that an assertion has failed.
    BootstrapMethodError
    Thrown to indicate that an invokedynamic instruction has failed to find its bootstrap method, or the bootstrap method has failed to provide a call site with a target of the correct method type.
    ClassCircularityError
    Thrown when the Java Virtual Machine detects a circularity in the superclass hierarchy of a class being loaded.
    ClassFormatError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
    Error
    An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
    ExceptionInInitializerError
    Signals that an unexpected exception has occurred in a static initializer.
    IllegalAccessError
    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
    IncompatibleClassChangeError
    Thrown when an incompatible class change has occurred to some class definition.
    InstantiationError
    Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
    InternalError
    Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
    LinkageError
    Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
    NoClassDefFoundError
    Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
    NoSuchFieldError
    Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
    NoSuchMethodError
    Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
    OutOfMemoryError
    Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
    StackOverflowError
    Thrown when a stack overflow occurs because an application recurses too deeply.
    ThreadDeath
    An instance of ThreadDeath is thrown in the victim thread when the (deprecated) Thread.stop() method is invoked.
    UnknownError
    Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
    UnsatisfiedLinkError
    Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
    UnsupportedClassVersionError
    Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
    VerifyError
    Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
    VirtualMachineError
    Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
  • Annotation Types Summary
    Annotation Type Description
    Deprecated
    A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
    FunctionalInterface
    An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification.
    Override
    Indicates that a method declaration is intended to override a method declaration in a supertype.
    SafeVarargs
    A programmer assertion that the body of the annotated method or constructor does not perform potentially unsafe operations on its varargs parameter.
    SuppressWarnings
    Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).

Package java.lang Description

Provides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time.

Frequently it is necessary to represent a value of primitive type as if it were an object. The wrapper classes Boolean, Character, Integer, Long, Float, and Double serve this purpose. An object of type Double, for example, contains a field whose type is double, representing that value in such a way that a reference to it can be stored in a variable of reference type. These classes also provide a number of methods for converting among primitive values, as well as supporting such standard methods as equals and hashCode. The Void class is a non-instantiable class that holds a reference to a Class object representing the type void.

The class Math provides commonly used mathematical functions such as sine, cosine, and square root. The classes String, StringBuffer, and StringBuilder similarly provide commonly used operations on character strings.

Classes ClassLoader, Process, ProcessBuilder, Runtime, SecurityManager, and System provide "system operations" that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.

Class Throwable encompasses objects that may be thrown by the throw statement. Subclasses of Throwable represent errors and exceptions.

Character Encodings

The specification of the java.nio.charset.Charset class describes the naming conventions for character encodings as well as the set of standard encodings that must be supported by every implementation of the Java platform.
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang

Interfaces

  • Appendable
  • AutoCloseable
  • CharSequence
  • Cloneable
  • Comparable
  • Iterable
  • Readable
  • Runnable
  • Thread.UncaughtExceptionHandler

Classes

  • Boolean
  • Byte
  • Character
  • Character.Subset
  • Character.UnicodeBlock
  • Class
  • ClassLoader
  • ClassValue
  • Compiler
  • Double
  • Enum
  • Float
  • InheritableThreadLocal
  • Integer
  • Long
  • Math
  • Number
  • Object
  • Package
  • Process
  • ProcessBuilder
  • ProcessBuilder.Redirect
  • Runtime
  • RuntimePermission
  • SecurityManager
  • Short
  • StackTraceElement
  • StrictMath
  • String
  • StringBuffer
  • StringBuilder
  • System
  • Thread
  • ThreadGroup
  • ThreadLocal
  • Throwable
  • Void

Enums

  • Character.UnicodeScript
  • ProcessBuilder.Redirect.Type
  • Thread.State

Exceptions

  • ArithmeticException
  • ArrayIndexOutOfBoundsException
  • ArrayStoreException
  • ClassCastException
  • ClassNotFoundException
  • CloneNotSupportedException
  • EnumConstantNotPresentException
  • Exception
  • IllegalAccessException
  • IllegalArgumentException
  • IllegalMonitorStateException
  • IllegalStateException
  • IllegalThreadStateException
  • IndexOutOfBoundsException
  • InstantiationException
  • InterruptedException
  • NegativeArraySizeException
  • NoSuchFieldException
  • NoSuchMethodException
  • NullPointerException
  • NumberFormatException
  • ReflectiveOperationException
  • RuntimeException
  • SecurityException
  • StringIndexOutOfBoundsException
  • TypeNotPresentException
  • UnsupportedOperationException

Errors

  • AbstractMethodError
  • AssertionError
  • BootstrapMethodError
  • ClassCircularityError
  • ClassFormatError
  • Error
  • ExceptionInInitializerError
  • IllegalAccessError
  • IncompatibleClassChangeError
  • InstantiationError
  • InternalError
  • LinkageError
  • NoClassDefFoundError
  • NoSuchFieldError
  • NoSuchMethodError
  • OutOfMemoryError
  • StackOverflowError
  • ThreadDeath
  • UnknownError
  • UnsatisfiedLinkError
  • UnsupportedClassVersionError
  • VerifyError
  • VirtualMachineError

Annotation Types

  • Deprecated
  • FunctionalInterface
  • Override
  • SafeVarargs
  • SuppressWarnings


compact1 - java.lang.annotation

Interfaces

  • Annotation

Enums

  • ElementType
  • RetentionPolicy

Exceptions

  • AnnotationTypeMismatchException
  • IncompleteAnnotationException

Errors

  • AnnotationFormatError

Annotation Types

  • Documented
  • Inherited
  • Native
  • Repeatable
  • Retention
  • Target


annotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.lang.annotation

Provides library support for the Java programming language annotation facility.

See: Description

  • Interface Summary
    Interface Description
    Annotation
    The common interface extended by all annotation types.
  • Enum Summary
    Enum Description
    ElementType
    The constants of this enumerated type provide a simple classification of the syntactic locations where annotations may appear in a Java program.
    RetentionPolicy
    Annotation retention policy.
  • Exception Summary
    Exception Description
    AnnotationTypeMismatchException
    Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized).
    IncompleteAnnotationException
    Thrown to indicate that a program has attempted to access an element of an annotation type that was added to the annotation type definition after the annotation was compiled (or serialized).
  • Error Summary
    Error Description
    AnnotationFormatError
    Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed.
  • Annotation Types Summary
    Annotation Type Description
    Documented
    Indicates that annotations with a type are to be documented by javadoc and similar tools by default.
    Inherited
    Indicates that an annotation type is automatically inherited.
    Native
    Indicates that a field defining a constant value may be referenced from native code.
    Repeatable
    The annotation type java.lang.annotation.Repeatable is used to indicate that the annotation type whose declaration it (meta-)annotates is repeatable.
    Retention
    Indicates how long annotations with the annotated type are to be retained.
    Target
    Indicates the contexts in which an annotation type is applicable.

Package java.lang.annotation Description

Provides library support for the Java programming language annotation facility.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.lang.annotation

Interfaces

  • Annotation

Enums

  • ElementType
  • RetentionPolicy

Exceptions

  • AnnotationTypeMismatchException
  • IncompleteAnnotationException

Errors

  • AnnotationFormatError

Annotation Types

  • Documented
  • Inherited
  • Native
  • Repeatable
  • Retention
  • Target


annotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.lang.annotation

Provides library support for the Java programming language annotation facility.

See: Description

  • Interface Summary
    Interface Description
    Annotation
    The common interface extended by all annotation types.
  • Enum Summary
    Enum Description
    ElementType
    The constants of this enumerated type provide a simple classification of the syntactic locations where annotations may appear in a Java program.
    RetentionPolicy
    Annotation retention policy.
  • Exception Summary
    Exception Description
    AnnotationTypeMismatchException
    Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized).
    IncompleteAnnotationException
    Thrown to indicate that a program has attempted to access an element of an annotation type that was added to the annotation type definition after the annotation was compiled (or serialized).
  • Error Summary
    Error Description
    AnnotationFormatError
    Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed.
  • Annotation Types Summary
    Annotation Type Description
    Documented
    Indicates that annotations with a type are to be documented by javadoc and similar tools by default.
    Inherited
    Indicates that an annotation type is automatically inherited.
    Native
    Indicates that a field defining a constant value may be referenced from native code.
    Repeatable
    The annotation type java.lang.annotation.Repeatable is used to indicate that the annotation type whose declaration it (meta-)annotates is repeatable.
    Retention
    Indicates how long annotations with the annotated type are to be retained.
    Target
    Indicates the contexts in which an annotation type is applicable.

Package java.lang.annotation Description

Provides library support for the Java programming language annotation facility.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.lang.annotation

Interfaces

  • Annotation

Enums

  • ElementType
  • RetentionPolicy

Exceptions

  • AnnotationTypeMismatchException
  • IncompleteAnnotationException

Errors

  • AnnotationFormatError

Annotation Types

  • Documented
  • Inherited
  • Native
  • Repeatable
  • Retention
  • Target


annotation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.annotation

Provides library support for the Java programming language annotation facility.

See: Description

  • Interface Summary
    Interface Description
    Annotation
    The common interface extended by all annotation types.
  • Enum Summary
    Enum Description
    ElementType
    The constants of this enumerated type provide a simple classification of the syntactic locations where annotations may appear in a Java program.
    RetentionPolicy
    Annotation retention policy.
  • Exception Summary
    Exception Description
    AnnotationTypeMismatchException
    Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized).
    IncompleteAnnotationException
    Thrown to indicate that a program has attempted to access an element of an annotation type that was added to the annotation type definition after the annotation was compiled (or serialized).
  • Error Summary
    Error Description
    AnnotationFormatError
    Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed.
  • Annotation Types Summary
    Annotation Type Description
    Documented
    Indicates that annotations with a type are to be documented by javadoc and similar tools by default.
    Inherited
    Indicates that an annotation type is automatically inherited.
    Native
    Indicates that a field defining a constant value may be referenced from native code.
    Repeatable
    The annotation type java.lang.annotation.Repeatable is used to indicate that the annotation type whose declaration it (meta-)annotates is repeatable.
    Retention
    Indicates how long annotations with the annotated type are to be retained.
    Target
    Indicates the contexts in which an annotation type is applicable.

Package java.lang.annotation Description

Provides library support for the Java programming language annotation facility.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.annotation

Interfaces

  • Annotation

Enums

  • ElementType
  • RetentionPolicy

Exceptions

  • AnnotationTypeMismatchException
  • IncompleteAnnotationException

Errors

  • AnnotationFormatError

Annotation Types

  • Documented
  • Inherited
  • Native
  • Repeatable
  • Retention
  • Target


compact3 - java.lang.instrument

Interfaces

  • ClassFileTransformer
  • Instrumentation

Classes

  • ClassDefinition

Exceptions

  • IllegalClassFormatException
  • UnmodifiableClassException


instrument

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.instrument

Provides services that allow Java programming language agents to instrument programs running on the JVM.

See: Description

  • Interface Summary
    Interface Description
    ClassFileTransformer
    An agent provides an implementation of this interface in order to transform class files.
    Instrumentation
    This class provides services needed to instrument Java programming language code.
  • Class Summary
    Class Description
    ClassDefinition
    This class serves as a parameter block to the Instrumentation.redefineClasses method.
  • Exception Summary
    Exception Description
    IllegalClassFormatException
    Thrown by an implementation of ClassFileTransformer.transform when its input parameters are invalid.
    UnmodifiableClassException
    Thrown by an implementation of Instrumentation.redefineClasses when one of the specified classes cannot be modified.

Package java.lang.instrument Description

Provides services that allow Java programming language agents to instrument programs running on the JVM. The mechanism for instrumentation is modification of the byte-codes of methods.

Package Specification

An agent is deployed as a JAR file. An attribute in the JAR file manifest specifies the agent class which will be loaded to start the agent. For implementations that support a command-line interface, an agent is started by specifying an option on the command-line. Implementations may also support a mechanism to start agents some time after the VM has started. For example, an implementation may provide a mechanism that allows a tool to attach to a running application, and initiate the loading of the tool's agent into the running application. The details as to how the load is initiated, is implementation dependent.

Command-Line Interface

An implementation is not required to provide a way to start agents from the command-line interface. On implementations that do provide a way to start agents from the command-line interface, an agent is started by adding this option to the command-line:

-javaagent:jarpath[=options]
jarpath is the path to the agent JAR file. options is the agent options. This switch may be used multiple times on the same command-line, thus creating multiple agents. More than one agent may use the same jarpath. An agent JAR file must conform to the JAR file specification.

The manifest of the agent JAR file must contain the attribute Premain-Class. The value of this attribute is the name of the agent class. The agent class must implement a public static premain method similar in principle to the main application entry point. After the Java Virtual Machine (JVM) has initialized, each premain method will be called in the order the agents were specified, then the real application main method will be called. Each premain method must return in order for the startup sequence to proceed.

The premain method has one of two possible signatures. The JVM first attempts to invoke the following method on the agent class:

public static void premain(String agentArgs, Instrumentation inst);

If the agent class does not implement this method then the JVM will attempt to invoke:

public static void premain(String agentArgs);

The agent class may also have an agentmain method for use when the agent is started after VM startup. When the agent is started using a command-line option, the agentmain method is not invoked.

The agent class will be loaded by the system class loader (see ClassLoader.getSystemClassLoader). This is the class loader which typically loads the class containing the application main method. The premain methods will be run under the same security and classloader rules as the application main method. There are no modeling restrictions on what the agent premain method may do. Anything application main can do, including creating threads, is legal from premain.

Each agent is passed its agent options via the agentArgs parameter. The agent options are passed as a single string, any additional parsing should be performed by the agent itself.

If the agent cannot be resolved (for example, because the agent class cannot be loaded, or because the agent class does not have an appropriate premain method), the JVM will abort. If a premain method throws an uncaught exception, the JVM will abort.

Starting Agents After VM Startup

An implementation may provide a mechanism to start agents sometime after the the VM has started. The details as to how this is initiated are implementation specific but typically the application has already started and its main method has already been invoked. In cases where an implementation supports the starting of agents after the VM has started the following applies:

  1. The manifest of the agent JAR must contain the attribute Agent-Class. The value of this attribute is the name of the agent class.

  2. The agent class must implement a public static agentmain method.

  3. The system class loader ( ClassLoader.getSystemClassLoader) must support a mechanism to add an agent JAR file to the system class path.

The agent JAR is appended to the system class path. This is the class loader that typically loads the class containing the application main method. The agent class is loaded and the JVM attempts to invoke the agentmain method. The JVM first attempts to invoke the following method on the agent class:

public static void agentmain(String agentArgs, Instrumentation inst);

If the agent class does not implement this method then the JVM will attempt to invoke:

public static void agentmain(String agentArgs);

The agent class may also have an premain method for use when the agent is started using a command-line option. When the agent is started after VM startup the premain method is not invoked.

The agent is passed its agent options via the agentArgs parameter. The agent options are passed as a single string, any additional parsing should be performed by the agent itself.

The agentmain method should do any necessary initialization required to start the agent. When startup is complete the method should return. If the agent cannot be started (for example, because the agent class cannot be loaded, or because the agent class does not have a conformant agentmain method), the JVM will not abort. If the agentmain method throws an uncaught exception it will be ignored.

Manifest Attributes

The following manifest attributes are defined for an agent JAR file:
Premain-Class
When an agent is specified at JVM launch time this attribute specifies the agent class. That is, the class containing the premain method. When an agent is specified at JVM launch time this attribute is required. If the attribute is not present the JVM will abort. Note: this is a class name, not a file name or path.
Agent-Class
If an implementation supports a mechanism to start agents sometime after the VM has started then this attribute specifies the agent class. That is, the class containing the agentmain method. This attribute is required, if it is not present the agent will not be started. Note: this is a class name, not a file name or path.
Boot-Class-Path
A list of paths to be searched by the bootstrap class loader. Paths represent directories or libraries (commonly referred to as JAR or zip libraries on many platforms). These paths are searched by the bootstrap class loader after the platform specific mechanisms of locating a class have failed. Paths are searched in the order listed. Paths in the list are separated by one or more spaces. A path takes the syntax of the path component of a hierarchical URI. The path is absolute if it begins with a slash character ('/'), otherwise it is relative. A relative path is resolved against the absolute path of the agent JAR file. Malformed and non-existent paths are ignored. When an agent is started sometime after the VM has started then paths that do not represent a JAR file are ignored. This attribute is optional.
Can-Redefine-Classes
Boolean (true or false, case irrelevant). Is the ability to redefine classes needed by this agent. Values other than true are considered false. This attribute is optional, the default is false.
Can-Retransform-Classes
Boolean (true or false, case irrelevant). Is the ability to retransform classes needed by this agent. Values other than true are considered false. This attribute is optional, the default is false.
Can-Set-Native-Method-Prefix
Boolean (true or false, case irrelevant). Is the ability to set native method prefix needed by this agent. Values other than true are considered false. This attribute is optional, the default is false.

An agent JAR file may have both the Premain-Class and Agent-Class attributes present in the manifest. When the agent is started on the command-line using the -javaagent option then the Premain-Class attribute specifies the name of the agent class and the Agent-Class attribute is ignored. Similarly, if the agent is started sometime after the VM has started, then the Agent-Class attribute specifies the name of the agent class (the value of Premain-Class attribute is ignored).

Related Documentation

For tool documentation, please see:
  • JDK Tools and Utilities
Since:
JDK1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.instrument

Interfaces

  • ClassFileTransformer
  • Instrumentation

Classes

  • ClassDefinition

Exceptions

  • IllegalClassFormatException
  • UnmodifiableClassException


compact1 - java.lang.invoke

Interfaces

  • MethodHandleInfo

Classes

  • CallSite
  • ConstantCallSite
  • LambdaMetafactory
  • MethodHandle
  • MethodHandleProxies
  • MethodHandles
  • MethodHandles.Lookup
  • MethodType
  • MutableCallSite
  • SerializedLambda
  • SwitchPoint
  • VolatileCallSite

Exceptions

  • LambdaConversionException
  • WrongMethodTypeException


invoke

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.lang.invoke

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

See: Description

  • Interface Summary
    Interface Description
    MethodHandleInfo
    A symbolic reference obtained by cracking a direct method handle into its consitutent symbolic parts.
  • Class Summary
    Class Description
    CallSite
    A CallSite is a holder for a variable MethodHandle, which is called its target.
    ConstantCallSite
    A ConstantCallSite is a CallSite whose target is permanent, and can never be changed.
    LambdaMetafactory
    Methods to facilitate the creation of simple "function objects" that implement one or more interfaces by delegation to a provided MethodHandle, possibly after type adaptation and partial evaluation of arguments.
    MethodHandle
    A method handle is a typed, directly executable reference to an underlying method, constructor, field, or similar low-level operation, with optional transformations of arguments or return values.
    MethodHandleProxies
    This class consists exclusively of static methods that help adapt method handles to other JVM types, such as interfaces.
    MethodHandles
    This class consists exclusively of static methods that operate on or return method handles.
    MethodHandles.Lookup
    A lookup object is a factory for creating method handles, when the creation requires access checking.
    MethodType
    A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller.
    MutableCallSite
    A MutableCallSite is a CallSite whose target variable behaves like an ordinary field.
    SerializedLambda
    Serialized form of a lambda expression.
    SwitchPoint
    A SwitchPoint is an object which can publish state transitions to other threads.
    VolatileCallSite
    A VolatileCallSite is a CallSite whose target acts like a volatile variable.
  • Exception Summary
    Exception Description
    LambdaConversionException
    LambdaConversionException
    WrongMethodTypeException
    Thrown to indicate that code has attempted to call a method handle via the wrong method type.

Package java.lang.invoke Description

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

As described in the Java Virtual Machine Specification, certain types in this package have special relations to dynamic language support in the virtual machine:

  • The class MethodHandle contains signature polymorphic methods which can be linked regardless of their type descriptor. Normally, method linkage requires exact matching of type descriptors.
  • The JVM bytecode format supports immediate constants of the classes MethodHandle and MethodType.

Summary of relevant Java Virtual Machine changes

The following low-level information summarizes relevant parts of the Java Virtual Machine specification. For full details, please see the current version of that specification. Each occurrence of an invokedynamic instruction is called a dynamic call site.

invokedynamic instructions

A dynamic call site is originally in an unlinked state. In this state, there is no target method for the call site to invoke.

Before the JVM can execute a dynamic call site (an invokedynamic instruction), the call site must first be linked. Linking is accomplished by calling a bootstrap method which is given the static information content of the call site, and which must produce a method handle that gives the behavior of the call site.

Each invokedynamic instruction statically specifies its own bootstrap method as a constant pool reference. The constant pool reference also specifies the call site's name and type descriptor, just like invokevirtual and the other invoke instructions.

Linking starts with resolving the constant pool entry for the bootstrap method, and resolving a MethodType object for the type descriptor of the dynamic call site. This resolution process may trigger class loading. It may therefore throw an error if a class fails to load. This error becomes the abnormal termination of the dynamic call site execution. Linkage does not trigger class initialization.

The bootstrap method is invoked on at least three values:

  • a MethodHandles.Lookup, a lookup object on the caller class in which dynamic call site occurs
  • a String, the method name mentioned in the call site
  • a MethodType, the resolved type descriptor of the call
  • optionally, between 1 and 251 additional static arguments taken from the constant pool
Invocation is as if by MethodHandle.invoke. The returned result must be a CallSite (or a subclass). The type of the call site's target must be exactly equal to the type derived from the dynamic call site's type descriptor and passed to the bootstrap method. The call site then becomes permanently linked to the dynamic call site.

As documented in the JVM specification, all failures arising from the linkage of a dynamic call site are reported by a BootstrapMethodError, which is thrown as the abnormal termination of the dynamic call site execution. If this happens, the same error will the thrown for all subsequent attempts to execute the dynamic call site.

timing of linkage

A dynamic call site is linked just before its first execution. The bootstrap method call implementing the linkage occurs within a thread that is attempting a first execution.

If there are several such threads, the bootstrap method may be invoked in several threads concurrently. Therefore, bootstrap methods which access global application data must take the usual precautions against race conditions. In any case, every invokedynamic instruction is either unlinked or linked to a unique CallSite object.

In an application which requires dynamic call sites with individually mutable behaviors, their bootstrap methods should produce distinct CallSite objects, one for each linkage request. Alternatively, an application can link a single CallSite object to several invokedynamic instructions, in which case a change to the target method will become visible at each of the instructions.

If several threads simultaneously execute a bootstrap method for a single dynamic call site, the JVM must choose one CallSite object and install it visibly to all threads. Any other bootstrap method calls are allowed to complete, but their results are ignored, and their dynamic call site invocations proceed with the originally chosen target object.

Discussion: These rules do not enable the JVM to duplicate dynamic call sites, or to issue “causeless” bootstrap method calls. Every dynamic call site transitions at most once from unlinked to linked, just before its first invocation. There is no way to undo the effect of a completed bootstrap method call.

types of bootstrap methods

As long as each bootstrap method can be correctly invoked by MethodHandle.invoke, its detailed type is arbitrary. For example, the first argument could be Object instead of MethodHandles.Lookup, and the return type could also be Object instead of CallSite. (Note that the types and number of the stacked arguments limit the legal kinds of bootstrap methods to appropriately typed static methods and constructors of CallSite subclasses.)

If a given invokedynamic instruction specifies no static arguments, the instruction's bootstrap method will be invoked on three arguments, conveying the instruction's caller class, name, and method type. If the invokedynamic instruction specifies one or more static arguments, those values will be passed as additional arguments to the method handle. (Note that because there is a limit of 255 arguments to any method, at most 251 extra arguments can be supplied, since the bootstrap method handle itself and its first three arguments must also be stacked.) The bootstrap method will be invoked as if by either MethodHandle.invoke or invokeWithArguments. (There is no way to tell the difference.)

The normal argument conversion rules for MethodHandle.invoke apply to all stacked arguments. For example, if a pushed value is a primitive type, it may be converted to a reference by boxing conversion. If the bootstrap method is a variable arity method (its modifier bit 0x0080 is set), then some or all of the arguments specified here may be collected into a trailing array parameter. (This is not a special rule, but rather a useful consequence of the interaction between CONSTANT_MethodHandle constants, the modifier bit for variable arity methods, and the asVarargsCollector transformation.)

Given these rules, here are examples of legal bootstrap method declarations, given various numbers N of extra arguments. The first rows (marked *) will work for any number of extra arguments.
N | sample bootstrap method
* | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
* | CallSite bootstrap(Object... args)
* | CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
0 | CallSite bootstrap(Lookup caller, String name, MethodType type)
0 | CallSite bootstrap(Lookup caller, Object... nameAndType)
1 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
The last example assumes that the extra arguments are of type CONSTANT_String and CONSTANT_Integer, respectively. The second-to-last example assumes that all extra arguments are of type CONSTANT_String. The other examples work with all types of extra arguments.

As noted above, the actual method type of the bootstrap method can vary. For example, the fourth argument could be MethodHandle, if that is the type of the corresponding constant in the CONSTANT_InvokeDynamic entry. In that case, the MethodHandle.invoke call will pass the extra method handle constant as an Object, but the type matching machinery of MethodHandle.invoke will cast the reference back to MethodHandle before invoking the bootstrap method. (If a string constant were passed instead, by badly generated code, that cast would then fail, resulting in a BootstrapMethodError.)

Note that, as a consequence of the above rules, the bootstrap method may accept a primitive argument, if it can be represented by a constant pool entry. However, arguments of type boolean, byte, short, or char cannot be created for bootstrap methods, since such constants cannot be directly represented in the constant pool, and the invocation of the bootstrap method will not perform the necessary narrowing primitive conversions.

Extra bootstrap method arguments are intended to allow language implementors to safely and compactly encode metadata. In principle, the name and extra arguments are redundant, since each call site could be given its own unique bootstrap method. Such a practice is likely to produce large class files and constant pools.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.lang.invoke

Interfaces

  • MethodHandleInfo

Classes

  • CallSite
  • ConstantCallSite
  • LambdaMetafactory
  • MethodHandle
  • MethodHandleProxies
  • MethodHandles
  • MethodHandles.Lookup
  • MethodType
  • MutableCallSite
  • SerializedLambda
  • SwitchPoint
  • VolatileCallSite

Exceptions

  • LambdaConversionException
  • WrongMethodTypeException


invoke

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.lang.invoke

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

See: Description

  • Interface Summary
    Interface Description
    MethodHandleInfo
    A symbolic reference obtained by cracking a direct method handle into its consitutent symbolic parts.
  • Class Summary
    Class Description
    CallSite
    A CallSite is a holder for a variable MethodHandle, which is called its target.
    ConstantCallSite
    A ConstantCallSite is a CallSite whose target is permanent, and can never be changed.
    LambdaMetafactory
    Methods to facilitate the creation of simple "function objects" that implement one or more interfaces by delegation to a provided MethodHandle, possibly after type adaptation and partial evaluation of arguments.
    MethodHandle
    A method handle is a typed, directly executable reference to an underlying method, constructor, field, or similar low-level operation, with optional transformations of arguments or return values.
    MethodHandleProxies
    This class consists exclusively of static methods that help adapt method handles to other JVM types, such as interfaces.
    MethodHandles
    This class consists exclusively of static methods that operate on or return method handles.
    MethodHandles.Lookup
    A lookup object is a factory for creating method handles, when the creation requires access checking.
    MethodType
    A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller.
    MutableCallSite
    A MutableCallSite is a CallSite whose target variable behaves like an ordinary field.
    SerializedLambda
    Serialized form of a lambda expression.
    SwitchPoint
    A SwitchPoint is an object which can publish state transitions to other threads.
    VolatileCallSite
    A VolatileCallSite is a CallSite whose target acts like a volatile variable.
  • Exception Summary
    Exception Description
    LambdaConversionException
    LambdaConversionException
    WrongMethodTypeException
    Thrown to indicate that code has attempted to call a method handle via the wrong method type.

Package java.lang.invoke Description

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

As described in the Java Virtual Machine Specification, certain types in this package have special relations to dynamic language support in the virtual machine:

  • The class MethodHandle contains signature polymorphic methods which can be linked regardless of their type descriptor. Normally, method linkage requires exact matching of type descriptors.
  • The JVM bytecode format supports immediate constants of the classes MethodHandle and MethodType.

Summary of relevant Java Virtual Machine changes

The following low-level information summarizes relevant parts of the Java Virtual Machine specification. For full details, please see the current version of that specification. Each occurrence of an invokedynamic instruction is called a dynamic call site.

invokedynamic instructions

A dynamic call site is originally in an unlinked state. In this state, there is no target method for the call site to invoke.

Before the JVM can execute a dynamic call site (an invokedynamic instruction), the call site must first be linked. Linking is accomplished by calling a bootstrap method which is given the static information content of the call site, and which must produce a method handle that gives the behavior of the call site.

Each invokedynamic instruction statically specifies its own bootstrap method as a constant pool reference. The constant pool reference also specifies the call site's name and type descriptor, just like invokevirtual and the other invoke instructions.

Linking starts with resolving the constant pool entry for the bootstrap method, and resolving a MethodType object for the type descriptor of the dynamic call site. This resolution process may trigger class loading. It may therefore throw an error if a class fails to load. This error becomes the abnormal termination of the dynamic call site execution. Linkage does not trigger class initialization.

The bootstrap method is invoked on at least three values:

  • a MethodHandles.Lookup, a lookup object on the caller class in which dynamic call site occurs
  • a String, the method name mentioned in the call site
  • a MethodType, the resolved type descriptor of the call
  • optionally, between 1 and 251 additional static arguments taken from the constant pool
Invocation is as if by MethodHandle.invoke. The returned result must be a CallSite (or a subclass). The type of the call site's target must be exactly equal to the type derived from the dynamic call site's type descriptor and passed to the bootstrap method. The call site then becomes permanently linked to the dynamic call site.

As documented in the JVM specification, all failures arising from the linkage of a dynamic call site are reported by a BootstrapMethodError, which is thrown as the abnormal termination of the dynamic call site execution. If this happens, the same error will the thrown for all subsequent attempts to execute the dynamic call site.

timing of linkage

A dynamic call site is linked just before its first execution. The bootstrap method call implementing the linkage occurs within a thread that is attempting a first execution.

If there are several such threads, the bootstrap method may be invoked in several threads concurrently. Therefore, bootstrap methods which access global application data must take the usual precautions against race conditions. In any case, every invokedynamic instruction is either unlinked or linked to a unique CallSite object.

In an application which requires dynamic call sites with individually mutable behaviors, their bootstrap methods should produce distinct CallSite objects, one for each linkage request. Alternatively, an application can link a single CallSite object to several invokedynamic instructions, in which case a change to the target method will become visible at each of the instructions.

If several threads simultaneously execute a bootstrap method for a single dynamic call site, the JVM must choose one CallSite object and install it visibly to all threads. Any other bootstrap method calls are allowed to complete, but their results are ignored, and their dynamic call site invocations proceed with the originally chosen target object.

Discussion: These rules do not enable the JVM to duplicate dynamic call sites, or to issue “causeless” bootstrap method calls. Every dynamic call site transitions at most once from unlinked to linked, just before its first invocation. There is no way to undo the effect of a completed bootstrap method call.

types of bootstrap methods

As long as each bootstrap method can be correctly invoked by MethodHandle.invoke, its detailed type is arbitrary. For example, the first argument could be Object instead of MethodHandles.Lookup, and the return type could also be Object instead of CallSite. (Note that the types and number of the stacked arguments limit the legal kinds of bootstrap methods to appropriately typed static methods and constructors of CallSite subclasses.)

If a given invokedynamic instruction specifies no static arguments, the instruction's bootstrap method will be invoked on three arguments, conveying the instruction's caller class, name, and method type. If the invokedynamic instruction specifies one or more static arguments, those values will be passed as additional arguments to the method handle. (Note that because there is a limit of 255 arguments to any method, at most 251 extra arguments can be supplied, since the bootstrap method handle itself and its first three arguments must also be stacked.) The bootstrap method will be invoked as if by either MethodHandle.invoke or invokeWithArguments. (There is no way to tell the difference.)

The normal argument conversion rules for MethodHandle.invoke apply to all stacked arguments. For example, if a pushed value is a primitive type, it may be converted to a reference by boxing conversion. If the bootstrap method is a variable arity method (its modifier bit 0x0080 is set), then some or all of the arguments specified here may be collected into a trailing array parameter. (This is not a special rule, but rather a useful consequence of the interaction between CONSTANT_MethodHandle constants, the modifier bit for variable arity methods, and the asVarargsCollector transformation.)

Given these rules, here are examples of legal bootstrap method declarations, given various numbers N of extra arguments. The first rows (marked *) will work for any number of extra arguments.
N | sample bootstrap method
* | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
* | CallSite bootstrap(Object... args)
* | CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
0 | CallSite bootstrap(Lookup caller, String name, MethodType type)
0 | CallSite bootstrap(Lookup caller, Object... nameAndType)
1 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
The last example assumes that the extra arguments are of type CONSTANT_String and CONSTANT_Integer, respectively. The second-to-last example assumes that all extra arguments are of type CONSTANT_String. The other examples work with all types of extra arguments.

As noted above, the actual method type of the bootstrap method can vary. For example, the fourth argument could be MethodHandle, if that is the type of the corresponding constant in the CONSTANT_InvokeDynamic entry. In that case, the MethodHandle.invoke call will pass the extra method handle constant as an Object, but the type matching machinery of MethodHandle.invoke will cast the reference back to MethodHandle before invoking the bootstrap method. (If a string constant were passed instead, by badly generated code, that cast would then fail, resulting in a BootstrapMethodError.)

Note that, as a consequence of the above rules, the bootstrap method may accept a primitive argument, if it can be represented by a constant pool entry. However, arguments of type boolean, byte, short, or char cannot be created for bootstrap methods, since such constants cannot be directly represented in the constant pool, and the invocation of the bootstrap method will not perform the necessary narrowing primitive conversions.

Extra bootstrap method arguments are intended to allow language implementors to safely and compactly encode metadata. In principle, the name and extra arguments are redundant, since each call site could be given its own unique bootstrap method. Such a practice is likely to produce large class files and constant pools.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.lang.invoke

Interfaces

  • MethodHandleInfo

Classes

  • CallSite
  • ConstantCallSite
  • LambdaMetafactory
  • MethodHandle
  • MethodHandleProxies
  • MethodHandles
  • MethodHandles.Lookup
  • MethodType
  • MutableCallSite
  • SerializedLambda
  • SwitchPoint
  • VolatileCallSite

Exceptions

  • LambdaConversionException
  • WrongMethodTypeException


invoke

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.invoke

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

See: Description

  • Interface Summary
    Interface Description
    MethodHandleInfo
    A symbolic reference obtained by cracking a direct method handle into its consitutent symbolic parts.
  • Class Summary
    Class Description
    CallSite
    A CallSite is a holder for a variable MethodHandle, which is called its target.
    ConstantCallSite
    A ConstantCallSite is a CallSite whose target is permanent, and can never be changed.
    LambdaMetafactory
    Methods to facilitate the creation of simple "function objects" that implement one or more interfaces by delegation to a provided MethodHandle, possibly after type adaptation and partial evaluation of arguments.
    MethodHandle
    A method handle is a typed, directly executable reference to an underlying method, constructor, field, or similar low-level operation, with optional transformations of arguments or return values.
    MethodHandleProxies
    This class consists exclusively of static methods that help adapt method handles to other JVM types, such as interfaces.
    MethodHandles
    This class consists exclusively of static methods that operate on or return method handles.
    MethodHandles.Lookup
    A lookup object is a factory for creating method handles, when the creation requires access checking.
    MethodType
    A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller.
    MutableCallSite
    A MutableCallSite is a CallSite whose target variable behaves like an ordinary field.
    SerializedLambda
    Serialized form of a lambda expression.
    SwitchPoint
    A SwitchPoint is an object which can publish state transitions to other threads.
    VolatileCallSite
    A VolatileCallSite is a CallSite whose target acts like a volatile variable.
  • Exception Summary
    Exception Description
    LambdaConversionException
    LambdaConversionException
    WrongMethodTypeException
    Thrown to indicate that code has attempted to call a method handle via the wrong method type.

Package java.lang.invoke Description

The java.lang.invoke package contains dynamic language support provided directly by the Java core class libraries and virtual machine.

As described in the Java Virtual Machine Specification, certain types in this package have special relations to dynamic language support in the virtual machine:

  • The class MethodHandle contains signature polymorphic methods which can be linked regardless of their type descriptor. Normally, method linkage requires exact matching of type descriptors.
  • The JVM bytecode format supports immediate constants of the classes MethodHandle and MethodType.

Summary of relevant Java Virtual Machine changes

The following low-level information summarizes relevant parts of the Java Virtual Machine specification. For full details, please see the current version of that specification. Each occurrence of an invokedynamic instruction is called a dynamic call site.

invokedynamic instructions

A dynamic call site is originally in an unlinked state. In this state, there is no target method for the call site to invoke.

Before the JVM can execute a dynamic call site (an invokedynamic instruction), the call site must first be linked. Linking is accomplished by calling a bootstrap method which is given the static information content of the call site, and which must produce a method handle that gives the behavior of the call site.

Each invokedynamic instruction statically specifies its own bootstrap method as a constant pool reference. The constant pool reference also specifies the call site's name and type descriptor, just like invokevirtual and the other invoke instructions.

Linking starts with resolving the constant pool entry for the bootstrap method, and resolving a MethodType object for the type descriptor of the dynamic call site. This resolution process may trigger class loading. It may therefore throw an error if a class fails to load. This error becomes the abnormal termination of the dynamic call site execution. Linkage does not trigger class initialization.

The bootstrap method is invoked on at least three values:

  • a MethodHandles.Lookup, a lookup object on the caller class in which dynamic call site occurs
  • a String, the method name mentioned in the call site
  • a MethodType, the resolved type descriptor of the call
  • optionally, between 1 and 251 additional static arguments taken from the constant pool
Invocation is as if by MethodHandle.invoke. The returned result must be a CallSite (or a subclass). The type of the call site's target must be exactly equal to the type derived from the dynamic call site's type descriptor and passed to the bootstrap method. The call site then becomes permanently linked to the dynamic call site.

As documented in the JVM specification, all failures arising from the linkage of a dynamic call site are reported by a BootstrapMethodError, which is thrown as the abnormal termination of the dynamic call site execution. If this happens, the same error will the thrown for all subsequent attempts to execute the dynamic call site.

timing of linkage

A dynamic call site is linked just before its first execution. The bootstrap method call implementing the linkage occurs within a thread that is attempting a first execution.

If there are several such threads, the bootstrap method may be invoked in several threads concurrently. Therefore, bootstrap methods which access global application data must take the usual precautions against race conditions. In any case, every invokedynamic instruction is either unlinked or linked to a unique CallSite object.

In an application which requires dynamic call sites with individually mutable behaviors, their bootstrap methods should produce distinct CallSite objects, one for each linkage request. Alternatively, an application can link a single CallSite object to several invokedynamic instructions, in which case a change to the target method will become visible at each of the instructions.

If several threads simultaneously execute a bootstrap method for a single dynamic call site, the JVM must choose one CallSite object and install it visibly to all threads. Any other bootstrap method calls are allowed to complete, but their results are ignored, and their dynamic call site invocations proceed with the originally chosen target object.

Discussion: These rules do not enable the JVM to duplicate dynamic call sites, or to issue “causeless” bootstrap method calls. Every dynamic call site transitions at most once from unlinked to linked, just before its first invocation. There is no way to undo the effect of a completed bootstrap method call.

types of bootstrap methods

As long as each bootstrap method can be correctly invoked by MethodHandle.invoke, its detailed type is arbitrary. For example, the first argument could be Object instead of MethodHandles.Lookup, and the return type could also be Object instead of CallSite. (Note that the types and number of the stacked arguments limit the legal kinds of bootstrap methods to appropriately typed static methods and constructors of CallSite subclasses.)

If a given invokedynamic instruction specifies no static arguments, the instruction's bootstrap method will be invoked on three arguments, conveying the instruction's caller class, name, and method type. If the invokedynamic instruction specifies one or more static arguments, those values will be passed as additional arguments to the method handle. (Note that because there is a limit of 255 arguments to any method, at most 251 extra arguments can be supplied, since the bootstrap method handle itself and its first three arguments must also be stacked.) The bootstrap method will be invoked as if by either MethodHandle.invoke or invokeWithArguments. (There is no way to tell the difference.)

The normal argument conversion rules for MethodHandle.invoke apply to all stacked arguments. For example, if a pushed value is a primitive type, it may be converted to a reference by boxing conversion. If the bootstrap method is a variable arity method (its modifier bit 0x0080 is set), then some or all of the arguments specified here may be collected into a trailing array parameter. (This is not a special rule, but rather a useful consequence of the interaction between CONSTANT_MethodHandle constants, the modifier bit for variable arity methods, and the asVarargsCollector transformation.)

Given these rules, here are examples of legal bootstrap method declarations, given various numbers N of extra arguments. The first rows (marked *) will work for any number of extra arguments.
N | sample bootstrap method
* | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
* | CallSite bootstrap(Object... args)
* | CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
0 | CallSite bootstrap(Lookup caller, String name, MethodType type)
0 | CallSite bootstrap(Lookup caller, Object... nameAndType)
1 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
2 | CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
The last example assumes that the extra arguments are of type CONSTANT_String and CONSTANT_Integer, respectively. The second-to-last example assumes that all extra arguments are of type CONSTANT_String. The other examples work with all types of extra arguments.

As noted above, the actual method type of the bootstrap method can vary. For example, the fourth argument could be MethodHandle, if that is the type of the corresponding constant in the CONSTANT_InvokeDynamic entry. In that case, the MethodHandle.invoke call will pass the extra method handle constant as an Object, but the type matching machinery of MethodHandle.invoke will cast the reference back to MethodHandle before invoking the bootstrap method. (If a string constant were passed instead, by badly generated code, that cast would then fail, resulting in a BootstrapMethodError.)

Note that, as a consequence of the above rules, the bootstrap method may accept a primitive argument, if it can be represented by a constant pool entry. However, arguments of type boolean, byte, short, or char cannot be created for bootstrap methods, since such constants cannot be directly represented in the constant pool, and the invocation of the bootstrap method will not perform the necessary narrowing primitive conversions.

Extra bootstrap method arguments are intended to allow language implementors to safely and compactly encode metadata. In principle, the name and extra arguments are redundant, since each call site could be given its own unique bootstrap method. Such a practice is likely to produce large class files and constant pools.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.invoke

Interfaces

  • MethodHandleInfo

Classes

  • CallSite
  • ConstantCallSite
  • LambdaMetafactory
  • MethodHandle
  • MethodHandleProxies
  • MethodHandles
  • MethodHandles.Lookup
  • MethodType
  • MutableCallSite
  • SerializedLambda
  • SwitchPoint
  • VolatileCallSite

Exceptions

  • LambdaConversionException
  • WrongMethodTypeException


compact3 - java.lang.management

Interfaces

  • BufferPoolMXBean
  • ClassLoadingMXBean
  • CompilationMXBean
  • GarbageCollectorMXBean
  • MemoryManagerMXBean
  • MemoryMXBean
  • MemoryPoolMXBean
  • OperatingSystemMXBean
  • PlatformLoggingMXBean
  • PlatformManagedObject
  • RuntimeMXBean
  • ThreadMXBean

Classes

  • LockInfo
  • ManagementFactory
  • ManagementPermission
  • MemoryNotificationInfo
  • MemoryUsage
  • MonitorInfo
  • ThreadInfo

Enums

  • MemoryType


management

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.management

Provides the management interfaces for monitoring and management of the Java virtual machine and other components in the Java runtime.

See: Description

  • Interface Summary
    Interface Description
    BufferPoolMXBean
    The management interface for a buffer pool, for example a pool of direct or mapped buffers.
    ClassLoadingMXBean
    The management interface for the class loading system of the Java virtual machine.
    CompilationMXBean
    The management interface for the compilation system of the Java virtual machine.
    GarbageCollectorMXBean
    The management interface for the garbage collection of the Java virtual machine.
    MemoryManagerMXBean
    The management interface for a memory manager.
    MemoryMXBean
    The management interface for the memory system of the Java virtual machine.
    MemoryPoolMXBean
    The management interface for a memory pool.
    OperatingSystemMXBean
    The management interface for the operating system on which the Java virtual machine is running.
    PlatformLoggingMXBean
    The management interface for the logging facility.
    PlatformManagedObject
    A platform managed object is a JMX MXBean for monitoring and managing a component in the Java platform.
    RuntimeMXBean
    The management interface for the runtime system of the Java virtual machine.
    ThreadMXBean
    The management interface for the thread system of the Java virtual machine.
  • Class Summary
    Class Description
    LockInfo
    Information about a lock.
    ManagementFactory
    The ManagementFactory class is a factory class for getting managed beans for the Java platform.
    ManagementPermission
    The permission which the SecurityManager will check when code that is running with a SecurityManager calls methods defined in the management interface for the Java platform.
    MemoryNotificationInfo
    The information about a memory notification.
    MemoryUsage
    A MemoryUsage object represents a snapshot of memory usage.
    MonitorInfo
    Information about an object monitor lock.
    ThreadInfo
    Thread information.
  • Enum Summary
    Enum Description
    MemoryType
    Types of memory pools.

Package java.lang.management Description

Provides the management interfaces for monitoring and management of the Java virtual machine and other components in the Java runtime. It allows both local and remote monitoring and management of the running Java virtual machine.

Platform MXBean

A platform MXBean is a managed bean that conforms to the JMX Instrumentation Specification and only uses a set of basic data types. Each platform MXBean is a PlatformManagedObject with a unique name.

ManagementFactory

The ManagementFactory class is the management factory class for the Java platform. This class provides a set of static factory methods to obtain the MXBeans for the Java platform to allow an application to access the MXBeans directly.

A platform MBeanServer can be accessed with the getPlatformMBeanServer method. On the first call to this method, it creates the platform MBeanServer and registers all platform MXBeans including platform MXBeans. Each platform MXBean is registered with a unique name defined in the specification of the management interface. This is a single MBeanServer that can be shared by different managed components running within the same Java virtual machine.

Interoperability

A management application and a platform MBeanServer of a running virtual machine can interoperate without requiring classes used by the platform MXBean interfaces. The data types being transmitted between the JMX connector server and the connector client are JMX open types and this allows interoperation across versions. A data type used by the MXBean interfaces are mapped to an open type when being accessed via MBeanServer interface. See the MXBean specification for details.

Ways to Access MXBeans

An application can monitor the instrumentation of the Java virtual machine and the runtime in the following ways:

1. Direct access to an MXBean interface

  • Get an MXBean instance locally in the running Java virtual machine:
       RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();

   // Get the standard attribute "VmVendor"
   String vendor = mxbean.getVmVendor();

    Or by calling the getPlatformMXBean or getPlatformMXBeans method:

       RuntimeMXBean mxbean = ManagementFactory.getPlatformMXBean(RuntimeMXBean.class);

   // Get the standard attribute "VmVendor"
   String vendor = mxbean.getVmVendor();

  • Construct an MXBean proxy instance that forwards the method calls to a given MBeanServer:
       MBeanServerConnection mbs;

   // Connect to a running JVM (or itself) and get MBeanServerConnection
   // that has the JVM MBeans registered in it
   ...

   // Get a MBean proxy for RuntimeMXBean interface
   RuntimeMXBean proxy =
       ManagementFactory.getPlatformMXBean(mbs,
                                           RuntimeMXBean.class);
   // Get standard attribute "VmVendor"
   String vendor = proxy.getVmVendor();

    A proxy is typically used to access an MXBean in a remote Java virtual machine. An alternative way to create an MXBean proxy is:

       RuntimeMXBean proxy =
       ManagementFactory.newPlatformMXBeanProxy(mbs,
                                                ManagementFactory.RUNTIME_MXBEAN_NAME,
                                                RuntimeMXBean.class);

2. Indirect access to an MXBean interface via MBeanServer

  • Go through the platform MBeanServer to access MXBeans locally or a specific MBeanServerConnection to access MXBeans remotely. The attributes and operations of an MXBean use only JMX open types which include basic data types, CompositeData, and TabularData defined in OpenType.

       MBeanServerConnection mbs;

   // Connect to a running JVM (or itself) and get MBeanServerConnection
   // that has the JVM MXBeans registered in it
   ...

   try {
       // Assuming the RuntimeMXBean has been registered in mbs
       ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME);

       // Get standard attribute "VmVendor"
       String vendor = (String) mbs.getAttribute(oname, "VmVendor");
   } catch (....) {
       // Catch the exceptions thrown by ObjectName constructor
       // and MBeanServer.getAttribute method
       ...
   }

Platform Extension

A Java virtual machine implementation may add its platform extension to the management interface by defining platform-dependent interfaces that extend the standard management interfaces to include platform-specific metrics and management operations. The static factory methods in the ManagementFactory class will return the MXBeans with the platform extension.

It is recommended to name the platform-specific attributes with a vendor-specific prefix such as the vendor's name to avoid collisions of the attribute name between the future extension to the standard management interface and the platform extension. If the future extension to the standard management interface defines a new attribute for a management interface and the attribute name is happened to be same as some vendor-specific attribute's name, the applications accessing that vendor-specific attribute would have to be modified to cope with versioning and compatibility issues.

Below is an example showing how to access an attribute from the platform extension:

1) Direct access to the Oracle-specific MXBean interface

   List<com.sun.management.GarbageCollectorMXBean> mxbeans =
       ManagementFactory.getPlatformMXBeans(com.sun.management.GarbageCollectorMXBean.class);

   for (com.sun.management.GarbageCollectorMXBean gc : mxbeans) {
       // Get the standard attribute "CollectionCount"
       String count = mxbean.getCollectionCount();

       // Get the platform-specific attribute "LastGcInfo"
       GcInfo gcinfo = gc.getLastGcInfo();
       ...
   }

2) Access the Oracle-specific MXBean interface via MBeanServer through proxy

   MBeanServerConnection mbs;

   // Connect to a running JVM (or itself) and get MBeanServerConnection
   // that has the JVM MXBeans registered in it
   ...

   List<com.sun.management.GarbageCollectorMXBean> mxbeans =
       ManagementFactory.getPlatformMXBeans(mbs, com.sun.management.GarbageCollectorMXBean.class);

   for (com.sun.management.GarbageCollectorMXBean gc : mxbeans) {
       // Get the standard attribute "CollectionCount"
       String count = mxbean.getCollectionCount();

       // Get the platform-specific attribute "LastGcInfo"
       GcInfo gcinfo = gc.getLastGcInfo();
       ...
   }

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

The java.lang.management API is thread-safe.

Since:
1.5
See Also:
JMX Specification.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.management

Interfaces

  • BufferPoolMXBean
  • ClassLoadingMXBean
  • CompilationMXBean
  • GarbageCollectorMXBean
  • MemoryManagerMXBean
  • MemoryMXBean
  • MemoryPoolMXBean
  • OperatingSystemMXBean
  • PlatformLoggingMXBean
  • PlatformManagedObject
  • RuntimeMXBean
  • ThreadMXBean

Classes

  • LockInfo
  • ManagementFactory
  • ManagementPermission
  • MemoryNotificationInfo
  • MemoryUsage
  • MonitorInfo
  • ThreadInfo

Enums

  • MemoryType


compact1 - java.lang.ref

Classes

  • PhantomReference
  • Reference
  • ReferenceQueue
  • SoftReference
  • WeakReference


ref

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.lang.ref

Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

See: Description

  • Class Summary
    Class Description
    PhantomReference<T>
    Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
    Reference<T>
    Abstract base class for reference objects.
    ReferenceQueue<T>
    Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
    SoftReference<T>
    Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
    WeakReference<T>
    Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Package java.lang.ref Description

Provides reference-object classes, which support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed.

Package Specification

A reference object encapsulates a reference to some other object so that the reference itself may be examined and manipulated like any other object. Three types of reference objects are provided, each weaker than the last: soft, weak, and phantom. Each type corresponds to a different level of reachability, as defined below. Soft references are for implementing memory-sensitive caches, weak references are for implementing canonicalizing mappings that do not prevent their keys (or values) from being reclaimed, and phantom references are for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.

Each reference-object type is implemented by a subclass of the abstract base Reference class. An instance of one of these subclasses encapsulates a single reference to a particular object, called the referent. Every reference object provides methods for getting and clearing the reference. Aside from the clearing operation reference objects are otherwise immutable, so no set operation is provided. A program may further subclass these subclasses, adding whatever fields and methods are required for its purposes, or it may use these subclasses without change.

Notification

A program may request to be notified of changes in an object's reachability by registering an appropriate reference object with a reference queue at the time the reference object is created. Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will add the reference to the associated queue. At this point, the reference is considered to be enqueued. The program may remove references from a queue either by polling or by blocking until a reference becomes available. Reference queues are implemented by the ReferenceQueue class.

The relationship between a registered reference object and its queue is one-sided. That is, a queue does not keep track of the references that are registered with it. If a registered reference becomes unreachable itself, then it will never be enqueued. It is the responsibility of the program using reference objects to ensure that the objects remain reachable for as long as the program is interested in their referents.

While some programs will choose to dedicate a thread to removing reference objects from one or more queues and processing them, this is by no means necessary. A tactic that often works well is to examine a reference queue in the course of performing some other fairly-frequent action. For example, a hashtable that uses weak references to implement weak keys could poll its reference queue each time the table is accessed. This is how the WeakHashMap class works. Because the ReferenceQueue.poll method simply checks an internal data structure, this check will add little overhead to the hashtable access methods.

Automatically-cleared references

Soft and weak references are automatically cleared by the collector before being added to the queues with which they are registered, if any. Therefore soft and weak references need not be registered with a queue in order to be useful, while phantom references do. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable.

Reachability

Going from strongest to weakest, the different levels of reachability reflect the life cycle of an object. They are operationally defined as follows:
  • An object is strongly reachable if it can be reached by some thread without traversing any reference objects. A newly-created object is strongly reachable by the thread that created it.
  • An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.
  • An object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference. When the weak references to a weakly-reachable object are cleared, the object becomes eligible for finalization.
  • An object is phantom reachable if it is neither strongly, softly, nor weakly reachable, it has been finalized, and some phantom reference refers to it.
  • Finally, an object is unreachable, and therefore eligible for reclamation, when it is not reachable in any of the above ways.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.lang.ref

Classes

  • PhantomReference
  • Reference
  • ReferenceQueue
  • SoftReference
  • WeakReference


ref

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.lang.ref

Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

See: Description

  • Class Summary
    Class Description
    PhantomReference<T>
    Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
    Reference<T>
    Abstract base class for reference objects.
    ReferenceQueue<T>
    Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
    SoftReference<T>
    Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
    WeakReference<T>
    Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Package java.lang.ref Description

Provides reference-object classes, which support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed.

Package Specification

A reference object encapsulates a reference to some other object so that the reference itself may be examined and manipulated like any other object. Three types of reference objects are provided, each weaker than the last: soft, weak, and phantom. Each type corresponds to a different level of reachability, as defined below. Soft references are for implementing memory-sensitive caches, weak references are for implementing canonicalizing mappings that do not prevent their keys (or values) from being reclaimed, and phantom references are for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.

Each reference-object type is implemented by a subclass of the abstract base Reference class. An instance of one of these subclasses encapsulates a single reference to a particular object, called the referent. Every reference object provides methods for getting and clearing the reference. Aside from the clearing operation reference objects are otherwise immutable, so no set operation is provided. A program may further subclass these subclasses, adding whatever fields and methods are required for its purposes, or it may use these subclasses without change.

Notification

A program may request to be notified of changes in an object's reachability by registering an appropriate reference object with a reference queue at the time the reference object is created. Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will add the reference to the associated queue. At this point, the reference is considered to be enqueued. The program may remove references from a queue either by polling or by blocking until a reference becomes available. Reference queues are implemented by the ReferenceQueue class.

The relationship between a registered reference object and its queue is one-sided. That is, a queue does not keep track of the references that are registered with it. If a registered reference becomes unreachable itself, then it will never be enqueued. It is the responsibility of the program using reference objects to ensure that the objects remain reachable for as long as the program is interested in their referents.

While some programs will choose to dedicate a thread to removing reference objects from one or more queues and processing them, this is by no means necessary. A tactic that often works well is to examine a reference queue in the course of performing some other fairly-frequent action. For example, a hashtable that uses weak references to implement weak keys could poll its reference queue each time the table is accessed. This is how the WeakHashMap class works. Because the ReferenceQueue.poll method simply checks an internal data structure, this check will add little overhead to the hashtable access methods.

Automatically-cleared references

Soft and weak references are automatically cleared by the collector before being added to the queues with which they are registered, if any. Therefore soft and weak references need not be registered with a queue in order to be useful, while phantom references do. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable.

Reachability

Going from strongest to weakest, the different levels of reachability reflect the life cycle of an object. They are operationally defined as follows:
  • An object is strongly reachable if it can be reached by some thread without traversing any reference objects. A newly-created object is strongly reachable by the thread that created it.
  • An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.
  • An object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference. When the weak references to a weakly-reachable object are cleared, the object becomes eligible for finalization.
  • An object is phantom reachable if it is neither strongly, softly, nor weakly reachable, it has been finalized, and some phantom reference refers to it.
  • Finally, an object is unreachable, and therefore eligible for reclamation, when it is not reachable in any of the above ways.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.lang.ref

Classes

  • PhantomReference
  • Reference
  • ReferenceQueue
  • SoftReference
  • WeakReference


ref

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.ref

Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

See: Description

  • Class Summary
    Class Description
    PhantomReference<T>
    Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
    Reference<T>
    Abstract base class for reference objects.
    ReferenceQueue<T>
    Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
    SoftReference<T>
    Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
    WeakReference<T>
    Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Package java.lang.ref Description

Provides reference-object classes, which support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed.

Package Specification

A reference object encapsulates a reference to some other object so that the reference itself may be examined and manipulated like any other object. Three types of reference objects are provided, each weaker than the last: soft, weak, and phantom. Each type corresponds to a different level of reachability, as defined below. Soft references are for implementing memory-sensitive caches, weak references are for implementing canonicalizing mappings that do not prevent their keys (or values) from being reclaimed, and phantom references are for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.

Each reference-object type is implemented by a subclass of the abstract base Reference class. An instance of one of these subclasses encapsulates a single reference to a particular object, called the referent. Every reference object provides methods for getting and clearing the reference. Aside from the clearing operation reference objects are otherwise immutable, so no set operation is provided. A program may further subclass these subclasses, adding whatever fields and methods are required for its purposes, or it may use these subclasses without change.

Notification

A program may request to be notified of changes in an object's reachability by registering an appropriate reference object with a reference queue at the time the reference object is created. Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will add the reference to the associated queue. At this point, the reference is considered to be enqueued. The program may remove references from a queue either by polling or by blocking until a reference becomes available. Reference queues are implemented by the ReferenceQueue class.

The relationship between a registered reference object and its queue is one-sided. That is, a queue does not keep track of the references that are registered with it. If a registered reference becomes unreachable itself, then it will never be enqueued. It is the responsibility of the program using reference objects to ensure that the objects remain reachable for as long as the program is interested in their referents.

While some programs will choose to dedicate a thread to removing reference objects from one or more queues and processing them, this is by no means necessary. A tactic that often works well is to examine a reference queue in the course of performing some other fairly-frequent action. For example, a hashtable that uses weak references to implement weak keys could poll its reference queue each time the table is accessed. This is how the WeakHashMap class works. Because the ReferenceQueue.poll method simply checks an internal data structure, this check will add little overhead to the hashtable access methods.

Automatically-cleared references

Soft and weak references are automatically cleared by the collector before being added to the queues with which they are registered, if any. Therefore soft and weak references need not be registered with a queue in order to be useful, while phantom references do. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable.

Reachability

Going from strongest to weakest, the different levels of reachability reflect the life cycle of an object. They are operationally defined as follows:
  • An object is strongly reachable if it can be reached by some thread without traversing any reference objects. A newly-created object is strongly reachable by the thread that created it.
  • An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.
  • An object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference. When the weak references to a weakly-reachable object are cleared, the object becomes eligible for finalization.
  • An object is phantom reachable if it is neither strongly, softly, nor weakly reachable, it has been finalized, and some phantom reference refers to it.
  • Finally, an object is unreachable, and therefore eligible for reclamation, when it is not reachable in any of the above ways.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.ref

Classes

  • PhantomReference
  • Reference
  • ReferenceQueue
  • SoftReference
  • WeakReference


compact1 - java.lang.reflect

Interfaces

  • AnnotatedArrayType
  • AnnotatedElement
  • AnnotatedParameterizedType
  • AnnotatedType
  • AnnotatedTypeVariable
  • AnnotatedWildcardType
  • GenericArrayType
  • GenericDeclaration
  • InvocationHandler
  • Member
  • ParameterizedType
  • Type
  • TypeVariable
  • WildcardType

Classes

  • AccessibleObject
  • Array
  • Constructor
  • Executable
  • Field
  • Method
  • Modifier
  • Parameter
  • Proxy
  • ReflectPermission

Exceptions

  • InvocationTargetException
  • MalformedParameterizedTypeException
  • MalformedParametersException
  • UndeclaredThrowableException

Errors

  • GenericSignatureFormatError


reflect

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.lang.reflect

Provides classes and interfaces for obtaining reflective information about classes and objects.

See: Description

  • Interface Summary
    Interface Description
    AnnotatedArrayType
    AnnotatedArrayType represents the potentially annotated use of an array type, whose component type may itself represent the annotated use of a type.
    AnnotatedElement
    Represents an annotated element of the program currently running in this VM.
    AnnotatedParameterizedType
    AnnotatedParameterizedType represents the potentially annotated use of a parameterized type, whose type arguments may themselves represent annotated uses of types.
    AnnotatedType
    AnnotatedType represents the potentially annotated use of a type in the program currently running in this VM.
    AnnotatedTypeVariable
    AnnotatedTypeVariable represents the potentially annotated use of a type variable, whose declaration may have bounds which themselves represent annotated uses of types.
    AnnotatedWildcardType
    AnnotatedWildcardType represents the potentially annotated use of a wildcard type argument, whose upper or lower bounds may themselves represent annotated uses of types.
    GenericArrayType
    GenericArrayType represents an array type whose component type is either a parameterized type or a type variable.
    GenericDeclaration
    A common interface for all entities that declare type variables.
    InvocationHandler
    InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
    Member
    Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
    ParameterizedType
    ParameterizedType represents a parameterized type such as Collection<String>.
    Type
    Type is the common superinterface for all types in the Java programming language.
    TypeVariable<D extends GenericDeclaration>
    TypeVariable is the common superinterface for type variables of kinds.
    WildcardType
    WildcardType represents a wildcard type expression, such as ?, ? extends Number, or ? super Integer.
  • Class Summary
    Class Description
    AccessibleObject
    The AccessibleObject class is the base class for Field, Method and Constructor objects.
    Array
    The Array class provides static methods to dynamically create and access Java arrays.
    Constructor<T>
    Constructor provides information about, and access to, a single constructor for a class.
    Executable
    A shared superclass for the common functionality of Method and Constructor.
    Field
    A Field provides information about, and dynamic access to, a single field of a class or an interface.
    Method
    A Method provides information about, and access to, a single method on a class or interface.
    Modifier
    The Modifier class provides static methods and constants to decode class and member access modifiers.
    Parameter
    Information about method parameters.
    Proxy
    Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
    ReflectPermission
    The Permission class for reflective operations.
  • Exception Summary
    Exception Description
    InvocationTargetException
    InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
    MalformedParameterizedTypeException
    Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it.
    MalformedParametersException
    Thrown when the java.lang.reflect package attempts to read method parameters from a class file and determines that one or more parameters are malformed.
    UndeclaredThrowableException
    Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.
  • Error Summary
    Error Description
    GenericSignatureFormatError
    Thrown when a syntactically malformed signature attribute is encountered by a reflective method that needs to interpret the generic signature information for a type, method or constructor.

Package java.lang.reflect Description

Provides classes and interfaces for obtaining reflective information about classes and objects. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use of reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions.

AccessibleObject allows suppression of access checks if the necessary ReflectPermission is available.

Array provides static methods to dynamically create and access arrays.

Classes in this package, along with java.lang.Class accommodate applications such as debuggers, interpreters, object inspectors, class browsers, and services such as Object Serialization and JavaBeans that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class.

Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.lang.reflect

Interfaces

  • AnnotatedArrayType
  • AnnotatedElement
  • AnnotatedParameterizedType
  • AnnotatedType
  • AnnotatedTypeVariable
  • AnnotatedWildcardType
  • GenericArrayType
  • GenericDeclaration
  • InvocationHandler
  • Member
  • ParameterizedType
  • Type
  • TypeVariable
  • WildcardType

Classes

  • AccessibleObject
  • Array
  • Constructor
  • Executable
  • Field
  • Method
  • Modifier
  • Parameter
  • Proxy
  • ReflectPermission

Exceptions

  • InvocationTargetException
  • MalformedParameterizedTypeException
  • MalformedParametersException
  • UndeclaredThrowableException

Errors

  • GenericSignatureFormatError


reflect

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.lang.reflect

Provides classes and interfaces for obtaining reflective information about classes and objects.

See: Description

  • Interface Summary
    Interface Description
    AnnotatedArrayType
    AnnotatedArrayType represents the potentially annotated use of an array type, whose component type may itself represent the annotated use of a type.
    AnnotatedElement
    Represents an annotated element of the program currently running in this VM.
    AnnotatedParameterizedType
    AnnotatedParameterizedType represents the potentially annotated use of a parameterized type, whose type arguments may themselves represent annotated uses of types.
    AnnotatedType
    AnnotatedType represents the potentially annotated use of a type in the program currently running in this VM.
    AnnotatedTypeVariable
    AnnotatedTypeVariable represents the potentially annotated use of a type variable, whose declaration may have bounds which themselves represent annotated uses of types.
    AnnotatedWildcardType
    AnnotatedWildcardType represents the potentially annotated use of a wildcard type argument, whose upper or lower bounds may themselves represent annotated uses of types.
    GenericArrayType
    GenericArrayType represents an array type whose component type is either a parameterized type or a type variable.
    GenericDeclaration
    A common interface for all entities that declare type variables.
    InvocationHandler
    InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
    Member
    Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
    ParameterizedType
    ParameterizedType represents a parameterized type such as Collection<String>.
    Type
    Type is the common superinterface for all types in the Java programming language.
    TypeVariable<D extends GenericDeclaration>
    TypeVariable is the common superinterface for type variables of kinds.
    WildcardType
    WildcardType represents a wildcard type expression, such as ?, ? extends Number, or ? super Integer.
  • Class Summary
    Class Description
    AccessibleObject
    The AccessibleObject class is the base class for Field, Method and Constructor objects.
    Array
    The Array class provides static methods to dynamically create and access Java arrays.
    Constructor<T>
    Constructor provides information about, and access to, a single constructor for a class.
    Executable
    A shared superclass for the common functionality of Method and Constructor.
    Field
    A Field provides information about, and dynamic access to, a single field of a class or an interface.
    Method
    A Method provides information about, and access to, a single method on a class or interface.
    Modifier
    The Modifier class provides static methods and constants to decode class and member access modifiers.
    Parameter
    Information about method parameters.
    Proxy
    Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
    ReflectPermission
    The Permission class for reflective operations.
  • Exception Summary
    Exception Description
    InvocationTargetException
    InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
    MalformedParameterizedTypeException
    Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it.
    MalformedParametersException
    Thrown when the java.lang.reflect package attempts to read method parameters from a class file and determines that one or more parameters are malformed.
    UndeclaredThrowableException
    Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.
  • Error Summary
    Error Description
    GenericSignatureFormatError
    Thrown when a syntactically malformed signature attribute is encountered by a reflective method that needs to interpret the generic signature information for a type, method or constructor.

Package java.lang.reflect Description

Provides classes and interfaces for obtaining reflective information about classes and objects. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use of reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions.

AccessibleObject allows suppression of access checks if the necessary ReflectPermission is available.

Array provides static methods to dynamically create and access arrays.

Classes in this package, along with java.lang.Class accommodate applications such as debuggers, interpreters, object inspectors, class browsers, and services such as Object Serialization and JavaBeans that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class.

Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.lang.reflect

Interfaces

  • AnnotatedArrayType
  • AnnotatedElement
  • AnnotatedParameterizedType
  • AnnotatedType
  • AnnotatedTypeVariable
  • AnnotatedWildcardType
  • GenericArrayType
  • GenericDeclaration
  • InvocationHandler
  • Member
  • ParameterizedType
  • Type
  • TypeVariable
  • WildcardType

Classes

  • AccessibleObject
  • Array
  • Constructor
  • Executable
  • Field
  • Method
  • Modifier
  • Parameter
  • Proxy
  • ReflectPermission

Exceptions

  • InvocationTargetException
  • MalformedParameterizedTypeException
  • MalformedParametersException
  • UndeclaredThrowableException

Errors

  • GenericSignatureFormatError


reflect

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.lang.reflect

Provides classes and interfaces for obtaining reflective information about classes and objects.

See: Description

  • Interface Summary
    Interface Description
    AnnotatedArrayType
    AnnotatedArrayType represents the potentially annotated use of an array type, whose component type may itself represent the annotated use of a type.
    AnnotatedElement
    Represents an annotated element of the program currently running in this VM.
    AnnotatedParameterizedType
    AnnotatedParameterizedType represents the potentially annotated use of a parameterized type, whose type arguments may themselves represent annotated uses of types.
    AnnotatedType
    AnnotatedType represents the potentially annotated use of a type in the program currently running in this VM.
    AnnotatedTypeVariable
    AnnotatedTypeVariable represents the potentially annotated use of a type variable, whose declaration may have bounds which themselves represent annotated uses of types.
    AnnotatedWildcardType
    AnnotatedWildcardType represents the potentially annotated use of a wildcard type argument, whose upper or lower bounds may themselves represent annotated uses of types.
    GenericArrayType
    GenericArrayType represents an array type whose component type is either a parameterized type or a type variable.
    GenericDeclaration
    A common interface for all entities that declare type variables.
    InvocationHandler
    InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
    Member
    Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
    ParameterizedType
    ParameterizedType represents a parameterized type such as Collection<String>.
    Type
    Type is the common superinterface for all types in the Java programming language.
    TypeVariable<D extends GenericDeclaration>
    TypeVariable is the common superinterface for type variables of kinds.
    WildcardType
    WildcardType represents a wildcard type expression, such as ?, ? extends Number, or ? super Integer.
  • Class Summary
    Class Description
    AccessibleObject
    The AccessibleObject class is the base class for Field, Method and Constructor objects.
    Array
    The Array class provides static methods to dynamically create and access Java arrays.
    Constructor<T>
    Constructor provides information about, and access to, a single constructor for a class.
    Executable
    A shared superclass for the common functionality of Method and Constructor.
    Field
    A Field provides information about, and dynamic access to, a single field of a class or an interface.
    Method
    A Method provides information about, and access to, a single method on a class or interface.
    Modifier
    The Modifier class provides static methods and constants to decode class and member access modifiers.
    Parameter
    Information about method parameters.
    Proxy
    Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
    ReflectPermission
    The Permission class for reflective operations.
  • Exception Summary
    Exception Description
    InvocationTargetException
    InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
    MalformedParameterizedTypeException
    Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it.
    MalformedParametersException
    Thrown when the java.lang.reflect package attempts to read method parameters from a class file and determines that one or more parameters are malformed.
    UndeclaredThrowableException
    Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.
  • Error Summary
    Error Description
    GenericSignatureFormatError
    Thrown when a syntactically malformed signature attribute is encountered by a reflective method that needs to interpret the generic signature information for a type, method or constructor.

Package java.lang.reflect Description

Provides classes and interfaces for obtaining reflective information about classes and objects. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use of reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions.

AccessibleObject allows suppression of access checks if the necessary ReflectPermission is available.

Array provides static methods to dynamically create and access arrays.

Classes in this package, along with java.lang.Class accommodate applications such as debuggers, interpreters, object inspectors, class browsers, and services such as Object Serialization and JavaBeans that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class.

Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.lang.reflect

Interfaces

  • AnnotatedArrayType
  • AnnotatedElement
  • AnnotatedParameterizedType
  • AnnotatedType
  • AnnotatedTypeVariable
  • AnnotatedWildcardType
  • GenericArrayType
  • GenericDeclaration
  • InvocationHandler
  • Member
  • ParameterizedType
  • Type
  • TypeVariable
  • WildcardType

Classes

  • AccessibleObject
  • Array
  • Constructor
  • Executable
  • Field
  • Method
  • Modifier
  • Parameter
  • Proxy
  • ReflectPermission

Exceptions

  • InvocationTargetException
  • MalformedParameterizedTypeException
  • MalformedParametersException
  • UndeclaredThrowableException

Errors

  • GenericSignatureFormatError


compact1 - java.math

Classes

  • BigDecimal
  • BigInteger
  • MathContext

Enums

  • RoundingMode


math

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.math

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

See: Description

  • Class Summary
    Class Description
    BigDecimal
    Immutable, arbitrary-precision signed decimal numbers.
    BigInteger
    Immutable arbitrary-precision integers.
    MathContext
    Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the BigDecimal class.
  • Enum Summary
    Enum Description
    RoundingMode
    Specifies a rounding behavior for numerical operations capable of discarding precision.

Package java.math Description

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal). BigInteger is analogous to the primitive integer types except that it provides arbitrary precision, hence operations on BigIntegers do not overflow or lose precision. In addition to standard arithmetic operations, BigInteger provides modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations. BigDecimal provides arbitrary-precision signed decimal numbers suitable for currency calculations and the like. BigDecimal gives the user complete control over rounding behavior, allowing the user to choose from a comprehensive set of eight rounding modes.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.math

Classes

  • BigDecimal
  • BigInteger
  • MathContext

Enums

  • RoundingMode


math

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.math

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

See: Description

  • Class Summary
    Class Description
    BigDecimal
    Immutable, arbitrary-precision signed decimal numbers.
    BigInteger
    Immutable arbitrary-precision integers.
    MathContext
    Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the BigDecimal class.
  • Enum Summary
    Enum Description
    RoundingMode
    Specifies a rounding behavior for numerical operations capable of discarding precision.

Package java.math Description

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal). BigInteger is analogous to the primitive integer types except that it provides arbitrary precision, hence operations on BigIntegers do not overflow or lose precision. In addition to standard arithmetic operations, BigInteger provides modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations. BigDecimal provides arbitrary-precision signed decimal numbers suitable for currency calculations and the like. BigDecimal gives the user complete control over rounding behavior, allowing the user to choose from a comprehensive set of eight rounding modes.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.math

Classes

  • BigDecimal
  • BigInteger
  • MathContext

Enums

  • RoundingMode


math

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.math

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

See: Description

  • Class Summary
    Class Description
    BigDecimal
    Immutable, arbitrary-precision signed decimal numbers.
    BigInteger
    Immutable arbitrary-precision integers.
    MathContext
    Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the BigDecimal class.
  • Enum Summary
    Enum Description
    RoundingMode
    Specifies a rounding behavior for numerical operations capable of discarding precision.

Package java.math Description

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal). BigInteger is analogous to the primitive integer types except that it provides arbitrary precision, hence operations on BigIntegers do not overflow or lose precision. In addition to standard arithmetic operations, BigInteger provides modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations. BigDecimal provides arbitrary-precision signed decimal numbers suitable for currency calculations and the like. BigDecimal gives the user complete control over rounding behavior, allowing the user to choose from a comprehensive set of eight rounding modes.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.math

Classes

  • BigDecimal
  • BigInteger
  • MathContext

Enums

  • RoundingMode


compact1 - java.net

Interfaces

  • ContentHandlerFactory
  • CookiePolicy
  • CookieStore
  • DatagramSocketImplFactory
  • FileNameMap
  • ProtocolFamily
  • SocketImplFactory
  • SocketOption
  • SocketOptions
  • URLStreamHandlerFactory

Classes

  • Authenticator
  • CacheRequest
  • CacheResponse
  • ContentHandler
  • CookieHandler
  • CookieManager
  • DatagramPacket
  • DatagramSocket
  • DatagramSocketImpl
  • HttpCookie
  • HttpURLConnection
  • IDN
  • Inet4Address
  • Inet6Address
  • InetAddress
  • InetSocketAddress
  • InterfaceAddress
  • JarURLConnection
  • MulticastSocket
  • NetPermission
  • NetworkInterface
  • PasswordAuthentication
  • Proxy
  • ProxySelector
  • ResponseCache
  • SecureCacheResponse
  • ServerSocket
  • Socket
  • SocketAddress
  • SocketImpl
  • SocketPermission
  • StandardSocketOptions
  • URI
  • URL
  • URLClassLoader
  • URLConnection
  • URLDecoder
  • URLEncoder
  • URLPermission
  • URLStreamHandler

Enums

  • Authenticator.RequestorType
  • Proxy.Type
  • StandardProtocolFamily

Exceptions

  • BindException
  • ConnectException
  • HttpRetryException
  • MalformedURLException
  • NoRouteToHostException
  • PortUnreachableException
  • ProtocolException
  • SocketException
  • SocketTimeoutException
  • UnknownHostException
  • UnknownServiceException
  • URISyntaxException


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.net

Provides the classes for implementing networking applications.

See: Description

  • Interface Summary
    Interface Description
    ContentHandlerFactory
    This interface defines a factory for content handlers.
    CookiePolicy
    CookiePolicy implementations decide which cookies should be accepted and which should be rejected.
    CookieStore
    A CookieStore object represents a storage for cookie.
    DatagramSocketImplFactory
    This interface defines a factory for datagram socket implementations.
    FileNameMap
    A simple interface which provides a mechanism to map between a file name and a MIME type string.
    ProtocolFamily
    Represents a family of communication protocols.
    SocketImplFactory
    This interface defines a factory for socket implementations.
    SocketOption<T>
    A socket option associated with a socket.
    SocketOptions
    Interface of methods to get/set socket options.
    URLStreamHandlerFactory
    This interface defines a factory for URL stream protocol handlers.
  • Class Summary
    Class Description
    Authenticator
    The class Authenticator represents an object that knows how to obtain authentication for a network connection.
    CacheRequest
    Represents channels for storing resources in the ResponseCache.
    CacheResponse
    Represent channels for retrieving resources from the ResponseCache.
    ContentHandler
    The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
    CookieHandler
    A CookieHandler object provides a callback mechanism to hook up a HTTP state management policy implementation into the HTTP protocol handler.
    CookieManager
    CookieManager provides a concrete implementation of CookieHandler, which separates the storage of cookies from the policy surrounding accepting and rejecting cookies.
    DatagramPacket
    This class represents a datagram packet.
    DatagramSocket
    This class represents a socket for sending and receiving datagram packets.
    DatagramSocketImpl
    Abstract datagram and multicast socket implementation base class.
    HttpCookie
    An HttpCookie object represents an HTTP cookie, which carries state information between server and user agent.
    HttpURLConnection
    A URLConnection with support for HTTP-specific features.
    IDN
    Provides methods to convert internationalized domain names (IDNs) between a normal Unicode representation and an ASCII Compatible Encoding (ACE) representation.
    Inet4Address
    This class represents an Internet Protocol version 4 (IPv4) address.
    Inet6Address
    This class represents an Internet Protocol version 6 (IPv6) address.
    InetAddress
    This class represents an Internet Protocol (IP) address.
    InetSocketAddress
    This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname.
    InterfaceAddress
    This class represents a Network Interface address.
    JarURLConnection
    A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
    MulticastSocket
    The multicast datagram socket class is useful for sending and receiving IP multicast packets.
    NetPermission
    This class is for various network permissions.
    NetworkInterface
    This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.
    PasswordAuthentication
    The class PasswordAuthentication is a data holder that is used by Authenticator.
    Proxy
    This class represents a proxy setting, typically a type (http, socks) and a socket address.
    ProxySelector
    Selects the proxy server to use, if any, when connecting to the network resource referenced by a URL.
    ResponseCache
    Represents implementations of URLConnection caches.
    SecureCacheResponse
    Represents a cache response originally retrieved through secure means, such as TLS.
    ServerSocket
    This class implements server sockets.
    Socket
    This class implements client sockets (also called just "sockets").
    SocketAddress
    This class represents a Socket Address with no protocol attachment.
    SocketImpl
    The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
    SocketPermission
    This class represents access to a network via sockets.
    StandardSocketOptions
    Defines the standard socket options.
    URI
    Represents a Uniform Resource Identifier (URI) reference.
    URL
    Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
    URLClassLoader
    This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
    URLConnection
    The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
    URLDecoder
    Utility class for HTML form decoding.
    URLEncoder
    Utility class for HTML form encoding.
    URLPermission
    Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-settable request methods and request headers.
    URLStreamHandler
    The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
  • Enum Summary
    Enum Description
    Authenticator.RequestorType
    The type of the entity requesting authentication.
    Proxy.Type
    Represents the proxy type.
    StandardProtocolFamily
    Defines the standard families of communication protocols.
  • Exception Summary
    Exception Description
    BindException
    Signals that an error occurred while attempting to bind a socket to a local address and port.
    ConnectException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    HttpRetryException
    Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled.
    MalformedURLException
    Thrown to indicate that a malformed URL has occurred.
    NoRouteToHostException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    PortUnreachableException
    Signals that an ICMP Port Unreachable message has been received on a connected datagram.
    ProtocolException
    Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
    SocketException
    Thrown to indicate that there is an error creating or accessing a Socket.
    SocketTimeoutException
    Signals that a timeout has occurred on a socket read or accept.
    UnknownHostException
    Thrown to indicate that the IP address of a host could not be determined.
    UnknownServiceException
    Thrown to indicate that an unknown service exception has occurred.
    URISyntaxException
    Checked exception thrown to indicate that a string could not be parsed as a URI reference.

Package java.net Description

Provides the classes for implementing networking applications.

The java.net package can be roughly divided in two sections:

  • A Low Level API, which deals with the following abstractions:

    • Addresses, which are networking identifiers, like IP addresses.

    • Sockets, which are basic bidirectional data communication mechanisms.

    • Interfaces, which describe network interfaces.

  • A High Level API, which deals with the following abstractions:

    • URIs, which represent Universal Resource Identifiers.

    • URLs, which represent Universal Resource Locators.

    • Connections, which represents connections to the resource pointed to by URLs.

Addresses

Addresses are used throughout the java.net APIs as either host identifiers, or socket endpoint identifiers.

The InetAddress class is the abstraction representing an IP (Internet Protocol) address. It has two subclasses:

  • Inet4Address for IPv4 addresses.
  • Inet6Address for IPv6 addresses.

But, in most cases, there is no need to deal directly with the subclasses, as the InetAddress abstraction should cover most of the needed functionality.

About IPv6

Not all systems have support for the IPv6 protocol, and while the Java networking stack will attempt to detect it and use it transparently when available, it is also possible to disable its use with a system property. In the case where IPv6 is not available, or explicitly disabled, Inet6Address are not valid arguments for most networking operations any more. While methods like InetAddress.getByName(java.lang.String) are guaranteed not to return an Inet6Address when looking up host names, it is possible, by passing literals, to create such an object. In which case, most methods, when called with an Inet6Address will throw an Exception.

Sockets

Sockets are means to establish a communication link between machines over the network. The java.net package provides 4 kinds of Sockets:

  • Socket is a TCP client API, and will typically be used to connect to a remote host.
  • ServerSocket is a TCP server API, and will typically accept connections from client sockets.
  • DatagramSocket is a UDP endpoint API and is used to send and receive datagram packets.
  • MulticastSocket is a subclass of DatagramSocket used when dealing with multicast groups.

Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the Socket.getInputStream() and Socket.getOutputStream() methods.

Interfaces

The NetworkInterface class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.

Note, all conforming implementations must support at least one NetworkInterface object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.

High level API

A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:

  • URI is the class representing a Universal Resource Identifier, as specified in RFC 2396. As the name indicates, this is just an Identifier and doesn't provide directly the means to access the resource.
  • URL is the class representing a Universal Resource Locator, which is both an older concept for URIs and a means to access the resources.
  • URLConnection is created from a URL and is the communication link used to access the resource pointed by the URL. This abstract class will delegate most of the work to the underlying protocol handlers like http or https.
  • HttpURLConnection is a subclass of URLConnection and provides some additional functionalities specific to the HTTP protocol.

The recommended usage is to use URI to identify resources, then convert it into a URL when it is time to access the resource. From that URL, you can either get the URLConnection for fine control, or get directly the InputStream.

Here is an example:

 URI uri = new URI("http://java.sun.com/");
 URL url = uri.toURL();
 InputStream in = url.openStream();

Protocol Handlers

As mentioned, URL and URLConnection rely on protocol handlers which must be present, otherwise an Exception is thrown. This is the major difference with URIs which only identify resources, and therefore don't need to have access to the protocol handler. So, while it is possible to create an URI with any kind of protocol scheme (e.g. myproto://myhost.mydomain/resource/), a similar URL will try to instantiate the handler for the specified protocol; if it doesn't exist an exception will be thrown.

By default the protocol handlers are loaded dynamically from the default location. It is, however, possible to add to the search path by setting the java.protocol.handler.pkgs system property. For instance if it is set to myapp.protocols, then the URL code will try, in the case of http, first to load myapp.protocols.http.Handler, then, if this fails, http.Handler from the default location.

Note that the Handler class has to be a subclass of the abstract class URLStreamHandler.

Additional Specification

  • Networking System Properties
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.net

Interfaces

  • ContentHandlerFactory
  • CookiePolicy
  • CookieStore
  • DatagramSocketImplFactory
  • FileNameMap
  • ProtocolFamily
  • SocketImplFactory
  • SocketOption
  • SocketOptions
  • URLStreamHandlerFactory

Classes

  • Authenticator
  • CacheRequest
  • CacheResponse
  • ContentHandler
  • CookieHandler
  • CookieManager
  • DatagramPacket
  • DatagramSocket
  • DatagramSocketImpl
  • HttpCookie
  • HttpURLConnection
  • IDN
  • Inet4Address
  • Inet6Address
  • InetAddress
  • InetSocketAddress
  • InterfaceAddress
  • JarURLConnection
  • MulticastSocket
  • NetPermission
  • NetworkInterface
  • PasswordAuthentication
  • Proxy
  • ProxySelector
  • ResponseCache
  • SecureCacheResponse
  • ServerSocket
  • Socket
  • SocketAddress
  • SocketImpl
  • SocketPermission
  • StandardSocketOptions
  • URI
  • URL
  • URLClassLoader
  • URLConnection
  • URLDecoder
  • URLEncoder
  • URLPermission
  • URLStreamHandler

Enums

  • Authenticator.RequestorType
  • Proxy.Type
  • StandardProtocolFamily

Exceptions

  • BindException
  • ConnectException
  • HttpRetryException
  • MalformedURLException
  • NoRouteToHostException
  • PortUnreachableException
  • ProtocolException
  • SocketException
  • SocketTimeoutException
  • UnknownHostException
  • UnknownServiceException
  • URISyntaxException


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.net

Provides the classes for implementing networking applications.

See: Description

  • Interface Summary
    Interface Description
    ContentHandlerFactory
    This interface defines a factory for content handlers.
    CookiePolicy
    CookiePolicy implementations decide which cookies should be accepted and which should be rejected.
    CookieStore
    A CookieStore object represents a storage for cookie.
    DatagramSocketImplFactory
    This interface defines a factory for datagram socket implementations.
    FileNameMap
    A simple interface which provides a mechanism to map between a file name and a MIME type string.
    ProtocolFamily
    Represents a family of communication protocols.
    SocketImplFactory
    This interface defines a factory for socket implementations.
    SocketOption<T>
    A socket option associated with a socket.
    SocketOptions
    Interface of methods to get/set socket options.
    URLStreamHandlerFactory
    This interface defines a factory for URL stream protocol handlers.
  • Class Summary
    Class Description
    Authenticator
    The class Authenticator represents an object that knows how to obtain authentication for a network connection.
    CacheRequest
    Represents channels for storing resources in the ResponseCache.
    CacheResponse
    Represent channels for retrieving resources from the ResponseCache.
    ContentHandler
    The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
    CookieHandler
    A CookieHandler object provides a callback mechanism to hook up a HTTP state management policy implementation into the HTTP protocol handler.
    CookieManager
    CookieManager provides a concrete implementation of CookieHandler, which separates the storage of cookies from the policy surrounding accepting and rejecting cookies.
    DatagramPacket
    This class represents a datagram packet.
    DatagramSocket
    This class represents a socket for sending and receiving datagram packets.
    DatagramSocketImpl
    Abstract datagram and multicast socket implementation base class.
    HttpCookie
    An HttpCookie object represents an HTTP cookie, which carries state information between server and user agent.
    HttpURLConnection
    A URLConnection with support for HTTP-specific features.
    IDN
    Provides methods to convert internationalized domain names (IDNs) between a normal Unicode representation and an ASCII Compatible Encoding (ACE) representation.
    Inet4Address
    This class represents an Internet Protocol version 4 (IPv4) address.
    Inet6Address
    This class represents an Internet Protocol version 6 (IPv6) address.
    InetAddress
    This class represents an Internet Protocol (IP) address.
    InetSocketAddress
    This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname.
    InterfaceAddress
    This class represents a Network Interface address.
    JarURLConnection
    A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
    MulticastSocket
    The multicast datagram socket class is useful for sending and receiving IP multicast packets.
    NetPermission
    This class is for various network permissions.
    NetworkInterface
    This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.
    PasswordAuthentication
    The class PasswordAuthentication is a data holder that is used by Authenticator.
    Proxy
    This class represents a proxy setting, typically a type (http, socks) and a socket address.
    ProxySelector
    Selects the proxy server to use, if any, when connecting to the network resource referenced by a URL.
    ResponseCache
    Represents implementations of URLConnection caches.
    SecureCacheResponse
    Represents a cache response originally retrieved through secure means, such as TLS.
    ServerSocket
    This class implements server sockets.
    Socket
    This class implements client sockets (also called just "sockets").
    SocketAddress
    This class represents a Socket Address with no protocol attachment.
    SocketImpl
    The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
    SocketPermission
    This class represents access to a network via sockets.
    StandardSocketOptions
    Defines the standard socket options.
    URI
    Represents a Uniform Resource Identifier (URI) reference.
    URL
    Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
    URLClassLoader
    This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
    URLConnection
    The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
    URLDecoder
    Utility class for HTML form decoding.
    URLEncoder
    Utility class for HTML form encoding.
    URLPermission
    Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-settable request methods and request headers.
    URLStreamHandler
    The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
  • Enum Summary
    Enum Description
    Authenticator.RequestorType
    The type of the entity requesting authentication.
    Proxy.Type
    Represents the proxy type.
    StandardProtocolFamily
    Defines the standard families of communication protocols.
  • Exception Summary
    Exception Description
    BindException
    Signals that an error occurred while attempting to bind a socket to a local address and port.
    ConnectException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    HttpRetryException
    Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled.
    MalformedURLException
    Thrown to indicate that a malformed URL has occurred.
    NoRouteToHostException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    PortUnreachableException
    Signals that an ICMP Port Unreachable message has been received on a connected datagram.
    ProtocolException
    Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
    SocketException
    Thrown to indicate that there is an error creating or accessing a Socket.
    SocketTimeoutException
    Signals that a timeout has occurred on a socket read or accept.
    UnknownHostException
    Thrown to indicate that the IP address of a host could not be determined.
    UnknownServiceException
    Thrown to indicate that an unknown service exception has occurred.
    URISyntaxException
    Checked exception thrown to indicate that a string could not be parsed as a URI reference.

Package java.net Description

Provides the classes for implementing networking applications.

The java.net package can be roughly divided in two sections:

  • A Low Level API, which deals with the following abstractions:

    • Addresses, which are networking identifiers, like IP addresses.

    • Sockets, which are basic bidirectional data communication mechanisms.

    • Interfaces, which describe network interfaces.

  • A High Level API, which deals with the following abstractions:

    • URIs, which represent Universal Resource Identifiers.

    • URLs, which represent Universal Resource Locators.

    • Connections, which represents connections to the resource pointed to by URLs.

Addresses

Addresses are used throughout the java.net APIs as either host identifiers, or socket endpoint identifiers.

The InetAddress class is the abstraction representing an IP (Internet Protocol) address. It has two subclasses:

  • Inet4Address for IPv4 addresses.
  • Inet6Address for IPv6 addresses.

But, in most cases, there is no need to deal directly with the subclasses, as the InetAddress abstraction should cover most of the needed functionality.

About IPv6

Not all systems have support for the IPv6 protocol, and while the Java networking stack will attempt to detect it and use it transparently when available, it is also possible to disable its use with a system property. In the case where IPv6 is not available, or explicitly disabled, Inet6Address are not valid arguments for most networking operations any more. While methods like InetAddress.getByName(java.lang.String) are guaranteed not to return an Inet6Address when looking up host names, it is possible, by passing literals, to create such an object. In which case, most methods, when called with an Inet6Address will throw an Exception.

Sockets

Sockets are means to establish a communication link between machines over the network. The java.net package provides 4 kinds of Sockets:

  • Socket is a TCP client API, and will typically be used to connect to a remote host.
  • ServerSocket is a TCP server API, and will typically accept connections from client sockets.
  • DatagramSocket is a UDP endpoint API and is used to send and receive datagram packets.
  • MulticastSocket is a subclass of DatagramSocket used when dealing with multicast groups.

Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the Socket.getInputStream() and Socket.getOutputStream() methods.

Interfaces

The NetworkInterface class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.

Note, all conforming implementations must support at least one NetworkInterface object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.

High level API

A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:

  • URI is the class representing a Universal Resource Identifier, as specified in RFC 2396. As the name indicates, this is just an Identifier and doesn't provide directly the means to access the resource.
  • URL is the class representing a Universal Resource Locator, which is both an older concept for URIs and a means to access the resources.
  • URLConnection is created from a URL and is the communication link used to access the resource pointed by the URL. This abstract class will delegate most of the work to the underlying protocol handlers like http or https.
  • HttpURLConnection is a subclass of URLConnection and provides some additional functionalities specific to the HTTP protocol.

The recommended usage is to use URI to identify resources, then convert it into a URL when it is time to access the resource. From that URL, you can either get the URLConnection for fine control, or get directly the InputStream.

Here is an example:

 URI uri = new URI("http://java.sun.com/");
 URL url = uri.toURL();
 InputStream in = url.openStream();

Protocol Handlers

As mentioned, URL and URLConnection rely on protocol handlers which must be present, otherwise an Exception is thrown. This is the major difference with URIs which only identify resources, and therefore don't need to have access to the protocol handler. So, while it is possible to create an URI with any kind of protocol scheme (e.g. myproto://myhost.mydomain/resource/), a similar URL will try to instantiate the handler for the specified protocol; if it doesn't exist an exception will be thrown.

By default the protocol handlers are loaded dynamically from the default location. It is, however, possible to add to the search path by setting the java.protocol.handler.pkgs system property. For instance if it is set to myapp.protocols, then the URL code will try, in the case of http, first to load myapp.protocols.http.Handler, then, if this fails, http.Handler from the default location.

Note that the Handler class has to be a subclass of the abstract class URLStreamHandler.

Additional Specification

  • Networking System Properties
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.net

Interfaces

  • ContentHandlerFactory
  • CookiePolicy
  • CookieStore
  • DatagramSocketImplFactory
  • FileNameMap
  • ProtocolFamily
  • SocketImplFactory
  • SocketOption
  • SocketOptions
  • URLStreamHandlerFactory

Classes

  • Authenticator
  • CacheRequest
  • CacheResponse
  • ContentHandler
  • CookieHandler
  • CookieManager
  • DatagramPacket
  • DatagramSocket
  • DatagramSocketImpl
  • HttpCookie
  • HttpURLConnection
  • IDN
  • Inet4Address
  • Inet6Address
  • InetAddress
  • InetSocketAddress
  • InterfaceAddress
  • JarURLConnection
  • MulticastSocket
  • NetPermission
  • NetworkInterface
  • PasswordAuthentication
  • Proxy
  • ProxySelector
  • ResponseCache
  • SecureCacheResponse
  • ServerSocket
  • Socket
  • SocketAddress
  • SocketImpl
  • SocketPermission
  • StandardSocketOptions
  • URI
  • URL
  • URLClassLoader
  • URLConnection
  • URLDecoder
  • URLEncoder
  • URLPermission
  • URLStreamHandler

Enums

  • Authenticator.RequestorType
  • Proxy.Type
  • StandardProtocolFamily

Exceptions

  • BindException
  • ConnectException
  • HttpRetryException
  • MalformedURLException
  • NoRouteToHostException
  • PortUnreachableException
  • ProtocolException
  • SocketException
  • SocketTimeoutException
  • UnknownHostException
  • UnknownServiceException
  • URISyntaxException


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.net

Provides the classes for implementing networking applications.

See: Description

  • Interface Summary
    Interface Description
    ContentHandlerFactory
    This interface defines a factory for content handlers.
    CookiePolicy
    CookiePolicy implementations decide which cookies should be accepted and which should be rejected.
    CookieStore
    A CookieStore object represents a storage for cookie.
    DatagramSocketImplFactory
    This interface defines a factory for datagram socket implementations.
    FileNameMap
    A simple interface which provides a mechanism to map between a file name and a MIME type string.
    ProtocolFamily
    Represents a family of communication protocols.
    SocketImplFactory
    This interface defines a factory for socket implementations.
    SocketOption<T>
    A socket option associated with a socket.
    SocketOptions
    Interface of methods to get/set socket options.
    URLStreamHandlerFactory
    This interface defines a factory for URL stream protocol handlers.
  • Class Summary
    Class Description
    Authenticator
    The class Authenticator represents an object that knows how to obtain authentication for a network connection.
    CacheRequest
    Represents channels for storing resources in the ResponseCache.
    CacheResponse
    Represent channels for retrieving resources from the ResponseCache.
    ContentHandler
    The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
    CookieHandler
    A CookieHandler object provides a callback mechanism to hook up a HTTP state management policy implementation into the HTTP protocol handler.
    CookieManager
    CookieManager provides a concrete implementation of CookieHandler, which separates the storage of cookies from the policy surrounding accepting and rejecting cookies.
    DatagramPacket
    This class represents a datagram packet.
    DatagramSocket
    This class represents a socket for sending and receiving datagram packets.
    DatagramSocketImpl
    Abstract datagram and multicast socket implementation base class.
    HttpCookie
    An HttpCookie object represents an HTTP cookie, which carries state information between server and user agent.
    HttpURLConnection
    A URLConnection with support for HTTP-specific features.
    IDN
    Provides methods to convert internationalized domain names (IDNs) between a normal Unicode representation and an ASCII Compatible Encoding (ACE) representation.
    Inet4Address
    This class represents an Internet Protocol version 4 (IPv4) address.
    Inet6Address
    This class represents an Internet Protocol version 6 (IPv6) address.
    InetAddress
    This class represents an Internet Protocol (IP) address.
    InetSocketAddress
    This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname.
    InterfaceAddress
    This class represents a Network Interface address.
    JarURLConnection
    A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
    MulticastSocket
    The multicast datagram socket class is useful for sending and receiving IP multicast packets.
    NetPermission
    This class is for various network permissions.
    NetworkInterface
    This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.
    PasswordAuthentication
    The class PasswordAuthentication is a data holder that is used by Authenticator.
    Proxy
    This class represents a proxy setting, typically a type (http, socks) and a socket address.
    ProxySelector
    Selects the proxy server to use, if any, when connecting to the network resource referenced by a URL.
    ResponseCache
    Represents implementations of URLConnection caches.
    SecureCacheResponse
    Represents a cache response originally retrieved through secure means, such as TLS.
    ServerSocket
    This class implements server sockets.
    Socket
    This class implements client sockets (also called just "sockets").
    SocketAddress
    This class represents a Socket Address with no protocol attachment.
    SocketImpl
    The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
    SocketPermission
    This class represents access to a network via sockets.
    StandardSocketOptions
    Defines the standard socket options.
    URI
    Represents a Uniform Resource Identifier (URI) reference.
    URL
    Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
    URLClassLoader
    This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
    URLConnection
    The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
    URLDecoder
    Utility class for HTML form decoding.
    URLEncoder
    Utility class for HTML form encoding.
    URLPermission
    Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-settable request methods and request headers.
    URLStreamHandler
    The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
  • Enum Summary
    Enum Description
    Authenticator.RequestorType
    The type of the entity requesting authentication.
    Proxy.Type
    Represents the proxy type.
    StandardProtocolFamily
    Defines the standard families of communication protocols.
  • Exception Summary
    Exception Description
    BindException
    Signals that an error occurred while attempting to bind a socket to a local address and port.
    ConnectException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    HttpRetryException
    Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled.
    MalformedURLException
    Thrown to indicate that a malformed URL has occurred.
    NoRouteToHostException
    Signals that an error occurred while attempting to connect a socket to a remote address and port.
    PortUnreachableException
    Signals that an ICMP Port Unreachable message has been received on a connected datagram.
    ProtocolException
    Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
    SocketException
    Thrown to indicate that there is an error creating or accessing a Socket.
    SocketTimeoutException
    Signals that a timeout has occurred on a socket read or accept.
    UnknownHostException
    Thrown to indicate that the IP address of a host could not be determined.
    UnknownServiceException
    Thrown to indicate that an unknown service exception has occurred.
    URISyntaxException
    Checked exception thrown to indicate that a string could not be parsed as a URI reference.

Package java.net Description

Provides the classes for implementing networking applications.

The java.net package can be roughly divided in two sections:

  • A Low Level API, which deals with the following abstractions:

    • Addresses, which are networking identifiers, like IP addresses.

    • Sockets, which are basic bidirectional data communication mechanisms.

    • Interfaces, which describe network interfaces.

  • A High Level API, which deals with the following abstractions:

    • URIs, which represent Universal Resource Identifiers.

    • URLs, which represent Universal Resource Locators.

    • Connections, which represents connections to the resource pointed to by URLs.

Addresses

Addresses are used throughout the java.net APIs as either host identifiers, or socket endpoint identifiers.

The InetAddress class is the abstraction representing an IP (Internet Protocol) address. It has two subclasses:

  • Inet4Address for IPv4 addresses.
  • Inet6Address for IPv6 addresses.

But, in most cases, there is no need to deal directly with the subclasses, as the InetAddress abstraction should cover most of the needed functionality.

About IPv6

Not all systems have support for the IPv6 protocol, and while the Java networking stack will attempt to detect it and use it transparently when available, it is also possible to disable its use with a system property. In the case where IPv6 is not available, or explicitly disabled, Inet6Address are not valid arguments for most networking operations any more. While methods like InetAddress.getByName(java.lang.String) are guaranteed not to return an Inet6Address when looking up host names, it is possible, by passing literals, to create such an object. In which case, most methods, when called with an Inet6Address will throw an Exception.

Sockets

Sockets are means to establish a communication link between machines over the network. The java.net package provides 4 kinds of Sockets:

  • Socket is a TCP client API, and will typically be used to connect to a remote host.
  • ServerSocket is a TCP server API, and will typically accept connections from client sockets.
  • DatagramSocket is a UDP endpoint API and is used to send and receive datagram packets.
  • MulticastSocket is a subclass of DatagramSocket used when dealing with multicast groups.

Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the Socket.getInputStream() and Socket.getOutputStream() methods.

Interfaces

The NetworkInterface class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.

Note, all conforming implementations must support at least one NetworkInterface object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.

High level API

A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:

  • URI is the class representing a Universal Resource Identifier, as specified in RFC 2396. As the name indicates, this is just an Identifier and doesn't provide directly the means to access the resource.
  • URL is the class representing a Universal Resource Locator, which is both an older concept for URIs and a means to access the resources.
  • URLConnection is created from a URL and is the communication link used to access the resource pointed by the URL. This abstract class will delegate most of the work to the underlying protocol handlers like http or https.
  • HttpURLConnection is a subclass of URLConnection and provides some additional functionalities specific to the HTTP protocol.

The recommended usage is to use URI to identify resources, then convert it into a URL when it is time to access the resource. From that URL, you can either get the URLConnection for fine control, or get directly the InputStream.

Here is an example:

 URI uri = new URI("http://java.sun.com/");
 URL url = uri.toURL();
 InputStream in = url.openStream();

Protocol Handlers

As mentioned, URL and URLConnection rely on protocol handlers which must be present, otherwise an Exception is thrown. This is the major difference with URIs which only identify resources, and therefore don't need to have access to the protocol handler. So, while it is possible to create an URI with any kind of protocol scheme (e.g. myproto://myhost.mydomain/resource/), a similar URL will try to instantiate the handler for the specified protocol; if it doesn't exist an exception will be thrown.

By default the protocol handlers are loaded dynamically from the default location. It is, however, possible to add to the search path by setting the java.protocol.handler.pkgs system property. For instance if it is set to myapp.protocols, then the URL code will try, in the case of http, first to load myapp.protocols.http.Handler, then, if this fails, http.Handler from the default location.

Note that the Handler class has to be a subclass of the abstract class URLStreamHandler.

Additional Specification

  • Networking System Properties
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.net

Interfaces

  • ContentHandlerFactory
  • CookiePolicy
  • CookieStore
  • DatagramSocketImplFactory
  • FileNameMap
  • ProtocolFamily
  • SocketImplFactory
  • SocketOption
  • SocketOptions
  • URLStreamHandlerFactory

Classes

  • Authenticator
  • CacheRequest
  • CacheResponse
  • ContentHandler
  • CookieHandler
  • CookieManager
  • DatagramPacket
  • DatagramSocket
  • DatagramSocketImpl
  • HttpCookie
  • HttpURLConnection
  • IDN
  • Inet4Address
  • Inet6Address
  • InetAddress
  • InetSocketAddress
  • InterfaceAddress
  • JarURLConnection
  • MulticastSocket
  • NetPermission
  • NetworkInterface
  • PasswordAuthentication
  • Proxy
  • ProxySelector
  • ResponseCache
  • SecureCacheResponse
  • ServerSocket
  • Socket
  • SocketAddress
  • SocketImpl
  • SocketPermission
  • StandardSocketOptions
  • URI
  • URL
  • URLClassLoader
  • URLConnection
  • URLDecoder
  • URLEncoder
  • URLPermission
  • URLStreamHandler

Enums

  • Authenticator.RequestorType
  • Proxy.Type
  • StandardProtocolFamily

Exceptions

  • BindException
  • ConnectException
  • HttpRetryException
  • MalformedURLException
  • NoRouteToHostException
  • PortUnreachableException
  • ProtocolException
  • SocketException
  • SocketTimeoutException
  • UnknownHostException
  • UnknownServiceException
  • URISyntaxException


compact1 - java.nio

Classes

  • Buffer
  • ByteBuffer
  • ByteOrder
  • CharBuffer
  • DoubleBuffer
  • FloatBuffer
  • IntBuffer
  • LongBuffer
  • MappedByteBuffer
  • ShortBuffer

Exceptions

  • BufferOverflowException
  • BufferUnderflowException
  • InvalidMarkException
  • ReadOnlyBufferException


nio

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

See: Description

  • Class Summary
    Class Description
    Buffer
    A container for data of a specific primitive type.
    ByteBuffer
    A byte buffer.
    ByteOrder
    A typesafe enumeration for byte orders.
    CharBuffer
    A char buffer.
    DoubleBuffer
    A double buffer.
    FloatBuffer
    A float buffer.
    IntBuffer
    An int buffer.
    LongBuffer
    A long buffer.
    MappedByteBuffer
    A direct byte buffer whose content is a memory-mapped region of a file.
    ShortBuffer
    A short buffer.
  • Exception Summary
    Exception Description
    BufferOverflowException
    Unchecked exception thrown when a relative put operation reaches the target buffer's limit.
    BufferUnderflowException
    Unchecked exception thrown when a relative get operation reaches the source buffer's limit.
    InvalidMarkException
    Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined.
    ReadOnlyBufferException
    Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer.

Package java.nio Description

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

The central abstractions of the NIO APIs are:

  • Buffers, which are containers for data;

  • Charsets and their associated decoders and encoders,
    which translate between bytes and Unicode characters;

  • Channels of various types, which represent connections
    to entities capable of performing I/O operations; and

  • Selectors and selection keys, which together with
    selectable channels define a multiplexed, non-blocking
    I/O     facility.

The java.nio package defines the buffer classes, which are used throughout the NIO APIs. The charset API is defined in the java.nio.charset package, and the channel and selector APIs are defined in the java.nio.channels package. Each of these subpackages has its own service-provider (SPI) subpackage, the contents of which can be used to extend the platform's default implementations or to construct alternative implementations.

Buffers

Description

Buffer Position, limit, and capacity;
clear, flip, rewind, and mark/reset
  ByteBuffer | Get/put, compact, views; allocate, wrap
    MappedByteBuffer   | A byte buffer mapped to a file
  CharBuffer | Get/put, compact; allocate, wrap
  DoubleBuffer ' '
  FloatBuffer ' '
  IntBuffer ' '
  LongBuffer ' '
  ShortBuffer ' '
ByteOrder | Typesafe enumeration for byte orders

A buffer is a container for a fixed amount of data of a specific primitive type. In addition to its content a buffer has a position, which is the index of the next element to be read or written, and a limit, which is the index of the first element that should not be read or written. The base Buffer class defines these properties as well as methods for clearing, flipping, and rewinding, for marking the current position, and for resetting the position to the previous mark.

There is a buffer class for each non-boolean primitive type. Each class defines a family of get and put methods for moving data out of and in to a buffer, methods for compacting, duplicating, and slicing a buffer, and static methods for allocating a new buffer as well as for wrapping an existing array into a buffer.

Byte buffers are distinguished in that they can be used as the sources and targets of I/O operations. They also support several features not found in the other buffer classes:

  • A byte buffer can be allocated as a direct buffer, in which case the Java virtual machine will make a best effort to perform native I/O operations directly upon it.

  • A byte buffer can be created by mapping a region of a file directly into memory, in which case a few additional file-related operations defined in the MappedByteBuffer class are available.

  • A byte buffer provides access to its content as either a heterogeneous or homogeneous sequence of binary data of any non-boolean primitive type, in either big-endian or little-endian byte order.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio

Classes

  • Buffer
  • ByteBuffer
  • ByteOrder
  • CharBuffer
  • DoubleBuffer
  • FloatBuffer
  • IntBuffer
  • LongBuffer
  • MappedByteBuffer
  • ShortBuffer

Exceptions

  • BufferOverflowException
  • BufferUnderflowException
  • InvalidMarkException
  • ReadOnlyBufferException


nio

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

See: Description

  • Class Summary
    Class Description
    Buffer
    A container for data of a specific primitive type.
    ByteBuffer
    A byte buffer.
    ByteOrder
    A typesafe enumeration for byte orders.
    CharBuffer
    A char buffer.
    DoubleBuffer
    A double buffer.
    FloatBuffer
    A float buffer.
    IntBuffer
    An int buffer.
    LongBuffer
    A long buffer.
    MappedByteBuffer
    A direct byte buffer whose content is a memory-mapped region of a file.
    ShortBuffer
    A short buffer.
  • Exception Summary
    Exception Description
    BufferOverflowException
    Unchecked exception thrown when a relative put operation reaches the target buffer's limit.
    BufferUnderflowException
    Unchecked exception thrown when a relative get operation reaches the source buffer's limit.
    InvalidMarkException
    Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined.
    ReadOnlyBufferException
    Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer.

Package java.nio Description

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

The central abstractions of the NIO APIs are:

  • Buffers, which are containers for data;

  • Charsets and their associated decoders and encoders,
    which translate between bytes and Unicode characters;

  • Channels of various types, which represent connections
    to entities capable of performing I/O operations; and

  • Selectors and selection keys, which together with
    selectable channels define a multiplexed, non-blocking
    I/O     facility.

The java.nio package defines the buffer classes, which are used throughout the NIO APIs. The charset API is defined in the java.nio.charset package, and the channel and selector APIs are defined in the java.nio.channels package. Each of these subpackages has its own service-provider (SPI) subpackage, the contents of which can be used to extend the platform's default implementations or to construct alternative implementations.

Buffers

Description

Buffer Position, limit, and capacity;
clear, flip, rewind, and mark/reset
  ByteBuffer | Get/put, compact, views; allocate, wrap
    MappedByteBuffer   | A byte buffer mapped to a file
  CharBuffer | Get/put, compact; allocate, wrap
  DoubleBuffer ' '
  FloatBuffer ' '
  IntBuffer ' '
  LongBuffer ' '
  ShortBuffer ' '
ByteOrder | Typesafe enumeration for byte orders

A buffer is a container for a fixed amount of data of a specific primitive type. In addition to its content a buffer has a position, which is the index of the next element to be read or written, and a limit, which is the index of the first element that should not be read or written. The base Buffer class defines these properties as well as methods for clearing, flipping, and rewinding, for marking the current position, and for resetting the position to the previous mark.

There is a buffer class for each non-boolean primitive type. Each class defines a family of get and put methods for moving data out of and in to a buffer, methods for compacting, duplicating, and slicing a buffer, and static methods for allocating a new buffer as well as for wrapping an existing array into a buffer.

Byte buffers are distinguished in that they can be used as the sources and targets of I/O operations. They also support several features not found in the other buffer classes:

  • A byte buffer can be allocated as a direct buffer, in which case the Java virtual machine will make a best effort to perform native I/O operations directly upon it.

  • A byte buffer can be created by mapping a region of a file directly into memory, in which case a few additional file-related operations defined in the MappedByteBuffer class are available.

  • A byte buffer provides access to its content as either a heterogeneous or homogeneous sequence of binary data of any non-boolean primitive type, in either big-endian or little-endian byte order.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio

Classes

  • Buffer
  • ByteBuffer
  • ByteOrder
  • CharBuffer
  • DoubleBuffer
  • FloatBuffer
  • IntBuffer
  • LongBuffer
  • MappedByteBuffer
  • ShortBuffer

Exceptions

  • BufferOverflowException
  • BufferUnderflowException
  • InvalidMarkException
  • ReadOnlyBufferException


nio

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

See: Description

  • Class Summary
    Class Description
    Buffer
    A container for data of a specific primitive type.
    ByteBuffer
    A byte buffer.
    ByteOrder
    A typesafe enumeration for byte orders.
    CharBuffer
    A char buffer.
    DoubleBuffer
    A double buffer.
    FloatBuffer
    A float buffer.
    IntBuffer
    An int buffer.
    LongBuffer
    A long buffer.
    MappedByteBuffer
    A direct byte buffer whose content is a memory-mapped region of a file.
    ShortBuffer
    A short buffer.
  • Exception Summary
    Exception Description
    BufferOverflowException
    Unchecked exception thrown when a relative put operation reaches the target buffer's limit.
    BufferUnderflowException
    Unchecked exception thrown when a relative get operation reaches the source buffer's limit.
    InvalidMarkException
    Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined.
    ReadOnlyBufferException
    Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer.

Package java.nio Description

Defines buffers, which are containers for data, and provides an overview of the other NIO packages.

The central abstractions of the NIO APIs are:

  • Buffers, which are containers for data;

  • Charsets and their associated decoders and encoders,
    which translate between bytes and Unicode characters;

  • Channels of various types, which represent connections
    to entities capable of performing I/O operations; and

  • Selectors and selection keys, which together with
    selectable channels define a multiplexed, non-blocking
    I/O     facility.

The java.nio package defines the buffer classes, which are used throughout the NIO APIs. The charset API is defined in the java.nio.charset package, and the channel and selector APIs are defined in the java.nio.channels package. Each of these subpackages has its own service-provider (SPI) subpackage, the contents of which can be used to extend the platform's default implementations or to construct alternative implementations.

Buffers

Description

Buffer Position, limit, and capacity;
clear, flip, rewind, and mark/reset
  ByteBuffer | Get/put, compact, views; allocate, wrap
    MappedByteBuffer   | A byte buffer mapped to a file
  CharBuffer | Get/put, compact; allocate, wrap
  DoubleBuffer ' '
  FloatBuffer ' '
  IntBuffer ' '
  LongBuffer ' '
  ShortBuffer ' '
ByteOrder | Typesafe enumeration for byte orders

A buffer is a container for a fixed amount of data of a specific primitive type. In addition to its content a buffer has a position, which is the index of the next element to be read or written, and a limit, which is the index of the first element that should not be read or written. The base Buffer class defines these properties as well as methods for clearing, flipping, and rewinding, for marking the current position, and for resetting the position to the previous mark.

There is a buffer class for each non-boolean primitive type. Each class defines a family of get and put methods for moving data out of and in to a buffer, methods for compacting, duplicating, and slicing a buffer, and static methods for allocating a new buffer as well as for wrapping an existing array into a buffer.

Byte buffers are distinguished in that they can be used as the sources and targets of I/O operations. They also support several features not found in the other buffer classes:

  • A byte buffer can be allocated as a direct buffer, in which case the Java virtual machine will make a best effort to perform native I/O operations directly upon it.

  • A byte buffer can be created by mapping a region of a file directly into memory, in which case a few additional file-related operations defined in the MappedByteBuffer class are available.

  • A byte buffer provides access to its content as either a heterogeneous or homogeneous sequence of binary data of any non-boolean primitive type, in either big-endian or little-endian byte order.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio

Classes

  • Buffer
  • ByteBuffer
  • ByteOrder
  • CharBuffer
  • DoubleBuffer
  • FloatBuffer
  • IntBuffer
  • LongBuffer
  • MappedByteBuffer
  • ShortBuffer

Exceptions

  • BufferOverflowException
  • BufferUnderflowException
  • InvalidMarkException
  • ReadOnlyBufferException


compact1 - java.nio.channels

Interfaces

  • AsynchronousByteChannel
  • AsynchronousChannel
  • ByteChannel
  • Channel
  • CompletionHandler
  • GatheringByteChannel
  • InterruptibleChannel
  • MulticastChannel
  • NetworkChannel
  • ReadableByteChannel
  • ScatteringByteChannel
  • SeekableByteChannel
  • WritableByteChannel

Classes

  • AsynchronousChannelGroup
  • AsynchronousFileChannel
  • AsynchronousServerSocketChannel
  • AsynchronousSocketChannel
  • Channels
  • DatagramChannel
  • FileChannel
  • FileChannel.MapMode
  • FileLock
  • MembershipKey
  • Pipe
  • Pipe.SinkChannel
  • Pipe.SourceChannel
  • SelectableChannel
  • SelectionKey
  • Selector
  • ServerSocketChannel
  • SocketChannel

Exceptions

  • AcceptPendingException
  • AlreadyBoundException
  • AlreadyConnectedException
  • AsynchronousCloseException
  • CancelledKeyException
  • ClosedByInterruptException
  • ClosedChannelException
  • ClosedSelectorException
  • ConnectionPendingException
  • FileLockInterruptionException
  • IllegalBlockingModeException
  • IllegalChannelGroupException
  • IllegalSelectorException
  • InterruptedByTimeoutException
  • NoConnectionPendingException
  • NonReadableChannelException
  • NonWritableChannelException
  • NotYetBoundException
  • NotYetConnectedException
  • OverlappingFileLockException
  • ReadPendingException
  • ShutdownChannelGroupException
  • UnresolvedAddressException
  • UnsupportedAddressTypeException
  • WritePendingException


channels

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.channels

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.

See: Description

  • Interface Summary
    Interface Description
    AsynchronousByteChannel
    An asynchronous channel that can read and write bytes.
    AsynchronousChannel
    A channel that supports asynchronous I/O operations.
    ByteChannel
    A channel that can read and write bytes.
    Channel
    A nexus for I/O operations.
    CompletionHandler<V,A>
    A handler for consuming the result of an asynchronous I/O operation.
    GatheringByteChannel
    A channel that can write bytes from a sequence of buffers.
    InterruptibleChannel
    A channel that can be asynchronously closed and interrupted.
    MulticastChannel
    A network channel that supports Internet Protocol (IP) multicasting.
    NetworkChannel
    A channel to a network socket.
    ReadableByteChannel
    A channel that can read bytes.
    ScatteringByteChannel
    A channel that can read bytes into a sequence of buffers.
    SeekableByteChannel
    A byte channel that maintains a current position and allows the position to be changed.
    WritableByteChannel
    A channel that can write bytes.
  • Class Summary
    Class Description
    AsynchronousChannelGroup
    A grouping of asynchronous channels for the purpose of resource sharing.
    AsynchronousFileChannel
    An asynchronous channel for reading, writing, and manipulating a file.
    AsynchronousServerSocketChannel
    An asynchronous channel for stream-oriented listening sockets.
    AsynchronousSocketChannel
    An asynchronous channel for stream-oriented connecting sockets.
    Channels
    Utility methods for channels and streams.
    DatagramChannel
    A selectable channel for datagram-oriented sockets.
    FileChannel
    A channel for reading, writing, mapping, and manipulating a file.
    FileChannel.MapMode
    A typesafe enumeration for file-mapping modes.
    FileLock
    A token representing a lock on a region of a file.
    MembershipKey
    A token representing the membership of an Internet Protocol (IP) multicast group.
    Pipe
    A pair of channels that implements a unidirectional pipe.
    Pipe.SinkChannel
    A channel representing the writable end of a Pipe.
    Pipe.SourceChannel
    A channel representing the readable end of a Pipe.
    SelectableChannel
    A channel that can be multiplexed via a Selector.
    SelectionKey
    A token representing the registration of a SelectableChannel with a Selector.
    Selector
    A multiplexor of SelectableChannel objects.
    ServerSocketChannel
    A selectable channel for stream-oriented listening sockets.
    SocketChannel
    A selectable channel for stream-oriented connecting sockets.
  • Exception Summary
    Exception Description
    AcceptPendingException
    Unchecked exception thrown when an attempt is made to initiate an accept operation on a channel and a previous accept operation has not completed.
    AlreadyBoundException
    Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound.
    AlreadyConnectedException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel that is already connected.
    AsynchronousCloseException
    Checked exception received by a thread when another thread closes the channel or the part of the channel upon which it is blocked in an I/O operation.
    CancelledKeyException
    Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid.
    ClosedByInterruptException
    Checked exception received by a thread when another thread interrupts it while it is blocked in an I/O operation upon a channel.
    ClosedChannelException
    Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon channel that is closed, or at least closed to that operation.
    ClosedSelectorException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector.
    ConnectionPendingException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel for which a non-blocking connection operation is already in progress.
    FileLockInterruptionException
    Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
    IllegalBlockingModeException
    Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode.
    IllegalChannelGroupException
    Unchecked exception thrown when an attempt is made to open a channel in a group that was not created by the same provider.
    IllegalSelectorException
    Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel.
    InterruptedByTimeoutException
    Checked exception received by a thread when a timeout elapses before an asynchronous operation completes.
    NoConnectionPendingException
    Unchecked exception thrown when the finishConnect method of a SocketChannel is invoked without first successfully invoking its connect method.
    NonReadableChannelException
    Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading.
    NonWritableChannelException
    Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing.
    NotYetBoundException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound.
    NotYetConnectedException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected.
    OverlappingFileLockException
    Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file.
    ReadPendingException
    Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed.
    ShutdownChannelGroupException
    Unchecked exception thrown when an attempt is made to construct a channel in a group that is shutdown or the completion handler for an I/O operation cannot be invoked because the channel group has terminated.
    UnresolvedAddressException
    Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address.
    UnsupportedAddressTypeException
    Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported.
    WritePendingException
    Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed.

Package java.nio.channels Description

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Channels | Description
Channel | A nexus for I/O operations
  ReadableByteChannel | Can read into a buffer
    ScatteringByteChannel   | Can read into a sequence of buffers
  WritableByteChannel | Can write from a buffer
    GatheringByteChannel | Can write from a sequence of buffers
  ByteChannel | Can read/write to/from a buffer
    SeekableByteChannel | A ByteChannel connected to an entity that contains a variable-length sequence of bytes
  AsynchronousChannel | Supports asynchronous I/O operations.
    AsynchronousByteChannel | Can read and write bytes asynchronously
  NetworkChannel | A channel to a network socket
    MulticastChannel | Can join Internet Protocol (IP) multicast groups
Channels | Utility methods for channel/stream interoperation

A channel represents an open connection to an entity such as a hardware device, a file, a network socket, or a program component that is capable of performing one or more distinct I/O operations, for example reading or writing. As specified in the Channel interface, channels are either open or closed, and they are both asynchronously closeable and interruptible.

The Channel interface is extended by several other interfaces.

The ReadableByteChannel interface specifies a read method that reads bytes from the channel into a buffer; similarly, the WritableByteChannel interface specifies a write method that writes bytes from a buffer to the channel. The ByteChannel interface unifies these two interfaces for the common case of channels that can both read and write bytes. The SeekableByteChannel interface extends the ByteChannel interface with methods to query and modify the channel's current position, and its size.

The ScatteringByteChannel and GatheringByteChannel interfaces extend the ReadableByteChannel and WritableByteChannel interfaces, respectively, adding read and write methods that take a sequence of buffers rather than a single buffer.

The NetworkChannel interface specifies methods to bind the channel's socket, obtain the address to which the socket is bound, and methods to get and set socket options. The MulticastChannel interface specifies methods to join Internet Protocol (IP) multicast groups.

The Channels utility class defines static methods that support the interoperation of the stream classes of the java.io package with the channel classes of this package. An appropriate channel can be constructed from an InputStream or an OutputStream, and conversely an InputStream or an OutputStream can be constructed from a channel. A Reader can be constructed that uses a given charset to decode bytes from a given readable byte channel, and conversely a Writer can be constructed that uses a given charset to encode characters into bytes and write them to a given writable byte channel.

File channels | Description
FileChannel | Reads, writes, maps, and manipulates files
FileLock | A lock on a (region of a) file
MappedByteBuffer   | A direct byte buffer mapped to a region of a file

The FileChannel class supports the usual operations of reading bytes from, and writing bytes to, a channel connected to a file, as well as those of querying and modifying the current file position and truncating the file to a specific size. It defines methods for acquiring locks on the whole file or on a specific region of a file; these methods return instances of the FileLock class. Finally, it defines methods for forcing updates to the file to be written to the storage device that contains it, for efficiently transferring bytes between the file and other channels, and for mapping a region of the file directly into memory.

A FileChannel is created by invoking one of its static open methods, or by invoking the getChannel method of a FileInputStream, FileOutputStream, or RandomAccessFile to return a file channel connected to the same underlying file as the java.io class.

Multiplexed, non-blocking I/O

Description

SelectableChannel | A channel that can be multiplexed
  DatagramChannel | A channel to a datagram-oriented socket
  Pipe.SinkChannel | The write end of a pipe
  Pipe.SourceChannel | The read end of a pipe
  ServerSocketChannel   | A channel to a stream-oriented listening socket
  SocketChannel | A channel for a stream-oriented connecting socket
Selector | A multiplexor of selectable channels
SelectionKey A token representing the registration
of a channel with a selector
Pipe | Two channels that form a unidirectional pipe

Multiplexed, non-blocking I/O, which is much more scalable than thread-oriented, blocking I/O, is provided by selectors, selectable channels, and selection keys.

A selector is a multiplexor of selectable channels, which in turn are a special type of channel that can be put into non-blocking mode. To perform multiplexed I/O operations, one or more selectable channels are first created, put into non-blocking mode, and registered with a selector. Registering a channel specifies the set of I/O operations that will be tested for readiness by the selector, and returns a selection key that represents the registration.

Once some channels have been registered with a selector, a selection operation can be performed in order to discover which channels, if any, have become ready to perform one or more of the operations in which interest was previously declared. If a channel is ready then the key returned when it was registered will be added to the selector's selected-key set. The key set, and the keys within it, can be examined in order to determine the operations for which each channel is ready. From each key one can retrieve the corresponding channel in order to perform whatever I/O operations are required.

That a selection key indicates that its channel is ready for some operation is a hint, but not a guarantee, that such an operation can be performed by a thread without causing the thread to block. It is imperative that code that performs multiplexed I/O be written so as to ignore these hints when they prove to be incorrect.

This package defines selectable-channel classes corresponding to the DatagramSocket, ServerSocket, and Socket classes defined in the java.net package. Minor changes to these classes have been made in order to support sockets that are associated with channels. This package also defines a simple class that implements unidirectional pipes. In all cases, a new selectable channel is created by invoking the static open method of the corresponding class. If a channel needs an associated socket then a socket will be created as a side effect of this operation.

The implementation of selectors, selectable channels, and selection keys can be replaced by "plugging in" an alternative definition or instance of the SelectorProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific I/O-multiplexing mechanisms when very high performance is required.

Much of the bookkeeping and synchronization required to implement the multiplexed-I/O abstractions is performed by the AbstractInterruptibleChannel, AbstractSelectableChannel, AbstractSelectionKey, and AbstractSelector classes in the java.nio.channels.spi package. When defining a custom selector provider, only the AbstractSelector and AbstractSelectionKey classes should be subclassed directly; custom channel classes should extend the appropriate SelectableChannel subclasses defined in this package.

Asynchronous I/O | Description
AsynchronousFileChannel | An asynchronous channel for reading, writing, and manipulating a file
AsynchronousSocketChannel | An asynchronous channel to a stream-oriented connecting socket
AsynchronousServerSocketChannel   | An asynchronous channel to a stream-oriented listening socket
CompletionHandler | A handler for consuming the result of an asynchronous operation
AsynchronousChannelGroup | A grouping of asynchronous channels for the purpose of resource sharing

Asynchronous channels are a special type of channel capable of asynchronous I/O operations. Asynchronous channels are non-blocking and define methods to initiate asynchronous operations, returning a Future representing the pending result of each operation. The Future can be used to poll or wait for the result of the operation. Asynchronous I/O operations can also specify a CompletionHandler to invoke when the operation completes. A completion handler is user provided code that is executed to consume the result of I/O operation.

This package defines asynchronous-channel classes that are connected to a stream-oriented connecting or listening socket, or a datagram-oriented socket. It also defines the AsynchronousFileChannel class for asynchronous reading, writing, and manipulating a file. As with the FileChannel it supports operations to truncate the file to a specific size, force updates to the file to be written to the storage device, or acquire locks on the whole file or on a specific region of the file. Unlike the FileChannel it does not define methods for mapping a region of the file directly into memory. Where memory mapped I/O is required, then a FileChannel can be used.

Asynchronous channels are bound to an asynchronous channel group for the purpose of resource sharing. A group has an associated ExecutorService to which tasks are submitted to handle I/O events and dispatch to completion handlers that consume the result of asynchronous operations performed on channels in the group. The group can optionally be specified when creating the channel or the channel can be bound to a default group. Sophisticated users may wish to create their own asynchronous channel groups or configure the ExecutorService that will be used for the default group.

As with selectors, the implementation of asynchronous channels can be replaced by "plugging in" an alternative definition or instance of the AsynchronousChannelProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific asynchronous I/O mechanisms when very high performance is required.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.channels

Interfaces

  • AsynchronousByteChannel
  • AsynchronousChannel
  • ByteChannel
  • Channel
  • CompletionHandler
  • GatheringByteChannel
  • InterruptibleChannel
  • MulticastChannel
  • NetworkChannel
  • ReadableByteChannel
  • ScatteringByteChannel
  • SeekableByteChannel
  • WritableByteChannel

Classes

  • AsynchronousChannelGroup
  • AsynchronousFileChannel
  • AsynchronousServerSocketChannel
  • AsynchronousSocketChannel
  • Channels
  • DatagramChannel
  • FileChannel
  • FileChannel.MapMode
  • FileLock
  • MembershipKey
  • Pipe
  • Pipe.SinkChannel
  • Pipe.SourceChannel
  • SelectableChannel
  • SelectionKey
  • Selector
  • ServerSocketChannel
  • SocketChannel

Exceptions

  • AcceptPendingException
  • AlreadyBoundException
  • AlreadyConnectedException
  • AsynchronousCloseException
  • CancelledKeyException
  • ClosedByInterruptException
  • ClosedChannelException
  • ClosedSelectorException
  • ConnectionPendingException
  • FileLockInterruptionException
  • IllegalBlockingModeException
  • IllegalChannelGroupException
  • IllegalSelectorException
  • InterruptedByTimeoutException
  • NoConnectionPendingException
  • NonReadableChannelException
  • NonWritableChannelException
  • NotYetBoundException
  • NotYetConnectedException
  • OverlappingFileLockException
  • ReadPendingException
  • ShutdownChannelGroupException
  • UnresolvedAddressException
  • UnsupportedAddressTypeException
  • WritePendingException


channels

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.channels

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.

See: Description

  • Interface Summary
    Interface Description
    AsynchronousByteChannel
    An asynchronous channel that can read and write bytes.
    AsynchronousChannel
    A channel that supports asynchronous I/O operations.
    ByteChannel
    A channel that can read and write bytes.
    Channel
    A nexus for I/O operations.
    CompletionHandler<V,A>
    A handler for consuming the result of an asynchronous I/O operation.
    GatheringByteChannel
    A channel that can write bytes from a sequence of buffers.
    InterruptibleChannel
    A channel that can be asynchronously closed and interrupted.
    MulticastChannel
    A network channel that supports Internet Protocol (IP) multicasting.
    NetworkChannel
    A channel to a network socket.
    ReadableByteChannel
    A channel that can read bytes.
    ScatteringByteChannel
    A channel that can read bytes into a sequence of buffers.
    SeekableByteChannel
    A byte channel that maintains a current position and allows the position to be changed.
    WritableByteChannel
    A channel that can write bytes.
  • Class Summary
    Class Description
    AsynchronousChannelGroup
    A grouping of asynchronous channels for the purpose of resource sharing.
    AsynchronousFileChannel
    An asynchronous channel for reading, writing, and manipulating a file.
    AsynchronousServerSocketChannel
    An asynchronous channel for stream-oriented listening sockets.
    AsynchronousSocketChannel
    An asynchronous channel for stream-oriented connecting sockets.
    Channels
    Utility methods for channels and streams.
    DatagramChannel
    A selectable channel for datagram-oriented sockets.
    FileChannel
    A channel for reading, writing, mapping, and manipulating a file.
    FileChannel.MapMode
    A typesafe enumeration for file-mapping modes.
    FileLock
    A token representing a lock on a region of a file.
    MembershipKey
    A token representing the membership of an Internet Protocol (IP) multicast group.
    Pipe
    A pair of channels that implements a unidirectional pipe.
    Pipe.SinkChannel
    A channel representing the writable end of a Pipe.
    Pipe.SourceChannel
    A channel representing the readable end of a Pipe.
    SelectableChannel
    A channel that can be multiplexed via a Selector.
    SelectionKey
    A token representing the registration of a SelectableChannel with a Selector.
    Selector
    A multiplexor of SelectableChannel objects.
    ServerSocketChannel
    A selectable channel for stream-oriented listening sockets.
    SocketChannel
    A selectable channel for stream-oriented connecting sockets.
  • Exception Summary
    Exception Description
    AcceptPendingException
    Unchecked exception thrown when an attempt is made to initiate an accept operation on a channel and a previous accept operation has not completed.
    AlreadyBoundException
    Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound.
    AlreadyConnectedException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel that is already connected.
    AsynchronousCloseException
    Checked exception received by a thread when another thread closes the channel or the part of the channel upon which it is blocked in an I/O operation.
    CancelledKeyException
    Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid.
    ClosedByInterruptException
    Checked exception received by a thread when another thread interrupts it while it is blocked in an I/O operation upon a channel.
    ClosedChannelException
    Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon channel that is closed, or at least closed to that operation.
    ClosedSelectorException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector.
    ConnectionPendingException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel for which a non-blocking connection operation is already in progress.
    FileLockInterruptionException
    Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
    IllegalBlockingModeException
    Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode.
    IllegalChannelGroupException
    Unchecked exception thrown when an attempt is made to open a channel in a group that was not created by the same provider.
    IllegalSelectorException
    Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel.
    InterruptedByTimeoutException
    Checked exception received by a thread when a timeout elapses before an asynchronous operation completes.
    NoConnectionPendingException
    Unchecked exception thrown when the finishConnect method of a SocketChannel is invoked without first successfully invoking its connect method.
    NonReadableChannelException
    Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading.
    NonWritableChannelException
    Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing.
    NotYetBoundException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound.
    NotYetConnectedException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected.
    OverlappingFileLockException
    Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file.
    ReadPendingException
    Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed.
    ShutdownChannelGroupException
    Unchecked exception thrown when an attempt is made to construct a channel in a group that is shutdown or the completion handler for an I/O operation cannot be invoked because the channel group has terminated.
    UnresolvedAddressException
    Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address.
    UnsupportedAddressTypeException
    Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported.
    WritePendingException
    Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed.

Package java.nio.channels Description

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Channels | Description
Channel | A nexus for I/O operations
  ReadableByteChannel | Can read into a buffer
    ScatteringByteChannel   | Can read into a sequence of buffers
  WritableByteChannel | Can write from a buffer
    GatheringByteChannel | Can write from a sequence of buffers
  ByteChannel | Can read/write to/from a buffer
    SeekableByteChannel | A ByteChannel connected to an entity that contains a variable-length sequence of bytes
  AsynchronousChannel | Supports asynchronous I/O operations.
    AsynchronousByteChannel | Can read and write bytes asynchronously
  NetworkChannel | A channel to a network socket
    MulticastChannel | Can join Internet Protocol (IP) multicast groups
Channels | Utility methods for channel/stream interoperation

A channel represents an open connection to an entity such as a hardware device, a file, a network socket, or a program component that is capable of performing one or more distinct I/O operations, for example reading or writing. As specified in the Channel interface, channels are either open or closed, and they are both asynchronously closeable and interruptible.

The Channel interface is extended by several other interfaces.

The ReadableByteChannel interface specifies a read method that reads bytes from the channel into a buffer; similarly, the WritableByteChannel interface specifies a write method that writes bytes from a buffer to the channel. The ByteChannel interface unifies these two interfaces for the common case of channels that can both read and write bytes. The SeekableByteChannel interface extends the ByteChannel interface with methods to query and modify the channel's current position, and its size.

The ScatteringByteChannel and GatheringByteChannel interfaces extend the ReadableByteChannel and WritableByteChannel interfaces, respectively, adding read and write methods that take a sequence of buffers rather than a single buffer.

The NetworkChannel interface specifies methods to bind the channel's socket, obtain the address to which the socket is bound, and methods to get and set socket options. The MulticastChannel interface specifies methods to join Internet Protocol (IP) multicast groups.

The Channels utility class defines static methods that support the interoperation of the stream classes of the java.io package with the channel classes of this package. An appropriate channel can be constructed from an InputStream or an OutputStream, and conversely an InputStream or an OutputStream can be constructed from a channel. A Reader can be constructed that uses a given charset to decode bytes from a given readable byte channel, and conversely a Writer can be constructed that uses a given charset to encode characters into bytes and write them to a given writable byte channel.

File channels | Description
FileChannel | Reads, writes, maps, and manipulates files
FileLock | A lock on a (region of a) file
MappedByteBuffer   | A direct byte buffer mapped to a region of a file

The FileChannel class supports the usual operations of reading bytes from, and writing bytes to, a channel connected to a file, as well as those of querying and modifying the current file position and truncating the file to a specific size. It defines methods for acquiring locks on the whole file or on a specific region of a file; these methods return instances of the FileLock class. Finally, it defines methods for forcing updates to the file to be written to the storage device that contains it, for efficiently transferring bytes between the file and other channels, and for mapping a region of the file directly into memory.

A FileChannel is created by invoking one of its static open methods, or by invoking the getChannel method of a FileInputStream, FileOutputStream, or RandomAccessFile to return a file channel connected to the same underlying file as the java.io class.

Multiplexed, non-blocking I/O

Description

SelectableChannel | A channel that can be multiplexed
  DatagramChannel | A channel to a datagram-oriented socket
  Pipe.SinkChannel | The write end of a pipe
  Pipe.SourceChannel | The read end of a pipe
  ServerSocketChannel   | A channel to a stream-oriented listening socket
  SocketChannel | A channel for a stream-oriented connecting socket
Selector | A multiplexor of selectable channels
SelectionKey A token representing the registration
of a channel with a selector
Pipe | Two channels that form a unidirectional pipe

Multiplexed, non-blocking I/O, which is much more scalable than thread-oriented, blocking I/O, is provided by selectors, selectable channels, and selection keys.

A selector is a multiplexor of selectable channels, which in turn are a special type of channel that can be put into non-blocking mode. To perform multiplexed I/O operations, one or more selectable channels are first created, put into non-blocking mode, and registered with a selector. Registering a channel specifies the set of I/O operations that will be tested for readiness by the selector, and returns a selection key that represents the registration.

Once some channels have been registered with a selector, a selection operation can be performed in order to discover which channels, if any, have become ready to perform one or more of the operations in which interest was previously declared. If a channel is ready then the key returned when it was registered will be added to the selector's selected-key set. The key set, and the keys within it, can be examined in order to determine the operations for which each channel is ready. From each key one can retrieve the corresponding channel in order to perform whatever I/O operations are required.

That a selection key indicates that its channel is ready for some operation is a hint, but not a guarantee, that such an operation can be performed by a thread without causing the thread to block. It is imperative that code that performs multiplexed I/O be written so as to ignore these hints when they prove to be incorrect.

This package defines selectable-channel classes corresponding to the DatagramSocket, ServerSocket, and Socket classes defined in the java.net package. Minor changes to these classes have been made in order to support sockets that are associated with channels. This package also defines a simple class that implements unidirectional pipes. In all cases, a new selectable channel is created by invoking the static open method of the corresponding class. If a channel needs an associated socket then a socket will be created as a side effect of this operation.

The implementation of selectors, selectable channels, and selection keys can be replaced by "plugging in" an alternative definition or instance of the SelectorProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific I/O-multiplexing mechanisms when very high performance is required.

Much of the bookkeeping and synchronization required to implement the multiplexed-I/O abstractions is performed by the AbstractInterruptibleChannel, AbstractSelectableChannel, AbstractSelectionKey, and AbstractSelector classes in the java.nio.channels.spi package. When defining a custom selector provider, only the AbstractSelector and AbstractSelectionKey classes should be subclassed directly; custom channel classes should extend the appropriate SelectableChannel subclasses defined in this package.

Asynchronous I/O | Description
AsynchronousFileChannel | An asynchronous channel for reading, writing, and manipulating a file
AsynchronousSocketChannel | An asynchronous channel to a stream-oriented connecting socket
AsynchronousServerSocketChannel   | An asynchronous channel to a stream-oriented listening socket
CompletionHandler | A handler for consuming the result of an asynchronous operation
AsynchronousChannelGroup | A grouping of asynchronous channels for the purpose of resource sharing

Asynchronous channels are a special type of channel capable of asynchronous I/O operations. Asynchronous channels are non-blocking and define methods to initiate asynchronous operations, returning a Future representing the pending result of each operation. The Future can be used to poll or wait for the result of the operation. Asynchronous I/O operations can also specify a CompletionHandler to invoke when the operation completes. A completion handler is user provided code that is executed to consume the result of I/O operation.

This package defines asynchronous-channel classes that are connected to a stream-oriented connecting or listening socket, or a datagram-oriented socket. It also defines the AsynchronousFileChannel class for asynchronous reading, writing, and manipulating a file. As with the FileChannel it supports operations to truncate the file to a specific size, force updates to the file to be written to the storage device, or acquire locks on the whole file or on a specific region of the file. Unlike the FileChannel it does not define methods for mapping a region of the file directly into memory. Where memory mapped I/O is required, then a FileChannel can be used.

Asynchronous channels are bound to an asynchronous channel group for the purpose of resource sharing. A group has an associated ExecutorService to which tasks are submitted to handle I/O events and dispatch to completion handlers that consume the result of asynchronous operations performed on channels in the group. The group can optionally be specified when creating the channel or the channel can be bound to a default group. Sophisticated users may wish to create their own asynchronous channel groups or configure the ExecutorService that will be used for the default group.

As with selectors, the implementation of asynchronous channels can be replaced by "plugging in" an alternative definition or instance of the AsynchronousChannelProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific asynchronous I/O mechanisms when very high performance is required.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.channels

Interfaces

  • AsynchronousByteChannel
  • AsynchronousChannel
  • ByteChannel
  • Channel
  • CompletionHandler
  • GatheringByteChannel
  • InterruptibleChannel
  • MulticastChannel
  • NetworkChannel
  • ReadableByteChannel
  • ScatteringByteChannel
  • SeekableByteChannel
  • WritableByteChannel

Classes

  • AsynchronousChannelGroup
  • AsynchronousFileChannel
  • AsynchronousServerSocketChannel
  • AsynchronousSocketChannel
  • Channels
  • DatagramChannel
  • FileChannel
  • FileChannel.MapMode
  • FileLock
  • MembershipKey
  • Pipe
  • Pipe.SinkChannel
  • Pipe.SourceChannel
  • SelectableChannel
  • SelectionKey
  • Selector
  • ServerSocketChannel
  • SocketChannel

Exceptions

  • AcceptPendingException
  • AlreadyBoundException
  • AlreadyConnectedException
  • AsynchronousCloseException
  • CancelledKeyException
  • ClosedByInterruptException
  • ClosedChannelException
  • ClosedSelectorException
  • ConnectionPendingException
  • FileLockInterruptionException
  • IllegalBlockingModeException
  • IllegalChannelGroupException
  • IllegalSelectorException
  • InterruptedByTimeoutException
  • NoConnectionPendingException
  • NonReadableChannelException
  • NonWritableChannelException
  • NotYetBoundException
  • NotYetConnectedException
  • OverlappingFileLockException
  • ReadPendingException
  • ShutdownChannelGroupException
  • UnresolvedAddressException
  • UnsupportedAddressTypeException
  • WritePendingException


channels

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.channels

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.

See: Description

  • Interface Summary
    Interface Description
    AsynchronousByteChannel
    An asynchronous channel that can read and write bytes.
    AsynchronousChannel
    A channel that supports asynchronous I/O operations.
    ByteChannel
    A channel that can read and write bytes.
    Channel
    A nexus for I/O operations.
    CompletionHandler<V,A>
    A handler for consuming the result of an asynchronous I/O operation.
    GatheringByteChannel
    A channel that can write bytes from a sequence of buffers.
    InterruptibleChannel
    A channel that can be asynchronously closed and interrupted.
    MulticastChannel
    A network channel that supports Internet Protocol (IP) multicasting.
    NetworkChannel
    A channel to a network socket.
    ReadableByteChannel
    A channel that can read bytes.
    ScatteringByteChannel
    A channel that can read bytes into a sequence of buffers.
    SeekableByteChannel
    A byte channel that maintains a current position and allows the position to be changed.
    WritableByteChannel
    A channel that can write bytes.
  • Class Summary
    Class Description
    AsynchronousChannelGroup
    A grouping of asynchronous channels for the purpose of resource sharing.
    AsynchronousFileChannel
    An asynchronous channel for reading, writing, and manipulating a file.
    AsynchronousServerSocketChannel
    An asynchronous channel for stream-oriented listening sockets.
    AsynchronousSocketChannel
    An asynchronous channel for stream-oriented connecting sockets.
    Channels
    Utility methods for channels and streams.
    DatagramChannel
    A selectable channel for datagram-oriented sockets.
    FileChannel
    A channel for reading, writing, mapping, and manipulating a file.
    FileChannel.MapMode
    A typesafe enumeration for file-mapping modes.
    FileLock
    A token representing a lock on a region of a file.
    MembershipKey
    A token representing the membership of an Internet Protocol (IP) multicast group.
    Pipe
    A pair of channels that implements a unidirectional pipe.
    Pipe.SinkChannel
    A channel representing the writable end of a Pipe.
    Pipe.SourceChannel
    A channel representing the readable end of a Pipe.
    SelectableChannel
    A channel that can be multiplexed via a Selector.
    SelectionKey
    A token representing the registration of a SelectableChannel with a Selector.
    Selector
    A multiplexor of SelectableChannel objects.
    ServerSocketChannel
    A selectable channel for stream-oriented listening sockets.
    SocketChannel
    A selectable channel for stream-oriented connecting sockets.
  • Exception Summary
    Exception Description
    AcceptPendingException
    Unchecked exception thrown when an attempt is made to initiate an accept operation on a channel and a previous accept operation has not completed.
    AlreadyBoundException
    Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound.
    AlreadyConnectedException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel that is already connected.
    AsynchronousCloseException
    Checked exception received by a thread when another thread closes the channel or the part of the channel upon which it is blocked in an I/O operation.
    CancelledKeyException
    Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid.
    ClosedByInterruptException
    Checked exception received by a thread when another thread interrupts it while it is blocked in an I/O operation upon a channel.
    ClosedChannelException
    Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon channel that is closed, or at least closed to that operation.
    ClosedSelectorException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector.
    ConnectionPendingException
    Unchecked exception thrown when an attempt is made to connect a SocketChannel for which a non-blocking connection operation is already in progress.
    FileLockInterruptionException
    Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
    IllegalBlockingModeException
    Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode.
    IllegalChannelGroupException
    Unchecked exception thrown when an attempt is made to open a channel in a group that was not created by the same provider.
    IllegalSelectorException
    Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel.
    InterruptedByTimeoutException
    Checked exception received by a thread when a timeout elapses before an asynchronous operation completes.
    NoConnectionPendingException
    Unchecked exception thrown when the finishConnect method of a SocketChannel is invoked without first successfully invoking its connect method.
    NonReadableChannelException
    Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading.
    NonWritableChannelException
    Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing.
    NotYetBoundException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound.
    NotYetConnectedException
    Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected.
    OverlappingFileLockException
    Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file.
    ReadPendingException
    Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed.
    ShutdownChannelGroupException
    Unchecked exception thrown when an attempt is made to construct a channel in a group that is shutdown or the completion handler for an I/O operation cannot be invoked because the channel group has terminated.
    UnresolvedAddressException
    Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address.
    UnsupportedAddressTypeException
    Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported.
    WritePendingException
    Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed.

Package java.nio.channels Description

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Channels | Description
Channel | A nexus for I/O operations
  ReadableByteChannel | Can read into a buffer
    ScatteringByteChannel   | Can read into a sequence of buffers
  WritableByteChannel | Can write from a buffer
    GatheringByteChannel | Can write from a sequence of buffers
  ByteChannel | Can read/write to/from a buffer
    SeekableByteChannel | A ByteChannel connected to an entity that contains a variable-length sequence of bytes
  AsynchronousChannel | Supports asynchronous I/O operations.
    AsynchronousByteChannel | Can read and write bytes asynchronously
  NetworkChannel | A channel to a network socket
    MulticastChannel | Can join Internet Protocol (IP) multicast groups
Channels | Utility methods for channel/stream interoperation

A channel represents an open connection to an entity such as a hardware device, a file, a network socket, or a program component that is capable of performing one or more distinct I/O operations, for example reading or writing. As specified in the Channel interface, channels are either open or closed, and they are both asynchronously closeable and interruptible.

The Channel interface is extended by several other interfaces.

The ReadableByteChannel interface specifies a read method that reads bytes from the channel into a buffer; similarly, the WritableByteChannel interface specifies a write method that writes bytes from a buffer to the channel. The ByteChannel interface unifies these two interfaces for the common case of channels that can both read and write bytes. The SeekableByteChannel interface extends the ByteChannel interface with methods to query and modify the channel's current position, and its size.

The ScatteringByteChannel and GatheringByteChannel interfaces extend the ReadableByteChannel and WritableByteChannel interfaces, respectively, adding read and write methods that take a sequence of buffers rather than a single buffer.

The NetworkChannel interface specifies methods to bind the channel's socket, obtain the address to which the socket is bound, and methods to get and set socket options. The MulticastChannel interface specifies methods to join Internet Protocol (IP) multicast groups.

The Channels utility class defines static methods that support the interoperation of the stream classes of the java.io package with the channel classes of this package. An appropriate channel can be constructed from an InputStream or an OutputStream, and conversely an InputStream or an OutputStream can be constructed from a channel. A Reader can be constructed that uses a given charset to decode bytes from a given readable byte channel, and conversely a Writer can be constructed that uses a given charset to encode characters into bytes and write them to a given writable byte channel.

File channels | Description
FileChannel | Reads, writes, maps, and manipulates files
FileLock | A lock on a (region of a) file
MappedByteBuffer   | A direct byte buffer mapped to a region of a file

The FileChannel class supports the usual operations of reading bytes from, and writing bytes to, a channel connected to a file, as well as those of querying and modifying the current file position and truncating the file to a specific size. It defines methods for acquiring locks on the whole file or on a specific region of a file; these methods return instances of the FileLock class. Finally, it defines methods for forcing updates to the file to be written to the storage device that contains it, for efficiently transferring bytes between the file and other channels, and for mapping a region of the file directly into memory.

A FileChannel is created by invoking one of its static open methods, or by invoking the getChannel method of a FileInputStream, FileOutputStream, or RandomAccessFile to return a file channel connected to the same underlying file as the java.io class.

Multiplexed, non-blocking I/O

Description

SelectableChannel | A channel that can be multiplexed
  DatagramChannel | A channel to a datagram-oriented socket
  Pipe.SinkChannel | The write end of a pipe
  Pipe.SourceChannel | The read end of a pipe
  ServerSocketChannel   | A channel to a stream-oriented listening socket
  SocketChannel | A channel for a stream-oriented connecting socket
Selector | A multiplexor of selectable channels
SelectionKey A token representing the registration
of a channel with a selector
Pipe | Two channels that form a unidirectional pipe

Multiplexed, non-blocking I/O, which is much more scalable than thread-oriented, blocking I/O, is provided by selectors, selectable channels, and selection keys.

A selector is a multiplexor of selectable channels, which in turn are a special type of channel that can be put into non-blocking mode. To perform multiplexed I/O operations, one or more selectable channels are first created, put into non-blocking mode, and registered with a selector. Registering a channel specifies the set of I/O operations that will be tested for readiness by the selector, and returns a selection key that represents the registration.

Once some channels have been registered with a selector, a selection operation can be performed in order to discover which channels, if any, have become ready to perform one or more of the operations in which interest was previously declared. If a channel is ready then the key returned when it was registered will be added to the selector's selected-key set. The key set, and the keys within it, can be examined in order to determine the operations for which each channel is ready. From each key one can retrieve the corresponding channel in order to perform whatever I/O operations are required.

That a selection key indicates that its channel is ready for some operation is a hint, but not a guarantee, that such an operation can be performed by a thread without causing the thread to block. It is imperative that code that performs multiplexed I/O be written so as to ignore these hints when they prove to be incorrect.

This package defines selectable-channel classes corresponding to the DatagramSocket, ServerSocket, and Socket classes defined in the java.net package. Minor changes to these classes have been made in order to support sockets that are associated with channels. This package also defines a simple class that implements unidirectional pipes. In all cases, a new selectable channel is created by invoking the static open method of the corresponding class. If a channel needs an associated socket then a socket will be created as a side effect of this operation.

The implementation of selectors, selectable channels, and selection keys can be replaced by "plugging in" an alternative definition or instance of the SelectorProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific I/O-multiplexing mechanisms when very high performance is required.

Much of the bookkeeping and synchronization required to implement the multiplexed-I/O abstractions is performed by the AbstractInterruptibleChannel, AbstractSelectableChannel, AbstractSelectionKey, and AbstractSelector classes in the java.nio.channels.spi package. When defining a custom selector provider, only the AbstractSelector and AbstractSelectionKey classes should be subclassed directly; custom channel classes should extend the appropriate SelectableChannel subclasses defined in this package.

Asynchronous I/O | Description
AsynchronousFileChannel | An asynchronous channel for reading, writing, and manipulating a file
AsynchronousSocketChannel | An asynchronous channel to a stream-oriented connecting socket
AsynchronousServerSocketChannel   | An asynchronous channel to a stream-oriented listening socket
CompletionHandler | A handler for consuming the result of an asynchronous operation
AsynchronousChannelGroup | A grouping of asynchronous channels for the purpose of resource sharing

Asynchronous channels are a special type of channel capable of asynchronous I/O operations. Asynchronous channels are non-blocking and define methods to initiate asynchronous operations, returning a Future representing the pending result of each operation. The Future can be used to poll or wait for the result of the operation. Asynchronous I/O operations can also specify a CompletionHandler to invoke when the operation completes. A completion handler is user provided code that is executed to consume the result of I/O operation.

This package defines asynchronous-channel classes that are connected to a stream-oriented connecting or listening socket, or a datagram-oriented socket. It also defines the AsynchronousFileChannel class for asynchronous reading, writing, and manipulating a file. As with the FileChannel it supports operations to truncate the file to a specific size, force updates to the file to be written to the storage device, or acquire locks on the whole file or on a specific region of the file. Unlike the FileChannel it does not define methods for mapping a region of the file directly into memory. Where memory mapped I/O is required, then a FileChannel can be used.

Asynchronous channels are bound to an asynchronous channel group for the purpose of resource sharing. A group has an associated ExecutorService to which tasks are submitted to handle I/O events and dispatch to completion handlers that consume the result of asynchronous operations performed on channels in the group. The group can optionally be specified when creating the channel or the channel can be bound to a default group. Sophisticated users may wish to create their own asynchronous channel groups or configure the ExecutorService that will be used for the default group.

As with selectors, the implementation of asynchronous channels can be replaced by "plugging in" an alternative definition or instance of the AsynchronousChannelProvider class defined in the java.nio.channels.spi package. It is not expected that many developers will actually make use of this facility; it is provided primarily so that sophisticated users can take advantage of operating-system-specific asynchronous I/O mechanisms when very high performance is required.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.channels

Interfaces

  • AsynchronousByteChannel
  • AsynchronousChannel
  • ByteChannel
  • Channel
  • CompletionHandler
  • GatheringByteChannel
  • InterruptibleChannel
  • MulticastChannel
  • NetworkChannel
  • ReadableByteChannel
  • ScatteringByteChannel
  • SeekableByteChannel
  • WritableByteChannel

Classes

  • AsynchronousChannelGroup
  • AsynchronousFileChannel
  • AsynchronousServerSocketChannel
  • AsynchronousSocketChannel
  • Channels
  • DatagramChannel
  • FileChannel
  • FileChannel.MapMode
  • FileLock
  • MembershipKey
  • Pipe
  • Pipe.SinkChannel
  • Pipe.SourceChannel
  • SelectableChannel
  • SelectionKey
  • Selector
  • ServerSocketChannel
  • SocketChannel

Exceptions

  • AcceptPendingException
  • AlreadyBoundException
  • AlreadyConnectedException
  • AsynchronousCloseException
  • CancelledKeyException
  • ClosedByInterruptException
  • ClosedChannelException
  • ClosedSelectorException
  • ConnectionPendingException
  • FileLockInterruptionException
  • IllegalBlockingModeException
  • IllegalChannelGroupException
  • IllegalSelectorException
  • InterruptedByTimeoutException
  • NoConnectionPendingException
  • NonReadableChannelException
  • NonWritableChannelException
  • NotYetBoundException
  • NotYetConnectedException
  • OverlappingFileLockException
  • ReadPendingException
  • ShutdownChannelGroupException
  • UnresolvedAddressException
  • UnsupportedAddressTypeException
  • WritePendingException


compact1 - java.nio.channels.spi

Classes

  • AbstractInterruptibleChannel
  • AbstractSelectableChannel
  • AbstractSelectionKey
  • AbstractSelector
  • AsynchronousChannelProvider
  • SelectorProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.channels.spi

Service-provider classes for the java.nio.channels package.

See: Description

  • Class Summary
    Class Description
    AbstractInterruptibleChannel
    Base implementation class for interruptible channels.
    AbstractSelectableChannel
    Base implementation class for selectable channels.
    AbstractSelectionKey
    Base implementation class for selection keys.
    AbstractSelector
    Base implementation class for selectors.
    AsynchronousChannelProvider
    Service-provider class for asynchronous channels.
    SelectorProvider
    Service-provider class for selectors and selectable channels.

Package java.nio.channels.spi Description

Service-provider classes for the java.nio.channels package.

Only developers who are defining new selector providers or asynchronous channel providers should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.channels.spi

Classes

  • AbstractInterruptibleChannel
  • AbstractSelectableChannel
  • AbstractSelectionKey
  • AbstractSelector
  • AsynchronousChannelProvider
  • SelectorProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.channels.spi

Service-provider classes for the java.nio.channels package.

See: Description

  • Class Summary
    Class Description
    AbstractInterruptibleChannel
    Base implementation class for interruptible channels.
    AbstractSelectableChannel
    Base implementation class for selectable channels.
    AbstractSelectionKey
    Base implementation class for selection keys.
    AbstractSelector
    Base implementation class for selectors.
    AsynchronousChannelProvider
    Service-provider class for asynchronous channels.
    SelectorProvider
    Service-provider class for selectors and selectable channels.

Package java.nio.channels.spi Description

Service-provider classes for the java.nio.channels package.

Only developers who are defining new selector providers or asynchronous channel providers should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.channels.spi

Classes

  • AbstractInterruptibleChannel
  • AbstractSelectableChannel
  • AbstractSelectionKey
  • AbstractSelector
  • AsynchronousChannelProvider
  • SelectorProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.channels.spi

Service-provider classes for the java.nio.channels package.

See: Description

  • Class Summary
    Class Description
    AbstractInterruptibleChannel
    Base implementation class for interruptible channels.
    AbstractSelectableChannel
    Base implementation class for selectable channels.
    AbstractSelectionKey
    Base implementation class for selection keys.
    AbstractSelector
    Base implementation class for selectors.
    AsynchronousChannelProvider
    Service-provider class for asynchronous channels.
    SelectorProvider
    Service-provider class for selectors and selectable channels.

Package java.nio.channels.spi Description

Service-provider classes for the java.nio.channels package.

Only developers who are defining new selector providers or asynchronous channel providers should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.channels.spi

Classes

  • AbstractInterruptibleChannel
  • AbstractSelectableChannel
  • AbstractSelectionKey
  • AbstractSelector
  • AsynchronousChannelProvider
  • SelectorProvider


compact1 - java.nio.charset

Classes

  • Charset
  • CharsetDecoder
  • CharsetEncoder
  • CoderResult
  • CodingErrorAction
  • StandardCharsets

Exceptions

  • CharacterCodingException
  • IllegalCharsetNameException
  • MalformedInputException
  • UnmappableCharacterException
  • UnsupportedCharsetException

Errors

  • CoderMalfunctionError


charset

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.charset

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

See: Description

  • Class Summary
    Class Description
    Charset
    A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
    CharsetDecoder
    An engine that can transform a sequence of bytes in a specific charset into a sequence of sixteen-bit Unicode characters.
    CharsetEncoder
    An engine that can transform a sequence of sixteen-bit Unicode characters into a sequence of bytes in a specific charset.
    CoderResult
    A description of the result state of a coder.
    CodingErrorAction
    A typesafe enumeration for coding-error actions.
    StandardCharsets
    Constant definitions for the standard Charsets.
  • Exception Summary
    Exception Description
    CharacterCodingException
    Checked exception thrown when a character encoding or decoding error occurs.
    IllegalCharsetNameException
    Unchecked exception thrown when a string that is not a legal charset name is used as such.
    MalformedInputException
    Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence.
    UnmappableCharacterException
    Checked exception thrown when an input character (or byte) sequence is valid but cannot be mapped to an output byte (or character) sequence.
    UnsupportedCharsetException
    Unchecked exception thrown when no support is available for a requested charset.
  • Error Summary
    Error Description
    CoderMalfunctionError
    Error thrown when the decodeLoop method of a CharsetDecoder, or the encodeLoop method of a CharsetEncoder, throws an unexpected exception.

Package java.nio.charset Description

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

Class name

Description

Charset A named mapping between characters
and bytes
CharsetDecoder | Decodes bytes into characters
CharsetEncoder   | Encodes characters into bytes
CoderResult   | Describes coder results
CodingErrorAction   Describes actions to take when
coding errors are detected

A charset is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in RFC 2278. A decoder is an engine which transforms bytes in a specific charset into characters, and an encoder is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are collectively referred to as coders.

The Charset class defines methods for creating coders for a given charset and for retrieving the various names associated with a charset. It also defines static methods for testing whether a particular charset is supported, for locating charset instances by name, and for constructing a map that contains every charset for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing charset-related constructors and methods in the String class, together with the existing InputStreamReader and OutputStreamWriter classes, all of whose implementations have been reworked to make use of the charset facilities defined in this package. A small number of changes have been made to the InputStreamReader and OutputStreamWriter classes in order to allow explicit charset objects to be specified in the construction of instances of those classes.

Support for new charsets can be made available via the interface defined in the CharsetProvider class in the java.nio.charset.spi package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.charset

Classes

  • Charset
  • CharsetDecoder
  • CharsetEncoder
  • CoderResult
  • CodingErrorAction
  • StandardCharsets

Exceptions

  • CharacterCodingException
  • IllegalCharsetNameException
  • MalformedInputException
  • UnmappableCharacterException
  • UnsupportedCharsetException

Errors

  • CoderMalfunctionError


charset

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.charset

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

See: Description

  • Class Summary
    Class Description
    Charset
    A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
    CharsetDecoder
    An engine that can transform a sequence of bytes in a specific charset into a sequence of sixteen-bit Unicode characters.
    CharsetEncoder
    An engine that can transform a sequence of sixteen-bit Unicode characters into a sequence of bytes in a specific charset.
    CoderResult
    A description of the result state of a coder.
    CodingErrorAction
    A typesafe enumeration for coding-error actions.
    StandardCharsets
    Constant definitions for the standard Charsets.
  • Exception Summary
    Exception Description
    CharacterCodingException
    Checked exception thrown when a character encoding or decoding error occurs.
    IllegalCharsetNameException
    Unchecked exception thrown when a string that is not a legal charset name is used as such.
    MalformedInputException
    Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence.
    UnmappableCharacterException
    Checked exception thrown when an input character (or byte) sequence is valid but cannot be mapped to an output byte (or character) sequence.
    UnsupportedCharsetException
    Unchecked exception thrown when no support is available for a requested charset.
  • Error Summary
    Error Description
    CoderMalfunctionError
    Error thrown when the decodeLoop method of a CharsetDecoder, or the encodeLoop method of a CharsetEncoder, throws an unexpected exception.

Package java.nio.charset Description

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

Class name

Description

Charset A named mapping between characters
and bytes
CharsetDecoder | Decodes bytes into characters
CharsetEncoder   | Encodes characters into bytes
CoderResult   | Describes coder results
CodingErrorAction   Describes actions to take when
coding errors are detected

A charset is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in RFC 2278. A decoder is an engine which transforms bytes in a specific charset into characters, and an encoder is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are collectively referred to as coders.

The Charset class defines methods for creating coders for a given charset and for retrieving the various names associated with a charset. It also defines static methods for testing whether a particular charset is supported, for locating charset instances by name, and for constructing a map that contains every charset for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing charset-related constructors and methods in the String class, together with the existing InputStreamReader and OutputStreamWriter classes, all of whose implementations have been reworked to make use of the charset facilities defined in this package. A small number of changes have been made to the InputStreamReader and OutputStreamWriter classes in order to allow explicit charset objects to be specified in the construction of instances of those classes.

Support for new charsets can be made available via the interface defined in the CharsetProvider class in the java.nio.charset.spi package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.charset

Classes

  • Charset
  • CharsetDecoder
  • CharsetEncoder
  • CoderResult
  • CodingErrorAction
  • StandardCharsets

Exceptions

  • CharacterCodingException
  • IllegalCharsetNameException
  • MalformedInputException
  • UnmappableCharacterException
  • UnsupportedCharsetException

Errors

  • CoderMalfunctionError


charset

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.charset

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

See: Description

  • Class Summary
    Class Description
    Charset
    A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
    CharsetDecoder
    An engine that can transform a sequence of bytes in a specific charset into a sequence of sixteen-bit Unicode characters.
    CharsetEncoder
    An engine that can transform a sequence of sixteen-bit Unicode characters into a sequence of bytes in a specific charset.
    CoderResult
    A description of the result state of a coder.
    CodingErrorAction
    A typesafe enumeration for coding-error actions.
    StandardCharsets
    Constant definitions for the standard Charsets.
  • Exception Summary
    Exception Description
    CharacterCodingException
    Checked exception thrown when a character encoding or decoding error occurs.
    IllegalCharsetNameException
    Unchecked exception thrown when a string that is not a legal charset name is used as such.
    MalformedInputException
    Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence.
    UnmappableCharacterException
    Checked exception thrown when an input character (or byte) sequence is valid but cannot be mapped to an output byte (or character) sequence.
    UnsupportedCharsetException
    Unchecked exception thrown when no support is available for a requested charset.
  • Error Summary
    Error Description
    CoderMalfunctionError
    Error thrown when the decodeLoop method of a CharsetDecoder, or the encodeLoop method of a CharsetEncoder, throws an unexpected exception.

Package java.nio.charset Description

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

Class name

Description

Charset A named mapping between characters
and bytes
CharsetDecoder | Decodes bytes into characters
CharsetEncoder   | Encodes characters into bytes
CoderResult   | Describes coder results
CodingErrorAction   Describes actions to take when
coding errors are detected

A charset is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in RFC 2278. A decoder is an engine which transforms bytes in a specific charset into characters, and an encoder is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are collectively referred to as coders.

The Charset class defines methods for creating coders for a given charset and for retrieving the various names associated with a charset. It also defines static methods for testing whether a particular charset is supported, for locating charset instances by name, and for constructing a map that contains every charset for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing charset-related constructors and methods in the String class, together with the existing InputStreamReader and OutputStreamWriter classes, all of whose implementations have been reworked to make use of the charset facilities defined in this package. A small number of changes have been made to the InputStreamReader and OutputStreamWriter classes in order to allow explicit charset objects to be specified in the construction of instances of those classes.

Support for new charsets can be made available via the interface defined in the CharsetProvider class in the java.nio.charset.spi package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.charset

Classes

  • Charset
  • CharsetDecoder
  • CharsetEncoder
  • CoderResult
  • CodingErrorAction
  • StandardCharsets

Exceptions

  • CharacterCodingException
  • IllegalCharsetNameException
  • MalformedInputException
  • UnmappableCharacterException
  • UnsupportedCharsetException

Errors

  • CoderMalfunctionError


compact1 - java.nio.charset.spi

Classes

  • CharsetProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.charset.spi

Service-provider classes for the java.nio.charset package.

See: Description

  • Class Summary
    Class Description
    CharsetProvider
    Charset service-provider class.

Package java.nio.charset.spi Description

Service-provider classes for the java.nio.charset package.

Only developers who are defining new charsets should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.charset.spi

Classes

  • CharsetProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.charset.spi

Service-provider classes for the java.nio.charset package.

See: Description

  • Class Summary
    Class Description
    CharsetProvider
    Charset service-provider class.

Package java.nio.charset.spi Description

Service-provider classes for the java.nio.charset package.

Only developers who are defining new charsets should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.charset.spi

Classes

  • CharsetProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.charset.spi

Service-provider classes for the java.nio.charset package.

See: Description

  • Class Summary
    Class Description
    CharsetProvider
    Charset service-provider class.

Package java.nio.charset.spi Description

Service-provider classes for the java.nio.charset package.

Only developers who are defining new charsets should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.charset.spi

Classes

  • CharsetProvider


compact1 - java.nio.file

Interfaces

  • CopyOption
  • DirectoryStream
  • DirectoryStream.Filter
  • FileVisitor
  • OpenOption
  • Path
  • PathMatcher
  • SecureDirectoryStream
  • Watchable
  • WatchEvent
  • WatchEvent.Kind
  • WatchEvent.Modifier
  • WatchKey
  • WatchService

Classes

  • Files
  • FileStore
  • FileSystem
  • FileSystems
  • LinkPermission
  • Paths
  • SimpleFileVisitor
  • StandardWatchEventKinds

Enums

  • AccessMode
  • FileVisitOption
  • FileVisitResult
  • LinkOption
  • StandardCopyOption
  • StandardOpenOption

Exceptions

  • AccessDeniedException
  • AtomicMoveNotSupportedException
  • ClosedDirectoryStreamException
  • ClosedFileSystemException
  • ClosedWatchServiceException
  • DirectoryIteratorException
  • DirectoryNotEmptyException
  • FileAlreadyExistsException
  • FileSystemAlreadyExistsException
  • FileSystemException
  • FileSystemLoopException
  • FileSystemNotFoundException
  • InvalidPathException
  • NoSuchFileException
  • NotDirectoryException
  • NotLinkException
  • ProviderMismatchException
  • ProviderNotFoundException
  • ReadOnlyFileSystemException


file

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.file

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

See: Description

  • Interface Summary
    Interface Description
    CopyOption
    An object that configures how to copy or move a file.
    DirectoryStream<T>
    An object to iterate over the entries in a directory.
    DirectoryStream.Filter<T>
    An interface that is implemented by objects that decide if a directory entry should be accepted or filtered.
    FileVisitor<T>
    A visitor of files.
    OpenOption
    An object that configures how to open or create a file.
    Path
    An object that may be used to locate a file in a file system.
    PathMatcher
    An interface that is implemented by objects that perform match operations on paths.
    SecureDirectoryStream<T>
    A DirectoryStream that defines operations on files that are located relative to an open directory.
    Watchable
    An object that may be registered with a watch service so that it can be watched for changes and events.
    WatchEvent<T>
    An event or a repeated event for an object that is registered with a WatchService.
    WatchEvent.Kind<T>
    An event kind, for the purposes of identification.
    WatchEvent.Modifier
    An event modifier that qualifies how a Watchable is registered with a WatchService.
    WatchKey
    A token representing the registration of a watchable object with a WatchService.
    WatchService
    A watch service that watches registered objects for changes and events.
  • Class Summary
    Class Description
    Files
    This class consists exclusively of static methods that operate on files, directories, or other types of files.
    FileStore
    Storage for files.
    FileSystem
    Provides an interface to a file system and is the factory for objects to access files and other objects in the file system.
    FileSystems
    Factory methods for file systems.
    LinkPermission
    The Permission class for link creation operations.
    Paths
    This class consists exclusively of static methods that return a Path by converting a path string or URI.
    SimpleFileVisitor<T>
    A simple visitor of files with default behavior to visit all files and to re-throw I/O errors.
    StandardWatchEventKinds
    Defines the standard event kinds.
  • Enum Summary
    Enum Description
    AccessMode
    Defines access modes used to test the accessibility of a file.
    FileVisitOption
    Defines the file tree traversal options.
    FileVisitResult
    The result type of a FileVisitor.
    LinkOption
    Defines the options as to how symbolic links are handled.
    StandardCopyOption
    Defines the standard copy options.
    StandardOpenOption
    Defines the standard open options.
  • Exception Summary
    Exception Description
    AccessDeniedException
    Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check.
    AtomicMoveNotSupportedException
    Checked exception thrown when a file cannot be moved as an atomic file system operation.
    ClosedDirectoryStreamException
    Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed.
    ClosedFileSystemException
    Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed.
    ClosedWatchServiceException
    Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed.
    DirectoryIteratorException
    Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory.
    DirectoryNotEmptyException
    Checked exception thrown when a file system operation fails because a directory is not empty.
    FileAlreadyExistsException
    Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
    FileSystemAlreadyExistsException
    Runtime exception thrown when an attempt is made to create a file system that already exists.
    FileSystemException
    Thrown when a file system operation fails on one or two files.
    FileSystemLoopException
    Checked exception thrown when a file system loop, or cycle, is encountered.
    FileSystemNotFoundException
    Runtime exception thrown when a file system cannot be found.
    InvalidPathException
    Unchecked exception thrown when path string cannot be converted into a Path because the path string contains invalid characters, or the path string is invalid for other file system specific reasons.
    NoSuchFileException
    Checked exception thrown when an attempt is made to access a file that does not exist.
    NotDirectoryException
    Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
    NotLinkException
    Checked exception thrown when a file system operation fails because a file is not a symbolic link.
    ProviderMismatchException
    Unchecked exception thrown when an attempt is made to invoke a method on an object created by one file system provider with a parameter created by a different file system provider.
    ProviderNotFoundException
    Runtime exception thrown when a provider of the required type cannot be found.
    ReadOnlyFileSystemException
    Unchecked exception thrown when an attempt is made to update an object associated with a read-only FileSystem.

Package java.nio.file Description

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

The java.nio.file package defines classes to access files and file systems. The API to access file and file system attributes is defined in the java.nio.file.attribute package. The java.nio.file.spi package is used by service provider implementors wishing to extend the platform default provider, or to construct other provider implementations.

Symbolic Links

Many operating systems and file systems support for symbolic links. A symbolic link is a special file that serves as a reference to another file. For the most part, symbolic links are transparent to applications and operations on symbolic links are automatically redirected to the target of the link. Exceptions to this are when a symbolic link is deleted or renamed/moved in which case the link is deleted or removed rather than the target of the link. This package includes support for symbolic links where implementations provide these semantics. File systems may support other types that are semantically close but support for these other types of links is not included in this package.

Interoperability

The File class defines the toPath method to construct a Path by converting the abstract path represented by the java.io.File object. The resulting Path can be used to operate on the same file as the File object. The Path specification provides further information on the interoperability between Path and java.io.File objects.

Visibility

The view of the files and file system provided by classes in this package are guaranteed to be consistent with other views provided by other instances in the same Java virtual machine. The view may or may not, however, be consistent with the view of the file system as seen by other concurrently running programs due to caching performed by the underlying operating system and delays induced by network-filesystem protocols. This is true regardless of the language in which these other programs are written, and whether they are running on the same machine or on some other machine. The exact nature of any such inconsistencies are system-dependent and are therefore unspecified.

Synchronized I/O File Integrity

The SYNC and DSYNC options are used when opening a file to require that updates to the file are written synchronously to the underlying storage device. In the case of the default provider, and the file resides on a local storage device, and the seekable channel is connected to a file that was opened with one of these options, then an invocation of the write method is only guaranteed to return when all changes made to the file by that invocation have been written to the device. These options are useful for ensuring that critical information is not lost in the event of a system crash. If the file does not reside on a local device then no such guarantee is made. Whether this guarantee is possible with other provider implementations is provider specific.

General Exceptions

Unless otherwise noted, passing a null argument to a constructor or method of any class or interface in this package will cause a NullPointerException to be thrown. Additionally, invoking a method with a collection containing a null element will cause a NullPointerException, unless otherwise specified.

Unless otherwise noted, methods that attempt to access the file system will throw ClosedFileSystemException when invoked on objects associated with a FileSystem that has been closed. Additionally, any methods that attempt write access to a file system will throw ReadOnlyFileSystemException when invoked on an object associated with a FileSystem that only provides read-only access.

Unless otherwise noted, invoking a method of any class or interface in this package created by one provider with a parameter that is an object created by another provider, will throw ProviderMismatchException.

Optional Specific Exceptions

Most of the methods defined by classes in this package that access the file system specify that IOException be thrown when an I/O error occurs. In some cases, these methods define specific I/O exceptions for common cases. These exceptions, noted as optional specific exceptions, are thrown by the implementation where it can detect the specific error. Where the specific error cannot be detected then the more general IOException is thrown.
Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.file

Interfaces

  • CopyOption
  • DirectoryStream
  • DirectoryStream.Filter
  • FileVisitor
  • OpenOption
  • Path
  • PathMatcher
  • SecureDirectoryStream
  • Watchable
  • WatchEvent
  • WatchEvent.Kind
  • WatchEvent.Modifier
  • WatchKey
  • WatchService

Classes

  • Files
  • FileStore
  • FileSystem
  • FileSystems
  • LinkPermission
  • Paths
  • SimpleFileVisitor
  • StandardWatchEventKinds

Enums

  • AccessMode
  • FileVisitOption
  • FileVisitResult
  • LinkOption
  • StandardCopyOption
  • StandardOpenOption

Exceptions

  • AccessDeniedException
  • AtomicMoveNotSupportedException
  • ClosedDirectoryStreamException
  • ClosedFileSystemException
  • ClosedWatchServiceException
  • DirectoryIteratorException
  • DirectoryNotEmptyException
  • FileAlreadyExistsException
  • FileSystemAlreadyExistsException
  • FileSystemException
  • FileSystemLoopException
  • FileSystemNotFoundException
  • InvalidPathException
  • NoSuchFileException
  • NotDirectoryException
  • NotLinkException
  • ProviderMismatchException
  • ProviderNotFoundException
  • ReadOnlyFileSystemException


file

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.file

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

See: Description

  • Interface Summary
    Interface Description
    CopyOption
    An object that configures how to copy or move a file.
    DirectoryStream<T>
    An object to iterate over the entries in a directory.
    DirectoryStream.Filter<T>
    An interface that is implemented by objects that decide if a directory entry should be accepted or filtered.
    FileVisitor<T>
    A visitor of files.
    OpenOption
    An object that configures how to open or create a file.
    Path
    An object that may be used to locate a file in a file system.
    PathMatcher
    An interface that is implemented by objects that perform match operations on paths.
    SecureDirectoryStream<T>
    A DirectoryStream that defines operations on files that are located relative to an open directory.
    Watchable
    An object that may be registered with a watch service so that it can be watched for changes and events.
    WatchEvent<T>
    An event or a repeated event for an object that is registered with a WatchService.
    WatchEvent.Kind<T>
    An event kind, for the purposes of identification.
    WatchEvent.Modifier
    An event modifier that qualifies how a Watchable is registered with a WatchService.
    WatchKey
    A token representing the registration of a watchable object with a WatchService.
    WatchService
    A watch service that watches registered objects for changes and events.
  • Class Summary
    Class Description
    Files
    This class consists exclusively of static methods that operate on files, directories, or other types of files.
    FileStore
    Storage for files.
    FileSystem
    Provides an interface to a file system and is the factory for objects to access files and other objects in the file system.
    FileSystems
    Factory methods for file systems.
    LinkPermission
    The Permission class for link creation operations.
    Paths
    This class consists exclusively of static methods that return a Path by converting a path string or URI.
    SimpleFileVisitor<T>
    A simple visitor of files with default behavior to visit all files and to re-throw I/O errors.
    StandardWatchEventKinds
    Defines the standard event kinds.
  • Enum Summary
    Enum Description
    AccessMode
    Defines access modes used to test the accessibility of a file.
    FileVisitOption
    Defines the file tree traversal options.
    FileVisitResult
    The result type of a FileVisitor.
    LinkOption
    Defines the options as to how symbolic links are handled.
    StandardCopyOption
    Defines the standard copy options.
    StandardOpenOption
    Defines the standard open options.
  • Exception Summary
    Exception Description
    AccessDeniedException
    Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check.
    AtomicMoveNotSupportedException
    Checked exception thrown when a file cannot be moved as an atomic file system operation.
    ClosedDirectoryStreamException
    Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed.
    ClosedFileSystemException
    Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed.
    ClosedWatchServiceException
    Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed.
    DirectoryIteratorException
    Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory.
    DirectoryNotEmptyException
    Checked exception thrown when a file system operation fails because a directory is not empty.
    FileAlreadyExistsException
    Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
    FileSystemAlreadyExistsException
    Runtime exception thrown when an attempt is made to create a file system that already exists.
    FileSystemException
    Thrown when a file system operation fails on one or two files.
    FileSystemLoopException
    Checked exception thrown when a file system loop, or cycle, is encountered.
    FileSystemNotFoundException
    Runtime exception thrown when a file system cannot be found.
    InvalidPathException
    Unchecked exception thrown when path string cannot be converted into a Path because the path string contains invalid characters, or the path string is invalid for other file system specific reasons.
    NoSuchFileException
    Checked exception thrown when an attempt is made to access a file that does not exist.
    NotDirectoryException
    Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
    NotLinkException
    Checked exception thrown when a file system operation fails because a file is not a symbolic link.
    ProviderMismatchException
    Unchecked exception thrown when an attempt is made to invoke a method on an object created by one file system provider with a parameter created by a different file system provider.
    ProviderNotFoundException
    Runtime exception thrown when a provider of the required type cannot be found.
    ReadOnlyFileSystemException
    Unchecked exception thrown when an attempt is made to update an object associated with a read-only FileSystem.

Package java.nio.file Description

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

The java.nio.file package defines classes to access files and file systems. The API to access file and file system attributes is defined in the java.nio.file.attribute package. The java.nio.file.spi package is used by service provider implementors wishing to extend the platform default provider, or to construct other provider implementations.

Symbolic Links

Many operating systems and file systems support for symbolic links. A symbolic link is a special file that serves as a reference to another file. For the most part, symbolic links are transparent to applications and operations on symbolic links are automatically redirected to the target of the link. Exceptions to this are when a symbolic link is deleted or renamed/moved in which case the link is deleted or removed rather than the target of the link. This package includes support for symbolic links where implementations provide these semantics. File systems may support other types that are semantically close but support for these other types of links is not included in this package.

Interoperability

The File class defines the toPath method to construct a Path by converting the abstract path represented by the java.io.File object. The resulting Path can be used to operate on the same file as the File object. The Path specification provides further information on the interoperability between Path and java.io.File objects.

Visibility

The view of the files and file system provided by classes in this package are guaranteed to be consistent with other views provided by other instances in the same Java virtual machine. The view may or may not, however, be consistent with the view of the file system as seen by other concurrently running programs due to caching performed by the underlying operating system and delays induced by network-filesystem protocols. This is true regardless of the language in which these other programs are written, and whether they are running on the same machine or on some other machine. The exact nature of any such inconsistencies are system-dependent and are therefore unspecified.

Synchronized I/O File Integrity

The SYNC and DSYNC options are used when opening a file to require that updates to the file are written synchronously to the underlying storage device. In the case of the default provider, and the file resides on a local storage device, and the seekable channel is connected to a file that was opened with one of these options, then an invocation of the write method is only guaranteed to return when all changes made to the file by that invocation have been written to the device. These options are useful for ensuring that critical information is not lost in the event of a system crash. If the file does not reside on a local device then no such guarantee is made. Whether this guarantee is possible with other provider implementations is provider specific.

General Exceptions

Unless otherwise noted, passing a null argument to a constructor or method of any class or interface in this package will cause a NullPointerException to be thrown. Additionally, invoking a method with a collection containing a null element will cause a NullPointerException, unless otherwise specified.

Unless otherwise noted, methods that attempt to access the file system will throw ClosedFileSystemException when invoked on objects associated with a FileSystem that has been closed. Additionally, any methods that attempt write access to a file system will throw ReadOnlyFileSystemException when invoked on an object associated with a FileSystem that only provides read-only access.

Unless otherwise noted, invoking a method of any class or interface in this package created by one provider with a parameter that is an object created by another provider, will throw ProviderMismatchException.

Optional Specific Exceptions

Most of the methods defined by classes in this package that access the file system specify that IOException be thrown when an I/O error occurs. In some cases, these methods define specific I/O exceptions for common cases. These exceptions, noted as optional specific exceptions, are thrown by the implementation where it can detect the specific error. Where the specific error cannot be detected then the more general IOException is thrown.
Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.file

Interfaces

  • CopyOption
  • DirectoryStream
  • DirectoryStream.Filter
  • FileVisitor
  • OpenOption
  • Path
  • PathMatcher
  • SecureDirectoryStream
  • Watchable
  • WatchEvent
  • WatchEvent.Kind
  • WatchEvent.Modifier
  • WatchKey
  • WatchService

Classes

  • Files
  • FileStore
  • FileSystem
  • FileSystems
  • LinkPermission
  • Paths
  • SimpleFileVisitor
  • StandardWatchEventKinds

Enums

  • AccessMode
  • FileVisitOption
  • FileVisitResult
  • LinkOption
  • StandardCopyOption
  • StandardOpenOption

Exceptions

  • AccessDeniedException
  • AtomicMoveNotSupportedException
  • ClosedDirectoryStreamException
  • ClosedFileSystemException
  • ClosedWatchServiceException
  • DirectoryIteratorException
  • DirectoryNotEmptyException
  • FileAlreadyExistsException
  • FileSystemAlreadyExistsException
  • FileSystemException
  • FileSystemLoopException
  • FileSystemNotFoundException
  • InvalidPathException
  • NoSuchFileException
  • NotDirectoryException
  • NotLinkException
  • ProviderMismatchException
  • ProviderNotFoundException
  • ReadOnlyFileSystemException


file

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.file

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

See: Description

  • Interface Summary
    Interface Description
    CopyOption
    An object that configures how to copy or move a file.
    DirectoryStream<T>
    An object to iterate over the entries in a directory.
    DirectoryStream.Filter<T>
    An interface that is implemented by objects that decide if a directory entry should be accepted or filtered.
    FileVisitor<T>
    A visitor of files.
    OpenOption
    An object that configures how to open or create a file.
    Path
    An object that may be used to locate a file in a file system.
    PathMatcher
    An interface that is implemented by objects that perform match operations on paths.
    SecureDirectoryStream<T>
    A DirectoryStream that defines operations on files that are located relative to an open directory.
    Watchable
    An object that may be registered with a watch service so that it can be watched for changes and events.
    WatchEvent<T>
    An event or a repeated event for an object that is registered with a WatchService.
    WatchEvent.Kind<T>
    An event kind, for the purposes of identification.
    WatchEvent.Modifier
    An event modifier that qualifies how a Watchable is registered with a WatchService.
    WatchKey
    A token representing the registration of a watchable object with a WatchService.
    WatchService
    A watch service that watches registered objects for changes and events.
  • Class Summary
    Class Description
    Files
    This class consists exclusively of static methods that operate on files, directories, or other types of files.
    FileStore
    Storage for files.
    FileSystem
    Provides an interface to a file system and is the factory for objects to access files and other objects in the file system.
    FileSystems
    Factory methods for file systems.
    LinkPermission
    The Permission class for link creation operations.
    Paths
    This class consists exclusively of static methods that return a Path by converting a path string or URI.
    SimpleFileVisitor<T>
    A simple visitor of files with default behavior to visit all files and to re-throw I/O errors.
    StandardWatchEventKinds
    Defines the standard event kinds.
  • Enum Summary
    Enum Description
    AccessMode
    Defines access modes used to test the accessibility of a file.
    FileVisitOption
    Defines the file tree traversal options.
    FileVisitResult
    The result type of a FileVisitor.
    LinkOption
    Defines the options as to how symbolic links are handled.
    StandardCopyOption
    Defines the standard copy options.
    StandardOpenOption
    Defines the standard open options.
  • Exception Summary
    Exception Description
    AccessDeniedException
    Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check.
    AtomicMoveNotSupportedException
    Checked exception thrown when a file cannot be moved as an atomic file system operation.
    ClosedDirectoryStreamException
    Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed.
    ClosedFileSystemException
    Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed.
    ClosedWatchServiceException
    Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed.
    DirectoryIteratorException
    Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory.
    DirectoryNotEmptyException
    Checked exception thrown when a file system operation fails because a directory is not empty.
    FileAlreadyExistsException
    Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
    FileSystemAlreadyExistsException
    Runtime exception thrown when an attempt is made to create a file system that already exists.
    FileSystemException
    Thrown when a file system operation fails on one or two files.
    FileSystemLoopException
    Checked exception thrown when a file system loop, or cycle, is encountered.
    FileSystemNotFoundException
    Runtime exception thrown when a file system cannot be found.
    InvalidPathException
    Unchecked exception thrown when path string cannot be converted into a Path because the path string contains invalid characters, or the path string is invalid for other file system specific reasons.
    NoSuchFileException
    Checked exception thrown when an attempt is made to access a file that does not exist.
    NotDirectoryException
    Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
    NotLinkException
    Checked exception thrown when a file system operation fails because a file is not a symbolic link.
    ProviderMismatchException
    Unchecked exception thrown when an attempt is made to invoke a method on an object created by one file system provider with a parameter created by a different file system provider.
    ProviderNotFoundException
    Runtime exception thrown when a provider of the required type cannot be found.
    ReadOnlyFileSystemException
    Unchecked exception thrown when an attempt is made to update an object associated with a read-only FileSystem.

Package java.nio.file Description

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

The java.nio.file package defines classes to access files and file systems. The API to access file and file system attributes is defined in the java.nio.file.attribute package. The java.nio.file.spi package is used by service provider implementors wishing to extend the platform default provider, or to construct other provider implementations.

Symbolic Links

Many operating systems and file systems support for symbolic links. A symbolic link is a special file that serves as a reference to another file. For the most part, symbolic links are transparent to applications and operations on symbolic links are automatically redirected to the target of the link. Exceptions to this are when a symbolic link is deleted or renamed/moved in which case the link is deleted or removed rather than the target of the link. This package includes support for symbolic links where implementations provide these semantics. File systems may support other types that are semantically close but support for these other types of links is not included in this package.

Interoperability

The File class defines the toPath method to construct a Path by converting the abstract path represented by the java.io.File object. The resulting Path can be used to operate on the same file as the File object. The Path specification provides further information on the interoperability between Path and java.io.File objects.

Visibility

The view of the files and file system provided by classes in this package are guaranteed to be consistent with other views provided by other instances in the same Java virtual machine. The view may or may not, however, be consistent with the view of the file system as seen by other concurrently running programs due to caching performed by the underlying operating system and delays induced by network-filesystem protocols. This is true regardless of the language in which these other programs are written, and whether they are running on the same machine or on some other machine. The exact nature of any such inconsistencies are system-dependent and are therefore unspecified.

Synchronized I/O File Integrity

The SYNC and DSYNC options are used when opening a file to require that updates to the file are written synchronously to the underlying storage device. In the case of the default provider, and the file resides on a local storage device, and the seekable channel is connected to a file that was opened with one of these options, then an invocation of the write method is only guaranteed to return when all changes made to the file by that invocation have been written to the device. These options are useful for ensuring that critical information is not lost in the event of a system crash. If the file does not reside on a local device then no such guarantee is made. Whether this guarantee is possible with other provider implementations is provider specific.

General Exceptions

Unless otherwise noted, passing a null argument to a constructor or method of any class or interface in this package will cause a NullPointerException to be thrown. Additionally, invoking a method with a collection containing a null element will cause a NullPointerException, unless otherwise specified.

Unless otherwise noted, methods that attempt to access the file system will throw ClosedFileSystemException when invoked on objects associated with a FileSystem that has been closed. Additionally, any methods that attempt write access to a file system will throw ReadOnlyFileSystemException when invoked on an object associated with a FileSystem that only provides read-only access.

Unless otherwise noted, invoking a method of any class or interface in this package created by one provider with a parameter that is an object created by another provider, will throw ProviderMismatchException.

Optional Specific Exceptions

Most of the methods defined by classes in this package that access the file system specify that IOException be thrown when an I/O error occurs. In some cases, these methods define specific I/O exceptions for common cases. These exceptions, noted as optional specific exceptions, are thrown by the implementation where it can detect the specific error. Where the specific error cannot be detected then the more general IOException is thrown.
Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.file

Interfaces

  • CopyOption
  • DirectoryStream
  • DirectoryStream.Filter
  • FileVisitor
  • OpenOption
  • Path
  • PathMatcher
  • SecureDirectoryStream
  • Watchable
  • WatchEvent
  • WatchEvent.Kind
  • WatchEvent.Modifier
  • WatchKey
  • WatchService

Classes

  • Files
  • FileStore
  • FileSystem
  • FileSystems
  • LinkPermission
  • Paths
  • SimpleFileVisitor
  • StandardWatchEventKinds

Enums

  • AccessMode
  • FileVisitOption
  • FileVisitResult
  • LinkOption
  • StandardCopyOption
  • StandardOpenOption

Exceptions

  • AccessDeniedException
  • AtomicMoveNotSupportedException
  • ClosedDirectoryStreamException
  • ClosedFileSystemException
  • ClosedWatchServiceException
  • DirectoryIteratorException
  • DirectoryNotEmptyException
  • FileAlreadyExistsException
  • FileSystemAlreadyExistsException
  • FileSystemException
  • FileSystemLoopException
  • FileSystemNotFoundException
  • InvalidPathException
  • NoSuchFileException
  • NotDirectoryException
  • NotLinkException
  • ProviderMismatchException
  • ProviderNotFoundException
  • ReadOnlyFileSystemException


compact1 - java.nio.file.attribute

Interfaces

  • AclFileAttributeView
  • AttributeView
  • BasicFileAttributes
  • BasicFileAttributeView
  • DosFileAttributes
  • DosFileAttributeView
  • FileAttribute
  • FileAttributeView
  • FileOwnerAttributeView
  • FileStoreAttributeView
  • GroupPrincipal
  • PosixFileAttributes
  • PosixFileAttributeView
  • UserDefinedFileAttributeView
  • UserPrincipal

Classes

  • AclEntry
  • AclEntry.Builder
  • FileTime
  • PosixFilePermissions
  • UserPrincipalLookupService

Enums

  • AclEntryFlag
  • AclEntryPermission
  • AclEntryType
  • PosixFilePermission

Exceptions

  • UserPrincipalNotFoundException


attribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.file.attribute

Interfaces and classes providing access to file and file system attributes.

See: Description

  • Interface Summary
    Interface Description
    AclFileAttributeView
    A file attribute view that supports reading or updating a file's Access Control Lists (ACL) or file owner attributes.
    AttributeView
    An object that provides a read-only or updatable view of non-opaque values associated with an object in a filesystem.
    BasicFileAttributes
    Basic attributes associated with a file in a file system.
    BasicFileAttributeView
    A file attribute view that provides a view of a basic set of file attributes common to many file systems.
    DosFileAttributes
    File attributes associated with a file in a file system that supports legacy "DOS" attributes.
    DosFileAttributeView
    A file attribute view that provides a view of the legacy "DOS" file attributes.
    FileAttribute<T>
    An object that encapsulates the value of a file attribute that can be set atomically when creating a new file or directory by invoking the createFile or createDirectory methods.
    FileAttributeView
    An attribute view that is a read-only or updatable view of non-opaque values associated with a file in a filesystem.
    FileOwnerAttributeView
    A file attribute view that supports reading or updating the owner of a file.
    FileStoreAttributeView
    An attribute view that is a read-only or updatable view of the attributes of a FileStore.
    GroupPrincipal
    A UserPrincipal representing a group identity, used to determine access rights to objects in a file system.
    PosixFileAttributes
    File attributes associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    PosixFileAttributeView
    A file attribute view that provides a view of the file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    UserDefinedFileAttributeView
    A file attribute view that provides a view of a file's user-defined attributes, sometimes known as extended attributes.
    UserPrincipal
    A Principal representing an identity used to determine access rights to objects in a file system.
  • Class Summary
    Class Description
    AclEntry
    An entry in an access control list (ACL).
    AclEntry.Builder
    A builder of AclEntry objects.
    FileTime
    Represents the value of a file's time stamp attribute.
    PosixFilePermissions
    This class consists exclusively of static methods that operate on sets of PosixFilePermission objects.
    UserPrincipalLookupService
    An object to lookup user and group principals by name.
  • Enum Summary
    Enum Description
    AclEntryFlag
    Defines the flags for used by the flags component of an ACL entry.
    AclEntryPermission
    Defines the permissions for use with the permissions component of an ACL entry.
    AclEntryType
    A typesafe enumeration of the access control entry types.
    PosixFilePermission
    Defines the bits for use with the permissions attribute.
  • Exception Summary
    Exception Description
    UserPrincipalNotFoundException
    Checked exception thrown when a lookup of UserPrincipal fails because the principal does not exist.

Package java.nio.file.attribute Description

Interfaces and classes providing access to file and file system attributes.
Attribute views | Description
AttributeView | Can read or update non-opaque values associated with objects in a file system
  FileAttributeView | Can read or update file attributes
    BasicFileAttributeView   | Can read or update a basic set of file attributes
      PosixFileAttributeView   | Can read or update POSIX defined file attributes
      DosFileAttributeView   | Can read or update FAT file attributes
    FileOwnerAttributeView   | Can read or update the owner of a file
     AclFileAttributeView   | Can read or update Access Control Lists
    UserDefinedFileAttributeView   | Can read or update user-defined file attributes
  FileStoreAttributeView | Can read or update file system attributes

An attribute view provides a read-only or updatable view of the non-opaque values, or metadata, associated with objects in a file system. The FileAttributeView interface is extended by several other interfaces that that views to specific sets of file attributes. FileAttributeViews are selected by invoking the Files.getFileAttributeView(java.nio.file.Path, java.lang.Class<V>, java.nio.file.LinkOption...) method with a type-token to identify the required view. Views can also be identified by name. The FileStoreAttributeView interface provides access to file store attributes. A FileStoreAttributeView of a given type is obtained by invoking the FileStore.getFileStoreAttributeView(java.lang.Class<V>) method.

The BasicFileAttributeView class defines methods to read and update a basic set of file attributes that are common to many file systems.

The PosixFileAttributeView interface extends BasicFileAttributeView by defining methods to access the file attributes commonly used by file systems and operating systems that implement the Portable Operating System Interface (POSIX) family of standards.

The DosFileAttributeView class extends BasicFileAttributeView by defining methods to access the legacy "DOS" file attributes supported on file systems such as File Allocation Tabl (FAT), commonly used in consumer devices.

The AclFileAttributeView class defines methods to read and write the Access Control List (ACL) file attribute. The ACL model used by this file attribute view is based on the model defined by RFC 3530: Network File System (NFS) version 4 Protocol.

In addition to attribute views, this package also defines classes and interfaces that are used when accessing attributes:

  • The UserPrincipal and GroupPrincipal interfaces represent an identity or group identity.
  • The UserPrincipalLookupService interface defines methods to lookup user or group principals.
  • The FileAttribute interface represents the value of an attribute for cases where the attribute value is required to be set atomically when creating an object in the file system.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.file.attribute

Interfaces

  • AclFileAttributeView
  • AttributeView
  • BasicFileAttributes
  • BasicFileAttributeView
  • DosFileAttributes
  • DosFileAttributeView
  • FileAttribute
  • FileAttributeView
  • FileOwnerAttributeView
  • FileStoreAttributeView
  • GroupPrincipal
  • PosixFileAttributes
  • PosixFileAttributeView
  • UserDefinedFileAttributeView
  • UserPrincipal

Classes

  • AclEntry
  • AclEntry.Builder
  • FileTime
  • PosixFilePermissions
  • UserPrincipalLookupService

Enums

  • AclEntryFlag
  • AclEntryPermission
  • AclEntryType
  • PosixFilePermission

Exceptions

  • UserPrincipalNotFoundException


attribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.file.attribute

Interfaces and classes providing access to file and file system attributes.

See: Description

  • Interface Summary
    Interface Description
    AclFileAttributeView
    A file attribute view that supports reading or updating a file's Access Control Lists (ACL) or file owner attributes.
    AttributeView
    An object that provides a read-only or updatable view of non-opaque values associated with an object in a filesystem.
    BasicFileAttributes
    Basic attributes associated with a file in a file system.
    BasicFileAttributeView
    A file attribute view that provides a view of a basic set of file attributes common to many file systems.
    DosFileAttributes
    File attributes associated with a file in a file system that supports legacy "DOS" attributes.
    DosFileAttributeView
    A file attribute view that provides a view of the legacy "DOS" file attributes.
    FileAttribute<T>
    An object that encapsulates the value of a file attribute that can be set atomically when creating a new file or directory by invoking the createFile or createDirectory methods.
    FileAttributeView
    An attribute view that is a read-only or updatable view of non-opaque values associated with a file in a filesystem.
    FileOwnerAttributeView
    A file attribute view that supports reading or updating the owner of a file.
    FileStoreAttributeView
    An attribute view that is a read-only or updatable view of the attributes of a FileStore.
    GroupPrincipal
    A UserPrincipal representing a group identity, used to determine access rights to objects in a file system.
    PosixFileAttributes
    File attributes associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    PosixFileAttributeView
    A file attribute view that provides a view of the file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    UserDefinedFileAttributeView
    A file attribute view that provides a view of a file's user-defined attributes, sometimes known as extended attributes.
    UserPrincipal
    A Principal representing an identity used to determine access rights to objects in a file system.
  • Class Summary
    Class Description
    AclEntry
    An entry in an access control list (ACL).
    AclEntry.Builder
    A builder of AclEntry objects.
    FileTime
    Represents the value of a file's time stamp attribute.
    PosixFilePermissions
    This class consists exclusively of static methods that operate on sets of PosixFilePermission objects.
    UserPrincipalLookupService
    An object to lookup user and group principals by name.
  • Enum Summary
    Enum Description
    AclEntryFlag
    Defines the flags for used by the flags component of an ACL entry.
    AclEntryPermission
    Defines the permissions for use with the permissions component of an ACL entry.
    AclEntryType
    A typesafe enumeration of the access control entry types.
    PosixFilePermission
    Defines the bits for use with the permissions attribute.
  • Exception Summary
    Exception Description
    UserPrincipalNotFoundException
    Checked exception thrown when a lookup of UserPrincipal fails because the principal does not exist.

Package java.nio.file.attribute Description

Interfaces and classes providing access to file and file system attributes.
Attribute views | Description
AttributeView | Can read or update non-opaque values associated with objects in a file system
  FileAttributeView | Can read or update file attributes
    BasicFileAttributeView   | Can read or update a basic set of file attributes
      PosixFileAttributeView   | Can read or update POSIX defined file attributes
      DosFileAttributeView   | Can read or update FAT file attributes
    FileOwnerAttributeView   | Can read or update the owner of a file
     AclFileAttributeView   | Can read or update Access Control Lists
    UserDefinedFileAttributeView   | Can read or update user-defined file attributes
  FileStoreAttributeView | Can read or update file system attributes

An attribute view provides a read-only or updatable view of the non-opaque values, or metadata, associated with objects in a file system. The FileAttributeView interface is extended by several other interfaces that that views to specific sets of file attributes. FileAttributeViews are selected by invoking the Files.getFileAttributeView(java.nio.file.Path, java.lang.Class<V>, java.nio.file.LinkOption...) method with a type-token to identify the required view. Views can also be identified by name. The FileStoreAttributeView interface provides access to file store attributes. A FileStoreAttributeView of a given type is obtained by invoking the FileStore.getFileStoreAttributeView(java.lang.Class<V>) method.

The BasicFileAttributeView class defines methods to read and update a basic set of file attributes that are common to many file systems.

The PosixFileAttributeView interface extends BasicFileAttributeView by defining methods to access the file attributes commonly used by file systems and operating systems that implement the Portable Operating System Interface (POSIX) family of standards.

The DosFileAttributeView class extends BasicFileAttributeView by defining methods to access the legacy "DOS" file attributes supported on file systems such as File Allocation Tabl (FAT), commonly used in consumer devices.

The AclFileAttributeView class defines methods to read and write the Access Control List (ACL) file attribute. The ACL model used by this file attribute view is based on the model defined by RFC 3530: Network File System (NFS) version 4 Protocol.

In addition to attribute views, this package also defines classes and interfaces that are used when accessing attributes:

  • The UserPrincipal and GroupPrincipal interfaces represent an identity or group identity.
  • The UserPrincipalLookupService interface defines methods to lookup user or group principals.
  • The FileAttribute interface represents the value of an attribute for cases where the attribute value is required to be set atomically when creating an object in the file system.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.file.attribute

Interfaces

  • AclFileAttributeView
  • AttributeView
  • BasicFileAttributes
  • BasicFileAttributeView
  • DosFileAttributes
  • DosFileAttributeView
  • FileAttribute
  • FileAttributeView
  • FileOwnerAttributeView
  • FileStoreAttributeView
  • GroupPrincipal
  • PosixFileAttributes
  • PosixFileAttributeView
  • UserDefinedFileAttributeView
  • UserPrincipal

Classes

  • AclEntry
  • AclEntry.Builder
  • FileTime
  • PosixFilePermissions
  • UserPrincipalLookupService

Enums

  • AclEntryFlag
  • AclEntryPermission
  • AclEntryType
  • PosixFilePermission

Exceptions

  • UserPrincipalNotFoundException


attribute

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.file.attribute

Interfaces and classes providing access to file and file system attributes.

See: Description

  • Interface Summary
    Interface Description
    AclFileAttributeView
    A file attribute view that supports reading or updating a file's Access Control Lists (ACL) or file owner attributes.
    AttributeView
    An object that provides a read-only or updatable view of non-opaque values associated with an object in a filesystem.
    BasicFileAttributes
    Basic attributes associated with a file in a file system.
    BasicFileAttributeView
    A file attribute view that provides a view of a basic set of file attributes common to many file systems.
    DosFileAttributes
    File attributes associated with a file in a file system that supports legacy "DOS" attributes.
    DosFileAttributeView
    A file attribute view that provides a view of the legacy "DOS" file attributes.
    FileAttribute<T>
    An object that encapsulates the value of a file attribute that can be set atomically when creating a new file or directory by invoking the createFile or createDirectory methods.
    FileAttributeView
    An attribute view that is a read-only or updatable view of non-opaque values associated with a file in a filesystem.
    FileOwnerAttributeView
    A file attribute view that supports reading or updating the owner of a file.
    FileStoreAttributeView
    An attribute view that is a read-only or updatable view of the attributes of a FileStore.
    GroupPrincipal
    A UserPrincipal representing a group identity, used to determine access rights to objects in a file system.
    PosixFileAttributes
    File attributes associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    PosixFileAttributeView
    A file attribute view that provides a view of the file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
    UserDefinedFileAttributeView
    A file attribute view that provides a view of a file's user-defined attributes, sometimes known as extended attributes.
    UserPrincipal
    A Principal representing an identity used to determine access rights to objects in a file system.
  • Class Summary
    Class Description
    AclEntry
    An entry in an access control list (ACL).
    AclEntry.Builder
    A builder of AclEntry objects.
    FileTime
    Represents the value of a file's time stamp attribute.
    PosixFilePermissions
    This class consists exclusively of static methods that operate on sets of PosixFilePermission objects.
    UserPrincipalLookupService
    An object to lookup user and group principals by name.
  • Enum Summary
    Enum Description
    AclEntryFlag
    Defines the flags for used by the flags component of an ACL entry.
    AclEntryPermission
    Defines the permissions for use with the permissions component of an ACL entry.
    AclEntryType
    A typesafe enumeration of the access control entry types.
    PosixFilePermission
    Defines the bits for use with the permissions attribute.
  • Exception Summary
    Exception Description
    UserPrincipalNotFoundException
    Checked exception thrown when a lookup of UserPrincipal fails because the principal does not exist.

Package java.nio.file.attribute Description

Interfaces and classes providing access to file and file system attributes.
Attribute views | Description
AttributeView | Can read or update non-opaque values associated with objects in a file system
  FileAttributeView | Can read or update file attributes
    BasicFileAttributeView   | Can read or update a basic set of file attributes
      PosixFileAttributeView   | Can read or update POSIX defined file attributes
      DosFileAttributeView   | Can read or update FAT file attributes
    FileOwnerAttributeView   | Can read or update the owner of a file
     AclFileAttributeView   | Can read or update Access Control Lists
    UserDefinedFileAttributeView   | Can read or update user-defined file attributes
  FileStoreAttributeView | Can read or update file system attributes

An attribute view provides a read-only or updatable view of the non-opaque values, or metadata, associated with objects in a file system. The FileAttributeView interface is extended by several other interfaces that that views to specific sets of file attributes. FileAttributeViews are selected by invoking the Files.getFileAttributeView(java.nio.file.Path, java.lang.Class<V>, java.nio.file.LinkOption...) method with a type-token to identify the required view. Views can also be identified by name. The FileStoreAttributeView interface provides access to file store attributes. A FileStoreAttributeView of a given type is obtained by invoking the FileStore.getFileStoreAttributeView(java.lang.Class<V>) method.

The BasicFileAttributeView class defines methods to read and update a basic set of file attributes that are common to many file systems.

The PosixFileAttributeView interface extends BasicFileAttributeView by defining methods to access the file attributes commonly used by file systems and operating systems that implement the Portable Operating System Interface (POSIX) family of standards.

The DosFileAttributeView class extends BasicFileAttributeView by defining methods to access the legacy "DOS" file attributes supported on file systems such as File Allocation Tabl (FAT), commonly used in consumer devices.

The AclFileAttributeView class defines methods to read and write the Access Control List (ACL) file attribute. The ACL model used by this file attribute view is based on the model defined by RFC 3530: Network File System (NFS) version 4 Protocol.

In addition to attribute views, this package also defines classes and interfaces that are used when accessing attributes:

  • The UserPrincipal and GroupPrincipal interfaces represent an identity or group identity.
  • The UserPrincipalLookupService interface defines methods to lookup user or group principals.
  • The FileAttribute interface represents the value of an attribute for cases where the attribute value is required to be set atomically when creating an object in the file system.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.file.attribute

Interfaces

  • AclFileAttributeView
  • AttributeView
  • BasicFileAttributes
  • BasicFileAttributeView
  • DosFileAttributes
  • DosFileAttributeView
  • FileAttribute
  • FileAttributeView
  • FileOwnerAttributeView
  • FileStoreAttributeView
  • GroupPrincipal
  • PosixFileAttributes
  • PosixFileAttributeView
  • UserDefinedFileAttributeView
  • UserPrincipal

Classes

  • AclEntry
  • AclEntry.Builder
  • FileTime
  • PosixFilePermissions
  • UserPrincipalLookupService

Enums

  • AclEntryFlag
  • AclEntryPermission
  • AclEntryType
  • PosixFilePermission

Exceptions

  • UserPrincipalNotFoundException


compact1 - java.nio.file.spi

Classes

  • FileSystemProvider
  • FileTypeDetector


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.nio.file.spi

Service-provider classes for the java.nio.file package.

See: Description

  • Class Summary
    Class Description
    FileSystemProvider
    Service-provider class for file systems.
    FileTypeDetector
    A file type detector for probing a file to guess its file type.

Package java.nio.file.spi Description

Service-provider classes for the java.nio.file package.

Only developers who are defining new file system providers or file type detectors should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.nio.file.spi

Classes

  • FileSystemProvider
  • FileTypeDetector


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.nio.file.spi

Service-provider classes for the java.nio.file package.

See: Description

  • Class Summary
    Class Description
    FileSystemProvider
    Service-provider class for file systems.
    FileTypeDetector
    A file type detector for probing a file to guess its file type.

Package java.nio.file.spi Description

Service-provider classes for the java.nio.file package.

Only developers who are defining new file system providers or file type detectors should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.nio.file.spi

Classes

  • FileSystemProvider
  • FileTypeDetector


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.nio.file.spi

Service-provider classes for the java.nio.file package.

See: Description

  • Class Summary
    Class Description
    FileSystemProvider
    Service-provider class for file systems.
    FileTypeDetector
    A file type detector for probing a file to guess its file type.

Package java.nio.file.spi Description

Service-provider classes for the java.nio.file package.

Only developers who are defining new file system providers or file type detectors should need to make direct use of this package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.7
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.nio.file.spi

Classes

  • FileSystemProvider
  • FileTypeDetector


compact2 - java.rmi

Interfaces

  • Remote

Classes

  • MarshalledObject
  • Naming
  • RMISecurityManager

Exceptions

  • AccessException
  • AlreadyBoundException
  • ConnectException
  • ConnectIOException
  • MarshalException
  • NoSuchObjectException
  • NotBoundException
  • RemoteException
  • RMISecurityException
  • ServerError
  • ServerException
  • ServerRuntimeException
  • StubNotFoundException
  • UnexpectedException
  • UnknownHostException
  • UnmarshalException


rmi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.rmi

Provides the RMI package.

See: Description

  • Interface Summary
    Interface Description
    Remote
    The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
  • Class Summary
    Class Description
    MarshalledObject<T>
    A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
    Naming
    The Naming class provides methods for storing and obtaining references to remote objects in a remote object registry.
    RMISecurityManager Deprecated
    Use SecurityManager instead.
  • Exception Summary
    Exception Description
    AccessException
    An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
    AlreadyBoundException
    An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
    ConnectException
    A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
    ConnectIOException
    A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
    MarshalException
    A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
    NoSuchObjectException
    A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
    NotBoundException
    A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
    RemoteException
    A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
    RMISecurityException Deprecated
    Use SecurityException instead.
    ServerError
    A ServerError is thrown as a result of a remote method invocation when an Error is thrown while processing the invocation on the server, either while unmarshalling the arguments, executing the remote method itself, or marshalling the return value.
    ServerException
    A ServerException is thrown as a result of a remote method invocation when a RemoteException is thrown while processing the invocation on the server, either while unmarshalling the arguments or executing the remote method itself.
    ServerRuntimeException Deprecated
    no replacement
    StubNotFoundException
    A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
    UnexpectedException
    An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
    UnknownHostException
    An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.
    UnmarshalException
    An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Package java.rmi Description

Provides the RMI package. RMI is Remote Method Invocation. It is a mechanism that enables an object on one Java virtual machine to invoke methods on an object in another Java virtual machine. Any object that can be invoked this way must implement the Remote interface. When such an object is invoked, its arguments are ``marshalled'' and sent from the local virtual machine to the remote one, where the arguments are ``unmarshalled.'' When the method terminates, the results are marshalled from the remote machine and sent to the caller's virtual machine. If the method invocation results in an exception being thrown, the exception is indicated to caller.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.rmi

Interfaces

  • Remote

Classes

  • MarshalledObject
  • Naming
  • RMISecurityManager

Exceptions

  • AccessException
  • AlreadyBoundException
  • ConnectException
  • ConnectIOException
  • MarshalException
  • NoSuchObjectException
  • NotBoundException
  • RemoteException
  • RMISecurityException
  • ServerError
  • ServerException
  • ServerRuntimeException
  • StubNotFoundException
  • UnexpectedException
  • UnknownHostException
  • UnmarshalException


rmi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.rmi

Provides the RMI package.

See: Description

  • Interface Summary
    Interface Description
    Remote
    The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
  • Class Summary
    Class Description
    MarshalledObject<T>
    A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
    Naming
    The Naming class provides methods for storing and obtaining references to remote objects in a remote object registry.
    RMISecurityManager Deprecated
    Use SecurityManager instead.
  • Exception Summary
    Exception Description
    AccessException
    An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
    AlreadyBoundException
    An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
    ConnectException
    A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
    ConnectIOException
    A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
    MarshalException
    A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
    NoSuchObjectException
    A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
    NotBoundException
    A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
    RemoteException
    A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
    RMISecurityException Deprecated
    Use SecurityException instead.
    ServerError
    A ServerError is thrown as a result of a remote method invocation when an Error is thrown while processing the invocation on the server, either while unmarshalling the arguments, executing the remote method itself, or marshalling the return value.
    ServerException
    A ServerException is thrown as a result of a remote method invocation when a RemoteException is thrown while processing the invocation on the server, either while unmarshalling the arguments or executing the remote method itself.
    ServerRuntimeException Deprecated
    no replacement
    StubNotFoundException
    A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
    UnexpectedException
    An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
    UnknownHostException
    An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.
    UnmarshalException
    An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Package java.rmi Description

Provides the RMI package. RMI is Remote Method Invocation. It is a mechanism that enables an object on one Java virtual machine to invoke methods on an object in another Java virtual machine. Any object that can be invoked this way must implement the Remote interface. When such an object is invoked, its arguments are ``marshalled'' and sent from the local virtual machine to the remote one, where the arguments are ``unmarshalled.'' When the method terminates, the results are marshalled from the remote machine and sent to the caller's virtual machine. If the method invocation results in an exception being thrown, the exception is indicated to caller.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.rmi

Interfaces

  • Remote

Classes

  • MarshalledObject
  • Naming
  • RMISecurityManager

Exceptions

  • AccessException
  • AlreadyBoundException
  • ConnectException
  • ConnectIOException
  • MarshalException
  • NoSuchObjectException
  • NotBoundException
  • RemoteException
  • RMISecurityException
  • ServerError
  • ServerException
  • ServerRuntimeException
  • StubNotFoundException
  • UnexpectedException
  • UnknownHostException
  • UnmarshalException


compact2 - java.rmi.activation

Interfaces

  • ActivationInstantiator
  • ActivationMonitor
  • ActivationSystem
  • Activator

Classes

  • Activatable
  • ActivationDesc
  • ActivationGroup
  • ActivationGroup_Stub
  • ActivationGroupDesc
  • ActivationGroupDesc.CommandEnvironment
  • ActivationGroupID
  • ActivationID

Exceptions

  • ActivateFailedException
  • ActivationException
  • UnknownGroupException
  • UnknownObjectException


activation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.rmi.activation

Provides support for RMI Object Activation.

See: Description

  • Interface Summary
    Interface Description
    ActivationInstantiator
    An ActivationInstantiator is responsible for creating instances of "activatable" objects.
    ActivationMonitor
    An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
    ActivationSystem
    The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
    Activator
    The Activator facilitates remote object activation.
  • Class Summary
    Class Description
    Activatable
    The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
    ActivationDesc
    An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
    ActivationGroup
    An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
    ActivationGroup_Stub
    ActivationGroup_Stub is a stub class for the subclasses of java.rmi.activation.ActivationGroup that are exported as a java.rmi.server.UnicastRemoteObject.
    ActivationGroupDesc
    An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
    ActivationGroupDesc.CommandEnvironment
    Startup options for ActivationGroup implementations.
    ActivationGroupID
    The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
    ActivationID
    Activation makes use of special identifiers to denote remote objects that can be activated over time.
  • Exception Summary
    Exception Description
    ActivateFailedException
    This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
    ActivationException
    General exception used by the activation interfaces.
    UnknownGroupException
    An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
    UnknownObjectException
    An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Package java.rmi.activation Description

Provides support for RMI Object Activation. A remote object's reference can be made ``persistent'' and later activated into a ``live'' object using the RMI activation mechanism.

Implementations are not required to support the activation mechanism. If activation is not supported by this implementation, several specific activation API methods are all required to throw UnsupportedOperationException. If activation is supported by this implementation, these methods must never throw UnsupportedOperationException. These methods are denoted by the presence of an entry for UnsupportedOperationException in the Throws section of each method's specification.

Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.rmi.activation

Interfaces

  • ActivationInstantiator
  • ActivationMonitor
  • ActivationSystem
  • Activator

Classes

  • Activatable
  • ActivationDesc
  • ActivationGroup
  • ActivationGroup_Stub
  • ActivationGroupDesc
  • ActivationGroupDesc.CommandEnvironment
  • ActivationGroupID
  • ActivationID

Exceptions

  • ActivateFailedException
  • ActivationException
  • UnknownGroupException
  • UnknownObjectException


activation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.rmi.activation

Provides support for RMI Object Activation.

See: Description

  • Interface Summary
    Interface Description
    ActivationInstantiator
    An ActivationInstantiator is responsible for creating instances of "activatable" objects.
    ActivationMonitor
    An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
    ActivationSystem
    The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
    Activator
    The Activator facilitates remote object activation.
  • Class Summary
    Class Description
    Activatable
    The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
    ActivationDesc
    An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
    ActivationGroup
    An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
    ActivationGroup_Stub
    ActivationGroup_Stub is a stub class for the subclasses of java.rmi.activation.ActivationGroup that are exported as a java.rmi.server.UnicastRemoteObject.
    ActivationGroupDesc
    An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
    ActivationGroupDesc.CommandEnvironment
    Startup options for ActivationGroup implementations.
    ActivationGroupID
    The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
    ActivationID
    Activation makes use of special identifiers to denote remote objects that can be activated over time.
  • Exception Summary
    Exception Description
    ActivateFailedException
    This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
    ActivationException
    General exception used by the activation interfaces.
    UnknownGroupException
    An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
    UnknownObjectException
    An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Package java.rmi.activation Description

Provides support for RMI Object Activation. A remote object's reference can be made ``persistent'' and later activated into a ``live'' object using the RMI activation mechanism.

Implementations are not required to support the activation mechanism. If activation is not supported by this implementation, several specific activation API methods are all required to throw UnsupportedOperationException. If activation is supported by this implementation, these methods must never throw UnsupportedOperationException. These methods are denoted by the presence of an entry for UnsupportedOperationException in the Throws section of each method's specification.

Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.rmi.activation

Interfaces

  • ActivationInstantiator
  • ActivationMonitor
  • ActivationSystem
  • Activator

Classes

  • Activatable
  • ActivationDesc
  • ActivationGroup
  • ActivationGroup_Stub
  • ActivationGroupDesc
  • ActivationGroupDesc.CommandEnvironment
  • ActivationGroupID
  • ActivationID

Exceptions

  • ActivateFailedException
  • ActivationException
  • UnknownGroupException
  • UnknownObjectException


compact2 - java.rmi.dgc

Interfaces

  • DGC

Classes

  • Lease
  • VMID


dgc

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.rmi.dgc

Provides classes and interface for RMI distributed garbage-collection (DGC).

See: Description

  • Interface Summary
    Interface Description
    DGC
    The DGC abstraction is used for the server side of the distributed garbage collection algorithm.
  • Class Summary
    Class Description
    Lease
    A lease contains a unique VM identifier and a lease duration.
    VMID
    A VMID is a identifier that is unique across all Java virtual machines.

Package java.rmi.dgc Description

Provides classes and interface for RMI distributed garbage-collection (DGC). When the RMI server returns an object to its client (caller of the remote method), it tracks the remote object's usage in the client. When there are no more references to the remote object on the client, or if the reference's ``lease'' expires and not renewed, the server garbage-collects the remote object.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.rmi.dgc

Interfaces

  • DGC

Classes

  • Lease
  • VMID


dgc

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.rmi.dgc

Provides classes and interface for RMI distributed garbage-collection (DGC).

See: Description

  • Interface Summary
    Interface Description
    DGC
    The DGC abstraction is used for the server side of the distributed garbage collection algorithm.
  • Class Summary
    Class Description
    Lease
    A lease contains a unique VM identifier and a lease duration.
    VMID
    A VMID is a identifier that is unique across all Java virtual machines.

Package java.rmi.dgc Description

Provides classes and interface for RMI distributed garbage-collection (DGC). When the RMI server returns an object to its client (caller of the remote method), it tracks the remote object's usage in the client. When there are no more references to the remote object on the client, or if the reference's ``lease'' expires and not renewed, the server garbage-collects the remote object.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.rmi.dgc

Interfaces

  • DGC

Classes

  • Lease
  • VMID


compact2 - java.rmi.registry

Interfaces

  • Registry
  • RegistryHandler

Classes

  • LocateRegistry


registry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.rmi.registry

Provides a class and two interfaces for the RMI registry.

See: Description

  • Interface Summary
    Interface Description
    Registry
    Registry is a remote interface to a simple remote object registry that provides methods for storing and retrieving remote object references bound with arbitrary string names.
    RegistryHandler Deprecated
    no replacement
  • Class Summary
    Class Description
    LocateRegistry
    LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

Package java.rmi.registry Description

Provides a class and two interfaces for the RMI registry. A registry is a remote object that maps names to remote objects. A server registers its remote objects with the registry so that they can be looked up. When an object wants to invoke a method on a remote object, it must first lookup the remote object using its name. The registry returns to the calling object a reference to the remote object, using which a remote method can be invoked.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.rmi.registry

Interfaces

  • Registry
  • RegistryHandler

Classes

  • LocateRegistry


registry

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.rmi.registry

Provides a class and two interfaces for the RMI registry.

See: Description

  • Interface Summary
    Interface Description
    Registry
    Registry is a remote interface to a simple remote object registry that provides methods for storing and retrieving remote object references bound with arbitrary string names.
    RegistryHandler Deprecated
    no replacement
  • Class Summary
    Class Description
    LocateRegistry
    LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

Package java.rmi.registry Description

Provides a class and two interfaces for the RMI registry. A registry is a remote object that maps names to remote objects. A server registers its remote objects with the registry so that they can be looked up. When an object wants to invoke a method on a remote object, it must first lookup the remote object using its name. The registry returns to the calling object a reference to the remote object, using which a remote method can be invoked.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.rmi.registry

Interfaces

  • Registry
  • RegistryHandler

Classes

  • LocateRegistry


compact2 - java.rmi.server

Interfaces

  • LoaderHandler
  • RemoteCall
  • RemoteRef
  • RMIClientSocketFactory
  • RMIFailureHandler
  • RMIServerSocketFactory
  • ServerRef
  • Skeleton
  • Unreferenced

Classes

  • LogStream
  • ObjID
  • Operation
  • RemoteObject
  • RemoteObjectInvocationHandler
  • RemoteServer
  • RemoteStub
  • RMIClassLoader
  • RMIClassLoaderSpi
  • RMISocketFactory
  • UID
  • UnicastRemoteObject

Exceptions

  • ExportException
  • ServerCloneException
  • ServerNotActiveException
  • SkeletonMismatchException
  • SkeletonNotFoundException
  • SocketSecurityException


server

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.rmi.server

Provides classes and interfaces for supporting the server side of RMI.

See: Description

  • Interface Summary
    Interface Description
    LoaderHandler Deprecated
    no replacement
    RemoteCall Deprecated
    no replacement.
    RemoteRef
    RemoteRef represents the handle for a remote object.
    RMIClientSocketFactory
    An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
    RMIFailureHandler
    An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call.
    RMIServerSocketFactory
    An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
    ServerRef Deprecated
    No replacement.
    Skeleton Deprecated
    no replacement.
    Unreferenced
    A remote object implementation should implement the Unreferenced interface to receive notification when there are no more clients that reference that remote object.
  • Class Summary
    Class Description
    LogStream Deprecated
    no replacement
    ObjID
    An ObjID is used to identify a remote object exported to an RMI runtime.
    Operation Deprecated
    no replacement
    RemoteObject
    The RemoteObject class implements the java.lang.Object behavior for remote objects.
    RemoteObjectInvocationHandler
    An implementation of the InvocationHandler interface for use with Java Remote Method Invocation (Java RMI).
    RemoteServer
    The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
    RemoteStub Deprecated
    Statically generated stubs are deprecated, since stubs are generated dynamically.
    RMIClassLoader
    RMIClassLoader comprises static methods to support dynamic class loading with RMI.
    RMIClassLoaderSpi
    RMIClassLoaderSpi is the service provider interface for RMIClassLoader.
    RMISocketFactory
    An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
    UID
    A UID represents an identifier that is unique over time with respect to the host it is generated on, or one of 216 "well-known" identifiers.
    UnicastRemoteObject
    Used for exporting a remote object with JRMP and obtaining a stub that communicates to the remote object.
  • Exception Summary
    Exception Description
    ExportException
    An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
    ServerCloneException
    A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
    ServerNotActiveException
    An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
    SkeletonMismatchException Deprecated
    no replacement.
    SkeletonNotFoundException Deprecated
    no replacement.
    SocketSecurityException Deprecated
    This class is obsolete.

Package java.rmi.server Description

Provides classes and interfaces for supporting the server side of RMI. A group of classes are used by the stubs and skeletons generated by the rmic stub compiler. Another group of classes implements the RMI Transport protocol and HTTP tunneling.

Deprecated: HTTP Tunneling. The HTTP tunneling mechanism has been deprecated. See RMISocketFactory for further information.

Deprecated: Skeletons and Static Stubs. Skeletons and statically generated stubs are deprecated. This includes the APIs in this package that require the use of skeletons or static stubs, the runtime support for them, and the use of the rmic stub compiler to generate them. Support for skeletons and static stubs may be removed in a future release of the platform. Skeletons are unnecessary, as server-side method dispatching is handled directly by the RMI runtime. Statically generated stubs are unnecessary, as stubs are generated dynamically using Proxy objects. See UnicastRemoteObject for information about dynamic stub generation. Generation of skeletons and static stubs was typically performed as part of an application's build process by calling the rmic tool. This is unnecessary, and calls to rmic can simply be omitted.

Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.rmi.server

Interfaces

  • LoaderHandler
  • RemoteCall
  • RemoteRef
  • RMIClientSocketFactory
  • RMIFailureHandler
  • RMIServerSocketFactory
  • ServerRef
  • Skeleton
  • Unreferenced

Classes

  • LogStream
  • ObjID
  • Operation
  • RemoteObject
  • RemoteObjectInvocationHandler
  • RemoteServer
  • RemoteStub
  • RMIClassLoader
  • RMIClassLoaderSpi
  • RMISocketFactory
  • UID
  • UnicastRemoteObject

Exceptions

  • ExportException
  • ServerCloneException
  • ServerNotActiveException
  • SkeletonMismatchException
  • SkeletonNotFoundException
  • SocketSecurityException


server

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.rmi.server

Provides classes and interfaces for supporting the server side of RMI.

See: Description

  • Interface Summary
    Interface Description
    LoaderHandler Deprecated
    no replacement
    RemoteCall Deprecated
    no replacement.
    RemoteRef
    RemoteRef represents the handle for a remote object.
    RMIClientSocketFactory
    An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
    RMIFailureHandler
    An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call.
    RMIServerSocketFactory
    An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
    ServerRef Deprecated
    No replacement.
    Skeleton Deprecated
    no replacement.
    Unreferenced
    A remote object implementation should implement the Unreferenced interface to receive notification when there are no more clients that reference that remote object.
  • Class Summary
    Class Description
    LogStream Deprecated
    no replacement
    ObjID
    An ObjID is used to identify a remote object exported to an RMI runtime.
    Operation Deprecated
    no replacement
    RemoteObject
    The RemoteObject class implements the java.lang.Object behavior for remote objects.
    RemoteObjectInvocationHandler
    An implementation of the InvocationHandler interface for use with Java Remote Method Invocation (Java RMI).
    RemoteServer
    The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
    RemoteStub Deprecated
    Statically generated stubs are deprecated, since stubs are generated dynamically.
    RMIClassLoader
    RMIClassLoader comprises static methods to support dynamic class loading with RMI.
    RMIClassLoaderSpi
    RMIClassLoaderSpi is the service provider interface for RMIClassLoader.
    RMISocketFactory
    An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
    UID
    A UID represents an identifier that is unique over time with respect to the host it is generated on, or one of 216 "well-known" identifiers.
    UnicastRemoteObject
    Used for exporting a remote object with JRMP and obtaining a stub that communicates to the remote object.
  • Exception Summary
    Exception Description
    ExportException
    An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
    ServerCloneException
    A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
    ServerNotActiveException
    An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
    SkeletonMismatchException Deprecated
    no replacement.
    SkeletonNotFoundException Deprecated
    no replacement.
    SocketSecurityException Deprecated
    This class is obsolete.

Package java.rmi.server Description

Provides classes and interfaces for supporting the server side of RMI. A group of classes are used by the stubs and skeletons generated by the rmic stub compiler. Another group of classes implements the RMI Transport protocol and HTTP tunneling.

Deprecated: HTTP Tunneling. The HTTP tunneling mechanism has been deprecated. See RMISocketFactory for further information.

Deprecated: Skeletons and Static Stubs. Skeletons and statically generated stubs are deprecated. This includes the APIs in this package that require the use of skeletons or static stubs, the runtime support for them, and the use of the rmic stub compiler to generate them. Support for skeletons and static stubs may be removed in a future release of the platform. Skeletons are unnecessary, as server-side method dispatching is handled directly by the RMI runtime. Statically generated stubs are unnecessary, as stubs are generated dynamically using Proxy objects. See UnicastRemoteObject for information about dynamic stub generation. Generation of skeletons and static stubs was typically performed as part of an application's build process by calling the rmic tool. This is unnecessary, and calls to rmic can simply be omitted.

Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.rmi.server

Interfaces

  • LoaderHandler
  • RemoteCall
  • RemoteRef
  • RMIClientSocketFactory
  • RMIFailureHandler
  • RMIServerSocketFactory
  • ServerRef
  • Skeleton
  • Unreferenced

Classes

  • LogStream
  • ObjID
  • Operation
  • RemoteObject
  • RemoteObjectInvocationHandler
  • RemoteServer
  • RemoteStub
  • RMIClassLoader
  • RMIClassLoaderSpi
  • RMISocketFactory
  • UID
  • UnicastRemoteObject

Exceptions

  • ExportException
  • ServerCloneException
  • ServerNotActiveException
  • SkeletonMismatchException
  • SkeletonNotFoundException
  • SocketSecurityException


compact1 - java.security

Interfaces

  • AlgorithmConstraints
  • Certificate
  • DomainCombiner
  • Guard
  • Key
  • KeyStore.Entry
  • KeyStore.Entry.Attribute
  • KeyStore.LoadStoreParameter
  • KeyStore.ProtectionParameter
  • Policy.Parameters
  • Principal
  • PrivateKey
  • PrivilegedAction
  • PrivilegedExceptionAction
  • PublicKey

Classes

  • AccessControlContext
  • AccessController
  • AlgorithmParameterGenerator
  • AlgorithmParameterGeneratorSpi
  • AlgorithmParameters
  • AlgorithmParametersSpi
  • AllPermission
  • AuthProvider
  • BasicPermission
  • CodeSigner
  • CodeSource
  • DigestInputStream
  • DigestOutputStream
  • DomainLoadStoreParameter
  • GuardedObject
  • Identity
  • IdentityScope
  • KeyFactory
  • KeyFactorySpi
  • KeyPair
  • KeyPairGenerator
  • KeyPairGeneratorSpi
  • KeyRep
  • KeyStore
  • KeyStore.Builder
  • KeyStore.CallbackHandlerProtection
  • KeyStore.PasswordProtection
  • KeyStore.PrivateKeyEntry
  • KeyStore.SecretKeyEntry
  • KeyStore.TrustedCertificateEntry
  • KeyStoreSpi
  • MessageDigest
  • MessageDigestSpi
  • Permission
  • PermissionCollection
  • Permissions
  • PKCS12Attribute
  • Policy
  • PolicySpi
  • ProtectionDomain
  • Provider
  • Provider.Service
  • SecureClassLoader
  • SecureRandom
  • SecureRandomSpi
  • Security
  • SecurityPermission
  • Signature
  • SignatureSpi
  • SignedObject
  • Signer
  • Timestamp
  • UnresolvedPermission
  • URIParameter

Enums

  • CryptoPrimitive
  • KeyRep.Type

Exceptions

  • AccessControlException
  • DigestException
  • GeneralSecurityException
  • InvalidAlgorithmParameterException
  • InvalidKeyException
  • InvalidParameterException
  • KeyException
  • KeyManagementException
  • KeyStoreException
  • NoSuchAlgorithmException
  • NoSuchProviderException
  • PrivilegedActionException
  • ProviderException
  • SignatureException
  • UnrecoverableEntryException
  • UnrecoverableKeyException


security

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.security

Provides the classes and interfaces for the security framework.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmConstraints
    This interface specifies constraints for cryptographic algorithms, keys (key sizes), and other algorithm parameters.
    Certificate Deprecated
    A new certificate handling package is created in the Java platform.
    DomainCombiner
    A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
    Guard
    This interface represents a guard, which is an object that is used to protect access to another object.
    Key
    The Key interface is the top-level interface for all keys.
    KeyStore.Entry
    A marker interface for KeyStore entry types.
    KeyStore.Entry.Attribute
    An attribute associated with a keystore entry.
    KeyStore.LoadStoreParameter
    A marker interface for KeyStore load and store parameters.
    KeyStore.ProtectionParameter
    A marker interface for keystore protection parameters.
    Policy.Parameters
    This represents a marker interface for Policy parameters.
    Principal
    This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
    PrivateKey
    A private key.
    PrivilegedAction<T>
    A computation to be performed with privileges enabled.
    PrivilegedExceptionAction<T>
    A computation to be performed with privileges enabled, that throws one or more checked exceptions.
    PublicKey
    A public key.
  • Class Summary
    Class Description
    AccessControlContext
    An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
    AccessController
    The AccessController class is used for access control operations and decisions.
    AlgorithmParameterGenerator
    The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameterGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameters
    This class is used as an opaque representation of cryptographic parameters.
    AlgorithmParametersSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
    AllPermission
    The AllPermission is a permission that implies all other permissions.
    AuthProvider
    This class defines login and logout methods for a provider.
    BasicPermission
    The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
    CodeSigner
    This class encapsulates information about a code signer.
    CodeSource
    This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.
    DigestInputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DigestOutputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DomainLoadStoreParameter
    Configuration data that specifies the keystores in a keystore domain.
    GuardedObject
    A GuardedObject is an object that is used to protect access to another object.
    Identity Deprecated
    This class is no longer used.
    IdentityScope Deprecated
    This class is no longer used.
    KeyFactory
    Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
    KeyFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyFactory class.
    KeyPair
    This class is a simple holder for a key pair (a public key and a private key).
    KeyPairGenerator
    The KeyPairGenerator class is used to generate pairs of public and private keys.
    KeyPairGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
    KeyRep
    Standardized representation for serialized Key objects.
    KeyStore
    This class represents a storage facility for cryptographic keys and certificates.
    KeyStore.Builder
    A description of a to-be-instantiated KeyStore object.
    KeyStore.CallbackHandlerProtection
    A ProtectionParameter encapsulating a CallbackHandler.
    KeyStore.PasswordProtection
    A password-based implementation of ProtectionParameter.
    KeyStore.PrivateKeyEntry
    A KeyStore entry that holds a PrivateKey and corresponding certificate chain.
    KeyStore.SecretKeyEntry
    A KeyStore entry that holds a SecretKey.
    KeyStore.TrustedCertificateEntry
    A KeyStore entry that holds a trusted Certificate.
    KeyStoreSpi
    This class defines the Service Provider Interface (SPI) for the KeyStore class.
    MessageDigest
    This MessageDigest class provides applications the functionality of a message digest algorithm, such as SHA-1 or SHA-256.
    MessageDigestSpi
    This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
    Permission
    Abstract class for representing access to a system resource.
    PermissionCollection
    Abstract class representing a collection of Permission objects.
    Permissions
    This class represents a heterogeneous collection of Permissions.
    PKCS12Attribute
    An attribute associated with a PKCS12 keystore entry.
    Policy
    A Policy object is responsible for determining whether code executing in the Java runtime environment has permission to perform a security-sensitive operation.
    PolicySpi
    This class defines the Service Provider Interface (SPI) for the Policy class.
    ProtectionDomain
    This ProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.
    Provider
    This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
    Provider.Service
    The description of a security service.
    SecureClassLoader
    This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
    SecureRandom
    This class provides a cryptographically strong random number generator (RNG).
    SecureRandomSpi
    This class defines the Service Provider Interface (SPI) for the SecureRandom class.
    Security
    This class centralizes all security properties and common security methods.
    SecurityPermission
    This class is for security permissions.
    Signature
    The Signature class is used to provide applications the functionality of a digital signature algorithm.
    SignatureSpi
    This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
    SignedObject
    SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
    Signer Deprecated
    This class is no longer used.
    Timestamp
    This class encapsulates information about a signed timestamp.
    UnresolvedPermission
    The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
    URIParameter
    A parameter that contains a URI pointing to data intended for a PolicySpi or ConfigurationSpi implementation.
  • Enum Summary
    Enum Description
    CryptoPrimitive
    An enumeration of cryptographic primitives.
    KeyRep.Type
    Key type.
  • Exception Summary
    Exception Description
    AccessControlException
    This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
    DigestException
    This is the generic Message Digest exception.
    GeneralSecurityException
    The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
    InvalidAlgorithmParameterException
    This is the exception for invalid or inappropriate algorithm parameters.
    InvalidKeyException
    This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
    InvalidParameterException
    This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
    KeyException
    This is the basic key exception.
    KeyManagementException
    This is the general key management exception for all operations dealing with key management.
    KeyStoreException
    This is the generic KeyStore exception.
    NoSuchAlgorithmException
    This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
    NoSuchProviderException
    This exception is thrown when a particular security provider is requested but is not available in the environment.
    PrivilegedActionException
    This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
    ProviderException
    A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
    SignatureException
    This is the generic Signature exception.
    UnrecoverableEntryException
    This exception is thrown if an entry in the keystore cannot be recovered.
    UnrecoverableKeyException
    This exception is thrown if a key in the keystore cannot be recovered.

Package java.security Description

Provides the classes and interfaces for the security framework. This includes classes that implement an easily configurable, fine-grained access control security architecture. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For further documentation, please see:
  • Java™ SE Platform Security Architecture
  • How to Implement a Provider in the Java™ Cryptography Architecture
  • Default Policy Implementation and Policy File Syntax
  • Permissions in the Java™ SE Development Kit (JDK)
  • Summary of Tools for Java™ Platform Security
  • keytool ( for Solaris/Linux) ( for Windows)
  • jarsigner ( for Solaris/Linux) ( for Windows)
Since:
1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.security

Interfaces

  • AlgorithmConstraints
  • Certificate
  • DomainCombiner
  • Guard
  • Key
  • KeyStore.Entry
  • KeyStore.Entry.Attribute
  • KeyStore.LoadStoreParameter
  • KeyStore.ProtectionParameter
  • Policy.Parameters
  • Principal
  • PrivateKey
  • PrivilegedAction
  • PrivilegedExceptionAction
  • PublicKey

Classes

  • AccessControlContext
  • AccessController
  • AlgorithmParameterGenerator
  • AlgorithmParameterGeneratorSpi
  • AlgorithmParameters
  • AlgorithmParametersSpi
  • AllPermission
  • AuthProvider
  • BasicPermission
  • CodeSigner
  • CodeSource
  • DigestInputStream
  • DigestOutputStream
  • DomainLoadStoreParameter
  • GuardedObject
  • Identity
  • IdentityScope
  • KeyFactory
  • KeyFactorySpi
  • KeyPair
  • KeyPairGenerator
  • KeyPairGeneratorSpi
  • KeyRep
  • KeyStore
  • KeyStore.Builder
  • KeyStore.CallbackHandlerProtection
  • KeyStore.PasswordProtection
  • KeyStore.PrivateKeyEntry
  • KeyStore.SecretKeyEntry
  • KeyStore.TrustedCertificateEntry
  • KeyStoreSpi
  • MessageDigest
  • MessageDigestSpi
  • Permission
  • PermissionCollection
  • Permissions
  • PKCS12Attribute
  • Policy
  • PolicySpi
  • ProtectionDomain
  • Provider
  • Provider.Service
  • SecureClassLoader
  • SecureRandom
  • SecureRandomSpi
  • Security
  • SecurityPermission
  • Signature
  • SignatureSpi
  • SignedObject
  • Signer
  • Timestamp
  • UnresolvedPermission
  • URIParameter

Enums

  • CryptoPrimitive
  • KeyRep.Type

Exceptions

  • AccessControlException
  • DigestException
  • GeneralSecurityException
  • InvalidAlgorithmParameterException
  • InvalidKeyException
  • InvalidParameterException
  • KeyException
  • KeyManagementException
  • KeyStoreException
  • NoSuchAlgorithmException
  • NoSuchProviderException
  • PrivilegedActionException
  • ProviderException
  • SignatureException
  • UnrecoverableEntryException
  • UnrecoverableKeyException


security

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.security

Provides the classes and interfaces for the security framework.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmConstraints
    This interface specifies constraints for cryptographic algorithms, keys (key sizes), and other algorithm parameters.
    Certificate Deprecated
    A new certificate handling package is created in the Java platform.
    DomainCombiner
    A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
    Guard
    This interface represents a guard, which is an object that is used to protect access to another object.
    Key
    The Key interface is the top-level interface for all keys.
    KeyStore.Entry
    A marker interface for KeyStore entry types.
    KeyStore.Entry.Attribute
    An attribute associated with a keystore entry.
    KeyStore.LoadStoreParameter
    A marker interface for KeyStore load and store parameters.
    KeyStore.ProtectionParameter
    A marker interface for keystore protection parameters.
    Policy.Parameters
    This represents a marker interface for Policy parameters.
    Principal
    This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
    PrivateKey
    A private key.
    PrivilegedAction<T>
    A computation to be performed with privileges enabled.
    PrivilegedExceptionAction<T>
    A computation to be performed with privileges enabled, that throws one or more checked exceptions.
    PublicKey
    A public key.
  • Class Summary
    Class Description
    AccessControlContext
    An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
    AccessController
    The AccessController class is used for access control operations and decisions.
    AlgorithmParameterGenerator
    The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameterGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameters
    This class is used as an opaque representation of cryptographic parameters.
    AlgorithmParametersSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
    AllPermission
    The AllPermission is a permission that implies all other permissions.
    AuthProvider
    This class defines login and logout methods for a provider.
    BasicPermission
    The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
    CodeSigner
    This class encapsulates information about a code signer.
    CodeSource
    This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.
    DigestInputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DigestOutputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DomainLoadStoreParameter
    Configuration data that specifies the keystores in a keystore domain.
    GuardedObject
    A GuardedObject is an object that is used to protect access to another object.
    Identity Deprecated
    This class is no longer used.
    IdentityScope Deprecated
    This class is no longer used.
    KeyFactory
    Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
    KeyFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyFactory class.
    KeyPair
    This class is a simple holder for a key pair (a public key and a private key).
    KeyPairGenerator
    The KeyPairGenerator class is used to generate pairs of public and private keys.
    KeyPairGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
    KeyRep
    Standardized representation for serialized Key objects.
    KeyStore
    This class represents a storage facility for cryptographic keys and certificates.
    KeyStore.Builder
    A description of a to-be-instantiated KeyStore object.
    KeyStore.CallbackHandlerProtection
    A ProtectionParameter encapsulating a CallbackHandler.
    KeyStore.PasswordProtection
    A password-based implementation of ProtectionParameter.
    KeyStore.PrivateKeyEntry
    A KeyStore entry that holds a PrivateKey and corresponding certificate chain.
    KeyStore.SecretKeyEntry
    A KeyStore entry that holds a SecretKey.
    KeyStore.TrustedCertificateEntry
    A KeyStore entry that holds a trusted Certificate.
    KeyStoreSpi
    This class defines the Service Provider Interface (SPI) for the KeyStore class.
    MessageDigest
    This MessageDigest class provides applications the functionality of a message digest algorithm, such as SHA-1 or SHA-256.
    MessageDigestSpi
    This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
    Permission
    Abstract class for representing access to a system resource.
    PermissionCollection
    Abstract class representing a collection of Permission objects.
    Permissions
    This class represents a heterogeneous collection of Permissions.
    PKCS12Attribute
    An attribute associated with a PKCS12 keystore entry.
    Policy
    A Policy object is responsible for determining whether code executing in the Java runtime environment has permission to perform a security-sensitive operation.
    PolicySpi
    This class defines the Service Provider Interface (SPI) for the Policy class.
    ProtectionDomain
    This ProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.
    Provider
    This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
    Provider.Service
    The description of a security service.
    SecureClassLoader
    This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
    SecureRandom
    This class provides a cryptographically strong random number generator (RNG).
    SecureRandomSpi
    This class defines the Service Provider Interface (SPI) for the SecureRandom class.
    Security
    This class centralizes all security properties and common security methods.
    SecurityPermission
    This class is for security permissions.
    Signature
    The Signature class is used to provide applications the functionality of a digital signature algorithm.
    SignatureSpi
    This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
    SignedObject
    SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
    Signer Deprecated
    This class is no longer used.
    Timestamp
    This class encapsulates information about a signed timestamp.
    UnresolvedPermission
    The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
    URIParameter
    A parameter that contains a URI pointing to data intended for a PolicySpi or ConfigurationSpi implementation.
  • Enum Summary
    Enum Description
    CryptoPrimitive
    An enumeration of cryptographic primitives.
    KeyRep.Type
    Key type.
  • Exception Summary
    Exception Description
    AccessControlException
    This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
    DigestException
    This is the generic Message Digest exception.
    GeneralSecurityException
    The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
    InvalidAlgorithmParameterException
    This is the exception for invalid or inappropriate algorithm parameters.
    InvalidKeyException
    This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
    InvalidParameterException
    This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
    KeyException
    This is the basic key exception.
    KeyManagementException
    This is the general key management exception for all operations dealing with key management.
    KeyStoreException
    This is the generic KeyStore exception.
    NoSuchAlgorithmException
    This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
    NoSuchProviderException
    This exception is thrown when a particular security provider is requested but is not available in the environment.
    PrivilegedActionException
    This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
    ProviderException
    A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
    SignatureException
    This is the generic Signature exception.
    UnrecoverableEntryException
    This exception is thrown if an entry in the keystore cannot be recovered.
    UnrecoverableKeyException
    This exception is thrown if a key in the keystore cannot be recovered.

Package java.security Description

Provides the classes and interfaces for the security framework. This includes classes that implement an easily configurable, fine-grained access control security architecture. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For further documentation, please see:
  • Java™ SE Platform Security Architecture
  • How to Implement a Provider in the Java™ Cryptography Architecture
  • Default Policy Implementation and Policy File Syntax
  • Permissions in the Java™ SE Development Kit (JDK)
  • Summary of Tools for Java™ Platform Security
  • keytool ( for Solaris/Linux) ( for Windows)
  • jarsigner ( for Solaris/Linux) ( for Windows)
Since:
1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.security

Interfaces

  • AlgorithmConstraints
  • Certificate
  • DomainCombiner
  • Guard
  • Key
  • KeyStore.Entry
  • KeyStore.Entry.Attribute
  • KeyStore.LoadStoreParameter
  • KeyStore.ProtectionParameter
  • Policy.Parameters
  • Principal
  • PrivateKey
  • PrivilegedAction
  • PrivilegedExceptionAction
  • PublicKey

Classes

  • AccessControlContext
  • AccessController
  • AlgorithmParameterGenerator
  • AlgorithmParameterGeneratorSpi
  • AlgorithmParameters
  • AlgorithmParametersSpi
  • AllPermission
  • AuthProvider
  • BasicPermission
  • CodeSigner
  • CodeSource
  • DigestInputStream
  • DigestOutputStream
  • DomainLoadStoreParameter
  • GuardedObject
  • Identity
  • IdentityScope
  • KeyFactory
  • KeyFactorySpi
  • KeyPair
  • KeyPairGenerator
  • KeyPairGeneratorSpi
  • KeyRep
  • KeyStore
  • KeyStore.Builder
  • KeyStore.CallbackHandlerProtection
  • KeyStore.PasswordProtection
  • KeyStore.PrivateKeyEntry
  • KeyStore.SecretKeyEntry
  • KeyStore.TrustedCertificateEntry
  • KeyStoreSpi
  • MessageDigest
  • MessageDigestSpi
  • Permission
  • PermissionCollection
  • Permissions
  • PKCS12Attribute
  • Policy
  • PolicySpi
  • ProtectionDomain
  • Provider
  • Provider.Service
  • SecureClassLoader
  • SecureRandom
  • SecureRandomSpi
  • Security
  • SecurityPermission
  • Signature
  • SignatureSpi
  • SignedObject
  • Signer
  • Timestamp
  • UnresolvedPermission
  • URIParameter

Enums

  • CryptoPrimitive
  • KeyRep.Type

Exceptions

  • AccessControlException
  • DigestException
  • GeneralSecurityException
  • InvalidAlgorithmParameterException
  • InvalidKeyException
  • InvalidParameterException
  • KeyException
  • KeyManagementException
  • KeyStoreException
  • NoSuchAlgorithmException
  • NoSuchProviderException
  • PrivilegedActionException
  • ProviderException
  • SignatureException
  • UnrecoverableEntryException
  • UnrecoverableKeyException


security

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.security

Provides the classes and interfaces for the security framework.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmConstraints
    This interface specifies constraints for cryptographic algorithms, keys (key sizes), and other algorithm parameters.
    Certificate Deprecated
    A new certificate handling package is created in the Java platform.
    DomainCombiner
    A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
    Guard
    This interface represents a guard, which is an object that is used to protect access to another object.
    Key
    The Key interface is the top-level interface for all keys.
    KeyStore.Entry
    A marker interface for KeyStore entry types.
    KeyStore.Entry.Attribute
    An attribute associated with a keystore entry.
    KeyStore.LoadStoreParameter
    A marker interface for KeyStore load and store parameters.
    KeyStore.ProtectionParameter
    A marker interface for keystore protection parameters.
    Policy.Parameters
    This represents a marker interface for Policy parameters.
    Principal
    This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
    PrivateKey
    A private key.
    PrivilegedAction<T>
    A computation to be performed with privileges enabled.
    PrivilegedExceptionAction<T>
    A computation to be performed with privileges enabled, that throws one or more checked exceptions.
    PublicKey
    A public key.
  • Class Summary
    Class Description
    AccessControlContext
    An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
    AccessController
    The AccessController class is used for access control operations and decisions.
    AlgorithmParameterGenerator
    The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameterGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
    AlgorithmParameters
    This class is used as an opaque representation of cryptographic parameters.
    AlgorithmParametersSpi
    This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
    AllPermission
    The AllPermission is a permission that implies all other permissions.
    AuthProvider
    This class defines login and logout methods for a provider.
    BasicPermission
    The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
    CodeSigner
    This class encapsulates information about a code signer.
    CodeSource
    This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.
    DigestInputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DigestOutputStream
    A transparent stream that updates the associated message digest using the bits going through the stream.
    DomainLoadStoreParameter
    Configuration data that specifies the keystores in a keystore domain.
    GuardedObject
    A GuardedObject is an object that is used to protect access to another object.
    Identity Deprecated
    This class is no longer used.
    IdentityScope Deprecated
    This class is no longer used.
    KeyFactory
    Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
    KeyFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyFactory class.
    KeyPair
    This class is a simple holder for a key pair (a public key and a private key).
    KeyPairGenerator
    The KeyPairGenerator class is used to generate pairs of public and private keys.
    KeyPairGeneratorSpi
    This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
    KeyRep
    Standardized representation for serialized Key objects.
    KeyStore
    This class represents a storage facility for cryptographic keys and certificates.
    KeyStore.Builder
    A description of a to-be-instantiated KeyStore object.
    KeyStore.CallbackHandlerProtection
    A ProtectionParameter encapsulating a CallbackHandler.
    KeyStore.PasswordProtection
    A password-based implementation of ProtectionParameter.
    KeyStore.PrivateKeyEntry
    A KeyStore entry that holds a PrivateKey and corresponding certificate chain.
    KeyStore.SecretKeyEntry
    A KeyStore entry that holds a SecretKey.
    KeyStore.TrustedCertificateEntry
    A KeyStore entry that holds a trusted Certificate.
    KeyStoreSpi
    This class defines the Service Provider Interface (SPI) for the KeyStore class.
    MessageDigest
    This MessageDigest class provides applications the functionality of a message digest algorithm, such as SHA-1 or SHA-256.
    MessageDigestSpi
    This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
    Permission
    Abstract class for representing access to a system resource.
    PermissionCollection
    Abstract class representing a collection of Permission objects.
    Permissions
    This class represents a heterogeneous collection of Permissions.
    PKCS12Attribute
    An attribute associated with a PKCS12 keystore entry.
    Policy
    A Policy object is responsible for determining whether code executing in the Java runtime environment has permission to perform a security-sensitive operation.
    PolicySpi
    This class defines the Service Provider Interface (SPI) for the Policy class.
    ProtectionDomain
    This ProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.
    Provider
    This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
    Provider.Service
    The description of a security service.
    SecureClassLoader
    This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
    SecureRandom
    This class provides a cryptographically strong random number generator (RNG).
    SecureRandomSpi
    This class defines the Service Provider Interface (SPI) for the SecureRandom class.
    Security
    This class centralizes all security properties and common security methods.
    SecurityPermission
    This class is for security permissions.
    Signature
    The Signature class is used to provide applications the functionality of a digital signature algorithm.
    SignatureSpi
    This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
    SignedObject
    SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
    Signer Deprecated
    This class is no longer used.
    Timestamp
    This class encapsulates information about a signed timestamp.
    UnresolvedPermission
    The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
    URIParameter
    A parameter that contains a URI pointing to data intended for a PolicySpi or ConfigurationSpi implementation.
  • Enum Summary
    Enum Description
    CryptoPrimitive
    An enumeration of cryptographic primitives.
    KeyRep.Type
    Key type.
  • Exception Summary
    Exception Description
    AccessControlException
    This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
    DigestException
    This is the generic Message Digest exception.
    GeneralSecurityException
    The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
    InvalidAlgorithmParameterException
    This is the exception for invalid or inappropriate algorithm parameters.
    InvalidKeyException
    This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
    InvalidParameterException
    This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
    KeyException
    This is the basic key exception.
    KeyManagementException
    This is the general key management exception for all operations dealing with key management.
    KeyStoreException
    This is the generic KeyStore exception.
    NoSuchAlgorithmException
    This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
    NoSuchProviderException
    This exception is thrown when a particular security provider is requested but is not available in the environment.
    PrivilegedActionException
    This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
    ProviderException
    A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
    SignatureException
    This is the generic Signature exception.
    UnrecoverableEntryException
    This exception is thrown if an entry in the keystore cannot be recovered.
    UnrecoverableKeyException
    This exception is thrown if a key in the keystore cannot be recovered.

Package java.security Description

Provides the classes and interfaces for the security framework. This includes classes that implement an easily configurable, fine-grained access control security architecture. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For further documentation, please see:
  • Java™ SE Platform Security Architecture
  • How to Implement a Provider in the Java™ Cryptography Architecture
  • Default Policy Implementation and Policy File Syntax
  • Permissions in the Java™ SE Development Kit (JDK)
  • Summary of Tools for Java™ Platform Security
  • keytool ( for Solaris/Linux) ( for Windows)
  • jarsigner ( for Solaris/Linux) ( for Windows)
Since:
1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.security

Interfaces

  • AlgorithmConstraints
  • Certificate
  • DomainCombiner
  • Guard
  • Key
  • KeyStore.Entry
  • KeyStore.Entry.Attribute
  • KeyStore.LoadStoreParameter
  • KeyStore.ProtectionParameter
  • Policy.Parameters
  • Principal
  • PrivateKey
  • PrivilegedAction
  • PrivilegedExceptionAction
  • PublicKey

Classes

  • AccessControlContext
  • AccessController
  • AlgorithmParameterGenerator
  • AlgorithmParameterGeneratorSpi
  • AlgorithmParameters
  • AlgorithmParametersSpi
  • AllPermission
  • AuthProvider
  • BasicPermission
  • CodeSigner
  • CodeSource
  • DigestInputStream
  • DigestOutputStream
  • DomainLoadStoreParameter
  • GuardedObject
  • Identity
  • IdentityScope
  • KeyFactory
  • KeyFactorySpi
  • KeyPair
  • KeyPairGenerator
  • KeyPairGeneratorSpi
  • KeyRep
  • KeyStore
  • KeyStore.Builder
  • KeyStore.CallbackHandlerProtection
  • KeyStore.PasswordProtection
  • KeyStore.PrivateKeyEntry
  • KeyStore.SecretKeyEntry
  • KeyStore.TrustedCertificateEntry
  • KeyStoreSpi
  • MessageDigest
  • MessageDigestSpi
  • Permission
  • PermissionCollection
  • Permissions
  • PKCS12Attribute
  • Policy
  • PolicySpi
  • ProtectionDomain
  • Provider
  • Provider.Service
  • SecureClassLoader
  • SecureRandom
  • SecureRandomSpi
  • Security
  • SecurityPermission
  • Signature
  • SignatureSpi
  • SignedObject
  • Signer
  • Timestamp
  • UnresolvedPermission
  • URIParameter

Enums

  • CryptoPrimitive
  • KeyRep.Type

Exceptions

  • AccessControlException
  • DigestException
  • GeneralSecurityException
  • InvalidAlgorithmParameterException
  • InvalidKeyException
  • InvalidParameterException
  • KeyException
  • KeyManagementException
  • KeyStoreException
  • NoSuchAlgorithmException
  • NoSuchProviderException
  • PrivilegedActionException
  • ProviderException
  • SignatureException
  • UnrecoverableEntryException
  • UnrecoverableKeyException


compact3 - java.security.acl

Interfaces

  • Acl
  • AclEntry
  • Group
  • Owner
  • Permission

Exceptions

  • AclNotFoundException
  • LastOwnerException
  • NotOwnerException


acl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.security.acl

The classes and interfaces in this package have been superseded by classes in the java.security package.

See: Description

  • Interface Summary
    Interface Description
    Acl
    Interface representing an Access Control List (ACL).
    AclEntry
    This is the interface used for representing one entry in an Access Control List (ACL).
    Group
    This interface is used to represent a group of principals.
    Owner
    Interface for managing owners of Access Control Lists (ACLs) or ACL configurations.
    Permission
    This interface represents a permission, such as that used to grant a particular type of access to a resource.
  • Exception Summary
    Exception Description
    AclNotFoundException
    This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
    LastOwnerException
    This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
    NotOwnerException
    This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Package java.security.acl Description

The classes and interfaces in this package have been superseded by classes in the java.security package. See that package and, for example, java.security.Permission for details.
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.security.acl

Interfaces

  • Acl
  • AclEntry
  • Group
  • Owner
  • Permission

Exceptions

  • AclNotFoundException
  • LastOwnerException
  • NotOwnerException


compact1 - java.security.cert

Interfaces

  • CertPathBuilderResult
  • CertPathChecker
  • CertPathParameters
  • CertPathValidatorException.Reason
  • CertPathValidatorResult
  • CertSelector
  • CertStoreParameters
  • CRLSelector
  • Extension
  • PolicyNode
  • X509Extension

Classes

  • Certificate
  • Certificate.CertificateRep
  • CertificateFactory
  • CertificateFactorySpi
  • CertPath
  • CertPath.CertPathRep
  • CertPathBuilder
  • CertPathBuilderSpi
  • CertPathValidator
  • CertPathValidatorSpi
  • CertStore
  • CertStoreSpi
  • CollectionCertStoreParameters
  • CRL
  • LDAPCertStoreParameters
  • PKIXBuilderParameters
  • PKIXCertPathBuilderResult
  • PKIXCertPathChecker
  • PKIXCertPathValidatorResult
  • PKIXParameters
  • PKIXRevocationChecker
  • PolicyQualifierInfo
  • TrustAnchor
  • X509Certificate
  • X509CertSelector
  • X509CRL
  • X509CRLEntry
  • X509CRLSelector

Enums

  • CertPathValidatorException.BasicReason
  • CRLReason
  • PKIXReason
  • PKIXRevocationChecker.Option

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException
  • CertificateRevokedException
  • CertPathBuilderException
  • CertPathValidatorException
  • CertStoreException
  • CRLException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.security.cert

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.

See: Description

  • Interface Summary
    Interface Description
    CertPathBuilderResult
    A specification of the result of a certification path builder algorithm.
    CertPathChecker
    Performs one or more checks on each Certificate of a CertPath.
    CertPathParameters
    A specification of certification path algorithm parameters.
    CertPathValidatorException.Reason
    The reason the validation algorithm failed.
    CertPathValidatorResult
    A specification of the result of a certification path validator algorithm.
    CertSelector
    A selector that defines a set of criteria for selecting Certificates.
    CertStoreParameters
    A specification of CertStore parameters.
    CRLSelector
    A selector that defines a set of criteria for selecting CRLs.
    Extension
    This interface represents an X.509 extension.
    PolicyNode
    An immutable valid policy tree node as defined by the PKIX certification path validation algorithm.
    X509Extension
    Interface for an X.509 extension.
  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    Certificate.CertificateRep
    Alternate Certificate class for serialization.
    CertificateFactory
    This class defines the functionality of a certificate factory, which is used to generate certificate, certification path (CertPath) and certificate revocation list (CRL) objects from their encodings.
    CertificateFactorySpi
    This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
    CertPath
    An immutable sequence of certificates (a certification path).
    CertPath.CertPathRep
    Alternate CertPath class for serialization.
    CertPathBuilder
    A class for building certification paths (also known as certificate chains).
    CertPathBuilderSpi
    The Service Provider Interface (SPI) for the CertPathBuilder class.
    CertPathValidator
    A class for validating certification paths (also known as certificate chains).
    CertPathValidatorSpi
    The Service Provider Interface (SPI) for the CertPathValidator class.
    CertStore
    A class for retrieving Certificates and CRLs from a repository.
    CertStoreSpi
    The Service Provider Interface (SPI) for the CertStore class.
    CollectionCertStoreParameters
    Parameters used as input for the Collection CertStore algorithm.
    CRL
    This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
    LDAPCertStoreParameters
    Parameters used as input for the LDAP CertStore algorithm.
    PKIXBuilderParameters
    Parameters used as input for the PKIX CertPathBuilder algorithm.
    PKIXCertPathBuilderResult
    This class represents the successful result of the PKIX certification path builder algorithm.
    PKIXCertPathChecker
    An abstract class that performs one or more checks on an X509Certificate.
    PKIXCertPathValidatorResult
    This class represents the successful result of the PKIX certification path validation algorithm.
    PKIXParameters
    Parameters used as input for the PKIX CertPathValidator algorithm.
    PKIXRevocationChecker
    A PKIXCertPathChecker for checking the revocation status of certificates with the PKIX algorithm.
    PolicyQualifierInfo
    An immutable policy qualifier represented by the ASN.1 PolicyQualifierInfo structure.
    TrustAnchor
    A trust anchor or most-trusted Certification Authority (CA).
    X509Certificate
    Abstract class for X.509 certificates.
    X509CertSelector
    A CertSelector that selects X509Certificates that match all specified criteria.
    X509CRL
    Abstract class for an X.509 Certificate Revocation List (CRL).
    X509CRLEntry
    Abstract class for a revoked certificate in a CRL (Certificate Revocation List).
    X509CRLSelector
    A CRLSelector that selects X509CRLs that match all specified criteria.
  • Enum Summary
    Enum Description
    CertPathValidatorException.BasicReason
    The BasicReason enumerates the potential reasons that a certification path of any type may be invalid.
    CRLReason
    The CRLReason enumeration specifies the reason that a certificate is revoked, as defined in RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile.
    PKIXReason
    The PKIXReason enumerates the potential PKIX-specific reasons that an X.509 certification path may be invalid according to the PKIX (RFC 3280) standard.
    PKIXRevocationChecker.Option
    Various revocation options that can be specified for the revocation checking mechanism.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.
    CertificateRevokedException
    An exception that indicates an X.509 certificate is revoked.
    CertPathBuilderException
    An exception indicating one of a variety of problems encountered when building a certification path with a CertPathBuilder.
    CertPathValidatorException
    An exception indicating one of a variety of problems encountered when validating a certification path.
    CertStoreException
    An exception indicating one of a variety of problems retrieving certificates and CRLs from a CertStore.
    CRLException
    CRL (Certificate Revocation List) Exception.

Package java.security.cert Description

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths. It contains support for X.509 v3 certificates and X.509 v2 CRLs.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For information about X.509 certificates and CRLs, please see:
  • http://www.ietf.org/rfc/rfc5280.txt
  • Java™ PKI Programmer's Guide
  • X.509 Certificates and Certificate Revocation Lists (CRLs)
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.security.cert

Interfaces

  • CertPathBuilderResult
  • CertPathChecker
  • CertPathParameters
  • CertPathValidatorException.Reason
  • CertPathValidatorResult
  • CertSelector
  • CertStoreParameters
  • CRLSelector
  • Extension
  • PolicyNode
  • X509Extension

Classes

  • Certificate
  • Certificate.CertificateRep
  • CertificateFactory
  • CertificateFactorySpi
  • CertPath
  • CertPath.CertPathRep
  • CertPathBuilder
  • CertPathBuilderSpi
  • CertPathValidator
  • CertPathValidatorSpi
  • CertStore
  • CertStoreSpi
  • CollectionCertStoreParameters
  • CRL
  • LDAPCertStoreParameters
  • PKIXBuilderParameters
  • PKIXCertPathBuilderResult
  • PKIXCertPathChecker
  • PKIXCertPathValidatorResult
  • PKIXParameters
  • PKIXRevocationChecker
  • PolicyQualifierInfo
  • TrustAnchor
  • X509Certificate
  • X509CertSelector
  • X509CRL
  • X509CRLEntry
  • X509CRLSelector

Enums

  • CertPathValidatorException.BasicReason
  • CRLReason
  • PKIXReason
  • PKIXRevocationChecker.Option

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException
  • CertificateRevokedException
  • CertPathBuilderException
  • CertPathValidatorException
  • CertStoreException
  • CRLException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.security.cert

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.

See: Description

  • Interface Summary
    Interface Description
    CertPathBuilderResult
    A specification of the result of a certification path builder algorithm.
    CertPathChecker
    Performs one or more checks on each Certificate of a CertPath.
    CertPathParameters
    A specification of certification path algorithm parameters.
    CertPathValidatorException.Reason
    The reason the validation algorithm failed.
    CertPathValidatorResult
    A specification of the result of a certification path validator algorithm.
    CertSelector
    A selector that defines a set of criteria for selecting Certificates.
    CertStoreParameters
    A specification of CertStore parameters.
    CRLSelector
    A selector that defines a set of criteria for selecting CRLs.
    Extension
    This interface represents an X.509 extension.
    PolicyNode
    An immutable valid policy tree node as defined by the PKIX certification path validation algorithm.
    X509Extension
    Interface for an X.509 extension.
  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    Certificate.CertificateRep
    Alternate Certificate class for serialization.
    CertificateFactory
    This class defines the functionality of a certificate factory, which is used to generate certificate, certification path (CertPath) and certificate revocation list (CRL) objects from their encodings.
    CertificateFactorySpi
    This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
    CertPath
    An immutable sequence of certificates (a certification path).
    CertPath.CertPathRep
    Alternate CertPath class for serialization.
    CertPathBuilder
    A class for building certification paths (also known as certificate chains).
    CertPathBuilderSpi
    The Service Provider Interface (SPI) for the CertPathBuilder class.
    CertPathValidator
    A class for validating certification paths (also known as certificate chains).
    CertPathValidatorSpi
    The Service Provider Interface (SPI) for the CertPathValidator class.
    CertStore
    A class for retrieving Certificates and CRLs from a repository.
    CertStoreSpi
    The Service Provider Interface (SPI) for the CertStore class.
    CollectionCertStoreParameters
    Parameters used as input for the Collection CertStore algorithm.
    CRL
    This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
    LDAPCertStoreParameters
    Parameters used as input for the LDAP CertStore algorithm.
    PKIXBuilderParameters
    Parameters used as input for the PKIX CertPathBuilder algorithm.
    PKIXCertPathBuilderResult
    This class represents the successful result of the PKIX certification path builder algorithm.
    PKIXCertPathChecker
    An abstract class that performs one or more checks on an X509Certificate.
    PKIXCertPathValidatorResult
    This class represents the successful result of the PKIX certification path validation algorithm.
    PKIXParameters
    Parameters used as input for the PKIX CertPathValidator algorithm.
    PKIXRevocationChecker
    A PKIXCertPathChecker for checking the revocation status of certificates with the PKIX algorithm.
    PolicyQualifierInfo
    An immutable policy qualifier represented by the ASN.1 PolicyQualifierInfo structure.
    TrustAnchor
    A trust anchor or most-trusted Certification Authority (CA).
    X509Certificate
    Abstract class for X.509 certificates.
    X509CertSelector
    A CertSelector that selects X509Certificates that match all specified criteria.
    X509CRL
    Abstract class for an X.509 Certificate Revocation List (CRL).
    X509CRLEntry
    Abstract class for a revoked certificate in a CRL (Certificate Revocation List).
    X509CRLSelector
    A CRLSelector that selects X509CRLs that match all specified criteria.
  • Enum Summary
    Enum Description
    CertPathValidatorException.BasicReason
    The BasicReason enumerates the potential reasons that a certification path of any type may be invalid.
    CRLReason
    The CRLReason enumeration specifies the reason that a certificate is revoked, as defined in RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile.
    PKIXReason
    The PKIXReason enumerates the potential PKIX-specific reasons that an X.509 certification path may be invalid according to the PKIX (RFC 3280) standard.
    PKIXRevocationChecker.Option
    Various revocation options that can be specified for the revocation checking mechanism.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.
    CertificateRevokedException
    An exception that indicates an X.509 certificate is revoked.
    CertPathBuilderException
    An exception indicating one of a variety of problems encountered when building a certification path with a CertPathBuilder.
    CertPathValidatorException
    An exception indicating one of a variety of problems encountered when validating a certification path.
    CertStoreException
    An exception indicating one of a variety of problems retrieving certificates and CRLs from a CertStore.
    CRLException
    CRL (Certificate Revocation List) Exception.

Package java.security.cert Description

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths. It contains support for X.509 v3 certificates and X.509 v2 CRLs.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For information about X.509 certificates and CRLs, please see:
  • http://www.ietf.org/rfc/rfc5280.txt
  • Java™ PKI Programmer's Guide
  • X.509 Certificates and Certificate Revocation Lists (CRLs)
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.security.cert

Interfaces

  • CertPathBuilderResult
  • CertPathChecker
  • CertPathParameters
  • CertPathValidatorException.Reason
  • CertPathValidatorResult
  • CertSelector
  • CertStoreParameters
  • CRLSelector
  • Extension
  • PolicyNode
  • X509Extension

Classes

  • Certificate
  • Certificate.CertificateRep
  • CertificateFactory
  • CertificateFactorySpi
  • CertPath
  • CertPath.CertPathRep
  • CertPathBuilder
  • CertPathBuilderSpi
  • CertPathValidator
  • CertPathValidatorSpi
  • CertStore
  • CertStoreSpi
  • CollectionCertStoreParameters
  • CRL
  • LDAPCertStoreParameters
  • PKIXBuilderParameters
  • PKIXCertPathBuilderResult
  • PKIXCertPathChecker
  • PKIXCertPathValidatorResult
  • PKIXParameters
  • PKIXRevocationChecker
  • PolicyQualifierInfo
  • TrustAnchor
  • X509Certificate
  • X509CertSelector
  • X509CRL
  • X509CRLEntry
  • X509CRLSelector

Enums

  • CertPathValidatorException.BasicReason
  • CRLReason
  • PKIXReason
  • PKIXRevocationChecker.Option

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException
  • CertificateRevokedException
  • CertPathBuilderException
  • CertPathValidatorException
  • CertStoreException
  • CRLException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.security.cert

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.

See: Description

  • Interface Summary
    Interface Description
    CertPathBuilderResult
    A specification of the result of a certification path builder algorithm.
    CertPathChecker
    Performs one or more checks on each Certificate of a CertPath.
    CertPathParameters
    A specification of certification path algorithm parameters.
    CertPathValidatorException.Reason
    The reason the validation algorithm failed.
    CertPathValidatorResult
    A specification of the result of a certification path validator algorithm.
    CertSelector
    A selector that defines a set of criteria for selecting Certificates.
    CertStoreParameters
    A specification of CertStore parameters.
    CRLSelector
    A selector that defines a set of criteria for selecting CRLs.
    Extension
    This interface represents an X.509 extension.
    PolicyNode
    An immutable valid policy tree node as defined by the PKIX certification path validation algorithm.
    X509Extension
    Interface for an X.509 extension.
  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    Certificate.CertificateRep
    Alternate Certificate class for serialization.
    CertificateFactory
    This class defines the functionality of a certificate factory, which is used to generate certificate, certification path (CertPath) and certificate revocation list (CRL) objects from their encodings.
    CertificateFactorySpi
    This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
    CertPath
    An immutable sequence of certificates (a certification path).
    CertPath.CertPathRep
    Alternate CertPath class for serialization.
    CertPathBuilder
    A class for building certification paths (also known as certificate chains).
    CertPathBuilderSpi
    The Service Provider Interface (SPI) for the CertPathBuilder class.
    CertPathValidator
    A class for validating certification paths (also known as certificate chains).
    CertPathValidatorSpi
    The Service Provider Interface (SPI) for the CertPathValidator class.
    CertStore
    A class for retrieving Certificates and CRLs from a repository.
    CertStoreSpi
    The Service Provider Interface (SPI) for the CertStore class.
    CollectionCertStoreParameters
    Parameters used as input for the Collection CertStore algorithm.
    CRL
    This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
    LDAPCertStoreParameters
    Parameters used as input for the LDAP CertStore algorithm.
    PKIXBuilderParameters
    Parameters used as input for the PKIX CertPathBuilder algorithm.
    PKIXCertPathBuilderResult
    This class represents the successful result of the PKIX certification path builder algorithm.
    PKIXCertPathChecker
    An abstract class that performs one or more checks on an X509Certificate.
    PKIXCertPathValidatorResult
    This class represents the successful result of the PKIX certification path validation algorithm.
    PKIXParameters
    Parameters used as input for the PKIX CertPathValidator algorithm.
    PKIXRevocationChecker
    A PKIXCertPathChecker for checking the revocation status of certificates with the PKIX algorithm.
    PolicyQualifierInfo
    An immutable policy qualifier represented by the ASN.1 PolicyQualifierInfo structure.
    TrustAnchor
    A trust anchor or most-trusted Certification Authority (CA).
    X509Certificate
    Abstract class for X.509 certificates.
    X509CertSelector
    A CertSelector that selects X509Certificates that match all specified criteria.
    X509CRL
    Abstract class for an X.509 Certificate Revocation List (CRL).
    X509CRLEntry
    Abstract class for a revoked certificate in a CRL (Certificate Revocation List).
    X509CRLSelector
    A CRLSelector that selects X509CRLs that match all specified criteria.
  • Enum Summary
    Enum Description
    CertPathValidatorException.BasicReason
    The BasicReason enumerates the potential reasons that a certification path of any type may be invalid.
    CRLReason
    The CRLReason enumeration specifies the reason that a certificate is revoked, as defined in RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile.
    PKIXReason
    The PKIXReason enumerates the potential PKIX-specific reasons that an X.509 certification path may be invalid according to the PKIX (RFC 3280) standard.
    PKIXRevocationChecker.Option
    Various revocation options that can be specified for the revocation checking mechanism.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.
    CertificateRevokedException
    An exception that indicates an X.509 certificate is revoked.
    CertPathBuilderException
    An exception indicating one of a variety of problems encountered when building a certification path with a CertPathBuilder.
    CertPathValidatorException
    An exception indicating one of a variety of problems encountered when validating a certification path.
    CertStoreException
    An exception indicating one of a variety of problems retrieving certificates and CRLs from a CertStore.
    CRLException
    CRL (Certificate Revocation List) Exception.

Package java.security.cert Description

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths. It contains support for X.509 v3 certificates and X.509 v2 CRLs.

Package Specification

  • Java™ Cryptography Architecture (JCA) Reference Guide
  • RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP
  • Java™ Cryptography Architecture Standard Algorithm Name Documentation

Related Documentation

For information about X.509 certificates and CRLs, please see:
  • http://www.ietf.org/rfc/rfc5280.txt
  • Java™ PKI Programmer's Guide
  • X.509 Certificates and Certificate Revocation Lists (CRLs)
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.security.cert

Interfaces

  • CertPathBuilderResult
  • CertPathChecker
  • CertPathParameters
  • CertPathValidatorException.Reason
  • CertPathValidatorResult
  • CertSelector
  • CertStoreParameters
  • CRLSelector
  • Extension
  • PolicyNode
  • X509Extension

Classes

  • Certificate
  • Certificate.CertificateRep
  • CertificateFactory
  • CertificateFactorySpi
  • CertPath
  • CertPath.CertPathRep
  • CertPathBuilder
  • CertPathBuilderSpi
  • CertPathValidator
  • CertPathValidatorSpi
  • CertStore
  • CertStoreSpi
  • CollectionCertStoreParameters
  • CRL
  • LDAPCertStoreParameters
  • PKIXBuilderParameters
  • PKIXCertPathBuilderResult
  • PKIXCertPathChecker
  • PKIXCertPathValidatorResult
  • PKIXParameters
  • PKIXRevocationChecker
  • PolicyQualifierInfo
  • TrustAnchor
  • X509Certificate
  • X509CertSelector
  • X509CRL
  • X509CRLEntry
  • X509CRLSelector

Enums

  • CertPathValidatorException.BasicReason
  • CRLReason
  • PKIXReason
  • PKIXRevocationChecker.Option

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException
  • CertificateRevokedException
  • CertPathBuilderException
  • CertPathValidatorException
  • CertStoreException
  • CRLException


compact1 - java.security.interfaces

Interfaces

  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey
  • ECKey
  • ECPrivateKey
  • ECPublicKey
  • RSAKey
  • RSAMultiPrimePrivateCrtKey
  • RSAPrivateCrtKey
  • RSAPrivateKey
  • RSAPublicKey


interfaces

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.security.interfaces

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

See: Description

  • Interface Summary
    Interface Description
    DSAKey
    The interface to a DSA public or private key.
    DSAKeyPairGenerator
    An interface to an object capable of generating DSA key pairs.
    DSAParams
    Interface to a DSA-specific set of key parameters, which defines a DSA key family.
    DSAPrivateKey
    The standard interface to a DSA private key.
    DSAPublicKey
    The interface to a DSA public key.
    ECKey
    The interface to an elliptic curve (EC) key.
    ECPrivateKey
    The interface to an elliptic curve (EC) private key.
    ECPublicKey
    The interface to an elliptic curve (EC) public key.
    RSAKey
    The interface to an RSA public or private key.
    RSAMultiPrimePrivateCrtKey
    The interface to an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateCrtKey
    The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateKey
    The interface to an RSA private key.
    RSAPublicKey
    The interface to an RSA public key.

Package java.security.interfaces Description

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Note that these interfaces are intended only for key implementations whose key material is accessible and available. These interfaces are not intended for key implementations whose key material resides in inaccessible, protected storage (such as in a hardware device).

For more developer information on how to use these interfaces, including information on how to design Key classes for hardware devices, please refer to these cryptographic provider developer guides:

  • How to Implement a Provider for the Java™ Cryptography Architecture

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For further documentation, please see:
  • Java™ Cryptography Architecture API Specification and Reference
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.security.interfaces

Interfaces

  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey
  • ECKey
  • ECPrivateKey
  • ECPublicKey
  • RSAKey
  • RSAMultiPrimePrivateCrtKey
  • RSAPrivateCrtKey
  • RSAPrivateKey
  • RSAPublicKey


interfaces

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.security.interfaces

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

See: Description

  • Interface Summary
    Interface Description
    DSAKey
    The interface to a DSA public or private key.
    DSAKeyPairGenerator
    An interface to an object capable of generating DSA key pairs.
    DSAParams
    Interface to a DSA-specific set of key parameters, which defines a DSA key family.
    DSAPrivateKey
    The standard interface to a DSA private key.
    DSAPublicKey
    The interface to a DSA public key.
    ECKey
    The interface to an elliptic curve (EC) key.
    ECPrivateKey
    The interface to an elliptic curve (EC) private key.
    ECPublicKey
    The interface to an elliptic curve (EC) public key.
    RSAKey
    The interface to an RSA public or private key.
    RSAMultiPrimePrivateCrtKey
    The interface to an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateCrtKey
    The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateKey
    The interface to an RSA private key.
    RSAPublicKey
    The interface to an RSA public key.

Package java.security.interfaces Description

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Note that these interfaces are intended only for key implementations whose key material is accessible and available. These interfaces are not intended for key implementations whose key material resides in inaccessible, protected storage (such as in a hardware device).

For more developer information on how to use these interfaces, including information on how to design Key classes for hardware devices, please refer to these cryptographic provider developer guides:

  • How to Implement a Provider for the Java™ Cryptography Architecture

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For further documentation, please see:
  • Java™ Cryptography Architecture API Specification and Reference
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.security.interfaces

Interfaces

  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey
  • ECKey
  • ECPrivateKey
  • ECPublicKey
  • RSAKey
  • RSAMultiPrimePrivateCrtKey
  • RSAPrivateCrtKey
  • RSAPrivateKey
  • RSAPublicKey


interfaces

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.security.interfaces

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

See: Description

  • Interface Summary
    Interface Description
    DSAKey
    The interface to a DSA public or private key.
    DSAKeyPairGenerator
    An interface to an object capable of generating DSA key pairs.
    DSAParams
    Interface to a DSA-specific set of key parameters, which defines a DSA key family.
    DSAPrivateKey
    The standard interface to a DSA private key.
    DSAPublicKey
    The interface to a DSA public key.
    ECKey
    The interface to an elliptic curve (EC) key.
    ECPrivateKey
    The interface to an elliptic curve (EC) private key.
    ECPublicKey
    The interface to an elliptic curve (EC) public key.
    RSAKey
    The interface to an RSA public or private key.
    RSAMultiPrimePrivateCrtKey
    The interface to an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateCrtKey
    The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
    RSAPrivateKey
    The interface to an RSA private key.
    RSAPublicKey
    The interface to an RSA public key.

Package java.security.interfaces Description

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Note that these interfaces are intended only for key implementations whose key material is accessible and available. These interfaces are not intended for key implementations whose key material resides in inaccessible, protected storage (such as in a hardware device).

For more developer information on how to use these interfaces, including information on how to design Key classes for hardware devices, please refer to these cryptographic provider developer guides:

  • How to Implement a Provider for the Java™ Cryptography Architecture

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For further documentation, please see:
  • Java™ Cryptography Architecture API Specification and Reference
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.security.interfaces

Interfaces

  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey
  • ECKey
  • ECPrivateKey
  • ECPublicKey
  • RSAKey
  • RSAMultiPrimePrivateCrtKey
  • RSAPrivateCrtKey
  • RSAPrivateKey
  • RSAPublicKey


compact1 - java.security.spec

Interfaces

  • AlgorithmParameterSpec
  • ECField
  • KeySpec

Classes

  • DSAGenParameterSpec
  • DSAParameterSpec
  • DSAPrivateKeySpec
  • DSAPublicKeySpec
  • ECFieldF2m
  • ECFieldFp
  • ECGenParameterSpec
  • ECParameterSpec
  • ECPoint
  • ECPrivateKeySpec
  • ECPublicKeySpec
  • EllipticCurve
  • EncodedKeySpec
  • MGF1ParameterSpec
  • PKCS8EncodedKeySpec
  • PSSParameterSpec
  • RSAKeyGenParameterSpec
  • RSAMultiPrimePrivateCrtKeySpec
  • RSAOtherPrimeInfo
  • RSAPrivateCrtKeySpec
  • RSAPrivateKeySpec
  • RSAPublicKeySpec
  • X509EncodedKeySpec

Exceptions

  • InvalidKeySpecException
  • InvalidParameterSpecException


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.security.spec

Provides classes and interfaces for key specifications and algorithm parameter specifications.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmParameterSpec
    A (transparent) specification of cryptographic parameters.
    ECField
    This interface represents an elliptic curve (EC) finite field.
    KeySpec
    A (transparent) specification of the key material that constitutes a cryptographic key.
  • Class Summary
    Class Description
    DSAGenParameterSpec
    This immutable class specifies the set of parameters used for generating DSA parameters as specified in FIPS 186-3 Digital Signature Standard (DSS).
    DSAParameterSpec
    This class specifies the set of parameters used with the DSA algorithm.
    DSAPrivateKeySpec
    This class specifies a DSA private key with its associated parameters.
    DSAPublicKeySpec
    This class specifies a DSA public key with its associated parameters.
    ECFieldF2m
    This immutable class defines an elliptic curve (EC) characteristic 2 finite field.
    ECFieldFp
    This immutable class defines an elliptic curve (EC) prime finite field.
    ECGenParameterSpec
    This immutable class specifies the set of parameters used for generating elliptic curve (EC) domain parameters.
    ECParameterSpec
    This immutable class specifies the set of domain parameters used with elliptic curve cryptography (ECC).
    ECPoint
    This immutable class represents a point on an elliptic curve (EC) in affine coordinates.
    ECPrivateKeySpec
    This immutable class specifies an elliptic curve private key with its associated parameters.
    ECPublicKeySpec
    This immutable class specifies an elliptic curve public key with its associated parameters.
    EllipticCurve
    This immutable class holds the necessary values needed to represent an elliptic curve.
    EncodedKeySpec
    This class represents a public or private key in encoded format.
    MGF1ParameterSpec
    This class specifies the set of parameters used with mask generation function MGF1 in OAEP Padding and RSA-PSS signature scheme, as defined in the PKCS #1 v2.1 standard.
    PKCS8EncodedKeySpec
    This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo.
    PSSParameterSpec
    This class specifies a parameter spec for RSA-PSS signature scheme, as defined in the PKCS#1 v2.1 standard.
    RSAKeyGenParameterSpec
    This class specifies the set of parameters used to generate an RSA key pair.
    RSAMultiPrimePrivateCrtKeySpec
    This class specifies an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAOtherPrimeInfo
    This class represents the triplet (prime, exponent, and coefficient) inside RSA's OtherPrimeInfo structure, as defined in the PKCS#1 v2.1.
    RSAPrivateCrtKeySpec
    This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAPrivateKeySpec
    This class specifies an RSA private key.
    RSAPublicKeySpec
    This class specifies an RSA public key.
    X509EncodedKeySpec
    This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo.
  • Exception Summary
    Exception Description
    InvalidKeySpecException
    This is the exception for invalid key specifications.
    InvalidParameterSpecException
    This is the exception for invalid parameter specifications.

Package java.security.spec Description

Provides classes and interfaces for key specifications and algorithm parameter specifications.

A key specification is a transparent representation of the key material that constitutes a key. A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). This package contains key specifications for DSA public and private keys, RSA public and private keys, PKCS #8 private keys in DER-encoded format, and X.509 public and private keys in DER-encoded format.

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm. This package contains an algorithm parameter specification for parameters used with the DSA algorithm.

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For documentation that includes information about algorithm parameter and key specifications, please see:
  • Java™ Cryptography Architecture API Specification and Reference
  • How to Implement a Provider for the Java™ Cryptography Architecture
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.security.spec

Interfaces

  • AlgorithmParameterSpec
  • ECField
  • KeySpec

Classes

  • DSAGenParameterSpec
  • DSAParameterSpec
  • DSAPrivateKeySpec
  • DSAPublicKeySpec
  • ECFieldF2m
  • ECFieldFp
  • ECGenParameterSpec
  • ECParameterSpec
  • ECPoint
  • ECPrivateKeySpec
  • ECPublicKeySpec
  • EllipticCurve
  • EncodedKeySpec
  • MGF1ParameterSpec
  • PKCS8EncodedKeySpec
  • PSSParameterSpec
  • RSAKeyGenParameterSpec
  • RSAMultiPrimePrivateCrtKeySpec
  • RSAOtherPrimeInfo
  • RSAPrivateCrtKeySpec
  • RSAPrivateKeySpec
  • RSAPublicKeySpec
  • X509EncodedKeySpec

Exceptions

  • InvalidKeySpecException
  • InvalidParameterSpecException


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.security.spec

Provides classes and interfaces for key specifications and algorithm parameter specifications.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmParameterSpec
    A (transparent) specification of cryptographic parameters.
    ECField
    This interface represents an elliptic curve (EC) finite field.
    KeySpec
    A (transparent) specification of the key material that constitutes a cryptographic key.
  • Class Summary
    Class Description
    DSAGenParameterSpec
    This immutable class specifies the set of parameters used for generating DSA parameters as specified in FIPS 186-3 Digital Signature Standard (DSS).
    DSAParameterSpec
    This class specifies the set of parameters used with the DSA algorithm.
    DSAPrivateKeySpec
    This class specifies a DSA private key with its associated parameters.
    DSAPublicKeySpec
    This class specifies a DSA public key with its associated parameters.
    ECFieldF2m
    This immutable class defines an elliptic curve (EC) characteristic 2 finite field.
    ECFieldFp
    This immutable class defines an elliptic curve (EC) prime finite field.
    ECGenParameterSpec
    This immutable class specifies the set of parameters used for generating elliptic curve (EC) domain parameters.
    ECParameterSpec
    This immutable class specifies the set of domain parameters used with elliptic curve cryptography (ECC).
    ECPoint
    This immutable class represents a point on an elliptic curve (EC) in affine coordinates.
    ECPrivateKeySpec
    This immutable class specifies an elliptic curve private key with its associated parameters.
    ECPublicKeySpec
    This immutable class specifies an elliptic curve public key with its associated parameters.
    EllipticCurve
    This immutable class holds the necessary values needed to represent an elliptic curve.
    EncodedKeySpec
    This class represents a public or private key in encoded format.
    MGF1ParameterSpec
    This class specifies the set of parameters used with mask generation function MGF1 in OAEP Padding and RSA-PSS signature scheme, as defined in the PKCS #1 v2.1 standard.
    PKCS8EncodedKeySpec
    This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo.
    PSSParameterSpec
    This class specifies a parameter spec for RSA-PSS signature scheme, as defined in the PKCS#1 v2.1 standard.
    RSAKeyGenParameterSpec
    This class specifies the set of parameters used to generate an RSA key pair.
    RSAMultiPrimePrivateCrtKeySpec
    This class specifies an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAOtherPrimeInfo
    This class represents the triplet (prime, exponent, and coefficient) inside RSA's OtherPrimeInfo structure, as defined in the PKCS#1 v2.1.
    RSAPrivateCrtKeySpec
    This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAPrivateKeySpec
    This class specifies an RSA private key.
    RSAPublicKeySpec
    This class specifies an RSA public key.
    X509EncodedKeySpec
    This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo.
  • Exception Summary
    Exception Description
    InvalidKeySpecException
    This is the exception for invalid key specifications.
    InvalidParameterSpecException
    This is the exception for invalid parameter specifications.

Package java.security.spec Description

Provides classes and interfaces for key specifications and algorithm parameter specifications.

A key specification is a transparent representation of the key material that constitutes a key. A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). This package contains key specifications for DSA public and private keys, RSA public and private keys, PKCS #8 private keys in DER-encoded format, and X.509 public and private keys in DER-encoded format.

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm. This package contains an algorithm parameter specification for parameters used with the DSA algorithm.

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For documentation that includes information about algorithm parameter and key specifications, please see:
  • Java™ Cryptography Architecture API Specification and Reference
  • How to Implement a Provider for the Java™ Cryptography Architecture
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.security.spec

Interfaces

  • AlgorithmParameterSpec
  • ECField
  • KeySpec

Classes

  • DSAGenParameterSpec
  • DSAParameterSpec
  • DSAPrivateKeySpec
  • DSAPublicKeySpec
  • ECFieldF2m
  • ECFieldFp
  • ECGenParameterSpec
  • ECParameterSpec
  • ECPoint
  • ECPrivateKeySpec
  • ECPublicKeySpec
  • EllipticCurve
  • EncodedKeySpec
  • MGF1ParameterSpec
  • PKCS8EncodedKeySpec
  • PSSParameterSpec
  • RSAKeyGenParameterSpec
  • RSAMultiPrimePrivateCrtKeySpec
  • RSAOtherPrimeInfo
  • RSAPrivateCrtKeySpec
  • RSAPrivateKeySpec
  • RSAPublicKeySpec
  • X509EncodedKeySpec

Exceptions

  • InvalidKeySpecException
  • InvalidParameterSpecException


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.security.spec

Provides classes and interfaces for key specifications and algorithm parameter specifications.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmParameterSpec
    A (transparent) specification of cryptographic parameters.
    ECField
    This interface represents an elliptic curve (EC) finite field.
    KeySpec
    A (transparent) specification of the key material that constitutes a cryptographic key.
  • Class Summary
    Class Description
    DSAGenParameterSpec
    This immutable class specifies the set of parameters used for generating DSA parameters as specified in FIPS 186-3 Digital Signature Standard (DSS).
    DSAParameterSpec
    This class specifies the set of parameters used with the DSA algorithm.
    DSAPrivateKeySpec
    This class specifies a DSA private key with its associated parameters.
    DSAPublicKeySpec
    This class specifies a DSA public key with its associated parameters.
    ECFieldF2m
    This immutable class defines an elliptic curve (EC) characteristic 2 finite field.
    ECFieldFp
    This immutable class defines an elliptic curve (EC) prime finite field.
    ECGenParameterSpec
    This immutable class specifies the set of parameters used for generating elliptic curve (EC) domain parameters.
    ECParameterSpec
    This immutable class specifies the set of domain parameters used with elliptic curve cryptography (ECC).
    ECPoint
    This immutable class represents a point on an elliptic curve (EC) in affine coordinates.
    ECPrivateKeySpec
    This immutable class specifies an elliptic curve private key with its associated parameters.
    ECPublicKeySpec
    This immutable class specifies an elliptic curve public key with its associated parameters.
    EllipticCurve
    This immutable class holds the necessary values needed to represent an elliptic curve.
    EncodedKeySpec
    This class represents a public or private key in encoded format.
    MGF1ParameterSpec
    This class specifies the set of parameters used with mask generation function MGF1 in OAEP Padding and RSA-PSS signature scheme, as defined in the PKCS #1 v2.1 standard.
    PKCS8EncodedKeySpec
    This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo.
    PSSParameterSpec
    This class specifies a parameter spec for RSA-PSS signature scheme, as defined in the PKCS#1 v2.1 standard.
    RSAKeyGenParameterSpec
    This class specifies the set of parameters used to generate an RSA key pair.
    RSAMultiPrimePrivateCrtKeySpec
    This class specifies an RSA multi-prime private key, as defined in the PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAOtherPrimeInfo
    This class represents the triplet (prime, exponent, and coefficient) inside RSA's OtherPrimeInfo structure, as defined in the PKCS#1 v2.1.
    RSAPrivateCrtKeySpec
    This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
    RSAPrivateKeySpec
    This class specifies an RSA private key.
    RSAPublicKeySpec
    This class specifies an RSA public key.
    X509EncodedKeySpec
    This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo.
  • Exception Summary
    Exception Description
    InvalidKeySpecException
    This is the exception for invalid key specifications.
    InvalidParameterSpecException
    This is the exception for invalid parameter specifications.

Package java.security.spec Description

Provides classes and interfaces for key specifications and algorithm parameter specifications.

A key specification is a transparent representation of the key material that constitutes a key. A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). This package contains key specifications for DSA public and private keys, RSA public and private keys, PKCS #8 private keys in DER-encoded format, and X.509 public and private keys in DER-encoded format.

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm. This package contains an algorithm parameter specification for parameters used with the DSA algorithm.

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For documentation that includes information about algorithm parameter and key specifications, please see:
  • Java™ Cryptography Architecture API Specification and Reference
  • How to Implement a Provider for the Java™ Cryptography Architecture
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.security.spec

Interfaces

  • AlgorithmParameterSpec
  • ECField
  • KeySpec

Classes

  • DSAGenParameterSpec
  • DSAParameterSpec
  • DSAPrivateKeySpec
  • DSAPublicKeySpec
  • ECFieldF2m
  • ECFieldFp
  • ECGenParameterSpec
  • ECParameterSpec
  • ECPoint
  • ECPrivateKeySpec
  • ECPublicKeySpec
  • EllipticCurve
  • EncodedKeySpec
  • MGF1ParameterSpec
  • PKCS8EncodedKeySpec
  • PSSParameterSpec
  • RSAKeyGenParameterSpec
  • RSAMultiPrimePrivateCrtKeySpec
  • RSAOtherPrimeInfo
  • RSAPrivateCrtKeySpec
  • RSAPrivateKeySpec
  • RSAPublicKeySpec
  • X509EncodedKeySpec

Exceptions

  • InvalidKeySpecException
  • InvalidParameterSpecException


compact2 - java.sql

Interfaces

  • Array
  • Blob
  • CallableStatement
  • Clob
  • Connection
  • DatabaseMetaData
  • Driver
  • DriverAction
  • NClob
  • ParameterMetaData
  • PreparedStatement
  • Ref
  • ResultSet
  • ResultSetMetaData
  • RowId
  • Savepoint
  • SQLData
  • SQLInput
  • SQLOutput
  • SQLType
  • SQLXML
  • Statement
  • Struct
  • Wrapper

Classes

  • Date
  • DriverManager
  • DriverPropertyInfo
  • SQLPermission
  • Time
  • Timestamp
  • Types

Enums

  • ClientInfoStatus
  • JDBCType
  • PseudoColumnUsage
  • RowIdLifetime

Exceptions

  • BatchUpdateException
  • DataTruncation
  • SQLClientInfoException
  • SQLDataException
  • SQLException
  • SQLFeatureNotSupportedException
  • SQLIntegrityConstraintViolationException
  • SQLInvalidAuthorizationSpecException
  • SQLNonTransientConnectionException
  • SQLNonTransientException
  • SQLRecoverableException
  • SQLSyntaxErrorException
  • SQLTimeoutException
  • SQLTransactionRollbackException
  • SQLTransientConnectionException
  • SQLTransientException
  • SQLWarning


sql

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.sql

Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.

See: Description

  • Interface Summary
    Interface Description
    Array
    The mapping in the Java programming language for the SQL type ARRAY.
    Blob
    The representation (mapping) in the Java™ programming language of an SQL BLOB value.
    CallableStatement
    The interface used to execute SQL stored procedures.
    Clob
    The mapping in the Java™ programming language for the SQL CLOB type.
    Connection
    A connection (session) with a specific database.
    DatabaseMetaData
    Comprehensive information about the database as a whole.
    Driver
    The interface that every driver class must implement.
    DriverAction
    An interface that must be implemented when a Driver wants to be notified by DriverManager.
    NClob
    The mapping in the Java™ programming language for the SQL NCLOB type.
    ParameterMetaData
    An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object.
    PreparedStatement
    An object that represents a precompiled SQL statement.
    Ref
    The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
    ResultSet
    A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
    ResultSetMetaData
    An object that can be used to get information about the types and properties of the columns in a ResultSet object.
    RowId
    The representation (mapping) in the Java programming language of an SQL ROWID value.
    Savepoint
    The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
    SQLData
    The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.
    SQLInput
    An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.
    SQLOutput
    The output stream for writing the attributes of a user-defined type back to the database.
    SQLType
    An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.
    SQLXML
    The mapping in the JavaTM programming language for the SQL XML type.
    Statement
    The object used for executing a static SQL statement and returning the results it produces.
    Struct
    The standard mapping in the Java programming language for an SQL structured type.
    Wrapper
    Interface for JDBC classes which provide the ability to retrieve the delegate instance when the instance in question is in fact a proxy class.
  • Class Summary
    Class Description
    Date
    A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value.
    DriverManager
    The basic service for managing a set of JDBC drivers.
    NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
    DriverPropertyInfo
    Driver properties for making a connection.
    SQLPermission
    The permission for which the SecurityManager will check when code that is running an application with a SecurityManager enabled, calls the DriverManager.deregisterDriver method, DriverManager.setLogWriter method, DriverManager.setLogStream (deprecated) method, SyncFactory.setJNDIContext method, SyncFactory.setLogger method, Connection.setNetworktimeout method, or the Connection.abort method.
    Time
    A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.
    Timestamp
    A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
    Types
    The class that defines the constants that are used to identify generic SQL types, called JDBC types.
  • Enum Summary
    Enum Description
    ClientInfoStatus
    Enumeration for status of the reason that a property could not be set via a call to Connection.setClientInfo
    JDBCType
    Defines the constants that are used to identify generic SQL types, called JDBC types.
    PseudoColumnUsage
    Enumeration for pseudo/hidden column usage.
    RowIdLifetime
    Enumeration for RowId life-time values.
  • Exception Summary
    Exception Description
    BatchUpdateException
    The subclass of SQLException thrown when an error occurs during a batch update operation.
    DataTruncation
    An exception thrown as a DataTruncation exception (on writes) or reported as a DataTruncation warning (on reads) when a data values is unexpectedly truncated for reasons other than its having exceeded MaxFieldSize.
    SQLClientInfoException
    The subclass of SQLException is thrown when one or more client info properties could not be set on a Connection.
    SQLDataException
    The subclass of SQLException thrown when the SQLState class value is '22', or under vendor-specified conditions.
    SQLException
    An exception that provides information on a database access error or other errors.
    SQLFeatureNotSupportedException
    The subclass of SQLException thrown when the SQLState class value is '0A' ( the value is 'zero' A).
    SQLIntegrityConstraintViolationException
    The subclass of SQLException thrown when the SQLState class value is '23', or under vendor-specified conditions.
    SQLInvalidAuthorizationSpecException
    The subclass of SQLException thrown when the SQLState class value is '28', or under vendor-specified conditions.
    SQLNonTransientConnectionException
    The subclass of SQLException thrown for the SQLState class value '08', or under vendor-specified conditions.
    SQLNonTransientException
    The subclass of SQLException thrown when an instance where a retry of the same operation would fail unless the cause of the SQLException is corrected.
    SQLRecoverableException
    The subclass of SQLException thrown in situations where a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch.
    SQLSyntaxErrorException
    The subclass of SQLException thrown when the SQLState class value is '42', or under vendor-specified conditions.
    SQLTimeoutException
    The subclass of SQLException thrown when the timeout specified by Statement.setQueryTimeout, DriverManager.setLoginTimeout, DataSource.setLoginTimeout,XADataSource.setLoginTimeout has expired.
    SQLTransactionRollbackException
    The subclass of SQLException thrown when the SQLState class value is '40', or under vendor-specified conditions.
    SQLTransientConnectionException
    The subclass of SQLException for the SQLState class value '08', or under vendor-specified conditions.
    SQLTransientException
    The subclass of SQLException is thrown in situations where a previously failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality.
    SQLWarning
    An exception that provides information on database access warnings.

Package java.sql Description

Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language. This API includes a framework whereby different drivers can be installed dynamically to access different data sources. Although the JDBCTM API is mainly geared to passing SQL statements to a database, it provides for reading and writing data from any data source with a tabular format. The reader/writer facility, available through the javax.sql.RowSet group of interfaces, can be customized to use and update data from a spread sheet, flat file, or any other tabular data source.

What the JDBCTM 4.2 API Includes

The JDBCTM 4.2 API includes both the java.sql package, referred to as the JDBC core API, and the javax.sql package, referred to as the JDBC Optional Package API. This complete JDBC API is included in the JavaTM Standard Edition (Java SETM), version 7. The javax.sql package extends the functionality of the JDBC API from a client-side API to a server-side API, and it is an essential part of the JavaTM Enterprise Edition (Java EETM) technology.

Versions

The JDBC 4.2 API incorporates all of the previous JDBC API versions:
  • The JDBC 4.1 API
  • The JDBC 4.0 API
  • The JDBC 3.0 API
  • The JDBC 2.1 core API
  • The JDBC 2.0 Optional Package API
    (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package API together are referred to as the JDBC 2.0 API.)
  • The JDBC 1.2 API
  • The JDBC 1.0 API

Classes, interfaces, methods, fields, constructors, and exceptions have the following "since" tags that indicate when they were introduced into the Java platform. When these "since" tags are used in JavadocTM comments for the JDBC API, they indicate the following:

  • Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform, version 8
  • Since 1.7 -- new in the JDBC 4.1 API and part of the Java SE platform, version 7
  • Since 1.6 -- new in the JDBC 4.0 API and part of the Java SE platform, version 6
  • Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform, version 1.4
  • Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform, version 1.2
  • Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of the JDKTM, version 1.1

NOTE: Many of the new features are optional; consequently, there is some variation in drivers and the features they support. Always check your driver's documentation to see whether it supports a feature before you try to use it.

NOTE: The class SQLPermission was added in the JavaTM 2 SDK, Standard Edition, version 1.3 release. This class is used to prevent unauthorized access to the logging stream associated with the DriverManager, which may contain information such as table names, column data, and so on.

What the java.sql Package Contains

The java.sql package contains API for the following:
  • Making a connection with a database via the DriverManager facility
    • DriverManager class -- makes a connection with a driver
    • SQLPermission class -- provides permission when code running within a Security Manager, such as an applet, attempts to set up a logging stream through the DriverManager
    • Driver interface -- provides the API for registering and connecting drivers based on JDBC technology ("JDBC drivers"); generally used only by the DriverManager class
    • DriverPropertyInfo class -- provides properties for a JDBC driver; not used by the general user
  • Sending SQL statements to a database
    • Statement -- used to send basic SQL statements
    • PreparedStatement -- used to send prepared statements or basic SQL statements (derived from Statement)
    • CallableStatement -- used to call database stored procedures (derived from PreparedStatement)
    • Connection interface -- provides methods for creating statements and managing connections and their properties
    • Savepoint -- provides savepoints in a transaction
  • Retrieving and updating the results of a query
    • ResultSet interface
  • Standard mappings for SQL types to classes and interfaces in the Java programming language
    • Array interface -- mapping for SQL ARRAY
    • Blob interface -- mapping for SQL BLOB
    • Clob interface -- mapping for SQL CLOB
    • Date class -- mapping for SQL DATE
    • NClob interface -- mapping for SQL NCLOB
    • Ref interface -- mapping for SQL REF
    • RowId interface -- mapping for SQL ROWID
    • Struct interface -- mapping for SQL STRUCT
    • SQLXML interface -- mapping for SQL XML
    • Time class -- mapping for SQL TIME
    • Timestamp class -- mapping for SQL TIMESTAMP
    • Types class -- provides constants for SQL types
  • Custom mapping an SQL user-defined type (UDT) to a class in the Java programming language
    • SQLData interface -- specifies the mapping of a UDT to an instance of this class
    • SQLInput interface -- provides methods for reading UDT attributes from a stream
    • SQLOutput interface -- provides methods for writing UDT attributes back to a stream
  • Metadata
    • DatabaseMetaData interface -- provides information about the database
    • ResultSetMetaData interface -- provides information about the columns of a ResultSet object
    • ParameterMetaData interface -- provides information about the parameters to PreparedStatement commands
  • Exceptions
    • SQLException -- thrown by most methods when there is a problem accessing data and by some methods for other reasons
    • SQLWarning -- thrown to indicate a warning
    • DataTruncation -- thrown to indicate that data may have been truncated
    • BatchUpdateException -- thrown to indicate that not all commands in a batch update executed successfully

java.sql and javax.sql Features Introduced in the JDBC 4.2 API

  • Added JDBCType enum and SQLType interface
  • Support for REF CURSORS in CallableStatement
  • DatabaseMetaData methods to return maximum Logical LOB size and if Ref Cursors are supported
  • Added support for large update counts

java.sql and javax.sql Features Introduced in the JDBC 4.1 API

  • Allow Connection, ResultSet and Statement objects to be used with the try-with-resources statement
  • Supported added to CallableStatement and ResultSet to specify the Java type to convert to via the getObject method
  • DatabaseMetaData methods to return PseudoColumns and if a generated key is always returned
  • Added support to Connection to specify a database schema, abort and timeout a physical connection.
  • Added support to close a Statement object when its dependent objects have been closed
  • Support for obtaining the parent logger for a Driver, DataSource, ConnectionPoolDataSource and XADataSource

java.sql and javax.sql Features Introduced in the JDBC 4.0 API

  • auto java.sql.Driver discovery -- no longer need to load a java.sql.Driver class via Class.forName
  • National Character Set support added
  • Support added for the SQL:2003 XML data type
  • SQLException enhancements -- Added support for cause chaining; New SQLExceptions added for common SQLState class value codes
  • Enhanced Blob/Clob functionality -- Support provided to create and free a Blob/Clob instance as well as additional methods added to improve accessibility
  • Support added for accessing a SQL ROWID
  • Support added to allow a JDBC application to access an instance of a JDBC resource that has been wrapped by a vendor, usually in an application server or connection pooling environment.
  • Availability to be notified when a PreparedStatement that is associated with a PooledConnection has been closed or the driver determines is invalid

java.sql and javax.sql Features Introduced in the JDBC 3.0 API

  • Pooled statements -- reuse of statements associated with a pooled connection
  • Savepoints -- allow a transaction to be rolled back to a designated savepoint
  • Properties defined for ConnectionPoolDataSource -- specify how connections are to be pooled
  • Metadata for parameters of a PreparedStatement object
  • Ability to retrieve values from automatically generated columns
  • Ability to have multiple ResultSet objects returned from CallableStatement objects open at the same time
  • Ability to identify parameters to CallableStatement objects by name as well as by index
  • ResultSet holdability -- ability to specify whether cursors should be held open or closed at the end of a transaction
  • Ability to retrieve and update the SQL structured type instance that a Ref object references
  • Ability to programmatically update BLOB, CLOB, ARRAY, and REF values.
  • Addition of the java.sql.Types.DATALINK data type -- allows JDBC drivers access to objects stored outside a data source
  • Addition of metadata for retrieving SQL type hierarchies

java.sql Features Introduced in the JDBC 2.1 Core API

  • Scrollable result sets--using new methods in the ResultSet interface that allow the cursor to be moved to a particular row or to a position relative to its current position
  • Batch updates
  • Programmatic updates--using ResultSet updater methods
  • New data types--interfaces mapping the SQL3 data types
  • Custom mapping of user-defined types (UDTs)
  • Miscellaneous features, including performance hints, the use of character streams, full precision for java.math.BigDecimal values, additional security, and support for time zones in date, time, and timestamp values.

javax.sql Features Introduced in the JDBC 2.0 Optional Package API

  • The DataSource interface as a means of making a connection. The Java Naming and Directory InterfaceTM (JNDI) is used for registering a DataSource object with a naming service and also for retrieving it.
  • Pooled connections -- allowing connections to be used and reused
  • Distributed transactions -- allowing a transaction to span diverse DBMS servers
  • RowSet technology -- providing a convenient means of handling and passing data

Custom Mapping of UDTs

A user-defined type (UDT) defined in SQL can be mapped to a class in the Java programming language. An SQL structured type or an SQL DISTINCT type are the UDTs that may be custom mapped. The following three steps set up a custom mapping:
  1. Defining the SQL structured type or DISTINCT type in SQL
  2. Defining the class in the Java programming language to which the SQL UDT will be mapped. This class must implement the SQLData interface.
  3. Making an entry in a Connection object's type map that contains two things:
    • the fully-qualified SQL name of the UDT
    • the Class object for the class that implements the SQLData interface

When these are in place for a UDT, calling the methods ResultSet.getObject or CallableStatement.getObject on that UDT will automatically retrieve the custom mapping for it. Also, the PreparedStatement.setObject method will automatically map the object back to its SQL type to store it in the data source.

Package Specification

  • Specification of the JDBC 4.0 API

Related Documentation

  • Getting Started--overviews of the major interfaces

  • Chapters on the JDBC API--from the online version of The Java Tutorial Continued

  • JDBCTMAPI Tutorial and Reference, Third Edition-- a complete reference and tutorial for the JDBC 3.0 API

Since:
1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.sql

Interfaces

  • Array
  • Blob
  • CallableStatement
  • Clob
  • Connection
  • DatabaseMetaData
  • Driver
  • DriverAction
  • NClob
  • ParameterMetaData
  • PreparedStatement
  • Ref
  • ResultSet
  • ResultSetMetaData
  • RowId
  • Savepoint
  • SQLData
  • SQLInput
  • SQLOutput
  • SQLType
  • SQLXML
  • Statement
  • Struct
  • Wrapper

Classes

  • Date
  • DriverManager
  • DriverPropertyInfo
  • SQLPermission
  • Time
  • Timestamp
  • Types

Enums

  • ClientInfoStatus
  • JDBCType
  • PseudoColumnUsage
  • RowIdLifetime

Exceptions

  • BatchUpdateException
  • DataTruncation
  • SQLClientInfoException
  • SQLDataException
  • SQLException
  • SQLFeatureNotSupportedException
  • SQLIntegrityConstraintViolationException
  • SQLInvalidAuthorizationSpecException
  • SQLNonTransientConnectionException
  • SQLNonTransientException
  • SQLRecoverableException
  • SQLSyntaxErrorException
  • SQLTimeoutException
  • SQLTransactionRollbackException
  • SQLTransientConnectionException
  • SQLTransientException
  • SQLWarning


sql

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.sql

Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.

See: Description

  • Interface Summary
    Interface Description
    Array
    The mapping in the Java programming language for the SQL type ARRAY.
    Blob
    The representation (mapping) in the Java™ programming language of an SQL BLOB value.
    CallableStatement
    The interface used to execute SQL stored procedures.
    Clob
    The mapping in the Java™ programming language for the SQL CLOB type.
    Connection
    A connection (session) with a specific database.
    DatabaseMetaData
    Comprehensive information about the database as a whole.
    Driver
    The interface that every driver class must implement.
    DriverAction
    An interface that must be implemented when a Driver wants to be notified by DriverManager.
    NClob
    The mapping in the Java™ programming language for the SQL NCLOB type.
    ParameterMetaData
    An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object.
    PreparedStatement
    An object that represents a precompiled SQL statement.
    Ref
    The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
    ResultSet
    A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
    ResultSetMetaData
    An object that can be used to get information about the types and properties of the columns in a ResultSet object.
    RowId
    The representation (mapping) in the Java programming language of an SQL ROWID value.
    Savepoint
    The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.
    SQLData
    The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.
    SQLInput
    An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.
    SQLOutput
    The output stream for writing the attributes of a user-defined type back to the database.
    SQLType
    An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.
    SQLXML
    The mapping in the JavaTM programming language for the SQL XML type.
    Statement
    The object used for executing a static SQL statement and returning the results it produces.
    Struct
    The standard mapping in the Java programming language for an SQL structured type.
    Wrapper
    Interface for JDBC classes which provide the ability to retrieve the delegate instance when the instance in question is in fact a proxy class.
  • Class Summary
    Class Description
    Date
    A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value.
    DriverManager
    The basic service for managing a set of JDBC drivers.
    NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
    DriverPropertyInfo
    Driver properties for making a connection.
    SQLPermission
    The permission for which the SecurityManager will check when code that is running an application with a SecurityManager enabled, calls the DriverManager.deregisterDriver method, DriverManager.setLogWriter method, DriverManager.setLogStream (deprecated) method, SyncFactory.setJNDIContext method, SyncFactory.setLogger method, Connection.setNetworktimeout method, or the Connection.abort method.
    Time
    A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.
    Timestamp
    A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
    Types
    The class that defines the constants that are used to identify generic SQL types, called JDBC types.
  • Enum Summary
    Enum Description
    ClientInfoStatus
    Enumeration for status of the reason that a property could not be set via a call to Connection.setClientInfo
    JDBCType
    Defines the constants that are used to identify generic SQL types, called JDBC types.
    PseudoColumnUsage
    Enumeration for pseudo/hidden column usage.
    RowIdLifetime
    Enumeration for RowId life-time values.
  • Exception Summary
    Exception Description
    BatchUpdateException
    The subclass of SQLException thrown when an error occurs during a batch update operation.
    DataTruncation
    An exception thrown as a DataTruncation exception (on writes) or reported as a DataTruncation warning (on reads) when a data values is unexpectedly truncated for reasons other than its having exceeded MaxFieldSize.
    SQLClientInfoException
    The subclass of SQLException is thrown when one or more client info properties could not be set on a Connection.
    SQLDataException
    The subclass of SQLException thrown when the SQLState class value is '22', or under vendor-specified conditions.
    SQLException
    An exception that provides information on a database access error or other errors.
    SQLFeatureNotSupportedException
    The subclass of SQLException thrown when the SQLState class value is '0A' ( the value is 'zero' A).
    SQLIntegrityConstraintViolationException
    The subclass of SQLException thrown when the SQLState class value is '23', or under vendor-specified conditions.
    SQLInvalidAuthorizationSpecException
    The subclass of SQLException thrown when the SQLState class value is '28', or under vendor-specified conditions.
    SQLNonTransientConnectionException
    The subclass of SQLException thrown for the SQLState class value '08', or under vendor-specified conditions.
    SQLNonTransientException
    The subclass of SQLException thrown when an instance where a retry of the same operation would fail unless the cause of the SQLException is corrected.
    SQLRecoverableException
    The subclass of SQLException thrown in situations where a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch.
    SQLSyntaxErrorException
    The subclass of SQLException thrown when the SQLState class value is '42', or under vendor-specified conditions.
    SQLTimeoutException
    The subclass of SQLException thrown when the timeout specified by Statement.setQueryTimeout, DriverManager.setLoginTimeout, DataSource.setLoginTimeout,XADataSource.setLoginTimeout has expired.
    SQLTransactionRollbackException
    The subclass of SQLException thrown when the SQLState class value is '40', or under vendor-specified conditions.
    SQLTransientConnectionException
    The subclass of SQLException for the SQLState class value '08', or under vendor-specified conditions.
    SQLTransientException
    The subclass of SQLException is thrown in situations where a previously failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality.
    SQLWarning
    An exception that provides information on database access warnings.

Package java.sql Description

Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language. This API includes a framework whereby different drivers can be installed dynamically to access different data sources. Although the JDBCTM API is mainly geared to passing SQL statements to a database, it provides for reading and writing data from any data source with a tabular format. The reader/writer facility, available through the javax.sql.RowSet group of interfaces, can be customized to use and update data from a spread sheet, flat file, or any other tabular data source.

What the JDBCTM 4.2 API Includes

The JDBCTM 4.2 API includes both the java.sql package, referred to as the JDBC core API, and the javax.sql package, referred to as the JDBC Optional Package API. This complete JDBC API is included in the JavaTM Standard Edition (Java SETM), version 7. The javax.sql package extends the functionality of the JDBC API from a client-side API to a server-side API, and it is an essential part of the JavaTM Enterprise Edition (Java EETM) technology.

Versions

The JDBC 4.2 API incorporates all of the previous JDBC API versions:
  • The JDBC 4.1 API
  • The JDBC 4.0 API
  • The JDBC 3.0 API
  • The JDBC 2.1 core API
  • The JDBC 2.0 Optional Package API
    (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package API together are referred to as the JDBC 2.0 API.)
  • The JDBC 1.2 API
  • The JDBC 1.0 API

Classes, interfaces, methods, fields, constructors, and exceptions have the following "since" tags that indicate when they were introduced into the Java platform. When these "since" tags are used in JavadocTM comments for the JDBC API, they indicate the following:

  • Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform, version 8
  • Since 1.7 -- new in the JDBC 4.1 API and part of the Java SE platform, version 7
  • Since 1.6 -- new in the JDBC 4.0 API and part of the Java SE platform, version 6
  • Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform, version 1.4
  • Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform, version 1.2
  • Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of the JDKTM, version 1.1

NOTE: Many of the new features are optional; consequently, there is some variation in drivers and the features they support. Always check your driver's documentation to see whether it supports a feature before you try to use it.

NOTE: The class SQLPermission was added in the JavaTM 2 SDK, Standard Edition, version 1.3 release. This class is used to prevent unauthorized access to the logging stream associated with the DriverManager, which may contain information such as table names, column data, and so on.

What the java.sql Package Contains

The java.sql package contains API for the following:
  • Making a connection with a database via the DriverManager facility
    • DriverManager class -- makes a connection with a driver
    • SQLPermission class -- provides permission when code running within a Security Manager, such as an applet, attempts to set up a logging stream through the DriverManager
    • Driver interface -- provides the API for registering and connecting drivers based on JDBC technology ("JDBC drivers"); generally used only by the DriverManager class
    • DriverPropertyInfo class -- provides properties for a JDBC driver; not used by the general user
  • Sending SQL statements to a database
    • Statement -- used to send basic SQL statements
    • PreparedStatement -- used to send prepared statements or basic SQL statements (derived from Statement)
    • CallableStatement -- used to call database stored procedures (derived from PreparedStatement)
    • Connection interface -- provides methods for creating statements and managing connections and their properties
    • Savepoint -- provides savepoints in a transaction
  • Retrieving and updating the results of a query
    • ResultSet interface
  • Standard mappings for SQL types to classes and interfaces in the Java programming language
    • Array interface -- mapping for SQL ARRAY
    • Blob interface -- mapping for SQL BLOB
    • Clob interface -- mapping for SQL CLOB
    • Date class -- mapping for SQL DATE
    • NClob interface -- mapping for SQL NCLOB
    • Ref interface -- mapping for SQL REF
    • RowId interface -- mapping for SQL ROWID
    • Struct interface -- mapping for SQL STRUCT
    • SQLXML interface -- mapping for SQL XML
    • Time class -- mapping for SQL TIME
    • Timestamp class -- mapping for SQL TIMESTAMP
    • Types class -- provides constants for SQL types
  • Custom mapping an SQL user-defined type (UDT) to a class in the Java programming language
    • SQLData interface -- specifies the mapping of a UDT to an instance of this class
    • SQLInput interface -- provides methods for reading UDT attributes from a stream
    • SQLOutput interface -- provides methods for writing UDT attributes back to a stream
  • Metadata
    • DatabaseMetaData interface -- provides information about the database
    • ResultSetMetaData interface -- provides information about the columns of a ResultSet object
    • ParameterMetaData interface -- provides information about the parameters to PreparedStatement commands
  • Exceptions
    • SQLException -- thrown by most methods when there is a problem accessing data and by some methods for other reasons
    • SQLWarning -- thrown to indicate a warning
    • DataTruncation -- thrown to indicate that data may have been truncated
    • BatchUpdateException -- thrown to indicate that not all commands in a batch update executed successfully

java.sql and javax.sql Features Introduced in the JDBC 4.2 API

  • Added JDBCType enum and SQLType interface
  • Support for REF CURSORS in CallableStatement
  • DatabaseMetaData methods to return maximum Logical LOB size and if Ref Cursors are supported
  • Added support for large update counts

java.sql and javax.sql Features Introduced in the JDBC 4.1 API

  • Allow Connection, ResultSet and Statement objects to be used with the try-with-resources statement
  • Supported added to CallableStatement and ResultSet to specify the Java type to convert to via the getObject method
  • DatabaseMetaData methods to return PseudoColumns and if a generated key is always returned
  • Added support to Connection to specify a database schema, abort and timeout a physical connection.
  • Added support to close a Statement object when its dependent objects have been closed
  • Support for obtaining the parent logger for a Driver, DataSource, ConnectionPoolDataSource and XADataSource

java.sql and javax.sql Features Introduced in the JDBC 4.0 API

  • auto java.sql.Driver discovery -- no longer need to load a java.sql.Driver class via Class.forName
  • National Character Set support added
  • Support added for the SQL:2003 XML data type
  • SQLException enhancements -- Added support for cause chaining; New SQLExceptions added for common SQLState class value codes
  • Enhanced Blob/Clob functionality -- Support provided to create and free a Blob/Clob instance as well as additional methods added to improve accessibility
  • Support added for accessing a SQL ROWID
  • Support added to allow a JDBC application to access an instance of a JDBC resource that has been wrapped by a vendor, usually in an application server or connection pooling environment.
  • Availability to be notified when a PreparedStatement that is associated with a PooledConnection has been closed or the driver determines is invalid

java.sql and javax.sql Features Introduced in the JDBC 3.0 API

  • Pooled statements -- reuse of statements associated with a pooled connection
  • Savepoints -- allow a transaction to be rolled back to a designated savepoint
  • Properties defined for ConnectionPoolDataSource -- specify how connections are to be pooled
  • Metadata for parameters of a PreparedStatement object
  • Ability to retrieve values from automatically generated columns
  • Ability to have multiple ResultSet objects returned from CallableStatement objects open at the same time
  • Ability to identify parameters to CallableStatement objects by name as well as by index
  • ResultSet holdability -- ability to specify whether cursors should be held open or closed at the end of a transaction
  • Ability to retrieve and update the SQL structured type instance that a Ref object references
  • Ability to programmatically update BLOB, CLOB, ARRAY, and REF values.
  • Addition of the java.sql.Types.DATALINK data type -- allows JDBC drivers access to objects stored outside a data source
  • Addition of metadata for retrieving SQL type hierarchies

java.sql Features Introduced in the JDBC 2.1 Core API

  • Scrollable result sets--using new methods in the ResultSet interface that allow the cursor to be moved to a particular row or to a position relative to its current position
  • Batch updates
  • Programmatic updates--using ResultSet updater methods
  • New data types--interfaces mapping the SQL3 data types
  • Custom mapping of user-defined types (UDTs)
  • Miscellaneous features, including performance hints, the use of character streams, full precision for java.math.BigDecimal values, additional security, and support for time zones in date, time, and timestamp values.

javax.sql Features Introduced in the JDBC 2.0 Optional Package API

  • The DataSource interface as a means of making a connection. The Java Naming and Directory InterfaceTM (JNDI) is used for registering a DataSource object with a naming service and also for retrieving it.
  • Pooled connections -- allowing connections to be used and reused
  • Distributed transactions -- allowing a transaction to span diverse DBMS servers
  • RowSet technology -- providing a convenient means of handling and passing data

Custom Mapping of UDTs

A user-defined type (UDT) defined in SQL can be mapped to a class in the Java programming language. An SQL structured type or an SQL DISTINCT type are the UDTs that may be custom mapped. The following three steps set up a custom mapping:
  1. Defining the SQL structured type or DISTINCT type in SQL
  2. Defining the class in the Java programming language to which the SQL UDT will be mapped. This class must implement the SQLData interface.
  3. Making an entry in a Connection object's type map that contains two things:
    • the fully-qualified SQL name of the UDT
    • the Class object for the class that implements the SQLData interface

When these are in place for a UDT, calling the methods ResultSet.getObject or CallableStatement.getObject on that UDT will automatically retrieve the custom mapping for it. Also, the PreparedStatement.setObject method will automatically map the object back to its SQL type to store it in the data source.

Package Specification

  • Specification of the JDBC 4.0 API

Related Documentation

  • Getting Started--overviews of the major interfaces

  • Chapters on the JDBC API--from the online version of The Java Tutorial Continued

  • JDBCTMAPI Tutorial and Reference, Third Edition-- a complete reference and tutorial for the JDBC 3.0 API

Since:
1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.sql

Interfaces

  • Array
  • Blob
  • CallableStatement
  • Clob
  • Connection
  • DatabaseMetaData
  • Driver
  • DriverAction
  • NClob
  • ParameterMetaData
  • PreparedStatement
  • Ref
  • ResultSet
  • ResultSetMetaData
  • RowId
  • Savepoint
  • SQLData
  • SQLInput
  • SQLOutput
  • SQLType
  • SQLXML
  • Statement
  • Struct
  • Wrapper

Classes

  • Date
  • DriverManager
  • DriverPropertyInfo
  • SQLPermission
  • Time
  • Timestamp
  • Types

Enums

  • ClientInfoStatus
  • JDBCType
  • PseudoColumnUsage
  • RowIdLifetime

Exceptions

  • BatchUpdateException
  • DataTruncation
  • SQLClientInfoException
  • SQLDataException
  • SQLException
  • SQLFeatureNotSupportedException
  • SQLIntegrityConstraintViolationException
  • SQLInvalidAuthorizationSpecException
  • SQLNonTransientConnectionException
  • SQLNonTransientException
  • SQLRecoverableException
  • SQLSyntaxErrorException
  • SQLTimeoutException
  • SQLTransactionRollbackException
  • SQLTransientConnectionException
  • SQLTransientException
  • SQLWarning


compact1 - java.text

Interfaces

  • AttributedCharacterIterator
  • CharacterIterator

Classes

  • Annotation
  • AttributedCharacterIterator.Attribute
  • AttributedString
  • Bidi
  • BreakIterator
  • ChoiceFormat
  • CollationElementIterator
  • CollationKey
  • Collator
  • DateFormat
  • DateFormat.Field
  • DateFormatSymbols
  • DecimalFormat
  • DecimalFormatSymbols
  • FieldPosition
  • Format
  • Format.Field
  • MessageFormat
  • MessageFormat.Field
  • Normalizer
  • NumberFormat
  • NumberFormat.Field
  • ParsePosition
  • RuleBasedCollator
  • SimpleDateFormat
  • StringCharacterIterator

Enums

  • Normalizer.Form

Exceptions

  • ParseException


text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.text

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

See: Description

  • Interface Summary
    Interface Description
    AttributedCharacterIterator
    An AttributedCharacterIterator allows iteration through both text and related attribute information.
    CharacterIterator
    This interface defines a protocol for bidirectional iteration over text.
  • Class Summary
    Class Description
    Annotation
    An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
    AttributedCharacterIterator.Attribute
    Defines attribute keys that are used to identify text attributes.
    AttributedString
    An AttributedString holds text and related attribute information.
    Bidi
    This class implements the Unicode Bidirectional Algorithm.
    BreakIterator
    The BreakIterator class implements methods for finding the location of boundaries in text.
    ChoiceFormat
    A ChoiceFormat allows you to attach a format to a range of numbers.
    CollationElementIterator
    The CollationElementIterator class is used as an iterator to walk through each character of an international string.
    CollationKey
    A CollationKey represents a String under the rules of a specific Collator object.
    Collator
    The Collator class performs locale-sensitive String comparison.
    DateFormat
    DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
    DateFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from DateFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    DateFormatSymbols
    DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
    DecimalFormat
    DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
    DecimalFormatSymbols
    This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
    FieldPosition
    FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
    Format
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
    Format.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from Format.formatToCharacterIterator and as field identifiers in FieldPosition.
    MessageFormat
    MessageFormat provides a means to produce concatenated messages in a language-neutral way.
    MessageFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from MessageFormat.formatToCharacterIterator.
    Normalizer
    This class provides the method normalize which transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text.
    NumberFormat
    NumberFormat is the abstract base class for all number formats.
    NumberFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from NumberFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    ParsePosition
    ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
    RuleBasedCollator
    The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
    SimpleDateFormat
    SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
    StringCharacterIterator
    StringCharacterIterator implements the CharacterIterator protocol for a String.
  • Enum Summary
    Enum Description
    Normalizer.Form
    This enum provides constants of the four Unicode normalization forms that are described in Unicode Standard Annex #15 — Unicode Normalization Forms and two methods to access them.
  • Exception Summary
    Exception Description
    ParseException
    Signals that an error has been reached unexpectedly while parsing.

Package java.text Description

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. This means your main application or applet can be written to be language-independent, and it can rely upon separate, dynamically-linked localized resources. This allows the flexibility of adding localizations for new localizations at any time.

These classes are capable of formatting dates, numbers, and messages, parsing; searching and sorting strings; and iterating over characters, words, sentences, and line breaks. This package contains three main groups of classes and interfaces:

  • Classes for iteration over text
  • Classes for formatting and parsing
  • Classes for string collation
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.text

Interfaces

  • AttributedCharacterIterator
  • CharacterIterator

Classes

  • Annotation
  • AttributedCharacterIterator.Attribute
  • AttributedString
  • Bidi
  • BreakIterator
  • ChoiceFormat
  • CollationElementIterator
  • CollationKey
  • Collator
  • DateFormat
  • DateFormat.Field
  • DateFormatSymbols
  • DecimalFormat
  • DecimalFormatSymbols
  • FieldPosition
  • Format
  • Format.Field
  • MessageFormat
  • MessageFormat.Field
  • Normalizer
  • NumberFormat
  • NumberFormat.Field
  • ParsePosition
  • RuleBasedCollator
  • SimpleDateFormat
  • StringCharacterIterator

Enums

  • Normalizer.Form

Exceptions

  • ParseException


text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.text

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

See: Description

  • Interface Summary
    Interface Description
    AttributedCharacterIterator
    An AttributedCharacterIterator allows iteration through both text and related attribute information.
    CharacterIterator
    This interface defines a protocol for bidirectional iteration over text.
  • Class Summary
    Class Description
    Annotation
    An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
    AttributedCharacterIterator.Attribute
    Defines attribute keys that are used to identify text attributes.
    AttributedString
    An AttributedString holds text and related attribute information.
    Bidi
    This class implements the Unicode Bidirectional Algorithm.
    BreakIterator
    The BreakIterator class implements methods for finding the location of boundaries in text.
    ChoiceFormat
    A ChoiceFormat allows you to attach a format to a range of numbers.
    CollationElementIterator
    The CollationElementIterator class is used as an iterator to walk through each character of an international string.
    CollationKey
    A CollationKey represents a String under the rules of a specific Collator object.
    Collator
    The Collator class performs locale-sensitive String comparison.
    DateFormat
    DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
    DateFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from DateFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    DateFormatSymbols
    DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
    DecimalFormat
    DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
    DecimalFormatSymbols
    This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
    FieldPosition
    FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
    Format
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
    Format.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from Format.formatToCharacterIterator and as field identifiers in FieldPosition.
    MessageFormat
    MessageFormat provides a means to produce concatenated messages in a language-neutral way.
    MessageFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from MessageFormat.formatToCharacterIterator.
    Normalizer
    This class provides the method normalize which transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text.
    NumberFormat
    NumberFormat is the abstract base class for all number formats.
    NumberFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from NumberFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    ParsePosition
    ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
    RuleBasedCollator
    The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
    SimpleDateFormat
    SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
    StringCharacterIterator
    StringCharacterIterator implements the CharacterIterator protocol for a String.
  • Enum Summary
    Enum Description
    Normalizer.Form
    This enum provides constants of the four Unicode normalization forms that are described in Unicode Standard Annex #15 — Unicode Normalization Forms and two methods to access them.
  • Exception Summary
    Exception Description
    ParseException
    Signals that an error has been reached unexpectedly while parsing.

Package java.text Description

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. This means your main application or applet can be written to be language-independent, and it can rely upon separate, dynamically-linked localized resources. This allows the flexibility of adding localizations for new localizations at any time.

These classes are capable of formatting dates, numbers, and messages, parsing; searching and sorting strings; and iterating over characters, words, sentences, and line breaks. This package contains three main groups of classes and interfaces:

  • Classes for iteration over text
  • Classes for formatting and parsing
  • Classes for string collation
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.text

Interfaces

  • AttributedCharacterIterator
  • CharacterIterator

Classes

  • Annotation
  • AttributedCharacterIterator.Attribute
  • AttributedString
  • Bidi
  • BreakIterator
  • ChoiceFormat
  • CollationElementIterator
  • CollationKey
  • Collator
  • DateFormat
  • DateFormat.Field
  • DateFormatSymbols
  • DecimalFormat
  • DecimalFormatSymbols
  • FieldPosition
  • Format
  • Format.Field
  • MessageFormat
  • MessageFormat.Field
  • Normalizer
  • NumberFormat
  • NumberFormat.Field
  • ParsePosition
  • RuleBasedCollator
  • SimpleDateFormat
  • StringCharacterIterator

Enums

  • Normalizer.Form

Exceptions

  • ParseException


text

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.text

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

See: Description

  • Interface Summary
    Interface Description
    AttributedCharacterIterator
    An AttributedCharacterIterator allows iteration through both text and related attribute information.
    CharacterIterator
    This interface defines a protocol for bidirectional iteration over text.
  • Class Summary
    Class Description
    Annotation
    An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
    AttributedCharacterIterator.Attribute
    Defines attribute keys that are used to identify text attributes.
    AttributedString
    An AttributedString holds text and related attribute information.
    Bidi
    This class implements the Unicode Bidirectional Algorithm.
    BreakIterator
    The BreakIterator class implements methods for finding the location of boundaries in text.
    ChoiceFormat
    A ChoiceFormat allows you to attach a format to a range of numbers.
    CollationElementIterator
    The CollationElementIterator class is used as an iterator to walk through each character of an international string.
    CollationKey
    A CollationKey represents a String under the rules of a specific Collator object.
    Collator
    The Collator class performs locale-sensitive String comparison.
    DateFormat
    DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
    DateFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from DateFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    DateFormatSymbols
    DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
    DecimalFormat
    DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
    DecimalFormatSymbols
    This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
    FieldPosition
    FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
    Format
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
    Format.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from Format.formatToCharacterIterator and as field identifiers in FieldPosition.
    MessageFormat
    MessageFormat provides a means to produce concatenated messages in a language-neutral way.
    MessageFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from MessageFormat.formatToCharacterIterator.
    Normalizer
    This class provides the method normalize which transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text.
    NumberFormat
    NumberFormat is the abstract base class for all number formats.
    NumberFormat.Field
    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from NumberFormat.formatToCharacterIterator and as field identifiers in FieldPosition.
    ParsePosition
    ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
    RuleBasedCollator
    The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
    SimpleDateFormat
    SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
    StringCharacterIterator
    StringCharacterIterator implements the CharacterIterator protocol for a String.
  • Enum Summary
    Enum Description
    Normalizer.Form
    This enum provides constants of the four Unicode normalization forms that are described in Unicode Standard Annex #15 — Unicode Normalization Forms and two methods to access them.
  • Exception Summary
    Exception Description
    ParseException
    Signals that an error has been reached unexpectedly while parsing.

Package java.text Description

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. This means your main application or applet can be written to be language-independent, and it can rely upon separate, dynamically-linked localized resources. This allows the flexibility of adding localizations for new localizations at any time.

These classes are capable of formatting dates, numbers, and messages, parsing; searching and sorting strings; and iterating over characters, words, sentences, and line breaks. This package contains three main groups of classes and interfaces:

  • Classes for iteration over text
  • Classes for formatting and parsing
  • Classes for string collation
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.text

Interfaces

  • AttributedCharacterIterator
  • CharacterIterator

Classes

  • Annotation
  • AttributedCharacterIterator.Attribute
  • AttributedString
  • Bidi
  • BreakIterator
  • ChoiceFormat
  • CollationElementIterator
  • CollationKey
  • Collator
  • DateFormat
  • DateFormat.Field
  • DateFormatSymbols
  • DecimalFormat
  • DecimalFormatSymbols
  • FieldPosition
  • Format
  • Format.Field
  • MessageFormat
  • MessageFormat.Field
  • Normalizer
  • NumberFormat
  • NumberFormat.Field
  • ParsePosition
  • RuleBasedCollator
  • SimpleDateFormat
  • StringCharacterIterator

Enums

  • Normalizer.Form

Exceptions

  • ParseException


compact1 - java.text.spi

Classes

  • BreakIteratorProvider
  • CollatorProvider
  • DateFormatProvider
  • DateFormatSymbolsProvider
  • DecimalFormatSymbolsProvider
  • NumberFormatProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.text.spi

Service provider classes for the classes in the java.text package.

See: Description

  • Class Summary
    Class Description
    BreakIteratorProvider
    An abstract class for service providers that provide concrete implementations of the BreakIterator class.
    CollatorProvider
    An abstract class for service providers that provide concrete implementations of the Collator class.
    DateFormatProvider
    An abstract class for service providers that provide concrete implementations of the DateFormat class.
    DateFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DateFormatSymbols class.
    DecimalFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DecimalFormatSymbols class.
    NumberFormatProvider
    An abstract class for service providers that provide concrete implementations of the NumberFormat class.

Package java.text.spi Description

Service provider classes for the classes in the java.text package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.text.spi

Classes

  • BreakIteratorProvider
  • CollatorProvider
  • DateFormatProvider
  • DateFormatSymbolsProvider
  • DecimalFormatSymbolsProvider
  • NumberFormatProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.text.spi

Service provider classes for the classes in the java.text package.

See: Description

  • Class Summary
    Class Description
    BreakIteratorProvider
    An abstract class for service providers that provide concrete implementations of the BreakIterator class.
    CollatorProvider
    An abstract class for service providers that provide concrete implementations of the Collator class.
    DateFormatProvider
    An abstract class for service providers that provide concrete implementations of the DateFormat class.
    DateFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DateFormatSymbols class.
    DecimalFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DecimalFormatSymbols class.
    NumberFormatProvider
    An abstract class for service providers that provide concrete implementations of the NumberFormat class.

Package java.text.spi Description

Service provider classes for the classes in the java.text package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.text.spi

Classes

  • BreakIteratorProvider
  • CollatorProvider
  • DateFormatProvider
  • DateFormatSymbolsProvider
  • DecimalFormatSymbolsProvider
  • NumberFormatProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.text.spi

Service provider classes for the classes in the java.text package.

See: Description

  • Class Summary
    Class Description
    BreakIteratorProvider
    An abstract class for service providers that provide concrete implementations of the BreakIterator class.
    CollatorProvider
    An abstract class for service providers that provide concrete implementations of the Collator class.
    DateFormatProvider
    An abstract class for service providers that provide concrete implementations of the DateFormat class.
    DateFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DateFormatSymbols class.
    DecimalFormatSymbolsProvider
    An abstract class for service providers that provide instances of the DecimalFormatSymbols class.
    NumberFormatProvider
    An abstract class for service providers that provide concrete implementations of the NumberFormat class.

Package java.text.spi Description

Service provider classes for the classes in the java.text package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.text.spi

Classes

  • BreakIteratorProvider
  • CollatorProvider
  • DateFormatProvider
  • DateFormatSymbolsProvider
  • DecimalFormatSymbolsProvider
  • NumberFormatProvider


compact1 - java.time

Classes

  • Clock
  • Duration
  • Instant
  • LocalDate
  • LocalDateTime
  • LocalTime
  • MonthDay
  • OffsetDateTime
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneId
  • ZoneOffset

Enums

  • DayOfWeek
  • Month

Exceptions

  • DateTimeException


time

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.time

The main API for dates, times, instants, and durations.

See: Description

  • Class Summary
    Class Description
    Clock
    A clock providing access to the current instant, date and time using a time-zone.
    Duration
    A time-based amount of time, such as '34.5 seconds'.
    Instant
    An instantaneous point on the time-line.
    LocalDate
    A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.
    LocalDateTime
    A date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30.
    LocalTime
    A time without time-zone in the ISO-8601 calendar system, such as 10:15:30.
    MonthDay
    A month-day in the ISO-8601 calendar system, such as --12-03.
    OffsetDateTime
    A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00.
    OffsetTime
    A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00.
    Period
    A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.
    Year
    A year in the ISO-8601 calendar system, such as 2007.
    YearMonth
    A year-month in the ISO-8601 calendar system, such as 2007-12.
    ZonedDateTime
    A date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 Europe/Paris.
    ZoneId
    A time-zone ID, such as Europe/Paris.
    ZoneOffset
    A time-zone offset from Greenwich/UTC, such as +02:00.
  • Enum Summary
    Enum Description
    DayOfWeek
    A day-of-week, such as 'Tuesday'.
    Month
    A month-of-year, such as 'July'.
  • Exception Summary
    Exception Description
    DateTimeException
    Exception used to indicate a problem while calculating a date-time.

Package java.time Description

The main API for dates, times, instants, and durations.

The classes defined here represent the principal date-time concepts, including instants, durations, dates, times, time-zones and periods. They are based on the ISO calendar system, which is the de facto world calendar following the proleptic Gregorian rules. All the classes are immutable and thread-safe.

Each date time instance is composed of fields that are conveniently made available by the APIs. For lower level access to the fields refer to the java.time.temporal package. Each class includes support for printing and parsing all manner of dates and times. Refer to the java.time.format package for customization options.

The java.time.chrono package contains the calendar neutral API ChronoLocalDate, ChronoLocalDateTime, ChronoZonedDateTime and Era. This is intended for use by applications that need to use localized calendars. It is recommended that applications use the ISO-8601 date and time classes from this package across system boundaries, such as to the database or across the network. The calendar neutral API should be reserved for interactions with users.

Dates and Times

Instant is essentially a numeric timestamp. The current Instant can be retrieved from a Clock. This is useful for logging and persistence of a point in time and has in the past been associated with storing the result from System.currentTimeMillis().

LocalDate stores a date without a time. This stores a date like '2010-12-03' and could be used to store a birthday.

LocalTime stores a time without a date. This stores a time like '11:30' and could be used to store an opening or closing time.

LocalDateTime stores a date and time. This stores a date-time like '2010-12-03T11:30'.

ZonedDateTime stores a date and time with a time-zone. This is useful if you want to perform accurate calculations of dates and times taking into account the ZoneId, such as 'Europe/Paris'. Where possible, it is recommended to use a simpler class without a time-zone. The widespread use of time-zones tends to add considerable complexity to an application.

Duration and Period

Beyond dates and times, the API also allows the storage of period and durations of time. A Duration is a simple measure of time along the time-line in nanoseconds. A Period expresses an amount of time in units meaningful to humans, such as years or hours.

Additional value types

Month stores a month on its own. This stores a single month-of-year in isolation, such as 'DECEMBER'.

DayOfWeek stores a day-of-week on its own. This stores a single day-of-week in isolation, such as 'TUESDAY'.

Year stores a year on its own. This stores a single year in isolation, such as '2010'.

YearMonth stores a year and month without a day or time. This stores a year and month, such as '2010-12' and could be used for a credit card expiry.

MonthDay stores a month and day without a year or time. This stores a month and day-of-month, such as '--12-03' and could be used to store an annual event like a birthday without storing the year.

OffsetTime stores a time and offset from UTC without a date. This stores a date like '11:30+01:00'. The ZoneOffset is of the form '+01:00'.

OffsetDateTime stores a date and time and offset from UTC. This stores a date-time like '2010-12-03T11:30+01:00'. This is sometimes found in XML messages and other forms of persistence, but contains less information than a full time-zone.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Design notes (non normative)

The API has been designed to reject null early and to be clear about this behavior. A key exception is any method that takes an object and returns a boolean, for the purpose of checking or validating, will generally return false for null.

The API is designed to be type-safe where reasonable in the main high-level API. Thus, there are separate classes for the distinct concepts of date, time and date-time, plus variants for offset and time-zone. This can seem like a lot of classes, but most applications can begin with just five date/time types.

  • Instant - a timestamp
  • LocalDate - a date without a time, or any reference to an offset or time-zone
  • LocalTime - a time without a date, or any reference to an offset or time-zone
  • LocalDateTime - combines date and time, but still without any offset or time-zone
  • ZonedDateTime - a "full" date-time with time-zone and resolved offset from UTC/Greenwich

Instant is the closest equivalent class to java.util.Date. ZonedDateTime is the closest equivalent class to java.util.GregorianCalendar.

Where possible, applications should use LocalDate, LocalTime and LocalDateTime to better model the domain. For example, a birthday should be stored in a code LocalDate. Bear in mind that any use of a time-zone, such as 'Europe/Paris', adds considerable complexity to a calculation. Many applications can be written only using LocalDate, LocalTime and Instant, with the time-zone added at the user interface (UI) layer.

The offset-based date-time types OffsetTime and OffsetDateTime, are intended primarily for use with network protocols and database access. For example, most databases cannot automatically store a time-zone like 'Europe/Paris', but they can store an offset like '+02:00'.

Classes are also provided for the most important sub-parts of a date, including Month, DayOfWeek, Year, YearMonth and MonthDay. These can be used to model more complex date-time concepts. For example, YearMonth is useful for representing a credit card expiry.

Note that while there are a large number of classes representing different aspects of dates, there are relatively few dealing with different aspects of time. Following type-safety to its logical conclusion would have resulted in classes for hour-minute, hour-minute-second and hour-minute-second-nanosecond. While logically pure, this was not a practical option as it would have almost tripled the number of classes due to the combinations of date and time. Thus, LocalTime is used for all precisions of time, with zeroes used to imply lower precision.

Following full type-safety to its ultimate conclusion might also argue for a separate class for each field in date-time, such as a class for HourOfDay and another for DayOfMonth. This approach was tried, but was excessively complicated in the Java language, lacking usability. A similar problem occurs with periods. There is a case for a separate class for each period unit, such as a type for Years and a type for Minutes. However, this yields a lot of classes and a problem of type conversion. Thus, the set of date-time types provided is a compromise between purity and practicality.

The API has a relatively large surface area in terms of number of methods. This is made manageable through the use of consistent method prefixes.

  • of - static factory method
  • parse - static factory method focussed on parsing
  • get - gets the value of something
  • is - checks if something is true
  • with - the immutable equivalent of a setter
  • plus - adds an amount to an object
  • minus - subtracts an amount from an object
  • to - converts this object to another type
  • at - combines this object with another, such as date.atTime(time)

Multiple calendar systems is an awkward addition to the design challenges. The first principal is that most users want the standard ISO calendar system. As such, the main classes are ISO-only. The second principal is that most of those that want a non-ISO calendar system want it for user interaction, thus it is a UI localization issue. As such, date and time objects should be held as ISO objects in the data model and persistent storage, only being converted to and from a local calendar for display. The calendar system would be stored separately in the user preferences.

There are, however, some limited use cases where users believe they need to store and use dates in arbitrary calendar systems throughout the application. This is supported by ChronoLocalDate, however it is vital to read all the associated warnings in the Javadoc of that interface before using it. In summary, applications that require general interoperation between multiple calendar systems typically need to be written in a very different way to those only using the ISO calendar, thus most applications should just use ISO and avoid ChronoLocalDate.

The API is also designed for user extensibility, as there are many ways of calculating time. The field and unit API, accessed via TemporalAccessor and Temporal provide considerable flexibility to applications. In addition, the TemporalQuery and TemporalAdjuster interfaces provide day-to-day power, allowing code to read close to business requirements:

   LocalDate customerBirthday = customer.loadBirthdayFromDatabase();
   LocalDate today = LocalDate.now();
   if (customerBirthday.equals(today)) {
     LocalDate specialOfferExpiryDate = today.plusWeeks(2).with(next(FRIDAY));
     customer.sendBirthdaySpecialOffer(specialOfferExpiryDate);
   }
Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.time

Classes

  • Clock
  • Duration
  • Instant
  • LocalDate
  • LocalDateTime
  • LocalTime
  • MonthDay
  • OffsetDateTime
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneId
  • ZoneOffset

Enums

  • DayOfWeek
  • Month

Exceptions

  • DateTimeException


time

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.time

The main API for dates, times, instants, and durations.

See: Description

  • Class Summary
    Class Description
    Clock
    A clock providing access to the current instant, date and time using a time-zone.
    Duration
    A time-based amount of time, such as '34.5 seconds'.
    Instant
    An instantaneous point on the time-line.
    LocalDate
    A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.
    LocalDateTime
    A date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30.
    LocalTime
    A time without time-zone in the ISO-8601 calendar system, such as 10:15:30.
    MonthDay
    A month-day in the ISO-8601 calendar system, such as --12-03.
    OffsetDateTime
    A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00.
    OffsetTime
    A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00.
    Period
    A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.
    Year
    A year in the ISO-8601 calendar system, such as 2007.
    YearMonth
    A year-month in the ISO-8601 calendar system, such as 2007-12.
    ZonedDateTime
    A date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 Europe/Paris.
    ZoneId
    A time-zone ID, such as Europe/Paris.
    ZoneOffset
    A time-zone offset from Greenwich/UTC, such as +02:00.
  • Enum Summary
    Enum Description
    DayOfWeek
    A day-of-week, such as 'Tuesday'.
    Month
    A month-of-year, such as 'July'.
  • Exception Summary
    Exception Description
    DateTimeException
    Exception used to indicate a problem while calculating a date-time.

Package java.time Description

The main API for dates, times, instants, and durations.

The classes defined here represent the principal date-time concepts, including instants, durations, dates, times, time-zones and periods. They are based on the ISO calendar system, which is the de facto world calendar following the proleptic Gregorian rules. All the classes are immutable and thread-safe.

Each date time instance is composed of fields that are conveniently made available by the APIs. For lower level access to the fields refer to the java.time.temporal package. Each class includes support for printing and parsing all manner of dates and times. Refer to the java.time.format package for customization options.

The java.time.chrono package contains the calendar neutral API ChronoLocalDate, ChronoLocalDateTime, ChronoZonedDateTime and Era. This is intended for use by applications that need to use localized calendars. It is recommended that applications use the ISO-8601 date and time classes from this package across system boundaries, such as to the database or across the network. The calendar neutral API should be reserved for interactions with users.

Dates and Times

Instant is essentially a numeric timestamp. The current Instant can be retrieved from a Clock. This is useful for logging and persistence of a point in time and has in the past been associated with storing the result from System.currentTimeMillis().

LocalDate stores a date without a time. This stores a date like '2010-12-03' and could be used to store a birthday.

LocalTime stores a time without a date. This stores a time like '11:30' and could be used to store an opening or closing time.

LocalDateTime stores a date and time. This stores a date-time like '2010-12-03T11:30'.

ZonedDateTime stores a date and time with a time-zone. This is useful if you want to perform accurate calculations of dates and times taking into account the ZoneId, such as 'Europe/Paris'. Where possible, it is recommended to use a simpler class without a time-zone. The widespread use of time-zones tends to add considerable complexity to an application.

Duration and Period

Beyond dates and times, the API also allows the storage of period and durations of time. A Duration is a simple measure of time along the time-line in nanoseconds. A Period expresses an amount of time in units meaningful to humans, such as years or hours.

Additional value types

Month stores a month on its own. This stores a single month-of-year in isolation, such as 'DECEMBER'.

DayOfWeek stores a day-of-week on its own. This stores a single day-of-week in isolation, such as 'TUESDAY'.

Year stores a year on its own. This stores a single year in isolation, such as '2010'.

YearMonth stores a year and month without a day or time. This stores a year and month, such as '2010-12' and could be used for a credit card expiry.

MonthDay stores a month and day without a year or time. This stores a month and day-of-month, such as '--12-03' and could be used to store an annual event like a birthday without storing the year.

OffsetTime stores a time and offset from UTC without a date. This stores a date like '11:30+01:00'. The ZoneOffset is of the form '+01:00'.

OffsetDateTime stores a date and time and offset from UTC. This stores a date-time like '2010-12-03T11:30+01:00'. This is sometimes found in XML messages and other forms of persistence, but contains less information than a full time-zone.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Design notes (non normative)

The API has been designed to reject null early and to be clear about this behavior. A key exception is any method that takes an object and returns a boolean, for the purpose of checking or validating, will generally return false for null.

The API is designed to be type-safe where reasonable in the main high-level API. Thus, there are separate classes for the distinct concepts of date, time and date-time, plus variants for offset and time-zone. This can seem like a lot of classes, but most applications can begin with just five date/time types.

  • Instant - a timestamp
  • LocalDate - a date without a time, or any reference to an offset or time-zone
  • LocalTime - a time without a date, or any reference to an offset or time-zone
  • LocalDateTime - combines date and time, but still without any offset or time-zone
  • ZonedDateTime - a "full" date-time with time-zone and resolved offset from UTC/Greenwich

Instant is the closest equivalent class to java.util.Date. ZonedDateTime is the closest equivalent class to java.util.GregorianCalendar.

Where possible, applications should use LocalDate, LocalTime and LocalDateTime to better model the domain. For example, a birthday should be stored in a code LocalDate. Bear in mind that any use of a time-zone, such as 'Europe/Paris', adds considerable complexity to a calculation. Many applications can be written only using LocalDate, LocalTime and Instant, with the time-zone added at the user interface (UI) layer.

The offset-based date-time types OffsetTime and OffsetDateTime, are intended primarily for use with network protocols and database access. For example, most databases cannot automatically store a time-zone like 'Europe/Paris', but they can store an offset like '+02:00'.

Classes are also provided for the most important sub-parts of a date, including Month, DayOfWeek, Year, YearMonth and MonthDay. These can be used to model more complex date-time concepts. For example, YearMonth is useful for representing a credit card expiry.

Note that while there are a large number of classes representing different aspects of dates, there are relatively few dealing with different aspects of time. Following type-safety to its logical conclusion would have resulted in classes for hour-minute, hour-minute-second and hour-minute-second-nanosecond. While logically pure, this was not a practical option as it would have almost tripled the number of classes due to the combinations of date and time. Thus, LocalTime is used for all precisions of time, with zeroes used to imply lower precision.

Following full type-safety to its ultimate conclusion might also argue for a separate class for each field in date-time, such as a class for HourOfDay and another for DayOfMonth. This approach was tried, but was excessively complicated in the Java language, lacking usability. A similar problem occurs with periods. There is a case for a separate class for each period unit, such as a type for Years and a type for Minutes. However, this yields a lot of classes and a problem of type conversion. Thus, the set of date-time types provided is a compromise between purity and practicality.

The API has a relatively large surface area in terms of number of methods. This is made manageable through the use of consistent method prefixes.

  • of - static factory method
  • parse - static factory method focussed on parsing
  • get - gets the value of something
  • is - checks if something is true
  • with - the immutable equivalent of a setter
  • plus - adds an amount to an object
  • minus - subtracts an amount from an object
  • to - converts this object to another type
  • at - combines this object with another, such as date.atTime(time)

Multiple calendar systems is an awkward addition to the design challenges. The first principal is that most users want the standard ISO calendar system. As such, the main classes are ISO-only. The second principal is that most of those that want a non-ISO calendar system want it for user interaction, thus it is a UI localization issue. As such, date and time objects should be held as ISO objects in the data model and persistent storage, only being converted to and from a local calendar for display. The calendar system would be stored separately in the user preferences.

There are, however, some limited use cases where users believe they need to store and use dates in arbitrary calendar systems throughout the application. This is supported by ChronoLocalDate, however it is vital to read all the associated warnings in the Javadoc of that interface before using it. In summary, applications that require general interoperation between multiple calendar systems typically need to be written in a very different way to those only using the ISO calendar, thus most applications should just use ISO and avoid ChronoLocalDate.

The API is also designed for user extensibility, as there are many ways of calculating time. The field and unit API, accessed via TemporalAccessor and Temporal provide considerable flexibility to applications. In addition, the TemporalQuery and TemporalAdjuster interfaces provide day-to-day power, allowing code to read close to business requirements:

   LocalDate customerBirthday = customer.loadBirthdayFromDatabase();
   LocalDate today = LocalDate.now();
   if (customerBirthday.equals(today)) {
     LocalDate specialOfferExpiryDate = today.plusWeeks(2).with(next(FRIDAY));
     customer.sendBirthdaySpecialOffer(specialOfferExpiryDate);
   }
Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.time

Classes

  • Clock
  • Duration
  • Instant
  • LocalDate
  • LocalDateTime
  • LocalTime
  • MonthDay
  • OffsetDateTime
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneId
  • ZoneOffset

Enums

  • DayOfWeek
  • Month

Exceptions

  • DateTimeException


time

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.time

The main API for dates, times, instants, and durations.

See: Description

  • Class Summary
    Class Description
    Clock
    A clock providing access to the current instant, date and time using a time-zone.
    Duration
    A time-based amount of time, such as '34.5 seconds'.
    Instant
    An instantaneous point on the time-line.
    LocalDate
    A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.
    LocalDateTime
    A date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30.
    LocalTime
    A time without time-zone in the ISO-8601 calendar system, such as 10:15:30.
    MonthDay
    A month-day in the ISO-8601 calendar system, such as --12-03.
    OffsetDateTime
    A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00.
    OffsetTime
    A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00.
    Period
    A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.
    Year
    A year in the ISO-8601 calendar system, such as 2007.
    YearMonth
    A year-month in the ISO-8601 calendar system, such as 2007-12.
    ZonedDateTime
    A date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 Europe/Paris.
    ZoneId
    A time-zone ID, such as Europe/Paris.
    ZoneOffset
    A time-zone offset from Greenwich/UTC, such as +02:00.
  • Enum Summary
    Enum Description
    DayOfWeek
    A day-of-week, such as 'Tuesday'.
    Month
    A month-of-year, such as 'July'.
  • Exception Summary
    Exception Description
    DateTimeException
    Exception used to indicate a problem while calculating a date-time.

Package java.time Description

The main API for dates, times, instants, and durations.

The classes defined here represent the principal date-time concepts, including instants, durations, dates, times, time-zones and periods. They are based on the ISO calendar system, which is the de facto world calendar following the proleptic Gregorian rules. All the classes are immutable and thread-safe.

Each date time instance is composed of fields that are conveniently made available by the APIs. For lower level access to the fields refer to the java.time.temporal package. Each class includes support for printing and parsing all manner of dates and times. Refer to the java.time.format package for customization options.

The java.time.chrono package contains the calendar neutral API ChronoLocalDate, ChronoLocalDateTime, ChronoZonedDateTime and Era. This is intended for use by applications that need to use localized calendars. It is recommended that applications use the ISO-8601 date and time classes from this package across system boundaries, such as to the database or across the network. The calendar neutral API should be reserved for interactions with users.

Dates and Times

Instant is essentially a numeric timestamp. The current Instant can be retrieved from a Clock. This is useful for logging and persistence of a point in time and has in the past been associated with storing the result from System.currentTimeMillis().

LocalDate stores a date without a time. This stores a date like '2010-12-03' and could be used to store a birthday.

LocalTime stores a time without a date. This stores a time like '11:30' and could be used to store an opening or closing time.

LocalDateTime stores a date and time. This stores a date-time like '2010-12-03T11:30'.

ZonedDateTime stores a date and time with a time-zone. This is useful if you want to perform accurate calculations of dates and times taking into account the ZoneId, such as 'Europe/Paris'. Where possible, it is recommended to use a simpler class without a time-zone. The widespread use of time-zones tends to add considerable complexity to an application.

Duration and Period

Beyond dates and times, the API also allows the storage of period and durations of time. A Duration is a simple measure of time along the time-line in nanoseconds. A Period expresses an amount of time in units meaningful to humans, such as years or hours.

Additional value types

Month stores a month on its own. This stores a single month-of-year in isolation, such as 'DECEMBER'.

DayOfWeek stores a day-of-week on its own. This stores a single day-of-week in isolation, such as 'TUESDAY'.

Year stores a year on its own. This stores a single year in isolation, such as '2010'.

YearMonth stores a year and month without a day or time. This stores a year and month, such as '2010-12' and could be used for a credit card expiry.

MonthDay stores a month and day without a year or time. This stores a month and day-of-month, such as '--12-03' and could be used to store an annual event like a birthday without storing the year.

OffsetTime stores a time and offset from UTC without a date. This stores a date like '11:30+01:00'. The ZoneOffset is of the form '+01:00'.

OffsetDateTime stores a date and time and offset from UTC. This stores a date-time like '2010-12-03T11:30+01:00'. This is sometimes found in XML messages and other forms of persistence, but contains less information than a full time-zone.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Design notes (non normative)

The API has been designed to reject null early and to be clear about this behavior. A key exception is any method that takes an object and returns a boolean, for the purpose of checking or validating, will generally return false for null.

The API is designed to be type-safe where reasonable in the main high-level API. Thus, there are separate classes for the distinct concepts of date, time and date-time, plus variants for offset and time-zone. This can seem like a lot of classes, but most applications can begin with just five date/time types.

  • Instant - a timestamp
  • LocalDate - a date without a time, or any reference to an offset or time-zone
  • LocalTime - a time without a date, or any reference to an offset or time-zone
  • LocalDateTime - combines date and time, but still without any offset or time-zone
  • ZonedDateTime - a "full" date-time with time-zone and resolved offset from UTC/Greenwich

Instant is the closest equivalent class to java.util.Date. ZonedDateTime is the closest equivalent class to java.util.GregorianCalendar.

Where possible, applications should use LocalDate, LocalTime and LocalDateTime to better model the domain. For example, a birthday should be stored in a code LocalDate. Bear in mind that any use of a time-zone, such as 'Europe/Paris', adds considerable complexity to a calculation. Many applications can be written only using LocalDate, LocalTime and Instant, with the time-zone added at the user interface (UI) layer.

The offset-based date-time types OffsetTime and OffsetDateTime, are intended primarily for use with network protocols and database access. For example, most databases cannot automatically store a time-zone like 'Europe/Paris', but they can store an offset like '+02:00'.

Classes are also provided for the most important sub-parts of a date, including Month, DayOfWeek, Year, YearMonth and MonthDay. These can be used to model more complex date-time concepts. For example, YearMonth is useful for representing a credit card expiry.

Note that while there are a large number of classes representing different aspects of dates, there are relatively few dealing with different aspects of time. Following type-safety to its logical conclusion would have resulted in classes for hour-minute, hour-minute-second and hour-minute-second-nanosecond. While logically pure, this was not a practical option as it would have almost tripled the number of classes due to the combinations of date and time. Thus, LocalTime is used for all precisions of time, with zeroes used to imply lower precision.

Following full type-safety to its ultimate conclusion might also argue for a separate class for each field in date-time, such as a class for HourOfDay and another for DayOfMonth. This approach was tried, but was excessively complicated in the Java language, lacking usability. A similar problem occurs with periods. There is a case for a separate class for each period unit, such as a type for Years and a type for Minutes. However, this yields a lot of classes and a problem of type conversion. Thus, the set of date-time types provided is a compromise between purity and practicality.

The API has a relatively large surface area in terms of number of methods. This is made manageable through the use of consistent method prefixes.

  • of - static factory method
  • parse - static factory method focussed on parsing
  • get - gets the value of something
  • is - checks if something is true
  • with - the immutable equivalent of a setter
  • plus - adds an amount to an object
  • minus - subtracts an amount from an object
  • to - converts this object to another type
  • at - combines this object with another, such as date.atTime(time)

Multiple calendar systems is an awkward addition to the design challenges. The first principal is that most users want the standard ISO calendar system. As such, the main classes are ISO-only. The second principal is that most of those that want a non-ISO calendar system want it for user interaction, thus it is a UI localization issue. As such, date and time objects should be held as ISO objects in the data model and persistent storage, only being converted to and from a local calendar for display. The calendar system would be stored separately in the user preferences.

There are, however, some limited use cases where users believe they need to store and use dates in arbitrary calendar systems throughout the application. This is supported by ChronoLocalDate, however it is vital to read all the associated warnings in the Javadoc of that interface before using it. In summary, applications that require general interoperation between multiple calendar systems typically need to be written in a very different way to those only using the ISO calendar, thus most applications should just use ISO and avoid ChronoLocalDate.

The API is also designed for user extensibility, as there are many ways of calculating time. The field and unit API, accessed via TemporalAccessor and Temporal provide considerable flexibility to applications. In addition, the TemporalQuery and TemporalAdjuster interfaces provide day-to-day power, allowing code to read close to business requirements:

   LocalDate customerBirthday = customer.loadBirthdayFromDatabase();
   LocalDate today = LocalDate.now();
   if (customerBirthday.equals(today)) {
     LocalDate specialOfferExpiryDate = today.plusWeeks(2).with(next(FRIDAY));
     customer.sendBirthdaySpecialOffer(specialOfferExpiryDate);
   }
Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.time

Classes

  • Clock
  • Duration
  • Instant
  • LocalDate
  • LocalDateTime
  • LocalTime
  • MonthDay
  • OffsetDateTime
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneId
  • ZoneOffset

Enums

  • DayOfWeek
  • Month

Exceptions

  • DateTimeException


compact1 - java.time.chrono

Interfaces

  • ChronoLocalDate
  • ChronoLocalDateTime
  • Chronology
  • ChronoPeriod
  • ChronoZonedDateTime
  • Era

Classes

  • AbstractChronology
  • HijrahChronology
  • HijrahDate
  • IsoChronology
  • JapaneseChronology
  • JapaneseDate
  • JapaneseEra
  • MinguoChronology
  • MinguoDate
  • ThaiBuddhistChronology
  • ThaiBuddhistDate

Enums

  • HijrahEra
  • IsoEra
  • MinguoEra
  • ThaiBuddhistEra


chrono

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.time.chrono

Generic API for calendar systems other than the default ISO.

See: Description

  • Interface Summary
    Interface Description
    ChronoLocalDate
    A date without time-of-day or time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoLocalDateTime<D extends ChronoLocalDate>
    A date-time without a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Chronology
    A calendar system, used to organize and identify dates.
    ChronoPeriod
    A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoZonedDateTime<D extends ChronoLocalDate>
    A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Era
    An era of the time-line.
  • Class Summary
    Class Description
    AbstractChronology
    An abstract implementation of a calendar system, used to organize and identify dates.
    HijrahChronology
    The Hijrah calendar is a lunar calendar supporting Islamic calendars.
    HijrahDate
    A date in the Hijrah calendar system.
    IsoChronology
    The ISO calendar system.
    JapaneseChronology
    The Japanese Imperial calendar system.
    JapaneseDate
    A date in the Japanese Imperial calendar system.
    JapaneseEra
    An era in the Japanese Imperial calendar system.
    MinguoChronology
    The Minguo calendar system.
    MinguoDate
    A date in the Minguo calendar system.
    ThaiBuddhistChronology
    The Thai Buddhist calendar system.
    ThaiBuddhistDate
    A date in the Thai Buddhist calendar system.
  • Enum Summary
    Enum Description
    HijrahEra
    An era in the Hijrah calendar system.
    IsoEra
    An era in the ISO calendar system.
    MinguoEra
    An era in the Minguo calendar system.
    ThaiBuddhistEra
    An era in the Thai Buddhist calendar system.

Package java.time.chrono Description

Generic API for calendar systems other than the default ISO.

The main API is based around the calendar system defined in ISO-8601. However, there are other calendar systems, and this package provides basic support for them. The alternate calendars are provided in the java.time.chrono package.

A calendar system is defined by the Chronology interface, while a date in a calendar system is defined by the ChronoLocalDate interface.

It is intended that applications use the main API whenever possible, including code to read and write from a persistent data store, such as a database, and to send dates and times across a network. The "chrono" classes are then used at the user interface level to deal with localized input/output. See ChronoLocalDate for a full discussion of the issues.

Using non-ISO calendar systems in an application introduces significant extra complexity. Ensure that the warnings and recommendations in ChronoLocalDate have been read before working with the "chrono" interfaces.

The supported calendar systems includes:

  • Hijrah calendar
  • Japanese calendar
  • Minguo calendar
  • Thai Buddhist calendar

Example

This example lists todays date for all of the available calendars.

   // Enumerate the list of available calendars and print todays date for each.
       Set<Chronology> chronos = Chronology.getAvailableChronologies();
       for (Chronology chrono : chronos) {
           ChronoLocalDate date = chrono.dateNow();
           System.out.printf("   %20s: %s%n", chrono.getId(), date.toString());
       }

This example creates and uses a date in a named non-ISO calendar system.

   // Print the Thai Buddhist date
       ChronoLocalDate now1 = Chronology.of("ThaiBuddhist").dateNow();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);
   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ChronoLocalDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ChronoLocalDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

This example creates and uses a date in a specific ThaiBuddhist calendar system.

   // Print the Thai Buddhist date
       ThaiBuddhistDate now1 = ThaiBuddhistDate.now();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);

   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ThaiBuddhistDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ThaiBuddhistDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.time.chrono

Interfaces

  • ChronoLocalDate
  • ChronoLocalDateTime
  • Chronology
  • ChronoPeriod
  • ChronoZonedDateTime
  • Era

Classes

  • AbstractChronology
  • HijrahChronology
  • HijrahDate
  • IsoChronology
  • JapaneseChronology
  • JapaneseDate
  • JapaneseEra
  • MinguoChronology
  • MinguoDate
  • ThaiBuddhistChronology
  • ThaiBuddhistDate

Enums

  • HijrahEra
  • IsoEra
  • MinguoEra
  • ThaiBuddhistEra


chrono

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.time.chrono

Generic API for calendar systems other than the default ISO.

See: Description

  • Interface Summary
    Interface Description
    ChronoLocalDate
    A date without time-of-day or time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoLocalDateTime<D extends ChronoLocalDate>
    A date-time without a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Chronology
    A calendar system, used to organize and identify dates.
    ChronoPeriod
    A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoZonedDateTime<D extends ChronoLocalDate>
    A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Era
    An era of the time-line.
  • Class Summary
    Class Description
    AbstractChronology
    An abstract implementation of a calendar system, used to organize and identify dates.
    HijrahChronology
    The Hijrah calendar is a lunar calendar supporting Islamic calendars.
    HijrahDate
    A date in the Hijrah calendar system.
    IsoChronology
    The ISO calendar system.
    JapaneseChronology
    The Japanese Imperial calendar system.
    JapaneseDate
    A date in the Japanese Imperial calendar system.
    JapaneseEra
    An era in the Japanese Imperial calendar system.
    MinguoChronology
    The Minguo calendar system.
    MinguoDate
    A date in the Minguo calendar system.
    ThaiBuddhistChronology
    The Thai Buddhist calendar system.
    ThaiBuddhistDate
    A date in the Thai Buddhist calendar system.
  • Enum Summary
    Enum Description
    HijrahEra
    An era in the Hijrah calendar system.
    IsoEra
    An era in the ISO calendar system.
    MinguoEra
    An era in the Minguo calendar system.
    ThaiBuddhistEra
    An era in the Thai Buddhist calendar system.

Package java.time.chrono Description

Generic API for calendar systems other than the default ISO.

The main API is based around the calendar system defined in ISO-8601. However, there are other calendar systems, and this package provides basic support for them. The alternate calendars are provided in the java.time.chrono package.

A calendar system is defined by the Chronology interface, while a date in a calendar system is defined by the ChronoLocalDate interface.

It is intended that applications use the main API whenever possible, including code to read and write from a persistent data store, such as a database, and to send dates and times across a network. The "chrono" classes are then used at the user interface level to deal with localized input/output. See ChronoLocalDate for a full discussion of the issues.

Using non-ISO calendar systems in an application introduces significant extra complexity. Ensure that the warnings and recommendations in ChronoLocalDate have been read before working with the "chrono" interfaces.

The supported calendar systems includes:

  • Hijrah calendar
  • Japanese calendar
  • Minguo calendar
  • Thai Buddhist calendar

Example

This example lists todays date for all of the available calendars.

   // Enumerate the list of available calendars and print todays date for each.
       Set<Chronology> chronos = Chronology.getAvailableChronologies();
       for (Chronology chrono : chronos) {
           ChronoLocalDate date = chrono.dateNow();
           System.out.printf("   %20s: %s%n", chrono.getId(), date.toString());
       }

This example creates and uses a date in a named non-ISO calendar system.

   // Print the Thai Buddhist date
       ChronoLocalDate now1 = Chronology.of("ThaiBuddhist").dateNow();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);
   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ChronoLocalDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ChronoLocalDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

This example creates and uses a date in a specific ThaiBuddhist calendar system.

   // Print the Thai Buddhist date
       ThaiBuddhistDate now1 = ThaiBuddhistDate.now();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);

   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ThaiBuddhistDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ThaiBuddhistDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.time.chrono

Interfaces

  • ChronoLocalDate
  • ChronoLocalDateTime
  • Chronology
  • ChronoPeriod
  • ChronoZonedDateTime
  • Era

Classes

  • AbstractChronology
  • HijrahChronology
  • HijrahDate
  • IsoChronology
  • JapaneseChronology
  • JapaneseDate
  • JapaneseEra
  • MinguoChronology
  • MinguoDate
  • ThaiBuddhistChronology
  • ThaiBuddhistDate

Enums

  • HijrahEra
  • IsoEra
  • MinguoEra
  • ThaiBuddhistEra


chrono

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.time.chrono

Generic API for calendar systems other than the default ISO.

See: Description

  • Interface Summary
    Interface Description
    ChronoLocalDate
    A date without time-of-day or time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoLocalDateTime<D extends ChronoLocalDate>
    A date-time without a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Chronology
    A calendar system, used to organize and identify dates.
    ChronoPeriod
    A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.
    ChronoZonedDateTime<D extends ChronoLocalDate>
    A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.
    Era
    An era of the time-line.
  • Class Summary
    Class Description
    AbstractChronology
    An abstract implementation of a calendar system, used to organize and identify dates.
    HijrahChronology
    The Hijrah calendar is a lunar calendar supporting Islamic calendars.
    HijrahDate
    A date in the Hijrah calendar system.
    IsoChronology
    The ISO calendar system.
    JapaneseChronology
    The Japanese Imperial calendar system.
    JapaneseDate
    A date in the Japanese Imperial calendar system.
    JapaneseEra
    An era in the Japanese Imperial calendar system.
    MinguoChronology
    The Minguo calendar system.
    MinguoDate
    A date in the Minguo calendar system.
    ThaiBuddhistChronology
    The Thai Buddhist calendar system.
    ThaiBuddhistDate
    A date in the Thai Buddhist calendar system.
  • Enum Summary
    Enum Description
    HijrahEra
    An era in the Hijrah calendar system.
    IsoEra
    An era in the ISO calendar system.
    MinguoEra
    An era in the Minguo calendar system.
    ThaiBuddhistEra
    An era in the Thai Buddhist calendar system.

Package java.time.chrono Description

Generic API for calendar systems other than the default ISO.

The main API is based around the calendar system defined in ISO-8601. However, there are other calendar systems, and this package provides basic support for them. The alternate calendars are provided in the java.time.chrono package.

A calendar system is defined by the Chronology interface, while a date in a calendar system is defined by the ChronoLocalDate interface.

It is intended that applications use the main API whenever possible, including code to read and write from a persistent data store, such as a database, and to send dates and times across a network. The "chrono" classes are then used at the user interface level to deal with localized input/output. See ChronoLocalDate for a full discussion of the issues.

Using non-ISO calendar systems in an application introduces significant extra complexity. Ensure that the warnings and recommendations in ChronoLocalDate have been read before working with the "chrono" interfaces.

The supported calendar systems includes:

  • Hijrah calendar
  • Japanese calendar
  • Minguo calendar
  • Thai Buddhist calendar

Example

This example lists todays date for all of the available calendars.

   // Enumerate the list of available calendars and print todays date for each.
       Set<Chronology> chronos = Chronology.getAvailableChronologies();
       for (Chronology chrono : chronos) {
           ChronoLocalDate date = chrono.dateNow();
           System.out.printf("   %20s: %s%n", chrono.getId(), date.toString());
       }

This example creates and uses a date in a named non-ISO calendar system.

   // Print the Thai Buddhist date
       ChronoLocalDate now1 = Chronology.of("ThaiBuddhist").dateNow();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);
   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ChronoLocalDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ChronoLocalDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

This example creates and uses a date in a specific ThaiBuddhist calendar system.

   // Print the Thai Buddhist date
       ThaiBuddhistDate now1 = ThaiBuddhistDate.now();
       int day = now1.get(ChronoField.DAY_OF_MONTH);
       int dow = now1.get(ChronoField.DAY_OF_WEEK);
       int month = now1.get(ChronoField.MONTH_OF_YEAR);
       int year = now1.get(ChronoField.YEAR);
       System.out.printf("  Today is %s %s %d-%s-%d%n", now1.getChronology().getId(),
                 dow, day, month, year);

   // Print today's date and the last day of the year for the Thai Buddhist Calendar.
       ThaiBuddhistDate first = now1
                 .with(ChronoField.DAY_OF_MONTH, 1)
                 .with(ChronoField.MONTH_OF_YEAR, 1);
       ThaiBuddhistDate last = first
                 .plus(1, ChronoUnit.YEARS)
                 .minus(1, ChronoUnit.DAYS);
       System.out.printf("  %s: 1st of year: %s; end of year: %s%n", last.getChronology().getId(),
                 first, last);

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.time.chrono

Interfaces

  • ChronoLocalDate
  • ChronoLocalDateTime
  • Chronology
  • ChronoPeriod
  • ChronoZonedDateTime
  • Era

Classes

  • AbstractChronology
  • HijrahChronology
  • HijrahDate
  • IsoChronology
  • JapaneseChronology
  • JapaneseDate
  • JapaneseEra
  • MinguoChronology
  • MinguoDate
  • ThaiBuddhistChronology
  • ThaiBuddhistDate

Enums

  • HijrahEra
  • IsoEra
  • MinguoEra
  • ThaiBuddhistEra


compact1 - java.time.format

Classes

  • DateTimeFormatter
  • DateTimeFormatterBuilder
  • DecimalStyle

Enums

  • FormatStyle
  • ResolverStyle
  • SignStyle
  • TextStyle

Exceptions

  • DateTimeParseException


format

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.time.format

Provides classes to print and parse dates and times.

See: Description

  • Class Summary
    Class Description
    DateTimeFormatter
    Formatter for printing and parsing date-time objects.
    DateTimeFormatterBuilder
    Builder to create date-time formatters.
    DecimalStyle
    Localized decimal style used in date and time formatting.
  • Enum Summary
    Enum Description
    FormatStyle
    Enumeration of the style of a localized date, time or date-time formatter.
    ResolverStyle
    Enumeration of different ways to resolve dates and times.
    SignStyle
    Enumeration of ways to handle the positive/negative sign.
    TextStyle
    Enumeration of the style of text formatting and parsing.
  • Exception Summary
    Exception Description
    DateTimeParseException
    An exception thrown when an error occurs during parsing.

Package java.time.format Description

Provides classes to print and parse dates and times.

Printing and parsing is based around the DateTimeFormatter class. Instances are generally obtained from DateTimeFormatter, however DateTimeFormatterBuilder can be used if more power is needed.

Localization occurs by calling withLocale(Locale) on the formatter. Further customization is possible using DecimalStyle.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.time.format

Classes

  • DateTimeFormatter
  • DateTimeFormatterBuilder
  • DecimalStyle

Enums

  • FormatStyle
  • ResolverStyle
  • SignStyle
  • TextStyle

Exceptions

  • DateTimeParseException


format

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.time.format

Provides classes to print and parse dates and times.

See: Description

  • Class Summary
    Class Description
    DateTimeFormatter
    Formatter for printing and parsing date-time objects.
    DateTimeFormatterBuilder
    Builder to create date-time formatters.
    DecimalStyle
    Localized decimal style used in date and time formatting.
  • Enum Summary
    Enum Description
    FormatStyle
    Enumeration of the style of a localized date, time or date-time formatter.
    ResolverStyle
    Enumeration of different ways to resolve dates and times.
    SignStyle
    Enumeration of ways to handle the positive/negative sign.
    TextStyle
    Enumeration of the style of text formatting and parsing.
  • Exception Summary
    Exception Description
    DateTimeParseException
    An exception thrown when an error occurs during parsing.

Package java.time.format Description

Provides classes to print and parse dates and times.

Printing and parsing is based around the DateTimeFormatter class. Instances are generally obtained from DateTimeFormatter, however DateTimeFormatterBuilder can be used if more power is needed.

Localization occurs by calling withLocale(Locale) on the formatter. Further customization is possible using DecimalStyle.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.time.format

Classes

  • DateTimeFormatter
  • DateTimeFormatterBuilder
  • DecimalStyle

Enums

  • FormatStyle
  • ResolverStyle
  • SignStyle
  • TextStyle

Exceptions

  • DateTimeParseException


format

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.time.format

Provides classes to print and parse dates and times.

See: Description

  • Class Summary
    Class Description
    DateTimeFormatter
    Formatter for printing and parsing date-time objects.
    DateTimeFormatterBuilder
    Builder to create date-time formatters.
    DecimalStyle
    Localized decimal style used in date and time formatting.
  • Enum Summary
    Enum Description
    FormatStyle
    Enumeration of the style of a localized date, time or date-time formatter.
    ResolverStyle
    Enumeration of different ways to resolve dates and times.
    SignStyle
    Enumeration of ways to handle the positive/negative sign.
    TextStyle
    Enumeration of the style of text formatting and parsing.
  • Exception Summary
    Exception Description
    DateTimeParseException
    An exception thrown when an error occurs during parsing.

Package java.time.format Description

Provides classes to print and parse dates and times.

Printing and parsing is based around the DateTimeFormatter class. Instances are generally obtained from DateTimeFormatter, however DateTimeFormatterBuilder can be used if more power is needed.

Localization occurs by calling withLocale(Locale) on the formatter. Further customization is possible using DecimalStyle.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.time.format

Classes

  • DateTimeFormatter
  • DateTimeFormatterBuilder
  • DecimalStyle

Enums

  • FormatStyle
  • ResolverStyle
  • SignStyle
  • TextStyle

Exceptions

  • DateTimeParseException


compact1 - java.time.temporal

Interfaces

  • Temporal
  • TemporalAccessor
  • TemporalAdjuster
  • TemporalAmount
  • TemporalField
  • TemporalQuery
  • TemporalUnit

Classes

  • IsoFields
  • JulianFields
  • TemporalAdjusters
  • TemporalQueries
  • ValueRange
  • WeekFields

Enums

  • ChronoField
  • ChronoUnit

Exceptions

  • UnsupportedTemporalTypeException


temporal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.time.temporal

Access to date and time using fields and units, and date time adjusters.

See: Description

  • Interface Summary
    Interface Description
    Temporal
    Framework-level interface defining read-write access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAccessor
    Framework-level interface defining read-only access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAdjuster
    Strategy for adjusting a temporal object.
    TemporalAmount
    Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months".
    TemporalField
    A field of date-time, such as month-of-year or hour-of-minute.
    TemporalQuery<R>
    Strategy for querying a temporal object.
    TemporalUnit
    A unit of date-time, such as Days or Hours.
  • Class Summary
    Class Description
    IsoFields
    Fields and units specific to the ISO-8601 calendar system, including quarter-of-year and week-based-year.
    JulianFields
    A set of date fields that provide access to Julian Days.
    TemporalAdjusters
    Common and useful TemporalAdjusters.
    TemporalQueries
    Common implementations of TemporalQuery.
    ValueRange
    The range of valid values for a date-time field.
    WeekFields
    Localized definitions of the day-of-week, week-of-month and week-of-year fields.
  • Enum Summary
    Enum Description
    ChronoField
    A standard set of fields.
    ChronoUnit
    A standard set of date periods units.
  • Exception Summary
    Exception Description
    UnsupportedTemporalTypeException
    UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class.

Package java.time.temporal Description

Access to date and time using fields and units, and date time adjusters.

This package expands on the base package to provide additional functionality for more powerful use cases. Support is included for:

  • Units of date-time, such as years, months, days and hours
  • Fields of date-time, such as month-of-year, day-of-week or hour-of-day
  • Date-time adjustment functions
  • Different definitions of weeks

Fields and Units

Dates and times are expressed in terms of fields and units. A unit is used to measure an amount of time, such as years, days or minutes. All units implement TemporalUnit. The set of well known units is defined in ChronoUnit, such as DAYS. The unit interface is designed to allow application defined units.

A field is used to express part of a larger date-time, such as year, month-of-year or second-of-minute. All fields implement TemporalField. The set of well known fields are defined in ChronoField, such as HOUR_OF_DAY. Additional fields are defined by JulianFields, WeekFields and IsoFields. The field interface is designed to allow application defined fields.

This package provides tools that allow the units and fields of date and time to be accessed in a general way most suited for frameworks. Temporal provides the abstraction for date time types that support fields. Its methods support getting the value of a field, creating a new date time with the value of a field modified, and querying for additional information, typically used to extract the offset or time-zone.

One use of fields in application code is to retrieve fields for which there is no convenience method. For example, getting the day-of-month is common enough that there is a method on LocalDate called getDayOfMonth(). However for more unusual fields it is necessary to use the field. For example, date.get(ChronoField.ALIGNED_WEEK_OF_MONTH). The fields also provide access to the range of valid values.

Adjustment and Query

A key part of the date-time problem space is adjusting a date to a new, related value, such as the "last day of the month", or "next Wednesday". These are modeled as functions that adjust a base date-time. The functions implement TemporalAdjuster and operate on Temporal. A set of common functions are provided in TemporalAdjusters. For example, to find the first occurrence of a day-of-week after a given date, use TemporalAdjusters.next(DayOfWeek), such as date.with(next(MONDAY)). Applications can also define adjusters by implementing TemporalAdjuster.

The TemporalAmount interface models amounts of relative time.

In addition to adjusting a date-time, an interface is provided to enable querying via TemporalQuery. The most common implementations of the query interface are method references. The from(TemporalAccessor) methods on major classes can all be used, such as LocalDate::from or Month::from. Further implementations are provided in TemporalQueries as static methods. Applications can also define queries by implementing TemporalQuery.

Weeks

Different locales have different definitions of the week. For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday. The WeekFields class models this distinction.

The ISO calendar system defines an additional week-based division of years. This defines a year based on whole Monday to Monday weeks. This is modeled in IsoFields.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.time.temporal

Interfaces

  • Temporal
  • TemporalAccessor
  • TemporalAdjuster
  • TemporalAmount
  • TemporalField
  • TemporalQuery
  • TemporalUnit

Classes

  • IsoFields
  • JulianFields
  • TemporalAdjusters
  • TemporalQueries
  • ValueRange
  • WeekFields

Enums

  • ChronoField
  • ChronoUnit

Exceptions

  • UnsupportedTemporalTypeException


temporal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.time.temporal

Access to date and time using fields and units, and date time adjusters.

See: Description

  • Interface Summary
    Interface Description
    Temporal
    Framework-level interface defining read-write access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAccessor
    Framework-level interface defining read-only access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAdjuster
    Strategy for adjusting a temporal object.
    TemporalAmount
    Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months".
    TemporalField
    A field of date-time, such as month-of-year or hour-of-minute.
    TemporalQuery<R>
    Strategy for querying a temporal object.
    TemporalUnit
    A unit of date-time, such as Days or Hours.
  • Class Summary
    Class Description
    IsoFields
    Fields and units specific to the ISO-8601 calendar system, including quarter-of-year and week-based-year.
    JulianFields
    A set of date fields that provide access to Julian Days.
    TemporalAdjusters
    Common and useful TemporalAdjusters.
    TemporalQueries
    Common implementations of TemporalQuery.
    ValueRange
    The range of valid values for a date-time field.
    WeekFields
    Localized definitions of the day-of-week, week-of-month and week-of-year fields.
  • Enum Summary
    Enum Description
    ChronoField
    A standard set of fields.
    ChronoUnit
    A standard set of date periods units.
  • Exception Summary
    Exception Description
    UnsupportedTemporalTypeException
    UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class.

Package java.time.temporal Description

Access to date and time using fields and units, and date time adjusters.

This package expands on the base package to provide additional functionality for more powerful use cases. Support is included for:

  • Units of date-time, such as years, months, days and hours
  • Fields of date-time, such as month-of-year, day-of-week or hour-of-day
  • Date-time adjustment functions
  • Different definitions of weeks

Fields and Units

Dates and times are expressed in terms of fields and units. A unit is used to measure an amount of time, such as years, days or minutes. All units implement TemporalUnit. The set of well known units is defined in ChronoUnit, such as DAYS. The unit interface is designed to allow application defined units.

A field is used to express part of a larger date-time, such as year, month-of-year or second-of-minute. All fields implement TemporalField. The set of well known fields are defined in ChronoField, such as HOUR_OF_DAY. Additional fields are defined by JulianFields, WeekFields and IsoFields. The field interface is designed to allow application defined fields.

This package provides tools that allow the units and fields of date and time to be accessed in a general way most suited for frameworks. Temporal provides the abstraction for date time types that support fields. Its methods support getting the value of a field, creating a new date time with the value of a field modified, and querying for additional information, typically used to extract the offset or time-zone.

One use of fields in application code is to retrieve fields for which there is no convenience method. For example, getting the day-of-month is common enough that there is a method on LocalDate called getDayOfMonth(). However for more unusual fields it is necessary to use the field. For example, date.get(ChronoField.ALIGNED_WEEK_OF_MONTH). The fields also provide access to the range of valid values.

Adjustment and Query

A key part of the date-time problem space is adjusting a date to a new, related value, such as the "last day of the month", or "next Wednesday". These are modeled as functions that adjust a base date-time. The functions implement TemporalAdjuster and operate on Temporal. A set of common functions are provided in TemporalAdjusters. For example, to find the first occurrence of a day-of-week after a given date, use TemporalAdjusters.next(DayOfWeek), such as date.with(next(MONDAY)). Applications can also define adjusters by implementing TemporalAdjuster.

The TemporalAmount interface models amounts of relative time.

In addition to adjusting a date-time, an interface is provided to enable querying via TemporalQuery. The most common implementations of the query interface are method references. The from(TemporalAccessor) methods on major classes can all be used, such as LocalDate::from or Month::from. Further implementations are provided in TemporalQueries as static methods. Applications can also define queries by implementing TemporalQuery.

Weeks

Different locales have different definitions of the week. For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday. The WeekFields class models this distinction.

The ISO calendar system defines an additional week-based division of years. This defines a year based on whole Monday to Monday weeks. This is modeled in IsoFields.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.time.temporal

Interfaces

  • Temporal
  • TemporalAccessor
  • TemporalAdjuster
  • TemporalAmount
  • TemporalField
  • TemporalQuery
  • TemporalUnit

Classes

  • IsoFields
  • JulianFields
  • TemporalAdjusters
  • TemporalQueries
  • ValueRange
  • WeekFields

Enums

  • ChronoField
  • ChronoUnit

Exceptions

  • UnsupportedTemporalTypeException


temporal

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.time.temporal

Access to date and time using fields and units, and date time adjusters.

See: Description

  • Interface Summary
    Interface Description
    Temporal
    Framework-level interface defining read-write access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAccessor
    Framework-level interface defining read-only access to a temporal object, such as a date, time, offset or some combination of these.
    TemporalAdjuster
    Strategy for adjusting a temporal object.
    TemporalAmount
    Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months".
    TemporalField
    A field of date-time, such as month-of-year or hour-of-minute.
    TemporalQuery<R>
    Strategy for querying a temporal object.
    TemporalUnit
    A unit of date-time, such as Days or Hours.
  • Class Summary
    Class Description
    IsoFields
    Fields and units specific to the ISO-8601 calendar system, including quarter-of-year and week-based-year.
    JulianFields
    A set of date fields that provide access to Julian Days.
    TemporalAdjusters
    Common and useful TemporalAdjusters.
    TemporalQueries
    Common implementations of TemporalQuery.
    ValueRange
    The range of valid values for a date-time field.
    WeekFields
    Localized definitions of the day-of-week, week-of-month and week-of-year fields.
  • Enum Summary
    Enum Description
    ChronoField
    A standard set of fields.
    ChronoUnit
    A standard set of date periods units.
  • Exception Summary
    Exception Description
    UnsupportedTemporalTypeException
    UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class.

Package java.time.temporal Description

Access to date and time using fields and units, and date time adjusters.

This package expands on the base package to provide additional functionality for more powerful use cases. Support is included for:

  • Units of date-time, such as years, months, days and hours
  • Fields of date-time, such as month-of-year, day-of-week or hour-of-day
  • Date-time adjustment functions
  • Different definitions of weeks

Fields and Units

Dates and times are expressed in terms of fields and units. A unit is used to measure an amount of time, such as years, days or minutes. All units implement TemporalUnit. The set of well known units is defined in ChronoUnit, such as DAYS. The unit interface is designed to allow application defined units.

A field is used to express part of a larger date-time, such as year, month-of-year or second-of-minute. All fields implement TemporalField. The set of well known fields are defined in ChronoField, such as HOUR_OF_DAY. Additional fields are defined by JulianFields, WeekFields and IsoFields. The field interface is designed to allow application defined fields.

This package provides tools that allow the units and fields of date and time to be accessed in a general way most suited for frameworks. Temporal provides the abstraction for date time types that support fields. Its methods support getting the value of a field, creating a new date time with the value of a field modified, and querying for additional information, typically used to extract the offset or time-zone.

One use of fields in application code is to retrieve fields for which there is no convenience method. For example, getting the day-of-month is common enough that there is a method on LocalDate called getDayOfMonth(). However for more unusual fields it is necessary to use the field. For example, date.get(ChronoField.ALIGNED_WEEK_OF_MONTH). The fields also provide access to the range of valid values.

Adjustment and Query

A key part of the date-time problem space is adjusting a date to a new, related value, such as the "last day of the month", or "next Wednesday". These are modeled as functions that adjust a base date-time. The functions implement TemporalAdjuster and operate on Temporal. A set of common functions are provided in TemporalAdjusters. For example, to find the first occurrence of a day-of-week after a given date, use TemporalAdjusters.next(DayOfWeek), such as date.with(next(MONDAY)). Applications can also define adjusters by implementing TemporalAdjuster.

The TemporalAmount interface models amounts of relative time.

In addition to adjusting a date-time, an interface is provided to enable querying via TemporalQuery. The most common implementations of the query interface are method references. The from(TemporalAccessor) methods on major classes can all be used, such as LocalDate::from or Month::from. Further implementations are provided in TemporalQueries as static methods. Applications can also define queries by implementing TemporalQuery.

Weeks

Different locales have different definitions of the week. For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday. The WeekFields class models this distinction.

The ISO calendar system defines an additional week-based division of years. This defines a year based on whole Monday to Monday weeks. This is modeled in IsoFields.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.time.temporal

Interfaces

  • Temporal
  • TemporalAccessor
  • TemporalAdjuster
  • TemporalAmount
  • TemporalField
  • TemporalQuery
  • TemporalUnit

Classes

  • IsoFields
  • JulianFields
  • TemporalAdjusters
  • TemporalQueries
  • ValueRange
  • WeekFields

Enums

  • ChronoField
  • ChronoUnit

Exceptions

  • UnsupportedTemporalTypeException


compact1 - java.time.zone

Classes

  • ZoneOffsetTransition
  • ZoneOffsetTransitionRule
  • ZoneRules
  • ZoneRulesProvider

Enums

  • ZoneOffsetTransitionRule.TimeDefinition

Exceptions

  • ZoneRulesException


zone

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.time.zone

Support for time-zones and their rules.

See: Description

  • Class Summary
    Class Description
    ZoneOffsetTransition
    A transition between two offsets caused by a discontinuity in the local time-line.
    ZoneOffsetTransitionRule
    A rule expressing how to create a transition.
    ZoneRules
    The rules defining how the zone offset varies for a single time-zone.
    ZoneRulesProvider
    Provider of time-zone rules to the system.
  • Enum Summary
    Enum Description
    ZoneOffsetTransitionRule.TimeDefinition
    A definition of the way a local time can be converted to the actual transition date-time.
  • Exception Summary
    Exception Description
    ZoneRulesException
    Thrown to indicate a problem with time-zone configuration.

Package java.time.zone Description

Support for time-zones and their rules.

Daylight Saving Time and Time-Zones are concepts used by Governments to alter local time. This package provides support for time-zones, their rules and the resulting gaps and overlaps in the local time-line typically caused by Daylight Saving Time.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.time.zone

Classes

  • ZoneOffsetTransition
  • ZoneOffsetTransitionRule
  • ZoneRules
  • ZoneRulesProvider

Enums

  • ZoneOffsetTransitionRule.TimeDefinition

Exceptions

  • ZoneRulesException


zone

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.time.zone

Support for time-zones and their rules.

See: Description

  • Class Summary
    Class Description
    ZoneOffsetTransition
    A transition between two offsets caused by a discontinuity in the local time-line.
    ZoneOffsetTransitionRule
    A rule expressing how to create a transition.
    ZoneRules
    The rules defining how the zone offset varies for a single time-zone.
    ZoneRulesProvider
    Provider of time-zone rules to the system.
  • Enum Summary
    Enum Description
    ZoneOffsetTransitionRule.TimeDefinition
    A definition of the way a local time can be converted to the actual transition date-time.
  • Exception Summary
    Exception Description
    ZoneRulesException
    Thrown to indicate a problem with time-zone configuration.

Package java.time.zone Description

Support for time-zones and their rules.

Daylight Saving Time and Time-Zones are concepts used by Governments to alter local time. This package provides support for time-zones, their rules and the resulting gaps and overlaps in the local time-line typically caused by Daylight Saving Time.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.time.zone

Classes

  • ZoneOffsetTransition
  • ZoneOffsetTransitionRule
  • ZoneRules
  • ZoneRulesProvider

Enums

  • ZoneOffsetTransitionRule.TimeDefinition

Exceptions

  • ZoneRulesException


zone

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.time.zone

Support for time-zones and their rules.

See: Description

  • Class Summary
    Class Description
    ZoneOffsetTransition
    A transition between two offsets caused by a discontinuity in the local time-line.
    ZoneOffsetTransitionRule
    A rule expressing how to create a transition.
    ZoneRules
    The rules defining how the zone offset varies for a single time-zone.
    ZoneRulesProvider
    Provider of time-zone rules to the system.
  • Enum Summary
    Enum Description
    ZoneOffsetTransitionRule.TimeDefinition
    A definition of the way a local time can be converted to the actual transition date-time.
  • Exception Summary
    Exception Description
    ZoneRulesException
    Thrown to indicate a problem with time-zone configuration.

Package java.time.zone Description

Support for time-zones and their rules.

Daylight Saving Time and Time-Zones are concepts used by Governments to alter local time. This package provides support for time-zones, their rules and the resulting gaps and overlaps in the local time-line typically caused by Daylight Saving Time.

Package specification

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior. The "@throws NullPointerException" is not explicitly documented in each method.

All calculations should check for numeric overflow and throw either an ArithmeticException or a DateTimeException.

Since:
JDK1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.time.zone

Classes

  • ZoneOffsetTransition
  • ZoneOffsetTransitionRule
  • ZoneRules
  • ZoneRulesProvider

Enums

  • ZoneOffsetTransitionRule.TimeDefinition

Exceptions

  • ZoneRulesException


compact1 - java.util

Interfaces

  • Collection
  • Comparator
  • Deque
  • Enumeration
  • EventListener
  • Formattable
  • Iterator
  • List
  • ListIterator
  • Map
  • Map.Entry
  • NavigableMap
  • NavigableSet
  • Observer
  • PrimitiveIterator
  • PrimitiveIterator.OfDouble
  • PrimitiveIterator.OfInt
  • PrimitiveIterator.OfLong
  • Queue
  • RandomAccess
  • Set
  • SortedMap
  • SortedSet
  • Spliterator
  • Spliterator.OfDouble
  • Spliterator.OfInt
  • Spliterator.OfLong
  • Spliterator.OfPrimitive

Classes

  • AbstractCollection
  • AbstractList
  • AbstractMap
  • AbstractMap.SimpleEntry
  • AbstractMap.SimpleImmutableEntry
  • AbstractQueue
  • AbstractSequentialList
  • AbstractSet
  • ArrayDeque
  • ArrayList
  • Arrays
  • Base64
  • Base64.Decoder
  • Base64.Encoder
  • BitSet
  • Calendar
  • Calendar.Builder
  • Collections
  • Currency
  • Date
  • Dictionary
  • DoubleSummaryStatistics
  • EnumMap
  • EnumSet
  • EventListenerProxy
  • EventObject
  • FormattableFlags
  • Formatter
  • GregorianCalendar
  • HashMap
  • HashSet
  • Hashtable
  • IdentityHashMap
  • IntSummaryStatistics
  • LinkedHashMap
  • LinkedHashSet
  • LinkedList
  • ListResourceBundle
  • Locale
  • Locale.Builder
  • Locale.LanguageRange
  • LongSummaryStatistics
  • Objects
  • Observable
  • Optional
  • OptionalDouble
  • OptionalInt
  • OptionalLong
  • PriorityQueue
  • Properties
  • PropertyPermission
  • PropertyResourceBundle
  • Random
  • ResourceBundle
  • ResourceBundle.Control
  • Scanner
  • ServiceLoader
  • SimpleTimeZone
  • Spliterators
  • Spliterators.AbstractDoubleSpliterator
  • Spliterators.AbstractIntSpliterator
  • Spliterators.AbstractLongSpliterator
  • Spliterators.AbstractSpliterator
  • SplittableRandom
  • Stack
  • StringJoiner
  • StringTokenizer
  • Timer
  • TimerTask
  • TimeZone
  • TreeMap
  • TreeSet
  • UUID
  • Vector
  • WeakHashMap

Enums

  • Formatter.BigDecimalLayoutForm
  • Locale.Category
  • Locale.FilteringMode

Exceptions

  • ConcurrentModificationException
  • DuplicateFormatFlagsException
  • EmptyStackException
  • FormatFlagsConversionMismatchException
  • FormatterClosedException
  • IllegalFormatCodePointException
  • IllegalFormatConversionException
  • IllegalFormatException
  • IllegalFormatFlagsException
  • IllegalFormatPrecisionException
  • IllegalFormatWidthException
  • IllformedLocaleException
  • InputMismatchException
  • InvalidPropertiesFormatException
  • MissingFormatArgumentException
  • MissingFormatWidthException
  • MissingResourceException
  • NoSuchElementException
  • TooManyListenersException
  • UnknownFormatConversionException
  • UnknownFormatFlagsException

Errors

  • ServiceConfigurationError


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

See: Description

  • Interface Summary
    Interface Description
    Collection<E>
    The root interface in the collection hierarchy.
    Comparator<T>
    A comparison function, which imposes a total ordering on some collection of objects.
    Deque<E>
    A linear collection that supports element insertion and removal at both ends.
    Enumeration<E>
    An object that implements the Enumeration interface generates a series of elements, one at a time.
    EventListener
    A tagging interface that all event listener interfaces must extend.
    Formattable
    The Formattable interface must be implemented by any class that needs to perform custom formatting using the 's' conversion specifier of Formatter.
    Iterator<E>
    An iterator over a collection.
    List<E>
    An ordered collection (also known as a sequence).
    ListIterator<E>
    An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list.
    Map<K,V>
    An object that maps keys to values.
    Map.Entry<K,V>
    A map entry (key-value pair).
    NavigableMap<K,V>
    A SortedMap extended with navigation methods returning the closest matches for given search targets.
    NavigableSet<E>
    A SortedSet extended with navigation methods reporting closest matches for given search targets.
    Observer
    A class can implement the Observer interface when it wants to be informed of changes in observable objects.
    PrimitiveIterator<T,T_CONS>
    A base type for primitive specializations of Iterator.
    PrimitiveIterator.OfDouble
    An Iterator specialized for double values.
    PrimitiveIterator.OfInt
    An Iterator specialized for int values.
    PrimitiveIterator.OfLong
    An Iterator specialized for long values.
    Queue<E>
    A collection designed for holding elements prior to processing.
    RandomAccess
    Marker interface used by List implementations to indicate that they support fast (generally constant time) random access.
    Set<E>
    A collection that contains no duplicate elements.
    SortedMap<K,V>
    A Map that further provides a total ordering on its keys.
    SortedSet<E>
    A Set that further provides a total ordering on its elements.
    Spliterator<T>
    An object for traversing and partitioning elements of a source.
    Spliterator.OfDouble
    A Spliterator specialized for double values.
    Spliterator.OfInt
    A Spliterator specialized for int values.
    Spliterator.OfLong
    A Spliterator specialized for long values.
    Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
    A Spliterator specialized for primitive values.
  • Class Summary
    Class Description
    AbstractCollection<E>
    This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
    AbstractList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
    AbstractMap<K,V>
    This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
    AbstractMap.SimpleEntry<K,V>
    An Entry maintaining a key and a value.
    AbstractMap.SimpleImmutableEntry<K,V>
    An Entry maintaining an immutable key and value.
    AbstractQueue<E>
    This class provides skeletal implementations of some Queue operations.
    AbstractSequentialList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
    AbstractSet<E>
    This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
    ArrayDeque<E>
    Resizable-array implementation of the Deque interface.
    ArrayList<E>
    Resizable-array implementation of the List interface.
    Arrays
    This class contains various methods for manipulating arrays (such as sorting and searching).
    Base64
    This class consists exclusively of static methods for obtaining encoders and decoders for the Base64 encoding scheme.
    Base64.Decoder
    This class implements a decoder for decoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    Base64.Encoder
    This class implements an encoder for encoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    BitSet
    This class implements a vector of bits that grows as needed.
    Calendar
    The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
    Calendar.Builder
    Calendar.Builder is used for creating a Calendar from various date-time parameters.
    Collections
    This class consists exclusively of static methods that operate on or return collections.
    Currency
    Represents a currency.
    Date
    The class Date represents a specific instant in time, with millisecond precision.
    Dictionary<K,V>
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
    DoubleSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    EnumMap<K extends Enum<K>,V>
    A specialized Map implementation for use with enum type keys.
    EnumSet<E extends Enum<E>>
    A specialized Set implementation for use with enum types.
    EventListenerProxy<T extends EventListener>
    An abstract wrapper class for an EventListener class which associates a set of additional parameters with the listener.
    EventObject
    The root class from which all event state objects shall be derived.
    FormattableFlags
    FomattableFlags are passed to the Formattable.formatTo() method and modify the output format for Formattables.
    Formatter
    An interpreter for printf-style format strings.
    GregorianCalendar
    GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world.
    HashMap<K,V>
    Hash table based implementation of the Map interface.
    HashSet<E>
    This class implements the Set interface, backed by a hash table (actually a HashMap instance).
    Hashtable<K,V>
    This class implements a hash table, which maps keys to values.
    IdentityHashMap<K,V>
    This class implements the Map interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
    IntSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    LinkedHashMap<K,V>
    Hash table and linked list implementation of the Map interface, with predictable iteration order.
    LinkedHashSet<E>
    Hash table and linked list implementation of the Set interface, with predictable iteration order.
    LinkedList<E>
    Doubly-linked list implementation of the List and Deque interfaces.
    ListResourceBundle
    ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
    Locale
    A Locale object represents a specific geographical, political, or cultural region.
    Locale.Builder
    Builder is used to build instances of Locale from values configured by the setters.
    Locale.LanguageRange
    This class expresses a Language Range defined in RFC 4647 Matching of Language Tags.
    LongSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    Objects
    This class consists of static utility methods for operating on objects.
    Observable
    This class represents an observable object, or "data" in the model-view paradigm.
    Optional<T>
    A container object which may or may not contain a non-null value.
    OptionalDouble
    A container object which may or may not contain a double value.
    OptionalInt
    A container object which may or may not contain a int value.
    OptionalLong
    A container object which may or may not contain a long value.
    PriorityQueue<E>
    An unbounded priority queue based on a priority heap.
    Properties
    The Properties class represents a persistent set of properties.
    PropertyPermission
    This class is for property permissions.
    PropertyResourceBundle
    PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
    Random
    An instance of this class is used to generate a stream of pseudorandom numbers.
    ResourceBundle
    Resource bundles contain locale-specific objects.
    ResourceBundle.Control
    ResourceBundle.Control defines a set of callback methods that are invoked by the ResourceBundle.getBundle factory methods during the bundle loading process.
    Scanner
    A simple text scanner which can parse primitive types and strings using regular expressions.
    ServiceLoader<S>
    A simple service-provider loading facility.
    SimpleTimeZone
    SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
    Spliterators
    Static classes and methods for operating on or creating instances of Spliterator and its primitive specializations Spliterator.OfInt, Spliterator.OfLong, and Spliterator.OfDouble.
    Spliterators.AbstractDoubleSpliterator
    An abstract Spliterator.OfDouble that implements trySplit to permit limited parallelism.
    Spliterators.AbstractIntSpliterator
    An abstract Spliterator.OfInt that implements trySplit to permit limited parallelism.
    Spliterators.AbstractLongSpliterator
    An abstract Spliterator.OfLong that implements trySplit to permit limited parallelism.
    Spliterators.AbstractSpliterator<T>
    An abstract Spliterator that implements trySplit to permit limited parallelism.
    SplittableRandom
    A generator of uniform pseudorandom values applicable for use in (among other contexts) isolated parallel computations that may generate subtasks.
    Stack<E>
    The Stack class represents a last-in-first-out (LIFO) stack of objects.
    StringJoiner
    StringJoiner is used to construct a sequence of characters separated by a delimiter and optionally starting with a supplied prefix and ending with a supplied suffix.
    StringTokenizer
    The string tokenizer class allows an application to break a string into tokens.
    Timer
    A facility for threads to schedule tasks for future execution in a background thread.
    TimerTask
    A task that can be scheduled for one-time or repeated execution by a Timer.
    TimeZone
    TimeZone represents a time zone offset, and also figures out daylight savings.
    TreeMap<K,V>
    A Red-Black tree based NavigableMap implementation.
    TreeSet<E>
    A NavigableSet implementation based on a TreeMap.
    UUID
    A class that represents an immutable universally unique identifier (UUID).
    Vector<E>
    The Vector class implements a growable array of objects.
    WeakHashMap<K,V>
    Hash table based implementation of the Map interface, with weak keys.
  • Enum Summary
    Enum Description
    Formatter.BigDecimalLayoutForm
    Enum for BigDecimal formatting.
    Locale.Category
    Enum for locale categories.
    Locale.FilteringMode
    This enum provides constants to select a filtering mode for locale matching.
  • Exception Summary
    Exception Description
    ConcurrentModificationException
    This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
    DuplicateFormatFlagsException
    Unchecked exception thrown when duplicate flags are provided in the format specifier.
    EmptyStackException
    Thrown by methods in the Stack class to indicate that the stack is empty.
    FormatFlagsConversionMismatchException
    Unchecked exception thrown when a conversion and flag are incompatible.
    FormatterClosedException
    Unchecked exception thrown when the formatter has been closed.
    IllegalFormatCodePointException
    Unchecked exception thrown when a character with an invalid Unicode code point as defined by Character.isValidCodePoint(int) is passed to the Formatter.
    IllegalFormatConversionException
    Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.
    IllegalFormatException
    Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments.
    IllegalFormatFlagsException
    Unchecked exception thrown when an illegal combination flags is given.
    IllegalFormatPrecisionException
    Unchecked exception thrown when the precision is a negative value other than -1, the conversion does not support a precision, or the value is otherwise unsupported.
    IllegalFormatWidthException
    Unchecked exception thrown when the format width is a negative value other than -1 or is otherwise unsupported.
    IllformedLocaleException
    Thrown by methods in Locale and Locale.Builder to indicate that an argument is not a well-formed BCP 47 tag.
    InputMismatchException
    Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type.
    InvalidPropertiesFormatException
    Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of properties, as per the Properties specification.
    MissingFormatArgumentException
    Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist.
    MissingFormatWidthException
    Unchecked exception thrown when the format width is required.
    MissingResourceException
    Signals that a resource is missing.
    NoSuchElementException
    Thrown by various accessor methods to indicate that the element being requested does not exist.
    TooManyListenersException
    The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
    UnknownFormatConversionException
    Unchecked exception thrown when an unknown conversion is given.
    UnknownFormatFlagsException
    Unchecked exception thrown when an unknown flag is given.
  • Error Summary
    Error Description
    ServiceConfigurationError
    Error thrown when something goes wrong while loading a service provider.

Package java.util Description

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Package Specification

  • Collections Framework Overview
  • Collections Framework Annotated Outline

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Collections Framework Tutorial
  • Collections Framework Design FAQ
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util

Interfaces

  • Collection
  • Comparator
  • Deque
  • Enumeration
  • EventListener
  • Formattable
  • Iterator
  • List
  • ListIterator
  • Map
  • Map.Entry
  • NavigableMap
  • NavigableSet
  • Observer
  • PrimitiveIterator
  • PrimitiveIterator.OfDouble
  • PrimitiveIterator.OfInt
  • PrimitiveIterator.OfLong
  • Queue
  • RandomAccess
  • Set
  • SortedMap
  • SortedSet
  • Spliterator
  • Spliterator.OfDouble
  • Spliterator.OfInt
  • Spliterator.OfLong
  • Spliterator.OfPrimitive

Classes

  • AbstractCollection
  • AbstractList
  • AbstractMap
  • AbstractMap.SimpleEntry
  • AbstractMap.SimpleImmutableEntry
  • AbstractQueue
  • AbstractSequentialList
  • AbstractSet
  • ArrayDeque
  • ArrayList
  • Arrays
  • Base64
  • Base64.Decoder
  • Base64.Encoder
  • BitSet
  • Calendar
  • Calendar.Builder
  • Collections
  • Currency
  • Date
  • Dictionary
  • DoubleSummaryStatistics
  • EnumMap
  • EnumSet
  • EventListenerProxy
  • EventObject
  • FormattableFlags
  • Formatter
  • GregorianCalendar
  • HashMap
  • HashSet
  • Hashtable
  • IdentityHashMap
  • IntSummaryStatistics
  • LinkedHashMap
  • LinkedHashSet
  • LinkedList
  • ListResourceBundle
  • Locale
  • Locale.Builder
  • Locale.LanguageRange
  • LongSummaryStatistics
  • Objects
  • Observable
  • Optional
  • OptionalDouble
  • OptionalInt
  • OptionalLong
  • PriorityQueue
  • Properties
  • PropertyPermission
  • PropertyResourceBundle
  • Random
  • ResourceBundle
  • ResourceBundle.Control
  • Scanner
  • ServiceLoader
  • SimpleTimeZone
  • Spliterators
  • Spliterators.AbstractDoubleSpliterator
  • Spliterators.AbstractIntSpliterator
  • Spliterators.AbstractLongSpliterator
  • Spliterators.AbstractSpliterator
  • SplittableRandom
  • Stack
  • StringJoiner
  • StringTokenizer
  • Timer
  • TimerTask
  • TimeZone
  • TreeMap
  • TreeSet
  • UUID
  • Vector
  • WeakHashMap

Enums

  • Formatter.BigDecimalLayoutForm
  • Locale.Category
  • Locale.FilteringMode

Exceptions

  • ConcurrentModificationException
  • DuplicateFormatFlagsException
  • EmptyStackException
  • FormatFlagsConversionMismatchException
  • FormatterClosedException
  • IllegalFormatCodePointException
  • IllegalFormatConversionException
  • IllegalFormatException
  • IllegalFormatFlagsException
  • IllegalFormatPrecisionException
  • IllegalFormatWidthException
  • IllformedLocaleException
  • InputMismatchException
  • InvalidPropertiesFormatException
  • MissingFormatArgumentException
  • MissingFormatWidthException
  • MissingResourceException
  • NoSuchElementException
  • TooManyListenersException
  • UnknownFormatConversionException
  • UnknownFormatFlagsException

Errors

  • ServiceConfigurationError


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

See: Description

  • Interface Summary
    Interface Description
    Collection<E>
    The root interface in the collection hierarchy.
    Comparator<T>
    A comparison function, which imposes a total ordering on some collection of objects.
    Deque<E>
    A linear collection that supports element insertion and removal at both ends.
    Enumeration<E>
    An object that implements the Enumeration interface generates a series of elements, one at a time.
    EventListener
    A tagging interface that all event listener interfaces must extend.
    Formattable
    The Formattable interface must be implemented by any class that needs to perform custom formatting using the 's' conversion specifier of Formatter.
    Iterator<E>
    An iterator over a collection.
    List<E>
    An ordered collection (also known as a sequence).
    ListIterator<E>
    An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list.
    Map<K,V>
    An object that maps keys to values.
    Map.Entry<K,V>
    A map entry (key-value pair).
    NavigableMap<K,V>
    A SortedMap extended with navigation methods returning the closest matches for given search targets.
    NavigableSet<E>
    A SortedSet extended with navigation methods reporting closest matches for given search targets.
    Observer
    A class can implement the Observer interface when it wants to be informed of changes in observable objects.
    PrimitiveIterator<T,T_CONS>
    A base type for primitive specializations of Iterator.
    PrimitiveIterator.OfDouble
    An Iterator specialized for double values.
    PrimitiveIterator.OfInt
    An Iterator specialized for int values.
    PrimitiveIterator.OfLong
    An Iterator specialized for long values.
    Queue<E>
    A collection designed for holding elements prior to processing.
    RandomAccess
    Marker interface used by List implementations to indicate that they support fast (generally constant time) random access.
    Set<E>
    A collection that contains no duplicate elements.
    SortedMap<K,V>
    A Map that further provides a total ordering on its keys.
    SortedSet<E>
    A Set that further provides a total ordering on its elements.
    Spliterator<T>
    An object for traversing and partitioning elements of a source.
    Spliterator.OfDouble
    A Spliterator specialized for double values.
    Spliterator.OfInt
    A Spliterator specialized for int values.
    Spliterator.OfLong
    A Spliterator specialized for long values.
    Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
    A Spliterator specialized for primitive values.
  • Class Summary
    Class Description
    AbstractCollection<E>
    This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
    AbstractList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
    AbstractMap<K,V>
    This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
    AbstractMap.SimpleEntry<K,V>
    An Entry maintaining a key and a value.
    AbstractMap.SimpleImmutableEntry<K,V>
    An Entry maintaining an immutable key and value.
    AbstractQueue<E>
    This class provides skeletal implementations of some Queue operations.
    AbstractSequentialList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
    AbstractSet<E>
    This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
    ArrayDeque<E>
    Resizable-array implementation of the Deque interface.
    ArrayList<E>
    Resizable-array implementation of the List interface.
    Arrays
    This class contains various methods for manipulating arrays (such as sorting and searching).
    Base64
    This class consists exclusively of static methods for obtaining encoders and decoders for the Base64 encoding scheme.
    Base64.Decoder
    This class implements a decoder for decoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    Base64.Encoder
    This class implements an encoder for encoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    BitSet
    This class implements a vector of bits that grows as needed.
    Calendar
    The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
    Calendar.Builder
    Calendar.Builder is used for creating a Calendar from various date-time parameters.
    Collections
    This class consists exclusively of static methods that operate on or return collections.
    Currency
    Represents a currency.
    Date
    The class Date represents a specific instant in time, with millisecond precision.
    Dictionary<K,V>
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
    DoubleSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    EnumMap<K extends Enum<K>,V>
    A specialized Map implementation for use with enum type keys.
    EnumSet<E extends Enum<E>>
    A specialized Set implementation for use with enum types.
    EventListenerProxy<T extends EventListener>
    An abstract wrapper class for an EventListener class which associates a set of additional parameters with the listener.
    EventObject
    The root class from which all event state objects shall be derived.
    FormattableFlags
    FomattableFlags are passed to the Formattable.formatTo() method and modify the output format for Formattables.
    Formatter
    An interpreter for printf-style format strings.
    GregorianCalendar
    GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world.
    HashMap<K,V>
    Hash table based implementation of the Map interface.
    HashSet<E>
    This class implements the Set interface, backed by a hash table (actually a HashMap instance).
    Hashtable<K,V>
    This class implements a hash table, which maps keys to values.
    IdentityHashMap<K,V>
    This class implements the Map interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
    IntSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    LinkedHashMap<K,V>
    Hash table and linked list implementation of the Map interface, with predictable iteration order.
    LinkedHashSet<E>
    Hash table and linked list implementation of the Set interface, with predictable iteration order.
    LinkedList<E>
    Doubly-linked list implementation of the List and Deque interfaces.
    ListResourceBundle
    ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
    Locale
    A Locale object represents a specific geographical, political, or cultural region.
    Locale.Builder
    Builder is used to build instances of Locale from values configured by the setters.
    Locale.LanguageRange
    This class expresses a Language Range defined in RFC 4647 Matching of Language Tags.
    LongSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    Objects
    This class consists of static utility methods for operating on objects.
    Observable
    This class represents an observable object, or "data" in the model-view paradigm.
    Optional<T>
    A container object which may or may not contain a non-null value.
    OptionalDouble
    A container object which may or may not contain a double value.
    OptionalInt
    A container object which may or may not contain a int value.
    OptionalLong
    A container object which may or may not contain a long value.
    PriorityQueue<E>
    An unbounded priority queue based on a priority heap.
    Properties
    The Properties class represents a persistent set of properties.
    PropertyPermission
    This class is for property permissions.
    PropertyResourceBundle
    PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
    Random
    An instance of this class is used to generate a stream of pseudorandom numbers.
    ResourceBundle
    Resource bundles contain locale-specific objects.
    ResourceBundle.Control
    ResourceBundle.Control defines a set of callback methods that are invoked by the ResourceBundle.getBundle factory methods during the bundle loading process.
    Scanner
    A simple text scanner which can parse primitive types and strings using regular expressions.
    ServiceLoader<S>
    A simple service-provider loading facility.
    SimpleTimeZone
    SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
    Spliterators
    Static classes and methods for operating on or creating instances of Spliterator and its primitive specializations Spliterator.OfInt, Spliterator.OfLong, and Spliterator.OfDouble.
    Spliterators.AbstractDoubleSpliterator
    An abstract Spliterator.OfDouble that implements trySplit to permit limited parallelism.
    Spliterators.AbstractIntSpliterator
    An abstract Spliterator.OfInt that implements trySplit to permit limited parallelism.
    Spliterators.AbstractLongSpliterator
    An abstract Spliterator.OfLong that implements trySplit to permit limited parallelism.
    Spliterators.AbstractSpliterator<T>
    An abstract Spliterator that implements trySplit to permit limited parallelism.
    SplittableRandom
    A generator of uniform pseudorandom values applicable for use in (among other contexts) isolated parallel computations that may generate subtasks.
    Stack<E>
    The Stack class represents a last-in-first-out (LIFO) stack of objects.
    StringJoiner
    StringJoiner is used to construct a sequence of characters separated by a delimiter and optionally starting with a supplied prefix and ending with a supplied suffix.
    StringTokenizer
    The string tokenizer class allows an application to break a string into tokens.
    Timer
    A facility for threads to schedule tasks for future execution in a background thread.
    TimerTask
    A task that can be scheduled for one-time or repeated execution by a Timer.
    TimeZone
    TimeZone represents a time zone offset, and also figures out daylight savings.
    TreeMap<K,V>
    A Red-Black tree based NavigableMap implementation.
    TreeSet<E>
    A NavigableSet implementation based on a TreeMap.
    UUID
    A class that represents an immutable universally unique identifier (UUID).
    Vector<E>
    The Vector class implements a growable array of objects.
    WeakHashMap<K,V>
    Hash table based implementation of the Map interface, with weak keys.
  • Enum Summary
    Enum Description
    Formatter.BigDecimalLayoutForm
    Enum for BigDecimal formatting.
    Locale.Category
    Enum for locale categories.
    Locale.FilteringMode
    This enum provides constants to select a filtering mode for locale matching.
  • Exception Summary
    Exception Description
    ConcurrentModificationException
    This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
    DuplicateFormatFlagsException
    Unchecked exception thrown when duplicate flags are provided in the format specifier.
    EmptyStackException
    Thrown by methods in the Stack class to indicate that the stack is empty.
    FormatFlagsConversionMismatchException
    Unchecked exception thrown when a conversion and flag are incompatible.
    FormatterClosedException
    Unchecked exception thrown when the formatter has been closed.
    IllegalFormatCodePointException
    Unchecked exception thrown when a character with an invalid Unicode code point as defined by Character.isValidCodePoint(int) is passed to the Formatter.
    IllegalFormatConversionException
    Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.
    IllegalFormatException
    Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments.
    IllegalFormatFlagsException
    Unchecked exception thrown when an illegal combination flags is given.
    IllegalFormatPrecisionException
    Unchecked exception thrown when the precision is a negative value other than -1, the conversion does not support a precision, or the value is otherwise unsupported.
    IllegalFormatWidthException
    Unchecked exception thrown when the format width is a negative value other than -1 or is otherwise unsupported.
    IllformedLocaleException
    Thrown by methods in Locale and Locale.Builder to indicate that an argument is not a well-formed BCP 47 tag.
    InputMismatchException
    Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type.
    InvalidPropertiesFormatException
    Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of properties, as per the Properties specification.
    MissingFormatArgumentException
    Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist.
    MissingFormatWidthException
    Unchecked exception thrown when the format width is required.
    MissingResourceException
    Signals that a resource is missing.
    NoSuchElementException
    Thrown by various accessor methods to indicate that the element being requested does not exist.
    TooManyListenersException
    The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
    UnknownFormatConversionException
    Unchecked exception thrown when an unknown conversion is given.
    UnknownFormatFlagsException
    Unchecked exception thrown when an unknown flag is given.
  • Error Summary
    Error Description
    ServiceConfigurationError
    Error thrown when something goes wrong while loading a service provider.

Package java.util Description

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Package Specification

  • Collections Framework Overview
  • Collections Framework Annotated Outline

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Collections Framework Tutorial
  • Collections Framework Design FAQ
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util

Interfaces

  • Collection
  • Comparator
  • Deque
  • Enumeration
  • EventListener
  • Formattable
  • Iterator
  • List
  • ListIterator
  • Map
  • Map.Entry
  • NavigableMap
  • NavigableSet
  • Observer
  • PrimitiveIterator
  • PrimitiveIterator.OfDouble
  • PrimitiveIterator.OfInt
  • PrimitiveIterator.OfLong
  • Queue
  • RandomAccess
  • Set
  • SortedMap
  • SortedSet
  • Spliterator
  • Spliterator.OfDouble
  • Spliterator.OfInt
  • Spliterator.OfLong
  • Spliterator.OfPrimitive

Classes

  • AbstractCollection
  • AbstractList
  • AbstractMap
  • AbstractMap.SimpleEntry
  • AbstractMap.SimpleImmutableEntry
  • AbstractQueue
  • AbstractSequentialList
  • AbstractSet
  • ArrayDeque
  • ArrayList
  • Arrays
  • Base64
  • Base64.Decoder
  • Base64.Encoder
  • BitSet
  • Calendar
  • Calendar.Builder
  • Collections
  • Currency
  • Date
  • Dictionary
  • DoubleSummaryStatistics
  • EnumMap
  • EnumSet
  • EventListenerProxy
  • EventObject
  • FormattableFlags
  • Formatter
  • GregorianCalendar
  • HashMap
  • HashSet
  • Hashtable
  • IdentityHashMap
  • IntSummaryStatistics
  • LinkedHashMap
  • LinkedHashSet
  • LinkedList
  • ListResourceBundle
  • Locale
  • Locale.Builder
  • Locale.LanguageRange
  • LongSummaryStatistics
  • Objects
  • Observable
  • Optional
  • OptionalDouble
  • OptionalInt
  • OptionalLong
  • PriorityQueue
  • Properties
  • PropertyPermission
  • PropertyResourceBundle
  • Random
  • ResourceBundle
  • ResourceBundle.Control
  • Scanner
  • ServiceLoader
  • SimpleTimeZone
  • Spliterators
  • Spliterators.AbstractDoubleSpliterator
  • Spliterators.AbstractIntSpliterator
  • Spliterators.AbstractLongSpliterator
  • Spliterators.AbstractSpliterator
  • SplittableRandom
  • Stack
  • StringJoiner
  • StringTokenizer
  • Timer
  • TimerTask
  • TimeZone
  • TreeMap
  • TreeSet
  • UUID
  • Vector
  • WeakHashMap

Enums

  • Formatter.BigDecimalLayoutForm
  • Locale.Category
  • Locale.FilteringMode

Exceptions

  • ConcurrentModificationException
  • DuplicateFormatFlagsException
  • EmptyStackException
  • FormatFlagsConversionMismatchException
  • FormatterClosedException
  • IllegalFormatCodePointException
  • IllegalFormatConversionException
  • IllegalFormatException
  • IllegalFormatFlagsException
  • IllegalFormatPrecisionException
  • IllegalFormatWidthException
  • IllformedLocaleException
  • InputMismatchException
  • InvalidPropertiesFormatException
  • MissingFormatArgumentException
  • MissingFormatWidthException
  • MissingResourceException
  • NoSuchElementException
  • TooManyListenersException
  • UnknownFormatConversionException
  • UnknownFormatFlagsException

Errors

  • ServiceConfigurationError


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

See: Description

  • Interface Summary
    Interface Description
    Collection<E>
    The root interface in the collection hierarchy.
    Comparator<T>
    A comparison function, which imposes a total ordering on some collection of objects.
    Deque<E>
    A linear collection that supports element insertion and removal at both ends.
    Enumeration<E>
    An object that implements the Enumeration interface generates a series of elements, one at a time.
    EventListener
    A tagging interface that all event listener interfaces must extend.
    Formattable
    The Formattable interface must be implemented by any class that needs to perform custom formatting using the 's' conversion specifier of Formatter.
    Iterator<E>
    An iterator over a collection.
    List<E>
    An ordered collection (also known as a sequence).
    ListIterator<E>
    An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list.
    Map<K,V>
    An object that maps keys to values.
    Map.Entry<K,V>
    A map entry (key-value pair).
    NavigableMap<K,V>
    A SortedMap extended with navigation methods returning the closest matches for given search targets.
    NavigableSet<E>
    A SortedSet extended with navigation methods reporting closest matches for given search targets.
    Observer
    A class can implement the Observer interface when it wants to be informed of changes in observable objects.
    PrimitiveIterator<T,T_CONS>
    A base type for primitive specializations of Iterator.
    PrimitiveIterator.OfDouble
    An Iterator specialized for double values.
    PrimitiveIterator.OfInt
    An Iterator specialized for int values.
    PrimitiveIterator.OfLong
    An Iterator specialized for long values.
    Queue<E>
    A collection designed for holding elements prior to processing.
    RandomAccess
    Marker interface used by List implementations to indicate that they support fast (generally constant time) random access.
    Set<E>
    A collection that contains no duplicate elements.
    SortedMap<K,V>
    A Map that further provides a total ordering on its keys.
    SortedSet<E>
    A Set that further provides a total ordering on its elements.
    Spliterator<T>
    An object for traversing and partitioning elements of a source.
    Spliterator.OfDouble
    A Spliterator specialized for double values.
    Spliterator.OfInt
    A Spliterator specialized for int values.
    Spliterator.OfLong
    A Spliterator specialized for long values.
    Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
    A Spliterator specialized for primitive values.
  • Class Summary
    Class Description
    AbstractCollection<E>
    This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
    AbstractList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
    AbstractMap<K,V>
    This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
    AbstractMap.SimpleEntry<K,V>
    An Entry maintaining a key and a value.
    AbstractMap.SimpleImmutableEntry<K,V>
    An Entry maintaining an immutable key and value.
    AbstractQueue<E>
    This class provides skeletal implementations of some Queue operations.
    AbstractSequentialList<E>
    This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
    AbstractSet<E>
    This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
    ArrayDeque<E>
    Resizable-array implementation of the Deque interface.
    ArrayList<E>
    Resizable-array implementation of the List interface.
    Arrays
    This class contains various methods for manipulating arrays (such as sorting and searching).
    Base64
    This class consists exclusively of static methods for obtaining encoders and decoders for the Base64 encoding scheme.
    Base64.Decoder
    This class implements a decoder for decoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    Base64.Encoder
    This class implements an encoder for encoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
    BitSet
    This class implements a vector of bits that grows as needed.
    Calendar
    The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
    Calendar.Builder
    Calendar.Builder is used for creating a Calendar from various date-time parameters.
    Collections
    This class consists exclusively of static methods that operate on or return collections.
    Currency
    Represents a currency.
    Date
    The class Date represents a specific instant in time, with millisecond precision.
    Dictionary<K,V>
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
    DoubleSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    EnumMap<K extends Enum<K>,V>
    A specialized Map implementation for use with enum type keys.
    EnumSet<E extends Enum<E>>
    A specialized Set implementation for use with enum types.
    EventListenerProxy<T extends EventListener>
    An abstract wrapper class for an EventListener class which associates a set of additional parameters with the listener.
    EventObject
    The root class from which all event state objects shall be derived.
    FormattableFlags
    FomattableFlags are passed to the Formattable.formatTo() method and modify the output format for Formattables.
    Formatter
    An interpreter for printf-style format strings.
    GregorianCalendar
    GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world.
    HashMap<K,V>
    Hash table based implementation of the Map interface.
    HashSet<E>
    This class implements the Set interface, backed by a hash table (actually a HashMap instance).
    Hashtable<K,V>
    This class implements a hash table, which maps keys to values.
    IdentityHashMap<K,V>
    This class implements the Map interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
    IntSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    LinkedHashMap<K,V>
    Hash table and linked list implementation of the Map interface, with predictable iteration order.
    LinkedHashSet<E>
    Hash table and linked list implementation of the Set interface, with predictable iteration order.
    LinkedList<E>
    Doubly-linked list implementation of the List and Deque interfaces.
    ListResourceBundle
    ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
    Locale
    A Locale object represents a specific geographical, political, or cultural region.
    Locale.Builder
    Builder is used to build instances of Locale from values configured by the setters.
    Locale.LanguageRange
    This class expresses a Language Range defined in RFC 4647 Matching of Language Tags.
    LongSummaryStatistics
    A state object for collecting statistics such as count, min, max, sum, and average.
    Objects
    This class consists of static utility methods for operating on objects.
    Observable
    This class represents an observable object, or "data" in the model-view paradigm.
    Optional<T>
    A container object which may or may not contain a non-null value.
    OptionalDouble
    A container object which may or may not contain a double value.
    OptionalInt
    A container object which may or may not contain a int value.
    OptionalLong
    A container object which may or may not contain a long value.
    PriorityQueue<E>
    An unbounded priority queue based on a priority heap.
    Properties
    The Properties class represents a persistent set of properties.
    PropertyPermission
    This class is for property permissions.
    PropertyResourceBundle
    PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
    Random
    An instance of this class is used to generate a stream of pseudorandom numbers.
    ResourceBundle
    Resource bundles contain locale-specific objects.
    ResourceBundle.Control
    ResourceBundle.Control defines a set of callback methods that are invoked by the ResourceBundle.getBundle factory methods during the bundle loading process.
    Scanner
    A simple text scanner which can parse primitive types and strings using regular expressions.
    ServiceLoader<S>
    A simple service-provider loading facility.
    SimpleTimeZone
    SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
    Spliterators
    Static classes and methods for operating on or creating instances of Spliterator and its primitive specializations Spliterator.OfInt, Spliterator.OfLong, and Spliterator.OfDouble.
    Spliterators.AbstractDoubleSpliterator
    An abstract Spliterator.OfDouble that implements trySplit to permit limited parallelism.
    Spliterators.AbstractIntSpliterator
    An abstract Spliterator.OfInt that implements trySplit to permit limited parallelism.
    Spliterators.AbstractLongSpliterator
    An abstract Spliterator.OfLong that implements trySplit to permit limited parallelism.
    Spliterators.AbstractSpliterator<T>
    An abstract Spliterator that implements trySplit to permit limited parallelism.
    SplittableRandom
    A generator of uniform pseudorandom values applicable for use in (among other contexts) isolated parallel computations that may generate subtasks.
    Stack<E>
    The Stack class represents a last-in-first-out (LIFO) stack of objects.
    StringJoiner
    StringJoiner is used to construct a sequence of characters separated by a delimiter and optionally starting with a supplied prefix and ending with a supplied suffix.
    StringTokenizer
    The string tokenizer class allows an application to break a string into tokens.
    Timer
    A facility for threads to schedule tasks for future execution in a background thread.
    TimerTask
    A task that can be scheduled for one-time or repeated execution by a Timer.
    TimeZone
    TimeZone represents a time zone offset, and also figures out daylight savings.
    TreeMap<K,V>
    A Red-Black tree based NavigableMap implementation.
    TreeSet<E>
    A NavigableSet implementation based on a TreeMap.
    UUID
    A class that represents an immutable universally unique identifier (UUID).
    Vector<E>
    The Vector class implements a growable array of objects.
    WeakHashMap<K,V>
    Hash table based implementation of the Map interface, with weak keys.
  • Enum Summary
    Enum Description
    Formatter.BigDecimalLayoutForm
    Enum for BigDecimal formatting.
    Locale.Category
    Enum for locale categories.
    Locale.FilteringMode
    This enum provides constants to select a filtering mode for locale matching.
  • Exception Summary
    Exception Description
    ConcurrentModificationException
    This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
    DuplicateFormatFlagsException
    Unchecked exception thrown when duplicate flags are provided in the format specifier.
    EmptyStackException
    Thrown by methods in the Stack class to indicate that the stack is empty.
    FormatFlagsConversionMismatchException
    Unchecked exception thrown when a conversion and flag are incompatible.
    FormatterClosedException
    Unchecked exception thrown when the formatter has been closed.
    IllegalFormatCodePointException
    Unchecked exception thrown when a character with an invalid Unicode code point as defined by Character.isValidCodePoint(int) is passed to the Formatter.
    IllegalFormatConversionException
    Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.
    IllegalFormatException
    Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments.
    IllegalFormatFlagsException
    Unchecked exception thrown when an illegal combination flags is given.
    IllegalFormatPrecisionException
    Unchecked exception thrown when the precision is a negative value other than -1, the conversion does not support a precision, or the value is otherwise unsupported.
    IllegalFormatWidthException
    Unchecked exception thrown when the format width is a negative value other than -1 or is otherwise unsupported.
    IllformedLocaleException
    Thrown by methods in Locale and Locale.Builder to indicate that an argument is not a well-formed BCP 47 tag.
    InputMismatchException
    Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type.
    InvalidPropertiesFormatException
    Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of properties, as per the Properties specification.
    MissingFormatArgumentException
    Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist.
    MissingFormatWidthException
    Unchecked exception thrown when the format width is required.
    MissingResourceException
    Signals that a resource is missing.
    NoSuchElementException
    Thrown by various accessor methods to indicate that the element being requested does not exist.
    TooManyListenersException
    The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
    UnknownFormatConversionException
    Unchecked exception thrown when an unknown conversion is given.
    UnknownFormatFlagsException
    Unchecked exception thrown when an unknown flag is given.
  • Error Summary
    Error Description
    ServiceConfigurationError
    Error thrown when something goes wrong while loading a service provider.

Package java.util Description

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Package Specification

  • Collections Framework Overview
  • Collections Framework Annotated Outline

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Collections Framework Tutorial
  • Collections Framework Design FAQ
Since:
JDK1.0
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util

Interfaces

  • Collection
  • Comparator
  • Deque
  • Enumeration
  • EventListener
  • Formattable
  • Iterator
  • List
  • ListIterator
  • Map
  • Map.Entry
  • NavigableMap
  • NavigableSet
  • Observer
  • PrimitiveIterator
  • PrimitiveIterator.OfDouble
  • PrimitiveIterator.OfInt
  • PrimitiveIterator.OfLong
  • Queue
  • RandomAccess
  • Set
  • SortedMap
  • SortedSet
  • Spliterator
  • Spliterator.OfDouble
  • Spliterator.OfInt
  • Spliterator.OfLong
  • Spliterator.OfPrimitive

Classes

  • AbstractCollection
  • AbstractList
  • AbstractMap
  • AbstractMap.SimpleEntry
  • AbstractMap.SimpleImmutableEntry
  • AbstractQueue
  • AbstractSequentialList
  • AbstractSet
  • ArrayDeque
  • ArrayList
  • Arrays
  • Base64
  • Base64.Decoder
  • Base64.Encoder
  • BitSet
  • Calendar
  • Calendar.Builder
  • Collections
  • Currency
  • Date
  • Dictionary
  • DoubleSummaryStatistics
  • EnumMap
  • EnumSet
  • EventListenerProxy
  • EventObject
  • FormattableFlags
  • Formatter
  • GregorianCalendar
  • HashMap
  • HashSet
  • Hashtable
  • IdentityHashMap
  • IntSummaryStatistics
  • LinkedHashMap
  • LinkedHashSet
  • LinkedList
  • ListResourceBundle
  • Locale
  • Locale.Builder
  • Locale.LanguageRange
  • LongSummaryStatistics
  • Objects
  • Observable
  • Optional
  • OptionalDouble
  • OptionalInt
  • OptionalLong
  • PriorityQueue
  • Properties
  • PropertyPermission
  • PropertyResourceBundle
  • Random
  • ResourceBundle
  • ResourceBundle.Control
  • Scanner
  • ServiceLoader
  • SimpleTimeZone
  • Spliterators
  • Spliterators.AbstractDoubleSpliterator
  • Spliterators.AbstractIntSpliterator
  • Spliterators.AbstractLongSpliterator
  • Spliterators.AbstractSpliterator
  • SplittableRandom
  • Stack
  • StringJoiner
  • StringTokenizer
  • Timer
  • TimerTask
  • TimeZone
  • TreeMap
  • TreeSet
  • UUID
  • Vector
  • WeakHashMap

Enums

  • Formatter.BigDecimalLayoutForm
  • Locale.Category
  • Locale.FilteringMode

Exceptions

  • ConcurrentModificationException
  • DuplicateFormatFlagsException
  • EmptyStackException
  • FormatFlagsConversionMismatchException
  • FormatterClosedException
  • IllegalFormatCodePointException
  • IllegalFormatConversionException
  • IllegalFormatException
  • IllegalFormatFlagsException
  • IllegalFormatPrecisionException
  • IllegalFormatWidthException
  • IllformedLocaleException
  • InputMismatchException
  • InvalidPropertiesFormatException
  • MissingFormatArgumentException
  • MissingFormatWidthException
  • MissingResourceException
  • NoSuchElementException
  • TooManyListenersException
  • UnknownFormatConversionException
  • UnknownFormatFlagsException

Errors

  • ServiceConfigurationError


compact1 - java.util.concurrent

Interfaces

  • BlockingDeque
  • BlockingQueue
  • Callable
  • CompletableFuture.AsynchronousCompletionTask
  • CompletionService
  • CompletionStage
  • ConcurrentMap
  • ConcurrentNavigableMap
  • Delayed
  • Executor
  • ExecutorService
  • ForkJoinPool.ForkJoinWorkerThreadFactory
  • ForkJoinPool.ManagedBlocker
  • Future
  • RejectedExecutionHandler
  • RunnableFuture
  • RunnableScheduledFuture
  • ScheduledExecutorService
  • ScheduledFuture
  • ThreadFactory
  • TransferQueue

Classes

  • AbstractExecutorService
  • ArrayBlockingQueue
  • CompletableFuture
  • ConcurrentHashMap
  • ConcurrentHashMap.KeySetView
  • ConcurrentLinkedDeque
  • ConcurrentLinkedQueue
  • ConcurrentSkipListMap
  • ConcurrentSkipListSet
  • CopyOnWriteArrayList
  • CopyOnWriteArraySet
  • CountDownLatch
  • CountedCompleter
  • CyclicBarrier
  • DelayQueue
  • Exchanger
  • ExecutorCompletionService
  • Executors
  • ForkJoinPool
  • ForkJoinTask
  • ForkJoinWorkerThread
  • FutureTask
  • LinkedBlockingDeque
  • LinkedBlockingQueue
  • LinkedTransferQueue
  • Phaser
  • PriorityBlockingQueue
  • RecursiveAction
  • RecursiveTask
  • ScheduledThreadPoolExecutor
  • Semaphore
  • SynchronousQueue
  • ThreadLocalRandom
  • ThreadPoolExecutor
  • ThreadPoolExecutor.AbortPolicy
  • ThreadPoolExecutor.CallerRunsPolicy
  • ThreadPoolExecutor.DiscardOldestPolicy
  • ThreadPoolExecutor.DiscardPolicy

Enums

  • TimeUnit

Exceptions

  • BrokenBarrierException
  • CancellationException
  • CompletionException
  • ExecutionException
  • RejectedExecutionException
  • TimeoutException


concurrent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.concurrent

Utility classes commonly useful in concurrent programming.

See: Description

  • Interface Summary
    Interface Description
    BlockingDeque<E>
    A Deque that additionally supports blocking operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element.
    BlockingQueue<E>
    A Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.
    Callable<V>
    A task that returns a result and may throw an exception.
    CompletableFuture.AsynchronousCompletionTask
    A marker interface identifying asynchronous tasks produced by async methods.
    CompletionService<V>
    A service that decouples the production of new asynchronous tasks from the consumption of the results of completed tasks.
    CompletionStage<T>
    A stage of a possibly asynchronous computation, that performs an action or computes a value when another CompletionStage completes.
    ConcurrentMap<K,V>
    A Map providing thread safety and atomicity guarantees.
    ConcurrentNavigableMap<K,V>
    A ConcurrentMap supporting NavigableMap operations, and recursively so for its navigable sub-maps.
    Delayed
    A mix-in style interface for marking objects that should be acted upon after a given delay.
    Executor
    An object that executes submitted Runnable tasks.
    ExecutorService
    An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.
    ForkJoinPool.ForkJoinWorkerThreadFactory
    Factory for creating new ForkJoinWorkerThreads.
    ForkJoinPool.ManagedBlocker
    Interface for extending managed parallelism for tasks running in ForkJoinPools.
    Future<V>
    A Future represents the result of an asynchronous computation.
    RejectedExecutionHandler
    A handler for tasks that cannot be executed by a ThreadPoolExecutor.
    RunnableFuture<V>
    A Future that is Runnable.
    RunnableScheduledFuture<V>
    A ScheduledFuture that is Runnable.
    ScheduledExecutorService
    An ExecutorService that can schedule commands to run after a given delay, or to execute periodically.
    ScheduledFuture<V>
    A delayed result-bearing action that can be cancelled.
    ThreadFactory
    An object that creates new threads on demand.
    TransferQueue<E>
    A BlockingQueue in which producers may wait for consumers to receive elements.
  • Class Summary
    Class Description
    AbstractExecutorService
    Provides default implementations of ExecutorService execution methods.
    ArrayBlockingQueue<E>
    A bounded blocking queue backed by an array.
    CompletableFuture<T>
    A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.
    ConcurrentHashMap<K,V>
    A hash table supporting full concurrency of retrievals and high expected concurrency for updates.
    ConcurrentHashMap.KeySetView<K,V>
    A view of a ConcurrentHashMap as a Set of keys, in which additions may optionally be enabled by mapping to a common value.
    ConcurrentLinkedDeque<E>
    An unbounded concurrent deque based on linked nodes.
    ConcurrentLinkedQueue<E>
    An unbounded thread-safe queue based on linked nodes.
    ConcurrentSkipListMap<K,V>
    A scalable concurrent ConcurrentNavigableMap implementation.
    ConcurrentSkipListSet<E>
    A scalable concurrent NavigableSet implementation based on a ConcurrentSkipListMap.
    CopyOnWriteArrayList<E>
    A thread-safe variant of ArrayList in which all mutative operations (add, set, and so on) are implemented by making a fresh copy of the underlying array.
    CopyOnWriteArraySet<E>
    A Set that uses an internal CopyOnWriteArrayList for all of its operations.
    CountDownLatch
    A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes.
    CountedCompleter<T>
    A ForkJoinTask with a completion action performed when triggered and there are no remaining pending actions.
    CyclicBarrier
    A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point.
    DelayQueue<E extends Delayed>
    An unbounded blocking queue of Delayed elements, in which an element can only be taken when its delay has expired.
    Exchanger<V>
    A synchronization point at which threads can pair and swap elements within pairs.
    ExecutorCompletionService<V>
    A CompletionService that uses a supplied Executor to execute tasks.
    Executors
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package.
    ForkJoinPool
    An ExecutorService for running ForkJoinTasks.
    ForkJoinTask<V>
    Abstract base class for tasks that run within a ForkJoinPool.
    ForkJoinWorkerThread
    A thread managed by a ForkJoinPool, which executes ForkJoinTasks.
    FutureTask<V>
    A cancellable asynchronous computation.
    LinkedBlockingDeque<E>
    An optionally-bounded blocking deque based on linked nodes.
    LinkedBlockingQueue<E>
    An optionally-bounded blocking queue based on linked nodes.
    LinkedTransferQueue<E>
    An unbounded TransferQueue based on linked nodes.
    Phaser
    A reusable synchronization barrier, similar in functionality to CyclicBarrier and CountDownLatch but supporting more flexible usage.
    PriorityBlockingQueue<E>
    An unbounded blocking queue that uses the same ordering rules as class PriorityQueue and supplies blocking retrieval operations.
    RecursiveAction
    A recursive resultless ForkJoinTask.
    RecursiveTask<V>
    A recursive result-bearing ForkJoinTask.
    ScheduledThreadPoolExecutor
    A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically.
    Semaphore
    A counting semaphore.
    SynchronousQueue<E>
    A blocking queue in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa.
    ThreadLocalRandom
    A random number generator isolated to the current thread.
    ThreadPoolExecutor
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods.
    ThreadPoolExecutor.AbortPolicy
    A handler for rejected tasks that throws a RejectedExecutionException.
    ThreadPoolExecutor.CallerRunsPolicy
    A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute method, unless the executor has been shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardOldestPolicy
    A handler for rejected tasks that discards the oldest unhandled request and then retries execute, unless the executor is shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardPolicy
    A handler for rejected tasks that silently discards the rejected task.
  • Enum Summary
    Enum Description
    TimeUnit
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.
  • Exception Summary
    Exception Description
    BrokenBarrierException
    Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting.
    CancellationException
    Exception indicating that the result of a value-producing task, such as a FutureTask, cannot be retrieved because the task was cancelled.
    CompletionException
    Exception thrown when an error or other exception is encountered in the course of completing a result or task.
    ExecutionException
    Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception.
    RejectedExecutionException
    Exception thrown by an Executor when a task cannot be accepted for execution.
    TimeoutException
    Exception thrown when a blocking operation times out.

Package java.util.concurrent Description

Utility classes commonly useful in concurrent programming. This package includes a few small standardized extensible frameworks, as well as some classes that provide useful functionality and are otherwise tedious or difficult to implement. Here are brief descriptions of the main components. See also the java.util.concurrent.locks and java.util.concurrent.atomic packages.

Executors

Interfaces. Executor is a simple standardized interface for defining custom thread-like subsystems, including thread pools, asynchronous I/O, and lightweight task frameworks. Depending on which concrete Executor class is being used, tasks may execute in a newly created thread, an existing task-execution thread, or the thread calling execute, and may execute sequentially or concurrently. ExecutorService provides a more complete asynchronous task execution framework. An ExecutorService manages queuing and scheduling of tasks, and allows controlled shutdown. The ScheduledExecutorService subinterface and associated interfaces add support for delayed and periodic task execution. ExecutorServices provide methods arranging asynchronous execution of any function expressed as Callable, the result-bearing analog of Runnable. A Future returns the results of a function, allows determination of whether execution has completed, and provides a means to cancel execution. A RunnableFuture is a Future that possesses a run method that upon execution, sets its results.

Implementations. Classes ThreadPoolExecutor and ScheduledThreadPoolExecutor provide tunable, flexible thread pools. The Executors class provides factory methods for the most common kinds and configurations of Executors, as well as a few utility methods for using them. Other utilities based on Executors include the concrete class FutureTask providing a common extensible implementation of Futures, and ExecutorCompletionService, that assists in coordinating the processing of groups of asynchronous tasks.

Class ForkJoinPool provides an Executor primarily designed for processing instances of ForkJoinTask and its subclasses. These classes employ a work-stealing scheduler that attains high throughput for tasks conforming to restrictions that often hold in computation-intensive parallel processing.

Queues

The ConcurrentLinkedQueue class supplies an efficient scalable thread-safe non-blocking FIFO queue. The ConcurrentLinkedDeque class is similar, but additionally supports the Deque interface.

Five implementations in java.util.concurrent support the extended BlockingQueue interface, that defines blocking versions of put and take: LinkedBlockingQueue, ArrayBlockingQueue, SynchronousQueue, PriorityBlockingQueue, and DelayQueue. The different classes cover the most common usage contexts for producer-consumer, messaging, parallel tasking, and related concurrent designs.

Extended interface TransferQueue, and implementation LinkedTransferQueue introduce a synchronous transfer method (along with related features) in which a producer may optionally block awaiting its consumer.

The BlockingDeque interface extends BlockingQueue to support both FIFO and LIFO (stack-based) operations. Class LinkedBlockingDeque provides an implementation.

Timing

The TimeUnit class provides multiple granularities (including nanoseconds) for specifying and controlling time-out based operations. Most classes in the package contain operations based on time-outs in addition to indefinite waits. In all cases that time-outs are used, the time-out specifies the minimum time that the method should wait before indicating that it timed-out. Implementations make a "best effort" to detect time-outs as soon as possible after they occur. However, an indefinite amount of time may elapse between a time-out being detected and a thread actually executing again after that time-out. All methods that accept timeout parameters treat values less than or equal to zero to mean not to wait at all. To wait "forever", you can use a value of Long.MAX_VALUE.

Synchronizers

Five classes aid common special-purpose synchronization idioms.
  • Semaphore is a classic concurrency tool.
  • CountDownLatch is a very simple yet very common utility for blocking until a given number of signals, events, or conditions hold.
  • A CyclicBarrier is a resettable multiway synchronization point useful in some styles of parallel programming.
  • A Phaser provides a more flexible form of barrier that may be used to control phased computation among multiple threads.
  • An Exchanger allows two threads to exchange objects at a rendezvous point, and is useful in several pipeline designs.

Concurrent Collections

Besides Queues, this package supplies Collection implementations designed for use in multithreaded contexts: ConcurrentHashMap, ConcurrentSkipListMap, ConcurrentSkipListSet, CopyOnWriteArrayList, and CopyOnWriteArraySet. When many threads are expected to access a given collection, a ConcurrentHashMap is normally preferable to a synchronized HashMap, and a ConcurrentSkipListMap is normally preferable to a synchronized TreeMap. A CopyOnWriteArrayList is preferable to a synchronized ArrayList when the expected number of reads and traversals greatly outnumber the number of updates to a list.

The "Concurrent" prefix used with some classes in this package is a shorthand indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks.

Most concurrent Collection implementations (including most Queues) also differ from the usual java.util conventions in that their Iterators and Spliterators provide weakly consistent rather than fast-fail traversal:

  • they may proceed concurrently with other operations
  • they will never throw ConcurrentModificationException
  • they are guaranteed to traverse elements as they existed upon construction exactly once, and may (but are not guaranteed to) reflect any modifications subsequent to construction.

Memory Consistency Properties

Chapter 17 of the Java Language Specification defines the happens-before relation on memory operations such as reads and writes of shared variables. The results of a write by one thread are guaranteed to be visible to a read by another thread only if the write operation happens-before the read operation. The synchronized and volatile constructs, as well as the Thread.start() and Thread.join() methods, can form happens-before relationships. In particular:
  • Each action in a thread happens-before every action in that thread that comes later in the program's order.
  • An unlock (synchronized block or method exit) of a monitor happens-before every subsequent lock (synchronized block or method entry) of that same monitor. And because the happens-before relation is transitive, all actions of a thread prior to unlocking happen-before all actions subsequent to any thread locking that monitor.
  • A write to a volatile field happens-before every subsequent read of that same field. Writes and reads of volatile fields have similar memory consistency effects as entering and exiting monitors, but do not entail mutual exclusion locking.
  • A call to start on a thread happens-before any action in the started thread.
  • All actions in a thread happen-before any other thread successfully returns from a join on that thread.
The methods of all classes in java.util.concurrent and its subpackages extend these guarantees to higher-level synchronization. In particular:
  • Actions in a thread prior to placing an object into any concurrent collection happen-before actions subsequent to the access or removal of that element from the collection in another thread.
  • Actions in a thread prior to the submission of a Runnable to an Executor happen-before its execution begins. Similarly for Callables submitted to an ExecutorService.
  • Actions taken by the asynchronous computation represented by a Future happen-before actions subsequent to the retrieval of the result via Future.get() in another thread.
  • Actions prior to "releasing" synchronizer methods such as Lock.unlock, Semaphore.release, and CountDownLatch.countDown happen-before actions subsequent to a successful "acquiring" method such as Lock.lock, Semaphore.acquire, Condition.await, and CountDownLatch.await on the same synchronizer object in another thread.
  • For each pair of threads that successfully exchange objects via an Exchanger, actions prior to the exchange() in each thread happen-before those subsequent to the corresponding exchange() in another thread.
  • Actions prior to calling CyclicBarrier.await and Phaser.awaitAdvance (as well as its variants) happen-before actions performed by the barrier action, and actions performed by the barrier action happen-before actions subsequent to a successful return from the corresponding await in other threads.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.concurrent

Interfaces

  • BlockingDeque
  • BlockingQueue
  • Callable
  • CompletableFuture.AsynchronousCompletionTask
  • CompletionService
  • CompletionStage
  • ConcurrentMap
  • ConcurrentNavigableMap
  • Delayed
  • Executor
  • ExecutorService
  • ForkJoinPool.ForkJoinWorkerThreadFactory
  • ForkJoinPool.ManagedBlocker
  • Future
  • RejectedExecutionHandler
  • RunnableFuture
  • RunnableScheduledFuture
  • ScheduledExecutorService
  • ScheduledFuture
  • ThreadFactory
  • TransferQueue

Classes

  • AbstractExecutorService
  • ArrayBlockingQueue
  • CompletableFuture
  • ConcurrentHashMap
  • ConcurrentHashMap.KeySetView
  • ConcurrentLinkedDeque
  • ConcurrentLinkedQueue
  • ConcurrentSkipListMap
  • ConcurrentSkipListSet
  • CopyOnWriteArrayList
  • CopyOnWriteArraySet
  • CountDownLatch
  • CountedCompleter
  • CyclicBarrier
  • DelayQueue
  • Exchanger
  • ExecutorCompletionService
  • Executors
  • ForkJoinPool
  • ForkJoinTask
  • ForkJoinWorkerThread
  • FutureTask
  • LinkedBlockingDeque
  • LinkedBlockingQueue
  • LinkedTransferQueue
  • Phaser
  • PriorityBlockingQueue
  • RecursiveAction
  • RecursiveTask
  • ScheduledThreadPoolExecutor
  • Semaphore
  • SynchronousQueue
  • ThreadLocalRandom
  • ThreadPoolExecutor
  • ThreadPoolExecutor.AbortPolicy
  • ThreadPoolExecutor.CallerRunsPolicy
  • ThreadPoolExecutor.DiscardOldestPolicy
  • ThreadPoolExecutor.DiscardPolicy

Enums

  • TimeUnit

Exceptions

  • BrokenBarrierException
  • CancellationException
  • CompletionException
  • ExecutionException
  • RejectedExecutionException
  • TimeoutException


concurrent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.concurrent

Utility classes commonly useful in concurrent programming.

See: Description

  • Interface Summary
    Interface Description
    BlockingDeque<E>
    A Deque that additionally supports blocking operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element.
    BlockingQueue<E>
    A Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.
    Callable<V>
    A task that returns a result and may throw an exception.
    CompletableFuture.AsynchronousCompletionTask
    A marker interface identifying asynchronous tasks produced by async methods.
    CompletionService<V>
    A service that decouples the production of new asynchronous tasks from the consumption of the results of completed tasks.
    CompletionStage<T>
    A stage of a possibly asynchronous computation, that performs an action or computes a value when another CompletionStage completes.
    ConcurrentMap<K,V>
    A Map providing thread safety and atomicity guarantees.
    ConcurrentNavigableMap<K,V>
    A ConcurrentMap supporting NavigableMap operations, and recursively so for its navigable sub-maps.
    Delayed
    A mix-in style interface for marking objects that should be acted upon after a given delay.
    Executor
    An object that executes submitted Runnable tasks.
    ExecutorService
    An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.
    ForkJoinPool.ForkJoinWorkerThreadFactory
    Factory for creating new ForkJoinWorkerThreads.
    ForkJoinPool.ManagedBlocker
    Interface for extending managed parallelism for tasks running in ForkJoinPools.
    Future<V>
    A Future represents the result of an asynchronous computation.
    RejectedExecutionHandler
    A handler for tasks that cannot be executed by a ThreadPoolExecutor.
    RunnableFuture<V>
    A Future that is Runnable.
    RunnableScheduledFuture<V>
    A ScheduledFuture that is Runnable.
    ScheduledExecutorService
    An ExecutorService that can schedule commands to run after a given delay, or to execute periodically.
    ScheduledFuture<V>
    A delayed result-bearing action that can be cancelled.
    ThreadFactory
    An object that creates new threads on demand.
    TransferQueue<E>
    A BlockingQueue in which producers may wait for consumers to receive elements.
  • Class Summary
    Class Description
    AbstractExecutorService
    Provides default implementations of ExecutorService execution methods.
    ArrayBlockingQueue<E>
    A bounded blocking queue backed by an array.
    CompletableFuture<T>
    A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.
    ConcurrentHashMap<K,V>
    A hash table supporting full concurrency of retrievals and high expected concurrency for updates.
    ConcurrentHashMap.KeySetView<K,V>
    A view of a ConcurrentHashMap as a Set of keys, in which additions may optionally be enabled by mapping to a common value.
    ConcurrentLinkedDeque<E>
    An unbounded concurrent deque based on linked nodes.
    ConcurrentLinkedQueue<E>
    An unbounded thread-safe queue based on linked nodes.
    ConcurrentSkipListMap<K,V>
    A scalable concurrent ConcurrentNavigableMap implementation.
    ConcurrentSkipListSet<E>
    A scalable concurrent NavigableSet implementation based on a ConcurrentSkipListMap.
    CopyOnWriteArrayList<E>
    A thread-safe variant of ArrayList in which all mutative operations (add, set, and so on) are implemented by making a fresh copy of the underlying array.
    CopyOnWriteArraySet<E>
    A Set that uses an internal CopyOnWriteArrayList for all of its operations.
    CountDownLatch
    A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes.
    CountedCompleter<T>
    A ForkJoinTask with a completion action performed when triggered and there are no remaining pending actions.
    CyclicBarrier
    A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point.
    DelayQueue<E extends Delayed>
    An unbounded blocking queue of Delayed elements, in which an element can only be taken when its delay has expired.
    Exchanger<V>
    A synchronization point at which threads can pair and swap elements within pairs.
    ExecutorCompletionService<V>
    A CompletionService that uses a supplied Executor to execute tasks.
    Executors
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package.
    ForkJoinPool
    An ExecutorService for running ForkJoinTasks.
    ForkJoinTask<V>
    Abstract base class for tasks that run within a ForkJoinPool.
    ForkJoinWorkerThread
    A thread managed by a ForkJoinPool, which executes ForkJoinTasks.
    FutureTask<V>
    A cancellable asynchronous computation.
    LinkedBlockingDeque<E>
    An optionally-bounded blocking deque based on linked nodes.
    LinkedBlockingQueue<E>
    An optionally-bounded blocking queue based on linked nodes.
    LinkedTransferQueue<E>
    An unbounded TransferQueue based on linked nodes.
    Phaser
    A reusable synchronization barrier, similar in functionality to CyclicBarrier and CountDownLatch but supporting more flexible usage.
    PriorityBlockingQueue<E>
    An unbounded blocking queue that uses the same ordering rules as class PriorityQueue and supplies blocking retrieval operations.
    RecursiveAction
    A recursive resultless ForkJoinTask.
    RecursiveTask<V>
    A recursive result-bearing ForkJoinTask.
    ScheduledThreadPoolExecutor
    A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically.
    Semaphore
    A counting semaphore.
    SynchronousQueue<E>
    A blocking queue in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa.
    ThreadLocalRandom
    A random number generator isolated to the current thread.
    ThreadPoolExecutor
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods.
    ThreadPoolExecutor.AbortPolicy
    A handler for rejected tasks that throws a RejectedExecutionException.
    ThreadPoolExecutor.CallerRunsPolicy
    A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute method, unless the executor has been shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardOldestPolicy
    A handler for rejected tasks that discards the oldest unhandled request and then retries execute, unless the executor is shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardPolicy
    A handler for rejected tasks that silently discards the rejected task.
  • Enum Summary
    Enum Description
    TimeUnit
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.
  • Exception Summary
    Exception Description
    BrokenBarrierException
    Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting.
    CancellationException
    Exception indicating that the result of a value-producing task, such as a FutureTask, cannot be retrieved because the task was cancelled.
    CompletionException
    Exception thrown when an error or other exception is encountered in the course of completing a result or task.
    ExecutionException
    Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception.
    RejectedExecutionException
    Exception thrown by an Executor when a task cannot be accepted for execution.
    TimeoutException
    Exception thrown when a blocking operation times out.

Package java.util.concurrent Description

Utility classes commonly useful in concurrent programming. This package includes a few small standardized extensible frameworks, as well as some classes that provide useful functionality and are otherwise tedious or difficult to implement. Here are brief descriptions of the main components. See also the java.util.concurrent.locks and java.util.concurrent.atomic packages.

Executors

Interfaces. Executor is a simple standardized interface for defining custom thread-like subsystems, including thread pools, asynchronous I/O, and lightweight task frameworks. Depending on which concrete Executor class is being used, tasks may execute in a newly created thread, an existing task-execution thread, or the thread calling execute, and may execute sequentially or concurrently. ExecutorService provides a more complete asynchronous task execution framework. An ExecutorService manages queuing and scheduling of tasks, and allows controlled shutdown. The ScheduledExecutorService subinterface and associated interfaces add support for delayed and periodic task execution. ExecutorServices provide methods arranging asynchronous execution of any function expressed as Callable, the result-bearing analog of Runnable. A Future returns the results of a function, allows determination of whether execution has completed, and provides a means to cancel execution. A RunnableFuture is a Future that possesses a run method that upon execution, sets its results.

Implementations. Classes ThreadPoolExecutor and ScheduledThreadPoolExecutor provide tunable, flexible thread pools. The Executors class provides factory methods for the most common kinds and configurations of Executors, as well as a few utility methods for using them. Other utilities based on Executors include the concrete class FutureTask providing a common extensible implementation of Futures, and ExecutorCompletionService, that assists in coordinating the processing of groups of asynchronous tasks.

Class ForkJoinPool provides an Executor primarily designed for processing instances of ForkJoinTask and its subclasses. These classes employ a work-stealing scheduler that attains high throughput for tasks conforming to restrictions that often hold in computation-intensive parallel processing.

Queues

The ConcurrentLinkedQueue class supplies an efficient scalable thread-safe non-blocking FIFO queue. The ConcurrentLinkedDeque class is similar, but additionally supports the Deque interface.

Five implementations in java.util.concurrent support the extended BlockingQueue interface, that defines blocking versions of put and take: LinkedBlockingQueue, ArrayBlockingQueue, SynchronousQueue, PriorityBlockingQueue, and DelayQueue. The different classes cover the most common usage contexts for producer-consumer, messaging, parallel tasking, and related concurrent designs.

Extended interface TransferQueue, and implementation LinkedTransferQueue introduce a synchronous transfer method (along with related features) in which a producer may optionally block awaiting its consumer.

The BlockingDeque interface extends BlockingQueue to support both FIFO and LIFO (stack-based) operations. Class LinkedBlockingDeque provides an implementation.

Timing

The TimeUnit class provides multiple granularities (including nanoseconds) for specifying and controlling time-out based operations. Most classes in the package contain operations based on time-outs in addition to indefinite waits. In all cases that time-outs are used, the time-out specifies the minimum time that the method should wait before indicating that it timed-out. Implementations make a "best effort" to detect time-outs as soon as possible after they occur. However, an indefinite amount of time may elapse between a time-out being detected and a thread actually executing again after that time-out. All methods that accept timeout parameters treat values less than or equal to zero to mean not to wait at all. To wait "forever", you can use a value of Long.MAX_VALUE.

Synchronizers

Five classes aid common special-purpose synchronization idioms.
  • Semaphore is a classic concurrency tool.
  • CountDownLatch is a very simple yet very common utility for blocking until a given number of signals, events, or conditions hold.
  • A CyclicBarrier is a resettable multiway synchronization point useful in some styles of parallel programming.
  • A Phaser provides a more flexible form of barrier that may be used to control phased computation among multiple threads.
  • An Exchanger allows two threads to exchange objects at a rendezvous point, and is useful in several pipeline designs.

Concurrent Collections

Besides Queues, this package supplies Collection implementations designed for use in multithreaded contexts: ConcurrentHashMap, ConcurrentSkipListMap, ConcurrentSkipListSet, CopyOnWriteArrayList, and CopyOnWriteArraySet. When many threads are expected to access a given collection, a ConcurrentHashMap is normally preferable to a synchronized HashMap, and a ConcurrentSkipListMap is normally preferable to a synchronized TreeMap. A CopyOnWriteArrayList is preferable to a synchronized ArrayList when the expected number of reads and traversals greatly outnumber the number of updates to a list.

The "Concurrent" prefix used with some classes in this package is a shorthand indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks.

Most concurrent Collection implementations (including most Queues) also differ from the usual java.util conventions in that their Iterators and Spliterators provide weakly consistent rather than fast-fail traversal:

  • they may proceed concurrently with other operations
  • they will never throw ConcurrentModificationException
  • they are guaranteed to traverse elements as they existed upon construction exactly once, and may (but are not guaranteed to) reflect any modifications subsequent to construction.

Memory Consistency Properties

Chapter 17 of the Java Language Specification defines the happens-before relation on memory operations such as reads and writes of shared variables. The results of a write by one thread are guaranteed to be visible to a read by another thread only if the write operation happens-before the read operation. The synchronized and volatile constructs, as well as the Thread.start() and Thread.join() methods, can form happens-before relationships. In particular:
  • Each action in a thread happens-before every action in that thread that comes later in the program's order.
  • An unlock (synchronized block or method exit) of a monitor happens-before every subsequent lock (synchronized block or method entry) of that same monitor. And because the happens-before relation is transitive, all actions of a thread prior to unlocking happen-before all actions subsequent to any thread locking that monitor.
  • A write to a volatile field happens-before every subsequent read of that same field. Writes and reads of volatile fields have similar memory consistency effects as entering and exiting monitors, but do not entail mutual exclusion locking.
  • A call to start on a thread happens-before any action in the started thread.
  • All actions in a thread happen-before any other thread successfully returns from a join on that thread.
The methods of all classes in java.util.concurrent and its subpackages extend these guarantees to higher-level synchronization. In particular:
  • Actions in a thread prior to placing an object into any concurrent collection happen-before actions subsequent to the access or removal of that element from the collection in another thread.
  • Actions in a thread prior to the submission of a Runnable to an Executor happen-before its execution begins. Similarly for Callables submitted to an ExecutorService.
  • Actions taken by the asynchronous computation represented by a Future happen-before actions subsequent to the retrieval of the result via Future.get() in another thread.
  • Actions prior to "releasing" synchronizer methods such as Lock.unlock, Semaphore.release, and CountDownLatch.countDown happen-before actions subsequent to a successful "acquiring" method such as Lock.lock, Semaphore.acquire, Condition.await, and CountDownLatch.await on the same synchronizer object in another thread.
  • For each pair of threads that successfully exchange objects via an Exchanger, actions prior to the exchange() in each thread happen-before those subsequent to the corresponding exchange() in another thread.
  • Actions prior to calling CyclicBarrier.await and Phaser.awaitAdvance (as well as its variants) happen-before actions performed by the barrier action, and actions performed by the barrier action happen-before actions subsequent to a successful return from the corresponding await in other threads.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.concurrent

Interfaces

  • BlockingDeque
  • BlockingQueue
  • Callable
  • CompletableFuture.AsynchronousCompletionTask
  • CompletionService
  • CompletionStage
  • ConcurrentMap
  • ConcurrentNavigableMap
  • Delayed
  • Executor
  • ExecutorService
  • ForkJoinPool.ForkJoinWorkerThreadFactory
  • ForkJoinPool.ManagedBlocker
  • Future
  • RejectedExecutionHandler
  • RunnableFuture
  • RunnableScheduledFuture
  • ScheduledExecutorService
  • ScheduledFuture
  • ThreadFactory
  • TransferQueue

Classes

  • AbstractExecutorService
  • ArrayBlockingQueue
  • CompletableFuture
  • ConcurrentHashMap
  • ConcurrentHashMap.KeySetView
  • ConcurrentLinkedDeque
  • ConcurrentLinkedQueue
  • ConcurrentSkipListMap
  • ConcurrentSkipListSet
  • CopyOnWriteArrayList
  • CopyOnWriteArraySet
  • CountDownLatch
  • CountedCompleter
  • CyclicBarrier
  • DelayQueue
  • Exchanger
  • ExecutorCompletionService
  • Executors
  • ForkJoinPool
  • ForkJoinTask
  • ForkJoinWorkerThread
  • FutureTask
  • LinkedBlockingDeque
  • LinkedBlockingQueue
  • LinkedTransferQueue
  • Phaser
  • PriorityBlockingQueue
  • RecursiveAction
  • RecursiveTask
  • ScheduledThreadPoolExecutor
  • Semaphore
  • SynchronousQueue
  • ThreadLocalRandom
  • ThreadPoolExecutor
  • ThreadPoolExecutor.AbortPolicy
  • ThreadPoolExecutor.CallerRunsPolicy
  • ThreadPoolExecutor.DiscardOldestPolicy
  • ThreadPoolExecutor.DiscardPolicy

Enums

  • TimeUnit

Exceptions

  • BrokenBarrierException
  • CancellationException
  • CompletionException
  • ExecutionException
  • RejectedExecutionException
  • TimeoutException


concurrent

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.concurrent

Utility classes commonly useful in concurrent programming.

See: Description

  • Interface Summary
    Interface Description
    BlockingDeque<E>
    A Deque that additionally supports blocking operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element.
    BlockingQueue<E>
    A Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.
    Callable<V>
    A task that returns a result and may throw an exception.
    CompletableFuture.AsynchronousCompletionTask
    A marker interface identifying asynchronous tasks produced by async methods.
    CompletionService<V>
    A service that decouples the production of new asynchronous tasks from the consumption of the results of completed tasks.
    CompletionStage<T>
    A stage of a possibly asynchronous computation, that performs an action or computes a value when another CompletionStage completes.
    ConcurrentMap<K,V>
    A Map providing thread safety and atomicity guarantees.
    ConcurrentNavigableMap<K,V>
    A ConcurrentMap supporting NavigableMap operations, and recursively so for its navigable sub-maps.
    Delayed
    A mix-in style interface for marking objects that should be acted upon after a given delay.
    Executor
    An object that executes submitted Runnable tasks.
    ExecutorService
    An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.
    ForkJoinPool.ForkJoinWorkerThreadFactory
    Factory for creating new ForkJoinWorkerThreads.
    ForkJoinPool.ManagedBlocker
    Interface for extending managed parallelism for tasks running in ForkJoinPools.
    Future<V>
    A Future represents the result of an asynchronous computation.
    RejectedExecutionHandler
    A handler for tasks that cannot be executed by a ThreadPoolExecutor.
    RunnableFuture<V>
    A Future that is Runnable.
    RunnableScheduledFuture<V>
    A ScheduledFuture that is Runnable.
    ScheduledExecutorService
    An ExecutorService that can schedule commands to run after a given delay, or to execute periodically.
    ScheduledFuture<V>
    A delayed result-bearing action that can be cancelled.
    ThreadFactory
    An object that creates new threads on demand.
    TransferQueue<E>
    A BlockingQueue in which producers may wait for consumers to receive elements.
  • Class Summary
    Class Description
    AbstractExecutorService
    Provides default implementations of ExecutorService execution methods.
    ArrayBlockingQueue<E>
    A bounded blocking queue backed by an array.
    CompletableFuture<T>
    A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.
    ConcurrentHashMap<K,V>
    A hash table supporting full concurrency of retrievals and high expected concurrency for updates.
    ConcurrentHashMap.KeySetView<K,V>
    A view of a ConcurrentHashMap as a Set of keys, in which additions may optionally be enabled by mapping to a common value.
    ConcurrentLinkedDeque<E>
    An unbounded concurrent deque based on linked nodes.
    ConcurrentLinkedQueue<E>
    An unbounded thread-safe queue based on linked nodes.
    ConcurrentSkipListMap<K,V>
    A scalable concurrent ConcurrentNavigableMap implementation.
    ConcurrentSkipListSet<E>
    A scalable concurrent NavigableSet implementation based on a ConcurrentSkipListMap.
    CopyOnWriteArrayList<E>
    A thread-safe variant of ArrayList in which all mutative operations (add, set, and so on) are implemented by making a fresh copy of the underlying array.
    CopyOnWriteArraySet<E>
    A Set that uses an internal CopyOnWriteArrayList for all of its operations.
    CountDownLatch
    A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes.
    CountedCompleter<T>
    A ForkJoinTask with a completion action performed when triggered and there are no remaining pending actions.
    CyclicBarrier
    A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point.
    DelayQueue<E extends Delayed>
    An unbounded blocking queue of Delayed elements, in which an element can only be taken when its delay has expired.
    Exchanger<V>
    A synchronization point at which threads can pair and swap elements within pairs.
    ExecutorCompletionService<V>
    A CompletionService that uses a supplied Executor to execute tasks.
    Executors
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package.
    ForkJoinPool
    An ExecutorService for running ForkJoinTasks.
    ForkJoinTask<V>
    Abstract base class for tasks that run within a ForkJoinPool.
    ForkJoinWorkerThread
    A thread managed by a ForkJoinPool, which executes ForkJoinTasks.
    FutureTask<V>
    A cancellable asynchronous computation.
    LinkedBlockingDeque<E>
    An optionally-bounded blocking deque based on linked nodes.
    LinkedBlockingQueue<E>
    An optionally-bounded blocking queue based on linked nodes.
    LinkedTransferQueue<E>
    An unbounded TransferQueue based on linked nodes.
    Phaser
    A reusable synchronization barrier, similar in functionality to CyclicBarrier and CountDownLatch but supporting more flexible usage.
    PriorityBlockingQueue<E>
    An unbounded blocking queue that uses the same ordering rules as class PriorityQueue and supplies blocking retrieval operations.
    RecursiveAction
    A recursive resultless ForkJoinTask.
    RecursiveTask<V>
    A recursive result-bearing ForkJoinTask.
    ScheduledThreadPoolExecutor
    A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically.
    Semaphore
    A counting semaphore.
    SynchronousQueue<E>
    A blocking queue in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa.
    ThreadLocalRandom
    A random number generator isolated to the current thread.
    ThreadPoolExecutor
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods.
    ThreadPoolExecutor.AbortPolicy
    A handler for rejected tasks that throws a RejectedExecutionException.
    ThreadPoolExecutor.CallerRunsPolicy
    A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute method, unless the executor has been shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardOldestPolicy
    A handler for rejected tasks that discards the oldest unhandled request and then retries execute, unless the executor is shut down, in which case the task is discarded.
    ThreadPoolExecutor.DiscardPolicy
    A handler for rejected tasks that silently discards the rejected task.
  • Enum Summary
    Enum Description
    TimeUnit
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.
  • Exception Summary
    Exception Description
    BrokenBarrierException
    Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting.
    CancellationException
    Exception indicating that the result of a value-producing task, such as a FutureTask, cannot be retrieved because the task was cancelled.
    CompletionException
    Exception thrown when an error or other exception is encountered in the course of completing a result or task.
    ExecutionException
    Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception.
    RejectedExecutionException
    Exception thrown by an Executor when a task cannot be accepted for execution.
    TimeoutException
    Exception thrown when a blocking operation times out.

Package java.util.concurrent Description

Utility classes commonly useful in concurrent programming. This package includes a few small standardized extensible frameworks, as well as some classes that provide useful functionality and are otherwise tedious or difficult to implement. Here are brief descriptions of the main components. See also the java.util.concurrent.locks and java.util.concurrent.atomic packages.

Executors

Interfaces. Executor is a simple standardized interface for defining custom thread-like subsystems, including thread pools, asynchronous I/O, and lightweight task frameworks. Depending on which concrete Executor class is being used, tasks may execute in a newly created thread, an existing task-execution thread, or the thread calling execute, and may execute sequentially or concurrently. ExecutorService provides a more complete asynchronous task execution framework. An ExecutorService manages queuing and scheduling of tasks, and allows controlled shutdown. The ScheduledExecutorService subinterface and associated interfaces add support for delayed and periodic task execution. ExecutorServices provide methods arranging asynchronous execution of any function expressed as Callable, the result-bearing analog of Runnable. A Future returns the results of a function, allows determination of whether execution has completed, and provides a means to cancel execution. A RunnableFuture is a Future that possesses a run method that upon execution, sets its results.

Implementations. Classes ThreadPoolExecutor and ScheduledThreadPoolExecutor provide tunable, flexible thread pools. The Executors class provides factory methods for the most common kinds and configurations of Executors, as well as a few utility methods for using them. Other utilities based on Executors include the concrete class FutureTask providing a common extensible implementation of Futures, and ExecutorCompletionService, that assists in coordinating the processing of groups of asynchronous tasks.

Class ForkJoinPool provides an Executor primarily designed for processing instances of ForkJoinTask and its subclasses. These classes employ a work-stealing scheduler that attains high throughput for tasks conforming to restrictions that often hold in computation-intensive parallel processing.

Queues

The ConcurrentLinkedQueue class supplies an efficient scalable thread-safe non-blocking FIFO queue. The ConcurrentLinkedDeque class is similar, but additionally supports the Deque interface.

Five implementations in java.util.concurrent support the extended BlockingQueue interface, that defines blocking versions of put and take: LinkedBlockingQueue, ArrayBlockingQueue, SynchronousQueue, PriorityBlockingQueue, and DelayQueue. The different classes cover the most common usage contexts for producer-consumer, messaging, parallel tasking, and related concurrent designs.

Extended interface TransferQueue, and implementation LinkedTransferQueue introduce a synchronous transfer method (along with related features) in which a producer may optionally block awaiting its consumer.

The BlockingDeque interface extends BlockingQueue to support both FIFO and LIFO (stack-based) operations. Class LinkedBlockingDeque provides an implementation.

Timing

The TimeUnit class provides multiple granularities (including nanoseconds) for specifying and controlling time-out based operations. Most classes in the package contain operations based on time-outs in addition to indefinite waits. In all cases that time-outs are used, the time-out specifies the minimum time that the method should wait before indicating that it timed-out. Implementations make a "best effort" to detect time-outs as soon as possible after they occur. However, an indefinite amount of time may elapse between a time-out being detected and a thread actually executing again after that time-out. All methods that accept timeout parameters treat values less than or equal to zero to mean not to wait at all. To wait "forever", you can use a value of Long.MAX_VALUE.

Synchronizers

Five classes aid common special-purpose synchronization idioms.
  • Semaphore is a classic concurrency tool.
  • CountDownLatch is a very simple yet very common utility for blocking until a given number of signals, events, or conditions hold.
  • A CyclicBarrier is a resettable multiway synchronization point useful in some styles of parallel programming.
  • A Phaser provides a more flexible form of barrier that may be used to control phased computation among multiple threads.
  • An Exchanger allows two threads to exchange objects at a rendezvous point, and is useful in several pipeline designs.

Concurrent Collections

Besides Queues, this package supplies Collection implementations designed for use in multithreaded contexts: ConcurrentHashMap, ConcurrentSkipListMap, ConcurrentSkipListSet, CopyOnWriteArrayList, and CopyOnWriteArraySet. When many threads are expected to access a given collection, a ConcurrentHashMap is normally preferable to a synchronized HashMap, and a ConcurrentSkipListMap is normally preferable to a synchronized TreeMap. A CopyOnWriteArrayList is preferable to a synchronized ArrayList when the expected number of reads and traversals greatly outnumber the number of updates to a list.

The "Concurrent" prefix used with some classes in this package is a shorthand indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks.

Most concurrent Collection implementations (including most Queues) also differ from the usual java.util conventions in that their Iterators and Spliterators provide weakly consistent rather than fast-fail traversal:

  • they may proceed concurrently with other operations
  • they will never throw ConcurrentModificationException
  • they are guaranteed to traverse elements as they existed upon construction exactly once, and may (but are not guaranteed to) reflect any modifications subsequent to construction.

Memory Consistency Properties

Chapter 17 of the Java Language Specification defines the happens-before relation on memory operations such as reads and writes of shared variables. The results of a write by one thread are guaranteed to be visible to a read by another thread only if the write operation happens-before the read operation. The synchronized and volatile constructs, as well as the Thread.start() and Thread.join() methods, can form happens-before relationships. In particular:
  • Each action in a thread happens-before every action in that thread that comes later in the program's order.
  • An unlock (synchronized block or method exit) of a monitor happens-before every subsequent lock (synchronized block or method entry) of that same monitor. And because the happens-before relation is transitive, all actions of a thread prior to unlocking happen-before all actions subsequent to any thread locking that monitor.
  • A write to a volatile field happens-before every subsequent read of that same field. Writes and reads of volatile fields have similar memory consistency effects as entering and exiting monitors, but do not entail mutual exclusion locking.
  • A call to start on a thread happens-before any action in the started thread.
  • All actions in a thread happen-before any other thread successfully returns from a join on that thread.
The methods of all classes in java.util.concurrent and its subpackages extend these guarantees to higher-level synchronization. In particular:
  • Actions in a thread prior to placing an object into any concurrent collection happen-before actions subsequent to the access or removal of that element from the collection in another thread.
  • Actions in a thread prior to the submission of a Runnable to an Executor happen-before its execution begins. Similarly for Callables submitted to an ExecutorService.
  • Actions taken by the asynchronous computation represented by a Future happen-before actions subsequent to the retrieval of the result via Future.get() in another thread.
  • Actions prior to "releasing" synchronizer methods such as Lock.unlock, Semaphore.release, and CountDownLatch.countDown happen-before actions subsequent to a successful "acquiring" method such as Lock.lock, Semaphore.acquire, Condition.await, and CountDownLatch.await on the same synchronizer object in another thread.
  • For each pair of threads that successfully exchange objects via an Exchanger, actions prior to the exchange() in each thread happen-before those subsequent to the corresponding exchange() in another thread.
  • Actions prior to calling CyclicBarrier.await and Phaser.awaitAdvance (as well as its variants) happen-before actions performed by the barrier action, and actions performed by the barrier action happen-before actions subsequent to a successful return from the corresponding await in other threads.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.concurrent

Interfaces

  • BlockingDeque
  • BlockingQueue
  • Callable
  • CompletableFuture.AsynchronousCompletionTask
  • CompletionService
  • CompletionStage
  • ConcurrentMap
  • ConcurrentNavigableMap
  • Delayed
  • Executor
  • ExecutorService
  • ForkJoinPool.ForkJoinWorkerThreadFactory
  • ForkJoinPool.ManagedBlocker
  • Future
  • RejectedExecutionHandler
  • RunnableFuture
  • RunnableScheduledFuture
  • ScheduledExecutorService
  • ScheduledFuture
  • ThreadFactory
  • TransferQueue

Classes

  • AbstractExecutorService
  • ArrayBlockingQueue
  • CompletableFuture
  • ConcurrentHashMap
  • ConcurrentHashMap.KeySetView
  • ConcurrentLinkedDeque
  • ConcurrentLinkedQueue
  • ConcurrentSkipListMap
  • ConcurrentSkipListSet
  • CopyOnWriteArrayList
  • CopyOnWriteArraySet
  • CountDownLatch
  • CountedCompleter
  • CyclicBarrier
  • DelayQueue
  • Exchanger
  • ExecutorCompletionService
  • Executors
  • ForkJoinPool
  • ForkJoinTask
  • ForkJoinWorkerThread
  • FutureTask
  • LinkedBlockingDeque
  • LinkedBlockingQueue
  • LinkedTransferQueue
  • Phaser
  • PriorityBlockingQueue
  • RecursiveAction
  • RecursiveTask
  • ScheduledThreadPoolExecutor
  • Semaphore
  • SynchronousQueue
  • ThreadLocalRandom
  • ThreadPoolExecutor
  • ThreadPoolExecutor.AbortPolicy
  • ThreadPoolExecutor.CallerRunsPolicy
  • ThreadPoolExecutor.DiscardOldestPolicy
  • ThreadPoolExecutor.DiscardPolicy

Enums

  • TimeUnit

Exceptions

  • BrokenBarrierException
  • CancellationException
  • CompletionException
  • ExecutionException
  • RejectedExecutionException
  • TimeoutException


compact1 - java.util.concurrent.atomic

Classes

  • AtomicBoolean
  • AtomicInteger
  • AtomicIntegerArray
  • AtomicIntegerFieldUpdater
  • AtomicLong
  • AtomicLongArray
  • AtomicLongFieldUpdater
  • AtomicMarkableReference
  • AtomicReference
  • AtomicReferenceArray
  • AtomicReferenceFieldUpdater
  • AtomicStampedReference
  • DoubleAccumulator
  • DoubleAdder
  • LongAccumulator
  • LongAdder


atomic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.concurrent.atomic

A small toolkit of classes that support lock-free thread-safe programming on single variables.

See: Description

  • Class Summary
    Class Description
    AtomicBoolean
    A boolean value that may be updated atomically.
    AtomicInteger
    An int value that may be updated atomically.
    AtomicIntegerArray
    An int array in which elements may be updated atomically.
    AtomicIntegerFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile int fields of designated classes.
    AtomicLong
    A long value that may be updated atomically.
    AtomicLongArray
    A long array in which elements may be updated atomically.
    AtomicLongFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile long fields of designated classes.
    AtomicMarkableReference<V>
    An AtomicMarkableReference maintains an object reference along with a mark bit, that can be updated atomically.
    AtomicReference<V>
    An object reference that may be updated atomically.
    AtomicReferenceArray<E>
    An array of object references in which elements may be updated atomically.
    AtomicReferenceFieldUpdater<T,V>
    A reflection-based utility that enables atomic updates to designated volatile reference fields of designated classes.
    AtomicStampedReference<V>
    An AtomicStampedReference maintains an object reference along with an integer "stamp", that can be updated atomically.
    DoubleAccumulator
    One or more variables that together maintain a running double value updated using a supplied function.
    DoubleAdder
    One or more variables that together maintain an initially zero double sum.
    LongAccumulator
    One or more variables that together maintain a running long value updated using a supplied function.
    LongAdder
    One or more variables that together maintain an initially zero long sum.

Package java.util.concurrent.atomic Description

A small toolkit of classes that support lock-free thread-safe programming on single variables. In essence, the classes in this package extend the notion of volatile values, fields, and array elements to those that also provide an atomic conditional update operation of the form:
  boolean compareAndSet(expectedValue, updateValue);

This method (which varies in argument types across different classes) atomically sets a variable to the updateValue if it currently holds the expectedValue, reporting true on success. The classes in this package also contain methods to get and unconditionally set values, as well as a weaker conditional atomic update operation weakCompareAndSet described below.

The specifications of these methods enable implementations to employ efficient machine-level atomic instructions that are available on contemporary processors. However on some platforms, support may entail some form of internal locking. Thus the methods are not strictly guaranteed to be non-blocking -- a thread may block transiently before performing the operation.

Instances of classes AtomicBoolean, AtomicInteger, AtomicLong, and AtomicReference each provide access and updates to a single variable of the corresponding type. Each class also provides appropriate utility methods for that type. For example, classes AtomicLong and AtomicInteger provide atomic increment methods. One application is to generate sequence numbers, as in:

 class Sequencer {
   private final AtomicLong sequenceNumber
     = new AtomicLong(0);
   public long next() {
     return sequenceNumber.getAndIncrement();
   }
 }

It is straightforward to define new utility functions that, like getAndIncrement, apply a function to a value atomically. For example, given some transformation

  long transform(long input)
write your utility method as follows:

 long getAndTransform(AtomicLong var) {
   long prev, next;
   do {
     prev = var.get();
     next = transform(prev);
   } while (!var.compareAndSet(prev, next));
   return prev; // return next; for transformAndGet
 }

The memory effects for accesses and updates of atomics generally follow the rules for volatiles, as stated in The Java Language Specification (17.4 Memory Model):

  • get has the memory effects of reading a volatile variable.
  • set has the memory effects of writing (assigning) a volatile variable.
  • lazySet has the memory effects of writing (assigning) a volatile variable except that it permits reorderings with subsequent (but not previous) memory actions that do not themselves impose reordering constraints with ordinary non-volatile writes. Among other usage contexts, lazySet may apply when nulling out, for the sake of garbage collection, a reference that is never accessed again.
  • weakCompareAndSet atomically reads and conditionally writes a variable but does not create any happens-before orderings, so provides no guarantees with respect to previous or subsequent reads and writes of any variables other than the target of the weakCompareAndSet.
  • compareAndSet and all other read-and-update operations such as getAndIncrement have the memory effects of both reading and writing volatile variables.

In addition to classes representing single values, this package contains Updater classes that can be used to obtain compareAndSet operations on any selected volatile field of any selected class. AtomicReferenceFieldUpdater, AtomicIntegerFieldUpdater, and AtomicLongFieldUpdater are reflection-based utilities that provide access to the associated field types. These are mainly of use in atomic data structures in which several volatile fields of the same node (for example, the links of a tree node) are independently subject to atomic updates. These classes enable greater flexibility in how and when to use atomic updates, at the expense of more awkward reflection-based setup, less convenient usage, and weaker guarantees.

The AtomicIntegerArray, AtomicLongArray, and AtomicReferenceArray classes further extend atomic operation support to arrays of these types. These classes are also notable in providing volatile access semantics for their array elements, which is not supported for ordinary arrays.

The atomic classes also support method weakCompareAndSet, which has limited applicability. On some platforms, the weak version may be more efficient than compareAndSet in the normal case, but differs in that any given invocation of the weakCompareAndSet method may return false spuriously (that is, for no apparent reason). A false return means only that the operation may be retried if desired, relying on the guarantee that repeated invocation when the variable holds expectedValue and no other thread is also attempting to set the variable will eventually succeed. (Such spurious failures may for example be due to memory contention effects that are unrelated to whether the expected and current values are equal.) Additionally weakCompareAndSet does not provide ordering guarantees that are usually needed for synchronization control. However, the method may be useful for updating counters and statistics when such updates are unrelated to the other happens-before orderings of a program. When a thread sees an update to an atomic variable caused by a weakCompareAndSet, it does not necessarily see updates to any other variables that occurred before the weakCompareAndSet. This may be acceptable when, for example, updating performance statistics, but rarely otherwise.

The AtomicMarkableReference class associates a single boolean with a reference. For example, this bit might be used inside a data structure to mean that the object being referenced has logically been deleted. The AtomicStampedReference class associates an integer value with a reference. This may be used for example, to represent version numbers corresponding to series of updates.

Atomic classes are designed primarily as building blocks for implementing non-blocking data structures and related infrastructure classes. The compareAndSet method is not a general replacement for locking. It applies only when critical updates for an object are confined to a single variable.

Atomic classes are not general purpose replacements for java.lang.Integer and related classes. They do not define methods such as equals, hashCode and compareTo. (Because atomic variables are expected to be mutated, they are poor choices for hash table keys.) Additionally, classes are provided only for those types that are commonly useful in intended applications. For example, there is no atomic class for representing byte. In those infrequent cases where you would like to do so, you can use an AtomicInteger to hold byte values, and cast appropriately. You can also hold floats using Float.floatToRawIntBits(float) and Float.intBitsToFloat(int) conversions, and doubles using Double.doubleToRawLongBits(double) and Double.longBitsToDouble(long) conversions.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.concurrent.atomic

Classes

  • AtomicBoolean
  • AtomicInteger
  • AtomicIntegerArray
  • AtomicIntegerFieldUpdater
  • AtomicLong
  • AtomicLongArray
  • AtomicLongFieldUpdater
  • AtomicMarkableReference
  • AtomicReference
  • AtomicReferenceArray
  • AtomicReferenceFieldUpdater
  • AtomicStampedReference
  • DoubleAccumulator
  • DoubleAdder
  • LongAccumulator
  • LongAdder


atomic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.concurrent.atomic

A small toolkit of classes that support lock-free thread-safe programming on single variables.

See: Description

  • Class Summary
    Class Description
    AtomicBoolean
    A boolean value that may be updated atomically.
    AtomicInteger
    An int value that may be updated atomically.
    AtomicIntegerArray
    An int array in which elements may be updated atomically.
    AtomicIntegerFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile int fields of designated classes.
    AtomicLong
    A long value that may be updated atomically.
    AtomicLongArray
    A long array in which elements may be updated atomically.
    AtomicLongFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile long fields of designated classes.
    AtomicMarkableReference<V>
    An AtomicMarkableReference maintains an object reference along with a mark bit, that can be updated atomically.
    AtomicReference<V>
    An object reference that may be updated atomically.
    AtomicReferenceArray<E>
    An array of object references in which elements may be updated atomically.
    AtomicReferenceFieldUpdater<T,V>
    A reflection-based utility that enables atomic updates to designated volatile reference fields of designated classes.
    AtomicStampedReference<V>
    An AtomicStampedReference maintains an object reference along with an integer "stamp", that can be updated atomically.
    DoubleAccumulator
    One or more variables that together maintain a running double value updated using a supplied function.
    DoubleAdder
    One or more variables that together maintain an initially zero double sum.
    LongAccumulator
    One or more variables that together maintain a running long value updated using a supplied function.
    LongAdder
    One or more variables that together maintain an initially zero long sum.

Package java.util.concurrent.atomic Description

A small toolkit of classes that support lock-free thread-safe programming on single variables. In essence, the classes in this package extend the notion of volatile values, fields, and array elements to those that also provide an atomic conditional update operation of the form:
  boolean compareAndSet(expectedValue, updateValue);

This method (which varies in argument types across different classes) atomically sets a variable to the updateValue if it currently holds the expectedValue, reporting true on success. The classes in this package also contain methods to get and unconditionally set values, as well as a weaker conditional atomic update operation weakCompareAndSet described below.

The specifications of these methods enable implementations to employ efficient machine-level atomic instructions that are available on contemporary processors. However on some platforms, support may entail some form of internal locking. Thus the methods are not strictly guaranteed to be non-blocking -- a thread may block transiently before performing the operation.

Instances of classes AtomicBoolean, AtomicInteger, AtomicLong, and AtomicReference each provide access and updates to a single variable of the corresponding type. Each class also provides appropriate utility methods for that type. For example, classes AtomicLong and AtomicInteger provide atomic increment methods. One application is to generate sequence numbers, as in:

 class Sequencer {
   private final AtomicLong sequenceNumber
     = new AtomicLong(0);
   public long next() {
     return sequenceNumber.getAndIncrement();
   }
 }

It is straightforward to define new utility functions that, like getAndIncrement, apply a function to a value atomically. For example, given some transformation

  long transform(long input)
write your utility method as follows:

 long getAndTransform(AtomicLong var) {
   long prev, next;
   do {
     prev = var.get();
     next = transform(prev);
   } while (!var.compareAndSet(prev, next));
   return prev; // return next; for transformAndGet
 }

The memory effects for accesses and updates of atomics generally follow the rules for volatiles, as stated in The Java Language Specification (17.4 Memory Model):

  • get has the memory effects of reading a volatile variable.
  • set has the memory effects of writing (assigning) a volatile variable.
  • lazySet has the memory effects of writing (assigning) a volatile variable except that it permits reorderings with subsequent (but not previous) memory actions that do not themselves impose reordering constraints with ordinary non-volatile writes. Among other usage contexts, lazySet may apply when nulling out, for the sake of garbage collection, a reference that is never accessed again.
  • weakCompareAndSet atomically reads and conditionally writes a variable but does not create any happens-before orderings, so provides no guarantees with respect to previous or subsequent reads and writes of any variables other than the target of the weakCompareAndSet.
  • compareAndSet and all other read-and-update operations such as getAndIncrement have the memory effects of both reading and writing volatile variables.

In addition to classes representing single values, this package contains Updater classes that can be used to obtain compareAndSet operations on any selected volatile field of any selected class. AtomicReferenceFieldUpdater, AtomicIntegerFieldUpdater, and AtomicLongFieldUpdater are reflection-based utilities that provide access to the associated field types. These are mainly of use in atomic data structures in which several volatile fields of the same node (for example, the links of a tree node) are independently subject to atomic updates. These classes enable greater flexibility in how and when to use atomic updates, at the expense of more awkward reflection-based setup, less convenient usage, and weaker guarantees.

The AtomicIntegerArray, AtomicLongArray, and AtomicReferenceArray classes further extend atomic operation support to arrays of these types. These classes are also notable in providing volatile access semantics for their array elements, which is not supported for ordinary arrays.

The atomic classes also support method weakCompareAndSet, which has limited applicability. On some platforms, the weak version may be more efficient than compareAndSet in the normal case, but differs in that any given invocation of the weakCompareAndSet method may return false spuriously (that is, for no apparent reason). A false return means only that the operation may be retried if desired, relying on the guarantee that repeated invocation when the variable holds expectedValue and no other thread is also attempting to set the variable will eventually succeed. (Such spurious failures may for example be due to memory contention effects that are unrelated to whether the expected and current values are equal.) Additionally weakCompareAndSet does not provide ordering guarantees that are usually needed for synchronization control. However, the method may be useful for updating counters and statistics when such updates are unrelated to the other happens-before orderings of a program. When a thread sees an update to an atomic variable caused by a weakCompareAndSet, it does not necessarily see updates to any other variables that occurred before the weakCompareAndSet. This may be acceptable when, for example, updating performance statistics, but rarely otherwise.

The AtomicMarkableReference class associates a single boolean with a reference. For example, this bit might be used inside a data structure to mean that the object being referenced has logically been deleted. The AtomicStampedReference class associates an integer value with a reference. This may be used for example, to represent version numbers corresponding to series of updates.

Atomic classes are designed primarily as building blocks for implementing non-blocking data structures and related infrastructure classes. The compareAndSet method is not a general replacement for locking. It applies only when critical updates for an object are confined to a single variable.

Atomic classes are not general purpose replacements for java.lang.Integer and related classes. They do not define methods such as equals, hashCode and compareTo. (Because atomic variables are expected to be mutated, they are poor choices for hash table keys.) Additionally, classes are provided only for those types that are commonly useful in intended applications. For example, there is no atomic class for representing byte. In those infrequent cases where you would like to do so, you can use an AtomicInteger to hold byte values, and cast appropriately. You can also hold floats using Float.floatToRawIntBits(float) and Float.intBitsToFloat(int) conversions, and doubles using Double.doubleToRawLongBits(double) and Double.longBitsToDouble(long) conversions.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.concurrent.atomic

Classes

  • AtomicBoolean
  • AtomicInteger
  • AtomicIntegerArray
  • AtomicIntegerFieldUpdater
  • AtomicLong
  • AtomicLongArray
  • AtomicLongFieldUpdater
  • AtomicMarkableReference
  • AtomicReference
  • AtomicReferenceArray
  • AtomicReferenceFieldUpdater
  • AtomicStampedReference
  • DoubleAccumulator
  • DoubleAdder
  • LongAccumulator
  • LongAdder


atomic

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.concurrent.atomic

A small toolkit of classes that support lock-free thread-safe programming on single variables.

See: Description

  • Class Summary
    Class Description
    AtomicBoolean
    A boolean value that may be updated atomically.
    AtomicInteger
    An int value that may be updated atomically.
    AtomicIntegerArray
    An int array in which elements may be updated atomically.
    AtomicIntegerFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile int fields of designated classes.
    AtomicLong
    A long value that may be updated atomically.
    AtomicLongArray
    A long array in which elements may be updated atomically.
    AtomicLongFieldUpdater<T>
    A reflection-based utility that enables atomic updates to designated volatile long fields of designated classes.
    AtomicMarkableReference<V>
    An AtomicMarkableReference maintains an object reference along with a mark bit, that can be updated atomically.
    AtomicReference<V>
    An object reference that may be updated atomically.
    AtomicReferenceArray<E>
    An array of object references in which elements may be updated atomically.
    AtomicReferenceFieldUpdater<T,V>
    A reflection-based utility that enables atomic updates to designated volatile reference fields of designated classes.
    AtomicStampedReference<V>
    An AtomicStampedReference maintains an object reference along with an integer "stamp", that can be updated atomically.
    DoubleAccumulator
    One or more variables that together maintain a running double value updated using a supplied function.
    DoubleAdder
    One or more variables that together maintain an initially zero double sum.
    LongAccumulator
    One or more variables that together maintain a running long value updated using a supplied function.
    LongAdder
    One or more variables that together maintain an initially zero long sum.

Package java.util.concurrent.atomic Description

A small toolkit of classes that support lock-free thread-safe programming on single variables. In essence, the classes in this package extend the notion of volatile values, fields, and array elements to those that also provide an atomic conditional update operation of the form:
  boolean compareAndSet(expectedValue, updateValue);

This method (which varies in argument types across different classes) atomically sets a variable to the updateValue if it currently holds the expectedValue, reporting true on success. The classes in this package also contain methods to get and unconditionally set values, as well as a weaker conditional atomic update operation weakCompareAndSet described below.

The specifications of these methods enable implementations to employ efficient machine-level atomic instructions that are available on contemporary processors. However on some platforms, support may entail some form of internal locking. Thus the methods are not strictly guaranteed to be non-blocking -- a thread may block transiently before performing the operation.

Instances of classes AtomicBoolean, AtomicInteger, AtomicLong, and AtomicReference each provide access and updates to a single variable of the corresponding type. Each class also provides appropriate utility methods for that type. For example, classes AtomicLong and AtomicInteger provide atomic increment methods. One application is to generate sequence numbers, as in:

 class Sequencer {
   private final AtomicLong sequenceNumber
     = new AtomicLong(0);
   public long next() {
     return sequenceNumber.getAndIncrement();
   }
 }

It is straightforward to define new utility functions that, like getAndIncrement, apply a function to a value atomically. For example, given some transformation

  long transform(long input)
write your utility method as follows:

 long getAndTransform(AtomicLong var) {
   long prev, next;
   do {
     prev = var.get();
     next = transform(prev);
   } while (!var.compareAndSet(prev, next));
   return prev; // return next; for transformAndGet
 }

The memory effects for accesses and updates of atomics generally follow the rules for volatiles, as stated in The Java Language Specification (17.4 Memory Model):

  • get has the memory effects of reading a volatile variable.
  • set has the memory effects of writing (assigning) a volatile variable.
  • lazySet has the memory effects of writing (assigning) a volatile variable except that it permits reorderings with subsequent (but not previous) memory actions that do not themselves impose reordering constraints with ordinary non-volatile writes. Among other usage contexts, lazySet may apply when nulling out, for the sake of garbage collection, a reference that is never accessed again.
  • weakCompareAndSet atomically reads and conditionally writes a variable but does not create any happens-before orderings, so provides no guarantees with respect to previous or subsequent reads and writes of any variables other than the target of the weakCompareAndSet.
  • compareAndSet and all other read-and-update operations such as getAndIncrement have the memory effects of both reading and writing volatile variables.

In addition to classes representing single values, this package contains Updater classes that can be used to obtain compareAndSet operations on any selected volatile field of any selected class. AtomicReferenceFieldUpdater, AtomicIntegerFieldUpdater, and AtomicLongFieldUpdater are reflection-based utilities that provide access to the associated field types. These are mainly of use in atomic data structures in which several volatile fields of the same node (for example, the links of a tree node) are independently subject to atomic updates. These classes enable greater flexibility in how and when to use atomic updates, at the expense of more awkward reflection-based setup, less convenient usage, and weaker guarantees.

The AtomicIntegerArray, AtomicLongArray, and AtomicReferenceArray classes further extend atomic operation support to arrays of these types. These classes are also notable in providing volatile access semantics for their array elements, which is not supported for ordinary arrays.

The atomic classes also support method weakCompareAndSet, which has limited applicability. On some platforms, the weak version may be more efficient than compareAndSet in the normal case, but differs in that any given invocation of the weakCompareAndSet method may return false spuriously (that is, for no apparent reason). A false return means only that the operation may be retried if desired, relying on the guarantee that repeated invocation when the variable holds expectedValue and no other thread is also attempting to set the variable will eventually succeed. (Such spurious failures may for example be due to memory contention effects that are unrelated to whether the expected and current values are equal.) Additionally weakCompareAndSet does not provide ordering guarantees that are usually needed for synchronization control. However, the method may be useful for updating counters and statistics when such updates are unrelated to the other happens-before orderings of a program. When a thread sees an update to an atomic variable caused by a weakCompareAndSet, it does not necessarily see updates to any other variables that occurred before the weakCompareAndSet. This may be acceptable when, for example, updating performance statistics, but rarely otherwise.

The AtomicMarkableReference class associates a single boolean with a reference. For example, this bit might be used inside a data structure to mean that the object being referenced has logically been deleted. The AtomicStampedReference class associates an integer value with a reference. This may be used for example, to represent version numbers corresponding to series of updates.

Atomic classes are designed primarily as building blocks for implementing non-blocking data structures and related infrastructure classes. The compareAndSet method is not a general replacement for locking. It applies only when critical updates for an object are confined to a single variable.

Atomic classes are not general purpose replacements for java.lang.Integer and related classes. They do not define methods such as equals, hashCode and compareTo. (Because atomic variables are expected to be mutated, they are poor choices for hash table keys.) Additionally, classes are provided only for those types that are commonly useful in intended applications. For example, there is no atomic class for representing byte. In those infrequent cases where you would like to do so, you can use an AtomicInteger to hold byte values, and cast appropriately. You can also hold floats using Float.floatToRawIntBits(float) and Float.intBitsToFloat(int) conversions, and doubles using Double.doubleToRawLongBits(double) and Double.longBitsToDouble(long) conversions.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.concurrent.atomic

Classes

  • AtomicBoolean
  • AtomicInteger
  • AtomicIntegerArray
  • AtomicIntegerFieldUpdater
  • AtomicLong
  • AtomicLongArray
  • AtomicLongFieldUpdater
  • AtomicMarkableReference
  • AtomicReference
  • AtomicReferenceArray
  • AtomicReferenceFieldUpdater
  • AtomicStampedReference
  • DoubleAccumulator
  • DoubleAdder
  • LongAccumulator
  • LongAdder


compact1 - java.util.concurrent.locks

Interfaces

  • Condition
  • Lock
  • ReadWriteLock

Classes

  • AbstractOwnableSynchronizer
  • AbstractQueuedLongSynchronizer
  • AbstractQueuedSynchronizer
  • LockSupport
  • ReentrantLock
  • ReentrantReadWriteLock
  • ReentrantReadWriteLock.ReadLock
  • ReentrantReadWriteLock.WriteLock
  • StampedLock


locks

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.concurrent.locks

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.

See: Description

  • Interface Summary
    Interface Description
    Condition
    Condition factors out the Object monitor methods (wait, notify and notifyAll) into distinct objects to give the effect of having multiple wait-sets per object, by combining them with the use of arbitrary Lock implementations.
    Lock
    Lock implementations provide more extensive locking operations than can be obtained using synchronized methods and statements.
    ReadWriteLock
    A ReadWriteLock maintains a pair of associated locks, one for read-only operations and one for writing.
  • Class Summary
    Class Description
    AbstractOwnableSynchronizer
    A synchronizer that may be exclusively owned by a thread.
    AbstractQueuedLongSynchronizer
    A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.
    AbstractQueuedSynchronizer
    Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.
    LockSupport
    Basic thread blocking primitives for creating locks and other synchronization classes.
    ReentrantLock
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.
    ReentrantReadWriteLock
    An implementation of ReadWriteLock supporting similar semantics to ReentrantLock.
    ReentrantReadWriteLock.ReadLock
    The lock returned by method ReentrantReadWriteLock.readLock().
    ReentrantReadWriteLock.WriteLock
    The lock returned by method ReentrantReadWriteLock.writeLock().
    StampedLock
    A capability-based lock with three modes for controlling read/write access.

Package java.util.concurrent.locks Description

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors. The framework permits much greater flexibility in the use of locks and conditions, at the expense of more awkward syntax.

The Lock interface supports locking disciplines that differ in semantics (reentrant, fair, etc), and that can be used in non-block-structured contexts including hand-over-hand and lock reordering algorithms. The main implementation is ReentrantLock.

The ReadWriteLock interface similarly defines locks that may be shared among readers but are exclusive to writers. Only a single implementation, ReentrantReadWriteLock, is provided, since it covers most standard usage contexts. But programmers may create their own implementations to cover nonstandard requirements.

The Condition interface describes condition variables that may be associated with Locks. These are similar in usage to the implicit monitors accessed using Object.wait, but offer extended capabilities. In particular, multiple Condition objects may be associated with a single Lock. To avoid compatibility issues, the names of Condition methods are different from the corresponding Object versions.

The AbstractQueuedSynchronizer class serves as a useful superclass for defining locks and other synchronizers that rely on queuing blocked threads. The AbstractQueuedLongSynchronizer class provides the same functionality but extends support to 64 bits of synchronization state. Both extend class AbstractOwnableSynchronizer, a simple class that helps record the thread currently holding exclusive synchronization. The LockSupport class provides lower-level blocking and unblocking support that is useful for those developers implementing their own customized lock classes.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.concurrent.locks

Interfaces

  • Condition
  • Lock
  • ReadWriteLock

Classes

  • AbstractOwnableSynchronizer
  • AbstractQueuedLongSynchronizer
  • AbstractQueuedSynchronizer
  • LockSupport
  • ReentrantLock
  • ReentrantReadWriteLock
  • ReentrantReadWriteLock.ReadLock
  • ReentrantReadWriteLock.WriteLock
  • StampedLock


locks

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.concurrent.locks

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.

See: Description

  • Interface Summary
    Interface Description
    Condition
    Condition factors out the Object monitor methods (wait, notify and notifyAll) into distinct objects to give the effect of having multiple wait-sets per object, by combining them with the use of arbitrary Lock implementations.
    Lock
    Lock implementations provide more extensive locking operations than can be obtained using synchronized methods and statements.
    ReadWriteLock
    A ReadWriteLock maintains a pair of associated locks, one for read-only operations and one for writing.
  • Class Summary
    Class Description
    AbstractOwnableSynchronizer
    A synchronizer that may be exclusively owned by a thread.
    AbstractQueuedLongSynchronizer
    A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.
    AbstractQueuedSynchronizer
    Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.
    LockSupport
    Basic thread blocking primitives for creating locks and other synchronization classes.
    ReentrantLock
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.
    ReentrantReadWriteLock
    An implementation of ReadWriteLock supporting similar semantics to ReentrantLock.
    ReentrantReadWriteLock.ReadLock
    The lock returned by method ReentrantReadWriteLock.readLock().
    ReentrantReadWriteLock.WriteLock
    The lock returned by method ReentrantReadWriteLock.writeLock().
    StampedLock
    A capability-based lock with three modes for controlling read/write access.

Package java.util.concurrent.locks Description

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors. The framework permits much greater flexibility in the use of locks and conditions, at the expense of more awkward syntax.

The Lock interface supports locking disciplines that differ in semantics (reentrant, fair, etc), and that can be used in non-block-structured contexts including hand-over-hand and lock reordering algorithms. The main implementation is ReentrantLock.

The ReadWriteLock interface similarly defines locks that may be shared among readers but are exclusive to writers. Only a single implementation, ReentrantReadWriteLock, is provided, since it covers most standard usage contexts. But programmers may create their own implementations to cover nonstandard requirements.

The Condition interface describes condition variables that may be associated with Locks. These are similar in usage to the implicit monitors accessed using Object.wait, but offer extended capabilities. In particular, multiple Condition objects may be associated with a single Lock. To avoid compatibility issues, the names of Condition methods are different from the corresponding Object versions.

The AbstractQueuedSynchronizer class serves as a useful superclass for defining locks and other synchronizers that rely on queuing blocked threads. The AbstractQueuedLongSynchronizer class provides the same functionality but extends support to 64 bits of synchronization state. Both extend class AbstractOwnableSynchronizer, a simple class that helps record the thread currently holding exclusive synchronization. The LockSupport class provides lower-level blocking and unblocking support that is useful for those developers implementing their own customized lock classes.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.concurrent.locks

Interfaces

  • Condition
  • Lock
  • ReadWriteLock

Classes

  • AbstractOwnableSynchronizer
  • AbstractQueuedLongSynchronizer
  • AbstractQueuedSynchronizer
  • LockSupport
  • ReentrantLock
  • ReentrantReadWriteLock
  • ReentrantReadWriteLock.ReadLock
  • ReentrantReadWriteLock.WriteLock
  • StampedLock


locks

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.concurrent.locks

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.

See: Description

  • Interface Summary
    Interface Description
    Condition
    Condition factors out the Object monitor methods (wait, notify and notifyAll) into distinct objects to give the effect of having multiple wait-sets per object, by combining them with the use of arbitrary Lock implementations.
    Lock
    Lock implementations provide more extensive locking operations than can be obtained using synchronized methods and statements.
    ReadWriteLock
    A ReadWriteLock maintains a pair of associated locks, one for read-only operations and one for writing.
  • Class Summary
    Class Description
    AbstractOwnableSynchronizer
    A synchronizer that may be exclusively owned by a thread.
    AbstractQueuedLongSynchronizer
    A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.
    AbstractQueuedSynchronizer
    Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.
    LockSupport
    Basic thread blocking primitives for creating locks and other synchronization classes.
    ReentrantLock
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.
    ReentrantReadWriteLock
    An implementation of ReadWriteLock supporting similar semantics to ReentrantLock.
    ReentrantReadWriteLock.ReadLock
    The lock returned by method ReentrantReadWriteLock.readLock().
    ReentrantReadWriteLock.WriteLock
    The lock returned by method ReentrantReadWriteLock.writeLock().
    StampedLock
    A capability-based lock with three modes for controlling read/write access.

Package java.util.concurrent.locks Description

Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors. The framework permits much greater flexibility in the use of locks and conditions, at the expense of more awkward syntax.

The Lock interface supports locking disciplines that differ in semantics (reentrant, fair, etc), and that can be used in non-block-structured contexts including hand-over-hand and lock reordering algorithms. The main implementation is ReentrantLock.

The ReadWriteLock interface similarly defines locks that may be shared among readers but are exclusive to writers. Only a single implementation, ReentrantReadWriteLock, is provided, since it covers most standard usage contexts. But programmers may create their own implementations to cover nonstandard requirements.

The Condition interface describes condition variables that may be associated with Locks. These are similar in usage to the implicit monitors accessed using Object.wait, but offer extended capabilities. In particular, multiple Condition objects may be associated with a single Lock. To avoid compatibility issues, the names of Condition methods are different from the corresponding Object versions.

The AbstractQueuedSynchronizer class serves as a useful superclass for defining locks and other synchronizers that rely on queuing blocked threads. The AbstractQueuedLongSynchronizer class provides the same functionality but extends support to 64 bits of synchronization state. Both extend class AbstractOwnableSynchronizer, a simple class that helps record the thread currently holding exclusive synchronization. The LockSupport class provides lower-level blocking and unblocking support that is useful for those developers implementing their own customized lock classes.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.concurrent.locks

Interfaces

  • Condition
  • Lock
  • ReadWriteLock

Classes

  • AbstractOwnableSynchronizer
  • AbstractQueuedLongSynchronizer
  • AbstractQueuedSynchronizer
  • LockSupport
  • ReentrantLock
  • ReentrantReadWriteLock
  • ReentrantReadWriteLock.ReadLock
  • ReentrantReadWriteLock.WriteLock
  • StampedLock


compact1 - java.util.function

Interfaces

  • BiConsumer
  • BiFunction
  • BinaryOperator
  • BiPredicate
  • BooleanSupplier
  • Consumer
  • DoubleBinaryOperator
  • DoubleConsumer
  • DoubleFunction
  • DoublePredicate
  • DoubleSupplier
  • DoubleToIntFunction
  • DoubleToLongFunction
  • DoubleUnaryOperator
  • Function
  • IntBinaryOperator
  • IntConsumer
  • IntFunction
  • IntPredicate
  • IntSupplier
  • IntToDoubleFunction
  • IntToLongFunction
  • IntUnaryOperator
  • LongBinaryOperator
  • LongConsumer
  • LongFunction
  • LongPredicate
  • LongSupplier
  • LongToDoubleFunction
  • LongToIntFunction
  • LongUnaryOperator
  • ObjDoubleConsumer
  • ObjIntConsumer
  • ObjLongConsumer
  • Predicate
  • Supplier
  • ToDoubleBiFunction
  • ToDoubleFunction
  • ToIntBiFunction
  • ToIntFunction
  • ToLongBiFunction
  • ToLongFunction
  • UnaryOperator


function

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.function

Functional interfaces provide target types for lambda expressions and method references.

See: Description

  • Interface Summary
    Interface Description
    BiConsumer<T,U>
    Represents an operation that accepts two input arguments and returns no result.
    BiFunction<T,U,R>
    Represents a function that accepts two arguments and produces a result.
    BinaryOperator<T>
    Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
    BiPredicate<T,U>
    Represents a predicate (boolean-valued function) of two arguments.
    BooleanSupplier
    Represents a supplier of boolean-valued results.
    Consumer<T>
    Represents an operation that accepts a single input argument and returns no result.
    DoubleBinaryOperator
    Represents an operation upon two double-valued operands and producing a double-valued result.
    DoubleConsumer
    Represents an operation that accepts a single double-valued argument and returns no result.
    DoubleFunction<R>
    Represents a function that accepts a double-valued argument and produces a result.
    DoublePredicate
    Represents a predicate (boolean-valued function) of one double-valued argument.
    DoubleSupplier
    Represents a supplier of double-valued results.
    DoubleToIntFunction
    Represents a function that accepts a double-valued argument and produces an int-valued result.
    DoubleToLongFunction
    Represents a function that accepts a double-valued argument and produces a long-valued result.
    DoubleUnaryOperator
    Represents an operation on a single double-valued operand that produces a double-valued result.
    Function<T,R>
    Represents a function that accepts one argument and produces a result.
    IntBinaryOperator
    Represents an operation upon two int-valued operands and producing an int-valued result.
    IntConsumer
    Represents an operation that accepts a single int-valued argument and returns no result.
    IntFunction<R>
    Represents a function that accepts an int-valued argument and produces a result.
    IntPredicate
    Represents a predicate (boolean-valued function) of one int-valued argument.
    IntSupplier
    Represents a supplier of int-valued results.
    IntToDoubleFunction
    Represents a function that accepts an int-valued argument and produces a double-valued result.
    IntToLongFunction
    Represents a function that accepts an int-valued argument and produces a long-valued result.
    IntUnaryOperator
    Represents an operation on a single int-valued operand that produces an int-valued result.
    LongBinaryOperator
    Represents an operation upon two long-valued operands and producing a long-valued result.
    LongConsumer
    Represents an operation that accepts a single long-valued argument and returns no result.
    LongFunction<R>
    Represents a function that accepts a long-valued argument and produces a result.
    LongPredicate
    Represents a predicate (boolean-valued function) of one long-valued argument.
    LongSupplier
    Represents a supplier of long-valued results.
    LongToDoubleFunction
    Represents a function that accepts a long-valued argument and produces a double-valued result.
    LongToIntFunction
    Represents a function that accepts a long-valued argument and produces an int-valued result.
    LongUnaryOperator
    Represents an operation on a single long-valued operand that produces a long-valued result.
    ObjDoubleConsumer<T>
    Represents an operation that accepts an object-valued and a double-valued argument, and returns no result.
    ObjIntConsumer<T>
    Represents an operation that accepts an object-valued and a int-valued argument, and returns no result.
    ObjLongConsumer<T>
    Represents an operation that accepts an object-valued and a long-valued argument, and returns no result.
    Predicate<T>
    Represents a predicate (boolean-valued function) of one argument.
    Supplier<T>
    Represents a supplier of results.
    ToDoubleBiFunction<T,U>
    Represents a function that accepts two arguments and produces a double-valued result.
    ToDoubleFunction<T>
    Represents a function that produces a double-valued result.
    ToIntBiFunction<T,U>
    Represents a function that accepts two arguments and produces an int-valued result.
    ToIntFunction<T>
    Represents a function that produces an int-valued result.
    ToLongBiFunction<T,U>
    Represents a function that accepts two arguments and produces a long-valued result.
    ToLongFunction<T>
    Represents a function that produces a long-valued result.
    UnaryOperator<T>
    Represents an operation on a single operand that produces a result of the same type as its operand.

Package java.util.function Description

Functional interfaces provide target types for lambda expressions and method references. Each functional interface has a single abstract method, called the functional method for that functional interface, to which the lambda expression's parameter and return types are matched or adapted. Functional interfaces can provide a target type in multiple contexts, such as assignment context, method invocation, or cast context:

     // Assignment context
     Predicate<String> p = String::isEmpty;

     // Method invocation context
     stream.filter(e -> e.getSize() > 10)...

     // Cast context
     stream.map((ToIntFunction) e -> e.getSize())...

The interfaces in this package are general purpose functional interfaces used by the JDK, and are available to be used by user code as well. While they do not identify a complete set of function shapes to which lambda expressions might be adapted, they provide enough to cover common requirements. Other functional interfaces provided for specific purposes, such as FileFilter, are defined in the packages where they are used.

The interfaces in this package are annotated with FunctionalInterface. This annotation is not a requirement for the compiler to recognize an interface as a functional interface, but merely an aid to capture design intent and enlist the help of the compiler in identifying accidental violations of design intent.

Functional interfaces often represent abstract concepts like functions, actions, or predicates. In documenting functional interfaces, or referring to variables typed as functional interfaces, it is common to refer directly to those abstract concepts, for example using "this function" instead of "the function represented by this object". When an API method is said to accept or return a functional interface in this manner, such as "applies the provided function to...", this is understood to mean a non-null reference to an object implementing the appropriate functional interface, unless potential nullity is explicitly specified.

The functional interfaces in this package follow an extensible naming convention, as follows:

  • There are several basic function shapes, including Function (unary function from T to R), Consumer (unary function from T to void), Predicate (unary function from T to boolean), and Supplier (nilary function to R).
  • Function shapes have a natural arity based on how they are most commonly used. The basic shapes can be modified by an arity prefix to indicate a different arity, such as BiFunction (binary function from T and U to R).
  • There are additional derived function shapes which extend the basic function shapes, including UnaryOperator (extends Function) and BinaryOperator (extends BiFunction).
  • Type parameters of functional interfaces can be specialized to primitives with additional type prefixes. To specialize the return type for a type that has both generic return type and generic arguments, we prefix ToXxx, as in ToIntFunction. Otherwise, type arguments are specialized left-to-right, as in DoubleConsumer or ObjIntConsumer. (The type prefix Obj is used to indicate that we don't want to specialize this parameter, but want to move on to the next parameter, as in ObjIntConsumer.) These schemes can be combined, as in IntToDoubleFunction.
  • If there are specialization prefixes for all arguments, the arity prefix may be left out (as in ObjIntConsumer).
Since:
1.8
See Also:
FunctionalInterface
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.function

Interfaces

  • BiConsumer
  • BiFunction
  • BinaryOperator
  • BiPredicate
  • BooleanSupplier
  • Consumer
  • DoubleBinaryOperator
  • DoubleConsumer
  • DoubleFunction
  • DoublePredicate
  • DoubleSupplier
  • DoubleToIntFunction
  • DoubleToLongFunction
  • DoubleUnaryOperator
  • Function
  • IntBinaryOperator
  • IntConsumer
  • IntFunction
  • IntPredicate
  • IntSupplier
  • IntToDoubleFunction
  • IntToLongFunction
  • IntUnaryOperator
  • LongBinaryOperator
  • LongConsumer
  • LongFunction
  • LongPredicate
  • LongSupplier
  • LongToDoubleFunction
  • LongToIntFunction
  • LongUnaryOperator
  • ObjDoubleConsumer
  • ObjIntConsumer
  • ObjLongConsumer
  • Predicate
  • Supplier
  • ToDoubleBiFunction
  • ToDoubleFunction
  • ToIntBiFunction
  • ToIntFunction
  • ToLongBiFunction
  • ToLongFunction
  • UnaryOperator


function

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.function

Functional interfaces provide target types for lambda expressions and method references.

See: Description

  • Interface Summary
    Interface Description
    BiConsumer<T,U>
    Represents an operation that accepts two input arguments and returns no result.
    BiFunction<T,U,R>
    Represents a function that accepts two arguments and produces a result.
    BinaryOperator<T>
    Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
    BiPredicate<T,U>
    Represents a predicate (boolean-valued function) of two arguments.
    BooleanSupplier
    Represents a supplier of boolean-valued results.
    Consumer<T>
    Represents an operation that accepts a single input argument and returns no result.
    DoubleBinaryOperator
    Represents an operation upon two double-valued operands and producing a double-valued result.
    DoubleConsumer
    Represents an operation that accepts a single double-valued argument and returns no result.
    DoubleFunction<R>
    Represents a function that accepts a double-valued argument and produces a result.
    DoublePredicate
    Represents a predicate (boolean-valued function) of one double-valued argument.
    DoubleSupplier
    Represents a supplier of double-valued results.
    DoubleToIntFunction
    Represents a function that accepts a double-valued argument and produces an int-valued result.
    DoubleToLongFunction
    Represents a function that accepts a double-valued argument and produces a long-valued result.
    DoubleUnaryOperator
    Represents an operation on a single double-valued operand that produces a double-valued result.
    Function<T,R>
    Represents a function that accepts one argument and produces a result.
    IntBinaryOperator
    Represents an operation upon two int-valued operands and producing an int-valued result.
    IntConsumer
    Represents an operation that accepts a single int-valued argument and returns no result.
    IntFunction<R>
    Represents a function that accepts an int-valued argument and produces a result.
    IntPredicate
    Represents a predicate (boolean-valued function) of one int-valued argument.
    IntSupplier
    Represents a supplier of int-valued results.
    IntToDoubleFunction
    Represents a function that accepts an int-valued argument and produces a double-valued result.
    IntToLongFunction
    Represents a function that accepts an int-valued argument and produces a long-valued result.
    IntUnaryOperator
    Represents an operation on a single int-valued operand that produces an int-valued result.
    LongBinaryOperator
    Represents an operation upon two long-valued operands and producing a long-valued result.
    LongConsumer
    Represents an operation that accepts a single long-valued argument and returns no result.
    LongFunction<R>
    Represents a function that accepts a long-valued argument and produces a result.
    LongPredicate
    Represents a predicate (boolean-valued function) of one long-valued argument.
    LongSupplier
    Represents a supplier of long-valued results.
    LongToDoubleFunction
    Represents a function that accepts a long-valued argument and produces a double-valued result.
    LongToIntFunction
    Represents a function that accepts a long-valued argument and produces an int-valued result.
    LongUnaryOperator
    Represents an operation on a single long-valued operand that produces a long-valued result.
    ObjDoubleConsumer<T>
    Represents an operation that accepts an object-valued and a double-valued argument, and returns no result.
    ObjIntConsumer<T>
    Represents an operation that accepts an object-valued and a int-valued argument, and returns no result.
    ObjLongConsumer<T>
    Represents an operation that accepts an object-valued and a long-valued argument, and returns no result.
    Predicate<T>
    Represents a predicate (boolean-valued function) of one argument.
    Supplier<T>
    Represents a supplier of results.
    ToDoubleBiFunction<T,U>
    Represents a function that accepts two arguments and produces a double-valued result.
    ToDoubleFunction<T>
    Represents a function that produces a double-valued result.
    ToIntBiFunction<T,U>
    Represents a function that accepts two arguments and produces an int-valued result.
    ToIntFunction<T>
    Represents a function that produces an int-valued result.
    ToLongBiFunction<T,U>
    Represents a function that accepts two arguments and produces a long-valued result.
    ToLongFunction<T>
    Represents a function that produces a long-valued result.
    UnaryOperator<T>
    Represents an operation on a single operand that produces a result of the same type as its operand.

Package java.util.function Description

Functional interfaces provide target types for lambda expressions and method references. Each functional interface has a single abstract method, called the functional method for that functional interface, to which the lambda expression's parameter and return types are matched or adapted. Functional interfaces can provide a target type in multiple contexts, such as assignment context, method invocation, or cast context:

     // Assignment context
     Predicate<String> p = String::isEmpty;

     // Method invocation context
     stream.filter(e -> e.getSize() > 10)...

     // Cast context
     stream.map((ToIntFunction) e -> e.getSize())...

The interfaces in this package are general purpose functional interfaces used by the JDK, and are available to be used by user code as well. While they do not identify a complete set of function shapes to which lambda expressions might be adapted, they provide enough to cover common requirements. Other functional interfaces provided for specific purposes, such as FileFilter, are defined in the packages where they are used.

The interfaces in this package are annotated with FunctionalInterface. This annotation is not a requirement for the compiler to recognize an interface as a functional interface, but merely an aid to capture design intent and enlist the help of the compiler in identifying accidental violations of design intent.

Functional interfaces often represent abstract concepts like functions, actions, or predicates. In documenting functional interfaces, or referring to variables typed as functional interfaces, it is common to refer directly to those abstract concepts, for example using "this function" instead of "the function represented by this object". When an API method is said to accept or return a functional interface in this manner, such as "applies the provided function to...", this is understood to mean a non-null reference to an object implementing the appropriate functional interface, unless potential nullity is explicitly specified.

The functional interfaces in this package follow an extensible naming convention, as follows:

  • There are several basic function shapes, including Function (unary function from T to R), Consumer (unary function from T to void), Predicate (unary function from T to boolean), and Supplier (nilary function to R).
  • Function shapes have a natural arity based on how they are most commonly used. The basic shapes can be modified by an arity prefix to indicate a different arity, such as BiFunction (binary function from T and U to R).
  • There are additional derived function shapes which extend the basic function shapes, including UnaryOperator (extends Function) and BinaryOperator (extends BiFunction).
  • Type parameters of functional interfaces can be specialized to primitives with additional type prefixes. To specialize the return type for a type that has both generic return type and generic arguments, we prefix ToXxx, as in ToIntFunction. Otherwise, type arguments are specialized left-to-right, as in DoubleConsumer or ObjIntConsumer. (The type prefix Obj is used to indicate that we don't want to specialize this parameter, but want to move on to the next parameter, as in ObjIntConsumer.) These schemes can be combined, as in IntToDoubleFunction.
  • If there are specialization prefixes for all arguments, the arity prefix may be left out (as in ObjIntConsumer).
Since:
1.8
See Also:
FunctionalInterface
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.function

Interfaces

  • BiConsumer
  • BiFunction
  • BinaryOperator
  • BiPredicate
  • BooleanSupplier
  • Consumer
  • DoubleBinaryOperator
  • DoubleConsumer
  • DoubleFunction
  • DoublePredicate
  • DoubleSupplier
  • DoubleToIntFunction
  • DoubleToLongFunction
  • DoubleUnaryOperator
  • Function
  • IntBinaryOperator
  • IntConsumer
  • IntFunction
  • IntPredicate
  • IntSupplier
  • IntToDoubleFunction
  • IntToLongFunction
  • IntUnaryOperator
  • LongBinaryOperator
  • LongConsumer
  • LongFunction
  • LongPredicate
  • LongSupplier
  • LongToDoubleFunction
  • LongToIntFunction
  • LongUnaryOperator
  • ObjDoubleConsumer
  • ObjIntConsumer
  • ObjLongConsumer
  • Predicate
  • Supplier
  • ToDoubleBiFunction
  • ToDoubleFunction
  • ToIntBiFunction
  • ToIntFunction
  • ToLongBiFunction
  • ToLongFunction
  • UnaryOperator


function

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.function

Functional interfaces provide target types for lambda expressions and method references.

See: Description

  • Interface Summary
    Interface Description
    BiConsumer<T,U>
    Represents an operation that accepts two input arguments and returns no result.
    BiFunction<T,U,R>
    Represents a function that accepts two arguments and produces a result.
    BinaryOperator<T>
    Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
    BiPredicate<T,U>
    Represents a predicate (boolean-valued function) of two arguments.
    BooleanSupplier
    Represents a supplier of boolean-valued results.
    Consumer<T>
    Represents an operation that accepts a single input argument and returns no result.
    DoubleBinaryOperator
    Represents an operation upon two double-valued operands and producing a double-valued result.
    DoubleConsumer
    Represents an operation that accepts a single double-valued argument and returns no result.
    DoubleFunction<R>
    Represents a function that accepts a double-valued argument and produces a result.
    DoublePredicate
    Represents a predicate (boolean-valued function) of one double-valued argument.
    DoubleSupplier
    Represents a supplier of double-valued results.
    DoubleToIntFunction
    Represents a function that accepts a double-valued argument and produces an int-valued result.
    DoubleToLongFunction
    Represents a function that accepts a double-valued argument and produces a long-valued result.
    DoubleUnaryOperator
    Represents an operation on a single double-valued operand that produces a double-valued result.
    Function<T,R>
    Represents a function that accepts one argument and produces a result.
    IntBinaryOperator
    Represents an operation upon two int-valued operands and producing an int-valued result.
    IntConsumer
    Represents an operation that accepts a single int-valued argument and returns no result.
    IntFunction<R>
    Represents a function that accepts an int-valued argument and produces a result.
    IntPredicate
    Represents a predicate (boolean-valued function) of one int-valued argument.
    IntSupplier
    Represents a supplier of int-valued results.
    IntToDoubleFunction
    Represents a function that accepts an int-valued argument and produces a double-valued result.
    IntToLongFunction
    Represents a function that accepts an int-valued argument and produces a long-valued result.
    IntUnaryOperator
    Represents an operation on a single int-valued operand that produces an int-valued result.
    LongBinaryOperator
    Represents an operation upon two long-valued operands and producing a long-valued result.
    LongConsumer
    Represents an operation that accepts a single long-valued argument and returns no result.
    LongFunction<R>
    Represents a function that accepts a long-valued argument and produces a result.
    LongPredicate
    Represents a predicate (boolean-valued function) of one long-valued argument.
    LongSupplier
    Represents a supplier of long-valued results.
    LongToDoubleFunction
    Represents a function that accepts a long-valued argument and produces a double-valued result.
    LongToIntFunction
    Represents a function that accepts a long-valued argument and produces an int-valued result.
    LongUnaryOperator
    Represents an operation on a single long-valued operand that produces a long-valued result.
    ObjDoubleConsumer<T>
    Represents an operation that accepts an object-valued and a double-valued argument, and returns no result.
    ObjIntConsumer<T>
    Represents an operation that accepts an object-valued and a int-valued argument, and returns no result.
    ObjLongConsumer<T>
    Represents an operation that accepts an object-valued and a long-valued argument, and returns no result.
    Predicate<T>
    Represents a predicate (boolean-valued function) of one argument.
    Supplier<T>
    Represents a supplier of results.
    ToDoubleBiFunction<T,U>
    Represents a function that accepts two arguments and produces a double-valued result.
    ToDoubleFunction<T>
    Represents a function that produces a double-valued result.
    ToIntBiFunction<T,U>
    Represents a function that accepts two arguments and produces an int-valued result.
    ToIntFunction<T>
    Represents a function that produces an int-valued result.
    ToLongBiFunction<T,U>
    Represents a function that accepts two arguments and produces a long-valued result.
    ToLongFunction<T>
    Represents a function that produces a long-valued result.
    UnaryOperator<T>
    Represents an operation on a single operand that produces a result of the same type as its operand.

Package java.util.function Description

Functional interfaces provide target types for lambda expressions and method references. Each functional interface has a single abstract method, called the functional method for that functional interface, to which the lambda expression's parameter and return types are matched or adapted. Functional interfaces can provide a target type in multiple contexts, such as assignment context, method invocation, or cast context:

     // Assignment context
     Predicate<String> p = String::isEmpty;

     // Method invocation context
     stream.filter(e -> e.getSize() > 10)...

     // Cast context
     stream.map((ToIntFunction) e -> e.getSize())...

The interfaces in this package are general purpose functional interfaces used by the JDK, and are available to be used by user code as well. While they do not identify a complete set of function shapes to which lambda expressions might be adapted, they provide enough to cover common requirements. Other functional interfaces provided for specific purposes, such as FileFilter, are defined in the packages where they are used.

The interfaces in this package are annotated with FunctionalInterface. This annotation is not a requirement for the compiler to recognize an interface as a functional interface, but merely an aid to capture design intent and enlist the help of the compiler in identifying accidental violations of design intent.

Functional interfaces often represent abstract concepts like functions, actions, or predicates. In documenting functional interfaces, or referring to variables typed as functional interfaces, it is common to refer directly to those abstract concepts, for example using "this function" instead of "the function represented by this object". When an API method is said to accept or return a functional interface in this manner, such as "applies the provided function to...", this is understood to mean a non-null reference to an object implementing the appropriate functional interface, unless potential nullity is explicitly specified.

The functional interfaces in this package follow an extensible naming convention, as follows:

  • There are several basic function shapes, including Function (unary function from T to R), Consumer (unary function from T to void), Predicate (unary function from T to boolean), and Supplier (nilary function to R).
  • Function shapes have a natural arity based on how they are most commonly used. The basic shapes can be modified by an arity prefix to indicate a different arity, such as BiFunction (binary function from T and U to R).
  • There are additional derived function shapes which extend the basic function shapes, including UnaryOperator (extends Function) and BinaryOperator (extends BiFunction).
  • Type parameters of functional interfaces can be specialized to primitives with additional type prefixes. To specialize the return type for a type that has both generic return type and generic arguments, we prefix ToXxx, as in ToIntFunction. Otherwise, type arguments are specialized left-to-right, as in DoubleConsumer or ObjIntConsumer. (The type prefix Obj is used to indicate that we don't want to specialize this parameter, but want to move on to the next parameter, as in ObjIntConsumer.) These schemes can be combined, as in IntToDoubleFunction.
  • If there are specialization prefixes for all arguments, the arity prefix may be left out (as in ObjIntConsumer).
Since:
1.8
See Also:
FunctionalInterface
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.function

Interfaces

  • BiConsumer
  • BiFunction
  • BinaryOperator
  • BiPredicate
  • BooleanSupplier
  • Consumer
  • DoubleBinaryOperator
  • DoubleConsumer
  • DoubleFunction
  • DoublePredicate
  • DoubleSupplier
  • DoubleToIntFunction
  • DoubleToLongFunction
  • DoubleUnaryOperator
  • Function
  • IntBinaryOperator
  • IntConsumer
  • IntFunction
  • IntPredicate
  • IntSupplier
  • IntToDoubleFunction
  • IntToLongFunction
  • IntUnaryOperator
  • LongBinaryOperator
  • LongConsumer
  • LongFunction
  • LongPredicate
  • LongSupplier
  • LongToDoubleFunction
  • LongToIntFunction
  • LongUnaryOperator
  • ObjDoubleConsumer
  • ObjIntConsumer
  • ObjLongConsumer
  • Predicate
  • Supplier
  • ToDoubleBiFunction
  • ToDoubleFunction
  • ToIntBiFunction
  • ToIntFunction
  • ToLongBiFunction
  • ToLongFunction
  • UnaryOperator


compact1 - java.util.jar

Interfaces

  • Pack200.Packer
  • Pack200.Unpacker

Classes

  • Attributes
  • Attributes.Name
  • JarEntry
  • JarFile
  • JarInputStream
  • JarOutputStream
  • Manifest
  • Pack200

Exceptions

  • JarException


jar

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.jar

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

See: Description

  • Interface Summary
    Interface Description
    Pack200.Packer
    The packer engine applies various transformations to the input JAR file, making the pack stream highly compressible by a compressor such as gzip or zip.
    Pack200.Unpacker
    The unpacker engine converts the packed stream to a JAR file.
  • Class Summary
    Class Description
    Attributes
    The Attributes class maps Manifest attribute names to associated string values.
    Attributes.Name
    The Attributes.Name class represents an attribute name stored in this Map.
    JarEntry
    This class is used to represent a JAR file entry.
    JarFile
    The JarFile class is used to read the contents of a jar file from any file that can be opened with java.io.RandomAccessFile.
    JarInputStream
    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    JarOutputStream
    The JarOutputStream class is used to write the contents of a JAR file to any output stream.
    Manifest
    The Manifest class is used to maintain Manifest entry names and their associated Attributes.
    Pack200
    Transforms a JAR file to or from a packed stream in Pack200 format.
  • Exception Summary
    Exception Description
    JarException
    Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Package java.util.jar Description

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. The manifest stores meta-information about the JAR file contents and is also used for signing JAR files.

Package Specification

The java.util.jar package is based on the following specifications:
  • Info-ZIP file format - The JAR format is based on the Info-ZIP file format. See java.util.zip package description.

    In JAR files, all file names must be encoded in the UTF-8 encoding.

  • Manifest and Signature Specification - The manifest format specification.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.jar

Interfaces

  • Pack200.Packer
  • Pack200.Unpacker

Classes

  • Attributes
  • Attributes.Name
  • JarEntry
  • JarFile
  • JarInputStream
  • JarOutputStream
  • Manifest
  • Pack200

Exceptions

  • JarException


jar

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.jar

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

See: Description

  • Interface Summary
    Interface Description
    Pack200.Packer
    The packer engine applies various transformations to the input JAR file, making the pack stream highly compressible by a compressor such as gzip or zip.
    Pack200.Unpacker
    The unpacker engine converts the packed stream to a JAR file.
  • Class Summary
    Class Description
    Attributes
    The Attributes class maps Manifest attribute names to associated string values.
    Attributes.Name
    The Attributes.Name class represents an attribute name stored in this Map.
    JarEntry
    This class is used to represent a JAR file entry.
    JarFile
    The JarFile class is used to read the contents of a jar file from any file that can be opened with java.io.RandomAccessFile.
    JarInputStream
    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    JarOutputStream
    The JarOutputStream class is used to write the contents of a JAR file to any output stream.
    Manifest
    The Manifest class is used to maintain Manifest entry names and their associated Attributes.
    Pack200
    Transforms a JAR file to or from a packed stream in Pack200 format.
  • Exception Summary
    Exception Description
    JarException
    Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Package java.util.jar Description

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. The manifest stores meta-information about the JAR file contents and is also used for signing JAR files.

Package Specification

The java.util.jar package is based on the following specifications:
  • Info-ZIP file format - The JAR format is based on the Info-ZIP file format. See java.util.zip package description.

    In JAR files, all file names must be encoded in the UTF-8 encoding.

  • Manifest and Signature Specification - The manifest format specification.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.jar

Interfaces

  • Pack200.Packer
  • Pack200.Unpacker

Classes

  • Attributes
  • Attributes.Name
  • JarEntry
  • JarFile
  • JarInputStream
  • JarOutputStream
  • Manifest
  • Pack200

Exceptions

  • JarException


jar

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.jar

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

See: Description

  • Interface Summary
    Interface Description
    Pack200.Packer
    The packer engine applies various transformations to the input JAR file, making the pack stream highly compressible by a compressor such as gzip or zip.
    Pack200.Unpacker
    The unpacker engine converts the packed stream to a JAR file.
  • Class Summary
    Class Description
    Attributes
    The Attributes class maps Manifest attribute names to associated string values.
    Attributes.Name
    The Attributes.Name class represents an attribute name stored in this Map.
    JarEntry
    This class is used to represent a JAR file entry.
    JarFile
    The JarFile class is used to read the contents of a jar file from any file that can be opened with java.io.RandomAccessFile.
    JarInputStream
    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    JarOutputStream
    The JarOutputStream class is used to write the contents of a JAR file to any output stream.
    Manifest
    The Manifest class is used to maintain Manifest entry names and their associated Attributes.
    Pack200
    Transforms a JAR file to or from a packed stream in Pack200 format.
  • Exception Summary
    Exception Description
    JarException
    Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Package java.util.jar Description

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. The manifest stores meta-information about the JAR file contents and is also used for signing JAR files.

Package Specification

The java.util.jar package is based on the following specifications:
  • Info-ZIP file format - The JAR format is based on the Info-ZIP file format. See java.util.zip package description.

    In JAR files, all file names must be encoded in the UTF-8 encoding.

  • Manifest and Signature Specification - The manifest format specification.
Since:
1.2
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.jar

Interfaces

  • Pack200.Packer
  • Pack200.Unpacker

Classes

  • Attributes
  • Attributes.Name
  • JarEntry
  • JarFile
  • JarInputStream
  • JarOutputStream
  • Manifest
  • Pack200

Exceptions

  • JarException


compact1 - java.util.logging

Interfaces

  • Filter
  • LoggingMXBean

Classes

  • ConsoleHandler
  • ErrorManager
  • FileHandler
  • Formatter
  • Handler
  • Level
  • Logger
  • LoggingPermission
  • LogManager
  • LogRecord
  • MemoryHandler
  • SimpleFormatter
  • SocketHandler
  • StreamHandler
  • XMLFormatter


logging

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.logging

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities.

See: Description

  • Interface Summary
    Interface Description
    Filter
    A Filter can be used to provide fine grain control over what is logged, beyond the control provided by log levels.
    LoggingMXBean
    The management interface for the logging facility.
  • Class Summary
    Class Description
    ConsoleHandler
    This Handler publishes log records to System.err.
    ErrorManager
    ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging.
    FileHandler
    Simple file logging Handler.
    Formatter
    A Formatter provides support for formatting LogRecords.
    Handler
    A Handler object takes log messages from a Logger and exports them.
    Level
    The Level class defines a set of standard logging levels that can be used to control logging output.
    Logger
    A Logger object is used to log messages for a specific system or application component.
    LoggingPermission
    The permission which the SecurityManager will check when code that is running with a SecurityManager calls one of the logging control methods (such as Logger.setLevel).
    LogManager
    There is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services.
    LogRecord
    LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.
    MemoryHandler
    Handler that buffers requests in a circular buffer in memory.
    SimpleFormatter
    Print a brief summary of the LogRecord in a human readable format.
    SocketHandler
    Simple network logging Handler.
    StreamHandler
    Stream based logging Handler.
    XMLFormatter
    Format a LogRecord into a standard XML format.

Package java.util.logging Description

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities. The central goal of the logging APIs is to support maintaining and servicing software at customer sites.

There are four main target uses of the logs:

  1. Problem diagnosis by end users and system administrators. This consists of simple logging of common problems that can be fixed or tracked locally, such as running out of resources, security failures, and simple configuration errors.
  2. Problem diagnosis by field service engineers. The logging information used by field service engineers may be considerably more complex and verbose than that required by system administrators. Typically such information will require extra logging within particular subsystems.
  3. Problem diagnosis by the development organization. When a problem occurs in the field, it may be necessary to return the captured logging information to the original development team for diagnosis. This logging information may be extremely detailed and fairly inscrutable. Such information might include detailed tracing on the internal execution of particular subsystems.
  4. Problem diagnosis by developers. The Logging APIs may also be used to help debug an application under development. This may include logging information generated by the target application as well as logging information generated by lower-level libraries. Note however that while this use is perfectly reasonable, the logging APIs are not intended to replace the normal debugging and profiling tools that may already exist in the development environment.

The key elements of this package include:
  • Logger: The main entity on which applications make logging calls. A Logger object is used to log messages for a specific system or application component.
  • LogRecord: Used to pass logging requests between the logging framework and individual log handlers.
  • Handler: Exports LogRecord objects to a variety of destinations including memory, output streams, consoles, files, and sockets. A variety of Handler subclasses exist for this purpose. Additional Handlers may be developed by third parties and delivered on top of the core platform.
  • Level: Defines a set of standard logging levels that can be used to control logging output. Programs can be configured to output logging for some levels while ignoring output for others.
  • Filter: Provides fine-grained control over what gets logged, beyond the control provided by log levels. The logging APIs support a general-purpose filter mechanism that allows application code to attach arbitrary filters to control logging output.
  • Formatter: Provides support for formatting LogRecord objects. This package includes two formatters, SimpleFormatter and XMLFormatter, for formatting log records in plain text or XML respectively. As with Handlers, additional Formatters may be developed by third parties.

The Logging APIs offer both static and dynamic configuration control. Static control enables field service staff to set up a particular configuration and then re-launch the application with the new logging settings. Dynamic control allows for updates to the logging configuration within a currently running program. The APIs also allow for logging to be enabled or disabled for different functional areas of the system. For example, a field service engineer might be interested in tracing all AWT events, but might have no interest in socket events or memory management.

Null Pointers

In general, unless otherwise noted in the javadoc, methods and constructors will throw NullPointerException if passed a null argument. The one broad exception to this rule is that the logging convenience methods in the Logger class (the config, entering, exiting, fine, finer, finest, log, logp, logrb, severe, throwing, and warning methods) will accept null values for all arguments except for the initial Level argument (if any).

Related Documentation

For an overview of control flow, please refer to the Java Logging Overview.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.logging

Interfaces

  • Filter
  • LoggingMXBean

Classes

  • ConsoleHandler
  • ErrorManager
  • FileHandler
  • Formatter
  • Handler
  • Level
  • Logger
  • LoggingPermission
  • LogManager
  • LogRecord
  • MemoryHandler
  • SimpleFormatter
  • SocketHandler
  • StreamHandler
  • XMLFormatter


logging

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.logging

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities.

See: Description

  • Interface Summary
    Interface Description
    Filter
    A Filter can be used to provide fine grain control over what is logged, beyond the control provided by log levels.
    LoggingMXBean
    The management interface for the logging facility.
  • Class Summary
    Class Description
    ConsoleHandler
    This Handler publishes log records to System.err.
    ErrorManager
    ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging.
    FileHandler
    Simple file logging Handler.
    Formatter
    A Formatter provides support for formatting LogRecords.
    Handler
    A Handler object takes log messages from a Logger and exports them.
    Level
    The Level class defines a set of standard logging levels that can be used to control logging output.
    Logger
    A Logger object is used to log messages for a specific system or application component.
    LoggingPermission
    The permission which the SecurityManager will check when code that is running with a SecurityManager calls one of the logging control methods (such as Logger.setLevel).
    LogManager
    There is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services.
    LogRecord
    LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.
    MemoryHandler
    Handler that buffers requests in a circular buffer in memory.
    SimpleFormatter
    Print a brief summary of the LogRecord in a human readable format.
    SocketHandler
    Simple network logging Handler.
    StreamHandler
    Stream based logging Handler.
    XMLFormatter
    Format a LogRecord into a standard XML format.

Package java.util.logging Description

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities. The central goal of the logging APIs is to support maintaining and servicing software at customer sites.

There are four main target uses of the logs:

  1. Problem diagnosis by end users and system administrators. This consists of simple logging of common problems that can be fixed or tracked locally, such as running out of resources, security failures, and simple configuration errors.
  2. Problem diagnosis by field service engineers. The logging information used by field service engineers may be considerably more complex and verbose than that required by system administrators. Typically such information will require extra logging within particular subsystems.
  3. Problem diagnosis by the development organization. When a problem occurs in the field, it may be necessary to return the captured logging information to the original development team for diagnosis. This logging information may be extremely detailed and fairly inscrutable. Such information might include detailed tracing on the internal execution of particular subsystems.
  4. Problem diagnosis by developers. The Logging APIs may also be used to help debug an application under development. This may include logging information generated by the target application as well as logging information generated by lower-level libraries. Note however that while this use is perfectly reasonable, the logging APIs are not intended to replace the normal debugging and profiling tools that may already exist in the development environment.

The key elements of this package include:
  • Logger: The main entity on which applications make logging calls. A Logger object is used to log messages for a specific system or application component.
  • LogRecord: Used to pass logging requests between the logging framework and individual log handlers.
  • Handler: Exports LogRecord objects to a variety of destinations including memory, output streams, consoles, files, and sockets. A variety of Handler subclasses exist for this purpose. Additional Handlers may be developed by third parties and delivered on top of the core platform.
  • Level: Defines a set of standard logging levels that can be used to control logging output. Programs can be configured to output logging for some levels while ignoring output for others.
  • Filter: Provides fine-grained control over what gets logged, beyond the control provided by log levels. The logging APIs support a general-purpose filter mechanism that allows application code to attach arbitrary filters to control logging output.
  • Formatter: Provides support for formatting LogRecord objects. This package includes two formatters, SimpleFormatter and XMLFormatter, for formatting log records in plain text or XML respectively. As with Handlers, additional Formatters may be developed by third parties.

The Logging APIs offer both static and dynamic configuration control. Static control enables field service staff to set up a particular configuration and then re-launch the application with the new logging settings. Dynamic control allows for updates to the logging configuration within a currently running program. The APIs also allow for logging to be enabled or disabled for different functional areas of the system. For example, a field service engineer might be interested in tracing all AWT events, but might have no interest in socket events or memory management.

Null Pointers

In general, unless otherwise noted in the javadoc, methods and constructors will throw NullPointerException if passed a null argument. The one broad exception to this rule is that the logging convenience methods in the Logger class (the config, entering, exiting, fine, finer, finest, log, logp, logrb, severe, throwing, and warning methods) will accept null values for all arguments except for the initial Level argument (if any).

Related Documentation

For an overview of control flow, please refer to the Java Logging Overview.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.logging

Interfaces

  • Filter
  • LoggingMXBean

Classes

  • ConsoleHandler
  • ErrorManager
  • FileHandler
  • Formatter
  • Handler
  • Level
  • Logger
  • LoggingPermission
  • LogManager
  • LogRecord
  • MemoryHandler
  • SimpleFormatter
  • SocketHandler
  • StreamHandler
  • XMLFormatter


logging

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.logging

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities.

See: Description

  • Interface Summary
    Interface Description
    Filter
    A Filter can be used to provide fine grain control over what is logged, beyond the control provided by log levels.
    LoggingMXBean
    The management interface for the logging facility.
  • Class Summary
    Class Description
    ConsoleHandler
    This Handler publishes log records to System.err.
    ErrorManager
    ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging.
    FileHandler
    Simple file logging Handler.
    Formatter
    A Formatter provides support for formatting LogRecords.
    Handler
    A Handler object takes log messages from a Logger and exports them.
    Level
    The Level class defines a set of standard logging levels that can be used to control logging output.
    Logger
    A Logger object is used to log messages for a specific system or application component.
    LoggingPermission
    The permission which the SecurityManager will check when code that is running with a SecurityManager calls one of the logging control methods (such as Logger.setLevel).
    LogManager
    There is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services.
    LogRecord
    LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.
    MemoryHandler
    Handler that buffers requests in a circular buffer in memory.
    SimpleFormatter
    Print a brief summary of the LogRecord in a human readable format.
    SocketHandler
    Simple network logging Handler.
    StreamHandler
    Stream based logging Handler.
    XMLFormatter
    Format a LogRecord into a standard XML format.

Package java.util.logging Description

Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities. The central goal of the logging APIs is to support maintaining and servicing software at customer sites.

There are four main target uses of the logs:

  1. Problem diagnosis by end users and system administrators. This consists of simple logging of common problems that can be fixed or tracked locally, such as running out of resources, security failures, and simple configuration errors.
  2. Problem diagnosis by field service engineers. The logging information used by field service engineers may be considerably more complex and verbose than that required by system administrators. Typically such information will require extra logging within particular subsystems.
  3. Problem diagnosis by the development organization. When a problem occurs in the field, it may be necessary to return the captured logging information to the original development team for diagnosis. This logging information may be extremely detailed and fairly inscrutable. Such information might include detailed tracing on the internal execution of particular subsystems.
  4. Problem diagnosis by developers. The Logging APIs may also be used to help debug an application under development. This may include logging information generated by the target application as well as logging information generated by lower-level libraries. Note however that while this use is perfectly reasonable, the logging APIs are not intended to replace the normal debugging and profiling tools that may already exist in the development environment.

The key elements of this package include:
  • Logger: The main entity on which applications make logging calls. A Logger object is used to log messages for a specific system or application component.
  • LogRecord: Used to pass logging requests between the logging framework and individual log handlers.
  • Handler: Exports LogRecord objects to a variety of destinations including memory, output streams, consoles, files, and sockets. A variety of Handler subclasses exist for this purpose. Additional Handlers may be developed by third parties and delivered on top of the core platform.
  • Level: Defines a set of standard logging levels that can be used to control logging output. Programs can be configured to output logging for some levels while ignoring output for others.
  • Filter: Provides fine-grained control over what gets logged, beyond the control provided by log levels. The logging APIs support a general-purpose filter mechanism that allows application code to attach arbitrary filters to control logging output.
  • Formatter: Provides support for formatting LogRecord objects. This package includes two formatters, SimpleFormatter and XMLFormatter, for formatting log records in plain text or XML respectively. As with Handlers, additional Formatters may be developed by third parties.

The Logging APIs offer both static and dynamic configuration control. Static control enables field service staff to set up a particular configuration and then re-launch the application with the new logging settings. Dynamic control allows for updates to the logging configuration within a currently running program. The APIs also allow for logging to be enabled or disabled for different functional areas of the system. For example, a field service engineer might be interested in tracing all AWT events, but might have no interest in socket events or memory management.

Null Pointers

In general, unless otherwise noted in the javadoc, methods and constructors will throw NullPointerException if passed a null argument. The one broad exception to this rule is that the logging convenience methods in the Logger class (the config, entering, exiting, fine, finer, finest, log, logp, logrb, severe, throwing, and warning methods) will accept null values for all arguments except for the initial Level argument (if any).

Related Documentation

For an overview of control flow, please refer to the Java Logging Overview.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.logging

Interfaces

  • Filter
  • LoggingMXBean

Classes

  • ConsoleHandler
  • ErrorManager
  • FileHandler
  • Formatter
  • Handler
  • Level
  • Logger
  • LoggingPermission
  • LogManager
  • LogRecord
  • MemoryHandler
  • SimpleFormatter
  • SocketHandler
  • StreamHandler
  • XMLFormatter


compact3 - java.util.prefs

Interfaces

  • NodeChangeListener
  • PreferenceChangeListener
  • PreferencesFactory

Classes

  • AbstractPreferences
  • NodeChangeEvent
  • PreferenceChangeEvent
  • Preferences

Exceptions

  • BackingStoreException
  • InvalidPreferencesFormatException


prefs

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.prefs

This package allows applications to store and retrieve user and system preference and configuration data.

See: Description

  • Interface Summary
    Interface Description
    NodeChangeListener
    A listener for receiving preference node change events.
    PreferenceChangeListener
    A listener for receiving preference change events.
    PreferencesFactory
    A factory object that generates Preferences objects.
  • Class Summary
    Class Description
    AbstractPreferences
    This class provides a skeletal implementation of the Preferences class, greatly easing the task of implementing it.
    NodeChangeEvent
    An event emitted by a Preferences node to indicate that a child of that node has been added or removed.
    PreferenceChangeEvent
    An event emitted by a Preferences node to indicate that a preference has been added, removed or has had its value changed.
    Preferences
    A node in a hierarchical collection of preference data.
  • Exception Summary
    Exception Description
    BackingStoreException
    Thrown to indicate that a preferences operation could not complete because of a failure in the backing store, or a failure to contact the backing store.
    InvalidPreferencesFormatException
    Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of preferences, as per the Preferences specification.

Package java.util.prefs Description

This package allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store. There are two separate trees of preference nodes, one for user preferences and one for system preferences.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.prefs

Interfaces

  • NodeChangeListener
  • PreferenceChangeListener
  • PreferencesFactory

Classes

  • AbstractPreferences
  • NodeChangeEvent
  • PreferenceChangeEvent
  • Preferences

Exceptions

  • BackingStoreException
  • InvalidPreferencesFormatException


compact1 - java.util.regex

Interfaces

  • MatchResult

Classes

  • Matcher
  • Pattern

Exceptions

  • PatternSyntaxException


regex

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.regex

Classes for matching character sequences against patterns specified by regular expressions.

See: Description

  • Interface Summary
    Interface Description
    MatchResult
    The result of a match operation.
  • Class Summary
    Class Description
    Matcher
    An engine that performs match operations on a character sequence by interpreting a Pattern.
    Pattern
    A compiled representation of a regular expression.
  • Exception Summary
    Exception Description
    PatternSyntaxException
    Unchecked exception thrown to indicate a syntax error in a regular-expression pattern.

Package java.util.regex Description

Classes for matching character sequences against patterns specified by regular expressions.

An instance of the Pattern class represents a regular expression that is specified in string form in a syntax similar to that used by Perl.

Instances of the Matcher class are used to match character sequences against a given pattern. Input is provided to matchers via the CharSequence interface in order to support matching against characters from a wide variety of input sources.

Unless otherwise noted, passing a null argument to a method in any class or interface in this package will cause a NullPointerException to be thrown.

Related Documentation

An excellent tutorial and overview of regular expressions is Mastering Regular Expressions, Jeffrey E. F. Friedl, O'Reilly and Associates, 1997.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.regex

Interfaces

  • MatchResult

Classes

  • Matcher
  • Pattern

Exceptions

  • PatternSyntaxException


regex

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.regex

Classes for matching character sequences against patterns specified by regular expressions.

See: Description

  • Interface Summary
    Interface Description
    MatchResult
    The result of a match operation.
  • Class Summary
    Class Description
    Matcher
    An engine that performs match operations on a character sequence by interpreting a Pattern.
    Pattern
    A compiled representation of a regular expression.
  • Exception Summary
    Exception Description
    PatternSyntaxException
    Unchecked exception thrown to indicate a syntax error in a regular-expression pattern.

Package java.util.regex Description

Classes for matching character sequences against patterns specified by regular expressions.

An instance of the Pattern class represents a regular expression that is specified in string form in a syntax similar to that used by Perl.

Instances of the Matcher class are used to match character sequences against a given pattern. Input is provided to matchers via the CharSequence interface in order to support matching against characters from a wide variety of input sources.

Unless otherwise noted, passing a null argument to a method in any class or interface in this package will cause a NullPointerException to be thrown.

Related Documentation

An excellent tutorial and overview of regular expressions is Mastering Regular Expressions, Jeffrey E. F. Friedl, O'Reilly and Associates, 1997.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.regex

Interfaces

  • MatchResult

Classes

  • Matcher
  • Pattern

Exceptions

  • PatternSyntaxException


regex

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.regex

Classes for matching character sequences against patterns specified by regular expressions.

See: Description

  • Interface Summary
    Interface Description
    MatchResult
    The result of a match operation.
  • Class Summary
    Class Description
    Matcher
    An engine that performs match operations on a character sequence by interpreting a Pattern.
    Pattern
    A compiled representation of a regular expression.
  • Exception Summary
    Exception Description
    PatternSyntaxException
    Unchecked exception thrown to indicate a syntax error in a regular-expression pattern.

Package java.util.regex Description

Classes for matching character sequences against patterns specified by regular expressions.

An instance of the Pattern class represents a regular expression that is specified in string form in a syntax similar to that used by Perl.

Instances of the Matcher class are used to match character sequences against a given pattern. Input is provided to matchers via the CharSequence interface in order to support matching against characters from a wide variety of input sources.

Unless otherwise noted, passing a null argument to a method in any class or interface in this package will cause a NullPointerException to be thrown.

Related Documentation

An excellent tutorial and overview of regular expressions is Mastering Regular Expressions, Jeffrey E. F. Friedl, O'Reilly and Associates, 1997.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.regex

Interfaces

  • MatchResult

Classes

  • Matcher
  • Pattern

Exceptions

  • PatternSyntaxException


compact1 - java.util.spi

Interfaces

  • ResourceBundleControlProvider

Classes

  • CalendarDataProvider
  • CalendarNameProvider
  • CurrencyNameProvider
  • LocaleNameProvider
  • LocaleServiceProvider
  • TimeZoneNameProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.spi

Service provider classes for the classes in the java.util package.

See: Description

  • Interface Summary
    Interface Description
    ResourceBundleControlProvider
    An interface for service providers that provide implementations of ResourceBundle.Control.
  • Class Summary
    Class Description
    CalendarDataProvider
    An abstract class for service providers that provide locale-dependent Calendar parameters.
    CalendarNameProvider
    An abstract class for service providers that provide localized string representations (display names) of Calendar field values.
    CurrencyNameProvider
    An abstract class for service providers that provide localized currency symbols and display names for the Currency class.
    LocaleNameProvider
    An abstract class for service providers that provide localized names for the Locale class.
    LocaleServiceProvider
    This is the super class of all the locale sensitive service provider interfaces (SPIs).
    TimeZoneNameProvider
    An abstract class for service providers that provide localized time zone names for the TimeZone class.

Package java.util.spi Description

Service provider classes for the classes in the java.util package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.spi

Interfaces

  • ResourceBundleControlProvider

Classes

  • CalendarDataProvider
  • CalendarNameProvider
  • CurrencyNameProvider
  • LocaleNameProvider
  • LocaleServiceProvider
  • TimeZoneNameProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.spi

Service provider classes for the classes in the java.util package.

See: Description

  • Interface Summary
    Interface Description
    ResourceBundleControlProvider
    An interface for service providers that provide implementations of ResourceBundle.Control.
  • Class Summary
    Class Description
    CalendarDataProvider
    An abstract class for service providers that provide locale-dependent Calendar parameters.
    CalendarNameProvider
    An abstract class for service providers that provide localized string representations (display names) of Calendar field values.
    CurrencyNameProvider
    An abstract class for service providers that provide localized currency symbols and display names for the Currency class.
    LocaleNameProvider
    An abstract class for service providers that provide localized names for the Locale class.
    LocaleServiceProvider
    This is the super class of all the locale sensitive service provider interfaces (SPIs).
    TimeZoneNameProvider
    An abstract class for service providers that provide localized time zone names for the TimeZone class.

Package java.util.spi Description

Service provider classes for the classes in the java.util package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.spi

Interfaces

  • ResourceBundleControlProvider

Classes

  • CalendarDataProvider
  • CalendarNameProvider
  • CurrencyNameProvider
  • LocaleNameProvider
  • LocaleServiceProvider
  • TimeZoneNameProvider


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.spi

Service provider classes for the classes in the java.util package.

See: Description

  • Interface Summary
    Interface Description
    ResourceBundleControlProvider
    An interface for service providers that provide implementations of ResourceBundle.Control.
  • Class Summary
    Class Description
    CalendarDataProvider
    An abstract class for service providers that provide locale-dependent Calendar parameters.
    CalendarNameProvider
    An abstract class for service providers that provide localized string representations (display names) of Calendar field values.
    CurrencyNameProvider
    An abstract class for service providers that provide localized currency symbols and display names for the Currency class.
    LocaleNameProvider
    An abstract class for service providers that provide localized names for the Locale class.
    LocaleServiceProvider
    This is the super class of all the locale sensitive service provider interfaces (SPIs).
    TimeZoneNameProvider
    An abstract class for service providers that provide localized time zone names for the TimeZone class.

Package java.util.spi Description

Service provider classes for the classes in the java.util package.
Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.spi

Interfaces

  • ResourceBundleControlProvider

Classes

  • CalendarDataProvider
  • CalendarNameProvider
  • CurrencyNameProvider
  • LocaleNameProvider
  • LocaleServiceProvider
  • TimeZoneNameProvider


compact1 - java.util.stream

Interfaces

  • BaseStream
  • Collector
  • DoubleStream
  • DoubleStream.Builder
  • IntStream
  • IntStream.Builder
  • LongStream
  • LongStream.Builder
  • Stream
  • Stream.Builder

Classes

  • Collectors
  • StreamSupport

Enums

  • Collector.Characteristics


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.stream

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

See: Description

  • Interface Summary
    Interface Description
    BaseStream<T,S extends BaseStream<T,S>>
    Base interface for streams, which are sequences of elements supporting sequential and parallel aggregate operations.
    Collector<T,A,R>
    A mutable reduction operation that accumulates input elements into a mutable result container, optionally transforming the accumulated result into a final representation after all input elements have been processed.
    DoubleStream
    A sequence of primitive double-valued elements supporting sequential and parallel aggregate operations.
    DoubleStream.Builder
    A mutable builder for a DoubleStream.
    IntStream
    A sequence of primitive int-valued elements supporting sequential and parallel aggregate operations.
    IntStream.Builder
    A mutable builder for an IntStream.
    LongStream
    A sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.
    LongStream.Builder
    A mutable builder for a LongStream.
    Stream<T>
    A sequence of elements supporting sequential and parallel aggregate operations.
    Stream.Builder<T>
    A mutable builder for a Stream.
  • Class Summary
    Class Description
    Collectors
    Implementations of Collector that implement various useful reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc.
    StreamSupport
    Low-level utility methods for creating and manipulating streams.
  • Enum Summary
    Enum Description
    Collector.Characteristics
    Characteristics indicating properties of a Collector, which can be used to optimize reduction implementations.

Package java.util.stream Description

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections. For example:

     int sum = widgets.stream()
                      .filter(b -> b.getColor() == RED)
                      .mapToInt(b -> b.getWeight())
                      .sum();

Here we use widgets, a Collection<Widget>, as a source for a stream, and then perform a filter-map-reduce on the stream to obtain the sum of the weights of the red widgets. (Summation is an example of a reduction operation.)

The key abstraction introduced in this package is stream. The classes Stream, IntStream, LongStream, and DoubleStream are streams over objects and the primitive int, long and double types. Streams differ from collections in several ways:

  • No storage. A stream is not a data structure that stores elements; instead, it conveys elements from a source such as a data structure, an array, a generator function, or an I/O channel, through a pipeline of computational operations.
  • Functional in nature. An operation on a stream produces a result, but does not modify its source. For example, filtering a Stream obtained from a collection produces a new Stream without the filtered elements, rather than removing elements from the source collection.
  • Laziness-seeking. Many stream operations, such as filtering, mapping, or duplicate removal, can be implemented lazily, exposing opportunities for optimization. For example, "find the first String with three consecutive vowels" need not examine all the input strings. Stream operations are divided into intermediate (Stream-producing) operations and terminal (value- or side-effect-producing) operations. Intermediate operations are always lazy.
  • Possibly unbounded. While collections have a finite size, streams need not. Short-circuiting operations such as limit(n) or findFirst() can allow computations on infinite streams to complete in finite time.
  • Consumable. The elements of a stream are only visited once during the life of a stream. Like an Iterator, a new stream must be generated to revisit the same elements of the source.
Streams can be obtained in a number of ways. Some examples include:
  • From a Collection via the stream() and parallelStream() methods;
  • From an array via Arrays.stream(Object[]);
  • From static factory methods on the stream classes, such as
     Stream.of(Object[]),
     IntStream.range(int, int)
     or Stream.iterate(Object, UnaryOperator);
  • The lines of a file can be obtained from BufferedReader.lines();
  • Streams of file paths can be obtained from methods in Files;
  • Streams of random numbers can be obtained from Random.ints();
  • Numerous other stream-bearing methods in the JDK, including
     BitSet.stream(),
     Pattern.splitAsStream(java.lang.CharSequence),
     and JarFile.stream().

Additional stream sources can be provided by third-party libraries using these techniques.

Stream operations and pipelines

Stream operations are divided into intermediate and terminal operations, and are combined to form stream pipelines. A stream pipeline consists of a source (such as a Collection, an array, a generator function, or an I/O channel); followed by zero or more intermediate operations such as Stream.filter or Stream.map; and a terminal operation such as Stream.forEach or Stream.reduce.

Intermediate operations return a new stream. They are always lazy; executing an intermediate operation such as filter() does not actually perform any filtering, but instead creates a new stream that, when traversed, contains the elements of the initial stream that match the given predicate. Traversal of the pipeline source does not begin until the terminal operation of the pipeline is executed.

Terminal operations, such as Stream.forEach or IntStream.sum, may traverse the stream to produce a result or a side-effect. After the terminal operation is performed, the stream pipeline is considered consumed, and can no longer be used; if you need to traverse the same data source again, you must return to the data source to get a new stream. In almost all cases, terminal operations are eager, completing their traversal of the data source and processing of the pipeline before returning. Only the terminal operations iterator() and spliterator() are not; these are provided as an "escape hatch" to enable arbitrary client-controlled pipeline traversals in the event that the existing operations are not sufficient to the task.

Processing streams lazily allows for significant efficiencies; in a pipeline such as the filter-map-sum example above, filtering, mapping, and summing can be fused into a single pass on the data, with minimal intermediate state. Laziness also allows avoiding examining all the data when it is not necessary; for operations such as "find the first string longer than 1000 characters", it is only necessary to examine just enough strings to find one that has the desired characteristics without examining all of the strings available from the source. (This behavior becomes even more important when the input stream is infinite and not merely large.)

Intermediate operations are further divided into stateless and stateful operations. Stateless operations, such as filter and map, retain no state from previously seen element when processing a new element -- each element can be processed independently of operations on other elements. Stateful operations, such as distinct and sorted, may incorporate state from previously seen elements when processing new elements.

Stateful operations may need to process the entire input before producing a result. For example, one cannot produce any results from sorting a stream until one has seen all elements of the stream. As a result, under parallel computation, some pipelines containing stateful intermediate operations may require multiple passes on the data or may need to buffer significant data. Pipelines containing exclusively stateless intermediate operations can be processed in a single pass, whether sequential or parallel, with minimal data buffering.

Further, some operations are deemed short-circuiting operations. An intermediate operation is short-circuiting if, when presented with infinite input, it may produce a finite stream as a result. A terminal operation is short-circuiting if, when presented with infinite input, it may terminate in finite time. Having a short-circuiting operation in the pipeline is a necessary, but not sufficient, condition for the processing of an infinite stream to terminate normally in finite time.

Parallelism

Processing elements with an explicit for-loop is inherently serial. Streams facilitate parallel execution by reframing the computation as a pipeline of aggregate operations, rather than as imperative operations on each individual element. All streams operations can execute either in serial or in parallel. The stream implementations in the JDK create serial streams unless parallelism is explicitly requested. For example, Collection has methods Collection.stream() and Collection.parallelStream(), which produce sequential and parallel streams respectively; other stream-bearing methods such as IntStream.range(int, int) produce sequential streams but these streams can be efficiently parallelized by invoking their BaseStream.parallel() method. To execute the prior "sum of weights of widgets" query in parallel, we would do:

     int sumOfWeights = widgets.parallelStream()
                               .filter(b -> b.getColor() == RED)
                               .mapToInt(b -> b.getWeight())
                               .sum();

The only difference between the serial and parallel versions of this example is the creation of the initial stream, using "parallelStream()" instead of "stream()". When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the orientation of the stream on which it is invoked. Whether a stream will execute in serial or parallel can be determined with the isParallel() method, and the orientation of a stream can be modified with the BaseStream.sequential() and BaseStream.parallel() operations. When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the mode of the stream on which it is invoked.

Except for operations identified as explicitly nondeterministic, such as findAny(), whether a stream executes sequentially or in parallel should not change the result of the computation.

Most stream operations accept parameters that describe user-specified behavior, which are often lambda expressions. To preserve correct behavior, these behavioral parameters must be non-interfering, and in most cases must be stateless. Such parameters are always instances of a functional interface such as Function, and are often lambda expressions or method references.

Non-interference

Streams enable you to execute possibly-parallel aggregate operations over a variety of data sources, including even non-thread-safe collections such as ArrayList. This is possible only if we can prevent interference with the data source during the execution of a stream pipeline. Except for the escape-hatch operations iterator() and spliterator(), execution begins when the terminal operation is invoked, and ends when the terminal operation completes. For most data sources, preventing interference means ensuring that the data source is not modified at all during the execution of the stream pipeline. The notable exception to this are streams whose sources are concurrent collections, which are specifically designed to handle concurrent modification. Concurrent stream sources are those whose Spliterator reports the CONCURRENT characteristic.

Accordingly, behavioral parameters in stream pipelines whose source might not be concurrent should never modify the stream's data source. A behavioral parameter is said to interfere with a non-concurrent data source if it modifies, or causes to be modified, the stream's data source. The need for non-interference applies to all pipelines, not just parallel ones. Unless the stream source is concurrent, modifying a stream's data source during execution of a stream pipeline can cause exceptions, incorrect answers, or nonconformant behavior. For well-behaved stream sources, the source can be modified before the terminal operation commences and those modifications will be reflected in the covered elements. For example, consider the following code:

     List<String> l = new ArrayList(Arrays.asList("one", "two"));
     Stream<String> sl = l.stream();
     l.add("three");
     String s = sl.collect(joining(" "));
First a list is created consisting of two strings: "one"; and "two". Then a stream is created from that list. Next the list is modified by adding a third string: "three". Finally the elements of the stream are collected and joined together. Since the list was modified before the terminal collect operation commenced the result will be a string of "one two three". All the streams returned from JDK collections, and most other JDK classes, are well-behaved in this manner; for streams generated by other libraries, see Low-level stream construction for requirements for building well-behaved streams.

Stateless behaviors

Stream pipeline results may be nondeterministic or incorrect if the behavioral parameters to the stream operations are stateful. A stateful lambda (or other object implementing the appropriate functional interface) is one whose result depends on any state which might change during the execution of the stream pipeline. An example of a stateful lambda is the parameter to map() in:

     Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
     stream.parallel().map(e -> { if (seen.add(e)) return 0; else return e; })...
Here, if the mapping operation is performed in parallel, the results for the same input could vary from run to run, due to thread scheduling differences, whereas, with a stateless lambda expression the results would always be the same.

Note also that attempting to access mutable state from behavioral parameters presents you with a bad choice with respect to safety and performance; if you do not synchronize access to that state, you have a data race and therefore your code is broken, but if you do synchronize access to that state, you risk having contention undermine the parallelism you are seeking to benefit from. The best approach is to avoid stateful behavioral parameters to stream operations entirely; there is usually a way to restructure the stream pipeline to avoid statefulness.

Side-effects

Side-effects in behavioral parameters to stream operations are, in general, discouraged, as they can often lead to unwitting violations of the statelessness requirement, as well as other thread-safety hazards.

If the behavioral parameters do have side-effects, unless explicitly stated, there are no guarantees as to the visibility of those side-effects to other threads, nor are there any guarantees that different operations on the "same" element within the same stream pipeline are executed in the same thread. Further, the ordering of those effects may be surprising. Even when a pipeline is constrained to produce a result that is consistent with the encounter order of the stream source (for example, IntStream.range(0,5).parallel().map(x -> x*2).toArray() must produce [0, 2, 4, 6, 8]), no guarantees are made as to the order in which the mapper function is applied to individual elements, or in what thread any behavioral parameter is executed for a given element.

Many computations where one might be tempted to use side effects can be more safely and efficiently expressed without side-effects, such as using reduction instead of mutable accumulators. However, side-effects such as using println() for debugging purposes are usually harmless. A small number of stream operations, such as forEach() and peek(), can operate only via side-effects; these should be used with care.

As an example of how to transform a stream pipeline that inappropriately uses side-effects to one that does not, the following code searches a stream of strings for those matching a given regular expression, and puts the matches in a list.

     ArrayList<String> results = new ArrayList<>();
     stream.filter(s -> pattern.matcher(s).matches())
           .forEach(s -> results.add(s));  // Unnecessary use of side-effects!
This code unnecessarily uses side-effects. If executed in parallel, the non-thread-safety of ArrayList would cause incorrect results, and adding needed synchronization would cause contention, undermining the benefit of parallelism. Furthermore, using side-effects here is completely unnecessary; the forEach() can simply be replaced with a reduction operation that is safer, more efficient, and more amenable to parallelization:

     List<String>results =
         stream.filter(s -> pattern.matcher(s).matches())
               .collect(Collectors.toList());  // No side-effects!

Ordering

Streams may or may not have a defined encounter order. Whether or not a stream has an encounter order depends on the source and the intermediate operations. Certain stream sources (such as List or arrays) are intrinsically ordered, whereas others (such as HashSet) are not. Some intermediate operations, such as sorted(), may impose an encounter order on an otherwise unordered stream, and others may render an ordered stream unordered, such as BaseStream.unordered(). Further, some terminal operations may ignore encounter order, such as forEach().

If a stream is ordered, most operations are constrained to operate on the elements in their encounter order; if the source of a stream is a List containing [1, 2, 3], then the result of executing map(x -> x*2) must be [2, 4, 6]. However, if the source has no defined encounter order, then any permutation of the values [2, 4, 6] would be a valid result.

For sequential streams, the presence or absence of an encounter order does not affect performance, only determinism. If a stream is ordered, repeated execution of identical stream pipelines on an identical source will produce an identical result; if it is not ordered, repeated execution might produce different results.

For parallel streams, relaxing the ordering constraint can sometimes enable more efficient execution. Certain aggregate operations, such as filtering duplicates (distinct()) or grouped reductions (Collectors.groupingBy()) can be implemented more efficiently if ordering of elements is not relevant. Similarly, operations that are intrinsically tied to encounter order, such as limit(), may require buffering to ensure proper ordering, undermining the benefit of parallelism. In cases where the stream has an encounter order, but the user does not particularly care about that encounter order, explicitly de-ordering the stream with unordered() may improve parallel performance for some stateful or terminal operations. However, most stream pipelines, such as the "sum of weight of blocks" example above, still parallelize efficiently even under ordering constraints.

Reduction operations

A reduction operation (also called a fold) takes a sequence of input elements and combines them into a single summary result by repeated application of a combining operation, such as finding the sum or maximum of a set of numbers, or accumulating elements into a list. The streams classes have multiple forms of general reduction operations, called reduce() and collect(), as well as multiple specialized reduction forms such as sum(), max(), or count().

Of course, such operations can be readily implemented as simple sequential loops, as in:

    int sum = 0;
    for (int x : numbers) {
       sum += x;
    }
However, there are good reasons to prefer a reduce operation over a mutative accumulation such as the above. Not only is a reduction "more abstract" -- it operates on the stream as a whole rather than individual elements -- but a properly constructed reduce operation is inherently parallelizable, so long as the function(s) used to process the elements are associative and stateless. For example, given a stream of numbers for which we want to find the sum, we can write:

    int sum = numbers.stream().reduce(0, (x,y) -> x+y);
or:

    int sum = numbers.stream().reduce(0, Integer::sum);

These reduction operations can run safely in parallel with almost no modification:

    int sum = numbers.parallelStream().reduce(0, Integer::sum);

Reduction parallellizes well because the implementation can operate on subsets of the data in parallel, and then combine the intermediate results to get the final correct answer. (Even if the language had a "parallel for-each" construct, the mutative accumulation approach would still required the developer to provide thread-safe updates to the shared accumulating variable sum, and the required synchronization would then likely eliminate any performance gain from parallelism.) Using reduce() instead removes all of the burden of parallelizing the reduction operation, and the library can provide an efficient parallel implementation with no additional synchronization required.

The "widgets" examples shown earlier shows how reduction combines with other operations to replace for loops with bulk operations. If widgets is a collection of Widget objects, which have a getWeight method, we can find the heaviest widget with:

     OptionalInt heaviest = widgets.parallelStream()
                                   .mapToInt(Widget::getWeight)
                                   .max();

In its more general form, a reduce operation on elements of type <T> yielding a result of type <U> requires three parameters:

 <U> U reduce(U identity,
              BiFunction<U, ? super T, U> accumulator,
              BinaryOperator<U> combiner);
Here, the identity element is both an initial seed value for the reduction and a default result if there are no input elements. The accumulator function takes a partial result and the next element, and produces a new partial result. The combiner function combines two partial results to produce a new partial result. (The combiner is necessary in parallel reductions, where the input is partitioned, a partial accumulation computed for each partition, and then the partial results are combined to produce a final result.)

More formally, the identity value must be an identity for the combiner function. This means that for all u, combiner.apply(identity, u) is equal to u. Additionally, the combiner function must be associative and must be compatible with the accumulator function: for all u and t, combiner.apply(u, accumulator.apply(identity, t)) must be equals() to accumulator.apply(u, t).

The three-argument form is a generalization of the two-argument form, incorporating a mapping step into the accumulation step. We could re-cast the simple sum-of-weights example using the more general form as follows:

     int sumOfWeights = widgets.stream()
                               .reduce(0,
                                       (sum, b) -> sum + b.getWeight())
                                       Integer::sum);
though the explicit map-reduce form is more readable and therefore should usually be preferred. The generalized form is provided for cases where significant work can be optimized away by combining mapping and reducing into a single function.

Mutable reduction

A mutable reduction operation accumulates input elements into a mutable result container, such as a Collection or StringBuilder, as it processes the elements in the stream.

If we wanted to take a stream of strings and concatenate them into a single long string, we could achieve this with ordinary reduction:

     String concatenated = strings.reduce("", String::concat)

We would get the desired result, and it would even work in parallel. However, we might not be happy about the performance! Such an implementation would do a great deal of string copying, and the run time would be O(n^2) in the number of characters. A more performant approach would be to accumulate the results into a StringBuilder, which is a mutable container for accumulating strings. We can use the same technique to parallelize mutable reduction as we do with ordinary reduction.

The mutable reduction operation is called collect(), as it collects together the desired results into a result container such as a Collection. A collect operation requires three functions: a supplier function to construct new instances of the result container, an accumulator function to incorporate an input element into a result container, and a combining function to merge the contents of one result container into another. The form of this is very similar to the general form of ordinary reduction:

 <R> R collect(Supplier<R> supplier,
               BiConsumer<R, ? super T> accumulator,
               BiConsumer<R, R> combiner);

As with reduce(), a benefit of expressing collect in this abstract way is that it is directly amenable to parallelization: we can accumulate partial results in parallel and then combine them, so long as the accumulation and combining functions satisfy the appropriate requirements. For example, to collect the String representations of the elements in a stream into an ArrayList, we could write the obvious sequential for-each form:

     ArrayList<String> strings = new ArrayList<>();
     for (T element : stream) {
         strings.add(element.toString());
     }
Or we could use a parallelizable collect form:

     ArrayList<String> strings = stream.collect(() -> new ArrayList<>(),
                                                (c, e) -> c.add(e.toString()),
                                                (c1, c2) -> c1.addAll(c2));
or, pulling the mapping operation out of the accumulator function, we could express it more succinctly as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);
Here, our supplier is just the ArrayList constructor, the accumulator adds the stringified element to an ArrayList, and the combiner simply uses addAll to copy the strings from one container into the other.

The three aspects of collect -- supplier, accumulator, and combiner -- are tightly coupled. We can use the abstraction of a Collector to capture all three aspects. The above example for collecting strings into a List can be rewritten using a standard Collector as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(Collectors.toList());

Packaging mutable reductions into a Collector has another advantage: composability. The class Collectors contains a number of predefined factories for collectors, including combinators that transform one collector into another. For example, suppose we have a collector that computes the sum of the salaries of a stream of employees, as follows:

     Collector<Employee, ?, Integer> summingSalaries
         = Collectors.summingInt(Employee::getSalary);
(The ? for the second type parameter merely indicates that we don't care about the intermediate representation used by this collector.) If we wanted to create a collector to tabulate the sum of salaries by department, we could reuse summingSalaries using groupingBy:

     Map<Department, Integer> salariesByDept
         = employees.stream().collect(Collectors.groupingBy(Employee::getDepartment,
                                                            summingSalaries));

As with the regular reduction operation, collect() operations can only be parallelized if appropriate conditions are met. For any partially accumulated result, combining it with an empty result container must produce an equivalent result. That is, for a partially accumulated result p that is the result of any series of accumulator and combiner invocations, p must be equivalent to combiner.apply(p, supplier.get()).

Further, however the computation is split, it must produce an equivalent result. For any input elements t1 and t2, the results r1 and r2 in the computation below must be equivalent:

     A a1 = supplier.get();
     accumulator.accept(a1, t1);
     accumulator.accept(a1, t2);
     R r1 = finisher.apply(a1);  // result without splitting

     A a2 = supplier.get();
     accumulator.accept(a2, t1);
     A a3 = supplier.get();
     accumulator.accept(a3, t2);
     R r2 = finisher.apply(combiner.apply(a2, a3));  // result with splitting

Here, equivalence generally means according to Object.equals(Object). but in some cases equivalence may be relaxed to account for differences in order.

Reduction, concurrency, and ordering

With some complex reduction operations, for example a collect() that produces a Map, such as:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .collect(Collectors.groupingBy(Transaction::getBuyer));
it may actually be counterproductive to perform the operation in parallel. This is because the combining step (merging one Map into another by key) can be expensive for some Map implementations.

Suppose, however, that the result container used in this reduction was a concurrently modifiable collection -- such as a ConcurrentHashMap. In that case, the parallel invocations of the accumulator could actually deposit their results concurrently into the same shared result container, eliminating the need for the combiner to merge distinct result containers. This potentially provides a boost to the parallel execution performance. We call this a concurrent reduction.

A Collector that supports concurrent reduction is marked with the Collector.Characteristics.CONCURRENT characteristic. However, a concurrent collection also has a downside. If multiple threads are depositing results concurrently into a shared container, the order in which results are deposited is non-deterministic. Consequently, a concurrent reduction is only possible if ordering is not important for the stream being processed. The Stream.collect(Collector) implementation will only perform a concurrent reduction if

  • The stream is parallel;
  • The collector has the Collector.Characteristics.CONCURRENT characteristic, and;
  • Either the stream is unordered, or the collector has the Collector.Characteristics.UNORDERED characteristic.
You can ensure the stream is unordered by using the BaseStream.unordered() method. For example:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .unordered()
               .collect(groupingByConcurrent(Transaction::getBuyer));
(where Collectors.groupingByConcurrent(java.util.function.Function<? super T, ? extends K>) is the concurrent equivalent of groupingBy).

Note that if it is important that the elements for a given key appear in the order they appear in the source, then we cannot use a concurrent reduction, as ordering is one of the casualties of concurrent insertion. We would then be constrained to implement either a sequential reduction or a merge-based parallel reduction.

Associativity

An operator or function op is associative if the following holds:

     (a op b) op c == a op (b op c)
The importance of this to parallel evaluation can be seen if we expand this to four terms:

     a op b op c op d == (a op b) op (c op d)
So we can evaluate (a op b) in parallel with (c op d), and then invoke op on the results.

Examples of associative operations include numeric addition, min, and max, and string concatenation.

Low-level stream construction

So far, all the stream examples have used methods like Collection.stream() or Arrays.stream(Object[]) to obtain a stream. How are those stream-bearing methods implemented?

The class StreamSupport has a number of low-level methods for creating a stream, all using some form of a Spliterator. A spliterator is the parallel analogue of an Iterator; it describes a (possibly infinite) collection of elements, with support for sequentially advancing, bulk traversal, and splitting off some portion of the input into another spliterator which can be processed in parallel. At the lowest level, all streams are driven by a spliterator.

There are a number of implementation choices in implementing a spliterator, nearly all of which are tradeoffs between simplicity of implementation and runtime performance of streams using that spliterator. The simplest, but least performant, way to create a spliterator is to create one from an iterator using Spliterators.spliteratorUnknownSize(java.util.Iterator, int). While such a spliterator will work, it will likely offer poor parallel performance, since we have lost sizing information (how big is the underlying data set), as well as being constrained to a simplistic splitting algorithm.

A higher-quality spliterator will provide balanced and known-size splits, accurate sizing information, and a number of other characteristics of the spliterator or data that can be used by implementations to optimize execution.

Spliterators for mutable data sources have an additional challenge; timing of binding to the data, since the data could change between the time the spliterator is created and the time the stream pipeline is executed. Ideally, a spliterator for a stream would report a characteristic of IMMUTABLE or CONCURRENT; if not it should be late-binding. If a source cannot directly supply a recommended spliterator, it may indirectly supply a spliterator using a Supplier, and construct a stream via the Supplier-accepting versions of stream(). The spliterator is obtained from the supplier only after the terminal operation of the stream pipeline commences.

These requirements significantly reduce the scope of potential interference between mutations of the stream source and execution of stream pipelines. Streams based on spliterators with the desired characteristics, or those using the Supplier-based factory forms, are immune to modifications of the data source prior to commencement of the terminal operation (provided the behavioral parameters to the stream operations meet the required criteria for non-interference and statelessness). See Non-Interference for more details.

Since:
1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.stream

Interfaces

  • BaseStream
  • Collector
  • DoubleStream
  • DoubleStream.Builder
  • IntStream
  • IntStream.Builder
  • LongStream
  • LongStream.Builder
  • Stream
  • Stream.Builder

Classes

  • Collectors
  • StreamSupport

Enums

  • Collector.Characteristics


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.stream

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

See: Description

  • Interface Summary
    Interface Description
    BaseStream<T,S extends BaseStream<T,S>>
    Base interface for streams, which are sequences of elements supporting sequential and parallel aggregate operations.
    Collector<T,A,R>
    A mutable reduction operation that accumulates input elements into a mutable result container, optionally transforming the accumulated result into a final representation after all input elements have been processed.
    DoubleStream
    A sequence of primitive double-valued elements supporting sequential and parallel aggregate operations.
    DoubleStream.Builder
    A mutable builder for a DoubleStream.
    IntStream
    A sequence of primitive int-valued elements supporting sequential and parallel aggregate operations.
    IntStream.Builder
    A mutable builder for an IntStream.
    LongStream
    A sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.
    LongStream.Builder
    A mutable builder for a LongStream.
    Stream<T>
    A sequence of elements supporting sequential and parallel aggregate operations.
    Stream.Builder<T>
    A mutable builder for a Stream.
  • Class Summary
    Class Description
    Collectors
    Implementations of Collector that implement various useful reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc.
    StreamSupport
    Low-level utility methods for creating and manipulating streams.
  • Enum Summary
    Enum Description
    Collector.Characteristics
    Characteristics indicating properties of a Collector, which can be used to optimize reduction implementations.

Package java.util.stream Description

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections. For example:

     int sum = widgets.stream()
                      .filter(b -> b.getColor() == RED)
                      .mapToInt(b -> b.getWeight())
                      .sum();

Here we use widgets, a Collection<Widget>, as a source for a stream, and then perform a filter-map-reduce on the stream to obtain the sum of the weights of the red widgets. (Summation is an example of a reduction operation.)

The key abstraction introduced in this package is stream. The classes Stream, IntStream, LongStream, and DoubleStream are streams over objects and the primitive int, long and double types. Streams differ from collections in several ways:

  • No storage. A stream is not a data structure that stores elements; instead, it conveys elements from a source such as a data structure, an array, a generator function, or an I/O channel, through a pipeline of computational operations.
  • Functional in nature. An operation on a stream produces a result, but does not modify its source. For example, filtering a Stream obtained from a collection produces a new Stream without the filtered elements, rather than removing elements from the source collection.
  • Laziness-seeking. Many stream operations, such as filtering, mapping, or duplicate removal, can be implemented lazily, exposing opportunities for optimization. For example, "find the first String with three consecutive vowels" need not examine all the input strings. Stream operations are divided into intermediate (Stream-producing) operations and terminal (value- or side-effect-producing) operations. Intermediate operations are always lazy.
  • Possibly unbounded. While collections have a finite size, streams need not. Short-circuiting operations such as limit(n) or findFirst() can allow computations on infinite streams to complete in finite time.
  • Consumable. The elements of a stream are only visited once during the life of a stream. Like an Iterator, a new stream must be generated to revisit the same elements of the source.
Streams can be obtained in a number of ways. Some examples include:
  • From a Collection via the stream() and parallelStream() methods;
  • From an array via Arrays.stream(Object[]);
  • From static factory methods on the stream classes, such as
     Stream.of(Object[]),
     IntStream.range(int, int)
     or Stream.iterate(Object, UnaryOperator);
  • The lines of a file can be obtained from BufferedReader.lines();
  • Streams of file paths can be obtained from methods in Files;
  • Streams of random numbers can be obtained from Random.ints();
  • Numerous other stream-bearing methods in the JDK, including
     BitSet.stream(),
     Pattern.splitAsStream(java.lang.CharSequence),
     and JarFile.stream().

Additional stream sources can be provided by third-party libraries using these techniques.

Stream operations and pipelines

Stream operations are divided into intermediate and terminal operations, and are combined to form stream pipelines. A stream pipeline consists of a source (such as a Collection, an array, a generator function, or an I/O channel); followed by zero or more intermediate operations such as Stream.filter or Stream.map; and a terminal operation such as Stream.forEach or Stream.reduce.

Intermediate operations return a new stream. They are always lazy; executing an intermediate operation such as filter() does not actually perform any filtering, but instead creates a new stream that, when traversed, contains the elements of the initial stream that match the given predicate. Traversal of the pipeline source does not begin until the terminal operation of the pipeline is executed.

Terminal operations, such as Stream.forEach or IntStream.sum, may traverse the stream to produce a result or a side-effect. After the terminal operation is performed, the stream pipeline is considered consumed, and can no longer be used; if you need to traverse the same data source again, you must return to the data source to get a new stream. In almost all cases, terminal operations are eager, completing their traversal of the data source and processing of the pipeline before returning. Only the terminal operations iterator() and spliterator() are not; these are provided as an "escape hatch" to enable arbitrary client-controlled pipeline traversals in the event that the existing operations are not sufficient to the task.

Processing streams lazily allows for significant efficiencies; in a pipeline such as the filter-map-sum example above, filtering, mapping, and summing can be fused into a single pass on the data, with minimal intermediate state. Laziness also allows avoiding examining all the data when it is not necessary; for operations such as "find the first string longer than 1000 characters", it is only necessary to examine just enough strings to find one that has the desired characteristics without examining all of the strings available from the source. (This behavior becomes even more important when the input stream is infinite and not merely large.)

Intermediate operations are further divided into stateless and stateful operations. Stateless operations, such as filter and map, retain no state from previously seen element when processing a new element -- each element can be processed independently of operations on other elements. Stateful operations, such as distinct and sorted, may incorporate state from previously seen elements when processing new elements.

Stateful operations may need to process the entire input before producing a result. For example, one cannot produce any results from sorting a stream until one has seen all elements of the stream. As a result, under parallel computation, some pipelines containing stateful intermediate operations may require multiple passes on the data or may need to buffer significant data. Pipelines containing exclusively stateless intermediate operations can be processed in a single pass, whether sequential or parallel, with minimal data buffering.

Further, some operations are deemed short-circuiting operations. An intermediate operation is short-circuiting if, when presented with infinite input, it may produce a finite stream as a result. A terminal operation is short-circuiting if, when presented with infinite input, it may terminate in finite time. Having a short-circuiting operation in the pipeline is a necessary, but not sufficient, condition for the processing of an infinite stream to terminate normally in finite time.

Parallelism

Processing elements with an explicit for-loop is inherently serial. Streams facilitate parallel execution by reframing the computation as a pipeline of aggregate operations, rather than as imperative operations on each individual element. All streams operations can execute either in serial or in parallel. The stream implementations in the JDK create serial streams unless parallelism is explicitly requested. For example, Collection has methods Collection.stream() and Collection.parallelStream(), which produce sequential and parallel streams respectively; other stream-bearing methods such as IntStream.range(int, int) produce sequential streams but these streams can be efficiently parallelized by invoking their BaseStream.parallel() method. To execute the prior "sum of weights of widgets" query in parallel, we would do:

     int sumOfWeights = widgets.parallelStream()
                               .filter(b -> b.getColor() == RED)
                               .mapToInt(b -> b.getWeight())
                               .sum();

The only difference between the serial and parallel versions of this example is the creation of the initial stream, using "parallelStream()" instead of "stream()". When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the orientation of the stream on which it is invoked. Whether a stream will execute in serial or parallel can be determined with the isParallel() method, and the orientation of a stream can be modified with the BaseStream.sequential() and BaseStream.parallel() operations. When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the mode of the stream on which it is invoked.

Except for operations identified as explicitly nondeterministic, such as findAny(), whether a stream executes sequentially or in parallel should not change the result of the computation.

Most stream operations accept parameters that describe user-specified behavior, which are often lambda expressions. To preserve correct behavior, these behavioral parameters must be non-interfering, and in most cases must be stateless. Such parameters are always instances of a functional interface such as Function, and are often lambda expressions or method references.

Non-interference

Streams enable you to execute possibly-parallel aggregate operations over a variety of data sources, including even non-thread-safe collections such as ArrayList. This is possible only if we can prevent interference with the data source during the execution of a stream pipeline. Except for the escape-hatch operations iterator() and spliterator(), execution begins when the terminal operation is invoked, and ends when the terminal operation completes. For most data sources, preventing interference means ensuring that the data source is not modified at all during the execution of the stream pipeline. The notable exception to this are streams whose sources are concurrent collections, which are specifically designed to handle concurrent modification. Concurrent stream sources are those whose Spliterator reports the CONCURRENT characteristic.

Accordingly, behavioral parameters in stream pipelines whose source might not be concurrent should never modify the stream's data source. A behavioral parameter is said to interfere with a non-concurrent data source if it modifies, or causes to be modified, the stream's data source. The need for non-interference applies to all pipelines, not just parallel ones. Unless the stream source is concurrent, modifying a stream's data source during execution of a stream pipeline can cause exceptions, incorrect answers, or nonconformant behavior. For well-behaved stream sources, the source can be modified before the terminal operation commences and those modifications will be reflected in the covered elements. For example, consider the following code:

     List<String> l = new ArrayList(Arrays.asList("one", "two"));
     Stream<String> sl = l.stream();
     l.add("three");
     String s = sl.collect(joining(" "));
First a list is created consisting of two strings: "one"; and "two". Then a stream is created from that list. Next the list is modified by adding a third string: "three". Finally the elements of the stream are collected and joined together. Since the list was modified before the terminal collect operation commenced the result will be a string of "one two three". All the streams returned from JDK collections, and most other JDK classes, are well-behaved in this manner; for streams generated by other libraries, see Low-level stream construction for requirements for building well-behaved streams.

Stateless behaviors

Stream pipeline results may be nondeterministic or incorrect if the behavioral parameters to the stream operations are stateful. A stateful lambda (or other object implementing the appropriate functional interface) is one whose result depends on any state which might change during the execution of the stream pipeline. An example of a stateful lambda is the parameter to map() in:

     Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
     stream.parallel().map(e -> { if (seen.add(e)) return 0; else return e; })...
Here, if the mapping operation is performed in parallel, the results for the same input could vary from run to run, due to thread scheduling differences, whereas, with a stateless lambda expression the results would always be the same.

Note also that attempting to access mutable state from behavioral parameters presents you with a bad choice with respect to safety and performance; if you do not synchronize access to that state, you have a data race and therefore your code is broken, but if you do synchronize access to that state, you risk having contention undermine the parallelism you are seeking to benefit from. The best approach is to avoid stateful behavioral parameters to stream operations entirely; there is usually a way to restructure the stream pipeline to avoid statefulness.

Side-effects

Side-effects in behavioral parameters to stream operations are, in general, discouraged, as they can often lead to unwitting violations of the statelessness requirement, as well as other thread-safety hazards.

If the behavioral parameters do have side-effects, unless explicitly stated, there are no guarantees as to the visibility of those side-effects to other threads, nor are there any guarantees that different operations on the "same" element within the same stream pipeline are executed in the same thread. Further, the ordering of those effects may be surprising. Even when a pipeline is constrained to produce a result that is consistent with the encounter order of the stream source (for example, IntStream.range(0,5).parallel().map(x -> x*2).toArray() must produce [0, 2, 4, 6, 8]), no guarantees are made as to the order in which the mapper function is applied to individual elements, or in what thread any behavioral parameter is executed for a given element.

Many computations where one might be tempted to use side effects can be more safely and efficiently expressed without side-effects, such as using reduction instead of mutable accumulators. However, side-effects such as using println() for debugging purposes are usually harmless. A small number of stream operations, such as forEach() and peek(), can operate only via side-effects; these should be used with care.

As an example of how to transform a stream pipeline that inappropriately uses side-effects to one that does not, the following code searches a stream of strings for those matching a given regular expression, and puts the matches in a list.

     ArrayList<String> results = new ArrayList<>();
     stream.filter(s -> pattern.matcher(s).matches())
           .forEach(s -> results.add(s));  // Unnecessary use of side-effects!
This code unnecessarily uses side-effects. If executed in parallel, the non-thread-safety of ArrayList would cause incorrect results, and adding needed synchronization would cause contention, undermining the benefit of parallelism. Furthermore, using side-effects here is completely unnecessary; the forEach() can simply be replaced with a reduction operation that is safer, more efficient, and more amenable to parallelization:

     List<String>results =
         stream.filter(s -> pattern.matcher(s).matches())
               .collect(Collectors.toList());  // No side-effects!

Ordering

Streams may or may not have a defined encounter order. Whether or not a stream has an encounter order depends on the source and the intermediate operations. Certain stream sources (such as List or arrays) are intrinsically ordered, whereas others (such as HashSet) are not. Some intermediate operations, such as sorted(), may impose an encounter order on an otherwise unordered stream, and others may render an ordered stream unordered, such as BaseStream.unordered(). Further, some terminal operations may ignore encounter order, such as forEach().

If a stream is ordered, most operations are constrained to operate on the elements in their encounter order; if the source of a stream is a List containing [1, 2, 3], then the result of executing map(x -> x*2) must be [2, 4, 6]. However, if the source has no defined encounter order, then any permutation of the values [2, 4, 6] would be a valid result.

For sequential streams, the presence or absence of an encounter order does not affect performance, only determinism. If a stream is ordered, repeated execution of identical stream pipelines on an identical source will produce an identical result; if it is not ordered, repeated execution might produce different results.

For parallel streams, relaxing the ordering constraint can sometimes enable more efficient execution. Certain aggregate operations, such as filtering duplicates (distinct()) or grouped reductions (Collectors.groupingBy()) can be implemented more efficiently if ordering of elements is not relevant. Similarly, operations that are intrinsically tied to encounter order, such as limit(), may require buffering to ensure proper ordering, undermining the benefit of parallelism. In cases where the stream has an encounter order, but the user does not particularly care about that encounter order, explicitly de-ordering the stream with unordered() may improve parallel performance for some stateful or terminal operations. However, most stream pipelines, such as the "sum of weight of blocks" example above, still parallelize efficiently even under ordering constraints.

Reduction operations

A reduction operation (also called a fold) takes a sequence of input elements and combines them into a single summary result by repeated application of a combining operation, such as finding the sum or maximum of a set of numbers, or accumulating elements into a list. The streams classes have multiple forms of general reduction operations, called reduce() and collect(), as well as multiple specialized reduction forms such as sum(), max(), or count().

Of course, such operations can be readily implemented as simple sequential loops, as in:

    int sum = 0;
    for (int x : numbers) {
       sum += x;
    }
However, there are good reasons to prefer a reduce operation over a mutative accumulation such as the above. Not only is a reduction "more abstract" -- it operates on the stream as a whole rather than individual elements -- but a properly constructed reduce operation is inherently parallelizable, so long as the function(s) used to process the elements are associative and stateless. For example, given a stream of numbers for which we want to find the sum, we can write:

    int sum = numbers.stream().reduce(0, (x,y) -> x+y);
or:

    int sum = numbers.stream().reduce(0, Integer::sum);

These reduction operations can run safely in parallel with almost no modification:

    int sum = numbers.parallelStream().reduce(0, Integer::sum);

Reduction parallellizes well because the implementation can operate on subsets of the data in parallel, and then combine the intermediate results to get the final correct answer. (Even if the language had a "parallel for-each" construct, the mutative accumulation approach would still required the developer to provide thread-safe updates to the shared accumulating variable sum, and the required synchronization would then likely eliminate any performance gain from parallelism.) Using reduce() instead removes all of the burden of parallelizing the reduction operation, and the library can provide an efficient parallel implementation with no additional synchronization required.

The "widgets" examples shown earlier shows how reduction combines with other operations to replace for loops with bulk operations. If widgets is a collection of Widget objects, which have a getWeight method, we can find the heaviest widget with:

     OptionalInt heaviest = widgets.parallelStream()
                                   .mapToInt(Widget::getWeight)
                                   .max();

In its more general form, a reduce operation on elements of type <T> yielding a result of type <U> requires three parameters:

 <U> U reduce(U identity,
              BiFunction<U, ? super T, U> accumulator,
              BinaryOperator<U> combiner);
Here, the identity element is both an initial seed value for the reduction and a default result if there are no input elements. The accumulator function takes a partial result and the next element, and produces a new partial result. The combiner function combines two partial results to produce a new partial result. (The combiner is necessary in parallel reductions, where the input is partitioned, a partial accumulation computed for each partition, and then the partial results are combined to produce a final result.)

More formally, the identity value must be an identity for the combiner function. This means that for all u, combiner.apply(identity, u) is equal to u. Additionally, the combiner function must be associative and must be compatible with the accumulator function: for all u and t, combiner.apply(u, accumulator.apply(identity, t)) must be equals() to accumulator.apply(u, t).

The three-argument form is a generalization of the two-argument form, incorporating a mapping step into the accumulation step. We could re-cast the simple sum-of-weights example using the more general form as follows:

     int sumOfWeights = widgets.stream()
                               .reduce(0,
                                       (sum, b) -> sum + b.getWeight())
                                       Integer::sum);
though the explicit map-reduce form is more readable and therefore should usually be preferred. The generalized form is provided for cases where significant work can be optimized away by combining mapping and reducing into a single function.

Mutable reduction

A mutable reduction operation accumulates input elements into a mutable result container, such as a Collection or StringBuilder, as it processes the elements in the stream.

If we wanted to take a stream of strings and concatenate them into a single long string, we could achieve this with ordinary reduction:

     String concatenated = strings.reduce("", String::concat)

We would get the desired result, and it would even work in parallel. However, we might not be happy about the performance! Such an implementation would do a great deal of string copying, and the run time would be O(n^2) in the number of characters. A more performant approach would be to accumulate the results into a StringBuilder, which is a mutable container for accumulating strings. We can use the same technique to parallelize mutable reduction as we do with ordinary reduction.

The mutable reduction operation is called collect(), as it collects together the desired results into a result container such as a Collection. A collect operation requires three functions: a supplier function to construct new instances of the result container, an accumulator function to incorporate an input element into a result container, and a combining function to merge the contents of one result container into another. The form of this is very similar to the general form of ordinary reduction:

 <R> R collect(Supplier<R> supplier,
               BiConsumer<R, ? super T> accumulator,
               BiConsumer<R, R> combiner);

As with reduce(), a benefit of expressing collect in this abstract way is that it is directly amenable to parallelization: we can accumulate partial results in parallel and then combine them, so long as the accumulation and combining functions satisfy the appropriate requirements. For example, to collect the String representations of the elements in a stream into an ArrayList, we could write the obvious sequential for-each form:

     ArrayList<String> strings = new ArrayList<>();
     for (T element : stream) {
         strings.add(element.toString());
     }
Or we could use a parallelizable collect form:

     ArrayList<String> strings = stream.collect(() -> new ArrayList<>(),
                                                (c, e) -> c.add(e.toString()),
                                                (c1, c2) -> c1.addAll(c2));
or, pulling the mapping operation out of the accumulator function, we could express it more succinctly as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);
Here, our supplier is just the ArrayList constructor, the accumulator adds the stringified element to an ArrayList, and the combiner simply uses addAll to copy the strings from one container into the other.

The three aspects of collect -- supplier, accumulator, and combiner -- are tightly coupled. We can use the abstraction of a Collector to capture all three aspects. The above example for collecting strings into a List can be rewritten using a standard Collector as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(Collectors.toList());

Packaging mutable reductions into a Collector has another advantage: composability. The class Collectors contains a number of predefined factories for collectors, including combinators that transform one collector into another. For example, suppose we have a collector that computes the sum of the salaries of a stream of employees, as follows:

     Collector<Employee, ?, Integer> summingSalaries
         = Collectors.summingInt(Employee::getSalary);
(The ? for the second type parameter merely indicates that we don't care about the intermediate representation used by this collector.) If we wanted to create a collector to tabulate the sum of salaries by department, we could reuse summingSalaries using groupingBy:

     Map<Department, Integer> salariesByDept
         = employees.stream().collect(Collectors.groupingBy(Employee::getDepartment,
                                                            summingSalaries));

As with the regular reduction operation, collect() operations can only be parallelized if appropriate conditions are met. For any partially accumulated result, combining it with an empty result container must produce an equivalent result. That is, for a partially accumulated result p that is the result of any series of accumulator and combiner invocations, p must be equivalent to combiner.apply(p, supplier.get()).

Further, however the computation is split, it must produce an equivalent result. For any input elements t1 and t2, the results r1 and r2 in the computation below must be equivalent:

     A a1 = supplier.get();
     accumulator.accept(a1, t1);
     accumulator.accept(a1, t2);
     R r1 = finisher.apply(a1);  // result without splitting

     A a2 = supplier.get();
     accumulator.accept(a2, t1);
     A a3 = supplier.get();
     accumulator.accept(a3, t2);
     R r2 = finisher.apply(combiner.apply(a2, a3));  // result with splitting

Here, equivalence generally means according to Object.equals(Object). but in some cases equivalence may be relaxed to account for differences in order.

Reduction, concurrency, and ordering

With some complex reduction operations, for example a collect() that produces a Map, such as:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .collect(Collectors.groupingBy(Transaction::getBuyer));
it may actually be counterproductive to perform the operation in parallel. This is because the combining step (merging one Map into another by key) can be expensive for some Map implementations.

Suppose, however, that the result container used in this reduction was a concurrently modifiable collection -- such as a ConcurrentHashMap. In that case, the parallel invocations of the accumulator could actually deposit their results concurrently into the same shared result container, eliminating the need for the combiner to merge distinct result containers. This potentially provides a boost to the parallel execution performance. We call this a concurrent reduction.

A Collector that supports concurrent reduction is marked with the Collector.Characteristics.CONCURRENT characteristic. However, a concurrent collection also has a downside. If multiple threads are depositing results concurrently into a shared container, the order in which results are deposited is non-deterministic. Consequently, a concurrent reduction is only possible if ordering is not important for the stream being processed. The Stream.collect(Collector) implementation will only perform a concurrent reduction if

  • The stream is parallel;
  • The collector has the Collector.Characteristics.CONCURRENT characteristic, and;
  • Either the stream is unordered, or the collector has the Collector.Characteristics.UNORDERED characteristic.
You can ensure the stream is unordered by using the BaseStream.unordered() method. For example:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .unordered()
               .collect(groupingByConcurrent(Transaction::getBuyer));
(where Collectors.groupingByConcurrent(java.util.function.Function<? super T, ? extends K>) is the concurrent equivalent of groupingBy).

Note that if it is important that the elements for a given key appear in the order they appear in the source, then we cannot use a concurrent reduction, as ordering is one of the casualties of concurrent insertion. We would then be constrained to implement either a sequential reduction or a merge-based parallel reduction.

Associativity

An operator or function op is associative if the following holds:

     (a op b) op c == a op (b op c)
The importance of this to parallel evaluation can be seen if we expand this to four terms:

     a op b op c op d == (a op b) op (c op d)
So we can evaluate (a op b) in parallel with (c op d), and then invoke op on the results.

Examples of associative operations include numeric addition, min, and max, and string concatenation.

Low-level stream construction

So far, all the stream examples have used methods like Collection.stream() or Arrays.stream(Object[]) to obtain a stream. How are those stream-bearing methods implemented?

The class StreamSupport has a number of low-level methods for creating a stream, all using some form of a Spliterator. A spliterator is the parallel analogue of an Iterator; it describes a (possibly infinite) collection of elements, with support for sequentially advancing, bulk traversal, and splitting off some portion of the input into another spliterator which can be processed in parallel. At the lowest level, all streams are driven by a spliterator.

There are a number of implementation choices in implementing a spliterator, nearly all of which are tradeoffs between simplicity of implementation and runtime performance of streams using that spliterator. The simplest, but least performant, way to create a spliterator is to create one from an iterator using Spliterators.spliteratorUnknownSize(java.util.Iterator, int). While such a spliterator will work, it will likely offer poor parallel performance, since we have lost sizing information (how big is the underlying data set), as well as being constrained to a simplistic splitting algorithm.

A higher-quality spliterator will provide balanced and known-size splits, accurate sizing information, and a number of other characteristics of the spliterator or data that can be used by implementations to optimize execution.

Spliterators for mutable data sources have an additional challenge; timing of binding to the data, since the data could change between the time the spliterator is created and the time the stream pipeline is executed. Ideally, a spliterator for a stream would report a characteristic of IMMUTABLE or CONCURRENT; if not it should be late-binding. If a source cannot directly supply a recommended spliterator, it may indirectly supply a spliterator using a Supplier, and construct a stream via the Supplier-accepting versions of stream(). The spliterator is obtained from the supplier only after the terminal operation of the stream pipeline commences.

These requirements significantly reduce the scope of potential interference between mutations of the stream source and execution of stream pipelines. Streams based on spliterators with the desired characteristics, or those using the Supplier-based factory forms, are immune to modifications of the data source prior to commencement of the terminal operation (provided the behavioral parameters to the stream operations meet the required criteria for non-interference and statelessness). See Non-Interference for more details.

Since:
1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.stream

Interfaces

  • BaseStream
  • Collector
  • DoubleStream
  • DoubleStream.Builder
  • IntStream
  • IntStream.Builder
  • LongStream
  • LongStream.Builder
  • Stream
  • Stream.Builder

Classes

  • Collectors
  • StreamSupport

Enums

  • Collector.Characteristics


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.stream

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

See: Description

  • Interface Summary
    Interface Description
    BaseStream<T,S extends BaseStream<T,S>>
    Base interface for streams, which are sequences of elements supporting sequential and parallel aggregate operations.
    Collector<T,A,R>
    A mutable reduction operation that accumulates input elements into a mutable result container, optionally transforming the accumulated result into a final representation after all input elements have been processed.
    DoubleStream
    A sequence of primitive double-valued elements supporting sequential and parallel aggregate operations.
    DoubleStream.Builder
    A mutable builder for a DoubleStream.
    IntStream
    A sequence of primitive int-valued elements supporting sequential and parallel aggregate operations.
    IntStream.Builder
    A mutable builder for an IntStream.
    LongStream
    A sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.
    LongStream.Builder
    A mutable builder for a LongStream.
    Stream<T>
    A sequence of elements supporting sequential and parallel aggregate operations.
    Stream.Builder<T>
    A mutable builder for a Stream.
  • Class Summary
    Class Description
    Collectors
    Implementations of Collector that implement various useful reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc.
    StreamSupport
    Low-level utility methods for creating and manipulating streams.
  • Enum Summary
    Enum Description
    Collector.Characteristics
    Characteristics indicating properties of a Collector, which can be used to optimize reduction implementations.

Package java.util.stream Description

Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections. For example:

     int sum = widgets.stream()
                      .filter(b -> b.getColor() == RED)
                      .mapToInt(b -> b.getWeight())
                      .sum();

Here we use widgets, a Collection<Widget>, as a source for a stream, and then perform a filter-map-reduce on the stream to obtain the sum of the weights of the red widgets. (Summation is an example of a reduction operation.)

The key abstraction introduced in this package is stream. The classes Stream, IntStream, LongStream, and DoubleStream are streams over objects and the primitive int, long and double types. Streams differ from collections in several ways:

  • No storage. A stream is not a data structure that stores elements; instead, it conveys elements from a source such as a data structure, an array, a generator function, or an I/O channel, through a pipeline of computational operations.
  • Functional in nature. An operation on a stream produces a result, but does not modify its source. For example, filtering a Stream obtained from a collection produces a new Stream without the filtered elements, rather than removing elements from the source collection.
  • Laziness-seeking. Many stream operations, such as filtering, mapping, or duplicate removal, can be implemented lazily, exposing opportunities for optimization. For example, "find the first String with three consecutive vowels" need not examine all the input strings. Stream operations are divided into intermediate (Stream-producing) operations and terminal (value- or side-effect-producing) operations. Intermediate operations are always lazy.
  • Possibly unbounded. While collections have a finite size, streams need not. Short-circuiting operations such as limit(n) or findFirst() can allow computations on infinite streams to complete in finite time.
  • Consumable. The elements of a stream are only visited once during the life of a stream. Like an Iterator, a new stream must be generated to revisit the same elements of the source.
Streams can be obtained in a number of ways. Some examples include:
  • From a Collection via the stream() and parallelStream() methods;
  • From an array via Arrays.stream(Object[]);
  • From static factory methods on the stream classes, such as
     Stream.of(Object[]),
     IntStream.range(int, int)
     or Stream.iterate(Object, UnaryOperator);
  • The lines of a file can be obtained from BufferedReader.lines();
  • Streams of file paths can be obtained from methods in Files;
  • Streams of random numbers can be obtained from Random.ints();
  • Numerous other stream-bearing methods in the JDK, including
     BitSet.stream(),
     Pattern.splitAsStream(java.lang.CharSequence),
     and JarFile.stream().

Additional stream sources can be provided by third-party libraries using these techniques.

Stream operations and pipelines

Stream operations are divided into intermediate and terminal operations, and are combined to form stream pipelines. A stream pipeline consists of a source (such as a Collection, an array, a generator function, or an I/O channel); followed by zero or more intermediate operations such as Stream.filter or Stream.map; and a terminal operation such as Stream.forEach or Stream.reduce.

Intermediate operations return a new stream. They are always lazy; executing an intermediate operation such as filter() does not actually perform any filtering, but instead creates a new stream that, when traversed, contains the elements of the initial stream that match the given predicate. Traversal of the pipeline source does not begin until the terminal operation of the pipeline is executed.

Terminal operations, such as Stream.forEach or IntStream.sum, may traverse the stream to produce a result or a side-effect. After the terminal operation is performed, the stream pipeline is considered consumed, and can no longer be used; if you need to traverse the same data source again, you must return to the data source to get a new stream. In almost all cases, terminal operations are eager, completing their traversal of the data source and processing of the pipeline before returning. Only the terminal operations iterator() and spliterator() are not; these are provided as an "escape hatch" to enable arbitrary client-controlled pipeline traversals in the event that the existing operations are not sufficient to the task.

Processing streams lazily allows for significant efficiencies; in a pipeline such as the filter-map-sum example above, filtering, mapping, and summing can be fused into a single pass on the data, with minimal intermediate state. Laziness also allows avoiding examining all the data when it is not necessary; for operations such as "find the first string longer than 1000 characters", it is only necessary to examine just enough strings to find one that has the desired characteristics without examining all of the strings available from the source. (This behavior becomes even more important when the input stream is infinite and not merely large.)

Intermediate operations are further divided into stateless and stateful operations. Stateless operations, such as filter and map, retain no state from previously seen element when processing a new element -- each element can be processed independently of operations on other elements. Stateful operations, such as distinct and sorted, may incorporate state from previously seen elements when processing new elements.

Stateful operations may need to process the entire input before producing a result. For example, one cannot produce any results from sorting a stream until one has seen all elements of the stream. As a result, under parallel computation, some pipelines containing stateful intermediate operations may require multiple passes on the data or may need to buffer significant data. Pipelines containing exclusively stateless intermediate operations can be processed in a single pass, whether sequential or parallel, with minimal data buffering.

Further, some operations are deemed short-circuiting operations. An intermediate operation is short-circuiting if, when presented with infinite input, it may produce a finite stream as a result. A terminal operation is short-circuiting if, when presented with infinite input, it may terminate in finite time. Having a short-circuiting operation in the pipeline is a necessary, but not sufficient, condition for the processing of an infinite stream to terminate normally in finite time.

Parallelism

Processing elements with an explicit for-loop is inherently serial. Streams facilitate parallel execution by reframing the computation as a pipeline of aggregate operations, rather than as imperative operations on each individual element. All streams operations can execute either in serial or in parallel. The stream implementations in the JDK create serial streams unless parallelism is explicitly requested. For example, Collection has methods Collection.stream() and Collection.parallelStream(), which produce sequential and parallel streams respectively; other stream-bearing methods such as IntStream.range(int, int) produce sequential streams but these streams can be efficiently parallelized by invoking their BaseStream.parallel() method. To execute the prior "sum of weights of widgets" query in parallel, we would do:

     int sumOfWeights = widgets.parallelStream()
                               .filter(b -> b.getColor() == RED)
                               .mapToInt(b -> b.getWeight())
                               .sum();

The only difference between the serial and parallel versions of this example is the creation of the initial stream, using "parallelStream()" instead of "stream()". When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the orientation of the stream on which it is invoked. Whether a stream will execute in serial or parallel can be determined with the isParallel() method, and the orientation of a stream can be modified with the BaseStream.sequential() and BaseStream.parallel() operations. When the terminal operation is initiated, the stream pipeline is executed sequentially or in parallel depending on the mode of the stream on which it is invoked.

Except for operations identified as explicitly nondeterministic, such as findAny(), whether a stream executes sequentially or in parallel should not change the result of the computation.

Most stream operations accept parameters that describe user-specified behavior, which are often lambda expressions. To preserve correct behavior, these behavioral parameters must be non-interfering, and in most cases must be stateless. Such parameters are always instances of a functional interface such as Function, and are often lambda expressions or method references.

Non-interference

Streams enable you to execute possibly-parallel aggregate operations over a variety of data sources, including even non-thread-safe collections such as ArrayList. This is possible only if we can prevent interference with the data source during the execution of a stream pipeline. Except for the escape-hatch operations iterator() and spliterator(), execution begins when the terminal operation is invoked, and ends when the terminal operation completes. For most data sources, preventing interference means ensuring that the data source is not modified at all during the execution of the stream pipeline. The notable exception to this are streams whose sources are concurrent collections, which are specifically designed to handle concurrent modification. Concurrent stream sources are those whose Spliterator reports the CONCURRENT characteristic.

Accordingly, behavioral parameters in stream pipelines whose source might not be concurrent should never modify the stream's data source. A behavioral parameter is said to interfere with a non-concurrent data source if it modifies, or causes to be modified, the stream's data source. The need for non-interference applies to all pipelines, not just parallel ones. Unless the stream source is concurrent, modifying a stream's data source during execution of a stream pipeline can cause exceptions, incorrect answers, or nonconformant behavior. For well-behaved stream sources, the source can be modified before the terminal operation commences and those modifications will be reflected in the covered elements. For example, consider the following code:

     List<String> l = new ArrayList(Arrays.asList("one", "two"));
     Stream<String> sl = l.stream();
     l.add("three");
     String s = sl.collect(joining(" "));
First a list is created consisting of two strings: "one"; and "two". Then a stream is created from that list. Next the list is modified by adding a third string: "three". Finally the elements of the stream are collected and joined together. Since the list was modified before the terminal collect operation commenced the result will be a string of "one two three". All the streams returned from JDK collections, and most other JDK classes, are well-behaved in this manner; for streams generated by other libraries, see Low-level stream construction for requirements for building well-behaved streams.

Stateless behaviors

Stream pipeline results may be nondeterministic or incorrect if the behavioral parameters to the stream operations are stateful. A stateful lambda (or other object implementing the appropriate functional interface) is one whose result depends on any state which might change during the execution of the stream pipeline. An example of a stateful lambda is the parameter to map() in:

     Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
     stream.parallel().map(e -> { if (seen.add(e)) return 0; else return e; })...
Here, if the mapping operation is performed in parallel, the results for the same input could vary from run to run, due to thread scheduling differences, whereas, with a stateless lambda expression the results would always be the same.

Note also that attempting to access mutable state from behavioral parameters presents you with a bad choice with respect to safety and performance; if you do not synchronize access to that state, you have a data race and therefore your code is broken, but if you do synchronize access to that state, you risk having contention undermine the parallelism you are seeking to benefit from. The best approach is to avoid stateful behavioral parameters to stream operations entirely; there is usually a way to restructure the stream pipeline to avoid statefulness.

Side-effects

Side-effects in behavioral parameters to stream operations are, in general, discouraged, as they can often lead to unwitting violations of the statelessness requirement, as well as other thread-safety hazards.

If the behavioral parameters do have side-effects, unless explicitly stated, there are no guarantees as to the visibility of those side-effects to other threads, nor are there any guarantees that different operations on the "same" element within the same stream pipeline are executed in the same thread. Further, the ordering of those effects may be surprising. Even when a pipeline is constrained to produce a result that is consistent with the encounter order of the stream source (for example, IntStream.range(0,5).parallel().map(x -> x*2).toArray() must produce [0, 2, 4, 6, 8]), no guarantees are made as to the order in which the mapper function is applied to individual elements, or in what thread any behavioral parameter is executed for a given element.

Many computations where one might be tempted to use side effects can be more safely and efficiently expressed without side-effects, such as using reduction instead of mutable accumulators. However, side-effects such as using println() for debugging purposes are usually harmless. A small number of stream operations, such as forEach() and peek(), can operate only via side-effects; these should be used with care.

As an example of how to transform a stream pipeline that inappropriately uses side-effects to one that does not, the following code searches a stream of strings for those matching a given regular expression, and puts the matches in a list.

     ArrayList<String> results = new ArrayList<>();
     stream.filter(s -> pattern.matcher(s).matches())
           .forEach(s -> results.add(s));  // Unnecessary use of side-effects!
This code unnecessarily uses side-effects. If executed in parallel, the non-thread-safety of ArrayList would cause incorrect results, and adding needed synchronization would cause contention, undermining the benefit of parallelism. Furthermore, using side-effects here is completely unnecessary; the forEach() can simply be replaced with a reduction operation that is safer, more efficient, and more amenable to parallelization:

     List<String>results =
         stream.filter(s -> pattern.matcher(s).matches())
               .collect(Collectors.toList());  // No side-effects!

Ordering

Streams may or may not have a defined encounter order. Whether or not a stream has an encounter order depends on the source and the intermediate operations. Certain stream sources (such as List or arrays) are intrinsically ordered, whereas others (such as HashSet) are not. Some intermediate operations, such as sorted(), may impose an encounter order on an otherwise unordered stream, and others may render an ordered stream unordered, such as BaseStream.unordered(). Further, some terminal operations may ignore encounter order, such as forEach().

If a stream is ordered, most operations are constrained to operate on the elements in their encounter order; if the source of a stream is a List containing [1, 2, 3], then the result of executing map(x -> x*2) must be [2, 4, 6]. However, if the source has no defined encounter order, then any permutation of the values [2, 4, 6] would be a valid result.

For sequential streams, the presence or absence of an encounter order does not affect performance, only determinism. If a stream is ordered, repeated execution of identical stream pipelines on an identical source will produce an identical result; if it is not ordered, repeated execution might produce different results.

For parallel streams, relaxing the ordering constraint can sometimes enable more efficient execution. Certain aggregate operations, such as filtering duplicates (distinct()) or grouped reductions (Collectors.groupingBy()) can be implemented more efficiently if ordering of elements is not relevant. Similarly, operations that are intrinsically tied to encounter order, such as limit(), may require buffering to ensure proper ordering, undermining the benefit of parallelism. In cases where the stream has an encounter order, but the user does not particularly care about that encounter order, explicitly de-ordering the stream with unordered() may improve parallel performance for some stateful or terminal operations. However, most stream pipelines, such as the "sum of weight of blocks" example above, still parallelize efficiently even under ordering constraints.

Reduction operations

A reduction operation (also called a fold) takes a sequence of input elements and combines them into a single summary result by repeated application of a combining operation, such as finding the sum or maximum of a set of numbers, or accumulating elements into a list. The streams classes have multiple forms of general reduction operations, called reduce() and collect(), as well as multiple specialized reduction forms such as sum(), max(), or count().

Of course, such operations can be readily implemented as simple sequential loops, as in:

    int sum = 0;
    for (int x : numbers) {
       sum += x;
    }
However, there are good reasons to prefer a reduce operation over a mutative accumulation such as the above. Not only is a reduction "more abstract" -- it operates on the stream as a whole rather than individual elements -- but a properly constructed reduce operation is inherently parallelizable, so long as the function(s) used to process the elements are associative and stateless. For example, given a stream of numbers for which we want to find the sum, we can write:

    int sum = numbers.stream().reduce(0, (x,y) -> x+y);
or:

    int sum = numbers.stream().reduce(0, Integer::sum);

These reduction operations can run safely in parallel with almost no modification:

    int sum = numbers.parallelStream().reduce(0, Integer::sum);

Reduction parallellizes well because the implementation can operate on subsets of the data in parallel, and then combine the intermediate results to get the final correct answer. (Even if the language had a "parallel for-each" construct, the mutative accumulation approach would still required the developer to provide thread-safe updates to the shared accumulating variable sum, and the required synchronization would then likely eliminate any performance gain from parallelism.) Using reduce() instead removes all of the burden of parallelizing the reduction operation, and the library can provide an efficient parallel implementation with no additional synchronization required.

The "widgets" examples shown earlier shows how reduction combines with other operations to replace for loops with bulk operations. If widgets is a collection of Widget objects, which have a getWeight method, we can find the heaviest widget with:

     OptionalInt heaviest = widgets.parallelStream()
                                   .mapToInt(Widget::getWeight)
                                   .max();

In its more general form, a reduce operation on elements of type <T> yielding a result of type <U> requires three parameters:

 <U> U reduce(U identity,
              BiFunction<U, ? super T, U> accumulator,
              BinaryOperator<U> combiner);
Here, the identity element is both an initial seed value for the reduction and a default result if there are no input elements. The accumulator function takes a partial result and the next element, and produces a new partial result. The combiner function combines two partial results to produce a new partial result. (The combiner is necessary in parallel reductions, where the input is partitioned, a partial accumulation computed for each partition, and then the partial results are combined to produce a final result.)

More formally, the identity value must be an identity for the combiner function. This means that for all u, combiner.apply(identity, u) is equal to u. Additionally, the combiner function must be associative and must be compatible with the accumulator function: for all u and t, combiner.apply(u, accumulator.apply(identity, t)) must be equals() to accumulator.apply(u, t).

The three-argument form is a generalization of the two-argument form, incorporating a mapping step into the accumulation step. We could re-cast the simple sum-of-weights example using the more general form as follows:

     int sumOfWeights = widgets.stream()
                               .reduce(0,
                                       (sum, b) -> sum + b.getWeight())
                                       Integer::sum);
though the explicit map-reduce form is more readable and therefore should usually be preferred. The generalized form is provided for cases where significant work can be optimized away by combining mapping and reducing into a single function.

Mutable reduction

A mutable reduction operation accumulates input elements into a mutable result container, such as a Collection or StringBuilder, as it processes the elements in the stream.

If we wanted to take a stream of strings and concatenate them into a single long string, we could achieve this with ordinary reduction:

     String concatenated = strings.reduce("", String::concat)

We would get the desired result, and it would even work in parallel. However, we might not be happy about the performance! Such an implementation would do a great deal of string copying, and the run time would be O(n^2) in the number of characters. A more performant approach would be to accumulate the results into a StringBuilder, which is a mutable container for accumulating strings. We can use the same technique to parallelize mutable reduction as we do with ordinary reduction.

The mutable reduction operation is called collect(), as it collects together the desired results into a result container such as a Collection. A collect operation requires three functions: a supplier function to construct new instances of the result container, an accumulator function to incorporate an input element into a result container, and a combining function to merge the contents of one result container into another. The form of this is very similar to the general form of ordinary reduction:

 <R> R collect(Supplier<R> supplier,
               BiConsumer<R, ? super T> accumulator,
               BiConsumer<R, R> combiner);

As with reduce(), a benefit of expressing collect in this abstract way is that it is directly amenable to parallelization: we can accumulate partial results in parallel and then combine them, so long as the accumulation and combining functions satisfy the appropriate requirements. For example, to collect the String representations of the elements in a stream into an ArrayList, we could write the obvious sequential for-each form:

     ArrayList<String> strings = new ArrayList<>();
     for (T element : stream) {
         strings.add(element.toString());
     }
Or we could use a parallelizable collect form:

     ArrayList<String> strings = stream.collect(() -> new ArrayList<>(),
                                                (c, e) -> c.add(e.toString()),
                                                (c1, c2) -> c1.addAll(c2));
or, pulling the mapping operation out of the accumulator function, we could express it more succinctly as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);
Here, our supplier is just the ArrayList constructor, the accumulator adds the stringified element to an ArrayList, and the combiner simply uses addAll to copy the strings from one container into the other.

The three aspects of collect -- supplier, accumulator, and combiner -- are tightly coupled. We can use the abstraction of a Collector to capture all three aspects. The above example for collecting strings into a List can be rewritten using a standard Collector as:

     List<String> strings = stream.map(Object::toString)
                                  .collect(Collectors.toList());

Packaging mutable reductions into a Collector has another advantage: composability. The class Collectors contains a number of predefined factories for collectors, including combinators that transform one collector into another. For example, suppose we have a collector that computes the sum of the salaries of a stream of employees, as follows:

     Collector<Employee, ?, Integer> summingSalaries
         = Collectors.summingInt(Employee::getSalary);
(The ? for the second type parameter merely indicates that we don't care about the intermediate representation used by this collector.) If we wanted to create a collector to tabulate the sum of salaries by department, we could reuse summingSalaries using groupingBy:

     Map<Department, Integer> salariesByDept
         = employees.stream().collect(Collectors.groupingBy(Employee::getDepartment,
                                                            summingSalaries));

As with the regular reduction operation, collect() operations can only be parallelized if appropriate conditions are met. For any partially accumulated result, combining it with an empty result container must produce an equivalent result. That is, for a partially accumulated result p that is the result of any series of accumulator and combiner invocations, p must be equivalent to combiner.apply(p, supplier.get()).

Further, however the computation is split, it must produce an equivalent result. For any input elements t1 and t2, the results r1 and r2 in the computation below must be equivalent:

     A a1 = supplier.get();
     accumulator.accept(a1, t1);
     accumulator.accept(a1, t2);
     R r1 = finisher.apply(a1);  // result without splitting

     A a2 = supplier.get();
     accumulator.accept(a2, t1);
     A a3 = supplier.get();
     accumulator.accept(a3, t2);
     R r2 = finisher.apply(combiner.apply(a2, a3));  // result with splitting

Here, equivalence generally means according to Object.equals(Object). but in some cases equivalence may be relaxed to account for differences in order.

Reduction, concurrency, and ordering

With some complex reduction operations, for example a collect() that produces a Map, such as:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .collect(Collectors.groupingBy(Transaction::getBuyer));
it may actually be counterproductive to perform the operation in parallel. This is because the combining step (merging one Map into another by key) can be expensive for some Map implementations.

Suppose, however, that the result container used in this reduction was a concurrently modifiable collection -- such as a ConcurrentHashMap. In that case, the parallel invocations of the accumulator could actually deposit their results concurrently into the same shared result container, eliminating the need for the combiner to merge distinct result containers. This potentially provides a boost to the parallel execution performance. We call this a concurrent reduction.

A Collector that supports concurrent reduction is marked with the Collector.Characteristics.CONCURRENT characteristic. However, a concurrent collection also has a downside. If multiple threads are depositing results concurrently into a shared container, the order in which results are deposited is non-deterministic. Consequently, a concurrent reduction is only possible if ordering is not important for the stream being processed. The Stream.collect(Collector) implementation will only perform a concurrent reduction if

  • The stream is parallel;
  • The collector has the Collector.Characteristics.CONCURRENT characteristic, and;
  • Either the stream is unordered, or the collector has the Collector.Characteristics.UNORDERED characteristic.
You can ensure the stream is unordered by using the BaseStream.unordered() method. For example:

     Map<Buyer, List<Transaction>> salesByBuyer
         = txns.parallelStream()
               .unordered()
               .collect(groupingByConcurrent(Transaction::getBuyer));
(where Collectors.groupingByConcurrent(java.util.function.Function<? super T, ? extends K>) is the concurrent equivalent of groupingBy).

Note that if it is important that the elements for a given key appear in the order they appear in the source, then we cannot use a concurrent reduction, as ordering is one of the casualties of concurrent insertion. We would then be constrained to implement either a sequential reduction or a merge-based parallel reduction.

Associativity

An operator or function op is associative if the following holds:

     (a op b) op c == a op (b op c)
The importance of this to parallel evaluation can be seen if we expand this to four terms:

     a op b op c op d == (a op b) op (c op d)
So we can evaluate (a op b) in parallel with (c op d), and then invoke op on the results.

Examples of associative operations include numeric addition, min, and max, and string concatenation.

Low-level stream construction

So far, all the stream examples have used methods like Collection.stream() or Arrays.stream(Object[]) to obtain a stream. How are those stream-bearing methods implemented?

The class StreamSupport has a number of low-level methods for creating a stream, all using some form of a Spliterator. A spliterator is the parallel analogue of an Iterator; it describes a (possibly infinite) collection of elements, with support for sequentially advancing, bulk traversal, and splitting off some portion of the input into another spliterator which can be processed in parallel. At the lowest level, all streams are driven by a spliterator.

There are a number of implementation choices in implementing a spliterator, nearly all of which are tradeoffs between simplicity of implementation and runtime performance of streams using that spliterator. The simplest, but least performant, way to create a spliterator is to create one from an iterator using Spliterators.spliteratorUnknownSize(java.util.Iterator, int). While such a spliterator will work, it will likely offer poor parallel performance, since we have lost sizing information (how big is the underlying data set), as well as being constrained to a simplistic splitting algorithm.

A higher-quality spliterator will provide balanced and known-size splits, accurate sizing information, and a number of other characteristics of the spliterator or data that can be used by implementations to optimize execution.

Spliterators for mutable data sources have an additional challenge; timing of binding to the data, since the data could change between the time the spliterator is created and the time the stream pipeline is executed. Ideally, a spliterator for a stream would report a characteristic of IMMUTABLE or CONCURRENT; if not it should be late-binding. If a source cannot directly supply a recommended spliterator, it may indirectly supply a spliterator using a Supplier, and construct a stream via the Supplier-accepting versions of stream(). The spliterator is obtained from the supplier only after the terminal operation of the stream pipeline commences.

These requirements significantly reduce the scope of potential interference between mutations of the stream source and execution of stream pipelines. Streams based on spliterators with the desired characteristics, or those using the Supplier-based factory forms, are immune to modifications of the data source prior to commencement of the terminal operation (provided the behavioral parameters to the stream operations meet the required criteria for non-interference and statelessness). See Non-Interference for more details.

Since:
1.8
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.stream

Interfaces

  • BaseStream
  • Collector
  • DoubleStream
  • DoubleStream.Builder
  • IntStream
  • IntStream.Builder
  • LongStream
  • LongStream.Builder
  • Stream
  • Stream.Builder

Classes

  • Collectors
  • StreamSupport

Enums

  • Collector.Characteristics


compact1 - java.util.zip

Interfaces

  • Checksum

Classes

  • Adler32
  • CheckedInputStream
  • CheckedOutputStream
  • CRC32
  • Deflater
  • DeflaterInputStream
  • DeflaterOutputStream
  • GZIPInputStream
  • GZIPOutputStream
  • Inflater
  • InflaterInputStream
  • InflaterOutputStream
  • ZipEntry
  • ZipFile
  • ZipInputStream
  • ZipOutputStream

Exceptions

  • DataFormatException
  • ZipException

Errors

  • ZipError


zip

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package java.util.zip

Provides classes for reading and writing the standard ZIP and GZIP file formats.

See: Description

  • Interface Summary
    Interface Description
    Checksum
    An interface representing a data checksum.
  • Class Summary
    Class Description
    Adler32
    A class that can be used to compute the Adler-32 checksum of a data stream.
    CheckedInputStream
    An input stream that also maintains a checksum of the data being read.
    CheckedOutputStream
    An output stream that also maintains a checksum of the data being written.
    CRC32
    A class that can be used to compute the CRC-32 of a data stream.
    Deflater
    This class provides support for general purpose compression using the popular ZLIB compression library.
    DeflaterInputStream
    Implements an input stream filter for compressing data in the "deflate" compression format.
    DeflaterOutputStream
    This class implements an output stream filter for compressing data in the "deflate" compression format.
    GZIPInputStream
    This class implements a stream filter for reading compressed data in the GZIP file format.
    GZIPOutputStream
    This class implements a stream filter for writing compressed data in the GZIP file format.
    Inflater
    This class provides support for general purpose decompression using the popular ZLIB compression library.
    InflaterInputStream
    This class implements a stream filter for uncompressing data in the "deflate" compression format.
    InflaterOutputStream
    Implements an output stream filter for uncompressing data stored in the "deflate" compression format.
    ZipEntry
    This class is used to represent a ZIP file entry.
    ZipFile
    This class is used to read entries from a zip file.
    ZipInputStream
    This class implements an input stream filter for reading files in the ZIP file format.
    ZipOutputStream
    This class implements an output stream filter for writing files in the ZIP file format.
  • Exception Summary
    Exception Description
    DataFormatException
    Signals that a data format error has occurred.
    ZipException
    Signals that a Zip exception of some sort has occurred.
  • Error Summary
    Error Description
    ZipError
    Signals that an unrecoverable error has occurred.

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

  • Info-ZIP Application Note 970311 - a detailed description of the Info-ZIP format upon which the java.util.zip classes are based.

  • An implementation may optionally support the ZIP64(tm) format extensions defined by the PKWARE ZIP File Format Specification. The ZIP64(tm) format extensions are used to overcome the size limitations of the original ZIP format.

  • APPENDIX D of PKWARE ZIP File Format Specification - Language Encoding Flag (EFS) to encode ZIP entry filename and comment fields using UTF-8.

  • ZLIB Compressed Data Format Specification version 3.3 (pdf) (RFC 1950)

  • DEFLATE Compressed Data Format Specification version 1.3 (pdf) (RFC 1951)

  • GZIP file format specification version 4.3 (pdf) (RFC 1952)

  • CRC-32 checksum is described in RFC 1952 (above)

  • Adler-32 checksum is described in RFC 1950 (above)
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - java.util.zip

Interfaces

  • Checksum

Classes

  • Adler32
  • CheckedInputStream
  • CheckedOutputStream
  • CRC32
  • Deflater
  • DeflaterInputStream
  • DeflaterOutputStream
  • GZIPInputStream
  • GZIPOutputStream
  • Inflater
  • InflaterInputStream
  • InflaterOutputStream
  • ZipEntry
  • ZipFile
  • ZipInputStream
  • ZipOutputStream

Exceptions

  • DataFormatException
  • ZipException

Errors

  • ZipError


zip

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package java.util.zip

Provides classes for reading and writing the standard ZIP and GZIP file formats.

See: Description

  • Interface Summary
    Interface Description
    Checksum
    An interface representing a data checksum.
  • Class Summary
    Class Description
    Adler32
    A class that can be used to compute the Adler-32 checksum of a data stream.
    CheckedInputStream
    An input stream that also maintains a checksum of the data being read.
    CheckedOutputStream
    An output stream that also maintains a checksum of the data being written.
    CRC32
    A class that can be used to compute the CRC-32 of a data stream.
    Deflater
    This class provides support for general purpose compression using the popular ZLIB compression library.
    DeflaterInputStream
    Implements an input stream filter for compressing data in the "deflate" compression format.
    DeflaterOutputStream
    This class implements an output stream filter for compressing data in the "deflate" compression format.
    GZIPInputStream
    This class implements a stream filter for reading compressed data in the GZIP file format.
    GZIPOutputStream
    This class implements a stream filter for writing compressed data in the GZIP file format.
    Inflater
    This class provides support for general purpose decompression using the popular ZLIB compression library.
    InflaterInputStream
    This class implements a stream filter for uncompressing data in the "deflate" compression format.
    InflaterOutputStream
    Implements an output stream filter for uncompressing data stored in the "deflate" compression format.
    ZipEntry
    This class is used to represent a ZIP file entry.
    ZipFile
    This class is used to read entries from a zip file.
    ZipInputStream
    This class implements an input stream filter for reading files in the ZIP file format.
    ZipOutputStream
    This class implements an output stream filter for writing files in the ZIP file format.
  • Exception Summary
    Exception Description
    DataFormatException
    Signals that a data format error has occurred.
    ZipException
    Signals that a Zip exception of some sort has occurred.
  • Error Summary
    Error Description
    ZipError
    Signals that an unrecoverable error has occurred.

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

  • Info-ZIP Application Note 970311 - a detailed description of the Info-ZIP format upon which the java.util.zip classes are based.

  • An implementation may optionally support the ZIP64(tm) format extensions defined by the PKWARE ZIP File Format Specification. The ZIP64(tm) format extensions are used to overcome the size limitations of the original ZIP format.

  • APPENDIX D of PKWARE ZIP File Format Specification - Language Encoding Flag (EFS) to encode ZIP entry filename and comment fields using UTF-8.

  • ZLIB Compressed Data Format Specification version 3.3 (pdf) (RFC 1950)

  • DEFLATE Compressed Data Format Specification version 1.3 (pdf) (RFC 1951)

  • GZIP file format specification version 4.3 (pdf) (RFC 1952)

  • CRC-32 checksum is described in RFC 1952 (above)

  • Adler-32 checksum is described in RFC 1950 (above)
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - java.util.zip

Interfaces

  • Checksum

Classes

  • Adler32
  • CheckedInputStream
  • CheckedOutputStream
  • CRC32
  • Deflater
  • DeflaterInputStream
  • DeflaterOutputStream
  • GZIPInputStream
  • GZIPOutputStream
  • Inflater
  • InflaterInputStream
  • InflaterOutputStream
  • ZipEntry
  • ZipFile
  • ZipInputStream
  • ZipOutputStream

Exceptions

  • DataFormatException
  • ZipException

Errors

  • ZipError


zip

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package java.util.zip

Provides classes for reading and writing the standard ZIP and GZIP file formats.

See: Description

  • Interface Summary
    Interface Description
    Checksum
    An interface representing a data checksum.
  • Class Summary
    Class Description
    Adler32
    A class that can be used to compute the Adler-32 checksum of a data stream.
    CheckedInputStream
    An input stream that also maintains a checksum of the data being read.
    CheckedOutputStream
    An output stream that also maintains a checksum of the data being written.
    CRC32
    A class that can be used to compute the CRC-32 of a data stream.
    Deflater
    This class provides support for general purpose compression using the popular ZLIB compression library.
    DeflaterInputStream
    Implements an input stream filter for compressing data in the "deflate" compression format.
    DeflaterOutputStream
    This class implements an output stream filter for compressing data in the "deflate" compression format.
    GZIPInputStream
    This class implements a stream filter for reading compressed data in the GZIP file format.
    GZIPOutputStream
    This class implements a stream filter for writing compressed data in the GZIP file format.
    Inflater
    This class provides support for general purpose decompression using the popular ZLIB compression library.
    InflaterInputStream
    This class implements a stream filter for uncompressing data in the "deflate" compression format.
    InflaterOutputStream
    Implements an output stream filter for uncompressing data stored in the "deflate" compression format.
    ZipEntry
    This class is used to represent a ZIP file entry.
    ZipFile
    This class is used to read entries from a zip file.
    ZipInputStream
    This class implements an input stream filter for reading files in the ZIP file format.
    ZipOutputStream
    This class implements an output stream filter for writing files in the ZIP file format.
  • Exception Summary
    Exception Description
    DataFormatException
    Signals that a data format error has occurred.
    ZipException
    Signals that a Zip exception of some sort has occurred.
  • Error Summary
    Error Description
    ZipError
    Signals that an unrecoverable error has occurred.

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

  • Info-ZIP Application Note 970311 - a detailed description of the Info-ZIP format upon which the java.util.zip classes are based.

  • An implementation may optionally support the ZIP64(tm) format extensions defined by the PKWARE ZIP File Format Specification. The ZIP64(tm) format extensions are used to overcome the size limitations of the original ZIP format.

  • APPENDIX D of PKWARE ZIP File Format Specification - Language Encoding Flag (EFS) to encode ZIP entry filename and comment fields using UTF-8.

  • ZLIB Compressed Data Format Specification version 3.3 (pdf) (RFC 1950)

  • DEFLATE Compressed Data Format Specification version 1.3 (pdf) (RFC 1951)

  • GZIP file format specification version 4.3 (pdf) (RFC 1952)

  • CRC-32 checksum is described in RFC 1952 (above)

  • Adler-32 checksum is described in RFC 1950 (above)
Since:
JDK1.1
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


java.util.zip

Interfaces

  • Checksum

Classes

  • Adler32
  • CheckedInputStream
  • CheckedOutputStream
  • CRC32
  • Deflater
  • DeflaterInputStream
  • DeflaterOutputStream
  • GZIPInputStream
  • GZIPOutputStream
  • Inflater
  • InflaterInputStream
  • InflaterOutputStream
  • ZipEntry
  • ZipFile
  • ZipInputStream
  • ZipOutputStream

Exceptions

  • DataFormatException
  • ZipException

Errors

  • ZipError


javax.accessibility

Interfaces

  • Accessible
  • AccessibleAction
  • AccessibleComponent
  • AccessibleEditableText
  • AccessibleExtendedComponent
  • AccessibleExtendedTable
  • AccessibleExtendedText
  • AccessibleHypertext
  • AccessibleIcon
  • AccessibleKeyBinding
  • AccessibleSelection
  • AccessibleStreamable
  • AccessibleTable
  • AccessibleTableModelChange
  • AccessibleText
  • AccessibleValue

Classes

  • AccessibleAttributeSequence
  • AccessibleBundle
  • AccessibleContext
  • AccessibleHyperlink
  • AccessibleRelation
  • AccessibleRelationSet
  • AccessibleResourceBundle
  • AccessibleRole
  • AccessibleState
  • AccessibleStateSet
  • AccessibleTextSequence


javax.activation

Interfaces

  • CommandObject
  • DataContentHandler
  • DataContentHandlerFactory
  • DataSource

Classes

  • ActivationDataFlavor
  • CommandInfo
  • CommandMap
  • DataHandler
  • FileDataSource
  • FileTypeMap
  • MailcapCommandMap
  • MimeType
  • MimeTypeParameterList
  • MimetypesFileTypeMap
  • URLDataSource

Exceptions

  • MimeTypeParseException
  • UnsupportedDataTypeException


javax.activity

Exceptions

  • ActivityCompletedException
  • ActivityRequiredException
  • InvalidActivityException


javax.annotation

Enums

  • Resource.AuthenticationType

Annotation Types

  • Generated
  • PostConstruct
  • PreDestroy
  • Resource
  • Resources


compact3 - javax.annotation.processing

Interfaces

  • Completion
  • Filer
  • Messager
  • ProcessingEnvironment
  • Processor
  • RoundEnvironment

Classes

  • AbstractProcessor
  • Completions

Exceptions

  • FilerException

Annotation Types

  • SupportedAnnotationTypes
  • SupportedOptions
  • SupportedSourceVersion


processing

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.annotation.processing

Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.

See: Description

  • Interface Summary
    Interface Description
    Completion
    A suggested completion for an annotation.
    Filer
    This interface supports the creation of new files by an annotation processor.
    Messager
    A Messager provides the way for an annotation processor to report error messages, warnings, and other notices.
    ProcessingEnvironment
    An annotation processing tool framework will provide an annotation processor with an object implementing this interface so the processor can use facilities provided by the framework to write new files, report error messages, and find other utilities.
    Processor
    The interface for an annotation processor.
    RoundEnvironment
    An annotation processing tool framework will provide an annotation processor with an object implementing this interface so that the processor can query for information about a round of annotation processing.
  • Class Summary
    Class Description
    AbstractProcessor
    An abstract annotation processor designed to be a convenient superclass for most concrete annotation processors.
    Completions
    Utility class for assembling Completion objects.
  • Exception Summary
    Exception Description
    FilerException
    Indicates a Filer detected an attempt to open a file that would violate the guarantees provided by the Filer.
  • Annotation Types Summary
    Annotation Type Description
    SupportedAnnotationTypes
    An annotation used to indicate what annotation types an annotation processor supports.
    SupportedOptions
    An annotation used to indicate what options an annotation processor supports.
    SupportedSourceVersion
    An annotation used to indicate the latest source version an annotation processor supports.

Package javax.annotation.processing Description

Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.

Unless otherwise specified in a particular implementation, the collections returned by methods in this package should be expected to be unmodifiable by the caller and unsafe for concurrent access.

Unless otherwise specified, methods in this package will throw a NullPointerException if given a null argument.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.annotation.processing

Interfaces

  • Completion
  • Filer
  • Messager
  • ProcessingEnvironment
  • Processor
  • RoundEnvironment

Classes

  • AbstractProcessor
  • Completions

Exceptions

  • FilerException

Annotation Types

  • SupportedAnnotationTypes
  • SupportedOptions
  • SupportedSourceVersion


javax.crypto

Interfaces

  • SecretKey

Classes

  • Cipher
  • CipherInputStream
  • CipherOutputStream
  • CipherSpi
  • EncryptedPrivateKeyInfo
  • ExemptionMechanism
  • ExemptionMechanismSpi
  • KeyAgreement
  • KeyAgreementSpi
  • KeyGenerator
  • KeyGeneratorSpi
  • Mac
  • MacSpi
  • NullCipher
  • SealedObject
  • SecretKeyFactory
  • SecretKeyFactorySpi

Exceptions

  • AEADBadTagException
  • BadPaddingException
  • ExemptionMechanismException
  • IllegalBlockSizeException
  • NoSuchPaddingException
  • ShortBufferException


javax.crypto.interfaces

Interfaces

  • DHKey
  • DHPrivateKey
  • DHPublicKey
  • PBEKey


javax.crypto.spec

Classes

  • DESedeKeySpec
  • DESKeySpec
  • DHGenParameterSpec
  • DHParameterSpec
  • DHPrivateKeySpec
  • DHPublicKeySpec
  • GCMParameterSpec
  • IvParameterSpec
  • OAEPParameterSpec
  • PBEKeySpec
  • PBEParameterSpec
  • PSource
  • PSource.PSpecified
  • RC2ParameterSpec
  • RC5ParameterSpec
  • SecretKeySpec


javax.imageio

Interfaces

  • IIOParamController
  • ImageTranscoder

Classes

  • IIOImage
  • IIOParam
  • ImageIO
  • ImageReader
  • ImageReadParam
  • ImageTypeSpecifier
  • ImageWriteParam
  • ImageWriter

Exceptions

  • IIOException


javax.imageio.event

Interfaces

  • IIOReadProgressListener
  • IIOReadUpdateListener
  • IIOReadWarningListener
  • IIOWriteProgressListener
  • IIOWriteWarningListener


javax.imageio.metadata

Interfaces

  • IIOMetadataController
  • IIOMetadataFormat

Classes

  • IIOMetadata
  • IIOMetadataFormatImpl
  • IIOMetadataNode

Exceptions

  • IIOInvalidTreeException


javax.imageio.plugins.bmp

Classes

  • BMPImageWriteParam


javax.imageio.plugins.jpeg

Classes

  • JPEGHuffmanTable
  • JPEGImageReadParam
  • JPEGImageWriteParam
  • JPEGQTable


javax.imageio.spi

Interfaces

  • RegisterableService
  • ServiceRegistry.Filter

Classes

  • IIORegistry
  • IIOServiceProvider
  • ImageInputStreamSpi
  • ImageOutputStreamSpi
  • ImageReaderSpi
  • ImageReaderWriterSpi
  • ImageTranscoderSpi
  • ImageWriterSpi
  • ServiceRegistry


javax.imageio.stream

Interfaces

  • ImageInputStream
  • ImageOutputStream

Classes

  • FileCacheImageInputStream
  • FileCacheImageOutputStream
  • FileImageInputStream
  • FileImageOutputStream
  • IIOByteBuffer
  • ImageInputStreamImpl
  • ImageOutputStreamImpl
  • MemoryCacheImageInputStream
  • MemoryCacheImageOutputStream


javax.jws

Enums

  • WebParam.Mode

Annotation Types

  • HandlerChain
  • Oneway
  • WebMethod
  • WebParam
  • WebResult
  • WebService


javax.jws.soap

Enums

  • SOAPBinding.ParameterStyle
  • SOAPBinding.Style
  • SOAPBinding.Use

Annotation Types

  • InitParam
  • SOAPBinding
  • SOAPMessageHandler
  • SOAPMessageHandlers


compact3 - javax.lang.model

Interfaces

  • AnnotatedConstruct

Enums

  • SourceVersion

Exceptions

  • UnknownEntityException


model

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.lang.model

Classes and hierarchies of packages used to model the Java programming language.

See: Description

  • Interface Summary
    Interface Description
    AnnotatedConstruct
    Represents a construct that can be annotated.
  • Enum Summary
    Enum Description
    SourceVersion
    Source versions of the Java™ programming language.
  • Exception Summary
    Exception Description
    UnknownEntityException
    Superclass of exceptions which indicate that an unknown kind of entity was encountered.

Package javax.lang.model Description

Classes and hierarchies of packages used to model the Java programming language. The members of this package and its subpackages are for use in language modeling and language processing tasks and APIs including, but not limited to, the annotation processing framework.

This language model follows a mirror-based design; see

Gilad Bracha and David Ungar. Mirrors: Design Principles for Meta-level Facilities of Object-Oriented Programming Languages. In Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications, October 2004.
In particular, the model makes a distinction between static language constructs, like the element representing java.util.Set, and the family of types that may be associated with an element, like the raw type java.util.Set, java.util.Set<String>, and java.util.Set<T>.

Unless otherwise specified, methods in this package will throw a NullPointerException if given a null argument.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.lang.model

Interfaces

  • AnnotatedConstruct

Enums

  • SourceVersion

Exceptions

  • UnknownEntityException


compact3 - javax.lang.model.element

Interfaces

  • AnnotationMirror
  • AnnotationValue
  • AnnotationValueVisitor
  • Element
  • ElementVisitor
  • ExecutableElement
  • Name
  • PackageElement
  • Parameterizable
  • QualifiedNameable
  • TypeElement
  • TypeParameterElement
  • VariableElement

Enums

  • ElementKind
  • Modifier
  • NestingKind

Exceptions

  • UnknownAnnotationValueException
  • UnknownElementException


element

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.lang.model.element

Interfaces used to model elements of the Java programming language.

See: Description

  • Interface Summary
    Interface Description
    AnnotationMirror
    Represents an annotation.
    AnnotationValue
    Represents a value of an annotation type element.
    AnnotationValueVisitor<R,P>
    A visitor of the values of annotation type elements, using a variant of the visitor design pattern.
    Element
    Represents a program element such as a package, class, or method.
    ElementVisitor<R,P>
    A visitor of program elements, in the style of the visitor design pattern.
    ExecutableElement
    Represents a method, constructor, or initializer (static or instance) of a class or interface, including annotation type elements.
    Name
    An immutable sequence of characters.
    PackageElement
    Represents a package program element.
    Parameterizable
    A mixin interface for an element that has type parameters.
    QualifiedNameable
    A mixin interface for an element that has a qualified name.
    TypeElement
    Represents a class or interface program element.
    TypeParameterElement
    Represents a formal type parameter of a generic class, interface, method, or constructor element.
    VariableElement
    Represents a field, enum constant, method or constructor parameter, local variable, resource variable, or exception parameter.
  • Enum Summary
    Enum Description
    ElementKind
    The kind of an element.
    Modifier
    Represents a modifier on a program element such as a class, method, or field.
    NestingKind
    The nesting kind of a type element.
  • Exception Summary
    Exception Description
    UnknownAnnotationValueException
    Indicates that an unknown kind of annotation value was encountered.
    UnknownElementException
    Indicates that an unknown kind of element was encountered.

Package javax.lang.model.element Description

Interfaces used to model elements of the Java programming language. The term "element" in this package is used to refer to program elements, the declared entities that make up a program. Elements include classes, interfaces, methods, constructors, and fields. The interfaces in this package do not model the structure of a program inside a method body; for example there is no representation of a for loop or try-finally block. However, the interfaces can model some structures only appearing inside method bodies, such as local variables and anonymous classes.

When used in the context of annotation processing, an accurate model of the element being represented must be returned. As this is a language model, the source code provides the fiducial (reference) representation of the construct in question rather than a representation in an executable output like a class file. Executable output may serve as the basis for creating a modeling element. However, the process of translating source code to executable output may not permit recovering some aspects of the source code representation. For example, annotations with source retention cannot be recovered from class files and class files might not be able to provide source position information. Names of parameters may not be recoverable from class files. The modifiers on an element may differ in some cases including:

  • strictfp on a class or interface
  • final on a parameter
  • protected, private, and static on classes and interfaces
Additionally, synthetic constructs in a class file, such as accessor methods used in implementing nested classes and bridge methods used in implementing covariant returns, are translation artifacts outside of this model.

During annotation processing, operating on incomplete or erroneous programs is necessary; however, there are fewer guarantees about the nature of the resulting model. If the source code is not syntactically well-formed or has some other irrecoverable error that could not be removed by the generation of new types, a model may or may not be provided as a quality of implementation issue. If a program is syntactically valid but erroneous in some other fashion, any returned model must have no less information than if all the method bodies in the program were replaced by "throw new RuntimeException();". If a program refers to a missing type XYZ, the returned model must contain no less information than if the declaration of type XYZ were assumed to be "class XYZ {}", "interface XYZ {}", "enum XYZ {}", or "@interface XYZ {}". If a program refers to a missing type XYZ<K1, ... ,Kn>, the returned model must contain no less information than if the declaration of XYZ were assumed to be "class XYZ<T1, ... ,Tn> {}" or "interface XYZ<T1, ... ,Tn> {}"

Unless otherwise specified in a particular implementation, the collections returned by methods in this package should be expected to be unmodifiable by the caller and unsafe for concurrent access.

Unless otherwise specified, methods in this package will throw a NullPointerException if given a null argument.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.lang.model.element

Interfaces

  • AnnotationMirror
  • AnnotationValue
  • AnnotationValueVisitor
  • Element
  • ElementVisitor
  • ExecutableElement
  • Name
  • PackageElement
  • Parameterizable
  • QualifiedNameable
  • TypeElement
  • TypeParameterElement
  • VariableElement

Enums

  • ElementKind
  • Modifier
  • NestingKind

Exceptions

  • UnknownAnnotationValueException
  • UnknownElementException


compact3 - javax.lang.model.type

Interfaces

  • ArrayType
  • DeclaredType
  • ErrorType
  • ExecutableType
  • IntersectionType
  • NoType
  • NullType
  • PrimitiveType
  • ReferenceType
  • TypeMirror
  • TypeVariable
  • TypeVisitor
  • UnionType
  • WildcardType

Enums

  • TypeKind

Exceptions

  • MirroredTypeException
  • MirroredTypesException
  • UnknownTypeException


type

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.lang.model.type

Interfaces used to model Java programming language types.

See: Description

  • Interface Summary
    Interface Description
    ArrayType
    Represents an array type.
    DeclaredType
    Represents a declared type, either a class type or an interface type.
    ErrorType
    Represents a class or interface type that cannot be properly modeled.
    ExecutableType
    Represents the type of an executable.
    IntersectionType
    Represents an intersection type.
    NoType
    A pseudo-type used where no actual type is appropriate.
    NullType
    Represents the null type.
    PrimitiveType
    Represents a primitive type.
    ReferenceType
    Represents a reference type.
    TypeMirror
    Represents a type in the Java programming language.
    TypeVariable
    Represents a type variable.
    TypeVisitor<R,P>
    A visitor of types, in the style of the visitor design pattern.
    UnionType
    Represents a union type.
    WildcardType
    Represents a wildcard type argument.
  • Enum Summary
    Enum Description
    TypeKind
    The kind of a type mirror.
  • Exception Summary
    Exception Description
    MirroredTypeException
    Thrown when an application attempts to access the Class object corresponding to a TypeMirror.
    MirroredTypesException
    Thrown when an application attempts to access a sequence of Class objects each corresponding to a TypeMirror.
    UnknownTypeException
    Indicates that an unknown kind of type was encountered.

Package javax.lang.model.type Description

Interfaces used to model Java programming language types.

Unless otherwise specified in a particular implementation, the collections returned by methods in this package should be expected to be unmodifiable by the caller and unsafe for concurrent access.

Unless otherwise specified, methods in this package will throw a NullPointerException if given a null argument.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.lang.model.type

Interfaces

  • ArrayType
  • DeclaredType
  • ErrorType
  • ExecutableType
  • IntersectionType
  • NoType
  • NullType
  • PrimitiveType
  • ReferenceType
  • TypeMirror
  • TypeVariable
  • TypeVisitor
  • UnionType
  • WildcardType

Enums

  • TypeKind

Exceptions

  • MirroredTypeException
  • MirroredTypesException
  • UnknownTypeException


compact3 - javax.lang.model.util

Interfaces

  • Elements
  • Types

Classes

  • AbstractAnnotationValueVisitor6
  • AbstractAnnotationValueVisitor7
  • AbstractAnnotationValueVisitor8
  • AbstractElementVisitor6
  • AbstractElementVisitor7
  • AbstractElementVisitor8
  • AbstractTypeVisitor6
  • AbstractTypeVisitor7
  • AbstractTypeVisitor8
  • ElementFilter
  • ElementKindVisitor6
  • ElementKindVisitor7
  • ElementKindVisitor8
  • ElementScanner6
  • ElementScanner7
  • ElementScanner8
  • SimpleAnnotationValueVisitor6
  • SimpleAnnotationValueVisitor7
  • SimpleAnnotationValueVisitor8
  • SimpleElementVisitor6
  • SimpleElementVisitor7
  • SimpleElementVisitor8
  • SimpleTypeVisitor6
  • SimpleTypeVisitor7
  • SimpleTypeVisitor8
  • TypeKindVisitor6
  • TypeKindVisitor7
  • TypeKindVisitor8


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.lang.model.util

Utilities to assist in the processing of program elements and types.

See: Description

  • Interface Summary
    Interface Description
    Elements
    Utility methods for operating on program elements.
    Types
    Utility methods for operating on types.
  • Class Summary
    Class Description
    AbstractAnnotationValueVisitor6<R,P>
    A skeletal visitor for annotation values with default behavior appropriate for the RELEASE_6 source version.
    AbstractAnnotationValueVisitor7<R,P>
    A skeletal visitor for annotation values with default behavior appropriate for the RELEASE_7 source version.
    AbstractAnnotationValueVisitor8<R,P>
    A skeletal visitor for annotation values with default behavior appropriate for the RELEASE_8 source version.
    AbstractElementVisitor6<R,P>
    A skeletal visitor of program elements with default behavior appropriate for the RELEASE_6 source version.
    AbstractElementVisitor7<R,P>
    A skeletal visitor of program elements with default behavior appropriate for the RELEASE_7 source version.
    AbstractElementVisitor8<R,P>
    A skeletal visitor of program elements with default behavior appropriate for the RELEASE_8 source version.
    AbstractTypeVisitor6<R,P>
    A skeletal visitor of types with default behavior appropriate for the RELEASE_6 source version.
    AbstractTypeVisitor7<R,P>
    A skeletal visitor of types with default behavior appropriate for the RELEASE_7 source version.
    AbstractTypeVisitor8<R,P>
    A skeletal visitor of types with default behavior appropriate for the RELEASE_8 source version.
    ElementFilter
    Filters for selecting just the elements of interest from a collection of elements.
    ElementKindVisitor6<R,P>
    A visitor of program elements based on their kind with default behavior appropriate for the RELEASE_6 source version.
    ElementKindVisitor7<R,P>
    A visitor of program elements based on their kind with default behavior appropriate for the RELEASE_7 source version.
    ElementKindVisitor8<R,P>
    A visitor of program elements based on their kind with default behavior appropriate for the RELEASE_8 source version.
    ElementScanner6<R,P>
    A scanning visitor of program elements with default behavior appropriate for the RELEASE_6 source version.
    ElementScanner7<R,P>
    A scanning visitor of program elements with default behavior appropriate for the RELEASE_7 source version.
    ElementScanner8<R,P>
    A scanning visitor of program elements with default behavior appropriate for the RELEASE_8 source version.
    SimpleAnnotationValueVisitor6<R,P>
    A simple visitor for annotation values with default behavior appropriate for the RELEASE_6 source version.
    SimpleAnnotationValueVisitor7<R,P>
    A simple visitor for annotation values with default behavior appropriate for the RELEASE_7 source version.
    SimpleAnnotationValueVisitor8<R,P>
    A simple visitor for annotation values with default behavior appropriate for the RELEASE_8 source version.
    SimpleElementVisitor6<R,P>
    A simple visitor of program elements with default behavior appropriate for the RELEASE_6 source version.
    SimpleElementVisitor7<R,P>
    A simple visitor of program elements with default behavior appropriate for the RELEASE_7 source version.
    SimpleElementVisitor8<R,P>
    A simple visitor of program elements with default behavior appropriate for the RELEASE_8 source version.
    SimpleTypeVisitor6<R,P>
    A simple visitor of types with default behavior appropriate for the RELEASE_6 source version.
    SimpleTypeVisitor7<R,P>
    A simple visitor of types with default behavior appropriate for the RELEASE_7 source version.
    SimpleTypeVisitor8<R,P>
    A simple visitor of types with default behavior appropriate for the RELEASE_7 source version.
    TypeKindVisitor6<R,P>
    A visitor of types based on their kind with default behavior appropriate for the RELEASE_6 source version.
    TypeKindVisitor7<R,P>
    A visitor of types based on their kind with default behavior appropriate for the RELEASE_7 source version.
    TypeKindVisitor8<R,P>
    A visitor of types based on their kind with default behavior appropriate for the RELEASE_8 source version.

Package javax.lang.model.util Description

Utilities to assist in the processing of program elements and types.

Unless otherwise specified in a particular implementation, the collections returned by methods in this package should be expected to be unmodifiable by the caller and unsafe for concurrent access.

Unless otherwise specified, methods in this package will throw a NullPointerException if given a null argument.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.lang.model.util

Interfaces

  • Elements
  • Types

Classes

  • AbstractAnnotationValueVisitor6
  • AbstractAnnotationValueVisitor7
  • AbstractAnnotationValueVisitor8
  • AbstractElementVisitor6
  • AbstractElementVisitor7
  • AbstractElementVisitor8
  • AbstractTypeVisitor6
  • AbstractTypeVisitor7
  • AbstractTypeVisitor8
  • ElementFilter
  • ElementKindVisitor6
  • ElementKindVisitor7
  • ElementKindVisitor8
  • ElementScanner6
  • ElementScanner7
  • ElementScanner8
  • SimpleAnnotationValueVisitor6
  • SimpleAnnotationValueVisitor7
  • SimpleAnnotationValueVisitor8
  • SimpleElementVisitor6
  • SimpleElementVisitor7
  • SimpleElementVisitor8
  • SimpleTypeVisitor6
  • SimpleTypeVisitor7
  • SimpleTypeVisitor8
  • TypeKindVisitor6
  • TypeKindVisitor7
  • TypeKindVisitor8


compact3 - javax.management

Interfaces

  • Descriptor
  • DescriptorAccess
  • DescriptorRead
  • DynamicMBean
  • MBeanRegistration
  • MBeanServer
  • MBeanServerConnection
  • MBeanServerDelegateMBean
  • NotificationBroadcaster
  • NotificationEmitter
  • NotificationFilter
  • NotificationListener
  • PersistentMBean
  • QueryExp
  • ValueExp

Classes

  • Attribute
  • AttributeChangeNotification
  • AttributeChangeNotificationFilter
  • AttributeList
  • AttributeValueExp
  • DefaultLoaderRepository
  • ImmutableDescriptor
  • JMX
  • MBeanAttributeInfo
  • MBeanConstructorInfo
  • MBeanFeatureInfo
  • MBeanInfo
  • MBeanNotificationInfo
  • MBeanOperationInfo
  • MBeanParameterInfo
  • MBeanPermission
  • MBeanServerBuilder
  • MBeanServerDelegate
  • MBeanServerFactory
  • MBeanServerInvocationHandler
  • MBeanServerNotification
  • MBeanServerPermission
  • MBeanTrustPermission
  • Notification
  • NotificationBroadcasterSupport
  • NotificationFilterSupport
  • ObjectInstance
  • ObjectName
  • Query
  • QueryEval
  • StandardEmitterMBean
  • StandardMBean
  • StringValueExp

Exceptions

  • AttributeNotFoundException
  • BadAttributeValueExpException
  • BadBinaryOpValueExpException
  • BadStringOperationException
  • InstanceAlreadyExistsException
  • InstanceNotFoundException
  • IntrospectionException
  • InvalidApplicationException
  • InvalidAttributeValueException
  • JMException
  • JMRuntimeException
  • ListenerNotFoundException
  • MalformedObjectNameException
  • MBeanException
  • MBeanRegistrationException
  • NotCompliantMBeanException
  • OperationsException
  • ReflectionException
  • RuntimeErrorException
  • RuntimeMBeanException
  • RuntimeOperationsException
  • ServiceNotFoundException

Annotation Types

  • DescriptorKey
  • MXBean


management

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management

Provides the core classes for the Java Management Extensions.

See: Description

  • Interface Summary
    Interface Description
    Descriptor
    Additional metadata for a JMX element.
    DescriptorAccess
    This interface is used to gain access to descriptors of the Descriptor class which are associated with a JMX component, i.e.
    DescriptorRead
    Interface to read the Descriptor of a management interface element such as an MBeanInfo.
    DynamicMBean
    Defines the methods that should be implemented by a Dynamic MBean (MBean that exposes a dynamic management interface).
    MBeanRegistration
    Can be implemented by an MBean in order to carry out operations before and after being registered or unregistered from the MBean Server.
    MBeanServer
    This is the interface for MBean manipulation on the agent side.
    MBeanServerConnection
    This interface represents a way to talk to an MBean server, whether local or remote.
    MBeanServerDelegateMBean
    Defines the management interface of an object of class MBeanServerDelegate.
    NotificationBroadcaster
    Interface implemented by an MBean that emits Notifications.
    NotificationEmitter
    Interface implemented by an MBean that emits Notifications.
    NotificationFilter
    To be implemented by a any class acting as a notification filter.
    NotificationListener
    Should be implemented by an object that wants to receive notifications.
    PersistentMBean
    This class is the interface to be implemented by MBeans that are meant to be persistent.
    QueryExp
    Represents relational constraints similar to database query "where clauses".
    ValueExp
    Represents values that can be passed as arguments to relational expressions.
  • Class Summary
    Class Description
    Attribute
    Represents an MBean attribute by associating its name with its value.
    AttributeChangeNotification
    Provides definitions of the attribute change notifications sent by MBeans.
    AttributeChangeNotificationFilter
    This class implements of the NotificationFilter interface for the attribute change notification.
    AttributeList
    Represents a list of values for attributes of an MBean.
    AttributeValueExp
    Represents attributes used as arguments to relational constraints.
    DefaultLoaderRepository Deprecated
    Use MBeanServer.getClassLoaderRepository() instead.
    ImmutableDescriptor
    An immutable descriptor.
    JMX
    Static methods from the JMX API.
    MBeanAttributeInfo
    Describes an MBean attribute exposed for management.
    MBeanConstructorInfo
    Describes a constructor exposed by an MBean.
    MBeanFeatureInfo
    Provides general information for an MBean descriptor object.
    MBeanInfo
    Describes the management interface exposed by an MBean; that is, the set of attributes and operations which are available for management operations.
    MBeanNotificationInfo
    The MBeanNotificationInfo class is used to describe the characteristics of the different notification instances emitted by an MBean, for a given Java class of notification.
    MBeanOperationInfo
    Describes a management operation exposed by an MBean.
    MBeanParameterInfo
    Describes an argument of an operation exposed by an MBean.
    MBeanPermission
    Permission controlling access to MBeanServer operations.
    MBeanServerBuilder
    This class represents a builder that creates a default MBeanServer implementation.
    MBeanServerDelegate
    Represents the MBean server from the management point of view.
    MBeanServerFactory
    Provides MBean server references.
    MBeanServerInvocationHandler
    InvocationHandler that forwards methods in an MBean's management interface through the MBean server to the MBean.
    MBeanServerNotification
    Represents a notification emitted by the MBean Server through the MBeanServerDelegate MBean.
    MBeanServerPermission
    A Permission to perform actions related to MBeanServers.
    MBeanTrustPermission
    This permission represents "trust" in a signer or codebase.
    Notification
    The Notification class represents a notification emitted by an MBean.
    NotificationBroadcasterSupport
    Provides an implementation of NotificationEmitter interface.
    NotificationFilterSupport
    Provides an implementation of the NotificationFilter interface.
    ObjectInstance
    Used to represent the object name of an MBean and its class name.
    ObjectName
    Represents the object name of an MBean, or a pattern that can match the names of several MBeans.
    Query
    Constructs query object constraints.
    QueryEval
    Allows a query to be performed in the context of a specific MBean server.
    StandardEmitterMBean
    An MBean whose management interface is determined by reflection on a Java interface, and that emits notifications.
    StandardMBean
    An MBean whose management interface is determined by reflection on a Java interface.
    StringValueExp
    Represents strings that are arguments to relational constraints.
  • Exception Summary
    Exception Description
    AttributeNotFoundException
    The specified attribute does not exist or cannot be retrieved.
    BadAttributeValueExpException
    Thrown when an invalid MBean attribute is passed to a query constructing method.
    BadBinaryOpValueExpException
    Thrown when an invalid expression is passed to a method for constructing a query.
    BadStringOperationException
    Thrown when an invalid string operation is passed to a method for constructing a query.
    InstanceAlreadyExistsException
    The MBean is already registered in the repository.
    InstanceNotFoundException
    The specified MBean does not exist in the repository.
    IntrospectionException
    An exception occurred during the introspection of an MBean.
    InvalidApplicationException
    Thrown when an attempt is made to apply either of the following: A subquery expression to an MBean or a qualified attribute expression to an MBean of the wrong class.
    InvalidAttributeValueException
    The value specified is not valid for the attribute.
    JMException
    Exceptions thrown by JMX implementations.
    JMRuntimeException
    Runtime exceptions emitted by JMX implementations.
    ListenerNotFoundException
    The specified MBean listener does not exist in the repository.
    MalformedObjectNameException
    The format of the string does not correspond to a valid ObjectName.
    MBeanException
    Represents "user defined" exceptions thrown by MBean methods in the agent.
    MBeanRegistrationException
    Wraps exceptions thrown by the preRegister(), preDeregister() methods of the MBeanRegistration interface.
    NotCompliantMBeanException
    Exception which occurs when trying to register an object in the MBean server that is not a JMX compliant MBean.
    OperationsException
    Represents exceptions thrown in the MBean server when performing operations on MBeans.
    ReflectionException
    Represents exceptions thrown in the MBean server when using the java.lang.reflect classes to invoke methods on MBeans.
    RuntimeErrorException
    When a java.lang.Error occurs in the agent it should be caught and re-thrown as a RuntimeErrorException.
    RuntimeMBeanException
    Represents runtime exceptions thrown by MBean methods in the agent.
    RuntimeOperationsException
    Represents runtime exceptions thrown in the agent when performing operations on MBeans.
    ServiceNotFoundException
    Represents exceptions raised when a requested service is not supported.
  • Annotation Types Summary
    Annotation Type Description
    DescriptorKey
    Meta-annotation that describes how an annotation element relates to a field in a Descriptor.
    MXBean
    Annotation to mark an interface explicitly as being an MXBean interface, or as not being an MXBean interface.

Package javax.management Description

Provides the core classes for the Java Management Extensions.

The Java Management Extensions (JMXTM) API is a standard API for management and monitoring. Typical uses include:

  • consulting and changing application configuration
  • accumulating statistics about application behavior and making them available
  • notifying of state changes and erroneous conditions.

The JMX API can also be used as part of a solution for managing systems, networks, and so on.

The API includes remote access, so a remote management program can interact with a running application for these purposes.

MBeans

The fundamental notion of the JMX API is the MBean. An MBean is a named managed object representing a resource. It has a management interface which must be public and consist of:

  • named and typed attributes that can be read and/or written
  • named and typed operations that can be invoked
  • typed notifications that can be emitted by the MBean.

For example, an MBean representing an application's configuration could have attributes representing the different configuration items. Reading the CacheSize attribute would return the current value of that item. Writing it would update the item, potentially changing the behavior of the running application. An operation such as save could store the current configuration persistently. A notification such as ConfigurationChangedNotification could be sent every time the configuration is changed.

In the standard usage of the JMX API, MBeans are implemented as Java objects. However, as explained below, these objects are not usually referenced directly.

Standard MBeans

To make MBean implementation simple, the JMX API includes the notion of Standard MBeans. A Standard MBean is one whose attributes and operations are deduced from a Java interface using certain naming patterns, similar to those used by JavaBeansTM. For example, consider an interface like this:

    public interface ConfigurationMBean {
         public int getCacheSize();
         public void setCacheSize(int size);
         public long getLastChangedTime();
         public void save();
    }

The methods getCacheSize and setCacheSize define a read-write attribute of type int called CacheSize (with an initial capital, unlike the JavaBeans convention).

The method getLastChangedTime defines an attribute of type long called LastChangedTime. This is a read-only attribute, since there is no method setLastChangedTime.

The method save defines an operation called save. It is not an attribute, since its name does not begin with get, set, or is.

The exact naming patterns for Standard MBeans are detailed in the JMX Specification.

There are two ways to make a Java object that is an MBean with this management interface. One is for the object to be of a class that has exactly the same name as the Java interface but without the MBean suffix. So in the example the object would be of the class Configuration, in the same Java package as ConfigurationMBean. The second way is to use the StandardMBean class.

MXBeans

An MXBean is a variant of Standard MBean where complex types are mapped to a standard set of types defined in the javax.management.openmbean package. MXBeans are appropriate if you would otherwise need to reference application-specific classes in your MBean interface. They are described in detail in the specification for MXBean.

Dynamic MBeans

A Dynamic MBean is an MBean that defines its management interface at run-time. For example, a configuration MBean could determine the names and types of the attributes it exposes by parsing an XML file.

Any Java object of a class that implements the DynamicMBean interface is a Dynamic MBean.

Open MBeans

An Open MBean is a kind of Dynamic MBean where the types of attributes and of operation parameters and return values are built using a small set of predefined Java classes. Open MBeans facilitate operation with remote management programs that do not necessarily have access to application-specific types, including non-Java programs. Open MBeans are defined by the package javax.management.openmbean.

Model MBeans

A Model MBean is a kind of Dynamic MBean that acts as a bridge between the management interface and the underlying managed resource. Both the management interface and the managed resource are specified as Java objects. The same Model MBean implementation can be reused many times with different management interfaces and managed resources, and it can provide common functionality such as persistence and caching. Model MBeans are defined by the package javax.management.modelmbean.

MBean Server

To be useful, an MBean must be registered in an MBean Server. An MBean Server is a repository of MBeans. Usually the only access to the MBeans is through the MBean Server. In other words, code no longer accesses the Java object implementing the MBean directly, but instead accesses the MBean by name through the MBean Server. Each MBean has a unique name within the MBean Server, defined by the ObjectName class.

An MBean Server is an object implementing the interface MBeanServer. The most convenient MBean Server to use is the Platform MBean Server. This is a single MBean Server that can be shared by different managed components running within the same Java Virtual Machine. The Platform MBean Server is accessed with the method ManagementFactory.getPlatformMBeanServer().

Application code can also create a new MBean Server, or access already-created MBean Servers, using the MBeanServerFactory class.

Creating MBeans in the MBean Server

There are two ways to create an MBean. One is to construct a Java object that will be the MBean, then use the registerMBean method to register it in the MBean Server. The other is to create and register the MBean in a single operation using one of the createMBean methods.

The registerMBean method is simpler for local use, but cannot be used remotely. The createMBean method can be used remotely, but sometimes requires attention to class loading issues.

An MBean can perform actions when it is registered in or unregistered from an MBean Server if it implements the MBeanRegistration interface.

Accessing MBeans in the MBean Server

Given an ObjectName name and an MBeanServer mbs, you can access attributes and operations as in this example:

    int cacheSize = mbs.getAttribute(name, "CacheSize");
    Attribute newCacheSize =
         new Attribute("CacheSize", new Integer(2000));
    mbs.setAttribute(name, newCacheSize);
    mbs.invoke(name, "save", new Object[0], new Class[0]);

Alternatively, if you have a Java interface that corresponds to the management interface for the MBean, you can use an MBean proxy like this:

    ConfigurationMBean conf =
        JMX.newMBeanProxy(mbs, name, ConfigurationMBean.class);
    int cacheSize = conf.getCacheSize();
    conf.setCacheSize(2000);
    conf.save();

Using an MBean proxy is just a convenience. The second example ends up calling the same MBeanServer operations as the first one.

An MBean Server can be queried for MBeans whose names match certain patterns and/or whose attributes meet certain constraints. Name patterns are constructed using the ObjectName class and constraints are constructed using the Query class. The methods queryNames and queryMBeans then perform the query.

MBean lifecycle

An MBean can implement the MBeanRegistration interface in order to be told when it is registered and unregistered in the MBean Server. Additionally, the preRegister method allows the MBean to get a reference to the MBeanServer object and to get its ObjectName within the MBean Server.

Notifications

A notification is an instance of the Notification class or a subclass. In addition to its Java class, it has a type string that can distinguish it from other notifications of the same class.

An MBean that will emit notifications must implement the NotificationBroadcaster or NotificationEmitter interface. Usually, it does this by subclassing NotificationBroadcasterSupport or delegating to an instance of that class. Here is an example:

    public class Configuration extends NotificationBroadcasterSupport
            implements ConfigurationMBean {
        ...
        private void updated() {
            Notification n = new Notification(...);
            sendNotification(n);
        }
    }

Notifications can be received by a listener, which is an object that implements the NotificationListener interface. You can add a listener to an MBean with the method MBeanServer.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object). You can optionally supply a filter to this method, to select only notifications of interest. A filter is an object that implements the NotificationFilter interface.

An MBean can be a listener for notifications emitted by other MBeans in the same MBean Server. In this case, it implements NotificationListener and the method MBeanServer.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) is used to listen.

Remote Access to MBeans

An MBean Server can be accessed remotely through a connector. A connector allows a remote Java application to access an MBean Server in essentially the same way as a local one. The package javax.management.remote defines connectors.

The JMX specification also defines the notion of an adaptor. An adaptor translates between requests in a protocol such as SNMP or HTML and accesses to an MBean Server. So for example an SNMP GET operation might result in a getAttribute on the MBean Server.

Interoperability between versions of the JMX specification

When a client connects to a server using the JMX Remote API, it is possible that they do not have the same version of the JMX specification. The version of the JMX specification described here is version 1.4. Previous versions were 1.0, 1.1, and 1.2. (There was no 1.3.) The standard JMX Remote API is defined to work with version 1.2 onwards, so in standards-based deployment the only interoperability questions that arise concern version 1.2 onwards.

Every version of the JMX specification continues to implement the features of previous versions. So when the client is running an earlier version than the server, there should not be any interoperability concerns.

When the client is running a later version than the server, certain newer features may not be available, as detailed in the next sections. The client can determine the server's version by examining the SpecificationVersion attribute of the MBeanServerDelegate.

If the remote MBean Server is 1.2

  • You cannot use wildcards in a key property of an ObjectName, for example domain:type=Foo,name=*. Wildcards that match whole properties are still allowed, for example *:* or *:type=Foo,*.

  • You cannot use Query.isInstanceOf in a query.

  • You cannot use dot syntax such as HeapMemoryUsage.used in the observed attribute of a monitor, as described in the documentation for the javax.management.monitor package.

Since:
1.5
See Also:
Java Platform documentation on JMX technology in particular the JMX Specification, version 1.4(pdf).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management

Interfaces

  • Descriptor
  • DescriptorAccess
  • DescriptorRead
  • DynamicMBean
  • MBeanRegistration
  • MBeanServer
  • MBeanServerConnection
  • MBeanServerDelegateMBean
  • NotificationBroadcaster
  • NotificationEmitter
  • NotificationFilter
  • NotificationListener
  • PersistentMBean
  • QueryExp
  • ValueExp

Classes

  • Attribute
  • AttributeChangeNotification
  • AttributeChangeNotificationFilter
  • AttributeList
  • AttributeValueExp
  • DefaultLoaderRepository
  • ImmutableDescriptor
  • JMX
  • MBeanAttributeInfo
  • MBeanConstructorInfo
  • MBeanFeatureInfo
  • MBeanInfo
  • MBeanNotificationInfo
  • MBeanOperationInfo
  • MBeanParameterInfo
  • MBeanPermission
  • MBeanServerBuilder
  • MBeanServerDelegate
  • MBeanServerFactory
  • MBeanServerInvocationHandler
  • MBeanServerNotification
  • MBeanServerPermission
  • MBeanTrustPermission
  • Notification
  • NotificationBroadcasterSupport
  • NotificationFilterSupport
  • ObjectInstance
  • ObjectName
  • Query
  • QueryEval
  • StandardEmitterMBean
  • StandardMBean
  • StringValueExp

Exceptions

  • AttributeNotFoundException
  • BadAttributeValueExpException
  • BadBinaryOpValueExpException
  • BadStringOperationException
  • InstanceAlreadyExistsException
  • InstanceNotFoundException
  • IntrospectionException
  • InvalidApplicationException
  • InvalidAttributeValueException
  • JMException
  • JMRuntimeException
  • ListenerNotFoundException
  • MalformedObjectNameException
  • MBeanException
  • MBeanRegistrationException
  • NotCompliantMBeanException
  • OperationsException
  • ReflectionException
  • RuntimeErrorException
  • RuntimeMBeanException
  • RuntimeOperationsException
  • ServiceNotFoundException

Annotation Types

  • DescriptorKey
  • MXBean


compact3 - javax.management.loading

Interfaces

  • ClassLoaderRepository
  • MLetMBean
  • PrivateClassLoader

Classes

  • DefaultLoaderRepository
  • MLet
  • MLetContent
  • PrivateMLet


loading

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.loading

Provides the classes which implement advanced dynamic loading.

See: Description

  • Interface Summary
    Interface Description
    ClassLoaderRepository
    Instances of this interface are used to keep the list of ClassLoaders registered in an MBean Server.
    MLetMBean
    Exposes the remote management interface of the MLet MBean.
    PrivateClassLoader
    Marker interface indicating that a ClassLoader should not be added to the ClassLoaderRepository.
  • Class Summary
    Class Description
    DefaultLoaderRepository Deprecated
    Use MBeanServer.getClassLoaderRepository()} instead.
    MLet
    Allows you to instantiate and register one or several MBeans in the MBean server coming from a remote URL.
    MLetContent
    This class represents the contents of the MLET tag.
    PrivateMLet
    An MLet that is not added to the ClassLoaderRepository.

Package javax.management.loading Description

Provides the classes which implement advanced dynamic loading. See the chapter Advanced Dynamic Loading in the JMX Specification.

An MBean that is of a subclass of ClassLoader can be used as a class loader to create other MBeans via the method MBeanServer.createMBean(String, ObjectName, ObjectName, Object[], String[]), and to instantiate arbitrary objects via the method MBeanServer.instantiate(String, ObjectName, Object[], String[]). The MLet class is an example of such an MBean. It is a URLClassLoader, so the list of URLs to load classes from can be configured.

Additionally, an MLet can read a configuration file that specifies a set of MBeans to be registered in the same MBean Server as the MLet.

Every MBean Server has a class loader repository containing all MBeans registered in that MBean Server that are of a subclass of ClassLoader. The class loader repository is used by the forms of the createMBean and instantiate methods in the MBeanServer interface that do not have an explicit loader parameter. It is also used by the MLet class when it does not find a class in its own set of URLs.

If an MBean implements the interface PrivateClassLoader, then it is not added to the class loader repository. The class PrivateMLet is a subclass of MLet that implements PrivateClassLoader.

Since:
1.5
See Also:
Java Platform documentation on JMX technology, in particular the JMX Specification, version 1.4(pdf).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.loading

Interfaces

  • ClassLoaderRepository
  • MLetMBean
  • PrivateClassLoader

Classes

  • DefaultLoaderRepository
  • MLet
  • MLetContent
  • PrivateMLet


compact3 - javax.management.modelmbean

Interfaces

  • ModelMBean
  • ModelMBeanInfo
  • ModelMBeanNotificationBroadcaster

Classes

  • DescriptorSupport
  • ModelMBeanAttributeInfo
  • ModelMBeanConstructorInfo
  • ModelMBeanInfoSupport
  • ModelMBeanNotificationInfo
  • ModelMBeanOperationInfo
  • RequiredModelMBean

Exceptions

  • InvalidTargetObjectTypeException
  • XMLParseException


modelmbean

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.modelmbean

Provides the definition of the ModelMBean classes.

See: Description

  • Interface Summary
    Interface Description
    ModelMBean
    This interface must be implemented by the ModelMBeans.
    ModelMBeanInfo
    This interface is implemented by the ModelMBeanInfo for every ModelMBean.
    ModelMBeanNotificationBroadcaster
    This interface must be implemented by the ModelMBeans.
  • Class Summary
    Class Description
    DescriptorSupport
    This class represents the metadata set for a ModelMBean element.
    ModelMBeanAttributeInfo
    The ModelMBeanAttributeInfo object describes an attribute of the ModelMBean.
    ModelMBeanConstructorInfo
    The ModelMBeanConstructorInfo object describes a constructor of the ModelMBean.
    ModelMBeanInfoSupport
    This class represents the meta data for ModelMBeans.
    ModelMBeanNotificationInfo
    The ModelMBeanNotificationInfo object describes a notification emitted by a ModelMBean.
    ModelMBeanOperationInfo
    The ModelMBeanOperationInfo object describes a management operation of the ModelMBean.
    RequiredModelMBean
    This class is the implementation of a ModelMBean.
  • Exception Summary
    Exception Description
    InvalidTargetObjectTypeException
    Exception thrown when an invalid target object type is specified.
    XMLParseException
    This exception is thrown when an XML formatted string is being parsed into ModelMBean objects or when XML formatted strings are being created from ModelMBean objects.

Package javax.management.modelmbean Description

Provides the definition of the ModelMBean classes. A Model MBean is an MBean that acts as a bridge between the management interface and the underlying managed resource. Both the management interface and the managed resource are specified as Java objects. The same Model MBean implementation can be reused many times with different management interfaces and managed resources, and it can provide common functionality such as persistence and caching.

A Model MBean implements the ModelMBean interface. It is a DynamicMBean whose getMBeanInfo method returns an object implementing ModelMBeanInfo.

Every MBean has an MBeanInfo with information about the MBean itself, and its attributes, operations, constructors, and notifications. A Model MBean augments this MBeanInfo with Descriptors that encode additional information in the form of (key,value) pairs. Usually, Descriptors are instances of DescriptorSupport.

The class RequiredModelMBean provides a standard Model MBean implementation.

The following example shows a Model MBean being used to make the get method of a HashMap available for management through an MBean server. No other methods are available through the MBean server. There is nothing special about HashMap here. Public methods from any public class can be exposed for management in the same way.

import java.lang.reflect.Method;
import java.util.HashMap;
import javax.management.*;
import javax.management.modelmbean.*;

// ...

MBeanServer mbs = MBeanServerFactory.createMBeanServer();
// The MBean Server

HashMap map = new HashMap();
// The resource that will be managed

// Construct the management interface for the Model MBean
Method getMethod = HashMap.class.getMethod("get", new Class[] {Object.class});
ModelMBeanOperationInfo getInfo =
    new ModelMBeanOperationInfo("Get value for key", getMethod);
ModelMBeanInfo mmbi =
    new ModelMBeanInfoSupport(HashMap.class.getName(),
                              "Map of keys and values",
                              null,  // no attributes
                              null,  // no constructors
                              new ModelMBeanOperationInfo[] {getInfo},
                              null); // no notifications

// Make the Model MBean and link it to the resource
ModelMBean mmb = new RequiredModelMBean(mmbi);
mmb.setManagedResource(map, "ObjectReference");

// Register the Model MBean in the MBean Server
ObjectName mapName = new ObjectName(":type=Map,name=whatever");
mbs.registerMBean(mmb, mapName);

// Resource can evolve independently of the MBean
map.put("key", "value");

// Can access the "get" method through the MBean Server
mbs.invoke(mapName, "get", new Object[] {"key"}, new String[] {Object.class.getName()});
// returns "value"

Package Specification

  • See the JMX 1.4 Specification PDF document available from the Java Platform documentation on JMX technology
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.modelmbean

Interfaces

  • ModelMBean
  • ModelMBeanInfo
  • ModelMBeanNotificationBroadcaster

Classes

  • DescriptorSupport
  • ModelMBeanAttributeInfo
  • ModelMBeanConstructorInfo
  • ModelMBeanInfoSupport
  • ModelMBeanNotificationInfo
  • ModelMBeanOperationInfo
  • RequiredModelMBean

Exceptions

  • InvalidTargetObjectTypeException
  • XMLParseException


compact3 - javax.management.monitor

Interfaces

  • CounterMonitorMBean
  • GaugeMonitorMBean
  • MonitorMBean
  • StringMonitorMBean

Classes

  • CounterMonitor
  • GaugeMonitor
  • Monitor
  • MonitorNotification
  • StringMonitor

Exceptions

  • MonitorSettingException


monitor

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.monitor

Provides the definition of the monitor classes.

See: Description

  • Interface Summary
    Interface Description
    CounterMonitorMBean
    Exposes the remote management interface of the counter monitor MBean.
    GaugeMonitorMBean
    Exposes the remote management interface of the gauge monitor MBean.
    MonitorMBean
    Exposes the remote management interface of monitor MBeans.
    StringMonitorMBean
    Exposes the remote management interface of the string monitor MBean.
  • Class Summary
    Class Description
    CounterMonitor
    Defines a monitor MBean designed to observe the values of a counter attribute.
    GaugeMonitor
    Defines a monitor MBean designed to observe the values of a gauge attribute.
    Monitor
    Defines the part common to all monitor MBeans.
    MonitorNotification
    Provides definitions of the notifications sent by monitor MBeans.
    StringMonitor
    Defines a monitor MBean designed to observe the values of a string attribute.
  • Exception Summary
    Exception Description
    MonitorSettingException
    Exception thrown by the monitor when a monitor setting becomes invalid while the monitor is running.

Package javax.management.monitor Description

Provides the definition of the monitor classes. A Monitor is an MBean that periodically observes the value of an attribute in one or more other MBeans. If the attribute meets a certain condition, the Monitor emits a MonitorNotification. When the monitor MBean periodically calls getAttribute to retrieve the value of the attribute being monitored it does so within the access control context of the Monitor.start() caller.

The value being monitored can be a simple value contained within a complex type. For example, the MemoryMXBean defined in java.lang.management has an attribute HeapMemoryUsage of type MemoryUsage. To monitor the amount of used memory, described by the used property of MemoryUsage, you could monitor "HeapMemoryUsage.used". That string would be the argument to setObservedAttribute.

The rules used to interpret an ObservedAttribute like "HeapMemoryUsage.used" are as follows. Suppose the string is A.e (so A would be "HeapMemoryUsage" and e would be "used" in the example).

First the value of the attribute A is obtained. Call it v. A value x is extracted from v as follows:

  • If v is a CompositeData and if v.get(e) returns a value then x is that value.
  • If v is an array and e is the string "length" then x is the length of the array.
  • If the above rules do not produce a value, and if introspection, as if by calling Introspector.getBeanInfo, for the class of v (v.getClass()) identifies a property with the name e, then x is the result of reading the property value.

The third rule means for example that if the attribute HeapMemoryUsage is a MemoryUsage, monitoring "HeapMemoryUsage.used" will obtain the observed value by calling MemoryUsage.getUsed().

If the ObservedAttribute contains more than one period, for example "ConnectionPool.connectionStats.length", then the above rules are applied iteratively. Here, v would initially be the value of the attribute ConnectionPool, and x would be derived by applying the above rules with e equal to "connectionStats". Then v would be set to this x and a new x derived by applying the rules again with e equal to "length".

Although it is recommended that attribute names be valid Java identifiers, it is possible for an attribute to be called HeapMemoryUsage.used. This means that an ObservedAttribute that is HeapMemoryUsage.used could mean that the value to observe is either an attribute of that name, or the property used within an attribute called HeapMemoryUsage. So for compatibility reasons, when the ObservedAttribute contains a period (.), the monitor will check whether an attribute exists whose name is the full ObservedAttribute string (HeapMemoryUsage.used in the example). It does this by calling getMBeanInfo for the observed MBean and looking for a contained MBeanAttributeInfo with the given name. If one is found, then that is what is monitored. If more than one MBean is being observed, the behavior is unspecified if some of them have a HeapMemoryUsage.used attribute and others do not. An implementation may therefore call getMBeanInfo on just one of the MBeans in this case. The behavior is also unspecified if the result of the check changes while the monitor is active.

The exact behavior of monitors is detailed in the JMX Specification. What follows is a summary.

There are three kinds of Monitors:

  • A CounterMonitor observes attributes of integer type. The attributes are assumed to be non-negative, and monotonically increasing except for a possible roll-over at a specified modulus. Each observed attribute has an associated threshold value. A notification is sent when the attribute exceeds its threshold.

    An offset value can be specified. When an observed value exceeds its threshold, the threshold is incremented by the offset, or by a multiple of the offset sufficient to make the threshold greater than the new observed value.

    A CounterMonitor can operate in difference mode. In this mode, the value compared against the threshold is the difference between two successive observations of an attribute.

  • A GaugeMonitor observes attributes of numerical type. Each observed attribute has an associated high threshold and low threshold.

    When an observed attribute crosses the high threshold, if the notify high flag is true, then a notification is sent. Subsequent crossings of the high threshold value will not trigger further notifications until the gauge value becomes less than or equal to the low threshold.

    When an observed attribute crosses the low threshold, if the notify low flag is true, then a notification is sent. Subsequent crossings of the low threshold value will not trigger further notifications until the gauge value becomes greater than or equal to the high threshold.

    Typically, only one of the notify high and notify low flags is set. The other threshold is used to provide a hysteresis mechanism to avoid the repeated triggering of notifications when an attribute makes small oscillations around the threshold value.

    A GaugeMonitor can operate in difference mode. In this mode, the value compared against the high and low thresholds is the difference between two successive observations of an attribute.

  • A StringMonitor observes attributes of type String. A notification is sent when an observed attribute becomes equal and/or not equal to a given string.

Since:
1.5
See Also:
Java Platform documentation on JMX technology, in particular the JMX Specification, version 1.4(pdf).
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.monitor

Interfaces

  • CounterMonitorMBean
  • GaugeMonitorMBean
  • MonitorMBean
  • StringMonitorMBean

Classes

  • CounterMonitor
  • GaugeMonitor
  • Monitor
  • MonitorNotification
  • StringMonitor

Exceptions

  • MonitorSettingException


compact3 - javax.management.openmbean

Interfaces

  • CompositeData
  • CompositeDataView
  • OpenMBeanAttributeInfo
  • OpenMBeanConstructorInfo
  • OpenMBeanInfo
  • OpenMBeanOperationInfo
  • OpenMBeanParameterInfo
  • TabularData

Classes

  • ArrayType
  • CompositeDataInvocationHandler
  • CompositeDataSupport
  • CompositeType
  • OpenMBeanAttributeInfoSupport
  • OpenMBeanConstructorInfoSupport
  • OpenMBeanInfoSupport
  • OpenMBeanOperationInfoSupport
  • OpenMBeanParameterInfoSupport
  • OpenType
  • SimpleType
  • TabularDataSupport
  • TabularType

Exceptions

  • InvalidKeyException
  • InvalidOpenTypeException
  • KeyAlreadyExistsException
  • OpenDataException


openmbean

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.openmbean

Provides the open data types and Open MBean descriptor classes.

See: Description

  • Interface Summary
    Interface Description
    CompositeData
    The CompositeData interface specifies the behavior of a specific type of complex open data objects which represent composite data structures.
    CompositeDataView
    A Java class can implement this interface to indicate how it is to be converted into a CompositeData by the MXBean framework.
    OpenMBeanAttributeInfo
    Describes an attribute of an open MBean.
    OpenMBeanConstructorInfo
    Describes a constructor of an Open MBean.
    OpenMBeanInfo
    Describes an Open MBean: an Open MBean is recognized as such if its getMBeanInfo() method returns an instance of a class which implements the OpenMBeanInfo interface, typically OpenMBeanInfoSupport.
    OpenMBeanOperationInfo
    Describes an operation of an Open MBean.
    OpenMBeanParameterInfo
    Describes a parameter used in one or more operations or constructors of an open MBean.
    TabularData
    The TabularData interface specifies the behavior of a specific type of complex open data objects which represent tabular data structures.
  • Class Summary
    Class Description
    ArrayType<T>
    The ArrayType class is the open type class whose instances describe all open data values which are n-dimensional arrays of open data values.
    CompositeDataInvocationHandler
    An InvocationHandler that forwards getter methods to a CompositeData.
    CompositeDataSupport
    The CompositeDataSupport class is the open data class which implements the CompositeData interface.
    CompositeType
    The CompositeType class is the open type class whose instances describe the types of CompositeData values.
    OpenMBeanAttributeInfoSupport
    Describes an attribute of an open MBean.
    OpenMBeanConstructorInfoSupport
    Describes a constructor of an Open MBean.
    OpenMBeanInfoSupport
    The OpenMBeanInfoSupport class describes the management information of an open MBean: it is a subclass of MBeanInfo, and it implements the OpenMBeanInfo interface.
    OpenMBeanOperationInfoSupport
    Describes an operation of an Open MBean.
    OpenMBeanParameterInfoSupport
    Describes a parameter used in one or more operations or constructors of an open MBean.
    OpenType<T>
    The OpenType class is the parent abstract class of all classes which describe the actual open type of open data values.
    SimpleType<T>
    The SimpleType class is the open type class whose instances describe all open data values which are neither arrays, nor CompositeData values, nor TabularData values.
    TabularDataSupport
    The TabularDataSupport class is the open data class which implements the TabularData and the Map interfaces, and which is internally based on a hash map data structure.
    TabularType
    The TabularType class is the open type class whose instances describe the types of TabularData values.
  • Exception Summary
    Exception Description
    InvalidKeyException
    This runtime exception is thrown to indicate that a method parameter which was expected to be an item name of a composite data or a row index of a tabular data is not valid.
    InvalidOpenTypeException
    This runtime exception is thrown to indicate that the open type of an open data value is not the one expected.
    KeyAlreadyExistsException
    This runtime exception is thrown to indicate that the index of a row to be added to a tabular data instance is already used to refer to another row in this tabular data instance.
    OpenDataException
    This checked exception is thrown when an open type, an open data or an open MBean metadata info instance could not be constructed because one or more validity constraints were not met.

Package javax.management.openmbean Description

Provides the open data types and Open MBean descriptor classes. An Open MBean is an MBean where the types of attributes and of operation parameters and return values are built using a small set of predefined Java classes. Open MBeans facilitate operation with remote management programs that do not necessarily have access to application-specific types, including non-Java programs.

Every MBean has an MBeanInfo with information about the MBean itself, and its attributes, operations, constructors, and notifications. In an Open MBean, this MBeanInfo implements the OpenMBeanInfo interface, usually by being an instance of OpenMBeanInfoSupport.

The attribute information returned by MBeanInfo.getAttributes for an Open MBean is an array of objects implementing OpenMBeanAttributeInfo, usually instances of OpenMBeanAttributeInfoSupport. In addition to the usual information about attributes, an OpenMBeanAttributeInfo specifies the OpenType of the attribute. The possible OpenType values are predefined, which is what ensures that remote managers will understand them.

Similar remarks apply to the parameter types of operations and constructors, and to the return types of operations.

There is a distinction between an attribute's Java language type, as returned by getType(), and its OpenType, as returned by getOpenType(). For example, if the Java language type is java.lang.String, the OpenType will be SimpleType.String. If the Java language type is CompositeData, the OpenType will be a CompositeType that describes the items in the CompositeData instances for the attribute.

Default values and constraints

In Open MBeans, attributes and parameters can have default values and/or constraints associated with them in the OpenMBeanAttributeInfo or OpenMBeanParameterInfo. There are two ways to specify these constraints. Either the values are directly specified as parameters to one of the constructors of OpenMBeanAttributeInfoSupport or OpenMBeanParameterInfoSupport, for example OpenMBeanParameterInfoSupport.OpenMBeanParameterInfoSupport( String, String, OpenType, Object, Object[]); or the values are specified in a Descriptor given as a parameter to one of the constructors.

When a Descriptor is used, the fields of interest are these:

  • defaultValue defines the value returned by getDefaultValue();
  • minValue defines the value returned by getMinValue();
  • maxValue defines the value returned by getMaxValue();
  • legalValues defines the values returned by getLegalValues().

For defaultValue, minValue, and maxValue, the associated value must either be of the Java type corresponding to openType, or be a string that can be converted into that type. The conversion uses the static method valueOf(String) if it finds one; otherwise a constructor with a single String parameter if it finds one; otherwise it fails.

For legalValues, the associated value must be either an array or a Set, and the elements of the array or set must be convertible as described for defaultValue etc.

The following conditions must be met for these fields:

  • the values must be of the appropriate type, or be strings that can be converted to the appropriate type as explained above;
  • if legalValues is present then neither minValue nor maxValue must be present;
  • if defaultValue is present then it must satisfy the constraints defined by legalValues, minValue, or maxValue when any of these is also present;
  • if minValue and maxValue are both present then minValue must not be greater than maxValue.
Since:
1.5
See Also:
Java Platform documentation on JMX technology, in particular the JMX Specification, version 1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.openmbean

Interfaces

  • CompositeData
  • CompositeDataView
  • OpenMBeanAttributeInfo
  • OpenMBeanConstructorInfo
  • OpenMBeanInfo
  • OpenMBeanOperationInfo
  • OpenMBeanParameterInfo
  • TabularData

Classes

  • ArrayType
  • CompositeDataInvocationHandler
  • CompositeDataSupport
  • CompositeType
  • OpenMBeanAttributeInfoSupport
  • OpenMBeanConstructorInfoSupport
  • OpenMBeanInfoSupport
  • OpenMBeanOperationInfoSupport
  • OpenMBeanParameterInfoSupport
  • OpenType
  • SimpleType
  • TabularDataSupport
  • TabularType

Exceptions

  • InvalidKeyException
  • InvalidOpenTypeException
  • KeyAlreadyExistsException
  • OpenDataException


compact3 - javax.management.relation

Interfaces

  • Relation
  • RelationServiceMBean
  • RelationSupportMBean
  • RelationType

Classes

  • MBeanServerNotificationFilter
  • RelationNotification
  • RelationService
  • RelationSupport
  • RelationTypeSupport
  • Role
  • RoleInfo
  • RoleList
  • RoleResult
  • RoleStatus
  • RoleUnresolved
  • RoleUnresolvedList

Exceptions

  • InvalidRelationIdException
  • InvalidRelationServiceException
  • InvalidRelationTypeException
  • InvalidRoleInfoException
  • InvalidRoleValueException
  • RelationException
  • RelationNotFoundException
  • RelationServiceNotRegisteredException
  • RelationTypeNotFoundException
  • RoleInfoNotFoundException
  • RoleNotFoundException


relation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.relation

Provides the definition of the Relation Service.

See: Description

  • Interface Summary
    Interface Description
    Relation
    This interface has to be implemented by any MBean class expected to represent a relation managed using the Relation Service.
    RelationServiceMBean
    The Relation Service is in charge of creating and deleting relation types and relations, of handling the consistency and of providing query mechanisms.
    RelationSupportMBean
    A RelationSupport object is used internally by the Relation Service to represent simple relations (only roles, no properties or methods), with an unlimited number of roles, of any relation type.
    RelationType
    The RelationType interface has to be implemented by any class expected to represent a relation type.
  • Class Summary
    Class Description
    MBeanServerNotificationFilter
    Filter for MBeanServerNotification.
    RelationNotification
    A notification of a change in the Relation Service.
    RelationService
    The Relation Service is in charge of creating and deleting relation types and relations, of handling the consistency and of providing query mechanisms.
    RelationSupport
    A RelationSupport object is used internally by the Relation Service to represent simple relations (only roles, no properties or methods), with an unlimited number of roles, of any relation type.
    RelationTypeSupport
    A RelationTypeSupport object implements the RelationType interface.
    Role
    Represents a role: includes a role name and referenced MBeans (via their ObjectNames).
    RoleInfo
    A RoleInfo object summarises a role in a relation type.
    RoleList
    A RoleList represents a list of roles (Role objects).
    RoleResult
    Represents the result of a multiple access to several roles of a relation (either for reading or writing).
    RoleStatus
    This class describes the various problems which can be encountered when accessing a role.
    RoleUnresolved
    Represents an unresolved role: a role not retrieved from a relation due to a problem.
    RoleUnresolvedList
    A RoleUnresolvedList represents a list of RoleUnresolved objects, representing roles not retrieved from a relation due to a problem encountered when trying to access (read or write) the roles.
  • Exception Summary
    Exception Description
    InvalidRelationIdException
    This exception is raised when relation id provided for a relation is already used.
    InvalidRelationServiceException
    This exception is raised when an invalid Relation Service is provided.
    InvalidRelationTypeException
    Invalid relation type.
    InvalidRoleInfoException
    This exception is raised when, in a role info, its minimum degree is greater than its maximum degree.
    InvalidRoleValueException
    Role value is invalid.
    RelationException
    This class is the superclass of any exception which can be raised during relation management.
    RelationNotFoundException
    This exception is raised when there is no relation for a given relation id in a Relation Service.
    RelationServiceNotRegisteredException
    This exception is raised when an access is done to the Relation Service and that one is not registered.
    RelationTypeNotFoundException
    This exception is raised when there is no relation type with given name in Relation Service.
    RoleInfoNotFoundException
    This exception is raised when there is no role info with given name in a given relation type.
    RoleNotFoundException
    This exception is raised when a role in a relation does not exist, or is not readable, or is not settable.

Package javax.management.relation Description

Provides the definition of the Relation Service. The Relation Service is used to record relationships between MBeans in an MBean Server. The Relation Service is itself an MBean. More than one instance of a RelationService MBean can be registered in an MBean Server.

A relation type defines a relationship between MBeans. It contains roles that the MBeans play in the relationship. Usually there are at least two roles in a relation type.

A relation is a named instance of a relation type, where specific MBeans appear in the roles, represented by their ObjectNames.

For example, suppose there are Module MBeans, representing modules within an application. A DependsOn relation type could express the relationship that some modules depend on others, which could be used to determine the order in which the modules are started or stopped. The DependsOn relation type would have two roles, dependent and dependedOn.

Every role is typed, meaning that an MBean that appears in that role must be an instance of the role's type. In the DependsOn example, both roles would be of type Module.

Every role has a cardinality, which provides lower and upper bounds on the number of MBeans that can appear in that role in a given relation instance. Usually, the lower and upper bounds are both 1, with exactly one MBean appearing in the role. The cardinality only limits the number of MBeans in the role per relation instance. The same MBean can appear in the same role in any number of instances of a relation type. In the DependsOn example, a given module can depend on many other modules, and be depended on by many others, but any given relation instance links exactly one dependent module with exactly one dependedOn module.

A relation type can be created explicitly, as an object implementing the RelationType interface, typically a RelationTypeSupport. Alternatively, it can be created implicitly using the Relation Service's createRelationType method.

A relation instance can be created explicitly, as an object implementing the Relation interface, typically a RelationSupport. (A RelationSupport is itself a valid MBean, so it can be registered in the MBean Server, though this is not required.) Alternatively, a relation instance can be created implicitly using the Relation Service's createRelation method.

The DependsOn example might be coded as follows.

import java.util.*;
import javax.management.*;
import javax.management.relation.*;

// ...
MBeanServer mbs = ...;

// Create the Relation Service MBean
ObjectName relSvcName = new ObjectName(":type=RelationService");
RelationService relSvcObject = new RelationService(true);
mbs.registerMBean(relSvcObject, relSvcName);

// Create an MBean proxy for easier access to the Relation Service
RelationServiceMBean relSvc =
    MBeanServerInvocationHandler.newProxyInstance(mbs, relSvcName,
                                                  RelationServiceMBean.class,
                                                  false);

// Define the DependsOn relation type
RoleInfo[] dependsOnRoles = {
    new RoleInfo("dependent", Module.class.getName()),
    new RoleInfo("dependedOn", Module.class.getName())
};
relSvc.createRelationType("DependsOn", dependsOnRoles);

// Now define a relation instance "moduleA DependsOn moduleB"

ObjectName moduleA = new ObjectName(":type=Module,name=A");
ObjectName moduleB = new ObjectName(":type=Module,name=B");

Role dependent = new Role("dependent", Collections.singletonList(moduleA));
Role dependedOn = new Role("dependedOn", Collections.singletonList(moduleB));
Role[] roleArray = {dependent, dependedOn};
RoleList roles = new RoleList(Arrays.asList(roleArray));
relSvc.createRelation("A-DependsOn-B", "DependsOn", roles);

// Query the Relation Service to find what modules moduleA depends on
Map<ObjectName,List<String>> dependentAMap =
    relSvc.findAssociatedMBeans(moduleA, "DependsOn", "dependent");
Set<ObjectName> dependentASet = dependentAMap.keySet();
// Set of ObjectName containing moduleB
Since:
1.5
See Also:
Java Platform documentation on JMX technology, in particular the JMX Specification, version 1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.relation

Interfaces

  • Relation
  • RelationServiceMBean
  • RelationSupportMBean
  • RelationType

Classes

  • MBeanServerNotificationFilter
  • RelationNotification
  • RelationService
  • RelationSupport
  • RelationTypeSupport
  • Role
  • RoleInfo
  • RoleList
  • RoleResult
  • RoleStatus
  • RoleUnresolved
  • RoleUnresolvedList

Exceptions

  • InvalidRelationIdException
  • InvalidRelationServiceException
  • InvalidRelationTypeException
  • InvalidRoleInfoException
  • InvalidRoleValueException
  • RelationException
  • RelationNotFoundException
  • RelationServiceNotRegisteredException
  • RelationTypeNotFoundException
  • RoleInfoNotFoundException
  • RoleNotFoundException


compact3 - javax.management.remote

Interfaces

  • JMXAddressable
  • JMXAuthenticator
  • JMXConnector
  • JMXConnectorProvider
  • JMXConnectorServerMBean
  • JMXConnectorServerProvider
  • MBeanServerForwarder

Classes

  • JMXConnectionNotification
  • JMXConnectorFactory
  • JMXConnectorServer
  • JMXConnectorServerFactory
  • JMXPrincipal
  • JMXServiceURL
  • NotificationResult
  • SubjectDelegationPermission
  • TargetedNotification

Exceptions

  • JMXProviderException
  • JMXServerErrorException


remote

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.remote

Interfaces for remote access to JMX MBean servers.

See: Description

  • Interface Summary
    Interface Description
    JMXAddressable
    Implemented by objects that can have a JMXServiceURL address.
    JMXAuthenticator
    Interface to define how remote credentials are converted into a JAAS Subject.
    JMXConnector
    The client end of a JMX API connector.
    JMXConnectorProvider
    A provider for creating JMX API connector clients using a given protocol.
    JMXConnectorServerMBean
    MBean interface for connector servers.
    JMXConnectorServerProvider
    A provider for creating JMX API connector servers using a given protocol.
    MBeanServerForwarder
    An object of this class implements the MBeanServer interface and wraps another object that also implements that interface.
  • Class Summary
    Class Description
    JMXConnectionNotification
    Notification emitted when a client connection is opened or closed or when notifications are lost.
    JMXConnectorFactory
    Factory to create JMX API connector clients.
    JMXConnectorServer
    Superclass of every connector server.
    JMXConnectorServerFactory
    Factory to create JMX API connector servers.
    JMXPrincipal
    The identity of a remote client of the JMX Remote API.
    JMXServiceURL
    The address of a JMX API connector server.
    NotificationResult
    Result of a query for buffered notifications.
    SubjectDelegationPermission
    Permission required by an authentication identity to perform operations on behalf of an authorization identity.
    TargetedNotification
    A (Notification, Listener ID) pair.
  • Exception Summary
    Exception Description
    JMXProviderException
    Exception thrown by JMXConnectorFactory and JMXConnectorServerFactory when a provider exists for the required protocol but cannot be used for some reason.
    JMXServerErrorException
    Exception thrown as the result of a remote MBeanServer method invocation when an Error is thrown while processing the invocation in the remote MBean server.

Package javax.management.remote Description

Interfaces for remote access to JMX MBean servers. This package defines the essential interfaces for making a JMX MBean server manageable remotely. The specification of this functionality is completed by Part III of the JMX Specification, version 1.4 PDF document.

The JMX specification defines the notion of connectors. A connector is attached to a JMX API MBean server and makes it accessible to remote Java clients. The client end of a connector exports essentially the same interface as the MBean server, specifically the MBeanServerConnection interface.

A connector makes an MBean server remotely accessible through a given protocol. The JMX Remote API allows the use of different type of connectors:

  • The JMX Remote API defines a standard connector, the RMI Connector, which provides remote access to an MBeanServer through RMI.
  • The JMX Remote API also defines an optional connector called JMXMP Connector implementing the JMX Message Protocol (JMXMP). As it is optional, it is not part of this bundle (see note below).
  • User-defined connector protocols are also possible using the JMXConnectorFactory and, optionally, the Generic Connector (not part of this bundle, see note below).

Note: the optional packages implementing the optional part of the JMX Remote API are not included in the Java SE Platform but are available from the JMX Remote API Reference Implementation.

Connector addresses

Typically, a connector server has an address, represented by the class JMXServiceURL. An address for the RMI Connector can look like this:

      service:jmx:rmi:///jndi/rmi://myhost:1099/myname

In this JMXServiceURL, the first rmi: specifies the RMI connector, while the second rmi: specifies the RMI registry into which the RMI connector server has stored its stub.

The example above shows only one form of address. An address for the RMI Connector can take several forms, as detailed in the documentation for the package javax.management.remote.rmi.

Creating a connector server

A connector server is created by constructing an instance of a subclass of JMXConnectorServer. Usually, this instance is created using the method JMXConnectorServerFactory.newJMXConnectorServer.

Typically, a connector server is associated with an MBean server either by registering it in that MBean server, or by supplying the MBean server as a parameter when creating the connector server.

Creating a connector client

A connector client is usually created by supplying the JMXServiceURL of the connector server to connect to to the JMXConnectorFactory.connect method.

For more specialized uses, a connector client can be created by directly instantiating a class that implements the JMXConnector interface, for example the class RMIConnector.

Additional client or server parameters

When creating a connector client or server, it is possible to supply an object of type Map that defines additional parameters. Each entry in this Map has a key that is a string and an associated value whose type is appropriate for that key. The standard keys defined by the JMX Remote API all begin with the string "jmx.remote.". The document JMX Remote API lists these standard keys.

Connection identifiers

Every connection opened by a connector server has a string identifier, called its connection id. This identifier appears in the JMXConnectionNotification events emitted by the connector server, in the list returned by getConnectionIds(), and in the value returned by the client's getConnectionId() method.

As an example, a connection ID can look something like this:

rmi://192.18.1.9 username 1

The formal grammar for connection ids that follow this convention is as follows (using the grammar notation from section 2.4 of The Java™ Language Specification):

ConnectionId:
    Protocol : ClientAddressopt Space ClientIdopt Space ArbitraryText

ClientAddress:
    // HostAddress ClientPortopt

ClientPort
    : HostPort

The Protocol is a protocol that would be recognized by JMXConnectorFactory.

The ClientAddress is the address and port of the connecting client, if these can be determined, otherwise nothing. The HostAddress is the Internet address of the host that the client is connecting from, in numeric or DNS form. Numeric IPv6 addresses are enclosed in square brackets []. The HostPort is the decimal port number that the client is connecting from.

The ClientId is the identity of the client entity, typically a string returned by JMXPrincipal.getName(). This string must not contain spaces.

The ArbitraryText is any additional text that the connector server adds when creating the client id. At a minimum, it must be enough to distinguish this connection ID from the ID of any other connection currently opened by this connector server.

Since:
1.5
See Also:
Java Platform documentation on JMX technology, in particular the JMX Specification, version 1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.remote

Interfaces

  • JMXAddressable
  • JMXAuthenticator
  • JMXConnector
  • JMXConnectorProvider
  • JMXConnectorServerMBean
  • JMXConnectorServerProvider
  • MBeanServerForwarder

Classes

  • JMXConnectionNotification
  • JMXConnectorFactory
  • JMXConnectorServer
  • JMXConnectorServerFactory
  • JMXPrincipal
  • JMXServiceURL
  • NotificationResult
  • SubjectDelegationPermission
  • TargetedNotification

Exceptions

  • JMXProviderException
  • JMXServerErrorException


compact3 - javax.management.remote.rmi

Interfaces

  • RMIConnection
  • RMIServer

Classes

  • RMIConnectionImpl
  • RMIConnectionImpl_Stub
  • RMIConnector
  • RMIConnectorServer
  • RMIIIOPServerImpl
  • RMIJRMPServerImpl
  • RMIServerImpl
  • RMIServerImpl_Stub


rmi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.remote.rmi

The RMI connector is a connector for the JMX Remote API that uses RMI to transmit client requests to a remote MBean server.

See: Description

  • Interface Summary
    Interface Description
    RMIConnection
    RMI object used to forward an MBeanServer request from a client to its MBeanServer implementation on the server side.
    RMIServer
    RMI object used to establish connections to an RMI connector.
  • Class Summary
    Class Description
    RMIConnectionImpl
    Implementation of the RMIConnection interface.
    RMIConnectionImpl_Stub
    RMIConnector
    A connection to a remote RMI connector.
    RMIConnectorServer
    A JMX API connector server that creates RMI-based connections from remote clients.
    RMIIIOPServerImpl
    An RMIServerImpl that is exported through IIOP and that creates client connections as RMI objects exported through IIOP.
    RMIJRMPServerImpl
    An RMIServer object that is exported through JRMP and that creates client connections as RMI objects exported through JRMP.
    RMIServerImpl
    An RMI object representing a connector server.
    RMIServerImpl_Stub

Package javax.management.remote.rmi Description

The RMI connector is a connector for the JMX Remote API that uses RMI to transmit client requests to a remote MBean server. This package defines the classes that the user of an RMI connector needs to reference directly, for both the client and server sides. It also defines certain classes that the user will not usually reference directly, but that must be defined so that different implementations of the RMI connector can interoperate.

The RMI connector supports the JRMP transport for RMI, and optionally the IIOP transport.

Like most connectors in the JMX Remote API, an RMI connector usually has an address, which is a JMXServiceURL. The protocol part of this address is rmi for a connector that uses the default RMI transport (JRMP), or iiop for a connector that uses RMI/IIOP.

There are two forms for RMI connector addresses:

  • In the JNDI form, the URL indicates where to find an RMI stub for the connector. This RMI stub is a Java object of type RMIServer that gives remote access to the connector server. With this address form, the RMI stub is obtained from an external directory entry included in the URL. An external directory is any directory recognized by JNDI, typically the RMI registry, LDAP, or COS Naming.
  • In the encoded form, the URL directly includes the information needed to connect to the connector server. When using RMI/JRMP, the encoded form is the serialized RMI stub for the server object, encoded using BASE64 without embedded newlines. When using RMI/IIOP, the encoded form is the CORBA IOR for the server object.

Addresses are covered in more detail below.

Creating an RMI connector server

The usual way to create an RMI connector server is to supply an RMI connector address to the method JMXConnectorServerFactory.newJMXConnectorServer. The MBean server to which the connector server is attached can be specified as a parameter to that method. Alternatively, the connector server can be registered as an MBean in that MBean server.

An RMI connector server can also be created by constructing an instance of RMIConnectorServer, explicitly or through the MBean server's createMBean method.

Choosing the RMI transport

You can choose the RMI transport (JRMP or IIOP) by specifying rmi or iiop in the protocol part of the serviceURL when creating the connector server. You can also create specialized connector servers by instantiating an appropriate subclass of RMIServerImpl and supplying it to the RMIConnectorServer constructor.

Connector addresses generated by the server

If the serviceURL you specify has an empty URL path (after the optional host and port), or if you do not specify a serviceURL, then the connector server will fabricate a new JMXServiceURL that clients can use to connect:

  • If the serviceURL looks like:

            service:jmx:rmi://host:port

    then the connector server will generate an RMIJRMPServerImpl and the returned JMXServiceURL looks like:

            service:jmx:rmi://host:port/stub/XXXX

    where XXXX is the serialized form of the stub for the generated object, encoded in BASE64 without newlines.

  • If the serviceURL looks like:

            service:jmx:iiop://host:port

    then the connector server will generate an RMIIIOPServerImpl and the returned JMXServiceURL looks like:

            service:jmx:iiop://host:port/ior/IOR:XXXX

    where IOR:XXXX is the standard CORBA encoding of the Interoperable Object Reference for the generated object.

  • If there is no serviceURL, there must be a user-provided RMIServerImpl. If the toStub method on this object returns an instance of Stub, then the connector server will generate a JMXServiceURL using the iiop form above. Otherwise, it will generate a JMXServiceURL using the rmi form.

The host in a user-provided serviceURL is optional. If present, it is copied into the generated JMXServiceURL but otherwise ignored. If absent, the generated JXMServiceURL will have the local host name.

The port in a user-provided serviceURL is also optional. If present, it is also copied into the generated JMXServiceURL; otherwise, the generated JMXServiceURL has no port. For an serviceURL using the rmi protocol, the port, if present, indicates what port the generated remote object should be exported on. It has no other effect.

If the user provides an RMIServerImpl rather than a JMXServiceURL, then the generated JMXServiceURL will have the local host name in its host part and no port.

Connector addresses based on directory entries

As an alternative to the generated addresses just described, the serviceURL address supplied when creating a connector server can specify a directory address in which to store the provided or generated RMIServer stub. This directory address is then used by both client and server.

In this case, the serviceURL has one of these two forms:

    service:jmx:rmi://host:port/jndi/jndi-name
    service:jmx:iiop://host:port/jndi/jndi-name

Here, jndi-name is a string that can be supplied to javax.naming.InitialContext.bind.

As usual, the host and :port can be omitted.

The connector server will generate an RMIServerImpl based on the protocol (rmi or iiop) and, for rmi, the port if any. When the connector server is started, it will derive a stub from this object using its toStub method and store the object using the given jndi-name. The properties defined by the JNDI API are consulted as usual.

For example, if the JMXServiceURL is:

      service:jmx:rmi://ignoredhost/jndi/rmi://myhost/myname
then the connector server will generate an RMIJRMPServerImpl and store its stub using the JNDI name
      rmi://myhost/myname
which means entry myname in the RMI registry running on the default port of host myhost. Note that the RMI registry only allows registration from the local host. So, in this case, myhost must be the name (or a name) of the host that the connector server is running on.

In this JMXServiceURL, the first rmi: specifies the RMI connector, while the second rmi: specifies the RMI registry.

As another example, if the JMXServiceURL is:

      service:jmx:iiop://ignoredhost/jndi/ldap://dirhost:9999/cn=this,ou=that
then the connector server will generate an RMIIIOPServerImpl and store its stub using the JNDI name
      ldap://dirhost:9999/cn=this,ou=that
which means entry cn=this,ou=that in the LDAP directory running on port 9999 of host dirhost.

If the JMXServiceURL is:

      service:jmx:iiop://ignoredhost/jndi/cn=this,ou=that
then the connector server will generate an RMIIIOPServerImpl and store its stub using the JNDI name
      cn=this,ou=that
For this case to work, the JNDI API must have been configured appropriately to supply the information about what directory to use.

In these examples, the host name ignoredhost is not used by the connector server or its clients. It can be omitted, for example:

      service:jmx:iiop:///jndi/cn=this,ou=that

However, it is good practice to use the name of the host where the connector server is running. This is often different from the name of the directory host.

Connector server attributes

When using the default JRMP transport, RMI socket factories can be specified using the attributes jmx.remote.rmi.client.socket.factory and jmx.remote.rmi.server.socket.factory in the environment given to the RMIConnectorServer constructor. The values of these attributes must be of type RMIClientSocketFactory and RMIServerSocketFactory, respectively. These factories are used when creating the RMI objects associated with the connector.

Creating an RMI connector client

An RMI connector client is usually constructed using JMXConnectorFactory, with a JMXServiceURL that has rmi or iiop as its protocol.

If the JMXServiceURL was generated by the server, as described above under "connector addresses generated by the server", then the client will need to obtain it directly or indirectly from the server. Typically, the server makes the JMXServiceURL available by storing it in a file or a lookup service.

If the JMXServiceURL uses the directory syntax, as described above under "connector addresses based on directory entries", then the client may obtain it as just explained, or client and server may both know the appropriate directory entry to use. For example, if the connector server for the Whatsit agent uses the entry whatsit-agent-connector in the RMI registry on host myhost, then client and server can both know that the appropriate JMXServiceURL is:

    service:jmx:rmi:///jndi/rmi://myhost/whatsit-agent-connector

If you have an RMI stub of type RMIServer, you can construct an RMI connection directly by using the appropriate constructor of RMIConnector.

Specifying an ORB for the RMI/IIOP connector

When using the IIOP transport, the client and server can specify what ORB to use with the attribute java.naming.corba.orb. Connection to the ORB happens at start time for the connector server, and at connect time for the connector client. If the java.naming.corba.orb attribute is contained in the environment Map, then its value (an ORB), is used to connect the IIOP Stubs. Otherwise, a new org.omg.CORBA.ORB is created by calling org.omg.CORBA.ORB.init((String[])null,(Properties)null). A later RMI connector client or server in the same JVM can reuse this ORB, or it can create another one in the same way.

If the java.naming.corba.orb attribute is specified and does not point to an ORB, then an IllegalArgumentException will be thrown.

The mechanism described here does not apply when the IIOP Remote objects (Stubs or Servers) are created and connected to an ORB manually before being passed to the RMIConnector and RMIConnectorServer.

Dynamic code downloading

If an RMI connector client or server receives from its peer an instance of a class that it does not know, and if dynamic code downloading is active for the RMI connection, then the class can be downloaded from a codebase specified by the peer. The article Dynamic code downloading using Java RMI explains this in more detail.

Since:
1.5
See Also:
JavaTM Remote Method Invocation (RMI), Java Naming and Directory InterfaceTM (JNDI), RFC 2045, section 6.8, "Base64 Content-Transfer-Encoding"
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.remote.rmi

Interfaces

  • RMIConnection
  • RMIServer

Classes

  • RMIConnectionImpl
  • RMIConnectionImpl_Stub
  • RMIConnector
  • RMIConnectorServer
  • RMIIIOPServerImpl
  • RMIJRMPServerImpl
  • RMIServerImpl
  • RMIServerImpl_Stub


compact3 - javax.management.timer

Interfaces

  • TimerMBean

Classes

  • Timer
  • TimerNotification


timer

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.management.timer

Provides the definition of the Timer MBean.

See: Description

  • Interface Summary
    Interface Description
    TimerMBean
    Exposes the management interface of the timer MBean.
  • Class Summary
    Class Description
    Timer
    Provides the implementation of the timer MBean.
    TimerNotification
    This class provides definitions of the notifications sent by timer MBeans.

Package javax.management.timer Description

Provides the definition of the Timer MBean. A Timer MBean maintains a list of scheduled notifications and, because it is a NotificationBroadcaster, a list of listeners for those notifications. Whenever the time for one of the scheduled notifications is reached, each listener receives the notification. Notifications can be repeated at a fixed interval, and the number of repetitions can be bounded.

A listener for a Timer MBean can itself be an MBean, using the method MBeanServer.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object). In this way, a management application can create an MBean representing a task, then schedule that task using a Timer MBean.

Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.management.timer

Interfaces

  • TimerMBean

Classes

  • Timer
  • TimerNotification


compact3 - javax.naming

Interfaces

  • Context
  • Name
  • NameParser
  • NamingEnumeration
  • Referenceable

Classes

  • BinaryRefAddr
  • Binding
  • CompositeName
  • CompoundName
  • InitialContext
  • LinkRef
  • NameClassPair
  • RefAddr
  • Reference
  • StringRefAddr

Exceptions

  • AuthenticationException
  • AuthenticationNotSupportedException
  • CannotProceedException
  • CommunicationException
  • ConfigurationException
  • ContextNotEmptyException
  • InsufficientResourcesException
  • InterruptedNamingException
  • InvalidNameException
  • LimitExceededException
  • LinkException
  • LinkLoopException
  • MalformedLinkException
  • NameAlreadyBoundException
  • NameNotFoundException
  • NamingException
  • NamingSecurityException
  • NoInitialContextException
  • NoPermissionException
  • NotContextException
  • OperationNotSupportedException
  • PartialResultException
  • ReferralException
  • ServiceUnavailableException
  • SizeLimitExceededException
  • TimeLimitExceededException


naming

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.naming

Provides the classes and interfaces for accessing naming services.

See: Description

  • Interface Summary
    Interface Description
    Context
    This interface represents a naming context, which consists of a set of name-to-object bindings.
    Name
    The Name interface represents a generic name -- an ordered sequence of components.
    NameParser
    This interface is used for parsing names from a hierarchical namespace.
    NamingEnumeration<T>
    This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.
    Referenceable
    This interface is implemented by an object that can provide a Reference to itself.
  • Class Summary
    Class Description
    BinaryRefAddr
    This class represents the binary form of the address of a communications end-point.
    Binding
    This class represents a name-to-object binding found in a context.
    CompositeName
    This class represents a composite name -- a sequence of component names spanning multiple namespaces.
    CompoundName
    This class represents a compound name -- a name from a hierarchical name space.
    InitialContext
    This class is the starting context for performing naming operations.
    LinkRef
    This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
    NameClassPair
    This class represents the object name and class name pair of a binding found in a context.
    RefAddr
    This class represents the address of a communications end-point.
    Reference
    This class represents a reference to an object that is found outside of the naming/directory system.
    StringRefAddr
    This class represents the string form of the address of a communications end-point.
  • Exception Summary
    Exception Description
    AuthenticationException
    This exception is thrown when an authentication error occurs while accessing the naming or directory service.
    AuthenticationNotSupportedException
    This exception is thrown when the particular flavor of authentication requested is not supported.
    CannotProceedException
    This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
    CommunicationException
    This exception is thrown when the client is unable to communicate with the directory or naming service.
    ConfigurationException
    This exception is thrown when there is a configuration problem.
    ContextNotEmptyException
    This exception is thrown when attempting to destroy a context that is not empty.
    InsufficientResourcesException
    This exception is thrown when resources are not available to complete the requested operation.
    InterruptedNamingException
    This exception is thrown when the naming operation being invoked has been interrupted.
    InvalidNameException
    This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
    LimitExceededException
    This exception is thrown when a method terminates abnormally due to a user or system specified limit.
    LinkException
    This exception is used to describe problems encounter while resolving links.
    LinkLoopException
    This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
    MalformedLinkException
    This exception is thrown when a malformed link was encountered while resolving or constructing a link.
    NameAlreadyBoundException
    This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
    NameNotFoundException
    This exception is thrown when a component of the name cannot be resolved because it is not bound.
    NamingException
    This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
    NamingSecurityException
    This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
    NoInitialContextException
    This exception is thrown when no initial context implementation can be created.
    NoPermissionException
    This exception is thrown when attempting to perform an operation for which the client has no permission.
    NotContextException
    This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
    OperationNotSupportedException
    This exception is thrown when a context implementation does not support the operation being invoked.
    PartialResultException
    This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
    ReferralException
    This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
    ServiceUnavailableException
    This exception is thrown when attempting to communicate with a directory or naming service and that service is not available.
    SizeLimitExceededException
    This exception is thrown when a method produces a result that exceeds a size-related limit.
    TimeLimitExceededException
    This exception is thrown when a method does not terminate within the specified time limit.

Package javax.naming Description

Provides the classes and interfaces for accessing naming services.

This package defines the naming operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

Context

This package defines the notion of a context, represented by the Context interface. A context consists of a set of name-to-object bindings. Context is the core interface for looking up, binding, unbinding, and renaming objects, and for creating and destroying subcontexts.

lookup() is the most commonly used operation. You supply lookup() the name of the object you want to look up, and it returns the object bound to that name. For example, the following code fragment looks up a printer and sends a document to the printer object to be printed:

Printer printer = (Printer)ctx.lookup("treekiller");
printer.print(report);

Names

Every naming method in the Context interface has two overloads: one that accepts a Name argument and one that accepts a string name. Name is an interface that represents a generic name--an ordered sequence of zero of more components. For these methods, Name can be used to represent a composite name (CompositeName) so that you can name an object using a name which spans multiple namespaces.

The overloads that accept Name are useful for applications that need to manipulate names: composing them, comparing components, and so on. The overloads that accept string names are likely to be more useful for simple applications, such as those that simply read in a name and look up the corresponding object.

Bindings

The Binding class represents a name-to-object binding. It is a tuple containing the name of the bound object, the name of the object's class, and the object itself.

The Binding class is actually a subclass of NameClassPair, which consists simply of the object's name and the object's class name. The NameClassPair is useful when you only want information about the object's class and do not want to pay the extra cost of getting the object.

References

Objects are stored in naming and directory services in different ways. If an object store supports storing Java objects, it might support storing an object in its serialized form. However, some naming and directory services do not support the storing of Java objects. Furthermore, for some objects in the directory, Java programs are but one group of applications that access them. In this case, a serialized Java object might not be the most appropriate representation. JNDI defines a reference, represented by the Reference class, which contains information on how to construct a copy of the object. JNDI will attempt to turn references looked up from the directory into the Java objects they represent, so that JNDI clients have the illusion that what is stored in the directory are Java objects.

The Initial Context

In JNDI, all naming and directory operations are performed relative to a context. There are no absolute roots. Therefore JNDI defines an initial context, InitialContext, which provides a starting point for naming and directory operations. Once you have an initial context, you can use it to look up other contexts and objects.

Exceptions

JNDI defines a class hierarchy for exceptions that can be thrown in the course of performing naming and directory operations. The root of this class hierarchy is NamingException. Programs interested in dealing with a particular exception can catch the corresponding subclass of the exception. Otherwise, programs should catch NamingException.

Package Specification

The JNDI API Specification and related documents can be found in the JNDI documentation.
Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.naming

Interfaces

  • Context
  • Name
  • NameParser
  • NamingEnumeration
  • Referenceable

Classes

  • BinaryRefAddr
  • Binding
  • CompositeName
  • CompoundName
  • InitialContext
  • LinkRef
  • NameClassPair
  • RefAddr
  • Reference
  • StringRefAddr

Exceptions

  • AuthenticationException
  • AuthenticationNotSupportedException
  • CannotProceedException
  • CommunicationException
  • ConfigurationException
  • ContextNotEmptyException
  • InsufficientResourcesException
  • InterruptedNamingException
  • InvalidNameException
  • LimitExceededException
  • LinkException
  • LinkLoopException
  • MalformedLinkException
  • NameAlreadyBoundException
  • NameNotFoundException
  • NamingException
  • NamingSecurityException
  • NoInitialContextException
  • NoPermissionException
  • NotContextException
  • OperationNotSupportedException
  • PartialResultException
  • ReferralException
  • ServiceUnavailableException
  • SizeLimitExceededException
  • TimeLimitExceededException


compact3 - javax.naming.directory

Interfaces

  • Attribute
  • Attributes
  • DirContext

Classes

  • BasicAttribute
  • BasicAttributes
  • InitialDirContext
  • ModificationItem
  • SearchControls
  • SearchResult

Exceptions

  • AttributeInUseException
  • AttributeModificationException
  • InvalidAttributeIdentifierException
  • InvalidAttributesException
  • InvalidAttributeValueException
  • InvalidSearchControlsException
  • InvalidSearchFilterException
  • NoSuchAttributeException
  • SchemaViolationException


directory

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.naming.directory

Extends the javax.naming package to provide functionality for accessing directory services.

See: Description

  • Interface Summary
    Interface Description
    Attribute
    This interface represents an attribute associated with a named object.
    Attributes
    This interface represents a collection of attributes.
    DirContext
    The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
  • Class Summary
    Class Description
    BasicAttribute
    This class provides a basic implementation of the Attribute interface.
    BasicAttributes
    This class provides a basic implementation of the Attributes interface.
    InitialDirContext
    This class is the starting context for performing directory operations.
    ModificationItem
    This class represents a modification item.
    SearchControls
    This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
    SearchResult
    This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.
  • Exception Summary
    Exception Description
    AttributeInUseException
    This exception is thrown when an operation attempts to add an attribute that already exists.
    AttributeModificationException
    This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
    InvalidAttributeIdentifierException
    This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
    InvalidAttributesException
    This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
    InvalidAttributeValueException
    This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
    InvalidSearchControlsException
    This exception is thrown when the specification of the SearchControls for a search operation is invalid.
    InvalidSearchFilterException
    This exception is thrown when the specification of a search filter is invalid.
    NoSuchAttributeException
    This exception is thrown when attempting to access an attribute that does not exist.
    SchemaViolationException
    This exception is thrown when a method in some ways violates the schema.

Package javax.naming.directory Description

Extends the javax.naming package to provide functionality for accessing directory services.

This package defines the directory operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

This package allows applications to retrieve and update attributes associated with objects stored in a directory, and to search for objects using specified attributes.

The Directory Context

The DirContext interface represents a directory context. It defines methods for examining and updating attributes associated with a directory object, or directory entry as it is sometimes called.

You use getAttributes() to retrieve the attributes associated with a directory object (for which you supply the name). Attributes are modified using modifyAttributes(). You can add, replace, or remove attributes and/or attribute values using this operation.

DirContext also behaves as a naming context by extending the Context interface in the javax.naming package. This means that any directory object can also provide a naming context. For example, the directory object for a person might contain the attributes of that person, and at the same time provide a context for naming objects relative to that person such as his printers and home directory.

Searches

DirContext contains methods for performing content-based searching of the directory. In the simplest and most common form of usage, the application specifies a set of attributes--possibly with specific values--to match, and submits this attribute set, to the search() method. There are other overloaded forms of search() that support more sophisticated search filters.

Package Specification

The JNDI API Specification and related documents can be found in the JNDI documentation.
Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.naming.directory

Interfaces

  • Attribute
  • Attributes
  • DirContext

Classes

  • BasicAttribute
  • BasicAttributes
  • InitialDirContext
  • ModificationItem
  • SearchControls
  • SearchResult

Exceptions

  • AttributeInUseException
  • AttributeModificationException
  • InvalidAttributeIdentifierException
  • InvalidAttributesException
  • InvalidAttributeValueException
  • InvalidSearchControlsException
  • InvalidSearchFilterException
  • NoSuchAttributeException
  • SchemaViolationException


compact3 - javax.naming.event

Interfaces

  • EventContext
  • EventDirContext
  • NamespaceChangeListener
  • NamingListener
  • ObjectChangeListener

Classes

  • NamingEvent
  • NamingExceptionEvent


event

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.naming.event

Provides support for event notification when accessing naming and directory services.

See: Description

  • Interface Summary
    Interface Description
    EventContext
    Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.
    EventDirContext
    Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.
    NamespaceChangeListener
    Specifies the methods that a listener interested in namespace changes must implement.
    NamingListener
    This interface is the root of listener interfaces that handle NamingEvents.
    ObjectChangeListener
    Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.
  • Class Summary
    Class Description
    NamingEvent
    This class represents an event fired by a naming/directory service.
    NamingExceptionEvent
    This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.

Package javax.naming.event Description

Provides support for event notification when accessing naming and directory services.

This package defines the event notification operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

Naming Events

This package defines a NamingEvent class to represent an event that is generated by a naming/directory service. It also defines subinterfaces of Context and DirContext, called EventContext and EventDirContext, through which applications can register their interest in events fired by the context.

NamingEvent represents an event that occurs in a naming or directory service. There are two categories of naming events:

  • Those that affect the namespace (add/remove/rename an object)
  • Those that affect the objects' contents.
Each category of events is handled by a corresponding listener: NamespaceChangeListener, ObjectChangeListener.

An application, for example, can register its interest in changes to objects in a context as follows:

EventContext src =
    (EventContext)(new InitialContext()).lookup("o=wiz,c=us");
src.addNamingListener("ou=users", EventContext.ONELEVEL_SCOPE,
    new ChangeHandler());
...
class ChangeHandler implements ObjectChangeListener {
    public void objectChanged(NamingEvent evt) {
        System.out.println(evt.getNewBinding());
    }
    public void namingExceptionThrown(NamingExceptionEvent evt) {
        System.out.println(evt.getException());
    }
}

Threading Issues

When an event is dispatched to a listener, the listener method (such as objectChanged()) may be executed in a thread other than the one in which the call to addNamingListener() was executed. The choice of which thread to use is made by the service provider. When an event is dispatched to multiple listeners, the service provider may choose (and is generally encouraged) to execute the listener methods concurrently in separate threads.

When a listener instance invokes NamingEvent.getEventContext(), it must take into account the possibility that other threads will be working with that context concurrently. Likewise, when a listener is registered via addNamingListener(), the registering thread must take into account the likely possibility that the service provider will later invoke the listeners in newly-created threads. As Context instances are not guaranteed to be thread-safe in general, all context operations must be synchronized as needed.

Exception Handling

When a listener registers for events with a context, the context might need to do some internal processing in order to collect information required to generate the events. The context, for example, might need to make a request to the server to register interest in changes on the server that will eventually be translated into events. If an exception occurs that prevents information about the events from being collected, the listener will never be notified of the events. When such an exception occurs, a NamingExceptionEvent is fired to notify the listener. The listener's namingExceptionThrown() method is invoked, as shown in the sample code above, and the listener is automatically deregistered.

Package Specification

The JNDI API Specification and related documents can be found in the JNDI documentation.
Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.naming.event

Interfaces

  • EventContext
  • EventDirContext
  • NamespaceChangeListener
  • NamingListener
  • ObjectChangeListener

Classes

  • NamingEvent
  • NamingExceptionEvent


compact3 - javax.naming.ldap

Interfaces

  • Control
  • ExtendedRequest
  • ExtendedResponse
  • HasControls
  • LdapContext
  • UnsolicitedNotification
  • UnsolicitedNotificationListener

Classes

  • BasicControl
  • ControlFactory
  • InitialLdapContext
  • LdapName
  • ManageReferralControl
  • PagedResultsControl
  • PagedResultsResponseControl
  • Rdn
  • SortControl
  • SortKey
  • SortResponseControl
  • StartTlsRequest
  • StartTlsResponse
  • UnsolicitedNotificationEvent

Exceptions

  • LdapReferralException


ldap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.naming.ldap

Provides support for LDAPv3 extended operations and controls.

See: Description

  • Interface Summary
    Interface Description
    Control
    This interface represents an LDAPv3 control as defined in RFC 2251.
    ExtendedRequest
    This interface represents an LDAPv3 extended operation request as defined in RFC 2251.
    ExtendedResponse
    This interface represents an LDAP extended operation response as defined in RFC 2251.
    HasControls
    This interface is for returning controls with objects returned in NamingEnumerations.
    LdapContext
    This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.
    UnsolicitedNotification
    This interface represents an unsolicited notification as defined in RFC 2251.
    UnsolicitedNotificationListener
    This interface is for handling UnsolicitedNotificationEvent.
  • Class Summary
    Class Description
    BasicControl
    This class provides a basic implementation of the Control interface.
    ControlFactory
    This abstract class represents a factory for creating LDAPv3 controls.
    InitialLdapContext
    This class is the starting context for performing LDAPv3-style extended operations and controls.
    LdapName
    This class represents a distinguished name as specified by RFC 2253.
    ManageReferralControl
    Requests that referral and other special LDAP objects be manipulated as normal LDAP objects.
    PagedResultsControl
    Requests that the results of a search operation be returned by the LDAP server in batches of a specified size.
    PagedResultsResponseControl
    Indicates the end of a batch of search results.
    Rdn
    This class represents a relative distinguished name, or RDN, which is a component of a distinguished name as specified by RFC 2253.
    SortControl
    Requests that the results of a search operation be sorted by the LDAP server before being returned.
    SortKey
    A sort key and its associated sort parameters.
    SortResponseControl
    Indicates whether the requested sort of search results was successful or not.
    StartTlsRequest
    This class implements the LDAPv3 Extended Request for StartTLS as defined in Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037 and no extended request value is defined.
    StartTlsResponse
    This class implements the LDAPv3 Extended Response for StartTLS as defined in Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037 and no extended response value is defined.
    UnsolicitedNotificationEvent
    This class represents an event fired in response to an unsolicited notification sent by the LDAP server.
  • Exception Summary
    Exception Description
    LdapReferralException
    This abstract class is used to represent an LDAP referral exception.

Package javax.naming.ldap Description

Provides support for LDAPv3 extended operations and controls.

This package extends the directory operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

This package is for applications and service providers that deal with LDAPv3 extended operations and controls, as defined by RFC 2251. The core interface in this package is LdapContext, which defines methods on a context for performing extended operations and handling controls.

Extended Operations

This package defines the interface ExtendedRequest to represent the argument to an extended operation, and the interface ExtendedResponse to represent the result of the extended operation. An extended response is always paired with an extended request but not necessarily vice versa. That is, you can have an extended request that has no corresponding extended response.

An application typically does not deal directly with these interfaces. Instead, it deals with classes that implement these interfaces. The application gets these classes either as part of a repertoire of extended operations standardized through the IETF, or from directory vendors for vendor-specific extended operations. The request classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "get time" extended operation. It would supply classes such as GetTimeRequest and GetTimeResponse, so that applications can use this feature. An application would use these classes as follows:

GetTimeResponse resp =
    (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest());
long time = resp.getTime();

The GetTimeRequest and GetTimeResponse classes might be defined as follows:

public class GetTimeRequest implements ExtendedRequest {
    // User-friendly constructor
    public GetTimeRequest() {
    };

    // Methods used by service providers
    public String getID() {
        return GETTIME_REQ_OID;
    }
    public byte[] getEncodedValue() {
        return null;  // no value needed for get time request
    }
    public ExtendedResponse createExtendedResponse(
        String id, byte[] berValue, int offset, int length) throws NamingException {
        return new GetTimeResponse(id, berValue, offset, length);
    }
}
public class GetTimeResponse() implements ExtendedResponse {
    long time;
    // called by GetTimeRequest.createExtendedResponse()
    public GetTimeResponse(String id, byte[] berValue, int offset, int length)
        throws NamingException {
        // check validity of id
        long time =  ... // decode berValue to get time
    }

    // Type-safe and User-friendly methods
    public java.util.Date getDate() { return new java.util.Date(time); }
    public long getTime() { return time; }

    // Low level methods
    public byte[] getEncodedValue() {
        return // berValue saved;
    }
    public String getID() {
        return GETTIME_RESP_OID;
    }
}

Controls

This package defines the interface Control to represent an LDAPv3 control. It can be a control that is sent to an LDAP server (request control) or a control returned by an LDAP server (response control). Unlike extended requests and responses, there is not necessarily any pairing between request controls and response controls. You can send request controls and expect no response controls back, or receive response controls without sending any request controls.

An application typically does not deal directly with this interface. Instead, it deals with classes that implement this interface. The application gets control classes either as part of a repertoire of controls standardized through the IETF, or from directory vendors for vendor-specific controls. The request control classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response control classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response control classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "signed results" request control, which when sent with a request, asks the server to digitally sign the results of an operation. It would supply a class SignedResultsControl so that applications can use this feature. An application would use this class as follows:

Control[] reqCtls = new Control[] {new SignedResultsControl(Control.CRITICAL)};
ectx.setRequestControls(reqCtls);
NamingEnumeration enum = ectx.search(...);
The SignedResultsControl class might be defined as follows:
public class SignedResultsControl implements Control {
    // User-friendly constructor
    public SignedResultsControl(boolean criticality) {
        // assemble the components of the request control
    };

    // Methods used by service providers
    public String getID() {
        return // control's object identifier
    }
    public byte[] getEncodedValue() {
        return // ASN.1 BER encoded control value
    }
    ...
}

When a service provider receives response controls, it uses the ControlFactory class to produce specific classes that implement the Control interface.

An LDAP server can send back response controls with an LDAP operation and also with enumeration results, such as those returned by a list or search operation. The LdapContext provides a method (getResponseControls()) for getting the response controls sent with an LDAP operation, while the HasControls interface is used to retrieve response controls associated with enumeration results.

For example, suppose an LDAP server sends back a "change ID" control in response to a successful modification. It would supply a class ChangeIDControl so that the application can use this feature. An application would perform an update, and then try to get the change ID.

// Perform update
Context ctx = ectx.createSubsubcontext("cn=newobj");

// Get response controls
Control[] respCtls = ectx.getResponseControls();
if (respCtls != null) {
    // Find the one we want
    for (int i = 0; i < respCtls; i++) {
        if(respCtls[i] instanceof ChangeIDControl) {
            ChangeIDControl cctl = (ChangeIDControl)respCtls[i];
            System.out.println(cctl.getChangeID());
        }
    }
}
The vendor might supply the following ChangeIDControl and VendorXControlFactory classes. The VendorXControlFactory will be used by the service provider when the provider receives response controls from the LDAP server.
public class ChangeIDControl implements Control {
    long id;

    // Constructor used by ControlFactory
    public ChangeIDControl(String OID, byte[] berVal) throws NamingException {
        // check validity of OID
        id = // extract change ID from berVal
    };

    // Type-safe and User-friendly method
    public long getChangeID() {
        return id;
    }

    // Low-level methods
    public String getID() {
        return CHANGEID_OID;
    }
    public byte[] getEncodedValue() {
        return // original berVal
    }
    ...
}
public class VendorXControlFactory extends ControlFactory {
    public VendorXControlFactory () {
    }

    public Control getControlInstance(Control orig) throws NamingException {
        if (isOneOfMyControls(orig.getID())) {
            ...

            // determine which of ours it is and call its constructor
            return (new ChangeIDControl(orig.getID(), orig.getEncodedValue()));
        }
        return null;  // not one of ours
    }
}

Package Specification

The JNDI API Specification and related documents can be found in the JNDI documentation.
Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.naming.ldap

Interfaces

  • Control
  • ExtendedRequest
  • ExtendedResponse
  • HasControls
  • LdapContext
  • UnsolicitedNotification
  • UnsolicitedNotificationListener

Classes

  • BasicControl
  • ControlFactory
  • InitialLdapContext
  • LdapName
  • ManageReferralControl
  • PagedResultsControl
  • PagedResultsResponseControl
  • Rdn
  • SortControl
  • SortKey
  • SortResponseControl
  • StartTlsRequest
  • StartTlsResponse
  • UnsolicitedNotificationEvent

Exceptions

  • LdapReferralException


compact3 - javax.naming.spi

Interfaces

  • DirObjectFactory
  • DirStateFactory
  • InitialContextFactory
  • InitialContextFactoryBuilder
  • ObjectFactory
  • ObjectFactoryBuilder
  • Resolver
  • StateFactory

Classes

  • DirectoryManager
  • DirStateFactory.Result
  • NamingManager
  • ResolveResult


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.naming.spi

  • Interface Summary
    Interface Description
    DirObjectFactory
    This interface represents a factory for creating an object given an object and attributes about the object.
    DirStateFactory
    This interface represents a factory for obtaining the state of an object and corresponding attributes for binding.
    InitialContextFactory
    This interface represents a factory that creates an initial context.
    InitialContextFactoryBuilder
    This interface represents a builder that creates initial context factories.
    ObjectFactory
    This interface represents a factory for creating an object.
    ObjectFactoryBuilder
    This interface represents a builder that creates object factories.
    Resolver
    This interface represents an "intermediate context" for name resolution.
    StateFactory
    This interface represents a factory for obtaining the state of an object for binding.
  • Class Summary
    Class Description
    DirectoryManager
    This class contains methods for supporting DirContext implementations.
    DirStateFactory.Result
    An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
    NamingManager
    This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.
    ResolveResult
    This class represents the result of resolution of a name.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.naming.spi

Interfaces

  • DirObjectFactory
  • DirStateFactory
  • InitialContextFactory
  • InitialContextFactoryBuilder
  • ObjectFactory
  • ObjectFactoryBuilder
  • Resolver
  • StateFactory

Classes

  • DirectoryManager
  • DirStateFactory.Result
  • NamingManager
  • ResolveResult


compact1 - javax.net

Classes

  • ServerSocketFactory
  • SocketFactory


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.net

Provides classes for networking applications.

See: Description

  • Class Summary
    Class Description
    ServerSocketFactory
    This class creates server sockets.
    SocketFactory
    This class creates sockets.

Package javax.net Description

Provides classes for networking applications. These classes include factories for creating sockets. Using socket factories you can encapsulate socket creation and configuration behavior.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.net

Classes

  • ServerSocketFactory
  • SocketFactory


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.net

Provides classes for networking applications.

See: Description

  • Class Summary
    Class Description
    ServerSocketFactory
    This class creates server sockets.
    SocketFactory
    This class creates sockets.

Package javax.net Description

Provides classes for networking applications. These classes include factories for creating sockets. Using socket factories you can encapsulate socket creation and configuration behavior.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.net

Classes

  • ServerSocketFactory
  • SocketFactory


net

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.net

Provides classes for networking applications.

See: Description

  • Class Summary
    Class Description
    ServerSocketFactory
    This class creates server sockets.
    SocketFactory
    This class creates sockets.

Package javax.net Description

Provides classes for networking applications. These classes include factories for creating sockets. Using socket factories you can encapsulate socket creation and configuration behavior.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.net

Classes

  • ServerSocketFactory
  • SocketFactory


compact1 - javax.net.ssl

Interfaces

  • HandshakeCompletedListener
  • HostnameVerifier
  • KeyManager
  • ManagerFactoryParameters
  • SSLSession
  • SSLSessionBindingListener
  • SSLSessionContext
  • TrustManager
  • X509KeyManager
  • X509TrustManager

Classes

  • CertPathTrustManagerParameters
  • ExtendedSSLSession
  • HandshakeCompletedEvent
  • HttpsURLConnection
  • KeyManagerFactory
  • KeyManagerFactorySpi
  • KeyStoreBuilderParameters
  • SNIHostName
  • SNIMatcher
  • SNIServerName
  • SSLContext
  • SSLContextSpi
  • SSLEngine
  • SSLEngineResult
  • SSLParameters
  • SSLPermission
  • SSLServerSocket
  • SSLServerSocketFactory
  • SSLSessionBindingEvent
  • SSLSocket
  • SSLSocketFactory
  • StandardConstants
  • TrustManagerFactory
  • TrustManagerFactorySpi
  • X509ExtendedKeyManager
  • X509ExtendedTrustManager

Enums

  • SSLEngineResult.HandshakeStatus
  • SSLEngineResult.Status

Exceptions

  • SSLException
  • SSLHandshakeException
  • SSLKeyException
  • SSLPeerUnverifiedException
  • SSLProtocolException


ssl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.net.ssl

Provides classes for the secure socket package.

See: Description

  • Interface Summary
    Interface Description
    HandshakeCompletedListener
    This interface is implemented by any class which wants to receive notifications about the completion of an SSL protocol handshake on a given SSL connection.
    HostnameVerifier
    This class is the base interface for hostname verification.
    KeyManager
    This is the base interface for JSSE key managers.
    ManagerFactoryParameters
    This class is the base interface for providing algorithm-specific information to a KeyManagerFactory or TrustManagerFactory.
    SSLSession
    In SSL, sessions are used to describe an ongoing relationship between two entities.
    SSLSessionBindingListener
    This interface is implemented by objects which want to know when they are being bound or unbound from a SSLSession.
    SSLSessionContext
    A SSLSessionContext represents a set of SSLSessions associated with a single entity.
    TrustManager
    This is the base interface for JSSE trust managers.
    X509KeyManager
    Instances of this interface manage which X509 certificate-based key pairs are used to authenticate the local side of a secure socket.
    X509TrustManager
    Instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
  • Class Summary
    Class Description
    CertPathTrustManagerParameters
    A wrapper for CertPathParameters.
    ExtendedSSLSession
    Extends the SSLSession interface to support additional session attributes.
    HandshakeCompletedEvent
    This event indicates that an SSL handshake completed on a given SSL connection.
    HttpsURLConnection
    HttpsURLConnection extends HttpURLConnection with support for https-specific features.
    KeyManagerFactory
    This class acts as a factory for key managers based on a source of key material.
    KeyManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyManagerFactory class.
    KeyStoreBuilderParameters
    A parameters object for X509KeyManagers that encapsulates a List of KeyStore.Builders.
    SNIHostName
    Instances of this class represent a server name of type host_name in a Server Name Indication (SNI) extension.
    SNIMatcher
    Instances of this class represent a matcher that performs match operations on an SNIServerName instance.
    SNIServerName
    Instances of this class represent a server name in a Server Name Indication (SNI) extension.
    SSLContext
    Instances of this class represent a secure socket protocol implementation which acts as a factory for secure socket factories or SSLEngines.
    SSLContextSpi
    This class defines the Service Provider Interface (SPI) for the SSLContext class.
    SSLEngine
    A class which enables secure communications using protocols such as the Secure Sockets Layer (SSL) or IETF RFC 2246 "Transport Layer Security" (TLS) protocols, but is transport independent.
    SSLEngineResult
    An encapsulation of the result state produced by SSLEngine I/O calls.
    SSLParameters
    Encapsulates parameters for an SSL/TLS connection.
    SSLPermission
    This class is for various network permissions.
    SSLServerSocket
    This class extends ServerSockets and provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
    SSLServerSocketFactory
    SSLServerSocketFactorys create SSLServerSockets.
    SSLSessionBindingEvent
    This event is propagated to a SSLSessionBindingListener.
    SSLSocket
    This class extends Sockets and provides secure socket using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols.
    SSLSocketFactory
    SSLSocketFactorys create SSLSockets.
    StandardConstants
    Standard constants definitions
    TrustManagerFactory
    This class acts as a factory for trust managers based on a source of trust material.
    TrustManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the TrustManagerFactory class.
    X509ExtendedKeyManager
    Abstract class that provides for extension of the X509KeyManager interface.
    X509ExtendedTrustManager
    Extensions to the X509TrustManager interface to support SSL/TLS connection sensitive trust management.
  • Enum Summary
    Enum Description
    SSLEngineResult.HandshakeStatus
    An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
    SSLEngineResult.Status
    An SSLEngineResult enum describing the overall result of the SSLEngine operation.
  • Exception Summary
    Exception Description
    SSLException
    Indicates some kind of error detected by an SSL subsystem.
    SSLHandshakeException
    Indicates that the client and server could not negotiate the desired level of security.
    SSLKeyException
    Reports a bad SSL key.
    SSLPeerUnverifiedException
    Indicates that the peer's identity has not been verified.
    SSLProtocolException
    Reports an error in the operation of the SSL protocol.

Package javax.net.ssl Description

Provides classes for the secure socket package. Using the secure socket classes, you can communicate using SSL or a related security protocol to reliably detect any errors introduced into the network byte stream and to optionally encrypt the data and/or authenticate the communicating peers.

Package Specification

  • JavaTM Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.net.ssl

Interfaces

  • HandshakeCompletedListener
  • HostnameVerifier
  • KeyManager
  • ManagerFactoryParameters
  • SSLSession
  • SSLSessionBindingListener
  • SSLSessionContext
  • TrustManager
  • X509KeyManager
  • X509TrustManager

Classes

  • CertPathTrustManagerParameters
  • ExtendedSSLSession
  • HandshakeCompletedEvent
  • HttpsURLConnection
  • KeyManagerFactory
  • KeyManagerFactorySpi
  • KeyStoreBuilderParameters
  • SNIHostName
  • SNIMatcher
  • SNIServerName
  • SSLContext
  • SSLContextSpi
  • SSLEngine
  • SSLEngineResult
  • SSLParameters
  • SSLPermission
  • SSLServerSocket
  • SSLServerSocketFactory
  • SSLSessionBindingEvent
  • SSLSocket
  • SSLSocketFactory
  • StandardConstants
  • TrustManagerFactory
  • TrustManagerFactorySpi
  • X509ExtendedKeyManager
  • X509ExtendedTrustManager

Enums

  • SSLEngineResult.HandshakeStatus
  • SSLEngineResult.Status

Exceptions

  • SSLException
  • SSLHandshakeException
  • SSLKeyException
  • SSLPeerUnverifiedException
  • SSLProtocolException


ssl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.net.ssl

Provides classes for the secure socket package.

See: Description

  • Interface Summary
    Interface Description
    HandshakeCompletedListener
    This interface is implemented by any class which wants to receive notifications about the completion of an SSL protocol handshake on a given SSL connection.
    HostnameVerifier
    This class is the base interface for hostname verification.
    KeyManager
    This is the base interface for JSSE key managers.
    ManagerFactoryParameters
    This class is the base interface for providing algorithm-specific information to a KeyManagerFactory or TrustManagerFactory.
    SSLSession
    In SSL, sessions are used to describe an ongoing relationship between two entities.
    SSLSessionBindingListener
    This interface is implemented by objects which want to know when they are being bound or unbound from a SSLSession.
    SSLSessionContext
    A SSLSessionContext represents a set of SSLSessions associated with a single entity.
    TrustManager
    This is the base interface for JSSE trust managers.
    X509KeyManager
    Instances of this interface manage which X509 certificate-based key pairs are used to authenticate the local side of a secure socket.
    X509TrustManager
    Instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
  • Class Summary
    Class Description
    CertPathTrustManagerParameters
    A wrapper for CertPathParameters.
    ExtendedSSLSession
    Extends the SSLSession interface to support additional session attributes.
    HandshakeCompletedEvent
    This event indicates that an SSL handshake completed on a given SSL connection.
    HttpsURLConnection
    HttpsURLConnection extends HttpURLConnection with support for https-specific features.
    KeyManagerFactory
    This class acts as a factory for key managers based on a source of key material.
    KeyManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyManagerFactory class.
    KeyStoreBuilderParameters
    A parameters object for X509KeyManagers that encapsulates a List of KeyStore.Builders.
    SNIHostName
    Instances of this class represent a server name of type host_name in a Server Name Indication (SNI) extension.
    SNIMatcher
    Instances of this class represent a matcher that performs match operations on an SNIServerName instance.
    SNIServerName
    Instances of this class represent a server name in a Server Name Indication (SNI) extension.
    SSLContext
    Instances of this class represent a secure socket protocol implementation which acts as a factory for secure socket factories or SSLEngines.
    SSLContextSpi
    This class defines the Service Provider Interface (SPI) for the SSLContext class.
    SSLEngine
    A class which enables secure communications using protocols such as the Secure Sockets Layer (SSL) or IETF RFC 2246 "Transport Layer Security" (TLS) protocols, but is transport independent.
    SSLEngineResult
    An encapsulation of the result state produced by SSLEngine I/O calls.
    SSLParameters
    Encapsulates parameters for an SSL/TLS connection.
    SSLPermission
    This class is for various network permissions.
    SSLServerSocket
    This class extends ServerSockets and provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
    SSLServerSocketFactory
    SSLServerSocketFactorys create SSLServerSockets.
    SSLSessionBindingEvent
    This event is propagated to a SSLSessionBindingListener.
    SSLSocket
    This class extends Sockets and provides secure socket using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols.
    SSLSocketFactory
    SSLSocketFactorys create SSLSockets.
    StandardConstants
    Standard constants definitions
    TrustManagerFactory
    This class acts as a factory for trust managers based on a source of trust material.
    TrustManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the TrustManagerFactory class.
    X509ExtendedKeyManager
    Abstract class that provides for extension of the X509KeyManager interface.
    X509ExtendedTrustManager
    Extensions to the X509TrustManager interface to support SSL/TLS connection sensitive trust management.
  • Enum Summary
    Enum Description
    SSLEngineResult.HandshakeStatus
    An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
    SSLEngineResult.Status
    An SSLEngineResult enum describing the overall result of the SSLEngine operation.
  • Exception Summary
    Exception Description
    SSLException
    Indicates some kind of error detected by an SSL subsystem.
    SSLHandshakeException
    Indicates that the client and server could not negotiate the desired level of security.
    SSLKeyException
    Reports a bad SSL key.
    SSLPeerUnverifiedException
    Indicates that the peer's identity has not been verified.
    SSLProtocolException
    Reports an error in the operation of the SSL protocol.

Package javax.net.ssl Description

Provides classes for the secure socket package. Using the secure socket classes, you can communicate using SSL or a related security protocol to reliably detect any errors introduced into the network byte stream and to optionally encrypt the data and/or authenticate the communicating peers.

Package Specification

  • JavaTM Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.net.ssl

Interfaces

  • HandshakeCompletedListener
  • HostnameVerifier
  • KeyManager
  • ManagerFactoryParameters
  • SSLSession
  • SSLSessionBindingListener
  • SSLSessionContext
  • TrustManager
  • X509KeyManager
  • X509TrustManager

Classes

  • CertPathTrustManagerParameters
  • ExtendedSSLSession
  • HandshakeCompletedEvent
  • HttpsURLConnection
  • KeyManagerFactory
  • KeyManagerFactorySpi
  • KeyStoreBuilderParameters
  • SNIHostName
  • SNIMatcher
  • SNIServerName
  • SSLContext
  • SSLContextSpi
  • SSLEngine
  • SSLEngineResult
  • SSLParameters
  • SSLPermission
  • SSLServerSocket
  • SSLServerSocketFactory
  • SSLSessionBindingEvent
  • SSLSocket
  • SSLSocketFactory
  • StandardConstants
  • TrustManagerFactory
  • TrustManagerFactorySpi
  • X509ExtendedKeyManager
  • X509ExtendedTrustManager

Enums

  • SSLEngineResult.HandshakeStatus
  • SSLEngineResult.Status

Exceptions

  • SSLException
  • SSLHandshakeException
  • SSLKeyException
  • SSLPeerUnverifiedException
  • SSLProtocolException


ssl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.net.ssl

Provides classes for the secure socket package.

See: Description

  • Interface Summary
    Interface Description
    HandshakeCompletedListener
    This interface is implemented by any class which wants to receive notifications about the completion of an SSL protocol handshake on a given SSL connection.
    HostnameVerifier
    This class is the base interface for hostname verification.
    KeyManager
    This is the base interface for JSSE key managers.
    ManagerFactoryParameters
    This class is the base interface for providing algorithm-specific information to a KeyManagerFactory or TrustManagerFactory.
    SSLSession
    In SSL, sessions are used to describe an ongoing relationship between two entities.
    SSLSessionBindingListener
    This interface is implemented by objects which want to know when they are being bound or unbound from a SSLSession.
    SSLSessionContext
    A SSLSessionContext represents a set of SSLSessions associated with a single entity.
    TrustManager
    This is the base interface for JSSE trust managers.
    X509KeyManager
    Instances of this interface manage which X509 certificate-based key pairs are used to authenticate the local side of a secure socket.
    X509TrustManager
    Instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket.
  • Class Summary
    Class Description
    CertPathTrustManagerParameters
    A wrapper for CertPathParameters.
    ExtendedSSLSession
    Extends the SSLSession interface to support additional session attributes.
    HandshakeCompletedEvent
    This event indicates that an SSL handshake completed on a given SSL connection.
    HttpsURLConnection
    HttpsURLConnection extends HttpURLConnection with support for https-specific features.
    KeyManagerFactory
    This class acts as a factory for key managers based on a source of key material.
    KeyManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the KeyManagerFactory class.
    KeyStoreBuilderParameters
    A parameters object for X509KeyManagers that encapsulates a List of KeyStore.Builders.
    SNIHostName
    Instances of this class represent a server name of type host_name in a Server Name Indication (SNI) extension.
    SNIMatcher
    Instances of this class represent a matcher that performs match operations on an SNIServerName instance.
    SNIServerName
    Instances of this class represent a server name in a Server Name Indication (SNI) extension.
    SSLContext
    Instances of this class represent a secure socket protocol implementation which acts as a factory for secure socket factories or SSLEngines.
    SSLContextSpi
    This class defines the Service Provider Interface (SPI) for the SSLContext class.
    SSLEngine
    A class which enables secure communications using protocols such as the Secure Sockets Layer (SSL) or IETF RFC 2246 "Transport Layer Security" (TLS) protocols, but is transport independent.
    SSLEngineResult
    An encapsulation of the result state produced by SSLEngine I/O calls.
    SSLParameters
    Encapsulates parameters for an SSL/TLS connection.
    SSLPermission
    This class is for various network permissions.
    SSLServerSocket
    This class extends ServerSockets and provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
    SSLServerSocketFactory
    SSLServerSocketFactorys create SSLServerSockets.
    SSLSessionBindingEvent
    This event is propagated to a SSLSessionBindingListener.
    SSLSocket
    This class extends Sockets and provides secure socket using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols.
    SSLSocketFactory
    SSLSocketFactorys create SSLSockets.
    StandardConstants
    Standard constants definitions
    TrustManagerFactory
    This class acts as a factory for trust managers based on a source of trust material.
    TrustManagerFactorySpi
    This class defines the Service Provider Interface (SPI) for the TrustManagerFactory class.
    X509ExtendedKeyManager
    Abstract class that provides for extension of the X509KeyManager interface.
    X509ExtendedTrustManager
    Extensions to the X509TrustManager interface to support SSL/TLS connection sensitive trust management.
  • Enum Summary
    Enum Description
    SSLEngineResult.HandshakeStatus
    An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
    SSLEngineResult.Status
    An SSLEngineResult enum describing the overall result of the SSLEngine operation.
  • Exception Summary
    Exception Description
    SSLException
    Indicates some kind of error detected by an SSL subsystem.
    SSLHandshakeException
    Indicates that the client and server could not negotiate the desired level of security.
    SSLKeyException
    Reports a bad SSL key.
    SSLPeerUnverifiedException
    Indicates that the peer's identity has not been verified.
    SSLProtocolException
    Reports an error in the operation of the SSL protocol.

Package javax.net.ssl Description

Provides classes for the secure socket package. Using the secure socket classes, you can communicate using SSL or a related security protocol to reliably detect any errors introduced into the network byte stream and to optionally encrypt the data and/or authenticate the communicating peers.

Package Specification

  • JavaTM Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.net.ssl

Interfaces

  • HandshakeCompletedListener
  • HostnameVerifier
  • KeyManager
  • ManagerFactoryParameters
  • SSLSession
  • SSLSessionBindingListener
  • SSLSessionContext
  • TrustManager
  • X509KeyManager
  • X509TrustManager

Classes

  • CertPathTrustManagerParameters
  • ExtendedSSLSession
  • HandshakeCompletedEvent
  • HttpsURLConnection
  • KeyManagerFactory
  • KeyManagerFactorySpi
  • KeyStoreBuilderParameters
  • SNIHostName
  • SNIMatcher
  • SNIServerName
  • SSLContext
  • SSLContextSpi
  • SSLEngine
  • SSLEngineResult
  • SSLParameters
  • SSLPermission
  • SSLServerSocket
  • SSLServerSocketFactory
  • SSLSessionBindingEvent
  • SSLSocket
  • SSLSocketFactory
  • StandardConstants
  • TrustManagerFactory
  • TrustManagerFactorySpi
  • X509ExtendedKeyManager
  • X509ExtendedTrustManager

Enums

  • SSLEngineResult.HandshakeStatus
  • SSLEngineResult.Status

Exceptions

  • SSLException
  • SSLHandshakeException
  • SSLKeyException
  • SSLPeerUnverifiedException
  • SSLProtocolException


javax.print

Interfaces

  • AttributeException
  • CancelablePrintJob
  • Doc
  • DocPrintJob
  • FlavorException
  • MultiDoc
  • MultiDocPrintJob
  • MultiDocPrintService
  • PrintService
  • URIException

Classes

  • DocFlavor
  • DocFlavor.BYTE_ARRAY
  • DocFlavor.CHAR_ARRAY
  • DocFlavor.INPUT_STREAM
  • DocFlavor.READER
  • DocFlavor.SERVICE_FORMATTED
  • DocFlavor.STRING
  • DocFlavor.URL
  • PrintServiceLookup
  • ServiceUI
  • ServiceUIFactory
  • SimpleDoc
  • StreamPrintService
  • StreamPrintServiceFactory

Exceptions

  • PrintException


javax.print.attribute

Interfaces

  • Attribute
  • AttributeSet
  • DocAttribute
  • DocAttributeSet
  • PrintJobAttribute
  • PrintJobAttributeSet
  • PrintRequestAttribute
  • PrintRequestAttributeSet
  • PrintServiceAttribute
  • PrintServiceAttributeSet
  • SupportedValuesAttribute

Classes

  • AttributeSetUtilities
  • DateTimeSyntax
  • EnumSyntax
  • HashAttributeSet
  • HashDocAttributeSet
  • HashPrintJobAttributeSet
  • HashPrintRequestAttributeSet
  • HashPrintServiceAttributeSet
  • IntegerSyntax
  • ResolutionSyntax
  • SetOfIntegerSyntax
  • Size2DSyntax
  • TextSyntax
  • URISyntax

Exceptions

  • UnmodifiableSetException


javax.print.attribute.standard

Classes

  • Chromaticity
  • ColorSupported
  • Compression
  • Copies
  • CopiesSupported
  • DateTimeAtCompleted
  • DateTimeAtCreation
  • DateTimeAtProcessing
  • Destination
  • DialogTypeSelection
  • DocumentName
  • Fidelity
  • Finishings
  • JobHoldUntil
  • JobImpressions
  • JobImpressionsCompleted
  • JobImpressionsSupported
  • JobKOctets
  • JobKOctetsProcessed
  • JobKOctetsSupported
  • JobMediaSheets
  • JobMediaSheetsCompleted
  • JobMediaSheetsSupported
  • JobMessageFromOperator
  • JobName
  • JobOriginatingUserName
  • JobPriority
  • JobPrioritySupported
  • JobSheets
  • JobState
  • JobStateReason
  • JobStateReasons
  • Media
  • MediaName
  • MediaPrintableArea
  • MediaSize
  • MediaSize.Engineering
  • MediaSize.ISO
  • MediaSize.JIS
  • MediaSize.NA
  • MediaSize.Other
  • MediaSizeName
  • MediaTray
  • MultipleDocumentHandling
  • NumberOfDocuments
  • NumberOfInterveningJobs
  • NumberUp
  • NumberUpSupported
  • OrientationRequested
  • OutputDeviceAssigned
  • PageRanges
  • PagesPerMinute
  • PagesPerMinuteColor
  • PDLOverrideSupported
  • PresentationDirection
  • PrinterInfo
  • PrinterIsAcceptingJobs
  • PrinterLocation
  • PrinterMakeAndModel
  • PrinterMessageFromOperator
  • PrinterMoreInfo
  • PrinterMoreInfoManufacturer
  • PrinterName
  • PrinterResolution
  • PrinterState
  • PrinterStateReason
  • PrinterStateReasons
  • PrinterURI
  • PrintQuality
  • QueuedJobCount
  • ReferenceUriSchemesSupported
  • RequestingUserName
  • Severity
  • SheetCollate
  • Sides


javax.print.event

Interfaces

  • PrintJobAttributeListener
  • PrintJobListener
  • PrintServiceAttributeListener

Classes

  • PrintEvent
  • PrintJobAdapter
  • PrintJobAttributeEvent
  • PrintJobEvent
  • PrintServiceAttributeEvent


javax.rmi

Classes

  • PortableRemoteObject


javax.rmi.CORBA

Interfaces

  • PortableRemoteObjectDelegate
  • StubDelegate
  • Tie
  • UtilDelegate
  • ValueHandler
  • ValueHandlerMultiFormat

Classes

  • ClassDesc
  • Stub
  • Util


compact2 - javax.rmi.ssl

Classes

  • SslRMIClientSocketFactory
  • SslRMIServerSocketFactory


ssl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.rmi.ssl

Provides implementations of RMIClientSocketFactory and RMIServerSocketFactory over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.

See: Description

  • Class Summary
    Class Description
    SslRMIClientSocketFactory
    An SslRMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls via SSL.
    SslRMIServerSocketFactory
    An SslRMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls via SSL.

Package javax.rmi.ssl Description

Provides implementations of RMIClientSocketFactory and RMIServerSocketFactory over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.rmi.ssl

Classes

  • SslRMIClientSocketFactory
  • SslRMIServerSocketFactory


ssl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.rmi.ssl

Provides implementations of RMIClientSocketFactory and RMIServerSocketFactory over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.

See: Description

  • Class Summary
    Class Description
    SslRMIClientSocketFactory
    An SslRMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls via SSL.
    SslRMIServerSocketFactory
    An SslRMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls via SSL.

Package javax.rmi.ssl Description

Provides implementations of RMIClientSocketFactory and RMIServerSocketFactory over the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.rmi.ssl

Classes

  • SslRMIClientSocketFactory
  • SslRMIServerSocketFactory


compact1 - javax.script

Interfaces

  • Bindings
  • Compilable
  • Invocable
  • ScriptContext
  • ScriptEngine
  • ScriptEngineFactory

Classes

  • AbstractScriptEngine
  • CompiledScript
  • ScriptEngineManager
  • SimpleBindings
  • SimpleScriptContext

Exceptions

  • ScriptException


script

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.script

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications.

See: Description

  • Interface Summary
    Interface Description
    Bindings
    A mapping of key/value pairs, all of whose keys are Strings.
    Compilable
    The optional interface implemented by ScriptEngines whose methods compile scripts to a form that can be executed repeatedly without recompilation.
    Invocable
    The optional interface implemented by ScriptEngines whose methods allow the invocation of procedures in scripts that have previously been executed.
    ScriptContext
    The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications.
    ScriptEngine
    ScriptEngine is the fundamental interface whose methods must be fully functional in every implementation of this specification.
    ScriptEngineFactory
    ScriptEngineFactory is used to describe and instantiate ScriptEngines.
  • Class Summary
    Class Description
    AbstractScriptEngine
    Provides a standard implementation for several of the variants of the eval method.
    CompiledScript
    Extended by classes that store results of compilations.
    ScriptEngineManager
    The ScriptEngineManager implements a discovery and instantiation mechanism for ScriptEngine classes and also maintains a collection of key/value pairs storing state shared by all engines created by the Manager.
    SimpleBindings
    A simple implementation of Bindings backed by a HashMap or some other specified Map.
    SimpleScriptContext
    Simple implementation of ScriptContext.
  • Exception Summary
    Exception Description
    ScriptException
    The generic Exception class for the Scripting APIs.

Package javax.script Description

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications. This API is intended for use by application programmers who wish to execute programs written in scripting languages in their Java applications. The scripting language programs are usually provided by the end-users of the applications.

The main areas of functionality of javax.script package include

  1. Script execution: Scripts are streams of characters used as sources for programs executed by script engines. Script execution uses eval methods of ScriptEngine and methods of the Invocable interface.

  2. Binding: This facility allows Java objects to be exposed to script programs as named variables. Bindings and ScriptContext classes are used for this purpose.

  3. Compilation: This functionality allows the intermediate code generated by the front-end of a script engine to be stored and executed repeatedly. This benefits applications that execute the same script multiple times. These applications can gain efficiency since the engines' front-ends only need to execute once per script rather than once per script execution. Note that this functionality is optional and script engines may choose not to implement it. Callers need to check for availability of the Compilable interface using an instanceof check.

  4. Invocation: This functionality allows the reuse of intermediate code generated by a script engine's front-end. Whereas Compilation allows entire scripts represented by intermediate code to be re-executed, Invocation functionality allows individual procedures/methods in the scripts to be re-executed. As in the case with compilation, not all script engines are required to provide this facility. Caller has to check for Invocable availability.

  5. Script engine discovery and Metadata: Applications written to the Scripting API might have specific requirements on script engines. Some may require a specific scripting language and/or version while others may require a specific implementation engine and/or version. Script engines are packaged in a specified way so that engines can be discovered at runtime and queried for attributes. The Engine discovery mechanism is based on the Service discovery mechanism described in the Jar File Specification. Script engine implementing classes are packaged in jar files that include a text resource named META-INF/services/javax.script.ScriptEngineFactory. This resource must include a line for each ScriptEngineFactory that is packaged in the jar file. ScriptEngineManager includes getEngineFactories method to get all ScriptEngineFactory instances discovered using this mechanism. ScriptEngineFactory has methods to query attributes about script engine.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.script

Interfaces

  • Bindings
  • Compilable
  • Invocable
  • ScriptContext
  • ScriptEngine
  • ScriptEngineFactory

Classes

  • AbstractScriptEngine
  • CompiledScript
  • ScriptEngineManager
  • SimpleBindings
  • SimpleScriptContext

Exceptions

  • ScriptException


script

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.script

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications.

See: Description

  • Interface Summary
    Interface Description
    Bindings
    A mapping of key/value pairs, all of whose keys are Strings.
    Compilable
    The optional interface implemented by ScriptEngines whose methods compile scripts to a form that can be executed repeatedly without recompilation.
    Invocable
    The optional interface implemented by ScriptEngines whose methods allow the invocation of procedures in scripts that have previously been executed.
    ScriptContext
    The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications.
    ScriptEngine
    ScriptEngine is the fundamental interface whose methods must be fully functional in every implementation of this specification.
    ScriptEngineFactory
    ScriptEngineFactory is used to describe and instantiate ScriptEngines.
  • Class Summary
    Class Description
    AbstractScriptEngine
    Provides a standard implementation for several of the variants of the eval method.
    CompiledScript
    Extended by classes that store results of compilations.
    ScriptEngineManager
    The ScriptEngineManager implements a discovery and instantiation mechanism for ScriptEngine classes and also maintains a collection of key/value pairs storing state shared by all engines created by the Manager.
    SimpleBindings
    A simple implementation of Bindings backed by a HashMap or some other specified Map.
    SimpleScriptContext
    Simple implementation of ScriptContext.
  • Exception Summary
    Exception Description
    ScriptException
    The generic Exception class for the Scripting APIs.

Package javax.script Description

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications. This API is intended for use by application programmers who wish to execute programs written in scripting languages in their Java applications. The scripting language programs are usually provided by the end-users of the applications.

The main areas of functionality of javax.script package include

  1. Script execution: Scripts are streams of characters used as sources for programs executed by script engines. Script execution uses eval methods of ScriptEngine and methods of the Invocable interface.

  2. Binding: This facility allows Java objects to be exposed to script programs as named variables. Bindings and ScriptContext classes are used for this purpose.

  3. Compilation: This functionality allows the intermediate code generated by the front-end of a script engine to be stored and executed repeatedly. This benefits applications that execute the same script multiple times. These applications can gain efficiency since the engines' front-ends only need to execute once per script rather than once per script execution. Note that this functionality is optional and script engines may choose not to implement it. Callers need to check for availability of the Compilable interface using an instanceof check.

  4. Invocation: This functionality allows the reuse of intermediate code generated by a script engine's front-end. Whereas Compilation allows entire scripts represented by intermediate code to be re-executed, Invocation functionality allows individual procedures/methods in the scripts to be re-executed. As in the case with compilation, not all script engines are required to provide this facility. Caller has to check for Invocable availability.

  5. Script engine discovery and Metadata: Applications written to the Scripting API might have specific requirements on script engines. Some may require a specific scripting language and/or version while others may require a specific implementation engine and/or version. Script engines are packaged in a specified way so that engines can be discovered at runtime and queried for attributes. The Engine discovery mechanism is based on the Service discovery mechanism described in the Jar File Specification. Script engine implementing classes are packaged in jar files that include a text resource named META-INF/services/javax.script.ScriptEngineFactory. This resource must include a line for each ScriptEngineFactory that is packaged in the jar file. ScriptEngineManager includes getEngineFactories method to get all ScriptEngineFactory instances discovered using this mechanism. ScriptEngineFactory has methods to query attributes about script engine.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.script

Interfaces

  • Bindings
  • Compilable
  • Invocable
  • ScriptContext
  • ScriptEngine
  • ScriptEngineFactory

Classes

  • AbstractScriptEngine
  • CompiledScript
  • ScriptEngineManager
  • SimpleBindings
  • SimpleScriptContext

Exceptions

  • ScriptException


script

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.script

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications.

See: Description

  • Interface Summary
    Interface Description
    Bindings
    A mapping of key/value pairs, all of whose keys are Strings.
    Compilable
    The optional interface implemented by ScriptEngines whose methods compile scripts to a form that can be executed repeatedly without recompilation.
    Invocable
    The optional interface implemented by ScriptEngines whose methods allow the invocation of procedures in scripts that have previously been executed.
    ScriptContext
    The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications.
    ScriptEngine
    ScriptEngine is the fundamental interface whose methods must be fully functional in every implementation of this specification.
    ScriptEngineFactory
    ScriptEngineFactory is used to describe and instantiate ScriptEngines.
  • Class Summary
    Class Description
    AbstractScriptEngine
    Provides a standard implementation for several of the variants of the eval method.
    CompiledScript
    Extended by classes that store results of compilations.
    ScriptEngineManager
    The ScriptEngineManager implements a discovery and instantiation mechanism for ScriptEngine classes and also maintains a collection of key/value pairs storing state shared by all engines created by the Manager.
    SimpleBindings
    A simple implementation of Bindings backed by a HashMap or some other specified Map.
    SimpleScriptContext
    Simple implementation of ScriptContext.
  • Exception Summary
    Exception Description
    ScriptException
    The generic Exception class for the Scripting APIs.

Package javax.script Description

The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications. This API is intended for use by application programmers who wish to execute programs written in scripting languages in their Java applications. The scripting language programs are usually provided by the end-users of the applications.

The main areas of functionality of javax.script package include

  1. Script execution: Scripts are streams of characters used as sources for programs executed by script engines. Script execution uses eval methods of ScriptEngine and methods of the Invocable interface.

  2. Binding: This facility allows Java objects to be exposed to script programs as named variables. Bindings and ScriptContext classes are used for this purpose.

  3. Compilation: This functionality allows the intermediate code generated by the front-end of a script engine to be stored and executed repeatedly. This benefits applications that execute the same script multiple times. These applications can gain efficiency since the engines' front-ends only need to execute once per script rather than once per script execution. Note that this functionality is optional and script engines may choose not to implement it. Callers need to check for availability of the Compilable interface using an instanceof check.

  4. Invocation: This functionality allows the reuse of intermediate code generated by a script engine's front-end. Whereas Compilation allows entire scripts represented by intermediate code to be re-executed, Invocation functionality allows individual procedures/methods in the scripts to be re-executed. As in the case with compilation, not all script engines are required to provide this facility. Caller has to check for Invocable availability.

  5. Script engine discovery and Metadata: Applications written to the Scripting API might have specific requirements on script engines. Some may require a specific scripting language and/or version while others may require a specific implementation engine and/or version. Script engines are packaged in a specified way so that engines can be discovered at runtime and queried for attributes. The Engine discovery mechanism is based on the Service discovery mechanism described in the Jar File Specification. Script engine implementing classes are packaged in jar files that include a text resource named META-INF/services/javax.script.ScriptEngineFactory. This resource must include a line for each ScriptEngineFactory that is packaged in the jar file. ScriptEngineManager includes getEngineFactories method to get all ScriptEngineFactory instances discovered using this mechanism. ScriptEngineFactory has methods to query attributes about script engine.

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.script

Interfaces

  • Bindings
  • Compilable
  • Invocable
  • ScriptContext
  • ScriptEngine
  • ScriptEngineFactory

Classes

  • AbstractScriptEngine
  • CompiledScript
  • ScriptEngineManager
  • SimpleBindings
  • SimpleScriptContext

Exceptions

  • ScriptException


compact1 - javax.security.auth

Interfaces

  • Destroyable
  • Refreshable

Classes

  • AuthPermission
  • Policy
  • PrivateCredentialPermission
  • Subject
  • SubjectDomainCombiner

Exceptions

  • DestroyFailedException
  • RefreshFailedException


auth

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.auth

This package provides a framework for authentication and authorization.

See: Description

  • Interface Summary
    Interface Description
    Destroyable
    Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
    Refreshable
    Objects such as credentials may optionally implement this interface to provide the capability to refresh itself.
  • Class Summary
    Class Description
    AuthPermission
    This class is for authentication permissions.
    Policy Deprecated
    as of JDK version 1.4 -- Replaced by java.security.Policy.
    PrivateCredentialPermission
    This class is used to protect access to private Credentials belonging to a particular Subject.
    Subject
    A Subject represents a grouping of related information for a single entity, such as a person.
    SubjectDomainCombiner
    A SubjectDomainCombiner updates ProtectionDomains with Principals from the Subject associated with this SubjectDomainCombiner.
  • Exception Summary
    Exception Description
    DestroyFailedException
    Signals that a destroy operation failed.
    RefreshFailedException
    Signals that a refresh operation failed.

Package javax.security.auth Description

This package provides a framework for authentication and authorization. The framework allows authentication to be performed in pluggable fashion. Different authentication modules can be plugged under an application without requiring modifications to the application itself. The authorization component allows specification of access controls based on code location, code signers and code executors (Subjects).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.auth

Interfaces

  • Destroyable
  • Refreshable

Classes

  • AuthPermission
  • Policy
  • PrivateCredentialPermission
  • Subject
  • SubjectDomainCombiner

Exceptions

  • DestroyFailedException
  • RefreshFailedException


auth

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.auth

This package provides a framework for authentication and authorization.

See: Description

  • Interface Summary
    Interface Description
    Destroyable
    Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
    Refreshable
    Objects such as credentials may optionally implement this interface to provide the capability to refresh itself.
  • Class Summary
    Class Description
    AuthPermission
    This class is for authentication permissions.
    Policy Deprecated
    as of JDK version 1.4 -- Replaced by java.security.Policy.
    PrivateCredentialPermission
    This class is used to protect access to private Credentials belonging to a particular Subject.
    Subject
    A Subject represents a grouping of related information for a single entity, such as a person.
    SubjectDomainCombiner
    A SubjectDomainCombiner updates ProtectionDomains with Principals from the Subject associated with this SubjectDomainCombiner.
  • Exception Summary
    Exception Description
    DestroyFailedException
    Signals that a destroy operation failed.
    RefreshFailedException
    Signals that a refresh operation failed.

Package javax.security.auth Description

This package provides a framework for authentication and authorization. The framework allows authentication to be performed in pluggable fashion. Different authentication modules can be plugged under an application without requiring modifications to the application itself. The authorization component allows specification of access controls based on code location, code signers and code executors (Subjects).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.auth

Interfaces

  • Destroyable
  • Refreshable

Classes

  • AuthPermission
  • Policy
  • PrivateCredentialPermission
  • Subject
  • SubjectDomainCombiner

Exceptions

  • DestroyFailedException
  • RefreshFailedException


auth

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth

This package provides a framework for authentication and authorization.

See: Description

  • Interface Summary
    Interface Description
    Destroyable
    Objects such as credentials may optionally implement this interface to provide the capability to destroy its contents.
    Refreshable
    Objects such as credentials may optionally implement this interface to provide the capability to refresh itself.
  • Class Summary
    Class Description
    AuthPermission
    This class is for authentication permissions.
    Policy Deprecated
    as of JDK version 1.4 -- Replaced by java.security.Policy.
    PrivateCredentialPermission
    This class is used to protect access to private Credentials belonging to a particular Subject.
    Subject
    A Subject represents a grouping of related information for a single entity, such as a person.
    SubjectDomainCombiner
    A SubjectDomainCombiner updates ProtectionDomains with Principals from the Subject associated with this SubjectDomainCombiner.
  • Exception Summary
    Exception Description
    DestroyFailedException
    Signals that a destroy operation failed.
    RefreshFailedException
    Signals that a refresh operation failed.

Package javax.security.auth Description

This package provides a framework for authentication and authorization. The framework allows authentication to be performed in pluggable fashion. Different authentication modules can be plugged under an application without requiring modifications to the application itself. The authorization component allows specification of access controls based on code location, code signers and code executors (Subjects).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth

Interfaces

  • Destroyable
  • Refreshable

Classes

  • AuthPermission
  • Policy
  • PrivateCredentialPermission
  • Subject
  • SubjectDomainCombiner

Exceptions

  • DestroyFailedException
  • RefreshFailedException


compact1 - javax.security.auth.callback

Interfaces

  • Callback
  • CallbackHandler

Classes

  • ChoiceCallback
  • ConfirmationCallback
  • LanguageCallback
  • NameCallback
  • PasswordCallback
  • TextInputCallback
  • TextOutputCallback

Exceptions

  • UnsupportedCallbackException


callback

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.auth.callback

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).

See: Description

  • Interface Summary
    Interface Description
    Callback
    Implementations of this interface are passed to a CallbackHandler, allowing underlying security services the ability to interact with a calling application to retrieve specific authentication data such as usernames and passwords, or to display certain information, such as error and warning messages.
    CallbackHandler
    An application implements a CallbackHandler and passes it to underlying security services so that they may interact with the application to retrieve specific authentication data, such as usernames and passwords, or to display certain information, such as error and warning messages.
  • Class Summary
    Class Description
    ChoiceCallback
    Underlying security services instantiate and pass a ChoiceCallback to the handle method of a CallbackHandler to display a list of choices and to retrieve the selected choice(s).
    ConfirmationCallback
    Underlying security services instantiate and pass a ConfirmationCallback to the handle method of a CallbackHandler to ask for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
    LanguageCallback
    Underlying security services instantiate and pass a LanguageCallback to the handle method of a CallbackHandler to retrieve the Locale used for localizing text.
    NameCallback
    Underlying security services instantiate and pass a NameCallback to the handle method of a CallbackHandler to retrieve name information.
    PasswordCallback
    Underlying security services instantiate and pass a PasswordCallback to the handle method of a CallbackHandler to retrieve password information.
    TextInputCallback
    Underlying security services instantiate and pass a TextInputCallback to the handle method of a CallbackHandler to retrieve generic text information.
    TextOutputCallback
    Underlying security services instantiate and pass a TextOutputCallback to the handle method of a CallbackHandler to display information messages, warning messages and error messages.
  • Exception Summary
    Exception Description
    UnsupportedCallbackException
    Signals that a CallbackHandler does not recognize a particular Callback.

Package javax.security.auth.callback Description

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.auth.callback

Interfaces

  • Callback
  • CallbackHandler

Classes

  • ChoiceCallback
  • ConfirmationCallback
  • LanguageCallback
  • NameCallback
  • PasswordCallback
  • TextInputCallback
  • TextOutputCallback

Exceptions

  • UnsupportedCallbackException


callback

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.auth.callback

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).

See: Description

  • Interface Summary
    Interface Description
    Callback
    Implementations of this interface are passed to a CallbackHandler, allowing underlying security services the ability to interact with a calling application to retrieve specific authentication data such as usernames and passwords, or to display certain information, such as error and warning messages.
    CallbackHandler
    An application implements a CallbackHandler and passes it to underlying security services so that they may interact with the application to retrieve specific authentication data, such as usernames and passwords, or to display certain information, such as error and warning messages.
  • Class Summary
    Class Description
    ChoiceCallback
    Underlying security services instantiate and pass a ChoiceCallback to the handle method of a CallbackHandler to display a list of choices and to retrieve the selected choice(s).
    ConfirmationCallback
    Underlying security services instantiate and pass a ConfirmationCallback to the handle method of a CallbackHandler to ask for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
    LanguageCallback
    Underlying security services instantiate and pass a LanguageCallback to the handle method of a CallbackHandler to retrieve the Locale used for localizing text.
    NameCallback
    Underlying security services instantiate and pass a NameCallback to the handle method of a CallbackHandler to retrieve name information.
    PasswordCallback
    Underlying security services instantiate and pass a PasswordCallback to the handle method of a CallbackHandler to retrieve password information.
    TextInputCallback
    Underlying security services instantiate and pass a TextInputCallback to the handle method of a CallbackHandler to retrieve generic text information.
    TextOutputCallback
    Underlying security services instantiate and pass a TextOutputCallback to the handle method of a CallbackHandler to display information messages, warning messages and error messages.
  • Exception Summary
    Exception Description
    UnsupportedCallbackException
    Signals that a CallbackHandler does not recognize a particular Callback.

Package javax.security.auth.callback Description

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.auth.callback

Interfaces

  • Callback
  • CallbackHandler

Classes

  • ChoiceCallback
  • ConfirmationCallback
  • LanguageCallback
  • NameCallback
  • PasswordCallback
  • TextInputCallback
  • TextOutputCallback

Exceptions

  • UnsupportedCallbackException


callback

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth.callback

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).

See: Description

  • Interface Summary
    Interface Description
    Callback
    Implementations of this interface are passed to a CallbackHandler, allowing underlying security services the ability to interact with a calling application to retrieve specific authentication data such as usernames and passwords, or to display certain information, such as error and warning messages.
    CallbackHandler
    An application implements a CallbackHandler and passes it to underlying security services so that they may interact with the application to retrieve specific authentication data, such as usernames and passwords, or to display certain information, such as error and warning messages.
  • Class Summary
    Class Description
    ChoiceCallback
    Underlying security services instantiate and pass a ChoiceCallback to the handle method of a CallbackHandler to display a list of choices and to retrieve the selected choice(s).
    ConfirmationCallback
    Underlying security services instantiate and pass a ConfirmationCallback to the handle method of a CallbackHandler to ask for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
    LanguageCallback
    Underlying security services instantiate and pass a LanguageCallback to the handle method of a CallbackHandler to retrieve the Locale used for localizing text.
    NameCallback
    Underlying security services instantiate and pass a NameCallback to the handle method of a CallbackHandler to retrieve name information.
    PasswordCallback
    Underlying security services instantiate and pass a PasswordCallback to the handle method of a CallbackHandler to retrieve password information.
    TextInputCallback
    Underlying security services instantiate and pass a TextInputCallback to the handle method of a CallbackHandler to retrieve generic text information.
    TextOutputCallback
    Underlying security services instantiate and pass a TextOutputCallback to the handle method of a CallbackHandler to display information messages, warning messages and error messages.
  • Exception Summary
    Exception Description
    UnsupportedCallbackException
    Signals that a CallbackHandler does not recognize a particular Callback.

Package javax.security.auth.callback Description

This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth.callback

Interfaces

  • Callback
  • CallbackHandler

Classes

  • ChoiceCallback
  • ConfirmationCallback
  • LanguageCallback
  • NameCallback
  • PasswordCallback
  • TextInputCallback
  • TextOutputCallback

Exceptions

  • UnsupportedCallbackException


compact3 - javax.security.auth.kerberos

Classes

  • DelegationPermission
  • KerberosKey
  • KerberosPrincipal
  • KerberosTicket
  • KeyTab
  • ServicePermission


kerberos

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth.kerberos

This package contains utility classes related to the Kerberos network authentication protocol.

See: Description

  • Class Summary
    Class Description
    DelegationPermission
    This class is used to restrict the usage of the Kerberos delegation model, ie: forwardable and proxiable tickets.
    KerberosKey
    This class encapsulates a long term secret key for a Kerberos principal.
    KerberosPrincipal
    This class encapsulates a Kerberos principal.
    KerberosTicket
    This class encapsulates a Kerberos ticket and associated information as viewed from the client's point of view.
    KeyTab
    This class encapsulates a keytab file.
    ServicePermission
    This class is used to protect Kerberos services and the credentials necessary to access those services.

Package javax.security.auth.kerberos Description

This package contains utility classes related to the Kerberos network authentication protocol. They do not provide much Kerberos support themselves.

The Kerberos network authentication protocol is defined in RFC 4120. The Java platform contains support for the client side of Kerberos via the org.ietf.jgss package. There might also be a login module that implements LoginModule to authenticate Kerberos principals.

You can provide the name of your default realm and Key Distribution Center (KDC) host for that realm using the system properties java.security.krb5.realm and java.security.krb5.kdc. Both properties must be set. Alternatively, the java.security.krb5.conf system property can be set to the location of an MIT style krb5.conf configuration file. If none of these system properties are set, the krb5.conf file is searched for in an implementation-specific manner. Typically, an implementation will first look for a krb5.conf file in <java-home>/lib/security and failing that, in an OS-specific location.

Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth.kerberos

Classes

  • DelegationPermission
  • KerberosKey
  • KerberosPrincipal
  • KerberosTicket
  • KeyTab
  • ServicePermission


compact1 - javax.security.auth.login

Interfaces

  • Configuration.Parameters

Classes

  • AppConfigurationEntry
  • AppConfigurationEntry.LoginModuleControlFlag
  • Configuration
  • ConfigurationSpi
  • LoginContext

Exceptions

  • AccountException
  • AccountExpiredException
  • AccountLockedException
  • AccountNotFoundException
  • CredentialException
  • CredentialExpiredException
  • CredentialNotFoundException
  • FailedLoginException
  • LoginException


login

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.auth.login

This package provides a pluggable authentication framework.

See: Description

  • Interface Summary
    Interface Description
    Configuration.Parameters
    This represents a marker interface for Configuration parameters.
  • Class Summary
    Class Description
    AppConfigurationEntry
    This class represents a single LoginModule entry configured for the application specified in the getAppConfigurationEntry(String appName) method in the Configuration class.
    AppConfigurationEntry.LoginModuleControlFlag
    This class represents whether or not a LoginModule is REQUIRED, REQUISITE, SUFFICIENT or OPTIONAL.
    Configuration
    A Configuration object is responsible for specifying which LoginModules should be used for a particular application, and in what order the LoginModules should be invoked.
    ConfigurationSpi
    This class defines the Service Provider Interface (SPI) for the Configuration class.
    LoginContext
    The LoginContext class describes the basic methods used to authenticate Subjects and provides a way to develop an application independent of the underlying authentication technology.
  • Exception Summary
    Exception Description
    AccountException
    A generic account exception.
    AccountExpiredException
    Signals that a user account has expired.
    AccountLockedException
    Signals that an account was locked.
    AccountNotFoundException
    Signals that an account was not found.
    CredentialException
    A generic credential exception.
    CredentialExpiredException
    Signals that a Credential has expired.
    CredentialNotFoundException
    Signals that a credential was not found.
    FailedLoginException
    Signals that user authentication failed.
    LoginException
    This is the basic login exception.

Package javax.security.auth.login Description

This package provides a pluggable authentication framework.

Package Specification

  • Java™ Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.auth.login

Interfaces

  • Configuration.Parameters

Classes

  • AppConfigurationEntry
  • AppConfigurationEntry.LoginModuleControlFlag
  • Configuration
  • ConfigurationSpi
  • LoginContext

Exceptions

  • AccountException
  • AccountExpiredException
  • AccountLockedException
  • AccountNotFoundException
  • CredentialException
  • CredentialExpiredException
  • CredentialNotFoundException
  • FailedLoginException
  • LoginException


login

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.auth.login

This package provides a pluggable authentication framework.

See: Description

  • Interface Summary
    Interface Description
    Configuration.Parameters
    This represents a marker interface for Configuration parameters.
  • Class Summary
    Class Description
    AppConfigurationEntry
    This class represents a single LoginModule entry configured for the application specified in the getAppConfigurationEntry(String appName) method in the Configuration class.
    AppConfigurationEntry.LoginModuleControlFlag
    This class represents whether or not a LoginModule is REQUIRED, REQUISITE, SUFFICIENT or OPTIONAL.
    Configuration
    A Configuration object is responsible for specifying which LoginModules should be used for a particular application, and in what order the LoginModules should be invoked.
    ConfigurationSpi
    This class defines the Service Provider Interface (SPI) for the Configuration class.
    LoginContext
    The LoginContext class describes the basic methods used to authenticate Subjects and provides a way to develop an application independent of the underlying authentication technology.
  • Exception Summary
    Exception Description
    AccountException
    A generic account exception.
    AccountExpiredException
    Signals that a user account has expired.
    AccountLockedException
    Signals that an account was locked.
    AccountNotFoundException
    Signals that an account was not found.
    CredentialException
    A generic credential exception.
    CredentialExpiredException
    Signals that a Credential has expired.
    CredentialNotFoundException
    Signals that a credential was not found.
    FailedLoginException
    Signals that user authentication failed.
    LoginException
    This is the basic login exception.

Package javax.security.auth.login Description

This package provides a pluggable authentication framework.

Package Specification

  • Java™ Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.auth.login

Interfaces

  • Configuration.Parameters

Classes

  • AppConfigurationEntry
  • AppConfigurationEntry.LoginModuleControlFlag
  • Configuration
  • ConfigurationSpi
  • LoginContext

Exceptions

  • AccountException
  • AccountExpiredException
  • AccountLockedException
  • AccountNotFoundException
  • CredentialException
  • CredentialExpiredException
  • CredentialNotFoundException
  • FailedLoginException
  • LoginException


login

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth.login

This package provides a pluggable authentication framework.

See: Description

  • Interface Summary
    Interface Description
    Configuration.Parameters
    This represents a marker interface for Configuration parameters.
  • Class Summary
    Class Description
    AppConfigurationEntry
    This class represents a single LoginModule entry configured for the application specified in the getAppConfigurationEntry(String appName) method in the Configuration class.
    AppConfigurationEntry.LoginModuleControlFlag
    This class represents whether or not a LoginModule is REQUIRED, REQUISITE, SUFFICIENT or OPTIONAL.
    Configuration
    A Configuration object is responsible for specifying which LoginModules should be used for a particular application, and in what order the LoginModules should be invoked.
    ConfigurationSpi
    This class defines the Service Provider Interface (SPI) for the Configuration class.
    LoginContext
    The LoginContext class describes the basic methods used to authenticate Subjects and provides a way to develop an application independent of the underlying authentication technology.
  • Exception Summary
    Exception Description
    AccountException
    A generic account exception.
    AccountExpiredException
    Signals that a user account has expired.
    AccountLockedException
    Signals that an account was locked.
    AccountNotFoundException
    Signals that an account was not found.
    CredentialException
    A generic credential exception.
    CredentialExpiredException
    Signals that a Credential has expired.
    CredentialNotFoundException
    Signals that a credential was not found.
    FailedLoginException
    Signals that user authentication failed.
    LoginException
    This is the basic login exception.

Package javax.security.auth.login Description

This package provides a pluggable authentication framework.

Package Specification

  • Java™ Cryptography Architecture Standard Algorithm Name Documentation
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth.login

Interfaces

  • Configuration.Parameters

Classes

  • AppConfigurationEntry
  • AppConfigurationEntry.LoginModuleControlFlag
  • Configuration
  • ConfigurationSpi
  • LoginContext

Exceptions

  • AccountException
  • AccountExpiredException
  • AccountLockedException
  • AccountNotFoundException
  • CredentialException
  • CredentialExpiredException
  • CredentialNotFoundException
  • FailedLoginException
  • LoginException


compact1 - javax.security.auth.spi

Interfaces

  • LoginModule


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.auth.spi

This package provides the interface to be used for implementing pluggable authentication modules.

See: Description

  • Interface Summary
    Interface Description
    LoginModule
    LoginModule describes the interface implemented by authentication technology providers.

Package javax.security.auth.spi Description

This package provides the interface to be used for implementing pluggable authentication modules.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.auth.spi

Interfaces

  • LoginModule


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.auth.spi

This package provides the interface to be used for implementing pluggable authentication modules.

See: Description

  • Interface Summary
    Interface Description
    LoginModule
    LoginModule describes the interface implemented by authentication technology providers.

Package javax.security.auth.spi Description

This package provides the interface to be used for implementing pluggable authentication modules.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.auth.spi

Interfaces

  • LoginModule


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth.spi

This package provides the interface to be used for implementing pluggable authentication modules.

See: Description

  • Interface Summary
    Interface Description
    LoginModule
    LoginModule describes the interface implemented by authentication technology providers.

Package javax.security.auth.spi Description

This package provides the interface to be used for implementing pluggable authentication modules.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth.spi

Interfaces

  • LoginModule


compact1 - javax.security.auth.x500

Classes

  • X500Principal
  • X500PrivateCredential


x500

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.auth.x500

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

See: Description

  • Class Summary
    Class Description
    X500Principal
    This class represents an X.500 Principal.
    X500PrivateCredential
    This class represents an X500PrivateCredential.

Package javax.security.auth.x500 Description

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

Package Specification

  • RFC 1779: A String Representation of Distinguished Names
  • RFC 2253: Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names
  • RFC 3280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 4512: Lightweight Directory Access Protocol (LDAP): Directory Information Models
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.auth.x500

Classes

  • X500Principal
  • X500PrivateCredential


x500

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.auth.x500

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

See: Description

  • Class Summary
    Class Description
    X500Principal
    This class represents an X.500 Principal.
    X500PrivateCredential
    This class represents an X500PrivateCredential.

Package javax.security.auth.x500 Description

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

Package Specification

  • RFC 1779: A String Representation of Distinguished Names
  • RFC 2253: Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names
  • RFC 3280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 4512: Lightweight Directory Access Protocol (LDAP): Directory Information Models
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.auth.x500

Classes

  • X500Principal
  • X500PrivateCredential


x500

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.auth.x500

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

See: Description

  • Class Summary
    Class Description
    X500Principal
    This class represents an X.500 Principal.
    X500PrivateCredential
    This class represents an X500PrivateCredential.

Package javax.security.auth.x500 Description

This package contains the classes that should be used to store X500 Principal and X500 Private Credentials in a Subject.

Package Specification

  • RFC 1779: A String Representation of Distinguished Names
  • RFC 2253: Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names
  • RFC 3280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
  • RFC 4512: Lightweight Directory Access Protocol (LDAP): Directory Information Models
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.auth.x500

Classes

  • X500Principal
  • X500PrivateCredential


compact1 - javax.security.cert

Classes

  • Certificate
  • X509Certificate

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package javax.security.cert

Provides classes for public key certificates.

See: Description

  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    X509Certificate
    Abstract class for X.509 v1 certificates.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.

Package javax.security.cert Description

Provides classes for public key certificates. These classes include a simplified version of the java.security.cert package. These classes were developed as part of the Java Secure Socket Extension (JSSE). When JSSE was added to the J2SE version 1.4, this package was added for backward-compatibility reasons only. New applications should not use this package, but rather java.security.cert.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - javax.security.cert

Classes

  • Certificate
  • X509Certificate

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.security.cert

Provides classes for public key certificates.

See: Description

  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    X509Certificate
    Abstract class for X.509 v1 certificates.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.

Package javax.security.cert Description

Provides classes for public key certificates. These classes include a simplified version of the java.security.cert package. These classes were developed as part of the Java Secure Socket Extension (JSSE). When JSSE was added to the J2SE version 1.4, this package was added for backward-compatibility reasons only. New applications should not use this package, but rather java.security.cert.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.security.cert

Classes

  • Certificate
  • X509Certificate

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException


cert

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.cert

Provides classes for public key certificates.

See: Description

  • Class Summary
    Class Description
    Certificate
    Abstract class for managing a variety of identity certificates.
    X509Certificate
    Abstract class for X.509 v1 certificates.
  • Exception Summary
    Exception Description
    CertificateEncodingException
    Certificate Encoding Exception.
    CertificateException
    This exception indicates one of a variety of certificate problems.
    CertificateExpiredException
    Certificate Expired Exception.
    CertificateNotYetValidException
    Certificate is not yet valid exception.
    CertificateParsingException
    Certificate Parsing Exception.

Package javax.security.cert Description

Provides classes for public key certificates. These classes include a simplified version of the java.security.cert package. These classes were developed as part of the Java Secure Socket Extension (JSSE). When JSSE was added to the J2SE version 1.4, this package was added for backward-compatibility reasons only. New applications should not use this package, but rather java.security.cert.
Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.cert

Classes

  • Certificate
  • X509Certificate

Exceptions

  • CertificateEncodingException
  • CertificateException
  • CertificateExpiredException
  • CertificateNotYetValidException
  • CertificateParsingException


compact3 - javax.security.sasl

Interfaces

  • SaslClient
  • SaslClientFactory
  • SaslServer
  • SaslServerFactory

Classes

  • AuthorizeCallback
  • RealmCallback
  • RealmChoiceCallback
  • Sasl

Exceptions

  • AuthenticationException
  • SaslException


sasl

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.security.sasl

Contains class and interfaces for supporting SASL.

See: Description

  • Interface Summary
    Interface Description
    SaslClient
    Performs SASL authentication as a client.
    SaslClientFactory
    An interface for creating instances of SaslClient.
    SaslServer
    Performs SASL authentication as a server.
    SaslServerFactory
    An interface for creating instances of SaslServer.
  • Class Summary
    Class Description
    AuthorizeCallback
    This callback is used by SaslServer to determine whether one entity (identified by an authenticated authentication id) can act on behalf of another entity (identified by an authorization id).
    RealmCallback
    This callback is used by SaslClient and SaslServer to retrieve realm information.
    RealmChoiceCallback
    This callback is used by SaslClient and SaslServer to obtain a realm given a list of realm choices.
    Sasl
    A static class for creating SASL clients and servers.
  • Exception Summary
    Exception Description
    AuthenticationException
    This exception is thrown by a SASL mechanism implementation to indicate that the SASL exchange has failed due to reasons related to authentication, such as an invalid identity, passphrase, or key.
    SaslException
    This class represents an error that has occurred when using SASL.

Package javax.security.sasl Description

Contains class and interfaces for supporting SASL. This package defines classes and interfaces for SASL mechanisms. It is used by developers to add authentication support for connection-based protocols that use SASL.

SASL Overview

Simple Authentication and Security Layer (SASL) specifies a challenge-response protocol in which data is exchanged between the client and the server for the purposes of authentication and (optional) establishment of a security layer on which to carry on subsequent communications. It is used with connection-based protocols such as LDAPv3 or IMAPv4. SASL is described in RFC 2222. There are various mechanisms defined for SASL. Each mechanism defines the data that must be exchanged between the client and server in order for the authentication to succeed. This data exchange required for a particular mechanism is referred to to as its protocol profile. The following are some examples of mechanisms that have been defined by the Internet standards community.
  • DIGEST-MD5 (RFC 2831). This mechanism defines how HTTP Digest Authentication can be used as a SASL mechanism.
  • Anonymous (RFC 2245). This mechanism is anonymous authentication in which no credentials are necessary.
  • External (RFC 2222). This mechanism obtains authentication information from an external source (such as TLS or IPsec).
  • S/Key (RFC 2222). This mechanism uses the MD4 digest algorithm to exchange data based on a shared secret.
  • GSSAPI (RFC 2222). This mechanism uses the GSSAPI for obtaining authentication information.
Some of these mechanisms provide both authentication and establishment of a security layer, others only authentication. Anonymous and S/Key do not provide for any security layers. GSSAPI and DIGEST-MD5 allow negotiation of the security layer. For External, the security layer is determined by the external protocol.

Usage

Users of this API are typically developers who produce client library implementations for connection-based protocols, such as LDAPv3 and IMAPv4, and developers who write servers (such as LDAP servers and IMAP servers). Developers who write client libraries use the SaslClient and SaslClientFactory interfaces. Developers who write servers use the SaslServer and SaslServerFactory interfaces. Among these two groups of users, each can be further divided into two groups: those who produce the SASL mechanisms and those who use the SASL mechanisms. The producers of SASL mechanisms need to provide implementations for these interfaces, while users of the SASL mechanisms use the APIs in this package to access those implementations.

Related Documentation

Please refer to the Java SASL Programming Guide for information on how to use this API.
Since:
1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.security.sasl

Interfaces

  • SaslClient
  • SaslClientFactory
  • SaslServer
  • SaslServerFactory

Classes

  • AuthorizeCallback
  • RealmCallback
  • RealmChoiceCallback
  • Sasl

Exceptions

  • AuthenticationException
  • SaslException


javax.sound.midi

Interfaces

  • ControllerEventListener
  • MetaEventListener
  • MidiChannel
  • MidiDevice
  • MidiDeviceReceiver
  • MidiDeviceTransmitter
  • Receiver
  • Sequencer
  • Soundbank
  • Synthesizer
  • Transmitter

Classes

  • Instrument
  • MetaMessage
  • MidiDevice.Info
  • MidiEvent
  • MidiFileFormat
  • MidiMessage
  • MidiSystem
  • Patch
  • Sequence
  • Sequencer.SyncMode
  • ShortMessage
  • SoundbankResource
  • SysexMessage
  • Track
  • VoiceStatus

Exceptions

  • InvalidMidiDataException
  • MidiUnavailableException


javax.sound.midi.spi

Classes

  • MidiDeviceProvider
  • MidiFileReader
  • MidiFileWriter
  • SoundbankReader


javax.sound.sampled

Interfaces

  • Clip
  • DataLine
  • Line
  • LineListener
  • Mixer
  • Port
  • SourceDataLine
  • TargetDataLine

Classes

  • AudioFileFormat
  • AudioFileFormat.Type
  • AudioFormat
  • AudioFormat.Encoding
  • AudioInputStream
  • AudioPermission
  • AudioSystem
  • BooleanControl
  • BooleanControl.Type
  • CompoundControl
  • CompoundControl.Type
  • Control
  • Control.Type
  • DataLine.Info
  • EnumControl
  • EnumControl.Type
  • FloatControl
  • FloatControl.Type
  • Line.Info
  • LineEvent
  • LineEvent.Type
  • Mixer.Info
  • Port.Info
  • ReverbType

Exceptions

  • LineUnavailableException
  • UnsupportedAudioFileException


javax.sound.sampled.spi

Classes

  • AudioFileReader
  • AudioFileWriter
  • FormatConversionProvider
  • MixerProvider


compact2 - javax.sql

Interfaces

  • CommonDataSource
  • ConnectionEventListener
  • ConnectionPoolDataSource
  • DataSource
  • PooledConnection
  • RowSet
  • RowSetInternal
  • RowSetListener
  • RowSetMetaData
  • RowSetReader
  • RowSetWriter
  • StatementEventListener
  • XAConnection
  • XADataSource

Classes

  • ConnectionEvent
  • RowSetEvent
  • StatementEvent


sql

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.sql

Provides the API for server side data source access and processing from the JavaTM programming language.

See: Description

  • Interface Summary
    Interface Description
    CommonDataSource
    Interface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.
    ConnectionEventListener
    An object that registers to be notified of events generated by a PooledConnection object.
    ConnectionPoolDataSource
    A factory for PooledConnection objects.
    DataSource
    A factory for connections to the physical data source that this DataSource object represents.
    PooledConnection
    An object that provides hooks for connection pool management.
    RowSet
    The interface that adds support to the JDBC API for the JavaBeans™ component model.
    RowSetInternal
    The interface that a RowSet object implements in order to present itself to a RowSetReader or RowSetWriter object.
    RowSetListener
    An interface that must be implemented by a component that wants to be notified when a significant event happens in the life of a RowSet object.
    RowSetMetaData
    An object that contains information about the columns in a RowSet object.
    RowSetReader
    The facility that a disconnected RowSet object calls on to populate itself with rows of data.
    RowSetWriter
    An object that implements the RowSetWriter interface, called a writer.
    StatementEventListener
    An object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.
    XAConnection
    An object that provides support for distributed transactions.
    XADataSource
    A factory for XAConnection objects that is used internally.
  • Class Summary
    Class Description
    ConnectionEvent
    An Event object that provides information about the source of a connection-related event.
    RowSetEvent
    An Event object generated when an event occurs to a RowSet object.
    StatementEvent
    A StatementEvent is sent to all StatementEventListeners which were registered with a PooledConnection.

Package javax.sql Description

Provides the API for server side data source access and processing from the JavaTM programming language. This package supplements the java.sql package and, as of the version 1.4 release, is included in the Java Platform, Standard Edition (Java SETM). It remains an essential part of the Java Platform, Enterprise Edition (Java EETM).

The javax.sql package provides for the following:

  1. The DataSource interface as an alternative to the DriverManager for establishing a connection with a data source
  2. Connection pooling and Statement pooling
  3. Distributed transactions
  4. Rowsets

Applications use the DataSource and RowSet APIs directly, but the connection pooling and distributed transaction APIs are used internally by the middle-tier infrastructure.

Using a DataSource Object to Make a Connection

The javax.sql package provides the preferred way to make a connection with a data source. The DriverManager class, the original mechanism, is still valid, and code using it will continue to run. However, the newer DataSource mechanism is preferred because it offers many advantages over the DriverManager mechanism.

These are the main advantages of using a DataSource object to make a connection:

  • Changes can be made to a data source's properties, which means that it is not necessary to make changes in application code when something about the data source or driver changes.
  • Connection and Statement pooling and distributed transactions are available through a DataSource object that is implemented to work with the middle-tier infrastructure. Connections made through the DriverManager do not have connection and statement pooling or distributed transaction capabilities.

Driver vendors provide DataSource implementations. A particular DataSource object represents a particular physical data source, and each connection the DataSource object creates is a connection to that physical data source.

A logical name for the data source is registered with a naming service that uses the Java Naming and Directory InterfaceTM (JNDI) API, usually by a system administrator or someone performing the duties of a system administrator. An application can retrieve the DataSource object it wants by doing a lookup on the logical name that has been registered for it. The application can then use the DataSource object to create a connection to the physical data source it represents.

A DataSource object can be implemented to work with the middle tier infrastructure so that the connections it produces will be pooled for reuse. An application that uses such a DataSource implementation will automatically get a connection that participates in connection pooling. A DataSource object can also be implemented to work with the middle tier infrastructure so that the connections it produces can be used for distributed transactions without any special coding.

Connection Pooling and Statement Pooling

Connections made via a DataSource object that is implemented to work with a middle tier connection pool manager will participate in connection pooling. This can improve performance dramatically because creating new connections is very expensive. Connection pooling allows a connection to be used and reused, thus cutting down substantially on the number of new connections that need to be created.

Connection pooling is totally transparent. It is done automatically in the middle tier of a Java EE configuration, so from an application's viewpoint, no change in code is required. An application simply uses the DataSource.getConnection method to get the pooled connection and uses it the same way it uses any Connection object.

The classes and interfaces used for connection pooling are:

  • ConnectionPoolDataSource
  • PooledConnection
  • ConnectionEvent
  • ConnectionEventListener
  • StatementEvent
  • StatementEventListener
The connection pool manager, a facility in the middle tier of a three-tier architecture, uses these classes and interfaces behind the scenes. When a ConnectionPoolDataSource object is called on to create a PooledConnection object, the connection pool manager will register as a ConnectionEventListener object with the new PooledConnection object. When the connection is closed or there is an error, the connection pool manager (being a listener) gets a notification that includes a ConnectionEvent object.

If the connection pool manager supports Statement pooling, for PreparedStatements, which can be determined by invoking the method DatabaseMetaData.supportsStatementPooling, the connection pool manager will register as a StatementEventListener object with the new PooledConnection object. When the PreparedStatement is closed or there is an error, the connection pool manager (being a listener) gets a notification that includes a StatementEvent object.

Distributed Transactions

As with pooled connections, connections made via a DataSource object that is implemented to work with the middle tier infrastructure may participate in distributed transactions. This gives an application the ability to involve data sources on multiple servers in a single transaction.

The classes and interfaces used for distributed transactions are:

  • XADataSource
  • XAConnection
These interfaces are used by the transaction manager; an application does not use them directly.

The XAConnection interface is derived from the PooledConnection interface, so what applies to a pooled connection also applies to a connection that is part of a distributed transaction. A transaction manager in the middle tier handles everything transparently. The only change in application code is that an application cannot do anything that would interfere with the transaction manager's handling of the transaction. Specifically, an application cannot call the methods Connection.commit or Connection.rollback, and it cannot set the connection to be in auto-commit mode (that is, it cannot call Connection.setAutoCommit(true)).

An application does not need to do anything special to participate in a distributed transaction. It simply creates connections to the data sources it wants to use via the DataSource.getConnection method, just as it normally does. The transaction manager manages the transaction behind the scenes. The XADataSource interface creates XAConnection objects, and each XAConnection object creates an XAResource object that the transaction manager uses to manage the connection.

Rowsets

The RowSet interface works with various other classes and interfaces behind the scenes. These can be grouped into three categories.
  1. Event Notification
    • RowSetListener
      A RowSet object is a JavaBeansTM component because it has properties and participates in the JavaBeans event notification mechanism. The RowSetListener interface is implemented by a component that wants to be notified about events that occur to a particular RowSet object. Such a component registers itself as a listener with a rowset via the RowSet.addRowSetListener method.

      When the RowSet object changes one of its rows, changes all of it rows, or moves its cursor, it also notifies each listener that is registered with it. The listener reacts by carrying out its implementation of the notification method called on it.

    • RowSetEvent
      As part of its internal notification process, a RowSet object creates an instance of RowSetEvent and passes it to the listener. The listener can use this RowSetEvent object to find out which rowset had the event.

  2. Metadata
    • RowSetMetaData
      This interface, derived from the ResultSetMetaData interface, provides information about the columns in a RowSet object. An application can use RowSetMetaData methods to find out how many columns the rowset contains and what kind of data each column can contain.

      The RowSetMetaData interface provides methods for setting the information about columns, but an application would not normally use these methods. When an application calls the RowSet method execute, the RowSet object will contain a new set of rows, and its RowSetMetaData object will have been internally updated to contain information about the new columns.

  3. The Reader/Writer Facility
    A RowSet object that implements the RowSetInternal interface can call on the RowSetReader object associated with it to populate itself with data. It can also call on the RowSetWriter object associated with it to write any changes to its rows back to the data source from which it originally got the rows. A rowset that remains connected to its data source does not need to use a reader and writer because it can simply operate on the data source directly.
    • RowSetInternal
      By implementing the RowSetInternal interface, a RowSet object gets access to its internal state and is able to call on its reader and writer. A rowset keeps track of the values in its current rows and of the values that immediately preceded the current ones, referred to as the original values. A rowset also keeps track of (1) the parameters that have been set for its command and (2) the connection that was passed to it, if any. A rowset uses the RowSetInternal methods behind the scenes to get access to this information. An application does not normally invoke these methods directly.

    • RowSetReader
      A disconnected RowSet object that has implemented the RowSetInternal interface can call on its reader (the RowSetReader object associated with it) to populate it with data. When an application calls the RowSet.execute method, that method calls on the rowset's reader to do much of the work. Implementations can vary widely, but generally a reader makes a connection to the data source, reads data from the data source and populates the rowset with it, and closes the connection. A reader may also update the RowSetMetaData object for its rowset. The rowset's internal state is also updated, either by the reader or directly by the method RowSet.execute.
    • RowSetWriter
      A disconnected RowSet object that has implemented the RowSetInternal interface can call on its writer (the RowSetWriter object associated with it) to write changes back to the underlying data source. Implementations may vary widely, but generally, a writer will do the following:

      • Make a connection to the data source
      • Check to see whether there is a conflict, that is, whether a value that has been changed in the rowset has also been changed in the data source
      • Write the new values to the data source if there is no conflict
      • Close the connection

The RowSet interface may be implemented in any number of ways, and anyone may write an implementation. Developers are encouraged to use their imaginations in coming up with new ways to use rowsets.

IMPORTANT NOTE: Code that uses API marked "Since 1.6" must be run using a JDBC technology driver that implements the JDBC 4.0 API. You must check your driver documentation to be sure that it implements the particular features you want to use.

Package Specification

  • Specification of the JDBC 4.0 API

Related Documentation

The Java Series book published by Addison-Wesley Longman provides detailed information about the classes and interfaces in the javax.sql package:
  • JDBCTM API Tutorial and Reference, Third Edition:

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.sql

Interfaces

  • CommonDataSource
  • ConnectionEventListener
  • ConnectionPoolDataSource
  • DataSource
  • PooledConnection
  • RowSet
  • RowSetInternal
  • RowSetListener
  • RowSetMetaData
  • RowSetReader
  • RowSetWriter
  • StatementEventListener
  • XAConnection
  • XADataSource

Classes

  • ConnectionEvent
  • RowSetEvent
  • StatementEvent


sql

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.sql

Provides the API for server side data source access and processing from the JavaTM programming language.

See: Description

  • Interface Summary
    Interface Description
    CommonDataSource
    Interface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.
    ConnectionEventListener
    An object that registers to be notified of events generated by a PooledConnection object.
    ConnectionPoolDataSource
    A factory for PooledConnection objects.
    DataSource
    A factory for connections to the physical data source that this DataSource object represents.
    PooledConnection
    An object that provides hooks for connection pool management.
    RowSet
    The interface that adds support to the JDBC API for the JavaBeans™ component model.
    RowSetInternal
    The interface that a RowSet object implements in order to present itself to a RowSetReader or RowSetWriter object.
    RowSetListener
    An interface that must be implemented by a component that wants to be notified when a significant event happens in the life of a RowSet object.
    RowSetMetaData
    An object that contains information about the columns in a RowSet object.
    RowSetReader
    The facility that a disconnected RowSet object calls on to populate itself with rows of data.
    RowSetWriter
    An object that implements the RowSetWriter interface, called a writer.
    StatementEventListener
    An object that registers to be notified of events that occur on PreparedStatements that are in the Statement pool.
    XAConnection
    An object that provides support for distributed transactions.
    XADataSource
    A factory for XAConnection objects that is used internally.
  • Class Summary
    Class Description
    ConnectionEvent
    An Event object that provides information about the source of a connection-related event.
    RowSetEvent
    An Event object generated when an event occurs to a RowSet object.
    StatementEvent
    A StatementEvent is sent to all StatementEventListeners which were registered with a PooledConnection.

Package javax.sql Description

Provides the API for server side data source access and processing from the JavaTM programming language. This package supplements the java.sql package and, as of the version 1.4 release, is included in the Java Platform, Standard Edition (Java SETM). It remains an essential part of the Java Platform, Enterprise Edition (Java EETM).

The javax.sql package provides for the following:

  1. The DataSource interface as an alternative to the DriverManager for establishing a connection with a data source
  2. Connection pooling and Statement pooling
  3. Distributed transactions
  4. Rowsets

Applications use the DataSource and RowSet APIs directly, but the connection pooling and distributed transaction APIs are used internally by the middle-tier infrastructure.

Using a DataSource Object to Make a Connection

The javax.sql package provides the preferred way to make a connection with a data source. The DriverManager class, the original mechanism, is still valid, and code using it will continue to run. However, the newer DataSource mechanism is preferred because it offers many advantages over the DriverManager mechanism.

These are the main advantages of using a DataSource object to make a connection:

  • Changes can be made to a data source's properties, which means that it is not necessary to make changes in application code when something about the data source or driver changes.
  • Connection and Statement pooling and distributed transactions are available through a DataSource object that is implemented to work with the middle-tier infrastructure. Connections made through the DriverManager do not have connection and statement pooling or distributed transaction capabilities.

Driver vendors provide DataSource implementations. A particular DataSource object represents a particular physical data source, and each connection the DataSource object creates is a connection to that physical data source.

A logical name for the data source is registered with a naming service that uses the Java Naming and Directory InterfaceTM (JNDI) API, usually by a system administrator or someone performing the duties of a system administrator. An application can retrieve the DataSource object it wants by doing a lookup on the logical name that has been registered for it. The application can then use the DataSource object to create a connection to the physical data source it represents.

A DataSource object can be implemented to work with the middle tier infrastructure so that the connections it produces will be pooled for reuse. An application that uses such a DataSource implementation will automatically get a connection that participates in connection pooling. A DataSource object can also be implemented to work with the middle tier infrastructure so that the connections it produces can be used for distributed transactions without any special coding.

Connection Pooling and Statement Pooling

Connections made via a DataSource object that is implemented to work with a middle tier connection pool manager will participate in connection pooling. This can improve performance dramatically because creating new connections is very expensive. Connection pooling allows a connection to be used and reused, thus cutting down substantially on the number of new connections that need to be created.

Connection pooling is totally transparent. It is done automatically in the middle tier of a Java EE configuration, so from an application's viewpoint, no change in code is required. An application simply uses the DataSource.getConnection method to get the pooled connection and uses it the same way it uses any Connection object.

The classes and interfaces used for connection pooling are:

  • ConnectionPoolDataSource
  • PooledConnection
  • ConnectionEvent
  • ConnectionEventListener
  • StatementEvent
  • StatementEventListener
The connection pool manager, a facility in the middle tier of a three-tier architecture, uses these classes and interfaces behind the scenes. When a ConnectionPoolDataSource object is called on to create a PooledConnection object, the connection pool manager will register as a ConnectionEventListener object with the new PooledConnection object. When the connection is closed or there is an error, the connection pool manager (being a listener) gets a notification that includes a ConnectionEvent object.

If the connection pool manager supports Statement pooling, for PreparedStatements, which can be determined by invoking the method DatabaseMetaData.supportsStatementPooling, the connection pool manager will register as a StatementEventListener object with the new PooledConnection object. When the PreparedStatement is closed or there is an error, the connection pool manager (being a listener) gets a notification that includes a StatementEvent object.

Distributed Transactions

As with pooled connections, connections made via a DataSource object that is implemented to work with the middle tier infrastructure may participate in distributed transactions. This gives an application the ability to involve data sources on multiple servers in a single transaction.

The classes and interfaces used for distributed transactions are:

  • XADataSource
  • XAConnection
These interfaces are used by the transaction manager; an application does not use them directly.

The XAConnection interface is derived from the PooledConnection interface, so what applies to a pooled connection also applies to a connection that is part of a distributed transaction. A transaction manager in the middle tier handles everything transparently. The only change in application code is that an application cannot do anything that would interfere with the transaction manager's handling of the transaction. Specifically, an application cannot call the methods Connection.commit or Connection.rollback, and it cannot set the connection to be in auto-commit mode (that is, it cannot call Connection.setAutoCommit(true)).

An application does not need to do anything special to participate in a distributed transaction. It simply creates connections to the data sources it wants to use via the DataSource.getConnection method, just as it normally does. The transaction manager manages the transaction behind the scenes. The XADataSource interface creates XAConnection objects, and each XAConnection object creates an XAResource object that the transaction manager uses to manage the connection.

Rowsets

The RowSet interface works with various other classes and interfaces behind the scenes. These can be grouped into three categories.
  1. Event Notification
    • RowSetListener
      A RowSet object is a JavaBeansTM component because it has properties and participates in the JavaBeans event notification mechanism. The RowSetListener interface is implemented by a component that wants to be notified about events that occur to a particular RowSet object. Such a component registers itself as a listener with a rowset via the RowSet.addRowSetListener method.

      When the RowSet object changes one of its rows, changes all of it rows, or moves its cursor, it also notifies each listener that is registered with it. The listener reacts by carrying out its implementation of the notification method called on it.

    • RowSetEvent
      As part of its internal notification process, a RowSet object creates an instance of RowSetEvent and passes it to the listener. The listener can use this RowSetEvent object to find out which rowset had the event.

  2. Metadata
    • RowSetMetaData
      This interface, derived from the ResultSetMetaData interface, provides information about the columns in a RowSet object. An application can use RowSetMetaData methods to find out how many columns the rowset contains and what kind of data each column can contain.

      The RowSetMetaData interface provides methods for setting the information about columns, but an application would not normally use these methods. When an application calls the RowSet method execute, the RowSet object will contain a new set of rows, and its RowSetMetaData object will have been internally updated to contain information about the new columns.

  3. The Reader/Writer Facility
    A RowSet object that implements the RowSetInternal interface can call on the RowSetReader object associated with it to populate itself with data. It can also call on the RowSetWriter object associated with it to write any changes to its rows back to the data source from which it originally got the rows. A rowset that remains connected to its data source does not need to use a reader and writer because it can simply operate on the data source directly.
    • RowSetInternal
      By implementing the RowSetInternal interface, a RowSet object gets access to its internal state and is able to call on its reader and writer. A rowset keeps track of the values in its current rows and of the values that immediately preceded the current ones, referred to as the original values. A rowset also keeps track of (1) the parameters that have been set for its command and (2) the connection that was passed to it, if any. A rowset uses the RowSetInternal methods behind the scenes to get access to this information. An application does not normally invoke these methods directly.

    • RowSetReader
      A disconnected RowSet object that has implemented the RowSetInternal interface can call on its reader (the RowSetReader object associated with it) to populate it with data. When an application calls the RowSet.execute method, that method calls on the rowset's reader to do much of the work. Implementations can vary widely, but generally a reader makes a connection to the data source, reads data from the data source and populates the rowset with it, and closes the connection. A reader may also update the RowSetMetaData object for its rowset. The rowset's internal state is also updated, either by the reader or directly by the method RowSet.execute.
    • RowSetWriter
      A disconnected RowSet object that has implemented the RowSetInternal interface can call on its writer (the RowSetWriter object associated with it) to write changes back to the underlying data source. Implementations may vary widely, but generally, a writer will do the following:

      • Make a connection to the data source
      • Check to see whether there is a conflict, that is, whether a value that has been changed in the rowset has also been changed in the data source
      • Write the new values to the data source if there is no conflict
      • Close the connection

The RowSet interface may be implemented in any number of ways, and anyone may write an implementation. Developers are encouraged to use their imaginations in coming up with new ways to use rowsets.

IMPORTANT NOTE: Code that uses API marked "Since 1.6" must be run using a JDBC technology driver that implements the JDBC 4.0 API. You must check your driver documentation to be sure that it implements the particular features you want to use.

Package Specification

  • Specification of the JDBC 4.0 API

Related Documentation

The Java Series book published by Addison-Wesley Longman provides detailed information about the classes and interfaces in the javax.sql package:
  • JDBCTM API Tutorial and Reference, Third Edition:

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.sql

Interfaces

  • CommonDataSource
  • ConnectionEventListener
  • ConnectionPoolDataSource
  • DataSource
  • PooledConnection
  • RowSet
  • RowSetInternal
  • RowSetListener
  • RowSetMetaData
  • RowSetReader
  • RowSetWriter
  • StatementEventListener
  • XAConnection
  • XADataSource

Classes

  • ConnectionEvent
  • RowSetEvent
  • StatementEvent


compact3 - javax.sql.rowset

Interfaces

  • CachedRowSet
  • FilteredRowSet
  • JdbcRowSet
  • Joinable
  • JoinRowSet
  • Predicate
  • RowSetFactory
  • WebRowSet

Classes

  • BaseRowSet
  • RowSetMetaDataImpl
  • RowSetProvider

Exceptions

  • RowSetWarning


rowset

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.sql.rowset

Standard interfaces and base classes for JDBC RowSet implementations.

See: Description

  • Interface Summary
    Interface Description
    CachedRowSet
    The interface that all standard implementations of CachedRowSet must implement.
    FilteredRowSet
    The standard interface that all standard implementations of FilteredRowSet must implement.
    JdbcRowSet
    The standard interface that all standard implementations of JdbcRowSet must implement.
    Joinable
    1.0 Background
    JoinRowSet
    The JoinRowSet interface provides a mechanism for combining related data from different RowSet objects into one JoinRowSet object, which represents an SQL JOIN.
    Predicate
    The standard interface that provides the framework for all FilteredRowSet objects to describe their filters.
    RowSetFactory
    An interface that defines the implementation of a factory that is used to obtain different types of RowSet implementations.
    WebRowSet
    The standard interface that all implementations of a WebRowSet must implement.
  • Class Summary
    Class Description
    BaseRowSet
    An abstract class providing a RowSet object with its basic functionality.
    RowSetMetaDataImpl
    Provides implementations for the methods that set and get metadata information about a RowSet object's columns.
    RowSetProvider
    A factory API that enables applications to obtain a RowSetFactory implementation that can be used to create different types of RowSet implementations.
  • Exception Summary
    Exception Description
    RowSetWarning
    An extension of SQLException that provides information about database warnings set on RowSet objects.

Package javax.sql.rowset Description

Standard interfaces and base classes for JDBC RowSet implementations. This package contains interfaces and classes that a standard RowSet implementation either implements or extends.

Table of Contents

  • 1.0 Package Specification
  • 2.0 Standard RowSet Definitions
  • 3.0 Implementer's Guide
  • 4.0 Related Specifications
  • 5.0 Related Documentation

1.0 Package Specification

This package specifies five standard JDBC RowSet interfaces. All five extend the RowSet interface described in the JDBC 3.0 specification. It is anticipated that additional definitions of more specialized JDBC RowSet types will emerge as this technology matures. Future definitions should be specified as subinterfaces using inheritance similar to the way it is used in this specification.

Note: The interface definitions provided in this package form the basis for all compliant JDBC RowSet implementations. Vendors and more advanced developers who intend to provide their own compliant RowSet implementations should pay particular attention to the assertions detailed in specification interfaces.

2.0 Standard RowSet Definitions

  • JdbcRowSet - A wrapper around a ResultSet object that makes it possible to use the result set as a JavaBeans™ component. Thus, a JdbcRowSet object can be a Bean that any tool makes available for assembling an application as part of a component based architecture . A JdbcRowSet object is a connected RowSet object, that is, it must continually maintain its connection to its data source using a JDBC technology-enabled driver ("JDBC driver"). In addition, a JdbcRowSet object provides a fully updatable and scrollable tabular data structure as defined in the JDBC 3.0 specification.

  • CachedRowSet™ - A CachedRowSet object is a JavaBeans™ component that is scrollable, updatable, serializable, and generally disconnected from the source of its data. A CachedRowSet object typically contains rows from a result set, but it can also contain rows from any file with a tabular format, such as a spreadsheet. CachedRowSet implementations must use the SyncFactory to manage and obtain pluggable SyncProvider objects to provide synchronization between the disconnected RowSet object and the originating data source. Typically a SyncProvider implementation relies upon a JDBC driver to obtain connectivity to a particular data source. Further details on this mechanism are discussed in the javax.sql.rowset.spi package specification.

  • WebRowSet - A WebRowSet object is an extension of CachedRowSet that can read and write a RowSet object in a well formed XML format. This class calls an XmlReader object (an extension of the RowSetReader interface) to read a rowset in XML format. It calls an XmlWriter object (an extension of the RowSetWriter interface) to write a rowset in XML format. The reader and writer required by WebRowSet objects are provided by the SyncFactory in the form of SyncProvider implementations. In order to ensure well formed XML usage, a standard generic XML Schema is defined and published at http://java.sun.com/xml/ns/jdbc/webrowset.xsd.

  • FilteredRowSet - A FilteredRowSet object provides filtering functionality in a programmatic and extensible way. There are many instances when a RowSet object has a need to provide filtering in its contents without sacrificing the disconnected environment, thus saving the expense of having to create a connection to the data source. Solutions to this need vary from providing heavyweight full scale SQL query abilities, to portable components, to more lightweight approaches. A FilteredRowSet object consumes an implementation of the Predicate interface, which may define a filter at run time. In turn, a FilteredRowSet object is tasked with enforcing the set filter for both inbound and outbound read and write operations. That is, all filters can be considered as bi-directional. No standard filters are defined; however, sufficient mechanics are specified to permit any required filter to be implemented.

  • JoinRowSet - The JoinRowSet interface describes a mechanism by which relationships can be established between two or more standard RowSet implementations. Any number of RowSet objects can be added to a JoinRowSet object provided the RowSetobjects can be related in a SQL JOIN like fashion. By definition, the SQL JOIN statement is used to combine the data contained in two (or more) relational database tables based upon a common attribute. By establishing and then enforcing column matches, a JoinRowSet object establishes relationships between RowSet instances without the need to touch the originating data source.

3.0 Implementer's Guide

Compliant implementations of JDBC RowSet Implementations must follow the assertions described in this specification. In accordance with the terms of the Java Community Process, a Test Compatibility Kit (TCK) can be licensed to ensure compatibility with the specification. The following paragraphs outline a number of starting points for implementers of the standard JDBC RowSet definitions. Implementers should also consult the Implementer's Guide in the javax.sql.rowset.spi package for guidelines on SyncProvider implementations.

  • 3.1 Constructor

    All RowSet implementations must provide a no-argument constructor.

  • 3.2 Role of the BaseRowSet Class

    A compliant JDBC RowSet implementation must implement one or more standard interfaces specified in this package and and may extend the BaseRowSet abstract class. For example, a CachedRowSet implementation must implement the CachedRowSet interface and extend the BaseRowSet abstract class. The BaseRowSet class provides the standard architecture on which all RowSet implementations should be built, regardless of whether the RowSet objects exist in a connected or disconnected environment. The BaseRowSet abstract class provides any RowSet implementation with its base functionality, including property manipulation and event notification that is fully compliant with JavaBeans component requirements. As an example, all implementations provided in the reference implementations (contained in the com.sun.rowset package) use the BaseRowSet class as a basis for their implementations.

    The following table illustrates the features that the BaseRowSet abstract class provides.

    Feature
             Details
    Properties
             Provides standard JavaBeans property manipulation mechanisms to allow applications to get and set RowSet command and property values. Refer to the documentation of the javax.sql.RowSet interface (available in the JDBC 3.0 specification) for more details on the standard RowSet properties.
    Event notification
             Provides standard JavaBeans event notifications to registered event listeners. Refer to the documentation of javax.sql.RowSetEvent interface (available in the JDBC 3.0 specification) for more details on how to register and handle standard RowSet events generated by compliant implementations.
    Setters for a RowSet object's command
             Provides a complete set of setter methods for setting RowSet command parameters.
    Streams
             Provides fields for storing of stream instances in addition to providing a set of constants for stream type designation.

  • 3.3 Connected RowSet Requirements

    The JdbcRowSet describes a RowSet object that must always be connected to the originating data source. Implementations of the JdbcRowSet should ensure that this connection is provided solely by a JDBC driver. Furthermore, RowSet objects that are implementations of the JdbcRowSet interface and are therefore operating in a connected environment do not use the SyncFactory to obtain a RowSetReader object or a RowSetWriter object. They can safely rely on the JDBC driver to supply their needs by virtue of the presence of an underlying updatable and scrollable ResultSet implementation.

  • 3.4 Disconnected RowSet Requirements

    A disconnected RowSet object, such as a CachedRowSet object, should delegate connection management to a SyncProvider object provided by the SyncFactory. To ensure fully disconnected semantics, all disconnected RowSet objects must ensure that the original connection made to the data source to populate the RowSet object is closed to permit the garbage collector to recover and release resources. The SyncProvider object ensures that the critical JDBC properties are maintained in order to re-establish a connection to the data source when a synchronization is required. A disconnected RowSet object should therefore ensure that no extraneous references remain on the Connection object.

  • 3.5 Role of RowSetMetaDataImpl

    The RowsetMetaDataImpl class is a utility class that provides an implementation of the RowSetMetaData interface, supplying standard setter method implementations for metadata for both connected and disconnected RowSet objects. All implementations are free to use this standard implementation but are not required to do so.

  • 3.6 RowSetWarning Class

    The RowSetWarning class provides warnings that can be set on RowSet implementations. Similar to SQLWarning objects, RowSetWarning objects are silently chained to the object whose method caused the warning to be thrown. All RowSet implementations should ensure that this chaining occurs if a warning is generated and also ensure that the warnings are available via the getRowSetWarnings method defined in either the JdbcRowSet interface or the CachedRowSet interface. After a warning has been retrieved with one of the getRowSetWarnings methods, the RowSetWarning method getNextWarning can be called on it to retrieve any warnings that might be chained on it. If a warning is returned, getNextWarning can be called on it, and so on until there are no more warnings.

  • 3.7 The Joinable Interface

    The Joinable interface provides both connected and disconnected RowSet objects with the capability to be added to a JoinRowSet object in an SQL JOIN operation. A RowSet object that has implemented the Joinable interface can set a match column, retrieve a match column, or unset a match column. A JoinRowSet object can then use the RowSet object's match column as a basis for adding the RowSet object.

  • 3.8 The RowSetFactory Interface

    A RowSetFactory implementation must be provided.

4.0 Related Specifications

  • JDBC 3.0 Specification
  • XML Schema
  • SyncML

5.0 Related Documentation

  • JDBC RowSet Tutorial
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.sql.rowset

Interfaces

  • CachedRowSet
  • FilteredRowSet
  • JdbcRowSet
  • Joinable
  • JoinRowSet
  • Predicate
  • RowSetFactory
  • WebRowSet

Classes

  • BaseRowSet
  • RowSetMetaDataImpl
  • RowSetProvider

Exceptions

  • RowSetWarning


compact3 - javax.sql.rowset.serial

Classes

  • SerialArray
  • SerialBlob
  • SerialClob
  • SerialDatalink
  • SerialJavaObject
  • SerialRef
  • SerialStruct
  • SQLInputImpl
  • SQLOutputImpl

Exceptions

  • SerialException


serial

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.sql.rowset.serial

Provides utility classes to allow serializable mappings between SQL types and data types in the Java programming language.

See: Description

  • Class Summary
    Class Description
    SerialArray
    A serialized version of an Array object, which is the mapping in the Java programming language of an SQL ARRAY value.
    SerialBlob
    A serialized mapping in the Java programming language of an SQL BLOB value.
    SerialClob
    A serialized mapping in the Java programming language of an SQL CLOB value.
    SerialDatalink
    A serialized mapping in the Java programming language of an SQL DATALINK value.
    SerialJavaObject
    A serializable mapping in the Java programming language of an SQL JAVA_OBJECT value.
    SerialRef
    A serialized mapping of a Ref object, which is the mapping in the Java programming language of an SQL REF value.
    SerialStruct
    A serialized mapping in the Java programming language of an SQL structured type.
    SQLInputImpl
    An input stream used for custom mapping user-defined types (UDTs).
    SQLOutputImpl
    The output stream for writing the attributes of a custom-mapped user-defined type (UDT) back to the database.
  • Exception Summary
    Exception Description
    SerialException
    Indicates and an error with the serialization or de-serialization of SQL types such as BLOB, CLOB, STRUCT or ARRAY in addition to SQL types such as DATALINK and JAVAOBJECT

Package javax.sql.rowset.serial Description

Provides utility classes to allow serializable mappings between SQL types and data types in the Java programming language.

Standard JDBC RowSet implementations may use these utility classes to assist in the serialization of disconnected RowSet objects. This is useful when transmitting a disconnected RowSet object over the wire to a different VM or across layers within an application.

1.0 SerialArray

A serializable mapping in the Java programming language of an SQL ARRAY value.

The SerialArray class provides a constructor for creating a SerialArray instance from an Array object, methods for getting the base type and the SQL name for the base type, and methods for copying all or part of a SerialArray object.

2.0 SerialBlob

A serializable mapping in the Java programming language of an SQL BLOB value.

The SerialBlob class provides a constructor for creating an instance from a Blob object. Note that the Blob object should have brought the SQL BLOB value's data over to the client before a SerialBlob object is constructed from it. The data of an SQL BLOB value can be materialized on the client as an array of bytes (using the method Blob.getBytes) or as a stream of uninterpreted bytes (using the method Blob.getBinaryStream).

SerialBlob methods make it possible to make a copy of a SerialBlob object as an array of bytes or as a stream. They also make it possible to locate a given pattern of bytes or a Blob object within a SerialBlob object.

3.0 SerialClob

A serializable mapping in the Java programming language of an SQL CLOB value.

The SerialClob class provides a constructor for creating an instance from a Clob object. Note that the Clob object should have brought the SQL CLOB value's data over to the client before a SerialClob object is constructed from it. The data of an SQL CLOB value can be materialized on the client as a stream of Unicode characters.

SerialClob methods make it possible to get a substring from a SerialClob object or to locate the start of a pattern of characters.

5.0 SerialDatalink

A serializable mapping in the Java programming language of an SQL DATALINK value. A DATALINK value references a file outside of the underlying data source that the the originating data source manages.

RowSet implementations can use the method RowSet.getURL() to retrieve a java.net.URL object, which can be used to manipulate the external data.

    java.net.URL url = rowset.getURL(1);

6.0 SerialJavaObject

A serializable mapping in the Java programming language of an SQL JAVA_OBJECT value. Assuming the Java object instance implements the Serializable interface, this simply wraps the serialization process.

If however, the serialization is not possible in the case where the Java object is not immediately serializable, this class will attempt to serialize all non static members to permit the object instance state to be serialized. Static or transient fields cannot be serialized and attempting to do so will result in a SerialException being thrown.

7.0 SerialRef

A serializable mapping between the SQL REF type and the Java programming language.

The SerialRef class provides a constructor for creating a SerialRef instance from a Ref type and provides methods for getting and setting the Ref object type.

8.0 SerialStruct

A serializable mapping in the Java programming language of an SQL structured type. Each attribute that is not already serializable is mapped to a serializable form, and if an attribute is itself a structured type, each of its attributes that is not already serializable is mapped to a serializable form.

In addition, if a Map object is passed to one of the constructors or to the method getAttributes, the structured type is custom mapped according to the mapping specified in the Map object.
The SerialStruct class provides a constructor for creating an instance from a Struct object, a method for retrieving the SQL type name of the SQL structured type in the database, and methods for retrieving its attribute values.

9.0 SQLInputImpl

An input stream used for custom mapping user-defined types (UDTs). An SQLInputImpl object is an input stream that contains a stream of values that are the attributes of a UDT. This class is used by the driver behind the scenes when the method getObject is called on an SQL structured or distinct type that has a custom mapping; a programmer never invokes SQLInputImpl methods directly.

The SQLInputImpl class provides a set of reader methods analogous to the ResultSet getter methods. These methods make it possible to read the values in an SQLInputImpl object. The method wasNull is used to determine whether the the last value read was SQL NULL.

When a constructor or getter method that takes a Map object is called, the JDBC driver calls the method SQLData.getSQLType to determine the SQL type of the UDT being custom mapped. The driver creates an instance of SQLInputImpl, populating it with the attributes of the UDT. The driver then passes the input stream to the method SQLData.readSQL, which in turn calls the SQLInputImpl methods to read the attributes from the input stream.

10.0 SQLOutputImpl

The output stream for writing the attributes of a custom mapped user-defined type (UDT) back to the database. The driver uses this interface internally, and its methods are never directly invoked by an application programmer.

When an application calls the method PreparedStatement.setObject, the driver checks to see whether the value to be written is a UDT with a custom mapping. If it is, there will be an entry in a type map containing the Class object for the class that implements SQLData for this UDT. If the value to be written is an instance of SQLData, the driver will create an instance of SQLOutputImpl and pass it to the method SQLData.writeSQL. The method writeSQL in turn calls the appropriate SQLOutputImpl writer methods to write data from the SQLData object to the SQLOutputImpl output stream as the representation of an SQL user-defined type.

Custom Mapping

The JDBC API provides mechanisms for mapping an SQL structured type or DISTINCT type to the Java programming language. Typically, a structured type is mapped to a class, and its attributes are mapped to fields in the class. (A DISTINCT type can thought of as having one attribute.) However, there are many other possibilities, and there may be any number of different mappings.

A programmer defines the mapping by implementing the interface SQLData. For example, if an SQL structured type named AUTHORS has the attributes NAME, TITLE, and PUBLISHER, it could be mapped to a Java class named Authors. The Authors class could have the fields name, title, and publisher, to which the attributes of AUTHORS are mapped. In such a case, the implementation of SQLData could look like the following:

   public class Authors implements SQLData {
       public String name;
       public String title;
       public String publisher;

       private String sql_type;
       public String getSQLTypeName() {
           return sql_type;
       }

       public void readSQL(SQLInput stream, String type)
                                  throws SQLException  {
           sql_type = type;
           name = stream.readString();
           title = stream.readString();
           publisher = stream.readString();
       }

       public void writeSQL(SQLOutput stream) throws SQLException {
           stream.writeString(name);
           stream.writeString(title);
           stream.writeString(publisher);
       }
   }
A java.util.Map object is used to associate the SQL structured type with its mapping to the class Authors. The following code fragment shows how a Map object might be created and given an entry associating AUTHORS and Authors.
    java.util.Map map = new java.util.HashMap();
    map.put("SCHEMA_NAME.AUTHORS", Class.forName("Authors");
The Map object map now contains an entry with the fully qualified name of the SQL structured type and the Class object for the class Authors. It can be passed to a method to tell the driver how to map AUTHORS to Authors.

For a disconnected RowSet object, custom mapping can be done only when a Map object is passed to the method or constructor that will be doing the custom mapping. The situation is different for connected RowSet objects because they maintain a connection with the data source. A method that does custom mapping and is called by a disconnected RowSet object may use the Map object that is associated with the Connection object being used. So, in other words, if no map is specified, the connection's type map can be used by default.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.sql.rowset.serial

Classes

  • SerialArray
  • SerialBlob
  • SerialClob
  • SerialDatalink
  • SerialJavaObject
  • SerialRef
  • SerialStruct
  • SQLInputImpl
  • SQLOutputImpl

Exceptions

  • SerialException


compact3 - javax.sql.rowset.spi

Interfaces

  • SyncResolver
  • TransactionalWriter
  • XmlReader
  • XmlWriter

Classes

  • SyncFactory
  • SyncProvider

Exceptions

  • SyncFactoryException
  • SyncProviderException


spi

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.sql.rowset.spi

The standard classes and interfaces that a third party vendor has to use in its implementation of a synchronization provider.

See: Description

  • Interface Summary
    Interface Description
    SyncResolver
    Defines a framework that allows applications to use a manual decision tree to decide what should be done when a synchronization conflict occurs.
    TransactionalWriter
    A specialized interface that facilitates an extension of the standard SyncProvider abstract class so that it has finer grained transaction control.
    XmlReader
    A specialized interface that facilitates an extension of the SyncProvider abstract class for XML orientated synchronization providers.
    XmlWriter
    A specialized interface that facilitates an extension of the SyncProvider abstract class for XML orientated synchronization providers.
  • Class Summary
    Class Description
    SyncFactory
    The Service Provider Interface (SPI) mechanism that generates SyncProvider instances to be used by disconnected RowSet objects.
    SyncProvider
    The synchronization mechanism that provides reader/writer capabilities for disconnected RowSet objects.
  • Exception Summary
    Exception Description
    SyncFactoryException
    Indicates an error with SyncFactory mechanism.
    SyncProviderException
    Indicates an error with the SyncProvider mechanism.

Package javax.sql.rowset.spi Description

The standard classes and interfaces that a third party vendor has to use in its implementation of a synchronization provider. These classes and interfaces are referred to as the Service Provider Interface (SPI). A vendor may have its implementation included on the JDBC web page that lists available SyncProvider implementations by sending email to jdbc@sun.com. Doing this helps make developers aware of the implementation. To make it possible for a RowSet object to use an implementation, the vendor must register it with the SyncFactory singleton. (See the class comment for SyncProvider for a full explanation of the registration process and the naming convention to be used.)

Table of Contents

  • 1.0 Package Specification
  • 2.0 Service Provider Architecture
  • 3.0 Implementer's Guide
  • 4.0 Resolving Synchronization Conflicts
  • 5.0 Related Specifications
  • 6.0 Related Documentation

1.0 Package Specification

The following classes and interfaces make up the javax.sql.rowset.spi package:

  • SyncFactory
  • SyncProvider
  • SyncFactoryException
  • SyncProviderException
  • SyncResolver
  • XmlReader
  • XmlWriter
  • TransactionalWriter
The following interfaces, in the javax.sql package, are also part of the SPI:
  • RowSetReader
  • RowSetWriter

A SyncProvider implementation provides a disconnected RowSet object with the mechanisms for reading data into it and for writing data that has been modified in it back to the underlying data source. A reader, a RowSetReader or XMLReader object, reads data into a RowSet object when the CachedRowSet methods execute or populate are called. A writer, a RowSetWriter or XMLWriter object, writes changes back to the underlying data source when the CachedRowSet method acceptChanges is called.

The process of writing changes in a RowSet object to its data source is known as synchronization. The SyncProvider implementation that a RowSet object is using determines the level of synchronization that the RowSet object's writer uses. The various levels of synchronization are referred to as grades.

The lower grades of synchronization are known as optimistic concurrency levels because they optimistically assume that there will be no conflicts or very few conflicts. A conflict exists when the same data modified in the RowSet object has also been modified in the data source. Using the optimistic concurrency model means that if there is a conflict, modifications to either the data source or the RowSet object will be lost.

Higher grades of synchronization are called pessimistic because they assume that others will be accessing the data source and making modifications. These grades set varying levels of locks to increase the chances that no conflicts occur.

The lowest level of synchronization is simply writing any changes made to the RowSet object to its underlying data source. The writer does nothing to check for conflicts. If there is a conflict and the data source values are overwritten, the changes other parties have made by to the data source are lost.

The RIXMLProvider implementation uses the lowest level of synchronization and just writes RowSet changes to the data source. This is true because typically XML data sources do not enable transaction techniques for maintaining the integrity of data. However, specific standards groups have considered offering XML-based synchronization. For details, see

     http://www.syncml.org

For the the next level up, the writer checks to see if there are any conflicts, and if there are, it does not write anything to the data source. The problem with this concurrency level is that if another party has modified the corresponding data in the data source since the RowSet object got its data, the changes made to the RowSet object are lost. The RIOptimisticProvider implementation uses this level of synchronization.

At higher levels of synchronization, referred to as pessimistic concurrency, the writer take steps to avoid conflicts by setting locks. Setting locks can vary from setting a lock on a single row to setting a lock on a table or the entire data source. The level of synchronization is therefore a tradeoff between the ability of users to access the data source concurrently and the ability of the writer to keep the data in the RowSet object and its data source synchronized.

It is a requirement that all disconnected RowSet objects (CachedRowSet, FilteredRowSet, JoinRowSet, and WebRowSet objects) obtain their SyncProvider objects from the SyncFactory mechanism.

The reference implementation (RI) provides two synchronization providers.

  • RIOptimisticProvider
    The default provider that the SyncFactory instance will supply to a disconnected RowSet object when no provider implementation is specified.
    This synchronization provider uses an optimistic concurrency model, assuming that there will be few conflicts among users who are accessing the same data in a database. It avoids using locks; rather, it checks to see if there is a conflict before trying to synchronize the RowSet object and the data source. If there is a conflict, it does nothing, meaning that changes to the RowSet object are not persisted to the data source.
  • RIXMLProvider
    A synchronization provider that can be used with a WebRowSet object, which is a rowset that can be written in XML format or read from XML format. The RIXMLProvider implementation does no checking at all for conflicts and simply writes any updated data in the WebRowSet object to the underlying data source. WebRowSet objects use this provider when they are dealing with XML data.
These SyncProvider implementations are bundled with the reference implementation, which makes them always available to RowSet implementations. SyncProvider implementations make themselves available by being registered with the SyncFactory singleton. When a RowSet object requests a provider, by specifying it in the constructor or as an argument to the CachedRowSet method setSyncProvider, the SyncFactory singleton checks to see if the requested provider has been registered with it. If it has, the SyncFactory creates an instance of it and passes it to the requesting RowSet object. If the SyncProvider implementation that is specified has not been registered, the SyncFactory singleton causes a SyncFactoryException object to be thrown. If no provider is specified, the SyncFactory singleton will create an instance of the default provider implementation, RIOptimisticProvider, and pass it to the requesting RowSet object.

If a WebRowSet object does not specify a provider in its constructor, the SyncFactory will give it an instance of RIOptimisticProvider. However, the constructor for WebRowSet is implemented to set the provider to the RIXMLProvider, which reads and writes a RowSet object in XML format.

See the SyncProvider class specification for further details.

Vendors may develop a SyncProvider implementation with any one of the possible levels of synchronization, thus giving RowSet objects a choice of synchronization mechanisms. A vendor can make its implementation available by registering the fully qualified class name with Oracle Corporation at jdbc@sun.com. This process is discussed in further detail below.

2.0 Service Provider Interface Architecture

    2.1 Overview

    The Service Provider Interface provides a pluggable mechanism by which SyncProvider implementations can be registered and then generated when required. The lazy reference mechanism employed by the SyncFactory limits unnecessary resource consumption by not creating an instance until it is required by a disconnected RowSet object. The SyncFactory class also provides a standard API to configure logging options and streams that may be provided by a particular SyncProvider implementation.

    2.2 Registering with the SyncFactory

    A third party SyncProvider implementation must be registered with the SyncFactory in order for a disconnected RowSet object to obtain it and thereby use its javax.sql.RowSetReader and javax.sql.RowSetWriter implementations. The following registration mechanisms are available to all SyncProvider implementations:

    • System properties - Properties set at the command line. These properties are set at run time and apply system-wide per invocation of the Java application. See the section "Related Documentation" further related information.

    • Property Files - Properties specified in a standard property file. This can be specified using a System Property or by modifying a standard property file located in the platform run-time. The reference implementation of this technology includes a standard property file than can be edited to add additional SyncProvider objects.

    • JNDI Context - Available providers can be registered on a JNDI context. The SyncFactory will attempt to load SyncProvider objects bound to the context and register them with the factory. This context must be supplied to the SyncFactory for the mechanism to function correctly.

    Details on how to specify the system properties or properties in a property file and how to configure the JNDI Context are explained in detail in the SyncFactory class description.

    2.3 SyncFactory Provider Instance Generation Policies

    The SyncFactory generates a requested SyncProvider object if the provider has been correctly registered. The following policies are adhered to when either a disconnected RowSet object is instantiated with a specified SyncProvider implementation or is reconfigured at runtime with an alternative SyncProvider object.

    • If a SyncProvider object is specified and the SyncFactory contains no reference to the provider, a SyncFactoryException is thrown.

    • If a SyncProvider object is specified and the SyncFactory contains a reference to the provider, the requested provider is supplied.

    • If no SyncProvider object is specified, the reference implementation provider RIOptimisticProvider is supplied.

    These policies are explored in more detail in the SyncFactory class.

  • 3.0 SyncProvider Implementer's Guide

      3.1 Requirements

      A compliant SyncProvider implementation that is fully pluggable into the SyncFactory must extend and implement all abstract methods in the SyncProvider class. In addition, an implementation must determine the grade, locking and updatable view capabilities defined in the SyncProvider class definition. One or more of the SyncProvider description criteria must be supported. It is expected that vendor implementations will offer a range of grade, locking, and updatable view capabilities.

      Furthermore, the SyncProvider naming convention must be followed as detailed in the SyncProvider class description.

      3.2 Grades

      JSR 114 defines a set of grades to describe the quality of synchronization a SyncProvider object can offer a disconnected RowSet object. These grades are listed from the lowest quality of service to the highest.

      • GRADE_NONE - No synchronization with the originating data source is provided. A SyncProvider implementation returning this grade will simply attempt to write any data that has changed in the RowSet object to the underlying data source, overwriting whatever is there. No attempt is made to compare original values with current values to see if there is a conflict. The RIXMLProvider is implemented with this grade.

      • GRADE_CHECK_MODIFIED_AT_COMMIT - A low grade of optimistic synchronization. A SyncProvider implementation returning this grade will check for conflicts in rows that have changed between the last synchronization and the current synchronization under way. Any changes in the originating data source that have been modified will not be reflected in the disconnected RowSet object. If there are no conflicts, changes in the RowSet object will be written to the data source. If there are conflicts, no changes are written. The RIOptimisticProvider implementation uses this grade.

      • GRADE_CHECK_ALL_AT_COMMIT - A high grade of optimistic synchronization. A SyncProvider implementation returning this grade will check all rows, including rows that have not changed in the disconnected RowSet object. In this way, any changes to rows in the underlying data source will be reflected in the disconnected RowSet object when the synchronization finishes successfully.

      • GRADE_LOCK_WHEN_MODIFIED - A pessimistic grade of synchronization. SyncProvider implementations returning this grade will lock the row in the originating data source that corresponds to the row being changed in the RowSet object to reduce the possibility of other processes modifying the same data in the data source.

      • GRADE_LOCK_WHEN_LOADED - A higher pessimistic synchronization grade. A SyncProvider implementation returning this grade will lock the entire view and/or table affected by the original query used to populate a RowSet object.

      3.3 Locks

      JSR 114 defines a set of constants that specify whether any locks have been placed on a RowSet object's underlying data source and, if so, on which constructs the locks are placed. These locks will remain on the data source while the RowSet object is disconnected from the data source.

      These constants should be considered complementary to the grade constants. The default setting for the majority of grade settings requires that no data source locks remain when a RowSet object is disconnected from its data source. The grades GRADE_LOCK_WHEN_MODIFIED and GRADE_LOCK_WHEN_LOADED allow a disconnected RowSet object to have a fine-grained control over the degree of locking.

      • DATASOURCE_NO_LOCK - No locks remain on the originating data source. This is the default lock setting for all SyncProvider implementations unless otherwise directed by a RowSet object.

      • DATASOURCE_ROW_LOCK - A lock is placed on the rows that are touched by the original SQL query used to populate the RowSet object.

      • DATASOURCE_TABLE_LOCK - A lock is placed on all tables that are touched by the query that was used to populate the RowSet object.

      • DATASOURCE_DB_LOCK A lock is placed on the entire data source that is used by the RowSet object.

      3.4 Updatable Views

      A RowSet object may be populated with data from an SQL VIEW. The following constants indicate whether a SyncProvider object can update data in the table or tables from which the VIEW was derived.

      • UPDATABLE_VIEW_SYNC Indicates that a SyncProvider implementation supports synchronization to the table or tables from which the SQL VIEW used to populate a a RowSet object is derived.

      • NONUPDATABLE_VIEW_SYNC Indicates that a SyncProvider implementation does not support synchronization to the table or tables from which the SQL VIEW used to populate a RowSet object is derived.

      3.5 Usage of SyncProvider Grading and Locking

      In the example below, the reference CachedRowSetImpl implementation reconfigures its current SyncProvider object by calling the setSyncProvider method.

          CachedRowSetImpl crs = new CachedRowSetImpl();
    crs.setSyncProvider("com.foo.bar.HASyncProvider");
      An application can retrieve the SyncProvider object currently in use by a disconnected RowSet object. It can also retrieve the grade of synchronization with which the provider was implemented and the degree of locking currently in use. In addition, an application has the flexibility to set the degree of locking to be used, which can increase the possibilities for successful synchronization. These operation are shown in the following code fragment.
          SyncProvider sync = crs.getSyncProvider();

    switch (sync.getProviderGrade()) {
    case: SyncProvider.GRADE_CHECK_ALL_AT_COMMIT
         //A high grade of optimistic synchronization
    break;
    case: SyncProvider.GRADE_CHECK_MODIFIED_AT_COMMIT
         //A low grade of optimistic synchronization
    break;
    case: SyncProvider.GRADE_LOCK_WHEN_LOADED
         // A pessimistic synchronization grade
    break;
    case: SyncProvider.GRADE_LOCK_WHEN_MODIFIED
         // A pessimistic synchronization grade
    break;
    case: SyncProvider.GRADE_NONE
      // No synchronization with the originating data source provided
    break;
    }

    switch (sync.getDataSourcLock() {
      case: SyncProvider.DATASOURCE_DB_LOCK
       // A lock is placed on the entire datasource that is used by the
       // RowSet object
       break;

      case: SyncProvider.DATASOURCE_NO_LOCK
       // No locks remain on the  originating data source.
      break;

      case: SyncProvider.DATASOURCE_ROW_LOCK
       // A lock is placed on the rows that are  touched by the original
       // SQL statement used to populate
       // the RowSet object that is using the SyncProvider
       break;

      case: DATASOURCE_TABLE_LOCK
       // A lock is placed on  all tables that are touched by the original
       // SQL statement used to populated
       // the RowSet object that is using the SyncProvider
       break;
      It is also possible using the static utility method in the SyncFactory class to determine the list of SyncProvider implementations currently registered with the SyncFactory.
              Enumeration e = SyncFactory.getRegisteredProviders();

    4.0 Resolving Synchronization Conflicts

    The interface SyncResolver provides a way for an application to decide manually what to do when a conflict occurs. When the CachedRowSet method acceptChanges finishes and has detected one or more conflicts, it throws a SyncProviderException object. An application can catch the exception and have it retrieve a SyncResolver object by calling the method SyncProviderException.getSyncResolver().

    A SyncResolver object, which is a special kind of CachedRowSet object or a JdbcRowSet object that has implemented the SyncResolver interface, examines the conflicts row by row. It is a duplicate of the RowSet object being synchronized except that it contains only the data from the data source this is causing a conflict. All of the other column values are set to null. To navigate from one conflict value to another, a SyncResolver object provides the methods nextConflict and previousConflict.

    The SyncResolver interface also provides methods for doing the following:

    • finding out whether the conflict involved an update, a delete, or an insert
    • getting the value in the data source that caused the conflict
    • setting the value that should be in the data source if it needs to be changed or setting the value that should be in the RowSet object if it needs to be changed

    When the CachedRowSet method acceptChanges is called, it delegates to the RowSet object's SyncProvider object. How the writer provided by that SyncProvider object is implemented determines what level (grade) of checking for conflicts will be done. After all checking for conflicts is completed and one or more conflicts has been found, the method acceptChanges throws a SyncProviderException object. The application can catch the exception and use it to obtain a SyncResolver object.

    The application can then use SyncResolver methods to get information about each conflict and decide what to do. If the application logic or the user decides that a value in the RowSet object should be the one to persist, the application or user can overwrite the data source value with it.

    The comment for the SyncResolver interface has more detail.

    5.0 Related Specifications

    • JNDI 1.3
    • Java Logging APIs

    6.0 Related Documentation

    • System properties
    • Resource Files
    • DataSource for JDBC Connections
    • Skip navigation links
    • Overview
    • Package
    • Class
    • Use
    • Tree
    • Deprecated
    • Index
    • Help
    Java™ Platform
    Standard Ed. 8
    • Prev Package
    • Next Package
    • Frames
    • No Frames
    • All Classes

    Submit a bug or feature
    For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
    Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.sql.rowset.spi

Interfaces

  • SyncResolver
  • TransactionalWriter
  • XmlReader
  • XmlWriter

Classes

  • SyncFactory
  • SyncProvider

Exceptions

  • SyncFactoryException
  • SyncProviderException


javax.swing

Interfaces

  • Action
  • BoundedRangeModel
  • ButtonModel
  • CellEditor
  • ComboBoxEditor
  • ComboBoxModel
  • DesktopManager
  • Icon
  • JComboBox.KeySelectionManager
  • ListCellRenderer
  • ListModel
  • ListSelectionModel
  • MenuElement
  • MutableComboBoxModel
  • Painter
  • Renderer
  • RootPaneContainer
  • Scrollable
  • ScrollPaneConstants
  • SingleSelectionModel
  • SpinnerModel
  • SwingConstants
  • UIDefaults.ActiveValue
  • UIDefaults.LazyValue
  • WindowConstants

Classes

  • AbstractAction
  • AbstractButton
  • AbstractCellEditor
  • AbstractListModel
  • AbstractSpinnerModel
  • ActionMap
  • BorderFactory
  • Box
  • Box.Filler
  • BoxLayout
  • ButtonGroup
  • CellRendererPane
  • ComponentInputMap
  • DebugGraphics
  • DefaultBoundedRangeModel
  • DefaultButtonModel
  • DefaultCellEditor
  • DefaultComboBoxModel
  • DefaultDesktopManager
  • DefaultFocusManager
  • DefaultListCellRenderer
  • DefaultListCellRenderer.UIResource
  • DefaultListModel
  • DefaultListSelectionModel
  • DefaultRowSorter
  • DefaultRowSorter.ModelWrapper
  • DefaultSingleSelectionModel
  • FocusManager
  • GrayFilter
  • GroupLayout
  • ImageIcon
  • InputMap
  • InputVerifier
  • InternalFrameFocusTraversalPolicy
  • JApplet
  • JButton
  • JCheckBox
  • JCheckBoxMenuItem
  • JColorChooser
  • JComboBox
  • JComponent
  • JDesktopPane
  • JDialog
  • JEditorPane
  • JFileChooser
  • JFormattedTextField
  • JFormattedTextField.AbstractFormatter
  • JFormattedTextField.AbstractFormatterFactory
  • JFrame
  • JInternalFrame
  • JInternalFrame.JDesktopIcon
  • JLabel
  • JLayer
  • JLayeredPane
  • JList
  • JList.DropLocation
  • JMenu
  • JMenuBar
  • JMenuItem
  • JOptionPane
  • JPanel
  • JPasswordField
  • JPopupMenu
  • JPopupMenu.Separator
  • JProgressBar
  • JRadioButton
  • JRadioButtonMenuItem
  • JRootPane
  • JScrollBar
  • JScrollPane
  • JSeparator
  • JSlider
  • JSpinner
  • JSpinner.DateEditor
  • JSpinner.DefaultEditor
  • JSpinner.ListEditor
  • JSpinner.NumberEditor
  • JSplitPane
  • JTabbedPane
  • JTable
  • JTable.DropLocation
  • JTextArea
  • JTextField
  • JTextPane
  • JToggleButton
  • JToggleButton.ToggleButtonModel
  • JToolBar
  • JToolBar.Separator
  • JToolTip
  • JTree
  • JTree.DropLocation
  • JTree.DynamicUtilTreeNode
  • JTree.EmptySelectionModel
  • JViewport
  • JWindow
  • KeyStroke
  • LayoutFocusTraversalPolicy
  • LayoutStyle
  • LookAndFeel
  • MenuSelectionManager
  • OverlayLayout
  • Popup
  • PopupFactory
  • ProgressMonitor
  • ProgressMonitorInputStream
  • RepaintManager
  • RowFilter
  • RowFilter.Entry
  • RowSorter
  • RowSorter.SortKey
  • ScrollPaneLayout
  • ScrollPaneLayout.UIResource
  • SizeRequirements
  • SizeSequence
  • SortingFocusTraversalPolicy
  • SpinnerDateModel
  • SpinnerListModel
  • SpinnerNumberModel
  • Spring
  • SpringLayout
  • SpringLayout.Constraints
  • SwingUtilities
  • SwingWorker
  • Timer
  • ToolTipManager
  • TransferHandler
  • TransferHandler.DropLocation
  • TransferHandler.TransferSupport
  • UIDefaults
  • UIDefaults.LazyInputMap
  • UIDefaults.ProxyLazyValue
  • UIManager
  • UIManager.LookAndFeelInfo
  • ViewportLayout

Enums

  • DropMode
  • GroupLayout.Alignment
  • JTable.PrintMode
  • LayoutStyle.ComponentPlacement
  • RowFilter.ComparisonType
  • SortOrder
  • SwingWorker.StateValue

Exceptions

  • UnsupportedLookAndFeelException


javax.swing.border

Interfaces

  • Border

Classes

  • AbstractBorder
  • BevelBorder
  • CompoundBorder
  • EmptyBorder
  • EtchedBorder
  • LineBorder
  • MatteBorder
  • SoftBevelBorder
  • StrokeBorder
  • TitledBorder


javax.swing.colorchooser

Interfaces

  • ColorSelectionModel

Classes

  • AbstractColorChooserPanel
  • ColorChooserComponentFactory
  • DefaultColorSelectionModel


javax.swing.event

Interfaces

  • AncestorListener
  • CaretListener
  • CellEditorListener
  • ChangeListener
  • DocumentEvent
  • DocumentEvent.ElementChange
  • DocumentListener
  • HyperlinkListener
  • InternalFrameListener
  • ListDataListener
  • ListSelectionListener
  • MenuDragMouseListener
  • MenuKeyListener
  • MenuListener
  • MouseInputListener
  • PopupMenuListener
  • RowSorterListener
  • TableColumnModelListener
  • TableModelListener
  • TreeExpansionListener
  • TreeModelListener
  • TreeSelectionListener
  • TreeWillExpandListener
  • UndoableEditListener

Classes

  • AncestorEvent
  • CaretEvent
  • ChangeEvent
  • DocumentEvent.EventType
  • EventListenerList
  • HyperlinkEvent
  • HyperlinkEvent.EventType
  • InternalFrameAdapter
  • InternalFrameEvent
  • ListDataEvent
  • ListSelectionEvent
  • MenuDragMouseEvent
  • MenuEvent
  • MenuKeyEvent
  • MouseInputAdapter
  • PopupMenuEvent
  • RowSorterEvent
  • SwingPropertyChangeSupport
  • TableColumnModelEvent
  • TableModelEvent
  • TreeExpansionEvent
  • TreeModelEvent
  • TreeSelectionEvent
  • UndoableEditEvent

Enums

  • RowSorterEvent.Type


javax.swing.filechooser

Classes

  • FileFilter
  • FileNameExtensionFilter
  • FileSystemView
  • FileView


javax.swing.plaf

Interfaces

  • UIResource

Classes

  • ActionMapUIResource
  • BorderUIResource
  • BorderUIResource.BevelBorderUIResource
  • BorderUIResource.CompoundBorderUIResource
  • BorderUIResource.EmptyBorderUIResource
  • BorderUIResource.EtchedBorderUIResource
  • BorderUIResource.LineBorderUIResource
  • BorderUIResource.MatteBorderUIResource
  • BorderUIResource.TitledBorderUIResource
  • ButtonUI
  • ColorChooserUI
  • ColorUIResource
  • ComboBoxUI
  • ComponentInputMapUIResource
  • ComponentUI
  • DesktopIconUI
  • DesktopPaneUI
  • DimensionUIResource
  • FileChooserUI
  • FontUIResource
  • IconUIResource
  • InputMapUIResource
  • InsetsUIResource
  • InternalFrameUI
  • LabelUI
  • LayerUI
  • ListUI
  • MenuBarUI
  • MenuItemUI
  • OptionPaneUI
  • PanelUI
  • PopupMenuUI
  • ProgressBarUI
  • RootPaneUI
  • ScrollBarUI
  • ScrollPaneUI
  • SeparatorUI
  • SliderUI
  • SpinnerUI
  • SplitPaneUI
  • TabbedPaneUI
  • TableHeaderUI
  • TableUI
  • TextUI
  • ToolBarUI
  • ToolTipUI
  • TreeUI
  • ViewportUI


javax.swing.plaf.basic

Interfaces

  • ComboPopup

Classes

  • BasicArrowButton
  • BasicBorders
  • BasicBorders.ButtonBorder
  • BasicBorders.FieldBorder
  • BasicBorders.MarginBorder
  • BasicBorders.MenuBarBorder
  • BasicBorders.RadioButtonBorder
  • BasicBorders.RolloverButtonBorder
  • BasicBorders.SplitPaneBorder
  • BasicBorders.ToggleButtonBorder
  • BasicButtonListener
  • BasicButtonUI
  • BasicCheckBoxMenuItemUI
  • BasicCheckBoxUI
  • BasicColorChooserUI
  • BasicComboBoxEditor
  • BasicComboBoxEditor.UIResource
  • BasicComboBoxRenderer
  • BasicComboBoxRenderer.UIResource
  • BasicComboBoxUI
  • BasicComboPopup
  • BasicDesktopIconUI
  • BasicDesktopPaneUI
  • BasicDirectoryModel
  • BasicEditorPaneUI
  • BasicFileChooserUI
  • BasicFormattedTextFieldUI
  • BasicGraphicsUtils
  • BasicHTML
  • BasicIconFactory
  • BasicInternalFrameTitlePane
  • BasicInternalFrameUI
  • BasicLabelUI
  • BasicListUI
  • BasicLookAndFeel
  • BasicMenuBarUI
  • BasicMenuItemUI
  • BasicMenuUI
  • BasicOptionPaneUI
  • BasicOptionPaneUI.ButtonAreaLayout
  • BasicPanelUI
  • BasicPasswordFieldUI
  • BasicPopupMenuSeparatorUI
  • BasicPopupMenuUI
  • BasicProgressBarUI
  • BasicRadioButtonMenuItemUI
  • BasicRadioButtonUI
  • BasicRootPaneUI
  • BasicScrollBarUI
  • BasicScrollPaneUI
  • BasicSeparatorUI
  • BasicSliderUI
  • BasicSpinnerUI
  • BasicSplitPaneDivider
  • BasicSplitPaneUI
  • BasicTabbedPaneUI
  • BasicTableHeaderUI
  • BasicTableUI
  • BasicTextAreaUI
  • BasicTextFieldUI
  • BasicTextPaneUI
  • BasicTextUI
  • BasicTextUI.BasicCaret
  • BasicTextUI.BasicHighlighter
  • BasicToggleButtonUI
  • BasicToolBarSeparatorUI
  • BasicToolBarUI
  • BasicToolTipUI
  • BasicTreeUI
  • BasicViewportUI
  • DefaultMenuLayout


javax.swing.plaf.metal

Classes

  • DefaultMetalTheme
  • MetalBorders
  • MetalBorders.ButtonBorder
  • MetalBorders.Flush3DBorder
  • MetalBorders.InternalFrameBorder
  • MetalBorders.MenuBarBorder
  • MetalBorders.MenuItemBorder
  • MetalBorders.OptionDialogBorder
  • MetalBorders.PaletteBorder
  • MetalBorders.PopupMenuBorder
  • MetalBorders.RolloverButtonBorder
  • MetalBorders.ScrollPaneBorder
  • MetalBorders.TableHeaderBorder
  • MetalBorders.TextFieldBorder
  • MetalBorders.ToggleButtonBorder
  • MetalBorders.ToolBarBorder
  • MetalButtonUI
  • MetalCheckBoxIcon
  • MetalCheckBoxUI
  • MetalComboBoxButton
  • MetalComboBoxEditor
  • MetalComboBoxEditor.UIResource
  • MetalComboBoxIcon
  • MetalComboBoxUI
  • MetalDesktopIconUI
  • MetalFileChooserUI
  • MetalIconFactory
  • MetalIconFactory.FileIcon16
  • MetalIconFactory.FolderIcon16
  • MetalIconFactory.PaletteCloseIcon
  • MetalIconFactory.TreeControlIcon
  • MetalIconFactory.TreeFolderIcon
  • MetalIconFactory.TreeLeafIcon
  • MetalInternalFrameTitlePane
  • MetalInternalFrameUI
  • MetalLabelUI
  • MetalLookAndFeel
  • MetalMenuBarUI
  • MetalPopupMenuSeparatorUI
  • MetalProgressBarUI
  • MetalRadioButtonUI
  • MetalRootPaneUI
  • MetalScrollBarUI
  • MetalScrollButton
  • MetalScrollPaneUI
  • MetalSeparatorUI
  • MetalSliderUI
  • MetalSplitPaneUI
  • MetalTabbedPaneUI
  • MetalTextFieldUI
  • MetalTheme
  • MetalToggleButtonUI
  • MetalToolBarUI
  • MetalToolTipUI
  • MetalTreeUI
  • OceanTheme


javax.swing.plaf.multi

Classes

  • MultiButtonUI
  • MultiColorChooserUI
  • MultiComboBoxUI
  • MultiDesktopIconUI
  • MultiDesktopPaneUI
  • MultiFileChooserUI
  • MultiInternalFrameUI
  • MultiLabelUI
  • MultiListUI
  • MultiLookAndFeel
  • MultiMenuBarUI
  • MultiMenuItemUI
  • MultiOptionPaneUI
  • MultiPanelUI
  • MultiPopupMenuUI
  • MultiProgressBarUI
  • MultiRootPaneUI
  • MultiScrollBarUI
  • MultiScrollPaneUI
  • MultiSeparatorUI
  • MultiSliderUI
  • MultiSpinnerUI
  • MultiSplitPaneUI
  • MultiTabbedPaneUI
  • MultiTableHeaderUI
  • MultiTableUI
  • MultiTextUI
  • MultiToolBarUI
  • MultiToolTipUI
  • MultiTreeUI
  • MultiViewportUI


javax.swing.plaf.nimbus

Classes

  • AbstractRegionPainter
  • AbstractRegionPainter.PaintContext
  • NimbusLookAndFeel
  • NimbusStyle
  • State

Enums

  • AbstractRegionPainter.PaintContext.CacheMode


javax.swing.plaf.synth

Interfaces

  • SynthConstants
  • SynthUI

Classes

  • ColorType
  • Region
  • SynthButtonUI
  • SynthCheckBoxMenuItemUI
  • SynthCheckBoxUI
  • SynthColorChooserUI
  • SynthComboBoxUI
  • SynthContext
  • SynthDesktopIconUI
  • SynthDesktopPaneUI
  • SynthEditorPaneUI
  • SynthFormattedTextFieldUI
  • SynthGraphicsUtils
  • SynthInternalFrameUI
  • SynthLabelUI
  • SynthListUI
  • SynthLookAndFeel
  • SynthMenuBarUI
  • SynthMenuItemUI
  • SynthMenuUI
  • SynthOptionPaneUI
  • SynthPainter
  • SynthPanelUI
  • SynthPasswordFieldUI
  • SynthPopupMenuUI
  • SynthProgressBarUI
  • SynthRadioButtonMenuItemUI
  • SynthRadioButtonUI
  • SynthRootPaneUI
  • SynthScrollBarUI
  • SynthScrollPaneUI
  • SynthSeparatorUI
  • SynthSliderUI
  • SynthSpinnerUI
  • SynthSplitPaneUI
  • SynthStyle
  • SynthStyleFactory
  • SynthTabbedPaneUI
  • SynthTableHeaderUI
  • SynthTableUI
  • SynthTextAreaUI
  • SynthTextFieldUI
  • SynthTextPaneUI
  • SynthToggleButtonUI
  • SynthToolBarUI
  • SynthToolTipUI
  • SynthTreeUI
  • SynthViewportUI


javax.swing.table

Interfaces

  • TableCellEditor
  • TableCellRenderer
  • TableColumnModel
  • TableModel

Classes

  • AbstractTableModel
  • DefaultTableCellRenderer
  • DefaultTableCellRenderer.UIResource
  • DefaultTableColumnModel
  • DefaultTableModel
  • JTableHeader
  • TableColumn
  • TableRowSorter
  • TableStringConverter


javax.swing.text

Interfaces

  • AbstractDocument.AttributeContext
  • AbstractDocument.Content
  • AttributeSet
  • AttributeSet.CharacterAttribute
  • AttributeSet.ColorAttribute
  • AttributeSet.FontAttribute
  • AttributeSet.ParagraphAttribute
  • Caret
  • Document
  • Element
  • Highlighter
  • Highlighter.Highlight
  • Highlighter.HighlightPainter
  • Keymap
  • MutableAttributeSet
  • Position
  • Style
  • StyledDocument
  • TabableView
  • TabExpander
  • ViewFactory

Classes

  • AbstractDocument
  • AbstractDocument.ElementEdit
  • AbstractWriter
  • AsyncBoxView
  • BoxView
  • ComponentView
  • CompositeView
  • DateFormatter
  • DefaultCaret
  • DefaultEditorKit
  • DefaultEditorKit.BeepAction
  • DefaultEditorKit.CopyAction
  • DefaultEditorKit.CutAction
  • DefaultEditorKit.DefaultKeyTypedAction
  • DefaultEditorKit.InsertBreakAction
  • DefaultEditorKit.InsertContentAction
  • DefaultEditorKit.InsertTabAction
  • DefaultEditorKit.PasteAction
  • DefaultFormatter
  • DefaultFormatterFactory
  • DefaultHighlighter
  • DefaultHighlighter.DefaultHighlightPainter
  • DefaultStyledDocument
  • DefaultStyledDocument.AttributeUndoableEdit
  • DefaultStyledDocument.ElementSpec
  • DefaultTextUI
  • DocumentFilter
  • DocumentFilter.FilterBypass
  • EditorKit
  • ElementIterator
  • FieldView
  • FlowView
  • FlowView.FlowStrategy
  • GapContent
  • GlyphView
  • GlyphView.GlyphPainter
  • IconView
  • InternationalFormatter
  • JTextComponent
  • JTextComponent.DropLocation
  • JTextComponent.KeyBinding
  • LabelView
  • LayeredHighlighter
  • LayeredHighlighter.LayerPainter
  • LayoutQueue
  • MaskFormatter
  • NavigationFilter
  • NavigationFilter.FilterBypass
  • NumberFormatter
  • ParagraphView
  • PasswordView
  • PlainDocument
  • PlainView
  • Position.Bias
  • Segment
  • SimpleAttributeSet
  • StringContent
  • StyleConstants
  • StyleConstants.CharacterConstants
  • StyleConstants.ColorConstants
  • StyleConstants.FontConstants
  • StyleConstants.ParagraphConstants
  • StyleContext
  • StyledEditorKit
  • StyledEditorKit.AlignmentAction
  • StyledEditorKit.BoldAction
  • StyledEditorKit.FontFamilyAction
  • StyledEditorKit.FontSizeAction
  • StyledEditorKit.ForegroundAction
  • StyledEditorKit.ItalicAction
  • StyledEditorKit.StyledTextAction
  • StyledEditorKit.UnderlineAction
  • TableView
  • TabSet
  • TabStop
  • TextAction
  • Utilities
  • View
  • WrappedPlainView
  • ZoneView

Exceptions

  • BadLocationException
  • ChangedCharSetException


javax.swing.text.html

Classes

  • BlockView
  • CSS
  • CSS.Attribute
  • FormSubmitEvent
  • FormView
  • HTML
  • HTML.Attribute
  • HTML.Tag
  • HTML.UnknownTag
  • HTMLDocument
  • HTMLDocument.Iterator
  • HTMLEditorKit
  • HTMLEditorKit.HTMLFactory
  • HTMLEditorKit.HTMLTextAction
  • HTMLEditorKit.InsertHTMLTextAction
  • HTMLEditorKit.LinkController
  • HTMLEditorKit.Parser
  • HTMLEditorKit.ParserCallback
  • HTMLFrameHyperlinkEvent
  • HTMLWriter
  • ImageView
  • InlineView
  • ListView
  • MinimalHTMLWriter
  • ObjectView
  • Option
  • ParagraphView
  • StyleSheet
  • StyleSheet.BoxPainter
  • StyleSheet.ListPainter

Enums

  • FormSubmitEvent.MethodType


javax.swing.text.html.parser

Interfaces

  • DTDConstants

Classes

  • AttributeList
  • ContentModel
  • DocumentParser
  • DTD
  • Element
  • Entity
  • Parser
  • ParserDelegator
  • TagElement


javax.swing.text.rtf

Classes

  • RTFEditorKit


javax.swing.tree

Interfaces

  • MutableTreeNode
  • RowMapper
  • TreeCellEditor
  • TreeCellRenderer
  • TreeModel
  • TreeNode
  • TreeSelectionModel

Classes

  • AbstractLayoutCache
  • AbstractLayoutCache.NodeDimensions
  • DefaultMutableTreeNode
  • DefaultTreeCellEditor
  • DefaultTreeCellRenderer
  • DefaultTreeModel
  • DefaultTreeSelectionModel
  • FixedHeightLayoutCache
  • TreePath
  • VariableHeightLayoutCache

Exceptions

  • ExpandVetoException


javax.swing.undo

Interfaces

  • StateEditable
  • UndoableEdit

Classes

  • AbstractUndoableEdit
  • CompoundEdit
  • StateEdit
  • UndoableEditSupport
  • UndoManager

Exceptions

  • CannotRedoException
  • CannotUndoException


compact3 - javax.tools

Interfaces

  • Diagnostic
  • DiagnosticListener
  • DocumentationTool
  • DocumentationTool.DocumentationTask
  • FileObject
  • JavaCompiler
  • JavaCompiler.CompilationTask
  • JavaFileManager
  • JavaFileManager.Location
  • JavaFileObject
  • OptionChecker
  • StandardJavaFileManager
  • Tool

Classes

  • DiagnosticCollector
  • ForwardingFileObject
  • ForwardingJavaFileManager
  • ForwardingJavaFileObject
  • SimpleJavaFileObject
  • ToolProvider

Enums

  • Diagnostic.Kind
  • DocumentationTool.Location
  • JavaFileObject.Kind
  • StandardLocation


tools

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.tools

Provides interfaces for tools which can be invoked from a program, for example, compilers.

See: Description

  • Interface Summary
    Interface Description
    Diagnostic<S>
    Interface for diagnostics from tools.
    DiagnosticListener<S>
    Interface for receiving diagnostics from tools.
    DocumentationTool
    Interface to invoke Java™ programming language documentation tools from programs.
    DocumentationTool.DocumentationTask
    Interface representing a future for a documentation task.
    FileObject
    File abstraction for tools.
    JavaCompiler
    Interface to invoke Java™ programming language compilers from programs.
    JavaCompiler.CompilationTask
    Interface representing a future for a compilation task.
    JavaFileManager
    File manager for tools operating on Java™ programming language source and class files.
    JavaFileManager.Location
    Interface for locations of file objects.
    JavaFileObject
    File abstraction for tools operating on Java™ programming language source and class files.
    OptionChecker
    Interface for recognizing options.
    StandardJavaFileManager
    File manager based on java.io.File.
    Tool
    Common interface for tools that can be invoked from a program.
  • Class Summary
    Class Description
    DiagnosticCollector<S>
    Provides an easy way to collect diagnostics in a list.
    ForwardingFileObject<F extends FileObject>
    Forwards calls to a given file object.
    ForwardingJavaFileManager<M extends JavaFileManager>
    Forwards calls to a given file manager.
    ForwardingJavaFileObject<F extends JavaFileObject>
    Forwards calls to a given file object.
    SimpleJavaFileObject
    Provides simple implementations for most methods in JavaFileObject.
    ToolProvider
    Provides methods for locating tool providers, for example, providers of compilers.
  • Enum Summary
    Enum Description
    Diagnostic.Kind
    Kinds of diagnostics, for example, error or warning.
    DocumentationTool.Location
    Locations specific to DocumentationTool.
    JavaFileObject.Kind
    Kinds of JavaFileObjects.
    StandardLocation
    Standard locations of file objects.

Package javax.tools Description

Provides interfaces for tools which can be invoked from a program, for example, compilers.

These interfaces and classes are required as part of the Java™ Platform, Standard Edition (Java SE), but there is no requirement to provide any tools implementing them.

Unless explicitly allowed, all methods in this package might throw a NullPointerException if given a null argument or if given a list or collection containing null elements. Similarly, no method may return null unless explicitly allowed.

This package is the home of the Java programming language compiler framework. This framework allows clients of the framework to locate and run compilers from programs. The framework also provides Service Provider Interfaces (SPI) for structured access to diagnostics (DiagnosticListener) as well as a file abstraction for overriding file access (JavaFileManager and JavaFileObject). See JavaCompiler for more details on using the SPI.

There is no requirement for a compiler at runtime. However, if a default compiler is provided, it can be located using the ToolProvider, for example:

JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();

It is possible to provide alternative compilers or tools through the service provider mechanism.

For example, if com.vendor.VendorJavaCompiler is a provider of the JavaCompiler tool then its jar file would contain the file META-INF/services/javax.tools.JavaCompiler. This file would contain the single line:

com.vendor.VendorJavaCompiler

If the jar file is on the class path, VendorJavaCompiler can be located using code like this:

JavaCompiler compiler = ServiceLoader.load(JavaCompiler.class).iterator().next();

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.tools

Interfaces

  • Diagnostic
  • DiagnosticListener
  • DocumentationTool
  • DocumentationTool.DocumentationTask
  • FileObject
  • JavaCompiler
  • JavaCompiler.CompilationTask
  • JavaFileManager
  • JavaFileManager.Location
  • JavaFileObject
  • OptionChecker
  • StandardJavaFileManager
  • Tool

Classes

  • DiagnosticCollector
  • ForwardingFileObject
  • ForwardingJavaFileManager
  • ForwardingJavaFileObject
  • SimpleJavaFileObject
  • ToolProvider

Enums

  • Diagnostic.Kind
  • DocumentationTool.Location
  • JavaFileObject.Kind
  • StandardLocation


compact2 - javax.transaction

Exceptions

  • InvalidTransactionException
  • TransactionRequiredException
  • TransactionRolledbackException


transaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.transaction

Contains three exceptions thrown by the ORB machinery during unmarshalling.

See: Description

  • Exception Summary
    Exception Description
    InvalidTransactionException
    This exception indicates that the request carried an invalid transaction context.
    TransactionRequiredException
    This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
    TransactionRolledbackException
    This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Package javax.transaction Description

Contains three exceptions thrown by the ORB machinery during unmarshalling.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.transaction

Exceptions

  • InvalidTransactionException
  • TransactionRequiredException
  • TransactionRolledbackException


transaction

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.transaction

Contains three exceptions thrown by the ORB machinery during unmarshalling.

See: Description

  • Exception Summary
    Exception Description
    InvalidTransactionException
    This exception indicates that the request carried an invalid transaction context.
    TransactionRequiredException
    This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
    TransactionRolledbackException
    This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Package javax.transaction Description

Contains three exceptions thrown by the ORB machinery during unmarshalling.

Since:
1.3
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.transaction

Exceptions

  • InvalidTransactionException
  • TransactionRequiredException
  • TransactionRolledbackException


compact2 - javax.transaction.xa

Interfaces

  • XAResource
  • Xid

Exceptions

  • XAException


xa

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.transaction.xa

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

See: Description

  • Interface Summary
    Interface Description
    XAResource
    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).
    Xid
    The Xid interface is a Java mapping of the X/Open transaction identifier XID structure.
  • Exception Summary
    Exception Description
    XAException
    The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.

Package javax.transaction.xa Description

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions. The driver vendor for a specific resource manager provides the implementation of this API.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.transaction.xa

Interfaces

  • XAResource
  • Xid

Exceptions

  • XAException


xa

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.transaction.xa

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions.

See: Description

  • Interface Summary
    Interface Description
    XAResource
    The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification).
    Xid
    The Xid interface is a Java mapping of the X/Open transaction identifier XID structure.
  • Exception Summary
    Exception Description
    XAException
    The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.

Package javax.transaction.xa Description

Provides the API that defines the contract between the transaction manager and the resource manager, which allows the transaction manager to enlist and delist resource objects (supplied by the resource manager driver) in JTA transactions. The driver vendor for a specific resource manager provides the implementation of this API.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.transaction.xa

Interfaces

  • XAResource
  • Xid

Exceptions

  • XAException


compact2 - javax.xml

Classes

  • XMLConstants


xml

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml

  • Class Summary
    Class Description
    XMLConstants
    Utility class to contain basic XML values as constants.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml

Classes

  • XMLConstants


xml

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml

  • Class Summary
    Class Description
    XMLConstants
    Utility class to contain basic XML values as constants.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml

Classes

  • XMLConstants


javax.xml.bind

Interfaces

  • DatatypeConverterInterface
  • Element
  • Marshaller
  • NotIdentifiableEvent
  • ParseConversionEvent
  • PrintConversionEvent
  • Unmarshaller
  • UnmarshallerHandler
  • ValidationEvent
  • ValidationEventHandler
  • ValidationEventLocator
  • Validator

Classes

  • Binder
  • DatatypeConverter
  • JAXB
  • JAXBContext
  • JAXBElement
  • JAXBElement.GlobalScope
  • JAXBIntrospector
  • JAXBPermission
  • Marshaller.Listener
  • SchemaOutputResolver
  • Unmarshaller.Listener

Exceptions

  • DataBindingException
  • JAXBException
  • MarshalException
  • PropertyException
  • TypeConstraintException
  • UnmarshalException
  • ValidationException


javax.xml.bind.annotation

Interfaces

  • DomHandler

Classes

  • W3CDomHandler
  • XmlElement.DEFAULT
  • XmlElementDecl.GLOBAL
  • XmlElementRef.DEFAULT
  • XmlSchemaType.DEFAULT
  • XmlType.DEFAULT

Enums

  • XmlAccessOrder
  • XmlAccessType
  • XmlNsForm

Annotation Types

  • XmlAccessorOrder
  • XmlAccessorType
  • XmlAnyAttribute
  • XmlAnyElement
  • XmlAttachmentRef
  • XmlAttribute
  • XmlElement
  • XmlElementDecl
  • XmlElementRef
  • XmlElementRefs
  • XmlElements
  • XmlElementWrapper
  • XmlEnum
  • XmlEnumValue
  • XmlID
  • XmlIDREF
  • XmlInlineBinaryData
  • XmlList
  • XmlMimeType
  • XmlMixed
  • XmlNs
  • XmlRegistry
  • XmlRootElement
  • XmlSchema
  • XmlSchemaType
  • XmlSchemaTypes
  • XmlSeeAlso
  • XmlTransient
  • XmlType
  • XmlValue


javax.xml.bind.annotation.adapters

Classes

  • CollapsedStringAdapter
  • HexBinaryAdapter
  • NormalizedStringAdapter
  • XmlAdapter
  • XmlJavaTypeAdapter.DEFAULT

Annotation Types

  • XmlJavaTypeAdapter
  • XmlJavaTypeAdapters


javax.xml.bind.attachment

Classes

  • AttachmentMarshaller
  • AttachmentUnmarshaller


javax.xml.bind.helpers

Classes

  • AbstractMarshallerImpl
  • AbstractUnmarshallerImpl
  • DefaultValidationEventHandler
  • NotIdentifiableEventImpl
  • ParseConversionEventImpl
  • PrintConversionEventImpl
  • ValidationEventImpl
  • ValidationEventLocatorImpl


javax.xml.bind.util

Classes

  • JAXBResult
  • JAXBSource
  • ValidationEventCollector


compact3 - javax.xml.crypto

Interfaces

  • AlgorithmMethod
  • Data
  • KeySelectorResult
  • NodeSetData
  • URIDereferencer
  • URIReference
  • XMLCryptoContext
  • XMLStructure

Classes

  • KeySelector
  • KeySelector.Purpose
  • OctetStreamData

Exceptions

  • KeySelectorException
  • MarshalException
  • NoSuchMechanismException
  • URIReferenceException


crypto

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto

Common classes for XML cryptography.

See: Description

  • Interface Summary
    Interface Description
    AlgorithmMethod
    An abstract representation of an algorithm defined in the XML Security specifications.
    Data
    An abstract representation of the result of dereferencing a URIReference or the input/output of subsequent Transforms.
    KeySelectorResult
    The result returned by the KeySelector.select method.
    NodeSetData
    An abstract representation of a Data type containing a node-set.
    URIDereferencer
    A dereferencer of URIReferences.
    URIReference
    Identifies a data object via a URI-Reference, as specified by RFC 2396.
    XMLCryptoContext
    Contains common context information for XML cryptographic operations.
    XMLStructure
    A representation of an XML structure from any namespace.
  • Class Summary
    Class Description
    KeySelector
    A selector that finds and returns a key using the data contained in a KeyInfo object.
    KeySelector.Purpose
    The purpose of the key that is to be selected.
    OctetStreamData
    A representation of a Data type containing an octet stream.
  • Exception Summary
    Exception Description
    KeySelectorException
    Indicates an exceptional condition thrown by a KeySelector.
    MarshalException
    Indicates an exceptional condition that occurred during the XML marshalling or unmarshalling process.
    NoSuchMechanismException
    This exception is thrown when a particular XML mechanism is requested but is not available in the environment.
    URIReferenceException
    Indicates an exceptional condition thrown while dereferencing a URIReference.

Package javax.xml.crypto Description

Common classes for XML cryptography. This package includes common classes that are used to perform XML cryptographic operations, such as generating an XML signature or encrypting XML data.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto

Interfaces

  • AlgorithmMethod
  • Data
  • KeySelectorResult
  • NodeSetData
  • URIDereferencer
  • URIReference
  • XMLCryptoContext
  • XMLStructure

Classes

  • KeySelector
  • KeySelector.Purpose
  • OctetStreamData

Exceptions

  • KeySelectorException
  • MarshalException
  • NoSuchMechanismException
  • URIReferenceException


compact3 - javax.xml.crypto.dom

Interfaces

  • DOMURIReference

Classes

  • DOMCryptoContext
  • DOMStructure


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto.dom

DOM-specific classes for the javax.xml.crypto package.

See: Description

  • Interface Summary
    Interface Description
    DOMURIReference
    A DOM-specific URIReference.
  • Class Summary
    Class Description
    DOMCryptoContext
    This class provides a DOM-specific implementation of the XMLCryptoContext interface.
    DOMStructure
    A DOM-specific XMLStructure.

Package javax.xml.crypto.dom Description

DOM-specific classes for the javax.xml.crypto package. Only users who are using a DOM-based XML cryptographic implementations (ex: XMLSignatureFactory or KeyInfoFactory) should need to make direct use of this package.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dom

Interfaces

  • DOMURIReference

Classes

  • DOMCryptoContext
  • DOMStructure


compact3 - javax.xml.crypto.dsig

Interfaces

  • CanonicalizationMethod
  • DigestMethod
  • Manifest
  • Reference
  • SignatureMethod
  • SignatureProperties
  • SignatureProperty
  • SignedInfo
  • Transform
  • XMLObject
  • XMLSignature
  • XMLSignature.SignatureValue
  • XMLSignContext
  • XMLValidateContext

Classes

  • TransformService
  • XMLSignatureFactory

Exceptions

  • TransformException
  • XMLSignatureException


dsig

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto.dsig

Classes for generating and validating XML digital signatures.

See: Description

  • Interface Summary
    Interface Description
    CanonicalizationMethod
    A representation of the XML CanonicalizationMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    DigestMethod
    A representation of the XML DigestMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Manifest
    A representation of the XML Manifest element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Reference
    A representation of the Reference element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureMethod
    A representation of the XML SignatureMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperties
    A representation of the XML SignatureProperties element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignatureProperty
    A representation of the XML SignatureProperty element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    SignedInfo
    An representation of the XML SignedInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    Transform
    A representation of the XML Transform element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLObject
    A representation of the XML Object element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature
    A representation of the XML Signature element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignature.SignatureValue
    A representation of the XML SignatureValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    XMLSignContext
    Contains context information for generating XML Signatures.
    XMLValidateContext
    Contains context information for validating XML Signatures.
  • Class Summary
    Class Description
    TransformService
    A Service Provider Interface for transform and canonicalization algorithms.
    XMLSignatureFactory
    A factory for creating XMLSignature objects from scratch or for unmarshalling an XMLSignature object from a corresponding XML representation.
  • Exception Summary
    Exception Description
    TransformException
    Indicates an exceptional condition that occurred while executing a transform algorithm.
    XMLSignatureException
    Indicates an exceptional condition that occurred during the XML signature generation or validation process.

Package javax.xml.crypto.dsig Description

Classes for generating and validating XML digital signatures. This package includes classes that represent the core elements defined in the W3C XML digital signature specification: XMLSignature, SignedInfo, CanonicalizationMethod, SignatureMethod, Reference, DigestMethod, XMLObject, Manifest, SignatureProperties, and SignatureProperty. KeyInfo types are defined in the javax.xml.crypto.dsig.keyinfo subpackage. XMLSignatureFactory is an abstract factory that creates XMLSignature objects from scratch or from a pre-existing XML representation, such as a DOM node. TransformService is a service provider interface for creating and plugging in implementations of transform and canonicalization algorithms.

Of primary significance in this package is the XMLSignature class, which allows you to sign and validate an XML digital signature.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig

Interfaces

  • CanonicalizationMethod
  • DigestMethod
  • Manifest
  • Reference
  • SignatureMethod
  • SignatureProperties
  • SignatureProperty
  • SignedInfo
  • Transform
  • XMLObject
  • XMLSignature
  • XMLSignature.SignatureValue
  • XMLSignContext
  • XMLValidateContext

Classes

  • TransformService
  • XMLSignatureFactory

Exceptions

  • TransformException
  • XMLSignatureException


compact3 - javax.xml.crypto.dsig.dom

Classes

  • DOMSignContext
  • DOMValidateContext


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto.dsig.dom

DOM-specific classes for the javax.xml.crypto.dsig package.

See: Description

  • Class Summary
    Class Description
    DOMSignContext
    A DOM-specific XMLSignContext.
    DOMValidateContext
    A DOM-specific XMLValidateContext.

Package javax.xml.crypto.dsig.dom Description

DOM-specific classes for the javax.xml.crypto.dsig package. Only users who are using a DOM-based XMLSignatureFactory or KeyInfoFactory should need to make direct use of this package.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.dom

Classes

  • DOMSignContext
  • DOMValidateContext


compact3 - javax.xml.crypto.dsig.keyinfo

Interfaces

  • KeyInfo
  • KeyName
  • KeyValue
  • PGPData
  • RetrievalMethod
  • X509Data
  • X509IssuerSerial

Classes

  • KeyInfoFactory


keyinfo

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto.dsig.keyinfo

Classes for parsing and processing KeyInfo elements and structures.

See: Description

  • Interface Summary
    Interface Description
    KeyInfo
    A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyName
    A representation of the XML KeyName element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    KeyValue
    A representation of the XML KeyValue element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    PGPData
    A representation of the XML PGPData element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    RetrievalMethod
    A representation of the XML RetrievalMethod element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509Data
    A representation of the XML X509Data element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
    X509IssuerSerial
    A representation of the XML X509IssuerSerial element as defined in the W3C Recommendation for XML-Signature Syntax and Processing.
  • Class Summary
    Class Description
    KeyInfoFactory
    A factory for creating KeyInfo objects from scratch or for unmarshalling a KeyInfo object from a corresponding XML representation.

Package javax.xml.crypto.dsig.keyinfo Description

Classes for parsing and processing KeyInfo elements and structures. KeyInfo is an optional element that enables the recipient(s) to obtain the key needed to validate an XMLSignature. KeyInfo may contain keys, names, certificates and other public key management information, such as in-band key distribution or key agreement data. This package contains classes representing types defined in the W3C specification for XML Signatures, such as KeyName, KeyValue, RetrievalMethod, X509Data, X509IssuerSerial, and PGPData. KeyInfoFactory is an abstract factory that creates KeyInfo objects from scratch.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.keyinfo

Interfaces

  • KeyInfo
  • KeyName
  • KeyValue
  • PGPData
  • RetrievalMethod
  • X509Data
  • X509IssuerSerial

Classes

  • KeyInfoFactory


compact3 - javax.xml.crypto.dsig.spec

Interfaces

  • C14NMethodParameterSpec
  • DigestMethodParameterSpec
  • SignatureMethodParameterSpec
  • TransformParameterSpec

Classes

  • ExcC14NParameterSpec
  • HMACParameterSpec
  • XPathFilter2ParameterSpec
  • XPathFilterParameterSpec
  • XPathType
  • XPathType.Filter
  • XSLTTransformParameterSpec


spec

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.crypto.dsig.spec

Parameter classes for XML digital signatures.

See: Description

  • Interface Summary
    Interface Description
    C14NMethodParameterSpec
    A specification of algorithm parameters for a CanonicalizationMethod Algorithm.
    DigestMethodParameterSpec
    A specification of algorithm parameters for a DigestMethod algorithm.
    SignatureMethodParameterSpec
    A specification of algorithm parameters for an XML SignatureMethod algorithm.
    TransformParameterSpec
    A specification of algorithm parameters for a Transform algorithm.
  • Class Summary
    Class Description
    ExcC14NParameterSpec
    Parameters for the W3C Recommendation: Exclusive XML Canonicalization (C14N) algorithm.
    HMACParameterSpec
    Parameters for the XML Signature HMAC Algorithm.
    XPathFilter2ParameterSpec
    Parameters for the W3C Recommendation XPath Filter 2.0 Transform Algorithm.
    XPathFilterParameterSpec
    Parameters for the XPath Filtering Transform Algorithm.
    XPathType
    The XML Schema Definition of the XPath element as defined in the W3C Recommendation for XML-Signature XPath Filter 2.0:
    XPathType.Filter
    Represents the filter set operation.
    XSLTTransformParameterSpec
    Parameters for the XSLT Transform Algorithm.

Package javax.xml.crypto.dsig.spec Description

Parameter classes for XML digital signatures. This package contains interfaces and classes representing input parameters for the digest, signature, transform, or canonicalization algorithms used in the processing of XML signatures.

Package Specification

  • XML-Signature Syntax and Processing: W3C Recommendation
  • RFC 3275: XML-Signature Syntax and Processing
  • Exclusive XML Canonicalization algorithm: W3C Recommendation
  • XPath Filter 2.0 Transform Algorithm: W3C Recommendation

Since:
1.6
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.crypto.dsig.spec

Interfaces

  • C14NMethodParameterSpec
  • DigestMethodParameterSpec
  • SignatureMethodParameterSpec
  • TransformParameterSpec

Classes

  • ExcC14NParameterSpec
  • HMACParameterSpec
  • XPathFilter2ParameterSpec
  • XPathFilterParameterSpec
  • XPathType
  • XPathType.Filter
  • XSLTTransformParameterSpec


compact2 - javax.xml.datatype

Classes

  • DatatypeConstants
  • DatatypeConstants.Field
  • DatatypeFactory
  • Duration
  • XMLGregorianCalendar

Exceptions

  • DatatypeConfigurationException


datatype

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.datatype

XML/Java Type Mappings.

See: Description

  • Class Summary
    Class Description
    DatatypeConstants
    Utility class to contain basic Datatype values as constants.
    DatatypeConstants.Field
    Type-safe enum class that represents six fields of the Duration class.
    DatatypeFactory
    Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
    Duration
    Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification.
    XMLGregorianCalendar
    Representation for W3C XML Schema 1.0 date/time datatypes.
  • Exception Summary
    Exception Description
    DatatypeConfigurationException
    Indicates a serious configuration error.

Package javax.xml.datatype Description

XML/Java Type Mappings.

javax.xml.datatypeAPI provides XML/Java type mappings.

The following XML standards apply:

  • W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
W3C XML Schema Data Type | Java Data Type
xs:date | XMLGregorianCalendar
xs:dateTime | XMLGregorianCalendar
xs:duration | Duration
xs:gDay | XMLGregorianCalendar
xs:gMonth | XMLGregorianCalendar
xs:gMonthDay | XMLGregorianCalendar
xs:gYear | XMLGregorianCalendar
xs:gYearMonth | XMLGregorianCalendar
xs:time | XMLGregorianCalendar
XQuery 1.0 and XPath 2.0 Data Model | Java Data Type
xdt:dayTimeDuration | Duration
xdt:yearMonthDuration | Duration

W3C XML Schema data types that have a "natural" mapping to Java types are defined by JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. JAXB defined mappings for XML Schema built-in data types include:

  • xs:anySimpleType
  • xs:base64Binary
  • xs:boolean
  • xs:byte
  • xs:decimal
  • xs:double
  • xs:float
  • xs:hexBinary
  • xs:int
  • xs:integer
  • xs:long
  • xs:QName
  • xs:short
  • xs:string
  • xs:unsignedByte
  • xs:unsignedInt
  • xs:unsignedShort
  • Author Jeff Suttor
  • See W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.datatype

Classes

  • DatatypeConstants
  • DatatypeConstants.Field
  • DatatypeFactory
  • Duration
  • XMLGregorianCalendar

Exceptions

  • DatatypeConfigurationException


datatype

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.datatype

XML/Java Type Mappings.

See: Description

  • Class Summary
    Class Description
    DatatypeConstants
    Utility class to contain basic Datatype values as constants.
    DatatypeConstants.Field
    Type-safe enum class that represents six fields of the Duration class.
    DatatypeFactory
    Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
    Duration
    Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification.
    XMLGregorianCalendar
    Representation for W3C XML Schema 1.0 date/time datatypes.
  • Exception Summary
    Exception Description
    DatatypeConfigurationException
    Indicates a serious configuration error.

Package javax.xml.datatype Description

XML/Java Type Mappings.

javax.xml.datatypeAPI provides XML/Java type mappings.

The following XML standards apply:

  • W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
W3C XML Schema Data Type | Java Data Type
xs:date | XMLGregorianCalendar
xs:dateTime | XMLGregorianCalendar
xs:duration | Duration
xs:gDay | XMLGregorianCalendar
xs:gMonth | XMLGregorianCalendar
xs:gMonthDay | XMLGregorianCalendar
xs:gYear | XMLGregorianCalendar
xs:gYearMonth | XMLGregorianCalendar
xs:time | XMLGregorianCalendar
XQuery 1.0 and XPath 2.0 Data Model | Java Data Type
xdt:dayTimeDuration | Duration
xdt:yearMonthDuration | Duration

W3C XML Schema data types that have a "natural" mapping to Java types are defined by JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. JAXB defined mappings for XML Schema built-in data types include:

  • xs:anySimpleType
  • xs:base64Binary
  • xs:boolean
  • xs:byte
  • xs:decimal
  • xs:double
  • xs:float
  • xs:hexBinary
  • xs:int
  • xs:integer
  • xs:long
  • xs:QName
  • xs:short
  • xs:string
  • xs:unsignedByte
  • xs:unsignedInt
  • xs:unsignedShort
  • Author Jeff Suttor
  • See W3C XML Schema 1.0 Part 2, Section 3.2.7-14
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
  • See XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.datatype

Classes

  • DatatypeConstants
  • DatatypeConstants.Field
  • DatatypeFactory
  • Duration
  • XMLGregorianCalendar

Exceptions

  • DatatypeConfigurationException


compact2 - javax.xml.namespace

Interfaces

  • NamespaceContext

Classes

  • QName


namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.namespace

XML Namespace processing.

See: Description

  • Interface Summary
    Interface Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
  • Class Summary
    Class Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.

Package javax.xml.namespace Description

XML Namespace processing.

The following XML standards apply:

  • XML Schema Part2: Datatypes specification
  • Namespaces in XML
  • Namespaces in XML Errata
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.namespace

Interfaces

  • NamespaceContext

Classes

  • QName


namespace

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.namespace

XML Namespace processing.

See: Description

  • Interface Summary
    Interface Description
    NamespaceContext
    Interface for read only XML Namespace context processing.
  • Class Summary
    Class Description
    QName
    QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.

Package javax.xml.namespace Description

XML Namespace processing.

The following XML standards apply:

  • XML Schema Part2: Datatypes specification
  • Namespaces in XML
  • Namespaces in XML Errata
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.namespace

Interfaces

  • NamespaceContext

Classes

  • QName


compact2 - javax.xml.parsers

Classes

  • DocumentBuilder
  • DocumentBuilderFactory
  • SAXParser
  • SAXParserFactory

Exceptions

  • ParserConfigurationException

Errors

  • FactoryConfigurationError


parsers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.parsers

Provides classes allowing the processing of XML documents.

See: Description

  • Class Summary
    Class Description
    DocumentBuilder
    Defines the API to obtain DOM Document instances from an XML document.
    DocumentBuilderFactory
    Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
    SAXParser
    Defines the API that wraps an XMLReader implementation class.
    SAXParserFactory
    Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
  • Exception Summary
    Exception Description
    ParserConfigurationException
    Indicates a serious configuration error.
  • Error Summary
    Error Description
    FactoryConfigurationError
    Thrown when a problem with configuration with the Parser Factories exists.

Package javax.xml.parsers Description

Provides classes allowing the processing of XML documents. Two types of plugable parsers are supported:

  • SAX (Simple API for XML)
  • DOM (Document Object Model)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.parsers

Classes

  • DocumentBuilder
  • DocumentBuilderFactory
  • SAXParser
  • SAXParserFactory

Exceptions

  • ParserConfigurationException

Errors

  • FactoryConfigurationError


parsers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.parsers

Provides classes allowing the processing of XML documents.

See: Description

  • Class Summary
    Class Description
    DocumentBuilder
    Defines the API to obtain DOM Document instances from an XML document.
    DocumentBuilderFactory
    Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
    SAXParser
    Defines the API that wraps an XMLReader implementation class.
    SAXParserFactory
    Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
  • Exception Summary
    Exception Description
    ParserConfigurationException
    Indicates a serious configuration error.
  • Error Summary
    Error Description
    FactoryConfigurationError
    Thrown when a problem with configuration with the Parser Factories exists.

Package javax.xml.parsers Description

Provides classes allowing the processing of XML documents. Two types of plugable parsers are supported:

  • SAX (Simple API for XML)
  • DOM (Document Object Model)
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.parsers

Classes

  • DocumentBuilder
  • DocumentBuilderFactory
  • SAXParser
  • SAXParserFactory

Exceptions

  • ParserConfigurationException

Errors

  • FactoryConfigurationError


javax.xml.soap

Interfaces

  • Detail
  • DetailEntry
  • Name
  • Node
  • SOAPBody
  • SOAPBodyElement
  • SOAPConstants
  • SOAPElement
  • SOAPEnvelope
  • SOAPFault
  • SOAPFaultElement
  • SOAPHeader
  • SOAPHeaderElement
  • Text

Classes

  • AttachmentPart
  • MessageFactory
  • MimeHeader
  • MimeHeaders
  • SAAJMetaFactory
  • SAAJResult
  • SOAPConnection
  • SOAPConnectionFactory
  • SOAPElementFactory
  • SOAPFactory
  • SOAPMessage
  • SOAPPart

Exceptions

  • SOAPException


compact2 - javax.xml.stream

Interfaces

  • EventFilter
  • Location
  • StreamFilter
  • XMLEventReader
  • XMLEventWriter
  • XMLReporter
  • XMLResolver
  • XMLStreamConstants
  • XMLStreamReader
  • XMLStreamWriter

Classes

  • XMLEventFactory
  • XMLInputFactory
  • XMLOutputFactory

Exceptions

  • XMLStreamException

Errors

  • FactoryConfigurationError


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.stream

  • Interface Summary
    Interface Description
    EventFilter
    This interface declares a simple filter interface that one can create to filter XMLEventReaders
    Location
    Provides information on the location of an event.
    StreamFilter
    This interface declares a simple filter interface that one can create to filter XMLStreamReaders
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLReporter
    This interface is used to report non-fatal errors.
    XMLResolver
    This interface is used to resolve resources during an XML parse.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Class Summary
    Class Description
    XMLEventFactory
    This interface defines a utility class for creating instances of XMLEvents
    XMLInputFactory
    Defines an abstract implementation of a factory for getting streams.
    XMLOutputFactory
    Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters.
  • Exception Summary
    Exception Description
    XMLStreamException
    The base exception for unexpected processing errors.
  • Error Summary
    Error Description
    FactoryConfigurationError
    An error class for reporting factory configuration errors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.stream

Interfaces

  • EventFilter
  • Location
  • StreamFilter
  • XMLEventReader
  • XMLEventWriter
  • XMLReporter
  • XMLResolver
  • XMLStreamConstants
  • XMLStreamReader
  • XMLStreamWriter

Classes

  • XMLEventFactory
  • XMLInputFactory
  • XMLOutputFactory

Exceptions

  • XMLStreamException

Errors

  • FactoryConfigurationError


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.stream

  • Interface Summary
    Interface Description
    EventFilter
    This interface declares a simple filter interface that one can create to filter XMLEventReaders
    Location
    Provides information on the location of an event.
    StreamFilter
    This interface declares a simple filter interface that one can create to filter XMLStreamReaders
    XMLEventReader
    This is the top level interface for parsing XML Events.
    XMLEventWriter
    This is the top level interface for writing XML documents.
    XMLReporter
    This interface is used to report non-fatal errors.
    XMLResolver
    This interface is used to resolve resources during an XML parse.
    XMLStreamConstants
    This interface declares the constants used in this API.
    XMLStreamReader
    The XMLStreamReader interface allows forward, read-only access to XML.
    XMLStreamWriter
    The XMLStreamWriter interface specifies how to write XML.
  • Class Summary
    Class Description
    XMLEventFactory
    This interface defines a utility class for creating instances of XMLEvents
    XMLInputFactory
    Defines an abstract implementation of a factory for getting streams.
    XMLOutputFactory
    Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters.
  • Exception Summary
    Exception Description
    XMLStreamException
    The base exception for unexpected processing errors.
  • Error Summary
    Error Description
    FactoryConfigurationError
    An error class for reporting factory configuration errors.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream

Interfaces

  • EventFilter
  • Location
  • StreamFilter
  • XMLEventReader
  • XMLEventWriter
  • XMLReporter
  • XMLResolver
  • XMLStreamConstants
  • XMLStreamReader
  • XMLStreamWriter

Classes

  • XMLEventFactory
  • XMLInputFactory
  • XMLOutputFactory

Exceptions

  • XMLStreamException

Errors

  • FactoryConfigurationError


compact2 - javax.xml.stream.events

Interfaces

  • Attribute
  • Characters
  • Comment
  • DTD
  • EndDocument
  • EndElement
  • EntityDeclaration
  • EntityReference
  • Namespace
  • NotationDeclaration
  • ProcessingInstruction
  • StartDocument
  • StartElement
  • XMLEvent


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.stream.events

  • Interface Summary
    Interface Description
    Attribute
    An interface that contains information about an attribute.
    Characters
    This describes the interface to Characters events.
    Comment
    An interface for comment events
    DTD
    This is the top level interface for events dealing with DTDs
    EndDocument
    A marker interface for the end of the document
    EndElement
    An interface for the end element event.
    EntityDeclaration
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    EntityReference
    An interface for handling Entity events.
    Namespace
    An interface that contains information about a namespace.
    NotationDeclaration
    An interface for handling Notation Declarations Receive notification of a notation declaration event.
    ProcessingInstruction
    An interface that describes the data found in processing instructions
    StartDocument
    An interface for the start document event
    StartElement
    The StartElement interface provides access to information about start elements.
    XMLEvent
    This is the base event interface for handling markup events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.stream.events

Interfaces

  • Attribute
  • Characters
  • Comment
  • DTD
  • EndDocument
  • EndElement
  • EntityDeclaration
  • EntityReference
  • Namespace
  • NotationDeclaration
  • ProcessingInstruction
  • StartDocument
  • StartElement
  • XMLEvent


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.stream.events

  • Interface Summary
    Interface Description
    Attribute
    An interface that contains information about an attribute.
    Characters
    This describes the interface to Characters events.
    Comment
    An interface for comment events
    DTD
    This is the top level interface for events dealing with DTDs
    EndDocument
    A marker interface for the end of the document
    EndElement
    An interface for the end element event.
    EntityDeclaration
    An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
    EntityReference
    An interface for handling Entity events.
    Namespace
    An interface that contains information about a namespace.
    NotationDeclaration
    An interface for handling Notation Declarations Receive notification of a notation declaration event.
    ProcessingInstruction
    An interface that describes the data found in processing instructions
    StartDocument
    An interface for the start document event
    StartElement
    The StartElement interface provides access to information about start elements.
    XMLEvent
    This is the base event interface for handling markup events.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream.events

Interfaces

  • Attribute
  • Characters
  • Comment
  • DTD
  • EndDocument
  • EndElement
  • EntityDeclaration
  • EntityReference
  • Namespace
  • NotationDeclaration
  • ProcessingInstruction
  • StartDocument
  • StartElement
  • XMLEvent


compact2 - javax.xml.stream.util

Interfaces

  • XMLEventAllocator
  • XMLEventConsumer

Classes

  • EventReaderDelegate
  • StreamReaderDelegate


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.stream.util

  • Interface Summary
    Interface Description
    XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader.
    XMLEventConsumer
    This interface defines an event consumer interface.
  • Class Summary
    Class Description
    EventReaderDelegate
    This is the base class for deriving an XMLEventReader filter.
    StreamReaderDelegate
    This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.stream.util

Interfaces

  • XMLEventAllocator
  • XMLEventConsumer

Classes

  • EventReaderDelegate
  • StreamReaderDelegate


util

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.stream.util

  • Interface Summary
    Interface Description
    XMLEventAllocator
    This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader.
    XMLEventConsumer
    This interface defines an event consumer interface.
  • Class Summary
    Class Description
    EventReaderDelegate
    This is the base class for deriving an XMLEventReader filter.
    StreamReaderDelegate
    This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.stream.util

Interfaces

  • XMLEventAllocator
  • XMLEventConsumer

Classes

  • EventReaderDelegate
  • StreamReaderDelegate


compact2 - javax.xml.transform

Interfaces

  • ErrorListener
  • Result
  • Source
  • SourceLocator
  • Templates
  • URIResolver

Classes

  • OutputKeys
  • Transformer
  • TransformerFactory

Exceptions

  • TransformerConfigurationException
  • TransformerException

Errors

  • TransformerFactoryConfigurationError


transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.transform

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

See: Description

  • Interface Summary
    Interface Description
    ErrorListener
    To provide customized error handling, implement this interface and use the setErrorListener method to register an instance of the implmentation with the Transformer.
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
    Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.
    URIResolver
    An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
  • Class Summary
    Class Description
    OutputKeys
    Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or Templates object.
    Transformer
    An instance of this abstract class can transform a source tree into a result tree.
    TransformerFactory
    A TransformerFactory instance can be used to create Transformer and Templates objects.
  • Exception Summary
    Exception Description
    TransformerConfigurationException
    Indicates a serious configuration error.
    TransformerException
    This class specifies an exceptional condition that occured during the transformation process.
  • Error Summary
    Error Description
    TransformerFactoryConfigurationError
    Thrown when a problem with configuration with the Transformer Factories exists.

Package javax.xml.transform Description

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result. These interfaces have no dependencies on SAX or the DOM standard, and try to make as few assumptions as possible about the details of the source and result of a transformation. It achieves this by defining Source and Result interfaces.

To define concrete classes for the user, the API defines specializations of the interfaces found at the root level. These interfaces are found in javax.xml.transform.sax, javax.xml.transform.dom, and javax.xml.transform.stream.

Creating Objects

The API allows a concrete TransformerFactory object to be created from the static function TransformerFactory.newInstance().

Specification of Inputs and Outputs

This API defines two interface objects called Source and Result. In order to pass Source and Result objects to the interfaces, concrete classes must be used. Three concrete representations are defined for each of these objects: StreamSource and StreamResult, SAXSource and SAXResult, and DOMSource and DOMResult. Each of these objects defines a FEATURE string (which is i the form of a URL), which can be passed into TransformerFactory.getFeature(java.lang.String) to see if the given type of Source or Result object is supported. For instance, to test if a DOMSource and a StreamResult is supported, you can apply the following test.

TransformerFactory tfactory = TransformerFactory.newInstance();
if (tfactory.getFeature(DOMSource.FEATURE) && tfactory.getFeature(StreamResult.FEATURE)) {
...
}

Qualified Name Representation

Namespaces present something of a problem area when dealing with XML objects. Qualified Names appear in XML markup as prefixed names. But the prefixes themselves do not hold identity. Rather, it is the URIs that they contextually map to that hold the identity. Therefore, when passing a Qualified Name like "xyz:foo" among Java programs, one must provide a means to map "xyz" to a namespace.

One solution has been to create a "QName" object that holds the namespace URI, as well as the prefix and local name, but this is not always an optimal solution, as when, for example, you want to use unique strings as keys in a dictionary object. Not having a string representation also makes it difficult to specify a namespaced identity outside the context of an XML document.

In order to pass namespaced values to transformations, for instance when setting a property or a parameter on a Transformer object, this specification defines that a String "qname" object parameter be passed as two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the qname has a null URI, then the String object only contains the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that the prefix is lost.

Result Tree Serialization

Serialization of the result tree to a stream can be controlled with the Transformer.setOutputProperties(java.util.Properties) and the Transformer.setOutputProperty(java.lang.String, java.lang.String) methods. These properties only apply to stream results, they have no effect when the result is a DOM tree or SAX event stream.

Strings that match the XSLT specification for xsl:output attributes can be referenced from the OutputKeys class. Other strings can be specified as well. If the transformer does not recognize an output key, a IllegalArgumentException is thrown, unless the key name is namespace qualified. Output key names that are namespace qualified are always allowed, although they may be ignored by some implementations.

If all that is desired is the simple identity transformation of a source to a result, then TransformerFactory provides a TransformerFactory.newTransformer() method with no arguments. This method creates a Transformer that effectively copies the source to the result. This method may be used to create a DOM from SAX events or to create an XML or HTML stream from a DOM or SAX events.

Exceptions and Error Reporting

The transformation API throw three types of specialized exceptions. A TransformerFactoryConfigurationError is parallel to the FactoryConfigurationError, and is thrown when a configuration problem with the TransformerFactory exists. This error will typically be thrown when the transformation factory class specified with the "javax.xml.transform.TransformerFactory" system property cannot be found or instantiated.

A TransformerConfigurationException may be thrown if for any reason a Transformer can not be created. A TransformerConfigurationException may be thrown if there is a syntax error in the transformation instructions, for example when TransformerFactory.newTransformer(javax.xml.transform.Source) is called.

TransformerException is a general exception that occurs during the course of a transformation. A transformer exception may wrap another exception, and if any of the TransformerException.printStackTrace() methods are called on it, it will produce a list of stack dumps, starting from the most recent. The transformer exception also provides a SourceLocator object which indicates where in the source tree or transformation instructions the error occurred. TransformerException.getMessageAndLocation() may be called to get an error message with location info, and TransformerException.getLocationAsString() may be called to get just the location string.

Transformation warnings and errors are sent to an ErrorListener, at which point the application may decide to report the error or warning, and may decide to throw an Exception for a non-fatal error. The ErrorListener may be set via TransformerFactory.setErrorListener(javax.xml.transform.ErrorListener) for reporting errors that have to do with syntax errors in the transformation instructions, or via Transformer.setErrorListener(javax.xml.transform.ErrorListener) to report errors that occur during the transformation. The ErrorListener on both objects will always be valid and non-null, whether set by the application or a default implementation provided by the processor. The default implementation provided by the processor will report all warnings and errors to System.err and does not throw any Exceptions. Applications are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors.

Resolution of URIs within a transformation

The API provides a way for URIs referenced from within the stylesheet instructions or within the transformation to be resolved by the calling application. This can be done by creating a class that implements the URIResolver interface, with its one method, URIResolver.resolve(java.lang.String, java.lang.String), and use this class to set the URI resolution for the transformation instructions or transformation with TransformerFactory.setURIResolver(javax.xml.transform.URIResolver) or Transformer.setURIResolver(javax.xml.transform.URIResolver). The URIResolver.resolve method takes two String arguments, the URI found in the stylesheet instructions or built as part of the transformation process, and the base URI against which the first argument will be made absolute if the absolute URI is required. The returned Source object must be usable by the transformer, as specified in its implemented features.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.transform

Interfaces

  • ErrorListener
  • Result
  • Source
  • SourceLocator
  • Templates
  • URIResolver

Classes

  • OutputKeys
  • Transformer
  • TransformerFactory

Exceptions

  • TransformerConfigurationException
  • TransformerException

Errors

  • TransformerFactoryConfigurationError


transform

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.transform

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.

See: Description

  • Interface Summary
    Interface Description
    ErrorListener
    To provide customized error handling, implement this interface and use the setErrorListener method to register an instance of the implmentation with the Transformer.
    Result
    An object that implements this interface contains the information needed to build a transformation result tree.
    Source
    An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions).
    SourceLocator
    This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions.
    Templates
    An object that implements this interface is the runtime representation of processed transformation instructions.
    URIResolver
    An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
  • Class Summary
    Class Description
    OutputKeys
    Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or Templates object.
    Transformer
    An instance of this abstract class can transform a source tree into a result tree.
    TransformerFactory
    A TransformerFactory instance can be used to create Transformer and Templates objects.
  • Exception Summary
    Exception Description
    TransformerConfigurationException
    Indicates a serious configuration error.
    TransformerException
    This class specifies an exceptional condition that occured during the transformation process.
  • Error Summary
    Error Description
    TransformerFactoryConfigurationError
    Thrown when a problem with configuration with the Transformer Factories exists.

Package javax.xml.transform Description

This package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result. These interfaces have no dependencies on SAX or the DOM standard, and try to make as few assumptions as possible about the details of the source and result of a transformation. It achieves this by defining Source and Result interfaces.

To define concrete classes for the user, the API defines specializations of the interfaces found at the root level. These interfaces are found in javax.xml.transform.sax, javax.xml.transform.dom, and javax.xml.transform.stream.

Creating Objects

The API allows a concrete TransformerFactory object to be created from the static function TransformerFactory.newInstance().

Specification of Inputs and Outputs

This API defines two interface objects called Source and Result. In order to pass Source and Result objects to the interfaces, concrete classes must be used. Three concrete representations are defined for each of these objects: StreamSource and StreamResult, SAXSource and SAXResult, and DOMSource and DOMResult. Each of these objects defines a FEATURE string (which is i the form of a URL), which can be passed into TransformerFactory.getFeature(java.lang.String) to see if the given type of Source or Result object is supported. For instance, to test if a DOMSource and a StreamResult is supported, you can apply the following test.

TransformerFactory tfactory = TransformerFactory.newInstance();
if (tfactory.getFeature(DOMSource.FEATURE) && tfactory.getFeature(StreamResult.FEATURE)) {
...
}

Qualified Name Representation

Namespaces present something of a problem area when dealing with XML objects. Qualified Names appear in XML markup as prefixed names. But the prefixes themselves do not hold identity. Rather, it is the URIs that they contextually map to that hold the identity. Therefore, when passing a Qualified Name like "xyz:foo" among Java programs, one must provide a means to map "xyz" to a namespace.

One solution has been to create a "QName" object that holds the namespace URI, as well as the prefix and local name, but this is not always an optimal solution, as when, for example, you want to use unique strings as keys in a dictionary object. Not having a string representation also makes it difficult to specify a namespaced identity outside the context of an XML document.

In order to pass namespaced values to transformations, for instance when setting a property or a parameter on a Transformer object, this specification defines that a String "qname" object parameter be passed as two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the qname has a null URI, then the String object only contains the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.

For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that the prefix is lost.

Result Tree Serialization

Serialization of the result tree to a stream can be controlled with the Transformer.setOutputProperties(java.util.Properties) and the Transformer.setOutputProperty(java.lang.String, java.lang.String) methods. These properties only apply to stream results, they have no effect when the result is a DOM tree or SAX event stream.

Strings that match the XSLT specification for xsl:output attributes can be referenced from the OutputKeys class. Other strings can be specified as well. If the transformer does not recognize an output key, a IllegalArgumentException is thrown, unless the key name is namespace qualified. Output key names that are namespace qualified are always allowed, although they may be ignored by some implementations.

If all that is desired is the simple identity transformation of a source to a result, then TransformerFactory provides a TransformerFactory.newTransformer() method with no arguments. This method creates a Transformer that effectively copies the source to the result. This method may be used to create a DOM from SAX events or to create an XML or HTML stream from a DOM or SAX events.

Exceptions and Error Reporting

The transformation API throw three types of specialized exceptions. A TransformerFactoryConfigurationError is parallel to the FactoryConfigurationError, and is thrown when a configuration problem with the TransformerFactory exists. This error will typically be thrown when the transformation factory class specified with the "javax.xml.transform.TransformerFactory" system property cannot be found or instantiated.

A TransformerConfigurationException may be thrown if for any reason a Transformer can not be created. A TransformerConfigurationException may be thrown if there is a syntax error in the transformation instructions, for example when TransformerFactory.newTransformer(javax.xml.transform.Source) is called.

TransformerException is a general exception that occurs during the course of a transformation. A transformer exception may wrap another exception, and if any of the TransformerException.printStackTrace() methods are called on it, it will produce a list of stack dumps, starting from the most recent. The transformer exception also provides a SourceLocator object which indicates where in the source tree or transformation instructions the error occurred. TransformerException.getMessageAndLocation() may be called to get an error message with location info, and TransformerException.getLocationAsString() may be called to get just the location string.

Transformation warnings and errors are sent to an ErrorListener, at which point the application may decide to report the error or warning, and may decide to throw an Exception for a non-fatal error. The ErrorListener may be set via TransformerFactory.setErrorListener(javax.xml.transform.ErrorListener) for reporting errors that have to do with syntax errors in the transformation instructions, or via Transformer.setErrorListener(javax.xml.transform.ErrorListener) to report errors that occur during the transformation. The ErrorListener on both objects will always be valid and non-null, whether set by the application or a default implementation provided by the processor. The default implementation provided by the processor will report all warnings and errors to System.err and does not throw any Exceptions. Applications are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors.

Resolution of URIs within a transformation

The API provides a way for URIs referenced from within the stylesheet instructions or within the transformation to be resolved by the calling application. This can be done by creating a class that implements the URIResolver interface, with its one method, URIResolver.resolve(java.lang.String, java.lang.String), and use this class to set the URI resolution for the transformation instructions or transformation with TransformerFactory.setURIResolver(javax.xml.transform.URIResolver) or Transformer.setURIResolver(javax.xml.transform.URIResolver). The URIResolver.resolve method takes two String arguments, the URI found in the stylesheet instructions or built as part of the transformation process, and the base URI against which the first argument will be made absolute if the absolute URI is required. The returned Source object must be usable by the transformer, as specified in its implemented features.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform

Interfaces

  • ErrorListener
  • Result
  • Source
  • SourceLocator
  • Templates
  • URIResolver

Classes

  • OutputKeys
  • Transformer
  • TransformerFactory

Exceptions

  • TransformerConfigurationException
  • TransformerException

Errors

  • TransformerFactoryConfigurationError


compact2 - javax.xml.transform.dom

Interfaces

  • DOMLocator

Classes

  • DOMResult
  • DOMSource


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.transform.dom

This package implements DOM-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    DOMLocator
    Indicates the position of a node in a source DOM, intended primarily for error reporting.
  • Class Summary
    Class Description
    DOMResult
    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
    DOMSource
    Acts as a holder for a transformation Source tree in the form of a Document Object Model (DOM) tree.

Package javax.xml.transform.dom Description

This package implements DOM-specific transformation APIs.

The DOMSource class allows the client of the implementation of this API to specify a DOM Node as the source of the input tree. The model of how the Transformer deals with the DOM tree in terms of mismatches with the XSLT data model or other data models is beyond the scope of this document. Any of the nodes derived from Node are legal input.

The DOMResult class allows a Node to be specified to which result DOM nodes will be appended. If an output node is not specified, the transformer will use DocumentBuilder.newDocument() to create an output Document node. If a node is specified, it should be one of the following: Document, Element, or DocumentFragment. Specification of any other node type is implementation dependent and undefined by this API. If the result is a Document, the output of the transformation must have a single element root to set as the document element.

The DOMLocator node may be passed to TransformerException objects, and retrieved by trying to cast the result of the TransformerException.getLocator() method. The implementation has no responsibility to use a DOMLocator instead of a SourceLocator (though line numbers and the like do not make much sense for a DOM), so the result of getLocator must always be tested with an instanceof.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.transform.dom

Interfaces

  • DOMLocator

Classes

  • DOMResult
  • DOMSource


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.transform.dom

This package implements DOM-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    DOMLocator
    Indicates the position of a node in a source DOM, intended primarily for error reporting.
  • Class Summary
    Class Description
    DOMResult
    Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
    DOMSource
    Acts as a holder for a transformation Source tree in the form of a Document Object Model (DOM) tree.

Package javax.xml.transform.dom Description

This package implements DOM-specific transformation APIs.

The DOMSource class allows the client of the implementation of this API to specify a DOM Node as the source of the input tree. The model of how the Transformer deals with the DOM tree in terms of mismatches with the XSLT data model or other data models is beyond the scope of this document. Any of the nodes derived from Node are legal input.

The DOMResult class allows a Node to be specified to which result DOM nodes will be appended. If an output node is not specified, the transformer will use DocumentBuilder.newDocument() to create an output Document node. If a node is specified, it should be one of the following: Document, Element, or DocumentFragment. Specification of any other node type is implementation dependent and undefined by this API. If the result is a Document, the output of the transformation must have a single element root to set as the document element.

The DOMLocator node may be passed to TransformerException objects, and retrieved by trying to cast the result of the TransformerException.getLocator() method. The implementation has no responsibility to use a DOMLocator instead of a SourceLocator (though line numbers and the like do not make much sense for a DOM), so the result of getLocator must always be tested with an instanceof.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.dom

Interfaces

  • DOMLocator

Classes

  • DOMResult
  • DOMSource


compact2 - javax.xml.transform.sax

Interfaces

  • TemplatesHandler
  • TransformerHandler

Classes

  • SAXResult
  • SAXSource
  • SAXTransformerFactory


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.transform.sax

This package implements SAX2-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    TemplatesHandler
    A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
    TransformerHandler
    A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
  • Class Summary
    Class Description
    SAXResult
    Acts as an holder for a transformation Result.
    SAXSource
    Acts as an holder for SAX-style Source.
    SAXTransformerFactory
    This class extends TransformerFactory to provide SAX-specific factory methods.

Package javax.xml.transform.sax Description

This package implements SAX2-specific transformation APIs. It provides classes which allow input from ContentHandler events, and also classes that produce org.xml.sax.ContentHandler events. It also provides methods to set the input source as an XMLReader, or to use a InputSource as the source. It also allows the creation of a XMLFilter, which enables transformations to "pull" from other transformations, and lets the transformer to be used polymorphically as an XMLReader.

The SAXSource class allows the setting of an XMLReader to be used for "pulling" parse events, and an InputSource that may be used to specify the SAX source.

The SAXResult class allows the setting of a ContentHandler to be the receiver of SAX2 events from the transformation.

The SAXTransformerFactory extends TransformerFactory to provide factory methods for creating TemplatesHandler, TransformerHandler, and XMLReader instances.

To obtain a SAXTransformerFactory, the caller must cast the TransformerFactory instance returned from TransformerFactory.newInstance().

The TransformerHandler interface allows a transformation to be created from SAX2 parse events, which is a "push" model rather than the "pull" model that normally occurs for a transformation. Normal parse events are received through the ContentHandler interface, lexical events such as startCDATA and endCDATA are received through the LexicalHandler interface, and events that signal the start or end of disabling output escaping are received via ContentHandler.processingInstruction(java.lang.String, java.lang.String), with the target parameter being Result.PI_DISABLE_OUTPUT_ESCAPING and Result.PI_ENABLE_OUTPUT_ESCAPING. If parameters, output properties, or other features need to be set on the Transformer handler, a Transformer reference will need to be obtained from TransformerHandler.getTransformer(), and the methods invoked from that reference.

The TemplatesHandler interface allows the creation of Templates objects from SAX2 parse events. Once the ContentHandler events are complete, the Templates object may be obtained from TemplatesHandler.getTemplates(). Note that TemplatesHandler.setSystemId(java.lang.String) should normally be called in order to establish a base system ID from which relative URLs may be resolved.

The SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source) method allows the creation of a XMLFilter, which encapsulates the SAX2 notion of a "pull" transformation. The following illustrates several transformations chained together. Each filter points to a parent XMLReader, and the final transformation is caused by invoking XMLReader.parse(org.xml.sax.InputSource) on the final reader in the chain.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.transform.sax

Interfaces

  • TemplatesHandler
  • TransformerHandler

Classes

  • SAXResult
  • SAXSource
  • SAXTransformerFactory


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.transform.sax

This package implements SAX2-specific transformation APIs.

See: Description

  • Interface Summary
    Interface Description
    TemplatesHandler
    A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object.
    TransformerHandler
    A TransformerHandler listens for SAX ContentHandler parse events and transforms them to a Result.
  • Class Summary
    Class Description
    SAXResult
    Acts as an holder for a transformation Result.
    SAXSource
    Acts as an holder for SAX-style Source.
    SAXTransformerFactory
    This class extends TransformerFactory to provide SAX-specific factory methods.

Package javax.xml.transform.sax Description

This package implements SAX2-specific transformation APIs. It provides classes which allow input from ContentHandler events, and also classes that produce org.xml.sax.ContentHandler events. It also provides methods to set the input source as an XMLReader, or to use a InputSource as the source. It also allows the creation of a XMLFilter, which enables transformations to "pull" from other transformations, and lets the transformer to be used polymorphically as an XMLReader.

The SAXSource class allows the setting of an XMLReader to be used for "pulling" parse events, and an InputSource that may be used to specify the SAX source.

The SAXResult class allows the setting of a ContentHandler to be the receiver of SAX2 events from the transformation.

The SAXTransformerFactory extends TransformerFactory to provide factory methods for creating TemplatesHandler, TransformerHandler, and XMLReader instances.

To obtain a SAXTransformerFactory, the caller must cast the TransformerFactory instance returned from TransformerFactory.newInstance().

The TransformerHandler interface allows a transformation to be created from SAX2 parse events, which is a "push" model rather than the "pull" model that normally occurs for a transformation. Normal parse events are received through the ContentHandler interface, lexical events such as startCDATA and endCDATA are received through the LexicalHandler interface, and events that signal the start or end of disabling output escaping are received via ContentHandler.processingInstruction(java.lang.String, java.lang.String), with the target parameter being Result.PI_DISABLE_OUTPUT_ESCAPING and Result.PI_ENABLE_OUTPUT_ESCAPING. If parameters, output properties, or other features need to be set on the Transformer handler, a Transformer reference will need to be obtained from TransformerHandler.getTransformer(), and the methods invoked from that reference.

The TemplatesHandler interface allows the creation of Templates objects from SAX2 parse events. Once the ContentHandler events are complete, the Templates object may be obtained from TemplatesHandler.getTemplates(). Note that TemplatesHandler.setSystemId(java.lang.String) should normally be called in order to establish a base system ID from which relative URLs may be resolved.

The SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source) method allows the creation of a XMLFilter, which encapsulates the SAX2 notion of a "pull" transformation. The following illustrates several transformations chained together. Each filter points to a parent XMLReader, and the final transformation is caused by invoking XMLReader.parse(org.xml.sax.InputSource) on the final reader in the chain.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.sax

Interfaces

  • TemplatesHandler
  • TransformerHandler

Classes

  • SAXResult
  • SAXSource
  • SAXTransformerFactory


compact2 - javax.xml.transform.stax

Classes

  • StAXResult
  • StAXSource


stax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.transform.stax

Provides for StAX-specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StAXResult
    Acts as a holder for an XML Result in the form of a StAX writer,i.e.
    StAXSource
    Acts as a holder for an XML Source in the form of a StAX reader,i.e.

Package javax.xml.transform.stax Description

Provides for StAX-specific transformation APIs. TODO: better description(s).

Package Specification

  • JSR 173: Streaming API for XML

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

  • TODO: Refer to non-spec documentation
  • @see XMLStreamReader
  • @see XMLEventReader

Since:
1.6

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.transform.stax

Classes

  • StAXResult
  • StAXSource


stax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.transform.stax

Provides for StAX-specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StAXResult
    Acts as a holder for an XML Result in the form of a StAX writer,i.e.
    StAXSource
    Acts as a holder for an XML Source in the form of a StAX reader,i.e.

Package javax.xml.transform.stax Description

Provides for StAX-specific transformation APIs. TODO: better description(s).

Package Specification

  • JSR 173: Streaming API for XML

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

  • TODO: Refer to non-spec documentation
  • @see XMLStreamReader
  • @see XMLEventReader

Since:
1.6

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.stax

Classes

  • StAXResult
  • StAXSource


compact2 - javax.xml.transform.stream

Classes

  • StreamResult
  • StreamSource


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.transform.stream

This package implements stream- and URI- specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StreamResult
    Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.
    StreamSource
    Acts as an holder for a transformation Source in the form of a stream of XML markup.

Package javax.xml.transform.stream Description

This package implements stream- and URI- specific transformation APIs.

The StreamSource class provides methods for specifying InputStream input, Reader input, and URL input in the form of strings. Even if an input stream or reader is specified as the source, StreamSource.setSystemId(java.lang.String) should still be called, so that the transformer can know from where it should resolve relative URIs. The public identifier is always optional: if the application writer includes one, it will be provided as part of the SourceLocator information.

The StreamResult class provides methods for specifying OutputStream, Writer, or an output system ID, as the output of the transformation result.

Normally streams should be used rather than readers or writers, for both the Source and Result, since readers and writers already have the encoding established to and from the internal Unicode format. However, there are times when it is useful to write to a character stream, such as when using a StringWriter in order to write to a String, or in the case of reading source XML from a StringReader.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.transform.stream

Classes

  • StreamResult
  • StreamSource


stream

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.transform.stream

This package implements stream- and URI- specific transformation APIs.

See: Description

  • Class Summary
    Class Description
    StreamResult
    Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.
    StreamSource
    Acts as an holder for a transformation Source in the form of a stream of XML markup.

Package javax.xml.transform.stream Description

This package implements stream- and URI- specific transformation APIs.

The StreamSource class provides methods for specifying InputStream input, Reader input, and URL input in the form of strings. Even if an input stream or reader is specified as the source, StreamSource.setSystemId(java.lang.String) should still be called, so that the transformer can know from where it should resolve relative URIs. The public identifier is always optional: if the application writer includes one, it will be provided as part of the SourceLocator information.

The StreamResult class provides methods for specifying OutputStream, Writer, or an output system ID, as the output of the transformation result.

Normally streams should be used rather than readers or writers, for both the Source and Result, since readers and writers already have the encoding established to and from the internal Unicode format. However, there are times when it is useful to write to a character stream, such as when using a StringWriter in order to write to a String, or in the case of reading source XML from a StringReader.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.transform.stream

Classes

  • StreamResult
  • StreamSource


compact2 - javax.xml.validation

Classes

  • Schema
  • SchemaFactory
  • SchemaFactoryLoader
  • TypeInfoProvider
  • Validator
  • ValidatorHandler

Errors

  • SchemaFactoryConfigurationError


validation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.validation

This package provides an API for validation of XML documents.

See: Description

  • Class Summary
    Class Description
    Schema
    Immutable in-memory representation of grammar.
    SchemaFactory
    Factory that creates Schema objects. Entry-point to the validation API.
    SchemaFactoryLoader
    Factory that creates SchemaFactory.
    TypeInfoProvider
    This class provides access to the type information determined by ValidatorHandler.
    Validator
    A processor that checks an XML document against Schema.
    ValidatorHandler
    Streaming validator that works on SAX stream.
  • Error Summary
    Error Description
    SchemaFactoryConfigurationError
    Thrown when a problem with configuration with the Schema Factories exists.

Package javax.xml.validation Description

This package provides an API for validation of XML documents. Validation is the process of verifying that an XML document is an instance of a specified XML schema. An XML schema defines the content model (also called a grammar or vocabulary) that its instance documents will represent.

There are a number of popular technologies available for creating an XML schema. Some of the most popular include:

  • Document Type Definition (DTD) - XML's built-in schema language.
  • W3C XML Schema (WXS) - an object-oriented XML schema language. WXS also provides a type system for constraining the character data of an XML document. WXS is maintained by the World Wide Web Consortium (W3C) and is a W3C Recommendation (that is, a ratified W3C standard specification).
  • RELAX NG (RNG) - a pattern-based, user-friendly XML schema language. RNG schemas may also use types to constrain XML character data. RNG is maintained by the Organization for the Advancement of Structured Information Standards (OASIS) and is both an OASIS and an ISO (International Organization for Standardization) standard.
  • Schematron - a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model, Schematron is designed to enforce individual rules that are difficult or impossible to express with other schema languages. Schematron is intended to supplement a schema written in structural schema language such as the aforementioned. Schematron is in the process of becoming an ISO standard.

Previous versions of JAXP supported validation as a feature of an XML parser, represented by either a SAXParser or DocumentBuilder instance.

The JAXP validation API decouples the validation of an instance document from the parsing of an XML document. This is advantageous for several reasons, some of which are:

  • Support for additional schema langauges. As of JDK 1.5, the two most popular JAXP parser implementations, Crimson and Xerces, only support a subset of the available XML schema languages. The Validation API provides a standard mechanism through which applications may take of advantage of specialization validation libraries which support additional schema languages.
  • Easy runtime coupling of an XML instance and schema. Specifying the location of a schema to use for validation with JAXP parsers can be confusing. The Validation API makes this process simple (see example below).

Usage example. The following example demonstrates validating an XML document with the Validation API (for readability, some exception handling is not shown):

    // parse an XML document into a DOM tree
    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document document = parser.parse(new File("instance.xml"));

    // create a SchemaFactory capable of understanding WXS schemas
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

    // load a WXS schema, represented by a Schema instance
    Source schemaFile = new StreamSource(new File("mySchema.xsd"));
    Schema schema = factory.newSchema(schemaFile);

    // create a Validator instance, which can be used to validate an instance document
    Validator validator = schema.newValidator();

    // validate the DOM tree
    try {
        validator.validate(new DOMSource(document));
    } catch (SAXException e) {
        // instance document is invalid!
    }

The JAXP parsing API has been integrated with the Validation API. Applications may create a Schema with the validation API and associate it with a DocumentBuilderFactory or a SAXParserFactory instance by using the DocumentBuilderFactory.setSchema(Schema) and SAXParserFactory.setSchema(Schema) methods. You should not both set a schema and call setValidating(true) on a parser factory. The former technique will cause parsers to use the new validation API; the latter will cause parsers to use their own internal validation facilities. Turning on both of these options simultaneously will cause either redundant behavior or error conditions.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.validation

Classes

  • Schema
  • SchemaFactory
  • SchemaFactoryLoader
  • TypeInfoProvider
  • Validator
  • ValidatorHandler

Errors

  • SchemaFactoryConfigurationError


validation

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.validation

This package provides an API for validation of XML documents.

See: Description

  • Class Summary
    Class Description
    Schema
    Immutable in-memory representation of grammar.
    SchemaFactory
    Factory that creates Schema objects. Entry-point to the validation API.
    SchemaFactoryLoader
    Factory that creates SchemaFactory.
    TypeInfoProvider
    This class provides access to the type information determined by ValidatorHandler.
    Validator
    A processor that checks an XML document against Schema.
    ValidatorHandler
    Streaming validator that works on SAX stream.
  • Error Summary
    Error Description
    SchemaFactoryConfigurationError
    Thrown when a problem with configuration with the Schema Factories exists.

Package javax.xml.validation Description

This package provides an API for validation of XML documents. Validation is the process of verifying that an XML document is an instance of a specified XML schema. An XML schema defines the content model (also called a grammar or vocabulary) that its instance documents will represent.

There are a number of popular technologies available for creating an XML schema. Some of the most popular include:

  • Document Type Definition (DTD) - XML's built-in schema language.
  • W3C XML Schema (WXS) - an object-oriented XML schema language. WXS also provides a type system for constraining the character data of an XML document. WXS is maintained by the World Wide Web Consortium (W3C) and is a W3C Recommendation (that is, a ratified W3C standard specification).
  • RELAX NG (RNG) - a pattern-based, user-friendly XML schema language. RNG schemas may also use types to constrain XML character data. RNG is maintained by the Organization for the Advancement of Structured Information Standards (OASIS) and is both an OASIS and an ISO (International Organization for Standardization) standard.
  • Schematron - a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model, Schematron is designed to enforce individual rules that are difficult or impossible to express with other schema languages. Schematron is intended to supplement a schema written in structural schema language such as the aforementioned. Schematron is in the process of becoming an ISO standard.

Previous versions of JAXP supported validation as a feature of an XML parser, represented by either a SAXParser or DocumentBuilder instance.

The JAXP validation API decouples the validation of an instance document from the parsing of an XML document. This is advantageous for several reasons, some of which are:

  • Support for additional schema langauges. As of JDK 1.5, the two most popular JAXP parser implementations, Crimson and Xerces, only support a subset of the available XML schema languages. The Validation API provides a standard mechanism through which applications may take of advantage of specialization validation libraries which support additional schema languages.
  • Easy runtime coupling of an XML instance and schema. Specifying the location of a schema to use for validation with JAXP parsers can be confusing. The Validation API makes this process simple (see example below).

Usage example. The following example demonstrates validating an XML document with the Validation API (for readability, some exception handling is not shown):

    // parse an XML document into a DOM tree
    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document document = parser.parse(new File("instance.xml"));

    // create a SchemaFactory capable of understanding WXS schemas
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

    // load a WXS schema, represented by a Schema instance
    Source schemaFile = new StreamSource(new File("mySchema.xsd"));
    Schema schema = factory.newSchema(schemaFile);

    // create a Validator instance, which can be used to validate an instance document
    Validator validator = schema.newValidator();

    // validate the DOM tree
    try {
        validator.validate(new DOMSource(document));
    } catch (SAXException e) {
        // instance document is invalid!
    }

The JAXP parsing API has been integrated with the Validation API. Applications may create a Schema with the validation API and associate it with a DocumentBuilderFactory or a SAXParserFactory instance by using the DocumentBuilderFactory.setSchema(Schema) and SAXParserFactory.setSchema(Schema) methods. You should not both set a schema and call setValidating(true) on a parser factory. The former technique will cause parsers to use the new validation API; the latter will cause parsers to use their own internal validation facilities. Turning on both of these options simultaneously will cause either redundant behavior or error conditions.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.validation

Classes

  • Schema
  • SchemaFactory
  • SchemaFactoryLoader
  • TypeInfoProvider
  • Validator
  • ValidatorHandler

Errors

  • SchemaFactoryConfigurationError


javax.xml.ws

Interfaces

  • AsyncHandler
  • Binding
  • BindingProvider
  • Dispatch
  • LogicalMessage
  • Provider
  • Response
  • WebServiceContext

Classes

  • Endpoint
  • EndpointContext
  • EndpointReference
  • Holder
  • RespectBindingFeature
  • Service
  • WebServiceFeature
  • WebServicePermission

Enums

  • Service.Mode

Exceptions

  • ProtocolException
  • WebServiceException

Annotation Types

  • Action
  • BindingType
  • FaultAction
  • RequestWrapper
  • RespectBinding
  • ResponseWrapper
  • ServiceMode
  • WebEndpoint
  • WebFault
  • WebServiceClient
  • WebServiceProvider
  • WebServiceRef
  • WebServiceRefs


javax.xml.ws.handler

Interfaces

  • Handler
  • HandlerResolver
  • LogicalHandler
  • LogicalMessageContext
  • MessageContext
  • PortInfo

Enums

  • MessageContext.Scope


javax.xml.ws.handler.soap

Interfaces

  • SOAPHandler
  • SOAPMessageContext


javax.xml.ws.http

Interfaces

  • HTTPBinding

Exceptions

  • HTTPException


javax.xml.ws.soap

Interfaces

  • SOAPBinding

Classes

  • AddressingFeature
  • MTOMFeature

Enums

  • AddressingFeature.Responses

Exceptions

  • SOAPFaultException

Annotation Types

  • Addressing
  • MTOM


javax.xml.ws.spi

Classes

  • Invoker
  • Provider
  • ServiceDelegate

Annotation Types

  • WebServiceFeatureAnnotation


javax.xml.ws.spi.http

Classes

  • HttpContext
  • HttpExchange
  • HttpHandler


javax.xml.ws.wsaddressing

Classes

  • W3CEndpointReference
  • W3CEndpointReferenceBuilder


compact2 - javax.xml.xpath

Interfaces

  • XPath
  • XPathExpression
  • XPathFunction
  • XPathFunctionResolver
  • XPathVariableResolver

Classes

  • XPathConstants
  • XPathFactory

Exceptions

  • XPathException
  • XPathExpressionException
  • XPathFactoryConfigurationException
  • XPathFunctionException


xpath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package javax.xml.xpath

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

See: Description

  • Interface Summary
    Interface Description
    XPath
    XPath provides access to the XPath evaluation environment and expressions.
    XPathExpression
    XPathExpression provides access to compiled XPath expressions.
    XPathFunction
    XPathFunction provides access to XPath functions.
    XPathFunctionResolver
    XPathFunctionResolver provides access to the set of user defined XPathFunctions.
    XPathVariableResolver
    XPathVariableResolver provides access to the set of user defined XPath variables.
  • Class Summary
    Class Description
    XPathConstants
    XPath constants.
    XPathFactory
    An XPathFactory instance can be used to create XPath objects.
  • Exception Summary
    Exception Description
    XPathException
    XPathException represents a generic XPath exception.
    XPathExpressionException
    XPathExpressionException represents an error in an XPath expression.
    XPathFactoryConfigurationException
    XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.
    XPathFunctionException
    XPathFunctionException represents an error with an XPath function.

Package javax.xml.xpath Description

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

The following XML standards apply:

  • XML Path Language (XPath) Version 1.0

XPath Overview

The XPath language provides a simple, concise syntax for selecting nodes from an XML document. XPath also provides rules for converting a node in an XML document object model (DOM) tree to a boolean, double, or string value. XPath is a W3C-defined language and an official W3C recommendation; the W3C hosts the XML Path Language (XPath) Version 1.0 specification.

XPath started in life in 1999 as a supplement to the XSLT and XPointer languages, but has more recently become popular as a stand-alone language, as a single XPath expression can be used to replace many lines of DOM API code.

XPath Expressions

An XPath expression is composed of a location path and one or more optional predicates. Expressions may also include XPath variables.

The following is an example of a simple XPath expression:

/foo/bar

This example would select the <bar> element in an XML document such as the following:

<foo>
<bar/>
</foo>

The expression /foo/bar is an example of a location path. While XPath location paths resemble Unix-style file system paths, an important distinction is that XPath expressions return all nodes that match the expression. Thus, all three <bar> elements in the following document would be selected by the /foo/bar expression:

<foo>
<bar/>
<bar/>
<bar/>
</foo>

A special location path operator, //, selects nodes at any depth in an XML document. The following example selects all <bar> elements regardless of their location in a document:

//bar

A wildcard operator, *, causes all element nodes to be selected. The following example selects all children elements of a <foo> element:

/foo/*

In addition to element nodes, XPath location paths may also address attribute nodes, text nodes, comment nodes, and processing instruction nodes. The following table gives examples of location paths for each of these node types:

Location Path | Description
/foo/bar/@id | Selects the attribute id of the <bar> element
/foo/bar/text() | Selects the text nodes of the <bar> element. No distinction is made between escaped and non-escaped character data.
/foo/bar/comment() | Selects all comment nodes contained in the <bar> element.
/foo/bar/processing-instruction() | Selects all processing-instruction nodes contained in the <bar> element.

Predicates allow for refining the nodes selected by an XPath location path. Predicates are of the form [expression]. The following example selects all <foo> elements that contain an include attribute with the value of true:

//foo[@include='true']

Predicates may be appended to each other to further refine an expression, such as:

//foo[@include='true'][@mode='bar']

Using the XPath API

The following example demonstrates using the XPath API to select one or more nodes from an XML document:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);

XPath Expressions and Types

While XPath expressions select nodes in the XML document, the XPath API allows the selected nodes to be coalesced into one of the following other data types:

  • Boolean
  • Number
  • String

The desired return type is specified by a QName parameter in method call used to evaluate the expression, which is either a call to XPathExpression.evalute(...) or to one of the XPath.evaluate(...) convenience methods. The allowed QName values are specified as constants in the XPathConstants class; they are:

  • XPathConstants.NODESET
  • XPathConstants.NODE
  • XPathConstants.STRING
  • XPathConstants.BOOLEAN
  • XPathConstants.NUMBER

When a Boolean return type is requested, Boolean.TRUE is returned if one or more nodes were selected; otherwise, Boolean.FALSE is returned.

The String return type is a convenience for retrieving the character data from a text node, attribute node, comment node, or processing-instruction node. When used on an element node, the value of the child text nodes is returned.

The Number return type attempts to coalesce the text of a node to a double data type.

XPath Context

XPath location paths may be relative to a particular node in the document, known as the context. Consider the following XML document:

<widgets>
<widget>
<manufacturer/>
<dimensions/>
</widget>
</widgets>

The <widget> element can be selected with the following XPath API code:

// parse the XML as a W3C Document
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new File("/widgets.xml"));

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);

With a reference to the <widget> element, a relative XPath expression can now written to select the <manufacturer> child element:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "manufacturer";
Node manufacturerNode = (Node) xpath.evaluate(expression, widgetNode, XPathConstants.NODE);
  • Author Ben Galbraith
  • Author Norman Walsh
  • Author Jeff Suttor
  • See XML Path Language (XPath) Version 1.0
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - javax.xml.xpath

Interfaces

  • XPath
  • XPathExpression
  • XPathFunction
  • XPathFunctionResolver
  • XPathVariableResolver

Classes

  • XPathConstants
  • XPathFactory

Exceptions

  • XPathException
  • XPathExpressionException
  • XPathFactoryConfigurationException
  • XPathFunctionException


xpath

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package javax.xml.xpath

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

See: Description

  • Interface Summary
    Interface Description
    XPath
    XPath provides access to the XPath evaluation environment and expressions.
    XPathExpression
    XPathExpression provides access to compiled XPath expressions.
    XPathFunction
    XPathFunction provides access to XPath functions.
    XPathFunctionResolver
    XPathFunctionResolver provides access to the set of user defined XPathFunctions.
    XPathVariableResolver
    XPathVariableResolver provides access to the set of user defined XPath variables.
  • Class Summary
    Class Description
    XPathConstants
    XPath constants.
    XPathFactory
    An XPathFactory instance can be used to create XPath objects.
  • Exception Summary
    Exception Description
    XPathException
    XPathException represents a generic XPath exception.
    XPathExpressionException
    XPathExpressionException represents an error in an XPath expression.
    XPathFactoryConfigurationException
    XPathFactoryConfigurationException represents a configuration error in a XPathFactory environment.
    XPathFunctionException
    XPathFunctionException represents an error with an XPath function.

Package javax.xml.xpath Description

This package provides an object-model neutral API for the evaluation of XPath expressions and access to the evaluation environment.

The following XML standards apply:

  • XML Path Language (XPath) Version 1.0

XPath Overview

The XPath language provides a simple, concise syntax for selecting nodes from an XML document. XPath also provides rules for converting a node in an XML document object model (DOM) tree to a boolean, double, or string value. XPath is a W3C-defined language and an official W3C recommendation; the W3C hosts the XML Path Language (XPath) Version 1.0 specification.

XPath started in life in 1999 as a supplement to the XSLT and XPointer languages, but has more recently become popular as a stand-alone language, as a single XPath expression can be used to replace many lines of DOM API code.

XPath Expressions

An XPath expression is composed of a location path and one or more optional predicates. Expressions may also include XPath variables.

The following is an example of a simple XPath expression:

/foo/bar

This example would select the <bar> element in an XML document such as the following:

<foo>
<bar/>
</foo>

The expression /foo/bar is an example of a location path. While XPath location paths resemble Unix-style file system paths, an important distinction is that XPath expressions return all nodes that match the expression. Thus, all three <bar> elements in the following document would be selected by the /foo/bar expression:

<foo>
<bar/>
<bar/>
<bar/>
</foo>

A special location path operator, //, selects nodes at any depth in an XML document. The following example selects all <bar> elements regardless of their location in a document:

//bar

A wildcard operator, *, causes all element nodes to be selected. The following example selects all children elements of a <foo> element:

/foo/*

In addition to element nodes, XPath location paths may also address attribute nodes, text nodes, comment nodes, and processing instruction nodes. The following table gives examples of location paths for each of these node types:

Location Path | Description
/foo/bar/@id | Selects the attribute id of the <bar> element
/foo/bar/text() | Selects the text nodes of the <bar> element. No distinction is made between escaped and non-escaped character data.
/foo/bar/comment() | Selects all comment nodes contained in the <bar> element.
/foo/bar/processing-instruction() | Selects all processing-instruction nodes contained in the <bar> element.

Predicates allow for refining the nodes selected by an XPath location path. Predicates are of the form [expression]. The following example selects all <foo> elements that contain an include attribute with the value of true:

//foo[@include='true']

Predicates may be appended to each other to further refine an expression, such as:

//foo[@include='true'][@mode='bar']

Using the XPath API

The following example demonstrates using the XPath API to select one or more nodes from an XML document:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);

XPath Expressions and Types

While XPath expressions select nodes in the XML document, the XPath API allows the selected nodes to be coalesced into one of the following other data types:

  • Boolean
  • Number
  • String

The desired return type is specified by a QName parameter in method call used to evaluate the expression, which is either a call to XPathExpression.evalute(...) or to one of the XPath.evaluate(...) convenience methods. The allowed QName values are specified as constants in the XPathConstants class; they are:

  • XPathConstants.NODESET
  • XPathConstants.NODE
  • XPathConstants.STRING
  • XPathConstants.BOOLEAN
  • XPathConstants.NUMBER

When a Boolean return type is requested, Boolean.TRUE is returned if one or more nodes were selected; otherwise, Boolean.FALSE is returned.

The String return type is a convenience for retrieving the character data from a text node, attribute node, comment node, or processing-instruction node. When used on an element node, the value of the child text nodes is returned.

The Number return type attempts to coalesce the text of a node to a double data type.

XPath Context

XPath location paths may be relative to a particular node in the document, known as the context. Consider the following XML document:

<widgets>
<widget>
<manufacturer/>
<dimensions/>
</widget>
</widgets>

The <widget> element can be selected with the following XPath API code:

// parse the XML as a W3C Document
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new File("/widgets.xml"));

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);

With a reference to the <widget> element, a relative XPath expression can now written to select the <manufacturer> child element:

XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "manufacturer";
Node manufacturerNode = (Node) xpath.evaluate(expression, widgetNode, XPathConstants.NODE);
  • Author Ben Galbraith
  • Author Norman Walsh
  • Author Jeff Suttor
  • See XML Path Language (XPath) Version 1.0
  • Since 1.5
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


javax.xml.xpath

Interfaces

  • XPath
  • XPathExpression
  • XPathFunction
  • XPathFunctionResolver
  • XPathVariableResolver

Classes

  • XPathConstants
  • XPathFactory

Exceptions

  • XPathException
  • XPathExpressionException
  • XPathFactoryConfigurationException
  • XPathFunctionException


compact3 - org.ietf.jgss

Interfaces

  • GSSContext
  • GSSCredential
  • GSSName

Classes

  • ChannelBinding
  • GSSManager
  • MessageProp
  • Oid

Exceptions

  • GSSException


jgss

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.ietf.jgss

This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.

See: Description

  • Interface Summary
    Interface Description
    GSSContext
    This interface encapsulates the GSS-API security context and provides the security services that are available over the context.
    GSSCredential
    This interface encapsulates the GSS-API credentials for an entity.
    GSSName
    This interface encapsulates a single GSS-API principal entity.
  • Class Summary
    Class Description
    ChannelBinding
    This class encapsulates the concept of caller-provided channel binding information.
    GSSManager
    This class serves as a factory for other important GSS-API classes and also provides information about the mechanisms that are supported.
    MessageProp
    This is a utility class used within the per-message GSSContext methods to convey per-message properties.
    Oid
    This class represents Universal Object Identifiers (Oids) and their associated operations.
  • Exception Summary
    Exception Description
    GSSException
    This exception is thrown whenever a GSS-API error occurs, including any mechanism specific error.

Package org.ietf.jgss Description

This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API. The security mechanisms that an application can chose to use are identified with unique object identifiers. One example of such a mechanism is the Kerberos v5 GSS-API mechanism (object identifier 1.2.840.113554.1.2.2). This mechanism is available through the default instance of the GSSManager class.

The GSS-API is defined in a language independent way in RFC 2743. The Java language bindings are defined in RFC 2853

An application starts out by instantiating a GSSManager which then serves as a factory for a security context. An application can use specific principal names and credentials that are also created using the GSSManager; or it can instantiate a context with system defaults. It then goes through a context establishment loop. Once a context is established with the peer, authentication is complete. Data protection such as integrity and confidentiality can then be obtained from this context.

The GSS-API does not perform any communication with the peer. It merely produces tokens that the application must somehow transport to the other end.

Credential Acquisition

The GSS-API itself does not dictate how an underlying mechanism obtains the credentials that are needed for authentication. It is assumed that prior to calling the GSS-API, these credentials are obtained and stored in a location that the mechanism provider is aware of. However, the default model in the Java platform will be that mechanism providers must obtain credentials only from the private or public credential sets associated with the Subject in the current access control context. The Kerberos v5 mechanism will search for the required INITIATE and ACCEPT credentials (KerberosTicket and KerberosKey) in the private credential set where as some other mechanism might look in the public set or in both. If the desired credential is not present in the appropriate sets of the current Subject, the GSS-API call must fail.

This model has the advantage that credential management is simple and predictable from the applications point of view. An application, given the right permissions, can purge the credentials in the Subject or renew them using standard Java API's. If it purged the credentials, it would be sure that the JGSS mechanism would fail, or if it renewed a time based credential it would be sure that a JGSS mechanism would succeed.

This model does require that a JAAS login be performed in order to authenticate and populate a Subject that the JGSS mechanism can later utilize. However, applications have the ability to relax this restriction by means of a system property: javax.security.auth.useSubjectCredsOnly. By default this system property will be assumed to be true (even when it is unset) indicating that providers must only use the credentials that are present in the current Subject. However, if this property is explicitly set to false by the application, then it indicates that the provider is free to use any credentials cache of its choice. Such a credential cache might be a disk cache, an in-memory cache, or even just the current Subject itself.

Related Documentation

For an online tutorial on using Java GSS-API, please see Introduction to JAAS and Java GSS-API.

Since:
1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.ietf.jgss

Interfaces

  • GSSContext
  • GSSCredential
  • GSSName

Classes

  • ChannelBinding
  • GSSManager
  • MessageProp
  • Oid

Exceptions

  • GSSException


org.omg.CORBA

Interfaces

  • ARG_IN
  • ARG_INOUT
  • ARG_OUT
  • BAD_POLICY
  • BAD_POLICY_TYPE
  • BAD_POLICY_VALUE
  • CTX_RESTRICT_SCOPE
  • Current
  • CurrentOperations
  • CustomMarshal
  • DataInputStream
  • DataOutputStream
  • DomainManager
  • DomainManagerOperations
  • DynAny
  • DynArray
  • DynEnum
  • DynFixed
  • DynSequence
  • DynStruct
  • DynUnion
  • DynValue
  • IDLType
  • IDLTypeOperations
  • IRObject
  • IRObjectOperations
  • Object
  • OMGVMCID
  • Policy
  • PolicyOperations
  • PRIVATE_MEMBER
  • PUBLIC_MEMBER
  • UNSUPPORTED_POLICY
  • UNSUPPORTED_POLICY_VALUE
  • VM_ABSTRACT
  • VM_CUSTOM
  • VM_NONE
  • VM_TRUNCATABLE

Classes

  • _IDLTypeStub
  • _PolicyStub
  • Any
  • AnyHolder
  • AnySeqHelper
  • AnySeqHolder
  • BooleanHolder
  • BooleanSeqHelper
  • BooleanSeqHolder
  • ByteHolder
  • CharHolder
  • CharSeqHelper
  • CharSeqHolder
  • CompletionStatus
  • CompletionStatusHelper
  • Context
  • ContextList
  • CurrentHelper
  • CurrentHolder
  • DefinitionKind
  • DefinitionKindHelper
  • DoubleHolder
  • DoubleSeqHelper
  • DoubleSeqHolder
  • DynamicImplementation
  • Environment
  • ExceptionList
  • FieldNameHelper
  • FixedHolder
  • FloatHolder
  • FloatSeqHelper
  • FloatSeqHolder
  • IdentifierHelper
  • IDLTypeHelper
  • IntHolder
  • LocalObject
  • LongHolder
  • LongLongSeqHelper
  • LongLongSeqHolder
  • LongSeqHelper
  • LongSeqHolder
  • NamedValue
  • NameValuePair
  • NameValuePairHelper
  • NVList
  • ObjectHelper
  • ObjectHolder
  • OctetSeqHelper
  • OctetSeqHolder
  • ORB
  • ParameterMode
  • ParameterModeHelper
  • ParameterModeHolder
  • PolicyErrorCodeHelper
  • PolicyErrorHelper
  • PolicyErrorHolder
  • PolicyHelper
  • PolicyHolder
  • PolicyListHelper
  • PolicyListHolder
  • PolicyTypeHelper
  • Principal
  • PrincipalHolder
  • RepositoryIdHelper
  • Request
  • ServerRequest
  • ServiceDetail
  • ServiceDetailHelper
  • ServiceInformation
  • ServiceInformationHelper
  • ServiceInformationHolder
  • SetOverrideType
  • SetOverrideTypeHelper
  • ShortHolder
  • ShortSeqHelper
  • ShortSeqHolder
  • StringHolder
  • StringSeqHelper
  • StringSeqHolder
  • StringValueHelper
  • StructMember
  • StructMemberHelper
  • TCKind
  • TypeCode
  • TypeCodeHolder
  • ULongLongSeqHelper
  • ULongLongSeqHolder
  • ULongSeqHelper
  • ULongSeqHolder
  • UnionMember
  • UnionMemberHelper
  • UnknownUserExceptionHelper
  • UnknownUserExceptionHolder
  • UShortSeqHelper
  • UShortSeqHolder
  • ValueBaseHelper
  • ValueBaseHolder
  • ValueMember
  • ValueMemberHelper
  • VersionSpecHelper
  • VisibilityHelper
  • WCharSeqHelper
  • WCharSeqHolder
  • WrongTransactionHelper
  • WrongTransactionHolder
  • WStringSeqHelper
  • WStringSeqHolder
  • WStringValueHelper

Exceptions

  • ACTIVITY_COMPLETED
  • ACTIVITY_REQUIRED
  • BAD_CONTEXT
  • BAD_INV_ORDER
  • BAD_OPERATION
  • BAD_PARAM
  • BAD_QOS
  • BAD_TYPECODE
  • Bounds
  • CODESET_INCOMPATIBLE
  • COMM_FAILURE
  • DATA_CONVERSION
  • FREE_MEM
  • IMP_LIMIT
  • INITIALIZE
  • INTERNAL
  • INTF_REPOS
  • INV_FLAG
  • INV_IDENT
  • INV_OBJREF
  • INV_POLICY
  • INVALID_ACTIVITY
  • INVALID_TRANSACTION
  • MARSHAL
  • NO_IMPLEMENT
  • NO_MEMORY
  • NO_PERMISSION
  • NO_RESOURCES
  • NO_RESPONSE
  • OBJ_ADAPTER
  • OBJECT_NOT_EXIST
  • PERSIST_STORE
  • PolicyError
  • REBIND
  • SystemException
  • TIMEOUT
  • TRANSACTION_MODE
  • TRANSACTION_REQUIRED
  • TRANSACTION_ROLLEDBACK
  • TRANSACTION_UNAVAILABLE
  • TRANSIENT
  • UNKNOWN
  • UnknownUserException
  • UserException
  • WrongTransaction


org.omg.CORBA.DynAnyPackage

Exceptions

  • Invalid
  • InvalidSeq
  • InvalidValue
  • TypeMismatch


org.omg.CORBA.ORBPackage

Exceptions

  • InconsistentTypeCode
  • InvalidName


org.omg.CORBA.portable

Interfaces

  • BoxedValueHelper
  • CustomValue
  • IDLEntity
  • InvokeHandler
  • ResponseHandler
  • Streamable
  • StreamableValue
  • ValueBase
  • ValueFactory
  • ValueInputStream
  • ValueOutputStream

Classes

  • Delegate
  • InputStream
  • ObjectImpl
  • OutputStream
  • ServantObject

Exceptions

  • ApplicationException
  • IndirectionException
  • RemarshalException
  • UnknownException


org.omg.CORBA.TypeCodePackage

Exceptions

  • BadKind
  • Bounds


org.omg.CORBA_2_3

Classes

  • ORB


org.omg.CORBA_2_3.portable

Classes

  • Delegate
  • InputStream
  • ObjectImpl
  • OutputStream


org.omg.CosNaming

Interfaces

  • BindingIterator
  • BindingIteratorOperations
  • NamingContext
  • NamingContextExt
  • NamingContextExtOperations
  • NamingContextOperations

Classes

  • _BindingIteratorImplBase
  • _BindingIteratorStub
  • _NamingContextExtStub
  • _NamingContextImplBase
  • _NamingContextStub
  • Binding
  • BindingHelper
  • BindingHolder
  • BindingIteratorHelper
  • BindingIteratorHolder
  • BindingIteratorPOA
  • BindingListHelper
  • BindingListHolder
  • BindingType
  • BindingTypeHelper
  • BindingTypeHolder
  • IstringHelper
  • NameComponent
  • NameComponentHelper
  • NameComponentHolder
  • NameHelper
  • NameHolder
  • NamingContextExtHelper
  • NamingContextExtHolder
  • NamingContextExtPOA
  • NamingContextHelper
  • NamingContextHolder
  • NamingContextPOA


org.omg.CosNaming.NamingContextExtPackage

Classes

  • AddressHelper
  • InvalidAddressHelper
  • InvalidAddressHolder
  • StringNameHelper
  • URLStringHelper

Exceptions

  • InvalidAddress


org.omg.CosNaming.NamingContextPackage

Classes

  • AlreadyBoundHelper
  • AlreadyBoundHolder
  • CannotProceedHelper
  • CannotProceedHolder
  • InvalidNameHelper
  • InvalidNameHolder
  • NotEmptyHelper
  • NotEmptyHolder
  • NotFoundHelper
  • NotFoundHolder
  • NotFoundReason
  • NotFoundReasonHelper
  • NotFoundReasonHolder

Exceptions

  • AlreadyBound
  • CannotProceed
  • InvalidName
  • NotEmpty
  • NotFound


org.omg.Dynamic

Classes

  • Parameter


org.omg.DynamicAny

Interfaces

  • DynAny
  • DynAnyFactory
  • DynAnyFactoryOperations
  • DynAnyOperations
  • DynArray
  • DynArrayOperations
  • DynEnum
  • DynEnumOperations
  • DynFixed
  • DynFixedOperations
  • DynSequence
  • DynSequenceOperations
  • DynStruct
  • DynStructOperations
  • DynUnion
  • DynUnionOperations
  • DynValue
  • DynValueBox
  • DynValueBoxOperations
  • DynValueCommon
  • DynValueCommonOperations
  • DynValueOperations

Classes

  • _DynAnyFactoryStub
  • _DynAnyStub
  • _DynArrayStub
  • _DynEnumStub
  • _DynFixedStub
  • _DynSequenceStub
  • _DynStructStub
  • _DynUnionStub
  • _DynValueStub
  • AnySeqHelper
  • DynAnyFactoryHelper
  • DynAnyHelper
  • DynAnySeqHelper
  • DynArrayHelper
  • DynEnumHelper
  • DynFixedHelper
  • DynSequenceHelper
  • DynStructHelper
  • DynUnionHelper
  • DynValueHelper
  • FieldNameHelper
  • NameDynAnyPair
  • NameDynAnyPairHelper
  • NameDynAnyPairSeqHelper
  • NameValuePair
  • NameValuePairHelper
  • NameValuePairSeqHelper


org.omg.DynamicAny.DynAnyFactoryPackage

Classes

  • InconsistentTypeCodeHelper

Exceptions

  • InconsistentTypeCode


org.omg.DynamicAny.DynAnyPackage

Classes

  • InvalidValueHelper
  • TypeMismatchHelper

Exceptions

  • InvalidValue
  • TypeMismatch


org.omg.IOP

Interfaces

  • Codec
  • CodecFactory
  • CodecFactoryOperations
  • CodecOperations
  • CodeSets
  • ENCODING_CDR_ENCAPS
  • ExceptionDetailMessage
  • RMICustomMaxStreamFormat
  • TAG_ALTERNATE_IIOP_ADDRESS
  • TAG_CODE_SETS
  • TAG_INTERNET_IOP
  • TAG_JAVA_CODEBASE
  • TAG_MULTIPLE_COMPONENTS
  • TAG_ORB_TYPE
  • TAG_POLICIES
  • TAG_RMI_CUSTOM_MAX_STREAM_FORMAT
  • TransactionService

Classes

  • CodecFactoryHelper
  • ComponentIdHelper
  • Encoding
  • IOR
  • IORHelper
  • IORHolder
  • MultipleComponentProfileHelper
  • MultipleComponentProfileHolder
  • ProfileIdHelper
  • ServiceContext
  • ServiceContextHelper
  • ServiceContextHolder
  • ServiceContextListHelper
  • ServiceContextListHolder
  • ServiceIdHelper
  • TaggedComponent
  • TaggedComponentHelper
  • TaggedComponentHolder
  • TaggedProfile
  • TaggedProfileHelper
  • TaggedProfileHolder


org.omg.IOP.CodecFactoryPackage

Classes

  • UnknownEncodingHelper

Exceptions

  • UnknownEncoding


org.omg.IOP.CodecPackage

Classes

  • FormatMismatchHelper
  • InvalidTypeForEncodingHelper
  • TypeMismatchHelper

Exceptions

  • FormatMismatch
  • InvalidTypeForEncoding
  • TypeMismatch


org.omg.Messaging

Interfaces

  • SYNC_WITH_TRANSPORT

Classes

  • SyncScopeHelper


org.omg.PortableInterceptor

Interfaces

  • ACTIVE
  • ClientRequestInfo
  • ClientRequestInfoOperations
  • ClientRequestInterceptor
  • ClientRequestInterceptorOperations
  • Current
  • CurrentOperations
  • DISCARDING
  • HOLDING
  • INACTIVE
  • Interceptor
  • InterceptorOperations
  • IORInfo
  • IORInfoOperations
  • IORInterceptor
  • IORInterceptor_3_0
  • IORInterceptor_3_0Operations
  • IORInterceptorOperations
  • LOCATION_FORWARD
  • NON_EXISTENT
  • ObjectReferenceFactory
  • ObjectReferenceTemplate
  • ORBInitializer
  • ORBInitializerOperations
  • ORBInitInfo
  • ORBInitInfoOperations
  • PolicyFactory
  • PolicyFactoryOperations
  • RequestInfo
  • RequestInfoOperations
  • ServerRequestInfo
  • ServerRequestInfoOperations
  • ServerRequestInterceptor
  • ServerRequestInterceptorOperations
  • SUCCESSFUL
  • SYSTEM_EXCEPTION
  • TRANSPORT_RETRY
  • UNKNOWN
  • USER_EXCEPTION

Classes

  • AdapterManagerIdHelper
  • AdapterNameHelper
  • AdapterStateHelper
  • CurrentHelper
  • ForwardRequestHelper
  • InvalidSlotHelper
  • IORInterceptor_3_0Helper
  • IORInterceptor_3_0Holder
  • ObjectIdHelper
  • ObjectReferenceFactoryHelper
  • ObjectReferenceFactoryHolder
  • ObjectReferenceTemplateHelper
  • ObjectReferenceTemplateHolder
  • ObjectReferenceTemplateSeqHelper
  • ObjectReferenceTemplateSeqHolder
  • ORBIdHelper
  • ServerIdHelper

Exceptions

  • ForwardRequest
  • InvalidSlot


org.omg.PortableInterceptor.ORBInitInfoPackage

Classes

  • DuplicateNameHelper
  • InvalidNameHelper
  • ObjectIdHelper

Exceptions

  • DuplicateName
  • InvalidName


org.omg.PortableServer

Interfaces

  • AdapterActivator
  • AdapterActivatorOperations
  • Current
  • CurrentOperations
  • ID_ASSIGNMENT_POLICY_ID
  • ID_UNIQUENESS_POLICY_ID
  • IdAssignmentPolicy
  • IdAssignmentPolicyOperations
  • IdUniquenessPolicy
  • IdUniquenessPolicyOperations
  • IMPLICIT_ACTIVATION_POLICY_ID
  • ImplicitActivationPolicy
  • ImplicitActivationPolicyOperations
  • LIFESPAN_POLICY_ID
  • LifespanPolicy
  • LifespanPolicyOperations
  • POA
  • POAManager
  • POAManagerOperations
  • POAOperations
  • REQUEST_PROCESSING_POLICY_ID
  • RequestProcessingPolicy
  • RequestProcessingPolicyOperations
  • SERVANT_RETENTION_POLICY_ID
  • ServantActivator
  • ServantActivatorOperations
  • ServantLocator
  • ServantLocatorOperations
  • ServantManager
  • ServantManagerOperations
  • ServantRetentionPolicy
  • ServantRetentionPolicyOperations
  • THREAD_POLICY_ID
  • ThreadPolicy
  • ThreadPolicyOperations

Classes

  • _ServantActivatorStub
  • _ServantLocatorStub
  • CurrentHelper
  • DynamicImplementation
  • ForwardRequestHelper
  • IdAssignmentPolicyValue
  • IdUniquenessPolicyValue
  • ImplicitActivationPolicyValue
  • LifespanPolicyValue
  • POAHelper
  • RequestProcessingPolicyValue
  • Servant
  • ServantActivatorHelper
  • ServantActivatorPOA
  • ServantLocatorHelper
  • ServantLocatorPOA
  • ServantRetentionPolicyValue
  • ThreadPolicyValue

Exceptions

  • ForwardRequest


org.omg.PortableServer.CurrentPackage

Classes

  • NoContextHelper

Exceptions

  • NoContext


org.omg.PortableServer.POAManagerPackage

Classes

  • AdapterInactiveHelper
  • State

Exceptions

  • AdapterInactive


org.omg.PortableServer.POAPackage

Classes

  • AdapterAlreadyExistsHelper
  • AdapterNonExistentHelper
  • InvalidPolicyHelper
  • NoServantHelper
  • ObjectAlreadyActiveHelper
  • ObjectNotActiveHelper
  • ServantAlreadyActiveHelper
  • ServantNotActiveHelper
  • WrongAdapterHelper
  • WrongPolicyHelper

Exceptions

  • AdapterAlreadyExists
  • AdapterNonExistent
  • InvalidPolicy
  • NoServant
  • ObjectAlreadyActive
  • ObjectNotActive
  • ServantAlreadyActive
  • ServantNotActive
  • WrongAdapter
  • WrongPolicy


org.omg.PortableServer.portable

Interfaces

  • Delegate


org.omg.PortableServer.ServantLocatorPackage

Classes

  • CookieHolder


org.omg.SendingContext

Interfaces

  • RunTime
  • RunTimeOperations


org.omg.stub.java.rmi

Classes

  • _Remote_Stub


compact2 - org.w3c.dom

Interfaces

  • Attr
  • CDATASection
  • CharacterData
  • Comment
  • Document
  • DocumentFragment
  • DocumentType
  • DOMConfiguration
  • DOMError
  • DOMErrorHandler
  • DOMImplementation
  • DOMImplementationList
  • DOMImplementationSource
  • DOMLocator
  • DOMStringList
  • Element
  • Entity
  • EntityReference
  • NamedNodeMap
  • NameList
  • Node
  • NodeList
  • Notation
  • ProcessingInstruction
  • Text
  • TypeInfo
  • UserDataHandler

Exceptions

  • DOMException


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.w3c.dom

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

See: Description

  • Interface Summary
    Interface Description
    Attr
    The Attr interface represents an attribute in an Element object.
    CDATASection
    CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
    CharacterData
    The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
    Comment
    This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
    Document
    The Document interface represents the entire HTML or XML document.
    DocumentFragment
    DocumentFragment is a "lightweight" or "minimal" Document object.
    DocumentType
    Each Document has a doctype attribute whose value is either null or a DocumentType object.
    DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters.
    DOMError
    DOMError is an interface that describes an error.
    DOMErrorHandler
    DOMErrorHandler is a callback interface that the DOM implementation can call when reporting errors that happens while processing XML data, or when doing some other processing (e.g.
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
    DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented.
    DOMImplementationSource
    This interface permits a DOM implementer to supply one or more implementations, based upon requested features and versions, as specified in DOM Features.
    DOMLocator
    DOMLocator is an interface that describes a location (e.g.
    DOMStringList
    The DOMStringList interface provides the abstraction of an ordered collection of DOMString values, without defining or constraining how this collection is implemented.
    Element
    The Element interface represents an element in an HTML or XML document.
    Entity
    This interface represents a known entity, either parsed or unparsed, in an XML document.
    EntityReference
    EntityReference nodes may be used to represent an entity reference in the tree.
    NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
    NameList
    The NameList interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
    Notation
    This interface represents a notation declared in the DTD.
    ProcessingInstruction
    The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
    Text
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
    UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed.
  • Exception Summary
    Exception Description
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).

Package org.w3c.dom Description

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing. The Document Object Model Level 2 Core API allows programs to dynamically access and update the content and structure of documents. See the specification for more information.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.w3c.dom

Interfaces

  • Attr
  • CDATASection
  • CharacterData
  • Comment
  • Document
  • DocumentFragment
  • DocumentType
  • DOMConfiguration
  • DOMError
  • DOMErrorHandler
  • DOMImplementation
  • DOMImplementationList
  • DOMImplementationSource
  • DOMLocator
  • DOMStringList
  • Element
  • Entity
  • EntityReference
  • NamedNodeMap
  • NameList
  • Node
  • NodeList
  • Notation
  • ProcessingInstruction
  • Text
  • TypeInfo
  • UserDataHandler

Exceptions

  • DOMException


dom

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.w3c.dom

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing.

See: Description

  • Interface Summary
    Interface Description
    Attr
    The Attr interface represents an attribute in an Element object.
    CDATASection
    CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
    CharacterData
    The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
    Comment
    This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
    Document
    The Document interface represents the entire HTML or XML document.
    DocumentFragment
    DocumentFragment is a "lightweight" or "minimal" Document object.
    DocumentType
    Each Document has a doctype attribute whose value is either null or a DocumentType object.
    DOMConfiguration
    The DOMConfiguration interface represents the configuration of a document and maintains a table of recognized parameters.
    DOMError
    DOMError is an interface that describes an error.
    DOMErrorHandler
    DOMErrorHandler is a callback interface that the DOM implementation can call when reporting errors that happens while processing XML data, or when doing some other processing (e.g.
    DOMImplementation
    The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
    DOMImplementationList
    The DOMImplementationList interface provides the abstraction of an ordered collection of DOM implementations, without defining or constraining how this collection is implemented.
    DOMImplementationSource
    This interface permits a DOM implementer to supply one or more implementations, based upon requested features and versions, as specified in DOM Features.
    DOMLocator
    DOMLocator is an interface that describes a location (e.g.
    DOMStringList
    The DOMStringList interface provides the abstraction of an ordered collection of DOMString values, without defining or constraining how this collection is implemented.
    Element
    The Element interface represents an element in an HTML or XML document.
    Entity
    This interface represents a known entity, either parsed or unparsed, in an XML document.
    EntityReference
    EntityReference nodes may be used to represent an entity reference in the tree.
    NamedNodeMap
    Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
    NameList
    The NameList interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented.
    Node
    The Node interface is the primary datatype for the entire Document Object Model.
    NodeList
    The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
    Notation
    This interface represents a notation declared in the DTD.
    ProcessingInstruction
    The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
    Text
    The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
    TypeInfo
    The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document.
    UserDataHandler
    When associating an object to a key on a node using Node.setUserData() the application can provide a handler that gets called when the node the object is associated to is being cloned, imported, or renamed.
  • Exception Summary
    Exception Description
    DOMException
    DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).

Package org.w3c.dom Description

Provides the interfaces for the Document Object Model (DOM) which is a component API of the Java API for XML Processing. The Document Object Model Level 2 Core API allows programs to dynamically access and update the content and structure of documents. See the specification for more information.
Since:
JDK1.4
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom

Interfaces

  • Attr
  • CDATASection
  • CharacterData
  • Comment
  • Document
  • DocumentFragment
  • DocumentType
  • DOMConfiguration
  • DOMError
  • DOMErrorHandler
  • DOMImplementation
  • DOMImplementationList
  • DOMImplementationSource
  • DOMLocator
  • DOMStringList
  • Element
  • Entity
  • EntityReference
  • NamedNodeMap
  • NameList
  • Node
  • NodeList
  • Notation
  • ProcessingInstruction
  • Text
  • TypeInfo
  • UserDataHandler

Exceptions

  • DOMException


compact2 - org.w3c.dom.bootstrap

Classes

  • DOMImplementationRegistry


bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.w3c.dom.bootstrap

  • Class Summary
    Class Description
    DOMImplementationRegistry
    A factory that enables applications to obtain instances of DOMImplementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.w3c.dom.bootstrap

Classes

  • DOMImplementationRegistry


bootstrap

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.w3c.dom.bootstrap

  • Class Summary
    Class Description
    DOMImplementationRegistry
    A factory that enables applications to obtain instances of DOMImplementation.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.bootstrap

Classes

  • DOMImplementationRegistry


compact2 - org.w3c.dom.events

Interfaces

  • DocumentEvent
  • Event
  • EventListener
  • EventTarget
  • MouseEvent
  • MutationEvent
  • UIEvent

Exceptions

  • EventException


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.w3c.dom.events

  • Interface Summary
    Interface Description
    DocumentEvent
    The DocumentEvent interface provides a mechanism by which the user can create an Event of a type supported by the implementation.
    Event
    The Event interface is used to provide contextual information about an event to the handler processing the event.
    EventListener
    The EventListener interface is the primary method for handling events.
    EventTarget
    The EventTarget interface is implemented by all Nodes in an implementation which supports the DOM Event Model.
    MouseEvent
    The MouseEvent interface provides specific contextual information associated with Mouse events.
    MutationEvent
    The MutationEvent interface provides specific contextual information associated with Mutation events.
    UIEvent
    The UIEvent interface provides specific contextual information associated with User Interface events.
  • Exception Summary
    Exception Description
    EventException
    Event operations may throw an EventException as specified in their method descriptions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.w3c.dom.events

Interfaces

  • DocumentEvent
  • Event
  • EventListener
  • EventTarget
  • MouseEvent
  • MutationEvent
  • UIEvent

Exceptions

  • EventException


events

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.w3c.dom.events

  • Interface Summary
    Interface Description
    DocumentEvent
    The DocumentEvent interface provides a mechanism by which the user can create an Event of a type supported by the implementation.
    Event
    The Event interface is used to provide contextual information about an event to the handler processing the event.
    EventListener
    The EventListener interface is the primary method for handling events.
    EventTarget
    The EventTarget interface is implemented by all Nodes in an implementation which supports the DOM Event Model.
    MouseEvent
    The MouseEvent interface provides specific contextual information associated with Mouse events.
    MutationEvent
    The MutationEvent interface provides specific contextual information associated with Mutation events.
    UIEvent
    The UIEvent interface provides specific contextual information associated with User Interface events.
  • Exception Summary
    Exception Description
    EventException
    Event operations may throw an EventException as specified in their method descriptions.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.events

Interfaces

  • DocumentEvent
  • Event
  • EventListener
  • EventTarget
  • MouseEvent
  • MutationEvent
  • UIEvent

Exceptions

  • EventException


compact2 - org.w3c.dom.ls

Interfaces

  • DOMImplementationLS
  • LSInput
  • LSLoadEvent
  • LSOutput
  • LSParser
  • LSParserFilter
  • LSProgressEvent
  • LSResourceResolver
  • LSSerializer
  • LSSerializerFilter

Exceptions

  • LSException


ls

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.w3c.dom.ls

  • Interface Summary
    Interface Description
    DOMImplementationLS
    DOMImplementationLS contains the factory methods for creating Load and Save objects.
    LSInput
    This interface represents an input source for data.
    LSLoadEvent
    This interface represents a load event object that signals the completion of a document load.
    LSOutput
    This interface represents an output destination for data.
    LSParser
    An interface to an object that is able to build, or augment, a DOM tree from various input sources.
    LSParserFilter
    LSParserFilters provide applications the ability to examine nodes as they are being constructed while parsing.
    LSProgressEvent
    This interface represents a progress event object that notifies the application about progress as a document is parsed.
    LSResourceResolver
    LSResourceResolver provides a way for applications to redirect references to external resources.
    LSSerializer
    A LSSerializer provides an API for serializing (writing) a DOM document out into XML.
    LSSerializerFilter
    LSSerializerFilters provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not.
  • Exception Summary
    Exception Description
    LSException
    Parser or write operations may throw an LSException if the processing is stopped.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.w3c.dom.ls

Interfaces

  • DOMImplementationLS
  • LSInput
  • LSLoadEvent
  • LSOutput
  • LSParser
  • LSParserFilter
  • LSProgressEvent
  • LSResourceResolver
  • LSSerializer
  • LSSerializerFilter

Exceptions

  • LSException


ls

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.w3c.dom.ls

  • Interface Summary
    Interface Description
    DOMImplementationLS
    DOMImplementationLS contains the factory methods for creating Load and Save objects.
    LSInput
    This interface represents an input source for data.
    LSLoadEvent
    This interface represents a load event object that signals the completion of a document load.
    LSOutput
    This interface represents an output destination for data.
    LSParser
    An interface to an object that is able to build, or augment, a DOM tree from various input sources.
    LSParserFilter
    LSParserFilters provide applications the ability to examine nodes as they are being constructed while parsing.
    LSProgressEvent
    This interface represents a progress event object that notifies the application about progress as a document is parsed.
    LSResourceResolver
    LSResourceResolver provides a way for applications to redirect references to external resources.
    LSSerializer
    A LSSerializer provides an API for serializing (writing) a DOM document out into XML.
    LSSerializerFilter
    LSSerializerFilters provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not.
  • Exception Summary
    Exception Description
    LSException
    Parser or write operations may throw an LSException if the processing is stopped.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.ls

Interfaces

  • DOMImplementationLS
  • LSInput
  • LSLoadEvent
  • LSOutput
  • LSParser
  • LSParserFilter
  • LSProgressEvent
  • LSResourceResolver
  • LSSerializer
  • LSSerializerFilter

Exceptions

  • LSException


compact2 - org.w3c.dom.views

Interfaces

  • AbstractView
  • DocumentView


views

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.w3c.dom.views

  • Interface Summary
    Interface Description
    AbstractView
    A base interface that all views shall derive from.
    DocumentView
    The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.w3c.dom.views

Interfaces

  • AbstractView
  • DocumentView


views

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.w3c.dom.views

  • Interface Summary
    Interface Description
    AbstractView
    A base interface that all views shall derive from.
    DocumentView
    The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.w3c.dom.views

Interfaces

  • AbstractView
  • DocumentView


compact2 - org.xml.sax

Interfaces

  • AttributeList
  • Attributes
  • ContentHandler
  • DocumentHandler
  • DTDHandler
  • EntityResolver
  • ErrorHandler
  • Locator
  • Parser
  • XMLFilter
  • XMLReader

Classes

  • HandlerBase
  • InputSource

Exceptions

  • SAXException
  • SAXNotRecognizedException
  • SAXNotSupportedException
  • SAXParseException


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.xml.sax

This package provides the core SAX APIs.

See: Description

  • Interface Summary
    Interface Description
    AttributeList Deprecated
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DocumentHandler Deprecated
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    Locator
    Interface for associating a SAX event with a document location.
    Parser Deprecated
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.
    XMLFilter
    Interface for an XML filter.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Class Summary
    Class Description
    HandlerBase Deprecated
    This class works with the deprecated DocumentHandler interface.
    InputSource
    A single input source for an XML entity.
  • Exception Summary
    Exception Description
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    SAXParseException
    Encapsulate an XML parse error or warning.

Package org.xml.sax Description

This package provides the core SAX APIs. Some SAX1 APIs are deprecated to encourage integration of namespace-awareness into designs of new applications and into maintenance of existing infrastructure.

See http://www.saxproject.org for more information about SAX.

SAX2 Standard Feature Flags

One of the essential characteristics of SAX2 is that it added feature flags which can be used to examine and perhaps modify parser modes, in particular modes such as validation. Since features are identified by (absolute) URIs, anyone can define such features. Currently defined standard feature URIs have the prefix http://xml.org/sax/features/ before an identifier such as validation. Turn features on or off using setFeature. Those standard identifiers are:

Feature ID | Access | Default | Description
external-general-entities | read/write | unspecified | Reports whether this parser processes external general entities; always true if validating.
external-parameter-entities | read/write | unspecified | Reports whether this parser processes external parameter entities; always true if validating.
is-standalone | (parsing) read-only, (not parsing) none | not applicable | May be examined only during a parse, after the startDocument() callback has been completed; read-only. The value is true if the document specified standalone="yes" in its XML declaration, and otherwise is false.
lexical-handler/parameter-entities | read/write | unspecified | A value of "true" indicates that the LexicalHandler will report the beginning and end of parameter entities.
namespaces | read/write | true | A value of "true" indicates namespace URIs and unprefixed local names for element and attribute names will be available.
namespace-prefixes | read/write | false | A value of "true" indicates that XML qualified names (with prefixes) and attributes (including xmlns* attributes) will be available.
resolve-dtd-uris read/write true A value of "true" indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of "false" indicates those IDs will not be absolutized; parsers will provide the base URI from Locator.getSystemId(). This applies to system IDs passed in
  • DTDHandler.notationDecl(),
  • DTDHandler.unparsedEntityDecl(), and
  • DeclHandler.externalEntityDecl().
It does not apply to EntityResolver.resolveEntity(), which is not used to report declarations, or to LexicalHandler.startDTD(), which already provides the non-absolutized URI.
string-interning | read/write | unspecified | Has a value of "true" if all XML names (for elements, prefixes, attributes, entities, notations, and local names), as well as Namespace URIs, will have been interned using java.lang.String.intern. This supports fast testing of equality/inequality against string constants, rather than forcing slower calls to String.equals().
unicode-normalization-checking | read/write | false | Controls whether the parser reports Unicode normalization errors as described in section 2.13 and Appendix B of the XML 1.1 Recommendation. If true, Unicode normalization errors are reported using the ErrorHandler.error() callback. Such errors are not fatal in themselves (though, obviously, other Unicode-related encoding errors may be).
use-attributes2 | read-only | not applicable | Returns "true" if the Attributes objects passed by this parser in ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface. That interface exposes additional DTD-related information, such as whether the attribute was specified in the source text rather than defaulted.
use-locator2 | read-only | not applicable | Returns "true" if the Locator objects passed by this parser in ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface. That interface exposes additional entity information, such as the character encoding and XML version used.
use-entity-resolver2 | read/write | true | Returns "true" if, when setEntityResolver is given an object implementing the org.xml.sax.ext.EntityResolver2 interface, those new methods will be used. Returns "false" to indicate that those methods will not be used.
validation | read/write | unspecified | Controls whether the parser is reporting all validity errors; if true, all external entities will be read.
xmlns-uris | read/write | false | Controls whether, when the namespace-prefixes feature is set, the parser treats namespace declaration attributes as being in the http://www.w3.org/2000/xmlns/ namespace. By default, SAX2 conforms to the original "Namespaces in XML" Recommendation, which explicitly states that such attributes are not in any namespace. Setting this optional flag to "true" makes the SAX2 events conform to a later backwards-incompatible revision of that recommendation, placing those attributes in a namespace.
xml-1.1 | read-only | not applicable | Returns "true" if the parser supports both XML 1.1 and XML 1.0. Returns "false" if the parser supports only XML 1.0.

Support for the default values of the namespaces and namespace-prefixes properties is required. Support for any other feature flags is entirely optional.

For default values not specified by SAX2, each XMLReader implementation specifies its default, or may choose not to expose the feature flag. Unless otherwise specified here, implementations may support changing current values of these standard feature flags, but not while parsing.

SAX2 Standard Handler and Property IDs

For parser interface characteristics that are described as objects, a separate namespace is defined. The objects in this namespace are again identified by URI, and the standard property URIs have the prefix http://xml.org/sax/properties/ before an identifier such as lexical-handler or dom-node. Manage those properties using setProperty(). Those identifiers are:

Property ID | Description
declaration-handler | Used to see most DTD declarations except those treated as lexical ("document element name is ...") or which are mandatory for all SAX parsers (DTDHandler). The Object must implement org.xml.sax.ext.DeclHandler.
document-xml-version | May be examined only during a parse, after the startDocument() callback has been completed; read-only. This property is a literal string describing the actual XML version of the document, such as "1.0" or "1.1".
dom-node | For "DOM Walker" style parsers, which ignore their parser.parse() parameters, this is used to specify the DOM (sub)tree being walked by the parser. The Object must implement the org.w3c.dom.Node interface.
lexical-handler | Used to see some syntax events that are essential in some applications: comments, CDATA delimiters, selected general entity inclusions, and the start and end of the DTD (and declaration of document element name). The Object must implement org.xml.sax.ext.LexicalHandler.
xml-string | Readable only during a parser callback, this exposes a TBS chunk of characters responsible for the current event.

All of these standard properties are optional; XMLReader implementations need not support them.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.xml.sax

Interfaces

  • AttributeList
  • Attributes
  • ContentHandler
  • DocumentHandler
  • DTDHandler
  • EntityResolver
  • ErrorHandler
  • Locator
  • Parser
  • XMLFilter
  • XMLReader

Classes

  • HandlerBase
  • InputSource

Exceptions

  • SAXException
  • SAXNotRecognizedException
  • SAXNotSupportedException
  • SAXParseException


sax

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.xml.sax

This package provides the core SAX APIs.

See: Description

  • Interface Summary
    Interface Description
    AttributeList Deprecated
    This interface has been replaced by the SAX2 Attributes interface, which includes Namespace support.
    Attributes
    Interface for a list of XML attributes.
    ContentHandler
    Receive notification of the logical content of a document.
    DocumentHandler Deprecated
    This interface has been replaced by the SAX2 ContentHandler interface, which includes Namespace support.
    DTDHandler
    Receive notification of basic DTD-related events.
    EntityResolver
    Basic interface for resolving entities.
    ErrorHandler
    Basic interface for SAX error handlers.
    Locator
    Interface for associating a SAX event with a document location.
    Parser Deprecated
    This interface has been replaced by the SAX2 XMLReader interface, which includes Namespace support.
    XMLFilter
    Interface for an XML filter.
    XMLReader
    Interface for reading an XML document using callbacks.
  • Class Summary
    Class Description
    HandlerBase Deprecated
    This class works with the deprecated DocumentHandler interface.
    InputSource
    A single input source for an XML entity.
  • Exception Summary
    Exception Description
    SAXException
    Encapsulate a general SAX error or warning.
    SAXNotRecognizedException
    Exception class for an unrecognized identifier.
    SAXNotSupportedException
    Exception class for an unsupported operation.
    SAXParseException
    Encapsulate an XML parse error or warning.

Package org.xml.sax Description

This package provides the core SAX APIs. Some SAX1 APIs are deprecated to encourage integration of namespace-awareness into designs of new applications and into maintenance of existing infrastructure.

See http://www.saxproject.org for more information about SAX.

SAX2 Standard Feature Flags

One of the essential characteristics of SAX2 is that it added feature flags which can be used to examine and perhaps modify parser modes, in particular modes such as validation. Since features are identified by (absolute) URIs, anyone can define such features. Currently defined standard feature URIs have the prefix http://xml.org/sax/features/ before an identifier such as validation. Turn features on or off using setFeature. Those standard identifiers are:

Feature ID | Access | Default | Description
external-general-entities | read/write | unspecified | Reports whether this parser processes external general entities; always true if validating.
external-parameter-entities | read/write | unspecified | Reports whether this parser processes external parameter entities; always true if validating.
is-standalone | (parsing) read-only, (not parsing) none | not applicable | May be examined only during a parse, after the startDocument() callback has been completed; read-only. The value is true if the document specified standalone="yes" in its XML declaration, and otherwise is false.
lexical-handler/parameter-entities | read/write | unspecified | A value of "true" indicates that the LexicalHandler will report the beginning and end of parameter entities.
namespaces | read/write | true | A value of "true" indicates namespace URIs and unprefixed local names for element and attribute names will be available.
namespace-prefixes | read/write | false | A value of "true" indicates that XML qualified names (with prefixes) and attributes (including xmlns* attributes) will be available.
resolve-dtd-uris read/write true A value of "true" indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of "false" indicates those IDs will not be absolutized; parsers will provide the base URI from Locator.getSystemId(). This applies to system IDs passed in
  • DTDHandler.notationDecl(),
  • DTDHandler.unparsedEntityDecl(), and
  • DeclHandler.externalEntityDecl().
It does not apply to EntityResolver.resolveEntity(), which is not used to report declarations, or to LexicalHandler.startDTD(), which already provides the non-absolutized URI.
string-interning | read/write | unspecified | Has a value of "true" if all XML names (for elements, prefixes, attributes, entities, notations, and local names), as well as Namespace URIs, will have been interned using java.lang.String.intern. This supports fast testing of equality/inequality against string constants, rather than forcing slower calls to String.equals().
unicode-normalization-checking | read/write | false | Controls whether the parser reports Unicode normalization errors as described in section 2.13 and Appendix B of the XML 1.1 Recommendation. If true, Unicode normalization errors are reported using the ErrorHandler.error() callback. Such errors are not fatal in themselves (though, obviously, other Unicode-related encoding errors may be).
use-attributes2 | read-only | not applicable | Returns "true" if the Attributes objects passed by this parser in ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface. That interface exposes additional DTD-related information, such as whether the attribute was specified in the source text rather than defaulted.
use-locator2 | read-only | not applicable | Returns "true" if the Locator objects passed by this parser in ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface. That interface exposes additional entity information, such as the character encoding and XML version used.
use-entity-resolver2 | read/write | true | Returns "true" if, when setEntityResolver is given an object implementing the org.xml.sax.ext.EntityResolver2 interface, those new methods will be used. Returns "false" to indicate that those methods will not be used.
validation | read/write | unspecified | Controls whether the parser is reporting all validity errors; if true, all external entities will be read.
xmlns-uris | read/write | false | Controls whether, when the namespace-prefixes feature is set, the parser treats namespace declaration attributes as being in the http://www.w3.org/2000/xmlns/ namespace. By default, SAX2 conforms to the original "Namespaces in XML" Recommendation, which explicitly states that such attributes are not in any namespace. Setting this optional flag to "true" makes the SAX2 events conform to a later backwards-incompatible revision of that recommendation, placing those attributes in a namespace.
xml-1.1 | read-only | not applicable | Returns "true" if the parser supports both XML 1.1 and XML 1.0. Returns "false" if the parser supports only XML 1.0.

Support for the default values of the namespaces and namespace-prefixes properties is required. Support for any other feature flags is entirely optional.

For default values not specified by SAX2, each XMLReader implementation specifies its default, or may choose not to expose the feature flag. Unless otherwise specified here, implementations may support changing current values of these standard feature flags, but not while parsing.

SAX2 Standard Handler and Property IDs

For parser interface characteristics that are described as objects, a separate namespace is defined. The objects in this namespace are again identified by URI, and the standard property URIs have the prefix http://xml.org/sax/properties/ before an identifier such as lexical-handler or dom-node. Manage those properties using setProperty(). Those identifiers are:

Property ID | Description
declaration-handler | Used to see most DTD declarations except those treated as lexical ("document element name is ...") or which are mandatory for all SAX parsers (DTDHandler). The Object must implement org.xml.sax.ext.DeclHandler.
document-xml-version | May be examined only during a parse, after the startDocument() callback has been completed; read-only. This property is a literal string describing the actual XML version of the document, such as "1.0" or "1.1".
dom-node | For "DOM Walker" style parsers, which ignore their parser.parse() parameters, this is used to specify the DOM (sub)tree being walked by the parser. The Object must implement the org.w3c.dom.Node interface.
lexical-handler | Used to see some syntax events that are essential in some applications: comments, CDATA delimiters, selected general entity inclusions, and the start and end of the DTD (and declaration of document element name). The Object must implement org.xml.sax.ext.LexicalHandler.
xml-string | Readable only during a parser callback, this exposes a TBS chunk of characters responsible for the current event.

All of these standard properties are optional; XMLReader implementations need not support them.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax

Interfaces

  • AttributeList
  • Attributes
  • ContentHandler
  • DocumentHandler
  • DTDHandler
  • EntityResolver
  • ErrorHandler
  • Locator
  • Parser
  • XMLFilter
  • XMLReader

Classes

  • HandlerBase
  • InputSource

Exceptions

  • SAXException
  • SAXNotRecognizedException
  • SAXNotSupportedException
  • SAXParseException


compact2 - org.xml.sax.ext

Interfaces

  • Attributes2
  • DeclHandler
  • EntityResolver2
  • LexicalHandler
  • Locator2

Classes

  • Attributes2Impl
  • DefaultHandler2
  • Locator2Impl


ext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.xml.sax.ext

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See: Description

  • Interface Summary
    Interface Description
    Attributes2
    SAX2 extension to augment the per-attribute information provided though Attributes.
    DeclHandler
    SAX2 extension handler for DTD declaration events.
    EntityResolver2
    Extended interface for mapping external entity references to input sources, or providing a missing external subset.
    LexicalHandler
    SAX2 extension handler for lexical events.
    Locator2
    SAX2 extension to augment the entity information provided though a Locator.
  • Class Summary
    Class Description
    Attributes2Impl
    SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
    DefaultHandler2
    This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
    Locator2Impl
    SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.

Package org.xml.sax.ext Description

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See http://www.saxproject.org for more information about SAX.

This package is independent of the SAX2 core, though the functionality exposed generally needs to be implemented within a parser core. That independence has several consequences:

  • SAX2 drivers are not required to recognize these handlers.
  • You cannot assume that the class files will be present in every SAX2 installation.
  • This package may be updated independently of SAX2 (i.e. new handlers and classes may be added without updating SAX2 itself).
  • The new handlers are not implemented by the SAX2 org.xml.sax.helpers.DefaultHandler or org.xml.sax.helpers.XMLFilterImpl classes. You can subclass these if you need such behavior, or use the helper classes found here.
  • The handlers need to be registered differently than core SAX2 handlers.

This package, SAX2-ext, is a standardized extension to SAX2. It is designed both to allow SAX parsers to pass certain types of information to applications, and to serve as a simple model for other SAX2 parser extension packages. Not all such extension packages should need to be recognized directly by parsers, however. As an example, most validation systems can be cleanly layered on top of parsers supporting the standardized SAX2 interfaces.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.xml.sax.ext

Interfaces

  • Attributes2
  • DeclHandler
  • EntityResolver2
  • LexicalHandler
  • Locator2

Classes

  • Attributes2Impl
  • DefaultHandler2
  • Locator2Impl


ext

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.xml.sax.ext

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See: Description

  • Interface Summary
    Interface Description
    Attributes2
    SAX2 extension to augment the per-attribute information provided though Attributes.
    DeclHandler
    SAX2 extension handler for DTD declaration events.
    EntityResolver2
    Extended interface for mapping external entity references to input sources, or providing a missing external subset.
    LexicalHandler
    SAX2 extension handler for lexical events.
    Locator2
    SAX2 extension to augment the entity information provided though a Locator.
  • Class Summary
    Class Description
    Attributes2Impl
    SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
    DefaultHandler2
    This class extends the SAX2 base handler class to support the SAX2 LexicalHandler, DeclHandler, and EntityResolver2 extensions.
    Locator2Impl
    SAX2 extension helper for holding additional Entity information, implementing the Locator2 interface.

Package org.xml.sax.ext Description

This package contains interfaces to SAX2 facilities that conformant SAX drivers won't necessarily support.

See http://www.saxproject.org for more information about SAX.

This package is independent of the SAX2 core, though the functionality exposed generally needs to be implemented within a parser core. That independence has several consequences:

  • SAX2 drivers are not required to recognize these handlers.
  • You cannot assume that the class files will be present in every SAX2 installation.
  • This package may be updated independently of SAX2 (i.e. new handlers and classes may be added without updating SAX2 itself).
  • The new handlers are not implemented by the SAX2 org.xml.sax.helpers.DefaultHandler or org.xml.sax.helpers.XMLFilterImpl classes. You can subclass these if you need such behavior, or use the helper classes found here.
  • The handlers need to be registered differently than core SAX2 handlers.

This package, SAX2-ext, is a standardized extension to SAX2. It is designed both to allow SAX parsers to pass certain types of information to applications, and to serve as a simple model for other SAX2 parser extension packages. Not all such extension packages should need to be recognized directly by parsers, however. As an example, most validation systems can be cleanly layered on top of parsers supporting the standardized SAX2 interfaces.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax.ext

Interfaces

  • Attributes2
  • DeclHandler
  • EntityResolver2
  • LexicalHandler
  • Locator2

Classes

  • Attributes2Impl
  • DefaultHandler2
  • Locator2Impl


compact2 - org.xml.sax.helpers

Classes

  • AttributeListImpl
  • AttributesImpl
  • DefaultHandler
  • LocatorImpl
  • NamespaceSupport
  • ParserAdapter
  • ParserFactory
  • XMLFilterImpl
  • XMLReaderAdapter
  • XMLReaderFactory


helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package org.xml.sax.helpers

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See: Description

  • Class Summary
    Class Description
    AttributeListImpl Deprecated
    This class implements a deprecated interface, AttributeList; that interface has been replaced by Attributes, which is implemented in the AttributesImpl helper class.
    AttributesImpl
    Default implementation of the Attributes interface.
    DefaultHandler
    Default base class for SAX2 event handlers.
    LocatorImpl
    Provide an optional convenience implementation of Locator.
    NamespaceSupport
    Encapsulate Namespace logic for use by applications using SAX, or internally by SAX drivers.
    ParserAdapter
    Adapt a SAX1 Parser as a SAX2 XMLReader.
    ParserFactory Deprecated
    This class works with the deprecated Parser interface.
    XMLFilterImpl
    Base class for deriving an XML filter.
    XMLReaderAdapter
    Adapt a SAX2 XMLReader as a SAX1 Parser.
    XMLReaderFactory
    Factory for creating an XML reader.

Package org.xml.sax.helpers Description

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See http://www.saxproject.org for more information about SAX.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - org.xml.sax.helpers

Classes

  • AttributeListImpl
  • AttributesImpl
  • DefaultHandler
  • LocatorImpl
  • NamespaceSupport
  • ParserAdapter
  • ParserFactory
  • XMLFilterImpl
  • XMLReaderAdapter
  • XMLReaderFactory


helpers

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package org.xml.sax.helpers

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See: Description

  • Class Summary
    Class Description
    AttributeListImpl Deprecated
    This class implements a deprecated interface, AttributeList; that interface has been replaced by Attributes, which is implemented in the AttributesImpl helper class.
    AttributesImpl
    Default implementation of the Attributes interface.
    DefaultHandler
    Default base class for SAX2 event handlers.
    LocatorImpl
    Provide an optional convenience implementation of Locator.
    NamespaceSupport
    Encapsulate Namespace logic for use by applications using SAX, or internally by SAX drivers.
    ParserAdapter
    Adapt a SAX1 Parser as a SAX2 XMLReader.
    ParserFactory Deprecated
    This class works with the deprecated Parser interface.
    XMLFilterImpl
    Base class for deriving an XML filter.
    XMLReaderAdapter
    Adapt a SAX2 XMLReader as a SAX1 Parser.
    XMLReaderFactory
    Factory for creating an XML reader.

Package org.xml.sax.helpers Description

This package contains "helper" classes, including support for bootstrapping SAX-based applications.

See http://www.saxproject.org for more information about SAX.

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Java™ Platform
Standard Ed. 8
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.


org.xml.sax.helpers

Classes

  • AttributeListImpl
  • AttributesImpl
  • DefaultHandler
  • LocatorImpl
  • NamespaceSupport
  • ParserAdapter
  • ParserFactory
  • XMLFilterImpl
  • XMLReaderAdapter
  • XMLReaderFactory


Occurences of 1 - Introduction

1 - Introduction occurences:
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction
1 - Introduction


Occurences of 1 Introduction

1 Introduction occurences:
1 Introduction
1 Introduction


Occurences of 10 - RMI Wire Protocol

10 - RMI Wire Protocol occurences:
10 - RMI Wire Protocol
10 - RMI Wire Protocol
10 - RMI Wire Protocol
10 - RMI Wire Protocol
10 - RMI Wire Protocol
10 - RMI Wire Protocol
10 - RMI Wire Protocol


Occurences of 2 - Attributes

2 - Attributes occurences:
2 - Attributes
2 - Attributes
2 - Attributes
2 - Attributes
2 - Attributes
2 - Attributes
2 - Attributes


Occurences of 2 - Distributed Object Model

2 - Distributed Object Model occurences:
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model
2 - Distributed Object Model


Occurences of 2 - Goals

2 - Goals occurences:
2 - Goals
2 - Goals


Occurences of 3 - RMI System Overview

3 - RMI System Overview occurences:
3 - RMI System Overview
3 - RMI System Overview
3 - RMI System Overview
3 - RMI System Overview
3 - RMI System Overview
3 - RMI System Overview


Occurences of 3 - Specifying Document Types

3 - Specifying Document Types occurences:
3 - Specifying Document Types
3 - Specifying Document Types
3 - Specifying Document Types
3 - Specifying Document Types
3 - Specifying Document Types


Occurences of 3 - Writing Image I/O Applications

3 - Writing Image I/O Applications occurences:
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications
3 - Writing Image I/O Applications


Occurences of 4 - Client Interfaces

4 - Client Interfaces occurences:
4 - Client Interfaces
4 - Client Interfaces
4 - Client Interfaces
4 - Client Interfaces


Occurences of 4 - Printing and Streaming Documents

4 - Printing and Streaming Documents occurences:
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents
4 - Printing and Streaming Documents


Occurences of 4 - Writing Image I/O Plug-ins

4 - Writing Image I/O Plug-ins occurences:
4 - Writing Image I/O Plug-ins
4 - Writing Image I/O Plug-ins
4 - Writing Image I/O Plug-ins
4 - Writing Image I/O Plug-ins
4 - Writing Image I/O Plug-ins
4 - Writing Image I/O Plug-ins


Occurences of 5 - Printing and Streaming 2D Graphics

5 - Printing and Streaming 2D Graphics occurences:
5 - Printing and Streaming 2D Graphics
5 - Printing and Streaming 2D Graphics
5 - Printing and Streaming 2D Graphics


Occurences of 5 - Server Interfaces

5 - Server Interfaces occurences:
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces
5 - Server Interfaces


Occurences of 6 - Registry Interfaces

6 - Registry Interfaces occurences:
6 - Registry Interfaces
6 - Registry Interfaces
6 - Registry Interfaces
6 - Registry Interfaces


Occurences of 7 - Remote Object Activation

7 - Remote Object Activation occurences:
7 - Remote Object Activation
7 - Remote Object Activation
7 - Remote Object Activation
7 - Remote Object Activation
7 - Remote Object Activation


Occurences of 8 - Stub/Skeleton Interfaces

8 - Stub/Skeleton Interfaces occurences:
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces
8 - Stub/Skeleton Interfaces


Occurences of 9 - Garbage Collector Interfaces

9 - Garbage Collector Interfaces occurences:
9 - Garbage Collector Interfaces
9 - Garbage Collector Interfaces
9 - Garbage Collector Interfaces
9 - Garbage Collector Interfaces
9 - Garbage Collector Interfaces
9 - Garbage Collector Interfaces


Occurences of A

A occurences:
java.awt.A
javax.print.attribute.standard.A
javax.print.attribute.standard.A
javax.swing.text.html.A


Occurences of A0

A0 occurences:
java.awt.A0
javax.print.attribute.standard.A0


Occurences of A1

A1 occurences:
java.awt.A1
javax.print.attribute.standard.A1


Occurences of A10

A10 occurences:
java.awt.A10
javax.print.attribute.standard.A10


Occurences of A2

A2 occurences:
java.awt.A2
javax.print.attribute.standard.A2


Occurences of A3

A3 occurences:
java.awt.A3
javax.print.attribute.standard.A3


Occurences of A4

A4 occurences:
java.awt.A4
javax.print.attribute.standard.A4


Occurences of A5

A5 occurences:
java.awt.A5
javax.print.attribute.standard.A5


Occurences of A6

A6 occurences:
java.awt.A6
javax.print.attribute.standard.A6


Occurences of A7

A7 occurences:
java.awt.A7
javax.print.attribute.standard.A7


Occurences of A8

A8 occurences:
java.awt.A8
javax.print.attribute.standard.A8


Occurences of A9

A9 occurences:
java.awt.A9
javax.print.attribute.standard.A9


Occurences of abort

abort occurences:
java.net.CacheRequest.abort()
java.sql.Connection.abort(java.util.concurrent.Executor)
javax.imageio.ImageReader.abort()
javax.imageio.ImageWriter.abort()
javax.security.auth.spi.LoginModule.abort()
org.w3c.dom.ls.LSParser.abort()


Occurences of ABORTED

ABORTED occurences:
java.awt.ABORTED
javax.print.attribute.standard.ABORTED


Occurences of abortRequested

abortRequested occurences:
javax.imageio.ImageReader.abortRequested()
javax.imageio.ImageWriter.abortRequested()


Occurences of abs

abs occurences:
java.lang.Math.abs(double)
java.lang.Math.abs(float)
java.lang.Math.abs(int)
java.lang.Math.abs(long)
java.lang.StrictMath.abs(double)
java.lang.StrictMath.abs(float)
java.lang.StrictMath.abs(int)
java.lang.StrictMath.abs(long)
java.math.BigDecimal.abs()
java.math.BigDecimal.abs(java.math.MathContext)
java.math.BigInteger.abs()
java.time.Duration.abs()


Occurences of AbsentInformationException (constructors)

AbsentInformationException (constructors) occurences:
com.sun.jdi.AbsentInformationException()
com.sun.jdi.AbsentInformationException(java.lang.String)


Occurences of absolutePath

absolutePath occurences:
java.util.prefs.AbstractPreferences.absolutePath()
java.util.prefs.Preferences.absolutePath()


Occurences of ABSTRACT

ABSTRACT occurences:
java.lang.reflect.ABSTRACT
javax.lang.model.element.ABSTRACT


Occurences of AbstractAction (constructors)

AbstractAction (constructors) occurences:
javax.swing.AbstractAction()
javax.swing.AbstractAction(java.lang.String)
javax.swing.AbstractAction(java.lang.String, javax.swing.Icon)


Occurences of AbstractDocument (constructors)

AbstractDocument (constructors) occurences:
javax.swing.text.AbstractDocument(javax.swing.text.AbstractDocument.Content)
javax.swing.text.AbstractDocument(javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.AttributeContext)


Occurences of AbstractMethodError (constructors)

AbstractMethodError (constructors) occurences:
java.lang.AbstractMethodError()
java.lang.AbstractMethodError(java.lang.String)


Occurences of AbstractScriptEngine (constructors)

AbstractScriptEngine (constructors) occurences:
javax.script.AbstractScriptEngine()
javax.script.AbstractScriptEngine(javax.script.Bindings)


Occurences of AbstractWriter (constructors)

AbstractWriter (constructors) occurences:
javax.swing.text.AbstractWriter(java.io.Writer, javax.swing.text.Document)
javax.swing.text.AbstractWriter(java.io.Writer, javax.swing.text.Document, int, int)
javax.swing.text.AbstractWriter(java.io.Writer, javax.swing.text.Element)
javax.swing.text.AbstractWriter(java.io.Writer, javax.swing.text.Element, int, int)


Occurences of accept

accept occurences:
com.sun.jdi.connect.ListeningConnector.accept(java.util.Map)
com.sun.jdi.connect.spi.TransportService.accept(com.sun.jdi.connect.spi.TransportService.ListenKey, long, long)
com.sun.source.doctree.DocTree.accept(com.sun.source.doctree.DocTreeVisitor, D)
com.sun.source.doctree.DocTree.accept(com.sun.source.doctree.DocTreeVisitor, java.lang.Object)
com.sun.source.tree.Tree.accept(com.sun.source.tree.TreeVisitor, D)
com.sun.source.tree.Tree.accept(com.sun.source.tree.TreeVisitor, java.lang.Object)
java.awt.ContainerOrderFocusTraversalPolicy.accept(java.awt.Component)
java.awt.DefaultFocusTraversalPolicy.accept(java.awt.Component)
java.io.FileFilter.accept(java.io.File)
java.io.FilenameFilter.accept(java.io.File, java.lang.String)
java.net.ServerSocket.accept()
java.net.SocketImpl.accept(java.net.SocketImpl)
java.nio.channels.AsynchronousServerSocketChannel.accept()
java.nio.channels.AsynchronousServerSocketChannel.accept(A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousServerSocketChannel.accept(java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.ServerSocketChannel.accept()
java.nio.file.DirectoryStream.Filter.accept(java.lang.Object)
java.nio.file.DirectoryStream.Filter.accept(T)
java.util.DoubleSummaryStatistics.accept(double)
java.util.function.BiConsumer.accept(java.lang.Object, java.lang.Object)
java.util.function.BiConsumer.accept(T, U)
java.util.function.Consumer.accept(java.lang.Object)
java.util.function.Consumer.accept(T)
java.util.function.DoubleConsumer.accept(double)
java.util.function.IntConsumer.accept(int)
java.util.function.LongConsumer.accept(long)
java.util.function.ObjDoubleConsumer.accept(java.lang.Object, double)
java.util.function.ObjDoubleConsumer.accept(T, double)
java.util.function.ObjIntConsumer.accept(java.lang.Object, int)
java.util.function.ObjIntConsumer.accept(T, int)
java.util.function.ObjLongConsumer.accept(java.lang.Object, long)
java.util.function.ObjLongConsumer.accept(T, long)
java.util.IntSummaryStatistics.accept(int)
java.util.LongSummaryStatistics.accept(int)
java.util.LongSummaryStatistics.accept(long)
java.util.stream.DoubleStream.Builder.accept(double)
java.util.stream.IntStream.Builder.accept(int)
java.util.stream.LongStream.Builder.accept(long)
java.util.stream.Stream.Builder.accept(java.lang.Object)
java.util.stream.Stream.Builder.accept(T)
javax.lang.model.element.AnnotationValue.accept(javax.lang.model.element.AnnotationValueVisitor, java.lang.Object)
javax.lang.model.element.AnnotationValue.accept(javax.lang.model.element.AnnotationValueVisitor, P)
javax.lang.model.element.Element.accept(javax.lang.model.element.ElementVisitor, java.lang.Object)
javax.lang.model.element.Element.accept(javax.lang.model.element.ElementVisitor, P)
javax.lang.model.type.TypeMirror.accept(javax.lang.model.type.TypeVisitor, java.lang.Object)
javax.lang.model.type.TypeMirror.accept(javax.lang.model.type.TypeVisitor, P)
javax.swing.filechooser.FileFilter.accept(java.io.File)
javax.swing.filechooser.FileNameExtensionFilter.accept(java.io.File)
javax.swing.JFileChooser.accept(java.io.File)
javax.swing.LayoutFocusTraversalPolicy.accept(java.awt.Component)
javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter.accept(java.io.File)
javax.swing.SortingFocusTraversalPolicy.accept(java.awt.Component)
javax.xml.stream.EventFilter.accept(javax.xml.stream.events.XMLEvent)
javax.xml.stream.StreamFilter.accept(javax.xml.stream.XMLStreamReader)


Occurences of acceptChanges

acceptChanges occurences:
javax.sql.rowset.CachedRowSet.acceptChanges()
javax.sql.rowset.CachedRowSet.acceptChanges(java.sql.Connection)


Occurences of acceptDrag

acceptDrag occurences:
java.awt.dnd.DropTargetContext.acceptDrag(int)
java.awt.dnd.DropTargetDragEvent.acceptDrag(int)


Occurences of acceptDrop

acceptDrop occurences:
java.awt.dnd.DropTargetContext.acceptDrop(int)
java.awt.dnd.DropTargetDropEvent.acceptDrop(int)


Occurences of acceptEither

acceptEither occurences:
java.util.concurrent.CompletableFuture.acceptEither(java.util.concurrent.CompletionStage, java.util.function.Consumer)
java.util.concurrent.CompletionStage.acceptEither(java.util.concurrent.CompletionStage, java.util.function.Consumer)


Occurences of acceptEitherAsync

acceptEitherAsync occurences:
java.util.concurrent.CompletableFuture.acceptEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Consumer)
java.util.concurrent.CompletableFuture.acceptEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Consumer, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.acceptEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Consumer)
java.util.concurrent.CompletionStage.acceptEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Consumer, java.util.concurrent.Executor)


Occurences of acceptSecContext

acceptSecContext occurences:
org.ietf.jgss.GSSContext.acceptSecContext(byte:A, int, int)
org.ietf.jgss.GSSContext.acceptSecContext(java.io.InputStream, java.io.OutputStream)


Occurences of access

access occurences:
java.lang.invoke.access
org.omg.CORBA.access


Occurences of AccessControlContext (constructors)

AccessControlContext (constructors) occurences:
java.security.AccessControlContext(java.security.AccessControlContext, java.security.DomainCombiner)
java.security.AccessControlContext(java.security.ProtectionDomain:A)


Occurences of AccessControlException (constructors)

AccessControlException (constructors) occurences:
java.security.AccessControlException(java.lang.String)
java.security.AccessControlException(java.lang.String, java.security.Permission)


Occurences of AccessDeniedException (constructors)

AccessDeniedException (constructors) occurences:
java.nio.file.AccessDeniedException(java.lang.String)
java.nio.file.AccessDeniedException(java.lang.String, java.lang.String, java.lang.String)


Occurences of AccessException (constructors)

AccessException (constructors) occurences:
java.rmi.AccessException(java.lang.String)
java.rmi.AccessException(java.lang.String, java.lang.Exception)


Occurences of Accessible

Accessible occurences:
com.sun.jdi.Accessible
javax.accessibility.Accessible


Occurences of AccessibleContainerHandler

AccessibleContainerHandler occurences:
java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler.AccessibleContainerHandler()
javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler.AccessibleContainerHandler()


Occurences of accessibleContext

accessibleContext occurences:
java.awt.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext
javax.swing.accessibleContext


Occurences of AccessibleRelation (constructors)

AccessibleRelation (constructors) occurences:
javax.accessibility.AccessibleRelation(java.lang.String)
javax.accessibility.AccessibleRelation(java.lang.String, java.lang.Object)
javax.accessibility.AccessibleRelation(java.lang.String, java.lang.Object:A)


Occurences of AccessibleRelationSet (constructors)

AccessibleRelationSet (constructors) occurences:
javax.accessibility.AccessibleRelationSet()
javax.accessibility.AccessibleRelationSet(javax.accessibility.AccessibleRelation:A)


Occurences of AccessibleStateSet (constructors)

AccessibleStateSet (constructors) occurences:
javax.accessibility.AccessibleStateSet()
javax.accessibility.AccessibleStateSet(javax.accessibility.AccessibleState:A)


Occurences of AccountException (constructors)

AccountException (constructors) occurences:
javax.security.auth.login.AccountException()
javax.security.auth.login.AccountException(java.lang.String)


Occurences of AccountExpiredException (constructors)

AccountExpiredException (constructors) occurences:
javax.security.auth.login.AccountExpiredException()
javax.security.auth.login.AccountExpiredException(java.lang.String)


Occurences of AccountLockedException (constructors)

AccountLockedException (constructors) occurences:
javax.security.auth.login.AccountLockedException()
javax.security.auth.login.AccountLockedException(java.lang.String)


Occurences of AccountNotFoundException (constructors)

AccountNotFoundException (constructors) occurences:
javax.security.auth.login.AccountNotFoundException()
javax.security.auth.login.AccountNotFoundException(java.lang.String)


Occurences of accumulate

accumulate occurences:
java.util.concurrent.atomic.DoubleAccumulator.accumulate(double)
java.util.concurrent.atomic.LongAccumulator.accumulate(long)


Occurences of accumulateAndGet

accumulateAndGet occurences:
java.util.concurrent.atomic.AtomicInteger.accumulateAndGet(int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerArray.accumulateAndGet(int, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.accumulateAndGet(java.lang.Object, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.accumulateAndGet(T, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicLong.accumulateAndGet(long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongArray.accumulateAndGet(int, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.accumulateAndGet(java.lang.Object, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.accumulateAndGet(T, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicReference.accumulateAndGet(java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReference.accumulateAndGet(V, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.accumulateAndGet(int, E, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.accumulateAndGet(int, java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.accumulateAndGet(java.lang.Object, java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.accumulateAndGet(T, V, java.util.function.BinaryOperator)


Occurences of acl

acl occurences:
compact3.java.security.acl
java.security.acl


Occurences of AclEntry

AclEntry occurences:
java.nio.file.attribute.AclEntry
java.security.acl.AclEntry


Occurences of acos

acos occurences:
java.lang.Math.acos(double)
java.lang.StrictMath.acos(double)


Occurences of acquire

acquire occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.acquire(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)
java.util.concurrent.Semaphore.acquire()
java.util.concurrent.Semaphore.acquire(int)


Occurences of acquireInterruptibly

acquireInterruptibly occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.acquireInterruptibly(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(int)


Occurences of acquireShared

acquireShared occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.acquireShared(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(int)


Occurences of acquireSharedInterruptibly

acquireSharedInterruptibly occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.acquireSharedInterruptibly(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int)


Occurences of acquireUninterruptibly

acquireUninterruptibly occurences:
java.util.concurrent.Semaphore.acquireUninterruptibly()
java.util.concurrent.Semaphore.acquireUninterruptibly(int)


Occurences of Action

Action occurences:
javax.swing.Action
javax.xml.ws.Action


Occurences of ACTION

ACTION occurences:
javax.management.ACTION
javax.swing.text.html.ACTION


Occurences of action

action occurences:
java.awt.Component.action(java.awt.Event, java.lang.Object)
javax.jws.WebMethod.action()


Occurences of actionCommand

actionCommand occurences:
javax.swing.actionCommand
javax.swing.actionCommand


Occurences of ActionEvent (constructors)

ActionEvent (constructors) occurences:
java.awt.event.ActionEvent(java.lang.Object, int, java.lang.String)
java.awt.event.ActionEvent(java.lang.Object, int, java.lang.String, int)
java.awt.event.ActionEvent(java.lang.Object, int, java.lang.String, long, int)


Occurences of actionPerformed

actionPerformed occurences:
java.awt.AWTEventMulticaster.actionPerformed(java.awt.event.ActionEvent)
java.awt.dnd.DropTarget.DropTargetAutoScroller.actionPerformed(java.awt.event.ActionEvent)
java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)
java.awt.List.AccessibleAWTList.actionPerformed(java.awt.event.ActionEvent)
javax.swing.DefaultCellEditor.EditorDelegate.actionPerformed(java.awt.event.ActionEvent)
javax.swing.JComboBox.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSliderUI.ActionScroller.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSliderUI.ScrollListener.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.ComponentHandler.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreePageAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.BeepAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.CopyAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.CutAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.InsertBreakAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.InsertContentAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.InsertTabAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.DefaultEditorKit.PasteAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.html.FormView.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.AlignmentAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.BoldAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.FontFamilyAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.FontSizeAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.ForegroundAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.ItalicAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.text.StyledEditorKit.UnderlineAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.ToolTipManager.insideTimerAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.ToolTipManager.outsideTimerAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.ToolTipManager.stillInsideTimerAction.actionPerformed(java.awt.event.ActionEvent)
javax.swing.tree.DefaultTreeCellEditor.actionPerformed(java.awt.event.ActionEvent)


Occurences of actionPropertyChanged

actionPropertyChanged occurences:
javax.swing.AbstractButton.actionPropertyChanged(javax.swing.Action, java.lang.String)
javax.swing.JComboBox.actionPropertyChanged(javax.swing.Action, java.lang.String)
javax.swing.JMenuItem.actionPropertyChanged(javax.swing.Action, java.lang.String)
javax.swing.JTextField.actionPropertyChanged(javax.swing.Action, java.lang.String)


Occurences of Activatable (constructors)

Activatable (constructors) occurences:
java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int)
java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int)
java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)


Occurences of activate

activate occurences:
java.awt.im.spi.InputMethod.activate()
java.beans.AppletInitializer.activate(java.applet.Applet)
java.rmi.activation.ActivationID.activate(boolean)
java.rmi.activation.Activator.activate(java.rmi.activation.ActivationID, boolean)
javax.imageio.IIOParamController.activate(javax.imageio.IIOParam)
javax.imageio.metadata.IIOMetadataController.activate(javax.imageio.metadata.IIOMetadata)
org.omg.PortableServer.POAManagerOperations.activate()


Occurences of activateController

activateController occurences:
javax.imageio.IIOParam.activateController()
javax.imageio.metadata.IIOMetadata.activateController()


Occurences of ActivateFailedException (constructors)

ActivateFailedException (constructors) occurences:
java.rmi.activation.ActivateFailedException(java.lang.String)
java.rmi.activation.ActivateFailedException(java.lang.String, java.lang.Exception)


Occurences of activateFrame

activateFrame occurences:
javax.swing.DefaultDesktopManager.activateFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.activateFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.activateFrame(javax.swing.JInternalFrame)


Occurences of activation

activation occurences:
compact2.java.rmi.activation
compact3.java.rmi.activation
java.rmi.activation
javax.activation


Occurences of ActivationDataFlavor (constructors)

ActivationDataFlavor (constructors) occurences:
javax.activation.ActivationDataFlavor(java.lang.Class, java.lang.String)
javax.activation.ActivationDataFlavor(java.lang.Class, java.lang.String, java.lang.String)
javax.activation.ActivationDataFlavor(java.lang.String, java.lang.String)


Occurences of ActivationDesc (constructors)

ActivationDesc (constructors) occurences:
java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject)
java.rmi.activation.ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)
java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject)
java.rmi.activation.ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)


Occurences of ActivationException (constructors)

ActivationException (constructors) occurences:
java.rmi.activation.ActivationException()
java.rmi.activation.ActivationException(java.lang.String)
java.rmi.activation.ActivationException(java.lang.String, java.lang.Throwable)


Occurences of ActivationGroupDesc (constructors)

ActivationGroupDesc (constructors) occurences:
java.rmi.activation.ActivationGroupDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, java.util.Properties, java.rmi.activation.ActivationGroupDesc.CommandEnvironment)
java.rmi.activation.ActivationGroupDesc(java.util.Properties, java.rmi.activation.ActivationGroupDesc.CommandEnvironment)


Occurences of ACTIVE

ACTIVE occurences:
javax.accessibility.ACTIVE
org.omg.PortableInterceptor.ACTIVE
org.omg.PortableServer.POAManagerPackage.ACTIVE


Occurences of activeCount

activeCount occurences:
java.lang.Thread.activeCount()
java.lang.ThreadGroup.activeCount()


Occurences of activeObject

activeObject occurences:
java.rmi.activation.ActivationGroup.activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)
java.rmi.activation.ActivationGroup.activeObject(java.rmi.activation.ActivationID, java.rmi.Remote)
java.rmi.activation.ActivationMonitor.activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)


Occurences of ActivityCompletedException (constructors)

ActivityCompletedException (constructors) occurences:
javax.activity.ActivityCompletedException()
javax.activity.ActivityCompletedException(java.lang.String)
javax.activity.ActivityCompletedException(java.lang.String, java.lang.Throwable)
javax.activity.ActivityCompletedException(java.lang.Throwable)


Occurences of ActivityRequiredException (constructors)

ActivityRequiredException (constructors) occurences:
javax.activity.ActivityRequiredException()
javax.activity.ActivityRequiredException(java.lang.String)
javax.activity.ActivityRequiredException(java.lang.String, java.lang.Throwable)
javax.activity.ActivityRequiredException(java.lang.Throwable)


Occurences of ACTIVITY_COMPLETED (constructors)

ACTIVITY_COMPLETED (constructors) occurences:
org.omg.CORBA.ACTIVITY_COMPLETED()
org.omg.CORBA.ACTIVITY_COMPLETED(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.ACTIVITY_COMPLETED(java.lang.String)
org.omg.CORBA.ACTIVITY_COMPLETED(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of ACTIVITY_REQUIRED (constructors)

ACTIVITY_REQUIRED (constructors) occurences:
org.omg.CORBA.ACTIVITY_REQUIRED()
org.omg.CORBA.ACTIVITY_REQUIRED(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.ACTIVITY_REQUIRED(java.lang.String)
org.omg.CORBA.ACTIVITY_REQUIRED(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of adapt

adapt occurences:
java.util.concurrent.ForkJoinTask.adapt(java.lang.Runnable)
java.util.concurrent.ForkJoinTask.adapt(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ForkJoinTask.adapt(java.lang.Runnable, T)
java.util.concurrent.ForkJoinTask.adapt(java.util.concurrent.Callable)


Occurences of AdapterAlreadyExists (constructors)

AdapterAlreadyExists (constructors) occurences:
org.omg.PortableServer.POAPackage.AdapterAlreadyExists()
org.omg.PortableServer.POAPackage.AdapterAlreadyExists(java.lang.String)


Occurences of AdapterInactive (constructors)

AdapterInactive (constructors) occurences:
org.omg.PortableServer.POAManagerPackage.AdapterInactive()
org.omg.PortableServer.POAManagerPackage.AdapterInactive(java.lang.String)


Occurences of AdapterNonExistent (constructors)

AdapterNonExistent (constructors) occurences:
org.omg.PortableServer.POAPackage.AdapterNonExistent()
org.omg.PortableServer.POAPackage.AdapterNonExistent(java.lang.String)


Occurences of adapter_name

adapter_name occurences:
org.omg.PortableInterceptor.ObjectReferenceTemplate.adapter_name()
org.omg.PortableInterceptor.ServerRequestInfoOperations.adapter_name()


Occurences of add

add occurences:
java.awt.AWTEventMulticaster.add(java.awt.event.ActionListener, java.awt.event.ActionListener)
java.awt.AWTEventMulticaster.add(java.awt.event.AdjustmentListener, java.awt.event.AdjustmentListener)
java.awt.AWTEventMulticaster.add(java.awt.event.ComponentListener, java.awt.event.ComponentListener)
java.awt.AWTEventMulticaster.add(java.awt.event.ContainerListener, java.awt.event.ContainerListener)
java.awt.AWTEventMulticaster.add(java.awt.event.FocusListener, java.awt.event.FocusListener)
java.awt.AWTEventMulticaster.add(java.awt.event.HierarchyBoundsListener, java.awt.event.HierarchyBoundsListener)
java.awt.AWTEventMulticaster.add(java.awt.event.HierarchyListener, java.awt.event.HierarchyListener)
java.awt.AWTEventMulticaster.add(java.awt.event.InputMethodListener, java.awt.event.InputMethodListener)
java.awt.AWTEventMulticaster.add(java.awt.event.ItemListener, java.awt.event.ItemListener)
java.awt.AWTEventMulticaster.add(java.awt.event.KeyListener, java.awt.event.KeyListener)
java.awt.AWTEventMulticaster.add(java.awt.event.MouseListener, java.awt.event.MouseListener)
java.awt.AWTEventMulticaster.add(java.awt.event.MouseMotionListener, java.awt.event.MouseMotionListener)
java.awt.AWTEventMulticaster.add(java.awt.event.MouseWheelListener, java.awt.event.MouseWheelListener)
java.awt.AWTEventMulticaster.add(java.awt.event.TextListener, java.awt.event.TextListener)
java.awt.AWTEventMulticaster.add(java.awt.event.WindowFocusListener, java.awt.event.WindowFocusListener)
java.awt.AWTEventMulticaster.add(java.awt.event.WindowListener, java.awt.event.WindowListener)
java.awt.AWTEventMulticaster.add(java.awt.event.WindowStateListener, java.awt.event.WindowStateListener)
java.awt.Choice.add(java.lang.String)
java.awt.Component.add(java.awt.PopupMenu)
java.awt.Container.add(java.awt.Component)
java.awt.Container.add(java.awt.Component, int)
java.awt.Container.add(java.awt.Component, java.lang.Object)
java.awt.Container.add(java.awt.Component, java.lang.Object, int)
java.awt.Container.add(java.lang.String, java.awt.Component)
java.awt.geom.Area.add(java.awt.geom.Area)
java.awt.geom.Rectangle2D.add(double, double)
java.awt.geom.Rectangle2D.add(java.awt.geom.Point2D)
java.awt.geom.Rectangle2D.add(java.awt.geom.Rectangle2D)
java.awt.image.renderable.ParameterBlock.add(byte)
java.awt.image.renderable.ParameterBlock.add(char)
java.awt.image.renderable.ParameterBlock.add(double)
java.awt.image.renderable.ParameterBlock.add(float)
java.awt.image.renderable.ParameterBlock.add(int)
java.awt.image.renderable.ParameterBlock.add(java.lang.Object)
java.awt.image.renderable.ParameterBlock.add(long)
java.awt.image.renderable.ParameterBlock.add(short)
java.awt.List.add(java.lang.String)
java.awt.List.add(java.lang.String, int)
java.awt.Menu.add(java.awt.MenuItem)
java.awt.Menu.add(java.lang.String)
java.awt.MenuBar.add(java.awt.Menu)
java.awt.Rectangle.add(int, int)
java.awt.Rectangle.add(java.awt.Point)
java.awt.Rectangle.add(java.awt.Rectangle)
java.awt.RenderingHints.add(java.awt.RenderingHints)
java.awt.SystemTray.add(java.awt.TrayIcon)
java.beans.beancontext.BeanContextSupport.add(java.lang.Object)
java.math.BigDecimal.add(java.math.BigDecimal)
java.math.BigDecimal.add(java.math.BigDecimal, java.math.MathContext)
java.math.BigInteger.add(java.math.BigInteger)
java.net.CookieStore.add(java.net.URI, java.net.HttpCookie)
java.security.PermissionCollection.add(java.security.Permission)
java.security.Permissions.add(java.security.Permission)
java.util.AbstractCollection.add(E)
java.util.AbstractCollection.add(java.lang.Object)
java.util.AbstractList.add(E)
java.util.AbstractList.add(int, E)
java.util.AbstractList.add(int, java.lang.Object)
java.util.AbstractList.add(java.lang.Object)
java.util.AbstractQueue.add(E)
java.util.AbstractQueue.add(java.lang.Object)
java.util.AbstractSequentialList.add(int, E)
java.util.AbstractSequentialList.add(int, java.lang.Object)
java.util.ArrayDeque.add(E)
java.util.ArrayDeque.add(java.lang.Object)
java.util.ArrayList.add(E)
java.util.ArrayList.add(int, E)
java.util.ArrayList.add(int, java.lang.Object)
java.util.ArrayList.add(java.lang.Object)
java.util.Calendar.add(int, int)
java.util.Collection.add(E)
java.util.Collection.add(java.lang.Object)
java.util.concurrent.ArrayBlockingQueue.add(E)
java.util.concurrent.ArrayBlockingQueue.add(java.lang.Object)
java.util.concurrent.atomic.DoubleAdder.add(double)
java.util.concurrent.atomic.LongAdder.add(long)
java.util.concurrent.BlockingDeque.add(E)
java.util.concurrent.BlockingDeque.add(java.lang.Object)
java.util.concurrent.BlockingQueue.add(E)
java.util.concurrent.BlockingQueue.add(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.KeySetView.add(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.KeySetView.add(K)
java.util.concurrent.ConcurrentLinkedDeque.add(E)
java.util.concurrent.ConcurrentLinkedDeque.add(java.lang.Object)
java.util.concurrent.ConcurrentLinkedQueue.add(E)
java.util.concurrent.ConcurrentLinkedQueue.add(java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.add(E)
java.util.concurrent.ConcurrentSkipListSet.add(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.add(E)
java.util.concurrent.CopyOnWriteArrayList.add(int, E)
java.util.concurrent.CopyOnWriteArrayList.add(int, java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.add(java.lang.Object)
java.util.concurrent.CopyOnWriteArraySet.add(E)
java.util.concurrent.CopyOnWriteArraySet.add(java.lang.Object)
java.util.concurrent.DelayQueue.add(E)
java.util.concurrent.DelayQueue.add(java.util.concurrent.Delayed)
java.util.concurrent.LinkedBlockingDeque.add(E)
java.util.concurrent.LinkedBlockingDeque.add(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.add(E)
java.util.concurrent.LinkedTransferQueue.add(java.lang.Object)
java.util.concurrent.PriorityBlockingQueue.add(E)
java.util.concurrent.PriorityBlockingQueue.add(java.lang.Object)
java.util.Deque.add(E)
java.util.Deque.add(java.lang.Object)
java.util.GregorianCalendar.add(int, int)
java.util.HashSet.add(E)
java.util.HashSet.add(java.lang.Object)
java.util.LinkedList.add(E)
java.util.LinkedList.add(int, E)
java.util.LinkedList.add(int, java.lang.Object)
java.util.LinkedList.add(java.lang.Object)
java.util.List.add(E)
java.util.List.add(int, E)
java.util.List.add(int, java.lang.Object)
java.util.List.add(java.lang.Object)
java.util.ListIterator.add(E)
java.util.ListIterator.add(java.lang.Object)
java.util.PriorityQueue.add(E)
java.util.PriorityQueue.add(java.lang.Object)
java.util.Queue.add(E)
java.util.Queue.add(java.lang.Object)
java.util.Set.add(E)
java.util.Set.add(java.lang.Object)
java.util.stream.DoubleStream.Builder.add(double)
java.util.stream.IntStream.Builder.add(int)
java.util.stream.LongStream.Builder.add(long)
java.util.stream.Stream.Builder.add(java.lang.Object)
java.util.stream.Stream.Builder.add(T)
java.util.StringJoiner.add(java.lang.CharSequence)
java.util.TreeSet.add(E)
java.util.TreeSet.add(java.lang.Object)
java.util.Vector.add(E)
java.util.Vector.add(int, E)
java.util.Vector.add(int, java.lang.Object)
java.util.Vector.add(java.lang.Object)
javax.accessibility.AccessibleRelationSet.add(javax.accessibility.AccessibleRelation)
javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState)
javax.management.AttributeList.add(int, java.lang.Object)
javax.management.AttributeList.add(int, javax.management.Attribute)
javax.management.AttributeList.add(java.lang.Object)
javax.management.AttributeList.add(javax.management.Attribute)
javax.management.relation.RoleList.add(int, java.lang.Object)
javax.management.relation.RoleList.add(int, javax.management.relation.Role)
javax.management.relation.RoleList.add(java.lang.Object)
javax.management.relation.RoleList.add(javax.management.relation.Role)
javax.management.relation.RoleUnresolvedList.add(int, java.lang.Object)
javax.management.relation.RoleUnresolvedList.add(int, javax.management.relation.RoleUnresolved)
javax.management.relation.RoleUnresolvedList.add(java.lang.Object)
javax.management.relation.RoleUnresolvedList.add(javax.management.relation.RoleUnresolved)
javax.naming.CompositeName.add(int, java.lang.String)
javax.naming.CompositeName.add(java.lang.String)
javax.naming.CompoundName.add(int, java.lang.String)
javax.naming.CompoundName.add(java.lang.String)
javax.naming.directory.Attribute.add(int, java.lang.Object)
javax.naming.directory.Attribute.add(java.lang.Object)
javax.naming.directory.BasicAttribute.add(int, java.lang.Object)
javax.naming.directory.BasicAttribute.add(java.lang.Object)
javax.naming.ldap.LdapName.add(int, java.lang.String)
javax.naming.ldap.LdapName.add(int, javax.naming.ldap.Rdn)
javax.naming.ldap.LdapName.add(java.lang.String)
javax.naming.ldap.LdapName.add(javax.naming.ldap.Rdn)
javax.naming.Name.add(int, java.lang.String)
javax.naming.Name.add(java.lang.String)
javax.naming.Reference.add(int, javax.naming.RefAddr)
javax.naming.Reference.add(javax.naming.RefAddr)
javax.print.attribute.AttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.DocAttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.PrintJobAttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.PrintRequestAttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.PrintServiceAttributeSet.add(javax.print.attribute.Attribute)
javax.print.attribute.standard.JobStateReasons.add(javax.print.attribute.standard.JobStateReason)
javax.sound.midi.Track.add(javax.sound.midi.MidiEvent)
javax.swing.ButtonGroup.add(javax.swing.AbstractButton)
javax.swing.DefaultListModel.add(int, E)
javax.swing.DefaultListModel.add(int, java.lang.Object)
javax.swing.event.EventListenerList.add(java.lang.Class, java.util.EventListener)
javax.swing.event.EventListenerList.add(java.lang.Class, T)
javax.swing.JMenu.add(java.awt.Component)
javax.swing.JMenu.add(java.awt.Component, int)
javax.swing.JMenu.add(java.lang.String)
javax.swing.JMenu.add(javax.swing.Action)
javax.swing.JMenu.add(javax.swing.JMenuItem)
javax.swing.JMenuBar.add(javax.swing.JMenu)
javax.swing.JPopupMenu.add(java.lang.String)
javax.swing.JPopupMenu.add(javax.swing.Action)
javax.swing.JPopupMenu.add(javax.swing.JMenuItem)
javax.swing.JTabbedPane.add(java.awt.Component)
javax.swing.JTabbedPane.add(java.awt.Component, int)
javax.swing.JTabbedPane.add(java.awt.Component, java.lang.Object)
javax.swing.JTabbedPane.add(java.awt.Component, java.lang.Object, int)
javax.swing.JTabbedPane.add(java.lang.String, java.awt.Component)
javax.swing.JToolBar.add(javax.swing.Action)
javax.swing.tree.DefaultMutableTreeNode.add(javax.swing.tree.MutableTreeNode)
javax.xml.datatype.Duration.add(javax.xml.datatype.Duration)
javax.xml.datatype.XMLGregorianCalendar.add(javax.xml.datatype.Duration)
javax.xml.stream.util.XMLEventConsumer.add(javax.xml.stream.events.XMLEvent)
javax.xml.stream.XMLEventWriter.add(javax.xml.stream.events.XMLEvent)
javax.xml.stream.XMLEventWriter.add(javax.xml.stream.XMLEventReader)
org.ietf.jgss.GSSCredential.add(org.ietf.jgss.GSSName, int, int, org.ietf.jgss.Oid, int)
org.omg.CORBA.ContextList.add(java.lang.String)
org.omg.CORBA.ExceptionList.add(org.omg.CORBA.TypeCode)
org.omg.CORBA.NVList.add(int)


Occurences of addAccessibleSelection

addAccessibleSelection occurences:
java.awt.List.AccessibleAWTList.addAccessibleSelection(int)
java.awt.MenuComponent.AccessibleAWTMenuComponent.addAccessibleSelection(int)
javax.accessibility.AccessibleSelection.addAccessibleSelection(int)
javax.swing.JComboBox.AccessibleJComboBox.addAccessibleSelection(int)
javax.swing.JList.AccessibleJList.addAccessibleSelection(int)
javax.swing.JMenu.AccessibleJMenu.addAccessibleSelection(int)
javax.swing.JMenuBar.AccessibleJMenuBar.addAccessibleSelection(int)
javax.swing.JTabbedPane.AccessibleJTabbedPane.addAccessibleSelection(int)
javax.swing.JTable.AccessibleJTable.addAccessibleSelection(int)
javax.swing.JTree.AccessibleJTree.addAccessibleSelection(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.addAccessibleSelection(int)


Occurences of addActionListener

addActionListener occurences:
java.awt.Button.addActionListener(java.awt.event.ActionListener)
java.awt.List.addActionListener(java.awt.event.ActionListener)
java.awt.MenuItem.addActionListener(java.awt.event.ActionListener)
java.awt.TextField.addActionListener(java.awt.event.ActionListener)
java.awt.TrayIcon.addActionListener(java.awt.event.ActionListener)
javax.swing.AbstractButton.addActionListener(java.awt.event.ActionListener)
javax.swing.ButtonModel.addActionListener(java.awt.event.ActionListener)
javax.swing.ComboBoxEditor.addActionListener(java.awt.event.ActionListener)
javax.swing.DefaultButtonModel.addActionListener(java.awt.event.ActionListener)
javax.swing.JComboBox.addActionListener(java.awt.event.ActionListener)
javax.swing.JFileChooser.addActionListener(java.awt.event.ActionListener)
javax.swing.JTextField.addActionListener(java.awt.event.ActionListener)
javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener(java.awt.event.ActionListener)
javax.swing.Timer.addActionListener(java.awt.event.ActionListener)


Occurences of addAdjustmentListener

addAdjustmentListener occurences:
java.awt.Adjustable.addAdjustmentListener(java.awt.event.AdjustmentListener)
java.awt.Scrollbar.addAdjustmentListener(java.awt.event.AdjustmentListener)
java.awt.ScrollPaneAdjustable.addAdjustmentListener(java.awt.event.AdjustmentListener)
javax.swing.JScrollBar.addAdjustmentListener(java.awt.event.AdjustmentListener)


Occurences of addAll

addAll occurences:
java.beans.beancontext.BeanContextSupport.addAll(java.util.Collection)
java.util.AbstractCollection.addAll(java.util.Collection)
java.util.AbstractList.addAll(int, java.util.Collection)
java.util.AbstractQueue.addAll(java.util.Collection)
java.util.AbstractSequentialList.addAll(int, java.util.Collection)
java.util.ArrayList.addAll(int, java.util.Collection)
java.util.ArrayList.addAll(java.util.Collection)
java.util.Collection.addAll(java.util.Collection)
java.util.Collections.addAll(java.util.Collection, java.lang.Object:A)
java.util.Collections.addAll(java.util.Collection, T...)
java.util.concurrent.ConcurrentHashMap.KeySetView.addAll(java.util.Collection)
java.util.concurrent.ConcurrentLinkedDeque.addAll(java.util.Collection)
java.util.concurrent.ConcurrentLinkedQueue.addAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArrayList.addAll(int, java.util.Collection)
java.util.concurrent.CopyOnWriteArrayList.addAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArraySet.addAll(java.util.Collection)
java.util.LinkedList.addAll(int, java.util.Collection)
java.util.LinkedList.addAll(java.util.Collection)
java.util.List.addAll(int, java.util.Collection)
java.util.List.addAll(java.util.Collection)
java.util.Set.addAll(java.util.Collection)
java.util.TreeSet.addAll(java.util.Collection)
java.util.Vector.addAll(int, java.util.Collection)
java.util.Vector.addAll(java.util.Collection)
javax.accessibility.AccessibleRelationSet.addAll(javax.accessibility.AccessibleRelation:A)
javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState:A)
javax.management.AttributeList.addAll(int, java.util.Collection)
javax.management.AttributeList.addAll(int, javax.management.AttributeList)
javax.management.AttributeList.addAll(java.util.Collection)
javax.management.AttributeList.addAll(javax.management.AttributeList)
javax.management.relation.RoleList.addAll(int, java.util.Collection)
javax.management.relation.RoleList.addAll(int, javax.management.relation.RoleList)
javax.management.relation.RoleList.addAll(java.util.Collection)
javax.management.relation.RoleList.addAll(javax.management.relation.RoleList)
javax.management.relation.RoleUnresolvedList.addAll(int, java.util.Collection)
javax.management.relation.RoleUnresolvedList.addAll(int, javax.management.relation.RoleUnresolvedList)
javax.management.relation.RoleUnresolvedList.addAll(java.util.Collection)
javax.management.relation.RoleUnresolvedList.addAll(javax.management.relation.RoleUnresolvedList)
javax.naming.CompositeName.addAll(int, javax.naming.Name)
javax.naming.CompositeName.addAll(javax.naming.Name)
javax.naming.CompoundName.addAll(int, javax.naming.Name)
javax.naming.CompoundName.addAll(javax.naming.Name)
javax.naming.ldap.LdapName.addAll(int, java.util.List)
javax.naming.ldap.LdapName.addAll(int, javax.naming.Name)
javax.naming.ldap.LdapName.addAll(java.util.List)
javax.naming.ldap.LdapName.addAll(javax.naming.Name)
javax.naming.Name.addAll(int, javax.naming.Name)
javax.naming.Name.addAll(javax.naming.Name)
javax.print.attribute.AttributeSet.addAll(javax.print.attribute.AttributeSet)
javax.print.attribute.DocAttributeSet.addAll(javax.print.attribute.AttributeSet)
javax.print.attribute.HashAttributeSet.addAll(javax.print.attribute.AttributeSet)
javax.print.attribute.PrintJobAttributeSet.addAll(javax.print.attribute.AttributeSet)
javax.print.attribute.PrintRequestAttributeSet.addAll(javax.print.attribute.AttributeSet)
javax.print.attribute.PrintServiceAttributeSet.addAll(javax.print.attribute.AttributeSet)


Occurences of addAndGet

addAndGet occurences:
java.util.concurrent.atomic.AtomicInteger.addAndGet(int)
java.util.concurrent.atomic.AtomicIntegerArray.addAndGet(int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.addAndGet(java.lang.Object, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.addAndGet(T, int)
java.util.concurrent.atomic.AtomicLong.addAndGet(long)
java.util.concurrent.atomic.AtomicLongArray.addAndGet(int, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.addAndGet(java.lang.Object, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.addAndGet(T, long)


Occurences of addAttribute

addAttribute occurences:
java.text.AttributedString.addAttribute(java.text.AttributedCharacterIterator.Attribute, java.lang.Object)
java.text.AttributedString.addAttribute(java.text.AttributedCharacterIterator.Attribute, java.lang.Object, int, int)
javax.imageio.metadata.IIOMetadataFormatImpl.addAttribute(java.lang.String, java.lang.String, int, boolean, int, int)
javax.imageio.metadata.IIOMetadataFormatImpl.addAttribute(java.lang.String, java.lang.String, int, boolean, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.addAttribute(java.lang.String, java.lang.String, int, boolean, java.lang.String, java.lang.String, java.lang.String, boolean, boolean)
javax.imageio.metadata.IIOMetadataFormatImpl.addAttribute(java.lang.String, java.lang.String, int, boolean, java.lang.String, java.util.List)
javax.swing.text.AbstractDocument.AbstractElement.addAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.AbstractDocument.AttributeContext.addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)
javax.swing.text.html.StyleSheet.addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)
javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.SimpleAttributeSet.addAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.StyleContext.addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)
javax.swing.text.StyleContext.NamedStyle.addAttribute(java.lang.Object, java.lang.Object)
javax.xml.soap.SOAPElement.addAttribute(javax.xml.namespace.QName, java.lang.String)
javax.xml.soap.SOAPElement.addAttribute(javax.xml.soap.Name, java.lang.String)
org.xml.sax.ext.Attributes2Impl.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributeListImpl.addAttribute(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributesImpl.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of addAttributeChangeNotificationListener

addAttributeChangeNotificationListener occurences:
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.addAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String, java.lang.Object)
javax.management.modelmbean.RequiredModelMBean.addAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String, java.lang.Object)


Occurences of addAttributes

addAttributes occurences:
java.text.AttributedString.addAttributes(java.util.Map, int, int)
javax.swing.text.AbstractDocument.AbstractElement.addAttributes(javax.swing.text.AttributeSet)
javax.swing.text.AbstractDocument.AttributeContext.addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.html.StyleSheet.addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet)
javax.swing.text.SimpleAttributeSet.addAttributes(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.NamedStyle.addAttributes(javax.swing.text.AttributeSet)


Occurences of addBatch

addBatch occurences:
java.sql.PreparedStatement.addBatch()
java.sql.Statement.addBatch(java.lang.String)


Occurences of addBeanContextMembershipListener

addBeanContextMembershipListener occurences:
java.beans.beancontext.BeanContext.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
java.beans.beancontext.BeanContextSupport.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)


Occurences of addBeanContextServicesListener

addBeanContextServicesListener occurences:
java.beans.beancontext.BeanContextServices.addBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
java.beans.beancontext.BeanContextServicesSupport.addBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)


Occurences of addBodyElement

addBodyElement occurences:
javax.xml.soap.SOAPBody.addBodyElement(javax.xml.namespace.QName)
javax.xml.soap.SOAPBody.addBodyElement(javax.xml.soap.Name)


Occurences of addCellEditorListener

addCellEditorListener occurences:
javax.swing.AbstractCellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)
javax.swing.CellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)
javax.swing.tree.DefaultTreeCellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)


Occurences of addChangeListener

addChangeListener occurences:
javax.swing.AbstractButton.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.AbstractSpinnerModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.ButtonModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.colorchooser.ColorSelectionModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.colorchooser.DefaultColorSelectionModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultBoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultButtonModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultSingleSelectionModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.JProgressBar.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.JSlider.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.JSpinner.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.JTabbedPane.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.MenuSelectionManager.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.SingleSelectionModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.SpinnerModel.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.Caret.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.DefaultCaret.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.Style.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.StyleContext.addChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.StyleContext.NamedStyle.addChangeListener(javax.swing.event.ChangeListener)


Occurences of addChildElement

addChildElement occurences:
javax.imageio.metadata.IIOMetadataFormatImpl.addChildElement(java.lang.String, java.lang.String)
javax.xml.soap.SOAPElement.addChildElement(java.lang.String)
javax.xml.soap.SOAPElement.addChildElement(java.lang.String, java.lang.String)
javax.xml.soap.SOAPElement.addChildElement(java.lang.String, java.lang.String, java.lang.String)
javax.xml.soap.SOAPElement.addChildElement(javax.xml.namespace.QName)
javax.xml.soap.SOAPElement.addChildElement(javax.xml.soap.Name)
javax.xml.soap.SOAPElement.addChildElement(javax.xml.soap.SOAPElement)


Occurences of addClassExclusionFilter

addClassExclusionFilter occurences:
com.sun.jdi.request.ClassPrepareRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.ClassUnloadRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.ExceptionRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MethodEntryRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MethodExitRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MonitorContendedEnteredRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MonitorContendedEnterRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MonitorWaitedRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.MonitorWaitRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.StepRequest.addClassExclusionFilter(java.lang.String)
com.sun.jdi.request.WatchpointRequest.addClassExclusionFilter(java.lang.String)


Occurences of addClassFilter

addClassFilter occurences:
com.sun.jdi.request.ClassPrepareRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.ClassPrepareRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.ClassUnloadRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.ExceptionRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.ExceptionRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MethodEntryRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MethodEntryRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MethodExitRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MethodExitRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MonitorContendedEnteredRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MonitorContendedEnteredRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MonitorContendedEnterRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MonitorContendedEnterRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MonitorWaitedRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MonitorWaitedRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.MonitorWaitRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.MonitorWaitRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.StepRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.StepRequest.addClassFilter(java.lang.String)
com.sun.jdi.request.WatchpointRequest.addClassFilter(com.sun.jdi.ReferenceType)
com.sun.jdi.request.WatchpointRequest.addClassFilter(java.lang.String)


Occurences of addColumn

addColumn occurences:
javax.swing.JTable.addColumn(javax.swing.table.TableColumn)
javax.swing.table.DefaultTableColumnModel.addColumn(javax.swing.table.TableColumn)
javax.swing.table.DefaultTableModel.addColumn(java.lang.Object)
javax.swing.table.DefaultTableModel.addColumn(java.lang.Object, java.lang.Object:A)
javax.swing.table.DefaultTableModel.addColumn(java.lang.Object, java.util.Vector)
javax.swing.table.TableColumnModel.addColumn(javax.swing.table.TableColumn)


Occurences of addColumnModelListener

addColumnModelListener occurences:
javax.swing.table.DefaultTableColumnModel.addColumnModelListener(javax.swing.event.TableColumnModelListener)
javax.swing.table.TableColumnModel.addColumnModelListener(javax.swing.event.TableColumnModelListener)


Occurences of addComponent

addComponent occurences:
javax.swing.GroupLayout.Group.addComponent(java.awt.Component)
javax.swing.GroupLayout.Group.addComponent(java.awt.Component, int, int, int)
javax.swing.GroupLayout.ParallelGroup.addComponent(java.awt.Component)
javax.swing.GroupLayout.ParallelGroup.addComponent(java.awt.Component, int, int, int)
javax.swing.GroupLayout.ParallelGroup.addComponent(java.awt.Component, javax.swing.GroupLayout.Alignment)
javax.swing.GroupLayout.ParallelGroup.addComponent(java.awt.Component, javax.swing.GroupLayout.Alignment, int, int, int)
javax.swing.GroupLayout.SequentialGroup.addComponent(boolean, java.awt.Component)
javax.swing.GroupLayout.SequentialGroup.addComponent(boolean, java.awt.Component, int, int, int)
javax.swing.GroupLayout.SequentialGroup.addComponent(java.awt.Component)
javax.swing.GroupLayout.SequentialGroup.addComponent(java.awt.Component, int, int, int)


Occurences of addConnectionNotificationListener

addConnectionNotificationListener occurences:
javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.remote.rmi.RMIConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)


Occurences of addConsumer

addConsumer occurences:
java.awt.image.FilteredImageSource.addConsumer(java.awt.image.ImageConsumer)
java.awt.image.ImageProducer.addConsumer(java.awt.image.ImageConsumer)
java.awt.image.MemoryImageSource.addConsumer(java.awt.image.ImageConsumer)
java.awt.image.renderable.RenderableImageProducer.addConsumer(java.awt.image.ImageConsumer)


Occurences of addContainerGap

addContainerGap occurences:
javax.swing.GroupLayout.SequentialGroup.addContainerGap()
javax.swing.GroupLayout.SequentialGroup.addContainerGap(int, int)


Occurences of addContent

addContent occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.addContent(char:A, int, int)
javax.swing.text.html.HTMLDocument.HTMLReader.addContent(char:A, int, int, boolean)


Occurences of addCustomEntriesToTable

addCustomEntriesToTable occurences:
javax.swing.plaf.metal.MetalTheme.addCustomEntriesToTable(javax.swing.UIDefaults)
javax.swing.plaf.metal.OceanTheme.addCustomEntriesToTable(javax.swing.UIDefaults)


Occurences of addDetailEntry

addDetailEntry occurences:
javax.xml.soap.Detail.addDetailEntry(javax.xml.namespace.QName)
javax.xml.soap.Detail.addDetailEntry(javax.xml.soap.Name)


Occurences of addDirtyRegion

addDirtyRegion occurences:
javax.swing.RepaintManager.addDirtyRegion(java.applet.Applet, int, int, int, int)
javax.swing.RepaintManager.addDirtyRegion(java.awt.Window, int, int, int, int)
javax.swing.RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)


Occurences of addDocumentListener

addDocumentListener occurences:
javax.swing.text.AbstractDocument.addDocumentListener(javax.swing.event.DocumentListener)
javax.swing.text.DefaultStyledDocument.addDocumentListener(javax.swing.event.DocumentListener)
javax.swing.text.Document.addDocumentListener(javax.swing.event.DocumentListener)


Occurences of addDragSourceListener

addDragSourceListener occurences:
java.awt.dnd.DragSource.addDragSourceListener(java.awt.dnd.DragSourceListener)
java.awt.dnd.DragSourceContext.addDragSourceListener(java.awt.dnd.DragSourceListener)


Occurences of addEdit

addEdit occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.addEdit(javax.swing.undo.UndoableEdit)
javax.swing.undo.AbstractUndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
javax.swing.undo.CompoundEdit.addEdit(javax.swing.undo.UndoableEdit)
javax.swing.undo.UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
javax.swing.undo.UndoManager.addEdit(javax.swing.undo.UndoableEdit)


Occurences of addElement

addElement occurences:
java.util.Vector.addElement(E)
java.util.Vector.addElement(java.lang.Object)
javax.imageio.metadata.IIOMetadataFormatImpl.addElement(java.lang.String, java.lang.String, int)
javax.imageio.metadata.IIOMetadataFormatImpl.addElement(java.lang.String, java.lang.String, int, int)
javax.swing.DefaultComboBoxModel.addElement(E)
javax.swing.DefaultComboBoxModel.addElement(java.lang.Object)
javax.swing.DefaultListModel.addElement(E)
javax.swing.DefaultListModel.addElement(java.lang.Object)
javax.swing.MutableComboBoxModel.addElement(E)
javax.swing.MutableComboBoxModel.addElement(java.lang.Object)


Occurences of addExact

addExact occurences:
java.lang.Math.addExact(int, int)
java.lang.Math.addExact(long, long)
java.lang.StrictMath.addExact(int, int)
java.lang.StrictMath.addExact(long, long)


Occurences of addFault

addFault occurences:
javax.xml.soap.SOAPBody.addFault()
javax.xml.soap.SOAPBody.addFault(javax.xml.namespace.QName, java.lang.String)
javax.xml.soap.SOAPBody.addFault(javax.xml.namespace.QName, java.lang.String, java.util.Locale)
javax.xml.soap.SOAPBody.addFault(javax.xml.soap.Name, java.lang.String)
javax.xml.soap.SOAPBody.addFault(javax.xml.soap.Name, java.lang.String, java.util.Locale)


Occurences of addFirst

addFirst occurences:
java.util.ArrayDeque.addFirst(E)
java.util.ArrayDeque.addFirst(java.lang.Object)
java.util.concurrent.BlockingDeque.addFirst(E)
java.util.concurrent.BlockingDeque.addFirst(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.addFirst(E)
java.util.concurrent.ConcurrentLinkedDeque.addFirst(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.addFirst(E)
java.util.concurrent.LinkedBlockingDeque.addFirst(java.lang.Object)
java.util.Deque.addFirst(E)
java.util.Deque.addFirst(java.lang.Object)
java.util.LinkedList.addFirst(E)
java.util.LinkedList.addFirst(java.lang.Object)


Occurences of addFocusListener

addFocusListener occurences:
java.awt.Component.addFocusListener(java.awt.event.FocusListener)
java.awt.Component.AccessibleAWTComponent.addFocusListener(java.awt.event.FocusListener)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.addFocusListener(java.awt.event.FocusListener)
java.awt.MenuComponent.AccessibleAWTMenuComponent.addFocusListener(java.awt.event.FocusListener)
javax.accessibility.AccessibleComponent.addFocusListener(java.awt.event.FocusListener)
javax.swing.JList.AccessibleJList.AccessibleJListChild.addFocusListener(java.awt.event.FocusListener)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.addFocusListener(java.awt.event.FocusListener)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.addFocusListener(java.awt.event.FocusListener)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.addFocusListener(java.awt.event.FocusListener)


Occurences of addGap

addGap occurences:
javax.swing.GroupLayout.Group.addGap(int)
javax.swing.GroupLayout.Group.addGap(int, int, int)
javax.swing.GroupLayout.ParallelGroup.addGap(int)
javax.swing.GroupLayout.ParallelGroup.addGap(int, int, int)
javax.swing.GroupLayout.SequentialGroup.addGap(int)
javax.swing.GroupLayout.SequentialGroup.addGap(int, int, int)


Occurences of addGroup

addGroup occurences:
javax.swing.GroupLayout.Group.addGroup(javax.swing.GroupLayout.Group)
javax.swing.GroupLayout.ParallelGroup.addGroup(javax.swing.GroupLayout.Alignment, javax.swing.GroupLayout.Group)
javax.swing.GroupLayout.ParallelGroup.addGroup(javax.swing.GroupLayout.Group)
javax.swing.GroupLayout.SequentialGroup.addGroup(boolean, javax.swing.GroupLayout.Group)
javax.swing.GroupLayout.SequentialGroup.addGroup(javax.swing.GroupLayout.Group)


Occurences of addHeader

addHeader occurences:
javax.xml.soap.MimeHeaders.addHeader(java.lang.String, java.lang.String)
javax.xml.soap.SOAPEnvelope.addHeader()


Occurences of addHeaderElement

addHeaderElement occurences:
javax.xml.soap.SOAPHeader.addHeaderElement(javax.xml.namespace.QName)
javax.xml.soap.SOAPHeader.addHeaderElement(javax.xml.soap.Name)


Occurences of addHighlight

addHighlight occurences:
javax.swing.text.DefaultHighlighter.addHighlight(int, int, javax.swing.text.Highlighter.HighlightPainter)
javax.swing.text.Highlighter.addHighlight(int, int, javax.swing.text.Highlighter.HighlightPainter)


Occurences of addIfAbsent

addIfAbsent occurences:
java.util.concurrent.CopyOnWriteArrayList.addIfAbsent(E)
java.util.concurrent.CopyOnWriteArrayList.addIfAbsent(java.lang.Object)


Occurences of addImage

addImage occurences:
java.awt.MediaTracker.addImage(java.awt.Image, int)
java.awt.MediaTracker.addImage(java.awt.Image, int, int, int)


Occurences of addImpl

addImpl occurences:
java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int)
java.awt.ScrollPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.AbstractButton.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.CellRendererPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JApplet.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JDesktopPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JDialog.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JFrame.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JInternalFrame.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JLayer.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JLayeredPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JRootPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JSplitPane.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JToolBar.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JViewport.addImpl(java.awt.Component, java.lang.Object, int)
javax.swing.JWindow.addImpl(java.awt.Component, java.lang.Object, int)


Occurences of addInputMethodListener

addInputMethodListener occurences:
java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener)
javax.swing.text.JTextComponent.addInputMethodListener(java.awt.event.InputMethodListener)


Occurences of addInstanceFilter

addInstanceFilter occurences:
com.sun.jdi.request.BreakpointRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.ExceptionRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MethodEntryRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MethodExitRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MonitorContendedEnteredRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MonitorContendedEnterRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MonitorWaitedRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.MonitorWaitRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.StepRequest.addInstanceFilter(com.sun.jdi.ObjectReference)
com.sun.jdi.request.WatchpointRequest.addInstanceFilter(com.sun.jdi.ObjectReference)


Occurences of addIssuerName

addIssuerName occurences:
java.security.cert.X509CRLSelector.addIssuerName(byte:A)
java.security.cert.X509CRLSelector.addIssuerName(java.lang.String)


Occurences of addItem

addItem occurences:
java.awt.Choice.addItem(java.lang.String)
java.awt.List.addItem(java.lang.String)
java.awt.List.addItem(java.lang.String, int)
javax.swing.JComboBox.addItem(E)
javax.swing.JComboBox.addItem(java.lang.Object)


Occurences of addItemListener

addItemListener occurences:
java.awt.Checkbox.addItemListener(java.awt.event.ItemListener)
java.awt.CheckboxMenuItem.addItemListener(java.awt.event.ItemListener)
java.awt.Choice.addItemListener(java.awt.event.ItemListener)
java.awt.ItemSelectable.addItemListener(java.awt.event.ItemListener)
java.awt.List.addItemListener(java.awt.event.ItemListener)
javax.swing.AbstractButton.addItemListener(java.awt.event.ItemListener)
javax.swing.ButtonModel.addItemListener(java.awt.event.ItemListener)
javax.swing.DefaultButtonModel.addItemListener(java.awt.event.ItemListener)
javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener)


Occurences of addLast

addLast occurences:
java.util.ArrayDeque.addLast(E)
java.util.ArrayDeque.addLast(java.lang.Object)
java.util.concurrent.BlockingDeque.addLast(E)
java.util.concurrent.BlockingDeque.addLast(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.addLast(E)
java.util.concurrent.ConcurrentLinkedDeque.addLast(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.addLast(E)
java.util.concurrent.LinkedBlockingDeque.addLast(java.lang.Object)
java.util.Deque.addLast(E)
java.util.Deque.addLast(java.lang.Object)
java.util.LinkedList.addLast(E)
java.util.LinkedList.addLast(java.lang.Object)


Occurences of addLayoutComponent

addLayoutComponent occurences:
java.awt.BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
java.awt.BorderLayout.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.CardLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
java.awt.CardLayout.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.FlowLayout.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.GridBagLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
java.awt.GridBagLayout.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.GridLayout.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.LayoutManager.addLayoutComponent(java.lang.String, java.awt.Component)
java.awt.LayoutManager2.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.BoxLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.BoxLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.GroupLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.GroupLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.JRootPane.RootLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.JRootPane.RootLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.JSpinner.DefaultEditor.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.OverlayLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.OverlayLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicScrollBarUI.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.ScrollPaneLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.SpringLayout.addLayoutComponent(java.awt.Component, java.lang.Object)
javax.swing.SpringLayout.addLayoutComponent(java.lang.String, java.awt.Component)
javax.swing.ViewportLayout.addLayoutComponent(java.lang.String, java.awt.Component)


Occurences of addListDataListener

addListDataListener occurences:
javax.swing.AbstractListModel.addListDataListener(javax.swing.event.ListDataListener)
javax.swing.ListModel.addListDataListener(javax.swing.event.ListDataListener)


Occurences of addListSelectionListener

addListSelectionListener occurences:
javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
javax.swing.JList.addListSelectionListener(javax.swing.event.ListSelectionListener)
javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)


Occurences of addMenuKeyListener

addMenuKeyListener occurences:
javax.swing.JMenuItem.addMenuKeyListener(javax.swing.event.MenuKeyListener)
javax.swing.JPopupMenu.addMenuKeyListener(javax.swing.event.MenuKeyListener)


Occurences of addMimeHeader

addMimeHeader occurences:
javax.xml.soap.AttachmentPart.addMimeHeader(java.lang.String, java.lang.String)
javax.xml.soap.SOAPPart.addMimeHeader(java.lang.String, java.lang.String)


Occurences of addMouseListener

addMouseListener occurences:
java.awt.Component.addMouseListener(java.awt.event.MouseListener)
java.awt.TrayIcon.addMouseListener(java.awt.event.MouseListener)


Occurences of addMouseMotionListener

addMouseMotionListener occurences:
java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener)
java.awt.TrayIcon.addMouseMotionListener(java.awt.event.MouseMotionListener)


Occurences of addMtomAttachment

addMtomAttachment occurences:
javax.xml.bind.attachment.AttachmentMarshaller.addMtomAttachment(byte:A, int, int, java.lang.String, java.lang.String, java.lang.String)
javax.xml.bind.attachment.AttachmentMarshaller.addMtomAttachment(javax.activation.DataHandler, java.lang.String, java.lang.String)


Occurences of addNamingListener

addNamingListener occurences:
javax.naming.event.EventContext.addNamingListener(java.lang.String, int, javax.naming.event.NamingListener)
javax.naming.event.EventContext.addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener)
javax.naming.event.EventDirContext.addNamingListener(java.lang.String, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls, javax.naming.event.NamingListener)
javax.naming.event.EventDirContext.addNamingListener(java.lang.String, java.lang.String, javax.naming.directory.SearchControls, javax.naming.event.NamingListener)
javax.naming.event.EventDirContext.addNamingListener(javax.naming.Name, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls, javax.naming.event.NamingListener)
javax.naming.event.EventDirContext.addNamingListener(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls, javax.naming.event.NamingListener)


Occurences of addNodeChangeListener

addNodeChangeListener occurences:
java.util.prefs.AbstractPreferences.addNodeChangeListener(java.util.prefs.NodeChangeListener)
java.util.prefs.Preferences.addNodeChangeListener(java.util.prefs.NodeChangeListener)


Occurences of addNotification

addNotification occurences:
javax.management.timer.Timer.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date)
javax.management.timer.Timer.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long)
javax.management.timer.Timer.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long)
javax.management.timer.Timer.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)
javax.management.timer.TimerMBean.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date)
javax.management.timer.TimerMBean.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long)
javax.management.timer.TimerMBean.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long)
javax.management.timer.TimerMBean.addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)


Occurences of addNotificationListener

addNotificationListener occurences:
javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerDelegate.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.modelmbean.RequiredModelMBean.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.remote.rmi.RMIConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.StandardEmitterMBean.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)


Occurences of addNotificationListeners

addNotificationListeners occurences:
javax.management.remote.rmi.RMIConnection.addNotificationListeners(javax.management.ObjectName:A, java.rmi.MarshalledObject:A, javax.security.auth.Subject:A)
javax.management.remote.rmi.RMIConnectionImpl.addNotificationListeners(javax.management.ObjectName:A, java.rmi.MarshalledObject:A, javax.security.auth.Subject:A)
javax.management.remote.rmi.RMIConnectionImpl_Stub.addNotificationListeners(javax.management.ObjectName:A, java.rmi.MarshalledObject:A, javax.security.auth.Subject:A)


Occurences of addNotify

addNotify occurences:
java.awt.Button.addNotify()
java.awt.Canvas.addNotify()
java.awt.Checkbox.addNotify()
java.awt.CheckboxMenuItem.addNotify()
java.awt.Choice.addNotify()
java.awt.Component.addNotify()
java.awt.Container.addNotify()
java.awt.Dialog.addNotify()
java.awt.dnd.DropTarget.addNotify(java.awt.peer.ComponentPeer)
java.awt.dnd.DropTargetContext.addNotify(java.awt.dnd.peer.DropTargetContextPeer)
java.awt.FileDialog.addNotify()
java.awt.Frame.addNotify()
java.awt.Label.addNotify()
java.awt.List.addNotify()
java.awt.Menu.addNotify()
java.awt.MenuBar.addNotify()
java.awt.MenuItem.addNotify()
java.awt.Panel.addNotify()
java.awt.PopupMenu.addNotify()
java.awt.Scrollbar.addNotify()
java.awt.ScrollPane.addNotify()
java.awt.TextArea.addNotify()
java.awt.TextComponent.addNotify()
java.awt.TextField.addNotify()
java.awt.Window.addNotify()
javax.swing.JComponent.addNotify()
javax.swing.JLayer.addNotify()
javax.swing.JMenuBar.addNotify()
javax.swing.JRootPane.addNotify()
javax.swing.JTable.addNotify()
javax.swing.JViewport.addNotify()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.addNotify()


Occurences of addObjectValue

addObjectValue occurences:
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, boolean, java.lang.Object)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, boolean, java.lang.Object, java.util.List)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, boolean, T)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, boolean, T, java.util.List)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, int, int)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, java.lang.Object, java.lang.Comparable, java.lang.Comparable, boolean, boolean)
javax.imageio.metadata.IIOMetadataFormatImpl.addObjectValue(java.lang.String, java.lang.Class, T, java.lang.Comparable, java.lang.Comparable, boolean, boolean)


Occurences of addObservedObject

addObservedObject occurences:
javax.management.monitor.Monitor.addObservedObject(javax.management.ObjectName)
javax.management.monitor.MonitorMBean.addObservedObject(javax.management.ObjectName)


Occurences of addPathToName

addPathToName occurences:
java.security.cert.X509CertSelector.addPathToName(int, byte:A)
java.security.cert.X509CertSelector.addPathToName(int, java.lang.String)


Occurences of addPopupMenuListener

addPopupMenuListener occurences:
javax.swing.JComboBox.addPopupMenuListener(javax.swing.event.PopupMenuListener)
javax.swing.JPopupMenu.addPopupMenuListener(javax.swing.event.PopupMenuListener)


Occurences of addPort

addPort occurences:
javax.xml.ws.Service.addPort(javax.xml.namespace.QName, java.lang.String, java.lang.String)
javax.xml.ws.spi.ServiceDelegate.addPort(javax.xml.namespace.QName, java.lang.String, java.lang.String)


Occurences of addPreferenceChangeListener

addPreferenceChangeListener occurences:
java.util.prefs.AbstractPreferences.addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener)
java.util.prefs.Preferences.addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener)


Occurences of addPreferredGap

addPreferredGap occurences:
javax.swing.GroupLayout.SequentialGroup.addPreferredGap(javax.swing.JComponent, javax.swing.JComponent, javax.swing.LayoutStyle.ComponentPlacement)
javax.swing.GroupLayout.SequentialGroup.addPreferredGap(javax.swing.JComponent, javax.swing.JComponent, javax.swing.LayoutStyle.ComponentPlacement, int, int)
javax.swing.GroupLayout.SequentialGroup.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement)
javax.swing.GroupLayout.SequentialGroup.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement, int, int)


Occurences of addPropertyChangeListener

addPropertyChangeListener occurences:
com.sun.tools.jconsole.JConsoleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Component.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Component.AccessibleAWTComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Container.AccessibleAWTContainer.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.SystemTray.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Toolkit.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.beancontext.BeanContextChild.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.beancontext.BeanContextChildSupport.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.Customizer.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyChangeSupport.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.PropertyEditor.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyEditorSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.util.jar.Pack200.Packer.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.util.jar.Pack200.Unpacker.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.util.logging.LogManager.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.accessibility.AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.AbstractAction.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.Action.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JComponent.AccessibleJComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JList.AccessibleJList.AccessibleJListChild.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTree.EmptySelectionModel.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.LayerUI.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.LayerUI.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
javax.swing.SwingWorker.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.table.TableColumn.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.tree.DefaultTreeSelectionModel.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.tree.TreeSelectionModel.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.UIDefaults.addPropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.UIManager.addPropertyChangeListener(java.beans.PropertyChangeListener)


Occurences of addRelation

addRelation occurences:
javax.management.relation.RelationService.addRelation(javax.management.ObjectName)
javax.management.relation.RelationServiceMBean.addRelation(javax.management.ObjectName)


Occurences of addRelationType

addRelationType occurences:
javax.management.relation.RelationService.addRelationType(javax.management.relation.RelationType)
javax.management.relation.RelationServiceMBean.addRelationType(javax.management.relation.RelationType)


Occurences of address

address occurences:
com.sun.jdi.connect.spi.TransportService.ListenKey.address()
java.net.address
java.net.Proxy.address()
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.address(java.lang.String)


Occurences of AddressingFeature (constructors)

AddressingFeature (constructors) occurences:
javax.xml.ws.soap.AddressingFeature()
javax.xml.ws.soap.AddressingFeature(boolean)
javax.xml.ws.soap.AddressingFeature(boolean, boolean)
javax.xml.ws.soap.AddressingFeature(boolean, boolean, javax.xml.ws.soap.AddressingFeature.Responses)


Occurences of addRow

addRow occurences:
javax.swing.table.DefaultTableModel.addRow(java.lang.Object:A)
javax.swing.table.DefaultTableModel.addRow(java.util.Vector)


Occurences of addRowSet

addRowSet occurences:
javax.sql.rowset.JoinRowSet.addRowSet(javax.sql.RowSet, int)
javax.sql.rowset.JoinRowSet.addRowSet(javax.sql.RowSet, java.lang.String)
javax.sql.rowset.JoinRowSet.addRowSet(javax.sql.rowset.Joinable)
javax.sql.rowset.JoinRowSet.addRowSet(javax.sql.RowSet:A, int:A)
javax.sql.rowset.JoinRowSet.addRowSet(javax.sql.RowSet:A, java.lang.String:A)


Occurences of addRowSetListener

addRowSetListener occurences:
javax.sql.RowSet.addRowSetListener(javax.sql.RowSetListener)
javax.sql.rowset.BaseRowSet.addRowSetListener(javax.sql.RowSetListener)


Occurences of addSelectionInterval

addSelectionInterval occurences:
javax.swing.DefaultListSelectionModel.addSelectionInterval(int, int)
javax.swing.JList.addSelectionInterval(int, int)
javax.swing.JTree.addSelectionInterval(int, int)
javax.swing.ListSelectionModel.addSelectionInterval(int, int)


Occurences of addSelectionPath

addSelectionPath occurences:
javax.swing.JTree.addSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.DefaultTreeSelectionModel.addSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.TreeSelectionModel.addSelectionPath(javax.swing.tree.TreePath)


Occurences of addSelectionPaths

addSelectionPaths occurences:
javax.swing.JTree.addSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.JTree.EmptySelectionModel.addSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.DefaultTreeSelectionModel.addSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.TreeSelectionModel.addSelectionPaths(javax.swing.tree.TreePath:A)


Occurences of addSeparator

addSeparator occurences:
java.awt.Menu.addSeparator()
javax.swing.JMenu.addSeparator()
javax.swing.JPopupMenu.addSeparator()
javax.swing.JToolBar.addSeparator()
javax.swing.JToolBar.addSeparator(java.awt.Dimension)


Occurences of addService

addService occurences:
java.beans.beancontext.BeanContextServices.addService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider)
java.beans.beancontext.BeanContextServicesSupport.addService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider)
java.beans.beancontext.BeanContextServicesSupport.addService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider, boolean)


Occurences of addSource

addSource occurences:
java.awt.image.renderable.ParameterBlock.addSource(java.lang.Object)
org.w3c.dom.bootstrap.DOMImplementationRegistry.addSource(org.w3c.dom.DOMImplementationSource)


Occurences of addStyle

addStyle occurences:
javax.swing.JTextPane.addStyle(java.lang.String, javax.swing.text.Style)
javax.swing.text.DefaultStyledDocument.addStyle(java.lang.String, javax.swing.text.Style)
javax.swing.text.StyleContext.addStyle(java.lang.String, javax.swing.text.Style)
javax.swing.text.StyledDocument.addStyle(java.lang.String, javax.swing.text.Style)


Occurences of addSubComponents

addSubComponents occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSubComponents()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.addSubComponents()


Occurences of addSubjectAlternativeName

addSubjectAlternativeName occurences:
java.security.cert.X509CertSelector.addSubjectAlternativeName(int, byte:A)
java.security.cert.X509CertSelector.addSubjectAlternativeName(int, java.lang.String)


Occurences of addSystemMenuItems

addSystemMenuItems occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSystemMenuItems(javax.swing.JMenu)
javax.swing.plaf.metal.MetalInternalFrameTitlePane.addSystemMenuItems(javax.swing.JMenu)


Occurences of addTab

addTab occurences:
javax.swing.JTabbedPane.addTab(java.lang.String, java.awt.Component)
javax.swing.JTabbedPane.addTab(java.lang.String, javax.swing.Icon, java.awt.Component)
javax.swing.JTabbedPane.addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)


Occurences of addTableModelListener

addTableModelListener occurences:
javax.swing.table.AbstractTableModel.addTableModelListener(javax.swing.event.TableModelListener)
javax.swing.table.TableModel.addTableModelListener(javax.swing.event.TableModelListener)


Occurences of addThreadFilter

addThreadFilter occurences:
com.sun.jdi.request.BreakpointRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.ExceptionRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MethodEntryRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MethodExitRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MonitorContendedEnteredRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MonitorContendedEnterRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MonitorWaitedRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.MonitorWaitRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.ThreadDeathRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.ThreadStartRequest.addThreadFilter(com.sun.jdi.ThreadReference)
com.sun.jdi.request.WatchpointRequest.addThreadFilter(com.sun.jdi.ThreadReference)


Occurences of addTileObserver

addTileObserver occurences:
java.awt.image.BufferedImage.addTileObserver(java.awt.image.TileObserver)
java.awt.image.WritableRenderedImage.addTileObserver(java.awt.image.TileObserver)


Occurences of addTo

addTo occurences:
java.time.chrono.ChronoPeriod.addTo(java.time.temporal.Temporal)
java.time.Duration.addTo(java.time.temporal.Temporal)
java.time.Period.addTo(java.time.temporal.Temporal)
java.time.temporal.ChronoUnit.addTo(java.time.temporal.Temporal, long)
java.time.temporal.ChronoUnit.addTo(R, long)
java.time.temporal.TemporalAmount.addTo(java.time.temporal.Temporal)
java.time.temporal.TemporalUnit.addTo(java.time.temporal.Temporal, long)
java.time.temporal.TemporalUnit.addTo(R, long)
javax.xml.datatype.Duration.addTo(java.util.Calendar)
javax.xml.datatype.Duration.addTo(java.util.Date)


Occurences of addToEnvironment

addToEnvironment occurences:
javax.naming.Context.addToEnvironment(java.lang.String, java.lang.Object)
javax.naming.InitialContext.addToEnvironment(java.lang.String, java.lang.Object)


Occurences of addTransformer

addTransformer occurences:
java.lang.instrument.Instrumentation.addTransformer(java.lang.instrument.ClassFileTransformer)
java.lang.instrument.Instrumentation.addTransformer(java.lang.instrument.ClassFileTransformer, boolean)


Occurences of addTreeModelListener

addTreeModelListener occurences:
javax.swing.tree.DefaultTreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)
javax.swing.tree.TreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)


Occurences of addTreeSelectionListener

addTreeSelectionListener occurences:
javax.swing.JTree.addTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.JTree.EmptySelectionModel.addTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.tree.DefaultTreeSelectionModel.addTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.tree.TreeSelectionModel.addTreeSelectionListener(javax.swing.event.TreeSelectionListener)


Occurences of addUndoableEditListener

addUndoableEditListener occurences:
javax.swing.text.AbstractDocument.addUndoableEditListener(javax.swing.event.UndoableEditListener)
javax.swing.text.Document.addUndoableEditListener(javax.swing.event.UndoableEditListener)
javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener)


Occurences of addUpgradeHeaderElement

addUpgradeHeaderElement occurences:
javax.xml.soap.SOAPHeader.addUpgradeHeaderElement(java.lang.String)
javax.xml.soap.SOAPHeader.addUpgradeHeaderElement(java.lang.String:A)
javax.xml.soap.SOAPHeader.addUpgradeHeaderElement(java.util.Iterator)


Occurences of addURL

addURL occurences:
java.net.URLClassLoader.addURL(java.net.URL)
javax.management.loading.MLet.addURL(java.lang.String)
javax.management.loading.MLet.addURL(java.net.URL)
javax.management.loading.MLetMBean.addURL(java.lang.String)
javax.management.loading.MLetMBean.addURL(java.net.URL)


Occurences of addVetoableChangeListener

addVetoableChangeListener occurences:
java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener)
java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.beancontext.BeanContextChild.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.beancontext.BeanContextChildSupport.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.VetoableChangeSupport.addVetoableChangeListener(java.beans.VetoableChangeListener)
java.beans.VetoableChangeSupport.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener)


Occurences of adjustInto

adjustInto occurences:
java.time.chrono.ChronoLocalDate.adjustInto(java.time.temporal.Temporal)
java.time.chrono.ChronoLocalDateTime.adjustInto(java.time.temporal.Temporal)
java.time.chrono.Era.adjustInto(java.time.temporal.Temporal)
java.time.DayOfWeek.adjustInto(java.time.temporal.Temporal)
java.time.Instant.adjustInto(java.time.temporal.Temporal)
java.time.LocalDate.adjustInto(java.time.temporal.Temporal)
java.time.LocalDateTime.adjustInto(java.time.temporal.Temporal)
java.time.LocalTime.adjustInto(java.time.temporal.Temporal)
java.time.Month.adjustInto(java.time.temporal.Temporal)
java.time.MonthDay.adjustInto(java.time.temporal.Temporal)
java.time.OffsetDateTime.adjustInto(java.time.temporal.Temporal)
java.time.OffsetTime.adjustInto(java.time.temporal.Temporal)
java.time.temporal.ChronoField.adjustInto(java.time.temporal.Temporal, long)
java.time.temporal.ChronoField.adjustInto(R, long)
java.time.temporal.TemporalAdjuster.adjustInto(java.time.temporal.Temporal)
java.time.temporal.TemporalField.adjustInto(java.time.temporal.Temporal, long)
java.time.temporal.TemporalField.adjustInto(R, long)
java.time.Year.adjustInto(java.time.temporal.Temporal)
java.time.YearMonth.adjustInto(java.time.temporal.Temporal)
java.time.ZoneOffset.adjustInto(java.time.temporal.Temporal)


Occurences of AdjustmentEvent (constructors)

AdjustmentEvent (constructors) occurences:
java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int)
java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int, boolean)


Occurences of adjustmentValueChanged

adjustmentValueChanged occurences:
java.awt.AWTEventMulticaster.adjustmentValueChanged(java.awt.event.AdjustmentEvent)
java.awt.event.AdjustmentListener.adjustmentValueChanged(java.awt.event.AdjustmentEvent)


Occurences of Advanced JGSS Security Programming

Advanced JGSS Security Programming occurences:
Advanced JGSS Security Programming
Advanced JGSS Security Programming
Advanced JGSS Security Programming
Advanced JGSS Security Programming
Advanced JGSS Security Programming
Advanced JGSS Security Programming


Occurences of AEADBadTagException (constructors)

AEADBadTagException (constructors) occurences:
javax.crypto.AEADBadTagException()
javax.crypto.AEADBadTagException(java.lang.String)


Occurences of AffineTransform (constructors)

AffineTransform (constructors) occurences:
java.awt.geom.AffineTransform()
java.awt.geom.AffineTransform(double, double, double, double, double, double)
java.awt.geom.AffineTransform(double:A)
java.awt.geom.AffineTransform(float, float, float, float, float, float)
java.awt.geom.AffineTransform(float:A)
java.awt.geom.AffineTransform(java.awt.geom.AffineTransform)


Occurences of AffineTransformOp (constructors)

AffineTransformOp (constructors) occurences:
java.awt.image.AffineTransformOp(java.awt.geom.AffineTransform, int)
java.awt.image.AffineTransformOp(java.awt.geom.AffineTransform, java.awt.RenderingHints)


Occurences of after

after occurences:
java.sql.Timestamp.after(java.sql.Timestamp)
java.util.Calendar.after(java.lang.Object)
java.util.Date.after(java.util.Date)


Occurences of AgentInitializationException (constructors)

AgentInitializationException (constructors) occurences:
com.sun.tools.attach.AgentInitializationException()
com.sun.tools.attach.AgentInitializationException(java.lang.String)
com.sun.tools.attach.AgentInitializationException(java.lang.String, int)


Occurences of AgentLoadException (constructors)

AgentLoadException (constructors) occurences:
com.sun.tools.attach.AgentLoadException()
com.sun.tools.attach.AgentLoadException(java.lang.String)


Occurences of aliases

aliases occurences:
java.nio.charset.Charset.aliases()
java.security.KeyStore.aliases()


Occurences of ALIGN_CENTER

ALIGN_CENTER occurences:
javax.swing.text.ALIGN_CENTER
javax.swing.text.ALIGN_CENTER


Occurences of ALIGN_LEFT

ALIGN_LEFT occurences:
javax.swing.text.ALIGN_LEFT
javax.swing.text.ALIGN_LEFT


Occurences of ALIGN_RIGHT

ALIGN_RIGHT occurences:
javax.swing.text.ALIGN_RIGHT
javax.swing.text.ALIGN_RIGHT


Occurences of ALL

ALL occurences:
java.awt.ALL
java.util.logging.ALL
javax.xml.ws.soap.ALL


Occurences of All Classes

All Classes occurences:
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes
All Classes


Occurences of allClasses

allClasses occurences:
com.sun.javadoc.PackageDoc.allClasses()
com.sun.javadoc.PackageDoc.allClasses(boolean)
com.sun.jdi.VirtualMachine.allClasses()


Occurences of allKeys

allKeys occurences:
javax.swing.ActionMap.allKeys()
javax.swing.InputMap.allKeys()


Occurences of allLineLocations

allLineLocations occurences:
com.sun.jdi.Method.allLineLocations()
com.sun.jdi.Method.allLineLocations(java.lang.String, java.lang.String)
com.sun.jdi.ReferenceType.allLineLocations()
com.sun.jdi.ReferenceType.allLineLocations(java.lang.String, java.lang.String)


Occurences of allMatch

allMatch occurences:
java.util.stream.DoubleStream.allMatch(java.util.function.DoublePredicate)
java.util.stream.IntStream.allMatch(java.util.function.IntPredicate)
java.util.stream.LongStream.allMatch(java.util.function.LongPredicate)
java.util.stream.Stream.allMatch(java.util.function.Predicate)


Occurences of allocate

allocate occurences:
java.nio.ByteBuffer.allocate(int)
java.nio.CharBuffer.allocate(int)
java.nio.DoubleBuffer.allocate(int)
java.nio.FloatBuffer.allocate(int)
java.nio.IntBuffer.allocate(int)
java.nio.LongBuffer.allocate(int)
java.nio.ShortBuffer.allocate(int)
javax.xml.stream.util.XMLEventAllocator.allocate(javax.xml.stream.XMLStreamReader)
javax.xml.stream.util.XMLEventAllocator.allocate(javax.xml.stream.XMLStreamReader, javax.xml.stream.util.XMLEventConsumer)


Occurences of allOf

allOf occurences:
java.util.concurrent.CompletableFuture.allOf(java.util.concurrent.CompletableFuture...)
java.util.EnumSet.allOf(java.lang.Class)


Occurences of AllPermission (constructors)

AllPermission (constructors) occurences:
java.security.AllPermission()
java.security.AllPermission(java.lang.String, java.lang.String)


Occurences of allRowsChanged

allRowsChanged occurences:
javax.swing.DefaultRowSorter.allRowsChanged()
javax.swing.RowSorter.allRowsChanged()


Occurences of AlreadyBound (constructors)

AlreadyBound (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.AlreadyBound()
org.omg.CosNaming.NamingContextPackage.AlreadyBound(java.lang.String)


Occurences of AlreadyBoundException

AlreadyBoundException occurences:
java.nio.channels.AlreadyBoundException
java.rmi.AlreadyBoundException


Occurences of AlreadyBoundException (constructors)

AlreadyBoundException (constructors) occurences:
java.nio.channels.AlreadyBoundException()
java.rmi.AlreadyBoundException()
java.rmi.AlreadyBoundException(java.lang.String)


Occurences of AlreadyBoundHolder (constructors)

AlreadyBoundHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder()
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder(org.omg.CosNaming.NamingContextPackage.AlreadyBound)


Occurences of ALT_MASK

ALT_MASK occurences:
java.awt.ALT_MASK
java.awt.event.ALT_MASK
java.awt.event.ALT_MASK


Occurences of AM_PM

AM_PM occurences:
java.text.AM_PM
java.util.AM_PM


Occurences of ancestorMoved

ancestorMoved occurences:
java.awt.AWTEventMulticaster.ancestorMoved(java.awt.event.HierarchyEvent)
java.awt.event.HierarchyBoundsAdapter.ancestorMoved(java.awt.event.HierarchyEvent)
java.awt.event.HierarchyBoundsListener.ancestorMoved(java.awt.event.HierarchyEvent)
javax.swing.event.AncestorListener.ancestorMoved(javax.swing.event.AncestorEvent)


Occurences of ancestorResized

ancestorResized occurences:
java.awt.AWTEventMulticaster.ancestorResized(java.awt.event.HierarchyEvent)
java.awt.event.HierarchyBoundsAdapter.ancestorResized(java.awt.event.HierarchyEvent)
java.awt.event.HierarchyBoundsListener.ancestorResized(java.awt.event.HierarchyEvent)


Occurences of ANCESTOR_MOVED

ANCESTOR_MOVED occurences:
java.awt.event.ANCESTOR_MOVED
javax.swing.event.ANCESTOR_MOVED


Occurences of and

and occurences:
java.math.BigInteger.and(java.math.BigInteger)
java.util.BitSet.and(java.util.BitSet)
java.util.function.BiPredicate.and(java.util.function.BiPredicate)
java.util.function.DoublePredicate.and(java.util.function.DoublePredicate)
java.util.function.IntPredicate.and(java.util.function.IntPredicate)
java.util.function.LongPredicate.and(java.util.function.LongPredicate)
java.util.function.Predicate.and(java.util.function.Predicate)
javax.management.Query.and(javax.management.QueryExp, javax.management.QueryExp)


Occurences of andNot

andNot occurences:
java.math.BigInteger.andNot(java.math.BigInteger)
java.util.BitSet.andNot(java.util.BitSet)


Occurences of andThen

andThen occurences:
java.util.function.BiConsumer.andThen(java.util.function.BiConsumer)
java.util.function.BiFunction.andThen(java.util.function.Function)
java.util.function.Consumer.andThen(java.util.function.Consumer)
java.util.function.DoubleConsumer.andThen(java.util.function.DoubleConsumer)
java.util.function.DoubleUnaryOperator.andThen(java.util.function.DoubleUnaryOperator)
java.util.function.Function.andThen(java.util.function.Function)
java.util.function.IntConsumer.andThen(java.util.function.IntConsumer)
java.util.function.IntUnaryOperator.andThen(java.util.function.IntUnaryOperator)
java.util.function.LongConsumer.andThen(java.util.function.LongConsumer)
java.util.function.LongUnaryOperator.andThen(java.util.function.LongUnaryOperator)


Occurences of AnnotatedType

AnnotatedType occurences:
com.sun.javadoc.AnnotatedType
java.lang.reflect.AnnotatedType


Occurences of Annotation

Annotation occurences:
java.lang.annotation.Annotation
java.text.Annotation


Occurences of annotation

annotation occurences:
compact1.java.lang.annotation
compact2.java.lang.annotation
compact3.java.lang.annotation
java.lang.annotation
javax.annotation
javax.xml.bind.annotation


Occurences of annotation.type.element.detail

annotation.type.element.detail occurences:
java.beans.annotation.type.element.detail
java.beans.annotation.type.element.detail
java.lang.annotation.annotation.type.element.detail
java.lang.annotation.annotation.type.element.detail
java.lang.annotation.annotation.type.element.detail
java.lang.annotation.type.element.detail
javax.annotation.annotation.type.element.detail
javax.annotation.annotation.type.element.detail
javax.annotation.annotation.type.element.detail
javax.annotation.processing.annotation.type.element.detail
javax.annotation.processing.annotation.type.element.detail
javax.annotation.processing.annotation.type.element.detail
javax.jws.annotation.type.element.detail
javax.jws.annotation.type.element.detail
javax.jws.annotation.type.element.detail
javax.jws.annotation.type.element.detail
javax.jws.annotation.type.element.detail
javax.jws.soap.annotation.type.element.detail
javax.jws.soap.annotation.type.element.detail
javax.jws.soap.annotation.type.element.detail
javax.jws.soap.annotation.type.element.detail
javax.management.annotation.type.element.detail
javax.management.annotation.type.element.detail
javax.xml.bind.annotation.adapters.annotation.type.element.detail
javax.xml.bind.annotation.adapters.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.bind.annotation.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.annotation.type.element.detail
javax.xml.ws.soap.annotation.type.element.detail
javax.xml.ws.soap.annotation.type.element.detail
javax.xml.ws.spi.annotation.type.element.detail


Occurences of annotation.type.optional.element.summary

annotation.type.optional.element.summary occurences:
java.beans.annotation.type.optional.element.summary
javax.annotation.annotation.type.optional.element.summary
javax.annotation.annotation.type.optional.element.summary
javax.jws.annotation.type.optional.element.summary
javax.jws.annotation.type.optional.element.summary
javax.jws.annotation.type.optional.element.summary
javax.jws.annotation.type.optional.element.summary
javax.jws.annotation.type.optional.element.summary
javax.jws.soap.annotation.type.optional.element.summary
javax.jws.soap.annotation.type.optional.element.summary
javax.management.annotation.type.optional.element.summary
javax.xml.bind.annotation.adapters.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.bind.annotation.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.annotation.type.optional.element.summary
javax.xml.ws.soap.annotation.type.optional.element.summary
javax.xml.ws.soap.annotation.type.optional.element.summary


Occurences of annotation.type.required.element.summary

annotation.type.required.element.summary occurences:
java.beans.annotation.type.required.element.summary
java.lang.annotation.annotation.type.required.element.summary
java.lang.annotation.annotation.type.required.element.summary
java.lang.annotation.annotation.type.required.element.summary
java.lang.annotation.type.required.element.summary
javax.annotation.annotation.type.required.element.summary
javax.annotation.annotation.type.required.element.summary
javax.annotation.processing.annotation.type.required.element.summary
javax.annotation.processing.annotation.type.required.element.summary
javax.annotation.processing.annotation.type.required.element.summary
javax.jws.annotation.type.required.element.summary
javax.jws.soap.annotation.type.required.element.summary
javax.jws.soap.annotation.type.required.element.summary
javax.jws.soap.annotation.type.required.element.summary
javax.management.annotation.type.required.element.summary
javax.xml.bind.annotation.adapters.annotation.type.required.element.summary
javax.xml.bind.annotation.adapters.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.bind.annotation.annotation.type.required.element.summary
javax.xml.ws.annotation.type.required.element.summary
javax.xml.ws.annotation.type.required.element.summary
javax.xml.ws.spi.annotation.type.required.element.summary


Occurences of AnnotationFormatError (constructors)

AnnotationFormatError (constructors) occurences:
java.lang.annotation.AnnotationFormatError(java.lang.String)
java.lang.annotation.AnnotationFormatError(java.lang.String, java.lang.Throwable)
java.lang.annotation.AnnotationFormatError(java.lang.Throwable)


Occurences of annotations

annotations occurences:
com.sun.javadoc.AnnotatedType.annotations()
com.sun.javadoc.PackageDoc.annotations()
com.sun.javadoc.Parameter.annotations()
com.sun.javadoc.ProgramElementDoc.annotations()
com.sun.javadoc.TypeVariable.annotations()


Occurences of annotationType

annotationType occurences:
com.sun.javadoc.AnnotationDesc.annotationType()
java.lang.annotation.Annotation.annotationType()
java.lang.annotation.IncompleteAnnotationException.annotationType()


Occurences of AnnotationValue

AnnotationValue occurences:
com.sun.javadoc.AnnotationValue
javax.lang.model.element.AnnotationValue


Occurences of ANNOTATION_TYPE

ANNOTATION_TYPE occurences:
com.sun.source.tree.ANNOTATION_TYPE
java.lang.annotation.ANNOTATION_TYPE
javax.lang.model.element.ANNOTATION_TYPE


Occurences of ANONYMOUS

ANONYMOUS occurences:
javax.lang.model.element.ANONYMOUS
javax.xml.ws.soap.ANONYMOUS


Occurences of AnyHolder (constructors)

AnyHolder (constructors) occurences:
org.omg.CORBA.AnyHolder()
org.omg.CORBA.AnyHolder(org.omg.CORBA.Any)


Occurences of anyMatch

anyMatch occurences:
java.util.stream.DoubleStream.anyMatch(java.util.function.DoublePredicate)
java.util.stream.IntStream.anyMatch(java.util.function.IntPredicate)
java.util.stream.LongStream.anyMatch(java.util.function.LongPredicate)
java.util.stream.Stream.anyMatch(java.util.function.Predicate)


Occurences of AnySeqHelper

AnySeqHelper occurences:
org.omg.CORBA.AnySeqHelper
org.omg.DynamicAny.AnySeqHelper


Occurences of AnySeqHelper (constructors)

AnySeqHelper (constructors) occurences:
org.omg.CORBA.AnySeqHelper()
org.omg.DynamicAny.AnySeqHelper()


Occurences of AnySeqHolder (constructors)

AnySeqHolder (constructors) occurences:
org.omg.CORBA.AnySeqHolder()
org.omg.CORBA.AnySeqHolder(org.omg.CORBA.Any:A)


Occurences of append

append occurences:
java.awt.geom.Path2D.append(java.awt.geom.PathIterator, boolean)
java.awt.geom.Path2D.append(java.awt.Shape, boolean)
java.awt.geom.Path2D.Double.append(java.awt.geom.PathIterator, boolean)
java.awt.geom.Path2D.Float.append(java.awt.geom.PathIterator, boolean)
java.awt.print.Book.append(java.awt.print.Printable, java.awt.print.PageFormat)
java.awt.print.Book.append(java.awt.print.Printable, java.awt.print.PageFormat, int)
java.awt.TextArea.append(java.lang.String)
java.io.CharArrayWriter.append(char)
java.io.CharArrayWriter.append(java.lang.CharSequence)
java.io.CharArrayWriter.append(java.lang.CharSequence, int, int)
java.io.PrintStream.append(char)
java.io.PrintStream.append(java.lang.CharSequence)
java.io.PrintStream.append(java.lang.CharSequence, int, int)
java.io.PrintWriter.append(char)
java.io.PrintWriter.append(java.lang.CharSequence)
java.io.PrintWriter.append(java.lang.CharSequence, int, int)
java.io.StringWriter.append(char)
java.io.StringWriter.append(java.lang.CharSequence)
java.io.StringWriter.append(java.lang.CharSequence, int, int)
java.io.Writer.append(char)
java.io.Writer.append(java.lang.CharSequence)
java.io.Writer.append(java.lang.CharSequence, int, int)
java.lang.Appendable.append(char)
java.lang.Appendable.append(java.lang.CharSequence)
java.lang.Appendable.append(java.lang.CharSequence, int, int)
java.lang.StringBuffer.append(boolean)
java.lang.StringBuffer.append(char)
java.lang.StringBuffer.append(char:A)
java.lang.StringBuffer.append(char:A, int, int)
java.lang.StringBuffer.append(double)
java.lang.StringBuffer.append(float)
java.lang.StringBuffer.append(int)
java.lang.StringBuffer.append(java.lang.CharSequence)
java.lang.StringBuffer.append(java.lang.CharSequence, int, int)
java.lang.StringBuffer.append(java.lang.Object)
java.lang.StringBuffer.append(java.lang.String)
java.lang.StringBuffer.append(java.lang.StringBuffer)
java.lang.StringBuffer.append(long)
java.lang.StringBuilder.append(boolean)
java.lang.StringBuilder.append(char)
java.lang.StringBuilder.append(char:A)
java.lang.StringBuilder.append(char:A, int, int)
java.lang.StringBuilder.append(double)
java.lang.StringBuilder.append(float)
java.lang.StringBuilder.append(int)
java.lang.StringBuilder.append(java.lang.CharSequence)
java.lang.StringBuilder.append(java.lang.CharSequence, int, int)
java.lang.StringBuilder.append(java.lang.Object)
java.lang.StringBuilder.append(java.lang.String)
java.lang.StringBuilder.append(java.lang.StringBuffer)
java.lang.StringBuilder.append(long)
java.nio.CharBuffer.append(char)
java.nio.CharBuffer.append(java.lang.CharSequence)
java.nio.CharBuffer.append(java.lang.CharSequence, int, int)
java.time.format.DateTimeFormatterBuilder.append(java.time.format.DateTimeFormatter)
javax.swing.JTextArea.append(java.lang.String)
javax.swing.text.View.append(javax.swing.text.View)


Occurences of APPEND

APPEND occurences:
java.lang.APPEND
java.nio.file.APPEND


Occurences of appendChild

appendChild occurences:
javax.imageio.metadata.IIOMetadataNode.appendChild(org.w3c.dom.Node)
org.w3c.dom.Node.appendChild(org.w3c.dom.Node)


Occurences of appendCodePoint

appendCodePoint occurences:
java.lang.StringBuffer.appendCodePoint(int)
java.lang.StringBuilder.appendCodePoint(int)


Occurences of appendInstant

appendInstant occurences:
java.time.format.DateTimeFormatterBuilder.appendInstant()
java.time.format.DateTimeFormatterBuilder.appendInstant(int)


Occurences of appendLiteral

appendLiteral occurences:
java.time.format.DateTimeFormatterBuilder.appendLiteral(char)
java.time.format.DateTimeFormatterBuilder.appendLiteral(java.lang.String)


Occurences of appendParameterTypes

appendParameterTypes occurences:
java.lang.invoke.MethodType.appendParameterTypes(java.lang.Class...)
java.lang.invoke.MethodType.appendParameterTypes(java.util.List)


Occurences of appendRemainingComponent

appendRemainingComponent occurences:
javax.naming.NamingException.appendRemainingComponent(java.lang.String)
javax.naming.spi.ResolveResult.appendRemainingComponent(java.lang.String)


Occurences of appendRemainingName

appendRemainingName occurences:
javax.naming.NamingException.appendRemainingName(javax.naming.Name)
javax.naming.spi.ResolveResult.appendRemainingName(javax.naming.Name)


Occurences of appendText

appendText occurences:
java.awt.TextArea.appendText(java.lang.String)
java.time.format.DateTimeFormatterBuilder.appendText(java.time.temporal.TemporalField)
java.time.format.DateTimeFormatterBuilder.appendText(java.time.temporal.TemporalField, java.time.format.TextStyle)
java.time.format.DateTimeFormatterBuilder.appendText(java.time.temporal.TemporalField, java.util.Map)


Occurences of appendValue

appendValue occurences:
java.time.format.DateTimeFormatterBuilder.appendValue(java.time.temporal.TemporalField)
java.time.format.DateTimeFormatterBuilder.appendValue(java.time.temporal.TemporalField, int)
java.time.format.DateTimeFormatterBuilder.appendValue(java.time.temporal.TemporalField, int, int, java.time.format.SignStyle)


Occurences of appendValueReduced

appendValueReduced occurences:
java.time.format.DateTimeFormatterBuilder.appendValueReduced(java.time.temporal.TemporalField, int, int, int)
java.time.format.DateTimeFormatterBuilder.appendValueReduced(java.time.temporal.TemporalField, int, int, java.time.chrono.ChronoLocalDate)


Occurences of appendZoneText

appendZoneText occurences:
java.time.format.DateTimeFormatterBuilder.appendZoneText(java.time.format.TextStyle)
java.time.format.DateTimeFormatterBuilder.appendZoneText(java.time.format.TextStyle, java.util.Set)


Occurences of APPLET

APPLET occurences:
javax.naming.APPLET
javax.swing.text.html.APPLET


Occurences of applet

applet occurences:
java.applet
javax.swing.text.html.parser.applet


Occurences of appletviewer

appletviewer occurences:
appletviewer
appletviewer


Occurences of APPLICATION

APPLICATION occurences:
javax.annotation.APPLICATION
javax.xml.ws.handler.APPLICATION


Occurences of apply

apply occurences:
java.util.function.BiFunction.apply(java.lang.Object, java.lang.Object)
java.util.function.BiFunction.apply(T, U)
java.util.function.DoubleFunction.apply(double)
java.util.function.Function.apply(java.lang.Object)
java.util.function.Function.apply(T)
java.util.function.IntFunction.apply(int)
java.util.function.LongFunction.apply(long)
javax.management.AttributeValueExp.apply(javax.management.ObjectName)
javax.management.ObjectName.apply(javax.management.ObjectName)
javax.management.QueryExp.apply(javax.management.ObjectName)
javax.management.StringValueExp.apply(javax.management.ObjectName)
javax.management.ValueExp.apply(javax.management.ObjectName)


Occurences of applyAsDouble

applyAsDouble occurences:
java.util.function.DoubleBinaryOperator.applyAsDouble(double, double)
java.util.function.DoubleUnaryOperator.applyAsDouble(double)
java.util.function.IntToDoubleFunction.applyAsDouble(int)
java.util.function.LongToDoubleFunction.applyAsDouble(long)
java.util.function.ToDoubleBiFunction.applyAsDouble(java.lang.Object, java.lang.Object)
java.util.function.ToDoubleBiFunction.applyAsDouble(T, U)
java.util.function.ToDoubleFunction.applyAsDouble(java.lang.Object)
java.util.function.ToDoubleFunction.applyAsDouble(T)


Occurences of applyAsInt

applyAsInt occurences:
java.util.function.DoubleToIntFunction.applyAsInt(double)
java.util.function.IntBinaryOperator.applyAsInt(int, int)
java.util.function.IntUnaryOperator.applyAsInt(int)
java.util.function.LongToIntFunction.applyAsInt(long)
java.util.function.ToIntBiFunction.applyAsInt(java.lang.Object, java.lang.Object)
java.util.function.ToIntBiFunction.applyAsInt(T, U)
java.util.function.ToIntFunction.applyAsInt(java.lang.Object)
java.util.function.ToIntFunction.applyAsInt(T)


Occurences of applyAsLong

applyAsLong occurences:
java.util.function.DoubleToLongFunction.applyAsLong(double)
java.util.function.IntToLongFunction.applyAsLong(int)
java.util.function.LongBinaryOperator.applyAsLong(long, long)
java.util.function.LongUnaryOperator.applyAsLong(long)
java.util.function.ToLongBiFunction.applyAsLong(java.lang.Object, java.lang.Object)
java.util.function.ToLongBiFunction.applyAsLong(T, U)
java.util.function.ToLongFunction.applyAsLong(java.lang.Object)
java.util.function.ToLongFunction.applyAsLong(T)


Occurences of applyComponentOrientation

applyComponentOrientation occurences:
java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation)
java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation)
javax.swing.JMenu.applyComponentOrientation(java.awt.ComponentOrientation)


Occurences of applyLocalizedPattern

applyLocalizedPattern occurences:
java.text.DecimalFormat.applyLocalizedPattern(java.lang.String)
java.text.SimpleDateFormat.applyLocalizedPattern(java.lang.String)


Occurences of applyPattern

applyPattern occurences:
java.text.ChoiceFormat.applyPattern(java.lang.String)
java.text.DecimalFormat.applyPattern(java.lang.String)
java.text.MessageFormat.applyPattern(java.lang.String)
java.text.SimpleDateFormat.applyPattern(java.lang.String)


Occurences of applyResourceBundle

applyResourceBundle occurences:
java.awt.Window.applyResourceBundle(java.lang.String)
java.awt.Window.applyResourceBundle(java.util.ResourceBundle)


Occurences of applyToEither

applyToEither occurences:
java.util.concurrent.CompletableFuture.applyToEither(java.util.concurrent.CompletionStage, java.util.function.Function)
java.util.concurrent.CompletionStage.applyToEither(java.util.concurrent.CompletionStage, java.util.function.Function)


Occurences of applyToEitherAsync

applyToEitherAsync occurences:
java.util.concurrent.CompletableFuture.applyToEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Function)
java.util.concurrent.CompletableFuture.applyToEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Function, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.applyToEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Function)
java.util.concurrent.CompletionStage.applyToEitherAsync(java.util.concurrent.CompletionStage, java.util.function.Function, java.util.concurrent.Executor)


Occurences of APRIL

APRIL occurences:
java.time.APRIL
java.util.APRIL
javax.xml.datatype.APRIL


Occurences of ARABIC

ARABIC occurences:
java.awt.font.ARABIC
java.awt.font.ARABIC
java.lang.ARABIC
java.lang.ARABIC


Occurences of Arc2D (constructors)

Arc2D (constructors) occurences:
java.awt.geom.Arc2D()
java.awt.geom.Arc2D(int)


Occurences of archeight

archeight occurences:
java.awt.geom.archeight
java.awt.geom.archeight


Occurences of arcwidth

arcwidth occurences:
java.awt.geom.arcwidth
java.awt.geom.arcwidth


Occurences of Area (constructors)

Area (constructors) occurences:
java.awt.geom.Area()
java.awt.geom.Area(java.awt.Shape)


Occurences of areFocusTraversalKeysSet

areFocusTraversalKeysSet occurences:
java.awt.Component.areFocusTraversalKeysSet(int)
java.awt.Container.areFocusTraversalKeysSet(int)


Occurences of areTablesSet

areTablesSet occurences:
javax.imageio.plugins.jpeg.JPEGImageReadParam.areTablesSet()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.areTablesSet()


Occurences of arguments

arguments occurences:
com.sun.jdi.Method.arguments()
org.omg.CORBA.Request.arguments()
org.omg.CORBA.ServerRequest.arguments(org.omg.CORBA.NVList)
org.omg.PortableInterceptor.ORBInitInfoOperations.arguments()
org.omg.PortableInterceptor.RequestInfoOperations.arguments()


Occurences of ArithmeticException (constructors)

ArithmeticException (constructors) occurences:
java.lang.ArithmeticException()
java.lang.ArithmeticException(java.lang.String)


Occurences of ARMED

ARMED occurences:
javax.accessibility.ARMED
javax.swing.ARMED


Occurences of ARMENIAN

ARMENIAN occurences:
java.lang.ARMENIAN
java.lang.ARMENIAN


Occurences of array

array occurences:
java.nio.Buffer.array()
java.nio.ByteBuffer.array()
java.nio.CharBuffer.array()
java.nio.DoubleBuffer.array()
java.nio.FloatBuffer.array()
java.nio.IntBuffer.array()
java.nio.LongBuffer.array()
java.nio.ShortBuffer.array()
javax.swing.text.array


Occurences of ARRAY

ARRAY occurences:
java.sql.ARRAY
java.sql.ARRAY
javax.lang.model.type.ARRAY


Occurences of Array

Array occurences:
java.lang.reflect.Array
java.sql.Array


Occurences of ArrayBlockingQueue (constructors)

ArrayBlockingQueue (constructors) occurences:
java.util.concurrent.ArrayBlockingQueue(int)
java.util.concurrent.ArrayBlockingQueue(int, boolean)
java.util.concurrent.ArrayBlockingQueue(int, boolean, java.util.Collection)


Occurences of ArrayDeque (constructors)

ArrayDeque (constructors) occurences:
java.util.ArrayDeque()
java.util.ArrayDeque(int)
java.util.ArrayDeque(java.util.Collection)


Occurences of ArrayIndexOutOfBoundsException (constructors)

ArrayIndexOutOfBoundsException (constructors) occurences:
java.lang.ArrayIndexOutOfBoundsException()
java.lang.ArrayIndexOutOfBoundsException(int)
java.lang.ArrayIndexOutOfBoundsException(java.lang.String)


Occurences of ArrayList (constructors)

ArrayList (constructors) occurences:
java.util.ArrayList()
java.util.ArrayList(int)
java.util.ArrayList(java.util.Collection)


Occurences of arrayOffset

arrayOffset occurences:
java.nio.Buffer.arrayOffset()
java.nio.ByteBuffer.arrayOffset()
java.nio.CharBuffer.arrayOffset()
java.nio.DoubleBuffer.arrayOffset()
java.nio.FloatBuffer.arrayOffset()
java.nio.IntBuffer.arrayOffset()
java.nio.LongBuffer.arrayOffset()
java.nio.ShortBuffer.arrayOffset()


Occurences of ArrayStoreException (constructors)

ArrayStoreException (constructors) occurences:
java.lang.ArrayStoreException()
java.lang.ArrayStoreException(java.lang.String)


Occurences of ArrayType

ArrayType occurences:
com.sun.jdi.ArrayType
javax.lang.model.type.ArrayType
javax.management.openmbean.ArrayType


Occurences of ArrayType (constructors)

ArrayType (constructors) occurences:
javax.management.openmbean.ArrayType(int, javax.management.openmbean.OpenType)
javax.management.openmbean.ArrayType(javax.management.openmbean.SimpleType, boolean)


Occurences of asClassDoc

asClassDoc occurences:
com.sun.javadoc.ParameterizedType.asClassDoc()
com.sun.javadoc.Type.asClassDoc()


Occurences of asDoubleStream

asDoubleStream occurences:
java.util.stream.IntStream.asDoubleStream()
java.util.stream.LongStream.asDoubleStream()


Occurences of asElement

asElement occurences:
javax.lang.model.type.DeclaredType.asElement()
javax.lang.model.type.TypeVariable.asElement()
javax.lang.model.util.Types.asElement(javax.lang.model.type.TypeMirror)


Occurences of asin

asin occurences:
java.lang.Math.asin(double)
java.lang.StrictMath.asin(double)


Occurences of asksAllowsChildren

asksAllowsChildren occurences:
javax.swing.tree.asksAllowsChildren
javax.swing.tree.DefaultTreeModel.asksAllowsChildren()


Occurences of asList

asList occurences:
java.util.Arrays.asList(java.lang.Object:A)
java.util.Arrays.asList(T...)
javax.management.AttributeList.asList()
javax.management.relation.RoleList.asList()
javax.management.relation.RoleUnresolvedList.asList()


Occurences of asReadOnlyBuffer

asReadOnlyBuffer occurences:
java.nio.ByteBuffer.asReadOnlyBuffer()
java.nio.CharBuffer.asReadOnlyBuffer()
java.nio.DoubleBuffer.asReadOnlyBuffer()
java.nio.FloatBuffer.asReadOnlyBuffer()
java.nio.IntBuffer.asReadOnlyBuffer()
java.nio.LongBuffer.asReadOnlyBuffer()
java.nio.ShortBuffer.asReadOnlyBuffer()


Occurences of assembleSystemMenu

assembleSystemMenu occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.assembleSystemMenu()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.assembleSystemMenu()


Occurences of AssertionError (constructors)

AssertionError (constructors) occurences:
java.lang.AssertionError()
java.lang.AssertionError(boolean)
java.lang.AssertionError(char)
java.lang.AssertionError(double)
java.lang.AssertionError(float)
java.lang.AssertionError(int)
java.lang.AssertionError(java.lang.Object)
java.lang.AssertionError(java.lang.String, java.lang.Throwable)
java.lang.AssertionError(long)


Occurences of assign

assign occurences:
org.omg.CORBA.DynAny.assign(org.omg.CORBA.DynAny)
org.omg.DynamicAny.DynAnyOperations.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynAnyStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynArrayStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynEnumStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynFixedStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynSequenceStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynStructStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynUnionStub.assign(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynValueStub.assign(org.omg.DynamicAny.DynAny)


Occurences of asType

asType occurences:
java.lang.invoke.MethodHandle.asType(java.lang.invoke.MethodType)
javax.lang.model.element.Element.asType()


Occurences of atan

atan occurences:
java.lang.Math.atan(double)
java.lang.StrictMath.atan(double)


Occurences of atan2

atan2 occurences:
java.lang.Math.atan2(double, double)
java.lang.StrictMath.atan2(double, double)


Occurences of atDate

atDate occurences:
java.time.LocalTime.atDate(java.time.LocalDate)
java.time.OffsetTime.atDate(java.time.LocalDate)


Occurences of atDay

atDay occurences:
java.time.Year.atDay(int)
java.time.YearMonth.atDay(int)


Occurences of atMonth

atMonth occurences:
java.time.Year.atMonth(int)
java.time.Year.atMonth(java.time.Month)


Occurences of atOffset

atOffset occurences:
java.time.Instant.atOffset(java.time.ZoneOffset)
java.time.LocalDateTime.atOffset(java.time.ZoneOffset)
java.time.LocalTime.atOffset(java.time.ZoneOffset)


Occurences of atomic

atomic occurences:
compact1.java.util.concurrent.atomic
compact2.java.util.concurrent.atomic
compact3.java.util.concurrent.atomic
java.util.concurrent.atomic


Occurences of AtomicBoolean (constructors)

AtomicBoolean (constructors) occurences:
java.util.concurrent.atomic.AtomicBoolean()
java.util.concurrent.atomic.AtomicBoolean(boolean)


Occurences of AtomicInteger (constructors)

AtomicInteger (constructors) occurences:
java.util.concurrent.atomic.AtomicInteger()
java.util.concurrent.atomic.AtomicInteger(int)


Occurences of AtomicIntegerArray (constructors)

AtomicIntegerArray (constructors) occurences:
java.util.concurrent.atomic.AtomicIntegerArray(int)
java.util.concurrent.atomic.AtomicIntegerArray(int:A)


Occurences of AtomicLong (constructors)

AtomicLong (constructors) occurences:
java.util.concurrent.atomic.AtomicLong()
java.util.concurrent.atomic.AtomicLong(long)


Occurences of AtomicLongArray (constructors)

AtomicLongArray (constructors) occurences:
java.util.concurrent.atomic.AtomicLongArray(int)
java.util.concurrent.atomic.AtomicLongArray(long:A)


Occurences of AtomicMarkableReference (constructors)

AtomicMarkableReference (constructors) occurences:
java.util.concurrent.atomic.AtomicMarkableReference(java.lang.Object, boolean)
java.util.concurrent.atomic.AtomicMarkableReference(V, boolean)


Occurences of AtomicReference (constructors)

AtomicReference (constructors) occurences:
java.util.concurrent.atomic.AtomicReference()
java.util.concurrent.atomic.AtomicReference(java.lang.Object)
java.util.concurrent.atomic.AtomicReference(V)


Occurences of AtomicReferenceArray (constructors)

AtomicReferenceArray (constructors) occurences:
java.util.concurrent.atomic.AtomicReferenceArray(E:A)
java.util.concurrent.atomic.AtomicReferenceArray(int)
java.util.concurrent.atomic.AtomicReferenceArray(java.lang.Object:A)


Occurences of AtomicStampedReference (constructors)

AtomicStampedReference (constructors) occurences:
java.util.concurrent.atomic.AtomicStampedReference(java.lang.Object, int)
java.util.concurrent.atomic.AtomicStampedReference(V, int)


Occurences of atStartOfDay

atStartOfDay occurences:
java.time.LocalDate.atStartOfDay()
java.time.LocalDate.atStartOfDay(java.time.ZoneId)


Occurences of attach

attach occurences:
com.sun.jdi.connect.AttachingConnector.attach(java.util.Map)
com.sun.jdi.connect.spi.TransportService.attach(java.lang.String, long, long)
com.sun.tools.attach
com.sun.tools.attach.VirtualMachine.attach(com.sun.tools.attach.VirtualMachineDescriptor)
com.sun.tools.attach.VirtualMachine.attach(java.lang.String)
java.nio.channels.SelectionKey.attach(java.lang.Object)


Occurences of Attach API

Attach API occurences:
Attach API
Attach API


Occurences of attachment

attachment occurences:
java.nio.channels.SelectionKey.attachment()
javax.xml.bind.attachment


Occurences of AttachNotSupportedException (constructors)

AttachNotSupportedException (constructors) occurences:
com.sun.tools.attach.AttachNotSupportedException()
com.sun.tools.attach.AttachNotSupportedException(java.lang.String)


Occurences of AttachPermission (constructors)

AttachPermission (constructors) occurences:
com.sun.tools.attach.AttachPermission(java.lang.String)
com.sun.tools.attach.AttachPermission(java.lang.String, java.lang.String)


Occurences of attachVirtualMachine

attachVirtualMachine occurences:
com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine(com.sun.tools.attach.VirtualMachineDescriptor)
com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine(java.lang.String)


Occurences of attemptMark

attemptMark occurences:
java.util.concurrent.atomic.AtomicMarkableReference.attemptMark(java.lang.Object, boolean)
java.util.concurrent.atomic.AtomicMarkableReference.attemptMark(V, boolean)


Occurences of attemptStamp

attemptStamp occurences:
java.util.concurrent.atomic.AtomicStampedReference.attemptStamp(java.lang.Object, int)
java.util.concurrent.atomic.AtomicStampedReference.attemptStamp(V, int)


Occurences of atTime

atTime occurences:
java.time.chrono.ChronoLocalDate.atTime(java.time.LocalTime)
java.time.chrono.HijrahDate.atTime(java.time.LocalTime)
java.time.chrono.JapaneseDate.atTime(java.time.LocalTime)
java.time.chrono.MinguoDate.atTime(java.time.LocalTime)
java.time.chrono.ThaiBuddhistDate.atTime(java.time.LocalTime)
java.time.LocalDate.atTime(int, int)
java.time.LocalDate.atTime(int, int, int)
java.time.LocalDate.atTime(int, int, int, int)
java.time.LocalDate.atTime(java.time.LocalTime)
java.time.LocalDate.atTime(java.time.OffsetTime)


Occurences of attr

attr occurences:
javax.management.Query.attr(java.lang.String)
javax.management.Query.attr(java.lang.String, java.lang.String)


Occurences of attribute

attribute occurences:
compact1.java.nio.file.attribute
compact2.java.nio.file.attribute
compact3.java.nio.file.attribute
java.nio.file.attribute
javax.print.attribute
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.attribute(javax.xml.namespace.QName, java.lang.String)


Occurences of ATTRIBUTE

ATTRIBUTE occurences:
com.sun.source.doctree.ATTRIBUTE
javax.xml.stream.ATTRIBUTE


Occurences of Attribute

Attribute occurences:
java.text.AttributedCharacterIterator.Attribute.Attribute(java.lang.String)
javax.management.Attribute
javax.naming.directory.Attribute
javax.print.attribute.Attribute
javax.xml.stream.events.Attribute


Occurences of attributeDecl

attributeDecl occurences:
org.xml.sax.ext.DeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of AttributedString (constructors)

AttributedString (constructors) occurences:
java.text.AttributedString(java.lang.String)
java.text.AttributedString(java.lang.String, java.util.Map)
java.text.AttributedString(java.text.AttributedCharacterIterator)
java.text.AttributedString(java.text.AttributedCharacterIterator, int, int)
java.text.AttributedString(java.text.AttributedCharacterIterator, int, int, java.text.AttributedCharacterIterator.Attribute:A)


Occurences of AttributeInUseException (constructors)

AttributeInUseException (constructors) occurences:
javax.naming.directory.AttributeInUseException()
javax.naming.directory.AttributeInUseException(java.lang.String)


Occurences of AttributeList

AttributeList occurences:
javax.management.AttributeList
javax.swing.text.html.parser.AttributeList
org.xml.sax.AttributeList


Occurences of AttributeList (constructors)

AttributeList (constructors) occurences:
javax.management.AttributeList()
javax.management.AttributeList(int)
javax.management.AttributeList(java.util.List)
javax.management.AttributeList(javax.management.AttributeList)
javax.swing.text.html.parser.AttributeList(java.lang.String)
javax.swing.text.html.parser.AttributeList(java.lang.String, int, int, java.lang.String, java.util.Vector, javax.swing.text.html.parser.AttributeList)


Occurences of AttributeListImpl (constructors)

AttributeListImpl (constructors) occurences:
org.xml.sax.helpers.AttributeListImpl()
org.xml.sax.helpers.AttributeListImpl(org.xml.sax.AttributeList)


Occurences of AttributeModificationException (constructors)

AttributeModificationException (constructors) occurences:
javax.naming.directory.AttributeModificationException()
javax.naming.directory.AttributeModificationException(java.lang.String)


Occurences of AttributeNotFoundException (constructors)

AttributeNotFoundException (constructors) occurences:
javax.management.AttributeNotFoundException()
javax.management.AttributeNotFoundException(java.lang.String)


Occurences of Attributes

Attributes occurences:
java.util.jar.Attributes
javax.naming.directory.Attributes
org.xml.sax.Attributes


Occurences of Attributes (constructors)

Attributes (constructors) occurences:
java.util.jar.Attributes()
java.util.jar.Attributes(int)
java.util.jar.Attributes(java.util.jar.Attributes)


Occurences of Attributes2Impl (constructors)

Attributes2Impl (constructors) occurences:
org.xml.sax.ext.Attributes2Impl()
org.xml.sax.ext.Attributes2Impl(org.xml.sax.Attributes)


Occurences of AttributeSet

AttributeSet occurences:
javax.print.attribute.AttributeSet
javax.swing.text.AttributeSet


Occurences of AttributesImpl (constructors)

AttributesImpl (constructors) occurences:
org.xml.sax.helpers.AttributesImpl()
org.xml.sax.helpers.AttributesImpl(org.xml.sax.Attributes)


Occurences of attributeUpdate

attributeUpdate occurences:
javax.print.event.PrintJobAttributeListener.attributeUpdate(javax.print.event.PrintJobAttributeEvent)
javax.print.event.PrintServiceAttributeListener.attributeUpdate(javax.print.event.PrintServiceAttributeEvent)


Occurences of AttributeValueExp (constructors)

AttributeValueExp (constructors) occurences:
javax.management.AttributeValueExp()
javax.management.AttributeValueExp(java.lang.String)


Occurences of atZone

atZone occurences:
java.time.chrono.ChronoLocalDateTime.atZone(java.time.ZoneId)
java.time.Instant.atZone(java.time.ZoneId)
java.time.LocalDateTime.atZone(java.time.ZoneId)


Occurences of AudioFileFormat (constructors)

AudioFileFormat (constructors) occurences:
javax.sound.sampled.AudioFileFormat(javax.sound.sampled.AudioFileFormat.Type, int, javax.sound.sampled.AudioFormat, int)
javax.sound.sampled.AudioFileFormat(javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioFormat, int)
javax.sound.sampled.AudioFileFormat(javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioFormat, int, java.util.Map)


Occurences of AudioFormat (constructors)

AudioFormat (constructors) occurences:
javax.sound.sampled.AudioFormat(float, int, int, boolean, boolean)
javax.sound.sampled.AudioFormat(javax.sound.sampled.AudioFormat.Encoding, float, int, int, int, float, boolean)
javax.sound.sampled.AudioFormat(javax.sound.sampled.AudioFormat.Encoding, float, int, int, int, float, boolean, java.util.Map)


Occurences of AudioInputStream (constructors)

AudioInputStream (constructors) occurences:
javax.sound.sampled.AudioInputStream(java.io.InputStream, javax.sound.sampled.AudioFormat, long)
javax.sound.sampled.AudioInputStream(javax.sound.sampled.TargetDataLine)


Occurences of AudioPermission (constructors)

AudioPermission (constructors) occurences:
javax.sound.sampled.AudioPermission(java.lang.String)
javax.sound.sampled.AudioPermission(java.lang.String, java.lang.String)


Occurences of AudioSystem.java

AudioSystem.java occurences:
AudioSystem.java
AudioSystem.java


Occurences of AUGUST

AUGUST occurences:
java.time.AUGUST
java.util.AUGUST
javax.xml.datatype.AUGUST


Occurences of auth

auth occurences:
compact1.javax.security.auth
compact2.javax.security.auth
compact3.javax.security.auth
javax.security.auth


Occurences of AuthenticationException

AuthenticationException occurences:
javax.naming.AuthenticationException
javax.security.sasl.AuthenticationException


Occurences of AuthenticationException (constructors)

AuthenticationException (constructors) occurences:
javax.naming.AuthenticationException()
javax.naming.AuthenticationException(java.lang.String)
javax.security.sasl.AuthenticationException()
javax.security.sasl.AuthenticationException(java.lang.String)
javax.security.sasl.AuthenticationException(java.lang.String, java.lang.Throwable)


Occurences of AuthenticationNotSupportedException (constructors)

AuthenticationNotSupportedException (constructors) occurences:
javax.naming.AuthenticationNotSupportedException()
javax.naming.AuthenticationNotSupportedException(java.lang.String)


Occurences of AuthPermission (constructors)

AuthPermission (constructors) occurences:
javax.security.auth.AuthPermission(java.lang.String)
javax.security.auth.AuthPermission(java.lang.String, java.lang.String)


Occurences of AUTOSENSE

AUTOSENSE occurences:
javax.print.AUTOSENSE
javax.print.AUTOSENSE
javax.print.AUTOSENSE


Occurences of available

available occurences:
java.io.BufferedInputStream.available()
java.io.ByteArrayInputStream.available()
java.io.FileInputStream.available()
java.io.FilterInputStream.available()
java.io.InputStream.available()
java.io.LineNumberInputStream.available()
java.io.ObjectInput.available()
java.io.ObjectInputStream.available()
java.io.PipedInputStream.available()
java.io.PushbackInputStream.available()
java.io.SequenceInputStream.available()
java.io.StringBufferInputStream.available()
java.net.SocketImpl.available()
java.util.zip.DeflaterInputStream.available()
java.util.zip.InflaterInputStream.available()
java.util.zip.ZipInputStream.available()
javax.crypto.CipherInputStream.available()
javax.sound.sampled.AudioInputStream.available()
javax.sound.sampled.DataLine.available()


Occurences of availableLocales

availableLocales occurences:
javax.imageio.availableLocales
javax.imageio.availableLocales


Occurences of average

average occurences:
java.util.stream.DoubleStream.average()
java.util.stream.IntStream.average()
java.util.stream.LongStream.average()


Occurences of AVESTAN

AVESTAN occurences:
java.lang.AVESTAN
java.lang.AVESTAN


Occurences of avoidingGui

avoidingGui occurences:
java.beans.beancontext.BeanContextSupport.avoidingGui()
java.beans.Visibility.avoidingGui()


Occurences of await

await occurences:
java.util.concurrent.CountDownLatch.await()
java.util.concurrent.CountDownLatch.await(long, java.util.concurrent.TimeUnit)
java.util.concurrent.CyclicBarrier.await()
java.util.concurrent.CyclicBarrier.await(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.await()
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.await(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.await()
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.await(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.Condition.await()
java.util.concurrent.locks.Condition.await(long, java.util.concurrent.TimeUnit)


Occurences of awaitAdvanceInterruptibly

awaitAdvanceInterruptibly occurences:
java.util.concurrent.Phaser.awaitAdvanceInterruptibly(int)
java.util.concurrent.Phaser.awaitAdvanceInterruptibly(int, long, java.util.concurrent.TimeUnit)


Occurences of awaitNanos

awaitNanos occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.awaitNanos(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.awaitNanos(long)
java.util.concurrent.locks.Condition.awaitNanos(long)


Occurences of awaitTermination

awaitTermination occurences:
java.nio.channels.AsynchronousChannelGroup.awaitTermination(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ExecutorService.awaitTermination(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ForkJoinPool.awaitTermination(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ThreadPoolExecutor.awaitTermination(long, java.util.concurrent.TimeUnit)


Occurences of awaitUninterruptibly

awaitUninterruptibly occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.awaitUninterruptibly()
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.awaitUninterruptibly()
java.util.concurrent.locks.Condition.awaitUninterruptibly()


Occurences of awaitUntil

awaitUntil occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.awaitUntil(java.util.Date)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.awaitUntil(java.util.Date)
java.util.concurrent.locks.Condition.awaitUntil(java.util.Date)


Occurences of AWT Enhancements

AWT Enhancements occurences:
AWT Enhancements
AWT Enhancements


Occurences of AWTEvent (constructors)

AWTEvent (constructors) occurences:
java.awt.AWTEvent(java.awt.Event)
java.awt.AWTEvent(java.lang.Object, int)


Occurences of AWTKeyStroke (constructors)

AWTKeyStroke (constructors) occurences:
java.awt.AWTKeyStroke()
java.awt.AWTKeyStroke(char, int, int, boolean)


Occurences of AWTPermission (constructors)

AWTPermission (constructors) occurences:
java.awt.AWTPermission(java.lang.String)
java.awt.AWTPermission(java.lang.String, java.lang.String)


Occurences of B

B occurences:
java.awt.B
javax.print.attribute.standard.B
javax.print.attribute.standard.B
javax.swing.text.html.B


Occurences of B0

B0 occurences:
java.awt.B0
javax.print.attribute.standard.B0
javax.print.attribute.standard.B0


Occurences of B1

B1 occurences:
java.awt.B1
javax.print.attribute.standard.B1
javax.print.attribute.standard.B1


Occurences of B10

B10 occurences:
java.awt.B10
javax.print.attribute.standard.B10
javax.print.attribute.standard.B10


Occurences of B2

B2 occurences:
java.awt.B2
javax.print.attribute.standard.B2
javax.print.attribute.standard.B2


Occurences of B3

B3 occurences:
java.awt.B3
javax.print.attribute.standard.B3
javax.print.attribute.standard.B3


Occurences of B4

B4 occurences:
java.awt.B4
javax.print.attribute.standard.B4
javax.print.attribute.standard.B4


Occurences of B5

B5 occurences:
java.awt.B5
javax.print.attribute.standard.B5
javax.print.attribute.standard.B5


Occurences of B6

B6 occurences:
java.awt.B6
javax.print.attribute.standard.B6
javax.print.attribute.standard.B6


Occurences of B7

B7 occurences:
java.awt.B7
javax.print.attribute.standard.B7
javax.print.attribute.standard.B7


Occurences of B8

B8 occurences:
java.awt.B8
javax.print.attribute.standard.B8
javax.print.attribute.standard.B8


Occurences of B9

B9 occurences:
java.awt.B9
javax.print.attribute.standard.B9
javax.print.attribute.standard.B9


Occurences of BACKGROUND

BACKGROUND occurences:
java.awt.BACKGROUND
java.awt.font.BACKGROUND
javax.swing.plaf.synth.BACKGROUND
javax.swing.text.html.BACKGROUND
javax.swing.text.html.BACKGROUND


Occurences of BackingStoreException (constructors)

BackingStoreException (constructors) occurences:
java.util.prefs.BackingStoreException(java.lang.String)
java.util.prefs.BackingStoreException(java.lang.Throwable)


Occurences of BadKind (constructors)

BadKind (constructors) occurences:
org.omg.CORBA.TypeCodePackage.BadKind()
org.omg.CORBA.TypeCodePackage.BadKind(java.lang.String)


Occurences of BadPaddingException (constructors)

BadPaddingException (constructors) occurences:
javax.crypto.BadPaddingException()
javax.crypto.BadPaddingException(java.lang.String)


Occurences of BAD_CONTEXT (constructors)

BAD_CONTEXT (constructors) occurences:
org.omg.CORBA.BAD_CONTEXT()
org.omg.CORBA.BAD_CONTEXT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_CONTEXT(java.lang.String)
org.omg.CORBA.BAD_CONTEXT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BAD_INV_ORDER (constructors)

BAD_INV_ORDER (constructors) occurences:
org.omg.CORBA.BAD_INV_ORDER()
org.omg.CORBA.BAD_INV_ORDER(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_INV_ORDER(java.lang.String)
org.omg.CORBA.BAD_INV_ORDER(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BAD_OPERATION (constructors)

BAD_OPERATION (constructors) occurences:
org.omg.CORBA.BAD_OPERATION()
org.omg.CORBA.BAD_OPERATION(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_OPERATION(java.lang.String)
org.omg.CORBA.BAD_OPERATION(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BAD_PARAM (constructors)

BAD_PARAM (constructors) occurences:
org.omg.CORBA.BAD_PARAM()
org.omg.CORBA.BAD_PARAM(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_PARAM(java.lang.String)
org.omg.CORBA.BAD_PARAM(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BAD_QOS (constructors)

BAD_QOS (constructors) occurences:
org.omg.CORBA.BAD_QOS()
org.omg.CORBA.BAD_QOS(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_QOS(java.lang.String)
org.omg.CORBA.BAD_QOS(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BAD_TYPECODE (constructors)

BAD_TYPECODE (constructors) occurences:
org.omg.CORBA.BAD_TYPECODE()
org.omg.CORBA.BAD_TYPECODE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.BAD_TYPECODE(java.lang.String)
org.omg.CORBA.BAD_TYPECODE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of BALINESE

BALINESE occurences:
java.awt.font.BALINESE
java.lang.BALINESE
java.lang.BALINESE


Occurences of BAMUM

BAMUM occurences:
java.lang.BAMUM
java.lang.BAMUM


Occurences of BandedSampleModel (constructors)

BandedSampleModel (constructors) occurences:
java.awt.image.BandedSampleModel(int, int, int, int)
java.awt.image.BandedSampleModel(int, int, int, int, int:A, int:A)


Occurences of BASELINE

BASELINE occurences:
java.awt.BASELINE
javax.swing.BASELINE
javax.swing.BASELINE


Occurences of basic

basic occurences:
java.util.basic
javax.swing.plaf.basic


Occurences of BasicArrowButton (constructors)

BasicArrowButton (constructors) occurences:
javax.swing.plaf.basic.BasicArrowButton(int)
javax.swing.plaf.basic.BasicArrowButton(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of BasicAttribute (constructors)

BasicAttribute (constructors) occurences:
javax.naming.directory.BasicAttribute(java.lang.String)
javax.naming.directory.BasicAttribute(java.lang.String, boolean)
javax.naming.directory.BasicAttribute(java.lang.String, java.lang.Object)
javax.naming.directory.BasicAttribute(java.lang.String, java.lang.Object, boolean)


Occurences of BasicAttributes (constructors)

BasicAttributes (constructors) occurences:
javax.naming.directory.BasicAttributes()
javax.naming.directory.BasicAttributes(boolean)
javax.naming.directory.BasicAttributes(java.lang.String, java.lang.Object)
javax.naming.directory.BasicAttributes(java.lang.String, java.lang.Object, boolean)


Occurences of BasicControl (constructors)

BasicControl (constructors) occurences:
javax.naming.ldap.BasicControl(java.lang.String)
javax.naming.ldap.BasicControl(java.lang.String, boolean, byte:A)


Occurences of BasicPermission (constructors)

BasicPermission (constructors) occurences:
java.security.BasicPermission(java.lang.String)
java.security.BasicPermission(java.lang.String, java.lang.String)


Occurences of BasicStroke (constructors)

BasicStroke (constructors) occurences:
java.awt.BasicStroke()
java.awt.BasicStroke(float)
java.awt.BasicStroke(float, int, int)
java.awt.BasicStroke(float, int, int, float)
java.awt.BasicStroke(float, int, int, float, float:A, float)


Occurences of BATAK

BATAK occurences:
java.lang.BATAK
java.lang.BATAK


Occurences of BatchUpdateException (constructors)

BatchUpdateException (constructors) occurences:
java.sql.BatchUpdateException()
java.sql.BatchUpdateException(int:A)
java.sql.BatchUpdateException(int:A, java.lang.Throwable)
java.sql.BatchUpdateException(java.lang.String, int:A)
java.sql.BatchUpdateException(java.lang.String, int:A, java.lang.Throwable)
java.sql.BatchUpdateException(java.lang.String, java.lang.String, int, int:A)
java.sql.BatchUpdateException(java.lang.String, java.lang.String, int, int:A, java.lang.Throwable)
java.sql.BatchUpdateException(java.lang.String, java.lang.String, int, long:A, java.lang.Throwable)
java.sql.BatchUpdateException(java.lang.String, java.lang.String, int:A)
java.sql.BatchUpdateException(java.lang.String, java.lang.String, int:A, java.lang.Throwable)
java.sql.BatchUpdateException(java.lang.Throwable)


Occurences of bcsPreDeserializationHook

bcsPreDeserializationHook occurences:
java.beans.beancontext.BeanContextServicesSupport.bcsPreDeserializationHook(java.io.ObjectInputStream)
java.beans.beancontext.BeanContextSupport.bcsPreDeserializationHook(java.io.ObjectInputStream)


Occurences of bcsPreSerializationHook

bcsPreSerializationHook occurences:
java.beans.beancontext.BeanContextServicesSupport.bcsPreSerializationHook(java.io.ObjectOutputStream)
java.beans.beancontext.BeanContextSupport.bcsPreSerializationHook(java.io.ObjectOutputStream)


Occurences of BeanContextChildSupport (constructors)

BeanContextChildSupport (constructors) occurences:
java.beans.beancontext.BeanContextChildSupport()
java.beans.beancontext.BeanContextChildSupport(java.beans.beancontext.BeanContextChild)


Occurences of BeanContextMembershipEvent (constructors)

BeanContextMembershipEvent (constructors) occurences:
java.beans.beancontext.BeanContextMembershipEvent(java.beans.beancontext.BeanContext, java.lang.Object:A)
java.beans.beancontext.BeanContextMembershipEvent(java.beans.beancontext.BeanContext, java.util.Collection)


Occurences of BeanContextServicesSupport (constructors)

BeanContextServicesSupport (constructors) occurences:
java.beans.beancontext.BeanContextServicesSupport()
java.beans.beancontext.BeanContextServicesSupport(java.beans.beancontext.BeanContextServices)
java.beans.beancontext.BeanContextServicesSupport(java.beans.beancontext.BeanContextServices, java.util.Locale)
java.beans.beancontext.BeanContextServicesSupport(java.beans.beancontext.BeanContextServices, java.util.Locale, boolean)
java.beans.beancontext.BeanContextServicesSupport(java.beans.beancontext.BeanContextServices, java.util.Locale, boolean, boolean)


Occurences of BeanContextSupport (constructors)

BeanContextSupport (constructors) occurences:
java.beans.beancontext.BeanContextSupport()
java.beans.beancontext.BeanContextSupport(java.beans.beancontext.BeanContext)
java.beans.beancontext.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale)
java.beans.beancontext.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean)
java.beans.beancontext.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean, boolean)


Occurences of BeanDescriptor (constructors)

BeanDescriptor (constructors) occurences:
java.beans.BeanDescriptor(java.lang.Class)
java.beans.BeanDescriptor(java.lang.Class, java.lang.Class)


Occurences of before

before occurences:
java.sql.Timestamp.before(java.sql.Timestamp)
java.util.Calendar.before(java.lang.Object)
java.util.Date.before(java.util.Date)


Occurences of begin

begin occurences:
java.nio.channels.spi.AbstractInterruptibleChannel.begin()
java.nio.channels.spi.AbstractSelector.begin()


Occurences of beginDraggingFrame

beginDraggingFrame occurences:
javax.swing.DefaultDesktopManager.beginDraggingFrame(javax.swing.JComponent)
javax.swing.DesktopManager.beginDraggingFrame(javax.swing.JComponent)


Occurences of beginResizingFrame

beginResizingFrame occurences:
javax.swing.DefaultDesktopManager.beginResizingFrame(javax.swing.JComponent, int)
javax.swing.DesktopManager.beginResizingFrame(javax.swing.JComponent, int)


Occurences of BENGALI

BENGALI occurences:
java.awt.font.BENGALI
java.awt.font.BENGALI
java.lang.BENGALI
java.lang.BENGALI


Occurences of between

between occurences:
java.time.chrono.ChronoPeriod.between(java.time.chrono.ChronoLocalDate, java.time.chrono.ChronoLocalDate)
java.time.Duration.between(java.time.temporal.Temporal, java.time.temporal.Temporal)
java.time.Period.between(java.time.LocalDate, java.time.LocalDate)
java.time.temporal.ChronoUnit.between(java.time.temporal.Temporal, java.time.temporal.Temporal)
java.time.temporal.TemporalUnit.between(java.time.temporal.Temporal, java.time.temporal.Temporal)
javax.management.Query.between(javax.management.ValueExp, javax.management.ValueExp, javax.management.ValueExp)


Occurences of BevelBorder (constructors)

BevelBorder (constructors) occurences:
javax.swing.border.BevelBorder(int)
javax.swing.border.BevelBorder(int, java.awt.Color, java.awt.Color)
javax.swing.border.BevelBorder(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of BevelBorderUIResource

BevelBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.BevelBorderUIResource.BevelBorderUIResource(int)
javax.swing.plaf.BorderUIResource.BevelBorderUIResource.BevelBorderUIResource(int, java.awt.Color, java.awt.Color)
javax.swing.plaf.BorderUIResource.BevelBorderUIResource.BevelBorderUIResource(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of Bidi (constructors)

Bidi (constructors) occurences:
java.text.Bidi(char:A, int, byte:A, int, int, int)
java.text.Bidi(java.lang.String, int)
java.text.Bidi(java.text.AttributedCharacterIterator)


Occurences of BigDecimal (constructors)

BigDecimal (constructors) occurences:
java.math.BigDecimal(char:A)
java.math.BigDecimal(char:A, int, int)
java.math.BigDecimal(char:A, int, int, java.math.MathContext)
java.math.BigDecimal(char:A, java.math.MathContext)
java.math.BigDecimal(double)
java.math.BigDecimal(double, java.math.MathContext)
java.math.BigDecimal(int)
java.math.BigDecimal(int, java.math.MathContext)
java.math.BigDecimal(java.lang.String)
java.math.BigDecimal(java.lang.String, java.math.MathContext)
java.math.BigDecimal(java.math.BigInteger)
java.math.BigDecimal(java.math.BigInteger, int)
java.math.BigDecimal(java.math.BigInteger, int, java.math.MathContext)
java.math.BigDecimal(java.math.BigInteger, java.math.MathContext)
java.math.BigDecimal(long)
java.math.BigDecimal(long, java.math.MathContext)


Occurences of BIGINT

BIGINT occurences:
java.sql.BIGINT
java.sql.BIGINT


Occurences of BigInteger (constructors)

BigInteger (constructors) occurences:
java.math.BigInteger(byte:A)
java.math.BigInteger(int, byte:A)
java.math.BigInteger(int, int, java.util.Random)
java.math.BigInteger(int, java.util.Random)
java.math.BigInteger(java.lang.String)
java.math.BigInteger(java.lang.String, int)


Occurences of BINARY

BINARY occurences:
java.sql.BINARY
java.sql.BINARY


Occurences of BinaryRefAddr (constructors)

BinaryRefAddr (constructors) occurences:
javax.naming.BinaryRefAddr(java.lang.String, byte:A)
javax.naming.BinaryRefAddr(java.lang.String, byte:A, int, int)


Occurences of binarySearch

binarySearch occurences:
java.util.Arrays.binarySearch(byte:A, byte)
java.util.Arrays.binarySearch(byte:A, int, int, byte)
java.util.Arrays.binarySearch(char:A, char)
java.util.Arrays.binarySearch(char:A, int, int, char)
java.util.Arrays.binarySearch(double:A, double)
java.util.Arrays.binarySearch(double:A, int, int, double)
java.util.Arrays.binarySearch(float:A, float)
java.util.Arrays.binarySearch(float:A, int, int, float)
java.util.Arrays.binarySearch(int:A, int)
java.util.Arrays.binarySearch(int:A, int, int, int)
java.util.Arrays.binarySearch(java.lang.Object:A, int, int, java.lang.Object)
java.util.Arrays.binarySearch(java.lang.Object:A, int, int, java.lang.Object, java.util.Comparator)
java.util.Arrays.binarySearch(java.lang.Object:A, java.lang.Object)
java.util.Arrays.binarySearch(java.lang.Object:A, java.lang.Object, java.util.Comparator)
java.util.Arrays.binarySearch(long:A, int, int, long)
java.util.Arrays.binarySearch(long:A, long)
java.util.Arrays.binarySearch(short:A, int, int, short)
java.util.Arrays.binarySearch(short:A, short)
java.util.Arrays.binarySearch(T:A, int, int, T, java.util.Comparator)
java.util.Arrays.binarySearch(T:A, T, java.util.Comparator)
java.util.Collections.binarySearch(java.util.List, java.lang.Object)
java.util.Collections.binarySearch(java.util.List, java.lang.Object, java.util.Comparator)
java.util.Collections.binarySearch(java.util.List, T)
java.util.Collections.binarySearch(java.util.List, T, java.util.Comparator)


Occurences of bind

bind occurences:
java.lang.invoke.MethodHandles.Lookup.bind(java.lang.Object, java.lang.String, java.lang.invoke.MethodType)
java.net.DatagramSocket.bind(java.net.SocketAddress)
java.net.DatagramSocketImpl.bind(int, java.net.InetAddress)
java.net.ServerSocket.bind(java.net.SocketAddress)
java.net.ServerSocket.bind(java.net.SocketAddress, int)
java.net.Socket.bind(java.net.SocketAddress)
java.net.SocketImpl.bind(java.net.InetAddress, int)
java.nio.channels.AsynchronousServerSocketChannel.bind(java.net.SocketAddress)
java.nio.channels.AsynchronousServerSocketChannel.bind(java.net.SocketAddress, int)
java.nio.channels.AsynchronousSocketChannel.bind(java.net.SocketAddress)
java.nio.channels.DatagramChannel.bind(java.net.SocketAddress)
java.nio.channels.NetworkChannel.bind(java.net.SocketAddress)
java.nio.channels.ServerSocketChannel.bind(java.net.SocketAddress)
java.nio.channels.ServerSocketChannel.bind(java.net.SocketAddress, int)
java.nio.channels.SocketChannel.bind(java.net.SocketAddress)
java.rmi.Naming.bind(java.lang.String, java.rmi.Remote)
java.rmi.registry.Registry.bind(java.lang.String, java.rmi.Remote)
javax.naming.Context.bind(java.lang.String, java.lang.Object)
javax.naming.Context.bind(javax.naming.Name, java.lang.Object)
javax.naming.directory.DirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.InitialContext.bind(java.lang.String, java.lang.Object)
javax.naming.InitialContext.bind(javax.naming.Name, java.lang.Object)
javax.xml.bind
org.omg.CosNaming.NamingContextOperations.bind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)
org.omg.CosNaming._NamingContextExtStub.bind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)
org.omg.CosNaming._NamingContextStub.bind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)


Occurences of BindException (constructors)

BindException (constructors) occurences:
java.net.BindException()
java.net.BindException(java.lang.String)


Occurences of Binding

Binding occurences:
javax.naming.Binding
javax.xml.ws.Binding
org.omg.CosNaming.Binding


Occurences of Binding (constructors)

Binding (constructors) occurences:
javax.naming.Binding(java.lang.String, java.lang.Object)
javax.naming.Binding(java.lang.String, java.lang.Object, boolean)
javax.naming.Binding(java.lang.String, java.lang.String, java.lang.Object)
javax.naming.Binding(java.lang.String, java.lang.String, java.lang.Object, boolean)
org.omg.CosNaming.Binding()
org.omg.CosNaming.Binding(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.BindingType)


Occurences of BindingHolder (constructors)

BindingHolder (constructors) occurences:
org.omg.CosNaming.BindingHolder()
org.omg.CosNaming.BindingHolder(org.omg.CosNaming.Binding)


Occurences of BindingIteratorHolder (constructors)

BindingIteratorHolder (constructors) occurences:
org.omg.CosNaming.BindingIteratorHolder()
org.omg.CosNaming.BindingIteratorHolder(org.omg.CosNaming.BindingIterator)


Occurences of BindingListHolder (constructors)

BindingListHolder (constructors) occurences:
org.omg.CosNaming.BindingListHolder()
org.omg.CosNaming.BindingListHolder(org.omg.CosNaming.Binding:A)


Occurences of BindingType

BindingType occurences:
javax.xml.ws.BindingType
org.omg.CosNaming.BindingType


Occurences of BindingTypeHolder (constructors)

BindingTypeHolder (constructors) occurences:
org.omg.CosNaming.BindingTypeHolder()
org.omg.CosNaming.BindingTypeHolder(org.omg.CosNaming.BindingType)


Occurences of bind_context

bind_context occurences:
org.omg.CosNaming.NamingContextOperations.bind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)
org.omg.CosNaming._NamingContextExtStub.bind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)
org.omg.CosNaming._NamingContextStub.bind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)


Occurences of bind_new_context

bind_new_context occurences:
org.omg.CosNaming.NamingContextOperations.bind_new_context(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextExtStub.bind_new_context(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextStub.bind_new_context(org.omg.CosNaming.NameComponent:A)


Occurences of BIT

BIT occurences:
java.sql.BIT
java.sql.BIT


Occurences of bitCount

bitCount occurences:
java.lang.Integer.bitCount(int)
java.lang.Long.bitCount(long)
java.math.BigInteger.bitCount()


Occurences of BitSet (constructors)

BitSet (constructors) occurences:
java.util.BitSet()
java.util.BitSet(int)


Occurences of BLOB

BLOB occurences:
java.sql.BLOB
java.sql.BLOB


Occurences of block

block occurences:
java.nio.channels.MembershipKey.block(java.net.InetAddress)
java.util.concurrent.ForkJoinPool.ManagedBlocker.block()


Occurences of blockingLock

blockingLock occurences:
java.nio.channels.SelectableChannel.blockingLock()
java.nio.channels.spi.AbstractSelectableChannel.blockingLock()


Occurences of BMPImageWriteParam (constructors)

BMPImageWriteParam (constructors) occurences:
javax.imageio.plugins.bmp.BMPImageWriteParam()
javax.imageio.plugins.bmp.BMPImageWriteParam(java.util.Locale)


Occurences of BOOLEAN

BOOLEAN occurences:
java.sql.BOOLEAN
java.sql.BOOLEAN
javax.lang.model.type.BOOLEAN
javax.management.openmbean.BOOLEAN
javax.xml.xpath.BOOLEAN


Occurences of Boolean (constructors)

Boolean (constructors) occurences:
java.lang.Boolean(boolean)
java.lang.Boolean(java.lang.String)


Occurences of BooleanControl (constructors)

BooleanControl (constructors) occurences:
javax.sound.sampled.BooleanControl(javax.sound.sampled.BooleanControl.Type, boolean)
javax.sound.sampled.BooleanControl(javax.sound.sampled.BooleanControl.Type, boolean, java.lang.String, java.lang.String)


Occurences of BooleanHolder (constructors)

BooleanHolder (constructors) occurences:
org.omg.CORBA.BooleanHolder()
org.omg.CORBA.BooleanHolder(boolean)


Occurences of BooleanSeqHolder (constructors)

BooleanSeqHolder (constructors) occurences:
org.omg.CORBA.BooleanSeqHolder()
org.omg.CORBA.BooleanSeqHolder(boolean:A)


Occurences of booleanValue

booleanValue occurences:
com.sun.jdi.connect.Connector.BooleanArgument.booleanValue()
com.sun.jdi.PrimitiveValue.booleanValue()
java.lang.Boolean.booleanValue()


Occurences of bootstrap

bootstrap occurences:
compact2.org.w3c.dom.bootstrap
compact3.org.w3c.dom.bootstrap
org.w3c.dom.bootstrap


Occurences of BootstrapMethodError (constructors)

BootstrapMethodError (constructors) occurences:
java.lang.BootstrapMethodError()
java.lang.BootstrapMethodError(java.lang.String)
java.lang.BootstrapMethodError(java.lang.String, java.lang.Throwable)
java.lang.BootstrapMethodError(java.lang.Throwable)


Occurences of BOPOMOFO

BOPOMOFO occurences:
java.lang.BOPOMOFO
java.lang.BOPOMOFO


Occurences of border

border occurences:
javax.swing.border
javax.swing.border.border
javax.swing.tree.border


Occurences of BORDER

BORDER occurences:
javax.swing.text.html.BORDER
javax.swing.text.html.BORDER


Occurences of borderInsets

borderInsets occurences:
javax.swing.plaf.metal.borderInsets
javax.swing.plaf.metal.borderInsets
javax.swing.plaf.metal.borderInsets
javax.swing.plaf.metal.borderInsets


Occurences of BorderLayout (constructors)

BorderLayout (constructors) occurences:
java.awt.BorderLayout()
java.awt.BorderLayout(int, int)


Occurences of borderSelectionColor

borderSelectionColor occurences:
javax.swing.tree.borderSelectionColor
javax.swing.tree.borderSelectionColor


Occurences of bottom

bottom occurences:
java.awt.bottom
javax.swing.border.bottom


Occurences of BOTTOM

BOTTOM occurences:
javax.print.attribute.standard.BOTTOM
javax.swing.border.BOTTOM
javax.swing.BOTTOM
javax.swing.BOTTOM


Occurences of BOTTOM_ALIGNMENT

BOTTOM_ALIGNMENT occurences:
java.awt.BOTTOM_ALIGNMENT
java.awt.font.BOTTOM_ALIGNMENT


Occurences of Bounds

Bounds occurences:
org.omg.CORBA.Bounds
org.omg.CORBA.TypeCodePackage.Bounds


Occurences of bounds

bounds occurences:
com.sun.javadoc.TypeVariable.bounds()
java.awt.bounds
java.awt.Component.bounds()


Occurences of Bounds (constructors)

Bounds (constructors) occurences:
org.omg.CORBA.Bounds()
org.omg.CORBA.Bounds(java.lang.String)
org.omg.CORBA.TypeCodePackage.Bounds()
org.omg.CORBA.TypeCodePackage.Bounds(java.lang.String)


Occurences of boxed

boxed occurences:
java.util.stream.DoubleStream.boxed()
java.util.stream.IntStream.boxed()
java.util.stream.LongStream.boxed()


Occurences of BRAHMI

BRAHMI occurences:
java.lang.BRAHMI
java.lang.BRAHMI


Occurences of breaksFlow

breaksFlow occurences:
javax.swing.text.html.HTML.Tag.breaksFlow()
javax.swing.text.html.parser.TagElement.breaksFlow()


Occurences of breakView

breakView occurences:
javax.swing.text.GlyphView.breakView(int, int, float, float)
javax.swing.text.html.InlineView.breakView(int, int, float, float)
javax.swing.text.ParagraphView.breakView(int, float, java.awt.Shape)
javax.swing.text.View.breakView(int, int, float, float)


Occurences of BROKEN

BROKEN occurences:
java.io.BROKEN
java.io.BROKEN


Occurences of BrokenBarrierException (constructors)

BrokenBarrierException (constructors) occurences:
java.util.concurrent.BrokenBarrierException()
java.util.concurrent.BrokenBarrierException(java.lang.String)


Occurences of buf

buf occurences:
java.io.buf
java.io.buf
java.io.buf
java.io.buf
java.io.buf
java.io.buf
java.io.buf
java.util.zip.buf
java.util.zip.buf
java.util.zip.buf
java.util.zip.buf


Occurences of buffer

buffer occurences:
java.io.buffer
java.io.buffer
javax.swing.text.buffer


Occurences of BufferedImage (constructors)

BufferedImage (constructors) occurences:
java.awt.image.BufferedImage(int, int, int)
java.awt.image.BufferedImage(int, int, int, java.awt.image.IndexColorModel)
java.awt.image.BufferedImage(java.awt.image.ColorModel, java.awt.image.WritableRaster, boolean, java.util.Hashtable)


Occurences of BufferedInputStream (constructors)

BufferedInputStream (constructors) occurences:
java.io.BufferedInputStream(java.io.InputStream)
java.io.BufferedInputStream(java.io.InputStream, int)


Occurences of BufferedOutputStream (constructors)

BufferedOutputStream (constructors) occurences:
java.io.BufferedOutputStream(java.io.OutputStream)
java.io.BufferedOutputStream(java.io.OutputStream, int)


Occurences of BufferedReader (constructors)

BufferedReader (constructors) occurences:
java.io.BufferedReader(java.io.Reader)
java.io.BufferedReader(java.io.Reader, int)


Occurences of BufferedWriter (constructors)

BufferedWriter (constructors) occurences:
java.io.BufferedWriter(java.io.Writer)
java.io.BufferedWriter(java.io.Writer, int)


Occurences of BUGINESE

BUGINESE occurences:
java.lang.BUGINESE
java.lang.BUGINESE


Occurences of BUHID

BUHID occurences:
java.lang.BUHID
java.lang.BUHID


Occurences of build

build occurences:
java.nio.file.attribute.AclEntry.Builder.build()
java.security.cert.CertPathBuilder.build(java.security.cert.CertPathParameters)
java.util.Calendar.Builder.build()
java.util.Locale.Builder.build()
java.util.stream.DoubleStream.Builder.build()
java.util.stream.IntStream.Builder.build()
java.util.stream.LongStream.Builder.build()
java.util.stream.Stream.Builder.build()
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.build()


Occurences of builder

builder occurences:
java.util.stream.DoubleStream.builder()
java.util.stream.IntStream.builder()
java.util.stream.LongStream.builder()
java.util.stream.Stream.builder()


Occurences of Builder

Builder occurences:
java.security.KeyStore.Builder.Builder()
java.util.Calendar.Builder.Builder()
java.util.Locale.Builder.Builder()


Occurences of bumps

bumps occurences:
javax.swing.plaf.metal.bumps
javax.swing.plaf.metal.bumps


Occurences of Button (constructors)

Button (constructors) occurences:
java.awt.Button()
java.awt.Button(java.lang.String)


Occurences of ButtonBorder

ButtonBorder occurences:
javax.swing.plaf.basic.BasicBorders.ButtonBorder.ButtonBorder(java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)
javax.swing.plaf.metal.MetalBorders.ButtonBorder.ButtonBorder()


Occurences of BYTE

BYTE occurences:
javax.lang.model.type.BYTE
javax.management.openmbean.BYTE


Occurences of Byte (constructors)

Byte (constructors) occurences:
java.lang.Byte(byte)
java.lang.Byte(java.lang.String)


Occurences of ByteArrayInputStream (constructors)

ByteArrayInputStream (constructors) occurences:
java.io.ByteArrayInputStream(byte:A)
java.io.ByteArrayInputStream(byte:A, int, int)


Occurences of ByteArrayOutputStream (constructors)

ByteArrayOutputStream (constructors) occurences:
java.io.ByteArrayOutputStream()
java.io.ByteArrayOutputStream(int)


Occurences of ByteHolder (constructors)

ByteHolder (constructors) occurences:
org.omg.CORBA.ByteHolder()
org.omg.CORBA.ByteHolder(byte)


Occurences of ByteLookupTable (constructors)

ByteLookupTable (constructors) occurences:
java.awt.image.ByteLookupTable(int, byte:A)
java.awt.image.ByteLookupTable(int, byte:A:A)


Occurences of BYTES

BYTES occurences:
java.lang.BYTES
java.lang.BYTES
java.lang.BYTES
java.lang.BYTES
java.lang.BYTES
java.lang.BYTES
java.lang.BYTES


Occurences of byteValue

byteValue occurences:
com.sun.jdi.PrimitiveValue.byteValue()
java.lang.Byte.byteValue()
java.lang.Double.byteValue()
java.lang.Float.byteValue()
java.lang.Integer.byteValue()
java.lang.Long.byteValue()
java.lang.Number.byteValue()
java.lang.Short.byteValue()


Occurences of byteValueExact

byteValueExact occurences:
java.math.BigDecimal.byteValueExact()
java.math.BigInteger.byteValueExact()


Occurences of C

C occurences:
java.awt.C
javax.print.attribute.standard.C
javax.print.attribute.standard.C


Occurences of C3

C3 occurences:
java.awt.C3
javax.print.attribute.standard.C3


Occurences of C4

C4 occurences:
java.awt.C4
javax.print.attribute.standard.C4


Occurences of C5

C5 occurences:
java.awt.C5
javax.print.attribute.standard.C5


Occurences of C6

C6 occurences:
java.awt.C6
javax.print.attribute.standard.C6


Occurences of cae

cae occurences:
java.nio.charset.cae
java.nio.charset.cae


Occurences of calculateAlignedPositions

calculateAlignedPositions occurences:
javax.swing.SizeRequirements.calculateAlignedPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements:A, int:A, int:A)
javax.swing.SizeRequirements.calculateAlignedPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements:A, int:A, int:A, boolean)


Occurences of calculateGeometry

calculateGeometry occurences:
javax.swing.plaf.basic.BasicSliderUI.calculateGeometry()
javax.swing.plaf.synth.SynthSliderUI.calculateGeometry()


Occurences of calculateIndex

calculateIndex occurences:
javax.management.openmbean.TabularData.calculateIndex(javax.management.openmbean.CompositeData)
javax.management.openmbean.TabularDataSupport.calculateIndex(javax.management.openmbean.CompositeData)


Occurences of calculateMajorAxisRequirements

calculateMajorAxisRequirements occurences:
javax.swing.text.BoxView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.html.BlockView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements)


Occurences of calculateMaxTabHeight

calculateMaxTabHeight occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabHeight(int)
javax.swing.plaf.metal.MetalTabbedPaneUI.calculateMaxTabHeight(int)
javax.swing.plaf.synth.SynthTabbedPaneUI.calculateMaxTabHeight(int)


Occurences of calculateMaxTabWidth

calculateMaxTabWidth occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabWidth(int)
javax.swing.plaf.synth.SynthTabbedPaneUI.calculateMaxTabWidth(int)


Occurences of calculateMinorAxisRequirements

calculateMinorAxisRequirements occurences:
javax.swing.text.BoxView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.FlowView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.html.BlockView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.ParagraphView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)
javax.swing.text.TableView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)


Occurences of calculateTabWidth

calculateTabWidth occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.calculateTabWidth(int, int, java.awt.FontMetrics)
javax.swing.plaf.synth.SynthTabbedPaneUI.calculateTabWidth(int, int, java.awt.FontMetrics)


Occurences of calculateThumbLocation

calculateThumbLocation occurences:
javax.swing.plaf.basic.BasicSliderUI.calculateThumbLocation()
javax.swing.plaf.synth.SynthSliderUI.calculateThumbLocation()


Occurences of calculateTiledPositions

calculateTiledPositions occurences:
javax.swing.SizeRequirements.calculateTiledPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements:A, int:A, int:A)
javax.swing.SizeRequirements.calculateTiledPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements:A, int:A, int:A, boolean)


Occurences of Calendar (constructors)

Calendar (constructors) occurences:
java.util.Calendar()
java.util.Calendar(java.util.TimeZone, java.util.Locale)


Occurences of call

call occurences:
java.util.concurrent.Callable.call()
javax.tools.DocumentationTool.DocumentationTask.call()
javax.tools.JavaCompiler.CompilationTask.call()
javax.xml.soap.SOAPConnection.call(javax.xml.soap.SOAPMessage, java.lang.Object)


Occurences of callable

callable occurences:
java.util.concurrent.Executors.callable(java.lang.Runnable)
java.util.concurrent.Executors.callable(java.lang.Runnable, java.lang.Object)
java.util.concurrent.Executors.callable(java.lang.Runnable, T)
java.util.concurrent.Executors.callable(java.security.PrivilegedAction)
java.util.concurrent.Executors.callable(java.security.PrivilegedExceptionAction)


Occurences of callback

callback occurences:
compact1.javax.security.auth.callback
compact2.javax.security.auth.callback
compact3.javax.security.auth.callback
javax.security.auth.callback


Occurences of cancel

cancel occurences:
java.awt.print.PrinterJob.cancel()
java.nio.channels.SelectionKey.cancel()
java.nio.channels.spi.AbstractSelectionKey.cancel()
java.nio.file.WatchKey.cancel()
java.sql.Statement.cancel()
java.util.concurrent.CompletableFuture.cancel(boolean)
java.util.concurrent.ForkJoinTask.cancel(boolean)
java.util.concurrent.Future.cancel(boolean)
java.util.concurrent.FutureTask.cancel(boolean)
java.util.Timer.cancel()
java.util.TimerTask.cancel()
javax.print.CancelablePrintJob.cancel()
javax.swing.SwingWorker.cancel(boolean)


Occurences of cancelCellEditing

cancelCellEditing occurences:
javax.swing.AbstractCellEditor.cancelCellEditing()
javax.swing.CellEditor.cancelCellEditing()
javax.swing.DefaultCellEditor.cancelCellEditing()
javax.swing.DefaultCellEditor.EditorDelegate.cancelCellEditing()
javax.swing.tree.DefaultTreeCellEditor.cancelCellEditing()


Occurences of cancelEditing

cancelEditing occurences:
javax.swing.JTree.cancelEditing()
javax.swing.plaf.basic.BasicTreeUI.cancelEditing(javax.swing.JTree)
javax.swing.plaf.multi.MultiTreeUI.cancelEditing(javax.swing.JTree)
javax.swing.plaf.TreeUI.cancelEditing(javax.swing.JTree)


Occurences of CancellationException (constructors)

CancellationException (constructors) occurences:
java.util.concurrent.CancellationException()
java.util.concurrent.CancellationException(java.lang.String)


Occurences of CANCEL_OPTION

CANCEL_OPTION occurences:
javax.swing.CANCEL_OPTION
javax.swing.CANCEL_OPTION


Occurences of canDisplay

canDisplay occurences:
java.awt.Font.canDisplay(char)
java.awt.Font.canDisplay(int)


Occurences of canDisplayUpTo

canDisplayUpTo occurences:
java.awt.Font.canDisplayUpTo(char:A, int, int)
java.awt.Font.canDisplayUpTo(java.lang.String)
java.awt.Font.canDisplayUpTo(java.text.CharacterIterator, int, int)


Occurences of canEncode

canEncode occurences:
java.nio.charset.Charset.canEncode()
java.nio.charset.CharsetEncoder.canEncode(char)
java.nio.charset.CharsetEncoder.canEncode(java.lang.CharSequence)


Occurences of canEncodeImage

canEncodeImage occurences:
javax.imageio.spi.ImageWriterSpi.canEncodeImage(java.awt.image.RenderedImage)
javax.imageio.spi.ImageWriterSpi.canEncodeImage(javax.imageio.ImageTypeSpecifier)


Occurences of canImport

canImport occurences:
javax.swing.TransferHandler.canImport(javax.swing.JComponent, java.awt.datatransfer.DataFlavor:A)
javax.swing.TransferHandler.canImport(javax.swing.TransferHandler.TransferSupport)


Occurences of canNodeAppear

canNodeAppear occurences:
javax.imageio.metadata.IIOMetadataFormat.canNodeAppear(java.lang.String, javax.imageio.ImageTypeSpecifier)
javax.imageio.metadata.IIOMetadataFormatImpl.canNodeAppear(java.lang.String, javax.imageio.ImageTypeSpecifier)


Occurences of CannotProceed (constructors)

CannotProceed (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.CannotProceed()
org.omg.CosNaming.NamingContextPackage.CannotProceed(java.lang.String, org.omg.CosNaming.NamingContext, org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming.NamingContextPackage.CannotProceed(org.omg.CosNaming.NamingContext, org.omg.CosNaming.NameComponent:A)


Occurences of CannotProceedException (constructors)

CannotProceedException (constructors) occurences:
javax.naming.CannotProceedException()
javax.naming.CannotProceedException(java.lang.String)


Occurences of CannotProceedHolder (constructors)

CannotProceedHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder()
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder(org.omg.CosNaming.NamingContextPackage.CannotProceed)


Occurences of canOffsetTiles

canOffsetTiles occurences:
javax.imageio.canOffsetTiles
javax.imageio.ImageWriteParam.canOffsetTiles()


Occurences of canRedo

canRedo occurences:
javax.swing.undo.AbstractUndoableEdit.canRedo()
javax.swing.undo.CompoundEdit.canRedo()
javax.swing.undo.UndoableEdit.canRedo()
javax.swing.undo.UndoManager.canRedo()


Occurences of canSetSourceRenderSize

canSetSourceRenderSize occurences:
javax.imageio.canSetSourceRenderSize
javax.imageio.ImageReadParam.canSetSourceRenderSize()


Occurences of canUndo

canUndo occurences:
javax.swing.undo.AbstractUndoableEdit.canUndo()
javax.swing.undo.CompoundEdit.canUndo()
javax.swing.undo.UndoableEdit.canUndo()
javax.swing.undo.UndoManager.canUndo()


Occurences of canUseCacheFile

canUseCacheFile occurences:
javax.imageio.spi.ImageInputStreamSpi.canUseCacheFile()
javax.imageio.spi.ImageOutputStreamSpi.canUseCacheFile()


Occurences of Canvas (constructors)

Canvas (constructors) occurences:
java.awt.Canvas()
java.awt.Canvas(java.awt.GraphicsConfiguration)


Occurences of canWriteCompressed

canWriteCompressed occurences:
javax.imageio.canWriteCompressed
javax.imageio.ImageWriteParam.canWriteCompressed()


Occurences of canWriteProgressive

canWriteProgressive occurences:
javax.imageio.canWriteProgressive
javax.imageio.ImageWriteParam.canWriteProgressive()


Occurences of canWriteTiles

canWriteTiles occurences:
javax.imageio.canWriteTiles
javax.imageio.ImageWriteParam.canWriteTiles()


Occurences of capacity

capacity occurences:
java.lang.StringBuffer.capacity()
java.lang.StringBuilder.capacity()
java.nio.Buffer.capacity()
java.util.Vector.capacity()
javax.swing.DefaultListModel.capacity()


Occurences of capacityIncrement

capacityIncrement occurences:
java.util.capacityIncrement
javax.management.monitor.capacityIncrement


Occurences of caps

caps occurences:
java.awt.caps
java.awt.caps


Occurences of CardLayout (constructors)

CardLayout (constructors) occurences:
java.awt.CardLayout()
java.awt.CardLayout(int, int)


Occurences of caretPositionChanged

caretPositionChanged occurences:
java.awt.AWTEventMulticaster.caretPositionChanged(java.awt.event.InputMethodEvent)
java.awt.event.InputMethodListener.caretPositionChanged(java.awt.event.InputMethodEvent)


Occurences of caretUpdate

caretUpdate occurences:
javax.swing.event.CaretListener.caretUpdate(javax.swing.event.CaretEvent)
javax.swing.text.JTextComponent.AccessibleJTextComponent.caretUpdate(javax.swing.event.CaretEvent)


Occurences of CARIAN

CARIAN occurences:
java.lang.CARIAN
java.lang.CARIAN


Occurences of cbrt

cbrt occurences:
java.lang.Math.cbrt(double)
java.lang.StrictMath.cbrt(double)


Occurences of CDATA

CDATA occurences:
javax.swing.text.html.parser.CDATA
javax.xml.stream.CDATA


Occurences of ce

ce occurences:
java.nio.charset.ce
java.nio.charset.ce


Occurences of ceil

ceil occurences:
java.lang.Math.ceil(double)
java.lang.StrictMath.ceil(double)


Occurences of ceiling

ceiling occurences:
java.util.concurrent.ConcurrentSkipListSet.ceiling(E)
java.util.concurrent.ConcurrentSkipListSet.ceiling(java.lang.Object)
java.util.NavigableSet.ceiling(E)
java.util.NavigableSet.ceiling(java.lang.Object)
java.util.TreeSet.ceiling(E)
java.util.TreeSet.ceiling(java.lang.Object)


Occurences of ceilingEntry

ceilingEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.ceilingEntry(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.ceilingEntry(K)
java.util.NavigableMap.ceilingEntry(java.lang.Object)
java.util.NavigableMap.ceilingEntry(K)
java.util.TreeMap.ceilingEntry(java.lang.Object)
java.util.TreeMap.ceilingEntry(K)


Occurences of ceilingKey

ceilingKey occurences:
java.util.concurrent.ConcurrentSkipListMap.ceilingKey(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.ceilingKey(K)
java.util.NavigableMap.ceilingKey(java.lang.Object)
java.util.NavigableMap.ceilingKey(K)
java.util.TreeMap.ceilingKey(java.lang.Object)
java.util.TreeMap.ceilingKey(K)


Occurences of cellEditor

cellEditor occurences:
javax.swing.cellEditor
javax.swing.cellEditor
javax.swing.plaf.basic.cellEditor
javax.swing.table.cellEditor


Occurences of cellRenderer

cellRenderer occurences:
javax.swing.cellRenderer
javax.swing.table.cellRenderer


Occurences of CELL_RENDERER_PROPERTY

CELL_RENDERER_PROPERTY occurences:
javax.swing.CELL_RENDERER_PROPERTY
javax.swing.table.CELL_RENDERER_PROPERTY


Occurences of CENATT

CENATT occurences:
java.util.jar.CENATT
java.util.jar.CENATT
java.util.jar.CENATT
java.util.jar.CENATT
java.util.zip.CENATT
java.util.zip.CENATT
java.util.zip.CENATT
java.util.zip.CENATT


Occurences of CENATX

CENATX occurences:
java.util.jar.CENATX
java.util.jar.CENATX
java.util.jar.CENATX
java.util.jar.CENATX
java.util.zip.CENATX
java.util.zip.CENATX
java.util.zip.CENATX
java.util.zip.CENATX


Occurences of CENCOM

CENCOM occurences:
java.util.jar.CENCOM
java.util.jar.CENCOM
java.util.jar.CENCOM
java.util.jar.CENCOM
java.util.zip.CENCOM
java.util.zip.CENCOM
java.util.zip.CENCOM
java.util.zip.CENCOM


Occurences of CENCRC

CENCRC occurences:
java.util.jar.CENCRC
java.util.jar.CENCRC
java.util.jar.CENCRC
java.util.jar.CENCRC
java.util.zip.CENCRC
java.util.zip.CENCRC
java.util.zip.CENCRC
java.util.zip.CENCRC


Occurences of CENDSK

CENDSK occurences:
java.util.jar.CENDSK
java.util.jar.CENDSK
java.util.jar.CENDSK
java.util.jar.CENDSK
java.util.zip.CENDSK
java.util.zip.CENDSK
java.util.zip.CENDSK
java.util.zip.CENDSK


Occurences of CENEXT

CENEXT occurences:
java.util.jar.CENEXT
java.util.jar.CENEXT
java.util.jar.CENEXT
java.util.jar.CENEXT
java.util.zip.CENEXT
java.util.zip.CENEXT
java.util.zip.CENEXT
java.util.zip.CENEXT


Occurences of CENFLG

CENFLG occurences:
java.util.jar.CENFLG
java.util.jar.CENFLG
java.util.jar.CENFLG
java.util.jar.CENFLG
java.util.zip.CENFLG
java.util.zip.CENFLG
java.util.zip.CENFLG
java.util.zip.CENFLG


Occurences of CENHDR

CENHDR occurences:
java.util.jar.CENHDR
java.util.jar.CENHDR
java.util.jar.CENHDR
java.util.jar.CENHDR
java.util.zip.CENHDR
java.util.zip.CENHDR
java.util.zip.CENHDR
java.util.zip.CENHDR


Occurences of CENHOW

CENHOW occurences:
java.util.jar.CENHOW
java.util.jar.CENHOW
java.util.jar.CENHOW
java.util.jar.CENHOW
java.util.zip.CENHOW
java.util.zip.CENHOW
java.util.zip.CENHOW
java.util.zip.CENHOW


Occurences of CENLEN

CENLEN occurences:
java.util.jar.CENLEN
java.util.jar.CENLEN
java.util.jar.CENLEN
java.util.jar.CENLEN
java.util.zip.CENLEN
java.util.zip.CENLEN
java.util.zip.CENLEN
java.util.zip.CENLEN


Occurences of CENNAM

CENNAM occurences:
java.util.jar.CENNAM
java.util.jar.CENNAM
java.util.jar.CENNAM
java.util.jar.CENNAM
java.util.zip.CENNAM
java.util.zip.CENNAM
java.util.zip.CENNAM
java.util.zip.CENNAM


Occurences of CENOFF

CENOFF occurences:
java.util.jar.CENOFF
java.util.jar.CENOFF
java.util.jar.CENOFF
java.util.jar.CENOFF
java.util.zip.CENOFF
java.util.zip.CENOFF
java.util.zip.CENOFF
java.util.zip.CENOFF


Occurences of CENSIG

CENSIG occurences:
java.util.jar.CENSIG
java.util.jar.CENSIG
java.util.jar.CENSIG
java.util.jar.CENSIG
java.util.zip.CENSIG
java.util.zip.CENSIG
java.util.zip.CENSIG
java.util.zip.CENSIG


Occurences of CENSIZ

CENSIZ occurences:
java.util.jar.CENSIZ
java.util.jar.CENSIZ
java.util.jar.CENSIZ
java.util.jar.CENSIZ
java.util.zip.CENSIZ
java.util.zip.CENSIZ
java.util.zip.CENSIZ
java.util.zip.CENSIZ


Occurences of CENTER

CENTER occurences:
java.awt.CENTER
java.awt.CENTER
java.awt.CENTER
java.awt.CENTER
javax.swing.border.CENTER
javax.swing.CENTER
javax.swing.CENTER
javax.swing.text.html.CENTER


Occurences of CENTER_BASELINE

CENTER_BASELINE occurences:
java.awt.CENTER_BASELINE
java.awt.font.CENTER_BASELINE


Occurences of CENTIM

CENTIM occurences:
java.util.jar.CENTIM
java.util.jar.CENTIM
java.util.jar.CENTIM
java.util.jar.CENTIM
java.util.zip.CENTIM
java.util.zip.CENTIM
java.util.zip.CENTIM
java.util.zip.CENTIM


Occurences of CENVEM

CENVEM occurences:
java.util.jar.CENVEM
java.util.jar.CENVEM
java.util.jar.CENVEM
java.util.jar.CENVEM
java.util.zip.CENVEM
java.util.zip.CENVEM
java.util.zip.CENVEM
java.util.zip.CENVEM


Occurences of CENVER

CENVER occurences:
java.util.jar.CENVER
java.util.jar.CENVER
java.util.jar.CENVER
java.util.jar.CENVER
java.util.zip.CENVER
java.util.zip.CENVER
java.util.zip.CENVER
java.util.zip.CENVER


Occurences of cert

cert occurences:
compact1.java.security.cert
compact1.javax.security.cert
compact2.java.security.cert
compact2.javax.security.cert
compact3.java.security.cert
compact3.javax.security.cert
java.security.cert
javax.security.cert


Occurences of Certificate

Certificate occurences:
java.security.Certificate
java.security.cert.Certificate
javax.security.cert.Certificate


Occurences of Certificate (constructors)

Certificate (constructors) occurences:
java.security.cert.Certificate(java.lang.String)
javax.security.cert.Certificate()


Occurences of CertificateEncodingException

CertificateEncodingException occurences:
java.security.cert.CertificateEncodingException
javax.security.cert.CertificateEncodingException


Occurences of CertificateEncodingException (constructors)

CertificateEncodingException (constructors) occurences:
java.security.cert.CertificateEncodingException()
java.security.cert.CertificateEncodingException(java.lang.String)
java.security.cert.CertificateEncodingException(java.lang.String, java.lang.Throwable)
java.security.cert.CertificateEncodingException(java.lang.Throwable)
javax.security.cert.CertificateEncodingException()
javax.security.cert.CertificateEncodingException(java.lang.String)


Occurences of CertificateException

CertificateException occurences:
java.security.cert.CertificateException
javax.security.cert.CertificateException


Occurences of CertificateException (constructors)

CertificateException (constructors) occurences:
java.security.cert.CertificateException()
java.security.cert.CertificateException(java.lang.String)
java.security.cert.CertificateException(java.lang.String, java.lang.Throwable)
java.security.cert.CertificateException(java.lang.Throwable)
javax.security.cert.CertificateException()
javax.security.cert.CertificateException(java.lang.String)


Occurences of CertificateExpiredException

CertificateExpiredException occurences:
java.security.cert.CertificateExpiredException
javax.security.cert.CertificateExpiredException


Occurences of CertificateExpiredException (constructors)

CertificateExpiredException (constructors) occurences:
java.security.cert.CertificateExpiredException()
java.security.cert.CertificateExpiredException(java.lang.String)
javax.security.cert.CertificateExpiredException()
javax.security.cert.CertificateExpiredException(java.lang.String)


Occurences of CertificateNotYetValidException

CertificateNotYetValidException occurences:
java.security.cert.CertificateNotYetValidException
javax.security.cert.CertificateNotYetValidException


Occurences of CertificateNotYetValidException (constructors)

CertificateNotYetValidException (constructors) occurences:
java.security.cert.CertificateNotYetValidException()
java.security.cert.CertificateNotYetValidException(java.lang.String)
javax.security.cert.CertificateNotYetValidException()
javax.security.cert.CertificateNotYetValidException(java.lang.String)


Occurences of CertificateParsingException

CertificateParsingException occurences:
java.security.cert.CertificateParsingException
javax.security.cert.CertificateParsingException


Occurences of CertificateParsingException (constructors)

CertificateParsingException (constructors) occurences:
java.security.cert.CertificateParsingException()
java.security.cert.CertificateParsingException(java.lang.String)
java.security.cert.CertificateParsingException(java.lang.String, java.lang.Throwable)
java.security.cert.CertificateParsingException(java.lang.Throwable)
javax.security.cert.CertificateParsingException()
javax.security.cert.CertificateParsingException(java.lang.String)


Occurences of CertPathBuilderException (constructors)

CertPathBuilderException (constructors) occurences:
java.security.cert.CertPathBuilderException()
java.security.cert.CertPathBuilderException(java.lang.String)
java.security.cert.CertPathBuilderException(java.lang.String, java.lang.Throwable)
java.security.cert.CertPathBuilderException(java.lang.Throwable)


Occurences of CertPathValidatorException (constructors)

CertPathValidatorException (constructors) occurences:
java.security.cert.CertPathValidatorException()
java.security.cert.CertPathValidatorException(java.lang.String)
java.security.cert.CertPathValidatorException(java.lang.String, java.lang.Throwable)
java.security.cert.CertPathValidatorException(java.lang.String, java.lang.Throwable, java.security.cert.CertPath, int)
java.security.cert.CertPathValidatorException(java.lang.String, java.lang.Throwable, java.security.cert.CertPath, int, java.security.cert.CertPathValidatorException.Reason)
java.security.cert.CertPathValidatorException(java.lang.Throwable)


Occurences of CertStoreException (constructors)

CertStoreException (constructors) occurences:
java.security.cert.CertStoreException()
java.security.cert.CertStoreException(java.lang.String)
java.security.cert.CertStoreException(java.lang.String, java.lang.Throwable)
java.security.cert.CertStoreException(java.lang.Throwable)


Occurences of CHAKMA

CHAKMA occurences:
java.lang.CHAKMA
java.lang.CHAKMA


Occurences of CHAM

CHAM occurences:
java.awt.font.CHAM
java.lang.CHAM
java.lang.CHAM


Occurences of changedUpdate

changedUpdate occurences:
javax.swing.event.DocumentListener.changedUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.FlowView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.FlowView.FlowStrategy.changedUpdate(javax.swing.text.FlowView, javax.swing.event.DocumentEvent, java.awt.Rectangle)
javax.swing.text.GlyphView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.html.BlockView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.html.ImageView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.html.InlineView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.JTextComponent.AccessibleJTextComponent.changedUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.LabelView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.ParagraphView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.PlainView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.WrappedPlainView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)


Occurences of changeEvent

changeEvent occurences:
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.changeEvent
javax.swing.colorchooser.changeEvent
javax.swing.table.changeEvent
javax.swing.text.changeEvent
javax.swing.text.changeEvent


Occurences of ChangeHandler

ChangeHandler occurences:
javax.swing.plaf.basic.BasicMenuUI.ChangeHandler.ChangeHandler(javax.swing.JMenu, javax.swing.plaf.basic.BasicMenuUI)
javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler.ChangeHandler()
javax.swing.plaf.basic.BasicSliderUI.ChangeHandler.ChangeHandler()


Occurences of changeHighlight

changeHighlight occurences:
javax.swing.text.DefaultHighlighter.changeHighlight(java.lang.Object, int, int)
javax.swing.text.Highlighter.changeHighlight(java.lang.Object, int, int)


Occurences of changeListener

changeListener occurences:
javax.swing.changeListener
javax.swing.changeListener
javax.swing.changeListener
javax.swing.changeListener
javax.swing.plaf.basic.changeListener
javax.swing.plaf.basic.changeListener
javax.swing.plaf.basic.changeListener
javax.swing.plaf.basic.changeListener


Occurences of changeSupport

changeSupport occurences:
javax.swing.changeSupport
javax.swing.tree.changeSupport


Occurences of channel

channel occurences:
java.nio.channels.FileLock.channel()
java.nio.channels.MembershipKey.channel()
java.nio.channels.SelectionKey.channel()
javax.sound.midi.channel


Occurences of ChannelBinding (constructors)

ChannelBinding (constructors) occurences:
org.ietf.jgss.ChannelBinding(byte:A)
org.ietf.jgss.ChannelBinding(java.net.InetAddress, java.net.InetAddress, byte:A)


Occurences of channels

channels occurences:
compact1.java.nio.channels
compact2.java.nio.channels
compact3.java.nio.channels
java.nio.channels
javax.sound.sampled.channels


Occurences of CHAR

CHAR occurences:
java.sql.CHAR
java.sql.CHAR
javax.lang.model.type.CHAR


Occurences of CHARACTER

CHARACTER occurences:
javax.accessibility.CHARACTER
javax.management.openmbean.CHARACTER


Occurences of characteristics

characteristics occurences:
java.util.Spliterator.characteristics()
java.util.Spliterators.AbstractDoubleSpliterator.characteristics()
java.util.Spliterators.AbstractIntSpliterator.characteristics()
java.util.Spliterators.AbstractLongSpliterator.characteristics()
java.util.Spliterators.AbstractSpliterator.characteristics()
java.util.stream.Collector.characteristics()


Occurences of characters

characters occurences:
org.xml.sax.ContentHandler.characters(char:A, int, int)
org.xml.sax.DocumentHandler.characters(char:A, int, int)
org.xml.sax.HandlerBase.characters(char:A, int, int)
org.xml.sax.helpers.DefaultHandler.characters(char:A, int, int)
org.xml.sax.helpers.ParserAdapter.characters(char:A, int, int)
org.xml.sax.helpers.XMLFilterImpl.characters(char:A, int, int)
org.xml.sax.helpers.XMLReaderAdapter.characters(char:A, int, int)


Occurences of CharArrayReader (constructors)

CharArrayReader (constructors) occurences:
java.io.CharArrayReader(char:A)
java.io.CharArrayReader(char:A, int, int)


Occurences of CharArrayWriter (constructors)

CharArrayWriter (constructors) occurences:
java.io.CharArrayWriter()
java.io.CharArrayWriter(int)


Occurences of charAt

charAt occurences:
java.lang.CharSequence.charAt(int)
java.lang.String.charAt(int)
java.lang.StringBuffer.charAt(int)
java.lang.StringBuilder.charAt(int)
java.nio.CharBuffer.charAt(int)
javax.swing.text.Segment.charAt(int)


Occurences of CharConversionException (constructors)

CharConversionException (constructors) occurences:
java.io.CharConversionException()
java.io.CharConversionException(java.lang.String)


Occurences of CharHolder (constructors)

CharHolder (constructors) occurences:
org.omg.CORBA.CharHolder()
org.omg.CORBA.CharHolder(char)


Occurences of chars

chars occurences:
java.lang.CharSequence.chars()
java.nio.CharBuffer.chars()


Occurences of CharSeqHolder (constructors)

CharSeqHolder (constructors) occurences:
org.omg.CORBA.CharSeqHolder()
org.omg.CORBA.CharSeqHolder(char:A)


Occurences of charset

charset occurences:
compact1.java.nio.charset
compact2.java.nio.charset
compact3.java.nio.charset
java.nio.charset
java.nio.charset.CharsetDecoder.charset()
java.nio.charset.CharsetEncoder.charset()


Occurences of CharsetEncoder (constructors)

CharsetEncoder (constructors) occurences:
java.nio.charset.CharsetEncoder(java.nio.charset.Charset, float, float)
java.nio.charset.CharsetEncoder(java.nio.charset.Charset, float, float, byte:A)


Occurences of charValue

charValue occurences:
com.sun.jdi.PrimitiveValue.charValue()
java.lang.Character.charValue()


Occurences of charWidth

charWidth occurences:
java.awt.FontMetrics.charWidth(char)
java.awt.FontMetrics.charWidth(int)


Occurences of check

check occurences:
java.security.cert.CertPathChecker.check(java.security.cert.Certificate)
java.security.cert.PKIXCertPathChecker.check(java.security.cert.Certificate)
java.security.cert.PKIXCertPathChecker.check(java.security.cert.Certificate, java.util.Collection)
javax.management.loading.MLet.check(java.lang.String, java.net.URL, java.lang.String, javax.management.loading.MLetContent)


Occurences of checkAccess

checkAccess occurences:
java.lang.SecurityManager.checkAccess(java.lang.Thread)
java.lang.SecurityManager.checkAccess(java.lang.ThreadGroup)
java.lang.Thread.checkAccess()
java.lang.ThreadGroup.checkAccess()
java.nio.file.spi.FileSystemProvider.checkAccess(java.nio.file.Path, java.nio.file.AccessMode...)
java.util.logging.LogManager.checkAccess()


Occurences of checkAll

checkAll occurences:
java.awt.MediaTracker.checkAll()
java.awt.MediaTracker.checkAll(boolean)


Occurences of Checkbox (constructors)

Checkbox (constructors) occurences:
java.awt.Checkbox()
java.awt.Checkbox(java.lang.String)
java.awt.Checkbox(java.lang.String, boolean)
java.awt.Checkbox(java.lang.String, boolean, java.awt.CheckboxGroup)
java.awt.Checkbox(java.lang.String, java.awt.CheckboxGroup, boolean)


Occurences of CheckboxMenuItem (constructors)

CheckboxMenuItem (constructors) occurences:
java.awt.CheckboxMenuItem()
java.awt.CheckboxMenuItem(java.lang.String)
java.awt.CheckboxMenuItem(java.lang.String, boolean)


Occurences of checkClientTrusted

checkClientTrusted occurences:
javax.net.ssl.X509ExtendedTrustManager.checkClientTrusted(java.security.cert.X509Certificate:A, java.lang.String, java.net.Socket)
javax.net.ssl.X509ExtendedTrustManager.checkClientTrusted(java.security.cert.X509Certificate:A, java.lang.String, javax.net.ssl.SSLEngine)
javax.net.ssl.X509TrustManager.checkClientTrusted(java.security.cert.X509Certificate:A, java.lang.String)


Occurences of checkConnect

checkConnect occurences:
java.lang.SecurityManager.checkConnect(java.lang.String, int)
java.lang.SecurityManager.checkConnect(java.lang.String, int, java.lang.Object)


Occurences of CHECKED

CHECKED occurences:
javax.accessibility.CHECKED
javax.swing.text.html.CHECKED


Occurences of checkError

checkError occurences:
java.io.PrintStream.checkError()
java.io.PrintWriter.checkError()


Occurences of checkGuard

checkGuard occurences:
java.security.Guard.checkGuard(java.lang.Object)
java.security.Permission.checkGuard(java.lang.Object)


Occurences of checkHorizontalKey

checkHorizontalKey occurences:
javax.swing.AbstractButton.checkHorizontalKey(int, java.lang.String)
javax.swing.JLabel.checkHorizontalKey(int, java.lang.String)


Occurences of checkID

checkID occurences:
java.awt.MediaTracker.checkID(int)
java.awt.MediaTracker.checkID(int, boolean)


Occurences of checkImage

checkImage occurences:
java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver)
java.awt.Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)


Occurences of checkMulticast

checkMulticast occurences:
java.lang.SecurityManager.checkMulticast(java.net.InetAddress)
java.lang.SecurityManager.checkMulticast(java.net.InetAddress, byte)


Occurences of checkPermission

checkPermission occurences:
java.lang.SecurityManager.checkPermission(java.security.Permission)
java.lang.SecurityManager.checkPermission(java.security.Permission, java.lang.Object)
java.security.AccessControlContext.checkPermission(java.security.Permission)
java.security.AccessController.checkPermission(java.security.Permission)
java.security.acl.Acl.checkPermission(java.security.Principal, java.security.acl.Permission)
java.security.acl.AclEntry.checkPermission(java.security.acl.Permission)


Occurences of checkRead

checkRead occurences:
java.lang.SecurityManager.checkRead(java.io.FileDescriptor)
java.lang.SecurityManager.checkRead(java.lang.String)
java.lang.SecurityManager.checkRead(java.lang.String, java.lang.Object)


Occurences of checkRoleReading

checkRoleReading occurences:
javax.management.relation.RelationService.checkRoleReading(java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.checkRoleReading(java.lang.String, java.lang.String)


Occurences of checkRoleWriting

checkRoleWriting occurences:
javax.management.relation.RelationService.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean)
javax.management.relation.RelationServiceMBean.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean)


Occurences of checkServerTrusted

checkServerTrusted occurences:
javax.net.ssl.X509ExtendedTrustManager.checkServerTrusted(java.security.cert.X509Certificate:A, java.lang.String, java.net.Socket)
javax.net.ssl.X509ExtendedTrustManager.checkServerTrusted(java.security.cert.X509Certificate:A, java.lang.String, javax.net.ssl.SSLEngine)
javax.net.ssl.X509TrustManager.checkServerTrusted(java.security.cert.X509Certificate:A, java.lang.String)


Occurences of checkValidIntValue

checkValidIntValue occurences:
java.time.temporal.ChronoField.checkValidIntValue(long)
java.time.temporal.ValueRange.checkValidIntValue(long, java.time.temporal.TemporalField)


Occurences of checkValidity

checkValidity occurences:
java.security.cert.X509Certificate.checkValidity()
java.security.cert.X509Certificate.checkValidity(java.util.Date)
javax.security.cert.X509Certificate.checkValidity()
javax.security.cert.X509Certificate.checkValidity(java.util.Date)


Occurences of checkValidValue

checkValidValue occurences:
java.time.temporal.ChronoField.checkValidValue(long)
java.time.temporal.ValueRange.checkValidValue(long, java.time.temporal.TemporalField)


Occurences of checkVerticalKey

checkVerticalKey occurences:
javax.swing.AbstractButton.checkVerticalKey(int, java.lang.String)
javax.swing.JLabel.checkVerticalKey(int, java.lang.String)


Occurences of checkWrite

checkWrite occurences:
java.lang.SecurityManager.checkWrite(java.io.FileDescriptor)
java.lang.SecurityManager.checkWrite(java.lang.String)


Occurences of CHECK_BOX

CHECK_BOX occurences:
javax.accessibility.CHECK_BOX
javax.swing.plaf.synth.CHECK_BOX


Occurences of CHEROKEE

CHEROKEE occurences:
java.lang.CHEROKEE
java.lang.CHEROKEE


Occurences of childAllocation

childAllocation occurences:
javax.swing.text.BoxView.childAllocation(int, java.awt.Rectangle)
javax.swing.text.CompositeView.childAllocation(int, java.awt.Rectangle)


Occurences of childJustRemovedHook

childJustRemovedHook occurences:
java.beans.beancontext.BeanContextServicesSupport.childJustRemovedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild)
java.beans.beancontext.BeanContextSupport.childJustRemovedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild)


Occurences of children

children occurences:
java.beans.beancontext.children
java.beans.beancontext.children
javax.swing.event.children
javax.swing.JTree.DynamicUtilTreeNode.children()
javax.swing.text.AbstractDocument.AbstractElement.children()
javax.swing.text.AbstractDocument.BranchElement.children()
javax.swing.text.AbstractDocument.LeafElement.children()
javax.swing.tree.children
javax.swing.tree.DefaultMutableTreeNode.children()
javax.swing.tree.TreeNode.children()


Occurences of childrenNames

childrenNames occurences:
java.util.prefs.AbstractPreferences.childrenNames()
java.util.prefs.Preferences.childrenNames()


Occurences of childValue

childValue occurences:
java.lang.InheritableThreadLocal.childValue(java.lang.Object)
java.lang.InheritableThreadLocal.childValue(T)
javax.swing.childValue


Occurences of ChoiceFormat (constructors)

ChoiceFormat (constructors) occurences:
java.text.ChoiceFormat(double:A, java.lang.String:A)
java.text.ChoiceFormat(java.lang.String)


Occurences of choices

choices occurences:
com.sun.jdi.connect.Connector.SelectedArgument.choices()
java.sql.choices


Occurences of chrono

chrono occurences:
compact1.java.time.chrono
compact2.java.time.chrono
compact3.java.time.chrono
java.time.chrono


Occurences of CipherInputStream (constructors)

CipherInputStream (constructors) occurences:
javax.crypto.CipherInputStream(java.io.InputStream)
javax.crypto.CipherInputStream(java.io.InputStream, javax.crypto.Cipher)


Occurences of CipherOutputStream (constructors)

CipherOutputStream (constructors) occurences:
javax.crypto.CipherOutputStream(java.io.OutputStream)
javax.crypto.CipherOutputStream(java.io.OutputStream, javax.crypto.Cipher)


Occurences of CLASS

CLASS occurences:
com.sun.source.tree.CLASS
java.lang.annotation.CLASS
javax.lang.model.element.CLASS
javax.swing.text.html.CLASS
javax.tools.CLASS


Occurences of ClassCastException (constructors)

ClassCastException (constructors) occurences:
java.lang.ClassCastException()
java.lang.ClassCastException(java.lang.String)


Occurences of ClassCircularityError (constructors)

ClassCircularityError (constructors) occurences:
java.lang.ClassCircularityError()
java.lang.ClassCircularityError(java.lang.String)


Occurences of ClassFormatError (constructors)

ClassFormatError (constructors) occurences:
java.lang.ClassFormatError()
java.lang.ClassFormatError(java.lang.String)


Occurences of ClassLoader (constructors)

ClassLoader (constructors) occurences:
java.lang.ClassLoader()
java.lang.ClassLoader(java.lang.ClassLoader)


Occurences of className

className occurences:
com.sun.jdi.ClassNotLoadedException.className()
com.sun.jdi.event.ClassUnloadEvent.className()
javax.jws.soap.SOAPMessageHandler.className()
javax.naming.className
javax.xml.ws.FaultAction.className()
javax.xml.ws.RequestWrapper.className()
javax.xml.ws.ResponseWrapper.className()


Occurences of ClassNotFoundException (constructors)

ClassNotFoundException (constructors) occurences:
java.lang.ClassNotFoundException()
java.lang.ClassNotFoundException(java.lang.String)
java.lang.ClassNotFoundException(java.lang.String, java.lang.Throwable)


Occurences of ClassNotLoadedException (constructors)

ClassNotLoadedException (constructors) occurences:
com.sun.jdi.ClassNotLoadedException(java.lang.String)
com.sun.jdi.ClassNotLoadedException(java.lang.String, java.lang.String)


Occurences of ClassNotPreparedException (constructors)

ClassNotPreparedException (constructors) occurences:
com.sun.jdi.ClassNotPreparedException()
com.sun.jdi.ClassNotPreparedException(java.lang.String)


Occurences of CLASS_OUTPUT

CLASS_OUTPUT occurences:
java.awt.color.CLASS_OUTPUT
javax.tools.CLASS_OUTPUT


Occurences of CLASS_PATH

CLASS_PATH occurences:
java.util.jar.CLASS_PATH
javax.tools.CLASS_PATH


Occurences of CLEAR

CLEAR occurences:
java.awt.CLEAR
javax.swing.text.html.CLEAR
javax.swing.text.html.CLEAR


Occurences of clear

clear occurences:
java.awt.List.clear()
java.awt.RenderingHints.clear()
java.beans.beancontext.BeanContextSupport.clear()
java.lang.ref.Reference.clear()
java.nio.Buffer.clear()
java.security.Provider.clear()
java.util.AbstractCollection.clear()
java.util.AbstractList.clear()
java.util.AbstractMap.clear()
java.util.AbstractQueue.clear()
java.util.ArrayDeque.clear()
java.util.ArrayList.clear()
java.util.BitSet.clear()
java.util.BitSet.clear(int)
java.util.BitSet.clear(int, int)
java.util.Calendar.clear()
java.util.Calendar.clear(int)
java.util.Collection.clear()
java.util.concurrent.ArrayBlockingQueue.clear()
java.util.concurrent.ConcurrentHashMap.clear()
java.util.concurrent.ConcurrentHashMap.KeySetView.clear()
java.util.concurrent.ConcurrentLinkedDeque.clear()
java.util.concurrent.ConcurrentSkipListMap.clear()
java.util.concurrent.ConcurrentSkipListSet.clear()
java.util.concurrent.CopyOnWriteArrayList.clear()
java.util.concurrent.CopyOnWriteArraySet.clear()
java.util.concurrent.DelayQueue.clear()
java.util.concurrent.LinkedBlockingDeque.clear()
java.util.concurrent.LinkedBlockingQueue.clear()
java.util.concurrent.PriorityBlockingQueue.clear()
java.util.concurrent.SynchronousQueue.clear()
java.util.EnumMap.clear()
java.util.HashMap.clear()
java.util.HashSet.clear()
java.util.Hashtable.clear()
java.util.IdentityHashMap.clear()
java.util.jar.Attributes.clear()
java.util.jar.Manifest.clear()
java.util.LinkedHashMap.clear()
java.util.LinkedList.clear()
java.util.List.clear()
java.util.Locale.Builder.clear()
java.util.Map.clear()
java.util.prefs.AbstractPreferences.clear()
java.util.prefs.Preferences.clear()
java.util.PriorityQueue.clear()
java.util.Set.clear()
java.util.TreeMap.clear()
java.util.TreeSet.clear()
java.util.Vector.clear()
java.util.WeakHashMap.clear()
javax.accessibility.AccessibleRelationSet.clear()
javax.accessibility.AccessibleStateSet.clear()
javax.management.openmbean.TabularData.clear()
javax.management.openmbean.TabularDataSupport.clear()
javax.naming.directory.Attribute.clear()
javax.naming.directory.BasicAttribute.clear()
javax.naming.Reference.clear()
javax.print.attribute.AttributeSet.clear()
javax.print.attribute.HashAttributeSet.clear()
javax.script.SimpleBindings.clear()
javax.swing.ActionMap.clear()
javax.swing.ComponentInputMap.clear()
javax.swing.DefaultListModel.clear()
javax.swing.InputMap.clear()
javax.xml.datatype.XMLGregorianCalendar.clear()
org.omg.CORBA.Environment.clear()
org.xml.sax.helpers.AttributeListImpl.clear()
org.xml.sax.helpers.AttributesImpl.clear()


Occurences of clearAbortRequest

clearAbortRequest occurences:
javax.imageio.ImageReader.clearAbortRequest()
javax.imageio.ImageWriter.clearAbortRequest()


Occurences of clearAccessibleSelection

clearAccessibleSelection occurences:
java.awt.List.AccessibleAWTList.clearAccessibleSelection()
java.awt.MenuComponent.AccessibleAWTMenuComponent.clearAccessibleSelection()
javax.accessibility.AccessibleSelection.clearAccessibleSelection()
javax.swing.JComboBox.AccessibleJComboBox.clearAccessibleSelection()
javax.swing.JList.AccessibleJList.clearAccessibleSelection()
javax.swing.JMenu.AccessibleJMenu.clearAccessibleSelection()
javax.swing.JMenuBar.AccessibleJMenuBar.clearAccessibleSelection()
javax.swing.JTabbedPane.AccessibleJTabbedPane.clearAccessibleSelection()
javax.swing.JTable.AccessibleJTable.clearAccessibleSelection()
javax.swing.JTree.AccessibleJTree.clearAccessibleSelection()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.clearAccessibleSelection()


Occurences of clearCache

clearCache occurences:
java.util.ResourceBundle.clearCache()
java.util.ResourceBundle.clearCache(java.lang.ClassLoader)


Occurences of clearError

clearError occurences:
java.io.PrintStream.clearError()
java.io.PrintWriter.clearError()


Occurences of clearIconCache

clearIconCache occurences:
javax.swing.plaf.basic.BasicFileChooserUI.clearIconCache()
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.clearIconCache()


Occurences of clearParameters

clearParameters occurences:
java.sql.PreparedStatement.clearParameters()
javax.sql.RowSet.clearParameters()
javax.sql.rowset.BaseRowSet.clearParameters()
javax.xml.transform.Transformer.clearParameters()


Occurences of clearPassword

clearPassword occurences:
javax.crypto.spec.PBEKeySpec.clearPassword()
javax.security.auth.callback.PasswordCallback.clearPassword()


Occurences of clearRect

clearRect occurences:
java.awt.Graphics.clearRect(int, int, int, int)
javax.swing.DebugGraphics.clearRect(int, int, int, int)


Occurences of clearSelection

clearSelection occurences:
javax.swing.ButtonGroup.clearSelection()
javax.swing.DefaultListSelectionModel.clearSelection()
javax.swing.DefaultSingleSelectionModel.clearSelection()
javax.swing.JList.clearSelection()
javax.swing.JTable.clearSelection()
javax.swing.JTree.clearSelection()
javax.swing.ListSelectionModel.clearSelection()
javax.swing.SingleSelectionModel.clearSelection()
javax.swing.tree.DefaultTreeSelectionModel.clearSelection()
javax.swing.tree.TreeSelectionModel.clearSelection()


Occurences of clearWarnings

clearWarnings occurences:
java.sql.Connection.clearWarnings()
java.sql.ResultSet.clearWarnings()
java.sql.Statement.clearWarnings()


Occurences of clipRect

clipRect occurences:
java.awt.Graphics.clipRect(int, int, int, int)
javax.swing.DebugGraphics.clipRect(int, int, int, int)


Occurences of CLOB

CLOB occurences:
java.sql.CLOB
java.sql.CLOB


Occurences of clone

clone occurences:
java.awt.BufferCapabilities.clone()
java.awt.datatransfer.DataFlavor.clone()
java.awt.font.TextLayout.clone()
java.awt.font.TextMeasurer.clone()
java.awt.geom.AffineTransform.clone()
java.awt.geom.Area.clone()
java.awt.geom.CubicCurve2D.clone()
java.awt.geom.Dimension2D.clone()
java.awt.geom.Line2D.clone()
java.awt.geom.Path2D.clone()
java.awt.geom.Path2D.Double.clone()
java.awt.geom.Path2D.Float.clone()
java.awt.geom.Point2D.clone()
java.awt.geom.QuadCurve2D.clone()
java.awt.geom.RectangularShape.clone()
java.awt.GridBagConstraints.clone()
java.awt.image.ImageFilter.clone()
java.awt.image.Kernel.clone()
java.awt.image.renderable.ParameterBlock.clone()
java.awt.image.renderable.RenderContext.clone()
java.awt.ImageCapabilities.clone()
java.awt.Insets.clone()
java.awt.JobAttributes.clone()
java.awt.PageAttributes.clone()
java.awt.print.PageFormat.clone()
java.awt.print.Paper.clone()
java.awt.RenderingHints.clone()
java.lang.Enum.clone()
java.lang.Object.clone()
java.lang.Thread.clone()
java.net.HttpCookie.clone()
java.rmi.server.UnicastRemoteObject.clone()
java.security.acl.AclEntry.clone()
java.security.cert.CertPathBuilderResult.clone()
java.security.cert.CertPathParameters.clone()
java.security.cert.CertPathValidatorResult.clone()
java.security.cert.CertSelector.clone()
java.security.cert.CertStoreParameters.clone()
java.security.cert.CollectionCertStoreParameters.clone()
java.security.cert.CRLSelector.clone()
java.security.cert.LDAPCertStoreParameters.clone()
java.security.cert.PKIXCertPathChecker.clone()
java.security.cert.PKIXCertPathValidatorResult.clone()
java.security.cert.PKIXParameters.clone()
java.security.cert.PKIXRevocationChecker.clone()
java.security.cert.X509CertSelector.clone()
java.security.cert.X509CRLSelector.clone()
java.security.MessageDigest.clone()
java.security.MessageDigestSpi.clone()
java.security.Signature.clone()
java.security.SignatureSpi.clone()
java.text.BreakIterator.clone()
java.text.CharacterIterator.clone()
java.text.ChoiceFormat.clone()
java.text.Collator.clone()
java.text.DateFormat.clone()
java.text.DateFormatSymbols.clone()
java.text.DecimalFormat.clone()
java.text.DecimalFormatSymbols.clone()
java.text.Format.clone()
java.text.MessageFormat.clone()
java.text.NumberFormat.clone()
java.text.RuleBasedCollator.clone()
java.text.SimpleDateFormat.clone()
java.text.StringCharacterIterator.clone()
java.util.AbstractMap.clone()
java.util.ArrayDeque.clone()
java.util.ArrayList.clone()
java.util.BitSet.clone()
java.util.Calendar.clone()
java.util.concurrent.ConcurrentSkipListMap.clone()
java.util.concurrent.ConcurrentSkipListSet.clone()
java.util.concurrent.CopyOnWriteArrayList.clone()
java.util.Date.clone()
java.util.EnumMap.clone()
java.util.EnumSet.clone()
java.util.GregorianCalendar.clone()
java.util.HashMap.clone()
java.util.HashSet.clone()
java.util.Hashtable.clone()
java.util.IdentityHashMap.clone()
java.util.jar.Attributes.clone()
java.util.jar.Manifest.clone()
java.util.LinkedList.clone()
java.util.Locale.clone()
java.util.SimpleTimeZone.clone()
java.util.TimeZone.clone()
java.util.TreeMap.clone()
java.util.TreeSet.clone()
java.util.Vector.clone()
java.util.zip.ZipEntry.clone()
javax.crypto.Mac.clone()
javax.crypto.MacSpi.clone()
javax.management.Descriptor.clone()
javax.management.ImmutableDescriptor.clone()
javax.management.MBeanAttributeInfo.clone()
javax.management.MBeanConstructorInfo.clone()
javax.management.MBeanInfo.clone()
javax.management.MBeanNotificationInfo.clone()
javax.management.MBeanOperationInfo.clone()
javax.management.MBeanParameterInfo.clone()
javax.management.modelmbean.DescriptorSupport.clone()
javax.management.modelmbean.ModelMBeanAttributeInfo.clone()
javax.management.modelmbean.ModelMBeanConstructorInfo.clone()
javax.management.modelmbean.ModelMBeanInfo.clone()
javax.management.modelmbean.ModelMBeanInfoSupport.clone()
javax.management.modelmbean.ModelMBeanNotificationInfo.clone()
javax.management.modelmbean.ModelMBeanOperationInfo.clone()
javax.management.openmbean.TabularDataSupport.clone()
javax.management.relation.Role.clone()
javax.management.relation.RoleUnresolved.clone()
javax.naming.CompositeName.clone()
javax.naming.CompoundName.clone()
javax.naming.directory.Attribute.clone()
javax.naming.directory.Attributes.clone()
javax.naming.directory.BasicAttribute.clone()
javax.naming.directory.BasicAttributes.clone()
javax.naming.ldap.LdapName.clone()
javax.naming.Name.clone()
javax.naming.Reference.clone()
javax.print.attribute.EnumSyntax.clone()
javax.sound.midi.MetaMessage.clone()
javax.sound.midi.MidiMessage.clone()
javax.sound.midi.ShortMessage.clone()
javax.sound.midi.SysexMessage.clone()
javax.sql.rowset.serial.SerialArray.clone()
javax.sql.rowset.serial.SerialBlob.clone()
javax.sql.rowset.serial.SerialClob.clone()
javax.sql.rowset.serial.SerialDatalink.clone()
javax.sql.rowset.serial.SerialJavaObject.clone()
javax.sql.rowset.serial.SerialRef.clone()
javax.sql.rowset.serial.SerialStruct.clone()
javax.swing.AbstractAction.clone()
javax.swing.DefaultListSelectionModel.clone()
javax.swing.JFormattedTextField.AbstractFormatter.clone()
javax.swing.text.DefaultFormatter.clone()
javax.swing.text.DefaultStyledDocument.ElementBuffer.clone(javax.swing.text.Element, javax.swing.text.Element)
javax.swing.text.EditorKit.clone()
javax.swing.text.ElementIterator.clone()
javax.swing.text.GlyphView.clone()
javax.swing.text.html.HTMLEditorKit.clone()
javax.swing.text.InternationalFormatter.clone()
javax.swing.text.Segment.clone()
javax.swing.text.SimpleAttributeSet.clone()
javax.swing.text.StyleContext.SmallAttributeSet.clone()
javax.swing.text.StyledEditorKit.clone()
javax.swing.tree.DefaultMutableTreeNode.clone()
javax.swing.tree.DefaultTreeSelectionModel.clone()
javax.xml.datatype.XMLGregorianCalendar.clone()


Occurences of cloneNode

cloneNode occurences:
javax.imageio.metadata.IIOMetadataNode.cloneNode(boolean)
org.w3c.dom.Node.cloneNode(boolean)


Occurences of CloneNotSupportedException (constructors)

CloneNotSupportedException (constructors) occurences:
java.lang.CloneNotSupportedException()
java.lang.CloneNotSupportedException(java.lang.String)


Occurences of close

close occurences:
com.sun.jdi.connect.spi.Connection.close()
java.awt.SplashScreen.close()
java.beans.XMLDecoder.close()
java.beans.XMLEncoder.close()
java.io.BufferedInputStream.close()
java.io.BufferedReader.close()
java.io.BufferedWriter.close()
java.io.ByteArrayInputStream.close()
java.io.ByteArrayOutputStream.close()
java.io.CharArrayReader.close()
java.io.CharArrayWriter.close()
java.io.Closeable.close()
java.io.FileInputStream.close()
java.io.FileOutputStream.close()
java.io.FilterInputStream.close()
java.io.FilterOutputStream.close()
java.io.FilterReader.close()
java.io.FilterWriter.close()
java.io.InputStream.close()
java.io.InputStreamReader.close()
java.io.ObjectInput.close()
java.io.ObjectInputStream.close()
java.io.ObjectOutput.close()
java.io.ObjectOutputStream.close()
java.io.OutputStream.close()
java.io.OutputStreamWriter.close()
java.io.PipedInputStream.close()
java.io.PipedOutputStream.close()
java.io.PipedReader.close()
java.io.PipedWriter.close()
java.io.PrintStream.close()
java.io.PrintWriter.close()
java.io.PushbackInputStream.close()
java.io.PushbackReader.close()
java.io.RandomAccessFile.close()
java.io.Reader.close()
java.io.SequenceInputStream.close()
java.io.StringReader.close()
java.io.StringWriter.close()
java.io.Writer.close()
java.lang.AutoCloseable.close()
java.net.DatagramSocket.close()
java.net.DatagramSocketImpl.close()
java.net.ServerSocket.close()
java.net.Socket.close()
java.net.SocketImpl.close()
java.net.URLClassLoader.close()
java.nio.channels.AsynchronousChannel.close()
java.nio.channels.Channel.close()
java.nio.channels.FileLock.close()
java.nio.channels.InterruptibleChannel.close()
java.nio.channels.MulticastChannel.close()
java.nio.channels.Selector.close()
java.nio.channels.spi.AbstractInterruptibleChannel.close()
java.nio.channels.spi.AbstractSelector.close()
java.nio.file.FileSystem.close()
java.nio.file.WatchService.close()
java.sql.Connection.close()
java.sql.ResultSet.close()
java.sql.Statement.close()
java.util.Formatter.close()
java.util.logging.ConsoleHandler.close()
java.util.logging.FileHandler.close()
java.util.logging.Handler.close()
java.util.logging.MemoryHandler.close()
java.util.logging.SocketHandler.close()
java.util.logging.StreamHandler.close()
java.util.Scanner.close()
java.util.stream.BaseStream.close()
java.util.zip.DeflaterInputStream.close()
java.util.zip.DeflaterOutputStream.close()
java.util.zip.GZIPInputStream.close()
java.util.zip.InflaterInputStream.close()
java.util.zip.InflaterOutputStream.close()
java.util.zip.ZipFile.close()
java.util.zip.ZipInputStream.close()
java.util.zip.ZipOutputStream.close()
javax.crypto.CipherInputStream.close()
javax.crypto.CipherOutputStream.close()
javax.imageio.stream.FileCacheImageInputStream.close()
javax.imageio.stream.FileCacheImageOutputStream.close()
javax.imageio.stream.FileImageInputStream.close()
javax.imageio.stream.FileImageOutputStream.close()
javax.imageio.stream.ImageInputStream.close()
javax.imageio.stream.ImageInputStreamImpl.close()
javax.imageio.stream.MemoryCacheImageInputStream.close()
javax.imageio.stream.MemoryCacheImageOutputStream.close()
javax.management.remote.JMXConnector.close()
javax.management.remote.rmi.RMIConnection.close()
javax.management.remote.rmi.RMIConnectionImpl.close()
javax.management.remote.rmi.RMIConnectionImpl_Stub.close()
javax.management.remote.rmi.RMIConnector.close()
javax.management.remote.rmi.RMIServerImpl.close()
javax.naming.Context.close()
javax.naming.InitialContext.close()
javax.naming.ldap.StartTlsResponse.close()
javax.naming.NamingEnumeration.close()
javax.sound.midi.MidiDevice.close()
javax.sound.midi.Receiver.close()
javax.sound.midi.Transmitter.close()
javax.sound.sampled.AudioInputStream.close()
javax.sound.sampled.Line.close()
javax.sql.PooledConnection.close()
javax.swing.ProgressMonitor.close()
javax.swing.ProgressMonitorInputStream.close()
javax.tools.ForwardingJavaFileManager.close()
javax.tools.JavaFileManager.close()
javax.xml.soap.SOAPConnection.close()
javax.xml.stream.util.EventReaderDelegate.close()
javax.xml.stream.util.StreamReaderDelegate.close()
javax.xml.stream.XMLEventReader.close()
javax.xml.stream.XMLEventWriter.close()
javax.xml.stream.XMLStreamReader.close()
javax.xml.stream.XMLStreamWriter.close()
javax.xml.ws.handler.Handler.close(javax.xml.ws.handler.MessageContext)
javax.xml.ws.spi.http.HttpExchange.close()


Occurences of CloseAction

CloseAction occurences:
javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction.CloseAction()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction.CloseAction()


Occurences of closeClient

closeClient occurences:
javax.management.remote.rmi.RMIIIOPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection)
javax.management.remote.rmi.RMIJRMPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection)
javax.management.remote.rmi.RMIServerImpl.closeClient(javax.management.remote.rmi.RMIConnection)


Occurences of CLOSED

CLOSED occurences:
javax.management.remote.CLOSED
javax.net.ssl.CLOSED


Occurences of ClosedConnectionException (constructors)

ClosedConnectionException (constructors) occurences:
com.sun.jdi.connect.spi.ClosedConnectionException()
com.sun.jdi.connect.spi.ClosedConnectionException(java.lang.String)


Occurences of closeEntry

closeEntry occurences:
java.util.zip.ZipInputStream.closeEntry()
java.util.zip.ZipOutputStream.closeEntry()


Occurences of closeFrame

closeFrame occurences:
javax.swing.DefaultDesktopManager.closeFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.closeFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.closeFrame(javax.swing.JInternalFrame)


Occurences of closeServer

closeServer occurences:
javax.management.remote.rmi.RMIIIOPServerImpl.closeServer()
javax.management.remote.rmi.RMIJRMPServerImpl.closeServer()
javax.management.remote.rmi.RMIServerImpl.closeServer()


Occurences of CODE

CODE occurences:
com.sun.source.doctree.CODE
javax.swing.text.html.CODE
javax.swing.text.html.CODE


Occurences of code

code occurences:
org.w3c.dom.code
org.w3c.dom.events.code
org.w3c.dom.ls.code


Occurences of codePointAt

codePointAt occurences:
java.lang.Character.codePointAt(char:A, int)
java.lang.Character.codePointAt(char:A, int, int)
java.lang.Character.codePointAt(java.lang.CharSequence, int)
java.lang.String.codePointAt(int)
java.lang.StringBuffer.codePointAt(int)
java.lang.StringBuilder.codePointAt(int)


Occurences of codePointBefore

codePointBefore occurences:
java.lang.Character.codePointBefore(char:A, int)
java.lang.Character.codePointBefore(char:A, int, int)
java.lang.Character.codePointBefore(java.lang.CharSequence, int)
java.lang.String.codePointBefore(int)
java.lang.StringBuffer.codePointBefore(int)
java.lang.StringBuilder.codePointBefore(int)


Occurences of codePointCount

codePointCount occurences:
java.lang.Character.codePointCount(char:A, int, int)
java.lang.Character.codePointCount(java.lang.CharSequence, int, int)
java.lang.String.codePointCount(int, int)
java.lang.StringBuffer.codePointCount(int, int)
java.lang.StringBuilder.codePointCount(int, int)


Occurences of CODESET_INCOMPATIBLE (constructors)

CODESET_INCOMPATIBLE (constructors) occurences:
org.omg.CORBA.CODESET_INCOMPATIBLE()
org.omg.CORBA.CODESET_INCOMPATIBLE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.CODESET_INCOMPATIBLE(java.lang.String)
org.omg.CORBA.CODESET_INCOMPATIBLE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of CodeSource (constructors)

CodeSource (constructors) occurences:
java.security.CodeSource(java.net.URL, java.security.cert.Certificate:A)
java.security.CodeSource(java.net.URL, java.security.CodeSigner:A)


Occurences of coerceData

coerceData occurences:
java.awt.image.BufferedImage.coerceData(boolean)
java.awt.image.ColorModel.coerceData(java.awt.image.WritableRaster, boolean)
java.awt.image.ComponentColorModel.coerceData(java.awt.image.WritableRaster, boolean)
java.awt.image.DirectColorModel.coerceData(java.awt.image.WritableRaster, boolean)


Occurences of collect

collect occurences:
java.util.stream.DoubleStream.collect(java.util.function.Supplier, java.util.function.ObjDoubleConsumer, java.util.function.BiConsumer)
java.util.stream.IntStream.collect(java.util.function.Supplier, java.util.function.ObjIntConsumer, java.util.function.BiConsumer)
java.util.stream.LongStream.collect(java.util.function.Supplier, java.util.function.ObjLongConsumer, java.util.function.BiConsumer)
java.util.stream.Stream.collect(java.util.function.Supplier, java.util.function.BiConsumer, java.util.function.BiConsumer)
java.util.stream.Stream.collect(java.util.stream.Collector)


Occurences of CollectionCertStoreParameters (constructors)

CollectionCertStoreParameters (constructors) occurences:
java.security.cert.CollectionCertStoreParameters()
java.security.cert.CollectionCertStoreParameters(java.util.Collection)


Occurences of COLOR

COLOR occurences:
java.awt.COLOR
javax.print.attribute.standard.COLOR
javax.swing.text.html.COLOR
javax.swing.text.html.COLOR


Occurences of color

color occurences:
java.awt.color
javax.swing.border.color


Occurences of Color

Color occurences:
Color
java.awt.Color


Occurences of Color (constructors)

Color (constructors) occurences:
java.awt.Color(float, float, float)
java.awt.Color(float, float, float, float)
java.awt.Color(int)
java.awt.Color(int, boolean)
java.awt.Color(int, int, int)
java.awt.Color(int, int, int, int)
java.awt.Color(java.awt.color.ColorSpace, float:A, float)


Occurences of ColorConvertOp (constructors)

ColorConvertOp (constructors) occurences:
java.awt.image.ColorConvertOp(java.awt.color.ColorSpace, java.awt.color.ColorSpace, java.awt.RenderingHints)
java.awt.image.ColorConvertOp(java.awt.color.ColorSpace, java.awt.RenderingHints)
java.awt.image.ColorConvertOp(java.awt.color.ICC_Profile:A, java.awt.RenderingHints)
java.awt.image.ColorConvertOp(java.awt.RenderingHints)


Occurences of ColorModel (constructors)

ColorModel (constructors) occurences:
java.awt.image.ColorModel(int)
java.awt.image.ColorModel(int, int:A, java.awt.color.ColorSpace, boolean, boolean, int, int)


Occurences of ColorUIResource (constructors)

ColorUIResource (constructors) occurences:
javax.swing.plaf.ColorUIResource(float, float, float)
javax.swing.plaf.ColorUIResource(int)
javax.swing.plaf.ColorUIResource(int, int, int)
javax.swing.plaf.ColorUIResource(java.awt.Color)


Occurences of COLOR_CHOOSER

COLOR_CHOOSER occurences:
javax.accessibility.COLOR_CHOOSER
javax.swing.plaf.synth.COLOR_CHOOSER


Occurences of column

column occurences:
com.sun.javadoc.SourcePosition.column()
javax.swing.event.column


Occurences of columnAdded

columnAdded occurences:
javax.swing.event.TableColumnModelListener.columnAdded(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.columnAdded(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.AccessibleJTable.columnAdded(javax.swing.event.TableColumnModelEvent)
javax.swing.table.JTableHeader.columnAdded(javax.swing.event.TableColumnModelEvent)


Occurences of columnAtPoint

columnAtPoint occurences:
javax.swing.JTable.columnAtPoint(java.awt.Point)
javax.swing.table.JTableHeader.columnAtPoint(java.awt.Point)


Occurences of columnMarginChanged

columnMarginChanged occurences:
javax.swing.event.TableColumnModelListener.columnMarginChanged(javax.swing.event.ChangeEvent)
javax.swing.JTable.columnMarginChanged(javax.swing.event.ChangeEvent)
javax.swing.JTable.AccessibleJTable.columnMarginChanged(javax.swing.event.ChangeEvent)
javax.swing.table.JTableHeader.columnMarginChanged(javax.swing.event.ChangeEvent)


Occurences of columnModel

columnModel occurences:
javax.swing.columnModel
javax.swing.table.columnModel


Occurences of columnMoved

columnMoved occurences:
javax.swing.event.TableColumnModelListener.columnMoved(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.columnMoved(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.AccessibleJTable.columnMoved(javax.swing.event.TableColumnModelEvent)
javax.swing.table.JTableHeader.columnMoved(javax.swing.event.TableColumnModelEvent)


Occurences of columnNoNulls

columnNoNulls occurences:
java.sql.columnNoNulls
java.sql.columnNoNulls


Occurences of columnNullable

columnNullable occurences:
java.sql.columnNullable
java.sql.columnNullable


Occurences of columnNullableUnknown

columnNullableUnknown occurences:
java.sql.columnNullableUnknown
java.sql.columnNullableUnknown


Occurences of columnRemoved

columnRemoved occurences:
javax.swing.event.TableColumnModelListener.columnRemoved(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.columnRemoved(javax.swing.event.TableColumnModelEvent)
javax.swing.JTable.AccessibleJTable.columnRemoved(javax.swing.event.TableColumnModelEvent)
javax.swing.table.JTableHeader.columnRemoved(javax.swing.event.TableColumnModelEvent)


Occurences of columnSelectionChanged

columnSelectionChanged occurences:
javax.swing.event.TableColumnModelListener.columnSelectionChanged(javax.swing.event.ListSelectionEvent)
javax.swing.JTable.columnSelectionChanged(javax.swing.event.ListSelectionEvent)
javax.swing.JTable.AccessibleJTable.columnSelectionChanged(javax.swing.event.ListSelectionEvent)
javax.swing.table.JTableHeader.columnSelectionChanged(javax.swing.event.ListSelectionEvent)


Occurences of columnUpdated

columnUpdated occurences:
javax.sql.rowset.CachedRowSet.columnUpdated(int)
javax.sql.rowset.CachedRowSet.columnUpdated(java.lang.String)


Occurences of COLUMN_HEADER

COLUMN_HEADER occurences:
javax.accessibility.COLUMN_HEADER
javax.swing.COLUMN_HEADER


Occurences of combine

combine occurences:
java.security.DomainCombiner.combine(java.security.ProtectionDomain:A, java.security.ProtectionDomain:A)
java.util.DoubleSummaryStatistics.combine(java.util.DoubleSummaryStatistics)
java.util.IntSummaryStatistics.combine(java.util.IntSummaryStatistics)
java.util.LongSummaryStatistics.combine(java.util.LongSummaryStatistics)
javax.security.auth.SubjectDomainCombiner.combine(java.security.ProtectionDomain:A, java.security.ProtectionDomain:A)


Occurences of comboBox

comboBox occurences:
javax.swing.plaf.basic.comboBox
javax.swing.plaf.basic.comboBox
javax.swing.plaf.metal.comboBox


Occurences of COMBO_BOX

COMBO_BOX occurences:
javax.accessibility.COMBO_BOX
javax.swing.plaf.synth.COMBO_BOX


Occurences of command

command occurences:
java.lang.Compiler.command(java.lang.Object)
java.lang.ProcessBuilder.command()
java.lang.ProcessBuilder.command(java.lang.String...)
java.lang.ProcessBuilder.command(java.util.List)


Occurences of Command Reference

Command Reference occurences:
Command Reference
Command Reference
Command Reference


Occurences of Comment

Comment occurences:
javax.xml.stream.events.Comment
org.w3c.dom.Comment


Occurences of COMMENT

COMMENT occurences:
com.sun.source.doctree.COMMENT
javax.swing.text.html.COMMENT
javax.swing.text.html.COMMENT
javax.xml.stream.COMMENT


Occurences of comment

comment occurences:
javax.swing.text.html.HTMLWriter.comment(javax.swing.text.Element)
org.xml.sax.ext.DefaultHandler2.comment(char:A, int, int)
org.xml.sax.ext.LexicalHandler.comment(char:A, int, int)


Occurences of commit

commit occurences:
java.sql.Connection.commit()
javax.security.auth.spi.LoginModule.commit()
javax.sql.rowset.CachedRowSet.commit()
javax.sql.rowset.JdbcRowSet.commit()
javax.sql.rowset.spi.TransactionalWriter.commit()
javax.transaction.xa.XAResource.commit(javax.transaction.xa.Xid, boolean)


Occurences of commitEdit

commitEdit occurences:
javax.swing.JFormattedTextField.commitEdit()
javax.swing.JSpinner.commitEdit()
javax.swing.JSpinner.DefaultEditor.commitEdit()


Occurences of COMMON

COMMON occurences:
java.awt.COMMON
java.lang.COMMON
javax.print.attribute.standard.COMMON


Occurences of CommunicationException (constructors)

CommunicationException (constructors) occurences:
javax.naming.CommunicationException()
javax.naming.CommunicationException(java.lang.String)


Occurences of COMM_FAILURE (constructors)

COMM_FAILURE (constructors) occurences:
org.omg.CORBA.COMM_FAILURE()
org.omg.CORBA.COMM_FAILURE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.COMM_FAILURE(java.lang.String)
org.omg.CORBA.COMM_FAILURE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of compact

compact occurences:
java.nio.ByteBuffer.compact()
java.nio.CharBuffer.compact()
java.nio.DoubleBuffer.compact()
java.nio.FloatBuffer.compact()
java.nio.IntBuffer.compact()
java.nio.LongBuffer.compact()
java.nio.ShortBuffer.compact()


Occurences of Compact Profiles

Compact Profiles occurences:
Compact Profiles
Compact Profiles


Occurences of compact1

compact1 occurences:
compact1
compact1


Occurences of compact2

compact2 occurences:
compact2
compact2


Occurences of compact3

compact3 occurences:
compact3
compact3


Occurences of comparator

comparator occurences:
java.util.concurrent.ConcurrentSkipListMap.comparator()
java.util.concurrent.ConcurrentSkipListSet.comparator()
java.util.concurrent.PriorityBlockingQueue.comparator()
java.util.PriorityQueue.comparator()
java.util.SortedMap.comparator()
java.util.SortedSet.comparator()
java.util.TreeMap.comparator()
java.util.TreeSet.comparator()


Occurences of compare

compare occurences:
java.lang.Boolean.compare(boolean, boolean)
java.lang.Byte.compare(byte, byte)
java.lang.Character.compare(char, char)
java.lang.Double.compare(double, double)
java.lang.Float.compare(float, float)
java.lang.Integer.compare(int, int)
java.lang.Long.compare(long, long)
java.lang.Short.compare(short, short)
java.text.Collator.compare(java.lang.Object, java.lang.Object)
java.text.Collator.compare(java.lang.String, java.lang.String)
java.text.RuleBasedCollator.compare(java.lang.String, java.lang.String)
java.util.Comparator.compare(java.lang.Object, java.lang.Object)
java.util.Comparator.compare(T, T)
java.util.Objects.compare(java.lang.Object, java.lang.Object, java.util.Comparator)
java.util.Objects.compare(T, T, java.util.Comparator)
javax.xml.datatype.Duration.compare(javax.xml.datatype.Duration)
javax.xml.datatype.XMLGregorianCalendar.compare(javax.xml.datatype.XMLGregorianCalendar)


Occurences of compareAndSet

compareAndSet occurences:
java.util.concurrent.atomic.AtomicBoolean.compareAndSet(boolean, boolean)
java.util.concurrent.atomic.AtomicInteger.compareAndSet(int, int)
java.util.concurrent.atomic.AtomicIntegerArray.compareAndSet(int, int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.compareAndSet(java.lang.Object, int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.compareAndSet(T, int, int)
java.util.concurrent.atomic.AtomicLong.compareAndSet(long, long)
java.util.concurrent.atomic.AtomicLongArray.compareAndSet(int, long, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.compareAndSet(java.lang.Object, long, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.compareAndSet(T, long, long)
java.util.concurrent.atomic.AtomicMarkableReference.compareAndSet(java.lang.Object, java.lang.Object, boolean, boolean)
java.util.concurrent.atomic.AtomicMarkableReference.compareAndSet(V, V, boolean, boolean)
java.util.concurrent.atomic.AtomicReference.compareAndSet(java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReference.compareAndSet(V, V)
java.util.concurrent.atomic.AtomicReferenceArray.compareAndSet(int, E, E)
java.util.concurrent.atomic.AtomicReferenceArray.compareAndSet(int, java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.compareAndSet(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.compareAndSet(T, V, V)
java.util.concurrent.atomic.AtomicStampedReference.compareAndSet(java.lang.Object, java.lang.Object, int, int)
java.util.concurrent.atomic.AtomicStampedReference.compareAndSet(V, V, int, int)


Occurences of compareAndSetState

compareAndSetState occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.compareAndSetState(long, long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.compareAndSetState(int, int)


Occurences of compareDocumentPosition

compareDocumentPosition occurences:
javax.imageio.metadata.IIOMetadataNode.compareDocumentPosition(org.w3c.dom.Node)
org.w3c.dom.Node.compareDocumentPosition(org.w3c.dom.Node)


Occurences of compareTo

compareTo occurences:
com.sun.javadoc.Doc.compareTo(java.lang.Object)
com.sun.javadoc.SerialFieldTag.compareTo(java.lang.Object)
java.io.File.compareTo(java.io.File)
java.io.ObjectStreamField.compareTo(java.lang.Object)
java.lang.Boolean.compareTo(java.lang.Boolean)
java.lang.Byte.compareTo(java.lang.Byte)
java.lang.Character.compareTo(java.lang.Character)
java.lang.Comparable.compareTo(java.lang.Object)
java.lang.Comparable.compareTo(T)
java.lang.Double.compareTo(java.lang.Double)
java.lang.Enum.compareTo(E)
java.lang.Enum.compareTo(java.lang.Enum)
java.lang.Float.compareTo(java.lang.Float)
java.lang.Integer.compareTo(java.lang.Integer)
java.lang.Long.compareTo(java.lang.Long)
java.lang.Short.compareTo(java.lang.Short)
java.lang.String.compareTo(java.lang.String)
java.math.BigDecimal.compareTo(java.math.BigDecimal)
java.math.BigInteger.compareTo(java.math.BigInteger)
java.net.URI.compareTo(java.net.URI)
java.nio.ByteBuffer.compareTo(java.nio.ByteBuffer)
java.nio.CharBuffer.compareTo(java.nio.CharBuffer)
java.nio.charset.Charset.compareTo(java.nio.charset.Charset)
java.nio.DoubleBuffer.compareTo(java.nio.DoubleBuffer)
java.nio.file.attribute.FileTime.compareTo(java.nio.file.attribute.FileTime)
java.nio.file.Path.compareTo(java.nio.file.Path)
java.nio.FloatBuffer.compareTo(java.nio.FloatBuffer)
java.nio.IntBuffer.compareTo(java.nio.IntBuffer)
java.nio.LongBuffer.compareTo(java.nio.LongBuffer)
java.nio.ShortBuffer.compareTo(java.nio.ShortBuffer)
java.sql.Timestamp.compareTo(java.sql.Timestamp)
java.sql.Timestamp.compareTo(java.util.Date)
java.text.CollationKey.compareTo(java.text.CollationKey)
java.time.chrono.AbstractChronology.compareTo(java.time.chrono.Chronology)
java.time.chrono.ChronoLocalDate.compareTo(java.time.chrono.ChronoLocalDate)
java.time.chrono.ChronoLocalDateTime.compareTo(java.time.chrono.ChronoLocalDateTime)
java.time.chrono.Chronology.compareTo(java.time.chrono.Chronology)
java.time.chrono.ChronoZonedDateTime.compareTo(java.time.chrono.ChronoZonedDateTime)
java.time.Duration.compareTo(java.time.Duration)
java.time.Instant.compareTo(java.time.Instant)
java.time.LocalDate.compareTo(java.time.chrono.ChronoLocalDate)
java.time.LocalDateTime.compareTo(java.time.chrono.ChronoLocalDateTime)
java.time.LocalTime.compareTo(java.time.LocalTime)
java.time.MonthDay.compareTo(java.time.MonthDay)
java.time.OffsetDateTime.compareTo(java.time.OffsetDateTime)
java.time.OffsetTime.compareTo(java.time.OffsetTime)
java.time.Year.compareTo(java.time.Year)
java.time.YearMonth.compareTo(java.time.YearMonth)
java.time.zone.ZoneOffsetTransition.compareTo(java.time.zone.ZoneOffsetTransition)
java.time.ZoneOffset.compareTo(java.time.ZoneOffset)
java.util.Calendar.compareTo(java.util.Calendar)
java.util.Date.compareTo(java.util.Date)
java.util.UUID.compareTo(java.util.UUID)
javax.management.ObjectName.compareTo(javax.management.ObjectName)
javax.naming.CompositeName.compareTo(java.lang.Object)
javax.naming.CompoundName.compareTo(java.lang.Object)
javax.naming.ldap.LdapName.compareTo(java.lang.Object)
javax.naming.ldap.Rdn.compareTo(java.lang.Object)
javax.naming.Name.compareTo(java.lang.Object)


Occurences of compareUnsigned

compareUnsigned occurences:
java.lang.Integer.compareUnsigned(int, int)
java.lang.Long.compareUnsigned(long, long)


Occurences of comparing

comparing occurences:
java.util.Comparator.comparing(java.util.function.Function)
java.util.Comparator.comparing(java.util.function.Function, java.util.Comparator)


Occurences of comparingByKey

comparingByKey occurences:
java.util.Map.Entry.comparingByKey()
java.util.Map.Entry.comparingByKey(java.util.Comparator)


Occurences of comparingByValue

comparingByValue occurences:
java.util.Map.Entry.comparingByValue()
java.util.Map.Entry.comparingByValue(java.util.Comparator)


Occurences of compile

compile occurences:
java.util.regex.Pattern.compile(java.lang.String)
java.util.regex.Pattern.compile(java.lang.String, int)
javax.script.Compilable.compile(java.io.Reader)
javax.script.Compilable.compile(java.lang.String)
javax.xml.xpath.XPath.compile(java.lang.String)


Occurences of complete

complete occurences:
java.util.Calendar.complete()
java.util.concurrent.CompletableFuture.complete(java.lang.Object)
java.util.concurrent.CompletableFuture.complete(T)
java.util.concurrent.CountedCompleter.complete(java.lang.Object)
java.util.concurrent.CountedCompleter.complete(T)
java.util.concurrent.ForkJoinTask.complete(java.lang.Object)
java.util.concurrent.ForkJoinTask.complete(V)


Occurences of completed

completed occurences:
java.nio.channels.CompletionHandler.completed(java.lang.Object, java.lang.Object)
java.nio.channels.CompletionHandler.completed(V, A)
org.omg.CORBA.completed


Occurences of completedFuture

completedFuture occurences:
java.util.concurrent.CompletableFuture.completedFuture(java.lang.Object)
java.util.concurrent.CompletableFuture.completedFuture(U)


Occurences of completeDrag

completeDrag occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.completeDrag(int, int)
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.completeDrag(java.awt.event.MouseEvent)


Occurences of completeEditing

completeEditing occurences:
javax.swing.plaf.basic.BasicTreeUI.completeEditing()
javax.swing.plaf.basic.BasicTreeUI.completeEditing(boolean, boolean, boolean)


Occurences of completeExceptionally

completeExceptionally occurences:
java.util.concurrent.CompletableFuture.completeExceptionally(java.lang.Throwable)
java.util.concurrent.ForkJoinTask.completeExceptionally(java.lang.Throwable)


Occurences of CompletionException (constructors)

CompletionException (constructors) occurences:
java.util.concurrent.CompletionException()
java.util.concurrent.CompletionException(java.lang.String)
java.util.concurrent.CompletionException(java.lang.String, java.lang.Throwable)
java.util.concurrent.CompletionException(java.lang.Throwable)


Occurences of component

component occurences:
java.awt.dnd.component
javax.swing.component


Occurences of componentAdded

componentAdded occurences:
java.awt.AWTEventMulticaster.componentAdded(java.awt.event.ContainerEvent)
java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler.componentAdded(java.awt.event.ContainerEvent)
java.awt.event.ContainerAdapter.componentAdded(java.awt.event.ContainerEvent)
java.awt.event.ContainerListener.componentAdded(java.awt.event.ContainerEvent)
javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler.componentAdded(java.awt.event.ContainerEvent)
javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener.componentAdded(java.awt.event.ContainerEvent)


Occurences of ComponentColorModel (constructors)

ComponentColorModel (constructors) occurences:
java.awt.image.ComponentColorModel(java.awt.color.ColorSpace, boolean, boolean, int, int)
java.awt.image.ComponentColorModel(java.awt.color.ColorSpace, int:A, boolean, boolean, int, int)


Occurences of ComponentHandler

ComponentHandler occurences:
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.ComponentHandler()
javax.swing.plaf.basic.BasicSliderUI.ComponentHandler.ComponentHandler()
javax.swing.plaf.basic.BasicTreeUI.ComponentHandler.ComponentHandler()


Occurences of componentHidden

componentHidden occurences:
java.awt.AWTEventMulticaster.componentHidden(java.awt.event.ComponentEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentHidden(java.awt.event.ComponentEvent)
java.awt.event.ComponentAdapter.componentHidden(java.awt.event.ComponentEvent)
java.awt.event.ComponentListener.componentHidden(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.componentHidden(java.awt.event.ComponentEvent)


Occurences of componentListener

componentListener occurences:
javax.swing.plaf.basic.componentListener
javax.swing.plaf.basic.componentListener


Occurences of componentMoved

componentMoved occurences:
java.awt.AWTEventMulticaster.componentMoved(java.awt.event.ComponentEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentMoved(java.awt.event.ComponentEvent)
java.awt.event.ComponentAdapter.componentMoved(java.awt.event.ComponentEvent)
java.awt.event.ComponentListener.componentMoved(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.componentMoved(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicTreeUI.ComponentHandler.componentMoved(java.awt.event.ComponentEvent)


Occurences of componentRemoved

componentRemoved occurences:
java.awt.AWTEventMulticaster.componentRemoved(java.awt.event.ContainerEvent)
java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler.componentRemoved(java.awt.event.ContainerEvent)
java.awt.event.ContainerAdapter.componentRemoved(java.awt.event.ContainerEvent)
java.awt.event.ContainerListener.componentRemoved(java.awt.event.ContainerEvent)
javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler.componentRemoved(java.awt.event.ContainerEvent)
javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener.componentRemoved(java.awt.event.ContainerEvent)


Occurences of componentResized

componentResized occurences:
java.awt.AWTEventMulticaster.componentResized(java.awt.event.ComponentEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentResized(java.awt.event.ComponentEvent)
java.awt.event.ComponentAdapter.componentResized(java.awt.event.ComponentEvent)
java.awt.event.ComponentListener.componentResized(java.awt.event.ComponentEvent)
javax.swing.JViewport.ViewListener.componentResized(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.componentResized(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicSliderUI.ComponentHandler.componentResized(java.awt.event.ComponentEvent)


Occurences of ComponentSampleModel (constructors)

ComponentSampleModel (constructors) occurences:
java.awt.image.ComponentSampleModel(int, int, int, int, int, int:A)
java.awt.image.ComponentSampleModel(int, int, int, int, int, int:A, int:A)


Occurences of componentShown

componentShown occurences:
java.awt.AWTEventMulticaster.componentShown(java.awt.event.ComponentEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentShown(java.awt.event.ComponentEvent)
java.awt.event.ComponentAdapter.componentShown(java.awt.event.ComponentEvent)
java.awt.event.ComponentListener.componentShown(java.awt.event.ComponentEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.componentShown(java.awt.event.ComponentEvent)


Occurences of component_count

component_count occurences:
org.omg.DynamicAny.DynAnyOperations.component_count()
org.omg.DynamicAny._DynAnyStub.component_count()
org.omg.DynamicAny._DynArrayStub.component_count()
org.omg.DynamicAny._DynEnumStub.component_count()
org.omg.DynamicAny._DynFixedStub.component_count()
org.omg.DynamicAny._DynSequenceStub.component_count()
org.omg.DynamicAny._DynStructStub.component_count()
org.omg.DynamicAny._DynUnionStub.component_count()
org.omg.DynamicAny._DynValueStub.component_count()


Occurences of compose

compose occurences:
java.awt.CompositeContext.compose(java.awt.image.Raster, java.awt.image.Raster, java.awt.image.WritableRaster)
java.util.function.DoubleUnaryOperator.compose(java.util.function.DoubleUnaryOperator)
java.util.function.Function.compose(java.util.function.Function)
java.util.function.IntUnaryOperator.compose(java.util.function.IntUnaryOperator)
java.util.function.LongUnaryOperator.compose(java.util.function.LongUnaryOperator)


Occurences of composeName

composeName occurences:
javax.naming.Context.composeName(java.lang.String, java.lang.String)
javax.naming.Context.composeName(javax.naming.Name, javax.naming.Name)
javax.naming.InitialContext.composeName(java.lang.String, java.lang.String)
javax.naming.InitialContext.composeName(javax.naming.Name, javax.naming.Name)


Occurences of CompositeDataSupport (constructors)

CompositeDataSupport (constructors) occurences:
javax.management.openmbean.CompositeDataSupport(javax.management.openmbean.CompositeType, java.lang.String:A, java.lang.Object:A)
javax.management.openmbean.CompositeDataSupport(javax.management.openmbean.CompositeType, java.util.Map)


Occurences of CompositeName (constructors)

CompositeName (constructors) occurences:
javax.naming.CompositeName()
javax.naming.CompositeName(java.lang.String)
javax.naming.CompositeName(java.util.Enumeration)


Occurences of CompoundBorder (constructors)

CompoundBorder (constructors) occurences:
javax.swing.border.CompoundBorder()
javax.swing.border.CompoundBorder(javax.swing.border.Border, javax.swing.border.Border)


Occurences of CompoundName (constructors)

CompoundName (constructors) occurences:
javax.naming.CompoundName(java.lang.String, java.util.Properties)
javax.naming.CompoundName(java.util.Enumeration, java.util.Properties)


Occurences of compute

compute occurences:
java.security.Provider.compute(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.compute(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.compute(K, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.compute(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.compute(K, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.compute(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.compute(K, java.util.function.BiFunction)
java.util.concurrent.CountedCompleter.compute()
java.util.concurrent.RecursiveAction.compute()
java.util.concurrent.RecursiveTask.compute()
java.util.HashMap.compute(java.lang.Object, java.util.function.BiFunction)
java.util.HashMap.compute(K, java.util.function.BiFunction)
java.util.Hashtable.compute(java.lang.Object, java.util.function.BiFunction)
java.util.Hashtable.compute(K, java.util.function.BiFunction)
java.util.Map.compute(java.lang.Object, java.util.function.BiFunction)
java.util.Map.compute(K, java.util.function.BiFunction)


Occurences of computeFields

computeFields occurences:
java.util.Calendar.computeFields()
java.util.GregorianCalendar.computeFields()


Occurences of computeIfAbsent

computeIfAbsent occurences:
java.security.Provider.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.concurrent.ConcurrentHashMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.concurrent.ConcurrentHashMap.computeIfAbsent(K, java.util.function.Function)
java.util.concurrent.ConcurrentMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.concurrent.ConcurrentMap.computeIfAbsent(K, java.util.function.Function)
java.util.concurrent.ConcurrentSkipListMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.concurrent.ConcurrentSkipListMap.computeIfAbsent(K, java.util.function.Function)
java.util.HashMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.HashMap.computeIfAbsent(K, java.util.function.Function)
java.util.Hashtable.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.Hashtable.computeIfAbsent(K, java.util.function.Function)
java.util.Map.computeIfAbsent(java.lang.Object, java.util.function.Function)
java.util.Map.computeIfAbsent(K, java.util.function.Function)


Occurences of computeIfPresent

computeIfPresent occurences:
java.security.Provider.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.computeIfPresent(K, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.computeIfPresent(K, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.computeIfPresent(K, java.util.function.BiFunction)
java.util.HashMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.HashMap.computeIfPresent(K, java.util.function.BiFunction)
java.util.Hashtable.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.Hashtable.computeIfPresent(K, java.util.function.BiFunction)
java.util.Map.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
java.util.Map.computeIfPresent(K, java.util.function.BiFunction)


Occurences of computeStringWidth

computeStringWidth occurences:
javax.swing.plaf.synth.SynthGraphicsUtils.computeStringWidth(javax.swing.plaf.synth.SynthContext, java.awt.Font, java.awt.FontMetrics, java.lang.String)
javax.swing.SwingUtilities.computeStringWidth(java.awt.FontMetrics, java.lang.String)


Occurences of computeTime

computeTime occurences:
java.util.Calendar.computeTime()
java.util.GregorianCalendar.computeTime()


Occurences of concat

concat occurences:
java.lang.String.concat(java.lang.String)
java.util.stream.DoubleStream.concat(java.util.stream.DoubleStream, java.util.stream.DoubleStream)
java.util.stream.IntStream.concat(java.util.stream.IntStream, java.util.stream.IntStream)
java.util.stream.LongStream.concat(java.util.stream.LongStream, java.util.stream.LongStream)
java.util.stream.Stream.concat(java.util.stream.Stream, java.util.stream.Stream)


Occurences of CONCURRENT

CONCURRENT occurences:
java.util.CONCURRENT
java.util.stream.CONCURRENT


Occurences of concurrent

concurrent occurences:
compact1.java.util.concurrent
compact2.java.util.concurrent
compact3.java.util.concurrent
java.util.concurrent


Occurences of ConcurrentHashMap (constructors)

ConcurrentHashMap (constructors) occurences:
java.util.concurrent.ConcurrentHashMap()
java.util.concurrent.ConcurrentHashMap(int)
java.util.concurrent.ConcurrentHashMap(int, float)
java.util.concurrent.ConcurrentHashMap(int, float, int)
java.util.concurrent.ConcurrentHashMap(java.util.Map)


Occurences of ConcurrentLinkedDeque (constructors)

ConcurrentLinkedDeque (constructors) occurences:
java.util.concurrent.ConcurrentLinkedDeque()
java.util.concurrent.ConcurrentLinkedDeque(java.util.Collection)


Occurences of ConcurrentLinkedQueue (constructors)

ConcurrentLinkedQueue (constructors) occurences:
java.util.concurrent.ConcurrentLinkedQueue()
java.util.concurrent.ConcurrentLinkedQueue(java.util.Collection)


Occurences of ConcurrentModificationException (constructors)

ConcurrentModificationException (constructors) occurences:
java.util.ConcurrentModificationException()
java.util.ConcurrentModificationException(java.lang.String)
java.util.ConcurrentModificationException(java.lang.String, java.lang.Throwable)
java.util.ConcurrentModificationException(java.lang.Throwable)


Occurences of ConcurrentSkipListMap (constructors)

ConcurrentSkipListMap (constructors) occurences:
java.util.concurrent.ConcurrentSkipListMap()
java.util.concurrent.ConcurrentSkipListMap(java.util.Comparator)
java.util.concurrent.ConcurrentSkipListMap(java.util.Map)
java.util.concurrent.ConcurrentSkipListMap(java.util.SortedMap)


Occurences of ConcurrentSkipListSet (constructors)

ConcurrentSkipListSet (constructors) occurences:
java.util.concurrent.ConcurrentSkipListSet()
java.util.concurrent.ConcurrentSkipListSet(java.util.Collection)
java.util.concurrent.ConcurrentSkipListSet(java.util.Comparator)
java.util.concurrent.ConcurrentSkipListSet(java.util.SortedSet)


Occurences of ConditionObject

ConditionObject occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.ConditionObject()
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.ConditionObject()


Occurences of config

config occurences:
java.util.logging.Logger.config(java.lang.String)
java.util.logging.Logger.config(java.util.function.Supplier)


Occurences of ConfigurationException (constructors)

ConfigurationException (constructors) occurences:
javax.naming.ConfigurationException()
javax.naming.ConfigurationException(java.lang.String)


Occurences of configureBlocking

configureBlocking occurences:
java.nio.channels.SelectableChannel.configureBlocking(boolean)
java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(boolean)


Occurences of configureEditor

configureEditor occurences:
javax.swing.JComboBox.configureEditor(javax.swing.ComboBoxEditor, java.lang.Object)
javax.swing.plaf.basic.BasicComboBoxUI.configureEditor()
javax.swing.plaf.metal.MetalComboBoxUI.configureEditor()


Occurences of configurePropertiesFromAction

configurePropertiesFromAction occurences:
javax.swing.AbstractButton.configurePropertiesFromAction(javax.swing.Action)
javax.swing.JComboBox.configurePropertiesFromAction(javax.swing.Action)
javax.swing.JMenuItem.configurePropertiesFromAction(javax.swing.Action)
javax.swing.JTextField.configurePropertiesFromAction(javax.swing.Action)


Occurences of configureScrollBarColors

configureScrollBarColors occurences:
javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors()
javax.swing.plaf.metal.MetalScrollBarUI.configureScrollBarColors()
javax.swing.plaf.synth.SynthScrollBarUI.configureScrollBarColors()


Occurences of ConfirmationCallback (constructors)

ConfirmationCallback (constructors) occurences:
javax.security.auth.callback.ConfirmationCallback(int, int, int)
javax.security.auth.callback.ConfirmationCallback(int, java.lang.String:A, int)
javax.security.auth.callback.ConfirmationCallback(java.lang.String, int, int, int)
javax.security.auth.callback.ConfirmationCallback(java.lang.String, int, java.lang.String:A, int)


Occurences of connect

connect occurences:
com.sun.jdi.connect
java.io.PipedInputStream.connect(java.io.PipedOutputStream)
java.io.PipedOutputStream.connect(java.io.PipedInputStream)
java.io.PipedReader.connect(java.io.PipedWriter)
java.io.PipedWriter.connect(java.io.PipedReader)
java.net.DatagramSocket.connect(java.net.InetAddress, int)
java.net.DatagramSocket.connect(java.net.SocketAddress)
java.net.DatagramSocketImpl.connect(java.net.InetAddress, int)
java.net.Socket.connect(java.net.SocketAddress)
java.net.Socket.connect(java.net.SocketAddress, int)
java.net.SocketImpl.connect(java.lang.String, int)
java.net.SocketImpl.connect(java.net.InetAddress, int)
java.net.SocketImpl.connect(java.net.SocketAddress, int)
java.net.URLConnection.connect()
java.nio.channels.AsynchronousSocketChannel.connect(java.net.SocketAddress)
java.nio.channels.AsynchronousSocketChannel.connect(java.net.SocketAddress, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.connect(java.net.SocketAddress, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.DatagramChannel.connect(java.net.SocketAddress)
java.nio.channels.SocketChannel.connect(java.net.SocketAddress)
java.sql.Driver.connect(java.lang.String, java.util.Properties)
javax.management.remote.JMXConnector.connect()
javax.management.remote.JMXConnector.connect(java.util.Map)
javax.management.remote.JMXConnectorFactory.connect(javax.management.remote.JMXServiceURL)
javax.management.remote.JMXConnectorFactory.connect(javax.management.remote.JMXServiceURL, java.util.Map)
javax.management.remote.rmi.RMIConnector.connect()
javax.management.remote.rmi.RMIConnector.connect(java.util.Map)
javax.rmi.CORBA.PortableRemoteObjectDelegate.connect(java.rmi.Remote, java.rmi.Remote)
javax.rmi.CORBA.Stub.connect(org.omg.CORBA.ORB)
javax.rmi.CORBA.StubDelegate.connect(javax.rmi.CORBA.Stub, org.omg.CORBA.ORB)
javax.rmi.PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote)
org.omg.CORBA.ORB.connect(org.omg.CORBA.Object)


Occurences of ConnectException

ConnectException occurences:
java.net.ConnectException
java.rmi.ConnectException


Occurences of ConnectException (constructors)

ConnectException (constructors) occurences:
java.net.ConnectException()
java.net.ConnectException(java.lang.String)
java.rmi.ConnectException(java.lang.String)
java.rmi.ConnectException(java.lang.String, java.lang.Exception)


Occurences of ConnectIOException (constructors)

ConnectIOException (constructors) occurences:
java.rmi.ConnectIOException(java.lang.String)
java.rmi.ConnectIOException(java.lang.String, java.lang.Exception)


Occurences of Connection

Connection occurences:
com.sun.jdi.connect.spi.Connection
java.sql.Connection


Occurences of connectionClosed

connectionClosed occurences:
javax.management.remote.JMXConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object)
javax.management.remote.rmi.RMIConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object)
javax.sql.ConnectionEventListener.connectionClosed(javax.sql.ConnectionEvent)


Occurences of ConnectionEvent (constructors)

ConnectionEvent (constructors) occurences:
javax.sql.ConnectionEvent(javax.sql.PooledConnection)
javax.sql.ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException)


Occurences of connectionFailed

connectionFailed occurences:
javax.management.remote.JMXConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object)
javax.management.remote.rmi.RMIConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object)


Occurences of connectionOpened

connectionOpened occurences:
javax.management.remote.JMXConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object)
javax.management.remote.rmi.RMIConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object)


Occurences of constant

constant occurences:
java.lang.invoke.MethodHandles.constant(java.lang.Class, java.lang.Object)
javax.swing.Spring.constant(int)
javax.swing.Spring.constant(int, int, int)


Occurences of Constant Field Values

Constant Field Values occurences:
Constant Field Values
Constant Field Values
Constant Field Values
Constant Field Values
Constant Field Values
Constant Field Values


Occurences of ConstantCallSite (constructors)

ConstantCallSite (constructors) occurences:
java.lang.invoke.ConstantCallSite(java.lang.invoke.MethodHandle)
java.lang.invoke.ConstantCallSite(java.lang.invoke.MethodType, java.lang.invoke.MethodHandle)


Occurences of Constraints

Constraints occurences:
javax.swing.SpringLayout.Constraints.Constraints()
javax.swing.SpringLayout.Constraints.Constraints(java.awt.Component)
javax.swing.SpringLayout.Constraints.Constraints(javax.swing.Spring, javax.swing.Spring)
javax.swing.SpringLayout.Constraints.Constraints(javax.swing.Spring, javax.swing.Spring, javax.swing.Spring, javax.swing.Spring)


Occurences of CONSTRUCTOR

CONSTRUCTOR occurences:
java.lang.annotation.CONSTRUCTOR
javax.lang.model.element.CONSTRUCTOR


Occurences of consume

consume occurences:
java.awt.AWTEvent.consume()
java.awt.event.InputEvent.consume()
java.awt.event.InputMethodEvent.consume()


Occurences of contains

contains occurences:
java.awt.Component.contains(int, int)
java.awt.Component.contains(java.awt.Point)
java.awt.Component.AccessibleAWTComponent.contains(java.awt.Point)
java.awt.geom.Arc2D.contains(double, double)
java.awt.geom.Arc2D.contains(double, double, double, double)
java.awt.geom.Arc2D.contains(java.awt.geom.Rectangle2D)
java.awt.geom.Area.contains(double, double)
java.awt.geom.Area.contains(double, double, double, double)
java.awt.geom.Area.contains(java.awt.geom.Point2D)
java.awt.geom.Area.contains(java.awt.geom.Rectangle2D)
java.awt.geom.CubicCurve2D.contains(double, double)
java.awt.geom.CubicCurve2D.contains(double, double, double, double)
java.awt.geom.CubicCurve2D.contains(java.awt.geom.Point2D)
java.awt.geom.CubicCurve2D.contains(java.awt.geom.Rectangle2D)
java.awt.geom.Ellipse2D.contains(double, double)
java.awt.geom.Ellipse2D.contains(double, double, double, double)
java.awt.geom.Line2D.contains(double, double)
java.awt.geom.Line2D.contains(double, double, double, double)
java.awt.geom.Line2D.contains(java.awt.geom.Point2D)
java.awt.geom.Line2D.contains(java.awt.geom.Rectangle2D)
java.awt.geom.Path2D.contains(double, double)
java.awt.geom.Path2D.contains(double, double, double, double)
java.awt.geom.Path2D.contains(java.awt.geom.PathIterator, double, double)
java.awt.geom.Path2D.contains(java.awt.geom.PathIterator, double, double, double, double)
java.awt.geom.Path2D.contains(java.awt.geom.PathIterator, java.awt.geom.Point2D)
java.awt.geom.Path2D.contains(java.awt.geom.PathIterator, java.awt.geom.Rectangle2D)
java.awt.geom.Path2D.contains(java.awt.geom.Point2D)
java.awt.geom.Path2D.contains(java.awt.geom.Rectangle2D)
java.awt.geom.QuadCurve2D.contains(double, double)
java.awt.geom.QuadCurve2D.contains(double, double, double, double)
java.awt.geom.QuadCurve2D.contains(java.awt.geom.Point2D)
java.awt.geom.QuadCurve2D.contains(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.contains(double, double)
java.awt.geom.Rectangle2D.contains(double, double, double, double)
java.awt.geom.RectangularShape.contains(java.awt.geom.Point2D)
java.awt.geom.RectangularShape.contains(java.awt.geom.Rectangle2D)
java.awt.geom.RoundRectangle2D.contains(double, double)
java.awt.geom.RoundRectangle2D.contains(double, double, double, double)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.contains(java.awt.Point)
java.awt.MenuComponent.AccessibleAWTMenuComponent.contains(java.awt.Point)
java.awt.Polygon.contains(double, double)
java.awt.Polygon.contains(double, double, double, double)
java.awt.Polygon.contains(int, int)
java.awt.Polygon.contains(java.awt.geom.Point2D)
java.awt.Polygon.contains(java.awt.geom.Rectangle2D)
java.awt.Polygon.contains(java.awt.Point)
java.awt.Rectangle.contains(int, int)
java.awt.Rectangle.contains(int, int, int, int)
java.awt.Rectangle.contains(java.awt.Point)
java.awt.Rectangle.contains(java.awt.Rectangle)
java.awt.Shape.contains(double, double)
java.awt.Shape.contains(double, double, double, double)
java.awt.Shape.contains(java.awt.geom.Point2D)
java.awt.Shape.contains(java.awt.geom.Rectangle2D)
java.beans.beancontext.BeanContextMembershipEvent.contains(java.lang.Object)
java.beans.beancontext.BeanContextSupport.contains(java.lang.Object)
java.lang.String.contains(java.lang.CharSequence)
java.nio.charset.Charset.contains(java.nio.charset.Charset)
java.util.AbstractCollection.contains(java.lang.Object)
java.util.ArrayDeque.contains(java.lang.Object)
java.util.ArrayList.contains(java.lang.Object)
java.util.Collection.contains(java.lang.Object)
java.util.concurrent.ArrayBlockingQueue.contains(java.lang.Object)
java.util.concurrent.BlockingDeque.contains(java.lang.Object)
java.util.concurrent.BlockingQueue.contains(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.contains(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.KeySetView.contains(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.contains(java.lang.Object)
java.util.concurrent.ConcurrentLinkedQueue.contains(java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.contains(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.contains(java.lang.Object)
java.util.concurrent.CopyOnWriteArraySet.contains(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.contains(java.lang.Object)
java.util.concurrent.LinkedBlockingQueue.contains(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.contains(java.lang.Object)
java.util.concurrent.PriorityBlockingQueue.contains(java.lang.Object)
java.util.concurrent.SynchronousQueue.contains(java.lang.Object)
java.util.Deque.contains(java.lang.Object)
java.util.HashSet.contains(java.lang.Object)
java.util.Hashtable.contains(java.lang.Object)
java.util.LinkedList.contains(java.lang.Object)
java.util.List.contains(java.lang.Object)
java.util.PriorityQueue.contains(java.lang.Object)
java.util.Set.contains(java.lang.Object)
java.util.TreeSet.contains(java.lang.Object)
java.util.Vector.contains(java.lang.Object)
javax.accessibility.AccessibleComponent.contains(java.awt.Point)
javax.accessibility.AccessibleRelationSet.contains(java.lang.String)
javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState)
javax.imageio.spi.ServiceRegistry.contains(java.lang.Object)
javax.lang.model.util.Types.contains(javax.lang.model.type.TypeMirror, javax.lang.model.type.TypeMirror)
javax.naming.directory.Attribute.contains(java.lang.Object)
javax.naming.directory.BasicAttribute.contains(java.lang.Object)
javax.print.attribute.SetOfIntegerSyntax.contains(int)
javax.print.attribute.SetOfIntegerSyntax.contains(javax.print.attribute.IntegerSyntax)
javax.swing.DefaultListModel.contains(java.lang.Object)
javax.swing.JComponent.contains(int, int)
javax.swing.JList.AccessibleJList.AccessibleJListChild.contains(java.awt.Point)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.contains(java.awt.Point)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.contains(java.awt.Point)
javax.swing.plaf.basic.BasicDirectoryModel.contains(java.lang.Object)
javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiButtonUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiColorChooserUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiComboBoxUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiDesktopIconUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiDesktopPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiFileChooserUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiInternalFrameUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiLabelUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiListUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiMenuBarUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiMenuItemUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiOptionPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiPanelUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiPopupMenuUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiProgressBarUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiRootPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiScrollBarUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiScrollPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiSeparatorUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiSliderUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiSpinnerUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiSplitPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiTabbedPaneUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiTableHeaderUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiTableUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiTextUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiToolBarUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiToolTipUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiTreeUI.contains(javax.swing.JComponent, int, int)
javax.swing.plaf.multi.MultiViewportUI.contains(javax.swing.JComponent, int, int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.contains(java.awt.Point)
org.w3c.dom.DOMStringList.contains(java.lang.String)
org.w3c.dom.NameList.contains(java.lang.String)


Occurences of containsAll

containsAll occurences:
java.beans.beancontext.BeanContextSupport.containsAll(java.util.Collection)
java.util.AbstractCollection.containsAll(java.util.Collection)
java.util.Collection.containsAll(java.util.Collection)
java.util.concurrent.ConcurrentHashMap.KeySetView.containsAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArrayList.containsAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArraySet.containsAll(java.util.Collection)
java.util.concurrent.SynchronousQueue.containsAll(java.util.Collection)
java.util.List.containsAll(java.util.Collection)
java.util.Set.containsAll(java.util.Collection)
java.util.Vector.containsAll(java.util.Collection)


Occurences of containsAttribute

containsAttribute occurences:
javax.swing.text.AbstractDocument.AbstractElement.containsAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.SimpleAttributeSet.containsAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.StyleContext.NamedStyle.containsAttribute(java.lang.Object, java.lang.Object)
javax.swing.text.StyleContext.SmallAttributeSet.containsAttribute(java.lang.Object, java.lang.Object)


Occurences of containsAttributes

containsAttributes occurences:
javax.swing.text.AbstractDocument.AbstractElement.containsAttributes(javax.swing.text.AttributeSet)
javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet)
javax.swing.text.SimpleAttributeSet.containsAttributes(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.NamedStyle.containsAttributes(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.SmallAttributeSet.containsAttributes(javax.swing.text.AttributeSet)


Occurences of containsCustomComponents

containsCustomComponents occurences:
javax.swing.plaf.basic.BasicOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane)
javax.swing.plaf.multi.MultiOptionPaneUI.containsCustomComponents(javax.swing.JOptionPane)
javax.swing.plaf.OptionPaneUI.containsCustomComponents(javax.swing.JOptionPane)


Occurences of containsKey

containsKey occurences:
java.awt.RenderingHints.containsKey(java.lang.Object)
java.beans.beancontext.BeanContextSupport.containsKey(java.lang.Object)
java.util.AbstractMap.containsKey(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.containsKey(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.containsKey(java.lang.Object)
java.util.EnumMap.containsKey(java.lang.Object)
java.util.HashMap.containsKey(java.lang.Object)
java.util.Hashtable.containsKey(java.lang.Object)
java.util.IdentityHashMap.containsKey(java.lang.Object)
java.util.jar.Attributes.containsKey(java.lang.Object)
java.util.Map.containsKey(java.lang.Object)
java.util.ResourceBundle.containsKey(java.lang.String)
java.util.TreeMap.containsKey(java.lang.Object)
java.util.WeakHashMap.containsKey(java.lang.Object)
javax.management.openmbean.CompositeData.containsKey(java.lang.String)
javax.management.openmbean.CompositeDataSupport.containsKey(java.lang.String)
javax.management.openmbean.CompositeType.containsKey(java.lang.String)
javax.management.openmbean.TabularData.containsKey(java.lang.Object:A)
javax.management.openmbean.TabularDataSupport.containsKey(java.lang.Object)
javax.management.openmbean.TabularDataSupport.containsKey(java.lang.Object:A)
javax.print.attribute.AttributeSet.containsKey(java.lang.Class)
javax.print.attribute.HashAttributeSet.containsKey(java.lang.Class)
javax.script.Bindings.containsKey(java.lang.Object)
javax.script.SimpleBindings.containsKey(java.lang.Object)


Occurences of containsObservedObject

containsObservedObject occurences:
javax.management.monitor.Monitor.containsObservedObject(javax.management.ObjectName)
javax.management.monitor.MonitorMBean.containsObservedObject(javax.management.ObjectName)


Occurences of containsValue

containsValue occurences:
java.awt.RenderingHints.containsValue(java.lang.Object)
java.util.AbstractMap.containsValue(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.containsValue(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.containsValue(java.lang.Object)
java.util.EnumMap.containsValue(java.lang.Object)
java.util.HashMap.containsValue(java.lang.Object)
java.util.Hashtable.containsValue(java.lang.Object)
java.util.IdentityHashMap.containsValue(java.lang.Object)
java.util.jar.Attributes.containsValue(java.lang.Object)
java.util.LinkedHashMap.containsValue(java.lang.Object)
java.util.Map.containsValue(java.lang.Object)
java.util.TreeMap.containsValue(java.lang.Object)
java.util.WeakHashMap.containsValue(java.lang.Object)
javax.management.openmbean.CompositeData.containsValue(java.lang.Object)
javax.management.openmbean.CompositeDataSupport.containsValue(java.lang.Object)
javax.management.openmbean.TabularData.containsValue(javax.management.openmbean.CompositeData)
javax.management.openmbean.TabularDataSupport.containsValue(java.lang.Object)
javax.management.openmbean.TabularDataSupport.containsValue(javax.management.openmbean.CompositeData)
javax.print.attribute.AttributeSet.containsValue(javax.print.attribute.Attribute)
javax.print.attribute.HashAttributeSet.containsValue(javax.print.attribute.Attribute)
javax.script.SimpleBindings.containsValue(java.lang.Object)


Occurences of CONTENT

CONTENT occurences:
javax.swing.text.html.CONTENT
javax.swing.text.html.CONTENT


Occurences of content

content occurences:
javax.swing.text.html.parser.content
javax.swing.text.html.parser.content


Occurences of contentEquals

contentEquals occurences:
java.lang.String.contentEquals(java.lang.CharSequence)
java.lang.String.contentEquals(java.lang.StringBuffer)
javax.lang.model.element.Name.contentEquals(java.lang.CharSequence)


Occurences of ContentHandler

ContentHandler occurences:
java.net.ContentHandler
org.xml.sax.ContentHandler


Occurences of ContentModel (constructors)

ContentModel (constructors) occurences:
javax.swing.text.html.parser.ContentModel()
javax.swing.text.html.parser.ContentModel(int, java.lang.Object, javax.swing.text.html.parser.ContentModel)
javax.swing.text.html.parser.ContentModel(int, javax.swing.text.html.parser.ContentModel)
javax.swing.text.html.parser.ContentModel(javax.swing.text.html.parser.Element)


Occurences of Contents

Contents occurences:
Contents
Contents
Contents
Contents
Contents
Contents
Contents
Contents


Occurences of contentsChanged

contentsChanged occurences:
javax.swing.event.ListDataListener.contentsChanged(javax.swing.event.ListDataEvent)
javax.swing.JComboBox.contentsChanged(javax.swing.event.ListDataEvent)
javax.swing.JList.AccessibleJList.contentsChanged(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler.contentsChanged(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboPopup.ListDataHandler.contentsChanged(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicListUI.ListDataHandler.contentsChanged(javax.swing.event.ListDataEvent)


Occurences of contentsLost

contentsLost occurences:
java.awt.Component.BltBufferStrategy.contentsLost()
java.awt.Component.FlipBufferStrategy.contentsLost()
java.awt.image.BufferStrategy.contentsLost()
java.awt.image.VolatileImage.contentsLost()


Occurences of contentsRestored

contentsRestored occurences:
java.awt.Component.BltBufferStrategy.contentsRestored()
java.awt.Component.FlipBufferStrategy.contentsRestored()
java.awt.image.BufferStrategy.contentsRestored()


Occurences of Context

Context occurences:
javax.naming.Context
org.omg.CORBA.Context


Occurences of context

context occurences:
java.awt.dnd.context
java.nio.file.WatchEvent.context()
javax.script.context


Occurences of ContextNotEmptyException (constructors)

ContextNotEmptyException (constructors) occurences:
javax.naming.ContextNotEmptyException()
javax.naming.ContextNotEmptyException(java.lang.String)


Occurences of contexts

contexts occurences:
org.omg.CORBA.Request.contexts()
org.omg.PortableInterceptor.RequestInfoOperations.contexts()


Occurences of CONTINUE

CONTINUE occurences:
com.sun.source.tree.CONTINUE
java.nio.file.CONTINUE
javax.sound.midi.CONTINUE


Occurences of continueDrag

continueDrag occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.continueDrag(int, int)
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.continueDrag(java.awt.event.MouseEvent)


Occurences of Control

Control occurences:
java.util.ResourceBundle.Control.Control()
javax.naming.ldap.Control
javax.sound.sampled.Control


Occurences of CONTROL

CONTROL occurences:
java.awt.CONTROL
java.lang.CONTROL


Occurences of controlChange

controlChange occurences:
javax.sound.midi.ControllerEventListener.controlChange(javax.sound.midi.ShortMessage)
javax.sound.midi.MidiChannel.controlChange(int, int)


Occurences of controller

controller occurences:
javax.imageio.controller
javax.imageio.metadata.controller


Occurences of convertImageMetadata

convertImageMetadata occurences:
javax.imageio.ImageTranscoder.convertImageMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam)
javax.imageio.ImageWriter.convertImageMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam)


Occurences of convertMouseEvent

convertMouseEvent occurences:
javax.swing.plaf.basic.BasicComboPopup.convertMouseEvent(java.awt.event.MouseEvent)
javax.swing.SwingUtilities.convertMouseEvent(java.awt.Component, java.awt.event.MouseEvent, java.awt.Component)


Occurences of convertPoint

convertPoint occurences:
javax.swing.SwingUtilities.convertPoint(java.awt.Component, int, int, java.awt.Component)
javax.swing.SwingUtilities.convertPoint(java.awt.Component, java.awt.Point, java.awt.Component)


Occurences of convertRowIndexToModel

convertRowIndexToModel occurences:
javax.swing.DefaultRowSorter.convertRowIndexToModel(int)
javax.swing.JTable.convertRowIndexToModel(int)
javax.swing.RowSorter.convertRowIndexToModel(int)


Occurences of convertRowIndexToView

convertRowIndexToView occurences:
javax.swing.DefaultRowSorter.convertRowIndexToView(int)
javax.swing.JTable.convertRowIndexToView(int)
javax.swing.RowSorter.convertRowIndexToView(int)


Occurences of convertStreamMetadata

convertStreamMetadata occurences:
javax.imageio.ImageTranscoder.convertStreamMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageWriteParam)
javax.imageio.ImageWriter.convertStreamMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageWriteParam)


Occurences of convertToVector

convertToVector occurences:
javax.swing.table.DefaultTableModel.convertToVector(java.lang.Object:A)
javax.swing.table.DefaultTableModel.convertToVector(java.lang.Object:A:A)


Occurences of ConvolveOp (constructors)

ConvolveOp (constructors) occurences:
java.awt.image.ConvolveOp(java.awt.image.Kernel)
java.awt.image.ConvolveOp(java.awt.image.Kernel, int, java.awt.RenderingHints)


Occurences of CookieHolder (constructors)

CookieHolder (constructors) occurences:
org.omg.PortableServer.ServantLocatorPackage.CookieHolder()
org.omg.PortableServer.ServantLocatorPackage.CookieHolder(java.lang.Object)


Occurences of CookieManager (constructors)

CookieManager (constructors) occurences:
java.net.CookieManager()
java.net.CookieManager(java.net.CookieStore, java.net.CookiePolicy)


Occurences of CopiesSupported (constructors)

CopiesSupported (constructors) occurences:
javax.print.attribute.standard.CopiesSupported(int)
javax.print.attribute.standard.CopiesSupported(int, int)


Occurences of COPTIC

COPTIC occurences:
java.lang.COPTIC
java.lang.COPTIC


Occurences of copy

copy occurences:
java.nio.file.Files.copy(java.io.InputStream, java.nio.file.Path, java.nio.file.CopyOption...)
java.nio.file.Files.copy(java.nio.file.Path, java.io.OutputStream)
java.nio.file.Files.copy(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
java.nio.file.spi.FileSystemProvider.copy(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
java.util.Collections.copy(java.util.List, java.util.List)
javax.swing.JPasswordField.copy()
javax.swing.text.copy
javax.swing.text.JTextComponent.copy()
org.omg.CORBA.DynAny.copy()
org.omg.CORBA.PolicyOperations.copy()
org.omg.CORBA._PolicyStub.copy()
org.omg.DynamicAny.DynAnyOperations.copy()
org.omg.DynamicAny._DynAnyStub.copy()
org.omg.DynamicAny._DynArrayStub.copy()
org.omg.DynamicAny._DynEnumStub.copy()
org.omg.DynamicAny._DynFixedStub.copy()
org.omg.DynamicAny._DynSequenceStub.copy()
org.omg.DynamicAny._DynStructStub.copy()
org.omg.DynamicAny._DynUnionStub.copy()
org.omg.DynamicAny._DynValueStub.copy()


Occurences of copyArea

copyArea occurences:
java.awt.Graphics.copyArea(int, int, int, int, int, int)
javax.swing.DebugGraphics.copyArea(int, int, int, int, int, int)


Occurences of copyAttributes

copyAttributes occurences:
javax.swing.text.AbstractDocument.AbstractElement.copyAttributes()
javax.swing.text.AttributeSet.copyAttributes()
javax.swing.text.SimpleAttributeSet.copyAttributes()
javax.swing.text.StyleContext.NamedStyle.copyAttributes()
javax.swing.text.StyleContext.SmallAttributeSet.copyAttributes()


Occurences of copyData

copyData occurences:
java.awt.image.BufferedImage.copyData(java.awt.image.WritableRaster)
java.awt.image.RenderedImage.copyData(java.awt.image.WritableRaster)


Occurences of copyInto

copyInto occurences:
java.util.Vector.copyInto(java.lang.Object:A)
javax.swing.DefaultListModel.copyInto(java.lang.Object:A)


Occurences of copyObject

copyObject occurences:
javax.rmi.CORBA.Util.copyObject(java.lang.Object, org.omg.CORBA.ORB)
javax.rmi.CORBA.UtilDelegate.copyObject(java.lang.Object, org.omg.CORBA.ORB)


Occurences of copyObjects

copyObjects occurences:
javax.rmi.CORBA.Util.copyObjects(java.lang.Object:A, org.omg.CORBA.ORB)
javax.rmi.CORBA.UtilDelegate.copyObjects(java.lang.Object:A, org.omg.CORBA.ORB)


Occurences of copyOf

copyOf occurences:
java.util.Arrays.copyOf(boolean:A, int)
java.util.Arrays.copyOf(byte:A, int)
java.util.Arrays.copyOf(char:A, int)
java.util.Arrays.copyOf(double:A, int)
java.util.Arrays.copyOf(float:A, int)
java.util.Arrays.copyOf(int:A, int)
java.util.Arrays.copyOf(java.lang.Object:A, int)
java.util.Arrays.copyOf(java.lang.Object:A, int, java.lang.Class)
java.util.Arrays.copyOf(long:A, int)
java.util.Arrays.copyOf(short:A, int)
java.util.Arrays.copyOf(T:A, int)
java.util.Arrays.copyOf(U:A, int, java.lang.Class)
java.util.EnumSet.copyOf(java.util.Collection)
java.util.EnumSet.copyOf(java.util.EnumSet)


Occurences of copyOfRange

copyOfRange occurences:
java.util.Arrays.copyOfRange(boolean:A, int, int)
java.util.Arrays.copyOfRange(byte:A, int, int)
java.util.Arrays.copyOfRange(char:A, int, int)
java.util.Arrays.copyOfRange(double:A, int, int)
java.util.Arrays.copyOfRange(float:A, int, int)
java.util.Arrays.copyOfRange(int:A, int, int)
java.util.Arrays.copyOfRange(java.lang.Object:A, int, int)
java.util.Arrays.copyOfRange(java.lang.Object:A, int, int, java.lang.Class)
java.util.Arrays.copyOfRange(long:A, int, int)
java.util.Arrays.copyOfRange(short:A, int, int)
java.util.Arrays.copyOfRange(T:A, int, int)
java.util.Arrays.copyOfRange(U:A, int, int, java.lang.Class)


Occurences of CopyOnWriteArrayList (constructors)

CopyOnWriteArrayList (constructors) occurences:
java.util.concurrent.CopyOnWriteArrayList()
java.util.concurrent.CopyOnWriteArrayList(E:A)
java.util.concurrent.CopyOnWriteArrayList(java.lang.Object:A)
java.util.concurrent.CopyOnWriteArrayList(java.util.Collection)


Occurences of CopyOnWriteArraySet (constructors)

CopyOnWriteArraySet (constructors) occurences:
java.util.concurrent.CopyOnWriteArraySet()
java.util.concurrent.CopyOnWriteArraySet(java.util.Collection)


Occurences of copySign

copySign occurences:
java.lang.Math.copySign(double, double)
java.lang.Math.copySign(float, float)
java.lang.StrictMath.copySign(double, double)
java.lang.StrictMath.copySign(float, float)


Occurences of copyValueOf

copyValueOf occurences:
java.lang.String.copyValueOf(char:A)
java.lang.String.copyValueOf(char:A, int, int)


Occurences of CORBA

CORBA occurences:
javax.rmi.CORBA
org.omg.CORBA


Occurences of cos

cos occurences:
java.lang.Math.cos(double)
java.lang.StrictMath.cos(double)


Occurences of cosh

cosh occurences:
java.lang.Math.cosh(double)
java.lang.StrictMath.cosh(double)


Occurences of count

count occurences:
java.io.count
java.io.count
java.io.count
java.io.count
java.io.count
java.io.count
java.io.count
java.nio.file.WatchEvent.count()
java.util.stream.DoubleStream.count()
java.util.stream.IntStream.count()
java.util.stream.LongStream.count()
java.util.stream.Stream.count()
javax.swing.text.count
org.omg.CORBA.ContextList.count()
org.omg.CORBA.ExceptionList.count()
org.omg.CORBA.NVList.count()


Occurences of CountedCompleter (constructors)

CountedCompleter (constructors) occurences:
java.util.concurrent.CountedCompleter()
java.util.concurrent.CountedCompleter(java.util.concurrent.CountedCompleter)
java.util.concurrent.CountedCompleter(java.util.concurrent.CountedCompleter, int)


Occurences of countItems

countItems occurences:
java.awt.Choice.countItems()
java.awt.List.countItems()
java.awt.Menu.countItems()


Occurences of crc

crc occurences:
java.util.zip.crc
java.util.zip.crc


Occurences of create

create occurences:
java.awt.Graphics.create()
java.awt.Graphics.create(int, int, int, int)
java.awt.image.renderable.ContextualRenderedImageFactory.create(java.awt.image.renderable.RenderContext, java.awt.image.renderable.ParameterBlock)
java.awt.image.renderable.RenderedImageFactory.create(java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)
java.beans.EventHandler.create(java.lang.Class, java.lang.Object, java.lang.String)
java.beans.EventHandler.create(java.lang.Class, java.lang.Object, java.lang.String, java.lang.String)
java.beans.EventHandler.create(java.lang.Class, java.lang.Object, java.lang.String, java.lang.String, java.lang.String)
java.net.DatagramSocketImpl.create()
java.net.SocketImpl.create(boolean)
java.net.URI.create(java.lang.String)
javax.swing.DebugGraphics.create()
javax.swing.DebugGraphics.create(int, int, int, int)
javax.swing.plaf.basic.BasicPasswordFieldUI.create(javax.swing.text.Element)
javax.swing.plaf.basic.BasicTextAreaUI.create(javax.swing.text.Element)
javax.swing.plaf.basic.BasicTextFieldUI.create(javax.swing.text.Element)
javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element)
javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element, int, int)
javax.swing.plaf.synth.SynthPasswordFieldUI.create(javax.swing.text.Element)
javax.swing.text.DefaultStyledDocument.create(javax.swing.text.DefaultStyledDocument.ElementSpec:A)
javax.swing.text.html.HTMLDocument.create(javax.swing.text.DefaultStyledDocument.ElementSpec:A)
javax.swing.text.html.HTMLEditorKit.HTMLFactory.create(javax.swing.text.Element)
javax.swing.text.ViewFactory.create(javax.swing.text.Element)
javax.xml.soap.SOAPElementFactory.create(java.lang.String)
javax.xml.soap.SOAPElementFactory.create(java.lang.String, java.lang.String, java.lang.String)
javax.xml.soap.SOAPElementFactory.create(javax.xml.soap.Name)
javax.xml.ws.Endpoint.create(java.lang.Object)
javax.xml.ws.Endpoint.create(java.lang.Object, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Endpoint.create(java.lang.String, java.lang.Object)
javax.xml.ws.Endpoint.create(java.lang.String, java.lang.Object, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.create(java.net.URL, javax.xml.namespace.QName)
javax.xml.ws.Service.create(java.net.URL, javax.xml.namespace.QName, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.create(javax.xml.namespace.QName)
javax.xml.ws.Service.create(javax.xml.namespace.QName, javax.xml.ws.WebServiceFeature...)


Occurences of Create and Build Applications

Create and Build Applications occurences:
Create and Build Applications
Create and Build Applications


Occurences of createActionChangeListener

createActionChangeListener occurences:
javax.swing.JMenu.createActionChangeListener(javax.swing.JMenuItem)
javax.swing.JPopupMenu.createActionChangeListener(javax.swing.JMenuItem)
javax.swing.JToolBar.createActionChangeListener(javax.swing.JButton)


Occurences of createActionComponent

createActionComponent occurences:
javax.swing.JMenu.createActionComponent(javax.swing.Action)
javax.swing.JPopupMenu.createActionComponent(javax.swing.Action)
javax.swing.JToolBar.createActionComponent(javax.swing.Action)


Occurences of createActionPropertyChangeListener

createActionPropertyChangeListener occurences:
javax.swing.AbstractButton.createActionPropertyChangeListener(javax.swing.Action)
javax.swing.JComboBox.createActionPropertyChangeListener(javax.swing.Action)
javax.swing.JTextField.createActionPropertyChangeListener(javax.swing.Action)


Occurences of createAndPublishEndpoint

createAndPublishEndpoint occurences:
javax.xml.ws.spi.Provider.createAndPublishEndpoint(java.lang.String, java.lang.Object)
javax.xml.ws.spi.Provider.createAndPublishEndpoint(java.lang.String, java.lang.Object, javax.xml.ws.WebServiceFeature...)


Occurences of createArrowButton

createArrowButton occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton()
javax.swing.plaf.metal.MetalComboBoxUI.createArrowButton()
javax.swing.plaf.synth.SynthComboBoxUI.createArrowButton()


Occurences of createAttachmentPart

createAttachmentPart occurences:
javax.xml.soap.SOAPMessage.createAttachmentPart()
javax.xml.soap.SOAPMessage.createAttachmentPart(java.lang.Object, java.lang.String)
javax.xml.soap.SOAPMessage.createAttachmentPart(javax.activation.DataHandler)


Occurences of createAttribute

createAttribute occurences:
javax.xml.stream.XMLEventFactory.createAttribute(java.lang.String, java.lang.String)
javax.xml.stream.XMLEventFactory.createAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
javax.xml.stream.XMLEventFactory.createAttribute(javax.xml.namespace.QName, java.lang.String)
org.w3c.dom.Document.createAttribute(java.lang.String)


Occurences of createBandedRaster

createBandedRaster occurences:
java.awt.image.Raster.createBandedRaster(int, int, int, int, int:A, int:A, java.awt.Point)
java.awt.image.Raster.createBandedRaster(int, int, int, int, java.awt.Point)
java.awt.image.Raster.createBandedRaster(java.awt.image.DataBuffer, int, int, int, int:A, int:A, java.awt.Point)


Occurences of createBCSChild

createBCSChild occurences:
java.beans.beancontext.BeanContextServicesSupport.createBCSChild(java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextSupport.createBCSChild(java.lang.Object, java.lang.Object)


Occurences of createBevelBorder

createBevelBorder occurences:
javax.swing.BorderFactory.createBevelBorder(int)
javax.swing.BorderFactory.createBevelBorder(int, java.awt.Color, java.awt.Color)
javax.swing.BorderFactory.createBevelBorder(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of createBinder

createBinder occurences:
javax.xml.bind.JAXBContext.createBinder()
javax.xml.bind.JAXBContext.createBinder(java.lang.Class)


Occurences of createBorderListener

createBorderListener occurences:
javax.swing.plaf.basic.BasicInternalFrameUI.createBorderListener(javax.swing.JInternalFrame)
javax.swing.plaf.metal.MetalInternalFrameUI.createBorderListener(javax.swing.JInternalFrame)


Occurences of createBranchElement

createBranchElement occurences:
javax.swing.text.AbstractDocument.createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet)
javax.swing.text.html.HTMLDocument.createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet)


Occurences of createBufferStrategy

createBufferStrategy occurences:
java.awt.Canvas.createBufferStrategy(int)
java.awt.Canvas.createBufferStrategy(int, java.awt.BufferCapabilities)
java.awt.Window.createBufferStrategy(int)
java.awt.Window.createBufferStrategy(int, java.awt.BufferCapabilities)


Occurences of createButtonListener

createButtonListener occurences:
javax.swing.plaf.basic.BasicButtonUI.createButtonListener(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalButtonUI.createButtonListener(javax.swing.AbstractButton)


Occurences of createButtons

createButtons occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.createButtons()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.createButtons()


Occurences of createCaret

createCaret occurences:
javax.swing.plaf.basic.BasicTextUI.createCaret()
javax.swing.text.DefaultEditorKit.createCaret()
javax.swing.text.EditorKit.createCaret()


Occurences of createChangeListener

createChangeListener occurences:
javax.swing.AbstractButton.createChangeListener()
javax.swing.JProgressBar.createChangeListener()
javax.swing.JSlider.createChangeListener()
javax.swing.JTabbedPane.createChangeListener()
javax.swing.plaf.basic.BasicMenuBarUI.createChangeListener()
javax.swing.plaf.basic.BasicMenuUI.createChangeListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.createChangeListener(javax.swing.JSlider)
javax.swing.plaf.basic.BasicTabbedPaneUI.createChangeListener()


Occurences of createComment

createComment occurences:
javax.xml.stream.XMLEventFactory.createComment(java.lang.String)
org.w3c.dom.Document.createComment(java.lang.String)


Occurences of createCompatibleDestImage

createCompatibleDestImage occurences:
java.awt.image.AffineTransformOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
java.awt.image.BufferedImageOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
java.awt.image.ColorConvertOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
java.awt.image.ConvolveOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
java.awt.image.LookupOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
java.awt.image.RescaleOp.createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)


Occurences of createCompatibleDestRaster

createCompatibleDestRaster occurences:
java.awt.image.AffineTransformOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.BandCombineOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.ColorConvertOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.ConvolveOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.LookupOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.RasterOp.createCompatibleDestRaster(java.awt.image.Raster)
java.awt.image.RescaleOp.createCompatibleDestRaster(java.awt.image.Raster)


Occurences of createCompatibleImage

createCompatibleImage occurences:
java.awt.GraphicsConfiguration.createCompatibleImage(int, int)
java.awt.GraphicsConfiguration.createCompatibleImage(int, int, int)


Occurences of createCompatibleSampleModel

createCompatibleSampleModel occurences:
java.awt.image.BandedSampleModel.createCompatibleSampleModel(int, int)
java.awt.image.ColorModel.createCompatibleSampleModel(int, int)
java.awt.image.ComponentColorModel.createCompatibleSampleModel(int, int)
java.awt.image.ComponentSampleModel.createCompatibleSampleModel(int, int)
java.awt.image.IndexColorModel.createCompatibleSampleModel(int, int)
java.awt.image.MultiPixelPackedSampleModel.createCompatibleSampleModel(int, int)
java.awt.image.PackedColorModel.createCompatibleSampleModel(int, int)
java.awt.image.PixelInterleavedSampleModel.createCompatibleSampleModel(int, int)
java.awt.image.SampleModel.createCompatibleSampleModel(int, int)
java.awt.image.SinglePixelPackedSampleModel.createCompatibleSampleModel(int, int)


Occurences of createCompatibleVolatileImage

createCompatibleVolatileImage occurences:
java.awt.GraphicsConfiguration.createCompatibleVolatileImage(int, int)
java.awt.GraphicsConfiguration.createCompatibleVolatileImage(int, int, int)
java.awt.GraphicsConfiguration.createCompatibleVolatileImage(int, int, java.awt.ImageCapabilities)
java.awt.GraphicsConfiguration.createCompatibleVolatileImage(int, int, java.awt.ImageCapabilities, int)


Occurences of createCompatibleWritableRaster

createCompatibleWritableRaster occurences:
java.awt.image.ColorModel.createCompatibleWritableRaster(int, int)
java.awt.image.ComponentColorModel.createCompatibleWritableRaster(int, int)
java.awt.image.DirectColorModel.createCompatibleWritableRaster(int, int)
java.awt.image.IndexColorModel.createCompatibleWritableRaster(int, int)
java.awt.image.Raster.createCompatibleWritableRaster()
java.awt.image.Raster.createCompatibleWritableRaster(int, int)
java.awt.image.Raster.createCompatibleWritableRaster(int, int, int, int)
java.awt.image.Raster.createCompatibleWritableRaster(java.awt.Rectangle)


Occurences of createComponent

createComponent occurences:
java.awt.Toolkit.createComponent(java.awt.Component)
javax.swing.text.ComponentView.createComponent()
javax.swing.text.html.FormView.createComponent()
javax.swing.text.html.ObjectView.createComponent()


Occurences of createComponentListener

createComponentListener occurences:
javax.swing.plaf.basic.BasicInternalFrameUI.createComponentListener()
javax.swing.plaf.basic.BasicSliderUI.createComponentListener(javax.swing.JSlider)
javax.swing.plaf.basic.BasicTreeUI.createComponentListener()
javax.swing.plaf.synth.SynthInternalFrameUI.createComponentListener()


Occurences of createCompoundBorder

createCompoundBorder occurences:
javax.swing.BorderFactory.createCompoundBorder()
javax.swing.BorderFactory.createCompoundBorder(javax.swing.border.Border, javax.swing.border.Border)


Occurences of createContainerListener

createContainerListener occurences:
javax.swing.plaf.basic.BasicMenuBarUI.createContainerListener()
javax.swing.plaf.metal.MetalToolBarUI.createContainerListener()


Occurences of createContext

createContext occurences:
java.awt.AlphaComposite.createContext(java.awt.image.ColorModel, java.awt.image.ColorModel, java.awt.RenderingHints)
java.awt.Color.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.Composite.createContext(java.awt.image.ColorModel, java.awt.image.ColorModel, java.awt.RenderingHints)
java.awt.GradientPaint.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.LinearGradientPaint.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.Paint.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.RadialGradientPaint.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.TexturePaint.createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
org.ietf.jgss.GSSManager.createContext(byte:A)
org.ietf.jgss.GSSManager.createContext(org.ietf.jgss.GSSCredential)
org.ietf.jgss.GSSManager.createContext(org.ietf.jgss.GSSName, org.ietf.jgss.Oid, org.ietf.jgss.GSSCredential, int)


Occurences of createCredential

createCredential occurences:
org.ietf.jgss.GSSManager.createCredential(int)
org.ietf.jgss.GSSManager.createCredential(org.ietf.jgss.GSSName, int, org.ietf.jgss.Oid, int)
org.ietf.jgss.GSSManager.createCredential(org.ietf.jgss.GSSName, int, org.ietf.jgss.Oid:A, int)


Occurences of createDashedBorder

createDashedBorder occurences:
javax.swing.BorderFactory.createDashedBorder(java.awt.Paint)
javax.swing.BorderFactory.createDashedBorder(java.awt.Paint, float, float)
javax.swing.BorderFactory.createDashedBorder(java.awt.Paint, float, float, float, boolean)


Occurences of createDataBuffer

createDataBuffer occurences:
java.awt.image.BandedSampleModel.createDataBuffer()
java.awt.image.ComponentSampleModel.createDataBuffer()
java.awt.image.MultiPixelPackedSampleModel.createDataBuffer()
java.awt.image.SampleModel.createDataBuffer()
java.awt.image.SinglePixelPackedSampleModel.createDataBuffer()


Occurences of createDataContentHandler

createDataContentHandler occurences:
javax.activation.CommandMap.createDataContentHandler(java.lang.String)
javax.activation.CommandMap.createDataContentHandler(java.lang.String, javax.activation.DataSource)
javax.activation.DataContentHandlerFactory.createDataContentHandler(java.lang.String)
javax.activation.MailcapCommandMap.createDataContentHandler(java.lang.String)


Occurences of createDecreaseButton

createDecreaseButton occurences:
javax.swing.plaf.basic.BasicScrollBarUI.createDecreaseButton(int)
javax.swing.plaf.metal.MetalScrollBarUI.createDecreaseButton(int)
javax.swing.plaf.synth.SynthScrollBarUI.createDecreaseButton(int)


Occurences of createDefaultCellEditor

createDefaultCellEditor occurences:
javax.swing.plaf.basic.BasicTreeUI.createDefaultCellEditor()
javax.swing.plaf.synth.SynthTreeUI.createDefaultCellEditor()


Occurences of createDefaultCellRenderer

createDefaultCellRenderer occurences:
javax.swing.plaf.basic.BasicTreeUI.createDefaultCellRenderer()
javax.swing.plaf.synth.SynthTreeUI.createDefaultCellRenderer()


Occurences of createDefaultChoosers

createDefaultChoosers occurences:
javax.swing.plaf.basic.BasicColorChooserUI.createDefaultChoosers()
javax.swing.plaf.synth.SynthColorChooserUI.createDefaultChoosers()


Occurences of createDefaultColumnModel

createDefaultColumnModel occurences:
javax.swing.JTable.createDefaultColumnModel()
javax.swing.table.JTableHeader.createDefaultColumnModel()


Occurences of createDefaultDivider

createDefaultDivider occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.createDefaultDivider()
javax.swing.plaf.metal.MetalSplitPaneUI.createDefaultDivider()
javax.swing.plaf.synth.SynthSplitPaneUI.createDefaultDivider()


Occurences of createDefaultDocument

createDefaultDocument occurences:
javax.swing.text.DefaultEditorKit.createDefaultDocument()
javax.swing.text.EditorKit.createDefaultDocument()
javax.swing.text.html.HTMLEditorKit.createDefaultDocument()
javax.swing.text.StyledEditorKit.createDefaultDocument()


Occurences of createDefaultEditorKit

createDefaultEditorKit occurences:
javax.swing.JEditorPane.createDefaultEditorKit()
javax.swing.JTextPane.createDefaultEditorKit()


Occurences of createDefaultModel

createDefaultModel occurences:
javax.swing.JTextArea.createDefaultModel()
javax.swing.JTextField.createDefaultModel()


Occurences of createDefaultNonContinuousLayoutDivider

createDefaultNonContinuousLayoutDivider occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.createDefaultNonContinuousLayoutDivider()
javax.swing.plaf.synth.SynthSplitPaneUI.createDefaultNonContinuousLayoutDivider()


Occurences of createDefaultRendering

createDefaultRendering occurences:
java.awt.image.renderable.RenderableImage.createDefaultRendering()
java.awt.image.renderable.RenderableImageOp.createDefaultRendering()


Occurences of createDefaultRoot

createDefaultRoot occurences:
javax.swing.text.DefaultStyledDocument.createDefaultRoot()
javax.swing.text.html.HTMLDocument.createDefaultRoot()
javax.swing.text.PlainDocument.createDefaultRoot()


Occurences of createDialog

createDialog occurences:
java.awt.Toolkit.createDialog(java.awt.Dialog)
javax.swing.JColorChooser.createDialog(java.awt.Component, java.lang.String, boolean, javax.swing.JColorChooser, java.awt.event.ActionListener, java.awt.event.ActionListener)
javax.swing.JFileChooser.createDialog(java.awt.Component)
javax.swing.JOptionPane.createDialog(java.awt.Component, java.lang.String)
javax.swing.JOptionPane.createDialog(java.lang.String)


Occurences of createDirectory

createDirectory occurences:
java.nio.file.Files.createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute...)
java.nio.file.spi.FileSystemProvider.createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute...)


Occurences of createDispatch

createDispatch occurences:
javax.xml.ws.Service.createDispatch(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.Service.Mode)
javax.xml.ws.Service.createDispatch(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.createDispatch(javax.xml.namespace.QName, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode)
javax.xml.ws.Service.createDispatch(javax.xml.namespace.QName, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.createDispatch(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.createDispatch(javax.xml.ws.EndpointReference, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.Service.Mode)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.namespace.QName, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.namespace.QName, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.createDispatch(javax.xml.ws.EndpointReference, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature...)


Occurences of createDockingListener

createDockingListener occurences:
javax.swing.plaf.basic.BasicToolBarUI.createDockingListener()
javax.swing.plaf.metal.MetalToolBarUI.createDockingListener()


Occurences of createDragGestureRecognizer

createDragGestureRecognizer occurences:
java.awt.dnd.DragSource.createDragGestureRecognizer(java.lang.Class, java.awt.Component, int, java.awt.dnd.DragGestureListener)
java.awt.Toolkit.createDragGestureRecognizer(java.lang.Class, java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener)


Occurences of createDTD

createDTD occurences:
javax.swing.text.html.parser.ParserDelegator.createDTD(javax.swing.text.html.parser.DTD, java.lang.String)
javax.xml.stream.XMLEventFactory.createDTD(java.lang.String)


Occurences of createEditor

createEditor occurences:
javax.swing.JSpinner.createEditor(javax.swing.SpinnerModel)
javax.swing.plaf.basic.BasicComboBoxUI.createEditor()
javax.swing.plaf.basic.BasicSpinnerUI.createEditor()
javax.swing.plaf.metal.MetalComboBoxUI.createEditor()
javax.swing.plaf.synth.SynthComboBoxUI.createEditor()
javax.swing.plaf.synth.SynthSpinnerUI.createEditor()


Occurences of createElement

createElement occurences:
javax.xml.soap.SOAPFactory.createElement(java.lang.String)
javax.xml.soap.SOAPFactory.createElement(java.lang.String, java.lang.String, java.lang.String)
javax.xml.soap.SOAPFactory.createElement(javax.xml.namespace.QName)
javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
javax.xml.soap.SOAPFactory.createElement(org.w3c.dom.Element)
org.w3c.dom.Document.createElement(java.lang.String)


Occurences of createEmptyBorder

createEmptyBorder occurences:
javax.swing.BorderFactory.createEmptyBorder()
javax.swing.BorderFactory.createEmptyBorder(int, int, int, int)


Occurences of createEndElement

createEndElement occurences:
javax.xml.stream.XMLEventFactory.createEndElement(java.lang.String, java.lang.String, java.lang.String)
javax.xml.stream.XMLEventFactory.createEndElement(java.lang.String, java.lang.String, java.lang.String, java.util.Iterator)
javax.xml.stream.XMLEventFactory.createEndElement(javax.xml.namespace.QName, java.util.Iterator)


Occurences of createEndpoint

createEndpoint occurences:
javax.xml.ws.spi.Provider.createEndpoint(java.lang.String, java.lang.Class, javax.xml.ws.spi.Invoker, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.Provider.createEndpoint(java.lang.String, java.lang.Object)
javax.xml.ws.spi.Provider.createEndpoint(java.lang.String, java.lang.Object, javax.xml.ws.WebServiceFeature...)


Occurences of createEntityReference

createEntityReference occurences:
javax.xml.stream.XMLEventFactory.createEntityReference(java.lang.String, javax.xml.stream.events.EntityDeclaration)
org.w3c.dom.Document.createEntityReference(java.lang.String)


Occurences of createEtchedBorder

createEtchedBorder occurences:
javax.swing.BorderFactory.createEtchedBorder()
javax.swing.BorderFactory.createEtchedBorder(int)
javax.swing.BorderFactory.createEtchedBorder(int, java.awt.Color, java.awt.Color)
javax.swing.BorderFactory.createEtchedBorder(java.awt.Color, java.awt.Color)


Occurences of createExtendedResponse

createExtendedResponse occurences:
javax.naming.ldap.ExtendedRequest.createExtendedResponse(java.lang.String, byte:A, int, int)
javax.naming.ldap.StartTlsRequest.createExtendedResponse(java.lang.String, byte:A, int, int)


Occurences of createFault

createFault occurences:
javax.xml.soap.SOAPFactory.createFault()
javax.xml.soap.SOAPFactory.createFault(java.lang.String, javax.xml.namespace.QName)


Occurences of createFileObject

createFileObject occurences:
javax.swing.filechooser.FileSystemView.createFileObject(java.io.File, java.lang.String)
javax.swing.filechooser.FileSystemView.createFileObject(java.lang.String)


Occurences of createFilteredReader

createFilteredReader occurences:
javax.xml.stream.XMLInputFactory.createFilteredReader(javax.xml.stream.XMLEventReader, javax.xml.stream.EventFilter)
javax.xml.stream.XMLInputFactory.createFilteredReader(javax.xml.stream.XMLStreamReader, javax.xml.stream.StreamFilter)


Occurences of createFocusListener

createFocusListener occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener()
javax.swing.plaf.basic.BasicListUI.createFocusListener()
javax.swing.plaf.basic.BasicSliderUI.createFocusListener(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSplitPaneUI.createFocusListener()
javax.swing.plaf.basic.BasicTabbedPaneUI.createFocusListener()
javax.swing.plaf.basic.BasicTableUI.createFocusListener()
javax.swing.plaf.basic.BasicTreeUI.createFocusListener()


Occurences of createFont

createFont occurences:
java.awt.Font.createFont(int, java.io.File)
java.awt.Font.createFont(int, java.io.InputStream)


Occurences of createFragment

createFragment occurences:
javax.swing.text.GlyphView.createFragment(int, int)
javax.swing.text.View.createFragment(int, int)


Occurences of createGlassPane

createGlassPane occurences:
javax.swing.JLayer.createGlassPane()
javax.swing.JRootPane.createGlassPane()


Occurences of createGlyphVector

createGlyphVector occurences:
java.awt.Font.createGlyphVector(java.awt.font.FontRenderContext, char:A)
java.awt.Font.createGlyphVector(java.awt.font.FontRenderContext, int:A)
java.awt.Font.createGlyphVector(java.awt.font.FontRenderContext, java.lang.String)
java.awt.Font.createGlyphVector(java.awt.font.FontRenderContext, java.text.CharacterIterator)


Occurences of createGraphics

createGraphics occurences:
java.awt.GraphicsEnvironment.createGraphics(java.awt.image.BufferedImage)
java.awt.image.BufferedImage.createGraphics()
java.awt.image.VolatileImage.createGraphics()
java.awt.SplashScreen.createGraphics()


Occurences of createGrayscale

createGrayscale occurences:
javax.imageio.ImageTypeSpecifier.createGrayscale(int, int, boolean)
javax.imageio.ImageTypeSpecifier.createGrayscale(int, int, boolean, boolean)


Occurences of createImage

createImage occurences:
java.awt.Component.createImage(int, int)
java.awt.Component.createImage(java.awt.image.ImageProducer)
java.awt.Toolkit.createImage(byte:A)
java.awt.Toolkit.createImage(byte:A, int, int)
java.awt.Toolkit.createImage(java.awt.image.ImageProducer)
java.awt.Toolkit.createImage(java.lang.String)
java.awt.Toolkit.createImage(java.net.URL)


Occurences of createIncreaseButton

createIncreaseButton occurences:
javax.swing.plaf.basic.BasicScrollBarUI.createIncreaseButton(int)
javax.swing.plaf.metal.MetalScrollBarUI.createIncreaseButton(int)
javax.swing.plaf.synth.SynthScrollBarUI.createIncreaseButton(int)


Occurences of createInputAttributes

createInputAttributes occurences:
javax.swing.text.html.HTMLEditorKit.createInputAttributes(javax.swing.text.Element, javax.swing.text.MutableAttributeSet)
javax.swing.text.StyledEditorKit.createInputAttributes(javax.swing.text.Element, javax.swing.text.MutableAttributeSet)


Occurences of createInputStreamInstance

createInputStreamInstance occurences:
javax.imageio.spi.ImageInputStreamSpi.createInputStreamInstance(java.lang.Object)
javax.imageio.spi.ImageInputStreamSpi.createInputStreamInstance(java.lang.Object, boolean, java.io.File)


Occurences of createInterleavedRaster

createInterleavedRaster occurences:
java.awt.image.Raster.createInterleavedRaster(int, int, int, int, int, int:A, java.awt.Point)
java.awt.image.Raster.createInterleavedRaster(int, int, int, int, java.awt.Point)
java.awt.image.Raster.createInterleavedRaster(java.awt.image.DataBuffer, int, int, int, int, int:A, java.awt.Point)


Occurences of createIntersection

createIntersection occurences:
java.awt.geom.Rectangle2D.createIntersection(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Double.createIntersection(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Float.createIntersection(java.awt.geom.Rectangle2D)
java.awt.Rectangle.createIntersection(java.awt.geom.Rectangle2D)


Occurences of createItemListener

createItemListener occurences:
javax.swing.AbstractButton.createItemListener()
javax.swing.plaf.basic.BasicComboBoxUI.createItemListener()
javax.swing.plaf.basic.BasicComboPopup.createItemListener()


Occurences of createKeyListener

createKeyListener occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener()
javax.swing.plaf.basic.BasicComboPopup.createKeyListener()
javax.swing.plaf.basic.BasicTableUI.createKeyListener()
javax.swing.plaf.basic.BasicTreeUI.createKeyListener()


Occurences of createLargeAttributeSet

createLargeAttributeSet occurences:
javax.swing.text.html.StyleSheet.createLargeAttributeSet(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.createLargeAttributeSet(javax.swing.text.AttributeSet)


Occurences of createLayout

createLayout occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.createLayout()
javax.swing.plaf.basic.BasicSpinnerUI.createLayout()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.createLayout()
javax.swing.plaf.synth.SynthSpinnerUI.createLayout()
javax.swing.plaf.synth.SynthToolBarUI.createLayout()


Occurences of createLayoutManager

createLayoutManager occurences:
javax.swing.JViewport.createLayoutManager()
javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager()
javax.swing.plaf.basic.BasicInternalFrameUI.createLayoutManager()
javax.swing.plaf.basic.BasicOptionPaneUI.createLayoutManager()
javax.swing.plaf.basic.BasicTabbedPaneUI.createLayoutManager()
javax.swing.plaf.metal.MetalComboBoxUI.createLayoutManager()
javax.swing.plaf.metal.MetalTabbedPaneUI.createLayoutManager()
javax.swing.plaf.synth.SynthTabbedPaneUI.createLayoutManager()


Occurences of createLeafElement

createLeafElement occurences:
javax.swing.text.AbstractDocument.createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int)
javax.swing.text.html.HTMLDocument.createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int)


Occurences of createLineBorder

createLineBorder occurences:
javax.swing.BorderFactory.createLineBorder(java.awt.Color)
javax.swing.BorderFactory.createLineBorder(java.awt.Color, int)
javax.swing.BorderFactory.createLineBorder(java.awt.Color, int, boolean)


Occurences of createLink

createLink occurences:
java.nio.file.Files.createLink(java.nio.file.Path, java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.createLink(java.nio.file.Path, java.nio.file.Path)


Occurences of createList

createList occurences:
java.awt.Toolkit.createList(java.awt.List)
javax.swing.plaf.basic.BasicComboPopup.createList()
javax.swing.plaf.metal.MetalFileChooserUI.createList(javax.swing.JFileChooser)


Occurences of createListDataListener

createListDataListener occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener()
javax.swing.plaf.basic.BasicComboPopup.createListDataListener()
javax.swing.plaf.basic.BasicListUI.createListDataListener()


Occurences of createListSelectionListener

createListSelectionListener occurences:
javax.swing.plaf.basic.BasicComboPopup.createListSelectionListener()
javax.swing.plaf.basic.BasicFileChooserUI.createListSelectionListener(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicListUI.createListSelectionListener()
javax.swing.plaf.metal.MetalFileChooserUI.createListSelectionListener(javax.swing.JFileChooser)


Occurences of createMatteBorder

createMatteBorder occurences:
javax.swing.BorderFactory.createMatteBorder(int, int, int, int, java.awt.Color)
javax.swing.BorderFactory.createMatteBorder(int, int, int, int, javax.swing.Icon)


Occurences of createMBean

createMBean occurences:
javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName)
javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName)
javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName)
javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName)
javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object:A, java.lang.String:A)
javax.management.remote.rmi.RMIConnection.createMBean(java.lang.String, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.createMBean(java.lang.String, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.createMBean(java.lang.String, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.createMBean(java.lang.String, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.createMBean(java.lang.String, javax.management.ObjectName, javax.security.auth.Subject)


Occurences of createMBeanServer

createMBeanServer occurences:
javax.management.MBeanServerFactory.createMBeanServer()
javax.management.MBeanServerFactory.createMBeanServer(java.lang.String)


Occurences of createMenuDragMouseListener

createMenuDragMouseListener occurences:
javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.createMenuDragMouseListener(javax.swing.JComponent)


Occurences of createMenuKeyListener

createMenuKeyListener occurences:
javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.createMenuKeyListener(javax.swing.JComponent)


Occurences of createMessage

createMessage occurences:
javax.xml.soap.MessageFactory.createMessage()
javax.xml.soap.MessageFactory.createMessage(javax.xml.soap.MimeHeaders, java.io.InputStream)


Occurences of createMessageArea

createMessageArea occurences:
javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea()
javax.swing.plaf.synth.SynthOptionPaneUI.createMessageArea()


Occurences of createMouseInputListener

createMouseInputListener occurences:
javax.swing.plaf.basic.BasicDesktopIconUI.createMouseInputListener()
javax.swing.plaf.basic.BasicListUI.createMouseInputListener()
javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.createMouseInputListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.createMouseInputListener()
javax.swing.plaf.basic.BasicTableUI.createMouseInputListener()


Occurences of createMouseListener

createMouseListener occurences:
javax.swing.plaf.basic.BasicComboPopup.createMouseListener()
javax.swing.plaf.basic.BasicTabbedPaneUI.createMouseListener()
javax.swing.plaf.basic.BasicTreeUI.createMouseListener()
javax.swing.plaf.synth.SynthTabbedPaneUI.createMouseListener()


Occurences of createName

createName occurences:
javax.xml.soap.SOAPEnvelope.createName(java.lang.String)
javax.xml.soap.SOAPEnvelope.createName(java.lang.String, java.lang.String, java.lang.String)
javax.xml.soap.SOAPFactory.createName(java.lang.String)
javax.xml.soap.SOAPFactory.createName(java.lang.String, java.lang.String, java.lang.String)
org.ietf.jgss.GSSManager.createName(byte:A, org.ietf.jgss.Oid)
org.ietf.jgss.GSSManager.createName(byte:A, org.ietf.jgss.Oid, org.ietf.jgss.Oid)
org.ietf.jgss.GSSManager.createName(java.lang.String, org.ietf.jgss.Oid)
org.ietf.jgss.GSSManager.createName(java.lang.String, org.ietf.jgss.Oid, org.ietf.jgss.Oid)


Occurences of createNamespace

createNamespace occurences:
javax.xml.stream.XMLEventFactory.createNamespace(java.lang.String)
javax.xml.stream.XMLEventFactory.createNamespace(java.lang.String, java.lang.String)


Occurences of createNextButton

createNextButton occurences:
javax.swing.plaf.basic.BasicSpinnerUI.createNextButton()
javax.swing.plaf.synth.SynthSpinnerUI.createNextButton()


Occurences of createNonRolloverBorder

createNonRolloverBorder occurences:
javax.swing.plaf.basic.BasicToolBarUI.createNonRolloverBorder()
javax.swing.plaf.metal.MetalToolBarUI.createNonRolloverBorder()


Occurences of createNorthPane

createNorthPane occurences:
javax.swing.plaf.basic.BasicInternalFrameUI.createNorthPane(javax.swing.JInternalFrame)
javax.swing.plaf.metal.MetalInternalFrameUI.createNorthPane(javax.swing.JInternalFrame)
javax.swing.plaf.synth.SynthInternalFrameUI.createNorthPane(javax.swing.JInternalFrame)


Occurences of createOutputStreamInstance

createOutputStreamInstance occurences:
javax.imageio.spi.ImageOutputStreamSpi.createOutputStreamInstance(java.lang.Object)
javax.imageio.spi.ImageOutputStreamSpi.createOutputStreamInstance(java.lang.Object, boolean, java.io.File)


Occurences of createPackedRaster

createPackedRaster occurences:
java.awt.image.Raster.createPackedRaster(int, int, int, int, int, java.awt.Point)
java.awt.image.Raster.createPackedRaster(int, int, int, int:A, java.awt.Point)
java.awt.image.Raster.createPackedRaster(java.awt.image.DataBuffer, int, int, int, int:A, java.awt.Point)
java.awt.image.Raster.createPackedRaster(java.awt.image.DataBuffer, int, int, int, java.awt.Point)


Occurences of createParallelGroup

createParallelGroup occurences:
javax.swing.GroupLayout.createParallelGroup()
javax.swing.GroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment)
javax.swing.GroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment, boolean)


Occurences of createPopup

createPopup occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createPopup()
javax.swing.plaf.metal.MetalComboBoxUI.createPopup()
javax.swing.plaf.synth.SynthComboBoxUI.createPopup()


Occurences of createPosition

createPosition occurences:
javax.swing.text.AbstractDocument.createPosition(int)
javax.swing.text.AbstractDocument.Content.createPosition(int)
javax.swing.text.Document.createPosition(int)
javax.swing.text.GapContent.createPosition(int)
javax.swing.text.StringContent.createPosition(int)


Occurences of createPreviousButton

createPreviousButton occurences:
javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton()
javax.swing.plaf.synth.SynthSpinnerUI.createPreviousButton()


Occurences of createProcessingInstruction

createProcessingInstruction occurences:
javax.xml.stream.XMLEventFactory.createProcessingInstruction(java.lang.String, java.lang.String)
org.w3c.dom.Document.createProcessingInstruction(java.lang.String, java.lang.String)


Occurences of createPropertyChangeListener

createPropertyChangeListener occurences:
javax.swing.plaf.basic.BasicColorChooserUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicComboPopup.createPropertyChangeListener()
javax.swing.plaf.basic.BasicDesktopPaneUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicFileChooserUI.createPropertyChangeListener(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.createPropertyChangeListener()
javax.swing.plaf.basic.BasicInternalFrameUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicListUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicMenuItemUI.createPropertyChangeListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.createPropertyChangeListener(javax.swing.JComponent)
javax.swing.plaf.basic.BasicOptionPaneUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicScrollBarUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicScrollPaneUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicSliderUI.createPropertyChangeListener(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicSplitPaneUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicTabbedPaneUI.createPropertyChangeListener()
javax.swing.plaf.basic.BasicTreeUI.createPropertyChangeListener()
javax.swing.plaf.metal.MetalComboBoxUI.createPropertyChangeListener()
javax.swing.plaf.metal.MetalFileChooserUI.createPropertyChangeListener(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalInternalFrameTitlePane.createPropertyChangeListener()
javax.swing.plaf.metal.MetalScrollBarUI.createPropertyChangeListener()
javax.swing.plaf.metal.MetalSliderUI.createPropertyChangeListener(javax.swing.JSlider)


Occurences of createReaderInstance

createReaderInstance occurences:
javax.imageio.spi.ImageReaderSpi.createReaderInstance()
javax.imageio.spi.ImageReaderSpi.createReaderInstance(java.lang.Object)


Occurences of createRegistry

createRegistry occurences:
java.rmi.registry.LocateRegistry.createRegistry(int)
java.rmi.registry.LocateRegistry.createRegistry(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)


Occurences of createRelation

createRelation occurences:
javax.management.relation.RelationService.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList)
javax.management.relation.RelationServiceMBean.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList)


Occurences of createRelationType

createRelationType occurences:
javax.management.relation.RelationService.createRelationType(java.lang.String, javax.management.relation.RoleInfo:A)
javax.management.relation.RelationServiceMBean.createRelationType(java.lang.String, javax.management.relation.RoleInfo:A)


Occurences of createRenderer

createRenderer occurences:
javax.swing.plaf.basic.BasicComboBoxUI.createRenderer()
javax.swing.plaf.synth.SynthComboBoxUI.createRenderer()


Occurences of createRendering

createRendering occurences:
java.awt.image.renderable.RenderableImage.createRendering(java.awt.image.renderable.RenderContext)
java.awt.image.renderable.RenderableImageOp.createRendering(java.awt.image.renderable.RenderContext)


Occurences of createRolloverBorder

createRolloverBorder occurences:
javax.swing.plaf.basic.BasicToolBarUI.createRolloverBorder()
javax.swing.plaf.metal.MetalToolBarUI.createRolloverBorder()


Occurences of createRootPane

createRootPane occurences:
javax.swing.JApplet.createRootPane()
javax.swing.JDialog.createRootPane()
javax.swing.JFrame.createRootPane()
javax.swing.JInternalFrame.createRootPane()
javax.swing.JWindow.createRootPane()


Occurences of createRow

createRow occurences:
javax.swing.text.FlowView.createRow()
javax.swing.text.ParagraphView.createRow()


Occurences of createSaslClient

createSaslClient occurences:
javax.security.sasl.Sasl.createSaslClient(java.lang.String:A, java.lang.String, java.lang.String, java.lang.String, java.util.Map, javax.security.auth.callback.CallbackHandler)
javax.security.sasl.SaslClientFactory.createSaslClient(java.lang.String:A, java.lang.String, java.lang.String, java.lang.String, java.util.Map, javax.security.auth.callback.CallbackHandler)


Occurences of createSaslServer

createSaslServer occurences:
javax.security.sasl.Sasl.createSaslServer(java.lang.String, java.lang.String, java.lang.String, java.util.Map, javax.security.auth.callback.CallbackHandler)
javax.security.sasl.SaslServerFactory.createSaslServer(java.lang.String, java.lang.String, java.lang.String, java.util.Map, javax.security.auth.callback.CallbackHandler)


Occurences of createScaledRendering

createScaledRendering occurences:
java.awt.image.renderable.RenderableImage.createScaledRendering(int, int, java.awt.RenderingHints)
java.awt.image.renderable.RenderableImageOp.createScaledRendering(int, int, java.awt.RenderingHints)


Occurences of createScrollButton

createScrollButton occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(int)
javax.swing.plaf.synth.SynthTabbedPaneUI.createScrollButton(int)


Occurences of createScrollListener

createScrollListener occurences:
javax.swing.plaf.basic.BasicScrollBarUI.createScrollListener()
javax.swing.plaf.basic.BasicSliderUI.createScrollListener(javax.swing.JSlider)


Occurences of createSelectionModel

createSelectionModel occurences:
javax.swing.JList.createSelectionModel()
javax.swing.table.DefaultTableColumnModel.createSelectionModel()


Occurences of createSeparator

createSeparator occurences:
javax.swing.plaf.basic.BasicOptionPaneUI.createSeparator()
javax.swing.plaf.synth.SynthOptionPaneUI.createSeparator()


Occurences of createServerSocket

createServerSocket occurences:
java.rmi.server.RMIServerSocketFactory.createServerSocket(int)
java.rmi.server.RMISocketFactory.createServerSocket(int)
javax.net.ServerSocketFactory.createServerSocket()
javax.net.ServerSocketFactory.createServerSocket(int)
javax.net.ServerSocketFactory.createServerSocket(int, int)
javax.net.ServerSocketFactory.createServerSocket(int, int, java.net.InetAddress)
javax.rmi.ssl.SslRMIServerSocketFactory.createServerSocket(int)


Occurences of createServiceDelegate

createServiceDelegate occurences:
javax.xml.ws.spi.Provider.createServiceDelegate(java.net.URL, javax.xml.namespace.QName, java.lang.Class)
javax.xml.ws.spi.Provider.createServiceDelegate(java.net.URL, javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.WebServiceFeature...)


Occurences of createSmallAttributeSet

createSmallAttributeSet occurences:
javax.swing.text.html.StyleSheet.createSmallAttributeSet(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.createSmallAttributeSet(javax.swing.text.AttributeSet)


Occurences of createSocket

createSocket occurences:
java.rmi.server.RMIClientSocketFactory.createSocket(java.lang.String, int)
java.rmi.server.RMISocketFactory.createSocket(java.lang.String, int)
javax.net.SocketFactory.createSocket()
javax.net.SocketFactory.createSocket(java.lang.String, int)
javax.net.SocketFactory.createSocket(java.lang.String, int, java.net.InetAddress, int)
javax.net.SocketFactory.createSocket(java.net.InetAddress, int)
javax.net.SocketFactory.createSocket(java.net.InetAddress, int, java.net.InetAddress, int)
javax.net.ssl.SSLSocketFactory.createSocket(java.net.Socket, java.io.InputStream, boolean)
javax.net.ssl.SSLSocketFactory.createSocket(java.net.Socket, java.lang.String, int, boolean)
javax.rmi.ssl.SslRMIClientSocketFactory.createSocket(java.lang.String, int)


Occurences of createSoftBevelBorder

createSoftBevelBorder occurences:
javax.swing.BorderFactory.createSoftBevelBorder(int)
javax.swing.BorderFactory.createSoftBevelBorder(int, java.awt.Color, java.awt.Color)
javax.swing.BorderFactory.createSoftBevelBorder(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of createSSLEngine

createSSLEngine occurences:
javax.net.ssl.SSLContext.createSSLEngine()
javax.net.ssl.SSLContext.createSSLEngine(java.lang.String, int)


Occurences of createStandardLabels

createStandardLabels occurences:
javax.swing.JSlider.createStandardLabels(int)
javax.swing.JSlider.createStandardLabels(int, int)


Occurences of createStartDocument

createStartDocument occurences:
javax.xml.stream.XMLEventFactory.createStartDocument()
javax.xml.stream.XMLEventFactory.createStartDocument(java.lang.String)
javax.xml.stream.XMLEventFactory.createStartDocument(java.lang.String, java.lang.String)
javax.xml.stream.XMLEventFactory.createStartDocument(java.lang.String, java.lang.String, boolean)


Occurences of createStartElement

createStartElement occurences:
javax.xml.stream.XMLEventFactory.createStartElement(java.lang.String, java.lang.String, java.lang.String)
javax.xml.stream.XMLEventFactory.createStartElement(java.lang.String, java.lang.String, java.lang.String, java.util.Iterator, java.util.Iterator)
javax.xml.stream.XMLEventFactory.createStartElement(java.lang.String, java.lang.String, java.lang.String, java.util.Iterator, java.util.Iterator, javax.xml.namespace.NamespaceContext)
javax.xml.stream.XMLEventFactory.createStartElement(javax.xml.namespace.QName, java.util.Iterator, java.util.Iterator)


Occurences of createStatement

createStatement occurences:
java.sql.Connection.createStatement()
java.sql.Connection.createStatement(int, int)
java.sql.Connection.createStatement(int, int, int)


Occurences of createStrokeBorder

createStrokeBorder occurences:
javax.swing.BorderFactory.createStrokeBorder(java.awt.BasicStroke)
javax.swing.BorderFactory.createStrokeBorder(java.awt.BasicStroke, java.awt.Paint)


Occurences of createStrokedShape

createStrokedShape occurences:
java.awt.BasicStroke.createStrokedShape(java.awt.Shape)
java.awt.Stroke.createStrokedShape(java.awt.Shape)


Occurences of createSubcontext

createSubcontext occurences:
javax.naming.Context.createSubcontext(java.lang.String)
javax.naming.Context.createSubcontext(javax.naming.Name)
javax.naming.directory.DirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)
javax.naming.InitialContext.createSubcontext(java.lang.String)
javax.naming.InitialContext.createSubcontext(javax.naming.Name)


Occurences of createSubsetSampleModel

createSubsetSampleModel occurences:
java.awt.image.BandedSampleModel.createSubsetSampleModel(int:A)
java.awt.image.ComponentSampleModel.createSubsetSampleModel(int:A)
java.awt.image.MultiPixelPackedSampleModel.createSubsetSampleModel(int:A)
java.awt.image.PixelInterleavedSampleModel.createSubsetSampleModel(int:A)
java.awt.image.SampleModel.createSubsetSampleModel(int:A)
java.awt.image.SinglePixelPackedSampleModel.createSubsetSampleModel(int:A)


Occurences of createSymbolicLink

createSymbolicLink occurences:
java.nio.file.Files.createSymbolicLink(java.nio.file.Path, java.nio.file.Path, java.nio.file.attribute.FileAttribute...)
java.nio.file.spi.FileSystemProvider.createSymbolicLink(java.nio.file.Path, java.nio.file.Path, java.nio.file.attribute.FileAttribute...)


Occurences of createTempDirectory

createTempDirectory occurences:
java.nio.file.Files.createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute...)
java.nio.file.Files.createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute...)


Occurences of createTempFile

createTempFile occurences:
java.io.File.createTempFile(java.lang.String, java.lang.String)
java.io.File.createTempFile(java.lang.String, java.lang.String, java.io.File)
java.nio.file.Files.createTempFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute...)
java.nio.file.Files.createTempFile(java.nio.file.Path, java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute...)


Occurences of createTitledBorder

createTitledBorder occurences:
javax.swing.BorderFactory.createTitledBorder(java.lang.String)
javax.swing.BorderFactory.createTitledBorder(javax.swing.border.Border)
javax.swing.BorderFactory.createTitledBorder(javax.swing.border.Border, java.lang.String)
javax.swing.BorderFactory.createTitledBorder(javax.swing.border.Border, java.lang.String, int, int)
javax.swing.BorderFactory.createTitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)
javax.swing.BorderFactory.createTitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)


Occurences of createTrackListener

createTrackListener occurences:
javax.swing.plaf.basic.BasicScrollBarUI.createTrackListener()
javax.swing.plaf.basic.BasicSliderUI.createTrackListener(javax.swing.JSlider)
javax.swing.plaf.synth.SynthSliderUI.createTrackListener(javax.swing.JSlider)


Occurences of createTransformedShape

createTransformedShape occurences:
java.awt.geom.AffineTransform.createTransformedShape(java.awt.Shape)
java.awt.geom.Path2D.createTransformedShape(java.awt.geom.AffineTransform)


Occurences of createTreeModelListener

createTreeModelListener occurences:
javax.swing.JTree.createTreeModelListener()
javax.swing.plaf.basic.BasicTreeUI.createTreeModelListener()


Occurences of createUI

createUI occurences:
javax.swing.plaf.basic.BasicButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicCheckBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicColorChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicEditorPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicFileChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicFormattedTextFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicOptionPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPanelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPasswordFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRadioButtonMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRadioButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRootPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSpinnerUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextAreaUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToggleButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.createUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicViewportUI.createUI(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalCheckBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalComboBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalDesktopIconUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalInternalFrameUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalLabelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalMenuBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalPopupMenuSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalProgressBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalRadioButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalRootPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalSliderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalSplitPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalTabbedPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalTextFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToggleButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolTipUI.createUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalTreeUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.createUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthCheckBoxMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthCheckBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthColorChooserUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopIconUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthEditorPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthFormattedTextFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthInternalFrameUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthLabelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthListUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthLookAndFeel.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthOptionPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPasswordFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPopupMenuUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthProgressBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthRadioButtonMenuItemUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthRadioButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthRootPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSpinnerUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSplitPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTabbedPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableHeaderUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextAreaUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextFieldUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextPaneUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToggleButtonUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolBarUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolTipUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.createUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.createUI(javax.swing.JComponent)


Occurences of createUnion

createUnion occurences:
java.awt.geom.Rectangle2D.createUnion(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Double.createUnion(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Float.createUnion(java.awt.geom.Rectangle2D)
java.awt.Rectangle.createUnion(java.awt.geom.Rectangle2D)


Occurences of createUnmarshaller

createUnmarshaller occurences:
javax.xml.bind.annotation.DomHandler.createUnmarshaller(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.annotation.W3CDomHandler.createUnmarshaller(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.JAXBContext.createUnmarshaller()


Occurences of createValue

createValue occurences:
javax.swing.UIDefaults.ActiveValue.createValue(javax.swing.UIDefaults)
javax.swing.UIDefaults.LazyInputMap.createValue(javax.swing.UIDefaults)
javax.swing.UIDefaults.LazyValue.createValue(javax.swing.UIDefaults)
javax.swing.UIDefaults.ProxyLazyValue.createValue(javax.swing.UIDefaults)


Occurences of createValueHandler

createValueHandler occurences:
javax.rmi.CORBA.Util.createValueHandler()
javax.rmi.CORBA.UtilDelegate.createValueHandler()


Occurences of createVirtualMachine

createVirtualMachine occurences:
com.sun.jdi.VirtualMachineManager.createVirtualMachine(com.sun.jdi.connect.spi.Connection)
com.sun.jdi.VirtualMachineManager.createVirtualMachine(com.sun.jdi.connect.spi.Connection, java.lang.Process)


Occurences of createVolatileImage

createVolatileImage occurences:
java.awt.Component.createVolatileImage(int, int)
java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities)


Occurences of createW3CEndpointReference

createW3CEndpointReference occurences:
javax.xml.ws.spi.Provider.createW3CEndpointReference(java.lang.String, javax.xml.namespace.QName, javax.xml.namespace.QName, java.util.List, java.lang.String, java.util.List)
javax.xml.ws.spi.Provider.createW3CEndpointReference(java.lang.String, javax.xml.namespace.QName, javax.xml.namespace.QName, javax.xml.namespace.QName, java.util.List, java.lang.String, java.util.List, java.util.List, java.util.Map)


Occurences of createWritableRaster

createWritableRaster occurences:
java.awt.image.Raster.createWritableRaster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Point)
java.awt.image.Raster.createWritableRaster(java.awt.image.SampleModel, java.awt.Point)


Occurences of createWriterInstance

createWriterInstance occurences:
javax.imageio.spi.ImageWriterSpi.createWriterInstance()
javax.imageio.spi.ImageWriterSpi.createWriterInstance(java.lang.Object)


Occurences of createXMLEventReader

createXMLEventReader occurences:
javax.xml.stream.XMLInputFactory.createXMLEventReader(java.io.InputStream)
javax.xml.stream.XMLInputFactory.createXMLEventReader(java.io.InputStream, java.lang.String)
javax.xml.stream.XMLInputFactory.createXMLEventReader(java.io.Reader)
javax.xml.stream.XMLInputFactory.createXMLEventReader(java.lang.String, java.io.InputStream)
javax.xml.stream.XMLInputFactory.createXMLEventReader(java.lang.String, java.io.Reader)
javax.xml.stream.XMLInputFactory.createXMLEventReader(javax.xml.stream.XMLStreamReader)
javax.xml.stream.XMLInputFactory.createXMLEventReader(javax.xml.transform.Source)


Occurences of createXMLEventWriter

createXMLEventWriter occurences:
javax.xml.stream.XMLOutputFactory.createXMLEventWriter(java.io.OutputStream)
javax.xml.stream.XMLOutputFactory.createXMLEventWriter(java.io.OutputStream, java.lang.String)
javax.xml.stream.XMLOutputFactory.createXMLEventWriter(java.io.Writer)
javax.xml.stream.XMLOutputFactory.createXMLEventWriter(javax.xml.transform.Result)


Occurences of createXMLReader

createXMLReader occurences:
org.xml.sax.helpers.XMLReaderFactory.createXMLReader()
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(java.lang.String)


Occurences of createXMLStreamReader

createXMLStreamReader occurences:
javax.xml.stream.XMLInputFactory.createXMLStreamReader(java.io.InputStream)
javax.xml.stream.XMLInputFactory.createXMLStreamReader(java.io.InputStream, java.lang.String)
javax.xml.stream.XMLInputFactory.createXMLStreamReader(java.io.Reader)
javax.xml.stream.XMLInputFactory.createXMLStreamReader(java.lang.String, java.io.InputStream)
javax.xml.stream.XMLInputFactory.createXMLStreamReader(java.lang.String, java.io.Reader)
javax.xml.stream.XMLInputFactory.createXMLStreamReader(javax.xml.transform.Source)


Occurences of createXMLStreamWriter

createXMLStreamWriter occurences:
javax.xml.stream.XMLOutputFactory.createXMLStreamWriter(java.io.OutputStream)
javax.xml.stream.XMLOutputFactory.createXMLStreamWriter(java.io.OutputStream, java.lang.String)
javax.xml.stream.XMLOutputFactory.createXMLStreamWriter(java.io.Writer)
javax.xml.stream.XMLOutputFactory.createXMLStreamWriter(javax.xml.transform.Result)


Occurences of createZipEntry

createZipEntry occurences:
java.util.jar.JarInputStream.createZipEntry(java.lang.String)
java.util.zip.ZipInputStream.createZipEntry(java.lang.String)


Occurences of create_dyn_any

create_dyn_any occurences:
org.omg.CORBA.ORB.create_dyn_any(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyFactoryOperations.create_dyn_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynAnyFactoryStub.create_dyn_any(org.omg.CORBA.Any)


Occurences of create_dyn_any_from_type_code

create_dyn_any_from_type_code occurences:
org.omg.DynamicAny.DynAnyFactoryOperations.create_dyn_any_from_type_code(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynAnyFactoryStub.create_dyn_any_from_type_code(org.omg.CORBA.TypeCode)


Occurences of create_input_stream

create_input_stream occurences:
org.omg.CORBA.Any.create_input_stream()
org.omg.CORBA.portable.OutputStream.create_input_stream()


Occurences of create_output_stream

create_output_stream occurences:
org.omg.CORBA.Any.create_output_stream()
org.omg.CORBA.ORB.create_output_stream()


Occurences of create_policy

create_policy occurences:
org.omg.CORBA.ORB.create_policy(int, org.omg.CORBA.Any)
org.omg.PortableInterceptor.PolicyFactoryOperations.create_policy(int, org.omg.CORBA.Any)


Occurences of create_request

create_request occurences:
org.omg.CORBA.portable.Delegate.create_request(org.omg.CORBA.Object, org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue)
org.omg.CORBA.portable.Delegate.create_request(org.omg.CORBA.Object, org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue, org.omg.CORBA.ExceptionList, org.omg.CORBA.ContextList)


Occurences of CredentialException (constructors)

CredentialException (constructors) occurences:
javax.security.auth.login.CredentialException()
javax.security.auth.login.CredentialException(java.lang.String)


Occurences of CredentialExpiredException (constructors)

CredentialExpiredException (constructors) occurences:
javax.security.auth.login.CredentialExpiredException()
javax.security.auth.login.CredentialExpiredException(java.lang.String)


Occurences of CredentialNotFoundException (constructors)

CredentialNotFoundException (constructors) occurences:
javax.security.auth.login.CredentialNotFoundException()
javax.security.auth.login.CredentialNotFoundException(java.lang.String)


Occurences of CREDENTIALS

CREDENTIALS occurences:
javax.management.remote.CREDENTIALS
javax.security.sasl.CREDENTIALS


Occurences of CRLException (constructors)

CRLException (constructors) occurences:
java.security.cert.CRLException()
java.security.cert.CRLException(java.lang.String)
java.security.cert.CRLException(java.lang.String, java.lang.Throwable)
java.security.cert.CRLException(java.lang.Throwable)


Occurences of CROSSHAIR_CURSOR

CROSSHAIR_CURSOR occurences:
java.awt.CROSSHAIR_CURSOR
java.awt.CROSSHAIR_CURSOR


Occurences of crypto

crypto occurences:
compact3.javax.xml.crypto
javax.crypto
javax.xml.crypto


Occurences of ctrlx

ctrlx occurences:
java.awt.geom.ctrlx
java.awt.geom.ctrlx


Occurences of ctrlx1

ctrlx1 occurences:
java.awt.geom.ctrlx1
java.awt.geom.ctrlx1


Occurences of ctrlx2

ctrlx2 occurences:
java.awt.geom.ctrlx2
java.awt.geom.ctrlx2


Occurences of ctrly

ctrly occurences:
java.awt.geom.ctrly
java.awt.geom.ctrly


Occurences of ctrly1

ctrly1 occurences:
java.awt.geom.ctrly1
java.awt.geom.ctrly1


Occurences of ctrly2

ctrly2 occurences:
java.awt.geom.ctrly2
java.awt.geom.ctrly2


Occurences of CTRL_MASK

CTRL_MASK occurences:
java.awt.CTRL_MASK
java.awt.event.CTRL_MASK
java.awt.event.CTRL_MASK


Occurences of ctx

ctx occurences:
org.omg.CORBA.Request.ctx()
org.omg.CORBA.Request.ctx(org.omg.CORBA.Context)
org.omg.CORBA.ServerRequest.ctx()


Occurences of CUNEIFORM

CUNEIFORM occurences:
java.lang.CUNEIFORM
java.lang.CUNEIFORM


Occurences of Current

Current occurences:
org.omg.CORBA.Current
org.omg.PortableInterceptor.Current
org.omg.PortableServer.Current


Occurences of current

current occurences:
java.text.BreakIterator.current()
java.text.CharacterIterator.current()
java.text.StringCharacterIterator.current()
java.util.concurrent.ThreadLocalRandom.current()
javax.swing.text.ElementIterator.current()
javax.swing.text.Segment.current()


Occurences of CurrentHelper

CurrentHelper occurences:
org.omg.CORBA.CurrentHelper
org.omg.PortableInterceptor.CurrentHelper
org.omg.PortableServer.CurrentHelper


Occurences of CurrentHelper (constructors)

CurrentHelper (constructors) occurences:
org.omg.CORBA.CurrentHelper()
org.omg.PortableInterceptor.CurrentHelper()
org.omg.PortableServer.CurrentHelper()


Occurences of CurrentHolder (constructors)

CurrentHolder (constructors) occurences:
org.omg.CORBA.CurrentHolder()
org.omg.CORBA.CurrentHolder(org.omg.CORBA.Current)


Occurences of currentManager

currentManager occurences:
javax.swing.RepaintManager.currentManager(java.awt.Component)
javax.swing.RepaintManager.currentManager(javax.swing.JComponent)


Occurences of currentMouseX

currentMouseX occurences:
javax.swing.plaf.basic.currentMouseX
javax.swing.plaf.basic.currentMouseX


Occurences of currentMouseY

currentMouseY occurences:
javax.swing.plaf.basic.currentMouseY
javax.swing.plaf.basic.currentMouseY


Occurences of CurrentOperations

CurrentOperations occurences:
org.omg.CORBA.CurrentOperations
org.omg.PortableInterceptor.CurrentOperations
org.omg.PortableServer.CurrentOperations


Occurences of currentSegment

currentSegment occurences:
java.awt.geom.FlatteningPathIterator.currentSegment(double:A)
java.awt.geom.FlatteningPathIterator.currentSegment(float:A)
java.awt.geom.PathIterator.currentSegment(double:A)
java.awt.geom.PathIterator.currentSegment(float:A)


Occurences of current_component

current_component occurences:
org.omg.CORBA.DynAny.current_component()
org.omg.DynamicAny.DynAnyOperations.current_component()
org.omg.DynamicAny._DynAnyStub.current_component()
org.omg.DynamicAny._DynArrayStub.current_component()
org.omg.DynamicAny._DynEnumStub.current_component()
org.omg.DynamicAny._DynFixedStub.current_component()
org.omg.DynamicAny._DynSequenceStub.current_component()
org.omg.DynamicAny._DynStructStub.current_component()
org.omg.DynamicAny._DynUnionStub.current_component()
org.omg.DynamicAny._DynValueStub.current_component()


Occurences of current_factory

current_factory occurences:
org.omg.PortableInterceptor.IORInfoOperations.current_factory()
org.omg.PortableInterceptor.IORInfoOperations.current_factory(org.omg.PortableInterceptor.ObjectReferenceFactory)


Occurences of current_member_kind

current_member_kind occurences:
org.omg.CORBA.DynStruct.current_member_kind()
org.omg.CORBA.DynValue.current_member_kind()
org.omg.DynamicAny.DynStructOperations.current_member_kind()
org.omg.DynamicAny.DynValueOperations.current_member_kind()
org.omg.DynamicAny._DynStructStub.current_member_kind()
org.omg.DynamicAny._DynValueStub.current_member_kind()


Occurences of current_member_name

current_member_name occurences:
org.omg.CORBA.DynStruct.current_member_name()
org.omg.CORBA.DynValue.current_member_name()
org.omg.DynamicAny.DynStructOperations.current_member_name()
org.omg.DynamicAny.DynValueOperations.current_member_name()
org.omg.DynamicAny._DynStructStub.current_member_name()
org.omg.DynamicAny._DynValueStub.current_member_name()


Occurences of Cursor (constructors)

Cursor (constructors) occurences:
java.awt.Cursor(int)
java.awt.Cursor(java.lang.String)


Occurences of curveTo

curveTo occurences:
java.awt.geom.Path2D.curveTo(double, double, double, double, double, double)
java.awt.geom.Path2D.Double.curveTo(double, double, double, double, double, double)
java.awt.geom.Path2D.Float.curveTo(double, double, double, double, double, double)
java.awt.geom.Path2D.Float.curveTo(float, float, float, float, float, float)


Occurences of cut

cut occurences:
javax.accessibility.AccessibleEditableText.cut(int, int)
javax.swing.JPasswordField.cut()
javax.swing.JSpinner.AccessibleJSpinner.cut(int, int)
javax.swing.text.JTextComponent.cut()
javax.swing.text.JTextComponent.AccessibleJTextComponent.cut(int, int)


Occurences of CyclicBarrier (constructors)

CyclicBarrier (constructors) occurences:
java.util.concurrent.CyclicBarrier(int)
java.util.concurrent.CyclicBarrier(int, java.lang.Runnable)


Occurences of CYRILLIC

CYRILLIC occurences:
java.lang.CYRILLIC
java.lang.CYRILLIC


Occurences of D

D occurences:
java.awt.D
javax.print.attribute.standard.D
javax.print.attribute.standard.D


Occurences of damageRange

damageRange occurences:
javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int)
javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias)
javax.swing.plaf.multi.MultiTextUI.damageRange(javax.swing.text.JTextComponent, int, int)
javax.swing.plaf.multi.MultiTextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias)
javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int)
javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias)


Occurences of darkShadow

darkShadow occurences:
javax.swing.plaf.basic.darkShadow
javax.swing.plaf.basic.darkShadow
javax.swing.plaf.basic.darkShadow


Occurences of data

data occurences:
javax.sound.midi.data
javax.swing.text.html.parser.data
javax.swing.text.html.parser.data


Occurences of DataBindingException (constructors)

DataBindingException (constructors) occurences:
javax.xml.bind.DataBindingException(java.lang.String, java.lang.Throwable)
javax.xml.bind.DataBindingException(java.lang.Throwable)


Occurences of DataBuffer (constructors)

DataBuffer (constructors) occurences:
java.awt.image.DataBuffer(int, int)
java.awt.image.DataBuffer(int, int, int)
java.awt.image.DataBuffer(int, int, int, int)
java.awt.image.DataBuffer(int, int, int, int:A)


Occurences of DataBufferByte (constructors)

DataBufferByte (constructors) occurences:
java.awt.image.DataBufferByte(byte:A, int)
java.awt.image.DataBufferByte(byte:A, int, int)
java.awt.image.DataBufferByte(byte:A:A, int)
java.awt.image.DataBufferByte(byte:A:A, int, int:A)
java.awt.image.DataBufferByte(int)
java.awt.image.DataBufferByte(int, int)


Occurences of DataBufferDouble (constructors)

DataBufferDouble (constructors) occurences:
java.awt.image.DataBufferDouble(double:A, int)
java.awt.image.DataBufferDouble(double:A, int, int)
java.awt.image.DataBufferDouble(double:A:A, int)
java.awt.image.DataBufferDouble(double:A:A, int, int:A)
java.awt.image.DataBufferDouble(int)
java.awt.image.DataBufferDouble(int, int)


Occurences of DataBufferFloat (constructors)

DataBufferFloat (constructors) occurences:
java.awt.image.DataBufferFloat(float:A, int)
java.awt.image.DataBufferFloat(float:A, int, int)
java.awt.image.DataBufferFloat(float:A:A, int)
java.awt.image.DataBufferFloat(float:A:A, int, int:A)
java.awt.image.DataBufferFloat(int)
java.awt.image.DataBufferFloat(int, int)


Occurences of DataBufferInt (constructors)

DataBufferInt (constructors) occurences:
java.awt.image.DataBufferInt(int)
java.awt.image.DataBufferInt(int, int)
java.awt.image.DataBufferInt(int:A, int)
java.awt.image.DataBufferInt(int:A, int, int)
java.awt.image.DataBufferInt(int:A:A, int)
java.awt.image.DataBufferInt(int:A:A, int, int:A)


Occurences of DataBufferShort (constructors)

DataBufferShort (constructors) occurences:
java.awt.image.DataBufferShort(int)
java.awt.image.DataBufferShort(int, int)
java.awt.image.DataBufferShort(short:A, int)
java.awt.image.DataBufferShort(short:A, int, int)
java.awt.image.DataBufferShort(short:A:A, int)
java.awt.image.DataBufferShort(short:A:A, int, int:A)


Occurences of DataBufferUShort (constructors)

DataBufferUShort (constructors) occurences:
java.awt.image.DataBufferUShort(int)
java.awt.image.DataBufferUShort(int, int)
java.awt.image.DataBufferUShort(short:A, int)
java.awt.image.DataBufferUShort(short:A, int, int)
java.awt.image.DataBufferUShort(short:A:A, int)
java.awt.image.DataBufferUShort(short:A:A, int, int:A)


Occurences of DataFlavor (constructors)

DataFlavor (constructors) occurences:
java.awt.datatransfer.DataFlavor()
java.awt.datatransfer.DataFlavor(java.lang.Class, java.lang.String)
java.awt.datatransfer.DataFlavor(java.lang.String)
java.awt.datatransfer.DataFlavor(java.lang.String, java.lang.String)
java.awt.datatransfer.DataFlavor(java.lang.String, java.lang.String, java.lang.ClassLoader)


Occurences of DataFormatException (constructors)

DataFormatException (constructors) occurences:
java.util.zip.DataFormatException()
java.util.zip.DataFormatException(java.lang.String)


Occurences of DatagramPacket (constructors)

DatagramPacket (constructors) occurences:
java.net.DatagramPacket(byte:A, int)
java.net.DatagramPacket(byte:A, int, int)
java.net.DatagramPacket(byte:A, int, int, java.net.InetAddress, int)
java.net.DatagramPacket(byte:A, int, int, java.net.SocketAddress)
java.net.DatagramPacket(byte:A, int, java.net.InetAddress, int)
java.net.DatagramPacket(byte:A, int, java.net.SocketAddress)


Occurences of DatagramSocket (constructors)

DatagramSocket (constructors) occurences:
java.net.DatagramSocket()
java.net.DatagramSocket(int)
java.net.DatagramSocket(int, java.net.InetAddress)
java.net.DatagramSocket(java.net.DatagramSocketImpl)
java.net.DatagramSocket(java.net.SocketAddress)


Occurences of DataHandler (constructors)

DataHandler (constructors) occurences:
javax.activation.DataHandler(java.lang.Object, java.lang.String)
javax.activation.DataHandler(java.net.URL)
javax.activation.DataHandler(javax.activation.DataSource)


Occurences of DataInputStream

DataInputStream occurences:
java.io.DataInputStream
org.omg.CORBA.DataInputStream


Occurences of DATALINK

DATALINK occurences:
java.sql.DATALINK
java.sql.DATALINK


Occurences of dataModel

dataModel occurences:
javax.swing.dataModel
javax.swing.dataModel


Occurences of DataOutputStream

DataOutputStream occurences:
java.io.DataOutputStream
org.omg.CORBA.DataOutputStream


Occurences of DataSource

DataSource occurences:
javax.activation.DataSource
javax.sql.DataSource


Occurences of DataTruncation (constructors)

DataTruncation (constructors) occurences:
java.sql.DataTruncation(int, boolean, boolean, int, int)
java.sql.DataTruncation(int, boolean, boolean, int, int, java.lang.Throwable)


Occurences of dataType

dataType occurences:
java.awt.image.dataType
java.awt.image.dataType


Occurences of datatype

datatype occurences:
compact2.javax.xml.datatype
compact3.javax.xml.datatype
javax.xml.datatype


Occurences of DatatypeConfigurationException (constructors)

DatatypeConfigurationException (constructors) occurences:
javax.xml.datatype.DatatypeConfigurationException()
javax.xml.datatype.DatatypeConfigurationException(java.lang.String)
javax.xml.datatype.DatatypeConfigurationException(java.lang.String, java.lang.Throwable)
javax.xml.datatype.DatatypeConfigurationException(java.lang.Throwable)


Occurences of DATA_CONVERSION (constructors)

DATA_CONVERSION (constructors) occurences:
org.omg.CORBA.DATA_CONVERSION()
org.omg.CORBA.DATA_CONVERSION(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.DATA_CONVERSION(java.lang.String)
org.omg.CORBA.DATA_CONVERSION(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of Date

Date occurences:
java.sql.Date
java.util.Date


Occurences of DATE

DATE occurences:
java.sql.DATE
java.sql.DATE
java.util.DATE
javax.management.openmbean.DATE
javax.xml.datatype.DATE


Occurences of date

date occurences:
java.time.chrono.Chronology.date(int, int, int)
java.time.chrono.Chronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.Chronology.date(java.time.temporal.TemporalAccessor)
java.time.chrono.HijrahChronology.date(int, int, int)
java.time.chrono.HijrahChronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.HijrahChronology.date(java.time.temporal.TemporalAccessor)
java.time.chrono.IsoChronology.date(int, int, int)
java.time.chrono.IsoChronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.IsoChronology.date(java.time.temporal.TemporalAccessor)
java.time.chrono.JapaneseChronology.date(int, int, int)
java.time.chrono.JapaneseChronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.JapaneseChronology.date(java.time.temporal.TemporalAccessor)
java.time.chrono.MinguoChronology.date(int, int, int)
java.time.chrono.MinguoChronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.MinguoChronology.date(java.time.temporal.TemporalAccessor)
java.time.chrono.ThaiBuddhistChronology.date(int, int, int)
java.time.chrono.ThaiBuddhistChronology.date(java.time.chrono.Era, int, int, int)
java.time.chrono.ThaiBuddhistChronology.date(java.time.temporal.TemporalAccessor)
javax.annotation.Generated.date()


Occurences of Date (constructors)

Date (constructors) occurences:
java.sql.Date(int, int, int)
java.sql.Date(long)
java.util.Date()
java.util.Date(int, int, int)
java.util.Date(int, int, int, int, int)
java.util.Date(int, int, int, int, int, int)
java.util.Date(java.lang.String)
java.util.Date(long)


Occurences of DateEditor

DateEditor occurences:
javax.swing.JSpinner.DateEditor.DateEditor(javax.swing.JSpinner)
javax.swing.JSpinner.DateEditor.DateEditor(javax.swing.JSpinner, java.lang.String)


Occurences of dateEpochDay

dateEpochDay occurences:
java.time.chrono.Chronology.dateEpochDay(long)
java.time.chrono.HijrahChronology.dateEpochDay(long)
java.time.chrono.IsoChronology.dateEpochDay(long)
java.time.chrono.JapaneseChronology.dateEpochDay(long)
java.time.chrono.MinguoChronology.dateEpochDay(long)
java.time.chrono.ThaiBuddhistChronology.dateEpochDay(long)


Occurences of DateFormatSymbols (constructors)

DateFormatSymbols (constructors) occurences:
java.text.DateFormatSymbols()
java.text.DateFormatSymbols(java.util.Locale)


Occurences of DateFormatter (constructors)

DateFormatter (constructors) occurences:
javax.swing.text.DateFormatter()
javax.swing.text.DateFormatter(java.text.DateFormat)


Occurences of dateNow

dateNow occurences:
java.time.chrono.Chronology.dateNow()
java.time.chrono.Chronology.dateNow(java.time.Clock)
java.time.chrono.Chronology.dateNow(java.time.ZoneId)
java.time.chrono.HijrahChronology.dateNow()
java.time.chrono.HijrahChronology.dateNow(java.time.Clock)
java.time.chrono.HijrahChronology.dateNow(java.time.ZoneId)
java.time.chrono.IsoChronology.dateNow()
java.time.chrono.IsoChronology.dateNow(java.time.Clock)
java.time.chrono.IsoChronology.dateNow(java.time.ZoneId)
java.time.chrono.JapaneseChronology.dateNow()
java.time.chrono.JapaneseChronology.dateNow(java.time.Clock)
java.time.chrono.JapaneseChronology.dateNow(java.time.ZoneId)
java.time.chrono.MinguoChronology.dateNow()
java.time.chrono.MinguoChronology.dateNow(java.time.Clock)
java.time.chrono.MinguoChronology.dateNow(java.time.ZoneId)
java.time.chrono.ThaiBuddhistChronology.dateNow()
java.time.chrono.ThaiBuddhistChronology.dateNow(java.time.Clock)
java.time.chrono.ThaiBuddhistChronology.dateNow(java.time.ZoneId)


Occurences of DateTimeException (constructors)

DateTimeException (constructors) occurences:
java.time.DateTimeException(java.lang.String)
java.time.DateTimeException(java.lang.String, java.lang.Throwable)


Occurences of DateTimeParseException (constructors)

DateTimeParseException (constructors) occurences:
java.time.format.DateTimeParseException(java.lang.String, java.lang.CharSequence, int)
java.time.format.DateTimeParseException(java.lang.String, java.lang.CharSequence, int, java.lang.Throwable)


Occurences of dateYearDay

dateYearDay occurences:
java.time.chrono.Chronology.dateYearDay(int, int)
java.time.chrono.Chronology.dateYearDay(java.time.chrono.Era, int, int)
java.time.chrono.HijrahChronology.dateYearDay(int, int)
java.time.chrono.HijrahChronology.dateYearDay(java.time.chrono.Era, int, int)
java.time.chrono.IsoChronology.dateYearDay(int, int)
java.time.chrono.IsoChronology.dateYearDay(java.time.chrono.Era, int, int)
java.time.chrono.JapaneseChronology.dateYearDay(int, int)
java.time.chrono.JapaneseChronology.dateYearDay(java.time.chrono.Era, int, int)
java.time.chrono.MinguoChronology.dateYearDay(int, int)
java.time.chrono.MinguoChronology.dateYearDay(java.time.chrono.Era, int, int)
java.time.chrono.ThaiBuddhistChronology.dateYearDay(int, int)
java.time.chrono.ThaiBuddhistChronology.dateYearDay(java.time.chrono.Era, int, int)


Occurences of DAYS

DAYS occurences:
java.time.temporal.DAYS
java.util.concurrent.DAYS
javax.xml.datatype.DAYS


Occurences of DAY_OF_MONTH

DAY_OF_MONTH occurences:
java.text.DAY_OF_MONTH
java.time.temporal.DAY_OF_MONTH
java.util.DAY_OF_MONTH


Occurences of DAY_OF_WEEK

DAY_OF_WEEK occurences:
java.text.DAY_OF_WEEK
java.time.temporal.DAY_OF_WEEK
java.util.DAY_OF_WEEK


Occurences of DAY_OF_WEEK_IN_MONTH

DAY_OF_WEEK_IN_MONTH occurences:
java.text.DAY_OF_WEEK_IN_MONTH
java.util.DAY_OF_WEEK_IN_MONTH


Occurences of DAY_OF_YEAR

DAY_OF_YEAR occurences:
java.text.DAY_OF_YEAR
java.time.temporal.DAY_OF_YEAR
java.util.DAY_OF_YEAR


Occurences of deactivate

deactivate occurences:
java.awt.im.spi.InputMethod.deactivate(boolean)
javax.rmi.CORBA.Tie.deactivate()
org.omg.PortableServer.POAManagerOperations.deactivate(boolean, boolean)


Occurences of deactivateFrame

deactivateFrame occurences:
javax.swing.DefaultDesktopManager.deactivateFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.deactivateFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.deactivateFrame(javax.swing.JInternalFrame)


Occurences of DebugGraphics (constructors)

DebugGraphics (constructors) occurences:
javax.swing.DebugGraphics()
javax.swing.DebugGraphics(java.awt.Graphics)
javax.swing.DebugGraphics(java.awt.Graphics, javax.swing.JComponent)


Occurences of DECEMBER

DECEMBER occurences:
java.time.DECEMBER
java.util.DECEMBER
javax.xml.datatype.DECEMBER


Occurences of DECIMAL

DECIMAL occurences:
java.sql.DECIMAL
java.sql.DECIMAL


Occurences of DecimalFormat (constructors)

DecimalFormat (constructors) occurences:
java.text.DecimalFormat()
java.text.DecimalFormat(java.lang.String)
java.text.DecimalFormat(java.lang.String, java.text.DecimalFormatSymbols)


Occurences of DecimalFormatSymbols (constructors)

DecimalFormatSymbols (constructors) occurences:
java.text.DecimalFormatSymbols()
java.text.DecimalFormatSymbols(java.util.Locale)


Occurences of DECLARED

DECLARED occurences:
java.lang.reflect.DECLARED
javax.lang.model.type.DECLARED


Occurences of declaringType

declaringType occurences:
com.sun.jdi.Location.declaringType()
com.sun.jdi.TypeComponent.declaringType()


Occurences of decode

decode occurences:
java.awt.Color.decode(java.lang.String)
java.awt.Font.decode(java.lang.String)
java.lang.Byte.decode(java.lang.String)
java.lang.Integer.decode(java.lang.String)
java.lang.Long.decode(java.lang.String)
java.lang.Short.decode(java.lang.String)
java.net.decode
java.net.URLDecoder.decode(java.lang.String)
java.net.URLDecoder.decode(java.lang.String, java.lang.String)
java.nio.charset.Charset.decode(java.nio.ByteBuffer)
java.nio.charset.CharsetDecoder.decode(java.nio.ByteBuffer)
java.nio.charset.CharsetDecoder.decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean)
java.security.Certificate.decode(java.io.InputStream)
java.util.Base64.Decoder.decode(byte:A)
java.util.Base64.Decoder.decode(byte:A, byte:A)
java.util.Base64.Decoder.decode(java.lang.String)
java.util.Base64.Decoder.decode(java.nio.ByteBuffer)
org.omg.IOP.CodecOperations.decode(byte:A)


Occurences of decodeColor

decodeColor occurences:
javax.swing.plaf.nimbus.AbstractRegionPainter.decodeColor(java.awt.Color, java.awt.Color, float)
javax.swing.plaf.nimbus.AbstractRegionPainter.decodeColor(java.lang.String, float, float, float, int)


Occurences of decorateTask

decorateTask occurences:
java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask(java.lang.Runnable, java.util.concurrent.RunnableScheduledFuture)
java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask(java.util.concurrent.Callable, java.util.concurrent.RunnableScheduledFuture)


Occurences of decrementAndGet

decrementAndGet occurences:
java.util.concurrent.atomic.AtomicInteger.decrementAndGet()
java.util.concurrent.atomic.AtomicIntegerArray.decrementAndGet(int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.decrementAndGet(java.lang.Object)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.decrementAndGet(T)
java.util.concurrent.atomic.AtomicLong.decrementAndGet()
java.util.concurrent.atomic.AtomicLongArray.decrementAndGet(int)
java.util.concurrent.atomic.AtomicLongFieldUpdater.decrementAndGet(java.lang.Object)
java.util.concurrent.atomic.AtomicLongFieldUpdater.decrementAndGet(T)


Occurences of decrementExact

decrementExact occurences:
java.lang.Math.decrementExact(int)
java.lang.Math.decrementExact(long)


Occurences of deepEquals

deepEquals occurences:
java.util.Arrays.deepEquals(java.lang.Object:A, java.lang.Object:A)
java.util.Objects.deepEquals(java.lang.Object, java.lang.Object)


Occurences of def

def occurences:
java.util.zip.def
java.util.zip.def


Occurences of DEFAULT

DEFAULT occurences:
java.awt.dnd.DEFAULT
java.security.spec.DEFAULT
java.text.DEFAULT
javax.crypto.spec.DEFAULT
javax.crypto.spec.DEFAULT
javax.lang.model.element.DEFAULT
javax.swing.DEFAULT
javax.swing.plaf.synth.DEFAULT
javax.swing.text.html.parser.DEFAULT
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT.DEFAULT()
javax.xml.bind.annotation.XmlElement.DEFAULT.DEFAULT()
javax.xml.bind.annotation.XmlElementRef.DEFAULT.DEFAULT()
javax.xml.bind.annotation.XmlSchemaType.DEFAULT.DEFAULT()
javax.xml.bind.annotation.XmlType.DEFAULT.DEFAULT()
javax.xml.crypto.dsig.spec.DEFAULT


Occurences of defaultAction

defaultAction occurences:
com.sun.source.util.SimpleDocTreeVisitor.defaultAction(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.defaultAction(com.sun.source.doctree.DocTree, P)
com.sun.source.util.SimpleTreeVisitor.defaultAction(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.defaultAction(com.sun.source.tree.Tree, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.defaultAction(java.lang.Object, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.defaultAction(java.lang.Object, P)
javax.lang.model.util.SimpleElementVisitor6.defaultAction(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.defaultAction(javax.lang.model.element.Element, P)
javax.lang.model.util.SimpleTypeVisitor6.defaultAction(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.defaultAction(javax.lang.model.type.TypeMirror, P)


Occurences of DefaultBoundedRangeModel (constructors)

DefaultBoundedRangeModel (constructors) occurences:
javax.swing.DefaultBoundedRangeModel()
javax.swing.DefaultBoundedRangeModel(int, int, int, int)


Occurences of DefaultCellEditor (constructors)

DefaultCellEditor (constructors) occurences:
javax.swing.DefaultCellEditor(javax.swing.JCheckBox)
javax.swing.DefaultCellEditor(javax.swing.JComboBox)
javax.swing.DefaultCellEditor(javax.swing.JTextField)


Occurences of DefaultColorSelectionModel (constructors)

DefaultColorSelectionModel (constructors) occurences:
javax.swing.colorchooser.DefaultColorSelectionModel()
javax.swing.colorchooser.DefaultColorSelectionModel(java.awt.Color)


Occurences of DefaultComboBoxModel (constructors)

DefaultComboBoxModel (constructors) occurences:
javax.swing.DefaultComboBoxModel()
javax.swing.DefaultComboBoxModel(E:A)
javax.swing.DefaultComboBoxModel(java.lang.Object:A)
javax.swing.DefaultComboBoxModel(java.util.Vector)


Occurences of defaultController

defaultController occurences:
javax.imageio.defaultController
javax.imageio.metadata.defaultController


Occurences of DefaultFormatterFactory (constructors)

DefaultFormatterFactory (constructors) occurences:
javax.swing.text.DefaultFormatterFactory()
javax.swing.text.DefaultFormatterFactory(javax.swing.JFormattedTextField.AbstractFormatter)
javax.swing.text.DefaultFormatterFactory(javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter)
javax.swing.text.DefaultFormatterFactory(javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter)
javax.swing.text.DefaultFormatterFactory(javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter, javax.swing.JFormattedTextField.AbstractFormatter)


Occurences of DefaultLoaderRepository

DefaultLoaderRepository occurences:
javax.management.DefaultLoaderRepository
javax.management.loading.DefaultLoaderRepository


Occurences of DefaultLoaderRepository (constructors)

DefaultLoaderRepository (constructors) occurences:
javax.management.DefaultLoaderRepository()
javax.management.loading.DefaultLoaderRepository()


Occurences of DefaultMutableTreeNode (constructors)

DefaultMutableTreeNode (constructors) occurences:
javax.swing.tree.DefaultMutableTreeNode()
javax.swing.tree.DefaultMutableTreeNode(java.lang.Object)
javax.swing.tree.DefaultMutableTreeNode(java.lang.Object, boolean)


Occurences of defaultPage

defaultPage occurences:
java.awt.print.PrinterJob.defaultPage()
java.awt.print.PrinterJob.defaultPage(java.awt.print.PageFormat)


Occurences of DefaultPersistenceDelegate (constructors)

DefaultPersistenceDelegate (constructors) occurences:
java.beans.DefaultPersistenceDelegate()
java.beans.DefaultPersistenceDelegate(java.lang.String:A)


Occurences of DefaultStyledDocument (constructors)

DefaultStyledDocument (constructors) occurences:
javax.swing.text.DefaultStyledDocument()
javax.swing.text.DefaultStyledDocument(javax.swing.text.AbstractDocument.Content, javax.swing.text.StyleContext)
javax.swing.text.DefaultStyledDocument(javax.swing.text.StyleContext)


Occurences of DefaultTableModel (constructors)

DefaultTableModel (constructors) occurences:
javax.swing.table.DefaultTableModel()
javax.swing.table.DefaultTableModel(int, int)
javax.swing.table.DefaultTableModel(java.lang.Object:A, int)
javax.swing.table.DefaultTableModel(java.lang.Object:A:A, java.lang.Object:A)
javax.swing.table.DefaultTableModel(java.util.Vector, int)
javax.swing.table.DefaultTableModel(java.util.Vector, java.util.Vector)


Occurences of defaultTextIconGap

defaultTextIconGap occurences:
javax.swing.plaf.basic.defaultTextIconGap
javax.swing.plaf.basic.defaultTextIconGap


Occurences of DefaultTreeCellEditor (constructors)

DefaultTreeCellEditor (constructors) occurences:
javax.swing.tree.DefaultTreeCellEditor(javax.swing.JTree, javax.swing.tree.DefaultTreeCellRenderer)
javax.swing.tree.DefaultTreeCellEditor(javax.swing.JTree, javax.swing.tree.DefaultTreeCellRenderer, javax.swing.tree.TreeCellEditor)


Occurences of DefaultTreeModel (constructors)

DefaultTreeModel (constructors) occurences:
javax.swing.tree.DefaultTreeModel(javax.swing.tree.TreeNode)
javax.swing.tree.DefaultTreeModel(javax.swing.tree.TreeNode, boolean)


Occurences of defaultValue

defaultValue occurences:
com.sun.javadoc.AnnotationTypeElementDoc.defaultValue()
javax.xml.bind.annotation.XmlElement.defaultValue()
javax.xml.bind.annotation.XmlElementDecl.defaultValue()


Occurences of DEFAULT_CLASS_LOADER

DEFAULT_CLASS_LOADER occurences:
javax.management.remote.DEFAULT_CLASS_LOADER
javax.management.remote.DEFAULT_CLASS_LOADER


Occurences of DEFAULT_CURSOR

DEFAULT_CURSOR occurences:
java.awt.DEFAULT_CURSOR
java.awt.DEFAULT_CURSOR


Occurences of DEFAULT_LIFETIME

DEFAULT_LIFETIME occurences:
org.ietf.jgss.DEFAULT_LIFETIME
org.ietf.jgss.DEFAULT_LIFETIME


Occurences of DEFAULT_VALUE

DEFAULT_VALUE occurences:
com.sun.source.util.DEFAULT_VALUE
com.sun.source.util.DEFAULT_VALUE
javax.lang.model.util.DEFAULT_VALUE
javax.lang.model.util.DEFAULT_VALUE
javax.lang.model.util.DEFAULT_VALUE
javax.lang.model.util.DEFAULT_VALUE


Occurences of defEntity

defEntity occurences:
javax.swing.text.html.parser.DTD.defEntity(java.lang.String, int, int)
javax.swing.text.html.parser.DTD.defEntity(java.lang.String, int, java.lang.String)


Occurences of defineClass

defineClass occurences:
java.lang.ClassLoader.defineClass(byte:A, int, int)
java.lang.ClassLoader.defineClass(java.lang.String, byte:A, int, int)
java.lang.ClassLoader.defineClass(java.lang.String, byte:A, int, int, java.security.ProtectionDomain)
java.lang.ClassLoader.defineClass(java.lang.String, java.nio.ByteBuffer, java.security.ProtectionDomain)
java.security.SecureClassLoader.defineClass(java.lang.String, byte:A, int, int, java.security.CodeSource)
java.security.SecureClassLoader.defineClass(java.lang.String, java.nio.ByteBuffer, java.security.CodeSource)


Occurences of definePackage

definePackage occurences:
java.lang.ClassLoader.definePackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.net.URL)
java.net.URLClassLoader.definePackage(java.lang.String, java.util.jar.Manifest, java.net.URL)


Occurences of deflate

deflate occurences:
java.util.zip.Deflater.deflate(byte:A)
java.util.zip.Deflater.deflate(byte:A, int, int)
java.util.zip.Deflater.deflate(byte:A, int, int, int)
java.util.zip.DeflaterOutputStream.deflate()


Occurences of DEFLATED

DEFLATED occurences:
java.util.zip.DEFLATED
java.util.zip.DEFLATED
java.util.zip.DEFLATED


Occurences of Deflater (constructors)

Deflater (constructors) occurences:
java.util.zip.Deflater()
java.util.zip.Deflater(int)
java.util.zip.Deflater(int, boolean)


Occurences of DeflaterInputStream (constructors)

DeflaterInputStream (constructors) occurences:
java.util.zip.DeflaterInputStream(java.io.InputStream)
java.util.zip.DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater)
java.util.zip.DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater, int)


Occurences of DeflaterOutputStream (constructors)

DeflaterOutputStream (constructors) occurences:
java.util.zip.DeflaterOutputStream(java.io.OutputStream)
java.util.zip.DeflaterOutputStream(java.io.OutputStream, boolean)
java.util.zip.DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater)
java.util.zip.DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, boolean)
java.util.zip.DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int)
java.util.zip.DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int, boolean)


Occurences of DEFLATE_HINT

DEFLATE_HINT occurences:
java.util.jar.DEFLATE_HINT
java.util.jar.DEFLATE_HINT


Occurences of def_kind

def_kind occurences:
org.omg.CORBA.IRObjectOperations.def_kind()
org.omg.CORBA._IDLTypeStub.def_kind()


Occurences of deiconifyFrame

deiconifyFrame occurences:
javax.swing.DefaultDesktopManager.deiconifyFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.deiconifyFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.deiconifyFrame(javax.swing.JInternalFrame)


Occurences of deinstall

deinstall occurences:
javax.swing.text.Caret.deinstall(javax.swing.text.JTextComponent)
javax.swing.text.DefaultCaret.deinstall(javax.swing.text.JTextComponent)
javax.swing.text.DefaultHighlighter.deinstall(javax.swing.text.JTextComponent)
javax.swing.text.EditorKit.deinstall(javax.swing.JEditorPane)
javax.swing.text.Highlighter.deinstall(javax.swing.text.JTextComponent)
javax.swing.text.html.HTMLEditorKit.deinstall(javax.swing.JEditorPane)
javax.swing.text.StyledEditorKit.deinstall(javax.swing.JEditorPane)


Occurences of DelayQueue (constructors)

DelayQueue (constructors) occurences:
java.util.concurrent.DelayQueue()
java.util.concurrent.DelayQueue(java.util.Collection)


Occurences of Delegate

Delegate occurences:
org.omg.CORBA.portable.Delegate
org.omg.CORBA_2_3.portable.Delegate
org.omg.PortableServer.portable.Delegate


Occurences of Delegate (constructors)

Delegate (constructors) occurences:
org.omg.CORBA.portable.Delegate()
org.omg.CORBA_2_3.portable.Delegate()


Occurences of delegateFocus

delegateFocus occurences:
javax.swing.plaf.basic.BasicComboPopup.delegateFocus(java.awt.event.MouseEvent)
javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup.delegateFocus(java.awt.event.MouseEvent)


Occurences of DelegationPermission (constructors)

DelegationPermission (constructors) occurences:
javax.security.auth.kerberos.DelegationPermission(java.lang.String)
javax.security.auth.kerberos.DelegationPermission(java.lang.String, java.lang.String)


Occurences of delete

delete occurences:
java.io.File.delete()
java.lang.StringBuffer.delete(int, int)
java.lang.StringBuilder.delete(int, int)
java.nio.file.attribute.UserDefinedFileAttributeView.delete(java.lang.String)
java.nio.file.Files.delete(java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.delete(java.nio.file.Path)
javax.accessibility.AccessibleEditableText.delete(int, int)
javax.swing.JSpinner.AccessibleJSpinner.delete(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.delete(int, int)
javax.tools.FileObject.delete()
javax.tools.ForwardingFileObject.delete()
javax.tools.SimpleJavaFileObject.delete()


Occurences of DELETE

DELETE occurences:
java.awt.DELETE
java.nio.file.attribute.DELETE
javax.accessibility.DELETE
javax.swing.event.DELETE


Occurences of deleteChar

deleteChar occurences:
java.awt.font.LineBreakMeasurer.deleteChar(java.text.AttributedCharacterIterator, int)
java.awt.font.TextMeasurer.deleteChar(java.text.AttributedCharacterIterator, int)


Occurences of deleteCharAt

deleteCharAt occurences:
java.lang.StringBuffer.deleteCharAt(int)
java.lang.StringBuilder.deleteCharAt(int)


Occurences of deleteDirectory

deleteDirectory occurences:
java.nio.file.SecureDirectoryStream.deleteDirectory(java.lang.Object)
java.nio.file.SecureDirectoryStream.deleteDirectory(T)


Occurences of deleteFile

deleteFile occurences:
java.nio.file.SecureDirectoryStream.deleteFile(java.lang.Object)
java.nio.file.SecureDirectoryStream.deleteFile(T)


Occurences of deleteIfExists

deleteIfExists occurences:
java.nio.file.Files.deleteIfExists(java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.deleteIfExists(java.nio.file.Path)


Occurences of deleteShortcut

deleteShortcut occurences:
java.awt.MenuBar.deleteShortcut(java.awt.MenuShortcut)
java.awt.MenuItem.deleteShortcut()


Occurences of deliverEvent

deliverEvent occurences:
java.awt.Component.deliverEvent(java.awt.Event)
java.awt.Container.deliverEvent(java.awt.Event)


Occurences of deltaTransform

deltaTransform occurences:
java.awt.geom.AffineTransform.deltaTransform(double:A, int, double:A, int, int)
java.awt.geom.AffineTransform.deltaTransform(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of Deploy Applications and Applets

Deploy Applications and Applets occurences:
Deploy Applications and Applets
Deploy Applications and Applets


Occurences of Deprecated List

Deprecated List occurences:
Deprecated List
Deprecated List
Deprecated List
Deprecated List


Occurences of depth

depth occurences:
com.sun.jdi.request.StepRequest.depth()
javax.swing.text.ElementIterator.depth()


Occurences of dequeueKeyEvents

dequeueKeyEvents occurences:
java.awt.DefaultKeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component)
java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component)


Occurences of dereference

dereference occurences:
javax.xml.crypto.dsig.keyinfo.RetrievalMethod.dereference(javax.xml.crypto.XMLCryptoContext)
javax.xml.crypto.URIDereferencer.dereference(javax.xml.crypto.URIReference, javax.xml.crypto.XMLCryptoContext)


Occurences of deregister

deregister occurences:
java.nio.channels.spi.AbstractSelector.deregister(java.nio.channels.spi.AbstractSelectionKey)
java.sql.DriverAction.deregister()


Occurences of deregisterAll

deregisterAll occurences:
javax.imageio.spi.ServiceRegistry.deregisterAll()
javax.imageio.spi.ServiceRegistry.deregisterAll(java.lang.Class)


Occurences of deregisterServiceProvider

deregisterServiceProvider occurences:
javax.imageio.spi.ServiceRegistry.deregisterServiceProvider(java.lang.Object)
javax.imageio.spi.ServiceRegistry.deregisterServiceProvider(java.lang.Object, java.lang.Class)
javax.imageio.spi.ServiceRegistry.deregisterServiceProvider(T, java.lang.Class)


Occurences of derive

derive occurences:
java.awt.AlphaComposite.derive(float)
java.awt.AlphaComposite.derive(int)


Occurences of deriveFont

deriveFont occurences:
java.awt.Font.deriveFont(float)
java.awt.Font.deriveFont(int)
java.awt.Font.deriveFont(int, float)
java.awt.Font.deriveFont(int, java.awt.geom.AffineTransform)
java.awt.Font.deriveFont(java.awt.geom.AffineTransform)
java.awt.Font.deriveFont(java.util.Map)


Occurences of deriveMMFont

deriveMMFont occurences:
java.awt.font.MultipleMaster.deriveMMFont(float:A)
java.awt.font.MultipleMaster.deriveMMFont(float:A, float, float, float, float)


Occurences of descendingIterator

descendingIterator occurences:
java.util.ArrayDeque.descendingIterator()
java.util.concurrent.ConcurrentLinkedDeque.descendingIterator()
java.util.concurrent.ConcurrentSkipListSet.descendingIterator()
java.util.concurrent.LinkedBlockingDeque.descendingIterator()
java.util.Deque.descendingIterator()
java.util.LinkedList.descendingIterator()
java.util.NavigableSet.descendingIterator()
java.util.TreeSet.descendingIterator()


Occurences of descendingKeySet

descendingKeySet occurences:
java.util.concurrent.ConcurrentNavigableMap.descendingKeySet()
java.util.concurrent.ConcurrentSkipListMap.descendingKeySet()
java.util.NavigableMap.descendingKeySet()
java.util.TreeMap.descendingKeySet()


Occurences of descendingMap

descendingMap occurences:
java.util.concurrent.ConcurrentNavigableMap.descendingMap()
java.util.concurrent.ConcurrentSkipListMap.descendingMap()
java.util.NavigableMap.descendingMap()
java.util.TreeMap.descendingMap()


Occurences of descendingSet

descendingSet occurences:
java.util.concurrent.ConcurrentSkipListSet.descendingSet()
java.util.NavigableSet.descendingSet()
java.util.TreeSet.descendingSet()


Occurences of description

description occurences:
com.sun.javadoc.SerialFieldTag.description()
com.sun.jdi.connect.Connector.description()
com.sun.jdi.connect.Connector.Argument.description()
com.sun.jdi.connect.spi.TransportService.description()
com.sun.jdi.VirtualMachine.description()
java.sql.description
javax.annotation.Resource.description()
javax.management.description


Occurences of DescriptorSupport (constructors)

DescriptorSupport (constructors) occurences:
javax.management.modelmbean.DescriptorSupport()
javax.management.modelmbean.DescriptorSupport(int)
javax.management.modelmbean.DescriptorSupport(java.lang.String)
javax.management.modelmbean.DescriptorSupport(java.lang.String...)
javax.management.modelmbean.DescriptorSupport(java.lang.String:A, java.lang.Object:A)
javax.management.modelmbean.DescriptorSupport(javax.management.modelmbean.DescriptorSupport)


Occurences of DESedeKeySpec (constructors)

DESedeKeySpec (constructors) occurences:
javax.crypto.spec.DESedeKeySpec(byte:A)
javax.crypto.spec.DESedeKeySpec(byte:A, int)


Occurences of DESERET

DESERET occurences:
java.lang.DESERET
java.lang.DESERET


Occurences of deserialize

deserialize occurences:
java.beans.beancontext.BeanContextSupport.deserialize(java.io.ObjectInputStream, java.util.Collection)
javax.management.MBeanServer.deserialize(java.lang.String, byte:A)
javax.management.MBeanServer.deserialize(java.lang.String, javax.management.ObjectName, byte:A)
javax.management.MBeanServer.deserialize(javax.management.ObjectName, byte:A)


Occurences of DESKeySpec (constructors)

DESKeySpec (constructors) occurences:
javax.crypto.spec.DESKeySpec(byte:A)
javax.crypto.spec.DESKeySpec(byte:A, int)


Occurences of desktop

desktop occurences:
java.awt.desktop
javax.swing.plaf.basic.desktop


Occurences of desktopIcon

desktopIcon occurences:
javax.swing.desktopIcon
javax.swing.plaf.basic.desktopIcon


Occurences of DESKTOP_ICON

DESKTOP_ICON occurences:
javax.accessibility.DESKTOP_ICON
javax.swing.plaf.synth.DESKTOP_ICON


Occurences of DESKTOP_PANE

DESKTOP_PANE occurences:
javax.accessibility.DESKTOP_PANE
javax.swing.plaf.synth.DESKTOP_PANE


Occurences of destination

destination occurences:
javax.imageio.destination
javax.swing.plaf.basic.destination


Occurences of destroy

destroy occurences:
java.applet.Applet.destroy()
java.lang.Process.destroy()
java.lang.Thread.destroy()
java.lang.ThreadGroup.destroy()
java.security.KeyStore.PasswordProtection.destroy()
javax.security.auth.Destroyable.destroy()
javax.security.auth.kerberos.KerberosKey.destroy()
javax.security.auth.kerberos.KerberosTicket.destroy()
javax.security.auth.x500.X500PrivateCredential.destroy()
org.omg.CORBA.DynAny.destroy()
org.omg.CORBA.IRObjectOperations.destroy()
org.omg.CORBA.ORB.destroy()
org.omg.CORBA.PolicyOperations.destroy()
org.omg.CORBA._IDLTypeStub.destroy()
org.omg.CORBA._PolicyStub.destroy()
org.omg.CosNaming.BindingIteratorOperations.destroy()
org.omg.CosNaming.NamingContextOperations.destroy()
org.omg.CosNaming._BindingIteratorStub.destroy()
org.omg.CosNaming._NamingContextExtStub.destroy()
org.omg.CosNaming._NamingContextStub.destroy()
org.omg.DynamicAny.DynAnyOperations.destroy()
org.omg.DynamicAny._DynAnyStub.destroy()
org.omg.DynamicAny._DynArrayStub.destroy()
org.omg.DynamicAny._DynEnumStub.destroy()
org.omg.DynamicAny._DynFixedStub.destroy()
org.omg.DynamicAny._DynSequenceStub.destroy()
org.omg.DynamicAny._DynStructStub.destroy()
org.omg.DynamicAny._DynUnionStub.destroy()
org.omg.DynamicAny._DynValueStub.destroy()
org.omg.PortableInterceptor.InterceptorOperations.destroy()
org.omg.PortableServer.POAOperations.destroy(boolean, boolean)


Occurences of DestroyFailedException (constructors)

DestroyFailedException (constructors) occurences:
javax.security.auth.DestroyFailedException()
javax.security.auth.DestroyFailedException(java.lang.String)


Occurences of destroySubcontext

destroySubcontext occurences:
javax.naming.Context.destroySubcontext(java.lang.String)
javax.naming.Context.destroySubcontext(javax.naming.Name)
javax.naming.InitialContext.destroySubcontext(java.lang.String)
javax.naming.InitialContext.destroySubcontext(javax.naming.Name)


Occurences of detail

detail occurences:
java.io.detail
java.rmi.activation.detail
java.rmi.detail
java.rmi.server.detail
java.util.detail


Occurences of DEVANAGARI

DEVANAGARI occurences:
java.awt.font.DEVANAGARI
java.awt.font.DEVANAGARI
java.lang.DEVANAGARI
java.lang.DEVANAGARI


Occurences of dgc

dgc occurences:
compact2.java.rmi.dgc
compact3.java.rmi.dgc
java.rmi.dgc


Occurences of DHParameterSpec (constructors)

DHParameterSpec (constructors) occurences:
javax.crypto.spec.DHParameterSpec(java.math.BigInteger, java.math.BigInteger)
javax.crypto.spec.DHParameterSpec(java.math.BigInteger, java.math.BigInteger, int)


Occurences of DIALOG

DIALOG occurences:
java.awt.DIALOG
javax.accessibility.DIALOG


Occurences of Dialog (constructors)

Dialog (constructors) occurences:
java.awt.Dialog(java.awt.Dialog)
java.awt.Dialog(java.awt.Dialog, java.lang.String)
java.awt.Dialog(java.awt.Dialog, java.lang.String, boolean)
java.awt.Dialog(java.awt.Dialog, java.lang.String, boolean, java.awt.GraphicsConfiguration)
java.awt.Dialog(java.awt.Frame)
java.awt.Dialog(java.awt.Frame, boolean)
java.awt.Dialog(java.awt.Frame, java.lang.String)
java.awt.Dialog(java.awt.Frame, java.lang.String, boolean)
java.awt.Dialog(java.awt.Frame, java.lang.String, boolean, java.awt.GraphicsConfiguration)
java.awt.Dialog(java.awt.Window)
java.awt.Dialog(java.awt.Window, java.awt.Dialog.ModalityType)
java.awt.Dialog(java.awt.Window, java.lang.String)
java.awt.Dialog(java.awt.Window, java.lang.String, java.awt.Dialog.ModalityType)
java.awt.Dialog(java.awt.Window, java.lang.String, java.awt.Dialog.ModalityType, java.awt.GraphicsConfiguration)


Occurences of die

die occurences:
javax.swing.undo.AbstractUndoableEdit.die()
javax.swing.undo.CompoundEdit.die()
javax.swing.undo.UndoableEdit.die()


Occurences of digest

digest occurences:
java.security.digest
java.security.digest
java.security.MessageDigest.digest()
java.security.MessageDigest.digest(byte:A)
java.security.MessageDigest.digest(byte:A, int, int)


Occurences of DigestException (constructors)

DigestException (constructors) occurences:
java.security.DigestException()
java.security.DigestException(java.lang.String)
java.security.DigestException(java.lang.String, java.lang.Throwable)
java.security.DigestException(java.lang.Throwable)


Occurences of digit

digit occurences:
java.lang.Character.digit(char, int)
java.lang.Character.digit(int, int)


Occurences of Dimension (constructors)

Dimension (constructors) occurences:
java.awt.Dimension()
java.awt.Dimension(int, int)
java.awt.Dimension(java.awt.Dimension)


Occurences of DIR

DIR occurences:
javax.swing.text.html.DIR
javax.swing.text.html.DIR


Occurences of DirectColorModel (constructors)

DirectColorModel (constructors) occurences:
java.awt.image.DirectColorModel(int, int, int, int)
java.awt.image.DirectColorModel(int, int, int, int, int)
java.awt.image.DirectColorModel(java.awt.color.ColorSpace, int, int, int, int, int, boolean, int)


Occurences of direction

direction occurences:
javax.swing.plaf.basic.direction
javax.swing.plaf.basic.direction
javax.swing.plaf.basic.direction
javax.swing.plaf.basic.direction
javax.swing.plaf.basic.direction


Occurences of directory

directory occurences:
compact3.javax.naming.directory
java.lang.ProcessBuilder.directory()
java.lang.ProcessBuilder.directory(java.io.File)
javax.naming.directory


Occurences of disable

disable occurences:
com.sun.jdi.request.EventRequest.disable()
java.awt.Component.disable()
java.awt.MenuItem.disable()
java.lang.Compiler.disable()
javax.swing.JComponent.disable()


Occurences of disabledTextColor

disabledTextColor occurences:
javax.swing.plaf.metal.disabledTextColor
javax.swing.plaf.metal.disabledTextColor
javax.swing.plaf.metal.disabledTextColor


Occurences of disableEvents

disableEvents occurences:
java.awt.Component.disableEvents(long)
java.awt.MenuItem.disableEvents(long)


Occurences of DISCARDING

DISCARDING occurences:
org.omg.PortableInterceptor.DISCARDING
org.omg.PortableServer.POAManagerPackage.DISCARDING


Occurences of discardKeyEvents

discardKeyEvents occurences:
java.awt.DefaultKeyboardFocusManager.discardKeyEvents(java.awt.Component)
java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component)


Occurences of disconnect

disconnect occurences:
java.net.DatagramSocket.disconnect()
java.net.DatagramSocketImpl.disconnect()
java.net.HttpURLConnection.disconnect()
java.nio.channels.DatagramChannel.disconnect()
org.omg.CORBA.ORB.disconnect(org.omg.CORBA.Object)


Occurences of discriminator_kind

discriminator_kind occurences:
org.omg.CORBA.DynUnion.discriminator_kind()
org.omg.DynamicAny.DynUnionOperations.discriminator_kind()
org.omg.DynamicAny._DynUnionStub.discriminator_kind()


Occurences of dispatch

dispatch occurences:
java.awt.ActiveEvent.dispatch()
java.awt.event.InvocationEvent.dispatch()
java.rmi.server.Skeleton.dispatch(java.rmi.Remote, java.rmi.server.RemoteCall, int, long)
javax.naming.event.NamingEvent.dispatch(javax.naming.event.NamingListener)
javax.naming.event.NamingExceptionEvent.dispatch(javax.naming.event.NamingListener)
javax.naming.ldap.UnsolicitedNotificationEvent.dispatch(javax.naming.ldap.UnsolicitedNotificationListener)


Occurences of dispatchEvent

dispatchEvent occurences:
java.awt.Component.dispatchEvent(java.awt.AWTEvent)
java.awt.DefaultKeyboardFocusManager.dispatchEvent(java.awt.AWTEvent)
java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
java.awt.im.InputContext.dispatchEvent(java.awt.AWTEvent)
java.awt.im.spi.InputMethod.dispatchEvent(java.awt.AWTEvent)
java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent)
java.awt.MenuComponent.dispatchEvent(java.awt.AWTEvent)
org.w3c.dom.events.EventTarget.dispatchEvent(org.w3c.dom.events.Event)


Occurences of dispatchKeyEvent

dispatchKeyEvent occurences:
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent)
java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent)
java.awt.KeyEventDispatcher.dispatchKeyEvent(java.awt.event.KeyEvent)


Occurences of DISPLAY

DISPLAY occurences:
java.util.DISPLAY
javax.swing.text.html.DISPLAY


Occurences of displayName

displayName occurences:
com.sun.tools.attach.VirtualMachineDescriptor.displayName()
java.nio.charset.Charset.displayName()
java.nio.charset.Charset.displayName(java.util.Locale)


Occurences of dispose

dispose occurences:
com.sun.jdi.VirtualMachine.dispose()
com.sun.tools.jconsole.JConsolePlugin.dispose()
java.awt.Component.BltBufferStrategy.dispose()
java.awt.Component.FlipBufferStrategy.dispose()
java.awt.CompositeContext.dispose()
java.awt.Graphics.dispose()
java.awt.im.InputContext.dispose()
java.awt.im.spi.InputMethod.dispose()
java.awt.image.BufferStrategy.dispose()
java.awt.PaintContext.dispose()
java.awt.Window.dispose()
javax.imageio.ImageReader.dispose()
javax.imageio.ImageWriter.dispose()
javax.print.StreamPrintService.dispose()
javax.security.sasl.SaslClient.dispose()
javax.security.sasl.SaslServer.dispose()
javax.swing.DebugGraphics.dispose()
javax.swing.JInternalFrame.dispose()
org.ietf.jgss.GSSContext.dispose()
org.ietf.jgss.GSSCredential.dispose()


Occurences of distance

distance occurences:
java.awt.geom.Point2D.distance(double, double)
java.awt.geom.Point2D.distance(double, double, double, double)
java.awt.geom.Point2D.distance(java.awt.geom.Point2D)


Occurences of distanceSq

distanceSq occurences:
java.awt.geom.Point2D.distanceSq(double, double)
java.awt.geom.Point2D.distanceSq(double, double, double, double)
java.awt.geom.Point2D.distanceSq(java.awt.geom.Point2D)


Occurences of DISTINCT

DISTINCT occurences:
java.sql.DISTINCT
java.sql.DISTINCT
java.util.DISTINCT


Occurences of distinct

distinct occurences:
java.util.stream.DoubleStream.distinct()
java.util.stream.IntStream.distinct()
java.util.stream.LongStream.distinct()
java.util.stream.Stream.distinct()


Occurences of DIV

DIV occurences:
javax.management.DIV
javax.swing.text.html.DIV


Occurences of divide

divide occurences:
java.math.BigDecimal.divide(java.math.BigDecimal)
java.math.BigDecimal.divide(java.math.BigDecimal, int)
java.math.BigDecimal.divide(java.math.BigDecimal, int, int)
java.math.BigDecimal.divide(java.math.BigDecimal, int, java.math.RoundingMode)
java.math.BigDecimal.divide(java.math.BigDecimal, java.math.MathContext)
java.math.BigDecimal.divide(java.math.BigDecimal, java.math.RoundingMode)
java.math.BigInteger.divide(java.math.BigInteger)


Occurences of divideAndRemainder

divideAndRemainder occurences:
java.math.BigDecimal.divideAndRemainder(java.math.BigDecimal)
java.math.BigDecimal.divideAndRemainder(java.math.BigDecimal, java.math.MathContext)
java.math.BigInteger.divideAndRemainder(java.math.BigInteger)


Occurences of dividerSize

dividerSize occurences:
javax.swing.dividerSize
javax.swing.plaf.basic.dividerSize
javax.swing.plaf.basic.dividerSize


Occurences of divideToIntegralValue

divideToIntegralValue occurences:
java.math.BigDecimal.divideToIntegralValue(java.math.BigDecimal)
java.math.BigDecimal.divideToIntegralValue(java.math.BigDecimal, java.math.MathContext)


Occurences of divideUnsigned

divideUnsigned occurences:
java.lang.Integer.divideUnsigned(int, int)
java.lang.Long.divideUnsigned(long, long)


Occurences of divisionType

divisionType occurences:
javax.sound.midi.divisionType
javax.sound.midi.divisionType


Occurences of doAccessibleAction

doAccessibleAction occurences:
java.awt.Button.AccessibleAWTButton.doAccessibleAction(int)
java.awt.Checkbox.AccessibleAWTCheckbox.doAccessibleAction(int)
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.doAccessibleAction(int)
java.awt.Choice.AccessibleAWTChoice.doAccessibleAction(int)
java.awt.MenuItem.AccessibleAWTMenuItem.doAccessibleAction(int)
javax.accessibility.AccessibleAction.doAccessibleAction(int)
javax.accessibility.AccessibleHyperlink.doAccessibleAction(int)
javax.swing.AbstractButton.AccessibleAbstractButton.doAccessibleAction(int)
javax.swing.JComboBox.AccessibleJComboBox.doAccessibleAction(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.doAccessibleAction(int)
javax.swing.JSpinner.AccessibleJSpinner.doAccessibleAction(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.doAccessibleAction(int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.doAccessibleAction(int)


Occurences of doAs

doAs occurences:
javax.security.auth.Subject.doAs(javax.security.auth.Subject, java.security.PrivilegedAction)
javax.security.auth.Subject.doAs(javax.security.auth.Subject, java.security.PrivilegedExceptionAction)


Occurences of doAsPrivileged

doAsPrivileged occurences:
javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedAction, java.security.AccessControlContext)
javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction, java.security.AccessControlContext)


Occurences of Doc

Doc occurences:
com.sun.javadoc.Doc
javax.print.Doc


Occurences of Doclet Overview

Doclet Overview occurences:
Doclet Overview
Doclet Overview


Occurences of doClick

doClick occurences:
javax.swing.AbstractButton.doClick()
javax.swing.AbstractButton.doClick(int)
javax.swing.JMenu.doClick(int)
javax.swing.plaf.basic.BasicMenuItemUI.doClick(javax.swing.MenuSelectionManager)


Occurences of DocTreePath (constructors)

DocTreePath (constructors) occurences:
com.sun.source.util.DocTreePath(com.sun.source.util.DocTreePath, com.sun.source.doctree.DocTree)
com.sun.source.util.DocTreePath(com.sun.source.util.TreePath, com.sun.source.doctree.DocCommentTree)


Occurences of Document

Document occurences:
javax.swing.text.Document
org.w3c.dom.Document


Occurences of Document Information - Java SE Monitoring and Management Guide

Document Information - Java SE Monitoring and Management Guide occurences:
Document Information - Java SE Monitoring and Management Guide
Document Information - Java SE Monitoring and Management Guide


Occurences of DocumentEvent

DocumentEvent occurences:
javax.swing.event.DocumentEvent
org.w3c.dom.events.DocumentEvent


Occurences of doFinal

doFinal occurences:
javax.crypto.Cipher.doFinal()
javax.crypto.Cipher.doFinal(byte:A)
javax.crypto.Cipher.doFinal(byte:A, int)
javax.crypto.Cipher.doFinal(byte:A, int, int)
javax.crypto.Cipher.doFinal(byte:A, int, int, byte:A)
javax.crypto.Cipher.doFinal(byte:A, int, int, byte:A, int)
javax.crypto.Cipher.doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.crypto.Mac.doFinal()
javax.crypto.Mac.doFinal(byte:A)
javax.crypto.Mac.doFinal(byte:A, int)


Occurences of doLayout

doLayout occurences:
java.awt.Component.doLayout()
java.awt.Container.doLayout()
java.awt.ScrollPane.doLayout()
javax.swing.JLayer.doLayout()
javax.swing.JTable.doLayout()
javax.swing.plaf.LayerUI.doLayout(javax.swing.JLayer)
javax.swing.tree.DefaultTreeCellEditor.EditorContainer.doLayout()


Occurences of doLookup

doLookup occurences:
javax.naming.InitialContext.doLookup(java.lang.String)
javax.naming.InitialContext.doLookup(javax.naming.Name)


Occurences of dom

dom occurences:
compact2.javax.xml.transform.dom
compact2.org.w3c.dom
compact3.javax.xml.crypto.dom
compact3.javax.xml.crypto.dsig.dom
compact3.javax.xml.transform.dom
compact3.org.w3c.dom
javax.xml.crypto.dom
javax.xml.crypto.dsig.dom
javax.xml.transform.dom
org.w3c.dom


Occurences of DOMLocator

DOMLocator occurences:
javax.xml.transform.dom.DOMLocator
org.w3c.dom.DOMLocator


Occurences of DOMResult (constructors)

DOMResult (constructors) occurences:
javax.xml.transform.dom.DOMResult()
javax.xml.transform.dom.DOMResult(org.w3c.dom.Node)
javax.xml.transform.dom.DOMResult(org.w3c.dom.Node, java.lang.String)
javax.xml.transform.dom.DOMResult(org.w3c.dom.Node, org.w3c.dom.Node)
javax.xml.transform.dom.DOMResult(org.w3c.dom.Node, org.w3c.dom.Node, java.lang.String)


Occurences of DOMSignContext (constructors)

DOMSignContext (constructors) occurences:
javax.xml.crypto.dsig.dom.DOMSignContext(java.security.Key, org.w3c.dom.Node)
javax.xml.crypto.dsig.dom.DOMSignContext(java.security.Key, org.w3c.dom.Node, org.w3c.dom.Node)
javax.xml.crypto.dsig.dom.DOMSignContext(javax.xml.crypto.KeySelector, org.w3c.dom.Node)
javax.xml.crypto.dsig.dom.DOMSignContext(javax.xml.crypto.KeySelector, org.w3c.dom.Node, org.w3c.dom.Node)


Occurences of DOMSource (constructors)

DOMSource (constructors) occurences:
javax.xml.transform.dom.DOMSource()
javax.xml.transform.dom.DOMSource(org.w3c.dom.Node)
javax.xml.transform.dom.DOMSource(org.w3c.dom.Node, java.lang.String)


Occurences of DOMValidateContext (constructors)

DOMValidateContext (constructors) occurences:
javax.xml.crypto.dsig.dom.DOMValidateContext(java.security.Key, org.w3c.dom.Node)
javax.xml.crypto.dsig.dom.DOMValidateContext(javax.xml.crypto.KeySelector, org.w3c.dom.Node)


Occurences of DONE

DONE occurences:
java.text.DONE
java.text.DONE
javax.swing.DONE


Occurences of done

done occurences:
java.rmi.server.RemoteCall.done()
java.rmi.server.RemoteRef.done(java.rmi.server.RemoteCall)
java.util.concurrent.FutureTask.done()
javax.swing.SwingWorker.done()


Occurences of dontUseGui

dontUseGui occurences:
java.beans.beancontext.BeanContextSupport.dontUseGui()
java.beans.Visibility.dontUseGui()


Occurences of doPrivileged

doPrivileged occurences:
java.security.AccessController.doPrivileged(java.security.PrivilegedAction)
java.security.AccessController.doPrivileged(java.security.PrivilegedAction, java.security.AccessControlContext)
java.security.AccessController.doPrivileged(java.security.PrivilegedAction, java.security.AccessControlContext, java.security.Permission...)
java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction)
java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext, java.security.Permission...)


Occurences of doPrivilegedWithCombiner

doPrivilegedWithCombiner occurences:
java.security.AccessController.doPrivilegedWithCombiner(java.security.PrivilegedAction)
java.security.AccessController.doPrivilegedWithCombiner(java.security.PrivilegedAction, java.security.AccessControlContext, java.security.Permission...)
java.security.AccessController.doPrivilegedWithCombiner(java.security.PrivilegedExceptionAction)
java.security.AccessController.doPrivilegedWithCombiner(java.security.PrivilegedExceptionAction, java.security.AccessControlContext, java.security.Permission...)


Occurences of DOUBLE

DOUBLE occurences:
com.sun.source.doctree.DOUBLE
java.sql.DOUBLE
java.sql.DOUBLE
javax.lang.model.type.DOUBLE
javax.management.openmbean.DOUBLE


Occurences of Double

Double occurences:
java.awt.geom.Arc2D.Double.Double()
java.awt.geom.Arc2D.Double.Double(double, double, double, double, double, double, int)
java.awt.geom.Arc2D.Double.Double(int)
java.awt.geom.Arc2D.Double.Double(java.awt.geom.Rectangle2D, double, double, int)
java.awt.geom.CubicCurve2D.Double.Double()
java.awt.geom.CubicCurve2D.Double.Double(double, double, double, double, double, double, double, double)
java.awt.geom.Ellipse2D.Double.Double()
java.awt.geom.Ellipse2D.Double.Double(double, double, double, double)
java.awt.geom.Line2D.Double.Double()
java.awt.geom.Line2D.Double.Double(double, double, double, double)
java.awt.geom.Line2D.Double.Double(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.Path2D.Double.Double()
java.awt.geom.Path2D.Double.Double(int)
java.awt.geom.Path2D.Double.Double(int, int)
java.awt.geom.Path2D.Double.Double(java.awt.Shape)
java.awt.geom.Path2D.Double.Double(java.awt.Shape, java.awt.geom.AffineTransform)
java.awt.geom.Point2D.Double.Double()
java.awt.geom.Point2D.Double.Double(double, double)
java.awt.geom.QuadCurve2D.Double.Double()
java.awt.geom.QuadCurve2D.Double.Double(double, double, double, double, double, double)
java.awt.geom.Rectangle2D.Double.Double()
java.awt.geom.Rectangle2D.Double.Double(double, double, double, double)
java.awt.geom.RoundRectangle2D.Double.Double()
java.awt.geom.RoundRectangle2D.Double.Double(double, double, double, double, double, double)
java.lang.Double


Occurences of Double (constructors)

Double (constructors) occurences:
java.lang.Double(double)
java.lang.Double(java.lang.String)


Occurences of DoubleHolder (constructors)

DoubleHolder (constructors) occurences:
org.omg.CORBA.DoubleHolder()
org.omg.CORBA.DoubleHolder(double)


Occurences of doubles

doubles occurences:
java.util.concurrent.ThreadLocalRandom.doubles()
java.util.concurrent.ThreadLocalRandom.doubles(double, double)
java.util.concurrent.ThreadLocalRandom.doubles(long)
java.util.concurrent.ThreadLocalRandom.doubles(long, double, double)
java.util.Random.doubles()
java.util.Random.doubles(double, double)
java.util.Random.doubles(long)
java.util.Random.doubles(long, double, double)
java.util.SplittableRandom.doubles()
java.util.SplittableRandom.doubles(double, double)
java.util.SplittableRandom.doubles(long)
java.util.SplittableRandom.doubles(long, double, double)


Occurences of DoubleSeqHolder (constructors)

DoubleSeqHolder (constructors) occurences:
org.omg.CORBA.DoubleSeqHolder()
org.omg.CORBA.DoubleSeqHolder(double:A)


Occurences of doubleStream

doubleStream occurences:
java.util.stream.StreamSupport.doubleStream(java.util.function.Supplier, int, boolean)
java.util.stream.StreamSupport.doubleStream(java.util.Spliterator.OfDouble, boolean)


Occurences of doubleValue

doubleValue occurences:
com.sun.jdi.PrimitiveValue.doubleValue()
java.lang.Byte.doubleValue()
java.lang.Double.doubleValue()
java.lang.Float.doubleValue()
java.lang.Integer.doubleValue()
java.lang.Long.doubleValue()
java.lang.Number.doubleValue()
java.lang.Short.doubleValue()
java.math.BigDecimal.doubleValue()
java.math.BigInteger.doubleValue()
java.util.concurrent.atomic.AtomicInteger.doubleValue()
java.util.concurrent.atomic.AtomicLong.doubleValue()
java.util.concurrent.atomic.DoubleAccumulator.doubleValue()
java.util.concurrent.atomic.DoubleAdder.doubleValue()
java.util.concurrent.atomic.LongAccumulator.doubleValue()
java.util.concurrent.atomic.LongAdder.doubleValue()


Occurences of DOWN

DOWN occurences:
java.awt.DOWN
java.math.DOWN


Occurences of downFocusCycle

downFocusCycle occurences:
java.awt.DefaultKeyboardFocusManager.downFocusCycle(java.awt.Container)
java.awt.KeyboardFocusManager.downFocusCycle()
java.awt.KeyboardFocusManager.downFocusCycle(java.awt.Container)


Occurences of downKey

downKey occurences:
javax.swing.plaf.basic.downKey
javax.swing.plaf.basic.downKey
javax.swing.plaf.basic.downKey


Occurences of DRAFT

DRAFT occurences:
java.awt.DRAFT
javax.print.attribute.standard.DRAFT


Occurences of dragDividerTo

dragDividerTo occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.dragDividerTo(int)
javax.swing.plaf.basic.BasicSplitPaneUI.dragDividerTo(int)


Occurences of dragDropEnd

dragDropEnd occurences:
java.awt.dnd.DragSourceAdapter.dragDropEnd(java.awt.dnd.DragSourceDropEvent)
java.awt.dnd.DragSourceContext.dragDropEnd(java.awt.dnd.DragSourceDropEvent)
java.awt.dnd.DragSourceListener.dragDropEnd(java.awt.dnd.DragSourceDropEvent)


Occurences of dragEnter

dragEnter occurences:
java.awt.dnd.DragSourceAdapter.dragEnter(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceContext.dragEnter(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceListener.dragEnter(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DropTarget.dragEnter(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetAdapter.dragEnter(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetListener.dragEnter(java.awt.dnd.DropTargetDragEvent)


Occurences of dragExit

dragExit occurences:
java.awt.dnd.DragSourceAdapter.dragExit(java.awt.dnd.DragSourceEvent)
java.awt.dnd.DragSourceContext.dragExit(java.awt.dnd.DragSourceEvent)
java.awt.dnd.DragSourceListener.dragExit(java.awt.dnd.DragSourceEvent)
java.awt.dnd.DropTarget.dragExit(java.awt.dnd.DropTargetEvent)
java.awt.dnd.DropTargetAdapter.dragExit(java.awt.dnd.DropTargetEvent)
java.awt.dnd.DropTargetListener.dragExit(java.awt.dnd.DropTargetEvent)


Occurences of dragFrame

dragFrame occurences:
javax.swing.DefaultDesktopManager.dragFrame(javax.swing.JComponent, int, int)
javax.swing.DesktopManager.dragFrame(javax.swing.JComponent, int, int)


Occurences of DragGestureRecognizer (constructors)

DragGestureRecognizer (constructors) occurences:
java.awt.dnd.DragGestureRecognizer(java.awt.dnd.DragSource)
java.awt.dnd.DragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component)
java.awt.dnd.DragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int)
java.awt.dnd.DragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener)


Occurences of dragMouseMoved

dragMouseMoved occurences:
java.awt.dnd.DragSourceAdapter.dragMouseMoved(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceContext.dragMouseMoved(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceMotionListener.dragMouseMoved(java.awt.dnd.DragSourceDragEvent)


Occurences of dragOver

dragOver occurences:
java.awt.dnd.DragSourceAdapter.dragOver(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceContext.dragOver(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceListener.dragOver(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DropTarget.dragOver(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetAdapter.dragOver(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetListener.dragOver(java.awt.dnd.DropTargetDragEvent)


Occurences of DragSourceDragEvent (constructors)

DragSourceDragEvent (constructors) occurences:
java.awt.dnd.DragSourceDragEvent(java.awt.dnd.DragSourceContext, int, int, int)
java.awt.dnd.DragSourceDragEvent(java.awt.dnd.DragSourceContext, int, int, int, int, int)


Occurences of DragSourceDropEvent (constructors)

DragSourceDropEvent (constructors) occurences:
java.awt.dnd.DragSourceDropEvent(java.awt.dnd.DragSourceContext)
java.awt.dnd.DragSourceDropEvent(java.awt.dnd.DragSourceContext, int, boolean)
java.awt.dnd.DragSourceDropEvent(java.awt.dnd.DragSourceContext, int, boolean, int, int)


Occurences of DragSourceEvent (constructors)

DragSourceEvent (constructors) occurences:
java.awt.dnd.DragSourceEvent(java.awt.dnd.DragSourceContext)
java.awt.dnd.DragSourceEvent(java.awt.dnd.DragSourceContext, int, int)


Occurences of drain

drain occurences:
java.io.ObjectOutputStream.drain()
javax.sound.sampled.DataLine.drain()


Occurences of drainTo

drainTo occurences:
java.util.concurrent.ArrayBlockingQueue.drainTo(java.util.Collection)
java.util.concurrent.ArrayBlockingQueue.drainTo(java.util.Collection, int)
java.util.concurrent.BlockingQueue.drainTo(java.util.Collection)
java.util.concurrent.BlockingQueue.drainTo(java.util.Collection, int)
java.util.concurrent.DelayQueue.drainTo(java.util.Collection)
java.util.concurrent.DelayQueue.drainTo(java.util.Collection, int)
java.util.concurrent.LinkedBlockingDeque.drainTo(java.util.Collection)
java.util.concurrent.LinkedBlockingDeque.drainTo(java.util.Collection, int)
java.util.concurrent.LinkedBlockingQueue.drainTo(java.util.Collection)
java.util.concurrent.LinkedBlockingQueue.drainTo(java.util.Collection, int)
java.util.concurrent.LinkedTransferQueue.drainTo(java.util.Collection)
java.util.concurrent.LinkedTransferQueue.drainTo(java.util.Collection, int)
java.util.concurrent.PriorityBlockingQueue.drainTo(java.util.Collection)
java.util.concurrent.PriorityBlockingQueue.drainTo(java.util.Collection, int)
java.util.concurrent.SynchronousQueue.drainTo(java.util.Collection)
java.util.concurrent.SynchronousQueue.drainTo(java.util.Collection, int)


Occurences of draw

draw occurences:
java.awt.font.GraphicAttribute.draw(java.awt.Graphics2D, float, float)
java.awt.font.ImageGraphicAttribute.draw(java.awt.Graphics2D, float, float)
java.awt.font.ShapeGraphicAttribute.draw(java.awt.Graphics2D, float, float)
java.awt.font.TextLayout.draw(java.awt.Graphics2D, float, float)
java.awt.Graphics2D.draw(java.awt.Shape)


Occurences of draw3DRect

draw3DRect occurences:
java.awt.Graphics.draw3DRect(int, int, int, int, boolean)
java.awt.Graphics2D.draw3DRect(int, int, int, int, boolean)
javax.swing.DebugGraphics.draw3DRect(int, int, int, int, boolean)


Occurences of drawArc

drawArc occurences:
java.awt.Graphics.drawArc(int, int, int, int, int, int)
javax.swing.DebugGraphics.drawArc(int, int, int, int, int, int)


Occurences of drawBytes

drawBytes occurences:
java.awt.Graphics.drawBytes(byte:A, int, int, int, int)
javax.swing.DebugGraphics.drawBytes(byte:A, int, int, int, int)


Occurences of drawCentered

drawCentered occurences:
javax.swing.plaf.basic.BasicTreeUI.drawCentered(java.awt.Component, java.awt.Graphics, javax.swing.Icon, int, int)
javax.swing.plaf.synth.SynthTreeUI.drawCentered(java.awt.Component, java.awt.Graphics, javax.swing.Icon, int, int)


Occurences of drawChars

drawChars occurences:
java.awt.Graphics.drawChars(char:A, int, int, int, int)
javax.swing.DebugGraphics.drawChars(char:A, int, int, int, int)


Occurences of drawImage

drawImage occurences:
java.awt.Graphics.drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)
java.awt.Graphics.drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.image.ImageObserver)
java.awt.Graphics.drawImage(java.awt.Image, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)
java.awt.Graphics.drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver)
java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.Color, java.awt.image.ImageObserver)
java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
java.awt.Graphics2D.drawImage(java.awt.Image, java.awt.geom.AffineTransform, java.awt.image.ImageObserver)
java.awt.Graphics2D.drawImage(java.awt.image.BufferedImage, java.awt.image.BufferedImageOp, int, int)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.image.ImageObserver)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, java.awt.Color, java.awt.image.ImageObserver)
javax.swing.DebugGraphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)


Occurences of drawLine

drawLine occurences:
java.awt.Graphics.drawLine(int, int, int, int)
javax.swing.DebugGraphics.drawLine(int, int, int, int)
javax.swing.plaf.synth.SynthGraphicsUtils.drawLine(javax.swing.plaf.synth.SynthContext, java.lang.Object, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthGraphicsUtils.drawLine(javax.swing.plaf.synth.SynthContext, java.lang.Object, java.awt.Graphics, int, int, int, int, java.lang.Object)
javax.swing.text.PlainView.drawLine(int, java.awt.Graphics, int, int)
javax.swing.text.WrappedPlainView.drawLine(int, int, java.awt.Graphics, int, int)


Occurences of drawOval

drawOval occurences:
java.awt.Graphics.drawOval(int, int, int, int)
javax.swing.DebugGraphics.drawOval(int, int, int, int)


Occurences of drawPolygon

drawPolygon occurences:
java.awt.Graphics.drawPolygon(int:A, int:A, int)
java.awt.Graphics.drawPolygon(java.awt.Polygon)
javax.swing.DebugGraphics.drawPolygon(int:A, int:A, int)


Occurences of drawPolyline

drawPolyline occurences:
java.awt.Graphics.drawPolyline(int:A, int:A, int)
javax.swing.DebugGraphics.drawPolyline(int:A, int:A, int)


Occurences of drawRect

drawRect occurences:
java.awt.Graphics.drawRect(int, int, int, int)
javax.swing.DebugGraphics.drawRect(int, int, int, int)


Occurences of drawRoundRect

drawRoundRect occurences:
java.awt.Graphics.drawRoundRect(int, int, int, int, int, int)
javax.swing.DebugGraphics.drawRoundRect(int, int, int, int, int, int)


Occurences of drawSelectedText

drawSelectedText occurences:
javax.swing.text.PasswordView.drawSelectedText(java.awt.Graphics, int, int, int, int)
javax.swing.text.PlainView.drawSelectedText(java.awt.Graphics, int, int, int, int)
javax.swing.text.WrappedPlainView.drawSelectedText(java.awt.Graphics, int, int, int, int)


Occurences of drawString

drawString occurences:
java.awt.Graphics.drawString(java.lang.String, int, int)
java.awt.Graphics.drawString(java.text.AttributedCharacterIterator, int, int)
java.awt.Graphics2D.drawString(java.lang.String, float, float)
java.awt.Graphics2D.drawString(java.lang.String, int, int)
java.awt.Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
java.awt.Graphics2D.drawString(java.text.AttributedCharacterIterator, int, int)
javax.swing.DebugGraphics.drawString(java.lang.String, int, int)
javax.swing.DebugGraphics.drawString(java.text.AttributedCharacterIterator, int, int)
javax.swing.plaf.basic.BasicGraphicsUtils.drawString(java.awt.Graphics, java.lang.String, int, int, int)


Occurences of drawUnselectedText

drawUnselectedText occurences:
javax.swing.text.PasswordView.drawUnselectedText(java.awt.Graphics, int, int, int, int)
javax.swing.text.PlainView.drawUnselectedText(java.awt.Graphics, int, int, int, int)
javax.swing.text.WrappedPlainView.drawUnselectedText(java.awt.Graphics, int, int, int, int)


Occurences of drop

drop occurences:
java.awt.dnd.DropTarget.drop(java.awt.dnd.DropTargetDropEvent)
java.awt.dnd.DropTargetListener.drop(java.awt.dnd.DropTargetDropEvent)
java.nio.channels.MembershipKey.drop()


Occurences of dropActionChanged

dropActionChanged occurences:
java.awt.dnd.DragSourceAdapter.dropActionChanged(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceContext.dropActionChanged(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DragSourceListener.dropActionChanged(java.awt.dnd.DragSourceDragEvent)
java.awt.dnd.DropTarget.dropActionChanged(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetAdapter.dropActionChanged(java.awt.dnd.DropTargetDragEvent)
java.awt.dnd.DropTargetListener.dropActionChanged(java.awt.dnd.DropTargetDragEvent)


Occurences of dropArguments

dropArguments occurences:
java.lang.invoke.MethodHandles.dropArguments(java.lang.invoke.MethodHandle, int, java.lang.Class...)
java.lang.invoke.MethodHandles.dropArguments(java.lang.invoke.MethodHandle, int, java.util.List)


Occurences of dropComplete

dropComplete occurences:
java.awt.dnd.DropTargetContext.dropComplete(boolean)
java.awt.dnd.DropTargetDropEvent.dropComplete(boolean)


Occurences of DropTarget (constructors)

DropTarget (constructors) occurences:
java.awt.dnd.DropTarget()
java.awt.dnd.DropTarget(java.awt.Component, int, java.awt.dnd.DropTargetListener)
java.awt.dnd.DropTarget(java.awt.Component, int, java.awt.dnd.DropTargetListener, boolean)
java.awt.dnd.DropTarget(java.awt.Component, int, java.awt.dnd.DropTargetListener, boolean, java.awt.datatransfer.FlavorMap)
java.awt.dnd.DropTarget(java.awt.Component, java.awt.dnd.DropTargetListener)


Occurences of DropTargetDropEvent (constructors)

DropTargetDropEvent (constructors) occurences:
java.awt.dnd.DropTargetDropEvent(java.awt.dnd.DropTargetContext, java.awt.Point, int, int)
java.awt.dnd.DropTargetDropEvent(java.awt.dnd.DropTargetContext, java.awt.Point, int, int, boolean)


Occurences of DSAGenParameterSpec (constructors)

DSAGenParameterSpec (constructors) occurences:
java.security.spec.DSAGenParameterSpec(int, int)
java.security.spec.DSAGenParameterSpec(int, int, int)


Occurences of dsig

dsig occurences:
compact3.javax.xml.crypto.dsig
javax.xml.crypto.dsig


Occurences of DTD

DTD occurences:
javax.swing.text.html.parser.DTD
javax.xml.stream.DTD
javax.xml.stream.events.DTD


Occurences of dump

dump occurences:
javax.swing.text.AbstractDocument.dump(java.io.PrintStream)
javax.swing.text.AbstractDocument.AbstractElement.dump(java.io.PrintStream, int)


Occurences of duplicate

duplicate occurences:
java.nio.ByteBuffer.duplicate()
java.nio.CharBuffer.duplicate()
java.nio.DoubleBuffer.duplicate()
java.nio.FloatBuffer.duplicate()
java.nio.IntBuffer.duplicate()
java.nio.LongBuffer.duplicate()
java.nio.ShortBuffer.duplicate()
org.omg.CORBA.portable.Delegate.duplicate(org.omg.CORBA.Object)


Occurences of DuplicateName (constructors)

DuplicateName (constructors) occurences:
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName()
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName(java.lang.String)
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName(java.lang.String, java.lang.String)


Occurences of DuplicateRequestException (constructors)

DuplicateRequestException (constructors) occurences:
com.sun.jdi.request.DuplicateRequestException()
com.sun.jdi.request.DuplicateRequestException(java.lang.String)


Occurences of Duration

Duration occurences:
java.time.Duration
javax.xml.datatype.Duration


Occurences of DynamicImplementation

DynamicImplementation occurences:
org.omg.CORBA.DynamicImplementation
org.omg.PortableServer.DynamicImplementation


Occurences of DynamicImplementation (constructors)

DynamicImplementation (constructors) occurences:
org.omg.CORBA.DynamicImplementation()
org.omg.PortableServer.DynamicImplementation()


Occurences of dynamicInvoker

dynamicInvoker occurences:
java.lang.invoke.CallSite.dynamicInvoker()
java.lang.invoke.ConstantCallSite.dynamicInvoker()
java.lang.invoke.MutableCallSite.dynamicInvoker()
java.lang.invoke.VolatileCallSite.dynamicInvoker()


Occurences of DynAny

DynAny occurences:
org.omg.CORBA.DynAny
org.omg.DynamicAny.DynAny


Occurences of DynAnyPackage

DynAnyPackage occurences:
org.omg.CORBA.DynAnyPackage
org.omg.DynamicAny.DynAnyPackage


Occurences of DynArray

DynArray occurences:
org.omg.CORBA.DynArray
org.omg.DynamicAny.DynArray


Occurences of DynEnum

DynEnum occurences:
org.omg.CORBA.DynEnum
org.omg.DynamicAny.DynEnum


Occurences of DynFixed

DynFixed occurences:
org.omg.CORBA.DynFixed
org.omg.DynamicAny.DynFixed


Occurences of DynSequence

DynSequence occurences:
org.omg.CORBA.DynSequence
org.omg.DynamicAny.DynSequence


Occurences of DynStruct

DynStruct occurences:
org.omg.CORBA.DynStruct
org.omg.DynamicAny.DynStruct


Occurences of DynUnion

DynUnion occurences:
org.omg.CORBA.DynUnion
org.omg.DynamicAny.DynUnion


Occurences of DynValue

DynValue occurences:
org.omg.CORBA.DynValue
org.omg.DynamicAny.DynValue


Occurences of E

E occurences:
java.awt.E
java.lang.E
java.lang.E
javax.print.attribute.standard.E
javax.print.attribute.standard.E


Occurences of EAST

EAST occurences:
java.awt.EAST
java.awt.EAST
javax.swing.EAST
javax.swing.EAST


Occurences of EASTERN_ARABIC

EASTERN_ARABIC occurences:
java.awt.font.EASTERN_ARABIC
java.awt.font.EASTERN_ARABIC


Occurences of ECFieldF2m (constructors)

ECFieldF2m (constructors) occurences:
java.security.spec.ECFieldF2m(int)
java.security.spec.ECFieldF2m(int, int:A)
java.security.spec.ECFieldF2m(int, java.math.BigInteger)


Occurences of echoCharIsSet

echoCharIsSet occurences:
java.awt.TextField.echoCharIsSet()
javax.swing.JPasswordField.echoCharIsSet()


Occurences of editCellAt

editCellAt occurences:
javax.swing.JTable.editCellAt(int, int)
javax.swing.JTable.editCellAt(int, int, java.util.EventObject)


Occurences of editingCanceled

editingCanceled occurences:
javax.swing.event.CellEditorListener.editingCanceled(javax.swing.event.ChangeEvent)
javax.swing.JTable.editingCanceled(javax.swing.event.ChangeEvent)
javax.swing.JTable.AccessibleJTable.editingCanceled(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler.editingCanceled(javax.swing.event.ChangeEvent)


Occurences of editingComponent

editingComponent occurences:
javax.swing.plaf.basic.editingComponent
javax.swing.tree.editingComponent


Occurences of editingRow

editingRow occurences:
javax.swing.editingRow
javax.swing.plaf.basic.editingRow


Occurences of editingStopped

editingStopped occurences:
javax.swing.event.CellEditorListener.editingStopped(javax.swing.event.ChangeEvent)
javax.swing.JTable.editingStopped(javax.swing.event.ChangeEvent)
javax.swing.JTable.AccessibleJTable.editingStopped(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler.editingStopped(javax.swing.event.ChangeEvent)


Occurences of editor

editor occurences:
javax.swing.editor
javax.swing.plaf.basic.editor
javax.swing.plaf.basic.editor


Occurences of editorBorderInsets

editorBorderInsets occurences:
javax.swing.plaf.metal.editorBorderInsets
javax.swing.plaf.metal.editorBorderInsets


Occurences of EditorContainer

EditorContainer occurences:
javax.swing.tree.DefaultTreeCellEditor.EditorContainer.EditorContainer()
javax.swing.tree.DefaultTreeCellEditor.EditorContainer.EditorContainer()


Occurences of EGYPTIAN_HIEROGLYPHS

EGYPTIAN_HIEROGLYPHS occurences:
java.lang.EGYPTIAN_HIEROGLYPHS
java.lang.EGYPTIAN_HIEROGLYPHS


Occurences of Element

Element occurences:
javax.lang.model.element.Element
javax.swing.text.Element
javax.swing.text.html.parser.Element
javax.xml.bind.Element
org.w3c.dom.Element


Occurences of element

element occurences:
com.sun.javadoc.AnnotationDesc.ElementValuePair.element()
compact3.javax.lang.model.element
java.lang.annotation.AnnotationTypeMismatchException.element()
java.util.AbstractQueue.element()
java.util.ArrayDeque.element()
java.util.concurrent.BlockingDeque.element()
java.util.concurrent.ConcurrentLinkedDeque.element()
java.util.concurrent.LinkedBlockingDeque.element()
java.util.Deque.element()
java.util.LinkedList.element()
java.util.Queue.element()
javax.lang.model.element
javax.swing.text.element
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.element(org.w3c.dom.Element)


Occurences of elementAt

elementAt occurences:
java.util.Vector.elementAt(int)
javax.swing.DefaultListModel.elementAt(int)


Occurences of elementCount

elementCount occurences:
java.util.elementCount
javax.management.monitor.elementCount


Occurences of elementDecl

elementDecl occurences:
org.xml.sax.ext.DeclHandler.elementDecl(java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.elementDecl(java.lang.String, java.lang.String)


Occurences of ElementIterator (constructors)

ElementIterator (constructors) occurences:
javax.swing.text.ElementIterator(javax.swing.text.Document)
javax.swing.text.ElementIterator(javax.swing.text.Element)


Occurences of ElementKindVisitor6 (constructors)

ElementKindVisitor6 (constructors) occurences:
javax.lang.model.util.ElementKindVisitor6()
javax.lang.model.util.ElementKindVisitor6(java.lang.Object)
javax.lang.model.util.ElementKindVisitor6(R)


Occurences of ElementKindVisitor7 (constructors)

ElementKindVisitor7 (constructors) occurences:
javax.lang.model.util.ElementKindVisitor7()
javax.lang.model.util.ElementKindVisitor7(java.lang.Object)
javax.lang.model.util.ElementKindVisitor7(R)


Occurences of ElementKindVisitor8 (constructors)

ElementKindVisitor8 (constructors) occurences:
javax.lang.model.util.ElementKindVisitor8()
javax.lang.model.util.ElementKindVisitor8(java.lang.Object)
javax.lang.model.util.ElementKindVisitor8(R)


Occurences of elements

elements occurences:
com.sun.javadoc.AnnotationTypeDoc.elements()
java.security.PermissionCollection.elements()
java.security.Permissions.elements()
java.security.Provider.elements()
java.util.concurrent.ConcurrentHashMap.elements()
java.util.Dictionary.elements()
java.util.Hashtable.elements()
java.util.Vector.elements()
javax.swing.DefaultListModel.elements()
javax.swing.text.html.parser.elements


Occurences of ElementScanner6 (constructors)

ElementScanner6 (constructors) occurences:
javax.lang.model.util.ElementScanner6()
javax.lang.model.util.ElementScanner6(java.lang.Object)
javax.lang.model.util.ElementScanner6(R)


Occurences of ElementScanner7 (constructors)

ElementScanner7 (constructors) occurences:
javax.lang.model.util.ElementScanner7()
javax.lang.model.util.ElementScanner7(java.lang.Object)
javax.lang.model.util.ElementScanner7(R)


Occurences of ElementScanner8 (constructors)

ElementScanner8 (constructors) occurences:
javax.lang.model.util.ElementScanner8()
javax.lang.model.util.ElementScanner8(java.lang.Object)
javax.lang.model.util.ElementScanner8(R)


Occurences of ElementSpec

ElementSpec occurences:
javax.swing.text.DefaultStyledDocument.ElementSpec.ElementSpec(javax.swing.text.AttributeSet, short)
javax.swing.text.DefaultStyledDocument.ElementSpec.ElementSpec(javax.swing.text.AttributeSet, short, char:A, int, int)
javax.swing.text.DefaultStyledDocument.ElementSpec.ElementSpec(javax.swing.text.AttributeSet, short, int)


Occurences of EllipticCurve (constructors)

EllipticCurve (constructors) occurences:
java.security.spec.EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger)
java.security.spec.EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger, byte:A)


Occurences of empty

empty occurences:
java.util.Optional.empty()
java.util.OptionalDouble.empty()
java.util.OptionalInt.empty()
java.util.OptionalLong.empty()
java.util.Stack.empty()
java.util.stream.DoubleStream.empty()
java.util.stream.IntStream.empty()
java.util.stream.LongStream.empty()
java.util.stream.Stream.empty()
javax.swing.text.html.parser.ContentModel.empty()


Occurences of EMPTY

EMPTY occurences:
com.sun.source.doctree.EMPTY
javax.swing.text.EMPTY
javax.swing.text.html.parser.EMPTY


Occurences of EmptyBorder (constructors)

EmptyBorder (constructors) occurences:
javax.swing.border.EmptyBorder(int, int, int, int)
javax.swing.border.EmptyBorder(java.awt.Insets)


Occurences of EmptyBorderUIResource

EmptyBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.EmptyBorderUIResource.EmptyBorderUIResource(int, int, int, int)
javax.swing.plaf.BorderUIResource.EmptyBorderUIResource.EmptyBorderUIResource(java.awt.Insets)


Occurences of enable

enable occurences:
com.sun.jdi.request.EventRequest.enable()
java.awt.Component.enable()
java.awt.Component.enable(boolean)
java.awt.MenuItem.enable()
java.awt.MenuItem.enable(boolean)
java.lang.Compiler.enable()
javax.swing.JComponent.enable()


Occurences of ENABLED

ENABLED occurences:
javax.accessibility.ENABLED
javax.swing.ENABLED
javax.swing.plaf.synth.ENABLED


Occurences of enabled

enabled occurences:
javax.swing.enabled
javax.xml.ws.enabled
javax.xml.ws.RespectBinding.enabled()
javax.xml.ws.soap.Addressing.enabled()
javax.xml.ws.soap.MTOM.enabled()


Occurences of enableEvents

enableEvents occurences:
java.awt.Component.enableEvents(long)
java.awt.MenuItem.enableEvents(long)


Occurences of enableInputMethods

enableInputMethods occurences:
java.awt.Component.enableInputMethods(boolean)
java.awt.TextComponent.enableInputMethods(boolean)


Occurences of encode

encode occurences:
java.net.encode
java.net.URLEncoder.encode(java.lang.String)
java.net.URLEncoder.encode(java.lang.String, java.lang.String)
java.nio.charset.Charset.encode(java.lang.String)
java.nio.charset.Charset.encode(java.nio.CharBuffer)
java.nio.charset.CharsetEncoder.encode(java.nio.CharBuffer)
java.nio.charset.CharsetEncoder.encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean)
java.security.cert.Extension.encode(java.io.OutputStream)
java.security.Certificate.encode(java.io.OutputStream)
java.util.Base64.Encoder.encode(byte:A)
java.util.Base64.Encoder.encode(byte:A, byte:A)
java.util.Base64.Encoder.encode(java.nio.ByteBuffer)
org.omg.IOP.CodecOperations.encode(org.omg.CORBA.Any)


Occurences of Encoding

Encoding occurences:
javax.sound.sampled.AudioFormat.Encoding.Encoding(java.lang.String)
org.omg.IOP.Encoding


Occurences of Encoding (constructors)

Encoding (constructors) occurences:
org.omg.IOP.Encoding()
org.omg.IOP.Encoding(short, byte, byte)


Occurences of EncryptedPrivateKeyInfo (constructors)

EncryptedPrivateKeyInfo (constructors) occurences:
javax.crypto.EncryptedPrivateKeyInfo(byte:A)
javax.crypto.EncryptedPrivateKeyInfo(java.lang.String, byte:A)
javax.crypto.EncryptedPrivateKeyInfo(java.security.AlgorithmParameters, byte:A)


Occurences of end

end occurences:
java.awt.PrintJob.end()
java.nio.channels.spi.AbstractInterruptibleChannel.end(boolean)
java.nio.channels.spi.AbstractSelector.end()
java.util.regex.Matcher.end()
java.util.regex.Matcher.end(int)
java.util.regex.Matcher.end(java.lang.String)
java.util.regex.MatchResult.end()
java.util.regex.MatchResult.end(int)
java.util.zip.Deflater.end()
java.util.zip.Inflater.end()
javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.FormAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.PreAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLDocument.HTMLReader.TagAction.end(javax.swing.text.html.HTML.Tag)
javax.swing.undo.CompoundEdit.end()
javax.swing.undo.StateEdit.end()
javax.swing.undo.UndoManager.end()
javax.transaction.xa.XAResource.end(javax.transaction.xa.Xid, int)


Occurences of endCDATA

endCDATA occurences:
org.xml.sax.ext.DefaultHandler2.endCDATA()
org.xml.sax.ext.LexicalHandler.endCDATA()


Occurences of ENDCOM

ENDCOM occurences:
java.util.jar.ENDCOM
java.util.jar.ENDCOM
java.util.jar.ENDCOM
java.util.jar.ENDCOM
java.util.zip.ENDCOM
java.util.zip.ENDCOM
java.util.zip.ENDCOM
java.util.zip.ENDCOM


Occurences of endComposition

endComposition occurences:
java.awt.im.InputContext.endComposition()
java.awt.im.spi.InputMethod.endComposition()


Occurences of endDocument

endDocument occurences:
org.xml.sax.ContentHandler.endDocument()
org.xml.sax.DocumentHandler.endDocument()
org.xml.sax.HandlerBase.endDocument()
org.xml.sax.helpers.DefaultHandler.endDocument()
org.xml.sax.helpers.ParserAdapter.endDocument()
org.xml.sax.helpers.XMLFilterImpl.endDocument()
org.xml.sax.helpers.XMLReaderAdapter.endDocument()


Occurences of endDraggingFrame

endDraggingFrame occurences:
javax.swing.DefaultDesktopManager.endDraggingFrame(javax.swing.JComponent)
javax.swing.DesktopManager.endDraggingFrame(javax.swing.JComponent)


Occurences of endDTD

endDTD occurences:
org.xml.sax.ext.DefaultHandler2.endDTD()
org.xml.sax.ext.LexicalHandler.endDTD()


Occurences of endElement

endElement occurences:
org.xml.sax.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.DocumentHandler.endElement(java.lang.String)
org.xml.sax.HandlerBase.endElement(java.lang.String)
org.xml.sax.helpers.DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.ParserAdapter.endElement(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.endElement(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.endElement(java.lang.String, java.lang.String, java.lang.String)


Occurences of endEntity

endEntity occurences:
org.xml.sax.ext.DefaultHandler2.endEntity(java.lang.String)
org.xml.sax.ext.LexicalHandler.endEntity(java.lang.String)


Occurences of ENDHDR

ENDHDR occurences:
java.util.jar.ENDHDR
java.util.jar.ENDHDR
java.util.jar.ENDHDR
java.util.jar.ENDHDR
java.util.zip.ENDHDR
java.util.zip.ENDHDR
java.util.zip.ENDHDR
java.util.zip.ENDHDR


Occurences of endIndex

endIndex occurences:
javax.accessibility.endIndex
javax.accessibility.endIndex


Occurences of ENDOFF

ENDOFF occurences:
java.util.jar.ENDOFF
java.util.jar.ENDOFF
java.util.jar.ENDOFF
java.util.jar.ENDOFF
java.util.zip.ENDOFF
java.util.zip.ENDOFF
java.util.zip.ENDOFF
java.util.zip.ENDOFF


Occurences of endPrefixMapping

endPrefixMapping occurences:
org.xml.sax.ContentHandler.endPrefixMapping(java.lang.String)
org.xml.sax.helpers.DefaultHandler.endPrefixMapping(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.endPrefixMapping(java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.endPrefixMapping(java.lang.String)


Occurences of endResizingFrame

endResizingFrame occurences:
javax.swing.DefaultDesktopManager.endResizingFrame(javax.swing.JComponent)
javax.swing.DesktopManager.endResizingFrame(javax.swing.JComponent)


Occurences of ENDSIG

ENDSIG occurences:
java.util.jar.ENDSIG
java.util.jar.ENDSIG
java.util.jar.ENDSIG
java.util.jar.ENDSIG
java.util.zip.ENDSIG
java.util.zip.ENDSIG
java.util.zip.ENDSIG
java.util.zip.ENDSIG


Occurences of ENDSIZ

ENDSIZ occurences:
java.util.jar.ENDSIZ
java.util.jar.ENDSIZ
java.util.jar.ENDSIZ
java.util.jar.ENDSIZ
java.util.zip.ENDSIZ
java.util.zip.ENDSIZ
java.util.zip.ENDSIZ
java.util.zip.ENDSIZ


Occurences of ENDSUB

ENDSUB occurences:
java.util.jar.ENDSUB
java.util.jar.ENDSUB
java.util.jar.ENDSUB
java.util.jar.ENDSUB
java.util.zip.ENDSUB
java.util.zip.ENDSUB
java.util.zip.ENDSUB
java.util.zip.ENDSUB


Occurences of endsWith

endsWith occurences:
java.lang.String.endsWith(java.lang.String)
java.nio.file.Path.endsWith(java.lang.String)
java.nio.file.Path.endsWith(java.nio.file.Path)
javax.naming.CompositeName.endsWith(javax.naming.Name)
javax.naming.CompoundName.endsWith(javax.naming.Name)
javax.naming.ldap.LdapName.endsWith(java.util.List)
javax.naming.ldap.LdapName.endsWith(javax.naming.Name)
javax.naming.Name.endsWith(javax.naming.Name)


Occurences of endTag

endTag occurences:
javax.swing.text.html.HTMLWriter.endTag(javax.swing.text.Element)
javax.swing.text.html.parser.Parser.endTag(boolean)


Occurences of ENDTAG

ENDTAG occurences:
javax.swing.text.html.ENDTAG
javax.swing.text.html.parser.ENDTAG


Occurences of ENDTOT

ENDTOT occurences:
java.util.jar.ENDTOT
java.util.jar.ENDTOT
java.util.jar.ENDTOT
java.util.jar.ENDTOT
java.util.zip.ENDTOT
java.util.zip.ENDTOT
java.util.zip.ENDTOT
java.util.zip.ENDTOT


Occurences of END_ELEMENT

END_ELEMENT occurences:
com.sun.source.doctree.END_ELEMENT
javax.xml.stream.END_ELEMENT


Occurences of end_value

end_value occurences:
org.omg.CORBA.portable.ValueInputStream.end_value()
org.omg.CORBA.portable.ValueOutputStream.end_value()


Occurences of engineCreateSSLEngine

engineCreateSSLEngine occurences:
javax.net.ssl.SSLContextSpi.engineCreateSSLEngine()
javax.net.ssl.SSLContextSpi.engineCreateSSLEngine(java.lang.String, int)


Occurences of engineDigest

engineDigest occurences:
java.security.MessageDigestSpi.engineDigest()
java.security.MessageDigestSpi.engineDigest(byte:A, int, int)


Occurences of engineDoFinal

engineDoFinal occurences:
javax.crypto.CipherSpi.engineDoFinal(byte:A, int, int)
javax.crypto.CipherSpi.engineDoFinal(byte:A, int, int, byte:A, int)
javax.crypto.CipherSpi.engineDoFinal(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.crypto.MacSpi.engineDoFinal()


Occurences of engineGenerateCertPath

engineGenerateCertPath occurences:
java.security.cert.CertificateFactorySpi.engineGenerateCertPath(java.io.InputStream)
java.security.cert.CertificateFactorySpi.engineGenerateCertPath(java.io.InputStream, java.lang.String)
java.security.cert.CertificateFactorySpi.engineGenerateCertPath(java.util.List)


Occurences of engineGenerateSecret

engineGenerateSecret occurences:
javax.crypto.KeyAgreementSpi.engineGenerateSecret()
javax.crypto.KeyAgreementSpi.engineGenerateSecret(byte:A, int)
javax.crypto.KeyAgreementSpi.engineGenerateSecret(java.lang.String)
javax.crypto.SecretKeyFactorySpi.engineGenerateSecret(java.security.spec.KeySpec)


Occurences of engineGenExemptionBlob

engineGenExemptionBlob occurences:
javax.crypto.ExemptionMechanismSpi.engineGenExemptionBlob()
javax.crypto.ExemptionMechanismSpi.engineGenExemptionBlob(byte:A, int)


Occurences of engineGetEncoded

engineGetEncoded occurences:
java.security.AlgorithmParametersSpi.engineGetEncoded()
java.security.AlgorithmParametersSpi.engineGetEncoded(java.lang.String)


Occurences of engineGetKeySpec

engineGetKeySpec occurences:
java.security.KeyFactorySpi.engineGetKeySpec(java.security.Key, java.lang.Class)
javax.crypto.SecretKeyFactorySpi.engineGetKeySpec(javax.crypto.SecretKey, java.lang.Class)


Occurences of engineGetOutputSize

engineGetOutputSize occurences:
javax.crypto.CipherSpi.engineGetOutputSize(int)
javax.crypto.ExemptionMechanismSpi.engineGetOutputSize(int)


Occurences of engineGetParameters

engineGetParameters occurences:
java.security.SignatureSpi.engineGetParameters()
javax.crypto.CipherSpi.engineGetParameters()


Occurences of engineGetPermissions

engineGetPermissions occurences:
java.security.PolicySpi.engineGetPermissions(java.security.CodeSource)
java.security.PolicySpi.engineGetPermissions(java.security.ProtectionDomain)


Occurences of engineGetRevocationChecker

engineGetRevocationChecker occurences:
java.security.cert.CertPathBuilderSpi.engineGetRevocationChecker()
java.security.cert.CertPathValidatorSpi.engineGetRevocationChecker()


Occurences of engineInit

engineInit occurences:
java.security.AlgorithmParameterGeneratorSpi.engineInit(int, java.security.SecureRandom)
java.security.AlgorithmParameterGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
java.security.AlgorithmParametersSpi.engineInit(byte:A)
java.security.AlgorithmParametersSpi.engineInit(byte:A, java.lang.String)
java.security.AlgorithmParametersSpi.engineInit(java.security.spec.AlgorithmParameterSpec)
javax.crypto.CipherSpi.engineInit(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom)
javax.crypto.CipherSpi.engineInit(int, java.security.Key, java.security.SecureRandom)
javax.crypto.CipherSpi.engineInit(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.ExemptionMechanismSpi.engineInit(java.security.Key)
javax.crypto.ExemptionMechanismSpi.engineInit(java.security.Key, java.security.AlgorithmParameters)
javax.crypto.ExemptionMechanismSpi.engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.crypto.KeyAgreementSpi.engineInit(java.security.Key, java.security.SecureRandom)
javax.crypto.KeyAgreementSpi.engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.KeyGeneratorSpi.engineInit(int, java.security.SecureRandom)
javax.crypto.KeyGeneratorSpi.engineInit(java.security.SecureRandom)
javax.crypto.KeyGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.MacSpi.engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.net.ssl.KeyManagerFactorySpi.engineInit(java.security.KeyStore, char:A)
javax.net.ssl.KeyManagerFactorySpi.engineInit(javax.net.ssl.ManagerFactoryParameters)
javax.net.ssl.SSLContextSpi.engineInit(javax.net.ssl.KeyManager:A, javax.net.ssl.TrustManager:A, java.security.SecureRandom)
javax.net.ssl.TrustManagerFactorySpi.engineInit(java.security.KeyStore)
javax.net.ssl.TrustManagerFactorySpi.engineInit(javax.net.ssl.ManagerFactoryParameters)


Occurences of engineInitSign

engineInitSign occurences:
java.security.SignatureSpi.engineInitSign(java.security.PrivateKey)
java.security.SignatureSpi.engineInitSign(java.security.PrivateKey, java.security.SecureRandom)


Occurences of engineLoad

engineLoad occurences:
java.security.KeyStoreSpi.engineLoad(java.io.InputStream, char:A)
java.security.KeyStoreSpi.engineLoad(java.security.KeyStore.LoadStoreParameter)


Occurences of engineRefresh

engineRefresh occurences:
java.security.PolicySpi.engineRefresh()
javax.security.auth.login.ConfigurationSpi.engineRefresh()


Occurences of engineReset

engineReset occurences:
java.security.MessageDigestSpi.engineReset()
javax.crypto.MacSpi.engineReset()


Occurences of engineSetKeyEntry

engineSetKeyEntry occurences:
java.security.KeyStoreSpi.engineSetKeyEntry(java.lang.String, byte:A, java.security.cert.Certificate:A)
java.security.KeyStoreSpi.engineSetKeyEntry(java.lang.String, java.security.Key, char:A, java.security.cert.Certificate:A)


Occurences of engineSetParameter

engineSetParameter occurences:
java.security.SignatureSpi.engineSetParameter(java.lang.String, java.lang.Object)
java.security.SignatureSpi.engineSetParameter(java.security.spec.AlgorithmParameterSpec)


Occurences of engineSign

engineSign occurences:
java.security.SignatureSpi.engineSign()
java.security.SignatureSpi.engineSign(byte:A, int, int)


Occurences of engineStore

engineStore occurences:
java.security.KeyStoreSpi.engineStore(java.io.OutputStream, char:A)
java.security.KeyStoreSpi.engineStore(java.security.KeyStore.LoadStoreParameter)


Occurences of engineTranslateKey

engineTranslateKey occurences:
java.security.KeyFactorySpi.engineTranslateKey(java.security.Key)
javax.crypto.SecretKeyFactorySpi.engineTranslateKey(javax.crypto.SecretKey)


Occurences of engineUpdate

engineUpdate occurences:
java.security.MessageDigestSpi.engineUpdate(byte)
java.security.MessageDigestSpi.engineUpdate(byte:A, int, int)
java.security.MessageDigestSpi.engineUpdate(java.nio.ByteBuffer)
java.security.SignatureSpi.engineUpdate(byte)
java.security.SignatureSpi.engineUpdate(byte:A, int, int)
java.security.SignatureSpi.engineUpdate(java.nio.ByteBuffer)
javax.crypto.CipherSpi.engineUpdate(byte:A, int, int)
javax.crypto.CipherSpi.engineUpdate(byte:A, int, int, byte:A, int)
javax.crypto.CipherSpi.engineUpdate(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.crypto.MacSpi.engineUpdate(byte)
javax.crypto.MacSpi.engineUpdate(byte:A, int, int)
javax.crypto.MacSpi.engineUpdate(java.nio.ByteBuffer)


Occurences of engineUpdateAAD

engineUpdateAAD occurences:
javax.crypto.CipherSpi.engineUpdateAAD(byte:A, int, int)
javax.crypto.CipherSpi.engineUpdateAAD(java.nio.ByteBuffer)


Occurences of engineVerify

engineVerify occurences:
java.security.SignatureSpi.engineVerify(byte:A)
java.security.SignatureSpi.engineVerify(byte:A, int, int)


Occurences of Enhancements in the Java Platform

Enhancements in the Java Platform occurences:
Enhancements in the Java Platform
Enhancements in the Java Platform


Occurences of enqueueKeyEvents

enqueueKeyEvents occurences:
java.awt.DefaultKeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component)
java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component)


Occurences of ensureCapacity

ensureCapacity occurences:
java.lang.StringBuffer.ensureCapacity(int)
java.lang.StringBuilder.ensureCapacity(int)
java.util.ArrayList.ensureCapacity(int)
java.util.Vector.ensureCapacity(int)
javax.swing.DefaultListModel.ensureCapacity(int)


Occurences of ensureFileIsVisible

ensureFileIsVisible occurences:
javax.swing.JFileChooser.ensureFileIsVisible(java.io.File)
javax.swing.plaf.basic.BasicFileChooserUI.ensureFileIsVisible(javax.swing.JFileChooser, java.io.File)
javax.swing.plaf.FileChooserUI.ensureFileIsVisible(javax.swing.JFileChooser, java.io.File)
javax.swing.plaf.metal.MetalFileChooserUI.ensureFileIsVisible(javax.swing.JFileChooser, java.io.File)
javax.swing.plaf.multi.MultiFileChooserUI.ensureFileIsVisible(javax.swing.JFileChooser, java.io.File)


Occurences of ENTER

ENTER occurences:
com.sun.source.util.ENTER
java.awt.dnd.ENTER
java.awt.ENTER


Occurences of entering

entering occurences:
java.util.logging.Logger.entering(java.lang.String, java.lang.String)
java.util.logging.Logger.entering(java.lang.String, java.lang.String, java.lang.Object)
java.util.logging.Logger.entering(java.lang.String, java.lang.String, java.lang.Object:A)


Occurences of ENTITY

ENTITY occurences:
com.sun.source.doctree.ENTITY
javax.swing.text.html.parser.ENTITY


Occurences of Entity

Entity occurences:
javax.swing.text.html.parser.Entity
org.w3c.dom.Entity


Occurences of EntityReference

EntityReference occurences:
javax.xml.stream.events.EntityReference
org.w3c.dom.EntityReference


Occurences of entries

entries occurences:
java.security.acl.Acl.entries()
java.util.jar.JarFile.entries()
java.util.zip.ZipFile.entries()


Occurences of entrySet

entrySet occurences:
java.awt.RenderingHints.entrySet()
java.security.Provider.entrySet()
java.util.AbstractMap.entrySet()
java.util.concurrent.ConcurrentHashMap.entrySet()
java.util.concurrent.ConcurrentSkipListMap.entrySet()
java.util.EnumMap.entrySet()
java.util.HashMap.entrySet()
java.util.Hashtable.entrySet()
java.util.IdentityHashMap.entrySet()
java.util.jar.Attributes.entrySet()
java.util.LinkedHashMap.entrySet()
java.util.Map.entrySet()
java.util.SortedMap.entrySet()
java.util.TreeMap.entrySet()
java.util.WeakHashMap.entrySet()
javax.management.openmbean.TabularDataSupport.entrySet()
javax.script.SimpleBindings.entrySet()


Occurences of ENUM

ENUM occurences:
com.sun.source.tree.ENUM
javax.lang.model.element.ENUM


Occurences of enum.constant.detail

enum.constant.detail occurences:
com.sun.javadoc.enum.constant.detail
com.sun.source.doctree.enum.constant.detail
com.sun.source.doctree.enum.constant.detail
com.sun.source.tree.enum.constant.detail
com.sun.source.tree.enum.constant.detail
com.sun.source.tree.enum.constant.detail
com.sun.source.util.enum.constant.detail
com.sun.tools.jconsole.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.enum.constant.detail
java.awt.font.enum.constant.detail
java.lang.annotation.enum.constant.detail
java.lang.annotation.enum.constant.detail
java.lang.enum.constant.detail
java.lang.enum.constant.detail
java.lang.enum.constant.detail
java.lang.management.enum.constant.detail
java.math.enum.constant.detail
java.net.enum.constant.detail
java.net.enum.constant.detail
java.net.enum.constant.detail
java.nio.file.attribute.enum.constant.detail
java.nio.file.attribute.enum.constant.detail
java.nio.file.attribute.enum.constant.detail
java.nio.file.attribute.enum.constant.detail
java.nio.file.enum.constant.detail
java.nio.file.enum.constant.detail
java.nio.file.enum.constant.detail
java.nio.file.enum.constant.detail
java.nio.file.enum.constant.detail
java.nio.file.enum.constant.detail
java.security.cert.enum.constant.detail
java.security.cert.enum.constant.detail
java.security.cert.enum.constant.detail
java.security.cert.enum.constant.detail
java.security.enum.constant.detail
java.security.enum.constant.detail
java.sql.enum.constant.detail
java.sql.enum.constant.detail
java.sql.enum.constant.detail
java.sql.enum.constant.detail
java.text.enum.constant.detail
java.time.chrono.enum.constant.detail
java.time.chrono.enum.constant.detail
java.time.chrono.enum.constant.detail
java.time.chrono.enum.constant.detail
java.time.enum.constant.detail
java.time.enum.constant.detail
java.time.format.enum.constant.detail
java.time.format.enum.constant.detail
java.time.format.enum.constant.detail
java.time.format.enum.constant.detail
java.time.temporal.enum.constant.detail
java.time.temporal.enum.constant.detail
java.time.zone.enum.constant.detail
java.util.concurrent.enum.constant.detail
java.util.enum.constant.detail
java.util.enum.constant.detail
java.util.enum.constant.detail
java.util.stream.enum.constant.detail
javax.annotation.enum.constant.detail
javax.jws.enum.constant.detail
javax.jws.soap.enum.constant.detail
javax.jws.soap.enum.constant.detail
javax.jws.soap.enum.constant.detail
javax.lang.model.element.enum.constant.detail
javax.lang.model.element.enum.constant.detail
javax.lang.model.element.enum.constant.detail
javax.lang.model.enum.constant.detail
javax.lang.model.type.enum.constant.detail
javax.net.ssl.enum.constant.detail
javax.net.ssl.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.enum.constant.detail
javax.swing.event.enum.constant.detail
javax.swing.plaf.nimbus.enum.constant.detail
javax.swing.text.html.enum.constant.detail
javax.tools.enum.constant.detail
javax.tools.enum.constant.detail
javax.tools.enum.constant.detail
javax.tools.enum.constant.detail
javax.xml.bind.annotation.enum.constant.detail
javax.xml.bind.annotation.enum.constant.detail
javax.xml.bind.annotation.enum.constant.detail
javax.xml.ws.enum.constant.detail
javax.xml.ws.handler.enum.constant.detail
javax.xml.ws.soap.enum.constant.detail


Occurences of enum.constant.summary

enum.constant.summary occurences:
com.sun.javadoc.enum.constant.summary
com.sun.source.doctree.enum.constant.summary
com.sun.source.doctree.enum.constant.summary
com.sun.source.tree.enum.constant.summary
com.sun.source.tree.enum.constant.summary
com.sun.source.tree.enum.constant.summary
com.sun.source.util.enum.constant.summary
com.sun.tools.jconsole.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.enum.constant.summary
java.awt.font.enum.constant.summary
java.lang.annotation.enum.constant.summary
java.lang.annotation.enum.constant.summary
java.lang.enum.constant.summary
java.lang.enum.constant.summary
java.lang.enum.constant.summary
java.lang.management.enum.constant.summary
java.math.enum.constant.summary
java.net.enum.constant.summary
java.net.enum.constant.summary
java.net.enum.constant.summary
java.nio.file.attribute.enum.constant.summary
java.nio.file.attribute.enum.constant.summary
java.nio.file.attribute.enum.constant.summary
java.nio.file.attribute.enum.constant.summary
java.nio.file.enum.constant.summary
java.nio.file.enum.constant.summary
java.nio.file.enum.constant.summary
java.nio.file.enum.constant.summary
java.nio.file.enum.constant.summary
java.nio.file.enum.constant.summary
java.security.cert.enum.constant.summary
java.security.cert.enum.constant.summary
java.security.cert.enum.constant.summary
java.security.cert.enum.constant.summary
java.security.enum.constant.summary
java.security.enum.constant.summary
java.sql.enum.constant.summary
java.sql.enum.constant.summary
java.sql.enum.constant.summary
java.sql.enum.constant.summary
java.text.enum.constant.summary
java.time.chrono.enum.constant.summary
java.time.chrono.enum.constant.summary
java.time.chrono.enum.constant.summary
java.time.chrono.enum.constant.summary
java.time.enum.constant.summary
java.time.enum.constant.summary
java.time.format.enum.constant.summary
java.time.format.enum.constant.summary
java.time.format.enum.constant.summary
java.time.format.enum.constant.summary
java.time.temporal.enum.constant.summary
java.time.temporal.enum.constant.summary
java.time.zone.enum.constant.summary
java.util.concurrent.enum.constant.summary
java.util.enum.constant.summary
java.util.enum.constant.summary
java.util.enum.constant.summary
java.util.stream.enum.constant.summary
javax.annotation.enum.constant.summary
javax.jws.enum.constant.summary
javax.jws.soap.enum.constant.summary
javax.jws.soap.enum.constant.summary
javax.jws.soap.enum.constant.summary
javax.lang.model.element.enum.constant.summary
javax.lang.model.element.enum.constant.summary
javax.lang.model.element.enum.constant.summary
javax.lang.model.enum.constant.summary
javax.lang.model.type.enum.constant.summary
javax.net.ssl.enum.constant.summary
javax.net.ssl.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.enum.constant.summary
javax.swing.event.enum.constant.summary
javax.swing.plaf.nimbus.enum.constant.summary
javax.swing.text.html.enum.constant.summary
javax.tools.enum.constant.summary
javax.tools.enum.constant.summary
javax.tools.enum.constant.summary
javax.tools.enum.constant.summary
javax.xml.bind.annotation.enum.constant.summary
javax.xml.bind.annotation.enum.constant.summary
javax.xml.bind.annotation.enum.constant.summary
javax.xml.ws.enum.constant.summary
javax.xml.ws.handler.enum.constant.summary
javax.xml.ws.soap.enum.constant.summary


Occurences of enumerate

enumerate occurences:
java.lang.Thread.enumerate(java.lang.Thread:A)
java.lang.ThreadGroup.enumerate(java.lang.Thread:A)
java.lang.ThreadGroup.enumerate(java.lang.Thread:A, boolean)
java.lang.ThreadGroup.enumerate(java.lang.ThreadGroup:A)
java.lang.ThreadGroup.enumerate(java.lang.ThreadGroup:A, boolean)


Occurences of EnumMap (constructors)

EnumMap (constructors) occurences:
java.util.EnumMap(java.lang.Class)
java.util.EnumMap(java.util.EnumMap)
java.util.EnumMap(java.util.Map)


Occurences of environment

environment occurences:
java.lang.ProcessBuilder.environment()
javax.naming.environment


Occurences of EOFException (constructors)

EOFException (constructors) occurences:
java.io.EOFException()
java.io.EOFException(java.lang.String)


Occurences of EQUAL

EQUAL occurences:
javax.swing.EQUAL
javax.xml.datatype.EQUAL


Occurences of equal

equal occurences:
org.omg.CORBA.Any.equal(org.omg.CORBA.Any)
org.omg.CORBA.TypeCode.equal(org.omg.CORBA.TypeCode)
org.omg.DynamicAny.DynAnyOperations.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynAnyStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynArrayStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynEnumStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynFixedStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynSequenceStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynStructStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynUnionStub.equal(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynValueStub.equal(org.omg.DynamicAny.DynAny)


Occurences of equals

equals occurences:
com.sun.jdi.BooleanValue.equals(java.lang.Object)
com.sun.jdi.ByteValue.equals(java.lang.Object)
com.sun.jdi.CharValue.equals(java.lang.Object)
com.sun.jdi.DoubleValue.equals(java.lang.Object)
com.sun.jdi.Field.equals(java.lang.Object)
com.sun.jdi.FloatValue.equals(java.lang.Object)
com.sun.jdi.IntegerValue.equals(java.lang.Object)
com.sun.jdi.LocalVariable.equals(java.lang.Object)
com.sun.jdi.Location.equals(java.lang.Object)
com.sun.jdi.LongValue.equals(java.lang.Object)
com.sun.jdi.Method.equals(java.lang.Object)
com.sun.jdi.ObjectReference.equals(java.lang.Object)
com.sun.jdi.ReferenceType.equals(java.lang.Object)
com.sun.jdi.ShortValue.equals(java.lang.Object)
com.sun.jdi.VoidValue.equals(java.lang.Object)
com.sun.tools.attach.VirtualMachine.equals(java.lang.Object)
com.sun.tools.attach.VirtualMachineDescriptor.equals(java.lang.Object)
java.awt.AlphaComposite.equals(java.lang.Object)
java.awt.AWTKeyStroke.equals(java.lang.Object)
java.awt.BasicStroke.equals(java.lang.Object)
java.awt.Color.equals(java.lang.Object)
java.awt.datatransfer.DataFlavor.equals(java.awt.datatransfer.DataFlavor)
java.awt.datatransfer.DataFlavor.equals(java.lang.Object)
java.awt.datatransfer.DataFlavor.equals(java.lang.String)
java.awt.Dimension.equals(java.lang.Object)
java.awt.DisplayMode.equals(java.awt.DisplayMode)
java.awt.DisplayMode.equals(java.lang.Object)
java.awt.Font.equals(java.lang.Object)
java.awt.font.FontRenderContext.equals(java.awt.font.FontRenderContext)
java.awt.font.FontRenderContext.equals(java.lang.Object)
java.awt.font.GlyphVector.equals(java.awt.font.GlyphVector)
java.awt.font.ImageGraphicAttribute.equals(java.awt.font.ImageGraphicAttribute)
java.awt.font.ImageGraphicAttribute.equals(java.lang.Object)
java.awt.font.NumericShaper.equals(java.lang.Object)
java.awt.font.ShapeGraphicAttribute.equals(java.awt.font.ShapeGraphicAttribute)
java.awt.font.ShapeGraphicAttribute.equals(java.lang.Object)
java.awt.font.TextHitInfo.equals(java.awt.font.TextHitInfo)
java.awt.font.TextHitInfo.equals(java.lang.Object)
java.awt.font.TextLayout.equals(java.awt.font.TextLayout)
java.awt.font.TextLayout.equals(java.lang.Object)
java.awt.font.TransformAttribute.equals(java.lang.Object)
java.awt.geom.AffineTransform.equals(java.lang.Object)
java.awt.geom.Arc2D.equals(java.lang.Object)
java.awt.geom.Area.equals(java.awt.geom.Area)
java.awt.geom.Ellipse2D.equals(java.lang.Object)
java.awt.geom.Point2D.equals(java.lang.Object)
java.awt.geom.Rectangle2D.equals(java.lang.Object)
java.awt.geom.RoundRectangle2D.equals(java.lang.Object)
java.awt.image.ColorModel.equals(java.lang.Object)
java.awt.image.ComponentColorModel.equals(java.lang.Object)
java.awt.image.ComponentSampleModel.equals(java.lang.Object)
java.awt.image.MultiPixelPackedSampleModel.equals(java.lang.Object)
java.awt.image.PackedColorModel.equals(java.lang.Object)
java.awt.image.SinglePixelPackedSampleModel.equals(java.lang.Object)
java.awt.Insets.equals(java.lang.Object)
java.awt.JobAttributes.equals(java.lang.Object)
java.awt.MenuShortcut.equals(java.awt.MenuShortcut)
java.awt.MenuShortcut.equals(java.lang.Object)
java.awt.PageAttributes.equals(java.lang.Object)
java.awt.Point.equals(java.lang.Object)
java.awt.Rectangle.equals(java.lang.Object)
java.awt.RenderingHints.equals(java.lang.Object)
java.awt.RenderingHints.Key.equals(java.lang.Object)
java.beans.IndexedPropertyDescriptor.equals(java.lang.Object)
java.beans.PropertyDescriptor.equals(java.lang.Object)
java.io.File.equals(java.lang.Object)
java.io.FilePermission.equals(java.lang.Object)
java.lang.annotation.Annotation.equals(java.lang.Object)
java.lang.Boolean.equals(java.lang.Object)
java.lang.Byte.equals(java.lang.Object)
java.lang.Character.equals(java.lang.Object)
java.lang.Character.Subset.equals(java.lang.Object)
java.lang.Double.equals(java.lang.Object)
java.lang.Enum.equals(java.lang.Object)
java.lang.Float.equals(java.lang.Object)
java.lang.Integer.equals(java.lang.Object)
java.lang.invoke.MethodType.equals(java.lang.Object)
java.lang.Long.equals(java.lang.Object)
java.lang.Object.equals(java.lang.Object)
java.lang.ProcessBuilder.Redirect.equals(java.lang.Object)
java.lang.reflect.Constructor.equals(java.lang.Object)
java.lang.reflect.Field.equals(java.lang.Object)
java.lang.reflect.Method.equals(java.lang.Object)
java.lang.reflect.Parameter.equals(java.lang.Object)
java.lang.Short.equals(java.lang.Object)
java.lang.StackTraceElement.equals(java.lang.Object)
java.lang.String.equals(java.lang.Object)
java.math.BigDecimal.equals(java.lang.Object)
java.math.BigInteger.equals(java.lang.Object)
java.math.MathContext.equals(java.lang.Object)
java.net.HttpCookie.equals(java.lang.Object)
java.net.Inet4Address.equals(java.lang.Object)
java.net.Inet6Address.equals(java.lang.Object)
java.net.InetAddress.equals(java.lang.Object)
java.net.InetSocketAddress.equals(java.lang.Object)
java.net.InterfaceAddress.equals(java.lang.Object)
java.net.NetworkInterface.equals(java.lang.Object)
java.net.Proxy.equals(java.lang.Object)
java.net.SocketPermission.equals(java.lang.Object)
java.net.URI.equals(java.lang.Object)
java.net.URL.equals(java.lang.Object)
java.net.URLPermission.equals(java.lang.Object)
java.net.URLStreamHandler.equals(java.net.URL, java.net.URL)
java.nio.ByteBuffer.equals(java.lang.Object)
java.nio.CharBuffer.equals(java.lang.Object)
java.nio.charset.Charset.equals(java.lang.Object)
java.nio.DoubleBuffer.equals(java.lang.Object)
java.nio.file.attribute.AclEntry.equals(java.lang.Object)
java.nio.file.attribute.FileTime.equals(java.lang.Object)
java.nio.file.Path.equals(java.lang.Object)
java.nio.FloatBuffer.equals(java.lang.Object)
java.nio.IntBuffer.equals(java.lang.Object)
java.nio.LongBuffer.equals(java.lang.Object)
java.nio.ShortBuffer.equals(java.lang.Object)
java.rmi.activation.ActivationDesc.equals(java.lang.Object)
java.rmi.activation.ActivationGroupDesc.equals(java.lang.Object)
java.rmi.activation.ActivationGroupDesc.CommandEnvironment.equals(java.lang.Object)
java.rmi.activation.ActivationGroupID.equals(java.lang.Object)
java.rmi.activation.ActivationID.equals(java.lang.Object)
java.rmi.dgc.VMID.equals(java.lang.Object)
java.rmi.MarshalledObject.equals(java.lang.Object)
java.rmi.server.ObjID.equals(java.lang.Object)
java.rmi.server.RemoteObject.equals(java.lang.Object)
java.rmi.server.UID.equals(java.lang.Object)
java.security.AccessControlContext.equals(java.lang.Object)
java.security.acl.Permission.equals(java.lang.Object)
java.security.AllPermission.equals(java.lang.Object)
java.security.BasicPermission.equals(java.lang.Object)
java.security.cert.Certificate.equals(java.lang.Object)
java.security.cert.CertPath.equals(java.lang.Object)
java.security.cert.X509CRL.equals(java.lang.Object)
java.security.cert.X509CRLEntry.equals(java.lang.Object)
java.security.CodeSigner.equals(java.lang.Object)
java.security.CodeSource.equals(java.lang.Object)
java.security.Identity.equals(java.lang.Object)
java.security.Permission.equals(java.lang.Object)
java.security.PKCS12Attribute.equals(java.lang.Object)
java.security.Principal.equals(java.lang.Object)
java.security.spec.ECFieldF2m.equals(java.lang.Object)
java.security.spec.ECFieldFp.equals(java.lang.Object)
java.security.spec.ECPoint.equals(java.lang.Object)
java.security.spec.EllipticCurve.equals(java.lang.Object)
java.security.Timestamp.equals(java.lang.Object)
java.security.UnresolvedPermission.equals(java.lang.Object)
java.sql.RowId.equals(java.lang.Object)
java.sql.Timestamp.equals(java.lang.Object)
java.sql.Timestamp.equals(java.sql.Timestamp)
java.text.AttributedCharacterIterator.Attribute.equals(java.lang.Object)
java.text.ChoiceFormat.equals(java.lang.Object)
java.text.Collator.equals(java.lang.Object)
java.text.Collator.equals(java.lang.String, java.lang.String)
java.text.DateFormat.equals(java.lang.Object)
java.text.DateFormatSymbols.equals(java.lang.Object)
java.text.DecimalFormat.equals(java.lang.Object)
java.text.DecimalFormatSymbols.equals(java.lang.Object)
java.text.FieldPosition.equals(java.lang.Object)
java.text.MessageFormat.equals(java.lang.Object)
java.text.NumberFormat.equals(java.lang.Object)
java.text.ParsePosition.equals(java.lang.Object)
java.text.RuleBasedCollator.equals(java.lang.Object)
java.text.SimpleDateFormat.equals(java.lang.Object)
java.text.StringCharacterIterator.equals(java.lang.Object)
java.time.chrono.AbstractChronology.equals(java.lang.Object)
java.time.chrono.ChronoLocalDate.equals(java.lang.Object)
java.time.chrono.ChronoLocalDateTime.equals(java.lang.Object)
java.time.chrono.Chronology.equals(java.lang.Object)
java.time.chrono.ChronoPeriod.equals(java.lang.Object)
java.time.chrono.ChronoZonedDateTime.equals(java.lang.Object)
java.time.chrono.HijrahDate.equals(java.lang.Object)
java.time.chrono.JapaneseDate.equals(java.lang.Object)
java.time.chrono.MinguoDate.equals(java.lang.Object)
java.time.chrono.ThaiBuddhistDate.equals(java.lang.Object)
java.time.Clock.equals(java.lang.Object)
java.time.Duration.equals(java.lang.Object)
java.time.format.DecimalStyle.equals(java.lang.Object)
java.time.Instant.equals(java.lang.Object)
java.time.LocalDate.equals(java.lang.Object)
java.time.LocalDateTime.equals(java.lang.Object)
java.time.LocalTime.equals(java.lang.Object)
java.time.MonthDay.equals(java.lang.Object)
java.time.OffsetDateTime.equals(java.lang.Object)
java.time.OffsetTime.equals(java.lang.Object)
java.time.Period.equals(java.lang.Object)
java.time.temporal.ValueRange.equals(java.lang.Object)
java.time.temporal.WeekFields.equals(java.lang.Object)
java.time.Year.equals(java.lang.Object)
java.time.YearMonth.equals(java.lang.Object)
java.time.zone.ZoneOffsetTransition.equals(java.lang.Object)
java.time.zone.ZoneOffsetTransitionRule.equals(java.lang.Object)
java.time.zone.ZoneRules.equals(java.lang.Object)
java.time.ZonedDateTime.equals(java.lang.Object)
java.time.ZoneId.equals(java.lang.Object)
java.time.ZoneOffset.equals(java.lang.Object)
java.util.AbstractList.equals(java.lang.Object)
java.util.AbstractMap.equals(java.lang.Object)
java.util.AbstractMap.SimpleEntry.equals(java.lang.Object)
java.util.AbstractMap.SimpleImmutableEntry.equals(java.lang.Object)
java.util.AbstractSet.equals(java.lang.Object)
java.util.Arrays.equals(boolean:A, boolean:A)
java.util.Arrays.equals(byte:A, byte:A)
java.util.Arrays.equals(char:A, char:A)
java.util.Arrays.equals(double:A, double:A)
java.util.Arrays.equals(float:A, float:A)
java.util.Arrays.equals(int:A, int:A)
java.util.Arrays.equals(java.lang.Object:A, java.lang.Object:A)
java.util.Arrays.equals(long:A, long:A)
java.util.Arrays.equals(short:A, short:A)
java.util.BitSet.equals(java.lang.Object)
java.util.Calendar.equals(java.lang.Object)
java.util.Collection.equals(java.lang.Object)
java.util.Comparator.equals(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.equals(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.KeySetView.equals(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.equals(java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.equals(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.equals(java.lang.Object)
java.util.concurrent.CopyOnWriteArraySet.equals(java.lang.Object)
java.util.Date.equals(java.lang.Object)
java.util.EnumMap.equals(java.lang.Object)
java.util.GregorianCalendar.equals(java.lang.Object)
java.util.Hashtable.equals(java.lang.Object)
java.util.IdentityHashMap.equals(java.lang.Object)
java.util.jar.Attributes.equals(java.lang.Object)
java.util.jar.Attributes.Name.equals(java.lang.Object)
java.util.jar.Manifest.equals(java.lang.Object)
java.util.List.equals(java.lang.Object)
java.util.Locale.equals(java.lang.Object)
java.util.Locale.LanguageRange.equals(java.lang.Object)
java.util.logging.Level.equals(java.lang.Object)
java.util.Map.equals(java.lang.Object)
java.util.Map.Entry.equals(java.lang.Object)
java.util.Objects.equals(java.lang.Object, java.lang.Object)
java.util.Optional.equals(java.lang.Object)
java.util.OptionalDouble.equals(java.lang.Object)
java.util.OptionalInt.equals(java.lang.Object)
java.util.OptionalLong.equals(java.lang.Object)
java.util.PropertyPermission.equals(java.lang.Object)
java.util.Set.equals(java.lang.Object)
java.util.SimpleTimeZone.equals(java.lang.Object)
java.util.UUID.equals(java.lang.Object)
java.util.Vector.equals(java.lang.Object)
javax.activation.ActivationDataFlavor.equals(java.awt.datatransfer.DataFlavor)
javax.crypto.spec.RC2ParameterSpec.equals(java.lang.Object)
javax.crypto.spec.RC5ParameterSpec.equals(java.lang.Object)
javax.crypto.spec.SecretKeySpec.equals(java.lang.Object)
javax.imageio.ImageTypeSpecifier.equals(java.lang.Object)
javax.lang.model.element.Element.equals(java.lang.Object)
javax.lang.model.element.Name.equals(java.lang.Object)
javax.lang.model.type.TypeMirror.equals(java.lang.Object)
javax.management.Attribute.equals(java.lang.Object)
javax.management.Descriptor.equals(java.lang.Object)
javax.management.ImmutableDescriptor.equals(java.lang.Object)
javax.management.MBeanAttributeInfo.equals(java.lang.Object)
javax.management.MBeanConstructorInfo.equals(java.lang.Object)
javax.management.MBeanFeatureInfo.equals(java.lang.Object)
javax.management.MBeanInfo.equals(java.lang.Object)
javax.management.MBeanNotificationInfo.equals(java.lang.Object)
javax.management.MBeanOperationInfo.equals(java.lang.Object)
javax.management.MBeanParameterInfo.equals(java.lang.Object)
javax.management.MBeanPermission.equals(java.lang.Object)
javax.management.MBeanServerPermission.equals(java.lang.Object)
javax.management.modelmbean.DescriptorSupport.equals(java.lang.Object)
javax.management.ObjectInstance.equals(java.lang.Object)
javax.management.ObjectName.equals(java.lang.Object)
javax.management.openmbean.ArrayType.equals(java.lang.Object)
javax.management.openmbean.CompositeData.equals(java.lang.Object)
javax.management.openmbean.CompositeDataSupport.equals(java.lang.Object)
javax.management.openmbean.CompositeType.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanAttributeInfo.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanAttributeInfoSupport.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanConstructorInfo.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanConstructorInfoSupport.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanInfo.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanInfoSupport.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanOperationInfo.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanOperationInfoSupport.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanParameterInfo.equals(java.lang.Object)
javax.management.openmbean.OpenMBeanParameterInfoSupport.equals(java.lang.Object)
javax.management.openmbean.OpenType.equals(java.lang.Object)
javax.management.openmbean.SimpleType.equals(java.lang.Object)
javax.management.openmbean.TabularData.equals(java.lang.Object)
javax.management.openmbean.TabularDataSupport.equals(java.lang.Object)
javax.management.openmbean.TabularType.equals(java.lang.Object)
javax.management.remote.JMXPrincipal.equals(java.lang.Object)
javax.management.remote.JMXServiceURL.equals(java.lang.Object)
javax.naming.BinaryRefAddr.equals(java.lang.Object)
javax.naming.CompositeName.equals(java.lang.Object)
javax.naming.CompoundName.equals(java.lang.Object)
javax.naming.directory.BasicAttribute.equals(java.lang.Object)
javax.naming.directory.BasicAttributes.equals(java.lang.Object)
javax.naming.ldap.LdapName.equals(java.lang.Object)
javax.naming.ldap.Rdn.equals(java.lang.Object)
javax.naming.RefAddr.equals(java.lang.Object)
javax.naming.Reference.equals(java.lang.Object)
javax.net.ssl.SNIHostName.equals(java.lang.Object)
javax.net.ssl.SNIServerName.equals(java.lang.Object)
javax.print.attribute.AttributeSet.equals(java.lang.Object)
javax.print.attribute.DateTimeSyntax.equals(java.lang.Object)
javax.print.attribute.HashAttributeSet.equals(java.lang.Object)
javax.print.attribute.IntegerSyntax.equals(java.lang.Object)
javax.print.attribute.ResolutionSyntax.equals(java.lang.Object)
javax.print.attribute.SetOfIntegerSyntax.equals(java.lang.Object)
javax.print.attribute.Size2DSyntax.equals(java.lang.Object)
javax.print.attribute.standard.Copies.equals(java.lang.Object)
javax.print.attribute.standard.CopiesSupported.equals(java.lang.Object)
javax.print.attribute.standard.DateTimeAtCompleted.equals(java.lang.Object)
javax.print.attribute.standard.DateTimeAtCreation.equals(java.lang.Object)
javax.print.attribute.standard.DateTimeAtProcessing.equals(java.lang.Object)
javax.print.attribute.standard.Destination.equals(java.lang.Object)
javax.print.attribute.standard.DocumentName.equals(java.lang.Object)
javax.print.attribute.standard.JobHoldUntil.equals(java.lang.Object)
javax.print.attribute.standard.JobImpressions.equals(java.lang.Object)
javax.print.attribute.standard.JobImpressionsCompleted.equals(java.lang.Object)
javax.print.attribute.standard.JobImpressionsSupported.equals(java.lang.Object)
javax.print.attribute.standard.JobKOctets.equals(java.lang.Object)
javax.print.attribute.standard.JobKOctetsProcessed.equals(java.lang.Object)
javax.print.attribute.standard.JobKOctetsSupported.equals(java.lang.Object)
javax.print.attribute.standard.JobMediaSheets.equals(java.lang.Object)
javax.print.attribute.standard.JobMediaSheetsCompleted.equals(java.lang.Object)
javax.print.attribute.standard.JobMediaSheetsSupported.equals(java.lang.Object)
javax.print.attribute.standard.JobMessageFromOperator.equals(java.lang.Object)
javax.print.attribute.standard.JobName.equals(java.lang.Object)
javax.print.attribute.standard.JobOriginatingUserName.equals(java.lang.Object)
javax.print.attribute.standard.JobPriority.equals(java.lang.Object)
javax.print.attribute.standard.JobPrioritySupported.equals(java.lang.Object)
javax.print.attribute.standard.Media.equals(java.lang.Object)
javax.print.attribute.standard.MediaPrintableArea.equals(java.lang.Object)
javax.print.attribute.standard.MediaSize.equals(java.lang.Object)
javax.print.attribute.standard.NumberOfDocuments.equals(java.lang.Object)
javax.print.attribute.standard.NumberOfInterveningJobs.equals(java.lang.Object)
javax.print.attribute.standard.NumberUp.equals(java.lang.Object)
javax.print.attribute.standard.NumberUpSupported.equals(java.lang.Object)
javax.print.attribute.standard.OutputDeviceAssigned.equals(java.lang.Object)
javax.print.attribute.standard.PageRanges.equals(java.lang.Object)
javax.print.attribute.standard.PagesPerMinute.equals(java.lang.Object)
javax.print.attribute.standard.PagesPerMinuteColor.equals(java.lang.Object)
javax.print.attribute.standard.PrinterInfo.equals(java.lang.Object)
javax.print.attribute.standard.PrinterLocation.equals(java.lang.Object)
javax.print.attribute.standard.PrinterMakeAndModel.equals(java.lang.Object)
javax.print.attribute.standard.PrinterMessageFromOperator.equals(java.lang.Object)
javax.print.attribute.standard.PrinterMoreInfo.equals(java.lang.Object)
javax.print.attribute.standard.PrinterMoreInfoManufacturer.equals(java.lang.Object)
javax.print.attribute.standard.PrinterName.equals(java.lang.Object)
javax.print.attribute.standard.PrinterResolution.equals(java.lang.Object)
javax.print.attribute.standard.PrinterURI.equals(java.lang.Object)
javax.print.attribute.standard.QueuedJobCount.equals(java.lang.Object)
javax.print.attribute.standard.RequestingUserName.equals(java.lang.Object)
javax.print.attribute.TextSyntax.equals(java.lang.Object)
javax.print.attribute.URISyntax.equals(java.lang.Object)
javax.print.DocFlavor.equals(java.lang.Object)
javax.print.PrintService.equals(java.lang.Object)
javax.rmi.CORBA.Stub.equals(java.lang.Object)
javax.rmi.CORBA.StubDelegate.equals(javax.rmi.CORBA.Stub, java.lang.Object)
javax.rmi.ssl.SslRMIClientSocketFactory.equals(java.lang.Object)
javax.rmi.ssl.SslRMIServerSocketFactory.equals(java.lang.Object)
javax.security.auth.kerberos.DelegationPermission.equals(java.lang.Object)
javax.security.auth.kerberos.KerberosKey.equals(java.lang.Object)
javax.security.auth.kerberos.KerberosPrincipal.equals(java.lang.Object)
javax.security.auth.kerberos.KerberosTicket.equals(java.lang.Object)
javax.security.auth.kerberos.KeyTab.equals(java.lang.Object)
javax.security.auth.kerberos.ServicePermission.equals(java.lang.Object)
javax.security.auth.PrivateCredentialPermission.equals(java.lang.Object)
javax.security.auth.Subject.equals(java.lang.Object)
javax.security.auth.x500.X500Principal.equals(java.lang.Object)
javax.security.cert.Certificate.equals(java.lang.Object)
javax.sound.midi.MidiDevice.Info.equals(java.lang.Object)
javax.sound.midi.Sequencer.SyncMode.equals(java.lang.Object)
javax.sound.sampled.AudioFileFormat.Type.equals(java.lang.Object)
javax.sound.sampled.AudioFormat.Encoding.equals(java.lang.Object)
javax.sound.sampled.Control.Type.equals(java.lang.Object)
javax.sound.sampled.LineEvent.Type.equals(java.lang.Object)
javax.sound.sampled.Mixer.Info.equals(java.lang.Object)
javax.sound.sampled.Port.Info.equals(java.lang.Object)
javax.sound.sampled.ReverbType.equals(java.lang.Object)
javax.sql.rowset.serial.SerialArray.equals(java.lang.Object)
javax.sql.rowset.serial.SerialBlob.equals(java.lang.Object)
javax.sql.rowset.serial.SerialClob.equals(java.lang.Object)
javax.sql.rowset.serial.SerialDatalink.equals(java.lang.Object)
javax.sql.rowset.serial.SerialJavaObject.equals(java.lang.Object)
javax.sql.rowset.serial.SerialRef.equals(java.lang.Object)
javax.sql.rowset.serial.SerialStruct.equals(java.lang.Object)
javax.swing.RowSorter.SortKey.equals(java.lang.Object)
javax.swing.text.DefaultCaret.equals(java.lang.Object)
javax.swing.text.html.HTML.UnknownTag.equals(java.lang.Object)
javax.swing.text.SimpleAttributeSet.equals(java.lang.Object)
javax.swing.text.StyleContext.SmallAttributeSet.equals(java.lang.Object)
javax.swing.text.TabSet.equals(java.lang.Object)
javax.swing.text.TabStop.equals(java.lang.Object)
javax.swing.tree.TreePath.equals(java.lang.Object)
javax.xml.datatype.Duration.equals(java.lang.Object)
javax.xml.datatype.XMLGregorianCalendar.equals(java.lang.Object)
javax.xml.namespace.QName.equals(java.lang.Object)
org.ietf.jgss.ChannelBinding.equals(java.lang.Object)
org.ietf.jgss.GSSCredential.equals(java.lang.Object)
org.ietf.jgss.GSSName.equals(java.lang.Object)
org.ietf.jgss.GSSName.equals(org.ietf.jgss.GSSName)
org.ietf.jgss.Oid.equals(java.lang.Object)
org.omg.CORBA.portable.Delegate.equals(org.omg.CORBA.Object, java.lang.Object)
org.omg.CORBA.portable.ObjectImpl.equals(java.lang.Object)


Occurences of ERA

ERA occurences:
java.text.ERA
java.time.temporal.ERA
java.util.ERA


Occurences of eraOf

eraOf occurences:
java.time.chrono.Chronology.eraOf(int)
java.time.chrono.HijrahChronology.eraOf(int)
java.time.chrono.IsoChronology.eraOf(int)
java.time.chrono.JapaneseChronology.eraOf(int)
java.time.chrono.MinguoChronology.eraOf(int)
java.time.chrono.ThaiBuddhistChronology.eraOf(int)


Occurences of eras

eras occurences:
java.time.chrono.Chronology.eras()
java.time.chrono.HijrahChronology.eras()
java.time.chrono.IsoChronology.eras()
java.time.chrono.JapaneseChronology.eras()
java.time.chrono.MinguoChronology.eras()
java.time.chrono.ThaiBuddhistChronology.eras()


Occurences of err

err occurences:
java.io.err
java.lang.err


Occurences of ERRONEOUS

ERRONEOUS occurences:
com.sun.source.doctree.ERRONEOUS
com.sun.source.tree.ERRONEOUS


Occurences of ErroneousTree

ErroneousTree occurences:
com.sun.source.doctree.ErroneousTree
com.sun.source.tree.ErroneousTree


Occurences of error

error occurences:
java.util.logging.ErrorManager.error(java.lang.String, java.lang.Exception, int)
javax.swing.text.html.parser.Parser.error(java.lang.String)
javax.swing.text.html.parser.Parser.error(java.lang.String, java.lang.String)
javax.swing.text.html.parser.Parser.error(java.lang.String, java.lang.String, java.lang.String)
javax.swing.text.html.parser.Parser.error(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
javax.xml.transform.ErrorListener.error(javax.xml.transform.TransformerException)
org.xml.sax.ErrorHandler.error(org.xml.sax.SAXParseException)
org.xml.sax.HandlerBase.error(org.xml.sax.SAXParseException)
org.xml.sax.helpers.DefaultHandler.error(org.xml.sax.SAXParseException)
org.xml.sax.helpers.XMLFilterImpl.error(org.xml.sax.SAXParseException)


Occurences of ERROR

ERROR occurences:
java.awt.ERROR
java.awt.image.ERROR
java.util.jar.ERROR
javax.lang.model.type.ERROR
javax.print.attribute.standard.ERROR
javax.security.auth.callback.ERROR
javax.security.auth.callback.ERROR
javax.tools.ERROR
javax.xml.bind.ERROR


Occurences of Error (constructors)

Error (constructors) occurences:
java.lang.Error()
java.lang.Error(java.lang.String)
java.lang.Error(java.lang.String, java.lang.Throwable)
java.lang.Error(java.lang.String, java.lang.Throwable, boolean, boolean)
java.lang.Error(java.lang.Throwable)


Occurences of errorCode

errorCode occurences:
com.sun.jdi.InternalException.errorCode()
javax.transaction.xa.errorCode


Occurences of estimateSize

estimateSize occurences:
java.util.Spliterator.estimateSize()
java.util.Spliterators.AbstractDoubleSpliterator.estimateSize()
java.util.Spliterators.AbstractIntSpliterator.estimateSize()
java.util.Spliterators.AbstractLongSpliterator.estimateSize()
java.util.Spliterators.AbstractSpliterator.estimateSize()


Occurences of EtchedBorder (constructors)

EtchedBorder (constructors) occurences:
javax.swing.border.EtchedBorder()
javax.swing.border.EtchedBorder(int)
javax.swing.border.EtchedBorder(int, java.awt.Color, java.awt.Color)
javax.swing.border.EtchedBorder(java.awt.Color, java.awt.Color)


Occurences of EtchedBorderUIResource

EtchedBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource.EtchedBorderUIResource()
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource.EtchedBorderUIResource(int)
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource.EtchedBorderUIResource(int, java.awt.Color, java.awt.Color)
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource.EtchedBorderUIResource(java.awt.Color, java.awt.Color)


Occurences of etherealize

etherealize occurences:
org.omg.PortableServer.ServantActivatorOperations.etherealize(byte:A, org.omg.PortableServer.POA, org.omg.PortableServer.Servant, boolean, boolean)
org.omg.PortableServer._ServantActivatorStub.etherealize(byte:A, org.omg.PortableServer.POA, org.omg.PortableServer.Servant, boolean, boolean)


Occurences of ETHIOPIC

ETHIOPIC occurences:
java.awt.font.ETHIOPIC
java.awt.font.ETHIOPIC
java.lang.ETHIOPIC
java.lang.ETHIOPIC


Occurences of EUROPEAN

EUROPEAN occurences:
java.awt.font.EUROPEAN
java.awt.font.EUROPEAN


Occurences of eval

eval occurences:
javax.script.AbstractScriptEngine.eval(java.io.Reader)
javax.script.AbstractScriptEngine.eval(java.io.Reader, javax.script.Bindings)
javax.script.AbstractScriptEngine.eval(java.lang.String)
javax.script.AbstractScriptEngine.eval(java.lang.String, javax.script.Bindings)
javax.script.CompiledScript.eval()
javax.script.CompiledScript.eval(javax.script.Bindings)
javax.script.CompiledScript.eval(javax.script.ScriptContext)
javax.script.ScriptEngine.eval(java.io.Reader)
javax.script.ScriptEngine.eval(java.io.Reader, javax.script.Bindings)
javax.script.ScriptEngine.eval(java.io.Reader, javax.script.ScriptContext)
javax.script.ScriptEngine.eval(java.lang.String)
javax.script.ScriptEngine.eval(java.lang.String, javax.script.Bindings)
javax.script.ScriptEngine.eval(java.lang.String, javax.script.ScriptContext)


Occurences of evaluate

evaluate occurences:
javax.sql.rowset.Predicate.evaluate(java.lang.Object, int)
javax.sql.rowset.Predicate.evaluate(java.lang.Object, java.lang.String)
javax.sql.rowset.Predicate.evaluate(javax.sql.RowSet)
javax.xml.xpath.XPath.evaluate(java.lang.String, java.lang.Object)
javax.xml.xpath.XPath.evaluate(java.lang.String, java.lang.Object, javax.xml.namespace.QName)
javax.xml.xpath.XPath.evaluate(java.lang.String, org.xml.sax.InputSource)
javax.xml.xpath.XPath.evaluate(java.lang.String, org.xml.sax.InputSource, javax.xml.namespace.QName)
javax.xml.xpath.XPathExpression.evaluate(java.lang.Object)
javax.xml.xpath.XPathExpression.evaluate(java.lang.Object, javax.xml.namespace.QName)
javax.xml.xpath.XPathExpression.evaluate(org.xml.sax.InputSource)
javax.xml.xpath.XPathExpression.evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName)
javax.xml.xpath.XPathFunction.evaluate(java.util.List)


Occurences of Event

Event occurences:
com.sun.jdi.event.Event
java.awt.Event
org.w3c.dom.events.Event


Occurences of event

event occurences:
com.sun.jdi.event
compact3.javax.naming.event
java.awt.event
javax.imageio.event
javax.naming.event
javax.print.event
javax.swing.event
javax.swing.tree.event


Occurences of Event (constructors)

Event (constructors) occurences:
java.awt.Event(java.lang.Object, int, java.lang.Object)
java.awt.Event(java.lang.Object, long, int, int, int, int, int)
java.awt.Event(java.lang.Object, long, int, int, int, int, int, java.lang.Object)


Occurences of eventDispatched

eventDispatched occurences:
java.awt.event.AWTEventListener.eventDispatched(java.awt.AWTEvent)
java.awt.event.AWTEventListenerProxy.eventDispatched(java.awt.AWTEvent)
javax.swing.plaf.LayerUI.eventDispatched(java.awt.AWTEvent, javax.swing.JLayer)


Occurences of EventListener

EventListener occurences:
java.util.EventListener
org.w3c.dom.events.EventListener


Occurences of EventListenerProxy (constructors)

EventListenerProxy (constructors) occurences:
java.util.EventListenerProxy(java.util.EventListener)
java.util.EventListenerProxy(T)


Occurences of EventQueue

EventQueue occurences:
com.sun.jdi.event.EventQueue
java.awt.EventQueue


Occurences of EventReaderDelegate (constructors)

EventReaderDelegate (constructors) occurences:
javax.xml.stream.util.EventReaderDelegate()
javax.xml.stream.util.EventReaderDelegate(javax.xml.stream.XMLEventReader)


Occurences of events

events occurences:
compact2.javax.xml.stream.events
compact2.org.w3c.dom.events
compact3.javax.xml.stream.events
compact3.org.w3c.dom.events
java.awt.dnd.events
javax.xml.stream.events
org.w3c.dom.events


Occurences of EventSetDescriptor (constructors)

EventSetDescriptor (constructors) occurences:
java.beans.EventSetDescriptor(java.lang.Class, java.lang.String, java.lang.Class, java.lang.String)
java.beans.EventSetDescriptor(java.lang.Class, java.lang.String, java.lang.Class, java.lang.String:A, java.lang.String, java.lang.String)
java.beans.EventSetDescriptor(java.lang.Class, java.lang.String, java.lang.Class, java.lang.String:A, java.lang.String, java.lang.String, java.lang.String)
java.beans.EventSetDescriptor(java.lang.String, java.lang.Class, java.beans.MethodDescriptor:A, java.lang.reflect.Method, java.lang.reflect.Method)
java.beans.EventSetDescriptor(java.lang.String, java.lang.Class, java.lang.reflect.Method:A, java.lang.reflect.Method, java.lang.reflect.Method)
java.beans.EventSetDescriptor(java.lang.String, java.lang.Class, java.lang.reflect.Method:A, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method)


Occurences of ExcC14NParameterSpec (constructors)

ExcC14NParameterSpec (constructors) occurences:
javax.xml.crypto.dsig.spec.ExcC14NParameterSpec()
javax.xml.crypto.dsig.spec.ExcC14NParameterSpec(java.util.List)


Occurences of except

except occurences:
org.omg.CORBA.except
org.omg.CORBA.ServerRequest.except(org.omg.CORBA.Any)


Occurences of exception

exception occurences:
com.sun.javadoc.ThrowsTag.exception()
com.sun.jdi.event.ExceptionEvent.exception()
com.sun.jdi.InvocationException.exception()
com.sun.jdi.request.ExceptionRequest.exception()
org.omg.CORBA.Environment.exception()
org.omg.CORBA.Environment.exception(java.lang.Exception)


Occurences of Exception (constructors)

Exception (constructors) occurences:
java.lang.Exception()
java.lang.Exception(java.lang.String)
java.lang.Exception(java.lang.String, java.lang.Throwable)
java.lang.Exception(java.lang.String, java.lang.Throwable, boolean, boolean)
java.lang.Exception(java.lang.Throwable)


Occurences of exceptionally

exceptionally occurences:
java.util.concurrent.CompletableFuture.exceptionally(java.util.function.Function)
java.util.concurrent.CompletionStage.exceptionally(java.util.function.Function)


Occurences of ExceptionInInitializerError (constructors)

ExceptionInInitializerError (constructors) occurences:
java.lang.ExceptionInInitializerError()
java.lang.ExceptionInInitializerError(java.lang.String)
java.lang.ExceptionInInitializerError(java.lang.Throwable)


Occurences of exceptions

exceptions occurences:
com.sun.javadoc.PackageDoc.exceptions()
javax.swing.exceptions
org.omg.CORBA.Request.exceptions()
org.omg.PortableInterceptor.RequestInfoOperations.exceptions()


Occurences of exchange

exchange occurences:
java.util.concurrent.Exchanger.exchange(java.lang.Object)
java.util.concurrent.Exchanger.exchange(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.Exchanger.exchange(V)
java.util.concurrent.Exchanger.exchange(V, long, java.util.concurrent.TimeUnit)


Occurences of exec

exec occurences:
java.lang.Runtime.exec(java.lang.String)
java.lang.Runtime.exec(java.lang.String, java.lang.String:A)
java.lang.Runtime.exec(java.lang.String, java.lang.String:A, java.io.File)
java.lang.Runtime.exec(java.lang.String:A)
java.lang.Runtime.exec(java.lang.String:A, java.lang.String:A)
java.lang.Runtime.exec(java.lang.String:A, java.lang.String:A, java.io.File)
java.util.concurrent.CountedCompleter.exec()
java.util.concurrent.ForkJoinTask.exec()
java.util.concurrent.RecursiveAction.exec()
java.util.concurrent.RecursiveTask.exec()


Occurences of execute

execute occurences:
java.beans.Expression.execute()
java.beans.Statement.execute()
java.sql.PreparedStatement.execute()
java.sql.Statement.execute(java.lang.String)
java.sql.Statement.execute(java.lang.String, int)
java.sql.Statement.execute(java.lang.String, int:A)
java.sql.Statement.execute(java.lang.String, java.lang.String:A)
java.util.concurrent.Executor.execute(java.lang.Runnable)
java.util.concurrent.ForkJoinPool.execute(java.lang.Runnable)
java.util.concurrent.ForkJoinPool.execute(java.util.concurrent.ForkJoinTask)
java.util.concurrent.ScheduledThreadPoolExecutor.execute(java.lang.Runnable)
java.util.concurrent.ThreadPoolExecutor.execute(java.lang.Runnable)
javax.sql.RowSet.execute()
javax.sql.rowset.CachedRowSet.execute(java.sql.Connection)
javax.swing.SwingWorker.execute()


Occurences of EXECUTE

EXECUTE occurences:
java.nio.file.attribute.EXECUTE
java.nio.file.EXECUTE


Occurences of executeLargeUpdate

executeLargeUpdate occurences:
java.sql.PreparedStatement.executeLargeUpdate()
java.sql.Statement.executeLargeUpdate(java.lang.String)
java.sql.Statement.executeLargeUpdate(java.lang.String, int)
java.sql.Statement.executeLargeUpdate(java.lang.String, int:A)
java.sql.Statement.executeLargeUpdate(java.lang.String, java.lang.String:A)


Occurences of executeQuery

executeQuery occurences:
java.sql.PreparedStatement.executeQuery()
java.sql.Statement.executeQuery(java.lang.String)


Occurences of executeUpdate

executeUpdate occurences:
java.sql.PreparedStatement.executeUpdate()
java.sql.Statement.executeUpdate(java.lang.String)
java.sql.Statement.executeUpdate(java.lang.String, int)
java.sql.Statement.executeUpdate(java.lang.String, int:A)
java.sql.Statement.executeUpdate(java.lang.String, java.lang.String:A)


Occurences of ExecutionException (constructors)

ExecutionException (constructors) occurences:
java.util.concurrent.ExecutionException()
java.util.concurrent.ExecutionException(java.lang.String)
java.util.concurrent.ExecutionException(java.lang.String, java.lang.Throwable)
java.util.concurrent.ExecutionException(java.lang.Throwable)


Occurences of EXECUTIVE

EXECUTIVE occurences:
java.awt.EXECUTIVE
javax.print.attribute.standard.EXECUTIVE
javax.print.attribute.standard.EXECUTIVE


Occurences of ExecutorCompletionService (constructors)

ExecutorCompletionService (constructors) occurences:
java.util.concurrent.ExecutorCompletionService(java.util.concurrent.Executor)
java.util.concurrent.ExecutorCompletionService(java.util.concurrent.Executor, java.util.concurrent.BlockingQueue)


Occurences of ExemptionMechanismException (constructors)

ExemptionMechanismException (constructors) occurences:
javax.crypto.ExemptionMechanismException()
javax.crypto.ExemptionMechanismException(java.lang.String)


Occurences of exists

exists occurences:
java.io.File.exists()
java.nio.file.Files.exists(java.nio.file.Path, java.nio.file.LinkOption...)
javax.security.auth.kerberos.KeyTab.exists()


Occurences of exit

exit occurences:
com.sun.jdi.VirtualMachine.exit(int)
java.awt.SecondaryLoop.exit()
java.lang.Runtime.exit(int)
java.lang.System.exit(int)


Occurences of exiting

exiting occurences:
java.util.logging.Logger.exiting(java.lang.String, java.lang.String)
java.util.logging.Logger.exiting(java.lang.String, java.lang.String, java.lang.Object)


Occurences of EXIT_ON_CLOSE

EXIT_ON_CLOSE occurences:
javax.swing.EXIT_ON_CLOSE
javax.swing.EXIT_ON_CLOSE


Occurences of exp

exp occurences:
java.lang.Math.exp(double)
java.lang.StrictMath.exp(double)


Occurences of ExpandVetoException (constructors)

ExpandVetoException (constructors) occurences:
javax.swing.tree.ExpandVetoException(javax.swing.event.TreeExpansionEvent)
javax.swing.tree.ExpandVetoException(javax.swing.event.TreeExpansionEvent, java.lang.String)


Occurences of expm1

expm1 occurences:
java.lang.Math.expm1(double)
java.lang.StrictMath.expm1(double)


Occurences of export

export occurences:
javax.management.remote.rmi.RMIIIOPServerImpl.export()
javax.management.remote.rmi.RMIJRMPServerImpl.export()
javax.management.remote.rmi.RMIServerImpl.export()
org.ietf.jgss.GSSContext.export()
org.ietf.jgss.GSSName.export()


Occurences of ExportException (constructors)

ExportException (constructors) occurences:
java.rmi.server.ExportException(java.lang.String)
java.rmi.server.ExportException(java.lang.String, java.lang.Exception)


Occurences of exportNode

exportNode occurences:
java.util.prefs.AbstractPreferences.exportNode(java.io.OutputStream)
java.util.prefs.Preferences.exportNode(java.io.OutputStream)


Occurences of exportObject

exportObject occurences:
java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int)
java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int)
java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
java.rmi.server.ServerRef.exportObject(java.rmi.Remote, java.lang.Object)
java.rmi.server.UnicastRemoteObject.exportObject(java.rmi.Remote)
java.rmi.server.UnicastRemoteObject.exportObject(java.rmi.Remote, int)
java.rmi.server.UnicastRemoteObject.exportObject(java.rmi.Remote, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
javax.rmi.CORBA.PortableRemoteObjectDelegate.exportObject(java.rmi.Remote)
javax.rmi.PortableRemoteObject.exportObject(java.rmi.Remote)


Occurences of exportSubtree

exportSubtree occurences:
java.util.prefs.AbstractPreferences.exportSubtree(java.io.OutputStream)
java.util.prefs.Preferences.exportSubtree(java.io.OutputStream)


Occurences of Expression (constructors)

Expression (constructors) occurences:
java.beans.Expression(java.lang.Object, java.lang.Object, java.lang.String, java.lang.Object:A)
java.beans.Expression(java.lang.Object, java.lang.String, java.lang.Object:A)


Occurences of ext

ext occurences:
compact2.org.xml.sax.ext
compact3.org.xml.sax.ext
org.xml.sax.ext


Occurences of extcheck

extcheck occurences:
extcheck
extcheck


Occurences of EXTCRC

EXTCRC occurences:
java.util.jar.EXTCRC
java.util.jar.EXTCRC
java.util.jar.EXTCRC
java.util.jar.EXTCRC
java.util.zip.EXTCRC
java.util.zip.EXTCRC
java.util.zip.EXTCRC
java.util.zip.EXTCRC


Occurences of extendedOperation

extendedOperation occurences:
javax.naming.ldap.InitialLdapContext.extendedOperation(javax.naming.ldap.ExtendedRequest)
javax.naming.ldap.LdapContext.extendedOperation(javax.naming.ldap.ExtendedRequest)


Occurences of extent

extent occurences:
java.awt.geom.extent
java.awt.geom.extent


Occurences of externalEntityDecl

externalEntityDecl occurences:
org.xml.sax.ext.DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)


Occurences of Externalization with an Externalizable SuperClass

Externalization with an Externalizable SuperClass occurences:
Externalization with an Externalizable SuperClass
Externalization with an Externalizable SuperClass
Externalization with an Externalizable SuperClass


Occurences of Externalization with an NonExternalizable SuperClass

Externalization with an NonExternalizable SuperClass occurences:
Externalization with an NonExternalizable SuperClass
Externalization with an NonExternalizable SuperClass
Externalization with an NonExternalizable SuperClass


Occurences of EXTHDR

EXTHDR occurences:
java.util.jar.EXTHDR
java.util.jar.EXTHDR
java.util.jar.EXTHDR
java.util.jar.EXTHDR
java.util.zip.EXTHDR
java.util.zip.EXTHDR
java.util.zip.EXTHDR
java.util.zip.EXTHDR


Occurences of EXTLEN

EXTLEN occurences:
java.util.jar.EXTLEN
java.util.jar.EXTLEN
java.util.jar.EXTLEN
java.util.jar.EXTLEN
java.util.zip.EXTLEN
java.util.zip.EXTLEN
java.util.zip.EXTLEN
java.util.zip.EXTLEN


Occurences of extract

extract occurences:
org.omg.CORBA.AnySeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.BooleanSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.CharSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.CompletionStatusHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.CurrentHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.DefinitionKindHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.DoubleSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.FieldNameHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.FloatSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.IdentifierHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.IDLTypeHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.LongLongSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.LongSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.NameValuePairHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ObjectHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.OctetSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ParameterModeHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.PolicyErrorCodeHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.PolicyErrorHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.PolicyHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.PolicyListHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.PolicyTypeHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.RepositoryIdHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ServiceDetailHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ServiceInformationHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.SetOverrideTypeHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ShortSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.StringSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.StringValueHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.StructMemberHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ULongLongSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ULongSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.UnionMemberHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.UnknownUserExceptionHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.UShortSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ValueBaseHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.ValueMemberHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.VersionSpecHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.VisibilityHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.WCharSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.WrongTransactionHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.WStringSeqHelper.extract(org.omg.CORBA.Any)
org.omg.CORBA.WStringValueHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.BindingHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.BindingIteratorHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.BindingListHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.BindingTypeHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.IstringHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NameComponentHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NameHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextExtHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(org.omg.CORBA.Any)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.AnySeqHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyFactoryHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnySeqHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynArrayHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynEnumHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynFixedHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynSequenceHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynStructHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynUnionHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.DynValueHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.FieldNameHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.NameDynAnyPairHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.NameDynAnyPairSeqHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.NameValuePairHelper.extract(org.omg.CORBA.Any)
org.omg.DynamicAny.NameValuePairSeqHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.CodecFactoryHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.CodecPackage.FormatMismatchHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.CodecPackage.TypeMismatchHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.ComponentIdHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.IORHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.MultipleComponentProfileHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.ProfileIdHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.ServiceContextHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.ServiceContextListHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.ServiceIdHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.TaggedComponentHelper.extract(org.omg.CORBA.Any)
org.omg.IOP.TaggedProfileHelper.extract(org.omg.CORBA.Any)
org.omg.Messaging.SyncScopeHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.AdapterManagerIdHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.AdapterNameHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.AdapterStateHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.CurrentHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ForwardRequestHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.InvalidSlotHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ObjectIdHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ORBIdHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.extract(org.omg.CORBA.Any)
org.omg.PortableInterceptor.ServerIdHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.CurrentHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.CurrentPackage.NoContextHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.ForwardRequestHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.NoServantHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.WrongAdapterHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.POAPackage.WrongPolicyHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.ServantActivatorHelper.extract(org.omg.CORBA.Any)
org.omg.PortableServer.ServantLocatorHelper.extract(org.omg.CORBA.Any)


Occurences of EXTSIG

EXTSIG occurences:
java.util.jar.EXTSIG
java.util.jar.EXTSIG
java.util.jar.EXTSIG
java.util.jar.EXTSIG
java.util.zip.EXTSIG
java.util.zip.EXTSIG
java.util.zip.EXTSIG
java.util.zip.EXTSIG


Occurences of EXTSIZ

EXTSIZ occurences:
java.util.jar.EXTSIZ
java.util.jar.EXTSIZ
java.util.jar.EXTSIZ
java.util.jar.EXTSIZ
java.util.zip.EXTSIZ
java.util.zip.EXTSIZ
java.util.zip.EXTSIZ
java.util.zip.EXTSIZ


Occurences of E_RESIZE_CURSOR

E_RESIZE_CURSOR occurences:
java.awt.E_RESIZE_CURSOR
java.awt.E_RESIZE_CURSOR


Occurences of F4

F4 occurences:
java.awt.F4
java.security.spec.F4


Occurences of FactoryConfigurationError

FactoryConfigurationError occurences:
javax.xml.parsers.FactoryConfigurationError
javax.xml.stream.FactoryConfigurationError


Occurences of FactoryConfigurationError (constructors)

FactoryConfigurationError (constructors) occurences:
javax.xml.parsers.FactoryConfigurationError()
javax.xml.parsers.FactoryConfigurationError(java.lang.Exception)
javax.xml.parsers.FactoryConfigurationError(java.lang.Exception, java.lang.String)
javax.xml.parsers.FactoryConfigurationError(java.lang.String)
javax.xml.stream.FactoryConfigurationError()
javax.xml.stream.FactoryConfigurationError(java.lang.Exception)
javax.xml.stream.FactoryConfigurationError(java.lang.Exception, java.lang.String)
javax.xml.stream.FactoryConfigurationError(java.lang.String)
javax.xml.stream.FactoryConfigurationError(java.lang.String, java.lang.Exception)


Occurences of fail(fast

fail(fast occurences:
java.util.ArrayList.fail(fast
java.util.Vector.fail(fast


Occurences of failed

failed occurences:
java.nio.channels.CompletionHandler.failed(java.lang.Throwable, A)
java.nio.channels.CompletionHandler.failed(java.lang.Throwable, java.lang.Object)


Occurences of FailedLoginException (constructors)

FailedLoginException (constructors) occurences:
javax.security.auth.login.FailedLoginException()
javax.security.auth.login.FailedLoginException(java.lang.String)


Occurences of FALSE

FALSE occurences:
java.lang.FALSE
java.util.jar.FALSE
java.util.jar.FALSE


Occurences of Fatal Error Log

Fatal Error Log occurences:
Fatal Error Log
Fatal Error Log


Occurences of fatalError

fatalError occurences:
javax.xml.transform.ErrorListener.fatalError(javax.xml.transform.TransformerException)
org.xml.sax.ErrorHandler.fatalError(org.xml.sax.SAXParseException)
org.xml.sax.HandlerBase.fatalError(org.xml.sax.SAXParseException)
org.xml.sax.helpers.DefaultHandler.fatalError(org.xml.sax.SAXParseException)
org.xml.sax.helpers.XMLFilterImpl.fatalError(org.xml.sax.SAXParseException)


Occurences of fd

fd occurences:
java.net.fd
java.net.fd


Occurences of FEATURE

FEATURE occurences:
javax.xml.transform.dom.FEATURE
javax.xml.transform.dom.FEATURE
javax.xml.transform.sax.FEATURE
javax.xml.transform.sax.FEATURE
javax.xml.transform.sax.FEATURE
javax.xml.transform.stax.FEATURE
javax.xml.transform.stax.FEATURE
javax.xml.transform.stream.FEATURE
javax.xml.transform.stream.FEATURE


Occurences of FEBRUARY

FEBRUARY occurences:
java.time.FEBRUARY
java.util.FEBRUARY
javax.xml.datatype.FEBRUARY


Occurences of fetchNotifications

fetchNotifications occurences:
javax.management.remote.rmi.RMIConnection.fetchNotifications(long, int, long)
javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(long, int, long)
javax.management.remote.rmi.RMIConnectionImpl_Stub.fetchNotifications(long, int, long)


Occurences of field

field occurences:
com.sun.jdi.event.WatchpointEvent.field()
com.sun.jdi.request.WatchpointRequest.field()


Occurences of Field

Field occurences:
com.sun.jdi.Field
java.lang.reflect.Field
java.text.DateFormat.Field.Field(java.lang.String, int)
java.text.Format.Field.Field(java.lang.String)
java.text.MessageFormat.Field.Field(java.lang.String)
java.text.NumberFormat.Field.Field(java.lang.String)


Occurences of FIELD

FIELD occurences:
java.lang.annotation.FIELD
javax.lang.model.element.FIELD
javax.xml.bind.annotation.FIELD


Occurences of FieldNameHelper

FieldNameHelper occurences:
org.omg.CORBA.FieldNameHelper
org.omg.DynamicAny.FieldNameHelper


Occurences of FieldNameHelper (constructors)

FieldNameHelper (constructors) occurences:
org.omg.CORBA.FieldNameHelper()
org.omg.DynamicAny.FieldNameHelper()


Occurences of FieldPosition (constructors)

FieldPosition (constructors) occurences:
java.text.FieldPosition(int)
java.text.FieldPosition(java.text.Format.Field)
java.text.FieldPosition(java.text.Format.Field, int)


Occurences of FILE

FILE occurences:
java.awt.FILE
javax.print.attribute.standard.FILE


Occurences of file

file occurences:
com.sun.javadoc.SourcePosition.file()
compact1.java.nio.file
compact2.java.nio.file
compact3.java.nio.file
java.lang.ProcessBuilder.Redirect.file()
java.nio.file
javax.jws.HandlerChain.file()


Occurences of File (constructors)

File (constructors) occurences:
java.io.File(java.io.File, java.lang.String)
java.io.File(java.lang.String)
java.io.File(java.lang.String, java.lang.String)
java.io.File(java.net.URI)


Occurences of FileAlreadyExistsException (constructors)

FileAlreadyExistsException (constructors) occurences:
java.nio.file.FileAlreadyExistsException(java.lang.String)
java.nio.file.FileAlreadyExistsException(java.lang.String, java.lang.String, java.lang.String)


Occurences of FileDataSource (constructors)

FileDataSource (constructors) occurences:
javax.activation.FileDataSource(java.io.File)
javax.activation.FileDataSource(java.lang.String)


Occurences of FileDialog (constructors)

FileDialog (constructors) occurences:
java.awt.FileDialog(java.awt.Dialog)
java.awt.FileDialog(java.awt.Dialog, java.lang.String)
java.awt.FileDialog(java.awt.Dialog, java.lang.String, int)
java.awt.FileDialog(java.awt.Frame)
java.awt.FileDialog(java.awt.Frame, java.lang.String)
java.awt.FileDialog(java.awt.Frame, java.lang.String, int)


Occurences of FileFilter

FileFilter occurences:
java.io.FileFilter
javax.swing.filechooser.FileFilter


Occurences of FileHandler (constructors)

FileHandler (constructors) occurences:
java.util.logging.FileHandler()
java.util.logging.FileHandler(java.lang.String)
java.util.logging.FileHandler(java.lang.String, boolean)
java.util.logging.FileHandler(java.lang.String, int, int)
java.util.logging.FileHandler(java.lang.String, int, int, boolean)


Occurences of FileImageInputStream (constructors)

FileImageInputStream (constructors) occurences:
javax.imageio.stream.FileImageInputStream(java.io.File)
javax.imageio.stream.FileImageInputStream(java.io.RandomAccessFile)


Occurences of FileImageOutputStream (constructors)

FileImageOutputStream (constructors) occurences:
javax.imageio.stream.FileImageOutputStream(java.io.File)
javax.imageio.stream.FileImageOutputStream(java.io.RandomAccessFile)


Occurences of FileInputStream (constructors)

FileInputStream (constructors) occurences:
java.io.FileInputStream(java.io.File)
java.io.FileInputStream(java.io.FileDescriptor)
java.io.FileInputStream(java.lang.String)


Occurences of FileLock (constructors)

FileLock (constructors) occurences:
java.nio.channels.FileLock(java.nio.channels.AsynchronousFileChannel, long, long, boolean)
java.nio.channels.FileLock(java.nio.channels.FileChannel, long, long, boolean)


Occurences of FileNotFoundException (constructors)

FileNotFoundException (constructors) occurences:
java.io.FileNotFoundException()
java.io.FileNotFoundException(java.lang.String)


Occurences of FileOutputStream (constructors)

FileOutputStream (constructors) occurences:
java.io.FileOutputStream(java.io.File)
java.io.FileOutputStream(java.io.File, boolean)
java.io.FileOutputStream(java.io.FileDescriptor)
java.io.FileOutputStream(java.lang.String)
java.io.FileOutputStream(java.lang.String, boolean)


Occurences of FileReader (constructors)

FileReader (constructors) occurences:
java.io.FileReader(java.io.File)
java.io.FileReader(java.io.FileDescriptor)
java.io.FileReader(java.lang.String)


Occurences of FileSystemAlreadyExistsException (constructors)

FileSystemAlreadyExistsException (constructors) occurences:
java.nio.file.FileSystemAlreadyExistsException()
java.nio.file.FileSystemAlreadyExistsException(java.lang.String)


Occurences of FileSystemException (constructors)

FileSystemException (constructors) occurences:
java.nio.file.FileSystemException(java.lang.String)
java.nio.file.FileSystemException(java.lang.String, java.lang.String, java.lang.String)


Occurences of FileSystemNotFoundException (constructors)

FileSystemNotFoundException (constructors) occurences:
java.nio.file.FileSystemNotFoundException()
java.nio.file.FileSystemNotFoundException(java.lang.String)


Occurences of FileWriter (constructors)

FileWriter (constructors) occurences:
java.io.FileWriter(java.io.File)
java.io.FileWriter(java.io.File, boolean)
java.io.FileWriter(java.io.FileDescriptor)
java.io.FileWriter(java.lang.String)
java.io.FileWriter(java.lang.String, boolean)


Occurences of FILE_CHOOSER

FILE_CHOOSER occurences:
javax.accessibility.FILE_CHOOSER
javax.swing.plaf.synth.FILE_CHOOSER


Occurences of fill

fill occurences:
java.awt.fill
java.awt.Graphics2D.fill(java.awt.Shape)
java.util.Arrays.fill(boolean:A, boolean)
java.util.Arrays.fill(boolean:A, int, int, boolean)
java.util.Arrays.fill(byte:A, byte)
java.util.Arrays.fill(byte:A, int, int, byte)
java.util.Arrays.fill(char:A, char)
java.util.Arrays.fill(char:A, int, int, char)
java.util.Arrays.fill(double:A, double)
java.util.Arrays.fill(double:A, int, int, double)
java.util.Arrays.fill(float:A, float)
java.util.Arrays.fill(float:A, int, int, float)
java.util.Arrays.fill(int:A, int)
java.util.Arrays.fill(int:A, int, int, int)
java.util.Arrays.fill(java.lang.Object:A, int, int, java.lang.Object)
java.util.Arrays.fill(java.lang.Object:A, java.lang.Object)
java.util.Arrays.fill(long:A, int, int, long)
java.util.Arrays.fill(long:A, long)
java.util.Arrays.fill(short:A, int, int, short)
java.util.Arrays.fill(short:A, short)
java.util.Collections.fill(java.util.List, java.lang.Object)
java.util.Collections.fill(java.util.List, T)
java.util.zip.InflaterInputStream.fill()


Occurences of fill3DRect

fill3DRect occurences:
java.awt.Graphics.fill3DRect(int, int, int, int, boolean)
java.awt.Graphics2D.fill3DRect(int, int, int, int, boolean)
javax.swing.DebugGraphics.fill3DRect(int, int, int, int, boolean)


Occurences of fillArc

fillArc occurences:
java.awt.Graphics.fillArc(int, int, int, int, int, int)
javax.swing.DebugGraphics.fillArc(int, int, int, int, int, int)


Occurences of fillOval

fillOval occurences:
java.awt.Graphics.fillOval(int, int, int, int)
javax.swing.DebugGraphics.fillOval(int, int, int, int)


Occurences of fillPolygon

fillPolygon occurences:
java.awt.Graphics.fillPolygon(int:A, int:A, int)
java.awt.Graphics.fillPolygon(java.awt.Polygon)
javax.swing.DebugGraphics.fillPolygon(int:A, int:A, int)


Occurences of fillRect

fillRect occurences:
java.awt.Graphics.fillRect(int, int, int, int)
javax.swing.DebugGraphics.fillRect(int, int, int, int)


Occurences of fillRoundRect

fillRoundRect occurences:
java.awt.Graphics.fillRoundRect(int, int, int, int, int, int)
javax.swing.DebugGraphics.fillRoundRect(int, int, int, int, int, int)


Occurences of filter

filter occurences:
java.awt.image.AffineTransformOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.AffineTransformOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.BandCombineOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.BufferedImageOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.ColorConvertOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.ColorConvertOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.ConvolveOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.ConvolveOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.LookupOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.LookupOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.RasterOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.awt.image.RescaleOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
java.awt.image.RescaleOp.filter(java.awt.image.Raster, java.awt.image.WritableRaster)
java.util.Locale.filter(java.util.List, java.util.Collection)
java.util.Locale.filter(java.util.List, java.util.Collection, java.util.Locale.FilteringMode)
java.util.Optional.filter(java.util.function.Predicate)
java.util.stream.DoubleStream.filter(java.util.function.DoublePredicate)
java.util.stream.IntStream.filter(java.util.function.IntPredicate)
java.util.stream.LongStream.filter(java.util.function.LongPredicate)
java.util.stream.Stream.filter(java.util.function.Predicate)
javax.imageio.spi.ServiceRegistry.Filter.filter(java.lang.Object)


Occurences of FilterBypass

FilterBypass occurences:
javax.swing.text.DocumentFilter.FilterBypass.FilterBypass()
javax.swing.text.NavigationFilter.FilterBypass.FilterBypass()


Occurences of filterRGB

filterRGB occurences:
java.awt.image.RGBImageFilter.filterRGB(int, int, int)
javax.swing.GrayFilter.filterRGB(int, int, int)


Occurences of filterTags

filterTags occurences:
java.util.Locale.filterTags(java.util.List, java.util.Collection)
java.util.Locale.filterTags(java.util.List, java.util.Collection, java.util.Locale.FilteringMode)


Occurences of FINAL

FINAL occurences:
java.lang.reflect.FINAL
javax.lang.model.element.FINAL


Occurences of finalize

finalize occurences:
java.awt.color.ICC_Profile.finalize()
java.awt.Graphics.finalize()
java.awt.image.ColorModel.finalize()
java.awt.image.IndexColorModel.finalize()
java.awt.PrintJob.finalize()
java.io.FileInputStream.finalize()
java.io.FileOutputStream.finalize()
java.lang.Enum.finalize()
java.lang.Object.finalize()
java.util.concurrent.ThreadPoolExecutor.finalize()
java.util.zip.Deflater.finalize()
java.util.zip.Inflater.finalize()
java.util.zip.ZipFile.finalize()
javax.crypto.ExemptionMechanism.finalize()
javax.imageio.spi.ServiceRegistry.finalize()
javax.imageio.stream.FileCacheImageInputStream.finalize()
javax.imageio.stream.FileImageInputStream.finalize()
javax.imageio.stream.FileImageOutputStream.finalize()
javax.imageio.stream.ImageInputStreamImpl.finalize()
javax.imageio.stream.MemoryCacheImageInputStream.finalize()


Occurences of find

find occurences:
java.nio.file.Files.find(java.nio.file.Path, int, java.util.function.BiPredicate, java.nio.file.FileVisitOption...)
java.util.regex.Matcher.find()
java.util.regex.Matcher.find(int)


Occurences of findAny

findAny occurences:
java.util.stream.DoubleStream.findAny()
java.util.stream.IntStream.findAny()
java.util.stream.LongStream.findAny()
java.util.stream.Stream.findAny()


Occurences of findAssociatedMBeans

findAssociatedMBeans occurences:
javax.management.relation.RelationService.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String)


Occurences of findClass

findClass occurences:
com.sun.javadoc.ClassDoc.findClass(java.lang.String)
com.sun.javadoc.PackageDoc.findClass(java.lang.String)
java.lang.ClassLoader.findClass(java.lang.String)
java.net.URLClassLoader.findClass(java.lang.String)
javax.management.loading.MLet.findClass(java.lang.String)


Occurences of findColumn

findColumn occurences:
java.sql.ResultSet.findColumn(java.lang.String)
javax.swing.table.AbstractTableModel.findColumn(java.lang.String)


Occurences of findComponentAt

findComponentAt occurences:
java.awt.Container.findComponentAt(int, int)
java.awt.Container.findComponentAt(java.awt.Point)


Occurences of findFirst

findFirst occurences:
java.util.stream.DoubleStream.findFirst()
java.util.stream.IntStream.findFirst()
java.util.stream.LongStream.findFirst()
java.util.stream.Stream.findFirst()


Occurences of findInLine

findInLine occurences:
java.util.Scanner.findInLine(java.lang.String)
java.util.Scanner.findInLine(java.util.regex.Pattern)


Occurences of findLibrary

findLibrary occurences:
java.lang.ClassLoader.findLibrary(java.lang.String)
javax.management.loading.MLet.findLibrary(java.lang.String)


Occurences of findReferencingRelations

findReferencingRelations occurences:
javax.management.relation.RelationService.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String)


Occurences of findRelationsOfType

findRelationsOfType occurences:
javax.management.relation.RelationService.findRelationsOfType(java.lang.String)
javax.management.relation.RelationServiceMBean.findRelationsOfType(java.lang.String)


Occurences of findResource

findResource occurences:
java.lang.ClassLoader.findResource(java.lang.String)
java.net.URLClassLoader.findResource(java.lang.String)


Occurences of findResources

findResources occurences:
java.lang.ClassLoader.findResources(java.lang.String)
java.net.URLClassLoader.findResources(java.lang.String)


Occurences of findWithinHorizon

findWithinHorizon occurences:
java.util.Scanner.findWithinHorizon(java.lang.String, int)
java.util.Scanner.findWithinHorizon(java.util.regex.Pattern, int)


Occurences of fine

fine occurences:
java.util.logging.Logger.fine(java.lang.String)
java.util.logging.Logger.fine(java.util.function.Supplier)


Occurences of finer

finer occurences:
java.util.logging.Logger.finer(java.lang.String)
java.util.logging.Logger.finer(java.util.function.Supplier)


Occurences of finest

finest occurences:
java.util.logging.Logger.finest(java.lang.String)
java.util.logging.Logger.finest(java.util.function.Supplier)


Occurences of finish

finish occurences:
java.util.zip.Deflater.finish()
java.util.zip.DeflaterOutputStream.finish()
java.util.zip.GZIPOutputStream.finish()
java.util.zip.InflaterOutputStream.finish()
java.util.zip.ZipOutputStream.finish()


Occurences of finishDraggingTo

finishDraggingTo occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.finishDraggingTo(int)
javax.swing.plaf.basic.BasicSplitPaneUI.finishDraggingTo(int)


Occurences of finished

finished occurences:
com.sun.source.util.TaskListener.finished(com.sun.source.util.TaskEvent)
java.util.zip.Deflater.finished()
java.util.zip.Inflater.finished()


Occurences of finishedPaintingChildren

finishedPaintingChildren occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.finishedPaintingChildren(javax.swing.JSplitPane, java.awt.Graphics)
javax.swing.plaf.multi.MultiSplitPaneUI.finishedPaintingChildren(javax.swing.JSplitPane, java.awt.Graphics)
javax.swing.plaf.SplitPaneUI.finishedPaintingChildren(javax.swing.JSplitPane, java.awt.Graphics)
javax.swing.plaf.synth.SynthSplitPaneUI.finishedPaintingChildren(javax.swing.JSplitPane, java.awt.Graphics)


Occurences of fireActionPerformed

fireActionPerformed occurences:
javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
javax.swing.JFileChooser.fireActionPerformed(java.lang.String)
javax.swing.JTextField.fireActionPerformed()
javax.swing.Timer.fireActionPerformed(java.awt.event.ActionEvent)


Occurences of fireChangedUpdate

fireChangedUpdate occurences:
javax.swing.text.AbstractDocument.fireChangedUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.html.HTMLDocument.fireChangedUpdate(javax.swing.event.DocumentEvent)


Occurences of fireContentsChanged

fireContentsChanged occurences:
javax.swing.AbstractListModel.fireContentsChanged(java.lang.Object, int, int)
javax.swing.plaf.basic.BasicDirectoryModel.fireContentsChanged()


Occurences of fireIndexedPropertyChange

fireIndexedPropertyChange occurences:
java.beans.PropertyChangeSupport.fireIndexedPropertyChange(java.lang.String, int, boolean, boolean)
java.beans.PropertyChangeSupport.fireIndexedPropertyChange(java.lang.String, int, int, int)
java.beans.PropertyChangeSupport.fireIndexedPropertyChange(java.lang.String, int, java.lang.Object, java.lang.Object)


Occurences of fireItemStateChanged

fireItemStateChanged occurences:
javax.swing.AbstractButton.fireItemStateChanged(java.awt.event.ItemEvent)
javax.swing.DefaultButtonModel.fireItemStateChanged(java.awt.event.ItemEvent)
javax.swing.JComboBox.fireItemStateChanged(java.awt.event.ItemEvent)


Occurences of firePopupMenuCanceled

firePopupMenuCanceled occurences:
javax.swing.JComboBox.firePopupMenuCanceled()
javax.swing.JPopupMenu.firePopupMenuCanceled()
javax.swing.plaf.basic.BasicComboPopup.firePopupMenuCanceled()


Occurences of firePopupMenuWillBecomeInvisible

firePopupMenuWillBecomeInvisible occurences:
javax.swing.JComboBox.firePopupMenuWillBecomeInvisible()
javax.swing.JPopupMenu.firePopupMenuWillBecomeInvisible()
javax.swing.plaf.basic.BasicComboPopup.firePopupMenuWillBecomeInvisible()


Occurences of firePopupMenuWillBecomeVisible

firePopupMenuWillBecomeVisible occurences:
javax.swing.JComboBox.firePopupMenuWillBecomeVisible()
javax.swing.JPopupMenu.firePopupMenuWillBecomeVisible()
javax.swing.plaf.basic.BasicComboPopup.firePopupMenuWillBecomeVisible()


Occurences of firePropertyChange

firePropertyChange occurences:
java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean)
java.awt.Component.firePropertyChange(java.lang.String, byte, byte)
java.awt.Component.firePropertyChange(java.lang.String, char, char)
java.awt.Component.firePropertyChange(java.lang.String, double, double)
java.awt.Component.firePropertyChange(java.lang.String, float, float)
java.awt.Component.firePropertyChange(java.lang.String, int, int)
java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
java.awt.Component.firePropertyChange(java.lang.String, long, long)
java.awt.Component.firePropertyChange(java.lang.String, short, short)
java.awt.KeyboardFocusManager.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextChildSupport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
java.beans.PropertyChangeSupport.firePropertyChange(java.beans.PropertyChangeEvent)
java.beans.PropertyChangeSupport.firePropertyChange(java.lang.String, boolean, boolean)
java.beans.PropertyChangeSupport.firePropertyChange(java.lang.String, int, int)
java.beans.PropertyChangeSupport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
java.beans.PropertyEditorSupport.firePropertyChange()
javax.accessibility.AccessibleContext.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.AbstractAction.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, boolean, boolean)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, byte, byte)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, char, char)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, double, double)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, float, float)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, int, int)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, long, long)
javax.swing.DefaultListCellRenderer.firePropertyChange(java.lang.String, short, short)
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(java.beans.PropertyChangeEvent)
javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean)
javax.swing.JComponent.firePropertyChange(java.lang.String, char, char)
javax.swing.JComponent.firePropertyChange(java.lang.String, int, int)
javax.swing.JViewport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.plaf.basic.BasicDirectoryModel.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.plaf.LayerUI.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.SwingWorker.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.table.DefaultTableCellRenderer.firePropertyChange(java.lang.String, boolean, boolean)
javax.swing.table.DefaultTableCellRenderer.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, boolean, boolean)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, byte, byte)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, char, char)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, double, double)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, float, float)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, int, int)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, long, long)
javax.swing.tree.DefaultTreeCellRenderer.firePropertyChange(java.lang.String, short, short)
javax.swing.UIDefaults.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)


Occurences of fireServiceAdded

fireServiceAdded occurences:
java.beans.beancontext.BeanContextServicesSupport.fireServiceAdded(java.beans.beancontext.BeanContextServiceAvailableEvent)
java.beans.beancontext.BeanContextServicesSupport.fireServiceAdded(java.lang.Class)


Occurences of fireServiceRevoked

fireServiceRevoked occurences:
java.beans.beancontext.BeanContextServicesSupport.fireServiceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
java.beans.beancontext.BeanContextServicesSupport.fireServiceRevoked(java.lang.Class, boolean)


Occurences of fireStateChanged

fireStateChanged occurences:
javax.swing.AbstractButton.fireStateChanged()
javax.swing.AbstractSpinnerModel.fireStateChanged()
javax.swing.colorchooser.DefaultColorSelectionModel.fireStateChanged()
javax.swing.DefaultBoundedRangeModel.fireStateChanged()
javax.swing.DefaultButtonModel.fireStateChanged()
javax.swing.DefaultSingleSelectionModel.fireStateChanged()
javax.swing.JProgressBar.fireStateChanged()
javax.swing.JSlider.fireStateChanged()
javax.swing.JSpinner.fireStateChanged()
javax.swing.JTabbedPane.fireStateChanged()
javax.swing.JViewport.fireStateChanged()
javax.swing.MenuSelectionManager.fireStateChanged()
javax.swing.text.DefaultCaret.fireStateChanged()
javax.swing.text.StyleContext.NamedStyle.fireStateChanged()


Occurences of fireUndoableEditUpdate

fireUndoableEditUpdate occurences:
javax.swing.text.AbstractDocument.fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent)
javax.swing.text.html.HTMLDocument.fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent)


Occurences of fireValueChanged

fireValueChanged occurences:
javax.swing.DefaultListSelectionModel.fireValueChanged(boolean)
javax.swing.DefaultListSelectionModel.fireValueChanged(int, int)
javax.swing.DefaultListSelectionModel.fireValueChanged(int, int, boolean)
javax.swing.JTree.fireValueChanged(javax.swing.event.TreeSelectionEvent)
javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(javax.swing.event.TreeSelectionEvent)


Occurences of fireVetoableChange

fireVetoableChange occurences:
java.awt.KeyboardFocusManager.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextChildSupport.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
java.beans.VetoableChangeSupport.fireVetoableChange(java.beans.PropertyChangeEvent)
java.beans.VetoableChangeSupport.fireVetoableChange(java.lang.String, boolean, boolean)
java.beans.VetoableChangeSupport.fireVetoableChange(java.lang.String, int, int)
java.beans.VetoableChangeSupport.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)


Occurences of first

first occurences:
java.awt.CardLayout.first(java.awt.Container)
java.sql.ResultSet.first()
java.text.BreakIterator.first()
java.text.CharacterIterator.first()
java.text.StringCharacterIterator.first()
java.util.concurrent.ConcurrentSkipListSet.first()
java.util.SortedSet.first()
java.util.TreeSet.first()
javax.swing.text.ElementIterator.first()
javax.swing.text.html.parser.ContentModel.first()
javax.swing.text.html.parser.ContentModel.first(java.lang.Object)
javax.swing.text.Segment.first()


Occurences of firstDayOfYear

firstDayOfYear occurences:
java.time.Month.firstDayOfYear(boolean)
java.time.temporal.TemporalAdjusters.firstDayOfYear()


Occurences of firstElement

firstElement occurences:
java.util.Vector.firstElement()
javax.swing.DefaultListModel.firstElement()


Occurences of firstEntry

firstEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.firstEntry()
java.util.NavigableMap.firstEntry()
java.util.TreeMap.firstEntry()


Occurences of firstKey

firstKey occurences:
java.util.concurrent.ConcurrentSkipListMap.firstKey()
java.util.SortedMap.firstKey()
java.util.TreeMap.firstKey()


Occurences of firstRow

firstRow occurences:
javax.swing.event.firstRow
javax.swing.firstRow


Occurences of firstSentenceTags

firstSentenceTags occurences:
com.sun.javadoc.Doc.firstSentenceTags()
com.sun.javadoc.Tag.firstSentenceTags()


Occurences of FixedHolder (constructors)

FixedHolder (constructors) occurences:
org.omg.CORBA.FixedHolder()
org.omg.CORBA.FixedHolder(java.math.BigDecimal)


Occurences of flags

flags occurences:
java.nio.file.attribute.AclEntry.flags()
java.util.regex.Pattern.flags()
org.omg.CORBA.NamedValue.flags()


Occurences of flatMap

flatMap occurences:
java.util.Optional.flatMap(java.util.function.Function)
java.util.stream.DoubleStream.flatMap(java.util.function.DoubleFunction)
java.util.stream.IntStream.flatMap(java.util.function.IntFunction)
java.util.stream.LongStream.flatMap(java.util.function.LongFunction)
java.util.stream.Stream.flatMap(java.util.function.Function)


Occurences of FlatteningPathIterator (constructors)

FlatteningPathIterator (constructors) occurences:
java.awt.geom.FlatteningPathIterator(java.awt.geom.PathIterator, double)
java.awt.geom.FlatteningPathIterator(java.awt.geom.PathIterator, double, int)


Occurences of flip

flip occurences:
java.awt.Component.FlipBufferStrategy.flip(java.awt.BufferCapabilities.FlipContents)
java.nio.Buffer.flip()
java.util.BitSet.flip(int)
java.util.BitSet.flip(int, int)


Occurences of flipEastAndWestAtEnds

flipEastAndWestAtEnds occurences:
javax.swing.text.BoxView.flipEastAndWestAtEnds(int, javax.swing.text.Position.Bias)
javax.swing.text.CompositeView.flipEastAndWestAtEnds(int, javax.swing.text.Position.Bias)
javax.swing.text.ParagraphView.flipEastAndWestAtEnds(int, javax.swing.text.Position.Bias)


Occurences of Float

Float occurences:
java.awt.geom.Arc2D.Float.Float()
java.awt.geom.Arc2D.Float.Float(float, float, float, float, float, float, int)
java.awt.geom.Arc2D.Float.Float(int)
java.awt.geom.Arc2D.Float.Float(java.awt.geom.Rectangle2D, float, float, int)
java.awt.geom.CubicCurve2D.Float.Float()
java.awt.geom.CubicCurve2D.Float.Float(float, float, float, float, float, float, float, float)
java.awt.geom.Ellipse2D.Float.Float()
java.awt.geom.Ellipse2D.Float.Float(float, float, float, float)
java.awt.geom.Line2D.Float.Float()
java.awt.geom.Line2D.Float.Float(float, float, float, float)
java.awt.geom.Line2D.Float.Float(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.Path2D.Float.Float()
java.awt.geom.Path2D.Float.Float(int)
java.awt.geom.Path2D.Float.Float(int, int)
java.awt.geom.Path2D.Float.Float(java.awt.Shape)
java.awt.geom.Path2D.Float.Float(java.awt.Shape, java.awt.geom.AffineTransform)
java.awt.geom.Point2D.Float.Float()
java.awt.geom.Point2D.Float.Float(float, float)
java.awt.geom.QuadCurve2D.Float.Float()
java.awt.geom.QuadCurve2D.Float.Float(float, float, float, float, float, float)
java.awt.geom.Rectangle2D.Float.Float()
java.awt.geom.Rectangle2D.Float.Float(float, float, float, float)
java.awt.geom.RoundRectangle2D.Float.Float()
java.awt.geom.RoundRectangle2D.Float.Float(float, float, float, float, float, float)
java.lang.Float


Occurences of FLOAT

FLOAT occurences:
java.sql.FLOAT
java.sql.FLOAT
javax.lang.model.type.FLOAT
javax.management.openmbean.FLOAT
javax.swing.text.html.FLOAT


Occurences of Float (constructors)

Float (constructors) occurences:
java.lang.Float(double)
java.lang.Float(float)
java.lang.Float(java.lang.String)


Occurences of FloatControl (constructors)

FloatControl (constructors) occurences:
javax.sound.sampled.FloatControl(javax.sound.sampled.FloatControl.Type, float, float, float, int, float, java.lang.String)
javax.sound.sampled.FloatControl(javax.sound.sampled.FloatControl.Type, float, float, float, int, float, java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of FloatHolder (constructors)

FloatHolder (constructors) occurences:
org.omg.CORBA.FloatHolder()
org.omg.CORBA.FloatHolder(float)


Occurences of FloatSeqHolder (constructors)

FloatSeqHolder (constructors) occurences:
org.omg.CORBA.FloatSeqHolder()
org.omg.CORBA.FloatSeqHolder(float:A)


Occurences of floatValue

floatValue occurences:
com.sun.jdi.PrimitiveValue.floatValue()
java.lang.Byte.floatValue()
java.lang.Double.floatValue()
java.lang.Float.floatValue()
java.lang.Integer.floatValue()
java.lang.Long.floatValue()
java.lang.Number.floatValue()
java.lang.Short.floatValue()
java.math.BigDecimal.floatValue()
java.math.BigInteger.floatValue()
java.util.concurrent.atomic.AtomicInteger.floatValue()
java.util.concurrent.atomic.AtomicLong.floatValue()
java.util.concurrent.atomic.DoubleAccumulator.floatValue()
java.util.concurrent.atomic.DoubleAdder.floatValue()
java.util.concurrent.atomic.LongAccumulator.floatValue()
java.util.concurrent.atomic.LongAdder.floatValue()


Occurences of floor

floor occurences:
java.lang.Math.floor(double)
java.lang.StrictMath.floor(double)
java.util.concurrent.ConcurrentSkipListSet.floor(E)
java.util.concurrent.ConcurrentSkipListSet.floor(java.lang.Object)
java.util.NavigableSet.floor(E)
java.util.NavigableSet.floor(java.lang.Object)
java.util.TreeSet.floor(E)
java.util.TreeSet.floor(java.lang.Object)


Occurences of floorDiv

floorDiv occurences:
java.lang.Math.floorDiv(int, int)
java.lang.Math.floorDiv(long, long)
java.lang.StrictMath.floorDiv(int, int)
java.lang.StrictMath.floorDiv(long, long)


Occurences of floorEntry

floorEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.floorEntry(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.floorEntry(K)
java.util.NavigableMap.floorEntry(java.lang.Object)
java.util.NavigableMap.floorEntry(K)
java.util.TreeMap.floorEntry(java.lang.Object)
java.util.TreeMap.floorEntry(K)


Occurences of floorKey

floorKey occurences:
java.util.concurrent.ConcurrentSkipListMap.floorKey(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.floorKey(K)
java.util.NavigableMap.floorKey(java.lang.Object)
java.util.NavigableMap.floorKey(K)
java.util.TreeMap.floorKey(java.lang.Object)
java.util.TreeMap.floorKey(K)


Occurences of floorMod

floorMod occurences:
java.lang.Math.floorMod(int, int)
java.lang.Math.floorMod(long, long)
java.lang.StrictMath.floorMod(int, int)
java.lang.StrictMath.floorMod(long, long)


Occurences of FlowLayout (constructors)

FlowLayout (constructors) occurences:
java.awt.FlowLayout()
java.awt.FlowLayout(int)
java.awt.FlowLayout(int, int, int)


Occurences of flush

flush occurences:
java.awt.Image.flush()
java.beans.XMLEncoder.flush()
java.io.BufferedOutputStream.flush()
java.io.BufferedWriter.flush()
java.io.CharArrayWriter.flush()
java.io.Console.flush()
java.io.DataOutputStream.flush()
java.io.FilterOutputStream.flush()
java.io.FilterWriter.flush()
java.io.Flushable.flush()
java.io.ObjectOutput.flush()
java.io.ObjectOutputStream.flush()
java.io.OutputStream.flush()
java.io.OutputStreamWriter.flush()
java.io.PipedOutputStream.flush()
java.io.PipedWriter.flush()
java.io.PrintStream.flush()
java.io.PrintWriter.flush()
java.io.StringWriter.flush()
java.io.Writer.flush()
java.nio.charset.CharsetDecoder.flush(java.nio.CharBuffer)
java.nio.charset.CharsetEncoder.flush(java.nio.ByteBuffer)
java.util.Formatter.flush()
java.util.logging.Handler.flush()
java.util.logging.MemoryHandler.flush()
java.util.logging.StreamHandler.flush()
java.util.prefs.AbstractPreferences.flush()
java.util.prefs.Preferences.flush()
java.util.zip.DeflaterOutputStream.flush()
java.util.zip.InflaterOutputStream.flush()
javax.crypto.CipherOutputStream.flush()
javax.imageio.stream.ImageInputStream.flush()
javax.imageio.stream.ImageInputStreamImpl.flush()
javax.sound.sampled.DataLine.flush()
javax.swing.text.html.HTMLDocument.HTMLReader.flush()
javax.swing.text.html.HTMLEditorKit.ParserCallback.flush()
javax.tools.ForwardingJavaFileManager.flush()
javax.tools.JavaFileManager.flush()
javax.xml.stream.XMLEventWriter.flush()
javax.xml.stream.XMLStreamWriter.flush()


Occurences of flushBefore

flushBefore occurences:
javax.imageio.stream.FileCacheImageOutputStream.flushBefore(long)
javax.imageio.stream.ImageInputStream.flushBefore(long)
javax.imageio.stream.ImageInputStreamImpl.flushBefore(long)
javax.imageio.stream.ImageOutputStream.flushBefore(long)
javax.imageio.stream.MemoryCacheImageInputStream.flushBefore(long)
javax.imageio.stream.MemoryCacheImageOutputStream.flushBefore(long)


Occurences of focusColor

focusColor occurences:
javax.swing.plaf.metal.focusColor
javax.swing.plaf.metal.focusColor
javax.swing.plaf.metal.focusColor


Occurences of FOCUSED

FOCUSED occurences:
javax.accessibility.FOCUSED
javax.swing.plaf.synth.FOCUSED


Occurences of FocusEvent (constructors)

FocusEvent (constructors) occurences:
java.awt.event.FocusEvent(java.awt.Component, int)
java.awt.event.FocusEvent(java.awt.Component, int, boolean)
java.awt.event.FocusEvent(java.awt.Component, int, boolean, java.awt.Component)


Occurences of focusGained

focusGained occurences:
java.awt.AWTEventMulticaster.focusGained(java.awt.event.FocusEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.focusGained(java.awt.event.FocusEvent)
java.awt.event.FocusAdapter.focusGained(java.awt.event.FocusEvent)
java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent)
javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicButtonListener.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicComboBoxEditor.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicListUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicSliderUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTableUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener.focusGained(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTreeUI.FocusHandler.focusGained(java.awt.event.FocusEvent)
javax.swing.text.DefaultCaret.focusGained(java.awt.event.FocusEvent)


Occurences of FocusHandler

FocusHandler occurences:
javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicListUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicSliderUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicTableUI.FocusHandler.FocusHandler()
javax.swing.plaf.basic.BasicTreeUI.FocusHandler.FocusHandler()


Occurences of focusListener

focusListener occurences:
javax.swing.plaf.basic.focusListener
javax.swing.plaf.basic.focusListener
javax.swing.plaf.basic.focusListener
javax.swing.plaf.basic.focusListener
javax.swing.plaf.basic.focusListener
javax.swing.plaf.basic.focusListener


Occurences of focusLost

focusLost occurences:
java.awt.AWTEventMulticaster.focusLost(java.awt.event.FocusEvent)
java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.focusLost(java.awt.event.FocusEvent)
java.awt.event.FocusAdapter.focusLost(java.awt.event.FocusEvent)
java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent)
javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicButtonListener.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicComboBoxEditor.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicListUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicSliderUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTableUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener.focusLost(java.awt.event.FocusEvent)
javax.swing.plaf.basic.BasicTreeUI.FocusHandler.focusLost(java.awt.event.FocusEvent)
javax.swing.text.DefaultCaret.focusLost(java.awt.event.FocusEvent)


Occurences of focusNextComponent

focusNextComponent occurences:
java.awt.DefaultKeyboardFocusManager.focusNextComponent(java.awt.Component)
java.awt.KeyboardFocusManager.focusNextComponent()
java.awt.KeyboardFocusManager.focusNextComponent(java.awt.Component)


Occurences of focusPreviousComponent

focusPreviousComponent occurences:
java.awt.DefaultKeyboardFocusManager.focusPreviousComponent(java.awt.Component)
java.awt.KeyboardFocusManager.focusPreviousComponent()
java.awt.KeyboardFocusManager.focusPreviousComponent(java.awt.Component)


Occurences of FOLIO

FOLIO occurences:
java.awt.FOLIO
javax.print.attribute.standard.FOLIO
javax.print.attribute.standard.FOLIO


Occurences of FONT

FONT occurences:
java.awt.font.FONT
javax.swing.text.html.FONT
javax.swing.text.html.FONT


Occurences of font

font occurences:
java.awt.font
java.awt.font
javax.swing.tree.font


Occurences of Font (constructors)

Font (constructors) occurences:
java.awt.Font(java.awt.Font)
java.awt.Font(java.lang.String, int, int)
java.awt.Font(java.util.Map)


Occurences of FontRenderContext (constructors)

FontRenderContext (constructors) occurences:
java.awt.font.FontRenderContext()
java.awt.font.FontRenderContext(java.awt.geom.AffineTransform, boolean, boolean)
java.awt.font.FontRenderContext(java.awt.geom.AffineTransform, java.lang.Object, java.lang.Object)


Occurences of FontUIResource (constructors)

FontUIResource (constructors) occurences:
javax.swing.plaf.FontUIResource(java.awt.Font)
javax.swing.plaf.FontUIResource(java.lang.String, int, int)


Occurences of force

force occurences:
java.nio.channels.AsynchronousFileChannel.force(boolean)
java.nio.channels.FileChannel.force(boolean)
java.nio.MappedByteBuffer.force()


Occurences of forEach

forEach occurences:
java.lang.Iterable.forEach(java.util.function.Consumer)
java.security.Provider.forEach(java.util.function.BiConsumer)
java.util.ArrayList.forEach(java.util.function.Consumer)
java.util.concurrent.ConcurrentHashMap.forEach(java.util.function.BiConsumer)
java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiConsumer)
java.util.concurrent.ConcurrentHashMap.forEach(long, java.util.function.BiFunction, java.util.function.Consumer)
java.util.concurrent.ConcurrentHashMap.KeySetView.forEach(java.util.function.Consumer)
java.util.concurrent.ConcurrentMap.forEach(java.util.function.BiConsumer)
java.util.concurrent.ConcurrentSkipListMap.forEach(java.util.function.BiConsumer)
java.util.concurrent.CopyOnWriteArrayList.forEach(java.util.function.Consumer)
java.util.concurrent.CopyOnWriteArraySet.forEach(java.util.function.Consumer)
java.util.HashMap.forEach(java.util.function.BiConsumer)
java.util.Hashtable.forEach(java.util.function.BiConsumer)
java.util.IdentityHashMap.forEach(java.util.function.BiConsumer)
java.util.LinkedHashMap.forEach(java.util.function.BiConsumer)
java.util.Map.forEach(java.util.function.BiConsumer)
java.util.stream.DoubleStream.forEach(java.util.function.DoubleConsumer)
java.util.stream.IntStream.forEach(java.util.function.IntConsumer)
java.util.stream.LongStream.forEach(java.util.function.LongConsumer)
java.util.stream.Stream.forEach(java.util.function.Consumer)
java.util.TreeMap.forEach(java.util.function.BiConsumer)
java.util.Vector.forEach(java.util.function.Consumer)
java.util.WeakHashMap.forEach(java.util.function.BiConsumer)


Occurences of forEachEntry

forEachEntry occurences:
java.util.concurrent.ConcurrentHashMap.forEachEntry(long, java.util.function.Consumer)
java.util.concurrent.ConcurrentHashMap.forEachEntry(long, java.util.function.Function, java.util.function.Consumer)


Occurences of forEachKey

forEachKey occurences:
java.util.concurrent.ConcurrentHashMap.forEachKey(long, java.util.function.Consumer)
java.util.concurrent.ConcurrentHashMap.forEachKey(long, java.util.function.Function, java.util.function.Consumer)


Occurences of forEachOrdered

forEachOrdered occurences:
java.util.stream.DoubleStream.forEachOrdered(java.util.function.DoubleConsumer)
java.util.stream.IntStream.forEachOrdered(java.util.function.IntConsumer)
java.util.stream.LongStream.forEachOrdered(java.util.function.LongConsumer)
java.util.stream.Stream.forEachOrdered(java.util.function.Consumer)


Occurences of forEachRemaining

forEachRemaining occurences:
java.util.Iterator.forEachRemaining(java.util.function.Consumer)
java.util.PrimitiveIterator.forEachRemaining(java.lang.Object)
java.util.PrimitiveIterator.forEachRemaining(T_CONS)
java.util.PrimitiveIterator.OfDouble.forEachRemaining(java.util.function.Consumer)
java.util.PrimitiveIterator.OfDouble.forEachRemaining(java.util.function.DoubleConsumer)
java.util.PrimitiveIterator.OfInt.forEachRemaining(java.util.function.Consumer)
java.util.PrimitiveIterator.OfInt.forEachRemaining(java.util.function.IntConsumer)
java.util.PrimitiveIterator.OfLong.forEachRemaining(java.util.function.Consumer)
java.util.PrimitiveIterator.OfLong.forEachRemaining(java.util.function.LongConsumer)
java.util.Spliterator.forEachRemaining(java.util.function.Consumer)
java.util.Spliterator.OfDouble.forEachRemaining(java.util.function.Consumer)
java.util.Spliterator.OfDouble.forEachRemaining(java.util.function.DoubleConsumer)
java.util.Spliterator.OfInt.forEachRemaining(java.util.function.Consumer)
java.util.Spliterator.OfInt.forEachRemaining(java.util.function.IntConsumer)
java.util.Spliterator.OfLong.forEachRemaining(java.util.function.Consumer)
java.util.Spliterator.OfLong.forEachRemaining(java.util.function.LongConsumer)
java.util.Spliterator.OfPrimitive.forEachRemaining(java.lang.Object)
java.util.Spliterator.OfPrimitive.forEachRemaining(T_CONS)


Occurences of forEachValue

forEachValue occurences:
java.util.concurrent.ConcurrentHashMap.forEachValue(long, java.util.function.Consumer)
java.util.concurrent.ConcurrentHashMap.forEachValue(long, java.util.function.Function, java.util.function.Consumer)


Occurences of FOREGROUND

FOREGROUND occurences:
java.awt.font.FOREGROUND
javax.swing.plaf.synth.FOREGROUND


Occurences of ForkJoinPool (constructors)

ForkJoinPool (constructors) occurences:
java.util.concurrent.ForkJoinPool()
java.util.concurrent.ForkJoinPool(int)
java.util.concurrent.ForkJoinPool(int, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.lang.Thread.UncaughtExceptionHandler, boolean)


Occurences of FORMAT

FORMAT occurences:
java.lang.FORMAT
java.util.FORMAT


Occurences of format

format occurences:
compact1.java.time.format
compact2.java.time.format
compact3.java.time.format
java.io.Console.format(java.lang.String, java.lang.Object...)
java.io.PrintStream.format(java.lang.String, java.lang.Object...)
java.io.PrintStream.format(java.util.Locale, java.lang.String, java.lang.Object...)
java.io.PrintWriter.format(java.lang.String, java.lang.Object...)
java.io.PrintWriter.format(java.util.Locale, java.lang.String, java.lang.Object...)
java.lang.String.format(java.lang.String, java.lang.Object...)
java.lang.String.format(java.util.Locale, java.lang.String, java.lang.Object...)
java.net.format
java.net.format
java.text.ChoiceFormat.format(double, java.lang.StringBuffer, java.text.FieldPosition)
java.text.ChoiceFormat.format(long, java.lang.StringBuffer, java.text.FieldPosition)
java.text.DateFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
java.text.DateFormat.format(java.util.Date)
java.text.DateFormat.format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)
java.text.DecimalFormat.format(double, java.lang.StringBuffer, java.text.FieldPosition)
java.text.DecimalFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
java.text.DecimalFormat.format(long, java.lang.StringBuffer, java.text.FieldPosition)
java.text.Format.format(java.lang.Object)
java.text.Format.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
java.text.MessageFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
java.text.MessageFormat.format(java.lang.Object:A, java.lang.StringBuffer, java.text.FieldPosition)
java.text.MessageFormat.format(java.lang.String, java.lang.Object...)
java.text.NumberFormat.format(double)
java.text.NumberFormat.format(double, java.lang.StringBuffer, java.text.FieldPosition)
java.text.NumberFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
java.text.NumberFormat.format(long)
java.text.NumberFormat.format(long, java.lang.StringBuffer, java.text.FieldPosition)
java.text.SimpleDateFormat.format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)
java.time.chrono.ChronoLocalDate.format(java.time.format.DateTimeFormatter)
java.time.chrono.ChronoLocalDateTime.format(java.time.format.DateTimeFormatter)
java.time.chrono.ChronoZonedDateTime.format(java.time.format.DateTimeFormatter)
java.time.format
java.time.format.DateTimeFormatter.format(java.time.temporal.TemporalAccessor)
java.time.LocalDate.format(java.time.format.DateTimeFormatter)
java.time.LocalDateTime.format(java.time.format.DateTimeFormatter)
java.time.LocalTime.format(java.time.format.DateTimeFormatter)
java.time.MonthDay.format(java.time.format.DateTimeFormatter)
java.time.OffsetDateTime.format(java.time.format.DateTimeFormatter)
java.time.OffsetTime.format(java.time.format.DateTimeFormatter)
java.time.Year.format(java.time.format.DateTimeFormatter)
java.time.YearMonth.format(java.time.format.DateTimeFormatter)
java.time.ZonedDateTime.format(java.time.format.DateTimeFormatter)
java.util.format
java.util.Formatter.format(java.lang.String, java.lang.Object...)
java.util.Formatter.format(java.util.Locale, java.lang.String, java.lang.Object...)
java.util.logging.Formatter.format(java.util.logging.LogRecord)
java.util.logging.SimpleFormatter.format(java.util.logging.LogRecord)
java.util.logging.XMLFormatter.format(java.util.logging.LogRecord)
javax.sound.sampled.format
org.omg.IOP.format


Occurences of FormatMismatch (constructors)

FormatMismatch (constructors) occurences:
org.omg.IOP.CodecPackage.FormatMismatch()
org.omg.IOP.CodecPackage.FormatMismatch(java.lang.String)


Occurences of Formatter

Formatter occurences:
java.util.Formatter
java.util.logging.Formatter


Occurences of Formatter (constructors)

Formatter (constructors) occurences:
java.util.Formatter()
java.util.Formatter(java.io.File)
java.util.Formatter(java.io.File, java.lang.String)
java.util.Formatter(java.io.File, java.lang.String, java.util.Locale)
java.util.Formatter(java.io.OutputStream)
java.util.Formatter(java.io.OutputStream, java.lang.String)
java.util.Formatter(java.io.OutputStream, java.lang.String, java.util.Locale)
java.util.Formatter(java.io.PrintStream)
java.util.Formatter(java.lang.Appendable)
java.util.Formatter(java.lang.Appendable, java.util.Locale)
java.util.Formatter(java.lang.String)
java.util.Formatter(java.lang.String, java.lang.String)
java.util.Formatter(java.lang.String, java.lang.String, java.util.Locale)
java.util.Formatter(java.util.Locale)
java.util.logging.Formatter()


Occurences of formatTo

formatTo occurences:
java.time.format.DateTimeFormatter.formatTo(java.time.temporal.TemporalAccessor, java.lang.Appendable)
java.util.Formattable.formatTo(java.util.Formatter, int, int, int)


Occurences of formatToCharacterIterator

formatToCharacterIterator occurences:
java.text.DecimalFormat.formatToCharacterIterator(java.lang.Object)
java.text.Format.formatToCharacterIterator(java.lang.Object)
java.text.MessageFormat.formatToCharacterIterator(java.lang.Object)
java.text.SimpleDateFormat.formatToCharacterIterator(java.lang.Object)


Occurences of forName

forName occurences:
java.lang.Character.UnicodeBlock.forName(java.lang.String)
java.lang.Character.UnicodeScript.forName(java.lang.String)
java.lang.Class.forName(java.lang.String)
java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
java.nio.charset.Charset.forName(java.lang.String)


Occurences of ForwardingFileObject (constructors)

ForwardingFileObject (constructors) occurences:
javax.tools.ForwardingFileObject(F)
javax.tools.ForwardingFileObject(javax.tools.FileObject)


Occurences of ForwardingJavaFileManager (constructors)

ForwardingJavaFileManager (constructors) occurences:
javax.tools.ForwardingJavaFileManager(javax.tools.JavaFileManager)
javax.tools.ForwardingJavaFileManager(M)


Occurences of ForwardingJavaFileObject (constructors)

ForwardingJavaFileObject (constructors) occurences:
javax.tools.ForwardingJavaFileObject(F)
javax.tools.ForwardingJavaFileObject(javax.tools.JavaFileObject)


Occurences of ForwardRequest

ForwardRequest occurences:
org.omg.PortableInterceptor.ForwardRequest
org.omg.PortableServer.ForwardRequest


Occurences of ForwardRequest (constructors)

ForwardRequest (constructors) occurences:
org.omg.PortableInterceptor.ForwardRequest()
org.omg.PortableInterceptor.ForwardRequest(java.lang.String, org.omg.CORBA.Object)
org.omg.PortableInterceptor.ForwardRequest(org.omg.CORBA.Object)
org.omg.PortableServer.ForwardRequest()
org.omg.PortableServer.ForwardRequest(java.lang.String, org.omg.CORBA.Object)
org.omg.PortableServer.ForwardRequest(org.omg.CORBA.Object)


Occurences of ForwardRequestHelper

ForwardRequestHelper occurences:
org.omg.PortableInterceptor.ForwardRequestHelper
org.omg.PortableServer.ForwardRequestHelper


Occurences of ForwardRequestHelper (constructors)

ForwardRequestHelper (constructors) occurences:
org.omg.PortableInterceptor.ForwardRequestHelper()
org.omg.PortableServer.ForwardRequestHelper()


Occurences of forwardUpdate

forwardUpdate occurences:
javax.swing.text.BoxView.forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.TableView.forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.View.forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)


Occurences of forward_reference

forward_reference occurences:
org.omg.PortableInterceptor.RequestInfoOperations.forward_reference()
org.omg.PortableServer.forward_reference


Occurences of frame

frame occurences:
com.sun.jdi.ThreadReference.frame(int)
javax.swing.plaf.basic.frame
javax.swing.plaf.basic.frame
javax.swing.plaf.basic.frame


Occurences of FRAME

FRAME occurences:
javax.accessibility.FRAME
javax.swing.FRAME
javax.swing.text.html.FRAME


Occurences of Frame (constructors)

Frame (constructors) occurences:
java.awt.Frame()
java.awt.Frame(java.awt.GraphicsConfiguration)
java.awt.Frame(java.lang.String)
java.awt.Frame(java.lang.String, java.awt.GraphicsConfiguration)


Occurences of frames

frames occurences:
com.sun.jdi.ThreadReference.frames()
com.sun.jdi.ThreadReference.frames(int, int)


Occurences of frameSize

frameSize occurences:
javax.sound.sampled.frameSize
javax.sound.sampled.frameSize


Occurences of free

free occurences:
java.sql.Array.free()
java.sql.Blob.free()
java.sql.Clob.free()
java.sql.SQLXML.free()
javax.sql.rowset.serial.SerialArray.free()
javax.sql.rowset.serial.SerialBlob.free()
javax.sql.rowset.serial.SerialClob.free()


Occurences of FREE_MEM (constructors)

FREE_MEM (constructors) occurences:
org.omg.CORBA.FREE_MEM()
org.omg.CORBA.FREE_MEM(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.FREE_MEM(java.lang.String)
org.omg.CORBA.FREE_MEM(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of Frequently Asked Questions

Frequently Asked Questions occurences:
Frequently Asked Questions
Frequently Asked Questions


Occurences of FRIDAY

FRIDAY occurences:
java.time.FRIDAY
java.util.FRIDAY


Occurences of from

from occurences:
java.lang.management.LockInfo.from(javax.management.openmbean.CompositeData)
java.lang.management.MemoryNotificationInfo.from(javax.management.openmbean.CompositeData)
java.lang.management.MemoryUsage.from(javax.management.openmbean.CompositeData)
java.lang.management.MonitorInfo.from(javax.management.openmbean.CompositeData)
java.lang.management.ThreadInfo.from(javax.management.openmbean.CompositeData)
java.lang.ProcessBuilder.Redirect.from(java.io.File)
java.nio.file.attribute.FileTime.from(java.time.Instant)
java.nio.file.attribute.FileTime.from(long, java.util.concurrent.TimeUnit)
java.sql.Timestamp.from(java.time.Instant)
java.time.chrono.ChronoLocalDate.from(java.time.temporal.TemporalAccessor)
java.time.chrono.ChronoLocalDateTime.from(java.time.temporal.TemporalAccessor)
java.time.chrono.Chronology.from(java.time.temporal.TemporalAccessor)
java.time.chrono.ChronoZonedDateTime.from(java.time.temporal.TemporalAccessor)
java.time.chrono.HijrahDate.from(java.time.temporal.TemporalAccessor)
java.time.chrono.JapaneseDate.from(java.time.temporal.TemporalAccessor)
java.time.chrono.MinguoDate.from(java.time.temporal.TemporalAccessor)
java.time.chrono.ThaiBuddhistDate.from(java.time.temporal.TemporalAccessor)
java.time.DayOfWeek.from(java.time.temporal.TemporalAccessor)
java.time.Duration.from(java.time.temporal.TemporalAmount)
java.time.Instant.from(java.time.temporal.TemporalAccessor)
java.time.LocalDate.from(java.time.temporal.TemporalAccessor)
java.time.LocalDateTime.from(java.time.temporal.TemporalAccessor)
java.time.LocalTime.from(java.time.temporal.TemporalAccessor)
java.time.Month.from(java.time.temporal.TemporalAccessor)
java.time.MonthDay.from(java.time.temporal.TemporalAccessor)
java.time.OffsetDateTime.from(java.time.temporal.TemporalAccessor)
java.time.OffsetTime.from(java.time.temporal.TemporalAccessor)
java.time.Period.from(java.time.temporal.TemporalAmount)
java.time.Year.from(java.time.temporal.TemporalAccessor)
java.time.YearMonth.from(java.time.temporal.TemporalAccessor)
java.time.ZonedDateTime.from(java.time.temporal.TemporalAccessor)
java.time.ZoneId.from(java.time.temporal.TemporalAccessor)
java.time.ZoneOffset.from(java.time.temporal.TemporalAccessor)
java.util.Date.from(java.time.Instant)
java.util.GregorianCalendar.from(java.time.ZonedDateTime)


Occurences of fromCIEXYZ

fromCIEXYZ occurences:
java.awt.color.ColorSpace.fromCIEXYZ(float:A)
java.awt.color.ICC_ColorSpace.fromCIEXYZ(float:A)


Occurences of fromRGB

fromRGB occurences:
java.awt.color.ColorSpace.fromRGB(float:A)
java.awt.color.ICC_ColorSpace.fromRGB(float:A)


Occurences of fromString

fromString occurences:
java.nio.file.attribute.PosixFilePermissions.fromString(java.lang.String)
java.util.UUID.fromString(java.lang.String)


Occurences of from_any

from_any occurences:
org.omg.CORBA.DynAny.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyOperations.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynAnyStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynArrayStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynEnumStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynFixedStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynSequenceStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynStructStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynUnionStub.from_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynValueStub.from_any(org.omg.CORBA.Any)


Occurences of from_int

from_int occurences:
org.omg.CORBA.CompletionStatus.from_int(int)
org.omg.CORBA.DefinitionKind.from_int(int)
org.omg.CORBA.ParameterMode.from_int(int)
org.omg.CORBA.SetOverrideType.from_int(int)
org.omg.CORBA.TCKind.from_int(int)
org.omg.CosNaming.BindingType.from_int(int)
org.omg.CosNaming.NamingContextPackage.NotFoundReason.from_int(int)
org.omg.PortableServer.IdAssignmentPolicyValue.from_int(int)
org.omg.PortableServer.IdUniquenessPolicyValue.from_int(int)
org.omg.PortableServer.ImplicitActivationPolicyValue.from_int(int)
org.omg.PortableServer.LifespanPolicyValue.from_int(int)
org.omg.PortableServer.POAManagerPackage.State.from_int(int)
org.omg.PortableServer.RequestProcessingPolicyValue.from_int(int)
org.omg.PortableServer.ServantRetentionPolicyValue.from_int(int)
org.omg.PortableServer.ThreadPolicyValue.from_int(int)


Occurences of FULL

FULL occurences:
java.text.FULL
java.time.format.FULL
java.time.format.FULL


Occurences of function

function occurences:
compact1.java.util.function
compact2.java.util.function
compact3.java.util.function
java.util.function


Occurences of FutureTask (constructors)

FutureTask (constructors) occurences:
java.util.concurrent.FutureTask(java.lang.Runnable, java.lang.Object)
java.util.concurrent.FutureTask(java.lang.Runnable, V)
java.util.concurrent.FutureTask(java.util.concurrent.Callable)


Occurences of GapContent (constructors)

GapContent (constructors) occurences:
javax.swing.text.GapContent()
javax.swing.text.GapContent(int)


Occurences of gc

gc occurences:
java.lang.management.MemoryMXBean.gc()
java.lang.Runtime.gc()
java.lang.System.gc()


Occurences of GCMParameterSpec (constructors)

GCMParameterSpec (constructors) occurences:
javax.crypto.spec.GCMParameterSpec(int, byte:A)
javax.crypto.spec.GCMParameterSpec(int, byte:A, int, int)


Occurences of GeneralPath (constructors)

GeneralPath (constructors) occurences:
java.awt.geom.GeneralPath()
java.awt.geom.GeneralPath(int)
java.awt.geom.GeneralPath(int, int)
java.awt.geom.GeneralPath(java.awt.Shape)


Occurences of GeneralSecurityException (constructors)

GeneralSecurityException (constructors) occurences:
java.security.GeneralSecurityException()
java.security.GeneralSecurityException(java.lang.String)
java.security.GeneralSecurityException(java.lang.String, java.lang.Throwable)
java.security.GeneralSecurityException(java.lang.Throwable)


Occurences of generate

generate occurences:
com.sun.source.util.JavacTask.generate()
java.util.stream.DoubleStream.generate(java.util.function.DoubleSupplier)
java.util.stream.IntStream.generate(java.util.function.IntSupplier)
java.util.stream.LongStream.generate(java.util.function.LongSupplier)
java.util.stream.Stream.generate(java.util.function.Supplier)


Occurences of generateCertPath

generateCertPath occurences:
java.security.cert.CertificateFactory.generateCertPath(java.io.InputStream)
java.security.cert.CertificateFactory.generateCertPath(java.io.InputStream, java.lang.String)
java.security.cert.CertificateFactory.generateCertPath(java.util.List)


Occurences of generateKeyPair

generateKeyPair occurences:
java.security.KeyPairGenerator.generateKeyPair()
java.security.KeyPairGeneratorSpi.generateKeyPair()


Occurences of generateSecret

generateSecret occurences:
javax.crypto.KeyAgreement.generateSecret()
javax.crypto.KeyAgreement.generateSecret(byte:A, int)
javax.crypto.KeyAgreement.generateSecret(java.lang.String)
javax.crypto.SecretKeyFactory.generateSecret(java.security.spec.KeySpec)


Occurences of genericMethodType

genericMethodType occurences:
java.lang.invoke.MethodType.genericMethodType(int)
java.lang.invoke.MethodType.genericMethodType(int, boolean)


Occurences of genericSignature

genericSignature occurences:
com.sun.jdi.LocalVariable.genericSignature()
com.sun.jdi.ReferenceType.genericSignature()
com.sun.jdi.TypeComponent.genericSignature()


Occurences of GenericSignatureFormatError (constructors)

GenericSignatureFormatError (constructors) occurences:
java.lang.reflect.GenericSignatureFormatError()
java.lang.reflect.GenericSignatureFormatError(java.lang.String)


Occurences of genExemptionBlob

genExemptionBlob occurences:
javax.crypto.ExemptionMechanism.genExemptionBlob()
javax.crypto.ExemptionMechanism.genExemptionBlob(byte:A)
javax.crypto.ExemptionMechanism.genExemptionBlob(byte:A, int)


Occurences of GEORGIAN

GEORGIAN occurences:
java.lang.GEORGIAN
java.lang.GEORGIAN


Occurences of get

get occurences:
java.awt.RenderingHints.get(java.lang.Object)
java.beans.Encoder.get(java.lang.Object)
java.io.ObjectInputStream.GetField.get(java.lang.String, boolean)
java.io.ObjectInputStream.GetField.get(java.lang.String, byte)
java.io.ObjectInputStream.GetField.get(java.lang.String, char)
java.io.ObjectInputStream.GetField.get(java.lang.String, double)
java.io.ObjectInputStream.GetField.get(java.lang.String, float)
java.io.ObjectInputStream.GetField.get(java.lang.String, int)
java.io.ObjectInputStream.GetField.get(java.lang.String, java.lang.Object)
java.io.ObjectInputStream.GetField.get(java.lang.String, long)
java.io.ObjectInputStream.GetField.get(java.lang.String, short)
java.lang.ClassValue.get(java.lang.Class)
java.lang.ref.PhantomReference.get()
java.lang.ref.Reference.get()
java.lang.ref.SoftReference.get()
java.lang.reflect.Array.get(java.lang.Object, int)
java.lang.reflect.Field.get(java.lang.Object)
java.lang.ThreadLocal.get()
java.net.CookieHandler.get(java.net.URI, java.util.Map)
java.net.CookieManager.get(java.net.URI, java.util.Map)
java.net.CookieStore.get(java.net.URI)
java.net.ResponseCache.get(java.net.URI, java.lang.String, java.util.Map)
java.nio.ByteBuffer.get()
java.nio.ByteBuffer.get(byte:A)
java.nio.ByteBuffer.get(byte:A, int, int)
java.nio.ByteBuffer.get(int)
java.nio.CharBuffer.get()
java.nio.CharBuffer.get(char:A)
java.nio.CharBuffer.get(char:A, int, int)
java.nio.CharBuffer.get(int)
java.nio.DoubleBuffer.get()
java.nio.DoubleBuffer.get(double:A)
java.nio.DoubleBuffer.get(double:A, int, int)
java.nio.DoubleBuffer.get(int)
java.nio.file.Paths.get(java.lang.String, java.lang.String...)
java.nio.file.Paths.get(java.net.URI)
java.nio.FloatBuffer.get()
java.nio.FloatBuffer.get(float:A)
java.nio.FloatBuffer.get(float:A, int, int)
java.nio.FloatBuffer.get(int)
java.nio.IntBuffer.get()
java.nio.IntBuffer.get(int)
java.nio.IntBuffer.get(int:A)
java.nio.IntBuffer.get(int:A, int, int)
java.nio.LongBuffer.get()
java.nio.LongBuffer.get(int)
java.nio.LongBuffer.get(long:A)
java.nio.LongBuffer.get(long:A, int, int)
java.nio.ShortBuffer.get()
java.nio.ShortBuffer.get(int)
java.nio.ShortBuffer.get(short:A)
java.nio.ShortBuffer.get(short:A, int, int)
java.rmi.MarshalledObject.get()
java.security.Provider.get(java.lang.Object)
java.time.chrono.ChronoPeriod.get(java.time.temporal.TemporalUnit)
java.time.chrono.ChronoZonedDateTime.get(java.time.temporal.TemporalField)
java.time.chrono.Era.get(java.time.temporal.TemporalField)
java.time.DayOfWeek.get(java.time.temporal.TemporalField)
java.time.Duration.get(java.time.temporal.TemporalUnit)
java.time.Instant.get(java.time.temporal.TemporalField)
java.time.LocalDate.get(java.time.temporal.TemporalField)
java.time.LocalDateTime.get(java.time.temporal.TemporalField)
java.time.LocalTime.get(java.time.temporal.TemporalField)
java.time.Month.get(java.time.temporal.TemporalField)
java.time.MonthDay.get(java.time.temporal.TemporalField)
java.time.OffsetDateTime.get(java.time.temporal.TemporalField)
java.time.OffsetTime.get(java.time.temporal.TemporalField)
java.time.Period.get(java.time.temporal.TemporalUnit)
java.time.temporal.TemporalAccessor.get(java.time.temporal.TemporalField)
java.time.temporal.TemporalAmount.get(java.time.temporal.TemporalUnit)
java.time.Year.get(java.time.temporal.TemporalField)
java.time.YearMonth.get(java.time.temporal.TemporalField)
java.time.ZonedDateTime.get(java.time.temporal.TemporalField)
java.time.ZoneOffset.get(java.time.temporal.TemporalField)
java.util.AbstractList.get(int)
java.util.AbstractMap.get(java.lang.Object)
java.util.AbstractSequentialList.get(int)
java.util.ArrayList.get(int)
java.util.BitSet.get(int)
java.util.BitSet.get(int, int)
java.util.Calendar.get(int)
java.util.concurrent.atomic.AtomicBoolean.get()
java.util.concurrent.atomic.AtomicInteger.get()
java.util.concurrent.atomic.AtomicIntegerArray.get(int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.get(java.lang.Object)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.get(T)
java.util.concurrent.atomic.AtomicLong.get()
java.util.concurrent.atomic.AtomicLongArray.get(int)
java.util.concurrent.atomic.AtomicLongFieldUpdater.get(java.lang.Object)
java.util.concurrent.atomic.AtomicLongFieldUpdater.get(T)
java.util.concurrent.atomic.AtomicMarkableReference.get(boolean:A)
java.util.concurrent.atomic.AtomicReference.get()
java.util.concurrent.atomic.AtomicReferenceArray.get(int)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.get(java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.get(T)
java.util.concurrent.atomic.AtomicStampedReference.get(int:A)
java.util.concurrent.atomic.DoubleAccumulator.get()
java.util.concurrent.atomic.LongAccumulator.get()
java.util.concurrent.CompletableFuture.get()
java.util.concurrent.CompletableFuture.get(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentHashMap.get(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.get(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.get(int)
java.util.concurrent.ForkJoinTask.get()
java.util.concurrent.ForkJoinTask.get(long, java.util.concurrent.TimeUnit)
java.util.concurrent.Future.get()
java.util.concurrent.Future.get(long, java.util.concurrent.TimeUnit)
java.util.concurrent.FutureTask.get()
java.util.concurrent.FutureTask.get(long, java.util.concurrent.TimeUnit)
java.util.Dictionary.get(java.lang.Object)
java.util.EnumMap.get(java.lang.Object)
java.util.function.Supplier.get()
java.util.HashMap.get(java.lang.Object)
java.util.Hashtable.get(java.lang.Object)
java.util.IdentityHashMap.get(java.lang.Object)
java.util.jar.Attributes.get(java.lang.Object)
java.util.LinkedHashMap.get(java.lang.Object)
java.util.LinkedList.get(int)
java.util.List.get(int)
java.util.Map.get(java.lang.Object)
java.util.Optional.get()
java.util.prefs.AbstractPreferences.get(java.lang.String, java.lang.String)
java.util.prefs.Preferences.get(java.lang.String, java.lang.String)
java.util.TreeMap.get(java.lang.Object)
java.util.Vector.get(int)
java.util.WeakHashMap.get(java.lang.Object)
javax.accessibility.AccessibleRelationSet.get(java.lang.String)
javax.activation.MimeTypeParameterList.get(java.lang.String)
javax.management.openmbean.CompositeData.get(java.lang.String)
javax.management.openmbean.CompositeDataSupport.get(java.lang.String)
javax.management.openmbean.TabularData.get(java.lang.Object:A)
javax.management.openmbean.TabularDataSupport.get(java.lang.Object)
javax.management.openmbean.TabularDataSupport.get(java.lang.Object:A)
javax.naming.CompositeName.get(int)
javax.naming.CompoundName.get(int)
javax.naming.directory.Attribute.get()
javax.naming.directory.Attribute.get(int)
javax.naming.directory.Attributes.get(java.lang.String)
javax.naming.directory.BasicAttribute.get()
javax.naming.directory.BasicAttribute.get(int)
javax.naming.directory.BasicAttributes.get(java.lang.String)
javax.naming.ldap.LdapName.get(int)
javax.naming.Name.get(int)
javax.naming.Reference.get(int)
javax.naming.Reference.get(java.lang.String)
javax.print.attribute.AttributeSet.get(java.lang.Class)
javax.print.attribute.HashAttributeSet.get(java.lang.Class)
javax.script.AbstractScriptEngine.get(java.lang.String)
javax.script.Bindings.get(java.lang.Object)
javax.script.ScriptEngine.get(java.lang.String)
javax.script.ScriptEngineManager.get(java.lang.String)
javax.script.SimpleBindings.get(java.lang.Object)
javax.sound.midi.Track.get(int)
javax.swing.ActionMap.get(java.lang.Object)
javax.swing.DefaultListModel.get(int)
javax.swing.InputMap.get(javax.swing.KeyStroke)
javax.swing.plaf.nimbus.NimbusStyle.get(javax.swing.plaf.synth.SynthContext, java.lang.Object)
javax.swing.plaf.synth.SynthStyle.get(javax.swing.plaf.synth.SynthContext, java.lang.Object)
javax.swing.SwingWorker.get()
javax.swing.SwingWorker.get(long, java.util.concurrent.TimeUnit)
javax.swing.UIDefaults.get(java.lang.Object)
javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale)
javax.swing.UIManager.get(java.lang.Object)
javax.swing.UIManager.get(java.lang.Object, java.util.Locale)
javax.xml.crypto.dom.DOMCryptoContext.get(java.lang.Object)
javax.xml.crypto.XMLCryptoContext.get(java.lang.Object)
javax.xml.soap.SOAPConnection.get(java.lang.Object)


Occurences of getAcceleratorForeground

getAcceleratorForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getAcceleratorForeground()
javax.swing.plaf.metal.MetalTheme.getAcceleratorForeground()


Occurences of getAcceleratorSelectedForeground

getAcceleratorSelectedForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getAcceleratorSelectedForeground()
javax.swing.plaf.metal.MetalTheme.getAcceleratorSelectedForeground()


Occurences of getAcceptAllFileFilter

getAcceptAllFileFilter occurences:
javax.swing.JFileChooser.getAcceptAllFileFilter()
javax.swing.plaf.basic.BasicFileChooserUI.getAcceptAllFileFilter(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.getAcceptAllFileFilter(javax.swing.JFileChooser)
javax.swing.plaf.multi.MultiFileChooserUI.getAcceptAllFileFilter(javax.swing.JFileChooser)


Occurences of getAccessibleAction

getAccessibleAction occurences:
java.awt.Button.AccessibleAWTButton.getAccessibleAction()
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleAction()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleAction()
java.awt.Choice.AccessibleAWTChoice.getAccessibleAction()
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleAction()
javax.accessibility.AccessibleContext.getAccessibleAction()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleAction()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleAction()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleAction()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleAction()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAction()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAction()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAction()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleAction()


Occurences of getAccessibleActionAnchor

getAccessibleActionAnchor occurences:
javax.accessibility.AccessibleHyperlink.getAccessibleActionAnchor(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionAnchor(int)


Occurences of getAccessibleActionCount

getAccessibleActionCount occurences:
java.awt.Button.AccessibleAWTButton.getAccessibleActionCount()
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleActionCount()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleActionCount()
java.awt.Choice.AccessibleAWTChoice.getAccessibleActionCount()
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleActionCount()
javax.accessibility.AccessibleAction.getAccessibleActionCount()
javax.accessibility.AccessibleHyperlink.getAccessibleActionCount()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleActionCount()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleActionCount()
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionCount()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleActionCount()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleActionCount()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleActionCount()


Occurences of getAccessibleActionDescription

getAccessibleActionDescription occurences:
java.awt.Button.AccessibleAWTButton.getAccessibleActionDescription(int)
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleActionDescription(int)
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleActionDescription(int)
java.awt.Choice.AccessibleAWTChoice.getAccessibleActionDescription(int)
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleActionDescription(int)
javax.accessibility.AccessibleAction.getAccessibleActionDescription(int)
javax.accessibility.AccessibleHyperlink.getAccessibleActionDescription(int)
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleActionDescription(int)
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleActionDescription(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionDescription(int)
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleActionDescription(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleActionDescription(int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleActionDescription(int)


Occurences of getAccessibleActionObject

getAccessibleActionObject occurences:
javax.accessibility.AccessibleHyperlink.getAccessibleActionObject(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionObject(int)


Occurences of getAccessibleAt

getAccessibleAt occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleAt(java.awt.Point)
java.awt.Container.AccessibleAWTContainer.getAccessibleAt(java.awt.Point)
java.awt.List.AccessibleAWTList.getAccessibleAt(java.awt.Point)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleAt(java.awt.Point)
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleAt(java.awt.Point)
javax.accessibility.AccessibleComponent.getAccessibleAt(java.awt.Point)
javax.accessibility.AccessibleTable.getAccessibleAt(int, int)
javax.swing.JEditorPane.AccessibleJEditorPaneHTML.getAccessibleAt(java.awt.Point)
javax.swing.JList.AccessibleJList.getAccessibleAt(java.awt.Point)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleAt(java.awt.Point)
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleAt(java.awt.Point)
javax.swing.JTable.AccessibleJTable.getAccessibleAt(int, int)
javax.swing.JTable.AccessibleJTable.getAccessibleAt(java.awt.Point)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAt(java.awt.Point)
javax.swing.JTree.AccessibleJTree.getAccessibleAt(java.awt.Point)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAt(java.awt.Point)
javax.swing.SwingUtilities.getAccessibleAt(java.awt.Component, java.awt.Point)
javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleAt(java.awt.Point)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAt(java.awt.Point)


Occurences of getAccessibleCaption

getAccessibleCaption occurences:
javax.accessibility.AccessibleTable.getAccessibleCaption()
javax.swing.JTable.AccessibleJTable.getAccessibleCaption()


Occurences of getAccessibleChild

getAccessibleChild occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleChild(int)
java.awt.Container.AccessibleAWTContainer.getAccessibleChild(int)
java.awt.List.AccessibleAWTList.getAccessibleChild(int)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleChild(int)
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleChild(int)
javax.accessibility.AccessibleContext.getAccessibleChild(int)
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleChild(int)
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleChild(int)
javax.swing.JComponent.AccessibleJComponent.getAccessibleChild(int)
javax.swing.JEditorPane.AccessibleJEditorPaneHTML.getAccessibleChild(int)
javax.swing.JList.AccessibleJList.getAccessibleChild(int)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleChild(int)
javax.swing.JMenu.AccessibleJMenu.getAccessibleChild(int)
javax.swing.JRootPane.AccessibleJRootPane.getAccessibleChild(int)
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleChild(int)
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleChild(int)
javax.swing.JTable.AccessibleJTable.getAccessibleChild(int)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleChild(int)
javax.swing.JTree.AccessibleJTree.getAccessibleChild(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleChild(int)
javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiButtonUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiColorChooserUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiComboBoxUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiDesktopIconUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiDesktopPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiFileChooserUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiInternalFrameUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiLabelUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiListUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiMenuBarUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiMenuItemUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiOptionPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiPanelUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiPopupMenuUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiProgressBarUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiRootPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiScrollBarUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiScrollPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiSeparatorUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiSliderUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiSpinnerUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiSplitPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiTabbedPaneUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiTableHeaderUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiTableUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiTextUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiToolBarUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiToolTipUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiTreeUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.plaf.multi.MultiViewportUI.getAccessibleChild(javax.swing.JComponent, int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleChild(int)
javax.swing.SwingUtilities.getAccessibleChild(java.awt.Component, int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleChild(int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleChild(int)


Occurences of getAccessibleChildrenCount

getAccessibleChildrenCount occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleChildrenCount()
java.awt.Container.AccessibleAWTContainer.getAccessibleChildrenCount()
java.awt.List.AccessibleAWTList.getAccessibleChildrenCount()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleChildrenCount()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleChildrenCount()
javax.accessibility.AccessibleContext.getAccessibleChildrenCount()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleChildrenCount()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleChildrenCount()
javax.swing.JComponent.AccessibleJComponent.getAccessibleChildrenCount()
javax.swing.JEditorPane.AccessibleJEditorPaneHTML.getAccessibleChildrenCount()
javax.swing.JList.AccessibleJList.getAccessibleChildrenCount()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleChildrenCount()
javax.swing.JMenu.AccessibleJMenu.getAccessibleChildrenCount()
javax.swing.JRootPane.AccessibleJRootPane.getAccessibleChildrenCount()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleChildrenCount()
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleChildrenCount()
javax.swing.JTable.AccessibleJTable.getAccessibleChildrenCount()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleChildrenCount()
javax.swing.JTree.AccessibleJTree.getAccessibleChildrenCount()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleChildrenCount()
javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.getAccessibleChildrenCount(javax.swing.JComponent)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleChildrenCount()
javax.swing.SwingUtilities.getAccessibleChildrenCount(java.awt.Component)
javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleChildrenCount()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleChildrenCount()


Occurences of getAccessibleColumn

getAccessibleColumn occurences:
javax.accessibility.AccessibleExtendedTable.getAccessibleColumn(int)
javax.swing.JTable.AccessibleJTable.getAccessibleColumn(int)


Occurences of getAccessibleColumnCount

getAccessibleColumnCount occurences:
javax.accessibility.AccessibleTable.getAccessibleColumnCount()
javax.swing.JTable.AccessibleJTable.getAccessibleColumnCount()


Occurences of getAccessibleColumnDescription

getAccessibleColumnDescription occurences:
javax.accessibility.AccessibleTable.getAccessibleColumnDescription(int)
javax.swing.JTable.AccessibleJTable.getAccessibleColumnDescription(int)


Occurences of getAccessibleColumnExtentAt

getAccessibleColumnExtentAt occurences:
javax.accessibility.AccessibleTable.getAccessibleColumnExtentAt(int, int)
javax.swing.JTable.AccessibleJTable.getAccessibleColumnExtentAt(int, int)


Occurences of getAccessibleColumnHeader

getAccessibleColumnHeader occurences:
javax.accessibility.AccessibleTable.getAccessibleColumnHeader()
javax.swing.JTable.AccessibleJTable.getAccessibleColumnHeader()


Occurences of getAccessibleComponent

getAccessibleComponent occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleComponent()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleComponent()
javax.accessibility.AccessibleContext.getAccessibleComponent()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleComponent()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleComponent()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleComponent()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleComponent()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleComponent()


Occurences of getAccessibleContext

getAccessibleContext occurences:
java.applet.Applet.getAccessibleContext()
java.awt.Button.getAccessibleContext()
java.awt.Canvas.getAccessibleContext()
java.awt.Checkbox.getAccessibleContext()
java.awt.CheckboxMenuItem.getAccessibleContext()
java.awt.Choice.getAccessibleContext()
java.awt.Component.getAccessibleContext()
java.awt.Dialog.getAccessibleContext()
java.awt.Frame.getAccessibleContext()
java.awt.Label.getAccessibleContext()
java.awt.List.getAccessibleContext()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleContext()
java.awt.Menu.getAccessibleContext()
java.awt.MenuBar.getAccessibleContext()
java.awt.MenuComponent.getAccessibleContext()
java.awt.MenuItem.getAccessibleContext()
java.awt.Panel.getAccessibleContext()
java.awt.PopupMenu.getAccessibleContext()
java.awt.Scrollbar.getAccessibleContext()
java.awt.ScrollPane.getAccessibleContext()
java.awt.TextArea.getAccessibleContext()
java.awt.TextComponent.getAccessibleContext()
java.awt.TextField.getAccessibleContext()
java.awt.Window.getAccessibleContext()
javax.accessibility.Accessible.getAccessibleContext()
javax.swing.Box.getAccessibleContext()
javax.swing.Box.Filler.getAccessibleContext()
javax.swing.CellRendererPane.getAccessibleContext()
javax.swing.ImageIcon.getAccessibleContext()
javax.swing.JApplet.getAccessibleContext()
javax.swing.JButton.getAccessibleContext()
javax.swing.JCheckBox.getAccessibleContext()
javax.swing.JCheckBoxMenuItem.getAccessibleContext()
javax.swing.JColorChooser.getAccessibleContext()
javax.swing.JComboBox.getAccessibleContext()
javax.swing.JDesktopPane.getAccessibleContext()
javax.swing.JDialog.getAccessibleContext()
javax.swing.JEditorPane.getAccessibleContext()
javax.swing.JFileChooser.getAccessibleContext()
javax.swing.JFrame.getAccessibleContext()
javax.swing.JInternalFrame.getAccessibleContext()
javax.swing.JInternalFrame.JDesktopIcon.getAccessibleContext()
javax.swing.JLabel.getAccessibleContext()
javax.swing.JLayer.getAccessibleContext()
javax.swing.JLayeredPane.getAccessibleContext()
javax.swing.JList.getAccessibleContext()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleContext()
javax.swing.JMenu.getAccessibleContext()
javax.swing.JMenuBar.getAccessibleContext()
javax.swing.JMenuItem.getAccessibleContext()
javax.swing.JOptionPane.getAccessibleContext()
javax.swing.JPanel.getAccessibleContext()
javax.swing.JPasswordField.getAccessibleContext()
javax.swing.JPopupMenu.getAccessibleContext()
javax.swing.JProgressBar.getAccessibleContext()
javax.swing.JRadioButton.getAccessibleContext()
javax.swing.JRadioButtonMenuItem.getAccessibleContext()
javax.swing.JRootPane.getAccessibleContext()
javax.swing.JScrollBar.getAccessibleContext()
javax.swing.JScrollPane.getAccessibleContext()
javax.swing.JSeparator.getAccessibleContext()
javax.swing.JSlider.getAccessibleContext()
javax.swing.JSpinner.getAccessibleContext()
javax.swing.JSplitPane.getAccessibleContext()
javax.swing.JTabbedPane.getAccessibleContext()
javax.swing.JTable.getAccessibleContext()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleContext()
javax.swing.JTextArea.getAccessibleContext()
javax.swing.JTextField.getAccessibleContext()
javax.swing.JToggleButton.getAccessibleContext()
javax.swing.JToolBar.getAccessibleContext()
javax.swing.JToolTip.getAccessibleContext()
javax.swing.JTree.getAccessibleContext()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleContext()
javax.swing.JViewport.getAccessibleContext()
javax.swing.JWindow.getAccessibleContext()
javax.swing.plaf.basic.BasicComboPopup.getAccessibleContext()
javax.swing.ProgressMonitor.getAccessibleContext()
javax.swing.table.JTableHeader.getAccessibleContext()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleContext()
javax.swing.text.html.HTMLEditorKit.getAccessibleContext()
javax.swing.text.JTextComponent.getAccessibleContext()


Occurences of getAccessibleDescription

getAccessibleDescription occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleDescription()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleDescription()
javax.accessibility.AccessibleContext.getAccessibleDescription()
javax.swing.JComponent.AccessibleJComponent.getAccessibleDescription()
javax.swing.JEditorPane.AccessibleJEditorPane.getAccessibleDescription()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleDescription()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleDescription()
javax.swing.JToolTip.AccessibleJToolTip.getAccessibleDescription()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleDescription()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleDescription()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleDescription()


Occurences of getAccessibleEditableText

getAccessibleEditableText occurences:
javax.accessibility.AccessibleContext.getAccessibleEditableText()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleEditableText()


Occurences of getAccessibleIcon

getAccessibleIcon occurences:
javax.accessibility.AccessibleContext.getAccessibleIcon()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleIcon()
javax.swing.JLabel.AccessibleJLabel.getAccessibleIcon()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleIcon()


Occurences of getAccessibleIconDescription

getAccessibleIconDescription occurences:
javax.accessibility.AccessibleIcon.getAccessibleIconDescription()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleIconDescription()


Occurences of getAccessibleIconHeight

getAccessibleIconHeight occurences:
javax.accessibility.AccessibleIcon.getAccessibleIconHeight()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleIconHeight()


Occurences of getAccessibleIconWidth

getAccessibleIconWidth occurences:
javax.accessibility.AccessibleIcon.getAccessibleIconWidth()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleIconWidth()


Occurences of getAccessibleIndex

getAccessibleIndex occurences:
javax.accessibility.AccessibleExtendedTable.getAccessibleIndex(int, int)
javax.swing.JTable.AccessibleJTable.getAccessibleIndex(int, int)


Occurences of getAccessibleIndexInParent

getAccessibleIndexInParent occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleIndexInParent()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleIndexInParent()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleIndexInParent()
javax.accessibility.AccessibleContext.getAccessibleIndexInParent()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleIndexInParent()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleIndexInParent()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleIndexInParent()
javax.swing.JTree.AccessibleJTree.getAccessibleIndexInParent()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleIndexInParent()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleIndexInParent()
javax.swing.SwingUtilities.getAccessibleIndexInParent(java.awt.Component)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleIndexInParent()


Occurences of getAccessibleKeyBinding

getAccessibleKeyBinding occurences:
javax.accessibility.AccessibleExtendedComponent.getAccessibleKeyBinding()
javax.accessibility.AccessibleKeyBinding.getAccessibleKeyBinding(int)
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleKeyBinding()
javax.swing.JComponent.AccessibleJComponent.getAccessibleKeyBinding()
javax.swing.JLabel.AccessibleJLabel.getAccessibleKeyBinding()


Occurences of getAccessibleName

getAccessibleName occurences:
java.awt.Button.AccessibleAWTButton.getAccessibleName()
java.awt.Component.AccessibleAWTComponent.getAccessibleName()
java.awt.Label.AccessibleAWTLabel.getAccessibleName()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleName()
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleName()
javax.accessibility.AccessibleContext.getAccessibleName()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleName()
javax.swing.JComponent.AccessibleJComponent.getAccessibleName()
javax.swing.JDialog.AccessibleJDialog.getAccessibleName()
javax.swing.JFrame.AccessibleJFrame.getAccessibleName()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleName()
javax.swing.JLabel.AccessibleJLabel.getAccessibleName()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleName()
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleName()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleName()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleName()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleName()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleName()


Occurences of getAccessibleParent

getAccessibleParent occurences:
java.awt.Component.AccessibleAWTComponent.getAccessibleParent()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleParent()
javax.accessibility.AccessibleContext.getAccessibleParent()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleParent()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleParent()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleParent()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleParent()


Occurences of getAccessibleRelationSet

getAccessibleRelationSet occurences:
javax.accessibility.AccessibleContext.getAccessibleRelationSet()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleRelationSet()
javax.swing.JLabel.AccessibleJLabel.getAccessibleRelationSet()


Occurences of getAccessibleRole

getAccessibleRole occurences:
java.applet.Applet.AccessibleApplet.getAccessibleRole()
java.awt.Button.AccessibleAWTButton.getAccessibleRole()
java.awt.Canvas.AccessibleAWTCanvas.getAccessibleRole()
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleRole()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleRole()
java.awt.Choice.AccessibleAWTChoice.getAccessibleRole()
java.awt.Component.AccessibleAWTComponent.getAccessibleRole()
java.awt.Dialog.AccessibleAWTDialog.getAccessibleRole()
java.awt.Frame.AccessibleAWTFrame.getAccessibleRole()
java.awt.Label.AccessibleAWTLabel.getAccessibleRole()
java.awt.List.AccessibleAWTList.getAccessibleRole()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleRole()
java.awt.Menu.AccessibleAWTMenu.getAccessibleRole()
java.awt.MenuBar.AccessibleAWTMenuBar.getAccessibleRole()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleRole()
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleRole()
java.awt.Panel.AccessibleAWTPanel.getAccessibleRole()
java.awt.PopupMenu.AccessibleAWTPopupMenu.getAccessibleRole()
java.awt.Scrollbar.AccessibleAWTScrollBar.getAccessibleRole()
java.awt.ScrollPane.AccessibleAWTScrollPane.getAccessibleRole()
java.awt.TextComponent.AccessibleAWTTextComponent.getAccessibleRole()
java.awt.Window.AccessibleAWTWindow.getAccessibleRole()
javax.accessibility.AccessibleContext.getAccessibleRole()
javax.swing.Box.AccessibleBox.getAccessibleRole()
javax.swing.Box.Filler.AccessibleBoxFiller.getAccessibleRole()
javax.swing.CellRendererPane.AccessibleCellRendererPane.getAccessibleRole()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleRole()
javax.swing.JButton.AccessibleJButton.getAccessibleRole()
javax.swing.JCheckBox.AccessibleJCheckBox.getAccessibleRole()
javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem.getAccessibleRole()
javax.swing.JColorChooser.AccessibleJColorChooser.getAccessibleRole()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleRole()
javax.swing.JComponent.AccessibleJComponent.getAccessibleRole()
javax.swing.JDesktopPane.AccessibleJDesktopPane.getAccessibleRole()
javax.swing.JFileChooser.AccessibleJFileChooser.getAccessibleRole()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleRole()
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getAccessibleRole()
javax.swing.JLabel.AccessibleJLabel.getAccessibleRole()
javax.swing.JLayeredPane.AccessibleJLayeredPane.getAccessibleRole()
javax.swing.JList.AccessibleJList.getAccessibleRole()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleRole()
javax.swing.JMenu.AccessibleJMenu.getAccessibleRole()
javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleRole()
javax.swing.JMenuItem.AccessibleJMenuItem.getAccessibleRole()
javax.swing.JOptionPane.AccessibleJOptionPane.getAccessibleRole()
javax.swing.JPanel.AccessibleJPanel.getAccessibleRole()
javax.swing.JPasswordField.AccessibleJPasswordField.getAccessibleRole()
javax.swing.JPopupMenu.AccessibleJPopupMenu.getAccessibleRole()
javax.swing.JProgressBar.AccessibleJProgressBar.getAccessibleRole()
javax.swing.JRadioButton.AccessibleJRadioButton.getAccessibleRole()
javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem.getAccessibleRole()
javax.swing.JRootPane.AccessibleJRootPane.getAccessibleRole()
javax.swing.JScrollBar.AccessibleJScrollBar.getAccessibleRole()
javax.swing.JScrollPane.AccessibleJScrollPane.getAccessibleRole()
javax.swing.JSeparator.AccessibleJSeparator.getAccessibleRole()
javax.swing.JSlider.AccessibleJSlider.getAccessibleRole()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleRole()
javax.swing.JSplitPane.AccessibleJSplitPane.getAccessibleRole()
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleRole()
javax.swing.JTable.AccessibleJTable.getAccessibleRole()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleRole()
javax.swing.JToggleButton.AccessibleJToggleButton.getAccessibleRole()
javax.swing.JToolBar.AccessibleJToolBar.getAccessibleRole()
javax.swing.JToolTip.AccessibleJToolTip.getAccessibleRole()
javax.swing.JTree.AccessibleJTree.getAccessibleRole()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleRole()
javax.swing.JViewport.AccessibleJViewport.getAccessibleRole()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleRole()
javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleRole()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleRole()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleRole()


Occurences of getAccessibleRow

getAccessibleRow occurences:
javax.accessibility.AccessibleExtendedTable.getAccessibleRow(int)
javax.swing.JTable.AccessibleJTable.getAccessibleRow(int)


Occurences of getAccessibleRowCount

getAccessibleRowCount occurences:
javax.accessibility.AccessibleTable.getAccessibleRowCount()
javax.swing.JTable.AccessibleJTable.getAccessibleRowCount()


Occurences of getAccessibleRowDescription

getAccessibleRowDescription occurences:
javax.accessibility.AccessibleTable.getAccessibleRowDescription(int)
javax.swing.JTable.AccessibleJTable.getAccessibleRowDescription(int)


Occurences of getAccessibleRowExtentAt

getAccessibleRowExtentAt occurences:
javax.accessibility.AccessibleTable.getAccessibleRowExtentAt(int, int)
javax.swing.JTable.AccessibleJTable.getAccessibleRowExtentAt(int, int)


Occurences of getAccessibleRowHeader

getAccessibleRowHeader occurences:
javax.accessibility.AccessibleTable.getAccessibleRowHeader()
javax.swing.JTable.AccessibleJTable.getAccessibleRowHeader()


Occurences of getAccessibleSelection

getAccessibleSelection occurences:
java.awt.List.AccessibleAWTList.getAccessibleSelection()
java.awt.List.AccessibleAWTList.getAccessibleSelection(int)
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleSelection()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleSelection(int)
javax.accessibility.AccessibleContext.getAccessibleSelection()
javax.accessibility.AccessibleSelection.getAccessibleSelection(int)
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleSelection()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleSelection(int)
javax.swing.JList.AccessibleJList.getAccessibleSelection()
javax.swing.JList.AccessibleJList.getAccessibleSelection(int)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleSelection()
javax.swing.JMenu.AccessibleJMenu.getAccessibleSelection()
javax.swing.JMenu.AccessibleJMenu.getAccessibleSelection(int)
javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleSelection()
javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleSelection(int)
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleSelection()
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleSelection(int)
javax.swing.JTable.AccessibleJTable.getAccessibleSelection()
javax.swing.JTable.AccessibleJTable.getAccessibleSelection(int)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleSelection()
javax.swing.JTree.AccessibleJTree.getAccessibleSelection()
javax.swing.JTree.AccessibleJTree.getAccessibleSelection(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelection()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelection(int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleSelection()


Occurences of getAccessibleSelectionCount

getAccessibleSelectionCount occurences:
java.awt.List.AccessibleAWTList.getAccessibleSelectionCount()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleSelectionCount()
javax.accessibility.AccessibleSelection.getAccessibleSelectionCount()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleSelectionCount()
javax.swing.JList.AccessibleJList.getAccessibleSelectionCount()
javax.swing.JMenu.AccessibleJMenu.getAccessibleSelectionCount()
javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleSelectionCount()
javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleSelectionCount()
javax.swing.JTable.AccessibleJTable.getAccessibleSelectionCount()
javax.swing.JTree.AccessibleJTree.getAccessibleSelectionCount()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelectionCount()


Occurences of getAccessibleStateSet

getAccessibleStateSet occurences:
java.applet.Applet.AccessibleApplet.getAccessibleStateSet()
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleStateSet()
java.awt.Component.AccessibleAWTComponent.getAccessibleStateSet()
java.awt.Dialog.AccessibleAWTDialog.getAccessibleStateSet()
java.awt.Frame.AccessibleAWTFrame.getAccessibleStateSet()
java.awt.List.AccessibleAWTList.getAccessibleStateSet()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleStateSet()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getAccessibleStateSet()
java.awt.Scrollbar.AccessibleAWTScrollBar.getAccessibleStateSet()
java.awt.TextArea.AccessibleAWTTextArea.getAccessibleStateSet()
java.awt.TextComponent.AccessibleAWTTextComponent.getAccessibleStateSet()
java.awt.TextField.AccessibleAWTTextField.getAccessibleStateSet()
java.awt.Window.AccessibleAWTWindow.getAccessibleStateSet()
javax.accessibility.AccessibleContext.getAccessibleStateSet()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleStateSet()
javax.swing.ImageIcon.AccessibleImageIcon.getAccessibleStateSet()
javax.swing.JComboBox.AccessibleJComboBox.getAccessibleStateSet()
javax.swing.JComponent.AccessibleJComponent.getAccessibleStateSet()
javax.swing.JDialog.AccessibleJDialog.getAccessibleStateSet()
javax.swing.JEditorPane.AccessibleJEditorPane.getAccessibleStateSet()
javax.swing.JFrame.AccessibleJFrame.getAccessibleStateSet()
javax.swing.JList.AccessibleJList.getAccessibleStateSet()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleStateSet()
javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleStateSet()
javax.swing.JProgressBar.AccessibleJProgressBar.getAccessibleStateSet()
javax.swing.JScrollBar.AccessibleJScrollBar.getAccessibleStateSet()
javax.swing.JSlider.AccessibleJSlider.getAccessibleStateSet()
javax.swing.JSplitPane.AccessibleJSplitPane.getAccessibleStateSet()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleStateSet()
javax.swing.JTextArea.AccessibleJTextArea.getAccessibleStateSet()
javax.swing.JTextField.AccessibleJTextField.getAccessibleStateSet()
javax.swing.JToolBar.AccessibleJToolBar.getAccessibleStateSet()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleStateSet()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleStateSet()
javax.swing.SwingUtilities.getAccessibleStateSet(java.awt.Component)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleStateSet()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleStateSet()


Occurences of getAccessibleSummary

getAccessibleSummary occurences:
javax.accessibility.AccessibleTable.getAccessibleSummary()
javax.swing.JTable.AccessibleJTable.getAccessibleSummary()


Occurences of getAccessibleTable

getAccessibleTable occurences:
javax.accessibility.AccessibleContext.getAccessibleTable()
javax.swing.JTable.AccessibleJTable.getAccessibleTable()


Occurences of getAccessibleText

getAccessibleText occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getAccessibleText()
javax.accessibility.AccessibleContext.getAccessibleText()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleText()
javax.swing.JEditorPane.AccessibleJEditorPaneHTML.getAccessibleText()
javax.swing.JLabel.AccessibleJLabel.getAccessibleText()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleText()
javax.swing.JPasswordField.AccessibleJPasswordField.getAccessibleText()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleText()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleText()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleText()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleText()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleText()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleText()


Occurences of getAccessibleValue

getAccessibleValue occurences:
java.awt.Button.AccessibleAWTButton.getAccessibleValue()
java.awt.Checkbox.AccessibleAWTCheckbox.getAccessibleValue()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleValue()
java.awt.MenuItem.AccessibleAWTMenuItem.getAccessibleValue()
java.awt.Scrollbar.AccessibleAWTScrollBar.getAccessibleValue()
javax.accessibility.AccessibleContext.getAccessibleValue()
javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleValue()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleValue()
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getAccessibleValue()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleValue()
javax.swing.JProgressBar.AccessibleJProgressBar.getAccessibleValue()
javax.swing.JScrollBar.AccessibleJScrollBar.getAccessibleValue()
javax.swing.JSlider.AccessibleJSlider.getAccessibleValue()
javax.swing.JSpinner.AccessibleJSpinner.getAccessibleValue()
javax.swing.JSplitPane.AccessibleJSplitPane.getAccessibleValue()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleValue()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleValue()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAccessibleValue()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleValue()


Occurences of getAccessLevel

getAccessLevel occurences:
javax.tools.ForwardingJavaFileObject.getAccessLevel()
javax.tools.JavaFileObject.getAccessLevel()
javax.tools.SimpleJavaFileObject.getAccessLevel()


Occurences of getACHuffmanTables

getACHuffmanTables occurences:
javax.imageio.plugins.jpeg.JPEGImageReadParam.getACHuffmanTables()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.getACHuffmanTables()


Occurences of getAction

getAction occurences:
java.beans.EventHandler.getAction()
javax.swing.AbstractButton.getAction()
javax.swing.JComboBox.getAction()
javax.swing.JTextField.getAction()
javax.swing.text.Keymap.getAction(javax.swing.KeyStroke)


Occurences of getActionCommand

getActionCommand occurences:
java.awt.Button.getActionCommand()
java.awt.event.ActionEvent.getActionCommand()
java.awt.MenuItem.getActionCommand()
java.awt.TrayIcon.getActionCommand()
javax.swing.AbstractButton.getActionCommand()
javax.swing.ButtonModel.getActionCommand()
javax.swing.DefaultButtonModel.getActionCommand()
javax.swing.JComboBox.getActionCommand()
javax.swing.Timer.getActionCommand()


Occurences of getActionListeners

getActionListeners occurences:
java.awt.Button.getActionListeners()
java.awt.List.getActionListeners()
java.awt.MenuItem.getActionListeners()
java.awt.TextField.getActionListeners()
java.awt.TrayIcon.getActionListeners()
javax.swing.AbstractButton.getActionListeners()
javax.swing.DefaultButtonModel.getActionListeners()
javax.swing.JComboBox.getActionListeners()
javax.swing.JFileChooser.getActionListeners()
javax.swing.JTextField.getActionListeners()
javax.swing.Timer.getActionListeners()


Occurences of getActionMap

getActionMap occurences:
javax.swing.JComponent.getActionMap()
javax.swing.plaf.metal.MetalFileChooserUI.getActionMap()


Occurences of getActions

getActions occurences:
java.io.FilePermission.getActions()
java.net.SocketPermission.getActions()
java.net.URLPermission.getActions()
java.security.AllPermission.getActions()
java.security.BasicPermission.getActions()
java.security.Permission.getActions()
java.security.UnresolvedPermission.getActions()
java.util.PropertyPermission.getActions()
javax.management.MBeanPermission.getActions()
javax.security.auth.kerberos.ServicePermission.getActions()
javax.security.auth.PrivateCredentialPermission.getActions()
javax.swing.JFormattedTextField.getActions()
javax.swing.JFormattedTextField.AbstractFormatter.getActions()
javax.swing.JTextField.getActions()
javax.swing.text.DefaultEditorKit.getActions()
javax.swing.text.EditorKit.getActions()
javax.swing.text.html.HTMLEditorKit.getActions()
javax.swing.text.InternationalFormatter.getActions()
javax.swing.text.JTextComponent.getActions()
javax.swing.text.StyledEditorKit.getActions()


Occurences of getActualMaximum

getActualMaximum occurences:
java.util.Calendar.getActualMaximum(int)
java.util.GregorianCalendar.getActualMaximum(int)


Occurences of getActualMinimum

getActualMinimum occurences:
java.util.Calendar.getActualMinimum(int)
java.util.GregorianCalendar.getActualMinimum(int)


Occurences of getAdapter

getAdapter occurences:
javax.xml.bind.helpers.AbstractMarshallerImpl.getAdapter(java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getAdapter(java.lang.Class)
javax.xml.bind.Marshaller.getAdapter(java.lang.Class)
javax.xml.bind.Unmarshaller.getAdapter(java.lang.Class)


Occurences of getAdditionalBeanInfo

getAdditionalBeanInfo occurences:
java.beans.BeanInfo.getAdditionalBeanInfo()
java.beans.SimpleBeanInfo.getAdditionalBeanInfo()


Occurences of getAdditionalHeight

getAdditionalHeight occurences:
javax.swing.plaf.metal.MetalIconFactory.FileIcon16.getAdditionalHeight()
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.getAdditionalHeight()
javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon.getAdditionalHeight()
javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon.getAdditionalHeight()


Occurences of getAddress

getAddress occurences:
java.net.DatagramPacket.getAddress()
java.net.Inet4Address.getAddress()
java.net.Inet6Address.getAddress()
java.net.InetAddress.getAddress()
java.net.InetSocketAddress.getAddress()
java.net.InterfaceAddress.getAddress()
javax.management.remote.JMXAddressable.getAddress()
javax.management.remote.JMXConnectorServerMBean.getAddress()
javax.management.remote.rmi.RMIConnector.getAddress()
javax.management.remote.rmi.RMIConnectorServer.getAddress()


Occurences of getAdjustmentListeners

getAdjustmentListeners occurences:
java.awt.Scrollbar.getAdjustmentListeners()
java.awt.ScrollPaneAdjustable.getAdjustmentListeners()
javax.swing.JScrollBar.getAdjustmentListeners()


Occurences of getAdler

getAdler occurences:
java.util.zip.Deflater.getAdler()
java.util.zip.Inflater.getAdler()


Occurences of getAdvance

getAdvance occurences:
java.awt.font.GlyphMetrics.getAdvance()
java.awt.font.GraphicAttribute.getAdvance()
java.awt.font.ImageGraphicAttribute.getAdvance()
java.awt.font.ShapeGraphicAttribute.getAdvance()
java.awt.font.TextLayout.getAdvance()


Occurences of getAfterIndex

getAfterIndex occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getAfterIndex(int, int)
javax.accessibility.AccessibleText.getAfterIndex(int, int)
javax.swing.AbstractButton.AccessibleAbstractButton.getAfterIndex(int, int)
javax.swing.JLabel.AccessibleJLabel.getAfterIndex(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getAfterIndex(int, int)
javax.swing.JSpinner.AccessibleJSpinner.getAfterIndex(int, int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAfterIndex(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAfterIndex(int, int)


Occurences of getAlgorithm

getAlgorithm occurences:
java.security.AlgorithmParameterGenerator.getAlgorithm()
java.security.AlgorithmParameters.getAlgorithm()
java.security.cert.CertPathBuilder.getAlgorithm()
java.security.cert.CertPathValidator.getAlgorithm()
java.security.Key.getAlgorithm()
java.security.KeyFactory.getAlgorithm()
java.security.KeyPairGenerator.getAlgorithm()
java.security.MessageDigest.getAlgorithm()
java.security.Provider.Service.getAlgorithm()
java.security.SecureRandom.getAlgorithm()
java.security.Signature.getAlgorithm()
java.security.SignedObject.getAlgorithm()
javax.crypto.Cipher.getAlgorithm()
javax.crypto.KeyAgreement.getAlgorithm()
javax.crypto.KeyGenerator.getAlgorithm()
javax.crypto.Mac.getAlgorithm()
javax.crypto.SealedObject.getAlgorithm()
javax.crypto.SecretKeyFactory.getAlgorithm()
javax.crypto.spec.PSource.getAlgorithm()
javax.crypto.spec.SecretKeySpec.getAlgorithm()
javax.net.ssl.KeyManagerFactory.getAlgorithm()
javax.net.ssl.TrustManagerFactory.getAlgorithm()
javax.security.auth.kerberos.KerberosKey.getAlgorithm()
javax.xml.crypto.AlgorithmMethod.getAlgorithm()
javax.xml.crypto.dsig.TransformService.getAlgorithm()


Occurences of getAlignment

getAlignment occurences:
java.awt.FlowLayout.getAlignment()
java.awt.font.GraphicAttribute.getAlignment()
java.awt.Label.getAlignment()
javax.swing.text.BoxView.getAlignment(int)
javax.swing.text.ComponentView.getAlignment(int)
javax.swing.text.GlyphView.getAlignment(int)
javax.swing.text.html.BlockView.getAlignment(int)
javax.swing.text.html.ImageView.getAlignment(int)
javax.swing.text.html.ListView.getAlignment(int)
javax.swing.text.IconView.getAlignment(int)
javax.swing.text.ParagraphView.getAlignment(int)
javax.swing.text.StyleConstants.getAlignment(javax.swing.text.AttributeSet)
javax.swing.text.TabStop.getAlignment()
javax.swing.text.View.getAlignment(int)


Occurences of getAlignmentX

getAlignmentX occurences:
java.awt.Component.getAlignmentX()
java.awt.Container.getAlignmentX()
javax.swing.JComponent.getAlignmentX()


Occurences of getAlignmentY

getAlignmentY occurences:
java.awt.Component.getAlignmentY()
java.awt.Container.getAlignmentY()
javax.swing.JComponent.getAlignmentY()


Occurences of getAll

getAll occurences:
javax.management.openmbean.CompositeData.getAll(java.lang.String:A)
javax.management.openmbean.CompositeDataSupport.getAll(java.lang.String:A)
javax.naming.CompositeName.getAll()
javax.naming.CompoundName.getAll()
javax.naming.directory.Attribute.getAll()
javax.naming.directory.Attributes.getAll()
javax.naming.directory.BasicAttribute.getAll()
javax.naming.directory.BasicAttributes.getAll()
javax.naming.ldap.LdapName.getAll()
javax.naming.Name.getAll()
javax.naming.Reference.getAll()


Occurences of getAllAttributeKeys

getAllAttributeKeys occurences:
java.text.AttributedCharacterIterator.getAllAttributeKeys()
javax.swing.text.html.CSS.getAllAttributeKeys()
javax.swing.text.html.HTML.getAllAttributeKeys()


Occurences of getAllCommands

getAllCommands occurences:
javax.activation.CommandMap.getAllCommands(java.lang.String)
javax.activation.CommandMap.getAllCommands(java.lang.String, javax.activation.DataSource)
javax.activation.DataHandler.getAllCommands()
javax.activation.MailcapCommandMap.getAllCommands(java.lang.String)


Occurences of getAllMimeHeaders

getAllMimeHeaders occurences:
javax.xml.soap.AttachmentPart.getAllMimeHeaders()
javax.xml.soap.SOAPPart.getAllMimeHeaders()


Occurences of getAllNotificationIDs

getAllNotificationIDs occurences:
javax.management.timer.Timer.getAllNotificationIDs()
javax.management.timer.TimerMBean.getAllNotificationIDs()


Occurences of getAllowsChildren

getAllowsChildren occurences:
javax.swing.text.AbstractDocument.AbstractElement.getAllowsChildren()
javax.swing.text.AbstractDocument.BranchElement.getAllowsChildren()
javax.swing.text.AbstractDocument.LeafElement.getAllowsChildren()
javax.swing.tree.DefaultMutableTreeNode.getAllowsChildren()
javax.swing.tree.TreeNode.getAllowsChildren()


Occurences of getAllRelationIds

getAllRelationIds occurences:
javax.management.relation.RelationService.getAllRelationIds()
javax.management.relation.RelationServiceMBean.getAllRelationIds()


Occurences of getAllRelationTypeNames

getAllRelationTypeNames occurences:
javax.management.relation.RelationService.getAllRelationTypeNames()
javax.management.relation.RelationServiceMBean.getAllRelationTypeNames()


Occurences of getAllRoles

getAllRoles occurences:
javax.management.relation.Relation.getAllRoles()
javax.management.relation.RelationService.getAllRoles(java.lang.String)
javax.management.relation.RelationServiceMBean.getAllRoles(java.lang.String)
javax.management.relation.RelationSupport.getAllRoles()


Occurences of getAlpha

getAlpha occurences:
java.awt.AlphaComposite.getAlpha()
java.awt.Color.getAlpha()
java.awt.image.ColorModel.getAlpha(int)
java.awt.image.ColorModel.getAlpha(java.lang.Object)
java.awt.image.ComponentColorModel.getAlpha(int)
java.awt.image.ComponentColorModel.getAlpha(java.lang.Object)
java.awt.image.DirectColorModel.getAlpha(int)
java.awt.image.DirectColorModel.getAlpha(java.lang.Object)
java.awt.image.IndexColorModel.getAlpha(int)


Occurences of getAlphaRaster

getAlphaRaster occurences:
java.awt.image.BufferedImage.getAlphaRaster()
java.awt.image.ColorModel.getAlphaRaster(java.awt.image.WritableRaster)
java.awt.image.ComponentColorModel.getAlphaRaster(java.awt.image.WritableRaster)
java.awt.image.PackedColorModel.getAlphaRaster(java.awt.image.WritableRaster)


Occurences of getAnchorSelectionIndex

getAnchorSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.getAnchorSelectionIndex()
javax.swing.JList.getAnchorSelectionIndex()
javax.swing.ListSelectionModel.getAnchorSelectionIndex()


Occurences of getAndAccumulate

getAndAccumulate occurences:
java.util.concurrent.atomic.AtomicInteger.getAndAccumulate(int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerArray.getAndAccumulate(int, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndAccumulate(java.lang.Object, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndAccumulate(T, int, java.util.function.IntBinaryOperator)
java.util.concurrent.atomic.AtomicLong.getAndAccumulate(long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongArray.getAndAccumulate(int, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndAccumulate(java.lang.Object, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndAccumulate(T, long, java.util.function.LongBinaryOperator)
java.util.concurrent.atomic.AtomicReference.getAndAccumulate(java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReference.getAndAccumulate(V, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.getAndAccumulate(int, E, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.getAndAccumulate(int, java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndAccumulate(java.lang.Object, java.lang.Object, java.util.function.BinaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndAccumulate(T, V, java.util.function.BinaryOperator)


Occurences of getAndAdd

getAndAdd occurences:
java.util.concurrent.atomic.AtomicInteger.getAndAdd(int)
java.util.concurrent.atomic.AtomicIntegerArray.getAndAdd(int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndAdd(java.lang.Object, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndAdd(T, int)
java.util.concurrent.atomic.AtomicLong.getAndAdd(long)
java.util.concurrent.atomic.AtomicLongArray.getAndAdd(int, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndAdd(java.lang.Object, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndAdd(T, long)


Occurences of getAndDecrement

getAndDecrement occurences:
java.util.concurrent.atomic.AtomicInteger.getAndDecrement()
java.util.concurrent.atomic.AtomicIntegerArray.getAndDecrement(int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndDecrement(java.lang.Object)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndDecrement(T)
java.util.concurrent.atomic.AtomicLong.getAndDecrement()
java.util.concurrent.atomic.AtomicLongArray.getAndDecrement(int)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndDecrement(java.lang.Object)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndDecrement(T)


Occurences of getAndIncrement

getAndIncrement occurences:
java.util.concurrent.atomic.AtomicInteger.getAndIncrement()
java.util.concurrent.atomic.AtomicIntegerArray.getAndIncrement(int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndIncrement(java.lang.Object)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndIncrement(T)
java.util.concurrent.atomic.AtomicLong.getAndIncrement()
java.util.concurrent.atomic.AtomicLongArray.getAndIncrement(int)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndIncrement(java.lang.Object)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndIncrement(T)


Occurences of getAndSet

getAndSet occurences:
java.util.concurrent.atomic.AtomicBoolean.getAndSet(boolean)
java.util.concurrent.atomic.AtomicInteger.getAndSet(int)
java.util.concurrent.atomic.AtomicIntegerArray.getAndSet(int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndSet(java.lang.Object, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndSet(T, int)
java.util.concurrent.atomic.AtomicLong.getAndSet(long)
java.util.concurrent.atomic.AtomicLongArray.getAndSet(int, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndSet(java.lang.Object, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndSet(T, long)
java.util.concurrent.atomic.AtomicReference.getAndSet(java.lang.Object)
java.util.concurrent.atomic.AtomicReference.getAndSet(V)
java.util.concurrent.atomic.AtomicReferenceArray.getAndSet(int, E)
java.util.concurrent.atomic.AtomicReferenceArray.getAndSet(int, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndSet(java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndSet(T, V)


Occurences of getAndUpdate

getAndUpdate occurences:
java.util.concurrent.atomic.AtomicInteger.getAndUpdate(java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerArray.getAndUpdate(int, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndUpdate(java.lang.Object, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndUpdate(T, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicLong.getAndUpdate(java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongArray.getAndUpdate(int, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndUpdate(java.lang.Object, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.getAndUpdate(T, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicReference.getAndUpdate(java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.getAndUpdate(int, java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndUpdate(java.lang.Object, java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.getAndUpdate(T, java.util.function.UnaryOperator)


Occurences of getAngleExtent

getAngleExtent occurences:
java.awt.geom.Arc2D.getAngleExtent()
java.awt.geom.Arc2D.Double.getAngleExtent()
java.awt.geom.Arc2D.Float.getAngleExtent()


Occurences of getAngleStart

getAngleStart occurences:
java.awt.geom.Arc2D.getAngleStart()
java.awt.geom.Arc2D.Double.getAngleStart()
java.awt.geom.Arc2D.Float.getAngleStart()


Occurences of getAnnotatedBounds

getAnnotatedBounds occurences:
java.lang.reflect.AnnotatedTypeVariable.getAnnotatedBounds()
java.lang.reflect.TypeVariable.getAnnotatedBounds()


Occurences of getAnnotatedReceiverType

getAnnotatedReceiverType occurences:
java.lang.reflect.Constructor.getAnnotatedReceiverType()
java.lang.reflect.Executable.getAnnotatedReceiverType()


Occurences of getAnnotatedReturnType

getAnnotatedReturnType occurences:
java.lang.reflect.Constructor.getAnnotatedReturnType()
java.lang.reflect.Executable.getAnnotatedReturnType()
java.lang.reflect.Method.getAnnotatedReturnType()


Occurences of getAnnotatedType

getAnnotatedType occurences:
java.lang.reflect.Field.getAnnotatedType()
java.lang.reflect.Parameter.getAnnotatedType()


Occurences of getAnnotation

getAnnotation occurences:
java.lang.Class.getAnnotation(java.lang.Class)
java.lang.Package.getAnnotation(java.lang.Class)
java.lang.reflect.AccessibleObject.getAnnotation(java.lang.Class)
java.lang.reflect.AnnotatedElement.getAnnotation(java.lang.Class)
java.lang.reflect.Constructor.getAnnotation(java.lang.Class)
java.lang.reflect.Executable.getAnnotation(java.lang.Class)
java.lang.reflect.Field.getAnnotation(java.lang.Class)
java.lang.reflect.Method.getAnnotation(java.lang.Class)
java.lang.reflect.Parameter.getAnnotation(java.lang.Class)
javax.lang.model.AnnotatedConstruct.getAnnotation(java.lang.Class)
javax.lang.model.element.Element.getAnnotation(java.lang.Class)


Occurences of getAnnotationMirrors

getAnnotationMirrors occurences:
javax.lang.model.AnnotatedConstruct.getAnnotationMirrors()
javax.lang.model.element.Element.getAnnotationMirrors()


Occurences of getAnnotations

getAnnotations occurences:
com.sun.source.tree.AnnotatedTypeTree.getAnnotations()
com.sun.source.tree.ModifiersTree.getAnnotations()
com.sun.source.tree.NewArrayTree.getAnnotations()
com.sun.source.tree.TypeParameterTree.getAnnotations()
java.lang.Class.getAnnotations()
java.lang.Package.getAnnotations()
java.lang.reflect.AccessibleObject.getAnnotations()
java.lang.reflect.AnnotatedElement.getAnnotations()
java.lang.reflect.Parameter.getAnnotations()


Occurences of getAnnotationsByType

getAnnotationsByType occurences:
java.lang.Class.getAnnotationsByType(java.lang.Class)
java.lang.Package.getAnnotationsByType(java.lang.Class)
java.lang.reflect.AccessibleObject.getAnnotationsByType(java.lang.Class)
java.lang.reflect.AnnotatedElement.getAnnotationsByType(java.lang.Class)
java.lang.reflect.Executable.getAnnotationsByType(java.lang.Class)
java.lang.reflect.Field.getAnnotationsByType(java.lang.Class)
java.lang.reflect.Parameter.getAnnotationsByType(java.lang.Class)
javax.lang.model.AnnotatedConstruct.getAnnotationsByType(java.lang.Class)


Occurences of getAnnotationType

getAnnotationType occurences:
com.sun.source.tree.AnnotationTree.getAnnotationType()
javax.lang.model.element.AnnotationMirror.getAnnotationType()


Occurences of getAnonymousLogger

getAnonymousLogger occurences:
java.util.logging.Logger.getAnonymousLogger()
java.util.logging.Logger.getAnonymousLogger(java.lang.String)


Occurences of getAppletContext

getAppletContext occurences:
java.applet.Applet.getAppletContext()
java.applet.AppletStub.getAppletContext()


Occurences of getApproveButton

getApproveButton occurences:
javax.swing.plaf.basic.BasicFileChooserUI.getApproveButton(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalFileChooserUI.getApproveButton(javax.swing.JFileChooser)


Occurences of getApproveButtonMnemonic

getApproveButtonMnemonic occurences:
javax.swing.JFileChooser.getApproveButtonMnemonic()
javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(javax.swing.JFileChooser)


Occurences of getApproveButtonText

getApproveButtonText occurences:
javax.swing.JFileChooser.getApproveButtonText()
javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonText(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.getApproveButtonText(javax.swing.JFileChooser)
javax.swing.plaf.multi.MultiFileChooserUI.getApproveButtonText(javax.swing.JFileChooser)


Occurences of getApproveButtonToolTipText

getApproveButtonToolTipText occurences:
javax.swing.JFileChooser.getApproveButtonToolTipText()
javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonToolTipText(javax.swing.JFileChooser)


Occurences of getArcHeight

getArcHeight occurences:
java.awt.geom.RoundRectangle2D.getArcHeight()
java.awt.geom.RoundRectangle2D.Double.getArcHeight()
java.awt.geom.RoundRectangle2D.Float.getArcHeight()


Occurences of getArcWidth

getArcWidth occurences:
java.awt.geom.RoundRectangle2D.getArcWidth()
java.awt.geom.RoundRectangle2D.Double.getArcWidth()
java.awt.geom.RoundRectangle2D.Float.getArcWidth()


Occurences of getArgument

getArgument occurences:
javax.lang.model.element.UnknownAnnotationValueException.getArgument()
javax.lang.model.element.UnknownElementException.getArgument()
javax.lang.model.type.UnknownTypeException.getArgument()


Occurences of getArguments

getArguments occurences:
com.sun.source.tree.AnnotationTree.getArguments()
com.sun.source.tree.MethodInvocationTree.getArguments()
com.sun.source.tree.NewClassTree.getArguments()
java.beans.Statement.getArguments()


Occurences of getArray

getArray occurences:
java.sql.Array.getArray()
java.sql.Array.getArray(java.util.Map)
java.sql.Array.getArray(long, int)
java.sql.Array.getArray(long, int, java.util.Map)
java.sql.CallableStatement.getArray(int)
java.sql.CallableStatement.getArray(java.lang.String)
java.sql.ResultSet.getArray(int)
java.sql.ResultSet.getArray(java.lang.String)
javax.sql.rowset.serial.SerialArray.getArray()
javax.sql.rowset.serial.SerialArray.getArray(java.util.Map)
javax.sql.rowset.serial.SerialArray.getArray(long, int)
javax.sql.rowset.serial.SerialArray.getArray(long, int, java.util.Map)
javax.swing.text.DefaultStyledDocument.ElementSpec.getArray()
javax.swing.text.GapContent.getArray()


Occurences of getArrayType

getArrayType occurences:
javax.lang.model.util.Types.getArrayType(javax.lang.model.type.TypeMirror)
javax.management.openmbean.ArrayType.getArrayType(javax.management.openmbean.OpenType)


Occurences of getAscent

getAscent occurences:
java.awt.font.GraphicAttribute.getAscent()
java.awt.font.ImageGraphicAttribute.getAscent()
java.awt.font.LineMetrics.getAscent()
java.awt.font.ShapeGraphicAttribute.getAscent()
java.awt.font.TextLayout.getAscent()
java.awt.FontMetrics.getAscent()
javax.swing.text.GlyphView.GlyphPainter.getAscent(javax.swing.text.GlyphView)


Occurences of getAsciiStream

getAsciiStream occurences:
java.sql.Clob.getAsciiStream()
java.sql.ResultSet.getAsciiStream(int)
java.sql.ResultSet.getAsciiStream(java.lang.String)
javax.sql.rowset.serial.SerialClob.getAsciiStream()


Occurences of getAsDouble

getAsDouble occurences:
java.util.function.DoubleSupplier.getAsDouble()
java.util.OptionalDouble.getAsDouble()


Occurences of getAsInt

getAsInt occurences:
java.util.function.IntSupplier.getAsInt()
java.util.OptionalInt.getAsInt()


Occurences of getAsLong

getAsLong occurences:
java.util.function.LongSupplier.getAsLong()
java.util.OptionalLong.getAsLong()


Occurences of getAsText

getAsText occurences:
java.beans.PropertyEditor.getAsText()
java.beans.PropertyEditorSupport.getAsText()


Occurences of getAtIndex

getAtIndex occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getAtIndex(int, int)
javax.accessibility.AccessibleText.getAtIndex(int, int)
javax.swing.AbstractButton.AccessibleAbstractButton.getAtIndex(int, int)
javax.swing.JLabel.AccessibleJLabel.getAtIndex(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getAtIndex(int, int)
javax.swing.JSpinner.AccessibleJSpinner.getAtIndex(int, int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getAtIndex(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getAtIndex(int, int)


Occurences of getAttachmentMarshaller

getAttachmentMarshaller occurences:
javax.xml.bind.helpers.AbstractMarshallerImpl.getAttachmentMarshaller()
javax.xml.bind.Marshaller.getAttachmentMarshaller()


Occurences of getAttachments

getAttachments occurences:
javax.xml.soap.SOAPMessage.getAttachments()
javax.xml.soap.SOAPMessage.getAttachments(javax.xml.soap.MimeHeaders)


Occurences of getAttachmentUnmarshaller

getAttachmentUnmarshaller occurences:
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getAttachmentUnmarshaller()
javax.xml.bind.Unmarshaller.getAttachmentUnmarshaller()


Occurences of getAttribute

getAttribute occurences:
java.nio.file.Files.getAttribute(java.nio.file.Path, java.lang.String, java.nio.file.LinkOption...)
java.nio.file.FileStore.getAttribute(java.lang.String)
java.security.Provider.Service.getAttribute(java.lang.String)
java.text.AttributedCharacterIterator.getAttribute(java.text.AttributedCharacterIterator.Attribute)
javax.imageio.metadata.IIOMetadataNode.getAttribute(java.lang.String)
javax.management.AttributeValueExp.getAttribute(javax.management.ObjectName)
javax.management.DynamicMBean.getAttribute(java.lang.String)
javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String)
javax.management.MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String)
javax.management.modelmbean.ModelMBeanInfo.getAttribute(java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getAttribute(java.lang.String)
javax.management.modelmbean.RequiredModelMBean.getAttribute(java.lang.String)
javax.management.remote.rmi.RMIConnection.getAttribute(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getAttribute(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)
javax.management.StandardMBean.getAttribute(java.lang.String)
javax.naming.directory.ModificationItem.getAttribute()
javax.print.PrintService.getAttribute(java.lang.Class)
javax.script.ScriptContext.getAttribute(java.lang.String)
javax.script.ScriptContext.getAttribute(java.lang.String, int)
javax.script.SimpleScriptContext.getAttribute(java.lang.String)
javax.script.SimpleScriptContext.getAttribute(java.lang.String, int)
javax.swing.text.AbstractDocument.AbstractElement.getAttribute(java.lang.Object)
javax.swing.text.AttributeSet.getAttribute(java.lang.Object)
javax.swing.text.html.CSS.getAttribute(java.lang.String)
javax.swing.text.html.parser.Element.getAttribute(java.lang.String)
javax.swing.text.SimpleAttributeSet.getAttribute(java.lang.Object)
javax.swing.text.StyleContext.NamedStyle.getAttribute(java.lang.Object)
javax.swing.text.StyleContext.SmallAttributeSet.getAttribute(java.lang.Object)
javax.xml.parsers.DocumentBuilderFactory.getAttribute(java.lang.String)
javax.xml.transform.TransformerFactory.getAttribute(java.lang.String)
javax.xml.ws.spi.http.HttpContext.getAttribute(java.lang.String)
javax.xml.ws.spi.http.HttpExchange.getAttribute(java.lang.String)
org.w3c.dom.Element.getAttribute(java.lang.String)


Occurences of getAttributeCount

getAttributeCount occurences:
javax.swing.text.AbstractDocument.AbstractElement.getAttributeCount()
javax.swing.text.AttributeSet.getAttributeCount()
javax.swing.text.SimpleAttributeSet.getAttributeCount()
javax.swing.text.StyleContext.NamedStyle.getAttributeCount()
javax.swing.text.StyleContext.SmallAttributeSet.getAttributeCount()
javax.xml.stream.util.StreamReaderDelegate.getAttributeCount()
javax.xml.stream.XMLStreamReader.getAttributeCount()


Occurences of getAttributeDataType

getAttributeDataType occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeDataType(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeDataType(java.lang.String, java.lang.String)


Occurences of getAttributeDefaultValue

getAttributeDefaultValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeDefaultValue(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeDefaultValue(java.lang.String, java.lang.String)


Occurences of getAttributeDefinition

getAttributeDefinition occurences:
javax.naming.directory.Attribute.getAttributeDefinition()
javax.naming.directory.BasicAttribute.getAttributeDefinition()


Occurences of getAttributeDescription

getAttributeDescription occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeDescription(java.lang.String, java.lang.String, java.util.Locale)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeDescription(java.lang.String, java.lang.String, java.util.Locale)


Occurences of getAttributeEnumerations

getAttributeEnumerations occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeEnumerations(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeEnumerations(java.lang.String, java.lang.String)


Occurences of getAttributeID

getAttributeID occurences:
javax.naming.ldap.SortKey.getAttributeID()
javax.naming.ldap.SortResponseControl.getAttributeID()


Occurences of getAttributeListMaxLength

getAttributeListMaxLength occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeListMaxLength(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeListMaxLength(java.lang.String, java.lang.String)


Occurences of getAttributeListMinLength

getAttributeListMinLength occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeListMinLength(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeListMinLength(java.lang.String, java.lang.String)


Occurences of getAttributeLocalName

getAttributeLocalName occurences:
javax.xml.stream.util.StreamReaderDelegate.getAttributeLocalName(int)
javax.xml.stream.XMLStreamReader.getAttributeLocalName(int)


Occurences of getAttributeMaxValue

getAttributeMaxValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeMaxValue(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeMaxValue(java.lang.String, java.lang.String)


Occurences of getAttributeMinValue

getAttributeMinValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeMinValue(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeMinValue(java.lang.String, java.lang.String)


Occurences of getAttributeName

getAttributeName occurences:
javax.management.AttributeChangeNotification.getAttributeName()
javax.management.AttributeValueExp.getAttributeName()
javax.xml.stream.util.StreamReaderDelegate.getAttributeName(int)
javax.xml.stream.XMLStreamReader.getAttributeName(int)


Occurences of getAttributeNames

getAttributeNames occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeNames(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeNames(java.lang.String)
javax.swing.text.AbstractDocument.AbstractElement.getAttributeNames()
javax.swing.text.AttributeSet.getAttributeNames()
javax.swing.text.SimpleAttributeSet.getAttributeNames()
javax.swing.text.StyleContext.NamedStyle.getAttributeNames()
javax.swing.text.StyleContext.SmallAttributeSet.getAttributeNames()
javax.xml.ws.spi.http.HttpContext.getAttributeNames()
javax.xml.ws.spi.http.HttpExchange.getAttributeNames()


Occurences of getAttributeNamespace

getAttributeNamespace occurences:
javax.xml.stream.util.StreamReaderDelegate.getAttributeNamespace(int)
javax.xml.stream.XMLStreamReader.getAttributeNamespace(int)


Occurences of getAttributeNode

getAttributeNode occurences:
javax.imageio.metadata.IIOMetadataNode.getAttributeNode(java.lang.String)
org.w3c.dom.Element.getAttributeNode(java.lang.String)


Occurences of getAttributeNodeNS

getAttributeNodeNS occurences:
javax.imageio.metadata.IIOMetadataNode.getAttributeNodeNS(java.lang.String, java.lang.String)
org.w3c.dom.Element.getAttributeNodeNS(java.lang.String, java.lang.String)


Occurences of getAttributeNS

getAttributeNS occurences:
javax.imageio.metadata.IIOMetadataNode.getAttributeNS(java.lang.String, java.lang.String)
org.w3c.dom.Element.getAttributeNS(java.lang.String, java.lang.String)


Occurences of getAttributePrefix

getAttributePrefix occurences:
javax.xml.stream.util.StreamReaderDelegate.getAttributePrefix(int)
javax.xml.stream.XMLStreamReader.getAttributePrefix(int)


Occurences of getAttributes

getAttributes occurences:
com.sun.source.doctree.StartElementTree.getAttributes()
java.awt.Font.getAttributes()
java.net.JarURLConnection.getAttributes()
java.security.KeyStore.Entry.getAttributes()
java.security.KeyStore.PrivateKeyEntry.getAttributes()
java.security.KeyStore.SecretKeyEntry.getAttributes()
java.security.KeyStore.TrustedCertificateEntry.getAttributes()
java.sql.DatabaseMetaData.getAttributes(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
java.sql.Struct.getAttributes()
java.sql.Struct.getAttributes(java.util.Map)
java.text.AttributedCharacterIterator.getAttributes()
java.util.jar.JarEntry.getAttributes()
java.util.jar.Manifest.getAttributes(java.lang.String)
javax.imageio.metadata.IIOMetadataNode.getAttributes()
javax.management.DynamicMBean.getAttributes(java.lang.String:A)
javax.management.loading.MLetContent.getAttributes()
javax.management.MBeanInfo.getAttributes()
javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String:A)
javax.management.MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String:A)
javax.management.modelmbean.ModelMBeanInfo.getAttributes()
javax.management.modelmbean.RequiredModelMBean.getAttributes(java.lang.String:A)
javax.management.openmbean.OpenMBeanInfo.getAttributes()
javax.management.remote.JMXConnectorServerMBean.getAttributes()
javax.management.remote.rmi.RMIConnection.getAttributes(javax.management.ObjectName, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getAttributes(javax.management.ObjectName, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttributes(javax.management.ObjectName, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectorServer.getAttributes()
javax.management.StandardMBean.getAttributes(java.lang.String:A)
javax.naming.directory.DirContext.getAttributes(java.lang.String)
javax.naming.directory.DirContext.getAttributes(java.lang.String, java.lang.String:A)
javax.naming.directory.DirContext.getAttributes(javax.naming.Name)
javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String:A)
javax.naming.directory.InitialDirContext.getAttributes(java.lang.String)
javax.naming.directory.InitialDirContext.getAttributes(java.lang.String, java.lang.String:A)
javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name)
javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name, java.lang.String:A)
javax.naming.directory.SearchResult.getAttributes()
javax.naming.spi.DirStateFactory.Result.getAttributes()
javax.print.Doc.getAttributes()
javax.print.DocPrintJob.getAttributes()
javax.print.event.PrintJobAttributeEvent.getAttributes()
javax.print.event.PrintServiceAttributeEvent.getAttributes()
javax.print.PrintService.getAttributes()
javax.print.SimpleDoc.getAttributes()
javax.sql.rowset.serial.SerialStruct.getAttributes()
javax.sql.rowset.serial.SerialStruct.getAttributes(java.util.Map)
javax.swing.text.AbstractDocument.AbstractElement.getAttributes()
javax.swing.text.DefaultStyledDocument.ElementSpec.getAttributes()
javax.swing.text.Element.getAttributes()
javax.swing.text.html.BlockView.getAttributes()
javax.swing.text.html.HTMLDocument.Iterator.getAttributes()
javax.swing.text.html.ImageView.getAttributes()
javax.swing.text.html.InlineView.getAttributes()
javax.swing.text.html.Option.getAttributes()
javax.swing.text.html.ParagraphView.getAttributes()
javax.swing.text.html.parser.Element.getAttributes()
javax.swing.text.html.parser.Parser.getAttributes()
javax.swing.text.View.getAttributes()
javax.xml.stream.events.StartElement.getAttributes()
org.w3c.dom.Node.getAttributes()


Occurences of getAttributesScope

getAttributesScope occurences:
javax.script.ScriptContext.getAttributesScope(java.lang.String)
javax.script.SimpleScriptContext.getAttributesScope(java.lang.String)


Occurences of getAttributeSyntaxDefinition

getAttributeSyntaxDefinition occurences:
javax.naming.directory.Attribute.getAttributeSyntaxDefinition()
javax.naming.directory.BasicAttribute.getAttributeSyntaxDefinition()


Occurences of getAttributeType

getAttributeType occurences:
javax.management.AttributeChangeNotification.getAttributeType()
javax.xml.stream.util.StreamReaderDelegate.getAttributeType(int)
javax.xml.stream.XMLStreamReader.getAttributeType(int)


Occurences of getAttributeValue

getAttributeValue occurences:
javax.xml.soap.SOAPElement.getAttributeValue(javax.xml.namespace.QName)
javax.xml.soap.SOAPElement.getAttributeValue(javax.xml.soap.Name)
javax.xml.stream.util.StreamReaderDelegate.getAttributeValue(int)
javax.xml.stream.util.StreamReaderDelegate.getAttributeValue(java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamReader.getAttributeValue(int)
javax.xml.stream.XMLStreamReader.getAttributeValue(java.lang.String, java.lang.String)


Occurences of getAttributeValueType

getAttributeValueType occurences:
javax.imageio.metadata.IIOMetadataFormat.getAttributeValueType(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getAttributeValueType(java.lang.String, java.lang.String)


Occurences of getAudioClip

getAudioClip occurences:
java.applet.Applet.getAudioClip(java.net.URL)
java.applet.Applet.getAudioClip(java.net.URL, java.lang.String)
java.applet.AppletContext.getAudioClip(java.net.URL)


Occurences of getAudioFileFormat

getAudioFileFormat occurences:
javax.sound.sampled.AudioSystem.getAudioFileFormat(java.io.File)
javax.sound.sampled.AudioSystem.getAudioFileFormat(java.io.InputStream)
javax.sound.sampled.AudioSystem.getAudioFileFormat(java.net.URL)
javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.File)
javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.InputStream)
javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.net.URL)


Occurences of getAudioFileTypes

getAudioFileTypes occurences:
javax.sound.sampled.AudioSystem.getAudioFileTypes()
javax.sound.sampled.AudioSystem.getAudioFileTypes(javax.sound.sampled.AudioInputStream)
javax.sound.sampled.spi.AudioFileWriter.getAudioFileTypes()
javax.sound.sampled.spi.AudioFileWriter.getAudioFileTypes(javax.sound.sampled.AudioInputStream)


Occurences of getAudioInputStream

getAudioInputStream occurences:
javax.sound.sampled.AudioSystem.getAudioInputStream(java.io.File)
javax.sound.sampled.AudioSystem.getAudioInputStream(java.io.InputStream)
javax.sound.sampled.AudioSystem.getAudioInputStream(java.net.URL)
javax.sound.sampled.AudioSystem.getAudioInputStream(javax.sound.sampled.AudioFormat, javax.sound.sampled.AudioInputStream)
javax.sound.sampled.AudioSystem.getAudioInputStream(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioInputStream)
javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.File)
javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.InputStream)
javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.net.URL)
javax.sound.sampled.spi.FormatConversionProvider.getAudioInputStream(javax.sound.sampled.AudioFormat, javax.sound.sampled.AudioInputStream)
javax.sound.sampled.spi.FormatConversionProvider.getAudioInputStream(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioInputStream)


Occurences of getAuthority

getAuthority occurences:
java.net.URI.getAuthority()
java.net.URL.getAuthority()


Occurences of getAuthorizationID

getAuthorizationID occurences:
javax.security.sasl.AuthorizeCallback.getAuthorizationID()
javax.security.sasl.SaslServer.getAuthorizationID()


Occurences of getAutoCommit

getAutoCommit occurences:
java.sql.Connection.getAutoCommit()
javax.sql.rowset.JdbcRowSet.getAutoCommit()


Occurences of getAvailableFontFamilyNames

getAvailableFontFamilyNames occurences:
java.awt.GraphicsEnvironment.getAvailableFontFamilyNames()
java.awt.GraphicsEnvironment.getAvailableFontFamilyNames(java.util.Locale)


Occurences of getAvailableIDs

getAvailableIDs occurences:
java.util.TimeZone.getAvailableIDs()
java.util.TimeZone.getAvailableIDs(int)


Occurences of getAvailableLocales

getAvailableLocales occurences:
java.awt.im.spi.InputMethodDescriptor.getAvailableLocales()
java.text.BreakIterator.getAvailableLocales()
java.text.Collator.getAvailableLocales()
java.text.DateFormat.getAvailableLocales()
java.text.DateFormatSymbols.getAvailableLocales()
java.text.DecimalFormatSymbols.getAvailableLocales()
java.text.NumberFormat.getAvailableLocales()
java.time.format.DecimalStyle.getAvailableLocales()
java.util.Calendar.getAvailableLocales()
java.util.Locale.getAvailableLocales()
java.util.spi.LocaleServiceProvider.getAvailableLocales()
javax.imageio.ImageReader.getAvailableLocales()
javax.imageio.ImageWriter.getAvailableLocales()


Occurences of getAvailableZoneIds

getAvailableZoneIds occurences:
java.time.zone.ZoneRulesProvider.getAvailableZoneIds()
java.time.ZoneId.getAvailableZoneIds()


Occurences of getAverage

getAverage occurences:
java.util.DoubleSummaryStatistics.getAverage()
java.util.IntSummaryStatistics.getAverage()
java.util.LongSummaryStatistics.getAverage()


Occurences of getAWTEventListeners

getAWTEventListeners occurences:
java.awt.Toolkit.getAWTEventListeners()
java.awt.Toolkit.getAWTEventListeners(long)


Occurences of getAWTKeyStroke

getAWTKeyStroke occurences:
java.awt.AWTKeyStroke.getAWTKeyStroke(char)
java.awt.AWTKeyStroke.getAWTKeyStroke(int, int)
java.awt.AWTKeyStroke.getAWTKeyStroke(int, int, boolean)
java.awt.AWTKeyStroke.getAWTKeyStroke(java.lang.Character, int)
java.awt.AWTKeyStroke.getAWTKeyStroke(java.lang.String)


Occurences of getAxis

getAxis occurences:
javax.swing.BoxLayout.getAxis()
javax.swing.text.BoxView.getAxis()


Occurences of getBackground

getBackground occurences:
java.awt.Component.getBackground()
java.awt.Component.AccessibleAWTComponent.getBackground()
java.awt.Graphics2D.getBackground()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getBackground()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getBackground()
java.awt.TextComponent.getBackground()
java.awt.Window.getBackground()
javax.accessibility.AccessibleComponent.getBackground()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getBackground()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getBackground()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getBackground()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()
javax.swing.text.DefaultStyledDocument.getBackground(javax.swing.text.AttributeSet)
javax.swing.text.GlyphView.getBackground()
javax.swing.text.html.StyleSheet.getBackground(javax.swing.text.AttributeSet)
javax.swing.text.LabelView.getBackground()
javax.swing.text.StyleConstants.getBackground(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.getBackground(javax.swing.text.AttributeSet)
javax.swing.text.StyledDocument.getBackground(javax.swing.text.AttributeSet)


Occurences of getBankData

getBankData occurences:
java.awt.image.DataBufferByte.getBankData()
java.awt.image.DataBufferDouble.getBankData()
java.awt.image.DataBufferFloat.getBankData()
java.awt.image.DataBufferInt.getBankData()
java.awt.image.DataBufferShort.getBankData()
java.awt.image.DataBufferUShort.getBankData()


Occurences of getBase

getBase occurences:
javax.swing.text.html.HTMLDocument.getBase()
javax.swing.text.html.StyleSheet.getBase()


Occurences of getBaseline

getBaseline occurences:
java.awt.Component.getBaseline(int, int)
java.awt.font.TextLayout.getBaseline()
javax.swing.border.AbstractBorder.getBaseline(java.awt.Component, int, int)
javax.swing.border.TitledBorder.getBaseline(java.awt.Component, int, int)
javax.swing.JComponent.getBaseline(int, int)
javax.swing.JSpinner.DefaultEditor.getBaseline(int, int)
javax.swing.plaf.basic.BasicButtonUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicComboBoxUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicLabelUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicListUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicPanelUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicProgressBarUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicScrollPaneUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicSliderUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicSpinnerUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTabbedPaneUI.getBaseline(int)
javax.swing.plaf.basic.BasicTabbedPaneUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTableHeaderUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTableUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTextAreaUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTextFieldUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.basic.BasicTreeUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.ComponentUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.LayerUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.metal.MetalComboBoxUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthButtonUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthLabelUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthProgressBarUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthSliderUI.getBaseline(javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthTabbedPaneUI.getBaseline(int)


Occurences of getBaselineOffset

getBaselineOffset occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getBaselineOffset()
javax.swing.plaf.metal.MetalTabbedPaneUI.getBaselineOffset()


Occurences of getBaselineOffsets

getBaselineOffsets occurences:
java.awt.font.LineMetrics.getBaselineOffsets()
java.awt.font.TextLayout.getBaselineOffsets()


Occurences of getBaselineResizeBehavior

getBaselineResizeBehavior occurences:
java.awt.Component.getBaselineResizeBehavior()
javax.swing.border.AbstractBorder.getBaselineResizeBehavior(java.awt.Component)
javax.swing.border.TitledBorder.getBaselineResizeBehavior(java.awt.Component)
javax.swing.JComponent.getBaselineResizeBehavior()
javax.swing.JSpinner.DefaultEditor.getBaselineResizeBehavior()
javax.swing.plaf.basic.BasicButtonUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPanelUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSpinnerUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextAreaUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextFieldUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.getBaselineResizeBehavior(javax.swing.JComponent)
javax.swing.plaf.LayerUI.getBaselineResizeBehavior(javax.swing.JComponent)


Occurences of getBaseType

getBaseType occurences:
java.sql.Array.getBaseType()
javax.activation.MimeType.getBaseType()
javax.sql.rowset.serial.SerialArray.getBaseType()


Occurences of getBaseTypeName

getBaseTypeName occurences:
java.sql.Array.getBaseTypeName()
java.sql.Ref.getBaseTypeName()
javax.sql.rowset.serial.SerialArray.getBaseTypeName()
javax.sql.rowset.serial.SerialRef.getBaseTypeName()


Occurences of getBaseUnit

getBaseUnit occurences:
java.time.temporal.ChronoField.getBaseUnit()
java.time.temporal.TemporalField.getBaseUnit()


Occurences of getBaseURI

getBaseURI occurences:
javax.imageio.metadata.IIOMetadataNode.getBaseURI()
javax.xml.crypto.dom.DOMCryptoContext.getBaseURI()
javax.xml.crypto.XMLCryptoContext.getBaseURI()
javax.xml.stream.events.EntityDeclaration.getBaseURI()
org.w3c.dom.ls.LSInput.getBaseURI()
org.w3c.dom.Node.getBaseURI()


Occurences of getBasicConstraints

getBasicConstraints occurences:
java.security.cert.X509Certificate.getBasicConstraints()
java.security.cert.X509CertSelector.getBasicConstraints()


Occurences of getBeanContext

getBeanContext occurences:
java.beans.beancontext.BeanContextChild.getBeanContext()
java.beans.beancontext.BeanContextChildSupport.getBeanContext()
java.beans.beancontext.BeanContextEvent.getBeanContext()


Occurences of getBeanDescriptor

getBeanDescriptor occurences:
java.beans.BeanInfo.getBeanDescriptor()
java.beans.SimpleBeanInfo.getBeanDescriptor()


Occurences of getBeanInfo

getBeanInfo occurences:
java.beans.Introspector.getBeanInfo(java.lang.Class)
java.beans.Introspector.getBeanInfo(java.lang.Class, int)
java.beans.Introspector.getBeanInfo(java.lang.Class, java.lang.Class)
java.beans.Introspector.getBeanInfo(java.lang.Class, java.lang.Class, int)


Occurences of getBeforeIndex

getBeforeIndex occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getBeforeIndex(int, int)
javax.accessibility.AccessibleText.getBeforeIndex(int, int)
javax.swing.AbstractButton.AccessibleAbstractButton.getBeforeIndex(int, int)
javax.swing.JLabel.AccessibleJLabel.getBeforeIndex(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getBeforeIndex(int, int)
javax.swing.JSpinner.AccessibleJSpinner.getBeforeIndex(int, int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getBeforeIndex(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getBeforeIndex(int, int)


Occurences of getBeginIndex

getBeginIndex occurences:
java.text.CharacterIterator.getBeginIndex()
java.text.FieldPosition.getBeginIndex()
java.text.StringCharacterIterator.getBeginIndex()
javax.swing.text.Segment.getBeginIndex()


Occurences of getBestConfiguration

getBestConfiguration occurences:
java.awt.GraphicsConfigTemplate.getBestConfiguration(java.awt.GraphicsConfiguration:A)
java.awt.GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate)


Occurences of getBigDecimal

getBigDecimal occurences:
java.sql.CallableStatement.getBigDecimal(int)
java.sql.CallableStatement.getBigDecimal(int, int)
java.sql.CallableStatement.getBigDecimal(java.lang.String)
java.sql.ResultSet.getBigDecimal(int)
java.sql.ResultSet.getBigDecimal(int, int)
java.sql.ResultSet.getBigDecimal(java.lang.String)
java.sql.ResultSet.getBigDecimal(java.lang.String, int)


Occurences of getBinaryStream

getBinaryStream occurences:
java.sql.Blob.getBinaryStream()
java.sql.Blob.getBinaryStream(long, long)
java.sql.ResultSet.getBinaryStream(int)
java.sql.ResultSet.getBinaryStream(java.lang.String)
java.sql.SQLXML.getBinaryStream()
javax.sql.rowset.serial.SerialBlob.getBinaryStream()
javax.sql.rowset.serial.SerialBlob.getBinaryStream(long, long)


Occurences of getBinding

getBinding occurences:
javax.xml.ws.BindingProvider.getBinding()
javax.xml.ws.Endpoint.getBinding()


Occurences of getBindingID

getBindingID occurences:
javax.xml.ws.Binding.getBindingID()
javax.xml.ws.handler.PortInfo.getBindingID()


Occurences of getBindings

getBindings occurences:
javax.script.AbstractScriptEngine.getBindings(int)
javax.script.ScriptContext.getBindings(int)
javax.script.ScriptEngine.getBindings(int)
javax.script.ScriptEngineManager.getBindings()
javax.script.SimpleScriptContext.getBindings(int)


Occurences of getBitOffset

getBitOffset occurences:
java.awt.image.MultiPixelPackedSampleModel.getBitOffset(int)
javax.imageio.stream.ImageInputStream.getBitOffset()
javax.imageio.stream.ImageInputStreamImpl.getBitOffset()


Occurences of getBlack

getBlack occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getBlack()
javax.swing.plaf.metal.MetalTheme.getBlack()
javax.swing.plaf.metal.OceanTheme.getBlack()


Occurences of getBlinkRate

getBlinkRate occurences:
javax.swing.text.Caret.getBlinkRate()
javax.swing.text.DefaultCaret.getBlinkRate()


Occurences of getBlob

getBlob occurences:
java.sql.CallableStatement.getBlob(int)
java.sql.CallableStatement.getBlob(java.lang.String)
java.sql.ResultSet.getBlob(int)
java.sql.ResultSet.getBlob(java.lang.String)


Occurences of getBlock

getBlock occurences:
com.sun.source.tree.CatchTree.getBlock()
com.sun.source.tree.SynchronizedTree.getBlock()
com.sun.source.tree.TryTree.getBlock()


Occurences of getBlockIncrement

getBlockIncrement occurences:
java.awt.Adjustable.getBlockIncrement()
java.awt.Scrollbar.getBlockIncrement()
java.awt.ScrollPaneAdjustable.getBlockIncrement()
javax.swing.JScrollBar.getBlockIncrement()
javax.swing.JScrollBar.getBlockIncrement(int)
javax.swing.JScrollPane.ScrollBar.getBlockIncrement(int)


Occurences of getBlue

getBlue occurences:
java.awt.Color.getBlue()
java.awt.image.ColorModel.getBlue(int)
java.awt.image.ColorModel.getBlue(java.lang.Object)
java.awt.image.ComponentColorModel.getBlue(int)
java.awt.image.ComponentColorModel.getBlue(java.lang.Object)
java.awt.image.DirectColorModel.getBlue(int)
java.awt.image.DirectColorModel.getBlue(java.lang.Object)
java.awt.image.IndexColorModel.getBlue(int)


Occurences of getBody

getBody occurences:
com.sun.source.doctree.CommentTree.getBody()
com.sun.source.doctree.DeprecatedTree.getBody()
com.sun.source.doctree.DocCommentTree.getBody()
com.sun.source.doctree.LiteralTree.getBody()
com.sun.source.doctree.SinceTree.getBody()
com.sun.source.doctree.TextTree.getBody()
com.sun.source.doctree.VersionTree.getBody()
com.sun.source.tree.LambdaExpressionTree.getBody()
com.sun.source.tree.MethodTree.getBody()
java.net.CacheRequest.getBody()
java.net.CacheResponse.getBody()
javax.xml.soap.SOAPEnvelope.getBody()


Occurences of getBoolean

getBoolean occurences:
java.lang.Boolean.getBoolean(java.lang.String)
java.lang.reflect.Array.getBoolean(java.lang.Object, int)
java.lang.reflect.Field.getBoolean(java.lang.Object)
java.sql.CallableStatement.getBoolean(int)
java.sql.CallableStatement.getBoolean(java.lang.String)
java.sql.ResultSet.getBoolean(int)
java.sql.ResultSet.getBoolean(java.lang.String)
java.util.prefs.AbstractPreferences.getBoolean(java.lang.String, boolean)
java.util.prefs.Preferences.getBoolean(java.lang.String, boolean)
javax.swing.plaf.synth.SynthStyle.getBoolean(javax.swing.plaf.synth.SynthContext, java.lang.Object, boolean)
javax.swing.UIDefaults.getBoolean(java.lang.Object)
javax.swing.UIDefaults.getBoolean(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getBoolean(java.lang.Object)
javax.swing.UIManager.getBoolean(java.lang.Object, java.util.Locale)


Occurences of getBorder

getBorder occurences:
javax.swing.border.TitledBorder.getBorder()
javax.swing.JComponent.getBorder()
javax.swing.plaf.basic.BasicSplitPaneDivider.getBorder()
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField.getBorder()
javax.swing.UIDefaults.getBorder(java.lang.Object)
javax.swing.UIDefaults.getBorder(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getBorder(java.lang.Object)
javax.swing.UIManager.getBorder(java.lang.Object, java.util.Locale)


Occurences of getBorderInsets

getBorderInsets occurences:
javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component)
javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.BevelBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.Border.getBorderInsets(java.awt.Component)
javax.swing.border.CompoundBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.EmptyBorder.getBorderInsets()
javax.swing.border.EmptyBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.EtchedBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.LineBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.MatteBorder.getBorderInsets()
javax.swing.border.MatteBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.SoftBevelBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.StrokeBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.ButtonBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.FieldBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.MarginBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.MenuBarBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.RadioButtonBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.basic.BasicBorders.SplitPaneBorder.getBorderInsets(java.awt.Component)
javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.BorderUIResource.getBorderInsets(java.awt.Component)
javax.swing.plaf.metal.MetalBorders.ButtonBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.Flush3DBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.InternalFrameBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.MenuBarBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.MenuItemBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.OptionDialogBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.PaletteBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.PopupMenuBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.TableHeaderBorder.getBorderInsets(java.awt.Component, java.awt.Insets)
javax.swing.plaf.metal.MetalBorders.ToolBarBorder.getBorderInsets(java.awt.Component, java.awt.Insets)


Occurences of getBorderSelectionColor

getBorderSelectionColor occurences:
javax.swing.tree.DefaultTreeCellEditor.getBorderSelectionColor()
javax.swing.tree.DefaultTreeCellRenderer.getBorderSelectionColor()


Occurences of getBottomInset

getBottomInset occurences:
javax.swing.text.AsyncBoxView.getBottomInset()
javax.swing.text.CompositeView.getBottomInset()


Occurences of getBounds

getBounds occurences:
com.sun.source.tree.IntersectionTypeTree.getBounds()
com.sun.source.tree.TypeParameterTree.getBounds()
java.awt.Component.getBounds()
java.awt.Component.getBounds(java.awt.Rectangle)
java.awt.Component.AccessibleAWTComponent.getBounds()
java.awt.font.GraphicAttribute.getBounds()
java.awt.font.ImageGraphicAttribute.getBounds()
java.awt.font.ShapeGraphicAttribute.getBounds()
java.awt.font.TextLayout.getBounds()
java.awt.geom.Area.getBounds()
java.awt.geom.CubicCurve2D.getBounds()
java.awt.geom.Line2D.getBounds()
java.awt.geom.Path2D.getBounds()
java.awt.geom.QuadCurve2D.getBounds()
java.awt.geom.RectangularShape.getBounds()
java.awt.GraphicsConfiguration.getBounds()
java.awt.image.Raster.getBounds()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getBounds()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getBounds()
java.awt.Polygon.getBounds()
java.awt.Rectangle.getBounds()
java.awt.Shape.getBounds()
java.awt.SplashScreen.getBounds()
java.lang.reflect.TypeVariable.getBounds()
javax.accessibility.AccessibleComponent.getBounds()
javax.lang.model.element.TypeParameterElement.getBounds()
javax.lang.model.type.IntersectionType.getBounds()
javax.swing.JComponent.getBounds(java.awt.Rectangle)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getBounds()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getBounds()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getBounds()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBounds()
javax.swing.tree.AbstractLayoutCache.getBounds(javax.swing.tree.TreePath, java.awt.Rectangle)
javax.swing.tree.FixedHeightLayoutCache.getBounds(javax.swing.tree.TreePath, java.awt.Rectangle)
javax.swing.tree.VariableHeightLayoutCache.getBounds(javax.swing.tree.TreePath, java.awt.Rectangle)


Occurences of getBounds2D

getBounds2D occurences:
java.awt.font.GlyphMetrics.getBounds2D()
java.awt.geom.Arc2D.getBounds2D()
java.awt.geom.Area.getBounds2D()
java.awt.geom.CubicCurve2D.Double.getBounds2D()
java.awt.geom.CubicCurve2D.Float.getBounds2D()
java.awt.geom.Ellipse2D.Double.getBounds2D()
java.awt.geom.Ellipse2D.Float.getBounds2D()
java.awt.geom.Line2D.Double.getBounds2D()
java.awt.geom.Line2D.Float.getBounds2D()
java.awt.geom.Path2D.Double.getBounds2D()
java.awt.geom.Path2D.Float.getBounds2D()
java.awt.geom.QuadCurve2D.Double.getBounds2D()
java.awt.geom.QuadCurve2D.Float.getBounds2D()
java.awt.geom.Rectangle2D.getBounds2D()
java.awt.geom.Rectangle2D.Double.getBounds2D()
java.awt.geom.Rectangle2D.Float.getBounds2D()
java.awt.geom.RoundRectangle2D.Double.getBounds2D()
java.awt.geom.RoundRectangle2D.Float.getBounds2D()
java.awt.image.AffineTransformOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.AffineTransformOp.getBounds2D(java.awt.image.Raster)
java.awt.image.BandCombineOp.getBounds2D(java.awt.image.Raster)
java.awt.image.BufferedImageOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.ColorConvertOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.ColorConvertOp.getBounds2D(java.awt.image.Raster)
java.awt.image.ConvolveOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.ConvolveOp.getBounds2D(java.awt.image.Raster)
java.awt.image.LookupOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.LookupOp.getBounds2D(java.awt.image.Raster)
java.awt.image.RasterOp.getBounds2D(java.awt.image.Raster)
java.awt.image.renderable.ContextualRenderedImageFactory.getBounds2D(java.awt.image.renderable.ParameterBlock)
java.awt.image.RescaleOp.getBounds2D(java.awt.image.BufferedImage)
java.awt.image.RescaleOp.getBounds2D(java.awt.image.Raster)
java.awt.Polygon.getBounds2D()
java.awt.Rectangle.getBounds2D()
java.awt.Shape.getBounds2D()


Occurences of getBox

getBox occurences:
javax.swing.plaf.basic.BasicProgressBarUI.getBox(java.awt.Rectangle)
javax.swing.plaf.synth.SynthProgressBarUI.getBox(java.awt.Rectangle)


Occurences of getBreakWeight

getBreakWeight occurences:
javax.swing.text.GlyphView.getBreakWeight(int, float, float)
javax.swing.text.html.InlineView.getBreakWeight(int, float, float)
javax.swing.text.ParagraphView.getBreakWeight(int, float)
javax.swing.text.View.getBreakWeight(int, float, float)


Occurences of getBroadcast

getBroadcast occurences:
java.net.DatagramSocket.getBroadcast()
java.net.InterfaceAddress.getBroadcast()


Occurences of getBufferStrategy

getBufferStrategy occurences:
java.awt.Canvas.getBufferStrategy()
java.awt.Window.getBufferStrategy()


Occurences of getBundle

getBundle occurences:
java.util.ResourceBundle.getBundle(java.lang.String)
java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale)
java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader, java.util.ResourceBundle.Control)
java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.util.ResourceBundle.Control)
java.util.ResourceBundle.getBundle(java.lang.String, java.util.ResourceBundle.Control)


Occurences of getButton

getButton occurences:
java.awt.event.MouseEvent.getButton()
org.w3c.dom.events.MouseEvent.getButton()


Occurences of getButtonBorder

getButtonBorder occurences:
javax.swing.plaf.basic.BasicBorders.getButtonBorder()
javax.swing.plaf.metal.MetalBorders.getButtonBorder()


Occurences of getByAddress

getByAddress occurences:
java.net.Inet6Address.getByAddress(java.lang.String, byte:A, int)
java.net.Inet6Address.getByAddress(java.lang.String, byte:A, java.net.NetworkInterface)
java.net.InetAddress.getByAddress(byte:A)
java.net.InetAddress.getByAddress(java.lang.String, byte:A)


Occurences of getByName

getByName occurences:
java.net.InetAddress.getByName(java.lang.String)
java.net.NetworkInterface.getByName(java.lang.String)


Occurences of getByte

getByte occurences:
java.lang.reflect.Array.getByte(java.lang.Object, int)
java.lang.reflect.Field.getByte(java.lang.Object)
java.sql.CallableStatement.getByte(int)
java.sql.CallableStatement.getByte(java.lang.String)
java.sql.ResultSet.getByte(int)
java.sql.ResultSet.getByte(java.lang.String)


Occurences of getByteArray

getByteArray occurences:
java.util.prefs.AbstractPreferences.getByteArray(java.lang.String, byte:A)
java.util.prefs.Preferences.getByteArray(java.lang.String, byte:A)


Occurences of getByteLength

getByteLength occurences:
javax.sound.midi.MidiFileFormat.getByteLength()
javax.sound.sampled.AudioFileFormat.getByteLength()


Occurences of getByteOrder

getByteOrder occurences:
javax.imageio.stream.ImageInputStream.getByteOrder()
javax.imageio.stream.ImageInputStreamImpl.getByteOrder()


Occurences of getBytes

getBytes occurences:
java.lang.String.getBytes()
java.lang.String.getBytes(int, int, byte:A, int)
java.lang.String.getBytes(java.lang.String)
java.lang.String.getBytes(java.nio.charset.Charset)
java.sql.Blob.getBytes(long, int)
java.sql.CallableStatement.getBytes(int)
java.sql.CallableStatement.getBytes(java.lang.String)
java.sql.ResultSet.getBytes(int)
java.sql.ResultSet.getBytes(java.lang.String)
java.sql.RowId.getBytes()
javax.sql.rowset.serial.SerialBlob.getBytes(long, int)


Occurences of getBytesRead

getBytesRead occurences:
java.util.zip.Deflater.getBytesRead()
java.util.zip.Inflater.getBytesRead()


Occurences of getByteStream

getByteStream occurences:
org.w3c.dom.ls.LSInput.getByteStream()
org.w3c.dom.ls.LSOutput.getByteStream()
org.xml.sax.InputSource.getByteStream()


Occurences of getBytesWritten

getBytesWritten occurences:
java.util.zip.Deflater.getBytesWritten()
java.util.zip.Inflater.getBytesWritten()


Occurences of getCalendarField

getCalendarField occurences:
java.text.DateFormat.Field.getCalendarField()
javax.swing.SpinnerDateModel.getCalendarField()


Occurences of getCalendarType

getCalendarType occurences:
java.time.chrono.Chronology.getCalendarType()
java.time.chrono.HijrahChronology.getCalendarType()
java.time.chrono.IsoChronology.getCalendarType()
java.time.chrono.JapaneseChronology.getCalendarType()
java.time.chrono.MinguoChronology.getCalendarType()
java.time.chrono.ThaiBuddhistChronology.getCalendarType()
java.util.Calendar.getCalendarType()
java.util.GregorianCalendar.getCalendarType()


Occurences of getCanonicalName

getCanonicalName occurences:
java.lang.Class.getCanonicalName()
javax.management.ObjectName.getCanonicalName()


Occurences of getCapabilities

getCapabilities occurences:
java.awt.Component.BltBufferStrategy.getCapabilities()
java.awt.Component.FlipBufferStrategy.getCapabilities()
java.awt.Image.getCapabilities(java.awt.GraphicsConfiguration)
java.awt.image.BufferStrategy.getCapabilities()
java.awt.image.VolatileImage.getCapabilities()


Occurences of getCaret

getCaret occurences:
java.awt.event.InputMethodEvent.getCaret()
javax.swing.text.JTextComponent.getCaret()
javax.swing.text.NavigationFilter.FilterBypass.getCaret()


Occurences of getCaretInfo

getCaretInfo occurences:
java.awt.font.TextLayout.getCaretInfo(java.awt.font.TextHitInfo)
java.awt.font.TextLayout.getCaretInfo(java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)


Occurences of getCaretPosition

getCaretPosition occurences:
java.awt.TextComponent.getCaretPosition()
java.awt.TextComponent.AccessibleAWTTextComponent.getCaretPosition()
javax.accessibility.AccessibleText.getCaretPosition()
javax.swing.AbstractButton.AccessibleAbstractButton.getCaretPosition()
javax.swing.JLabel.AccessibleJLabel.getCaretPosition()
javax.swing.JSpinner.AccessibleJSpinner.getCaretPosition()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getCaretPosition()
javax.swing.text.JTextComponent.getCaretPosition()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getCaretPosition()


Occurences of getCaretShape

getCaretShape occurences:
java.awt.font.TextLayout.getCaretShape(java.awt.font.TextHitInfo)
java.awt.font.TextLayout.getCaretShape(java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)


Occurences of getCaretShapes

getCaretShapes occurences:
java.awt.font.TextLayout.getCaretShapes(int)
java.awt.font.TextLayout.getCaretShapes(int, java.awt.geom.Rectangle2D)
java.awt.font.TextLayout.getCaretShapes(int, java.awt.geom.Rectangle2D, java.awt.font.TextLayout.CaretPolicy)


Occurences of getCatalogName

getCatalogName occurences:
java.sql.ResultSetMetaData.getCatalogName(int)
javax.sql.rowset.RowSetMetaDataImpl.getCatalogName(int)


Occurences of getCategory

getCategory occurences:
javax.print.attribute.Attribute.getCategory()
javax.print.attribute.standard.Chromaticity.getCategory()
javax.print.attribute.standard.ColorSupported.getCategory()
javax.print.attribute.standard.Compression.getCategory()
javax.print.attribute.standard.Copies.getCategory()
javax.print.attribute.standard.CopiesSupported.getCategory()
javax.print.attribute.standard.DateTimeAtCompleted.getCategory()
javax.print.attribute.standard.DateTimeAtCreation.getCategory()
javax.print.attribute.standard.DateTimeAtProcessing.getCategory()
javax.print.attribute.standard.Destination.getCategory()
javax.print.attribute.standard.DialogTypeSelection.getCategory()
javax.print.attribute.standard.DocumentName.getCategory()
javax.print.attribute.standard.Fidelity.getCategory()
javax.print.attribute.standard.Finishings.getCategory()
javax.print.attribute.standard.JobHoldUntil.getCategory()
javax.print.attribute.standard.JobImpressions.getCategory()
javax.print.attribute.standard.JobImpressionsCompleted.getCategory()
javax.print.attribute.standard.JobImpressionsSupported.getCategory()
javax.print.attribute.standard.JobKOctets.getCategory()
javax.print.attribute.standard.JobKOctetsProcessed.getCategory()
javax.print.attribute.standard.JobKOctetsSupported.getCategory()
javax.print.attribute.standard.JobMediaSheets.getCategory()
javax.print.attribute.standard.JobMediaSheetsCompleted.getCategory()
javax.print.attribute.standard.JobMediaSheetsSupported.getCategory()
javax.print.attribute.standard.JobMessageFromOperator.getCategory()
javax.print.attribute.standard.JobName.getCategory()
javax.print.attribute.standard.JobOriginatingUserName.getCategory()
javax.print.attribute.standard.JobPriority.getCategory()
javax.print.attribute.standard.JobPrioritySupported.getCategory()
javax.print.attribute.standard.JobSheets.getCategory()
javax.print.attribute.standard.JobState.getCategory()
javax.print.attribute.standard.JobStateReason.getCategory()
javax.print.attribute.standard.JobStateReasons.getCategory()
javax.print.attribute.standard.Media.getCategory()
javax.print.attribute.standard.MediaPrintableArea.getCategory()
javax.print.attribute.standard.MediaSize.getCategory()
javax.print.attribute.standard.MultipleDocumentHandling.getCategory()
javax.print.attribute.standard.NumberOfDocuments.getCategory()
javax.print.attribute.standard.NumberOfInterveningJobs.getCategory()
javax.print.attribute.standard.NumberUp.getCategory()
javax.print.attribute.standard.NumberUpSupported.getCategory()
javax.print.attribute.standard.OrientationRequested.getCategory()
javax.print.attribute.standard.OutputDeviceAssigned.getCategory()
javax.print.attribute.standard.PageRanges.getCategory()
javax.print.attribute.standard.PagesPerMinute.getCategory()
javax.print.attribute.standard.PagesPerMinuteColor.getCategory()
javax.print.attribute.standard.PDLOverrideSupported.getCategory()
javax.print.attribute.standard.PresentationDirection.getCategory()
javax.print.attribute.standard.PrinterInfo.getCategory()
javax.print.attribute.standard.PrinterIsAcceptingJobs.getCategory()
javax.print.attribute.standard.PrinterLocation.getCategory()
javax.print.attribute.standard.PrinterMakeAndModel.getCategory()
javax.print.attribute.standard.PrinterMessageFromOperator.getCategory()
javax.print.attribute.standard.PrinterMoreInfo.getCategory()
javax.print.attribute.standard.PrinterMoreInfoManufacturer.getCategory()
javax.print.attribute.standard.PrinterName.getCategory()
javax.print.attribute.standard.PrinterResolution.getCategory()
javax.print.attribute.standard.PrinterState.getCategory()
javax.print.attribute.standard.PrinterStateReason.getCategory()
javax.print.attribute.standard.PrinterStateReasons.getCategory()
javax.print.attribute.standard.PrinterURI.getCategory()
javax.print.attribute.standard.PrintQuality.getCategory()
javax.print.attribute.standard.QueuedJobCount.getCategory()
javax.print.attribute.standard.ReferenceUriSchemesSupported.getCategory()
javax.print.attribute.standard.RequestingUserName.getCategory()
javax.print.attribute.standard.Severity.getCategory()
javax.print.attribute.standard.SheetCollate.getCategory()
javax.print.attribute.standard.Sides.getCategory()


Occurences of getCause

getCause occurences:
java.awt.print.PrinterIOException.getCause()
java.io.UncheckedIOException.getCause()
java.io.WriteAbortedException.getCause()
java.lang.ClassNotFoundException.getCause()
java.lang.ExceptionInInitializerError.getCause()
java.lang.reflect.InvocationTargetException.getCause()
java.lang.reflect.UndeclaredThrowableException.getCause()
java.lang.Throwable.getCause()
java.nio.file.DirectoryIteratorException.getCause()
java.rmi.activation.ActivationException.getCause()
java.rmi.RemoteException.getCause()
java.rmi.server.ServerCloneException.getCause()
java.security.PrivilegedActionException.getCause()
javax.management.MBeanException.getCause()
javax.management.ReflectionException.getCause()
javax.management.remote.JMXProviderException.getCause()
javax.management.remote.JMXServerErrorException.getCause()
javax.management.RuntimeErrorException.getCause()
javax.management.RuntimeMBeanException.getCause()
javax.management.RuntimeOperationsException.getCause()
javax.naming.NamingException.getCause()
javax.security.sasl.SaslException.getCause()
javax.xml.bind.JAXBException.getCause()
javax.xml.crypto.dsig.TransformException.getCause()
javax.xml.crypto.dsig.XMLSignatureException.getCause()
javax.xml.crypto.KeySelectorException.getCause()
javax.xml.crypto.MarshalException.getCause()
javax.xml.crypto.NoSuchMechanismException.getCause()
javax.xml.crypto.URIReferenceException.getCause()
javax.xml.parsers.FactoryConfigurationError.getCause()
javax.xml.soap.SOAPException.getCause()
javax.xml.stream.FactoryConfigurationError.getCause()
javax.xml.transform.TransformerException.getCause()
javax.xml.transform.TransformerFactoryConfigurationError.getCause()
javax.xml.xpath.XPathException.getCause()
org.xml.sax.SAXException.getCause()


Occurences of getCellBounds

getCellBounds occurences:
javax.swing.JList.getCellBounds(int, int)
javax.swing.plaf.basic.BasicListUI.getCellBounds(javax.swing.JList, int, int)
javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int)
javax.swing.plaf.multi.MultiListUI.getCellBounds(javax.swing.JList, int, int)


Occurences of getCellEditor

getCellEditor occurences:
javax.swing.JTable.getCellEditor()
javax.swing.JTable.getCellEditor(int, int)
javax.swing.JTree.getCellEditor()
javax.swing.plaf.basic.BasicTreeUI.getCellEditor()
javax.swing.table.TableColumn.getCellEditor()


Occurences of getCellEditorListeners

getCellEditorListeners occurences:
javax.swing.AbstractCellEditor.getCellEditorListeners()
javax.swing.tree.DefaultTreeCellEditor.getCellEditorListeners()


Occurences of getCellEditorValue

getCellEditorValue occurences:
javax.swing.CellEditor.getCellEditorValue()
javax.swing.DefaultCellEditor.getCellEditorValue()
javax.swing.DefaultCellEditor.EditorDelegate.getCellEditorValue()
javax.swing.tree.DefaultTreeCellEditor.getCellEditorValue()


Occurences of getCellRenderer

getCellRenderer occurences:
javax.swing.JList.getCellRenderer()
javax.swing.JTable.getCellRenderer(int, int)
javax.swing.JTree.getCellRenderer()
javax.swing.plaf.basic.BasicTreeUI.getCellRenderer()
javax.swing.table.TableColumn.getCellRenderer()


Occurences of getCenterPoint

getCenterPoint occurences:
java.awt.GraphicsEnvironment.getCenterPoint()
java.awt.RadialGradientPaint.getCenterPoint()


Occurences of getCertificate

getCertificate occurences:
java.security.cert.X509CertSelector.getCertificate()
java.security.KeyStore.getCertificate(java.lang.String)
java.security.KeyStore.PrivateKeyEntry.getCertificate()
javax.security.auth.x500.X500PrivateCredential.getCertificate()


Occurences of getCertificateChain

getCertificateChain occurences:
java.security.KeyStore.getCertificateChain(java.lang.String)
java.security.KeyStore.PrivateKeyEntry.getCertificateChain()
javax.net.ssl.X509KeyManager.getCertificateChain(java.lang.String)


Occurences of getCertificates

getCertificates occurences:
java.net.JarURLConnection.getCertificates()
java.security.cert.CertPath.getCertificates()
java.security.cert.CertStore.getCertificates(java.security.cert.CertSelector)
java.security.CodeSource.getCertificates()
java.util.jar.JarEntry.getCertificates()


Occurences of getCertPath

getCertPath occurences:
java.security.cert.CertPathBuilderResult.getCertPath()
java.security.cert.CertPathValidatorException.getCertPath()
java.security.cert.PKIXCertPathBuilderResult.getCertPath()


Occurences of getChange

getChange occurences:
javax.swing.event.DocumentEvent.getChange(javax.swing.text.Element)
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getChange(javax.swing.text.Element)


Occurences of getChangeListeners

getChangeListeners occurences:
javax.swing.AbstractButton.getChangeListeners()
javax.swing.AbstractSpinnerModel.getChangeListeners()
javax.swing.colorchooser.DefaultColorSelectionModel.getChangeListeners()
javax.swing.DefaultBoundedRangeModel.getChangeListeners()
javax.swing.DefaultButtonModel.getChangeListeners()
javax.swing.DefaultSingleSelectionModel.getChangeListeners()
javax.swing.JProgressBar.getChangeListeners()
javax.swing.JSlider.getChangeListeners()
javax.swing.JSpinner.getChangeListeners()
javax.swing.JTabbedPane.getChangeListeners()
javax.swing.JViewport.getChangeListeners()
javax.swing.MenuSelectionManager.getChangeListeners()
javax.swing.text.DefaultCaret.getChangeListeners()
javax.swing.text.StyleContext.getChangeListeners()
javax.swing.text.StyleContext.NamedStyle.getChangeListeners()


Occurences of getChannel

getChannel occurences:
java.io.FileInputStream.getChannel()
java.io.FileOutputStream.getChannel()
java.io.RandomAccessFile.getChannel()
java.net.DatagramSocket.getChannel()
java.net.ServerSocket.getChannel()
java.net.Socket.getChannel()
javax.sound.midi.ShortMessage.getChannel()


Occurences of getChannels

getChannels occurences:
javax.sound.midi.Synthesizer.getChannels()
javax.sound.sampled.AudioFormat.getChannels()


Occurences of getChar

getChar occurences:
java.lang.reflect.Array.getChar(java.lang.Object, int)
java.lang.reflect.Field.getChar(java.lang.Object)
java.nio.ByteBuffer.getChar()
java.nio.ByteBuffer.getChar(int)


Occurences of getCharacterAttribute

getCharacterAttribute occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getCharacterAttribute(int)
javax.accessibility.AccessibleText.getCharacterAttribute(int)
javax.swing.AbstractButton.AccessibleAbstractButton.getCharacterAttribute(int)
javax.swing.JLabel.AccessibleJLabel.getCharacterAttribute(int)
javax.swing.JSpinner.AccessibleJSpinner.getCharacterAttribute(int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getCharacterAttribute(int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getCharacterAttribute(int)


Occurences of getCharacterBounds

getCharacterBounds occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getCharacterBounds(int)
javax.accessibility.AccessibleText.getCharacterBounds(int)
javax.swing.AbstractButton.AccessibleAbstractButton.getCharacterBounds(int)
javax.swing.JLabel.AccessibleJLabel.getCharacterBounds(int)
javax.swing.JSpinner.AccessibleJSpinner.getCharacterBounds(int)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getCharacterBounds(int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getCharacterBounds(int)


Occurences of getCharacterElement

getCharacterElement occurences:
javax.swing.text.DefaultStyledDocument.getCharacterElement(int)
javax.swing.text.StyledDocument.getCharacterElement(int)


Occurences of getCharacterEncodingScheme

getCharacterEncodingScheme occurences:
javax.xml.stream.events.StartDocument.getCharacterEncodingScheme()
javax.xml.stream.util.StreamReaderDelegate.getCharacterEncodingScheme()
javax.xml.stream.XMLStreamReader.getCharacterEncodingScheme()


Occurences of getCharacterInstance

getCharacterInstance occurences:
java.text.BreakIterator.getCharacterInstance()
java.text.BreakIterator.getCharacterInstance(java.util.Locale)
java.text.spi.BreakIteratorProvider.getCharacterInstance(java.util.Locale)


Occurences of getCharacterStream

getCharacterStream occurences:
java.sql.CallableStatement.getCharacterStream(int)
java.sql.CallableStatement.getCharacterStream(java.lang.String)
java.sql.Clob.getCharacterStream()
java.sql.Clob.getCharacterStream(long, long)
java.sql.ResultSet.getCharacterStream(int)
java.sql.ResultSet.getCharacterStream(java.lang.String)
java.sql.SQLXML.getCharacterStream()
javax.sql.rowset.serial.SerialClob.getCharacterStream()
javax.sql.rowset.serial.SerialClob.getCharacterStream(long, long)
org.w3c.dom.ls.LSInput.getCharacterStream()
org.w3c.dom.ls.LSOutput.getCharacterStream()
org.xml.sax.InputSource.getCharacterStream()


Occurences of getCharContent

getCharContent occurences:
javax.tools.FileObject.getCharContent(boolean)
javax.tools.ForwardingFileObject.getCharContent(boolean)
javax.tools.SimpleJavaFileObject.getCharContent(boolean)


Occurences of getCharCount

getCharCount occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getCharCount()
javax.accessibility.AccessibleText.getCharCount()
javax.swing.AbstractButton.AccessibleAbstractButton.getCharCount()
javax.swing.JLabel.AccessibleJLabel.getCharCount()
javax.swing.JSpinner.AccessibleJSpinner.getCharCount()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getCharCount()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getCharCount()


Occurences of getChars

getChars occurences:
java.lang.String.getChars(int, int, char:A, int)
java.lang.StringBuffer.getChars(int, int, char:A, int)
java.lang.StringBuilder.getChars(int, int, char:A, int)
javax.swing.text.AbstractDocument.Content.getChars(int, int, javax.swing.text.Segment)
javax.swing.text.GapContent.getChars(int, int, javax.swing.text.Segment)
javax.swing.text.StringContent.getChars(int, int, javax.swing.text.Segment)


Occurences of getCharsetName

getCharsetName occurences:
java.nio.charset.IllegalCharsetNameException.getCharsetName()
java.nio.charset.UnsupportedCharsetException.getCharsetName()


Occurences of getCheckBoxIcon

getCheckBoxIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getCheckBoxIcon()
javax.swing.plaf.metal.MetalIconFactory.getCheckBoxIcon()


Occurences of getCheckBoxMenuItemIcon

getCheckBoxMenuItemIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getCheckBoxMenuItemIcon()
javax.swing.plaf.metal.MetalIconFactory.getCheckBoxMenuItemIcon()


Occurences of getChecksum

getChecksum occurences:
java.util.zip.CheckedInputStream.getChecksum()
java.util.zip.CheckedOutputStream.getChecksum()


Occurences of getChild

getChild occurences:
java.awt.event.ContainerEvent.getChild()
java.util.prefs.AbstractPreferences.getChild(java.lang.String)
java.util.prefs.NodeChangeEvent.getChild()
javax.swing.filechooser.FileSystemView.getChild(java.io.File, java.lang.String)
javax.swing.tree.DefaultTreeModel.getChild(java.lang.Object, int)
javax.swing.tree.TreeModel.getChild(java.lang.Object, int)


Occurences of getChildAllocation

getChildAllocation occurences:
javax.swing.text.AsyncBoxView.getChildAllocation(int, java.awt.Shape)
javax.swing.text.AsyncBoxView.ChildLocator.getChildAllocation(int)
javax.swing.text.AsyncBoxView.ChildLocator.getChildAllocation(int, java.awt.Shape)
javax.swing.text.BoxView.getChildAllocation(int, java.awt.Shape)
javax.swing.text.CompositeView.getChildAllocation(int, java.awt.Shape)
javax.swing.text.View.getChildAllocation(int, java.awt.Shape)


Occurences of getChildAt

getChildAt occurences:
javax.swing.JTree.DynamicUtilTreeNode.getChildAt(int)
javax.swing.text.AbstractDocument.AbstractElement.getChildAt(int)
javax.swing.tree.DefaultMutableTreeNode.getChildAt(int)
javax.swing.tree.TreeNode.getChildAt(int)


Occurences of getChildCount

getChildCount occurences:
javax.swing.JTree.DynamicUtilTreeNode.getChildCount()
javax.swing.text.AbstractDocument.AbstractElement.getChildCount()
javax.swing.tree.DefaultMutableTreeNode.getChildCount()
javax.swing.tree.DefaultTreeModel.getChildCount(java.lang.Object)
javax.swing.tree.TreeModel.getChildCount(java.lang.Object)
javax.swing.tree.TreeNode.getChildCount()


Occurences of getChildElements

getChildElements occurences:
javax.xml.soap.SOAPElement.getChildElements()
javax.xml.soap.SOAPElement.getChildElements(javax.xml.namespace.QName)
javax.xml.soap.SOAPElement.getChildElements(javax.xml.soap.Name)


Occurences of getChildNames

getChildNames occurences:
javax.imageio.metadata.IIOMetadataFormat.getChildNames(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getChildNames(java.lang.String)


Occurences of getChildNodes

getChildNodes occurences:
javax.imageio.metadata.IIOMetadataNode.getChildNodes()
org.w3c.dom.Node.getChildNodes()


Occurences of getChildPolicy

getChildPolicy occurences:
javax.imageio.metadata.IIOMetadataFormat.getChildPolicy(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getChildPolicy(java.lang.String)


Occurences of getChildren

getChildren occurences:
java.security.cert.PolicyNode.getChildren()
javax.swing.event.TreeModelEvent.getChildren()


Occurences of getChildrenAdded

getChildrenAdded occurences:
javax.swing.event.DocumentEvent.ElementChange.getChildrenAdded()
javax.swing.text.AbstractDocument.ElementEdit.getChildrenAdded()


Occurences of getChildrenRemoved

getChildrenRemoved occurences:
javax.swing.event.DocumentEvent.ElementChange.getChildrenRemoved()
javax.swing.text.AbstractDocument.ElementEdit.getChildrenRemoved()


Occurences of getChronology

getChronology occurences:
java.time.chrono.ChronoLocalDate.getChronology()
java.time.chrono.ChronoLocalDateTime.getChronology()
java.time.chrono.ChronoPeriod.getChronology()
java.time.chrono.ChronoZonedDateTime.getChronology()
java.time.chrono.HijrahDate.getChronology()
java.time.chrono.JapaneseDate.getChronology()
java.time.chrono.MinguoDate.getChronology()
java.time.chrono.ThaiBuddhistDate.getChronology()
java.time.format.DateTimeFormatter.getChronology()
java.time.LocalDate.getChronology()
java.time.Period.getChronology()


Occurences of getCipherSuite

getCipherSuite occurences:
java.net.SecureCacheResponse.getCipherSuite()
javax.net.ssl.HandshakeCompletedEvent.getCipherSuite()
javax.net.ssl.HttpsURLConnection.getCipherSuite()
javax.net.ssl.SSLSession.getCipherSuite()


Occurences of getClassAnnotation

getClassAnnotation occurences:
java.rmi.server.RMIClassLoader.getClassAnnotation(java.lang.Class)
java.rmi.server.RMIClassLoaderSpi.getClassAnnotation(java.lang.Class)


Occurences of getClassLoader

getClassLoader occurences:
java.lang.Class.getClassLoader()
java.rmi.server.RMIClassLoader.getClassLoader(java.lang.String)
java.rmi.server.RMIClassLoaderSpi.getClassLoader(java.lang.String)
java.security.ProtectionDomain.getClassLoader()
javax.management.MBeanServer.getClassLoader(javax.management.ObjectName)
javax.tools.ForwardingJavaFileManager.getClassLoader(javax.tools.JavaFileManager.Location)
javax.tools.JavaFileManager.getClassLoader(javax.tools.JavaFileManager.Location)


Occurences of getClassLoaderRepository

getClassLoaderRepository occurences:
javax.management.MBeanServer.getClassLoaderRepository()
javax.management.MBeanServerFactory.getClassLoaderRepository(javax.management.MBeanServer)
javax.management.modelmbean.RequiredModelMBean.getClassLoaderRepository()


Occurences of getClassName

getClassName occurences:
java.lang.management.LockInfo.getClassName()
java.lang.StackTraceElement.getClassName()
java.rmi.activation.ActivationDesc.getClassName()
java.rmi.activation.ActivationGroupDesc.getClassName()
java.security.Provider.Service.getClassName()
java.util.MissingResourceException.getClassName()
javax.management.MBeanInfo.getClassName()
javax.management.modelmbean.ModelMBeanInfo.getClassName()
javax.management.ObjectInstance.getClassName()
javax.management.openmbean.OpenMBeanInfo.getClassName()
javax.management.openmbean.OpenType.getClassName()
javax.management.StandardMBean.getClassName(javax.management.MBeanInfo)
javax.naming.Binding.getClassName()
javax.naming.NameClassPair.getClassName()
javax.naming.Reference.getClassName()
javax.swing.UIManager.LookAndFeelInfo.getClassName()


Occurences of getClientHost

getClientHost occurences:
java.rmi.server.RemoteServer.getClientHost()
java.rmi.server.ServerRef.getClientHost()


Occurences of getClientInfo

getClientInfo occurences:
java.sql.Connection.getClientInfo()
java.sql.Connection.getClientInfo(java.lang.String)


Occurences of getClip

getClip occurences:
java.awt.Graphics.getClip()
javax.sound.sampled.AudioSystem.getClip()
javax.sound.sampled.AudioSystem.getClip(javax.sound.sampled.Mixer.Info)
javax.swing.DebugGraphics.getClip()


Occurences of getClipBounds

getClipBounds occurences:
java.awt.Graphics.getClipBounds()
java.awt.Graphics.getClipBounds(java.awt.Rectangle)
javax.swing.DebugGraphics.getClipBounds()


Occurences of getClob

getClob occurences:
java.sql.CallableStatement.getClob(int)
java.sql.CallableStatement.getClob(java.lang.String)
java.sql.ResultSet.getClob(int)
java.sql.ResultSet.getClob(java.lang.String)


Occurences of getClosestPathForLocation

getClosestPathForLocation occurences:
javax.swing.JTree.getClosestPathForLocation(int, int)
javax.swing.plaf.basic.BasicTreeUI.getClosestPathForLocation(javax.swing.JTree, int, int)
javax.swing.plaf.multi.MultiTreeUI.getClosestPathForLocation(javax.swing.JTree, int, int)
javax.swing.plaf.TreeUI.getClosestPathForLocation(javax.swing.JTree, int, int)


Occurences of getCode

getCode occurences:
javax.management.loading.MLetContent.getCode()
javax.tools.Diagnostic.getCode()


Occurences of getCodeBase

getCodeBase occurences:
java.applet.Applet.getCodeBase()
java.applet.AppletStub.getCodeBase()
javax.management.loading.MLetContent.getCodeBase()


Occurences of getCodebase

getCodebase occurences:
javax.rmi.CORBA.Util.getCodebase(java.lang.Class)
javax.rmi.CORBA.UtilDelegate.getCodebase(java.lang.Class)


Occurences of getCodeSigners

getCodeSigners occurences:
java.security.CodeSource.getCodeSigners()
java.util.jar.JarEntry.getCodeSigners()


Occurences of getCollationElementIterator

getCollationElementIterator occurences:
java.text.RuleBasedCollator.getCollationElementIterator(java.lang.String)
java.text.RuleBasedCollator.getCollationElementIterator(java.text.CharacterIterator)


Occurences of getCollationKey

getCollationKey occurences:
java.text.Collator.getCollationKey(java.lang.String)
java.text.RuleBasedCollator.getCollationKey(java.lang.String)


Occurences of getColor

getColor occurences:
java.awt.Color.getColor(java.lang.String)
java.awt.Color.getColor(java.lang.String, int)
java.awt.Color.getColor(java.lang.String, java.awt.Color)
java.awt.Graphics.getColor()
java.awt.PageAttributes.getColor()
javax.swing.DebugGraphics.getColor()
javax.swing.JColorChooser.getColor()
javax.swing.plaf.synth.SynthStyle.getColor(javax.swing.plaf.synth.SynthContext, javax.swing.plaf.synth.ColorType)
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter.getColor()
javax.swing.UIDefaults.getColor(java.lang.Object)
javax.swing.UIDefaults.getColor(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getColor(java.lang.Object)
javax.swing.UIManager.getColor(java.lang.Object, java.util.Locale)


Occurences of getColorComponents

getColorComponents occurences:
java.awt.Color.getColorComponents(float:A)
java.awt.Color.getColorComponents(java.awt.color.ColorSpace, float:A)


Occurences of getColorForState

getColorForState occurences:
javax.swing.plaf.nimbus.NimbusStyle.getColorForState(javax.swing.plaf.synth.SynthContext, javax.swing.plaf.synth.ColorType)
javax.swing.plaf.synth.SynthStyle.getColorForState(javax.swing.plaf.synth.SynthContext, javax.swing.plaf.synth.ColorType)


Occurences of getColorModel

getColorModel occurences:
java.awt.Component.getColorModel()
java.awt.GraphicsConfiguration.getColorModel()
java.awt.GraphicsConfiguration.getColorModel(int)
java.awt.image.BufferedImage.getColorModel()
java.awt.image.PixelGrabber.getColorModel()
java.awt.image.RenderedImage.getColorModel()
java.awt.PaintContext.getColorModel()
java.awt.Toolkit.getColorModel()
javax.imageio.ImageTypeSpecifier.getColorModel()


Occurences of getColorSpace

getColorSpace occurences:
java.awt.Color.getColorSpace()
java.awt.image.ColorModel.getColorSpace()
java.awt.MultipleGradientPaint.getColorSpace()


Occurences of getColumn

getColumn occurences:
javax.swing.event.TableModelEvent.getColumn()
javax.swing.JTable.getColumn(java.lang.Object)
javax.swing.JTable.DropLocation.getColumn()
javax.swing.RowSorter.SortKey.getColumn()
javax.swing.table.DefaultTableColumnModel.getColumn(int)
javax.swing.table.TableColumnModel.getColumn(int)


Occurences of getColumnClass

getColumnClass occurences:
javax.swing.JTable.getColumnClass(int)
javax.swing.table.AbstractTableModel.getColumnClass(int)
javax.swing.table.TableModel.getColumnClass(int)


Occurences of getColumnClassName

getColumnClassName occurences:
java.sql.ResultSetMetaData.getColumnClassName(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnClassName(int)


Occurences of getColumnCount

getColumnCount occurences:
java.sql.ResultSetMetaData.getColumnCount()
javax.sql.rowset.RowSetMetaDataImpl.getColumnCount()
javax.swing.DefaultRowSorter.ModelWrapper.getColumnCount()
javax.swing.JTable.getColumnCount()
javax.swing.table.DefaultTableColumnModel.getColumnCount()
javax.swing.table.DefaultTableModel.getColumnCount()
javax.swing.table.TableColumnModel.getColumnCount()
javax.swing.table.TableModel.getColumnCount()
javax.swing.text.TableView.TableCell.getColumnCount()


Occurences of getColumnDisplaySize

getColumnDisplaySize occurences:
java.sql.ResultSetMetaData.getColumnDisplaySize(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnDisplaySize(int)


Occurences of getColumnHeader

getColumnHeader occurences:
javax.swing.JScrollPane.getColumnHeader()
javax.swing.ScrollPaneLayout.getColumnHeader()


Occurences of getColumnIndex

getColumnIndex occurences:
javax.swing.table.DefaultTableColumnModel.getColumnIndex(java.lang.Object)
javax.swing.table.TableColumnModel.getColumnIndex(java.lang.Object)


Occurences of getColumnIndexAtX

getColumnIndexAtX occurences:
javax.swing.table.DefaultTableColumnModel.getColumnIndexAtX(int)
javax.swing.table.TableColumnModel.getColumnIndexAtX(int)


Occurences of getColumnLabel

getColumnLabel occurences:
java.sql.ResultSetMetaData.getColumnLabel(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnLabel(int)


Occurences of getColumnMargin

getColumnMargin occurences:
javax.swing.table.DefaultTableColumnModel.getColumnMargin()
javax.swing.table.TableColumnModel.getColumnMargin()


Occurences of getColumnModel

getColumnModel occurences:
javax.swing.JTable.getColumnModel()
javax.swing.table.JTableHeader.getColumnModel()


Occurences of getColumnName

getColumnName occurences:
java.sql.ResultSetMetaData.getColumnName(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnName(int)
javax.swing.JTable.getColumnName(int)
javax.swing.table.AbstractTableModel.getColumnName(int)
javax.swing.table.DefaultTableModel.getColumnName(int)
javax.swing.table.TableModel.getColumnName(int)


Occurences of getColumnNumber

getColumnNumber occurences:
com.sun.source.tree.LineMap.getColumnNumber(long)
javax.script.ScriptException.getColumnNumber()
javax.tools.Diagnostic.getColumnNumber()
javax.xml.bind.helpers.ValidationEventLocatorImpl.getColumnNumber()
javax.xml.bind.ValidationEventLocator.getColumnNumber()
javax.xml.stream.Location.getColumnNumber()
javax.xml.transform.SourceLocator.getColumnNumber()
org.w3c.dom.DOMLocator.getColumnNumber()
org.xml.sax.helpers.LocatorImpl.getColumnNumber()
org.xml.sax.Locator.getColumnNumber()
org.xml.sax.SAXParseException.getColumnNumber()


Occurences of getColumns

getColumns occurences:
java.awt.GridLayout.getColumns()
java.awt.TextArea.getColumns()
java.awt.TextField.getColumns()
java.sql.DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
javax.swing.JTextArea.getColumns()
javax.swing.JTextField.getColumns()
javax.swing.table.DefaultTableColumnModel.getColumns()
javax.swing.table.TableColumnModel.getColumns()


Occurences of getColumnSelectionAllowed

getColumnSelectionAllowed occurences:
javax.swing.JTable.getColumnSelectionAllowed()
javax.swing.table.DefaultTableColumnModel.getColumnSelectionAllowed()
javax.swing.table.TableColumnModel.getColumnSelectionAllowed()


Occurences of getColumnType

getColumnType occurences:
java.sql.ResultSetMetaData.getColumnType(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnType(int)


Occurences of getColumnTypeName

getColumnTypeName occurences:
java.sql.ResultSetMetaData.getColumnTypeName(int)
javax.sql.rowset.RowSetMetaDataImpl.getColumnTypeName(int)


Occurences of getColumnWidth

getColumnWidth occurences:
javax.swing.JTextArea.getColumnWidth()
javax.swing.JTextField.getColumnWidth()


Occurences of getCommand

getCommand occurences:
javax.activation.CommandMap.getCommand(java.lang.String, java.lang.String)
javax.activation.CommandMap.getCommand(java.lang.String, java.lang.String, javax.activation.DataSource)
javax.activation.DataHandler.getCommand(java.lang.String)
javax.activation.MailcapCommandMap.getCommand(java.lang.String, java.lang.String)
javax.sound.midi.ShortMessage.getCommand()
javax.sql.RowSet.getCommand()
javax.sql.rowset.BaseRowSet.getCommand()


Occurences of getComment

getComment occurences:
java.net.HttpCookie.getComment()
java.util.zip.ZipEntry.getComment()
java.util.zip.ZipFile.getComment()


Occurences of getComparator

getComparator occurences:
java.util.Spliterator.getComparator()
javax.swing.DefaultRowSorter.getComparator(int)
javax.swing.SortingFocusTraversalPolicy.getComparator()
javax.swing.table.TableRowSorter.getComparator(int)


Occurences of getCompilationUnit

getCompilationUnit occurences:
com.sun.source.util.TaskEvent.getCompilationUnit()
com.sun.source.util.TreePath.getCompilationUnit()


Occurences of getCompletions

getCompletions occurences:
javax.annotation.processing.AbstractProcessor.getCompletions(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror, javax.lang.model.element.ExecutableElement, java.lang.String)
javax.annotation.processing.Processor.getCompletions(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror, javax.lang.model.element.ExecutableElement, java.lang.String)


Occurences of getComponent

getComponent occurences:
java.awt.Container.getComponent(int)
java.awt.dnd.DragGestureEvent.getComponent()
java.awt.dnd.DragGestureRecognizer.getComponent()
java.awt.dnd.DragSourceContext.getComponent()
java.awt.dnd.DropTarget.getComponent()
java.awt.dnd.DropTargetContext.getComponent()
java.awt.event.ComponentEvent.getComponent()
java.awt.event.HierarchyEvent.getComponent()
java.beans.beancontext.BeanContextChildComponentProxy.getComponent()
javax.swing.ComponentInputMap.getComponent()
javax.swing.DefaultCellEditor.getComponent()
javax.swing.event.AncestorEvent.getComponent()
javax.swing.JMenu.getComponent()
javax.swing.JMenuBar.getComponent()
javax.swing.JMenuItem.getComponent()
javax.swing.JPopupMenu.getComponent()
javax.swing.JToolTip.getComponent()
javax.swing.MenuElement.getComponent()
javax.swing.plaf.basic.BasicTextUI.getComponent()
javax.swing.plaf.synth.SynthContext.getComponent()
javax.swing.Renderer.getComponent()
javax.swing.text.ComponentView.getComponent()
javax.swing.text.DefaultCaret.getComponent()
javax.swing.text.StyleConstants.getComponent(javax.swing.text.AttributeSet)
javax.swing.TransferHandler.TransferSupport.getComponent()


Occurences of getComponentAfter

getComponentAfter occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getComponentAfter(java.awt.Container, java.awt.Component)
java.awt.FocusTraversalPolicy.getComponentAfter(java.awt.Container, java.awt.Component)
javax.swing.DefaultFocusManager.getComponentAfter(java.awt.Container, java.awt.Component)
javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(java.awt.Container, java.awt.Component)
javax.swing.SortingFocusTraversalPolicy.getComponentAfter(java.awt.Container, java.awt.Component)


Occurences of getComponentAt

getComponentAt occurences:
java.awt.Component.getComponentAt(int, int)
java.awt.Component.getComponentAt(java.awt.Point)
java.awt.Container.getComponentAt(int, int)
java.awt.Container.getComponentAt(java.awt.Point)
javax.swing.JTabbedPane.getComponentAt(int)


Occurences of getComponentAtIndex

getComponentAtIndex occurences:
javax.swing.JMenuBar.getComponentAtIndex(int)
javax.swing.JPopupMenu.getComponentAtIndex(int)
javax.swing.JToolBar.getComponentAtIndex(int)


Occurences of getComponentBefore

getComponentBefore occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getComponentBefore(java.awt.Container, java.awt.Component)
java.awt.FocusTraversalPolicy.getComponentBefore(java.awt.Container, java.awt.Component)
javax.swing.DefaultFocusManager.getComponentBefore(java.awt.Container, java.awt.Component)
javax.swing.LayoutFocusTraversalPolicy.getComponentBefore(java.awt.Container, java.awt.Component)
javax.swing.SortingFocusTraversalPolicy.getComponentBefore(java.awt.Container, java.awt.Component)


Occurences of getComponentIndex

getComponentIndex occurences:
javax.swing.JMenuBar.getComponentIndex(java.awt.Component)
javax.swing.JPopupMenu.getComponentIndex(java.awt.Component)
javax.swing.JToolBar.getComponentIndex(java.awt.Component)


Occurences of getComponents

getComponents occurences:
java.awt.Color.getComponents(float:A)
java.awt.Color.getComponents(java.awt.color.ColorSpace, float:A)
java.awt.Container.getComponents()
java.awt.image.ColorModel.getComponents(int, int:A, int)
java.awt.image.ColorModel.getComponents(java.lang.Object, int:A, int)
java.awt.image.ComponentColorModel.getComponents(int, int:A, int)
java.awt.image.ComponentColorModel.getComponents(java.lang.Object, int:A, int)
java.awt.image.DirectColorModel.getComponents(int, int:A, int)
java.awt.image.DirectColorModel.getComponents(java.lang.Object, int:A, int)
java.awt.image.IndexColorModel.getComponents(int, int:A, int)
java.awt.image.IndexColorModel.getComponents(java.lang.Object, int:A, int)


Occurences of getComponentSize

getComponentSize occurences:
java.awt.image.ColorModel.getComponentSize()
java.awt.image.ColorModel.getComponentSize(int)
java.awt.image.IndexColorModel.getComponentSize()


Occurences of getComponentType

getComponentType occurences:
java.lang.Class.getComponentType()
javax.lang.model.type.ArrayType.getComponentType()


Occurences of getCompositeType

getCompositeType occurences:
javax.management.openmbean.CompositeData.getCompositeType()
javax.management.openmbean.CompositeDataSupport.getCompositeType()


Occurences of getCompressionQualityDescriptions

getCompressionQualityDescriptions occurences:
javax.imageio.ImageWriteParam.getCompressionQualityDescriptions()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.getCompressionQualityDescriptions()


Occurences of getCompressionQualityValues

getCompressionQualityValues occurences:
javax.imageio.ImageWriteParam.getCompressionQualityValues()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.getCompressionQualityValues()


Occurences of getConcurrency

getConcurrency occurences:
java.sql.ResultSet.getConcurrency()
javax.sql.rowset.BaseRowSet.getConcurrency()


Occurences of getCondition

getCondition occurences:
com.sun.source.tree.AssertTree.getCondition()
com.sun.source.tree.ConditionalExpressionTree.getCondition()
com.sun.source.tree.DoWhileLoopTree.getCondition()
com.sun.source.tree.ForLoopTree.getCondition()
com.sun.source.tree.IfTree.getCondition()
com.sun.source.tree.WhileLoopTree.getCondition()


Occurences of getConfiguration

getConfiguration occurences:
java.security.DomainLoadStoreParameter.getConfiguration()
javax.security.auth.login.Configuration.getConfiguration()


Occurences of getConflictValue

getConflictValue occurences:
javax.sql.rowset.spi.SyncResolver.getConflictValue(int)
javax.sql.rowset.spi.SyncResolver.getConflictValue(java.lang.String)


Occurences of getConnectControls

getConnectControls occurences:
javax.naming.ldap.InitialLdapContext.getConnectControls()
javax.naming.ldap.LdapContext.getConnectControls()


Occurences of getConnection

getConnection occurences:
java.sql.DatabaseMetaData.getConnection()
java.sql.DriverManager.getConnection(java.lang.String)
java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties)
java.sql.Statement.getConnection()
javax.sql.DataSource.getConnection()
javax.sql.DataSource.getConnection(java.lang.String, java.lang.String)
javax.sql.PooledConnection.getConnection()
javax.sql.RowSetInternal.getConnection()


Occurences of getConnectionId

getConnectionId occurences:
javax.management.remote.JMXConnectionNotification.getConnectionId()
javax.management.remote.JMXConnector.getConnectionId()
javax.management.remote.rmi.RMIConnection.getConnectionId()
javax.management.remote.rmi.RMIConnectionImpl.getConnectionId()
javax.management.remote.rmi.RMIConnectionImpl_Stub.getConnectionId()
javax.management.remote.rmi.RMIConnector.getConnectionId()


Occurences of getConnectionIds

getConnectionIds occurences:
javax.management.remote.JMXConnectorServer.getConnectionIds()
javax.management.remote.JMXConnectorServerMBean.getConnectionIds()


Occurences of getConstraint

getConstraint occurences:
javax.swing.SpringLayout.getConstraint(java.lang.String, java.awt.Component)
javax.swing.SpringLayout.Constraints.getConstraint(java.lang.String)


Occurences of getConstraints

getConstraints occurences:
java.awt.BorderLayout.getConstraints(java.awt.Component)
java.awt.GridBagLayout.getConstraints(java.awt.Component)
javax.swing.SpringLayout.getConstraints(java.awt.Component)


Occurences of getConstructor

getConstructor occurences:
java.lang.Class.getConstructor(java.lang.Class...)
javax.management.modelmbean.ModelMBeanInfoSupport.getConstructor(java.lang.String)


Occurences of getConstructors

getConstructors occurences:
java.lang.Class.getConstructors()
javax.management.MBeanInfo.getConstructors()
javax.management.modelmbean.ModelMBeanInfo.getConstructors()
javax.management.openmbean.OpenMBeanInfo.getConstructors()
javax.management.StandardMBean.getConstructors(javax.management.MBeanConstructorInfo:A, java.lang.Object)


Occurences of getContainer

getContainer occurences:
java.awt.event.ContainerEvent.getContainer()
java.beans.beancontext.BeanContextContainerProxy.getContainer()
javax.swing.text.View.getContainer()


Occurences of getContent

getContent occurences:
com.sun.source.doctree.UnknownBlockTagTree.getContent()
com.sun.source.doctree.UnknownInlineTagTree.getContent()
java.net.ContentHandler.getContent(java.net.URLConnection)
java.net.ContentHandler.getContent(java.net.URLConnection, java.lang.Class:A)
java.net.URL.getContent()
java.net.URL.getContent(java.lang.Class:A)
java.net.URLConnection.getContent()
java.net.URLConnection.getContent(java.lang.Class:A)
javax.activation.DataContentHandler.getContent(javax.activation.DataSource)
javax.activation.DataHandler.getContent()
javax.naming.BinaryRefAddr.getContent()
javax.naming.RefAddr.getContent()
javax.naming.StringRefAddr.getContent()
javax.swing.text.AbstractDocument.getContent()
javax.swing.text.html.parser.Element.getContent()
javax.xml.crypto.dsig.keyinfo.KeyInfo.getContent()
javax.xml.crypto.dsig.keyinfo.X509Data.getContent()
javax.xml.crypto.dsig.SignatureProperty.getContent()
javax.xml.crypto.dsig.XMLObject.getContent()
javax.xml.soap.AttachmentPart.getContent()
javax.xml.soap.SOAPPart.getContent()


Occurences of getContentHandler

getContentHandler occurences:
javax.xml.validation.ValidatorHandler.getContentHandler()
org.xml.sax.helpers.ParserAdapter.getContentHandler()
org.xml.sax.helpers.XMLFilterImpl.getContentHandler()
org.xml.sax.XMLReader.getContentHandler()


Occurences of getContentId

getContentId occurences:
javax.xml.soap.AttachmentPart.getContentId()
javax.xml.soap.SOAPPart.getContentId()


Occurences of getContentLocation

getContentLocation occurences:
javax.xml.soap.AttachmentPart.getContentLocation()
javax.xml.soap.SOAPPart.getContentLocation()


Occurences of getContentPane

getContentPane occurences:
javax.swing.JApplet.getContentPane()
javax.swing.JDialog.getContentPane()
javax.swing.JFrame.getContentPane()
javax.swing.JInternalFrame.getContentPane()
javax.swing.JRootPane.getContentPane()
javax.swing.JWindow.getContentPane()
javax.swing.RootPaneContainer.getContentPane()


Occurences of getContents

getContents occurences:
java.awt.datatransfer.Clipboard.getContents(java.lang.Object)
java.util.ListResourceBundle.getContents()
javax.accessibility.AccessibleResourceBundle.getContents()


Occurences of getContentType

getContentType occurences:
java.net.URLConnection.getContentType()
javax.activation.DataHandler.getContentType()
javax.activation.DataSource.getContentType()
javax.activation.FileDataSource.getContentType()
javax.activation.FileTypeMap.getContentType(java.io.File)
javax.activation.FileTypeMap.getContentType(java.lang.String)
javax.activation.MimetypesFileTypeMap.getContentType(java.io.File)
javax.activation.MimetypesFileTypeMap.getContentType(java.lang.String)
javax.activation.URLDataSource.getContentType()
javax.swing.JEditorPane.getContentType()
javax.swing.text.DefaultEditorKit.getContentType()
javax.swing.text.EditorKit.getContentType()
javax.swing.text.html.HTMLEditorKit.getContentType()
javax.swing.text.rtf.RTFEditorKit.getContentType()
javax.xml.soap.AttachmentPart.getContentType()


Occurences of getContext

getContext occurences:
com.sun.tools.jconsole.JConsolePlugin.getContext()
java.security.AccessController.getContext()
javax.script.AbstractScriptEngine.getContext()
javax.script.ScriptEngine.getContext()
javax.swing.plaf.synth.SynthButtonUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthColorChooserUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopIconUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthEditorPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthInternalFrameUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthLabelUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthListUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuBarUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuItemUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthOptionPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPopupMenuUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthProgressBarUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthRootPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollBarUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSpinnerUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSplitPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTabbedPaneUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableHeaderUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextAreaUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextFieldUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolBarUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolTipUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthUI.getContext(javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.getContext(javax.swing.JComponent)
javax.xml.ws.Response.getContext()


Occurences of getContextualShaper

getContextualShaper occurences:
java.awt.font.NumericShaper.getContextualShaper(int)
java.awt.font.NumericShaper.getContextualShaper(int, int)
java.awt.font.NumericShaper.getContextualShaper(java.util.Set)
java.awt.font.NumericShaper.getContextualShaper(java.util.Set, java.awt.font.NumericShaper.Range)


Occurences of getControl

getControl occurences:
java.util.ResourceBundle.Control.getControl(java.util.List)
java.util.spi.ResourceBundleControlProvider.getControl(java.lang.String)
javax.sound.sampled.Line.getControl(javax.sound.sampled.Control.Type)
javax.swing.plaf.metal.MetalLookAndFeel.getControl()
javax.swing.plaf.metal.MetalTheme.getControl()


Occurences of getControlDarkShadow

getControlDarkShadow occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlDarkShadow()
javax.swing.plaf.metal.MetalTheme.getControlDarkShadow()


Occurences of getControlDisabled

getControlDisabled occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlDisabled()
javax.swing.plaf.metal.MetalTheme.getControlDisabled()


Occurences of getControlHighlight

getControlHighlight occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlHighlight()
javax.swing.plaf.metal.MetalTheme.getControlHighlight()


Occurences of getControlInfo

getControlInfo occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo()
javax.swing.plaf.metal.MetalTheme.getControlInfo()


Occurences of getControlInstance

getControlInstance occurences:
javax.naming.ldap.ControlFactory.getControlInstance(javax.naming.ldap.Control)
javax.naming.ldap.ControlFactory.getControlInstance(javax.naming.ldap.Control, javax.naming.Context, java.util.Hashtable)


Occurences of getController

getController occurences:
javax.imageio.IIOParam.getController()
javax.imageio.metadata.IIOMetadata.getController()
javax.sound.midi.MidiChannel.getController(int)


Occurences of getControls

getControls occurences:
javax.naming.ldap.HasControls.getControls()
javax.sound.sampled.Line.getControls()


Occurences of getControlShadow

getControlShadow occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlShadow()
javax.swing.plaf.metal.MetalTheme.getControlShadow()


Occurences of getControlTextColor

getControlTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getControlTextColor()
javax.swing.plaf.metal.MetalTheme.getControlTextColor()
javax.swing.plaf.metal.OceanTheme.getControlTextColor()


Occurences of getControlTextFont

getControlTextFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getControlTextFont()
javax.swing.plaf.metal.MetalLookAndFeel.getControlTextFont()
javax.swing.plaf.metal.MetalTheme.getControlTextFont()


Occurences of getConversion

getConversion occurences:
java.util.FormatFlagsConversionMismatchException.getConversion()
java.util.IllegalFormatConversionException.getConversion()
java.util.UnknownFormatConversionException.getConversion()


Occurences of getCopies

getCopies occurences:
java.awt.JobAttributes.getCopies()
java.awt.print.PrinterJob.getCopies()


Occurences of getCorner

getCorner occurences:
javax.swing.JScrollPane.getCorner(java.lang.String)
javax.swing.ScrollPaneLayout.getCorner(java.lang.String)


Occurences of getCount

getCount occurences:
java.lang.management.BufferPoolMXBean.getCount()
java.lang.management.MemoryNotificationInfo.getCount()
java.util.concurrent.CountDownLatch.getCount()
java.util.DoubleSummaryStatistics.getCount()
java.util.IntSummaryStatistics.getCount()
java.util.LongSummaryStatistics.getCount()


Occurences of getCreationTime

getCreationTime occurences:
java.util.zip.ZipEntry.getCreationTime()
javax.net.ssl.SSLSession.getCreationTime()


Occurences of getCrtCoefficient

getCrtCoefficient occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getCrtCoefficient()
java.security.interfaces.RSAPrivateCrtKey.getCrtCoefficient()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getCrtCoefficient()
java.security.spec.RSAOtherPrimeInfo.getCrtCoefficient()
java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient()


Occurences of getCtrlP1

getCtrlP1 occurences:
java.awt.geom.CubicCurve2D.getCtrlP1()
java.awt.geom.CubicCurve2D.Double.getCtrlP1()
java.awt.geom.CubicCurve2D.Float.getCtrlP1()


Occurences of getCtrlP2

getCtrlP2 occurences:
java.awt.geom.CubicCurve2D.getCtrlP2()
java.awt.geom.CubicCurve2D.Double.getCtrlP2()
java.awt.geom.CubicCurve2D.Float.getCtrlP2()


Occurences of getCtrlPt

getCtrlPt occurences:
java.awt.geom.QuadCurve2D.getCtrlPt()
java.awt.geom.QuadCurve2D.Double.getCtrlPt()
java.awt.geom.QuadCurve2D.Float.getCtrlPt()


Occurences of getCtrlX

getCtrlX occurences:
java.awt.geom.QuadCurve2D.getCtrlX()
java.awt.geom.QuadCurve2D.Double.getCtrlX()
java.awt.geom.QuadCurve2D.Float.getCtrlX()


Occurences of getCtrlX1

getCtrlX1 occurences:
java.awt.geom.CubicCurve2D.getCtrlX1()
java.awt.geom.CubicCurve2D.Double.getCtrlX1()
java.awt.geom.CubicCurve2D.Float.getCtrlX1()


Occurences of getCtrlX2

getCtrlX2 occurences:
java.awt.geom.CubicCurve2D.getCtrlX2()
java.awt.geom.CubicCurve2D.Double.getCtrlX2()
java.awt.geom.CubicCurve2D.Float.getCtrlX2()


Occurences of getCtrlY

getCtrlY occurences:
java.awt.geom.QuadCurve2D.getCtrlY()
java.awt.geom.QuadCurve2D.Double.getCtrlY()
java.awt.geom.QuadCurve2D.Float.getCtrlY()


Occurences of getCtrlY1

getCtrlY1 occurences:
java.awt.geom.CubicCurve2D.getCtrlY1()
java.awt.geom.CubicCurve2D.Double.getCtrlY1()
java.awt.geom.CubicCurve2D.Float.getCtrlY1()


Occurences of getCtrlY2

getCtrlY2 occurences:
java.awt.geom.CubicCurve2D.getCtrlY2()
java.awt.geom.CubicCurve2D.Double.getCtrlY2()
java.awt.geom.CubicCurve2D.Float.getCtrlY2()


Occurences of getCurrency

getCurrency occurences:
java.text.DecimalFormat.getCurrency()
java.text.DecimalFormatSymbols.getCurrency()
java.text.NumberFormat.getCurrency()


Occurences of getCurrencyInstance

getCurrencyInstance occurences:
java.text.NumberFormat.getCurrencyInstance()
java.text.NumberFormat.getCurrencyInstance(java.util.Locale)
java.text.spi.NumberFormatProvider.getCurrencyInstance(java.util.Locale)


Occurences of getCurrentAccessibleValue

getCurrentAccessibleValue occurences:
java.awt.Button.AccessibleAWTButton.getCurrentAccessibleValue()
java.awt.Checkbox.AccessibleAWTCheckbox.getCurrentAccessibleValue()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getCurrentAccessibleValue()
java.awt.MenuItem.AccessibleAWTMenuItem.getCurrentAccessibleValue()
java.awt.Scrollbar.AccessibleAWTScrollBar.getCurrentAccessibleValue()
javax.accessibility.AccessibleValue.getCurrentAccessibleValue()
javax.swing.AbstractButton.AccessibleAbstractButton.getCurrentAccessibleValue()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getCurrentAccessibleValue()
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getCurrentAccessibleValue()
javax.swing.JProgressBar.AccessibleJProgressBar.getCurrentAccessibleValue()
javax.swing.JScrollBar.AccessibleJScrollBar.getCurrentAccessibleValue()
javax.swing.JSlider.AccessibleJSlider.getCurrentAccessibleValue()
javax.swing.JSpinner.AccessibleJSpinner.getCurrentAccessibleValue()
javax.swing.JSplitPane.AccessibleJSplitPane.getCurrentAccessibleValue()


Occurences of getCurrentDataFlavors

getCurrentDataFlavors occurences:
java.awt.dnd.DropTargetContext.getCurrentDataFlavors()
java.awt.dnd.DropTargetDragEvent.getCurrentDataFlavors()
java.awt.dnd.DropTargetDropEvent.getCurrentDataFlavors()


Occurences of getCurrentDataFlavorsAsList

getCurrentDataFlavorsAsList occurences:
java.awt.dnd.DropTargetContext.getCurrentDataFlavorsAsList()
java.awt.dnd.DropTargetDragEvent.getCurrentDataFlavorsAsList()
java.awt.dnd.DropTargetDropEvent.getCurrentDataFlavorsAsList()


Occurences of getCurrentPath

getCurrentPath occurences:
com.sun.source.util.DocTreePathScanner.getCurrentPath()
com.sun.source.util.TreePathScanner.getCurrentPath()


Occurences of getCurrentServiceClasses

getCurrentServiceClasses occurences:
java.beans.beancontext.BeanContextServices.getCurrentServiceClasses()
java.beans.beancontext.BeanContextServicesSupport.getCurrentServiceClasses()


Occurences of getCurrentServiceSelectors

getCurrentServiceSelectors occurences:
java.beans.beancontext.BeanContextServiceAvailableEvent.getCurrentServiceSelectors()
java.beans.beancontext.BeanContextServiceProvider.getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices, java.lang.Class)
java.beans.beancontext.BeanContextServices.getCurrentServiceSelectors(java.lang.Class)
java.beans.beancontext.BeanContextServicesSupport.getCurrentServiceSelectors(java.lang.Class)
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider.getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices, java.lang.Class)


Occurences of getCursor

getCursor occurences:
java.awt.Component.getCursor()
java.awt.Component.AccessibleAWTComponent.getCursor()
java.awt.dnd.DragSourceContext.getCursor()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getCursor()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getCursor()
javax.accessibility.AccessibleComponent.getCursor()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getCursor()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getCursor()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getCursor()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getCursor()


Occurences of getCustomEditor

getCustomEditor occurences:
java.beans.PropertyEditor.getCustomEditor()
java.beans.PropertyEditorSupport.getCustomEditor()


Occurences of getData

getData occurences:
java.awt.color.ICC_Profile.getData()
java.awt.color.ICC_Profile.getData(int)
java.awt.datatransfer.Clipboard.getData(java.awt.datatransfer.DataFlavor)
java.awt.image.BufferedImage.getData()
java.awt.image.BufferedImage.getData(java.awt.Rectangle)
java.awt.image.DataBufferByte.getData()
java.awt.image.DataBufferByte.getData(int)
java.awt.image.DataBufferDouble.getData()
java.awt.image.DataBufferDouble.getData(int)
java.awt.image.DataBufferFloat.getData()
java.awt.image.DataBufferFloat.getData(int)
java.awt.image.DataBufferInt.getData()
java.awt.image.DataBufferInt.getData(int)
java.awt.image.DataBufferShort.getData()
java.awt.image.DataBufferShort.getData(int)
java.awt.image.DataBufferUShort.getData()
java.awt.image.DataBufferUShort.getData(int)
java.awt.image.RenderedImage.getData()
java.awt.image.RenderedImage.getData(java.awt.Rectangle)
java.net.DatagramPacket.getData()
java.rmi.activation.ActivationDesc.getData()
java.rmi.activation.ActivationGroupDesc.getData()
javax.imageio.stream.IIOByteBuffer.getData()
javax.sound.midi.MetaMessage.getData()
javax.sound.midi.SoundbankResource.getData()
javax.sound.midi.SysexMessage.getData()
javax.swing.text.html.FormSubmitEvent.getData()
javax.swing.text.html.parser.Entity.getData()
javax.xml.stream.events.Characters.getData()
javax.xml.stream.events.ProcessingInstruction.getData()
org.w3c.dom.CharacterData.getData()
org.w3c.dom.ProcessingInstruction.getData()


Occurences of getDataElement

getDataElement occurences:
java.awt.image.ColorModel.getDataElement(float:A, int)
java.awt.image.ColorModel.getDataElement(int:A, int)
java.awt.image.ComponentColorModel.getDataElement(float:A, int)
java.awt.image.ComponentColorModel.getDataElement(int:A, int)
java.awt.image.DirectColorModel.getDataElement(int:A, int)
java.awt.image.IndexColorModel.getDataElement(int:A, int)


Occurences of getDataElements

getDataElements occurences:
java.awt.image.BandedSampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.ColorModel.getDataElements(float:A, int, java.lang.Object)
java.awt.image.ColorModel.getDataElements(int, java.lang.Object)
java.awt.image.ColorModel.getDataElements(int:A, int, java.lang.Object)
java.awt.image.ComponentColorModel.getDataElements(float:A, int, java.lang.Object)
java.awt.image.ComponentColorModel.getDataElements(int, java.lang.Object)
java.awt.image.ComponentColorModel.getDataElements(int:A, int, java.lang.Object)
java.awt.image.ComponentSampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.DirectColorModel.getDataElements(int, java.lang.Object)
java.awt.image.DirectColorModel.getDataElements(int:A, int, java.lang.Object)
java.awt.image.IndexColorModel.getDataElements(int, java.lang.Object)
java.awt.image.IndexColorModel.getDataElements(int:A, int, java.lang.Object)
java.awt.image.MultiPixelPackedSampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.Raster.getDataElements(int, int, int, int, java.lang.Object)
java.awt.image.Raster.getDataElements(int, int, java.lang.Object)
java.awt.image.SampleModel.getDataElements(int, int, int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)


Occurences of getDataSourceName

getDataSourceName occurences:
javax.sql.RowSet.getDataSourceName()
javax.sql.rowset.BaseRowSet.getDataSourceName()


Occurences of getDataType

getDataType occurences:
java.awt.image.DataBuffer.getDataType()
java.awt.image.SampleModel.getDataType()


Occurences of getDate

getDate occurences:
java.net.URLConnection.getDate()
java.security.cert.PKIXParameters.getDate()
java.sql.CallableStatement.getDate(int)
java.sql.CallableStatement.getDate(int, java.util.Calendar)
java.sql.CallableStatement.getDate(java.lang.String)
java.sql.CallableStatement.getDate(java.lang.String, java.util.Calendar)
java.sql.ResultSet.getDate(int)
java.sql.ResultSet.getDate(int, java.util.Calendar)
java.sql.ResultSet.getDate(java.lang.String)
java.sql.ResultSet.getDate(java.lang.String, java.util.Calendar)
java.sql.Time.getDate()
java.util.Date.getDate()
javax.management.timer.Timer.getDate(java.lang.Integer)
javax.management.timer.TimerMBean.getDate(java.lang.Integer)
javax.swing.SpinnerDateModel.getDate()


Occurences of getDateInstance

getDateInstance occurences:
java.text.DateFormat.getDateInstance()
java.text.DateFormat.getDateInstance(int)
java.text.DateFormat.getDateInstance(int, java.util.Locale)
java.text.spi.DateFormatProvider.getDateInstance(int, java.util.Locale)


Occurences of getDateTimeInstance

getDateTimeInstance occurences:
java.text.DateFormat.getDateTimeInstance()
java.text.DateFormat.getDateTimeInstance(int, int)
java.text.DateFormat.getDateTimeInstance(int, int, java.util.Locale)
java.text.spi.DateFormatProvider.getDateTimeInstance(int, int, java.util.Locale)


Occurences of getDay

getDay occurences:
java.sql.Time.getDay()
java.util.Date.getDay()
javax.xml.datatype.XMLGregorianCalendar.getDay()


Occurences of getDayOfMonth

getDayOfMonth occurences:
java.time.LocalDate.getDayOfMonth()
java.time.LocalDateTime.getDayOfMonth()
java.time.MonthDay.getDayOfMonth()
java.time.OffsetDateTime.getDayOfMonth()
java.time.ZonedDateTime.getDayOfMonth()


Occurences of getDayOfWeek

getDayOfWeek occurences:
java.time.LocalDate.getDayOfWeek()
java.time.LocalDateTime.getDayOfWeek()
java.time.OffsetDateTime.getDayOfWeek()
java.time.zone.ZoneOffsetTransitionRule.getDayOfWeek()
java.time.ZonedDateTime.getDayOfWeek()


Occurences of getDayOfYear

getDayOfYear occurences:
java.time.LocalDate.getDayOfYear()
java.time.LocalDateTime.getDayOfYear()
java.time.OffsetDateTime.getDayOfYear()
java.time.ZonedDateTime.getDayOfYear()


Occurences of getDays

getDays occurences:
java.time.Period.getDays()
javax.xml.datatype.Duration.getDays()


Occurences of getDCHuffmanTables

getDCHuffmanTables occurences:
javax.imageio.plugins.jpeg.JPEGImageReadParam.getDCHuffmanTables()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.getDCHuffmanTables()


Occurences of getDecimalSeparator

getDecimalSeparator occurences:
java.text.DecimalFormatSymbols.getDecimalSeparator()
java.time.format.DecimalStyle.getDecimalSeparator()


Occurences of getDeclaration

getDeclaration occurences:
javax.swing.text.html.StyleSheet.getDeclaration(java.lang.String)
javax.xml.stream.events.EntityReference.getDeclaration()


Occurences of getDeclaredAnnotation

getDeclaredAnnotation occurences:
java.lang.Class.getDeclaredAnnotation(java.lang.Class)
java.lang.Package.getDeclaredAnnotation(java.lang.Class)
java.lang.reflect.AccessibleObject.getDeclaredAnnotation(java.lang.Class)
java.lang.reflect.AnnotatedElement.getDeclaredAnnotation(java.lang.Class)
java.lang.reflect.Parameter.getDeclaredAnnotation(java.lang.Class)


Occurences of getDeclaredAnnotations

getDeclaredAnnotations occurences:
java.lang.Class.getDeclaredAnnotations()
java.lang.Package.getDeclaredAnnotations()
java.lang.reflect.AccessibleObject.getDeclaredAnnotations()
java.lang.reflect.AnnotatedElement.getDeclaredAnnotations()
java.lang.reflect.Constructor.getDeclaredAnnotations()
java.lang.reflect.Executable.getDeclaredAnnotations()
java.lang.reflect.Field.getDeclaredAnnotations()
java.lang.reflect.Method.getDeclaredAnnotations()
java.lang.reflect.Parameter.getDeclaredAnnotations()


Occurences of getDeclaredAnnotationsByType

getDeclaredAnnotationsByType occurences:
java.lang.Class.getDeclaredAnnotationsByType(java.lang.Class)
java.lang.Package.getDeclaredAnnotationsByType(java.lang.Class)
java.lang.reflect.AccessibleObject.getDeclaredAnnotationsByType(java.lang.Class)
java.lang.reflect.AnnotatedElement.getDeclaredAnnotationsByType(java.lang.Class)
java.lang.reflect.Parameter.getDeclaredAnnotationsByType(java.lang.Class)


Occurences of getDeclaredType

getDeclaredType occurences:
javax.lang.model.util.Types.getDeclaredType(javax.lang.model.element.TypeElement, javax.lang.model.type.TypeMirror...)
javax.lang.model.util.Types.getDeclaredType(javax.lang.model.type.DeclaredType, javax.lang.model.element.TypeElement, javax.lang.model.type.TypeMirror...)
javax.xml.bind.JAXBElement.getDeclaredType()


Occurences of getDeclaringClass

getDeclaringClass occurences:
java.lang.Class.getDeclaringClass()
java.lang.Enum.getDeclaringClass()
java.lang.invoke.MethodHandleInfo.getDeclaringClass()
java.lang.reflect.Constructor.getDeclaringClass()
java.lang.reflect.Executable.getDeclaringClass()
java.lang.reflect.Field.getDeclaringClass()
java.lang.reflect.Member.getDeclaringClass()
java.lang.reflect.Method.getDeclaringClass()


Occurences of getDefault

getDefault occurences:
java.net.CookieHandler.getDefault()
java.net.ProxySelector.getDefault()
java.net.ResponseCache.getDefault()
java.nio.file.FileSystems.getDefault()
java.util.Locale.getDefault()
java.util.Locale.getDefault(java.util.Locale.Category)
java.util.TimeZone.getDefault()
javax.net.ServerSocketFactory.getDefault()
javax.net.SocketFactory.getDefault()
javax.net.ssl.SSLContext.getDefault()
javax.net.ssl.SSLServerSocketFactory.getDefault()
javax.net.ssl.SSLSocketFactory.getDefault()


Occurences of getDefaultAlgorithm

getDefaultAlgorithm occurences:
javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm()
javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()


Occurences of getDefaultButton

getDefaultButton occurences:
javax.swing.JRootPane.getDefaultButton()
javax.swing.plaf.basic.BasicFileChooserUI.getDefaultButton(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.getDefaultButton(javax.swing.JFileChooser)


Occurences of getDefaultCipherSuites

getDefaultCipherSuites occurences:
javax.net.ssl.SSLServerSocketFactory.getDefaultCipherSuites()
javax.net.ssl.SSLSocketFactory.getDefaultCipherSuites()


Occurences of getDefaultCloseOperation

getDefaultCloseOperation occurences:
javax.swing.JDialog.getDefaultCloseOperation()
javax.swing.JFrame.getDefaultCloseOperation()
javax.swing.JInternalFrame.getDefaultCloseOperation()


Occurences of getDefaultComponent

getDefaultComponent occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getDefaultComponent(java.awt.Container)
java.awt.FocusTraversalPolicy.getDefaultComponent(java.awt.Container)
javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(java.awt.Container)


Occurences of getDefaultController

getDefaultController occurences:
javax.imageio.IIOParam.getDefaultController()
javax.imageio.metadata.IIOMetadata.getDefaultController()


Occurences of getDefaultCursor

getDefaultCursor occurences:
java.awt.Cursor.getDefaultCursor()
javax.swing.text.html.HTMLEditorKit.getDefaultCursor()


Occurences of getDefaultDomain

getDefaultDomain occurences:
javax.management.MBeanServer.getDefaultDomain()
javax.management.MBeanServerConnection.getDefaultDomain()
javax.management.remote.rmi.RMIConnection.getDefaultDomain(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getDefaultDomain(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getDefaultDomain(javax.security.auth.Subject)


Occurences of getDefaultEventIndex

getDefaultEventIndex occurences:
java.beans.BeanInfo.getDefaultEventIndex()
java.beans.SimpleBeanInfo.getDefaultEventIndex()


Occurences of getDefaultIcon

getDefaultIcon occurences:
javax.swing.plaf.basic.BasicRadioButtonUI.getDefaultIcon()
javax.swing.plaf.synth.SynthButtonUI.getDefaultIcon(javax.swing.AbstractButton)


Occurences of getDefaultLocale

getDefaultLocale occurences:
javax.swing.JComponent.getDefaultLocale()
javax.swing.UIDefaults.getDefaultLocale()


Occurences of getDefaultNamespacePrefix

getDefaultNamespacePrefix occurences:
javax.xml.crypto.dom.DOMCryptoContext.getDefaultNamespacePrefix()
javax.xml.crypto.XMLCryptoContext.getDefaultNamespacePrefix()


Occurences of getDefaultPort

getDefaultPort occurences:
java.net.URL.getDefaultPort()
java.net.URLStreamHandler.getDefaultPort()


Occurences of getDefaultPropertyIndex

getDefaultPropertyIndex occurences:
java.beans.BeanInfo.getDefaultPropertyIndex()
java.beans.SimpleBeanInfo.getDefaultPropertyIndex()


Occurences of getDefaultRenderer

getDefaultRenderer occurences:
javax.swing.JTable.getDefaultRenderer(java.lang.Class)
javax.swing.table.JTableHeader.getDefaultRenderer()


Occurences of getDefaultRootElement

getDefaultRootElement occurences:
javax.swing.text.AbstractDocument.getDefaultRootElement()
javax.swing.text.DefaultStyledDocument.getDefaultRootElement()
javax.swing.text.Document.getDefaultRootElement()
javax.swing.text.PlainDocument.getDefaultRootElement()


Occurences of getDefaults

getDefaults occurences:
javax.swing.LookAndFeel.getDefaults()
javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()
javax.swing.plaf.metal.MetalLookAndFeel.getDefaults()
javax.swing.plaf.multi.MultiLookAndFeel.getDefaults()
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDefaults()
javax.swing.plaf.synth.SynthLookAndFeel.getDefaults()
javax.swing.UIManager.getDefaults()


Occurences of getDefaultSize

getDefaultSize occurences:
javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize()
javax.swing.plaf.synth.SynthComboBoxUI.getDefaultSize()


Occurences of getDefaultType

getDefaultType occurences:
java.security.cert.CertPathBuilder.getDefaultType()
java.security.cert.CertPathValidator.getDefaultType()
java.security.cert.CertStore.getDefaultType()
java.security.KeyStore.getDefaultType()


Occurences of getDefaultValue

getDefaultValue occurences:
com.sun.source.tree.MethodTree.getDefaultValue()
java.lang.reflect.Method.getDefaultValue()
javax.lang.model.element.ExecutableElement.getDefaultValue()
javax.management.openmbean.OpenMBeanAttributeInfoSupport.getDefaultValue()
javax.management.openmbean.OpenMBeanParameterInfo.getDefaultValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.getDefaultValue()
javax.swing.text.html.CSS.Attribute.getDefaultValue()


Occurences of getDelay

getDelay occurences:
java.util.concurrent.Delayed.getDelay(java.util.concurrent.TimeUnit)
javax.swing.JMenu.getDelay()
javax.swing.Timer.getDelay()


Occurences of getDepth

getDepth occurences:
java.security.cert.PolicyNode.getDepth()
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.getDepth(int)
javax.swing.tree.DefaultMutableTreeNode.getDepth()


Occurences of getDerivedColor

getDerivedColor occurences:
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDerivedColor(java.awt.Color, java.awt.Color, float)
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDerivedColor(java.awt.Color, java.awt.Color, float, boolean)
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDerivedColor(java.lang.String, float, float, float, int, boolean)


Occurences of getDerivedGauge

getDerivedGauge occurences:
javax.management.monitor.CounterMonitor.getDerivedGauge()
javax.management.monitor.CounterMonitor.getDerivedGauge(javax.management.ObjectName)
javax.management.monitor.CounterMonitorMBean.getDerivedGauge()
javax.management.monitor.CounterMonitorMBean.getDerivedGauge(javax.management.ObjectName)
javax.management.monitor.GaugeMonitor.getDerivedGauge()
javax.management.monitor.GaugeMonitor.getDerivedGauge(javax.management.ObjectName)
javax.management.monitor.GaugeMonitorMBean.getDerivedGauge()
javax.management.monitor.GaugeMonitorMBean.getDerivedGauge(javax.management.ObjectName)
javax.management.monitor.MonitorNotification.getDerivedGauge()
javax.management.monitor.StringMonitor.getDerivedGauge()
javax.management.monitor.StringMonitor.getDerivedGauge(javax.management.ObjectName)
javax.management.monitor.StringMonitorMBean.getDerivedGauge()
javax.management.monitor.StringMonitorMBean.getDerivedGauge(javax.management.ObjectName)


Occurences of getDerivedGaugeTimeStamp

getDerivedGaugeTimeStamp occurences:
javax.management.monitor.CounterMonitor.getDerivedGaugeTimeStamp()
javax.management.monitor.CounterMonitor.getDerivedGaugeTimeStamp(javax.management.ObjectName)
javax.management.monitor.CounterMonitorMBean.getDerivedGaugeTimeStamp()
javax.management.monitor.CounterMonitorMBean.getDerivedGaugeTimeStamp(javax.management.ObjectName)
javax.management.monitor.GaugeMonitor.getDerivedGaugeTimeStamp()
javax.management.monitor.GaugeMonitor.getDerivedGaugeTimeStamp(javax.management.ObjectName)
javax.management.monitor.GaugeMonitorMBean.getDerivedGaugeTimeStamp()
javax.management.monitor.GaugeMonitorMBean.getDerivedGaugeTimeStamp(javax.management.ObjectName)
javax.management.monitor.StringMonitor.getDerivedGaugeTimeStamp()
javax.management.monitor.StringMonitor.getDerivedGaugeTimeStamp(javax.management.ObjectName)
javax.management.monitor.StringMonitorMBean.getDerivedGaugeTimeStamp()
javax.management.monitor.StringMonitorMBean.getDerivedGaugeTimeStamp(javax.management.ObjectName)


Occurences of getDescent

getDescent occurences:
java.awt.font.GraphicAttribute.getDescent()
java.awt.font.ImageGraphicAttribute.getDescent()
java.awt.font.LineMetrics.getDescent()
java.awt.font.ShapeGraphicAttribute.getDescent()
java.awt.font.TextLayout.getDescent()
java.awt.FontMetrics.getDescent()
javax.swing.text.GlyphView.GlyphPainter.getDescent(javax.swing.text.GlyphView)


Occurences of getDescription

getDescription occurences:
com.sun.source.doctree.ParamTree.getDescription()
com.sun.source.doctree.ReturnTree.getDescription()
com.sun.source.doctree.SerialDataTree.getDescription()
com.sun.source.doctree.SerialFieldTree.getDescription()
com.sun.source.doctree.SerialTree.getDescription()
com.sun.source.doctree.ThrowsTree.getDescription()
java.util.regex.PatternSyntaxException.getDescription()
javax.imageio.spi.IIOServiceProvider.getDescription(java.util.Locale)
javax.management.MBeanFeatureInfo.getDescription()
javax.management.MBeanInfo.getDescription()
javax.management.modelmbean.ModelMBeanInfo.getDescription()
javax.management.openmbean.CompositeType.getDescription(java.lang.String)
javax.management.openmbean.OpenMBeanConstructorInfo.getDescription()
javax.management.openmbean.OpenMBeanInfo.getDescription()
javax.management.openmbean.OpenMBeanOperationInfo.getDescription()
javax.management.openmbean.OpenMBeanParameterInfo.getDescription()
javax.management.openmbean.OpenType.getDescription()
javax.management.relation.RoleInfo.getDescription()
javax.management.StandardMBean.getDescription(javax.management.MBeanAttributeInfo)
javax.management.StandardMBean.getDescription(javax.management.MBeanConstructorInfo)
javax.management.StandardMBean.getDescription(javax.management.MBeanConstructorInfo, javax.management.MBeanParameterInfo, int)
javax.management.StandardMBean.getDescription(javax.management.MBeanFeatureInfo)
javax.management.StandardMBean.getDescription(javax.management.MBeanInfo)
javax.management.StandardMBean.getDescription(javax.management.MBeanOperationInfo)
javax.management.StandardMBean.getDescription(javax.management.MBeanOperationInfo, javax.management.MBeanParameterInfo, int)
javax.sound.midi.MidiDevice.Info.getDescription()
javax.sound.midi.Soundbank.getDescription()
javax.sound.sampled.Mixer.Info.getDescription()
javax.swing.event.HyperlinkEvent.getDescription()
javax.swing.filechooser.FileFilter.getDescription()
javax.swing.filechooser.FileNameExtensionFilter.getDescription()
javax.swing.filechooser.FileView.getDescription(java.io.File)
javax.swing.ImageIcon.getDescription()
javax.swing.JFileChooser.getDescription(java.io.File)
javax.swing.LookAndFeel.getDescription()
javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter.getDescription()
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.getDescription(java.io.File)
javax.swing.plaf.metal.MetalLookAndFeel.getDescription()
javax.swing.plaf.multi.MultiLookAndFeel.getDescription()
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDescription()
javax.swing.plaf.synth.SynthLookAndFeel.getDescription()


Occurences of getDescriptor

getDescriptor occurences:
javax.management.DescriptorRead.getDescriptor()
javax.management.MBeanFeatureInfo.getDescriptor()
javax.management.MBeanInfo.getDescriptor()
javax.management.modelmbean.ModelMBeanAttributeInfo.getDescriptor()
javax.management.modelmbean.ModelMBeanConstructorInfo.getDescriptor()
javax.management.modelmbean.ModelMBeanInfo.getDescriptor(java.lang.String, java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor()
javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor(java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor(java.lang.String, java.lang.String)
javax.management.modelmbean.ModelMBeanNotificationInfo.getDescriptor()
javax.management.modelmbean.ModelMBeanOperationInfo.getDescriptor()


Occurences of getDescriptors

getDescriptors occurences:
javax.management.modelmbean.ModelMBeanInfo.getDescriptors(java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptors(java.lang.String)


Occurences of getDesktopColor

getDesktopColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getDesktopColor()
javax.swing.plaf.metal.MetalTheme.getDesktopColor()
javax.swing.plaf.metal.OceanTheme.getDesktopColor()


Occurences of getDesktopManager

getDesktopManager occurences:
javax.swing.JDesktopPane.getDesktopManager()
javax.swing.plaf.basic.BasicInternalFrameUI.getDesktopManager()


Occurences of getDesktopPane

getDesktopPane occurences:
javax.swing.JInternalFrame.getDesktopPane()
javax.swing.JInternalFrame.JDesktopIcon.getDesktopPane()


Occurences of getDestination

getDestination occurences:
java.awt.JobAttributes.getDestination()
javax.imageio.ImageReader.getDestination(javax.imageio.ImageReadParam, java.util.Iterator, int, int)
javax.imageio.ImageReadParam.getDestination()


Occurences of getDetail

getDetail occurences:
com.sun.source.tree.AssertTree.getDetail()
javax.xml.soap.SOAPFault.getDetail()
org.w3c.dom.events.UIEvent.getDetail()


Occurences of getDevice

getDevice occurences:
java.awt.GraphicsConfiguration.getDevice()
java.awt.PointerInfo.getDevice()
javax.sound.midi.spi.MidiDeviceProvider.getDevice(javax.sound.midi.MidiDevice.Info)


Occurences of getDeviceInfo

getDeviceInfo occurences:
javax.sound.midi.MidiDevice.getDeviceInfo()
javax.sound.midi.spi.MidiDeviceProvider.getDeviceInfo()


Occurences of getDialogTitle

getDialogTitle occurences:
javax.swing.JFileChooser.getDialogTitle()
javax.swing.plaf.basic.BasicFileChooserUI.getDialogTitle(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.getDialogTitle(javax.swing.JFileChooser)
javax.swing.plaf.multi.MultiFileChooserUI.getDialogTitle(javax.swing.JFileChooser)


Occurences of getDifferenceMode

getDifferenceMode occurences:
javax.management.monitor.CounterMonitor.getDifferenceMode()
javax.management.monitor.CounterMonitorMBean.getDifferenceMode()
javax.management.monitor.GaugeMonitor.getDifferenceMode()
javax.management.monitor.GaugeMonitorMBean.getDifferenceMode()


Occurences of getDigestAlgorithm

getDigestAlgorithm occurences:
java.security.spec.MGF1ParameterSpec.getDigestAlgorithm()
java.security.spec.PSSParameterSpec.getDigestAlgorithm()
javax.crypto.spec.OAEPParameterSpec.getDigestAlgorithm()


Occurences of getDimension

getDimension occurences:
javax.management.openmbean.ArrayType.getDimension()
javax.swing.UIDefaults.getDimension(java.lang.Object)
javax.swing.UIDefaults.getDimension(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getDimension(java.lang.Object)
javax.swing.UIManager.getDimension(java.lang.Object, java.util.Locale)


Occurences of getDirection

getDirection occurences:
javax.swing.plaf.basic.BasicArrowButton.getDirection()
javax.swing.text.DefaultStyledDocument.ElementSpec.getDirection()


Occurences of getDirectionality

getDirectionality occurences:
java.lang.Character.getDirectionality(char)
java.lang.Character.getDirectionality(int)


Occurences of getDirectory

getDirectory occurences:
java.awt.FileDialog.getDirectory()
javax.swing.plaf.basic.BasicFileChooserUI.getDirectory()


Occurences of getDirectoryName

getDirectoryName occurences:
javax.swing.plaf.basic.BasicFileChooserUI.getDirectoryName()
javax.swing.plaf.metal.MetalFileChooserUI.getDirectoryName()


Occurences of getDisabledIcon

getDisabledIcon occurences:
javax.swing.AbstractButton.getDisabledIcon()
javax.swing.JLabel.getDisabledIcon()
javax.swing.LookAndFeel.getDisabledIcon(javax.swing.JComponent, javax.swing.Icon)
javax.swing.plaf.metal.MetalLookAndFeel.getDisabledIcon(javax.swing.JComponent, javax.swing.Icon)
javax.swing.plaf.nimbus.NimbusLookAndFeel.getDisabledIcon(javax.swing.JComponent, javax.swing.Icon)


Occurences of getDisabledSelectedIcon

getDisabledSelectedIcon occurences:
javax.swing.AbstractButton.getDisabledSelectedIcon()
javax.swing.LookAndFeel.getDisabledSelectedIcon(javax.swing.JComponent, javax.swing.Icon)
javax.swing.plaf.metal.MetalLookAndFeel.getDisabledSelectedIcon(javax.swing.JComponent, javax.swing.Icon)


Occurences of getDisabledTextColor

getDisabledTextColor occurences:
javax.swing.plaf.metal.MetalButtonUI.getDisabledTextColor()
javax.swing.plaf.metal.MetalRadioButtonUI.getDisabledTextColor()
javax.swing.plaf.metal.MetalToggleButtonUI.getDisabledTextColor()
javax.swing.text.JTextComponent.getDisabledTextColor()


Occurences of getDisplayCountry

getDisplayCountry occurences:
java.util.Locale.getDisplayCountry()
java.util.Locale.getDisplayCountry(java.util.Locale)
java.util.spi.LocaleNameProvider.getDisplayCountry(java.lang.String, java.util.Locale)


Occurences of getDisplayedMnemonicIndex

getDisplayedMnemonicIndex occurences:
javax.swing.AbstractButton.getDisplayedMnemonicIndex()
javax.swing.colorchooser.AbstractColorChooserPanel.getDisplayedMnemonicIndex()
javax.swing.JLabel.getDisplayedMnemonicIndex()


Occurences of getDisplayLanguage

getDisplayLanguage occurences:
java.util.Locale.getDisplayLanguage()
java.util.Locale.getDisplayLanguage(java.util.Locale)
java.util.spi.LocaleNameProvider.getDisplayLanguage(java.lang.String, java.util.Locale)


Occurences of getDisplayName

getDisplayName occurences:
java.beans.FeatureDescriptor.getDisplayName()
java.net.NetworkInterface.getDisplayName()
java.time.chrono.Chronology.getDisplayName(java.time.format.TextStyle, java.util.Locale)
java.time.chrono.Era.getDisplayName(java.time.format.TextStyle, java.util.Locale)
java.time.DayOfWeek.getDisplayName(java.time.format.TextStyle, java.util.Locale)
java.time.Month.getDisplayName(java.time.format.TextStyle, java.util.Locale)
java.time.temporal.ChronoField.getDisplayName(java.util.Locale)
java.time.temporal.TemporalField.getDisplayName(java.util.Locale)
java.time.ZoneId.getDisplayName(java.time.format.TextStyle, java.util.Locale)
java.util.Calendar.getDisplayName(int, int, java.util.Locale)
java.util.Currency.getDisplayName()
java.util.Currency.getDisplayName(java.util.Locale)
java.util.Locale.getDisplayName()
java.util.Locale.getDisplayName(java.util.Locale)
java.util.spi.CalendarNameProvider.getDisplayName(java.lang.String, int, int, int, java.util.Locale)
java.util.spi.CurrencyNameProvider.getDisplayName(java.lang.String, java.util.Locale)
java.util.spi.TimeZoneNameProvider.getDisplayName(java.lang.String, boolean, int, java.util.Locale)
java.util.TimeZone.getDisplayName()
java.util.TimeZone.getDisplayName(boolean, int)
java.util.TimeZone.getDisplayName(boolean, int, java.util.Locale)
java.util.TimeZone.getDisplayName(java.util.Locale)
javax.swing.colorchooser.AbstractColorChooserPanel.getDisplayName()


Occurences of getDisplayNames

getDisplayNames occurences:
java.util.Calendar.getDisplayNames(int, int, java.util.Locale)
java.util.spi.CalendarNameProvider.getDisplayNames(java.lang.String, int, int, java.util.Locale)


Occurences of getDisplayScript

getDisplayScript occurences:
java.util.Locale.getDisplayScript()
java.util.Locale.getDisplayScript(java.util.Locale)
java.util.spi.LocaleNameProvider.getDisplayScript(java.lang.String, java.util.Locale)


Occurences of getDisplayVariant

getDisplayVariant occurences:
java.util.Locale.getDisplayVariant()
java.util.Locale.getDisplayVariant(java.util.Locale)
java.util.spi.LocaleNameProvider.getDisplayVariant(java.lang.String, java.util.Locale)


Occurences of getDividerLocation

getDividerLocation occurences:
javax.swing.JSplitPane.getDividerLocation()
javax.swing.plaf.basic.BasicSplitPaneUI.getDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.multi.MultiSplitPaneUI.getDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.SplitPaneUI.getDividerLocation(javax.swing.JSplitPane)


Occurences of getDividerSize

getDividerSize occurences:
javax.swing.JSplitPane.getDividerSize()
javax.swing.plaf.basic.BasicSplitPaneDivider.getDividerSize()


Occurences of getDivisionType

getDivisionType occurences:
javax.sound.midi.MidiFileFormat.getDivisionType()
javax.sound.midi.Sequence.getDivisionType()


Occurences of getDocComment

getDocComment occurences:
com.sun.source.util.DocTreePath.getDocComment()
com.sun.source.util.Trees.getDocComment(com.sun.source.util.TreePath)
javax.lang.model.util.Elements.getDocComment(javax.lang.model.element.Element)


Occurences of getDocFlavor

getDocFlavor occurences:
javax.print.Doc.getDocFlavor()
javax.print.SimpleDoc.getDocFlavor()


Occurences of getDocument

getDocument occurences:
javax.swing.event.DocumentEvent.getDocument()
javax.swing.text.AbstractDocument.AbstractElement.getDocument()
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getDocument()
javax.swing.text.AbstractWriter.getDocument()
javax.swing.text.DocumentFilter.FilterBypass.getDocument()
javax.swing.text.Element.getDocument()
javax.swing.text.JTextComponent.getDocument()
javax.swing.text.View.getDocument()
org.w3c.dom.views.AbstractView.getDocument()


Occurences of getDocumentBase

getDocumentBase occurences:
java.applet.Applet.getDocumentBase()
java.applet.AppletStub.getDocumentBase()
javax.management.loading.MLetContent.getDocumentBase()


Occurences of getDocumentFilter

getDocumentFilter occurences:
javax.swing.JFormattedTextField.AbstractFormatter.getDocumentFilter()
javax.swing.text.AbstractDocument.getDocumentFilter()
javax.swing.text.DefaultFormatter.getDocumentFilter()


Occurences of getDomain

getDomain occurences:
java.net.HttpCookie.getDomain()
javax.management.ObjectName.getDomain()


Occurences of getDomains

getDomains occurences:
javax.management.MBeanServer.getDomains()
javax.management.MBeanServerConnection.getDomains()
javax.management.remote.rmi.RMIConnection.getDomains(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getDomains(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getDomains(javax.security.auth.Subject)


Occurences of getDomConfig

getDomConfig occurences:
org.w3c.dom.Document.getDomConfig()
org.w3c.dom.ls.LSParser.getDomConfig()
org.w3c.dom.ls.LSSerializer.getDomConfig()


Occurences of getDOMImplementation

getDOMImplementation occurences:
javax.xml.parsers.DocumentBuilder.getDOMImplementation()
org.w3c.dom.bootstrap.DOMImplementationRegistry.getDOMImplementation(java.lang.String)
org.w3c.dom.DOMImplementationSource.getDOMImplementation(java.lang.String)


Occurences of getDOMImplementationList

getDOMImplementationList occurences:
org.w3c.dom.bootstrap.DOMImplementationRegistry.getDOMImplementationList(java.lang.String)
org.w3c.dom.DOMImplementationSource.getDOMImplementationList(java.lang.String)


Occurences of getDot

getDot occurences:
javax.swing.event.CaretEvent.getDot()
javax.swing.text.Caret.getDot()
javax.swing.text.DefaultCaret.getDot()


Occurences of getDouble

getDouble occurences:
java.lang.reflect.Array.getDouble(java.lang.Object, int)
java.lang.reflect.Field.getDouble(java.lang.Object)
java.nio.ByteBuffer.getDouble()
java.nio.ByteBuffer.getDouble(int)
java.sql.CallableStatement.getDouble(int)
java.sql.CallableStatement.getDouble(java.lang.String)
java.sql.ResultSet.getDouble(int)
java.sql.ResultSet.getDouble(java.lang.String)
java.util.prefs.AbstractPreferences.getDouble(java.lang.String, double)
java.util.prefs.Preferences.getDouble(java.lang.String, double)


Occurences of getDragEnabled

getDragEnabled occurences:
javax.swing.JColorChooser.getDragEnabled()
javax.swing.JFileChooser.getDragEnabled()
javax.swing.JList.getDragEnabled()
javax.swing.JTable.getDragEnabled()
javax.swing.JTree.getDragEnabled()
javax.swing.text.JTextComponent.getDragEnabled()


Occurences of getDragSource

getDragSource occurences:
java.awt.dnd.DragGestureEvent.getDragSource()
java.awt.dnd.DragGestureRecognizer.getDragSource()
java.awt.dnd.DragSourceContext.getDragSource()


Occurences of getDrawGraphics

getDrawGraphics occurences:
java.awt.Component.BltBufferStrategy.getDrawGraphics()
java.awt.Component.FlipBufferStrategy.getDrawGraphics()
java.awt.image.BufferStrategy.getDrawGraphics()


Occurences of getDropAction

getDropAction occurences:
java.awt.dnd.DragSourceDragEvent.getDropAction()
java.awt.dnd.DragSourceDropEvent.getDropAction()
java.awt.dnd.DropTargetDragEvent.getDropAction()
java.awt.dnd.DropTargetDropEvent.getDropAction()
javax.swing.TransferHandler.TransferSupport.getDropAction()


Occurences of getDropLocation

getDropLocation occurences:
javax.swing.JList.getDropLocation()
javax.swing.JTable.getDropLocation()
javax.swing.JTree.getDropLocation()
javax.swing.text.JTextComponent.getDropLocation()
javax.swing.TransferHandler.TransferSupport.getDropLocation()


Occurences of getDropMode

getDropMode occurences:
javax.swing.JList.getDropMode()
javax.swing.JTable.getDropMode()
javax.swing.JTree.getDropMode()
javax.swing.text.JTextComponent.getDropMode()


Occurences of getDropTarget

getDropTarget occurences:
java.awt.Component.getDropTarget()
java.awt.dnd.DropTargetContext.getDropTarget()


Occurences of getDropTargetContext

getDropTargetContext occurences:
java.awt.dnd.DropTarget.getDropTargetContext()
java.awt.dnd.DropTargetEvent.getDropTargetContext()


Occurences of getDSTSavings

getDSTSavings occurences:
java.util.SimpleTimeZone.getDSTSavings()
java.util.TimeZone.getDSTSavings()


Occurences of getDTDHandler

getDTDHandler occurences:
org.xml.sax.helpers.ParserAdapter.getDTDHandler()
org.xml.sax.helpers.XMLFilterImpl.getDTDHandler()
org.xml.sax.XMLReader.getDTDHandler()


Occurences of getDuration

getDuration occurences:
java.time.temporal.ChronoUnit.getDuration()
java.time.temporal.TemporalUnit.getDuration()
java.time.zone.ZoneOffsetTransition.getDuration()


Occurences of getEchoChar

getEchoChar occurences:
java.awt.TextField.getEchoChar()
javax.swing.JPasswordField.getEchoChar()


Occurences of getEditingPath

getEditingPath occurences:
javax.swing.JTree.getEditingPath()
javax.swing.plaf.basic.BasicTreeUI.getEditingPath(javax.swing.JTree)
javax.swing.plaf.multi.MultiTreeUI.getEditingPath(javax.swing.JTree)
javax.swing.plaf.TreeUI.getEditingPath(javax.swing.JTree)


Occurences of getEditor

getEditor occurences:
javax.swing.JComboBox.getEditor()
javax.swing.JSpinner.getEditor()
javax.swing.text.StyledEditorKit.StyledTextAction.getEditor(java.awt.event.ActionEvent)


Occurences of getEditorComponent

getEditorComponent occurences:
javax.swing.ComboBoxEditor.getEditorComponent()
javax.swing.JTable.getEditorComponent()
javax.swing.plaf.basic.BasicComboBoxEditor.getEditorComponent()


Occurences of getEditorKit

getEditorKit occurences:
javax.swing.JEditorPane.getEditorKit()
javax.swing.plaf.basic.BasicEditorPaneUI.getEditorKit(javax.swing.text.JTextComponent)
javax.swing.plaf.basic.BasicTextUI.getEditorKit(javax.swing.text.JTextComponent)
javax.swing.plaf.multi.MultiTextUI.getEditorKit(javax.swing.text.JTextComponent)
javax.swing.plaf.TextUI.getEditorKit(javax.swing.text.JTextComponent)


Occurences of getElem

getElem occurences:
java.awt.image.DataBuffer.getElem(int)
java.awt.image.DataBuffer.getElem(int, int)
java.awt.image.DataBufferByte.getElem(int)
java.awt.image.DataBufferByte.getElem(int, int)
java.awt.image.DataBufferDouble.getElem(int)
java.awt.image.DataBufferDouble.getElem(int, int)
java.awt.image.DataBufferFloat.getElem(int)
java.awt.image.DataBufferFloat.getElem(int, int)
java.awt.image.DataBufferInt.getElem(int)
java.awt.image.DataBufferInt.getElem(int, int)
java.awt.image.DataBufferShort.getElem(int)
java.awt.image.DataBufferShort.getElem(int, int)
java.awt.image.DataBufferUShort.getElem(int)
java.awt.image.DataBufferUShort.getElem(int, int)


Occurences of getElemDouble

getElemDouble occurences:
java.awt.image.DataBuffer.getElemDouble(int)
java.awt.image.DataBuffer.getElemDouble(int, int)
java.awt.image.DataBufferDouble.getElemDouble(int)
java.awt.image.DataBufferDouble.getElemDouble(int, int)
java.awt.image.DataBufferFloat.getElemDouble(int)
java.awt.image.DataBufferFloat.getElemDouble(int, int)


Occurences of getElement

getElement occurences:
com.sun.source.util.DocTrees.getElement(com.sun.source.util.DocTreePath)
com.sun.source.util.Trees.getElement(com.sun.source.util.TreePath)
javax.swing.event.DocumentEvent.ElementChange.getElement()
javax.swing.text.AbstractDocument.AbstractElement.getElement(int)
javax.swing.text.AbstractDocument.BranchElement.getElement(int)
javax.swing.text.AbstractDocument.ElementEdit.getElement()
javax.swing.text.AbstractDocument.LeafElement.getElement(int)
javax.swing.text.Element.getElement(int)
javax.swing.text.html.HTMLDocument.getElement(java.lang.String)
javax.swing.text.html.HTMLDocument.getElement(javax.swing.text.Element, java.lang.Object, java.lang.Object)
javax.swing.text.html.parser.DTD.getElement(int)
javax.swing.text.html.parser.DTD.getElement(java.lang.String)
javax.swing.text.html.parser.TagElement.getElement()
javax.swing.text.View.getElement()
javax.xml.bind.annotation.DomHandler.getElement(javax.xml.transform.Result)
javax.xml.bind.annotation.DomHandler.getElement(ResultT)
javax.xml.bind.annotation.W3CDomHandler.getElement(javax.xml.transform.dom.DOMResult)


Occurences of getElementAt

getElementAt occurences:
javax.swing.DefaultComboBoxModel.getElementAt(int)
javax.swing.DefaultListModel.getElementAt(int)
javax.swing.ListModel.getElementAt(int)
javax.swing.plaf.basic.BasicDirectoryModel.getElementAt(int)
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.getElementAt(int)
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.getElementAt(int)


Occurences of getElementById

getElementById occurences:
javax.xml.crypto.dom.DOMCryptoContext.getElementById(java.lang.String)
org.w3c.dom.Document.getElementById(java.lang.String)


Occurences of getElementCount

getElementCount occurences:
javax.swing.text.AbstractDocument.AbstractElement.getElementCount()
javax.swing.text.AbstractDocument.BranchElement.getElementCount()
javax.swing.text.AbstractDocument.LeafElement.getElementCount()
javax.swing.text.Element.getElementCount()


Occurences of getElementDescription

getElementDescription occurences:
javax.imageio.metadata.IIOMetadataFormat.getElementDescription(java.lang.String, java.util.Locale)
javax.imageio.metadata.IIOMetadataFormatImpl.getElementDescription(java.lang.String, java.util.Locale)


Occurences of getElementIndex

getElementIndex occurences:
javax.swing.text.AbstractDocument.AbstractElement.getElementIndex(int)
javax.swing.text.AbstractDocument.BranchElement.getElementIndex(int)
javax.swing.text.AbstractDocument.LeafElement.getElementIndex(int)
javax.swing.text.Element.getElementIndex(int)


Occurences of getElementMaxChildren

getElementMaxChildren occurences:
javax.imageio.metadata.IIOMetadataFormat.getElementMaxChildren(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getElementMaxChildren(java.lang.String)


Occurences of getElementMinChildren

getElementMinChildren occurences:
javax.imageio.metadata.IIOMetadataFormat.getElementMinChildren(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getElementMinChildren(java.lang.String)


Occurences of getElementName

getElementName occurences:
javax.xml.bind.JAXBIntrospector.getElementName(java.lang.Object)
javax.xml.soap.SOAPElement.getElementName()


Occurences of getElements

getElements occurences:
com.sun.source.util.JavacTask.getElements()
javax.swing.ButtonGroup.getElements()
javax.swing.text.html.parser.ContentModel.getElements(java.util.Vector)


Occurences of getElementsAnnotatedWith

getElementsAnnotatedWith occurences:
javax.annotation.processing.RoundEnvironment.getElementsAnnotatedWith(java.lang.Class)
javax.annotation.processing.RoundEnvironment.getElementsAnnotatedWith(javax.lang.model.element.TypeElement)


Occurences of getElementsByTagName

getElementsByTagName occurences:
javax.imageio.metadata.IIOMetadataNode.getElementsByTagName(java.lang.String)
org.w3c.dom.Document.getElementsByTagName(java.lang.String)
org.w3c.dom.Element.getElementsByTagName(java.lang.String)


Occurences of getElementsByTagNameNS

getElementsByTagNameNS occurences:
javax.imageio.metadata.IIOMetadataNode.getElementsByTagNameNS(java.lang.String, java.lang.String)
org.w3c.dom.Document.getElementsByTagNameNS(java.lang.String, java.lang.String)
org.w3c.dom.Element.getElementsByTagNameNS(java.lang.String, java.lang.String)


Occurences of getElementText

getElementText occurences:
javax.xml.stream.util.EventReaderDelegate.getElementText()
javax.xml.stream.util.StreamReaderDelegate.getElementText()
javax.xml.stream.XMLEventReader.getElementText()
javax.xml.stream.XMLStreamReader.getElementText()


Occurences of getElemFloat

getElemFloat occurences:
java.awt.image.DataBuffer.getElemFloat(int)
java.awt.image.DataBuffer.getElemFloat(int, int)
java.awt.image.DataBufferDouble.getElemFloat(int)
java.awt.image.DataBufferDouble.getElemFloat(int, int)
java.awt.image.DataBufferFloat.getElemFloat(int)
java.awt.image.DataBufferFloat.getElemFloat(int, int)


Occurences of getEmptySet

getEmptySet occurences:
javax.swing.text.AbstractDocument.AttributeContext.getEmptySet()
javax.swing.text.StyleContext.getEmptySet()


Occurences of getEnabledCipherSuites

getEnabledCipherSuites occurences:
javax.net.ssl.SSLEngine.getEnabledCipherSuites()
javax.net.ssl.SSLServerSocket.getEnabledCipherSuites()
javax.net.ssl.SSLSocket.getEnabledCipherSuites()
javax.rmi.ssl.SslRMIServerSocketFactory.getEnabledCipherSuites()


Occurences of getEnabledProtocols

getEnabledProtocols occurences:
javax.net.ssl.SSLEngine.getEnabledProtocols()
javax.net.ssl.SSLServerSocket.getEnabledProtocols()
javax.net.ssl.SSLSocket.getEnabledProtocols()
javax.rmi.ssl.SslRMIServerSocketFactory.getEnabledProtocols()


Occurences of getEnableSessionCreation

getEnableSessionCreation occurences:
javax.net.ssl.SSLEngine.getEnableSessionCreation()
javax.net.ssl.SSLServerSocket.getEnableSessionCreation()
javax.net.ssl.SSLSocket.getEnableSessionCreation()


Occurences of getEnclosedElements

getEnclosedElements occurences:
javax.lang.model.element.Element.getEnclosedElements()
javax.lang.model.element.PackageElement.getEnclosedElements()
javax.lang.model.element.TypeElement.getEnclosedElements()


Occurences of getEnclosingClass

getEnclosingClass occurences:
com.sun.source.tree.Scope.getEnclosingClass()
java.lang.Class.getEnclosingClass()


Occurences of getEnclosingElement

getEnclosingElement occurences:
javax.lang.model.element.Element.getEnclosingElement()
javax.lang.model.element.PackageElement.getEnclosingElement()
javax.lang.model.element.TypeElement.getEnclosingElement()
javax.lang.model.element.TypeParameterElement.getEnclosingElement()
javax.lang.model.element.VariableElement.getEnclosingElement()


Occurences of getEnclosingMethod

getEnclosingMethod occurences:
com.sun.source.tree.Scope.getEnclosingMethod()
java.lang.Class.getEnclosingMethod()


Occurences of getEncoded

getEncoded occurences:
java.security.AlgorithmParameters.getEncoded()
java.security.AlgorithmParameters.getEncoded(java.lang.String)
java.security.cert.Certificate.getEncoded()
java.security.cert.CertPath.getEncoded()
java.security.cert.CertPath.getEncoded(java.lang.String)
java.security.cert.PolicyQualifierInfo.getEncoded()
java.security.cert.X509CRL.getEncoded()
java.security.cert.X509CRLEntry.getEncoded()
java.security.Key.getEncoded()
java.security.PKCS12Attribute.getEncoded()
java.security.spec.EncodedKeySpec.getEncoded()
java.security.spec.PKCS8EncodedKeySpec.getEncoded()
java.security.spec.X509EncodedKeySpec.getEncoded()
javax.crypto.EncryptedPrivateKeyInfo.getEncoded()
javax.crypto.spec.SecretKeySpec.getEncoded()
javax.net.ssl.SNIServerName.getEncoded()
javax.security.auth.kerberos.KerberosKey.getEncoded()
javax.security.auth.kerberos.KerberosTicket.getEncoded()
javax.security.auth.x500.X500Principal.getEncoded()
javax.security.cert.Certificate.getEncoded()


Occurences of getEncodedValue

getEncodedValue occurences:
javax.naming.ldap.BasicControl.getEncodedValue()
javax.naming.ldap.Control.getEncodedValue()
javax.naming.ldap.ExtendedRequest.getEncodedValue()
javax.naming.ldap.ExtendedResponse.getEncodedValue()
javax.naming.ldap.StartTlsRequest.getEncodedValue()
javax.naming.ldap.StartTlsResponse.getEncodedValue()


Occurences of getEncoding

getEncoding occurences:
java.io.InputStreamReader.getEncoding()
java.io.OutputStreamWriter.getEncoding()
java.util.logging.Handler.getEncoding()
javax.sound.sampled.AudioFormat.getEncoding()
javax.xml.bind.helpers.AbstractMarshallerImpl.getEncoding()
javax.xml.crypto.dsig.XMLObject.getEncoding()
javax.xml.stream.util.StreamReaderDelegate.getEncoding()
javax.xml.stream.XMLStreamReader.getEncoding()
org.w3c.dom.ls.LSInput.getEncoding()
org.w3c.dom.ls.LSOutput.getEncoding()
org.xml.sax.ext.Locator2.getEncoding()
org.xml.sax.ext.Locator2Impl.getEncoding()
org.xml.sax.InputSource.getEncoding()


Occurences of getEndIndex

getEndIndex occurences:
java.text.CharacterIterator.getEndIndex()
java.text.FieldPosition.getEndIndex()
java.text.StringCharacterIterator.getEndIndex()
javax.accessibility.AccessibleHyperlink.getEndIndex()
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getEndIndex()
javax.swing.text.Segment.getEndIndex()


Occurences of getEndOffset

getEndOffset occurences:
javax.swing.text.AbstractDocument.AbstractElement.getEndOffset()
javax.swing.text.AbstractDocument.BranchElement.getEndOffset()
javax.swing.text.AbstractDocument.LeafElement.getEndOffset()
javax.swing.text.AbstractWriter.getEndOffset()
javax.swing.text.Element.getEndOffset()
javax.swing.text.GlyphView.getEndOffset()
javax.swing.text.Highlighter.Highlight.getEndOffset()
javax.swing.text.html.HTMLDocument.Iterator.getEndOffset()
javax.swing.text.View.getEndOffset()


Occurences of getEndPoint

getEndPoint occurences:
java.awt.geom.Arc2D.getEndPoint()
java.awt.LinearGradientPaint.getEndPoint()


Occurences of getEndpointReference

getEndpointReference occurences:
javax.xml.ws.BindingProvider.getEndpointReference()
javax.xml.ws.BindingProvider.getEndpointReference(java.lang.Class)
javax.xml.ws.Endpoint.getEndpointReference(java.lang.Class, org.w3c.dom.Element...)
javax.xml.ws.Endpoint.getEndpointReference(org.w3c.dom.Element...)
javax.xml.ws.WebServiceContext.getEndpointReference(java.lang.Class, org.w3c.dom.Element...)
javax.xml.ws.WebServiceContext.getEndpointReference(org.w3c.dom.Element...)


Occurences of getEndPosition

getEndPosition occurences:
com.sun.source.util.DocSourcePositions.getEndPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.doctree.DocCommentTree, com.sun.source.doctree.DocTree)
com.sun.source.util.SourcePositions.getEndPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.tree.Tree)
javax.swing.text.AbstractDocument.getEndPosition()
javax.swing.text.Document.getEndPosition()
javax.tools.Diagnostic.getEndPosition()


Occurences of getEntities

getEntities occurences:
javax.xml.stream.events.DTD.getEntities()
org.w3c.dom.DocumentType.getEntities()


Occurences of getEntity

getEntity occurences:
javax.swing.text.html.parser.DTD.getEntity(int)
javax.swing.text.html.parser.DTD.getEntity(java.lang.String)


Occurences of getEntityResolver

getEntityResolver occurences:
org.xml.sax.helpers.ParserAdapter.getEntityResolver()
org.xml.sax.helpers.XMLFilterImpl.getEntityResolver()
org.xml.sax.XMLReader.getEntityResolver()


Occurences of getEntry

getEntry occurences:
java.security.KeyStore.getEntry(java.lang.String, java.security.KeyStore.ProtectionParameter)
java.util.jar.JarFile.getEntry(java.lang.String)
java.util.zip.ZipFile.getEntry(java.lang.String)


Occurences of getEnumValueTable

getEnumValueTable occurences:
javax.print.attribute.EnumSyntax.getEnumValueTable()
javax.print.attribute.standard.Chromaticity.getEnumValueTable()
javax.print.attribute.standard.ColorSupported.getEnumValueTable()
javax.print.attribute.standard.Compression.getEnumValueTable()
javax.print.attribute.standard.DialogTypeSelection.getEnumValueTable()
javax.print.attribute.standard.Fidelity.getEnumValueTable()
javax.print.attribute.standard.Finishings.getEnumValueTable()
javax.print.attribute.standard.JobSheets.getEnumValueTable()
javax.print.attribute.standard.JobState.getEnumValueTable()
javax.print.attribute.standard.JobStateReason.getEnumValueTable()
javax.print.attribute.standard.MediaName.getEnumValueTable()
javax.print.attribute.standard.MediaSizeName.getEnumValueTable()
javax.print.attribute.standard.MediaTray.getEnumValueTable()
javax.print.attribute.standard.MultipleDocumentHandling.getEnumValueTable()
javax.print.attribute.standard.OrientationRequested.getEnumValueTable()
javax.print.attribute.standard.PDLOverrideSupported.getEnumValueTable()
javax.print.attribute.standard.PresentationDirection.getEnumValueTable()
javax.print.attribute.standard.PrinterIsAcceptingJobs.getEnumValueTable()
javax.print.attribute.standard.PrinterState.getEnumValueTable()
javax.print.attribute.standard.PrinterStateReason.getEnumValueTable()
javax.print.attribute.standard.PrintQuality.getEnumValueTable()
javax.print.attribute.standard.ReferenceUriSchemesSupported.getEnumValueTable()
javax.print.attribute.standard.Severity.getEnumValueTable()
javax.print.attribute.standard.SheetCollate.getEnumValueTable()
javax.print.attribute.standard.Sides.getEnumValueTable()


Occurences of getenv

getenv occurences:
java.lang.System.getenv()
java.lang.System.getenv(java.lang.String)


Occurences of getEnvironment

getEnvironment occurences:
javax.naming.CannotProceedException.getEnvironment()
javax.naming.Context.getEnvironment()
javax.naming.InitialContext.getEnvironment()


Occurences of getEra

getEra occurences:
java.time.chrono.ChronoLocalDate.getEra()
java.time.chrono.HijrahDate.getEra()
java.time.chrono.JapaneseDate.getEra()
java.time.chrono.MinguoDate.getEra()
java.time.chrono.ThaiBuddhistDate.getEra()
java.time.LocalDate.getEra()


Occurences of getErrorCode

getErrorCode occurences:
java.sql.SQLException.getErrorCode()
javax.xml.bind.JAXBException.getErrorCode()
javax.xml.bind.TypeConstraintException.getErrorCode()


Occurences of getErrorHandler

getErrorHandler occurences:
javax.xml.validation.SchemaFactory.getErrorHandler()
javax.xml.validation.Validator.getErrorHandler()
javax.xml.validation.ValidatorHandler.getErrorHandler()
org.xml.sax.helpers.ParserAdapter.getErrorHandler()
org.xml.sax.helpers.XMLFilterImpl.getErrorHandler()
org.xml.sax.XMLReader.getErrorHandler()


Occurences of getErrorIndex

getErrorIndex occurences:
java.text.ParsePosition.getErrorIndex()
java.time.format.DateTimeParseException.getErrorIndex()
java.util.IllformedLocaleException.getErrorIndex()


Occurences of getErrorListener

getErrorListener occurences:
javax.xml.transform.Transformer.getErrorListener()
javax.xml.transform.TransformerFactory.getErrorListener()


Occurences of getErrorStream

getErrorStream occurences:
java.lang.Process.getErrorStream()
java.net.HttpURLConnection.getErrorStream()


Occurences of getErrorWriter

getErrorWriter occurences:
javax.script.ScriptContext.getErrorWriter()
javax.script.SimpleScriptContext.getErrorWriter()


Occurences of getEscapeProcessing

getEscapeProcessing occurences:
javax.sql.RowSet.getEscapeProcessing()
javax.sql.rowset.BaseRowSet.getEscapeProcessing()


Occurences of getEventContext

getEventContext occurences:
javax.naming.event.NamingEvent.getEventContext()
javax.naming.event.NamingExceptionEvent.getEventContext()


Occurences of getEventHandler

getEventHandler occurences:
javax.xml.bind.Binder.getEventHandler()
javax.xml.bind.helpers.AbstractMarshallerImpl.getEventHandler()
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getEventHandler()
javax.xml.bind.Marshaller.getEventHandler()
javax.xml.bind.Unmarshaller.getEventHandler()
javax.xml.bind.Validator.getEventHandler()


Occurences of getEventSetDescriptors

getEventSetDescriptors occurences:
java.beans.BeanInfo.getEventSetDescriptors()
java.beans.SimpleBeanInfo.getEventSetDescriptors()


Occurences of getEventType

getEventType occurences:
javax.swing.event.HyperlinkEvent.getEventType()
javax.xml.stream.events.XMLEvent.getEventType()
javax.xml.stream.util.StreamReaderDelegate.getEventType()
javax.xml.stream.XMLStreamReader.getEventType()


Occurences of getException

getException occurences:
java.awt.event.InvocationEvent.getException()
java.lang.ClassNotFoundException.getException()
java.lang.ExceptionInInitializerError.getException()
java.security.PrivilegedActionException.getException()
java.util.concurrent.ForkJoinTask.getException()
javax.naming.event.NamingExceptionEvent.getException()
javax.naming.ldap.SortResponseControl.getException()
javax.naming.ldap.UnsolicitedNotification.getException()
javax.xml.parsers.FactoryConfigurationError.getException()
javax.xml.stream.FactoryConfigurationError.getException()
javax.xml.transform.TransformerException.getException()
javax.xml.transform.TransformerFactoryConfigurationError.getException()
org.xml.sax.SAXException.getException()


Occurences of getExceptionListener

getExceptionListener occurences:
java.beans.Encoder.getExceptionListener()
java.beans.XMLDecoder.getExceptionListener()


Occurences of getExceptionTypes

getExceptionTypes occurences:
java.lang.reflect.Constructor.getExceptionTypes()
java.lang.reflect.Executable.getExceptionTypes()
java.lang.reflect.Method.getExceptionTypes()


Occurences of getExclusiveQueuedThreads

getExclusiveQueuedThreads occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getExclusiveQueuedThreads()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getExclusiveQueuedThreads()


Occurences of getExecutor

getExecutor occurences:
javax.xml.ws.Endpoint.getExecutor()
javax.xml.ws.Service.getExecutor()
javax.xml.ws.spi.ServiceDelegate.getExecutor()


Occurences of getExpandedIcon

getExpandedIcon occurences:
javax.swing.plaf.basic.BasicTreeUI.getExpandedIcon()
javax.swing.plaf.synth.SynthTreeUI.getExpandedIcon()


Occurences of getExpandedState

getExpandedState occurences:
javax.swing.tree.AbstractLayoutCache.getExpandedState(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.getExpandedState(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.getExpandedState(javax.swing.tree.TreePath)


Occurences of getExponent

getExponent occurences:
java.lang.Math.getExponent(double)
java.lang.Math.getExponent(float)
java.lang.StrictMath.getExponent(double)
java.lang.StrictMath.getExponent(float)
java.security.spec.RSAOtherPrimeInfo.getExponent()


Occurences of getExpression

getExpression occurences:
com.sun.source.tree.ArrayAccessTree.getExpression()
com.sun.source.tree.AssignmentTree.getExpression()
com.sun.source.tree.CaseTree.getExpression()
com.sun.source.tree.CompoundAssignmentTree.getExpression()
com.sun.source.tree.EnhancedForLoopTree.getExpression()
com.sun.source.tree.ExpressionStatementTree.getExpression()
com.sun.source.tree.InstanceOfTree.getExpression()
com.sun.source.tree.MemberSelectTree.getExpression()
com.sun.source.tree.ParenthesizedTree.getExpression()
com.sun.source.tree.ReturnTree.getExpression()
com.sun.source.tree.SwitchTree.getExpression()
com.sun.source.tree.SynchronizedTree.getExpression()
com.sun.source.tree.ThrowTree.getExpression()
com.sun.source.tree.TypeCastTree.getExpression()
com.sun.source.tree.UnaryTree.getExpression()
javax.xml.crypto.dsig.spec.XPathType.getExpression()


Occurences of getExtendedKeyUsage

getExtendedKeyUsage occurences:
java.security.cert.X509Certificate.getExtendedKeyUsage()
java.security.cert.X509CertSelector.getExtendedKeyUsage()


Occurences of getExtension

getExtension occurences:
java.util.Locale.getExtension(char)
javax.sound.sampled.AudioFileFormat.Type.getExtension()


Occurences of getExtensions

getExtensions occurences:
java.security.cert.CertificateRevokedException.getExtensions()
javax.script.ScriptEngineFactory.getExtensions()
javax.swing.filechooser.FileNameExtensionFilter.getExtensions()


Occurences of getExtent

getExtent occurences:
javax.swing.BoundedRangeModel.getExtent()
javax.swing.DefaultBoundedRangeModel.getExtent()
javax.swing.JSlider.getExtent()


Occurences of getExternalSubset

getExternalSubset occurences:
org.xml.sax.ext.DefaultHandler2.getExternalSubset(java.lang.String, java.lang.String)
org.xml.sax.ext.EntityResolver2.getExternalSubset(java.lang.String, java.lang.String)


Occurences of getFactory

getFactory occurences:
java.util.concurrent.ForkJoinPool.getFactory()
javax.script.ScriptEngine.getFactory()


Occurences of getFamily

getFamily occurences:
java.awt.Font.getFamily()
java.awt.Font.getFamily(java.util.Locale)


Occurences of getFault

getFault occurences:
javax.xml.soap.SOAPBody.getFault()
javax.xml.ws.soap.SOAPFaultException.getFault()


Occurences of getFD

getFD occurences:
java.io.FileInputStream.getFD()
java.io.FileOutputStream.getFD()
java.io.RandomAccessFile.getFD()


Occurences of getFeature

getFeature occurences:
javax.imageio.metadata.IIOMetadataNode.getFeature(java.lang.String, java.lang.String)
javax.xml.parsers.DocumentBuilderFactory.getFeature(java.lang.String)
javax.xml.parsers.SAXParserFactory.getFeature(java.lang.String)
javax.xml.transform.TransformerFactory.getFeature(java.lang.String)
javax.xml.validation.SchemaFactory.getFeature(java.lang.String)
javax.xml.validation.Validator.getFeature(java.lang.String)
javax.xml.validation.ValidatorHandler.getFeature(java.lang.String)
javax.xml.xpath.XPathFactory.getFeature(java.lang.String)
org.w3c.dom.DOMImplementation.getFeature(java.lang.String, java.lang.String)
org.w3c.dom.Node.getFeature(java.lang.String, java.lang.String)
org.xml.sax.helpers.ParserAdapter.getFeature(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.getFeature(java.lang.String)
org.xml.sax.XMLReader.getFeature(java.lang.String)


Occurences of getFetchDirection

getFetchDirection occurences:
java.sql.ResultSet.getFetchDirection()
java.sql.Statement.getFetchDirection()
javax.sql.rowset.BaseRowSet.getFetchDirection()


Occurences of getFetchSize

getFetchSize occurences:
java.sql.ResultSet.getFetchSize()
java.sql.Statement.getFetchSize()
javax.sql.rowset.BaseRowSet.getFetchSize()


Occurences of getField

getField occurences:
java.io.ObjectStreamClass.getField(java.lang.String)
java.lang.Class.getField(java.lang.String)
java.security.spec.EllipticCurve.getField()
java.text.FieldPosition.getField()
javax.xml.datatype.Duration.getField(javax.xml.datatype.DatatypeConstants.Field)


Occurences of getFieldNames

getFieldNames occurences:
javax.management.Descriptor.getFieldNames()
javax.management.ImmutableDescriptor.getFieldNames()
javax.management.modelmbean.DescriptorSupport.getFieldNames()


Occurences of getFields

getFields occurences:
java.io.ObjectStreamClass.getFields()
java.lang.Class.getFields()
javax.management.Descriptor.getFields()
javax.management.ImmutableDescriptor.getFields()
javax.management.modelmbean.DescriptorSupport.getFields()
javax.sql.rowset.serial.SerialJavaObject.getFields()
javax.swing.text.InternationalFormatter.getFields(int)


Occurences of getFieldSize

getFieldSize occurences:
java.security.spec.ECField.getFieldSize()
java.security.spec.ECFieldF2m.getFieldSize()
java.security.spec.ECFieldFp.getFieldSize()


Occurences of getFieldValue

getFieldValue occurences:
javax.management.Descriptor.getFieldValue(java.lang.String)
javax.management.ImmutableDescriptor.getFieldValue(java.lang.String)
javax.management.modelmbean.DescriptorSupport.getFieldValue(java.lang.String)


Occurences of getFieldValues

getFieldValues occurences:
javax.management.Descriptor.getFieldValues(java.lang.String...)
javax.management.ImmutableDescriptor.getFieldValues(java.lang.String...)
javax.management.modelmbean.DescriptorSupport.getFieldValues(java.lang.String...)


Occurences of getFile

getFile occurences:
java.awt.FileDialog.getFile()
java.net.URL.getFile()
java.nio.file.FileSystemException.getFile()
javax.activation.FileDataSource.getFile()


Occurences of getFileAttributeView

getFileAttributeView occurences:
java.nio.file.Files.getFileAttributeView(java.nio.file.Path, java.lang.Class, java.nio.file.LinkOption...)
java.nio.file.SecureDirectoryStream.getFileAttributeView(java.lang.Class)
java.nio.file.SecureDirectoryStream.getFileAttributeView(java.lang.Object, java.lang.Class, java.nio.file.LinkOption:A)
java.nio.file.SecureDirectoryStream.getFileAttributeView(T, java.lang.Class, java.nio.file.LinkOption...)
java.nio.file.spi.FileSystemProvider.getFileAttributeView(java.nio.file.Path, java.lang.Class, java.nio.file.LinkOption...)


Occurences of getFileDescriptor

getFileDescriptor occurences:
java.net.DatagramSocketImpl.getFileDescriptor()
java.net.SocketImpl.getFileDescriptor()


Occurences of getFileForInput

getFileForInput occurences:
javax.tools.ForwardingJavaFileManager.getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String)
javax.tools.JavaFileManager.getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String)


Occurences of getFileForOutput

getFileForOutput occurences:
javax.tools.ForwardingJavaFileManager.getFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String, javax.tools.FileObject)
javax.tools.JavaFileManager.getFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String, javax.tools.FileObject)


Occurences of getFileName

getFileName occurences:
java.awt.JobAttributes.getFileName()
java.lang.StackTraceElement.getFileName()
java.nio.file.Path.getFileName()
javax.script.ScriptException.getFileName()
javax.swing.plaf.basic.BasicFileChooserUI.getFileName()
javax.swing.plaf.metal.MetalFileChooserUI.getFileName()


Occurences of getFiles

getFiles occurences:
java.awt.FileDialog.getFiles()
javax.swing.filechooser.FileSystemView.getFiles(java.io.File, boolean)
javax.swing.plaf.basic.BasicDirectoryModel.getFiles()


Occurences of getFileStore

getFileStore occurences:
java.nio.file.Files.getFileStore(java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.getFileStore(java.nio.file.Path)


Occurences of getFileSystem

getFileSystem occurences:
java.nio.file.FileSystems.getFileSystem(java.net.URI)
java.nio.file.Path.getFileSystem()
java.nio.file.spi.FileSystemProvider.getFileSystem(java.net.URI)


Occurences of getFileSystemView

getFileSystemView occurences:
javax.swing.filechooser.FileSystemView.getFileSystemView()
javax.swing.JFileChooser.getFileSystemView()


Occurences of getFileView

getFileView occurences:
javax.swing.JFileChooser.getFileView()
javax.swing.plaf.basic.BasicFileChooserUI.getFileView(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.getFileView(javax.swing.JFileChooser)
javax.swing.plaf.multi.MultiFileChooserUI.getFileView(javax.swing.JFileChooser)


Occurences of getFilter

getFilter occurences:
java.util.logging.Handler.getFilter()
java.util.logging.Logger.getFilter()
javax.sql.rowset.FilteredRowSet.getFilter()
javax.xml.crypto.dsig.spec.XPathType.getFilter()
org.w3c.dom.ls.LSParser.getFilter()
org.w3c.dom.ls.LSSerializer.getFilter()


Occurences of getFirst

getFirst occurences:
java.util.ArrayDeque.getFirst()
java.util.concurrent.ConcurrentLinkedDeque.getFirst()
java.util.concurrent.LinkedBlockingDeque.getFirst()
java.util.Deque.getFirst()
java.util.LinkedList.getFirst()


Occurences of getFirstChild

getFirstChild occurences:
javax.imageio.metadata.IIOMetadataNode.getFirstChild()
javax.swing.tree.DefaultMutableTreeNode.getFirstChild()
org.w3c.dom.Node.getFirstChild()


Occurences of getFirstColumn

getFirstColumn occurences:
javax.accessibility.AccessibleTableModelChange.getFirstColumn()
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.getFirstColumn()


Occurences of getFirstComponent

getFirstComponent occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(java.awt.Container)
java.awt.FocusTraversalPolicy.getFirstComponent(java.awt.Container)
javax.swing.DefaultFocusManager.getFirstComponent(java.awt.Container)
javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(java.awt.Container)
javax.swing.SortingFocusTraversalPolicy.getFirstComponent(java.awt.Container)


Occurences of getFirstDayOfWeek

getFirstDayOfWeek occurences:
java.time.temporal.WeekFields.getFirstDayOfWeek()
java.util.Calendar.getFirstDayOfWeek()
java.util.spi.CalendarDataProvider.getFirstDayOfWeek(java.util.Locale)


Occurences of getFirstQueuedThread

getFirstQueuedThread occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getFirstQueuedThread()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getFirstQueuedThread()


Occurences of getFirstRow

getFirstRow occurences:
javax.accessibility.AccessibleTableModelChange.getFirstRow()
javax.swing.event.TableModelEvent.getFirstRow()
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.getFirstRow()


Occurences of getFixedRate

getFixedRate occurences:
javax.management.timer.Timer.getFixedRate(java.lang.Integer)
javax.management.timer.TimerMBean.getFixedRate(java.lang.Integer)


Occurences of getFlags

getFlags occurences:
com.sun.source.tree.ModifiersTree.getFlags()
java.util.DuplicateFormatFlagsException.getFlags()
java.util.FormatFlagsConversionMismatchException.getFlags()
java.util.IllegalFormatFlagsException.getFlags()
java.util.UnknownFormatFlagsException.getFlags()
javax.security.auth.kerberos.KerberosTicket.getFlags()


Occurences of getFlatness

getFlatness occurences:
java.awt.geom.CubicCurve2D.getFlatness()
java.awt.geom.CubicCurve2D.getFlatness(double, double, double, double, double, double, double, double)
java.awt.geom.CubicCurve2D.getFlatness(double:A, int)
java.awt.geom.FlatteningPathIterator.getFlatness()
java.awt.geom.QuadCurve2D.getFlatness()
java.awt.geom.QuadCurve2D.getFlatness(double, double, double, double, double, double)
java.awt.geom.QuadCurve2D.getFlatness(double:A, int)


Occurences of getFlatnessSq

getFlatnessSq occurences:
java.awt.geom.CubicCurve2D.getFlatnessSq()
java.awt.geom.CubicCurve2D.getFlatnessSq(double, double, double, double, double, double, double, double)
java.awt.geom.CubicCurve2D.getFlatnessSq(double:A, int)
java.awt.geom.QuadCurve2D.getFlatnessSq()
java.awt.geom.QuadCurve2D.getFlatnessSq(double, double, double, double, double, double)
java.awt.geom.QuadCurve2D.getFlatnessSq(double:A, int)


Occurences of getFlavorMap

getFlavorMap occurences:
java.awt.dnd.DragSource.getFlavorMap()
java.awt.dnd.DropTarget.getFlavorMap()


Occurences of getFlavorsForNative

getFlavorsForNative occurences:
java.awt.datatransfer.FlavorTable.getFlavorsForNative(java.lang.String)
java.awt.datatransfer.SystemFlavorMap.getFlavorsForNative(java.lang.String)


Occurences of getFlavorsForNatives

getFlavorsForNatives occurences:
java.awt.datatransfer.FlavorMap.getFlavorsForNatives(java.lang.String:A)
java.awt.datatransfer.SystemFlavorMap.getFlavorsForNatives(java.lang.String:A)


Occurences of getFloat

getFloat occurences:
java.lang.reflect.Array.getFloat(java.lang.Object, int)
java.lang.reflect.Field.getFloat(java.lang.Object)
java.nio.ByteBuffer.getFloat()
java.nio.ByteBuffer.getFloat(int)
java.sql.CallableStatement.getFloat(int)
java.sql.CallableStatement.getFloat(java.lang.String)
java.sql.ResultSet.getFloat(int)
java.sql.ResultSet.getFloat(java.lang.String)
java.util.prefs.AbstractPreferences.getFloat(java.lang.String, float)
java.util.prefs.Preferences.getFloat(java.lang.String, float)


Occurences of getFlowSpan

getFlowSpan occurences:
javax.swing.text.FlowView.getFlowSpan(int)
javax.swing.text.ParagraphView.getFlowSpan(int)


Occurences of getFlowStart

getFlowStart occurences:
javax.swing.text.FlowView.getFlowStart(int)
javax.swing.text.ParagraphView.getFlowStart(int)


Occurences of getFlushedPosition

getFlushedPosition occurences:
javax.imageio.stream.ImageInputStream.getFlushedPosition()
javax.imageio.stream.ImageInputStreamImpl.getFlushedPosition()


Occurences of getFocusColor

getFocusColor occurences:
javax.swing.plaf.basic.BasicSliderUI.getFocusColor()
javax.swing.plaf.metal.MetalButtonUI.getFocusColor()
javax.swing.plaf.metal.MetalLookAndFeel.getFocusColor()
javax.swing.plaf.metal.MetalRadioButtonUI.getFocusColor()
javax.swing.plaf.metal.MetalTheme.getFocusColor()
javax.swing.plaf.metal.MetalToggleButtonUI.getFocusColor()


Occurences of getFocusCycleRootAncestor

getFocusCycleRootAncestor occurences:
java.awt.Component.getFocusCycleRootAncestor()
java.awt.Window.getFocusCycleRootAncestor()
javax.swing.JInternalFrame.getFocusCycleRootAncestor()


Occurences of getFocusOwner

getFocusOwner occurences:
java.awt.KeyboardFocusManager.getFocusOwner()
java.awt.Window.getFocusOwner()
javax.swing.JInternalFrame.getFocusOwner()


Occurences of getFocusTraversalKeys

getFocusTraversalKeys occurences:
java.awt.Component.getFocusTraversalKeys(int)
java.awt.Container.getFocusTraversalKeys(int)
java.awt.Window.getFocusTraversalKeys(int)


Occurences of getFont

getFont occurences:
java.awt.Component.getFont()
java.awt.Component.AccessibleAWTComponent.getFont()
java.awt.Font.getFont(java.lang.String)
java.awt.Font.getFont(java.lang.String, java.awt.Font)
java.awt.Font.getFont(java.util.Map)
java.awt.font.GlyphVector.getFont()
java.awt.FontMetrics.getFont()
java.awt.Graphics.getFont()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getFont()
java.awt.MenuComponent.getFont()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getFont()
java.awt.MenuContainer.getFont()
javax.accessibility.AccessibleComponent.getFont()
javax.swing.border.TitledBorder.getFont(java.awt.Component)
javax.swing.DebugGraphics.getFont()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getFont()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getFont()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getFont()
javax.swing.plaf.synth.SynthStyle.getFont(javax.swing.plaf.synth.SynthContext)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFont()
javax.swing.text.DefaultStyledDocument.getFont(javax.swing.text.AttributeSet)
javax.swing.text.GlyphView.getFont()
javax.swing.text.html.StyleSheet.getFont(javax.swing.text.AttributeSet)
javax.swing.text.LabelView.getFont()
javax.swing.text.StyleContext.getFont(java.lang.String, int, int)
javax.swing.text.StyleContext.getFont(javax.swing.text.AttributeSet)
javax.swing.text.StyledDocument.getFont(javax.swing.text.AttributeSet)
javax.swing.tree.DefaultTreeCellEditor.getFont()
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField.getFont()
javax.swing.tree.DefaultTreeCellRenderer.getFont()
javax.swing.UIDefaults.getFont(java.lang.Object)
javax.swing.UIDefaults.getFont(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getFont(java.lang.Object)
javax.swing.UIManager.getFont(java.lang.Object, java.util.Locale)


Occurences of getFontForState

getFontForState occurences:
javax.swing.plaf.nimbus.NimbusStyle.getFontForState(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthStyle.getFontForState(javax.swing.plaf.synth.SynthContext)


Occurences of getFontMetrics

getFontMetrics occurences:
java.awt.Component.getFontMetrics(java.awt.Font)
java.awt.Component.AccessibleAWTComponent.getFontMetrics(java.awt.Font)
java.awt.Graphics.getFontMetrics()
java.awt.Graphics.getFontMetrics(java.awt.Font)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getFontMetrics(java.awt.Font)
java.awt.MenuComponent.AccessibleAWTMenuComponent.getFontMetrics(java.awt.Font)
java.awt.Toolkit.getFontMetrics(java.awt.Font)
javax.accessibility.AccessibleComponent.getFontMetrics(java.awt.Font)
javax.swing.DebugGraphics.getFontMetrics()
javax.swing.DebugGraphics.getFontMetrics(java.awt.Font)
javax.swing.JComponent.getFontMetrics(java.awt.Font)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getFontMetrics(java.awt.Font)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getFontMetrics(java.awt.Font)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getFontMetrics(java.awt.Font)
javax.swing.plaf.basic.BasicTabbedPaneUI.getFontMetrics()
javax.swing.plaf.synth.SynthTabbedPaneUI.getFontMetrics()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFontMetrics(java.awt.Font)
javax.swing.text.FieldView.getFontMetrics()
javax.swing.text.LabelView.getFontMetrics()
javax.swing.text.StyleContext.getFontMetrics(java.awt.Font)


Occurences of getFontName

getFontName occurences:
java.awt.Font.getFontName()
java.awt.Font.getFontName(java.util.Locale)


Occurences of getFontRenderContext

getFontRenderContext occurences:
java.awt.font.GlyphVector.getFontRenderContext()
java.awt.FontMetrics.getFontRenderContext()
java.awt.Graphics2D.getFontRenderContext()


Occurences of getFontTable

getFontTable occurences:
java.awt.font.OpenType.getFontTable(int)
java.awt.font.OpenType.getFontTable(int, int, int)
java.awt.font.OpenType.getFontTable(java.lang.String)
java.awt.font.OpenType.getFontTable(java.lang.String, int, int)


Occurences of getFontTableSize

getFontTableSize occurences:
java.awt.font.OpenType.getFontTableSize(int)
java.awt.font.OpenType.getFontTableSize(java.lang.String)


Occurences of getForeground

getForeground occurences:
java.awt.Component.getForeground()
java.awt.Component.AccessibleAWTComponent.getForeground()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getForeground()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getForeground()
javax.accessibility.AccessibleComponent.getForeground()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getForeground()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getForeground()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getForeground()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()
javax.swing.text.DefaultStyledDocument.getForeground(javax.swing.text.AttributeSet)
javax.swing.text.GlyphView.getForeground()
javax.swing.text.html.StyleSheet.getForeground(javax.swing.text.AttributeSet)
javax.swing.text.LabelView.getForeground()
javax.swing.text.StyleConstants.getForeground(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.getForeground(javax.swing.text.AttributeSet)
javax.swing.text.StyledDocument.getForeground(javax.swing.text.AttributeSet)


Occurences of getFormat

getFormat occurences:
java.security.Certificate.getFormat()
java.security.Key.getFormat()
java.security.spec.EncodedKeySpec.getFormat()
java.security.spec.PKCS8EncodedKeySpec.getFormat()
java.security.spec.X509EncodedKeySpec.getFormat()
javax.crypto.spec.SecretKeySpec.getFormat()
javax.security.auth.kerberos.KerberosKey.getFormat()
javax.sound.sampled.AudioFileFormat.getFormat()
javax.sound.sampled.AudioInputStream.getFormat()
javax.sound.sampled.DataLine.getFormat()
javax.swing.JSpinner.DateEditor.getFormat()
javax.swing.JSpinner.NumberEditor.getFormat()
javax.swing.text.InternationalFormatter.getFormat()


Occurences of getFormats

getFormats occurences:
java.text.ChoiceFormat.getFormats()
java.text.MessageFormat.getFormats()
java.util.ResourceBundle.Control.getFormats(java.lang.String)
javax.sound.sampled.DataLine.Info.getFormats()


Occurences of getFormatSpecifier

getFormatSpecifier occurences:
java.util.MissingFormatArgumentException.getFormatSpecifier()
java.util.MissingFormatWidthException.getFormatSpecifier()


Occurences of getFormatter

getFormatter occurences:
java.util.logging.Handler.getFormatter()
javax.swing.JFormattedTextField.getFormatter()
javax.swing.JFormattedTextField.AbstractFormatterFactory.getFormatter(javax.swing.JFormattedTextField)
javax.swing.text.DefaultFormatterFactory.getFormatter(javax.swing.JFormattedTextField)


Occurences of getFrameLength

getFrameLength occurences:
javax.sound.sampled.AudioFileFormat.getFrameLength()
javax.sound.sampled.AudioInputStream.getFrameLength()
javax.sound.sampled.Clip.getFrameLength()


Occurences of getFramePosition

getFramePosition occurences:
javax.sound.sampled.DataLine.getFramePosition()
javax.sound.sampled.LineEvent.getFramePosition()


Occurences of getFrom

getFrom occurences:
java.time.temporal.ChronoField.getFrom(java.time.temporal.TemporalAccessor)
java.time.temporal.TemporalField.getFrom(java.time.temporal.TemporalAccessor)


Occurences of getG

getG occurences:
java.security.interfaces.DSAParams.getG()
java.security.spec.DSAParameterSpec.getG()
java.security.spec.DSAPrivateKeySpec.getG()
java.security.spec.DSAPublicKeySpec.getG()
javax.crypto.spec.DHParameterSpec.getG()
javax.crypto.spec.DHPrivateKeySpec.getG()
javax.crypto.spec.DHPublicKeySpec.getG()


Occurences of getGamma

getGamma occurences:
java.awt.color.ICC_ProfileGray.getGamma()
java.awt.color.ICC_ProfileRGB.getGamma(int)


Occurences of getGenericExceptionTypes

getGenericExceptionTypes occurences:
java.lang.reflect.Constructor.getGenericExceptionTypes()
java.lang.reflect.Executable.getGenericExceptionTypes()
java.lang.reflect.Method.getGenericExceptionTypes()


Occurences of getGenericParameterTypes

getGenericParameterTypes occurences:
java.lang.reflect.Constructor.getGenericParameterTypes()
java.lang.reflect.Executable.getGenericParameterTypes()
java.lang.reflect.Method.getGenericParameterTypes()


Occurences of getGlassPane

getGlassPane occurences:
javax.swing.JApplet.getGlassPane()
javax.swing.JDialog.getGlassPane()
javax.swing.JFrame.getGlassPane()
javax.swing.JInternalFrame.getGlassPane()
javax.swing.JLayer.getGlassPane()
javax.swing.JRootPane.getGlassPane()
javax.swing.JWindow.getGlassPane()
javax.swing.RootPaneContainer.getGlassPane()


Occurences of getGlyphOutline

getGlyphOutline occurences:
java.awt.font.GlyphVector.getGlyphOutline(int)
java.awt.font.GlyphVector.getGlyphOutline(int, float, float)


Occurences of getGranularityPeriod

getGranularityPeriod occurences:
javax.management.monitor.Monitor.getGranularityPeriod()
javax.management.monitor.MonitorMBean.getGranularityPeriod()


Occurences of getGraphics

getGraphics occurences:
java.awt.Component.getGraphics()
java.awt.Image.getGraphics()
java.awt.image.BufferedImage.getGraphics()
java.awt.image.VolatileImage.getGraphics()
java.awt.PrintJob.getGraphics()
javax.swing.JApplet.getGraphics()
javax.swing.JComponent.getGraphics()
javax.swing.JDialog.getGraphics()
javax.swing.JFrame.getGraphics()
javax.swing.JWindow.getGraphics()
javax.swing.text.View.getGraphics()


Occurences of getGreatestMinimum

getGreatestMinimum occurences:
java.util.Calendar.getGreatestMinimum(int)
java.util.GregorianCalendar.getGreatestMinimum(int)


Occurences of getGreen

getGreen occurences:
java.awt.Color.getGreen()
java.awt.image.ColorModel.getGreen(int)
java.awt.image.ColorModel.getGreen(java.lang.Object)
java.awt.image.ComponentColorModel.getGreen(int)
java.awt.image.ComponentColorModel.getGreen(java.lang.Object)
java.awt.image.DirectColorModel.getGreen(int)
java.awt.image.DirectColorModel.getGreen(java.lang.Object)
java.awt.image.IndexColorModel.getGreen(int)


Occurences of getHandlerChain

getHandlerChain occurences:
javax.xml.ws.Binding.getHandlerChain()
javax.xml.ws.handler.HandlerResolver.getHandlerChain(javax.xml.ws.handler.PortInfo)


Occurences of getHandlerResolver

getHandlerResolver occurences:
javax.xml.ws.Service.getHandlerResolver()
javax.xml.ws.spi.ServiceDelegate.getHandlerResolver()


Occurences of getHandshakeSession

getHandshakeSession occurences:
javax.net.ssl.SSLEngine.getHandshakeSession()
javax.net.ssl.SSLSocket.getHandshakeSession()


Occurences of getHandshakeStatus

getHandshakeStatus occurences:
javax.net.ssl.SSLEngine.getHandshakeStatus()
javax.net.ssl.SSLEngineResult.getHandshakeStatus()


Occurences of getHead

getHead occurences:
java.util.logging.Formatter.getHead(java.util.logging.Handler)
java.util.logging.XMLFormatter.getHead(java.util.logging.Handler)


Occurences of getHeader

getHeader occurences:
javax.xml.soap.MimeHeaders.getHeader(java.lang.String)
javax.xml.soap.SOAPEnvelope.getHeader()


Occurences of getHeaderField

getHeaderField occurences:
java.net.HttpURLConnection.getHeaderField(int)
java.net.URLConnection.getHeaderField(int)
java.net.URLConnection.getHeaderField(java.lang.String)


Occurences of getHeaderFieldDate

getHeaderFieldDate occurences:
java.net.HttpURLConnection.getHeaderFieldDate(java.lang.String, long)
java.net.URLConnection.getHeaderFieldDate(java.lang.String, long)


Occurences of getHeaderFieldKey

getHeaderFieldKey occurences:
java.net.HttpURLConnection.getHeaderFieldKey(int)
java.net.URLConnection.getHeaderFieldKey(int)


Occurences of getHeaders

getHeaders occurences:
java.net.CacheResponse.getHeaders()
javax.xml.ws.handler.soap.SOAPHandler.getHeaders()
javax.xml.ws.handler.soap.SOAPMessageContext.getHeaders(javax.xml.namespace.QName, javax.xml.bind.JAXBContext, boolean)


Occurences of getHeight

getHeight occurences:
java.awt.Component.getHeight()
java.awt.Dimension.getHeight()
java.awt.DisplayMode.getHeight()
java.awt.font.LineMetrics.getHeight()
java.awt.FontMetrics.getHeight()
java.awt.geom.Arc2D.Double.getHeight()
java.awt.geom.Arc2D.Float.getHeight()
java.awt.geom.Dimension2D.getHeight()
java.awt.geom.Ellipse2D.Double.getHeight()
java.awt.geom.Ellipse2D.Float.getHeight()
java.awt.geom.Rectangle2D.Double.getHeight()
java.awt.geom.Rectangle2D.Float.getHeight()
java.awt.geom.RectangularShape.getHeight()
java.awt.geom.RoundRectangle2D.Double.getHeight()
java.awt.geom.RoundRectangle2D.Float.getHeight()
java.awt.Image.getHeight(java.awt.image.ImageObserver)
java.awt.image.BufferedImage.getHeight()
java.awt.image.BufferedImage.getHeight(java.awt.image.ImageObserver)
java.awt.image.Kernel.getHeight()
java.awt.image.PixelGrabber.getHeight()
java.awt.image.Raster.getHeight()
java.awt.image.renderable.RenderableImage.getHeight()
java.awt.image.renderable.RenderableImageOp.getHeight()
java.awt.image.RenderedImage.getHeight()
java.awt.image.SampleModel.getHeight()
java.awt.image.VolatileImage.getHeight()
java.awt.print.PageFormat.getHeight()
java.awt.print.Paper.getHeight()
java.awt.Rectangle.getHeight()
javax.imageio.ImageReader.getHeight(int)
javax.print.attribute.standard.MediaPrintableArea.getHeight(int)
javax.swing.JComponent.getHeight()
javax.swing.SpringLayout.Constraints.getHeight()
javax.swing.text.BoxView.getHeight()
javax.swing.text.GlyphView.GlyphPainter.getHeight(javax.swing.text.GlyphView)


Occurences of getHelpMenu

getHelpMenu occurences:
java.awt.MenuBar.getHelpMenu()
javax.swing.JMenuBar.getHelpMenu()


Occurences of getHgap

getHgap occurences:
java.awt.BorderLayout.getHgap()
java.awt.CardLayout.getHgap()
java.awt.FlowLayout.getHgap()
java.awt.GridLayout.getHgap()


Occurences of getHighlightColor

getHighlightColor occurences:
javax.swing.border.EtchedBorder.getHighlightColor()
javax.swing.border.EtchedBorder.getHighlightColor(java.awt.Component)
javax.swing.plaf.basic.BasicSliderUI.getHighlightColor()


Occurences of getHighlightedTextColor

getHighlightedTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getHighlightedTextColor()
javax.swing.plaf.metal.MetalTheme.getHighlightedTextColor()


Occurences of getHighlightInnerColor

getHighlightInnerColor occurences:
javax.swing.border.BevelBorder.getHighlightInnerColor()
javax.swing.border.BevelBorder.getHighlightInnerColor(java.awt.Component)


Occurences of getHighlightOuterColor

getHighlightOuterColor occurences:
javax.swing.border.BevelBorder.getHighlightOuterColor()
javax.swing.border.BevelBorder.getHighlightOuterColor(java.awt.Component)


Occurences of getHighlights

getHighlights occurences:
javax.swing.text.DefaultHighlighter.getHighlights()
javax.swing.text.Highlighter.getHighlights()


Occurences of getHighThreshold

getHighThreshold occurences:
javax.management.monitor.GaugeMonitor.getHighThreshold()
javax.management.monitor.GaugeMonitorMBean.getHighThreshold()


Occurences of getHoldability

getHoldability occurences:
java.sql.Connection.getHoldability()
java.sql.ResultSet.getHoldability()


Occurences of getHoldCount

getHoldCount occurences:
java.util.concurrent.locks.ReentrantLock.getHoldCount()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.getHoldCount()


Occurences of getHorizontalAlignment

getHorizontalAlignment occurences:
javax.swing.AbstractButton.getHorizontalAlignment()
javax.swing.JLabel.getHorizontalAlignment()
javax.swing.JTextField.getHorizontalAlignment()


Occurences of getHorizontalLegBuffer

getHorizontalLegBuffer occurences:
javax.swing.plaf.basic.BasicTreeUI.getHorizontalLegBuffer()
javax.swing.plaf.metal.MetalTreeUI.getHorizontalLegBuffer()


Occurences of getHorizontalScrollBar

getHorizontalScrollBar occurences:
javax.swing.JScrollPane.getHorizontalScrollBar()
javax.swing.ScrollPaneLayout.getHorizontalScrollBar()


Occurences of getHorizontalScrollBarPolicy

getHorizontalScrollBarPolicy occurences:
javax.swing.JScrollPane.getHorizontalScrollBarPolicy()
javax.swing.ScrollPaneLayout.getHorizontalScrollBarPolicy()


Occurences of getHorizontalTextPosition

getHorizontalTextPosition occurences:
javax.swing.AbstractButton.getHorizontalTextPosition()
javax.swing.JLabel.getHorizontalTextPosition()


Occurences of getHost

getHost occurences:
java.net.URI.getHost()
java.net.URL.getHost()
javax.management.remote.JMXServiceURL.getHost()


Occurences of getHostAddress

getHostAddress occurences:
java.net.Inet4Address.getHostAddress()
java.net.Inet6Address.getHostAddress()
java.net.InetAddress.getHostAddress()
java.net.URLStreamHandler.getHostAddress(java.net.URL)


Occurences of getHostName

getHostName occurences:
java.net.InetAddress.getHostName()
java.net.InetSocketAddress.getHostName()


Occurences of getHour

getHour occurences:
java.time.LocalDateTime.getHour()
java.time.LocalTime.getHour()
java.time.OffsetDateTime.getHour()
java.time.OffsetTime.getHour()
java.time.ZonedDateTime.getHour()
javax.xml.datatype.XMLGregorianCalendar.getHour()


Occurences of getHours

getHours occurences:
java.sql.Date.getHours()
java.util.Date.getHours()
javax.xml.datatype.Duration.getHours()


Occurences of getHumanPresentableName

getHumanPresentableName occurences:
java.awt.datatransfer.DataFlavor.getHumanPresentableName()
javax.activation.ActivationDataFlavor.getHumanPresentableName()


Occurences of getIcon

getIcon occurences:
java.beans.BeanInfo.getIcon(int)
java.beans.SimpleBeanInfo.getIcon(int)
javax.swing.AbstractButton.getIcon()
javax.swing.filechooser.FileView.getIcon(java.io.File)
javax.swing.JFileChooser.getIcon(java.io.File)
javax.swing.JLabel.getIcon()
javax.swing.JOptionPane.getIcon()
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.getIcon(java.io.File)
javax.swing.plaf.basic.BasicOptionPaneUI.getIcon()
javax.swing.plaf.synth.SynthButtonUI.getIcon(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthStyle.getIcon(javax.swing.plaf.synth.SynthContext, java.lang.Object)
javax.swing.text.StyleConstants.getIcon(javax.swing.text.AttributeSet)
javax.swing.UIDefaults.getIcon(java.lang.Object)
javax.swing.UIDefaults.getIcon(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getIcon(java.lang.Object)
javax.swing.UIManager.getIcon(java.lang.Object, java.util.Locale)


Occurences of getIconHeight

getIconHeight occurences:
javax.swing.Icon.getIconHeight()
javax.swing.ImageIcon.getIconHeight()
javax.swing.plaf.IconUIResource.getIconHeight()
javax.swing.plaf.metal.MetalCheckBoxIcon.getIconHeight()
javax.swing.plaf.metal.MetalComboBoxIcon.getIconHeight()
javax.swing.plaf.metal.MetalIconFactory.FileIcon16.getIconHeight()
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.getIconHeight()
javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.getIconHeight()
javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon.getIconHeight()


Occurences of getIconTextGap

getIconTextGap occurences:
javax.swing.AbstractButton.getIconTextGap()
javax.swing.JLabel.getIconTextGap()


Occurences of getIconWidth

getIconWidth occurences:
javax.swing.Icon.getIconWidth()
javax.swing.ImageIcon.getIconWidth()
javax.swing.plaf.IconUIResource.getIconWidth()
javax.swing.plaf.metal.MetalCheckBoxIcon.getIconWidth()
javax.swing.plaf.metal.MetalComboBoxIcon.getIconWidth()
javax.swing.plaf.metal.MetalIconFactory.FileIcon16.getIconWidth()
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.getIconWidth()
javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.getIconWidth()
javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon.getIconWidth()


Occurences of getId

getId occurences:
java.lang.Thread.getId()
java.security.cert.Extension.getId()
java.time.chrono.Chronology.getId()
java.time.chrono.HijrahChronology.getId()
java.time.chrono.IsoChronology.getId()
java.time.chrono.JapaneseChronology.getId()
java.time.chrono.MinguoChronology.getId()
java.time.chrono.ThaiBuddhistChronology.getId()
java.time.ZoneId.getId()
java.time.ZoneOffset.getId()
javax.net.ssl.SSLSession.getId()
javax.xml.crypto.dsig.keyinfo.KeyInfo.getId()
javax.xml.crypto.dsig.Manifest.getId()
javax.xml.crypto.dsig.Reference.getId()
javax.xml.crypto.dsig.SignatureProperties.getId()
javax.xml.crypto.dsig.SignatureProperty.getId()
javax.xml.crypto.dsig.SignedInfo.getId()
javax.xml.crypto.dsig.XMLObject.getId()
javax.xml.crypto.dsig.XMLSignature.getId()
javax.xml.crypto.dsig.XMLSignature.SignatureValue.getId()
javax.xml.datatype.DatatypeConstants.Field.getId()
org.omg.CORBA.portable.ApplicationException.getId()


Occurences of getID

getID occurences:
java.awt.AWTEvent.getID()
java.rmi.activation.Activatable.getID()
java.util.TimeZone.getID()
javax.naming.directory.Attribute.getID()
javax.naming.directory.BasicAttribute.getID()
javax.naming.ldap.BasicControl.getID()
javax.naming.ldap.Control.getID()
javax.naming.ldap.ExtendedRequest.getID()
javax.naming.ldap.ExtendedResponse.getID()
javax.naming.ldap.StartTlsRequest.getID()
javax.naming.ldap.StartTlsResponse.getID()
javax.swing.LookAndFeel.getID()
javax.swing.plaf.metal.MetalLookAndFeel.getID()
javax.swing.plaf.multi.MultiLookAndFeel.getID()
javax.swing.plaf.nimbus.NimbusLookAndFeel.getID()
javax.swing.plaf.synth.ColorType.getID()
javax.swing.plaf.synth.SynthLookAndFeel.getID()
javax.xml.ws.RespectBindingFeature.getID()
javax.xml.ws.soap.AddressingFeature.getID()
javax.xml.ws.soap.MTOMFeature.getID()
javax.xml.ws.WebServiceFeature.getID()


Occurences of getIdentifier

getIdentifier occurences:
com.sun.source.tree.MemberSelectTree.getIdentifier()
com.sun.source.tree.NewClassTree.getIdentifier()
javax.swing.DefaultRowSorter.ModelWrapper.getIdentifier(int)
javax.swing.RowFilter.Entry.getIdentifier()
javax.swing.table.TableColumn.getIdentifier()


Occurences of getIdentity

getIdentity occurences:
java.security.IdentityScope.getIdentity(java.lang.String)
java.security.IdentityScope.getIdentity(java.security.Principal)
java.security.IdentityScope.getIdentity(java.security.PublicKey)


Occurences of getIDs

getIDs occurences:
javax.naming.directory.Attributes.getIDs()
javax.naming.directory.BasicAttributes.getIDs()


Occurences of getImage

getImage occurences:
java.applet.Applet.getImage(java.net.URL)
java.applet.Applet.getImage(java.net.URL, java.lang.String)
java.applet.AppletContext.getImage(java.net.URL)
java.awt.TexturePaint.getImage()
java.awt.Toolkit.getImage(java.lang.String)
java.awt.Toolkit.getImage(java.net.URL)
java.awt.TrayIcon.getImage()
javax.swing.ImageIcon.getImage()
javax.swing.text.html.ImageView.getImage()


Occurences of getImageableHeight

getImageableHeight occurences:
java.awt.print.PageFormat.getImageableHeight()
java.awt.print.Paper.getImageableHeight()


Occurences of getImageableWidth

getImageableWidth occurences:
java.awt.print.PageFormat.getImageableWidth()
java.awt.print.Paper.getImageableWidth()


Occurences of getImageableX

getImageableX occurences:
java.awt.print.PageFormat.getImageableX()
java.awt.print.Paper.getImageableX()


Occurences of getImageableY

getImageableY occurences:
java.awt.print.PageFormat.getImageableY()
java.awt.print.Paper.getImageableY()


Occurences of getImageMetadata

getImageMetadata occurences:
javax.imageio.ImageReader.getImageMetadata(int)
javax.imageio.ImageReader.getImageMetadata(int, java.lang.String, java.util.Set)


Occurences of getImageURL

getImageURL occurences:
java.awt.SplashScreen.getImageURL()
javax.swing.text.html.ImageView.getImageURL()


Occurences of getImpact

getImpact occurences:
javax.management.MBeanOperationInfo.getImpact()
javax.management.openmbean.OpenMBeanOperationInfo.getImpact()
javax.management.StandardMBean.getImpact(javax.management.MBeanOperationInfo)


Occurences of getImplementation

getImplementation occurences:
javax.management.StandardMBean.getImplementation()
org.w3c.dom.Document.getImplementation()


Occurences of getImplementationName

getImplementationName occurences:
javax.management.MBeanServerDelegate.getImplementationName()
javax.management.MBeanServerDelegateMBean.getImplementationName()


Occurences of getImplementationVendor

getImplementationVendor occurences:
java.lang.Package.getImplementationVendor()
javax.management.MBeanServerDelegate.getImplementationVendor()
javax.management.MBeanServerDelegateMBean.getImplementationVendor()


Occurences of getImplementationVersion

getImplementationVersion occurences:
java.lang.Package.getImplementationVersion()
javax.management.MBeanServerDelegate.getImplementationVersion()
javax.management.MBeanServerDelegateMBean.getImplementationVersion()


Occurences of getImplicitDownCycleTraversal

getImplicitDownCycleTraversal occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getImplicitDownCycleTraversal()
javax.swing.SortingFocusTraversalPolicy.getImplicitDownCycleTraversal()


Occurences of getInactiveControlTextColor

getInactiveControlTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getInactiveControlTextColor()
javax.swing.plaf.metal.MetalTheme.getInactiveControlTextColor()
javax.swing.plaf.metal.OceanTheme.getInactiveControlTextColor()


Occurences of getInactiveSystemTextColor

getInactiveSystemTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getInactiveSystemTextColor()
javax.swing.plaf.metal.MetalTheme.getInactiveSystemTextColor()


Occurences of getIndex

getIndex occurences:
com.sun.source.tree.ArrayAccessTree.getIndex()
java.beans.IndexedPropertyChangeEvent.getIndex()
java.net.NetworkInterface.getIndex()
java.net.URISyntaxException.getIndex()
java.nio.file.InvalidPathException.getIndex()
java.security.cert.CertPathValidatorException.getIndex()
java.sql.DataTruncation.getIndex()
java.text.CharacterIterator.getIndex()
java.text.ParsePosition.getIndex()
java.text.StringCharacterIterator.getIndex()
java.util.regex.PatternSyntaxException.getIndex()
javax.swing.event.DocumentEvent.ElementChange.getIndex()
javax.swing.JList.DropLocation.getIndex()
javax.swing.SizeSequence.getIndex(int)
javax.swing.text.AbstractDocument.AbstractElement.getIndex(javax.swing.tree.TreeNode)
javax.swing.text.AbstractDocument.ElementEdit.getIndex()
javax.swing.text.html.parser.Element.getIndex()
javax.swing.text.JTextComponent.DropLocation.getIndex()
javax.swing.text.Segment.getIndex()
javax.swing.tree.DefaultMutableTreeNode.getIndex(javax.swing.tree.TreeNode)
javax.swing.tree.TreeNode.getIndex(javax.swing.tree.TreeNode)
org.xml.sax.Attributes.getIndex(java.lang.String)
org.xml.sax.Attributes.getIndex(java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributesImpl.getIndex(java.lang.String)
org.xml.sax.helpers.AttributesImpl.getIndex(java.lang.String, java.lang.String)


Occurences of getIndexAtPoint

getIndexAtPoint occurences:
java.awt.TextComponent.AccessibleAWTTextComponent.getIndexAtPoint(java.awt.Point)
javax.accessibility.AccessibleText.getIndexAtPoint(java.awt.Point)
javax.swing.AbstractButton.AccessibleAbstractButton.getIndexAtPoint(java.awt.Point)
javax.swing.JLabel.AccessibleJLabel.getIndexAtPoint(java.awt.Point)
javax.swing.JSpinner.AccessibleJSpinner.getIndexAtPoint(java.awt.Point)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getIndexAtPoint(java.awt.Point)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getIndexAtPoint(java.awt.Point)


Occurences of getIndexOf

getIndexOf occurences:
javax.swing.DefaultComboBoxModel.getIndexOf(java.lang.Object)
javax.swing.JLayeredPane.getIndexOf(java.awt.Component)


Occurences of getIndexOfChild

getIndexOfChild occurences:
javax.swing.tree.DefaultTreeModel.getIndexOfChild(java.lang.Object, java.lang.Object)
javax.swing.tree.TreeModel.getIndexOfChild(java.lang.Object, java.lang.Object)


Occurences of getInetAddress

getInetAddress occurences:
java.net.DatagramSocket.getInetAddress()
java.net.ServerSocket.getInetAddress()
java.net.Socket.getInetAddress()
java.net.SocketImpl.getInetAddress()


Occurences of getInfo

getInfo occurences:
java.security.Identity.getInfo()
java.security.Provider.getInfo()


Occurences of getInitialComponent

getInitialComponent occurences:
java.awt.FocusTraversalPolicy.getInitialComponent(java.awt.Window)
javax.swing.InternalFrameFocusTraversalPolicy.getInitialComponent(javax.swing.JInternalFrame)


Occurences of getInitialContext

getInitialContext occurences:
javax.naming.spi.InitialContextFactory.getInitialContext(java.util.Hashtable)
javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable)


Occurences of getInitialDelay

getInitialDelay occurences:
javax.swing.Timer.getInitialDelay()
javax.swing.ToolTipManager.getInitialDelay()


Occurences of getInitializer

getInitializer occurences:
com.sun.source.tree.ForLoopTree.getInitializer()
com.sun.source.tree.VariableTree.getInitializer()


Occurences of getInitThreshold

getInitThreshold occurences:
javax.management.monitor.CounterMonitor.getInitThreshold()
javax.management.monitor.CounterMonitorMBean.getInitThreshold()


Occurences of getInput

getInput occurences:
java.net.URISyntaxException.getInput()
java.nio.file.InvalidPathException.getInput()
javax.imageio.ImageReader.getInput()
org.w3c.dom.ls.LSLoadEvent.getInput()
org.w3c.dom.ls.LSProgressEvent.getInput()


Occurences of getInputAttributes

getInputAttributes occurences:
javax.swing.JTextPane.getInputAttributes()
javax.swing.text.html.HTMLEditorKit.getInputAttributes()
javax.swing.text.StyledEditorKit.getInputAttributes()


Occurences of getInputContext

getInputContext occurences:
java.awt.Component.getInputContext()
java.awt.Window.getInputContext()


Occurences of getInputEncoding

getInputEncoding occurences:
org.w3c.dom.Document.getInputEncoding()
org.w3c.dom.Entity.getInputEncoding()


Occurences of getInputLength

getInputLength occurences:
java.nio.charset.MalformedInputException.getInputLength()
java.nio.charset.UnmappableCharacterException.getInputLength()


Occurences of getInputMap

getInputMap occurences:
javax.swing.JComponent.getInputMap()
javax.swing.JComponent.getInputMap(int)


Occurences of getInputMethodRequests

getInputMethodRequests occurences:
java.awt.Component.getInputMethodRequests()
java.awt.TextComponent.getInputMethodRequests()
javax.swing.text.JTextComponent.getInputMethodRequests()


Occurences of getInputStream

getInputStream occurences:
java.lang.Process.getInputStream()
java.net.Socket.getInputStream()
java.net.SocketImpl.getInputStream()
java.net.URLConnection.getInputStream()
java.rmi.server.RemoteCall.getInputStream()
java.util.jar.JarFile.getInputStream(java.util.zip.ZipEntry)
java.util.zip.ZipFile.getInputStream(java.util.zip.ZipEntry)
javax.activation.DataHandler.getInputStream()
javax.activation.DataSource.getInputStream()
javax.activation.FileDataSource.getInputStream()
javax.activation.URLDataSource.getInputStream()
javax.xml.transform.stream.StreamSource.getInputStream()
org.omg.CORBA.portable.ApplicationException.getInputStream()


Occurences of getInsets

getInsets occurences:
java.awt.Container.getInsets()
javax.swing.JComponent.getInsets()
javax.swing.JComponent.getInsets(java.awt.Insets)
javax.swing.JViewport.getInsets()
javax.swing.JViewport.getInsets(java.awt.Insets)
javax.swing.plaf.basic.BasicComboBoxUI.getInsets()
javax.swing.plaf.basic.BasicDesktopIconUI.getInsets(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneDivider.getInsets()
javax.swing.plaf.basic.BasicSplitPaneUI.getInsets(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.getInsets()
javax.swing.plaf.nimbus.NimbusStyle.getInsets(javax.swing.plaf.synth.SynthContext, java.awt.Insets)
javax.swing.plaf.synth.SynthStyle.getInsets(javax.swing.plaf.synth.SynthContext, java.awt.Insets)
javax.swing.UIDefaults.getInsets(java.lang.Object)
javax.swing.UIDefaults.getInsets(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getInsets(java.lang.Object)
javax.swing.UIManager.getInsets(java.lang.Object, java.util.Locale)


Occurences of getInstance

getInstance occurences:
java.awt.AlphaComposite.getInstance(int)
java.awt.AlphaComposite.getInstance(int, float)
java.awt.color.ColorSpace.getInstance(int)
java.awt.color.ICC_Profile.getInstance(byte:A)
java.awt.color.ICC_Profile.getInstance(int)
java.awt.color.ICC_Profile.getInstance(java.io.InputStream)
java.awt.color.ICC_Profile.getInstance(java.lang.String)
java.awt.im.InputContext.getInstance()
java.security.AlgorithmParameterGenerator.getInstance(java.lang.String)
java.security.AlgorithmParameterGenerator.getInstance(java.lang.String, java.lang.String)
java.security.AlgorithmParameterGenerator.getInstance(java.lang.String, java.security.Provider)
java.security.AlgorithmParameters.getInstance(java.lang.String)
java.security.AlgorithmParameters.getInstance(java.lang.String, java.lang.String)
java.security.AlgorithmParameters.getInstance(java.lang.String, java.security.Provider)
java.security.cert.CertificateFactory.getInstance(java.lang.String)
java.security.cert.CertificateFactory.getInstance(java.lang.String, java.lang.String)
java.security.cert.CertificateFactory.getInstance(java.lang.String, java.security.Provider)
java.security.cert.CertPathBuilder.getInstance(java.lang.String)
java.security.cert.CertPathBuilder.getInstance(java.lang.String, java.lang.String)
java.security.cert.CertPathBuilder.getInstance(java.lang.String, java.security.Provider)
java.security.cert.CertPathValidator.getInstance(java.lang.String)
java.security.cert.CertPathValidator.getInstance(java.lang.String, java.lang.String)
java.security.cert.CertPathValidator.getInstance(java.lang.String, java.security.Provider)
java.security.cert.CertStore.getInstance(java.lang.String, java.security.cert.CertStoreParameters)
java.security.cert.CertStore.getInstance(java.lang.String, java.security.cert.CertStoreParameters, java.lang.String)
java.security.cert.CertStore.getInstance(java.lang.String, java.security.cert.CertStoreParameters, java.security.Provider)
java.security.KeyFactory.getInstance(java.lang.String)
java.security.KeyFactory.getInstance(java.lang.String, java.lang.String)
java.security.KeyFactory.getInstance(java.lang.String, java.security.Provider)
java.security.KeyPairGenerator.getInstance(java.lang.String)
java.security.KeyPairGenerator.getInstance(java.lang.String, java.lang.String)
java.security.KeyPairGenerator.getInstance(java.lang.String, java.security.Provider)
java.security.KeyStore.getInstance(java.lang.String)
java.security.KeyStore.getInstance(java.lang.String, java.lang.String)
java.security.KeyStore.getInstance(java.lang.String, java.security.Provider)
java.security.MessageDigest.getInstance(java.lang.String)
java.security.MessageDigest.getInstance(java.lang.String, java.lang.String)
java.security.MessageDigest.getInstance(java.lang.String, java.security.Provider)
java.security.Policy.getInstance(java.lang.String, java.security.Policy.Parameters)
java.security.Policy.getInstance(java.lang.String, java.security.Policy.Parameters, java.lang.String)
java.security.Policy.getInstance(java.lang.String, java.security.Policy.Parameters, java.security.Provider)
java.security.SecureRandom.getInstance(java.lang.String)
java.security.SecureRandom.getInstance(java.lang.String, java.lang.String)
java.security.SecureRandom.getInstance(java.lang.String, java.security.Provider)
java.security.Signature.getInstance(java.lang.String)
java.security.Signature.getInstance(java.lang.String, java.lang.String)
java.security.Signature.getInstance(java.lang.String, java.security.Provider)
java.text.Collator.getInstance()
java.text.Collator.getInstance(java.util.Locale)
java.text.DateFormat.getInstance()
java.text.DateFormatSymbols.getInstance()
java.text.DateFormatSymbols.getInstance(java.util.Locale)
java.text.DecimalFormatSymbols.getInstance()
java.text.DecimalFormatSymbols.getInstance(java.util.Locale)
java.text.NumberFormat.getInstance()
java.text.NumberFormat.getInstance(java.util.Locale)
java.text.spi.CollatorProvider.getInstance(java.util.Locale)
java.text.spi.DateFormatSymbolsProvider.getInstance(java.util.Locale)
java.text.spi.DecimalFormatSymbolsProvider.getInstance(java.util.Locale)
java.util.Calendar.getInstance()
java.util.Calendar.getInstance(java.util.Locale)
java.util.Calendar.getInstance(java.util.TimeZone)
java.util.Calendar.getInstance(java.util.TimeZone, java.util.Locale)
java.util.Currency.getInstance(java.lang.String)
java.util.Currency.getInstance(java.util.Locale)
javax.crypto.Cipher.getInstance(java.lang.String)
javax.crypto.Cipher.getInstance(java.lang.String, java.lang.String)
javax.crypto.Cipher.getInstance(java.lang.String, java.security.Provider)
javax.crypto.ExemptionMechanism.getInstance(java.lang.String)
javax.crypto.ExemptionMechanism.getInstance(java.lang.String, java.lang.String)
javax.crypto.ExemptionMechanism.getInstance(java.lang.String, java.security.Provider)
javax.crypto.KeyAgreement.getInstance(java.lang.String)
javax.crypto.KeyAgreement.getInstance(java.lang.String, java.lang.String)
javax.crypto.KeyAgreement.getInstance(java.lang.String, java.security.Provider)
javax.crypto.KeyGenerator.getInstance(java.lang.String)
javax.crypto.KeyGenerator.getInstance(java.lang.String, java.lang.String)
javax.crypto.KeyGenerator.getInstance(java.lang.String, java.security.Provider)
javax.crypto.Mac.getInstance(java.lang.String)
javax.crypto.Mac.getInstance(java.lang.String, java.lang.String)
javax.crypto.Mac.getInstance(java.lang.String, java.security.Provider)
javax.crypto.SecretKeyFactory.getInstance(java.lang.String)
javax.crypto.SecretKeyFactory.getInstance(java.lang.String, java.lang.String)
javax.crypto.SecretKeyFactory.getInstance(java.lang.String, java.security.Provider)
javax.management.ObjectName.getInstance(java.lang.String)
javax.management.ObjectName.getInstance(java.lang.String, java.lang.String, java.lang.String)
javax.management.ObjectName.getInstance(java.lang.String, java.util.Hashtable)
javax.management.ObjectName.getInstance(javax.management.ObjectName)
javax.net.ssl.KeyManagerFactory.getInstance(java.lang.String)
javax.net.ssl.KeyManagerFactory.getInstance(java.lang.String, java.lang.String)
javax.net.ssl.KeyManagerFactory.getInstance(java.lang.String, java.security.Provider)
javax.net.ssl.SSLContext.getInstance(java.lang.String)
javax.net.ssl.SSLContext.getInstance(java.lang.String, java.lang.String)
javax.net.ssl.SSLContext.getInstance(java.lang.String, java.security.Provider)
javax.net.ssl.TrustManagerFactory.getInstance(java.lang.String)
javax.net.ssl.TrustManagerFactory.getInstance(java.lang.String, java.lang.String)
javax.net.ssl.TrustManagerFactory.getInstance(java.lang.String, java.security.Provider)
javax.security.auth.kerberos.KeyTab.getInstance()
javax.security.auth.kerberos.KeyTab.getInstance(java.io.File)
javax.security.auth.kerberos.KeyTab.getInstance(javax.security.auth.kerberos.KerberosPrincipal)
javax.security.auth.kerberos.KeyTab.getInstance(javax.security.auth.kerberos.KerberosPrincipal, java.io.File)
javax.security.auth.login.Configuration.getInstance(java.lang.String, javax.security.auth.login.Configuration.Parameters)
javax.security.auth.login.Configuration.getInstance(java.lang.String, javax.security.auth.login.Configuration.Parameters, java.lang.String)
javax.security.auth.login.Configuration.getInstance(java.lang.String, javax.security.auth.login.Configuration.Parameters, java.security.Provider)
javax.security.cert.X509Certificate.getInstance(byte:A)
javax.security.cert.X509Certificate.getInstance(java.io.InputStream)
javax.sql.rowset.spi.SyncFactory.getInstance(java.lang.String)
javax.swing.LayoutStyle.getInstance()
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getInstance()
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getInstance(java.lang.String)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getInstance(java.lang.String, java.lang.String)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getInstance(java.lang.String, java.security.Provider)
javax.xml.crypto.dsig.TransformService.getInstance(java.lang.String, java.lang.String)
javax.xml.crypto.dsig.TransformService.getInstance(java.lang.String, java.lang.String, java.lang.String)
javax.xml.crypto.dsig.TransformService.getInstance(java.lang.String, java.lang.String, java.security.Provider)
javax.xml.crypto.dsig.XMLSignatureFactory.getInstance()
javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(java.lang.String)
javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(java.lang.String, java.lang.String)
javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(java.lang.String, java.security.Provider)
org.ietf.jgss.GSSManager.getInstance()


Occurences of getInt

getInt occurences:
java.lang.reflect.Array.getInt(java.lang.Object, int)
java.lang.reflect.Field.getInt(java.lang.Object)
java.nio.ByteBuffer.getInt()
java.nio.ByteBuffer.getInt(int)
java.sql.CallableStatement.getInt(int)
java.sql.CallableStatement.getInt(java.lang.String)
java.sql.ResultSet.getInt(int)
java.sql.ResultSet.getInt(java.lang.String)
java.util.prefs.AbstractPreferences.getInt(java.lang.String, int)
java.util.prefs.Preferences.getInt(java.lang.String, int)
javax.swing.plaf.synth.SynthStyle.getInt(javax.swing.plaf.synth.SynthContext, java.lang.Object, int)
javax.swing.UIDefaults.getInt(java.lang.Object)
javax.swing.UIDefaults.getInt(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getInt(java.lang.Object)
javax.swing.UIManager.getInt(java.lang.Object, java.util.Locale)


Occurences of getInteger

getInteger occurences:
java.lang.Integer.getInteger(java.lang.String)
java.lang.Integer.getInteger(java.lang.String, int)
java.lang.Integer.getInteger(java.lang.String, java.lang.Integer)


Occurences of getIntegerInstance

getIntegerInstance occurences:
java.text.NumberFormat.getIntegerInstance()
java.text.NumberFormat.getIntegerInstance(java.util.Locale)
java.text.spi.NumberFormatProvider.getIntegerInstance(java.util.Locale)


Occurences of getInterface

getInterface occurences:
java.net.MulticastSocket.getInterface()
javax.script.Invocable.getInterface(java.lang.Class)
javax.script.Invocable.getInterface(java.lang.Object, java.lang.Class)


Occurences of getInterfaces

getInterfaces occurences:
java.lang.Class.getInterfaces()
javax.lang.model.element.TypeElement.getInterfaces()


Occurences of getInteriorRectangle

getInteriorRectangle occurences:
javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int)
javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int)


Occurences of getInternalFrame

getInternalFrame occurences:
javax.swing.event.InternalFrameEvent.getInternalFrame()
javax.swing.JInternalFrame.JDesktopIcon.getInternalFrame()


Occurences of getIssuerDN

getIssuerDN occurences:
java.security.cert.X509Certificate.getIssuerDN()
java.security.cert.X509CRL.getIssuerDN()
javax.security.cert.X509Certificate.getIssuerDN()


Occurences of getIssuerX500Principal

getIssuerX500Principal occurences:
java.security.cert.X509Certificate.getIssuerX500Principal()
java.security.cert.X509CRL.getIssuerX500Principal()


Occurences of getItem

getItem occurences:
java.awt.Choice.getItem(int)
java.awt.event.ItemEvent.getItem()
java.awt.List.getItem(int)
java.awt.Menu.getItem(int)
javax.swing.ComboBoxEditor.getItem()
javax.swing.JMenu.getItem(int)
javax.swing.plaf.basic.BasicComboBoxEditor.getItem()


Occurences of getItemCount

getItemCount occurences:
java.awt.Choice.getItemCount()
java.awt.List.getItemCount()
java.awt.Menu.getItemCount()
javax.swing.JComboBox.getItemCount()
javax.swing.JMenu.getItemCount()


Occurences of getItemListeners

getItemListeners occurences:
java.awt.Checkbox.getItemListeners()
java.awt.CheckboxMenuItem.getItemListeners()
java.awt.Choice.getItemListeners()
java.awt.List.getItemListeners()
javax.swing.AbstractButton.getItemListeners()
javax.swing.DefaultButtonModel.getItemListeners()
javax.swing.JComboBox.getItemListeners()


Occurences of getIterationCount

getIterationCount occurences:
javax.crypto.interfaces.PBEKey.getIterationCount()
javax.crypto.spec.PBEKeySpec.getIterationCount()
javax.crypto.spec.PBEParameterSpec.getIterationCount()


Occurences of getIterator

getIterator occurences:
java.text.AttributedString.getIterator()
java.text.AttributedString.getIterator(java.text.AttributedCharacterIterator.Attribute:A)
java.text.AttributedString.getIterator(java.text.AttributedCharacterIterator.Attribute:A, int, int)
javax.swing.text.html.HTMLDocument.getIterator(javax.swing.text.html.HTML.Tag)


Occurences of getIV

getIV occurences:
javax.crypto.Cipher.getIV()
javax.crypto.spec.GCMParameterSpec.getIV()
javax.crypto.spec.IvParameterSpec.getIV()
javax.crypto.spec.RC2ParameterSpec.getIV()
javax.crypto.spec.RC5ParameterSpec.getIV()


Occurences of getJarEntry

getJarEntry occurences:
java.net.JarURLConnection.getJarEntry()
java.util.jar.JarFile.getJarEntry(java.lang.String)


Occurences of getJavaFileForInput

getJavaFileForInput occurences:
javax.tools.ForwardingJavaFileManager.getJavaFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind)
javax.tools.JavaFileManager.getJavaFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind)


Occurences of getJavaFileForOutput

getJavaFileForOutput occurences:
javax.tools.ForwardingJavaFileManager.getJavaFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind, javax.tools.FileObject)
javax.tools.JavaFileManager.getJavaFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind, javax.tools.FileObject)


Occurences of getJavaFileObjects

getJavaFileObjects occurences:
javax.tools.StandardJavaFileManager.getJavaFileObjects(java.io.File...)
javax.tools.StandardJavaFileManager.getJavaFileObjects(java.lang.String...)


Occurences of getJavaInitializationString

getJavaInitializationString occurences:
java.beans.PropertyEditor.getJavaInitializationString()
java.beans.PropertyEditorSupport.getJavaInitializationString()


Occurences of getJAXBNode

getJAXBNode occurences:
javax.xml.bind.Binder.getJAXBNode(java.lang.Object)
javax.xml.bind.Binder.getJAXBNode(XmlNode)


Occurences of getJMenuBar

getJMenuBar occurences:
javax.swing.JApplet.getJMenuBar()
javax.swing.JDialog.getJMenuBar()
javax.swing.JFrame.getJMenuBar()
javax.swing.JInternalFrame.getJMenuBar()
javax.swing.JRootPane.getJMenuBar()


Occurences of getKey

getKey occurences:
java.awt.MenuShortcut.getKey()
java.security.KeyStore.getKey(java.lang.String, char:A)
java.util.AbstractMap.SimpleEntry.getKey()
java.util.AbstractMap.SimpleImmutableEntry.getKey()
java.util.Map.Entry.getKey()
java.util.MissingResourceException.getKey()
java.util.prefs.PreferenceChangeEvent.getKey()
javax.accessibility.AccessibleRelation.getKey()
javax.crypto.spec.DESedeKeySpec.getKey()
javax.crypto.spec.DESKeySpec.getKey()
javax.xml.crypto.KeySelectorResult.getKey()


Occurences of getKeyChar

getKeyChar occurences:
java.awt.AWTKeyStroke.getKeyChar()
java.awt.event.KeyEvent.getKeyChar()


Occurences of getKeyCode

getKeyCode occurences:
java.awt.AWTKeyStroke.getKeyCode()
java.awt.event.KeyEvent.getKeyCode()


Occurences of getKeyListener

getKeyListener occurences:
javax.swing.plaf.basic.BasicComboPopup.getKeyListener()
javax.swing.plaf.basic.ComboPopup.getKeyListener()


Occurences of getKeymap

getKeymap occurences:
javax.swing.text.JTextComponent.getKeymap()
javax.swing.text.JTextComponent.getKeymap(java.lang.String)


Occurences of getKeys

getKeys occurences:
java.util.ListResourceBundle.getKeys()
java.util.PropertyResourceBundle.getKeys()
java.util.ResourceBundle.getKeys()
javax.security.auth.kerberos.KeyTab.getKeys(javax.security.auth.kerberos.KerberosPrincipal)
javax.swing.AbstractAction.getKeys()


Occurences of getKeySelector

getKeySelector occurences:
javax.xml.crypto.dom.DOMCryptoContext.getKeySelector()
javax.xml.crypto.XMLCryptoContext.getKeySelector()


Occurences of getKeySpec

getKeySpec occurences:
java.security.KeyFactory.getKeySpec(java.security.Key, java.lang.Class)
javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(java.security.Key)
javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(java.security.Key, java.lang.String)
javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(java.security.Key, java.security.Provider)
javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(javax.crypto.Cipher)
javax.crypto.SecretKeyFactory.getKeySpec(javax.crypto.SecretKey, java.lang.Class)


Occurences of getKeyStroke

getKeyStroke occurences:
javax.swing.KeyStroke.getKeyStroke(char)
javax.swing.KeyStroke.getKeyStroke(char, boolean)
javax.swing.KeyStroke.getKeyStroke(int, int)
javax.swing.KeyStroke.getKeyStroke(int, int, boolean)
javax.swing.KeyStroke.getKeyStroke(java.lang.Character, int)
javax.swing.KeyStroke.getKeyStroke(java.lang.String)


Occurences of getKeyUsage

getKeyUsage occurences:
java.security.cert.X509Certificate.getKeyUsage()
java.security.cert.X509CertSelector.getKeyUsage()


Occurences of getKind

getKind occurences:
com.sun.source.doctree.DocTree.getKind()
com.sun.source.tree.Tree.getKind()
com.sun.source.util.TaskEvent.getKind()
javax.lang.model.element.Element.getKind()
javax.lang.model.type.TypeMirror.getKind()
javax.tools.Diagnostic.getKind()
javax.tools.ForwardingJavaFileObject.getKind()
javax.tools.JavaFileObject.getKind()
javax.tools.SimpleJavaFileObject.getKind()


Occurences of getLabel

getLabel occurences:
com.sun.source.doctree.LinkTree.getLabel()
com.sun.source.tree.BreakTree.getLabel()
com.sun.source.tree.ContinueTree.getLabel()
com.sun.source.tree.LabeledStatementTree.getLabel()
java.awt.Button.getLabel()
java.awt.Checkbox.getLabel()
java.awt.MenuItem.getLabel()
javax.swing.AbstractButton.getLabel()
javax.swing.JPopupMenu.getLabel()
javax.swing.text.html.Option.getLabel()


Occurences of getLast

getLast occurences:
java.util.ArrayDeque.getLast()
java.util.concurrent.ConcurrentLinkedDeque.getLast()
java.util.concurrent.LinkedBlockingDeque.getLast()
java.util.Deque.getLast()
java.util.LinkedList.getLast()


Occurences of getLastChild

getLastChild occurences:
javax.imageio.metadata.IIOMetadataNode.getLastChild()
javax.swing.tree.DefaultMutableTreeNode.getLastChild()
org.w3c.dom.Node.getLastChild()


Occurences of getLastColumn

getLastColumn occurences:
javax.accessibility.AccessibleTableModelChange.getLastColumn()
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.getLastColumn()


Occurences of getLastComponent

getLastComponent occurences:
java.awt.ContainerOrderFocusTraversalPolicy.getLastComponent(java.awt.Container)
java.awt.FocusTraversalPolicy.getLastComponent(java.awt.Container)
javax.swing.DefaultFocusManager.getLastComponent(java.awt.Container)
javax.swing.LayoutFocusTraversalPolicy.getLastComponent(java.awt.Container)
javax.swing.SortingFocusTraversalPolicy.getLastComponent(java.awt.Container)


Occurences of getLastModified

getLastModified occurences:
java.net.URLConnection.getLastModified()
javax.tools.FileObject.getLastModified()
javax.tools.ForwardingFileObject.getLastModified()
javax.tools.SimpleJavaFileObject.getLastModified()


Occurences of getLastModifiedTime

getLastModifiedTime occurences:
java.nio.file.Files.getLastModifiedTime(java.nio.file.Path, java.nio.file.LinkOption...)
java.util.zip.ZipEntry.getLastModifiedTime()


Occurences of getLastRow

getLastRow occurences:
javax.accessibility.AccessibleTableModelChange.getLastRow()
javax.swing.event.TableModelEvent.getLastRow()
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.getLastRow()


Occurences of getLayer

getLayer occurences:
javax.swing.JInternalFrame.getLayer()
javax.swing.JLayeredPane.getLayer(java.awt.Component)
javax.swing.JLayeredPane.getLayer(javax.swing.JComponent)


Occurences of getLayeredPane

getLayeredPane occurences:
javax.swing.JApplet.getLayeredPane()
javax.swing.JDialog.getLayeredPane()
javax.swing.JFrame.getLayeredPane()
javax.swing.JInternalFrame.getLayeredPane()
javax.swing.JRootPane.getLayeredPane()
javax.swing.JWindow.getLayeredPane()
javax.swing.RootPaneContainer.getLayeredPane()


Occurences of getLayout

getLayout occurences:
java.awt.Container.getLayout()
java.awt.font.TextMeasurer.getLayout(int, int)


Occurences of getLayoutAlignmentX

getLayoutAlignmentX occurences:
java.awt.BorderLayout.getLayoutAlignmentX(java.awt.Container)
java.awt.CardLayout.getLayoutAlignmentX(java.awt.Container)
java.awt.GridBagLayout.getLayoutAlignmentX(java.awt.Container)
java.awt.LayoutManager2.getLayoutAlignmentX(java.awt.Container)
javax.swing.BoxLayout.getLayoutAlignmentX(java.awt.Container)
javax.swing.GroupLayout.getLayoutAlignmentX(java.awt.Container)
javax.swing.JRootPane.RootLayout.getLayoutAlignmentX(java.awt.Container)
javax.swing.OverlayLayout.getLayoutAlignmentX(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.getLayoutAlignmentX(java.awt.Container)
javax.swing.SpringLayout.getLayoutAlignmentX(java.awt.Container)


Occurences of getLayoutAlignmentY

getLayoutAlignmentY occurences:
java.awt.BorderLayout.getLayoutAlignmentY(java.awt.Container)
java.awt.CardLayout.getLayoutAlignmentY(java.awt.Container)
java.awt.GridBagLayout.getLayoutAlignmentY(java.awt.Container)
java.awt.LayoutManager2.getLayoutAlignmentY(java.awt.Container)
javax.swing.BoxLayout.getLayoutAlignmentY(java.awt.Container)
javax.swing.GroupLayout.getLayoutAlignmentY(java.awt.Container)
javax.swing.JRootPane.RootLayout.getLayoutAlignmentY(java.awt.Container)
javax.swing.OverlayLayout.getLayoutAlignmentY(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.getLayoutAlignmentY(java.awt.Container)
javax.swing.SpringLayout.getLayoutAlignmentY(java.awt.Container)


Occurences of getLayoutComponent

getLayoutComponent occurences:
java.awt.BorderLayout.getLayoutComponent(java.awt.Container, java.lang.Object)
java.awt.BorderLayout.getLayoutComponent(java.lang.Object)


Occurences of getLayoutStyle

getLayoutStyle occurences:
javax.swing.GroupLayout.getLayoutStyle()
javax.swing.LookAndFeel.getLayoutStyle()
javax.swing.plaf.metal.MetalLookAndFeel.getLayoutStyle()


Occurences of getLeading

getLeading occurences:
java.awt.font.LineMetrics.getLeading()
java.awt.font.TextLayout.getLeading()
java.awt.FontMetrics.getLeading()


Occurences of getLeadSelectionIndex

getLeadSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.getLeadSelectionIndex()
javax.swing.JList.getLeadSelectionIndex()
javax.swing.ListSelectionModel.getLeadSelectionIndex()


Occurences of getLeadSelectionPath

getLeadSelectionPath occurences:
javax.swing.JTree.getLeadSelectionPath()
javax.swing.tree.DefaultTreeSelectionModel.getLeadSelectionPath()
javax.swing.tree.TreeSelectionModel.getLeadSelectionPath()


Occurences of getLeadSelectionRow

getLeadSelectionRow occurences:
javax.swing.JTree.getLeadSelectionRow()
javax.swing.plaf.basic.BasicTreeUI.getLeadSelectionRow()
javax.swing.tree.DefaultTreeSelectionModel.getLeadSelectionRow()
javax.swing.tree.TreeSelectionModel.getLeadSelectionRow()


Occurences of getLeaf

getLeaf occurences:
com.sun.source.util.DocTreePath.getLeaf()
com.sun.source.util.TreePath.getLeaf()


Occurences of getLeastMaximum

getLeastMaximum occurences:
java.util.Calendar.getLeastMaximum(int)
java.util.GregorianCalendar.getLeastMaximum(int)


Occurences of getLeftInset

getLeftInset occurences:
javax.swing.text.AsyncBoxView.getLeftInset()
javax.swing.text.CompositeView.getLeftInset()


Occurences of getLegalValues

getLegalValues occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.getLegalValues()
javax.management.openmbean.OpenMBeanParameterInfo.getLegalValues()
javax.management.openmbean.OpenMBeanParameterInfoSupport.getLegalValues()


Occurences of getLength

getLength occurences:
java.lang.reflect.Array.getLength(java.lang.Object)
java.net.DatagramPacket.getLength()
java.text.Bidi.getLength()
javax.imageio.metadata.IIOMetadataNode.getLength()
javax.imageio.stream.IIOByteBuffer.getLength()
javax.sound.midi.MidiMessage.getLength()
javax.swing.event.DocumentEvent.getLength()
javax.swing.text.AbstractDocument.getLength()
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getLength()
javax.swing.text.DefaultStyledDocument.ElementSpec.getLength()
javax.swing.text.Document.getLength()
org.w3c.dom.CharacterData.getLength()
org.w3c.dom.DOMImplementationList.getLength()
org.w3c.dom.DOMStringList.getLength()
org.w3c.dom.NamedNodeMap.getLength()
org.w3c.dom.NameList.getLength()
org.w3c.dom.NodeList.getLength()
org.xml.sax.AttributeList.getLength()
org.xml.sax.Attributes.getLength()
org.xml.sax.helpers.AttributeListImpl.getLength()
org.xml.sax.helpers.AttributesImpl.getLength()


Occurences of getLevel

getLevel occurences:
java.util.logging.Handler.getLevel()
java.util.logging.Logger.getLevel()
java.util.logging.LogRecord.getLevel()
javax.sound.sampled.DataLine.getLevel()
javax.swing.tree.DefaultMutableTreeNode.getLevel()


Occurences of getLibraryDirectory

getLibraryDirectory occurences:
javax.management.loading.MLet.getLibraryDirectory()
javax.management.loading.MLetMBean.getLibraryDirectory()


Occurences of getLine

getLine occurences:
javax.sound.sampled.AudioSystem.getLine(javax.sound.sampled.Line.Info)
javax.sound.sampled.LineEvent.getLine()
javax.sound.sampled.Mixer.getLine(javax.sound.sampled.Line.Info)


Occurences of getLineBuffer

getLineBuffer occurences:
javax.swing.text.PlainView.getLineBuffer()
javax.swing.text.WrappedPlainView.getLineBuffer()


Occurences of getLineInstance

getLineInstance occurences:
java.text.BreakIterator.getLineInstance()
java.text.BreakIterator.getLineInstance(java.util.Locale)
java.text.spi.BreakIteratorProvider.getLineInstance(java.util.Locale)


Occurences of getLineMetrics

getLineMetrics occurences:
java.awt.Font.getLineMetrics(char:A, int, int, java.awt.font.FontRenderContext)
java.awt.Font.getLineMetrics(java.lang.String, int, int, java.awt.font.FontRenderContext)
java.awt.Font.getLineMetrics(java.lang.String, java.awt.font.FontRenderContext)
java.awt.Font.getLineMetrics(java.text.CharacterIterator, int, int, java.awt.font.FontRenderContext)
java.awt.FontMetrics.getLineMetrics(char:A, int, int, java.awt.Graphics)
java.awt.FontMetrics.getLineMetrics(java.lang.String, int, int, java.awt.Graphics)
java.awt.FontMetrics.getLineMetrics(java.lang.String, java.awt.Graphics)
java.awt.FontMetrics.getLineMetrics(java.text.CharacterIterator, int, int, java.awt.Graphics)


Occurences of getLineNumber

getLineNumber occurences:
com.sun.source.tree.LineMap.getLineNumber(long)
java.io.LineNumberInputStream.getLineNumber()
java.io.LineNumberReader.getLineNumber()
java.lang.StackTraceElement.getLineNumber()
javax.script.ScriptException.getLineNumber()
javax.tools.Diagnostic.getLineNumber()
javax.xml.bind.helpers.ValidationEventLocatorImpl.getLineNumber()
javax.xml.bind.ValidationEventLocator.getLineNumber()
javax.xml.stream.Location.getLineNumber()
javax.xml.transform.SourceLocator.getLineNumber()
org.w3c.dom.DOMLocator.getLineNumber()
org.xml.sax.helpers.LocatorImpl.getLineNumber()
org.xml.sax.Locator.getLineNumber()
org.xml.sax.SAXParseException.getLineNumber()


Occurences of getLink

getLink occurences:
javax.accessibility.AccessibleHypertext.getLink(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.getLink(int)


Occurences of getLinkCount

getLinkCount occurences:
javax.accessibility.AccessibleHypertext.getLinkCount()
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.getLinkCount()


Occurences of getLinkedException

getLinkedException occurences:
javax.xml.bind.helpers.ValidationEventImpl.getLinkedException()
javax.xml.bind.JAXBException.getLinkedException()
javax.xml.bind.TypeConstraintException.getLinkedException()
javax.xml.bind.ValidationEvent.getLinkedException()


Occurences of getLinkIndex

getLinkIndex occurences:
javax.accessibility.AccessibleHypertext.getLinkIndex(int)
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.getLinkIndex(int)


Occurences of getList

getList occurences:
javax.swing.plaf.basic.BasicComboPopup.getList()
javax.swing.plaf.basic.ComboPopup.getList()
javax.swing.SpinnerListModel.getList()


Occurences of getListCellRendererComponent

getListCellRendererComponent occurences:
javax.swing.DefaultListCellRenderer.getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
javax.swing.ListCellRenderer.getListCellRendererComponent(javax.swing.JList, E, int, boolean, boolean)
javax.swing.ListCellRenderer.getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
javax.swing.plaf.basic.BasicComboBoxRenderer.getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer.getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)


Occurences of getListener

getListener occurences:
java.util.EventListenerProxy.getListener()
javax.xml.bind.helpers.AbstractMarshallerImpl.getListener()
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getListener()
javax.xml.bind.Marshaller.getListener()
javax.xml.bind.Unmarshaller.getListener()


Occurences of getListenerCount

getListenerCount occurences:
javax.swing.event.EventListenerList.getListenerCount()
javax.swing.event.EventListenerList.getListenerCount(java.lang.Class)


Occurences of getListeners

getListeners occurences:
java.awt.AWTEventMulticaster.getListeners(java.util.EventListener, java.lang.Class)
java.awt.Button.getListeners(java.lang.Class)
java.awt.Checkbox.getListeners(java.lang.Class)
java.awt.CheckboxMenuItem.getListeners(java.lang.Class)
java.awt.Choice.getListeners(java.lang.Class)
java.awt.Component.getListeners(java.lang.Class)
java.awt.Container.getListeners(java.lang.Class)
java.awt.dnd.DragSource.getListeners(java.lang.Class)
java.awt.List.getListeners(java.lang.Class)
java.awt.MenuItem.getListeners(java.lang.Class)
java.awt.Scrollbar.getListeners(java.lang.Class)
java.awt.TextComponent.getListeners(java.lang.Class)
java.awt.TextField.getListeners(java.lang.Class)
java.awt.Window.getListeners(java.lang.Class)
javax.swing.AbstractListModel.getListeners(java.lang.Class)
javax.swing.AbstractSpinnerModel.getListeners(java.lang.Class)
javax.swing.DefaultBoundedRangeModel.getListeners(java.lang.Class)
javax.swing.DefaultButtonModel.getListeners(java.lang.Class)
javax.swing.DefaultListSelectionModel.getListeners(java.lang.Class)
javax.swing.DefaultSingleSelectionModel.getListeners(java.lang.Class)
javax.swing.event.EventListenerList.getListeners(java.lang.Class)
javax.swing.JComponent.getListeners(java.lang.Class)
javax.swing.table.AbstractTableModel.getListeners(java.lang.Class)
javax.swing.table.DefaultTableColumnModel.getListeners(java.lang.Class)
javax.swing.text.AbstractDocument.getListeners(java.lang.Class)
javax.swing.text.DefaultCaret.getListeners(java.lang.Class)
javax.swing.text.StyleContext.NamedStyle.getListeners(java.lang.Class)
javax.swing.Timer.getListeners(java.lang.Class)
javax.swing.tree.DefaultTreeModel.getListeners(java.lang.Class)
javax.swing.tree.DefaultTreeSelectionModel.getListeners(java.lang.Class)


Occurences of getListSelectionListeners

getListSelectionListeners occurences:
javax.swing.DefaultListSelectionModel.getListSelectionListeners()
javax.swing.JList.getListSelectionListeners()


Occurences of getLocalAddress

getLocalAddress occurences:
java.net.DatagramSocket.getLocalAddress()
java.net.Socket.getLocalAddress()
java.nio.channels.AsynchronousServerSocketChannel.getLocalAddress()
java.nio.channels.AsynchronousSocketChannel.getLocalAddress()
java.nio.channels.DatagramChannel.getLocalAddress()
java.nio.channels.NetworkChannel.getLocalAddress()
java.nio.channels.ServerSocketChannel.getLocalAddress()
java.nio.channels.SocketChannel.getLocalAddress()
javax.xml.ws.spi.http.HttpExchange.getLocalAddress()


Occurences of getLocalCertificates

getLocalCertificates occurences:
javax.net.ssl.HandshakeCompletedEvent.getLocalCertificates()
javax.net.ssl.HttpsURLConnection.getLocalCertificates()
javax.net.ssl.SSLSession.getLocalCertificates()


Occurences of getLocale

getLocale occurences:
java.applet.Applet.getLocale()
java.awt.Component.getLocale()
java.awt.Component.AccessibleAWTComponent.getLocale()
java.awt.im.InputContext.getLocale()
java.awt.im.spi.InputMethod.getLocale()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getLocale()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getLocale()
java.awt.Window.getLocale()
java.beans.beancontext.BeanContextSupport.getLocale()
java.text.MessageFormat.getLocale()
java.time.format.DateTimeFormatter.getLocale()
java.util.ResourceBundle.getLocale()
javax.accessibility.AccessibleContext.getLocale()
javax.annotation.processing.ProcessingEnvironment.getLocale()
javax.imageio.ImageReader.getLocale()
javax.imageio.ImageWriteParam.getLocale()
javax.imageio.ImageWriter.getLocale()
javax.print.attribute.TextSyntax.getLocale()
javax.security.auth.callback.LanguageCallback.getLocale()
javax.swing.ImageIcon.AccessibleImageIcon.getLocale()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getLocale()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getLocale()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getLocale()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getLocale()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocale()


Occurences of getLocalName

getLocalName occurences:
javax.imageio.metadata.IIOMetadataNode.getLocalName()
javax.xml.soap.Name.getLocalName()
javax.xml.stream.util.StreamReaderDelegate.getLocalName()
javax.xml.stream.XMLStreamReader.getLocalName()
org.w3c.dom.Node.getLocalName()
org.xml.sax.Attributes.getLocalName(int)
org.xml.sax.helpers.AttributesImpl.getLocalName(int)


Occurences of getLocalPort

getLocalPort occurences:
java.net.DatagramSocket.getLocalPort()
java.net.DatagramSocketImpl.getLocalPort()
java.net.ServerSocket.getLocalPort()
java.net.Socket.getLocalPort()
java.net.SocketImpl.getLocalPort()


Occurences of getLocalPrincipal

getLocalPrincipal occurences:
java.net.SecureCacheResponse.getLocalPrincipal()
javax.net.ssl.HandshakeCompletedEvent.getLocalPrincipal()
javax.net.ssl.HttpsURLConnection.getLocalPrincipal()
javax.net.ssl.SSLSession.getLocalPrincipal()


Occurences of getLocalSocketAddress

getLocalSocketAddress occurences:
java.net.DatagramSocket.getLocalSocketAddress()
java.net.ServerSocket.getLocalSocketAddress()
java.net.Socket.getLocalSocketAddress()


Occurences of getLocation

getLocation occurences:
java.awt.Component.getLocation()
java.awt.Component.getLocation(java.awt.Point)
java.awt.Component.AccessibleAWTComponent.getLocation()
java.awt.dnd.DragSourceEvent.getLocation()
java.awt.dnd.DropTargetDragEvent.getLocation()
java.awt.dnd.DropTargetDropEvent.getLocation()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getLocation()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getLocation()
java.awt.Point.getLocation()
java.awt.PointerInfo.getLocation()
java.awt.Rectangle.getLocation()
java.net.HttpRetryException.getLocation()
java.rmi.activation.ActivationDesc.getLocation()
java.rmi.activation.ActivationGroupDesc.getLocation()
java.security.CodeSource.getLocation()
javax.accessibility.AccessibleComponent.getLocation()
javax.swing.JComponent.getLocation(java.awt.Point)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getLocation()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getLocation()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getLocation()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocation()
javax.tools.StandardJavaFileManager.getLocation(javax.tools.JavaFileManager.Location)
javax.xml.stream.events.XMLEvent.getLocation()
javax.xml.stream.util.StreamReaderDelegate.getLocation()
javax.xml.stream.XMLStreamException.getLocation()
javax.xml.stream.XMLStreamReader.getLocation()
org.w3c.dom.DOMError.getLocation()


Occurences of getLocationOnScreen

getLocationOnScreen occurences:
java.awt.Component.getLocationOnScreen()
java.awt.Component.AccessibleAWTComponent.getLocationOnScreen()
java.awt.event.MouseEvent.getLocationOnScreen()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getLocationOnScreen()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getLocationOnScreen()
javax.accessibility.AccessibleComponent.getLocationOnScreen()
javax.swing.JList.AccessibleJList.AccessibleJListChild.getLocationOnScreen()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getLocationOnScreen()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getLocationOnScreen()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocationOnScreen()


Occurences of getLocator

getLocator occurences:
javax.xml.bind.helpers.ValidationEventImpl.getLocator()
javax.xml.bind.ValidationEvent.getLocator()
javax.xml.transform.TransformerException.getLocator()


Occurences of getLogger

getLogger occurences:
java.util.logging.Logger.getLogger(java.lang.String)
java.util.logging.Logger.getLogger(java.lang.String, java.lang.String)
java.util.logging.LogManager.getLogger(java.lang.String)
javax.sql.rowset.spi.SyncFactory.getLogger()


Occurences of getLoggerLevel

getLoggerLevel occurences:
java.lang.management.PlatformLoggingMXBean.getLoggerLevel(java.lang.String)
java.util.logging.LoggingMXBean.getLoggerLevel(java.lang.String)


Occurences of getLoggerNames

getLoggerNames occurences:
java.lang.management.PlatformLoggingMXBean.getLoggerNames()
java.util.logging.LoggingMXBean.getLoggerNames()
java.util.logging.LogManager.getLoggerNames()


Occurences of getLogicalHighlightShape

getLogicalHighlightShape occurences:
java.awt.font.TextLayout.getLogicalHighlightShape(int, int)
java.awt.font.TextLayout.getLogicalHighlightShape(int, int, java.awt.geom.Rectangle2D)


Occurences of getLogicalStyle

getLogicalStyle occurences:
javax.swing.JTextPane.getLogicalStyle()
javax.swing.text.DefaultStyledDocument.getLogicalStyle(int)
javax.swing.text.StyledDocument.getLogicalStyle(int)


Occurences of getLoginTimeout

getLoginTimeout occurences:
java.sql.DriverManager.getLoginTimeout()
javax.sql.CommonDataSource.getLoginTimeout()


Occurences of getLogWriter

getLogWriter occurences:
java.sql.DriverManager.getLogWriter()
javax.sql.CommonDataSource.getLogWriter()


Occurences of getLong

getLong occurences:
java.lang.Long.getLong(java.lang.String)
java.lang.Long.getLong(java.lang.String, java.lang.Long)
java.lang.Long.getLong(java.lang.String, long)
java.lang.reflect.Array.getLong(java.lang.Object, int)
java.lang.reflect.Field.getLong(java.lang.Object)
java.nio.ByteBuffer.getLong()
java.nio.ByteBuffer.getLong(int)
java.sql.CallableStatement.getLong(int)
java.sql.CallableStatement.getLong(java.lang.String)
java.sql.ResultSet.getLong(int)
java.sql.ResultSet.getLong(java.lang.String)
java.time.chrono.ChronoZonedDateTime.getLong(java.time.temporal.TemporalField)
java.time.chrono.Era.getLong(java.time.temporal.TemporalField)
java.time.chrono.HijrahDate.getLong(java.time.temporal.TemporalField)
java.time.chrono.JapaneseDate.getLong(java.time.temporal.TemporalField)
java.time.chrono.MinguoDate.getLong(java.time.temporal.TemporalField)
java.time.chrono.ThaiBuddhistDate.getLong(java.time.temporal.TemporalField)
java.time.DayOfWeek.getLong(java.time.temporal.TemporalField)
java.time.Instant.getLong(java.time.temporal.TemporalField)
java.time.LocalDate.getLong(java.time.temporal.TemporalField)
java.time.LocalDateTime.getLong(java.time.temporal.TemporalField)
java.time.LocalTime.getLong(java.time.temporal.TemporalField)
java.time.Month.getLong(java.time.temporal.TemporalField)
java.time.MonthDay.getLong(java.time.temporal.TemporalField)
java.time.OffsetDateTime.getLong(java.time.temporal.TemporalField)
java.time.OffsetTime.getLong(java.time.temporal.TemporalField)
java.time.temporal.TemporalAccessor.getLong(java.time.temporal.TemporalField)
java.time.Year.getLong(java.time.temporal.TemporalField)
java.time.YearMonth.getLong(java.time.temporal.TemporalField)
java.time.ZonedDateTime.getLong(java.time.temporal.TemporalField)
java.time.ZoneOffset.getLong(java.time.temporal.TemporalField)
java.util.prefs.AbstractPreferences.getLong(java.lang.String, long)
java.util.prefs.Preferences.getLong(java.lang.String, long)


Occurences of getLowThreshold

getLowThreshold occurences:
javax.management.monitor.GaugeMonitor.getLowThreshold()
javax.management.monitor.GaugeMonitorMBean.getLowThreshold()


Occurences of getMagicCaretPosition

getMagicCaretPosition occurences:
javax.swing.text.Caret.getMagicCaretPosition()
javax.swing.text.DefaultCaret.getMagicCaretPosition()


Occurences of getMainAttributes

getMainAttributes occurences:
java.net.JarURLConnection.getMainAttributes()
java.util.jar.Manifest.getMainAttributes()


Occurences of getMajorVersion

getMajorVersion occurences:
java.awt.color.ICC_Profile.getMajorVersion()
java.sql.Driver.getMajorVersion()


Occurences of getManifest

getManifest occurences:
java.net.JarURLConnection.getManifest()
java.util.jar.JarFile.getManifest()
java.util.jar.JarInputStream.getManifest()


Occurences of getMargin

getMargin occurences:
javax.swing.AbstractButton.getMargin()
javax.swing.JMenuBar.getMargin()
javax.swing.JPopupMenu.getMargin()
javax.swing.JToolBar.getMargin()
javax.swing.text.JTextComponent.getMargin()


Occurences of getMark

getMark occurences:
javax.swing.event.CaretEvent.getMark()
javax.swing.text.Caret.getMark()
javax.swing.text.DefaultCaret.getMark()


Occurences of getMask

getMask occurences:
java.awt.image.PackedColorModel.getMask(int)
javax.swing.text.MaskFormatter.getMask()


Occurences of getMatchingMimeHeaders

getMatchingMimeHeaders occurences:
javax.xml.soap.AttachmentPart.getMatchingMimeHeaders(java.lang.String:A)
javax.xml.soap.SOAPPart.getMatchingMimeHeaders(java.lang.String:A)


Occurences of getMatrix

getMatrix occurences:
java.awt.color.ICC_ProfileRGB.getMatrix()
java.awt.geom.AffineTransform.getMatrix(double:A)
java.awt.image.BandCombineOp.getMatrix()
java.awt.print.PageFormat.getMatrix()


Occurences of getMax

getMax occurences:
java.lang.management.MemoryUsage.getMax()
java.util.DoubleSummaryStatistics.getMax()
java.util.IntSummaryStatistics.getMax()
java.util.LongSummaryStatistics.getMax()


Occurences of getMaxCharactersPerLineCount

getMaxCharactersPerLineCount occurences:
javax.swing.JOptionPane.getMaxCharactersPerLineCount()
javax.swing.plaf.basic.BasicOptionPaneUI.getMaxCharactersPerLineCount()


Occurences of getMaxCharBounds

getMaxCharBounds occurences:
java.awt.Font.getMaxCharBounds(java.awt.font.FontRenderContext)
java.awt.FontMetrics.getMaxCharBounds(java.awt.Graphics)


Occurences of getMaxFieldSize

getMaxFieldSize occurences:
java.sql.Statement.getMaxFieldSize()
javax.sql.RowSet.getMaxFieldSize()
javax.sql.rowset.BaseRowSet.getMaxFieldSize()


Occurences of getMaximum

getMaximum occurences:
java.awt.Adjustable.getMaximum()
java.awt.Scrollbar.getMaximum()
java.awt.ScrollPaneAdjustable.getMaximum()
java.time.temporal.ValueRange.getMaximum()
java.util.Calendar.getMaximum(int)
java.util.GregorianCalendar.getMaximum(int)
javax.sound.sampled.FloatControl.getMaximum()
javax.swing.BoundedRangeModel.getMaximum()
javax.swing.DefaultBoundedRangeModel.getMaximum()
javax.swing.JProgressBar.getMaximum()
javax.swing.JScrollBar.getMaximum()
javax.swing.JSlider.getMaximum()
javax.swing.ProgressMonitor.getMaximum()
javax.swing.SpinnerNumberModel.getMaximum()
javax.swing.text.InternationalFormatter.getMaximum()


Occurences of getMaximumAccessibleValue

getMaximumAccessibleValue occurences:
java.awt.Button.AccessibleAWTButton.getMaximumAccessibleValue()
java.awt.Checkbox.AccessibleAWTCheckbox.getMaximumAccessibleValue()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getMaximumAccessibleValue()
java.awt.MenuItem.AccessibleAWTMenuItem.getMaximumAccessibleValue()
java.awt.Scrollbar.AccessibleAWTScrollBar.getMaximumAccessibleValue()
javax.accessibility.AccessibleValue.getMaximumAccessibleValue()
javax.swing.AbstractButton.AccessibleAbstractButton.getMaximumAccessibleValue()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getMaximumAccessibleValue()
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getMaximumAccessibleValue()
javax.swing.JProgressBar.AccessibleJProgressBar.getMaximumAccessibleValue()
javax.swing.JScrollBar.AccessibleJScrollBar.getMaximumAccessibleValue()
javax.swing.JSlider.AccessibleJSlider.getMaximumAccessibleValue()
javax.swing.JSpinner.AccessibleJSpinner.getMaximumAccessibleValue()
javax.swing.JSplitPane.AccessibleJSplitPane.getMaximumAccessibleValue()


Occurences of getMaximumDividerLocation

getMaximumDividerLocation occurences:
javax.swing.JSplitPane.getMaximumDividerLocation()
javax.swing.plaf.basic.BasicSplitPaneUI.getMaximumDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.multi.MultiSplitPaneUI.getMaximumDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.SplitPaneUI.getMaximumDividerLocation(javax.swing.JSplitPane)


Occurences of getMaximumFractionDigits

getMaximumFractionDigits occurences:
java.text.DecimalFormat.getMaximumFractionDigits()
java.text.NumberFormat.getMaximumFractionDigits()


Occurences of getMaximumIntegerDigits

getMaximumIntegerDigits occurences:
java.text.DecimalFormat.getMaximumIntegerDigits()
java.text.NumberFormat.getMaximumIntegerDigits()


Occurences of getMaximumSize

getMaximumSize occurences:
java.awt.Component.getMaximumSize()
java.awt.Container.getMaximumSize()
javax.swing.JComponent.getMaximumSize()
javax.swing.JScrollBar.getMaximumSize()
javax.swing.JToolBar.Separator.getMaximumSize()
javax.swing.plaf.basic.BasicArrowButton.getMaximumSize()
javax.swing.plaf.basic.BasicButtonUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.LayerUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalDesktopIconUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollButton.getMaximumSize()
javax.swing.plaf.multi.MultiButtonUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthGraphicsUtils.getMaximumSize(javax.swing.plaf.synth.SynthContext, java.awt.Font, java.lang.String, javax.swing.Icon, int, int, int, int, int, int)
javax.swing.plaf.synth.SynthLabelUI.getMaximumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.getMaximumSize(javax.swing.JComponent)


Occurences of getMaximumSpan

getMaximumSpan occurences:
javax.swing.text.AsyncBoxView.getMaximumSpan(int)
javax.swing.text.BoxView.getMaximumSpan(int)
javax.swing.text.ComponentView.getMaximumSpan(int)
javax.swing.text.html.BlockView.getMaximumSpan(int)
javax.swing.text.html.FormView.getMaximumSpan(int)
javax.swing.text.html.ParagraphView.getMaximumSpan(int)
javax.swing.text.View.getMaximumSpan(int)
javax.swing.text.WrappedPlainView.getMaximumSpan(int)


Occurences of getMaxRows

getMaxRows occurences:
java.sql.Statement.getMaxRows()
javax.sql.RowSet.getMaxRows()
javax.sql.rowset.BaseRowSet.getMaxRows()


Occurences of getMaxSelectionIndex

getMaxSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.getMaxSelectionIndex()
javax.swing.JList.getMaxSelectionIndex()
javax.swing.ListSelectionModel.getMaxSelectionIndex()


Occurences of getMaxSelectionRow

getMaxSelectionRow occurences:
javax.swing.JTree.getMaxSelectionRow()
javax.swing.tree.DefaultTreeSelectionModel.getMaxSelectionRow()
javax.swing.tree.TreeSelectionModel.getMaxSelectionRow()


Occurences of getMaxValue

getMaxValue occurences:
java.awt.color.ColorSpace.getMaxValue(int)
java.awt.color.ICC_ColorSpace.getMaxValue(int)
javax.management.openmbean.OpenMBeanAttributeInfoSupport.getMaxValue()
javax.management.openmbean.OpenMBeanParameterInfo.getMaxValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.getMaxValue()


Occurences of getMBeanCount

getMBeanCount occurences:
javax.management.MBeanServer.getMBeanCount()
javax.management.MBeanServerConnection.getMBeanCount()
javax.management.remote.rmi.RMIConnection.getMBeanCount(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getMBeanCount(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getMBeanCount(javax.security.auth.Subject)


Occurences of getMBeanDescriptor

getMBeanDescriptor occurences:
javax.management.modelmbean.ModelMBeanInfo.getMBeanDescriptor()
javax.management.modelmbean.ModelMBeanInfoSupport.getMBeanDescriptor()


Occurences of getMBeanInfo

getMBeanInfo occurences:
javax.management.DynamicMBean.getMBeanInfo()
javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName)
javax.management.MBeanServerConnection.getMBeanInfo(javax.management.ObjectName)
javax.management.modelmbean.RequiredModelMBean.getMBeanInfo()
javax.management.remote.rmi.RMIConnection.getMBeanInfo(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getMBeanInfo(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getMBeanInfo(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.StandardMBean.getMBeanInfo()


Occurences of getMBeanServer

getMBeanServer occurences:
javax.management.QueryEval.getMBeanServer()
javax.management.remote.JMXConnectorServer.getMBeanServer()
javax.management.remote.MBeanServerForwarder.getMBeanServer()
javax.management.remote.rmi.RMIServerImpl.getMBeanServer()


Occurences of getMBeanServerConnection

getMBeanServerConnection occurences:
com.sun.tools.jconsole.JConsoleContext.getMBeanServerConnection()
javax.management.MBeanServerInvocationHandler.getMBeanServerConnection()
javax.management.remote.JMXConnector.getMBeanServerConnection()
javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnector.getMBeanServerConnection()
javax.management.remote.rmi.RMIConnector.getMBeanServerConnection(javax.security.auth.Subject)


Occurences of getMBeanServerId

getMBeanServerId occurences:
javax.management.MBeanServerDelegate.getMBeanServerId()
javax.management.MBeanServerDelegateMBean.getMBeanServerId()


Occurences of getMBeansFromURL

getMBeansFromURL occurences:
javax.management.loading.MLet.getMBeansFromURL(java.lang.String)
javax.management.loading.MLet.getMBeansFromURL(java.net.URL)
javax.management.loading.MLetMBean.getMBeansFromURL(java.lang.String)
javax.management.loading.MLetMBean.getMBeansFromURL(java.net.URL)


Occurences of getMechanismName

getMechanismName occurences:
javax.security.sasl.SaslClient.getMechanismName()
javax.security.sasl.SaslServer.getMechanismName()


Occurences of getMechanismNames

getMechanismNames occurences:
javax.security.sasl.SaslClientFactory.getMechanismNames(java.util.Map)
javax.security.sasl.SaslServerFactory.getMechanismNames(java.util.Map)


Occurences of getMechanismType

getMechanismType occurences:
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getMechanismType()
javax.xml.crypto.dsig.TransformService.getMechanismType()
javax.xml.crypto.dsig.XMLSignatureFactory.getMechanismType()


Occurences of getMechs

getMechs occurences:
org.ietf.jgss.GSSCredential.getMechs()
org.ietf.jgss.GSSManager.getMechs()


Occurences of getMediaWhitePoint

getMediaWhitePoint occurences:
java.awt.color.ICC_ProfileGray.getMediaWhitePoint()
java.awt.color.ICC_ProfileRGB.getMediaWhitePoint()


Occurences of getMembers

getMembers occurences:
com.sun.source.tree.ClassTree.getMembers()
javax.print.attribute.SetOfIntegerSyntax.getMembers()


Occurences of getMenu

getMenu occurences:
java.awt.MenuBar.getMenu(int)
javax.swing.JMenuBar.getMenu(int)


Occurences of getMenuArrowIcon

getMenuArrowIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getMenuArrowIcon()
javax.swing.plaf.metal.MetalIconFactory.getMenuArrowIcon()


Occurences of getMenuBackground

getMenuBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getMenuBackground()
javax.swing.plaf.metal.MetalTheme.getMenuBackground()


Occurences of getMenuBar

getMenuBar occurences:
java.awt.Frame.getMenuBar()
javax.swing.JInternalFrame.getMenuBar()
javax.swing.JRootPane.getMenuBar()


Occurences of getMenuCount

getMenuCount occurences:
java.awt.MenuBar.getMenuCount()
javax.swing.JMenuBar.getMenuCount()


Occurences of getMenuDisabledForeground

getMenuDisabledForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getMenuDisabledForeground()
javax.swing.plaf.metal.MetalTheme.getMenuDisabledForeground()
javax.swing.plaf.metal.OceanTheme.getMenuDisabledForeground()


Occurences of getMenuForeground

getMenuForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getMenuForeground()
javax.swing.plaf.metal.MetalTheme.getMenuForeground()


Occurences of getMenuItemArrowIcon

getMenuItemArrowIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getMenuItemArrowIcon()
javax.swing.plaf.metal.MetalIconFactory.getMenuItemArrowIcon()


Occurences of getMenuItemCheckIcon

getMenuItemCheckIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getMenuItemCheckIcon()
javax.swing.plaf.metal.MetalIconFactory.getMenuItemCheckIcon()


Occurences of getMenuKeyListeners

getMenuKeyListeners occurences:
javax.swing.JMenuItem.getMenuKeyListeners()
javax.swing.JPopupMenu.getMenuKeyListeners()


Occurences of getMenuSelectedBackground

getMenuSelectedBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getMenuSelectedBackground()
javax.swing.plaf.metal.MetalTheme.getMenuSelectedBackground()


Occurences of getMenuSelectedForeground

getMenuSelectedForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getMenuSelectedForeground()
javax.swing.plaf.metal.MetalTheme.getMenuSelectedForeground()


Occurences of getMenuSelectionManager

getMenuSelectionManager occurences:
javax.swing.event.MenuDragMouseEvent.getMenuSelectionManager()
javax.swing.event.MenuKeyEvent.getMenuSelectionManager()


Occurences of getMenuTextFont

getMenuTextFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getMenuTextFont()
javax.swing.plaf.metal.MetalLookAndFeel.getMenuTextFont()
javax.swing.plaf.metal.MetalTheme.getMenuTextFont()


Occurences of getMessage

getMessage occurences:
java.awt.HeadlessException.getMessage()
java.io.InvalidClassException.getMessage()
java.io.WriteAbortedException.getMessage()
java.lang.Throwable.getMessage()
java.net.URISyntaxException.getMessage()
java.nio.charset.MalformedInputException.getMessage()
java.nio.charset.UnmappableCharacterException.getMessage()
java.nio.file.FileSystemException.getMessage()
java.nio.file.InvalidPathException.getMessage()
java.rmi.activation.ActivationException.getMessage()
java.rmi.RemoteException.getMessage()
java.rmi.server.ServerCloneException.getMessage()
java.security.cert.CertificateRevokedException.getMessage()
java.util.DuplicateFormatFlagsException.getMessage()
java.util.FormatFlagsConversionMismatchException.getMessage()
java.util.IllegalFormatCodePointException.getMessage()
java.util.IllegalFormatConversionException.getMessage()
java.util.IllegalFormatFlagsException.getMessage()
java.util.IllegalFormatPrecisionException.getMessage()
java.util.IllegalFormatWidthException.getMessage()
java.util.logging.LogRecord.getMessage()
java.util.MissingFormatArgumentException.getMessage()
java.util.MissingFormatWidthException.getMessage()
java.util.regex.PatternSyntaxException.getMessage()
java.util.UnknownFormatConversionException.getMessage()
java.util.UnknownFormatFlagsException.getMessage()
javax.annotation.processing.Completion.getMessage()
javax.management.Notification.getMessage()
javax.script.ScriptException.getMessage()
javax.security.auth.callback.TextOutputCallback.getMessage()
javax.sound.midi.MidiEvent.getMessage()
javax.sound.midi.MidiMessage.getMessage()
javax.swing.JOptionPane.getMessage()
javax.swing.plaf.basic.BasicOptionPaneUI.getMessage()
javax.tools.Diagnostic.getMessage(java.util.Locale)
javax.xml.bind.helpers.ValidationEventImpl.getMessage()
javax.xml.bind.ValidationEvent.getMessage()
javax.xml.parsers.FactoryConfigurationError.getMessage()
javax.xml.soap.SOAPException.getMessage()
javax.xml.stream.FactoryConfigurationError.getMessage()
javax.xml.transform.TransformerFactoryConfigurationError.getMessage()
javax.xml.ws.handler.LogicalMessageContext.getMessage()
javax.xml.ws.handler.soap.SOAPMessageContext.getMessage()
org.ietf.jgss.GSSException.getMessage()
org.w3c.dom.DOMError.getMessage()
org.xml.sax.SAXException.getMessage()


Occurences of getMessageDigest

getMessageDigest occurences:
java.security.DigestInputStream.getMessageDigest()
java.security.DigestOutputStream.getMessageDigest()


Occurences of getMessageType

getMessageType occurences:
javax.security.auth.callback.ConfirmationCallback.getMessageType()
javax.security.auth.callback.TextOutputCallback.getMessageType()
javax.swing.JOptionPane.getMessageType()


Occurences of getMetadata

getMetadata occurences:
javax.imageio.IIOImage.getMetadata()
javax.xml.ws.Endpoint.getMetadata()


Occurences of getMetaData

getMetaData occurences:
java.sql.Connection.getMetaData()
java.sql.PreparedStatement.getMetaData()
java.sql.ResultSet.getMetaData()


Occurences of getMethod

getMethod occurences:
java.beans.MethodDescriptor.getMethod()
java.lang.Class.getMethod(java.lang.String, java.lang.Class...)
java.util.zip.ZipEntry.getMethod()
javax.swing.text.html.FormSubmitEvent.getMethod()


Occurences of getMethodDescriptors

getMethodDescriptors occurences:
java.beans.BeanInfo.getMethodDescriptors()
java.beans.SimpleBeanInfo.getMethodDescriptors()


Occurences of getMethodName

getMethodName occurences:
java.beans.Statement.getMethodName()
java.lang.StackTraceElement.getMethodName()


Occurences of getMGFAlgorithm

getMGFAlgorithm occurences:
java.security.spec.PSSParameterSpec.getMGFAlgorithm()
javax.crypto.spec.OAEPParameterSpec.getMGFAlgorithm()


Occurences of getMGFParameters

getMGFParameters occurences:
java.security.spec.PSSParameterSpec.getMGFParameters()
javax.crypto.spec.OAEPParameterSpec.getMGFParameters()


Occurences of getMIC

getMIC occurences:
org.ietf.jgss.GSSContext.getMIC(byte:A, int, int, org.ietf.jgss.MessageProp)
org.ietf.jgss.GSSContext.getMIC(java.io.InputStream, java.io.OutputStream, org.ietf.jgss.MessageProp)


Occurences of getMicrosecondLength

getMicrosecondLength occurences:
javax.sound.midi.MidiFileFormat.getMicrosecondLength()
javax.sound.midi.Sequence.getMicrosecondLength()
javax.sound.midi.Sequencer.getMicrosecondLength()
javax.sound.sampled.Clip.getMicrosecondLength()


Occurences of getMicrosecondPosition

getMicrosecondPosition occurences:
javax.sound.midi.MidiDevice.getMicrosecondPosition()
javax.sound.midi.Sequencer.getMicrosecondPosition()
javax.sound.sampled.DataLine.getMicrosecondPosition()


Occurences of getMidiDevice

getMidiDevice occurences:
javax.sound.midi.MidiDeviceReceiver.getMidiDevice()
javax.sound.midi.MidiDeviceTransmitter.getMidiDevice()
javax.sound.midi.MidiSystem.getMidiDevice(javax.sound.midi.MidiDevice.Info)


Occurences of getMidiFileFormat

getMidiFileFormat occurences:
javax.sound.midi.MidiSystem.getMidiFileFormat(java.io.File)
javax.sound.midi.MidiSystem.getMidiFileFormat(java.io.InputStream)
javax.sound.midi.MidiSystem.getMidiFileFormat(java.net.URL)
javax.sound.midi.spi.MidiFileReader.getMidiFileFormat(java.io.File)
javax.sound.midi.spi.MidiFileReader.getMidiFileFormat(java.io.InputStream)
javax.sound.midi.spi.MidiFileReader.getMidiFileFormat(java.net.URL)


Occurences of getMidiFileTypes

getMidiFileTypes occurences:
javax.sound.midi.MidiSystem.getMidiFileTypes()
javax.sound.midi.MidiSystem.getMidiFileTypes(javax.sound.midi.Sequence)
javax.sound.midi.spi.MidiFileWriter.getMidiFileTypes()
javax.sound.midi.spi.MidiFileWriter.getMidiFileTypes(javax.sound.midi.Sequence)


Occurences of getMimeEncoder

getMimeEncoder occurences:
java.util.Base64.getMimeEncoder()
java.util.Base64.getMimeEncoder(int, byte:A)


Occurences of getMimeHeader

getMimeHeader occurences:
javax.xml.soap.AttachmentPart.getMimeHeader(java.lang.String)
javax.xml.soap.SOAPPart.getMimeHeader(java.lang.String)


Occurences of getMimeType

getMimeType occurences:
java.awt.datatransfer.DataFlavor.getMimeType()
javax.activation.ActivationDataFlavor.getMimeType()
javax.print.DocFlavor.getMimeType()
javax.xml.crypto.dsig.XMLObject.getMimeType()
javax.xml.crypto.OctetStreamData.getMimeType()


Occurences of getMimeTypes

getMimeTypes occurences:
javax.accessibility.AccessibleStreamable.getMimeTypes()
javax.activation.CommandMap.getMimeTypes()
javax.activation.MailcapCommandMap.getMimeTypes()
javax.script.ScriptEngineFactory.getMimeTypes()


Occurences of getMin

getMin occurences:
java.util.DoubleSummaryStatistics.getMin()
java.util.IntSummaryStatistics.getMin()
java.util.LongSummaryStatistics.getMin()


Occurences of getMinimalDaysInFirstWeek

getMinimalDaysInFirstWeek occurences:
java.time.temporal.WeekFields.getMinimalDaysInFirstWeek()
java.util.Calendar.getMinimalDaysInFirstWeek()
java.util.spi.CalendarDataProvider.getMinimalDaysInFirstWeek(java.util.Locale)


Occurences of getMinimum

getMinimum occurences:
java.awt.Adjustable.getMinimum()
java.awt.Scrollbar.getMinimum()
java.awt.ScrollPaneAdjustable.getMinimum()
java.time.temporal.ValueRange.getMinimum()
java.util.Calendar.getMinimum(int)
java.util.GregorianCalendar.getMinimum(int)
javax.sound.sampled.FloatControl.getMinimum()
javax.swing.BoundedRangeModel.getMinimum()
javax.swing.DefaultBoundedRangeModel.getMinimum()
javax.swing.JProgressBar.getMinimum()
javax.swing.JScrollBar.getMinimum()
javax.swing.JSlider.getMinimum()
javax.swing.ProgressMonitor.getMinimum()
javax.swing.SpinnerNumberModel.getMinimum()
javax.swing.text.InternationalFormatter.getMinimum()


Occurences of getMinimumAccessibleValue

getMinimumAccessibleValue occurences:
java.awt.Button.AccessibleAWTButton.getMinimumAccessibleValue()
java.awt.Checkbox.AccessibleAWTCheckbox.getMinimumAccessibleValue()
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getMinimumAccessibleValue()
java.awt.MenuItem.AccessibleAWTMenuItem.getMinimumAccessibleValue()
java.awt.Scrollbar.AccessibleAWTScrollBar.getMinimumAccessibleValue()
javax.accessibility.AccessibleValue.getMinimumAccessibleValue()
javax.swing.AbstractButton.AccessibleAbstractButton.getMinimumAccessibleValue()
javax.swing.JInternalFrame.AccessibleJInternalFrame.getMinimumAccessibleValue()
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getMinimumAccessibleValue()
javax.swing.JProgressBar.AccessibleJProgressBar.getMinimumAccessibleValue()
javax.swing.JScrollBar.AccessibleJScrollBar.getMinimumAccessibleValue()
javax.swing.JSlider.AccessibleJSlider.getMinimumAccessibleValue()
javax.swing.JSpinner.AccessibleJSpinner.getMinimumAccessibleValue()
javax.swing.JSplitPane.AccessibleJSplitPane.getMinimumAccessibleValue()


Occurences of getMinimumDividerLocation

getMinimumDividerLocation occurences:
javax.swing.JSplitPane.getMinimumDividerLocation()
javax.swing.plaf.basic.BasicSplitPaneUI.getMinimumDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.multi.MultiSplitPaneUI.getMinimumDividerLocation(javax.swing.JSplitPane)
javax.swing.plaf.SplitPaneUI.getMinimumDividerLocation(javax.swing.JSplitPane)


Occurences of getMinimumFractionDigits

getMinimumFractionDigits occurences:
java.text.DecimalFormat.getMinimumFractionDigits()
java.text.NumberFormat.getMinimumFractionDigits()


Occurences of getMinimumIntegerDigits

getMinimumIntegerDigits occurences:
java.text.DecimalFormat.getMinimumIntegerDigits()
java.text.NumberFormat.getMinimumIntegerDigits()


Occurences of getMinimumSize

getMinimumSize occurences:
java.awt.Component.getMinimumSize()
java.awt.Container.getMinimumSize()
java.awt.List.getMinimumSize()
java.awt.List.getMinimumSize(int)
java.awt.TextArea.getMinimumSize()
java.awt.TextArea.getMinimumSize(int, int)
java.awt.TextField.getMinimumSize()
java.awt.TextField.getMinimumSize(int)
javax.swing.border.TitledBorder.getMinimumSize(java.awt.Component)
javax.swing.JComponent.getMinimumSize()
javax.swing.JScrollBar.getMinimumSize()
javax.swing.JToolBar.Separator.getMinimumSize()
javax.swing.plaf.basic.BasicArrowButton.getMinimumSize()
javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneDivider.getMinimumSize()
javax.swing.plaf.basic.BasicSplitPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextAreaUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.LayerUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalComboBoxButton.getMinimumSize()
javax.swing.plaf.metal.MetalComboBoxUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalDesktopIconUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollButton.getMinimumSize()
javax.swing.plaf.multi.MultiButtonUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthGraphicsUtils.getMinimumSize(javax.swing.plaf.synth.SynthContext, java.awt.Font, java.lang.String, javax.swing.Icon, int, int, int, int, int, int)
javax.swing.plaf.synth.SynthLabelUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.getMinimumSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.getMinimumSize(javax.swing.JComponent)


Occurences of getMinimumSpan

getMinimumSpan occurences:
javax.swing.text.AsyncBoxView.getMinimumSpan(int)
javax.swing.text.BoxView.getMinimumSpan(int)
javax.swing.text.ComponentView.getMinimumSpan(int)
javax.swing.text.GlyphView.getMinimumSpan(int)
javax.swing.text.html.BlockView.getMinimumSpan(int)
javax.swing.text.html.ParagraphView.getMinimumSpan(int)
javax.swing.text.View.getMinimumSpan(int)
javax.swing.text.WrappedPlainView.getMinimumSpan(int)


Occurences of getMinimumThumbSize

getMinimumThumbSize occurences:
javax.swing.plaf.basic.BasicScrollBarUI.getMinimumThumbSize()
javax.swing.plaf.metal.MetalScrollBarUI.getMinimumThumbSize()
javax.swing.plaf.synth.SynthScrollBarUI.getMinimumThumbSize()


Occurences of getMinorString

getMinorString occurences:
org.ietf.jgss.GSSException.getMinorString()
org.ietf.jgss.MessageProp.getMinorString()


Occurences of getMinorVersion

getMinorVersion occurences:
java.awt.color.ICC_Profile.getMinorVersion()
java.sql.Driver.getMinorVersion()


Occurences of getMinSelectionIndex

getMinSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.getMinSelectionIndex()
javax.swing.JList.getMinSelectionIndex()
javax.swing.ListSelectionModel.getMinSelectionIndex()


Occurences of getMinSelectionRow

getMinSelectionRow occurences:
javax.swing.JTree.getMinSelectionRow()
javax.swing.tree.DefaultTreeSelectionModel.getMinSelectionRow()
javax.swing.tree.TreeSelectionModel.getMinSelectionRow()


Occurences of getMinTileX

getMinTileX occurences:
java.awt.image.BufferedImage.getMinTileX()
java.awt.image.RenderedImage.getMinTileX()


Occurences of getMinTileY

getMinTileY occurences:
java.awt.image.BufferedImage.getMinTileY()
java.awt.image.RenderedImage.getMinTileY()


Occurences of getMinute

getMinute occurences:
java.time.LocalDateTime.getMinute()
java.time.LocalTime.getMinute()
java.time.OffsetDateTime.getMinute()
java.time.OffsetTime.getMinute()
java.time.ZonedDateTime.getMinute()
javax.xml.datatype.XMLGregorianCalendar.getMinute()


Occurences of getMinutes

getMinutes occurences:
java.sql.Date.getMinutes()
java.util.Date.getMinutes()
javax.xml.datatype.Duration.getMinutes()


Occurences of getMinValue

getMinValue occurences:
java.awt.color.ColorSpace.getMinValue(int)
java.awt.color.ICC_ColorSpace.getMinValue(int)
javax.management.openmbean.OpenMBeanAttributeInfoSupport.getMinValue()
javax.management.openmbean.OpenMBeanParameterInfo.getMinValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.getMinValue()


Occurences of getMinX

getMinX occurences:
java.awt.geom.RectangularShape.getMinX()
java.awt.image.BufferedImage.getMinX()
java.awt.image.Raster.getMinX()
java.awt.image.renderable.RenderableImage.getMinX()
java.awt.image.renderable.RenderableImageOp.getMinX()
java.awt.image.RenderedImage.getMinX()


Occurences of getMinY

getMinY occurences:
java.awt.geom.RectangularShape.getMinY()
java.awt.image.BufferedImage.getMinY()
java.awt.image.Raster.getMinY()
java.awt.image.renderable.RenderableImage.getMinY()
java.awt.image.renderable.RenderableImageOp.getMinY()
java.awt.image.RenderedImage.getMinY()


Occurences of getMixer

getMixer occurences:
javax.sound.sampled.AudioSystem.getMixer(javax.sound.sampled.Mixer.Info)
javax.sound.sampled.spi.MixerProvider.getMixer(javax.sound.sampled.Mixer.Info)


Occurences of getMixerInfo

getMixerInfo occurences:
javax.sound.sampled.AudioSystem.getMixerInfo()
javax.sound.sampled.Mixer.getMixerInfo()
javax.sound.sampled.spi.MixerProvider.getMixerInfo()


Occurences of getMnemonic

getMnemonic occurences:
javax.swing.AbstractButton.getMnemonic()
javax.swing.ButtonModel.getMnemonic()
javax.swing.colorchooser.AbstractColorChooserPanel.getMnemonic()
javax.swing.DefaultButtonModel.getMnemonic()


Occurences of getMode

getMode occurences:
com.sun.source.tree.MemberReferenceTree.getMode()
java.awt.FileDialog.getMode()


Occurences of getModel

getModel occurences:
javax.swing.AbstractButton.getModel()
javax.swing.DefaultRowSorter.getModel()
javax.swing.DefaultRowSorter.ModelWrapper.getModel()
javax.swing.JComboBox.getModel()
javax.swing.JList.getModel()
javax.swing.JProgressBar.getModel()
javax.swing.JScrollBar.getModel()
javax.swing.JSlider.getModel()
javax.swing.JSpinner.getModel()
javax.swing.JSpinner.DateEditor.getModel()
javax.swing.JSpinner.ListEditor.getModel()
javax.swing.JSpinner.NumberEditor.getModel()
javax.swing.JTabbedPane.getModel()
javax.swing.JTable.getModel()
javax.swing.JTree.getModel()
javax.swing.plaf.basic.BasicFileChooserUI.getModel()
javax.swing.plaf.basic.BasicTreeUI.getModel()
javax.swing.RowFilter.Entry.getModel()
javax.swing.RowSorter.getModel()
javax.swing.tree.AbstractLayoutCache.getModel()


Occurences of getModelRowCount

getModelRowCount occurences:
javax.swing.DefaultRowSorter.getModelRowCount()
javax.swing.RowSorter.getModelRowCount()


Occurences of getModifiers

getModifiers occurences:
com.sun.source.tree.ClassTree.getModifiers()
com.sun.source.tree.MethodTree.getModifiers()
com.sun.source.tree.VariableTree.getModifiers()
java.awt.AWTKeyStroke.getModifiers()
java.awt.event.ActionEvent.getModifiers()
java.awt.event.InputEvent.getModifiers()
java.lang.Class.getModifiers()
java.lang.invoke.MethodHandleInfo.getModifiers()
java.lang.reflect.Constructor.getModifiers()
java.lang.reflect.Executable.getModifiers()
java.lang.reflect.Field.getModifiers()
java.lang.reflect.Member.getModifiers()
java.lang.reflect.Method.getModifiers()
java.lang.reflect.Parameter.getModifiers()
javax.lang.model.element.Element.getModifiers()


Occurences of getModifiersEx

getModifiersEx occurences:
java.awt.event.InputEvent.getModifiersEx()
java.awt.event.MouseEvent.getModifiersEx()


Occurences of getModulus

getModulus occurences:
java.security.interfaces.RSAKey.getModulus()
java.security.spec.RSAPrivateKeySpec.getModulus()
java.security.spec.RSAPublicKeySpec.getModulus()
javax.management.monitor.CounterMonitor.getModulus()
javax.management.monitor.CounterMonitorMBean.getModulus()


Occurences of getMonth

getMonth occurences:
java.sql.Time.getMonth()
java.time.LocalDate.getMonth()
java.time.LocalDateTime.getMonth()
java.time.MonthDay.getMonth()
java.time.OffsetDateTime.getMonth()
java.time.YearMonth.getMonth()
java.time.zone.ZoneOffsetTransitionRule.getMonth()
java.time.ZonedDateTime.getMonth()
java.util.Date.getMonth()
javax.xml.datatype.XMLGregorianCalendar.getMonth()


Occurences of getMonths

getMonths occurences:
java.text.DateFormatSymbols.getMonths()
java.time.Period.getMonths()
javax.xml.datatype.Duration.getMonths()


Occurences of getMonthValue

getMonthValue occurences:
java.time.LocalDate.getMonthValue()
java.time.LocalDateTime.getMonthValue()
java.time.MonthDay.getMonthValue()
java.time.OffsetDateTime.getMonthValue()
java.time.YearMonth.getMonthValue()
java.time.ZonedDateTime.getMonthValue()


Occurences of getMoreResults

getMoreResults occurences:
java.sql.Statement.getMoreResults()
java.sql.Statement.getMoreResults(int)


Occurences of getMostRecentFocusOwner

getMostRecentFocusOwner occurences:
java.awt.Window.getMostRecentFocusOwner()
javax.swing.JInternalFrame.getMostRecentFocusOwner()


Occurences of getMouseListener

getMouseListener occurences:
javax.swing.plaf.basic.BasicComboPopup.getMouseListener()
javax.swing.plaf.basic.ComboPopup.getMouseListener()


Occurences of getMouseListeners

getMouseListeners occurences:
java.awt.Component.getMouseListeners()
java.awt.TrayIcon.getMouseListeners()


Occurences of getMouseMotionListener

getMouseMotionListener occurences:
javax.swing.plaf.basic.BasicComboPopup.getMouseMotionListener()
javax.swing.plaf.basic.ComboPopup.getMouseMotionListener()


Occurences of getMouseMotionListeners

getMouseMotionListeners occurences:
java.awt.Component.getMouseMotionListeners()
java.awt.TrayIcon.getMouseMotionListeners()


Occurences of getMousePosition

getMousePosition occurences:
java.awt.Component.getMousePosition()
java.awt.Container.getMousePosition(boolean)


Occurences of getName

getName occurences:
com.sun.source.doctree.AttributeTree.getName()
com.sun.source.doctree.AuthorTree.getName()
com.sun.source.doctree.EndElementTree.getName()
com.sun.source.doctree.EntityTree.getName()
com.sun.source.doctree.IdentifierTree.getName()
com.sun.source.doctree.ParamTree.getName()
com.sun.source.doctree.SerialFieldTree.getName()
com.sun.source.doctree.StartElementTree.getName()
com.sun.source.tree.IdentifierTree.getName()
com.sun.source.tree.MemberReferenceTree.getName()
com.sun.source.tree.MethodTree.getName()
com.sun.source.tree.TypeParameterTree.getName()
com.sun.source.tree.VariableTree.getName()
com.sun.source.util.Plugin.getName()
com.sun.tools.doclets.Taglet.getName()
java.awt.color.ColorSpace.getName(int)
java.awt.Component.getName()
java.awt.Cursor.getName()
java.awt.datatransfer.Clipboard.getName()
java.awt.Font.getName()
java.awt.MenuComponent.getName()
java.beans.FeatureDescriptor.getName()
java.io.File.getName()
java.io.ObjectStreamClass.getName()
java.io.ObjectStreamField.getName()
java.lang.Character.getName(int)
java.lang.Class.getName()
java.lang.invoke.MethodHandleInfo.getName()
java.lang.management.BufferPoolMXBean.getName()
java.lang.management.CompilationMXBean.getName()
java.lang.management.MemoryManagerMXBean.getName()
java.lang.management.MemoryPoolMXBean.getName()
java.lang.management.OperatingSystemMXBean.getName()
java.lang.management.RuntimeMXBean.getName()
java.lang.Package.getName()
java.lang.reflect.Constructor.getName()
java.lang.reflect.Executable.getName()
java.lang.reflect.Field.getName()
java.lang.reflect.Member.getName()
java.lang.reflect.Method.getName()
java.lang.reflect.Parameter.getName()
java.lang.reflect.TypeVariable.getName()
java.lang.Thread.getName()
java.lang.ThreadGroup.getName()
java.net.HttpCookie.getName()
java.net.NetworkInterface.getName()
java.nio.file.attribute.UserPrincipalNotFoundException.getName()
java.nio.file.Path.getName(int)
java.security.acl.Acl.getName()
java.security.Identity.getName()
java.security.KeyStore.Entry.Attribute.getName()
java.security.Permission.getName()
java.security.PKCS12Attribute.getName()
java.security.Principal.getName()
java.security.Provider.getName()
java.security.spec.ECGenParameterSpec.getName()
java.sql.JDBCType.getName()
java.sql.SQLType.getName()
java.text.AttributedCharacterIterator.Attribute.getName()
java.util.logging.Level.getName()
java.util.logging.Logger.getName()
java.util.zip.ZipEntry.getName()
java.util.zip.ZipFile.getName()
javax.activation.DataHandler.getName()
javax.activation.DataSource.getName()
javax.activation.FileDataSource.getName()
javax.activation.URLDataSource.getName()
javax.crypto.ExemptionMechanism.getName()
javax.lang.model.util.Elements.getName(java.lang.CharSequence)
javax.management.Attribute.getName()
javax.management.loading.MLetContent.getName()
javax.management.MBeanFeatureInfo.getName()
javax.management.openmbean.OpenMBeanConstructorInfo.getName()
javax.management.openmbean.OpenMBeanOperationInfo.getName()
javax.management.openmbean.OpenMBeanParameterInfo.getName()
javax.management.relation.RoleInfo.getName()
javax.management.remote.JMXPrincipal.getName()
javax.naming.NameClassPair.getName()
javax.net.ssl.SSLSessionBindingEvent.getName()
javax.print.attribute.Attribute.getName()
javax.print.attribute.standard.Chromaticity.getName()
javax.print.attribute.standard.ColorSupported.getName()
javax.print.attribute.standard.Compression.getName()
javax.print.attribute.standard.Copies.getName()
javax.print.attribute.standard.CopiesSupported.getName()
javax.print.attribute.standard.DateTimeAtCompleted.getName()
javax.print.attribute.standard.DateTimeAtCreation.getName()
javax.print.attribute.standard.DateTimeAtProcessing.getName()
javax.print.attribute.standard.Destination.getName()
javax.print.attribute.standard.DialogTypeSelection.getName()
javax.print.attribute.standard.DocumentName.getName()
javax.print.attribute.standard.Fidelity.getName()
javax.print.attribute.standard.Finishings.getName()
javax.print.attribute.standard.JobHoldUntil.getName()
javax.print.attribute.standard.JobImpressions.getName()
javax.print.attribute.standard.JobImpressionsCompleted.getName()
javax.print.attribute.standard.JobImpressionsSupported.getName()
javax.print.attribute.standard.JobKOctets.getName()
javax.print.attribute.standard.JobKOctetsProcessed.getName()
javax.print.attribute.standard.JobKOctetsSupported.getName()
javax.print.attribute.standard.JobMediaSheets.getName()
javax.print.attribute.standard.JobMediaSheetsCompleted.getName()
javax.print.attribute.standard.JobMediaSheetsSupported.getName()
javax.print.attribute.standard.JobMessageFromOperator.getName()
javax.print.attribute.standard.JobName.getName()
javax.print.attribute.standard.JobOriginatingUserName.getName()
javax.print.attribute.standard.JobPriority.getName()
javax.print.attribute.standard.JobPrioritySupported.getName()
javax.print.attribute.standard.JobSheets.getName()
javax.print.attribute.standard.JobState.getName()
javax.print.attribute.standard.JobStateReason.getName()
javax.print.attribute.standard.JobStateReasons.getName()
javax.print.attribute.standard.Media.getName()
javax.print.attribute.standard.MediaPrintableArea.getName()
javax.print.attribute.standard.MediaSize.getName()
javax.print.attribute.standard.MultipleDocumentHandling.getName()
javax.print.attribute.standard.NumberOfDocuments.getName()
javax.print.attribute.standard.NumberOfInterveningJobs.getName()
javax.print.attribute.standard.NumberUp.getName()
javax.print.attribute.standard.NumberUpSupported.getName()
javax.print.attribute.standard.OrientationRequested.getName()
javax.print.attribute.standard.OutputDeviceAssigned.getName()
javax.print.attribute.standard.PageRanges.getName()
javax.print.attribute.standard.PagesPerMinute.getName()
javax.print.attribute.standard.PagesPerMinuteColor.getName()
javax.print.attribute.standard.PDLOverrideSupported.getName()
javax.print.attribute.standard.PresentationDirection.getName()
javax.print.attribute.standard.PrinterInfo.getName()
javax.print.attribute.standard.PrinterIsAcceptingJobs.getName()
javax.print.attribute.standard.PrinterLocation.getName()
javax.print.attribute.standard.PrinterMakeAndModel.getName()
javax.print.attribute.standard.PrinterMessageFromOperator.getName()
javax.print.attribute.standard.PrinterMoreInfo.getName()
javax.print.attribute.standard.PrinterMoreInfoManufacturer.getName()
javax.print.attribute.standard.PrinterName.getName()
javax.print.attribute.standard.PrinterResolution.getName()
javax.print.attribute.standard.PrinterState.getName()
javax.print.attribute.standard.PrinterStateReason.getName()
javax.print.attribute.standard.PrinterStateReasons.getName()
javax.print.attribute.standard.PrinterURI.getName()
javax.print.attribute.standard.PrintQuality.getName()
javax.print.attribute.standard.QueuedJobCount.getName()
javax.print.attribute.standard.ReferenceUriSchemesSupported.getName()
javax.print.attribute.standard.RequestingUserName.getName()
javax.print.attribute.standard.Severity.getName()
javax.print.attribute.standard.SheetCollate.getName()
javax.print.attribute.standard.Sides.getName()
javax.print.PrintService.getName()
javax.security.auth.callback.NameCallback.getName()
javax.security.auth.kerberos.KerberosPrincipal.getName()
javax.security.auth.x500.X500Principal.getName()
javax.security.auth.x500.X500Principal.getName(java.lang.String)
javax.security.auth.x500.X500Principal.getName(java.lang.String, java.util.Map)
javax.sound.midi.MidiDevice.Info.getName()
javax.sound.midi.Soundbank.getName()
javax.sound.midi.SoundbankResource.getName()
javax.sound.sampled.Mixer.Info.getName()
javax.sound.sampled.Port.Info.getName()
javax.sound.sampled.ReverbType.getName()
javax.swing.filechooser.FileView.getName(java.io.File)
javax.swing.JFileChooser.getName(java.io.File)
javax.swing.LookAndFeel.getName()
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.getName(java.io.File)
javax.swing.plaf.metal.DefaultMetalTheme.getName()
javax.swing.plaf.metal.MetalLookAndFeel.getName()
javax.swing.plaf.metal.MetalTheme.getName()
javax.swing.plaf.metal.OceanTheme.getName()
javax.swing.plaf.multi.MultiLookAndFeel.getName()
javax.swing.plaf.nimbus.NimbusLookAndFeel.getName()
javax.swing.plaf.synth.Region.getName()
javax.swing.plaf.synth.SynthLookAndFeel.getName()
javax.swing.text.AbstractDocument.AbstractElement.getName()
javax.swing.text.AbstractDocument.BranchElement.getName()
javax.swing.text.AbstractDocument.LeafElement.getName()
javax.swing.text.DefaultStyledDocument.SectionElement.getName()
javax.swing.text.Element.getName()
javax.swing.text.html.HTMLDocument.BlockElement.getName()
javax.swing.text.html.HTMLDocument.RunElement.getName()
javax.swing.text.html.parser.AttributeList.getName()
javax.swing.text.html.parser.DTD.getName()
javax.swing.text.html.parser.Element.getName()
javax.swing.text.html.parser.Entity.getName()
javax.swing.text.Keymap.getName()
javax.swing.text.Style.getName()
javax.swing.text.StyleContext.NamedStyle.getName()
javax.swing.UIManager.LookAndFeelInfo.getName()
javax.tools.DocumentationTool.Location.getName()
javax.tools.FileObject.getName()
javax.tools.ForwardingFileObject.getName()
javax.tools.JavaFileManager.Location.getName()
javax.tools.SimpleJavaFileObject.getName()
javax.tools.StandardLocation.getName()
javax.xml.bind.JAXBElement.getName()
javax.xml.crypto.dsig.keyinfo.KeyName.getName()
javax.xml.soap.MimeHeader.getName()
javax.xml.stream.events.Attribute.getName()
javax.xml.stream.events.EndElement.getName()
javax.xml.stream.events.EntityDeclaration.getName()
javax.xml.stream.events.EntityReference.getName()
javax.xml.stream.events.NotationDeclaration.getName()
javax.xml.stream.events.StartElement.getName()
javax.xml.stream.util.StreamReaderDelegate.getName()
javax.xml.stream.XMLStreamReader.getName()
org.ietf.jgss.GSSCredential.getName()
org.ietf.jgss.GSSCredential.getName(org.ietf.jgss.Oid)
org.w3c.dom.Attr.getName()
org.w3c.dom.DocumentType.getName()
org.w3c.dom.NameList.getName(int)
org.xml.sax.AttributeList.getName(int)
org.xml.sax.helpers.AttributeListImpl.getName(int)


Occurences of getNameConstraints

getNameConstraints occurences:
java.security.cert.TrustAnchor.getNameConstraints()
java.security.cert.X509CertSelector.getNameConstraints()


Occurences of getNameInNamespace

getNameInNamespace occurences:
javax.naming.Context.getNameInNamespace()
javax.naming.InitialContext.getNameInNamespace()
javax.naming.NameClassPair.getNameInNamespace()


Occurences of getNameParser

getNameParser occurences:
javax.naming.Context.getNameParser(java.lang.String)
javax.naming.Context.getNameParser(javax.naming.Name)
javax.naming.InitialContext.getNameParser(java.lang.String)
javax.naming.InitialContext.getNameParser(javax.naming.Name)


Occurences of getNames

getNames occurences:
javax.activation.MimeTypeParameterList.getNames()
javax.script.ScriptEngineFactory.getNames()


Occurences of getNamespaceContext

getNamespaceContext occurences:
javax.xml.stream.events.StartElement.getNamespaceContext()
javax.xml.stream.util.StreamReaderDelegate.getNamespaceContext()
javax.xml.stream.XMLEventWriter.getNamespaceContext()
javax.xml.stream.XMLStreamReader.getNamespaceContext()
javax.xml.stream.XMLStreamWriter.getNamespaceContext()
javax.xml.xpath.XPath.getNamespaceContext()


Occurences of getNamespaceCount

getNamespaceCount occurences:
javax.xml.stream.util.StreamReaderDelegate.getNamespaceCount()
javax.xml.stream.XMLStreamReader.getNamespaceCount()


Occurences of getNamespaceMap

getNamespaceMap occurences:
javax.xml.crypto.dsig.spec.XPathFilterParameterSpec.getNamespaceMap()
javax.xml.crypto.dsig.spec.XPathType.getNamespaceMap()


Occurences of getNamespacePrefix

getNamespacePrefix occurences:
javax.xml.crypto.dom.DOMCryptoContext.getNamespacePrefix(java.lang.String, java.lang.String)
javax.xml.crypto.XMLCryptoContext.getNamespacePrefix(java.lang.String, java.lang.String)
javax.xml.stream.util.StreamReaderDelegate.getNamespacePrefix(int)
javax.xml.stream.XMLStreamReader.getNamespacePrefix(int)


Occurences of getNamespaces

getNamespaces occurences:
javax.xml.stream.events.EndElement.getNamespaces()
javax.xml.stream.events.StartElement.getNamespaces()


Occurences of getNamespaceURI

getNamespaceURI occurences:
javax.imageio.metadata.IIOMetadataNode.getNamespaceURI()
javax.xml.namespace.NamespaceContext.getNamespaceURI(java.lang.String)
javax.xml.namespace.QName.getNamespaceURI()
javax.xml.soap.SOAPElement.getNamespaceURI(java.lang.String)
javax.xml.stream.events.Namespace.getNamespaceURI()
javax.xml.stream.events.StartElement.getNamespaceURI(java.lang.String)
javax.xml.stream.util.StreamReaderDelegate.getNamespaceURI()
javax.xml.stream.util.StreamReaderDelegate.getNamespaceURI(int)
javax.xml.stream.util.StreamReaderDelegate.getNamespaceURI(java.lang.String)
javax.xml.stream.XMLStreamReader.getNamespaceURI()
javax.xml.stream.XMLStreamReader.getNamespaceURI(int)
javax.xml.stream.XMLStreamReader.getNamespaceURI(java.lang.String)
org.w3c.dom.NameList.getNamespaceURI(int)
org.w3c.dom.Node.getNamespaceURI()


Occurences of getNano

getNano occurences:
java.time.Duration.getNano()
java.time.Instant.getNano()
java.time.LocalDateTime.getNano()
java.time.LocalTime.getNano()
java.time.OffsetDateTime.getNano()
java.time.OffsetTime.getNano()
java.time.ZonedDateTime.getNano()


Occurences of getNativesForFlavor

getNativesForFlavor occurences:
java.awt.datatransfer.FlavorTable.getNativesForFlavor(java.awt.datatransfer.DataFlavor)
java.awt.datatransfer.SystemFlavorMap.getNativesForFlavor(java.awt.datatransfer.DataFlavor)


Occurences of getNativesForFlavors

getNativesForFlavors occurences:
java.awt.datatransfer.FlavorMap.getNativesForFlavors(java.awt.datatransfer.DataFlavor:A)
java.awt.datatransfer.SystemFlavorMap.getNativesForFlavors(java.awt.datatransfer.DataFlavor:A)


Occurences of getNavigationFilter

getNavigationFilter occurences:
javax.swing.JFormattedTextField.AbstractFormatter.getNavigationFilter()
javax.swing.text.DefaultFormatter.getNavigationFilter()
javax.swing.text.JTextComponent.getNavigationFilter()


Occurences of getNbNotifications

getNbNotifications occurences:
javax.management.timer.Timer.getNbNotifications()
javax.management.timer.TimerMBean.getNbNotifications()


Occurences of getNbOccurences

getNbOccurences occurences:
javax.management.timer.Timer.getNbOccurences(java.lang.Integer)
javax.management.timer.TimerMBean.getNbOccurences(java.lang.Integer)


Occurences of getNCharacterStream

getNCharacterStream occurences:
java.sql.CallableStatement.getNCharacterStream(int)
java.sql.CallableStatement.getNCharacterStream(java.lang.String)
java.sql.ResultSet.getNCharacterStream(int)
java.sql.ResultSet.getNCharacterStream(java.lang.String)


Occurences of getNClob

getNClob occurences:
java.sql.CallableStatement.getNClob(int)
java.sql.CallableStatement.getNClob(java.lang.String)
java.sql.ResultSet.getNClob(int)
java.sql.ResultSet.getNClob(java.lang.String)


Occurences of getNeedClientAuth

getNeedClientAuth occurences:
javax.net.ssl.SSLEngine.getNeedClientAuth()
javax.net.ssl.SSLParameters.getNeedClientAuth()
javax.net.ssl.SSLServerSocket.getNeedClientAuth()
javax.net.ssl.SSLSocket.getNeedClientAuth()
javax.rmi.ssl.SslRMIServerSocketFactory.getNeedClientAuth()


Occurences of getNeededLocation

getNeededLocation occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.getNeededLocation(int, int)
javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController.getNeededLocation(int, int)


Occurences of getNegotiatedProperty

getNegotiatedProperty occurences:
javax.security.sasl.SaslClient.getNegotiatedProperty(java.lang.String)
javax.security.sasl.SaslServer.getNegotiatedProperty(java.lang.String)


Occurences of getNestingKind

getNestingKind occurences:
javax.lang.model.element.TypeElement.getNestingKind()
javax.tools.ForwardingJavaFileObject.getNestingKind()
javax.tools.JavaFileObject.getNestingKind()
javax.tools.SimpleJavaFileObject.getNestingKind()


Occurences of getNewValue

getNewValue occurences:
java.beans.PropertyChangeEvent.getNewValue()
java.util.prefs.PreferenceChangeEvent.getNewValue()
javax.management.AttributeChangeNotification.getNewValue()
org.w3c.dom.events.MutationEvent.getNewValue()


Occurences of getNextEntry

getNextEntry occurences:
java.util.jar.JarInputStream.getNextEntry()
java.util.zip.ZipInputStream.getNextEntry()


Occurences of getNextLeftHit

getNextLeftHit occurences:
java.awt.font.TextLayout.getNextLeftHit(int)
java.awt.font.TextLayout.getNextLeftHit(int, java.awt.font.TextLayout.CaretPolicy)
java.awt.font.TextLayout.getNextLeftHit(java.awt.font.TextHitInfo)


Occurences of getNextMatch

getNextMatch occurences:
javax.swing.JList.getNextMatch(java.lang.String, int, javax.swing.text.Position.Bias)
javax.swing.JTree.getNextMatch(java.lang.String, int, javax.swing.text.Position.Bias)


Occurences of getNextNorthSouthVisualPositionFrom

getNextNorthSouthVisualPositionFrom occurences:
javax.swing.text.CompositeView.getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)
javax.swing.text.ParagraphView.getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)


Occurences of getNextRightHit

getNextRightHit occurences:
java.awt.font.TextLayout.getNextRightHit(int)
java.awt.font.TextLayout.getNextRightHit(int, java.awt.font.TextLayout.CaretPolicy)
java.awt.font.TextLayout.getNextRightHit(java.awt.font.TextHitInfo)


Occurences of getNextSibling

getNextSibling occurences:
javax.imageio.metadata.IIOMetadataNode.getNextSibling()
javax.swing.tree.DefaultMutableTreeNode.getNextSibling()
javax.xml.crypto.dsig.dom.DOMSignContext.getNextSibling()
javax.xml.transform.dom.DOMResult.getNextSibling()
org.w3c.dom.Node.getNextSibling()


Occurences of getNextValue

getNextValue occurences:
javax.swing.JSpinner.getNextValue()
javax.swing.SpinnerDateModel.getNextValue()
javax.swing.SpinnerListModel.getNextValue()
javax.swing.SpinnerModel.getNextValue()
javax.swing.SpinnerNumberModel.getNextValue()


Occurences of getNextVisualPositionFrom

getNextVisualPositionFrom occurences:
javax.swing.plaf.basic.BasicTextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias:A)
javax.swing.plaf.multi.MultiTextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias:A)
javax.swing.plaf.TextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias:A)
javax.swing.text.AsyncBoxView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)
javax.swing.text.CompositeView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)
javax.swing.text.GlyphView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)
javax.swing.text.GlyphView.GlyphPainter.getNextVisualPositionFrom(javax.swing.text.GlyphView, int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)
javax.swing.text.NavigationFilter.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias:A)
javax.swing.text.View.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias:A)


Occurences of getNextWarning

getNextWarning occurences:
java.sql.SQLWarning.getNextWarning()
javax.sql.rowset.RowSetWarning.getNextWarning()


Occurences of getNode

getNode occurences:
java.util.prefs.PreferenceChangeEvent.getNode()
javax.xml.bind.helpers.AbstractMarshallerImpl.getNode(java.lang.Object)
javax.xml.bind.helpers.ValidationEventLocatorImpl.getNode()
javax.xml.bind.Marshaller.getNode(java.lang.Object)
javax.xml.bind.ValidationEventLocator.getNode()
javax.xml.crypto.dom.DOMStructure.getNode()
javax.xml.crypto.dsig.dom.DOMValidateContext.getNode()
javax.xml.transform.dom.DOMResult.getNode()
javax.xml.transform.dom.DOMSource.getNode()


Occurences of getNodeDimensions

getNodeDimensions occurences:
javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(java.lang.Object, int, int, boolean, java.awt.Rectangle)
javax.swing.tree.AbstractLayoutCache.getNodeDimensions()
javax.swing.tree.AbstractLayoutCache.getNodeDimensions(java.lang.Object, int, int, boolean, java.awt.Rectangle)
javax.swing.tree.AbstractLayoutCache.NodeDimensions.getNodeDimensions(java.lang.Object, int, int, boolean, java.awt.Rectangle)


Occurences of getNodeName

getNodeName occurences:
javax.imageio.metadata.IIOMetadataNode.getNodeName()
org.w3c.dom.Node.getNodeName()


Occurences of getNodeType

getNodeType occurences:
javax.imageio.metadata.IIOMetadataNode.getNodeType()
org.w3c.dom.Node.getNodeType()


Occurences of getNodeValue

getNodeValue occurences:
javax.imageio.metadata.IIOMetadataNode.getNodeValue()
org.w3c.dom.Node.getNodeValue()


Occurences of getNonMatchingMimeHeaders

getNonMatchingMimeHeaders occurences:
javax.xml.soap.AttachmentPart.getNonMatchingMimeHeaders(java.lang.String:A)
javax.xml.soap.SOAPPart.getNonMatchingMimeHeaders(java.lang.String:A)


Occurences of getNormalizedComponents

getNormalizedComponents occurences:
java.awt.image.ColorModel.getNormalizedComponents(int:A, int, float:A, int)
java.awt.image.ColorModel.getNormalizedComponents(java.lang.Object, float:A, int)
java.awt.image.ComponentColorModel.getNormalizedComponents(int:A, int, float:A, int)
java.awt.image.ComponentColorModel.getNormalizedComponents(java.lang.Object, float:A, int)


Occurences of getNotAfter

getNotAfter occurences:
java.security.cert.X509Certificate.getNotAfter()
javax.security.cert.X509Certificate.getNotAfter()


Occurences of getNotationName

getNotationName occurences:
javax.xml.stream.events.EntityDeclaration.getNotationName()
org.w3c.dom.Entity.getNotationName()


Occurences of getNotations

getNotations occurences:
javax.xml.stream.events.DTD.getNotations()
org.w3c.dom.DocumentType.getNotations()


Occurences of getNotBefore

getNotBefore occurences:
java.security.cert.X509Certificate.getNotBefore()
javax.security.cert.X509Certificate.getNotBefore()


Occurences of getNotification

getNotification occurences:
javax.management.modelmbean.ModelMBeanInfo.getNotification(java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getNotification(java.lang.String)
javax.management.remote.TargetedNotification.getNotification()
javax.naming.ldap.UnsolicitedNotificationEvent.getNotification()


Occurences of getNotificationIDs

getNotificationIDs occurences:
javax.management.timer.Timer.getNotificationIDs(java.lang.String)
javax.management.timer.TimerMBean.getNotificationIDs(java.lang.String)


Occurences of getNotificationInfo

getNotificationInfo occurences:
javax.management.MBeanServerDelegate.getNotificationInfo()
javax.management.modelmbean.RequiredModelMBean.getNotificationInfo()
javax.management.monitor.CounterMonitor.getNotificationInfo()
javax.management.monitor.GaugeMonitor.getNotificationInfo()
javax.management.monitor.StringMonitor.getNotificationInfo()
javax.management.NotificationBroadcaster.getNotificationInfo()
javax.management.NotificationBroadcasterSupport.getNotificationInfo()
javax.management.relation.RelationService.getNotificationInfo()
javax.management.remote.JMXConnectorServer.getNotificationInfo()
javax.management.StandardEmitterMBean.getNotificationInfo()
javax.management.timer.Timer.getNotificationInfo()


Occurences of getNotificationMessage

getNotificationMessage occurences:
javax.management.timer.Timer.getNotificationMessage(java.lang.Integer)
javax.management.timer.TimerMBean.getNotificationMessage(java.lang.Integer)


Occurences of getNotifications

getNotifications occurences:
javax.management.MBeanInfo.getNotifications()
javax.management.modelmbean.ModelMBeanInfo.getNotifications()
javax.management.openmbean.OpenMBeanInfo.getNotifications()


Occurences of getNotificationType

getNotificationType occurences:
javax.management.timer.Timer.getNotificationType(java.lang.Integer)
javax.management.timer.TimerMBean.getNotificationType(java.lang.Integer)


Occurences of getNotificationUserData

getNotificationUserData occurences:
javax.management.timer.Timer.getNotificationUserData(java.lang.Integer)
javax.management.timer.TimerMBean.getNotificationUserData(java.lang.Integer)


Occurences of getNotify

getNotify occurences:
javax.management.monitor.CounterMonitor.getNotify()
javax.management.monitor.CounterMonitorMBean.getNotify()


Occurences of getNotifyDiffer

getNotifyDiffer occurences:
javax.management.monitor.StringMonitor.getNotifyDiffer()
javax.management.monitor.StringMonitorMBean.getNotifyDiffer()


Occurences of getNotifyHigh

getNotifyHigh occurences:
javax.management.monitor.GaugeMonitor.getNotifyHigh()
javax.management.monitor.GaugeMonitorMBean.getNotifyHigh()


Occurences of getNotifyLow

getNotifyLow occurences:
javax.management.monitor.GaugeMonitor.getNotifyLow()
javax.management.monitor.GaugeMonitorMBean.getNotifyLow()


Occurences of getNotifyMatch

getNotifyMatch occurences:
javax.management.monitor.StringMonitor.getNotifyMatch()
javax.management.monitor.StringMonitorMBean.getNotifyMatch()


Occurences of getNow

getNow occurences:
java.util.concurrent.CompletableFuture.getNow(java.lang.Object)
java.util.concurrent.CompletableFuture.getNow(T)


Occurences of getNString

getNString occurences:
java.sql.CallableStatement.getNString(int)
java.sql.CallableStatement.getNString(java.lang.String)
java.sql.ResultSet.getNString(int)
java.sql.ResultSet.getNString(java.lang.String)


Occurences of getNumBands

getNumBands occurences:
java.awt.image.Raster.getNumBands()
java.awt.image.SampleModel.getNumBands()
javax.imageio.ImageTypeSpecifier.getNumBands()


Occurences of getNumberInstance

getNumberInstance occurences:
java.text.NumberFormat.getNumberInstance()
java.text.NumberFormat.getNumberInstance(java.util.Locale)
java.text.spi.NumberFormatProvider.getNumberInstance(java.util.Locale)


Occurences of getNumberOfPages

getNumberOfPages occurences:
java.awt.print.Book.getNumberOfPages()
java.awt.print.Pageable.getNumberOfPages()


Occurences of getNumComponents

getNumComponents occurences:
java.awt.color.ColorSpace.getNumComponents()
java.awt.color.ICC_Profile.getNumComponents()
java.awt.image.ColorModel.getNumComponents()
java.awt.image.LookupTable.getNumComponents()
javax.imageio.ImageTypeSpecifier.getNumComponents()


Occurences of getNumDataElements

getNumDataElements occurences:
java.awt.image.ComponentSampleModel.getNumDataElements()
java.awt.image.MultiPixelPackedSampleModel.getNumDataElements()
java.awt.image.Raster.getNumDataElements()
java.awt.image.SampleModel.getNumDataElements()
java.awt.image.SinglePixelPackedSampleModel.getNumDataElements()


Occurences of getNumericValue

getNumericValue occurences:
java.lang.Character.getNumericValue(char)
java.lang.Character.getNumericValue(int)


Occurences of getNumGlyphs

getNumGlyphs occurences:
java.awt.Font.getNumGlyphs()
java.awt.font.GlyphVector.getNumGlyphs()


Occurences of getNumThumbnails

getNumThumbnails occurences:
javax.imageio.IIOImage.getNumThumbnails()
javax.imageio.ImageReader.getNumThumbnails(int)


Occurences of getNumXTiles

getNumXTiles occurences:
java.awt.image.BufferedImage.getNumXTiles()
java.awt.image.RenderedImage.getNumXTiles()


Occurences of getNumYTiles

getNumYTiles occurences:
java.awt.image.BufferedImage.getNumYTiles()
java.awt.image.RenderedImage.getNumYTiles()


Occurences of getObject

getObject occurences:
java.security.GuardedObject.getObject()
java.security.SignedObject.getObject()
java.sql.CallableStatement.getObject(int)
java.sql.CallableStatement.getObject(int, java.lang.Class)
java.sql.CallableStatement.getObject(int, java.util.Map)
java.sql.CallableStatement.getObject(java.lang.String)
java.sql.CallableStatement.getObject(java.lang.String, java.lang.Class)
java.sql.CallableStatement.getObject(java.lang.String, java.util.Map)
java.sql.Ref.getObject()
java.sql.Ref.getObject(java.util.Map)
java.sql.ResultSet.getObject(int)
java.sql.ResultSet.getObject(int, java.lang.Class)
java.sql.ResultSet.getObject(int, java.util.Map)
java.sql.ResultSet.getObject(java.lang.String)
java.sql.ResultSet.getObject(java.lang.String, java.lang.Class)
java.sql.ResultSet.getObject(java.lang.String, java.util.Map)
java.util.ResourceBundle.getObject(java.lang.String)
javax.crypto.SealedObject.getObject(java.security.Key)
javax.crypto.SealedObject.getObject(java.security.Key, java.lang.String)
javax.crypto.SealedObject.getObject(javax.crypto.Cipher)
javax.naming.Binding.getObject()
javax.naming.spi.DirStateFactory.Result.getObject()
javax.sql.rowset.serial.SerialJavaObject.getObject()
javax.sql.rowset.serial.SerialRef.getObject()
javax.sql.rowset.serial.SerialRef.getObject(java.util.Map)
javax.xml.bind.helpers.ValidationEventLocatorImpl.getObject()
javax.xml.bind.ValidationEventLocator.getObject()


Occurences of getObjectArrayMaxLength

getObjectArrayMaxLength occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectArrayMaxLength(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectArrayMaxLength(java.lang.String)


Occurences of getObjectArrayMinLength

getObjectArrayMinLength occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectArrayMinLength(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectArrayMinLength(java.lang.String)


Occurences of getObjectClass

getObjectClass occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectClass(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectClass(java.lang.String)


Occurences of getObjectDefaultValue

getObjectDefaultValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectDefaultValue(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectDefaultValue(java.lang.String)


Occurences of getObjectEnumerations

getObjectEnumerations occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectEnumerations(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectEnumerations(java.lang.String)


Occurences of getObjectInstance

getObjectInstance occurences:
javax.management.MBeanServer.getObjectInstance(javax.management.ObjectName)
javax.management.MBeanServerConnection.getObjectInstance(javax.management.ObjectName)
javax.management.remote.rmi.RMIConnection.getObjectInstance(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.getObjectInstance(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.getObjectInstance(javax.management.ObjectName, javax.security.auth.Subject)
javax.naming.spi.DirectoryManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
javax.naming.spi.DirObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
javax.naming.spi.NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
javax.naming.spi.ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)


Occurences of getObjectMaxValue

getObjectMaxValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectMaxValue(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectMaxValue(java.lang.String)


Occurences of getObjectMinValue

getObjectMinValue occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectMinValue(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectMinValue(java.lang.String)


Occurences of getObjectName

getObjectName occurences:
java.lang.management.PlatformManagedObject.getObjectName()
javax.management.MBeanServerInvocationHandler.getObjectName()
javax.management.ObjectInstance.getObjectName()
javax.management.relation.RelationNotification.getObjectName()


Occurences of getObjectValueType

getObjectValueType occurences:
javax.imageio.metadata.IIOMetadataFormat.getObjectValueType(java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.getObjectValueType(java.lang.String)


Occurences of getObservedAttribute

getObservedAttribute occurences:
javax.management.monitor.Monitor.getObservedAttribute()
javax.management.monitor.MonitorMBean.getObservedAttribute()
javax.management.monitor.MonitorNotification.getObservedAttribute()


Occurences of getObservedObject

getObservedObject occurences:
javax.management.monitor.Monitor.getObservedObject()
javax.management.monitor.MonitorMBean.getObservedObject()
javax.management.monitor.MonitorNotification.getObservedObject()


Occurences of getObservedObjects

getObservedObjects occurences:
javax.management.monitor.Monitor.getObservedObjects()
javax.management.monitor.MonitorMBean.getObservedObjects()


Occurences of getOffset

getOffset occurences:
java.awt.image.ComponentSampleModel.getOffset(int, int)
java.awt.image.ComponentSampleModel.getOffset(int, int, int)
java.awt.image.DataBuffer.getOffset()
java.awt.image.LookupTable.getOffset()
java.awt.image.MultiPixelPackedSampleModel.getOffset(int, int)
java.awt.image.SinglePixelPackedSampleModel.getOffset(int, int)
java.io.ObjectStreamField.getOffset()
java.net.DatagramPacket.getOffset()
java.text.CollationElementIterator.getOffset()
java.time.chrono.ChronoZonedDateTime.getOffset()
java.time.OffsetDateTime.getOffset()
java.time.OffsetTime.getOffset()
java.time.zone.ZoneRules.getOffset(java.time.Instant)
java.time.zone.ZoneRules.getOffset(java.time.LocalDateTime)
java.time.ZonedDateTime.getOffset()
java.util.SimpleTimeZone.getOffset(int, int, int, int, int, int)
java.util.SimpleTimeZone.getOffset(long)
java.util.TimeZone.getOffset(int, int, int, int, int, int)
java.util.TimeZone.getOffset(long)
javax.imageio.stream.IIOByteBuffer.getOffset()
javax.management.monitor.CounterMonitor.getOffset()
javax.management.monitor.CounterMonitorMBean.getOffset()
javax.print.attribute.EnumSyntax.getOffset()
javax.print.attribute.standard.Finishings.getOffset()
javax.print.attribute.standard.OrientationRequested.getOffset()
javax.print.attribute.standard.PrintQuality.getOffset()
javax.swing.event.DocumentEvent.getOffset()
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.getOffset()
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getOffset()
javax.swing.text.BoxView.getOffset(int, int)
javax.swing.text.DefaultStyledDocument.ElementSpec.getOffset()
javax.swing.text.Position.getOffset()
javax.xml.bind.helpers.ValidationEventLocatorImpl.getOffset()
javax.xml.bind.ValidationEventLocator.getOffset()


Occurences of getOffsetAfter

getOffsetAfter occurences:
java.time.zone.ZoneOffsetTransition.getOffsetAfter()
java.time.zone.ZoneOffsetTransitionRule.getOffsetAfter()


Occurences of getOffsetBefore

getOffsetBefore occurences:
java.time.zone.ZoneOffsetTransition.getOffsetBefore()
java.time.zone.ZoneOffsetTransitionRule.getOffsetBefore()


Occurences of getOffsets

getOffsets occurences:
java.awt.image.DataBuffer.getOffsets()
java.awt.image.RescaleOp.getOffsets(float:A)


Occurences of getOldValue

getOldValue occurences:
java.beans.PropertyChangeEvent.getOldValue()
javax.management.AttributeChangeNotification.getOldValue()


Occurences of getOpenType

getOpenType occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.getOpenType()
javax.management.openmbean.OpenMBeanParameterInfo.getOpenType()
javax.management.openmbean.OpenMBeanParameterInfoSupport.getOpenType()


Occurences of getOperation

getOperation occurences:
java.rmi.server.Operation.getOperation()
javax.management.modelmbean.ModelMBeanInfo.getOperation(java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.getOperation(java.lang.String)


Occurences of getOperations

getOperations occurences:
java.rmi.server.Skeleton.getOperations()
javax.management.MBeanInfo.getOperations()
javax.management.modelmbean.ModelMBeanInfo.getOperations()
javax.management.openmbean.OpenMBeanInfo.getOperations()


Occurences of getOption

getOption occurences:
java.net.SocketOptions.getOption(int)
java.nio.channels.NetworkChannel.getOption(java.net.SocketOption)


Occurences of getOptions

getOptions occurences:
java.security.cert.PKIXRevocationChecker.getOptions()
javax.annotation.processing.ProcessingEnvironment.getOptions()
javax.security.auth.callback.ConfirmationCallback.getOptions()
javax.security.auth.login.AppConfigurationEntry.getOptions()
javax.swing.JOptionPane.getOptions()


Occurences of getOptionType

getOptionType occurences:
javax.security.auth.callback.ConfirmationCallback.getOptionType()
javax.swing.JOptionPane.getOptionType()


Occurences of getOrDefault

getOrDefault occurences:
java.security.Provider.getOrDefault(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.getOrDefault(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.getOrDefault(java.lang.Object, V)
java.util.concurrent.ConcurrentMap.getOrDefault(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentMap.getOrDefault(java.lang.Object, V)
java.util.concurrent.ConcurrentSkipListMap.getOrDefault(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.getOrDefault(java.lang.Object, V)
java.util.HashMap.getOrDefault(java.lang.Object, java.lang.Object)
java.util.HashMap.getOrDefault(java.lang.Object, V)
java.util.Hashtable.getOrDefault(java.lang.Object, java.lang.Object)
java.util.Hashtable.getOrDefault(java.lang.Object, V)
java.util.LinkedHashMap.getOrDefault(java.lang.Object, java.lang.Object)
java.util.LinkedHashMap.getOrDefault(java.lang.Object, V)
java.util.Map.getOrDefault(java.lang.Object, java.lang.Object)
java.util.Map.getOrDefault(java.lang.Object, V)


Occurences of getOrientation

getOrientation occurences:
java.awt.Adjustable.getOrientation()
java.awt.ComponentOrientation.getOrientation(java.util.Locale)
java.awt.ComponentOrientation.getOrientation(java.util.ResourceBundle)
java.awt.print.PageFormat.getOrientation()
java.awt.Scrollbar.getOrientation()
java.awt.ScrollPaneAdjustable.getOrientation()
javax.swing.JProgressBar.getOrientation()
javax.swing.JScrollBar.getOrientation()
javax.swing.JSeparator.getOrientation()
javax.swing.JSlider.getOrientation()
javax.swing.JSplitPane.getOrientation()
javax.swing.JToolBar.getOrientation()
javax.swing.plaf.basic.BasicSplitPaneUI.getOrientation()
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.getOrientation()


Occurences of getOriginal

getOriginal occurences:
javax.sql.rowset.CachedRowSet.getOriginal()
javax.sql.RowSetInternal.getOriginal()


Occurences of getOriginalRow

getOriginalRow occurences:
javax.sql.rowset.CachedRowSet.getOriginalRow()
javax.sql.RowSetInternal.getOriginalRow()


Occurences of getOriginatingProvider

getOriginatingProvider occurences:
javax.imageio.ImageReader.getOriginatingProvider()
javax.imageio.ImageWriter.getOriginatingProvider()


Occurences of getOtherPrimeInfo

getOtherPrimeInfo occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getOtherPrimeInfo()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getOtherPrimeInfo()


Occurences of getOutline

getOutline occurences:
java.awt.font.GlyphVector.getOutline()
java.awt.font.GlyphVector.getOutline(float, float)
java.awt.font.GraphicAttribute.getOutline(java.awt.geom.AffineTransform)
java.awt.font.ShapeGraphicAttribute.getOutline(java.awt.geom.AffineTransform)
java.awt.font.TextLayout.getOutline(java.awt.geom.AffineTransform)


Occurences of getOutputFormat

getOutputFormat occurences:
javax.print.StreamPrintService.getOutputFormat()
javax.print.StreamPrintServiceFactory.getOutputFormat()


Occurences of getOutputProperties

getOutputProperties occurences:
javax.xml.transform.Templates.getOutputProperties()
javax.xml.transform.Transformer.getOutputProperties()


Occurences of getOutputSize

getOutputSize occurences:
javax.crypto.Cipher.getOutputSize(int)
javax.crypto.ExemptionMechanism.getOutputSize(int)


Occurences of getOutputStream

getOutputStream occurences:
java.lang.Process.getOutputStream()
java.net.Socket.getOutputStream()
java.net.SocketImpl.getOutputStream()
java.net.URLConnection.getOutputStream()
java.rmi.server.LogStream.getOutputStream()
java.rmi.server.RemoteCall.getOutputStream()
javax.activation.DataHandler.getOutputStream()
javax.activation.DataSource.getOutputStream()
javax.activation.FileDataSource.getOutputStream()
javax.activation.URLDataSource.getOutputStream()
javax.print.StreamPrintService.getOutputStream()
javax.xml.transform.stream.StreamResult.getOutputStream()


Occurences of getOwner

getOwner occurences:
java.awt.Window.getOwner()
java.beans.XMLDecoder.getOwner()
java.beans.XMLEncoder.getOwner()
java.nio.file.attribute.FileOwnerAttributeView.getOwner()
java.nio.file.Files.getOwner(java.nio.file.Path, java.nio.file.LinkOption...)
java.util.concurrent.locks.ReentrantLock.getOwner()
java.util.concurrent.locks.ReentrantReadWriteLock.getOwner()


Occurences of getOwnerDocument

getOwnerDocument occurences:
javax.imageio.metadata.IIOMetadataNode.getOwnerDocument()
org.w3c.dom.Node.getOwnerDocument()


Occurences of getP

getP occurences:
java.security.interfaces.DSAParams.getP()
java.security.spec.DSAParameterSpec.getP()
java.security.spec.DSAPrivateKeySpec.getP()
java.security.spec.DSAPublicKeySpec.getP()
java.security.spec.ECFieldFp.getP()
javax.crypto.spec.DHParameterSpec.getP()
javax.crypto.spec.DHPrivateKeySpec.getP()
javax.crypto.spec.DHPublicKeySpec.getP()


Occurences of getP1

getP1 occurences:
java.awt.geom.CubicCurve2D.getP1()
java.awt.geom.CubicCurve2D.Double.getP1()
java.awt.geom.CubicCurve2D.Float.getP1()
java.awt.geom.Line2D.getP1()
java.awt.geom.Line2D.Double.getP1()
java.awt.geom.Line2D.Float.getP1()
java.awt.geom.QuadCurve2D.getP1()
java.awt.geom.QuadCurve2D.Double.getP1()
java.awt.geom.QuadCurve2D.Float.getP1()


Occurences of getP2

getP2 occurences:
java.awt.geom.CubicCurve2D.getP2()
java.awt.geom.CubicCurve2D.Double.getP2()
java.awt.geom.CubicCurve2D.Float.getP2()
java.awt.geom.Line2D.getP2()
java.awt.geom.Line2D.Double.getP2()
java.awt.geom.Line2D.Float.getP2()
java.awt.geom.QuadCurve2D.getP2()
java.awt.geom.QuadCurve2D.Double.getP2()
java.awt.geom.QuadCurve2D.Float.getP2()


Occurences of getPackage

getPackage occurences:
java.lang.Class.getPackage()
java.lang.ClassLoader.getPackage(java.lang.String)
java.lang.Package.getPackage(java.lang.String)


Occurences of getPackages

getPackages occurences:
java.lang.ClassLoader.getPackages()
java.lang.Package.getPackages()


Occurences of getPageFormat

getPageFormat occurences:
java.awt.print.Book.getPageFormat(int)
java.awt.print.Pageable.getPageFormat(int)
java.awt.print.PrinterJob.getPageFormat(javax.print.attribute.PrintRequestAttributeSet)


Occurences of getPaint

getPaint occurences:
java.awt.Graphics2D.getPaint()
javax.swing.border.StrokeBorder.getPaint()


Occurences of getPainter

getPainter occurences:
javax.swing.plaf.nimbus.NimbusStyle.getPainter(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthStyle.getPainter(javax.swing.plaf.synth.SynthContext)
javax.swing.text.GlyphView.GlyphPainter.getPainter(javax.swing.text.GlyphView, int, int)
javax.swing.text.Highlighter.Highlight.getPainter()


Occurences of getParagraphElement

getParagraphElement occurences:
javax.swing.text.AbstractDocument.getParagraphElement(int)
javax.swing.text.DefaultStyledDocument.getParagraphElement(int)
javax.swing.text.PlainDocument.getParagraphElement(int)
javax.swing.text.StyledDocument.getParagraphElement(int)
javax.swing.text.Utilities.getParagraphElement(javax.swing.text.JTextComponent, int)


Occurences of getParameter

getParameter occurences:
com.sun.source.tree.CatchTree.getParameter()
java.applet.Applet.getParameter(java.lang.String)
java.applet.AppletStub.getParameter(java.lang.String)
java.awt.datatransfer.DataFlavor.getParameter(java.lang.String)
java.security.Signature.getParameter(java.lang.String)
java.sql.DataTruncation.getParameter()
javax.activation.MimeType.getParameter(java.lang.String)
javax.print.DocFlavor.getParameter(java.lang.String)
javax.script.ScriptEngineFactory.getParameter(java.lang.String)
javax.xml.transform.Transformer.getParameter(java.lang.String)
org.w3c.dom.DOMConfiguration.getParameter(java.lang.String)


Occurences of getParameterAnnotations

getParameterAnnotations occurences:
java.lang.reflect.Constructor.getParameterAnnotations()
java.lang.reflect.Executable.getParameterAnnotations()
java.lang.reflect.Method.getParameterAnnotations()


Occurences of getParameterCount

getParameterCount occurences:
java.lang.reflect.Constructor.getParameterCount()
java.lang.reflect.Executable.getParameterCount()
java.lang.reflect.Method.getParameterCount()
java.sql.ParameterMetaData.getParameterCount()


Occurences of getParameterName

getParameterName occurences:
javax.management.StandardMBean.getParameterName(javax.management.MBeanConstructorInfo, javax.management.MBeanParameterInfo, int)
javax.management.StandardMBean.getParameterName(javax.management.MBeanOperationInfo, javax.management.MBeanParameterInfo, int)


Occurences of getParameters

getParameters occurences:
com.sun.source.tree.LambdaExpressionTree.getParameters()
com.sun.source.tree.MethodTree.getParameters()
java.awt.image.renderable.ParameterBlock.getParameters()
java.lang.reflect.Executable.getParameters()
java.security.Policy.getParameters()
java.security.Signature.getParameters()
java.util.logging.LogRecord.getParameters()
javax.activation.MimeType.getParameters()
javax.crypto.Cipher.getParameters()
javax.lang.model.element.ExecutableElement.getParameters()
javax.net.ssl.CertPathTrustManagerParameters.getParameters()
javax.net.ssl.KeyStoreBuilderParameters.getParameters()
javax.security.auth.login.Configuration.getParameters()


Occurences of getParameterSpec

getParameterSpec occurences:
java.security.AlgorithmParameters.getParameterSpec(java.lang.Class)
javax.crypto.spec.PBEParameterSpec.getParameterSpec()
javax.xml.crypto.AlgorithmMethod.getParameterSpec()
javax.xml.crypto.dsig.CanonicalizationMethod.getParameterSpec()
javax.xml.crypto.dsig.DigestMethod.getParameterSpec()
javax.xml.crypto.dsig.SignatureMethod.getParameterSpec()
javax.xml.crypto.dsig.Transform.getParameterSpec()


Occurences of getParameterTypes

getParameterTypes occurences:
java.lang.reflect.Constructor.getParameterTypes()
java.lang.reflect.Executable.getParameterTypes()
java.lang.reflect.Method.getParameterTypes()
javax.lang.model.type.ExecutableType.getParameterTypes()
javax.management.loading.MLetContent.getParameterTypes()


Occurences of getParams

getParams occurences:
java.security.interfaces.DSAKey.getParams()
java.security.interfaces.ECKey.getParams()
java.security.spec.ECPrivateKeySpec.getParams()
java.security.spec.ECPublicKeySpec.getParams()
javax.crypto.interfaces.DHKey.getParams()
javax.sql.rowset.BaseRowSet.getParams()
javax.sql.RowSetInternal.getParams()


Occurences of getParent

getParent occurences:
java.awt.Component.getParent()
java.awt.image.Raster.getParent()
java.awt.MenuComponent.getParent()
java.awt.PopupMenu.getParent()
java.io.File.getParent()
java.lang.ClassLoader.getParent()
java.lang.ThreadGroup.getParent()
java.net.NetworkInterface.getParent()
java.nio.file.Path.getParent()
java.security.cert.PolicyNode.getParent()
java.util.concurrent.Phaser.getParent()
java.util.logging.Logger.getParent()
java.util.prefs.NodeChangeEvent.getParent()
javax.swing.ActionMap.getParent()
javax.swing.InputMap.getParent()
javax.swing.text.AbstractDocument.AbstractElement.getParent()
javax.swing.text.View.getParent()
javax.swing.tree.DefaultMutableTreeNode.getParent()
javax.swing.tree.TreeNode.getParent()
javax.xml.crypto.dsig.dom.DOMSignContext.getParent()
javax.xml.stream.util.EventReaderDelegate.getParent()
javax.xml.stream.util.StreamReaderDelegate.getParent()
org.xml.sax.helpers.XMLFilterImpl.getParent()
org.xml.sax.XMLFilter.getParent()


Occurences of getParentElement

getParentElement occurences:
javax.swing.text.AbstractDocument.AbstractElement.getParentElement()
javax.swing.text.Element.getParentElement()
javax.xml.soap.Node.getParentElement()


Occurences of getParentLogger

getParentLogger occurences:
java.sql.Driver.getParentLogger()
javax.sql.CommonDataSource.getParentLogger()


Occurences of getParentLoggerName

getParentLoggerName occurences:
java.lang.management.PlatformLoggingMXBean.getParentLoggerName(java.lang.String)
java.util.logging.LoggingMXBean.getParentLoggerName(java.lang.String)


Occurences of getParentNode

getParentNode occurences:
javax.imageio.metadata.IIOMetadataNode.getParentNode()
org.w3c.dom.Node.getParentNode()


Occurences of getParentPath

getParentPath occurences:
com.sun.source.util.DocTreePath.getParentPath()
com.sun.source.util.TreePath.getParentPath()
javax.swing.tree.TreePath.getParentPath()


Occurences of getParser

getParser occurences:
javax.swing.text.html.HTMLDocument.getParser()
javax.swing.text.html.HTMLEditorKit.getParser()
javax.xml.parsers.SAXParser.getParser()


Occurences of getPartialSpan

getPartialSpan occurences:
javax.swing.text.GlyphView.getPartialSpan(int, int)
javax.swing.text.TabableView.getPartialSpan(int, int)


Occurences of getPassword

getPassword occurences:
java.net.PasswordAuthentication.getPassword()
java.security.KeyStore.PasswordProtection.getPassword()
javax.crypto.interfaces.PBEKey.getPassword()
javax.crypto.spec.PBEKeySpec.getPassword()
javax.security.auth.callback.PasswordCallback.getPassword()
javax.sql.RowSet.getPassword()
javax.sql.rowset.BaseRowSet.getPassword()
javax.swing.JPasswordField.getPassword()


Occurences of getPath

getPath occurences:
com.sun.source.util.DocTreePath.getPath(com.sun.source.util.DocTreePath, com.sun.source.doctree.DocTree)
com.sun.source.util.DocTreePath.getPath(com.sun.source.util.TreePath, com.sun.source.doctree.DocCommentTree, com.sun.source.doctree.DocTree)
com.sun.source.util.TreePath.getPath(com.sun.source.tree.CompilationUnitTree, com.sun.source.tree.Tree)
com.sun.source.util.TreePath.getPath(com.sun.source.util.TreePath, com.sun.source.tree.Tree)
com.sun.source.util.Trees.getPath(com.sun.source.tree.CompilationUnitTree, com.sun.source.tree.Tree)
com.sun.source.util.Trees.getPath(javax.lang.model.element.Element)
com.sun.source.util.Trees.getPath(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror)
com.sun.source.util.Trees.getPath(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationValue)
java.io.File.getPath()
java.net.HttpCookie.getPath()
java.net.URI.getPath()
java.net.URL.getPath()
java.nio.file.FileSystem.getPath(java.lang.String, java.lang.String...)
java.nio.file.spi.FileSystemProvider.getPath(java.net.URI)
javax.swing.event.MenuDragMouseEvent.getPath()
javax.swing.event.MenuKeyEvent.getPath()
javax.swing.event.TreeExpansionEvent.getPath()
javax.swing.event.TreeModelEvent.getPath()
javax.swing.event.TreeSelectionEvent.getPath()
javax.swing.JTree.DropLocation.getPath()
javax.swing.plaf.basic.BasicMenuItemUI.getPath()
javax.swing.tree.DefaultMutableTreeNode.getPath()
javax.swing.tree.TreePath.getPath()
javax.xml.ws.spi.http.HttpContext.getPath()


Occurences of getPathBounds

getPathBounds occurences:
javax.swing.JTree.getPathBounds(javax.swing.tree.TreePath)
javax.swing.plaf.basic.BasicTreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.multi.MultiTreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.TreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath)


Occurences of getPathClosestTo

getPathClosestTo occurences:
javax.swing.tree.AbstractLayoutCache.getPathClosestTo(int, int)
javax.swing.tree.FixedHeightLayoutCache.getPathClosestTo(int, int)
javax.swing.tree.VariableHeightLayoutCache.getPathClosestTo(int, int)


Occurences of getPathForRow

getPathForRow occurences:
javax.swing.JTree.getPathForRow(int)
javax.swing.plaf.basic.BasicTreeUI.getPathForRow(javax.swing.JTree, int)
javax.swing.plaf.multi.MultiTreeUI.getPathForRow(javax.swing.JTree, int)
javax.swing.plaf.TreeUI.getPathForRow(javax.swing.JTree, int)
javax.swing.tree.AbstractLayoutCache.getPathForRow(int)
javax.swing.tree.FixedHeightLayoutCache.getPathForRow(int)
javax.swing.tree.VariableHeightLayoutCache.getPathForRow(int)


Occurences of getPathIterator

getPathIterator occurences:
java.awt.geom.Arc2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Area.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Area.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.CubicCurve2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.CubicCurve2D.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.Ellipse2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Line2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Line2D.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.Path2D.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.Path2D.Double.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Path2D.Float.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.QuadCurve2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.QuadCurve2D.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.Rectangle2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.geom.Rectangle2D.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.RectangularShape.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.geom.RoundRectangle2D.getPathIterator(java.awt.geom.AffineTransform)
java.awt.Polygon.getPathIterator(java.awt.geom.AffineTransform)
java.awt.Polygon.getPathIterator(java.awt.geom.AffineTransform, double)
java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform)
java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform, double)


Occurences of getPathToRoot

getPathToRoot occurences:
javax.swing.tree.DefaultMutableTreeNode.getPathToRoot(javax.swing.tree.TreeNode, int)
javax.swing.tree.DefaultTreeModel.getPathToRoot(javax.swing.tree.TreeNode)
javax.swing.tree.DefaultTreeModel.getPathToRoot(javax.swing.tree.TreeNode, int)


Occurences of getPayload

getPayload occurences:
javax.xml.ws.LogicalMessage.getPayload()
javax.xml.ws.LogicalMessage.getPayload(javax.xml.bind.JAXBContext)


Occurences of getPeer

getPeer occurences:
java.awt.Component.getPeer()
java.awt.Font.getPeer()
java.awt.MenuComponent.getPeer()


Occurences of getPeerCertificateChain

getPeerCertificateChain occurences:
javax.net.ssl.HandshakeCompletedEvent.getPeerCertificateChain()
javax.net.ssl.SSLSession.getPeerCertificateChain()


Occurences of getPeerCertificates

getPeerCertificates occurences:
javax.net.ssl.HandshakeCompletedEvent.getPeerCertificates()
javax.net.ssl.SSLSession.getPeerCertificates()


Occurences of getPeerHost

getPeerHost occurences:
javax.net.ssl.SSLEngine.getPeerHost()
javax.net.ssl.SSLSession.getPeerHost()


Occurences of getPeerPort

getPeerPort occurences:
javax.net.ssl.SSLEngine.getPeerPort()
javax.net.ssl.SSLSession.getPeerPort()


Occurences of getPeerPrincipal

getPeerPrincipal occurences:
java.net.SecureCacheResponse.getPeerPrincipal()
javax.net.ssl.HandshakeCompletedEvent.getPeerPrincipal()
javax.net.ssl.HttpsURLConnection.getPeerPrincipal()
javax.net.ssl.SSLSession.getPeerPrincipal()


Occurences of getPercentInstance

getPercentInstance occurences:
java.text.NumberFormat.getPercentInstance()
java.text.NumberFormat.getPercentInstance(java.util.Locale)
java.text.spi.NumberFormatProvider.getPercentInstance(java.util.Locale)


Occurences of getPeriod

getPeriod occurences:
javax.management.timer.Timer.getPeriod(java.lang.Integer)
javax.management.timer.TimerMBean.getPeriod(java.lang.Integer)


Occurences of getPermission

getPermission occurences:
java.net.HttpURLConnection.getPermission()
java.net.URLConnection.getPermission()
java.security.AccessControlException.getPermission()


Occurences of getPermissions

getPermissions occurences:
java.net.URLClassLoader.getPermissions(java.security.CodeSource)
java.security.acl.Acl.getPermissions(java.security.Principal)
java.security.Policy.getPermissions(java.security.CodeSource)
java.security.Policy.getPermissions(java.security.ProtectionDomain)
java.security.ProtectionDomain.getPermissions()
java.security.SecureClassLoader.getPermissions(java.security.CodeSource)
javax.security.auth.Policy.getPermissions(javax.security.auth.Subject, java.security.CodeSource)


Occurences of getPIData

getPIData occurences:
javax.xml.stream.util.StreamReaderDelegate.getPIData()
javax.xml.stream.XMLStreamReader.getPIData()


Occurences of getPITarget

getPITarget occurences:
javax.xml.stream.util.StreamReaderDelegate.getPITarget()
javax.xml.stream.XMLStreamReader.getPITarget()


Occurences of getPixel

getPixel occurences:
java.awt.image.BandedSampleModel.getPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.MultiPixelPackedSampleModel.getPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.Raster.getPixel(int, int, double:A)
java.awt.image.Raster.getPixel(int, int, float:A)
java.awt.image.Raster.getPixel(int, int, int:A)
java.awt.image.SampleModel.getPixel(int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getPixel(int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.getPixel(int, int, int:A, java.awt.image.DataBuffer)


Occurences of getPixelBounds

getPixelBounds occurences:
java.awt.font.GlyphVector.getPixelBounds(java.awt.font.FontRenderContext, float, float)
java.awt.font.TextLayout.getPixelBounds(java.awt.font.FontRenderContext, float, float)


Occurences of getPixels

getPixels occurences:
java.awt.image.BandedSampleModel.getPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.PixelGrabber.getPixels()
java.awt.image.Raster.getPixels(int, int, int, int, double:A)
java.awt.image.Raster.getPixels(int, int, int, int, float:A)
java.awt.image.Raster.getPixels(int, int, int, int, int:A)
java.awt.image.SampleModel.getPixels(int, int, int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getPixels(int, int, int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.getPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)


Occurences of getPlatformMXBean

getPlatformMXBean occurences:
java.lang.management.ManagementFactory.getPlatformMXBean(java.lang.Class)
java.lang.management.ManagementFactory.getPlatformMXBean(javax.management.MBeanServerConnection, java.lang.Class)


Occurences of getPlatformMXBeans

getPlatformMXBeans occurences:
java.lang.management.ManagementFactory.getPlatformMXBeans(java.lang.Class)
java.lang.management.ManagementFactory.getPlatformMXBeans(javax.management.MBeanServerConnection, java.lang.Class)


Occurences of getPoint2D

getPoint2D occurences:
java.awt.image.AffineTransformOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.BandCombineOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.BufferedImageOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.ColorConvertOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.ConvolveOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.LookupOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.RasterOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.image.RescaleOp.getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of getPointSize

getPointSize occurences:
javax.swing.text.html.StyleSheet.getPointSize(int)
javax.swing.text.html.StyleSheet.getPointSize(java.lang.String)


Occurences of getPolicy

getPolicy occurences:
java.security.cert.X509CertSelector.getPolicy()
java.security.Policy.getPolicy()
javax.security.auth.Policy.getPolicy()


Occurences of getPool

getPool occurences:
java.util.concurrent.ForkJoinTask.getPool()
java.util.concurrent.ForkJoinWorkerThread.getPool()


Occurences of getPooledConnection

getPooledConnection occurences:
javax.sql.ConnectionPoolDataSource.getPooledConnection()
javax.sql.ConnectionPoolDataSource.getPooledConnection(java.lang.String, java.lang.String)


Occurences of getPoolSize

getPoolSize occurences:
java.util.concurrent.ForkJoinPool.getPoolSize()
java.util.concurrent.ThreadPoolExecutor.getPoolSize()


Occurences of getPopup

getPopup occurences:
javax.swing.plaf.multi.MultiPopupMenuUI.getPopup(javax.swing.JPopupMenu, int, int)
javax.swing.plaf.PopupMenuUI.getPopup(javax.swing.JPopupMenu, int, int)
javax.swing.PopupFactory.getPopup(java.awt.Component, java.awt.Component, int, int)


Occurences of getPopupMenu

getPopupMenu occurences:
java.awt.TrayIcon.getPopupMenu()
javax.swing.JMenu.getPopupMenu()


Occurences of getPopupMenuListeners

getPopupMenuListeners occurences:
javax.swing.JComboBox.getPopupMenuListeners()
javax.swing.JPopupMenu.getPopupMenuListeners()


Occurences of getPort

getPort occurences:
java.net.DatagramPacket.getPort()
java.net.DatagramSocket.getPort()
java.net.InetSocketAddress.getPort()
java.net.Socket.getPort()
java.net.SocketImpl.getPort()
java.net.URI.getPort()
java.net.URL.getPort()
java.security.cert.LDAPCertStoreParameters.getPort()
javax.management.remote.JMXServiceURL.getPort()
javax.xml.ws.EndpointReference.getPort(java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.getPort(java.lang.Class)
javax.xml.ws.Service.getPort(java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.getPort(javax.xml.namespace.QName, java.lang.Class)
javax.xml.ws.Service.getPort(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Service.getPort(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.Provider.getPort(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.getPort(java.lang.Class)
javax.xml.ws.spi.ServiceDelegate.getPort(java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.getPort(javax.xml.namespace.QName, java.lang.Class)
javax.xml.ws.spi.ServiceDelegate.getPort(javax.xml.namespace.QName, java.lang.Class, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.spi.ServiceDelegate.getPort(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.WebServiceFeature...)


Occurences of getPorts

getPorts occurences:
javax.xml.ws.Service.getPorts()
javax.xml.ws.spi.ServiceDelegate.getPorts()


Occurences of getPosition

getPosition occurences:
com.sun.source.tree.LineMap.getPosition(long, long)
java.awt.font.LineBreakMeasurer.getPosition()
javax.swing.JLayeredPane.getPosition(java.awt.Component)
javax.swing.SizeSequence.getPosition(int)
javax.swing.text.TabStop.getPosition()
javax.tools.Diagnostic.getPosition()
org.w3c.dom.ls.LSProgressEvent.getPosition()


Occurences of getPositionsInRange

getPositionsInRange occurences:
javax.swing.text.GapContent.getPositionsInRange(java.util.Vector, int, int)
javax.swing.text.StringContent.getPositionsInRange(java.util.Vector, int, int)


Occurences of getPrecision

getPrecision occurences:
java.math.MathContext.getPrecision()
java.sql.ParameterMetaData.getPrecision(int)
java.sql.ResultSetMetaData.getPrecision(int)
java.util.IllegalFormatPrecisionException.getPrecision()
javax.sound.sampled.FloatControl.getPrecision()
javax.sql.rowset.RowSetMetaDataImpl.getPrecision(int)


Occurences of getPreferredCommands

getPreferredCommands occurences:
javax.activation.CommandMap.getPreferredCommands(java.lang.String)
javax.activation.CommandMap.getPreferredCommands(java.lang.String, javax.activation.DataSource)
javax.activation.DataHandler.getPreferredCommands()
javax.activation.MailcapCommandMap.getPreferredCommands(java.lang.String)


Occurences of getPreferredHeight

getPreferredHeight occurences:
javax.swing.tree.AbstractLayoutCache.getPreferredHeight()
javax.swing.tree.VariableHeightLayoutCache.getPreferredHeight()


Occurences of getPreferredMenuItemSize

getPreferredMenuItemSize occurences:
javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int)
javax.swing.plaf.synth.SynthMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int)
javax.swing.plaf.synth.SynthMenuUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int)


Occurences of getPreferredScrollableViewportSize

getPreferredScrollableViewportSize occurences:
javax.swing.JLayer.getPreferredScrollableViewportSize()
javax.swing.JList.getPreferredScrollableViewportSize()
javax.swing.JTable.getPreferredScrollableViewportSize()
javax.swing.JTextArea.getPreferredScrollableViewportSize()
javax.swing.JTree.getPreferredScrollableViewportSize()
javax.swing.Scrollable.getPreferredScrollableViewportSize()
javax.swing.text.JTextComponent.getPreferredScrollableViewportSize()


Occurences of getPreferredSize

getPreferredSize occurences:
java.awt.Component.getPreferredSize()
java.awt.Container.getPreferredSize()
java.awt.List.getPreferredSize()
java.awt.List.getPreferredSize(int)
java.awt.TextArea.getPreferredSize()
java.awt.TextArea.getPreferredSize(int, int)
java.awt.TextField.getPreferredSize()
java.awt.TextField.getPreferredSize(int)
javax.swing.JComponent.getPreferredSize()
javax.swing.JEditorPane.getPreferredSize()
javax.swing.JTextArea.getPreferredSize()
javax.swing.JTextField.getPreferredSize()
javax.swing.JToolBar.Separator.getPreferredSize()
javax.swing.plaf.basic.BasicArrowButton.getPreferredSize()
javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxRenderer.getPreferredSize()
javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicOptionPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRadioButtonUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneDivider.getPreferredSize()
javax.swing.plaf.basic.BasicSplitPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(javax.swing.JComponent, boolean)
javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.LayerUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalDesktopIconUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalPopupMenuSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollButton.getPreferredSize()
javax.swing.plaf.metal.MetalSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolTipUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthGraphicsUtils.getPreferredSize(javax.swing.plaf.synth.SynthContext, java.awt.Font, java.lang.String, javax.swing.Icon, int, int, int, int, int, int)
javax.swing.plaf.synth.SynthLabelUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthProgressBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollBarUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.getPreferredSize(javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolTipUI.getPreferredSize(javax.swing.JComponent)
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField.getPreferredSize()
javax.swing.tree.DefaultTreeCellEditor.EditorContainer.getPreferredSize()
javax.swing.tree.DefaultTreeCellRenderer.getPreferredSize()


Occurences of getPreferredSpan

getPreferredSpan occurences:
javax.swing.text.AsyncBoxView.getPreferredSpan(int)
javax.swing.text.BoxView.getPreferredSpan(int)
javax.swing.text.ComponentView.getPreferredSpan(int)
javax.swing.text.FieldView.getPreferredSpan(int)
javax.swing.text.GlyphView.getPreferredSpan(int)
javax.swing.text.html.BlockView.getPreferredSpan(int)
javax.swing.text.html.ImageView.getPreferredSpan(int)
javax.swing.text.html.ParagraphView.getPreferredSpan(int)
javax.swing.text.IconView.getPreferredSpan(int)
javax.swing.text.PasswordView.getPreferredSpan(int)
javax.swing.text.PlainView.getPreferredSpan(int)
javax.swing.text.View.getPreferredSpan(int)
javax.swing.text.WrappedPlainView.getPreferredSpan(int)


Occurences of getPreferredWidth

getPreferredWidth occurences:
javax.swing.table.TableColumn.getPreferredWidth()
javax.swing.tree.AbstractLayoutCache.getPreferredWidth(java.awt.Rectangle)
javax.swing.tree.VariableHeightLayoutCache.getPreferredWidth(java.awt.Rectangle)


Occurences of getPrefix

getPrefix occurences:
javax.imageio.metadata.IIOMetadataNode.getPrefix()
javax.naming.CompositeName.getPrefix(int)
javax.naming.CompoundName.getPrefix(int)
javax.naming.ldap.LdapName.getPrefix(int)
javax.naming.Name.getPrefix(int)
javax.xml.namespace.NamespaceContext.getPrefix(java.lang.String)
javax.xml.namespace.QName.getPrefix()
javax.xml.soap.Name.getPrefix()
javax.xml.stream.events.Namespace.getPrefix()
javax.xml.stream.util.StreamReaderDelegate.getPrefix()
javax.xml.stream.XMLEventWriter.getPrefix(java.lang.String)
javax.xml.stream.XMLStreamReader.getPrefix()
javax.xml.stream.XMLStreamWriter.getPrefix(java.lang.String)
org.w3c.dom.Node.getPrefix()
org.xml.sax.helpers.NamespaceSupport.getPrefix(java.lang.String)


Occurences of getPrefixes

getPrefixes occurences:
javax.xml.namespace.NamespaceContext.getPrefixes(java.lang.String)
org.xml.sax.helpers.NamespaceSupport.getPrefixes()
org.xml.sax.helpers.NamespaceSupport.getPrefixes(java.lang.String)


Occurences of getPresentationName

getPresentationName occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getPresentationName()
javax.swing.undo.AbstractUndoableEdit.getPresentationName()
javax.swing.undo.CompoundEdit.getPresentationName()
javax.swing.undo.StateEdit.getPresentationName()
javax.swing.undo.UndoableEdit.getPresentationName()


Occurences of getPreviewPanel

getPreviewPanel occurences:
javax.swing.colorchooser.ColorChooserComponentFactory.getPreviewPanel()
javax.swing.JColorChooser.getPreviewPanel()


Occurences of getPreviousSibling

getPreviousSibling occurences:
javax.imageio.metadata.IIOMetadataNode.getPreviousSibling()
javax.swing.tree.DefaultMutableTreeNode.getPreviousSibling()
org.w3c.dom.Node.getPreviousSibling()


Occurences of getPreviousValue

getPreviousValue occurences:
javax.swing.JSpinner.getPreviousValue()
javax.swing.SpinnerDateModel.getPreviousValue()
javax.swing.SpinnerListModel.getPreviousValue()
javax.swing.SpinnerModel.getPreviousValue()
javax.swing.SpinnerNumberModel.getPreviousValue()


Occurences of getPrimary1

getPrimary1 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getPrimary1()
javax.swing.plaf.metal.MetalTheme.getPrimary1()
javax.swing.plaf.metal.OceanTheme.getPrimary1()


Occurences of getPrimary2

getPrimary2 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getPrimary2()
javax.swing.plaf.metal.MetalTheme.getPrimary2()
javax.swing.plaf.metal.OceanTheme.getPrimary2()


Occurences of getPrimary3

getPrimary3 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getPrimary3()
javax.swing.plaf.metal.MetalTheme.getPrimary3()
javax.swing.plaf.metal.OceanTheme.getPrimary3()


Occurences of getPrimaryControl

getPrimaryControl occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControl()
javax.swing.plaf.metal.MetalTheme.getPrimaryControl()


Occurences of getPrimaryControlDarkShadow

getPrimaryControlDarkShadow occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlDarkShadow()
javax.swing.plaf.metal.MetalTheme.getPrimaryControlDarkShadow()


Occurences of getPrimaryControlHighlight

getPrimaryControlHighlight occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlHighlight()
javax.swing.plaf.metal.MetalTheme.getPrimaryControlHighlight()


Occurences of getPrimaryControlInfo

getPrimaryControlInfo occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlInfo()
javax.swing.plaf.metal.MetalTheme.getPrimaryControlInfo()


Occurences of getPrimaryControlShadow

getPrimaryControlShadow occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlShadow()
javax.swing.plaf.metal.MetalTheme.getPrimaryControlShadow()


Occurences of getPrimaryType

getPrimaryType occurences:
java.awt.datatransfer.DataFlavor.getPrimaryType()
javax.activation.MimeType.getPrimaryType()


Occurences of getPrimeExponentP

getPrimeExponentP occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getPrimeExponentP()
java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentP()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getPrimeExponentP()
java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP()


Occurences of getPrimeExponentQ

getPrimeExponentQ occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getPrimeExponentQ()
java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentQ()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getPrimeExponentQ()
java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ()


Occurences of getPrimeP

getPrimeP occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getPrimeP()
java.security.interfaces.RSAPrivateCrtKey.getPrimeP()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getPrimeP()
java.security.spec.RSAPrivateCrtKeySpec.getPrimeP()


Occurences of getPrimeQ

getPrimeQ occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getPrimeQ()
java.security.interfaces.RSAPrivateCrtKey.getPrimeQ()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getPrimeQ()
java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ()


Occurences of getPrincipal

getPrincipal occurences:
java.security.acl.AclEntry.getPrincipal()
java.security.Certificate.getPrincipal()
javax.security.auth.kerberos.KerberosKey.getPrincipal()
javax.security.auth.kerberos.KeyTab.getPrincipal()


Occurences of getPrincipals

getPrincipals occurences:
java.security.ProtectionDomain.getPrincipals()
javax.security.auth.PrivateCredentialPermission.getPrincipals()
javax.security.auth.Subject.getPrincipals()
javax.security.auth.Subject.getPrincipals(java.lang.Class)


Occurences of getPrintable

getPrintable occurences:
java.awt.print.Book.getPrintable(int)
java.awt.print.Pageable.getPrintable(int)
javax.swing.JTable.getPrintable(javax.swing.JTable.PrintMode, java.text.MessageFormat, java.text.MessageFormat)
javax.swing.text.JTextComponent.getPrintable(java.text.MessageFormat, java.text.MessageFormat)


Occurences of getPrintData

getPrintData occurences:
javax.print.Doc.getPrintData()
javax.print.SimpleDoc.getPrintData()


Occurences of getPrinterJob

getPrinterJob occurences:
java.awt.print.PrinterGraphics.getPrinterJob()
java.awt.print.PrinterJob.getPrinterJob()


Occurences of getPrintJob

getPrintJob occurences:
java.awt.PrintGraphics.getPrintJob()
java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.awt.JobAttributes, java.awt.PageAttributes)
java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties)
javax.print.event.PrintJobAttributeEvent.getPrintJob()
javax.print.event.PrintJobEvent.getPrintJob()


Occurences of getPrintService

getPrintService occurences:
java.awt.print.PrinterJob.getPrintService()
javax.print.DocPrintJob.getPrintService()
javax.print.event.PrintServiceAttributeEvent.getPrintService()
javax.print.StreamPrintServiceFactory.getPrintService(java.io.OutputStream)


Occurences of getPrintServices

getPrintServices occurences:
javax.print.PrintServiceLookup.getPrintServices()
javax.print.PrintServiceLookup.getPrintServices(javax.print.DocFlavor, javax.print.attribute.AttributeSet)


Occurences of getPrivateCredentials

getPrivateCredentials occurences:
javax.security.auth.Subject.getPrivateCredentials()
javax.security.auth.Subject.getPrivateCredentials(java.lang.Class)


Occurences of getPrivateExponent

getPrivateExponent occurences:
java.security.interfaces.RSAPrivateKey.getPrivateExponent()
java.security.spec.RSAPrivateKeySpec.getPrivateExponent()


Occurences of getPrivateKey

getPrivateKey occurences:
java.security.KeyStore.PrivateKeyEntry.getPrivateKey()
java.security.Signer.getPrivateKey()
javax.net.ssl.X509KeyManager.getPrivateKey(java.lang.String)
javax.security.auth.x500.X500PrivateCredential.getPrivateKey()


Occurences of getProgram

getProgram occurences:
javax.script.ScriptEngineFactory.getProgram(java.lang.String...)
javax.sound.midi.MidiChannel.getProgram()
javax.sound.midi.Patch.getProgram()


Occurences of getPrompt

getPrompt occurences:
javax.security.auth.callback.ChoiceCallback.getPrompt()
javax.security.auth.callback.ConfirmationCallback.getPrompt()
javax.security.auth.callback.NameCallback.getPrompt()
javax.security.auth.callback.PasswordCallback.getPrompt()
javax.security.auth.callback.TextInputCallback.getPrompt()


Occurences of getProperties

getProperties occurences:
java.lang.System.getProperties()
javax.xml.crypto.dsig.SignatureProperties.getProperties()
javax.xml.ws.Endpoint.getProperties()


Occurences of getProperty

getProperty occurences:
com.sun.jdi.request.EventRequest.getProperty(java.lang.Object)
java.awt.Image.getProperty(java.lang.String, java.awt.image.ImageObserver)
java.awt.image.BufferedImage.getProperty(java.lang.String)
java.awt.image.BufferedImage.getProperty(java.lang.String, java.awt.image.ImageObserver)
java.awt.image.renderable.ContextualRenderedImageFactory.getProperty(java.awt.image.renderable.ParameterBlock, java.lang.String)
java.awt.image.renderable.RenderableImage.getProperty(java.lang.String)
java.awt.image.renderable.RenderableImageOp.getProperty(java.lang.String)
java.awt.image.RenderedImage.getProperty(java.lang.String)
java.awt.Toolkit.getProperty(java.lang.String, java.lang.String)
java.lang.System.getProperty(java.lang.String)
java.lang.System.getProperty(java.lang.String, java.lang.String)
java.security.Provider.getProperty(java.lang.String)
java.security.Security.getProperty(java.lang.String)
java.util.logging.LogManager.getProperty(java.lang.String)
java.util.Properties.getProperty(java.lang.String)
java.util.Properties.getProperty(java.lang.String, java.lang.String)
javax.sound.midi.MidiFileFormat.getProperty(java.lang.String)
javax.sound.sampled.AudioFileFormat.getProperty(java.lang.String)
javax.sound.sampled.AudioFormat.getProperty(java.lang.String)
javax.swing.text.AbstractDocument.getProperty(java.lang.Object)
javax.swing.text.Document.getProperty(java.lang.Object)
javax.xml.bind.Binder.getProperty(java.lang.String)
javax.xml.bind.helpers.AbstractMarshallerImpl.getProperty(java.lang.String)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getProperty(java.lang.String)
javax.xml.bind.Marshaller.getProperty(java.lang.String)
javax.xml.bind.Unmarshaller.getProperty(java.lang.String)
javax.xml.bind.Validator.getProperty(java.lang.String)
javax.xml.crypto.dom.DOMCryptoContext.getProperty(java.lang.String)
javax.xml.crypto.XMLCryptoContext.getProperty(java.lang.String)
javax.xml.parsers.SAXParser.getProperty(java.lang.String)
javax.xml.soap.SOAPMessage.getProperty(java.lang.String)
javax.xml.stream.util.EventReaderDelegate.getProperty(java.lang.String)
javax.xml.stream.util.StreamReaderDelegate.getProperty(java.lang.String)
javax.xml.stream.XMLEventReader.getProperty(java.lang.String)
javax.xml.stream.XMLInputFactory.getProperty(java.lang.String)
javax.xml.stream.XMLOutputFactory.getProperty(java.lang.String)
javax.xml.stream.XMLStreamReader.getProperty(java.lang.String)
javax.xml.stream.XMLStreamWriter.getProperty(java.lang.String)
javax.xml.validation.SchemaFactory.getProperty(java.lang.String)
javax.xml.validation.Validator.getProperty(java.lang.String)
javax.xml.validation.ValidatorHandler.getProperty(java.lang.String)
org.xml.sax.helpers.ParserAdapter.getProperty(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.getProperty(java.lang.String)
org.xml.sax.XMLReader.getProperty(java.lang.String)


Occurences of getPropertyChangeListeners

getPropertyChangeListeners occurences:
java.awt.Component.getPropertyChangeListeners()
java.awt.Component.getPropertyChangeListeners(java.lang.String)
java.awt.KeyboardFocusManager.getPropertyChangeListeners()
java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)
java.awt.SystemTray.getPropertyChangeListeners(java.lang.String)
java.awt.Toolkit.getPropertyChangeListeners()
java.awt.Toolkit.getPropertyChangeListeners(java.lang.String)
java.beans.PropertyChangeSupport.getPropertyChangeListeners()
java.beans.PropertyChangeSupport.getPropertyChangeListeners(java.lang.String)
javax.swing.AbstractAction.getPropertyChangeListeners()
javax.swing.plaf.basic.BasicDirectoryModel.getPropertyChangeListeners()
javax.swing.plaf.LayerUI.getPropertyChangeListeners()
javax.swing.plaf.LayerUI.getPropertyChangeListeners(java.lang.String)
javax.swing.table.TableColumn.getPropertyChangeListeners()
javax.swing.tree.DefaultTreeSelectionModel.getPropertyChangeListeners()
javax.swing.UIDefaults.getPropertyChangeListeners()
javax.swing.UIManager.getPropertyChangeListeners()


Occurences of getPropertyDescriptors

getPropertyDescriptors occurences:
java.beans.BeanInfo.getPropertyDescriptors()
java.beans.SimpleBeanInfo.getPropertyDescriptors()


Occurences of getPropertyName

getPropertyName occurences:
java.beans.PropertyChangeEvent.getPropertyName()
java.beans.PropertyChangeListenerProxy.getPropertyName()
java.beans.VetoableChangeListenerProxy.getPropertyName()


Occurences of getPropertyNames

getPropertyNames occurences:
java.awt.image.BufferedImage.getPropertyNames()
java.awt.image.renderable.ContextualRenderedImageFactory.getPropertyNames()
java.awt.image.renderable.RenderableImage.getPropertyNames()
java.awt.image.renderable.RenderableImageOp.getPropertyNames()
java.awt.image.RenderedImage.getPropertyNames()


Occurences of getPropertyPrefix

getPropertyPrefix occurences:
javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicCheckBoxUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicEditorPaneUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicFormattedTextFieldUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicMenuUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicPasswordFieldUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicRadioButtonMenuItemUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicRadioButtonUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicTextAreaUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicTextPaneUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix()
javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix()
javax.swing.plaf.metal.MetalCheckBoxUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthCheckBoxMenuItemUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthCheckBoxUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthFormattedTextFieldUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthPasswordFieldUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthRadioButtonMenuItemUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthRadioButtonUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthTextPaneUI.getPropertyPrefix()
javax.swing.plaf.synth.SynthToggleButtonUI.getPropertyPrefix()


Occurences of getProtectionParameter

getProtectionParameter occurences:
java.security.DomainLoadStoreParameter.getProtectionParameter()
java.security.KeyStore.Builder.getProtectionParameter(java.lang.String)
java.security.KeyStore.LoadStoreParameter.getProtectionParameter()


Occurences of getProtocol

getProtocol occurences:
java.net.URL.getProtocol()
javax.management.remote.JMXServiceURL.getProtocol()
javax.management.remote.rmi.RMIIIOPServerImpl.getProtocol()
javax.management.remote.rmi.RMIJRMPServerImpl.getProtocol()
javax.management.remote.rmi.RMIServerImpl.getProtocol()
javax.net.ssl.SSLContext.getProtocol()
javax.net.ssl.SSLSession.getProtocol()
javax.xml.ws.spi.http.HttpExchange.getProtocol()


Occurences of getProvider

getProvider occurences:
java.security.AlgorithmParameterGenerator.getProvider()
java.security.AlgorithmParameters.getProvider()
java.security.cert.CertificateFactory.getProvider()
java.security.cert.CertPathBuilder.getProvider()
java.security.cert.CertPathValidator.getProvider()
java.security.cert.CertStore.getProvider()
java.security.KeyFactory.getProvider()
java.security.KeyPairGenerator.getProvider()
java.security.KeyStore.getProvider()
java.security.MessageDigest.getProvider()
java.security.Policy.getProvider()
java.security.Provider.Service.getProvider()
java.security.SecureRandom.getProvider()
java.security.Security.getProvider(java.lang.String)
java.security.Signature.getProvider()
javax.crypto.Cipher.getProvider()
javax.crypto.ExemptionMechanism.getProvider()
javax.crypto.KeyAgreement.getProvider()
javax.crypto.KeyGenerator.getProvider()
javax.crypto.Mac.getProvider()
javax.crypto.SecretKeyFactory.getProvider()
javax.net.ssl.KeyManagerFactory.getProvider()
javax.net.ssl.SSLContext.getProvider()
javax.net.ssl.TrustManagerFactory.getProvider()
javax.security.auth.login.Configuration.getProvider()
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getProvider()
javax.xml.crypto.dsig.TransformService.getProvider()
javax.xml.crypto.dsig.XMLSignatureFactory.getProvider()


Occurences of getProviders

getProviders occurences:
java.security.Security.getProviders()
java.security.Security.getProviders(java.lang.String)
java.security.Security.getProviders(java.util.Map)


Occurences of getPublicCredentials

getPublicCredentials occurences:
javax.security.auth.Subject.getPublicCredentials()
javax.security.auth.Subject.getPublicCredentials(java.lang.Class)


Occurences of getPublicExponent

getPublicExponent occurences:
java.security.interfaces.RSAMultiPrimePrivateCrtKey.getPublicExponent()
java.security.interfaces.RSAPrivateCrtKey.getPublicExponent()
java.security.interfaces.RSAPublicKey.getPublicExponent()
java.security.spec.RSAKeyGenParameterSpec.getPublicExponent()
java.security.spec.RSAMultiPrimePrivateCrtKeySpec.getPublicExponent()
java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent()
java.security.spec.RSAPublicKeySpec.getPublicExponent()


Occurences of getPublicId

getPublicId occurences:
javax.xml.stream.events.EntityDeclaration.getPublicId()
javax.xml.stream.events.NotationDeclaration.getPublicId()
javax.xml.stream.Location.getPublicId()
javax.xml.transform.SourceLocator.getPublicId()
javax.xml.transform.stream.StreamSource.getPublicId()
org.w3c.dom.DocumentType.getPublicId()
org.w3c.dom.Entity.getPublicId()
org.w3c.dom.ls.LSInput.getPublicId()
org.w3c.dom.Notation.getPublicId()
org.xml.sax.helpers.LocatorImpl.getPublicId()
org.xml.sax.InputSource.getPublicId()
org.xml.sax.Locator.getPublicId()
org.xml.sax.SAXParseException.getPublicId()


Occurences of getPublicKey

getPublicKey occurences:
java.security.cert.Certificate.getPublicKey()
java.security.cert.PKIXCertPathValidatorResult.getPublicKey()
java.security.Certificate.getPublicKey()
java.security.Identity.getPublicKey()
javax.security.cert.Certificate.getPublicKey()
javax.xml.crypto.dsig.keyinfo.KeyValue.getPublicKey()


Occurences of getPurgeFlag

getPurgeFlag occurences:
javax.management.relation.RelationService.getPurgeFlag()
javax.management.relation.RelationServiceMBean.getPurgeFlag()


Occurences of getQ

getQ occurences:
java.security.interfaces.DSAParams.getQ()
java.security.spec.DSAParameterSpec.getQ()
java.security.spec.DSAPrivateKeySpec.getQ()
java.security.spec.DSAPublicKeySpec.getQ()


Occurences of getQName

getQName occurences:
org.xml.sax.Attributes.getQName(int)
org.xml.sax.helpers.AttributesImpl.getQName(int)


Occurences of getQTables

getQTables occurences:
javax.imageio.plugins.jpeg.JPEGImageReadParam.getQTables()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.getQTables()


Occurences of getQuadrantRotateInstance

getQuadrantRotateInstance occurences:
java.awt.geom.AffineTransform.getQuadrantRotateInstance(int)
java.awt.geom.AffineTransform.getQuadrantRotateInstance(int, double, double)


Occurences of getQualifiedName

getQualifiedName occurences:
javax.lang.model.element.PackageElement.getQualifiedName()
javax.lang.model.element.QualifiedNameable.getQualifiedName()
javax.lang.model.element.TypeElement.getQualifiedName()
javax.xml.soap.Name.getQualifiedName()


Occurences of getQuery

getQuery occurences:
java.net.URI.getQuery()
java.net.URL.getQuery()


Occurences of getQueryTimeout

getQueryTimeout occurences:
java.sql.Statement.getQueryTimeout()
javax.sql.RowSet.getQueryTimeout()
javax.sql.rowset.BaseRowSet.getQueryTimeout()


Occurences of getQueue

getQueue occurences:
java.util.concurrent.ScheduledThreadPoolExecutor.getQueue()
java.util.concurrent.ThreadPoolExecutor.getQueue()


Occurences of getQueuedTaskCount

getQueuedTaskCount occurences:
java.util.concurrent.ForkJoinPool.getQueuedTaskCount()
java.util.concurrent.ForkJoinTask.getQueuedTaskCount()


Occurences of getQueuedThreads

getQueuedThreads occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getQueuedThreads()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getQueuedThreads()
java.util.concurrent.locks.ReentrantLock.getQueuedThreads()
java.util.concurrent.locks.ReentrantReadWriteLock.getQueuedThreads()
java.util.concurrent.Semaphore.getQueuedThreads()


Occurences of getQueueLength

getQueueLength occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getQueueLength()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getQueueLength()
java.util.concurrent.locks.ReentrantLock.getQueueLength()
java.util.concurrent.locks.ReentrantReadWriteLock.getQueueLength()
java.util.concurrent.Semaphore.getQueueLength()


Occurences of getRadioButtonIcon

getRadioButtonIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getRadioButtonIcon()
javax.swing.plaf.metal.MetalIconFactory.getRadioButtonIcon()


Occurences of getRadioButtonMenuItemIcon

getRadioButtonMenuItemIcon occurences:
javax.swing.plaf.basic.BasicIconFactory.getRadioButtonMenuItemIcon()
javax.swing.plaf.metal.MetalIconFactory.getRadioButtonMenuItemIcon()


Occurences of getRangeUnit

getRangeUnit occurences:
java.time.temporal.ChronoField.getRangeUnit()
java.time.temporal.TemporalField.getRangeUnit()


Occurences of getRaster

getRaster occurences:
java.awt.image.BufferedImage.getRaster()
java.awt.PaintContext.getRaster(int, int, int, int)
javax.imageio.IIOImage.getRaster()


Occurences of getRawOffset

getRawOffset occurences:
java.util.SimpleTimeZone.getRawOffset()
java.util.TimeZone.getRawOffset()


Occurences of getRawResult

getRawResult occurences:
java.util.concurrent.CountedCompleter.getRawResult()
java.util.concurrent.ForkJoinTask.getRawResult()
java.util.concurrent.RecursiveAction.getRawResult()
java.util.concurrent.RecursiveTask.getRawResult()


Occurences of getReader

getReader occurences:
javax.script.ScriptContext.getReader()
javax.script.SimpleScriptContext.getReader()
javax.swing.text.html.HTMLDocument.getReader(int)
javax.swing.text.html.HTMLDocument.getReader(int, int, int, javax.swing.text.html.HTML.Tag)
javax.xml.transform.stream.StreamSource.getReader()


Occurences of getReaderForText

getReaderForText occurences:
java.awt.datatransfer.DataFlavor.getReaderForText(java.awt.datatransfer.Transferable)
javax.print.Doc.getReaderForText()
javax.print.SimpleDoc.getReaderForText()


Occurences of getReadLockCount

getReadLockCount occurences:
java.util.concurrent.locks.ReentrantReadWriteLock.getReadLockCount()
java.util.concurrent.locks.StampedLock.getReadLockCount()


Occurences of getReason

getReason occurences:
java.net.HttpRetryException.getReason()
java.net.URISyntaxException.getReason()
java.nio.file.FileSystemException.getReason()
java.nio.file.InvalidPathException.getReason()
java.security.cert.CertPathValidatorException.getReason()
javax.print.URIException.getReason()


Occurences of getReceiveBufferSize

getReceiveBufferSize occurences:
java.net.DatagramSocket.getReceiveBufferSize()
java.net.ServerSocket.getReceiveBufferSize()
java.net.Socket.getReceiveBufferSize()


Occurences of getReceiver

getReceiver occurences:
javax.sound.midi.MidiDevice.getReceiver()
javax.sound.midi.MidiSystem.getReceiver()
javax.sound.midi.Transmitter.getReceiver()


Occurences of getReceiverType

getReceiverType occurences:
javax.lang.model.element.ExecutableElement.getReceiverType()
javax.lang.model.type.ExecutableType.getReceiverType()


Occurences of getRed

getRed occurences:
java.awt.Color.getRed()
java.awt.image.ColorModel.getRed(int)
java.awt.image.ColorModel.getRed(java.lang.Object)
java.awt.image.ComponentColorModel.getRed(int)
java.awt.image.ComponentColorModel.getRed(java.lang.Object)
java.awt.image.DirectColorModel.getRed(int)
java.awt.image.DirectColorModel.getRed(java.lang.Object)
java.awt.image.IndexColorModel.getRed(int)


Occurences of getRedoPresentationName

getRedoPresentationName occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getRedoPresentationName()
javax.swing.undo.AbstractUndoableEdit.getRedoPresentationName()
javax.swing.undo.CompoundEdit.getRedoPresentationName()
javax.swing.undo.UndoableEdit.getRedoPresentationName()
javax.swing.undo.UndoManager.getRedoPresentationName()


Occurences of getRef

getRef occurences:
java.net.URL.getRef()
java.rmi.server.RemoteObject.getRef()
java.sql.CallableStatement.getRef(int)
java.sql.CallableStatement.getRef(java.lang.String)
java.sql.ResultSet.getRef(int)
java.sql.ResultSet.getRef(java.lang.String)


Occurences of getReference

getReference occurences:
com.sun.source.doctree.LinkTree.getReference()
com.sun.source.doctree.SeeTree.getReference()
com.sun.source.doctree.ValueTree.getReference()
java.util.concurrent.atomic.AtomicMarkableReference.getReference()
java.util.concurrent.atomic.AtomicStampedReference.getReference()
javax.naming.Referenceable.getReference()


Occurences of getReferencedMBeans

getReferencedMBeans occurences:
javax.management.relation.Relation.getReferencedMBeans()
javax.management.relation.RelationService.getReferencedMBeans(java.lang.String)
javax.management.relation.RelationServiceMBean.getReferencedMBeans(java.lang.String)
javax.management.relation.RelationSupport.getReferencedMBeans()


Occurences of getReferences

getReferences occurences:
javax.xml.crypto.dsig.Manifest.getReferences()
javax.xml.crypto.dsig.SignedInfo.getReferences()


Occurences of getReferralContext

getReferralContext occurences:
javax.naming.ldap.LdapReferralException.getReferralContext()
javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable)
javax.naming.ldap.LdapReferralException.getReferralContext(java.util.Hashtable, javax.naming.ldap.Control:A)
javax.naming.ReferralException.getReferralContext()
javax.naming.ReferralException.getReferralContext(java.util.Hashtable)


Occurences of getRegion

getRegion occurences:
javax.swing.plaf.synth.SynthContext.getRegion()
javax.swing.plaf.synth.SynthLookAndFeel.getRegion(javax.swing.JComponent)


Occurences of getRegistry

getRegistry occurences:
java.rmi.registry.LocateRegistry.getRegistry()
java.rmi.registry.LocateRegistry.getRegistry(int)
java.rmi.registry.LocateRegistry.getRegistry(java.lang.String)
java.rmi.registry.LocateRegistry.getRegistry(java.lang.String, int)
java.rmi.registry.LocateRegistry.getRegistry(java.lang.String, int, java.rmi.server.RMIClientSocketFactory)


Occurences of getRelatedNode

getRelatedNode occurences:
org.w3c.dom.DOMLocator.getRelatedNode()
org.w3c.dom.events.MutationEvent.getRelatedNode()


Occurences of getRelationId

getRelationId occurences:
javax.management.relation.Relation.getRelationId()
javax.management.relation.RelationNotification.getRelationId()
javax.management.relation.RelationSupport.getRelationId()


Occurences of getRelationServiceName

getRelationServiceName occurences:
javax.management.relation.Relation.getRelationServiceName()
javax.management.relation.RelationSupport.getRelationServiceName()


Occurences of getRelationTypeName

getRelationTypeName occurences:
javax.management.relation.Relation.getRelationTypeName()
javax.management.relation.RelationNotification.getRelationTypeName()
javax.management.relation.RelationService.getRelationTypeName(java.lang.String)
javax.management.relation.RelationServiceMBean.getRelationTypeName(java.lang.String)
javax.management.relation.RelationSupport.getRelationTypeName()
javax.management.relation.RelationType.getRelationTypeName()
javax.management.relation.RelationTypeSupport.getRelationTypeName()


Occurences of getRemainingName

getRemainingName occurences:
javax.naming.NamingException.getRemainingName()
javax.naming.spi.ResolveResult.getRemainingName()


Occurences of getRemoteAddress

getRemoteAddress occurences:
java.nio.channels.AsynchronousSocketChannel.getRemoteAddress()
java.nio.channels.DatagramChannel.getRemoteAddress()
java.nio.channels.SocketChannel.getRemoteAddress()
javax.xml.ws.spi.http.HttpExchange.getRemoteAddress()


Occurences of getRemoteSocketAddress

getRemoteSocketAddress occurences:
java.net.DatagramSocket.getRemoteSocketAddress()
java.net.Socket.getRemoteSocketAddress()


Occurences of getRenderingHints

getRenderingHints occurences:
java.awt.Graphics2D.getRenderingHints()
java.awt.image.AffineTransformOp.getRenderingHints()
java.awt.image.BandCombineOp.getRenderingHints()
java.awt.image.BufferedImageOp.getRenderingHints()
java.awt.image.ColorConvertOp.getRenderingHints()
java.awt.image.ConvolveOp.getRenderingHints()
java.awt.image.LookupOp.getRenderingHints()
java.awt.image.RasterOp.getRenderingHints()
java.awt.image.renderable.RenderContext.getRenderingHints()
java.awt.image.RescaleOp.getRenderingHints()


Occurences of getRepresentationClass

getRepresentationClass occurences:
java.awt.datatransfer.DataFlavor.getRepresentationClass()
javax.activation.ActivationDataFlavor.getRepresentationClass()


Occurences of getRequestControls

getRequestControls occurences:
javax.naming.ldap.InitialLdapContext.getRequestControls()
javax.naming.ldap.LdapContext.getRequestControls()


Occurences of getRequestMethod

getRequestMethod occurences:
java.net.HttpURLConnection.getRequestMethod()
javax.xml.ws.spi.http.HttpExchange.getRequestMethod()


Occurences of getResizeWeight

getResizeWeight occurences:
javax.swing.JSplitPane.getResizeWeight()
javax.swing.text.BoxView.getResizeWeight(int)
javax.swing.text.FieldView.getResizeWeight(int)
javax.swing.text.html.BlockView.getResizeWeight(int)
javax.swing.text.TableView.TableRow.getResizeWeight(int)
javax.swing.text.View.getResizeWeight(int)


Occurences of getResolution

getResolution occurences:
javax.print.attribute.ResolutionSyntax.getResolution(int)
javax.sound.midi.MidiFileFormat.getResolution()
javax.sound.midi.Sequence.getResolution()


Occurences of getResolvedObj

getResolvedObj occurences:
javax.naming.NamingException.getResolvedObj()
javax.naming.spi.ResolveResult.getResolvedObj()


Occurences of getResolveParent

getResolveParent occurences:
javax.swing.text.AbstractDocument.AbstractElement.getResolveParent()
javax.swing.text.AttributeSet.getResolveParent()
javax.swing.text.html.HTMLDocument.BlockElement.getResolveParent()
javax.swing.text.html.HTMLDocument.RunElement.getResolveParent()
javax.swing.text.Keymap.getResolveParent()
javax.swing.text.SimpleAttributeSet.getResolveParent()
javax.swing.text.StyleContext.NamedStyle.getResolveParent()
javax.swing.text.StyleContext.SmallAttributeSet.getResolveParent()


Occurences of getResource

getResource occurences:
java.beans.beancontext.BeanContext.getResource(java.lang.String, java.beans.beancontext.BeanContextChild)
java.beans.beancontext.BeanContextSupport.getResource(java.lang.String, java.beans.beancontext.BeanContextChild)
java.lang.Class.getResource(java.lang.String)
java.lang.ClassLoader.getResource(java.lang.String)
javax.annotation.processing.Filer.getResource(javax.tools.JavaFileManager.Location, java.lang.CharSequence, java.lang.CharSequence)
javax.management.loading.MLetMBean.getResource(java.lang.String)


Occurences of getResourceAsStream

getResourceAsStream occurences:
java.beans.beancontext.BeanContext.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild)
java.beans.beancontext.BeanContextSupport.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild)
java.lang.Class.getResourceAsStream(java.lang.String)
java.lang.ClassLoader.getResourceAsStream(java.lang.String)
java.net.URLClassLoader.getResourceAsStream(java.lang.String)
javax.management.loading.MLetMBean.getResourceAsStream(java.lang.String)


Occurences of getResourceBundle

getResourceBundle occurences:
java.util.logging.Logger.getResourceBundle()
java.util.logging.LogRecord.getResourceBundle()


Occurences of getResourceBundleName

getResourceBundleName occurences:
java.util.logging.Level.getResourceBundleName()
java.util.logging.Logger.getResourceBundleName()
java.util.logging.LogRecord.getResourceBundleName()


Occurences of getResourceResolver

getResourceResolver occurences:
javax.xml.validation.SchemaFactory.getResourceResolver()
javax.xml.validation.Validator.getResourceResolver()
javax.xml.validation.ValidatorHandler.getResourceResolver()


Occurences of getResources

getResources occurences:
com.sun.source.tree.TryTree.getResources()
java.lang.ClassLoader.getResources(java.lang.String)
javax.management.loading.MLetMBean.getResources(java.lang.String)
javax.sound.midi.Soundbank.getResources()


Occurences of getResponseControls

getResponseControls occurences:
javax.naming.ldap.InitialLdapContext.getResponseControls()
javax.naming.ldap.LdapContext.getResponseControls()


Occurences of getResult

getResult occurences:
javax.xml.bind.UnmarshallerHandler.getResult()
javax.xml.bind.util.JAXBResult.getResult()
javax.xml.soap.SAAJResult.getResult()


Occurences of getResultSet

getResultSet occurences:
java.sql.Array.getResultSet()
java.sql.Array.getResultSet(java.util.Map)
java.sql.Array.getResultSet(long, int)
java.sql.Array.getResultSet(long, int, java.util.Map)
java.sql.Statement.getResultSet()
javax.sql.rowset.serial.SerialArray.getResultSet()
javax.sql.rowset.serial.SerialArray.getResultSet(java.util.Map)
javax.sql.rowset.serial.SerialArray.getResultSet(long, int)
javax.sql.rowset.serial.SerialArray.getResultSet(long, int, java.util.Map)


Occurences of getResultSetHoldability

getResultSetHoldability occurences:
java.sql.DatabaseMetaData.getResultSetHoldability()
java.sql.Statement.getResultSetHoldability()


Occurences of getReturnOpenType

getReturnOpenType occurences:
javax.management.openmbean.OpenMBeanOperationInfo.getReturnOpenType()
javax.management.openmbean.OpenMBeanOperationInfoSupport.getReturnOpenType()


Occurences of getReturnType

getReturnType occurences:
com.sun.source.tree.MethodTree.getReturnType()
java.lang.reflect.Method.getReturnType()
javax.lang.model.element.ExecutableElement.getReturnType()
javax.lang.model.type.ExecutableType.getReturnType()
javax.management.MBeanOperationInfo.getReturnType()
javax.management.openmbean.OpenMBeanOperationInfo.getReturnType()


Occurences of getReuseAddress

getReuseAddress occurences:
java.net.DatagramSocket.getReuseAddress()
java.net.ServerSocket.getReuseAddress()
java.net.Socket.getReuseAddress()


Occurences of getRevocationChecker

getRevocationChecker occurences:
java.security.cert.CertPathBuilder.getRevocationChecker()
java.security.cert.CertPathValidator.getRevocationChecker()


Occurences of getRevocationDate

getRevocationDate occurences:
java.security.cert.CertificateRevokedException.getRevocationDate()
java.security.cert.X509CRLEntry.getRevocationDate()


Occurences of getRevocationReason

getRevocationReason occurences:
java.security.cert.CertificateRevokedException.getRevocationReason()
java.security.cert.X509CRLEntry.getRevocationReason()


Occurences of getRevokedCertificate

getRevokedCertificate occurences:
java.security.cert.X509CRL.getRevokedCertificate(java.math.BigInteger)
java.security.cert.X509CRL.getRevokedCertificate(java.security.cert.X509Certificate)


Occurences of getRGB

getRGB occurences:
java.awt.Color.getRGB()
java.awt.image.BufferedImage.getRGB(int, int)
java.awt.image.BufferedImage.getRGB(int, int, int, int, int:A, int, int)
java.awt.image.ColorModel.getRGB(int)
java.awt.image.ColorModel.getRGB(java.lang.Object)
java.awt.image.ComponentColorModel.getRGB(int)
java.awt.image.ComponentColorModel.getRGB(java.lang.Object)
java.awt.image.DirectColorModel.getRGB(int)
java.awt.image.DirectColorModel.getRGB(java.lang.Object)
java.awt.image.IndexColorModel.getRGB(int)


Occurences of getRightInset

getRightInset occurences:
javax.swing.text.AsyncBoxView.getRightInset()
javax.swing.text.CompositeView.getRightInset()


Occurences of getRole

getRole occurences:
javax.management.relation.Relation.getRole(java.lang.String)
javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.getRole(java.lang.String, java.lang.String)
javax.management.relation.RelationSupport.getRole(java.lang.String)
javax.xml.soap.SOAPHeaderElement.getRole()


Occurences of getRoleCardinality

getRoleCardinality occurences:
javax.management.relation.Relation.getRoleCardinality(java.lang.String)
javax.management.relation.RelationService.getRoleCardinality(java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.getRoleCardinality(java.lang.String, java.lang.String)
javax.management.relation.RelationSupport.getRoleCardinality(java.lang.String)


Occurences of getRoleInfo

getRoleInfo occurences:
javax.management.relation.RelationService.getRoleInfo(java.lang.String, java.lang.String)
javax.management.relation.RelationServiceMBean.getRoleInfo(java.lang.String, java.lang.String)
javax.management.relation.RelationType.getRoleInfo(java.lang.String)
javax.management.relation.RelationTypeSupport.getRoleInfo(java.lang.String)


Occurences of getRoleInfos

getRoleInfos occurences:
javax.management.relation.RelationService.getRoleInfos(java.lang.String)
javax.management.relation.RelationServiceMBean.getRoleInfos(java.lang.String)
javax.management.relation.RelationType.getRoleInfos()
javax.management.relation.RelationTypeSupport.getRoleInfos()


Occurences of getRoleName

getRoleName occurences:
javax.management.relation.RelationNotification.getRoleName()
javax.management.relation.Role.getRoleName()
javax.management.relation.RoleUnresolved.getRoleName()


Occurences of getRoles

getRoles occurences:
javax.management.relation.Relation.getRoles(java.lang.String:A)
javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String:A)
javax.management.relation.RelationServiceMBean.getRoles(java.lang.String, java.lang.String:A)
javax.management.relation.RelationSupport.getRoles(java.lang.String:A)
javax.management.relation.RoleResult.getRoles()
javax.xml.ws.handler.soap.SOAPMessageContext.getRoles()
javax.xml.ws.soap.SOAPBinding.getRoles()


Occurences of getRoleValue

getRoleValue occurences:
javax.management.relation.Role.getRoleValue()
javax.management.relation.RoleUnresolved.getRoleValue()


Occurences of getRoot

getRoot occurences:
java.nio.file.Path.getRoot()
java.util.concurrent.CountedCompleter.getRoot()
java.util.concurrent.Phaser.getRoot()
javax.swing.SwingUtilities.getRoot(java.awt.Component)
javax.swing.tree.DefaultMutableTreeNode.getRoot()
javax.swing.tree.DefaultTreeModel.getRoot()
javax.swing.tree.TreeModel.getRoot()


Occurences of getRootElements

getRootElements occurences:
javax.annotation.processing.RoundEnvironment.getRootElements()
javax.swing.text.AbstractDocument.getRootElements()
javax.swing.text.Document.getRootElements()


Occurences of getRootName

getRootName occurences:
javax.imageio.metadata.IIOMetadataFormat.getRootName()
javax.imageio.metadata.IIOMetadataFormatImpl.getRootName()


Occurences of getRootPane

getRootPane occurences:
javax.swing.JApplet.getRootPane()
javax.swing.JComponent.getRootPane()
javax.swing.JDialog.getRootPane()
javax.swing.JFrame.getRootPane()
javax.swing.JInternalFrame.getRootPane()
javax.swing.JWindow.getRootPane()
javax.swing.RootPaneContainer.getRootPane()
javax.swing.SwingUtilities.getRootPane(java.awt.Component)


Occurences of getRootView

getRootView occurences:
javax.swing.plaf.basic.BasicTextUI.getRootView(javax.swing.text.JTextComponent)
javax.swing.plaf.multi.MultiTextUI.getRootView(javax.swing.text.JTextComponent)
javax.swing.plaf.TextUI.getRootView(javax.swing.text.JTextComponent)


Occurences of getRotateInstance

getRotateInstance occurences:
java.awt.geom.AffineTransform.getRotateInstance(double)
java.awt.geom.AffineTransform.getRotateInstance(double, double)
java.awt.geom.AffineTransform.getRotateInstance(double, double, double)
java.awt.geom.AffineTransform.getRotateInstance(double, double, double, double)


Occurences of getRoundingMode

getRoundingMode occurences:
java.math.MathContext.getRoundingMode()
java.text.DecimalFormat.getRoundingMode()
java.text.NumberFormat.getRoundingMode()


Occurences of getRow

getRow occurences:
java.sql.ResultSet.getRow()
javax.swing.JTable.DropLocation.getRow()


Occurences of getRowCount

getRowCount occurences:
javax.swing.DefaultRowSorter.ModelWrapper.getRowCount()
javax.swing.JTable.getRowCount()
javax.swing.JTree.getRowCount()
javax.swing.plaf.basic.BasicTreeUI.getRowCount(javax.swing.JTree)
javax.swing.plaf.multi.MultiTreeUI.getRowCount(javax.swing.JTree)
javax.swing.plaf.TreeUI.getRowCount(javax.swing.JTree)
javax.swing.table.DefaultTableModel.getRowCount()
javax.swing.table.TableModel.getRowCount()
javax.swing.text.TableView.TableCell.getRowCount()
javax.swing.tree.AbstractLayoutCache.getRowCount()
javax.swing.tree.FixedHeightLayoutCache.getRowCount()
javax.swing.tree.VariableHeightLayoutCache.getRowCount()


Occurences of getRowForPath

getRowForPath occurences:
javax.swing.JTree.getRowForPath(javax.swing.tree.TreePath)
javax.swing.plaf.basic.BasicTreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.multi.MultiTreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.TreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.tree.AbstractLayoutCache.getRowForPath(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.getRowForPath(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.getRowForPath(javax.swing.tree.TreePath)


Occurences of getRowHeader

getRowHeader occurences:
javax.swing.JScrollPane.getRowHeader()
javax.swing.ScrollPaneLayout.getRowHeader()


Occurences of getRowHeight

getRowHeight occurences:
javax.swing.JTable.getRowHeight()
javax.swing.JTable.getRowHeight(int)
javax.swing.JTextArea.getRowHeight()
javax.swing.JTree.getRowHeight()
javax.swing.plaf.basic.BasicListUI.getRowHeight(int)
javax.swing.plaf.basic.BasicTreeUI.getRowHeight()
javax.swing.tree.AbstractLayoutCache.getRowHeight()


Occurences of getRowId

getRowId occurences:
java.sql.CallableStatement.getRowId(int)
java.sql.CallableStatement.getRowId(java.lang.String)
java.sql.ResultSet.getRowId(int)
java.sql.ResultSet.getRowId(java.lang.String)


Occurences of getRowMapper

getRowMapper occurences:
javax.swing.tree.DefaultTreeSelectionModel.getRowMapper()
javax.swing.tree.TreeSelectionModel.getRowMapper()


Occurences of getRows

getRows occurences:
java.awt.GridLayout.getRows()
java.awt.List.getRows()
java.awt.TextArea.getRows()
javax.swing.JTextArea.getRows()


Occurences of getRowSetWarnings

getRowSetWarnings occurences:
javax.sql.rowset.CachedRowSet.getRowSetWarnings()
javax.sql.rowset.JdbcRowSet.getRowSetWarnings()


Occurences of getRowsForPaths

getRowsForPaths occurences:
javax.swing.tree.AbstractLayoutCache.getRowsForPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.RowMapper.getRowsForPaths(javax.swing.tree.TreePath:A)


Occurences of getRowX

getRowX occurences:
javax.swing.plaf.basic.BasicTreeUI.getRowX(int, int)
javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler.getRowX(int, int)
javax.swing.plaf.synth.SynthTreeUI.getRowX(int, int)


Occurences of getRule

getRule occurences:
java.awt.AlphaComposite.getRule()
javax.swing.text.html.StyleSheet.getRule(java.lang.String)
javax.swing.text.html.StyleSheet.getRule(javax.swing.text.html.HTML.Tag, javax.swing.text.Element)


Occurences of getRules

getRules occurences:
java.text.RuleBasedCollator.getRules()
java.time.zone.ZoneRulesProvider.getRules(java.lang.String, boolean)
java.time.ZoneId.getRules()
java.time.ZoneOffset.getRules()


Occurences of getRunLimit

getRunLimit occurences:
java.text.AttributedCharacterIterator.getRunLimit()
java.text.AttributedCharacterIterator.getRunLimit(java.text.AttributedCharacterIterator.Attribute)
java.text.AttributedCharacterIterator.getRunLimit(java.util.Set)
java.text.Bidi.getRunLimit(int)


Occurences of getRunStart

getRunStart occurences:
java.text.AttributedCharacterIterator.getRunStart()
java.text.AttributedCharacterIterator.getRunStart(java.text.AttributedCharacterIterator.Attribute)
java.text.AttributedCharacterIterator.getRunStart(java.util.Set)
java.text.Bidi.getRunStart(int)


Occurences of getS

getS occurences:
java.security.interfaces.ECPrivateKey.getS()
java.security.spec.ECPrivateKeySpec.getS()


Occurences of getSalt

getSalt occurences:
javax.crypto.interfaces.PBEKey.getSalt()
javax.crypto.spec.PBEKeySpec.getSalt()
javax.crypto.spec.PBEParameterSpec.getSalt()


Occurences of getSample

getSample occurences:
java.awt.image.BandedSampleModel.getSample(int, int, int, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getSample(int, int, int, java.awt.image.DataBuffer)
java.awt.image.MultiPixelPackedSampleModel.getSample(int, int, int, java.awt.image.DataBuffer)
java.awt.image.Raster.getSample(int, int, int)
java.awt.image.SampleModel.getSample(int, int, int, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.getSample(int, int, int, java.awt.image.DataBuffer)


Occurences of getSampleDouble

getSampleDouble occurences:
java.awt.image.BandedSampleModel.getSampleDouble(int, int, int, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getSampleDouble(int, int, int, java.awt.image.DataBuffer)
java.awt.image.Raster.getSampleDouble(int, int, int)
java.awt.image.SampleModel.getSampleDouble(int, int, int, java.awt.image.DataBuffer)


Occurences of getSampleFloat

getSampleFloat occurences:
java.awt.image.BandedSampleModel.getSampleFloat(int, int, int, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getSampleFloat(int, int, int, java.awt.image.DataBuffer)
java.awt.image.Raster.getSampleFloat(int, int, int)
java.awt.image.SampleModel.getSampleFloat(int, int, int, java.awt.image.DataBuffer)


Occurences of getSampleModel

getSampleModel occurences:
java.awt.image.BufferedImage.getSampleModel()
java.awt.image.Raster.getSampleModel()
java.awt.image.RenderedImage.getSampleModel()
javax.imageio.ImageTypeSpecifier.getSampleModel()
javax.imageio.ImageTypeSpecifier.getSampleModel(int, int)


Occurences of getSamples

getSamples occurences:
java.awt.image.BandedSampleModel.getSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.getSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.Raster.getSamples(int, int, int, int, int, double:A)
java.awt.image.Raster.getSamples(int, int, int, int, int, float:A)
java.awt.image.Raster.getSamples(int, int, int, int, int, int:A)
java.awt.image.SampleModel.getSamples(int, int, int, int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getSamples(int, int, int, int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.getSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.getSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)


Occurences of getSampleSize

getSampleSize occurences:
java.awt.image.ComponentSampleModel.getSampleSize()
java.awt.image.ComponentSampleModel.getSampleSize(int)
java.awt.image.MultiPixelPackedSampleModel.getSampleSize()
java.awt.image.MultiPixelPackedSampleModel.getSampleSize(int)
java.awt.image.SampleModel.getSampleSize()
java.awt.image.SampleModel.getSampleSize(int)
java.awt.image.SinglePixelPackedSampleModel.getSampleSize()
java.awt.image.SinglePixelPackedSampleModel.getSampleSize(int)


Occurences of getScale

getScale occurences:
java.sql.ParameterMetaData.getScale(int)
java.sql.ResultSetMetaData.getScale(int)
javax.sql.rowset.RowSetMetaDataImpl.getScale(int)


Occurences of getScaledInstance

getScaledInstance occurences:
java.awt.Image.getScaledInstance(int, int, int)
javax.imageio.plugins.jpeg.JPEGQTable.getScaledInstance(float, boolean)


Occurences of getScanlineStride

getScanlineStride occurences:
java.awt.image.ComponentSampleModel.getScanlineStride()
java.awt.image.MultiPixelPackedSampleModel.getScanlineStride()
java.awt.image.SinglePixelPackedSampleModel.getScanlineStride()


Occurences of getSchema

getSchema occurences:
java.sql.Connection.getSchema()
javax.naming.directory.DirContext.getSchema(java.lang.String)
javax.naming.directory.DirContext.getSchema(javax.naming.Name)
javax.naming.directory.InitialDirContext.getSchema(java.lang.String)
javax.naming.directory.InitialDirContext.getSchema(javax.naming.Name)
javax.xml.bind.Binder.getSchema()
javax.xml.bind.helpers.AbstractMarshallerImpl.getSchema()
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getSchema()
javax.xml.bind.Marshaller.getSchema()
javax.xml.bind.Unmarshaller.getSchema()
javax.xml.parsers.DocumentBuilder.getSchema()
javax.xml.parsers.DocumentBuilderFactory.getSchema()
javax.xml.parsers.SAXParser.getSchema()
javax.xml.parsers.SAXParserFactory.getSchema()


Occurences of getSchemaClassDefinition

getSchemaClassDefinition occurences:
javax.naming.directory.DirContext.getSchemaClassDefinition(java.lang.String)
javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name)
javax.naming.directory.InitialDirContext.getSchemaClassDefinition(java.lang.String)
javax.naming.directory.InitialDirContext.getSchemaClassDefinition(javax.naming.Name)


Occurences of getSchemaName

getSchemaName occurences:
java.sql.ResultSetMetaData.getSchemaName(int)
javax.sql.rowset.RowSetMetaDataImpl.getSchemaName(int)


Occurences of getSchemas

getSchemas occurences:
java.sql.DatabaseMetaData.getSchemas()
java.sql.DatabaseMetaData.getSchemas(java.lang.String, java.lang.String)


Occurences of getSchemaTypeInfo

getSchemaTypeInfo occurences:
javax.imageio.metadata.IIOMetadataNode.getSchemaTypeInfo()
org.w3c.dom.Attr.getSchemaTypeInfo()
org.w3c.dom.Element.getSchemaTypeInfo()


Occurences of getScheme

getScheme occurences:
java.net.URI.getScheme()
java.nio.file.spi.FileSystemProvider.getScheme()
javax.xml.ws.spi.http.HttpExchange.getScheme()


Occurences of getScope

getScope occurences:
com.sun.source.util.Trees.getScope(com.sun.source.util.TreePath)
java.security.Identity.getScope()
javax.xml.bind.JAXBElement.getScope()
javax.xml.ws.handler.MessageContext.getScope(java.lang.String)


Occurences of getScopes

getScopes occurences:
javax.script.ScriptContext.getScopes()
javax.script.SimpleScriptContext.getScopes()


Occurences of getScrollableBlockIncrement

getScrollableBlockIncrement occurences:
javax.swing.JLayer.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
javax.swing.JList.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
javax.swing.JTable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
javax.swing.JTree.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
javax.swing.Scrollable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
javax.swing.text.JTextComponent.getScrollableBlockIncrement(java.awt.Rectangle, int, int)


Occurences of getScrollableTracksViewportHeight

getScrollableTracksViewportHeight occurences:
javax.swing.JEditorPane.getScrollableTracksViewportHeight()
javax.swing.JLayer.getScrollableTracksViewportHeight()
javax.swing.JList.getScrollableTracksViewportHeight()
javax.swing.JTable.getScrollableTracksViewportHeight()
javax.swing.JTree.getScrollableTracksViewportHeight()
javax.swing.Scrollable.getScrollableTracksViewportHeight()
javax.swing.text.JTextComponent.getScrollableTracksViewportHeight()


Occurences of getScrollableTracksViewportWidth

getScrollableTracksViewportWidth occurences:
javax.swing.JEditorPane.getScrollableTracksViewportWidth()
javax.swing.JLayer.getScrollableTracksViewportWidth()
javax.swing.JList.getScrollableTracksViewportWidth()
javax.swing.JTable.getScrollableTracksViewportWidth()
javax.swing.JTextArea.getScrollableTracksViewportWidth()
javax.swing.JTree.getScrollableTracksViewportWidth()
javax.swing.Scrollable.getScrollableTracksViewportWidth()
javax.swing.text.JTextComponent.getScrollableTracksViewportWidth()


Occurences of getScrollableUnitIncrement

getScrollableUnitIncrement occurences:
javax.swing.JLayer.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.JList.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.JTable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.JTextArea.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.JTree.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)
javax.swing.text.JTextComponent.getScrollableUnitIncrement(java.awt.Rectangle, int, int)


Occurences of getSecond

getSecond occurences:
java.time.LocalDateTime.getSecond()
java.time.LocalTime.getSecond()
java.time.OffsetDateTime.getSecond()
java.time.OffsetTime.getSecond()
java.time.ZonedDateTime.getSecond()
javax.xml.datatype.XMLGregorianCalendar.getSecond()


Occurences of getSecondary1

getSecondary1 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getSecondary1()
javax.swing.plaf.metal.MetalTheme.getSecondary1()
javax.swing.plaf.metal.OceanTheme.getSecondary1()


Occurences of getSecondary2

getSecondary2 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getSecondary2()
javax.swing.plaf.metal.MetalTheme.getSecondary2()
javax.swing.plaf.metal.OceanTheme.getSecondary2()


Occurences of getSecondary3

getSecondary3 occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getSecondary3()
javax.swing.plaf.metal.MetalTheme.getSecondary3()
javax.swing.plaf.metal.OceanTheme.getSecondary3()


Occurences of getSeconds

getSeconds occurences:
java.sql.Date.getSeconds()
java.time.Duration.getSeconds()
java.util.Date.getSeconds()
javax.xml.datatype.Duration.getSeconds()


Occurences of getSecurityContext

getSecurityContext occurences:
java.lang.SecurityManager.getSecurityContext()
java.rmi.server.LoaderHandler.getSecurityContext(java.lang.ClassLoader)
java.rmi.server.RMIClassLoader.getSecurityContext(java.lang.ClassLoader)


Occurences of getSeed

getSeed occurences:
java.security.SecureRandom.getSeed(int)
java.security.spec.EllipticCurve.getSeed()


Occurences of getSelectColor

getSelectColor occurences:
javax.swing.plaf.metal.MetalButtonUI.getSelectColor()
javax.swing.plaf.metal.MetalRadioButtonUI.getSelectColor()
javax.swing.plaf.metal.MetalToggleButtonUI.getSelectColor()


Occurences of getSelectedAccessibleColumns

getSelectedAccessibleColumns occurences:
javax.accessibility.AccessibleTable.getSelectedAccessibleColumns()
javax.swing.JTable.AccessibleJTable.getSelectedAccessibleColumns()


Occurences of getSelectedAccessibleRows

getSelectedAccessibleRows occurences:
javax.accessibility.AccessibleTable.getSelectedAccessibleRows()
javax.swing.JTable.AccessibleJTable.getSelectedAccessibleRows()


Occurences of getSelectedColor

getSelectedColor occurences:
javax.swing.colorchooser.ColorSelectionModel.getSelectedColor()
javax.swing.colorchooser.DefaultColorSelectionModel.getSelectedColor()


Occurences of getSelectedColumnCount

getSelectedColumnCount occurences:
javax.swing.JTable.getSelectedColumnCount()
javax.swing.table.DefaultTableColumnModel.getSelectedColumnCount()
javax.swing.table.TableColumnModel.getSelectedColumnCount()


Occurences of getSelectedColumns

getSelectedColumns occurences:
javax.swing.JTable.getSelectedColumns()
javax.swing.table.DefaultTableColumnModel.getSelectedColumns()
javax.swing.table.TableColumnModel.getSelectedColumns()


Occurences of getSelectedIndex

getSelectedIndex occurences:
java.awt.Choice.getSelectedIndex()
java.awt.List.getSelectedIndex()
javax.security.auth.callback.ConfirmationCallback.getSelectedIndex()
javax.swing.DefaultSingleSelectionModel.getSelectedIndex()
javax.swing.JComboBox.getSelectedIndex()
javax.swing.JList.getSelectedIndex()
javax.swing.JTabbedPane.getSelectedIndex()
javax.swing.SingleSelectionModel.getSelectedIndex()


Occurences of getSelectedIndexes

getSelectedIndexes occurences:
java.awt.List.getSelectedIndexes()
javax.security.auth.callback.ChoiceCallback.getSelectedIndexes()


Occurences of getSelectedItem

getSelectedItem occurences:
java.awt.Choice.getSelectedItem()
java.awt.List.getSelectedItem()
javax.swing.ComboBoxModel.getSelectedItem()
javax.swing.DefaultComboBoxModel.getSelectedItem()
javax.swing.JComboBox.getSelectedItem()
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.getSelectedItem()
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.getSelectedItem()


Occurences of getSelectedObjects

getSelectedObjects occurences:
java.awt.Checkbox.getSelectedObjects()
java.awt.CheckboxMenuItem.getSelectedObjects()
java.awt.Choice.getSelectedObjects()
java.awt.ItemSelectable.getSelectedObjects()
java.awt.List.getSelectedObjects()
javax.swing.AbstractButton.getSelectedObjects()
javax.swing.DefaultButtonModel.getSelectedObjects()
javax.swing.JCheckBoxMenuItem.getSelectedObjects()
javax.swing.JComboBox.getSelectedObjects()


Occurences of getSelectedText

getSelectedText occurences:
java.awt.im.InputMethodRequests.getSelectedText(java.text.AttributedCharacterIterator.Attribute:A)
java.awt.TextComponent.getSelectedText()
java.awt.TextComponent.AccessibleAWTTextComponent.getSelectedText()
javax.accessibility.AccessibleText.getSelectedText()
javax.swing.AbstractButton.AccessibleAbstractButton.getSelectedText()
javax.swing.JLabel.AccessibleJLabel.getSelectedText()
javax.swing.JSpinner.AccessibleJSpinner.getSelectedText()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getSelectedText()
javax.swing.text.JTextComponent.getSelectedText()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getSelectedText()


Occurences of getSelectionBackground

getSelectionBackground occurences:
javax.swing.JList.getSelectionBackground()
javax.swing.JTable.getSelectionBackground()
javax.swing.plaf.basic.BasicProgressBarUI.getSelectionBackground()


Occurences of getSelectionCount

getSelectionCount occurences:
javax.swing.JTree.getSelectionCount()
javax.swing.tree.DefaultTreeSelectionModel.getSelectionCount()
javax.swing.tree.TreeSelectionModel.getSelectionCount()


Occurences of getSelectionEnd

getSelectionEnd occurences:
java.awt.TextComponent.getSelectionEnd()
java.awt.TextComponent.AccessibleAWTTextComponent.getSelectionEnd()
javax.accessibility.AccessibleText.getSelectionEnd()
javax.swing.AbstractButton.AccessibleAbstractButton.getSelectionEnd()
javax.swing.JLabel.AccessibleJLabel.getSelectionEnd()
javax.swing.JSpinner.AccessibleJSpinner.getSelectionEnd()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getSelectionEnd()
javax.swing.text.JTextComponent.getSelectionEnd()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getSelectionEnd()


Occurences of getSelectionForeground

getSelectionForeground occurences:
javax.swing.JList.getSelectionForeground()
javax.swing.JTable.getSelectionForeground()
javax.swing.plaf.basic.BasicProgressBarUI.getSelectionForeground()


Occurences of getSelectionMode

getSelectionMode occurences:
javax.swing.DefaultListSelectionModel.getSelectionMode()
javax.swing.JList.getSelectionMode()
javax.swing.ListSelectionModel.getSelectionMode()
javax.swing.tree.DefaultTreeSelectionModel.getSelectionMode()
javax.swing.tree.TreeSelectionModel.getSelectionMode()


Occurences of getSelectionModel

getSelectionModel occurences:
javax.swing.JColorChooser.getSelectionModel()
javax.swing.JList.getSelectionModel()
javax.swing.JMenuBar.getSelectionModel()
javax.swing.JPopupMenu.getSelectionModel()
javax.swing.JTable.getSelectionModel()
javax.swing.JTree.getSelectionModel()
javax.swing.plaf.basic.BasicTreeUI.getSelectionModel()
javax.swing.table.DefaultTableColumnModel.getSelectionModel()
javax.swing.table.TableColumnModel.getSelectionModel()
javax.swing.tree.AbstractLayoutCache.getSelectionModel()


Occurences of getSelectionPath

getSelectionPath occurences:
javax.swing.JTree.getSelectionPath()
javax.swing.tree.DefaultTreeSelectionModel.getSelectionPath()
javax.swing.tree.TreeSelectionModel.getSelectionPath()


Occurences of getSelectionPaths

getSelectionPaths occurences:
javax.swing.JTree.getSelectionPaths()
javax.swing.tree.DefaultTreeSelectionModel.getSelectionPaths()
javax.swing.tree.TreeSelectionModel.getSelectionPaths()


Occurences of getSelectionRows

getSelectionRows occurences:
javax.swing.JTree.getSelectionRows()
javax.swing.tree.DefaultTreeSelectionModel.getSelectionRows()
javax.swing.tree.TreeSelectionModel.getSelectionRows()


Occurences of getSelectionStart

getSelectionStart occurences:
java.awt.TextComponent.getSelectionStart()
java.awt.TextComponent.AccessibleAWTTextComponent.getSelectionStart()
javax.accessibility.AccessibleText.getSelectionStart()
javax.swing.AbstractButton.AccessibleAbstractButton.getSelectionStart()
javax.swing.JLabel.AccessibleJLabel.getSelectionStart()
javax.swing.JSpinner.AccessibleJSpinner.getSelectionStart()
javax.swing.ProgressMonitor.AccessibleProgressMonitor.getSelectionStart()
javax.swing.text.JTextComponent.getSelectionStart()
javax.swing.text.JTextComponent.AccessibleJTextComponent.getSelectionStart()


Occurences of getSendBufferSize

getSendBufferSize occurences:
java.net.DatagramSocket.getSendBufferSize()
java.net.Socket.getSendBufferSize()


Occurences of getSendPastNotifications

getSendPastNotifications occurences:
javax.management.timer.Timer.getSendPastNotifications()
javax.management.timer.TimerMBean.getSendPastNotifications()


Occurences of getSentenceInstance

getSentenceInstance occurences:
java.text.BreakIterator.getSentenceInstance()
java.text.BreakIterator.getSentenceInstance(java.util.Locale)
java.text.spi.BreakIteratorProvider.getSentenceInstance(java.util.Locale)


Occurences of getSeparatorBackground

getSeparatorBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getSeparatorBackground()
javax.swing.plaf.metal.MetalTheme.getSeparatorBackground()


Occurences of getSeparatorForeground

getSeparatorForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getSeparatorForeground()
javax.swing.plaf.metal.MetalTheme.getSeparatorForeground()


Occurences of getSequence

getSequence occurences:
javax.sound.midi.MidiSystem.getSequence(java.io.File)
javax.sound.midi.MidiSystem.getSequence(java.io.InputStream)
javax.sound.midi.MidiSystem.getSequence(java.net.URL)
javax.sound.midi.Sequencer.getSequence()
javax.sound.midi.spi.MidiFileReader.getSequence(java.io.File)
javax.sound.midi.spi.MidiFileReader.getSequence(java.io.InputStream)
javax.sound.midi.spi.MidiFileReader.getSequence(java.net.URL)


Occurences of getSequenceNumber

getSequenceNumber occurences:
java.util.logging.LogRecord.getSequenceNumber()
javax.management.Notification.getSequenceNumber()


Occurences of getSequencer

getSequencer occurences:
javax.sound.midi.MidiSystem.getSequencer()
javax.sound.midi.MidiSystem.getSequencer(boolean)


Occurences of getSerialNumber

getSerialNumber occurences:
java.security.cert.X509Certificate.getSerialNumber()
java.security.cert.X509CertSelector.getSerialNumber()
java.security.cert.X509CRLEntry.getSerialNumber()
javax.security.cert.X509Certificate.getSerialNumber()
javax.xml.crypto.dsig.keyinfo.X509IssuerSerial.getSerialNumber()


Occurences of getService

getService occurences:
java.beans.beancontext.BeanContextServiceProvider.getService(java.beans.beancontext.BeanContextServices, java.lang.Object, java.lang.Class, java.lang.Object)
java.beans.beancontext.BeanContextServices.getService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Class, java.lang.Object, java.beans.beancontext.BeanContextServiceRevokedListener)
java.beans.beancontext.BeanContextServicesSupport.getService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Class, java.lang.Object, java.beans.beancontext.BeanContextServiceRevokedListener)
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider.getService(java.beans.beancontext.BeanContextServices, java.lang.Object, java.lang.Class, java.lang.Object)
java.security.Provider.getService(java.lang.String, java.lang.String)


Occurences of getServiceClass

getServiceClass occurences:
java.beans.beancontext.BeanContextServiceAvailableEvent.getServiceClass()
java.beans.beancontext.BeanContextServiceRevokedEvent.getServiceClass()


Occurences of getServiceName

getServiceName occurences:
javax.xml.ws.handler.PortInfo.getServiceName()
javax.xml.ws.Service.getServiceName()
javax.xml.ws.spi.ServiceDelegate.getServiceName()


Occurences of getServiceProviders

getServiceProviders occurences:
javax.imageio.spi.ServiceRegistry.getServiceProviders(java.lang.Class, boolean)
javax.imageio.spi.ServiceRegistry.getServiceProviders(java.lang.Class, javax.imageio.spi.ServiceRegistry.Filter, boolean)


Occurences of getSession

getSession occurences:
javax.net.ssl.HandshakeCompletedEvent.getSession()
javax.net.ssl.SSLEngine.getSession()
javax.net.ssl.SSLSessionBindingEvent.getSession()
javax.net.ssl.SSLSessionContext.getSession(byte:A)
javax.net.ssl.SSLSocket.getSession()


Occurences of getSeverity

getSeverity occurences:
javax.xml.bind.helpers.ValidationEventImpl.getSeverity()
javax.xml.bind.ValidationEvent.getSeverity()
org.w3c.dom.DOMError.getSeverity()


Occurences of getShadowColor

getShadowColor occurences:
javax.swing.border.EtchedBorder.getShadowColor()
javax.swing.border.EtchedBorder.getShadowColor(java.awt.Component)
javax.swing.plaf.basic.BasicSliderUI.getShadowColor()


Occurences of getShadowInnerColor

getShadowInnerColor occurences:
javax.swing.border.BevelBorder.getShadowInnerColor()
javax.swing.border.BevelBorder.getShadowInnerColor(java.awt.Component)


Occurences of getShadowOuterColor

getShadowOuterColor occurences:
javax.swing.border.BevelBorder.getShadowOuterColor()
javax.swing.border.BevelBorder.getShadowOuterColor(java.awt.Component)


Occurences of getShaper

getShaper occurences:
java.awt.font.NumericShaper.getShaper(int)
java.awt.font.NumericShaper.getShaper(java.awt.font.NumericShaper.Range)


Occurences of getSharedQueuedThreads

getSharedQueuedThreads occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getSharedQueuedThreads()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getSharedQueuedThreads()


Occurences of getShift

getShift occurences:
javax.swing.plaf.metal.MetalIconFactory.FileIcon16.getShift()
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.getShift()
javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon.getShift()
javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon.getShift()


Occurences of getShort

getShort occurences:
java.lang.reflect.Array.getShort(java.lang.Object, int)
java.lang.reflect.Field.getShort(java.lang.Object)
java.nio.ByteBuffer.getShort()
java.nio.ByteBuffer.getShort(int)
java.sql.CallableStatement.getShort(int)
java.sql.CallableStatement.getShort(java.lang.String)
java.sql.ResultSet.getShort(int)
java.sql.ResultSet.getShort(java.lang.String)


Occurences of getShowDeleted

getShowDeleted occurences:
javax.sql.rowset.BaseRowSet.getShowDeleted()
javax.sql.rowset.CachedRowSet.getShowDeleted()
javax.sql.rowset.JdbcRowSet.getShowDeleted()


Occurences of getShowsRootHandles

getShowsRootHandles occurences:
javax.swing.JTree.getShowsRootHandles()
javax.swing.plaf.basic.BasicTreeUI.getShowsRootHandles()


Occurences of getSigAlgName

getSigAlgName occurences:
java.security.cert.X509Certificate.getSigAlgName()
java.security.cert.X509CRL.getSigAlgName()
javax.security.cert.X509Certificate.getSigAlgName()


Occurences of getSigAlgOID

getSigAlgOID occurences:
java.security.cert.X509Certificate.getSigAlgOID()
java.security.cert.X509CRL.getSigAlgOID()
javax.security.cert.X509Certificate.getSigAlgOID()


Occurences of getSigAlgParams

getSigAlgParams occurences:
java.security.cert.X509Certificate.getSigAlgParams()
java.security.cert.X509CRL.getSigAlgParams()
javax.security.cert.X509Certificate.getSigAlgParams()


Occurences of getSignature

getSignature occurences:
com.sun.source.doctree.ReferenceTree.getSignature()
java.security.cert.X509Certificate.getSignature()
java.security.cert.X509CRL.getSignature()
java.security.SignedObject.getSignature()
javax.management.MBeanConstructorInfo.getSignature()
javax.management.MBeanOperationInfo.getSignature()
javax.management.openmbean.OpenMBeanConstructorInfo.getSignature()
javax.management.openmbean.OpenMBeanOperationInfo.getSignature()


Occurences of getSignerCertPath

getSignerCertPath occurences:
java.security.CodeSigner.getSignerCertPath()
java.security.Timestamp.getSignerCertPath()


Occurences of getSimpleName

getSimpleName occurences:
com.sun.source.tree.ClassTree.getSimpleName()
java.lang.Class.getSimpleName()
javax.lang.model.element.Element.getSimpleName()
javax.lang.model.element.ExecutableElement.getSimpleName()
javax.lang.model.element.PackageElement.getSimpleName()
javax.lang.model.element.TypeElement.getSimpleName()
javax.lang.model.element.VariableElement.getSimpleName()


Occurences of getSize

getSize occurences:
java.awt.Component.getSize()
java.awt.Component.getSize(java.awt.Dimension)
java.awt.Component.AccessibleAWTComponent.getSize()
java.awt.Dimension.getSize()
java.awt.Font.getSize()
java.awt.image.DataBuffer.getSize()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.getSize()
java.awt.MenuComponent.AccessibleAWTMenuComponent.getSize()
java.awt.Rectangle.getSize()
java.awt.SplashScreen.getSize()
java.awt.TrayIcon.getSize()
java.util.zip.ZipEntry.getSize()
javax.accessibility.AccessibleComponent.getSize()
javax.print.attribute.Size2DSyntax.getSize(int)
javax.swing.DefaultComboBoxModel.getSize()
javax.swing.DefaultListModel.getSize()
javax.swing.JComponent.getSize(java.awt.Dimension)
javax.swing.JList.AccessibleJList.AccessibleJListChild.getSize()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getSize()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getSize()
javax.swing.ListModel.getSize()
javax.swing.plaf.basic.BasicDirectoryModel.getSize()
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.getSize()
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.getSize()
javax.swing.SizeSequence.getSize(int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getSize()
javax.xml.soap.AttachmentPart.getSize()


Occurences of getSizeButtonsToSameWidth

getSizeButtonsToSameWidth occurences:
javax.swing.plaf.basic.BasicOptionPaneUI.getSizeButtonsToSameWidth()
javax.swing.plaf.synth.SynthOptionPaneUI.getSizeButtonsToSameWidth()


Occurences of getSizes

getSizes occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.getSizes()
javax.swing.SizeSequence.getSizes()


Occurences of getSizingIcon

getSizingIcon occurences:
javax.swing.plaf.synth.SynthButtonUI.getSizingIcon(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthRadioButtonUI.getSizingIcon(javax.swing.AbstractButton)


Occurences of getSocketFactory

getSocketFactory occurences:
java.rmi.server.RMISocketFactory.getSocketFactory()
javax.net.ssl.SSLContext.getSocketFactory()


Occurences of getSortKeys

getSortKeys occurences:
javax.swing.DefaultRowSorter.getSortKeys()
javax.swing.RowSorter.getSortKeys()


Occurences of getSoTimeout

getSoTimeout occurences:
java.net.DatagramSocket.getSoTimeout()
java.net.ServerSocket.getSoTimeout()
java.net.Socket.getSoTimeout()


Occurences of getSoundbank

getSoundbank occurences:
javax.sound.midi.MidiSystem.getSoundbank(java.io.File)
javax.sound.midi.MidiSystem.getSoundbank(java.io.InputStream)
javax.sound.midi.MidiSystem.getSoundbank(java.net.URL)
javax.sound.midi.SoundbankResource.getSoundbank()
javax.sound.midi.spi.SoundbankReader.getSoundbank(java.io.File)
javax.sound.midi.spi.SoundbankReader.getSoundbank(java.io.InputStream)
javax.sound.midi.spi.SoundbankReader.getSoundbank(java.net.URL)


Occurences of getSource

getSource occurences:
java.awt.Image.getSource()
java.awt.image.BufferedImage.getSource()
java.awt.image.renderable.ParameterBlock.getSource(int)
java.awt.image.VolatileImage.getSource()
java.beans.PropertyEditorSupport.getSource()
java.sql.SQLXML.getSource(java.lang.Class)
java.util.EventObject.getSource()
javax.swing.event.RowSorterEvent.getSource()
javax.tools.Diagnostic.getSource()


Occurences of getSourceActions

getSourceActions occurences:
java.awt.dnd.DragGestureRecognizer.getSourceActions()
java.awt.dnd.DragSourceContext.getSourceActions()
java.awt.dnd.DropTargetDragEvent.getSourceActions()
java.awt.dnd.DropTargetDropEvent.getSourceActions()
javax.swing.TransferHandler.getSourceActions(javax.swing.JComponent)


Occurences of getSourceAsBeanContextServices

getSourceAsBeanContextServices occurences:
java.beans.beancontext.BeanContextServiceAvailableEvent.getSourceAsBeanContextServices()
java.beans.beancontext.BeanContextServiceRevokedEvent.getSourceAsBeanContextServices()


Occurences of getSourceDataLine

getSourceDataLine occurences:
javax.sound.sampled.AudioSystem.getSourceDataLine(javax.sound.sampled.AudioFormat)
javax.sound.sampled.AudioSystem.getSourceDataLine(javax.sound.sampled.AudioFormat, javax.sound.sampled.Mixer.Info)


Occurences of getSourceFile

getSourceFile occurences:
com.sun.source.tree.CompilationUnitTree.getSourceFile()
com.sun.source.util.TaskEvent.getSourceFile()


Occurences of getSourceLineInfo

getSourceLineInfo occurences:
javax.sound.sampled.AudioSystem.getSourceLineInfo(javax.sound.sampled.Line.Info)
javax.sound.sampled.Mixer.getSourceLineInfo()
javax.sound.sampled.Mixer.getSourceLineInfo(javax.sound.sampled.Line.Info)


Occurences of getSourcePositions

getSourcePositions occurences:
com.sun.source.util.DocTrees.getSourcePositions()
com.sun.source.util.Trees.getSourcePositions()


Occurences of getSourceRegion

getSourceRegion occurences:
javax.imageio.IIOParam.getSourceRegion()
javax.imageio.ImageReader.getSourceRegion(javax.imageio.ImageReadParam, int, int)


Occurences of getSources

getSources occurences:
java.awt.image.BufferedImage.getSources()
java.awt.image.renderable.ParameterBlock.getSources()
java.awt.image.renderable.RenderableImage.getSources()
java.awt.image.renderable.RenderableImageOp.getSources()
java.awt.image.RenderedImage.getSources()


Occurences of getSpan

getSpan occurences:
javax.swing.text.BoxView.getSpan(int, int)
javax.swing.text.GlyphView.GlyphPainter.getSpan(javax.swing.text.GlyphView, int, int, javax.swing.text.TabExpander, float)


Occurences of getSpecificationName

getSpecificationName occurences:
javax.management.MBeanServerDelegate.getSpecificationName()
javax.management.MBeanServerDelegateMBean.getSpecificationName()


Occurences of getSpecificationVendor

getSpecificationVendor occurences:
java.lang.Package.getSpecificationVendor()
javax.management.MBeanServerDelegate.getSpecificationVendor()
javax.management.MBeanServerDelegateMBean.getSpecificationVendor()


Occurences of getSpecificationVersion

getSpecificationVersion occurences:
java.lang.Package.getSpecificationVersion()
javax.management.MBeanServerDelegate.getSpecificationVersion()
javax.management.MBeanServerDelegateMBean.getSpecificationVersion()


Occurences of getSQLException

getSQLException occurences:
javax.sql.ConnectionEvent.getSQLException()
javax.sql.StatementEvent.getSQLException()


Occurences of getSQLTypeName

getSQLTypeName occurences:
java.sql.SQLData.getSQLTypeName()
java.sql.Struct.getSQLTypeName()
javax.sql.rowset.serial.SerialStruct.getSQLTypeName()


Occurences of getSQLXML

getSQLXML occurences:
java.sql.CallableStatement.getSQLXML(int)
java.sql.CallableStatement.getSQLXML(java.lang.String)
java.sql.ResultSet.getSQLXML(int)
java.sql.ResultSet.getSQLXML(java.lang.String)


Occurences of getSSLParameters

getSSLParameters occurences:
javax.net.ssl.SSLEngine.getSSLParameters()
javax.net.ssl.SSLServerSocket.getSSLParameters()
javax.net.ssl.SSLSocket.getSSLParameters()


Occurences of getStackTrace

getStackTrace occurences:
java.lang.management.ThreadInfo.getStackTrace()
java.lang.Thread.getStackTrace()
java.lang.Throwable.getStackTrace()


Occurences of getStandardFileManager

getStandardFileManager occurences:
javax.tools.DocumentationTool.getStandardFileManager(javax.tools.DiagnosticListener, java.util.Locale, java.nio.charset.Charset)
javax.tools.JavaCompiler.getStandardFileManager(javax.tools.DiagnosticListener, java.util.Locale, java.nio.charset.Charset)


Occurences of getStandardOffset

getStandardOffset occurences:
java.time.zone.ZoneOffsetTransitionRule.getStandardOffset()
java.time.zone.ZoneRules.getStandardOffset(java.time.Instant)


Occurences of getStartIndex

getStartIndex occurences:
javax.accessibility.AccessibleHyperlink.getStartIndex()
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getStartIndex()


Occurences of getStartOffset

getStartOffset occurences:
javax.swing.text.AbstractDocument.AbstractElement.getStartOffset()
javax.swing.text.AbstractDocument.BranchElement.getStartOffset()
javax.swing.text.AbstractDocument.LeafElement.getStartOffset()
javax.swing.text.AbstractWriter.getStartOffset()
javax.swing.text.Element.getStartOffset()
javax.swing.text.GlyphView.getStartOffset()
javax.swing.text.Highlighter.Highlight.getStartOffset()
javax.swing.text.html.HTMLDocument.Iterator.getStartOffset()
javax.swing.text.View.getStartOffset()


Occurences of getStartPoint

getStartPoint occurences:
java.awt.geom.Arc2D.getStartPoint()
java.awt.LinearGradientPaint.getStartPoint()


Occurences of getStartPosition

getStartPosition occurences:
com.sun.source.tree.LineMap.getStartPosition(long)
com.sun.source.util.DocSourcePositions.getStartPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.doctree.DocCommentTree, com.sun.source.doctree.DocTree)
com.sun.source.util.SourcePositions.getStartPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.tree.Tree)
javax.swing.text.AbstractDocument.getStartPosition()
javax.swing.text.Document.getStartPosition()
javax.tools.Diagnostic.getStartPosition()


Occurences of getStartTime

getStartTime occurences:
java.lang.management.RuntimeMXBean.getStartTime()
javax.security.auth.kerberos.KerberosTicket.getStartTime()


Occurences of getState

getState occurences:
java.awt.Checkbox.getState()
java.awt.CheckboxMenuItem.getState()
java.awt.Frame.getState()
java.awt.im.InputMethodHighlight.getState()
java.lang.Thread.getState()
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getState()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getState()
javax.swing.JCheckBoxMenuItem.getState()
javax.swing.SwingWorker.getState()


Occurences of getStatement

getStatement occurences:
com.sun.source.tree.DoWhileLoopTree.getStatement()
com.sun.source.tree.EnhancedForLoopTree.getStatement()
com.sun.source.tree.ForLoopTree.getStatement()
com.sun.source.tree.LabeledStatementTree.getStatement()
com.sun.source.tree.WhileLoopTree.getStatement()
java.sql.ResultSet.getStatement()
javax.sql.StatementEvent.getStatement()


Occurences of getStatements

getStatements occurences:
com.sun.source.tree.BlockTree.getStatements()
com.sun.source.tree.CaseTree.getStatements()


Occurences of getStateToBind

getStateToBind occurences:
javax.naming.spi.DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
javax.naming.spi.DirStateFactory.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
javax.naming.spi.NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
javax.naming.spi.StateFactory.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)


Occurences of getStatus

getStatus occurences:
java.awt.image.PixelGrabber.getStatus()
javax.net.ssl.SSLEngineResult.getStatus()
javax.sound.midi.MidiMessage.getStatus()
javax.sql.rowset.spi.SyncResolver.getStatus()


Occurences of getStream

getStream occurences:
java.applet.AppletContext.getStream(java.lang.String)
javax.accessibility.AccessibleStreamable.getStream(java.awt.datatransfer.DataFlavor)
javax.swing.JEditorPane.getStream(java.net.URL)


Occurences of getStreamForBytes

getStreamForBytes occurences:
javax.print.Doc.getStreamForBytes()
javax.print.SimpleDoc.getStreamForBytes()


Occurences of getStreamMetadata

getStreamMetadata occurences:
javax.imageio.ImageReader.getStreamMetadata()
javax.imageio.ImageReader.getStreamMetadata(java.lang.String, java.util.Set)


Occurences of getStreamPosition

getStreamPosition occurences:
javax.imageio.stream.ImageInputStream.getStreamPosition()
javax.imageio.stream.ImageInputStreamImpl.getStreamPosition()


Occurences of getString

getString occurences:
java.sql.CallableStatement.getString(int)
java.sql.CallableStatement.getString(java.lang.String)
java.sql.ResultSet.getString(int)
java.sql.ResultSet.getString(java.lang.String)
java.sql.SQLXML.getString()
java.util.ResourceBundle.getString(java.lang.String)
javax.swing.JProgressBar.getString()
javax.swing.plaf.synth.SynthStyle.getString(javax.swing.plaf.synth.SynthContext, java.lang.Object, java.lang.String)
javax.swing.text.AbstractDocument.Content.getString(int, int)
javax.swing.text.GapContent.getString(int, int)
javax.swing.text.html.parser.Entity.getString()
javax.swing.text.StringContent.getString(int, int)
javax.swing.UIDefaults.getString(java.lang.Object)
javax.swing.UIDefaults.getString(java.lang.Object, java.util.Locale)
javax.swing.UIManager.getString(java.lang.Object)
javax.swing.UIManager.getString(java.lang.Object, java.util.Locale)


Occurences of getStringBounds

getStringBounds occurences:
java.awt.Font.getStringBounds(char:A, int, int, java.awt.font.FontRenderContext)
java.awt.Font.getStringBounds(java.lang.String, int, int, java.awt.font.FontRenderContext)
java.awt.Font.getStringBounds(java.lang.String, java.awt.font.FontRenderContext)
java.awt.Font.getStringBounds(java.text.CharacterIterator, int, int, java.awt.font.FontRenderContext)
java.awt.FontMetrics.getStringBounds(char:A, int, int, java.awt.Graphics)
java.awt.FontMetrics.getStringBounds(java.lang.String, int, int, java.awt.Graphics)
java.awt.FontMetrics.getStringBounds(java.lang.String, java.awt.Graphics)
java.awt.FontMetrics.getStringBounds(java.text.CharacterIterator, int, int, java.awt.Graphics)


Occurences of getStringTable

getStringTable occurences:
javax.print.attribute.EnumSyntax.getStringTable()
javax.print.attribute.standard.Chromaticity.getStringTable()
javax.print.attribute.standard.ColorSupported.getStringTable()
javax.print.attribute.standard.Compression.getStringTable()
javax.print.attribute.standard.DialogTypeSelection.getStringTable()
javax.print.attribute.standard.Fidelity.getStringTable()
javax.print.attribute.standard.Finishings.getStringTable()
javax.print.attribute.standard.JobSheets.getStringTable()
javax.print.attribute.standard.JobState.getStringTable()
javax.print.attribute.standard.JobStateReason.getStringTable()
javax.print.attribute.standard.MediaName.getStringTable()
javax.print.attribute.standard.MediaSizeName.getStringTable()
javax.print.attribute.standard.MediaTray.getStringTable()
javax.print.attribute.standard.MultipleDocumentHandling.getStringTable()
javax.print.attribute.standard.OrientationRequested.getStringTable()
javax.print.attribute.standard.PDLOverrideSupported.getStringTable()
javax.print.attribute.standard.PresentationDirection.getStringTable()
javax.print.attribute.standard.PrinterIsAcceptingJobs.getStringTable()
javax.print.attribute.standard.PrinterState.getStringTable()
javax.print.attribute.standard.PrinterStateReason.getStringTable()
javax.print.attribute.standard.PrintQuality.getStringTable()
javax.print.attribute.standard.ReferenceUriSchemesSupported.getStringTable()
javax.print.attribute.standard.Severity.getStringTable()
javax.print.attribute.standard.SheetCollate.getStringTable()
javax.print.attribute.standard.Sides.getStringTable()


Occurences of getStringToCompare

getStringToCompare occurences:
javax.management.monitor.StringMonitor.getStringToCompare()
javax.management.monitor.StringMonitorMBean.getStringToCompare()


Occurences of getStroke

getStroke occurences:
java.awt.Graphics2D.getStroke()
javax.swing.border.StrokeBorder.getStroke()


Occurences of getStyle

getStyle occurences:
java.awt.Font.getStyle()
java.awt.im.InputMethodHighlight.getStyle()
javax.swing.JTextPane.getStyle(java.lang.String)
javax.swing.plaf.nimbus.NimbusLookAndFeel.getStyle(javax.swing.JComponent, javax.swing.plaf.synth.Region)
javax.swing.plaf.synth.SynthContext.getStyle()
javax.swing.plaf.synth.SynthLookAndFeel.getStyle(javax.swing.JComponent, javax.swing.plaf.synth.Region)
javax.swing.plaf.synth.SynthStyleFactory.getStyle(javax.swing.JComponent, javax.swing.plaf.synth.Region)
javax.swing.text.DefaultStyledDocument.getStyle(java.lang.String)
javax.swing.text.StyleContext.getStyle(java.lang.String)
javax.swing.text.StyledDocument.getStyle(java.lang.String)


Occurences of getStyledDocument

getStyledDocument occurences:
javax.swing.JTextPane.getStyledDocument()
javax.swing.text.StyledEditorKit.StyledTextAction.getStyledDocument(javax.swing.JEditorPane)


Occurences of getStyledEditorKit

getStyledEditorKit occurences:
javax.swing.JTextPane.getStyledEditorKit()
javax.swing.text.StyledEditorKit.StyledTextAction.getStyledEditorKit(javax.swing.JEditorPane)


Occurences of getStyleNames

getStyleNames occurences:
javax.swing.text.DefaultStyledDocument.getStyleNames()
javax.swing.text.StyleContext.getStyleNames()


Occurences of getStyleSheet

getStyleSheet occurences:
javax.swing.text.html.BlockView.getStyleSheet()
javax.swing.text.html.HTMLDocument.getStyleSheet()
javax.swing.text.html.HTMLEditorKit.getStyleSheet()
javax.swing.text.html.ImageView.getStyleSheet()
javax.swing.text.html.InlineView.getStyleSheet()
javax.swing.text.html.ParagraphView.getStyleSheet()


Occurences of getSubElements

getSubElements occurences:
javax.swing.JMenu.getSubElements()
javax.swing.JMenuBar.getSubElements()
javax.swing.JMenuItem.getSubElements()
javax.swing.JPopupMenu.getSubElements()
javax.swing.MenuElement.getSubElements()


Occurences of getSubject

getSubject occurences:
java.security.cert.X509CertSelector.getSubject()
javax.security.auth.login.LoginContext.getSubject()
javax.security.auth.Subject.getSubject(java.security.AccessControlContext)
javax.security.auth.SubjectDomainCombiner.getSubject()


Occurences of getSubjectAlternativeNames

getSubjectAlternativeNames occurences:
java.security.cert.X509Certificate.getSubjectAlternativeNames()
java.security.cert.X509CertSelector.getSubjectAlternativeNames()


Occurences of getSubjectDN

getSubjectDN occurences:
java.security.cert.X509Certificate.getSubjectDN()
javax.security.cert.X509Certificate.getSubjectDN()


Occurences of getSubString

getSubString occurences:
java.sql.Clob.getSubString(long, int)
javax.sql.rowset.serial.SerialClob.getSubString(long, int)


Occurences of getSubTextFont

getSubTextFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getSubTextFont()
javax.swing.plaf.metal.MetalLookAndFeel.getSubTextFont()
javax.swing.plaf.metal.MetalTheme.getSubTextFont()


Occurences of getSubType

getSubType occurences:
java.awt.datatransfer.DataFlavor.getSubType()
javax.activation.MimeType.getSubType()


Occurences of getSuffix

getSuffix occurences:
javax.naming.CompositeName.getSuffix(int)
javax.naming.CompoundName.getSuffix(int)
javax.naming.ldap.LdapName.getSuffix(int)
javax.naming.Name.getSuffix(int)


Occurences of getSum

getSum occurences:
java.util.DoubleSummaryStatistics.getSum()
java.util.IntSummaryStatistics.getSum()
java.util.LongSummaryStatistics.getSum()


Occurences of getSuperclass

getSuperclass occurences:
java.lang.Class.getSuperclass()
javax.lang.model.element.TypeElement.getSuperclass()


Occurences of getSupportedAnnotationTypes

getSupportedAnnotationTypes occurences:
javax.annotation.processing.AbstractProcessor.getSupportedAnnotationTypes()
javax.annotation.processing.Processor.getSupportedAnnotationTypes()


Occurences of getSupportedCipherSuites

getSupportedCipherSuites occurences:
javax.net.ssl.SSLEngine.getSupportedCipherSuites()
javax.net.ssl.SSLServerSocket.getSupportedCipherSuites()
javax.net.ssl.SSLServerSocketFactory.getSupportedCipherSuites()
javax.net.ssl.SSLSocket.getSupportedCipherSuites()
javax.net.ssl.SSLSocketFactory.getSupportedCipherSuites()


Occurences of getSupportedDocFlavors

getSupportedDocFlavors occurences:
javax.print.PrintService.getSupportedDocFlavors()
javax.print.StreamPrintServiceFactory.getSupportedDocFlavors()


Occurences of getSupportedOptions

getSupportedOptions occurences:
javax.annotation.processing.AbstractProcessor.getSupportedOptions()
javax.annotation.processing.Processor.getSupportedOptions()


Occurences of getSupportedProtocols

getSupportedProtocols occurences:
javax.net.ssl.SSLEngine.getSupportedProtocols()
javax.net.ssl.SSLServerSocket.getSupportedProtocols()
javax.net.ssl.SSLSocket.getSupportedProtocols()


Occurences of getSupportedSourceVersion

getSupportedSourceVersion occurences:
javax.annotation.processing.AbstractProcessor.getSupportedSourceVersion()
javax.annotation.processing.Processor.getSupportedSourceVersion()


Occurences of getSupportsAbsolutePositioning

getSupportsAbsolutePositioning occurences:
javax.swing.plaf.basic.BasicScrollBarUI.getSupportsAbsolutePositioning()
javax.swing.plaf.synth.SynthScrollBarUI.getSupportsAbsolutePositioning()


Occurences of getSupportsWindowDecorations

getSupportsWindowDecorations occurences:
javax.swing.LookAndFeel.getSupportsWindowDecorations()
javax.swing.plaf.metal.MetalLookAndFeel.getSupportsWindowDecorations()


Occurences of getSymbol

getSymbol occurences:
java.util.Currency.getSymbol()
java.util.Currency.getSymbol(java.util.Locale)
java.util.spi.CurrencyNameProvider.getSymbol(java.lang.String, java.util.Locale)


Occurences of getSystem

getSystem occurences:
java.rmi.activation.ActivationGroup.getSystem()
java.rmi.activation.ActivationGroupID.getSystem()


Occurences of getSystemId

getSystemId occurences:
javax.xml.stream.events.EntityDeclaration.getSystemId()
javax.xml.stream.events.NotationDeclaration.getSystemId()
javax.xml.stream.events.StartDocument.getSystemId()
javax.xml.stream.Location.getSystemId()
javax.xml.transform.dom.DOMResult.getSystemId()
javax.xml.transform.dom.DOMSource.getSystemId()
javax.xml.transform.Result.getSystemId()
javax.xml.transform.sax.SAXResult.getSystemId()
javax.xml.transform.sax.SAXSource.getSystemId()
javax.xml.transform.sax.TemplatesHandler.getSystemId()
javax.xml.transform.sax.TransformerHandler.getSystemId()
javax.xml.transform.Source.getSystemId()
javax.xml.transform.SourceLocator.getSystemId()
javax.xml.transform.stax.StAXResult.getSystemId()
javax.xml.transform.stax.StAXSource.getSystemId()
javax.xml.transform.stream.StreamResult.getSystemId()
javax.xml.transform.stream.StreamSource.getSystemId()
org.w3c.dom.DocumentType.getSystemId()
org.w3c.dom.Entity.getSystemId()
org.w3c.dom.ls.LSInput.getSystemId()
org.w3c.dom.ls.LSOutput.getSystemId()
org.w3c.dom.Notation.getSystemId()
org.xml.sax.helpers.LocatorImpl.getSystemId()
org.xml.sax.InputSource.getSystemId()
org.xml.sax.Locator.getSystemId()
org.xml.sax.SAXParseException.getSystemId()


Occurences of getSystemProperties

getSystemProperties occurences:
com.sun.tools.attach.VirtualMachine.getSystemProperties()
java.lang.management.RuntimeMXBean.getSystemProperties()


Occurences of getSystemTextColor

getSystemTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getSystemTextColor()
javax.swing.plaf.metal.MetalTheme.getSystemTextColor()


Occurences of getSystemTextFont

getSystemTextFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getSystemTextFont()
javax.swing.plaf.metal.MetalLookAndFeel.getSystemTextFont()
javax.swing.plaf.metal.MetalTheme.getSystemTextFont()


Occurences of getTabbedSpan

getTabbedSpan occurences:
javax.swing.text.GlyphView.getTabbedSpan(float, javax.swing.text.TabExpander)
javax.swing.text.TabableView.getTabbedSpan(float, javax.swing.text.TabExpander)


Occurences of getTabbedTextOffset

getTabbedTextOffset occurences:
javax.swing.text.Utilities.getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int)
javax.swing.text.Utilities.getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int, boolean)


Occurences of getTabBounds

getTabBounds occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabBounds(int, java.awt.Rectangle)
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabBounds(javax.swing.JTabbedPane, int)
javax.swing.plaf.multi.MultiTabbedPaneUI.getTabBounds(javax.swing.JTabbedPane, int)
javax.swing.plaf.TabbedPaneUI.getTabBounds(javax.swing.JTabbedPane, int)


Occurences of getTabCount

getTabCount occurences:
javax.swing.JTabbedPane.getTabCount()
javax.swing.text.TabSet.getTabCount()


Occurences of getTabInsets

getTabInsets occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabInsets(int, int)
javax.swing.plaf.synth.SynthTabbedPaneUI.getTabInsets(int, int)


Occurences of getTabLabelShiftX

getTabLabelShiftX occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabLabelShiftX(int, int, boolean)
javax.swing.plaf.metal.MetalTabbedPaneUI.getTabLabelShiftX(int, int, boolean)
javax.swing.plaf.synth.SynthTabbedPaneUI.getTabLabelShiftX(int, int, boolean)


Occurences of getTabLabelShiftY

getTabLabelShiftY occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabLabelShiftY(int, int, boolean)
javax.swing.plaf.metal.MetalTabbedPaneUI.getTabLabelShiftY(int, int, boolean)
javax.swing.plaf.synth.SynthTabbedPaneUI.getTabLabelShiftY(int, int, boolean)


Occurences of getTable

getTable occurences:
java.awt.image.ByteLookupTable.getTable()
java.awt.image.LookupOp.getTable()
java.awt.image.ShortLookupTable.getTable()
javax.imageio.plugins.jpeg.JPEGQTable.getTable()
javax.swing.table.JTableHeader.getTable()


Occurences of getTableCellEditorComponent

getTableCellEditorComponent occurences:
javax.swing.DefaultCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int)
javax.swing.table.TableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int)


Occurences of getTableCellRendererComponent

getTableCellRendererComponent occurences:
javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
javax.swing.table.TableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)


Occurences of getTableName

getTableName occurences:
java.sql.ResultSetMetaData.getTableName(int)
javax.sql.rowset.CachedRowSet.getTableName()
javax.sql.rowset.RowSetMetaDataImpl.getTableName(int)


Occurences of getTabRunCount

getTabRunCount occurences:
javax.swing.JTabbedPane.getTabRunCount()
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabRunCount(javax.swing.JTabbedPane)
javax.swing.plaf.multi.MultiTabbedPaneUI.getTabRunCount(javax.swing.JTabbedPane)
javax.swing.plaf.TabbedPaneUI.getTabRunCount(javax.swing.JTabbedPane)


Occurences of getTabRunOverlay

getTabRunOverlay occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.getTabRunOverlay(int)
javax.swing.plaf.metal.MetalTabbedPaneUI.getTabRunOverlay(int)


Occurences of getTabSet

getTabSet occurences:
javax.swing.text.ParagraphView.getTabSet()
javax.swing.text.StyleConstants.getTabSet(javax.swing.text.AttributeSet)


Occurences of getTabSize

getTabSize occurences:
javax.swing.JTextArea.getTabSize()
javax.swing.text.PlainView.getTabSize()
javax.swing.text.WrappedPlainView.getTabSize()


Occurences of getTabularType

getTabularType occurences:
javax.management.openmbean.TabularData.getTabularType()
javax.management.openmbean.TabularDataSupport.getTabularType()


Occurences of getTag

getTag occurences:
javax.swing.text.html.HTML.getTag(java.lang.String)
javax.swing.text.html.HTMLDocument.Iterator.getTag()


Occurences of getTagName

getTagName occurences:
com.sun.source.doctree.BlockTagTree.getTagName()
com.sun.source.doctree.InlineTagTree.getTagName()
javax.imageio.metadata.IIOMetadataNode.getTagName()
org.w3c.dom.Element.getTagName()


Occurences of getTags

getTags occurences:
java.beans.PropertyEditor.getTags()
java.beans.PropertyEditorSupport.getTags()


Occurences of getTail

getTail occurences:
java.util.logging.Formatter.getTail(java.util.logging.Handler)
java.util.logging.XMLFormatter.getTail(java.util.logging.Handler)


Occurences of getTarget

getTarget occurences:
java.beans.EventHandler.getTarget()
java.beans.Statement.getTarget()
java.lang.invoke.CallSite.getTarget()
java.lang.invoke.ConstantCallSite.getTarget()
java.lang.invoke.MutableCallSite.getTarget()
java.lang.invoke.VolatileCallSite.getTarget()
javax.accessibility.AccessibleRelation.getTarget()
javax.rmi.CORBA.Tie.getTarget()
javax.swing.BoxLayout.getTarget()
javax.swing.OverlayLayout.getTarget()
javax.swing.text.html.HTMLFrameHyperlinkEvent.getTarget()
javax.xml.crypto.dsig.SignatureProperty.getTarget()
javax.xml.stream.events.ProcessingInstruction.getTarget()
org.w3c.dom.events.Event.getTarget()
org.w3c.dom.ProcessingInstruction.getTarget()


Occurences of getTargetActions

getTargetActions occurences:
java.awt.dnd.DragSourceDragEvent.getTargetActions()
java.awt.dnd.DropTargetContext.getTargetActions()


Occurences of getTargetDataLine

getTargetDataLine occurences:
javax.sound.sampled.AudioSystem.getTargetDataLine(javax.sound.sampled.AudioFormat)
javax.sound.sampled.AudioSystem.getTargetDataLine(javax.sound.sampled.AudioFormat, javax.sound.sampled.Mixer.Info)


Occurences of getTargetEncodings

getTargetEncodings occurences:
javax.sound.sampled.AudioSystem.getTargetEncodings(javax.sound.sampled.AudioFormat)
javax.sound.sampled.AudioSystem.getTargetEncodings(javax.sound.sampled.AudioFormat.Encoding)
javax.sound.sampled.spi.FormatConversionProvider.getTargetEncodings()
javax.sound.sampled.spi.FormatConversionProvider.getTargetEncodings(javax.sound.sampled.AudioFormat)


Occurences of getTargetException

getTargetException occurences:
java.lang.reflect.InvocationTargetException.getTargetException()
javax.management.MBeanException.getTargetException()
javax.management.ReflectionException.getTargetException()
javax.management.RuntimeMBeanException.getTargetException()
javax.management.RuntimeOperationsException.getTargetException()


Occurences of getTargetFormats

getTargetFormats occurences:
javax.sound.sampled.AudioSystem.getTargetFormats(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioFormat)
javax.sound.sampled.spi.FormatConversionProvider.getTargetFormats(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioFormat)


Occurences of getTargetLineInfo

getTargetLineInfo occurences:
javax.sound.sampled.AudioSystem.getTargetLineInfo(javax.sound.sampled.Line.Info)
javax.sound.sampled.Mixer.getTargetLineInfo()
javax.sound.sampled.Mixer.getTargetLineInfo(javax.sound.sampled.Line.Info)


Occurences of getTask

getTask occurences:
javax.tools.DocumentationTool.getTask(java.io.Writer, javax.tools.JavaFileManager, javax.tools.DiagnosticListener, java.lang.Class, java.lang.Iterable, java.lang.Iterable)
javax.tools.JavaCompiler.getTask(java.io.Writer, javax.tools.JavaFileManager, javax.tools.DiagnosticListener, java.lang.Iterable, java.lang.Iterable, java.lang.Iterable)


Occurences of getText

getText occurences:
java.awt.event.InputMethodEvent.getText()
java.awt.Label.getText()
java.awt.TextComponent.getText()
java.text.BreakIterator.getText()
javax.security.auth.callback.TextInputCallback.getText()
javax.swing.AbstractButton.getText()
javax.swing.JEditorPane.getText()
javax.swing.JLabel.getText()
javax.swing.JPasswordField.getText()
javax.swing.JPasswordField.getText(int, int)
javax.swing.text.AbstractDocument.getText(int, int)
javax.swing.text.AbstractDocument.getText(int, int, javax.swing.text.Segment)
javax.swing.text.AbstractWriter.getText(javax.swing.text.Element)
javax.swing.text.Document.getText(int, int)
javax.swing.text.Document.getText(int, int, javax.swing.text.Segment)
javax.swing.text.GlyphView.getText(int, int)
javax.swing.text.JTextComponent.getText()
javax.swing.text.JTextComponent.getText(int, int)
javax.xml.stream.events.Comment.getText()
javax.xml.stream.util.StreamReaderDelegate.getText()
javax.xml.stream.XMLStreamReader.getText()


Occurences of getTextBounds

getTextBounds occurences:
javax.accessibility.AccessibleExtendedText.getTextBounds(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getTextBounds(int, int)


Occurences of getTextCharacters

getTextCharacters occurences:
javax.xml.stream.util.StreamReaderDelegate.getTextCharacters()
javax.xml.stream.util.StreamReaderDelegate.getTextCharacters(int, char:A, int, int)
javax.xml.stream.XMLStreamReader.getTextCharacters()
javax.xml.stream.XMLStreamReader.getTextCharacters(int, char:A, int, int)


Occurences of getTextContent

getTextContent occurences:
javax.imageio.metadata.IIOMetadataNode.getTextContent()
org.w3c.dom.Node.getTextContent()


Occurences of getTextFieldBorder

getTextFieldBorder occurences:
javax.swing.plaf.basic.BasicBorders.getTextFieldBorder()
javax.swing.plaf.metal.MetalBorders.getTextFieldBorder()


Occurences of getTextHighlightColor

getTextHighlightColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getTextHighlightColor()
javax.swing.plaf.metal.MetalTheme.getTextHighlightColor()


Occurences of getTextLength

getTextLength occurences:
javax.xml.stream.util.StreamReaderDelegate.getTextLength()
javax.xml.stream.XMLStreamReader.getTextLength()


Occurences of getTextRange

getTextRange occurences:
javax.accessibility.AccessibleEditableText.getTextRange(int, int)
javax.accessibility.AccessibleExtendedText.getTextRange(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getTextRange(int, int)
javax.swing.JSpinner.AccessibleJSpinner.getTextRange(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getTextRange(int, int)


Occurences of getTextSequenceAfter

getTextSequenceAfter occurences:
javax.accessibility.AccessibleExtendedText.getTextSequenceAfter(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getTextSequenceAfter(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getTextSequenceAfter(int, int)


Occurences of getTextSequenceAt

getTextSequenceAt occurences:
javax.accessibility.AccessibleExtendedText.getTextSequenceAt(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getTextSequenceAt(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getTextSequenceAt(int, int)


Occurences of getTextSequenceBefore

getTextSequenceBefore occurences:
javax.accessibility.AccessibleExtendedText.getTextSequenceBefore(int, int)
javax.swing.JPasswordField.AccessibleJPasswordField.getTextSequenceBefore(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.getTextSequenceBefore(int, int)


Occurences of getTextShiftOffset

getTextShiftOffset occurences:
javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset()
javax.swing.plaf.basic.BasicToggleButtonUI.getTextShiftOffset()


Occurences of getTextStart

getTextStart occurences:
javax.xml.stream.util.StreamReaderDelegate.getTextStart()
javax.xml.stream.XMLStreamReader.getTextStart()


Occurences of getThenReset

getThenReset occurences:
java.util.concurrent.atomic.DoubleAccumulator.getThenReset()
java.util.concurrent.atomic.LongAccumulator.getThenReset()


Occurences of getThreadGroup

getThreadGroup occurences:
java.lang.SecurityManager.getThreadGroup()
java.lang.Thread.getThreadGroup()


Occurences of getThreadInfo

getThreadInfo occurences:
java.lang.management.ThreadMXBean.getThreadInfo(long)
java.lang.management.ThreadMXBean.getThreadInfo(long, int)
java.lang.management.ThreadMXBean.getThreadInfo(long:A)
java.lang.management.ThreadMXBean.getThreadInfo(long:A, boolean, boolean)
java.lang.management.ThreadMXBean.getThreadInfo(long:A, int)


Occurences of getThreshold

getThreshold occurences:
javax.management.monitor.CounterMonitor.getThreshold()
javax.management.monitor.CounterMonitor.getThreshold(javax.management.ObjectName)
javax.management.monitor.CounterMonitorMBean.getThreshold()
javax.management.monitor.CounterMonitorMBean.getThreshold(javax.management.ObjectName)
javax.xml.ws.soap.MTOMFeature.getThreshold()


Occurences of getThrownTypes

getThrownTypes occurences:
javax.lang.model.element.ExecutableElement.getThrownTypes()
javax.lang.model.type.ExecutableType.getThrownTypes()


Occurences of getThumbSize

getThumbSize occurences:
javax.swing.plaf.basic.BasicSliderUI.getThumbSize()
javax.swing.plaf.metal.MetalSliderUI.getThumbSize()
javax.swing.plaf.synth.SynthSliderUI.getThumbSize()


Occurences of getTickLength

getTickLength occurences:
javax.sound.midi.Sequence.getTickLength()
javax.sound.midi.Sequencer.getTickLength()
javax.swing.plaf.basic.BasicSliderUI.getTickLength()
javax.swing.plaf.metal.MetalSliderUI.getTickLength()


Occurences of getTie

getTie occurences:
javax.rmi.CORBA.Util.getTie(java.rmi.Remote)
javax.rmi.CORBA.UtilDelegate.getTie(java.rmi.Remote)


Occurences of getTile

getTile occurences:
java.awt.image.BufferedImage.getTile(int, int)
java.awt.image.RenderedImage.getTile(int, int)


Occurences of getTileGridXOffset

getTileGridXOffset occurences:
java.awt.image.BufferedImage.getTileGridXOffset()
java.awt.image.RenderedImage.getTileGridXOffset()
javax.imageio.ImageReader.getTileGridXOffset(int)
javax.imageio.ImageWriteParam.getTileGridXOffset()


Occurences of getTileGridYOffset

getTileGridYOffset occurences:
java.awt.image.BufferedImage.getTileGridYOffset()
java.awt.image.RenderedImage.getTileGridYOffset()
javax.imageio.ImageReader.getTileGridYOffset(int)
javax.imageio.ImageWriteParam.getTileGridYOffset()


Occurences of getTileHeight

getTileHeight occurences:
java.awt.image.BufferedImage.getTileHeight()
java.awt.image.RenderedImage.getTileHeight()
javax.imageio.ImageReader.getTileHeight(int)
javax.imageio.ImageWriteParam.getTileHeight()


Occurences of getTileWidth

getTileWidth occurences:
java.awt.image.BufferedImage.getTileWidth()
java.awt.image.RenderedImage.getTileWidth()
javax.imageio.ImageReader.getTileWidth(int)
javax.imageio.ImageWriteParam.getTileWidth()


Occurences of getTime

getTime occurences:
java.sql.CallableStatement.getTime(int)
java.sql.CallableStatement.getTime(int, java.util.Calendar)
java.sql.CallableStatement.getTime(java.lang.String)
java.sql.CallableStatement.getTime(java.lang.String, java.util.Calendar)
java.sql.ResultSet.getTime(int)
java.sql.ResultSet.getTime(int, java.util.Calendar)
java.sql.ResultSet.getTime(java.lang.String)
java.sql.ResultSet.getTime(java.lang.String, java.util.Calendar)
java.sql.Timestamp.getTime()
java.util.Calendar.getTime()
java.util.Date.getTime()
java.util.zip.ZipEntry.getTime()


Occurences of getTimeInMillis

getTimeInMillis occurences:
java.util.Calendar.getTimeInMillis()
javax.xml.datatype.Duration.getTimeInMillis(java.util.Calendar)
javax.xml.datatype.Duration.getTimeInMillis(java.util.Date)


Occurences of getTimeInstance

getTimeInstance occurences:
java.text.DateFormat.getTimeInstance()
java.text.DateFormat.getTimeInstance(int)
java.text.DateFormat.getTimeInstance(int, java.util.Locale)
java.text.spi.DateFormatProvider.getTimeInstance(int, java.util.Locale)


Occurences of getTimeStamp

getTimeStamp occurences:
javax.management.Notification.getTimeStamp()
org.w3c.dom.events.Event.getTimeStamp()


Occurences of getTimestamp

getTimestamp occurences:
java.security.CodeSigner.getTimestamp()
java.security.Timestamp.getTimestamp()
java.sql.CallableStatement.getTimestamp(int)
java.sql.CallableStatement.getTimestamp(int, java.util.Calendar)
java.sql.CallableStatement.getTimestamp(java.lang.String)
java.sql.CallableStatement.getTimestamp(java.lang.String, java.util.Calendar)
java.sql.ResultSet.getTimestamp(int)
java.sql.ResultSet.getTimestamp(int, java.util.Calendar)
java.sql.ResultSet.getTimestamp(java.lang.String)
java.sql.ResultSet.getTimestamp(java.lang.String, java.util.Calendar)


Occurences of getTimeToLive

getTimeToLive occurences:
java.net.DatagramSocketImpl.getTimeToLive()
java.net.MulticastSocket.getTimeToLive()
java.util.ResourceBundle.Control.getTimeToLive(java.lang.String, java.util.Locale)


Occurences of getTimeZone

getTimeZone occurences:
java.text.DateFormat.getTimeZone()
java.util.Calendar.getTimeZone()
java.util.GregorianCalendar.getTimeZone()
java.util.TimeZone.getTimeZone(java.lang.String)
java.util.TimeZone.getTimeZone(java.time.ZoneId)
javax.xml.datatype.XMLGregorianCalendar.getTimeZone(int)


Occurences of getTitle

getTitle occurences:
java.awt.Dialog.getTitle()
java.awt.Frame.getTitle()
javax.swing.border.TitledBorder.getTitle()
javax.swing.JInternalFrame.getTitle()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.getTitle(java.lang.String, java.awt.FontMetrics, int)


Occurences of getTitledBorderText

getTitledBorderText occurences:
javax.accessibility.AccessibleExtendedComponent.getTitledBorderText()
javax.swing.AbstractButton.AccessibleAbstractButton.getTitledBorderText()
javax.swing.JComponent.AccessibleJComponent.getTitledBorderText()
javax.swing.JLabel.AccessibleJLabel.getTitledBorderText()


Occurences of getToggleButtonBorder

getToggleButtonBorder occurences:
javax.swing.plaf.basic.BasicBorders.getToggleButtonBorder()
javax.swing.plaf.metal.MetalBorders.getToggleButtonBorder()


Occurences of getToolkit

getToolkit occurences:
java.awt.Component.getToolkit()
java.awt.Window.getToolkit()


Occurences of getToolTipText

getToolTipText occurences:
javax.accessibility.AccessibleExtendedComponent.getToolTipText()
javax.swing.AbstractButton.AccessibleAbstractButton.getToolTipText()
javax.swing.JComponent.getToolTipText()
javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent)
javax.swing.JComponent.AccessibleJComponent.getToolTipText()
javax.swing.JLabel.AccessibleJLabel.getToolTipText()
javax.swing.JList.getToolTipText(java.awt.event.MouseEvent)
javax.swing.JTabbedPane.getToolTipText(java.awt.event.MouseEvent)
javax.swing.JTable.getToolTipText(java.awt.event.MouseEvent)
javax.swing.JTree.getToolTipText(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.plaf.multi.MultiTextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.plaf.TextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.table.JTableHeader.getToolTipText(java.awt.event.MouseEvent)
javax.swing.text.html.ImageView.getToolTipText(float, float, java.awt.Shape)
javax.swing.text.JTextComponent.getToolTipText(java.awt.event.MouseEvent)
javax.swing.text.View.getToolTipText(float, float, java.awt.Shape)


Occurences of getTopInset

getTopInset occurences:
javax.swing.text.AsyncBoxView.getTopInset()
javax.swing.text.CompositeView.getTopInset()


Occurences of getTotalColumnWidth

getTotalColumnWidth occurences:
javax.swing.table.DefaultTableColumnModel.getTotalColumnWidth()
javax.swing.table.TableColumnModel.getTotalColumnWidth()


Occurences of getTotalIn

getTotalIn occurences:
java.util.zip.Deflater.getTotalIn()
java.util.zip.Inflater.getTotalIn()


Occurences of getTotalOut

getTotalOut occurences:
java.util.zip.Deflater.getTotalOut()
java.util.zip.Inflater.getTotalOut()


Occurences of getTotalSpace

getTotalSpace occurences:
java.io.File.getTotalSpace()
java.nio.file.FileStore.getTotalSpace()


Occurences of getTrafficClass

getTrafficClass occurences:
java.net.DatagramSocket.getTrafficClass()
java.net.Socket.getTrafficClass()


Occurences of getTransactionIsolation

getTransactionIsolation occurences:
java.sql.Connection.getTransactionIsolation()
javax.sql.RowSet.getTransactionIsolation()
javax.sql.rowset.BaseRowSet.getTransactionIsolation()


Occurences of getTransferable

getTransferable occurences:
java.awt.dnd.DragSourceContext.getTransferable()
java.awt.dnd.DropTargetContext.getTransferable()
java.awt.dnd.DropTargetDragEvent.getTransferable()
java.awt.dnd.DropTargetDropEvent.getTransferable()
javax.swing.TransferHandler.TransferSupport.getTransferable()


Occurences of getTransferData

getTransferData occurences:
java.awt.datatransfer.StringSelection.getTransferData(java.awt.datatransfer.DataFlavor)
java.awt.datatransfer.Transferable.getTransferData(java.awt.datatransfer.DataFlavor)
java.awt.dnd.DropTargetContext.TransferableProxy.getTransferData(java.awt.datatransfer.DataFlavor)
javax.activation.DataContentHandler.getTransferData(java.awt.datatransfer.DataFlavor, javax.activation.DataSource)
javax.activation.DataHandler.getTransferData(java.awt.datatransfer.DataFlavor)


Occurences of getTransferDataFlavors

getTransferDataFlavors occurences:
java.awt.datatransfer.StringSelection.getTransferDataFlavors()
java.awt.datatransfer.Transferable.getTransferDataFlavors()
java.awt.dnd.DropTargetContext.TransferableProxy.getTransferDataFlavors()
javax.activation.DataContentHandler.getTransferDataFlavors()
javax.activation.DataHandler.getTransferDataFlavors()


Occurences of getTransferHandler

getTransferHandler occurences:
javax.swing.JApplet.getTransferHandler()
javax.swing.JComponent.getTransferHandler()
javax.swing.JDialog.getTransferHandler()
javax.swing.JFrame.getTransferHandler()
javax.swing.JWindow.getTransferHandler()


Occurences of getTransferType

getTransferType occurences:
java.awt.image.ColorModel.getTransferType()
java.awt.image.MultiPixelPackedSampleModel.getTransferType()
java.awt.image.Raster.getTransferType()
java.awt.image.SampleModel.getTransferType()


Occurences of getTransform

getTransform occurences:
java.awt.Font.getTransform()
java.awt.font.FontRenderContext.getTransform()
java.awt.font.TransformAttribute.getTransform()
java.awt.Graphics2D.getTransform()
java.awt.image.AffineTransformOp.getTransform()
java.awt.image.renderable.RenderContext.getTransform()
java.awt.MultipleGradientPaint.getTransform()


Occurences of getTransforms

getTransforms occurences:
javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getTransforms()
javax.xml.crypto.dsig.Reference.getTransforms()


Occurences of getTransmitter

getTransmitter occurences:
javax.sound.midi.MidiDevice.getTransmitter()
javax.sound.midi.MidiSystem.getTransmitter()


Occurences of getTransparency

getTransparency occurences:
java.awt.Color.getTransparency()
java.awt.GradientPaint.getTransparency()
java.awt.image.BufferedImage.getTransparency()
java.awt.image.ColorModel.getTransparency()
java.awt.image.IndexColorModel.getTransparency()
java.awt.image.VolatileImage.getTransparency()
java.awt.MultipleGradientPaint.getTransparency()
java.awt.TexturePaint.getTransparency()
java.awt.Transparency.getTransparency()


Occurences of getTRC

getTRC occurences:
java.awt.color.ICC_ProfileGray.getTRC()
java.awt.color.ICC_ProfileRGB.getTRC(int)


Occurences of getTree

getTree occurences:
com.sun.source.util.Trees.getTree(javax.lang.model.element.Element)
com.sun.source.util.Trees.getTree(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror)
com.sun.source.util.Trees.getTree(javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationValue)
com.sun.source.util.Trees.getTree(javax.lang.model.element.ExecutableElement)
com.sun.source.util.Trees.getTree(javax.lang.model.element.TypeElement)


Occurences of getTreeCellEditorComponent

getTreeCellEditorComponent occurences:
javax.swing.DefaultCellEditor.getTreeCellEditorComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int)
javax.swing.tree.DefaultTreeCellEditor.getTreeCellEditorComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int)
javax.swing.tree.TreeCellEditor.getTreeCellEditorComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int)


Occurences of getTreeCellRendererComponent

getTreeCellRendererComponent occurences:
javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)
javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)


Occurences of getTreeLock

getTreeLock occurences:
java.awt.Component.getTreeLock()
java.awt.MenuComponent.getTreeLock()


Occurences of getTreePath

getTreePath occurences:
com.sun.source.util.DocTreePath.getTreePath()
javax.swing.event.TreeModelEvent.getTreePath()


Occurences of getTreeSelectionListeners

getTreeSelectionListeners occurences:
javax.swing.JTree.getTreeSelectionListeners()
javax.swing.tree.DefaultTreeSelectionModel.getTreeSelectionListeners()


Occurences of getTrigger

getTrigger occurences:
java.awt.dnd.DragSourceContext.getTrigger()
javax.management.monitor.MonitorNotification.getTrigger()


Occurences of getTriggerEvent

getTriggerEvent occurences:
java.awt.dnd.DragGestureEvent.getTriggerEvent()
java.awt.dnd.DragGestureRecognizer.getTriggerEvent()


Occurences of getTTL

getTTL occurences:
java.net.DatagramSocketImpl.getTTL()
java.net.MulticastSocket.getTTL()


Occurences of getType

getType occurences:
com.sun.source.doctree.SerialFieldTree.getType()
com.sun.source.tree.ArrayTypeTree.getType()
com.sun.source.tree.InstanceOfTree.getType()
com.sun.source.tree.NewArrayTree.getType()
com.sun.source.tree.ParameterizedTypeTree.getType()
com.sun.source.tree.TypeCastTree.getType()
com.sun.source.tree.VariableTree.getType()
java.awt.color.ColorSpace.getType()
java.awt.Cursor.getType()
java.awt.font.GlyphMetrics.getType()
java.awt.geom.AffineTransform.getType()
java.awt.GraphicsDevice.getType()
java.awt.image.BufferedImage.getType()
java.awt.Window.getType()
java.io.ObjectStreamField.getType()
java.lang.Character.getType(char)
java.lang.Character.getType(int)
java.lang.management.MemoryPoolMXBean.getType()
java.lang.reflect.AnnotatedType.getType()
java.lang.reflect.Field.getType()
java.lang.reflect.Parameter.getType()
java.security.cert.Certificate.getType()
java.security.cert.CertificateFactory.getType()
java.security.cert.CertPath.getType()
java.security.cert.CertStore.getType()
java.security.cert.CRL.getType()
java.security.KeyStore.getType()
java.security.Policy.getType()
java.security.Provider.Service.getType()
java.sql.ResultSet.getType()
javax.accessibility.AccessibleTableModelChange.getType()
javax.management.MBeanAttributeInfo.getType()
javax.management.MBeanParameterInfo.getType()
javax.management.Notification.getType()
javax.management.openmbean.CompositeType.getType(java.lang.String)
javax.naming.event.NamingEvent.getType()
javax.naming.ldap.Rdn.getType()
javax.naming.RefAddr.getType()
javax.net.ssl.SNIMatcher.getType()
javax.net.ssl.SNIServerName.getType()
javax.security.auth.login.Configuration.getType()
javax.sound.midi.MetaMessage.getType()
javax.sound.midi.MidiFileFormat.getType()
javax.sound.sampled.AudioFileFormat.getType()
javax.sound.sampled.Control.getType()
javax.sound.sampled.LineEvent.getType()
javax.sql.rowset.BaseRowSet.getType()
javax.swing.event.DocumentEvent.getType()
javax.swing.event.ListDataEvent.getType()
javax.swing.event.RowSorterEvent.getType()
javax.swing.event.TableModelEvent.getType()
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.getType()
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getType()
javax.swing.text.DefaultStyledDocument.ElementSpec.getType()
javax.swing.text.html.parser.AttributeList.getType()
javax.swing.text.html.parser.Element.getType()
javax.swing.text.html.parser.Entity.getType()
javax.xml.crypto.URIReference.getType()
org.w3c.dom.DOMError.getType()
org.w3c.dom.events.Event.getType()
org.xml.sax.AttributeList.getType(int)
org.xml.sax.AttributeList.getType(java.lang.String)
org.xml.sax.Attributes.getType(int)
org.xml.sax.Attributes.getType(java.lang.String)
org.xml.sax.Attributes.getType(java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributeListImpl.getType(int)
org.xml.sax.helpers.AttributeListImpl.getType(java.lang.String)
org.xml.sax.helpers.AttributesImpl.getType(int)
org.xml.sax.helpers.AttributesImpl.getType(java.lang.String)
org.xml.sax.helpers.AttributesImpl.getType(java.lang.String, java.lang.String)


Occurences of getTypeArguments

getTypeArguments occurences:
com.sun.source.tree.MemberReferenceTree.getTypeArguments()
com.sun.source.tree.MethodInvocationTree.getTypeArguments()
com.sun.source.tree.NewClassTree.getTypeArguments()
com.sun.source.tree.ParameterizedTypeTree.getTypeArguments()
javax.lang.model.type.DeclaredType.getTypeArguments()


Occurences of getTypeDescription

getTypeDescription occurences:
javax.swing.filechooser.FileView.getTypeDescription(java.io.File)
javax.swing.JFileChooser.getTypeDescription(java.io.File)
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.getTypeDescription(java.io.File)


Occurences of getTypeElement

getTypeElement occurences:
com.sun.source.util.TaskEvent.getTypeElement()
javax.lang.model.util.Elements.getTypeElement(java.lang.CharSequence)


Occurences of getTypeMap

getTypeMap occurences:
java.sql.Connection.getTypeMap()
javax.sql.RowSet.getTypeMap()
javax.sql.rowset.BaseRowSet.getTypeMap()


Occurences of getTypeMirror

getTypeMirror occurences:
com.sun.source.util.JavacTask.getTypeMirror(java.lang.Iterable)
com.sun.source.util.Trees.getTypeMirror(com.sun.source.util.TreePath)
javax.lang.model.type.MirroredTypeException.getTypeMirror()


Occurences of getTypeName

getTypeName occurences:
java.lang.Class.getTypeName()
java.lang.reflect.Type.getTypeName()
javax.management.openmbean.OpenType.getTypeName()
org.w3c.dom.TypeInfo.getTypeName()


Occurences of getTypeParameters

getTypeParameters occurences:
com.sun.source.tree.ClassTree.getTypeParameters()
com.sun.source.tree.MethodTree.getTypeParameters()
java.lang.Class.getTypeParameters()
java.lang.reflect.Constructor.getTypeParameters()
java.lang.reflect.Executable.getTypeParameters()
java.lang.reflect.GenericDeclaration.getTypeParameters()
java.lang.reflect.Method.getTypeParameters()
javax.lang.model.element.ExecutableElement.getTypeParameters()
javax.lang.model.element.Parameterizable.getTypeParameters()
javax.lang.model.element.TypeElement.getTypeParameters()


Occurences of getUI

getUI occurences:
javax.print.ServiceUIFactory.getUI(int, java.lang.String)
javax.swing.AbstractButton.getUI()
javax.swing.JColorChooser.getUI()
javax.swing.JComboBox.getUI()
javax.swing.JDesktopPane.getUI()
javax.swing.JFileChooser.getUI()
javax.swing.JInternalFrame.getUI()
javax.swing.JInternalFrame.JDesktopIcon.getUI()
javax.swing.JLabel.getUI()
javax.swing.JLayer.getUI()
javax.swing.JList.getUI()
javax.swing.JMenuBar.getUI()
javax.swing.JOptionPane.getUI()
javax.swing.JPanel.getUI()
javax.swing.JPopupMenu.getUI()
javax.swing.JProgressBar.getUI()
javax.swing.JRootPane.getUI()
javax.swing.JScrollBar.getUI()
javax.swing.JScrollPane.getUI()
javax.swing.JSeparator.getUI()
javax.swing.JSlider.getUI()
javax.swing.JSpinner.getUI()
javax.swing.JSplitPane.getUI()
javax.swing.JTabbedPane.getUI()
javax.swing.JTable.getUI()
javax.swing.JToolBar.getUI()
javax.swing.JToolTip.getUI()
javax.swing.JTree.getUI()
javax.swing.JViewport.getUI()
javax.swing.table.JTableHeader.getUI()
javax.swing.text.JTextComponent.getUI()
javax.swing.UIDefaults.getUI(javax.swing.JComponent)
javax.swing.UIManager.getUI(javax.swing.JComponent)


Occurences of getUIClass

getUIClass occurences:
javax.swing.UIDefaults.getUIClass(java.lang.String)
javax.swing.UIDefaults.getUIClass(java.lang.String, java.lang.ClassLoader)


Occurences of getUIClassID

getUIClassID occurences:
javax.swing.JButton.getUIClassID()
javax.swing.JCheckBox.getUIClassID()
javax.swing.JCheckBoxMenuItem.getUIClassID()
javax.swing.JColorChooser.getUIClassID()
javax.swing.JComboBox.getUIClassID()
javax.swing.JComponent.getUIClassID()
javax.swing.JDesktopPane.getUIClassID()
javax.swing.JEditorPane.getUIClassID()
javax.swing.JFileChooser.getUIClassID()
javax.swing.JFormattedTextField.getUIClassID()
javax.swing.JInternalFrame.getUIClassID()
javax.swing.JInternalFrame.JDesktopIcon.getUIClassID()
javax.swing.JLabel.getUIClassID()
javax.swing.JList.getUIClassID()
javax.swing.JMenu.getUIClassID()
javax.swing.JMenuBar.getUIClassID()
javax.swing.JMenuItem.getUIClassID()
javax.swing.JOptionPane.getUIClassID()
javax.swing.JPanel.getUIClassID()
javax.swing.JPasswordField.getUIClassID()
javax.swing.JPopupMenu.getUIClassID()
javax.swing.JPopupMenu.Separator.getUIClassID()
javax.swing.JProgressBar.getUIClassID()
javax.swing.JRadioButton.getUIClassID()
javax.swing.JRadioButtonMenuItem.getUIClassID()
javax.swing.JRootPane.getUIClassID()
javax.swing.JScrollBar.getUIClassID()
javax.swing.JScrollPane.getUIClassID()
javax.swing.JSeparator.getUIClassID()
javax.swing.JSlider.getUIClassID()
javax.swing.JSpinner.getUIClassID()
javax.swing.JSplitPane.getUIClassID()
javax.swing.JTabbedPane.getUIClassID()
javax.swing.JTable.getUIClassID()
javax.swing.JTextArea.getUIClassID()
javax.swing.JTextField.getUIClassID()
javax.swing.JTextPane.getUIClassID()
javax.swing.JToggleButton.getUIClassID()
javax.swing.JToolBar.getUIClassID()
javax.swing.JToolBar.Separator.getUIClassID()
javax.swing.JToolTip.getUIClassID()
javax.swing.JTree.getUIClassID()
javax.swing.JViewport.getUIClassID()
javax.swing.table.JTableHeader.getUIClassID()


Occurences of getUIs

getUIs occurences:
javax.swing.plaf.multi.MultiButtonUI.getUIs()
javax.swing.plaf.multi.MultiColorChooserUI.getUIs()
javax.swing.plaf.multi.MultiComboBoxUI.getUIs()
javax.swing.plaf.multi.MultiDesktopIconUI.getUIs()
javax.swing.plaf.multi.MultiDesktopPaneUI.getUIs()
javax.swing.plaf.multi.MultiFileChooserUI.getUIs()
javax.swing.plaf.multi.MultiInternalFrameUI.getUIs()
javax.swing.plaf.multi.MultiLabelUI.getUIs()
javax.swing.plaf.multi.MultiListUI.getUIs()
javax.swing.plaf.multi.MultiMenuBarUI.getUIs()
javax.swing.plaf.multi.MultiMenuItemUI.getUIs()
javax.swing.plaf.multi.MultiOptionPaneUI.getUIs()
javax.swing.plaf.multi.MultiPanelUI.getUIs()
javax.swing.plaf.multi.MultiPopupMenuUI.getUIs()
javax.swing.plaf.multi.MultiProgressBarUI.getUIs()
javax.swing.plaf.multi.MultiRootPaneUI.getUIs()
javax.swing.plaf.multi.MultiScrollBarUI.getUIs()
javax.swing.plaf.multi.MultiScrollPaneUI.getUIs()
javax.swing.plaf.multi.MultiSeparatorUI.getUIs()
javax.swing.plaf.multi.MultiSliderUI.getUIs()
javax.swing.plaf.multi.MultiSpinnerUI.getUIs()
javax.swing.plaf.multi.MultiSplitPaneUI.getUIs()
javax.swing.plaf.multi.MultiTabbedPaneUI.getUIs()
javax.swing.plaf.multi.MultiTableHeaderUI.getUIs()
javax.swing.plaf.multi.MultiTableUI.getUIs()
javax.swing.plaf.multi.MultiTextUI.getUIs()
javax.swing.plaf.multi.MultiToolBarUI.getUIs()
javax.swing.plaf.multi.MultiToolTipUI.getUIs()
javax.swing.plaf.multi.MultiTreeUI.getUIs()
javax.swing.plaf.multi.MultiViewportUI.getUIs()


Occurences of getUnboundInstance

getUnboundInstance occurences:
javax.security.auth.kerberos.KeyTab.getUnboundInstance()
javax.security.auth.kerberos.KeyTab.getUnboundInstance(java.io.File)


Occurences of getUncaughtExceptionHandler

getUncaughtExceptionHandler occurences:
java.lang.Thread.getUncaughtExceptionHandler()
java.util.concurrent.ForkJoinPool.getUncaughtExceptionHandler()


Occurences of getUndoableEditListeners

getUndoableEditListeners occurences:
javax.swing.text.AbstractDocument.getUndoableEditListeners()
javax.swing.undo.UndoableEditSupport.getUndoableEditListeners()


Occurences of getUndoPresentationName

getUndoPresentationName occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.getUndoPresentationName()
javax.swing.undo.AbstractUndoableEdit.getUndoPresentationName()
javax.swing.undo.CompoundEdit.getUndoPresentationName()
javax.swing.undo.UndoableEdit.getUndoPresentationName()
javax.swing.undo.UndoManager.getUndoPresentationName()


Occurences of getUnicodeStream

getUnicodeStream occurences:
java.sql.ResultSet.getUnicodeStream(int)
java.sql.ResultSet.getUnicodeStream(java.lang.String)


Occurences of getUnitIncrement

getUnitIncrement occurences:
java.awt.Adjustable.getUnitIncrement()
java.awt.Scrollbar.getUnitIncrement()
java.awt.ScrollPaneAdjustable.getUnitIncrement()
javax.swing.JScrollBar.getUnitIncrement()
javax.swing.JScrollBar.getUnitIncrement(int)
javax.swing.JScrollPane.ScrollBar.getUnitIncrement(int)


Occurences of getUnits

getUnits occurences:
java.time.chrono.ChronoPeriod.getUnits()
java.time.Duration.getUnits()
java.time.Period.getUnits()
java.time.temporal.TemporalAmount.getUnits()
javax.sound.sampled.FloatControl.getUnits()


Occurences of getUnnormalizedComponents

getUnnormalizedComponents occurences:
java.awt.image.ColorModel.getUnnormalizedComponents(float:A, int, int:A, int)
java.awt.image.ComponentColorModel.getUnnormalizedComponents(float:A, int, int:A, int)


Occurences of getUnsupportedAttributes

getUnsupportedAttributes occurences:
javax.print.AttributeException.getUnsupportedAttributes()
javax.print.PrintService.getUnsupportedAttributes(javax.print.DocFlavor, javax.print.attribute.AttributeSet)


Occurences of getURI

getURI occurences:
java.security.URIParameter.getURI()
javax.print.attribute.URISyntax.getURI()
javax.xml.crypto.dsig.keyinfo.RetrievalMethod.getURI()
javax.xml.crypto.OctetStreamData.getURI()
javax.xml.crypto.URIReference.getURI()
javax.xml.soap.Name.getURI()
org.xml.sax.Attributes.getURI(int)
org.xml.sax.helpers.AttributesImpl.getURI(int)
org.xml.sax.helpers.NamespaceSupport.getURI(java.lang.String)


Occurences of getURIDereferencer

getURIDereferencer occurences:
javax.xml.crypto.dom.DOMCryptoContext.getURIDereferencer()
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.getURIDereferencer()
javax.xml.crypto.dsig.XMLSignatureFactory.getURIDereferencer()
javax.xml.crypto.XMLCryptoContext.getURIDereferencer()


Occurences of getURIResolver

getURIResolver occurences:
javax.xml.transform.Transformer.getURIResolver()
javax.xml.transform.TransformerFactory.getURIResolver()


Occurences of getUrl

getUrl occurences:
javax.sql.RowSet.getUrl()
javax.sql.rowset.BaseRowSet.getUrl()


Occurences of getURL

getURL occurences:
java.net.URLConnection.getURL()
java.sql.CallableStatement.getURL(int)
java.sql.CallableStatement.getURL(java.lang.String)
java.sql.DatabaseMetaData.getURL()
java.sql.ResultSet.getURL(int)
java.sql.ResultSet.getURL(java.lang.String)
javax.activation.URLDataSource.getURL()
javax.swing.event.HyperlinkEvent.getURL()
javax.xml.bind.helpers.ValidationEventLocatorImpl.getURL()
javax.xml.bind.ValidationEventLocator.getURL()


Occurences of getURLOrDefaultInitCtx

getURLOrDefaultInitCtx occurences:
javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String)
javax.naming.InitialContext.getURLOrDefaultInitCtx(javax.naming.Name)


Occurences of getURLs

getURLs occurences:
java.net.URLClassLoader.getURLs()
javax.management.loading.MLet.getURLs()
javax.management.loading.MLetMBean.getURLs()


Occurences of getUsableSpace

getUsableSpace occurences:
java.io.File.getUsableSpace()
java.nio.file.FileStore.getUsableSpace()


Occurences of getUsage

getUsage occurences:
java.lang.management.MemoryNotificationInfo.getUsage()
java.lang.management.MemoryPoolMXBean.getUsage()
org.ietf.jgss.GSSCredential.getUsage()
org.ietf.jgss.GSSCredential.getUsage(org.ietf.jgss.Oid)


Occurences of getUseClientMode

getUseClientMode occurences:
javax.net.ssl.SSLEngine.getUseClientMode()
javax.net.ssl.SSLServerSocket.getUseClientMode()
javax.net.ssl.SSLSocket.getUseClientMode()


Occurences of getUserData

getUserData occurences:
javax.imageio.metadata.IIOMetadataNode.getUserData(java.lang.String)
javax.management.Notification.getUserData()
org.w3c.dom.Node.getUserData(java.lang.String)


Occurences of getUserInfo

getUserInfo occurences:
java.net.URI.getUserInfo()
java.net.URL.getUserInfo()


Occurences of getUserName

getUserName occurences:
java.awt.print.PrinterJob.getUserName()
java.net.PasswordAuthentication.getUserName()
java.sql.DatabaseMetaData.getUserName()


Occurences of getUsername

getUsername occurences:
javax.sql.RowSet.getUsername()
javax.sql.rowset.BaseRowSet.getUsername()


Occurences of getUserObject

getUserObject occurences:
javax.imageio.metadata.IIOMetadataNode.getUserObject()
javax.swing.tree.DefaultMutableTreeNode.getUserObject()


Occurences of getUserPrincipal

getUserPrincipal occurences:
javax.xml.ws.spi.http.HttpExchange.getUserPrincipal()
javax.xml.ws.WebServiceContext.getUserPrincipal()


Occurences of getUserTextColor

getUserTextColor occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getUserTextColor()
javax.swing.plaf.metal.MetalTheme.getUserTextColor()


Occurences of getUserTextFont

getUserTextFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getUserTextFont()
javax.swing.plaf.metal.MetalLookAndFeel.getUserTextFont()
javax.swing.plaf.metal.MetalTheme.getUserTextFont()


Occurences of getValue

getValue occurences:
com.sun.jdi.ArrayReference.getValue(int)
com.sun.jdi.ObjectReference.getValue(com.sun.jdi.Field)
com.sun.jdi.ReferenceType.getValue(com.sun.jdi.Field)
com.sun.jdi.StackFrame.getValue(com.sun.jdi.LocalVariable)
com.sun.source.doctree.AttributeTree.getValue()
com.sun.source.tree.LiteralTree.getValue()
java.awt.Adjustable.getValue()
java.awt.event.AdjustmentEvent.getValue()
java.awt.Scrollbar.getValue()
java.awt.ScrollPaneAdjustable.getValue()
java.beans.Expression.getValue()
java.beans.FeatureDescriptor.getValue(java.lang.String)
java.beans.PropertyEditor.getValue()
java.beans.PropertyEditorSupport.getValue()
java.net.HttpCookie.getValue()
java.rmi.dgc.Lease.getValue()
java.security.cert.Extension.getValue()
java.security.KeyStore.Entry.Attribute.getValue()
java.security.PKCS12Attribute.getValue()
java.text.Annotation.getValue()
java.time.chrono.Era.getValue()
java.time.chrono.HijrahEra.getValue()
java.time.chrono.IsoEra.getValue()
java.time.chrono.JapaneseEra.getValue()
java.time.chrono.MinguoEra.getValue()
java.time.chrono.ThaiBuddhistEra.getValue()
java.time.DayOfWeek.getValue()
java.time.Month.getValue()
java.time.Year.getValue()
java.util.AbstractMap.SimpleEntry.getValue()
java.util.AbstractMap.SimpleImmutableEntry.getValue()
java.util.jar.Attributes.getValue(java.lang.String)
java.util.jar.Attributes.getValue(java.util.jar.Attributes.Name)
java.util.Map.Entry.getValue()
java.util.zip.Adler32.getValue()
java.util.zip.Checksum.getValue()
java.util.zip.CRC32.getValue()
javax.annotation.processing.Completion.getValue()
javax.crypto.spec.PSource.PSpecified.getValue()
javax.lang.model.element.AnnotationValue.getValue()
javax.management.Attribute.getValue()
javax.management.StringValueExp.getValue()
javax.naming.ldap.Rdn.getValue()
javax.net.ssl.SSLSession.getValue(java.lang.String)
javax.print.attribute.DateTimeSyntax.getValue()
javax.print.attribute.EnumSyntax.getValue()
javax.print.attribute.IntegerSyntax.getValue()
javax.print.attribute.TextSyntax.getValue()
javax.sound.sampled.BooleanControl.getValue()
javax.sound.sampled.EnumControl.getValue()
javax.sound.sampled.FloatControl.getValue()
javax.swing.AbstractAction.getValue(java.lang.String)
javax.swing.Action.getValue(java.lang.String)
javax.swing.BoundedRangeModel.getValue()
javax.swing.DefaultBoundedRangeModel.getValue()
javax.swing.JFormattedTextField.getValue()
javax.swing.JOptionPane.getValue()
javax.swing.JProgressBar.getValue()
javax.swing.JScrollBar.getValue()
javax.swing.JSlider.getValue()
javax.swing.JSpinner.getValue()
javax.swing.RowFilter.Entry.getValue(int)
javax.swing.SpinnerDateModel.getValue()
javax.swing.SpinnerListModel.getValue()
javax.swing.SpinnerModel.getValue()
javax.swing.SpinnerNumberModel.getValue()
javax.swing.Spring.getValue()
javax.swing.text.html.Option.getValue()
javax.swing.text.html.parser.AttributeList.getValue()
javax.xml.bind.JAXBElement.getValue()
javax.xml.bind.JAXBIntrospector.getValue(java.lang.Object)
javax.xml.crypto.dsig.XMLSignature.SignatureValue.getValue()
javax.xml.soap.MimeHeader.getValue()
javax.xml.soap.Node.getValue()
javax.xml.stream.events.Attribute.getValue()
org.w3c.dom.Attr.getValue()
org.xml.sax.AttributeList.getValue(int)
org.xml.sax.AttributeList.getValue(java.lang.String)
org.xml.sax.Attributes.getValue(int)
org.xml.sax.Attributes.getValue(java.lang.String)
org.xml.sax.Attributes.getValue(java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributeListImpl.getValue(int)
org.xml.sax.helpers.AttributeListImpl.getValue(java.lang.String)
org.xml.sax.helpers.AttributesImpl.getValue(int)
org.xml.sax.helpers.AttributesImpl.getValue(java.lang.String)
org.xml.sax.helpers.AttributesImpl.getValue(java.lang.String, java.lang.String)


Occurences of getValueAt

getValueAt occurences:
javax.swing.DefaultRowSorter.ModelWrapper.getValueAt(int, int)
javax.swing.JTable.getValueAt(int, int)
javax.swing.table.DefaultTableModel.getValueAt(int, int)
javax.swing.table.TableModel.getValueAt(int, int)


Occurences of getValueIsAdjusting

getValueIsAdjusting occurences:
java.awt.event.AdjustmentEvent.getValueIsAdjusting()
java.awt.Scrollbar.getValueIsAdjusting()
java.awt.ScrollPaneAdjustable.getValueIsAdjusting()
javax.swing.BoundedRangeModel.getValueIsAdjusting()
javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting()
javax.swing.DefaultListSelectionModel.getValueIsAdjusting()
javax.swing.event.ListSelectionEvent.getValueIsAdjusting()
javax.swing.JList.getValueIsAdjusting()
javax.swing.JScrollBar.getValueIsAdjusting()
javax.swing.JSlider.getValueIsAdjusting()
javax.swing.ListSelectionModel.getValueIsAdjusting()


Occurences of getValues

getValues occurences:
com.sun.jdi.ArrayReference.getValues()
com.sun.jdi.ArrayReference.getValues(int, int)
com.sun.jdi.ObjectReference.getValues(java.util.List)
com.sun.jdi.ReferenceType.getValues(java.util.List)
com.sun.jdi.StackFrame.getValues(java.util.List)
javax.imageio.plugins.jpeg.JPEGHuffmanTable.getValues()
javax.sound.sampled.EnumControl.getValues()
javax.swing.text.html.parser.AttributeList.getValues()


Occurences of getVariable

getVariable occurences:
com.sun.source.tree.AssignmentTree.getVariable()
com.sun.source.tree.CompoundAssignmentTree.getVariable()
com.sun.source.tree.EnhancedForLoopTree.getVariable()


Occurences of getVendor

getVendor occurences:
java.sql.JDBCType.getVendor()
java.sql.SQLType.getVendor()
javax.sound.midi.MidiDevice.Info.getVendor()
javax.sound.midi.Soundbank.getVendor()
javax.sound.sampled.Mixer.Info.getVendor()
javax.sql.rowset.spi.SyncProvider.getVendor()


Occurences of getVendorTypeNumber

getVendorTypeNumber occurences:
java.sql.JDBCType.getVendorTypeNumber()
java.sql.SQLType.getVendorTypeNumber()


Occurences of getVersion

getVersion occurences:
java.awt.font.OpenType.getVersion()
java.lang.management.OperatingSystemMXBean.getVersion()
java.net.HttpCookie.getVersion()
java.security.cert.X509Certificate.getVersion()
java.security.cert.X509CRL.getVersion()
java.security.Provider.getVersion()
javax.crypto.spec.RC5ParameterSpec.getVersion()
javax.imageio.spi.IIOServiceProvider.getVersion()
javax.management.loading.MLetContent.getVersion()
javax.management.remote.rmi.RMIServer.getVersion()
javax.management.remote.rmi.RMIServerImpl.getVersion()
javax.management.remote.rmi.RMIServerImpl_Stub.getVersion()
javax.security.cert.X509Certificate.getVersion()
javax.sound.midi.MidiDevice.Info.getVersion()
javax.sound.midi.Soundbank.getVersion()
javax.sound.sampled.Mixer.Info.getVersion()
javax.sql.rowset.spi.SyncProvider.getVersion()
javax.xml.stream.events.StartDocument.getVersion()
javax.xml.stream.util.StreamReaderDelegate.getVersion()
javax.xml.stream.XMLStreamReader.getVersion()


Occurences of getVerticalAlignment

getVerticalAlignment occurences:
javax.swing.AbstractButton.getVerticalAlignment()
javax.swing.JLabel.getVerticalAlignment()


Occurences of getVerticalScrollBar

getVerticalScrollBar occurences:
javax.swing.JScrollPane.getVerticalScrollBar()
javax.swing.ScrollPaneLayout.getVerticalScrollBar()


Occurences of getVerticalScrollBarPolicy

getVerticalScrollBarPolicy occurences:
javax.swing.JScrollPane.getVerticalScrollBarPolicy()
javax.swing.ScrollPaneLayout.getVerticalScrollBarPolicy()


Occurences of getVerticalTextPosition

getVerticalTextPosition occurences:
javax.swing.AbstractButton.getVerticalTextPosition()
javax.swing.JLabel.getVerticalTextPosition()


Occurences of getVetoableChangeListeners

getVetoableChangeListeners occurences:
java.awt.KeyboardFocusManager.getVetoableChangeListeners()
java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String)
java.beans.VetoableChangeSupport.getVetoableChangeListeners()
java.beans.VetoableChangeSupport.getVetoableChangeListeners(java.lang.String)
javax.swing.JComponent.getVetoableChangeListeners()


Occurences of getVgap

getVgap occurences:
java.awt.BorderLayout.getVgap()
java.awt.CardLayout.getVgap()
java.awt.FlowLayout.getVgap()
java.awt.GridLayout.getVgap()


Occurences of getView

getView occurences:
javax.swing.JLayer.getView()
javax.swing.JViewport.getView()
javax.swing.text.AsyncBoxView.getView(int)
javax.swing.text.CompositeView.getView(int)
javax.swing.text.View.getView(int)
org.w3c.dom.events.UIEvent.getView()


Occurences of getViewAtPoint

getViewAtPoint occurences:
javax.swing.text.BoxView.getViewAtPoint(int, int, java.awt.Rectangle)
javax.swing.text.CompositeView.getViewAtPoint(int, int, java.awt.Rectangle)


Occurences of getViewAtPosition

getViewAtPosition occurences:
javax.swing.text.CompositeView.getViewAtPosition(int, java.awt.Rectangle)
javax.swing.text.TableView.getViewAtPosition(int, java.awt.Rectangle)
javax.swing.text.TableView.TableRow.getViewAtPosition(int, java.awt.Rectangle)


Occurences of getViewCount

getViewCount occurences:
javax.swing.text.AsyncBoxView.getViewCount()
javax.swing.text.CompositeView.getViewCount()
javax.swing.text.View.getViewCount()


Occurences of getViewFactory

getViewFactory occurences:
javax.swing.text.DefaultEditorKit.getViewFactory()
javax.swing.text.EditorKit.getViewFactory()
javax.swing.text.html.HTMLEditorKit.getViewFactory()
javax.swing.text.StyledEditorKit.getViewFactory()
javax.swing.text.View.getViewFactory()


Occurences of getViewIndex

getViewIndex occurences:
javax.swing.text.AsyncBoxView.getViewIndex(int, javax.swing.text.Position.Bias)
javax.swing.text.CompositeView.getViewIndex(int, javax.swing.text.Position.Bias)
javax.swing.text.View.getViewIndex(float, float, java.awt.Shape)
javax.swing.text.View.getViewIndex(int, javax.swing.text.Position.Bias)


Occurences of getViewIndexAtPosition

getViewIndexAtPosition occurences:
javax.swing.text.AsyncBoxView.getViewIndexAtPosition(int, javax.swing.text.Position.Bias)
javax.swing.text.CompositeView.getViewIndexAtPosition(int)
javax.swing.text.FlowView.getViewIndexAtPosition(int)
javax.swing.text.ZoneView.getViewIndexAtPosition(int)


Occurences of getViewport

getViewport occurences:
javax.swing.JScrollPane.getViewport()
javax.swing.ScrollPaneLayout.getViewport()


Occurences of getViewportBorderBounds

getViewportBorderBounds occurences:
javax.swing.JScrollPane.getViewportBorderBounds()
javax.swing.ScrollPaneLayout.getViewportBorderBounds(javax.swing.JScrollPane)


Occurences of getViewRowCount

getViewRowCount occurences:
javax.swing.DefaultRowSorter.getViewRowCount()
javax.swing.RowSorter.getViewRowCount()


Occurences of getVisibleAmount

getVisibleAmount occurences:
java.awt.Adjustable.getVisibleAmount()
java.awt.Scrollbar.getVisibleAmount()
java.awt.ScrollPaneAdjustable.getVisibleAmount()
javax.swing.JScrollBar.getVisibleAmount()


Occurences of getVisibleChildCount

getVisibleChildCount occurences:
javax.swing.tree.AbstractLayoutCache.getVisibleChildCount(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.getVisibleChildCount(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.getVisibleChildCount(javax.swing.tree.TreePath)


Occurences of getVisiblePathsFrom

getVisiblePathsFrom occurences:
javax.swing.tree.AbstractLayoutCache.getVisiblePathsFrom(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.getVisiblePathsFrom(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.getVisiblePathsFrom(javax.swing.tree.TreePath)


Occurences of getVisibleRowCount

getVisibleRowCount occurences:
javax.swing.JList.getVisibleRowCount()
javax.swing.JTree.getVisibleRowCount()


Occurences of getVisualHighlightShape

getVisualHighlightShape occurences:
java.awt.font.TextLayout.getVisualHighlightShape(java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)
java.awt.font.TextLayout.getVisualHighlightShape(java.awt.font.TextHitInfo, java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)


Occurences of getW

getW occurences:
java.security.interfaces.ECPublicKey.getW()
java.security.spec.ECPublicKeySpec.getW()


Occurences of getWaitingConsumerCount

getWaitingConsumerCount occurences:
java.util.concurrent.LinkedTransferQueue.getWaitingConsumerCount()
java.util.concurrent.TransferQueue.getWaitingConsumerCount()


Occurences of getWaitingThreads

getWaitingThreads occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getWaitingThreads(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.getWaitingThreads()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getWaitingThreads(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.getWaitingThreads()
java.util.concurrent.locks.ReentrantLock.getWaitingThreads(java.util.concurrent.locks.Condition)
java.util.concurrent.locks.ReentrantReadWriteLock.getWaitingThreads(java.util.concurrent.locks.Condition)


Occurences of getWaitQueueLength

getWaitQueueLength occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.getWaitQueueLength()
java.util.concurrent.locks.AbstractQueuedSynchronizer.getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.getWaitQueueLength()
java.util.concurrent.locks.ReentrantLock.getWaitQueueLength(java.util.concurrent.locks.Condition)
java.util.concurrent.locks.ReentrantReadWriteLock.getWaitQueueLength(java.util.concurrent.locks.Condition)


Occurences of getWantClientAuth

getWantClientAuth occurences:
javax.net.ssl.SSLEngine.getWantClientAuth()
javax.net.ssl.SSLParameters.getWantClientAuth()
javax.net.ssl.SSLServerSocket.getWantClientAuth()
javax.net.ssl.SSLSocket.getWantClientAuth()


Occurences of getWarnings

getWarnings occurences:
java.sql.Connection.getWarnings()
java.sql.ResultSet.getWarnings()
java.sql.Statement.getWarnings()


Occurences of getWarningString

getWarningString occurences:
java.awt.Window.getWarningString()
javax.swing.JInternalFrame.getWarningString()


Occurences of getWeeksInWeekYear

getWeeksInWeekYear occurences:
java.util.Calendar.getWeeksInWeekYear()
java.util.GregorianCalendar.getWeeksInWeekYear()


Occurences of getWeekYear

getWeekYear occurences:
java.util.Calendar.getWeekYear()
java.util.GregorianCalendar.getWeekYear()


Occurences of getWhatToShow

getWhatToShow occurences:
org.w3c.dom.ls.LSParserFilter.getWhatToShow()
org.w3c.dom.ls.LSSerializerFilter.getWhatToShow()


Occurences of getWhen

getWhen occurences:
java.awt.event.ActionEvent.getWhen()
java.awt.event.InputEvent.getWhen()
java.awt.event.InputMethodEvent.getWhen()
java.awt.event.InvocationEvent.getWhen()


Occurences of getWhite

getWhite occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWhite()
javax.swing.plaf.metal.MetalTheme.getWhite()


Occurences of getWidth

getWidth occurences:
java.awt.Component.getWidth()
java.awt.Dimension.getWidth()
java.awt.DisplayMode.getWidth()
java.awt.geom.Arc2D.Double.getWidth()
java.awt.geom.Arc2D.Float.getWidth()
java.awt.geom.Dimension2D.getWidth()
java.awt.geom.Ellipse2D.Double.getWidth()
java.awt.geom.Ellipse2D.Float.getWidth()
java.awt.geom.Rectangle2D.Double.getWidth()
java.awt.geom.Rectangle2D.Float.getWidth()
java.awt.geom.RectangularShape.getWidth()
java.awt.geom.RoundRectangle2D.Double.getWidth()
java.awt.geom.RoundRectangle2D.Float.getWidth()
java.awt.Image.getWidth(java.awt.image.ImageObserver)
java.awt.image.BufferedImage.getWidth()
java.awt.image.BufferedImage.getWidth(java.awt.image.ImageObserver)
java.awt.image.Kernel.getWidth()
java.awt.image.PixelGrabber.getWidth()
java.awt.image.Raster.getWidth()
java.awt.image.renderable.RenderableImage.getWidth()
java.awt.image.renderable.RenderableImageOp.getWidth()
java.awt.image.RenderedImage.getWidth()
java.awt.image.SampleModel.getWidth()
java.awt.image.VolatileImage.getWidth()
java.awt.print.PageFormat.getWidth()
java.awt.print.Paper.getWidth()
java.awt.Rectangle.getWidth()
java.util.IllegalFormatWidthException.getWidth()
javax.imageio.ImageReader.getWidth(int)
javax.print.attribute.standard.MediaPrintableArea.getWidth(int)
javax.swing.JComponent.getWidth()
javax.swing.SpringLayout.Constraints.getWidth()
javax.swing.table.TableColumn.getWidth()
javax.swing.text.BoxView.getWidth()


Occurences of getWindingRule

getWindingRule occurences:
java.awt.geom.FlatteningPathIterator.getWindingRule()
java.awt.geom.Path2D.getWindingRule()
java.awt.geom.PathIterator.getWindingRule()


Occurences of getWindowBackground

getWindowBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWindowBackground()
javax.swing.plaf.metal.MetalTheme.getWindowBackground()


Occurences of getWindowTitleBackground

getWindowTitleBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleBackground()
javax.swing.plaf.metal.MetalTheme.getWindowTitleBackground()


Occurences of getWindowTitleFont

getWindowTitleFont occurences:
javax.swing.plaf.metal.DefaultMetalTheme.getWindowTitleFont()
javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleFont()
javax.swing.plaf.metal.MetalTheme.getWindowTitleFont()


Occurences of getWindowTitleForeground

getWindowTitleForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleForeground()
javax.swing.plaf.metal.MetalTheme.getWindowTitleForeground()


Occurences of getWindowTitleInactiveBackground

getWindowTitleInactiveBackground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleInactiveBackground()
javax.swing.plaf.metal.MetalTheme.getWindowTitleInactiveBackground()


Occurences of getWindowTitleInactiveForeground

getWindowTitleInactiveForeground occurences:
javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleInactiveForeground()
javax.swing.plaf.metal.MetalTheme.getWindowTitleInactiveForeground()


Occurences of getWordInstance

getWordInstance occurences:
java.text.BreakIterator.getWordInstance()
java.text.BreakIterator.getWordInstance(java.util.Locale)
java.text.spi.BreakIteratorProvider.getWordInstance(java.util.Locale)


Occurences of getWritableTile

getWritableTile occurences:
java.awt.image.BufferedImage.getWritableTile(int, int)
java.awt.image.WritableRenderedImage.getWritableTile(int, int)


Occurences of getWritableTileIndices

getWritableTileIndices occurences:
java.awt.image.BufferedImage.getWritableTileIndices()
java.awt.image.WritableRenderedImage.getWritableTileIndices()


Occurences of getWriter

getWriter occurences:
javax.script.ScriptContext.getWriter()
javax.script.SimpleScriptContext.getWriter()
javax.swing.text.AbstractWriter.getWriter()
javax.xml.transform.stream.StreamResult.getWriter()


Occurences of getWSDLDocumentLocation

getWSDLDocumentLocation occurences:
javax.xml.ws.Service.getWSDLDocumentLocation()
javax.xml.ws.spi.ServiceDelegate.getWSDLDocumentLocation()


Occurences of getX

getX occurences:
java.awt.Component.getX()
java.awt.dnd.DragSourceEvent.getX()
java.awt.event.MouseEvent.getX()
java.awt.geom.Arc2D.Double.getX()
java.awt.geom.Arc2D.Float.getX()
java.awt.geom.Ellipse2D.Double.getX()
java.awt.geom.Ellipse2D.Float.getX()
java.awt.geom.Point2D.getX()
java.awt.geom.Point2D.Double.getX()
java.awt.geom.Point2D.Float.getX()
java.awt.geom.Rectangle2D.Double.getX()
java.awt.geom.Rectangle2D.Float.getX()
java.awt.geom.RectangularShape.getX()
java.awt.geom.RoundRectangle2D.Double.getX()
java.awt.geom.RoundRectangle2D.Float.getX()
java.awt.Point.getX()
java.awt.Rectangle.getX()
java.security.interfaces.DSAPrivateKey.getX()
java.security.spec.DSAPrivateKeySpec.getX()
javax.crypto.interfaces.DHPrivateKey.getX()
javax.crypto.spec.DHPrivateKeySpec.getX()
javax.print.attribute.Size2DSyntax.getX(int)
javax.print.attribute.standard.MediaPrintableArea.getX(int)
javax.swing.JComponent.getX()
javax.swing.SpringLayout.Constraints.getX()


Occurences of getX1

getX1 occurences:
java.awt.geom.CubicCurve2D.getX1()
java.awt.geom.CubicCurve2D.Double.getX1()
java.awt.geom.CubicCurve2D.Float.getX1()
java.awt.geom.Line2D.getX1()
java.awt.geom.Line2D.Double.getX1()
java.awt.geom.Line2D.Float.getX1()
java.awt.geom.QuadCurve2D.getX1()
java.awt.geom.QuadCurve2D.Double.getX1()
java.awt.geom.QuadCurve2D.Float.getX1()


Occurences of getX2

getX2 occurences:
java.awt.geom.CubicCurve2D.getX2()
java.awt.geom.CubicCurve2D.Double.getX2()
java.awt.geom.CubicCurve2D.Float.getX2()
java.awt.geom.Line2D.getX2()
java.awt.geom.Line2D.Double.getX2()
java.awt.geom.Line2D.Float.getX2()
java.awt.geom.QuadCurve2D.getX2()
java.awt.geom.QuadCurve2D.Double.getX2()
java.awt.geom.QuadCurve2D.Float.getX2()


Occurences of getXAConnection

getXAConnection occurences:
javax.sql.XADataSource.getXAConnection()
javax.sql.XADataSource.getXAConnection(java.lang.String, java.lang.String)


Occurences of getXmlEncoding

getXmlEncoding occurences:
org.w3c.dom.Document.getXmlEncoding()
org.w3c.dom.Entity.getXmlEncoding()


Occurences of getXMLReader

getXMLReader occurences:
javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader()
javax.xml.parsers.SAXParser.getXMLReader()
javax.xml.transform.sax.SAXSource.getXMLReader()


Occurences of getXMLSchemaType

getXMLSchemaType occurences:
javax.xml.datatype.Duration.getXMLSchemaType()
javax.xml.datatype.XMLGregorianCalendar.getXMLSchemaType()


Occurences of getXMLVersion

getXMLVersion occurences:
org.xml.sax.ext.Locator2.getXMLVersion()
org.xml.sax.ext.Locator2Impl.getXMLVersion()


Occurences of getXmlVersion

getXmlVersion occurences:
org.w3c.dom.Document.getXmlVersion()
org.w3c.dom.Entity.getXmlVersion()


Occurences of getY

getY occurences:
java.awt.Component.getY()
java.awt.dnd.DragSourceEvent.getY()
java.awt.event.MouseEvent.getY()
java.awt.geom.Arc2D.Double.getY()
java.awt.geom.Arc2D.Float.getY()
java.awt.geom.Ellipse2D.Double.getY()
java.awt.geom.Ellipse2D.Float.getY()
java.awt.geom.Point2D.getY()
java.awt.geom.Point2D.Double.getY()
java.awt.geom.Point2D.Float.getY()
java.awt.geom.Rectangle2D.Double.getY()
java.awt.geom.Rectangle2D.Float.getY()
java.awt.geom.RectangularShape.getY()
java.awt.geom.RoundRectangle2D.Double.getY()
java.awt.geom.RoundRectangle2D.Float.getY()
java.awt.Point.getY()
java.awt.Rectangle.getY()
java.security.interfaces.DSAPublicKey.getY()
java.security.spec.DSAPublicKeySpec.getY()
javax.crypto.interfaces.DHPublicKey.getY()
javax.crypto.spec.DHPublicKeySpec.getY()
javax.print.attribute.Size2DSyntax.getY(int)
javax.print.attribute.standard.MediaPrintableArea.getY(int)
javax.swing.JComponent.getY()
javax.swing.SpringLayout.Constraints.getY()


Occurences of getY1

getY1 occurences:
java.awt.geom.CubicCurve2D.getY1()
java.awt.geom.CubicCurve2D.Double.getY1()
java.awt.geom.CubicCurve2D.Float.getY1()
java.awt.geom.Line2D.getY1()
java.awt.geom.Line2D.Double.getY1()
java.awt.geom.Line2D.Float.getY1()
java.awt.geom.QuadCurve2D.getY1()
java.awt.geom.QuadCurve2D.Double.getY1()
java.awt.geom.QuadCurve2D.Float.getY1()


Occurences of getY2

getY2 occurences:
java.awt.geom.CubicCurve2D.getY2()
java.awt.geom.CubicCurve2D.Double.getY2()
java.awt.geom.CubicCurve2D.Float.getY2()
java.awt.geom.Line2D.getY2()
java.awt.geom.Line2D.Double.getY2()
java.awt.geom.Line2D.Float.getY2()
java.awt.geom.QuadCurve2D.getY2()
java.awt.geom.QuadCurve2D.Double.getY2()
java.awt.geom.QuadCurve2D.Float.getY2()


Occurences of getYear

getYear occurences:
java.sql.Time.getYear()
java.time.LocalDate.getYear()
java.time.LocalDateTime.getYear()
java.time.OffsetDateTime.getYear()
java.time.YearMonth.getYear()
java.time.ZonedDateTime.getYear()
java.util.Date.getYear()
javax.xml.datatype.XMLGregorianCalendar.getYear()


Occurences of getYears

getYears occurences:
java.time.Period.getYears()
javax.xml.datatype.Duration.getYears()


Occurences of getZeroDigit

getZeroDigit occurences:
java.text.DecimalFormatSymbols.getZeroDigit()
java.time.format.DecimalStyle.getZeroDigit()


Occurences of getZone

getZone occurences:
java.time.chrono.ChronoZonedDateTime.getZone()
java.time.Clock.getZone()
java.time.format.DateTimeFormatter.getZone()
java.time.ZonedDateTime.getZone()


Occurences of get_any

get_any occurences:
org.omg.CORBA.DynAny.get_any()
org.omg.DynamicAny.DynAnyOperations.get_any()
org.omg.DynamicAny._DynAnyStub.get_any()
org.omg.DynamicAny._DynArrayStub.get_any()
org.omg.DynamicAny._DynEnumStub.get_any()
org.omg.DynamicAny._DynFixedStub.get_any()
org.omg.DynamicAny._DynSequenceStub.get_any()
org.omg.DynamicAny._DynStructStub.get_any()
org.omg.DynamicAny._DynUnionStub.get_any()
org.omg.DynamicAny._DynValueStub.get_any()


Occurences of get_as_string

get_as_string occurences:
org.omg.DynamicAny.DynEnumOperations.get_as_string()
org.omg.DynamicAny._DynEnumStub.get_as_string()


Occurences of get_as_ulong

get_as_ulong occurences:
org.omg.DynamicAny.DynEnumOperations.get_as_ulong()
org.omg.DynamicAny._DynEnumStub.get_as_ulong()


Occurences of get_boolean

get_boolean occurences:
org.omg.CORBA.DynAny.get_boolean()
org.omg.DynamicAny.DynAnyOperations.get_boolean()
org.omg.DynamicAny._DynAnyStub.get_boolean()
org.omg.DynamicAny._DynArrayStub.get_boolean()
org.omg.DynamicAny._DynEnumStub.get_boolean()
org.omg.DynamicAny._DynFixedStub.get_boolean()
org.omg.DynamicAny._DynSequenceStub.get_boolean()
org.omg.DynamicAny._DynStructStub.get_boolean()
org.omg.DynamicAny._DynUnionStub.get_boolean()
org.omg.DynamicAny._DynValueStub.get_boolean()


Occurences of get_char

get_char occurences:
org.omg.CORBA.DynAny.get_char()
org.omg.DynamicAny.DynAnyOperations.get_char()
org.omg.DynamicAny._DynAnyStub.get_char()
org.omg.DynamicAny._DynArrayStub.get_char()
org.omg.DynamicAny._DynEnumStub.get_char()
org.omg.DynamicAny._DynFixedStub.get_char()
org.omg.DynamicAny._DynSequenceStub.get_char()
org.omg.DynamicAny._DynStructStub.get_char()
org.omg.DynamicAny._DynUnionStub.get_char()
org.omg.DynamicAny._DynValueStub.get_char()


Occurences of get_discriminator

get_discriminator occurences:
org.omg.DynamicAny.DynUnionOperations.get_discriminator()
org.omg.DynamicAny._DynUnionStub.get_discriminator()


Occurences of get_double

get_double occurences:
org.omg.CORBA.DynAny.get_double()
org.omg.DynamicAny.DynAnyOperations.get_double()
org.omg.DynamicAny._DynAnyStub.get_double()
org.omg.DynamicAny._DynArrayStub.get_double()
org.omg.DynamicAny._DynEnumStub.get_double()
org.omg.DynamicAny._DynFixedStub.get_double()
org.omg.DynamicAny._DynSequenceStub.get_double()
org.omg.DynamicAny._DynStructStub.get_double()
org.omg.DynamicAny._DynUnionStub.get_double()
org.omg.DynamicAny._DynValueStub.get_double()


Occurences of get_dyn_any

get_dyn_any occurences:
org.omg.DynamicAny.DynAnyOperations.get_dyn_any()
org.omg.DynamicAny._DynAnyStub.get_dyn_any()
org.omg.DynamicAny._DynArrayStub.get_dyn_any()
org.omg.DynamicAny._DynEnumStub.get_dyn_any()
org.omg.DynamicAny._DynFixedStub.get_dyn_any()
org.omg.DynamicAny._DynSequenceStub.get_dyn_any()
org.omg.DynamicAny._DynStructStub.get_dyn_any()
org.omg.DynamicAny._DynUnionStub.get_dyn_any()
org.omg.DynamicAny._DynValueStub.get_dyn_any()


Occurences of get_elements

get_elements occurences:
org.omg.CORBA.DynArray.get_elements()
org.omg.CORBA.DynSequence.get_elements()
org.omg.DynamicAny.DynArrayOperations.get_elements()
org.omg.DynamicAny.DynSequenceOperations.get_elements()
org.omg.DynamicAny._DynArrayStub.get_elements()
org.omg.DynamicAny._DynSequenceStub.get_elements()


Occurences of get_elements_as_dyn_any

get_elements_as_dyn_any occurences:
org.omg.DynamicAny.DynArrayOperations.get_elements_as_dyn_any()
org.omg.DynamicAny.DynSequenceOperations.get_elements_as_dyn_any()
org.omg.DynamicAny._DynArrayStub.get_elements_as_dyn_any()
org.omg.DynamicAny._DynSequenceStub.get_elements_as_dyn_any()


Occurences of get_float

get_float occurences:
org.omg.CORBA.DynAny.get_float()
org.omg.DynamicAny.DynAnyOperations.get_float()
org.omg.DynamicAny._DynAnyStub.get_float()
org.omg.DynamicAny._DynArrayStub.get_float()
org.omg.DynamicAny._DynEnumStub.get_float()
org.omg.DynamicAny._DynFixedStub.get_float()
org.omg.DynamicAny._DynSequenceStub.get_float()
org.omg.DynamicAny._DynStructStub.get_float()
org.omg.DynamicAny._DynUnionStub.get_float()
org.omg.DynamicAny._DynValueStub.get_float()


Occurences of get_id

get_id occurences:
org.omg.CORBA.portable.BoxedValueHelper.get_id()
org.omg.CORBA.StringValueHelper.get_id()
org.omg.CORBA.WStringValueHelper.get_id()


Occurences of get_interface_def

get_interface_def occurences:
org.omg.CORBA.portable.Delegate.get_interface_def(org.omg.CORBA.Object)
org.omg.PortableServer.portable.Delegate.get_interface_def(org.omg.PortableServer.Servant)


Occurences of get_length

get_length occurences:
org.omg.DynamicAny.DynSequenceOperations.get_length()
org.omg.DynamicAny._DynSequenceStub.get_length()


Occurences of get_long

get_long occurences:
org.omg.CORBA.DynAny.get_long()
org.omg.DynamicAny.DynAnyOperations.get_long()
org.omg.DynamicAny._DynAnyStub.get_long()
org.omg.DynamicAny._DynArrayStub.get_long()
org.omg.DynamicAny._DynEnumStub.get_long()
org.omg.DynamicAny._DynFixedStub.get_long()
org.omg.DynamicAny._DynSequenceStub.get_long()
org.omg.DynamicAny._DynStructStub.get_long()
org.omg.DynamicAny._DynUnionStub.get_long()
org.omg.DynamicAny._DynValueStub.get_long()


Occurences of get_longlong

get_longlong occurences:
org.omg.CORBA.DynAny.get_longlong()
org.omg.DynamicAny.DynAnyOperations.get_longlong()
org.omg.DynamicAny._DynAnyStub.get_longlong()
org.omg.DynamicAny._DynArrayStub.get_longlong()
org.omg.DynamicAny._DynEnumStub.get_longlong()
org.omg.DynamicAny._DynFixedStub.get_longlong()
org.omg.DynamicAny._DynSequenceStub.get_longlong()
org.omg.DynamicAny._DynStructStub.get_longlong()
org.omg.DynamicAny._DynUnionStub.get_longlong()
org.omg.DynamicAny._DynValueStub.get_longlong()


Occurences of get_members

get_members occurences:
org.omg.CORBA.DynStruct.get_members()
org.omg.CORBA.DynValue.get_members()
org.omg.DynamicAny.DynStructOperations.get_members()
org.omg.DynamicAny.DynValueOperations.get_members()
org.omg.DynamicAny._DynStructStub.get_members()
org.omg.DynamicAny._DynValueStub.get_members()


Occurences of get_members_as_dyn_any

get_members_as_dyn_any occurences:
org.omg.DynamicAny.DynStructOperations.get_members_as_dyn_any()
org.omg.DynamicAny.DynValueOperations.get_members_as_dyn_any()
org.omg.DynamicAny._DynStructStub.get_members_as_dyn_any()
org.omg.DynamicAny._DynValueStub.get_members_as_dyn_any()


Occurences of get_octet

get_octet occurences:
org.omg.CORBA.DynAny.get_octet()
org.omg.DynamicAny.DynAnyOperations.get_octet()
org.omg.DynamicAny._DynAnyStub.get_octet()
org.omg.DynamicAny._DynArrayStub.get_octet()
org.omg.DynamicAny._DynEnumStub.get_octet()
org.omg.DynamicAny._DynFixedStub.get_octet()
org.omg.DynamicAny._DynSequenceStub.get_octet()
org.omg.DynamicAny._DynStructStub.get_octet()
org.omg.DynamicAny._DynUnionStub.get_octet()
org.omg.DynamicAny._DynValueStub.get_octet()


Occurences of get_reference

get_reference occurences:
org.omg.CORBA.DynAny.get_reference()
org.omg.DynamicAny.DynAnyOperations.get_reference()
org.omg.DynamicAny._DynAnyStub.get_reference()
org.omg.DynamicAny._DynArrayStub.get_reference()
org.omg.DynamicAny._DynEnumStub.get_reference()
org.omg.DynamicAny._DynFixedStub.get_reference()
org.omg.DynamicAny._DynSequenceStub.get_reference()
org.omg.DynamicAny._DynStructStub.get_reference()
org.omg.DynamicAny._DynUnionStub.get_reference()
org.omg.DynamicAny._DynValueStub.get_reference()


Occurences of get_short

get_short occurences:
org.omg.CORBA.DynAny.get_short()
org.omg.DynamicAny.DynAnyOperations.get_short()
org.omg.DynamicAny._DynAnyStub.get_short()
org.omg.DynamicAny._DynArrayStub.get_short()
org.omg.DynamicAny._DynEnumStub.get_short()
org.omg.DynamicAny._DynFixedStub.get_short()
org.omg.DynamicAny._DynSequenceStub.get_short()
org.omg.DynamicAny._DynStructStub.get_short()
org.omg.DynamicAny._DynUnionStub.get_short()
org.omg.DynamicAny._DynValueStub.get_short()


Occurences of get_slot

get_slot occurences:
org.omg.PortableInterceptor.CurrentOperations.get_slot(int)
org.omg.PortableInterceptor.RequestInfoOperations.get_slot(int)


Occurences of get_string

get_string occurences:
org.omg.CORBA.DynAny.get_string()
org.omg.DynamicAny.DynAnyOperations.get_string()
org.omg.DynamicAny._DynAnyStub.get_string()
org.omg.DynamicAny._DynArrayStub.get_string()
org.omg.DynamicAny._DynEnumStub.get_string()
org.omg.DynamicAny._DynFixedStub.get_string()
org.omg.DynamicAny._DynSequenceStub.get_string()
org.omg.DynamicAny._DynStructStub.get_string()
org.omg.DynamicAny._DynUnionStub.get_string()
org.omg.DynamicAny._DynValueStub.get_string()


Occurences of get_typecode

get_typecode occurences:
org.omg.CORBA.DynAny.get_typecode()
org.omg.DynamicAny.DynAnyOperations.get_typecode()
org.omg.DynamicAny._DynAnyStub.get_typecode()
org.omg.DynamicAny._DynArrayStub.get_typecode()
org.omg.DynamicAny._DynEnumStub.get_typecode()
org.omg.DynamicAny._DynFixedStub.get_typecode()
org.omg.DynamicAny._DynSequenceStub.get_typecode()
org.omg.DynamicAny._DynStructStub.get_typecode()
org.omg.DynamicAny._DynUnionStub.get_typecode()
org.omg.DynamicAny._DynValueStub.get_typecode()


Occurences of get_ulong

get_ulong occurences:
org.omg.CORBA.DynAny.get_ulong()
org.omg.DynamicAny.DynAnyOperations.get_ulong()
org.omg.DynamicAny._DynAnyStub.get_ulong()
org.omg.DynamicAny._DynArrayStub.get_ulong()
org.omg.DynamicAny._DynEnumStub.get_ulong()
org.omg.DynamicAny._DynFixedStub.get_ulong()
org.omg.DynamicAny._DynSequenceStub.get_ulong()
org.omg.DynamicAny._DynStructStub.get_ulong()
org.omg.DynamicAny._DynUnionStub.get_ulong()
org.omg.DynamicAny._DynValueStub.get_ulong()


Occurences of get_ulonglong

get_ulonglong occurences:
org.omg.CORBA.DynAny.get_ulonglong()
org.omg.DynamicAny.DynAnyOperations.get_ulonglong()
org.omg.DynamicAny._DynAnyStub.get_ulonglong()
org.omg.DynamicAny._DynArrayStub.get_ulonglong()
org.omg.DynamicAny._DynEnumStub.get_ulonglong()
org.omg.DynamicAny._DynFixedStub.get_ulonglong()
org.omg.DynamicAny._DynSequenceStub.get_ulonglong()
org.omg.DynamicAny._DynStructStub.get_ulonglong()
org.omg.DynamicAny._DynUnionStub.get_ulonglong()
org.omg.DynamicAny._DynValueStub.get_ulonglong()


Occurences of get_ushort

get_ushort occurences:
org.omg.CORBA.DynAny.get_ushort()
org.omg.DynamicAny.DynAnyOperations.get_ushort()
org.omg.DynamicAny._DynAnyStub.get_ushort()
org.omg.DynamicAny._DynArrayStub.get_ushort()
org.omg.DynamicAny._DynEnumStub.get_ushort()
org.omg.DynamicAny._DynFixedStub.get_ushort()
org.omg.DynamicAny._DynSequenceStub.get_ushort()
org.omg.DynamicAny._DynStructStub.get_ushort()
org.omg.DynamicAny._DynUnionStub.get_ushort()
org.omg.DynamicAny._DynValueStub.get_ushort()


Occurences of get_val

get_val occurences:
org.omg.CORBA.DynAny.get_val()
org.omg.DynamicAny.DynAnyOperations.get_val()
org.omg.DynamicAny._DynAnyStub.get_val()
org.omg.DynamicAny._DynArrayStub.get_val()
org.omg.DynamicAny._DynEnumStub.get_val()
org.omg.DynamicAny._DynFixedStub.get_val()
org.omg.DynamicAny._DynSequenceStub.get_val()
org.omg.DynamicAny._DynStructStub.get_val()
org.omg.DynamicAny._DynUnionStub.get_val()
org.omg.DynamicAny._DynValueStub.get_val()


Occurences of get_value

get_value occurences:
org.omg.CORBA.DynFixed.get_value()
org.omg.DynamicAny.DynFixedOperations.get_value()
org.omg.DynamicAny._DynFixedStub.get_value()


Occurences of get_wchar

get_wchar occurences:
org.omg.CORBA.DynAny.get_wchar()
org.omg.DynamicAny.DynAnyOperations.get_wchar()
org.omg.DynamicAny._DynAnyStub.get_wchar()
org.omg.DynamicAny._DynArrayStub.get_wchar()
org.omg.DynamicAny._DynEnumStub.get_wchar()
org.omg.DynamicAny._DynFixedStub.get_wchar()
org.omg.DynamicAny._DynSequenceStub.get_wchar()
org.omg.DynamicAny._DynStructStub.get_wchar()
org.omg.DynamicAny._DynUnionStub.get_wchar()
org.omg.DynamicAny._DynValueStub.get_wchar()


Occurences of get_wstring

get_wstring occurences:
org.omg.CORBA.DynAny.get_wstring()
org.omg.DynamicAny.DynAnyOperations.get_wstring()
org.omg.DynamicAny._DynAnyStub.get_wstring()
org.omg.DynamicAny._DynArrayStub.get_wstring()
org.omg.DynamicAny._DynEnumStub.get_wstring()
org.omg.DynamicAny._DynFixedStub.get_wstring()
org.omg.DynamicAny._DynSequenceStub.get_wstring()
org.omg.DynamicAny._DynStructStub.get_wstring()
org.omg.DynamicAny._DynUnionStub.get_wstring()
org.omg.DynamicAny._DynValueStub.get_wstring()


Occurences of GIF

GIF occurences:
javax.print.GIF
javax.print.GIF
javax.print.GIF


Occurences of GLAGOLITIC

GLAGOLITIC occurences:
java.lang.GLAGOLITIC
java.lang.GLAGOLITIC


Occurences of GlyphMetrics (constructors)

GlyphMetrics (constructors) occurences:
java.awt.font.GlyphMetrics(boolean, float, float, java.awt.geom.Rectangle2D, byte)
java.awt.font.GlyphMetrics(float, java.awt.geom.Rectangle2D, byte)


Occurences of GOTHIC

GOTHIC occurences:
java.lang.GOTHIC
java.lang.GOTHIC


Occurences of grabPixels

grabPixels occurences:
java.awt.image.PixelGrabber.grabPixels()
java.awt.image.PixelGrabber.grabPixels(long)


Occurences of GradientPaint (constructors)

GradientPaint (constructors) occurences:
java.awt.GradientPaint(float, float, java.awt.Color, float, float, java.awt.Color)
java.awt.GradientPaint(float, float, java.awt.Color, float, float, java.awt.Color, boolean)
java.awt.GradientPaint(java.awt.geom.Point2D, java.awt.Color, java.awt.geom.Point2D, java.awt.Color)
java.awt.GradientPaint(java.awt.geom.Point2D, java.awt.Color, java.awt.geom.Point2D, java.awt.Color, boolean)


Occurences of GREEK

GREEK occurences:
java.lang.GREEK
java.lang.GREEK


Occurences of GregorianCalendar (constructors)

GregorianCalendar (constructors) occurences:
java.util.GregorianCalendar()
java.util.GregorianCalendar(int, int, int)
java.util.GregorianCalendar(int, int, int, int, int)
java.util.GregorianCalendar(int, int, int, int, int, int)
java.util.GregorianCalendar(java.util.Locale)
java.util.GregorianCalendar(java.util.TimeZone)
java.util.GregorianCalendar(java.util.TimeZone, java.util.Locale)


Occurences of GridBagConstraints (constructors)

GridBagConstraints (constructors) occurences:
java.awt.GridBagConstraints()
java.awt.GridBagConstraints(int, int, int, int, double, double, int, int, java.awt.Insets, int, int)


Occurences of GridLayout (constructors)

GridLayout (constructors) occurences:
java.awt.GridLayout()
java.awt.GridLayout(int, int)
java.awt.GridLayout(int, int, int, int)


Occurences of group

group occurences:
java.nio.channels.MembershipKey.group()
java.nio.file.attribute.PosixFileAttributes.group()
java.util.regex.Matcher.group()
java.util.regex.Matcher.group(int)
java.util.regex.Matcher.group(java.lang.String)
java.util.regex.MatchResult.group()
java.util.regex.MatchResult.group(int)
javax.swing.group


Occurences of groupCount

groupCount occurences:
java.util.regex.Matcher.groupCount()
java.util.regex.MatchResult.groupCount()


Occurences of groupingBy

groupingBy occurences:
java.util.stream.Collectors.groupingBy(java.util.function.Function)
java.util.stream.Collectors.groupingBy(java.util.function.Function, java.util.function.Supplier, java.util.stream.Collector)
java.util.stream.Collectors.groupingBy(java.util.function.Function, java.util.stream.Collector)


Occurences of groupingByConcurrent

groupingByConcurrent occurences:
java.util.stream.Collectors.groupingByConcurrent(java.util.function.Function)
java.util.stream.Collectors.groupingByConcurrent(java.util.function.Function, java.util.function.Supplier, java.util.stream.Collector)
java.util.stream.Collectors.groupingByConcurrent(java.util.function.Function, java.util.stream.Collector)


Occurences of GSSException (constructors)

GSSException (constructors) occurences:
org.ietf.jgss.GSSException(int)
org.ietf.jgss.GSSException(int, int, java.lang.String)


Occurences of guardWithTest

guardWithTest occurences:
java.lang.invoke.MethodHandles.guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle)
java.lang.invoke.SwitchPoint.guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle)


Occurences of GUJARATI

GUJARATI occurences:
java.awt.font.GUJARATI
java.awt.font.GUJARATI
java.lang.GUJARATI
java.lang.GUJARATI


Occurences of GURMUKHI

GURMUKHI occurences:
java.awt.font.GURMUKHI
java.awt.font.GURMUKHI
java.lang.GURMUKHI
java.lang.GURMUKHI


Occurences of GZIPInputStream (constructors)

GZIPInputStream (constructors) occurences:
java.util.zip.GZIPInputStream(java.io.InputStream)
java.util.zip.GZIPInputStream(java.io.InputStream, int)


Occurences of GZIPOutputStream (constructors)

GZIPOutputStream (constructors) occurences:
java.util.zip.GZIPOutputStream(java.io.OutputStream)
java.util.zip.GZIPOutputStream(java.io.OutputStream, boolean)
java.util.zip.GZIPOutputStream(java.io.OutputStream, int)
java.util.zip.GZIPOutputStream(java.io.OutputStream, int, boolean)


Occurences of handle

handle occurences:
java.util.concurrent.CompletableFuture.handle(java.util.function.BiFunction)
java.util.concurrent.CompletionStage.handle(java.util.function.BiFunction)
javax.security.auth.callback.CallbackHandler.handle(javax.security.auth.callback.Callback:A)
javax.xml.ws.spi.http.HttpHandler.handle(javax.xml.ws.spi.http.HttpExchange)
org.w3c.dom.UserDataHandler.handle(short, java.lang.String, java.lang.Object, org.w3c.dom.Node, org.w3c.dom.Node)


Occurences of handleAsync

handleAsync occurences:
java.util.concurrent.CompletableFuture.handleAsync(java.util.function.BiFunction)
java.util.concurrent.CompletableFuture.handleAsync(java.util.function.BiFunction, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.handleAsync(java.util.function.BiFunction)
java.util.concurrent.CompletionStage.handleAsync(java.util.function.BiFunction, java.util.concurrent.Executor)


Occurences of handleComment

handleComment occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleComment(char:A, int)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleComment(char:A, int)
javax.swing.text.html.parser.DocumentParser.handleComment(char:A)
javax.swing.text.html.parser.Parser.handleComment(char:A)


Occurences of handleEmptyTag

handleEmptyTag occurences:
javax.swing.text.html.parser.DocumentParser.handleEmptyTag(javax.swing.text.html.parser.TagElement)
javax.swing.text.html.parser.Parser.handleEmptyTag(javax.swing.text.html.parser.TagElement)


Occurences of handleEndOfLineString

handleEndOfLineString occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleEndOfLineString(java.lang.String)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleEndOfLineString(java.lang.String)


Occurences of handleEndTag

handleEndTag occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleEndTag(javax.swing.text.html.HTML.Tag, int)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleEndTag(javax.swing.text.html.HTML.Tag, int)
javax.swing.text.html.parser.DocumentParser.handleEndTag(javax.swing.text.html.parser.TagElement)
javax.swing.text.html.parser.Parser.handleEndTag(javax.swing.text.html.parser.TagElement)


Occurences of handleError

handleError occurences:
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleError(java.lang.String, int)
javax.swing.text.html.parser.DocumentParser.handleError(int, java.lang.String)
javax.swing.text.html.parser.Parser.handleError(int, java.lang.String)
org.w3c.dom.DOMErrorHandler.handleError(org.w3c.dom.DOMError)


Occurences of handleEvent

handleEvent occurences:
java.awt.Component.handleEvent(java.awt.Event)
javax.xml.bind.helpers.DefaultValidationEventHandler.handleEvent(javax.xml.bind.ValidationEvent)
javax.xml.bind.util.ValidationEventCollector.handleEvent(javax.xml.bind.ValidationEvent)
javax.xml.bind.ValidationEventHandler.handleEvent(javax.xml.bind.ValidationEvent)
org.w3c.dom.events.EventListener.handleEvent(org.w3c.dom.events.Event)


Occurences of handleFault

handleFault occurences:
javax.xml.ws.handler.Handler.handleFault(C)
javax.xml.ws.handler.Handler.handleFault(javax.xml.ws.handler.MessageContext)


Occurences of handleGetObject

handleGetObject occurences:
java.util.ListResourceBundle.handleGetObject(java.lang.String)
java.util.PropertyResourceBundle.handleGetObject(java.lang.String)
java.util.ResourceBundle.handleGetObject(java.lang.String)


Occurences of handleKeySet

handleKeySet occurences:
java.util.ListResourceBundle.handleKeySet()
java.util.PropertyResourceBundle.handleKeySet()
java.util.ResourceBundle.handleKeySet()


Occurences of handleMBeanUnregistration

handleMBeanUnregistration occurences:
javax.management.relation.Relation.handleMBeanUnregistration(javax.management.ObjectName, java.lang.String)
javax.management.relation.RelationSupport.handleMBeanUnregistration(javax.management.ObjectName, java.lang.String)


Occurences of handleMessage

handleMessage occurences:
javax.xml.ws.handler.Handler.handleMessage(C)
javax.xml.ws.handler.Handler.handleMessage(javax.xml.ws.handler.MessageContext)


Occurences of handleNotification

handleNotification occurences:
javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object)
javax.management.NotificationListener.handleNotification(javax.management.Notification, java.lang.Object)
javax.management.relation.RelationService.handleNotification(javax.management.Notification, java.lang.Object)


Occurences of handleOption

handleOption occurences:
javax.tools.ForwardingJavaFileManager.handleOption(java.lang.String, java.util.Iterator)
javax.tools.JavaFileManager.handleOption(java.lang.String, java.util.Iterator)


Occurences of handler

handler occurences:
javax.xml.ws.handler
javax.xml.ws.spi.http.handler


Occurences of Handler

Handler occurences:
java.util.logging.Handler
javax.xml.ws.handler.Handler


Occurences of handleSimpleTag

handleSimpleTag occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleSimpleTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, int)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleSimpleTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, int)


Occurences of handleStartTag

handleStartTag occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, int)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, int)
javax.swing.text.html.parser.DocumentParser.handleStartTag(javax.swing.text.html.parser.TagElement)
javax.swing.text.html.parser.Parser.handleStartTag(javax.swing.text.html.parser.TagElement)


Occurences of handleText

handleText occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.handleText(char:A, int)
javax.swing.text.html.HTMLEditorKit.ParserCallback.handleText(char:A, int)
javax.swing.text.html.parser.DocumentParser.handleText(char:A)
javax.swing.text.html.parser.Parser.handleText(char:A)


Occurences of HAND_CURSOR

HAND_CURSOR occurences:
java.awt.HAND_CURSOR
java.awt.HAND_CURSOR


Occurences of HANGING_BASELINE

HANGING_BASELINE occurences:
java.awt.font.HANGING_BASELINE
java.awt.HANGING_BASELINE


Occurences of HANUNOO

HANUNOO occurences:
java.lang.HANUNOO
java.lang.HANUNOO


Occurences of hasArray

hasArray occurences:
java.nio.Buffer.hasArray()
java.nio.ByteBuffer.hasArray()
java.nio.CharBuffer.hasArray()
java.nio.DoubleBuffer.hasArray()
java.nio.FloatBuffer.hasArray()
java.nio.IntBuffer.hasArray()
java.nio.LongBuffer.hasArray()
java.nio.ShortBuffer.hasArray()


Occurences of hasAttribute

hasAttribute occurences:
javax.imageio.metadata.IIOMetadataNode.hasAttribute(java.lang.String)
org.w3c.dom.Element.hasAttribute(java.lang.String)


Occurences of hasAttributeNS

hasAttributeNS occurences:
javax.imageio.metadata.IIOMetadataNode.hasAttributeNS(java.lang.String, java.lang.String)
org.w3c.dom.Element.hasAttributeNS(java.lang.String, java.lang.String)


Occurences of hasAttributes

hasAttributes occurences:
javax.imageio.metadata.IIOMetadataNode.hasAttributes()
org.w3c.dom.Node.hasAttributes()


Occurences of hasChildNodes

hasChildNodes occurences:
javax.imageio.metadata.IIOMetadataNode.hasChildNodes()
org.w3c.dom.Node.hasChildNodes()


Occurences of hasContended

hasContended occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.hasContended()
java.util.concurrent.locks.AbstractQueuedSynchronizer.hasContended()


Occurences of hasController

hasController occurences:
javax.imageio.IIOParam.hasController()
javax.imageio.metadata.IIOMetadata.hasController()


Occurences of hasDefaultValue

hasDefaultValue occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.hasDefaultValue()
javax.management.openmbean.OpenMBeanParameterInfo.hasDefaultValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.hasDefaultValue()


Occurences of hasExtensions

hasExtensions occurences:
java.security.cert.X509CRLEntry.hasExtensions()
java.util.Locale.hasExtensions()


Occurences of hasFocus

hasFocus occurences:
java.awt.Component.hasFocus()
javax.swing.plaf.basic.hasFocus
javax.swing.tree.hasFocus


Occurences of hash

hash occurences:
java.util.Objects.hash(java.lang.Object...)
org.omg.CORBA.portable.Delegate.hash(org.omg.CORBA.Object, int)


Occurences of HashAttributeSet (constructors)

HashAttributeSet (constructors) occurences:
javax.print.attribute.HashAttributeSet()
javax.print.attribute.HashAttributeSet(java.lang.Class)
javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute)
javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute, java.lang.Class)
javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute:A)
javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute:A, java.lang.Class)
javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet)
javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet, java.lang.Class)


Occurences of hashCode

hashCode occurences:
com.sun.jdi.BooleanValue.hashCode()
com.sun.jdi.ByteValue.hashCode()
com.sun.jdi.CharValue.hashCode()
com.sun.jdi.DoubleValue.hashCode()
com.sun.jdi.Field.hashCode()
com.sun.jdi.FloatValue.hashCode()
com.sun.jdi.IntegerValue.hashCode()
com.sun.jdi.LocalVariable.hashCode()
com.sun.jdi.Location.hashCode()
com.sun.jdi.LongValue.hashCode()
com.sun.jdi.Method.hashCode()
com.sun.jdi.ObjectReference.hashCode()
com.sun.jdi.ReferenceType.hashCode()
com.sun.jdi.ShortValue.hashCode()
com.sun.jdi.VoidValue.hashCode()
com.sun.tools.attach.VirtualMachine.hashCode()
com.sun.tools.attach.VirtualMachineDescriptor.hashCode()
java.awt.AlphaComposite.hashCode()
java.awt.AWTKeyStroke.hashCode()
java.awt.BasicStroke.hashCode()
java.awt.BufferCapabilities.FlipContents.hashCode()
java.awt.Color.hashCode()
java.awt.datatransfer.DataFlavor.hashCode()
java.awt.Dimension.hashCode()
java.awt.DisplayMode.hashCode()
java.awt.Font.hashCode()
java.awt.font.FontRenderContext.hashCode()
java.awt.font.ImageGraphicAttribute.hashCode()
java.awt.font.NumericShaper.hashCode()
java.awt.font.ShapeGraphicAttribute.hashCode()
java.awt.font.TextHitInfo.hashCode()
java.awt.font.TextLayout.hashCode()
java.awt.font.TransformAttribute.hashCode()
java.awt.geom.AffineTransform.hashCode()
java.awt.geom.Arc2D.hashCode()
java.awt.geom.Ellipse2D.hashCode()
java.awt.geom.Point2D.hashCode()
java.awt.geom.Rectangle2D.hashCode()
java.awt.geom.RoundRectangle2D.hashCode()
java.awt.image.BandedSampleModel.hashCode()
java.awt.image.ColorModel.hashCode()
java.awt.image.ComponentSampleModel.hashCode()
java.awt.image.MultiPixelPackedSampleModel.hashCode()
java.awt.image.PixelInterleavedSampleModel.hashCode()
java.awt.image.SinglePixelPackedSampleModel.hashCode()
java.awt.Insets.hashCode()
java.awt.JobAttributes.hashCode()
java.awt.JobAttributes.DefaultSelectionType.hashCode()
java.awt.JobAttributes.DestinationType.hashCode()
java.awt.JobAttributes.DialogType.hashCode()
java.awt.JobAttributes.MultipleDocumentHandlingType.hashCode()
java.awt.JobAttributes.SidesType.hashCode()
java.awt.MenuShortcut.hashCode()
java.awt.PageAttributes.hashCode()
java.awt.PageAttributes.ColorType.hashCode()
java.awt.PageAttributes.MediaType.hashCode()
java.awt.PageAttributes.OrientationRequestedType.hashCode()
java.awt.PageAttributes.OriginType.hashCode()
java.awt.PageAttributes.PrintQualityType.hashCode()
java.awt.RenderingHints.hashCode()
java.awt.RenderingHints.Key.hashCode()
java.beans.IndexedPropertyDescriptor.hashCode()
java.beans.PropertyDescriptor.hashCode()
java.io.File.hashCode()
java.io.FilePermission.hashCode()
java.lang.annotation.Annotation.hashCode()
java.lang.Boolean.hashCode()
java.lang.Boolean.hashCode(boolean)
java.lang.Byte.hashCode()
java.lang.Byte.hashCode(byte)
java.lang.Character.hashCode()
java.lang.Character.hashCode(char)
java.lang.Character.Subset.hashCode()
java.lang.Double.hashCode()
java.lang.Double.hashCode(double)
java.lang.Enum.hashCode()
java.lang.Float.hashCode()
java.lang.Float.hashCode(float)
java.lang.Integer.hashCode()
java.lang.Integer.hashCode(int)
java.lang.invoke.MethodType.hashCode()
java.lang.Long.hashCode()
java.lang.Long.hashCode(long)
java.lang.Object.hashCode()
java.lang.Package.hashCode()
java.lang.ProcessBuilder.Redirect.hashCode()
java.lang.reflect.Constructor.hashCode()
java.lang.reflect.Field.hashCode()
java.lang.reflect.Method.hashCode()
java.lang.reflect.Parameter.hashCode()
java.lang.Short.hashCode()
java.lang.Short.hashCode(short)
java.lang.StackTraceElement.hashCode()
java.lang.String.hashCode()
java.math.BigDecimal.hashCode()
java.math.BigInteger.hashCode()
java.math.MathContext.hashCode()
java.net.HttpCookie.hashCode()
java.net.Inet4Address.hashCode()
java.net.Inet6Address.hashCode()
java.net.InetAddress.hashCode()
java.net.InetSocketAddress.hashCode()
java.net.InterfaceAddress.hashCode()
java.net.NetworkInterface.hashCode()
java.net.Proxy.hashCode()
java.net.SocketPermission.hashCode()
java.net.URI.hashCode()
java.net.URL.hashCode()
java.net.URLPermission.hashCode()
java.net.URLStreamHandler.hashCode(java.net.URL)
java.nio.ByteBuffer.hashCode()
java.nio.CharBuffer.hashCode()
java.nio.charset.Charset.hashCode()
java.nio.DoubleBuffer.hashCode()
java.nio.file.attribute.AclEntry.hashCode()
java.nio.file.attribute.FileTime.hashCode()
java.nio.file.Path.hashCode()
java.nio.FloatBuffer.hashCode()
java.nio.IntBuffer.hashCode()
java.nio.LongBuffer.hashCode()
java.nio.ShortBuffer.hashCode()
java.rmi.activation.ActivationDesc.hashCode()
java.rmi.activation.ActivationGroupDesc.hashCode()
java.rmi.activation.ActivationGroupDesc.CommandEnvironment.hashCode()
java.rmi.activation.ActivationGroupID.hashCode()
java.rmi.activation.ActivationID.hashCode()
java.rmi.dgc.VMID.hashCode()
java.rmi.MarshalledObject.hashCode()
java.rmi.server.ObjID.hashCode()
java.rmi.server.RemoteObject.hashCode()
java.rmi.server.UID.hashCode()
java.security.AccessControlContext.hashCode()
java.security.AllPermission.hashCode()
java.security.BasicPermission.hashCode()
java.security.cert.Certificate.hashCode()
java.security.cert.CertPath.hashCode()
java.security.cert.X509CRL.hashCode()
java.security.cert.X509CRLEntry.hashCode()
java.security.CodeSigner.hashCode()
java.security.CodeSource.hashCode()
java.security.Identity.hashCode()
java.security.Permission.hashCode()
java.security.PKCS12Attribute.hashCode()
java.security.Principal.hashCode()
java.security.spec.ECFieldF2m.hashCode()
java.security.spec.ECFieldFp.hashCode()
java.security.spec.ECPoint.hashCode()
java.security.spec.EllipticCurve.hashCode()
java.security.Timestamp.hashCode()
java.security.UnresolvedPermission.hashCode()
java.sql.RowId.hashCode()
java.sql.Timestamp.hashCode()
java.text.AttributedCharacterIterator.Attribute.hashCode()
java.text.ChoiceFormat.hashCode()
java.text.Collator.hashCode()
java.text.DateFormat.hashCode()
java.text.DateFormatSymbols.hashCode()
java.text.DecimalFormat.hashCode()
java.text.DecimalFormatSymbols.hashCode()
java.text.FieldPosition.hashCode()
java.text.MessageFormat.hashCode()
java.text.NumberFormat.hashCode()
java.text.ParsePosition.hashCode()
java.text.RuleBasedCollator.hashCode()
java.text.SimpleDateFormat.hashCode()
java.text.StringCharacterIterator.hashCode()
java.time.chrono.AbstractChronology.hashCode()
java.time.chrono.ChronoLocalDate.hashCode()
java.time.chrono.ChronoLocalDateTime.hashCode()
java.time.chrono.Chronology.hashCode()
java.time.chrono.ChronoPeriod.hashCode()
java.time.chrono.ChronoZonedDateTime.hashCode()
java.time.chrono.HijrahDate.hashCode()
java.time.chrono.JapaneseDate.hashCode()
java.time.chrono.MinguoDate.hashCode()
java.time.chrono.ThaiBuddhistDate.hashCode()
java.time.Clock.hashCode()
java.time.Duration.hashCode()
java.time.format.DecimalStyle.hashCode()
java.time.Instant.hashCode()
java.time.LocalDate.hashCode()
java.time.LocalDateTime.hashCode()
java.time.LocalTime.hashCode()
java.time.MonthDay.hashCode()
java.time.OffsetDateTime.hashCode()
java.time.OffsetTime.hashCode()
java.time.Period.hashCode()
java.time.temporal.ValueRange.hashCode()
java.time.temporal.WeekFields.hashCode()
java.time.Year.hashCode()
java.time.YearMonth.hashCode()
java.time.zone.ZoneOffsetTransition.hashCode()
java.time.zone.ZoneOffsetTransitionRule.hashCode()
java.time.zone.ZoneRules.hashCode()
java.time.ZonedDateTime.hashCode()
java.time.ZoneId.hashCode()
java.time.ZoneOffset.hashCode()
java.util.AbstractList.hashCode()
java.util.AbstractMap.hashCode()
java.util.AbstractMap.SimpleEntry.hashCode()
java.util.AbstractMap.SimpleImmutableEntry.hashCode()
java.util.AbstractSet.hashCode()
java.util.Arrays.hashCode(boolean:A)
java.util.Arrays.hashCode(byte:A)
java.util.Arrays.hashCode(char:A)
java.util.Arrays.hashCode(double:A)
java.util.Arrays.hashCode(float:A)
java.util.Arrays.hashCode(int:A)
java.util.Arrays.hashCode(java.lang.Object:A)
java.util.Arrays.hashCode(long:A)
java.util.Arrays.hashCode(short:A)
java.util.BitSet.hashCode()
java.util.Calendar.hashCode()
java.util.Collection.hashCode()
java.util.concurrent.ConcurrentHashMap.hashCode()
java.util.concurrent.ConcurrentHashMap.KeySetView.hashCode()
java.util.concurrent.CopyOnWriteArrayList.hashCode()
java.util.Date.hashCode()
java.util.EnumMap.hashCode()
java.util.GregorianCalendar.hashCode()
java.util.Hashtable.hashCode()
java.util.IdentityHashMap.hashCode()
java.util.jar.Attributes.hashCode()
java.util.jar.Attributes.Name.hashCode()
java.util.jar.Manifest.hashCode()
java.util.List.hashCode()
java.util.Locale.hashCode()
java.util.Locale.LanguageRange.hashCode()
java.util.logging.Level.hashCode()
java.util.Map.hashCode()
java.util.Map.Entry.hashCode()
java.util.Objects.hashCode(java.lang.Object)
java.util.Optional.hashCode()
java.util.OptionalDouble.hashCode()
java.util.OptionalInt.hashCode()
java.util.OptionalLong.hashCode()
java.util.PropertyPermission.hashCode()
java.util.Set.hashCode()
java.util.SimpleTimeZone.hashCode()
java.util.UUID.hashCode()
java.util.Vector.hashCode()
java.util.zip.ZipEntry.hashCode()
javax.crypto.spec.RC2ParameterSpec.hashCode()
javax.crypto.spec.RC5ParameterSpec.hashCode()
javax.crypto.spec.SecretKeySpec.hashCode()
javax.imageio.ImageTypeSpecifier.hashCode()
javax.lang.model.element.Element.hashCode()
javax.lang.model.element.Name.hashCode()
javax.lang.model.type.TypeMirror.hashCode()
javax.management.Attribute.hashCode()
javax.management.Descriptor.hashCode()
javax.management.ImmutableDescriptor.hashCode()
javax.management.MBeanAttributeInfo.hashCode()
javax.management.MBeanConstructorInfo.hashCode()
javax.management.MBeanFeatureInfo.hashCode()
javax.management.MBeanInfo.hashCode()
javax.management.MBeanNotificationInfo.hashCode()
javax.management.MBeanOperationInfo.hashCode()
javax.management.MBeanParameterInfo.hashCode()
javax.management.MBeanPermission.hashCode()
javax.management.MBeanServerPermission.hashCode()
javax.management.modelmbean.DescriptorSupport.hashCode()
javax.management.ObjectInstance.hashCode()
javax.management.ObjectName.hashCode()
javax.management.openmbean.ArrayType.hashCode()
javax.management.openmbean.CompositeData.hashCode()
javax.management.openmbean.CompositeDataSupport.hashCode()
javax.management.openmbean.CompositeType.hashCode()
javax.management.openmbean.OpenMBeanAttributeInfo.hashCode()
javax.management.openmbean.OpenMBeanAttributeInfoSupport.hashCode()
javax.management.openmbean.OpenMBeanConstructorInfo.hashCode()
javax.management.openmbean.OpenMBeanConstructorInfoSupport.hashCode()
javax.management.openmbean.OpenMBeanInfo.hashCode()
javax.management.openmbean.OpenMBeanInfoSupport.hashCode()
javax.management.openmbean.OpenMBeanOperationInfo.hashCode()
javax.management.openmbean.OpenMBeanOperationInfoSupport.hashCode()
javax.management.openmbean.OpenMBeanParameterInfo.hashCode()
javax.management.openmbean.OpenMBeanParameterInfoSupport.hashCode()
javax.management.openmbean.OpenType.hashCode()
javax.management.openmbean.SimpleType.hashCode()
javax.management.openmbean.TabularData.hashCode()
javax.management.openmbean.TabularDataSupport.hashCode()
javax.management.openmbean.TabularType.hashCode()
javax.management.remote.JMXPrincipal.hashCode()
javax.management.remote.JMXServiceURL.hashCode()
javax.naming.BinaryRefAddr.hashCode()
javax.naming.CompositeName.hashCode()
javax.naming.CompoundName.hashCode()
javax.naming.directory.BasicAttribute.hashCode()
javax.naming.directory.BasicAttributes.hashCode()
javax.naming.ldap.LdapName.hashCode()
javax.naming.ldap.Rdn.hashCode()
javax.naming.RefAddr.hashCode()
javax.naming.Reference.hashCode()
javax.net.ssl.SNIHostName.hashCode()
javax.net.ssl.SNIServerName.hashCode()
javax.print.attribute.AttributeSet.hashCode()
javax.print.attribute.DateTimeSyntax.hashCode()
javax.print.attribute.EnumSyntax.hashCode()
javax.print.attribute.HashAttributeSet.hashCode()
javax.print.attribute.IntegerSyntax.hashCode()
javax.print.attribute.ResolutionSyntax.hashCode()
javax.print.attribute.SetOfIntegerSyntax.hashCode()
javax.print.attribute.Size2DSyntax.hashCode()
javax.print.attribute.standard.MediaPrintableArea.hashCode()
javax.print.attribute.TextSyntax.hashCode()
javax.print.attribute.URISyntax.hashCode()
javax.print.DocFlavor.hashCode()
javax.print.PrintService.hashCode()
javax.rmi.CORBA.Stub.hashCode()
javax.rmi.CORBA.StubDelegate.hashCode(javax.rmi.CORBA.Stub)
javax.rmi.ssl.SslRMIClientSocketFactory.hashCode()
javax.rmi.ssl.SslRMIServerSocketFactory.hashCode()
javax.security.auth.kerberos.DelegationPermission.hashCode()
javax.security.auth.kerberos.KerberosKey.hashCode()
javax.security.auth.kerberos.KerberosPrincipal.hashCode()
javax.security.auth.kerberos.KerberosTicket.hashCode()
javax.security.auth.kerberos.KeyTab.hashCode()
javax.security.auth.kerberos.ServicePermission.hashCode()
javax.security.auth.PrivateCredentialPermission.hashCode()
javax.security.auth.Subject.hashCode()
javax.security.auth.x500.X500Principal.hashCode()
javax.security.cert.Certificate.hashCode()
javax.sound.midi.MidiDevice.Info.hashCode()
javax.sound.midi.Sequencer.SyncMode.hashCode()
javax.sound.sampled.AudioFileFormat.Type.hashCode()
javax.sound.sampled.AudioFormat.Encoding.hashCode()
javax.sound.sampled.Control.Type.hashCode()
javax.sound.sampled.LineEvent.Type.hashCode()
javax.sound.sampled.Mixer.Info.hashCode()
javax.sound.sampled.Port.Info.hashCode()
javax.sound.sampled.ReverbType.hashCode()
javax.sql.rowset.serial.SerialArray.hashCode()
javax.sql.rowset.serial.SerialBlob.hashCode()
javax.sql.rowset.serial.SerialClob.hashCode()
javax.sql.rowset.serial.SerialDatalink.hashCode()
javax.sql.rowset.serial.SerialJavaObject.hashCode()
javax.sql.rowset.serial.SerialRef.hashCode()
javax.sql.rowset.serial.SerialStruct.hashCode()
javax.swing.RowSorter.SortKey.hashCode()
javax.swing.text.html.HTML.UnknownTag.hashCode()
javax.swing.text.SimpleAttributeSet.hashCode()
javax.swing.text.StyleContext.SmallAttributeSet.hashCode()
javax.swing.text.TabSet.hashCode()
javax.swing.text.TabStop.hashCode()
javax.swing.tree.TreePath.hashCode()
javax.xml.datatype.Duration.hashCode()
javax.xml.datatype.XMLGregorianCalendar.hashCode()
javax.xml.namespace.QName.hashCode()
org.ietf.jgss.ChannelBinding.hashCode()
org.ietf.jgss.GSSCredential.hashCode()
org.ietf.jgss.GSSName.hashCode()
org.ietf.jgss.Oid.hashCode()
org.omg.CORBA.portable.Delegate.hashCode(org.omg.CORBA.Object)
org.omg.CORBA.portable.ObjectImpl.hashCode()


Occurences of HashDocAttributeSet (constructors)

HashDocAttributeSet (constructors) occurences:
javax.print.attribute.HashDocAttributeSet()
javax.print.attribute.HashDocAttributeSet(javax.print.attribute.DocAttribute)
javax.print.attribute.HashDocAttributeSet(javax.print.attribute.DocAttribute:A)
javax.print.attribute.HashDocAttributeSet(javax.print.attribute.DocAttributeSet)


Occurences of HashMap (constructors)

HashMap (constructors) occurences:
java.util.HashMap()
java.util.HashMap(int)
java.util.HashMap(int, float)
java.util.HashMap(java.util.Map)


Occurences of HashPrintJobAttributeSet (constructors)

HashPrintJobAttributeSet (constructors) occurences:
javax.print.attribute.HashPrintJobAttributeSet()
javax.print.attribute.HashPrintJobAttributeSet(javax.print.attribute.PrintJobAttribute)
javax.print.attribute.HashPrintJobAttributeSet(javax.print.attribute.PrintJobAttribute:A)
javax.print.attribute.HashPrintJobAttributeSet(javax.print.attribute.PrintJobAttributeSet)


Occurences of HashPrintRequestAttributeSet (constructors)

HashPrintRequestAttributeSet (constructors) occurences:
javax.print.attribute.HashPrintRequestAttributeSet()
javax.print.attribute.HashPrintRequestAttributeSet(javax.print.attribute.PrintRequestAttribute)
javax.print.attribute.HashPrintRequestAttributeSet(javax.print.attribute.PrintRequestAttribute:A)
javax.print.attribute.HashPrintRequestAttributeSet(javax.print.attribute.PrintRequestAttributeSet)


Occurences of HashPrintServiceAttributeSet (constructors)

HashPrintServiceAttributeSet (constructors) occurences:
javax.print.attribute.HashPrintServiceAttributeSet()
javax.print.attribute.HashPrintServiceAttributeSet(javax.print.attribute.PrintServiceAttribute)
javax.print.attribute.HashPrintServiceAttributeSet(javax.print.attribute.PrintServiceAttribute:A)
javax.print.attribute.HashPrintServiceAttributeSet(javax.print.attribute.PrintServiceAttributeSet)


Occurences of HashSet (constructors)

HashSet (constructors) occurences:
java.util.HashSet()
java.util.HashSet(int)
java.util.HashSet(int, float)
java.util.HashSet(java.util.Collection)


Occurences of Hashtable (constructors)

Hashtable (constructors) occurences:
java.util.Hashtable()
java.util.Hashtable(int)
java.util.Hashtable(int, float)
java.util.Hashtable(java.util.Map)


Occurences of hasLegalValues

hasLegalValues occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.hasLegalValues()
javax.management.openmbean.OpenMBeanParameterInfo.hasLegalValues()
javax.management.openmbean.OpenMBeanParameterInfoSupport.hasLegalValues()


Occurences of hasListeners

hasListeners occurences:
java.beans.PropertyChangeSupport.hasListeners(java.lang.String)
java.beans.VetoableChangeSupport.hasListeners(java.lang.String)


Occurences of hasLocation

hasLocation occurences:
javax.tools.ForwardingJavaFileManager.hasLocation(javax.tools.JavaFileManager.Location)
javax.tools.JavaFileManager.hasLocation(javax.tools.JavaFileManager.Location)


Occurences of hasMaxValue

hasMaxValue occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.hasMaxValue()
javax.management.openmbean.OpenMBeanParameterInfo.hasMaxValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.hasMaxValue()


Occurences of hasMinValue

hasMinValue occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport.hasMinValue()
javax.management.openmbean.OpenMBeanParameterInfo.hasMinValue()
javax.management.openmbean.OpenMBeanParameterInfoSupport.hasMinValue()


Occurences of hasMoreElements

hasMoreElements occurences:
java.util.Enumeration.hasMoreElements()
java.util.StringTokenizer.hasMoreElements()


Occurences of hasName

hasName occurences:
javax.xml.stream.util.StreamReaderDelegate.hasName()
javax.xml.stream.XMLStreamReader.hasName()


Occurences of hasNext

hasNext occurences:
java.beans.beancontext.BeanContextSupport.BCSIterator.hasNext()
java.util.Iterator.hasNext()
java.util.ListIterator.hasNext()
java.util.Scanner.hasNext()
java.util.Scanner.hasNext(java.lang.String)
java.util.Scanner.hasNext(java.util.regex.Pattern)
javax.xml.stream.util.EventReaderDelegate.hasNext()
javax.xml.stream.util.StreamReaderDelegate.hasNext()
javax.xml.stream.XMLEventReader.hasNext()
javax.xml.stream.XMLStreamReader.hasNext()


Occurences of hasNextBigInteger

hasNextBigInteger occurences:
java.util.Scanner.hasNextBigInteger()
java.util.Scanner.hasNextBigInteger(int)


Occurences of hasNextByte

hasNextByte occurences:
java.util.Scanner.hasNextByte()
java.util.Scanner.hasNextByte(int)


Occurences of hasNextInt

hasNextInt occurences:
java.util.Scanner.hasNextInt()
java.util.Scanner.hasNextInt(int)


Occurences of hasNextLong

hasNextLong occurences:
java.util.Scanner.hasNextLong()
java.util.Scanner.hasNextLong(int)


Occurences of hasNextShort

hasNextShort occurences:
java.util.Scanner.hasNextShort()
java.util.Scanner.hasNextShort(int)


Occurences of hasQueuedPredecessors

hasQueuedPredecessors occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.hasQueuedPredecessors()
java.util.concurrent.locks.AbstractQueuedSynchronizer.hasQueuedPredecessors()


Occurences of hasQueuedThread

hasQueuedThread occurences:
java.util.concurrent.locks.ReentrantLock.hasQueuedThread(java.lang.Thread)
java.util.concurrent.locks.ReentrantReadWriteLock.hasQueuedThread(java.lang.Thread)


Occurences of hasQueuedThreads

hasQueuedThreads occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.hasQueuedThreads()
java.util.concurrent.locks.AbstractQueuedSynchronizer.hasQueuedThreads()
java.util.concurrent.locks.ReentrantLock.hasQueuedThreads()
java.util.concurrent.locks.ReentrantReadWriteLock.hasQueuedThreads()
java.util.concurrent.Semaphore.hasQueuedThreads()


Occurences of hasRelation

hasRelation occurences:
javax.management.relation.RelationService.hasRelation(java.lang.String)
javax.management.relation.RelationServiceMBean.hasRelation(java.lang.String)


Occurences of hasSameRules

hasSameRules occurences:
java.util.SimpleTimeZone.hasSameRules(java.util.TimeZone)
java.util.TimeZone.hasSameRules(java.util.TimeZone)


Occurences of hasService

hasService occurences:
java.beans.beancontext.BeanContextServices.hasService(java.lang.Class)
java.beans.beancontext.BeanContextServicesSupport.hasService(java.lang.Class)


Occurences of hasText

hasText occurences:
javax.xml.stream.util.StreamReaderDelegate.hasText()
javax.xml.stream.XMLStreamReader.hasText()


Occurences of hasTileWriters

hasTileWriters occurences:
java.awt.image.BufferedImage.hasTileWriters()
java.awt.image.WritableRenderedImage.hasTileWriters()


Occurences of hasUniformLineMetrics

hasUniformLineMetrics occurences:
java.awt.Font.hasUniformLineMetrics()
java.awt.FontMetrics.hasUniformLineMetrics()


Occurences of hasWaiters

hasWaiters occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.hasWaiters(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.hasWaiters()
java.util.concurrent.locks.AbstractQueuedSynchronizer.hasWaiters(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.hasWaiters()
java.util.concurrent.locks.ReentrantLock.hasWaiters(java.util.concurrent.locks.Condition)
java.util.concurrent.locks.ReentrantReadWriteLock.hasWaiters(java.util.concurrent.locks.Condition)


Occurences of hasWaitingConsumer

hasWaitingConsumer occurences:
java.util.concurrent.LinkedTransferQueue.hasWaitingConsumer()
java.util.concurrent.TransferQueue.hasWaitingConsumer()


Occurences of has_no_active_member

has_no_active_member occurences:
org.omg.DynamicAny.DynUnionOperations.has_no_active_member()
org.omg.DynamicAny._DynUnionStub.has_no_active_member()


Occurences of header

header occurences:
javax.jws.WebParam.header()
javax.jws.WebResult.header()
javax.swing.plaf.basic.header


Occurences of HeadlessException (constructors)

HeadlessException (constructors) occurences:
java.awt.HeadlessException()
java.awt.HeadlessException(java.lang.String)


Occurences of headMap

headMap occurences:
java.util.concurrent.ConcurrentNavigableMap.headMap(java.lang.Object)
java.util.concurrent.ConcurrentNavigableMap.headMap(java.lang.Object, boolean)
java.util.concurrent.ConcurrentNavigableMap.headMap(K)
java.util.concurrent.ConcurrentNavigableMap.headMap(K, boolean)
java.util.concurrent.ConcurrentSkipListMap.headMap(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.headMap(java.lang.Object, boolean)
java.util.concurrent.ConcurrentSkipListMap.headMap(K)
java.util.concurrent.ConcurrentSkipListMap.headMap(K, boolean)
java.util.NavigableMap.headMap(java.lang.Object)
java.util.NavigableMap.headMap(java.lang.Object, boolean)
java.util.NavigableMap.headMap(K)
java.util.NavigableMap.headMap(K, boolean)
java.util.SortedMap.headMap(java.lang.Object)
java.util.SortedMap.headMap(K)
java.util.TreeMap.headMap(java.lang.Object)
java.util.TreeMap.headMap(java.lang.Object, boolean)
java.util.TreeMap.headMap(K)
java.util.TreeMap.headMap(K, boolean)


Occurences of headSet

headSet occurences:
java.util.concurrent.ConcurrentSkipListSet.headSet(E)
java.util.concurrent.ConcurrentSkipListSet.headSet(E, boolean)
java.util.concurrent.ConcurrentSkipListSet.headSet(java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.headSet(java.lang.Object, boolean)
java.util.NavigableSet.headSet(E)
java.util.NavigableSet.headSet(E, boolean)
java.util.NavigableSet.headSet(java.lang.Object)
java.util.NavigableSet.headSet(java.lang.Object, boolean)
java.util.SortedSet.headSet(E)
java.util.SortedSet.headSet(java.lang.Object)
java.util.TreeSet.headSet(E)
java.util.TreeSet.headSet(E, boolean)
java.util.TreeSet.headSet(java.lang.Object)
java.util.TreeSet.headSet(java.lang.Object, boolean)


Occurences of HEBREW

HEBREW occurences:
java.lang.HEBREW
java.lang.HEBREW


Occurences of HEIGHT

HEIGHT occurences:
java.awt.image.HEIGHT
javax.swing.HEIGHT
javax.swing.text.html.HEIGHT
javax.swing.text.html.HEIGHT


Occurences of height

height occurences:
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.geom.height
java.awt.height
java.awt.height
java.awt.height
java.awt.image.height
java.awt.image.height
javax.swing.Spring.height(java.awt.Component)


Occurences of Help

Help occurences:
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows..Help


Occurences of helpers

helpers occurences:
compact2.org.xml.sax.helpers
compact3.org.xml.sax.helpers
javax.xml.bind.helpers
org.xml.sax.helpers


Occurences of hide

hide occurences:
java.awt.Component.hide()
java.awt.Dialog.hide()
java.awt.Window.hide()
javax.swing.JComponent.hide()
javax.swing.JInternalFrame.hide()
javax.swing.plaf.basic.BasicComboPopup.hide()
javax.swing.plaf.basic.ComboPopup.hide()
javax.swing.Popup.hide()


Occurences of Hierarchy

Hierarchy occurences:
Class Hierarchy
Class Hierarchy
Class Hierarchy
Class Hierarchy
Class Hierarchy
Class Hierarchy


Occurences of hierarchyChanged

hierarchyChanged occurences:
java.awt.AWTEventMulticaster.hierarchyChanged(java.awt.event.HierarchyEvent)
java.awt.event.HierarchyListener.hierarchyChanged(java.awt.event.HierarchyEvent)


Occurences of HierarchyEvent (constructors)

HierarchyEvent (constructors) occurences:
java.awt.event.HierarchyEvent(java.awt.Component, int, java.awt.Component, java.awt.Container)
java.awt.event.HierarchyEvent(java.awt.Component, int, java.awt.Component, java.awt.Container, long)


Occurences of HIGH

HIGH occurences:
java.awt.HIGH
javax.print.attribute.standard.HIGH


Occurences of higher

higher occurences:
java.util.concurrent.ConcurrentSkipListSet.higher(E)
java.util.concurrent.ConcurrentSkipListSet.higher(java.lang.Object)
java.util.NavigableSet.higher(E)
java.util.NavigableSet.higher(java.lang.Object)
java.util.TreeSet.higher(E)
java.util.TreeSet.higher(java.lang.Object)


Occurences of higherEntry

higherEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.higherEntry(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.higherEntry(K)
java.util.NavigableMap.higherEntry(java.lang.Object)
java.util.NavigableMap.higherEntry(K)
java.util.TreeMap.higherEntry(java.lang.Object)
java.util.TreeMap.higherEntry(K)


Occurences of higherKey

higherKey occurences:
java.util.concurrent.ConcurrentSkipListMap.higherKey(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.higherKey(K)
java.util.NavigableMap.higherKey(java.lang.Object)
java.util.NavigableMap.higherKey(K)
java.util.TreeMap.higherKey(java.lang.Object)
java.util.TreeMap.higherKey(K)


Occurences of highestOneBit

highestOneBit occurences:
java.lang.Integer.highestOneBit(int)
java.lang.Long.highestOneBit(long)


Occurences of highlight

highlight occurences:
javax.swing.border.highlight
javax.swing.plaf.basic.highlight
javax.swing.plaf.basic.highlight
javax.swing.plaf.basic.highlight
javax.swing.plaf.basic.highlight
javax.swing.plaf.basic.highlight


Occurences of HIRAGANA

HIRAGANA occurences:
java.lang.HIRAGANA
java.lang.HIRAGANA


Occurences of hitTestChar

hitTestChar occurences:
java.awt.font.TextLayout.hitTestChar(float, float)
java.awt.font.TextLayout.hitTestChar(float, float, java.awt.geom.Rectangle2D)


Occurences of Holder (constructors)

Holder (constructors) occurences:
javax.xml.ws.Holder()
javax.xml.ws.Holder(java.lang.Object)
javax.xml.ws.Holder(T)


Occurences of HOLDING

HOLDING occurences:
org.omg.PortableInterceptor.HOLDING
org.omg.PortableServer.POAManagerPackage.HOLDING


Occurences of HORIZONTAL

HORIZONTAL occurences:
java.awt.HORIZONTAL
java.awt.HORIZONTAL
java.awt.HORIZONTAL
javax.accessibility.HORIZONTAL
javax.swing.HORIZONTAL


Occurences of HOURS

HOURS occurences:
java.time.temporal.HOURS
java.util.concurrent.HOURS
javax.xml.datatype.HOURS


Occurences of HOUR_OF_DAY

HOUR_OF_DAY occurences:
java.time.temporal.HOUR_OF_DAY
java.util.HOUR_OF_DAY


Occurences of How Classes are Found

How Classes are Found occurences:
How Classes are Found
How Classes are Found
How Classes are Found


Occurences of html

html occurences:
javax.swing.text.html
javax.swing.text.html.html
javax.swing.text.html.parser.html


Occurences of HTML

HTML occurences:
javax.swing.text.html.HTML
javax.swing.text.html.HTML
javax.tools.HTML


Occurences of HTMLDocument (constructors)

HTMLDocument (constructors) occurences:
javax.swing.text.html.HTMLDocument()
javax.swing.text.html.HTMLDocument(javax.swing.text.AbstractDocument.Content, javax.swing.text.html.StyleSheet)
javax.swing.text.html.HTMLDocument(javax.swing.text.html.StyleSheet)


Occurences of HTMLFrameHyperlinkEvent (constructors)

HTMLFrameHyperlinkEvent (constructors) occurences:
javax.swing.text.html.HTMLFrameHyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String)
javax.swing.text.html.HTMLFrameHyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String, java.lang.String)
javax.swing.text.html.HTMLFrameHyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String, javax.swing.text.Element, java.awt.event.InputEvent, java.lang.String)
javax.swing.text.html.HTMLFrameHyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String, javax.swing.text.Element, java.lang.String)
javax.swing.text.html.HTMLFrameHyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, javax.swing.text.Element, java.lang.String)


Occurences of HTMLReader

HTMLReader occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.HTMLReader(int)
javax.swing.text.html.HTMLDocument.HTMLReader.HTMLReader(int, int, int, javax.swing.text.html.HTML.Tag)


Occurences of HTMLWriter (constructors)

HTMLWriter (constructors) occurences:
javax.swing.text.html.HTMLWriter(java.io.Writer, javax.swing.text.html.HTMLDocument)
javax.swing.text.html.HTMLWriter(java.io.Writer, javax.swing.text.html.HTMLDocument, int, int)


Occurences of http

http occurences:
javax.xml.ws.http
javax.xml.ws.spi.http


Occurences of HTTP

HTTP occurences:
java.net.HTTP
javax.print.attribute.standard.HTTP


Occurences of HttpRetryException (constructors)

HttpRetryException (constructors) occurences:
java.net.HttpRetryException(java.lang.String, int)
java.net.HttpRetryException(java.lang.String, int, java.lang.String)


Occurences of HyperlinkEvent (constructors)

HyperlinkEvent (constructors) occurences:
javax.swing.event.HyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL)
javax.swing.event.HyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String)
javax.swing.event.HyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String, javax.swing.text.Element)
javax.swing.event.HyperlinkEvent(java.lang.Object, javax.swing.event.HyperlinkEvent.EventType, java.net.URL, java.lang.String, javax.swing.text.Element, java.awt.event.InputEvent)


Occurences of hypot

hypot occurences:
java.lang.Math.hypot(double, double)
java.lang.StrictMath.hypot(double, double)


Occurences of icon

icon occurences:
javax.swing.icon
javax.swing.plaf.basic.icon


Occurences of ICONIFIED

ICONIFIED occurences:
java.awt.ICONIFIED
javax.accessibility.ICONIFIED


Occurences of iconifyFrame

iconifyFrame occurences:
javax.swing.DefaultDesktopManager.iconifyFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.iconifyFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.iconifyFrame(javax.swing.JInternalFrame)


Occurences of ID

ID occurences:
javax.swing.text.html.ID
javax.swing.text.html.parser.ID
javax.xml.ws.ID
javax.xml.ws.soap.ID
javax.xml.ws.soap.ID


Occurences of id

id occurences:
com.sun.tools.attach.VirtualMachine.id()
com.sun.tools.attach.VirtualMachineDescriptor.id()
java.awt.id
java.awt.id
javax.naming.ldap.id
javax.xml.ws.spi.WebServiceFeatureAnnotation.id()
org.omg.CORBA.AnySeqHelper.id()
org.omg.CORBA.BooleanSeqHelper.id()
org.omg.CORBA.CharSeqHelper.id()
org.omg.CORBA.CompletionStatusHelper.id()
org.omg.CORBA.CurrentHelper.id()
org.omg.CORBA.DefinitionKindHelper.id()
org.omg.CORBA.DoubleSeqHelper.id()
org.omg.CORBA.FieldNameHelper.id()
org.omg.CORBA.FloatSeqHelper.id()
org.omg.CORBA.id
org.omg.CORBA.id
org.omg.CORBA.IdentifierHelper.id()
org.omg.CORBA.IDLTypeHelper.id()
org.omg.CORBA.LongLongSeqHelper.id()
org.omg.CORBA.LongSeqHelper.id()
org.omg.CORBA.NameValuePairHelper.id()
org.omg.CORBA.ObjectHelper.id()
org.omg.CORBA.OctetSeqHelper.id()
org.omg.CORBA.ParameterModeHelper.id()
org.omg.CORBA.PolicyErrorCodeHelper.id()
org.omg.CORBA.PolicyErrorHelper.id()
org.omg.CORBA.PolicyHelper.id()
org.omg.CORBA.PolicyListHelper.id()
org.omg.CORBA.PolicyTypeHelper.id()
org.omg.CORBA.RepositoryIdHelper.id()
org.omg.CORBA.ServiceDetailHelper.id()
org.omg.CORBA.ServiceInformationHelper.id()
org.omg.CORBA.SetOverrideTypeHelper.id()
org.omg.CORBA.ShortSeqHelper.id()
org.omg.CORBA.StringSeqHelper.id()
org.omg.CORBA.StringValueHelper.id()
org.omg.CORBA.StructMemberHelper.id()
org.omg.CORBA.TypeCode.id()
org.omg.CORBA.ULongLongSeqHelper.id()
org.omg.CORBA.ULongSeqHelper.id()
org.omg.CORBA.UnionMemberHelper.id()
org.omg.CORBA.UnknownUserExceptionHelper.id()
org.omg.CORBA.UShortSeqHelper.id()
org.omg.CORBA.ValueBaseHelper.id()
org.omg.CORBA.ValueMemberHelper.id()
org.omg.CORBA.VersionSpecHelper.id()
org.omg.CORBA.VisibilityHelper.id()
org.omg.CORBA.WCharSeqHelper.id()
org.omg.CORBA.WrongTransactionHelper.id()
org.omg.CORBA.WStringSeqHelper.id()
org.omg.CORBA.WStringValueHelper.id()
org.omg.CosNaming.BindingHelper.id()
org.omg.CosNaming.BindingIteratorHelper.id()
org.omg.CosNaming.BindingListHelper.id()
org.omg.CosNaming.BindingTypeHelper.id()
org.omg.CosNaming.id
org.omg.CosNaming.IstringHelper.id()
org.omg.CosNaming.NameComponentHelper.id()
org.omg.CosNaming.NameHelper.id()
org.omg.CosNaming.NamingContextExtHelper.id()
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.id()
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.id()
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.id()
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.id()
org.omg.CosNaming.NamingContextHelper.id()
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.id()
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.id()
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.id()
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.id()
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.id()
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.id()
org.omg.DynamicAny.AnySeqHelper.id()
org.omg.DynamicAny.DynAnyFactoryHelper.id()
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.id()
org.omg.DynamicAny.DynAnyHelper.id()
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.id()
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.id()
org.omg.DynamicAny.DynAnySeqHelper.id()
org.omg.DynamicAny.DynArrayHelper.id()
org.omg.DynamicAny.DynEnumHelper.id()
org.omg.DynamicAny.DynFixedHelper.id()
org.omg.DynamicAny.DynSequenceHelper.id()
org.omg.DynamicAny.DynStructHelper.id()
org.omg.DynamicAny.DynUnionHelper.id()
org.omg.DynamicAny.DynValueHelper.id()
org.omg.DynamicAny.FieldNameHelper.id()
org.omg.DynamicAny.id
org.omg.DynamicAny.id
org.omg.DynamicAny.NameDynAnyPairHelper.id()
org.omg.DynamicAny.NameDynAnyPairSeqHelper.id()
org.omg.DynamicAny.NameValuePairHelper.id()
org.omg.DynamicAny.NameValuePairSeqHelper.id()
org.omg.IOP.CodecFactoryHelper.id()
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.id()
org.omg.IOP.CodecPackage.FormatMismatchHelper.id()
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.id()
org.omg.IOP.CodecPackage.TypeMismatchHelper.id()
org.omg.IOP.ComponentIdHelper.id()
org.omg.IOP.IORHelper.id()
org.omg.IOP.MultipleComponentProfileHelper.id()
org.omg.IOP.ProfileIdHelper.id()
org.omg.IOP.ServiceContextHelper.id()
org.omg.IOP.ServiceContextListHelper.id()
org.omg.IOP.ServiceIdHelper.id()
org.omg.IOP.TaggedComponentHelper.id()
org.omg.IOP.TaggedProfileHelper.id()
org.omg.Messaging.SyncScopeHelper.id()
org.omg.PortableInterceptor.AdapterManagerIdHelper.id()
org.omg.PortableInterceptor.AdapterNameHelper.id()
org.omg.PortableInterceptor.AdapterStateHelper.id()
org.omg.PortableInterceptor.CurrentHelper.id()
org.omg.PortableInterceptor.ForwardRequestHelper.id()
org.omg.PortableInterceptor.InvalidSlotHelper.id()
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.id()
org.omg.PortableInterceptor.ObjectIdHelper.id()
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.id()
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.id()
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.id()
org.omg.PortableInterceptor.ORBIdHelper.id()
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.id()
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.id()
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.id()
org.omg.PortableInterceptor.ServerIdHelper.id()
org.omg.PortableServer.CurrentHelper.id()
org.omg.PortableServer.CurrentPackage.NoContextHelper.id()
org.omg.PortableServer.ForwardRequestHelper.id()
org.omg.PortableServer.POAHelper.id()
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.id()
org.omg.PortableServer.POAOperations.id()
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.id()
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.id()
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.id()
org.omg.PortableServer.POAPackage.NoServantHelper.id()
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.id()
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.id()
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.id()
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.id()
org.omg.PortableServer.POAPackage.WrongAdapterHelper.id()
org.omg.PortableServer.POAPackage.WrongPolicyHelper.id()
org.omg.PortableServer.ServantActivatorHelper.id()
org.omg.PortableServer.ServantLocatorHelper.id()


Occurences of IDENTIFIER

IDENTIFIER occurences:
com.sun.source.doctree.IDENTIFIER
com.sun.source.tree.IDENTIFIER


Occurences of IdentifierTree

IdentifierTree occurences:
com.sun.source.doctree.IdentifierTree
com.sun.source.tree.IdentifierTree


Occurences of identity

identity occurences:
java.lang.invoke.MethodHandles.identity(java.lang.Class)
java.util.function.DoubleUnaryOperator.identity()
java.util.function.Function.identity()
java.util.function.IntUnaryOperator.identity()
java.util.function.LongUnaryOperator.identity()
java.util.function.UnaryOperator.identity()


Occurences of Identity (constructors)

Identity (constructors) occurences:
java.security.Identity()
java.security.Identity(java.lang.String)
java.security.Identity(java.lang.String, java.security.IdentityScope)


Occurences of IdentityHashMap (constructors)

IdentityHashMap (constructors) occurences:
java.util.IdentityHashMap()
java.util.IdentityHashMap(int)
java.util.IdentityHashMap(java.util.Map)


Occurences of IdentityScope (constructors)

IdentityScope (constructors) occurences:
java.security.IdentityScope()
java.security.IdentityScope(java.lang.String)
java.security.IdentityScope(java.lang.String, java.security.IdentityScope)


Occurences of idlj

idlj occurences:
idlj
idlj


Occurences of IEEEremainder

IEEEremainder occurences:
java.lang.Math.IEEEremainder(double, double)
java.lang.StrictMath.IEEEremainder(double, double)


Occurences of ifPresent

ifPresent occurences:
java.util.Optional.ifPresent(java.util.function.Consumer)
java.util.OptionalDouble.ifPresent(java.util.function.DoubleConsumer)
java.util.OptionalInt.ifPresent(java.util.function.IntConsumer)
java.util.OptionalLong.ifPresent(java.util.function.LongConsumer)


Occurences of ignorableWhitespace

ignorableWhitespace occurences:
org.xml.sax.ContentHandler.ignorableWhitespace(char:A, int, int)
org.xml.sax.DocumentHandler.ignorableWhitespace(char:A, int, int)
org.xml.sax.HandlerBase.ignorableWhitespace(char:A, int, int)
org.xml.sax.helpers.DefaultHandler.ignorableWhitespace(char:A, int, int)
org.xml.sax.helpers.ParserAdapter.ignorableWhitespace(char:A, int, int)
org.xml.sax.helpers.XMLFilterImpl.ignorableWhitespace(char:A, int, int)
org.xml.sax.helpers.XMLReaderAdapter.ignorableWhitespace(char:A, int, int)


Occurences of IIOException (constructors)

IIOException (constructors) occurences:
javax.imageio.IIOException(java.lang.String)
javax.imageio.IIOException(java.lang.String, java.lang.Throwable)


Occurences of IIOImage (constructors)

IIOImage (constructors) occurences:
javax.imageio.IIOImage(java.awt.image.Raster, java.util.List, javax.imageio.metadata.IIOMetadata)
javax.imageio.IIOImage(java.awt.image.RenderedImage, java.util.List, javax.imageio.metadata.IIOMetadata)


Occurences of IIOInvalidTreeException (constructors)

IIOInvalidTreeException (constructors) occurences:
javax.imageio.metadata.IIOInvalidTreeException(java.lang.String, java.lang.Throwable, org.w3c.dom.Node)
javax.imageio.metadata.IIOInvalidTreeException(java.lang.String, org.w3c.dom.Node)


Occurences of IIOMetadata (constructors)

IIOMetadata (constructors) occurences:
javax.imageio.metadata.IIOMetadata()
javax.imageio.metadata.IIOMetadata(boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A)


Occurences of IIOMetadataFormatImpl (constructors)

IIOMetadataFormatImpl (constructors) occurences:
javax.imageio.metadata.IIOMetadataFormatImpl(java.lang.String, int)
javax.imageio.metadata.IIOMetadataFormatImpl(java.lang.String, int, int)


Occurences of IIOMetadataNode (constructors)

IIOMetadataNode (constructors) occurences:
javax.imageio.metadata.IIOMetadataNode()
javax.imageio.metadata.IIOMetadataNode(java.lang.String)


Occurences of IIOServiceProvider (constructors)

IIOServiceProvider (constructors) occurences:
javax.imageio.spi.IIOServiceProvider()
javax.imageio.spi.IIOServiceProvider(java.lang.String, java.lang.String)


Occurences of IllegalAccessError (constructors)

IllegalAccessError (constructors) occurences:
java.lang.IllegalAccessError()
java.lang.IllegalAccessError(java.lang.String)


Occurences of IllegalAccessException (constructors)

IllegalAccessException (constructors) occurences:
java.lang.IllegalAccessException()
java.lang.IllegalAccessException(java.lang.String)


Occurences of IllegalArgumentException (constructors)

IllegalArgumentException (constructors) occurences:
java.lang.IllegalArgumentException()
java.lang.IllegalArgumentException(java.lang.String)
java.lang.IllegalArgumentException(java.lang.String, java.lang.Throwable)
java.lang.IllegalArgumentException(java.lang.Throwable)


Occurences of IllegalBlockSizeException (constructors)

IllegalBlockSizeException (constructors) occurences:
javax.crypto.IllegalBlockSizeException()
javax.crypto.IllegalBlockSizeException(java.lang.String)


Occurences of IllegalClassFormatException (constructors)

IllegalClassFormatException (constructors) occurences:
java.lang.instrument.IllegalClassFormatException()
java.lang.instrument.IllegalClassFormatException(java.lang.String)


Occurences of IllegalComponentStateException (constructors)

IllegalComponentStateException (constructors) occurences:
java.awt.IllegalComponentStateException()
java.awt.IllegalComponentStateException(java.lang.String)


Occurences of IllegalConnectorArgumentsException (constructors)

IllegalConnectorArgumentsException (constructors) occurences:
com.sun.jdi.connect.IllegalConnectorArgumentsException(java.lang.String, java.lang.String)
com.sun.jdi.connect.IllegalConnectorArgumentsException(java.lang.String, java.util.List)


Occurences of IllegalMonitorStateException (constructors)

IllegalMonitorStateException (constructors) occurences:
java.lang.IllegalMonitorStateException()
java.lang.IllegalMonitorStateException(java.lang.String)


Occurences of IllegalPathStateException (constructors)

IllegalPathStateException (constructors) occurences:
java.awt.geom.IllegalPathStateException()
java.awt.geom.IllegalPathStateException(java.lang.String)


Occurences of IllegalStateException (constructors)

IllegalStateException (constructors) occurences:
java.lang.IllegalStateException()
java.lang.IllegalStateException(java.lang.String)
java.lang.IllegalStateException(java.lang.String, java.lang.Throwable)
java.lang.IllegalStateException(java.lang.Throwable)


Occurences of IllegalThreadStateException (constructors)

IllegalThreadStateException (constructors) occurences:
java.lang.IllegalThreadStateException()
java.lang.IllegalThreadStateException(java.lang.String)


Occurences of IllformedLocaleException (constructors)

IllformedLocaleException (constructors) occurences:
java.util.IllformedLocaleException()
java.util.IllformedLocaleException(java.lang.String)
java.util.IllformedLocaleException(java.lang.String, int)


Occurences of image

image occurences:
java.awt.image
javax.imageio.image


Occurences of imageComplete

imageComplete occurences:
java.awt.image.BufferedImageFilter.imageComplete(int)
java.awt.image.ImageConsumer.imageComplete(int)
java.awt.image.ImageFilter.imageComplete(int)
java.awt.image.PixelGrabber.imageComplete(int)
javax.imageio.event.IIOReadProgressListener.imageComplete(javax.imageio.ImageReader)
javax.imageio.event.IIOWriteProgressListener.imageComplete(javax.imageio.ImageWriter)


Occurences of ImageGraphicAttribute (constructors)

ImageGraphicAttribute (constructors) occurences:
java.awt.font.ImageGraphicAttribute(java.awt.Image, int)
java.awt.font.ImageGraphicAttribute(java.awt.Image, int, float, float)


Occurences of ImageIcon (constructors)

ImageIcon (constructors) occurences:
javax.swing.ImageIcon()
javax.swing.ImageIcon(byte:A)
javax.swing.ImageIcon(byte:A, java.lang.String)
javax.swing.ImageIcon(java.awt.Image)
javax.swing.ImageIcon(java.awt.Image, java.lang.String)
javax.swing.ImageIcon(java.lang.String)
javax.swing.ImageIcon(java.lang.String, java.lang.String)
javax.swing.ImageIcon(java.net.URL)
javax.swing.ImageIcon(java.net.URL, java.lang.String)


Occurences of ImageInputStreamSpi (constructors)

ImageInputStreamSpi (constructors) occurences:
javax.imageio.spi.ImageInputStreamSpi()
javax.imageio.spi.ImageInputStreamSpi(java.lang.String, java.lang.String, java.lang.Class)


Occurences of ImageOutputStreamSpi (constructors)

ImageOutputStreamSpi (constructors) occurences:
javax.imageio.spi.ImageOutputStreamSpi()
javax.imageio.spi.ImageOutputStreamSpi(java.lang.String, java.lang.String, java.lang.Class)


Occurences of imageProgress

imageProgress occurences:
javax.imageio.event.IIOReadProgressListener.imageProgress(javax.imageio.ImageReader, float)
javax.imageio.event.IIOWriteProgressListener.imageProgress(javax.imageio.ImageWriter, float)


Occurences of ImageReaderSpi (constructors)

ImageReaderSpi (constructors) occurences:
javax.imageio.spi.ImageReaderSpi()
javax.imageio.spi.ImageReaderSpi(java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, java.lang.String:A, java.lang.String, java.lang.Class:A, java.lang.String:A, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A)


Occurences of ImageReaderWriterSpi (constructors)

ImageReaderWriterSpi (constructors) occurences:
javax.imageio.spi.ImageReaderWriterSpi()
javax.imageio.spi.ImageReaderWriterSpi(java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, java.lang.String:A, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A)


Occurences of imageStarted

imageStarted occurences:
javax.imageio.event.IIOReadProgressListener.imageStarted(javax.imageio.ImageReader, int)
javax.imageio.event.IIOWriteProgressListener.imageStarted(javax.imageio.ImageWriter, int)


Occurences of ImageTranscoderSpi (constructors)

ImageTranscoderSpi (constructors) occurences:
javax.imageio.spi.ImageTranscoderSpi()
javax.imageio.spi.ImageTranscoderSpi(java.lang.String, java.lang.String)


Occurences of ImageTypeSpecifier (constructors)

ImageTypeSpecifier (constructors) occurences:
javax.imageio.ImageTypeSpecifier(java.awt.image.ColorModel, java.awt.image.SampleModel)
javax.imageio.ImageTypeSpecifier(java.awt.image.RenderedImage)


Occurences of imageUpdate

imageUpdate occurences:
java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int)
java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
javax.imageio.event.IIOReadUpdateListener.imageUpdate(javax.imageio.ImageReader, java.awt.image.BufferedImage, int, int, int, int, int, int, int:A)
javax.swing.AbstractButton.imageUpdate(java.awt.Image, int, int, int, int, int)
javax.swing.JLabel.imageUpdate(java.awt.Image, int, int, int, int, int)
javax.swing.JSlider.imageUpdate(java.awt.Image, int, int, int, int, int)


Occurences of ImageWriteParam (constructors)

ImageWriteParam (constructors) occurences:
javax.imageio.ImageWriteParam()
javax.imageio.ImageWriteParam(java.util.Locale)


Occurences of ImageWriterSpi (constructors)

ImageWriterSpi (constructors) occurences:
javax.imageio.spi.ImageWriterSpi()
javax.imageio.spi.ImageWriterSpi(java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, java.lang.String:A, java.lang.String, java.lang.Class:A, java.lang.String:A, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A, boolean, java.lang.String, java.lang.String, java.lang.String:A, java.lang.String:A)


Occurences of ImmutableDescriptor (constructors)

ImmutableDescriptor (constructors) occurences:
javax.management.ImmutableDescriptor(java.lang.String...)
javax.management.ImmutableDescriptor(java.lang.String:A, java.lang.Object:A)
javax.management.ImmutableDescriptor(java.util.Map)


Occurences of IMPERIAL_ARAMAIC

IMPERIAL_ARAMAIC occurences:
java.lang.IMPERIAL_ARAMAIC
java.lang.IMPERIAL_ARAMAIC


Occurences of implCloseChannel

implCloseChannel occurences:
java.nio.channels.spi.AbstractInterruptibleChannel.implCloseChannel()
java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel()


Occurences of implFlush

implFlush occurences:
java.nio.charset.CharsetDecoder.implFlush(java.nio.CharBuffer)
java.nio.charset.CharsetEncoder.implFlush(java.nio.ByteBuffer)


Occurences of IMPLIED

IMPLIED occurences:
javax.swing.text.html.IMPLIED
javax.swing.text.html.IMPLIED
javax.swing.text.html.parser.IMPLIED


Occurences of implies

implies occurences:
java.io.FilePermission.implies(java.security.Permission)
java.net.SocketPermission.implies(java.security.Permission)
java.net.URLPermission.implies(java.security.Permission)
java.security.AllPermission.implies(java.security.Permission)
java.security.BasicPermission.implies(java.security.Permission)
java.security.CodeSource.implies(java.security.CodeSource)
java.security.Permission.implies(java.security.Permission)
java.security.PermissionCollection.implies(java.security.Permission)
java.security.Permissions.implies(java.security.Permission)
java.security.Policy.implies(java.security.ProtectionDomain, java.security.Permission)
java.security.Principal.implies(javax.security.auth.Subject)
java.security.ProtectionDomain.implies(java.security.Permission)
java.security.UnresolvedPermission.implies(java.security.Permission)
java.util.PropertyPermission.implies(java.security.Permission)
javax.management.MBeanPermission.implies(java.security.Permission)
javax.management.MBeanServerPermission.implies(java.security.Permission)
javax.security.auth.kerberos.DelegationPermission.implies(java.security.Permission)
javax.security.auth.kerberos.ServicePermission.implies(java.security.Permission)
javax.security.auth.PrivateCredentialPermission.implies(java.security.Permission)


Occurences of implOnMalformedInput

implOnMalformedInput occurences:
java.nio.charset.CharsetDecoder.implOnMalformedInput(java.nio.charset.CodingErrorAction)
java.nio.charset.CharsetEncoder.implOnMalformedInput(java.nio.charset.CodingErrorAction)


Occurences of implOnUnmappableCharacter

implOnUnmappableCharacter occurences:
java.nio.charset.CharsetDecoder.implOnUnmappableCharacter(java.nio.charset.CodingErrorAction)
java.nio.charset.CharsetEncoder.implOnUnmappableCharacter(java.nio.charset.CodingErrorAction)


Occurences of implReplaceWith

implReplaceWith occurences:
java.nio.charset.CharsetDecoder.implReplaceWith(java.lang.String)
java.nio.charset.CharsetEncoder.implReplaceWith(byte:A)


Occurences of implReset

implReset occurences:
java.nio.charset.CharsetDecoder.implReset()
java.nio.charset.CharsetEncoder.implReset()


Occurences of importData

importData occurences:
javax.swing.TransferHandler.importData(javax.swing.JComponent, java.awt.datatransfer.Transferable)
javax.swing.TransferHandler.importData(javax.swing.TransferHandler.TransferSupport)


Occurences of IMP_LIMIT (constructors)

IMP_LIMIT (constructors) occurences:
org.omg.CORBA.IMP_LIMIT()
org.omg.CORBA.IMP_LIMIT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.IMP_LIMIT(java.lang.String)
org.omg.CORBA.IMP_LIMIT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of in

in occurences:
java.io.in
java.io.in
java.io.in
java.io.in
java.lang.in
java.lang.invoke.MethodHandles.Lookup.in(java.lang.Class)
javax.management.Query.in(javax.management.ValueExp, javax.management.ValueExp:A)


Occurences of INACTIVE

INACTIVE occurences:
org.omg.PortableInterceptor.INACTIVE
org.omg.PortableServer.POAManagerPackage.INACTIVE


Occurences of inactiveGroup

inactiveGroup occurences:
java.rmi.activation.ActivationGroup.inactiveGroup()
java.rmi.activation.ActivationMonitor.inactiveGroup(java.rmi.activation.ActivationGroupID, long)


Occurences of inactiveObject

inactiveObject occurences:
java.rmi.activation.ActivationGroup.inactiveObject(java.rmi.activation.ActivationID)
java.rmi.activation.ActivationMonitor.inactiveObject(java.rmi.activation.ActivationID)


Occurences of incarnate

incarnate occurences:
org.omg.PortableServer.ServantActivatorOperations.incarnate(byte:A, org.omg.PortableServer.POA)
org.omg.PortableServer._ServantActivatorStub.incarnate(byte:A, org.omg.PortableServer.POA)


Occurences of INCH

INCH occurences:
javax.print.attribute.INCH
javax.print.attribute.standard.INCH


Occurences of IncompatibleClassChangeError (constructors)

IncompatibleClassChangeError (constructors) occurences:
java.lang.IncompatibleClassChangeError()
java.lang.IncompatibleClassChangeError(java.lang.String)


Occurences of IncompatibleThreadStateException (constructors)

IncompatibleThreadStateException (constructors) occurences:
com.sun.jdi.IncompatibleThreadStateException()
com.sun.jdi.IncompatibleThreadStateException(java.lang.String)


Occurences of InconsistentDebugInfoException (constructors)

InconsistentDebugInfoException (constructors) occurences:
com.sun.jdi.InconsistentDebugInfoException()
com.sun.jdi.InconsistentDebugInfoException(java.lang.String)


Occurences of InconsistentTypeCode

InconsistentTypeCode occurences:
org.omg.CORBA.ORBPackage.InconsistentTypeCode
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode


Occurences of InconsistentTypeCode (constructors)

InconsistentTypeCode (constructors) occurences:
org.omg.CORBA.ORBPackage.InconsistentTypeCode()
org.omg.CORBA.ORBPackage.InconsistentTypeCode(java.lang.String)
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode()
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode(java.lang.String)


Occurences of incrementAndGet

incrementAndGet occurences:
java.util.concurrent.atomic.AtomicInteger.incrementAndGet()
java.util.concurrent.atomic.AtomicIntegerArray.incrementAndGet(int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.incrementAndGet(java.lang.Object)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.incrementAndGet(T)
java.util.concurrent.atomic.AtomicLong.incrementAndGet()
java.util.concurrent.atomic.AtomicLongArray.incrementAndGet(int)
java.util.concurrent.atomic.AtomicLongFieldUpdater.incrementAndGet(java.lang.Object)
java.util.concurrent.atomic.AtomicLongFieldUpdater.incrementAndGet(T)


Occurences of incrementExact

incrementExact occurences:
java.lang.Math.incrementExact(int)
java.lang.Math.incrementExact(long)


Occurences of inDaylightTime

inDaylightTime occurences:
java.util.SimpleTimeZone.inDaylightTime(java.util.Date)
java.util.TimeZone.inDaylightTime(java.util.Date)


Occurences of INDEFINITE_LIFETIME

INDEFINITE_LIFETIME occurences:
org.ietf.jgss.INDEFINITE_LIFETIME
org.ietf.jgss.INDEFINITE_LIFETIME


Occurences of INDENT

INDENT occurences:
javax.swing.INDENT
javax.xml.transform.INDENT


Occurences of INDETERMINATE

INDETERMINATE occurences:
javax.accessibility.INDETERMINATE
javax.xml.datatype.INDETERMINATE


Occurences of Index

Index occurences:
Index
Index
Index
Index
Index


Occurences of IndexColorModel (constructors)

IndexColorModel (constructors) occurences:
java.awt.image.IndexColorModel(int, int, byte:A, byte:A, byte:A)
java.awt.image.IndexColorModel(int, int, byte:A, byte:A, byte:A, byte:A)
java.awt.image.IndexColorModel(int, int, byte:A, byte:A, byte:A, int)
java.awt.image.IndexColorModel(int, int, byte:A, int, boolean)
java.awt.image.IndexColorModel(int, int, byte:A, int, boolean, int)
java.awt.image.IndexColorModel(int, int, int:A, int, boolean, int, int)
java.awt.image.IndexColorModel(int, int, int:A, int, int, java.math.BigInteger)


Occurences of IndexedPropertyDescriptor (constructors)

IndexedPropertyDescriptor (constructors) occurences:
java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class)
java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method)


Occurences of IndexOutOfBoundsException (constructors)

IndexOutOfBoundsException (constructors) occurences:
java.lang.IndexOutOfBoundsException()
java.lang.IndexOutOfBoundsException(java.lang.String)


Occurences of InetSocketAddress (constructors)

InetSocketAddress (constructors) occurences:
java.net.InetSocketAddress(int)
java.net.InetSocketAddress(java.lang.String, int)
java.net.InetSocketAddress(java.net.InetAddress, int)


Occurences of inf

inf occurences:
java.util.zip.inf
java.util.zip.inf


Occurences of inferBinaryName

inferBinaryName occurences:
javax.tools.ForwardingJavaFileManager.inferBinaryName(javax.tools.JavaFileManager.Location, javax.tools.JavaFileObject)
javax.tools.JavaFileManager.inferBinaryName(javax.tools.JavaFileManager.Location, javax.tools.JavaFileObject)


Occurences of inflate

inflate occurences:
java.util.zip.Inflater.inflate(byte:A)
java.util.zip.Inflater.inflate(byte:A, int, int)


Occurences of Inflater (constructors)

Inflater (constructors) occurences:
java.util.zip.Inflater()
java.util.zip.Inflater(boolean)


Occurences of InflaterInputStream (constructors)

InflaterInputStream (constructors) occurences:
java.util.zip.InflaterInputStream(java.io.InputStream)
java.util.zip.InflaterInputStream(java.io.InputStream, java.util.zip.Inflater)
java.util.zip.InflaterInputStream(java.io.InputStream, java.util.zip.Inflater, int)


Occurences of InflaterOutputStream (constructors)

InflaterOutputStream (constructors) occurences:
java.util.zip.InflaterOutputStream(java.io.OutputStream)
java.util.zip.InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater)
java.util.zip.InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater, int)


Occurences of INFO

INFO occurences:
java.awt.INFO
java.awt.INFO
java.util.logging.INFO
javax.management.INFO


Occurences of info

info occurences:
java.awt.info
java.util.logging.Logger.info(java.lang.String)
java.util.logging.Logger.info(java.util.function.Supplier)


Occurences of Info

Info occurences:
javax.sound.midi.MidiDevice.Info.Info(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
javax.sound.sampled.DataLine.Info.Info(java.lang.Class, javax.sound.sampled.AudioFormat)
javax.sound.sampled.DataLine.Info.Info(java.lang.Class, javax.sound.sampled.AudioFormat, int)
javax.sound.sampled.DataLine.Info.Info(java.lang.Class, javax.sound.sampled.AudioFormat:A, int, int)
javax.sound.sampled.Line.Info.Info(java.lang.Class)
javax.sound.sampled.Mixer.Info.Info(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
javax.sound.sampled.Port.Info.Info(java.lang.Class, java.lang.String, boolean)


Occurences of INFORMATION

INFORMATION occurences:
javax.security.auth.callback.INFORMATION
javax.security.auth.callback.INFORMATION


Occurences of INHERIT

INHERIT occurences:
java.lang.INHERIT
java.lang.INHERIT


Occurences of inheritedChannel

inheritedChannel occurences:
java.lang.System.inheritedChannel()
java.nio.channels.spi.SelectorProvider.inheritedChannel()


Occurences of init

init occurences:
com.sun.source.util.Plugin.init(com.sun.source.util.JavacTask, java.lang.String...)
java.applet.Applet.init()
java.security.AlgorithmParameterGenerator.init(int)
java.security.AlgorithmParameterGenerator.init(int, java.security.SecureRandom)
java.security.AlgorithmParameterGenerator.init(java.security.spec.AlgorithmParameterSpec)
java.security.AlgorithmParameterGenerator.init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
java.security.AlgorithmParameters.init(byte:A)
java.security.AlgorithmParameters.init(byte:A, java.lang.String)
java.security.AlgorithmParameters.init(java.security.spec.AlgorithmParameterSpec)
java.security.cert.CertPathChecker.init(boolean)
java.security.cert.PKIXCertPathChecker.init(boolean)
javax.annotation.processing.AbstractProcessor.init(javax.annotation.processing.ProcessingEnvironment)
javax.annotation.processing.Processor.init(javax.annotation.processing.ProcessingEnvironment)
javax.crypto.Cipher.init(int, java.security.cert.Certificate)
javax.crypto.Cipher.init(int, java.security.cert.Certificate, java.security.SecureRandom)
javax.crypto.Cipher.init(int, java.security.Key)
javax.crypto.Cipher.init(int, java.security.Key, java.security.AlgorithmParameters)
javax.crypto.Cipher.init(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom)
javax.crypto.Cipher.init(int, java.security.Key, java.security.SecureRandom)
javax.crypto.Cipher.init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.crypto.Cipher.init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.ExemptionMechanism.init(java.security.Key)
javax.crypto.ExemptionMechanism.init(java.security.Key, java.security.AlgorithmParameters)
javax.crypto.ExemptionMechanism.init(java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.crypto.KeyAgreement.init(java.security.Key)
javax.crypto.KeyAgreement.init(java.security.Key, java.security.SecureRandom)
javax.crypto.KeyAgreement.init(java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.crypto.KeyAgreement.init(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.KeyGenerator.init(int)
javax.crypto.KeyGenerator.init(int, java.security.SecureRandom)
javax.crypto.KeyGenerator.init(java.security.SecureRandom)
javax.crypto.KeyGenerator.init(java.security.spec.AlgorithmParameterSpec)
javax.crypto.KeyGenerator.init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.crypto.Mac.init(java.security.Key)
javax.crypto.Mac.init(java.security.Key, java.security.spec.AlgorithmParameterSpec)
javax.naming.InitialContext.init(java.util.Hashtable)
javax.net.ssl.KeyManagerFactory.init(java.security.KeyStore, char:A)
javax.net.ssl.KeyManagerFactory.init(javax.net.ssl.ManagerFactoryParameters)
javax.net.ssl.SSLContext.init(javax.net.ssl.KeyManager:A, javax.net.ssl.TrustManager:A, java.security.SecureRandom)
javax.net.ssl.TrustManagerFactory.init(java.security.KeyStore)
javax.net.ssl.TrustManagerFactory.init(javax.net.ssl.ManagerFactoryParameters)
javax.swing.AbstractButton.init(java.lang.String, javax.swing.Icon)
javax.swing.JMenuItem.init(java.lang.String, javax.swing.Icon)
javax.swing.undo.StateEdit.init(javax.swing.undo.StateEditable, java.lang.String)
javax.xml.crypto.dsig.TransformService.init(javax.xml.crypto.dsig.spec.TransformParameterSpec)
javax.xml.crypto.dsig.TransformService.init(javax.xml.crypto.XMLStructure, javax.xml.crypto.XMLCryptoContext)
org.omg.CORBA.ORB.init()
org.omg.CORBA.ORB.init(java.applet.Applet, java.util.Properties)
org.omg.CORBA.ORB.init(java.lang.String:A, java.util.Properties)


Occurences of initCause

initCause occurences:
java.lang.Throwable.initCause(java.lang.Throwable)
javax.naming.NamingException.initCause(java.lang.Throwable)
javax.security.sasl.SaslException.initCause(java.lang.Throwable)
javax.xml.soap.SOAPException.initCause(java.lang.Throwable)
javax.xml.transform.TransformerException.initCause(java.lang.Throwable)


Occurences of initClassDefaults

initClassDefaults occurences:
javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults)
javax.swing.plaf.metal.MetalLookAndFeel.initClassDefaults(javax.swing.UIDefaults)


Occurences of initComponentDefaults

initComponentDefaults occurences:
javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(javax.swing.UIDefaults)
javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(javax.swing.UIDefaults)


Occurences of InitialContext (constructors)

InitialContext (constructors) occurences:
javax.naming.InitialContext()
javax.naming.InitialContext(boolean)
javax.naming.InitialContext(java.util.Hashtable)


Occurences of InitialDirContext (constructors)

InitialDirContext (constructors) occurences:
javax.naming.directory.InitialDirContext()
javax.naming.directory.InitialDirContext(boolean)
javax.naming.directory.InitialDirContext(java.util.Hashtable)


Occurences of initialize

initialize occurences:
java.beans.AppletInitializer.initialize(java.applet.Applet, java.beans.beancontext.BeanContext)
java.beans.beancontext.BeanContextServicesSupport.initialize()
java.beans.beancontext.BeanContextSupport.initialize()
java.beans.DefaultPersistenceDelegate.initialize(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder)
java.beans.PersistenceDelegate.initialize(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder)
java.security.interfaces.DSAKeyPairGenerator.initialize(int, boolean, java.security.SecureRandom)
java.security.interfaces.DSAKeyPairGenerator.initialize(java.security.interfaces.DSAParams, java.security.SecureRandom)
java.security.KeyPairGenerator.initialize(int)
java.security.KeyPairGenerator.initialize(int, java.security.SecureRandom)
java.security.KeyPairGenerator.initialize(java.security.spec.AlgorithmParameterSpec)
java.security.KeyPairGenerator.initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
java.security.KeyPairGeneratorSpi.initialize(int, java.security.SecureRandom)
java.security.KeyPairGeneratorSpi.initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
javax.security.auth.spi.LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
javax.swing.LookAndFeel.initialize()
javax.swing.plaf.basic.BasicLookAndFeel.initialize()
javax.swing.plaf.nimbus.NimbusLookAndFeel.initialize()
javax.swing.plaf.synth.SynthLookAndFeel.initialize()


Occurences of INITIALIZE (constructors)

INITIALIZE (constructors) occurences:
org.omg.CORBA.INITIALIZE()
org.omg.CORBA.INITIALIZE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INITIALIZE(java.lang.String)
org.omg.CORBA.INITIALIZE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of initializeBeanContextResources

initializeBeanContextResources occurences:
java.beans.beancontext.BeanContextChildSupport.initializeBeanContextResources()
java.beans.beancontext.BeanContextServicesSupport.initializeBeanContextResources()


Occurences of initializeLocalVars

initializeLocalVars occurences:
javax.swing.JTable.initializeLocalVars()
javax.swing.table.JTableHeader.initializeLocalVars()


Occurences of InitialLdapContext (constructors)

InitialLdapContext (constructors) occurences:
javax.naming.ldap.InitialLdapContext()
javax.naming.ldap.InitialLdapContext(java.util.Hashtable, javax.naming.ldap.Control:A)


Occurences of initialValue

initialValue occurences:
java.lang.ThreadLocal.initialValue()
javax.swing.initialValue


Occurences of initParams

initParams occurences:
javax.jws.soap.SOAPMessageHandler.initParams()
javax.sql.rowset.BaseRowSet.initParams()


Occurences of initSecContext

initSecContext occurences:
org.ietf.jgss.GSSContext.initSecContext(byte:A, int, int)
org.ietf.jgss.GSSContext.initSecContext(java.io.InputStream, java.io.OutputStream)


Occurences of initSign

initSign occurences:
java.security.Signature.initSign(java.security.PrivateKey)
java.security.Signature.initSign(java.security.PrivateKey, java.security.SecureRandom)


Occurences of initSystemColorDefaults

initSystemColorDefaults occurences:
javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults)
javax.swing.plaf.metal.MetalLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults)


Occurences of initVerify

initVerify occurences:
java.security.Signature.initVerify(java.security.cert.Certificate)
java.security.Signature.initVerify(java.security.PublicKey)


Occurences of inlineTags

inlineTags occurences:
com.sun.javadoc.Doc.inlineTags()
com.sun.javadoc.Tag.inlineTags()


Occurences of innerClasses

innerClasses occurences:
com.sun.javadoc.ClassDoc.innerClasses()
com.sun.javadoc.ClassDoc.innerClasses(boolean)


Occurences of input

input occurences:
javax.imageio.input
javax.xml.ws.Action.input()


Occurences of InputMethodEvent (constructors)

InputMethodEvent (constructors) occurences:
java.awt.event.InputMethodEvent(java.awt.Component, int, java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)
java.awt.event.InputMethodEvent(java.awt.Component, int, java.text.AttributedCharacterIterator, int, java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)
java.awt.event.InputMethodEvent(java.awt.Component, int, long, java.text.AttributedCharacterIterator, int, java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)


Occurences of InputMethodHighlight (constructors)

InputMethodHighlight (constructors) occurences:
java.awt.im.InputMethodHighlight(boolean, int)
java.awt.im.InputMethodHighlight(boolean, int, int)
java.awt.im.InputMethodHighlight(boolean, int, int, java.util.Map)


Occurences of inputMethodTextChanged

inputMethodTextChanged occurences:
java.awt.AWTEventMulticaster.inputMethodTextChanged(java.awt.event.InputMethodEvent)
java.awt.event.InputMethodListener.inputMethodTextChanged(java.awt.event.InputMethodEvent)


Occurences of InputMismatchException (constructors)

InputMismatchException (constructors) occurences:
java.util.InputMismatchException()
java.util.InputMismatchException(java.lang.String)


Occurences of InputSource (constructors)

InputSource (constructors) occurences:
org.xml.sax.InputSource()
org.xml.sax.InputSource(java.io.InputStream)
org.xml.sax.InputSource(java.io.Reader)
org.xml.sax.InputSource(java.lang.String)


Occurences of InputStream

InputStream occurences:
java.io.InputStream
org.omg.CORBA.portable.InputStream
org.omg.CORBA_2_3.portable.InputStream


Occurences of InputStream (constructors)

InputStream (constructors) occurences:
java.io.InputStream()
org.omg.CORBA.portable.InputStream()
org.omg.CORBA_2_3.portable.InputStream()


Occurences of InputStreamReader (constructors)

InputStreamReader (constructors) occurences:
java.io.InputStreamReader(java.io.InputStream)
java.io.InputStreamReader(java.io.InputStream, java.lang.String)
java.io.InputStreamReader(java.io.InputStream, java.nio.charset.Charset)
java.io.InputStreamReader(java.io.InputStream, java.nio.charset.CharsetDecoder)


Occurences of INSCRIPTIONAL_PAHLAVI

INSCRIPTIONAL_PAHLAVI occurences:
java.lang.INSCRIPTIONAL_PAHLAVI
java.lang.INSCRIPTIONAL_PAHLAVI


Occurences of INSCRIPTIONAL_PARTHIAN

INSCRIPTIONAL_PARTHIAN occurences:
java.lang.INSCRIPTIONAL_PARTHIAN
java.lang.INSCRIPTIONAL_PARTHIAN


Occurences of INSERT

INSERT occurences:
java.awt.INSERT
javax.accessibility.INSERT
javax.swing.event.INSERT
javax.swing.event.INSERT
javax.swing.INSERT


Occurences of insert

insert occurences:
java.awt.Choice.insert(java.lang.String, int)
java.awt.Menu.insert(java.awt.MenuItem, int)
java.awt.Menu.insert(java.lang.String, int)
java.awt.TextArea.insert(java.lang.String, int)
java.lang.StringBuffer.insert(int, boolean)
java.lang.StringBuffer.insert(int, char)
java.lang.StringBuffer.insert(int, char:A)
java.lang.StringBuffer.insert(int, char:A, int, int)
java.lang.StringBuffer.insert(int, double)
java.lang.StringBuffer.insert(int, float)
java.lang.StringBuffer.insert(int, int)
java.lang.StringBuffer.insert(int, java.lang.CharSequence)
java.lang.StringBuffer.insert(int, java.lang.CharSequence, int, int)
java.lang.StringBuffer.insert(int, java.lang.Object)
java.lang.StringBuffer.insert(int, java.lang.String)
java.lang.StringBuffer.insert(int, long)
java.lang.StringBuilder.insert(int, boolean)
java.lang.StringBuilder.insert(int, char)
java.lang.StringBuilder.insert(int, char:A)
java.lang.StringBuilder.insert(int, char:A, int, int)
java.lang.StringBuilder.insert(int, double)
java.lang.StringBuilder.insert(int, float)
java.lang.StringBuilder.insert(int, int)
java.lang.StringBuilder.insert(int, java.lang.CharSequence)
java.lang.StringBuilder.insert(int, java.lang.CharSequence, int, int)
java.lang.StringBuilder.insert(int, java.lang.Object)
java.lang.StringBuilder.insert(int, java.lang.String)
java.lang.StringBuilder.insert(int, long)
javax.swing.JMenu.insert(java.lang.String, int)
javax.swing.JMenu.insert(javax.swing.Action, int)
javax.swing.JMenu.insert(javax.swing.JMenuItem, int)
javax.swing.JPopupMenu.insert(java.awt.Component, int)
javax.swing.JPopupMenu.insert(javax.swing.Action, int)
javax.swing.JTextArea.insert(java.lang.String, int)
javax.swing.text.DefaultStyledDocument.insert(int, javax.swing.text.DefaultStyledDocument.ElementSpec:A)
javax.swing.text.DefaultStyledDocument.ElementBuffer.insert(int, int, javax.swing.text.DefaultStyledDocument.ElementSpec:A, javax.swing.text.AbstractDocument.DefaultDocumentEvent)
javax.swing.text.html.HTMLDocument.insert(int, javax.swing.text.DefaultStyledDocument.ElementSpec:A)
javax.swing.text.View.insert(int, javax.swing.text.View)
javax.swing.tree.DefaultMutableTreeNode.insert(javax.swing.tree.MutableTreeNode, int)
javax.swing.tree.MutableTreeNode.insert(javax.swing.tree.MutableTreeNode, int)
org.omg.CORBA.AnySeqHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Any:A)
org.omg.CORBA.BooleanSeqHelper.insert(org.omg.CORBA.Any, boolean:A)
org.omg.CORBA.CharSeqHelper.insert(org.omg.CORBA.Any, char:A)
org.omg.CORBA.CompletionStatusHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.CurrentHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Current)
org.omg.CORBA.DefinitionKindHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.DefinitionKind)
org.omg.CORBA.DoubleSeqHelper.insert(org.omg.CORBA.Any, double:A)
org.omg.CORBA.FieldNameHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CORBA.FloatSeqHelper.insert(org.omg.CORBA.Any, float:A)
org.omg.CORBA.IdentifierHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CORBA.IDLTypeHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.IDLType)
org.omg.CORBA.LongLongSeqHelper.insert(org.omg.CORBA.Any, long:A)
org.omg.CORBA.LongSeqHelper.insert(org.omg.CORBA.Any, int:A)
org.omg.CORBA.NameValuePairHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.NameValuePair)
org.omg.CORBA.ObjectHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Object)
org.omg.CORBA.OctetSeqHelper.insert(org.omg.CORBA.Any, byte:A)
org.omg.CORBA.ParameterModeHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.ParameterMode)
org.omg.CORBA.PolicyErrorCodeHelper.insert(org.omg.CORBA.Any, short)
org.omg.CORBA.PolicyErrorHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.PolicyError)
org.omg.CORBA.PolicyHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Policy)
org.omg.CORBA.PolicyListHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Policy:A)
org.omg.CORBA.PolicyTypeHelper.insert(org.omg.CORBA.Any, int)
org.omg.CORBA.RepositoryIdHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CORBA.ServiceDetailHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.ServiceDetail)
org.omg.CORBA.ServiceInformationHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.ServiceInformation)
org.omg.CORBA.SetOverrideTypeHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.SetOverrideType)
org.omg.CORBA.ShortSeqHelper.insert(org.omg.CORBA.Any, short:A)
org.omg.CORBA.StringSeqHelper.insert(org.omg.CORBA.Any, java.lang.String:A)
org.omg.CORBA.StringValueHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CORBA.StructMemberHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.StructMember)
org.omg.CORBA.ULongLongSeqHelper.insert(org.omg.CORBA.Any, long:A)
org.omg.CORBA.ULongSeqHelper.insert(org.omg.CORBA.Any, int:A)
org.omg.CORBA.UnionMemberHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.UnionMember)
org.omg.CORBA.UnknownUserExceptionHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.UnknownUserException)
org.omg.CORBA.UShortSeqHelper.insert(org.omg.CORBA.Any, short:A)
org.omg.CORBA.ValueBaseHelper.insert(org.omg.CORBA.Any, java.io.Serializable)
org.omg.CORBA.ValueMemberHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.ValueMember)
org.omg.CORBA.VersionSpecHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CORBA.VisibilityHelper.insert(org.omg.CORBA.Any, short)
org.omg.CORBA.WCharSeqHelper.insert(org.omg.CORBA.Any, char:A)
org.omg.CORBA.WrongTransactionHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.WrongTransaction)
org.omg.CORBA.WStringSeqHelper.insert(org.omg.CORBA.Any, java.lang.String:A)
org.omg.CORBA.WStringValueHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CosNaming.BindingHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.Binding)
org.omg.CosNaming.BindingIteratorHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.BindingIterator)
org.omg.CosNaming.BindingListHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.Binding:A)
org.omg.CosNaming.BindingTypeHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.BindingType)
org.omg.CosNaming.IstringHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CosNaming.NameComponentHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NameComponent)
org.omg.CosNaming.NameHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming.NamingContextExtHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextExt)
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextExtPackage.InvalidAddress)
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.CosNaming.NamingContextHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContext)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.AlreadyBound)
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.CannotProceed)
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.InvalidName)
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.NotEmpty)
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.NotFound)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.insert(org.omg.CORBA.Any, org.omg.CosNaming.NamingContextPackage.NotFoundReason)
org.omg.DynamicAny.AnySeqHelper.insert(org.omg.CORBA.Any, org.omg.CORBA.Any:A)
org.omg.DynamicAny.DynAnyFactoryHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAnyFactory)
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode)
org.omg.DynamicAny.DynAnyHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAny)
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAnyPackage.InvalidValue)
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAnyPackage.TypeMismatch)
org.omg.DynamicAny.DynAnySeqHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynAny:A)
org.omg.DynamicAny.DynArrayHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynArray)
org.omg.DynamicAny.DynEnumHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynEnum)
org.omg.DynamicAny.DynFixedHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynFixed)
org.omg.DynamicAny.DynSequenceHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynSequence)
org.omg.DynamicAny.DynStructHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynStruct)
org.omg.DynamicAny.DynUnionHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynUnion)
org.omg.DynamicAny.DynValueHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.DynValue)
org.omg.DynamicAny.FieldNameHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.DynamicAny.NameDynAnyPairHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.NameDynAnyPair)
org.omg.DynamicAny.NameDynAnyPairSeqHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.NameDynAnyPair:A)
org.omg.DynamicAny.NameValuePairHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.NameValuePair)
org.omg.DynamicAny.NameValuePairSeqHelper.insert(org.omg.CORBA.Any, org.omg.DynamicAny.NameValuePair:A)
org.omg.IOP.CodecFactoryHelper.insert(org.omg.CORBA.Any, org.omg.IOP.CodecFactory)
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.insert(org.omg.CORBA.Any, org.omg.IOP.CodecFactoryPackage.UnknownEncoding)
org.omg.IOP.CodecPackage.FormatMismatchHelper.insert(org.omg.CORBA.Any, org.omg.IOP.CodecPackage.FormatMismatch)
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.insert(org.omg.CORBA.Any, org.omg.IOP.CodecPackage.InvalidTypeForEncoding)
org.omg.IOP.CodecPackage.TypeMismatchHelper.insert(org.omg.CORBA.Any, org.omg.IOP.CodecPackage.TypeMismatch)
org.omg.IOP.ComponentIdHelper.insert(org.omg.CORBA.Any, int)
org.omg.IOP.IORHelper.insert(org.omg.CORBA.Any, org.omg.IOP.IOR)
org.omg.IOP.MultipleComponentProfileHelper.insert(org.omg.CORBA.Any, org.omg.IOP.TaggedComponent:A)
org.omg.IOP.ProfileIdHelper.insert(org.omg.CORBA.Any, int)
org.omg.IOP.ServiceContextHelper.insert(org.omg.CORBA.Any, org.omg.IOP.ServiceContext)
org.omg.IOP.ServiceContextListHelper.insert(org.omg.CORBA.Any, org.omg.IOP.ServiceContext:A)
org.omg.IOP.ServiceIdHelper.insert(org.omg.CORBA.Any, int)
org.omg.IOP.TaggedComponentHelper.insert(org.omg.CORBA.Any, org.omg.IOP.TaggedComponent)
org.omg.IOP.TaggedProfileHelper.insert(org.omg.CORBA.Any, org.omg.IOP.TaggedProfile)
org.omg.Messaging.SyncScopeHelper.insert(org.omg.CORBA.Any, short)
org.omg.PortableInterceptor.AdapterManagerIdHelper.insert(org.omg.CORBA.Any, int)
org.omg.PortableInterceptor.AdapterNameHelper.insert(org.omg.CORBA.Any, java.lang.String:A)
org.omg.PortableInterceptor.AdapterStateHelper.insert(org.omg.CORBA.Any, short)
org.omg.PortableInterceptor.CurrentHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.Current)
org.omg.PortableInterceptor.ForwardRequestHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ForwardRequest)
org.omg.PortableInterceptor.InvalidSlotHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.InvalidSlot)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.IORInterceptor_3_0)
org.omg.PortableInterceptor.ObjectIdHelper.insert(org.omg.CORBA.Any, byte:A)
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ObjectReferenceFactory)
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ObjectReferenceTemplate)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ObjectReferenceTemplate:A)
org.omg.PortableInterceptor.ORBIdHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName)
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.insert(org.omg.CORBA.Any, org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName)
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.PortableInterceptor.ServerIdHelper.insert(org.omg.CORBA.Any, java.lang.String)
org.omg.PortableServer.CurrentHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.Current)
org.omg.PortableServer.CurrentPackage.NoContextHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.CurrentPackage.NoContext)
org.omg.PortableServer.ForwardRequestHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.ForwardRequest)
org.omg.PortableServer.POAHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POA)
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAManagerPackage.AdapterInactive)
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.AdapterAlreadyExists)
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.AdapterNonExistent)
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.InvalidPolicy)
org.omg.PortableServer.POAPackage.NoServantHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.NoServant)
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.ObjectAlreadyActive)
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.ObjectNotActive)
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.ServantAlreadyActive)
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.ServantNotActive)
org.omg.PortableServer.POAPackage.WrongAdapterHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.WrongAdapter)
org.omg.PortableServer.POAPackage.WrongPolicyHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.POAPackage.WrongPolicy)
org.omg.PortableServer.ServantActivatorHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.ServantActivator)
org.omg.PortableServer.ServantLocatorHelper.insert(org.omg.CORBA.Any, org.omg.PortableServer.ServantLocator)


Occurences of insertBefore

insertBefore occurences:
javax.imageio.metadata.IIOMetadataNode.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)
org.w3c.dom.Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)


Occurences of insertChar

insertChar occurences:
java.awt.font.LineBreakMeasurer.insertChar(java.text.AttributedCharacterIterator, int)
java.awt.font.TextMeasurer.insertChar(java.text.AttributedCharacterIterator, int)


Occurences of insertElementAt

insertElementAt occurences:
java.util.Vector.insertElementAt(E, int)
java.util.Vector.insertElementAt(java.lang.Object, int)
javax.swing.DefaultComboBoxModel.insertElementAt(E, int)
javax.swing.DefaultComboBoxModel.insertElementAt(java.lang.Object, int)
javax.swing.DefaultListModel.insertElementAt(E, int)
javax.swing.DefaultListModel.insertElementAt(java.lang.Object, int)
javax.swing.MutableComboBoxModel.insertElementAt(E, int)
javax.swing.MutableComboBoxModel.insertElementAt(java.lang.Object, int)


Occurences of insertHTML

insertHTML occurences:
javax.swing.text.html.HTMLEditorKit.insertHTML(javax.swing.text.html.HTMLDocument, int, java.lang.String, int, int, javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.insertHTML(javax.swing.JEditorPane, javax.swing.text.html.HTMLDocument, int, java.lang.String, int, int, javax.swing.text.html.HTML.Tag)


Occurences of InsertHTMLTextAction

InsertHTMLTextAction occurences:
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.InsertHTMLTextAction(java.lang.String, java.lang.String, javax.swing.text.html.HTML.Tag, javax.swing.text.html.HTML.Tag)
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.InsertHTMLTextAction(java.lang.String, java.lang.String, javax.swing.text.html.HTML.Tag, javax.swing.text.html.HTML.Tag, javax.swing.text.html.HTML.Tag, javax.swing.text.html.HTML.Tag)


Occurences of insertIndexInterval

insertIndexInterval occurences:
javax.swing.DefaultListSelectionModel.insertIndexInterval(int, int, boolean)
javax.swing.ListSelectionModel.insertIndexInterval(int, int, boolean)


Occurences of insertItemAt

insertItemAt occurences:
javax.swing.JComboBox.insertItemAt(E, int)
javax.swing.JComboBox.insertItemAt(java.lang.Object, int)


Occurences of insertParameterTypes

insertParameterTypes occurences:
java.lang.invoke.MethodType.insertParameterTypes(int, java.lang.Class...)
java.lang.invoke.MethodType.insertParameterTypes(int, java.util.List)


Occurences of insertRow

insertRow occurences:
java.sql.ResultSet.insertRow()
javax.swing.table.DefaultTableModel.insertRow(int, java.lang.Object:A)
javax.swing.table.DefaultTableModel.insertRow(int, java.util.Vector)


Occurences of insertSeparator

insertSeparator occurences:
java.awt.Menu.insertSeparator(int)
javax.swing.JMenu.insertSeparator(int)


Occurences of insertString

insertString occurences:
javax.swing.text.AbstractDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.AbstractDocument.Content.insertString(int, java.lang.String)
javax.swing.text.Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.DocumentFilter.insertString(javax.swing.text.DocumentFilter.FilterBypass, int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.DocumentFilter.FilterBypass.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.GapContent.insertString(int, java.lang.String)
javax.swing.text.PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.StringContent.insertString(int, java.lang.String)


Occurences of insertTextAtIndex

insertTextAtIndex occurences:
javax.accessibility.AccessibleEditableText.insertTextAtIndex(int, java.lang.String)
javax.swing.JSpinner.AccessibleJSpinner.insertTextAtIndex(int, java.lang.String)
javax.swing.text.JTextComponent.AccessibleJTextComponent.insertTextAtIndex(int, java.lang.String)


Occurences of insertUpdate

insertUpdate occurences:
javax.swing.event.DocumentListener.insertUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.AbstractDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)
javax.swing.text.DefaultStyledDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)
javax.swing.text.DefaultStyledDocument.ElementBuffer.insertUpdate(javax.swing.text.DefaultStyledDocument.ElementSpec:A)
javax.swing.text.FieldView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.FlowView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.FlowView.FlowStrategy.insertUpdate(javax.swing.text.FlowView, javax.swing.event.DocumentEvent, java.awt.Rectangle)
javax.swing.text.GlyphView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.html.HTMLDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)
javax.swing.text.html.InlineView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.JTextComponent.AccessibleJTextComponent.insertUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.PlainDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)
javax.swing.text.PlainView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.WrappedPlainView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.ZoneView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)


Occurences of insert_any

insert_any occurences:
org.omg.CORBA.Any.insert_any(org.omg.CORBA.Any)
org.omg.CORBA.DynAny.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny.DynAnyOperations.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynAnyStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynArrayStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynEnumStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynFixedStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynSequenceStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynStructStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynUnionStub.insert_any(org.omg.CORBA.Any)
org.omg.DynamicAny._DynValueStub.insert_any(org.omg.CORBA.Any)


Occurences of insert_boolean

insert_boolean occurences:
org.omg.CORBA.Any.insert_boolean(boolean)
org.omg.CORBA.DynAny.insert_boolean(boolean)
org.omg.DynamicAny.DynAnyOperations.insert_boolean(boolean)
org.omg.DynamicAny._DynAnyStub.insert_boolean(boolean)
org.omg.DynamicAny._DynArrayStub.insert_boolean(boolean)
org.omg.DynamicAny._DynEnumStub.insert_boolean(boolean)
org.omg.DynamicAny._DynFixedStub.insert_boolean(boolean)
org.omg.DynamicAny._DynSequenceStub.insert_boolean(boolean)
org.omg.DynamicAny._DynStructStub.insert_boolean(boolean)
org.omg.DynamicAny._DynUnionStub.insert_boolean(boolean)
org.omg.DynamicAny._DynValueStub.insert_boolean(boolean)


Occurences of insert_char

insert_char occurences:
org.omg.CORBA.Any.insert_char(char)
org.omg.CORBA.DynAny.insert_char(char)
org.omg.DynamicAny.DynAnyOperations.insert_char(char)
org.omg.DynamicAny._DynAnyStub.insert_char(char)
org.omg.DynamicAny._DynArrayStub.insert_char(char)
org.omg.DynamicAny._DynEnumStub.insert_char(char)
org.omg.DynamicAny._DynFixedStub.insert_char(char)
org.omg.DynamicAny._DynSequenceStub.insert_char(char)
org.omg.DynamicAny._DynStructStub.insert_char(char)
org.omg.DynamicAny._DynUnionStub.insert_char(char)
org.omg.DynamicAny._DynValueStub.insert_char(char)


Occurences of insert_double

insert_double occurences:
org.omg.CORBA.Any.insert_double(double)
org.omg.CORBA.DynAny.insert_double(double)
org.omg.DynamicAny.DynAnyOperations.insert_double(double)
org.omg.DynamicAny._DynAnyStub.insert_double(double)
org.omg.DynamicAny._DynArrayStub.insert_double(double)
org.omg.DynamicAny._DynEnumStub.insert_double(double)
org.omg.DynamicAny._DynFixedStub.insert_double(double)
org.omg.DynamicAny._DynSequenceStub.insert_double(double)
org.omg.DynamicAny._DynStructStub.insert_double(double)
org.omg.DynamicAny._DynUnionStub.insert_double(double)
org.omg.DynamicAny._DynValueStub.insert_double(double)


Occurences of insert_dyn_any

insert_dyn_any occurences:
org.omg.DynamicAny.DynAnyOperations.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynAnyStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynArrayStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynEnumStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynFixedStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynSequenceStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynStructStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynUnionStub.insert_dyn_any(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynValueStub.insert_dyn_any(org.omg.DynamicAny.DynAny)


Occurences of insert_fixed

insert_fixed occurences:
org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal)
org.omg.CORBA.Any.insert_fixed(java.math.BigDecimal, org.omg.CORBA.TypeCode)


Occurences of insert_float

insert_float occurences:
org.omg.CORBA.Any.insert_float(float)
org.omg.CORBA.DynAny.insert_float(float)
org.omg.DynamicAny.DynAnyOperations.insert_float(float)
org.omg.DynamicAny._DynAnyStub.insert_float(float)
org.omg.DynamicAny._DynArrayStub.insert_float(float)
org.omg.DynamicAny._DynEnumStub.insert_float(float)
org.omg.DynamicAny._DynFixedStub.insert_float(float)
org.omg.DynamicAny._DynSequenceStub.insert_float(float)
org.omg.DynamicAny._DynStructStub.insert_float(float)
org.omg.DynamicAny._DynUnionStub.insert_float(float)
org.omg.DynamicAny._DynValueStub.insert_float(float)


Occurences of insert_long

insert_long occurences:
org.omg.CORBA.Any.insert_long(int)
org.omg.CORBA.DynAny.insert_long(int)
org.omg.DynamicAny.DynAnyOperations.insert_long(int)
org.omg.DynamicAny._DynAnyStub.insert_long(int)
org.omg.DynamicAny._DynArrayStub.insert_long(int)
org.omg.DynamicAny._DynEnumStub.insert_long(int)
org.omg.DynamicAny._DynFixedStub.insert_long(int)
org.omg.DynamicAny._DynSequenceStub.insert_long(int)
org.omg.DynamicAny._DynStructStub.insert_long(int)
org.omg.DynamicAny._DynUnionStub.insert_long(int)
org.omg.DynamicAny._DynValueStub.insert_long(int)


Occurences of insert_longlong

insert_longlong occurences:
org.omg.CORBA.Any.insert_longlong(long)
org.omg.CORBA.DynAny.insert_longlong(long)
org.omg.DynamicAny.DynAnyOperations.insert_longlong(long)
org.omg.DynamicAny._DynAnyStub.insert_longlong(long)
org.omg.DynamicAny._DynArrayStub.insert_longlong(long)
org.omg.DynamicAny._DynEnumStub.insert_longlong(long)
org.omg.DynamicAny._DynFixedStub.insert_longlong(long)
org.omg.DynamicAny._DynSequenceStub.insert_longlong(long)
org.omg.DynamicAny._DynStructStub.insert_longlong(long)
org.omg.DynamicAny._DynUnionStub.insert_longlong(long)
org.omg.DynamicAny._DynValueStub.insert_longlong(long)


Occurences of insert_Object

insert_Object occurences:
org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object)
org.omg.CORBA.Any.insert_Object(org.omg.CORBA.Object, org.omg.CORBA.TypeCode)


Occurences of insert_octet

insert_octet occurences:
org.omg.CORBA.Any.insert_octet(byte)
org.omg.CORBA.DynAny.insert_octet(byte)
org.omg.DynamicAny.DynAnyOperations.insert_octet(byte)
org.omg.DynamicAny._DynAnyStub.insert_octet(byte)
org.omg.DynamicAny._DynArrayStub.insert_octet(byte)
org.omg.DynamicAny._DynEnumStub.insert_octet(byte)
org.omg.DynamicAny._DynFixedStub.insert_octet(byte)
org.omg.DynamicAny._DynSequenceStub.insert_octet(byte)
org.omg.DynamicAny._DynStructStub.insert_octet(byte)
org.omg.DynamicAny._DynUnionStub.insert_octet(byte)
org.omg.DynamicAny._DynValueStub.insert_octet(byte)


Occurences of insert_reference

insert_reference occurences:
org.omg.CORBA.DynAny.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny.DynAnyOperations.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynAnyStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynArrayStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynEnumStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynFixedStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynSequenceStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynStructStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynUnionStub.insert_reference(org.omg.CORBA.Object)
org.omg.DynamicAny._DynValueStub.insert_reference(org.omg.CORBA.Object)


Occurences of insert_short

insert_short occurences:
org.omg.CORBA.Any.insert_short(short)
org.omg.CORBA.DynAny.insert_short(short)
org.omg.DynamicAny.DynAnyOperations.insert_short(short)
org.omg.DynamicAny._DynAnyStub.insert_short(short)
org.omg.DynamicAny._DynArrayStub.insert_short(short)
org.omg.DynamicAny._DynEnumStub.insert_short(short)
org.omg.DynamicAny._DynFixedStub.insert_short(short)
org.omg.DynamicAny._DynSequenceStub.insert_short(short)
org.omg.DynamicAny._DynStructStub.insert_short(short)
org.omg.DynamicAny._DynUnionStub.insert_short(short)
org.omg.DynamicAny._DynValueStub.insert_short(short)


Occurences of insert_string

insert_string occurences:
org.omg.CORBA.Any.insert_string(java.lang.String)
org.omg.CORBA.DynAny.insert_string(java.lang.String)
org.omg.DynamicAny.DynAnyOperations.insert_string(java.lang.String)
org.omg.DynamicAny._DynAnyStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynArrayStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynEnumStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynFixedStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynSequenceStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynStructStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynUnionStub.insert_string(java.lang.String)
org.omg.DynamicAny._DynValueStub.insert_string(java.lang.String)


Occurences of insert_typecode

insert_typecode occurences:
org.omg.CORBA.DynAny.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny.DynAnyOperations.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynAnyStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynArrayStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynEnumStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynFixedStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynSequenceStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynStructStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynUnionStub.insert_typecode(org.omg.CORBA.TypeCode)
org.omg.DynamicAny._DynValueStub.insert_typecode(org.omg.CORBA.TypeCode)


Occurences of insert_ulong

insert_ulong occurences:
org.omg.CORBA.Any.insert_ulong(int)
org.omg.CORBA.DynAny.insert_ulong(int)
org.omg.DynamicAny.DynAnyOperations.insert_ulong(int)
org.omg.DynamicAny._DynAnyStub.insert_ulong(int)
org.omg.DynamicAny._DynArrayStub.insert_ulong(int)
org.omg.DynamicAny._DynEnumStub.insert_ulong(int)
org.omg.DynamicAny._DynFixedStub.insert_ulong(int)
org.omg.DynamicAny._DynSequenceStub.insert_ulong(int)
org.omg.DynamicAny._DynStructStub.insert_ulong(int)
org.omg.DynamicAny._DynUnionStub.insert_ulong(int)
org.omg.DynamicAny._DynValueStub.insert_ulong(int)


Occurences of insert_ulonglong

insert_ulonglong occurences:
org.omg.CORBA.Any.insert_ulonglong(long)
org.omg.CORBA.DynAny.insert_ulonglong(long)
org.omg.DynamicAny.DynAnyOperations.insert_ulonglong(long)
org.omg.DynamicAny._DynAnyStub.insert_ulonglong(long)
org.omg.DynamicAny._DynArrayStub.insert_ulonglong(long)
org.omg.DynamicAny._DynEnumStub.insert_ulonglong(long)
org.omg.DynamicAny._DynFixedStub.insert_ulonglong(long)
org.omg.DynamicAny._DynSequenceStub.insert_ulonglong(long)
org.omg.DynamicAny._DynStructStub.insert_ulonglong(long)
org.omg.DynamicAny._DynUnionStub.insert_ulonglong(long)
org.omg.DynamicAny._DynValueStub.insert_ulonglong(long)


Occurences of insert_ushort

insert_ushort occurences:
org.omg.CORBA.Any.insert_ushort(short)
org.omg.CORBA.DynAny.insert_ushort(short)
org.omg.DynamicAny.DynAnyOperations.insert_ushort(short)
org.omg.DynamicAny._DynAnyStub.insert_ushort(short)
org.omg.DynamicAny._DynArrayStub.insert_ushort(short)
org.omg.DynamicAny._DynEnumStub.insert_ushort(short)
org.omg.DynamicAny._DynFixedStub.insert_ushort(short)
org.omg.DynamicAny._DynSequenceStub.insert_ushort(short)
org.omg.DynamicAny._DynStructStub.insert_ushort(short)
org.omg.DynamicAny._DynUnionStub.insert_ushort(short)
org.omg.DynamicAny._DynValueStub.insert_ushort(short)


Occurences of insert_val

insert_val occurences:
org.omg.CORBA.DynAny.insert_val(java.io.Serializable)
org.omg.DynamicAny.DynAnyOperations.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynAnyStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynArrayStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynEnumStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynFixedStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynSequenceStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynStructStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynUnionStub.insert_val(java.io.Serializable)
org.omg.DynamicAny._DynValueStub.insert_val(java.io.Serializable)


Occurences of insert_Value

insert_Value occurences:
org.omg.CORBA.Any.insert_Value(java.io.Serializable)
org.omg.CORBA.Any.insert_Value(java.io.Serializable, org.omg.CORBA.TypeCode)


Occurences of insert_wchar

insert_wchar occurences:
org.omg.CORBA.Any.insert_wchar(char)
org.omg.CORBA.DynAny.insert_wchar(char)
org.omg.DynamicAny.DynAnyOperations.insert_wchar(char)
org.omg.DynamicAny._DynAnyStub.insert_wchar(char)
org.omg.DynamicAny._DynArrayStub.insert_wchar(char)
org.omg.DynamicAny._DynEnumStub.insert_wchar(char)
org.omg.DynamicAny._DynFixedStub.insert_wchar(char)
org.omg.DynamicAny._DynSequenceStub.insert_wchar(char)
org.omg.DynamicAny._DynStructStub.insert_wchar(char)
org.omg.DynamicAny._DynUnionStub.insert_wchar(char)
org.omg.DynamicAny._DynValueStub.insert_wchar(char)


Occurences of insert_wstring

insert_wstring occurences:
org.omg.CORBA.Any.insert_wstring(java.lang.String)
org.omg.CORBA.DynAny.insert_wstring(java.lang.String)
org.omg.DynamicAny.DynAnyOperations.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynAnyStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynArrayStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynEnumStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynFixedStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynSequenceStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynStructStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynUnionStub.insert_wstring(java.lang.String)
org.omg.DynamicAny._DynValueStub.insert_wstring(java.lang.String)


Occurences of insets

insets occurences:
java.awt.Container.insets()
java.awt.insets


Occurences of inside

inside occurences:
java.awt.Component.inside(int, int)
java.awt.Polygon.inside(int, int)
java.awt.Rectangle.inside(int, int)


Occurences of install

install occurences:
javax.swing.JFormattedTextField.AbstractFormatter.install(javax.swing.JFormattedTextField)
javax.swing.text.Caret.install(javax.swing.text.JTextComponent)
javax.swing.text.DefaultCaret.install(javax.swing.text.JTextComponent)
javax.swing.text.DefaultFormatter.install(javax.swing.JFormattedTextField)
javax.swing.text.DefaultHighlighter.install(javax.swing.text.JTextComponent)
javax.swing.text.EditorKit.install(javax.swing.JEditorPane)
javax.swing.text.Highlighter.install(javax.swing.text.JTextComponent)
javax.swing.text.html.HTMLEditorKit.install(javax.swing.JEditorPane)
javax.swing.text.InternationalFormatter.install(javax.swing.JFormattedTextField)
javax.swing.text.MaskFormatter.install(javax.swing.JFormattedTextField)
javax.swing.text.StyledEditorKit.install(javax.swing.JEditorPane)


Occurences of installComponents

installComponents occurences:
javax.swing.plaf.basic.BasicComboBoxUI.installComponents()
javax.swing.plaf.basic.BasicDesktopIconUI.installComponents()
javax.swing.plaf.basic.BasicFileChooserUI.installComponents(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameUI.installComponents()
javax.swing.plaf.basic.BasicLabelUI.installComponents(javax.swing.JLabel)
javax.swing.plaf.basic.BasicMenuItemUI.installComponents(javax.swing.JMenuItem)
javax.swing.plaf.basic.BasicOptionPaneUI.installComponents()
javax.swing.plaf.basic.BasicRootPaneUI.installComponents(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.installComponents()
javax.swing.plaf.basic.BasicTabbedPaneUI.installComponents()
javax.swing.plaf.basic.BasicToolBarUI.installComponents()
javax.swing.plaf.basic.BasicTreeUI.installComponents()
javax.swing.plaf.metal.MetalDesktopIconUI.installComponents()
javax.swing.plaf.metal.MetalFileChooserUI.installComponents(javax.swing.JFileChooser)
javax.swing.plaf.synth.SynthDesktopIconUI.installComponents()
javax.swing.plaf.synth.SynthOptionPaneUI.installComponents()
javax.swing.plaf.synth.SynthToolBarUI.installComponents()


Occurences of installDefaults

installDefaults occurences:
javax.swing.plaf.basic.BasicButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicColorChooserUI.installDefaults()
javax.swing.plaf.basic.BasicComboBoxUI.installDefaults()
javax.swing.plaf.basic.BasicDesktopIconUI.installDefaults()
javax.swing.plaf.basic.BasicDesktopPaneUI.installDefaults()
javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.installDefaults()
javax.swing.plaf.basic.BasicInternalFrameUI.installDefaults()
javax.swing.plaf.basic.BasicLabelUI.installDefaults(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.installDefaults()
javax.swing.plaf.basic.BasicMenuBarUI.installDefaults()
javax.swing.plaf.basic.BasicMenuItemUI.installDefaults()
javax.swing.plaf.basic.BasicMenuUI.installDefaults()
javax.swing.plaf.basic.BasicOptionPaneUI.installDefaults()
javax.swing.plaf.basic.BasicPanelUI.installDefaults(javax.swing.JPanel)
javax.swing.plaf.basic.BasicPasswordFieldUI.installDefaults()
javax.swing.plaf.basic.BasicPopupMenuUI.installDefaults()
javax.swing.plaf.basic.BasicProgressBarUI.installDefaults()
javax.swing.plaf.basic.BasicRadioButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicRootPaneUI.installDefaults(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.installDefaults()
javax.swing.plaf.basic.BasicScrollPaneUI.installDefaults(javax.swing.JScrollPane)
javax.swing.plaf.basic.BasicSeparatorUI.installDefaults(javax.swing.JSeparator)
javax.swing.plaf.basic.BasicSliderUI.installDefaults(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.installDefaults()
javax.swing.plaf.basic.BasicSplitPaneUI.installDefaults()
javax.swing.plaf.basic.BasicTabbedPaneUI.installDefaults()
javax.swing.plaf.basic.BasicTableHeaderUI.installDefaults()
javax.swing.plaf.basic.BasicTableUI.installDefaults()
javax.swing.plaf.basic.BasicTextAreaUI.installDefaults()
javax.swing.plaf.basic.BasicTextUI.installDefaults()
javax.swing.plaf.basic.BasicToolBarSeparatorUI.installDefaults(javax.swing.JSeparator)
javax.swing.plaf.basic.BasicToolBarUI.installDefaults()
javax.swing.plaf.basic.BasicToolTipUI.installDefaults(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.installDefaults()
javax.swing.plaf.basic.BasicViewportUI.installDefaults(javax.swing.JComponent)
javax.swing.plaf.metal.MetalButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalCheckBoxUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalDesktopIconUI.installDefaults()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.installDefaults()
javax.swing.plaf.metal.MetalRadioButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalScrollBarUI.installDefaults()
javax.swing.plaf.metal.MetalSeparatorUI.installDefaults(javax.swing.JSeparator)
javax.swing.plaf.metal.MetalTabbedPaneUI.installDefaults()
javax.swing.plaf.metal.MetalToggleButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.nimbus.NimbusStyle.installDefaults(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthButtonUI.installDefaults(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthColorChooserUI.installDefaults()
javax.swing.plaf.synth.SynthComboBoxUI.installDefaults()
javax.swing.plaf.synth.SynthDesktopIconUI.installDefaults()
javax.swing.plaf.synth.SynthDesktopPaneUI.installDefaults()
javax.swing.plaf.synth.SynthEditorPaneUI.installDefaults()
javax.swing.plaf.synth.SynthInternalFrameUI.installDefaults()
javax.swing.plaf.synth.SynthLabelUI.installDefaults(javax.swing.JLabel)
javax.swing.plaf.synth.SynthListUI.installDefaults()
javax.swing.plaf.synth.SynthMenuBarUI.installDefaults()
javax.swing.plaf.synth.SynthMenuItemUI.installDefaults()
javax.swing.plaf.synth.SynthMenuUI.installDefaults()
javax.swing.plaf.synth.SynthOptionPaneUI.installDefaults()
javax.swing.plaf.synth.SynthPanelUI.installDefaults(javax.swing.JPanel)
javax.swing.plaf.synth.SynthPopupMenuUI.installDefaults()
javax.swing.plaf.synth.SynthProgressBarUI.installDefaults()
javax.swing.plaf.synth.SynthRootPaneUI.installDefaults(javax.swing.JRootPane)
javax.swing.plaf.synth.SynthScrollBarUI.installDefaults()
javax.swing.plaf.synth.SynthScrollPaneUI.installDefaults(javax.swing.JScrollPane)
javax.swing.plaf.synth.SynthSeparatorUI.installDefaults(javax.swing.JSeparator)
javax.swing.plaf.synth.SynthSliderUI.installDefaults(javax.swing.JSlider)
javax.swing.plaf.synth.SynthSpinnerUI.installDefaults()
javax.swing.plaf.synth.SynthSplitPaneUI.installDefaults()
javax.swing.plaf.synth.SynthStyle.installDefaults(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthTabbedPaneUI.installDefaults()
javax.swing.plaf.synth.SynthTableHeaderUI.installDefaults()
javax.swing.plaf.synth.SynthTableUI.installDefaults()
javax.swing.plaf.synth.SynthTextAreaUI.installDefaults()
javax.swing.plaf.synth.SynthTextFieldUI.installDefaults()
javax.swing.plaf.synth.SynthToolBarUI.installDefaults()
javax.swing.plaf.synth.SynthToolTipUI.installDefaults(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.installDefaults()
javax.swing.plaf.synth.SynthViewportUI.installDefaults(javax.swing.JComponent)


Occurences of installDesktopManager

installDesktopManager occurences:
javax.swing.plaf.basic.BasicDesktopPaneUI.installDesktopManager()
javax.swing.plaf.synth.SynthDesktopPaneUI.installDesktopManager()


Occurences of installKeyboardActions

installKeyboardActions occurences:
javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(javax.swing.JComponent)
javax.swing.plaf.basic.BasicButtonUI.installKeyboardActions(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions()
javax.swing.plaf.basic.BasicComboPopup.installKeyboardActions()
javax.swing.plaf.basic.BasicDesktopPaneUI.installKeyboardActions()
javax.swing.plaf.basic.BasicInternalFrameUI.installKeyboardActions()
javax.swing.plaf.basic.BasicLabelUI.installKeyboardActions(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.installKeyboardActions()
javax.swing.plaf.basic.BasicMenuBarUI.installKeyboardActions()
javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions()
javax.swing.plaf.basic.BasicMenuUI.installKeyboardActions()
javax.swing.plaf.basic.BasicOptionPaneUI.installKeyboardActions()
javax.swing.plaf.basic.BasicPopupMenuUI.installKeyboardActions()
javax.swing.plaf.basic.BasicRootPaneUI.installKeyboardActions(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.installKeyboardActions()
javax.swing.plaf.basic.BasicScrollPaneUI.installKeyboardActions(javax.swing.JScrollPane)
javax.swing.plaf.basic.BasicSliderUI.installKeyboardActions(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.installKeyboardActions()
javax.swing.plaf.basic.BasicSplitPaneUI.installKeyboardActions()
javax.swing.plaf.basic.BasicTabbedPaneUI.installKeyboardActions()
javax.swing.plaf.basic.BasicTableHeaderUI.installKeyboardActions()
javax.swing.plaf.basic.BasicTableUI.installKeyboardActions()
javax.swing.plaf.basic.BasicTextUI.installKeyboardActions()
javax.swing.plaf.basic.BasicToolBarUI.installKeyboardActions()
javax.swing.plaf.basic.BasicTreeUI.installKeyboardActions()
javax.swing.plaf.metal.MetalInternalFrameUI.installKeyboardActions()
javax.swing.plaf.synth.SynthPasswordFieldUI.installKeyboardActions()


Occurences of installListeners

installListeners occurences:
javax.swing.plaf.basic.BasicButtonUI.installListeners(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicColorChooserUI.installListeners()
javax.swing.plaf.basic.BasicComboBoxUI.installListeners()
javax.swing.plaf.basic.BasicDesktopIconUI.installListeners()
javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners()
javax.swing.plaf.basic.BasicFileChooserUI.installListeners(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.installListeners()
javax.swing.plaf.basic.BasicInternalFrameUI.installListeners()
javax.swing.plaf.basic.BasicLabelUI.installListeners(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.installListeners()
javax.swing.plaf.basic.BasicMenuBarUI.installListeners()
javax.swing.plaf.basic.BasicMenuItemUI.installListeners()
javax.swing.plaf.basic.BasicMenuUI.installListeners()
javax.swing.plaf.basic.BasicOptionPaneUI.installListeners()
javax.swing.plaf.basic.BasicPopupMenuUI.installListeners()
javax.swing.plaf.basic.BasicProgressBarUI.installListeners()
javax.swing.plaf.basic.BasicRootPaneUI.installListeners(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.installListeners()
javax.swing.plaf.basic.BasicScrollPaneUI.installListeners(javax.swing.JScrollPane)
javax.swing.plaf.basic.BasicSeparatorUI.installListeners(javax.swing.JSeparator)
javax.swing.plaf.basic.BasicSliderUI.installListeners(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.installListeners()
javax.swing.plaf.basic.BasicSplitPaneUI.installListeners()
javax.swing.plaf.basic.BasicTabbedPaneUI.installListeners()
javax.swing.plaf.basic.BasicTableHeaderUI.installListeners()
javax.swing.plaf.basic.BasicTableUI.installListeners()
javax.swing.plaf.basic.BasicTextUI.installListeners()
javax.swing.plaf.basic.BasicToolBarUI.installListeners()
javax.swing.plaf.basic.BasicToolTipUI.installListeners(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.installListeners()
javax.swing.plaf.metal.MetalDesktopIconUI.installListeners()
javax.swing.plaf.metal.MetalFileChooserUI.installListeners(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalInternalFrameUI.installListeners()
javax.swing.plaf.metal.MetalScrollBarUI.installListeners()
javax.swing.plaf.metal.MetalScrollPaneUI.installListeners(javax.swing.JScrollPane)
javax.swing.plaf.metal.MetalToolBarUI.installListeners()
javax.swing.plaf.synth.SynthButtonUI.installListeners(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthColorChooserUI.installListeners()
javax.swing.plaf.synth.SynthComboBoxUI.installListeners()
javax.swing.plaf.synth.SynthDesktopIconUI.installListeners()
javax.swing.plaf.synth.SynthDesktopPaneUI.installListeners()
javax.swing.plaf.synth.SynthInternalFrameUI.installListeners()
javax.swing.plaf.synth.SynthListUI.installListeners()
javax.swing.plaf.synth.SynthMenuBarUI.installListeners()
javax.swing.plaf.synth.SynthMenuItemUI.installListeners()
javax.swing.plaf.synth.SynthMenuUI.installListeners()
javax.swing.plaf.synth.SynthOptionPaneUI.installListeners()
javax.swing.plaf.synth.SynthPanelUI.installListeners(javax.swing.JPanel)
javax.swing.plaf.synth.SynthPopupMenuUI.installListeners()
javax.swing.plaf.synth.SynthProgressBarUI.installListeners()
javax.swing.plaf.synth.SynthScrollBarUI.installListeners()
javax.swing.plaf.synth.SynthScrollPaneUI.installListeners(javax.swing.JScrollPane)
javax.swing.plaf.synth.SynthSeparatorUI.installListeners(javax.swing.JSeparator)
javax.swing.plaf.synth.SynthSliderUI.installListeners(javax.swing.JSlider)
javax.swing.plaf.synth.SynthSpinnerUI.installListeners()
javax.swing.plaf.synth.SynthSplitPaneUI.installListeners()
javax.swing.plaf.synth.SynthTabbedPaneUI.installListeners()
javax.swing.plaf.synth.SynthTableHeaderUI.installListeners()
javax.swing.plaf.synth.SynthTableUI.installListeners()
javax.swing.plaf.synth.SynthToolBarUI.installListeners()
javax.swing.plaf.synth.SynthToolTipUI.installListeners(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.installListeners()
javax.swing.plaf.synth.SynthViewportUI.installListeners(javax.swing.JComponent)


Occurences of installLookAndFeel

installLookAndFeel occurences:
javax.swing.UIManager.installLookAndFeel(java.lang.String, java.lang.String)
javax.swing.UIManager.installLookAndFeel(javax.swing.UIManager.LookAndFeelInfo)


Occurences of installStrings

installStrings occurences:
javax.swing.plaf.basic.BasicFileChooserUI.installStrings(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalFileChooserUI.installStrings(javax.swing.JFileChooser)


Occurences of installUI

installUI occurences:
javax.swing.plaf.basic.BasicButtonUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicColorChooserUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicEditorPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicFileChooserUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicOptionPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPanelUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRootPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.installUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicViewportUI.installUI(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
javax.swing.plaf.LayerUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalInternalFrameUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalMenuBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalRootPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalSliderUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolTipUI.installUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalTreeUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.installUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.installUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.installUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.installUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.installUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextPaneUI.installUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.installUI(javax.swing.JComponent)


Occurences of INSTANCE

INSTANCE occurences:
java.time.chrono.INSTANCE
java.time.chrono.INSTANCE
java.time.chrono.INSTANCE
java.time.chrono.INSTANCE
java.time.chrono.INSTANCE


Occurences of instance

instance occurences:
com.sun.source.util.DocTrees.instance(javax.annotation.processing.ProcessingEnvironment)
com.sun.source.util.DocTrees.instance(javax.tools.JavaCompiler.CompilationTask)
com.sun.source.util.JavacTask.instance(javax.annotation.processing.ProcessingEnvironment)
com.sun.source.util.Trees.instance(javax.annotation.processing.ProcessingEnvironment)
com.sun.source.util.Trees.instance(javax.tools.JavaCompiler.CompilationTask)


Occurences of InstanceAlreadyExistsException (constructors)

InstanceAlreadyExistsException (constructors) occurences:
javax.management.InstanceAlreadyExistsException()
javax.management.InstanceAlreadyExistsException(java.lang.String)


Occurences of InstanceNotFoundException (constructors)

InstanceNotFoundException (constructors) occurences:
javax.management.InstanceNotFoundException()
javax.management.InstanceNotFoundException(java.lang.String)


Occurences of instantiate

instantiate occurences:
java.beans.Beans.instantiate(java.lang.ClassLoader, java.lang.String)
java.beans.Beans.instantiate(java.lang.ClassLoader, java.lang.String, java.beans.beancontext.BeanContext)
java.beans.Beans.instantiate(java.lang.ClassLoader, java.lang.String, java.beans.beancontext.BeanContext, java.beans.AppletInitializer)
java.beans.DefaultPersistenceDelegate.instantiate(java.lang.Object, java.beans.Encoder)
java.beans.PersistenceDelegate.instantiate(java.lang.Object, java.beans.Encoder)
javax.management.MBeanServer.instantiate(java.lang.String)
javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName)
javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object:A, java.lang.String:A)


Occurences of instantiateChild

instantiateChild occurences:
java.beans.beancontext.BeanContext.instantiateChild(java.lang.String)
java.beans.beancontext.BeanContextSupport.instantiateChild(java.lang.String)


Occurences of InstantiationError (constructors)

InstantiationError (constructors) occurences:
java.lang.InstantiationError()
java.lang.InstantiationError(java.lang.String)


Occurences of InstantiationException (constructors)

InstantiationException (constructors) occurences:
java.lang.InstantiationException()
java.lang.InstantiationException(java.lang.String)


Occurences of instrument

instrument occurences:
compact3.java.lang.instrument
java.lang.instrument


Occurences of InsufficientResourcesException (constructors)

InsufficientResourcesException (constructors) occurences:
javax.naming.InsufficientResourcesException()
javax.naming.InsufficientResourcesException(java.lang.String)


Occurences of INTEGER

INTEGER occurences:
java.sql.INTEGER
java.sql.INTEGER
java.text.INTEGER
javax.management.openmbean.INTEGER


Occurences of Integer (constructors)

Integer (constructors) occurences:
java.lang.Integer(int)
java.lang.Integer(java.lang.String)


Occurences of IntegerSyntax (constructors)

IntegerSyntax (constructors) occurences:
javax.print.attribute.IntegerSyntax(int)
javax.print.attribute.IntegerSyntax(int, int, int)


Occurences of interestOps

interestOps occurences:
java.nio.channels.SelectionKey.interestOps()
java.nio.channels.SelectionKey.interestOps(int)


Occurences of INTERFACE

INTERFACE occurences:
com.sun.source.tree.INTERFACE
java.lang.reflect.INTERFACE
javax.lang.model.element.INTERFACE


Occurences of interfaces

interfaces occurences:
com.sun.javadoc.ClassDoc.interfaces()
com.sun.javadoc.PackageDoc.interfaces()
com.sun.jdi.ClassType.interfaces()
compact1.java.security.interfaces
compact2.java.security.interfaces
compact3.java.security.interfaces
java.security.interfaces
javax.crypto.interfaces


Occurences of interfaceTypes

interfaceTypes occurences:
com.sun.javadoc.ClassDoc.interfaceTypes()
com.sun.javadoc.ParameterizedType.interfaceTypes()


Occurences of INTERNAL (constructors)

INTERNAL (constructors) occurences:
org.omg.CORBA.INTERNAL()
org.omg.CORBA.INTERNAL(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INTERNAL(java.lang.String)
org.omg.CORBA.INTERNAL(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of internalEntityDecl

internalEntityDecl occurences:
org.xml.sax.ext.DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.internalEntityDecl(java.lang.String, java.lang.String)


Occurences of InternalError (constructors)

InternalError (constructors) occurences:
java.lang.InternalError()
java.lang.InternalError(java.lang.String)
java.lang.InternalError(java.lang.String, java.lang.Throwable)
java.lang.InternalError(java.lang.Throwable)


Occurences of InternalException (constructors)

InternalException (constructors) occurences:
com.sun.jdi.InternalException()
com.sun.jdi.InternalException(int)
com.sun.jdi.InternalException(java.lang.String)
com.sun.jdi.InternalException(java.lang.String, int)


Occurences of internalFrameActivated

internalFrameActivated occurences:
javax.swing.event.InternalFrameAdapter.internalFrameActivated(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameActivated(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameActivated(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameClosed

internalFrameClosed occurences:
javax.swing.event.InternalFrameAdapter.internalFrameClosed(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameClosed(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameClosed(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameClosing

internalFrameClosing occurences:
javax.swing.event.InternalFrameAdapter.internalFrameClosing(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameClosing(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameClosing(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameDeactivated

internalFrameDeactivated occurences:
javax.swing.event.InternalFrameAdapter.internalFrameDeactivated(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameDeactivated(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameDeactivated(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameDeiconified

internalFrameDeiconified occurences:
javax.swing.event.InternalFrameAdapter.internalFrameDeiconified(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameDeiconified(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameDeiconified(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameIconified

internalFrameIconified occurences:
javax.swing.event.InternalFrameAdapter.internalFrameIconified(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameIconified(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameIconified(javax.swing.event.InternalFrameEvent)


Occurences of internalFrameOpened

internalFrameOpened occurences:
javax.swing.event.InternalFrameAdapter.internalFrameOpened(javax.swing.event.InternalFrameEvent)
javax.swing.event.InternalFrameListener.internalFrameOpened(javax.swing.event.InternalFrameEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.internalFrameOpened(javax.swing.event.InternalFrameEvent)


Occurences of INTERNAL_FRAME

INTERNAL_FRAME occurences:
javax.accessibility.INTERNAL_FRAME
javax.swing.plaf.synth.INTERNAL_FRAME


Occurences of InternationalFormatter (constructors)

InternationalFormatter (constructors) occurences:
javax.swing.text.InternationalFormatter()
javax.swing.text.InternationalFormatter(java.text.Format)


Occurences of Internationalization

Internationalization occurences:
Internationalization
Internationalization
Internationalization


Occurences of interrupt

interrupt occurences:
com.sun.jdi.ThreadReference.interrupt()
java.lang.Thread.interrupt()
java.lang.ThreadGroup.interrupt()


Occurences of InterruptedException (constructors)

InterruptedException (constructors) occurences:
java.lang.InterruptedException()
java.lang.InterruptedException(java.lang.String)


Occurences of InterruptedIOException (constructors)

InterruptedIOException (constructors) occurences:
java.io.InterruptedIOException()
java.io.InterruptedIOException(java.lang.String)


Occurences of InterruptedNamingException (constructors)

InterruptedNamingException (constructors) occurences:
javax.naming.InterruptedNamingException()
javax.naming.InterruptedNamingException(java.lang.String)


Occurences of intersect

intersect occurences:
java.awt.geom.Area.intersect(java.awt.geom.Area)
java.awt.geom.Rectangle2D.intersect(java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D)


Occurences of intersects

intersects occurences:
java.awt.geom.Arc2D.intersects(double, double, double, double)
java.awt.geom.Area.intersects(double, double, double, double)
java.awt.geom.Area.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.CubicCurve2D.intersects(double, double, double, double)
java.awt.geom.CubicCurve2D.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.Ellipse2D.intersects(double, double, double, double)
java.awt.geom.Line2D.intersects(double, double, double, double)
java.awt.geom.Line2D.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.Path2D.intersects(double, double, double, double)
java.awt.geom.Path2D.intersects(java.awt.geom.PathIterator, double, double, double, double)
java.awt.geom.Path2D.intersects(java.awt.geom.PathIterator, java.awt.geom.Rectangle2D)
java.awt.geom.Path2D.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.QuadCurve2D.intersects(double, double, double, double)
java.awt.geom.QuadCurve2D.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.intersects(double, double, double, double)
java.awt.geom.RectangularShape.intersects(java.awt.geom.Rectangle2D)
java.awt.geom.RoundRectangle2D.intersects(double, double, double, double)
java.awt.Polygon.intersects(double, double, double, double)
java.awt.Polygon.intersects(java.awt.geom.Rectangle2D)
java.awt.Rectangle.intersects(java.awt.Rectangle)
java.awt.Shape.intersects(double, double, double, double)
java.awt.Shape.intersects(java.awt.geom.Rectangle2D)
java.util.BitSet.intersects(java.util.BitSet)


Occurences of intersectsLine

intersectsLine occurences:
java.awt.geom.Line2D.intersectsLine(double, double, double, double)
java.awt.geom.Line2D.intersectsLine(java.awt.geom.Line2D)
java.awt.geom.Rectangle2D.intersectsLine(double, double, double, double)
java.awt.geom.Rectangle2D.intersectsLine(java.awt.geom.Line2D)


Occurences of intervalAdded

intervalAdded occurences:
javax.swing.event.ListDataListener.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.JComboBox.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.JList.AccessibleJList.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboPopup.ListDataHandler.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicDirectoryModel.intervalAdded(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicListUI.ListDataHandler.intervalAdded(javax.swing.event.ListDataEvent)


Occurences of intervalRemoved

intervalRemoved occurences:
javax.swing.event.ListDataListener.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.JComboBox.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.JList.AccessibleJList.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicComboPopup.ListDataHandler.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicDirectoryModel.intervalRemoved(javax.swing.event.ListDataEvent)
javax.swing.plaf.basic.BasicListUI.ListDataHandler.intervalRemoved(javax.swing.event.ListDataEvent)


Occurences of INTF_REPOS (constructors)

INTF_REPOS (constructors) occurences:
org.omg.CORBA.INTF_REPOS()
org.omg.CORBA.INTF_REPOS(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INTF_REPOS(java.lang.String)
org.omg.CORBA.INTF_REPOS(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of IntHolder (constructors)

IntHolder (constructors) occurences:
org.omg.CORBA.IntHolder()
org.omg.CORBA.IntHolder(int)


Occurences of Introduction

Introduction occurences:
Introduction
Introduction
Introduction


Occurences of IntrospectionException

IntrospectionException occurences:
java.beans.IntrospectionException
javax.management.IntrospectionException


Occurences of IntrospectionException (constructors)

IntrospectionException (constructors) occurences:
java.beans.IntrospectionException(java.lang.String)
javax.management.IntrospectionException()
javax.management.IntrospectionException(java.lang.String)


Occurences of ints

ints occurences:
java.util.concurrent.ThreadLocalRandom.ints()
java.util.concurrent.ThreadLocalRandom.ints(int, int)
java.util.concurrent.ThreadLocalRandom.ints(long)
java.util.concurrent.ThreadLocalRandom.ints(long, int, int)
java.util.Random.ints()
java.util.Random.ints(int, int)
java.util.Random.ints(long)
java.util.Random.ints(long, int, int)
java.util.SplittableRandom.ints()
java.util.SplittableRandom.ints(int, int)
java.util.SplittableRandom.ints(long)
java.util.SplittableRandom.ints(long, int, int)


Occurences of intStream

intStream occurences:
java.util.stream.StreamSupport.intStream(java.util.function.Supplier, int, boolean)
java.util.stream.StreamSupport.intStream(java.util.Spliterator.OfInt, boolean)


Occurences of intValue

intValue occurences:
com.sun.jdi.connect.Connector.IntegerArgument.intValue()
com.sun.jdi.PrimitiveValue.intValue()
java.lang.Byte.intValue()
java.lang.Double.intValue()
java.lang.Float.intValue()
java.lang.Integer.intValue()
java.lang.Long.intValue()
java.lang.Number.intValue()
java.lang.Short.intValue()
java.math.BigDecimal.intValue()
java.math.BigInteger.intValue()
java.util.concurrent.atomic.AtomicInteger.intValue()
java.util.concurrent.atomic.AtomicLong.intValue()
java.util.concurrent.atomic.DoubleAccumulator.intValue()
java.util.concurrent.atomic.DoubleAdder.intValue()
java.util.concurrent.atomic.LongAccumulator.intValue()
java.util.concurrent.atomic.LongAdder.intValue()
java.util.logging.Level.intValue()


Occurences of intValueExact

intValueExact occurences:
java.math.BigDecimal.intValueExact()
java.math.BigInteger.intValueExact()


Occurences of Invalid (constructors)

Invalid (constructors) occurences:
org.omg.CORBA.DynAnyPackage.Invalid()
org.omg.CORBA.DynAnyPackage.Invalid(java.lang.String)


Occurences of InvalidActivityException (constructors)

InvalidActivityException (constructors) occurences:
javax.activity.InvalidActivityException()
javax.activity.InvalidActivityException(java.lang.String)
javax.activity.InvalidActivityException(java.lang.String, java.lang.Throwable)
javax.activity.InvalidActivityException(java.lang.Throwable)


Occurences of InvalidAddress (constructors)

InvalidAddress (constructors) occurences:
org.omg.CosNaming.NamingContextExtPackage.InvalidAddress()
org.omg.CosNaming.NamingContextExtPackage.InvalidAddress(java.lang.String)


Occurences of InvalidAddressHolder (constructors)

InvalidAddressHolder (constructors) occurences:
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder()
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder(org.omg.CosNaming.NamingContextExtPackage.InvalidAddress)


Occurences of InvalidAlgorithmParameterException (constructors)

InvalidAlgorithmParameterException (constructors) occurences:
java.security.InvalidAlgorithmParameterException()
java.security.InvalidAlgorithmParameterException(java.lang.String)
java.security.InvalidAlgorithmParameterException(java.lang.String, java.lang.Throwable)
java.security.InvalidAlgorithmParameterException(java.lang.Throwable)


Occurences of invalidate

invalidate occurences:
java.awt.Component.invalidate()
java.awt.Container.invalidate()
java.awt.Polygon.invalidate()
javax.net.ssl.SSLSession.invalidate()
javax.swing.CellRendererPane.invalidate()
javax.swing.DefaultListCellRenderer.invalidate()
javax.swing.table.DefaultTableCellRenderer.invalidate()
javax.swing.tree.DefaultTreeCellRenderer.invalidate()


Occurences of invalidateLayout

invalidateLayout occurences:
java.awt.BorderLayout.invalidateLayout(java.awt.Container)
java.awt.CardLayout.invalidateLayout(java.awt.Container)
java.awt.GridBagLayout.invalidateLayout(java.awt.Container)
java.awt.LayoutManager2.invalidateLayout(java.awt.Container)
javax.swing.BoxLayout.invalidateLayout(java.awt.Container)
javax.swing.GroupLayout.invalidateLayout(java.awt.Container)
javax.swing.JRootPane.RootLayout.invalidateLayout(java.awt.Container)
javax.swing.OverlayLayout.invalidateLayout(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.invalidateLayout(java.awt.Container)
javax.swing.SpringLayout.invalidateLayout(java.awt.Container)


Occurences of invalidatePathBounds

invalidatePathBounds occurences:
javax.swing.tree.AbstractLayoutCache.invalidatePathBounds(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.invalidatePathBounds(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.invalidatePathBounds(javax.swing.tree.TreePath)


Occurences of invalidateSizes

invalidateSizes occurences:
javax.swing.tree.AbstractLayoutCache.invalidateSizes()
javax.swing.tree.FixedHeightLayoutCache.invalidateSizes()
javax.swing.tree.VariableHeightLayoutCache.invalidateSizes()


Occurences of InvalidAttributeIdentifierException (constructors)

InvalidAttributeIdentifierException (constructors) occurences:
javax.naming.directory.InvalidAttributeIdentifierException()
javax.naming.directory.InvalidAttributeIdentifierException(java.lang.String)


Occurences of InvalidAttributesException (constructors)

InvalidAttributesException (constructors) occurences:
javax.naming.directory.InvalidAttributesException()
javax.naming.directory.InvalidAttributesException(java.lang.String)


Occurences of InvalidAttributeValueException

InvalidAttributeValueException occurences:
javax.management.InvalidAttributeValueException
javax.naming.directory.InvalidAttributeValueException


Occurences of InvalidAttributeValueException (constructors)

InvalidAttributeValueException (constructors) occurences:
javax.management.InvalidAttributeValueException()
javax.management.InvalidAttributeValueException(java.lang.String)
javax.naming.directory.InvalidAttributeValueException()
javax.naming.directory.InvalidAttributeValueException(java.lang.String)


Occurences of InvalidClassException (constructors)

InvalidClassException (constructors) occurences:
java.io.InvalidClassException(java.lang.String)
java.io.InvalidClassException(java.lang.String, java.lang.String)


Occurences of InvalidCodeIndexException (constructors)

InvalidCodeIndexException (constructors) occurences:
com.sun.jdi.InvalidCodeIndexException()
com.sun.jdi.InvalidCodeIndexException(java.lang.String)


Occurences of InvalidDnDOperationException (constructors)

InvalidDnDOperationException (constructors) occurences:
java.awt.dnd.InvalidDnDOperationException()
java.awt.dnd.InvalidDnDOperationException(java.lang.String)


Occurences of invalidEdit

invalidEdit occurences:
javax.swing.JFormattedTextField.invalidEdit()
javax.swing.JFormattedTextField.AbstractFormatter.invalidEdit()


Occurences of InvalidKeyException

InvalidKeyException occurences:
java.security.InvalidKeyException
javax.management.openmbean.InvalidKeyException


Occurences of InvalidKeyException (constructors)

InvalidKeyException (constructors) occurences:
java.security.InvalidKeyException()
java.security.InvalidKeyException(java.lang.String)
java.security.InvalidKeyException(java.lang.String, java.lang.Throwable)
java.security.InvalidKeyException(java.lang.Throwable)
javax.management.openmbean.InvalidKeyException()
javax.management.openmbean.InvalidKeyException(java.lang.String)


Occurences of InvalidKeySpecException (constructors)

InvalidKeySpecException (constructors) occurences:
java.security.spec.InvalidKeySpecException()
java.security.spec.InvalidKeySpecException(java.lang.String)
java.security.spec.InvalidKeySpecException(java.lang.String, java.lang.Throwable)
java.security.spec.InvalidKeySpecException(java.lang.Throwable)


Occurences of InvalidLineNumberException (constructors)

InvalidLineNumberException (constructors) occurences:
com.sun.jdi.InvalidLineNumberException()
com.sun.jdi.InvalidLineNumberException(java.lang.String)


Occurences of InvalidMidiDataException (constructors)

InvalidMidiDataException (constructors) occurences:
javax.sound.midi.InvalidMidiDataException()
javax.sound.midi.InvalidMidiDataException(java.lang.String)


Occurences of InvalidName

InvalidName occurences:
org.omg.CORBA.ORBPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName


Occurences of InvalidName (constructors)

InvalidName (constructors) occurences:
org.omg.CORBA.ORBPackage.InvalidName()
org.omg.CORBA.ORBPackage.InvalidName(java.lang.String)
org.omg.CosNaming.NamingContextPackage.InvalidName()
org.omg.CosNaming.NamingContextPackage.InvalidName(java.lang.String)
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName()
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName(java.lang.String)


Occurences of InvalidNameException (constructors)

InvalidNameException (constructors) occurences:
javax.naming.InvalidNameException()
javax.naming.InvalidNameException(java.lang.String)


Occurences of InvalidNameHelper

InvalidNameHelper occurences:
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper


Occurences of InvalidNameHelper (constructors)

InvalidNameHelper (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper()
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper()


Occurences of InvalidNameHolder (constructors)

InvalidNameHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder()
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder(org.omg.CosNaming.NamingContextPackage.InvalidName)


Occurences of InvalidOpenTypeException (constructors)

InvalidOpenTypeException (constructors) occurences:
javax.management.openmbean.InvalidOpenTypeException()
javax.management.openmbean.InvalidOpenTypeException(java.lang.String)


Occurences of InvalidParameterException (constructors)

InvalidParameterException (constructors) occurences:
java.security.InvalidParameterException()
java.security.InvalidParameterException(java.lang.String)


Occurences of InvalidParameterSpecException (constructors)

InvalidParameterSpecException (constructors) occurences:
java.security.spec.InvalidParameterSpecException()
java.security.spec.InvalidParameterSpecException(java.lang.String)


Occurences of InvalidPathException (constructors)

InvalidPathException (constructors) occurences:
java.nio.file.InvalidPathException(java.lang.String, java.lang.String)
java.nio.file.InvalidPathException(java.lang.String, java.lang.String, int)


Occurences of InvalidPolicy (constructors)

InvalidPolicy (constructors) occurences:
org.omg.PortableServer.POAPackage.InvalidPolicy()
org.omg.PortableServer.POAPackage.InvalidPolicy(java.lang.String, short)
org.omg.PortableServer.POAPackage.InvalidPolicy(short)


Occurences of InvalidPreferencesFormatException (constructors)

InvalidPreferencesFormatException (constructors) occurences:
java.util.prefs.InvalidPreferencesFormatException(java.lang.String)
java.util.prefs.InvalidPreferencesFormatException(java.lang.String, java.lang.Throwable)
java.util.prefs.InvalidPreferencesFormatException(java.lang.Throwable)


Occurences of InvalidPropertiesFormatException (constructors)

InvalidPropertiesFormatException (constructors) occurences:
java.util.InvalidPropertiesFormatException(java.lang.String)
java.util.InvalidPropertiesFormatException(java.lang.Throwable)


Occurences of InvalidRelationIdException (constructors)

InvalidRelationIdException (constructors) occurences:
javax.management.relation.InvalidRelationIdException()
javax.management.relation.InvalidRelationIdException(java.lang.String)


Occurences of InvalidRelationServiceException (constructors)

InvalidRelationServiceException (constructors) occurences:
javax.management.relation.InvalidRelationServiceException()
javax.management.relation.InvalidRelationServiceException(java.lang.String)


Occurences of InvalidRelationTypeException (constructors)

InvalidRelationTypeException (constructors) occurences:
javax.management.relation.InvalidRelationTypeException()
javax.management.relation.InvalidRelationTypeException(java.lang.String)


Occurences of InvalidRequestStateException (constructors)

InvalidRequestStateException (constructors) occurences:
com.sun.jdi.request.InvalidRequestStateException()
com.sun.jdi.request.InvalidRequestStateException(java.lang.String)


Occurences of InvalidRoleInfoException (constructors)

InvalidRoleInfoException (constructors) occurences:
javax.management.relation.InvalidRoleInfoException()
javax.management.relation.InvalidRoleInfoException(java.lang.String)


Occurences of InvalidRoleValueException (constructors)

InvalidRoleValueException (constructors) occurences:
javax.management.relation.InvalidRoleValueException()
javax.management.relation.InvalidRoleValueException(java.lang.String)


Occurences of InvalidSearchControlsException (constructors)

InvalidSearchControlsException (constructors) occurences:
javax.naming.directory.InvalidSearchControlsException()
javax.naming.directory.InvalidSearchControlsException(java.lang.String)


Occurences of InvalidSearchFilterException (constructors)

InvalidSearchFilterException (constructors) occurences:
javax.naming.directory.InvalidSearchFilterException()
javax.naming.directory.InvalidSearchFilterException(java.lang.String)


Occurences of InvalidSeq (constructors)

InvalidSeq (constructors) occurences:
org.omg.CORBA.DynAnyPackage.InvalidSeq()
org.omg.CORBA.DynAnyPackage.InvalidSeq(java.lang.String)


Occurences of InvalidSlot (constructors)

InvalidSlot (constructors) occurences:
org.omg.PortableInterceptor.InvalidSlot()
org.omg.PortableInterceptor.InvalidSlot(java.lang.String)


Occurences of InvalidStackFrameException (constructors)

InvalidStackFrameException (constructors) occurences:
com.sun.jdi.InvalidStackFrameException()
com.sun.jdi.InvalidStackFrameException(java.lang.String)


Occurences of InvalidTargetObjectTypeException (constructors)

InvalidTargetObjectTypeException (constructors) occurences:
javax.management.modelmbean.InvalidTargetObjectTypeException()
javax.management.modelmbean.InvalidTargetObjectTypeException(java.lang.Exception, java.lang.String)
javax.management.modelmbean.InvalidTargetObjectTypeException(java.lang.String)


Occurences of InvalidTransactionException (constructors)

InvalidTransactionException (constructors) occurences:
javax.transaction.InvalidTransactionException()
javax.transaction.InvalidTransactionException(java.lang.String)


Occurences of InvalidTypeException (constructors)

InvalidTypeException (constructors) occurences:
com.sun.jdi.InvalidTypeException()
com.sun.jdi.InvalidTypeException(java.lang.String)


Occurences of InvalidTypeForEncoding (constructors)

InvalidTypeForEncoding (constructors) occurences:
org.omg.IOP.CodecPackage.InvalidTypeForEncoding()
org.omg.IOP.CodecPackage.InvalidTypeForEncoding(java.lang.String)


Occurences of InvalidValue

InvalidValue occurences:
org.omg.CORBA.DynAnyPackage.InvalidValue
org.omg.DynamicAny.DynAnyPackage.InvalidValue


Occurences of InvalidValue (constructors)

InvalidValue (constructors) occurences:
org.omg.CORBA.DynAnyPackage.InvalidValue()
org.omg.CORBA.DynAnyPackage.InvalidValue(java.lang.String)
org.omg.DynamicAny.DynAnyPackage.InvalidValue()
org.omg.DynamicAny.DynAnyPackage.InvalidValue(java.lang.String)


Occurences of INVALID_ACTIVITY (constructors)

INVALID_ACTIVITY (constructors) occurences:
org.omg.CORBA.INVALID_ACTIVITY()
org.omg.CORBA.INVALID_ACTIVITY(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INVALID_ACTIVITY(java.lang.String)
org.omg.CORBA.INVALID_ACTIVITY(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of INVALID_TRANSACTION (constructors)

INVALID_TRANSACTION (constructors) occurences:
org.omg.CORBA.INVALID_TRANSACTION()
org.omg.CORBA.INVALID_TRANSACTION(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INVALID_TRANSACTION(java.lang.String)
org.omg.CORBA.INVALID_TRANSACTION(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of inverseTransform

inverseTransform occurences:
java.awt.geom.AffineTransform.inverseTransform(double:A, int, double:A, int, int)
java.awt.geom.AffineTransform.inverseTransform(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of InvocationEvent (constructors)

InvocationEvent (constructors) occurences:
java.awt.event.InvocationEvent(java.lang.Object, int, java.lang.Runnable, java.lang.Object, boolean)
java.awt.event.InvocationEvent(java.lang.Object, java.lang.Runnable)
java.awt.event.InvocationEvent(java.lang.Object, java.lang.Runnable, java.lang.Object, boolean)
java.awt.event.InvocationEvent(java.lang.Object, java.lang.Runnable, java.lang.Runnable, boolean)


Occurences of InvocationTargetException (constructors)

InvocationTargetException (constructors) occurences:
java.lang.reflect.InvocationTargetException()
java.lang.reflect.InvocationTargetException(java.lang.Throwable)
java.lang.reflect.InvocationTargetException(java.lang.Throwable, java.lang.String)


Occurences of INVOICE

INVOICE occurences:
java.awt.INVOICE
javax.print.attribute.standard.INVOICE
javax.print.attribute.standard.INVOICE


Occurences of invoke

invoke occurences:
compact1.java.lang.invoke
compact2.java.lang.invoke
compact3.java.lang.invoke
java.beans.EventHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object:A)
java.lang.invoke
java.lang.invoke.MethodHandle.invoke(java.lang.Object...)
java.lang.reflect.InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object:A)
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...)
java.rmi.server.RemoteObjectInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object:A)
java.rmi.server.RemoteRef.invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object:A, long)
java.rmi.server.RemoteRef.invoke(java.rmi.server.RemoteCall)
java.util.concurrent.ForkJoinPool.invoke(java.util.concurrent.ForkJoinTask)
java.util.concurrent.ForkJoinTask.invoke()
javax.management.DynamicMBean.invoke(java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServer.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServerConnection.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.management.MBeanServerInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object:A)
javax.management.modelmbean.RequiredModelMBean.invoke(java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.management.openmbean.CompositeDataInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object:A)
javax.management.remote.rmi.RMIConnection.invoke(javax.management.ObjectName, java.lang.String, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.invoke(javax.management.ObjectName, java.lang.String, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(javax.management.ObjectName, java.lang.String, java.rmi.MarshalledObject, java.lang.String:A, javax.security.auth.Subject)
javax.management.StandardMBean.invoke(java.lang.String, java.lang.Object:A, java.lang.String:A)
javax.xml.ws.Dispatch.invoke(java.lang.Object)
javax.xml.ws.Dispatch.invoke(T)
javax.xml.ws.Provider.invoke(java.lang.Object)
javax.xml.ws.Provider.invoke(T)
javax.xml.ws.spi.Invoker.invoke(java.lang.reflect.Method, java.lang.Object...)
org.omg.CORBA.DynamicImplementation.invoke(org.omg.CORBA.ServerRequest)
org.omg.CORBA.portable.Delegate.invoke(org.omg.CORBA.Object, org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.Request.invoke()
org.omg.CosNaming._BindingIteratorImplBase.invoke(org.omg.CORBA.ServerRequest)
org.omg.CosNaming._NamingContextImplBase.invoke(org.omg.CORBA.ServerRequest)
org.omg.PortableServer.DynamicImplementation.invoke(org.omg.CORBA.ServerRequest)


Occurences of invokeAll

invokeAll occurences:
java.util.concurrent.AbstractExecutorService.invokeAll(java.util.Collection)
java.util.concurrent.AbstractExecutorService.invokeAll(java.util.Collection, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ExecutorService.invokeAll(java.util.Collection)
java.util.concurrent.ExecutorService.invokeAll(java.util.Collection, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ForkJoinPool.invokeAll(java.util.Collection)
java.util.concurrent.ForkJoinTask.invokeAll(java.util.Collection)
java.util.concurrent.ForkJoinTask.invokeAll(java.util.concurrent.ForkJoinTask, java.util.concurrent.ForkJoinTask)
java.util.concurrent.ForkJoinTask.invokeAll(java.util.concurrent.ForkJoinTask...)


Occurences of invokeAndWait

invokeAndWait occurences:
java.awt.EventQueue.invokeAndWait(java.lang.Runnable)
javax.swing.SwingUtilities.invokeAndWait(java.lang.Runnable)


Occurences of invokeAny

invokeAny occurences:
java.util.concurrent.AbstractExecutorService.invokeAny(java.util.Collection)
java.util.concurrent.AbstractExecutorService.invokeAny(java.util.Collection, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ExecutorService.invokeAny(java.util.Collection)
java.util.concurrent.ExecutorService.invokeAny(java.util.Collection, long, java.util.concurrent.TimeUnit)


Occurences of invokeAsync

invokeAsync occurences:
javax.xml.ws.Dispatch.invokeAsync(java.lang.Object)
javax.xml.ws.Dispatch.invokeAsync(java.lang.Object, javax.xml.ws.AsyncHandler)
javax.xml.ws.Dispatch.invokeAsync(T)
javax.xml.ws.Dispatch.invokeAsync(T, javax.xml.ws.AsyncHandler)


Occurences of invokeLater

invokeLater occurences:
java.awt.EventQueue.invokeLater(java.lang.Runnable)
javax.swing.SwingUtilities.invokeLater(java.lang.Runnable)


Occurences of invokeMethod

invokeMethod occurences:
com.sun.jdi.ClassType.invokeMethod(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List, int)
com.sun.jdi.ObjectReference.invokeMethod(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List, int)
javax.script.Invocable.invokeMethod(java.lang.Object, java.lang.String, java.lang.Object...)


Occurences of invokeOneWay

invokeOneWay occurences:
javax.xml.ws.Dispatch.invokeOneWay(java.lang.Object)
javax.xml.ws.Dispatch.invokeOneWay(T)


Occurences of invokeWithArguments

invokeWithArguments occurences:
java.lang.invoke.MethodHandle.invokeWithArguments(java.lang.Object...)
java.lang.invoke.MethodHandle.invokeWithArguments(java.util.List)


Occurences of INVOKE_SINGLE_THREADED

INVOKE_SINGLE_THREADED occurences:
com.sun.jdi.INVOKE_SINGLE_THREADED
com.sun.jdi.INVOKE_SINGLE_THREADED


Occurences of INV_FLAG (constructors)

INV_FLAG (constructors) occurences:
org.omg.CORBA.INV_FLAG()
org.omg.CORBA.INV_FLAG(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INV_FLAG(java.lang.String)
org.omg.CORBA.INV_FLAG(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of INV_IDENT (constructors)

INV_IDENT (constructors) occurences:
org.omg.CORBA.INV_IDENT()
org.omg.CORBA.INV_IDENT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INV_IDENT(java.lang.String)
org.omg.CORBA.INV_IDENT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of INV_OBJREF (constructors)

INV_OBJREF (constructors) occurences:
org.omg.CORBA.INV_OBJREF()
org.omg.CORBA.INV_OBJREF(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INV_OBJREF(java.lang.String)
org.omg.CORBA.INV_OBJREF(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of INV_POLICY (constructors)

INV_POLICY (constructors) occurences:
org.omg.CORBA.INV_POLICY()
org.omg.CORBA.INV_POLICY(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.INV_POLICY(java.lang.String)
org.omg.CORBA.INV_POLICY(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of io

io occurences:
compact1.java.io
compact2.java.io
compact3.java.io
java.io


Occurences of ioException

ioException occurences:
java.util.Formatter.ioException()
java.util.Scanner.ioException()


Occurences of IOException (constructors)

IOException (constructors) occurences:
java.io.IOException()
java.io.IOException(java.lang.String)
java.io.IOException(java.lang.String, java.lang.Throwable)
java.io.IOException(java.lang.Throwable)


Occurences of IOR (constructors)

IOR (constructors) occurences:
org.omg.IOP.IOR()
org.omg.IOP.IOR(java.lang.String, org.omg.IOP.TaggedProfile:A)


Occurences of IORHolder (constructors)

IORHolder (constructors) occurences:
org.omg.IOP.IORHolder()
org.omg.IOP.IORHolder(org.omg.IOP.IOR)


Occurences of IORInterceptor_3_0Holder (constructors)

IORInterceptor_3_0Holder (constructors) occurences:
org.omg.PortableInterceptor.IORInterceptor_3_0Holder()
org.omg.PortableInterceptor.IORInterceptor_3_0Holder(org.omg.PortableInterceptor.IORInterceptor_3_0)


Occurences of IP_MULTICAST_IF

IP_MULTICAST_IF occurences:
java.net.IP_MULTICAST_IF
java.net.IP_MULTICAST_IF


Occurences of IP_MULTICAST_LOOP

IP_MULTICAST_LOOP occurences:
java.net.IP_MULTICAST_LOOP
java.net.IP_MULTICAST_LOOP


Occurences of IP_TOS

IP_TOS occurences:
java.net.IP_TOS
java.net.IP_TOS


Occurences of isAbsolute

isAbsolute occurences:
java.io.File.isAbsolute()
java.net.URI.isAbsolute()
java.nio.file.Path.isAbsolute()


Occurences of isAbstract

isAbstract occurences:
com.sun.javadoc.ClassDoc.isAbstract()
com.sun.javadoc.MethodDoc.isAbstract()
com.sun.jdi.Method.isAbstract()
com.sun.jdi.ReferenceType.isAbstract()
java.lang.reflect.Modifier.isAbstract(int)


Occurences of isAccessible

isAccessible occurences:
com.sun.source.util.Trees.isAccessible(com.sun.source.tree.Scope, javax.lang.model.element.Element, javax.lang.model.type.DeclaredType)
com.sun.source.util.Trees.isAccessible(com.sun.source.tree.Scope, javax.lang.model.element.TypeElement)
java.lang.reflect.AccessibleObject.isAccessible()


Occurences of isAccessibleChildSelected

isAccessibleChildSelected occurences:
java.awt.List.AccessibleAWTList.isAccessibleChildSelected(int)
java.awt.MenuComponent.AccessibleAWTMenuComponent.isAccessibleChildSelected(int)
javax.accessibility.AccessibleSelection.isAccessibleChildSelected(int)
javax.swing.JComboBox.AccessibleJComboBox.isAccessibleChildSelected(int)
javax.swing.JList.AccessibleJList.isAccessibleChildSelected(int)
javax.swing.JMenu.AccessibleJMenu.isAccessibleChildSelected(int)
javax.swing.JMenuBar.AccessibleJMenuBar.isAccessibleChildSelected(int)
javax.swing.JTabbedPane.AccessibleJTabbedPane.isAccessibleChildSelected(int)
javax.swing.JTable.AccessibleJTable.isAccessibleChildSelected(int)
javax.swing.JTree.AccessibleJTree.isAccessibleChildSelected(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.isAccessibleChildSelected(int)


Occurences of isAccessibleColumnSelected

isAccessibleColumnSelected occurences:
javax.accessibility.AccessibleTable.isAccessibleColumnSelected(int)
javax.swing.JTable.AccessibleJTable.isAccessibleColumnSelected(int)


Occurences of isAccessibleRowSelected

isAccessibleRowSelected occurences:
javax.accessibility.AccessibleTable.isAccessibleRowSelected(int)
javax.swing.JTable.AccessibleJTable.isAccessibleRowSelected(int)


Occurences of isAccessibleSelected

isAccessibleSelected occurences:
javax.accessibility.AccessibleTable.isAccessibleSelected(int, int)
javax.swing.JTable.AccessibleJTable.isAccessibleSelected(int, int)


Occurences of isActive

isActive occurences:
java.applet.Applet.isActive()
java.applet.AppletStub.isActive()
java.awt.dnd.DropTarget.isActive()
java.awt.Window.isActive()
javax.management.monitor.Monitor.isActive()
javax.management.monitor.MonitorMBean.isActive()
javax.management.relation.RelationService.isActive()
javax.management.relation.RelationServiceMBean.isActive()
javax.management.remote.JMXConnectorServerMBean.isActive()
javax.management.remote.rmi.RMIConnectorServer.isActive()
javax.management.timer.Timer.isActive()
javax.management.timer.TimerMBean.isActive()
javax.sound.sampled.DataLine.isActive()
javax.swing.text.DefaultCaret.isActive()


Occurences of isAddedPath

isAddedPath occurences:
javax.swing.event.TreeSelectionEvent.isAddedPath()
javax.swing.event.TreeSelectionEvent.isAddedPath(int)
javax.swing.event.TreeSelectionEvent.isAddedPath(javax.swing.tree.TreePath)


Occurences of isAfter

isAfter occurences:
java.time.chrono.ChronoLocalDate.isAfter(java.time.chrono.ChronoLocalDate)
java.time.chrono.ChronoLocalDateTime.isAfter(java.time.chrono.ChronoLocalDateTime)
java.time.chrono.ChronoZonedDateTime.isAfter(java.time.chrono.ChronoZonedDateTime)
java.time.Instant.isAfter(java.time.Instant)
java.time.LocalDate.isAfter(java.time.chrono.ChronoLocalDate)
java.time.LocalDateTime.isAfter(java.time.chrono.ChronoLocalDateTime)
java.time.LocalTime.isAfter(java.time.LocalTime)
java.time.MonthDay.isAfter(java.time.MonthDay)
java.time.OffsetDateTime.isAfter(java.time.OffsetDateTime)
java.time.OffsetTime.isAfter(java.time.OffsetTime)
java.time.Year.isAfter(java.time.Year)
java.time.YearMonth.isAfter(java.time.YearMonth)
javax.swing.text.BoxView.isAfter(int, int, java.awt.Rectangle)
javax.swing.text.CompositeView.isAfter(int, int, java.awt.Rectangle)


Occurences of isAlive

isAlive occurences:
java.lang.Process.isAlive()
java.lang.Thread.isAlive()


Occurences of isAlphaPremultiplied

isAlphaPremultiplied occurences:
java.awt.image.BufferedImage.isAlphaPremultiplied()
java.awt.image.ColorModel.isAlphaPremultiplied()


Occurences of isAlwaysOnTopSupported

isAlwaysOnTopSupported occurences:
java.awt.Toolkit.isAlwaysOnTopSupported()
java.awt.Window.isAlwaysOnTopSupported()


Occurences of isAnnotationPresent

isAnnotationPresent occurences:
java.lang.Class.isAnnotationPresent(java.lang.Class)
java.lang.Package.isAnnotationPresent(java.lang.Class)
java.lang.reflect.AccessibleObject.isAnnotationPresent(java.lang.Class)
java.lang.reflect.AnnotatedElement.isAnnotationPresent(java.lang.Class)


Occurences of isAnyLocalAddress

isAnyLocalAddress occurences:
java.net.Inet4Address.isAnyLocalAddress()
java.net.Inet6Address.isAnyLocalAddress()
java.net.InetAddress.isAnyLocalAddress()


Occurences of isArmed

isArmed occurences:
javax.swing.ButtonModel.isArmed()
javax.swing.DefaultButtonModel.isArmed()
javax.swing.JMenuItem.isArmed()


Occurences of isArray

isArray occurences:
java.lang.Class.isArray()
javax.management.openmbean.OpenType.isArray()


Occurences of isAttributeRequired

isAttributeRequired occurences:
javax.imageio.metadata.IIOMetadataFormat.isAttributeRequired(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataFormatImpl.isAttributeRequired(java.lang.String, java.lang.String)


Occurences of isAttributeSpecified

isAttributeSpecified occurences:
javax.xml.stream.util.StreamReaderDelegate.isAttributeSpecified(int)
javax.xml.stream.XMLStreamReader.isAttributeSpecified(int)


Occurences of isAutoIncrement

isAutoIncrement occurences:
java.sql.ResultSetMetaData.isAutoIncrement(int)
javax.sql.rowset.RowSetMetaDataImpl.isAutoIncrement(int)


Occurences of isBefore

isBefore occurences:
java.time.chrono.ChronoLocalDate.isBefore(java.time.chrono.ChronoLocalDate)
java.time.chrono.ChronoLocalDateTime.isBefore(java.time.chrono.ChronoLocalDateTime)
java.time.chrono.ChronoZonedDateTime.isBefore(java.time.chrono.ChronoZonedDateTime)
java.time.Instant.isBefore(java.time.Instant)
java.time.LocalDate.isBefore(java.time.chrono.ChronoLocalDate)
java.time.LocalDateTime.isBefore(java.time.chrono.ChronoLocalDateTime)
java.time.LocalTime.isBefore(java.time.LocalTime)
java.time.MonthDay.isBefore(java.time.MonthDay)
java.time.OffsetDateTime.isBefore(java.time.OffsetDateTime)
java.time.OffsetTime.isBefore(java.time.OffsetTime)
java.time.Year.isBefore(java.time.Year)
java.time.YearMonth.isBefore(java.time.YearMonth)
javax.swing.text.BoxView.isBefore(int, int, java.awt.Rectangle)
javax.swing.text.CompositeView.isBefore(int, int, java.awt.Rectangle)


Occurences of isBlocking

isBlocking occurences:
java.nio.channels.SelectableChannel.isBlocking()
java.nio.channels.spi.AbstractSelectableChannel.isBlocking()


Occurences of isBold

isBold occurences:
java.awt.Font.isBold()
javax.swing.text.StyleConstants.isBold(javax.swing.text.AttributeSet)


Occurences of isBorderOpaque

isBorderOpaque occurences:
javax.swing.border.AbstractBorder.isBorderOpaque()
javax.swing.border.BevelBorder.isBorderOpaque()
javax.swing.border.Border.isBorderOpaque()
javax.swing.border.CompoundBorder.isBorderOpaque()
javax.swing.border.EmptyBorder.isBorderOpaque()
javax.swing.border.EtchedBorder.isBorderOpaque()
javax.swing.border.LineBorder.isBorderOpaque()
javax.swing.border.MatteBorder.isBorderOpaque()
javax.swing.border.SoftBevelBorder.isBorderOpaque()
javax.swing.border.TitledBorder.isBorderOpaque()
javax.swing.plaf.basic.BasicBorders.SplitPaneBorder.isBorderOpaque()
javax.swing.plaf.BorderUIResource.isBorderOpaque()


Occurences of isBorderPainted

isBorderPainted occurences:
javax.swing.AbstractButton.isBorderPainted()
javax.swing.JMenuBar.isBorderPainted()
javax.swing.JPopupMenu.isBorderPainted()
javax.swing.JProgressBar.isBorderPainted()
javax.swing.JToolBar.isBorderPainted()


Occurences of isBound

isBound occurences:
java.beans.PropertyDescriptor.isBound()
java.net.DatagramSocket.isBound()
java.net.ServerSocket.isBound()
java.net.Socket.isBound()
javax.security.auth.kerberos.KeyTab.isBound()


Occurences of isBridge

isBridge occurences:
com.sun.jdi.Method.isBridge()
java.lang.reflect.Method.isBridge()


Occurences of isCached

isCached occurences:
javax.imageio.stream.FileCacheImageInputStream.isCached()
javax.imageio.stream.FileCacheImageOutputStream.isCached()
javax.imageio.stream.ImageInputStream.isCached()
javax.imageio.stream.ImageInputStreamImpl.isCached()
javax.imageio.stream.MemoryCacheImageInputStream.isCached()
javax.imageio.stream.MemoryCacheImageOutputStream.isCached()


Occurences of isCachedFile

isCachedFile occurences:
javax.imageio.stream.FileCacheImageInputStream.isCachedFile()
javax.imageio.stream.FileCacheImageOutputStream.isCachedFile()
javax.imageio.stream.ImageInputStream.isCachedFile()
javax.imageio.stream.ImageInputStreamImpl.isCachedFile()
javax.imageio.stream.MemoryCacheImageInputStream.isCachedFile()
javax.imageio.stream.MemoryCacheImageOutputStream.isCachedFile()


Occurences of isCachedMemory

isCachedMemory occurences:
javax.imageio.stream.FileCacheImageInputStream.isCachedMemory()
javax.imageio.stream.FileCacheImageOutputStream.isCachedMemory()
javax.imageio.stream.ImageInputStream.isCachedMemory()
javax.imageio.stream.ImageInputStreamImpl.isCachedMemory()
javax.imageio.stream.MemoryCacheImageInputStream.isCachedMemory()
javax.imageio.stream.MemoryCacheImageOutputStream.isCachedMemory()


Occurences of isCancelled

isCancelled occurences:
java.awt.print.PrinterJob.isCancelled()
java.util.concurrent.CompletableFuture.isCancelled()
java.util.concurrent.ForkJoinTask.isCancelled()
java.util.concurrent.Future.isCancelled()
java.util.concurrent.FutureTask.isCancelled()
javax.swing.SwingWorker.isCancelled()


Occurences of isCaseIgnored

isCaseIgnored occurences:
javax.naming.directory.Attributes.isCaseIgnored()
javax.naming.directory.BasicAttributes.isCaseIgnored()


Occurences of isCaseSensitive

isCaseSensitive occurences:
java.sql.ResultSetMetaData.isCaseSensitive(int)
javax.sql.rowset.RowSetMetaDataImpl.isCaseSensitive(int)


Occurences of isCellEditable

isCellEditable occurences:
javax.swing.AbstractCellEditor.isCellEditable(java.util.EventObject)
javax.swing.CellEditor.isCellEditable(java.util.EventObject)
javax.swing.DefaultCellEditor.isCellEditable(java.util.EventObject)
javax.swing.DefaultCellEditor.EditorDelegate.isCellEditable(java.util.EventObject)
javax.swing.JTable.isCellEditable(int, int)
javax.swing.table.AbstractTableModel.isCellEditable(int, int)
javax.swing.table.DefaultTableModel.isCellEditable(int, int)
javax.swing.table.TableModel.isCellEditable(int, int)
javax.swing.tree.DefaultTreeCellEditor.isCellEditable(java.util.EventObject)


Occurences of isCharacters

isCharacters occurences:
javax.xml.stream.events.XMLEvent.isCharacters()
javax.xml.stream.util.StreamReaderDelegate.isCharacters()
javax.xml.stream.XMLStreamReader.isCharacters()


Occurences of isClass

isClass occurences:
com.sun.javadoc.Doc.isClass()
javax.lang.model.element.ElementKind.isClass()


Occurences of isClosed

isClosed occurences:
java.net.DatagramSocket.isClosed()
java.net.ServerSocket.isClosed()
java.net.Socket.isClosed()
java.sql.Connection.isClosed()
java.sql.ResultSet.isClosed()
java.sql.Statement.isClosed()
javax.swing.isClosed
javax.swing.JInternalFrame.isClosed()


Occurences of isCollapsed

isCollapsed occurences:
javax.swing.JTree.isCollapsed(int)
javax.swing.JTree.isCollapsed(javax.swing.tree.TreePath)


Occurences of isCompatibleRaster

isCompatibleRaster occurences:
java.awt.image.ColorModel.isCompatibleRaster(java.awt.image.Raster)
java.awt.image.ComponentColorModel.isCompatibleRaster(java.awt.image.Raster)
java.awt.image.DirectColorModel.isCompatibleRaster(java.awt.image.Raster)
java.awt.image.IndexColorModel.isCompatibleRaster(java.awt.image.Raster)


Occurences of isCompatibleSampleModel

isCompatibleSampleModel occurences:
java.awt.image.ColorModel.isCompatibleSampleModel(java.awt.image.SampleModel)
java.awt.image.ComponentColorModel.isCompatibleSampleModel(java.awt.image.SampleModel)
java.awt.image.IndexColorModel.isCompatibleSampleModel(java.awt.image.SampleModel)
java.awt.image.PackedColorModel.isCompatibleSampleModel(java.awt.image.SampleModel)


Occurences of isComplete

isComplete occurences:
javax.security.sasl.SaslClient.isComplete()
javax.security.sasl.SaslServer.isComplete()


Occurences of isCompositionEnabled

isCompositionEnabled occurences:
java.awt.im.InputContext.isCompositionEnabled()
java.awt.im.spi.InputMethod.isCompositionEnabled()


Occurences of isCompressionLossless

isCompressionLossless occurences:
javax.imageio.ImageWriteParam.isCompressionLossless()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.isCompressionLossless()


Occurences of isConnected

isConnected occurences:
java.net.DatagramSocket.isConnected()
java.net.Socket.isConnected()
java.nio.channels.DatagramChannel.isConnected()
java.nio.channels.SocketChannel.isConnected()


Occurences of isConstructor

isConstructor occurences:
com.sun.javadoc.Doc.isConstructor()
com.sun.jdi.Method.isConstructor()


Occurences of isConsumed

isConsumed occurences:
java.awt.AWTEvent.isConsumed()
java.awt.event.InputEvent.isConsumed()
java.awt.event.InputMethodEvent.isConsumed()


Occurences of isConsumer

isConsumer occurences:
java.awt.image.FilteredImageSource.isConsumer(java.awt.image.ImageConsumer)
java.awt.image.ImageProducer.isConsumer(java.awt.image.ImageConsumer)
java.awt.image.MemoryImageSource.isConsumer(java.awt.image.ImageConsumer)
java.awt.image.renderable.RenderableImageProducer.isConsumer(java.awt.image.ImageConsumer)


Occurences of isContinuousLayout

isContinuousLayout occurences:
javax.swing.JSplitPane.isContinuousLayout()
javax.swing.plaf.basic.BasicSplitPaneUI.isContinuousLayout()


Occurences of isConversionSupported

isConversionSupported occurences:
javax.sound.sampled.AudioSystem.isConversionSupported(javax.sound.sampled.AudioFormat, javax.sound.sampled.AudioFormat)
javax.sound.sampled.AudioSystem.isConversionSupported(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioFormat)
javax.sound.sampled.spi.FormatConversionProvider.isConversionSupported(javax.sound.sampled.AudioFormat, javax.sound.sampled.AudioFormat)
javax.sound.sampled.spi.FormatConversionProvider.isConversionSupported(javax.sound.sampled.AudioFormat.Encoding, javax.sound.sampled.AudioFormat)


Occurences of isCritical

isCritical occurences:
java.security.cert.Extension.isCritical()
java.security.cert.PolicyNode.isCritical()
javax.naming.ldap.BasicControl.isCritical()
javax.naming.ldap.Control.isCritical()


Occurences of isCurrency

isCurrency occurences:
java.sql.ResultSetMetaData.isCurrency(int)
javax.sql.rowset.RowSetMetaDataImpl.isCurrency(int)


Occurences of isCurrent

isCurrent occurences:
javax.security.auth.kerberos.KerberosTicket.isCurrent()
javax.security.auth.Refreshable.isCurrent()


Occurences of isDaemon

isDaemon occurences:
java.lang.Thread.isDaemon()
java.lang.ThreadGroup.isDaemon()


Occurences of isDataFlavorSupported

isDataFlavorSupported occurences:
java.awt.datatransfer.StringSelection.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
java.awt.datatransfer.Transferable.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
java.awt.dnd.DropTargetContext.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
java.awt.dnd.DropTargetContext.TransferableProxy.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
java.awt.dnd.DropTargetDragEvent.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
java.awt.dnd.DropTargetDropEvent.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
javax.activation.DataHandler.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)
javax.swing.TransferHandler.TransferSupport.isDataFlavorSupported(java.awt.datatransfer.DataFlavor)


Occurences of isDateBased

isDateBased occurences:
java.time.temporal.ChronoField.isDateBased()
java.time.temporal.ChronoUnit.isDateBased()
java.time.temporal.TemporalField.isDateBased()
java.time.temporal.TemporalUnit.isDateBased()


Occurences of isDeclared

isDeclared occurences:
org.xml.sax.ext.Attributes2.isDeclared(int)
org.xml.sax.ext.Attributes2.isDeclared(java.lang.String)
org.xml.sax.ext.Attributes2.isDeclared(java.lang.String, java.lang.String)
org.xml.sax.ext.Attributes2Impl.isDeclared(int)
org.xml.sax.ext.Attributes2Impl.isDeclared(java.lang.String)
org.xml.sax.ext.Attributes2Impl.isDeclared(java.lang.String, java.lang.String)


Occurences of isDefault

isDefault occurences:
com.sun.javadoc.MethodDoc.isDefault()
java.lang.reflect.Method.isDefault()
javax.lang.model.element.ExecutableElement.isDefault()


Occurences of isDefaultLookAndFeelDecorated

isDefaultLookAndFeelDecorated occurences:
javax.swing.JDialog.isDefaultLookAndFeelDecorated()
javax.swing.JFrame.isDefaultLookAndFeelDecorated()


Occurences of isDefaultNamespace

isDefaultNamespace occurences:
javax.imageio.metadata.IIOMetadataNode.isDefaultNamespace(java.lang.String)
org.w3c.dom.Node.isDefaultNamespace(java.lang.String)


Occurences of isDefined

isDefined occurences:
java.lang.Character.isDefined(char)
java.lang.Character.isDefined(int)
javax.swing.text.AbstractDocument.AbstractElement.isDefined(java.lang.Object)
javax.swing.text.AttributeSet.isDefined(java.lang.Object)
javax.swing.text.SimpleAttributeSet.isDefined(java.lang.Object)
javax.swing.text.StyleContext.NamedStyle.isDefined(java.lang.Object)
javax.swing.text.StyleContext.SmallAttributeSet.isDefined(java.lang.Object)


Occurences of isDefinitelyWritable

isDefinitelyWritable occurences:
java.sql.ResultSetMetaData.isDefinitelyWritable(int)
javax.sql.rowset.RowSetMetaDataImpl.isDefinitelyWritable(int)


Occurences of isDesignTime

isDesignTime occurences:
java.beans.beancontext.BeanContextSupport.isDesignTime()
java.beans.Beans.isDesignTime()
java.beans.DesignMode.isDesignTime()


Occurences of isDestroyed

isDestroyed occurences:
java.lang.ThreadGroup.isDestroyed()
java.security.KeyStore.PasswordProtection.isDestroyed()
javax.security.auth.Destroyable.isDestroyed()
javax.security.auth.kerberos.KerberosKey.isDestroyed()
javax.security.auth.kerberos.KerberosTicket.isDestroyed()
javax.security.auth.x500.X500PrivateCredential.isDestroyed()


Occurences of isDigit

isDigit occurences:
java.lang.Character.isDigit(char)
java.lang.Character.isDigit(int)


Occurences of isDirect

isDirect occurences:
java.nio.Buffer.isDirect()
java.nio.ByteBuffer.isDirect()
java.nio.CharBuffer.isDirect()
java.nio.DoubleBuffer.isDirect()
java.nio.FloatBuffer.isDirect()
java.nio.IntBuffer.isDirect()
java.nio.LongBuffer.isDirect()
java.nio.ShortBuffer.isDirect()


Occurences of isDirectory

isDirectory occurences:
java.io.File.isDirectory()
java.nio.file.attribute.BasicFileAttributes.isDirectory()
java.nio.file.Files.isDirectory(java.nio.file.Path, java.nio.file.LinkOption...)
java.util.zip.ZipEntry.isDirectory()


Occurences of isDone

isDone occurences:
java.awt.geom.FlatteningPathIterator.isDone()
java.awt.geom.PathIterator.isDone()
java.util.concurrent.CompletableFuture.isDone()
java.util.concurrent.ForkJoinTask.isDone()
java.util.concurrent.Future.isDone()
java.util.concurrent.FutureTask.isDone()
javax.swing.SwingWorker.isDone()


Occurences of isDoubleBuffered

isDoubleBuffered occurences:
java.awt.Component.isDoubleBuffered()
javax.swing.JComponent.isDoubleBuffered()


Occurences of isDragging

isDragging occurences:
javax.swing.plaf.basic.BasicSliderUI.isDragging()
javax.swing.plaf.basic.isDragging
javax.swing.plaf.basic.isDragging


Occurences of isDurationEstimated

isDurationEstimated occurences:
java.time.temporal.ChronoUnit.isDurationEstimated()
java.time.temporal.TemporalUnit.isDurationEstimated()


Occurences of isDynamic

isDynamic occurences:
java.awt.image.renderable.ContextualRenderedImageFactory.isDynamic()
java.awt.image.renderable.RenderableImage.isDynamic()
java.awt.image.renderable.RenderableImageOp.isDynamic()


Occurences of isEditable

isEditable occurences:
java.awt.TextComponent.isEditable()
javax.swing.isEditable
javax.swing.JComboBox.isEditable()
javax.swing.JTree.isEditable()
javax.swing.plaf.basic.BasicTreeUI.isEditable()
javax.swing.text.JTextComponent.isEditable()


Occurences of isEditing

isEditing occurences:
javax.swing.JTable.isEditing()
javax.swing.JTree.isEditing()
javax.swing.plaf.basic.BasicTreeUI.isEditing(javax.swing.JTree)
javax.swing.plaf.multi.MultiTreeUI.isEditing(javax.swing.JTree)
javax.swing.plaf.TreeUI.isEditing(javax.swing.JTree)


Occurences of isEmpty

isEmpty occurences:
java.awt.geom.Arc2D.Double.isEmpty()
java.awt.geom.Arc2D.Float.isEmpty()
java.awt.geom.Area.isEmpty()
java.awt.geom.Ellipse2D.Double.isEmpty()
java.awt.geom.Ellipse2D.Float.isEmpty()
java.awt.geom.Rectangle2D.Double.isEmpty()
java.awt.geom.Rectangle2D.Float.isEmpty()
java.awt.geom.RectangularShape.isEmpty()
java.awt.geom.RoundRectangle2D.Double.isEmpty()
java.awt.geom.RoundRectangle2D.Float.isEmpty()
java.awt.Rectangle.isEmpty()
java.awt.RenderingHints.isEmpty()
java.beans.beancontext.BeanContextSupport.isEmpty()
java.lang.String.isEmpty()
java.util.AbstractCollection.isEmpty()
java.util.AbstractMap.isEmpty()
java.util.ArrayDeque.isEmpty()
java.util.ArrayList.isEmpty()
java.util.BitSet.isEmpty()
java.util.Collection.isEmpty()
java.util.concurrent.ConcurrentHashMap.isEmpty()
java.util.concurrent.ConcurrentHashMap.KeySetView.isEmpty()
java.util.concurrent.ConcurrentLinkedDeque.isEmpty()
java.util.concurrent.ConcurrentLinkedQueue.isEmpty()
java.util.concurrent.ConcurrentSkipListMap.isEmpty()
java.util.concurrent.ConcurrentSkipListSet.isEmpty()
java.util.concurrent.CopyOnWriteArrayList.isEmpty()
java.util.concurrent.CopyOnWriteArraySet.isEmpty()
java.util.concurrent.LinkedTransferQueue.isEmpty()
java.util.concurrent.SynchronousQueue.isEmpty()
java.util.Dictionary.isEmpty()
java.util.HashMap.isEmpty()
java.util.HashSet.isEmpty()
java.util.Hashtable.isEmpty()
java.util.IdentityHashMap.isEmpty()
java.util.jar.Attributes.isEmpty()
java.util.List.isEmpty()
java.util.Map.isEmpty()
java.util.Set.isEmpty()
java.util.TreeSet.isEmpty()
java.util.Vector.isEmpty()
java.util.WeakHashMap.isEmpty()
javax.activation.MimeTypeParameterList.isEmpty()
javax.management.openmbean.TabularData.isEmpty()
javax.management.openmbean.TabularDataSupport.isEmpty()
javax.management.timer.Timer.isEmpty()
javax.management.timer.TimerMBean.isEmpty()
javax.naming.CompositeName.isEmpty()
javax.naming.CompoundName.isEmpty()
javax.naming.ldap.LdapName.isEmpty()
javax.naming.Name.isEmpty()
javax.print.attribute.AttributeSet.isEmpty()
javax.print.attribute.HashAttributeSet.isEmpty()
javax.script.SimpleBindings.isEmpty()
javax.swing.DefaultListModel.isEmpty()
javax.swing.text.html.parser.Element.isEmpty()
javax.swing.text.SimpleAttributeSet.isEmpty()


Occurences of isEnabled

isEnabled occurences:
com.sun.jdi.request.EventRequest.isEnabled()
java.awt.Component.isEnabled()
java.awt.Component.AccessibleAWTComponent.isEnabled()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.isEnabled()
java.awt.MenuComponent.AccessibleAWTMenuComponent.isEnabled()
java.awt.MenuItem.isEnabled()
javax.accessibility.AccessibleComponent.isEnabled()
javax.swing.AbstractAction.isEnabled()
javax.swing.Action.isEnabled()
javax.swing.ButtonModel.isEnabled()
javax.swing.DefaultButtonModel.isEnabled()
javax.swing.JList.AccessibleJList.AccessibleJListChild.isEnabled()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.isEnabled()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.isEnabled()
javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction.isEnabled()
javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction.isEnabled()
javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction.isEnabled()
javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction.isEnabled()
javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction.isEnabled()
javax.swing.plaf.basic.BasicSliderUI.ActionScroller.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreePageAction.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.isEnabled()
javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction.isEnabled()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isEnabled()
javax.swing.ToolTipManager.isEnabled()
javax.xml.ws.WebServiceFeature.isEnabled()


Occurences of isEndElement

isEndElement occurences:
javax.xml.stream.events.XMLEvent.isEndElement()
javax.xml.stream.util.StreamReaderDelegate.isEndElement()
javax.xml.stream.XMLStreamReader.isEndElement()


Occurences of isEnum

isEnum occurences:
com.sun.javadoc.Doc.isEnum()
com.sun.jdi.ClassType.isEnum()
java.lang.Class.isEnum()


Occurences of isEnumConstant

isEnumConstant occurences:
com.sun.javadoc.Doc.isEnumConstant()
com.sun.jdi.Field.isEnumConstant()
java.lang.reflect.Field.isEnumConstant()


Occurences of isEqual

isEqual occurences:
java.security.MessageDigest.isEqual(byte:A, byte:A)
java.time.chrono.ChronoLocalDate.isEqual(java.time.chrono.ChronoLocalDate)
java.time.chrono.ChronoLocalDateTime.isEqual(java.time.chrono.ChronoLocalDateTime)
java.time.chrono.ChronoZonedDateTime.isEqual(java.time.chrono.ChronoZonedDateTime)
java.time.LocalDate.isEqual(java.time.chrono.ChronoLocalDate)
java.time.LocalDateTime.isEqual(java.time.chrono.ChronoLocalDateTime)
java.time.OffsetDateTime.isEqual(java.time.OffsetDateTime)
java.time.OffsetTime.isEqual(java.time.OffsetTime)
java.util.function.Predicate.isEqual(java.lang.Object)
javax.swing.text.AbstractDocument.AbstractElement.isEqual(javax.swing.text.AttributeSet)
javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet)
javax.swing.text.SimpleAttributeSet.isEqual(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.NamedStyle.isEqual(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.SmallAttributeSet.isEqual(javax.swing.text.AttributeSet)


Occurences of isEqualNode

isEqualNode occurences:
javax.imageio.metadata.IIOMetadataNode.isEqualNode(org.w3c.dom.Node)
org.w3c.dom.Node.isEqualNode(org.w3c.dom.Node)


Occurences of isError

isError occurences:
com.sun.javadoc.Doc.isError()
java.nio.charset.CoderResult.isError()


Occurences of isExpanded

isExpanded occurences:
javax.swing.JTree.isExpanded(int)
javax.swing.JTree.isExpanded(javax.swing.tree.TreePath)
javax.swing.tree.AbstractLayoutCache.isExpanded(javax.swing.tree.TreePath)
javax.swing.tree.FixedHeightLayoutCache.isExpanded(javax.swing.tree.TreePath)
javax.swing.tree.VariableHeightLayoutCache.isExpanded(javax.swing.tree.TreePath)


Occurences of isFair

isFair occurences:
java.util.concurrent.locks.ReentrantLock.isFair()
java.util.concurrent.locks.ReentrantReadWriteLock.isFair()
java.util.concurrent.Semaphore.isFair()


Occurences of isFeatureSupported

isFeatureSupported occurences:
javax.xml.crypto.dom.DOMStructure.isFeatureSupported(java.lang.String)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.isFeatureSupported(java.lang.String)
javax.xml.crypto.dsig.XMLSignatureFactory.isFeatureSupported(java.lang.String)
javax.xml.crypto.XMLStructure.isFeatureSupported(java.lang.String)


Occurences of isField

isField occurences:
com.sun.javadoc.Doc.isField()
javax.lang.model.element.ElementKind.isField()


Occurences of isFileTypeSupported

isFileTypeSupported occurences:
javax.sound.midi.MidiSystem.isFileTypeSupported(int)
javax.sound.midi.MidiSystem.isFileTypeSupported(int, javax.sound.midi.Sequence)
javax.sound.midi.spi.MidiFileWriter.isFileTypeSupported(int)
javax.sound.midi.spi.MidiFileWriter.isFileTypeSupported(int, javax.sound.midi.Sequence)
javax.sound.sampled.AudioSystem.isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type)
javax.sound.sampled.AudioSystem.isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioInputStream)
javax.sound.sampled.spi.AudioFileWriter.isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type)
javax.sound.sampled.spi.AudioFileWriter.isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioInputStream)


Occurences of isFinal

isFinal occurences:
com.sun.javadoc.ProgramElementDoc.isFinal()
com.sun.jdi.ReferenceType.isFinal()
com.sun.jdi.TypeComponent.isFinal()
java.lang.reflect.Modifier.isFinal(int)


Occurences of isFinite

isFinite occurences:
java.lang.Double.isFinite(double)
java.lang.Float.isFinite(float)


Occurences of isFixedRowHeight

isFixedRowHeight occurences:
javax.swing.JTree.isFixedRowHeight()
javax.swing.tree.AbstractLayoutCache.isFixedRowHeight()


Occurences of isFocusCycleRoot

isFocusCycleRoot occurences:
java.awt.Component.isFocusCycleRoot(java.awt.Container)
java.awt.Container.isFocusCycleRoot()
java.awt.Container.isFocusCycleRoot(java.awt.Container)
java.awt.Window.isFocusCycleRoot()
javax.swing.JInternalFrame.isFocusCycleRoot()


Occurences of isFocusTraversable

isFocusTraversable occurences:
java.awt.Component.isFocusTraversable()
java.awt.Component.AccessibleAWTComponent.isFocusTraversable()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.isFocusTraversable()
java.awt.MenuComponent.AccessibleAWTMenuComponent.isFocusTraversable()
javax.accessibility.AccessibleComponent.isFocusTraversable()
javax.swing.JList.AccessibleJList.AccessibleJListChild.isFocusTraversable()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.isFocusTraversable()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.isFocusTraversable()
javax.swing.plaf.basic.BasicArrowButton.isFocusTraversable()
javax.swing.plaf.basic.BasicComboBoxUI.isFocusTraversable(javax.swing.JComboBox)
javax.swing.plaf.basic.BasicComboPopup.isFocusTraversable()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar.isFocusTraversable()
javax.swing.plaf.ComboBoxUI.isFocusTraversable(javax.swing.JComboBox)
javax.swing.plaf.metal.MetalComboBoxButton.isFocusTraversable()
javax.swing.plaf.multi.MultiComboBoxUI.isFocusTraversable(javax.swing.JComboBox)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isFocusTraversable()


Occurences of isForwardCheckingSupported

isForwardCheckingSupported occurences:
java.security.cert.CertPathChecker.isForwardCheckingSupported()
java.security.cert.PKIXCertPathChecker.isForwardCheckingSupported()


Occurences of isHeldByCurrentThread

isHeldByCurrentThread occurences:
java.util.concurrent.locks.ReentrantLock.isHeldByCurrentThread()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.isHeldByCurrentThread()


Occurences of isHeldExclusively

isHeldExclusively occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.isHeldExclusively()
java.util.concurrent.locks.AbstractQueuedSynchronizer.isHeldExclusively()


Occurences of isHidden

isHidden occurences:
java.beans.FeatureDescriptor.isHidden()
java.io.File.isHidden()
java.nio.file.attribute.DosFileAttributes.isHidden()
java.nio.file.Files.isHidden(java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.isHidden(java.nio.file.Path)
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.isHidden(java.io.File)


Occurences of isIcon

isIcon occurences:
javax.swing.isIcon
javax.swing.JInternalFrame.isIcon()


Occurences of isIdentifierIgnorable

isIdentifierIgnorable occurences:
java.lang.Character.isIdentifierIgnorable(char)
java.lang.Character.isIdentifierIgnorable(int)


Occurences of isIdentity

isIdentity occurences:
java.awt.font.TransformAttribute.isIdentity()
java.awt.geom.AffineTransform.isIdentity()


Occurences of isInfinite

isInfinite occurences:
java.lang.Double.isInfinite()
java.lang.Double.isInfinite(double)
java.lang.Float.isInfinite()
java.lang.Float.isInfinite(float)


Occurences of isInitialized

isInitialized occurences:
com.sun.jdi.ReferenceType.isInitialized()
javax.annotation.processing.AbstractProcessor.isInitialized()


Occurences of isInRelationService

isInRelationService occurences:
javax.management.relation.RelationSupport.isInRelationService()
javax.management.relation.RelationSupportMBean.isInRelationService()


Occurences of isInstanceOf

isInstanceOf occurences:
java.beans.Beans.isInstanceOf(java.lang.Object, java.lang.Class)
javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String)
javax.management.MBeanServerConnection.isInstanceOf(javax.management.ObjectName, java.lang.String)
javax.management.Query.isInstanceOf(javax.management.StringValueExp)
javax.management.remote.rmi.RMIConnection.isInstanceOf(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.isInstanceOf(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.isInstanceOf(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)


Occurences of isInState

isInState occurences:
javax.swing.plaf.nimbus.State.isInState(javax.swing.JComponent)
javax.swing.plaf.nimbus.State.isInState(T)


Occurences of isInterface

isInterface occurences:
com.sun.javadoc.Doc.isInterface()
java.lang.Class.isInterface()
java.lang.reflect.Modifier.isInterface(int)
javax.lang.model.element.ElementKind.isInterface()


Occurences of isIs

isIs occurences:
javax.management.MBeanAttributeInfo.isIs()
javax.management.openmbean.OpenMBeanAttributeInfo.isIs()


Occurences of isISOControl

isISOControl occurences:
java.lang.Character.isISOControl(char)
java.lang.Character.isISOControl(int)


Occurences of isItalic

isItalic occurences:
java.awt.Font.isItalic()
javax.swing.text.StyleConstants.isItalic(javax.swing.text.AttributeSet)


Occurences of isJavaIdentifierPart

isJavaIdentifierPart occurences:
java.lang.Character.isJavaIdentifierPart(char)
java.lang.Character.isJavaIdentifierPart(int)


Occurences of isJavaIdentifierStart

isJavaIdentifierStart occurences:
java.lang.Character.isJavaIdentifierStart(char)
java.lang.Character.isJavaIdentifierStart(int)


Occurences of isLargeModel

isLargeModel occurences:
javax.swing.JTree.isLargeModel()
javax.swing.plaf.basic.BasicTreeUI.isLargeModel()


Occurences of isLayoutValid

isLayoutValid occurences:
javax.swing.text.AsyncBoxView.ChildState.isLayoutValid()
javax.swing.text.BoxView.isLayoutValid(int)


Occurences of isLeaf

isLeaf occurences:
javax.swing.JTree.DynamicUtilTreeNode.isLeaf()
javax.swing.plaf.basic.BasicTreeUI.isLeaf(int)
javax.swing.text.AbstractDocument.AbstractElement.isLeaf()
javax.swing.text.AbstractDocument.BranchElement.isLeaf()
javax.swing.text.AbstractDocument.LeafElement.isLeaf()
javax.swing.text.Element.isLeaf()
javax.swing.tree.DefaultMutableTreeNode.isLeaf()
javax.swing.tree.DefaultTreeModel.isLeaf(java.lang.Object)
javax.swing.tree.TreeModel.isLeaf(java.lang.Object)
javax.swing.tree.TreeNode.isLeaf()


Occurences of isLeap

isLeap occurences:
java.time.Year.isLeap()
java.time.Year.isLeap(long)


Occurences of isLeapYear

isLeapYear occurences:
java.time.chrono.ChronoLocalDate.isLeapYear()
java.time.chrono.Chronology.isLeapYear(long)
java.time.chrono.HijrahChronology.isLeapYear(long)
java.time.chrono.HijrahDate.isLeapYear()
java.time.chrono.IsoChronology.isLeapYear(long)
java.time.chrono.JapaneseChronology.isLeapYear(long)
java.time.chrono.MinguoChronology.isLeapYear(long)
java.time.chrono.ThaiBuddhistChronology.isLeapYear(long)
java.time.LocalDate.isLeapYear()
java.time.YearMonth.isLeapYear()
java.util.GregorianCalendar.isLeapYear(int)


Occurences of isLeftToRight

isLeftToRight occurences:
java.awt.ComponentOrientation.isLeftToRight()
java.awt.font.TextLayout.isLeftToRight()
java.text.Bidi.isLeftToRight()


Occurences of isLenient

isLenient occurences:
java.text.DateFormat.isLenient()
java.util.Calendar.isLenient()


Occurences of isLetter

isLetter occurences:
java.lang.Character.isLetter(char)
java.lang.Character.isLetter(int)


Occurences of isLetterOrDigit

isLetterOrDigit occurences:
java.lang.Character.isLetterOrDigit(char)
java.lang.Character.isLetterOrDigit(int)


Occurences of isLightWeightPopupEnabled

isLightWeightPopupEnabled occurences:
javax.swing.JComboBox.isLightWeightPopupEnabled()
javax.swing.JPopupMenu.isLightWeightPopupEnabled()
javax.swing.ToolTipManager.isLightWeightPopupEnabled()


Occurences of isLineSupported

isLineSupported occurences:
javax.sound.sampled.AudioSystem.isLineSupported(javax.sound.sampled.Line.Info)
javax.sound.sampled.Mixer.isLineSupported(javax.sound.sampled.Line.Info)


Occurences of isLinkLocalAddress

isLinkLocalAddress occurences:
java.net.Inet4Address.isLinkLocalAddress()
java.net.Inet6Address.isLinkLocalAddress()
java.net.InetAddress.isLinkLocalAddress()


Occurences of isLocal

isLocal occurences:
java.awt.dnd.isLocal
javax.rmi.CORBA.Util.isLocal(javax.rmi.CORBA.Stub)
javax.rmi.CORBA.UtilDelegate.isLocal(javax.rmi.CORBA.Stub)


Occurences of isLocationInExpandControl

isLocationInExpandControl occurences:
javax.swing.plaf.basic.BasicTreeUI.isLocationInExpandControl(javax.swing.tree.TreePath, int, int)
javax.swing.plaf.metal.MetalTreeUI.isLocationInExpandControl(int, int, int, int)


Occurences of isLoggable

isLoggable occurences:
java.util.logging.Filter.isLoggable(java.util.logging.LogRecord)
java.util.logging.Handler.isLoggable(java.util.logging.LogRecord)
java.util.logging.Logger.isLoggable(java.util.logging.Level)
java.util.logging.MemoryHandler.isLoggable(java.util.logging.LogRecord)
java.util.logging.StreamHandler.isLoggable(java.util.logging.LogRecord)


Occurences of isLoopbackAddress

isLoopbackAddress occurences:
java.net.Inet4Address.isLoopbackAddress()
java.net.Inet6Address.isLoopbackAddress()
java.net.InetAddress.isLoopbackAddress()


Occurences of isLowerCase

isLowerCase occurences:
java.lang.Character.isLowerCase(char)
java.lang.Character.isLowerCase(int)


Occurences of isMaximum

isMaximum occurences:
javax.swing.isMaximum
javax.swing.JInternalFrame.isMaximum()


Occurences of isMCGlobal

isMCGlobal occurences:
java.net.Inet4Address.isMCGlobal()
java.net.Inet6Address.isMCGlobal()
java.net.InetAddress.isMCGlobal()


Occurences of isMCLinkLocal

isMCLinkLocal occurences:
java.net.Inet4Address.isMCLinkLocal()
java.net.Inet6Address.isMCLinkLocal()
java.net.InetAddress.isMCLinkLocal()


Occurences of isMCNodeLocal

isMCNodeLocal occurences:
java.net.Inet4Address.isMCNodeLocal()
java.net.Inet6Address.isMCNodeLocal()
java.net.InetAddress.isMCNodeLocal()


Occurences of isMCOrgLocal

isMCOrgLocal occurences:
java.net.Inet4Address.isMCOrgLocal()
java.net.Inet6Address.isMCOrgLocal()
java.net.InetAddress.isMCOrgLocal()


Occurences of isMCSiteLocal

isMCSiteLocal occurences:
java.net.Inet4Address.isMCSiteLocal()
java.net.Inet6Address.isMCSiteLocal()
java.net.InetAddress.isMCSiteLocal()


Occurences of isMimeTypeEqual

isMimeTypeEqual occurences:
java.awt.datatransfer.DataFlavor.isMimeTypeEqual(java.awt.datatransfer.DataFlavor)
java.awt.datatransfer.DataFlavor.isMimeTypeEqual(java.lang.String)
javax.activation.ActivationDataFlavor.isMimeTypeEqual(java.lang.String)


Occurences of isMirrored

isMirrored occurences:
java.lang.Character.isMirrored(char)
java.lang.Character.isMirrored(int)


Occurences of isMulticastAddress

isMulticastAddress occurences:
java.net.Inet4Address.isMulticastAddress()
java.net.Inet6Address.isMulticastAddress()
java.net.InetAddress.isMulticastAddress()


Occurences of isMultipleMode

isMultipleMode occurences:
java.awt.FileDialog.isMultipleMode()
java.awt.List.isMultipleMode()


Occurences of isNameCompatible

isNameCompatible occurences:
javax.tools.ForwardingJavaFileObject.isNameCompatible(java.lang.String, javax.tools.JavaFileObject.Kind)
javax.tools.JavaFileObject.isNameCompatible(java.lang.String, javax.tools.JavaFileObject.Kind)
javax.tools.SimpleJavaFileObject.isNameCompatible(java.lang.String, javax.tools.JavaFileObject.Kind)


Occurences of isNamespaceAware

isNamespaceAware occurences:
javax.xml.parsers.DocumentBuilder.isNamespaceAware()
javax.xml.parsers.DocumentBuilderFactory.isNamespaceAware()
javax.xml.parsers.SAXParser.isNamespaceAware()
javax.xml.parsers.SAXParserFactory.isNamespaceAware()


Occurences of isNaN

isNaN occurences:
java.lang.Double.isNaN()
java.lang.Double.isNaN(double)
java.lang.Float.isNaN()
java.lang.Float.isNaN(float)


Occurences of isNative

isNative occurences:
com.sun.javadoc.ExecutableMemberDoc.isNative()
com.sun.jdi.Method.isNative()
java.lang.reflect.Modifier.isNative(int)


Occurences of isNativeLookAndFeel

isNativeLookAndFeel occurences:
javax.swing.LookAndFeel.isNativeLookAndFeel()
javax.swing.plaf.metal.MetalLookAndFeel.isNativeLookAndFeel()
javax.swing.plaf.multi.MultiLookAndFeel.isNativeLookAndFeel()
javax.swing.plaf.synth.SynthLookAndFeel.isNativeLookAndFeel()


Occurences of isNegative

isNegative occurences:
java.security.acl.AclEntry.isNegative()
java.time.chrono.ChronoPeriod.isNegative()
java.time.Duration.isNegative()
java.time.Period.isNegative()


Occurences of isNotificationEnabled

isNotificationEnabled occurences:
javax.management.AttributeChangeNotificationFilter.isNotificationEnabled(javax.management.Notification)
javax.management.NotificationFilter.isNotificationEnabled(javax.management.Notification)
javax.management.NotificationFilterSupport.isNotificationEnabled(javax.management.Notification)
javax.management.relation.MBeanServerNotificationFilter.isNotificationEnabled(javax.management.Notification)


Occurences of isNullable

isNullable occurences:
java.sql.ParameterMetaData.isNullable(int)
java.sql.ResultSetMetaData.isNullable(int)
javax.sql.rowset.RowSetMetaDataImpl.isNullable(int)


Occurences of isOpaque

isOpaque occurences:
java.awt.Component.isOpaque()
java.awt.Window.isOpaque()
java.net.URI.isOpaque()
javax.swing.DefaultListCellRenderer.isOpaque()
javax.swing.JComponent.isOpaque()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar.isOpaque()
javax.swing.plaf.nimbus.NimbusStyle.isOpaque(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthStyle.isOpaque(javax.swing.plaf.synth.SynthContext)
javax.swing.table.DefaultTableCellRenderer.isOpaque()


Occurences of isOpen

isOpen occurences:
com.sun.jdi.connect.spi.Connection.isOpen()
java.nio.channels.Channel.isOpen()
java.nio.channels.Selector.isOpen()
java.nio.channels.spi.AbstractInterruptibleChannel.isOpen()
java.nio.channels.spi.AbstractSelector.isOpen()
java.nio.file.FileSystem.isOpen()
javax.sound.midi.MidiDevice.isOpen()
javax.sound.sampled.Line.isOpen()


Occurences of isOptimizedDrawingEnabled

isOptimizedDrawingEnabled occurences:
javax.swing.JComponent.isOptimizedDrawingEnabled()
javax.swing.JLayer.isOptimizedDrawingEnabled()
javax.swing.JLayeredPane.isOptimizedDrawingEnabled()
javax.swing.JRootPane.isOptimizedDrawingEnabled()
javax.swing.JViewport.isOptimizedDrawingEnabled()


Occurences of isOrdered

isOrdered occurences:
javax.naming.directory.Attribute.isOrdered()
javax.naming.directory.BasicAttribute.isOrdered()


Occurences of isOutputLocation

isOutputLocation occurences:
javax.tools.DocumentationTool.Location.isOutputLocation()
javax.tools.JavaFileManager.Location.isOutputLocation()
javax.tools.StandardLocation.isOutputLocation()


Occurences of ISO_A0

ISO_A0 occurences:
java.awt.ISO_A0
javax.print.attribute.standard.ISO_A0


Occurences of ISO_A1

ISO_A1 occurences:
java.awt.ISO_A1
javax.print.attribute.standard.ISO_A1


Occurences of ISO_A10

ISO_A10 occurences:
java.awt.ISO_A10
javax.print.attribute.standard.ISO_A10


Occurences of ISO_A2

ISO_A2 occurences:
java.awt.ISO_A2
javax.print.attribute.standard.ISO_A2


Occurences of ISO_A3

ISO_A3 occurences:
java.awt.ISO_A3
javax.print.attribute.standard.ISO_A3


Occurences of ISO_A4

ISO_A4 occurences:
java.awt.ISO_A4
javax.print.attribute.standard.ISO_A4


Occurences of ISO_A5

ISO_A5 occurences:
java.awt.ISO_A5
javax.print.attribute.standard.ISO_A5


Occurences of ISO_A6

ISO_A6 occurences:
java.awt.ISO_A6
javax.print.attribute.standard.ISO_A6


Occurences of ISO_A7

ISO_A7 occurences:
java.awt.ISO_A7
javax.print.attribute.standard.ISO_A7


Occurences of ISO_A8

ISO_A8 occurences:
java.awt.ISO_A8
javax.print.attribute.standard.ISO_A8


Occurences of ISO_A9

ISO_A9 occurences:
java.awt.ISO_A9
javax.print.attribute.standard.ISO_A9


Occurences of ISO_B0

ISO_B0 occurences:
java.awt.ISO_B0
javax.print.attribute.standard.ISO_B0


Occurences of ISO_B1

ISO_B1 occurences:
java.awt.ISO_B1
javax.print.attribute.standard.ISO_B1


Occurences of ISO_B10

ISO_B10 occurences:
java.awt.ISO_B10
javax.print.attribute.standard.ISO_B10


Occurences of ISO_B2

ISO_B2 occurences:
java.awt.ISO_B2
javax.print.attribute.standard.ISO_B2


Occurences of ISO_B3

ISO_B3 occurences:
java.awt.ISO_B3
javax.print.attribute.standard.ISO_B3


Occurences of ISO_B4

ISO_B4 occurences:
java.awt.ISO_B4
javax.print.attribute.standard.ISO_B4


Occurences of ISO_B5

ISO_B5 occurences:
java.awt.ISO_B5
javax.print.attribute.standard.ISO_B5


Occurences of ISO_B6

ISO_B6 occurences:
java.awt.ISO_B6
javax.print.attribute.standard.ISO_B6


Occurences of ISO_B7

ISO_B7 occurences:
java.awt.ISO_B7
javax.print.attribute.standard.ISO_B7


Occurences of ISO_B8

ISO_B8 occurences:
java.awt.ISO_B8
javax.print.attribute.standard.ISO_B8


Occurences of ISO_B9

ISO_B9 occurences:
java.awt.ISO_B9
javax.print.attribute.standard.ISO_B9


Occurences of ISO_C0

ISO_C0 occurences:
java.awt.ISO_C0
javax.print.attribute.standard.ISO_C0


Occurences of ISO_C1

ISO_C1 occurences:
java.awt.ISO_C1
javax.print.attribute.standard.ISO_C1


Occurences of ISO_C2

ISO_C2 occurences:
java.awt.ISO_C2
javax.print.attribute.standard.ISO_C2


Occurences of ISO_C3

ISO_C3 occurences:
java.awt.ISO_C3
javax.print.attribute.standard.ISO_C3


Occurences of ISO_C4

ISO_C4 occurences:
java.awt.ISO_C4
javax.print.attribute.standard.ISO_C4


Occurences of ISO_C5

ISO_C5 occurences:
java.awt.ISO_C5
javax.print.attribute.standard.ISO_C5


Occurences of ISO_C6

ISO_C6 occurences:
java.awt.ISO_C6
javax.print.attribute.standard.ISO_C6


Occurences of ISO_DESIGNATED_LONG

ISO_DESIGNATED_LONG occurences:
java.awt.ISO_DESIGNATED_LONG
javax.print.attribute.standard.ISO_DESIGNATED_LONG


Occurences of isPackagePrivate

isPackagePrivate occurences:
com.sun.javadoc.ProgramElementDoc.isPackagePrivate()
com.sun.jdi.Accessible.isPackagePrivate()


Occurences of isPaintable

isPaintable occurences:
java.beans.PropertyEditor.isPaintable()
java.beans.PropertyEditorSupport.isPaintable()


Occurences of isPaintingOrigin

isPaintingOrigin occurences:
javax.swing.JComponent.isPaintingOrigin()
javax.swing.JLayer.isPaintingOrigin()
javax.swing.JViewport.isPaintingOrigin()


Occurences of isParityAdjusted

isParityAdjusted occurences:
javax.crypto.spec.DESedeKeySpec.isParityAdjusted(byte:A, int)
javax.crypto.spec.DESKeySpec.isParityAdjusted(byte:A, int)


Occurences of isPathSelected

isPathSelected occurences:
javax.swing.JTree.isPathSelected(javax.swing.tree.TreePath)
javax.swing.tree.DefaultTreeSelectionModel.isPathSelected(javax.swing.tree.TreePath)
javax.swing.tree.TreeSelectionModel.isPathSelected(javax.swing.tree.TreePath)


Occurences of isPopupTrigger

isPopupTrigger occurences:
java.awt.event.MouseEvent.isPopupTrigger()
javax.swing.JPopupMenu.isPopupTrigger(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicPopupMenuUI.isPopupTrigger(java.awt.event.MouseEvent)
javax.swing.plaf.multi.MultiPopupMenuUI.isPopupTrigger(java.awt.event.MouseEvent)
javax.swing.plaf.PopupMenuUI.isPopupTrigger(java.awt.event.MouseEvent)


Occurences of isPopupVisible

isPopupVisible occurences:
javax.swing.JComboBox.isPopupVisible()
javax.swing.plaf.basic.BasicComboBoxUI.isPopupVisible(javax.swing.JComboBox)
javax.swing.plaf.ComboBoxUI.isPopupVisible(javax.swing.JComboBox)
javax.swing.plaf.multi.MultiComboBoxUI.isPopupVisible(javax.swing.JComboBox)


Occurences of isPreformatted

isPreformatted occurences:
javax.swing.text.html.HTML.Tag.isPreformatted()
javax.swing.text.html.parser.TagElement.isPreformatted()


Occurences of isPresent

isPresent occurences:
java.util.Optional.isPresent()
java.util.OptionalDouble.isPresent()
java.util.OptionalInt.isPresent()
java.util.OptionalLong.isPresent()


Occurences of isPressed

isPressed occurences:
javax.swing.ButtonModel.isPressed()
javax.swing.DefaultButtonModel.isPressed()


Occurences of isPrimitive

isPrimitive occurences:
com.sun.javadoc.Type.isPrimitive()
java.io.ObjectStreamField.isPrimitive()
java.lang.Class.isPrimitive()
javax.lang.model.type.TypeKind.isPrimitive()


Occurences of isPrivate

isPrivate occurences:
com.sun.javadoc.ProgramElementDoc.isPrivate()
com.sun.jdi.Accessible.isPrivate()
java.lang.reflect.Modifier.isPrivate(int)


Occurences of isPropertySupported

isPropertySupported occurences:
javax.xml.stream.XMLInputFactory.isPropertySupported(java.lang.String)
javax.xml.stream.XMLOutputFactory.isPropertySupported(java.lang.String)


Occurences of isPropertyValuePattern

isPropertyValuePattern occurences:
javax.management.ObjectName.isPropertyValuePattern()
javax.management.ObjectName.isPropertyValuePattern(java.lang.String)


Occurences of isProtected

isProtected occurences:
com.sun.javadoc.ProgramElementDoc.isProtected()
com.sun.jdi.Accessible.isProtected()
java.lang.reflect.Modifier.isProtected(int)


Occurences of isPublic

isPublic occurences:
com.sun.javadoc.ProgramElementDoc.isPublic()
com.sun.jdi.Accessible.isPublic()
java.lang.reflect.Modifier.isPublic(int)


Occurences of isQueued

isQueued occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.isQueued(java.lang.Thread)
java.util.concurrent.locks.AbstractQueuedSynchronizer.isQueued(java.lang.Thread)


Occurences of isReachable

isReachable occurences:
java.net.InetAddress.isReachable(int)
java.net.InetAddress.isReachable(java.net.NetworkInterface, int, int)


Occurences of isReadable

isReadable occurences:
java.nio.channels.SelectionKey.isReadable()
java.nio.file.Files.isReadable(java.nio.file.Path)
javax.management.MBeanAttributeInfo.isReadable()
javax.management.openmbean.OpenMBeanAttributeInfo.isReadable()
javax.management.relation.RoleInfo.isReadable()


Occurences of isReadOnly

isReadOnly occurences:
java.nio.Buffer.isReadOnly()
java.nio.file.attribute.DosFileAttributes.isReadOnly()
java.nio.file.FileStore.isReadOnly()
java.nio.file.FileSystem.isReadOnly()
java.security.PermissionCollection.isReadOnly()
java.sql.Connection.isReadOnly()
java.sql.DatabaseMetaData.isReadOnly()
java.sql.ResultSetMetaData.isReadOnly(int)
javax.imageio.metadata.IIOMetadata.isReadOnly()
javax.security.auth.Subject.isReadOnly()
javax.sql.RowSet.isReadOnly()
javax.sql.rowset.BaseRowSet.isReadOnly()
javax.sql.rowset.RowSetMetaDataImpl.isReadOnly(int)


Occurences of isRegistered

isRegistered occurences:
java.nio.channels.SelectableChannel.isRegistered()
java.nio.channels.spi.AbstractSelectableChannel.isRegistered()
java.nio.charset.Charset.isRegistered()
javax.management.MBeanServer.isRegistered(javax.management.ObjectName)
javax.management.MBeanServerConnection.isRegistered(javax.management.ObjectName)
javax.management.remote.rmi.RMIConnection.isRegistered(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.isRegistered(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.isRegistered(javax.management.ObjectName, javax.security.auth.Subject)


Occurences of isRegularFile

isRegularFile occurences:
java.nio.file.attribute.BasicFileAttributes.isRegularFile()
java.nio.file.Files.isRegularFile(java.nio.file.Path, java.nio.file.LinkOption...)


Occurences of isRelation

isRelation occurences:
javax.management.relation.RelationService.isRelation(javax.management.ObjectName)
javax.management.relation.RelationServiceMBean.isRelation(javax.management.ObjectName)


Occurences of isRelationMBean

isRelationMBean occurences:
javax.management.relation.RelationService.isRelationMBean(java.lang.String)
javax.management.relation.RelationServiceMBean.isRelationMBean(java.lang.String)


Occurences of isResizable

isResizable occurences:
java.awt.Dialog.isResizable()
java.awt.Frame.isResizable()
javax.swing.JInternalFrame.isResizable()
javax.swing.table.isResizable


Occurences of isRollover

isRollover occurences:
javax.swing.ButtonModel.isRollover()
javax.swing.DefaultButtonModel.isRollover()
javax.swing.JToolBar.isRollover()


Occurences of isRoot

isRoot occurences:
javax.swing.filechooser.FileSystemView.isRoot(java.io.File)
javax.swing.tree.DefaultMutableTreeNode.isRoot()


Occurences of isRootPaneCheckingEnabled

isRootPaneCheckingEnabled occurences:
javax.swing.JApplet.isRootPaneCheckingEnabled()
javax.swing.JDialog.isRootPaneCheckingEnabled()
javax.swing.JFrame.isRootPaneCheckingEnabled()
javax.swing.JInternalFrame.isRootPaneCheckingEnabled()
javax.swing.JWindow.isRootPaneCheckingEnabled()


Occurences of isRootVisible

isRootVisible occurences:
javax.swing.JTree.isRootVisible()
javax.swing.plaf.basic.BasicTreeUI.isRootVisible()
javax.swing.tree.AbstractLayoutCache.isRootVisible()


Occurences of isRowSelected

isRowSelected occurences:
javax.swing.JTable.isRowSelected(int)
javax.swing.JTree.isRowSelected(int)
javax.swing.tree.DefaultTreeSelectionModel.isRowSelected(int)
javax.swing.tree.TreeSelectionModel.isRowSelected(int)


Occurences of isRunning

isRunning occurences:
javax.sound.midi.Sequencer.isRunning()
javax.sound.sampled.DataLine.isRunning()
javax.swing.Timer.isRunning()


Occurences of isSameFile

isSameFile occurences:
java.nio.file.Files.isSameFile(java.nio.file.Path, java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.isSameFile(java.nio.file.Path, java.nio.file.Path)
javax.tools.ForwardingJavaFileManager.isSameFile(javax.tools.FileObject, javax.tools.FileObject)
javax.tools.JavaFileManager.isSameFile(javax.tools.FileObject, javax.tools.FileObject)
javax.tools.StandardJavaFileManager.isSameFile(javax.tools.FileObject, javax.tools.FileObject)


Occurences of isSameNode

isSameNode occurences:
javax.imageio.metadata.IIOMetadataNode.isSameNode(org.w3c.dom.Node)
org.w3c.dom.Node.isSameNode(org.w3c.dom.Node)


Occurences of isSealed

isSealed occurences:
java.lang.Package.isSealed()
java.lang.Package.isSealed(java.net.URL)


Occurences of isSearchable

isSearchable occurences:
java.sql.ResultSetMetaData.isSearchable(int)
javax.sql.rowset.RowSetMetaDataImpl.isSearchable(int)


Occurences of isSelected

isSelected occurences:
java.awt.im.InputMethodHighlight.isSelected()
java.awt.List.isSelected(int)
javax.swing.AbstractButton.isSelected()
javax.swing.ButtonGroup.isSelected(javax.swing.ButtonModel)
javax.swing.ButtonModel.isSelected()
javax.swing.DefaultButtonModel.isSelected()
javax.swing.DefaultSingleSelectionModel.isSelected()
javax.swing.isSelected
javax.swing.JInternalFrame.isSelected()
javax.swing.JMenu.isSelected()
javax.swing.JMenuBar.isSelected()
javax.swing.JToggleButton.ToggleButtonModel.isSelected()
javax.swing.plaf.basic.isSelected
javax.swing.SingleSelectionModel.isSelected()
javax.swing.text.html.Option.isSelected()


Occurences of isSelectedIndex

isSelectedIndex occurences:
javax.swing.DefaultListSelectionModel.isSelectedIndex(int)
javax.swing.JList.isSelectedIndex(int)
javax.swing.ListSelectionModel.isSelectedIndex(int)


Occurences of isSelectionEmpty

isSelectionEmpty occurences:
javax.swing.DefaultListSelectionModel.isSelectionEmpty()
javax.swing.JList.isSelectionEmpty()
javax.swing.JTree.isSelectionEmpty()
javax.swing.ListSelectionModel.isSelectionEmpty()
javax.swing.tree.DefaultTreeSelectionModel.isSelectionEmpty()
javax.swing.tree.TreeSelectionModel.isSelectionEmpty()


Occurences of isSelectionVisible

isSelectionVisible occurences:
javax.swing.text.Caret.isSelectionVisible()
javax.swing.text.DefaultCaret.isSelectionVisible()


Occurences of isSet

isSet occurences:
java.util.Calendar.isSet(int)
java.util.isSet
javax.xml.datatype.Duration.isSet(javax.xml.datatype.DatatypeConstants.Field)


Occurences of isShowing

isShowing occurences:
java.awt.Component.isShowing()
java.awt.Component.AccessibleAWTComponent.isShowing()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.isShowing()
java.awt.MenuComponent.AccessibleAWTMenuComponent.isShowing()
java.awt.Window.isShowing()
javax.accessibility.AccessibleComponent.isShowing()
javax.swing.JList.AccessibleJList.AccessibleJListChild.isShowing()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.isShowing()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.isShowing()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isShowing()


Occurences of isShutdown

isShutdown occurences:
java.nio.channels.AsynchronousChannelGroup.isShutdown()
java.util.concurrent.ExecutorService.isShutdown()
java.util.concurrent.ForkJoinPool.isShutdown()
java.util.concurrent.ThreadPoolExecutor.isShutdown()


Occurences of isSigned

isSigned occurences:
java.sql.ParameterMetaData.isSigned(int)
java.sql.ResultSetMetaData.isSigned(int)
javax.sql.rowset.RowSetMetaDataImpl.isSigned(int)


Occurences of isSignificant

isSignificant occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.isSignificant()
javax.swing.undo.AbstractUndoableEdit.isSignificant()
javax.swing.undo.CompoundEdit.isSignificant()
javax.swing.undo.UndoableEdit.isSignificant()


Occurences of isSiteLocalAddress

isSiteLocalAddress occurences:
java.net.Inet4Address.isSiteLocalAddress()
java.net.Inet6Address.isSiteLocalAddress()
java.net.InetAddress.isSiteLocalAddress()


Occurences of isSpaceChar

isSpaceChar occurences:
java.lang.Character.isSpaceChar(char)
java.lang.Character.isSpaceChar(int)


Occurences of isSpecified

isSpecified occurences:
javax.xml.stream.events.Attribute.isSpecified()
javax.xml.validation.TypeInfoProvider.isSpecified(int)
org.xml.sax.ext.Attributes2.isSpecified(int)
org.xml.sax.ext.Attributes2.isSpecified(java.lang.String)
org.xml.sax.ext.Attributes2.isSpecified(java.lang.String, java.lang.String)
org.xml.sax.ext.Attributes2Impl.isSpecified(int)
org.xml.sax.ext.Attributes2Impl.isSpecified(java.lang.String)
org.xml.sax.ext.Attributes2Impl.isSpecified(java.lang.String, java.lang.String)


Occurences of isStandalone

isStandalone occurences:
java.time.format.TextStyle.isStandalone()
javax.xml.stream.events.StartDocument.isStandalone()
javax.xml.stream.util.StreamReaderDelegate.isStandalone()
javax.xml.stream.XMLStreamReader.isStandalone()


Occurences of isStartElement

isStartElement occurences:
javax.xml.stream.events.XMLEvent.isStartElement()
javax.xml.stream.util.StreamReaderDelegate.isStartElement()
javax.xml.stream.XMLStreamReader.isStartElement()


Occurences of isStatic

isStatic occurences:
com.sun.javadoc.ProgramElementDoc.isStatic()
com.sun.jdi.ReferenceType.isStatic()
com.sun.jdi.TypeComponent.isStatic()
com.sun.source.tree.BlockTree.isStatic()
com.sun.source.tree.ImportTree.isStatic()
java.lang.reflect.Modifier.isStatic(int)


Occurences of isStrikeThrough

isStrikeThrough occurences:
javax.swing.text.GlyphView.isStrikeThrough()
javax.swing.text.LabelView.isStrikeThrough()
javax.swing.text.StyleConstants.isStrikeThrough(javax.swing.text.AttributeSet)


Occurences of isSubscript

isSubscript occurences:
javax.swing.text.GlyphView.isSubscript()
javax.swing.text.LabelView.isSubscript()
javax.swing.text.StyleConstants.isSubscript(javax.swing.text.AttributeSet)


Occurences of isSuperscript

isSuperscript occurences:
javax.swing.text.GlyphView.isSuperscript()
javax.swing.text.LabelView.isSuperscript()
javax.swing.text.StyleConstants.isSuperscript(javax.swing.text.AttributeSet)


Occurences of isSupported

isSupported occurences:
java.awt.Desktop.isSupported(java.awt.Desktop.Action)
java.awt.SystemTray.isSupported()
java.nio.charset.Charset.isSupported(java.lang.String)
java.time.chrono.ChronoLocalDate.isSupported(java.time.temporal.TemporalField)
java.time.chrono.ChronoLocalDate.isSupported(java.time.temporal.TemporalUnit)
java.time.chrono.ChronoLocalDateTime.isSupported(java.time.temporal.TemporalField)
java.time.chrono.ChronoLocalDateTime.isSupported(java.time.temporal.TemporalUnit)
java.time.chrono.ChronoZonedDateTime.isSupported(java.time.temporal.TemporalField)
java.time.chrono.ChronoZonedDateTime.isSupported(java.time.temporal.TemporalUnit)
java.time.chrono.Era.isSupported(java.time.temporal.TemporalField)
java.time.chrono.JapaneseDate.isSupported(java.time.temporal.TemporalField)
java.time.DayOfWeek.isSupported(java.time.temporal.TemporalField)
java.time.Instant.isSupported(java.time.temporal.TemporalField)
java.time.Instant.isSupported(java.time.temporal.TemporalUnit)
java.time.LocalDate.isSupported(java.time.temporal.TemporalField)
java.time.LocalDate.isSupported(java.time.temporal.TemporalUnit)
java.time.LocalDateTime.isSupported(java.time.temporal.TemporalField)
java.time.LocalDateTime.isSupported(java.time.temporal.TemporalUnit)
java.time.LocalTime.isSupported(java.time.temporal.TemporalField)
java.time.LocalTime.isSupported(java.time.temporal.TemporalUnit)
java.time.Month.isSupported(java.time.temporal.TemporalField)
java.time.MonthDay.isSupported(java.time.temporal.TemporalField)
java.time.OffsetDateTime.isSupported(java.time.temporal.TemporalField)
java.time.OffsetDateTime.isSupported(java.time.temporal.TemporalUnit)
java.time.OffsetTime.isSupported(java.time.temporal.TemporalField)
java.time.OffsetTime.isSupported(java.time.temporal.TemporalUnit)
java.time.temporal.Temporal.isSupported(java.time.temporal.TemporalUnit)
java.time.temporal.TemporalAccessor.isSupported(java.time.temporal.TemporalField)
java.time.Year.isSupported(java.time.temporal.TemporalField)
java.time.Year.isSupported(java.time.temporal.TemporalUnit)
java.time.YearMonth.isSupported(java.time.temporal.TemporalField)
java.time.YearMonth.isSupported(java.time.temporal.TemporalUnit)
java.time.ZonedDateTime.isSupported(java.time.temporal.TemporalField)
java.time.ZonedDateTime.isSupported(java.time.temporal.TemporalUnit)
java.time.ZoneOffset.isSupported(java.time.temporal.TemporalField)
javax.imageio.metadata.IIOMetadataNode.isSupported(java.lang.String, java.lang.String)
org.w3c.dom.Node.isSupported(java.lang.String, java.lang.String)


Occurences of isSupportedBy

isSupportedBy occurences:
java.time.temporal.ChronoField.isSupportedBy(java.time.temporal.TemporalAccessor)
java.time.temporal.ChronoUnit.isSupportedBy(java.time.temporal.Temporal)
java.time.temporal.TemporalField.isSupportedBy(java.time.temporal.TemporalAccessor)
java.time.temporal.TemporalUnit.isSupportedBy(java.time.temporal.Temporal)


Occurences of isSupportedLookAndFeel

isSupportedLookAndFeel occurences:
javax.swing.LookAndFeel.isSupportedLookAndFeel()
javax.swing.plaf.metal.MetalLookAndFeel.isSupportedLookAndFeel()
javax.swing.plaf.multi.MultiLookAndFeel.isSupportedLookAndFeel()
javax.swing.plaf.synth.SynthLookAndFeel.isSupportedLookAndFeel()


Occurences of isSupportedOption

isSupportedOption occurences:
javax.tools.ForwardingJavaFileManager.isSupportedOption(java.lang.String)
javax.tools.OptionChecker.isSupportedOption(java.lang.String)


Occurences of isSuspended

isSuspended occurences:
com.sun.jdi.ThreadReference.isSuspended()
java.lang.management.ThreadInfo.isSuspended()


Occurences of isSymbolicLink

isSymbolicLink occurences:
java.nio.file.attribute.BasicFileAttributes.isSymbolicLink()
java.nio.file.Files.isSymbolicLink(java.nio.file.Path)


Occurences of isSynchronized

isSynchronized occurences:
com.sun.javadoc.ExecutableMemberDoc.isSynchronized()
com.sun.jdi.Method.isSynchronized()
java.lang.reflect.Modifier.isSynchronized(int)


Occurences of isSynthetic

isSynthetic occurences:
com.sun.javadoc.MemberDoc.isSynthetic()
com.sun.jdi.TypeComponent.isSynthetic()
java.lang.Class.isSynthetic()
java.lang.reflect.Constructor.isSynthetic()
java.lang.reflect.Executable.isSynthetic()
java.lang.reflect.Field.isSynthetic()
java.lang.reflect.Member.isSynthetic()
java.lang.reflect.Method.isSynthetic()
java.lang.reflect.Parameter.isSynthetic()


Occurences of isTearOff

isTearOff occurences:
java.awt.Menu.isTearOff()
javax.swing.JMenu.isTearOff()


Occurences of isTerminated

isTerminated occurences:
java.nio.channels.AsynchronousChannelGroup.isTerminated()
java.util.concurrent.ExecutorService.isTerminated()
java.util.concurrent.ForkJoinPool.isTerminated()
java.util.concurrent.Phaser.isTerminated()
java.util.concurrent.ThreadPoolExecutor.isTerminated()


Occurences of isTerminating

isTerminating occurences:
java.util.concurrent.ForkJoinPool.isTerminating()
java.util.concurrent.ThreadPoolExecutor.isTerminating()


Occurences of isTileWritable

isTileWritable occurences:
java.awt.image.BufferedImage.isTileWritable(int, int)
java.awt.image.WritableRenderedImage.isTileWritable(int, int)


Occurences of isTimeBased

isTimeBased occurences:
java.time.temporal.ChronoField.isTimeBased()
java.time.temporal.ChronoUnit.isTimeBased()
java.time.temporal.TemporalField.isTimeBased()
java.time.temporal.TemporalUnit.isTimeBased()


Occurences of isTitleCase

isTitleCase occurences:
java.lang.Character.isTitleCase(char)
java.lang.Character.isTitleCase(int)


Occurences of isTransformed

isTransformed occurences:
java.awt.Font.isTransformed()
java.awt.font.FontRenderContext.isTransformed()


Occurences of isTransient

isTransient occurences:
com.sun.javadoc.FieldDoc.isTransient()
com.sun.jdi.Field.isTransient()
java.lang.reflect.Modifier.isTransient(int)


Occurences of isTraversable

isTraversable occurences:
javax.swing.filechooser.FileSystemView.isTraversable(java.io.File)
javax.swing.filechooser.FileView.isTraversable(java.io.File)
javax.swing.JFileChooser.isTraversable(java.io.File)


Occurences of isTypeParameter

isTypeParameter occurences:
com.sun.javadoc.ParamTag.isTypeParameter()
com.sun.source.doctree.ParamTree.isTypeParameter()


Occurences of isUndecorated

isUndecorated occurences:
java.awt.Dialog.isUndecorated()
java.awt.Frame.isUndecorated()


Occurences of isUnderline

isUnderline occurences:
javax.swing.text.GlyphView.isUnderline()
javax.swing.text.LabelView.isUnderline()
javax.swing.text.StyleConstants.isUnderline(javax.swing.text.AttributeSet)


Occurences of isUnicodeIdentifierPart

isUnicodeIdentifierPart occurences:
java.lang.Character.isUnicodeIdentifierPart(char)
java.lang.Character.isUnicodeIdentifierPart(int)


Occurences of isUnicodeIdentifierStart

isUnicodeIdentifierStart occurences:
java.lang.Character.isUnicodeIdentifierStart(char)
java.lang.Character.isUnicodeIdentifierStart(int)


Occurences of isUpperCase

isUpperCase occurences:
java.lang.Character.isUpperCase(char)
java.lang.Character.isUpperCase(int)


Occurences of isUserInRole

isUserInRole occurences:
javax.xml.ws.spi.http.HttpExchange.isUserInRole(java.lang.String)
javax.xml.ws.WebServiceContext.isUserInRole(java.lang.String)


Occurences of isUserNode

isUserNode occurences:
java.util.prefs.AbstractPreferences.isUserNode()
java.util.prefs.Preferences.isUserNode()


Occurences of isValid

isValid occurences:
com.sun.jdi.connect.Connector.Argument.isValid(java.lang.String)
com.sun.jdi.connect.Connector.BooleanArgument.isValid(java.lang.String)
com.sun.jdi.connect.Connector.IntegerArgument.isValid(int)
com.sun.jdi.connect.Connector.IntegerArgument.isValid(java.lang.String)
com.sun.jdi.connect.Connector.SelectedArgument.isValid(java.lang.String)
com.sun.jdi.connect.Connector.StringArgument.isValid(java.lang.String)
java.awt.Component.isValid()
java.awt.image.IndexColorModel.isValid()
java.awt.image.IndexColorModel.isValid(int)
java.lang.management.MemoryManagerMXBean.isValid()
java.lang.management.MemoryPoolMXBean.isValid()
java.nio.channels.FileLock.isValid()
java.nio.channels.MembershipKey.isValid()
java.nio.channels.SelectionKey.isValid()
java.nio.channels.spi.AbstractSelectionKey.isValid()
java.nio.file.WatchKey.isValid()
java.sql.Connection.isValid(int)
javax.accessibility.AccessibleHyperlink.isValid()
javax.management.Descriptor.isValid()
javax.management.ImmutableDescriptor.isValid()
javax.management.modelmbean.DescriptorSupport.isValid()
javax.net.ssl.SSLSession.isValid()
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.isValid()
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.isValid()
javax.swing.text.html.HTMLDocument.Iterator.isValid()
javax.xml.datatype.XMLGregorianCalendar.isValid()


Occurences of isValidateRoot

isValidateRoot occurences:
java.applet.Applet.isValidateRoot()
java.awt.Container.isValidateRoot()
java.awt.Window.isValidateRoot()
javax.swing.JComponent.isValidateRoot()
javax.swing.JRootPane.isValidateRoot()
javax.swing.JScrollPane.isValidateRoot()
javax.swing.JSplitPane.isValidateRoot()
javax.swing.JTextField.isValidateRoot()


Occurences of isValidating

isValidating occurences:
javax.xml.bind.helpers.AbstractUnmarshallerImpl.isValidating()
javax.xml.bind.Unmarshaller.isValidating()
javax.xml.parsers.DocumentBuilder.isValidating()
javax.xml.parsers.DocumentBuilderFactory.isValidating()
javax.xml.parsers.SAXParser.isValidating()
javax.xml.parsers.SAXParserFactory.isValidating()


Occurences of isValidOffset

isValidOffset occurences:
java.time.zone.ZoneOffsetTransition.isValidOffset(java.time.ZoneOffset)
java.time.zone.ZoneRules.isValidOffset(java.time.LocalDateTime, java.time.ZoneOffset)


Occurences of isValue

isValue occurences:
javax.management.openmbean.ArrayType.isValue(java.lang.Object)
javax.management.openmbean.CompositeType.isValue(java.lang.Object)
javax.management.openmbean.OpenMBeanAttributeInfoSupport.isValue(java.lang.Object)
javax.management.openmbean.OpenMBeanParameterInfo.isValue(java.lang.Object)
javax.management.openmbean.OpenMBeanParameterInfoSupport.isValue(java.lang.Object)
javax.management.openmbean.OpenType.isValue(java.lang.Object)
javax.management.openmbean.SimpleType.isValue(java.lang.Object)
javax.management.openmbean.TabularType.isValue(java.lang.Object)


Occurences of isVarArgs

isVarArgs occurences:
com.sun.javadoc.ExecutableMemberDoc.isVarArgs()
com.sun.jdi.Method.isVarArgs()
java.lang.invoke.MethodHandleInfo.isVarArgs()
java.lang.reflect.Constructor.isVarArgs()
java.lang.reflect.Executable.isVarArgs()
java.lang.reflect.Method.isVarArgs()
java.lang.reflect.Parameter.isVarArgs()
javax.lang.model.element.ExecutableElement.isVarArgs()


Occurences of isVerbose

isVerbose occurences:
java.lang.management.ClassLoadingMXBean.isVerbose()
java.lang.management.MemoryMXBean.isVerbose()


Occurences of isVisible

isVisible occurences:
com.sun.jdi.LocalVariable.isVisible(com.sun.jdi.StackFrame)
java.awt.Component.isVisible()
java.awt.Component.AccessibleAWTComponent.isVisible()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.isVisible()
java.awt.MenuComponent.AccessibleAWTMenuComponent.isVisible()
java.awt.SplashScreen.isVisible()
javax.accessibility.AccessibleComponent.isVisible()
javax.swing.JList.AccessibleJList.AccessibleJListChild.isVisible()
javax.swing.JPopupMenu.isVisible()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.isVisible()
javax.swing.JTree.isVisible(javax.swing.tree.TreePath)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.isVisible()
javax.swing.plaf.basic.ComboPopup.isVisible()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isVisible()
javax.swing.text.Caret.isVisible()
javax.swing.text.DefaultCaret.isVisible()
javax.swing.text.html.ParagraphView.isVisible()
javax.swing.text.View.isVisible()


Occurences of isVolatile

isVolatile occurences:
com.sun.javadoc.FieldDoc.isVolatile()
com.sun.jdi.Field.isVolatile()
java.lang.reflect.Modifier.isVolatile(int)


Occurences of isWeekDateSupported

isWeekDateSupported occurences:
java.util.Calendar.isWeekDateSupported()
java.util.GregorianCalendar.isWeekDateSupported()


Occurences of isWheelScrollingEnabled

isWheelScrollingEnabled occurences:
java.awt.ScrollPane.isWheelScrollingEnabled()
javax.swing.JScrollPane.isWheelScrollingEnabled()


Occurences of isWhiteSpace

isWhiteSpace occurences:
javax.xml.bind.annotation.adapters.CollapsedStringAdapter.isWhiteSpace(char)
javax.xml.stream.events.Characters.isWhiteSpace()
javax.xml.stream.util.StreamReaderDelegate.isWhiteSpace()
javax.xml.stream.XMLStreamReader.isWhiteSpace()


Occurences of isWhitespace

isWhitespace occurences:
java.awt.font.GlyphMetrics.isWhitespace()
java.lang.Character.isWhitespace(char)
java.lang.Character.isWhitespace(int)


Occurences of isWrapperFor

isWrapperFor occurences:
java.sql.Wrapper.isWrapperFor(java.lang.Class)
javax.sql.rowset.RowSetMetaDataImpl.isWrapperFor(java.lang.Class)


Occurences of isWritable

isWritable occurences:
java.nio.channels.SelectionKey.isWritable()
java.nio.file.Files.isWritable(java.nio.file.Path)
java.sql.ResultSetMetaData.isWritable(int)
javax.management.MBeanAttributeInfo.isWritable()
javax.management.openmbean.OpenMBeanAttributeInfo.isWritable()
javax.management.relation.RoleInfo.isWritable()
javax.sql.rowset.RowSetMetaDataImpl.isWritable(int)


Occurences of isWriteLocked

isWriteLocked occurences:
java.util.concurrent.locks.ReentrantReadWriteLock.isWriteLocked()
java.util.concurrent.locks.StampedLock.isWriteLocked()


Occurences of isXIncludeAware

isXIncludeAware occurences:
javax.xml.parsers.DocumentBuilder.isXIncludeAware()
javax.xml.parsers.DocumentBuilderFactory.isXIncludeAware()
javax.xml.parsers.SAXParser.isXIncludeAware()
javax.xml.parsers.SAXParserFactory.isXIncludeAware()


Occurences of isXOPPackage

isXOPPackage occurences:
javax.xml.bind.attachment.AttachmentMarshaller.isXOPPackage()
javax.xml.bind.attachment.AttachmentUnmarshaller.isXOPPackage()


Occurences of isZero

isZero occurences:
java.time.chrono.ChronoPeriod.isZero()
java.time.Duration.isZero()
java.time.Period.isZero()


Occurences of is_a

is_a occurences:
org.omg.CORBA.portable.Delegate.is_a(org.omg.CORBA.Object, java.lang.String)
org.omg.PortableServer.portable.Delegate.is_a(org.omg.PortableServer.Servant, java.lang.String)


Occurences of is_null

is_null occurences:
org.omg.DynamicAny.DynValueCommonOperations.is_null()
org.omg.DynamicAny._DynValueStub.is_null()


Occurences of ITALY

ITALY occurences:
java.awt.ITALY
java.util.ITALY


Occurences of ITALY_ENVELOPE

ITALY_ENVELOPE occurences:
java.awt.ITALY_ENVELOPE
javax.print.attribute.standard.ITALY_ENVELOPE
javax.print.attribute.standard.ITALY_ENVELOPE


Occurences of item

item occurences:
javax.imageio.metadata.IIOMetadataNode.item(int)
org.omg.CORBA.ContextList.item(int)
org.omg.CORBA.ExceptionList.item(int)
org.omg.CORBA.NVList.item(int)
org.w3c.dom.DOMImplementationList.item(int)
org.w3c.dom.DOMStringList.item(int)
org.w3c.dom.NamedNodeMap.item(int)
org.w3c.dom.NodeList.item(int)


Occurences of ItemHandler

ItemHandler occurences:
javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler.ItemHandler()
javax.swing.plaf.basic.BasicComboPopup.ItemHandler.ItemHandler()


Occurences of itemListener

itemListener occurences:
javax.swing.itemListener
javax.swing.plaf.basic.itemListener
javax.swing.plaf.basic.itemListener


Occurences of itemStateChanged

itemStateChanged occurences:
java.awt.AWTEventMulticaster.itemStateChanged(java.awt.event.ItemEvent)
java.awt.Checkbox.AccessibleAWTCheckbox.itemStateChanged(java.awt.event.ItemEvent)
java.awt.event.ItemListener.itemStateChanged(java.awt.event.ItemEvent)
java.awt.List.AccessibleAWTList.itemStateChanged(java.awt.event.ItemEvent)
javax.swing.DefaultCellEditor.EditorDelegate.itemStateChanged(java.awt.event.ItemEvent)
javax.swing.JToggleButton.AccessibleJToggleButton.itemStateChanged(java.awt.event.ItemEvent)
javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler.itemStateChanged(java.awt.event.ItemEvent)
javax.swing.plaf.basic.BasicComboPopup.ItemHandler.itemStateChanged(java.awt.event.ItemEvent)


Occurences of iterate

iterate occurences:
java.util.stream.DoubleStream.iterate(double, java.util.function.DoubleUnaryOperator)
java.util.stream.IntStream.iterate(int, java.util.function.IntUnaryOperator)
java.util.stream.LongStream.iterate(long, java.util.function.LongUnaryOperator)
java.util.stream.Stream.iterate(java.lang.Object, java.util.function.UnaryOperator)
java.util.stream.Stream.iterate(T, java.util.function.UnaryOperator)


Occurences of iterator

iterator occurences:
com.sun.source.util.DocTreePath.iterator()
com.sun.source.util.TreePath.iterator()
java.awt.dnd.DragGestureEvent.iterator()
java.beans.beancontext.BeanContextMembershipEvent.iterator()
java.beans.beancontext.BeanContextSupport.iterator()
java.lang.Iterable.iterator()
java.nio.file.DirectoryStream.iterator()
java.nio.file.Path.iterator()
java.sql.SQLException.iterator()
java.util.AbstractCollection.iterator()
java.util.AbstractList.iterator()
java.util.AbstractSequentialList.iterator()
java.util.ArrayDeque.iterator()
java.util.ArrayList.iterator()
java.util.Collection.iterator()
java.util.concurrent.ArrayBlockingQueue.iterator()
java.util.concurrent.BlockingDeque.iterator()
java.util.concurrent.ConcurrentHashMap.KeySetView.iterator()
java.util.concurrent.ConcurrentLinkedDeque.iterator()
java.util.concurrent.ConcurrentLinkedQueue.iterator()
java.util.concurrent.ConcurrentSkipListSet.iterator()
java.util.concurrent.CopyOnWriteArrayList.iterator()
java.util.concurrent.CopyOnWriteArraySet.iterator()
java.util.concurrent.DelayQueue.iterator()
java.util.concurrent.LinkedBlockingDeque.iterator()
java.util.concurrent.LinkedBlockingQueue.iterator()
java.util.concurrent.LinkedTransferQueue.iterator()
java.util.concurrent.PriorityBlockingQueue.iterator()
java.util.concurrent.SynchronousQueue.iterator()
java.util.Deque.iterator()
java.util.HashSet.iterator()
java.util.List.iterator()
java.util.NavigableSet.iterator()
java.util.PriorityQueue.iterator()
java.util.ServiceLoader.iterator()
java.util.Set.iterator()
java.util.Spliterators.iterator(java.util.Spliterator)
java.util.Spliterators.iterator(java.util.Spliterator.OfDouble)
java.util.Spliterators.iterator(java.util.Spliterator.OfInt)
java.util.Spliterators.iterator(java.util.Spliterator.OfLong)
java.util.stream.BaseStream.iterator()
java.util.stream.DoubleStream.iterator()
java.util.stream.IntStream.iterator()
java.util.stream.LongStream.iterator()
java.util.TreeSet.iterator()
java.util.Vector.iterator()
javax.xml.crypto.dom.DOMCryptoContext.iterator()
javax.xml.crypto.NodeSetData.iterator()


Occurences of Iterator

Iterator occurences:
java.util.Iterator
javax.swing.text.html.HTMLDocument.Iterator.Iterator()


Occurences of IvParameterSpec (constructors)

IvParameterSpec (constructors) occurences:
javax.crypto.spec.IvParameterSpec(byte:A)
javax.crypto.spec.IvParameterSpec(byte:A, int, int)


Occurences of JAAS Login Configuration File

JAAS Login Configuration File occurences:
JAAS Login Configuration File
JAAS Login Configuration File


Occurences of JANUARY

JANUARY occurences:
java.time.JANUARY
java.util.JANUARY
javax.xml.datatype.JANUARY


Occurences of JAPANESE_DOUBLE_POSTCARD

JAPANESE_DOUBLE_POSTCARD occurences:
javax.print.attribute.standard.JAPANESE_DOUBLE_POSTCARD
javax.print.attribute.standard.JAPANESE_DOUBLE_POSTCARD


Occurences of JAPANESE_POSTCARD

JAPANESE_POSTCARD occurences:
javax.print.attribute.standard.JAPANESE_POSTCARD
javax.print.attribute.standard.JAPANESE_POSTCARD


Occurences of jar

jar occurences:
compact1.java.util.jar
compact2.java.util.jar
compact3.java.util.jar
jar
jar
java.util.jar


Occurences of JarEntry (constructors)

JarEntry (constructors) occurences:
java.util.jar.JarEntry(java.lang.String)
java.util.jar.JarEntry(java.util.jar.JarEntry)
java.util.jar.JarEntry(java.util.zip.ZipEntry)


Occurences of JarException (constructors)

JarException (constructors) occurences:
java.util.jar.JarException()
java.util.jar.JarException(java.lang.String)


Occurences of JarFile (constructors)

JarFile (constructors) occurences:
java.util.jar.JarFile(java.io.File)
java.util.jar.JarFile(java.io.File, boolean)
java.util.jar.JarFile(java.io.File, boolean, int)
java.util.jar.JarFile(java.lang.String)
java.util.jar.JarFile(java.lang.String, boolean)


Occurences of JarInputStream (constructors)

JarInputStream (constructors) occurences:
java.util.jar.JarInputStream(java.io.InputStream)
java.util.jar.JarInputStream(java.io.InputStream, boolean)


Occurences of JarOutputStream (constructors)

JarOutputStream (constructors) occurences:
java.util.jar.JarOutputStream(java.io.OutputStream)
java.util.jar.JarOutputStream(java.io.OutputStream, java.util.jar.Manifest)


Occurences of jarsigner

jarsigner occurences:
jarsigner
jarsigner


Occurences of java

java occurences:
java
java


Occurences of Java 2D API Overview

Java 2D API Overview occurences:
Java 2D API Overview
Java 2D API Overview


Occurences of Java IDL and RMI-IIOP

Java IDL and RMI-IIOP occurences:
Java IDL and RMI-IIOP
Java IDL and RMI-IIOP


Occurences of Java Image I/O API Guide

Java Image I/O API Guide occurences:
Java Image I/O API Guide
Java Image I/O API Guide


Occurences of Java Logging API Enhancements

Java Logging API Enhancements occurences:
Java Logging API Enhancements
Java Logging API Enhancements


Occurences of Java Platform Debugger Architecture

Java Platform Debugger Architecture occurences:
Java Platform Debugger Architecture
Java Platform Debugger Architecture
Java Platform Debugger Architecture
Java Platform Debugger Architecture
Java Platform Debugger Architecture


Occurences of Java SE Monitoring and Management Guide

Java SE Monitoring and Management Guide occurences:
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide
Java SE Monitoring and Management Guide


Occurences of Java VisualVM

Java VisualVM occurences:
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM
Java VisualVM


Occurences of Java Web Start

Java Web Start occurences:
Java Web Start
Java Web Start


Occurences of javac

javac occurences:
javac
javac
javac


Occurences of javadoc

javadoc occurences:
com.sun.javadoc
javadoc
javadoc


Occurences of javafxpackager

javafxpackager occurences:
javafxpackager
javafxpackager


Occurences of javah

javah occurences:
javah
javah


Occurences of JAVANESE

JAVANESE occurences:
java.awt.font.JAVANESE
java.lang.JAVANESE
java.lang.JAVANESE


Occurences of javap

javap occurences:
javap
javap


Occurences of javaws

javaws occurences:
javaws
javaws


Occurences of JAVA_OBJECT

JAVA_OBJECT occurences:
java.sql.JAVA_OBJECT
java.sql.JAVA_OBJECT


Occurences of JAXBElement (constructors)

JAXBElement (constructors) occurences:
javax.xml.bind.JAXBElement(javax.xml.namespace.QName, java.lang.Class, java.lang.Class, java.lang.Object)
javax.xml.bind.JAXBElement(javax.xml.namespace.QName, java.lang.Class, java.lang.Class, T)
javax.xml.bind.JAXBElement(javax.xml.namespace.QName, java.lang.Class, java.lang.Object)
javax.xml.bind.JAXBElement(javax.xml.namespace.QName, java.lang.Class, T)


Occurences of JAXBException (constructors)

JAXBException (constructors) occurences:
javax.xml.bind.JAXBException(java.lang.String)
javax.xml.bind.JAXBException(java.lang.String, java.lang.String)
javax.xml.bind.JAXBException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.JAXBException(java.lang.String, java.lang.Throwable)
javax.xml.bind.JAXBException(java.lang.Throwable)


Occurences of JAXBResult (constructors)

JAXBResult (constructors) occurences:
javax.xml.bind.util.JAXBResult(javax.xml.bind.JAXBContext)
javax.xml.bind.util.JAXBResult(javax.xml.bind.Unmarshaller)


Occurences of JAXBSource (constructors)

JAXBSource (constructors) occurences:
javax.xml.bind.util.JAXBSource(javax.xml.bind.JAXBContext, java.lang.Object)
javax.xml.bind.util.JAXBSource(javax.xml.bind.Marshaller, java.lang.Object)


Occurences of JAXP Compatibility

JAXP Compatibility occurences:
JAXP Compatibility
JAXP Compatibility


Occurences of JButton (constructors)

JButton (constructors) occurences:
javax.swing.JButton()
javax.swing.JButton(java.lang.String)
javax.swing.JButton(java.lang.String, javax.swing.Icon)
javax.swing.JButton(javax.swing.Action)
javax.swing.JButton(javax.swing.Icon)


Occurences of JCheckBox (constructors)

JCheckBox (constructors) occurences:
javax.swing.JCheckBox()
javax.swing.JCheckBox(java.lang.String)
javax.swing.JCheckBox(java.lang.String, boolean)
javax.swing.JCheckBox(java.lang.String, javax.swing.Icon)
javax.swing.JCheckBox(java.lang.String, javax.swing.Icon, boolean)
javax.swing.JCheckBox(javax.swing.Action)
javax.swing.JCheckBox(javax.swing.Icon)
javax.swing.JCheckBox(javax.swing.Icon, boolean)


Occurences of JCheckBoxMenuItem (constructors)

JCheckBoxMenuItem (constructors) occurences:
javax.swing.JCheckBoxMenuItem()
javax.swing.JCheckBoxMenuItem(java.lang.String)
javax.swing.JCheckBoxMenuItem(java.lang.String, boolean)
javax.swing.JCheckBoxMenuItem(java.lang.String, javax.swing.Icon)
javax.swing.JCheckBoxMenuItem(java.lang.String, javax.swing.Icon, boolean)
javax.swing.JCheckBoxMenuItem(javax.swing.Action)
javax.swing.JCheckBoxMenuItem(javax.swing.Icon)


Occurences of jcmd

jcmd occurences:
jcmd
jcmd


Occurences of JColorChooser (constructors)

JColorChooser (constructors) occurences:
javax.swing.JColorChooser()
javax.swing.JColorChooser(java.awt.Color)
javax.swing.JColorChooser(javax.swing.colorchooser.ColorSelectionModel)


Occurences of JComboBox (constructors)

JComboBox (constructors) occurences:
javax.swing.JComboBox()
javax.swing.JComboBox(E:A)
javax.swing.JComboBox(java.lang.Object:A)
javax.swing.JComboBox(java.util.Vector)
javax.swing.JComboBox(javax.swing.ComboBoxModel)


Occurences of jconsole

jconsole occurences:
com.sun.tools.jconsole
jconsole
jconsole


Occurences of jdb

jdb occurences:
jdb
jdb


Occurences of jdeps

jdeps occurences:
jdeps
jdeps


Occurences of jdi

jdi occurences:
com.sun.jdi
The Java.Overview


Occurences of JDialog (constructors)

JDialog (constructors) occurences:
javax.swing.JDialog()
javax.swing.JDialog(java.awt.Dialog)
javax.swing.JDialog(java.awt.Dialog, boolean)
javax.swing.JDialog(java.awt.Dialog, java.lang.String)
javax.swing.JDialog(java.awt.Dialog, java.lang.String, boolean)
javax.swing.JDialog(java.awt.Dialog, java.lang.String, boolean, java.awt.GraphicsConfiguration)
javax.swing.JDialog(java.awt.Frame)
javax.swing.JDialog(java.awt.Frame, boolean)
javax.swing.JDialog(java.awt.Frame, java.lang.String)
javax.swing.JDialog(java.awt.Frame, java.lang.String, boolean)
javax.swing.JDialog(java.awt.Frame, java.lang.String, boolean, java.awt.GraphicsConfiguration)
javax.swing.JDialog(java.awt.Window)
javax.swing.JDialog(java.awt.Window, java.awt.Dialog.ModalityType)
javax.swing.JDialog(java.awt.Window, java.lang.String)
javax.swing.JDialog(java.awt.Window, java.lang.String, java.awt.Dialog.ModalityType)
javax.swing.JDialog(java.awt.Window, java.lang.String, java.awt.Dialog.ModalityType, java.awt.GraphicsConfiguration)


Occurences of JDIPermission (constructors)

JDIPermission (constructors) occurences:
com.sun.jdi.JDIPermission(java.lang.String)
com.sun.jdi.JDIPermission(java.lang.String, java.lang.String)


Occurences of jdk

jdk occurences:
compact1.jdk
compact2.jdk
compact3.jdk
jdk
jdk


Occurences of JDK and JRE File Structure

JDK and JRE File Structure occurences:
JDK and JRE File Structure
JDK and JRE File Structure


Occurences of JEditorPane (constructors)

JEditorPane (constructors) occurences:
javax.swing.JEditorPane()
javax.swing.JEditorPane(java.lang.String)
javax.swing.JEditorPane(java.lang.String, java.lang.String)
javax.swing.JEditorPane(java.net.URL)


Occurences of JFileChooser (constructors)

JFileChooser (constructors) occurences:
javax.swing.JFileChooser()
javax.swing.JFileChooser(java.io.File)
javax.swing.JFileChooser(java.io.File, javax.swing.filechooser.FileSystemView)
javax.swing.JFileChooser(java.lang.String)
javax.swing.JFileChooser(java.lang.String, javax.swing.filechooser.FileSystemView)
javax.swing.JFileChooser(javax.swing.filechooser.FileSystemView)


Occurences of JFormattedTextField (constructors)

JFormattedTextField (constructors) occurences:
javax.swing.JFormattedTextField()
javax.swing.JFormattedTextField(java.lang.Object)
javax.swing.JFormattedTextField(java.text.Format)
javax.swing.JFormattedTextField(javax.swing.JFormattedTextField.AbstractFormatter)
javax.swing.JFormattedTextField(javax.swing.JFormattedTextField.AbstractFormatterFactory)
javax.swing.JFormattedTextField(javax.swing.JFormattedTextField.AbstractFormatterFactory, java.lang.Object)


Occurences of JFrame (constructors)

JFrame (constructors) occurences:
javax.swing.JFrame()
javax.swing.JFrame(java.awt.GraphicsConfiguration)
javax.swing.JFrame(java.lang.String)
javax.swing.JFrame(java.lang.String, java.awt.GraphicsConfiguration)


Occurences of jgss

jgss occurences:
compact3.org.ietf.jgss
org.ietf.jgss


Occurences of jhat

jhat occurences:
jhat
jhat


Occurences of jinfo

jinfo occurences:
jinfo
jinfo


Occurences of JInternalFrame (constructors)

JInternalFrame (constructors) occurences:
javax.swing.JInternalFrame()
javax.swing.JInternalFrame(java.lang.String)
javax.swing.JInternalFrame(java.lang.String, boolean)
javax.swing.JInternalFrame(java.lang.String, boolean, boolean)
javax.swing.JInternalFrame(java.lang.String, boolean, boolean, boolean)
javax.swing.JInternalFrame(java.lang.String, boolean, boolean, boolean, boolean)


Occurences of JIS_B0

JIS_B0 occurences:
java.awt.JIS_B0
javax.print.attribute.standard.JIS_B0


Occurences of JIS_B1

JIS_B1 occurences:
java.awt.JIS_B1
javax.print.attribute.standard.JIS_B1


Occurences of JIS_B10

JIS_B10 occurences:
java.awt.JIS_B10
javax.print.attribute.standard.JIS_B10


Occurences of JIS_B2

JIS_B2 occurences:
java.awt.JIS_B2
javax.print.attribute.standard.JIS_B2


Occurences of JIS_B3

JIS_B3 occurences:
java.awt.JIS_B3
javax.print.attribute.standard.JIS_B3


Occurences of JIS_B4

JIS_B4 occurences:
java.awt.JIS_B4
javax.print.attribute.standard.JIS_B4


Occurences of JIS_B5

JIS_B5 occurences:
java.awt.JIS_B5
javax.print.attribute.standard.JIS_B5


Occurences of JIS_B6

JIS_B6 occurences:
java.awt.JIS_B6
javax.print.attribute.standard.JIS_B6


Occurences of JIS_B7

JIS_B7 occurences:
java.awt.JIS_B7
javax.print.attribute.standard.JIS_B7


Occurences of JIS_B8

JIS_B8 occurences:
java.awt.JIS_B8
javax.print.attribute.standard.JIS_B8


Occurences of JIS_B9

JIS_B9 occurences:
java.awt.JIS_B9
javax.print.attribute.standard.JIS_B9


Occurences of jjs

jjs occurences:
jjs
jjs


Occurences of JLabel (constructors)

JLabel (constructors) occurences:
javax.swing.JLabel()
javax.swing.JLabel(java.lang.String)
javax.swing.JLabel(java.lang.String, int)
javax.swing.JLabel(java.lang.String, javax.swing.Icon, int)
javax.swing.JLabel(javax.swing.Icon)
javax.swing.JLabel(javax.swing.Icon, int)


Occurences of JLayer (constructors)

JLayer (constructors) occurences:
javax.swing.JLayer()
javax.swing.JLayer(java.awt.Component)
javax.swing.JLayer(java.awt.Component, javax.swing.plaf.LayerUI)
javax.swing.JLayer(V)
javax.swing.JLayer(V, javax.swing.plaf.LayerUI)


Occurences of JList (constructors)

JList (constructors) occurences:
javax.swing.JList()
javax.swing.JList(E:A)
javax.swing.JList(java.lang.Object:A)
javax.swing.JList(java.util.Vector)
javax.swing.JList(javax.swing.ListModel)


Occurences of jmap

jmap occurences:
jmap
jmap


Occurences of jmc

jmc occurences:
jmc
jmc


Occurences of JMenu (constructors)

JMenu (constructors) occurences:
javax.swing.JMenu()
javax.swing.JMenu(java.lang.String)
javax.swing.JMenu(java.lang.String, boolean)
javax.swing.JMenu(javax.swing.Action)


Occurences of JMenuItem (constructors)

JMenuItem (constructors) occurences:
javax.swing.JMenuItem()
javax.swing.JMenuItem(java.lang.String)
javax.swing.JMenuItem(java.lang.String, int)
javax.swing.JMenuItem(java.lang.String, javax.swing.Icon)
javax.swing.JMenuItem(javax.swing.Action)
javax.swing.JMenuItem(javax.swing.Icon)


Occurences of JMException (constructors)

JMException (constructors) occurences:
javax.management.JMException()
javax.management.JMException(java.lang.String)


Occurences of JMRuntimeException (constructors)

JMRuntimeException (constructors) occurences:
javax.management.JMRuntimeException()
javax.management.JMRuntimeException(java.lang.String)


Occurences of JMXConnectorServer (constructors)

JMXConnectorServer (constructors) occurences:
javax.management.remote.JMXConnectorServer()
javax.management.remote.JMXConnectorServer(javax.management.MBeanServer)


Occurences of JMXProviderException (constructors)

JMXProviderException (constructors) occurences:
javax.management.remote.JMXProviderException()
javax.management.remote.JMXProviderException(java.lang.String)
javax.management.remote.JMXProviderException(java.lang.String, java.lang.Throwable)


Occurences of JMXServiceURL (constructors)

JMXServiceURL (constructors) occurences:
javax.management.remote.JMXServiceURL(java.lang.String)
javax.management.remote.JMXServiceURL(java.lang.String, java.lang.String, int)
javax.management.remote.JMXServiceURL(java.lang.String, java.lang.String, int, java.lang.String)


Occurences of JNDI Change History

JNDI Change History occurences:
JNDI Change History
JNDI Change History


Occurences of JobAttributes (constructors)

JobAttributes (constructors) occurences:
java.awt.JobAttributes()
java.awt.JobAttributes(int, java.awt.JobAttributes.DefaultSelectionType, java.awt.JobAttributes.DestinationType, java.awt.JobAttributes.DialogType, java.lang.String, int, int, java.awt.JobAttributes.MultipleDocumentHandlingType, int:A:A, java.lang.String, java.awt.JobAttributes.SidesType)
java.awt.JobAttributes(java.awt.JobAttributes)


Occurences of JobStateReasons (constructors)

JobStateReasons (constructors) occurences:
javax.print.attribute.standard.JobStateReasons()
javax.print.attribute.standard.JobStateReasons(int)
javax.print.attribute.standard.JobStateReasons(int, float)
javax.print.attribute.standard.JobStateReasons(java.util.Collection)


Occurences of join

join occurences:
java.lang.String.join(java.lang.CharSequence, java.lang.CharSequence...)
java.lang.String.join(java.lang.CharSequence, java.lang.Iterable)
java.lang.Thread.join()
java.lang.Thread.join(long)
java.lang.Thread.join(long, int)
java.net.DatagramSocketImpl.join(java.net.InetAddress)
java.nio.channels.MulticastChannel.join(java.net.InetAddress, java.net.NetworkInterface)
java.nio.channels.MulticastChannel.join(java.net.InetAddress, java.net.NetworkInterface, java.net.InetAddress)
java.util.concurrent.CompletableFuture.join()
java.util.concurrent.ForkJoinTask.join()


Occurences of joinGroup

joinGroup occurences:
java.net.DatagramSocketImpl.joinGroup(java.net.SocketAddress, java.net.NetworkInterface)
java.net.MulticastSocket.joinGroup(java.net.InetAddress)
java.net.MulticastSocket.joinGroup(java.net.SocketAddress, java.net.NetworkInterface)


Occurences of joining

joining occurences:
java.util.stream.Collectors.joining()
java.util.stream.Collectors.joining(java.lang.CharSequence)
java.util.stream.Collectors.joining(java.lang.CharSequence, java.lang.CharSequence, java.lang.CharSequence)


Occurences of JOptionPane (constructors)

JOptionPane (constructors) occurences:
javax.swing.JOptionPane()
javax.swing.JOptionPane(java.lang.Object)
javax.swing.JOptionPane(java.lang.Object, int)
javax.swing.JOptionPane(java.lang.Object, int, int)
javax.swing.JOptionPane(java.lang.Object, int, int, javax.swing.Icon)
javax.swing.JOptionPane(java.lang.Object, int, int, javax.swing.Icon, java.lang.Object:A)
javax.swing.JOptionPane(java.lang.Object, int, int, javax.swing.Icon, java.lang.Object:A, java.lang.Object)


Occurences of JPanel (constructors)

JPanel (constructors) occurences:
javax.swing.JPanel()
javax.swing.JPanel(boolean)
javax.swing.JPanel(java.awt.LayoutManager)
javax.swing.JPanel(java.awt.LayoutManager, boolean)


Occurences of JPasswordField (constructors)

JPasswordField (constructors) occurences:
javax.swing.JPasswordField()
javax.swing.JPasswordField(int)
javax.swing.JPasswordField(java.lang.String)
javax.swing.JPasswordField(java.lang.String, int)
javax.swing.JPasswordField(javax.swing.text.Document, java.lang.String, int)


Occurences of JPDA Enhancements

JPDA Enhancements occurences:
JPDA Enhancements
JPDA Enhancements
JPDA Enhancements


Occurences of JPEG

JPEG occurences:
javax.print.JPEG
javax.print.JPEG
javax.print.JPEG


Occurences of JPopupMenu (constructors)

JPopupMenu (constructors) occurences:
javax.swing.JPopupMenu()
javax.swing.JPopupMenu(java.lang.String)


Occurences of JProgressBar (constructors)

JProgressBar (constructors) occurences:
javax.swing.JProgressBar()
javax.swing.JProgressBar(int)
javax.swing.JProgressBar(int, int)
javax.swing.JProgressBar(int, int, int)
javax.swing.JProgressBar(javax.swing.BoundedRangeModel)


Occurences of jps

jps occurences:
jps
jps


Occurences of JRadioButton (constructors)

JRadioButton (constructors) occurences:
javax.swing.JRadioButton()
javax.swing.JRadioButton(java.lang.String)
javax.swing.JRadioButton(java.lang.String, boolean)
javax.swing.JRadioButton(java.lang.String, javax.swing.Icon)
javax.swing.JRadioButton(java.lang.String, javax.swing.Icon, boolean)
javax.swing.JRadioButton(javax.swing.Action)
javax.swing.JRadioButton(javax.swing.Icon)
javax.swing.JRadioButton(javax.swing.Icon, boolean)


Occurences of JRadioButtonMenuItem (constructors)

JRadioButtonMenuItem (constructors) occurences:
javax.swing.JRadioButtonMenuItem()
javax.swing.JRadioButtonMenuItem(java.lang.String)
javax.swing.JRadioButtonMenuItem(java.lang.String, boolean)
javax.swing.JRadioButtonMenuItem(java.lang.String, javax.swing.Icon)
javax.swing.JRadioButtonMenuItem(java.lang.String, javax.swing.Icon, boolean)
javax.swing.JRadioButtonMenuItem(javax.swing.Action)
javax.swing.JRadioButtonMenuItem(javax.swing.Icon)
javax.swing.JRadioButtonMenuItem(javax.swing.Icon, boolean)


Occurences of jrunscript

jrunscript occurences:
jrunscript
jrunscript


Occurences of jsadebugd

jsadebugd occurences:
jsadebugd
jsadebugd


Occurences of JScrollBar (constructors)

JScrollBar (constructors) occurences:
javax.swing.JScrollBar()
javax.swing.JScrollBar(int)
javax.swing.JScrollBar(int, int, int, int, int)


Occurences of JScrollPane (constructors)

JScrollPane (constructors) occurences:
javax.swing.JScrollPane()
javax.swing.JScrollPane(int, int)
javax.swing.JScrollPane(java.awt.Component)
javax.swing.JScrollPane(java.awt.Component, int, int)


Occurences of JSeparator (constructors)

JSeparator (constructors) occurences:
javax.swing.JSeparator()
javax.swing.JSeparator(int)


Occurences of JSlider (constructors)

JSlider (constructors) occurences:
javax.swing.JSlider()
javax.swing.JSlider(int)
javax.swing.JSlider(int, int)
javax.swing.JSlider(int, int, int)
javax.swing.JSlider(int, int, int, int)
javax.swing.JSlider(javax.swing.BoundedRangeModel)


Occurences of JSpinner (constructors)

JSpinner (constructors) occurences:
javax.swing.JSpinner()
javax.swing.JSpinner(javax.swing.SpinnerModel)


Occurences of JSplitPane (constructors)

JSplitPane (constructors) occurences:
javax.swing.JSplitPane()
javax.swing.JSplitPane(int)
javax.swing.JSplitPane(int, boolean)
javax.swing.JSplitPane(int, boolean, java.awt.Component, java.awt.Component)
javax.swing.JSplitPane(int, java.awt.Component, java.awt.Component)


Occurences of jstack

jstack occurences:
jstack
jstack


Occurences of jstat

jstat occurences:
jstat
jstat


Occurences of jstatd

jstatd occurences:
jstatd
jstatd


Occurences of JTabbedPane (constructors)

JTabbedPane (constructors) occurences:
javax.swing.JTabbedPane()
javax.swing.JTabbedPane(int)
javax.swing.JTabbedPane(int, int)


Occurences of JTable (constructors)

JTable (constructors) occurences:
javax.swing.JTable()
javax.swing.JTable(int, int)
javax.swing.JTable(java.lang.Object:A:A, java.lang.Object:A)
javax.swing.JTable(java.util.Vector, java.util.Vector)
javax.swing.JTable(javax.swing.table.TableModel)
javax.swing.JTable(javax.swing.table.TableModel, javax.swing.table.TableColumnModel)
javax.swing.JTable(javax.swing.table.TableModel, javax.swing.table.TableColumnModel, javax.swing.ListSelectionModel)


Occurences of JTableHeader (constructors)

JTableHeader (constructors) occurences:
javax.swing.table.JTableHeader()
javax.swing.table.JTableHeader(javax.swing.table.TableColumnModel)


Occurences of JTextArea (constructors)

JTextArea (constructors) occurences:
javax.swing.JTextArea()
javax.swing.JTextArea(int, int)
javax.swing.JTextArea(java.lang.String)
javax.swing.JTextArea(java.lang.String, int, int)
javax.swing.JTextArea(javax.swing.text.Document)
javax.swing.JTextArea(javax.swing.text.Document, java.lang.String, int, int)


Occurences of JTextField (constructors)

JTextField (constructors) occurences:
javax.swing.JTextField()
javax.swing.JTextField(int)
javax.swing.JTextField(java.lang.String)
javax.swing.JTextField(java.lang.String, int)
javax.swing.JTextField(javax.swing.text.Document, java.lang.String, int)


Occurences of JTextPane (constructors)

JTextPane (constructors) occurences:
javax.swing.JTextPane()
javax.swing.JTextPane(javax.swing.text.StyledDocument)


Occurences of JToggleButton (constructors)

JToggleButton (constructors) occurences:
javax.swing.JToggleButton()
javax.swing.JToggleButton(java.lang.String)
javax.swing.JToggleButton(java.lang.String, boolean)
javax.swing.JToggleButton(java.lang.String, javax.swing.Icon)
javax.swing.JToggleButton(java.lang.String, javax.swing.Icon, boolean)
javax.swing.JToggleButton(javax.swing.Action)
javax.swing.JToggleButton(javax.swing.Icon)
javax.swing.JToggleButton(javax.swing.Icon, boolean)


Occurences of JToolBar (constructors)

JToolBar (constructors) occurences:
javax.swing.JToolBar()
javax.swing.JToolBar(int)
javax.swing.JToolBar(java.lang.String)
javax.swing.JToolBar(java.lang.String, int)


Occurences of JTree (constructors)

JTree (constructors) occurences:
javax.swing.JTree()
javax.swing.JTree(java.lang.Object:A)
javax.swing.JTree(java.util.Hashtable)
javax.swing.JTree(java.util.Vector)
javax.swing.JTree(javax.swing.tree.TreeModel)
javax.swing.JTree(javax.swing.tree.TreeNode)
javax.swing.JTree(javax.swing.tree.TreeNode, boolean)


Occurences of JULY

JULY occurences:
java.time.JULY
java.util.JULY
javax.xml.datatype.JULY


Occurences of JUNE

JUNE occurences:
java.time.JUNE
java.util.JUNE
javax.xml.datatype.JUNE


Occurences of jvisualvm

jvisualvm occurences:
jvisualvm
jvisualvm


Occurences of JWindow (constructors)

JWindow (constructors) occurences:
javax.swing.JWindow()
javax.swing.JWindow(java.awt.Frame)
javax.swing.JWindow(java.awt.GraphicsConfiguration)
javax.swing.JWindow(java.awt.Window)
javax.swing.JWindow(java.awt.Window, java.awt.GraphicsConfiguration)


Occurences of KAITHI

KAITHI occurences:
java.lang.KAITHI
java.lang.KAITHI


Occurences of KANNADA

KANNADA occurences:
java.awt.font.KANNADA
java.awt.font.KANNADA
java.lang.KANNADA
java.lang.KANNADA


Occurences of KATAKANA

KATAKANA occurences:
java.lang.KATAKANA
java.lang.KATAKANA


Occurences of KAYAH_LI

KAYAH_LI occurences:
java.awt.font.KAYAH_LI
java.lang.KAYAH_LI
java.lang.KAYAH_LI


Occurences of KEEP

KEEP occurences:
java.util.jar.KEEP
java.util.jar.KEEP


Occurences of kerberos

kerberos occurences:
compact3.javax.security.auth.kerberos
javax.security.auth.kerberos


Occurences of KerberosKey (constructors)

KerberosKey (constructors) occurences:
javax.security.auth.kerberos.KerberosKey(javax.security.auth.kerberos.KerberosPrincipal, byte:A, int, int)
javax.security.auth.kerberos.KerberosKey(javax.security.auth.kerberos.KerberosPrincipal, char:A, java.lang.String)


Occurences of KerberosPrincipal (constructors)

KerberosPrincipal (constructors) occurences:
javax.security.auth.kerberos.KerberosPrincipal(java.lang.String)
javax.security.auth.kerberos.KerberosPrincipal(java.lang.String, int)


Occurences of key

key occurences:
java.awt.key
javax.accessibility.key
javax.swing.text.key


Occurences of Key

Key occurences:
java.awt.RenderingHints.Key.Key(int)
java.security.Key


Occurences of KeyAlreadyExistsException (constructors)

KeyAlreadyExistsException (constructors) occurences:
javax.management.openmbean.KeyAlreadyExistsException()
javax.management.openmbean.KeyAlreadyExistsException(java.lang.String)


Occurences of KeyEvent (constructors)

KeyEvent (constructors) occurences:
java.awt.event.KeyEvent(java.awt.Component, int, long, int, int)
java.awt.event.KeyEvent(java.awt.Component, int, long, int, int, char)
java.awt.event.KeyEvent(java.awt.Component, int, long, int, int, char, int)


Occurences of KeyException (constructors)

KeyException (constructors) occurences:
java.security.KeyException()
java.security.KeyException(java.lang.String)
java.security.KeyException(java.lang.String, java.lang.Throwable)
java.security.KeyException(java.lang.Throwable)


Occurences of keyFor

keyFor occurences:
java.nio.channels.SelectableChannel.keyFor(java.nio.channels.Selector)
java.nio.channels.spi.AbstractSelectableChannel.keyFor(java.nio.channels.Selector)


Occurences of KeyHandler

KeyHandler occurences:
javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler.KeyHandler()
javax.swing.plaf.basic.BasicTableUI.KeyHandler.KeyHandler()
javax.swing.plaf.basic.BasicTreeUI.KeyHandler.KeyHandler()


Occurences of keyinfo

keyinfo occurences:
compact3.javax.xml.crypto.dsig.keyinfo
javax.xml.crypto.dsig.keyinfo


Occurences of keyListener

keyListener occurences:
javax.swing.plaf.basic.keyListener
javax.swing.plaf.basic.keyListener
javax.swing.plaf.basic.keyListener


Occurences of KeyManagementException (constructors)

KeyManagementException (constructors) occurences:
java.security.KeyManagementException()
java.security.KeyManagementException(java.lang.String)
java.security.KeyManagementException(java.lang.String, java.lang.Throwable)
java.security.KeyManagementException(java.lang.Throwable)


Occurences of keyPressed

keyPressed occurences:
java.awt.AWTEventMulticaster.keyPressed(java.awt.event.KeyEvent)
java.awt.event.KeyAdapter.keyPressed(java.awt.event.KeyEvent)
java.awt.event.KeyListener.keyPressed(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler.keyPressed(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTableUI.KeyHandler.keyPressed(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTreeUI.KeyHandler.keyPressed(java.awt.event.KeyEvent)


Occurences of keyReleased

keyReleased occurences:
java.awt.AWTEventMulticaster.keyReleased(java.awt.event.KeyEvent)
java.awt.event.KeyAdapter.keyReleased(java.awt.event.KeyEvent)
java.awt.event.KeyListener.keyReleased(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler.keyReleased(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTableUI.KeyHandler.keyReleased(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTreeUI.KeyHandler.keyReleased(java.awt.event.KeyEvent)


Occurences of keys

keys occurences:
java.nio.channels.Selector.keys()
java.security.Provider.keys()
java.util.concurrent.ConcurrentHashMap.keys()
java.util.Dictionary.keys()
java.util.Hashtable.keys()
java.util.prefs.AbstractPreferences.keys()
java.util.prefs.Preferences.keys()
javax.swing.ActionMap.keys()
javax.swing.InputMap.keys()


Occurences of KeySelectorException (constructors)

KeySelectorException (constructors) occurences:
javax.xml.crypto.KeySelectorException()
javax.xml.crypto.KeySelectorException(java.lang.String)
javax.xml.crypto.KeySelectorException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.KeySelectorException(java.lang.Throwable)


Occurences of keySet

keySet occurences:
java.awt.RenderingHints.keySet()
java.security.Provider.keySet()
java.util.AbstractMap.keySet()
java.util.concurrent.ConcurrentHashMap.keySet()
java.util.concurrent.ConcurrentHashMap.keySet(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.keySet(V)
java.util.concurrent.ConcurrentNavigableMap.keySet()
java.util.concurrent.ConcurrentSkipListMap.keySet()
java.util.EnumMap.keySet()
java.util.HashMap.keySet()
java.util.Hashtable.keySet()
java.util.IdentityHashMap.keySet()
java.util.jar.Attributes.keySet()
java.util.LinkedHashMap.keySet()
java.util.Map.keySet()
java.util.ResourceBundle.keySet()
java.util.SortedMap.keySet()
java.util.TreeMap.keySet()
java.util.WeakHashMap.keySet()
javax.management.openmbean.CompositeType.keySet()
javax.management.openmbean.TabularData.keySet()
javax.management.openmbean.TabularDataSupport.keySet()
javax.script.SimpleBindings.keySet()


Occurences of KeyStoreBuilderParameters (constructors)

KeyStoreBuilderParameters (constructors) occurences:
javax.net.ssl.KeyStoreBuilderParameters(java.security.KeyStore.Builder)
javax.net.ssl.KeyStoreBuilderParameters(java.util.List)


Occurences of KeyStoreException (constructors)

KeyStoreException (constructors) occurences:
java.security.KeyStoreException()
java.security.KeyStoreException(java.lang.String)
java.security.KeyStoreException(java.lang.String, java.lang.Throwable)
java.security.KeyStoreException(java.lang.Throwable)


Occurences of keytool

keytool occurences:
keytool
keytool


Occurences of keyTyped

keyTyped occurences:
java.awt.AWTEventMulticaster.keyTyped(java.awt.event.KeyEvent)
java.awt.event.KeyAdapter.keyTyped(java.awt.event.KeyEvent)
java.awt.event.KeyListener.keyTyped(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTableUI.KeyHandler.keyTyped(java.awt.event.KeyEvent)
javax.swing.plaf.basic.BasicTreeUI.KeyHandler.keyTyped(java.awt.event.KeyEvent)


Occurences of KHAROSHTHI

KHAROSHTHI occurences:
java.lang.KHAROSHTHI
java.lang.KHAROSHTHI


Occurences of KHMER

KHMER occurences:
java.awt.font.KHMER
java.awt.font.KHMER
java.lang.KHMER
java.lang.KHMER


Occurences of kind

kind occurences:
com.sun.javadoc.Tag.kind()
java.nio.file.WatchEvent.kind()
javax.tools.kind
org.omg.CORBA.TypeCode.kind()
org.omg.CosNaming.kind


Occurences of label

label occurences:
com.sun.javadoc.SeeTag.label()
com.sun.jdi.connect.Connector.Argument.label()
org.omg.CORBA.label


Occurences of LABEL

LABEL occurences:
javax.accessibility.LABEL
javax.swing.plaf.synth.LABEL


Occurences of Label (constructors)

Label (constructors) occurences:
java.awt.Label()
java.awt.Label(java.lang.String)
java.awt.Label(java.lang.String, int)


Occurences of LambdaConversionException (constructors)

LambdaConversionException (constructors) occurences:
java.lang.invoke.LambdaConversionException()
java.lang.invoke.LambdaConversionException(java.lang.String)
java.lang.invoke.LambdaConversionException(java.lang.String, java.lang.Throwable)
java.lang.invoke.LambdaConversionException(java.lang.String, java.lang.Throwable, boolean, boolean)
java.lang.invoke.LambdaConversionException(java.lang.Throwable)


Occurences of LANDSCAPE

LANDSCAPE occurences:
java.awt.LANDSCAPE
java.awt.print.LANDSCAPE
javax.print.attribute.standard.LANDSCAPE


Occurences of lang

lang occurences:
compact1.java.lang
compact2.java.lang
compact3.java.lang
java.lang


Occurences of LANGUAGE

LANGUAGE occurences:
java.text.LANGUAGE
javax.naming.LANGUAGE
javax.script.LANGUAGE
javax.swing.text.html.LANGUAGE


Occurences of LanguageRange

LanguageRange occurences:
java.util.Locale.LanguageRange.LanguageRange(java.lang.String)
java.util.Locale.LanguageRange.LanguageRange(java.lang.String, double)


Occurences of LAO

LAO occurences:
java.awt.font.LAO
java.awt.font.LAO
java.lang.LAO
java.lang.LAO


Occurences of largeModel

largeModel occurences:
javax.swing.largeModel
javax.swing.plaf.basic.largeModel


Occurences of last

last occurences:
java.awt.CardLayout.last(java.awt.Container)
java.sql.ResultSet.last()
java.text.BreakIterator.last()
java.text.CharacterIterator.last()
java.text.StringCharacterIterator.last()
java.util.concurrent.ConcurrentSkipListSet.last()
java.util.SortedSet.last()
java.util.TreeSet.last()
javax.swing.text.Segment.last()


Occurences of lastElement

lastElement occurences:
java.util.Vector.lastElement()
javax.swing.DefaultListModel.lastElement()


Occurences of lastEntry

lastEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.lastEntry()
java.util.NavigableMap.lastEntry()
java.util.TreeMap.lastEntry()


Occurences of lastIndexOf

lastIndexOf occurences:
java.lang.String.lastIndexOf(int)
java.lang.String.lastIndexOf(int, int)
java.lang.String.lastIndexOf(java.lang.String)
java.lang.String.lastIndexOf(java.lang.String, int)
java.lang.StringBuffer.lastIndexOf(java.lang.String)
java.lang.StringBuffer.lastIndexOf(java.lang.String, int)
java.lang.StringBuilder.lastIndexOf(java.lang.String)
java.lang.StringBuilder.lastIndexOf(java.lang.String, int)
java.util.AbstractList.lastIndexOf(java.lang.Object)
java.util.ArrayList.lastIndexOf(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.lastIndexOf(E, int)
java.util.concurrent.CopyOnWriteArrayList.lastIndexOf(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.lastIndexOf(java.lang.Object, int)
java.util.LinkedList.lastIndexOf(java.lang.Object)
java.util.List.lastIndexOf(java.lang.Object)
java.util.Vector.lastIndexOf(java.lang.Object)
java.util.Vector.lastIndexOf(java.lang.Object, int)
javax.swing.DefaultListModel.lastIndexOf(java.lang.Object)
javax.swing.DefaultListModel.lastIndexOf(java.lang.Object, int)


Occurences of lastKey

lastKey occurences:
java.util.concurrent.ConcurrentSkipListMap.lastKey()
java.util.SortedMap.lastKey()
java.util.TreeMap.lastKey()


Occurences of lastRow

lastRow occurences:
javax.swing.event.lastRow
javax.swing.lastRow
javax.swing.tree.lastRow


Occurences of LATIN

LATIN occurences:
java.awt.im.LATIN
java.lang.LATIN


Occurences of layout

layout occurences:
java.awt.Component.layout()
java.awt.Container.layout()
java.awt.ScrollPane.layout()
javax.swing.plaf.synth.SynthSliderUI.layout()
javax.swing.text.BoxView.layout(int, int)
javax.swing.text.FlowView.layout(int, int)
javax.swing.text.FlowView.FlowStrategy.layout(javax.swing.text.FlowView)


Occurences of layoutCompoundLabel

layoutCompoundLabel occurences:
javax.swing.SwingUtilities.layoutCompoundLabel(java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int)
javax.swing.SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int)


Occurences of layoutContainer

layoutContainer occurences:
java.awt.BorderLayout.layoutContainer(java.awt.Container)
java.awt.CardLayout.layoutContainer(java.awt.Container)
java.awt.FlowLayout.layoutContainer(java.awt.Container)
java.awt.GridBagLayout.layoutContainer(java.awt.Container)
java.awt.GridLayout.layoutContainer(java.awt.Container)
java.awt.LayoutManager.layoutContainer(java.awt.Container)
javax.swing.BoxLayout.layoutContainer(java.awt.Container)
javax.swing.GroupLayout.layoutContainer(java.awt.Container)
javax.swing.JRootPane.RootLayout.layoutContainer(java.awt.Container)
javax.swing.JSpinner.DefaultEditor.layoutContainer(java.awt.Container)
javax.swing.OverlayLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicScrollBarUI.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.layoutContainer(java.awt.Container)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer(java.awt.Container)
javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager.layoutContainer(java.awt.Container)
javax.swing.ScrollPaneLayout.layoutContainer(java.awt.Container)
javax.swing.SpringLayout.layoutContainer(java.awt.Container)
javax.swing.ViewportLayout.layoutContainer(java.awt.Container)


Occurences of layoutMajorAxis

layoutMajorAxis occurences:
javax.swing.text.BoxView.layoutMajorAxis(int, int, int:A, int:A)
javax.swing.text.TableView.TableRow.layoutMajorAxis(int, int, int:A, int:A)


Occurences of layoutMinorAxis

layoutMinorAxis occurences:
javax.swing.text.BoxView.layoutMinorAxis(int, int, int:A, int:A)
javax.swing.text.html.BlockView.layoutMinorAxis(int, int, int:A, int:A)
javax.swing.text.TableView.layoutMinorAxis(int, int, int:A, int:A)
javax.swing.text.TableView.TableRow.layoutMinorAxis(int, int, int:A, int:A)


Occurences of lazySet

lazySet occurences:
java.util.concurrent.atomic.AtomicBoolean.lazySet(boolean)
java.util.concurrent.atomic.AtomicInteger.lazySet(int)
java.util.concurrent.atomic.AtomicIntegerArray.lazySet(int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.lazySet(java.lang.Object, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.lazySet(T, int)
java.util.concurrent.atomic.AtomicLong.lazySet(long)
java.util.concurrent.atomic.AtomicLongArray.lazySet(int, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.lazySet(java.lang.Object, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.lazySet(T, long)
java.util.concurrent.atomic.AtomicReference.lazySet(java.lang.Object)
java.util.concurrent.atomic.AtomicReference.lazySet(V)
java.util.concurrent.atomic.AtomicReferenceArray.lazySet(int, E)
java.util.concurrent.atomic.AtomicReferenceArray.lazySet(int, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.lazySet(java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.lazySet(T, V)


Occurences of ldap

ldap occurences:
compact3.javax.naming.ldap
javax.naming.ldap


Occurences of LDAPCertStoreParameters (constructors)

LDAPCertStoreParameters (constructors) occurences:
java.security.cert.LDAPCertStoreParameters()
java.security.cert.LDAPCertStoreParameters(java.lang.String)
java.security.cert.LDAPCertStoreParameters(java.lang.String, int)


Occurences of LdapName (constructors)

LdapName (constructors) occurences:
javax.naming.ldap.LdapName(java.lang.String)
javax.naming.ldap.LdapName(java.util.List)


Occurences of LdapReferralException (constructors)

LdapReferralException (constructors) occurences:
javax.naming.ldap.LdapReferralException()
javax.naming.ldap.LdapReferralException(java.lang.String)


Occurences of LEADING

LEADING occurences:
java.awt.LEADING
javax.swing.border.LEADING
javax.swing.LEADING
javax.swing.LEADING


Occurences of leaveGroup

leaveGroup occurences:
java.net.DatagramSocketImpl.leaveGroup(java.net.SocketAddress, java.net.NetworkInterface)
java.net.MulticastSocket.leaveGroup(java.net.InetAddress)
java.net.MulticastSocket.leaveGroup(java.net.SocketAddress, java.net.NetworkInterface)


Occurences of LEDGER

LEDGER occurences:
java.awt.LEDGER
javax.print.attribute.standard.LEDGER
javax.print.attribute.standard.LEDGER


Occurences of left

left occurences:
java.awt.left
javax.swing.border.left


Occurences of LEFT

LEFT occurences:
java.awt.LEFT
java.awt.LEFT
java.awt.LEFT
javax.swing.border.LEFT
javax.swing.LEFT
javax.swing.LEFT


Occurences of leftKey

leftKey occurences:
javax.swing.plaf.basic.leftKey
javax.swing.plaf.basic.leftKey
javax.swing.plaf.basic.leftKey


Occurences of LEGAL

LEGAL occurences:
java.awt.LEGAL
javax.print.attribute.standard.LEGAL


Occurences of Legal Notices

Legal Notices occurences:
Legal Notices
Legal Notices
Legal Notices
Legal Notices
Legal Notices
Legal Notices


Occurences of Legend for Class Diagram

Legend for Class Diagram occurences:
Legend for Class Diagram
Legend for Class Diagram


Occurences of length

length occurences:
com.sun.jdi.ArrayReference.length()
java.io.File.length()
java.io.length
java.io.RandomAccessFile.length()
java.lang.CharSequence.length()
java.lang.String.length()
java.lang.StringBuffer.length()
java.lang.StringBuilder.length()
java.nio.CharBuffer.length()
java.nio.charset.CoderResult.length()
java.sql.Blob.length()
java.sql.Clob.length()
java.time.Month.length(boolean)
java.time.Year.length()
java.util.BitSet.length()
java.util.concurrent.atomic.AtomicIntegerArray.length()
java.util.concurrent.atomic.AtomicLongArray.length()
java.util.concurrent.atomic.AtomicReferenceArray.length()
java.util.StringJoiner.length()
javax.imageio.stream.FileCacheImageOutputStream.length()
javax.imageio.stream.FileImageInputStream.length()
javax.imageio.stream.FileImageOutputStream.length()
javax.imageio.stream.ImageInputStream.length()
javax.imageio.stream.ImageInputStreamImpl.length()
javax.imageio.stream.MemoryCacheImageOutputStream.length()
javax.sound.midi.length
javax.sql.rowset.serial.SerialBlob.length()
javax.sql.rowset.serial.SerialClob.length()
javax.swing.text.AbstractDocument.Content.length()
javax.swing.text.GapContent.length()
javax.swing.text.Segment.length()
javax.swing.text.StringContent.length()
org.omg.CORBA.DynSequence.length()
org.omg.CORBA.DynSequence.length(int)
org.omg.CORBA.TypeCode.length()


Occurences of lengthOfMonth

lengthOfMonth occurences:
java.time.chrono.ChronoLocalDate.lengthOfMonth()
java.time.chrono.HijrahDate.lengthOfMonth()
java.time.chrono.JapaneseDate.lengthOfMonth()
java.time.chrono.MinguoDate.lengthOfMonth()
java.time.chrono.ThaiBuddhistDate.lengthOfMonth()
java.time.LocalDate.lengthOfMonth()
java.time.YearMonth.lengthOfMonth()


Occurences of lengthOfYear

lengthOfYear occurences:
java.time.chrono.ChronoLocalDate.lengthOfYear()
java.time.chrono.HijrahDate.lengthOfYear()
java.time.chrono.JapaneseDate.lengthOfYear()
java.time.LocalDate.lengthOfYear()
java.time.YearMonth.lengthOfYear()


Occurences of LEPCHA

LEPCHA occurences:
java.awt.font.LEPCHA
java.lang.LEPCHA
java.lang.LEPCHA


Occurences of LETTER

LETTER occurences:
java.awt.LETTER
javax.print.attribute.standard.LETTER


Occurences of Level (constructors)

Level (constructors) occurences:
java.util.logging.Level(java.lang.String, int)
java.util.logging.Level(java.lang.String, int, java.lang.String)


Occurences of lightHighlight

lightHighlight occurences:
javax.swing.plaf.basic.lightHighlight
javax.swing.plaf.basic.lightHighlight
javax.swing.plaf.basic.lightHighlight


Occurences of lightWeightPopupEnabled

lightWeightPopupEnabled occurences:
javax.swing.lightWeightPopupEnabled
javax.swing.lightWeightPopupEnabled


Occurences of LIMBU

LIMBU occurences:
java.awt.font.LIMBU
java.lang.LIMBU
java.lang.LIMBU


Occurences of limit

limit occurences:
java.nio.Buffer.limit()
java.nio.Buffer.limit(int)
java.util.stream.DoubleStream.limit(long)
java.util.stream.IntStream.limit(long)
java.util.stream.LongStream.limit(long)
java.util.stream.Stream.limit(long)


Occurences of LimitExceededException (constructors)

LimitExceededException (constructors) occurences:
javax.naming.LimitExceededException()
javax.naming.LimitExceededException(java.lang.String)


Occurences of line

line occurences:
com.sun.javadoc.SourcePosition.line()
java.text.line


Occurences of LinearGradientPaint (constructors)

LinearGradientPaint (constructors) occurences:
java.awt.LinearGradientPaint(float, float, float, float, float:A, java.awt.Color:A)
java.awt.LinearGradientPaint(float, float, float, float, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.LinearGradientPaint(java.awt.geom.Point2D, java.awt.geom.Point2D, float:A, java.awt.Color:A)
java.awt.LinearGradientPaint(java.awt.geom.Point2D, java.awt.geom.Point2D, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.LinearGradientPaint(java.awt.geom.Point2D, java.awt.geom.Point2D, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod, java.awt.MultipleGradientPaint.ColorSpaceType, java.awt.geom.AffineTransform)


Occurences of LineBorder (constructors)

LineBorder (constructors) occurences:
javax.swing.border.LineBorder(java.awt.Color)
javax.swing.border.LineBorder(java.awt.Color, int)
javax.swing.border.LineBorder(java.awt.Color, int, boolean)


Occurences of LineBorderUIResource

LineBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.LineBorderUIResource.LineBorderUIResource(java.awt.Color)
javax.swing.plaf.BorderUIResource.LineBorderUIResource.LineBorderUIResource(java.awt.Color, int)


Occurences of LineBreakMeasurer (constructors)

LineBreakMeasurer (constructors) occurences:
java.awt.font.LineBreakMeasurer(java.text.AttributedCharacterIterator, java.awt.font.FontRenderContext)
java.awt.font.LineBreakMeasurer(java.text.AttributedCharacterIterator, java.text.BreakIterator, java.awt.font.FontRenderContext)


Occurences of lineNumber

lineNumber occurences:
com.sun.jdi.Location.lineNumber()
com.sun.jdi.Location.lineNumber(java.lang.String)


Occurences of LineNumberReader (constructors)

LineNumberReader (constructors) occurences:
java.io.LineNumberReader(java.io.Reader)
java.io.LineNumberReader(java.io.Reader, int)


Occurences of lines

lines occurences:
java.io.BufferedReader.lines()
java.nio.file.Files.lines(java.nio.file.Path)
java.nio.file.Files.lines(java.nio.file.Path, java.nio.charset.Charset)


Occurences of lineTo

lineTo occurences:
java.awt.geom.Path2D.lineTo(double, double)
java.awt.geom.Path2D.Double.lineTo(double, double)
java.awt.geom.Path2D.Float.lineTo(double, double)
java.awt.geom.Path2D.Float.lineTo(float, float)


Occurences of LineUnavailableException (constructors)

LineUnavailableException (constructors) occurences:
javax.sound.sampled.LineUnavailableException()
javax.sound.sampled.LineUnavailableException(java.lang.String)


Occurences of LINE_END

LINE_END occurences:
java.awt.LINE_END
java.awt.LINE_END


Occurences of LINE_START

LINE_START occurences:
java.awt.LINE_START
java.awt.LINE_START


Occurences of LINK

LINK occurences:
com.sun.source.doctree.LINK
javax.swing.LINK
javax.swing.text.html.LINK
javax.swing.text.html.LINK


Occurences of LinkageError (constructors)

LinkageError (constructors) occurences:
java.lang.LinkageError()
java.lang.LinkageError(java.lang.String)
java.lang.LinkageError(java.lang.String, java.lang.Throwable)


Occurences of LinkedBlockingDeque (constructors)

LinkedBlockingDeque (constructors) occurences:
java.util.concurrent.LinkedBlockingDeque()
java.util.concurrent.LinkedBlockingDeque(int)
java.util.concurrent.LinkedBlockingDeque(java.util.Collection)


Occurences of LinkedBlockingQueue (constructors)

LinkedBlockingQueue (constructors) occurences:
java.util.concurrent.LinkedBlockingQueue()
java.util.concurrent.LinkedBlockingQueue(int)
java.util.concurrent.LinkedBlockingQueue(java.util.Collection)


Occurences of LinkedHashMap (constructors)

LinkedHashMap (constructors) occurences:
java.util.LinkedHashMap()
java.util.LinkedHashMap(int)
java.util.LinkedHashMap(int, float)
java.util.LinkedHashMap(int, float, boolean)
java.util.LinkedHashMap(java.util.Map)


Occurences of LinkedHashSet (constructors)

LinkedHashSet (constructors) occurences:
java.util.LinkedHashSet()
java.util.LinkedHashSet(int)
java.util.LinkedHashSet(int, float)
java.util.LinkedHashSet(java.util.Collection)


Occurences of LinkedList (constructors)

LinkedList (constructors) occurences:
java.util.LinkedList()
java.util.LinkedList(java.util.Collection)


Occurences of LinkedTransferQueue (constructors)

LinkedTransferQueue (constructors) occurences:
java.util.concurrent.LinkedTransferQueue()
java.util.concurrent.LinkedTransferQueue(java.util.Collection)


Occurences of LinkException (constructors)

LinkException (constructors) occurences:
javax.naming.LinkException()
javax.naming.LinkException(java.lang.String)


Occurences of LinkLoopException (constructors)

LinkLoopException (constructors) occurences:
javax.naming.LinkLoopException()
javax.naming.LinkLoopException(java.lang.String)


Occurences of LinkPermission (constructors)

LinkPermission (constructors) occurences:
java.nio.file.LinkPermission(java.lang.String)
java.nio.file.LinkPermission(java.lang.String, java.lang.String)


Occurences of LinkRef (constructors)

LinkRef (constructors) occurences:
javax.naming.LinkRef(java.lang.String)
javax.naming.LinkRef(javax.naming.Name)


Occurences of linkSize

linkSize occurences:
javax.swing.GroupLayout.linkSize(int, java.awt.Component...)
javax.swing.GroupLayout.linkSize(java.awt.Component...)


Occurences of list

list occurences:
com.sun.tools.attach.VirtualMachine.list()
java.awt.Component.list()
java.awt.Component.list(java.io.PrintStream)
java.awt.Component.list(java.io.PrintStream, int)
java.awt.Component.list(java.io.PrintWriter)
java.awt.Component.list(java.io.PrintWriter, int)
java.awt.Container.list(java.io.PrintStream, int)
java.awt.Container.list(java.io.PrintWriter, int)
java.io.File.list()
java.io.File.list(java.io.FilenameFilter)
java.lang.ThreadGroup.list()
java.nio.file.attribute.UserDefinedFileAttributeView.list()
java.nio.file.Files.list(java.nio.file.Path)
java.rmi.Naming.list(java.lang.String)
java.rmi.registry.Registry.list()
java.util.Collections.list(java.util.Enumeration)
java.util.Properties.list(java.io.PrintStream)
java.util.Properties.list(java.io.PrintWriter)
javax.naming.Context.list(java.lang.String)
javax.naming.Context.list(javax.naming.Name)
javax.naming.InitialContext.list(java.lang.String)
javax.naming.InitialContext.list(javax.naming.Name)
javax.swing.plaf.basic.list
javax.swing.plaf.basic.list
javax.tools.ForwardingJavaFileManager.list(javax.tools.JavaFileManager.Location, java.lang.String, java.util.Set, boolean)
javax.tools.JavaFileManager.list(javax.tools.JavaFileManager.Location, java.lang.String, java.util.Set, boolean)
org.omg.CosNaming.NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)
org.omg.CosNaming._NamingContextExtStub.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)
org.omg.CosNaming._NamingContextStub.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)


Occurences of LIST

LIST occurences:
javax.accessibility.LIST
javax.swing.plaf.synth.LIST


Occurences of List

List occurences:
java.awt.List
java.util.List


Occurences of List (constructors)

List (constructors) occurences:
java.awt.List()
java.awt.List(int)
java.awt.List(int, boolean)


Occurences of List of Examples

List of Examples occurences:
List of Examples
List of Examples


Occurences of listBindings

listBindings occurences:
javax.naming.Context.listBindings(java.lang.String)
javax.naming.Context.listBindings(javax.naming.Name)
javax.naming.InitialContext.listBindings(java.lang.String)
javax.naming.InitialContext.listBindings(javax.naming.Name)


Occurences of listBox

listBox occurences:
javax.swing.plaf.basic.listBox
javax.swing.plaf.metal.listBox


Occurences of ListDataHandler

ListDataHandler occurences:
javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler.ListDataHandler()
javax.swing.plaf.basic.BasicComboPopup.ListDataHandler.ListDataHandler()
javax.swing.plaf.basic.BasicListUI.ListDataHandler.ListDataHandler()


Occurences of listDataListener

listDataListener occurences:
javax.swing.plaf.basic.listDataListener
javax.swing.plaf.basic.listDataListener
javax.swing.plaf.basic.listDataListener


Occurences of Listener

Listener occurences:
javax.xml.bind.Marshaller.Listener.Listener()
javax.xml.bind.Unmarshaller.Listener.Listener()


Occurences of listenerList

listenerList occurences:
javax.swing.colorchooser.listenerList
javax.swing.event.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.listenerList
javax.swing.table.listenerList
javax.swing.table.listenerList
javax.swing.text.listenerList
javax.swing.text.listenerList
javax.swing.text.listenerList
javax.swing.tree.listenerList
javax.swing.tree.listenerList


Occurences of ListenerNotFoundException (constructors)

ListenerNotFoundException (constructors) occurences:
javax.management.ListenerNotFoundException()
javax.management.ListenerNotFoundException(java.lang.String)


Occurences of listFiles

listFiles occurences:
java.io.File.listFiles()
java.io.File.listFiles(java.io.FileFilter)
java.io.File.listFiles(java.io.FilenameFilter)


Occurences of listIterator

listIterator occurences:
java.util.AbstractList.listIterator()
java.util.AbstractList.listIterator(int)
java.util.AbstractSequentialList.listIterator(int)
java.util.ArrayList.listIterator()
java.util.ArrayList.listIterator(int)
java.util.concurrent.CopyOnWriteArrayList.listIterator()
java.util.concurrent.CopyOnWriteArrayList.listIterator(int)
java.util.LinkedList.listIterator(int)
java.util.List.listIterator()
java.util.List.listIterator(int)
java.util.Vector.listIterator()
java.util.Vector.listIterator(int)


Occurences of ListSelectionHandler

ListSelectionHandler occurences:
javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler.ListSelectionHandler()
javax.swing.plaf.basic.BasicListUI.ListSelectionHandler.ListSelectionHandler()


Occurences of listSelectionListener

listSelectionListener occurences:
javax.swing.plaf.basic.listSelectionListener
javax.swing.plaf.basic.listSelectionListener


Occurences of LISU

LISU occurences:
java.lang.LISU
java.lang.LISU


Occurences of LITERAL

LITERAL occurences:
com.sun.source.doctree.LITERAL
java.util.regex.LITERAL
javax.jws.soap.LITERAL


Occurences of LiteralTree

LiteralTree occurences:
com.sun.source.doctree.LiteralTree
com.sun.source.tree.LiteralTree


Occurences of load

load occurences:
java.lang.Runtime.load(java.lang.String)
java.lang.System.load(java.lang.String)
java.nio.MappedByteBuffer.load()
java.security.KeyStore.load(java.io.InputStream, char:A)
java.security.KeyStore.load(java.security.KeyStore.LoadStoreParameter)
java.security.Provider.load(java.io.InputStream)
java.util.Properties.load(java.io.InputStream)
java.util.Properties.load(java.io.Reader)
java.util.ServiceLoader.load(java.lang.Class)
java.util.ServiceLoader.load(java.lang.Class, java.lang.ClassLoader)
javax.management.modelmbean.RequiredModelMBean.load()
javax.management.PersistentMBean.load()
javax.swing.plaf.synth.SynthLookAndFeel.load(java.io.InputStream, java.lang.Class)
javax.swing.plaf.synth.SynthLookAndFeel.load(java.net.URL)


Occurences of loadAgent

loadAgent occurences:
com.sun.tools.attach.VirtualMachine.loadAgent(java.lang.String)
com.sun.tools.attach.VirtualMachine.loadAgent(java.lang.String, java.lang.String)


Occurences of loadAgentLibrary

loadAgentLibrary occurences:
com.sun.tools.attach.VirtualMachine.loadAgentLibrary(java.lang.String)
com.sun.tools.attach.VirtualMachine.loadAgentLibrary(java.lang.String, java.lang.String)


Occurences of loadAgentPath

loadAgentPath occurences:
com.sun.tools.attach.VirtualMachine.loadAgentPath(java.lang.String)
com.sun.tools.attach.VirtualMachine.loadAgentPath(java.lang.String, java.lang.String)


Occurences of loadChildren

loadChildren occurences:
javax.swing.JTree.DynamicUtilTreeNode.loadChildren()
javax.swing.text.AsyncBoxView.loadChildren(javax.swing.text.ViewFactory)
javax.swing.text.CompositeView.loadChildren(javax.swing.text.ViewFactory)
javax.swing.text.FlowView.loadChildren(javax.swing.text.ViewFactory)
javax.swing.text.WrappedPlainView.loadChildren(javax.swing.text.ViewFactory)
javax.swing.text.ZoneView.loadChildren(javax.swing.text.ViewFactory)


Occurences of loadClass

loadClass occurences:
java.lang.ClassLoader.loadClass(java.lang.String)
java.lang.ClassLoader.loadClass(java.lang.String, boolean)
java.rmi.server.LoaderHandler.loadClass(java.lang.String)
java.rmi.server.LoaderHandler.loadClass(java.net.URL, java.lang.String)
java.rmi.server.RMIClassLoader.loadClass(java.lang.String)
java.rmi.server.RMIClassLoader.loadClass(java.lang.String, java.lang.String)
java.rmi.server.RMIClassLoader.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader)
java.rmi.server.RMIClassLoader.loadClass(java.net.URL, java.lang.String)
java.rmi.server.RMIClassLoaderSpi.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader)
javax.management.DefaultLoaderRepository.loadClass(java.lang.String)
javax.management.loading.ClassLoaderRepository.loadClass(java.lang.String)
javax.management.loading.DefaultLoaderRepository.loadClass(java.lang.String)
javax.management.loading.MLet.loadClass(java.lang.String, javax.management.loading.ClassLoaderRepository)
javax.rmi.CORBA.Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader)
javax.rmi.CORBA.UtilDelegate.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader)


Occurences of loadClassWithout

loadClassWithout occurences:
javax.management.DefaultLoaderRepository.loadClassWithout(java.lang.ClassLoader, java.lang.String)
javax.management.loading.ClassLoaderRepository.loadClassWithout(java.lang.ClassLoader, java.lang.String)
javax.management.loading.DefaultLoaderRepository.loadClassWithout(java.lang.ClassLoader, java.lang.String)


Occurences of loadImage

loadImage occurences:
java.beans.SimpleBeanInfo.loadImage(java.lang.String)
javax.swing.ImageIcon.loadImage(java.awt.Image)


Occurences of loading

loading occurences:
compact3.javax.management.loading
javax.management.loading


Occurences of loadLibrary

loadLibrary occurences:
java.lang.Runtime.loadLibrary(java.lang.String)
java.lang.System.loadLibrary(java.lang.String)


Occurences of loadProxyClass

loadProxyClass occurences:
java.rmi.server.RMIClassLoader.loadProxyClass(java.lang.String, java.lang.String:A, java.lang.ClassLoader)
java.rmi.server.RMIClassLoaderSpi.loadProxyClass(java.lang.String, java.lang.String:A, java.lang.ClassLoader)


Occurences of loadSystemColors

loadSystemColors occurences:
java.awt.Toolkit.loadSystemColors(int:A)
javax.swing.plaf.basic.BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String:A, boolean)


Occurences of localDateTime

localDateTime occurences:
java.time.chrono.Chronology.localDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.HijrahChronology.localDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.IsoChronology.localDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.JapaneseChronology.localDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.MinguoChronology.localDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.ThaiBuddhistChronology.localDateTime(java.time.temporal.TemporalAccessor)


Occurences of locale

locale occurences:
java.beans.beancontext.locale
java.util.Formatter.locale()
java.util.Scanner.locale()
javax.imageio.locale
javax.imageio.locale
javax.imageio.locale


Occurences of Locale (constructors)

Locale (constructors) occurences:
java.util.Locale(java.lang.String)
java.util.Locale(java.lang.String, java.lang.String)
java.util.Locale(java.lang.String, java.lang.String, java.lang.String)


Occurences of localName

localName occurences:
javax.xml.ws.RequestWrapper.localName()
javax.xml.ws.ResponseWrapper.localName()


Occurences of LOCAL_VARIABLE

LOCAL_VARIABLE occurences:
java.lang.annotation.LOCAL_VARIABLE
javax.lang.model.element.LOCAL_VARIABLE


Occurences of locate

locate occurences:
java.awt.Component.locate(int, int)
java.awt.Container.locate(int, int)


Occurences of location

location occurences:
com.sun.jdi.Locatable.location()
com.sun.jdi.Method.location()
com.sun.jdi.request.BreakpointRequest.location()
com.sun.jdi.StackFrame.location()
java.awt.Component.location()
java.awt.GridBagLayout.location(int, int)
javax.xml.bind.annotation.XmlSchema.location()
javax.xml.stream.location


Occurences of Location

Location occurences:
com.sun.jdi.Location
javax.xml.stream.Location


Occurences of locationsOfLine

locationsOfLine occurences:
com.sun.jdi.Method.locationsOfLine(int)
com.sun.jdi.Method.locationsOfLine(java.lang.String, java.lang.String, int)
com.sun.jdi.ReferenceType.locationsOfLine(int)
com.sun.jdi.ReferenceType.locationsOfLine(java.lang.String, java.lang.String, int)


Occurences of locationToIndex

locationToIndex occurences:
javax.swing.JList.locationToIndex(java.awt.Point)
javax.swing.plaf.basic.BasicListUI.locationToIndex(javax.swing.JList, java.awt.Point)
javax.swing.plaf.ListUI.locationToIndex(javax.swing.JList, java.awt.Point)
javax.swing.plaf.multi.MultiListUI.locationToIndex(javax.swing.JList, java.awt.Point)


Occurences of Locator2Impl (constructors)

Locator2Impl (constructors) occurences:
org.xml.sax.ext.Locator2Impl()
org.xml.sax.ext.Locator2Impl(org.xml.sax.Locator)


Occurences of LocatorImpl (constructors)

LocatorImpl (constructors) occurences:
org.xml.sax.helpers.LocatorImpl()
org.xml.sax.helpers.LocatorImpl(org.xml.sax.Locator)


Occurences of LOCCRC

LOCCRC occurences:
java.util.jar.LOCCRC
java.util.jar.LOCCRC
java.util.jar.LOCCRC
java.util.jar.LOCCRC
java.util.zip.LOCCRC
java.util.zip.LOCCRC
java.util.zip.LOCCRC
java.util.zip.LOCCRC


Occurences of LOCEXT

LOCEXT occurences:
java.util.jar.LOCEXT
java.util.jar.LOCEXT
java.util.jar.LOCEXT
java.util.jar.LOCEXT
java.util.zip.LOCEXT
java.util.zip.LOCEXT
java.util.zip.LOCEXT
java.util.zip.LOCEXT


Occurences of LOCFLG

LOCFLG occurences:
java.util.jar.LOCFLG
java.util.jar.LOCFLG
java.util.jar.LOCFLG
java.util.jar.LOCFLG
java.util.zip.LOCFLG
java.util.zip.LOCFLG
java.util.zip.LOCFLG
java.util.zip.LOCFLG


Occurences of LOCHDR

LOCHDR occurences:
java.util.jar.LOCHDR
java.util.jar.LOCHDR
java.util.jar.LOCHDR
java.util.jar.LOCHDR
java.util.zip.LOCHDR
java.util.zip.LOCHDR
java.util.zip.LOCHDR
java.util.zip.LOCHDR


Occurences of LOCHOW

LOCHOW occurences:
java.util.jar.LOCHOW
java.util.jar.LOCHOW
java.util.jar.LOCHOW
java.util.jar.LOCHOW
java.util.zip.LOCHOW
java.util.zip.LOCHOW
java.util.zip.LOCHOW
java.util.zip.LOCHOW


Occurences of lock

lock occurences:
java.io.lock
java.io.lock
java.nio.channels.AsynchronousFileChannel.lock()
java.nio.channels.AsynchronousFileChannel.lock(A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.lock(java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.lock(long, long, boolean)
java.nio.channels.AsynchronousFileChannel.lock(long, long, boolean, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.lock(long, long, boolean, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.FileChannel.lock()
java.nio.channels.FileChannel.lock(long, long, boolean)
java.util.concurrent.locks.Lock.lock()
java.util.concurrent.locks.ReentrantLock.lock()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.lock()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.lock()
java.util.prefs.lock


Occurences of lockInterruptibly

lockInterruptibly occurences:
java.util.concurrent.locks.Lock.lockInterruptibly()
java.util.concurrent.locks.ReentrantLock.lockInterruptibly()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.lockInterruptibly()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.lockInterruptibly()


Occurences of locks

locks occurences:
compact1.java.util.concurrent.locks
compact2.java.util.concurrent.locks
compact3.java.util.concurrent.locks
java.util.concurrent.locks


Occurences of LOCLEN

LOCLEN occurences:
java.util.jar.LOCLEN
java.util.jar.LOCLEN
java.util.jar.LOCLEN
java.util.jar.LOCLEN
java.util.zip.LOCLEN
java.util.zip.LOCLEN
java.util.zip.LOCLEN
java.util.zip.LOCLEN


Occurences of LOCNAM

LOCNAM occurences:
java.util.jar.LOCNAM
java.util.jar.LOCNAM
java.util.jar.LOCNAM
java.util.jar.LOCNAM
java.util.zip.LOCNAM
java.util.zip.LOCNAM
java.util.zip.LOCNAM
java.util.zip.LOCNAM


Occurences of LOCSIG

LOCSIG occurences:
java.util.jar.LOCSIG
java.util.jar.LOCSIG
java.util.jar.LOCSIG
java.util.jar.LOCSIG
java.util.zip.LOCSIG
java.util.zip.LOCSIG
java.util.zip.LOCSIG
java.util.zip.LOCSIG


Occurences of LOCSIZ

LOCSIZ occurences:
java.util.jar.LOCSIZ
java.util.jar.LOCSIZ
java.util.jar.LOCSIZ
java.util.jar.LOCSIZ
java.util.zip.LOCSIZ
java.util.zip.LOCSIZ
java.util.zip.LOCSIZ
java.util.zip.LOCSIZ


Occurences of LOCTIM

LOCTIM occurences:
java.util.jar.LOCTIM
java.util.jar.LOCTIM
java.util.jar.LOCTIM
java.util.jar.LOCTIM
java.util.zip.LOCTIM
java.util.zip.LOCTIM
java.util.zip.LOCTIM
java.util.zip.LOCTIM


Occurences of LOCVER

LOCVER occurences:
java.util.jar.LOCVER
java.util.jar.LOCVER
java.util.jar.LOCVER
java.util.jar.LOCVER
java.util.zip.LOCVER
java.util.zip.LOCVER
java.util.zip.LOCVER
java.util.zip.LOCVER


Occurences of log

log occurences:
java.lang.Math.log(double)
java.lang.StrictMath.log(double)
java.rmi.server.LogStream.log(java.lang.String)
java.util.logging.Logger.log(java.util.logging.Level, java.lang.String)
java.util.logging.Logger.log(java.util.logging.Level, java.lang.String, java.lang.Object)
java.util.logging.Logger.log(java.util.logging.Level, java.lang.String, java.lang.Object:A)
java.util.logging.Logger.log(java.util.logging.Level, java.lang.String, java.lang.Throwable)
java.util.logging.Logger.log(java.util.logging.Level, java.lang.Throwable, java.util.function.Supplier)
java.util.logging.Logger.log(java.util.logging.Level, java.util.function.Supplier)
java.util.logging.Logger.log(java.util.logging.LogRecord)


Occurences of log10

log10 occurences:
java.lang.Math.log10(double)
java.lang.StrictMath.log10(double)


Occurences of log1p

log1p occurences:
java.lang.Math.log1p(double)
java.lang.StrictMath.log1p(double)


Occurences of logging

logging occurences:
compact1.java.util.logging
compact2.java.util.logging
compact3.java.util.logging
java.util.logging


Occurences of login

login occurences:
compact1.javax.security.auth.login
compact2.javax.security.auth.login
compact3.javax.security.auth.login
java.security.AuthProvider.login(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler)
javax.security.auth.login
javax.security.auth.login.LoginContext.login()
javax.security.auth.spi.LoginModule.login()


Occurences of LoginContext (constructors)

LoginContext (constructors) occurences:
javax.security.auth.login.LoginContext(java.lang.String)
javax.security.auth.login.LoginContext(java.lang.String, javax.security.auth.callback.CallbackHandler)
javax.security.auth.login.LoginContext(java.lang.String, javax.security.auth.Subject)
javax.security.auth.login.LoginContext(java.lang.String, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler)
javax.security.auth.login.LoginContext(java.lang.String, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, javax.security.auth.login.Configuration)


Occurences of LoginException (constructors)

LoginException (constructors) occurences:
javax.security.auth.login.LoginException()
javax.security.auth.login.LoginException(java.lang.String)


Occurences of logout

logout occurences:
java.security.AuthProvider.logout()
javax.security.auth.login.LoginContext.logout()
javax.security.auth.spi.LoginModule.logout()


Occurences of logp

logp occurences:
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String)
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Object:A)
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.Throwable, java.util.function.Supplier)
java.util.logging.Logger.logp(java.util.logging.Level, java.lang.String, java.lang.String, java.util.function.Supplier)


Occurences of logrb

logrb occurences:
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object:A)
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.util.ResourceBundle, java.lang.String, java.lang.Object...)
java.util.logging.Logger.logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.util.ResourceBundle, java.lang.String, java.lang.Throwable)


Occurences of LONG

LONG occurences:
java.text.LONG
java.time.format.LONG
java.util.LONG
java.util.LONG
javax.lang.model.type.LONG
javax.management.openmbean.LONG


Occurences of Long (constructors)

Long (constructors) occurences:
java.lang.Long(java.lang.String)
java.lang.Long(long)


Occurences of LongHolder (constructors)

LongHolder (constructors) occurences:
org.omg.CORBA.LongHolder()
org.omg.CORBA.LongHolder(long)


Occurences of LongLongSeqHolder (constructors)

LongLongSeqHolder (constructors) occurences:
org.omg.CORBA.LongLongSeqHolder()
org.omg.CORBA.LongLongSeqHolder(long:A)


Occurences of LONGNVARCHAR

LONGNVARCHAR occurences:
java.sql.LONGNVARCHAR
java.sql.LONGNVARCHAR


Occurences of longs

longs occurences:
java.util.concurrent.ThreadLocalRandom.longs()
java.util.concurrent.ThreadLocalRandom.longs(long)
java.util.concurrent.ThreadLocalRandom.longs(long, long)
java.util.concurrent.ThreadLocalRandom.longs(long, long, long)
java.util.Random.longs()
java.util.Random.longs(long)
java.util.Random.longs(long, long)
java.util.Random.longs(long, long, long)
java.util.SplittableRandom.longs()
java.util.SplittableRandom.longs(long)
java.util.SplittableRandom.longs(long, long)
java.util.SplittableRandom.longs(long, long, long)


Occurences of LongSeqHolder (constructors)

LongSeqHolder (constructors) occurences:
org.omg.CORBA.LongSeqHolder()
org.omg.CORBA.LongSeqHolder(int:A)


Occurences of longStream

longStream occurences:
java.util.stream.StreamSupport.longStream(java.util.function.Supplier, int, boolean)
java.util.stream.StreamSupport.longStream(java.util.Spliterator.OfLong, boolean)


Occurences of longValue

longValue occurences:
com.sun.jdi.PrimitiveValue.longValue()
java.lang.Byte.longValue()
java.lang.Double.longValue()
java.lang.Float.longValue()
java.lang.Integer.longValue()
java.lang.Long.longValue()
java.lang.Number.longValue()
java.lang.Short.longValue()
java.math.BigDecimal.longValue()
java.math.BigInteger.longValue()
java.util.concurrent.atomic.AtomicInteger.longValue()
java.util.concurrent.atomic.AtomicLong.longValue()
java.util.concurrent.atomic.DoubleAccumulator.longValue()
java.util.concurrent.atomic.DoubleAdder.longValue()
java.util.concurrent.atomic.LongAccumulator.longValue()
java.util.concurrent.atomic.LongAdder.longValue()


Occurences of longValueExact

longValueExact occurences:
java.math.BigDecimal.longValueExact()
java.math.BigInteger.longValueExact()


Occurences of LONGVARBINARY

LONGVARBINARY occurences:
java.sql.LONGVARBINARY
java.sql.LONGVARBINARY


Occurences of LONGVARCHAR

LONGVARCHAR occurences:
java.sql.LONGVARCHAR
java.sql.LONGVARCHAR


Occurences of lookup

lookup occurences:
java.io.ObjectStreamClass.lookup(java.lang.Class)
java.lang.invoke.MethodHandles.lookup()
java.rmi.Naming.lookup(java.lang.String)
java.rmi.registry.Registry.lookup(java.lang.String)
java.util.Locale.lookup(java.util.List, java.util.Collection)
javax.annotation.Resource.lookup()
javax.naming.Context.lookup(java.lang.String)
javax.naming.Context.lookup(javax.naming.Name)
javax.naming.InitialContext.lookup(java.lang.String)
javax.naming.InitialContext.lookup(javax.naming.Name)
javax.xml.ws.WebServiceRef.lookup()


Occurences of lookupLink

lookupLink occurences:
javax.naming.Context.lookupLink(java.lang.String)
javax.naming.Context.lookupLink(javax.naming.Name)
javax.naming.InitialContext.lookupLink(java.lang.String)
javax.naming.InitialContext.lookupLink(javax.naming.Name)


Occurences of lookupNamespaceURI

lookupNamespaceURI occurences:
javax.imageio.metadata.IIOMetadataNode.lookupNamespaceURI(java.lang.String)
org.w3c.dom.Node.lookupNamespaceURI(java.lang.String)


Occurences of lookupPixel

lookupPixel occurences:
java.awt.image.ByteLookupTable.lookupPixel(byte:A, byte:A)
java.awt.image.ByteLookupTable.lookupPixel(int:A, int:A)
java.awt.image.LookupTable.lookupPixel(int:A, int:A)
java.awt.image.ShortLookupTable.lookupPixel(int:A, int:A)
java.awt.image.ShortLookupTable.lookupPixel(short:A, short:A)


Occurences of lookupPrefix

lookupPrefix occurences:
javax.imageio.metadata.IIOMetadataNode.lookupPrefix(java.lang.String)
org.w3c.dom.Node.lookupPrefix(java.lang.String)


Occurences of lookupPrintServices

lookupPrintServices occurences:
java.awt.print.PrinterJob.lookupPrintServices()
javax.print.PrintServiceLookup.lookupPrintServices(javax.print.DocFlavor, javax.print.attribute.AttributeSet)


Occurences of lookupProviders

lookupProviders occurences:
javax.imageio.spi.ServiceRegistry.lookupProviders(java.lang.Class)
javax.imageio.spi.ServiceRegistry.lookupProviders(java.lang.Class, java.lang.ClassLoader)


Occurences of loop

loop occurences:
java.applet.AudioClip.loop()
javax.sound.sampled.Clip.loop(int)


Occurences of LOOP_CONTINUOUSLY

LOOP_CONTINUOUSLY occurences:
javax.sound.midi.LOOP_CONTINUOUSLY
javax.sound.sampled.LOOP_CONTINUOUSLY


Occurences of lostOwnership

lostOwnership occurences:
java.awt.datatransfer.ClipboardOwner.lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)
java.awt.datatransfer.StringSelection.lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)


Occurences of lower

lower occurences:
java.util.concurrent.ConcurrentSkipListSet.lower(E)
java.util.concurrent.ConcurrentSkipListSet.lower(java.lang.Object)
java.util.NavigableSet.lower(E)
java.util.NavigableSet.lower(java.lang.Object)
java.util.TreeSet.lower(E)
java.util.TreeSet.lower(java.lang.Object)


Occurences of LOWERED

LOWERED occurences:
javax.swing.border.LOWERED
javax.swing.border.LOWERED


Occurences of lowerEntry

lowerEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.lowerEntry(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.lowerEntry(K)
java.util.NavigableMap.lowerEntry(java.lang.Object)
java.util.NavigableMap.lowerEntry(K)
java.util.TreeMap.lowerEntry(java.lang.Object)
java.util.TreeMap.lowerEntry(K)


Occurences of lowerKey

lowerKey occurences:
java.util.concurrent.ConcurrentSkipListMap.lowerKey(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.lowerKey(K)
java.util.NavigableMap.lowerKey(java.lang.Object)
java.util.NavigableMap.lowerKey(K)
java.util.TreeMap.lowerKey(java.lang.Object)
java.util.TreeMap.lowerKey(K)


Occurences of lowerLeft

lowerLeft occurences:
javax.swing.lowerLeft
javax.swing.lowerLeft


Occurences of lowerRight

lowerRight occurences:
javax.swing.lowerRight
javax.swing.lowerRight


Occurences of lowestOneBit

lowestOneBit occurences:
java.lang.Integer.lowestOneBit(int)
java.lang.Long.lowestOneBit(long)


Occurences of ls

ls occurences:
compact2.org.w3c.dom.ls
compact3.org.w3c.dom.ls
org.w3c.dom.ls


Occurences of lt

lt occurences:
java.io.lt
java.util.regex.lt
javax.management.Query.lt(javax.management.ValueExp, javax.management.ValueExp)
javax.swing.plaf.basic.BasicDirectoryModel.lt(java.io.File, java.io.File)


Occurences of LYCIAN

LYCIAN occurences:
java.lang.LYCIAN
java.lang.LYCIAN


Occurences of LYDIAN

LYDIAN occurences:
java.lang.LYDIAN
java.lang.LYDIAN


Occurences of mail

mail occurences:
java.awt.Desktop.mail()
java.awt.Desktop.mail(java.net.URI)


Occurences of MailcapCommandMap (constructors)

MailcapCommandMap (constructors) occurences:
javax.activation.MailcapCommandMap()
javax.activation.MailcapCommandMap(java.io.InputStream)
javax.activation.MailcapCommandMap(java.lang.String)


Occurences of makeBounds

makeBounds occurences:
java.awt.geom.Arc2D.makeBounds(double, double, double, double)
java.awt.geom.Arc2D.Double.makeBounds(double, double, double, double)
java.awt.geom.Arc2D.Float.makeBounds(double, double, double, double)


Occurences of makeClient

makeClient occurences:
javax.management.remote.rmi.RMIIIOPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIJRMPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject)
javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject)


Occurences of makeParser

makeParser occurences:
org.xml.sax.helpers.ParserFactory.makeParser()
org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String)


Occurences of makeTag

makeTag occurences:
javax.swing.text.html.parser.Parser.makeTag(javax.swing.text.html.parser.Element)
javax.swing.text.html.parser.Parser.makeTag(javax.swing.text.html.parser.Element, boolean)


Occurences of makeVisible

makeVisible occurences:
java.awt.List.makeVisible(int)
javax.swing.JTree.makeVisible(javax.swing.tree.TreePath)


Occurences of MALAYALAM

MALAYALAM occurences:
java.awt.font.MALAYALAM
java.awt.font.MALAYALAM
java.lang.MALAYALAM
java.lang.MALAYALAM


Occurences of malformedInputAction

malformedInputAction occurences:
java.nio.charset.CharsetDecoder.malformedInputAction()
java.nio.charset.CharsetEncoder.malformedInputAction()


Occurences of MalformedLinkException (constructors)

MalformedLinkException (constructors) occurences:
javax.naming.MalformedLinkException()
javax.naming.MalformedLinkException(java.lang.String)


Occurences of MalformedObjectNameException (constructors)

MalformedObjectNameException (constructors) occurences:
javax.management.MalformedObjectNameException()
javax.management.MalformedObjectNameException(java.lang.String)


Occurences of MalformedParametersException (constructors)

MalformedParametersException (constructors) occurences:
java.lang.reflect.MalformedParametersException()
java.lang.reflect.MalformedParametersException(java.lang.String)


Occurences of MalformedURLException (constructors)

MalformedURLException (constructors) occurences:
java.net.MalformedURLException()
java.net.MalformedURLException(java.lang.String)


Occurences of management

management occurences:
compact3.java.lang.management
compact3.javax.management
java.lang.management
javax.management


Occurences of ManagementPermission (constructors)

ManagementPermission (constructors) occurences:
java.lang.management.ManagementPermission(java.lang.String)
java.lang.management.ManagementPermission(java.lang.String, java.lang.String)


Occurences of ManageReferralControl (constructors)

ManageReferralControl (constructors) occurences:
javax.naming.ldap.ManageReferralControl()
javax.naming.ldap.ManageReferralControl(boolean)


Occurences of MANDAIC

MANDAIC occurences:
java.lang.MANDAIC
java.lang.MANDAIC


Occurences of Manifest

Manifest occurences:
java.util.jar.Manifest
javax.xml.crypto.dsig.Manifest


Occurences of Manifest (constructors)

Manifest (constructors) occurences:
java.util.jar.Manifest()
java.util.jar.Manifest(java.io.InputStream)
java.util.jar.Manifest(java.util.jar.Manifest)


Occurences of map

map occurences:
java.nio.channels.FileChannel.map(java.nio.channels.FileChannel.MapMode, long, long)
java.util.jar.map
java.util.Optional.map(java.util.function.Function)
java.util.stream.DoubleStream.map(java.util.function.DoubleUnaryOperator)
java.util.stream.IntStream.map(java.util.function.IntUnaryOperator)
java.util.stream.LongStream.map(java.util.function.LongUnaryOperator)
java.util.stream.Stream.map(java.util.function.Function)


Occurences of mappedName

mappedName occurences:
javax.annotation.Resource.mappedName()
javax.xml.ws.WebServiceRef.mappedName()


Occurences of mapSystemException

mapSystemException occurences:
javax.rmi.CORBA.Util.mapSystemException(org.omg.CORBA.SystemException)
javax.rmi.CORBA.UtilDelegate.mapSystemException(org.omg.CORBA.SystemException)


Occurences of mapToDouble

mapToDouble occurences:
java.util.stream.IntStream.mapToDouble(java.util.function.IntToDoubleFunction)
java.util.stream.LongStream.mapToDouble(java.util.function.LongToDoubleFunction)
java.util.stream.Stream.mapToDouble(java.util.function.ToDoubleFunction)


Occurences of mapToInt

mapToInt occurences:
java.util.stream.DoubleStream.mapToInt(java.util.function.DoubleToIntFunction)
java.util.stream.LongStream.mapToInt(java.util.function.LongToIntFunction)
java.util.stream.Stream.mapToInt(java.util.function.ToIntFunction)


Occurences of mapToLong

mapToLong occurences:
java.util.stream.DoubleStream.mapToLong(java.util.function.DoubleToLongFunction)
java.util.stream.IntStream.mapToLong(java.util.function.IntToLongFunction)
java.util.stream.Stream.mapToLong(java.util.function.ToLongFunction)


Occurences of mapToObj

mapToObj occurences:
java.util.stream.DoubleStream.mapToObj(java.util.function.DoubleFunction)
java.util.stream.IntStream.mapToObj(java.util.function.IntFunction)
java.util.stream.LongStream.mapToObj(java.util.function.LongFunction)


Occurences of MARCH

MARCH occurences:
java.time.MARCH
java.util.MARCH
javax.xml.datatype.MARCH


Occurences of mark

mark occurences:
java.io.BufferedInputStream.mark(int)
java.io.BufferedReader.mark(int)
java.io.ByteArrayInputStream.mark(int)
java.io.CharArrayReader.mark(int)
java.io.FilterInputStream.mark(int)
java.io.FilterReader.mark(int)
java.io.InputStream.mark(int)
java.io.LineNumberInputStream.mark(int)
java.io.LineNumberReader.mark(int)
java.io.mark
java.io.PushbackInputStream.mark(int)
java.io.PushbackReader.mark(int)
java.io.Reader.mark(int)
java.io.StringReader.mark(int)
java.nio.Buffer.mark()
java.util.zip.DeflaterInputStream.mark(int)
java.util.zip.InflaterInputStream.mark(int)
javax.imageio.stream.ImageInputStream.mark()
javax.imageio.stream.ImageInputStreamImpl.mark()
javax.sound.sampled.AudioInputStream.mark(int)


Occurences of markSupported

markSupported occurences:
java.io.BufferedInputStream.markSupported()
java.io.BufferedReader.markSupported()
java.io.ByteArrayInputStream.markSupported()
java.io.CharArrayReader.markSupported()
java.io.FilterInputStream.markSupported()
java.io.FilterReader.markSupported()
java.io.InputStream.markSupported()
java.io.PushbackInputStream.markSupported()
java.io.PushbackReader.markSupported()
java.io.Reader.markSupported()
java.io.StringReader.markSupported()
java.util.zip.DeflaterInputStream.markSupported()
java.util.zip.InflaterInputStream.markSupported()
javax.crypto.CipherInputStream.markSupported()
javax.sound.sampled.AudioInputStream.markSupported()


Occurences of marshal

marshal occurences:
javax.xml.bind.annotation.adapters.CollapsedStringAdapter.marshal(java.lang.String)
javax.xml.bind.annotation.adapters.HexBinaryAdapter.marshal(byte:A)
javax.xml.bind.annotation.adapters.NormalizedStringAdapter.marshal(java.lang.String)
javax.xml.bind.annotation.adapters.XmlAdapter.marshal(BoundType)
javax.xml.bind.annotation.adapters.XmlAdapter.marshal(java.lang.Object)
javax.xml.bind.annotation.DomHandler.marshal(ElementT, javax.xml.bind.ValidationEventHandler)
javax.xml.bind.annotation.DomHandler.marshal(java.lang.Object, javax.xml.bind.ValidationEventHandler)
javax.xml.bind.annotation.W3CDomHandler.marshal(org.w3c.dom.Element, javax.xml.bind.ValidationEventHandler)
javax.xml.bind.Binder.marshal(java.lang.Object, java.lang.Object)
javax.xml.bind.Binder.marshal(java.lang.Object, XmlNode)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, java.io.File)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, java.io.OutputStream)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, java.io.Writer)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, javax.xml.stream.XMLEventWriter)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, javax.xml.stream.XMLStreamWriter)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, org.w3c.dom.Node)
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(java.lang.Object, org.xml.sax.ContentHandler)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.io.File)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.io.OutputStream)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.io.Writer)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.lang.String)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.net.URI)
javax.xml.bind.JAXB.marshal(java.lang.Object, java.net.URL)
javax.xml.bind.JAXB.marshal(java.lang.Object, javax.xml.transform.Result)
javax.xml.bind.Marshaller.marshal(java.lang.Object, java.io.File)
javax.xml.bind.Marshaller.marshal(java.lang.Object, java.io.OutputStream)
javax.xml.bind.Marshaller.marshal(java.lang.Object, java.io.Writer)
javax.xml.bind.Marshaller.marshal(java.lang.Object, javax.xml.stream.XMLEventWriter)
javax.xml.bind.Marshaller.marshal(java.lang.Object, javax.xml.stream.XMLStreamWriter)
javax.xml.bind.Marshaller.marshal(java.lang.Object, javax.xml.transform.Result)
javax.xml.bind.Marshaller.marshal(java.lang.Object, org.w3c.dom.Node)
javax.xml.bind.Marshaller.marshal(java.lang.Object, org.xml.sax.ContentHandler)
javax.xml.crypto.dsig.keyinfo.KeyInfo.marshal(javax.xml.crypto.XMLStructure, javax.xml.crypto.XMLCryptoContext)
org.omg.CORBA.CustomMarshal.marshal(org.omg.CORBA.DataOutputStream)


Occurences of MARSHAL (constructors)

MARSHAL (constructors) occurences:
org.omg.CORBA.MARSHAL()
org.omg.CORBA.MARSHAL(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.MARSHAL(java.lang.String)
org.omg.CORBA.MARSHAL(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of MarshalException

MarshalException occurences:
java.rmi.MarshalException
javax.xml.bind.MarshalException
javax.xml.crypto.MarshalException


Occurences of MarshalException (constructors)

MarshalException (constructors) occurences:
java.rmi.MarshalException(java.lang.String)
java.rmi.MarshalException(java.lang.String, java.lang.Exception)
javax.xml.bind.MarshalException(java.lang.String)
javax.xml.bind.MarshalException(java.lang.String, java.lang.String)
javax.xml.bind.MarshalException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.MarshalException(java.lang.String, java.lang.Throwable)
javax.xml.bind.MarshalException(java.lang.Throwable)
javax.xml.crypto.MarshalException()
javax.xml.crypto.MarshalException(java.lang.String)
javax.xml.crypto.MarshalException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.MarshalException(java.lang.Throwable)


Occurences of MarshalledObject (constructors)

MarshalledObject (constructors) occurences:
java.rmi.MarshalledObject(java.lang.Object)
java.rmi.MarshalledObject(T)


Occurences of MaskFormatter (constructors)

MaskFormatter (constructors) occurences:
javax.swing.text.MaskFormatter()
javax.swing.text.MaskFormatter(java.lang.String)


Occurences of match

match occurences:
java.awt.datatransfer.DataFlavor.match(java.awt.datatransfer.DataFlavor)
java.security.cert.CertSelector.match(java.security.cert.Certificate)
java.security.cert.CRLSelector.match(java.security.cert.CRL)
java.security.cert.X509CertSelector.match(java.security.cert.Certificate)
java.security.cert.X509CRLSelector.match(java.security.cert.CRL)
java.util.Scanner.match()
javax.activation.MimeType.match(java.lang.String)
javax.activation.MimeType.match(javax.activation.MimeType)
javax.management.Query.match(javax.management.AttributeValueExp, javax.management.StringValueExp)


Occurences of matches

matches occurences:
java.lang.String.matches(java.lang.String)
java.nio.file.PathMatcher.matches(java.nio.file.Path)
java.util.regex.Matcher.matches()
java.util.regex.Pattern.matches(java.lang.String, java.lang.CharSequence)
javax.net.ssl.SNIMatcher.matches(javax.net.ssl.SNIServerName)
javax.sound.sampled.AudioFormat.matches(javax.sound.sampled.AudioFormat)
javax.sound.sampled.DataLine.Info.matches(javax.sound.sampled.Line.Info)
javax.sound.sampled.Line.Info.matches(javax.sound.sampled.Line.Info)
javax.sound.sampled.Port.Info.matches(javax.sound.sampled.Line.Info)


Occurences of math

math occurences:
compact1.java.math
compact2.java.math
compact3.java.math
java.math


Occurences of MathContext (constructors)

MathContext (constructors) occurences:
java.math.MathContext(int)
java.math.MathContext(int, java.math.RoundingMode)
java.math.MathContext(java.lang.String)


Occurences of MatteBorder (constructors)

MatteBorder (constructors) occurences:
javax.swing.border.MatteBorder(int, int, int, int, java.awt.Color)
javax.swing.border.MatteBorder(int, int, int, int, javax.swing.Icon)
javax.swing.border.MatteBorder(java.awt.Insets, java.awt.Color)
javax.swing.border.MatteBorder(java.awt.Insets, javax.swing.Icon)
javax.swing.border.MatteBorder(javax.swing.Icon)


Occurences of MatteBorderUIResource

MatteBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.MatteBorderUIResource.MatteBorderUIResource(int, int, int, int, java.awt.Color)
javax.swing.plaf.BorderUIResource.MatteBorderUIResource.MatteBorderUIResource(int, int, int, int, javax.swing.Icon)
javax.swing.plaf.BorderUIResource.MatteBorderUIResource.MatteBorderUIResource(javax.swing.Icon)


Occurences of MAX

MAX occurences:
java.time.MAX
java.time.MAX
java.time.MAX
java.time.MAX
java.time.MAX
java.time.MAX
java.time.MAX


Occurences of max

max occurences:
com.sun.jdi.connect.Connector.IntegerArgument.max()
java.lang.Double.max(double, double)
java.lang.Float.max(float, float)
java.lang.Integer.max(int, int)
java.lang.Long.max(long, long)
java.lang.Math.max(double, double)
java.lang.Math.max(float, float)
java.lang.Math.max(int, int)
java.lang.Math.max(long, long)
java.lang.StrictMath.max(double, double)
java.lang.StrictMath.max(float, float)
java.lang.StrictMath.max(int, int)
java.lang.StrictMath.max(long, long)
java.math.BigDecimal.max(java.math.BigDecimal)
java.math.BigInteger.max(java.math.BigInteger)
java.util.Collections.max(java.util.Collection)
java.util.Collections.max(java.util.Collection, java.util.Comparator)
java.util.stream.DoubleStream.max()
java.util.stream.IntStream.max()
java.util.stream.LongStream.max()
java.util.stream.Stream.max(java.util.Comparator)
javax.swing.Spring.max(javax.swing.Spring, javax.swing.Spring)


Occurences of maxBy

maxBy occurences:
java.util.function.BinaryOperator.maxBy(java.util.Comparator)
java.util.stream.Collectors.maxBy(java.util.Comparator)


Occurences of MaximizeAction

MaximizeAction occurences:
javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction.MaximizeAction()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction.MaximizeAction()


Occurences of maximizeFrame

maximizeFrame occurences:
javax.swing.DefaultDesktopManager.maximizeFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.maximizeFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.maximizeFrame(javax.swing.JInternalFrame)


Occurences of maximumLayoutSize

maximumLayoutSize occurences:
java.awt.BorderLayout.maximumLayoutSize(java.awt.Container)
java.awt.CardLayout.maximumLayoutSize(java.awt.Container)
java.awt.GridBagLayout.maximumLayoutSize(java.awt.Container)
java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)
javax.swing.BoxLayout.maximumLayoutSize(java.awt.Container)
javax.swing.GroupLayout.maximumLayoutSize(java.awt.Container)
javax.swing.JRootPane.RootLayout.maximumLayoutSize(java.awt.Container)
javax.swing.OverlayLayout.maximumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.maximumLayoutSize(java.awt.Container)
javax.swing.SpringLayout.maximumLayoutSize(java.awt.Container)


Occurences of MAX_EXPONENT

MAX_EXPONENT occurences:
java.lang.MAX_EXPONENT
java.lang.MAX_EXPONENT


Occurences of MAX_VALUE

MAX_VALUE occurences:
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.lang.MAX_VALUE
java.time.MAX_VALUE


Occurences of MAY

MAY occurences:
java.time.MAY
java.util.MAY
javax.xml.datatype.MAY


Occurences of MBeanAttributeInfo (constructors)

MBeanAttributeInfo (constructors) occurences:
javax.management.MBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method)
javax.management.MBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean)
javax.management.MBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean, javax.management.Descriptor)


Occurences of MBeanConstructorInfo (constructors)

MBeanConstructorInfo (constructors) occurences:
javax.management.MBeanConstructorInfo(java.lang.String, java.lang.reflect.Constructor)
javax.management.MBeanConstructorInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A)
javax.management.MBeanConstructorInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, javax.management.Descriptor)


Occurences of MBeanException (constructors)

MBeanException (constructors) occurences:
javax.management.MBeanException(java.lang.Exception)
javax.management.MBeanException(java.lang.Exception, java.lang.String)


Occurences of MBeanFeatureInfo (constructors)

MBeanFeatureInfo (constructors) occurences:
javax.management.MBeanFeatureInfo(java.lang.String, java.lang.String)
javax.management.MBeanFeatureInfo(java.lang.String, java.lang.String, javax.management.Descriptor)


Occurences of MBeanInfo (constructors)

MBeanInfo (constructors) occurences:
javax.management.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo:A, javax.management.MBeanConstructorInfo:A, javax.management.MBeanOperationInfo:A, javax.management.MBeanNotificationInfo:A)
javax.management.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo:A, javax.management.MBeanConstructorInfo:A, javax.management.MBeanOperationInfo:A, javax.management.MBeanNotificationInfo:A, javax.management.Descriptor)


Occurences of MBeanNotificationInfo (constructors)

MBeanNotificationInfo (constructors) occurences:
javax.management.MBeanNotificationInfo(java.lang.String:A, java.lang.String, java.lang.String)
javax.management.MBeanNotificationInfo(java.lang.String:A, java.lang.String, java.lang.String, javax.management.Descriptor)


Occurences of MBeanOperationInfo (constructors)

MBeanOperationInfo (constructors) occurences:
javax.management.MBeanOperationInfo(java.lang.String, java.lang.reflect.Method)
javax.management.MBeanOperationInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, java.lang.String, int)
javax.management.MBeanOperationInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, java.lang.String, int, javax.management.Descriptor)


Occurences of MBeanParameterInfo (constructors)

MBeanParameterInfo (constructors) occurences:
javax.management.MBeanParameterInfo(java.lang.String, java.lang.String, java.lang.String)
javax.management.MBeanParameterInfo(java.lang.String, java.lang.String, java.lang.String, javax.management.Descriptor)


Occurences of MBeanPermission (constructors)

MBeanPermission (constructors) occurences:
javax.management.MBeanPermission(java.lang.String, java.lang.String)
javax.management.MBeanPermission(java.lang.String, java.lang.String, javax.management.ObjectName, java.lang.String)


Occurences of MBeanRegistrationException (constructors)

MBeanRegistrationException (constructors) occurences:
javax.management.MBeanRegistrationException(java.lang.Exception)
javax.management.MBeanRegistrationException(java.lang.Exception, java.lang.String)


Occurences of MBeanServerInvocationHandler (constructors)

MBeanServerInvocationHandler (constructors) occurences:
javax.management.MBeanServerInvocationHandler(javax.management.MBeanServerConnection, javax.management.ObjectName)
javax.management.MBeanServerInvocationHandler(javax.management.MBeanServerConnection, javax.management.ObjectName, boolean)


Occurences of MBeanServerPermission (constructors)

MBeanServerPermission (constructors) occurences:
javax.management.MBeanServerPermission(java.lang.String)
javax.management.MBeanServerPermission(java.lang.String, java.lang.String)


Occurences of MBeanTrustPermission (constructors)

MBeanTrustPermission (constructors) occurences:
javax.management.MBeanTrustPermission(java.lang.String)
javax.management.MBeanTrustPermission(java.lang.String, java.lang.String)


Occurences of MediaPrintableArea (constructors)

MediaPrintableArea (constructors) occurences:
javax.print.attribute.standard.MediaPrintableArea(float, float, float, float, int)
javax.print.attribute.standard.MediaPrintableArea(int, int, int, int, int)


Occurences of MediaSize (constructors)

MediaSize (constructors) occurences:
javax.print.attribute.standard.MediaSize(float, float, int)
javax.print.attribute.standard.MediaSize(float, float, int, javax.print.attribute.standard.MediaSizeName)
javax.print.attribute.standard.MediaSize(int, int, int)
javax.print.attribute.standard.MediaSize(int, int, int, javax.print.attribute.standard.MediaSizeName)


Occurences of MEDIUM

MEDIUM occurences:
java.text.MEDIUM
java.time.format.MEDIUM


Occurences of MEETEI_MAYEK

MEETEI_MAYEK occurences:
java.awt.font.MEETEI_MAYEK
java.lang.MEETEI_MAYEK
java.lang.MEETEI_MAYEK


Occurences of member

member occurences:
org.omg.CORBA.DynUnion.member()
org.omg.DynamicAny.DynUnionOperations.member()
org.omg.DynamicAny._DynUnionStub.member()


Occurences of member_kind

member_kind occurences:
org.omg.CORBA.DynUnion.member_kind()
org.omg.DynamicAny.DynUnionOperations.member_kind()
org.omg.DynamicAny._DynUnionStub.member_kind()


Occurences of member_name

member_name occurences:
org.omg.CORBA.DynUnion.member_name()
org.omg.CORBA.DynUnion.member_name(java.lang.String)
org.omg.CORBA.TypeCode.member_name(int)
org.omg.DynamicAny.DynUnionOperations.member_name()
org.omg.DynamicAny._DynUnionStub.member_name()


Occurences of MemoryHandler (constructors)

MemoryHandler (constructors) occurences:
java.util.logging.MemoryHandler()
java.util.logging.MemoryHandler(java.util.logging.Handler, int, java.util.logging.Level)


Occurences of MemoryImageSource (constructors)

MemoryImageSource (constructors) occurences:
java.awt.image.MemoryImageSource(int, int, int:A, int, int)
java.awt.image.MemoryImageSource(int, int, int:A, int, int, java.util.Hashtable)
java.awt.image.MemoryImageSource(int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.MemoryImageSource(int, int, java.awt.image.ColorModel, byte:A, int, int, java.util.Hashtable)
java.awt.image.MemoryImageSource(int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.MemoryImageSource(int, int, java.awt.image.ColorModel, int:A, int, int, java.util.Hashtable)


Occurences of menu

menu occurences:
java.awt.menu
javax.swing.plaf.basic.menu


Occurences of MENU

MENU occurences:
java.awt.MENU
javax.accessibility.MENU
javax.swing.plaf.synth.MENU
javax.swing.text.html.MENU


Occurences of Menu (constructors)

Menu (constructors) occurences:
java.awt.Menu()
java.awt.Menu(java.lang.String)
java.awt.Menu(java.lang.String, boolean)


Occurences of menuBar

menuBar occurences:
javax.swing.menuBar
javax.swing.plaf.basic.menuBar
javax.swing.plaf.basic.menuBar


Occurences of MenuBarBorder

MenuBarBorder occurences:
javax.swing.plaf.basic.BasicBorders.MenuBarBorder.MenuBarBorder(java.awt.Color, java.awt.Color)
javax.swing.plaf.metal.MetalBorders.MenuBarBorder.MenuBarBorder()


Occurences of MenuDragMouseEvent (constructors)

MenuDragMouseEvent (constructors) occurences:
javax.swing.event.MenuDragMouseEvent(java.awt.Component, int, long, int, int, int, int, boolean, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.event.MenuDragMouseEvent(java.awt.Component, int, long, int, int, int, int, int, int, boolean, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)


Occurences of MenuItem (constructors)

MenuItem (constructors) occurences:
java.awt.MenuItem()
java.awt.MenuItem(java.lang.String)
java.awt.MenuItem(java.lang.String, java.awt.MenuShortcut)


Occurences of menuSelectionChanged

menuSelectionChanged occurences:
javax.swing.JMenu.menuSelectionChanged(boolean)
javax.swing.JMenuBar.menuSelectionChanged(boolean)
javax.swing.JMenuItem.menuSelectionChanged(boolean)
javax.swing.JPopupMenu.menuSelectionChanged(boolean)
javax.swing.MenuElement.menuSelectionChanged(boolean)


Occurences of MenuShortcut (constructors)

MenuShortcut (constructors) occurences:
java.awt.MenuShortcut(int)
java.awt.MenuShortcut(int, boolean)


Occurences of MENU_BAR

MENU_BAR occurences:
javax.accessibility.MENU_BAR
javax.swing.plaf.synth.MENU_BAR


Occurences of MENU_ITEM

MENU_ITEM occurences:
javax.accessibility.MENU_ITEM
javax.swing.plaf.synth.MENU_ITEM


Occurences of merge

merge occurences:
java.security.Provider.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.merge(K, V, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.merge(K, V, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.merge(K, V, java.util.function.BiFunction)
java.util.HashMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.HashMap.merge(K, V, java.util.function.BiFunction)
java.util.Hashtable.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.Hashtable.merge(K, V, java.util.function.BiFunction)
java.util.Map.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
java.util.Map.merge(K, V, java.util.function.BiFunction)
java.util.StringJoiner.merge(java.util.StringJoiner)


Occurences of MEROITIC_CURSIVE

MEROITIC_CURSIVE occurences:
java.lang.MEROITIC_CURSIVE
java.lang.MEROITIC_CURSIVE


Occurences of MEROITIC_HIEROGLYPHS

MEROITIC_HIEROGLYPHS occurences:
java.lang.MEROITIC_HIEROGLYPHS
java.lang.MEROITIC_HIEROGLYPHS


Occurences of message

message occurences:
javax.swing.message
javax.swing.message


Occurences of MessageFormat (constructors)

MessageFormat (constructors) occurences:
java.text.MessageFormat(java.lang.String)
java.text.MessageFormat(java.lang.String, java.util.Locale)


Occurences of MessageProp (constructors)

MessageProp (constructors) occurences:
org.ietf.jgss.MessageProp(boolean)
org.ietf.jgss.MessageProp(int, boolean)


Occurences of META

META occurences:
javax.sound.midi.META
javax.swing.text.html.META


Occurences of meta

meta occurences:
javax.sound.midi.MetaEventListener.meta(javax.sound.midi.MetaMessage)
javax.swing.text.html.parser.meta


Occurences of metadata

metadata occurences:
javax.imageio.metadata
javax.imageio.metadata
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.metadata(org.w3c.dom.Element)


Occurences of MetalComboBoxButton (constructors)

MetalComboBoxButton (constructors) occurences:
javax.swing.plaf.metal.MetalComboBoxButton(javax.swing.JComboBox, javax.swing.Icon, boolean, javax.swing.CellRendererPane, javax.swing.JList)
javax.swing.plaf.metal.MetalComboBoxButton(javax.swing.JComboBox, javax.swing.Icon, javax.swing.CellRendererPane, javax.swing.JList)


Occurences of MetaMessage (constructors)

MetaMessage (constructors) occurences:
javax.sound.midi.MetaMessage()
javax.sound.midi.MetaMessage(byte:A)
javax.sound.midi.MetaMessage(int, byte:A, int)


Occurences of META_MASK

META_MASK occurences:
java.awt.event.META_MASK
java.awt.event.META_MASK
java.awt.META_MASK


Occurences of Method

Method occurences:
com.sun.jdi.Method
java.lang.reflect.Method


Occurences of method

method occurences:
com.sun.jdi.event.MethodEntryEvent.method()
com.sun.jdi.event.MethodExitEvent.method()
com.sun.jdi.Location.method()
java.net.method


Occurences of METHOD

METHOD occurences:
com.sun.source.tree.METHOD
java.lang.annotation.METHOD
javax.lang.model.element.METHOD
javax.swing.text.html.METHOD
javax.xml.transform.METHOD


Occurences of MethodDescriptor (constructors)

MethodDescriptor (constructors) occurences:
java.beans.MethodDescriptor(java.lang.reflect.Method)
java.beans.MethodDescriptor(java.lang.reflect.Method, java.beans.ParameterDescriptor:A)


Occurences of MIAO

MIAO occurences:
java.lang.MIAO
java.lang.MIAO


Occurences of MidiFileFormat (constructors)

MidiFileFormat (constructors) occurences:
javax.sound.midi.MidiFileFormat(int, float, int, int, long)
javax.sound.midi.MidiFileFormat(int, float, int, int, long, java.util.Map)


Occurences of MidiUnavailableException (constructors)

MidiUnavailableException (constructors) occurences:
javax.sound.midi.MidiUnavailableException()
javax.sound.midi.MidiUnavailableException(java.lang.String)


Occurences of MIDI_TIME_CODE

MIDI_TIME_CODE occurences:
javax.sound.midi.MIDI_TIME_CODE
javax.sound.midi.MIDI_TIME_CODE


Occurences of MILLISECOND

MILLISECOND occurences:
java.text.MILLISECOND
java.util.MILLISECOND


Occurences of MimeType (constructors)

MimeType (constructors) occurences:
javax.activation.MimeType()
javax.activation.MimeType(java.lang.String)
javax.activation.MimeType(java.lang.String, java.lang.String)


Occurences of MimeTypeParameterList (constructors)

MimeTypeParameterList (constructors) occurences:
javax.activation.MimeTypeParameterList()
javax.activation.MimeTypeParameterList(java.lang.String)


Occurences of MimeTypeParseException

MimeTypeParseException occurences:
java.awt.datatransfer.MimeTypeParseException
javax.activation.MimeTypeParseException


Occurences of MimeTypeParseException (constructors)

MimeTypeParseException (constructors) occurences:
java.awt.datatransfer.MimeTypeParseException()
java.awt.datatransfer.MimeTypeParseException(java.lang.String)
javax.activation.MimeTypeParseException()
javax.activation.MimeTypeParseException(java.lang.String)


Occurences of MimetypesFileTypeMap (constructors)

MimetypesFileTypeMap (constructors) occurences:
javax.activation.MimetypesFileTypeMap()
javax.activation.MimetypesFileTypeMap(java.io.InputStream)
javax.activation.MimetypesFileTypeMap(java.lang.String)


Occurences of min

min occurences:
com.sun.jdi.connect.Connector.IntegerArgument.min()
java.lang.Double.min(double, double)
java.lang.Float.min(float, float)
java.lang.Integer.min(int, int)
java.lang.Long.min(long, long)
java.lang.Math.min(double, double)
java.lang.Math.min(float, float)
java.lang.Math.min(int, int)
java.lang.Math.min(long, long)
java.lang.StrictMath.min(double, double)
java.lang.StrictMath.min(float, float)
java.lang.StrictMath.min(int, int)
java.lang.StrictMath.min(long, long)
java.math.BigDecimal.min(java.math.BigDecimal)
java.math.BigInteger.min(java.math.BigInteger)
java.util.Collections.min(java.util.Collection)
java.util.Collections.min(java.util.Collection, java.util.Comparator)
java.util.stream.DoubleStream.min()
java.util.stream.IntStream.min()
java.util.stream.LongStream.min()
java.util.stream.Stream.min(java.util.Comparator)


Occurences of MIN

MIN occurences:
java.time.MIN
java.time.MIN
java.time.MIN
java.time.MIN
java.time.MIN
java.time.MIN
java.time.MIN


Occurences of minBy

minBy occurences:
java.util.function.BinaryOperator.minBy(java.util.Comparator)
java.util.stream.Collectors.minBy(java.util.Comparator)


Occurences of MinimalHTMLWriter (constructors)

MinimalHTMLWriter (constructors) occurences:
javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument)
javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int)


Occurences of minimizeFrame

minimizeFrame occurences:
javax.swing.DefaultDesktopManager.minimizeFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.minimizeFrame(javax.swing.JInternalFrame)
javax.swing.plaf.basic.BasicInternalFrameUI.minimizeFrame(javax.swing.JInternalFrame)


Occurences of minimumLayoutSize

minimumLayoutSize occurences:
java.awt.BorderLayout.minimumLayoutSize(java.awt.Container)
java.awt.CardLayout.minimumLayoutSize(java.awt.Container)
java.awt.FlowLayout.minimumLayoutSize(java.awt.Container)
java.awt.GridBagLayout.minimumLayoutSize(java.awt.Container)
java.awt.GridLayout.minimumLayoutSize(java.awt.Container)
java.awt.LayoutManager.minimumLayoutSize(java.awt.Container)
javax.swing.BoxLayout.minimumLayoutSize(java.awt.Container)
javax.swing.GroupLayout.minimumLayoutSize(java.awt.Container)
javax.swing.JRootPane.RootLayout.minimumLayoutSize(java.awt.Container)
javax.swing.JSpinner.DefaultEditor.minimumLayoutSize(java.awt.Container)
javax.swing.OverlayLayout.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicScrollBarUI.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.minimumLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.minimumLayoutSize(java.awt.Container)
javax.swing.ScrollPaneLayout.minimumLayoutSize(java.awt.Container)
javax.swing.SpringLayout.minimumLayoutSize(java.awt.Container)
javax.swing.ViewportLayout.minimumLayoutSize(java.awt.Container)


Occurences of minimumSize

minimumSize occurences:
java.awt.Component.minimumSize()
java.awt.Container.minimumSize()
java.awt.List.minimumSize()
java.awt.List.minimumSize(int)
java.awt.TextArea.minimumSize()
java.awt.TextArea.minimumSize(int, int)
java.awt.TextField.minimumSize()
java.awt.TextField.minimumSize(int)
javax.swing.plaf.basic.minimumSize


Occurences of MINUS

MINUS occurences:
com.sun.source.tree.MINUS
javax.management.MINUS


Occurences of minus

minus occurences:
java.time.chrono.ChronoLocalDate.minus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoLocalDate.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ChronoLocalDateTime.minus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoLocalDateTime.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ChronoPeriod.minus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoZonedDateTime.minus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoZonedDateTime.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.HijrahDate.minus(java.time.temporal.TemporalAmount)
java.time.chrono.HijrahDate.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.JapaneseDate.minus(java.time.temporal.TemporalAmount)
java.time.chrono.JapaneseDate.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.MinguoDate.minus(java.time.temporal.TemporalAmount)
java.time.chrono.MinguoDate.minus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ThaiBuddhistDate.minus(java.time.temporal.TemporalAmount)
java.time.chrono.ThaiBuddhistDate.minus(long, java.time.temporal.TemporalUnit)
java.time.DayOfWeek.minus(long)
java.time.Duration.minus(java.time.Duration)
java.time.Duration.minus(long, java.time.temporal.TemporalUnit)
java.time.Instant.minus(java.time.temporal.TemporalAmount)
java.time.Instant.minus(long, java.time.temporal.TemporalUnit)
java.time.LocalDate.minus(java.time.temporal.TemporalAmount)
java.time.LocalDate.minus(long, java.time.temporal.TemporalUnit)
java.time.LocalDateTime.minus(java.time.temporal.TemporalAmount)
java.time.LocalDateTime.minus(long, java.time.temporal.TemporalUnit)
java.time.LocalTime.minus(java.time.temporal.TemporalAmount)
java.time.LocalTime.minus(long, java.time.temporal.TemporalUnit)
java.time.Month.minus(long)
java.time.OffsetDateTime.minus(java.time.temporal.TemporalAmount)
java.time.OffsetDateTime.minus(long, java.time.temporal.TemporalUnit)
java.time.OffsetTime.minus(java.time.temporal.TemporalAmount)
java.time.OffsetTime.minus(long, java.time.temporal.TemporalUnit)
java.time.Period.minus(java.time.temporal.TemporalAmount)
java.time.temporal.Temporal.minus(java.time.temporal.TemporalAmount)
java.time.temporal.Temporal.minus(long, java.time.temporal.TemporalUnit)
java.time.Year.minus(java.time.temporal.TemporalAmount)
java.time.Year.minus(long, java.time.temporal.TemporalUnit)
java.time.YearMonth.minus(java.time.temporal.TemporalAmount)
java.time.YearMonth.minus(long, java.time.temporal.TemporalUnit)
java.time.ZonedDateTime.minus(java.time.temporal.TemporalAmount)
java.time.ZonedDateTime.minus(long, java.time.temporal.TemporalUnit)
javax.management.Query.minus(javax.management.ValueExp, javax.management.ValueExp)
javax.swing.Spring.minus(javax.swing.Spring)


Occurences of minusDays

minusDays occurences:
java.time.Duration.minusDays(long)
java.time.LocalDate.minusDays(long)
java.time.LocalDateTime.minusDays(long)
java.time.OffsetDateTime.minusDays(long)
java.time.Period.minusDays(long)
java.time.ZonedDateTime.minusDays(long)


Occurences of minusHours

minusHours occurences:
java.time.Duration.minusHours(long)
java.time.LocalDateTime.minusHours(long)
java.time.LocalTime.minusHours(long)
java.time.OffsetDateTime.minusHours(long)
java.time.OffsetTime.minusHours(long)
java.time.ZonedDateTime.minusHours(long)


Occurences of minusMillis

minusMillis occurences:
java.time.Duration.minusMillis(long)
java.time.Instant.minusMillis(long)


Occurences of minusMinutes

minusMinutes occurences:
java.time.Duration.minusMinutes(long)
java.time.LocalDateTime.minusMinutes(long)
java.time.LocalTime.minusMinutes(long)
java.time.OffsetDateTime.minusMinutes(long)
java.time.OffsetTime.minusMinutes(long)
java.time.ZonedDateTime.minusMinutes(long)


Occurences of minusMonths

minusMonths occurences:
java.time.LocalDate.minusMonths(long)
java.time.LocalDateTime.minusMonths(long)
java.time.OffsetDateTime.minusMonths(long)
java.time.Period.minusMonths(long)
java.time.YearMonth.minusMonths(long)
java.time.ZonedDateTime.minusMonths(long)


Occurences of minusNanos

minusNanos occurences:
java.time.Duration.minusNanos(long)
java.time.Instant.minusNanos(long)
java.time.LocalDateTime.minusNanos(long)
java.time.LocalTime.minusNanos(long)
java.time.OffsetDateTime.minusNanos(long)
java.time.OffsetTime.minusNanos(long)
java.time.ZonedDateTime.minusNanos(long)


Occurences of minusSeconds

minusSeconds occurences:
java.time.Duration.minusSeconds(long)
java.time.Instant.minusSeconds(long)
java.time.LocalDateTime.minusSeconds(long)
java.time.LocalTime.minusSeconds(long)
java.time.OffsetDateTime.minusSeconds(long)
java.time.OffsetTime.minusSeconds(long)
java.time.ZonedDateTime.minusSeconds(long)


Occurences of minusWeeks

minusWeeks occurences:
java.time.LocalDate.minusWeeks(long)
java.time.LocalDateTime.minusWeeks(long)
java.time.OffsetDateTime.minusWeeks(long)
java.time.ZonedDateTime.minusWeeks(long)


Occurences of minusYears

minusYears occurences:
java.time.LocalDate.minusYears(long)
java.time.LocalDateTime.minusYears(long)
java.time.OffsetDateTime.minusYears(long)
java.time.Period.minusYears(long)
java.time.Year.minusYears(long)
java.time.YearMonth.minusYears(long)
java.time.ZonedDateTime.minusYears(long)


Occurences of MINUTE

MINUTE occurences:
java.text.MINUTE
java.util.MINUTE


Occurences of MINUTES

MINUTES occurences:
java.time.temporal.MINUTES
java.util.concurrent.MINUTES
javax.xml.datatype.MINUTES


Occurences of MIN_EXPONENT

MIN_EXPONENT occurences:
java.lang.MIN_EXPONENT
java.lang.MIN_EXPONENT


Occurences of MIN_NORMAL

MIN_NORMAL occurences:
java.lang.MIN_NORMAL
java.lang.MIN_NORMAL


Occurences of MIN_VALUE

MIN_VALUE occurences:
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.lang.MIN_VALUE
java.time.MIN_VALUE


Occurences of mirrorOf

mirrorOf occurences:
com.sun.jdi.VirtualMachine.mirrorOf(boolean)
com.sun.jdi.VirtualMachine.mirrorOf(byte)
com.sun.jdi.VirtualMachine.mirrorOf(char)
com.sun.jdi.VirtualMachine.mirrorOf(double)
com.sun.jdi.VirtualMachine.mirrorOf(float)
com.sun.jdi.VirtualMachine.mirrorOf(int)
com.sun.jdi.VirtualMachine.mirrorOf(java.lang.String)
com.sun.jdi.VirtualMachine.mirrorOf(long)
com.sun.jdi.VirtualMachine.mirrorOf(short)


Occurences of MLet (constructors)

MLet (constructors) occurences:
javax.management.loading.MLet()
javax.management.loading.MLet(java.net.URL:A)
javax.management.loading.MLet(java.net.URL:A, boolean)
javax.management.loading.MLet(java.net.URL:A, java.lang.ClassLoader)
javax.management.loading.MLet(java.net.URL:A, java.lang.ClassLoader, boolean)
javax.management.loading.MLet(java.net.URL:A, java.lang.ClassLoader, java.net.URLStreamHandlerFactory)
javax.management.loading.MLet(java.net.URL:A, java.lang.ClassLoader, java.net.URLStreamHandlerFactory, boolean)


Occurences of MM

MM occurences:
javax.print.attribute.MM
javax.print.attribute.standard.MM


Occurences of mode

mode occurences:
java.io.mode
javax.jws.WebParam.mode()
org.omg.Dynamic.mode


Occurences of model

model occurences:
compact3.javax.lang.model
javax.lang.model
javax.swing.model
javax.swing.model
javax.swing.model
javax.swing.model


Occurences of modelChanged

modelChanged occurences:
javax.swing.plaf.basic.BasicTextUI.modelChanged()
javax.swing.plaf.basic.modelChanged


Occurences of ModelListener

ModelListener occurences:
javax.swing.JTabbedPane.ModelListener.ModelListener()
javax.swing.plaf.basic.BasicScrollBarUI.ModelListener.ModelListener()


Occurences of modelmbean

modelmbean occurences:
compact3.javax.management.modelmbean
javax.management.modelmbean


Occurences of ModelMBeanAttributeInfo (constructors)

ModelMBeanAttributeInfo (constructors) occurences:
javax.management.modelmbean.ModelMBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method)
javax.management.modelmbean.ModelMBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean)
javax.management.modelmbean.ModelMBeanAttributeInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo)


Occurences of ModelMBeanConstructorInfo (constructors)

ModelMBeanConstructorInfo (constructors) occurences:
javax.management.modelmbean.ModelMBeanConstructorInfo(java.lang.String, java.lang.reflect.Constructor)
javax.management.modelmbean.ModelMBeanConstructorInfo(java.lang.String, java.lang.reflect.Constructor, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanConstructorInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A)
javax.management.modelmbean.ModelMBeanConstructorInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, javax.management.Descriptor)


Occurences of ModelMBeanInfoSupport (constructors)

ModelMBeanInfoSupport (constructors) occurences:
javax.management.modelmbean.ModelMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.modelmbean.ModelMBeanAttributeInfo:A, javax.management.modelmbean.ModelMBeanConstructorInfo:A, javax.management.modelmbean.ModelMBeanOperationInfo:A, javax.management.modelmbean.ModelMBeanNotificationInfo:A)
javax.management.modelmbean.ModelMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.modelmbean.ModelMBeanAttributeInfo:A, javax.management.modelmbean.ModelMBeanConstructorInfo:A, javax.management.modelmbean.ModelMBeanOperationInfo:A, javax.management.modelmbean.ModelMBeanNotificationInfo:A, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanInfoSupport(javax.management.modelmbean.ModelMBeanInfo)


Occurences of ModelMBeanNotificationInfo (constructors)

ModelMBeanNotificationInfo (constructors) occurences:
javax.management.modelmbean.ModelMBeanNotificationInfo(java.lang.String:A, java.lang.String, java.lang.String)
javax.management.modelmbean.ModelMBeanNotificationInfo(java.lang.String:A, java.lang.String, java.lang.String, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanNotificationInfo(javax.management.modelmbean.ModelMBeanNotificationInfo)


Occurences of ModelMBeanOperationInfo (constructors)

ModelMBeanOperationInfo (constructors) occurences:
javax.management.modelmbean.ModelMBeanOperationInfo(java.lang.String, java.lang.reflect.Method)
javax.management.modelmbean.ModelMBeanOperationInfo(java.lang.String, java.lang.reflect.Method, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanOperationInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, java.lang.String, int)
javax.management.modelmbean.ModelMBeanOperationInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo:A, java.lang.String, int, javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanOperationInfo(javax.management.modelmbean.ModelMBeanOperationInfo)


Occurences of modelStructureChanged

modelStructureChanged occurences:
javax.swing.DefaultRowSorter.modelStructureChanged()
javax.swing.RowSorter.modelStructureChanged()


Occurences of modelToView

modelToView occurences:
javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int)
javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)
javax.swing.plaf.multi.MultiTextUI.modelToView(javax.swing.text.JTextComponent, int)
javax.swing.plaf.multi.MultiTextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)
javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int)
javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)
javax.swing.text.AsyncBoxView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.BoxView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.ComponentView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.CompositeView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.CompositeView.modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)
javax.swing.text.FieldView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.GlyphView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.GlyphView.GlyphPainter.modelToView(javax.swing.text.GlyphView, int, javax.swing.text.Position.Bias, java.awt.Shape)
javax.swing.text.html.ImageView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.IconView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.JTextComponent.modelToView(int)
javax.swing.text.PasswordView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.PlainView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.View.modelToView(int, java.awt.Shape)
javax.swing.text.View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
javax.swing.text.View.modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)


Occurences of Modifier

Modifier occurences:
java.lang.reflect.Modifier
javax.lang.model.element.Modifier


Occurences of modifiers

modifiers occurences:
com.sun.javadoc.ProgramElementDoc.modifiers()
com.sun.jdi.Accessible.modifiers()
java.awt.modifiers


Occurences of modifyAttributes

modifyAttributes occurences:
javax.naming.directory.DirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem:A)
javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem:A)
javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem:A)
javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem:A)


Occurences of MONARCH_ENVELOPE

MONARCH_ENVELOPE occurences:
java.awt.MONARCH_ENVELOPE
javax.print.attribute.standard.MONARCH_ENVELOPE
javax.print.attribute.standard.MONARCH_ENVELOPE


Occurences of MONDAY

MONDAY occurences:
java.time.MONDAY
java.util.MONDAY


Occurences of MONGOLIAN

MONGOLIAN occurences:
java.awt.font.MONGOLIAN
java.awt.font.MONGOLIAN
java.lang.MONGOLIAN
java.lang.MONGOLIAN


Occurences of monitor

monitor occurences:
com.sun.jdi.event.MonitorContendedEnteredEvent.monitor()
com.sun.jdi.event.MonitorContendedEnterEvent.monitor()
com.sun.jdi.event.MonitorWaitedEvent.monitor()
com.sun.jdi.event.MonitorWaitEvent.monitor()
com.sun.jdi.MonitorInfo.monitor()
compact3.javax.management.monitor
javax.management.monitor


Occurences of Monitor Java Applications

Monitor Java Applications occurences:
Monitor Java Applications
Monitor Java Applications


Occurences of Monitor the JVM

Monitor the JVM occurences:
Monitor the JVM
Monitor the JVM


Occurences of MonitorInfo

MonitorInfo occurences:
com.sun.jdi.MonitorInfo
java.lang.management.MonitorInfo


Occurences of MonitorSettingException (constructors)

MonitorSettingException (constructors) occurences:
javax.management.monitor.MonitorSettingException()
javax.management.monitor.MonitorSettingException(java.lang.String)


Occurences of MONOCHROME

MONOCHROME occurences:
java.awt.MONOCHROME
javax.print.attribute.standard.MONOCHROME


Occurences of MONTH

MONTH occurences:
java.text.MONTH
java.util.MONTH


Occurences of MONTHS

MONTHS occurences:
java.time.temporal.MONTHS
javax.xml.datatype.MONTHS


Occurences of mouseClicked

mouseClicked occurences:
java.awt.AWTEventMulticaster.mouseClicked(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseClicked(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseClicked(java.awt.event.MouseEvent)
java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseClicked(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseClicked(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseClicked(java.awt.event.MouseEvent)
javax.swing.text.html.HTMLEditorKit.LinkController.mouseClicked(java.awt.event.MouseEvent)


Occurences of mouseDragged

mouseDragged occurences:
java.awt.AWTEventMulticaster.mouseDragged(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseDragged(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseDragged(java.awt.event.MouseEvent)
java.awt.event.MouseMotionAdapter.mouseDragged(java.awt.event.MouseEvent)
java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSliderUI.TrackListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseDragged(java.awt.event.MouseEvent)
javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener.mouseDragged(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseDragged(java.awt.event.MouseEvent)
javax.swing.text.html.HTMLEditorKit.LinkController.mouseDragged(java.awt.event.MouseEvent)
javax.swing.ToolTipManager.mouseDragged(java.awt.event.MouseEvent)


Occurences of MouseDragGestureRecognizer (constructors)

MouseDragGestureRecognizer (constructors) occurences:
java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource)
java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component)
java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int)
java.awt.dnd.MouseDragGestureRecognizer(java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener)


Occurences of mouseEntered

mouseEntered occurences:
java.awt.AWTEventMulticaster.mouseEntered(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseEntered(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseEntered(java.awt.event.MouseEvent)
java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseEntered(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseEntered(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseEntered(java.awt.event.MouseEvent)
javax.swing.ToolTipManager.mouseEntered(java.awt.event.MouseEvent)


Occurences of MouseEvent

MouseEvent occurences:
java.awt.event.MouseEvent
org.w3c.dom.events.MouseEvent


Occurences of MouseEvent (constructors)

MouseEvent (constructors) occurences:
java.awt.event.MouseEvent(java.awt.Component, int, long, int, int, int, int, boolean)
java.awt.event.MouseEvent(java.awt.Component, int, long, int, int, int, int, boolean, int)
java.awt.event.MouseEvent(java.awt.Component, int, long, int, int, int, int, int, int, boolean, int)


Occurences of mouseExited

mouseExited occurences:
java.awt.AWTEventMulticaster.mouseExited(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseExited(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseExited(java.awt.event.MouseEvent)
java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseExited(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseExited(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseExited(java.awt.event.MouseEvent)
javax.swing.ToolTipManager.mouseExited(java.awt.event.MouseEvent)


Occurences of MouseHandler

MouseHandler occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.MouseHandler()
javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler.MouseHandler()
javax.swing.plaf.basic.BasicTreeUI.MouseHandler.MouseHandler()


Occurences of MouseInputHandler

MouseInputHandler occurences:
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.MouseInputHandler()
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.MouseInputHandler(java.awt.Component, java.awt.Component, java.awt.event.MouseEvent)


Occurences of mouseInputListener

mouseInputListener occurences:
javax.swing.plaf.basic.mouseInputListener
javax.swing.plaf.basic.mouseInputListener
javax.swing.plaf.basic.mouseInputListener
javax.swing.plaf.basic.mouseInputListener


Occurences of mouseListener

mouseListener occurences:
javax.swing.plaf.basic.mouseListener
javax.swing.plaf.basic.mouseListener


Occurences of mouseMove

mouseMove occurences:
java.awt.Component.mouseMove(java.awt.Event, int, int)
java.awt.Robot.mouseMove(int, int)


Occurences of mouseMoved

mouseMoved occurences:
java.awt.AWTEventMulticaster.mouseMoved(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseMoved(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseMoved(java.awt.event.MouseEvent)
java.awt.event.MouseMotionAdapter.mouseMoved(java.awt.event.MouseEvent)
java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSliderUI.TrackListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseMoved(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseMoved(java.awt.event.MouseEvent)
javax.swing.text.html.HTMLEditorKit.LinkController.mouseMoved(java.awt.event.MouseEvent)
javax.swing.ToolTipManager.mouseMoved(java.awt.event.MouseEvent)


Occurences of mousePressed

mousePressed occurences:
java.awt.AWTEventMulticaster.mousePressed(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mousePressed(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mousePressed(java.awt.event.MouseEvent)
java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSliderUI.TrackListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mousePressed(java.awt.event.MouseEvent)
javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener.mousePressed(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mousePressed(java.awt.event.MouseEvent)
javax.swing.ToolTipManager.mousePressed(java.awt.event.MouseEvent)


Occurences of mouseReleased

mouseReleased occurences:
java.awt.AWTEventMulticaster.mouseReleased(java.awt.event.MouseEvent)
java.awt.dnd.MouseDragGestureRecognizer.mouseReleased(java.awt.event.MouseEvent)
java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent)
java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicListUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicMenuUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSliderUI.TrackListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicToolBarUI.DockingListener.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.mouseReleased(java.awt.event.MouseEvent)
javax.swing.text.DefaultCaret.mouseReleased(java.awt.event.MouseEvent)
javax.swing.text.html.FormView.MouseEventListener.mouseReleased(java.awt.event.MouseEvent)


Occurences of MouseWheelEvent (constructors)

MouseWheelEvent (constructors) occurences:
java.awt.event.MouseWheelEvent(java.awt.Component, int, long, int, int, int, int, boolean, int, int, int)
java.awt.event.MouseWheelEvent(java.awt.Component, int, long, int, int, int, int, int, int, boolean, int, int, int)
java.awt.event.MouseWheelEvent(java.awt.Component, int, long, int, int, int, int, int, int, boolean, int, int, int, double)


Occurences of mouseWheelMoved

mouseWheelMoved occurences:
java.awt.AWTEventMulticaster.mouseWheelMoved(java.awt.event.MouseWheelEvent)
java.awt.event.MouseAdapter.mouseWheelMoved(java.awt.event.MouseWheelEvent)
java.awt.event.MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)
javax.swing.plaf.basic.BasicScrollPaneUI.MouseWheelHandler.mouseWheelMoved(java.awt.event.MouseWheelEvent)


Occurences of move

move occurences:
java.awt.Component.move(int, int)
java.awt.Point.move(int, int)
java.awt.Rectangle.move(int, int)
java.nio.file.Files.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
java.nio.file.SecureDirectoryStream.move(java.lang.Object, java.nio.file.SecureDirectoryStream, java.lang.Object)
java.nio.file.SecureDirectoryStream.move(T, java.nio.file.SecureDirectoryStream, T)
java.nio.file.spi.FileSystemProvider.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)


Occurences of moveColumn

moveColumn occurences:
javax.swing.JTable.moveColumn(int, int)
javax.swing.table.DefaultTableColumnModel.moveColumn(int, int)
javax.swing.table.TableColumnModel.moveColumn(int, int)


Occurences of moveDot

moveDot occurences:
javax.swing.text.Caret.moveDot(int)
javax.swing.text.DefaultCaret.moveDot(int)
javax.swing.text.DefaultCaret.moveDot(int, javax.swing.text.Position.Bias)
javax.swing.text.NavigationFilter.moveDot(javax.swing.text.NavigationFilter.FilterBypass, int, javax.swing.text.Position.Bias)
javax.swing.text.NavigationFilter.FilterBypass.moveDot(int, javax.swing.text.Position.Bias)


Occurences of moveTo

moveTo occurences:
java.awt.geom.Path2D.moveTo(double, double)
java.awt.geom.Path2D.Double.moveTo(double, double)
java.awt.geom.Path2D.Float.moveTo(double, double)
java.awt.geom.Path2D.Float.moveTo(float, float)


Occurences of moveToBack

moveToBack occurences:
javax.swing.JInternalFrame.moveToBack()
javax.swing.JLayeredPane.moveToBack(java.awt.Component)


Occurences of moveToFront

moveToFront occurences:
javax.swing.JInternalFrame.moveToFront()
javax.swing.JLayeredPane.moveToFront(java.awt.Component)


Occurences of MOVE_CURSOR

MOVE_CURSOR occurences:
java.awt.MOVE_CURSOR
java.awt.MOVE_CURSOR


Occurences of MTOMFeature (constructors)

MTOMFeature (constructors) occurences:
javax.xml.ws.soap.MTOMFeature()
javax.xml.ws.soap.MTOMFeature(boolean)
javax.xml.ws.soap.MTOMFeature(boolean, int)
javax.xml.ws.soap.MTOMFeature(int)


Occurences of MulticastSocket (constructors)

MulticastSocket (constructors) occurences:
java.net.MulticastSocket()
java.net.MulticastSocket(int)
java.net.MulticastSocket(java.net.SocketAddress)


Occurences of MultiPixelPackedSampleModel (constructors)

MultiPixelPackedSampleModel (constructors) occurences:
java.awt.image.MultiPixelPackedSampleModel(int, int, int, int)
java.awt.image.MultiPixelPackedSampleModel(int, int, int, int, int, int)


Occurences of MultipleComponentProfileHolder (constructors)

MultipleComponentProfileHolder (constructors) occurences:
org.omg.IOP.MultipleComponentProfileHolder()
org.omg.IOP.MultipleComponentProfileHolder(org.omg.IOP.TaggedComponent:A)


Occurences of multipliedBy

multipliedBy occurences:
java.time.chrono.ChronoPeriod.multipliedBy(int)
java.time.Duration.multipliedBy(long)
java.time.Period.multipliedBy(int)


Occurences of multiply

multiply occurences:
java.math.BigDecimal.multiply(java.math.BigDecimal)
java.math.BigDecimal.multiply(java.math.BigDecimal, java.math.MathContext)
java.math.BigInteger.multiply(java.math.BigInteger)
javax.xml.datatype.Duration.multiply(int)
javax.xml.datatype.Duration.multiply(java.math.BigDecimal)


Occurences of multiplyExact

multiplyExact occurences:
java.lang.Math.multiplyExact(int, int)
java.lang.Math.multiplyExact(long, long)
java.lang.StrictMath.multiplyExact(int, int)
java.lang.StrictMath.multiplyExact(long, long)


Occurences of MutableCallSite (constructors)

MutableCallSite (constructors) occurences:
java.lang.invoke.MutableCallSite(java.lang.invoke.MethodHandle)
java.lang.invoke.MutableCallSite(java.lang.invoke.MethodType)


Occurences of mutatesTo

mutatesTo occurences:
java.beans.DefaultPersistenceDelegate.mutatesTo(java.lang.Object, java.lang.Object)
java.beans.PersistenceDelegate.mutatesTo(java.lang.Object, java.lang.Object)


Occurences of MXBean

MXBean occurences:
java.lang.management.MXBean
javax.management.MXBean


Occurences of MYANMAR

MYANMAR occurences:
java.awt.font.MYANMAR
java.awt.font.MYANMAR
java.lang.MYANMAR
java.lang.MYANMAR


Occurences of NAME

NAME occurences:
javax.script.NAME
javax.swing.NAME
javax.swing.text.html.NAME
javax.swing.text.html.parser.NAME


Occurences of name

name occurences:
com.sun.javadoc.Doc.name()
com.sun.javadoc.Parameter.name()
com.sun.javadoc.Tag.name()
com.sun.jdi.connect.Connector.name()
com.sun.jdi.connect.Connector.Argument.name()
com.sun.jdi.connect.spi.TransportService.name()
com.sun.jdi.connect.Transport.name()
com.sun.jdi.LocalVariable.name()
com.sun.jdi.ReferenceType.name()
com.sun.jdi.ThreadGroupReference.name()
com.sun.jdi.ThreadReference.name()
com.sun.jdi.Type.name()
com.sun.jdi.TypeComponent.name()
com.sun.jdi.VirtualMachine.name()
com.sun.tools.attach.spi.AttachProvider.name()
java.awt.name
java.awt.name
java.lang.Enum.name()
java.lang.name
java.net.ProtocolFamily.name()
java.net.SocketOption.name()
java.nio.charset.Charset.name()
java.nio.file.attribute.AclFileAttributeView.name()
java.nio.file.attribute.AttributeView.name()
java.nio.file.attribute.BasicFileAttributeView.name()
java.nio.file.attribute.DosFileAttributeView.name()
java.nio.file.attribute.FileAttribute.name()
java.nio.file.attribute.FileOwnerAttributeView.name()
java.nio.file.attribute.PosixFileAttributeView.name()
java.nio.file.attribute.UserDefinedFileAttributeView.name()
java.nio.file.FileStore.name()
java.nio.file.WatchEvent.Kind.name()
java.nio.file.WatchEvent.Modifier.name()
java.sql.name
java.util.prefs.AbstractPreferences.name()
java.util.prefs.Preferences.name()
javax.annotation.Resource.name()
javax.jws.HandlerChain.name()
javax.jws.soap.InitParam.name()
javax.jws.soap.SOAPMessageHandler.name()
javax.jws.WebParam.name()
javax.jws.WebResult.name()
javax.jws.WebService.name()
javax.management.name
javax.swing.text.html.parser.name
javax.swing.text.html.parser.name
javax.swing.text.html.parser.name
javax.swing.text.html.parser.name
javax.xml.bind.annotation.XmlAttribute.name()
javax.xml.bind.annotation.XmlElement.name()
javax.xml.bind.annotation.XmlElementDecl.name()
javax.xml.bind.annotation.XmlElementRef.name()
javax.xml.bind.annotation.XmlElementWrapper.name()
javax.xml.bind.annotation.XmlRootElement.name()
javax.xml.bind.annotation.XmlSchemaType.name()
javax.xml.bind.annotation.XmlType.name()
javax.xml.bind.name
javax.xml.ws.WebEndpoint.name()
javax.xml.ws.WebFault.name()
javax.xml.ws.WebServiceClient.name()
javax.xml.ws.WebServiceRef.name()
org.omg.CORBA.name
org.omg.CORBA.name
org.omg.CORBA.name
org.omg.CORBA.NamedValue.name()
org.omg.CORBA.Principal.name()
org.omg.CORBA.Principal.name(byte:A)
org.omg.CORBA.TypeCode.name()
org.omg.PortableInterceptor.InterceptorOperations.name()
org.omg.PortableInterceptor.ORBInitInfoPackage.name


Occurences of Name

Name occurences:
java.util.jar.Attributes.Name.Name(java.lang.String)
javax.lang.model.element.Name
javax.naming.Name
javax.xml.soap.Name


Occurences of name2type

name2type occurences:
javax.swing.text.html.parser.AttributeList.name2type(java.lang.String)
javax.swing.text.html.parser.Element.name2type(java.lang.String)
javax.swing.text.html.parser.Entity.name2type(java.lang.String)


Occurences of NameAlreadyBoundException (constructors)

NameAlreadyBoundException (constructors) occurences:
javax.naming.NameAlreadyBoundException()
javax.naming.NameAlreadyBoundException(java.lang.String)


Occurences of NameAttribute

NameAttribute occurences:
javax.swing.text.NameAttribute
javax.swing.text.NameAttribute


Occurences of NameCallback (constructors)

NameCallback (constructors) occurences:
javax.security.auth.callback.NameCallback(java.lang.String)
javax.security.auth.callback.NameCallback(java.lang.String, java.lang.String)


Occurences of NameClassPair (constructors)

NameClassPair (constructors) occurences:
javax.naming.NameClassPair(java.lang.String, java.lang.String)
javax.naming.NameClassPair(java.lang.String, java.lang.String, boolean)


Occurences of NameComponent (constructors)

NameComponent (constructors) occurences:
org.omg.CosNaming.NameComponent()
org.omg.CosNaming.NameComponent(java.lang.String, java.lang.String)


Occurences of NameComponentHolder (constructors)

NameComponentHolder (constructors) occurences:
org.omg.CosNaming.NameComponentHolder()
org.omg.CosNaming.NameComponentHolder(org.omg.CosNaming.NameComponent)


Occurences of NamedStyle

NamedStyle occurences:
javax.swing.text.StyleContext.NamedStyle.NamedStyle()
javax.swing.text.StyleContext.NamedStyle.NamedStyle(java.lang.String, javax.swing.text.Style)
javax.swing.text.StyleContext.NamedStyle.NamedStyle(javax.swing.text.Style)


Occurences of NameDynAnyPair (constructors)

NameDynAnyPair (constructors) occurences:
org.omg.DynamicAny.NameDynAnyPair()
org.omg.DynamicAny.NameDynAnyPair(java.lang.String, org.omg.DynamicAny.DynAny)


Occurences of NameHolder (constructors)

NameHolder (constructors) occurences:
org.omg.CosNaming.NameHolder()
org.omg.CosNaming.NameHolder(org.omg.CosNaming.NameComponent:A)


Occurences of NameNotFoundException (constructors)

NameNotFoundException (constructors) occurences:
javax.naming.NameNotFoundException()
javax.naming.NameNotFoundException(java.lang.String)


Occurences of names

names occurences:
java.nio.charset.names
javax.imageio.spi.names


Occurences of namespace

namespace occurences:
compact2.javax.xml.namespace
compact3.javax.xml.namespace
javax.xml.bind.annotation.XmlAttribute.namespace()
javax.xml.bind.annotation.XmlElement.namespace()
javax.xml.bind.annotation.XmlElementDecl.namespace()
javax.xml.bind.annotation.XmlElementRef.namespace()
javax.xml.bind.annotation.XmlElementWrapper.namespace()
javax.xml.bind.annotation.XmlRootElement.namespace()
javax.xml.bind.annotation.XmlSchema.namespace()
javax.xml.bind.annotation.XmlSchemaType.namespace()
javax.xml.bind.annotation.XmlType.namespace()
javax.xml.namespace


Occurences of NameValuePair

NameValuePair occurences:
org.omg.CORBA.NameValuePair
org.omg.DynamicAny.NameValuePair


Occurences of NameValuePair (constructors)

NameValuePair (constructors) occurences:
org.omg.CORBA.NameValuePair()
org.omg.CORBA.NameValuePair(java.lang.String, org.omg.CORBA.Any)
org.omg.DynamicAny.NameValuePair()
org.omg.DynamicAny.NameValuePair(java.lang.String, org.omg.CORBA.Any)


Occurences of NameValuePairHelper

NameValuePairHelper occurences:
org.omg.CORBA.NameValuePairHelper
org.omg.DynamicAny.NameValuePairHelper


Occurences of NameValuePairHelper (constructors)

NameValuePairHelper (constructors) occurences:
org.omg.CORBA.NameValuePairHelper()
org.omg.DynamicAny.NameValuePairHelper()


Occurences of naming

naming occurences:
compact3.javax.naming
javax.naming


Occurences of NamingContextExtHolder (constructors)

NamingContextExtHolder (constructors) occurences:
org.omg.CosNaming.NamingContextExtHolder()
org.omg.CosNaming.NamingContextExtHolder(org.omg.CosNaming.NamingContextExt)


Occurences of NamingContextHolder (constructors)

NamingContextHolder (constructors) occurences:
org.omg.CosNaming.NamingContextHolder()
org.omg.CosNaming.NamingContextHolder(org.omg.CosNaming.NamingContext)


Occurences of NamingException (constructors)

NamingException (constructors) occurences:
javax.naming.NamingException()
javax.naming.NamingException(java.lang.String)


Occurences of NamingSecurityException (constructors)

NamingSecurityException (constructors) occurences:
javax.naming.NamingSecurityException()
javax.naming.NamingSecurityException(java.lang.String)


Occurences of NaN

NaN occurences:
java.lang.NaN
java.lang.NaN


Occurences of narrow

narrow occurences:
javax.rmi.CORBA.PortableRemoteObjectDelegate.narrow(java.lang.Object, java.lang.Class)
javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
org.omg.CORBA.CurrentHelper.narrow(org.omg.CORBA.Object)
org.omg.CORBA.IDLTypeHelper.narrow(org.omg.CORBA.Object)
org.omg.CORBA.PolicyHelper.narrow(org.omg.CORBA.Object)
org.omg.CosNaming.BindingIteratorHelper.narrow(org.omg.CORBA.Object)
org.omg.CosNaming.NamingContextExtHelper.narrow(org.omg.CORBA.Object)
org.omg.CosNaming.NamingContextHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynAnyFactoryHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynAnyHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynArrayHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynEnumHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynFixedHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynSequenceHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynStructHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynUnionHelper.narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynValueHelper.narrow(org.omg.CORBA.Object)
org.omg.IOP.CodecFactoryHelper.narrow(org.omg.CORBA.Object)
org.omg.PortableInterceptor.CurrentHelper.narrow(org.omg.CORBA.Object)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.narrow(org.omg.CORBA.Object)
org.omg.PortableServer.CurrentHelper.narrow(org.omg.CORBA.Object)
org.omg.PortableServer.POAHelper.narrow(org.omg.CORBA.Object)
org.omg.PortableServer.ServantActivatorHelper.narrow(org.omg.CORBA.Object)
org.omg.PortableServer.ServantLocatorHelper.narrow(org.omg.CORBA.Object)


Occurences of NARROW_STANDALONE

NARROW_STANDALONE occurences:
java.time.format.NARROW_STANDALONE
java.util.NARROW_STANDALONE


Occurences of NATIVE

NATIVE occurences:
java.awt.NATIVE
java.lang.reflect.NATIVE
javax.lang.model.element.NATIVE
javax.print.attribute.standard.NATIVE


Occurences of native2ascii

native2ascii occurences:
native2ascii
native2ascii


Occurences of NativeMethodException (constructors)

NativeMethodException (constructors) occurences:
com.sun.jdi.NativeMethodException()
com.sun.jdi.NativeMethodException(java.lang.String)


Occurences of navigableKeySet

navigableKeySet occurences:
java.util.concurrent.ConcurrentNavigableMap.navigableKeySet()
java.util.concurrent.ConcurrentSkipListMap.navigableKeySet()
java.util.NavigableMap.navigableKeySet()
java.util.TreeMap.navigableKeySet()


Occurences of NA_10X13_ENVELOPE

NA_10X13_ENVELOPE occurences:
java.awt.NA_10X13_ENVELOPE
javax.print.attribute.standard.NA_10X13_ENVELOPE


Occurences of NA_10X14_ENVELOPE

NA_10X14_ENVELOPE occurences:
java.awt.NA_10X14_ENVELOPE
javax.print.attribute.standard.NA_10X14_ENVELOPE


Occurences of NA_10X15_ENVELOPE

NA_10X15_ENVELOPE occurences:
java.awt.NA_10X15_ENVELOPE
javax.print.attribute.standard.NA_10X15_ENVELOPE
javax.print.attribute.standard.NA_10X15_ENVELOPE


Occurences of NA_5X7

NA_5X7 occurences:
javax.print.attribute.standard.NA_5X7
javax.print.attribute.standard.NA_5X7


Occurences of NA_6X9_ENVELOPE

NA_6X9_ENVELOPE occurences:
java.awt.NA_6X9_ENVELOPE
javax.print.attribute.standard.NA_6X9_ENVELOPE
javax.print.attribute.standard.NA_6X9_ENVELOPE


Occurences of NA_7X9_ENVELOPE

NA_7X9_ENVELOPE occurences:
java.awt.NA_7X9_ENVELOPE
javax.print.attribute.standard.NA_7X9_ENVELOPE
javax.print.attribute.standard.NA_7X9_ENVELOPE


Occurences of NA_8X10

NA_8X10 occurences:
javax.print.attribute.standard.NA_8X10
javax.print.attribute.standard.NA_8X10


Occurences of NA_9X11_ENVELOPE

NA_9X11_ENVELOPE occurences:
java.awt.NA_9X11_ENVELOPE
javax.print.attribute.standard.NA_9X11_ENVELOPE


Occurences of NA_9X12_ENVELOPE

NA_9X12_ENVELOPE occurences:
java.awt.NA_9X12_ENVELOPE
javax.print.attribute.standard.NA_9X12_ENVELOPE


Occurences of NA_LEGAL

NA_LEGAL occurences:
java.awt.NA_LEGAL
javax.print.attribute.standard.NA_LEGAL


Occurences of NA_LETTER

NA_LETTER occurences:
java.awt.NA_LETTER
javax.print.attribute.standard.NA_LETTER


Occurences of NA_NUMBER_10_ENVELOPE

NA_NUMBER_10_ENVELOPE occurences:
java.awt.NA_NUMBER_10_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_10_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_10_ENVELOPE


Occurences of NA_NUMBER_11_ENVELOPE

NA_NUMBER_11_ENVELOPE occurences:
java.awt.NA_NUMBER_11_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_11_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_11_ENVELOPE


Occurences of NA_NUMBER_12_ENVELOPE

NA_NUMBER_12_ENVELOPE occurences:
java.awt.NA_NUMBER_12_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_12_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_12_ENVELOPE


Occurences of NA_NUMBER_14_ENVELOPE

NA_NUMBER_14_ENVELOPE occurences:
java.awt.NA_NUMBER_14_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_14_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_14_ENVELOPE


Occurences of NA_NUMBER_9_ENVELOPE

NA_NUMBER_9_ENVELOPE occurences:
java.awt.NA_NUMBER_9_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_9_ENVELOPE
javax.print.attribute.standard.NA_NUMBER_9_ENVELOPE


Occurences of NCHAR

NCHAR occurences:
java.sql.NCHAR
java.sql.NCHAR


Occurences of NCLOB

NCLOB occurences:
java.sql.NCLOB
java.sql.NCLOB


Occurences of nCopies

nCopies occurences:
java.util.Collections.nCopies(int, java.lang.Object)
java.util.Collections.nCopies(int, T)


Occurences of needsCacheFile

needsCacheFile occurences:
javax.imageio.spi.ImageInputStreamSpi.needsCacheFile()
javax.imageio.spi.ImageOutputStreamSpi.needsCacheFile()


Occurences of needsGui

needsGui occurences:
java.beans.beancontext.BeanContextSupport.needsGui()
java.beans.Visibility.needsGui()


Occurences of needsInput

needsInput occurences:
java.util.zip.Deflater.needsInput()
java.util.zip.Inflater.needsInput()


Occurences of negate

negate occurences:
java.math.BigDecimal.negate()
java.math.BigDecimal.negate(java.math.MathContext)
java.math.BigInteger.negate()
java.util.function.BiPredicate.negate()
java.util.function.DoublePredicate.negate()
java.util.function.IntPredicate.negate()
java.util.function.LongPredicate.negate()
java.util.function.Predicate.negate()
javax.xml.datatype.Duration.negate()


Occurences of negated

negated occurences:
java.time.chrono.ChronoPeriod.negated()
java.time.Duration.negated()
java.time.Period.negated()


Occurences of negateExact

negateExact occurences:
java.lang.Math.negateExact(int)
java.lang.Math.negateExact(long)


Occurences of NegativeArraySizeException (constructors)

NegativeArraySizeException (constructors) occurences:
java.lang.NegativeArraySizeException()
java.lang.NegativeArraySizeException(java.lang.String)


Occurences of NEGATIVE_INFINITY

NEGATIVE_INFINITY occurences:
java.lang.NEGATIVE_INFINITY
java.lang.NEGATIVE_INFINITY


Occurences of negotiate

negotiate occurences:
javax.naming.ldap.StartTlsResponse.negotiate()
javax.naming.ldap.StartTlsResponse.negotiate(javax.net.ssl.SSLSocketFactory)


Occurences of net

net occurences:
compact1.java.net
compact1.javax.net
compact2.java.net
compact2.javax.net
compact3.java.net
compact3.javax.net
java.net
javax.net


Occurences of NetPermission (constructors)

NetPermission (constructors) occurences:
java.net.NetPermission(java.lang.String)
java.net.NetPermission(java.lang.String, java.lang.String)


Occurences of Networking Features

Networking Features occurences:
Networking Features
Networking Features


Occurences of Networking Properties

Networking Properties occurences:
Networking Properties
Networking Properties


Occurences of NEW

NEW occurences:
com.sun.source.tree.NEW
java.lang.NEW


Occurences of newBufferedReader

newBufferedReader occurences:
java.nio.file.Files.newBufferedReader(java.nio.file.Path)
java.nio.file.Files.newBufferedReader(java.nio.file.Path, java.nio.charset.Charset)


Occurences of newBufferedWriter

newBufferedWriter occurences:
java.nio.file.Files.newBufferedWriter(java.nio.file.Path, java.nio.charset.Charset, java.nio.file.OpenOption...)
java.nio.file.Files.newBufferedWriter(java.nio.file.Path, java.nio.file.OpenOption...)


Occurences of newBuilder

newBuilder occurences:
java.nio.file.attribute.AclEntry.newBuilder()
java.nio.file.attribute.AclEntry.newBuilder(java.nio.file.attribute.AclEntry)


Occurences of newByteChannel

newByteChannel occurences:
java.nio.file.Files.newByteChannel(java.nio.file.Path, java.nio.file.OpenOption...)
java.nio.file.Files.newByteChannel(java.nio.file.Path, java.util.Set, java.nio.file.attribute.FileAttribute...)
java.nio.file.SecureDirectoryStream.newByteChannel(java.lang.Object, java.util.Set, java.nio.file.attribute.FileAttribute:A)
java.nio.file.SecureDirectoryStream.newByteChannel(T, java.util.Set, java.nio.file.attribute.FileAttribute...)
java.nio.file.spi.FileSystemProvider.newByteChannel(java.nio.file.Path, java.util.Set, java.nio.file.attribute.FileAttribute...)


Occurences of newCachedThreadPool

newCachedThreadPool occurences:
java.util.concurrent.Executors.newCachedThreadPool()
java.util.concurrent.Executors.newCachedThreadPool(java.util.concurrent.ThreadFactory)


Occurences of newCanonicalizationMethod

newCanonicalizationMethod occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newCanonicalizationMethod(java.lang.String, javax.xml.crypto.dsig.spec.C14NMethodParameterSpec)
javax.xml.crypto.dsig.XMLSignatureFactory.newCanonicalizationMethod(java.lang.String, javax.xml.crypto.XMLStructure)


Occurences of newChannel

newChannel occurences:
java.nio.channels.Channels.newChannel(java.io.InputStream)
java.nio.channels.Channels.newChannel(java.io.OutputStream)


Occurences of newClient

newClient occurences:
javax.management.remote.rmi.RMIServer.newClient(java.lang.Object)
javax.management.remote.rmi.RMIServerImpl.newClient(java.lang.Object)
javax.management.remote.rmi.RMIServerImpl_Stub.newClient(java.lang.Object)


Occurences of newCondition

newCondition occurences:
java.util.concurrent.locks.Lock.newCondition()
java.util.concurrent.locks.ReentrantLock.newCondition()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.newCondition()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.newCondition()


Occurences of newDirectoryStream

newDirectoryStream occurences:
java.nio.file.Files.newDirectoryStream(java.nio.file.Path)
java.nio.file.Files.newDirectoryStream(java.nio.file.Path, java.lang.String)
java.nio.file.Files.newDirectoryStream(java.nio.file.Path, java.nio.file.DirectoryStream.Filter)
java.nio.file.SecureDirectoryStream.newDirectoryStream(java.lang.Object, java.nio.file.LinkOption:A)
java.nio.file.SecureDirectoryStream.newDirectoryStream(T, java.nio.file.LinkOption...)
java.nio.file.spi.FileSystemProvider.newDirectoryStream(java.nio.file.Path, java.nio.file.DirectoryStream.Filter)


Occurences of newDuration

newDuration occurences:
javax.xml.datatype.DatatypeFactory.newDuration(boolean, int, int, int, int, int, int)
javax.xml.datatype.DatatypeFactory.newDuration(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigDecimal)
javax.xml.datatype.DatatypeFactory.newDuration(java.lang.String)
javax.xml.datatype.DatatypeFactory.newDuration(long)


Occurences of newDurationDayTime

newDurationDayTime occurences:
javax.xml.datatype.DatatypeFactory.newDurationDayTime(boolean, int, int, int, int)
javax.xml.datatype.DatatypeFactory.newDurationDayTime(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger)
javax.xml.datatype.DatatypeFactory.newDurationDayTime(java.lang.String)
javax.xml.datatype.DatatypeFactory.newDurationDayTime(long)


Occurences of newDurationYearMonth

newDurationYearMonth occurences:
javax.xml.datatype.DatatypeFactory.newDurationYearMonth(boolean, int, int)
javax.xml.datatype.DatatypeFactory.newDurationYearMonth(boolean, java.math.BigInteger, java.math.BigInteger)
javax.xml.datatype.DatatypeFactory.newDurationYearMonth(java.lang.String)
javax.xml.datatype.DatatypeFactory.newDurationYearMonth(long)


Occurences of newFactory

newFactory occurences:
javax.sql.rowset.RowSetProvider.newFactory()
javax.sql.rowset.RowSetProvider.newFactory(java.lang.String, java.lang.ClassLoader)
javax.xml.stream.XMLEventFactory.newFactory()
javax.xml.stream.XMLEventFactory.newFactory(java.lang.String, java.lang.ClassLoader)
javax.xml.stream.XMLInputFactory.newFactory()
javax.xml.stream.XMLInputFactory.newFactory(java.lang.String, java.lang.ClassLoader)
javax.xml.stream.XMLOutputFactory.newFactory()
javax.xml.stream.XMLOutputFactory.newFactory(java.lang.String, java.lang.ClassLoader)
javax.xml.validation.SchemaFactoryLoader.newFactory(java.lang.String)


Occurences of newFileSystem

newFileSystem occurences:
java.nio.file.FileSystems.newFileSystem(java.net.URI, java.util.Map)
java.nio.file.FileSystems.newFileSystem(java.net.URI, java.util.Map, java.lang.ClassLoader)
java.nio.file.FileSystems.newFileSystem(java.nio.file.Path, java.lang.ClassLoader)
java.nio.file.spi.FileSystemProvider.newFileSystem(java.net.URI, java.util.Map)
java.nio.file.spi.FileSystemProvider.newFileSystem(java.nio.file.Path, java.util.Map)


Occurences of newFixedThreadPool

newFixedThreadPool occurences:
java.util.concurrent.Executors.newFixedThreadPool(int)
java.util.concurrent.Executors.newFixedThreadPool(int, java.util.concurrent.ThreadFactory)


Occurences of newInputStream

newInputStream occurences:
java.nio.channels.Channels.newInputStream(java.nio.channels.AsynchronousByteChannel)
java.nio.channels.Channels.newInputStream(java.nio.channels.ReadableByteChannel)
java.nio.file.Files.newInputStream(java.nio.file.Path, java.nio.file.OpenOption...)
java.nio.file.spi.FileSystemProvider.newInputStream(java.nio.file.Path, java.nio.file.OpenOption...)


Occurences of newInstance

newInstance occurences:
com.sun.jdi.ArrayType.newInstance(int)
com.sun.jdi.ClassType.newInstance(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List, int)
java.lang.Class.newInstance()
java.lang.reflect.Array.newInstance(java.lang.Class, int)
java.lang.reflect.Array.newInstance(java.lang.Class, int...)
java.lang.reflect.Constructor.newInstance(java.lang.Object...)
java.net.URLClassLoader.newInstance(java.net.URL:A)
java.net.URLClassLoader.newInstance(java.net.URL:A, java.lang.ClassLoader)
java.rmi.activation.ActivationGroup_Stub.newInstance(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)
java.rmi.activation.ActivationInstantiator.newInstance(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)
java.security.KeyStore.Builder.newInstance(java.lang.String, java.security.Provider, java.io.File, java.security.KeyStore.ProtectionParameter)
java.security.KeyStore.Builder.newInstance(java.lang.String, java.security.Provider, java.security.KeyStore.ProtectionParameter)
java.security.KeyStore.Builder.newInstance(java.security.KeyStore, java.security.KeyStore.ProtectionParameter)
java.security.Provider.Service.newInstance(java.lang.Object)
javax.naming.ldap.InitialLdapContext.newInstance(javax.naming.ldap.Control:A)
javax.naming.ldap.LdapContext.newInstance(javax.naming.ldap.Control:A)
javax.xml.bind.JAXBContext.newInstance(java.lang.Class...)
javax.xml.bind.JAXBContext.newInstance(java.lang.Class:A, java.util.Map)
javax.xml.bind.JAXBContext.newInstance(java.lang.String)
javax.xml.bind.JAXBContext.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.bind.JAXBContext.newInstance(java.lang.String, java.lang.ClassLoader, java.util.Map)
javax.xml.datatype.DatatypeFactory.newInstance()
javax.xml.datatype.DatatypeFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.parsers.DocumentBuilderFactory.newInstance()
javax.xml.parsers.DocumentBuilderFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.parsers.SAXParserFactory.newInstance()
javax.xml.parsers.SAXParserFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.soap.MessageFactory.newInstance()
javax.xml.soap.MessageFactory.newInstance(java.lang.String)
javax.xml.soap.SOAPConnectionFactory.newInstance()
javax.xml.soap.SOAPElementFactory.newInstance()
javax.xml.soap.SOAPFactory.newInstance()
javax.xml.soap.SOAPFactory.newInstance(java.lang.String)
javax.xml.stream.util.XMLEventAllocator.newInstance()
javax.xml.stream.XMLEventFactory.newInstance()
javax.xml.stream.XMLEventFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.stream.XMLInputFactory.newInstance()
javax.xml.stream.XMLInputFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.stream.XMLOutputFactory.newInstance()
javax.xml.stream.XMLOutputFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.transform.TransformerFactory.newInstance()
javax.xml.transform.TransformerFactory.newInstance(java.lang.String, java.lang.ClassLoader)
javax.xml.validation.SchemaFactory.newInstance(java.lang.String)
javax.xml.validation.SchemaFactory.newInstance(java.lang.String, java.lang.String, java.lang.ClassLoader)
javax.xml.xpath.XPathFactory.newInstance()
javax.xml.xpath.XPathFactory.newInstance(java.lang.String)
javax.xml.xpath.XPathFactory.newInstance(java.lang.String, java.lang.String, java.lang.ClassLoader)
org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance()


Occurences of newJMXConnector

newJMXConnector occurences:
javax.management.remote.JMXConnectorFactory.newJMXConnector(javax.management.remote.JMXServiceURL, java.util.Map)
javax.management.remote.JMXConnectorProvider.newJMXConnector(javax.management.remote.JMXServiceURL, java.util.Map)


Occurences of newJMXConnectorServer

newJMXConnectorServer occurences:
javax.management.remote.JMXConnectorServerFactory.newJMXConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.MBeanServer)
javax.management.remote.JMXConnectorServerProvider.newJMXConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.MBeanServer)


Occurences of newKeyInfo

newKeyInfo occurences:
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newKeyInfo(java.util.List)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newKeyInfo(java.util.List, java.lang.String)


Occurences of newKeySet

newKeySet occurences:
java.util.concurrent.ConcurrentHashMap.newKeySet()
java.util.concurrent.ConcurrentHashMap.newKeySet(int)


Occurences of newManifest

newManifest occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newManifest(java.util.List)
javax.xml.crypto.dsig.XMLSignatureFactory.newManifest(java.util.List, java.lang.String)


Occurences of newMBeanProxy

newMBeanProxy occurences:
javax.management.JMX.newMBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class)
javax.management.JMX.newMBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class, boolean)


Occurences of newMBeanServer

newMBeanServer occurences:
javax.management.MBeanServerBuilder.newMBeanServer(java.lang.String, javax.management.MBeanServer, javax.management.MBeanServerDelegate)
javax.management.MBeanServerFactory.newMBeanServer()
javax.management.MBeanServerFactory.newMBeanServer(java.lang.String)


Occurences of newMXBeanProxy

newMXBeanProxy occurences:
javax.management.JMX.newMXBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class)
javax.management.JMX.newMXBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class, boolean)


Occurences of newOutputStream

newOutputStream occurences:
java.nio.channels.Channels.newOutputStream(java.nio.channels.AsynchronousByteChannel)
java.nio.channels.Channels.newOutputStream(java.nio.channels.WritableByteChannel)
java.nio.file.Files.newOutputStream(java.nio.file.Path, java.nio.file.OpenOption...)
java.nio.file.spi.FileSystemProvider.newOutputStream(java.nio.file.Path, java.nio.file.OpenOption...)


Occurences of newPermissionCollection

newPermissionCollection occurences:
java.io.FilePermission.newPermissionCollection()
java.net.SocketPermission.newPermissionCollection()
java.security.AllPermission.newPermissionCollection()
java.security.BasicPermission.newPermissionCollection()
java.security.Permission.newPermissionCollection()
java.security.UnresolvedPermission.newPermissionCollection()
java.util.PropertyPermission.newPermissionCollection()
javax.management.MBeanServerPermission.newPermissionCollection()
javax.security.auth.kerberos.DelegationPermission.newPermissionCollection()
javax.security.auth.kerberos.ServicePermission.newPermissionCollection()
javax.security.auth.PrivateCredentialPermission.newPermissionCollection()


Occurences of newPGPData

newPGPData occurences:
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newPGPData(byte:A)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newPGPData(byte:A, byte:A, java.util.List)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newPGPData(byte:A, java.util.List)


Occurences of newPixels

newPixels occurences:
java.awt.image.MemoryImageSource.newPixels()
java.awt.image.MemoryImageSource.newPixels(byte:A, java.awt.image.ColorModel, int, int)
java.awt.image.MemoryImageSource.newPixels(int, int, int, int)
java.awt.image.MemoryImageSource.newPixels(int, int, int, int, boolean)
java.awt.image.MemoryImageSource.newPixels(int:A, java.awt.image.ColorModel, int, int)


Occurences of newProxyInstance

newProxyInstance occurences:
java.lang.reflect.Proxy.newProxyInstance(java.lang.ClassLoader, java.lang.Class:A, java.lang.reflect.InvocationHandler)
javax.management.MBeanServerInvocationHandler.newProxyInstance(javax.management.MBeanServerConnection, javax.management.ObjectName, java.lang.Class, boolean)


Occurences of newReader

newReader occurences:
java.nio.channels.Channels.newReader(java.nio.channels.ReadableByteChannel, java.lang.String)
java.nio.channels.Channels.newReader(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int)


Occurences of newReference

newReference occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newReference(java.lang.String, javax.xml.crypto.dsig.DigestMethod)
javax.xml.crypto.dsig.XMLSignatureFactory.newReference(java.lang.String, javax.xml.crypto.dsig.DigestMethod, java.util.List, java.lang.String, java.lang.String)
javax.xml.crypto.dsig.XMLSignatureFactory.newReference(java.lang.String, javax.xml.crypto.dsig.DigestMethod, java.util.List, java.lang.String, java.lang.String, byte:A)
javax.xml.crypto.dsig.XMLSignatureFactory.newReference(java.lang.String, javax.xml.crypto.dsig.DigestMethod, java.util.List, javax.xml.crypto.Data, java.util.List, java.lang.String, java.lang.String)


Occurences of newRetrievalMethod

newRetrievalMethod occurences:
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newRetrievalMethod(java.lang.String)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactory.newRetrievalMethod(java.lang.String, java.lang.String, java.util.List)


Occurences of newScheduledThreadPool

newScheduledThreadPool occurences:
java.util.concurrent.Executors.newScheduledThreadPool(int)
java.util.concurrent.Executors.newScheduledThreadPool(int, java.util.concurrent.ThreadFactory)


Occurences of newSchema

newSchema occurences:
javax.xml.validation.SchemaFactory.newSchema()
javax.xml.validation.SchemaFactory.newSchema(java.io.File)
javax.xml.validation.SchemaFactory.newSchema(java.net.URL)
javax.xml.validation.SchemaFactory.newSchema(javax.xml.transform.Source)
javax.xml.validation.SchemaFactory.newSchema(javax.xml.transform.Source:A)


Occurences of newSignedInfo

newSignedInfo occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod, javax.xml.crypto.dsig.SignatureMethod, java.util.List)
javax.xml.crypto.dsig.XMLSignatureFactory.newSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod, javax.xml.crypto.dsig.SignatureMethod, java.util.List, java.lang.String)


Occurences of newSingleThreadExecutor

newSingleThreadExecutor occurences:
java.util.concurrent.Executors.newSingleThreadExecutor()
java.util.concurrent.Executors.newSingleThreadExecutor(java.util.concurrent.ThreadFactory)


Occurences of newSingleThreadScheduledExecutor

newSingleThreadScheduledExecutor occurences:
java.util.concurrent.Executors.newSingleThreadScheduledExecutor()
java.util.concurrent.Executors.newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory)


Occurences of newTaskFor

newTaskFor occurences:
java.util.concurrent.AbstractExecutorService.newTaskFor(java.lang.Runnable, java.lang.Object)
java.util.concurrent.AbstractExecutorService.newTaskFor(java.lang.Runnable, T)
java.util.concurrent.AbstractExecutorService.newTaskFor(java.util.concurrent.Callable)
java.util.concurrent.ForkJoinPool.newTaskFor(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ForkJoinPool.newTaskFor(java.lang.Runnable, T)
java.util.concurrent.ForkJoinPool.newTaskFor(java.util.concurrent.Callable)


Occurences of newThread

newThread occurences:
java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory.newThread(java.util.concurrent.ForkJoinPool)
java.util.concurrent.ThreadFactory.newThread(java.lang.Runnable)


Occurences of newTransform

newTransform occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newTransform(java.lang.String, javax.xml.crypto.dsig.spec.TransformParameterSpec)
javax.xml.crypto.dsig.XMLSignatureFactory.newTransform(java.lang.String, javax.xml.crypto.XMLStructure)


Occurences of newTransformer

newTransformer occurences:
javax.xml.transform.Templates.newTransformer()
javax.xml.transform.TransformerFactory.newTransformer()
javax.xml.transform.TransformerFactory.newTransformer(javax.xml.transform.Source)


Occurences of newTransformerHandler

newTransformerHandler occurences:
javax.xml.transform.sax.SAXTransformerFactory.newTransformerHandler()
javax.xml.transform.sax.SAXTransformerFactory.newTransformerHandler(javax.xml.transform.Source)
javax.xml.transform.sax.SAXTransformerFactory.newTransformerHandler(javax.xml.transform.Templates)


Occurences of newUpdater

newUpdater occurences:
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(java.lang.Class, java.lang.String)
java.util.concurrent.atomic.AtomicLongFieldUpdater.newUpdater(java.lang.Class, java.lang.String)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(java.lang.Class, java.lang.Class, java.lang.String)


Occurences of newWorkStealingPool

newWorkStealingPool occurences:
java.util.concurrent.Executors.newWorkStealingPool()
java.util.concurrent.Executors.newWorkStealingPool(int)


Occurences of newWriter

newWriter occurences:
java.nio.channels.Channels.newWriter(java.nio.channels.WritableByteChannel, java.lang.String)
java.nio.channels.Channels.newWriter(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int)


Occurences of newXMLFilter

newXMLFilter occurences:
javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter(javax.xml.transform.Source)
javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter(javax.xml.transform.Templates)


Occurences of newXMLGregorianCalendar

newXMLGregorianCalendar occurences:
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar()
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar(int, int, int, int, int, int, int, int)
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar(java.lang.String)
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar(java.math.BigInteger, int, int, int, int, int, java.math.BigDecimal, int)
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar(java.util.GregorianCalendar)


Occurences of newXMLGregorianCalendarTime

newXMLGregorianCalendarTime occurences:
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendarTime(int, int, int, int)
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendarTime(int, int, int, int, int)
javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendarTime(int, int, int, java.math.BigDecimal, int)


Occurences of newXMLSignature

newXMLSignature occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.newXMLSignature(javax.xml.crypto.dsig.SignedInfo, javax.xml.crypto.dsig.keyinfo.KeyInfo)
javax.xml.crypto.dsig.XMLSignatureFactory.newXMLSignature(javax.xml.crypto.dsig.SignedInfo, javax.xml.crypto.dsig.keyinfo.KeyInfo, java.util.List, java.lang.String, java.lang.String)


Occurences of new_context

new_context occurences:
org.omg.CosNaming.NamingContextOperations.new_context()
org.omg.CosNaming._NamingContextExtStub.new_context()
org.omg.CosNaming._NamingContextStub.new_context()


Occurences of NEW_TAI_LUE

NEW_TAI_LUE occurences:
java.awt.font.NEW_TAI_LUE
java.lang.NEW_TAI_LUE
java.lang.NEW_TAI_LUE


Occurences of next

next occurences:
java.awt.CardLayout.next(java.awt.Container)
java.awt.geom.FlatteningPathIterator.next()
java.awt.geom.PathIterator.next()
java.beans.beancontext.BeanContextSupport.BCSIterator.next()
java.security.SecureRandom.next(int)
java.sql.ResultSet.next()
java.text.BreakIterator.next()
java.text.BreakIterator.next(int)
java.text.CharacterIterator.next()
java.text.CollationElementIterator.next()
java.text.StringCharacterIterator.next()
java.time.temporal.TemporalAdjusters.next(java.time.DayOfWeek)
java.util.concurrent.ThreadLocalRandom.next(int)
java.util.Iterator.next()
java.util.ListIterator.next()
java.util.PrimitiveIterator.OfDouble.next()
java.util.PrimitiveIterator.OfInt.next()
java.util.PrimitiveIterator.OfLong.next()
java.util.Random.next(int)
java.util.Scanner.next()
java.util.Scanner.next(java.lang.String)
java.util.Scanner.next(java.util.regex.Pattern)
javax.naming.NamingEnumeration.next()
javax.print.attribute.SetOfIntegerSyntax.next(int)
javax.print.MultiDoc.next()
javax.swing.text.ElementIterator.next()
javax.swing.text.html.HTMLDocument.Iterator.next()
javax.swing.text.html.parser.next
javax.swing.text.html.parser.next
javax.swing.text.Segment.next()
javax.xml.stream.util.EventReaderDelegate.next()
javax.xml.stream.util.StreamReaderDelegate.next()
javax.xml.stream.XMLStreamReader.next()
org.omg.CORBA.DynAny.next()
org.omg.DynamicAny.DynAnyOperations.next()
org.omg.DynamicAny._DynAnyStub.next()
org.omg.DynamicAny._DynArrayStub.next()
org.omg.DynamicAny._DynEnumStub.next()
org.omg.DynamicAny._DynFixedStub.next()
org.omg.DynamicAny._DynSequenceStub.next()
org.omg.DynamicAny._DynStructStub.next()
org.omg.DynamicAny._DynUnionStub.next()
org.omg.DynamicAny._DynValueStub.next()


Occurences of nextAfter

nextAfter occurences:
java.lang.Math.nextAfter(double, double)
java.lang.Math.nextAfter(float, double)
java.lang.StrictMath.nextAfter(double, double)
java.lang.StrictMath.nextAfter(float, double)


Occurences of nextBigInteger

nextBigInteger occurences:
java.util.Scanner.nextBigInteger()
java.util.Scanner.nextBigInteger(int)


Occurences of nextBoolean

nextBoolean occurences:
java.util.concurrent.ThreadLocalRandom.nextBoolean()
java.util.Random.nextBoolean()
java.util.Scanner.nextBoolean()
java.util.SplittableRandom.nextBoolean()


Occurences of nextByte

nextByte occurences:
java.util.Scanner.nextByte()
java.util.Scanner.nextByte(int)


Occurences of nextBytes

nextBytes occurences:
java.security.SecureRandom.nextBytes(byte:A)
java.util.Random.nextBytes(byte:A)


Occurences of nextDouble

nextDouble occurences:
java.text.ChoiceFormat.nextDouble(double)
java.text.ChoiceFormat.nextDouble(double, boolean)
java.util.concurrent.ThreadLocalRandom.nextDouble()
java.util.concurrent.ThreadLocalRandom.nextDouble(double)
java.util.concurrent.ThreadLocalRandom.nextDouble(double, double)
java.util.PrimitiveIterator.OfDouble.nextDouble()
java.util.Random.nextDouble()
java.util.Scanner.nextDouble()
java.util.SplittableRandom.nextDouble()
java.util.SplittableRandom.nextDouble(double)
java.util.SplittableRandom.nextDouble(double, double)


Occurences of nextDown

nextDown occurences:
java.lang.Math.nextDown(double)
java.lang.Math.nextDown(float)
java.lang.StrictMath.nextDown(double)
java.lang.StrictMath.nextDown(float)


Occurences of nextElement

nextElement occurences:
java.util.Enumeration.nextElement()
java.util.StringTokenizer.nextElement()


Occurences of nextEvent

nextEvent occurences:
com.sun.jdi.event.EventIterator.nextEvent()
javax.xml.stream.util.EventReaderDelegate.nextEvent()
javax.xml.stream.XMLEventReader.nextEvent()


Occurences of nextFloat

nextFloat occurences:
java.util.concurrent.ThreadLocalRandom.nextFloat()
java.util.Random.nextFloat()
java.util.Scanner.nextFloat()


Occurences of nextGaussian

nextGaussian occurences:
java.util.concurrent.ThreadLocalRandom.nextGaussian()
java.util.Random.nextGaussian()


Occurences of nextInt

nextInt occurences:
java.util.concurrent.ThreadLocalRandom.nextInt()
java.util.concurrent.ThreadLocalRandom.nextInt(int)
java.util.concurrent.ThreadLocalRandom.nextInt(int, int)
java.util.PrimitiveIterator.OfInt.nextInt()
java.util.Random.nextInt()
java.util.Random.nextInt(int)
java.util.Scanner.nextInt()
java.util.Scanner.nextInt(int)
java.util.SplittableRandom.nextInt()
java.util.SplittableRandom.nextInt(int)
java.util.SplittableRandom.nextInt(int, int)


Occurences of nextLayout

nextLayout occurences:
java.awt.font.LineBreakMeasurer.nextLayout(float)
java.awt.font.LineBreakMeasurer.nextLayout(float, int, boolean)


Occurences of nextLong

nextLong occurences:
java.util.concurrent.ThreadLocalRandom.nextLong()
java.util.concurrent.ThreadLocalRandom.nextLong(long)
java.util.concurrent.ThreadLocalRandom.nextLong(long, long)
java.util.PrimitiveIterator.OfLong.nextLong()
java.util.Random.nextLong()
java.util.Scanner.nextLong()
java.util.Scanner.nextLong(int)
java.util.SplittableRandom.nextLong()
java.util.SplittableRandom.nextLong(long)
java.util.SplittableRandom.nextLong(long, long)


Occurences of nextOffset

nextOffset occurences:
java.awt.font.LineBreakMeasurer.nextOffset(float)
java.awt.font.LineBreakMeasurer.nextOffset(float, int, boolean)


Occurences of nextShort

nextShort occurences:
java.util.Scanner.nextShort()
java.util.Scanner.nextShort(int)


Occurences of nextTabStop

nextTabStop occurences:
javax.swing.text.ParagraphView.nextTabStop(float, int)
javax.swing.text.PlainView.nextTabStop(float, int)
javax.swing.text.TabExpander.nextTabStop(float, int)
javax.swing.text.WrappedPlainView.nextTabStop(float, int)


Occurences of nextTag

nextTag occurences:
javax.xml.stream.util.EventReaderDelegate.nextTag()
javax.xml.stream.util.StreamReaderDelegate.nextTag()
javax.xml.stream.XMLEventReader.nextTag()
javax.xml.stream.XMLStreamReader.nextTag()


Occurences of nextToken

nextToken occurences:
java.io.StreamTokenizer.nextToken()
java.util.StringTokenizer.nextToken()
java.util.StringTokenizer.nextToken(java.lang.String)


Occurences of nextUp

nextUp occurences:
java.lang.Math.nextUp(double)
java.lang.Math.nextUp(float)
java.lang.StrictMath.nextUp(double)
java.lang.StrictMath.nextUp(float)


Occurences of next_n

next_n occurences:
org.omg.CosNaming.BindingIteratorOperations.next_n(int, org.omg.CosNaming.BindingListHolder)
org.omg.CosNaming._BindingIteratorStub.next_n(int, org.omg.CosNaming.BindingListHolder)


Occurences of next_one

next_one occurences:
org.omg.CosNaming.BindingIteratorOperations.next_one(org.omg.CosNaming.BindingHolder)
org.omg.CosNaming._BindingIteratorStub.next_one(org.omg.CosNaming.BindingHolder)


Occurences of NE_RESIZE_CURSOR

NE_RESIZE_CURSOR occurences:
java.awt.NE_RESIZE_CURSOR
java.awt.NE_RESIZE_CURSOR


Occurences of nillable

nillable occurences:
javax.xml.bind.annotation.XmlElement.nillable()
javax.xml.bind.annotation.XmlElementWrapper.nillable()


Occurences of nio

nio occurences:
compact1.java.nio
compact2.java.nio
compact3.java.nio
java.nio


Occurences of NKO

NKO occurences:
java.awt.font.NKO
java.lang.NKO
java.lang.NKO


Occurences of NoClassDefFoundError (constructors)

NoClassDefFoundError (constructors) occurences:
java.lang.NoClassDefFoundError()
java.lang.NoClassDefFoundError(java.lang.String)


Occurences of NoContext (constructors)

NoContext (constructors) occurences:
org.omg.PortableServer.CurrentPackage.NoContext()
org.omg.PortableServer.CurrentPackage.NoContext(java.lang.String)


Occurences of node

node occurences:
java.util.prefs.AbstractPreferences.node(java.lang.String)
java.util.prefs.Preferences.node(java.lang.String)
java.util.UUID.node()


Occurences of Node

Node occurences:
javax.xml.soap.Node
org.w3c.dom.Node


Occurences of nodeDimensions

nodeDimensions occurences:
javax.swing.plaf.basic.nodeDimensions
javax.swing.tree.nodeDimensions


Occurences of nodeExists

nodeExists occurences:
java.util.prefs.AbstractPreferences.nodeExists(java.lang.String)
java.util.prefs.Preferences.nodeExists(java.lang.String)


Occurences of noFocusBorder

noFocusBorder occurences:
javax.swing.noFocusBorder
javax.swing.plaf.basic.noFocusBorder
javax.swing.table.noFocusBorder


Occurences of NoInitialContextException (constructors)

NoInitialContextException (constructors) occurences:
javax.naming.NoInitialContextException()
javax.naming.NoInitialContextException(java.lang.String)


Occurences of NONE

NONE occurences:
java.awt.NONE
java.awt.NONE
java.awt.NONE
javax.lang.model.type.NONE
javax.print.attribute.standard.NONE
javax.print.attribute.standard.NONE
javax.print.attribute.standard.NONE
javax.swing.NONE
javax.swing.NONE
javax.xml.bind.annotation.NONE


Occurences of noneMatch

noneMatch occurences:
java.util.stream.DoubleStream.noneMatch(java.util.function.DoublePredicate)
java.util.stream.IntStream.noneMatch(java.util.function.IntPredicate)
java.util.stream.LongStream.noneMatch(java.util.function.LongPredicate)
java.util.stream.Stream.noneMatch(java.util.function.Predicate)


Occurences of non_existent

non_existent occurences:
org.omg.CORBA.portable.Delegate.non_existent(org.omg.CORBA.Object)
org.omg.PortableServer.portable.Delegate.non_existent(org.omg.PortableServer.Servant)


Occurences of NoPermissionException (constructors)

NoPermissionException (constructors) occurences:
javax.naming.NoPermissionException()
javax.naming.NoPermissionException(java.lang.String)


Occurences of NORMAL

NORMAL occurences:
java.awt.NORMAL
java.awt.NORMAL
java.awt.NORMAL
java.time.format.NORMAL
javax.print.attribute.standard.NORMAL
javax.swing.NORMAL


Occurences of normalize

normalize occurences:
java.net.URI.normalize()
java.nio.file.Path.normalize()
java.text.Normalizer.normalize(java.lang.CharSequence, java.text.Normalizer.Form)
javax.imageio.metadata.IIOMetadataNode.normalize()
javax.xml.datatype.XMLGregorianCalendar.normalize()
org.w3c.dom.Node.normalize()


Occurences of normalized

normalized occurences:
java.time.chrono.ChronoPeriod.normalized()
java.time.Period.normalized()
java.time.ZoneId.normalized()


Occurences of normalizeMimeType

normalizeMimeType occurences:
java.awt.datatransfer.DataFlavor.normalizeMimeType(java.lang.String)
javax.activation.ActivationDataFlavor.normalizeMimeType(java.lang.String)


Occurences of normalizeMimeTypeParameter

normalizeMimeTypeParameter occurences:
java.awt.datatransfer.DataFlavor.normalizeMimeTypeParameter(java.lang.String, java.lang.String)
javax.activation.ActivationDataFlavor.normalizeMimeTypeParameter(java.lang.String, java.lang.String)


Occurences of normalizeTabRuns

normalizeTabRuns occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.normalizeTabRuns(int, int, int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout.normalizeTabRuns(int, int, int, int)


Occurences of NoRouteToHostException (constructors)

NoRouteToHostException (constructors) occurences:
java.net.NoRouteToHostException()
java.net.NoRouteToHostException(java.lang.String)


Occurences of NORTH

NORTH occurences:
java.awt.NORTH
java.awt.NORTH
javax.swing.NORTH
javax.swing.NORTH


Occurences of NoServant (constructors)

NoServant (constructors) occurences:
org.omg.PortableServer.POAPackage.NoServant()
org.omg.PortableServer.POAPackage.NoServant(java.lang.String)


Occurences of NoSuchAlgorithmException (constructors)

NoSuchAlgorithmException (constructors) occurences:
java.security.NoSuchAlgorithmException()
java.security.NoSuchAlgorithmException(java.lang.String)
java.security.NoSuchAlgorithmException(java.lang.String, java.lang.Throwable)
java.security.NoSuchAlgorithmException(java.lang.Throwable)


Occurences of NoSuchAttributeException (constructors)

NoSuchAttributeException (constructors) occurences:
javax.naming.directory.NoSuchAttributeException()
javax.naming.directory.NoSuchAttributeException(java.lang.String)


Occurences of NoSuchElementException (constructors)

NoSuchElementException (constructors) occurences:
java.util.NoSuchElementException()
java.util.NoSuchElementException(java.lang.String)


Occurences of NoSuchFieldError (constructors)

NoSuchFieldError (constructors) occurences:
java.lang.NoSuchFieldError()
java.lang.NoSuchFieldError(java.lang.String)


Occurences of NoSuchFieldException (constructors)

NoSuchFieldException (constructors) occurences:
java.lang.NoSuchFieldException()
java.lang.NoSuchFieldException(java.lang.String)


Occurences of NoSuchFileException (constructors)

NoSuchFileException (constructors) occurences:
java.nio.file.NoSuchFileException(java.lang.String)
java.nio.file.NoSuchFileException(java.lang.String, java.lang.String, java.lang.String)


Occurences of NoSuchMechanismException (constructors)

NoSuchMechanismException (constructors) occurences:
javax.xml.crypto.NoSuchMechanismException()
javax.xml.crypto.NoSuchMechanismException(java.lang.String)
javax.xml.crypto.NoSuchMechanismException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.NoSuchMechanismException(java.lang.Throwable)


Occurences of NoSuchMethodError (constructors)

NoSuchMethodError (constructors) occurences:
java.lang.NoSuchMethodError()
java.lang.NoSuchMethodError(java.lang.String)


Occurences of NoSuchMethodException (constructors)

NoSuchMethodException (constructors) occurences:
java.lang.NoSuchMethodException()
java.lang.NoSuchMethodException(java.lang.String)


Occurences of NoSuchPaddingException (constructors)

NoSuchPaddingException (constructors) occurences:
javax.crypto.NoSuchPaddingException()
javax.crypto.NoSuchPaddingException(java.lang.String)


Occurences of NoSuchProviderException (constructors)

NoSuchProviderException (constructors) occurences:
java.security.NoSuchProviderException()
java.security.NoSuchProviderException(java.lang.String)


Occurences of not

not occurences:
java.math.BigInteger.not()
javax.management.Query.not(javax.management.QueryExp)


Occurences of NotActiveException (constructors)

NotActiveException (constructors) occurences:
java.io.NotActiveException()
java.io.NotActiveException(java.lang.String)


Occurences of notationDecl

notationDecl occurences:
org.xml.sax.DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.HandlerBase.notationDecl(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.DefaultHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.notationDecl(java.lang.String, java.lang.String, java.lang.String)


Occurences of NotBoundException (constructors)

NotBoundException (constructors) occurences:
java.rmi.NotBoundException()
java.rmi.NotBoundException(java.lang.String)


Occurences of NotCompliantMBeanException (constructors)

NotCompliantMBeanException (constructors) occurences:
javax.management.NotCompliantMBeanException()
javax.management.NotCompliantMBeanException(java.lang.String)


Occurences of NotContextException (constructors)

NotContextException (constructors) occurences:
javax.naming.NotContextException()
javax.naming.NotContextException(java.lang.String)


Occurences of NOTE

NOTE occurences:
java.awt.NOTE
javax.tools.NOTE


Occurences of NotEmpty (constructors)

NotEmpty (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.NotEmpty()
org.omg.CosNaming.NamingContextPackage.NotEmpty(java.lang.String)


Occurences of NotEmptyHolder (constructors)

NotEmptyHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder()
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder(org.omg.CosNaming.NamingContextPackage.NotEmpty)


Occurences of noteOff

noteOff occurences:
javax.sound.midi.MidiChannel.noteOff(int)
javax.sound.midi.MidiChannel.noteOff(int, int)


Occurences of NotFound (constructors)

NotFound (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.NotFound()
org.omg.CosNaming.NamingContextPackage.NotFound(java.lang.String, org.omg.CosNaming.NamingContextPackage.NotFoundReason, org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming.NamingContextPackage.NotFound(org.omg.CosNaming.NamingContextPackage.NotFoundReason, org.omg.CosNaming.NameComponent:A)


Occurences of NotFoundHolder (constructors)

NotFoundHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.NotFoundHolder()
org.omg.CosNaming.NamingContextPackage.NotFoundHolder(org.omg.CosNaming.NamingContextPackage.NotFound)


Occurences of NotFoundReasonHolder (constructors)

NotFoundReasonHolder (constructors) occurences:
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder()
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder(org.omg.CosNaming.NamingContextPackage.NotFoundReason)


Occurences of NotIdentifiableEventImpl (constructors)

NotIdentifiableEventImpl (constructors) occurences:
javax.xml.bind.helpers.NotIdentifiableEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator)
javax.xml.bind.helpers.NotIdentifiableEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator, java.lang.Throwable)


Occurences of Notification (constructors)

Notification (constructors) occurences:
javax.management.Notification(java.lang.String, java.lang.Object, long)
javax.management.Notification(java.lang.String, java.lang.Object, long, java.lang.String)
javax.management.Notification(java.lang.String, java.lang.Object, long, long)
javax.management.Notification(java.lang.String, java.lang.Object, long, long, java.lang.String)


Occurences of NotificationBroadcasterSupport (constructors)

NotificationBroadcasterSupport (constructors) occurences:
javax.management.NotificationBroadcasterSupport()
javax.management.NotificationBroadcasterSupport(java.util.concurrent.Executor)
javax.management.NotificationBroadcasterSupport(java.util.concurrent.Executor, javax.management.MBeanNotificationInfo...)
javax.management.NotificationBroadcasterSupport(javax.management.MBeanNotificationInfo...)


Occurences of notifyAction

notifyAction occurences:
javax.swing.notifyAction
javax.swing.SwingUtilities.notifyAction(javax.swing.Action, javax.swing.KeyStroke, java.awt.event.KeyEvent, java.lang.Object, int)


Occurences of notifyObservers

notifyObservers occurences:
java.util.Observable.notifyObservers()
java.util.Observable.notifyObservers(java.lang.Object)


Occurences of NotLinkException (constructors)

NotLinkException (constructors) occurences:
java.nio.file.NotLinkException(java.lang.String)
java.nio.file.NotLinkException(java.lang.String, java.lang.String, java.lang.String)


Occurences of NotSerializableException (constructors)

NotSerializableException (constructors) occurences:
java.io.NotSerializableException()
java.io.NotSerializableException(java.lang.String)


Occurences of NOVEMBER

NOVEMBER occurences:
java.time.NOVEMBER
java.util.NOVEMBER
javax.xml.datatype.NOVEMBER


Occurences of now

now occurences:
java.time.chrono.HijrahDate.now()
java.time.chrono.HijrahDate.now(java.time.Clock)
java.time.chrono.HijrahDate.now(java.time.ZoneId)
java.time.chrono.JapaneseDate.now()
java.time.chrono.JapaneseDate.now(java.time.Clock)
java.time.chrono.JapaneseDate.now(java.time.ZoneId)
java.time.chrono.MinguoDate.now()
java.time.chrono.MinguoDate.now(java.time.Clock)
java.time.chrono.MinguoDate.now(java.time.ZoneId)
java.time.chrono.ThaiBuddhistDate.now()
java.time.chrono.ThaiBuddhistDate.now(java.time.Clock)
java.time.chrono.ThaiBuddhistDate.now(java.time.ZoneId)
java.time.Instant.now()
java.time.Instant.now(java.time.Clock)
java.time.LocalDate.now()
java.time.LocalDate.now(java.time.Clock)
java.time.LocalDate.now(java.time.ZoneId)
java.time.LocalDateTime.now()
java.time.LocalDateTime.now(java.time.Clock)
java.time.LocalDateTime.now(java.time.ZoneId)
java.time.LocalTime.now()
java.time.LocalTime.now(java.time.Clock)
java.time.LocalTime.now(java.time.ZoneId)
java.time.MonthDay.now()
java.time.MonthDay.now(java.time.Clock)
java.time.MonthDay.now(java.time.ZoneId)
java.time.OffsetDateTime.now()
java.time.OffsetDateTime.now(java.time.Clock)
java.time.OffsetDateTime.now(java.time.ZoneId)
java.time.OffsetTime.now()
java.time.OffsetTime.now(java.time.Clock)
java.time.OffsetTime.now(java.time.ZoneId)
java.time.Year.now()
java.time.Year.now(java.time.Clock)
java.time.Year.now(java.time.ZoneId)
java.time.YearMonth.now()
java.time.YearMonth.now(java.time.Clock)
java.time.YearMonth.now(java.time.ZoneId)
java.time.ZonedDateTime.now()
java.time.ZonedDateTime.now(java.time.Clock)
java.time.ZonedDateTime.now(java.time.ZoneId)


Occurences of NO_IMPLEMENT (constructors)

NO_IMPLEMENT (constructors) occurences:
org.omg.CORBA.NO_IMPLEMENT()
org.omg.CORBA.NO_IMPLEMENT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.NO_IMPLEMENT(java.lang.String)
org.omg.CORBA.NO_IMPLEMENT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of NO_MEMORY (constructors)

NO_MEMORY (constructors) occurences:
org.omg.CORBA.NO_MEMORY()
org.omg.CORBA.NO_MEMORY(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.NO_MEMORY(java.lang.String)
org.omg.CORBA.NO_MEMORY(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of NO_PERMISSION (constructors)

NO_PERMISSION (constructors) occurences:
org.omg.CORBA.NO_PERMISSION()
org.omg.CORBA.NO_PERMISSION(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.NO_PERMISSION(java.lang.String)
org.omg.CORBA.NO_PERMISSION(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of NO_RESOURCES (constructors)

NO_RESOURCES (constructors) occurences:
org.omg.CORBA.NO_RESOURCES()
org.omg.CORBA.NO_RESOURCES(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.NO_RESOURCES(java.lang.String)
org.omg.CORBA.NO_RESOURCES(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of NO_RESPONSE (constructors)

NO_RESPONSE (constructors) occurences:
org.omg.CORBA.NO_RESPONSE()
org.omg.CORBA.NO_RESPONSE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.NO_RESPONSE(java.lang.String)
org.omg.CORBA.NO_RESPONSE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of NULL

NULL occurences:
java.sql.NULL
java.sql.NULL
javax.lang.model.type.NULL


Occurences of NullPointerException (constructors)

NullPointerException (constructors) occurences:
java.lang.NullPointerException()
java.lang.NullPointerException(java.lang.String)


Occurences of numBands

numBands occurences:
java.awt.image.numBands
java.awt.image.numBands
java.awt.image.numBands


Occurences of NUMBER

NUMBER occurences:
javax.swing.text.html.parser.NUMBER
javax.xml.xpath.NUMBER


Occurences of NumberEditor

NumberEditor occurences:
javax.swing.JSpinner.NumberEditor.NumberEditor(javax.swing.JSpinner)
javax.swing.JSpinner.NumberEditor.NumberEditor(javax.swing.JSpinner, java.lang.String)


Occurences of NumberFormatException (constructors)

NumberFormatException (constructors) occurences:
java.lang.NumberFormatException()
java.lang.NumberFormatException(java.lang.String)


Occurences of NumberFormatter (constructors)

NumberFormatter (constructors) occurences:
javax.swing.text.NumberFormatter()
javax.swing.text.NumberFormatter(java.text.NumberFormat)


Occurences of numberOfLeadingZeros

numberOfLeadingZeros occurences:
java.lang.Integer.numberOfLeadingZeros(int)
java.lang.Long.numberOfLeadingZeros(long)


Occurences of numberOfTrailingZeros

numberOfTrailingZeros occurences:
java.lang.Integer.numberOfTrailingZeros(int)
java.lang.Long.numberOfTrailingZeros(long)


Occurences of NumberUpSupported (constructors)

NumberUpSupported (constructors) occurences:
javax.print.attribute.standard.NumberUpSupported(int)
javax.print.attribute.standard.NumberUpSupported(int, int)
javax.print.attribute.standard.NumberUpSupported(int:A:A)


Occurences of NUMERIC

NUMERIC occurences:
java.sql.NUMERIC
java.sql.NUMERIC


Occurences of NVARCHAR

NVARCHAR occurences:
java.sql.NVARCHAR
java.sql.NVARCHAR


Occurences of NW_RESIZE_CURSOR

NW_RESIZE_CURSOR occurences:
java.awt.NW_RESIZE_CURSOR
java.awt.NW_RESIZE_CURSOR


Occurences of N_RESIZE_CURSOR

N_RESIZE_CURSOR occurences:
java.awt.N_RESIZE_CURSOR
java.awt.N_RESIZE_CURSOR


Occurences of Object

Object occurences:
java.lang.Object
org.omg.CORBA.Object


Occurences of object

object occurences:
com.sun.jdi.event.WatchpointEvent.object()
javax.swing.undo.object


Occurences of ObjectAlreadyActive (constructors)

ObjectAlreadyActive (constructors) occurences:
org.omg.PortableServer.POAPackage.ObjectAlreadyActive()
org.omg.PortableServer.POAPackage.ObjectAlreadyActive(java.lang.String)


Occurences of ObjectCollectedException (constructors)

ObjectCollectedException (constructors) occurences:
com.sun.jdi.ObjectCollectedException()
com.sun.jdi.ObjectCollectedException(java.lang.String)


Occurences of ObjectHolder (constructors)

ObjectHolder (constructors) occurences:
org.omg.CORBA.ObjectHolder()
org.omg.CORBA.ObjectHolder(org.omg.CORBA.Object)


Occurences of ObjectIdHelper

ObjectIdHelper occurences:
org.omg.PortableInterceptor.ObjectIdHelper
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper


Occurences of ObjectIdHelper (constructors)

ObjectIdHelper (constructors) occurences:
org.omg.PortableInterceptor.ObjectIdHelper()
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper()


Occurences of ObjectImpl

ObjectImpl occurences:
org.omg.CORBA.portable.ObjectImpl
org.omg.CORBA_2_3.portable.ObjectImpl


Occurences of ObjectImpl (constructors)

ObjectImpl (constructors) occurences:
org.omg.CORBA.portable.ObjectImpl()
org.omg.CORBA_2_3.portable.ObjectImpl()


Occurences of ObjectInputStream (constructors)

ObjectInputStream (constructors) occurences:
java.io.ObjectInputStream()
java.io.ObjectInputStream(java.io.InputStream)


Occurences of ObjectInstance (constructors)

ObjectInstance (constructors) occurences:
javax.management.ObjectInstance(java.lang.String, java.lang.String)
javax.management.ObjectInstance(javax.management.ObjectName, java.lang.String)


Occurences of ObjectName (constructors)

ObjectName (constructors) occurences:
javax.management.ObjectName(java.lang.String)
javax.management.ObjectName(java.lang.String, java.lang.String, java.lang.String)
javax.management.ObjectName(java.lang.String, java.util.Hashtable)


Occurences of ObjectNotActive (constructors)

ObjectNotActive (constructors) occurences:
org.omg.PortableServer.POAPackage.ObjectNotActive()
org.omg.PortableServer.POAPackage.ObjectNotActive(java.lang.String)


Occurences of ObjectOutputStream (constructors)

ObjectOutputStream (constructors) occurences:
java.io.ObjectOutputStream()
java.io.ObjectOutputStream(java.io.OutputStream)


Occurences of ObjectReferenceFactoryHolder (constructors)

ObjectReferenceFactoryHolder (constructors) occurences:
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder()
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder(org.omg.PortableInterceptor.ObjectReferenceFactory)


Occurences of ObjectReferenceTemplateHolder (constructors)

ObjectReferenceTemplateHolder (constructors) occurences:
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder()
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder(org.omg.PortableInterceptor.ObjectReferenceTemplate)


Occurences of ObjectReferenceTemplateSeqHolder (constructors)

ObjectReferenceTemplateSeqHolder (constructors) occurences:
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder()
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder(org.omg.PortableInterceptor.ObjectReferenceTemplate:A)


Occurences of ObjectStreamException (constructors)

ObjectStreamException (constructors) occurences:
java.io.ObjectStreamException()
java.io.ObjectStreamException(java.lang.String)


Occurences of ObjectStreamField (constructors)

ObjectStreamField (constructors) occurences:
java.io.ObjectStreamField(java.lang.String, java.lang.Class)
java.io.ObjectStreamField(java.lang.String, java.lang.Class, boolean)


Occurences of object_id

object_id occurences:
org.omg.PortableInterceptor.ServerRequestInfoOperations.object_id()
org.omg.PortableServer.portable.Delegate.object_id(org.omg.PortableServer.Servant)


Occurences of OBJECT_NOT_EXIST (constructors)

OBJECT_NOT_EXIST (constructors) occurences:
org.omg.CORBA.OBJECT_NOT_EXIST()
org.omg.CORBA.OBJECT_NOT_EXIST(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.OBJECT_NOT_EXIST(java.lang.String)
org.omg.CORBA.OBJECT_NOT_EXIST(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of OBJECT_SCOPE

OBJECT_SCOPE occurences:
javax.naming.directory.OBJECT_SCOPE
javax.naming.event.OBJECT_SCOPE


Occurences of ObjID (constructors)

ObjID (constructors) occurences:
java.rmi.server.ObjID()
java.rmi.server.ObjID(int)


Occurences of OBJ_ADAPTER (constructors)

OBJ_ADAPTER (constructors) occurences:
org.omg.CORBA.OBJ_ADAPTER()
org.omg.CORBA.OBJ_ADAPTER(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.OBJ_ADAPTER(java.lang.String)
org.omg.CORBA.OBJ_ADAPTER(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of observesDaylightTime

observesDaylightTime occurences:
java.util.SimpleTimeZone.observesDaylightTime()
java.util.TimeZone.observesDaylightTime()


Occurences of obtrudeValue

obtrudeValue occurences:
java.util.concurrent.CompletableFuture.obtrudeValue(java.lang.Object)
java.util.concurrent.CompletableFuture.obtrudeValue(T)


Occurences of OctetSeqHolder (constructors)

OctetSeqHolder (constructors) occurences:
org.omg.CORBA.OctetSeqHolder()
org.omg.CORBA.OctetSeqHolder(byte:A)


Occurences of OctetStreamData (constructors)

OctetStreamData (constructors) occurences:
javax.xml.crypto.OctetStreamData(java.io.InputStream)
javax.xml.crypto.OctetStreamData(java.io.InputStream, java.lang.String, java.lang.String)


Occurences of OCTOBER

OCTOBER occurences:
java.time.OCTOBER
java.util.OCTOBER
javax.xml.datatype.OCTOBER


Occurences of of

of occurences:
java.lang.Character.UnicodeBlock.of(char)
java.lang.Character.UnicodeBlock.of(int)
java.lang.Character.UnicodeScript.of(int)
java.time.chrono.Chronology.of(java.lang.String)
java.time.chrono.HijrahDate.of(int, int, int)
java.time.chrono.HijrahEra.of(int)
java.time.chrono.IsoEra.of(int)
java.time.chrono.JapaneseDate.of(int, int, int)
java.time.chrono.JapaneseDate.of(java.time.chrono.JapaneseEra, int, int, int)
java.time.chrono.JapaneseEra.of(int)
java.time.chrono.MinguoDate.of(int, int, int)
java.time.chrono.MinguoEra.of(int)
java.time.chrono.ThaiBuddhistDate.of(int, int, int)
java.time.chrono.ThaiBuddhistEra.of(int)
java.time.DayOfWeek.of(int)
java.time.Duration.of(long, java.time.temporal.TemporalUnit)
java.time.format.DecimalStyle.of(java.util.Locale)
java.time.LocalDate.of(int, int, int)
java.time.LocalDate.of(int, java.time.Month, int)
java.time.LocalDateTime.of(int, int, int, int, int)
java.time.LocalDateTime.of(int, int, int, int, int, int)
java.time.LocalDateTime.of(int, int, int, int, int, int, int)
java.time.LocalDateTime.of(int, java.time.Month, int, int, int)
java.time.LocalDateTime.of(int, java.time.Month, int, int, int, int)
java.time.LocalDateTime.of(int, java.time.Month, int, int, int, int, int)
java.time.LocalDateTime.of(java.time.LocalDate, java.time.LocalTime)
java.time.LocalTime.of(int, int)
java.time.LocalTime.of(int, int, int)
java.time.LocalTime.of(int, int, int, int)
java.time.Month.of(int)
java.time.MonthDay.of(int, int)
java.time.MonthDay.of(java.time.Month, int)
java.time.OffsetDateTime.of(int, int, int, int, int, int, int, java.time.ZoneOffset)
java.time.OffsetDateTime.of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneOffset)
java.time.OffsetDateTime.of(java.time.LocalDateTime, java.time.ZoneOffset)
java.time.OffsetTime.of(int, int, int, int, java.time.ZoneOffset)
java.time.OffsetTime.of(java.time.LocalTime, java.time.ZoneOffset)
java.time.Period.of(int, int, int)
java.time.temporal.ValueRange.of(long, long)
java.time.temporal.ValueRange.of(long, long, long)
java.time.temporal.ValueRange.of(long, long, long, long)
java.time.temporal.WeekFields.of(java.time.DayOfWeek, int)
java.time.temporal.WeekFields.of(java.util.Locale)
java.time.Year.of(int)
java.time.YearMonth.of(int, int)
java.time.YearMonth.of(int, java.time.Month)
java.time.zone.ZoneOffsetTransition.of(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneOffset)
java.time.zone.ZoneOffsetTransitionRule.of(java.time.Month, int, java.time.DayOfWeek, java.time.LocalTime, boolean, java.time.zone.ZoneOffsetTransitionRule.TimeDefinition, java.time.ZoneOffset, java.time.ZoneOffset, java.time.ZoneOffset)
java.time.zone.ZoneRules.of(java.time.ZoneOffset)
java.time.zone.ZoneRules.of(java.time.ZoneOffset, java.time.ZoneOffset, java.util.List, java.util.List, java.util.List)
java.time.ZonedDateTime.of(int, int, int, int, int, int, int, java.time.ZoneId)
java.time.ZonedDateTime.of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneId)
java.time.ZonedDateTime.of(java.time.LocalDateTime, java.time.ZoneId)
java.time.ZoneId.of(java.lang.String)
java.time.ZoneId.of(java.lang.String, java.util.Map)
java.time.ZoneOffset.of(java.lang.String)
java.util.EnumSet.of(E)
java.util.EnumSet.of(E, E)
java.util.EnumSet.of(E, E, E)
java.util.EnumSet.of(E, E, E, E)
java.util.EnumSet.of(E, E, E, E, E)
java.util.EnumSet.of(E, E...)
java.util.EnumSet.of(java.lang.Enum)
java.util.EnumSet.of(java.lang.Enum, java.lang.Enum)
java.util.EnumSet.of(java.lang.Enum, java.lang.Enum, java.lang.Enum)
java.util.EnumSet.of(java.lang.Enum, java.lang.Enum, java.lang.Enum, java.lang.Enum)
java.util.EnumSet.of(java.lang.Enum, java.lang.Enum, java.lang.Enum, java.lang.Enum, java.lang.Enum)
java.util.EnumSet.of(java.lang.Enum, java.lang.Enum:A)
java.util.Optional.of(java.lang.Object)
java.util.Optional.of(T)
java.util.OptionalDouble.of(double)
java.util.OptionalInt.of(int)
java.util.OptionalLong.of(long)
java.util.stream.Collector.of(java.util.function.Supplier, java.util.function.BiConsumer, java.util.function.BinaryOperator, java.util.function.Function, java.util.stream.Collector.Characteristics...)
java.util.stream.Collector.of(java.util.function.Supplier, java.util.function.BiConsumer, java.util.function.BinaryOperator, java.util.stream.Collector.Characteristics...)
java.util.stream.DoubleStream.of(double)
java.util.stream.DoubleStream.of(double...)
java.util.stream.IntStream.of(int)
java.util.stream.IntStream.of(int...)
java.util.stream.LongStream.of(long)
java.util.stream.LongStream.of(long...)
java.util.stream.Stream.of(java.lang.Object)
java.util.stream.Stream.of(java.lang.Object:A)
java.util.stream.Stream.of(T)
java.util.stream.Stream.of(T...)
javax.annotation.processing.Completions.of(java.lang.String)
javax.annotation.processing.Completions.of(java.lang.String, java.lang.String)


Occurences of ofDays

ofDays occurences:
java.time.Duration.ofDays(long)
java.time.Period.ofDays(int)


Occurences of ofEpochSecond

ofEpochSecond occurences:
java.time.Instant.ofEpochSecond(long)
java.time.Instant.ofEpochSecond(long, long)
java.time.LocalDateTime.ofEpochSecond(long, int, java.time.ZoneOffset)


Occurences of offer

offer occurences:
java.util.ArrayDeque.offer(E)
java.util.ArrayDeque.offer(java.lang.Object)
java.util.concurrent.ArrayBlockingQueue.offer(E)
java.util.concurrent.ArrayBlockingQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ArrayBlockingQueue.offer(java.lang.Object)
java.util.concurrent.ArrayBlockingQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingDeque.offer(E)
java.util.concurrent.BlockingDeque.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingDeque.offer(java.lang.Object)
java.util.concurrent.BlockingDeque.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingQueue.offer(E)
java.util.concurrent.BlockingQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingQueue.offer(java.lang.Object)
java.util.concurrent.BlockingQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.offer(E)
java.util.concurrent.ConcurrentLinkedDeque.offer(java.lang.Object)
java.util.concurrent.ConcurrentLinkedQueue.offer(E)
java.util.concurrent.ConcurrentLinkedQueue.offer(java.lang.Object)
java.util.concurrent.DelayQueue.offer(E)
java.util.concurrent.DelayQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.DelayQueue.offer(java.util.concurrent.Delayed)
java.util.concurrent.DelayQueue.offer(java.util.concurrent.Delayed, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingDeque.offer(E)
java.util.concurrent.LinkedBlockingDeque.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingDeque.offer(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingQueue.offer(E)
java.util.concurrent.LinkedBlockingQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingQueue.offer(java.lang.Object)
java.util.concurrent.LinkedBlockingQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedTransferQueue.offer(E)
java.util.concurrent.LinkedTransferQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedTransferQueue.offer(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.PriorityBlockingQueue.offer(E)
java.util.concurrent.PriorityBlockingQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.PriorityBlockingQueue.offer(java.lang.Object)
java.util.concurrent.PriorityBlockingQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.SynchronousQueue.offer(E)
java.util.concurrent.SynchronousQueue.offer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.SynchronousQueue.offer(java.lang.Object)
java.util.concurrent.SynchronousQueue.offer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.Deque.offer(E)
java.util.Deque.offer(java.lang.Object)
java.util.LinkedList.offer(E)
java.util.LinkedList.offer(java.lang.Object)
java.util.PriorityQueue.offer(E)
java.util.PriorityQueue.offer(java.lang.Object)
java.util.Queue.offer(E)
java.util.Queue.offer(java.lang.Object)


Occurences of offerFirst

offerFirst occurences:
java.util.ArrayDeque.offerFirst(E)
java.util.ArrayDeque.offerFirst(java.lang.Object)
java.util.concurrent.BlockingDeque.offerFirst(E)
java.util.concurrent.BlockingDeque.offerFirst(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingDeque.offerFirst(java.lang.Object)
java.util.concurrent.BlockingDeque.offerFirst(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.offerFirst(E)
java.util.concurrent.ConcurrentLinkedDeque.offerFirst(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.offerFirst(E)
java.util.concurrent.LinkedBlockingDeque.offerFirst(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingDeque.offerFirst(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.offerFirst(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.Deque.offerFirst(E)
java.util.Deque.offerFirst(java.lang.Object)
java.util.LinkedList.offerFirst(E)
java.util.LinkedList.offerFirst(java.lang.Object)


Occurences of offerLast

offerLast occurences:
java.util.ArrayDeque.offerLast(E)
java.util.ArrayDeque.offerLast(java.lang.Object)
java.util.concurrent.BlockingDeque.offerLast(E)
java.util.concurrent.BlockingDeque.offerLast(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingDeque.offerLast(java.lang.Object)
java.util.concurrent.BlockingDeque.offerLast(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.offerLast(E)
java.util.concurrent.ConcurrentLinkedDeque.offerLast(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.offerLast(E)
java.util.concurrent.LinkedBlockingDeque.offerLast(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingDeque.offerLast(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.offerLast(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.Deque.offerLast(E)
java.util.Deque.offerLast(java.lang.Object)
java.util.LinkedList.offerLast(E)
java.util.LinkedList.offerLast(java.lang.Object)


Occurences of offset

offset occurences:
java.awt.image.offset
java.time.Clock.offset(java.time.Clock, java.time.Duration)
java.time.temporal.TemporalQueries.offset()
javax.swing.plaf.basic.offset
javax.swing.plaf.basic.offset
javax.swing.text.offset
javax.swing.tree.offset
org.omg.CORBA.portable.offset


Occurences of offsetByCodePoints

offsetByCodePoints occurences:
java.lang.Character.offsetByCodePoints(char:A, int, int, int, int)
java.lang.Character.offsetByCodePoints(java.lang.CharSequence, int, int)
java.lang.String.offsetByCodePoints(int, int)
java.lang.StringBuffer.offsetByCodePoints(int, int)
java.lang.StringBuilder.offsetByCodePoints(int, int)


Occurences of ofHours

ofHours occurences:
java.time.Duration.ofHours(long)
java.time.ZoneOffset.ofHours(int)


Occurences of ofInstant

ofInstant occurences:
java.time.LocalDateTime.ofInstant(java.time.Instant, java.time.ZoneId)
java.time.OffsetDateTime.ofInstant(java.time.Instant, java.time.ZoneId)
java.time.OffsetTime.ofInstant(java.time.Instant, java.time.ZoneId)
java.time.ZonedDateTime.ofInstant(java.time.Instant, java.time.ZoneId)
java.time.ZonedDateTime.ofInstant(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneId)


Occurences of ofLocalizedDateTime

ofLocalizedDateTime occurences:
java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle)
java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle, java.time.format.FormatStyle)


Occurences of ofNullable

ofNullable occurences:
java.util.Optional.ofNullable(java.lang.Object)
java.util.Optional.ofNullable(T)


Occurences of ofPattern

ofPattern occurences:
java.time.format.DateTimeFormatter.ofPattern(java.lang.String)
java.time.format.DateTimeFormatter.ofPattern(java.lang.String, java.util.Locale)


Occurences of ofSeconds

ofSeconds occurences:
java.time.Duration.ofSeconds(long)
java.time.Duration.ofSeconds(long, long)


Occurences of OGHAM

OGHAM occurences:
java.lang.OGHAM
java.lang.OGHAM


Occurences of OID

OID occurences:
javax.naming.ldap.OID
javax.naming.ldap.OID
javax.naming.ldap.OID
javax.naming.ldap.OID
javax.naming.ldap.OID
javax.naming.ldap.OID
javax.naming.ldap.OID


Occurences of Oid (constructors)

Oid (constructors) occurences:
org.ietf.jgss.Oid(byte:A)
org.ietf.jgss.Oid(java.io.InputStream)
org.ietf.jgss.Oid(java.lang.String)


Occurences of OK

OK occurences:
javax.net.ssl.OK
javax.security.auth.callback.OK


Occurences of okToUseGui

okToUseGui occurences:
java.beans.beancontext.BeanContextSupport.okToUseGui()
java.beans.beancontext.okToUseGui
java.beans.Visibility.okToUseGui()


Occurences of OK_CANCEL_OPTION

OK_CANCEL_OPTION occurences:
javax.security.auth.callback.OK_CANCEL_OPTION
javax.swing.OK_CANCEL_OPTION


Occurences of OLD_ITALIC

OLD_ITALIC occurences:
java.lang.OLD_ITALIC
java.lang.OLD_ITALIC


Occurences of OLD_PERSIAN

OLD_PERSIAN occurences:
java.lang.OLD_PERSIAN
java.lang.OLD_PERSIAN


Occurences of OLD_SOUTH_ARABIAN

OLD_SOUTH_ARABIAN occurences:
java.lang.OLD_SOUTH_ARABIAN
java.lang.OLD_SOUTH_ARABIAN


Occurences of OLD_TURKIC

OLD_TURKIC occurences:
java.lang.OLD_TURKIC
java.lang.OLD_TURKIC


Occurences of OL_CHIKI

OL_CHIKI occurences:
java.awt.font.OL_CHIKI
java.lang.OL_CHIKI
java.lang.OL_CHIKI


Occurences of on

on occurences:
java.security.DigestInputStream.on(boolean)
java.security.DigestOutputStream.on(boolean)


Occurences of onDeregistration

onDeregistration occurences:
javax.imageio.spi.IIOServiceProvider.onDeregistration(javax.imageio.spi.ServiceRegistry, java.lang.Class)
javax.imageio.spi.RegisterableService.onDeregistration(javax.imageio.spi.ServiceRegistry, java.lang.Class)


Occurences of ONE

ONE occurences:
java.math.ONE
java.math.ONE


Occurences of ONELEVEL_SCOPE

ONELEVEL_SCOPE occurences:
javax.naming.directory.ONELEVEL_SCOPE
javax.naming.event.ONELEVEL_SCOPE


Occurences of ONE_SIDED

ONE_SIDED occurences:
java.awt.ONE_SIDED
javax.print.attribute.standard.ONE_SIDED


Occurences of onMalformedInput

onMalformedInput occurences:
java.nio.charset.CharsetDecoder.onMalformedInput(java.nio.charset.CodingErrorAction)
java.nio.charset.CharsetEncoder.onMalformedInput(java.nio.charset.CodingErrorAction)


Occurences of onRegistration

onRegistration occurences:
javax.imageio.spi.IIOServiceProvider.onRegistration(javax.imageio.spi.ServiceRegistry, java.lang.Class)
javax.imageio.spi.RegisterableService.onRegistration(javax.imageio.spi.ServiceRegistry, java.lang.Class)


Occurences of onUnmappableCharacter

onUnmappableCharacter occurences:
java.nio.charset.CharsetDecoder.onUnmappableCharacter(java.nio.charset.CodingErrorAction)
java.nio.charset.CharsetEncoder.onUnmappableCharacter(java.nio.charset.CodingErrorAction)


Occurences of OPAQUE

OPAQUE occurences:
java.awt.OPAQUE
javax.accessibility.OPAQUE


Occurences of OPEN

OPEN occurences:
java.awt.geom.OPEN
java.awt.OPEN
javax.sound.sampled.OPEN


Occurences of open

open occurences:
java.awt.Desktop.open(java.io.File)
java.nio.channels.AsynchronousFileChannel.open(java.nio.file.Path, java.nio.file.OpenOption...)
java.nio.channels.AsynchronousFileChannel.open(java.nio.file.Path, java.util.Set, java.util.concurrent.ExecutorService, java.nio.file.attribute.FileAttribute...)
java.nio.channels.AsynchronousServerSocketChannel.open()
java.nio.channels.AsynchronousServerSocketChannel.open(java.nio.channels.AsynchronousChannelGroup)
java.nio.channels.AsynchronousSocketChannel.open()
java.nio.channels.AsynchronousSocketChannel.open(java.nio.channels.AsynchronousChannelGroup)
java.nio.channels.DatagramChannel.open()
java.nio.channels.DatagramChannel.open(java.net.ProtocolFamily)
java.nio.channels.FileChannel.open(java.nio.file.Path, java.nio.file.OpenOption...)
java.nio.channels.FileChannel.open(java.nio.file.Path, java.util.Set, java.nio.file.attribute.FileAttribute...)
java.nio.channels.Pipe.open()
java.nio.channels.Selector.open()
java.nio.channels.ServerSocketChannel.open()
java.nio.channels.SocketChannel.open()
java.nio.channels.SocketChannel.open(java.net.SocketAddress)
javax.sound.midi.MidiDevice.open()
javax.sound.sampled.Clip.open(javax.sound.sampled.AudioFormat, byte:A, int, int)
javax.sound.sampled.Clip.open(javax.sound.sampled.AudioInputStream)
javax.sound.sampled.Line.open()
javax.sound.sampled.SourceDataLine.open(javax.sound.sampled.AudioFormat)
javax.sound.sampled.SourceDataLine.open(javax.sound.sampled.AudioFormat, int)
javax.sound.sampled.TargetDataLine.open(javax.sound.sampled.AudioFormat)
javax.sound.sampled.TargetDataLine.open(javax.sound.sampled.AudioFormat, int)


Occurences of openAsynchronousChannelGroup

openAsynchronousChannelGroup occurences:
java.nio.channels.spi.AsynchronousChannelProvider.openAsynchronousChannelGroup(int, java.util.concurrent.ThreadFactory)
java.nio.channels.spi.AsynchronousChannelProvider.openAsynchronousChannelGroup(java.util.concurrent.ExecutorService, int)


Occurences of openConnection

openConnection occurences:
java.net.URL.openConnection()
java.net.URL.openConnection(java.net.Proxy)
java.net.URLStreamHandler.openConnection(java.net.URL)
java.net.URLStreamHandler.openConnection(java.net.URL, java.net.Proxy)


Occurences of OpenDataException (constructors)

OpenDataException (constructors) occurences:
javax.management.openmbean.OpenDataException()
javax.management.openmbean.OpenDataException(java.lang.String)


Occurences of openDatagramChannel

openDatagramChannel occurences:
java.nio.channels.spi.SelectorProvider.openDatagramChannel()
java.nio.channels.spi.SelectorProvider.openDatagramChannel(java.net.ProtocolFamily)


Occurences of openFrame

openFrame occurences:
javax.swing.DefaultDesktopManager.openFrame(javax.swing.JInternalFrame)
javax.swing.DesktopManager.openFrame(javax.swing.JInternalFrame)


Occurences of openInputStream

openInputStream occurences:
javax.tools.FileObject.openInputStream()
javax.tools.ForwardingFileObject.openInputStream()
javax.tools.SimpleJavaFileObject.openInputStream()


Occurences of openmbean

openmbean occurences:
compact3.javax.management.openmbean
javax.management.openmbean


Occurences of OpenMBeanAttributeInfoSupport (constructors)

OpenMBeanAttributeInfoSupport (constructors) occurences:
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, java.lang.Object)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, java.lang.Object, java.lang.Comparable, java.lang.Comparable)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, java.lang.Object, java.lang.Object:A)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, javax.management.Descriptor)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, T)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, T, java.lang.Comparable, java.lang.Comparable)
javax.management.openmbean.OpenMBeanAttributeInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, boolean, boolean, boolean, T, T:A)


Occurences of OpenMBeanConstructorInfoSupport (constructors)

OpenMBeanConstructorInfoSupport (constructors) occurences:
javax.management.openmbean.OpenMBeanConstructorInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo:A)
javax.management.openmbean.OpenMBeanConstructorInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo:A, javax.management.Descriptor)


Occurences of OpenMBeanInfoSupport (constructors)

OpenMBeanInfoSupport (constructors) occurences:
javax.management.openmbean.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo:A, javax.management.openmbean.OpenMBeanConstructorInfo:A, javax.management.openmbean.OpenMBeanOperationInfo:A, javax.management.MBeanNotificationInfo:A)
javax.management.openmbean.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo:A, javax.management.openmbean.OpenMBeanConstructorInfo:A, javax.management.openmbean.OpenMBeanOperationInfo:A, javax.management.MBeanNotificationInfo:A, javax.management.Descriptor)


Occurences of OpenMBeanOperationInfoSupport (constructors)

OpenMBeanOperationInfoSupport (constructors) occurences:
javax.management.openmbean.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo:A, javax.management.openmbean.OpenType, int)
javax.management.openmbean.OpenMBeanOperationInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanParameterInfo:A, javax.management.openmbean.OpenType, int, javax.management.Descriptor)


Occurences of OpenMBeanParameterInfoSupport (constructors)

OpenMBeanParameterInfoSupport (constructors) occurences:
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, java.lang.Object)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, java.lang.Object, java.lang.Comparable, java.lang.Comparable)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, java.lang.Object, java.lang.Object:A)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, javax.management.Descriptor)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, T)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, T, java.lang.Comparable, java.lang.Comparable)
javax.management.openmbean.OpenMBeanParameterInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenType, T, T:A)


Occurences of openOutputStream

openOutputStream occurences:
javax.tools.FileObject.openOutputStream()
javax.tools.ForwardingFileObject.openOutputStream()
javax.tools.SimpleJavaFileObject.openOutputStream()


Occurences of openReader

openReader occurences:
javax.tools.FileObject.openReader(boolean)
javax.tools.ForwardingFileObject.openReader(boolean)
javax.tools.SimpleJavaFileObject.openReader(boolean)


Occurences of OpenType

OpenType occurences:
java.awt.font.OpenType
javax.management.openmbean.OpenType


Occurences of openWriter

openWriter occurences:
javax.tools.FileObject.openWriter()
javax.tools.ForwardingFileObject.openWriter()
javax.tools.SimpleJavaFileObject.openWriter()


Occurences of operation

operation occurences:
org.omg.CORBA.Request.operation()
org.omg.CORBA.ServerRequest.operation()
org.omg.PortableInterceptor.RequestInfoOperations.operation()


Occurences of OperationNotSupportedException (constructors)

OperationNotSupportedException (constructors) occurences:
javax.naming.OperationNotSupportedException()
javax.naming.OperationNotSupportedException(java.lang.String)


Occurences of OperationsException (constructors)

OperationsException (constructors) occurences:
javax.management.OperationsException()
javax.management.OperationsException(java.lang.String)


Occurences of optimizations

optimizations occurences:
java.awt.image.optimizations
java.awt.image.optimizations
java.awt.image.optimizations
java.awt.image.optimizations
java.awt.image.optimizations
java.awt.image.optimizations


Occurences of options

options occurences:
com.sun.javadoc.RootDoc.options()
javax.swing.options


Occurences of OPTION_PANE

OPTION_PANE occurences:
javax.accessibility.OPTION_PANE
javax.swing.plaf.synth.OPTION_PANE


Occurences of or

or occurences:
java.math.BigInteger.or(java.math.BigInteger)
java.util.BitSet.or(java.util.BitSet)
java.util.function.BiPredicate.or(java.util.function.BiPredicate)
java.util.function.DoublePredicate.or(java.util.function.DoublePredicate)
java.util.function.IntPredicate.or(java.util.function.IntPredicate)
java.util.function.LongPredicate.or(java.util.function.LongPredicate)
java.util.function.Predicate.or(java.util.function.Predicate)
javax.management.Query.or(javax.management.QueryExp, javax.management.QueryExp)


Occurences of ORB

ORB occurences:
org.omg.CORBA.ORB
org.omg.CORBA_2_3.ORB


Occurences of orb

orb occurences:
javax.rmi.CORBA.Tie.orb()
javax.rmi.CORBA.Tie.orb(org.omg.CORBA.ORB)
org.omg.CORBA.portable.Delegate.orb(org.omg.CORBA.Object)
org.omg.CORBA.portable.InputStream.orb()
org.omg.CORBA.portable.OutputStream.orb()
org.omg.PortableServer.portable.Delegate.orb(org.omg.PortableServer.Servant)


Occurences of ORB (constructors)

ORB (constructors) occurences:
org.omg.CORBA.ORB()
org.omg.CORBA_2_3.ORB()


Occurences of orbd

orbd occurences:
orbd
orbd


Occurences of orb_id

orb_id occurences:
org.omg.PortableInterceptor.ObjectReferenceTemplate.orb_id()
org.omg.PortableInterceptor.ORBInitInfoOperations.orb_id()
org.omg.PortableInterceptor.ServerRequestInfoOperations.orb_id()


Occurences of order

order occurences:
java.nio.ByteBuffer.order()
java.nio.ByteBuffer.order(java.nio.ByteOrder)
java.nio.CharBuffer.order()
java.nio.DoubleBuffer.order()
java.nio.FloatBuffer.order()
java.nio.IntBuffer.order()
java.nio.LongBuffer.order()
java.nio.ShortBuffer.order()


Occurences of orElse

orElse occurences:
java.util.Optional.orElse(java.lang.Object)
java.util.Optional.orElse(T)
java.util.OptionalDouble.orElse(double)
java.util.OptionalInt.orElse(int)
java.util.OptionalLong.orElse(long)


Occurences of orElseGet

orElseGet occurences:
java.util.Optional.orElseGet(java.util.function.Supplier)
java.util.OptionalDouble.orElseGet(java.util.function.DoubleSupplier)
java.util.OptionalInt.orElseGet(java.util.function.IntSupplier)
java.util.OptionalLong.orElseGet(java.util.function.LongSupplier)


Occurences of orElseThrow

orElseThrow occurences:
java.util.Optional.orElseThrow(java.util.function.Supplier)
java.util.OptionalDouble.orElseThrow(java.util.function.Supplier)
java.util.OptionalInt.orElseThrow(java.util.function.Supplier)
java.util.OptionalLong.orElseThrow(java.util.function.Supplier)


Occurences of orientation

orientation occurences:
javax.swing.orientation
javax.swing.orientation
javax.swing.orientation
javax.swing.orientation
javax.swing.plaf.basic.orientation


Occurences of originatingProvider

originatingProvider occurences:
javax.imageio.originatingProvider
javax.imageio.originatingProvider


Occurences of ORIYA

ORIYA occurences:
java.awt.font.ORIYA
java.awt.font.ORIYA
java.lang.ORIYA
java.lang.ORIYA


Occurences of OSMANYA

OSMANYA occurences:
java.lang.OSMANYA
java.lang.OSMANYA


Occurences of OTHER

OTHER occurences:
com.sun.source.doctree.OTHER
com.sun.source.tree.OTHER
java.awt.OTHER
java.sql.OTHER
java.sql.OTHER
javax.lang.model.element.OTHER
javax.lang.model.type.OTHER
javax.print.attribute.standard.OTHER
javax.tools.OTHER
javax.tools.OTHER


Occurences of out

out occurences:
java.io.out
java.io.out
java.io.out
java.io.out
java.io.out
java.lang.out
java.util.Formatter.out()


Occurences of outcode

outcode occurences:
java.awt.geom.Rectangle2D.outcode(double, double)
java.awt.geom.Rectangle2D.outcode(java.awt.geom.Point2D)
java.awt.geom.Rectangle2D.Double.outcode(double, double)
java.awt.geom.Rectangle2D.Float.outcode(double, double)
java.awt.Rectangle.outcode(double, double)


Occurences of OutOfMemoryError (constructors)

OutOfMemoryError (constructors) occurences:
java.lang.OutOfMemoryError()
java.lang.OutOfMemoryError(java.lang.String)


Occurences of output

output occurences:
javax.imageio.output
javax.swing.text.AbstractWriter.output(char:A, int, int)
javax.swing.text.html.HTMLWriter.output(char:A, int, int)
javax.xml.ws.Action.output()


Occurences of OutputStream

OutputStream occurences:
java.io.OutputStream
org.omg.CORBA.portable.OutputStream
org.omg.CORBA_2_3.portable.OutputStream


Occurences of OutputStream (constructors)

OutputStream (constructors) occurences:
java.io.OutputStream()
org.omg.CORBA.portable.OutputStream()
org.omg.CORBA_2_3.portable.OutputStream()


Occurences of OutputStreamWriter (constructors)

OutputStreamWriter (constructors) occurences:
java.io.OutputStreamWriter(java.io.OutputStream)
java.io.OutputStreamWriter(java.io.OutputStream, java.lang.String)
java.io.OutputStreamWriter(java.io.OutputStream, java.nio.charset.Charset)
java.io.OutputStreamWriter(java.io.OutputStream, java.nio.charset.CharsetEncoder)


Occurences of OVERFLOW

OVERFLOW occurences:
java.nio.charset.OVERFLOW
java.nio.file.OVERFLOW


Occurences of override

override occurences:
javax.swing.override
javax.swing.table.override
javax.swing.tree.override


Occurences of overrides

overrides occurences:
com.sun.javadoc.MethodDoc.overrides(com.sun.javadoc.MethodDoc)
javax.lang.model.util.Elements.overrides(javax.lang.model.element.ExecutableElement, javax.lang.model.element.ExecutableElement, javax.lang.model.element.TypeElement)


Occurences of Overview

Overview occurences:
Overview
Overview


Occurences of Overview List

Overview List occurences:
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List
Overview List


Occurences of owner

owner occurences:
com.sun.javadoc.TypeVariable.owner()
java.awt.datatransfer.owner
java.nio.file.attribute.PosixFileAttributes.owner()


Occurences of owns

owns occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.owns(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject)
java.util.concurrent.locks.AbstractQueuedSynchronizer.owns(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject)


Occurences of pack

pack occurences:
java.awt.Window.pack()
java.util.jar.Pack200.Packer.pack(java.util.jar.JarFile, java.io.OutputStream)
java.util.jar.Pack200.Packer.pack(java.util.jar.JarInputStream, java.io.OutputStream)
javax.swing.JInternalFrame.pack()
javax.swing.JPopupMenu.pack()


Occurences of pack200

pack200 occurences:
pack200
pack200


Occurences of PACKAGE

PACKAGE occurences:
java.lang.annotation.PACKAGE
java.lang.invoke.PACKAGE
javax.lang.model.element.PACKAGE
javax.lang.model.type.PACKAGE


Occurences of packagePrefix

packagePrefix occurences:
java.rmi.server.packagePrefix
java.rmi.server.packagePrefix


Occurences of packagesIn

packagesIn occurences:
javax.lang.model.util.ElementFilter.packagesIn(java.lang.Iterable)
javax.lang.model.util.ElementFilter.packagesIn(java.util.Set)


Occurences of PackedColorModel (constructors)

PackedColorModel (constructors) occurences:
java.awt.image.PackedColorModel(java.awt.color.ColorSpace, int, int, int, int, int, boolean, int, int)
java.awt.image.PackedColorModel(java.awt.color.ColorSpace, int, int:A, int, boolean, int, int)


Occurences of padding

padding occurences:
javax.swing.plaf.basic.padding
javax.swing.plaf.basic.padding


Occurences of padNext

padNext occurences:
java.time.format.DateTimeFormatterBuilder.padNext(int)
java.time.format.DateTimeFormatterBuilder.padNext(int, char)


Occurences of padSelectedTab

padSelectedTab occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.padSelectedTab(int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout.padSelectedTab(int, int)


Occurences of PageAttributes (constructors)

PageAttributes (constructors) occurences:
java.awt.PageAttributes()
java.awt.PageAttributes(java.awt.PageAttributes)
java.awt.PageAttributes(java.awt.PageAttributes.ColorType, java.awt.PageAttributes.MediaType, java.awt.PageAttributes.OrientationRequestedType, java.awt.PageAttributes.OriginType, java.awt.PageAttributes.PrintQualityType, int:A)


Occurences of pageDialog

pageDialog occurences:
java.awt.print.PrinterJob.pageDialog(java.awt.print.PageFormat)
java.awt.print.PrinterJob.pageDialog(javax.print.attribute.PrintRequestAttributeSet)


Occurences of PagedResultsControl (constructors)

PagedResultsControl (constructors) occurences:
javax.naming.ldap.PagedResultsControl(int, boolean)
javax.naming.ldap.PagedResultsControl(int, byte:A, boolean)


Occurences of PageRanges (constructors)

PageRanges (constructors) occurences:
javax.print.attribute.standard.PageRanges(int)
javax.print.attribute.standard.PageRanges(int, int)
javax.print.attribute.standard.PageRanges(int:A:A)
javax.print.attribute.standard.PageRanges(java.lang.String)


Occurences of PAGE_END

PAGE_END occurences:
java.awt.PAGE_END
java.awt.PAGE_END


Occurences of PAGE_START

PAGE_START occurences:
java.awt.PAGE_START
java.awt.PAGE_START


Occurences of paint

paint occurences:
java.awt.Canvas.paint(java.awt.Graphics)
java.awt.Component.paint(java.awt.Graphics)
java.awt.Container.paint(java.awt.Graphics)
java.awt.Window.paint(java.awt.Graphics)
javax.swing.CellRendererPane.paint(java.awt.Graphics)
javax.swing.colorchooser.AbstractColorChooserPanel.paint(java.awt.Graphics)
javax.swing.JComponent.paint(java.awt.Graphics)
javax.swing.JLayer.paint(java.awt.Graphics)
javax.swing.JLayeredPane.paint(java.awt.Graphics)
javax.swing.JViewport.paint(java.awt.Graphics)
javax.swing.Painter.paint(java.awt.Graphics2D, java.lang.Object, int, int)
javax.swing.Painter.paint(java.awt.Graphics2D, T, int, int)
javax.swing.plaf.basic.BasicArrowButton.paint(java.awt.Graphics)
javax.swing.plaf.basic.BasicButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar.paint(java.awt.Graphics)
javax.swing.plaf.basic.BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicRadioButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneDivider.paint(java.awt.Graphics)
javax.swing.plaf.basic.BasicSplitPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicToggleButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.paint(java.awt.Graphics)
javax.swing.plaf.basic.BasicToolTipUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.LayerUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalPopupMenuSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalRadioButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollButton.paint(java.awt.Graphics)
javax.swing.plaf.metal.MetalSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalTabbedPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolTipUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalTreeUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.nimbus.AbstractRegionPainter.paint(java.awt.Graphics2D, javax.swing.JComponent, int, int)
javax.swing.plaf.synth.SynthButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthColorChooserUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthColorChooserUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthDesktopIconUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopIconUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthDesktopPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthEditorPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthInternalFrameUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthInternalFrameUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthLabelUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthLabelUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthMenuBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuBarUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuItemUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthMenuUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthOptionPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthOptionPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthPanelUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthPopupMenuUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthPopupMenuUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthProgressBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthProgressBarUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthRootPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthRootPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthScrollBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollBarUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthScrollPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthSeparatorUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthSliderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthSpinnerUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSpinnerUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthSplitPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSplitPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTabbedPaneUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTabbedPaneUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableHeaderUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTableUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTextAreaUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTextFieldUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthToolBarUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolBarUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthToolTipUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolTipUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthTreeUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.plaf.synth.SynthViewportUI.paint(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.paint(javax.swing.plaf.synth.SynthContext, java.awt.Graphics)
javax.swing.text.AsyncBoxView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.BoxView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.Caret.paint(java.awt.Graphics)
javax.swing.text.ComponentView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.DefaultCaret.paint(java.awt.Graphics)
javax.swing.text.DefaultHighlighter.paint(java.awt.Graphics)
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter.paint(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent)
javax.swing.text.FieldView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.GlyphView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.GlyphView.GlyphPainter.paint(javax.swing.text.GlyphView, java.awt.Graphics, java.awt.Shape, int, int)
javax.swing.text.Highlighter.paint(java.awt.Graphics)
javax.swing.text.Highlighter.HighlightPainter.paint(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent)
javax.swing.text.html.BlockView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.html.ImageView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.html.ListView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.html.ParagraphView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.html.StyleSheet.BoxPainter.paint(java.awt.Graphics, float, float, float, float, javax.swing.text.View)
javax.swing.text.html.StyleSheet.ListPainter.paint(java.awt.Graphics, float, float, float, float, javax.swing.text.View, int)
javax.swing.text.IconView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.ParagraphView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.PlainView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.View.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.text.WrappedPlainView.paint(java.awt.Graphics, java.awt.Shape)
javax.swing.tree.DefaultTreeCellEditor.EditorContainer.paint(java.awt.Graphics)
javax.swing.tree.DefaultTreeCellRenderer.paint(java.awt.Graphics)


Occurences of paintBackground

paintBackground occurences:
javax.swing.plaf.basic.BasicMenuItemUI.paintBackground(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Color)
javax.swing.plaf.basic.BasicTextUI.paintBackground(java.awt.Graphics)
javax.swing.plaf.synth.SynthEditorPaneUI.paintBackground(java.awt.Graphics)
javax.swing.plaf.synth.SynthTextAreaUI.paintBackground(java.awt.Graphics)
javax.swing.plaf.synth.SynthTextFieldUI.paintBackground(java.awt.Graphics)


Occurences of paintBorder

paintBorder occurences:
javax.swing.AbstractButton.paintBorder(java.awt.Graphics)
javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.BevelBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.CompoundBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.EmptyBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.EtchedBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.LineBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.MatteBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.SoftBevelBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.StrokeBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.border.TitledBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.JComponent.paintBorder(java.awt.Graphics)
javax.swing.JMenuBar.paintBorder(java.awt.Graphics)
javax.swing.JPopupMenu.paintBorder(java.awt.Graphics)
javax.swing.JProgressBar.paintBorder(java.awt.Graphics)
javax.swing.JToolBar.paintBorder(java.awt.Graphics)
javax.swing.paintBorder
javax.swing.plaf.basic.BasicBorders.ButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.FieldBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.MenuBarBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.RadioButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.RolloverButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.SplitPaneBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.BorderUIResource.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.ButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.Flush3DBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.InternalFrameBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.MenuBarBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.MenuItemBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.OptionDialogBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.PaletteBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.PopupMenuBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.TableHeaderBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.TextFieldBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.metal.MetalBorders.ToolBarBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthButtonUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthCheckBoxMenuItemUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthCheckBoxUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthColorChooserUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthComboBoxUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthDesktopIconUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthDesktopPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthEditorPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthFormattedTextFieldUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthInternalFrameUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthLabelUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthListUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthMenuBarUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthMenuItemUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthMenuUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthOptionPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPanelUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPasswordFieldUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPopupMenuUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthProgressBarUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthRadioButtonMenuItemUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthRadioButtonUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthRootPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthScrollBarUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthScrollPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthSeparatorUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthSliderUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthSpinnerUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthSplitPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTabbedPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTableHeaderUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTableUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTextAreaUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTextFieldUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTextPaneUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthToggleButtonUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthToolBarUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthToolTipUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthTreeUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthViewportUI.paintBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)


Occurences of paintButtonPressed

paintButtonPressed occurences:
javax.swing.plaf.basic.BasicButtonUI.paintButtonPressed(java.awt.Graphics, javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalButtonUI.paintButtonPressed(java.awt.Graphics, javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalToggleButtonUI.paintButtonPressed(java.awt.Graphics, javax.swing.AbstractButton)


Occurences of paintChild

paintChild occurences:
javax.swing.text.BoxView.paintChild(java.awt.Graphics, java.awt.Rectangle, int)
javax.swing.text.html.ListView.paintChild(java.awt.Graphics, java.awt.Rectangle, int)


Occurences of paintChildren

paintChildren occurences:
javax.swing.JComponent.paintChildren(java.awt.Graphics)
javax.swing.JSplitPane.paintChildren(java.awt.Graphics)
javax.swing.text.AsyncBoxView.ChildLocator.paintChildren(java.awt.Graphics)


Occurences of paintComponent

paintComponent occurences:
javax.swing.Box.paintComponent(java.awt.Graphics)
javax.swing.Box.Filler.paintComponent(java.awt.Graphics)
javax.swing.CellRendererPane.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, int, int, int, int)
javax.swing.CellRendererPane.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, int, int, int, int, boolean)
javax.swing.CellRendererPane.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, java.awt.Rectangle)
javax.swing.JComponent.paintComponent(java.awt.Graphics)
javax.swing.JInternalFrame.paintComponent(java.awt.Graphics)
javax.swing.JLayer.paintComponent(java.awt.Graphics)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.paintComponent(java.awt.Graphics)
javax.swing.plaf.metal.MetalComboBoxButton.paintComponent(java.awt.Graphics)
javax.swing.plaf.metal.MetalInternalFrameTitlePane.paintComponent(java.awt.Graphics)
javax.swing.SwingUtilities.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, int, int, int, int)
javax.swing.SwingUtilities.paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, java.awt.Rectangle)


Occurences of paintContentBorderBottomEdge

paintContentBorderBottomEdge occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintContentBorderBottomEdge(java.awt.Graphics, int, int, int, int, int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintContentBorderBottomEdge(java.awt.Graphics, int, int, int, int, int, int)


Occurences of paintContentBorderLeftEdge

paintContentBorderLeftEdge occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintContentBorderLeftEdge(java.awt.Graphics, int, int, int, int, int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintContentBorderLeftEdge(java.awt.Graphics, int, int, int, int, int, int)


Occurences of paintContentBorderRightEdge

paintContentBorderRightEdge occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintContentBorderRightEdge(java.awt.Graphics, int, int, int, int, int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintContentBorderRightEdge(java.awt.Graphics, int, int, int, int, int, int)


Occurences of paintContentBorderTopEdge

paintContentBorderTopEdge occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintContentBorderTopEdge(java.awt.Graphics, int, int, int, int, int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintContentBorderTopEdge(java.awt.Graphics, int, int, int, int, int, int)


Occurences of PaintContext

PaintContext occurences:
java.awt.PaintContext
javax.swing.plaf.nimbus.AbstractRegionPainter.PaintContext.PaintContext(java.awt.Insets, java.awt.Dimension, boolean)
javax.swing.plaf.nimbus.AbstractRegionPainter.PaintContext.PaintContext(java.awt.Insets, java.awt.Dimension, boolean, javax.swing.plaf.nimbus.AbstractRegionPainter.PaintContext.CacheMode, double, double)


Occurences of paintCurrentValue

paintCurrentValue occurences:
javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean)
javax.swing.plaf.metal.MetalComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean)
javax.swing.plaf.synth.SynthComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean)


Occurences of paintCurrentValueBackground

paintCurrentValueBackground occurences:
javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean)
javax.swing.plaf.metal.MetalComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean)


Occurences of paintDeterminate

paintDeterminate occurences:
javax.swing.plaf.basic.BasicProgressBarUI.paintDeterminate(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalProgressBarUI.paintDeterminate(java.awt.Graphics, javax.swing.JComponent)


Occurences of paintDisabledText

paintDisabledText occurences:
javax.swing.plaf.basic.BasicLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)
javax.swing.plaf.metal.MetalLabelUI.paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)


Occurences of paintDragWindow

paintDragWindow occurences:
javax.swing.plaf.basic.BasicToolBarUI.paintDragWindow(java.awt.Graphics)
javax.swing.plaf.synth.SynthToolBarUI.paintDragWindow(java.awt.Graphics)


Occurences of paintDropLine

paintDropLine occurences:
javax.swing.plaf.basic.BasicTreeUI.paintDropLine(java.awt.Graphics)
javax.swing.plaf.synth.SynthTreeUI.paintDropLine(java.awt.Graphics)


Occurences of paintExpandControl

paintExpandControl occurences:
javax.swing.plaf.basic.BasicTreeUI.paintExpandControl(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, java.awt.Rectangle, javax.swing.tree.TreePath, int, boolean, boolean, boolean)
javax.swing.plaf.synth.SynthTreeUI.paintExpandControl(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, java.awt.Rectangle, javax.swing.tree.TreePath, int, boolean, boolean, boolean)


Occurences of paintFocus

paintFocus occurences:
javax.swing.plaf.basic.BasicButtonUI.paintFocus(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)
javax.swing.plaf.basic.BasicRadioButtonUI.paintFocus(java.awt.Graphics, java.awt.Rectangle, java.awt.Dimension)
javax.swing.plaf.basic.BasicSliderUI.paintFocus(java.awt.Graphics)
javax.swing.plaf.metal.MetalButtonUI.paintFocus(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)
javax.swing.plaf.metal.MetalRadioButtonUI.paintFocus(java.awt.Graphics, java.awt.Rectangle, java.awt.Dimension)
javax.swing.plaf.metal.MetalSliderUI.paintFocus(java.awt.Graphics)
javax.swing.plaf.metal.MetalToggleButtonUI.paintFocus(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)


Occurences of paintFocusIndicator

paintFocusIndicator occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintFocusIndicator(java.awt.Graphics, int, java.awt.Rectangle:A, int, java.awt.Rectangle, java.awt.Rectangle, boolean)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintFocusIndicator(java.awt.Graphics, int, java.awt.Rectangle:A, int, java.awt.Rectangle, java.awt.Rectangle, boolean)


Occurences of paintHorizontalLine

paintHorizontalLine occurences:
javax.swing.plaf.basic.BasicTreeUI.paintHorizontalLine(java.awt.Graphics, javax.swing.JComponent, int, int, int)
javax.swing.plaf.synth.SynthTreeUI.paintHorizontalLine(java.awt.Graphics, javax.swing.JComponent, int, int, int)


Occurences of paintHorizontalPartOfLeg

paintHorizontalPartOfLeg occurences:
javax.swing.plaf.basic.BasicTreeUI.paintHorizontalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, java.awt.Rectangle, javax.swing.tree.TreePath, int, boolean, boolean, boolean)
javax.swing.plaf.metal.MetalTreeUI.paintHorizontalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, java.awt.Rectangle, javax.swing.tree.TreePath, int, boolean, boolean, boolean)
javax.swing.plaf.synth.SynthTreeUI.paintHorizontalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, java.awt.Rectangle, javax.swing.tree.TreePath, int, boolean, boolean, boolean)


Occurences of paintIcon

paintIcon occurences:
javax.swing.Icon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.ImageIcon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.basic.BasicButtonUI.paintIcon(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle)
javax.swing.plaf.basic.BasicTabbedPaneUI.paintIcon(java.awt.Graphics, int, int, javax.swing.Icon, java.awt.Rectangle, boolean)
javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle)
javax.swing.plaf.IconUIResource.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalCheckBoxIcon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalComboBoxIcon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalIconFactory.FileIcon16.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
javax.swing.plaf.metal.MetalToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle)


Occurences of paintImmediately

paintImmediately occurences:
javax.swing.JComponent.paintImmediately(int, int, int, int)
javax.swing.JComponent.paintImmediately(java.awt.Rectangle)
javax.swing.JLayer.paintImmediately(int, int, int, int)
javax.swing.plaf.LayerUI.paintImmediately(int, int, int, int, javax.swing.JLayer)


Occurences of paintIndeterminate

paintIndeterminate occurences:
javax.swing.plaf.basic.BasicProgressBarUI.paintIndeterminate(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalProgressBarUI.paintIndeterminate(java.awt.Graphics, javax.swing.JComponent)


Occurences of paintLayer

paintLayer occurences:
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter.paintLayer(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent, javax.swing.text.View)
javax.swing.text.LayeredHighlighter.LayerPainter.paintLayer(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent, javax.swing.text.View)


Occurences of paintLayeredHighlights

paintLayeredHighlights occurences:
javax.swing.text.DefaultHighlighter.paintLayeredHighlights(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent, javax.swing.text.View)
javax.swing.text.LayeredHighlighter.paintLayeredHighlights(java.awt.Graphics, int, int, java.awt.Shape, javax.swing.text.JTextComponent, javax.swing.text.View)


Occurences of paintMajorTickForHorizSlider

paintMajorTickForHorizSlider occurences:
javax.swing.plaf.basic.BasicSliderUI.paintMajorTickForHorizSlider(java.awt.Graphics, java.awt.Rectangle, int)
javax.swing.plaf.metal.MetalSliderUI.paintMajorTickForHorizSlider(java.awt.Graphics, java.awt.Rectangle, int)


Occurences of paintMajorTickForVertSlider

paintMajorTickForVertSlider occurences:
javax.swing.plaf.basic.BasicSliderUI.paintMajorTickForVertSlider(java.awt.Graphics, java.awt.Rectangle, int)
javax.swing.plaf.metal.MetalSliderUI.paintMajorTickForVertSlider(java.awt.Graphics, java.awt.Rectangle, int)


Occurences of paintMinorTickForHorizSlider

paintMinorTickForHorizSlider occurences:
javax.swing.plaf.basic.BasicSliderUI.paintMinorTickForHorizSlider(java.awt.Graphics, java.awt.Rectangle, int)
javax.swing.plaf.metal.MetalSliderUI.paintMinorTickForHorizSlider(java.awt.Graphics, java.awt.Rectangle, int)


Occurences of paintMinorTickForVertSlider

paintMinorTickForVertSlider occurences:
javax.swing.plaf.basic.BasicSliderUI.paintMinorTickForVertSlider(java.awt.Graphics, java.awt.Rectangle, int)
javax.swing.plaf.metal.MetalSliderUI.paintMinorTickForVertSlider(java.awt.Graphics, java.awt.Rectangle, int)


Occurences of paintProgressBarBackground

paintProgressBarBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintProgressBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintProgressBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintProgressBarBorder

paintProgressBarBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintProgressBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintProgressBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintScrollBarBackground

paintScrollBarBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintScrollBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintScrollBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintScrollBarBorder

paintScrollBarBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintScrollBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintScrollBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintScrollBarTrackBackground

paintScrollBarTrackBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintScrollBarTrackBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintScrollBarTrackBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintScrollBarTrackBorder

paintScrollBarTrackBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintScrollBarTrackBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintScrollBarTrackBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSeparatorBackground

paintSeparatorBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintSeparatorBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSeparatorBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSeparatorBorder

paintSeparatorBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintSeparatorBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSeparatorBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSliderBackground

paintSliderBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintSliderBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSliderBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSliderBorder

paintSliderBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintSliderBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSliderBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSliderTrackBackground

paintSliderTrackBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintSliderTrackBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSliderTrackBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSliderTrackBorder

paintSliderTrackBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintSliderTrackBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSliderTrackBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintSplitPaneDividerBackground

paintSplitPaneDividerBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintSplitPaneDividerBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintSplitPaneDividerBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintString

paintString occurences:
javax.swing.paintString
javax.swing.plaf.basic.BasicProgressBarUI.paintString(java.awt.Graphics, int, int, int, int, int, java.awt.Insets)


Occurences of paintTabArea

paintTabArea occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabArea(java.awt.Graphics, int, int)
javax.swing.plaf.synth.SynthTabbedPaneUI.paintTabArea(java.awt.Graphics, int, int)


Occurences of paintTabBackground

paintTabBackground occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabBackground(java.awt.Graphics, int, int, int, int, int, int, boolean)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintTabBackground(java.awt.Graphics, int, int, int, int, int, int, boolean)


Occurences of paintTabbedPaneTabAreaBackground

paintTabbedPaneTabAreaBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabAreaBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabAreaBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintTabbedPaneTabAreaBorder

paintTabbedPaneTabAreaBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabAreaBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabAreaBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintTabbedPaneTabBackground

paintTabbedPaneTabBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int, int)


Occurences of paintTabbedPaneTabBorder

paintTabbedPaneTabBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintTabbedPaneTabBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int, int)


Occurences of paintTabBorder

paintTabBorder occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabBorder(java.awt.Graphics, int, int, int, int, int, int, boolean)
javax.swing.plaf.metal.MetalTabbedPaneUI.paintTabBorder(java.awt.Graphics, int, int, int, int, int, int, boolean)


Occurences of paintText

paintText occurences:
javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String)
javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String)
javax.swing.plaf.basic.BasicMenuItemUI.paintText(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Rectangle, java.lang.String)
javax.swing.plaf.basic.BasicTabbedPaneUI.paintText(java.awt.Graphics, int, java.awt.Font, java.awt.FontMetrics, int, java.lang.String, java.awt.Rectangle, boolean)
javax.swing.plaf.metal.MetalButtonUI.paintText(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String)
javax.swing.plaf.metal.MetalToggleButtonUI.paintText(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String)
javax.swing.plaf.synth.SynthGraphicsUtils.paintText(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.lang.String, int, int, int)
javax.swing.plaf.synth.SynthGraphicsUtils.paintText(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.lang.String, java.awt.Rectangle, int)
javax.swing.plaf.synth.SynthGraphicsUtils.paintText(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.lang.String, javax.swing.Icon, int, int, int, int, int, int, int)
javax.swing.plaf.synth.SynthProgressBarUI.paintText(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.lang.String)


Occurences of paintThumb

paintThumb occurences:
javax.swing.plaf.basic.BasicScrollBarUI.paintThumb(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle)
javax.swing.plaf.basic.BasicSliderUI.paintThumb(java.awt.Graphics)
javax.swing.plaf.metal.MetalScrollBarUI.paintThumb(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle)
javax.swing.plaf.metal.MetalSliderUI.paintThumb(java.awt.Graphics)
javax.swing.plaf.synth.SynthScrollBarUI.paintThumb(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.awt.Rectangle)
javax.swing.plaf.synth.SynthSliderUI.paintThumb(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.awt.Rectangle)


Occurences of paintToolBarBackground

paintToolBarBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintToolBarBorder

paintToolBarBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintToolBarContentBackground

paintToolBarContentBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarContentBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarContentBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintToolBarContentBorder

paintToolBarContentBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarContentBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarContentBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintToolBarDragWindowBackground

paintToolBarDragWindowBackground occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarDragWindowBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarDragWindowBackground(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintToolBarDragWindowBorder

paintToolBarDragWindowBorder occurences:
javax.swing.plaf.synth.SynthPainter.paintToolBarDragWindowBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int)
javax.swing.plaf.synth.SynthPainter.paintToolBarDragWindowBorder(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, int, int, int, int, int)


Occurences of paintTrack

paintTrack occurences:
javax.swing.plaf.basic.BasicScrollBarUI.paintTrack(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle)
javax.swing.plaf.basic.BasicSliderUI.paintTrack(java.awt.Graphics)
javax.swing.plaf.metal.MetalScrollBarUI.paintTrack(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle)
javax.swing.plaf.metal.MetalSliderUI.paintTrack(java.awt.Graphics)
javax.swing.plaf.synth.SynthScrollBarUI.paintTrack(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.awt.Rectangle)
javax.swing.plaf.synth.SynthSliderUI.paintTrack(javax.swing.plaf.synth.SynthContext, java.awt.Graphics, java.awt.Rectangle)


Occurences of paintValue

paintValue occurences:
java.beans.PropertyEditor.paintValue(java.awt.Graphics, java.awt.Rectangle)
java.beans.PropertyEditorSupport.paintValue(java.awt.Graphics, java.awt.Rectangle)


Occurences of paintVerticalLine

paintVerticalLine occurences:
javax.swing.plaf.basic.BasicTreeUI.paintVerticalLine(java.awt.Graphics, javax.swing.JComponent, int, int, int)
javax.swing.plaf.synth.SynthTreeUI.paintVerticalLine(java.awt.Graphics, javax.swing.JComponent, int, int, int)


Occurences of paintVerticalPartOfLeg

paintVerticalPartOfLeg occurences:
javax.swing.plaf.basic.BasicTreeUI.paintVerticalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, javax.swing.tree.TreePath)
javax.swing.plaf.metal.MetalTreeUI.paintVerticalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, javax.swing.tree.TreePath)
javax.swing.plaf.synth.SynthTreeUI.paintVerticalPartOfLeg(java.awt.Graphics, java.awt.Rectangle, java.awt.Insets, javax.swing.tree.TreePath)


Occurences of PANEL

PANEL occurences:
javax.accessibility.PANEL
javax.swing.plaf.synth.PANEL


Occurences of Panel (constructors)

Panel (constructors) occurences:
java.awt.Panel()
java.awt.Panel(java.awt.LayoutManager)


Occurences of ParagraphView

ParagraphView occurences:
javax.swing.text.ParagraphView
javax.swing.text.html.ParagraphView


Occurences of ParagraphView (constructors)

ParagraphView (constructors) occurences:
javax.swing.text.ParagraphView(javax.swing.text.Element)
javax.swing.text.html.ParagraphView(javax.swing.text.Element)


Occurences of parallel

parallel occurences:
java.util.stream.BaseStream.parallel()
java.util.stream.DoubleStream.parallel()
java.util.stream.IntStream.parallel()
java.util.stream.LongStream.parallel()


Occurences of parallelPrefix

parallelPrefix occurences:
java.util.Arrays.parallelPrefix(double:A, int, int, java.util.function.DoubleBinaryOperator)
java.util.Arrays.parallelPrefix(double:A, java.util.function.DoubleBinaryOperator)
java.util.Arrays.parallelPrefix(int:A, int, int, java.util.function.IntBinaryOperator)
java.util.Arrays.parallelPrefix(int:A, java.util.function.IntBinaryOperator)
java.util.Arrays.parallelPrefix(java.lang.Object:A, int, int, java.util.function.BinaryOperator)
java.util.Arrays.parallelPrefix(java.lang.Object:A, java.util.function.BinaryOperator)
java.util.Arrays.parallelPrefix(long:A, int, int, java.util.function.LongBinaryOperator)
java.util.Arrays.parallelPrefix(long:A, java.util.function.LongBinaryOperator)
java.util.Arrays.parallelPrefix(T:A, int, int, java.util.function.BinaryOperator)
java.util.Arrays.parallelPrefix(T:A, java.util.function.BinaryOperator)


Occurences of parallelSetAll

parallelSetAll occurences:
java.util.Arrays.parallelSetAll(double:A, java.util.function.IntToDoubleFunction)
java.util.Arrays.parallelSetAll(int:A, java.util.function.IntUnaryOperator)
java.util.Arrays.parallelSetAll(java.lang.Object:A, java.util.function.IntFunction)
java.util.Arrays.parallelSetAll(long:A, java.util.function.IntToLongFunction)
java.util.Arrays.parallelSetAll(T:A, java.util.function.IntFunction)


Occurences of parallelSort

parallelSort occurences:
java.util.Arrays.parallelSort(byte:A)
java.util.Arrays.parallelSort(byte:A, int, int)
java.util.Arrays.parallelSort(char:A)
java.util.Arrays.parallelSort(char:A, int, int)
java.util.Arrays.parallelSort(double:A)
java.util.Arrays.parallelSort(double:A, int, int)
java.util.Arrays.parallelSort(float:A)
java.util.Arrays.parallelSort(float:A, int, int)
java.util.Arrays.parallelSort(int:A)
java.util.Arrays.parallelSort(int:A, int, int)
java.util.Arrays.parallelSort(java.lang.Comparable:A)
java.util.Arrays.parallelSort(java.lang.Comparable:A, int, int)
java.util.Arrays.parallelSort(java.lang.Object:A, int, int, java.util.Comparator)
java.util.Arrays.parallelSort(java.lang.Object:A, java.util.Comparator)
java.util.Arrays.parallelSort(long:A)
java.util.Arrays.parallelSort(long:A, int, int)
java.util.Arrays.parallelSort(short:A)
java.util.Arrays.parallelSort(short:A, int, int)
java.util.Arrays.parallelSort(T:A)
java.util.Arrays.parallelSort(T:A, int, int)
java.util.Arrays.parallelSort(T:A, int, int, java.util.Comparator)
java.util.Arrays.parallelSort(T:A, java.util.Comparator)


Occurences of PARAM

PARAM occurences:
com.sun.source.doctree.PARAM
javax.swing.text.html.PARAM


Occurences of Parameter

Parameter occurences:
com.sun.javadoc.Parameter
java.lang.reflect.Parameter
org.omg.Dynamic.Parameter


Occurences of PARAMETER

PARAMETER occurences:
java.lang.annotation.PARAMETER
javax.lang.model.element.PARAMETER
javax.swing.text.html.parser.PARAMETER


Occurences of Parameter (constructors)

Parameter (constructors) occurences:
org.omg.Dynamic.Parameter()
org.omg.Dynamic.Parameter(org.omg.CORBA.Any, org.omg.CORBA.ParameterMode)


Occurences of ParameterBlock (constructors)

ParameterBlock (constructors) occurences:
java.awt.image.renderable.ParameterBlock()
java.awt.image.renderable.ParameterBlock(java.util.Vector)
java.awt.image.renderable.ParameterBlock(java.util.Vector, java.util.Vector)


Occurences of ParameterizedType

ParameterizedType occurences:
com.sun.javadoc.ParameterizedType
java.lang.reflect.ParameterizedType


Occurences of ParameterModeHolder (constructors)

ParameterModeHolder (constructors) occurences:
org.omg.CORBA.ParameterModeHolder()
org.omg.CORBA.ParameterModeHolder(org.omg.CORBA.ParameterMode)


Occurences of parameters

parameters occurences:
com.sun.javadoc.ExecutableMemberDoc.parameters()
java.awt.image.renderable.parameters


Occurences of paramString

paramString occurences:
java.awt.AWTEvent.paramString()
java.awt.Button.paramString()
java.awt.Checkbox.paramString()
java.awt.CheckboxMenuItem.paramString()
java.awt.Choice.paramString()
java.awt.Component.paramString()
java.awt.Container.paramString()
java.awt.Dialog.paramString()
java.awt.Event.paramString()
java.awt.event.ActionEvent.paramString()
java.awt.event.AdjustmentEvent.paramString()
java.awt.event.ComponentEvent.paramString()
java.awt.event.ContainerEvent.paramString()
java.awt.event.FocusEvent.paramString()
java.awt.event.HierarchyEvent.paramString()
java.awt.event.InputMethodEvent.paramString()
java.awt.event.InvocationEvent.paramString()
java.awt.event.ItemEvent.paramString()
java.awt.event.KeyEvent.paramString()
java.awt.event.MouseEvent.paramString()
java.awt.event.MouseWheelEvent.paramString()
java.awt.event.PaintEvent.paramString()
java.awt.event.TextEvent.paramString()
java.awt.event.WindowEvent.paramString()
java.awt.FileDialog.paramString()
java.awt.Frame.paramString()
java.awt.Label.paramString()
java.awt.List.paramString()
java.awt.Menu.paramString()
java.awt.MenuComponent.paramString()
java.awt.MenuItem.paramString()
java.awt.MenuShortcut.paramString()
java.awt.Scrollbar.paramString()
java.awt.ScrollPane.paramString()
java.awt.ScrollPaneAdjustable.paramString()
java.awt.TextArea.paramString()
java.awt.TextComponent.paramString()
java.awt.TextField.paramString()
javax.swing.AbstractButton.paramString()
javax.swing.event.InternalFrameEvent.paramString()
javax.swing.JApplet.paramString()
javax.swing.JButton.paramString()
javax.swing.JCheckBox.paramString()
javax.swing.JCheckBoxMenuItem.paramString()
javax.swing.JColorChooser.paramString()
javax.swing.JComboBox.paramString()
javax.swing.JComponent.paramString()
javax.swing.JDesktopPane.paramString()
javax.swing.JDialog.paramString()
javax.swing.JEditorPane.paramString()
javax.swing.JFileChooser.paramString()
javax.swing.JFrame.paramString()
javax.swing.JInternalFrame.paramString()
javax.swing.JLabel.paramString()
javax.swing.JLayeredPane.paramString()
javax.swing.JList.paramString()
javax.swing.JMenu.paramString()
javax.swing.JMenuBar.paramString()
javax.swing.JMenuItem.paramString()
javax.swing.JOptionPane.paramString()
javax.swing.JPanel.paramString()
javax.swing.JPasswordField.paramString()
javax.swing.JPopupMenu.paramString()
javax.swing.JProgressBar.paramString()
javax.swing.JRadioButton.paramString()
javax.swing.JRadioButtonMenuItem.paramString()
javax.swing.JRootPane.paramString()
javax.swing.JScrollBar.paramString()
javax.swing.JScrollPane.paramString()
javax.swing.JSeparator.paramString()
javax.swing.JSlider.paramString()
javax.swing.JSplitPane.paramString()
javax.swing.JTabbedPane.paramString()
javax.swing.JTable.paramString()
javax.swing.JTextArea.paramString()
javax.swing.JTextField.paramString()
javax.swing.JTextPane.paramString()
javax.swing.JToggleButton.paramString()
javax.swing.JToolBar.paramString()
javax.swing.JToolTip.paramString()
javax.swing.JTree.paramString()
javax.swing.JViewport.paramString()
javax.swing.JWindow.paramString()
javax.swing.table.JTableHeader.paramString()
javax.swing.text.JTextComponent.paramString()


Occurences of parent

parent occurences:
com.sun.jdi.ThreadGroupReference.parent()
java.awt.image.parent
java.util.parent
java.util.prefs.AbstractPreferences.parent()
java.util.prefs.Preferences.parent()
javax.swing.tree.parent
org.omg.CORBA.Context.parent()


Occurences of park

park occurences:
java.util.concurrent.locks.LockSupport.park()
java.util.concurrent.locks.LockSupport.park(java.lang.Object)


Occurences of parkNanos

parkNanos occurences:
java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long)
java.util.concurrent.locks.LockSupport.parkNanos(long)


Occurences of parkUntil

parkUntil occurences:
java.util.concurrent.locks.LockSupport.parkUntil(java.lang.Object, long)
java.util.concurrent.locks.LockSupport.parkUntil(long)


Occurences of parse

parse occurences:
com.sun.source.util.JavacTask.parse()
java.net.HttpCookie.parse(java.lang.String)
java.text.ChoiceFormat.parse(java.lang.String, java.text.ParsePosition)
java.text.DateFormat.parse(java.lang.String)
java.text.DateFormat.parse(java.lang.String, java.text.ParsePosition)
java.text.DecimalFormat.parse(java.lang.String, java.text.ParsePosition)
java.text.MessageFormat.parse(java.lang.String)
java.text.MessageFormat.parse(java.lang.String, java.text.ParsePosition)
java.text.NumberFormat.parse(java.lang.String)
java.text.NumberFormat.parse(java.lang.String, java.text.ParsePosition)
java.text.SimpleDateFormat.parse(java.lang.String, java.text.ParsePosition)
java.time.Duration.parse(java.lang.CharSequence)
java.time.format.DateTimeFormatter.parse(java.lang.CharSequence)
java.time.format.DateTimeFormatter.parse(java.lang.CharSequence, java.text.ParsePosition)
java.time.format.DateTimeFormatter.parse(java.lang.CharSequence, java.time.temporal.TemporalQuery)
java.time.Instant.parse(java.lang.CharSequence)
java.time.LocalDate.parse(java.lang.CharSequence)
java.time.LocalDate.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.LocalDateTime.parse(java.lang.CharSequence)
java.time.LocalDateTime.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.LocalTime.parse(java.lang.CharSequence)
java.time.LocalTime.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.MonthDay.parse(java.lang.CharSequence)
java.time.MonthDay.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.OffsetDateTime.parse(java.lang.CharSequence)
java.time.OffsetDateTime.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.OffsetTime.parse(java.lang.CharSequence)
java.time.OffsetTime.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.Period.parse(java.lang.CharSequence)
java.time.Year.parse(java.lang.CharSequence)
java.time.Year.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.YearMonth.parse(java.lang.CharSequence)
java.time.YearMonth.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.time.ZonedDateTime.parse(java.lang.CharSequence)
java.time.ZonedDateTime.parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)
java.util.Date.parse(java.lang.String)
java.util.Locale.LanguageRange.parse(java.lang.String)
java.util.Locale.LanguageRange.parse(java.lang.String, java.util.Map)
java.util.logging.Level.parse(java.lang.String)
javax.activation.MimeTypeParameterList.parse(java.lang.String)
javax.naming.NameParser.parse(java.lang.String)
javax.swing.text.html.HTMLEditorKit.Parser.parse(java.io.Reader, javax.swing.text.html.HTMLEditorKit.ParserCallback, boolean)
javax.swing.text.html.parser.DocumentParser.parse(java.io.Reader, javax.swing.text.html.HTMLEditorKit.ParserCallback, boolean)
javax.swing.text.html.parser.Parser.parse(java.io.Reader)
javax.swing.text.html.parser.ParserDelegator.parse(java.io.Reader, javax.swing.text.html.HTMLEditorKit.ParserCallback, boolean)
javax.xml.parsers.DocumentBuilder.parse(java.io.File)
javax.xml.parsers.DocumentBuilder.parse(java.io.InputStream)
javax.xml.parsers.DocumentBuilder.parse(java.io.InputStream, java.lang.String)
javax.xml.parsers.DocumentBuilder.parse(java.lang.String)
javax.xml.parsers.DocumentBuilder.parse(org.xml.sax.InputSource)
javax.xml.parsers.SAXParser.parse(java.io.File, org.xml.sax.HandlerBase)
javax.xml.parsers.SAXParser.parse(java.io.File, org.xml.sax.helpers.DefaultHandler)
javax.xml.parsers.SAXParser.parse(java.io.InputStream, org.xml.sax.HandlerBase)
javax.xml.parsers.SAXParser.parse(java.io.InputStream, org.xml.sax.HandlerBase, java.lang.String)
javax.xml.parsers.SAXParser.parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler)
javax.xml.parsers.SAXParser.parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler, java.lang.String)
javax.xml.parsers.SAXParser.parse(java.lang.String, org.xml.sax.HandlerBase)
javax.xml.parsers.SAXParser.parse(java.lang.String, org.xml.sax.helpers.DefaultHandler)
javax.xml.parsers.SAXParser.parse(org.xml.sax.InputSource, org.xml.sax.HandlerBase)
javax.xml.parsers.SAXParser.parse(org.xml.sax.InputSource, org.xml.sax.helpers.DefaultHandler)
org.w3c.dom.ls.LSParser.parse(org.w3c.dom.ls.LSInput)
org.xml.sax.helpers.ParserAdapter.parse(java.lang.String)
org.xml.sax.helpers.ParserAdapter.parse(org.xml.sax.InputSource)
org.xml.sax.helpers.XMLFilterImpl.parse(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.parse(org.xml.sax.InputSource)
org.xml.sax.helpers.XMLReaderAdapter.parse(java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.parse(org.xml.sax.InputSource)
org.xml.sax.Parser.parse(java.lang.String)
org.xml.sax.Parser.parse(org.xml.sax.InputSource)
org.xml.sax.XMLReader.parse(java.lang.String)
org.xml.sax.XMLReader.parse(org.xml.sax.InputSource)


Occurences of parseAnySimpleType

parseAnySimpleType occurences:
javax.xml.bind.DatatypeConverter.parseAnySimpleType(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseAnySimpleType(java.lang.String)


Occurences of parseBase64Binary

parseBase64Binary occurences:
javax.xml.bind.DatatypeConverter.parseBase64Binary(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseBase64Binary(java.lang.String)


Occurences of parseBoolean

parseBoolean occurences:
java.lang.Boolean.parseBoolean(java.lang.String)
javax.xml.bind.DatatypeConverter.parseBoolean(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseBoolean(java.lang.String)


Occurences of parseByte

parseByte occurences:
java.lang.Byte.parseByte(java.lang.String)
java.lang.Byte.parseByte(java.lang.String, int)
javax.xml.bind.DatatypeConverter.parseByte(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseByte(java.lang.String)


Occurences of ParseConversionEventImpl (constructors)

ParseConversionEventImpl (constructors) occurences:
javax.xml.bind.helpers.ParseConversionEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator)
javax.xml.bind.helpers.ParseConversionEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator, java.lang.Throwable)


Occurences of parseDate

parseDate occurences:
javax.xml.bind.DatatypeConverter.parseDate(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseDate(java.lang.String)


Occurences of parseDateTime

parseDateTime occurences:
javax.xml.bind.DatatypeConverter.parseDateTime(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseDateTime(java.lang.String)


Occurences of parseDecimal

parseDecimal occurences:
javax.xml.bind.DatatypeConverter.parseDecimal(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseDecimal(java.lang.String)


Occurences of parseDouble

parseDouble occurences:
java.lang.Double.parseDouble(java.lang.String)
javax.xml.bind.DatatypeConverter.parseDouble(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseDouble(java.lang.String)


Occurences of parseFloat

parseFloat occurences:
java.lang.Float.parseFloat(java.lang.String)
javax.xml.bind.DatatypeConverter.parseFloat(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseFloat(java.lang.String)


Occurences of parseHexBinary

parseHexBinary occurences:
javax.xml.bind.DatatypeConverter.parseHexBinary(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseHexBinary(java.lang.String)


Occurences of parseInt

parseInt occurences:
java.lang.Integer.parseInt(java.lang.String)
java.lang.Integer.parseInt(java.lang.String, int)
javax.xml.bind.DatatypeConverter.parseInt(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseInt(java.lang.String)


Occurences of parseInteger

parseInteger occurences:
javax.xml.bind.DatatypeConverter.parseInteger(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseInteger(java.lang.String)


Occurences of parseLong

parseLong occurences:
java.lang.Long.parseLong(java.lang.String)
java.lang.Long.parseLong(java.lang.String, int)
javax.xml.bind.DatatypeConverter.parseLong(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseLong(java.lang.String)


Occurences of parseObject

parseObject occurences:
java.text.DateFormat.parseObject(java.lang.String, java.text.ParsePosition)
java.text.Format.parseObject(java.lang.String)
java.text.Format.parseObject(java.lang.String, java.text.ParsePosition)
java.text.MessageFormat.parseObject(java.lang.String, java.text.ParsePosition)
java.text.NumberFormat.parseObject(java.lang.String, java.text.ParsePosition)


Occurences of parseQName

parseQName occurences:
javax.xml.bind.DatatypeConverter.parseQName(java.lang.String, javax.xml.namespace.NamespaceContext)
javax.xml.bind.DatatypeConverterInterface.parseQName(java.lang.String, javax.xml.namespace.NamespaceContext)


Occurences of Parser

Parser occurences:
javax.swing.text.html.HTMLEditorKit.Parser.Parser()
javax.swing.text.html.parser.Parser
org.xml.sax.Parser


Occurences of ParserAdapter (constructors)

ParserAdapter (constructors) occurences:
org.xml.sax.helpers.ParserAdapter()
org.xml.sax.helpers.ParserAdapter(org.xml.sax.Parser)


Occurences of ParserConfigurationException (constructors)

ParserConfigurationException (constructors) occurences:
javax.xml.parsers.ParserConfigurationException()
javax.xml.parsers.ParserConfigurationException(java.lang.String)


Occurences of parsers

parsers occurences:
compact2.javax.xml.parsers
compact3.javax.xml.parsers
javax.xml.parsers


Occurences of parseShort

parseShort occurences:
java.lang.Short.parseShort(java.lang.String)
java.lang.Short.parseShort(java.lang.String, int)
javax.xml.bind.DatatypeConverter.parseShort(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseShort(java.lang.String)


Occurences of parseString

parseString occurences:
javax.xml.bind.DatatypeConverter.parseString(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseString(java.lang.String)


Occurences of parseTime

parseTime occurences:
javax.xml.bind.DatatypeConverter.parseTime(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseTime(java.lang.String)


Occurences of parseUnsignedInt

parseUnsignedInt occurences:
java.lang.Integer.parseUnsignedInt(java.lang.String)
java.lang.Integer.parseUnsignedInt(java.lang.String, int)
javax.xml.bind.DatatypeConverter.parseUnsignedInt(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseUnsignedInt(java.lang.String)


Occurences of parseUnsignedLong

parseUnsignedLong occurences:
java.lang.Long.parseUnsignedLong(java.lang.String)
java.lang.Long.parseUnsignedLong(java.lang.String, int)


Occurences of parseUnsignedShort

parseUnsignedShort occurences:
javax.xml.bind.DatatypeConverter.parseUnsignedShort(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.parseUnsignedShort(java.lang.String)


Occurences of PartialResultException (constructors)

PartialResultException (constructors) occurences:
javax.naming.PartialResultException()
javax.naming.PartialResultException(java.lang.String)


Occurences of partitioningBy

partitioningBy occurences:
java.util.stream.Collectors.partitioningBy(java.util.function.Predicate)
java.util.stream.Collectors.partitioningBy(java.util.function.Predicate, java.util.stream.Collector)


Occurences of partName

partName occurences:
java.io.partName
javax.jws.WebParam.partName()
javax.jws.WebResult.partName()
javax.xml.ws.RequestWrapper.partName()
javax.xml.ws.ResponseWrapper.partName()


Occurences of PasswordProtection

PasswordProtection occurences:
java.security.KeyStore.PasswordProtection.PasswordProtection(char:A)
java.security.KeyStore.PasswordProtection.PasswordProtection(char:A, java.lang.String, java.security.spec.AlgorithmParameterSpec)


Occurences of paste

paste occurences:
javax.accessibility.AccessibleEditableText.paste(int)
javax.swing.JSpinner.AccessibleJSpinner.paste(int)
javax.swing.text.JTextComponent.paste()
javax.swing.text.JTextComponent.AccessibleJTextComponent.paste(int)


Occurences of path

path occurences:
javax.swing.event.path
javax.swing.event.path


Occurences of pattern

pattern occurences:
java.util.regex.Matcher.pattern()
java.util.regex.Pattern.pattern()


Occurences of PBEKeySpec (constructors)

PBEKeySpec (constructors) occurences:
javax.crypto.spec.PBEKeySpec(char:A)
javax.crypto.spec.PBEKeySpec(char:A, byte:A, int)
javax.crypto.spec.PBEKeySpec(char:A, byte:A, int, int)


Occurences of PBEParameterSpec (constructors)

PBEParameterSpec (constructors) occurences:
javax.crypto.spec.PBEParameterSpec(byte:A, int)
javax.crypto.spec.PBEParameterSpec(byte:A, int, java.security.spec.AlgorithmParameterSpec)


Occurences of PCL

PCL occurences:
javax.print.PCL
javax.print.PCL
javax.print.PCL


Occurences of PDF

PDF occurences:
javax.print.PDF
javax.print.PDF
javax.print.PDF


Occurences of peek

peek occurences:
java.net.DatagramSocketImpl.peek(java.net.InetAddress)
java.util.ArrayDeque.peek()
java.util.concurrent.ArrayBlockingQueue.peek()
java.util.concurrent.BlockingDeque.peek()
java.util.concurrent.ConcurrentLinkedDeque.peek()
java.util.concurrent.ConcurrentLinkedQueue.peek()
java.util.concurrent.DelayQueue.peek()
java.util.concurrent.LinkedBlockingDeque.peek()
java.util.concurrent.LinkedBlockingQueue.peek()
java.util.concurrent.LinkedTransferQueue.peek()
java.util.concurrent.PriorityBlockingQueue.peek()
java.util.concurrent.SynchronousQueue.peek()
java.util.Deque.peek()
java.util.LinkedList.peek()
java.util.PriorityQueue.peek()
java.util.Queue.peek()
java.util.Stack.peek()
java.util.stream.DoubleStream.peek(java.util.function.DoubleConsumer)
java.util.stream.IntStream.peek(java.util.function.IntConsumer)
java.util.stream.LongStream.peek(java.util.function.LongConsumer)
java.util.stream.Stream.peek(java.util.function.Consumer)
javax.xml.stream.util.EventReaderDelegate.peek()
javax.xml.stream.XMLEventReader.peek()


Occurences of peekEvent

peekEvent occurences:
java.awt.EventQueue.peekEvent()
java.awt.EventQueue.peekEvent(int)


Occurences of peekFirst

peekFirst occurences:
java.util.ArrayDeque.peekFirst()
java.util.concurrent.ConcurrentLinkedDeque.peekFirst()
java.util.concurrent.LinkedBlockingDeque.peekFirst()
java.util.Deque.peekFirst()
java.util.LinkedList.peekFirst()


Occurences of peekLast

peekLast occurences:
java.util.ArrayDeque.peekLast()
java.util.concurrent.ConcurrentLinkedDeque.peekLast()
java.util.concurrent.LinkedBlockingDeque.peekLast()
java.util.Deque.peekLast()
java.util.LinkedList.peekLast()


Occurences of PENDING

PENDING occurences:
javax.print.attribute.standard.PENDING
javax.swing.PENDING


Occurences of period

period occurences:
java.time.chrono.Chronology.period(int, int, int)
java.time.chrono.IsoChronology.period(int, int, int)


Occurences of Permission

Permission occurences:
java.security.Permission
java.security.acl.Permission


Occurences of permissions

permissions occurences:
java.nio.file.attribute.AclEntry.permissions()
java.nio.file.attribute.PosixFileAttributes.permissions()
java.security.acl.AclEntry.permissions()


Occurences of permits

permits occurences:
java.security.AlgorithmConstraints.permits(java.util.Set, java.lang.String, java.security.AlgorithmParameters)
java.security.AlgorithmConstraints.permits(java.util.Set, java.lang.String, java.security.Key, java.security.AlgorithmParameters)
java.security.AlgorithmConstraints.permits(java.util.Set, java.security.Key)


Occurences of PERSIST_STORE (constructors)

PERSIST_STORE (constructors) occurences:
org.omg.CORBA.PERSIST_STORE()
org.omg.CORBA.PERSIST_STORE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.PERSIST_STORE(java.lang.String)
org.omg.CORBA.PERSIST_STORE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of PERSONAL_ENVELOPE

PERSONAL_ENVELOPE occurences:
java.awt.PERSONAL_ENVELOPE
javax.print.attribute.standard.PERSONAL_ENVELOPE
javax.print.attribute.standard.PERSONAL_ENVELOPE


Occurences of PHAGS_PA

PHAGS_PA occurences:
java.lang.PHAGS_PA
java.lang.PHAGS_PA


Occurences of PhantomReference (constructors)

PhantomReference (constructors) occurences:
java.lang.ref.PhantomReference(java.lang.Object, java.lang.ref.ReferenceQueue)
java.lang.ref.PhantomReference(T, java.lang.ref.ReferenceQueue)


Occurences of Phaser (constructors)

Phaser (constructors) occurences:
java.util.concurrent.Phaser()
java.util.concurrent.Phaser(int)
java.util.concurrent.Phaser(java.util.concurrent.Phaser)
java.util.concurrent.Phaser(java.util.concurrent.Phaser, int)


Occurences of PHOENICIAN

PHOENICIAN occurences:
java.lang.PHOENICIAN
java.lang.PHOENICIAN


Occurences of PI

PI occurences:
java.lang.PI
java.lang.PI
javax.swing.text.html.parser.PI


Occurences of PIPE

PIPE occurences:
java.lang.PIPE
java.lang.PIPE


Occurences of PipedInputStream (constructors)

PipedInputStream (constructors) occurences:
java.io.PipedInputStream()
java.io.PipedInputStream(int)
java.io.PipedInputStream(java.io.PipedOutputStream)
java.io.PipedInputStream(java.io.PipedOutputStream, int)


Occurences of PipedOutputStream (constructors)

PipedOutputStream (constructors) occurences:
java.io.PipedOutputStream()
java.io.PipedOutputStream(java.io.PipedInputStream)


Occurences of PipedReader (constructors)

PipedReader (constructors) occurences:
java.io.PipedReader()
java.io.PipedReader(int)
java.io.PipedReader(java.io.PipedWriter)
java.io.PipedReader(java.io.PipedWriter, int)


Occurences of PipedWriter (constructors)

PipedWriter (constructors) occurences:
java.io.PipedWriter()
java.io.PipedWriter(java.io.PipedReader)


Occurences of PixelGrabber (constructors)

PixelGrabber (constructors) occurences:
java.awt.image.PixelGrabber(java.awt.Image, int, int, int, int, boolean)
java.awt.image.PixelGrabber(java.awt.Image, int, int, int, int, int:A, int, int)
java.awt.image.PixelGrabber(java.awt.image.ImageProducer, int, int, int, int, int:A, int, int)


Occurences of PKCS12Attribute (constructors)

PKCS12Attribute (constructors) occurences:
java.security.PKCS12Attribute(byte:A)
java.security.PKCS12Attribute(java.lang.String, java.lang.String)


Occurences of PKIXBuilderParameters (constructors)

PKIXBuilderParameters (constructors) occurences:
java.security.cert.PKIXBuilderParameters(java.security.KeyStore, java.security.cert.CertSelector)
java.security.cert.PKIXBuilderParameters(java.util.Set, java.security.cert.CertSelector)


Occurences of PKIXParameters (constructors)

PKIXParameters (constructors) occurences:
java.security.cert.PKIXParameters(java.security.KeyStore)
java.security.cert.PKIXParameters(java.util.Set)


Occurences of PlainDocument (constructors)

PlainDocument (constructors) occurences:
javax.swing.text.PlainDocument()
javax.swing.text.PlainDocument(javax.swing.text.AbstractDocument.Content)


Occurences of play

play occurences:
java.applet.Applet.play(java.net.URL)
java.applet.Applet.play(java.net.URL, java.lang.String)
java.applet.AudioClip.play()


Occurences of PLUS

PLUS occurences:
com.sun.source.tree.PLUS
javax.management.PLUS


Occurences of plus

plus occurences:
java.math.BigDecimal.plus()
java.math.BigDecimal.plus(java.math.MathContext)
java.time.chrono.ChronoLocalDate.plus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoLocalDate.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ChronoLocalDateTime.plus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoLocalDateTime.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ChronoPeriod.plus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoZonedDateTime.plus(java.time.temporal.TemporalAmount)
java.time.chrono.ChronoZonedDateTime.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.HijrahDate.plus(java.time.temporal.TemporalAmount)
java.time.chrono.HijrahDate.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.JapaneseDate.plus(java.time.temporal.TemporalAmount)
java.time.chrono.JapaneseDate.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.MinguoDate.plus(java.time.temporal.TemporalAmount)
java.time.chrono.MinguoDate.plus(long, java.time.temporal.TemporalUnit)
java.time.chrono.ThaiBuddhistDate.plus(java.time.temporal.TemporalAmount)
java.time.chrono.ThaiBuddhistDate.plus(long, java.time.temporal.TemporalUnit)
java.time.DayOfWeek.plus(long)
java.time.Duration.plus(java.time.Duration)
java.time.Duration.plus(long, java.time.temporal.TemporalUnit)
java.time.Instant.plus(java.time.temporal.TemporalAmount)
java.time.Instant.plus(long, java.time.temporal.TemporalUnit)
java.time.LocalDate.plus(java.time.temporal.TemporalAmount)
java.time.LocalDate.plus(long, java.time.temporal.TemporalUnit)
java.time.LocalDateTime.plus(java.time.temporal.TemporalAmount)
java.time.LocalDateTime.plus(long, java.time.temporal.TemporalUnit)
java.time.LocalTime.plus(java.time.temporal.TemporalAmount)
java.time.LocalTime.plus(long, java.time.temporal.TemporalUnit)
java.time.Month.plus(long)
java.time.OffsetDateTime.plus(java.time.temporal.TemporalAmount)
java.time.OffsetDateTime.plus(long, java.time.temporal.TemporalUnit)
java.time.OffsetTime.plus(java.time.temporal.TemporalAmount)
java.time.OffsetTime.plus(long, java.time.temporal.TemporalUnit)
java.time.Period.plus(java.time.temporal.TemporalAmount)
java.time.temporal.Temporal.plus(java.time.temporal.TemporalAmount)
java.time.temporal.Temporal.plus(long, java.time.temporal.TemporalUnit)
java.time.Year.plus(java.time.temporal.TemporalAmount)
java.time.Year.plus(long, java.time.temporal.TemporalUnit)
java.time.YearMonth.plus(java.time.temporal.TemporalAmount)
java.time.YearMonth.plus(long, java.time.temporal.TemporalUnit)
java.time.ZonedDateTime.plus(java.time.temporal.TemporalAmount)
java.time.ZonedDateTime.plus(long, java.time.temporal.TemporalUnit)
javax.management.Query.plus(javax.management.ValueExp, javax.management.ValueExp)


Occurences of plusDays

plusDays occurences:
java.time.Duration.plusDays(long)
java.time.LocalDate.plusDays(long)
java.time.LocalDateTime.plusDays(long)
java.time.OffsetDateTime.plusDays(long)
java.time.Period.plusDays(long)
java.time.ZonedDateTime.plusDays(long)


Occurences of plusHours

plusHours occurences:
java.time.Duration.plusHours(long)
java.time.LocalDateTime.plusHours(long)
java.time.LocalTime.plusHours(long)
java.time.OffsetDateTime.plusHours(long)
java.time.OffsetTime.plusHours(long)
java.time.ZonedDateTime.plusHours(long)


Occurences of plusMillis

plusMillis occurences:
java.time.Duration.plusMillis(long)
java.time.Instant.plusMillis(long)


Occurences of plusMinutes

plusMinutes occurences:
java.time.Duration.plusMinutes(long)
java.time.LocalDateTime.plusMinutes(long)
java.time.LocalTime.plusMinutes(long)
java.time.OffsetDateTime.plusMinutes(long)
java.time.OffsetTime.plusMinutes(long)
java.time.ZonedDateTime.plusMinutes(long)


Occurences of plusMonths

plusMonths occurences:
java.time.LocalDate.plusMonths(long)
java.time.LocalDateTime.plusMonths(long)
java.time.OffsetDateTime.plusMonths(long)
java.time.Period.plusMonths(long)
java.time.YearMonth.plusMonths(long)
java.time.ZonedDateTime.plusMonths(long)


Occurences of plusNanos

plusNanos occurences:
java.time.Duration.plusNanos(long)
java.time.Instant.plusNanos(long)
java.time.LocalDateTime.plusNanos(long)
java.time.LocalTime.plusNanos(long)
java.time.OffsetDateTime.plusNanos(long)
java.time.OffsetTime.plusNanos(long)
java.time.ZonedDateTime.plusNanos(long)


Occurences of plusSeconds

plusSeconds occurences:
java.time.Duration.plusSeconds(long)
java.time.Instant.plusSeconds(long)
java.time.LocalDateTime.plusSeconds(long)
java.time.LocalTime.plusSeconds(long)
java.time.OffsetDateTime.plusSeconds(long)
java.time.OffsetTime.plusSeconds(long)
java.time.ZonedDateTime.plusSeconds(long)


Occurences of plusWeeks

plusWeeks occurences:
java.time.LocalDate.plusWeeks(long)
java.time.LocalDateTime.plusWeeks(long)
java.time.OffsetDateTime.plusWeeks(long)
java.time.ZonedDateTime.plusWeeks(long)


Occurences of plusYears

plusYears occurences:
java.time.LocalDate.plusYears(long)
java.time.LocalDateTime.plusYears(long)
java.time.OffsetDateTime.plusYears(long)
java.time.Period.plusYears(long)
java.time.Year.plusYears(long)
java.time.YearMonth.plusYears(long)
java.time.ZonedDateTime.plusYears(long)


Occurences of PNG

PNG occurences:
javax.print.PNG
javax.print.PNG
javax.print.PNG


Occurences of Point (constructors)

Point (constructors) occurences:
java.awt.Point()
java.awt.Point(int, int)
java.awt.Point(java.awt.Point)


Occurences of Policy

Policy occurences:
java.security.Policy
javax.security.auth.Policy
org.omg.CORBA.Policy


Occurences of Policy (constructors)

Policy (constructors) occurences:
java.security.Policy()
javax.security.auth.Policy()


Occurences of PolicyError (constructors)

PolicyError (constructors) occurences:
org.omg.CORBA.PolicyError()
org.omg.CORBA.PolicyError(java.lang.String, short)
org.omg.CORBA.PolicyError(short)


Occurences of PolicyErrorHolder (constructors)

PolicyErrorHolder (constructors) occurences:
org.omg.CORBA.PolicyErrorHolder()
org.omg.CORBA.PolicyErrorHolder(org.omg.CORBA.PolicyError)


Occurences of PolicyHolder (constructors)

PolicyHolder (constructors) occurences:
org.omg.CORBA.PolicyHolder()
org.omg.CORBA.PolicyHolder(org.omg.CORBA.Policy)


Occurences of PolicyListHolder (constructors)

PolicyListHolder (constructors) occurences:
org.omg.CORBA.PolicyListHolder()
org.omg.CORBA.PolicyListHolder(org.omg.CORBA.Policy:A)


Occurences of policytool

policytool occurences:
policytool
policytool


Occurences of policy_type

policy_type occurences:
org.omg.CORBA.PolicyOperations.policy_type()
org.omg.CORBA._PolicyStub.policy_type()


Occurences of poll

poll occurences:
java.lang.ref.ReferenceQueue.poll()
java.nio.file.WatchService.poll()
java.nio.file.WatchService.poll(long, java.util.concurrent.TimeUnit)
java.util.ArrayDeque.poll()
java.util.concurrent.ArrayBlockingQueue.poll()
java.util.concurrent.ArrayBlockingQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingDeque.poll()
java.util.concurrent.BlockingDeque.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.BlockingQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.CompletionService.poll()
java.util.concurrent.CompletionService.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.poll()
java.util.concurrent.ConcurrentLinkedQueue.poll()
java.util.concurrent.DelayQueue.poll()
java.util.concurrent.DelayQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ExecutorCompletionService.poll()
java.util.concurrent.ExecutorCompletionService.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingDeque.poll()
java.util.concurrent.LinkedBlockingDeque.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedBlockingQueue.poll()
java.util.concurrent.LinkedBlockingQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedTransferQueue.poll()
java.util.concurrent.LinkedTransferQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.PriorityBlockingQueue.poll()
java.util.concurrent.PriorityBlockingQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.concurrent.SynchronousQueue.poll()
java.util.concurrent.SynchronousQueue.poll(long, java.util.concurrent.TimeUnit)
java.util.Deque.poll()
java.util.LinkedList.poll()
java.util.PriorityQueue.poll()
java.util.Queue.poll()


Occurences of pollFirst

pollFirst occurences:
java.util.ArrayDeque.pollFirst()
java.util.concurrent.BlockingDeque.pollFirst(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.pollFirst()
java.util.concurrent.ConcurrentSkipListSet.pollFirst()
java.util.concurrent.LinkedBlockingDeque.pollFirst()
java.util.concurrent.LinkedBlockingDeque.pollFirst(long, java.util.concurrent.TimeUnit)
java.util.Deque.pollFirst()
java.util.LinkedList.pollFirst()
java.util.NavigableSet.pollFirst()
java.util.TreeSet.pollFirst()


Occurences of pollFirstEntry

pollFirstEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.pollFirstEntry()
java.util.NavigableMap.pollFirstEntry()
java.util.TreeMap.pollFirstEntry()


Occurences of pollLast

pollLast occurences:
java.util.ArrayDeque.pollLast()
java.util.concurrent.BlockingDeque.pollLast(long, java.util.concurrent.TimeUnit)
java.util.concurrent.ConcurrentLinkedDeque.pollLast()
java.util.concurrent.ConcurrentSkipListSet.pollLast()
java.util.concurrent.LinkedBlockingDeque.pollLast()
java.util.concurrent.LinkedBlockingDeque.pollLast(long, java.util.concurrent.TimeUnit)
java.util.Deque.pollLast()
java.util.LinkedList.pollLast()
java.util.NavigableSet.pollLast()
java.util.TreeSet.pollLast()


Occurences of pollLastEntry

pollLastEntry occurences:
java.util.concurrent.ConcurrentSkipListMap.pollLastEntry()
java.util.NavigableMap.pollLastEntry()
java.util.TreeMap.pollLastEntry()


Occurences of Polygon (constructors)

Polygon (constructors) occurences:
java.awt.Polygon()
java.awt.Polygon(int:A, int:A, int)


Occurences of pop

pop occurences:
java.awt.EventQueue.pop()
java.util.ArrayDeque.pop()
java.util.concurrent.ConcurrentLinkedDeque.pop()
java.util.concurrent.LinkedBlockingDeque.pop()
java.util.Deque.pop()
java.util.LinkedList.pop()
java.util.Stack.pop()


Occurences of populate

populate occurences:
javax.sql.rowset.CachedRowSet.populate(java.sql.ResultSet)
javax.sql.rowset.CachedRowSet.populate(java.sql.ResultSet, int)


Occurences of Popup (constructors)

Popup (constructors) occurences:
javax.swing.Popup()
javax.swing.Popup(java.awt.Component, java.awt.Component, int, int)


Occurences of PopupMenu (constructors)

PopupMenu (constructors) occurences:
java.awt.PopupMenu()
java.awt.PopupMenu(java.lang.String)


Occurences of POPUP_MENU

POPUP_MENU occurences:
javax.accessibility.POPUP_MENU
javax.swing.plaf.synth.POPUP_MENU


Occurences of portable

portable occurences:
org.omg.CORBA.portable
org.omg.CORBA_2_3.portable
org.omg.PortableServer.portable


Occurences of portName

portName occurences:
javax.jws.WebService.portName()
javax.xml.ws.WebServiceProvider.portName()


Occurences of PORTRAIT

PORTRAIT occurences:
java.awt.PORTRAIT
java.awt.print.PORTRAIT
javax.print.attribute.standard.PORTRAIT


Occurences of PortUnreachableException (constructors)

PortUnreachableException (constructors) occurences:
java.net.PortUnreachableException()
java.net.PortUnreachableException(java.lang.String)


Occurences of pos

pos occurences:
java.io.pos
java.io.pos
java.io.pos
java.io.pos
java.io.pos


Occurences of position

position occurences:
com.sun.javadoc.Doc.position()
com.sun.javadoc.Tag.position()
java.nio.Buffer.position()
java.nio.Buffer.position(int)
java.nio.channels.FileChannel.position()
java.nio.channels.FileChannel.position(long)
java.nio.channels.FileLock.position()
java.nio.channels.SeekableByteChannel.position()
java.nio.channels.SeekableByteChannel.position(long)
java.sql.Blob.position(byte:A, long)
java.sql.Blob.position(java.sql.Blob, long)
java.sql.Clob.position(java.lang.String, long)
java.sql.Clob.position(java.sql.Clob, long)
javax.sql.rowset.serial.SerialBlob.position(byte:A, long)
javax.sql.rowset.serial.SerialBlob.position(java.sql.Blob, long)
javax.sql.rowset.serial.SerialClob.position(java.lang.String, long)
javax.sql.rowset.serial.SerialClob.position(java.sql.Clob, long)


Occurences of positionForMouseEvent

positionForMouseEvent occurences:
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.positionForMouseEvent(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController.positionForMouseEvent(java.awt.event.MouseEvent)


Occurences of POSITIVE_INFINITY

POSITIVE_INFINITY occurences:
java.lang.POSITIVE_INFINITY
java.lang.POSITIVE_INFINITY


Occurences of postDeregister

postDeregister occurences:
javax.management.loading.MLet.postDeregister()
javax.management.MBeanRegistration.postDeregister()
javax.management.modelmbean.RequiredModelMBean.postDeregister()
javax.management.monitor.Monitor.postDeregister()
javax.management.relation.RelationService.postDeregister()
javax.management.relation.RelationSupport.postDeregister()
javax.management.remote.JMXConnectorServer.postDeregister()
javax.management.StandardMBean.postDeregister()
javax.management.timer.Timer.postDeregister()


Occurences of postEvent

postEvent occurences:
java.awt.Component.postEvent(java.awt.Event)
java.awt.EventQueue.postEvent(java.awt.AWTEvent)
java.awt.MenuComponent.postEvent(java.awt.Event)
java.awt.MenuContainer.postEvent(java.awt.Event)
java.awt.Window.postEvent(java.awt.Event)


Occurences of postinvoke

postinvoke occurences:
org.omg.PortableServer.ServantLocatorOperations.postinvoke(byte:A, org.omg.PortableServer.POA, java.lang.String, java.lang.Object, org.omg.PortableServer.Servant)
org.omg.PortableServer._ServantLocatorStub.postinvoke(byte:A, org.omg.PortableServer.POA, java.lang.String, java.lang.Object, org.omg.PortableServer.Servant)


Occurences of postProcessKeyEvent

postProcessKeyEvent occurences:
java.awt.DefaultKeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent)
java.awt.KeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent)
java.awt.KeyEventPostProcessor.postProcessKeyEvent(java.awt.event.KeyEvent)


Occurences of postRegister

postRegister occurences:
javax.management.loading.MLet.postRegister(java.lang.Boolean)
javax.management.MBeanRegistration.postRegister(java.lang.Boolean)
javax.management.modelmbean.RequiredModelMBean.postRegister(java.lang.Boolean)
javax.management.monitor.Monitor.postRegister(java.lang.Boolean)
javax.management.relation.RelationService.postRegister(java.lang.Boolean)
javax.management.relation.RelationSupport.postRegister(java.lang.Boolean)
javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean)
javax.management.StandardMBean.postRegister(java.lang.Boolean)
javax.management.timer.Timer.postRegister(java.lang.Boolean)


Occurences of POSTSCRIPT

POSTSCRIPT occurences:
javax.print.POSTSCRIPT
javax.print.POSTSCRIPT
javax.print.POSTSCRIPT


Occurences of postVisitDirectory

postVisitDirectory occurences:
java.nio.file.FileVisitor.postVisitDirectory(java.lang.Object, java.io.IOException)
java.nio.file.FileVisitor.postVisitDirectory(T, java.io.IOException)
java.nio.file.SimpleFileVisitor.postVisitDirectory(java.lang.Object, java.io.IOException)
java.nio.file.SimpleFileVisitor.postVisitDirectory(T, java.io.IOException)


Occurences of pow

pow occurences:
java.lang.Math.pow(double, double)
java.lang.StrictMath.pow(double, double)
java.math.BigDecimal.pow(int)
java.math.BigDecimal.pow(int, java.math.MathContext)
java.math.BigInteger.pow(int)


Occurences of precision

precision occurences:
java.math.BigDecimal.precision()
java.time.temporal.TemporalQueries.precision()


Occurences of preDeregister

preDeregister occurences:
javax.management.loading.MLet.preDeregister()
javax.management.MBeanRegistration.preDeregister()
javax.management.modelmbean.RequiredModelMBean.preDeregister()
javax.management.monitor.Monitor.preDeregister()
javax.management.relation.RelationService.preDeregister()
javax.management.relation.RelationSupport.preDeregister()
javax.management.remote.JMXConnectorServer.preDeregister()
javax.management.StandardMBean.preDeregister()
javax.management.timer.Timer.preDeregister()


Occurences of Predicate

Predicate occurences:
java.util.function.Predicate
javax.sql.rowset.Predicate


Occurences of Preface

Preface occurences:
Preface
Preface
Preface
Preface
Preface
Preface
Preface
Preface
Preface
Preface
Preface


Occurences of preferenceChanged

preferenceChanged occurences:
javax.swing.text.AsyncBoxView.preferenceChanged(javax.swing.text.View, boolean, boolean)
javax.swing.text.AsyncBoxView.ChildState.preferenceChanged(boolean, boolean)
javax.swing.text.BoxView.preferenceChanged(javax.swing.text.View, boolean, boolean)
javax.swing.text.View.preferenceChanged(javax.swing.text.View, boolean, boolean)


Occurences of preferredLayoutSize

preferredLayoutSize occurences:
java.awt.BorderLayout.preferredLayoutSize(java.awt.Container)
java.awt.CardLayout.preferredLayoutSize(java.awt.Container)
java.awt.FlowLayout.preferredLayoutSize(java.awt.Container)
java.awt.GridBagLayout.preferredLayoutSize(java.awt.Container)
java.awt.GridLayout.preferredLayoutSize(java.awt.Container)
java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)
javax.swing.BoxLayout.preferredLayoutSize(java.awt.Container)
javax.swing.GroupLayout.preferredLayoutSize(java.awt.Container)
javax.swing.JRootPane.RootLayout.preferredLayoutSize(java.awt.Container)
javax.swing.JSpinner.DefaultEditor.preferredLayoutSize(java.awt.Container)
javax.swing.OverlayLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicScrollBarUI.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.preferredLayoutSize(java.awt.Container)
javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(java.awt.Container)
javax.swing.ScrollPaneLayout.preferredLayoutSize(java.awt.Container)
javax.swing.SpringLayout.preferredLayoutSize(java.awt.Container)
javax.swing.ViewportLayout.preferredLayoutSize(java.awt.Container)


Occurences of preferredSize

preferredSize occurences:
java.awt.Component.preferredSize()
java.awt.Container.preferredSize()
java.awt.List.preferredSize()
java.awt.List.preferredSize(int)
java.awt.TextArea.preferredSize()
java.awt.TextArea.preferredSize(int, int)
java.awt.TextField.preferredSize()
java.awt.TextField.preferredSize(int)
javax.swing.plaf.basic.preferredSize


Occurences of prefs

prefs occurences:
compact3.java.util.prefs
java.util.prefs


Occurences of preinvoke

preinvoke occurences:
org.omg.PortableServer.ServantLocatorOperations.preinvoke(byte:A, org.omg.PortableServer.POA, java.lang.String, org.omg.PortableServer.ServantLocatorPackage.CookieHolder)
org.omg.PortableServer._ServantLocatorStub.preinvoke(byte:A, org.omg.PortableServer.POA, java.lang.String, org.omg.PortableServer.ServantLocatorPackage.CookieHolder)


Occurences of prepareCall

prepareCall occurences:
java.sql.Connection.prepareCall(java.lang.String)
java.sql.Connection.prepareCall(java.lang.String, int, int)
java.sql.Connection.prepareCall(java.lang.String, int, int, int)


Occurences of prepareImage

prepareImage occurences:
java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver)
java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)


Occurences of prepareStatement

prepareStatement occurences:
java.sql.Connection.prepareStatement(java.lang.String)
java.sql.Connection.prepareStatement(java.lang.String, int)
java.sql.Connection.prepareStatement(java.lang.String, int, int)
java.sql.Connection.prepareStatement(java.lang.String, int, int, int)
java.sql.Connection.prepareStatement(java.lang.String, int:A)
java.sql.Connection.prepareStatement(java.lang.String, java.lang.String:A)


Occurences of preRegister

preRegister occurences:
javax.management.loading.MLet.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.modelmbean.RequiredModelMBean.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.monitor.Monitor.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.relation.RelationService.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.relation.RelationSupport.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.remote.JMXConnectorServer.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.StandardMBean.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
javax.management.timer.Timer.preRegister(javax.management.MBeanServer, javax.management.ObjectName)


Occurences of PRESSED

PRESSED occurences:
javax.accessibility.PRESSED
javax.swing.plaf.synth.PRESSED
javax.swing.PRESSED


Occurences of previous

previous occurences:
java.awt.CardLayout.previous(java.awt.Container)
java.sql.ResultSet.previous()
java.text.BreakIterator.previous()
java.text.CharacterIterator.previous()
java.text.CollationElementIterator.previous()
java.text.StringCharacterIterator.previous()
java.time.temporal.TemporalAdjusters.previous(java.time.DayOfWeek)
java.util.ListIterator.previous()
javax.swing.text.ElementIterator.previous()
javax.swing.text.Segment.previous()


Occurences of preVisitDirectory

preVisitDirectory occurences:
java.nio.file.FileVisitor.preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.FileVisitor.preVisitDirectory(T, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.SimpleFileVisitor.preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.SimpleFileVisitor.preVisitDirectory(T, java.nio.file.attribute.BasicFileAttributes)


Occurences of PrimitiveType

PrimitiveType occurences:
com.sun.jdi.PrimitiveType
javax.lang.model.type.PrimitiveType


Occurences of Principal

Principal occurences:
java.security.Principal
org.omg.CORBA.Principal


Occurences of PrincipalHolder (constructors)

PrincipalHolder (constructors) occurences:
org.omg.CORBA.PrincipalHolder()
org.omg.CORBA.PrincipalHolder(org.omg.CORBA.Principal)


Occurences of print

print occurences:
java.awt.Component.print(java.awt.Graphics)
java.awt.Container.print(java.awt.Graphics)
java.awt.Desktop.print(java.io.File)
java.awt.print
java.awt.print.Printable.print(java.awt.Graphics, java.awt.print.PageFormat, int)
java.awt.print.PrinterJob.print()
java.awt.print.PrinterJob.print(javax.print.attribute.PrintRequestAttributeSet)
java.io.PrintStream.print(boolean)
java.io.PrintStream.print(char)
java.io.PrintStream.print(char:A)
java.io.PrintStream.print(double)
java.io.PrintStream.print(float)
java.io.PrintStream.print(int)
java.io.PrintStream.print(java.lang.Object)
java.io.PrintStream.print(java.lang.String)
java.io.PrintStream.print(long)
java.io.PrintWriter.print(boolean)
java.io.PrintWriter.print(char)
java.io.PrintWriter.print(char:A)
java.io.PrintWriter.print(double)
java.io.PrintWriter.print(float)
java.io.PrintWriter.print(int)
java.io.PrintWriter.print(java.lang.Object)
java.io.PrintWriter.print(java.lang.String)
java.io.PrintWriter.print(long)
javax.print
javax.print.DocPrintJob.print(javax.print.Doc, javax.print.attribute.PrintRequestAttributeSet)
javax.print.MultiDocPrintJob.print(javax.print.MultiDoc, javax.print.attribute.PrintRequestAttributeSet)
javax.swing.JComponent.print(java.awt.Graphics)
javax.swing.JTable.print()
javax.swing.JTable.print(javax.swing.JTable.PrintMode)
javax.swing.JTable.print(javax.swing.JTable.PrintMode, java.text.MessageFormat, java.text.MessageFormat)
javax.swing.JTable.print(javax.swing.JTable.PrintMode, java.text.MessageFormat, java.text.MessageFormat, boolean, javax.print.attribute.PrintRequestAttributeSet, boolean)
javax.swing.JTable.print(javax.swing.JTable.PrintMode, java.text.MessageFormat, java.text.MessageFormat, boolean, javax.print.attribute.PrintRequestAttributeSet, boolean, javax.print.PrintService)
javax.swing.text.JTextComponent.print()
javax.swing.text.JTextComponent.print(java.text.MessageFormat, java.text.MessageFormat)
javax.swing.text.JTextComponent.print(java.text.MessageFormat, java.text.MessageFormat, boolean, javax.print.PrintService, javax.print.attribute.PrintRequestAttributeSet, boolean)


Occurences of PRINTABLE

PRINTABLE occurences:
java.awt.PRINTABLE
javax.print.PRINTABLE


Occurences of printAll

printAll occurences:
java.awt.Component.printAll(java.awt.Graphics)
javax.swing.JComponent.printAll(java.awt.Graphics)


Occurences of printAnySimpleType

printAnySimpleType occurences:
javax.xml.bind.DatatypeConverter.printAnySimpleType(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.printAnySimpleType(java.lang.String)


Occurences of printBase64Binary

printBase64Binary occurences:
javax.xml.bind.DatatypeConverter.printBase64Binary(byte:A)
javax.xml.bind.DatatypeConverterInterface.printBase64Binary(byte:A)


Occurences of printBoolean

printBoolean occurences:
javax.xml.bind.DatatypeConverter.printBoolean(boolean)
javax.xml.bind.DatatypeConverterInterface.printBoolean(boolean)


Occurences of printByte

printByte occurences:
javax.xml.bind.DatatypeConverter.printByte(byte)
javax.xml.bind.DatatypeConverterInterface.printByte(byte)


Occurences of printComponents

printComponents occurences:
java.awt.Container.printComponents(java.awt.Graphics)
java.awt.ScrollPane.printComponents(java.awt.Graphics)


Occurences of PrintConversionEventImpl (constructors)

PrintConversionEventImpl (constructors) occurences:
javax.xml.bind.helpers.PrintConversionEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator)
javax.xml.bind.helpers.PrintConversionEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator, java.lang.Throwable)


Occurences of printDataTransferCompleted

printDataTransferCompleted occurences:
javax.print.event.PrintJobAdapter.printDataTransferCompleted(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printDataTransferCompleted(javax.print.event.PrintJobEvent)


Occurences of printDate

printDate occurences:
javax.xml.bind.DatatypeConverter.printDate(java.util.Calendar)
javax.xml.bind.DatatypeConverterInterface.printDate(java.util.Calendar)


Occurences of printDateTime

printDateTime occurences:
javax.xml.bind.DatatypeConverter.printDateTime(java.util.Calendar)
javax.xml.bind.DatatypeConverterInterface.printDateTime(java.util.Calendar)


Occurences of printDecimal

printDecimal occurences:
javax.xml.bind.DatatypeConverter.printDecimal(java.math.BigDecimal)
javax.xml.bind.DatatypeConverterInterface.printDecimal(java.math.BigDecimal)


Occurences of printDialog

printDialog occurences:
java.awt.print.PrinterJob.printDialog()
java.awt.print.PrinterJob.printDialog(javax.print.attribute.PrintRequestAttributeSet)
javax.print.ServiceUI.printDialog(java.awt.GraphicsConfiguration, int, int, javax.print.PrintService:A, javax.print.PrintService, javax.print.DocFlavor, javax.print.attribute.PrintRequestAttributeSet)


Occurences of printDouble

printDouble occurences:
javax.xml.bind.DatatypeConverter.printDouble(double)
javax.xml.bind.DatatypeConverterInterface.printDouble(double)


Occurences of PrinterAbortException (constructors)

PrinterAbortException (constructors) occurences:
java.awt.print.PrinterAbortException()
java.awt.print.PrinterAbortException(java.lang.String)


Occurences of PrinterException (constructors)

PrinterException (constructors) occurences:
java.awt.print.PrinterException()
java.awt.print.PrinterException(java.lang.String)


Occurences of printError

printError occurences:
com.sun.javadoc.DocErrorReporter.printError(com.sun.javadoc.SourcePosition, java.lang.String)
com.sun.javadoc.DocErrorReporter.printError(java.lang.String)


Occurences of PrinterStateReasons (constructors)

PrinterStateReasons (constructors) occurences:
javax.print.attribute.standard.PrinterStateReasons()
javax.print.attribute.standard.PrinterStateReasons(int)
javax.print.attribute.standard.PrinterStateReasons(int, float)
javax.print.attribute.standard.PrinterStateReasons(java.util.Map)


Occurences of PrintException (constructors)

PrintException (constructors) occurences:
javax.print.PrintException()
javax.print.PrintException(java.lang.Exception)
javax.print.PrintException(java.lang.String)
javax.print.PrintException(java.lang.String, java.lang.Exception)


Occurences of printf

printf occurences:
java.io.Console.printf(java.lang.String, java.lang.Object...)
java.io.PrintStream.printf(java.lang.String, java.lang.Object...)
java.io.PrintStream.printf(java.util.Locale, java.lang.String, java.lang.Object...)
java.io.PrintWriter.printf(java.lang.String, java.lang.Object...)
java.io.PrintWriter.printf(java.util.Locale, java.lang.String, java.lang.Object...)


Occurences of printFloat

printFloat occurences:
javax.xml.bind.DatatypeConverter.printFloat(float)
javax.xml.bind.DatatypeConverterInterface.printFloat(float)


Occurences of printHexBinary

printHexBinary occurences:
javax.xml.bind.DatatypeConverter.printHexBinary(byte:A)
javax.xml.bind.DatatypeConverterInterface.printHexBinary(byte:A)


Occurences of printInt

printInt occurences:
javax.xml.bind.DatatypeConverter.printInt(int)
javax.xml.bind.DatatypeConverterInterface.printInt(int)


Occurences of printInteger

printInteger occurences:
javax.xml.bind.DatatypeConverter.printInteger(java.math.BigInteger)
javax.xml.bind.DatatypeConverterInterface.printInteger(java.math.BigInteger)


Occurences of printJobCanceled

printJobCanceled occurences:
javax.print.event.PrintJobAdapter.printJobCanceled(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printJobCanceled(javax.print.event.PrintJobEvent)


Occurences of printJobCompleted

printJobCompleted occurences:
javax.print.event.PrintJobAdapter.printJobCompleted(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printJobCompleted(javax.print.event.PrintJobEvent)


Occurences of printJobFailed

printJobFailed occurences:
javax.print.event.PrintJobAdapter.printJobFailed(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printJobFailed(javax.print.event.PrintJobEvent)


Occurences of printJobNoMoreEvents

printJobNoMoreEvents occurences:
javax.print.event.PrintJobAdapter.printJobNoMoreEvents(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printJobNoMoreEvents(javax.print.event.PrintJobEvent)


Occurences of printJobRequiresAttention

printJobRequiresAttention occurences:
javax.print.event.PrintJobAdapter.printJobRequiresAttention(javax.print.event.PrintJobEvent)
javax.print.event.PrintJobListener.printJobRequiresAttention(javax.print.event.PrintJobEvent)


Occurences of println

println occurences:
java.io.PrintStream.println()
java.io.PrintStream.println(boolean)
java.io.PrintStream.println(char)
java.io.PrintStream.println(char:A)
java.io.PrintStream.println(double)
java.io.PrintStream.println(float)
java.io.PrintStream.println(int)
java.io.PrintStream.println(java.lang.Object)
java.io.PrintStream.println(java.lang.String)
java.io.PrintStream.println(long)
java.io.PrintWriter.println()
java.io.PrintWriter.println(boolean)
java.io.PrintWriter.println(char)
java.io.PrintWriter.println(char:A)
java.io.PrintWriter.println(double)
java.io.PrintWriter.println(float)
java.io.PrintWriter.println(int)
java.io.PrintWriter.println(java.lang.Object)
java.io.PrintWriter.println(java.lang.String)
java.io.PrintWriter.println(long)
java.sql.DriverManager.println(java.lang.String)


Occurences of printLong

printLong occurences:
javax.xml.bind.DatatypeConverter.printLong(long)
javax.xml.bind.DatatypeConverterInterface.printLong(long)


Occurences of printMessage

printMessage occurences:
com.sun.source.util.DocTrees.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence, com.sun.source.doctree.DocTree, com.sun.source.doctree.DocCommentTree, com.sun.source.tree.CompilationUnitTree)
com.sun.source.util.Trees.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence, com.sun.source.tree.Tree, com.sun.source.tree.CompilationUnitTree)
javax.annotation.processing.Messager.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence)
javax.annotation.processing.Messager.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence, javax.lang.model.element.Element)
javax.annotation.processing.Messager.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence, javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror)
javax.annotation.processing.Messager.printMessage(javax.tools.Diagnostic.Kind, java.lang.CharSequence, javax.lang.model.element.Element, javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationValue)


Occurences of printNotice

printNotice occurences:
com.sun.javadoc.DocErrorReporter.printNotice(com.sun.javadoc.SourcePosition, java.lang.String)
com.sun.javadoc.DocErrorReporter.printNotice(java.lang.String)


Occurences of printQName

printQName occurences:
javax.xml.bind.DatatypeConverter.printQName(javax.xml.namespace.QName, javax.xml.namespace.NamespaceContext)
javax.xml.bind.DatatypeConverterInterface.printQName(javax.xml.namespace.QName, javax.xml.namespace.NamespaceContext)


Occurences of printShort

printShort occurences:
javax.xml.bind.DatatypeConverter.printShort(short)
javax.xml.bind.DatatypeConverterInterface.printShort(short)


Occurences of printStackTrace

printStackTrace occurences:
java.lang.Throwable.printStackTrace()
java.lang.Throwable.printStackTrace(java.io.PrintStream)
java.lang.Throwable.printStackTrace(java.io.PrintWriter)
javax.xml.bind.JAXBException.printStackTrace()
javax.xml.bind.JAXBException.printStackTrace(java.io.PrintStream)
javax.xml.bind.JAXBException.printStackTrace(java.io.PrintWriter)
javax.xml.bind.TypeConstraintException.printStackTrace()
javax.xml.bind.TypeConstraintException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.dsig.TransformException.printStackTrace()
javax.xml.crypto.dsig.TransformException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.dsig.TransformException.printStackTrace(java.io.PrintWriter)
javax.xml.crypto.dsig.XMLSignatureException.printStackTrace()
javax.xml.crypto.dsig.XMLSignatureException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.dsig.XMLSignatureException.printStackTrace(java.io.PrintWriter)
javax.xml.crypto.KeySelectorException.printStackTrace()
javax.xml.crypto.KeySelectorException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.KeySelectorException.printStackTrace(java.io.PrintWriter)
javax.xml.crypto.MarshalException.printStackTrace()
javax.xml.crypto.MarshalException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.MarshalException.printStackTrace(java.io.PrintWriter)
javax.xml.crypto.NoSuchMechanismException.printStackTrace()
javax.xml.crypto.NoSuchMechanismException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.NoSuchMechanismException.printStackTrace(java.io.PrintWriter)
javax.xml.crypto.URIReferenceException.printStackTrace()
javax.xml.crypto.URIReferenceException.printStackTrace(java.io.PrintStream)
javax.xml.crypto.URIReferenceException.printStackTrace(java.io.PrintWriter)
javax.xml.transform.TransformerException.printStackTrace()
javax.xml.transform.TransformerException.printStackTrace(java.io.PrintStream)
javax.xml.transform.TransformerException.printStackTrace(java.io.PrintWriter)
javax.xml.xpath.XPathException.printStackTrace()
javax.xml.xpath.XPathException.printStackTrace(java.io.PrintStream)
javax.xml.xpath.XPathException.printStackTrace(java.io.PrintWriter)


Occurences of PrintStream (constructors)

PrintStream (constructors) occurences:
java.io.PrintStream(java.io.File)
java.io.PrintStream(java.io.File, java.lang.String)
java.io.PrintStream(java.io.OutputStream)
java.io.PrintStream(java.io.OutputStream, boolean)
java.io.PrintStream(java.io.OutputStream, boolean, java.lang.String)
java.io.PrintStream(java.lang.String)
java.io.PrintStream(java.lang.String, java.lang.String)


Occurences of printString

printString occurences:
javax.xml.bind.DatatypeConverter.printString(java.lang.String)
javax.xml.bind.DatatypeConverterInterface.printString(java.lang.String)


Occurences of printTime

printTime occurences:
javax.xml.bind.DatatypeConverter.printTime(java.util.Calendar)
javax.xml.bind.DatatypeConverterInterface.printTime(java.util.Calendar)


Occurences of printUnsignedInt

printUnsignedInt occurences:
javax.xml.bind.DatatypeConverter.printUnsignedInt(long)
javax.xml.bind.DatatypeConverterInterface.printUnsignedInt(long)


Occurences of printUnsignedShort

printUnsignedShort occurences:
javax.xml.bind.DatatypeConverter.printUnsignedShort(int)
javax.xml.bind.DatatypeConverterInterface.printUnsignedShort(int)


Occurences of printWarning

printWarning occurences:
com.sun.javadoc.DocErrorReporter.printWarning(com.sun.javadoc.SourcePosition, java.lang.String)
com.sun.javadoc.DocErrorReporter.printWarning(java.lang.String)


Occurences of PrintWriter (constructors)

PrintWriter (constructors) occurences:
java.io.PrintWriter(java.io.File)
java.io.PrintWriter(java.io.File, java.lang.String)
java.io.PrintWriter(java.io.OutputStream)
java.io.PrintWriter(java.io.OutputStream, boolean)
java.io.PrintWriter(java.io.Writer)
java.io.PrintWriter(java.io.Writer, boolean)
java.io.PrintWriter(java.lang.String)
java.io.PrintWriter(java.lang.String, java.lang.String)


Occurences of PriorityBlockingQueue (constructors)

PriorityBlockingQueue (constructors) occurences:
java.util.concurrent.PriorityBlockingQueue()
java.util.concurrent.PriorityBlockingQueue(int)
java.util.concurrent.PriorityBlockingQueue(int, java.util.Comparator)
java.util.concurrent.PriorityBlockingQueue(java.util.Collection)


Occurences of PriorityQueue (constructors)

PriorityQueue (constructors) occurences:
java.util.PriorityQueue()
java.util.PriorityQueue(int)
java.util.PriorityQueue(int, java.util.Comparator)
java.util.PriorityQueue(java.util.Collection)
java.util.PriorityQueue(java.util.Comparator)
java.util.PriorityQueue(java.util.PriorityQueue)
java.util.PriorityQueue(java.util.SortedSet)


Occurences of PRIVATE

PRIVATE occurences:
java.lang.invoke.PRIVATE
java.lang.reflect.PRIVATE
java.nio.channels.PRIVATE
java.security.PRIVATE
javax.lang.model.element.PRIVATE


Occurences of PrivateKeyEntry

PrivateKeyEntry occurences:
java.security.KeyStore.PrivateKeyEntry.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate:A)
java.security.KeyStore.PrivateKeyEntry.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate:A, java.util.Set)


Occurences of PrivateMLet (constructors)

PrivateMLet (constructors) occurences:
javax.management.loading.PrivateMLet(java.net.URL:A, boolean)
javax.management.loading.PrivateMLet(java.net.URL:A, java.lang.ClassLoader, boolean)
javax.management.loading.PrivateMLet(java.net.URL:A, java.lang.ClassLoader, java.net.URLStreamHandlerFactory, boolean)


Occurences of probeContentType

probeContentType occurences:
java.nio.file.Files.probeContentType(java.nio.file.Path)
java.nio.file.spi.FileTypeDetector.probeContentType(java.nio.file.Path)


Occurences of process

process occurences:
com.sun.jdi.connect.VMStartException.process()
com.sun.jdi.VirtualMachine.process()
javax.annotation.processing.AbstractProcessor.process(java.util.Set, javax.annotation.processing.RoundEnvironment)
javax.annotation.processing.Processor.process(java.util.Set, javax.annotation.processing.RoundEnvironment)
javax.swing.SwingWorker.process(java.util.List)


Occurences of processActionEvent

processActionEvent occurences:
java.awt.Button.processActionEvent(java.awt.event.ActionEvent)
java.awt.List.processActionEvent(java.awt.event.ActionEvent)
java.awt.MenuItem.processActionEvent(java.awt.event.ActionEvent)
java.awt.TextField.processActionEvent(java.awt.event.ActionEvent)


Occurences of ProcessBuilder (constructors)

ProcessBuilder (constructors) occurences:
java.lang.ProcessBuilder(java.lang.String...)
java.lang.ProcessBuilder(java.util.List)


Occurences of processComponentEvent

processComponentEvent occurences:
java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent)
javax.swing.plaf.LayerUI.processComponentEvent(java.awt.event.ComponentEvent, javax.swing.JLayer)


Occurences of processEvent

processEvent occurences:
java.awt.Button.processEvent(java.awt.AWTEvent)
java.awt.Checkbox.processEvent(java.awt.AWTEvent)
java.awt.CheckboxMenuItem.processEvent(java.awt.AWTEvent)
java.awt.Choice.processEvent(java.awt.AWTEvent)
java.awt.Component.processEvent(java.awt.AWTEvent)
java.awt.Container.processEvent(java.awt.AWTEvent)
java.awt.List.processEvent(java.awt.AWTEvent)
java.awt.MenuComponent.processEvent(java.awt.AWTEvent)
java.awt.MenuItem.processEvent(java.awt.AWTEvent)
java.awt.Scrollbar.processEvent(java.awt.AWTEvent)
java.awt.TextComponent.processEvent(java.awt.AWTEvent)
java.awt.TextField.processEvent(java.awt.AWTEvent)
java.awt.Window.processEvent(java.awt.AWTEvent)


Occurences of processFocusEvent

processFocusEvent occurences:
java.awt.Component.processFocusEvent(java.awt.event.FocusEvent)
javax.swing.JFormattedTextField.processFocusEvent(java.awt.event.FocusEvent)
javax.swing.JPopupMenu.processFocusEvent(java.awt.event.FocusEvent)
javax.swing.plaf.LayerUI.processFocusEvent(java.awt.event.FocusEvent, javax.swing.JLayer)


Occurences of processHierarchyBoundsEvent

processHierarchyBoundsEvent occurences:
java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent)
javax.swing.plaf.LayerUI.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent, javax.swing.JLayer)


Occurences of processHierarchyEvent

processHierarchyEvent occurences:
java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent)
javax.swing.plaf.LayerUI.processHierarchyEvent(java.awt.event.HierarchyEvent, javax.swing.JLayer)


Occurences of processImageComplete

processImageComplete occurences:
javax.imageio.ImageReader.processImageComplete()
javax.imageio.ImageWriter.processImageComplete()


Occurences of processImageProgress

processImageProgress occurences:
javax.imageio.ImageReader.processImageProgress(float)
javax.imageio.ImageWriter.processImageProgress(float)


Occurences of processImageStarted

processImageStarted occurences:
javax.imageio.ImageReader.processImageStarted(int)
javax.imageio.ImageWriter.processImageStarted(int)


Occurences of PROCESSING

PROCESSING occurences:
javax.print.attribute.standard.PROCESSING
javax.print.attribute.standard.PROCESSING


Occurences of processing

processing occurences:
compact3.javax.annotation.processing
javax.annotation.processing


Occurences of processingInstruction

processingInstruction occurences:
org.xml.sax.ContentHandler.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.HandlerBase.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.helpers.DefaultHandler.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.helpers.ParserAdapter.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.processingInstruction(java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.processingInstruction(java.lang.String, java.lang.String)


Occurences of ProcessingInstruction

ProcessingInstruction occurences:
javax.xml.stream.events.ProcessingInstruction
org.w3c.dom.ProcessingInstruction


Occurences of processInputMethodEvent

processInputMethodEvent occurences:
java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent)
javax.swing.JFormattedTextField.processInputMethodEvent(java.awt.event.InputMethodEvent)
javax.swing.plaf.LayerUI.processInputMethodEvent(java.awt.event.InputMethodEvent, javax.swing.JLayer)
javax.swing.text.JTextComponent.processInputMethodEvent(java.awt.event.InputMethodEvent)


Occurences of processItemEvent

processItemEvent occurences:
java.awt.Checkbox.processItemEvent(java.awt.event.ItemEvent)
java.awt.CheckboxMenuItem.processItemEvent(java.awt.event.ItemEvent)
java.awt.Choice.processItemEvent(java.awt.event.ItemEvent)
java.awt.List.processItemEvent(java.awt.event.ItemEvent)


Occurences of processKeyBinding

processKeyBinding occurences:
javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean)
javax.swing.JMenuBar.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean)
javax.swing.JTable.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean)


Occurences of processKeyEvent

processKeyEvent occurences:
java.awt.Component.processKeyEvent(java.awt.event.KeyEvent)
java.awt.DefaultKeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent)
java.awt.KeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent)
javax.swing.JComboBox.processKeyEvent(java.awt.event.KeyEvent)
javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent)
javax.swing.JMenu.processKeyEvent(java.awt.event.KeyEvent)
javax.swing.JMenuBar.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.JMenuItem.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent)
javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.MenuElement.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.MenuSelectionManager.processKeyEvent(java.awt.event.KeyEvent)
javax.swing.plaf.LayerUI.processKeyEvent(java.awt.event.KeyEvent, javax.swing.JLayer)


Occurences of processMouseEvent

processMouseEvent occurences:
java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent)
javax.swing.JMenuBar.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.JMenuItem.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.JPopupMenu.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.MenuElement.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.MenuSelectionManager.processMouseEvent(java.awt.event.MouseEvent)
javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.processMouseEvent(javax.swing.JMenuItem, java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.plaf.basic.BasicRadioButtonMenuItemUI.processMouseEvent(javax.swing.JMenuItem, java.awt.event.MouseEvent, javax.swing.MenuElement:A, javax.swing.MenuSelectionManager)
javax.swing.plaf.LayerUI.processMouseEvent(java.awt.event.MouseEvent, javax.swing.JLayer)


Occurences of processMouseMotionEvent

processMouseMotionEvent occurences:
java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent)
javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent)
javax.swing.plaf.LayerUI.processMouseMotionEvent(java.awt.event.MouseEvent, javax.swing.JLayer)


Occurences of processMouseWheelEvent

processMouseWheelEvent occurences:
java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)
java.awt.ScrollPane.processMouseWheelEvent(java.awt.event.MouseWheelEvent)
javax.swing.plaf.LayerUI.processMouseWheelEvent(java.awt.event.MouseWheelEvent, javax.swing.JLayer)


Occurences of processThumbnailComplete

processThumbnailComplete occurences:
javax.imageio.ImageReader.processThumbnailComplete()
javax.imageio.ImageWriter.processThumbnailComplete()


Occurences of processThumbnailProgress

processThumbnailProgress occurences:
javax.imageio.ImageReader.processThumbnailProgress(float)
javax.imageio.ImageWriter.processThumbnailProgress(float)


Occurences of processThumbnailStarted

processThumbnailStarted occurences:
javax.imageio.ImageReader.processThumbnailStarted(int, int)
javax.imageio.ImageWriter.processThumbnailStarted(int, int)


Occurences of processWarningOccurred

processWarningOccurred occurences:
javax.imageio.ImageReader.processWarningOccurred(java.lang.String)
javax.imageio.ImageReader.processWarningOccurred(java.lang.String, java.lang.String)
javax.imageio.ImageWriter.processWarningOccurred(int, java.lang.String)
javax.imageio.ImageWriter.processWarningOccurred(int, java.lang.String, java.lang.String)


Occurences of processWindowEvent

processWindowEvent occurences:
java.awt.Window.processWindowEvent(java.awt.event.WindowEvent)
javax.swing.JDialog.processWindowEvent(java.awt.event.WindowEvent)
javax.swing.JFrame.processWindowEvent(java.awt.event.WindowEvent)


Occurences of programChange

programChange occurences:
javax.sound.midi.MidiChannel.programChange(int)
javax.sound.midi.MidiChannel.programChange(int, int)


Occurences of Programmer's Guide to the Java 2D API

Programmer's Guide to the Java 2D API occurences:
Programmer's Guide to the Java 2D API
Programmer's Guide to the Java 2D API


Occurences of PROGRESS

PROGRESS occurences:
java.util.jar.PROGRESS
java.util.jar.PROGRESS


Occurences of progressListeners

progressListeners occurences:
javax.imageio.progressListeners
javax.imageio.progressListeners


Occurences of PROGRESS_BAR

PROGRESS_BAR occurences:
javax.accessibility.PROGRESS_BAR
javax.swing.plaf.synth.PROGRESS_BAR


Occurences of prolepticYear

prolepticYear occurences:
java.time.chrono.Chronology.prolepticYear(java.time.chrono.Era, int)
java.time.chrono.HijrahChronology.prolepticYear(java.time.chrono.Era, int)
java.time.chrono.IsoChronology.prolepticYear(java.time.chrono.Era, int)
java.time.chrono.JapaneseChronology.prolepticYear(java.time.chrono.Era, int)
java.time.chrono.MinguoChronology.prolepticYear(java.time.chrono.Era, int)
java.time.chrono.ThaiBuddhistChronology.prolepticYear(java.time.chrono.Era, int)


Occurences of properties

properties occurences:
java.util.jar.Pack200.Packer.properties()
java.util.jar.Pack200.Unpacker.properties()
javax.sound.midi.MidiFileFormat.properties()
javax.sound.sampled.AudioFileFormat.properties()
javax.sound.sampled.AudioFormat.properties()


Occurences of Properties (constructors)

Properties (constructors) occurences:
java.util.Properties()
java.util.Properties(java.util.Properties)


Occurences of PROPERTY

PROPERTY occurences:
javax.xml.bind.annotation.PROPERTY
org.w3c.dom.bootstrap.PROPERTY


Occurences of propertyChange

propertyChange occurences:
java.beans.beancontext.BeanContextSupport.propertyChange(java.beans.PropertyChangeEvent)
java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
java.beans.PropertyChangeListenerProxy.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JLayer.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JList.AccessibleJList.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JPopupMenu.AccessibleJPopupMenu.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JScrollPane.AccessibleJScrollPane.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JSpinner.DefaultEditor.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.JTable.AccessibleJTable.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicButtonListener.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicDirectoryModel.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicEditorPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicLabelUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicRootPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicSplitPaneDivider.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTextAreaUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTextPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTextUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicToolBarUI.PropertyListener.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.metal.MetalRootPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.metal.MetalTextFieldUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthButtonUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthColorChooserUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthComboBoxUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthDesktopIconUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthDesktopPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthEditorPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthInternalFrameUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthLabelUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthListUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthMenuBarUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthMenuItemUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthMenuUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthOptionPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthPanelUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthPopupMenuUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthProgressBarUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthRootPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthScrollBarUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthScrollPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthSeparatorUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthSliderUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthSpinnerUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthSplitPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTabbedPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTableHeaderUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTableUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTextAreaUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTextFieldUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTextPaneUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthToolBarUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthToolTipUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthTreeUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthViewportUI.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.propertyChange(java.beans.PropertyChangeEvent)
javax.swing.table.DefaultTableColumnModel.propertyChange(java.beans.PropertyChangeEvent)


Occurences of PropertyChangeHandler

PropertyChangeHandler occurences:
javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler.PropertyChangeHandler()
javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler.PropertyChangeHandler()


Occurences of propertyChangeListener

propertyChangeListener occurences:
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener
javax.swing.plaf.basic.propertyChangeListener


Occurences of PropertyDescriptor (constructors)

PropertyDescriptor (constructors) occurences:
java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
java.beans.PropertyDescriptor(java.lang.String, java.lang.Class, java.lang.String, java.lang.String)
java.beans.PropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method)


Occurences of PropertyEditorSupport (constructors)

PropertyEditorSupport (constructors) occurences:
java.beans.PropertyEditorSupport()
java.beans.PropertyEditorSupport(java.lang.Object)


Occurences of PropertyException (constructors)

PropertyException (constructors) occurences:
javax.xml.bind.PropertyException(java.lang.String)
javax.xml.bind.PropertyException(java.lang.String, java.lang.Object)
javax.xml.bind.PropertyException(java.lang.String, java.lang.String)
javax.xml.bind.PropertyException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.PropertyException(java.lang.String, java.lang.Throwable)
javax.xml.bind.PropertyException(java.lang.Throwable)


Occurences of PropertyHandler

PropertyHandler occurences:
javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler.PropertyHandler()
javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler.PropertyHandler()


Occurences of PropertyResourceBundle (constructors)

PropertyResourceBundle (constructors) occurences:
java.util.PropertyResourceBundle(java.io.InputStream)
java.util.PropertyResourceBundle(java.io.Reader)


Occurences of PROTECTED

PROTECTED occurences:
java.lang.invoke.PROTECTED
java.lang.reflect.PROTECTED
javax.lang.model.element.PROTECTED


Occurences of ProtectionDomain (constructors)

ProtectionDomain (constructors) occurences:
java.security.ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection)
java.security.ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection, java.lang.ClassLoader, java.security.Principal:A)


Occurences of ProtocolException

ProtocolException occurences:
java.net.ProtocolException
javax.xml.ws.ProtocolException


Occurences of ProtocolException (constructors)

ProtocolException (constructors) occurences:
java.net.ProtocolException()
java.net.ProtocolException(java.lang.String)
javax.xml.ws.ProtocolException()
javax.xml.ws.ProtocolException(java.lang.String)
javax.xml.ws.ProtocolException(java.lang.String, java.lang.Throwable)
javax.xml.ws.ProtocolException(java.lang.Throwable)


Occurences of PROTOCOL_PROVIDER_CLASS_LOADER

PROTOCOL_PROVIDER_CLASS_LOADER occurences:
javax.management.remote.PROTOCOL_PROVIDER_CLASS_LOADER
javax.management.remote.PROTOCOL_PROVIDER_CLASS_LOADER


Occurences of PROTOCOL_PROVIDER_PACKAGES

PROTOCOL_PROVIDER_PACKAGES occurences:
javax.management.remote.PROTOCOL_PROVIDER_PACKAGES
javax.management.remote.PROTOCOL_PROVIDER_PACKAGES


Occurences of provideErrorFeedback

provideErrorFeedback occurences:
javax.swing.LookAndFeel.provideErrorFeedback(java.awt.Component)
javax.swing.plaf.metal.MetalLookAndFeel.provideErrorFeedback(java.awt.Component)


Occurences of Provider

Provider occurences:
java.security.Provider
javax.xml.ws.Provider
javax.xml.ws.spi.Provider


Occurences of provider

provider occurences:
com.sun.tools.attach.VirtualMachine.provider()
com.sun.tools.attach.VirtualMachineDescriptor.provider()
java.nio.channels.AsynchronousChannelGroup.provider()
java.nio.channels.AsynchronousServerSocketChannel.provider()
java.nio.channels.AsynchronousSocketChannel.provider()
java.nio.channels.SelectableChannel.provider()
java.nio.channels.Selector.provider()
java.nio.channels.spi.AbstractSelectableChannel.provider()
java.nio.channels.spi.AbstractSelector.provider()
java.nio.channels.spi.AsynchronousChannelProvider.provider()
java.nio.channels.spi.SelectorProvider.provider()
java.nio.file.FileSystem.provider()
javax.xml.ws.spi.Provider.provider()


Occurences of Provider (constructors)

Provider (constructors) occurences:
java.security.Provider(java.lang.String, double, java.lang.String)
javax.xml.ws.spi.Provider()


Occurences of ProviderException (constructors)

ProviderException (constructors) occurences:
java.security.ProviderException()
java.security.ProviderException(java.lang.String)
java.security.ProviderException(java.lang.String, java.lang.Throwable)
java.security.ProviderException(java.lang.Throwable)


Occurences of ProviderMismatchException (constructors)

ProviderMismatchException (constructors) occurences:
java.nio.file.ProviderMismatchException()
java.nio.file.ProviderMismatchException(java.lang.String)


Occurences of ProviderNotFoundException (constructors)

ProviderNotFoundException (constructors) occurences:
java.nio.file.ProviderNotFoundException()
java.nio.file.ProviderNotFoundException(java.lang.String)


Occurences of Proxy

Proxy occurences:
java.lang.reflect.Proxy
java.net.Proxy


Occurences of Proxy (constructors)

Proxy (constructors) occurences:
java.lang.reflect.Proxy(java.lang.reflect.InvocationHandler)
java.net.Proxy(java.net.Proxy.Type, java.net.SocketAddress)


Occurences of ProxyLazyValue

ProxyLazyValue occurences:
javax.swing.UIDefaults.ProxyLazyValue.ProxyLazyValue(java.lang.String)
javax.swing.UIDefaults.ProxyLazyValue.ProxyLazyValue(java.lang.String, java.lang.Object:A)
javax.swing.UIDefaults.ProxyLazyValue.ProxyLazyValue(java.lang.String, java.lang.String)
javax.swing.UIDefaults.ProxyLazyValue.ProxyLazyValue(java.lang.String, java.lang.String, java.lang.Object:A)


Occurences of PSSParameterSpec (constructors)

PSSParameterSpec (constructors) occurences:
java.security.spec.PSSParameterSpec(int)
java.security.spec.PSSParameterSpec(java.lang.String, java.lang.String, java.security.spec.AlgorithmParameterSpec, int, int)


Occurences of ptLineDist

ptLineDist occurences:
java.awt.geom.Line2D.ptLineDist(double, double)
java.awt.geom.Line2D.ptLineDist(double, double, double, double, double, double)
java.awt.geom.Line2D.ptLineDist(java.awt.geom.Point2D)


Occurences of ptLineDistSq

ptLineDistSq occurences:
java.awt.geom.Line2D.ptLineDistSq(double, double)
java.awt.geom.Line2D.ptLineDistSq(double, double, double, double, double, double)
java.awt.geom.Line2D.ptLineDistSq(java.awt.geom.Point2D)


Occurences of ptSegDist

ptSegDist occurences:
java.awt.geom.Line2D.ptSegDist(double, double)
java.awt.geom.Line2D.ptSegDist(double, double, double, double, double, double)
java.awt.geom.Line2D.ptSegDist(java.awt.geom.Point2D)


Occurences of ptSegDistSq

ptSegDistSq occurences:
java.awt.geom.Line2D.ptSegDistSq(double, double)
java.awt.geom.Line2D.ptSegDistSq(double, double, double, double, double, double)
java.awt.geom.Line2D.ptSegDistSq(java.awt.geom.Point2D)


Occurences of PUBLIC

PUBLIC occurences:
java.lang.invoke.PUBLIC
java.lang.reflect.PUBLIC
java.lang.reflect.PUBLIC
java.security.PUBLIC
javax.lang.model.element.PUBLIC
javax.swing.text.html.parser.PUBLIC


Occurences of PUBLIC_MEMBER

PUBLIC_MEMBER occurences:
javax.xml.bind.annotation.PUBLIC_MEMBER
org.omg.CORBA.PUBLIC_MEMBER


Occurences of publish

publish occurences:
java.util.logging.ConsoleHandler.publish(java.util.logging.LogRecord)
java.util.logging.FileHandler.publish(java.util.logging.LogRecord)
java.util.logging.Handler.publish(java.util.logging.LogRecord)
java.util.logging.MemoryHandler.publish(java.util.logging.LogRecord)
java.util.logging.SocketHandler.publish(java.util.logging.LogRecord)
java.util.logging.StreamHandler.publish(java.util.logging.LogRecord)
javax.swing.SwingWorker.publish(java.lang.Object:A)
javax.swing.SwingWorker.publish(V...)
javax.xml.ws.Endpoint.publish(java.lang.Object)
javax.xml.ws.Endpoint.publish(java.lang.String)
javax.xml.ws.Endpoint.publish(java.lang.String, java.lang.Object)
javax.xml.ws.Endpoint.publish(java.lang.String, java.lang.Object, javax.xml.ws.WebServiceFeature...)
javax.xml.ws.Endpoint.publish(javax.xml.ws.spi.http.HttpContext)


Occurences of purge

purge occurences:
java.util.concurrent.ThreadPoolExecutor.purge()
java.util.Timer.purge()


Occurences of purgeRelations

purgeRelations occurences:
javax.management.relation.RelationService.purgeRelations()
javax.management.relation.RelationServiceMBean.purgeRelations()


Occurences of push

push occurences:
java.awt.EventQueue.push(java.awt.EventQueue)
java.util.ArrayDeque.push(E)
java.util.ArrayDeque.push(java.lang.Object)
java.util.concurrent.BlockingDeque.push(E)
java.util.concurrent.BlockingDeque.push(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.push(E)
java.util.concurrent.ConcurrentLinkedDeque.push(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.push(E)
java.util.concurrent.LinkedBlockingDeque.push(java.lang.Object)
java.util.Deque.push(E)
java.util.Deque.push(java.lang.Object)
java.util.LinkedList.push(E)
java.util.LinkedList.push(java.lang.Object)
java.util.logging.MemoryHandler.push()
java.util.Stack.push(E)
java.util.Stack.push(java.lang.Object)


Occurences of PushbackInputStream (constructors)

PushbackInputStream (constructors) occurences:
java.io.PushbackInputStream(java.io.InputStream)
java.io.PushbackInputStream(java.io.InputStream, int)


Occurences of PushbackReader (constructors)

PushbackReader (constructors) occurences:
java.io.PushbackReader(java.io.Reader)
java.io.PushbackReader(java.io.Reader, int)


Occurences of put

put occurences:
java.awt.RenderingHints.put(java.lang.Object, java.lang.Object)
java.io.ObjectOutputStream.PutField.put(java.lang.String, boolean)
java.io.ObjectOutputStream.PutField.put(java.lang.String, byte)
java.io.ObjectOutputStream.PutField.put(java.lang.String, char)
java.io.ObjectOutputStream.PutField.put(java.lang.String, double)
java.io.ObjectOutputStream.PutField.put(java.lang.String, float)
java.io.ObjectOutputStream.PutField.put(java.lang.String, int)
java.io.ObjectOutputStream.PutField.put(java.lang.String, java.lang.Object)
java.io.ObjectOutputStream.PutField.put(java.lang.String, long)
java.io.ObjectOutputStream.PutField.put(java.lang.String, short)
java.net.CookieHandler.put(java.net.URI, java.util.Map)
java.net.CookieManager.put(java.net.URI, java.util.Map)
java.net.ResponseCache.put(java.net.URI, java.net.URLConnection)
java.nio.ByteBuffer.put(byte)
java.nio.ByteBuffer.put(byte:A)
java.nio.ByteBuffer.put(byte:A, int, int)
java.nio.ByteBuffer.put(int, byte)
java.nio.ByteBuffer.put(java.nio.ByteBuffer)
java.nio.CharBuffer.put(char)
java.nio.CharBuffer.put(char:A)
java.nio.CharBuffer.put(char:A, int, int)
java.nio.CharBuffer.put(int, char)
java.nio.CharBuffer.put(java.lang.String)
java.nio.CharBuffer.put(java.lang.String, int, int)
java.nio.CharBuffer.put(java.nio.CharBuffer)
java.nio.DoubleBuffer.put(double)
java.nio.DoubleBuffer.put(double:A)
java.nio.DoubleBuffer.put(double:A, int, int)
java.nio.DoubleBuffer.put(int, double)
java.nio.DoubleBuffer.put(java.nio.DoubleBuffer)
java.nio.FloatBuffer.put(float)
java.nio.FloatBuffer.put(float:A)
java.nio.FloatBuffer.put(float:A, int, int)
java.nio.FloatBuffer.put(int, float)
java.nio.FloatBuffer.put(java.nio.FloatBuffer)
java.nio.IntBuffer.put(int)
java.nio.IntBuffer.put(int, int)
java.nio.IntBuffer.put(int:A)
java.nio.IntBuffer.put(int:A, int, int)
java.nio.IntBuffer.put(java.nio.IntBuffer)
java.nio.LongBuffer.put(int, long)
java.nio.LongBuffer.put(java.nio.LongBuffer)
java.nio.LongBuffer.put(long)
java.nio.LongBuffer.put(long:A)
java.nio.LongBuffer.put(long:A, int, int)
java.nio.ShortBuffer.put(int, short)
java.nio.ShortBuffer.put(java.nio.ShortBuffer)
java.nio.ShortBuffer.put(short)
java.nio.ShortBuffer.put(short:A)
java.nio.ShortBuffer.put(short:A, int, int)
java.security.Provider.put(java.lang.Object, java.lang.Object)
java.util.AbstractMap.put(java.lang.Object, java.lang.Object)
java.util.AbstractMap.put(K, V)
java.util.concurrent.ArrayBlockingQueue.put(E)
java.util.concurrent.ArrayBlockingQueue.put(java.lang.Object)
java.util.concurrent.BlockingDeque.put(E)
java.util.concurrent.BlockingDeque.put(java.lang.Object)
java.util.concurrent.BlockingQueue.put(E)
java.util.concurrent.BlockingQueue.put(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.put(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.put(K, V)
java.util.concurrent.ConcurrentSkipListMap.put(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.put(K, V)
java.util.concurrent.DelayQueue.put(E)
java.util.concurrent.DelayQueue.put(java.util.concurrent.Delayed)
java.util.concurrent.LinkedBlockingDeque.put(E)
java.util.concurrent.LinkedBlockingDeque.put(java.lang.Object)
java.util.concurrent.LinkedBlockingQueue.put(E)
java.util.concurrent.LinkedBlockingQueue.put(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.put(E)
java.util.concurrent.LinkedTransferQueue.put(java.lang.Object)
java.util.concurrent.PriorityBlockingQueue.put(E)
java.util.concurrent.PriorityBlockingQueue.put(java.lang.Object)
java.util.concurrent.SynchronousQueue.put(E)
java.util.concurrent.SynchronousQueue.put(java.lang.Object)
java.util.Dictionary.put(java.lang.Object, java.lang.Object)
java.util.Dictionary.put(K, V)
java.util.EnumMap.put(java.lang.Enum, java.lang.Object)
java.util.EnumMap.put(K, V)
java.util.HashMap.put(java.lang.Object, java.lang.Object)
java.util.HashMap.put(K, V)
java.util.Hashtable.put(java.lang.Object, java.lang.Object)
java.util.Hashtable.put(K, V)
java.util.IdentityHashMap.put(java.lang.Object, java.lang.Object)
java.util.IdentityHashMap.put(K, V)
java.util.jar.Attributes.put(java.lang.Object, java.lang.Object)
java.util.Map.put(java.lang.Object, java.lang.Object)
java.util.Map.put(K, V)
java.util.prefs.AbstractPreferences.put(java.lang.String, java.lang.String)
java.util.prefs.Preferences.put(java.lang.String, java.lang.String)
java.util.TreeMap.put(java.lang.Object, java.lang.Object)
java.util.TreeMap.put(K, V)
java.util.WeakHashMap.put(java.lang.Object, java.lang.Object)
java.util.WeakHashMap.put(K, V)
javax.management.openmbean.TabularData.put(javax.management.openmbean.CompositeData)
javax.management.openmbean.TabularDataSupport.put(java.lang.Object, java.lang.Object)
javax.management.openmbean.TabularDataSupport.put(javax.management.openmbean.CompositeData)
javax.naming.directory.Attributes.put(java.lang.String, java.lang.Object)
javax.naming.directory.Attributes.put(javax.naming.directory.Attribute)
javax.naming.directory.BasicAttributes.put(java.lang.String, java.lang.Object)
javax.naming.directory.BasicAttributes.put(javax.naming.directory.Attribute)
javax.print.attribute.standard.PrinterStateReasons.put(javax.print.attribute.standard.PrinterStateReason, javax.print.attribute.standard.Severity)
javax.script.AbstractScriptEngine.put(java.lang.String, java.lang.Object)
javax.script.Bindings.put(java.lang.String, java.lang.Object)
javax.script.ScriptEngine.put(java.lang.String, java.lang.Object)
javax.script.ScriptEngineManager.put(java.lang.String, java.lang.Object)
javax.script.SimpleBindings.put(java.lang.String, java.lang.Object)
javax.swing.ActionMap.put(java.lang.Object, javax.swing.Action)
javax.swing.ComponentInputMap.put(javax.swing.KeyStroke, java.lang.Object)
javax.swing.InputMap.put(javax.swing.KeyStroke, java.lang.Object)
javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object)
javax.swing.UIManager.put(java.lang.Object, java.lang.Object)
javax.xml.crypto.dom.DOMCryptoContext.put(java.lang.Object, java.lang.Object)
javax.xml.crypto.XMLCryptoContext.put(java.lang.Object, java.lang.Object)


Occurences of putAll

putAll occurences:
java.awt.RenderingHints.putAll(java.util.Map)
java.security.Provider.putAll(java.util.Map)
java.util.AbstractMap.putAll(java.util.Map)
java.util.concurrent.ConcurrentHashMap.putAll(java.util.Map)
java.util.EnumMap.putAll(java.util.Map)
java.util.HashMap.putAll(java.util.Map)
java.util.Hashtable.putAll(java.util.Map)
java.util.IdentityHashMap.putAll(java.util.Map)
java.util.jar.Attributes.putAll(java.util.Map)
java.util.Map.putAll(java.util.Map)
java.util.TreeMap.putAll(java.util.Map)
java.util.WeakHashMap.putAll(java.util.Map)
javax.management.openmbean.TabularData.putAll(javax.management.openmbean.CompositeData:A)
javax.management.openmbean.TabularDataSupport.putAll(java.util.Map)
javax.management.openmbean.TabularDataSupport.putAll(javax.management.openmbean.CompositeData:A)
javax.script.Bindings.putAll(java.util.Map)
javax.script.SimpleBindings.putAll(java.util.Map)


Occurences of putBoolean

putBoolean occurences:
java.util.prefs.AbstractPreferences.putBoolean(java.lang.String, boolean)
java.util.prefs.Preferences.putBoolean(java.lang.String, boolean)


Occurences of putByteArray

putByteArray occurences:
java.util.prefs.AbstractPreferences.putByteArray(java.lang.String, byte:A)
java.util.prefs.Preferences.putByteArray(java.lang.String, byte:A)


Occurences of putChar

putChar occurences:
java.nio.ByteBuffer.putChar(char)
java.nio.ByteBuffer.putChar(int, char)


Occurences of putConstraint

putConstraint occurences:
javax.swing.SpringLayout.putConstraint(java.lang.String, java.awt.Component, int, java.lang.String, java.awt.Component)
javax.swing.SpringLayout.putConstraint(java.lang.String, java.awt.Component, javax.swing.Spring, java.lang.String, java.awt.Component)


Occurences of putDouble

putDouble occurences:
java.nio.ByteBuffer.putDouble(double)
java.nio.ByteBuffer.putDouble(int, double)
java.util.prefs.AbstractPreferences.putDouble(java.lang.String, double)
java.util.prefs.Preferences.putDouble(java.lang.String, double)


Occurences of putFirst

putFirst occurences:
java.util.concurrent.BlockingDeque.putFirst(E)
java.util.concurrent.BlockingDeque.putFirst(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.putFirst(E)
java.util.concurrent.LinkedBlockingDeque.putFirst(java.lang.Object)


Occurences of putFloat

putFloat occurences:
java.nio.ByteBuffer.putFloat(float)
java.nio.ByteBuffer.putFloat(int, float)
java.util.prefs.AbstractPreferences.putFloat(java.lang.String, float)
java.util.prefs.Preferences.putFloat(java.lang.String, float)


Occurences of putIfAbsent

putIfAbsent occurences:
java.security.Provider.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.putIfAbsent(K, V)
java.util.concurrent.ConcurrentMap.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentMap.putIfAbsent(K, V)
java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(K, V)
java.util.HashMap.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.HashMap.putIfAbsent(K, V)
java.util.Hashtable.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.Hashtable.putIfAbsent(K, V)
java.util.Map.putIfAbsent(java.lang.Object, java.lang.Object)
java.util.Map.putIfAbsent(K, V)


Occurences of putInt

putInt occurences:
java.nio.ByteBuffer.putInt(int)
java.nio.ByteBuffer.putInt(int, int)
java.util.prefs.AbstractPreferences.putInt(java.lang.String, int)
java.util.prefs.Preferences.putInt(java.lang.String, int)


Occurences of putLast

putLast occurences:
java.util.concurrent.BlockingDeque.putLast(E)
java.util.concurrent.BlockingDeque.putLast(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.putLast(E)
java.util.concurrent.LinkedBlockingDeque.putLast(java.lang.Object)


Occurences of putLong

putLong occurences:
java.nio.ByteBuffer.putLong(int, long)
java.nio.ByteBuffer.putLong(long)
java.util.prefs.AbstractPreferences.putLong(java.lang.String, long)
java.util.prefs.Preferences.putLong(java.lang.String, long)


Occurences of putNamespacePrefix

putNamespacePrefix occurences:
javax.xml.crypto.dom.DOMCryptoContext.putNamespacePrefix(java.lang.String, java.lang.String)
javax.xml.crypto.XMLCryptoContext.putNamespacePrefix(java.lang.String, java.lang.String)


Occurences of putNextEntry

putNextEntry occurences:
java.util.jar.JarOutputStream.putNextEntry(java.util.zip.ZipEntry)
java.util.zip.ZipOutputStream.putNextEntry(java.util.zip.ZipEntry)


Occurences of putProperty

putProperty occurences:
com.sun.jdi.request.EventRequest.putProperty(java.lang.Object, java.lang.Object)
javax.swing.text.AbstractDocument.putProperty(java.lang.Object, java.lang.Object)
javax.swing.text.Document.putProperty(java.lang.Object, java.lang.Object)


Occurences of putShort

putShort occurences:
java.nio.ByteBuffer.putShort(int, short)
java.nio.ByteBuffer.putShort(short)


Occurences of putValue

putValue occurences:
java.util.jar.Attributes.putValue(java.lang.String, java.lang.String)
javax.net.ssl.SSLSession.putValue(java.lang.String, java.lang.Object)
javax.swing.AbstractAction.putValue(java.lang.String, java.lang.Object)
javax.swing.Action.putValue(java.lang.String, java.lang.Object)


Occurences of QName (constructors)

QName (constructors) occurences:
javax.xml.namespace.QName(java.lang.String)
javax.xml.namespace.QName(java.lang.String, java.lang.String)
javax.xml.namespace.QName(java.lang.String, java.lang.String, java.lang.String)


Occurences of quadrantRotate

quadrantRotate occurences:
java.awt.geom.AffineTransform.quadrantRotate(int)
java.awt.geom.AffineTransform.quadrantRotate(int, double, double)


Occurences of quadTo

quadTo occurences:
java.awt.geom.Path2D.quadTo(double, double, double, double)
java.awt.geom.Path2D.Double.quadTo(double, double, double, double)
java.awt.geom.Path2D.Float.quadTo(double, double, double, double)
java.awt.geom.Path2D.Float.quadTo(float, float, float, float)


Occurences of QUARTO

QUARTO occurences:
java.awt.QUARTO
javax.print.attribute.standard.QUARTO
javax.print.attribute.standard.QUARTO


Occurences of query

query occurences:
java.time.chrono.ChronoLocalDate.query(java.time.temporal.TemporalQuery)
java.time.chrono.ChronoLocalDateTime.query(java.time.temporal.TemporalQuery)
java.time.chrono.ChronoZonedDateTime.query(java.time.temporal.TemporalQuery)
java.time.chrono.Era.query(java.time.temporal.TemporalQuery)
java.time.DayOfWeek.query(java.time.temporal.TemporalQuery)
java.time.Instant.query(java.time.temporal.TemporalQuery)
java.time.LocalDate.query(java.time.temporal.TemporalQuery)
java.time.LocalDateTime.query(java.time.temporal.TemporalQuery)
java.time.LocalTime.query(java.time.temporal.TemporalQuery)
java.time.Month.query(java.time.temporal.TemporalQuery)
java.time.MonthDay.query(java.time.temporal.TemporalQuery)
java.time.OffsetDateTime.query(java.time.temporal.TemporalQuery)
java.time.OffsetTime.query(java.time.temporal.TemporalQuery)
java.time.temporal.TemporalAccessor.query(java.time.temporal.TemporalQuery)
java.time.Year.query(java.time.temporal.TemporalQuery)
java.time.YearMonth.query(java.time.temporal.TemporalQuery)
java.time.ZonedDateTime.query(java.time.temporal.TemporalQuery)
java.time.ZoneOffset.query(java.time.temporal.TemporalQuery)


Occurences of queryMBeans

queryMBeans occurences:
javax.management.MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp)
javax.management.MBeanServerConnection.queryMBeans(javax.management.ObjectName, javax.management.QueryExp)
javax.management.remote.rmi.RMIConnection.queryMBeans(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.queryMBeans(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.queryMBeans(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)


Occurences of queryNames

queryNames occurences:
javax.management.MBeanServer.queryNames(javax.management.ObjectName, javax.management.QueryExp)
javax.management.MBeanServerConnection.queryNames(javax.management.ObjectName, javax.management.QueryExp)
javax.management.remote.rmi.RMIConnection.queryNames(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.queryNames(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.queryNames(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)


Occurences of quote

quote occurences:
java.net.quote
java.util.regex.Pattern.quote(java.lang.String)
javax.management.ObjectName.quote(java.lang.String)


Occurences of RadialGradientPaint (constructors)

RadialGradientPaint (constructors) occurences:
java.awt.RadialGradientPaint(float, float, float, float, float, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.RadialGradientPaint(float, float, float, float:A, java.awt.Color:A)
java.awt.RadialGradientPaint(float, float, float, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.RadialGradientPaint(java.awt.geom.Point2D, float, float:A, java.awt.Color:A)
java.awt.RadialGradientPaint(java.awt.geom.Point2D, float, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.RadialGradientPaint(java.awt.geom.Point2D, float, java.awt.geom.Point2D, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)
java.awt.RadialGradientPaint(java.awt.geom.Point2D, float, java.awt.geom.Point2D, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod, java.awt.MultipleGradientPaint.ColorSpaceType, java.awt.geom.AffineTransform)
java.awt.RadialGradientPaint(java.awt.geom.Rectangle2D, float:A, java.awt.Color:A, java.awt.MultipleGradientPaint.CycleMethod)


Occurences of RADIO_BUTTON

RADIO_BUTTON occurences:
javax.accessibility.RADIO_BUTTON
javax.swing.plaf.synth.RADIO_BUTTON


Occurences of RAISED

RAISED occurences:
javax.swing.border.RAISED
javax.swing.border.RAISED


Occurences of random

random occurences:
java.lang.Math.random()
java.lang.StrictMath.random()


Occurences of Random (constructors)

Random (constructors) occurences:
java.util.Random()
java.util.Random(long)


Occurences of RandomAccessFile (constructors)

RandomAccessFile (constructors) occurences:
java.io.RandomAccessFile(java.io.File, java.lang.String)
java.io.RandomAccessFile(java.lang.String, java.lang.String)


Occurences of range

range occurences:
java.time.chrono.Chronology.range(java.time.temporal.ChronoField)
java.time.chrono.ChronoZonedDateTime.range(java.time.temporal.TemporalField)
java.time.chrono.Era.range(java.time.temporal.TemporalField)
java.time.chrono.HijrahChronology.range(java.time.temporal.ChronoField)
java.time.chrono.HijrahDate.range(java.time.temporal.TemporalField)
java.time.chrono.HijrahEra.range(java.time.temporal.TemporalField)
java.time.chrono.IsoChronology.range(java.time.temporal.ChronoField)
java.time.chrono.JapaneseChronology.range(java.time.temporal.ChronoField)
java.time.chrono.JapaneseDate.range(java.time.temporal.TemporalField)
java.time.chrono.JapaneseEra.range(java.time.temporal.TemporalField)
java.time.chrono.MinguoChronology.range(java.time.temporal.ChronoField)
java.time.chrono.MinguoDate.range(java.time.temporal.TemporalField)
java.time.chrono.ThaiBuddhistChronology.range(java.time.temporal.ChronoField)
java.time.chrono.ThaiBuddhistDate.range(java.time.temporal.TemporalField)
java.time.DayOfWeek.range(java.time.temporal.TemporalField)
java.time.Instant.range(java.time.temporal.TemporalField)
java.time.LocalDate.range(java.time.temporal.TemporalField)
java.time.LocalDateTime.range(java.time.temporal.TemporalField)
java.time.LocalTime.range(java.time.temporal.TemporalField)
java.time.Month.range(java.time.temporal.TemporalField)
java.time.MonthDay.range(java.time.temporal.TemporalField)
java.time.OffsetDateTime.range(java.time.temporal.TemporalField)
java.time.OffsetTime.range(java.time.temporal.TemporalField)
java.time.temporal.ChronoField.range()
java.time.temporal.TemporalAccessor.range(java.time.temporal.TemporalField)
java.time.temporal.TemporalField.range()
java.time.Year.range(java.time.temporal.TemporalField)
java.time.YearMonth.range(java.time.temporal.TemporalField)
java.time.ZonedDateTime.range(java.time.temporal.TemporalField)
java.time.ZoneOffset.range(java.time.temporal.TemporalField)
java.util.EnumSet.range(E, E)
java.util.EnumSet.range(java.lang.Enum, java.lang.Enum)
java.util.stream.IntStream.range(int, int)
java.util.stream.LongStream.range(long, long)


Occurences of rangeClosed

rangeClosed occurences:
java.util.stream.IntStream.rangeClosed(int, int)
java.util.stream.LongStream.rangeClosed(long, long)


Occurences of rangeRefinedBy

rangeRefinedBy occurences:
java.time.temporal.ChronoField.rangeRefinedBy(java.time.temporal.TemporalAccessor)
java.time.temporal.TemporalField.rangeRefinedBy(java.time.temporal.TemporalAccessor)


Occurences of Raster (constructors)

Raster (constructors) occurences:
java.awt.image.Raster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Point)
java.awt.image.Raster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Rectangle, java.awt.Point, java.awt.image.Raster)
java.awt.image.Raster(java.awt.image.SampleModel, java.awt.Point)


Occurences of RC2ParameterSpec (constructors)

RC2ParameterSpec (constructors) occurences:
javax.crypto.spec.RC2ParameterSpec(int)
javax.crypto.spec.RC2ParameterSpec(int, byte:A)
javax.crypto.spec.RC2ParameterSpec(int, byte:A, int)


Occurences of RC5ParameterSpec (constructors)

RC5ParameterSpec (constructors) occurences:
javax.crypto.spec.RC5ParameterSpec(int, int, int)
javax.crypto.spec.RC5ParameterSpec(int, int, int, byte:A)
javax.crypto.spec.RC5ParameterSpec(int, int, int, byte:A, int)


Occurences of RCSID

RCSID occurences:
javax.swing.undo.RCSID
javax.swing.undo.RCSID


Occurences of Rdn (constructors)

Rdn (constructors) occurences:
javax.naming.ldap.Rdn(java.lang.String)
javax.naming.ldap.Rdn(java.lang.String, java.lang.Object)
javax.naming.ldap.Rdn(javax.naming.directory.Attributes)
javax.naming.ldap.Rdn(javax.naming.ldap.Rdn)


Occurences of read

read occurences:
java.io.BufferedInputStream.read()
java.io.BufferedInputStream.read(byte:A, int, int)
java.io.BufferedReader.read()
java.io.BufferedReader.read(char:A, int, int)
java.io.ByteArrayInputStream.read()
java.io.ByteArrayInputStream.read(byte:A, int, int)
java.io.CharArrayReader.read()
java.io.CharArrayReader.read(char:A, int, int)
java.io.DataInputStream.read(byte:A)
java.io.DataInputStream.read(byte:A, int, int)
java.io.FileInputStream.read()
java.io.FileInputStream.read(byte:A)
java.io.FileInputStream.read(byte:A, int, int)
java.io.FilterInputStream.read()
java.io.FilterInputStream.read(byte:A)
java.io.FilterInputStream.read(byte:A, int, int)
java.io.FilterReader.read()
java.io.FilterReader.read(char:A, int, int)
java.io.InputStream.read()
java.io.InputStream.read(byte:A)
java.io.InputStream.read(byte:A, int, int)
java.io.InputStreamReader.read()
java.io.InputStreamReader.read(char:A, int, int)
java.io.LineNumberInputStream.read()
java.io.LineNumberInputStream.read(byte:A, int, int)
java.io.LineNumberReader.read()
java.io.LineNumberReader.read(char:A, int, int)
java.io.ObjectInput.read()
java.io.ObjectInput.read(byte:A)
java.io.ObjectInput.read(byte:A, int, int)
java.io.ObjectInputStream.read()
java.io.ObjectInputStream.read(byte:A, int, int)
java.io.PipedInputStream.read()
java.io.PipedInputStream.read(byte:A, int, int)
java.io.PipedReader.read()
java.io.PipedReader.read(char:A, int, int)
java.io.PushbackInputStream.read()
java.io.PushbackInputStream.read(byte:A, int, int)
java.io.PushbackReader.read()
java.io.PushbackReader.read(char:A, int, int)
java.io.RandomAccessFile.read()
java.io.RandomAccessFile.read(byte:A)
java.io.RandomAccessFile.read(byte:A, int, int)
java.io.Reader.read()
java.io.Reader.read(char:A)
java.io.Reader.read(char:A, int, int)
java.io.Reader.read(java.nio.CharBuffer)
java.io.SequenceInputStream.read()
java.io.SequenceInputStream.read(byte:A, int, int)
java.io.StringBufferInputStream.read()
java.io.StringBufferInputStream.read(byte:A, int, int)
java.io.StringReader.read()
java.io.StringReader.read(char:A, int, int)
java.lang.Readable.read(java.nio.CharBuffer)
java.nio.channels.AsynchronousByteChannel.read(java.nio.ByteBuffer)
java.nio.channels.AsynchronousByteChannel.read(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousByteChannel.read(java.nio.ByteBuffer, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.read(java.nio.ByteBuffer, long)
java.nio.channels.AsynchronousFileChannel.read(java.nio.ByteBuffer, long, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.read(java.nio.ByteBuffer, long, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer:A, int, int, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.read(java.nio.ByteBuffer:A, int, int, long, java.util.concurrent.TimeUnit, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.DatagramChannel.read(java.nio.ByteBuffer)
java.nio.channels.DatagramChannel.read(java.nio.ByteBuffer:A)
java.nio.channels.DatagramChannel.read(java.nio.ByteBuffer:A, int, int)
java.nio.channels.FileChannel.read(java.nio.ByteBuffer)
java.nio.channels.FileChannel.read(java.nio.ByteBuffer, long)
java.nio.channels.FileChannel.read(java.nio.ByteBuffer:A)
java.nio.channels.FileChannel.read(java.nio.ByteBuffer:A, int, int)
java.nio.channels.ReadableByteChannel.read(java.nio.ByteBuffer)
java.nio.channels.ScatteringByteChannel.read(java.nio.ByteBuffer:A)
java.nio.channels.ScatteringByteChannel.read(java.nio.ByteBuffer:A, int, int)
java.nio.channels.SeekableByteChannel.read(java.nio.ByteBuffer)
java.nio.channels.SocketChannel.read(java.nio.ByteBuffer)
java.nio.channels.SocketChannel.read(java.nio.ByteBuffer:A)
java.nio.channels.SocketChannel.read(java.nio.ByteBuffer:A, int, int)
java.nio.CharBuffer.read(java.nio.CharBuffer)
java.nio.file.attribute.UserDefinedFileAttributeView.read(java.lang.String, java.nio.ByteBuffer)
java.rmi.server.ObjID.read(java.io.ObjectInput)
java.rmi.server.UID.read(java.io.DataInput)
java.security.DigestInputStream.read()
java.security.DigestInputStream.read(byte:A, int, int)
java.util.jar.JarInputStream.read(byte:A, int, int)
java.util.jar.Manifest.read(java.io.InputStream)
java.util.zip.CheckedInputStream.read()
java.util.zip.CheckedInputStream.read(byte:A, int, int)
java.util.zip.DeflaterInputStream.read()
java.util.zip.DeflaterInputStream.read(byte:A, int, int)
java.util.zip.GZIPInputStream.read(byte:A, int, int)
java.util.zip.InflaterInputStream.read()
java.util.zip.InflaterInputStream.read(byte:A, int, int)
java.util.zip.ZipInputStream.read(byte:A, int, int)
javax.crypto.CipherInputStream.read()
javax.crypto.CipherInputStream.read(byte:A)
javax.crypto.CipherInputStream.read(byte:A, int, int)
javax.imageio.ImageIO.read(java.io.File)
javax.imageio.ImageIO.read(java.io.InputStream)
javax.imageio.ImageIO.read(java.net.URL)
javax.imageio.ImageIO.read(javax.imageio.stream.ImageInputStream)
javax.imageio.ImageReader.read(int)
javax.imageio.ImageReader.read(int, javax.imageio.ImageReadParam)
javax.imageio.stream.FileCacheImageInputStream.read()
javax.imageio.stream.FileCacheImageInputStream.read(byte:A, int, int)
javax.imageio.stream.FileCacheImageOutputStream.read()
javax.imageio.stream.FileCacheImageOutputStream.read(byte:A, int, int)
javax.imageio.stream.FileImageInputStream.read()
javax.imageio.stream.FileImageInputStream.read(byte:A, int, int)
javax.imageio.stream.FileImageOutputStream.read()
javax.imageio.stream.FileImageOutputStream.read(byte:A, int, int)
javax.imageio.stream.ImageInputStream.read()
javax.imageio.stream.ImageInputStream.read(byte:A)
javax.imageio.stream.ImageInputStream.read(byte:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.read()
javax.imageio.stream.ImageInputStreamImpl.read(byte:A)
javax.imageio.stream.ImageInputStreamImpl.read(byte:A, int, int)
javax.imageio.stream.MemoryCacheImageInputStream.read()
javax.imageio.stream.MemoryCacheImageInputStream.read(byte:A, int, int)
javax.imageio.stream.MemoryCacheImageOutputStream.read()
javax.imageio.stream.MemoryCacheImageOutputStream.read(byte:A, int, int)
javax.sound.sampled.AudioInputStream.read()
javax.sound.sampled.AudioInputStream.read(byte:A)
javax.sound.sampled.AudioInputStream.read(byte:A, int, int)
javax.sound.sampled.TargetDataLine.read(byte:A, int, int)
javax.swing.JEditorPane.read(java.io.InputStream, java.lang.Object)
javax.swing.ProgressMonitorInputStream.read()
javax.swing.ProgressMonitorInputStream.read(byte:A)
javax.swing.ProgressMonitorInputStream.read(byte:A, int, int)
javax.swing.text.DefaultEditorKit.read(java.io.InputStream, javax.swing.text.Document, int)
javax.swing.text.DefaultEditorKit.read(java.io.Reader, javax.swing.text.Document, int)
javax.swing.text.EditorKit.read(java.io.InputStream, javax.swing.text.Document, int)
javax.swing.text.EditorKit.read(java.io.Reader, javax.swing.text.Document, int)
javax.swing.text.html.HTMLEditorKit.read(java.io.Reader, javax.swing.text.Document, int)
javax.swing.text.html.parser.DTD.read(java.io.DataInputStream)
javax.swing.text.JTextComponent.read(java.io.Reader, java.lang.Object)
javax.swing.text.rtf.RTFEditorKit.read(java.io.InputStream, javax.swing.text.Document, int)
javax.swing.text.rtf.RTFEditorKit.read(java.io.Reader, javax.swing.text.Document, int)
org.omg.CORBA.AnySeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.BooleanSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CharSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CompletionStatusHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CurrentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.DefinitionKindHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.DoubleSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.FieldNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.FloatSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.IdentifierHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.IDLTypeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.LongLongSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.LongSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.NameValuePairHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ObjectHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.OctetSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ParameterModeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyErrorCodeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyErrorHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyListHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyTypeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.portable.InputStream.read()
org.omg.CORBA.RepositoryIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ServiceDetailHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ServiceInformationHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.SetOverrideTypeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ShortSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.StringSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.StringValueHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.StructMemberHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ULongLongSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ULongSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.UnionMemberHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.UnknownUserExceptionHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.UShortSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ValueBaseHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ValueMemberHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.VersionSpecHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.VisibilityHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WCharSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WrongTransactionHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WStringSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WStringValueHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingIteratorHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingListHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingTypeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.IstringHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NameComponentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.AnySeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnyFactoryHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnyHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynAnySeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynArrayHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynEnumHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynFixedHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynSequenceHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynStructHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynUnionHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.DynValueHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.FieldNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.NameDynAnyPairHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.NameDynAnyPairSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.NameValuePairHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.DynamicAny.NameValuePairSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.CodecFactoryHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.CodecPackage.FormatMismatchHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.CodecPackage.TypeMismatchHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ComponentIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.IORHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.MultipleComponentProfileHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ProfileIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ServiceContextHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ServiceContextListHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ServiceIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.TaggedComponentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.TaggedProfileHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.Messaging.SyncScopeHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.AdapterManagerIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.AdapterNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.AdapterStateHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.CurrentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ForwardRequestHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.InvalidSlotHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ORBIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ServerIdHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.CurrentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.CurrentPackage.NoContextHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.ForwardRequestHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.NoServantHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.WrongAdapterHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.POAPackage.WrongPolicyHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.ServantActivatorHelper.read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.ServantLocatorHelper.read(org.omg.CORBA.portable.InputStream)


Occurences of READ

READ occurences:
java.lang.READ
java.nio.file.READ
java.nio.file.READ


Occurences of readAll

readAll occurences:
javax.imageio.ImageReader.readAll(int, javax.imageio.ImageReadParam)
javax.imageio.ImageReader.readAll(java.util.Iterator)


Occurences of readAllLines

readAllLines occurences:
java.nio.file.Files.readAllLines(java.nio.file.Path)
java.nio.file.Files.readAllLines(java.nio.file.Path, java.nio.charset.Charset)


Occurences of readAny

readAny occurences:
javax.rmi.CORBA.Util.readAny(org.omg.CORBA.portable.InputStream)
javax.rmi.CORBA.UtilDelegate.readAny(org.omg.CORBA.portable.InputStream)


Occurences of readArray

readArray occurences:
java.sql.SQLInput.readArray()
javax.sql.rowset.serial.SQLInputImpl.readArray()


Occurences of readAsciiStream

readAsciiStream occurences:
java.sql.SQLInput.readAsciiStream()
javax.sql.rowset.serial.SQLInputImpl.readAsciiStream()


Occurences of readAttributes

readAttributes occurences:
java.nio.file.attribute.BasicFileAttributeView.readAttributes()
java.nio.file.attribute.DosFileAttributeView.readAttributes()
java.nio.file.attribute.PosixFileAttributeView.readAttributes()
java.nio.file.Files.readAttributes(java.nio.file.Path, java.lang.Class, java.nio.file.LinkOption...)
java.nio.file.Files.readAttributes(java.nio.file.Path, java.lang.String, java.nio.file.LinkOption...)
java.nio.file.spi.FileSystemProvider.readAttributes(java.nio.file.Path, java.lang.Class, java.nio.file.LinkOption...)
java.nio.file.spi.FileSystemProvider.readAttributes(java.nio.file.Path, java.lang.String, java.nio.file.LinkOption...)
javax.swing.text.StyleContext.readAttributes(java.io.ObjectInputStream, javax.swing.text.MutableAttributeSet)


Occurences of readBigDecimal

readBigDecimal occurences:
java.sql.SQLInput.readBigDecimal()
javax.sql.rowset.serial.SQLInputImpl.readBigDecimal()


Occurences of readBinaryStream

readBinaryStream occurences:
java.sql.SQLInput.readBinaryStream()
javax.sql.rowset.serial.SQLInputImpl.readBinaryStream()


Occurences of readBit

readBit occurences:
javax.imageio.stream.ImageInputStream.readBit()
javax.imageio.stream.ImageInputStreamImpl.readBit()


Occurences of readBits

readBits occurences:
javax.imageio.stream.ImageInputStream.readBits(int)
javax.imageio.stream.ImageInputStreamImpl.readBits(int)


Occurences of readBlob

readBlob occurences:
java.sql.SQLInput.readBlob()
javax.sql.rowset.serial.SQLInputImpl.readBlob()


Occurences of readBoolean

readBoolean occurences:
java.io.DataInput.readBoolean()
java.io.DataInputStream.readBoolean()
java.io.ObjectInputStream.readBoolean()
java.io.RandomAccessFile.readBoolean()
java.sql.SQLInput.readBoolean()
javax.imageio.stream.ImageInputStream.readBoolean()
javax.imageio.stream.ImageInputStreamImpl.readBoolean()
javax.sql.rowset.serial.SQLInputImpl.readBoolean()


Occurences of readByte

readByte occurences:
java.io.DataInput.readByte()
java.io.DataInputStream.readByte()
java.io.ObjectInputStream.readByte()
java.io.RandomAccessFile.readByte()
java.sql.SQLInput.readByte()
javax.imageio.stream.ImageInputStream.readByte()
javax.imageio.stream.ImageInputStreamImpl.readByte()
javax.sql.rowset.serial.SQLInputImpl.readByte()


Occurences of readBytes

readBytes occurences:
java.sql.SQLInput.readBytes()
javax.imageio.stream.ImageInputStream.readBytes(javax.imageio.stream.IIOByteBuffer, int)
javax.imageio.stream.ImageInputStreamImpl.readBytes(javax.imageio.stream.IIOByteBuffer, int)
javax.sql.rowset.serial.SQLInputImpl.readBytes()


Occurences of readChar

readChar occurences:
java.io.DataInput.readChar()
java.io.DataInputStream.readChar()
java.io.ObjectInputStream.readChar()
java.io.RandomAccessFile.readChar()
javax.imageio.stream.ImageInputStream.readChar()
javax.imageio.stream.ImageInputStreamImpl.readChar()


Occurences of readCharacterStream

readCharacterStream occurences:
java.sql.SQLInput.readCharacterStream()
javax.sql.rowset.serial.SQLInputImpl.readCharacterStream()


Occurences of readClob

readClob occurences:
java.sql.SQLInput.readClob()
javax.sql.rowset.serial.SQLInputImpl.readClob()


Occurences of readConfiguration

readConfiguration occurences:
java.util.logging.LogManager.readConfiguration()
java.util.logging.LogManager.readConfiguration(java.io.InputStream)


Occurences of readDate

readDate occurences:
java.sql.SQLInput.readDate()
javax.sql.rowset.serial.SQLInputImpl.readDate()


Occurences of readDouble

readDouble occurences:
java.io.DataInput.readDouble()
java.io.DataInputStream.readDouble()
java.io.ObjectInputStream.readDouble()
java.io.RandomAccessFile.readDouble()
java.sql.SQLInput.readDouble()
javax.imageio.stream.ImageInputStream.readDouble()
javax.imageio.stream.ImageInputStreamImpl.readDouble()
javax.sql.rowset.serial.SQLInputImpl.readDouble()


Occurences of reader

reader occurences:
java.io.Console.reader()
javax.script.reader


Occurences of Reader (constructors)

Reader (constructors) occurences:
java.io.Reader()
java.io.Reader(java.lang.Object)


Occurences of readExternal

readExternal occurences:
java.awt.datatransfer.DataFlavor.readExternal(java.io.ObjectInput)
java.io.Externalizable.readExternal(java.io.ObjectInput)
javax.activation.MimeType.readExternal(java.io.ObjectInput)
javax.management.loading.MLet.readExternal(java.io.ObjectInput)


Occurences of readFloat

readFloat occurences:
java.io.DataInput.readFloat()
java.io.DataInputStream.readFloat()
java.io.ObjectInputStream.readFloat()
java.io.RandomAccessFile.readFloat()
java.sql.SQLInput.readFloat()
javax.imageio.stream.ImageInputStream.readFloat()
javax.imageio.stream.ImageInputStreamImpl.readFloat()
javax.sql.rowset.serial.SQLInputImpl.readFloat()


Occurences of readFully

readFully occurences:
java.io.DataInput.readFully(byte:A)
java.io.DataInput.readFully(byte:A, int, int)
java.io.DataInputStream.readFully(byte:A)
java.io.DataInputStream.readFully(byte:A, int, int)
java.io.ObjectInputStream.readFully(byte:A)
java.io.ObjectInputStream.readFully(byte:A, int, int)
java.io.RandomAccessFile.readFully(byte:A)
java.io.RandomAccessFile.readFully(byte:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(byte:A)
javax.imageio.stream.ImageInputStream.readFully(byte:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(char:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(double:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(float:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(int:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(long:A, int, int)
javax.imageio.stream.ImageInputStream.readFully(short:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(byte:A)
javax.imageio.stream.ImageInputStreamImpl.readFully(byte:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(char:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(double:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(float:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(int:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(long:A, int, int)
javax.imageio.stream.ImageInputStreamImpl.readFully(short:A, int, int)


Occurences of readInt

readInt occurences:
java.io.DataInput.readInt()
java.io.DataInputStream.readInt()
java.io.ObjectInputStream.readInt()
java.io.RandomAccessFile.readInt()
java.sql.SQLInput.readInt()
javax.imageio.stream.ImageInputStream.readInt()
javax.imageio.stream.ImageInputStreamImpl.readInt()
javax.sql.rowset.serial.SQLInputImpl.readInt()


Occurences of readLine

readLine occurences:
java.io.BufferedReader.readLine()
java.io.Console.readLine()
java.io.Console.readLine(java.lang.String, java.lang.Object...)
java.io.DataInput.readLine()
java.io.DataInputStream.readLine()
java.io.LineNumberReader.readLine()
java.io.ObjectInputStream.readLine()
java.io.RandomAccessFile.readLine()
javax.imageio.stream.ImageInputStream.readLine()
javax.imageio.stream.ImageInputStreamImpl.readLine()


Occurences of readLock

readLock occurences:
java.util.concurrent.locks.ReadWriteLock.readLock()
java.util.concurrent.locks.ReentrantReadWriteLock.readLock()
java.util.concurrent.locks.StampedLock.readLock()
javax.swing.text.AbstractDocument.readLock()


Occurences of readLong

readLong occurences:
java.io.DataInput.readLong()
java.io.DataInputStream.readLong()
java.io.ObjectInputStream.readLong()
java.io.RandomAccessFile.readLong()
java.sql.SQLInput.readLong()
javax.imageio.stream.ImageInputStream.readLong()
javax.imageio.stream.ImageInputStreamImpl.readLong()
javax.sql.rowset.serial.SQLInputImpl.readLong()


Occurences of readNClob

readNClob occurences:
java.sql.SQLInput.readNClob()
javax.sql.rowset.serial.SQLInputImpl.readNClob()


Occurences of readNString

readNString occurences:
java.sql.SQLInput.readNString()
javax.sql.rowset.serial.SQLInputImpl.readNString()


Occurences of readObject

readObject occurences:
java.beans.XMLDecoder.readObject()
java.io.ObjectInput.readObject()
java.io.ObjectInputStream.readObject()
java.sql.SQLInput.readObject()
java.sql.SQLInput.readObject(java.lang.Class)
javax.rmi.CORBA.StubDelegate.readObject(javax.rmi.CORBA.Stub, java.io.ObjectInputStream)
javax.sql.rowset.serial.SQLInputImpl.readObject()


Occurences of readPassword

readPassword occurences:
java.io.Console.readPassword()
java.io.Console.readPassword(java.lang.String, java.lang.Object...)


Occurences of readRef

readRef occurences:
java.sql.SQLInput.readRef()
javax.sql.rowset.serial.SQLInputImpl.readRef()


Occurences of readResolve

readResolve occurences:
java.awt.AWTKeyStroke.readResolve()
java.awt.color.ICC_Profile.readResolve()
java.awt.font.TextAttribute.readResolve()
java.security.cert.Certificate.CertificateRep.readResolve()
java.security.cert.CertPath.CertPathRep.readResolve()
java.security.KeyRep.readResolve()
java.text.AttributedCharacterIterator.Attribute.readResolve()
java.text.DateFormat.Field.readResolve()
java.text.MessageFormat.Field.readResolve()
java.text.NumberFormat.Field.readResolve()
javax.management.openmbean.SimpleType.readResolve()
javax.print.attribute.EnumSyntax.readResolve()


Occurences of readRowId

readRowId occurences:
java.sql.SQLInput.readRowId()
javax.sql.rowset.serial.SQLInputImpl.readRowId()


Occurences of readShort

readShort occurences:
java.io.DataInput.readShort()
java.io.DataInputStream.readShort()
java.io.ObjectInputStream.readShort()
java.io.RandomAccessFile.readShort()
java.sql.SQLInput.readShort()
javax.imageio.stream.ImageInputStream.readShort()
javax.imageio.stream.ImageInputStreamImpl.readShort()
javax.sql.rowset.serial.SQLInputImpl.readShort()


Occurences of readSQLXML

readSQLXML occurences:
java.sql.SQLInput.readSQLXML()
javax.sql.rowset.serial.SQLInputImpl.readSQLXML()


Occurences of readString

readString occurences:
java.sql.SQLInput.readString()
javax.sql.rowset.serial.SQLInputImpl.readString()


Occurences of readSymbolicLink

readSymbolicLink occurences:
java.nio.file.Files.readSymbolicLink(java.nio.file.Path)
java.nio.file.spi.FileSystemProvider.readSymbolicLink(java.nio.file.Path)


Occurences of readTime

readTime occurences:
java.sql.SQLInput.readTime()
javax.sql.rowset.serial.SQLInputImpl.readTime()


Occurences of readTimestamp

readTimestamp occurences:
java.sql.SQLInput.readTimestamp()
javax.sql.rowset.serial.SQLInputImpl.readTimestamp()


Occurences of readUnsignedByte

readUnsignedByte occurences:
java.io.DataInput.readUnsignedByte()
java.io.DataInputStream.readUnsignedByte()
java.io.ObjectInputStream.readUnsignedByte()
java.io.RandomAccessFile.readUnsignedByte()
javax.imageio.stream.ImageInputStream.readUnsignedByte()
javax.imageio.stream.ImageInputStreamImpl.readUnsignedByte()


Occurences of readUnsignedInt

readUnsignedInt occurences:
javax.imageio.stream.ImageInputStream.readUnsignedInt()
javax.imageio.stream.ImageInputStreamImpl.readUnsignedInt()


Occurences of readUnsignedShort

readUnsignedShort occurences:
java.io.DataInput.readUnsignedShort()
java.io.DataInputStream.readUnsignedShort()
java.io.ObjectInputStream.readUnsignedShort()
java.io.RandomAccessFile.readUnsignedShort()
javax.imageio.stream.ImageInputStream.readUnsignedShort()
javax.imageio.stream.ImageInputStreamImpl.readUnsignedShort()


Occurences of readURL

readURL occurences:
java.sql.SQLInput.readURL()
javax.sql.rowset.serial.SQLInputImpl.readURL()


Occurences of readUTF

readUTF occurences:
java.io.DataInput.readUTF()
java.io.DataInputStream.readUTF()
java.io.DataInputStream.readUTF(java.io.DataInput)
java.io.ObjectInputStream.readUTF()
java.io.RandomAccessFile.readUTF()
javax.imageio.stream.ImageInputStream.readUTF()
javax.imageio.stream.ImageInputStreamImpl.readUTF()


Occurences of readXml

readXml occurences:
javax.sql.rowset.WebRowSet.readXml(java.io.InputStream)
javax.sql.rowset.WebRowSet.readXml(java.io.Reader)


Occurences of ready

ready occurences:
java.io.BufferedReader.ready()
java.io.CharArrayReader.ready()
java.io.FilterReader.ready()
java.io.InputStreamReader.ready()
java.io.PipedReader.ready()
java.io.PushbackReader.ready()
java.io.Reader.ready()
java.io.StringReader.ready()


Occurences of read_abstract_interface

read_abstract_interface occurences:
org.omg.CORBA_2_3.portable.InputStream.read_abstract_interface()
org.omg.CORBA_2_3.portable.InputStream.read_abstract_interface(java.lang.Class)


Occurences of read_any

read_any occurences:
org.omg.CORBA.DataInputStream.read_any()
org.omg.CORBA.portable.InputStream.read_any()


Occurences of read_boolean

read_boolean occurences:
org.omg.CORBA.DataInputStream.read_boolean()
org.omg.CORBA.portable.InputStream.read_boolean()


Occurences of read_boolean_array

read_boolean_array occurences:
org.omg.CORBA.DataInputStream.read_boolean_array(org.omg.CORBA.BooleanSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_boolean_array(boolean:A, int, int)


Occurences of read_char

read_char occurences:
org.omg.CORBA.DataInputStream.read_char()
org.omg.CORBA.portable.InputStream.read_char()


Occurences of read_char_array

read_char_array occurences:
org.omg.CORBA.DataInputStream.read_char_array(org.omg.CORBA.CharSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_char_array(char:A, int, int)


Occurences of read_double

read_double occurences:
org.omg.CORBA.DataInputStream.read_double()
org.omg.CORBA.portable.InputStream.read_double()


Occurences of read_double_array

read_double_array occurences:
org.omg.CORBA.DataInputStream.read_double_array(org.omg.CORBA.DoubleSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_double_array(double:A, int, int)


Occurences of read_float

read_float occurences:
org.omg.CORBA.DataInputStream.read_float()
org.omg.CORBA.portable.InputStream.read_float()


Occurences of read_float_array

read_float_array occurences:
org.omg.CORBA.DataInputStream.read_float_array(org.omg.CORBA.FloatSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_float_array(float:A, int, int)


Occurences of read_long

read_long occurences:
org.omg.CORBA.DataInputStream.read_long()
org.omg.CORBA.portable.InputStream.read_long()


Occurences of read_longlong

read_longlong occurences:
org.omg.CORBA.DataInputStream.read_longlong()
org.omg.CORBA.portable.InputStream.read_longlong()


Occurences of read_longlong_array

read_longlong_array occurences:
org.omg.CORBA.DataInputStream.read_longlong_array(org.omg.CORBA.LongLongSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_longlong_array(long:A, int, int)


Occurences of read_long_array

read_long_array occurences:
org.omg.CORBA.DataInputStream.read_long_array(org.omg.CORBA.LongSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_long_array(int:A, int, int)


Occurences of read_Object

read_Object occurences:
org.omg.CORBA.DataInputStream.read_Object()
org.omg.CORBA.portable.InputStream.read_Object()
org.omg.CORBA.portable.InputStream.read_Object(java.lang.Class)


Occurences of read_octet

read_octet occurences:
org.omg.CORBA.DataInputStream.read_octet()
org.omg.CORBA.portable.InputStream.read_octet()


Occurences of read_octet_array

read_octet_array occurences:
org.omg.CORBA.DataInputStream.read_octet_array(org.omg.CORBA.OctetSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_octet_array(byte:A, int, int)


Occurences of read_short

read_short occurences:
org.omg.CORBA.DataInputStream.read_short()
org.omg.CORBA.portable.InputStream.read_short()


Occurences of read_short_array

read_short_array occurences:
org.omg.CORBA.DataInputStream.read_short_array(org.omg.CORBA.ShortSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_short_array(short:A, int, int)


Occurences of read_string

read_string occurences:
org.omg.CORBA.DataInputStream.read_string()
org.omg.CORBA.portable.InputStream.read_string()


Occurences of read_TypeCode

read_TypeCode occurences:
org.omg.CORBA.DataInputStream.read_TypeCode()
org.omg.CORBA.portable.InputStream.read_TypeCode()


Occurences of read_ulong

read_ulong occurences:
org.omg.CORBA.DataInputStream.read_ulong()
org.omg.CORBA.portable.InputStream.read_ulong()


Occurences of read_ulonglong

read_ulonglong occurences:
org.omg.CORBA.DataInputStream.read_ulonglong()
org.omg.CORBA.portable.InputStream.read_ulonglong()


Occurences of read_ulonglong_array

read_ulonglong_array occurences:
org.omg.CORBA.DataInputStream.read_ulonglong_array(org.omg.CORBA.ULongLongSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_ulonglong_array(long:A, int, int)


Occurences of read_ulong_array

read_ulong_array occurences:
org.omg.CORBA.DataInputStream.read_ulong_array(org.omg.CORBA.ULongSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_ulong_array(int:A, int, int)


Occurences of read_ushort

read_ushort occurences:
org.omg.CORBA.DataInputStream.read_ushort()
org.omg.CORBA.portable.InputStream.read_ushort()


Occurences of read_ushort_array

read_ushort_array occurences:
org.omg.CORBA.DataInputStream.read_ushort_array(org.omg.CORBA.UShortSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_ushort_array(short:A, int, int)


Occurences of read_value

read_value occurences:
org.omg.CORBA.Any.read_value(org.omg.CORBA.portable.InputStream, org.omg.CORBA.TypeCode)
org.omg.CORBA.portable.BoxedValueHelper.read_value(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.portable.ValueFactory.read_value(org.omg.CORBA_2_3.portable.InputStream)
org.omg.CORBA.StringValueHelper.read_value(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WStringValueHelper.read_value(org.omg.CORBA.portable.InputStream)
org.omg.CORBA_2_3.portable.InputStream.read_value()
org.omg.CORBA_2_3.portable.InputStream.read_value(java.io.Serializable)
org.omg.CORBA_2_3.portable.InputStream.read_value(java.lang.Class)
org.omg.CORBA_2_3.portable.InputStream.read_value(java.lang.String)
org.omg.CORBA_2_3.portable.InputStream.read_value(org.omg.CORBA.portable.BoxedValueHelper)


Occurences of read_wchar

read_wchar occurences:
org.omg.CORBA.DataInputStream.read_wchar()
org.omg.CORBA.portable.InputStream.read_wchar()


Occurences of read_wchar_array

read_wchar_array occurences:
org.omg.CORBA.DataInputStream.read_wchar_array(org.omg.CORBA.WCharSeqHolder, int, int)
org.omg.CORBA.portable.InputStream.read_wchar_array(char:A, int, int)


Occurences of read_wstring

read_wstring occurences:
org.omg.CORBA.DataInputStream.read_wstring()
org.omg.CORBA.portable.InputStream.read_wstring()


Occurences of REAL

REAL occurences:
java.sql.REAL
java.sql.REAL


Occurences of RealmCallback (constructors)

RealmCallback (constructors) occurences:
javax.security.sasl.RealmCallback(java.lang.String)
javax.security.sasl.RealmCallback(java.lang.String, java.lang.String)


Occurences of rebind

rebind occurences:
java.rmi.Naming.rebind(java.lang.String, java.rmi.Remote)
java.rmi.registry.Registry.rebind(java.lang.String, java.rmi.Remote)
javax.naming.Context.rebind(java.lang.String, java.lang.Object)
javax.naming.Context.rebind(javax.naming.Name, java.lang.Object)
javax.naming.directory.DirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.InitialContext.rebind(java.lang.String, java.lang.Object)
javax.naming.InitialContext.rebind(javax.naming.Name, java.lang.Object)
org.omg.CosNaming.NamingContextOperations.rebind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)
org.omg.CosNaming._NamingContextExtStub.rebind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)
org.omg.CosNaming._NamingContextStub.rebind(org.omg.CosNaming.NameComponent:A, org.omg.CORBA.Object)


Occurences of REBIND (constructors)

REBIND (constructors) occurences:
org.omg.CORBA.REBIND()
org.omg.CORBA.REBIND(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.REBIND(java.lang.String)
org.omg.CORBA.REBIND(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of rebind_context

rebind_context occurences:
org.omg.CosNaming.NamingContextOperations.rebind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)
org.omg.CosNaming._NamingContextExtStub.rebind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)
org.omg.CosNaming._NamingContextStub.rebind_context(org.omg.CosNaming.NameComponent:A, org.omg.CosNaming.NamingContext)


Occurences of recalculateIfInsetsChanged

recalculateIfInsetsChanged occurences:
javax.swing.plaf.basic.BasicSliderUI.recalculateIfInsetsChanged()
javax.swing.plaf.synth.SynthSliderUI.recalculateIfInsetsChanged()


Occurences of receive

receive occurences:
java.io.PipedInputStream.receive(int)
java.net.DatagramSocket.receive(java.net.DatagramPacket)
java.net.DatagramSocketImpl.receive(java.net.DatagramPacket)
java.nio.channels.DatagramChannel.receive(java.nio.ByteBuffer)


Occurences of reclaim

reclaim occurences:
javax.swing.text.AbstractDocument.AttributeContext.reclaim(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.reclaim(javax.swing.text.AttributeSet)


Occurences of reconnect

reconnect occurences:
javax.naming.ldap.InitialLdapContext.reconnect(javax.naming.ldap.Control:A)
javax.naming.ldap.LdapContext.reconnect(javax.naming.ldap.Control:A)


Occurences of reconvert

reconvert occurences:
java.awt.im.InputContext.reconvert()
java.awt.im.spi.InputMethod.reconvert()


Occurences of Rectangle (constructors)

Rectangle (constructors) occurences:
java.awt.Rectangle()
java.awt.Rectangle(int, int)
java.awt.Rectangle(int, int, int, int)
java.awt.Rectangle(java.awt.Dimension)
java.awt.Rectangle(java.awt.Point)
java.awt.Rectangle(java.awt.Point, java.awt.Dimension)
java.awt.Rectangle(java.awt.Rectangle)


Occurences of redefineClasses

redefineClasses occurences:
com.sun.jdi.VirtualMachine.redefineClasses(java.util.Map)
java.lang.instrument.Instrumentation.redefineClasses(java.lang.instrument.ClassDefinition...)


Occurences of redirectError

redirectError occurences:
java.lang.ProcessBuilder.redirectError()
java.lang.ProcessBuilder.redirectError(java.io.File)
java.lang.ProcessBuilder.redirectError(java.lang.ProcessBuilder.Redirect)


Occurences of redirectErrorStream

redirectErrorStream occurences:
java.lang.ProcessBuilder.redirectErrorStream()
java.lang.ProcessBuilder.redirectErrorStream(boolean)


Occurences of redirectInput

redirectInput occurences:
java.lang.ProcessBuilder.redirectInput()
java.lang.ProcessBuilder.redirectInput(java.io.File)
java.lang.ProcessBuilder.redirectInput(java.lang.ProcessBuilder.Redirect)


Occurences of redirectOutput

redirectOutput occurences:
java.lang.ProcessBuilder.redirectOutput()
java.lang.ProcessBuilder.redirectOutput(java.io.File)
java.lang.ProcessBuilder.redirectOutput(java.lang.ProcessBuilder.Redirect)


Occurences of redo

redo occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.redo()
javax.swing.text.AbstractDocument.ElementEdit.redo()
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit.redo()
javax.swing.undo.AbstractUndoableEdit.redo()
javax.swing.undo.CompoundEdit.redo()
javax.swing.undo.StateEdit.redo()
javax.swing.undo.UndoableEdit.redo()
javax.swing.undo.UndoManager.redo()


Occurences of reduce

reduce occurences:
com.sun.source.util.DocTreeScanner.reduce(java.lang.Object, java.lang.Object)
com.sun.source.util.DocTreeScanner.reduce(R, R)
com.sun.source.util.TreeScanner.reduce(java.lang.Object, java.lang.Object)
com.sun.source.util.TreeScanner.reduce(R, R)
java.util.concurrent.ConcurrentHashMap.reduce(long, java.util.function.BiFunction, java.util.function.BiFunction)
java.util.stream.DoubleStream.reduce(double, java.util.function.DoubleBinaryOperator)
java.util.stream.DoubleStream.reduce(java.util.function.DoubleBinaryOperator)
java.util.stream.IntStream.reduce(int, java.util.function.IntBinaryOperator)
java.util.stream.IntStream.reduce(java.util.function.IntBinaryOperator)
java.util.stream.LongStream.reduce(java.util.function.LongBinaryOperator)
java.util.stream.LongStream.reduce(long, java.util.function.LongBinaryOperator)
java.util.stream.Stream.reduce(java.lang.Object, java.util.function.BiFunction, java.util.function.BinaryOperator)
java.util.stream.Stream.reduce(java.lang.Object, java.util.function.BinaryOperator)
java.util.stream.Stream.reduce(java.util.function.BinaryOperator)
java.util.stream.Stream.reduce(T, java.util.function.BinaryOperator)
java.util.stream.Stream.reduce(U, java.util.function.BiFunction, java.util.function.BinaryOperator)


Occurences of reduceEntries

reduceEntries occurences:
java.util.concurrent.ConcurrentHashMap.reduceEntries(long, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.reduceEntries(long, java.util.function.Function, java.util.function.BiFunction)


Occurences of reduceKeys

reduceKeys occurences:
java.util.concurrent.ConcurrentHashMap.reduceKeys(long, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.reduceKeys(long, java.util.function.Function, java.util.function.BiFunction)


Occurences of reduceValues

reduceValues occurences:
java.util.concurrent.ConcurrentHashMap.reduceValues(long, java.util.function.BiFunction)
java.util.concurrent.ConcurrentHashMap.reduceValues(long, java.util.function.Function, java.util.function.BiFunction)


Occurences of reducing

reducing occurences:
java.util.stream.Collectors.reducing(java.lang.Object, java.util.function.BinaryOperator)
java.util.stream.Collectors.reducing(java.lang.Object, java.util.function.Function, java.util.function.BinaryOperator)
java.util.stream.Collectors.reducing(java.util.function.BinaryOperator)
java.util.stream.Collectors.reducing(T, java.util.function.BinaryOperator)
java.util.stream.Collectors.reducing(U, java.util.function.Function, java.util.function.BinaryOperator)


Occurences of ReentrantLock (constructors)

ReentrantLock (constructors) occurences:
java.util.concurrent.locks.ReentrantLock()
java.util.concurrent.locks.ReentrantLock(boolean)


Occurences of ReentrantReadWriteLock (constructors)

ReentrantReadWriteLock (constructors) occurences:
java.util.concurrent.locks.ReentrantReadWriteLock()
java.util.concurrent.locks.ReentrantReadWriteLock(boolean)


Occurences of REF

REF occurences:
java.sql.REF
java.sql.REF


Occurences of ref

ref occurences:
compact1.java.lang.ref
compact2.java.lang.ref
compact3.java.lang.ref
java.lang.ref
java.rmi.server.ref


Occurences of Reference

Reference occurences:
java.lang.ref.Reference
javax.naming.Reference
javax.xml.crypto.dsig.Reference
Reference


Occurences of Reference (constructors)

Reference (constructors) occurences:
javax.naming.Reference(java.lang.String)
javax.naming.Reference(java.lang.String, java.lang.String, java.lang.String)
javax.naming.Reference(java.lang.String, javax.naming.RefAddr)
javax.naming.Reference(java.lang.String, javax.naming.RefAddr, java.lang.String, java.lang.String)


Occurences of referenceType

referenceType occurences:
com.sun.jdi.event.ClassPrepareEvent.referenceType()
com.sun.jdi.ObjectReference.referenceType()


Occurences of ReferenceType

ReferenceType occurences:
com.sun.jdi.ReferenceType
javax.lang.model.type.ReferenceType


Occurences of ReferralException (constructors)

ReferralException (constructors) occurences:
javax.naming.ReferralException()
javax.naming.ReferralException(java.lang.String)


Occurences of reflect

reflect occurences:
compact1.java.lang.reflect
compact2.java.lang.reflect
compact3.java.lang.reflect
java.lang.reflect


Occurences of reflectAs

reflectAs occurences:
java.lang.invoke.MethodHandleInfo.reflectAs(java.lang.Class, java.lang.invoke.MethodHandles.Lookup)
java.lang.invoke.MethodHandles.reflectAs(java.lang.Class, java.lang.invoke.MethodHandle)


Occurences of ReflectionException (constructors)

ReflectionException (constructors) occurences:
javax.management.ReflectionException(java.lang.Exception)
javax.management.ReflectionException(java.lang.Exception, java.lang.String)


Occurences of ReflectiveOperationException (constructors)

ReflectiveOperationException (constructors) occurences:
java.lang.ReflectiveOperationException()
java.lang.ReflectiveOperationException(java.lang.String)
java.lang.ReflectiveOperationException(java.lang.String, java.lang.Throwable)
java.lang.ReflectiveOperationException(java.lang.Throwable)


Occurences of ReflectPermission (constructors)

ReflectPermission (constructors) occurences:
java.lang.reflect.ReflectPermission(java.lang.String)
java.lang.reflect.ReflectPermission(java.lang.String, java.lang.String)


Occurences of refresh

refresh occurences:
java.security.Policy.refresh()
java.time.zone.ZoneRulesProvider.refresh()
javax.security.auth.kerberos.KerberosTicket.refresh()
javax.security.auth.login.Configuration.refresh()
javax.security.auth.Policy.refresh()
javax.security.auth.Refreshable.refresh()


Occurences of RefreshFailedException (constructors)

RefreshFailedException (constructors) occurences:
javax.security.auth.RefreshFailedException()
javax.security.auth.RefreshFailedException(java.lang.String)


Occurences of REF_CURSOR

REF_CURSOR occurences:
java.sql.REF_CURSOR
java.sql.REF_CURSOR


Occurences of regex

regex occurences:
compact1.java.util.regex
compact2.java.util.regex
compact3.java.util.regex
java.util.regex


Occurences of regionMatches

regionMatches occurences:
java.lang.String.regionMatches(boolean, int, java.lang.String, int, int)
java.lang.String.regionMatches(int, java.lang.String, int, int)


Occurences of register

register occurences:
java.nio.channels.SelectableChannel.register(java.nio.channels.Selector, int)
java.nio.channels.SelectableChannel.register(java.nio.channels.Selector, int, java.lang.Object)
java.nio.channels.spi.AbstractSelectableChannel.register(java.nio.channels.Selector, int, java.lang.Object)
java.nio.channels.spi.AbstractSelector.register(java.nio.channels.spi.AbstractSelectableChannel, int, java.lang.Object)
java.nio.file.Path.register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind...)
java.nio.file.Path.register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind:A, java.nio.file.WatchEvent.Modifier...)
java.nio.file.Watchable.register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind...)
java.nio.file.Watchable.register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind:A, java.nio.file.WatchEvent.Modifier...)
java.rmi.activation.Activatable.register(java.rmi.activation.ActivationDesc)
java.util.concurrent.Phaser.register()
javax.swing.plaf.nimbus.NimbusLookAndFeel.register(javax.swing.plaf.synth.Region, java.lang.String)


Occurences of registerDriver

registerDriver occurences:
java.sql.DriverManager.registerDriver(java.sql.Driver)
java.sql.DriverManager.registerDriver(java.sql.Driver, java.sql.DriverAction)


Occurences of registerEditorKitForContentType

registerEditorKitForContentType occurences:
javax.swing.JEditorPane.registerEditorKitForContentType(java.lang.String, java.lang.String)
javax.swing.JEditorPane.registerEditorKitForContentType(java.lang.String, java.lang.String, java.lang.ClassLoader)


Occurences of registerKeyboardAction

registerKeyboardAction occurences:
javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)
javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int)


Occurences of registerListeners

registerListeners occurences:
java.awt.dnd.DragGestureRecognizer.registerListeners()
java.awt.dnd.MouseDragGestureRecognizer.registerListeners()


Occurences of registerOutParameter

registerOutParameter occurences:
java.sql.CallableStatement.registerOutParameter(int, int)
java.sql.CallableStatement.registerOutParameter(int, int, int)
java.sql.CallableStatement.registerOutParameter(int, int, java.lang.String)
java.sql.CallableStatement.registerOutParameter(int, java.sql.SQLType)
java.sql.CallableStatement.registerOutParameter(int, java.sql.SQLType, int)
java.sql.CallableStatement.registerOutParameter(int, java.sql.SQLType, java.lang.String)
java.sql.CallableStatement.registerOutParameter(java.lang.String, int)
java.sql.CallableStatement.registerOutParameter(java.lang.String, int, int)
java.sql.CallableStatement.registerOutParameter(java.lang.String, int, java.lang.String)
java.sql.CallableStatement.registerOutParameter(java.lang.String, java.sql.SQLType)
java.sql.CallableStatement.registerOutParameter(java.lang.String, java.sql.SQLType, int)
java.sql.CallableStatement.registerOutParameter(java.lang.String, java.sql.SQLType, java.lang.String)


Occurences of registerProvider

registerProvider occurences:
java.time.zone.ZoneRulesProvider.registerProvider(java.time.zone.ZoneRulesProvider)
javax.sql.rowset.spi.SyncFactory.registerProvider(java.lang.String)


Occurences of registerServiceProvider

registerServiceProvider occurences:
javax.imageio.spi.ServiceRegistry.registerServiceProvider(java.lang.Object)
javax.imageio.spi.ServiceRegistry.registerServiceProvider(java.lang.Object, java.lang.Class)
javax.imageio.spi.ServiceRegistry.registerServiceProvider(T, java.lang.Class)
javax.print.PrintServiceLookup.registerServiceProvider(javax.print.PrintServiceLookup)


Occurences of registerTarget

registerTarget occurences:
javax.rmi.CORBA.Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote)
javax.rmi.CORBA.UtilDelegate.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote)


Occurences of registry

registry occurences:
compact2.java.rmi.registry
compact3.java.rmi.registry
java.rmi.registry


Occurences of REJANG

REJANG occurences:
java.lang.REJANG
java.lang.REJANG


Occurences of rejectDrag

rejectDrag occurences:
java.awt.dnd.DropTargetContext.rejectDrag()
java.awt.dnd.DropTargetDragEvent.rejectDrag()


Occurences of rejectDrop

rejectDrop occurences:
java.awt.dnd.DropTargetContext.rejectDrop()
java.awt.dnd.DropTargetDropEvent.rejectDrop()


Occurences of rejectedExecution

rejectedExecution occurences:
java.util.concurrent.RejectedExecutionHandler.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor)
java.util.concurrent.ThreadPoolExecutor.AbortPolicy.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor)
java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor)
java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor)
java.util.concurrent.ThreadPoolExecutor.DiscardPolicy.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor)


Occurences of RejectedExecutionException (constructors)

RejectedExecutionException (constructors) occurences:
java.util.concurrent.RejectedExecutionException()
java.util.concurrent.RejectedExecutionException(java.lang.String)
java.util.concurrent.RejectedExecutionException(java.lang.String, java.lang.Throwable)
java.util.concurrent.RejectedExecutionException(java.lang.Throwable)


Occurences of relation

relation occurences:
compact3.javax.management.relation
javax.management.relation


Occurences of RelationException (constructors)

RelationException (constructors) occurences:
javax.management.relation.RelationException()
javax.management.relation.RelationException(java.lang.String)


Occurences of RelationNotFoundException (constructors)

RelationNotFoundException (constructors) occurences:
javax.management.relation.RelationNotFoundException()
javax.management.relation.RelationNotFoundException(java.lang.String)


Occurences of RelationNotification (constructors)

RelationNotification (constructors) occurences:
javax.management.relation.RelationNotification(java.lang.String, java.lang.Object, long, long, java.lang.String, java.lang.String, java.lang.String, javax.management.ObjectName, java.lang.String, java.util.List, java.util.List)
javax.management.relation.RelationNotification(java.lang.String, java.lang.Object, long, long, java.lang.String, java.lang.String, java.lang.String, javax.management.ObjectName, java.util.List)


Occurences of RelationServiceNotRegisteredException (constructors)

RelationServiceNotRegisteredException (constructors) occurences:
javax.management.relation.RelationServiceNotRegisteredException()
javax.management.relation.RelationServiceNotRegisteredException(java.lang.String)


Occurences of RelationSupport (constructors)

RelationSupport (constructors) occurences:
javax.management.relation.RelationSupport(java.lang.String, javax.management.ObjectName, java.lang.String, javax.management.relation.RoleList)
javax.management.relation.RelationSupport(java.lang.String, javax.management.ObjectName, javax.management.MBeanServer, java.lang.String, javax.management.relation.RoleList)


Occurences of RelationTypeNotFoundException (constructors)

RelationTypeNotFoundException (constructors) occurences:
javax.management.relation.RelationTypeNotFoundException()
javax.management.relation.RelationTypeNotFoundException(java.lang.String)


Occurences of RelationTypeSupport (constructors)

RelationTypeSupport (constructors) occurences:
javax.management.relation.RelationTypeSupport(java.lang.String)
javax.management.relation.RelationTypeSupport(java.lang.String, javax.management.relation.RoleInfo:A)


Occurences of relativeCCW

relativeCCW occurences:
java.awt.geom.Line2D.relativeCCW(double, double)
java.awt.geom.Line2D.relativeCCW(double, double, double, double, double, double)
java.awt.geom.Line2D.relativeCCW(java.awt.geom.Point2D)


Occurences of relativize

relativize occurences:
java.net.URI.relativize(java.net.URI)
java.nio.file.Path.relativize(java.nio.file.Path)


Occurences of release

release occurences:
java.nio.channels.FileLock.release()
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.release(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(int)
java.util.concurrent.Semaphore.release()
java.util.concurrent.Semaphore.release(int)
javax.sql.rowset.CachedRowSet.release()
org.omg.CORBA.portable.Delegate.release(org.omg.CORBA.Object)


Occurences of releaseBeanContextResources

releaseBeanContextResources occurences:
java.beans.beancontext.BeanContextChildSupport.releaseBeanContextResources()
java.beans.beancontext.BeanContextServicesSupport.releaseBeanContextResources()


Occurences of releaseService

releaseService occurences:
java.beans.beancontext.BeanContextServiceProvider.releaseService(java.beans.beancontext.BeanContextServices, java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextServices.releaseService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextServicesSupport.releaseService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Object)
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider.releaseService(java.beans.beancontext.BeanContextServices, java.lang.Object, java.lang.Object)


Occurences of releaseShared

releaseShared occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.releaseShared(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(int)


Occurences of releaseWritableTile

releaseWritableTile occurences:
java.awt.image.BufferedImage.releaseWritableTile(int, int)
java.awt.image.WritableRenderedImage.releaseWritableTile(int, int)


Occurences of reload

reload occurences:
java.util.ServiceLoader.reload()
javax.swing.tree.DefaultTreeModel.reload()
javax.swing.tree.DefaultTreeModel.reload(javax.swing.tree.TreeNode)


Occurences of REMAINDER

REMAINDER occurences:
com.sun.source.tree.REMAINDER
java.awt.REMAINDER


Occurences of remainder

remainder occurences:
java.math.BigDecimal.remainder(java.math.BigDecimal)
java.math.BigDecimal.remainder(java.math.BigDecimal, java.math.MathContext)
java.math.BigInteger.remainder(java.math.BigInteger)


Occurences of remainderUnsigned

remainderUnsigned occurences:
java.lang.Integer.remainderUnsigned(int, int)
java.lang.Long.remainderUnsigned(long, long)


Occurences of remainingCapacity

remainingCapacity occurences:
java.util.concurrent.ArrayBlockingQueue.remainingCapacity()
java.util.concurrent.BlockingQueue.remainingCapacity()
java.util.concurrent.DelayQueue.remainingCapacity()
java.util.concurrent.LinkedBlockingDeque.remainingCapacity()
java.util.concurrent.LinkedBlockingQueue.remainingCapacity()
java.util.concurrent.LinkedTransferQueue.remainingCapacity()
java.util.concurrent.PriorityBlockingQueue.remainingCapacity()
java.util.concurrent.SynchronousQueue.remainingCapacity()


Occurences of remainingName

remainingName occurences:
javax.naming.remainingName
javax.naming.spi.remainingName


Occurences of remote

remote occurences:
compact3.javax.management.remote
javax.management.remote


Occurences of Remote Method Invocation

Remote Method Invocation occurences:
Remote Method Invocation
Remote Method Invocation


Occurences of RemoteException (constructors)

RemoteException (constructors) occurences:
java.rmi.RemoteException()
java.rmi.RemoteException(java.lang.String)
java.rmi.RemoteException(java.lang.String, java.lang.Throwable)


Occurences of RemoteObject (constructors)

RemoteObject (constructors) occurences:
java.rmi.server.RemoteObject()
java.rmi.server.RemoteObject(java.rmi.server.RemoteRef)


Occurences of RemoteServer (constructors)

RemoteServer (constructors) occurences:
java.rmi.server.RemoteServer()
java.rmi.server.RemoteServer(java.rmi.server.RemoteRef)


Occurences of RemoteStub (constructors)

RemoteStub (constructors) occurences:
java.rmi.server.RemoteStub()
java.rmi.server.RemoteStub(java.rmi.server.RemoteRef)


Occurences of remove

remove occurences:
com.sun.jdi.event.EventQueue.remove()
com.sun.jdi.event.EventQueue.remove(long)
java.awt.AWTEventMulticaster.remove(java.awt.event.ActionListener, java.awt.event.ActionListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.AdjustmentListener, java.awt.event.AdjustmentListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.ComponentListener, java.awt.event.ComponentListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.ContainerListener, java.awt.event.ContainerListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.FocusListener, java.awt.event.FocusListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.HierarchyBoundsListener, java.awt.event.HierarchyBoundsListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.HierarchyListener, java.awt.event.HierarchyListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.InputMethodListener, java.awt.event.InputMethodListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.ItemListener, java.awt.event.ItemListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.KeyListener, java.awt.event.KeyListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.MouseListener, java.awt.event.MouseListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.MouseMotionListener, java.awt.event.MouseMotionListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.MouseWheelListener, java.awt.event.MouseWheelListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.TextListener, java.awt.event.TextListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.WindowFocusListener, java.awt.event.WindowFocusListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.WindowListener, java.awt.event.WindowListener)
java.awt.AWTEventMulticaster.remove(java.awt.event.WindowStateListener, java.awt.event.WindowStateListener)
java.awt.AWTEventMulticaster.remove(java.util.EventListener)
java.awt.Choice.remove(int)
java.awt.Choice.remove(java.lang.String)
java.awt.Component.remove(java.awt.MenuComponent)
java.awt.Container.remove(int)
java.awt.Container.remove(java.awt.Component)
java.awt.Frame.remove(java.awt.MenuComponent)
java.awt.List.remove(int)
java.awt.List.remove(java.lang.String)
java.awt.Menu.remove(int)
java.awt.Menu.remove(java.awt.MenuComponent)
java.awt.MenuBar.remove(int)
java.awt.MenuBar.remove(java.awt.MenuComponent)
java.awt.MenuContainer.remove(java.awt.MenuComponent)
java.awt.RenderingHints.remove(java.lang.Object)
java.awt.SystemTray.remove(java.awt.TrayIcon)
java.beans.beancontext.BeanContextSupport.remove(java.lang.Object)
java.beans.beancontext.BeanContextSupport.remove(java.lang.Object, boolean)
java.beans.beancontext.BeanContextSupport.BCSIterator.remove()
java.beans.Encoder.remove(java.lang.Object)
java.lang.ClassValue.remove(java.lang.Class)
java.lang.ref.ReferenceQueue.remove()
java.lang.ref.ReferenceQueue.remove(long)
java.lang.ThreadLocal.remove()
java.net.CookieStore.remove(java.net.URI, java.net.HttpCookie)
java.security.Provider.remove(java.lang.Object)
java.security.Provider.remove(java.lang.Object, java.lang.Object)
java.util.AbstractCollection.remove(java.lang.Object)
java.util.AbstractList.remove(int)
java.util.AbstractMap.remove(java.lang.Object)
java.util.AbstractQueue.remove()
java.util.AbstractSequentialList.remove(int)
java.util.ArrayDeque.remove()
java.util.ArrayDeque.remove(java.lang.Object)
java.util.ArrayList.remove(int)
java.util.ArrayList.remove(java.lang.Object)
java.util.Collection.remove(java.lang.Object)
java.util.concurrent.ArrayBlockingQueue.remove(java.lang.Object)
java.util.concurrent.BlockingDeque.remove()
java.util.concurrent.BlockingDeque.remove(java.lang.Object)
java.util.concurrent.BlockingQueue.remove(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.remove(java.lang.Object)
java.util.concurrent.ConcurrentHashMap.remove(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.KeySetView.remove(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.remove()
java.util.concurrent.ConcurrentLinkedDeque.remove(java.lang.Object)
java.util.concurrent.ConcurrentLinkedQueue.remove(java.lang.Object)
java.util.concurrent.ConcurrentMap.remove(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.remove(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.remove(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.remove(java.lang.Object)
java.util.concurrent.CopyOnWriteArrayList.remove(int)
java.util.concurrent.CopyOnWriteArrayList.remove(java.lang.Object)
java.util.concurrent.CopyOnWriteArraySet.remove(java.lang.Object)
java.util.concurrent.DelayQueue.remove(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.remove()
java.util.concurrent.LinkedBlockingDeque.remove(java.lang.Object)
java.util.concurrent.LinkedBlockingQueue.remove(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.remove(java.lang.Object)
java.util.concurrent.PriorityBlockingQueue.remove(java.lang.Object)
java.util.concurrent.SynchronousQueue.remove(java.lang.Object)
java.util.concurrent.ThreadPoolExecutor.remove(java.lang.Runnable)
java.util.Deque.remove()
java.util.Deque.remove(java.lang.Object)
java.util.Dictionary.remove(java.lang.Object)
java.util.EnumMap.remove(java.lang.Object)
java.util.HashMap.remove(java.lang.Object)
java.util.HashMap.remove(java.lang.Object, java.lang.Object)
java.util.HashSet.remove(java.lang.Object)
java.util.Hashtable.remove(java.lang.Object)
java.util.Hashtable.remove(java.lang.Object, java.lang.Object)
java.util.IdentityHashMap.remove(java.lang.Object)
java.util.Iterator.remove()
java.util.jar.Attributes.remove(java.lang.Object)
java.util.LinkedList.remove()
java.util.LinkedList.remove(int)
java.util.LinkedList.remove(java.lang.Object)
java.util.List.remove(int)
java.util.List.remove(java.lang.Object)
java.util.ListIterator.remove()
java.util.Map.remove(java.lang.Object)
java.util.Map.remove(java.lang.Object, java.lang.Object)
java.util.prefs.AbstractPreferences.remove(java.lang.String)
java.util.prefs.Preferences.remove(java.lang.String)
java.util.PriorityQueue.remove(java.lang.Object)
java.util.Queue.remove()
java.util.Scanner.remove()
java.util.Set.remove(java.lang.Object)
java.util.TreeMap.remove(java.lang.Object)
java.util.TreeSet.remove(java.lang.Object)
java.util.Vector.remove(int)
java.util.Vector.remove(java.lang.Object)
java.util.WeakHashMap.remove(java.lang.Object)
javax.accessibility.AccessibleRelationSet.remove(javax.accessibility.AccessibleRelation)
javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState)
javax.activation.MimeTypeParameterList.remove(java.lang.String)
javax.management.openmbean.TabularData.remove(java.lang.Object:A)
javax.management.openmbean.TabularDataSupport.remove(java.lang.Object)
javax.management.openmbean.TabularDataSupport.remove(java.lang.Object:A)
javax.naming.CompositeName.remove(int)
javax.naming.CompoundName.remove(int)
javax.naming.directory.Attribute.remove(int)
javax.naming.directory.Attribute.remove(java.lang.Object)
javax.naming.directory.Attributes.remove(java.lang.String)
javax.naming.directory.BasicAttribute.remove(int)
javax.naming.directory.BasicAttribute.remove(java.lang.Object)
javax.naming.directory.BasicAttributes.remove(java.lang.String)
javax.naming.ldap.LdapName.remove(int)
javax.naming.Name.remove(int)
javax.naming.Reference.remove(int)
javax.print.attribute.AttributeSet.remove(java.lang.Class)
javax.print.attribute.AttributeSet.remove(javax.print.attribute.Attribute)
javax.print.attribute.HashAttributeSet.remove(java.lang.Class)
javax.print.attribute.HashAttributeSet.remove(javax.print.attribute.Attribute)
javax.script.Bindings.remove(java.lang.Object)
javax.script.SimpleBindings.remove(java.lang.Object)
javax.sound.midi.Track.remove(javax.sound.midi.MidiEvent)
javax.swing.ActionMap.remove(java.lang.Object)
javax.swing.ButtonGroup.remove(javax.swing.AbstractButton)
javax.swing.ComponentInputMap.remove(javax.swing.KeyStroke)
javax.swing.DefaultListModel.remove(int)
javax.swing.event.EventListenerList.remove(java.lang.Class, java.util.EventListener)
javax.swing.event.EventListenerList.remove(java.lang.Class, T)
javax.swing.InputMap.remove(javax.swing.KeyStroke)
javax.swing.JApplet.remove(java.awt.Component)
javax.swing.JDesktopPane.remove(int)
javax.swing.JDesktopPane.remove(java.awt.Component)
javax.swing.JDialog.remove(java.awt.Component)
javax.swing.JFrame.remove(java.awt.Component)
javax.swing.JInternalFrame.remove(java.awt.Component)
javax.swing.JLayer.remove(java.awt.Component)
javax.swing.JLayeredPane.remove(int)
javax.swing.JMenu.remove(int)
javax.swing.JMenu.remove(java.awt.Component)
javax.swing.JMenu.remove(javax.swing.JMenuItem)
javax.swing.JPopupMenu.remove(int)
javax.swing.JSplitPane.remove(int)
javax.swing.JSplitPane.remove(java.awt.Component)
javax.swing.JTabbedPane.remove(int)
javax.swing.JTabbedPane.remove(java.awt.Component)
javax.swing.JViewport.remove(java.awt.Component)
javax.swing.JWindow.remove(java.awt.Component)
javax.swing.text.AbstractDocument.remove(int, int)
javax.swing.text.AbstractDocument.Content.remove(int, int)
javax.swing.text.DefaultStyledDocument.ElementBuffer.remove(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent)
javax.swing.text.Document.remove(int, int)
javax.swing.text.DocumentFilter.remove(javax.swing.text.DocumentFilter.FilterBypass, int, int)
javax.swing.text.DocumentFilter.FilterBypass.remove(int, int)
javax.swing.text.GapContent.remove(int, int)
javax.swing.text.StringContent.remove(int, int)
javax.swing.text.View.remove(int)
javax.swing.tree.DefaultMutableTreeNode.remove(int)
javax.swing.tree.DefaultMutableTreeNode.remove(javax.swing.tree.MutableTreeNode)
javax.swing.tree.MutableTreeNode.remove(int)
javax.swing.tree.MutableTreeNode.remove(javax.swing.tree.MutableTreeNode)
javax.xml.stream.util.EventReaderDelegate.remove()
org.omg.CORBA.ContextList.remove(int)
org.omg.CORBA.ExceptionList.remove(int)
org.omg.CORBA.NVList.remove(int)


Occurences of removeAccessibleSelection

removeAccessibleSelection occurences:
java.awt.List.AccessibleAWTList.removeAccessibleSelection(int)
java.awt.MenuComponent.AccessibleAWTMenuComponent.removeAccessibleSelection(int)
javax.accessibility.AccessibleSelection.removeAccessibleSelection(int)
javax.swing.JComboBox.AccessibleJComboBox.removeAccessibleSelection(int)
javax.swing.JList.AccessibleJList.removeAccessibleSelection(int)
javax.swing.JMenu.AccessibleJMenu.removeAccessibleSelection(int)
javax.swing.JMenuBar.AccessibleJMenuBar.removeAccessibleSelection(int)
javax.swing.JTabbedPane.AccessibleJTabbedPane.removeAccessibleSelection(int)
javax.swing.JTable.AccessibleJTable.removeAccessibleSelection(int)
javax.swing.JTree.AccessibleJTree.removeAccessibleSelection(int)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.removeAccessibleSelection(int)


Occurences of removeActionListener

removeActionListener occurences:
java.awt.Button.removeActionListener(java.awt.event.ActionListener)
java.awt.List.removeActionListener(java.awt.event.ActionListener)
java.awt.MenuItem.removeActionListener(java.awt.event.ActionListener)
java.awt.TextField.removeActionListener(java.awt.event.ActionListener)
java.awt.TrayIcon.removeActionListener(java.awt.event.ActionListener)
javax.swing.AbstractButton.removeActionListener(java.awt.event.ActionListener)
javax.swing.ButtonModel.removeActionListener(java.awt.event.ActionListener)
javax.swing.ComboBoxEditor.removeActionListener(java.awt.event.ActionListener)
javax.swing.DefaultButtonModel.removeActionListener(java.awt.event.ActionListener)
javax.swing.JComboBox.removeActionListener(java.awt.event.ActionListener)
javax.swing.JFileChooser.removeActionListener(java.awt.event.ActionListener)
javax.swing.JTextField.removeActionListener(java.awt.event.ActionListener)
javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener(java.awt.event.ActionListener)
javax.swing.Timer.removeActionListener(java.awt.event.ActionListener)


Occurences of removeAdjustmentListener

removeAdjustmentListener occurences:
java.awt.Adjustable.removeAdjustmentListener(java.awt.event.AdjustmentListener)
java.awt.Scrollbar.removeAdjustmentListener(java.awt.event.AdjustmentListener)
java.awt.ScrollPaneAdjustable.removeAdjustmentListener(java.awt.event.AdjustmentListener)
javax.swing.JScrollBar.removeAdjustmentListener(java.awt.event.AdjustmentListener)


Occurences of removeAll

removeAll occurences:
java.awt.Choice.removeAll()
java.awt.Container.removeAll()
java.awt.List.removeAll()
java.awt.Menu.removeAll()
java.beans.beancontext.BeanContextSupport.removeAll(java.util.Collection)
java.net.CookieStore.removeAll()
java.util.AbstractCollection.removeAll(java.util.Collection)
java.util.AbstractSet.removeAll(java.util.Collection)
java.util.ArrayList.removeAll(java.util.Collection)
java.util.Collection.removeAll(java.util.Collection)
java.util.concurrent.ConcurrentHashMap.KeySetView.removeAll(java.util.Collection)
java.util.concurrent.ConcurrentSkipListSet.removeAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArrayList.removeAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArraySet.removeAll(java.util.Collection)
java.util.concurrent.SynchronousQueue.removeAll(java.util.Collection)
java.util.List.removeAll(java.util.Collection)
java.util.Set.removeAll(java.util.Collection)
java.util.Vector.removeAll(java.util.Collection)
javax.swing.JDesktopPane.removeAll()
javax.swing.JLayer.removeAll()
javax.swing.JLayeredPane.removeAll()
javax.swing.JMenu.removeAll()
javax.swing.JSplitPane.removeAll()
javax.swing.JTabbedPane.removeAll()
javax.swing.text.View.removeAll()


Occurences of removeAllElements

removeAllElements occurences:
java.util.Vector.removeAllElements()
javax.swing.DefaultComboBoxModel.removeAllElements()
javax.swing.DefaultListModel.removeAllElements()


Occurences of removeAllHighlights

removeAllHighlights occurences:
javax.swing.text.DefaultHighlighter.removeAllHighlights()
javax.swing.text.Highlighter.removeAllHighlights()


Occurences of removeAllMimeHeaders

removeAllMimeHeaders occurences:
javax.xml.soap.AttachmentPart.removeAllMimeHeaders()
javax.xml.soap.SOAPPart.removeAllMimeHeaders()


Occurences of removeAllNotifications

removeAllNotifications occurences:
javax.management.timer.Timer.removeAllNotifications()
javax.management.timer.TimerMBean.removeAllNotifications()


Occurences of removeAttribute

removeAttribute occurences:
javax.imageio.metadata.IIOMetadataFormatImpl.removeAttribute(java.lang.String, java.lang.String)
javax.imageio.metadata.IIOMetadataNode.removeAttribute(java.lang.String)
javax.script.ScriptContext.removeAttribute(java.lang.String, int)
javax.script.SimpleScriptContext.removeAttribute(java.lang.String, int)
javax.swing.text.AbstractDocument.AbstractElement.removeAttribute(java.lang.Object)
javax.swing.text.AbstractDocument.AttributeContext.removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)
javax.swing.text.html.StyleSheet.removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)
javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object)
javax.swing.text.SimpleAttributeSet.removeAttribute(java.lang.Object)
javax.swing.text.StyleContext.removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)
javax.swing.text.StyleContext.NamedStyle.removeAttribute(java.lang.Object)
javax.xml.soap.SOAPElement.removeAttribute(javax.xml.namespace.QName)
javax.xml.soap.SOAPElement.removeAttribute(javax.xml.soap.Name)
org.w3c.dom.Element.removeAttribute(java.lang.String)
org.xml.sax.ext.Attributes2Impl.removeAttribute(int)
org.xml.sax.helpers.AttributeListImpl.removeAttribute(java.lang.String)
org.xml.sax.helpers.AttributesImpl.removeAttribute(int)


Occurences of removeAttributeChangeNotificationListener

removeAttributeChangeNotificationListener occurences:
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)
javax.management.modelmbean.RequiredModelMBean.removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)


Occurences of removeAttributeNode

removeAttributeNode occurences:
javax.imageio.metadata.IIOMetadataNode.removeAttributeNode(org.w3c.dom.Attr)
org.w3c.dom.Element.removeAttributeNode(org.w3c.dom.Attr)


Occurences of removeAttributeNS

removeAttributeNS occurences:
javax.imageio.metadata.IIOMetadataNode.removeAttributeNS(java.lang.String, java.lang.String)
org.w3c.dom.Element.removeAttributeNS(java.lang.String, java.lang.String)


Occurences of removeAttributes

removeAttributes occurences:
javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(java.util.Enumeration)
javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.AbstractDocument.AttributeContext.removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)
javax.swing.text.AbstractDocument.AttributeContext.removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.html.StyleSheet.removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)
javax.swing.text.html.StyleSheet.removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration)
javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.SimpleAttributeSet.removeAttributes(java.util.Enumeration)
javax.swing.text.SimpleAttributeSet.removeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)
javax.swing.text.StyleContext.removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.NamedStyle.removeAttributes(java.util.Enumeration)
javax.swing.text.StyleContext.NamedStyle.removeAttributes(javax.swing.text.AttributeSet)


Occurences of removeBeanContextMembershipListener

removeBeanContextMembershipListener occurences:
java.beans.beancontext.BeanContext.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)
java.beans.beancontext.BeanContextSupport.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)


Occurences of removeBeanContextServicesListener

removeBeanContextServicesListener occurences:
java.beans.beancontext.BeanContextServices.removeBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
java.beans.beancontext.BeanContextServicesSupport.removeBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)


Occurences of removeCellEditorListener

removeCellEditorListener occurences:
javax.swing.AbstractCellEditor.removeCellEditorListener(javax.swing.event.CellEditorListener)
javax.swing.CellEditor.removeCellEditorListener(javax.swing.event.CellEditorListener)
javax.swing.tree.DefaultTreeCellEditor.removeCellEditorListener(javax.swing.event.CellEditorListener)


Occurences of removeChangeListener

removeChangeListener occurences:
javax.swing.AbstractButton.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.AbstractSpinnerModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.ButtonModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.colorchooser.ColorSelectionModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.colorchooser.DefaultColorSelectionModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultBoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultButtonModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.DefaultSingleSelectionModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.JProgressBar.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.JSlider.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.JSpinner.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.JTabbedPane.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.MenuSelectionManager.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.SingleSelectionModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.SpinnerModel.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.Caret.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.DefaultCaret.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.Style.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.StyleContext.removeChangeListener(javax.swing.event.ChangeListener)
javax.swing.text.StyleContext.NamedStyle.removeChangeListener(javax.swing.event.ChangeListener)


Occurences of removeChild

removeChild occurences:
javax.imageio.metadata.IIOMetadataNode.removeChild(org.w3c.dom.Node)
org.w3c.dom.Node.removeChild(org.w3c.dom.Node)


Occurences of removeColumn

removeColumn occurences:
javax.swing.JTable.removeColumn(javax.swing.table.TableColumn)
javax.swing.table.DefaultTableColumnModel.removeColumn(javax.swing.table.TableColumn)
javax.swing.table.TableColumnModel.removeColumn(javax.swing.table.TableColumn)


Occurences of removeColumnModelListener

removeColumnModelListener occurences:
javax.swing.table.DefaultTableColumnModel.removeColumnModelListener(javax.swing.event.TableColumnModelListener)
javax.swing.table.TableColumnModel.removeColumnModelListener(javax.swing.event.TableColumnModelListener)


Occurences of removeConnectionNotificationListener

removeConnectionNotificationListener occurences:
javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener)
javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener)
javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)


Occurences of removeConsumer

removeConsumer occurences:
java.awt.image.FilteredImageSource.removeConsumer(java.awt.image.ImageConsumer)
java.awt.image.ImageProducer.removeConsumer(java.awt.image.ImageConsumer)
java.awt.image.MemoryImageSource.removeConsumer(java.awt.image.ImageConsumer)
java.awt.image.renderable.RenderableImageProducer.removeConsumer(java.awt.image.ImageConsumer)


Occurences of removeDocumentListener

removeDocumentListener occurences:
javax.swing.text.AbstractDocument.removeDocumentListener(javax.swing.event.DocumentListener)
javax.swing.text.DefaultStyledDocument.removeDocumentListener(javax.swing.event.DocumentListener)
javax.swing.text.Document.removeDocumentListener(javax.swing.event.DocumentListener)


Occurences of removeDragSourceListener

removeDragSourceListener occurences:
java.awt.dnd.DragSource.removeDragSourceListener(java.awt.dnd.DragSourceListener)
java.awt.dnd.DragSourceContext.removeDragSourceListener(java.awt.dnd.DragSourceListener)


Occurences of removeEditor

removeEditor occurences:
javax.swing.JTable.removeEditor()
javax.swing.plaf.basic.BasicComboBoxUI.removeEditor()


Occurences of removeElement

removeElement occurences:
java.util.Vector.removeElement(java.lang.Object)
javax.imageio.metadata.IIOMetadataFormatImpl.removeElement(java.lang.String)
javax.swing.DefaultComboBoxModel.removeElement(java.lang.Object)
javax.swing.DefaultListModel.removeElement(java.lang.Object)
javax.swing.MutableComboBoxModel.removeElement(java.lang.Object)
javax.swing.text.DefaultStyledDocument.removeElement(javax.swing.text.Element)


Occurences of removeElementAt

removeElementAt occurences:
java.util.Vector.removeElementAt(int)
javax.swing.DefaultComboBoxModel.removeElementAt(int)
javax.swing.DefaultListModel.removeElementAt(int)
javax.swing.MutableComboBoxModel.removeElementAt(int)


Occurences of removeField

removeField occurences:
javax.management.Descriptor.removeField(java.lang.String)
javax.management.ImmutableDescriptor.removeField(java.lang.String)
javax.management.modelmbean.DescriptorSupport.removeField(java.lang.String)


Occurences of removeFirst

removeFirst occurences:
java.util.ArrayDeque.removeFirst()
java.util.concurrent.ConcurrentLinkedDeque.removeFirst()
java.util.concurrent.LinkedBlockingDeque.removeFirst()
java.util.Deque.removeFirst()
java.util.LinkedList.removeFirst()


Occurences of removeFirstOccurrence

removeFirstOccurrence occurences:
java.util.ArrayDeque.removeFirstOccurrence(java.lang.Object)
java.util.concurrent.BlockingDeque.removeFirstOccurrence(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.removeFirstOccurrence(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.removeFirstOccurrence(java.lang.Object)
java.util.Deque.removeFirstOccurrence(java.lang.Object)
java.util.LinkedList.removeFirstOccurrence(java.lang.Object)


Occurences of removeFocusListener

removeFocusListener occurences:
java.awt.Component.removeFocusListener(java.awt.event.FocusListener)
java.awt.Component.AccessibleAWTComponent.removeFocusListener(java.awt.event.FocusListener)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.removeFocusListener(java.awt.event.FocusListener)
java.awt.MenuComponent.AccessibleAWTMenuComponent.removeFocusListener(java.awt.event.FocusListener)
javax.accessibility.AccessibleComponent.removeFocusListener(java.awt.event.FocusListener)
javax.swing.JList.AccessibleJList.AccessibleJListChild.removeFocusListener(java.awt.event.FocusListener)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.removeFocusListener(java.awt.event.FocusListener)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.removeFocusListener(java.awt.event.FocusListener)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.removeFocusListener(java.awt.event.FocusListener)


Occurences of removeFromEnvironment

removeFromEnvironment occurences:
javax.naming.Context.removeFromEnvironment(java.lang.String)
javax.naming.InitialContext.removeFromEnvironment(java.lang.String)


Occurences of removeFromParent

removeFromParent occurences:
javax.swing.tree.DefaultMutableTreeNode.removeFromParent()
javax.swing.tree.MutableTreeNode.removeFromParent()


Occurences of removeHighlight

removeHighlight occurences:
javax.swing.text.DefaultHighlighter.removeHighlight(java.lang.Object)
javax.swing.text.Highlighter.removeHighlight(java.lang.Object)


Occurences of removeIf

removeIf occurences:
java.util.ArrayList.removeIf(java.util.function.Predicate)
java.util.Collection.removeIf(java.util.function.Predicate)
java.util.concurrent.CopyOnWriteArrayList.removeIf(java.util.function.Predicate)
java.util.concurrent.CopyOnWriteArraySet.removeIf(java.util.function.Predicate)
java.util.Vector.removeIf(java.util.function.Predicate)


Occurences of removeImage

removeImage occurences:
java.awt.MediaTracker.removeImage(java.awt.Image)
java.awt.MediaTracker.removeImage(java.awt.Image, int)
java.awt.MediaTracker.removeImage(java.awt.Image, int, int, int)
javax.imageio.ImageWriter.removeImage(int)


Occurences of removeIndexInterval

removeIndexInterval occurences:
javax.swing.DefaultListSelectionModel.removeIndexInterval(int, int)
javax.swing.ListSelectionModel.removeIndexInterval(int, int)


Occurences of removeItemListener

removeItemListener occurences:
java.awt.Checkbox.removeItemListener(java.awt.event.ItemListener)
java.awt.CheckboxMenuItem.removeItemListener(java.awt.event.ItemListener)
java.awt.Choice.removeItemListener(java.awt.event.ItemListener)
java.awt.ItemSelectable.removeItemListener(java.awt.event.ItemListener)
java.awt.List.removeItemListener(java.awt.event.ItemListener)
javax.swing.AbstractButton.removeItemListener(java.awt.event.ItemListener)
javax.swing.ButtonModel.removeItemListener(java.awt.event.ItemListener)
javax.swing.DefaultButtonModel.removeItemListener(java.awt.event.ItemListener)
javax.swing.JComboBox.removeItemListener(java.awt.event.ItemListener)


Occurences of removeLast

removeLast occurences:
java.util.ArrayDeque.removeLast()
java.util.concurrent.ConcurrentLinkedDeque.removeLast()
java.util.concurrent.LinkedBlockingDeque.removeLast()
java.util.Deque.removeLast()
java.util.LinkedList.removeLast()


Occurences of removeLastOccurrence

removeLastOccurrence occurences:
java.util.ArrayDeque.removeLastOccurrence(java.lang.Object)
java.util.concurrent.BlockingDeque.removeLastOccurrence(java.lang.Object)
java.util.concurrent.ConcurrentLinkedDeque.removeLastOccurrence(java.lang.Object)
java.util.concurrent.LinkedBlockingDeque.removeLastOccurrence(java.lang.Object)
java.util.Deque.removeLastOccurrence(java.lang.Object)
java.util.LinkedList.removeLastOccurrence(java.lang.Object)


Occurences of removeLayoutComponent

removeLayoutComponent occurences:
java.awt.BorderLayout.removeLayoutComponent(java.awt.Component)
java.awt.CardLayout.removeLayoutComponent(java.awt.Component)
java.awt.FlowLayout.removeLayoutComponent(java.awt.Component)
java.awt.GridBagLayout.removeLayoutComponent(java.awt.Component)
java.awt.GridLayout.removeLayoutComponent(java.awt.Component)
java.awt.LayoutManager.removeLayoutComponent(java.awt.Component)
javax.swing.BoxLayout.removeLayoutComponent(java.awt.Component)
javax.swing.GroupLayout.removeLayoutComponent(java.awt.Component)
javax.swing.JRootPane.RootLayout.removeLayoutComponent(java.awt.Component)
javax.swing.JSpinner.DefaultEditor.removeLayoutComponent(java.awt.Component)
javax.swing.OverlayLayout.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicScrollBarUI.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.removeLayoutComponent(java.awt.Component)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.removeLayoutComponent(java.awt.Component)
javax.swing.ScrollPaneLayout.removeLayoutComponent(java.awt.Component)
javax.swing.SpringLayout.removeLayoutComponent(java.awt.Component)
javax.swing.ViewportLayout.removeLayoutComponent(java.awt.Component)


Occurences of removeListDataListener

removeListDataListener occurences:
javax.swing.AbstractListModel.removeListDataListener(javax.swing.event.ListDataListener)
javax.swing.ListModel.removeListDataListener(javax.swing.event.ListDataListener)


Occurences of removeListSelectionListener

removeListSelectionListener occurences:
javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)
javax.swing.JList.removeListSelectionListener(javax.swing.event.ListSelectionListener)
javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)


Occurences of removeMenuKeyListener

removeMenuKeyListener occurences:
javax.swing.JMenuItem.removeMenuKeyListener(javax.swing.event.MenuKeyListener)
javax.swing.JPopupMenu.removeMenuKeyListener(javax.swing.event.MenuKeyListener)


Occurences of removeMimeHeader

removeMimeHeader occurences:
javax.xml.soap.AttachmentPart.removeMimeHeader(java.lang.String)
javax.xml.soap.SOAPPart.removeMimeHeader(java.lang.String)


Occurences of removeMouseListener

removeMouseListener occurences:
java.awt.Component.removeMouseListener(java.awt.event.MouseListener)
java.awt.TrayIcon.removeMouseListener(java.awt.event.MouseListener)


Occurences of removeMouseMotionListener

removeMouseMotionListener occurences:
java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener)
java.awt.TrayIcon.removeMouseMotionListener(java.awt.event.MouseMotionListener)


Occurences of removeNode

removeNode occurences:
java.util.prefs.AbstractPreferences.removeNode()
java.util.prefs.Preferences.removeNode()


Occurences of removeNodeChangeListener

removeNodeChangeListener occurences:
java.util.prefs.AbstractPreferences.removeNodeChangeListener(java.util.prefs.NodeChangeListener)
java.util.prefs.Preferences.removeNodeChangeListener(java.util.prefs.NodeChangeListener)


Occurences of removeNotification

removeNotification occurences:
javax.management.timer.Timer.removeNotification(java.lang.Integer)
javax.management.timer.TimerMBean.removeNotification(java.lang.Integer)


Occurences of removeNotificationListener

removeNotificationListener occurences:
javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)
javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName)
javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)
javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName)
javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
javax.management.MBeanServerDelegate.removeNotificationListener(javax.management.NotificationListener)
javax.management.MBeanServerDelegate.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.modelmbean.RequiredModelMBean.removeNotificationListener(javax.management.NotificationListener)
javax.management.modelmbean.RequiredModelMBean.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener)
javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
javax.management.remote.rmi.RMIConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.security.auth.Subject)
javax.management.StandardEmitterMBean.removeNotificationListener(javax.management.NotificationListener)
javax.management.StandardEmitterMBean.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)


Occurences of removeNotificationListeners

removeNotificationListeners occurences:
javax.management.remote.rmi.RMIConnection.removeNotificationListeners(javax.management.ObjectName, java.lang.Integer:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.removeNotificationListeners(javax.management.ObjectName, java.lang.Integer:A, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.removeNotificationListeners(javax.management.ObjectName, java.lang.Integer:A, javax.security.auth.Subject)


Occurences of removeNotifications

removeNotifications occurences:
javax.management.timer.Timer.removeNotifications(java.lang.String)
javax.management.timer.TimerMBean.removeNotifications(java.lang.String)


Occurences of removeNotify

removeNotify occurences:
java.awt.Component.removeNotify()
java.awt.Container.removeNotify()
java.awt.dnd.DropTarget.removeNotify(java.awt.peer.ComponentPeer)
java.awt.dnd.DropTargetContext.removeNotify()
java.awt.Frame.removeNotify()
java.awt.im.InputContext.removeNotify(java.awt.Component)
java.awt.im.spi.InputMethod.removeNotify()
java.awt.List.removeNotify()
java.awt.Menu.removeNotify()
java.awt.MenuBar.removeNotify()
java.awt.MenuComponent.removeNotify()
java.awt.TextComponent.removeNotify()
java.awt.Window.removeNotify()
javax.swing.AbstractButton.removeNotify()
javax.swing.JButton.removeNotify()
javax.swing.JComponent.removeNotify()
javax.swing.JLayer.removeNotify()
javax.swing.JMenuBar.removeNotify()
javax.swing.JRootPane.removeNotify()
javax.swing.JTable.removeNotify()
javax.swing.text.JTextComponent.removeNotify()


Occurences of removeObservedObject

removeObservedObject occurences:
javax.management.monitor.Monitor.removeObservedObject(javax.management.ObjectName)
javax.management.monitor.MonitorMBean.removeObservedObject(javax.management.ObjectName)


Occurences of removePopupMenuListener

removePopupMenuListener occurences:
javax.swing.JComboBox.removePopupMenuListener(javax.swing.event.PopupMenuListener)
javax.swing.JPopupMenu.removePopupMenuListener(javax.swing.event.PopupMenuListener)


Occurences of removePreferenceChangeListener

removePreferenceChangeListener occurences:
java.util.prefs.AbstractPreferences.removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener)
java.util.prefs.Preferences.removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener)


Occurences of removePropertyChangeListener

removePropertyChangeListener occurences:
com.sun.tools.jconsole.JConsoleContext.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Component.AccessibleAWTComponent.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Container.AccessibleAWTContainer.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.SystemTray.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.awt.Toolkit.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.beancontext.BeanContextChild.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.beancontext.BeanContextChildSupport.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.Customizer.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyChangeSupport.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyChangeSupport.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
java.beans.PropertyEditor.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.beans.PropertyEditorSupport.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.util.jar.Pack200.Packer.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.util.jar.Pack200.Unpacker.removePropertyChangeListener(java.beans.PropertyChangeListener)
java.util.logging.LogManager.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.accessibility.AccessibleContext.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.AbstractAction.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.Action.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JComponent.AccessibleJComponent.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JList.AccessibleJList.AccessibleJListChild.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.JTree.EmptySelectionModel.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.basic.BasicDirectoryModel.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.LayerUI.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.plaf.LayerUI.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
javax.swing.SwingWorker.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.table.TableColumn.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.tree.DefaultTreeSelectionModel.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.tree.TreeSelectionModel.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.UIDefaults.removePropertyChangeListener(java.beans.PropertyChangeListener)
javax.swing.UIManager.removePropertyChangeListener(java.beans.PropertyChangeListener)


Occurences of removeRange

removeRange occurences:
java.util.AbstractList.removeRange(int, int)
java.util.ArrayList.removeRange(int, int)
java.util.Vector.removeRange(int, int)
javax.swing.DefaultListModel.removeRange(int, int)


Occurences of removeRelation

removeRelation occurences:
javax.management.relation.RelationService.removeRelation(java.lang.String)
javax.management.relation.RelationServiceMBean.removeRelation(java.lang.String)


Occurences of removeRelationType

removeRelationType occurences:
javax.management.relation.RelationService.removeRelationType(java.lang.String)
javax.management.relation.RelationServiceMBean.removeRelationType(java.lang.String)


Occurences of removeRowSetListener

removeRowSetListener occurences:
javax.sql.RowSet.removeRowSetListener(javax.sql.RowSetListener)
javax.sql.rowset.BaseRowSet.removeRowSetListener(javax.sql.RowSetListener)


Occurences of removeSelectionInterval

removeSelectionInterval occurences:
javax.swing.DefaultListSelectionModel.removeSelectionInterval(int, int)
javax.swing.JList.removeSelectionInterval(int, int)
javax.swing.JTree.removeSelectionInterval(int, int)
javax.swing.ListSelectionModel.removeSelectionInterval(int, int)


Occurences of removeSelectionPath

removeSelectionPath occurences:
javax.swing.JTree.removeSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.DefaultTreeSelectionModel.removeSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.TreeSelectionModel.removeSelectionPath(javax.swing.tree.TreePath)


Occurences of removeSelectionPaths

removeSelectionPaths occurences:
javax.swing.JTree.removeSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.JTree.EmptySelectionModel.removeSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.DefaultTreeSelectionModel.removeSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.TreeSelectionModel.removeSelectionPaths(javax.swing.tree.TreePath:A)


Occurences of removeStyle

removeStyle occurences:
javax.swing.JTextPane.removeStyle(java.lang.String)
javax.swing.text.DefaultStyledDocument.removeStyle(java.lang.String)
javax.swing.text.html.StyleSheet.removeStyle(java.lang.String)
javax.swing.text.StyleContext.removeStyle(java.lang.String)
javax.swing.text.StyledDocument.removeStyle(java.lang.String)


Occurences of removeTableModelListener

removeTableModelListener occurences:
javax.swing.table.AbstractTableModel.removeTableModelListener(javax.swing.event.TableModelListener)
javax.swing.table.TableModel.removeTableModelListener(javax.swing.event.TableModelListener)


Occurences of removeTileObserver

removeTileObserver occurences:
java.awt.image.BufferedImage.removeTileObserver(java.awt.image.TileObserver)
java.awt.image.WritableRenderedImage.removeTileObserver(java.awt.image.TileObserver)


Occurences of removeTreeModelListener

removeTreeModelListener occurences:
javax.swing.tree.DefaultTreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)
javax.swing.tree.TreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)


Occurences of removeTreeSelectionListener

removeTreeSelectionListener occurences:
javax.swing.JTree.removeTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.JTree.EmptySelectionModel.removeTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.tree.DefaultTreeSelectionModel.removeTreeSelectionListener(javax.swing.event.TreeSelectionListener)
javax.swing.tree.TreeSelectionModel.removeTreeSelectionListener(javax.swing.event.TreeSelectionListener)


Occurences of removeUndoableEditListener

removeUndoableEditListener occurences:
javax.swing.text.AbstractDocument.removeUndoableEditListener(javax.swing.event.UndoableEditListener)
javax.swing.text.Document.removeUndoableEditListener(javax.swing.event.UndoableEditListener)
javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener)


Occurences of removeUpdate

removeUpdate occurences:
javax.swing.event.DocumentListener.removeUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.AbstractDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)
javax.swing.text.DefaultStyledDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)
javax.swing.text.DefaultStyledDocument.ElementBuffer.removeUpdate()
javax.swing.text.FieldView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.FlowView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.FlowView.FlowStrategy.removeUpdate(javax.swing.text.FlowView, javax.swing.event.DocumentEvent, java.awt.Rectangle)
javax.swing.text.GlyphView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.html.InlineView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.JTextComponent.AccessibleJTextComponent.removeUpdate(javax.swing.event.DocumentEvent)
javax.swing.text.PlainDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)
javax.swing.text.PlainView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.WrappedPlainView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
javax.swing.text.ZoneView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)


Occurences of removeVetoableChangeListener

removeVetoableChangeListener occurences:
java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener)
java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.beancontext.BeanContextChild.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.beancontext.BeanContextChildSupport.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
java.beans.VetoableChangeSupport.removeVetoableChangeListener(java.beans.VetoableChangeListener)
java.beans.VetoableChangeSupport.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)
javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener)


Occurences of rename

rename occurences:
javax.naming.Context.rename(java.lang.String, java.lang.String)
javax.naming.Context.rename(javax.naming.Name, javax.naming.Name)
javax.naming.InitialContext.rename(java.lang.String, java.lang.String)
javax.naming.InitialContext.rename(javax.naming.Name, javax.naming.Name)


Occurences of render

render occurences:
javax.swing.text.AbstractDocument.render(java.lang.Runnable)
javax.swing.text.Document.render(java.lang.Runnable)


Occurences of RenderContext (constructors)

RenderContext (constructors) occurences:
java.awt.image.renderable.RenderContext(java.awt.geom.AffineTransform)
java.awt.image.renderable.RenderContext(java.awt.geom.AffineTransform, java.awt.RenderingHints)
java.awt.image.renderable.RenderContext(java.awt.geom.AffineTransform, java.awt.Shape)
java.awt.image.renderable.RenderContext(java.awt.geom.AffineTransform, java.awt.Shape, java.awt.RenderingHints)


Occurences of renderer

renderer occurences:
javax.swing.renderer
javax.swing.renderer
javax.swing.tree.renderer


Occurences of rendererPane

rendererPane occurences:
javax.swing.plaf.basic.rendererPane
javax.swing.plaf.basic.rendererPane
javax.swing.plaf.basic.rendererPane
javax.swing.plaf.basic.rendererPane
javax.swing.plaf.metal.rendererPane


Occurences of RenderingHints (constructors)

RenderingHints (constructors) occurences:
java.awt.RenderingHints(java.awt.RenderingHints.Key, java.lang.Object)
java.awt.RenderingHints(java.util.Map)


Occurences of repaint

repaint occurences:
java.awt.Component.repaint()
java.awt.Component.repaint(int, int, int, int)
java.awt.Component.repaint(long)
java.awt.Component.repaint(long, int, int, int, int)
javax.swing.DefaultListCellRenderer.repaint()
javax.swing.DefaultListCellRenderer.repaint(java.awt.Rectangle)
javax.swing.DefaultListCellRenderer.repaint(long, int, int, int, int)
javax.swing.JApplet.repaint(long, int, int, int, int)
javax.swing.JComponent.repaint(java.awt.Rectangle)
javax.swing.JComponent.repaint(long, int, int, int, int)
javax.swing.JDialog.repaint(long, int, int, int, int)
javax.swing.JFrame.repaint(long, int, int, int, int)
javax.swing.JViewport.repaint(long, int, int, int, int)
javax.swing.JWindow.repaint(long, int, int, int, int)
javax.swing.table.DefaultTableCellRenderer.repaint()
javax.swing.table.DefaultTableCellRenderer.repaint(java.awt.Rectangle)
javax.swing.table.DefaultTableCellRenderer.repaint(long, int, int, int, int)
javax.swing.text.DefaultCaret.repaint()
javax.swing.tree.DefaultTreeCellRenderer.repaint()
javax.swing.tree.DefaultTreeCellRenderer.repaint(java.awt.Rectangle)
javax.swing.tree.DefaultTreeCellRenderer.repaint(long, int, int, int, int)


Occurences of replace

replace occurences:
java.lang.String.replace(char, char)
java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)
java.lang.StringBuffer.replace(int, int, java.lang.String)
java.lang.StringBuilder.replace(int, int, java.lang.String)
java.security.Provider.replace(java.lang.Object, java.lang.Object)
java.security.Provider.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.replace(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentHashMap.replace(K, V)
java.util.concurrent.ConcurrentHashMap.replace(K, V, V)
java.util.concurrent.ConcurrentMap.replace(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentMap.replace(K, V)
java.util.concurrent.ConcurrentMap.replace(K, V, V)
java.util.concurrent.ConcurrentSkipListMap.replace(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.replace(K, V)
java.util.concurrent.ConcurrentSkipListMap.replace(K, V, V)
java.util.HashMap.replace(java.lang.Object, java.lang.Object)
java.util.HashMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.HashMap.replace(K, V)
java.util.HashMap.replace(K, V, V)
java.util.Hashtable.replace(java.lang.Object, java.lang.Object)
java.util.Hashtable.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.Hashtable.replace(K, V)
java.util.Hashtable.replace(K, V, V)
java.util.Map.replace(java.lang.Object, java.lang.Object)
java.util.Map.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.Map.replace(K, V)
java.util.Map.replace(K, V, V)
java.util.TreeMap.replace(java.lang.Object, java.lang.Object)
java.util.TreeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.TreeMap.replace(K, V)
java.util.TreeMap.replace(K, V, V)
javax.swing.GroupLayout.replace(java.awt.Component, java.awt.Component)
javax.swing.text.AbstractDocument.replace(int, int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.AbstractDocument.BranchElement.replace(int, int, javax.swing.text.Element:A)
javax.swing.text.AsyncBoxView.replace(int, int, javax.swing.text.View:A)
javax.swing.text.BoxView.replace(int, int, javax.swing.text.View:A)
javax.swing.text.CompositeView.replace(int, int, javax.swing.text.View:A)
javax.swing.text.DocumentFilter.replace(javax.swing.text.DocumentFilter.FilterBypass, int, int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.DocumentFilter.FilterBypass.replace(int, int, java.lang.String, javax.swing.text.AttributeSet)
javax.swing.text.GapContent.replace(int, int, java.lang.Object, int)
javax.swing.text.TableView.replace(int, int, javax.swing.text.View:A)
javax.swing.text.TableView.TableRow.replace(int, int, javax.swing.text.View:A)
javax.swing.text.View.replace(int, int, javax.swing.text.View:A)


Occurences of replaceAll

replaceAll occurences:
java.lang.String.replaceAll(java.lang.String, java.lang.String)
java.security.Provider.replaceAll(java.util.function.BiFunction)
java.util.ArrayList.replaceAll(java.util.function.UnaryOperator)
java.util.Collections.replaceAll(java.util.List, java.lang.Object, java.lang.Object)
java.util.Collections.replaceAll(java.util.List, T, T)
java.util.concurrent.ConcurrentHashMap.replaceAll(java.util.function.BiFunction)
java.util.concurrent.ConcurrentMap.replaceAll(java.util.function.BiFunction)
java.util.concurrent.ConcurrentSkipListMap.replaceAll(java.util.function.BiFunction)
java.util.concurrent.CopyOnWriteArrayList.replaceAll(java.util.function.UnaryOperator)
java.util.HashMap.replaceAll(java.util.function.BiFunction)
java.util.Hashtable.replaceAll(java.util.function.BiFunction)
java.util.IdentityHashMap.replaceAll(java.util.function.BiFunction)
java.util.LinkedHashMap.replaceAll(java.util.function.BiFunction)
java.util.List.replaceAll(java.util.function.UnaryOperator)
java.util.Map.replaceAll(java.util.function.BiFunction)
java.util.regex.Matcher.replaceAll(java.lang.String)
java.util.TreeMap.replaceAll(java.util.function.BiFunction)
java.util.Vector.replaceAll(java.util.function.UnaryOperator)
java.util.WeakHashMap.replaceAll(java.util.function.BiFunction)


Occurences of replaceChild

replaceChild occurences:
javax.imageio.metadata.IIOMetadataNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
org.w3c.dom.Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)


Occurences of replaceEdit

replaceEdit occurences:
javax.swing.undo.AbstractUndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)
javax.swing.undo.UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)


Occurences of replaceEditor

replaceEditor occurences:
javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent)


Occurences of replaceFirst

replaceFirst occurences:
java.lang.String.replaceFirst(java.lang.String, java.lang.String)
java.util.regex.Matcher.replaceFirst(java.lang.String)


Occurences of replacement

replacement occurences:
java.nio.charset.CharsetDecoder.replacement()
java.nio.charset.CharsetEncoder.replacement()


Occurences of replacePixels

replacePixels occurences:
javax.imageio.ImageWriter.replacePixels(java.awt.image.Raster, javax.imageio.ImageWriteParam)
javax.imageio.ImageWriter.replacePixels(java.awt.image.RenderedImage, javax.imageio.ImageWriteParam)


Occurences of replaceRange

replaceRange occurences:
java.awt.TextArea.replaceRange(java.lang.String, int, int)
javax.swing.JTextArea.replaceRange(java.lang.String, int, int)


Occurences of replaceSelection

replaceSelection occurences:
javax.swing.JEditorPane.replaceSelection(java.lang.String)
javax.swing.JTextPane.replaceSelection(java.lang.String)
javax.swing.text.JTextComponent.replaceSelection(java.lang.String)


Occurences of replaceText

replaceText occurences:
java.awt.TextArea.replaceText(java.lang.String, int, int)
javax.accessibility.AccessibleEditableText.replaceText(int, int, java.lang.String)
javax.swing.JSpinner.AccessibleJSpinner.replaceText(int, int, java.lang.String)
javax.swing.text.JTextComponent.AccessibleJTextComponent.replaceText(int, int, java.lang.String)


Occurences of replaceWith

replaceWith occurences:
java.nio.charset.CharsetDecoder.replaceWith(java.lang.String)
java.nio.charset.CharsetEncoder.replaceWith(byte:A)


Occurences of REPORT

REPORT occurences:
java.nio.charset.REPORT
javax.print.attribute.standard.REPORT


Occurences of report

report occurences:
javax.tools.DiagnosticCollector.report(javax.tools.Diagnostic)
javax.tools.DiagnosticListener.report(javax.tools.Diagnostic)
javax.xml.stream.XMLReporter.report(java.lang.String, java.lang.String, java.lang.Object, javax.xml.stream.Location)


Occurences of request

request occurences:
com.sun.jdi.event.Event.request()
com.sun.jdi.request
org.omg.CORBA.portable.Delegate.request(org.omg.CORBA.Object, java.lang.String)
org.omg.CORBA.portable.Delegate.request(org.omg.CORBA.Object, java.lang.String, boolean)


Occurences of requestFocus

requestFocus occurences:
java.awt.Component.requestFocus()
java.awt.Component.requestFocus(boolean)
java.awt.Component.AccessibleAWTComponent.requestFocus()
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.requestFocus()
java.awt.MenuComponent.AccessibleAWTMenuComponent.requestFocus()
javax.accessibility.AccessibleComponent.requestFocus()
javax.swing.JComponent.requestFocus()
javax.swing.JComponent.requestFocus(boolean)
javax.swing.JList.AccessibleJList.AccessibleJListChild.requestFocus()
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.requestFocus()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.requestFocus()
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar.requestFocus()
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.requestFocus()


Occurences of requestFocusInWindow

requestFocusInWindow occurences:
java.awt.Component.requestFocusInWindow()
java.awt.Component.requestFocusInWindow(boolean)
javax.swing.JComponent.requestFocusInWindow()
javax.swing.JComponent.requestFocusInWindow(boolean)


Occurences of requestPasswordAuthentication

requestPasswordAuthentication occurences:
java.net.Authenticator.requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)
java.net.Authenticator.requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String, java.net.URL, java.net.Authenticator.RequestorType)
java.net.Authenticator.requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)


Occurences of requestTopDownLeftRightResend

requestTopDownLeftRightResend occurences:
java.awt.image.FilteredImageSource.requestTopDownLeftRightResend(java.awt.image.ImageConsumer)
java.awt.image.ImageProducer.requestTopDownLeftRightResend(java.awt.image.ImageConsumer)
java.awt.image.MemoryImageSource.requestTopDownLeftRightResend(java.awt.image.ImageConsumer)
java.awt.image.renderable.RenderableImageProducer.requestTopDownLeftRightResend(java.awt.image.ImageConsumer)


Occurences of require

require occurences:
javax.xml.stream.util.StreamReaderDelegate.require(int, java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamReader.require(int, java.lang.String, java.lang.String)


Occurences of required

required occurences:
java.sql.required
javax.xml.bind.annotation.XmlAttribute.required()
javax.xml.bind.annotation.XmlElement.required()
javax.xml.bind.annotation.XmlElementRef.required()
javax.xml.bind.annotation.XmlElementWrapper.required()
javax.xml.ws.soap.Addressing.required()
javax.xml.ws.soap.required


Occurences of REQUIRED

REQUIRED occurences:
java.awt.REQUIRED
javax.security.auth.login.REQUIRED
javax.swing.text.html.parser.REQUIRED


Occurences of RequiredModelMBean (constructors)

RequiredModelMBean (constructors) occurences:
javax.management.modelmbean.RequiredModelMBean()
javax.management.modelmbean.RequiredModelMBean(javax.management.modelmbean.ModelMBeanInfo)


Occurences of requireNonNull

requireNonNull occurences:
java.util.Objects.requireNonNull(java.lang.Object)
java.util.Objects.requireNonNull(java.lang.Object, java.lang.String)
java.util.Objects.requireNonNull(java.lang.Object, java.util.function.Supplier)
java.util.Objects.requireNonNull(T)
java.util.Objects.requireNonNull(T, java.lang.String)
java.util.Objects.requireNonNull(T, java.util.function.Supplier)


Occurences of RescaleOp (constructors)

RescaleOp (constructors) occurences:
java.awt.image.RescaleOp(float, float, java.awt.RenderingHints)
java.awt.image.RescaleOp(float:A, float:A, java.awt.RenderingHints)


Occurences of rescanCurrentDirectory

rescanCurrentDirectory occurences:
javax.swing.JFileChooser.rescanCurrentDirectory()
javax.swing.plaf.basic.BasicFileChooserUI.rescanCurrentDirectory(javax.swing.JFileChooser)
javax.swing.plaf.FileChooserUI.rescanCurrentDirectory(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalFileChooserUI.rescanCurrentDirectory(javax.swing.JFileChooser)
javax.swing.plaf.multi.MultiFileChooserUI.rescanCurrentDirectory(javax.swing.JFileChooser)


Occurences of reset

reset occurences:
java.awt.geom.Area.reset()
java.awt.geom.Path2D.reset()
java.awt.Polygon.reset()
java.io.BufferedInputStream.reset()
java.io.BufferedReader.reset()
java.io.ByteArrayInputStream.reset()
java.io.ByteArrayOutputStream.reset()
java.io.CharArrayReader.reset()
java.io.CharArrayWriter.reset()
java.io.FilterInputStream.reset()
java.io.FilterReader.reset()
java.io.InputStream.reset()
java.io.LineNumberInputStream.reset()
java.io.LineNumberReader.reset()
java.io.ObjectOutputStream.reset()
java.io.PushbackInputStream.reset()
java.io.PushbackReader.reset()
java.io.Reader.reset()
java.io.StringBufferInputStream.reset()
java.io.StringReader.reset()
java.nio.Buffer.reset()
java.nio.charset.CharsetDecoder.reset()
java.nio.charset.CharsetEncoder.reset()
java.nio.file.WatchKey.reset()
java.security.MessageDigest.reset()
java.text.CollationElementIterator.reset()
java.util.concurrent.atomic.DoubleAccumulator.reset()
java.util.concurrent.atomic.DoubleAdder.reset()
java.util.concurrent.atomic.LongAccumulator.reset()
java.util.concurrent.atomic.LongAdder.reset()
java.util.concurrent.CyclicBarrier.reset()
java.util.logging.LogManager.reset()
java.util.regex.Matcher.reset()
java.util.regex.Matcher.reset(java.lang.CharSequence)
java.util.Scanner.reset()
java.util.zip.Adler32.reset()
java.util.zip.Checksum.reset()
java.util.zip.CRC32.reset()
java.util.zip.Deflater.reset()
java.util.zip.DeflaterInputStream.reset()
java.util.zip.Inflater.reset()
java.util.zip.InflaterInputStream.reset()
javax.crypto.Mac.reset()
javax.imageio.ImageReader.reset()
javax.imageio.ImageWriter.reset()
javax.imageio.metadata.IIOMetadata.reset()
javax.imageio.stream.ImageInputStream.reset()
javax.imageio.stream.ImageInputStreamImpl.reset()
javax.sound.sampled.AudioInputStream.reset()
javax.swing.ProgressMonitorInputStream.reset()
javax.xml.bind.util.ValidationEventCollector.reset()
javax.xml.datatype.XMLGregorianCalendar.reset()
javax.xml.parsers.DocumentBuilder.reset()
javax.xml.parsers.SAXParser.reset()
javax.xml.transform.Transformer.reset()
javax.xml.validation.Validator.reset()
javax.xml.xpath.XPath.reset()
org.xml.sax.helpers.NamespaceSupport.reset()


Occurences of resetRowSelection

resetRowSelection occurences:
javax.swing.tree.DefaultTreeSelectionModel.resetRowSelection()
javax.swing.tree.TreeSelectionModel.resetRowSelection()


Occurences of resetToPreferredSizes

resetToPreferredSizes occurences:
javax.swing.JSplitPane.resetToPreferredSizes()
javax.swing.plaf.basic.BasicSplitPaneUI.resetToPreferredSizes(javax.swing.JSplitPane)
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.resetToPreferredSizes()
javax.swing.plaf.multi.MultiSplitPaneUI.resetToPreferredSizes(javax.swing.JSplitPane)
javax.swing.plaf.SplitPaneUI.resetToPreferredSizes(javax.swing.JSplitPane)


Occurences of reshape

reshape occurences:
java.awt.Component.reshape(int, int, int, int)
java.awt.Rectangle.reshape(int, int, int, int)
java.awt.Window.reshape(int, int, int, int)
javax.swing.JComponent.reshape(int, int, int, int)
javax.swing.JInternalFrame.reshape(int, int, int, int)
javax.swing.JViewport.reshape(int, int, int, int)


Occurences of resize

resize occurences:
java.applet.Applet.resize(int, int)
java.applet.Applet.resize(java.awt.Dimension)
java.awt.Component.resize(int, int)
java.awt.Component.resize(java.awt.Dimension)
java.awt.Rectangle.resize(int, int)


Occurences of resizeAndRepaint

resizeAndRepaint occurences:
javax.swing.JTable.resizeAndRepaint()
javax.swing.table.JTableHeader.resizeAndRepaint()


Occurences of resizeFrame

resizeFrame occurences:
javax.swing.DefaultDesktopManager.resizeFrame(javax.swing.JComponent, int, int, int, int)
javax.swing.DesktopManager.resizeFrame(javax.swing.JComponent, int, int, int, int)


Occurences of resolution

resolution occurences:
java.util.resolution
javax.sound.midi.resolution
javax.sound.midi.resolution


Occurences of resolve

resolve occurences:
java.net.URI.resolve(java.lang.String)
java.net.URI.resolve(java.net.URI)
java.nio.file.Path.resolve(java.lang.String)
java.nio.file.Path.resolve(java.nio.file.Path)
java.time.temporal.TemporalField.resolve(java.util.Map, java.time.temporal.TemporalAccessor, java.time.format.ResolverStyle)
javax.xml.transform.URIResolver.resolve(java.lang.String, java.lang.String)
org.omg.CosNaming.NamingContextOperations.resolve(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextExtStub.resolve(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextStub.resolve(org.omg.CosNaming.NameComponent:A)


Occurences of ResolveAttribute

ResolveAttribute occurences:
javax.swing.text.ResolveAttribute
javax.swing.text.ResolveAttribute


Occurences of resolveClass

resolveClass occurences:
java.io.ObjectInputStream.resolveClass(java.io.ObjectStreamClass)
java.lang.ClassLoader.resolveClass(java.lang.Class)


Occurences of resolveDate

resolveDate occurences:
java.time.chrono.AbstractChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.Chronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.HijrahChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.IsoChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.JapaneseChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.MinguoChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)
java.time.chrono.ThaiBuddhistChronology.resolveDate(java.util.Map, java.time.format.ResolverStyle)


Occurences of resolvedObj

resolvedObj occurences:
javax.naming.resolvedObj
javax.naming.spi.resolvedObj


Occurences of resolveEntity

resolveEntity occurences:
javax.xml.stream.XMLResolver.resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.EntityResolver.resolveEntity(java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.resolveEntity(java.lang.String, java.lang.String)
org.xml.sax.ext.DefaultHandler2.resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.ext.EntityResolver2.resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.HandlerBase.resolveEntity(java.lang.String, java.lang.String)
org.xml.sax.helpers.DefaultHandler.resolveEntity(java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.resolveEntity(java.lang.String, java.lang.String)


Occurences of ResolveResult (constructors)

ResolveResult (constructors) occurences:
javax.naming.spi.ResolveResult()
javax.naming.spi.ResolveResult(java.lang.Object, java.lang.String)
javax.naming.spi.ResolveResult(java.lang.Object, javax.naming.Name)


Occurences of resolveSibling

resolveSibling occurences:
java.nio.file.Path.resolveSibling(java.lang.String)
java.nio.file.Path.resolveSibling(java.nio.file.Path)


Occurences of resolveToClass

resolveToClass occurences:
javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class)
javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class)


Occurences of resolve_initial_references

resolve_initial_references occurences:
org.omg.CORBA.ORB.resolve_initial_references(java.lang.String)
org.omg.PortableInterceptor.ORBInitInfoOperations.resolve_initial_references(java.lang.String)


Occurences of resolve_str

resolve_str occurences:
org.omg.CosNaming.NamingContextExtOperations.resolve_str(java.lang.String)
org.omg.CosNaming._NamingContextExtStub.resolve_str(java.lang.String)


Occurences of RespectBindingFeature (constructors)

RespectBindingFeature (constructors) occurences:
javax.xml.ws.RespectBindingFeature()
javax.xml.ws.RespectBindingFeature(boolean)


Occurences of responseCode

responseCode occurences:
java.net.HttpRetryException.responseCode()
java.net.responseCode


Occurences of rest_of_name

rest_of_name occurences:
org.omg.CosNaming.NamingContextPackage.rest_of_name
org.omg.CosNaming.NamingContextPackage.rest_of_name


Occurences of Result

Result occurences:
javax.naming.spi.DirStateFactory.Result.Result(java.lang.Object, javax.naming.directory.Attributes)
javax.xml.transform.Result


Occurences of result

result occurences:
org.omg.CORBA.Request.result()
org.omg.CORBA.ServerRequest.result(org.omg.CORBA.Any)
org.omg.PortableInterceptor.RequestInfoOperations.result()


Occurences of resume

resume occurences:
com.sun.jdi.event.EventSet.resume()
com.sun.jdi.ThreadGroupReference.resume()
com.sun.jdi.ThreadReference.resume()
com.sun.jdi.VirtualMachine.resume()
java.lang.Thread.resume()
java.lang.ThreadGroup.resume()


Occurences of retainAll

retainAll occurences:
java.beans.beancontext.BeanContextSupport.retainAll(java.util.Collection)
java.util.AbstractCollection.retainAll(java.util.Collection)
java.util.ArrayList.retainAll(java.util.Collection)
java.util.Collection.retainAll(java.util.Collection)
java.util.concurrent.ConcurrentHashMap.KeySetView.retainAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArrayList.retainAll(java.util.Collection)
java.util.concurrent.CopyOnWriteArraySet.retainAll(java.util.Collection)
java.util.concurrent.SynchronousQueue.retainAll(java.util.Collection)
java.util.List.retainAll(java.util.Collection)
java.util.Set.retainAll(java.util.Collection)
java.util.Vector.retainAll(java.util.Collection)


Occurences of retrieveAllRoles

retrieveAllRoles occurences:
javax.management.relation.Relation.retrieveAllRoles()
javax.management.relation.RelationSupport.retrieveAllRoles()


Occurences of RETURN

RETURN occurences:
com.sun.source.doctree.RETURN
com.sun.source.tree.RETURN


Occurences of ReturnTree

ReturnTree occurences:
com.sun.source.doctree.ReturnTree
com.sun.source.tree.ReturnTree


Occurences of returnType

returnType occurences:
com.sun.javadoc.MethodDoc.returnType()
com.sun.jdi.Method.returnType()
java.lang.invoke.MethodType.returnType()


Occurences of returnValue

returnValue occurences:
com.sun.jdi.event.MethodExitEvent.returnValue()
com.sun.tools.attach.AgentInitializationException.returnValue()


Occurences of revalidate

revalidate occurences:
java.awt.Component.revalidate()
java.awt.Component.BltBufferStrategy.revalidate()
java.awt.Component.FlipBufferStrategy.revalidate()
javax.swing.DefaultListCellRenderer.revalidate()
javax.swing.JComponent.revalidate()
javax.swing.table.DefaultTableCellRenderer.revalidate()
javax.swing.tree.DefaultTreeCellRenderer.revalidate()


Occurences of reverse

reverse occurences:
java.lang.Integer.reverse(int)
java.lang.Long.reverse(long)
java.lang.StringBuffer.reverse()
java.lang.StringBuilder.reverse()
java.util.Collections.reverse(java.util.List)


Occurences of reverseBytes

reverseBytes occurences:
java.lang.Character.reverseBytes(char)
java.lang.Integer.reverseBytes(int)
java.lang.Long.reverseBytes(long)
java.lang.Short.reverseBytes(short)


Occurences of reverseOrder

reverseOrder occurences:
java.util.Collections.reverseOrder()
java.util.Collections.reverseOrder(java.util.Comparator)
java.util.Comparator.reverseOrder()


Occurences of REVERSE_LANDSCAPE

REVERSE_LANDSCAPE occurences:
java.awt.print.REVERSE_LANDSCAPE
javax.print.attribute.standard.REVERSE_LANDSCAPE


Occurences of revokeService

revokeService occurences:
java.beans.beancontext.BeanContextServices.revokeService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider, boolean)
java.beans.beancontext.BeanContextServicesSupport.revokeService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider, boolean)


Occurences of rewind

rewind occurences:
java.nio.Buffer.rewind()
org.omg.CORBA.DynAny.rewind()
org.omg.DynamicAny.DynAnyOperations.rewind()
org.omg.DynamicAny._DynAnyStub.rewind()
org.omg.DynamicAny._DynArrayStub.rewind()
org.omg.DynamicAny._DynEnumStub.rewind()
org.omg.DynamicAny._DynFixedStub.rewind()
org.omg.DynamicAny._DynSequenceStub.rewind()
org.omg.DynamicAny._DynStructStub.rewind()
org.omg.DynamicAny._DynUnionStub.rewind()
org.omg.DynamicAny._DynValueStub.rewind()


Occurences of right

right occurences:
java.awt.right
javax.swing.border.right


Occurences of RIGHT

RIGHT occurences:
java.awt.RIGHT
java.awt.RIGHT
java.awt.RIGHT
javax.swing.border.RIGHT
javax.swing.RIGHT
javax.swing.RIGHT


Occurences of rightKey

rightKey occurences:
javax.swing.plaf.basic.rightKey
javax.swing.plaf.basic.rightKey
javax.swing.plaf.basic.rightKey


Occurences of rint

rint occurences:
java.lang.Math.rint(double)
java.lang.StrictMath.rint(double)


Occurences of rmi

rmi occurences:
compact2.java.rmi
compact3.java.rmi
compact3.javax.management.remote.rmi
java.rmi
javax.management.remote.rmi
javax.rmi
org.omg.stub.java.rmi


Occurences of rmic

rmic occurences:
rmic
rmic


Occurences of RMIConnector (constructors)

RMIConnector (constructors) occurences:
javax.management.remote.rmi.RMIConnector(javax.management.remote.JMXServiceURL, java.util.Map)
javax.management.remote.rmi.RMIConnector(javax.management.remote.rmi.RMIServer, java.util.Map)


Occurences of RMIConnectorServer (constructors)

RMIConnectorServer (constructors) occurences:
javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map)
javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.MBeanServer)
javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer)


Occurences of rmid

rmid occurences:
rmid
rmid


Occurences of rmiregistry

rmiregistry occurences:
rmiregistry
rmiregistry


Occurences of RMISecurityException (constructors)

RMISecurityException (constructors) occurences:
java.rmi.RMISecurityException(java.lang.String)
java.rmi.RMISecurityException(java.lang.String, java.lang.String)


Occurences of Robot (constructors)

Robot (constructors) occurences:
java.awt.Robot()
java.awt.Robot(java.awt.GraphicsDevice)


Occurences of RoleInfo (constructors)

RoleInfo (constructors) occurences:
javax.management.relation.RoleInfo(java.lang.String, java.lang.String)
javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean)
javax.management.relation.RoleInfo(java.lang.String, java.lang.String, boolean, boolean, int, int, java.lang.String)
javax.management.relation.RoleInfo(javax.management.relation.RoleInfo)


Occurences of RoleInfoNotFoundException (constructors)

RoleInfoNotFoundException (constructors) occurences:
javax.management.relation.RoleInfoNotFoundException()
javax.management.relation.RoleInfoNotFoundException(java.lang.String)


Occurences of RoleList (constructors)

RoleList (constructors) occurences:
javax.management.relation.RoleList()
javax.management.relation.RoleList(int)
javax.management.relation.RoleList(java.util.List)


Occurences of RoleNotFoundException (constructors)

RoleNotFoundException (constructors) occurences:
javax.management.relation.RoleNotFoundException()
javax.management.relation.RoleNotFoundException(java.lang.String)


Occurences of RoleUnresolvedList (constructors)

RoleUnresolvedList (constructors) occurences:
javax.management.relation.RoleUnresolvedList()
javax.management.relation.RoleUnresolvedList(int)
javax.management.relation.RoleUnresolvedList(java.util.List)


Occurences of roll

roll occurences:
java.util.Calendar.roll(int, boolean)
java.util.Calendar.roll(int, int)
java.util.GregorianCalendar.roll(int, boolean)
java.util.GregorianCalendar.roll(int, int)


Occurences of rollback

rollback occurences:
java.sql.Connection.rollback()
java.sql.Connection.rollback(java.sql.Savepoint)
javax.sql.rowset.CachedRowSet.rollback()
javax.sql.rowset.CachedRowSet.rollback(java.sql.Savepoint)
javax.sql.rowset.JdbcRowSet.rollback()
javax.sql.rowset.JdbcRowSet.rollback(java.sql.Savepoint)
javax.sql.rowset.spi.TransactionalWriter.rollback()
javax.sql.rowset.spi.TransactionalWriter.rollback(java.sql.Savepoint)
javax.transaction.xa.XAResource.rollback(javax.transaction.xa.Xid)


Occurences of RolloverButtonBorder

RolloverButtonBorder occurences:
javax.swing.plaf.basic.BasicBorders.RolloverButtonBorder.RolloverButtonBorder(java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)
javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder.RolloverButtonBorder()


Occurences of rolloverColumnUpdated

rolloverColumnUpdated occurences:
javax.swing.plaf.basic.BasicTableHeaderUI.rolloverColumnUpdated(int, int)
javax.swing.plaf.synth.SynthTableHeaderUI.rolloverColumnUpdated(int, int)


Occurences of ROMAN_BASELINE

ROMAN_BASELINE occurences:
java.awt.font.ROMAN_BASELINE
java.awt.ROMAN_BASELINE


Occurences of rootPane

rootPane occurences:
javax.swing.rootPane
javax.swing.rootPane
javax.swing.rootPane
javax.swing.rootPane
javax.swing.rootPane


Occurences of rootPaneCheckingEnabled

rootPaneCheckingEnabled occurences:
javax.swing.rootPaneCheckingEnabled
javax.swing.rootPaneCheckingEnabled
javax.swing.rootPaneCheckingEnabled
javax.swing.rootPaneCheckingEnabled
javax.swing.rootPaneCheckingEnabled


Occurences of rootVisible

rootVisible occurences:
javax.swing.rootVisible
javax.swing.tree.rootVisible


Occurences of ROOT_PANE

ROOT_PANE occurences:
javax.accessibility.ROOT_PANE
javax.swing.plaf.synth.ROOT_PANE


Occurences of rotate

rotate occurences:
java.awt.geom.AffineTransform.rotate(double)
java.awt.geom.AffineTransform.rotate(double, double)
java.awt.geom.AffineTransform.rotate(double, double, double)
java.awt.geom.AffineTransform.rotate(double, double, double, double)
java.awt.Graphics2D.rotate(double)
java.awt.Graphics2D.rotate(double, double, double)
java.util.Collections.rotate(java.util.List, int)


Occurences of rotateLeft

rotateLeft occurences:
java.lang.Integer.rotateLeft(int, int)
java.lang.Long.rotateLeft(long, int)


Occurences of rotateRight

rotateRight occurences:
java.lang.Integer.rotateRight(int, int)
java.lang.Long.rotateRight(long, int)


Occurences of rotateTabRuns

rotateTabRuns occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.rotateTabRuns(int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout.rotateTabRuns(int, int)


Occurences of round

round occurences:
java.lang.Math.round(double)
java.lang.Math.round(float)
java.lang.StrictMath.round(double)
java.lang.StrictMath.round(float)
java.math.BigDecimal.round(java.math.MathContext)


Occurences of rowHeight

rowHeight occurences:
javax.swing.rowHeight
javax.swing.rowHeight
javax.swing.tree.rowHeight


Occurences of ROWID

ROWID occurences:
java.sql.ROWID
java.sql.ROWID


Occurences of rowsDeleted

rowsDeleted occurences:
javax.swing.DefaultRowSorter.rowsDeleted(int, int)
javax.swing.RowSorter.rowsDeleted(int, int)


Occurences of rowset

rowset occurences:
compact3.javax.sql.rowset
javax.sql.rowset


Occurences of RowSetWarning (constructors)

RowSetWarning (constructors) occurences:
javax.sql.rowset.RowSetWarning()
javax.sql.rowset.RowSetWarning(java.lang.String)
javax.sql.rowset.RowSetWarning(java.lang.String, java.lang.String)
javax.sql.rowset.RowSetWarning(java.lang.String, java.lang.String, int)


Occurences of rowsInserted

rowsInserted occurences:
javax.swing.DefaultRowSorter.rowsInserted(int, int)
javax.swing.RowSorter.rowsInserted(int, int)


Occurences of RowSorterEvent (constructors)

RowSorterEvent (constructors) occurences:
javax.swing.event.RowSorterEvent(javax.swing.RowSorter)
javax.swing.event.RowSorterEvent(javax.swing.RowSorter, javax.swing.event.RowSorterEvent.Type, int:A)


Occurences of rowsUpdated

rowsUpdated occurences:
javax.swing.DefaultRowSorter.rowsUpdated(int, int)
javax.swing.DefaultRowSorter.rowsUpdated(int, int, int)
javax.swing.RowSorter.rowsUpdated(int, int)
javax.swing.RowSorter.rowsUpdated(int, int, int)


Occurences of ROW_HEADER

ROW_HEADER occurences:
javax.accessibility.ROW_HEADER
javax.swing.ROW_HEADER


Occurences of run

run occurences:
java.awt.image.renderable.RenderableImageProducer.run()
java.lang.Runnable.run()
java.lang.Thread.run()
java.security.PrivilegedAction.run()
java.security.PrivilegedExceptionAction.run()
java.util.concurrent.ForkJoinWorkerThread.run()
java.util.concurrent.FutureTask.run()
java.util.concurrent.RunnableFuture.run()
java.util.TimerTask.run()
javax.swing.SwingWorker.run()
javax.swing.text.AsyncBoxView.ChildState.run()
javax.tools.Tool.run(java.io.InputStream, java.io.OutputStream, java.io.OutputStream, java.lang.String...)
org.omg.CORBA.ORB.run()


Occurences of runAfterBoth

runAfterBoth occurences:
java.util.concurrent.CompletableFuture.runAfterBoth(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletionStage.runAfterBoth(java.util.concurrent.CompletionStage, java.lang.Runnable)


Occurences of runAfterBothAsync

runAfterBothAsync occurences:
java.util.concurrent.CompletableFuture.runAfterBothAsync(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletableFuture.runAfterBothAsync(java.util.concurrent.CompletionStage, java.lang.Runnable, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.runAfterBothAsync(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletionStage.runAfterBothAsync(java.util.concurrent.CompletionStage, java.lang.Runnable, java.util.concurrent.Executor)


Occurences of runAfterEither

runAfterEither occurences:
java.util.concurrent.CompletableFuture.runAfterEither(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletionStage.runAfterEither(java.util.concurrent.CompletionStage, java.lang.Runnable)


Occurences of runAfterEitherAsync

runAfterEitherAsync occurences:
java.util.concurrent.CompletableFuture.runAfterEitherAsync(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletableFuture.runAfterEitherAsync(java.util.concurrent.CompletionStage, java.lang.Runnable, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.runAfterEitherAsync(java.util.concurrent.CompletionStage, java.lang.Runnable)
java.util.concurrent.CompletionStage.runAfterEitherAsync(java.util.concurrent.CompletionStage, java.lang.Runnable, java.util.concurrent.Executor)


Occurences of runAsync

runAsync occurences:
java.util.concurrent.CompletableFuture.runAsync(java.lang.Runnable)
java.util.concurrent.CompletableFuture.runAsync(java.lang.Runnable, java.util.concurrent.Executor)


Occurences of runFinalization

runFinalization occurences:
java.lang.Runtime.runFinalization()
java.lang.System.runFinalization()


Occurences of runFinalizersOnExit

runFinalizersOnExit occurences:
java.lang.Runtime.runFinalizersOnExit(boolean)
java.lang.System.runFinalizersOnExit(boolean)


Occurences of RUNIC

RUNIC occurences:
java.lang.RUNIC
java.lang.RUNIC


Occurences of RuntimeErrorException (constructors)

RuntimeErrorException (constructors) occurences:
javax.management.RuntimeErrorException(java.lang.Error)
javax.management.RuntimeErrorException(java.lang.Error, java.lang.String)


Occurences of RuntimeException (constructors)

RuntimeException (constructors) occurences:
java.lang.RuntimeException()
java.lang.RuntimeException(java.lang.String)
java.lang.RuntimeException(java.lang.String, java.lang.Throwable)
java.lang.RuntimeException(java.lang.String, java.lang.Throwable, boolean, boolean)
java.lang.RuntimeException(java.lang.Throwable)


Occurences of RuntimeMBeanException (constructors)

RuntimeMBeanException (constructors) occurences:
javax.management.RuntimeMBeanException(java.lang.RuntimeException)
javax.management.RuntimeMBeanException(java.lang.RuntimeException, java.lang.String)


Occurences of RuntimeOperationsException (constructors)

RuntimeOperationsException (constructors) occurences:
javax.management.RuntimeOperationsException(java.lang.RuntimeException)
javax.management.RuntimeOperationsException(java.lang.RuntimeException, java.lang.String)


Occurences of RuntimePermission (constructors)

RuntimePermission (constructors) occurences:
java.lang.RuntimePermission(java.lang.String)
java.lang.RuntimePermission(java.lang.String, java.lang.String)


Occurences of SAAJResult (constructors)

SAAJResult (constructors) occurences:
javax.xml.soap.SAAJResult()
javax.xml.soap.SAAJResult(java.lang.String)
javax.xml.soap.SAAJResult(javax.xml.soap.SOAPElement)
javax.xml.soap.SAAJResult(javax.xml.soap.SOAPMessage)


Occurences of SAMARITAN

SAMARITAN occurences:
java.lang.SAMARITAN
java.lang.SAMARITAN


Occurences of sameFile

sameFile occurences:
java.net.URL.sameFile(java.net.URL)
java.net.URLStreamHandler.sameFile(java.net.URL, java.net.URL)


Occurences of sample

sample occurences:
java.util.sample
java.util.sample


Occurences of sampleModel

sampleModel occurences:
java.awt.image.sampleModel
javax.imageio.sampleModel


Occurences of sasl

sasl occurences:
compact3.javax.security.sasl
javax.security.sasl


Occurences of SaslException (constructors)

SaslException (constructors) occurences:
javax.security.sasl.SaslException()
javax.security.sasl.SaslException(java.lang.String)
javax.security.sasl.SaslException(java.lang.String, java.lang.Throwable)


Occurences of SATURDAY

SATURDAY occurences:
java.time.SATURDAY
java.util.SATURDAY


Occurences of SAURASHTRA

SAURASHTRA occurences:
java.awt.font.SAURASHTRA
java.lang.SAURASHTRA
java.lang.SAURASHTRA


Occurences of save

save occurences:
java.awt.AWTEventMulticaster.save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener)
java.util.Properties.save(java.io.OutputStream, java.lang.String)


Occurences of sax

sax occurences:
compact2.javax.xml.transform.sax
compact2.org.xml.sax
compact3.javax.xml.transform.sax
compact3.org.xml.sax
javax.xml.transform.sax
org.xml.sax


Occurences of SAXException (constructors)

SAXException (constructors) occurences:
org.xml.sax.SAXException()
org.xml.sax.SAXException(java.lang.Exception)
org.xml.sax.SAXException(java.lang.String)
org.xml.sax.SAXException(java.lang.String, java.lang.Exception)


Occurences of SAXNotRecognizedException (constructors)

SAXNotRecognizedException (constructors) occurences:
org.xml.sax.SAXNotRecognizedException()
org.xml.sax.SAXNotRecognizedException(java.lang.String)


Occurences of SAXNotSupportedException (constructors)

SAXNotSupportedException (constructors) occurences:
org.xml.sax.SAXNotSupportedException()
org.xml.sax.SAXNotSupportedException(java.lang.String)


Occurences of SAXParseException (constructors)

SAXParseException (constructors) occurences:
org.xml.sax.SAXParseException(java.lang.String, java.lang.String, java.lang.String, int, int)
org.xml.sax.SAXParseException(java.lang.String, java.lang.String, java.lang.String, int, int, java.lang.Exception)
org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator)
org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator, java.lang.Exception)


Occurences of saxParserPlugable

saxParserPlugable occurences:
javax.xml.bind.helpers.saxParserPlugable
javax.xml.bind.saxParserPlugable


Occurences of SAXResult (constructors)

SAXResult (constructors) occurences:
javax.xml.transform.sax.SAXResult()
javax.xml.transform.sax.SAXResult(org.xml.sax.ContentHandler)


Occurences of SAXSource (constructors)

SAXSource (constructors) occurences:
javax.xml.transform.sax.SAXSource()
javax.xml.transform.sax.SAXSource(org.xml.sax.InputSource)
javax.xml.transform.sax.SAXSource(org.xml.sax.XMLReader, org.xml.sax.InputSource)


Occurences of scalb

scalb occurences:
java.lang.Math.scalb(double, int)
java.lang.Math.scalb(float, int)
java.lang.StrictMath.scalb(double, int)
java.lang.StrictMath.scalb(float, int)


Occurences of scale

scale occurences:
java.awt.geom.AffineTransform.scale(double, double)
java.awt.Graphics2D.scale(double, double)
java.math.BigDecimal.scale()
javax.swing.Spring.scale(javax.swing.Spring, float)


Occurences of scan

scan occurences:
com.sun.source.util.DocTreePathScanner.scan(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.DocTreePathScanner.scan(com.sun.source.doctree.DocTree, P)
com.sun.source.util.DocTreePathScanner.scan(com.sun.source.util.DocTreePath, java.lang.Object)
com.sun.source.util.DocTreePathScanner.scan(com.sun.source.util.DocTreePath, P)
com.sun.source.util.DocTreeScanner.scan(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.scan(com.sun.source.doctree.DocTree, P)
com.sun.source.util.DocTreeScanner.scan(java.lang.Iterable, java.lang.Object)
com.sun.source.util.DocTreeScanner.scan(java.lang.Iterable, P)
com.sun.source.util.TreePathScanner.scan(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.TreePathScanner.scan(com.sun.source.tree.Tree, P)
com.sun.source.util.TreePathScanner.scan(com.sun.source.util.TreePath, java.lang.Object)
com.sun.source.util.TreePathScanner.scan(com.sun.source.util.TreePath, P)
com.sun.source.util.TreeScanner.scan(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.TreeScanner.scan(com.sun.source.tree.Tree, P)
com.sun.source.util.TreeScanner.scan(java.lang.Iterable, java.lang.Object)
com.sun.source.util.TreeScanner.scan(java.lang.Iterable, P)
javax.lang.model.util.ElementScanner6.scan(java.lang.Iterable, java.lang.Object)
javax.lang.model.util.ElementScanner6.scan(java.lang.Iterable, P)
javax.lang.model.util.ElementScanner6.scan(javax.lang.model.element.Element)
javax.lang.model.util.ElementScanner6.scan(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.util.ElementScanner6.scan(javax.lang.model.element.Element, P)


Occurences of Scanner (constructors)

Scanner (constructors) occurences:
java.util.Scanner(java.io.File)
java.util.Scanner(java.io.File, java.lang.String)
java.util.Scanner(java.io.InputStream)
java.util.Scanner(java.io.InputStream, java.lang.String)
java.util.Scanner(java.lang.Readable)
java.util.Scanner(java.lang.String)
java.util.Scanner(java.nio.channels.ReadableByteChannel)
java.util.Scanner(java.nio.channels.ReadableByteChannel, java.lang.String)
java.util.Scanner(java.nio.file.Path)
java.util.Scanner(java.nio.file.Path, java.lang.String)


Occurences of schedule

schedule occurences:
java.util.concurrent.ScheduledExecutorService.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ScheduledExecutorService.schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)
java.util.Timer.schedule(java.util.TimerTask, java.util.Date)
java.util.Timer.schedule(java.util.TimerTask, java.util.Date, long)
java.util.Timer.schedule(java.util.TimerTask, long)
java.util.Timer.schedule(java.util.TimerTask, long, long)


Occurences of scheduleAtFixedRate

scheduleAtFixedRate occurences:
java.util.concurrent.ScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
java.util.Timer.scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long)
java.util.Timer.scheduleAtFixedRate(java.util.TimerTask, long, long)


Occurences of ScheduledThreadPoolExecutor (constructors)

ScheduledThreadPoolExecutor (constructors) occurences:
java.util.concurrent.ScheduledThreadPoolExecutor(int)
java.util.concurrent.ScheduledThreadPoolExecutor(int, java.util.concurrent.RejectedExecutionHandler)
java.util.concurrent.ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory)
java.util.concurrent.ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)


Occurences of scheduleWithFixedDelay

scheduleWithFixedDelay occurences:
java.util.concurrent.ScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)


Occurences of SchemaFactoryConfigurationError (constructors)

SchemaFactoryConfigurationError (constructors) occurences:
javax.xml.validation.SchemaFactoryConfigurationError()
javax.xml.validation.SchemaFactoryConfigurationError(java.lang.String)
javax.xml.validation.SchemaFactoryConfigurationError(java.lang.String, java.lang.Throwable)
javax.xml.validation.SchemaFactoryConfigurationError(java.lang.Throwable)


Occurences of schemagen

schemagen occurences:
schemagen
schemagen


Occurences of SchemaViolationException (constructors)

SchemaViolationException (constructors) occurences:
javax.naming.directory.SchemaViolationException()
javax.naming.directory.SchemaViolationException(java.lang.String)


Occurences of scope

scope occurences:
javax.xml.bind.annotation.XmlElementDecl.scope()
javax.xml.bind.scope


Occurences of script

script occurences:
compact1.javax.script
compact2.javax.script
compact3.javax.script
javax.script


Occurences of ScriptEngineManager (constructors)

ScriptEngineManager (constructors) occurences:
javax.script.ScriptEngineManager()
javax.script.ScriptEngineManager(java.lang.ClassLoader)


Occurences of ScriptException (constructors)

ScriptException (constructors) occurences:
javax.script.ScriptException(java.lang.Exception)
javax.script.ScriptException(java.lang.String)
javax.script.ScriptException(java.lang.String, java.lang.String, int)
javax.script.ScriptException(java.lang.String, java.lang.String, int, int)


Occurences of Scripting

Scripting occurences:
Scripting
Scripting


Occurences of scrollbar

scrollbar occurences:
java.awt.scrollbar
javax.swing.plaf.basic.scrollbar


Occurences of Scrollbar (constructors)

Scrollbar (constructors) occurences:
java.awt.Scrollbar()
java.awt.Scrollbar(int)
java.awt.Scrollbar(int, int, int, int, int)


Occurences of scrollBarWidth

scrollBarWidth occurences:
javax.swing.plaf.basic.scrollBarWidth
javax.swing.plaf.metal.scrollBarWidth


Occurences of scrollByBlock

scrollByBlock occurences:
javax.swing.plaf.basic.BasicScrollBarUI.scrollByBlock(int)
javax.swing.plaf.basic.BasicSliderUI.scrollByBlock(int)


Occurences of scrollByUnit

scrollByUnit occurences:
javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnit(int)
javax.swing.plaf.basic.BasicSliderUI.scrollByUnit(int)


Occurences of scrollDueToClickInTrack

scrollDueToClickInTrack occurences:
javax.swing.plaf.basic.BasicSliderUI.scrollDueToClickInTrack(int)
javax.swing.plaf.metal.MetalSliderUI.scrollDueToClickInTrack(int)


Occurences of scrollListener

scrollListener occurences:
javax.swing.plaf.basic.scrollListener
javax.swing.plaf.basic.scrollListener


Occurences of ScrollListener

ScrollListener occurences:
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.ScrollListener()
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.ScrollListener(int, boolean)
javax.swing.plaf.basic.BasicSliderUI.ScrollListener.ScrollListener()
javax.swing.plaf.basic.BasicSliderUI.ScrollListener.ScrollListener(int, boolean)


Occurences of ScrollPane (constructors)

ScrollPane (constructors) occurences:
java.awt.ScrollPane()
java.awt.ScrollPane(int)


Occurences of scrollRectToVisible

scrollRectToVisible occurences:
javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle)
javax.swing.JTextField.scrollRectToVisible(java.awt.Rectangle)
javax.swing.JViewport.scrollRectToVisible(java.awt.Rectangle)


Occurences of scrollTimer

scrollTimer occurences:
javax.swing.plaf.basic.scrollTimer
javax.swing.plaf.basic.scrollTimer


Occurences of SCROLL_BAR

SCROLL_BAR occurences:
javax.accessibility.SCROLL_BAR
javax.swing.plaf.synth.SCROLL_BAR


Occurences of SCROLL_PANE

SCROLL_PANE occurences:
javax.accessibility.SCROLL_PANE
javax.swing.plaf.synth.SCROLL_PANE


Occurences of SealedObject (constructors)

SealedObject (constructors) occurences:
javax.crypto.SealedObject(java.io.Serializable, javax.crypto.Cipher)
javax.crypto.SealedObject(javax.crypto.SealedObject)


Occurences of search

search occurences:
java.util.concurrent.ConcurrentHashMap.search(long, java.util.function.BiFunction)
java.util.Stack.search(java.lang.Object)
javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls)
javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls)
javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String:A)
javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls)
javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls)
javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes)
javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String:A)
javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls)
javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls)
javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String:A)
javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, java.lang.Object:A, javax.naming.directory.SearchControls)
javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls)
javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes)
javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String:A)


Occurences of SearchControls (constructors)

SearchControls (constructors) occurences:
javax.naming.directory.SearchControls()
javax.naming.directory.SearchControls(int, long, int, java.lang.String:A, boolean, boolean)


Occurences of SearchResult (constructors)

SearchResult (constructors) occurences:
javax.naming.directory.SearchResult(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.SearchResult(java.lang.String, java.lang.Object, javax.naming.directory.Attributes, boolean)
javax.naming.directory.SearchResult(java.lang.String, java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
javax.naming.directory.SearchResult(java.lang.String, java.lang.String, java.lang.Object, javax.naming.directory.Attributes, boolean)


Occurences of SECOND

SECOND occurences:
java.text.SECOND
java.util.SECOND


Occurences of SECONDS

SECONDS occurences:
java.time.temporal.SECONDS
java.util.concurrent.SECONDS
javax.xml.datatype.SECONDS


Occurences of SecretKeyEntry

SecretKeyEntry occurences:
java.security.KeyStore.SecretKeyEntry.SecretKeyEntry(javax.crypto.SecretKey)
java.security.KeyStore.SecretKeyEntry.SecretKeyEntry(javax.crypto.SecretKey, java.util.Set)


Occurences of SecretKeySpec (constructors)

SecretKeySpec (constructors) occurences:
javax.crypto.spec.SecretKeySpec(byte:A, int, int, java.lang.String)
javax.crypto.spec.SecretKeySpec(byte:A, java.lang.String)


Occurences of SecureClassLoader (constructors)

SecureClassLoader (constructors) occurences:
java.security.SecureClassLoader()
java.security.SecureClassLoader(java.lang.ClassLoader)


Occurences of SecureRandom (constructors)

SecureRandom (constructors) occurences:
java.security.SecureRandom()
java.security.SecureRandom(byte:A)
java.security.SecureRandom(java.security.SecureRandomSpi, java.security.Provider)


Occurences of security

security occurences:
compact1.java.security
compact2.java.security
compact3.java.security
java.security


Occurences of Security

Security occurences:
java.security.Security
Security
Security
Security
Security


Occurences of SecurityException (constructors)

SecurityException (constructors) occurences:
java.lang.SecurityException()
java.lang.SecurityException(java.lang.String)
java.lang.SecurityException(java.lang.String, java.lang.Throwable)
java.lang.SecurityException(java.lang.Throwable)


Occurences of SecurityPermission (constructors)

SecurityPermission (constructors) occurences:
java.security.SecurityPermission(java.lang.String)
java.security.SecurityPermission(java.lang.String, java.lang.String)


Occurences of seek

seek occurences:
java.io.RandomAccessFile.seek(long)
javax.imageio.stream.FileCacheImageOutputStream.seek(long)
javax.imageio.stream.FileImageInputStream.seek(long)
javax.imageio.stream.FileImageOutputStream.seek(long)
javax.imageio.stream.ImageInputStream.seek(long)
javax.imageio.stream.ImageInputStreamImpl.seek(long)
org.omg.CORBA.DynAny.seek(int)
org.omg.DynamicAny.DynAnyOperations.seek(int)
org.omg.DynamicAny._DynAnyStub.seek(int)
org.omg.DynamicAny._DynArrayStub.seek(int)
org.omg.DynamicAny._DynEnumStub.seek(int)
org.omg.DynamicAny._DynFixedStub.seek(int)
org.omg.DynamicAny._DynSequenceStub.seek(int)
org.omg.DynamicAny._DynStructStub.seek(int)
org.omg.DynamicAny._DynUnionStub.seek(int)
org.omg.DynamicAny._DynValueStub.seek(int)


Occurences of Segment (constructors)

Segment (constructors) occurences:
javax.swing.text.Segment()
javax.swing.text.Segment(char:A, int, int)


Occurences of select

select occurences:
java.awt.Choice.select(int)
java.awt.Choice.select(java.lang.String)
java.awt.List.select(int)
java.awt.TextComponent.select(int, int)
java.net.ProxySelector.select(java.net.URI)
java.nio.channels.Selector.select()
java.nio.channels.Selector.select(long)
javax.swing.text.JTextComponent.select(int, int)
javax.xml.crypto.KeySelector.select(javax.xml.crypto.dsig.keyinfo.KeyInfo, javax.xml.crypto.KeySelector.Purpose, javax.xml.crypto.AlgorithmMethod, javax.xml.crypto.XMLCryptoContext)


Occurences of selectAll

selectAll occurences:
java.awt.TextComponent.selectAll()
javax.swing.ComboBoxEditor.selectAll()
javax.swing.JTable.selectAll()
javax.swing.plaf.basic.BasicComboBoxEditor.selectAll()
javax.swing.text.JTextComponent.selectAll()


Occurences of selectAllAccessibleSelection

selectAllAccessibleSelection occurences:
java.awt.List.AccessibleAWTList.selectAllAccessibleSelection()
java.awt.MenuComponent.AccessibleAWTMenuComponent.selectAllAccessibleSelection()
javax.accessibility.AccessibleSelection.selectAllAccessibleSelection()
javax.swing.JComboBox.AccessibleJComboBox.selectAllAccessibleSelection()
javax.swing.JList.AccessibleJList.selectAllAccessibleSelection()
javax.swing.JMenu.AccessibleJMenu.selectAllAccessibleSelection()
javax.swing.JMenuBar.AccessibleJMenuBar.selectAllAccessibleSelection()
javax.swing.JTabbedPane.AccessibleJTabbedPane.selectAllAccessibleSelection()
javax.swing.JTable.AccessibleJTable.selectAllAccessibleSelection()
javax.swing.JTree.AccessibleJTree.selectAllAccessibleSelection()
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.selectAllAccessibleSelection()


Occurences of selectColor

selectColor occurences:
javax.swing.plaf.metal.selectColor
javax.swing.plaf.metal.selectColor
javax.swing.plaf.metal.selectColor
javax.swing.plaf.metal.selectColor


Occurences of SELECTED

SELECTED occurences:
java.awt.event.SELECTED
javax.accessibility.SELECTED
javax.swing.plaf.synth.SELECTED
javax.swing.SELECTED
javax.swing.text.html.SELECTED


Occurences of selectInitialValue

selectInitialValue occurences:
javax.swing.JOptionPane.selectInitialValue()
javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(javax.swing.JOptionPane)
javax.swing.plaf.multi.MultiOptionPaneUI.selectInitialValue(javax.swing.JOptionPane)
javax.swing.plaf.OptionPaneUI.selectInitialValue(javax.swing.JOptionPane)


Occurences of selectionBackground

selectionBackground occurences:
javax.swing.plaf.basic.selectionBackground
javax.swing.selectionBackground


Occurences of selectionForeground

selectionForeground occurences:
javax.swing.plaf.basic.selectionForeground
javax.swing.selectionForeground


Occurences of selectionModel

selectionModel occurences:
javax.swing.selectionModel
javax.swing.selectionModel
javax.swing.table.selectionModel


Occurences of SELECTION_MODEL_PROPERTY

SELECTION_MODEL_PROPERTY occurences:
javax.swing.SELECTION_MODEL_PROPERTY
javax.swing.SELECTION_MODEL_PROPERTY


Occurences of selectText

selectText occurences:
javax.accessibility.AccessibleEditableText.selectText(int, int)
javax.swing.JSpinner.AccessibleJSpinner.selectText(int, int)
javax.swing.text.JTextComponent.AccessibleJTextComponent.selectText(int, int)


Occurences of Semaphore (constructors)

Semaphore (constructors) occurences:
java.util.concurrent.Semaphore(int)
java.util.concurrent.Semaphore(int, boolean)


Occurences of send

send occurences:
java.net.DatagramSocket.send(java.net.DatagramPacket)
java.net.DatagramSocketImpl.send(java.net.DatagramPacket)
java.net.MulticastSocket.send(java.net.DatagramPacket, byte)
java.nio.channels.DatagramChannel.send(java.nio.ByteBuffer, java.net.SocketAddress)
javax.sound.midi.Receiver.send(javax.sound.midi.MidiMessage, long)


Occurences of sendAttributeChangeNotification

sendAttributeChangeNotification occurences:
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.sendAttributeChangeNotification(javax.management.Attribute, javax.management.Attribute)
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.sendAttributeChangeNotification(javax.management.AttributeChangeNotification)
javax.management.modelmbean.RequiredModelMBean.sendAttributeChangeNotification(javax.management.Attribute, javax.management.Attribute)
javax.management.modelmbean.RequiredModelMBean.sendAttributeChangeNotification(javax.management.AttributeChangeNotification)


Occurences of sendNotification

sendNotification occurences:
javax.management.MBeanServerDelegate.sendNotification(javax.management.Notification)
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.sendNotification(java.lang.String)
javax.management.modelmbean.ModelMBeanNotificationBroadcaster.sendNotification(javax.management.Notification)
javax.management.modelmbean.RequiredModelMBean.sendNotification(java.lang.String)
javax.management.modelmbean.RequiredModelMBean.sendNotification(javax.management.Notification)
javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification)
javax.management.StandardEmitterMBean.sendNotification(javax.management.Notification)


Occurences of sendRelationCreationNotification

sendRelationCreationNotification occurences:
javax.management.relation.RelationService.sendRelationCreationNotification(java.lang.String)
javax.management.relation.RelationServiceMBean.sendRelationCreationNotification(java.lang.String)


Occurences of sendRelationRemovalNotification

sendRelationRemovalNotification occurences:
javax.management.relation.RelationService.sendRelationRemovalNotification(java.lang.String, java.util.List)
javax.management.relation.RelationServiceMBean.sendRelationRemovalNotification(java.lang.String, java.util.List)


Occurences of sendRoleUpdateNotification

sendRoleUpdateNotification occurences:
javax.management.relation.RelationService.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List)
javax.management.relation.RelationServiceMBean.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List)


Occurences of sendUrgentData

sendUrgentData occurences:
java.net.Socket.sendUrgentData(int)
java.net.SocketImpl.sendUrgentData(int)


Occurences of SEPARATE_DOCUMENTS_COLLATED_COPIES

SEPARATE_DOCUMENTS_COLLATED_COPIES occurences:
java.awt.SEPARATE_DOCUMENTS_COLLATED_COPIES
javax.print.attribute.standard.SEPARATE_DOCUMENTS_COLLATED_COPIES


Occurences of SEPARATE_DOCUMENTS_UNCOLLATED_COPIES

SEPARATE_DOCUMENTS_UNCOLLATED_COPIES occurences:
java.awt.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
javax.print.attribute.standard.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES


Occurences of Separator

Separator occurences:
javax.swing.JPopupMenu.Separator.Separator()
javax.swing.JToolBar.Separator.Separator()
javax.swing.JToolBar.Separator.Separator(java.awt.Dimension)


Occurences of SEPARATOR

SEPARATOR occurences:
javax.accessibility.SEPARATOR
javax.swing.plaf.synth.SEPARATOR


Occurences of SEPTEMBER

SEPTEMBER occurences:
java.time.SEPTEMBER
java.util.SEPTEMBER
javax.xml.datatype.SEPTEMBER


Occurences of Sequence (constructors)

Sequence (constructors) occurences:
javax.sound.midi.Sequence(float, int)
javax.sound.midi.Sequence(float, int, int)


Occurences of SequenceInputStream (constructors)

SequenceInputStream (constructors) occurences:
java.io.SequenceInputStream(java.io.InputStream, java.io.InputStream)
java.io.SequenceInputStream(java.util.Enumeration)


Occurences of sequential

sequential occurences:
java.util.stream.BaseStream.sequential()
java.util.stream.DoubleStream.sequential()
java.util.stream.IntStream.sequential()
java.util.stream.LongStream.sequential()


Occurences of serial

serial occurences:
compact3.javax.sql.rowset.serial
javax.sql.rowset.serial


Occurences of SerialArray (constructors)

SerialArray (constructors) occurences:
javax.sql.rowset.serial.SerialArray(java.sql.Array)
javax.sql.rowset.serial.SerialArray(java.sql.Array, java.util.Map)


Occurences of SerialBlob (constructors)

SerialBlob (constructors) occurences:
javax.sql.rowset.serial.SerialBlob(byte:A)
javax.sql.rowset.serial.SerialBlob(java.sql.Blob)


Occurences of SerialClob (constructors)

SerialClob (constructors) occurences:
javax.sql.rowset.serial.SerialClob(char:A)
javax.sql.rowset.serial.SerialClob(java.sql.Clob)


Occurences of SerialException (constructors)

SerialException (constructors) occurences:
javax.sql.rowset.serial.SerialException()
javax.sql.rowset.serial.SerialException(java.lang.String)


Occurences of SerializablePermission (constructors)

SerializablePermission (constructors) occurences:
java.io.SerializablePermission(java.lang.String)
java.io.SerializablePermission(java.lang.String, java.lang.String)


Occurences of Serialization, Evolution, and the Addition of a New SuperClass

Serialization, Evolution, and the Addition of a New SuperClass occurences:
Serialization, Evolution, and the Addition of a New SuperClass
Serialization, Evolution, and the Addition of a New SuperClass
Serialization, Evolution, and the Addition of a New SuperClass


Occurences of SerialStruct (constructors)

SerialStruct (constructors) occurences:
javax.sql.rowset.serial.SerialStruct(java.sql.SQLData, java.util.Map)
javax.sql.rowset.serial.SerialStruct(java.sql.Struct, java.util.Map)


Occurences of serialver

serialver occurences:
serialver
serialver


Occurences of serialVersionUID

serialVersionUID occurences:
java.rmi.server.serialVersionUID
java.rmi.server.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.interfaces.serialVersionUID
java.security.serialVersionUID
java.security.serialVersionUID
java.security.serialVersionUID
javax.crypto.interfaces.serialVersionUID
javax.crypto.interfaces.serialVersionUID
javax.crypto.interfaces.serialVersionUID
javax.crypto.serialVersionUID
javax.naming.directory.serialVersionUID
javax.naming.serialVersionUID


Occurences of ServantAlreadyActive (constructors)

ServantAlreadyActive (constructors) occurences:
org.omg.PortableServer.POAPackage.ServantAlreadyActive()
org.omg.PortableServer.POAPackage.ServantAlreadyActive(java.lang.String)


Occurences of ServantNotActive (constructors)

ServantNotActive (constructors) occurences:
org.omg.PortableServer.POAPackage.ServantNotActive()
org.omg.PortableServer.POAPackage.ServantNotActive(java.lang.String)


Occurences of server

server occurences:
compact2.java.rmi.server
compact3.java.rmi.server
java.rmi.server
javax.management.monitor.server


Occurences of ServerCloneException (constructors)

ServerCloneException (constructors) occurences:
java.rmi.server.ServerCloneException(java.lang.String)
java.rmi.server.ServerCloneException(java.lang.String, java.lang.Exception)


Occurences of ServerException (constructors)

ServerException (constructors) occurences:
java.rmi.ServerException(java.lang.String)
java.rmi.ServerException(java.lang.String, java.lang.Exception)


Occurences of ServerNotActiveException (constructors)

ServerNotActiveException (constructors) occurences:
java.rmi.server.ServerNotActiveException()
java.rmi.server.ServerNotActiveException(java.lang.String)


Occurences of ServerSocket (constructors)

ServerSocket (constructors) occurences:
java.net.ServerSocket()
java.net.ServerSocket(int)
java.net.ServerSocket(int, int)
java.net.ServerSocket(int, int, java.net.InetAddress)


Occurences of servertool

servertool occurences:
servertool
servertool


Occurences of server_id

server_id occurences:
org.omg.PortableInterceptor.ObjectReferenceTemplate.server_id()
org.omg.PortableInterceptor.ServerRequestInfoOperations.server_id()


Occurences of Service

Service occurences:
java.security.Provider.Service.Service(java.security.Provider, java.lang.String, java.lang.String, java.lang.String, java.util.List, java.util.Map)
javax.xml.ws.Service


Occurences of Service (constructors)

Service (constructors) occurences:
javax.xml.ws.Service(java.net.URL, javax.xml.namespace.QName)
javax.xml.ws.Service(java.net.URL, javax.xml.namespace.QName, javax.xml.ws.WebServiceFeature...)


Occurences of serviceAvailable

serviceAvailable occurences:
java.beans.beancontext.BeanContextChildSupport.serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
java.beans.beancontext.BeanContextServicesListener.serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
java.beans.beancontext.BeanContextServicesSupport.serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)


Occurences of serviceClass

serviceClass occurences:
java.beans.beancontext.serviceClass
java.beans.beancontext.serviceClass


Occurences of ServiceConfigurationError (constructors)

ServiceConfigurationError (constructors) occurences:
java.util.ServiceConfigurationError(java.lang.String)
java.util.ServiceConfigurationError(java.lang.String, java.lang.Throwable)


Occurences of ServiceContext (constructors)

ServiceContext (constructors) occurences:
org.omg.IOP.ServiceContext()
org.omg.IOP.ServiceContext(int, byte:A)


Occurences of ServiceContextHolder (constructors)

ServiceContextHolder (constructors) occurences:
org.omg.IOP.ServiceContextHolder()
org.omg.IOP.ServiceContextHolder(org.omg.IOP.ServiceContext)


Occurences of ServiceContextListHolder (constructors)

ServiceContextListHolder (constructors) occurences:
org.omg.IOP.ServiceContextListHolder()
org.omg.IOP.ServiceContextListHolder(org.omg.IOP.ServiceContext:A)


Occurences of ServiceDetail (constructors)

ServiceDetail (constructors) occurences:
org.omg.CORBA.ServiceDetail()
org.omg.CORBA.ServiceDetail(int, byte:A)


Occurences of ServiceInformation (constructors)

ServiceInformation (constructors) occurences:
org.omg.CORBA.ServiceInformation()
org.omg.CORBA.ServiceInformation(int:A, org.omg.CORBA.ServiceDetail:A)


Occurences of ServiceInformationHolder (constructors)

ServiceInformationHolder (constructors) occurences:
org.omg.CORBA.ServiceInformationHolder()
org.omg.CORBA.ServiceInformationHolder(org.omg.CORBA.ServiceInformation)


Occurences of serviceName

serviceName occurences:
javax.jws.WebService.serviceName()
javax.xml.ws.WebServiceProvider.serviceName()
javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.serviceName(javax.xml.namespace.QName)


Occurences of ServiceNotFoundException (constructors)

ServiceNotFoundException (constructors) occurences:
javax.management.ServiceNotFoundException()
javax.management.ServiceNotFoundException(java.lang.String)


Occurences of serviceRevoked

serviceRevoked occurences:
java.beans.beancontext.BeanContextChildSupport.serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
java.beans.beancontext.BeanContextServiceRevokedListener.serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
java.beans.beancontext.BeanContextServicesSupport.serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider.serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)


Occurences of ServiceUnavailableException (constructors)

ServiceUnavailableException (constructors) occurences:
javax.naming.ServiceUnavailableException()
javax.naming.ServiceUnavailableException(java.lang.String)


Occurences of set

set occurences:
java.awt.image.renderable.ParameterBlock.set(byte, int)
java.awt.image.renderable.ParameterBlock.set(char, int)
java.awt.image.renderable.ParameterBlock.set(double, int)
java.awt.image.renderable.ParameterBlock.set(float, int)
java.awt.image.renderable.ParameterBlock.set(int, int)
java.awt.image.renderable.ParameterBlock.set(java.lang.Object, int)
java.awt.image.renderable.ParameterBlock.set(long, int)
java.awt.image.renderable.ParameterBlock.set(short, int)
java.awt.Insets.set(int, int, int, int)
java.awt.JobAttributes.set(java.awt.JobAttributes)
java.awt.PageAttributes.set(java.awt.PageAttributes)
java.lang.reflect.Array.set(java.lang.Object, int, java.lang.Object)
java.lang.reflect.Field.set(java.lang.Object, java.lang.Object)
java.lang.ThreadLocal.set(java.lang.Object)
java.lang.ThreadLocal.set(T)
java.util.AbstractList.set(int, E)
java.util.AbstractList.set(int, java.lang.Object)
java.util.AbstractSequentialList.set(int, E)
java.util.AbstractSequentialList.set(int, java.lang.Object)
java.util.ArrayList.set(int, E)
java.util.ArrayList.set(int, java.lang.Object)
java.util.BitSet.set(int)
java.util.BitSet.set(int, boolean)
java.util.BitSet.set(int, int)
java.util.BitSet.set(int, int, boolean)
java.util.Calendar.set(int, int)
java.util.Calendar.set(int, int, int)
java.util.Calendar.set(int, int, int, int, int)
java.util.Calendar.set(int, int, int, int, int, int)
java.util.Calendar.Builder.set(int, int)
java.util.concurrent.atomic.AtomicBoolean.set(boolean)
java.util.concurrent.atomic.AtomicInteger.set(int)
java.util.concurrent.atomic.AtomicIntegerArray.set(int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.set(java.lang.Object, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.set(T, int)
java.util.concurrent.atomic.AtomicLong.set(long)
java.util.concurrent.atomic.AtomicLongArray.set(int, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.set(java.lang.Object, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.set(T, long)
java.util.concurrent.atomic.AtomicMarkableReference.set(java.lang.Object, boolean)
java.util.concurrent.atomic.AtomicMarkableReference.set(V, boolean)
java.util.concurrent.atomic.AtomicReference.set(java.lang.Object)
java.util.concurrent.atomic.AtomicReference.set(V)
java.util.concurrent.atomic.AtomicReferenceArray.set(int, E)
java.util.concurrent.atomic.AtomicReferenceArray.set(int, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.set(java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.set(T, V)
java.util.concurrent.atomic.AtomicStampedReference.set(java.lang.Object, int)
java.util.concurrent.atomic.AtomicStampedReference.set(V, int)
java.util.concurrent.CopyOnWriteArrayList.set(int, E)
java.util.concurrent.CopyOnWriteArrayList.set(int, java.lang.Object)
java.util.concurrent.FutureTask.set(java.lang.Object)
java.util.concurrent.FutureTask.set(V)
java.util.LinkedList.set(int, E)
java.util.LinkedList.set(int, java.lang.Object)
java.util.List.set(int, E)
java.util.List.set(int, java.lang.Object)
java.util.ListIterator.set(E)
java.util.ListIterator.set(java.lang.Object)
java.util.Vector.set(int, E)
java.util.Vector.set(int, java.lang.Object)
javax.activation.MimeTypeParameterList.set(java.lang.String, java.lang.String)
javax.management.AttributeList.set(int, java.lang.Object)
javax.management.AttributeList.set(int, javax.management.Attribute)
javax.management.relation.RoleList.set(int, java.lang.Object)
javax.management.relation.RoleList.set(int, javax.management.relation.Role)
javax.management.relation.RoleUnresolvedList.set(int, java.lang.Object)
javax.management.relation.RoleUnresolvedList.set(int, javax.management.relation.RoleUnresolved)
javax.naming.directory.Attribute.set(int, java.lang.Object)
javax.naming.directory.BasicAttribute.set(int, java.lang.Object)
javax.swing.DefaultListModel.set(int, E)
javax.swing.DefaultListModel.set(int, java.lang.Object)


Occurences of setAccelerator

setAccelerator occurences:
javax.swing.JMenu.setAccelerator(javax.swing.KeyStroke)
javax.swing.JMenuItem.setAccelerator(javax.swing.KeyStroke)


Occurences of setAccessible

setAccessible occurences:
java.lang.reflect.AccessibleObject.setAccessible(boolean)
java.lang.reflect.AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject:A, boolean)


Occurences of setAccessibleCaption

setAccessibleCaption occurences:
javax.accessibility.AccessibleTable.setAccessibleCaption(javax.accessibility.Accessible)
javax.swing.JTable.AccessibleJTable.setAccessibleCaption(javax.accessibility.Accessible)


Occurences of setAccessibleColumnDescription

setAccessibleColumnDescription occurences:
javax.accessibility.AccessibleTable.setAccessibleColumnDescription(int, javax.accessibility.Accessible)
javax.swing.JTable.AccessibleJTable.setAccessibleColumnDescription(int, javax.accessibility.Accessible)


Occurences of setAccessibleColumnHeader

setAccessibleColumnHeader occurences:
javax.accessibility.AccessibleTable.setAccessibleColumnHeader(javax.accessibility.AccessibleTable)
javax.swing.JTable.AccessibleJTable.setAccessibleColumnHeader(javax.accessibility.AccessibleTable)


Occurences of setAccessibleDescription

setAccessibleDescription occurences:
javax.accessibility.AccessibleContext.setAccessibleDescription(java.lang.String)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setAccessibleDescription(java.lang.String)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setAccessibleDescription(java.lang.String)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setAccessibleDescription(java.lang.String)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setAccessibleDescription(java.lang.String)


Occurences of setAccessibleIconDescription

setAccessibleIconDescription occurences:
javax.accessibility.AccessibleIcon.setAccessibleIconDescription(java.lang.String)
javax.swing.ImageIcon.AccessibleImageIcon.setAccessibleIconDescription(java.lang.String)


Occurences of setAccessibleName

setAccessibleName occurences:
javax.accessibility.AccessibleContext.setAccessibleName(java.lang.String)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setAccessibleName(java.lang.String)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setAccessibleName(java.lang.String)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setAccessibleName(java.lang.String)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setAccessibleName(java.lang.String)


Occurences of setAccessibleRowDescription

setAccessibleRowDescription occurences:
javax.accessibility.AccessibleTable.setAccessibleRowDescription(int, javax.accessibility.Accessible)
javax.swing.JTable.AccessibleJTable.setAccessibleRowDescription(int, javax.accessibility.Accessible)


Occurences of setAccessibleRowHeader

setAccessibleRowHeader occurences:
javax.accessibility.AccessibleTable.setAccessibleRowHeader(javax.accessibility.AccessibleTable)
javax.swing.JTable.AccessibleJTable.setAccessibleRowHeader(javax.accessibility.AccessibleTable)


Occurences of setAccessibleSummary

setAccessibleSummary occurences:
javax.accessibility.AccessibleTable.setAccessibleSummary(javax.accessibility.Accessible)
javax.swing.JTable.AccessibleJTable.setAccessibleSummary(javax.accessibility.Accessible)


Occurences of setAction

setAction occurences:
javax.swing.AbstractButton.setAction(javax.swing.Action)
javax.swing.JComboBox.setAction(javax.swing.Action)
javax.swing.JTextField.setAction(javax.swing.Action)


Occurences of setActionCommand

setActionCommand occurences:
java.awt.Button.setActionCommand(java.lang.String)
java.awt.MenuItem.setActionCommand(java.lang.String)
java.awt.TrayIcon.setActionCommand(java.lang.String)
javax.swing.AbstractButton.setActionCommand(java.lang.String)
javax.swing.ButtonModel.setActionCommand(java.lang.String)
javax.swing.DefaultButtonModel.setActionCommand(java.lang.String)
javax.swing.JComboBox.setActionCommand(java.lang.String)
javax.swing.JTextField.setActionCommand(java.lang.String)
javax.swing.Timer.setActionCommand(java.lang.String)


Occurences of setAdapter

setAdapter occurences:
javax.xml.bind.helpers.AbstractMarshallerImpl.setAdapter(java.lang.Class, A)
javax.xml.bind.helpers.AbstractMarshallerImpl.setAdapter(java.lang.Class, javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.helpers.AbstractMarshallerImpl.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setAdapter(java.lang.Class, A)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setAdapter(java.lang.Class, javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.Marshaller.setAdapter(java.lang.Class, A)
javax.xml.bind.Marshaller.setAdapter(java.lang.Class, javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.Marshaller.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.Unmarshaller.setAdapter(java.lang.Class, A)
javax.xml.bind.Unmarshaller.setAdapter(java.lang.Class, javax.xml.bind.annotation.adapters.XmlAdapter)
javax.xml.bind.Unmarshaller.setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)


Occurences of setAlignment

setAlignment occurences:
java.awt.FlowLayout.setAlignment(int)
java.awt.Label.setAlignment(int)
javax.swing.text.StyleConstants.setAlignment(javax.swing.text.MutableAttributeSet, int)


Occurences of setAll

setAll occurences:
java.util.Arrays.setAll(double:A, java.util.function.IntToDoubleFunction)
java.util.Arrays.setAll(int:A, java.util.function.IntUnaryOperator)
java.util.Arrays.setAll(java.lang.Object:A, java.util.function.IntFunction)
java.util.Arrays.setAll(long:A, java.util.function.IntToLongFunction)
java.util.Arrays.setAll(T:A, java.util.function.IntFunction)


Occurences of setAnchorSelectionIndex

setAnchorSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.setAnchorSelectionIndex(int)
javax.swing.ListSelectionModel.setAnchorSelectionIndex(int)


Occurences of setAngleExtent

setAngleExtent occurences:
java.awt.geom.Arc2D.setAngleExtent(double)
java.awt.geom.Arc2D.Double.setAngleExtent(double)
java.awt.geom.Arc2D.Float.setAngleExtent(double)


Occurences of setAngles

setAngles occurences:
java.awt.geom.Arc2D.setAngles(double, double, double, double)
java.awt.geom.Arc2D.setAngles(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of setAngleStart

setAngleStart occurences:
java.awt.geom.Arc2D.setAngleStart(double)
java.awt.geom.Arc2D.setAngleStart(java.awt.geom.Point2D)
java.awt.geom.Arc2D.Double.setAngleStart(double)
java.awt.geom.Arc2D.Float.setAngleStart(double)


Occurences of setAnimationIndex

setAnimationIndex occurences:
javax.swing.plaf.basic.BasicProgressBarUI.setAnimationIndex(int)
javax.swing.plaf.synth.SynthProgressBarUI.setAnimationIndex(int)


Occurences of setApproveButtonMnemonic

setApproveButtonMnemonic occurences:
javax.swing.JFileChooser.setApproveButtonMnemonic(char)
javax.swing.JFileChooser.setApproveButtonMnemonic(int)


Occurences of setArc

setArc occurences:
java.awt.geom.Arc2D.setArc(double, double, double, double, double, double, int)
java.awt.geom.Arc2D.setArc(java.awt.geom.Arc2D)
java.awt.geom.Arc2D.setArc(java.awt.geom.Point2D, java.awt.geom.Dimension2D, double, double, int)
java.awt.geom.Arc2D.setArc(java.awt.geom.Rectangle2D, double, double, int)
java.awt.geom.Arc2D.Double.setArc(double, double, double, double, double, double, int)
java.awt.geom.Arc2D.Float.setArc(double, double, double, double, double, double, int)


Occurences of setArmed

setArmed occurences:
javax.swing.ButtonModel.setArmed(boolean)
javax.swing.DefaultButtonModel.setArmed(boolean)
javax.swing.JMenuItem.setArmed(boolean)


Occurences of setArray

setArray occurences:
java.sql.PreparedStatement.setArray(int, java.sql.Array)
javax.sql.RowSet.setArray(int, java.sql.Array)
javax.sql.rowset.BaseRowSet.setArray(int, java.sql.Array)


Occurences of setAsciiStream

setAsciiStream occurences:
java.sql.CallableStatement.setAsciiStream(java.lang.String, java.io.InputStream)
java.sql.CallableStatement.setAsciiStream(java.lang.String, java.io.InputStream, int)
java.sql.CallableStatement.setAsciiStream(java.lang.String, java.io.InputStream, long)
java.sql.Clob.setAsciiStream(long)
java.sql.PreparedStatement.setAsciiStream(int, java.io.InputStream)
java.sql.PreparedStatement.setAsciiStream(int, java.io.InputStream, int)
java.sql.PreparedStatement.setAsciiStream(int, java.io.InputStream, long)
javax.sql.RowSet.setAsciiStream(int, java.io.InputStream)
javax.sql.RowSet.setAsciiStream(int, java.io.InputStream, int)
javax.sql.RowSet.setAsciiStream(java.lang.String, java.io.InputStream)
javax.sql.RowSet.setAsciiStream(java.lang.String, java.io.InputStream, int)
javax.sql.rowset.BaseRowSet.setAsciiStream(int, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setAsciiStream(int, java.io.InputStream, int)
javax.sql.rowset.BaseRowSet.setAsciiStream(java.lang.String, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setAsciiStream(java.lang.String, java.io.InputStream, int)
javax.sql.rowset.serial.SerialClob.setAsciiStream(long)


Occurences of setAsText

setAsText occurences:
java.beans.PropertyEditor.setAsText(java.lang.String)
java.beans.PropertyEditorSupport.setAsText(java.lang.String)


Occurences of setAttachmentMarshaller

setAttachmentMarshaller occurences:
javax.xml.bind.helpers.AbstractMarshallerImpl.setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller)
javax.xml.bind.Marshaller.setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller)


Occurences of setAttachmentUnmarshaller

setAttachmentUnmarshaller occurences:
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setAttachmentUnmarshaller(javax.xml.bind.attachment.AttachmentUnmarshaller)
javax.xml.bind.Unmarshaller.setAttachmentUnmarshaller(javax.xml.bind.attachment.AttachmentUnmarshaller)


Occurences of setAttribute

setAttribute occurences:
java.nio.file.Files.setAttribute(java.nio.file.Path, java.lang.String, java.lang.Object, java.nio.file.LinkOption...)
java.nio.file.spi.FileSystemProvider.setAttribute(java.nio.file.Path, java.lang.String, java.lang.Object, java.nio.file.LinkOption...)
javax.imageio.metadata.IIOMetadataNode.setAttribute(java.lang.String, java.lang.String)
javax.management.DynamicMBean.setAttribute(javax.management.Attribute)
javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute)
javax.management.MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute)
javax.management.modelmbean.RequiredModelMBean.setAttribute(javax.management.Attribute)
javax.management.remote.rmi.RMIConnection.setAttribute(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.setAttribute(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.setAttribute(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.StandardMBean.setAttribute(javax.management.Attribute)
javax.script.ScriptContext.setAttribute(java.lang.String, java.lang.Object, int)
javax.script.SimpleScriptContext.setAttribute(java.lang.String, java.lang.Object, int)
javax.xml.parsers.DocumentBuilderFactory.setAttribute(java.lang.String, java.lang.Object)
javax.xml.transform.TransformerFactory.setAttribute(java.lang.String, java.lang.Object)
org.w3c.dom.Element.setAttribute(java.lang.String, java.lang.String)
org.xml.sax.helpers.AttributesImpl.setAttribute(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of setAttributeNode

setAttributeNode occurences:
javax.imageio.metadata.IIOMetadataNode.setAttributeNode(org.w3c.dom.Attr)
org.w3c.dom.Element.setAttributeNode(org.w3c.dom.Attr)


Occurences of setAttributeNodeNS

setAttributeNodeNS occurences:
javax.imageio.metadata.IIOMetadataNode.setAttributeNodeNS(org.w3c.dom.Attr)
org.w3c.dom.Element.setAttributeNodeNS(org.w3c.dom.Attr)


Occurences of setAttributeNS

setAttributeNS occurences:
javax.imageio.metadata.IIOMetadataNode.setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
org.w3c.dom.Element.setAttributeNS(java.lang.String, java.lang.String, java.lang.String)


Occurences of setAttributes

setAttributes occurences:
javax.accessibility.AccessibleEditableText.setAttributes(int, int, javax.swing.text.AttributeSet)
javax.management.DynamicMBean.setAttributes(javax.management.AttributeList)
javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList)
javax.management.MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList)
javax.management.modelmbean.RequiredModelMBean.setAttributes(javax.management.AttributeList)
javax.management.remote.rmi.RMIConnection.setAttributes(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.setAttributes(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.setAttributes(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)
javax.management.StandardMBean.setAttributes(javax.management.AttributeList)
javax.naming.directory.SearchResult.setAttributes(javax.naming.directory.Attributes)
javax.swing.JSpinner.AccessibleJSpinner.setAttributes(int, int, javax.swing.text.AttributeSet)
javax.swing.text.JTextComponent.AccessibleJTextComponent.setAttributes(int, int, javax.swing.text.AttributeSet)
org.xml.sax.ext.Attributes2Impl.setAttributes(org.xml.sax.Attributes)
org.xml.sax.helpers.AttributesImpl.setAttributes(org.xml.sax.Attributes)


Occurences of setAutoCommit

setAutoCommit occurences:
java.sql.Connection.setAutoCommit(boolean)
javax.sql.rowset.JdbcRowSet.setAutoCommit(boolean)


Occurences of setAutoIncrement

setAutoIncrement occurences:
javax.sql.rowset.RowSetMetaDataImpl.setAutoIncrement(int, boolean)
javax.sql.RowSetMetaData.setAutoIncrement(int, boolean)


Occurences of setBackground

setBackground occurences:
java.awt.Component.setBackground(java.awt.Color)
java.awt.Component.AccessibleAWTComponent.setBackground(java.awt.Color)
java.awt.Dialog.setBackground(java.awt.Color)
java.awt.Frame.setBackground(java.awt.Color)
java.awt.Graphics2D.setBackground(java.awt.Color)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setBackground(java.awt.Color)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setBackground(java.awt.Color)
java.awt.TextComponent.setBackground(java.awt.Color)
java.awt.Window.setBackground(java.awt.Color)
javax.accessibility.AccessibleComponent.setBackground(java.awt.Color)
javax.swing.JComponent.setBackground(java.awt.Color)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setBackground(java.awt.Color)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setBackground(java.awt.Color)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setBackground(java.awt.Color)
javax.swing.table.DefaultTableCellRenderer.setBackground(java.awt.Color)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(java.awt.Color)
javax.swing.text.LabelView.setBackground(java.awt.Color)
javax.swing.text.StyleConstants.setBackground(javax.swing.text.MutableAttributeSet, java.awt.Color)
javax.swing.tree.DefaultTreeCellRenderer.setBackground(java.awt.Color)


Occurences of setBase

setBase occurences:
javax.swing.text.html.HTMLDocument.setBase(java.net.URL)
javax.swing.text.html.StyleSheet.setBase(java.net.URL)


Occurences of setBaseFontSize

setBaseFontSize occurences:
javax.swing.text.html.StyleSheet.setBaseFontSize(int)
javax.swing.text.html.StyleSheet.setBaseFontSize(java.lang.String)


Occurences of setBaseURI

setBaseURI occurences:
javax.xml.crypto.dom.DOMCryptoContext.setBaseURI(java.lang.String)
javax.xml.crypto.XMLCryptoContext.setBaseURI(java.lang.String)
org.w3c.dom.ls.LSInput.setBaseURI(java.lang.String)


Occurences of setBeanContext

setBeanContext occurences:
java.beans.beancontext.BeanContextChild.setBeanContext(java.beans.beancontext.BeanContext)
java.beans.beancontext.BeanContextChildSupport.setBeanContext(java.beans.beancontext.BeanContext)


Occurences of setBigDecimal

setBigDecimal occurences:
java.sql.CallableStatement.setBigDecimal(java.lang.String, java.math.BigDecimal)
java.sql.PreparedStatement.setBigDecimal(int, java.math.BigDecimal)
javax.sql.RowSet.setBigDecimal(int, java.math.BigDecimal)
javax.sql.RowSet.setBigDecimal(java.lang.String, java.math.BigDecimal)
javax.sql.rowset.BaseRowSet.setBigDecimal(int, java.math.BigDecimal)
javax.sql.rowset.BaseRowSet.setBigDecimal(java.lang.String, java.math.BigDecimal)


Occurences of setBinaryStream

setBinaryStream occurences:
java.sql.Blob.setBinaryStream(long)
java.sql.CallableStatement.setBinaryStream(java.lang.String, java.io.InputStream)
java.sql.CallableStatement.setBinaryStream(java.lang.String, java.io.InputStream, int)
java.sql.CallableStatement.setBinaryStream(java.lang.String, java.io.InputStream, long)
java.sql.PreparedStatement.setBinaryStream(int, java.io.InputStream)
java.sql.PreparedStatement.setBinaryStream(int, java.io.InputStream, int)
java.sql.PreparedStatement.setBinaryStream(int, java.io.InputStream, long)
java.sql.SQLXML.setBinaryStream()
javax.sql.RowSet.setBinaryStream(int, java.io.InputStream)
javax.sql.RowSet.setBinaryStream(int, java.io.InputStream, int)
javax.sql.RowSet.setBinaryStream(java.lang.String, java.io.InputStream)
javax.sql.RowSet.setBinaryStream(java.lang.String, java.io.InputStream, int)
javax.sql.rowset.BaseRowSet.setBinaryStream(int, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setBinaryStream(int, java.io.InputStream, int)
javax.sql.rowset.BaseRowSet.setBinaryStream(java.lang.String, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setBinaryStream(java.lang.String, java.io.InputStream, int)
javax.sql.rowset.serial.SerialBlob.setBinaryStream(long)


Occurences of setBindings

setBindings occurences:
javax.script.AbstractScriptEngine.setBindings(javax.script.Bindings, int)
javax.script.ScriptContext.setBindings(javax.script.Bindings, int)
javax.script.ScriptEngine.setBindings(javax.script.Bindings, int)
javax.script.ScriptEngineManager.setBindings(javax.script.Bindings)
javax.script.SimpleScriptContext.setBindings(javax.script.Bindings, int)


Occurences of setBitOffset

setBitOffset occurences:
javax.imageio.stream.ImageInputStream.setBitOffset(int)
javax.imageio.stream.ImageInputStreamImpl.setBitOffset(int)


Occurences of setBlinkRate

setBlinkRate occurences:
javax.swing.text.Caret.setBlinkRate(int)
javax.swing.text.DefaultCaret.setBlinkRate(int)


Occurences of setBlob

setBlob occurences:
java.sql.CallableStatement.setBlob(java.lang.String, java.io.InputStream)
java.sql.CallableStatement.setBlob(java.lang.String, java.io.InputStream, long)
java.sql.CallableStatement.setBlob(java.lang.String, java.sql.Blob)
java.sql.PreparedStatement.setBlob(int, java.io.InputStream)
java.sql.PreparedStatement.setBlob(int, java.io.InputStream, long)
java.sql.PreparedStatement.setBlob(int, java.sql.Blob)
javax.sql.RowSet.setBlob(int, java.io.InputStream)
javax.sql.RowSet.setBlob(int, java.io.InputStream, long)
javax.sql.RowSet.setBlob(int, java.sql.Blob)
javax.sql.RowSet.setBlob(java.lang.String, java.io.InputStream)
javax.sql.RowSet.setBlob(java.lang.String, java.io.InputStream, long)
javax.sql.RowSet.setBlob(java.lang.String, java.sql.Blob)
javax.sql.rowset.BaseRowSet.setBlob(int, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setBlob(int, java.io.InputStream, long)
javax.sql.rowset.BaseRowSet.setBlob(int, java.sql.Blob)
javax.sql.rowset.BaseRowSet.setBlob(java.lang.String, java.io.InputStream)
javax.sql.rowset.BaseRowSet.setBlob(java.lang.String, java.io.InputStream, long)
javax.sql.rowset.BaseRowSet.setBlob(java.lang.String, java.sql.Blob)


Occurences of setBlockIncrement

setBlockIncrement occurences:
java.awt.Adjustable.setBlockIncrement(int)
java.awt.Scrollbar.setBlockIncrement(int)
java.awt.ScrollPaneAdjustable.setBlockIncrement(int)
javax.swing.JScrollBar.setBlockIncrement(int)
javax.swing.JScrollPane.ScrollBar.setBlockIncrement(int)


Occurences of setBoolean

setBoolean occurences:
java.lang.reflect.Array.setBoolean(java.lang.Object, int, boolean)
java.lang.reflect.Field.setBoolean(java.lang.Object, boolean)
java.sql.CallableStatement.setBoolean(java.lang.String, boolean)
java.sql.PreparedStatement.setBoolean(int, boolean)
javax.sql.RowSet.setBoolean(int, boolean)
javax.sql.RowSet.setBoolean(java.lang.String, boolean)
javax.sql.rowset.BaseRowSet.setBoolean(int, boolean)
javax.sql.rowset.BaseRowSet.setBoolean(java.lang.String, boolean)


Occurences of setBorder

setBorder occurences:
javax.swing.border.TitledBorder.setBorder(javax.swing.border.Border)
javax.swing.JComponent.setBorder(javax.swing.border.Border)
javax.swing.JLayer.setBorder(javax.swing.border.Border)
javax.swing.JViewport.setBorder(javax.swing.border.Border)
javax.swing.plaf.basic.BasicSplitPaneDivider.setBorder(javax.swing.border.Border)
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField.setBorder(javax.swing.border.Border)


Occurences of setBorderPainted

setBorderPainted occurences:
javax.swing.AbstractButton.setBorderPainted(boolean)
javax.swing.JMenuBar.setBorderPainted(boolean)
javax.swing.JPopupMenu.setBorderPainted(boolean)
javax.swing.JProgressBar.setBorderPainted(boolean)
javax.swing.JToolBar.setBorderPainted(boolean)


Occurences of setBorderSelectionColor

setBorderSelectionColor occurences:
javax.swing.tree.DefaultTreeCellEditor.setBorderSelectionColor(java.awt.Color)
javax.swing.tree.DefaultTreeCellRenderer.setBorderSelectionColor(java.awt.Color)


Occurences of setBorderToNonRollover

setBorderToNonRollover occurences:
javax.swing.plaf.basic.BasicToolBarUI.setBorderToNonRollover(java.awt.Component)
javax.swing.plaf.metal.MetalToolBarUI.setBorderToNonRollover(java.awt.Component)
javax.swing.plaf.synth.SynthToolBarUI.setBorderToNonRollover(java.awt.Component)


Occurences of setBorderToNormal

setBorderToNormal occurences:
javax.swing.plaf.basic.BasicToolBarUI.setBorderToNormal(java.awt.Component)
javax.swing.plaf.synth.SynthToolBarUI.setBorderToNormal(java.awt.Component)


Occurences of setBorderToRollover

setBorderToRollover occurences:
javax.swing.plaf.basic.BasicToolBarUI.setBorderToRollover(java.awt.Component)
javax.swing.plaf.synth.SynthToolBarUI.setBorderToRollover(java.awt.Component)


Occurences of setBounds

setBounds occurences:
java.awt.Component.setBounds(int, int, int, int)
java.awt.Component.setBounds(java.awt.Rectangle)
java.awt.Component.AccessibleAWTComponent.setBounds(java.awt.Rectangle)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setBounds(java.awt.Rectangle)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setBounds(java.awt.Rectangle)
java.awt.Rectangle.setBounds(int, int, int, int)
java.awt.Rectangle.setBounds(java.awt.Rectangle)
java.awt.Window.setBounds(int, int, int, int)
java.awt.Window.setBounds(java.awt.Rectangle)
javax.accessibility.AccessibleComponent.setBounds(java.awt.Rectangle)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setBounds(java.awt.Rectangle)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setBounds(java.awt.Rectangle)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setBounds(java.awt.Rectangle)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBounds(java.awt.Rectangle)


Occurences of setBoundsForFrame

setBoundsForFrame occurences:
javax.swing.DefaultDesktopManager.setBoundsForFrame(javax.swing.JComponent, int, int, int, int)
javax.swing.DesktopManager.setBoundsForFrame(javax.swing.JComponent, int, int, int, int)


Occurences of setByte

setByte occurences:
java.lang.reflect.Array.setByte(java.lang.Object, int, byte)
java.lang.reflect.Field.setByte(java.lang.Object, byte)
java.sql.CallableStatement.setByte(java.lang.String, byte)
java.sql.PreparedStatement.setByte(int, byte)
javax.sql.RowSet.setByte(int, byte)
javax.sql.RowSet.setByte(java.lang.String, byte)
javax.sql.rowset.BaseRowSet.setByte(int, byte)
javax.sql.rowset.BaseRowSet.setByte(java.lang.String, byte)


Occurences of setByteOrder

setByteOrder occurences:
javax.imageio.stream.ImageInputStream.setByteOrder(java.nio.ByteOrder)
javax.imageio.stream.ImageInputStreamImpl.setByteOrder(java.nio.ByteOrder)


Occurences of setBytes

setBytes occurences:
java.sql.Blob.setBytes(long, byte:A)
java.sql.Blob.setBytes(long, byte:A, int, int)
java.sql.CallableStatement.setBytes(java.lang.String, byte:A)
java.sql.PreparedStatement.setBytes(int, byte:A)
javax.sql.RowSet.setBytes(int, byte:A)
javax.sql.RowSet.setBytes(java.lang.String, byte:A)
javax.sql.rowset.BaseRowSet.setBytes(int, byte:A)
javax.sql.rowset.BaseRowSet.setBytes(java.lang.String, byte:A)
javax.sql.rowset.serial.SerialBlob.setBytes(long, byte:A)
javax.sql.rowset.serial.SerialBlob.setBytes(long, byte:A, int, int)


Occurences of setByteStream

setByteStream occurences:
org.w3c.dom.ls.LSInput.setByteStream(java.io.InputStream)
org.w3c.dom.ls.LSOutput.setByteStream(java.io.OutputStream)
org.xml.sax.InputSource.setByteStream(java.io.InputStream)


Occurences of setCaretPosition

setCaretPosition occurences:
java.awt.TextComponent.setCaretPosition(int)
javax.swing.text.JTextComponent.setCaretPosition(int)


Occurences of setCaseSensitive

setCaseSensitive occurences:
javax.sql.rowset.RowSetMetaDataImpl.setCaseSensitive(int, boolean)
javax.sql.RowSetMetaData.setCaseSensitive(int, boolean)


Occurences of setCatalogName

setCatalogName occurences:
javax.sql.rowset.RowSetMetaDataImpl.setCatalogName(int, java.lang.String)
javax.sql.RowSetMetaData.setCatalogName(int, java.lang.String)


Occurences of setCellEditor

setCellEditor occurences:
javax.swing.JTable.setCellEditor(javax.swing.table.TableCellEditor)
javax.swing.JTree.setCellEditor(javax.swing.tree.TreeCellEditor)
javax.swing.plaf.basic.BasicTreeUI.setCellEditor(javax.swing.tree.TreeCellEditor)
javax.swing.table.TableColumn.setCellEditor(javax.swing.table.TableCellEditor)


Occurences of setCellRenderer

setCellRenderer occurences:
javax.swing.JList.setCellRenderer(javax.swing.ListCellRenderer)
javax.swing.JTree.setCellRenderer(javax.swing.tree.TreeCellRenderer)
javax.swing.plaf.basic.BasicTreeUI.setCellRenderer(javax.swing.tree.TreeCellRenderer)
javax.swing.table.TableColumn.setCellRenderer(javax.swing.table.TableCellRenderer)


Occurences of setChar

setChar occurences:
java.lang.reflect.Array.setChar(java.lang.Object, int, char)
java.lang.reflect.Field.setChar(java.lang.Object, char)


Occurences of setCharacterAttributes

setCharacterAttributes occurences:
javax.swing.JTextPane.setCharacterAttributes(javax.swing.text.AttributeSet, boolean)
javax.swing.text.DefaultStyledDocument.setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)
javax.swing.text.StyledDocument.setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)
javax.swing.text.StyledEditorKit.StyledTextAction.setCharacterAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean)


Occurences of setCharacterStream

setCharacterStream occurences:
java.sql.CallableStatement.setCharacterStream(java.lang.String, java.io.Reader)
java.sql.CallableStatement.setCharacterStream(java.lang.String, java.io.Reader, int)
java.sql.CallableStatement.setCharacterStream(java.lang.String, java.io.Reader, long)
java.sql.Clob.setCharacterStream(long)
java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader)
java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, int)
java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, long)
java.sql.SQLXML.setCharacterStream()
javax.sql.RowSet.setCharacterStream(int, java.io.Reader)
javax.sql.RowSet.setCharacterStream(int, java.io.Reader, int)
javax.sql.RowSet.setCharacterStream(java.lang.String, java.io.Reader)
javax.sql.RowSet.setCharacterStream(java.lang.String, java.io.Reader, int)
javax.sql.rowset.BaseRowSet.setCharacterStream(int, java.io.Reader)
javax.sql.rowset.BaseRowSet.setCharacterStream(int, java.io.Reader, int)
javax.sql.rowset.BaseRowSet.setCharacterStream(java.lang.String, java.io.Reader)
javax.sql.rowset.BaseRowSet.setCharacterStream(java.lang.String, java.io.Reader, int)
javax.sql.rowset.serial.SerialClob.setCharacterStream(long)
org.w3c.dom.ls.LSInput.setCharacterStream(java.io.Reader)
org.w3c.dom.ls.LSOutput.setCharacterStream(java.io.Writer)
org.xml.sax.InputSource.setCharacterStream(java.io.Reader)


Occurences of setCharacterSubsets

setCharacterSubsets occurences:
java.awt.im.InputContext.setCharacterSubsets(java.lang.Character.Subset:A)
java.awt.im.spi.InputMethod.setCharacterSubsets(java.lang.Character.Subset:A)


Occurences of setCharAt

setCharAt occurences:
java.lang.StringBuffer.setCharAt(int, char)
java.lang.StringBuilder.setCharAt(int, char)


Occurences of setClientInfo

setClientInfo occurences:
java.sql.Connection.setClientInfo(java.lang.String, java.lang.String)
java.sql.Connection.setClientInfo(java.util.Properties)


Occurences of setClip

setClip occurences:
java.awt.Graphics.setClip(int, int, int, int)
java.awt.Graphics.setClip(java.awt.Shape)
javax.swing.DebugGraphics.setClip(int, int, int, int)
javax.swing.DebugGraphics.setClip(java.awt.Shape)


Occurences of setClob

setClob occurences:
java.sql.CallableStatement.setClob(java.lang.String, java.io.Reader)
java.sql.CallableStatement.setClob(java.lang.String, java.io.Reader, long)
java.sql.CallableStatement.setClob(java.lang.String, java.sql.Clob)
java.sql.PreparedStatement.setClob(int, java.io.Reader)
java.sql.PreparedStatement.setClob(int, java.io.Reader, long)
java.sql.PreparedStatement.setClob(int, java.sql.Clob)
javax.sql.RowSet.setClob(int, java.io.Reader)
javax.sql.RowSet.setClob(int, java.io.Reader, long)
javax.sql.RowSet.setClob(int, java.sql.Clob)
javax.sql.RowSet.setClob(java.lang.String, java.io.Reader)
javax.sql.RowSet.setClob(java.lang.String, java.io.Reader, long)
javax.sql.RowSet.setClob(java.lang.String, java.sql.Clob)
javax.sql.rowset.BaseRowSet.setClob(int, java.io.Reader)
javax.sql.rowset.BaseRowSet.setClob(int, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setClob(int, java.sql.Clob)
javax.sql.rowset.BaseRowSet.setClob(java.lang.String, java.io.Reader)
javax.sql.rowset.BaseRowSet.setClob(java.lang.String, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setClob(java.lang.String, java.sql.Clob)


Occurences of setColor

setColor occurences:
java.awt.Graphics.setColor(java.awt.Color)
java.awt.PageAttributes.setColor(java.awt.PageAttributes.ColorType)
javax.swing.DebugGraphics.setColor(java.awt.Color)
javax.swing.JColorChooser.setColor(int)
javax.swing.JColorChooser.setColor(int, int, int)
javax.swing.JColorChooser.setColor(java.awt.Color)


Occurences of setColorModel

setColorModel occurences:
java.awt.image.BufferedImageFilter.setColorModel(java.awt.image.ColorModel)
java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel)
java.awt.image.ImageFilter.setColorModel(java.awt.image.ColorModel)
java.awt.image.PixelGrabber.setColorModel(java.awt.image.ColorModel)
java.awt.image.RGBImageFilter.setColorModel(java.awt.image.ColorModel)


Occurences of setColumnCount

setColumnCount occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnCount(int)
javax.sql.RowSetMetaData.setColumnCount(int)
javax.swing.table.DefaultTableModel.setColumnCount(int)


Occurences of setColumnDisplaySize

setColumnDisplaySize occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(int, int)
javax.sql.RowSetMetaData.setColumnDisplaySize(int, int)


Occurences of setColumnIdentifiers

setColumnIdentifiers occurences:
javax.swing.table.DefaultTableModel.setColumnIdentifiers(java.lang.Object:A)
javax.swing.table.DefaultTableModel.setColumnIdentifiers(java.util.Vector)


Occurences of setColumnLabel

setColumnLabel occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnLabel(int, java.lang.String)
javax.sql.RowSetMetaData.setColumnLabel(int, java.lang.String)


Occurences of setColumnMargin

setColumnMargin occurences:
javax.swing.table.DefaultTableColumnModel.setColumnMargin(int)
javax.swing.table.TableColumnModel.setColumnMargin(int)


Occurences of setColumnModel

setColumnModel occurences:
javax.swing.JTable.setColumnModel(javax.swing.table.TableColumnModel)
javax.swing.table.JTableHeader.setColumnModel(javax.swing.table.TableColumnModel)


Occurences of setColumnName

setColumnName occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnName(int, java.lang.String)
javax.sql.RowSetMetaData.setColumnName(int, java.lang.String)


Occurences of setColumnNumber

setColumnNumber occurences:
javax.xml.bind.helpers.ValidationEventLocatorImpl.setColumnNumber(int)
org.xml.sax.helpers.LocatorImpl.setColumnNumber(int)


Occurences of setColumns

setColumns occurences:
java.awt.GridLayout.setColumns(int)
java.awt.TextArea.setColumns(int)
java.awt.TextField.setColumns(int)
javax.swing.JTextArea.setColumns(int)
javax.swing.JTextField.setColumns(int)


Occurences of setColumnSelectionAllowed

setColumnSelectionAllowed occurences:
javax.swing.JTable.setColumnSelectionAllowed(boolean)
javax.swing.table.DefaultTableColumnModel.setColumnSelectionAllowed(boolean)
javax.swing.table.TableColumnModel.setColumnSelectionAllowed(boolean)


Occurences of setColumnType

setColumnType occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnType(int, int)
javax.sql.RowSetMetaData.setColumnType(int, int)


Occurences of setColumnTypeName

setColumnTypeName occurences:
javax.sql.rowset.RowSetMetaDataImpl.setColumnTypeName(int, java.lang.String)
javax.sql.RowSetMetaData.setColumnTypeName(int, java.lang.String)


Occurences of setCommand

setCommand occurences:
javax.sql.RowSet.setCommand(java.lang.String)
javax.sql.rowset.BaseRowSet.setCommand(java.lang.String)


Occurences of setComment

setComment occurences:
java.net.HttpCookie.setComment(java.lang.String)
java.util.zip.ZipEntry.setComment(java.lang.String)
java.util.zip.ZipOutputStream.setComment(java.lang.String)


Occurences of setComparator

setComparator occurences:
javax.swing.DefaultRowSorter.setComparator(int, java.util.Comparator)
javax.swing.SortingFocusTraversalPolicy.setComparator(java.util.Comparator)


Occurences of setComponent

setComponent occurences:
java.awt.dnd.DragGestureRecognizer.setComponent(java.awt.Component)
java.awt.dnd.DropTarget.setComponent(java.awt.Component)
javax.swing.JToolTip.setComponent(javax.swing.JComponent)
javax.swing.text.StyleConstants.setComponent(javax.swing.text.MutableAttributeSet, java.awt.Component)


Occurences of setComponentOrientation

setComponentOrientation occurences:
java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation)
javax.swing.JMenu.setComponentOrientation(java.awt.ComponentOrientation)
javax.swing.JScrollPane.setComponentOrientation(java.awt.ComponentOrientation)
javax.swing.text.JTextComponent.setComponentOrientation(java.awt.ComponentOrientation)


Occurences of setComponentZOrder

setComponentZOrder occurences:
java.awt.Container.setComponentZOrder(java.awt.Component, int)
javax.swing.JDesktopPane.setComponentZOrder(java.awt.Component, int)


Occurences of setCompositionEnabled

setCompositionEnabled occurences:
java.awt.im.InputContext.setCompositionEnabled(boolean)
java.awt.im.spi.InputMethod.setCompositionEnabled(boolean)


Occurences of setConcurrency

setConcurrency occurences:
javax.sql.RowSet.setConcurrency(int)
javax.sql.rowset.BaseRowSet.setConcurrency(int)


Occurences of setContent

setContent occurences:
javax.xml.soap.AttachmentPart.setContent(java.lang.Object, java.lang.String)
javax.xml.soap.SOAPPart.setContent(javax.xml.transform.Source)


Occurences of setContentHandler

setContentHandler occurences:
javax.xml.validation.ValidatorHandler.setContentHandler(org.xml.sax.ContentHandler)
org.xml.sax.helpers.ParserAdapter.setContentHandler(org.xml.sax.ContentHandler)
org.xml.sax.helpers.XMLFilterImpl.setContentHandler(org.xml.sax.ContentHandler)
org.xml.sax.XMLReader.setContentHandler(org.xml.sax.ContentHandler)


Occurences of setContentId

setContentId occurences:
javax.xml.soap.AttachmentPart.setContentId(java.lang.String)
javax.xml.soap.SOAPPart.setContentId(java.lang.String)


Occurences of setContentLocation

setContentLocation occurences:
javax.xml.soap.AttachmentPart.setContentLocation(java.lang.String)
javax.xml.soap.SOAPPart.setContentLocation(java.lang.String)


Occurences of setContentPane

setContentPane occurences:
javax.swing.JApplet.setContentPane(java.awt.Container)
javax.swing.JDialog.setContentPane(java.awt.Container)
javax.swing.JFrame.setContentPane(java.awt.Container)
javax.swing.JInternalFrame.setContentPane(java.awt.Container)
javax.swing.JRootPane.setContentPane(java.awt.Container)
javax.swing.JWindow.setContentPane(java.awt.Container)
javax.swing.RootPaneContainer.setContentPane(java.awt.Container)


Occurences of setContentType

setContentType occurences:
javax.swing.JEditorPane.setContentType(java.lang.String)
javax.xml.soap.AttachmentPart.setContentType(java.lang.String)


Occurences of setContext

setContext occurences:
com.sun.tools.jconsole.JConsolePlugin.setContext(com.sun.tools.jconsole.JConsoleContext)
javax.script.AbstractScriptEngine.setContext(javax.script.ScriptContext)
javax.script.ScriptEngine.setContext(javax.script.ScriptContext)


Occurences of setContinuousLayout

setContinuousLayout occurences:
javax.swing.JSplitPane.setContinuousLayout(boolean)
javax.swing.plaf.basic.BasicSplitPaneUI.setContinuousLayout(boolean)


Occurences of setController

setController occurences:
javax.imageio.IIOParam.setController(javax.imageio.IIOParamController)
javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController)


Occurences of setCopies

setCopies occurences:
java.awt.JobAttributes.setCopies(int)
java.awt.print.PrinterJob.setCopies(int)


Occurences of setCurrency

setCurrency occurences:
java.text.DecimalFormat.setCurrency(java.util.Currency)
java.text.DecimalFormatSymbols.setCurrency(java.util.Currency)
java.text.NumberFormat.setCurrency(java.util.Currency)
javax.sql.rowset.RowSetMetaDataImpl.setCurrency(int, boolean)
javax.sql.RowSetMetaData.setCurrency(int, boolean)


Occurences of setCurrentAccessibleValue

setCurrentAccessibleValue occurences:
java.awt.Button.AccessibleAWTButton.setCurrentAccessibleValue(java.lang.Number)
java.awt.Checkbox.AccessibleAWTCheckbox.setCurrentAccessibleValue(java.lang.Number)
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.setCurrentAccessibleValue(java.lang.Number)
java.awt.MenuItem.AccessibleAWTMenuItem.setCurrentAccessibleValue(java.lang.Number)
java.awt.Scrollbar.AccessibleAWTScrollBar.setCurrentAccessibleValue(java.lang.Number)
javax.accessibility.AccessibleValue.setCurrentAccessibleValue(java.lang.Number)
javax.swing.AbstractButton.AccessibleAbstractButton.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JInternalFrame.AccessibleJInternalFrame.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JProgressBar.AccessibleJProgressBar.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JScrollBar.AccessibleJScrollBar.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JSlider.AccessibleJSlider.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JSpinner.AccessibleJSpinner.setCurrentAccessibleValue(java.lang.Number)
javax.swing.JSplitPane.AccessibleJSplitPane.setCurrentAccessibleValue(java.lang.Number)


Occurences of setCurrentManager

setCurrentManager occurences:
javax.swing.FocusManager.setCurrentManager(javax.swing.FocusManager)
javax.swing.RepaintManager.setCurrentManager(javax.swing.RepaintManager)


Occurences of setCursor

setCursor occurences:
java.awt.Component.setCursor(java.awt.Cursor)
java.awt.Component.AccessibleAWTComponent.setCursor(java.awt.Cursor)
java.awt.dnd.DragSourceContext.setCursor(java.awt.Cursor)
java.awt.Frame.setCursor(int)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setCursor(java.awt.Cursor)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setCursor(java.awt.Cursor)
java.awt.Window.setCursor(java.awt.Cursor)
javax.accessibility.AccessibleComponent.setCursor(java.awt.Cursor)
javax.swing.JInternalFrame.setCursor(java.awt.Cursor)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setCursor(java.awt.Cursor)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setCursor(java.awt.Cursor)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setCursor(java.awt.Cursor)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setCursor(java.awt.Cursor)


Occurences of setCurve

setCurve occurences:
java.awt.geom.CubicCurve2D.setCurve(double, double, double, double, double, double, double, double)
java.awt.geom.CubicCurve2D.setCurve(double:A, int)
java.awt.geom.CubicCurve2D.setCurve(java.awt.geom.CubicCurve2D)
java.awt.geom.CubicCurve2D.setCurve(java.awt.geom.Point2D, java.awt.geom.Point2D, java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.CubicCurve2D.setCurve(java.awt.geom.Point2D:A, int)
java.awt.geom.CubicCurve2D.Double.setCurve(double, double, double, double, double, double, double, double)
java.awt.geom.CubicCurve2D.Float.setCurve(double, double, double, double, double, double, double, double)
java.awt.geom.CubicCurve2D.Float.setCurve(float, float, float, float, float, float, float, float)
java.awt.geom.QuadCurve2D.setCurve(double, double, double, double, double, double)
java.awt.geom.QuadCurve2D.setCurve(double:A, int)
java.awt.geom.QuadCurve2D.setCurve(java.awt.geom.Point2D, java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.QuadCurve2D.setCurve(java.awt.geom.Point2D:A, int)
java.awt.geom.QuadCurve2D.setCurve(java.awt.geom.QuadCurve2D)
java.awt.geom.QuadCurve2D.Double.setCurve(double, double, double, double, double, double)
java.awt.geom.QuadCurve2D.Float.setCurve(double, double, double, double, double, double)
java.awt.geom.QuadCurve2D.Float.setCurve(float, float, float, float, float, float)


Occurences of setDaemon

setDaemon occurences:
java.lang.Thread.setDaemon(boolean)
java.lang.ThreadGroup.setDaemon(boolean)


Occurences of setData

setData occurences:
java.awt.color.ICC_Profile.setData(int, byte:A)
java.awt.image.BufferedImage.setData(java.awt.image.Raster)
java.awt.image.WritableRenderedImage.setData(java.awt.image.Raster)
java.net.DatagramPacket.setData(byte:A)
java.net.DatagramPacket.setData(byte:A, int, int)
javax.imageio.stream.IIOByteBuffer.setData(byte:A)
org.w3c.dom.CharacterData.setData(java.lang.String)
org.w3c.dom.ProcessingInstruction.setData(java.lang.String)


Occurences of setDataElements

setDataElements occurences:
java.awt.image.BandedSampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.MultiPixelPackedSampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setDataElements(int, int, int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
java.awt.image.WritableRaster.setDataElements(int, int, int, int, java.lang.Object)
java.awt.image.WritableRaster.setDataElements(int, int, java.awt.image.Raster)
java.awt.image.WritableRaster.setDataElements(int, int, java.lang.Object)


Occurences of setDataSourceName

setDataSourceName occurences:
javax.sql.RowSet.setDataSourceName(java.lang.String)
javax.sql.rowset.BaseRowSet.setDataSourceName(java.lang.String)


Occurences of setDataVector

setDataVector occurences:
javax.swing.table.DefaultTableModel.setDataVector(java.lang.Object:A:A, java.lang.Object:A)
javax.swing.table.DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)


Occurences of setDate

setDate occurences:
java.security.cert.PKIXParameters.setDate(java.util.Date)
java.sql.CallableStatement.setDate(java.lang.String, java.sql.Date)
java.sql.CallableStatement.setDate(java.lang.String, java.sql.Date, java.util.Calendar)
java.sql.PreparedStatement.setDate(int, java.sql.Date)
java.sql.PreparedStatement.setDate(int, java.sql.Date, java.util.Calendar)
java.sql.Time.setDate(int)
java.util.Calendar.Builder.setDate(int, int, int)
java.util.Date.setDate(int)
javax.sql.RowSet.setDate(int, java.sql.Date)
javax.sql.RowSet.setDate(int, java.sql.Date, java.util.Calendar)
javax.sql.RowSet.setDate(java.lang.String, java.sql.Date)
javax.sql.RowSet.setDate(java.lang.String, java.sql.Date, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setDate(int, java.sql.Date)
javax.sql.rowset.BaseRowSet.setDate(int, java.sql.Date, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setDate(java.lang.String, java.sql.Date)
javax.sql.rowset.BaseRowSet.setDate(java.lang.String, java.sql.Date, java.util.Calendar)


Occurences of setDefault

setDefault occurences:
java.net.Authenticator.setDefault(java.net.Authenticator)
java.net.CookieHandler.setDefault(java.net.CookieHandler)
java.net.ProxySelector.setDefault(java.net.ProxySelector)
java.net.ResponseCache.setDefault(java.net.ResponseCache)
java.util.Locale.setDefault(java.util.Locale)
java.util.Locale.setDefault(java.util.Locale.Category, java.util.Locale)
java.util.TimeZone.setDefault(java.util.TimeZone)
javax.net.ssl.SSLContext.setDefault(javax.net.ssl.SSLContext)


Occurences of setDefaultCloseOperation

setDefaultCloseOperation occurences:
javax.swing.JDialog.setDefaultCloseOperation(int)
javax.swing.JFrame.setDefaultCloseOperation(int)
javax.swing.JInternalFrame.setDefaultCloseOperation(int)


Occurences of setDefaultLocale

setDefaultLocale occurences:
javax.swing.JComponent.setDefaultLocale(java.util.Locale)
javax.swing.UIDefaults.setDefaultLocale(java.util.Locale)


Occurences of setDefaultLookAndFeelDecorated

setDefaultLookAndFeelDecorated occurences:
javax.swing.JDialog.setDefaultLookAndFeelDecorated(boolean)
javax.swing.JFrame.setDefaultLookAndFeelDecorated(boolean)


Occurences of setDefaultNamespace

setDefaultNamespace occurences:
javax.xml.stream.XMLEventWriter.setDefaultNamespace(java.lang.String)
javax.xml.stream.XMLStreamWriter.setDefaultNamespace(java.lang.String)


Occurences of setDefaultNamespacePrefix

setDefaultNamespacePrefix occurences:
javax.xml.crypto.dom.DOMCryptoContext.setDefaultNamespacePrefix(java.lang.String)
javax.xml.crypto.XMLCryptoContext.setDefaultNamespacePrefix(java.lang.String)


Occurences of setDefaultRenderer

setDefaultRenderer occurences:
javax.swing.JTable.setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer)
javax.swing.table.JTableHeader.setDefaultRenderer(javax.swing.table.TableCellRenderer)


Occurences of setDelay

setDelay occurences:
javax.swing.JMenu.setDelay(int)
javax.swing.Timer.setDelay(int)


Occurences of setDescriptor

setDescriptor occurences:
javax.management.DescriptorAccess.setDescriptor(javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanAttributeInfo.setDescriptor(javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanConstructorInfo.setDescriptor(javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanInfo.setDescriptor(javax.management.Descriptor, java.lang.String)
javax.management.modelmbean.ModelMBeanInfoSupport.setDescriptor(javax.management.Descriptor, java.lang.String)
javax.management.modelmbean.ModelMBeanNotificationInfo.setDescriptor(javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanOperationInfo.setDescriptor(javax.management.Descriptor)


Occurences of setDescriptors

setDescriptors occurences:
javax.management.modelmbean.ModelMBeanInfo.setDescriptors(javax.management.Descriptor:A)
javax.management.modelmbean.ModelMBeanInfoSupport.setDescriptors(javax.management.Descriptor:A)


Occurences of setDesignTime

setDesignTime occurences:
java.beans.beancontext.BeanContextSupport.setDesignTime(boolean)
java.beans.Beans.setDesignTime(boolean)
java.beans.DesignMode.setDesignTime(boolean)


Occurences of setDestination

setDestination occurences:
java.awt.JobAttributes.setDestination(java.awt.JobAttributes.DestinationType)
javax.imageio.ImageReadParam.setDestination(java.awt.image.BufferedImage)


Occurences of setDestinationType

setDestinationType occurences:
javax.imageio.IIOParam.setDestinationType(javax.imageio.ImageTypeSpecifier)
javax.imageio.ImageReadParam.setDestinationType(javax.imageio.ImageTypeSpecifier)


Occurences of setDictionary

setDictionary occurences:
java.util.zip.Deflater.setDictionary(byte:A)
java.util.zip.Deflater.setDictionary(byte:A, int, int)
java.util.zip.Inflater.setDictionary(byte:A)
java.util.zip.Inflater.setDictionary(byte:A, int, int)


Occurences of setDifferenceMode

setDifferenceMode occurences:
javax.management.monitor.CounterMonitor.setDifferenceMode(boolean)
javax.management.monitor.CounterMonitorMBean.setDifferenceMode(boolean)
javax.management.monitor.GaugeMonitor.setDifferenceMode(boolean)
javax.management.monitor.GaugeMonitorMBean.setDifferenceMode(boolean)


Occurences of setDimensions

setDimensions occurences:
java.awt.image.BufferedImageFilter.setDimensions(int, int)
java.awt.image.CropImageFilter.setDimensions(int, int)
java.awt.image.ImageConsumer.setDimensions(int, int)
java.awt.image.ImageFilter.setDimensions(int, int)
java.awt.image.PixelGrabber.setDimensions(int, int)
java.awt.image.ReplicateScaleFilter.setDimensions(int, int)


Occurences of setDirection

setDirection occurences:
javax.swing.plaf.basic.BasicArrowButton.setDirection(int)
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.setDirection(int)
javax.swing.plaf.basic.BasicSliderUI.ScrollListener.setDirection(int)
javax.swing.text.DefaultStyledDocument.ElementSpec.setDirection(short)


Occurences of setDirectory

setDirectory occurences:
java.awt.FileDialog.setDirectory(java.lang.String)
javax.swing.plaf.basic.BasicFileChooserUI.setDirectory(java.io.File)


Occurences of setDirectoryName

setDirectoryName occurences:
javax.swing.plaf.basic.BasicFileChooserUI.setDirectoryName(java.lang.String)
javax.swing.plaf.metal.MetalFileChooserUI.setDirectoryName(java.lang.String)


Occurences of setDirectorySelected

setDirectorySelected occurences:
javax.swing.plaf.basic.BasicFileChooserUI.setDirectorySelected(boolean)
javax.swing.plaf.metal.MetalFileChooserUI.setDirectorySelected(boolean)


Occurences of setDisabledIcon

setDisabledIcon occurences:
javax.swing.AbstractButton.setDisabledIcon(javax.swing.Icon)
javax.swing.JLabel.setDisabledIcon(javax.swing.Icon)


Occurences of setDisplayedMnemonic

setDisplayedMnemonic occurences:
javax.swing.JLabel.setDisplayedMnemonic(char)
javax.swing.JLabel.setDisplayedMnemonic(int)


Occurences of setDisplayedMnemonicIndex

setDisplayedMnemonicIndex occurences:
javax.swing.AbstractButton.setDisplayedMnemonicIndex(int)
javax.swing.JLabel.setDisplayedMnemonicIndex(int)


Occurences of setDividerLocation

setDividerLocation occurences:
javax.swing.JSplitPane.setDividerLocation(double)
javax.swing.JSplitPane.setDividerLocation(int)
javax.swing.plaf.basic.BasicSplitPaneUI.setDividerLocation(javax.swing.JSplitPane, int)
javax.swing.plaf.multi.MultiSplitPaneUI.setDividerLocation(javax.swing.JSplitPane, int)
javax.swing.plaf.SplitPaneUI.setDividerLocation(javax.swing.JSplitPane, int)


Occurences of setDividerSize

setDividerSize occurences:
javax.swing.JSplitPane.setDividerSize(int)
javax.swing.plaf.basic.BasicSplitPaneDivider.setDividerSize(int)


Occurences of setDocument

setDocument occurences:
javax.swing.JFormattedTextField.setDocument(javax.swing.text.Document)
javax.swing.JTextField.setDocument(javax.swing.text.Document)
javax.swing.JTextPane.setDocument(javax.swing.text.Document)
javax.swing.text.JTextComponent.setDocument(javax.swing.text.Document)


Occurences of setDocumentHandler

setDocumentHandler occurences:
org.xml.sax.helpers.XMLReaderAdapter.setDocumentHandler(org.xml.sax.DocumentHandler)
org.xml.sax.Parser.setDocumentHandler(org.xml.sax.DocumentHandler)


Occurences of setDocumentLocator

setDocumentLocator occurences:
org.xml.sax.ContentHandler.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.DocumentHandler.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.HandlerBase.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.helpers.DefaultHandler.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.helpers.ParserAdapter.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.helpers.XMLFilterImpl.setDocumentLocator(org.xml.sax.Locator)
org.xml.sax.helpers.XMLReaderAdapter.setDocumentLocator(org.xml.sax.Locator)


Occurences of setDot

setDot occurences:
javax.swing.text.Caret.setDot(int)
javax.swing.text.DefaultCaret.setDot(int)
javax.swing.text.DefaultCaret.setDot(int, javax.swing.text.Position.Bias)
javax.swing.text.NavigationFilter.setDot(javax.swing.text.NavigationFilter.FilterBypass, int, javax.swing.text.Position.Bias)
javax.swing.text.NavigationFilter.FilterBypass.setDot(int, javax.swing.text.Position.Bias)


Occurences of setDouble

setDouble occurences:
java.lang.reflect.Array.setDouble(java.lang.Object, int, double)
java.lang.reflect.Field.setDouble(java.lang.Object, double)
java.sql.CallableStatement.setDouble(java.lang.String, double)
java.sql.PreparedStatement.setDouble(int, double)
javax.sql.RowSet.setDouble(int, double)
javax.sql.RowSet.setDouble(java.lang.String, double)
javax.sql.rowset.BaseRowSet.setDouble(int, double)
javax.sql.rowset.BaseRowSet.setDouble(java.lang.String, double)


Occurences of setDoubleBuffered

setDoubleBuffered occurences:
javax.swing.JComponent.setDoubleBuffered(boolean)
javax.swing.JRootPane.setDoubleBuffered(boolean)


Occurences of setDragEnabled

setDragEnabled occurences:
javax.swing.JColorChooser.setDragEnabled(boolean)
javax.swing.JFileChooser.setDragEnabled(boolean)
javax.swing.JList.setDragEnabled(boolean)
javax.swing.JTable.setDragEnabled(boolean)
javax.swing.JTree.setDragEnabled(boolean)
javax.swing.text.JTextComponent.setDragEnabled(boolean)


Occurences of setDropMode

setDropMode occurences:
javax.swing.JList.setDropMode(javax.swing.DropMode)
javax.swing.JTable.setDropMode(javax.swing.DropMode)
javax.swing.JTree.setDropMode(javax.swing.DropMode)
javax.swing.text.JTextComponent.setDropMode(javax.swing.DropMode)


Occurences of setDTDHandler

setDTDHandler occurences:
org.xml.sax.helpers.ParserAdapter.setDTDHandler(org.xml.sax.DTDHandler)
org.xml.sax.helpers.XMLFilterImpl.setDTDHandler(org.xml.sax.DTDHandler)
org.xml.sax.helpers.XMLReaderAdapter.setDTDHandler(org.xml.sax.DTDHandler)
org.xml.sax.Parser.setDTDHandler(org.xml.sax.DTDHandler)
org.xml.sax.XMLReader.setDTDHandler(org.xml.sax.DTDHandler)


Occurences of setEchoChar

setEchoChar occurences:
java.awt.TextField.setEchoChar(char)
javax.swing.JPasswordField.setEchoChar(char)


Occurences of setEditable

setEditable occurences:
java.awt.TextComponent.setEditable(boolean)
javax.swing.JComboBox.setEditable(boolean)
javax.swing.JTree.setEditable(boolean)
javax.swing.plaf.basic.BasicTreeUI.setEditable(boolean)
javax.swing.text.JTextComponent.setEditable(boolean)


Occurences of setEditor

setEditor occurences:
javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor)
javax.swing.JSpinner.setEditor(javax.swing.JComponent)


Occurences of setEditorKit

setEditorKit occurences:
javax.swing.JEditorPane.setEditorKit(javax.swing.text.EditorKit)
javax.swing.JTextPane.setEditorKit(javax.swing.text.EditorKit)


Occurences of setElem

setElem occurences:
java.awt.image.DataBuffer.setElem(int, int)
java.awt.image.DataBuffer.setElem(int, int, int)
java.awt.image.DataBufferByte.setElem(int, int)
java.awt.image.DataBufferByte.setElem(int, int, int)
java.awt.image.DataBufferDouble.setElem(int, int)
java.awt.image.DataBufferDouble.setElem(int, int, int)
java.awt.image.DataBufferFloat.setElem(int, int)
java.awt.image.DataBufferFloat.setElem(int, int, int)
java.awt.image.DataBufferInt.setElem(int, int)
java.awt.image.DataBufferInt.setElem(int, int, int)
java.awt.image.DataBufferShort.setElem(int, int)
java.awt.image.DataBufferShort.setElem(int, int, int)
java.awt.image.DataBufferUShort.setElem(int, int)
java.awt.image.DataBufferUShort.setElem(int, int, int)


Occurences of setElemDouble

setElemDouble occurences:
java.awt.image.DataBuffer.setElemDouble(int, double)
java.awt.image.DataBuffer.setElemDouble(int, int, double)
java.awt.image.DataBufferDouble.setElemDouble(int, double)
java.awt.image.DataBufferDouble.setElemDouble(int, int, double)
java.awt.image.DataBufferFloat.setElemDouble(int, double)
java.awt.image.DataBufferFloat.setElemDouble(int, int, double)


Occurences of setElementAt

setElementAt occurences:
java.util.Vector.setElementAt(E, int)
java.util.Vector.setElementAt(java.lang.Object, int)
javax.swing.DefaultListModel.setElementAt(E, int)
javax.swing.DefaultListModel.setElementAt(java.lang.Object, int)


Occurences of setElemFloat

setElemFloat occurences:
java.awt.image.DataBuffer.setElemFloat(int, float)
java.awt.image.DataBuffer.setElemFloat(int, int, float)
java.awt.image.DataBufferDouble.setElemFloat(int, float)
java.awt.image.DataBufferDouble.setElemFloat(int, int, float)
java.awt.image.DataBufferFloat.setElemFloat(int, float)
java.awt.image.DataBufferFloat.setElemFloat(int, int, float)


Occurences of setEnabled

setEnabled occurences:
com.sun.jdi.request.EventRequest.setEnabled(boolean)
java.awt.Component.setEnabled(boolean)
java.awt.Component.AccessibleAWTComponent.setEnabled(boolean)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setEnabled(boolean)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setEnabled(boolean)
java.awt.MenuItem.setEnabled(boolean)
javax.accessibility.AccessibleComponent.setEnabled(boolean)
javax.swing.AbstractAction.setEnabled(boolean)
javax.swing.AbstractButton.setEnabled(boolean)
javax.swing.Action.setEnabled(boolean)
javax.swing.ButtonModel.setEnabled(boolean)
javax.swing.DefaultButtonModel.setEnabled(boolean)
javax.swing.JComboBox.setEnabled(boolean)
javax.swing.JComponent.setEnabled(boolean)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setEnabled(boolean)
javax.swing.JMenuItem.setEnabled(boolean)
javax.swing.JScrollBar.setEnabled(boolean)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setEnabled(boolean)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setEnabled(boolean)
javax.swing.plaf.metal.MetalComboBoxButton.setEnabled(boolean)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setEnabled(boolean)
javax.swing.ToolTipManager.setEnabled(boolean)


Occurences of setEnabledCipherSuites

setEnabledCipherSuites occurences:
javax.naming.ldap.StartTlsResponse.setEnabledCipherSuites(java.lang.String:A)
javax.net.ssl.SSLEngine.setEnabledCipherSuites(java.lang.String:A)
javax.net.ssl.SSLServerSocket.setEnabledCipherSuites(java.lang.String:A)
javax.net.ssl.SSLSocket.setEnabledCipherSuites(java.lang.String:A)


Occurences of setEnabledProtocols

setEnabledProtocols occurences:
javax.net.ssl.SSLEngine.setEnabledProtocols(java.lang.String:A)
javax.net.ssl.SSLServerSocket.setEnabledProtocols(java.lang.String:A)
javax.net.ssl.SSLSocket.setEnabledProtocols(java.lang.String:A)


Occurences of setEnableSessionCreation

setEnableSessionCreation occurences:
javax.net.ssl.SSLEngine.setEnableSessionCreation(boolean)
javax.net.ssl.SSLServerSocket.setEnableSessionCreation(boolean)
javax.net.ssl.SSLSocket.setEnableSessionCreation(boolean)


Occurences of setEncoding

setEncoding occurences:
java.util.logging.Handler.setEncoding(java.lang.String)
java.util.logging.StreamHandler.setEncoding(java.lang.String)
javax.xml.bind.helpers.AbstractMarshallerImpl.setEncoding(java.lang.String)
org.w3c.dom.ls.LSInput.setEncoding(java.lang.String)
org.w3c.dom.ls.LSOutput.setEncoding(java.lang.String)
org.xml.sax.ext.Locator2Impl.setEncoding(java.lang.String)
org.xml.sax.InputSource.setEncoding(java.lang.String)


Occurences of setEndRule

setEndRule occurences:
java.util.SimpleTimeZone.setEndRule(int, int, int)
java.util.SimpleTimeZone.setEndRule(int, int, int, int)
java.util.SimpleTimeZone.setEndRule(int, int, int, int, boolean)


Occurences of setEntityResolver

setEntityResolver occurences:
javax.xml.parsers.DocumentBuilder.setEntityResolver(org.xml.sax.EntityResolver)
org.xml.sax.helpers.ParserAdapter.setEntityResolver(org.xml.sax.EntityResolver)
org.xml.sax.helpers.XMLFilterImpl.setEntityResolver(org.xml.sax.EntityResolver)
org.xml.sax.helpers.XMLReaderAdapter.setEntityResolver(org.xml.sax.EntityResolver)
org.xml.sax.Parser.setEntityResolver(org.xml.sax.EntityResolver)
org.xml.sax.XMLReader.setEntityResolver(org.xml.sax.EntityResolver)


Occurences of setError

setError occurences:
java.io.PrintStream.setError()
java.io.PrintWriter.setError()


Occurences of setErrorHandler

setErrorHandler occurences:
javax.xml.parsers.DocumentBuilder.setErrorHandler(org.xml.sax.ErrorHandler)
javax.xml.validation.SchemaFactory.setErrorHandler(org.xml.sax.ErrorHandler)
javax.xml.validation.Validator.setErrorHandler(org.xml.sax.ErrorHandler)
javax.xml.validation.ValidatorHandler.setErrorHandler(org.xml.sax.ErrorHandler)
org.xml.sax.helpers.ParserAdapter.setErrorHandler(org.xml.sax.ErrorHandler)
org.xml.sax.helpers.XMLFilterImpl.setErrorHandler(org.xml.sax.ErrorHandler)
org.xml.sax.helpers.XMLReaderAdapter.setErrorHandler(org.xml.sax.ErrorHandler)
org.xml.sax.Parser.setErrorHandler(org.xml.sax.ErrorHandler)
org.xml.sax.XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)


Occurences of setErrorListener

setErrorListener occurences:
javax.xml.transform.Transformer.setErrorListener(javax.xml.transform.ErrorListener)
javax.xml.transform.TransformerFactory.setErrorListener(javax.xml.transform.ErrorListener)


Occurences of setErrorWriter

setErrorWriter occurences:
javax.script.ScriptContext.setErrorWriter(java.io.Writer)
javax.script.SimpleScriptContext.setErrorWriter(java.io.Writer)


Occurences of setEscapeProcessing

setEscapeProcessing occurences:
java.sql.Statement.setEscapeProcessing(boolean)
javax.sql.RowSet.setEscapeProcessing(boolean)
javax.sql.rowset.BaseRowSet.setEscapeProcessing(boolean)


Occurences of setEventHandler

setEventHandler occurences:
javax.xml.bind.Binder.setEventHandler(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.helpers.AbstractMarshallerImpl.setEventHandler(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setEventHandler(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.Marshaller.setEventHandler(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.Unmarshaller.setEventHandler(javax.xml.bind.ValidationEventHandler)
javax.xml.bind.Validator.setEventHandler(javax.xml.bind.ValidationEventHandler)


Occurences of setExceptionListener

setExceptionListener occurences:
java.beans.Encoder.setExceptionListener(java.beans.ExceptionListener)
java.beans.XMLDecoder.setExceptionListener(java.beans.ExceptionListener)


Occurences of setExecutable

setExecutable occurences:
java.io.File.setExecutable(boolean)
java.io.File.setExecutable(boolean, boolean)


Occurences of setExecutor

setExecutor occurences:
javax.xml.ws.Endpoint.setExecutor(java.util.concurrent.Executor)
javax.xml.ws.Service.setExecutor(java.util.concurrent.Executor)
javax.xml.ws.spi.ServiceDelegate.setExecutor(java.util.concurrent.Executor)


Occurences of setExpandedState

setExpandedState occurences:
javax.swing.JTree.setExpandedState(javax.swing.tree.TreePath, boolean)
javax.swing.tree.AbstractLayoutCache.setExpandedState(javax.swing.tree.TreePath, boolean)
javax.swing.tree.FixedHeightLayoutCache.setExpandedState(javax.swing.tree.TreePath, boolean)
javax.swing.tree.VariableHeightLayoutCache.setExpandedState(javax.swing.tree.TreePath, boolean)


Occurences of setExtent

setExtent occurences:
javax.swing.BoundedRangeModel.setExtent(int)
javax.swing.DefaultBoundedRangeModel.setExtent(int)
javax.swing.JSlider.setExtent(int)


Occurences of setFaultCode

setFaultCode occurences:
javax.xml.soap.SOAPFault.setFaultCode(java.lang.String)
javax.xml.soap.SOAPFault.setFaultCode(javax.xml.namespace.QName)
javax.xml.soap.SOAPFault.setFaultCode(javax.xml.soap.Name)


Occurences of setFaultString

setFaultString occurences:
javax.xml.soap.SOAPFault.setFaultString(java.lang.String)
javax.xml.soap.SOAPFault.setFaultString(java.lang.String, java.util.Locale)


Occurences of setFeature

setFeature occurences:
javax.xml.parsers.DocumentBuilderFactory.setFeature(java.lang.String, boolean)
javax.xml.parsers.SAXParserFactory.setFeature(java.lang.String, boolean)
javax.xml.transform.TransformerFactory.setFeature(java.lang.String, boolean)
javax.xml.validation.SchemaFactory.setFeature(java.lang.String, boolean)
javax.xml.validation.Validator.setFeature(java.lang.String, boolean)
javax.xml.validation.ValidatorHandler.setFeature(java.lang.String, boolean)
javax.xml.xpath.XPathFactory.setFeature(java.lang.String, boolean)
org.xml.sax.helpers.ParserAdapter.setFeature(java.lang.String, boolean)
org.xml.sax.helpers.XMLFilterImpl.setFeature(java.lang.String, boolean)
org.xml.sax.XMLReader.setFeature(java.lang.String, boolean)


Occurences of setFetchDirection

setFetchDirection occurences:
java.sql.ResultSet.setFetchDirection(int)
java.sql.Statement.setFetchDirection(int)
javax.sql.rowset.BaseRowSet.setFetchDirection(int)


Occurences of setFetchSize

setFetchSize occurences:
java.sql.ResultSet.setFetchSize(int)
java.sql.Statement.setFetchSize(int)
javax.sql.rowset.BaseRowSet.setFetchSize(int)


Occurences of setField

setField occurences:
javax.management.Descriptor.setField(java.lang.String, java.lang.Object)
javax.management.ImmutableDescriptor.setField(java.lang.String, java.lang.Object)
javax.management.modelmbean.DescriptorSupport.setField(java.lang.String, java.lang.Object)


Occurences of setFields

setFields occurences:
java.util.Calendar.Builder.setFields(int...)
javax.management.Descriptor.setFields(java.lang.String:A, java.lang.Object:A)
javax.management.ImmutableDescriptor.setFields(java.lang.String:A, java.lang.Object:A)
javax.management.modelmbean.DescriptorSupport.setFields(java.lang.String:A, java.lang.Object:A)


Occurences of setFileName

setFileName occurences:
java.awt.JobAttributes.setFileName(java.lang.String)
javax.swing.plaf.basic.BasicFileChooserUI.setFileName(java.lang.String)
javax.swing.plaf.metal.MetalFileChooserUI.setFileName(java.lang.String)


Occurences of setFilter

setFilter occurences:
java.util.logging.Handler.setFilter(java.util.logging.Filter)
java.util.logging.Logger.setFilter(java.util.logging.Filter)
javax.sql.rowset.FilteredRowSet.setFilter(javax.sql.rowset.Predicate)
org.w3c.dom.ls.LSParser.setFilter(org.w3c.dom.ls.LSParserFilter)
org.w3c.dom.ls.LSSerializer.setFilter(org.w3c.dom.ls.LSSerializerFilter)


Occurences of setFirstLineIndent

setFirstLineIndent occurences:
javax.swing.text.ParagraphView.setFirstLineIndent(float)
javax.swing.text.StyleConstants.setFirstLineIndent(javax.swing.text.MutableAttributeSet, float)


Occurences of setFixedLengthStreamingMode

setFixedLengthStreamingMode occurences:
java.net.HttpURLConnection.setFixedLengthStreamingMode(int)
java.net.HttpURLConnection.setFixedLengthStreamingMode(long)


Occurences of setFlags

setFlags occurences:
java.nio.file.attribute.AclEntry.Builder.setFlags(java.nio.file.attribute.AclEntryFlag...)
java.nio.file.attribute.AclEntry.Builder.setFlags(java.util.Set)


Occurences of setFloat

setFloat occurences:
java.lang.reflect.Array.setFloat(java.lang.Object, int, float)
java.lang.reflect.Field.setFloat(java.lang.Object, float)
java.sql.CallableStatement.setFloat(java.lang.String, float)
java.sql.PreparedStatement.setFloat(int, float)
javax.sql.RowSet.setFloat(int, float)
javax.sql.RowSet.setFloat(java.lang.String, float)
javax.sql.rowset.BaseRowSet.setFloat(int, float)
javax.sql.rowset.BaseRowSet.setFloat(java.lang.String, float)


Occurences of setFocusCycleRoot

setFocusCycleRoot occurences:
java.awt.Container.setFocusCycleRoot(boolean)
java.awt.Window.setFocusCycleRoot(boolean)
javax.swing.JInternalFrame.setFocusCycleRoot(boolean)


Occurences of setFocusTraversalKeys

setFocusTraversalKeys occurences:
java.awt.Component.setFocusTraversalKeys(int, java.util.Set)
java.awt.Container.setFocusTraversalKeys(int, java.util.Set)
javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set)


Occurences of setFont

setFont occurences:
java.awt.Component.setFont(java.awt.Font)
java.awt.Component.AccessibleAWTComponent.setFont(java.awt.Font)
java.awt.Container.setFont(java.awt.Font)
java.awt.Graphics.setFont(java.awt.Font)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setFont(java.awt.Font)
java.awt.MenuComponent.setFont(java.awt.Font)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setFont(java.awt.Font)
javax.accessibility.AccessibleComponent.setFont(java.awt.Font)
javax.swing.DebugGraphics.setFont(java.awt.Font)
javax.swing.JComponent.setFont(java.awt.Font)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setFont(java.awt.Font)
javax.swing.JSlider.setFont(java.awt.Font)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setFont(java.awt.Font)
javax.swing.JTextArea.setFont(java.awt.Font)
javax.swing.JTextField.setFont(java.awt.Font)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setFont(java.awt.Font)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setFont(java.awt.Font)
javax.swing.tree.DefaultTreeCellEditor.setFont(java.awt.Font)
javax.swing.tree.DefaultTreeCellRenderer.setFont(java.awt.Font)


Occurences of setForeground

setForeground occurences:
java.awt.Component.setForeground(java.awt.Color)
java.awt.Component.AccessibleAWTComponent.setForeground(java.awt.Color)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setForeground(java.awt.Color)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setForeground(java.awt.Color)
javax.accessibility.AccessibleComponent.setForeground(java.awt.Color)
javax.swing.JComponent.setForeground(java.awt.Color)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setForeground(java.awt.Color)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setForeground(java.awt.Color)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setForeground(java.awt.Color)
javax.swing.table.DefaultTableCellRenderer.setForeground(java.awt.Color)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(java.awt.Color)
javax.swing.text.StyleConstants.setForeground(javax.swing.text.MutableAttributeSet, java.awt.Color)


Occurences of setFormat

setFormat occurences:
java.text.MessageFormat.setFormat(int, java.text.Format)
javax.swing.text.DateFormatter.setFormat(java.text.DateFormat)
javax.swing.text.InternationalFormatter.setFormat(java.text.Format)
javax.swing.text.NumberFormatter.setFormat(java.text.Format)


Occurences of setFormatter

setFormatter occurences:
java.util.logging.Handler.setFormatter(java.util.logging.Formatter)
javax.swing.JFormattedTextField.setFormatter(javax.swing.JFormattedTextField.AbstractFormatter)


Occurences of setFrame

setFrame occurences:
java.awt.geom.Arc2D.setFrame(double, double, double, double)
java.awt.geom.Ellipse2D.Double.setFrame(double, double, double, double)
java.awt.geom.Ellipse2D.Float.setFrame(double, double, double, double)
java.awt.geom.Ellipse2D.Float.setFrame(float, float, float, float)
java.awt.geom.Rectangle2D.setFrame(double, double, double, double)
java.awt.geom.RectangularShape.setFrame(double, double, double, double)
java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D)
java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D)
java.awt.geom.RoundRectangle2D.setFrame(double, double, double, double)


Occurences of setFrameFromCenter

setFrameFromCenter occurences:
java.awt.geom.RectangularShape.setFrameFromCenter(double, double, double, double)
java.awt.geom.RectangularShape.setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of setFrameFromDiagonal

setFrameFromDiagonal occurences:
java.awt.geom.RectangularShape.setFrameFromDiagonal(double, double, double, double)
java.awt.geom.RectangularShape.setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D)


Occurences of setGlassPane

setGlassPane occurences:
javax.swing.JApplet.setGlassPane(java.awt.Component)
javax.swing.JDialog.setGlassPane(java.awt.Component)
javax.swing.JFrame.setGlassPane(java.awt.Component)
javax.swing.JInternalFrame.setGlassPane(java.awt.Component)
javax.swing.JLayer.setGlassPane(javax.swing.JPanel)
javax.swing.JRootPane.setGlassPane(java.awt.Component)
javax.swing.JWindow.setGlassPane(java.awt.Component)
javax.swing.RootPaneContainer.setGlassPane(java.awt.Component)


Occurences of setGranularityPeriod

setGranularityPeriod occurences:
javax.management.monitor.Monitor.setGranularityPeriod(long)
javax.management.monitor.MonitorMBean.setGranularityPeriod(long)


Occurences of setGroup

setGroup occurences:
java.nio.file.attribute.PosixFileAttributeView.setGroup(java.nio.file.attribute.GroupPrincipal)
javax.swing.ButtonModel.setGroup(javax.swing.ButtonGroup)
javax.swing.DefaultButtonModel.setGroup(javax.swing.ButtonGroup)


Occurences of setGroupingUsed

setGroupingUsed occurences:
java.text.DecimalFormat.setGroupingUsed(boolean)
java.text.NumberFormat.setGroupingUsed(boolean)


Occurences of setHandler

setHandler occurences:
javax.xml.transform.sax.SAXResult.setHandler(org.xml.sax.ContentHandler)
javax.xml.ws.spi.http.HttpContext.setHandler(javax.xml.ws.spi.http.HttpHandler)


Occurences of setHandlerResolver

setHandlerResolver occurences:
javax.xml.ws.Service.setHandlerResolver(javax.xml.ws.handler.HandlerResolver)
javax.xml.ws.spi.ServiceDelegate.setHandlerResolver(javax.xml.ws.handler.HandlerResolver)


Occurences of setHelpMenu

setHelpMenu occurences:
java.awt.MenuBar.setHelpMenu(java.awt.Menu)
javax.swing.JMenuBar.setHelpMenu(javax.swing.JMenu)


Occurences of setHgap

setHgap occurences:
java.awt.BorderLayout.setHgap(int)
java.awt.CardLayout.setHgap(int)
java.awt.FlowLayout.setHgap(int)
java.awt.GridLayout.setHgap(int)


Occurences of setHidden

setHidden occurences:
java.beans.FeatureDescriptor.setHidden(boolean)
java.nio.file.attribute.DosFileAttributeView.setHidden(boolean)


Occurences of setHints

setHints occurences:
java.awt.image.AreaAveragingScaleFilter.setHints(int)
java.awt.image.ImageConsumer.setHints(int)
java.awt.image.ImageFilter.setHints(int)
java.awt.image.PixelGrabber.setHints(int)


Occurences of setHonorsVisibility

setHonorsVisibility occurences:
javax.swing.GroupLayout.setHonorsVisibility(boolean)
javax.swing.GroupLayout.setHonorsVisibility(java.awt.Component, java.lang.Boolean)


Occurences of setHorizontalAlignment

setHorizontalAlignment occurences:
javax.swing.AbstractButton.setHorizontalAlignment(int)
javax.swing.JLabel.setHorizontalAlignment(int)
javax.swing.JTextField.setHorizontalAlignment(int)


Occurences of setHorizontalScrollBarPolicy

setHorizontalScrollBarPolicy occurences:
javax.swing.JScrollPane.setHorizontalScrollBarPolicy(int)
javax.swing.ScrollPaneLayout.setHorizontalScrollBarPolicy(int)


Occurences of setHorizontalTextPosition

setHorizontalTextPosition occurences:
javax.swing.AbstractButton.setHorizontalTextPosition(int)
javax.swing.JLabel.setHorizontalTextPosition(int)


Occurences of setHostnameVerifier

setHostnameVerifier occurences:
javax.naming.ldap.StartTlsResponse.setHostnameVerifier(javax.net.ssl.HostnameVerifier)
javax.net.ssl.HttpsURLConnection.setHostnameVerifier(javax.net.ssl.HostnameVerifier)


Occurences of setHours

setHours occurences:
java.sql.Date.setHours(int)
java.util.Date.setHours(int)


Occurences of setHumanPresentableName

setHumanPresentableName occurences:
java.awt.datatransfer.DataFlavor.setHumanPresentableName(java.lang.String)
javax.activation.ActivationDataFlavor.setHumanPresentableName(java.lang.String)


Occurences of setIcon

setIcon occurences:
javax.swing.AbstractButton.setIcon(javax.swing.Icon)
javax.swing.JInternalFrame.setIcon(boolean)
javax.swing.JLabel.setIcon(javax.swing.Icon)
javax.swing.JOptionPane.setIcon(javax.swing.Icon)
javax.swing.text.StyleConstants.setIcon(javax.swing.text.MutableAttributeSet, javax.swing.Icon)


Occurences of setIconImage

setIconImage occurences:
java.awt.Frame.setIconImage(java.awt.Image)
java.awt.Window.setIconImage(java.awt.Image)
javax.swing.JFrame.setIconImage(java.awt.Image)


Occurences of setIconTextGap

setIconTextGap occurences:
javax.swing.AbstractButton.setIconTextGap(int)
javax.swing.JLabel.setIconTextGap(int)


Occurences of setIdAttribute

setIdAttribute occurences:
javax.imageio.metadata.IIOMetadataNode.setIdAttribute(java.lang.String, boolean)
org.w3c.dom.Element.setIdAttribute(java.lang.String, boolean)


Occurences of setIdAttributeNode

setIdAttributeNode occurences:
javax.imageio.metadata.IIOMetadataNode.setIdAttributeNode(org.w3c.dom.Attr, boolean)
org.w3c.dom.Element.setIdAttributeNode(org.w3c.dom.Attr, boolean)


Occurences of setIdAttributeNS

setIdAttributeNS occurences:
javax.imageio.metadata.IIOMetadataNode.setIdAttributeNS(java.lang.String, java.lang.String, boolean)
javax.xml.crypto.dom.DOMCryptoContext.setIdAttributeNS(org.w3c.dom.Element, java.lang.String, java.lang.String)
org.w3c.dom.Element.setIdAttributeNS(java.lang.String, java.lang.String, boolean)


Occurences of setImage

setImage occurences:
java.awt.TrayIcon.setImage(java.awt.Image)
javax.swing.ImageIcon.setImage(java.awt.Image)


Occurences of setImplicitDownCycleTraversal

setImplicitDownCycleTraversal occurences:
java.awt.ContainerOrderFocusTraversalPolicy.setImplicitDownCycleTraversal(boolean)
javax.swing.SortingFocusTraversalPolicy.setImplicitDownCycleTraversal(boolean)


Occurences of setIndex

setIndex occurences:
java.text.CharacterIterator.setIndex(int)
java.text.ParsePosition.setIndex(int)
java.text.StringCharacterIterator.setIndex(int)
javax.swing.text.Segment.setIndex(int)


Occurences of setInitialDelay

setInitialDelay occurences:
javax.swing.Timer.setInitialDelay(int)
javax.swing.ToolTipManager.setInitialDelay(int)


Occurences of setInitThreshold

setInitThreshold occurences:
javax.management.monitor.CounterMonitor.setInitThreshold(java.lang.Number)
javax.management.monitor.CounterMonitorMBean.setInitThreshold(java.lang.Number)


Occurences of setInput

setInput occurences:
java.util.zip.Deflater.setInput(byte:A)
java.util.zip.Deflater.setInput(byte:A, int, int)
java.util.zip.Inflater.setInput(byte:A)
java.util.zip.Inflater.setInput(byte:A, int, int)
javax.imageio.ImageReader.setInput(java.lang.Object)
javax.imageio.ImageReader.setInput(java.lang.Object, boolean)
javax.imageio.ImageReader.setInput(java.lang.Object, boolean, boolean)


Occurences of setInstant

setInstant occurences:
java.util.Calendar.Builder.setInstant(java.util.Date)
java.util.Calendar.Builder.setInstant(long)


Occurences of setInt

setInt occurences:
java.lang.reflect.Array.setInt(java.lang.Object, int, int)
java.lang.reflect.Field.setInt(java.lang.Object, int)
java.sql.CallableStatement.setInt(java.lang.String, int)
java.sql.PreparedStatement.setInt(int, int)
javax.sql.RowSet.setInt(int, int)
javax.sql.RowSet.setInt(java.lang.String, int)
javax.sql.rowset.BaseRowSet.setInt(int, int)
javax.sql.rowset.BaseRowSet.setInt(java.lang.String, int)


Occurences of setIssuer

setIssuer occurences:
java.security.cert.X509CertSelector.setIssuer(byte:A)
java.security.cert.X509CertSelector.setIssuer(java.lang.String)
java.security.cert.X509CertSelector.setIssuer(javax.security.auth.x500.X500Principal)


Occurences of setItem

setItem occurences:
javax.swing.ComboBoxEditor.setItem(java.lang.Object)
javax.swing.plaf.basic.BasicComboBoxEditor.setItem(java.lang.Object)


Occurences of setJMenuBar

setJMenuBar occurences:
javax.swing.JApplet.setJMenuBar(javax.swing.JMenuBar)
javax.swing.JDialog.setJMenuBar(javax.swing.JMenuBar)
javax.swing.JFrame.setJMenuBar(javax.swing.JMenuBar)
javax.swing.JInternalFrame.setJMenuBar(javax.swing.JMenuBar)
javax.swing.JRootPane.setJMenuBar(javax.swing.JMenuBar)


Occurences of setKeyEntry

setKeyEntry occurences:
java.security.KeyStore.setKeyEntry(java.lang.String, byte:A, java.security.cert.Certificate:A)
java.security.KeyStore.setKeyEntry(java.lang.String, java.security.Key, char:A, java.security.cert.Certificate:A)


Occurences of setKeySelector

setKeySelector occurences:
javax.xml.crypto.dom.DOMCryptoContext.setKeySelector(javax.xml.crypto.KeySelector)
javax.xml.crypto.XMLCryptoContext.setKeySelector(javax.xml.crypto.KeySelector)


Occurences of setLabel

setLabel occurences:
java.awt.Button.setLabel(java.lang.String)
java.awt.Checkbox.setLabel(java.lang.String)
java.awt.MenuItem.setLabel(java.lang.String)
javax.swing.AbstractButton.setLabel(java.lang.String)
javax.swing.JPopupMenu.setLabel(java.lang.String)
javax.swing.text.html.Option.setLabel(java.lang.String)


Occurences of setLargeModel

setLargeModel occurences:
javax.swing.JTree.setLargeModel(boolean)
javax.swing.plaf.basic.BasicTreeUI.setLargeModel(boolean)


Occurences of setLastModifiedTime

setLastModifiedTime occurences:
java.nio.file.Files.setLastModifiedTime(java.nio.file.Path, java.nio.file.attribute.FileTime)
java.util.zip.ZipEntry.setLastModifiedTime(java.nio.file.attribute.FileTime)


Occurences of setLayer

setLayer occurences:
javax.swing.JInternalFrame.setLayer(int)
javax.swing.JInternalFrame.setLayer(java.lang.Integer)
javax.swing.JLayeredPane.setLayer(java.awt.Component, int)
javax.swing.JLayeredPane.setLayer(java.awt.Component, int, int)


Occurences of setLayeredPane

setLayeredPane occurences:
javax.swing.JApplet.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.JDialog.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.JFrame.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.JInternalFrame.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.JRootPane.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.JWindow.setLayeredPane(javax.swing.JLayeredPane)
javax.swing.RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)


Occurences of setLayout

setLayout occurences:
java.awt.Container.setLayout(java.awt.LayoutManager)
java.awt.ScrollPane.setLayout(java.awt.LayoutManager)
javax.swing.AbstractButton.setLayout(java.awt.LayoutManager)
javax.swing.Box.setLayout(java.awt.LayoutManager)
javax.swing.JApplet.setLayout(java.awt.LayoutManager)
javax.swing.JDialog.setLayout(java.awt.LayoutManager)
javax.swing.JFrame.setLayout(java.awt.LayoutManager)
javax.swing.JInternalFrame.setLayout(java.awt.LayoutManager)
javax.swing.JLayer.setLayout(java.awt.LayoutManager)
javax.swing.JScrollPane.setLayout(java.awt.LayoutManager)
javax.swing.JToolBar.setLayout(java.awt.LayoutManager)
javax.swing.JWindow.setLayout(java.awt.LayoutManager)


Occurences of setLeadSelectionIndex

setLeadSelectionIndex occurences:
javax.swing.DefaultListSelectionModel.setLeadSelectionIndex(int)
javax.swing.ListSelectionModel.setLeadSelectionIndex(int)


Occurences of setLength

setLength occurences:
java.io.RandomAccessFile.setLength(long)
java.lang.StringBuffer.setLength(int)
java.lang.StringBuilder.setLength(int)
java.net.DatagramPacket.setLength(int)
javax.imageio.stream.IIOByteBuffer.setLength(int)


Occurences of setLenient

setLenient occurences:
java.text.DateFormat.setLenient(boolean)
java.util.Calendar.setLenient(boolean)
java.util.Calendar.Builder.setLenient(boolean)


Occurences of setLevel

setLevel occurences:
java.util.logging.Handler.setLevel(java.util.logging.Level)
java.util.logging.Logger.setLevel(java.util.logging.Level)
java.util.logging.LogRecord.setLevel(java.util.logging.Level)
java.util.zip.Deflater.setLevel(int)
java.util.zip.ZipOutputStream.setLevel(int)


Occurences of setLibraryDirectory

setLibraryDirectory occurences:
javax.management.loading.MLet.setLibraryDirectory(java.lang.String)
javax.management.loading.MLetMBean.setLibraryDirectory(java.lang.String)


Occurences of setLightWeightPopupEnabled

setLightWeightPopupEnabled occurences:
javax.swing.JComboBox.setLightWeightPopupEnabled(boolean)
javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean)
javax.swing.ToolTipManager.setLightWeightPopupEnabled(boolean)


Occurences of setLine

setLine occurences:
java.awt.geom.Line2D.setLine(double, double, double, double)
java.awt.geom.Line2D.setLine(java.awt.geom.Line2D)
java.awt.geom.Line2D.setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.Line2D.Double.setLine(double, double, double, double)
java.awt.geom.Line2D.Float.setLine(double, double, double, double)
java.awt.geom.Line2D.Float.setLine(float, float, float, float)


Occurences of setLineNumber

setLineNumber occurences:
java.io.LineNumberInputStream.setLineNumber(int)
java.io.LineNumberReader.setLineNumber(int)
javax.xml.bind.helpers.ValidationEventLocatorImpl.setLineNumber(int)
org.xml.sax.helpers.LocatorImpl.setLineNumber(int)


Occurences of setLineSpacing

setLineSpacing occurences:
javax.swing.text.ParagraphView.setLineSpacing(float)
javax.swing.text.StyleConstants.setLineSpacing(javax.swing.text.MutableAttributeSet, float)


Occurences of setLinkedException

setLinkedException occurences:
javax.xml.bind.helpers.ValidationEventImpl.setLinkedException(java.lang.Throwable)
javax.xml.bind.JAXBException.setLinkedException(java.lang.Throwable)
javax.xml.bind.TypeConstraintException.setLinkedException(java.lang.Throwable)


Occurences of setListData

setListData occurences:
javax.swing.JList.setListData(E:A)
javax.swing.JList.setListData(java.lang.Object:A)
javax.swing.JList.setListData(java.util.Vector)


Occurences of setListener

setListener occurences:
javax.xml.bind.helpers.AbstractMarshallerImpl.setListener(javax.xml.bind.Marshaller.Listener)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setListener(javax.xml.bind.Unmarshaller.Listener)
javax.xml.bind.Marshaller.setListener(javax.xml.bind.Marshaller.Listener)
javax.xml.bind.Unmarshaller.setListener(javax.xml.bind.Unmarshaller.Listener)


Occurences of setLocale

setLocale occurences:
java.awt.Component.setLocale(java.util.Locale)
java.awt.im.spi.InputMethod.setLocale(java.util.Locale)
java.beans.beancontext.BeanContextSupport.setLocale(java.util.Locale)
java.text.MessageFormat.setLocale(java.util.Locale)
java.util.Calendar.Builder.setLocale(java.util.Locale)
java.util.Locale.Builder.setLocale(java.util.Locale)
javax.imageio.ImageReader.setLocale(java.util.Locale)
javax.imageio.ImageWriter.setLocale(java.util.Locale)
javax.security.auth.callback.LanguageCallback.setLocale(java.util.Locale)
javax.tools.DocumentationTool.DocumentationTask.setLocale(java.util.Locale)
javax.tools.JavaCompiler.CompilationTask.setLocale(java.util.Locale)
org.xml.sax.helpers.XMLReaderAdapter.setLocale(java.util.Locale)
org.xml.sax.Parser.setLocale(java.util.Locale)


Occurences of setLocation

setLocation occurences:
java.awt.Component.setLocation(int, int)
java.awt.Component.setLocation(java.awt.Point)
java.awt.Component.AccessibleAWTComponent.setLocation(java.awt.Point)
java.awt.geom.Point2D.setLocation(double, double)
java.awt.geom.Point2D.setLocation(java.awt.geom.Point2D)
java.awt.geom.Point2D.Double.setLocation(double, double)
java.awt.geom.Point2D.Float.setLocation(double, double)
java.awt.geom.Point2D.Float.setLocation(float, float)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setLocation(java.awt.Point)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setLocation(java.awt.Point)
java.awt.Point.setLocation(double, double)
java.awt.Point.setLocation(int, int)
java.awt.Point.setLocation(java.awt.Point)
java.awt.Rectangle.setLocation(int, int)
java.awt.Rectangle.setLocation(java.awt.Point)
java.awt.Window.setLocation(int, int)
java.awt.Window.setLocation(java.awt.Point)
javax.accessibility.AccessibleComponent.setLocation(java.awt.Point)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setLocation(java.awt.Point)
javax.swing.JPopupMenu.setLocation(int, int)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setLocation(java.awt.Point)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setLocation(java.awt.Point)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setLocation(java.awt.Point)
javax.tools.StandardJavaFileManager.setLocation(javax.tools.JavaFileManager.Location, java.lang.Iterable)
javax.xml.stream.XMLEventFactory.setLocation(javax.xml.stream.Location)


Occurences of setLocator

setLocator occurences:
javax.xml.bind.helpers.ValidationEventImpl.setLocator(javax.xml.bind.ValidationEventLocator)
javax.xml.transform.TransformerException.setLocator(javax.xml.transform.SourceLocator)


Occurences of setLogger

setLogger occurences:
javax.sql.rowset.spi.SyncFactory.setLogger(java.util.logging.Logger)
javax.sql.rowset.spi.SyncFactory.setLogger(java.util.logging.Logger, java.util.logging.Level)


Occurences of setLoggerLevel

setLoggerLevel occurences:
java.lang.management.PlatformLoggingMXBean.setLoggerLevel(java.lang.String, java.lang.String)
java.util.logging.LoggingMXBean.setLoggerLevel(java.lang.String, java.lang.String)


Occurences of setLogicalStyle

setLogicalStyle occurences:
javax.swing.JTextPane.setLogicalStyle(javax.swing.text.Style)
javax.swing.text.DefaultStyledDocument.setLogicalStyle(int, javax.swing.text.Style)
javax.swing.text.StyledDocument.setLogicalStyle(int, javax.swing.text.Style)


Occurences of setLoginTimeout

setLoginTimeout occurences:
java.sql.DriverManager.setLoginTimeout(int)
javax.sql.CommonDataSource.setLoginTimeout(int)


Occurences of setLogStream

setLogStream occurences:
java.sql.DriverManager.setLogStream(java.io.PrintStream)
javax.swing.DebugGraphics.setLogStream(java.io.PrintStream)


Occurences of setLogWriter

setLogWriter occurences:
java.sql.DriverManager.setLogWriter(java.io.PrintWriter)
javax.sql.CommonDataSource.setLogWriter(java.io.PrintWriter)


Occurences of setLong

setLong occurences:
java.lang.reflect.Array.setLong(java.lang.Object, int, long)
java.lang.reflect.Field.setLong(java.lang.Object, long)
java.sql.CallableStatement.setLong(java.lang.String, long)
java.sql.PreparedStatement.setLong(int, long)
javax.sql.RowSet.setLong(int, long)
javax.sql.RowSet.setLong(java.lang.String, long)
javax.sql.rowset.BaseRowSet.setLong(int, long)
javax.sql.rowset.BaseRowSet.setLong(java.lang.String, long)


Occurences of setLookAndFeel

setLookAndFeel occurences:
javax.swing.UIManager.setLookAndFeel(java.lang.String)
javax.swing.UIManager.setLookAndFeel(javax.swing.LookAndFeel)


Occurences of setMagicCaretPosition

setMagicCaretPosition occurences:
javax.swing.text.Caret.setMagicCaretPosition(java.awt.Point)
javax.swing.text.DefaultCaret.setMagicCaretPosition(java.awt.Point)


Occurences of setManagedResource

setManagedResource occurences:
javax.management.modelmbean.ModelMBean.setManagedResource(java.lang.Object, java.lang.String)
javax.management.modelmbean.RequiredModelMBean.setManagedResource(java.lang.Object, java.lang.String)


Occurences of setMargin

setMargin occurences:
javax.swing.AbstractButton.setMargin(java.awt.Insets)
javax.swing.JMenuBar.setMargin(java.awt.Insets)
javax.swing.JToolBar.setMargin(java.awt.Insets)
javax.swing.text.JTextComponent.setMargin(java.awt.Insets)


Occurences of setMatchColumn

setMatchColumn occurences:
javax.sql.rowset.Joinable.setMatchColumn(int)
javax.sql.rowset.Joinable.setMatchColumn(int:A)
javax.sql.rowset.Joinable.setMatchColumn(java.lang.String)
javax.sql.rowset.Joinable.setMatchColumn(java.lang.String:A)


Occurences of setMaxFieldSize

setMaxFieldSize occurences:
java.sql.Statement.setMaxFieldSize(int)
javax.sql.RowSet.setMaxFieldSize(int)
javax.sql.rowset.BaseRowSet.setMaxFieldSize(int)


Occurences of setMaximum

setMaximum occurences:
java.awt.Adjustable.setMaximum(int)
java.awt.Scrollbar.setMaximum(int)
java.awt.ScrollPaneAdjustable.setMaximum(int)
javax.swing.BoundedRangeModel.setMaximum(int)
javax.swing.DefaultBoundedRangeModel.setMaximum(int)
javax.swing.JInternalFrame.setMaximum(boolean)
javax.swing.JProgressBar.setMaximum(int)
javax.swing.JScrollBar.setMaximum(int)
javax.swing.JSlider.setMaximum(int)
javax.swing.ProgressMonitor.setMaximum(int)
javax.swing.SpinnerNumberModel.setMaximum(java.lang.Comparable)
javax.swing.text.InternationalFormatter.setMaximum(java.lang.Comparable)


Occurences of setMaximumFractionDigits

setMaximumFractionDigits occurences:
java.text.DecimalFormat.setMaximumFractionDigits(int)
java.text.NumberFormat.setMaximumFractionDigits(int)


Occurences of setMaximumIntegerDigits

setMaximumIntegerDigits occurences:
java.text.DecimalFormat.setMaximumIntegerDigits(int)
java.text.NumberFormat.setMaximumIntegerDigits(int)


Occurences of setMaximumSize

setMaximumSize occurences:
java.awt.Component.setMaximumSize(java.awt.Dimension)
javax.swing.JComponent.setMaximumSize(java.awt.Dimension)


Occurences of setMaxRows

setMaxRows occurences:
java.sql.Statement.setMaxRows(int)
javax.sql.RowSet.setMaxRows(int)
javax.sql.rowset.BaseRowSet.setMaxRows(int)


Occurences of setMBeanDescriptor

setMBeanDescriptor occurences:
javax.management.modelmbean.ModelMBeanInfo.setMBeanDescriptor(javax.management.Descriptor)
javax.management.modelmbean.ModelMBeanInfoSupport.setMBeanDescriptor(javax.management.Descriptor)


Occurences of setMBeanServer

setMBeanServer occurences:
javax.management.AttributeValueExp.setMBeanServer(javax.management.MBeanServer)
javax.management.ObjectName.setMBeanServer(javax.management.MBeanServer)
javax.management.QueryEval.setMBeanServer(javax.management.MBeanServer)
javax.management.QueryExp.setMBeanServer(javax.management.MBeanServer)
javax.management.remote.MBeanServerForwarder.setMBeanServer(javax.management.MBeanServer)
javax.management.remote.rmi.RMIServerImpl.setMBeanServer(javax.management.MBeanServer)
javax.management.StringValueExp.setMBeanServer(javax.management.MBeanServer)
javax.management.ValueExp.setMBeanServer(javax.management.MBeanServer)


Occurences of setMBeanServerForwarder

setMBeanServerForwarder occurences:
javax.management.remote.JMXConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder)
javax.management.remote.JMXConnectorServerMBean.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder)
javax.management.remote.rmi.RMIConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder)


Occurences of setMenuBar

setMenuBar occurences:
java.awt.Frame.setMenuBar(java.awt.MenuBar)
javax.swing.JInternalFrame.setMenuBar(javax.swing.JMenuBar)
javax.swing.JRootPane.setMenuBar(javax.swing.JMenuBar)


Occurences of setMessage

setMessage occurences:
java.util.logging.LogRecord.setMessage(java.lang.String)
javax.sound.midi.MetaMessage.setMessage(int, byte:A, int)
javax.sound.midi.MidiMessage.setMessage(byte:A, int)
javax.sound.midi.ShortMessage.setMessage(int)
javax.sound.midi.ShortMessage.setMessage(int, int, int)
javax.sound.midi.ShortMessage.setMessage(int, int, int, int)
javax.sound.midi.SysexMessage.setMessage(byte:A, int)
javax.sound.midi.SysexMessage.setMessage(int, byte:A, int)
javax.swing.JOptionPane.setMessage(java.lang.Object)
javax.xml.bind.helpers.ValidationEventImpl.setMessage(java.lang.String)
javax.xml.ws.handler.soap.SOAPMessageContext.setMessage(javax.xml.soap.SOAPMessage)


Occurences of setMessageDigest

setMessageDigest occurences:
java.security.DigestInputStream.setMessageDigest(java.security.MessageDigest)
java.security.DigestOutputStream.setMessageDigest(java.security.MessageDigest)


Occurences of setMetadata

setMetadata occurences:
javax.imageio.IIOImage.setMetadata(javax.imageio.metadata.IIOMetadata)
javax.xml.ws.Endpoint.setMetadata(java.util.List)


Occurences of setMetaData

setMetaData occurences:
javax.sql.rowset.CachedRowSet.setMetaData(javax.sql.RowSetMetaData)
javax.sql.RowSetInternal.setMetaData(javax.sql.RowSetMetaData)


Occurences of setMethod

setMethod occurences:
java.util.zip.ZipEntry.setMethod(int)
java.util.zip.ZipOutputStream.setMethod(int)


Occurences of setMicrosecondPosition

setMicrosecondPosition occurences:
javax.sound.midi.Sequencer.setMicrosecondPosition(long)
javax.sound.sampled.Clip.setMicrosecondPosition(long)


Occurences of setMimeHeader

setMimeHeader occurences:
javax.xml.soap.AttachmentPart.setMimeHeader(java.lang.String, java.lang.String)
javax.xml.soap.SOAPPart.setMimeHeader(java.lang.String, java.lang.String)


Occurences of setMinimum

setMinimum occurences:
java.awt.Adjustable.setMinimum(int)
java.awt.Scrollbar.setMinimum(int)
java.awt.ScrollPaneAdjustable.setMinimum(int)
javax.swing.BoundedRangeModel.setMinimum(int)
javax.swing.DefaultBoundedRangeModel.setMinimum(int)
javax.swing.JProgressBar.setMinimum(int)
javax.swing.JScrollBar.setMinimum(int)
javax.swing.JSlider.setMinimum(int)
javax.swing.ProgressMonitor.setMinimum(int)
javax.swing.SpinnerNumberModel.setMinimum(java.lang.Comparable)
javax.swing.text.InternationalFormatter.setMinimum(java.lang.Comparable)


Occurences of setMinimumFractionDigits

setMinimumFractionDigits occurences:
java.text.DecimalFormat.setMinimumFractionDigits(int)
java.text.NumberFormat.setMinimumFractionDigits(int)


Occurences of setMinimumIntegerDigits

setMinimumIntegerDigits occurences:
java.text.DecimalFormat.setMinimumIntegerDigits(int)
java.text.NumberFormat.setMinimumIntegerDigits(int)


Occurences of setMinimumSize

setMinimumSize occurences:
java.awt.Component.setMinimumSize(java.awt.Dimension)
java.awt.Window.setMinimumSize(java.awt.Dimension)
javax.swing.JComponent.setMinimumSize(java.awt.Dimension)


Occurences of setMinutes

setMinutes occurences:
java.sql.Date.setMinutes(int)
java.util.Date.setMinutes(int)


Occurences of setMnemonic

setMnemonic occurences:
javax.swing.AbstractButton.setMnemonic(char)
javax.swing.AbstractButton.setMnemonic(int)
javax.swing.ButtonModel.setMnemonic(int)
javax.swing.DefaultButtonModel.setMnemonic(int)


Occurences of setModel

setModel occurences:
javax.swing.AbstractButton.setModel(javax.swing.ButtonModel)
javax.swing.JComboBox.setModel(javax.swing.ComboBoxModel)
javax.swing.JList.setModel(javax.swing.ListModel)
javax.swing.JMenu.setModel(javax.swing.ButtonModel)
javax.swing.JMenuItem.setModel(javax.swing.ButtonModel)
javax.swing.JProgressBar.setModel(javax.swing.BoundedRangeModel)
javax.swing.JScrollBar.setModel(javax.swing.BoundedRangeModel)
javax.swing.JSlider.setModel(javax.swing.BoundedRangeModel)
javax.swing.JSpinner.setModel(javax.swing.SpinnerModel)
javax.swing.JTabbedPane.setModel(javax.swing.SingleSelectionModel)
javax.swing.JTable.setModel(javax.swing.table.TableModel)
javax.swing.JTree.setModel(javax.swing.tree.TreeModel)
javax.swing.plaf.basic.BasicTreeUI.setModel(javax.swing.tree.TreeModel)
javax.swing.table.TableRowSorter.setModel(javax.swing.table.TableModel)
javax.swing.table.TableRowSorter.setModel(M)
javax.swing.tree.AbstractLayoutCache.setModel(javax.swing.tree.TreeModel)
javax.swing.tree.FixedHeightLayoutCache.setModel(javax.swing.tree.TreeModel)
javax.swing.tree.VariableHeightLayoutCache.setModel(javax.swing.tree.TreeModel)


Occurences of setModelMBeanInfo

setModelMBeanInfo occurences:
javax.management.modelmbean.ModelMBean.setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)
javax.management.modelmbean.RequiredModelMBean.setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)


Occurences of setModulus

setModulus occurences:
javax.management.monitor.CounterMonitor.setModulus(java.lang.Number)
javax.management.monitor.CounterMonitorMBean.setModulus(java.lang.Number)


Occurences of setMonth

setMonth occurences:
java.sql.Time.setMonth(int)
java.util.Date.setMonth(int)
javax.xml.datatype.XMLGregorianCalendar.setMonth(int)


Occurences of setMultipleMode

setMultipleMode occurences:
java.awt.FileDialog.setMultipleMode(boolean)
java.awt.List.setMultipleMode(boolean)


Occurences of setName

setName occurences:
java.awt.Component.setName(java.lang.String)
java.awt.MenuComponent.setName(java.lang.String)
java.beans.FeatureDescriptor.setName(java.lang.String)
java.lang.Thread.setName(java.lang.String)
java.security.acl.Acl.setName(java.security.Principal, java.lang.String)
javax.naming.NameClassPair.setName(java.lang.String)
javax.security.auth.callback.NameCallback.setName(java.lang.String)
javax.swing.text.StyleContext.NamedStyle.setName(java.lang.String)


Occurences of setNamespaceAware

setNamespaceAware occurences:
javax.xml.parsers.DocumentBuilderFactory.setNamespaceAware(boolean)
javax.xml.parsers.SAXParserFactory.setNamespaceAware(boolean)


Occurences of setNamespaceContext

setNamespaceContext occurences:
javax.xml.stream.XMLEventWriter.setNamespaceContext(javax.xml.namespace.NamespaceContext)
javax.xml.stream.XMLStreamWriter.setNamespaceContext(javax.xml.namespace.NamespaceContext)
javax.xml.xpath.XPath.setNamespaceContext(javax.xml.namespace.NamespaceContext)


Occurences of setNCharacterStream

setNCharacterStream occurences:
java.sql.CallableStatement.setNCharacterStream(java.lang.String, java.io.Reader)
java.sql.CallableStatement.setNCharacterStream(java.lang.String, java.io.Reader, long)
java.sql.PreparedStatement.setNCharacterStream(int, java.io.Reader)
java.sql.PreparedStatement.setNCharacterStream(int, java.io.Reader, long)
javax.sql.RowSet.setNCharacterStream(int, java.io.Reader)
javax.sql.RowSet.setNCharacterStream(int, java.io.Reader, long)
javax.sql.RowSet.setNCharacterStream(java.lang.String, java.io.Reader)
javax.sql.RowSet.setNCharacterStream(java.lang.String, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setNCharacterStream(int, java.io.Reader)
javax.sql.rowset.BaseRowSet.setNCharacterStream(int, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setNCharacterStream(java.lang.String, java.io.Reader)
javax.sql.rowset.BaseRowSet.setNCharacterStream(java.lang.String, java.io.Reader, long)


Occurences of setNClob

setNClob occurences:
java.sql.CallableStatement.setNClob(java.lang.String, java.io.Reader)
java.sql.CallableStatement.setNClob(java.lang.String, java.io.Reader, long)
java.sql.CallableStatement.setNClob(java.lang.String, java.sql.NClob)
java.sql.PreparedStatement.setNClob(int, java.io.Reader)
java.sql.PreparedStatement.setNClob(int, java.io.Reader, long)
java.sql.PreparedStatement.setNClob(int, java.sql.NClob)
javax.sql.RowSet.setNClob(int, java.io.Reader)
javax.sql.RowSet.setNClob(int, java.io.Reader, long)
javax.sql.RowSet.setNClob(int, java.sql.NClob)
javax.sql.RowSet.setNClob(java.lang.String, java.io.Reader)
javax.sql.RowSet.setNClob(java.lang.String, java.io.Reader, long)
javax.sql.RowSet.setNClob(java.lang.String, java.sql.NClob)
javax.sql.rowset.BaseRowSet.setNClob(int, java.io.Reader)
javax.sql.rowset.BaseRowSet.setNClob(int, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setNClob(int, java.sql.NClob)
javax.sql.rowset.BaseRowSet.setNClob(java.lang.String, java.io.Reader)
javax.sql.rowset.BaseRowSet.setNClob(java.lang.String, java.io.Reader, long)
javax.sql.rowset.BaseRowSet.setNClob(java.lang.String, java.sql.NClob)


Occurences of setNeedClientAuth

setNeedClientAuth occurences:
javax.net.ssl.SSLEngine.setNeedClientAuth(boolean)
javax.net.ssl.SSLParameters.setNeedClientAuth(boolean)
javax.net.ssl.SSLServerSocket.setNeedClientAuth(boolean)
javax.net.ssl.SSLSocket.setNeedClientAuth(boolean)


Occurences of setNextSibling

setNextSibling occurences:
javax.xml.crypto.dsig.dom.DOMSignContext.setNextSibling(org.w3c.dom.Node)
javax.xml.transform.dom.DOMResult.setNextSibling(org.w3c.dom.Node)


Occurences of setNextWarning

setNextWarning occurences:
java.sql.SQLWarning.setNextWarning(java.sql.SQLWarning)
javax.sql.rowset.RowSetWarning.setNextWarning(javax.sql.rowset.RowSetWarning)


Occurences of setNode

setNode occurences:
javax.xml.bind.helpers.ValidationEventLocatorImpl.setNode(org.w3c.dom.Node)
javax.xml.crypto.dsig.dom.DOMValidateContext.setNode(org.w3c.dom.Node)
javax.xml.transform.dom.DOMResult.setNode(org.w3c.dom.Node)
javax.xml.transform.dom.DOMSource.setNode(org.w3c.dom.Node)


Occurences of setNodeDimensions

setNodeDimensions occurences:
javax.swing.tree.AbstractLayoutCache.setNodeDimensions(javax.swing.tree.AbstractLayoutCache.NodeDimensions)
javax.swing.tree.VariableHeightLayoutCache.setNodeDimensions(javax.swing.tree.AbstractLayoutCache.NodeDimensions)


Occurences of setNodeValue

setNodeValue occurences:
javax.imageio.metadata.IIOMetadataNode.setNodeValue(java.lang.String)
org.w3c.dom.Node.setNodeValue(java.lang.String)


Occurences of setNonContinuousLayoutDivider

setNonContinuousLayoutDivider occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.setNonContinuousLayoutDivider(java.awt.Component)
javax.swing.plaf.basic.BasicSplitPaneUI.setNonContinuousLayoutDivider(java.awt.Component, boolean)


Occurences of setNotify

setNotify occurences:
javax.management.monitor.CounterMonitor.setNotify(boolean)
javax.management.monitor.CounterMonitorMBean.setNotify(boolean)


Occurences of setNotifyDiffer

setNotifyDiffer occurences:
javax.management.monitor.StringMonitor.setNotifyDiffer(boolean)
javax.management.monitor.StringMonitorMBean.setNotifyDiffer(boolean)


Occurences of setNotifyHigh

setNotifyHigh occurences:
javax.management.monitor.GaugeMonitor.setNotifyHigh(boolean)
javax.management.monitor.GaugeMonitorMBean.setNotifyHigh(boolean)


Occurences of setNotifyLow

setNotifyLow occurences:
javax.management.monitor.GaugeMonitor.setNotifyLow(boolean)
javax.management.monitor.GaugeMonitorMBean.setNotifyLow(boolean)


Occurences of setNotifyMatch

setNotifyMatch occurences:
javax.management.monitor.StringMonitor.setNotifyMatch(boolean)
javax.management.monitor.StringMonitorMBean.setNotifyMatch(boolean)


Occurences of setNString

setNString occurences:
java.sql.CallableStatement.setNString(java.lang.String, java.lang.String)
java.sql.PreparedStatement.setNString(int, java.lang.String)
javax.sql.RowSet.setNString(int, java.lang.String)
javax.sql.RowSet.setNString(java.lang.String, java.lang.String)
javax.sql.rowset.BaseRowSet.setNString(int, java.lang.String)
javax.sql.rowset.BaseRowSet.setNString(java.lang.String, java.lang.String)


Occurences of setNull

setNull occurences:
java.sql.CallableStatement.setNull(java.lang.String, int)
java.sql.CallableStatement.setNull(java.lang.String, int, java.lang.String)
java.sql.PreparedStatement.setNull(int, int)
java.sql.PreparedStatement.setNull(int, int, java.lang.String)
javax.sql.RowSet.setNull(int, int)
javax.sql.RowSet.setNull(int, int, java.lang.String)
javax.sql.RowSet.setNull(java.lang.String, int)
javax.sql.RowSet.setNull(java.lang.String, int, java.lang.String)
javax.sql.rowset.BaseRowSet.setNull(int, int)
javax.sql.rowset.BaseRowSet.setNull(int, int, java.lang.String)
javax.sql.rowset.BaseRowSet.setNull(java.lang.String, int)
javax.sql.rowset.BaseRowSet.setNull(java.lang.String, int, java.lang.String)


Occurences of setNullable

setNullable occurences:
javax.sql.rowset.RowSetMetaDataImpl.setNullable(int, int)
javax.sql.RowSetMetaData.setNullable(int, int)


Occurences of setObject

setObject occurences:
java.beans.Customizer.setObject(java.lang.Object)
java.sql.CallableStatement.setObject(java.lang.String, java.lang.Object)
java.sql.CallableStatement.setObject(java.lang.String, java.lang.Object, int)
java.sql.CallableStatement.setObject(java.lang.String, java.lang.Object, int, int)
java.sql.CallableStatement.setObject(java.lang.String, java.lang.Object, java.sql.SQLType)
java.sql.CallableStatement.setObject(java.lang.String, java.lang.Object, java.sql.SQLType, int)
java.sql.PreparedStatement.setObject(int, java.lang.Object)
java.sql.PreparedStatement.setObject(int, java.lang.Object, int)
java.sql.PreparedStatement.setObject(int, java.lang.Object, int, int)
java.sql.PreparedStatement.setObject(int, java.lang.Object, java.sql.SQLType)
java.sql.PreparedStatement.setObject(int, java.lang.Object, java.sql.SQLType, int)
java.sql.Ref.setObject(java.lang.Object)
javax.naming.Binding.setObject(java.lang.Object)
javax.sql.RowSet.setObject(int, java.lang.Object)
javax.sql.RowSet.setObject(int, java.lang.Object, int)
javax.sql.RowSet.setObject(int, java.lang.Object, int, int)
javax.sql.RowSet.setObject(java.lang.String, java.lang.Object)
javax.sql.RowSet.setObject(java.lang.String, java.lang.Object, int)
javax.sql.RowSet.setObject(java.lang.String, java.lang.Object, int, int)
javax.sql.rowset.BaseRowSet.setObject(int, java.lang.Object)
javax.sql.rowset.BaseRowSet.setObject(int, java.lang.Object, int)
javax.sql.rowset.BaseRowSet.setObject(int, java.lang.Object, int, int)
javax.sql.rowset.BaseRowSet.setObject(java.lang.String, java.lang.Object)
javax.sql.rowset.BaseRowSet.setObject(java.lang.String, java.lang.Object, int)
javax.sql.rowset.BaseRowSet.setObject(java.lang.String, java.lang.Object, int, int)
javax.sql.rowset.serial.SerialRef.setObject(java.lang.Object)
javax.xml.bind.helpers.ValidationEventLocatorImpl.setObject(java.lang.Object)


Occurences of setObservedAttribute

setObservedAttribute occurences:
javax.management.monitor.Monitor.setObservedAttribute(java.lang.String)
javax.management.monitor.MonitorMBean.setObservedAttribute(java.lang.String)


Occurences of setObservedObject

setObservedObject occurences:
javax.management.monitor.Monitor.setObservedObject(javax.management.ObjectName)
javax.management.monitor.MonitorMBean.setObservedObject(javax.management.ObjectName)


Occurences of setOffset

setOffset occurences:
java.io.ObjectStreamField.setOffset(int)
java.text.CollationElementIterator.setOffset(int)
javax.imageio.stream.IIOByteBuffer.setOffset(int)
javax.management.monitor.CounterMonitor.setOffset(java.lang.Number)
javax.management.monitor.CounterMonitorMBean.setOffset(java.lang.Number)
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.setOffset(java.awt.Point)
javax.xml.bind.helpers.ValidationEventLocatorImpl.setOffset(int)


Occurences of SetOfIntegerSyntax (constructors)

SetOfIntegerSyntax (constructors) occurences:
javax.print.attribute.SetOfIntegerSyntax(int)
javax.print.attribute.SetOfIntegerSyntax(int, int)
javax.print.attribute.SetOfIntegerSyntax(int:A:A)
javax.print.attribute.SetOfIntegerSyntax(java.lang.String)


Occurences of setOpacity

setOpacity occurences:
java.awt.Dialog.setOpacity(float)
java.awt.Frame.setOpacity(float)
java.awt.Window.setOpacity(float)


Occurences of setOption

setOption occurences:
java.net.SocketOptions.setOption(int, java.lang.Object)
java.nio.channels.AsynchronousServerSocketChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.AsynchronousServerSocketChannel.setOption(java.net.SocketOption, T)
java.nio.channels.AsynchronousSocketChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.AsynchronousSocketChannel.setOption(java.net.SocketOption, T)
java.nio.channels.DatagramChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.DatagramChannel.setOption(java.net.SocketOption, T)
java.nio.channels.NetworkChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.NetworkChannel.setOption(java.net.SocketOption, T)
java.nio.channels.ServerSocketChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.ServerSocketChannel.setOption(java.net.SocketOption, T)
java.nio.channels.SocketChannel.setOption(java.net.SocketOption, java.lang.Object)
java.nio.channels.SocketChannel.setOption(java.net.SocketOption, T)


Occurences of setOptions

setOptions occurences:
java.security.cert.PKIXRevocationChecker.setOptions(java.util.Set)
javax.swing.JOptionPane.setOptions(java.lang.Object:A)


Occurences of setOrdering

setOrdering occurences:
javax.imageio.spi.ServiceRegistry.setOrdering(java.lang.Class, java.lang.Object, java.lang.Object)
javax.imageio.spi.ServiceRegistry.setOrdering(java.lang.Class, T, T)


Occurences of setOrientation

setOrientation occurences:
java.awt.print.PageFormat.setOrientation(int)
java.awt.Scrollbar.setOrientation(int)
javax.swing.JProgressBar.setOrientation(int)
javax.swing.JScrollBar.setOrientation(int)
javax.swing.JSeparator.setOrientation(int)
javax.swing.JSlider.setOrientation(int)
javax.swing.JSplitPane.setOrientation(int)
javax.swing.JToolBar.setOrientation(int)
javax.swing.plaf.basic.BasicSplitPaneUI.setOrientation(int)
javax.swing.plaf.basic.BasicToolBarUI.setOrientation(int)
javax.swing.plaf.basic.BasicToolBarUI.DragWindow.setOrientation(int)


Occurences of setOrientationRequested

setOrientationRequested occurences:
java.awt.PageAttributes.setOrientationRequested(int)
java.awt.PageAttributes.setOrientationRequested(java.awt.PageAttributes.OrientationRequestedType)


Occurences of setOutputStream

setOutputStream occurences:
java.rmi.server.LogStream.setOutputStream(java.io.OutputStream)
java.util.logging.StreamHandler.setOutputStream(java.io.OutputStream)
javax.xml.transform.stream.StreamResult.setOutputStream(java.io.OutputStream)


Occurences of setOwner

setOwner occurences:
java.beans.XMLDecoder.setOwner(java.lang.Object)
java.beans.XMLEncoder.setOwner(java.lang.Object)
java.nio.file.attribute.FileOwnerAttributeView.setOwner(java.nio.file.attribute.UserPrincipal)
java.nio.file.Files.setOwner(java.nio.file.Path, java.nio.file.attribute.UserPrincipal)


Occurences of setPage

setPage occurences:
java.awt.print.Book.setPage(int, java.awt.print.Printable, java.awt.print.PageFormat)
javax.swing.JEditorPane.setPage(java.lang.String)
javax.swing.JEditorPane.setPage(java.net.URL)


Occurences of setPaintMode

setPaintMode occurences:
java.awt.Graphics.setPaintMode()
javax.swing.DebugGraphics.setPaintMode()


Occurences of setPalette

setPalette occurences:
javax.swing.plaf.metal.MetalInternalFrameTitlePane.setPalette(boolean)
javax.swing.plaf.metal.MetalInternalFrameUI.setPalette(boolean)


Occurences of setParagraphAttributes

setParagraphAttributes occurences:
javax.swing.JTextPane.setParagraphAttributes(javax.swing.text.AttributeSet, boolean)
javax.swing.text.DefaultStyledDocument.setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)
javax.swing.text.html.HTMLDocument.setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)
javax.swing.text.StyledDocument.setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)
javax.swing.text.StyledEditorKit.StyledTextAction.setParagraphAttributes(javax.swing.JEditorPane, javax.swing.text.AttributeSet, boolean)


Occurences of setParameter

setParameter occurences:
java.security.Signature.setParameter(java.lang.String, java.lang.Object)
java.security.Signature.setParameter(java.security.spec.AlgorithmParameterSpec)
javax.activation.MimeType.setParameter(java.lang.String, java.lang.String)
javax.xml.transform.Transformer.setParameter(java.lang.String, java.lang.Object)
org.w3c.dom.DOMConfiguration.setParameter(java.lang.String, java.lang.Object)


Occurences of setParameters

setParameters occurences:
java.awt.image.renderable.ParameterBlock.setParameters(java.util.Vector)
java.util.logging.LogRecord.setParameters(java.lang.Object:A)


Occurences of setParent

setParent occurences:
java.util.logging.Logger.setParent(java.util.logging.Logger)
java.util.ResourceBundle.setParent(java.util.ResourceBundle)
javax.swing.ActionMap.setParent(javax.swing.ActionMap)
javax.swing.ComponentInputMap.setParent(javax.swing.InputMap)
javax.swing.InputMap.setParent(javax.swing.InputMap)
javax.swing.text.AsyncBoxView.setParent(javax.swing.text.View)
javax.swing.text.ComponentView.setParent(javax.swing.text.View)
javax.swing.text.CompositeView.setParent(javax.swing.text.View)
javax.swing.text.FlowView.setParent(javax.swing.text.View)
javax.swing.text.html.BlockView.setParent(javax.swing.text.View)
javax.swing.text.html.ImageView.setParent(javax.swing.text.View)
javax.swing.text.html.ParagraphView.setParent(javax.swing.text.View)
javax.swing.text.View.setParent(javax.swing.text.View)
javax.swing.tree.DefaultMutableTreeNode.setParent(javax.swing.tree.MutableTreeNode)
javax.swing.tree.MutableTreeNode.setParent(javax.swing.tree.MutableTreeNode)
javax.xml.crypto.dsig.dom.DOMSignContext.setParent(org.w3c.dom.Node)
javax.xml.stream.util.EventReaderDelegate.setParent(javax.xml.stream.XMLEventReader)
javax.xml.stream.util.StreamReaderDelegate.setParent(javax.xml.stream.XMLStreamReader)
org.xml.sax.helpers.XMLFilterImpl.setParent(org.xml.sax.XMLReader)
org.xml.sax.XMLFilter.setParent(org.xml.sax.XMLReader)


Occurences of setPassword

setPassword occurences:
javax.security.auth.callback.PasswordCallback.setPassword(char:A)
javax.sql.RowSet.setPassword(java.lang.String)
javax.sql.rowset.BaseRowSet.setPassword(java.lang.String)


Occurences of setPayload

setPayload occurences:
javax.xml.ws.LogicalMessage.setPayload(java.lang.Object, javax.xml.bind.JAXBContext)
javax.xml.ws.LogicalMessage.setPayload(javax.xml.transform.Source)


Occurences of setPerformancePreferences

setPerformancePreferences occurences:
java.net.ServerSocket.setPerformancePreferences(int, int, int)
java.net.Socket.setPerformancePreferences(int, int, int)
java.net.SocketImpl.setPerformancePreferences(int, int, int)


Occurences of setPermissions

setPermissions occurences:
java.nio.file.attribute.AclEntry.Builder.setPermissions(java.nio.file.attribute.AclEntryPermission...)
java.nio.file.attribute.AclEntry.Builder.setPermissions(java.util.Set)
java.nio.file.attribute.PosixFileAttributeView.setPermissions(java.util.Set)


Occurences of setPixel

setPixel occurences:
java.awt.image.BandedSampleModel.setPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.MultiPixelPackedSampleModel.setPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setPixel(int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setPixel(int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.setPixel(int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.WritableRaster.setPixel(int, int, double:A)
java.awt.image.WritableRaster.setPixel(int, int, float:A)
java.awt.image.WritableRaster.setPixel(int, int, int:A)


Occurences of setPixels

setPixels occurences:
java.awt.image.AreaAveragingScaleFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.AreaAveragingScaleFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.BandedSampleModel.setPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.ComponentSampleModel.setPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.CropImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.CropImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.PixelGrabber.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.PixelGrabber.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.ReplicateScaleFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.ReplicateScaleFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.RGBImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte:A, int, int)
java.awt.image.RGBImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int:A, int, int)
java.awt.image.SampleModel.setPixels(int, int, int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setPixels(int, int, int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.setPixels(int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.WritableRaster.setPixels(int, int, int, int, double:A)
java.awt.image.WritableRaster.setPixels(int, int, int, int, float:A)
java.awt.image.WritableRaster.setPixels(int, int, int, int, int:A)


Occurences of setPolicy

setPolicy occurences:
java.security.cert.X509CertSelector.setPolicy(java.util.Set)
java.security.Policy.setPolicy(java.security.Policy)
javax.security.auth.Policy.setPolicy(javax.security.auth.Policy)


Occurences of setPopupSize

setPopupSize occurences:
javax.swing.JPopupMenu.setPopupSize(int, int)
javax.swing.JPopupMenu.setPopupSize(java.awt.Dimension)


Occurences of setPopupVisible

setPopupVisible occurences:
javax.swing.JComboBox.setPopupVisible(boolean)
javax.swing.plaf.basic.BasicComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean)
javax.swing.plaf.ComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean)
javax.swing.plaf.multi.MultiComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean)


Occurences of setPosition

setPosition occurences:
java.awt.font.LineBreakMeasurer.setPosition(int)
javax.swing.JLayeredPane.setPosition(java.awt.Component, int)


Occurences of setPrecision

setPrecision occurences:
javax.sql.rowset.RowSetMetaDataImpl.setPrecision(int, int)
javax.sql.RowSetMetaData.setPrecision(int, int)


Occurences of setPreferredSize

setPreferredSize occurences:
java.awt.Component.setPreferredSize(java.awt.Dimension)
javax.swing.JComponent.setPreferredSize(java.awt.Dimension)


Occurences of setPrefix

setPrefix occurences:
javax.imageio.metadata.IIOMetadataNode.setPrefix(java.lang.String)
javax.xml.stream.XMLEventWriter.setPrefix(java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamWriter.setPrefix(java.lang.String, java.lang.String)
org.w3c.dom.Node.setPrefix(java.lang.String)


Occurences of setPressed

setPressed occurences:
javax.swing.ButtonModel.setPressed(boolean)
javax.swing.DefaultButtonModel.setPressed(boolean)
javax.swing.JToggleButton.ToggleButtonModel.setPressed(boolean)


Occurences of setPrincipal

setPrincipal occurences:
java.nio.file.attribute.AclEntry.Builder.setPrincipal(java.nio.file.attribute.UserPrincipal)
java.security.acl.AclEntry.setPrincipal(java.security.Principal)


Occurences of setPrintable

setPrintable occurences:
java.awt.print.PrinterJob.setPrintable(java.awt.print.Printable)
java.awt.print.PrinterJob.setPrintable(java.awt.print.Printable, java.awt.print.PageFormat)


Occurences of setPrinterResolution

setPrinterResolution occurences:
java.awt.PageAttributes.setPrinterResolution(int)
java.awt.PageAttributes.setPrinterResolution(int:A)


Occurences of setPrintQuality

setPrintQuality occurences:
java.awt.PageAttributes.setPrintQuality(int)
java.awt.PageAttributes.setPrintQuality(java.awt.PageAttributes.PrintQualityType)


Occurences of setProgress

setProgress occurences:
javax.swing.ProgressMonitor.setProgress(int)
javax.swing.SwingWorker.setProgress(int)


Occurences of setProperties

setProperties occurences:
java.awt.image.CropImageFilter.setProperties(java.util.Hashtable)
java.awt.image.ImageConsumer.setProperties(java.util.Hashtable)
java.awt.image.ImageFilter.setProperties(java.util.Hashtable)
java.awt.image.PixelGrabber.setProperties(java.util.Hashtable)
java.awt.image.ReplicateScaleFilter.setProperties(java.util.Hashtable)
java.lang.System.setProperties(java.util.Properties)
javax.xml.ws.Endpoint.setProperties(java.util.Map)


Occurences of setPropertiesFromAttributes

setPropertiesFromAttributes occurences:
javax.swing.text.html.BlockView.setPropertiesFromAttributes()
javax.swing.text.html.ImageView.setPropertiesFromAttributes()
javax.swing.text.html.InlineView.setPropertiesFromAttributes()
javax.swing.text.html.ListView.setPropertiesFromAttributes()
javax.swing.text.html.ParagraphView.setPropertiesFromAttributes()
javax.swing.text.LabelView.setPropertiesFromAttributes()
javax.swing.text.ParagraphView.setPropertiesFromAttributes()


Occurences of setProperty

setProperty occurences:
java.lang.System.setProperty(java.lang.String, java.lang.String)
java.security.Security.setProperty(java.lang.String, java.lang.String)
java.util.Properties.setProperty(java.lang.String, java.lang.String)
javax.xml.bind.Binder.setProperty(java.lang.String, java.lang.Object)
javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(java.lang.String, java.lang.Object)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setProperty(java.lang.String, java.lang.Object)
javax.xml.bind.Marshaller.setProperty(java.lang.String, java.lang.Object)
javax.xml.bind.Unmarshaller.setProperty(java.lang.String, java.lang.Object)
javax.xml.bind.Validator.setProperty(java.lang.String, java.lang.Object)
javax.xml.crypto.dom.DOMCryptoContext.setProperty(java.lang.String, java.lang.Object)
javax.xml.crypto.XMLCryptoContext.setProperty(java.lang.String, java.lang.Object)
javax.xml.parsers.SAXParser.setProperty(java.lang.String, java.lang.Object)
javax.xml.soap.SOAPMessage.setProperty(java.lang.String, java.lang.Object)
javax.xml.stream.XMLInputFactory.setProperty(java.lang.String, java.lang.Object)
javax.xml.stream.XMLOutputFactory.setProperty(java.lang.String, java.lang.Object)
javax.xml.validation.SchemaFactory.setProperty(java.lang.String, java.lang.Object)
javax.xml.validation.Validator.setProperty(java.lang.String, java.lang.Object)
javax.xml.validation.ValidatorHandler.setProperty(java.lang.String, java.lang.Object)
org.xml.sax.helpers.ParserAdapter.setProperty(java.lang.String, java.lang.Object)
org.xml.sax.helpers.XMLFilterImpl.setProperty(java.lang.String, java.lang.Object)
org.xml.sax.XMLReader.setProperty(java.lang.String, java.lang.Object)


Occurences of setPrototypeCellValue

setPrototypeCellValue occurences:
javax.swing.JList.setPrototypeCellValue(E)
javax.swing.JList.setPrototypeCellValue(java.lang.Object)


Occurences of setPrototypeDisplayValue

setPrototypeDisplayValue occurences:
javax.swing.JComboBox.setPrototypeDisplayValue(E)
javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object)


Occurences of setPublicId

setPublicId occurences:
javax.xml.transform.stream.StreamSource.setPublicId(java.lang.String)
org.w3c.dom.ls.LSInput.setPublicId(java.lang.String)
org.xml.sax.helpers.LocatorImpl.setPublicId(java.lang.String)
org.xml.sax.InputSource.setPublicId(java.lang.String)


Occurences of setPurgeFlag

setPurgeFlag occurences:
javax.management.relation.RelationService.setPurgeFlag(boolean)
javax.management.relation.RelationServiceMBean.setPurgeFlag(boolean)


Occurences of setQueryTimeout

setQueryTimeout occurences:
java.sql.Statement.setQueryTimeout(int)
javax.sql.RowSet.setQueryTimeout(int)
javax.sql.rowset.BaseRowSet.setQueryTimeout(int)


Occurences of setRangeProperties

setRangeProperties occurences:
javax.swing.BoundedRangeModel.setRangeProperties(int, int, int, int, boolean)
javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean)


Occurences of setRawOffset

setRawOffset occurences:
java.util.SimpleTimeZone.setRawOffset(int)
java.util.TimeZone.setRawOffset(int)


Occurences of setRawResult

setRawResult occurences:
java.util.concurrent.CountedCompleter.setRawResult(java.lang.Object)
java.util.concurrent.CountedCompleter.setRawResult(T)
java.util.concurrent.ForkJoinTask.setRawResult(java.lang.Object)
java.util.concurrent.ForkJoinTask.setRawResult(V)
java.util.concurrent.RecursiveAction.setRawResult(java.lang.Void)
java.util.concurrent.RecursiveTask.setRawResult(java.lang.Object)
java.util.concurrent.RecursiveTask.setRawResult(V)


Occurences of setReadable

setReadable occurences:
java.io.File.setReadable(boolean)
java.io.File.setReadable(boolean, boolean)


Occurences of setReader

setReader occurences:
javax.script.ScriptContext.setReader(java.io.Reader)
javax.script.SimpleScriptContext.setReader(java.io.Reader)
javax.xml.transform.stream.StreamSource.setReader(java.io.Reader)


Occurences of setReadOnly

setReadOnly occurences:
java.io.File.setReadOnly()
java.nio.file.attribute.DosFileAttributeView.setReadOnly(boolean)
java.security.PermissionCollection.setReadOnly()
java.sql.Connection.setReadOnly(boolean)
javax.security.auth.Subject.setReadOnly()
javax.sql.RowSet.setReadOnly(boolean)
javax.sql.rowset.BaseRowSet.setReadOnly(boolean)


Occurences of setReceiveBufferSize

setReceiveBufferSize occurences:
java.net.DatagramSocket.setReceiveBufferSize(int)
java.net.ServerSocket.setReceiveBufferSize(int)
java.net.Socket.setReceiveBufferSize(int)


Occurences of setRect

setRect occurences:
java.awt.geom.Rectangle2D.setRect(double, double, double, double)
java.awt.geom.Rectangle2D.setRect(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Double.setRect(double, double, double, double)
java.awt.geom.Rectangle2D.Double.setRect(java.awt.geom.Rectangle2D)
java.awt.geom.Rectangle2D.Float.setRect(double, double, double, double)
java.awt.geom.Rectangle2D.Float.setRect(float, float, float, float)
java.awt.geom.Rectangle2D.Float.setRect(java.awt.geom.Rectangle2D)
java.awt.image.WritableRaster.setRect(int, int, java.awt.image.Raster)
java.awt.image.WritableRaster.setRect(java.awt.image.Raster)
java.awt.Rectangle.setRect(double, double, double, double)


Occurences of setRef

setRef occurences:
java.rmi.server.RemoteStub.setRef(java.rmi.server.RemoteStub, java.rmi.server.RemoteRef)
java.sql.PreparedStatement.setRef(int, java.sql.Ref)
javax.sql.RowSet.setRef(int, java.sql.Ref)
javax.sql.rowset.BaseRowSet.setRef(int, java.sql.Ref)


Occurences of setRelationServiceManagementFlag

setRelationServiceManagementFlag occurences:
javax.management.relation.RelationSupport.setRelationServiceManagementFlag(java.lang.Boolean)
javax.management.relation.RelationSupportMBean.setRelationServiceManagementFlag(java.lang.Boolean)


Occurences of setRemainingName

setRemainingName occurences:
javax.naming.NamingException.setRemainingName(javax.naming.Name)
javax.naming.spi.ResolveResult.setRemainingName(javax.naming.Name)


Occurences of setRenderingHints

setRenderingHints occurences:
java.awt.Graphics2D.setRenderingHints(java.util.Map)
java.awt.image.renderable.RenderContext.setRenderingHints(java.awt.RenderingHints)


Occurences of setRequestControls

setRequestControls occurences:
javax.naming.ldap.InitialLdapContext.setRequestControls(javax.naming.ldap.Control:A)
javax.naming.ldap.LdapContext.setRequestControls(javax.naming.ldap.Control:A)


Occurences of setResizable

setResizable occurences:
java.awt.Dialog.setResizable(boolean)
java.awt.Frame.setResizable(boolean)
javax.swing.JInternalFrame.setResizable(boolean)
javax.swing.table.TableColumn.setResizable(boolean)


Occurences of setResolvedObj

setResolvedObj occurences:
javax.naming.NamingException.setResolvedObj(java.lang.Object)
javax.naming.spi.ResolveResult.setResolvedObj(java.lang.Object)


Occurences of setResolvedValue

setResolvedValue occurences:
javax.sql.rowset.spi.SyncResolver.setResolvedValue(int, java.lang.Object)
javax.sql.rowset.spi.SyncResolver.setResolvedValue(java.lang.String, java.lang.Object)


Occurences of setResolveParent

setResolveParent occurences:
javax.swing.text.AbstractDocument.AbstractElement.setResolveParent(javax.swing.text.AttributeSet)
javax.swing.text.Keymap.setResolveParent(javax.swing.text.Keymap)
javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)
javax.swing.text.SimpleAttributeSet.setResolveParent(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.NamedStyle.setResolveParent(javax.swing.text.AttributeSet)


Occurences of setResourceBundle

setResourceBundle occurences:
java.util.logging.Logger.setResourceBundle(java.util.ResourceBundle)
java.util.logging.LogRecord.setResourceBundle(java.util.ResourceBundle)


Occurences of setResourceResolver

setResourceResolver occurences:
javax.xml.validation.SchemaFactory.setResourceResolver(org.w3c.dom.ls.LSResourceResolver)
javax.xml.validation.Validator.setResourceResolver(org.w3c.dom.ls.LSResourceResolver)
javax.xml.validation.ValidatorHandler.setResourceResolver(org.w3c.dom.ls.LSResourceResolver)


Occurences of setResult

setResult occurences:
java.sql.SQLXML.setResult(java.lang.Class)
javax.xml.transform.sax.TransformerHandler.setResult(javax.xml.transform.Result)


Occurences of setReuseAddress

setReuseAddress occurences:
java.net.DatagramSocket.setReuseAddress(boolean)
java.net.ServerSocket.setReuseAddress(boolean)
java.net.Socket.setReuseAddress(boolean)


Occurences of setRGB

setRGB occurences:
java.awt.image.BufferedImage.setRGB(int, int, int)
java.awt.image.BufferedImage.setRGB(int, int, int, int, int:A, int, int)


Occurences of setRole

setRole occurences:
javax.management.relation.Relation.setRole(javax.management.relation.Role)
javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role)
javax.management.relation.RelationServiceMBean.setRole(java.lang.String, javax.management.relation.Role)
javax.management.relation.RelationSupport.setRole(javax.management.relation.Role)
javax.xml.soap.SOAPHeaderElement.setRole(java.lang.String)


Occurences of setRoleName

setRoleName occurences:
javax.management.relation.Role.setRoleName(java.lang.String)
javax.management.relation.RoleUnresolved.setRoleName(java.lang.String)


Occurences of setRoles

setRoles occurences:
javax.management.relation.Relation.setRoles(javax.management.relation.RoleList)
javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList)
javax.management.relation.RelationServiceMBean.setRoles(java.lang.String, javax.management.relation.RoleList)
javax.management.relation.RelationSupport.setRoles(javax.management.relation.RoleList)
javax.management.relation.RoleResult.setRoles(javax.management.relation.RoleList)
javax.xml.ws.soap.SOAPBinding.setRoles(java.util.Set)


Occurences of setRoleValue

setRoleValue occurences:
javax.management.relation.Role.setRoleValue(java.util.List)
javax.management.relation.RoleUnresolved.setRoleValue(java.util.List)


Occurences of setRollover

setRollover occurences:
javax.swing.ButtonModel.setRollover(boolean)
javax.swing.DefaultButtonModel.setRollover(boolean)
javax.swing.JToolBar.setRollover(boolean)


Occurences of setRolloverTab

setRolloverTab occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.setRolloverTab(int)
javax.swing.plaf.synth.SynthTabbedPaneUI.setRolloverTab(int)


Occurences of setRootPane

setRootPane occurences:
javax.swing.JApplet.setRootPane(javax.swing.JRootPane)
javax.swing.JDialog.setRootPane(javax.swing.JRootPane)
javax.swing.JFrame.setRootPane(javax.swing.JRootPane)
javax.swing.JInternalFrame.setRootPane(javax.swing.JRootPane)
javax.swing.JWindow.setRootPane(javax.swing.JRootPane)


Occurences of setRootPaneCheckingEnabled

setRootPaneCheckingEnabled occurences:
javax.swing.JApplet.setRootPaneCheckingEnabled(boolean)
javax.swing.JDialog.setRootPaneCheckingEnabled(boolean)
javax.swing.JFrame.setRootPaneCheckingEnabled(boolean)
javax.swing.JInternalFrame.setRootPaneCheckingEnabled(boolean)
javax.swing.JWindow.setRootPaneCheckingEnabled(boolean)


Occurences of setRootVisible

setRootVisible occurences:
javax.swing.JTree.setRootVisible(boolean)
javax.swing.plaf.basic.BasicTreeUI.setRootVisible(boolean)
javax.swing.tree.AbstractLayoutCache.setRootVisible(boolean)
javax.swing.tree.FixedHeightLayoutCache.setRootVisible(boolean)
javax.swing.tree.VariableHeightLayoutCache.setRootVisible(boolean)


Occurences of setRoundingMode

setRoundingMode occurences:
java.text.DecimalFormat.setRoundingMode(java.math.RoundingMode)
java.text.NumberFormat.setRoundingMode(java.math.RoundingMode)


Occurences of setRoundRect

setRoundRect occurences:
java.awt.geom.RoundRectangle2D.setRoundRect(double, double, double, double, double, double)
java.awt.geom.RoundRectangle2D.setRoundRect(java.awt.geom.RoundRectangle2D)
java.awt.geom.RoundRectangle2D.Double.setRoundRect(double, double, double, double, double, double)
java.awt.geom.RoundRectangle2D.Double.setRoundRect(java.awt.geom.RoundRectangle2D)
java.awt.geom.RoundRectangle2D.Float.setRoundRect(double, double, double, double, double, double)
java.awt.geom.RoundRectangle2D.Float.setRoundRect(float, float, float, float, float, float)
java.awt.geom.RoundRectangle2D.Float.setRoundRect(java.awt.geom.RoundRectangle2D)


Occurences of setRowHeight

setRowHeight occurences:
javax.swing.JTable.setRowHeight(int)
javax.swing.JTable.setRowHeight(int, int)
javax.swing.JTree.setRowHeight(int)
javax.swing.plaf.basic.BasicTreeUI.setRowHeight(int)
javax.swing.tree.AbstractLayoutCache.setRowHeight(int)
javax.swing.tree.FixedHeightLayoutCache.setRowHeight(int)
javax.swing.tree.VariableHeightLayoutCache.setRowHeight(int)


Occurences of setRowId

setRowId occurences:
java.sql.CallableStatement.setRowId(java.lang.String, java.sql.RowId)
java.sql.PreparedStatement.setRowId(int, java.sql.RowId)
javax.sql.RowSet.setRowId(int, java.sql.RowId)
javax.sql.RowSet.setRowId(java.lang.String, java.sql.RowId)
javax.sql.rowset.BaseRowSet.setRowId(int, java.sql.RowId)
javax.sql.rowset.BaseRowSet.setRowId(java.lang.String, java.sql.RowId)


Occurences of setRowMapper

setRowMapper occurences:
javax.swing.JTree.EmptySelectionModel.setRowMapper(javax.swing.tree.RowMapper)
javax.swing.tree.DefaultTreeSelectionModel.setRowMapper(javax.swing.tree.RowMapper)
javax.swing.tree.TreeSelectionModel.setRowMapper(javax.swing.tree.RowMapper)


Occurences of setRows

setRows occurences:
java.awt.GridLayout.setRows(int)
java.awt.TextArea.setRows(int)
javax.swing.JTextArea.setRows(int)


Occurences of setSample

setSample occurences:
java.awt.image.BandedSampleModel.setSample(int, int, int, double, java.awt.image.DataBuffer)
java.awt.image.BandedSampleModel.setSample(int, int, int, float, java.awt.image.DataBuffer)
java.awt.image.BandedSampleModel.setSample(int, int, int, int, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setSample(int, int, int, double, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setSample(int, int, int, float, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setSample(int, int, int, int, java.awt.image.DataBuffer)
java.awt.image.MultiPixelPackedSampleModel.setSample(int, int, int, int, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSample(int, int, int, double, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSample(int, int, int, float, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSample(int, int, int, int, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.setSample(int, int, int, int, java.awt.image.DataBuffer)
java.awt.image.WritableRaster.setSample(int, int, int, double)
java.awt.image.WritableRaster.setSample(int, int, int, float)
java.awt.image.WritableRaster.setSample(int, int, int, int)


Occurences of setSamples

setSamples occurences:
java.awt.image.BandedSampleModel.setSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.ComponentSampleModel.setSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSamples(int, int, int, int, int, double:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSamples(int, int, int, int, int, float:A, java.awt.image.DataBuffer)
java.awt.image.SampleModel.setSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.SinglePixelPackedSampleModel.setSamples(int, int, int, int, int, int:A, java.awt.image.DataBuffer)
java.awt.image.WritableRaster.setSamples(int, int, int, int, int, double:A)
java.awt.image.WritableRaster.setSamples(int, int, int, int, int, float:A)
java.awt.image.WritableRaster.setSamples(int, int, int, int, int, int:A)


Occurences of setSavepoint

setSavepoint occurences:
java.sql.Connection.setSavepoint()
java.sql.Connection.setSavepoint(java.lang.String)


Occurences of setScale

setScale occurences:
java.math.BigDecimal.setScale(int)
java.math.BigDecimal.setScale(int, int)
java.math.BigDecimal.setScale(int, java.math.RoundingMode)
javax.sql.rowset.RowSetMetaDataImpl.setScale(int, int)
javax.sql.RowSetMetaData.setScale(int, int)


Occurences of setSchema

setSchema occurences:
java.sql.Connection.setSchema(java.lang.String)
javax.xml.bind.Binder.setSchema(javax.xml.validation.Schema)
javax.xml.bind.helpers.AbstractMarshallerImpl.setSchema(javax.xml.validation.Schema)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setSchema(javax.xml.validation.Schema)
javax.xml.bind.Marshaller.setSchema(javax.xml.validation.Schema)
javax.xml.bind.Unmarshaller.setSchema(javax.xml.validation.Schema)
javax.xml.parsers.DocumentBuilderFactory.setSchema(javax.xml.validation.Schema)
javax.xml.parsers.SAXParserFactory.setSchema(javax.xml.validation.Schema)


Occurences of setSchemaName

setSchemaName occurences:
javax.sql.rowset.RowSetMetaDataImpl.setSchemaName(int, java.lang.String)
javax.sql.RowSetMetaData.setSchemaName(int, java.lang.String)


Occurences of setScrollByBlock

setScrollByBlock occurences:
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.setScrollByBlock(boolean)
javax.swing.plaf.basic.BasicSliderUI.ScrollListener.setScrollByBlock(boolean)


Occurences of setScrollPosition

setScrollPosition occurences:
java.awt.ScrollPane.setScrollPosition(int, int)
java.awt.ScrollPane.setScrollPosition(java.awt.Point)


Occurences of setSearchable

setSearchable occurences:
javax.sql.rowset.RowSetMetaDataImpl.setSearchable(int, boolean)
javax.sql.RowSetMetaData.setSearchable(int, boolean)


Occurences of setSeconds

setSeconds occurences:
java.sql.Date.setSeconds(int)
java.util.Date.setSeconds(int)


Occurences of setSeed

setSeed occurences:
java.security.SecureRandom.setSeed(byte:A)
java.security.SecureRandom.setSeed(long)
java.util.concurrent.ThreadLocalRandom.setSeed(long)
java.util.Random.setSeed(long)


Occurences of setSelected

setSelected occurences:
javax.swing.AbstractButton.setSelected(boolean)
javax.swing.ButtonGroup.setSelected(javax.swing.ButtonModel, boolean)
javax.swing.ButtonModel.setSelected(boolean)
javax.swing.DefaultButtonModel.setSelected(boolean)
javax.swing.JInternalFrame.setSelected(boolean)
javax.swing.JMenu.setSelected(boolean)
javax.swing.JMenuBar.setSelected(java.awt.Component)
javax.swing.JPopupMenu.setSelected(java.awt.Component)
javax.swing.JToggleButton.ToggleButtonModel.setSelected(boolean)


Occurences of setSelectedColor

setSelectedColor occurences:
javax.swing.colorchooser.ColorSelectionModel.setSelectedColor(java.awt.Color)
javax.swing.colorchooser.DefaultColorSelectionModel.setSelectedColor(java.awt.Color)


Occurences of setSelectedIndex

setSelectedIndex occurences:
javax.security.auth.callback.ChoiceCallback.setSelectedIndex(int)
javax.security.auth.callback.ConfirmationCallback.setSelectedIndex(int)
javax.swing.DefaultSingleSelectionModel.setSelectedIndex(int)
javax.swing.JComboBox.setSelectedIndex(int)
javax.swing.JList.setSelectedIndex(int)
javax.swing.JTabbedPane.setSelectedIndex(int)
javax.swing.SingleSelectionModel.setSelectedIndex(int)


Occurences of setSelectedItem

setSelectedItem occurences:
javax.swing.ComboBoxModel.setSelectedItem(java.lang.Object)
javax.swing.DefaultComboBoxModel.setSelectedItem(java.lang.Object)
javax.swing.JComboBox.setSelectedItem(java.lang.Object)
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.setSelectedItem(java.lang.Object)
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.setSelectedItem(java.lang.Object)


Occurences of setSelectionBackground

setSelectionBackground occurences:
javax.swing.JList.setSelectionBackground(java.awt.Color)
javax.swing.JTable.setSelectionBackground(java.awt.Color)


Occurences of setSelectionEnd

setSelectionEnd occurences:
java.awt.TextComponent.setSelectionEnd(int)
javax.swing.text.JTextComponent.setSelectionEnd(int)


Occurences of setSelectionForeground

setSelectionForeground occurences:
javax.swing.JList.setSelectionForeground(java.awt.Color)
javax.swing.JTable.setSelectionForeground(java.awt.Color)


Occurences of setSelectionInterval

setSelectionInterval occurences:
javax.swing.DefaultListSelectionModel.setSelectionInterval(int, int)
javax.swing.JList.setSelectionInterval(int, int)
javax.swing.JTree.setSelectionInterval(int, int)
javax.swing.ListSelectionModel.setSelectionInterval(int, int)


Occurences of setSelectionMode

setSelectionMode occurences:
javax.swing.DefaultListSelectionModel.setSelectionMode(int)
javax.swing.JList.setSelectionMode(int)
javax.swing.JTable.setSelectionMode(int)
javax.swing.JTree.EmptySelectionModel.setSelectionMode(int)
javax.swing.ListSelectionModel.setSelectionMode(int)
javax.swing.tree.DefaultTreeSelectionModel.setSelectionMode(int)
javax.swing.tree.TreeSelectionModel.setSelectionMode(int)


Occurences of setSelectionModel

setSelectionModel occurences:
javax.swing.JColorChooser.setSelectionModel(javax.swing.colorchooser.ColorSelectionModel)
javax.swing.JList.setSelectionModel(javax.swing.ListSelectionModel)
javax.swing.JMenuBar.setSelectionModel(javax.swing.SingleSelectionModel)
javax.swing.JPopupMenu.setSelectionModel(javax.swing.SingleSelectionModel)
javax.swing.JTable.setSelectionModel(javax.swing.ListSelectionModel)
javax.swing.JTree.setSelectionModel(javax.swing.tree.TreeSelectionModel)
javax.swing.plaf.basic.BasicTreeUI.setSelectionModel(javax.swing.tree.TreeSelectionModel)
javax.swing.table.DefaultTableColumnModel.setSelectionModel(javax.swing.ListSelectionModel)
javax.swing.table.TableColumnModel.setSelectionModel(javax.swing.ListSelectionModel)
javax.swing.tree.AbstractLayoutCache.setSelectionModel(javax.swing.tree.TreeSelectionModel)


Occurences of setSelectionPath

setSelectionPath occurences:
javax.swing.JTree.setSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(javax.swing.tree.TreePath)
javax.swing.tree.TreeSelectionModel.setSelectionPath(javax.swing.tree.TreePath)


Occurences of setSelectionPaths

setSelectionPaths occurences:
javax.swing.JTree.setSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.JTree.EmptySelectionModel.setSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(javax.swing.tree.TreePath:A)
javax.swing.tree.TreeSelectionModel.setSelectionPaths(javax.swing.tree.TreePath:A)


Occurences of setSelectionStart

setSelectionStart occurences:
java.awt.TextComponent.setSelectionStart(int)
javax.swing.text.JTextComponent.setSelectionStart(int)


Occurences of setSelectionVisible

setSelectionVisible occurences:
javax.swing.text.Caret.setSelectionVisible(boolean)
javax.swing.text.DefaultCaret.setSelectionVisible(boolean)


Occurences of setSendBufferSize

setSendBufferSize occurences:
java.net.DatagramSocket.setSendBufferSize(int)
java.net.Socket.setSendBufferSize(int)


Occurences of setSendPastNotifications

setSendPastNotifications occurences:
javax.management.timer.Timer.setSendPastNotifications(boolean)
javax.management.timer.TimerMBean.setSendPastNotifications(boolean)


Occurences of setSequence

setSequence occurences:
javax.sound.midi.Sequencer.setSequence(java.io.InputStream)
javax.sound.midi.Sequencer.setSequence(javax.sound.midi.Sequence)


Occurences of setSequenceNumber

setSequenceNumber occurences:
java.util.logging.LogRecord.setSequenceNumber(long)
javax.management.Notification.setSequenceNumber(long)


Occurences of setShape

setShape occurences:
java.awt.Dialog.setShape(java.awt.Shape)
java.awt.Frame.setShape(java.awt.Shape)
java.awt.Window.setShape(java.awt.Shape)


Occurences of setShort

setShort occurences:
java.lang.reflect.Array.setShort(java.lang.Object, int, short)
java.lang.reflect.Field.setShort(java.lang.Object, short)
java.sql.CallableStatement.setShort(java.lang.String, short)
java.sql.PreparedStatement.setShort(int, short)
javax.sql.RowSet.setShort(int, short)
javax.sql.RowSet.setShort(java.lang.String, short)
javax.sql.rowset.BaseRowSet.setShort(int, short)
javax.sql.rowset.BaseRowSet.setShort(java.lang.String, short)


Occurences of setShowDeleted

setShowDeleted occurences:
javax.sql.rowset.BaseRowSet.setShowDeleted(boolean)
javax.sql.rowset.CachedRowSet.setShowDeleted(boolean)
javax.sql.rowset.JdbcRowSet.setShowDeleted(boolean)


Occurences of setShowsRootHandles

setShowsRootHandles occurences:
javax.swing.JTree.setShowsRootHandles(boolean)
javax.swing.plaf.basic.BasicTreeUI.setShowsRootHandles(boolean)


Occurences of setSigned

setSigned occurences:
javax.sql.rowset.RowSetMetaDataImpl.setSigned(int, boolean)
javax.sql.RowSetMetaData.setSigned(int, boolean)


Occurences of setSize

setSize occurences:
java.awt.Component.setSize(int, int)
java.awt.Component.setSize(java.awt.Dimension)
java.awt.Component.AccessibleAWTComponent.setSize(java.awt.Dimension)
java.awt.Dimension.setSize(double, double)
java.awt.Dimension.setSize(int, int)
java.awt.Dimension.setSize(java.awt.Dimension)
java.awt.geom.Dimension2D.setSize(double, double)
java.awt.geom.Dimension2D.setSize(java.awt.geom.Dimension2D)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setSize(java.awt.Dimension)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setSize(java.awt.Dimension)
java.awt.print.Paper.setSize(double, double)
java.awt.Rectangle.setSize(int, int)
java.awt.Rectangle.setSize(java.awt.Dimension)
java.awt.Window.setSize(int, int)
java.awt.Window.setSize(java.awt.Dimension)
java.util.Vector.setSize(int)
java.util.zip.ZipEntry.setSize(long)
javax.accessibility.AccessibleComponent.setSize(java.awt.Dimension)
javax.swing.DefaultListModel.setSize(int)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setSize(java.awt.Dimension)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setSize(java.awt.Dimension)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setSize(java.awt.Dimension)
javax.swing.SizeSequence.setSize(int, int)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setSize(java.awt.Dimension)
javax.swing.text.AsyncBoxView.setSize(float, float)
javax.swing.text.BoxView.setSize(float, float)
javax.swing.text.html.ImageView.setSize(float, float)
javax.swing.text.PlainView.setSize(float, float)
javax.swing.text.View.setSize(float, float)
javax.swing.text.WrappedPlainView.setSize(float, float)


Occurences of setSizes

setSizes occurences:
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.setSizes(int:A)
javax.swing.SizeSequence.setSizes(int:A)


Occurences of setSocketFactory

setSocketFactory occurences:
java.net.ServerSocket.setSocketFactory(java.net.SocketImplFactory)
java.rmi.server.RMISocketFactory.setSocketFactory(java.rmi.server.RMISocketFactory)


Occurences of setSortKeys

setSortKeys occurences:
javax.swing.DefaultRowSorter.setSortKeys(java.util.List)
javax.swing.RowSorter.setSortKeys(java.util.List)


Occurences of setSoTimeout

setSoTimeout occurences:
java.net.DatagramSocket.setSoTimeout(int)
java.net.ServerSocket.setSoTimeout(int)
java.net.Socket.setSoTimeout(int)


Occurences of setSource

setSource occurences:
java.awt.AWTEvent.setSource(java.lang.Object)
java.awt.image.renderable.ParameterBlock.setSource(java.lang.Object, int)
java.beans.PropertyEditorSupport.setSource(java.lang.Object)
javax.management.Notification.setSource(java.lang.Object)


Occurences of setSQLXML

setSQLXML occurences:
java.sql.CallableStatement.setSQLXML(java.lang.String, java.sql.SQLXML)
java.sql.PreparedStatement.setSQLXML(int, java.sql.SQLXML)
javax.sql.RowSet.setSQLXML(int, java.sql.SQLXML)
javax.sql.RowSet.setSQLXML(java.lang.String, java.sql.SQLXML)
javax.sql.rowset.BaseRowSet.setSQLXML(int, java.sql.SQLXML)
javax.sql.rowset.BaseRowSet.setSQLXML(java.lang.String, java.sql.SQLXML)


Occurences of setSSLParameters

setSSLParameters occurences:
javax.net.ssl.SSLEngine.setSSLParameters(javax.net.ssl.SSLParameters)
javax.net.ssl.SSLServerSocket.setSSLParameters(javax.net.ssl.SSLParameters)
javax.net.ssl.SSLSocket.setSSLParameters(javax.net.ssl.SSLParameters)


Occurences of setStartRule

setStartRule occurences:
java.util.SimpleTimeZone.setStartRule(int, int, int)
java.util.SimpleTimeZone.setStartRule(int, int, int, int)
java.util.SimpleTimeZone.setStartRule(int, int, int, int, boolean)


Occurences of setState

setState occurences:
java.awt.Checkbox.setState(boolean)
java.awt.CheckboxMenuItem.setState(boolean)
java.awt.Frame.setState(int)
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.setState(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.setState(int)
javax.swing.JCheckBoxMenuItem.setState(boolean)


Occurences of setStrikeThrough

setStrikeThrough occurences:
javax.swing.text.LabelView.setStrikeThrough(boolean)
javax.swing.text.StyleConstants.setStrikeThrough(javax.swing.text.MutableAttributeSet, boolean)


Occurences of setString

setString occurences:
java.sql.CallableStatement.setString(java.lang.String, java.lang.String)
java.sql.Clob.setString(long, java.lang.String)
java.sql.Clob.setString(long, java.lang.String, int, int)
java.sql.PreparedStatement.setString(int, java.lang.String)
java.sql.SQLXML.setString(java.lang.String)
javax.sql.RowSet.setString(int, java.lang.String)
javax.sql.RowSet.setString(java.lang.String, java.lang.String)
javax.sql.rowset.BaseRowSet.setString(int, java.lang.String)
javax.sql.rowset.BaseRowSet.setString(java.lang.String, java.lang.String)
javax.sql.rowset.serial.SerialClob.setString(long, java.lang.String)
javax.sql.rowset.serial.SerialClob.setString(long, java.lang.String, int, int)
javax.swing.JProgressBar.setString(java.lang.String)


Occurences of setStringToCompare

setStringToCompare occurences:
javax.management.monitor.StringMonitor.setStringToCompare(java.lang.String)
javax.management.monitor.StringMonitorMBean.setStringToCompare(java.lang.String)


Occurences of setSubject

setSubject occurences:
java.security.cert.X509CertSelector.setSubject(byte:A)
java.security.cert.X509CertSelector.setSubject(java.lang.String)
java.security.cert.X509CertSelector.setSubject(javax.security.auth.x500.X500Principal)


Occurences of setSubjectPublicKey

setSubjectPublicKey occurences:
java.security.cert.X509CertSelector.setSubjectPublicKey(byte:A)
java.security.cert.X509CertSelector.setSubjectPublicKey(java.security.PublicKey)


Occurences of setSubscript

setSubscript occurences:
javax.swing.text.LabelView.setSubscript(boolean)
javax.swing.text.StyleConstants.setSubscript(javax.swing.text.MutableAttributeSet, boolean)


Occurences of setSuperscript

setSuperscript occurences:
javax.swing.text.LabelView.setSuperscript(boolean)
javax.swing.text.StyleConstants.setSuperscript(javax.swing.text.MutableAttributeSet, boolean)


Occurences of setSystem

setSystem occurences:
java.nio.file.attribute.DosFileAttributeView.setSystem(boolean)
java.rmi.activation.ActivationGroup.setSystem(java.rmi.activation.ActivationSystem)


Occurences of setSystemId

setSystemId occurences:
javax.xml.transform.dom.DOMResult.setSystemId(java.lang.String)
javax.xml.transform.dom.DOMSource.setSystemId(java.lang.String)
javax.xml.transform.Result.setSystemId(java.lang.String)
javax.xml.transform.sax.SAXResult.setSystemId(java.lang.String)
javax.xml.transform.sax.SAXSource.setSystemId(java.lang.String)
javax.xml.transform.sax.TemplatesHandler.setSystemId(java.lang.String)
javax.xml.transform.sax.TransformerHandler.setSystemId(java.lang.String)
javax.xml.transform.Source.setSystemId(java.lang.String)
javax.xml.transform.stax.StAXResult.setSystemId(java.lang.String)
javax.xml.transform.stax.StAXSource.setSystemId(java.lang.String)
javax.xml.transform.stream.StreamResult.setSystemId(java.io.File)
javax.xml.transform.stream.StreamResult.setSystemId(java.lang.String)
javax.xml.transform.stream.StreamSource.setSystemId(java.io.File)
javax.xml.transform.stream.StreamSource.setSystemId(java.lang.String)
org.w3c.dom.ls.LSInput.setSystemId(java.lang.String)
org.w3c.dom.ls.LSOutput.setSystemId(java.lang.String)
org.xml.sax.helpers.LocatorImpl.setSystemId(java.lang.String)
org.xml.sax.InputSource.setSystemId(java.lang.String)


Occurences of setTableName

setTableName occurences:
javax.sql.rowset.CachedRowSet.setTableName(java.lang.String)
javax.sql.rowset.RowSetMetaDataImpl.setTableName(int, java.lang.String)
javax.sql.RowSetMetaData.setTableName(int, java.lang.String)


Occurences of setTarget

setTarget occurences:
java.lang.invoke.CallSite.setTarget(java.lang.invoke.MethodHandle)
java.lang.invoke.ConstantCallSite.setTarget(java.lang.invoke.MethodHandle)
java.lang.invoke.MutableCallSite.setTarget(java.lang.invoke.MethodHandle)
java.lang.invoke.VolatileCallSite.setTarget(java.lang.invoke.MethodHandle)
javax.accessibility.AccessibleRelation.setTarget(java.lang.Object)
javax.accessibility.AccessibleRelation.setTarget(java.lang.Object:A)
javax.rmi.CORBA.Tie.setTarget(java.rmi.Remote)


Occurences of setText

setText occurences:
java.awt.Label.setText(java.lang.String)
java.awt.TextComponent.setText(java.lang.String)
java.awt.TextField.setText(java.lang.String)
java.text.BreakIterator.setText(java.lang.String)
java.text.BreakIterator.setText(java.text.CharacterIterator)
java.text.CollationElementIterator.setText(java.lang.String)
java.text.CollationElementIterator.setText(java.text.CharacterIterator)
java.text.StringCharacterIterator.setText(java.lang.String)
javax.security.auth.callback.TextInputCallback.setText(java.lang.String)
javax.swing.AbstractButton.setText(java.lang.String)
javax.swing.JEditorPane.setText(java.lang.String)
javax.swing.JLabel.setText(java.lang.String)
javax.swing.text.JTextComponent.setText(java.lang.String)


Occurences of setTextContent

setTextContent occurences:
javax.imageio.metadata.IIOMetadataNode.setTextContent(java.lang.String)
org.w3c.dom.Node.setTextContent(java.lang.String)


Occurences of setTextContents

setTextContents occurences:
javax.accessibility.AccessibleEditableText.setTextContents(java.lang.String)
javax.swing.JSpinner.AccessibleJSpinner.setTextContents(java.lang.String)
javax.swing.text.JTextComponent.AccessibleJTextComponent.setTextContents(java.lang.String)


Occurences of setThreshold

setThreshold occurences:
javax.management.monitor.CounterMonitor.setThreshold(java.lang.Number)
javax.management.monitor.CounterMonitorMBean.setThreshold(java.lang.Number)


Occurences of setThresholds

setThresholds occurences:
javax.management.monitor.GaugeMonitor.setThresholds(java.lang.Number, java.lang.Number)
javax.management.monitor.GaugeMonitorMBean.setThresholds(java.lang.Number, java.lang.Number)


Occurences of setThumbBounds

setThumbBounds occurences:
javax.swing.plaf.basic.BasicScrollBarUI.setThumbBounds(int, int, int, int)
javax.swing.plaf.metal.MetalScrollBarUI.setThumbBounds(int, int, int, int)


Occurences of setThumbLocation

setThumbLocation occurences:
javax.swing.plaf.basic.BasicSliderUI.setThumbLocation(int, int)
javax.swing.plaf.synth.SynthSliderUI.setThumbLocation(int, int)


Occurences of setThumbRollover

setThumbRollover occurences:
javax.swing.plaf.basic.BasicScrollBarUI.setThumbRollover(boolean)
javax.swing.plaf.synth.SynthScrollBarUI.setThumbRollover(boolean)


Occurences of setTime

setTime occurences:
java.sql.CallableStatement.setTime(java.lang.String, java.sql.Time)
java.sql.CallableStatement.setTime(java.lang.String, java.sql.Time, java.util.Calendar)
java.sql.Date.setTime(long)
java.sql.PreparedStatement.setTime(int, java.sql.Time)
java.sql.PreparedStatement.setTime(int, java.sql.Time, java.util.Calendar)
java.sql.Time.setTime(long)
java.sql.Timestamp.setTime(long)
java.util.Calendar.setTime(java.util.Date)
java.util.Date.setTime(long)
java.util.zip.ZipEntry.setTime(long)
javax.sql.RowSet.setTime(int, java.sql.Time)
javax.sql.RowSet.setTime(int, java.sql.Time, java.util.Calendar)
javax.sql.RowSet.setTime(java.lang.String, java.sql.Time)
javax.sql.RowSet.setTime(java.lang.String, java.sql.Time, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setTime(int, java.sql.Time)
javax.sql.rowset.BaseRowSet.setTime(int, java.sql.Time, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setTime(java.lang.String, java.sql.Time)
javax.sql.rowset.BaseRowSet.setTime(java.lang.String, java.sql.Time, java.util.Calendar)
javax.xml.datatype.XMLGregorianCalendar.setTime(int, int, int)
javax.xml.datatype.XMLGregorianCalendar.setTime(int, int, int, int)
javax.xml.datatype.XMLGregorianCalendar.setTime(int, int, int, java.math.BigDecimal)


Occurences of setTimeOfDay

setTimeOfDay occurences:
java.util.Calendar.Builder.setTimeOfDay(int, int, int)
java.util.Calendar.Builder.setTimeOfDay(int, int, int, int)


Occurences of setTimestamp

setTimestamp occurences:
java.sql.CallableStatement.setTimestamp(java.lang.String, java.sql.Timestamp)
java.sql.CallableStatement.setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar)
java.sql.PreparedStatement.setTimestamp(int, java.sql.Timestamp)
java.sql.PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
javax.sql.RowSet.setTimestamp(int, java.sql.Timestamp)
javax.sql.RowSet.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
javax.sql.RowSet.setTimestamp(java.lang.String, java.sql.Timestamp)
javax.sql.RowSet.setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setTimestamp(int, java.sql.Timestamp)
javax.sql.rowset.BaseRowSet.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
javax.sql.rowset.BaseRowSet.setTimestamp(java.lang.String, java.sql.Timestamp)
javax.sql.rowset.BaseRowSet.setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar)


Occurences of setTimeToLive

setTimeToLive occurences:
java.net.DatagramSocketImpl.setTimeToLive(int)
java.net.MulticastSocket.setTimeToLive(int)


Occurences of setTimeZone

setTimeZone occurences:
java.text.DateFormat.setTimeZone(java.util.TimeZone)
java.util.Calendar.setTimeZone(java.util.TimeZone)
java.util.Calendar.Builder.setTimeZone(java.util.TimeZone)
java.util.GregorianCalendar.setTimeZone(java.util.TimeZone)


Occurences of Setting the Class Path

Setting the Class Path occurences:
Setting the Class Path
Setting the Class Path


Occurences of setTitle

setTitle occurences:
java.awt.Dialog.setTitle(java.lang.String)
java.awt.Frame.setTitle(java.lang.String)
javax.swing.border.TitledBorder.setTitle(java.lang.String)
javax.swing.JInternalFrame.setTitle(java.lang.String)


Occurences of setToQuadrantRotation

setToQuadrantRotation occurences:
java.awt.geom.AffineTransform.setToQuadrantRotation(int)
java.awt.geom.AffineTransform.setToQuadrantRotation(int, double, double)


Occurences of setToRotation

setToRotation occurences:
java.awt.geom.AffineTransform.setToRotation(double)
java.awt.geom.AffineTransform.setToRotation(double, double)
java.awt.geom.AffineTransform.setToRotation(double, double, double)
java.awt.geom.AffineTransform.setToRotation(double, double, double, double)


Occurences of setTrafficClass

setTrafficClass occurences:
java.net.DatagramSocket.setTrafficClass(int)
java.net.Socket.setTrafficClass(int)


Occurences of setTransactionIsolation

setTransactionIsolation occurences:
java.sql.Connection.setTransactionIsolation(int)
javax.sql.RowSet.setTransactionIsolation(int)
javax.sql.rowset.BaseRowSet.setTransactionIsolation(int)


Occurences of setTransferHandler

setTransferHandler occurences:
javax.swing.JApplet.setTransferHandler(javax.swing.TransferHandler)
javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler)
javax.swing.JDialog.setTransferHandler(javax.swing.TransferHandler)
javax.swing.JFrame.setTransferHandler(javax.swing.TransferHandler)
javax.swing.JWindow.setTransferHandler(javax.swing.TransferHandler)


Occurences of setTransform

setTransform occurences:
java.awt.geom.AffineTransform.setTransform(double, double, double, double, double, double)
java.awt.geom.AffineTransform.setTransform(java.awt.geom.AffineTransform)
java.awt.Graphics2D.setTransform(java.awt.geom.AffineTransform)
java.awt.image.renderable.RenderContext.setTransform(java.awt.geom.AffineTransform)


Occurences of setTTL

setTTL occurences:
java.net.DatagramSocketImpl.setTTL(byte)
java.net.MulticastSocket.setTTL(byte)


Occurences of setType

setType occurences:
java.awt.Window.setType(java.awt.Window.Type)
java.nio.file.attribute.AclEntry.Builder.setType(java.nio.file.attribute.AclEntryType)
javax.sql.RowSet.setType(int)
javax.sql.rowset.BaseRowSet.setType(int)
javax.swing.text.DefaultStyledDocument.ElementSpec.setType(short)
org.xml.sax.helpers.AttributesImpl.setType(int, java.lang.String)


Occurences of setTypeMap

setTypeMap occurences:
java.sql.Connection.setTypeMap(java.util.Map)
javax.sql.RowSet.setTypeMap(java.util.Map)
javax.sql.rowset.BaseRowSet.setTypeMap(java.util.Map)


Occurences of setUI

setUI occurences:
javax.swing.AbstractButton.setUI(javax.swing.plaf.ButtonUI)
javax.swing.JColorChooser.setUI(javax.swing.plaf.ColorChooserUI)
javax.swing.JComboBox.setUI(javax.swing.plaf.ComboBoxUI)
javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI)
javax.swing.JDesktopPane.setUI(javax.swing.plaf.DesktopPaneUI)
javax.swing.JInternalFrame.setUI(javax.swing.plaf.InternalFrameUI)
javax.swing.JInternalFrame.JDesktopIcon.setUI(javax.swing.plaf.DesktopIconUI)
javax.swing.JLabel.setUI(javax.swing.plaf.LabelUI)
javax.swing.JLayer.setUI(javax.swing.plaf.LayerUI)
javax.swing.JList.setUI(javax.swing.plaf.ListUI)
javax.swing.JMenuBar.setUI(javax.swing.plaf.MenuBarUI)
javax.swing.JMenuItem.setUI(javax.swing.plaf.MenuItemUI)
javax.swing.JOptionPane.setUI(javax.swing.plaf.OptionPaneUI)
javax.swing.JPanel.setUI(javax.swing.plaf.PanelUI)
javax.swing.JPopupMenu.setUI(javax.swing.plaf.PopupMenuUI)
javax.swing.JProgressBar.setUI(javax.swing.plaf.ProgressBarUI)
javax.swing.JRootPane.setUI(javax.swing.plaf.RootPaneUI)
javax.swing.JScrollBar.setUI(javax.swing.plaf.ScrollBarUI)
javax.swing.JScrollPane.setUI(javax.swing.plaf.ScrollPaneUI)
javax.swing.JSeparator.setUI(javax.swing.plaf.SeparatorUI)
javax.swing.JSlider.setUI(javax.swing.plaf.SliderUI)
javax.swing.JSpinner.setUI(javax.swing.plaf.SpinnerUI)
javax.swing.JSplitPane.setUI(javax.swing.plaf.SplitPaneUI)
javax.swing.JTabbedPane.setUI(javax.swing.plaf.TabbedPaneUI)
javax.swing.JTable.setUI(javax.swing.plaf.TableUI)
javax.swing.JToolBar.setUI(javax.swing.plaf.ToolBarUI)
javax.swing.JTree.setUI(javax.swing.plaf.TreeUI)
javax.swing.JViewport.setUI(javax.swing.plaf.ViewportUI)
javax.swing.table.JTableHeader.setUI(javax.swing.plaf.TableHeaderUI)
javax.swing.text.JTextComponent.setUI(javax.swing.plaf.TextUI)


Occurences of setUndecorated

setUndecorated occurences:
java.awt.Dialog.setUndecorated(boolean)
java.awt.Frame.setUndecorated(boolean)


Occurences of setUnderline

setUnderline occurences:
javax.swing.text.LabelView.setUnderline(boolean)
javax.swing.text.StyleConstants.setUnderline(javax.swing.text.MutableAttributeSet, boolean)


Occurences of setUnicodeStream

setUnicodeStream occurences:
java.sql.PreparedStatement.setUnicodeStream(int, java.io.InputStream, int)
javax.sql.rowset.BaseRowSet.setUnicodeStream(int, java.io.InputStream, int)


Occurences of setUnitIncrement

setUnitIncrement occurences:
java.awt.Adjustable.setUnitIncrement(int)
java.awt.Scrollbar.setUnitIncrement(int)
java.awt.ScrollPaneAdjustable.setUnitIncrement(int)
javax.swing.JScrollBar.setUnitIncrement(int)
javax.swing.JScrollPane.ScrollBar.setUnitIncrement(int)


Occurences of setURIDereferencer

setURIDereferencer occurences:
javax.xml.crypto.dom.DOMCryptoContext.setURIDereferencer(javax.xml.crypto.URIDereferencer)
javax.xml.crypto.XMLCryptoContext.setURIDereferencer(javax.xml.crypto.URIDereferencer)


Occurences of setURIResolver

setURIResolver occurences:
javax.xml.transform.Transformer.setURIResolver(javax.xml.transform.URIResolver)
javax.xml.transform.TransformerFactory.setURIResolver(javax.xml.transform.URIResolver)


Occurences of setURL

setURL occurences:
java.net.URLStreamHandler.setURL(java.net.URL, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)
java.net.URLStreamHandler.setURL(java.net.URL, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
java.sql.CallableStatement.setURL(java.lang.String, java.net.URL)
java.sql.PreparedStatement.setURL(int, java.net.URL)
javax.sql.RowSet.setURL(int, java.net.URL)
javax.sql.rowset.BaseRowSet.setURL(int, java.net.URL)
javax.xml.bind.helpers.ValidationEventLocatorImpl.setURL(java.net.URL)


Occurences of setUrl

setUrl occurences:
javax.sql.RowSet.setUrl(java.lang.String)
javax.sql.rowset.BaseRowSet.setUrl(java.lang.String)


Occurences of setUseClientMode

setUseClientMode occurences:
javax.net.ssl.SSLEngine.setUseClientMode(boolean)
javax.net.ssl.SSLServerSocket.setUseClientMode(boolean)
javax.net.ssl.SSLSocket.setUseClientMode(boolean)


Occurences of setUserData

setUserData occurences:
javax.imageio.metadata.IIOMetadataNode.setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
javax.management.Notification.setUserData(java.lang.Object)
org.w3c.dom.Node.setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)


Occurences of setUsername

setUsername occurences:
javax.sql.RowSet.setUsername(java.lang.String)
javax.sql.rowset.BaseRowSet.setUsername(java.lang.String)


Occurences of setUserObject

setUserObject occurences:
javax.imageio.metadata.IIOMetadataNode.setUserObject(java.lang.Object)
javax.swing.tree.DefaultMutableTreeNode.setUserObject(java.lang.Object)
javax.swing.tree.MutableTreeNode.setUserObject(java.lang.Object)


Occurences of setValidating

setValidating occurences:
javax.xml.bind.helpers.AbstractUnmarshallerImpl.setValidating(boolean)
javax.xml.bind.Unmarshaller.setValidating(boolean)
javax.xml.parsers.DocumentBuilderFactory.setValidating(boolean)
javax.xml.parsers.SAXParserFactory.setValidating(boolean)


Occurences of setValue

setValue occurences:
com.sun.jdi.ArrayReference.setValue(int, com.sun.jdi.Value)
com.sun.jdi.ClassType.setValue(com.sun.jdi.Field, com.sun.jdi.Value)
com.sun.jdi.connect.Connector.Argument.setValue(java.lang.String)
com.sun.jdi.connect.Connector.BooleanArgument.setValue(boolean)
com.sun.jdi.connect.Connector.IntegerArgument.setValue(int)
com.sun.jdi.ObjectReference.setValue(com.sun.jdi.Field, com.sun.jdi.Value)
com.sun.jdi.StackFrame.setValue(com.sun.jdi.LocalVariable, com.sun.jdi.Value)
java.awt.Adjustable.setValue(int)
java.awt.Scrollbar.setValue(int)
java.awt.ScrollPaneAdjustable.setValue(int)
java.beans.Expression.setValue(java.lang.Object)
java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object)
java.beans.PropertyEditor.setValue(java.lang.Object)
java.beans.PropertyEditorSupport.setValue(java.lang.Object)
java.net.HttpCookie.setValue(java.lang.String)
java.util.AbstractMap.SimpleEntry.setValue(java.lang.Object)
java.util.AbstractMap.SimpleEntry.setValue(V)
java.util.AbstractMap.SimpleImmutableEntry.setValue(java.lang.Object)
java.util.AbstractMap.SimpleImmutableEntry.setValue(V)
java.util.Map.Entry.setValue(java.lang.Object)
java.util.Map.Entry.setValue(V)
javax.sound.sampled.BooleanControl.setValue(boolean)
javax.sound.sampled.EnumControl.setValue(java.lang.Object)
javax.sound.sampled.FloatControl.setValue(float)
javax.swing.BoundedRangeModel.setValue(int)
javax.swing.DefaultBoundedRangeModel.setValue(int)
javax.swing.DefaultCellEditor.EditorDelegate.setValue(java.lang.Object)
javax.swing.JFormattedTextField.setValue(java.lang.Object)
javax.swing.JOptionPane.setValue(java.lang.Object)
javax.swing.JProgressBar.setValue(int)
javax.swing.JScrollBar.setValue(int)
javax.swing.JSlider.setValue(int)
javax.swing.JSpinner.setValue(java.lang.Object)
javax.swing.Renderer.setValue(java.lang.Object, boolean)
javax.swing.SpinnerDateModel.setValue(java.lang.Object)
javax.swing.SpinnerListModel.setValue(java.lang.Object)
javax.swing.SpinnerModel.setValue(java.lang.Object)
javax.swing.SpinnerNumberModel.setValue(java.lang.Object)
javax.swing.Spring.setValue(int)
javax.swing.table.DefaultTableCellRenderer.setValue(java.lang.Object)
javax.xml.bind.JAXBElement.setValue(java.lang.Object)
javax.xml.bind.JAXBElement.setValue(T)
javax.xml.soap.Node.setValue(java.lang.String)
org.w3c.dom.Attr.setValue(java.lang.String)
org.xml.sax.helpers.AttributesImpl.setValue(int, java.lang.String)


Occurences of setValueAt

setValueAt occurences:
javax.swing.JTable.setValueAt(java.lang.Object, int, int)
javax.swing.table.AbstractTableModel.setValueAt(java.lang.Object, int, int)
javax.swing.table.DefaultTableModel.setValueAt(java.lang.Object, int, int)
javax.swing.table.TableModel.setValueAt(java.lang.Object, int, int)


Occurences of setValueIsAdjusting

setValueIsAdjusting occurences:
java.awt.Scrollbar.setValueIsAdjusting(boolean)
java.awt.ScrollPaneAdjustable.setValueIsAdjusting(boolean)
javax.swing.BoundedRangeModel.setValueIsAdjusting(boolean)
javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(boolean)
javax.swing.DefaultListSelectionModel.setValueIsAdjusting(boolean)
javax.swing.JList.setValueIsAdjusting(boolean)
javax.swing.JScrollBar.setValueIsAdjusting(boolean)
javax.swing.JSlider.setValueIsAdjusting(boolean)
javax.swing.ListSelectionModel.setValueIsAdjusting(boolean)


Occurences of setValues

setValues occurences:
com.sun.jdi.ArrayReference.setValues(int, java.util.List, int, int)
com.sun.jdi.ArrayReference.setValues(java.util.List)
java.awt.Scrollbar.setValues(int, int, int, int)
javax.swing.JScrollBar.setValues(int, int, int, int)


Occurences of setVerbose

setVerbose occurences:
java.lang.management.ClassLoadingMXBean.setVerbose(boolean)
java.lang.management.MemoryMXBean.setVerbose(boolean)


Occurences of setVerticalAlignment

setVerticalAlignment occurences:
javax.swing.AbstractButton.setVerticalAlignment(int)
javax.swing.JLabel.setVerticalAlignment(int)


Occurences of setVerticalScrollBarPolicy

setVerticalScrollBarPolicy occurences:
javax.swing.JScrollPane.setVerticalScrollBarPolicy(int)
javax.swing.ScrollPaneLayout.setVerticalScrollBarPolicy(int)


Occurences of setVerticalTextPosition

setVerticalTextPosition occurences:
javax.swing.AbstractButton.setVerticalTextPosition(int)
javax.swing.JLabel.setVerticalTextPosition(int)


Occurences of setVgap

setVgap occurences:
java.awt.BorderLayout.setVgap(int)
java.awt.CardLayout.setVgap(int)
java.awt.FlowLayout.setVgap(int)
java.awt.GridLayout.setVgap(int)


Occurences of setView

setView occurences:
javax.swing.JLayer.setView(java.awt.Component)
javax.swing.JLayer.setView(V)
javax.swing.JViewport.setView(java.awt.Component)
javax.swing.plaf.basic.BasicTextUI.setView(javax.swing.text.View)


Occurences of setVisible

setVisible occurences:
java.awt.Component.setVisible(boolean)
java.awt.Component.AccessibleAWTComponent.setVisible(boolean)
java.awt.Dialog.setVisible(boolean)
java.awt.List.AccessibleAWTList.AccessibleAWTListChild.setVisible(boolean)
java.awt.MenuComponent.AccessibleAWTMenuComponent.setVisible(boolean)
java.awt.Window.setVisible(boolean)
javax.accessibility.AccessibleComponent.setVisible(boolean)
javax.swing.JComponent.setVisible(boolean)
javax.swing.JList.AccessibleJList.AccessibleJListChild.setVisible(boolean)
javax.swing.JPopupMenu.setVisible(boolean)
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.setVisible(boolean)
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.setVisible(boolean)
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setVisible(boolean)
javax.swing.text.Caret.setVisible(boolean)
javax.swing.text.DefaultCaret.setVisible(boolean)


Occurences of setVisibleAmount

setVisibleAmount occurences:
java.awt.Adjustable.setVisibleAmount(int)
java.awt.Scrollbar.setVisibleAmount(int)
java.awt.ScrollPaneAdjustable.setVisibleAmount(int)
javax.swing.JScrollBar.setVisibleAmount(int)


Occurences of setVisibleRowCount

setVisibleRowCount occurences:
javax.swing.JList.setVisibleRowCount(int)
javax.swing.JTree.setVisibleRowCount(int)


Occurences of setWantClientAuth

setWantClientAuth occurences:
javax.net.ssl.SSLEngine.setWantClientAuth(boolean)
javax.net.ssl.SSLParameters.setWantClientAuth(boolean)
javax.net.ssl.SSLServerSocket.setWantClientAuth(boolean)
javax.net.ssl.SSLSocket.setWantClientAuth(boolean)


Occurences of setWeekDate

setWeekDate occurences:
java.util.Calendar.setWeekDate(int, int, int)
java.util.Calendar.Builder.setWeekDate(int, int, int)
java.util.GregorianCalendar.setWeekDate(int, int, int)


Occurences of setWheelScrollingEnabled

setWheelScrollingEnabled occurences:
java.awt.ScrollPane.setWheelScrollingEnabled(boolean)
javax.swing.JScrollPane.setWheelScrollingEnabled(boolean)


Occurences of setWidth

setWidth occurences:
javax.swing.SpringLayout.Constraints.setWidth(javax.swing.Spring)
javax.swing.table.TableColumn.setWidth(int)


Occurences of setWritable

setWritable occurences:
java.io.File.setWritable(boolean)
java.io.File.setWritable(boolean, boolean)


Occurences of setWriter

setWriter occurences:
javax.script.ScriptContext.setWriter(java.io.Writer)
javax.script.SimpleScriptContext.setWriter(java.io.Writer)
javax.xml.transform.stream.StreamResult.setWriter(java.io.Writer)


Occurences of setXIncludeAware

setXIncludeAware occurences:
javax.xml.parsers.DocumentBuilderFactory.setXIncludeAware(boolean)
javax.xml.parsers.SAXParserFactory.setXIncludeAware(boolean)


Occurences of setXORMode

setXORMode occurences:
java.awt.Graphics.setXORMode(java.awt.Color)
javax.swing.DebugGraphics.setXORMode(java.awt.Color)


Occurences of setXPathFunctionResolver

setXPathFunctionResolver occurences:
javax.xml.xpath.XPath.setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver)
javax.xml.xpath.XPathFactory.setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver)


Occurences of setXPathVariableResolver

setXPathVariableResolver occurences:
javax.xml.xpath.XPath.setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver)
javax.xml.xpath.XPathFactory.setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver)


Occurences of setYear

setYear occurences:
java.sql.Time.setYear(int)
java.util.Date.setYear(int)
javax.xml.datatype.XMLGregorianCalendar.setYear(int)
javax.xml.datatype.XMLGregorianCalendar.setYear(java.math.BigInteger)


Occurences of set_as_default

set_as_default occurences:
org.omg.CORBA.DynUnion.set_as_default()
org.omg.CORBA.DynUnion.set_as_default(boolean)


Occurences of set_as_string

set_as_string occurences:
org.omg.DynamicAny.DynEnumOperations.set_as_string(java.lang.String)
org.omg.DynamicAny._DynEnumStub.set_as_string(java.lang.String)


Occurences of set_as_ulong

set_as_ulong occurences:
org.omg.DynamicAny.DynEnumOperations.set_as_ulong(int)
org.omg.DynamicAny._DynEnumStub.set_as_ulong(int)


Occurences of set_discriminator

set_discriminator occurences:
org.omg.DynamicAny.DynUnionOperations.set_discriminator(org.omg.DynamicAny.DynAny)
org.omg.DynamicAny._DynUnionStub.set_discriminator(org.omg.DynamicAny.DynAny)


Occurences of set_elements

set_elements occurences:
org.omg.CORBA.DynArray.set_elements(org.omg.CORBA.Any:A)
org.omg.CORBA.DynSequence.set_elements(org.omg.CORBA.Any:A)
org.omg.DynamicAny.DynArrayOperations.set_elements(org.omg.CORBA.Any:A)
org.omg.DynamicAny.DynSequenceOperations.set_elements(org.omg.CORBA.Any:A)
org.omg.DynamicAny._DynArrayStub.set_elements(org.omg.CORBA.Any:A)
org.omg.DynamicAny._DynSequenceStub.set_elements(org.omg.CORBA.Any:A)


Occurences of set_elements_as_dyn_any

set_elements_as_dyn_any occurences:
org.omg.DynamicAny.DynArrayOperations.set_elements_as_dyn_any(org.omg.DynamicAny.DynAny:A)
org.omg.DynamicAny.DynSequenceOperations.set_elements_as_dyn_any(org.omg.DynamicAny.DynAny:A)
org.omg.DynamicAny._DynArrayStub.set_elements_as_dyn_any(org.omg.DynamicAny.DynAny:A)
org.omg.DynamicAny._DynSequenceStub.set_elements_as_dyn_any(org.omg.DynamicAny.DynAny:A)


Occurences of set_length

set_length occurences:
org.omg.DynamicAny.DynSequenceOperations.set_length(int)
org.omg.DynamicAny._DynSequenceStub.set_length(int)


Occurences of set_members

set_members occurences:
org.omg.CORBA.DynStruct.set_members(org.omg.CORBA.NameValuePair:A)
org.omg.CORBA.DynValue.set_members(org.omg.CORBA.NameValuePair:A)
org.omg.DynamicAny.DynStructOperations.set_members(org.omg.DynamicAny.NameValuePair:A)
org.omg.DynamicAny.DynValueOperations.set_members(org.omg.DynamicAny.NameValuePair:A)
org.omg.DynamicAny._DynStructStub.set_members(org.omg.DynamicAny.NameValuePair:A)
org.omg.DynamicAny._DynValueStub.set_members(org.omg.DynamicAny.NameValuePair:A)


Occurences of set_members_as_dyn_any

set_members_as_dyn_any occurences:
org.omg.DynamicAny.DynStructOperations.set_members_as_dyn_any(org.omg.DynamicAny.NameDynAnyPair:A)
org.omg.DynamicAny.DynValueOperations.set_members_as_dyn_any(org.omg.DynamicAny.NameDynAnyPair:A)
org.omg.DynamicAny._DynStructStub.set_members_as_dyn_any(org.omg.DynamicAny.NameDynAnyPair:A)
org.omg.DynamicAny._DynValueStub.set_members_as_dyn_any(org.omg.DynamicAny.NameDynAnyPair:A)


Occurences of set_parameters

set_parameters occurences:
org.omg.CORBA.ORB.set_parameters(java.applet.Applet, java.util.Properties)
org.omg.CORBA.ORB.set_parameters(java.lang.String:A, java.util.Properties)


Occurences of set_slot

set_slot occurences:
org.omg.PortableInterceptor.CurrentOperations.set_slot(int, org.omg.CORBA.Any)
org.omg.PortableInterceptor.ServerRequestInfoOperations.set_slot(int, org.omg.CORBA.Any)


Occurences of set_to_default_member

set_to_default_member occurences:
org.omg.DynamicAny.DynUnionOperations.set_to_default_member()
org.omg.DynamicAny._DynUnionStub.set_to_default_member()


Occurences of set_to_no_active_member

set_to_no_active_member occurences:
org.omg.DynamicAny.DynUnionOperations.set_to_no_active_member()
org.omg.DynamicAny._DynUnionStub.set_to_no_active_member()


Occurences of set_to_null

set_to_null occurences:
org.omg.DynamicAny.DynValueCommonOperations.set_to_null()
org.omg.DynamicAny._DynValueStub.set_to_null()


Occurences of set_to_value

set_to_value occurences:
org.omg.DynamicAny.DynValueCommonOperations.set_to_value()
org.omg.DynamicAny._DynValueStub.set_to_value()


Occurences of set_value

set_value occurences:
org.omg.CORBA.DynFixed.set_value(byte:A)
org.omg.DynamicAny.DynFixedOperations.set_value(java.lang.String)
org.omg.DynamicAny._DynFixedStub.set_value(java.lang.String)


Occurences of severe

severe occurences:
java.util.logging.Logger.severe(java.lang.String)
java.util.logging.Logger.severe(java.util.function.Supplier)


Occurences of SE_RESIZE_CURSOR

SE_RESIZE_CURSOR occurences:
java.awt.SE_RESIZE_CURSOR
java.awt.SE_RESIZE_CURSOR


Occurences of SHA1

SHA1 occurences:
java.security.spec.SHA1
javax.xml.crypto.dsig.SHA1


Occurences of SHA256

SHA256 occurences:
java.security.spec.SHA256
javax.xml.crypto.dsig.SHA256


Occurences of SHA512

SHA512 occurences:
java.security.spec.SHA512
javax.xml.crypto.dsig.SHA512


Occurences of shadow

shadow occurences:
javax.swing.border.shadow
javax.swing.plaf.basic.shadow
javax.swing.plaf.basic.shadow
javax.swing.plaf.basic.shadow
javax.swing.plaf.basic.shadow
javax.swing.plaf.basic.shadow


Occurences of shape

shape occurences:
java.awt.font.NumericShaper.shape(char:A, int, int)
java.awt.font.NumericShaper.shape(char:A, int, int, int)
java.awt.font.NumericShaper.shape(char:A, int, int, java.awt.font.NumericShaper.Range)


Occurences of SHARADA

SHARADA occurences:
java.lang.SHARADA
java.lang.SHARADA


Occurences of sharedInstance

sharedInstance occurences:
javax.swing.JTree.EmptySelectionModel.sharedInstance()
javax.swing.sharedInstance
javax.swing.ToolTipManager.sharedInstance()


Occurences of SHAVIAN

SHAVIAN occurences:
java.lang.SHAVIAN
java.lang.SHAVIAN


Occurences of shear

shear occurences:
java.awt.geom.AffineTransform.shear(double, double)
java.awt.Graphics2D.shear(double, double)


Occurences of SHIFT_MASK

SHIFT_MASK occurences:
java.awt.event.SHIFT_MASK
java.awt.event.SHIFT_MASK
java.awt.SHIFT_MASK


Occurences of SHORT

SHORT occurences:
java.text.SHORT
java.time.format.SHORT
java.time.format.SHORT
java.util.SHORT
java.util.SHORT
javax.lang.model.type.SHORT
javax.management.openmbean.SHORT


Occurences of Short (constructors)

Short (constructors) occurences:
java.lang.Short(java.lang.String)
java.lang.Short(short)


Occurences of ShortBufferException (constructors)

ShortBufferException (constructors) occurences:
javax.crypto.ShortBufferException()
javax.crypto.ShortBufferException(java.lang.String)


Occurences of ShortHolder (constructors)

ShortHolder (constructors) occurences:
org.omg.CORBA.ShortHolder()
org.omg.CORBA.ShortHolder(short)


Occurences of ShortLookupTable (constructors)

ShortLookupTable (constructors) occurences:
java.awt.image.ShortLookupTable(int, short:A)
java.awt.image.ShortLookupTable(int, short:A:A)


Occurences of ShortMessage (constructors)

ShortMessage (constructors) occurences:
javax.sound.midi.ShortMessage()
javax.sound.midi.ShortMessage(byte:A)
javax.sound.midi.ShortMessage(int)
javax.sound.midi.ShortMessage(int, int, int)
javax.sound.midi.ShortMessage(int, int, int, int)


Occurences of ShortSeqHolder (constructors)

ShortSeqHolder (constructors) occurences:
org.omg.CORBA.ShortSeqHolder()
org.omg.CORBA.ShortSeqHolder(short:A)


Occurences of shortValue

shortValue occurences:
com.sun.jdi.PrimitiveValue.shortValue()
java.lang.Byte.shortValue()
java.lang.Double.shortValue()
java.lang.Float.shortValue()
java.lang.Integer.shortValue()
java.lang.Long.shortValue()
java.lang.Number.shortValue()
java.lang.Short.shortValue()


Occurences of shortValueExact

shortValueExact occurences:
java.math.BigDecimal.shortValueExact()
java.math.BigInteger.shortValueExact()


Occurences of SHORT_STANDALONE

SHORT_STANDALONE occurences:
java.time.format.SHORT_STANDALONE
java.util.SHORT_STANDALONE


Occurences of shouldPadTabRun

shouldPadTabRun occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.shouldPadTabRun(int, int)
javax.swing.plaf.metal.MetalTabbedPaneUI.shouldPadTabRun(int, int)


Occurences of shouldRotateTabRuns

shouldRotateTabRuns occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.shouldRotateTabRuns(int)
javax.swing.plaf.metal.MetalTabbedPaneUI.shouldRotateTabRuns(int, int)


Occurences of shouldSelectCell

shouldSelectCell occurences:
javax.swing.AbstractCellEditor.shouldSelectCell(java.util.EventObject)
javax.swing.CellEditor.shouldSelectCell(java.util.EventObject)
javax.swing.DefaultCellEditor.shouldSelectCell(java.util.EventObject)
javax.swing.DefaultCellEditor.EditorDelegate.shouldSelectCell(java.util.EventObject)
javax.swing.tree.DefaultTreeCellEditor.shouldSelectCell(java.util.EventObject)


Occurences of shouldUpdateStyleOnAncestorChanged

shouldUpdateStyleOnAncestorChanged occurences:
javax.swing.plaf.nimbus.NimbusLookAndFeel.shouldUpdateStyleOnAncestorChanged()
javax.swing.plaf.synth.SynthLookAndFeel.shouldUpdateStyleOnAncestorChanged()


Occurences of shouldUpdateStyleOnEvent

shouldUpdateStyleOnEvent occurences:
javax.swing.plaf.nimbus.NimbusLookAndFeel.shouldUpdateStyleOnEvent(java.beans.PropertyChangeEvent)
javax.swing.plaf.synth.SynthLookAndFeel.shouldUpdateStyleOnEvent(java.beans.PropertyChangeEvent)


Occurences of show

show occurences:
java.awt.CardLayout.show(java.awt.Container, java.lang.String)
java.awt.Component.show()
java.awt.Component.show(boolean)
java.awt.Component.BltBufferStrategy.show()
java.awt.Component.FlipBufferStrategy.show()
java.awt.Dialog.show()
java.awt.image.BufferStrategy.show()
java.awt.PopupMenu.show(java.awt.Component, int, int)
java.awt.Window.show()
javax.swing.JInternalFrame.show()
javax.swing.JPopupMenu.show(java.awt.Component, int, int)
javax.swing.plaf.basic.BasicComboPopup.show()
javax.swing.plaf.basic.ComboPopup.show()
javax.swing.Popup.show()


Occurences of showConfirmDialog

showConfirmDialog occurences:
javax.swing.JOptionPane.showConfirmDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int)
javax.swing.JOptionPane.showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int, javax.swing.Icon)


Occurences of showDialog

showDialog occurences:
javax.swing.JColorChooser.showDialog(java.awt.Component, java.lang.String, java.awt.Color)
javax.swing.JFileChooser.showDialog(java.awt.Component, java.lang.String)


Occurences of showDocument

showDocument occurences:
java.applet.AppletContext.showDocument(java.net.URL)
java.applet.AppletContext.showDocument(java.net.URL, java.lang.String)


Occurences of showInputDialog

showInputDialog occurences:
javax.swing.JOptionPane.showInputDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showInputDialog(java.awt.Component, java.lang.Object, java.lang.Object)
javax.swing.JOptionPane.showInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon, java.lang.Object:A, java.lang.Object)
javax.swing.JOptionPane.showInputDialog(java.lang.Object)
javax.swing.JOptionPane.showInputDialog(java.lang.Object, java.lang.Object)


Occurences of showInternalConfirmDialog

showInternalConfirmDialog occurences:
javax.swing.JOptionPane.showInternalConfirmDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int)
javax.swing.JOptionPane.showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int, javax.swing.Icon)


Occurences of showInternalInputDialog

showInternalInputDialog occurences:
javax.swing.JOptionPane.showInternalInputDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showInternalInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showInternalInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon, java.lang.Object:A, java.lang.Object)


Occurences of showInternalMessageDialog

showInternalMessageDialog occurences:
javax.swing.JOptionPane.showInternalMessageDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showInternalMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showInternalMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon)


Occurences of showMessageDialog

showMessageDialog occurences:
javax.swing.JOptionPane.showMessageDialog(java.awt.Component, java.lang.Object)
javax.swing.JOptionPane.showMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int)
javax.swing.JOptionPane.showMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon)


Occurences of showStatus

showStatus occurences:
java.applet.Applet.showStatus(java.lang.String)
java.applet.AppletContext.showStatus(java.lang.String)


Occurences of showSystemMenu

showSystemMenu occurences:
javax.swing.plaf.basic.BasicInternalFrameTitlePane.showSystemMenu()
javax.swing.plaf.metal.MetalInternalFrameTitlePane.showSystemMenu()


Occurences of shuffle

shuffle occurences:
java.util.Collections.shuffle(java.util.List)
java.util.Collections.shuffle(java.util.List, java.util.Random)


Occurences of shutdown

shutdown occurences:
java.nio.channels.AsynchronousChannelGroup.shutdown()
java.nio.channels.shutdown
java.rmi.activation.ActivationSystem.shutdown()
java.util.concurrent.ExecutorService.shutdown()
java.util.concurrent.ForkJoinPool.shutdown()
java.util.concurrent.ScheduledThreadPoolExecutor.shutdown()
java.util.concurrent.ThreadPoolExecutor.shutdown()
org.omg.CORBA.ORB.shutdown(boolean)


Occurences of shutdownInput

shutdownInput occurences:
java.net.Socket.shutdownInput()
java.net.SocketImpl.shutdownInput()
java.nio.channels.AsynchronousSocketChannel.shutdownInput()
java.nio.channels.SocketChannel.shutdownInput()


Occurences of shutdownNow

shutdownNow occurences:
java.nio.channels.AsynchronousChannelGroup.shutdownNow()
java.util.concurrent.ExecutorService.shutdownNow()
java.util.concurrent.ForkJoinPool.shutdownNow()
java.util.concurrent.ScheduledThreadPoolExecutor.shutdownNow()
java.util.concurrent.ThreadPoolExecutor.shutdownNow()


Occurences of shutdownOutput

shutdownOutput occurences:
java.net.Socket.shutdownOutput()
java.net.SocketImpl.shutdownOutput()
java.nio.channels.AsynchronousSocketChannel.shutdownOutput()
java.nio.channels.SocketChannel.shutdownOutput()


Occurences of sign

sign occurences:
java.security.Signature.sign()
java.security.Signature.sign(byte:A, int, int)
javax.xml.crypto.dsig.XMLSignature.sign(javax.xml.crypto.dsig.XMLSignContext)


Occurences of SIGN

SIGN occurences:
java.security.SIGN
java.text.SIGN
javax.xml.crypto.SIGN


Occurences of signal

signal occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.signal()
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.signal()
java.util.concurrent.locks.Condition.signal()


Occurences of signalAll

signalAll occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.signalAll()
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.signalAll()
java.util.concurrent.locks.Condition.signalAll()


Occurences of signature

signature occurences:
com.sun.javadoc.ExecutableMemberDoc.signature()
com.sun.jdi.LocalVariable.signature()
com.sun.jdi.Type.signature()
com.sun.jdi.TypeComponent.signature()


Occurences of SignatureException (constructors)

SignatureException (constructors) occurences:
java.security.SignatureException()
java.security.SignatureException(java.lang.String)
java.security.SignatureException(java.lang.String, java.lang.Throwable)
java.security.SignatureException(java.lang.Throwable)


Occurences of Signer (constructors)

Signer (constructors) occurences:
java.security.Signer()
java.security.Signer(java.lang.String)
java.security.Signer(java.lang.String, java.security.IdentityScope)


Occurences of signum

signum occurences:
java.lang.Integer.signum(int)
java.lang.Long.signum(long)
java.lang.Math.signum(double)
java.lang.Math.signum(float)
java.lang.StrictMath.signum(double)
java.lang.StrictMath.signum(float)
java.math.BigDecimal.signum()
java.math.BigInteger.signum()


Occurences of SimpleAnnotationValueVisitor6 (constructors)

SimpleAnnotationValueVisitor6 (constructors) occurences:
javax.lang.model.util.SimpleAnnotationValueVisitor6()
javax.lang.model.util.SimpleAnnotationValueVisitor6(java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6(R)


Occurences of SimpleAnnotationValueVisitor7 (constructors)

SimpleAnnotationValueVisitor7 (constructors) occurences:
javax.lang.model.util.SimpleAnnotationValueVisitor7()
javax.lang.model.util.SimpleAnnotationValueVisitor7(java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor7(R)


Occurences of SimpleAnnotationValueVisitor8 (constructors)

SimpleAnnotationValueVisitor8 (constructors) occurences:
javax.lang.model.util.SimpleAnnotationValueVisitor8()
javax.lang.model.util.SimpleAnnotationValueVisitor8(java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor8(R)


Occurences of SimpleAttributeSet (constructors)

SimpleAttributeSet (constructors) occurences:
javax.swing.text.SimpleAttributeSet()
javax.swing.text.SimpleAttributeSet(javax.swing.text.AttributeSet)


Occurences of SimpleBindings (constructors)

SimpleBindings (constructors) occurences:
javax.script.SimpleBindings()
javax.script.SimpleBindings(java.util.Map)


Occurences of SimpleDateFormat (constructors)

SimpleDateFormat (constructors) occurences:
java.text.SimpleDateFormat()
java.text.SimpleDateFormat(java.lang.String)
java.text.SimpleDateFormat(java.lang.String, java.text.DateFormatSymbols)
java.text.SimpleDateFormat(java.lang.String, java.util.Locale)


Occurences of SimpleDocTreeVisitor (constructors)

SimpleDocTreeVisitor (constructors) occurences:
com.sun.source.util.SimpleDocTreeVisitor()
com.sun.source.util.SimpleDocTreeVisitor(java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor(R)


Occurences of SimpleElementVisitor6 (constructors)

SimpleElementVisitor6 (constructors) occurences:
javax.lang.model.util.SimpleElementVisitor6()
javax.lang.model.util.SimpleElementVisitor6(java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6(R)


Occurences of SimpleElementVisitor7 (constructors)

SimpleElementVisitor7 (constructors) occurences:
javax.lang.model.util.SimpleElementVisitor7()
javax.lang.model.util.SimpleElementVisitor7(java.lang.Object)
javax.lang.model.util.SimpleElementVisitor7(R)


Occurences of SimpleElementVisitor8 (constructors)

SimpleElementVisitor8 (constructors) occurences:
javax.lang.model.util.SimpleElementVisitor8()
javax.lang.model.util.SimpleElementVisitor8(java.lang.Object)
javax.lang.model.util.SimpleElementVisitor8(R)


Occurences of SimpleEntry

SimpleEntry occurences:
java.util.AbstractMap.SimpleEntry.SimpleEntry(java.lang.Object, java.lang.Object)
java.util.AbstractMap.SimpleEntry.SimpleEntry(java.util.Map.Entry)
java.util.AbstractMap.SimpleEntry.SimpleEntry(K, V)


Occurences of SimpleImmutableEntry

SimpleImmutableEntry occurences:
java.util.AbstractMap.SimpleImmutableEntry.SimpleImmutableEntry(java.lang.Object, java.lang.Object)
java.util.AbstractMap.SimpleImmutableEntry.SimpleImmutableEntry(java.util.Map.Entry)
java.util.AbstractMap.SimpleImmutableEntry.SimpleImmutableEntry(K, V)


Occurences of SimpleTimeZone (constructors)

SimpleTimeZone (constructors) occurences:
java.util.SimpleTimeZone(int, java.lang.String)
java.util.SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int)
java.util.SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int, int)
java.util.SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int, int, int, int)


Occurences of SimpleTreeVisitor (constructors)

SimpleTreeVisitor (constructors) occurences:
com.sun.source.util.SimpleTreeVisitor()
com.sun.source.util.SimpleTreeVisitor(java.lang.Object)
com.sun.source.util.SimpleTreeVisitor(R)


Occurences of SimpleTypeVisitor6 (constructors)

SimpleTypeVisitor6 (constructors) occurences:
javax.lang.model.util.SimpleTypeVisitor6()
javax.lang.model.util.SimpleTypeVisitor6(java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6(R)


Occurences of SimpleTypeVisitor7 (constructors)

SimpleTypeVisitor7 (constructors) occurences:
javax.lang.model.util.SimpleTypeVisitor7()
javax.lang.model.util.SimpleTypeVisitor7(java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor7(R)


Occurences of SimpleTypeVisitor8 (constructors)

SimpleTypeVisitor8 (constructors) occurences:
javax.lang.model.util.SimpleTypeVisitor8()
javax.lang.model.util.SimpleTypeVisitor8(java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor8(R)


Occurences of sin

sin occurences:
java.lang.Math.sin(double)
java.lang.StrictMath.sin(double)


Occurences of SinglePixelPackedSampleModel (constructors)

SinglePixelPackedSampleModel (constructors) occurences:
java.awt.image.SinglePixelPackedSampleModel(int, int, int, int, int:A)
java.awt.image.SinglePixelPackedSampleModel(int, int, int, int:A)


Occurences of singleton

singleton occurences:
java.util.Collections.singleton(java.lang.Object)
java.util.Collections.singleton(T)


Occurences of singletonList

singletonList occurences:
java.util.Collections.singletonList(java.lang.Object)
java.util.Collections.singletonList(T)


Occurences of singletonMap

singletonMap occurences:
java.util.Collections.singletonMap(java.lang.Object, java.lang.Object)
java.util.Collections.singletonMap(K, V)


Occurences of sinh

sinh occurences:
java.lang.Math.sinh(double)
java.lang.StrictMath.sinh(double)


Occurences of SINHALA

SINHALA occurences:
java.lang.SINHALA
java.lang.SINHALA


Occurences of SIZE

SIZE occurences:
java.awt.font.SIZE
java.lang.SIZE
java.lang.SIZE
java.lang.SIZE
java.lang.SIZE
java.lang.SIZE
java.lang.SIZE
java.lang.SIZE
javax.swing.text.html.SIZE


Occurences of size

size occurences:
com.sun.jdi.request.StepRequest.size()
java.awt.Component.size()
java.awt.image.size
java.awt.RenderingHints.size()
java.awt.size
java.beans.beancontext.BeanContextMembershipEvent.size()
java.beans.beancontext.BeanContextSupport.size()
java.io.ByteArrayOutputStream.size()
java.io.CharArrayWriter.size()
java.io.DataOutputStream.size()
java.nio.channels.AsynchronousFileChannel.size()
java.nio.channels.FileChannel.size()
java.nio.channels.FileLock.size()
java.nio.channels.SeekableByteChannel.size()
java.nio.file.attribute.BasicFileAttributes.size()
java.nio.file.attribute.UserDefinedFileAttributeView.size(java.lang.String)
java.nio.file.Files.size(java.nio.file.Path)
java.security.IdentityScope.size()
java.security.KeyStore.size()
java.util.AbstractCollection.size()
java.util.AbstractMap.size()
java.util.ArrayDeque.size()
java.util.ArrayList.size()
java.util.BitSet.size()
java.util.Collection.size()
java.util.concurrent.ArrayBlockingQueue.size()
java.util.concurrent.BlockingDeque.size()
java.util.concurrent.ConcurrentHashMap.size()
java.util.concurrent.ConcurrentHashMap.KeySetView.size()
java.util.concurrent.ConcurrentLinkedDeque.size()
java.util.concurrent.ConcurrentLinkedQueue.size()
java.util.concurrent.ConcurrentSkipListMap.size()
java.util.concurrent.ConcurrentSkipListSet.size()
java.util.concurrent.CopyOnWriteArrayList.size()
java.util.concurrent.CopyOnWriteArraySet.size()
java.util.concurrent.DelayQueue.size()
java.util.concurrent.LinkedBlockingDeque.size()
java.util.concurrent.LinkedBlockingQueue.size()
java.util.concurrent.LinkedTransferQueue.size()
java.util.concurrent.PriorityBlockingQueue.size()
java.util.concurrent.SynchronousQueue.size()
java.util.Deque.size()
java.util.Dictionary.size()
java.util.EnumMap.size()
java.util.HashMap.size()
java.util.HashSet.size()
java.util.Hashtable.size()
java.util.IdentityHashMap.size()
java.util.jar.Attributes.size()
java.util.LinkedList.size()
java.util.List.size()
java.util.Map.size()
java.util.PriorityQueue.size()
java.util.Set.size()
java.util.TreeMap.size()
java.util.TreeSet.size()
java.util.Vector.size()
java.util.WeakHashMap.size()
java.util.zip.ZipFile.size()
javax.accessibility.AccessibleRelationSet.size()
javax.activation.MimeTypeParameterList.size()
javax.management.openmbean.TabularData.size()
javax.management.openmbean.TabularDataSupport.size()
javax.naming.CompositeName.size()
javax.naming.CompoundName.size()
javax.naming.directory.Attribute.size()
javax.naming.directory.Attributes.size()
javax.naming.directory.BasicAttribute.size()
javax.naming.directory.BasicAttributes.size()
javax.naming.ldap.LdapName.size()
javax.naming.ldap.Rdn.size()
javax.naming.Name.size()
javax.naming.Reference.size()
javax.print.attribute.AttributeSet.size()
javax.print.attribute.HashAttributeSet.size()
javax.script.SimpleBindings.size()
javax.sound.midi.Track.size()
javax.sql.rowset.CachedRowSet.size()
javax.swing.ActionMap.size()
javax.swing.DefaultListModel.size()
javax.swing.InputMap.size()


Occurences of Size2DSyntax (constructors)

Size2DSyntax (constructors) occurences:
javax.print.attribute.Size2DSyntax(float, float, int)
javax.print.attribute.Size2DSyntax(int, int, int)


Occurences of sizeColumnsToFit

sizeColumnsToFit occurences:
javax.swing.JTable.sizeColumnsToFit(boolean)
javax.swing.JTable.sizeColumnsToFit(int)


Occurences of SizeLimitExceededException (constructors)

SizeLimitExceededException (constructors) occurences:
javax.naming.SizeLimitExceededException()
javax.naming.SizeLimitExceededException(java.lang.String)


Occurences of SizeRequirements (constructors)

SizeRequirements (constructors) occurences:
javax.swing.SizeRequirements()
javax.swing.SizeRequirements(int, int, int, float)


Occurences of SizeSequence (constructors)

SizeSequence (constructors) occurences:
javax.swing.SizeSequence()
javax.swing.SizeSequence(int)
javax.swing.SizeSequence(int, int)
javax.swing.SizeSequence(int:A)


Occurences of SkeletonNotFoundException (constructors)

SkeletonNotFoundException (constructors) occurences:
java.rmi.server.SkeletonNotFoundException(java.lang.String)
java.rmi.server.SkeletonNotFoundException(java.lang.String, java.lang.Exception)


Occurences of skip

skip occurences:
java.io.BufferedInputStream.skip(long)
java.io.BufferedReader.skip(long)
java.io.ByteArrayInputStream.skip(long)
java.io.CharArrayReader.skip(long)
java.io.FileInputStream.skip(long)
java.io.FilterInputStream.skip(long)
java.io.FilterReader.skip(long)
java.io.InputStream.skip(long)
java.io.LineNumberInputStream.skip(long)
java.io.LineNumberReader.skip(long)
java.io.ObjectInput.skip(long)
java.io.PushbackInputStream.skip(long)
java.io.PushbackReader.skip(long)
java.io.Reader.skip(long)
java.io.StringBufferInputStream.skip(long)
java.io.StringReader.skip(long)
java.util.Scanner.skip(java.lang.String)
java.util.Scanner.skip(java.util.regex.Pattern)
java.util.stream.DoubleStream.skip(long)
java.util.stream.IntStream.skip(long)
java.util.stream.LongStream.skip(long)
java.util.stream.Stream.skip(long)
java.util.zip.CheckedInputStream.skip(long)
java.util.zip.DeflaterInputStream.skip(long)
java.util.zip.InflaterInputStream.skip(long)
java.util.zip.ZipInputStream.skip(long)
javax.crypto.CipherInputStream.skip(long)
javax.sound.sampled.AudioInputStream.skip(long)
javax.swing.ProgressMonitorInputStream.skip(long)


Occurences of skipBytes

skipBytes occurences:
java.io.DataInput.skipBytes(int)
java.io.DataInputStream.skipBytes(int)
java.io.ObjectInputStream.skipBytes(int)
java.io.RandomAccessFile.skipBytes(int)
javax.imageio.stream.ImageInputStream.skipBytes(int)
javax.imageio.stream.ImageInputStream.skipBytes(long)
javax.imageio.stream.ImageInputStreamImpl.skipBytes(int)
javax.imageio.stream.ImageInputStreamImpl.skipBytes(long)


Occurences of skippedEntity

skippedEntity occurences:
org.xml.sax.ContentHandler.skippedEntity(java.lang.String)
org.xml.sax.helpers.DefaultHandler.skippedEntity(java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.skippedEntity(java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.skippedEntity(java.lang.String)


Occurences of sleep

sleep occurences:
java.lang.Thread.sleep(long)
java.lang.Thread.sleep(long, int)
java.util.concurrent.TimeUnit.sleep(long)


Occurences of slice

slice occurences:
java.nio.ByteBuffer.slice()
java.nio.CharBuffer.slice()
java.nio.DoubleBuffer.slice()
java.nio.FloatBuffer.slice()
java.nio.IntBuffer.slice()
java.nio.LongBuffer.slice()
java.nio.ShortBuffer.slice()


Occurences of SLIDER

SLIDER occurences:
javax.accessibility.SLIDER
javax.swing.plaf.synth.SLIDER


Occurences of SmallAttributeSet

SmallAttributeSet occurences:
javax.swing.text.StyleContext.SmallAttributeSet.SmallAttributeSet(java.lang.Object:A)
javax.swing.text.StyleContext.SmallAttributeSet.SmallAttributeSet(javax.swing.text.AttributeSet)


Occurences of SMALLINT

SMALLINT occurences:
java.sql.SMALLINT
java.sql.SMALLINT


Occurences of SNIHostName (constructors)

SNIHostName (constructors) occurences:
javax.net.ssl.SNIHostName(byte:A)
javax.net.ssl.SNIHostName(java.lang.String)


Occurences of soap

soap occurences:
javax.jws.soap
javax.xml.soap
javax.xml.ws.handler.soap
javax.xml.ws.soap


Occurences of SOAPBinding

SOAPBinding occurences:
javax.jws.soap.SOAPBinding
javax.xml.ws.soap.SOAPBinding


Occurences of SOAPException (constructors)

SOAPException (constructors) occurences:
javax.xml.soap.SOAPException()
javax.xml.soap.SOAPException(java.lang.String)
javax.xml.soap.SOAPException(java.lang.String, java.lang.Throwable)
javax.xml.soap.SOAPException(java.lang.Throwable)


Occurences of socket

socket occurences:
java.nio.channels.DatagramChannel.socket()
java.nio.channels.ServerSocketChannel.socket()
java.nio.channels.SocketChannel.socket()


Occurences of Socket (constructors)

Socket (constructors) occurences:
java.net.Socket()
java.net.Socket(java.lang.String, int)
java.net.Socket(java.lang.String, int, boolean)
java.net.Socket(java.lang.String, int, java.net.InetAddress, int)
java.net.Socket(java.net.InetAddress, int)
java.net.Socket(java.net.InetAddress, int, boolean)
java.net.Socket(java.net.InetAddress, int, java.net.InetAddress, int)
java.net.Socket(java.net.Proxy)
java.net.Socket(java.net.SocketImpl)


Occurences of SocketException (constructors)

SocketException (constructors) occurences:
java.net.SocketException()
java.net.SocketException(java.lang.String)


Occurences of SocketHandler (constructors)

SocketHandler (constructors) occurences:
java.util.logging.SocketHandler()
java.util.logging.SocketHandler(java.lang.String, int)


Occurences of SocketSecurityException (constructors)

SocketSecurityException (constructors) occurences:
java.rmi.server.SocketSecurityException(java.lang.String)
java.rmi.server.SocketSecurityException(java.lang.String, java.lang.Exception)


Occurences of SocketTimeoutException (constructors)

SocketTimeoutException (constructors) occurences:
java.net.SocketTimeoutException()
java.net.SocketTimeoutException(java.lang.String)


Occurences of SoftBevelBorder (constructors)

SoftBevelBorder (constructors) occurences:
javax.swing.border.SoftBevelBorder(int)
javax.swing.border.SoftBevelBorder(int, java.awt.Color, java.awt.Color)
javax.swing.border.SoftBevelBorder(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)


Occurences of SoftReference (constructors)

SoftReference (constructors) occurences:
java.lang.ref.SoftReference(java.lang.Object)
java.lang.ref.SoftReference(java.lang.Object, java.lang.ref.ReferenceQueue)
java.lang.ref.SoftReference(T)
java.lang.ref.SoftReference(T, java.lang.ref.ReferenceQueue)


Occurences of solveCubic

solveCubic occurences:
java.awt.geom.CubicCurve2D.solveCubic(double:A)
java.awt.geom.CubicCurve2D.solveCubic(double:A, double:A)


Occurences of solveQuadratic

solveQuadratic occurences:
java.awt.geom.QuadCurve2D.solveQuadratic(double:A)
java.awt.geom.QuadCurve2D.solveQuadratic(double:A, double:A)


Occurences of SORA_SOMPENG

SORA_SOMPENG occurences:
java.lang.SORA_SOMPENG
java.lang.SORA_SOMPENG


Occurences of sort

sort occurences:
java.util.ArrayList.sort(java.util.Comparator)
java.util.Arrays.sort(byte:A)
java.util.Arrays.sort(byte:A, int, int)
java.util.Arrays.sort(char:A)
java.util.Arrays.sort(char:A, int, int)
java.util.Arrays.sort(double:A)
java.util.Arrays.sort(double:A, int, int)
java.util.Arrays.sort(float:A)
java.util.Arrays.sort(float:A, int, int)
java.util.Arrays.sort(int:A)
java.util.Arrays.sort(int:A, int, int)
java.util.Arrays.sort(java.lang.Object:A)
java.util.Arrays.sort(java.lang.Object:A, int, int)
java.util.Arrays.sort(java.lang.Object:A, int, int, java.util.Comparator)
java.util.Arrays.sort(java.lang.Object:A, java.util.Comparator)
java.util.Arrays.sort(long:A)
java.util.Arrays.sort(long:A, int, int)
java.util.Arrays.sort(short:A)
java.util.Arrays.sort(short:A, int, int)
java.util.Arrays.sort(T:A, int, int, java.util.Comparator)
java.util.Arrays.sort(T:A, java.util.Comparator)
java.util.Collections.sort(java.util.List)
java.util.Collections.sort(java.util.List, java.util.Comparator)
java.util.concurrent.CopyOnWriteArrayList.sort(java.util.Comparator)
java.util.List.sort(java.util.Comparator)
java.util.Vector.sort(java.util.Comparator)
javax.swing.DefaultRowSorter.sort()
javax.swing.plaf.basic.BasicDirectoryModel.sort(java.util.Vector)


Occurences of SortControl (constructors)

SortControl (constructors) occurences:
javax.naming.ldap.SortControl(java.lang.String, boolean)
javax.naming.ldap.SortControl(java.lang.String:A, boolean)
javax.naming.ldap.SortControl(javax.naming.ldap.SortKey:A, boolean)


Occurences of sorted

sorted occurences:
java.util.stream.DoubleStream.sorted()
java.util.stream.IntStream.sorted()
java.util.stream.LongStream.sorted()
java.util.stream.Stream.sorted()
java.util.stream.Stream.sorted(java.util.Comparator)


Occurences of SORTED

SORTED occurences:
java.util.SORTED
javax.swing.event.SORTED


Occurences of sorterChanged

sorterChanged occurences:
javax.swing.event.RowSorterListener.sorterChanged(javax.swing.event.RowSorterEvent)
javax.swing.JTable.sorterChanged(javax.swing.event.RowSorterEvent)


Occurences of SortingFocusTraversalPolicy (constructors)

SortingFocusTraversalPolicy (constructors) occurences:
javax.swing.SortingFocusTraversalPolicy()
javax.swing.SortingFocusTraversalPolicy(java.util.Comparator)


Occurences of SortKey

SortKey occurences:
javax.naming.ldap.SortKey
javax.swing.RowSorter.SortKey.SortKey(int, javax.swing.SortOrder)


Occurences of SortKey (constructors)

SortKey (constructors) occurences:
javax.naming.ldap.SortKey(java.lang.String)
javax.naming.ldap.SortKey(java.lang.String, boolean, java.lang.String)


Occurences of source

source occurences:
java.nio.channels.Pipe.source()
java.util.source
javax.management.source
javax.swing.plaf.basic.source


Occurences of SOURCE

SOURCE occurences:
java.lang.annotation.SOURCE
javax.tools.SOURCE


Occurences of sourceName

sourceName occurences:
com.sun.jdi.Location.sourceName()
com.sun.jdi.Location.sourceName(java.lang.String)
com.sun.jdi.ReferenceType.sourceName()


Occurences of sourcePath

sourcePath occurences:
com.sun.jdi.Location.sourcePath()
com.sun.jdi.Location.sourcePath(java.lang.String)


Occurences of SOUTH

SOUTH occurences:
java.awt.SOUTH
java.awt.SOUTH
javax.swing.SOUTH
javax.swing.SOUTH


Occurences of SO_BROADCAST

SO_BROADCAST occurences:
java.net.SO_BROADCAST
java.net.SO_BROADCAST


Occurences of SO_KEEPALIVE

SO_KEEPALIVE occurences:
java.net.SO_KEEPALIVE
java.net.SO_KEEPALIVE


Occurences of SO_LINGER

SO_LINGER occurences:
java.net.SO_LINGER
java.net.SO_LINGER


Occurences of SO_RCVBUF

SO_RCVBUF occurences:
java.net.SO_RCVBUF
java.net.SO_RCVBUF


Occurences of SO_REUSEADDR

SO_REUSEADDR occurences:
java.net.SO_REUSEADDR
java.net.SO_REUSEADDR


Occurences of SO_SNDBUF

SO_SNDBUF occurences:
java.net.SO_SNDBUF
java.net.SO_SNDBUF


Occurences of spec

spec occurences:
compact1.java.security.spec
compact2.java.security.spec
compact3.java.security.spec
compact3.javax.xml.crypto.dsig.spec
java.security.spec
javax.crypto.spec
javax.xml.crypto.dsig.spec
Overview


Occurences of spi

spi occurences:
com.sun.jdi.connect.spi
com.sun.tools.attach.spi
compact1.java.nio.channels.spi
compact1.java.nio.charset.spi
compact1.java.nio.file.spi
compact1.java.text.spi
compact1.java.util.spi
compact1.javax.security.auth.spi
compact2.java.nio.channels.spi
compact2.java.nio.charset.spi
compact2.java.nio.file.spi
compact2.java.text.spi
compact2.java.util.spi
compact2.javax.security.auth.spi
compact3.java.nio.channels.spi
compact3.java.nio.charset.spi
compact3.java.nio.file.spi
compact3.java.text.spi
compact3.java.util.spi
compact3.javax.naming.spi
compact3.javax.security.auth.spi
compact3.javax.sql.rowset.spi
java.awt.im.spi
java.nio.channels.spi
java.nio.charset.spi
java.nio.file.spi
java.text.spi
java.util.spi
javax.imageio.spi
javax.naming.spi
javax.security.auth.spi
javax.sound.midi.spi
javax.sound.sampled.spi
javax.sql.rowset.spi
javax.xml.ws.spi


Occurences of SpinnerDateModel (constructors)

SpinnerDateModel (constructors) occurences:
javax.swing.SpinnerDateModel()
javax.swing.SpinnerDateModel(java.util.Date, java.lang.Comparable, java.lang.Comparable, int)


Occurences of SpinnerListModel (constructors)

SpinnerListModel (constructors) occurences:
javax.swing.SpinnerListModel()
javax.swing.SpinnerListModel(java.lang.Object:A)
javax.swing.SpinnerListModel(java.util.List)


Occurences of SpinnerNumberModel (constructors)

SpinnerNumberModel (constructors) occurences:
javax.swing.SpinnerNumberModel()
javax.swing.SpinnerNumberModel(double, double, double, double)
javax.swing.SpinnerNumberModel(int, int, int, int)
javax.swing.SpinnerNumberModel(java.lang.Number, java.lang.Comparable, java.lang.Comparable, java.lang.Number)


Occurences of split

split occurences:
java.lang.String.split(java.lang.String)
java.lang.String.split(java.lang.String, int)
java.util.regex.Pattern.split(java.lang.CharSequence)
java.util.regex.Pattern.split(java.lang.CharSequence, int)
java.util.SplittableRandom.split()


Occurences of spliterator

spliterator occurences:
java.lang.Iterable.spliterator()
java.util.ArrayDeque.spliterator()
java.util.ArrayList.spliterator()
java.util.Arrays.spliterator(double:A)
java.util.Arrays.spliterator(double:A, int, int)
java.util.Arrays.spliterator(int:A)
java.util.Arrays.spliterator(int:A, int, int)
java.util.Arrays.spliterator(java.lang.Object:A)
java.util.Arrays.spliterator(java.lang.Object:A, int, int)
java.util.Arrays.spliterator(long:A)
java.util.Arrays.spliterator(long:A, int, int)
java.util.Arrays.spliterator(T:A)
java.util.Arrays.spliterator(T:A, int, int)
java.util.Collection.spliterator()
java.util.concurrent.ArrayBlockingQueue.spliterator()
java.util.concurrent.ConcurrentHashMap.KeySetView.spliterator()
java.util.concurrent.ConcurrentLinkedDeque.spliterator()
java.util.concurrent.ConcurrentLinkedQueue.spliterator()
java.util.concurrent.ConcurrentSkipListSet.spliterator()
java.util.concurrent.CopyOnWriteArrayList.spliterator()
java.util.concurrent.CopyOnWriteArraySet.spliterator()
java.util.concurrent.LinkedBlockingDeque.spliterator()
java.util.concurrent.LinkedBlockingQueue.spliterator()
java.util.concurrent.LinkedTransferQueue.spliterator()
java.util.concurrent.PriorityBlockingQueue.spliterator()
java.util.concurrent.SynchronousQueue.spliterator()
java.util.HashSet.spliterator()
java.util.LinkedHashSet.spliterator()
java.util.LinkedList.spliterator()
java.util.List.spliterator()
java.util.PriorityQueue.spliterator()
java.util.Set.spliterator()
java.util.SortedSet.spliterator()
java.util.Spliterators.spliterator(double:A, int)
java.util.Spliterators.spliterator(double:A, int, int, int)
java.util.Spliterators.spliterator(int:A, int)
java.util.Spliterators.spliterator(int:A, int, int, int)
java.util.Spliterators.spliterator(java.lang.Object:A, int)
java.util.Spliterators.spliterator(java.lang.Object:A, int, int, int)
java.util.Spliterators.spliterator(java.util.Collection, int)
java.util.Spliterators.spliterator(java.util.Iterator, long, int)
java.util.Spliterators.spliterator(java.util.PrimitiveIterator.OfDouble, long, int)
java.util.Spliterators.spliterator(java.util.PrimitiveIterator.OfInt, long, int)
java.util.Spliterators.spliterator(java.util.PrimitiveIterator.OfLong, long, int)
java.util.Spliterators.spliterator(long:A, int)
java.util.Spliterators.spliterator(long:A, int, int, int)
java.util.stream.BaseStream.spliterator()
java.util.stream.DoubleStream.spliterator()
java.util.stream.IntStream.spliterator()
java.util.stream.LongStream.spliterator()
java.util.TreeSet.spliterator()
java.util.Vector.spliterator()


Occurences of spliteratorUnknownSize

spliteratorUnknownSize occurences:
java.util.Spliterators.spliteratorUnknownSize(java.util.Iterator, int)
java.util.Spliterators.spliteratorUnknownSize(java.util.PrimitiveIterator.OfDouble, int)
java.util.Spliterators.spliteratorUnknownSize(java.util.PrimitiveIterator.OfInt, int)
java.util.Spliterators.spliteratorUnknownSize(java.util.PrimitiveIterator.OfLong, int)


Occurences of splitPane

splitPane occurences:
javax.swing.plaf.basic.splitPane
javax.swing.plaf.basic.splitPane


Occurences of SplittableRandom (constructors)

SplittableRandom (constructors) occurences:
java.util.SplittableRandom()
java.util.SplittableRandom(long)


Occurences of SPLIT_PANE

SPLIT_PANE occurences:
javax.accessibility.SPLIT_PANE
javax.swing.plaf.synth.SPLIT_PANE


Occurences of sql

sql occurences:
compact2.java.sql
compact2.javax.sql
compact3.java.sql
compact3.javax.sql
java.sql
javax.sql


Occurences of SQLClientInfoException (constructors)

SQLClientInfoException (constructors) occurences:
java.sql.SQLClientInfoException()
java.sql.SQLClientInfoException(java.lang.String, java.lang.String, int, java.util.Map)
java.sql.SQLClientInfoException(java.lang.String, java.lang.String, int, java.util.Map, java.lang.Throwable)
java.sql.SQLClientInfoException(java.lang.String, java.lang.String, java.util.Map)
java.sql.SQLClientInfoException(java.lang.String, java.lang.String, java.util.Map, java.lang.Throwable)
java.sql.SQLClientInfoException(java.lang.String, java.util.Map)
java.sql.SQLClientInfoException(java.lang.String, java.util.Map, java.lang.Throwable)
java.sql.SQLClientInfoException(java.util.Map)
java.sql.SQLClientInfoException(java.util.Map, java.lang.Throwable)


Occurences of SQLDataException (constructors)

SQLDataException (constructors) occurences:
java.sql.SQLDataException()
java.sql.SQLDataException(java.lang.String)
java.sql.SQLDataException(java.lang.String, java.lang.String)
java.sql.SQLDataException(java.lang.String, java.lang.String, int)
java.sql.SQLDataException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLDataException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLDataException(java.lang.String, java.lang.Throwable)
java.sql.SQLDataException(java.lang.Throwable)


Occurences of SQLException (constructors)

SQLException (constructors) occurences:
java.sql.SQLException()
java.sql.SQLException(java.lang.String)
java.sql.SQLException(java.lang.String, java.lang.String)
java.sql.SQLException(java.lang.String, java.lang.String, int)
java.sql.SQLException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLException(java.lang.String, java.lang.Throwable)
java.sql.SQLException(java.lang.Throwable)


Occurences of SQLFeatureNotSupportedException (constructors)

SQLFeatureNotSupportedException (constructors) occurences:
java.sql.SQLFeatureNotSupportedException()
java.sql.SQLFeatureNotSupportedException(java.lang.String)
java.sql.SQLFeatureNotSupportedException(java.lang.String, java.lang.String)
java.sql.SQLFeatureNotSupportedException(java.lang.String, java.lang.String, int)
java.sql.SQLFeatureNotSupportedException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLFeatureNotSupportedException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLFeatureNotSupportedException(java.lang.String, java.lang.Throwable)
java.sql.SQLFeatureNotSupportedException(java.lang.Throwable)


Occurences of SQLIntegrityConstraintViolationException (constructors)

SQLIntegrityConstraintViolationException (constructors) occurences:
java.sql.SQLIntegrityConstraintViolationException()
java.sql.SQLIntegrityConstraintViolationException(java.lang.String)
java.sql.SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String)
java.sql.SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, int)
java.sql.SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLIntegrityConstraintViolationException(java.lang.String, java.lang.Throwable)
java.sql.SQLIntegrityConstraintViolationException(java.lang.Throwable)


Occurences of SQLInvalidAuthorizationSpecException (constructors)

SQLInvalidAuthorizationSpecException (constructors) occurences:
java.sql.SQLInvalidAuthorizationSpecException()
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, int)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.Throwable)
java.sql.SQLInvalidAuthorizationSpecException(java.lang.Throwable)


Occurences of SQLNonTransientConnectionException (constructors)

SQLNonTransientConnectionException (constructors) occurences:
java.sql.SQLNonTransientConnectionException()
java.sql.SQLNonTransientConnectionException(java.lang.String)
java.sql.SQLNonTransientConnectionException(java.lang.String, java.lang.String)
java.sql.SQLNonTransientConnectionException(java.lang.String, java.lang.String, int)
java.sql.SQLNonTransientConnectionException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLNonTransientConnectionException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLNonTransientConnectionException(java.lang.String, java.lang.Throwable)
java.sql.SQLNonTransientConnectionException(java.lang.Throwable)


Occurences of SQLNonTransientException (constructors)

SQLNonTransientException (constructors) occurences:
java.sql.SQLNonTransientException()
java.sql.SQLNonTransientException(java.lang.String)
java.sql.SQLNonTransientException(java.lang.String, java.lang.String)
java.sql.SQLNonTransientException(java.lang.String, java.lang.String, int)
java.sql.SQLNonTransientException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLNonTransientException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLNonTransientException(java.lang.String, java.lang.Throwable)
java.sql.SQLNonTransientException(java.lang.Throwable)


Occurences of SQLPermission (constructors)

SQLPermission (constructors) occurences:
java.sql.SQLPermission(java.lang.String)
java.sql.SQLPermission(java.lang.String, java.lang.String)


Occurences of SQLRecoverableException (constructors)

SQLRecoverableException (constructors) occurences:
java.sql.SQLRecoverableException()
java.sql.SQLRecoverableException(java.lang.String)
java.sql.SQLRecoverableException(java.lang.String, java.lang.String)
java.sql.SQLRecoverableException(java.lang.String, java.lang.String, int)
java.sql.SQLRecoverableException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLRecoverableException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLRecoverableException(java.lang.String, java.lang.Throwable)
java.sql.SQLRecoverableException(java.lang.Throwable)


Occurences of SQLSyntaxErrorException (constructors)

SQLSyntaxErrorException (constructors) occurences:
java.sql.SQLSyntaxErrorException()
java.sql.SQLSyntaxErrorException(java.lang.String)
java.sql.SQLSyntaxErrorException(java.lang.String, java.lang.String)
java.sql.SQLSyntaxErrorException(java.lang.String, java.lang.String, int)
java.sql.SQLSyntaxErrorException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLSyntaxErrorException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLSyntaxErrorException(java.lang.String, java.lang.Throwable)
java.sql.SQLSyntaxErrorException(java.lang.Throwable)


Occurences of SQLTimeoutException (constructors)

SQLTimeoutException (constructors) occurences:
java.sql.SQLTimeoutException()
java.sql.SQLTimeoutException(java.lang.String)
java.sql.SQLTimeoutException(java.lang.String, java.lang.String)
java.sql.SQLTimeoutException(java.lang.String, java.lang.String, int)
java.sql.SQLTimeoutException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLTimeoutException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLTimeoutException(java.lang.String, java.lang.Throwable)
java.sql.SQLTimeoutException(java.lang.Throwable)


Occurences of SQLTransactionRollbackException (constructors)

SQLTransactionRollbackException (constructors) occurences:
java.sql.SQLTransactionRollbackException()
java.sql.SQLTransactionRollbackException(java.lang.String)
java.sql.SQLTransactionRollbackException(java.lang.String, java.lang.String)
java.sql.SQLTransactionRollbackException(java.lang.String, java.lang.String, int)
java.sql.SQLTransactionRollbackException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLTransactionRollbackException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLTransactionRollbackException(java.lang.String, java.lang.Throwable)
java.sql.SQLTransactionRollbackException(java.lang.Throwable)


Occurences of SQLTransientConnectionException (constructors)

SQLTransientConnectionException (constructors) occurences:
java.sql.SQLTransientConnectionException()
java.sql.SQLTransientConnectionException(java.lang.String)
java.sql.SQLTransientConnectionException(java.lang.String, java.lang.String)
java.sql.SQLTransientConnectionException(java.lang.String, java.lang.String, int)
java.sql.SQLTransientConnectionException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLTransientConnectionException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLTransientConnectionException(java.lang.String, java.lang.Throwable)
java.sql.SQLTransientConnectionException(java.lang.Throwable)


Occurences of SQLTransientException (constructors)

SQLTransientException (constructors) occurences:
java.sql.SQLTransientException()
java.sql.SQLTransientException(java.lang.String)
java.sql.SQLTransientException(java.lang.String, java.lang.String)
java.sql.SQLTransientException(java.lang.String, java.lang.String, int)
java.sql.SQLTransientException(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLTransientException(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLTransientException(java.lang.String, java.lang.Throwable)
java.sql.SQLTransientException(java.lang.Throwable)


Occurences of SQLWarning (constructors)

SQLWarning (constructors) occurences:
java.sql.SQLWarning()
java.sql.SQLWarning(java.lang.String)
java.sql.SQLWarning(java.lang.String, java.lang.String)
java.sql.SQLWarning(java.lang.String, java.lang.String, int)
java.sql.SQLWarning(java.lang.String, java.lang.String, int, java.lang.Throwable)
java.sql.SQLWarning(java.lang.String, java.lang.String, java.lang.Throwable)
java.sql.SQLWarning(java.lang.String, java.lang.Throwable)
java.sql.SQLWarning(java.lang.Throwable)


Occurences of SQLXML

SQLXML occurences:
java.sql.SQLXML
java.sql.SQLXML
java.sql.SQLXML


Occurences of sqrt

sqrt occurences:
java.lang.Math.sqrt(double)
java.lang.StrictMath.sqrt(double)


Occurences of SRC

SRC occurences:
java.awt.SRC
javax.swing.text.html.SRC


Occurences of ssl

ssl occurences:
compact1.javax.net.ssl
compact2.javax.net.ssl
compact2.javax.rmi.ssl
compact3.javax.net.ssl
compact3.javax.rmi.ssl
javax.net.ssl
javax.rmi.ssl


Occurences of SSLEngine (constructors)

SSLEngine (constructors) occurences:
javax.net.ssl.SSLEngine()
javax.net.ssl.SSLEngine(java.lang.String, int)


Occurences of SSLException (constructors)

SSLException (constructors) occurences:
javax.net.ssl.SSLException(java.lang.String)
javax.net.ssl.SSLException(java.lang.String, java.lang.Throwable)
javax.net.ssl.SSLException(java.lang.Throwable)


Occurences of SSLParameters (constructors)

SSLParameters (constructors) occurences:
javax.net.ssl.SSLParameters()
javax.net.ssl.SSLParameters(java.lang.String:A)
javax.net.ssl.SSLParameters(java.lang.String:A, java.lang.String:A)


Occurences of SSLPermission (constructors)

SSLPermission (constructors) occurences:
javax.net.ssl.SSLPermission(java.lang.String)
javax.net.ssl.SSLPermission(java.lang.String, java.lang.String)


Occurences of SslRMIServerSocketFactory (constructors)

SslRMIServerSocketFactory (constructors) occurences:
javax.rmi.ssl.SslRMIServerSocketFactory()
javax.rmi.ssl.SslRMIServerSocketFactory(java.lang.String:A, java.lang.String:A, boolean)
javax.rmi.ssl.SslRMIServerSocketFactory(javax.net.ssl.SSLContext, java.lang.String:A, java.lang.String:A, boolean)


Occurences of SSLServerSocket (constructors)

SSLServerSocket (constructors) occurences:
javax.net.ssl.SSLServerSocket()
javax.net.ssl.SSLServerSocket(int)
javax.net.ssl.SSLServerSocket(int, int)
javax.net.ssl.SSLServerSocket(int, int, java.net.InetAddress)


Occurences of SSLSocket (constructors)

SSLSocket (constructors) occurences:
javax.net.ssl.SSLSocket()
javax.net.ssl.SSLSocket(java.lang.String, int)
javax.net.ssl.SSLSocket(java.lang.String, int, java.net.InetAddress, int)
javax.net.ssl.SSLSocket(java.net.InetAddress, int)
javax.net.ssl.SSLSocket(java.net.InetAddress, int, java.net.InetAddress, int)


Occurences of StackOverflowError (constructors)

StackOverflowError (constructors) occurences:
java.lang.StackOverflowError()
java.lang.StackOverflowError(java.lang.String)


Occurences of standaloneSet

standaloneSet occurences:
javax.xml.stream.events.StartDocument.standaloneSet()
javax.xml.stream.util.StreamReaderDelegate.standaloneSet()
javax.xml.stream.XMLStreamReader.standaloneSet()


Occurences of STANDARD

STANDARD occurences:
java.awt.font.STANDARD
java.time.format.STANDARD
java.time.zone.STANDARD
javax.print.attribute.standard.STANDARD


Occurences of standard

standard occurences:
java.nio.charset.standard
javax.print.attribute.standard


Occurences of StandardEmitterMBean (constructors)

StandardEmitterMBean (constructors) occurences:
javax.management.StandardEmitterMBean(java.lang.Class, boolean, javax.management.NotificationEmitter)
javax.management.StandardEmitterMBean(java.lang.Class, javax.management.NotificationEmitter)
javax.management.StandardEmitterMBean(java.lang.Object, java.lang.Class, boolean, javax.management.NotificationEmitter)
javax.management.StandardEmitterMBean(java.lang.Object, java.lang.Class, javax.management.NotificationEmitter)
javax.management.StandardEmitterMBean(T, java.lang.Class, boolean, javax.management.NotificationEmitter)
javax.management.StandardEmitterMBean(T, java.lang.Class, javax.management.NotificationEmitter)


Occurences of StandardMBean (constructors)

StandardMBean (constructors) occurences:
javax.management.StandardMBean(java.lang.Class)
javax.management.StandardMBean(java.lang.Class, boolean)
javax.management.StandardMBean(java.lang.Object, java.lang.Class)
javax.management.StandardMBean(java.lang.Object, java.lang.Class, boolean)
javax.management.StandardMBean(T, java.lang.Class)
javax.management.StandardMBean(T, java.lang.Class, boolean)


Occurences of START

START occurences:
javax.sound.midi.START
javax.sound.sampled.START
javax.swing.text.html.START


Occurences of start

start occurences:
com.sun.javadoc.Doclet.start(com.sun.javadoc.RootDoc)
java.applet.Applet.start()
java.awt.geom.start
java.awt.geom.start
java.lang.ProcessBuilder.start()
java.lang.Thread.start()
java.util.regex.Matcher.start()
java.util.regex.Matcher.start(int)
java.util.regex.Matcher.start(java.lang.String)
java.util.regex.MatchResult.start()
java.util.regex.MatchResult.start(int)
javax.management.monitor.CounterMonitor.start()
javax.management.monitor.GaugeMonitor.start()
javax.management.monitor.Monitor.start()
javax.management.monitor.MonitorMBean.start()
javax.management.monitor.StringMonitor.start()
javax.management.remote.JMXConnectorServerMBean.start()
javax.management.remote.rmi.RMIConnectorServer.start()
javax.management.timer.Timer.start()
javax.management.timer.TimerMBean.start()
javax.sound.midi.Sequencer.start()
javax.sound.sampled.DataLine.start()
javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.FormAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.PreAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.text.html.HTMLDocument.HTMLReader.TagAction.start(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
javax.swing.Timer.start()
javax.transaction.xa.XAResource.start(javax.transaction.xa.Xid, int)


Occurences of startCDATA

startCDATA occurences:
org.xml.sax.ext.DefaultHandler2.startCDATA()
org.xml.sax.ext.LexicalHandler.startCDATA()


Occurences of startDocument

startDocument occurences:
org.xml.sax.ContentHandler.startDocument()
org.xml.sax.DocumentHandler.startDocument()
org.xml.sax.HandlerBase.startDocument()
org.xml.sax.helpers.DefaultHandler.startDocument()
org.xml.sax.helpers.ParserAdapter.startDocument()
org.xml.sax.helpers.XMLFilterImpl.startDocument()
org.xml.sax.helpers.XMLReaderAdapter.startDocument()


Occurences of startDrag

startDrag occurences:
java.awt.dnd.DragGestureEvent.startDrag(java.awt.Cursor, java.awt.datatransfer.Transferable)
java.awt.dnd.DragGestureEvent.startDrag(java.awt.Cursor, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener)
java.awt.dnd.DragGestureEvent.startDrag(java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener)
java.awt.dnd.DragSource.startDrag(java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener)
java.awt.dnd.DragSource.startDrag(java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener, java.awt.datatransfer.FlavorMap)
java.awt.dnd.DragSource.startDrag(java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener)
java.awt.dnd.DragSource.startDrag(java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener, java.awt.datatransfer.FlavorMap)


Occurences of startDTD

startDTD occurences:
org.xml.sax.ext.DefaultHandler2.startDTD(java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.ext.LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)


Occurences of startEditingAtPath

startEditingAtPath occurences:
javax.swing.JTree.startEditingAtPath(javax.swing.tree.TreePath)
javax.swing.plaf.basic.BasicTreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.multi.MultiTreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath)
javax.swing.plaf.TreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath)


Occurences of startElement

startElement occurences:
org.w3c.dom.ls.LSParserFilter.startElement(org.w3c.dom.Element)
org.xml.sax.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
org.xml.sax.DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
org.xml.sax.HandlerBase.startElement(java.lang.String, org.xml.sax.AttributeList)
org.xml.sax.helpers.DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
org.xml.sax.helpers.ParserAdapter.startElement(java.lang.String, org.xml.sax.AttributeList)
org.xml.sax.helpers.XMLFilterImpl.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
org.xml.sax.helpers.XMLReaderAdapter.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)


Occurences of startEntity

startEntity occurences:
org.xml.sax.ext.DefaultHandler2.startEntity(java.lang.String)
org.xml.sax.ext.LexicalHandler.startEntity(java.lang.String)


Occurences of startIndex

startIndex occurences:
javax.accessibility.startIndex
javax.accessibility.startIndex


Occurences of startListening

startListening occurences:
com.sun.jdi.connect.ListeningConnector.startListening(java.util.Map)
com.sun.jdi.connect.spi.TransportService.startListening()
com.sun.jdi.connect.spi.TransportService.startListening(java.lang.String)


Occurences of startPrefixMapping

startPrefixMapping occurences:
org.xml.sax.ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
org.xml.sax.helpers.DefaultHandler.startPrefixMapping(java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.startPrefixMapping(java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLReaderAdapter.startPrefixMapping(java.lang.String, java.lang.String)


Occurences of startProduction

startProduction occurences:
java.awt.image.FilteredImageSource.startProduction(java.awt.image.ImageConsumer)
java.awt.image.ImageProducer.startProduction(java.awt.image.ImageConsumer)
java.awt.image.MemoryImageSource.startProduction(java.awt.image.ImageConsumer)
java.awt.image.renderable.RenderableImageProducer.startProduction(java.awt.image.ImageConsumer)


Occurences of startsWith

startsWith occurences:
java.lang.String.startsWith(java.lang.String)
java.lang.String.startsWith(java.lang.String, int)
java.nio.file.Path.startsWith(java.lang.String)
java.nio.file.Path.startsWith(java.nio.file.Path)
javax.naming.CompositeName.startsWith(javax.naming.Name)
javax.naming.CompoundName.startsWith(javax.naming.Name)
javax.naming.ldap.LdapName.startsWith(java.util.List)
javax.naming.ldap.LdapName.startsWith(javax.naming.Name)
javax.naming.Name.startsWith(javax.naming.Name)


Occurences of startTag

startTag occurences:
javax.swing.text.html.HTMLWriter.startTag(javax.swing.text.Element)
javax.swing.text.html.parser.Parser.startTag(javax.swing.text.html.parser.TagElement)


Occurences of START_ELEMENT

START_ELEMENT occurences:
com.sun.source.doctree.START_ELEMENT
javax.xml.stream.START_ELEMENT


Occurences of start_value

start_value occurences:
org.omg.CORBA.portable.ValueInputStream.start_value()
org.omg.CORBA.portable.ValueOutputStream.start_value(java.lang.String)


Occurences of state

state occurences:
java.security.state
org.omg.PortableInterceptor.IORInfoOperations.state()


Occurences of State

State occurences:
javax.swing.plaf.nimbus.State
org.omg.PortableServer.POAManagerPackage.State


Occurences of State (constructors)

State (constructors) occurences:
javax.swing.plaf.nimbus.State(java.lang.String)
org.omg.PortableServer.POAManagerPackage.State(int)


Occurences of stateChanged

stateChanged occurences:
javax.swing.AbstractButton.ButtonChangeListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.event.ChangeListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JMenuItem.AccessibleJMenuItem.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JScrollPane.AccessibleJScrollPane.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JSpinner.AccessibleJSpinner.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JSpinner.DefaultEditor.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JTabbedPane.AccessibleJTabbedPane.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.JTabbedPane.ModelListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicButtonListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicMenuUI.ChangeHandler.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicScrollBarUI.ModelListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicSliderUI.ChangeHandler.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler.stateChanged(javax.swing.event.ChangeEvent)
javax.swing.ProgressMonitor.AccessibleProgressMonitor.stateChanged(javax.swing.event.ChangeEvent)


Occurences of StateEdit (constructors)

StateEdit (constructors) occurences:
javax.swing.undo.StateEdit(javax.swing.undo.StateEditable)
javax.swing.undo.StateEdit(javax.swing.undo.StateEditable, java.lang.String)


Occurences of STATEMENT

STATEMENT occurences:
com.sun.source.tree.STATEMENT
java.awt.STATEMENT


Occurences of Statement

Statement occurences:
java.beans.Statement
java.sql.Statement


Occurences of StatementEvent (constructors)

StatementEvent (constructors) occurences:
javax.sql.StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement)
javax.sql.StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement, java.sql.SQLException)


Occurences of STATIC

STATIC occurences:
java.lang.reflect.STATIC
javax.lang.model.element.STATIC


Occurences of status

status occurences:
com.sun.jdi.ThreadReference.status()
java.awt.image.PixelGrabber.status()


Occurences of stax

stax occurences:
compact2.javax.xml.transform.stax
compact3.javax.xml.transform.stax
javax.xml.transform.stax


Occurences of StAXResult (constructors)

StAXResult (constructors) occurences:
javax.xml.transform.stax.StAXResult(javax.xml.stream.XMLEventWriter)
javax.xml.transform.stax.StAXResult(javax.xml.stream.XMLStreamWriter)


Occurences of StAXSource (constructors)

StAXSource (constructors) occurences:
javax.xml.transform.stax.StAXSource(javax.xml.stream.XMLEventReader)
javax.xml.transform.stax.StAXSource(javax.xml.stream.XMLStreamReader)


Occurences of steps

steps occurences:
java.nio.charset.steps
java.nio.charset.steps


Occurences of stop

stop occurences:
com.sun.jdi.ThreadReference.stop(com.sun.jdi.ObjectReference)
java.applet.Applet.stop()
java.applet.AudioClip.stop()
java.awt.dnd.DropTarget.DropTargetAutoScroller.stop()
java.lang.Thread.stop()
java.lang.Thread.stop(java.lang.Throwable)
java.lang.ThreadGroup.stop()
javax.management.monitor.CounterMonitor.stop()
javax.management.monitor.GaugeMonitor.stop()
javax.management.monitor.Monitor.stop()
javax.management.monitor.MonitorMBean.stop()
javax.management.monitor.StringMonitor.stop()
javax.management.remote.JMXConnectorServerMBean.stop()
javax.management.remote.rmi.RMIConnectorServer.stop()
javax.management.timer.Timer.stop()
javax.management.timer.TimerMBean.stop()
javax.sound.midi.Sequencer.stop()
javax.sound.sampled.DataLine.stop()
javax.swing.Timer.stop()
javax.xml.ws.Endpoint.stop()


Occurences of STOP

STOP occurences:
javax.sound.midi.STOP
javax.sound.sampled.STOP


Occurences of stopCellEditing

stopCellEditing occurences:
javax.swing.AbstractCellEditor.stopCellEditing()
javax.swing.CellEditor.stopCellEditing()
javax.swing.DefaultCellEditor.stopCellEditing()
javax.swing.DefaultCellEditor.EditorDelegate.stopCellEditing()
javax.swing.tree.DefaultTreeCellEditor.stopCellEditing()


Occurences of stopEditing

stopEditing occurences:
javax.swing.JTree.stopEditing()
javax.swing.plaf.basic.BasicTreeUI.stopEditing(javax.swing.JTree)
javax.swing.plaf.multi.MultiTreeUI.stopEditing(javax.swing.JTree)
javax.swing.plaf.TreeUI.stopEditing(javax.swing.JTree)


Occurences of stopListening

stopListening occurences:
com.sun.jdi.connect.ListeningConnector.stopListening(java.util.Map)
com.sun.jdi.connect.spi.TransportService.stopListening(com.sun.jdi.connect.spi.TransportService.ListenKey)


Occurences of store

store occurences:
java.security.KeyStore.store(java.io.OutputStream, char:A)
java.security.KeyStore.store(java.security.KeyStore.LoadStoreParameter)
java.util.Properties.store(java.io.OutputStream, java.lang.String)
java.util.Properties.store(java.io.Writer, java.lang.String)
javax.management.modelmbean.RequiredModelMBean.store()
javax.management.PersistentMBean.store()


Occurences of STORED

STORED occurences:
java.util.zip.STORED
java.util.zip.STORED


Occurences of storeToXML

storeToXML occurences:
java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String)
java.util.Properties.storeToXML(java.io.OutputStream, java.lang.String, java.lang.String)


Occurences of stream

stream occurences:
compact1.java.util.stream
compact2.java.util.stream
compact2.javax.xml.stream
compact2.javax.xml.transform.stream
compact3.java.util.stream
compact3.javax.xml.stream
compact3.javax.xml.transform.stream
java.util.Arrays.stream(double:A)
java.util.Arrays.stream(double:A, int, int)
java.util.Arrays.stream(int:A)
java.util.Arrays.stream(int:A, int, int)
java.util.Arrays.stream(java.lang.Object:A)
java.util.Arrays.stream(java.lang.Object:A, int, int)
java.util.Arrays.stream(long:A)
java.util.Arrays.stream(long:A, int, int)
java.util.Arrays.stream(T:A)
java.util.Arrays.stream(T:A, int, int)
java.util.BitSet.stream()
java.util.Collection.stream()
java.util.jar.JarFile.stream()
java.util.stream
java.util.stream.StreamSupport.stream(java.util.function.Supplier, int, boolean)
java.util.stream.StreamSupport.stream(java.util.Spliterator, boolean)
java.util.zip.ZipFile.stream()
javax.imageio.stream
javax.xml.stream
javax.xml.transform.stream


Occurences of StreamCorruptedException (constructors)

StreamCorruptedException (constructors) occurences:
java.io.StreamCorruptedException()
java.io.StreamCorruptedException(java.lang.String)


Occurences of StreamHandler (constructors)

StreamHandler (constructors) occurences:
java.util.logging.StreamHandler()
java.util.logging.StreamHandler(java.io.OutputStream, java.util.logging.Formatter)


Occurences of StreamReaderDelegate (constructors)

StreamReaderDelegate (constructors) occurences:
javax.xml.stream.util.StreamReaderDelegate()
javax.xml.stream.util.StreamReaderDelegate(javax.xml.stream.XMLStreamReader)


Occurences of StreamResult (constructors)

StreamResult (constructors) occurences:
javax.xml.transform.stream.StreamResult()
javax.xml.transform.stream.StreamResult(java.io.File)
javax.xml.transform.stream.StreamResult(java.io.OutputStream)
javax.xml.transform.stream.StreamResult(java.io.Writer)
javax.xml.transform.stream.StreamResult(java.lang.String)


Occurences of StreamSource (constructors)

StreamSource (constructors) occurences:
javax.xml.transform.stream.StreamSource()
javax.xml.transform.stream.StreamSource(java.io.File)
javax.xml.transform.stream.StreamSource(java.io.InputStream)
javax.xml.transform.stream.StreamSource(java.io.InputStream, java.lang.String)
javax.xml.transform.stream.StreamSource(java.io.Reader)
javax.xml.transform.stream.StreamSource(java.io.Reader, java.lang.String)
javax.xml.transform.stream.StreamSource(java.lang.String)


Occurences of StreamTokenizer (constructors)

StreamTokenizer (constructors) occurences:
java.io.StreamTokenizer(java.io.InputStream)
java.io.StreamTokenizer(java.io.Reader)


Occurences of STRICT

STRICT occurences:
java.lang.reflect.STRICT
java.time.format.STRICT


Occurences of STRING

STRING occurences:
javax.management.openmbean.STRING
javax.print.DocFlavor.STRING.STRING(java.lang.String)
javax.xml.xpath.STRING


Occurences of String (constructors)

String (constructors) occurences:
java.lang.String()
java.lang.String(byte:A)
java.lang.String(byte:A, int)
java.lang.String(byte:A, int, int)
java.lang.String(byte:A, int, int, int)
java.lang.String(byte:A, int, int, java.lang.String)
java.lang.String(byte:A, int, int, java.nio.charset.Charset)
java.lang.String(byte:A, java.lang.String)
java.lang.String(byte:A, java.nio.charset.Charset)
java.lang.String(char:A)
java.lang.String(char:A, int, int)
java.lang.String(int:A, int, int)
java.lang.String(java.lang.String)
java.lang.String(java.lang.StringBuffer)
java.lang.String(java.lang.StringBuilder)


Occurences of StringBuffer (constructors)

StringBuffer (constructors) occurences:
java.lang.StringBuffer()
java.lang.StringBuffer(int)
java.lang.StringBuffer(java.lang.CharSequence)
java.lang.StringBuffer(java.lang.String)


Occurences of StringBuilder (constructors)

StringBuilder (constructors) occurences:
java.lang.StringBuilder()
java.lang.StringBuilder(int)
java.lang.StringBuilder(java.lang.CharSequence)
java.lang.StringBuilder(java.lang.String)


Occurences of StringCharacterIterator (constructors)

StringCharacterIterator (constructors) occurences:
java.text.StringCharacterIterator(java.lang.String)
java.text.StringCharacterIterator(java.lang.String, int)
java.text.StringCharacterIterator(java.lang.String, int, int, int)


Occurences of StringContent (constructors)

StringContent (constructors) occurences:
javax.swing.text.StringContent()
javax.swing.text.StringContent(int)


Occurences of StringHolder (constructors)

StringHolder (constructors) occurences:
org.omg.CORBA.StringHolder()
org.omg.CORBA.StringHolder(java.lang.String)


Occurences of StringIndexOutOfBoundsException (constructors)

StringIndexOutOfBoundsException (constructors) occurences:
java.lang.StringIndexOutOfBoundsException()
java.lang.StringIndexOutOfBoundsException(int)
java.lang.StringIndexOutOfBoundsException(java.lang.String)


Occurences of StringJoiner (constructors)

StringJoiner (constructors) occurences:
java.util.StringJoiner(java.lang.CharSequence)
java.util.StringJoiner(java.lang.CharSequence, java.lang.CharSequence, java.lang.CharSequence)


Occurences of StringSeqHolder (constructors)

StringSeqHolder (constructors) occurences:
org.omg.CORBA.StringSeqHolder()
org.omg.CORBA.StringSeqHolder(java.lang.String:A)


Occurences of StringTokenizer (constructors)

StringTokenizer (constructors) occurences:
java.util.StringTokenizer(java.lang.String)
java.util.StringTokenizer(java.lang.String, java.lang.String)
java.util.StringTokenizer(java.lang.String, java.lang.String, boolean)


Occurences of stringToValue

stringToValue occurences:
javax.swing.JFormattedTextField.AbstractFormatter.stringToValue(java.lang.String)
javax.swing.text.DefaultFormatter.stringToValue(java.lang.String)
javax.swing.text.InternationalFormatter.stringToValue(java.lang.String)
javax.swing.text.MaskFormatter.stringToValue(java.lang.String)


Occurences of StringValueExp (constructors)

StringValueExp (constructors) occurences:
javax.management.StringValueExp()
javax.management.StringValueExp(java.lang.String)


Occurences of stringValueOf

stringValueOf occurences:
com.sun.jdi.connect.Connector.BooleanArgument.stringValueOf(boolean)
com.sun.jdi.connect.Connector.IntegerArgument.stringValueOf(int)


Occurences of StringWriter (constructors)

StringWriter (constructors) occurences:
java.io.StringWriter()
java.io.StringWriter(int)


Occurences of StrokeBorder (constructors)

StrokeBorder (constructors) occurences:
javax.swing.border.StrokeBorder(java.awt.BasicStroke)
javax.swing.border.StrokeBorder(java.awt.BasicStroke, java.awt.Paint)


Occurences of STRUCT

STRUCT occurences:
java.sql.STRUCT
java.sql.STRUCT


Occurences of StructMember (constructors)

StructMember (constructors) occurences:
org.omg.CORBA.StructMember()
org.omg.CORBA.StructMember(java.lang.String, org.omg.CORBA.TypeCode, org.omg.CORBA.IDLType)


Occurences of StubNotFoundException (constructors)

StubNotFoundException (constructors) occurences:
java.rmi.StubNotFoundException(java.lang.String)
java.rmi.StubNotFoundException(java.lang.String, java.lang.Exception)


Occurences of style

style occurences:
java.awt.style
javax.jws.soap.SOAPBinding.style()


Occurences of STYLE

STYLE occurences:
javax.swing.text.html.STYLE
javax.swing.text.html.STYLE


Occurences of subdivide

subdivide occurences:
java.awt.geom.CubicCurve2D.subdivide(double:A, int, double:A, int, double:A, int)
java.awt.geom.CubicCurve2D.subdivide(java.awt.geom.CubicCurve2D, java.awt.geom.CubicCurve2D)
java.awt.geom.CubicCurve2D.subdivide(java.awt.geom.CubicCurve2D, java.awt.geom.CubicCurve2D, java.awt.geom.CubicCurve2D)
java.awt.geom.QuadCurve2D.subdivide(double:A, int, double:A, int, double:A, int)
java.awt.geom.QuadCurve2D.subdivide(java.awt.geom.QuadCurve2D, java.awt.geom.QuadCurve2D)
java.awt.geom.QuadCurve2D.subdivide(java.awt.geom.QuadCurve2D, java.awt.geom.QuadCurve2D, java.awt.geom.QuadCurve2D)


Occurences of Subject (constructors)

Subject (constructors) occurences:
javax.security.auth.Subject()
javax.security.auth.Subject(boolean, java.util.Set, java.util.Set, java.util.Set)


Occurences of SubjectDelegationPermission (constructors)

SubjectDelegationPermission (constructors) occurences:
javax.management.remote.SubjectDelegationPermission(java.lang.String)
javax.management.remote.SubjectDelegationPermission(java.lang.String, java.lang.String)


Occurences of Subjects, Principals, Authentication, and Credentials

Subjects, Principals, Authentication, and Credentials occurences:
Subjects, Principals, Authentication, and Credentials
Subjects, Principals, Authentication, and Credentials


Occurences of subList

subList occurences:
java.util.AbstractList.subList(int, int)
java.util.ArrayList.subList(int, int)
java.util.concurrent.CopyOnWriteArrayList.subList(int, int)
java.util.List.subList(int, int)
java.util.Vector.subList(int, int)


Occurences of subMap

subMap occurences:
java.util.concurrent.ConcurrentNavigableMap.subMap(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.concurrent.ConcurrentNavigableMap.subMap(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentNavigableMap.subMap(K, boolean, K, boolean)
java.util.concurrent.ConcurrentNavigableMap.subMap(K, K)
java.util.concurrent.ConcurrentSkipListMap.subMap(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.concurrent.ConcurrentSkipListMap.subMap(java.lang.Object, java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.subMap(K, boolean, K, boolean)
java.util.concurrent.ConcurrentSkipListMap.subMap(K, K)
java.util.NavigableMap.subMap(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.NavigableMap.subMap(java.lang.Object, java.lang.Object)
java.util.NavigableMap.subMap(K, boolean, K, boolean)
java.util.NavigableMap.subMap(K, K)
java.util.SortedMap.subMap(java.lang.Object, java.lang.Object)
java.util.SortedMap.subMap(K, K)
java.util.TreeMap.subMap(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.TreeMap.subMap(java.lang.Object, java.lang.Object)
java.util.TreeMap.subMap(K, boolean, K, boolean)
java.util.TreeMap.subMap(K, K)


Occurences of submit

submit occurences:
java.util.concurrent.AbstractExecutorService.submit(java.lang.Runnable)
java.util.concurrent.AbstractExecutorService.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.AbstractExecutorService.submit(java.lang.Runnable, T)
java.util.concurrent.AbstractExecutorService.submit(java.util.concurrent.Callable)
java.util.concurrent.CompletionService.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.CompletionService.submit(java.lang.Runnable, V)
java.util.concurrent.CompletionService.submit(java.util.concurrent.Callable)
java.util.concurrent.ExecutorCompletionService.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ExecutorCompletionService.submit(java.lang.Runnable, V)
java.util.concurrent.ExecutorCompletionService.submit(java.util.concurrent.Callable)
java.util.concurrent.ExecutorService.submit(java.lang.Runnable)
java.util.concurrent.ExecutorService.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ExecutorService.submit(java.lang.Runnable, T)
java.util.concurrent.ExecutorService.submit(java.util.concurrent.Callable)
java.util.concurrent.ForkJoinPool.submit(java.lang.Runnable)
java.util.concurrent.ForkJoinPool.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ForkJoinPool.submit(java.lang.Runnable, T)
java.util.concurrent.ForkJoinPool.submit(java.util.concurrent.Callable)
java.util.concurrent.ForkJoinPool.submit(java.util.concurrent.ForkJoinTask)
java.util.concurrent.ScheduledThreadPoolExecutor.submit(java.lang.Runnable)
java.util.concurrent.ScheduledThreadPoolExecutor.submit(java.lang.Runnable, java.lang.Object)
java.util.concurrent.ScheduledThreadPoolExecutor.submit(java.lang.Runnable, T)
java.util.concurrent.ScheduledThreadPoolExecutor.submit(java.util.concurrent.Callable)


Occurences of Submitting Bug Reports

Submitting Bug Reports occurences:
Submitting Bug Reports
Submitting Bug Reports


Occurences of subSequence

subSequence occurences:
java.lang.CharSequence.subSequence(int, int)
java.lang.String.subSequence(int, int)
java.lang.StringBuffer.subSequence(int, int)
java.lang.StringBuilder.subSequence(int, int)
java.nio.CharBuffer.subSequence(int, int)
javax.swing.text.Segment.subSequence(int, int)


Occurences of subSet

subSet occurences:
java.util.concurrent.ConcurrentSkipListSet.subSet(E, boolean, E, boolean)
java.util.concurrent.ConcurrentSkipListSet.subSet(E, E)
java.util.concurrent.ConcurrentSkipListSet.subSet(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.concurrent.ConcurrentSkipListSet.subSet(java.lang.Object, java.lang.Object)
java.util.NavigableSet.subSet(E, boolean, E, boolean)
java.util.NavigableSet.subSet(E, E)
java.util.NavigableSet.subSet(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.NavigableSet.subSet(java.lang.Object, java.lang.Object)
java.util.SortedSet.subSet(E, E)
java.util.SortedSet.subSet(java.lang.Object, java.lang.Object)
java.util.TreeSet.subSet(E, boolean, E, boolean)
java.util.TreeSet.subSet(E, E)
java.util.TreeSet.subSet(java.lang.Object, boolean, java.lang.Object, boolean)
java.util.TreeSet.subSet(java.lang.Object, java.lang.Object)


Occurences of Substitution by Serializable Classes

Substitution by Serializable Classes occurences:
Substitution by Serializable Classes
Substitution by Serializable Classes
Substitution by Serializable Classes


Occurences of substring

substring occurences:
java.lang.String.substring(int)
java.lang.String.substring(int, int)
java.lang.StringBuffer.substring(int)
java.lang.StringBuffer.substring(int, int)
java.lang.StringBuilder.substring(int)
java.lang.StringBuilder.substring(int, int)


Occurences of subtract

subtract occurences:
java.awt.geom.Area.subtract(java.awt.geom.Area)
java.math.BigDecimal.subtract(java.math.BigDecimal)
java.math.BigDecimal.subtract(java.math.BigDecimal, java.math.MathContext)
java.math.BigInteger.subtract(java.math.BigInteger)
javax.xml.datatype.Duration.subtract(javax.xml.datatype.Duration)


Occurences of subtractExact

subtractExact occurences:
java.lang.Math.subtractExact(int, int)
java.lang.Math.subtractExact(long, long)
java.lang.StrictMath.subtractExact(int, int)
java.lang.StrictMath.subtractExact(long, long)


Occurences of subtractFrom

subtractFrom occurences:
java.time.chrono.ChronoPeriod.subtractFrom(java.time.temporal.Temporal)
java.time.Duration.subtractFrom(java.time.temporal.Temporal)
java.time.Period.subtractFrom(java.time.temporal.Temporal)
java.time.temporal.TemporalAmount.subtractFrom(java.time.temporal.Temporal)


Occurences of SUBTREE_SCOPE

SUBTREE_SCOPE occurences:
javax.naming.directory.SUBTREE_SCOPE
javax.naming.event.SUBTREE_SCOPE


Occurences of sum

sum occurences:
java.lang.Double.sum(double, double)
java.lang.Float.sum(float, float)
java.lang.Integer.sum(int, int)
java.lang.Long.sum(long, long)
java.util.concurrent.atomic.DoubleAdder.sum()
java.util.concurrent.atomic.LongAdder.sum()
java.util.regex.sum
java.util.stream.DoubleStream.sum()
java.util.stream.IntStream.sum()
java.util.stream.LongStream.sum()
javax.swing.Spring.sum(javax.swing.Spring, javax.swing.Spring)


Occurences of summaryStatistics

summaryStatistics occurences:
java.util.stream.DoubleStream.summaryStatistics()
java.util.stream.IntStream.summaryStatistics()
java.util.stream.LongStream.summaryStatistics()


Occurences of sumThenReset

sumThenReset occurences:
java.util.concurrent.atomic.DoubleAdder.sumThenReset()
java.util.concurrent.atomic.LongAdder.sumThenReset()


Occurences of SUNDANESE

SUNDANESE occurences:
java.awt.font.SUNDANESE
java.lang.SUNDANESE
java.lang.SUNDANESE


Occurences of SUNDAY

SUNDAY occurences:
java.time.SUNDAY
java.util.SUNDAY


Occurences of superclass

superclass occurences:
com.sun.javadoc.ClassDoc.superclass()
com.sun.jdi.ClassType.superclass()


Occurences of superclassType

superclassType occurences:
com.sun.javadoc.ClassDoc.superclassType()
com.sun.javadoc.ParameterizedType.superclassType()


Occurences of supplyAsync

supplyAsync occurences:
java.util.concurrent.CompletableFuture.supplyAsync(java.util.function.Supplier)
java.util.concurrent.CompletableFuture.supplyAsync(java.util.function.Supplier, java.util.concurrent.Executor)


Occurences of Supported Properties

Supported Properties occurences:
javax.xml.crypto.dsig.Supported Properties
javax.xml.crypto.dsig.Supported Properties


Occurences of supportedProps

supportedProps occurences:
javax.xml.bind.supportedProps
javax.xml.bind.supportedProps
javax.xml.bind.supportedProps


Occurences of supportsConvert

supportsConvert occurences:
java.sql.DatabaseMetaData.supportsConvert()
java.sql.DatabaseMetaData.supportsConvert(int, int)


Occurences of supportsCustomEditor

supportsCustomEditor occurences:
java.beans.PropertyEditor.supportsCustomEditor()
java.beans.PropertyEditorSupport.supportsCustomEditor()


Occurences of supportsFileAttributeView

supportsFileAttributeView occurences:
java.nio.file.FileStore.supportsFileAttributeView(java.lang.Class)
java.nio.file.FileStore.supportsFileAttributeView(java.lang.String)


Occurences of supportsMultipleConnections

supportsMultipleConnections occurences:
com.sun.jdi.connect.ListeningConnector.supportsMultipleConnections()
com.sun.jdi.connect.spi.TransportService.Capabilities.supportsMultipleConnections()


Occurences of suspend

suspend occurences:
com.sun.jdi.ThreadGroupReference.suspend()
com.sun.jdi.ThreadReference.suspend()
com.sun.jdi.VirtualMachine.suspend()
java.lang.Thread.suspend()
java.lang.ThreadGroup.suspend()


Occurences of suspendPolicy

suspendPolicy occurences:
com.sun.jdi.event.EventSet.suspendPolicy()
com.sun.jdi.request.EventRequest.suspendPolicy()


Occurences of SwingPropertyChangeSupport (constructors)

SwingPropertyChangeSupport (constructors) occurences:
javax.swing.event.SwingPropertyChangeSupport(java.lang.Object)
javax.swing.event.SwingPropertyChangeSupport(java.lang.Object, boolean)


Occurences of SW_RESIZE_CURSOR

SW_RESIZE_CURSOR occurences:
java.awt.SW_RESIZE_CURSOR
java.awt.SW_RESIZE_CURSOR


Occurences of SYLOTI_NAGRI

SYLOTI_NAGRI occurences:
java.lang.SYLOTI_NAGRI
java.lang.SYLOTI_NAGRI


Occurences of sync

sync occurences:
java.awt.Toolkit.sync()
java.io.FileDescriptor.sync()
java.util.prefs.AbstractPreferences.sync()
java.util.prefs.Preferences.sync()


Occurences of SyncFactoryException (constructors)

SyncFactoryException (constructors) occurences:
javax.sql.rowset.spi.SyncFactoryException()
javax.sql.rowset.spi.SyncFactoryException(java.lang.String)


Occurences of synchronization

synchronization occurences:
java.text.synchronization
java.text.synchronization
java.text.synchronization
java.text.synchronization
java.text.synchronization
java.text.synchronization
java.text.synchronization


Occurences of SYNCHRONIZED

SYNCHRONIZED occurences:
com.sun.source.tree.SYNCHRONIZED
java.lang.reflect.SYNCHRONIZED
javax.lang.model.element.SYNCHRONIZED


Occurences of synchronizedView

synchronizedView occurences:
javax.print.attribute.AttributeSetUtilities.synchronizedView(javax.print.attribute.AttributeSet)
javax.print.attribute.AttributeSetUtilities.synchronizedView(javax.print.attribute.DocAttributeSet)
javax.print.attribute.AttributeSetUtilities.synchronizedView(javax.print.attribute.PrintJobAttributeSet)
javax.print.attribute.AttributeSetUtilities.synchronizedView(javax.print.attribute.PrintRequestAttributeSet)
javax.print.attribute.AttributeSetUtilities.synchronizedView(javax.print.attribute.PrintServiceAttributeSet)


Occurences of SynchronousQueue (constructors)

SynchronousQueue (constructors) occurences:
java.util.concurrent.SynchronousQueue()
java.util.concurrent.SynchronousQueue(boolean)


Occurences of SyncProviderException (constructors)

SyncProviderException (constructors) occurences:
javax.sql.rowset.spi.SyncProviderException()
javax.sql.rowset.spi.SyncProviderException(java.lang.String)
javax.sql.rowset.spi.SyncProviderException(javax.sql.rowset.spi.SyncResolver)


Occurences of SYRIAC

SYRIAC occurences:
java.lang.SYRIAC
java.lang.SYRIAC


Occurences of SysexMessage (constructors)

SysexMessage (constructors) occurences:
javax.sound.midi.SysexMessage()
javax.sound.midi.SysexMessage(byte:A)
javax.sound.midi.SysexMessage(byte:A, int)
javax.sound.midi.SysexMessage(int, byte:A, int)


Occurences of systemRoot

systemRoot occurences:
java.util.prefs.Preferences.systemRoot()
java.util.prefs.PreferencesFactory.systemRoot()


Occurences of S_RESIZE_CURSOR

S_RESIZE_CURSOR occurences:
java.awt.S_RESIZE_CURSOR
java.awt.S_RESIZE_CURSOR


Occurences of TabbedPaneLayout

TabbedPaneLayout occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.TabbedPaneLayout()
javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout.TabbedPaneLayout()


Occurences of tabForCoordinate

tabForCoordinate occurences:
javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(javax.swing.JTabbedPane, int, int)
javax.swing.plaf.multi.MultiTabbedPaneUI.tabForCoordinate(javax.swing.JTabbedPane, int, int)
javax.swing.plaf.TabbedPaneUI.tabForCoordinate(javax.swing.JTabbedPane, int, int)


Occurences of TABLE

TABLE occurences:
javax.accessibility.TABLE
javax.swing.plaf.synth.TABLE
javax.swing.text.html.TABLE


Occurences of table

table occurences:
javax.swing.plaf.basic.table
javax.swing.table
javax.swing.table.table


Occurences of Table of Contents

Table of Contents occurences:
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents
Table of Contents


Occurences of tableChanged

tableChanged occurences:
javax.swing.event.TableModelListener.tableChanged(javax.swing.event.TableModelEvent)
javax.swing.JTable.tableChanged(javax.swing.event.TableModelEvent)
javax.swing.JTable.AccessibleJTable.tableChanged(javax.swing.event.TableModelEvent)


Occurences of TableColumn (constructors)

TableColumn (constructors) occurences:
javax.swing.table.TableColumn()
javax.swing.table.TableColumn(int)
javax.swing.table.TableColumn(int, int)
javax.swing.table.TableColumn(int, int, javax.swing.table.TableCellRenderer, javax.swing.table.TableCellEditor)


Occurences of TableModelEvent (constructors)

TableModelEvent (constructors) occurences:
javax.swing.event.TableModelEvent(javax.swing.table.TableModel)
javax.swing.event.TableModelEvent(javax.swing.table.TableModel, int)
javax.swing.event.TableModelEvent(javax.swing.table.TableModel, int, int)
javax.swing.event.TableModelEvent(javax.swing.table.TableModel, int, int, int)
javax.swing.event.TableModelEvent(javax.swing.table.TableModel, int, int, int, int)


Occurences of TableRowSorter (constructors)

TableRowSorter (constructors) occurences:
javax.swing.table.TableRowSorter()
javax.swing.table.TableRowSorter(javax.swing.table.TableModel)
javax.swing.table.TableRowSorter(M)


Occurences of TABLOID

TABLOID occurences:
java.awt.TABLOID
javax.print.attribute.standard.TABLOID
javax.print.attribute.standard.TABLOID


Occurences of TabSet

TabSet occurences:
javax.swing.text.TabSet
javax.swing.text.TabSet


Occurences of TabStop (constructors)

TabStop (constructors) occurences:
javax.swing.text.TabStop(float)
javax.swing.text.TabStop(float, int, int)


Occurences of TabularDataSupport (constructors)

TabularDataSupport (constructors) occurences:
javax.management.openmbean.TabularDataSupport(javax.management.openmbean.TabularType)
javax.management.openmbean.TabularDataSupport(javax.management.openmbean.TabularType, int, float)


Occurences of Tag

Tag occurences:
com.sun.javadoc.Tag
javax.swing.text.html.HTML.Tag.Tag()
javax.swing.text.html.HTML.Tag.Tag(java.lang.String)
javax.swing.text.html.HTML.Tag.Tag(java.lang.String, boolean, boolean)


Occurences of tag

tag occurences:
org.omg.IOP.tag
org.omg.IOP.tag


Occurences of TAGALOG

TAGALOG occurences:
java.lang.TAGALOG
java.lang.TAGALOG


Occurences of TAGBANWA

TAGBANWA occurences:
java.lang.TAGBANWA
java.lang.TAGBANWA


Occurences of TagElement (constructors)

TagElement (constructors) occurences:
javax.swing.text.html.parser.TagElement(javax.swing.text.html.parser.Element)
javax.swing.text.html.parser.TagElement(javax.swing.text.html.parser.Element, boolean)


Occurences of TaggedComponent (constructors)

TaggedComponent (constructors) occurences:
org.omg.IOP.TaggedComponent()
org.omg.IOP.TaggedComponent(int, byte:A)


Occurences of TaggedComponentHolder (constructors)

TaggedComponentHolder (constructors) occurences:
org.omg.IOP.TaggedComponentHolder()
org.omg.IOP.TaggedComponentHolder(org.omg.IOP.TaggedComponent)


Occurences of TaggedProfile (constructors)

TaggedProfile (constructors) occurences:
org.omg.IOP.TaggedProfile()
org.omg.IOP.TaggedProfile(int, byte:A)


Occurences of TaggedProfileHolder (constructors)

TaggedProfileHolder (constructors) occurences:
org.omg.IOP.TaggedProfileHolder()
org.omg.IOP.TaggedProfileHolder(org.omg.IOP.TaggedProfile)


Occurences of Taglet Overview

Taglet Overview occurences:
Taglet Overview
Taglet Overview


Occurences of tags

tags occurences:
com.sun.javadoc.Doc.tags()
com.sun.javadoc.Doc.tags(java.lang.String)


Occurences of tailMap

tailMap occurences:
java.util.concurrent.ConcurrentNavigableMap.tailMap(java.lang.Object)
java.util.concurrent.ConcurrentNavigableMap.tailMap(java.lang.Object, boolean)
java.util.concurrent.ConcurrentNavigableMap.tailMap(K)
java.util.concurrent.ConcurrentNavigableMap.tailMap(K, boolean)
java.util.concurrent.ConcurrentSkipListMap.tailMap(java.lang.Object)
java.util.concurrent.ConcurrentSkipListMap.tailMap(java.lang.Object, boolean)
java.util.concurrent.ConcurrentSkipListMap.tailMap(K)
java.util.concurrent.ConcurrentSkipListMap.tailMap(K, boolean)
java.util.NavigableMap.tailMap(java.lang.Object)
java.util.NavigableMap.tailMap(java.lang.Object, boolean)
java.util.NavigableMap.tailMap(K)
java.util.NavigableMap.tailMap(K, boolean)
java.util.SortedMap.tailMap(java.lang.Object)
java.util.SortedMap.tailMap(K)
java.util.TreeMap.tailMap(java.lang.Object)
java.util.TreeMap.tailMap(java.lang.Object, boolean)
java.util.TreeMap.tailMap(K)
java.util.TreeMap.tailMap(K, boolean)


Occurences of tailSet

tailSet occurences:
java.util.concurrent.ConcurrentSkipListSet.tailSet(E)
java.util.concurrent.ConcurrentSkipListSet.tailSet(E, boolean)
java.util.concurrent.ConcurrentSkipListSet.tailSet(java.lang.Object)
java.util.concurrent.ConcurrentSkipListSet.tailSet(java.lang.Object, boolean)
java.util.NavigableSet.tailSet(E)
java.util.NavigableSet.tailSet(E, boolean)
java.util.NavigableSet.tailSet(java.lang.Object)
java.util.NavigableSet.tailSet(java.lang.Object, boolean)
java.util.SortedSet.tailSet(E)
java.util.SortedSet.tailSet(java.lang.Object)
java.util.TreeSet.tailSet(E)
java.util.TreeSet.tailSet(E, boolean)
java.util.TreeSet.tailSet(java.lang.Object)
java.util.TreeSet.tailSet(java.lang.Object, boolean)


Occurences of TAI_LE

TAI_LE occurences:
java.lang.TAI_LE
java.lang.TAI_LE


Occurences of TAI_THAM

TAI_THAM occurences:
java.lang.TAI_THAM
java.lang.TAI_THAM


Occurences of TAI_VIET

TAI_VIET occurences:
java.lang.TAI_VIET
java.lang.TAI_VIET


Occurences of take

take occurences:
java.nio.file.WatchService.take()
java.util.concurrent.ArrayBlockingQueue.take()
java.util.concurrent.BlockingDeque.take()
java.util.concurrent.BlockingQueue.take()
java.util.concurrent.CompletionService.take()
java.util.concurrent.DelayQueue.take()
java.util.concurrent.ExecutorCompletionService.take()
java.util.concurrent.LinkedBlockingDeque.take()
java.util.concurrent.LinkedBlockingQueue.take()
java.util.concurrent.LinkedTransferQueue.take()
java.util.concurrent.PriorityBlockingQueue.take()
java.util.concurrent.SynchronousQueue.take()


Occurences of takeFirst

takeFirst occurences:
java.util.concurrent.BlockingDeque.takeFirst()
java.util.concurrent.LinkedBlockingDeque.takeFirst()


Occurences of takeLast

takeLast occurences:
java.util.concurrent.BlockingDeque.takeLast()
java.util.concurrent.LinkedBlockingDeque.takeLast()


Occurences of TAKRI

TAKRI occurences:
java.lang.TAKRI
java.lang.TAKRI


Occurences of TAMIL

TAMIL occurences:
java.awt.font.TAMIL
java.awt.font.TAMIL
java.lang.TAMIL
java.lang.TAMIL


Occurences of tan

tan occurences:
java.lang.Math.tan(double)
java.lang.StrictMath.tan(double)


Occurences of tanh

tanh occurences:
java.lang.Math.tanh(double)
java.lang.StrictMath.tanh(double)


Occurences of target

target occurences:
java.awt.target
org.omg.CORBA.Request.target()
org.omg.PortableInterceptor.ClientRequestInfoOperations.target()


Occurences of targetNamespace

targetNamespace occurences:
javax.jws.WebParam.targetNamespace()
javax.jws.WebResult.targetNamespace()
javax.jws.WebService.targetNamespace()
javax.xml.ws.RequestWrapper.targetNamespace()
javax.xml.ws.ResponseWrapper.targetNamespace()
javax.xml.ws.WebFault.targetNamespace()
javax.xml.ws.WebServiceClient.targetNamespace()
javax.xml.ws.WebServiceProvider.targetNamespace()


Occurences of TaskEvent (constructors)

TaskEvent (constructors) occurences:
com.sun.source.util.TaskEvent(com.sun.source.util.TaskEvent.Kind)
com.sun.source.util.TaskEvent(com.sun.source.util.TaskEvent.Kind, com.sun.source.tree.CompilationUnitTree)
com.sun.source.util.TaskEvent(com.sun.source.util.TaskEvent.Kind, com.sun.source.tree.CompilationUnitTree, javax.lang.model.element.TypeElement)
com.sun.source.util.TaskEvent(com.sun.source.util.TaskEvent.Kind, javax.tools.JavaFileObject)


Occurences of TCP_NODELAY

TCP_NODELAY occurences:
java.net.TCP_NODELAY
java.net.TCP_NODELAY


Occurences of TELUGU

TELUGU occurences:
java.awt.font.TELUGU
java.awt.font.TELUGU
java.lang.TELUGU
java.lang.TELUGU


Occurences of temporal

temporal occurences:
compact1.java.time.temporal
compact2.java.time.temporal
compact3.java.time.temporal
java.time.temporal


Occurences of TEN

TEN occurences:
java.math.TEN
java.math.TEN


Occurences of test

test occurences:
java.util.function.BiPredicate.test(java.lang.Object, java.lang.Object)
java.util.function.BiPredicate.test(T, U)
java.util.function.DoublePredicate.test(double)
java.util.function.IntPredicate.test(int)
java.util.function.LongPredicate.test(long)
java.util.function.Predicate.test(java.lang.Object)
java.util.function.Predicate.test(T)


Occurences of TEXT

TEXT occurences:
com.sun.source.doctree.TEXT
java.awt.TEXT
javax.accessibility.TEXT
javax.swing.text.html.TEXT


Occurences of text

text occurences:
com.sun.javadoc.Tag.text()
compact1.java.text
compact2.java.text
compact3.java.text
java.awt.text
java.text
java.text.text
javax.accessibility.text
javax.swing.text
javax.swing.text.AbstractWriter.text(javax.swing.text.Element)
javax.swing.text.html.HTMLWriter.text(javax.swing.text.Element)
javax.swing.text.html.MinimalHTMLWriter.text(javax.swing.text.Element)


Occurences of Text

Text occurences:
javax.xml.soap.Text
org.w3c.dom.Text


Occurences of TextArea (constructors)

TextArea (constructors) occurences:
java.awt.TextArea()
java.awt.TextArea(int, int)
java.awt.TextArea(java.lang.String)
java.awt.TextArea(java.lang.String, int, int)
java.awt.TextArea(java.lang.String, int, int, int)


Occurences of textAreaContent

textAreaContent occurences:
javax.swing.text.html.HTMLDocument.HTMLReader.textAreaContent(char:A)
javax.swing.text.html.HTMLWriter.textAreaContent(javax.swing.text.AttributeSet)


Occurences of TextField (constructors)

TextField (constructors) occurences:
java.awt.TextField()
java.awt.TextField(int)
java.awt.TextField(java.lang.String)
java.awt.TextField(java.lang.String, int)


Occurences of TextInputCallback (constructors)

TextInputCallback (constructors) occurences:
javax.security.auth.callback.TextInputCallback(java.lang.String)
javax.security.auth.callback.TextInputCallback(java.lang.String, java.lang.String)


Occurences of TextLayout (constructors)

TextLayout (constructors) occurences:
java.awt.font.TextLayout(java.lang.String, java.awt.Font, java.awt.font.FontRenderContext)
java.awt.font.TextLayout(java.lang.String, java.util.Map, java.awt.font.FontRenderContext)
java.awt.font.TextLayout(java.text.AttributedCharacterIterator, java.awt.font.FontRenderContext)


Occurences of textValueChanged

textValueChanged occurences:
java.awt.AWTEventMulticaster.textValueChanged(java.awt.event.TextEvent)
java.awt.event.TextListener.textValueChanged(java.awt.event.TextEvent)
java.awt.TextComponent.AccessibleAWTTextComponent.textValueChanged(java.awt.event.TextEvent)


Occurences of TEXT_CURSOR

TEXT_CURSOR occurences:
java.awt.TEXT_CURSOR
java.awt.TEXT_CURSOR


Occurences of TEXT_HTML

TEXT_HTML occurences:
javax.print.TEXT_HTML
javax.print.TEXT_HTML
javax.print.TEXT_HTML


Occurences of TEXT_HTML_HOST

TEXT_HTML_HOST occurences:
javax.print.TEXT_HTML_HOST
javax.print.TEXT_HTML_HOST
javax.print.TEXT_HTML_HOST


Occurences of TEXT_HTML_US_ASCII

TEXT_HTML_US_ASCII occurences:
javax.print.TEXT_HTML_US_ASCII
javax.print.TEXT_HTML_US_ASCII
javax.print.TEXT_HTML_US_ASCII


Occurences of TEXT_HTML_UTF_16

TEXT_HTML_UTF_16 occurences:
javax.print.TEXT_HTML_UTF_16
javax.print.TEXT_HTML_UTF_16
javax.print.TEXT_HTML_UTF_16


Occurences of TEXT_HTML_UTF_16BE

TEXT_HTML_UTF_16BE occurences:
javax.print.TEXT_HTML_UTF_16BE
javax.print.TEXT_HTML_UTF_16BE
javax.print.TEXT_HTML_UTF_16BE


Occurences of TEXT_HTML_UTF_16LE

TEXT_HTML_UTF_16LE occurences:
javax.print.TEXT_HTML_UTF_16LE
javax.print.TEXT_HTML_UTF_16LE
javax.print.TEXT_HTML_UTF_16LE


Occurences of TEXT_HTML_UTF_8

TEXT_HTML_UTF_8 occurences:
javax.print.TEXT_HTML_UTF_8
javax.print.TEXT_HTML_UTF_8
javax.print.TEXT_HTML_UTF_8


Occurences of TEXT_PLAIN

TEXT_PLAIN occurences:
javax.print.TEXT_PLAIN
javax.print.TEXT_PLAIN
javax.print.TEXT_PLAIN


Occurences of TEXT_PLAIN_HOST

TEXT_PLAIN_HOST occurences:
javax.print.TEXT_PLAIN_HOST
javax.print.TEXT_PLAIN_HOST
javax.print.TEXT_PLAIN_HOST


Occurences of TEXT_PLAIN_US_ASCII

TEXT_PLAIN_US_ASCII occurences:
javax.print.TEXT_PLAIN_US_ASCII
javax.print.TEXT_PLAIN_US_ASCII
javax.print.TEXT_PLAIN_US_ASCII


Occurences of TEXT_PLAIN_UTF_16

TEXT_PLAIN_UTF_16 occurences:
javax.print.TEXT_PLAIN_UTF_16
javax.print.TEXT_PLAIN_UTF_16
javax.print.TEXT_PLAIN_UTF_16


Occurences of TEXT_PLAIN_UTF_16BE

TEXT_PLAIN_UTF_16BE occurences:
javax.print.TEXT_PLAIN_UTF_16BE
javax.print.TEXT_PLAIN_UTF_16BE
javax.print.TEXT_PLAIN_UTF_16BE


Occurences of TEXT_PLAIN_UTF_16LE

TEXT_PLAIN_UTF_16LE occurences:
javax.print.TEXT_PLAIN_UTF_16LE
javax.print.TEXT_PLAIN_UTF_16LE
javax.print.TEXT_PLAIN_UTF_16LE


Occurences of TEXT_PLAIN_UTF_8

TEXT_PLAIN_UTF_8 occurences:
javax.print.TEXT_PLAIN_UTF_8
javax.print.TEXT_PLAIN_UTF_8
javax.print.TEXT_PLAIN_UTF_8


Occurences of THAANA

THAANA occurences:
java.lang.THAANA
java.lang.THAANA


Occurences of THAI

THAI occurences:
java.awt.font.THAI
java.awt.font.THAI
java.lang.THAI
java.lang.THAI


Occurences of The "Hello World" Example

The "Hello World" Example occurences:
The "Hello World" Example
The "Hello World" Example


Occurences of The Extension Mechanism

The Extension Mechanism occurences:
The Extension Mechanism
The Extension Mechanism


Occurences of thenAccept

thenAccept occurences:
java.util.concurrent.CompletableFuture.thenAccept(java.util.function.Consumer)
java.util.concurrent.CompletionStage.thenAccept(java.util.function.Consumer)


Occurences of thenAcceptAsync

thenAcceptAsync occurences:
java.util.concurrent.CompletableFuture.thenAcceptAsync(java.util.function.Consumer)
java.util.concurrent.CompletableFuture.thenAcceptAsync(java.util.function.Consumer, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenAcceptAsync(java.util.function.Consumer)
java.util.concurrent.CompletionStage.thenAcceptAsync(java.util.function.Consumer, java.util.concurrent.Executor)


Occurences of thenAcceptBoth

thenAcceptBoth occurences:
java.util.concurrent.CompletableFuture.thenAcceptBoth(java.util.concurrent.CompletionStage, java.util.function.BiConsumer)
java.util.concurrent.CompletionStage.thenAcceptBoth(java.util.concurrent.CompletionStage, java.util.function.BiConsumer)


Occurences of thenAcceptBothAsync

thenAcceptBothAsync occurences:
java.util.concurrent.CompletableFuture.thenAcceptBothAsync(java.util.concurrent.CompletionStage, java.util.function.BiConsumer)
java.util.concurrent.CompletableFuture.thenAcceptBothAsync(java.util.concurrent.CompletionStage, java.util.function.BiConsumer, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenAcceptBothAsync(java.util.concurrent.CompletionStage, java.util.function.BiConsumer)
java.util.concurrent.CompletionStage.thenAcceptBothAsync(java.util.concurrent.CompletionStage, java.util.function.BiConsumer, java.util.concurrent.Executor)


Occurences of thenApply

thenApply occurences:
java.util.concurrent.CompletableFuture.thenApply(java.util.function.Function)
java.util.concurrent.CompletionStage.thenApply(java.util.function.Function)


Occurences of thenApplyAsync

thenApplyAsync occurences:
java.util.concurrent.CompletableFuture.thenApplyAsync(java.util.function.Function)
java.util.concurrent.CompletableFuture.thenApplyAsync(java.util.function.Function, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenApplyAsync(java.util.function.Function)
java.util.concurrent.CompletionStage.thenApplyAsync(java.util.function.Function, java.util.concurrent.Executor)


Occurences of thenCombine

thenCombine occurences:
java.util.concurrent.CompletableFuture.thenCombine(java.util.concurrent.CompletionStage, java.util.function.BiFunction)
java.util.concurrent.CompletionStage.thenCombine(java.util.concurrent.CompletionStage, java.util.function.BiFunction)


Occurences of thenCombineAsync

thenCombineAsync occurences:
java.util.concurrent.CompletableFuture.thenCombineAsync(java.util.concurrent.CompletionStage, java.util.function.BiFunction)
java.util.concurrent.CompletableFuture.thenCombineAsync(java.util.concurrent.CompletionStage, java.util.function.BiFunction, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenCombineAsync(java.util.concurrent.CompletionStage, java.util.function.BiFunction)
java.util.concurrent.CompletionStage.thenCombineAsync(java.util.concurrent.CompletionStage, java.util.function.BiFunction, java.util.concurrent.Executor)


Occurences of thenComparing

thenComparing occurences:
java.util.Comparator.thenComparing(java.util.Comparator)
java.util.Comparator.thenComparing(java.util.function.Function)
java.util.Comparator.thenComparing(java.util.function.Function, java.util.Comparator)


Occurences of thenCompose

thenCompose occurences:
java.util.concurrent.CompletableFuture.thenCompose(java.util.function.Function)
java.util.concurrent.CompletionStage.thenCompose(java.util.function.Function)


Occurences of thenComposeAsync

thenComposeAsync occurences:
java.util.concurrent.CompletableFuture.thenComposeAsync(java.util.function.Function)
java.util.concurrent.CompletableFuture.thenComposeAsync(java.util.function.Function, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenComposeAsync(java.util.function.Function)
java.util.concurrent.CompletionStage.thenComposeAsync(java.util.function.Function, java.util.concurrent.Executor)


Occurences of thenRun

thenRun occurences:
java.util.concurrent.CompletableFuture.thenRun(java.lang.Runnable)
java.util.concurrent.CompletionStage.thenRun(java.lang.Runnable)


Occurences of thenRunAsync

thenRunAsync occurences:
java.util.concurrent.CompletableFuture.thenRunAsync(java.lang.Runnable)
java.util.concurrent.CompletableFuture.thenRunAsync(java.lang.Runnable, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.thenRunAsync(java.lang.Runnable)
java.util.concurrent.CompletionStage.thenRunAsync(java.lang.Runnable, java.util.concurrent.Executor)


Occurences of the_activator

the_activator occurences:
org.omg.PortableServer.POAOperations.the_activator()
org.omg.PortableServer.POAOperations.the_activator(org.omg.PortableServer.AdapterActivator)


Occurences of thisObject

thisObject occurences:
com.sun.jdi.StackFrame.thisObject()
javax.rmi.CORBA.Tie.thisObject()


Occurences of thread

thread occurences:
com.sun.jdi.event.ClassPrepareEvent.thread()
com.sun.jdi.event.LocatableEvent.thread()
com.sun.jdi.event.MonitorContendedEnteredEvent.thread()
com.sun.jdi.event.MonitorContendedEnterEvent.thread()
com.sun.jdi.event.MonitorWaitedEvent.thread()
com.sun.jdi.event.MonitorWaitEvent.thread()
com.sun.jdi.event.ThreadDeathEvent.thread()
com.sun.jdi.event.ThreadStartEvent.thread()
com.sun.jdi.event.VMStartEvent.thread()
com.sun.jdi.MonitorInfo.thread()
com.sun.jdi.request.StepRequest.thread()
com.sun.jdi.StackFrame.thread()


Occurences of Thread (constructors)

Thread (constructors) occurences:
java.lang.Thread()
java.lang.Thread(java.lang.Runnable)
java.lang.Thread(java.lang.Runnable, java.lang.String)
java.lang.Thread(java.lang.String)
java.lang.Thread(java.lang.ThreadGroup, java.lang.Runnable)
java.lang.Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)
java.lang.Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String, long)
java.lang.Thread(java.lang.ThreadGroup, java.lang.String)


Occurences of ThreadGroup (constructors)

ThreadGroup (constructors) occurences:
java.lang.ThreadGroup(java.lang.String)
java.lang.ThreadGroup(java.lang.ThreadGroup, java.lang.String)


Occurences of ThreadPoolExecutor (constructors)

ThreadPoolExecutor (constructors) occurences:
java.util.concurrent.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue)
java.util.concurrent.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.RejectedExecutionHandler)
java.util.concurrent.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory)
java.util.concurrent.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)


Occurences of threshold

threshold occurences:
javax.xml.ws.soap.MTOM.threshold()
javax.xml.ws.soap.threshold


Occurences of Throwable (constructors)

Throwable (constructors) occurences:
java.lang.Throwable()
java.lang.Throwable(java.lang.String)
java.lang.Throwable(java.lang.String, java.lang.Throwable)
java.lang.Throwable(java.lang.String, java.lang.Throwable, boolean, boolean)
java.lang.Throwable(java.lang.Throwable)


Occurences of throwException

throwException occurences:
java.lang.invoke.MethodHandles.throwException(java.lang.Class, java.lang.Class)
java.nio.charset.CoderResult.throwException()


Occurences of thumbColor

thumbColor occurences:
javax.swing.plaf.basic.thumbColor
javax.swing.plaf.metal.thumbColor


Occurences of thumbnailComplete

thumbnailComplete occurences:
javax.imageio.event.IIOReadProgressListener.thumbnailComplete(javax.imageio.ImageReader)
javax.imageio.event.IIOWriteProgressListener.thumbnailComplete(javax.imageio.ImageWriter)


Occurences of thumbnailProgress

thumbnailProgress occurences:
javax.imageio.event.IIOReadProgressListener.thumbnailProgress(javax.imageio.ImageReader, float)
javax.imageio.event.IIOWriteProgressListener.thumbnailProgress(javax.imageio.ImageWriter, float)


Occurences of thumbnailStarted

thumbnailStarted occurences:
javax.imageio.event.IIOReadProgressListener.thumbnailStarted(javax.imageio.ImageReader, int, int)
javax.imageio.event.IIOWriteProgressListener.thumbnailStarted(javax.imageio.ImageWriter, int, int)


Occurences of thumbRect

thumbRect occurences:
javax.swing.plaf.basic.thumbRect
javax.swing.plaf.basic.thumbRect


Occurences of THURSDAY

THURSDAY occurences:
java.time.THURSDAY
java.util.THURSDAY


Occurences of TIBETAN

TIBETAN occurences:
java.awt.font.TIBETAN
java.awt.font.TIBETAN
java.lang.TIBETAN
java.lang.TIBETAN


Occurences of TIFINAGH

TIFINAGH occurences:
java.lang.TIFINAGH
java.lang.TIFINAGH


Occurences of time

time occurences:
compact1.java.time
compact2.java.time
compact3.java.time
java.time
java.util.time


Occurences of TIME

TIME occurences:
java.sql.TIME
java.sql.TIME
javax.xml.datatype.TIME


Occurences of Time (constructors)

Time (constructors) occurences:
java.sql.Time(int, int, int)
java.sql.Time(long)


Occurences of TimeLimitExceededException (constructors)

TimeLimitExceededException (constructors) occurences:
javax.naming.TimeLimitExceededException()
javax.naming.TimeLimitExceededException(java.lang.String)


Occurences of timeLineOrder

timeLineOrder occurences:
java.time.chrono.ChronoLocalDate.timeLineOrder()
java.time.chrono.ChronoLocalDateTime.timeLineOrder()
java.time.chrono.ChronoZonedDateTime.timeLineOrder()
java.time.OffsetDateTime.timeLineOrder()


Occurences of TIMEOUT (constructors)

TIMEOUT (constructors) occurences:
org.omg.CORBA.TIMEOUT()
org.omg.CORBA.TIMEOUT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TIMEOUT(java.lang.String)
org.omg.CORBA.TIMEOUT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of TimeoutException (constructors)

TimeoutException (constructors) occurences:
java.util.concurrent.TimeoutException()
java.util.concurrent.TimeoutException(java.lang.String)


Occurences of Timer

Timer occurences:
java.util.Timer
javax.management.timer.Timer
javax.swing.Timer


Occurences of timer

timer occurences:
compact3.javax.management.timer
javax.management.timer
javax.swing.plaf.basic.timer
javax.swing.tree.timer


Occurences of Timer (constructors)

Timer (constructors) occurences:
java.util.Timer()
java.util.Timer(boolean)
java.util.Timer(java.lang.String)
java.util.Timer(java.lang.String, boolean)
javax.management.timer.Timer()
javax.swing.Timer(int, java.awt.event.ActionListener)


Occurences of TIMESTAMP

TIMESTAMP occurences:
java.sql.TIMESTAMP
java.sql.TIMESTAMP


Occurences of Timestamp

Timestamp occurences:
java.security.Timestamp
java.sql.Timestamp


Occurences of Timestamp (constructors)

Timestamp (constructors) occurences:
java.security.Timestamp(java.util.Date, java.security.cert.CertPath)
java.sql.Timestamp(int, int, int, int, int, int, int)
java.sql.Timestamp(long)


Occurences of TIMESTAMP_WITH_TIMEZONE

TIMESTAMP_WITH_TIMEZONE occurences:
java.sql.TIMESTAMP_WITH_TIMEZONE
java.sql.TIMESTAMP_WITH_TIMEZONE


Occurences of TIME_WITH_TIMEZONE

TIME_WITH_TIMEZONE occurences:
java.sql.TIME_WITH_TIMEZONE
java.sql.TIME_WITH_TIMEZONE


Occurences of TINYINT

TINYINT occurences:
java.sql.TINYINT
java.sql.TINYINT


Occurences of title

title occurences:
javax.swing.border.title
javax.swing.text.html.parser.title
javax.swing.title


Occurences of TITLE

TITLE occurences:
javax.swing.text.html.TITLE
javax.swing.text.html.TITLE


Occurences of TitledBorder (constructors)

TitledBorder (constructors) occurences:
javax.swing.border.TitledBorder(java.lang.String)
javax.swing.border.TitledBorder(javax.swing.border.Border)
javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String)
javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int)
javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)
javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)


Occurences of TitledBorderUIResource

TitledBorderUIResource occurences:
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(java.lang.String)
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(javax.swing.border.Border)
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(javax.swing.border.Border, java.lang.String)
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(javax.swing.border.Border, java.lang.String, int, int)
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)
javax.swing.plaf.BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)


Occurences of tnameserv

tnameserv occurences:
tnameserv
tnameserv


Occurences of to

to occurences:
java.lang.ProcessBuilder.Redirect.to(java.io.File)
java.nio.file.attribute.FileTime.to(java.util.concurrent.TimeUnit)


Occurences of toArray

toArray occurences:
java.awt.dnd.DragGestureEvent.toArray()
java.awt.dnd.DragGestureEvent.toArray(java.lang.Object:A)
java.beans.beancontext.BeanContextMembershipEvent.toArray()
java.beans.beancontext.BeanContextSupport.toArray()
java.beans.beancontext.BeanContextSupport.toArray(java.lang.Object:A)
java.util.AbstractCollection.toArray()
java.util.AbstractCollection.toArray(java.lang.Object:A)
java.util.AbstractCollection.toArray(T:A)
java.util.ArrayDeque.toArray()
java.util.ArrayDeque.toArray(java.lang.Object:A)
java.util.ArrayDeque.toArray(T:A)
java.util.ArrayList.toArray()
java.util.ArrayList.toArray(java.lang.Object:A)
java.util.ArrayList.toArray(T:A)
java.util.Collection.toArray()
java.util.Collection.toArray(java.lang.Object:A)
java.util.Collection.toArray(T:A)
java.util.concurrent.ArrayBlockingQueue.toArray()
java.util.concurrent.ArrayBlockingQueue.toArray(java.lang.Object:A)
java.util.concurrent.ArrayBlockingQueue.toArray(T:A)
java.util.concurrent.ConcurrentHashMap.KeySetView.toArray()
java.util.concurrent.ConcurrentHashMap.KeySetView.toArray(java.lang.Object:A)
java.util.concurrent.ConcurrentHashMap.KeySetView.toArray(T:A)
java.util.concurrent.ConcurrentLinkedDeque.toArray()
java.util.concurrent.ConcurrentLinkedDeque.toArray(java.lang.Object:A)
java.util.concurrent.ConcurrentLinkedDeque.toArray(T:A)
java.util.concurrent.ConcurrentLinkedQueue.toArray()
java.util.concurrent.ConcurrentLinkedQueue.toArray(java.lang.Object:A)
java.util.concurrent.ConcurrentLinkedQueue.toArray(T:A)
java.util.concurrent.CopyOnWriteArrayList.toArray()
java.util.concurrent.CopyOnWriteArrayList.toArray(java.lang.Object:A)
java.util.concurrent.CopyOnWriteArrayList.toArray(T:A)
java.util.concurrent.CopyOnWriteArraySet.toArray()
java.util.concurrent.CopyOnWriteArraySet.toArray(java.lang.Object:A)
java.util.concurrent.CopyOnWriteArraySet.toArray(T:A)
java.util.concurrent.DelayQueue.toArray()
java.util.concurrent.DelayQueue.toArray(java.lang.Object:A)
java.util.concurrent.DelayQueue.toArray(T:A)
java.util.concurrent.LinkedBlockingDeque.toArray()
java.util.concurrent.LinkedBlockingDeque.toArray(java.lang.Object:A)
java.util.concurrent.LinkedBlockingDeque.toArray(T:A)
java.util.concurrent.LinkedBlockingQueue.toArray()
java.util.concurrent.LinkedBlockingQueue.toArray(java.lang.Object:A)
java.util.concurrent.LinkedBlockingQueue.toArray(T:A)
java.util.concurrent.PriorityBlockingQueue.toArray()
java.util.concurrent.PriorityBlockingQueue.toArray(java.lang.Object:A)
java.util.concurrent.PriorityBlockingQueue.toArray(T:A)
java.util.concurrent.SynchronousQueue.toArray()
java.util.concurrent.SynchronousQueue.toArray(java.lang.Object:A)
java.util.concurrent.SynchronousQueue.toArray(T:A)
java.util.LinkedList.toArray()
java.util.LinkedList.toArray(java.lang.Object:A)
java.util.LinkedList.toArray(T:A)
java.util.List.toArray()
java.util.List.toArray(java.lang.Object:A)
java.util.List.toArray(T:A)
java.util.PriorityQueue.toArray()
java.util.PriorityQueue.toArray(java.lang.Object:A)
java.util.PriorityQueue.toArray(T:A)
java.util.Set.toArray()
java.util.Set.toArray(java.lang.Object:A)
java.util.Set.toArray(T:A)
java.util.stream.DoubleStream.toArray()
java.util.stream.IntStream.toArray()
java.util.stream.LongStream.toArray()
java.util.stream.Stream.toArray()
java.util.stream.Stream.toArray(java.util.function.IntFunction)
java.util.Vector.toArray()
java.util.Vector.toArray(java.lang.Object:A)
java.util.Vector.toArray(T:A)
javax.accessibility.AccessibleRelationSet.toArray()
javax.accessibility.AccessibleStateSet.toArray()
javax.print.attribute.AttributeSet.toArray()
javax.print.attribute.HashAttributeSet.toArray()
javax.swing.DefaultListModel.toArray()


Occurences of toASCII

toASCII occurences:
java.net.IDN.toASCII(java.lang.String)
java.net.IDN.toASCII(java.lang.String, int)


Occurences of toBack

toBack occurences:
java.awt.Dialog.toBack()
java.awt.Window.toBack()
javax.swing.JInternalFrame.toBack()


Occurences of toBinaryString

toBinaryString occurences:
java.lang.Integer.toBinaryString(int)
java.lang.Long.toBinaryString(long)


Occurences of toByteArray

toByteArray occurences:
java.io.ByteArrayOutputStream.toByteArray()
java.math.BigInteger.toByteArray()
java.text.CollationKey.toByteArray()
java.util.BitSet.toByteArray()


Occurences of toCharArray

toCharArray occurences:
java.io.CharArrayWriter.toCharArray()
java.lang.String.toCharArray()


Occurences of toChars

toChars occurences:
java.lang.Character.toChars(int)
java.lang.Character.toChars(int, char:A, int)


Occurences of toCIEXYZ

toCIEXYZ occurences:
java.awt.color.ColorSpace.toCIEXYZ(float:A)
java.awt.color.ICC_ColorSpace.toCIEXYZ(float:A)


Occurences of toCollection

toCollection occurences:
java.util.stream.Collectors.toCollection(java.util.function.Supplier)
javax.sql.rowset.CachedRowSet.toCollection()
javax.sql.rowset.CachedRowSet.toCollection(int)
javax.sql.rowset.CachedRowSet.toCollection(java.lang.String)


Occurences of toCompletableFuture

toCompletableFuture occurences:
java.util.concurrent.CompletableFuture.toCompletableFuture()
java.util.concurrent.CompletionStage.toCompletableFuture()


Occurences of toConcurrentMap

toConcurrentMap occurences:
java.util.stream.Collectors.toConcurrentMap(java.util.function.Function, java.util.function.Function)
java.util.stream.Collectors.toConcurrentMap(java.util.function.Function, java.util.function.Function, java.util.function.BinaryOperator)
java.util.stream.Collectors.toConcurrentMap(java.util.function.Function, java.util.function.Function, java.util.function.BinaryOperator, java.util.function.Supplier)


Occurences of toDays

toDays occurences:
java.time.Duration.toDays()
java.util.concurrent.TimeUnit.toDays(long)


Occurences of toDegrees

toDegrees occurences:
java.lang.Math.toDegrees(double)
java.lang.StrictMath.toDegrees(double)


Occurences of toDisplayString

toDisplayString occurences:
javax.accessibility.AccessibleBundle.toDisplayString()
javax.accessibility.AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
javax.accessibility.AccessibleBundle.toDisplayString(java.util.Locale)


Occurences of toEpochDay

toEpochDay occurences:
java.time.chrono.ChronoLocalDate.toEpochDay()
java.time.chrono.HijrahDate.toEpochDay()
java.time.chrono.JapaneseDate.toEpochDay()
java.time.chrono.MinguoDate.toEpochDay()
java.time.chrono.ThaiBuddhistDate.toEpochDay()
java.time.LocalDate.toEpochDay()


Occurences of toEpochSecond

toEpochSecond occurences:
java.time.chrono.ChronoLocalDateTime.toEpochSecond(java.time.ZoneOffset)
java.time.chrono.ChronoZonedDateTime.toEpochSecond()
java.time.OffsetDateTime.toEpochSecond()
java.time.zone.ZoneOffsetTransition.toEpochSecond()


Occurences of toExternalForm

toExternalForm occurences:
java.net.URL.toExternalForm()
java.net.URLStreamHandler.toExternalForm(java.net.URL)


Occurences of toFormat

toFormat occurences:
java.time.format.DateTimeFormatter.toFormat()
java.time.format.DateTimeFormatter.toFormat(java.time.temporal.TemporalQuery)


Occurences of toFormatter

toFormatter occurences:
java.time.format.DateTimeFormatterBuilder.toFormatter()
java.time.format.DateTimeFormatterBuilder.toFormatter(java.util.Locale)


Occurences of toFront

toFront occurences:
java.awt.Window.toFront()
javax.swing.JInternalFrame.toFront()


Occurences of toGenericString

toGenericString occurences:
java.lang.Class.toGenericString()
java.lang.reflect.Constructor.toGenericString()
java.lang.reflect.Executable.toGenericString()
java.lang.reflect.Field.toGenericString()
java.lang.reflect.Method.toGenericString()


Occurences of ToggleButtonBorder

ToggleButtonBorder occurences:
javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder.ToggleButtonBorder(java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)
javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder.ToggleButtonBorder()


Occurences of toggleSortOrder

toggleSortOrder occurences:
javax.swing.DefaultRowSorter.toggleSortOrder(int)
javax.swing.RowSorter.toggleSortOrder(int)


Occurences of TOGGLE_BUTTON

TOGGLE_BUTTON occurences:
javax.accessibility.TOGGLE_BUTTON
javax.swing.plaf.synth.TOGGLE_BUTTON


Occurences of toGregorianCalendar

toGregorianCalendar occurences:
javax.xml.datatype.XMLGregorianCalendar.toGregorianCalendar()
javax.xml.datatype.XMLGregorianCalendar.toGregorianCalendar(java.util.TimeZone, java.util.Locale, javax.xml.datatype.XMLGregorianCalendar)


Occurences of toHexString

toHexString occurences:
java.lang.Double.toHexString(double)
java.lang.Float.toHexString(float)
java.lang.Integer.toHexString(int)
java.lang.Long.toHexString(long)


Occurences of toHours

toHours occurences:
java.time.Duration.toHours()
java.util.concurrent.TimeUnit.toHours(long)


Occurences of toInstant

toInstant occurences:
java.nio.file.attribute.FileTime.toInstant()
java.sql.Date.toInstant()
java.sql.Time.toInstant()
java.sql.Timestamp.toInstant()
java.time.chrono.ChronoLocalDateTime.toInstant(java.time.ZoneOffset)
java.time.chrono.ChronoZonedDateTime.toInstant()
java.time.OffsetDateTime.toInstant()
java.util.Calendar.toInstant()
java.util.Date.toInstant()


Occurences of toIntExact

toIntExact occurences:
java.lang.Math.toIntExact(long)
java.lang.StrictMath.toIntExact(long)


Occurences of toJMXConnector

toJMXConnector occurences:
javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map)
javax.management.remote.JMXConnectorServerMBean.toJMXConnector(java.util.Map)
javax.management.remote.rmi.RMIConnectorServer.toJMXConnector(java.util.Map)


Occurences of toLocalDate

toLocalDate occurences:
java.sql.Date.toLocalDate()
java.time.chrono.ChronoLocalDateTime.toLocalDate()
java.time.chrono.ChronoZonedDateTime.toLocalDate()
java.time.LocalDateTime.toLocalDate()
java.time.OffsetDateTime.toLocalDate()
java.time.ZonedDateTime.toLocalDate()


Occurences of toLocalDateTime

toLocalDateTime occurences:
java.sql.Timestamp.toLocalDateTime()
java.time.chrono.ChronoZonedDateTime.toLocalDateTime()
java.time.OffsetDateTime.toLocalDateTime()
java.time.ZonedDateTime.toLocalDateTime()


Occurences of toLocalizedPattern

toLocalizedPattern occurences:
java.text.DecimalFormat.toLocalizedPattern()
java.text.SimpleDateFormat.toLocalizedPattern()


Occurences of toLocalTime

toLocalTime occurences:
java.sql.Time.toLocalTime()
java.time.chrono.ChronoLocalDateTime.toLocalTime()
java.time.chrono.ChronoZonedDateTime.toLocalTime()
java.time.LocalDateTime.toLocalTime()
java.time.OffsetDateTime.toLocalTime()
java.time.OffsetTime.toLocalTime()
java.time.ZonedDateTime.toLocalTime()


Occurences of toLowerCase

toLowerCase occurences:
java.lang.Character.toLowerCase(char)
java.lang.Character.toLowerCase(int)
java.lang.String.toLowerCase()
java.lang.String.toLowerCase(java.util.Locale)


Occurences of toMap

toMap occurences:
java.util.stream.Collectors.toMap(java.util.function.Function, java.util.function.Function)
java.util.stream.Collectors.toMap(java.util.function.Function, java.util.function.Function, java.util.function.BinaryOperator)
java.util.stream.Collectors.toMap(java.util.function.Function, java.util.function.Function, java.util.function.BinaryOperator, java.util.function.Supplier)


Occurences of toMillis

toMillis occurences:
java.nio.file.attribute.FileTime.toMillis()
java.time.Duration.toMillis()
java.util.concurrent.TimeUnit.toMillis(long)


Occurences of toMinutes

toMinutes occurences:
java.time.Duration.toMinutes()
java.util.concurrent.TimeUnit.toMinutes(long)


Occurences of toNanos

toNanos occurences:
java.time.Duration.toNanos()
java.util.concurrent.TimeUnit.toNanos(long)


Occurences of toOctalString

toOctalString occurences:
java.lang.Integer.toOctalString(int)
java.lang.Long.toOctalString(long)


Occurences of toolBar

toolBar occurences:
javax.swing.plaf.basic.toolBar
javax.swing.plaf.basic.toolBar


Occurences of tools

tools occurences:
compact3.javax.tools
javax.tools


Occurences of TOOL_BAR

TOOL_BAR occurences:
javax.accessibility.TOOL_BAR
javax.swing.plaf.synth.TOOL_BAR


Occurences of TOOL_TIP

TOOL_TIP occurences:
javax.accessibility.TOOL_TIP
javax.swing.plaf.synth.TOOL_TIP


Occurences of TooManyListenersException (constructors)

TooManyListenersException (constructors) occurences:
java.util.TooManyListenersException()
java.util.TooManyListenersException(java.lang.String)


Occurences of top

top occurences:
java.awt.top
javax.swing.border.top


Occurences of TOP

TOP occurences:
javax.print.attribute.standard.TOP
javax.swing.border.TOP
javax.swing.TOP
javax.swing.TOP


Occurences of toPattern

toPattern occurences:
java.text.ChoiceFormat.toPattern()
java.text.DecimalFormat.toPattern()
java.text.MessageFormat.toPattern()
java.text.SimpleDateFormat.toPattern()


Occurences of TOP_ALIGNMENT

TOP_ALIGNMENT occurences:
java.awt.font.TOP_ALIGNMENT
java.awt.TOP_ALIGNMENT


Occurences of toRadians

toRadians occurences:
java.lang.Math.toRadians(double)
java.lang.StrictMath.toRadians(double)


Occurences of toRGB

toRGB occurences:
java.awt.color.ColorSpace.toRGB(float:A)
java.awt.color.ICC_ColorSpace.toRGB(float:A)


Occurences of toString

toString occurences:
com.sun.javadoc.AnnotationValue.toString()
com.sun.javadoc.Parameter.toString()
com.sun.javadoc.SourcePosition.toString()
com.sun.javadoc.Tag.toString()
com.sun.javadoc.Type.toString()
com.sun.jdi.Mirror.toString()
com.sun.source.util.TaskEvent.toString()
com.sun.tools.attach.VirtualMachine.toString()
com.sun.tools.attach.VirtualMachineDescriptor.toString()
com.sun.tools.doclets.Taglet.toString(com.sun.javadoc.Tag)
com.sun.tools.doclets.Taglet.toString(com.sun.javadoc.Tag:A)
java.awt.AWTEvent.toString()
java.awt.AWTKeyStroke.toString()
java.awt.BorderLayout.toString()
java.awt.BufferCapabilities.FlipContents.toString()
java.awt.CardLayout.toString()
java.awt.CheckboxGroup.toString()
java.awt.Color.toString()
java.awt.Component.toString()
java.awt.Cursor.toString()
java.awt.datatransfer.DataFlavor.toString()
java.awt.Dimension.toString()
java.awt.Event.toString()
java.awt.FlowLayout.toString()
java.awt.Font.toString()
java.awt.font.NumericShaper.toString()
java.awt.font.TextHitInfo.toString()
java.awt.font.TextLayout.toString()
java.awt.FontMetrics.toString()
java.awt.geom.AffineTransform.toString()
java.awt.geom.Point2D.Double.toString()
java.awt.geom.Point2D.Float.toString()
java.awt.geom.Rectangle2D.Double.toString()
java.awt.geom.Rectangle2D.Float.toString()
java.awt.Graphics.toString()
java.awt.GridBagLayout.toString()
java.awt.GridLayout.toString()
java.awt.image.BufferedImage.toString()
java.awt.image.ColorModel.toString()
java.awt.image.DirectColorModel.toString()
java.awt.image.IndexColorModel.toString()
java.awt.Insets.toString()
java.awt.JobAttributes.toString()
java.awt.JobAttributes.DefaultSelectionType.toString()
java.awt.JobAttributes.DestinationType.toString()
java.awt.JobAttributes.DialogType.toString()
java.awt.JobAttributes.MultipleDocumentHandlingType.toString()
java.awt.JobAttributes.SidesType.toString()
java.awt.MenuComponent.toString()
java.awt.MenuShortcut.toString()
java.awt.PageAttributes.toString()
java.awt.PageAttributes.ColorType.toString()
java.awt.PageAttributes.MediaType.toString()
java.awt.PageAttributes.OrientationRequestedType.toString()
java.awt.PageAttributes.OriginType.toString()
java.awt.PageAttributes.PrintQualityType.toString()
java.awt.Point.toString()
java.awt.Rectangle.toString()
java.awt.RenderingHints.toString()
java.awt.Robot.toString()
java.awt.ScrollPaneAdjustable.toString()
java.awt.SystemColor.toString()
java.beans.Expression.toString()
java.beans.FeatureDescriptor.toString()
java.beans.PropertyChangeEvent.toString()
java.beans.Statement.toString()
java.io.ByteArrayOutputStream.toString()
java.io.ByteArrayOutputStream.toString(int)
java.io.ByteArrayOutputStream.toString(java.lang.String)
java.io.CharArrayWriter.toString()
java.io.File.toString()
java.io.ObjectStreamClass.toString()
java.io.ObjectStreamField.toString()
java.io.StreamTokenizer.toString()
java.io.StringWriter.toString()
java.lang.annotation.Annotation.toString()
java.lang.Boolean.toString()
java.lang.Boolean.toString(boolean)
java.lang.Byte.toString()
java.lang.Byte.toString(byte)
java.lang.Character.toString()
java.lang.Character.toString(char)
java.lang.Character.Subset.toString()
java.lang.CharSequence.toString()
java.lang.Class.toString()
java.lang.Double.toString()
java.lang.Double.toString(double)
java.lang.Enum.toString()
java.lang.Float.toString()
java.lang.Float.toString(float)
java.lang.Integer.toString()
java.lang.Integer.toString(int)
java.lang.Integer.toString(int, int)
java.lang.invoke.MethodHandle.toString()
java.lang.invoke.MethodHandleInfo.toString(int, java.lang.Class, java.lang.String, java.lang.invoke.MethodType)
java.lang.invoke.MethodHandles.Lookup.toString()
java.lang.invoke.MethodType.toString()
java.lang.invoke.SerializedLambda.toString()
java.lang.Long.toString()
java.lang.Long.toString(long)
java.lang.Long.toString(long, int)
java.lang.management.LockInfo.toString()
java.lang.management.MemoryType.toString()
java.lang.management.MemoryUsage.toString()
java.lang.management.ThreadInfo.toString()
java.lang.Object.toString()
java.lang.Package.toString()
java.lang.reflect.Constructor.toString()
java.lang.reflect.Field.toString()
java.lang.reflect.Method.toString()
java.lang.reflect.Modifier.toString(int)
java.lang.reflect.Parameter.toString()
java.lang.Short.toString()
java.lang.Short.toString(short)
java.lang.StackTraceElement.toString()
java.lang.String.toString()
java.lang.StringBuffer.toString()
java.lang.StringBuilder.toString()
java.lang.Thread.toString()
java.lang.ThreadGroup.toString()
java.lang.Throwable.toString()
java.math.BigDecimal.toString()
java.math.BigInteger.toString()
java.math.BigInteger.toString(int)
java.math.MathContext.toString()
java.net.HttpCookie.toString()
java.net.InetAddress.toString()
java.net.InetSocketAddress.toString()
java.net.InterfaceAddress.toString()
java.net.NetworkInterface.toString()
java.net.Proxy.toString()
java.net.ServerSocket.toString()
java.net.Socket.toString()
java.net.SocketImpl.toString()
java.net.URI.toString()
java.net.URL.toString()
java.net.URLConnection.toString()
java.nio.ByteBuffer.toString()
java.nio.ByteOrder.toString()
java.nio.channels.FileChannel.MapMode.toString()
java.nio.channels.FileLock.toString()
java.nio.CharBuffer.toString()
java.nio.charset.Charset.toString()
java.nio.charset.CoderResult.toString()
java.nio.charset.CodingErrorAction.toString()
java.nio.DoubleBuffer.toString()
java.nio.file.attribute.AclEntry.toString()
java.nio.file.attribute.FileTime.toString()
java.nio.file.attribute.PosixFilePermissions.toString(java.util.Set)
java.nio.file.Path.toString()
java.nio.FloatBuffer.toString()
java.nio.IntBuffer.toString()
java.nio.LongBuffer.toString()
java.nio.ShortBuffer.toString()
java.rmi.dgc.VMID.toString()
java.rmi.server.LogStream.toString()
java.rmi.server.ObjID.toString()
java.rmi.server.Operation.toString()
java.rmi.server.RemoteObject.toString()
java.rmi.server.UID.toString()
java.security.acl.Acl.toString()
java.security.acl.AclEntry.toString()
java.security.acl.Permission.toString()
java.security.AlgorithmParameters.toString()
java.security.cert.Certificate.toString()
java.security.cert.CertPath.toString()
java.security.cert.CollectionCertStoreParameters.toString()
java.security.cert.CRL.toString()
java.security.cert.LDAPCertStoreParameters.toString()
java.security.cert.PKIXBuilderParameters.toString()
java.security.cert.PKIXCertPathBuilderResult.toString()
java.security.cert.PKIXCertPathValidatorResult.toString()
java.security.cert.PKIXParameters.toString()
java.security.cert.PolicyQualifierInfo.toString()
java.security.cert.TrustAnchor.toString()
java.security.cert.X509CertSelector.toString()
java.security.cert.X509CRLEntry.toString()
java.security.cert.X509CRLSelector.toString()
java.security.Certificate.toString(boolean)
java.security.CodeSigner.toString()
java.security.CodeSource.toString()
java.security.DigestInputStream.toString()
java.security.DigestOutputStream.toString()
java.security.Identity.toString()
java.security.Identity.toString(boolean)
java.security.IdentityScope.toString()
java.security.KeyStore.PrivateKeyEntry.toString()
java.security.KeyStore.SecretKeyEntry.toString()
java.security.KeyStore.TrustedCertificateEntry.toString()
java.security.MessageDigest.toString()
java.security.Permission.toString()
java.security.PermissionCollection.toString()
java.security.PKCS12Attribute.toString()
java.security.Principal.toString()
java.security.PrivilegedActionException.toString()
java.security.ProtectionDomain.toString()
java.security.Provider.toString()
java.security.Provider.Service.toString()
java.security.Signature.toString()
java.security.Signer.toString()
java.security.Timestamp.toString()
java.security.UnresolvedPermission.toString()
java.sql.Date.toString()
java.sql.RowId.toString()
java.sql.Time.toString()
java.sql.Timestamp.toString()
java.text.Annotation.toString()
java.text.AttributedCharacterIterator.Attribute.toString()
java.text.Bidi.toString()
java.text.FieldPosition.toString()
java.text.ParsePosition.toString()
java.time.chrono.AbstractChronology.toString()
java.time.chrono.ChronoLocalDate.toString()
java.time.chrono.ChronoLocalDateTime.toString()
java.time.chrono.Chronology.toString()
java.time.chrono.ChronoPeriod.toString()
java.time.chrono.ChronoZonedDateTime.toString()
java.time.chrono.HijrahDate.toString()
java.time.chrono.JapaneseDate.toString()
java.time.chrono.JapaneseEra.toString()
java.time.chrono.MinguoDate.toString()
java.time.chrono.ThaiBuddhistDate.toString()
java.time.Duration.toString()
java.time.format.DateTimeFormatter.toString()
java.time.format.DecimalStyle.toString()
java.time.Instant.toString()
java.time.LocalDate.toString()
java.time.LocalDateTime.toString()
java.time.LocalTime.toString()
java.time.MonthDay.toString()
java.time.OffsetDateTime.toString()
java.time.OffsetTime.toString()
java.time.Period.toString()
java.time.temporal.ChronoField.toString()
java.time.temporal.ChronoUnit.toString()
java.time.temporal.TemporalField.toString()
java.time.temporal.TemporalUnit.toString()
java.time.temporal.ValueRange.toString()
java.time.temporal.WeekFields.toString()
java.time.Year.toString()
java.time.YearMonth.toString()
java.time.zone.ZoneOffsetTransition.toString()
java.time.zone.ZoneOffsetTransitionRule.toString()
java.time.zone.ZoneRules.toString()
java.time.ZonedDateTime.toString()
java.time.ZoneId.toString()
java.time.ZoneOffset.toString()
java.util.AbstractCollection.toString()
java.util.AbstractMap.toString()
java.util.AbstractMap.SimpleEntry.toString()
java.util.AbstractMap.SimpleImmutableEntry.toString()
java.util.Arrays.toString(boolean:A)
java.util.Arrays.toString(byte:A)
java.util.Arrays.toString(char:A)
java.util.Arrays.toString(double:A)
java.util.Arrays.toString(float:A)
java.util.Arrays.toString(int:A)
java.util.Arrays.toString(java.lang.Object:A)
java.util.Arrays.toString(long:A)
java.util.Arrays.toString(short:A)
java.util.BitSet.toString()
java.util.Calendar.toString()
java.util.concurrent.ArrayBlockingQueue.toString()
java.util.concurrent.atomic.AtomicBoolean.toString()
java.util.concurrent.atomic.AtomicInteger.toString()
java.util.concurrent.atomic.AtomicIntegerArray.toString()
java.util.concurrent.atomic.AtomicLong.toString()
java.util.concurrent.atomic.AtomicLongArray.toString()
java.util.concurrent.atomic.AtomicReference.toString()
java.util.concurrent.atomic.AtomicReferenceArray.toString()
java.util.concurrent.atomic.DoubleAccumulator.toString()
java.util.concurrent.atomic.DoubleAdder.toString()
java.util.concurrent.atomic.LongAccumulator.toString()
java.util.concurrent.atomic.LongAdder.toString()
java.util.concurrent.CompletableFuture.toString()
java.util.concurrent.ConcurrentHashMap.toString()
java.util.concurrent.ConcurrentHashMap.KeySetView.toString()
java.util.concurrent.CopyOnWriteArrayList.toString()
java.util.concurrent.CountDownLatch.toString()
java.util.concurrent.ForkJoinPool.toString()
java.util.concurrent.LinkedBlockingDeque.toString()
java.util.concurrent.LinkedBlockingQueue.toString()
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.toString()
java.util.concurrent.locks.AbstractQueuedSynchronizer.toString()
java.util.concurrent.locks.ReentrantLock.toString()
java.util.concurrent.locks.ReentrantReadWriteLock.toString()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.toString()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.toString()
java.util.concurrent.locks.StampedLock.toString()
java.util.concurrent.Phaser.toString()
java.util.concurrent.PriorityBlockingQueue.toString()
java.util.concurrent.Semaphore.toString()
java.util.concurrent.ThreadPoolExecutor.toString()
java.util.Currency.toString()
java.util.Date.toString()
java.util.DoubleSummaryStatistics.toString()
java.util.EventObject.toString()
java.util.Formatter.toString()
java.util.Hashtable.toString()
java.util.IntSummaryStatistics.toString()
java.util.jar.Attributes.Name.toString()
java.util.Locale.toString()
java.util.logging.Level.toString()
java.util.LongSummaryStatistics.toString()
java.util.Objects.toString(java.lang.Object)
java.util.Objects.toString(java.lang.Object, java.lang.String)
java.util.Optional.toString()
java.util.OptionalDouble.toString()
java.util.OptionalInt.toString()
java.util.OptionalLong.toString()
java.util.prefs.AbstractPreferences.toString()
java.util.prefs.Preferences.toString()
java.util.regex.Matcher.toString()
java.util.regex.Pattern.toString()
java.util.Scanner.toString()
java.util.ServiceLoader.toString()
java.util.SimpleTimeZone.toString()
java.util.StringJoiner.toString()
java.util.UUID.toString()
java.util.Vector.toString()
java.util.zip.ZipEntry.toString()
javax.accessibility.AccessibleBundle.toString()
javax.accessibility.AccessibleRelationSet.toString()
javax.accessibility.AccessibleStateSet.toString()
javax.activation.MimeType.toString()
javax.activation.MimeTypeParameterList.toString()
javax.imageio.plugins.jpeg.JPEGHuffmanTable.toString()
javax.imageio.plugins.jpeg.JPEGQTable.toString()
javax.lang.model.element.AnnotationValue.toString()
javax.lang.model.element.Modifier.toString()
javax.lang.model.type.TypeMirror.toString()
javax.management.Attribute.toString()
javax.management.AttributeValueExp.toString()
javax.management.BadAttributeValueExpException.toString()
javax.management.BadBinaryOpValueExpException.toString()
javax.management.BadStringOperationException.toString()
javax.management.ImmutableDescriptor.toString()
javax.management.MBeanAttributeInfo.toString()
javax.management.MBeanConstructorInfo.toString()
javax.management.MBeanInfo.toString()
javax.management.MBeanNotificationInfo.toString()
javax.management.MBeanOperationInfo.toString()
javax.management.MBeanParameterInfo.toString()
javax.management.MBeanServerNotification.toString()
javax.management.modelmbean.DescriptorSupport.toString()
javax.management.modelmbean.ModelMBeanAttributeInfo.toString()
javax.management.modelmbean.ModelMBeanConstructorInfo.toString()
javax.management.modelmbean.ModelMBeanNotificationInfo.toString()
javax.management.modelmbean.ModelMBeanOperationInfo.toString()
javax.management.Notification.toString()
javax.management.ObjectInstance.toString()
javax.management.ObjectName.toString()
javax.management.openmbean.ArrayType.toString()
javax.management.openmbean.CompositeData.toString()
javax.management.openmbean.CompositeDataSupport.toString()
javax.management.openmbean.CompositeType.toString()
javax.management.openmbean.OpenMBeanAttributeInfo.toString()
javax.management.openmbean.OpenMBeanAttributeInfoSupport.toString()
javax.management.openmbean.OpenMBeanConstructorInfo.toString()
javax.management.openmbean.OpenMBeanConstructorInfoSupport.toString()
javax.management.openmbean.OpenMBeanInfo.toString()
javax.management.openmbean.OpenMBeanInfoSupport.toString()
javax.management.openmbean.OpenMBeanOperationInfo.toString()
javax.management.openmbean.OpenMBeanOperationInfoSupport.toString()
javax.management.openmbean.OpenMBeanParameterInfo.toString()
javax.management.openmbean.OpenMBeanParameterInfoSupport.toString()
javax.management.openmbean.OpenType.toString()
javax.management.openmbean.SimpleType.toString()
javax.management.openmbean.TabularData.toString()
javax.management.openmbean.TabularDataSupport.toString()
javax.management.openmbean.TabularType.toString()
javax.management.relation.Role.toString()
javax.management.relation.RoleInfo.toString()
javax.management.relation.RoleUnresolved.toString()
javax.management.remote.JMXPrincipal.toString()
javax.management.remote.JMXServiceURL.toString()
javax.management.remote.NotificationResult.toString()
javax.management.remote.rmi.RMIConnectionImpl.toString()
javax.management.remote.rmi.RMIConnector.toString()
javax.management.remote.TargetedNotification.toString()
javax.management.StringValueExp.toString()
javax.naming.BinaryRefAddr.toString()
javax.naming.Binding.toString()
javax.naming.CompositeName.toString()
javax.naming.CompoundName.toString()
javax.naming.directory.AttributeModificationException.toString()
javax.naming.directory.BasicAttribute.toString()
javax.naming.directory.BasicAttributes.toString()
javax.naming.directory.ModificationItem.toString()
javax.naming.directory.SearchResult.toString()
javax.naming.ldap.LdapName.toString()
javax.naming.ldap.Rdn.toString()
javax.naming.LinkException.toString()
javax.naming.LinkException.toString(boolean)
javax.naming.NameClassPair.toString()
javax.naming.NamingException.toString()
javax.naming.NamingException.toString(boolean)
javax.naming.RefAddr.toString()
javax.naming.Reference.toString()
javax.net.ssl.SNIHostName.toString()
javax.net.ssl.SNIServerName.toString()
javax.net.ssl.SSLEngineResult.toString()
javax.print.attribute.DateTimeSyntax.toString()
javax.print.attribute.EnumSyntax.toString()
javax.print.attribute.IntegerSyntax.toString()
javax.print.attribute.ResolutionSyntax.toString()
javax.print.attribute.ResolutionSyntax.toString(int, java.lang.String)
javax.print.attribute.SetOfIntegerSyntax.toString()
javax.print.attribute.Size2DSyntax.toString()
javax.print.attribute.Size2DSyntax.toString(int, java.lang.String)
javax.print.attribute.standard.MediaPrintableArea.toString()
javax.print.attribute.standard.MediaPrintableArea.toString(int, java.lang.String)
javax.print.attribute.TextSyntax.toString()
javax.print.attribute.URISyntax.toString()
javax.print.DocFlavor.toString()
javax.print.event.PrintEvent.toString()
javax.rmi.CORBA.Stub.toString()
javax.rmi.CORBA.StubDelegate.toString(javax.rmi.CORBA.Stub)
javax.security.auth.kerberos.KerberosKey.toString()
javax.security.auth.kerberos.KerberosPrincipal.toString()
javax.security.auth.kerberos.KerberosTicket.toString()
javax.security.auth.kerberos.KeyTab.toString()
javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag.toString()
javax.security.auth.Subject.toString()
javax.security.auth.x500.X500Principal.toString()
javax.security.cert.Certificate.toString()
javax.security.sasl.SaslException.toString()
javax.sound.midi.MidiDevice.Info.toString()
javax.sound.midi.Sequencer.SyncMode.toString()
javax.sound.sampled.AudioFileFormat.toString()
javax.sound.sampled.AudioFileFormat.Type.toString()
javax.sound.sampled.AudioFormat.toString()
javax.sound.sampled.AudioFormat.Encoding.toString()
javax.sound.sampled.BooleanControl.toString()
javax.sound.sampled.CompoundControl.toString()
javax.sound.sampled.Control.toString()
javax.sound.sampled.Control.Type.toString()
javax.sound.sampled.DataLine.Info.toString()
javax.sound.sampled.EnumControl.toString()
javax.sound.sampled.FloatControl.toString()
javax.sound.sampled.Line.Info.toString()
javax.sound.sampled.LineEvent.toString()
javax.sound.sampled.LineEvent.Type.toString()
javax.sound.sampled.Mixer.Info.toString()
javax.sound.sampled.Port.Info.toString()
javax.sound.sampled.ReverbType.toString()
javax.swing.DefaultBoundedRangeModel.toString()
javax.swing.DefaultListModel.toString()
javax.swing.DefaultListSelectionModel.toString()
javax.swing.event.DocumentEvent.EventType.toString()
javax.swing.event.EventListenerList.toString()
javax.swing.event.HyperlinkEvent.EventType.toString()
javax.swing.event.ListDataEvent.toString()
javax.swing.event.ListSelectionEvent.toString()
javax.swing.event.TreeModelEvent.toString()
javax.swing.filechooser.FileNameExtensionFilter.toString()
javax.swing.GroupLayout.toString()
javax.swing.ImageIcon.toString()
javax.swing.JList.DropLocation.toString()
javax.swing.JTable.DropLocation.toString()
javax.swing.JTree.DropLocation.toString()
javax.swing.LookAndFeel.toString()
javax.swing.plaf.nimbus.State.toString()
javax.swing.plaf.synth.ColorType.toString()
javax.swing.plaf.synth.Region.toString()
javax.swing.RepaintManager.toString()
javax.swing.SizeRequirements.toString()
javax.swing.table.TableStringConverter.toString(javax.swing.table.TableModel, int, int)
javax.swing.text.AbstractDocument.BranchElement.toString()
javax.swing.text.AbstractDocument.DefaultDocumentEvent.toString()
javax.swing.text.AbstractDocument.LeafElement.toString()
javax.swing.text.DefaultCaret.toString()
javax.swing.text.DefaultStyledDocument.ElementSpec.toString()
javax.swing.text.html.CSS.Attribute.toString()
javax.swing.text.html.HTML.Attribute.toString()
javax.swing.text.html.HTML.Tag.toString()
javax.swing.text.html.Option.toString()
javax.swing.text.html.parser.AttributeList.toString()
javax.swing.text.html.parser.ContentModel.toString()
javax.swing.text.html.parser.DTD.toString()
javax.swing.text.html.parser.Element.toString()
javax.swing.text.JTextComponent.DropLocation.toString()
javax.swing.text.Position.Bias.toString()
javax.swing.text.Segment.toString()
javax.swing.text.SimpleAttributeSet.toString()
javax.swing.text.StyleConstants.toString()
javax.swing.text.StyleContext.toString()
javax.swing.text.StyleContext.NamedStyle.toString()
javax.swing.text.StyleContext.SmallAttributeSet.toString()
javax.swing.text.TabSet.toString()
javax.swing.text.TabStop.toString()
javax.swing.TransferHandler.DropLocation.toString()
javax.swing.tree.DefaultMutableTreeNode.toString()
javax.swing.tree.DefaultTreeSelectionModel.toString()
javax.swing.tree.TreePath.toString()
javax.swing.UIManager.LookAndFeelInfo.toString()
javax.swing.undo.AbstractUndoableEdit.toString()
javax.swing.undo.CompoundEdit.toString()
javax.swing.undo.UndoableEditSupport.toString()
javax.swing.undo.UndoManager.toString()
javax.tools.SimpleJavaFileObject.toString()
javax.xml.bind.helpers.ValidationEventImpl.toString()
javax.xml.bind.helpers.ValidationEventLocatorImpl.toString()
javax.xml.bind.JAXBException.toString()
javax.xml.bind.TypeConstraintException.toString()
javax.xml.crypto.dsig.spec.XPathType.Filter.toString()
javax.xml.crypto.KeySelector.Purpose.toString()
javax.xml.datatype.DatatypeConstants.Field.toString()
javax.xml.datatype.Duration.toString()
javax.xml.datatype.XMLGregorianCalendar.toString()
javax.xml.namespace.QName.toString()
javax.xml.ws.EndpointReference.toString()
org.ietf.jgss.GSSException.toString()
org.ietf.jgss.GSSName.toString()
org.ietf.jgss.Oid.toString()
org.omg.CORBA.portable.Delegate.toString(org.omg.CORBA.Object)
org.omg.CORBA.portable.ObjectImpl.toString()
org.omg.CORBA.SystemException.toString()
org.xml.sax.SAXException.toString()
org.xml.sax.SAXParseException.toString()


Occurences of toStub

toStub occurences:
java.rmi.server.RemoteObject.toStub(java.rmi.Remote)
javax.management.remote.rmi.RMIIIOPServerImpl.toStub()
javax.management.remote.rmi.RMIJRMPServerImpl.toStub()
javax.management.remote.rmi.RMIServerImpl.toStub()
javax.rmi.CORBA.PortableRemoteObjectDelegate.toStub(java.rmi.Remote)
javax.rmi.PortableRemoteObject.toStub(java.rmi.Remote)


Occurences of toTitleCase

toTitleCase occurences:
java.lang.Character.toTitleCase(char)
java.lang.Character.toTitleCase(int)


Occurences of toUnicode

toUnicode occurences:
java.net.IDN.toUnicode(java.lang.String)
java.net.IDN.toUnicode(java.lang.String, int)


Occurences of toUnsignedInt

toUnsignedInt occurences:
java.lang.Byte.toUnsignedInt(byte)
java.lang.Short.toUnsignedInt(short)


Occurences of toUnsignedLong

toUnsignedLong occurences:
java.lang.Byte.toUnsignedLong(byte)
java.lang.Integer.toUnsignedLong(int)
java.lang.Short.toUnsignedLong(short)


Occurences of toUnsignedString

toUnsignedString occurences:
java.lang.Integer.toUnsignedString(int)
java.lang.Integer.toUnsignedString(int, int)
java.lang.Long.toUnsignedString(long)
java.lang.Long.toUnsignedString(long, int)


Occurences of toUpperCase

toUpperCase occurences:
java.lang.Character.toUpperCase(char)
java.lang.Character.toUpperCase(int)
java.lang.String.toUpperCase()
java.lang.String.toUpperCase(java.util.Locale)


Occurences of toURI

toURI occurences:
java.io.File.toURI()
java.net.URL.toURI()


Occurences of toUri

toUri occurences:
java.nio.file.Path.toUri()
javax.tools.FileObject.toUri()
javax.tools.ForwardingFileObject.toUri()
javax.tools.SimpleJavaFileObject.toUri()


Occurences of toURL

toURL occurences:
java.io.File.toURL()
java.net.URI.toURL()


Occurences of toViewCoordinates

toViewCoordinates occurences:
javax.swing.JViewport.toViewCoordinates(java.awt.Dimension)
javax.swing.JViewport.toViewCoordinates(java.awt.Point)


Occurences of toZonedDateTime

toZonedDateTime occurences:
java.time.OffsetDateTime.toZonedDateTime()
java.util.GregorianCalendar.toZonedDateTime()


Occurences of to_any

to_any occurences:
org.omg.CORBA.DynAny.to_any()
org.omg.DynamicAny.DynAnyOperations.to_any()
org.omg.DynamicAny._DynAnyStub.to_any()
org.omg.DynamicAny._DynArrayStub.to_any()
org.omg.DynamicAny._DynEnumStub.to_any()
org.omg.DynamicAny._DynFixedStub.to_any()
org.omg.DynamicAny._DynSequenceStub.to_any()
org.omg.DynamicAny._DynStructStub.to_any()
org.omg.DynamicAny._DynUnionStub.to_any()
org.omg.DynamicAny._DynValueStub.to_any()


Occurences of to_name

to_name occurences:
org.omg.CosNaming.NamingContextExtOperations.to_name(java.lang.String)
org.omg.CosNaming._NamingContextExtStub.to_name(java.lang.String)


Occurences of to_string

to_string occurences:
org.omg.CosNaming.NamingContextExtOperations.to_string(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextExtStub.to_string(org.omg.CosNaming.NameComponent:A)


Occurences of to_url

to_url occurences:
org.omg.CosNaming.NamingContextExtOperations.to_url(java.lang.String, java.lang.String)
org.omg.CosNaming._NamingContextExtStub.to_url(java.lang.String, java.lang.String)


Occurences of trackListener

trackListener occurences:
javax.swing.plaf.basic.trackListener
javax.swing.plaf.basic.trackListener


Occurences of TrackListener

TrackListener occurences:
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.TrackListener()
javax.swing.plaf.basic.BasicSliderUI.TrackListener.TrackListener()


Occurences of trackRect

trackRect occurences:
javax.swing.plaf.basic.trackRect
javax.swing.plaf.basic.trackRect


Occurences of TRAILING

TRAILING occurences:
java.awt.TRAILING
javax.swing.border.TRAILING
javax.swing.TRAILING
javax.swing.TRAILING


Occurences of transaction

transaction occurences:
compact2.javax.transaction
compact3.javax.transaction
javax.transaction


Occurences of TransactionRequiredException (constructors)

TransactionRequiredException (constructors) occurences:
javax.transaction.TransactionRequiredException()
javax.transaction.TransactionRequiredException(java.lang.String)


Occurences of TransactionRolledbackException (constructors)

TransactionRolledbackException (constructors) occurences:
javax.transaction.TransactionRolledbackException()
javax.transaction.TransactionRolledbackException(java.lang.String)


Occurences of TRANSACTION_MODE (constructors)

TRANSACTION_MODE (constructors) occurences:
org.omg.CORBA.TRANSACTION_MODE()
org.omg.CORBA.TRANSACTION_MODE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TRANSACTION_MODE(java.lang.String)
org.omg.CORBA.TRANSACTION_MODE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of TRANSACTION_REQUIRED (constructors)

TRANSACTION_REQUIRED (constructors) occurences:
org.omg.CORBA.TRANSACTION_REQUIRED()
org.omg.CORBA.TRANSACTION_REQUIRED(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TRANSACTION_REQUIRED(java.lang.String)
org.omg.CORBA.TRANSACTION_REQUIRED(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of TRANSACTION_ROLLEDBACK (constructors)

TRANSACTION_ROLLEDBACK (constructors) occurences:
org.omg.CORBA.TRANSACTION_ROLLEDBACK()
org.omg.CORBA.TRANSACTION_ROLLEDBACK(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TRANSACTION_ROLLEDBACK(java.lang.String)
org.omg.CORBA.TRANSACTION_ROLLEDBACK(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of TRANSACTION_UNAVAILABLE (constructors)

TRANSACTION_UNAVAILABLE (constructors) occurences:
org.omg.CORBA.TRANSACTION_UNAVAILABLE()
org.omg.CORBA.TRANSACTION_UNAVAILABLE(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TRANSACTION_UNAVAILABLE(java.lang.String)
org.omg.CORBA.TRANSACTION_UNAVAILABLE(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of transfer

transfer occurences:
java.util.concurrent.LinkedTransferQueue.transfer(E)
java.util.concurrent.LinkedTransferQueue.transfer(java.lang.Object)
java.util.concurrent.TransferQueue.transfer(E)
java.util.concurrent.TransferQueue.transfer(java.lang.Object)


Occurences of TransferHandler (constructors)

TransferHandler (constructors) occurences:
javax.swing.TransferHandler()
javax.swing.TransferHandler(java.lang.String)


Occurences of transform

transform occurences:
compact2.javax.xml.transform
compact3.javax.xml.transform
java.awt.geom.AffineTransform.transform(double:A, int, double:A, int, int)
java.awt.geom.AffineTransform.transform(double:A, int, float:A, int, int)
java.awt.geom.AffineTransform.transform(float:A, int, double:A, int, int)
java.awt.geom.AffineTransform.transform(float:A, int, float:A, int, int)
java.awt.geom.AffineTransform.transform(java.awt.geom.Point2D, java.awt.geom.Point2D)
java.awt.geom.AffineTransform.transform(java.awt.geom.Point2D:A, int, java.awt.geom.Point2D:A, int, int)
java.awt.geom.Area.transform(java.awt.geom.AffineTransform)
java.awt.geom.Path2D.transform(java.awt.geom.AffineTransform)
java.awt.geom.Path2D.Double.transform(java.awt.geom.AffineTransform)
java.awt.geom.Path2D.Float.transform(java.awt.geom.AffineTransform)
java.awt.Graphics2D.transform(java.awt.geom.AffineTransform)
java.lang.instrument.ClassFileTransformer.transform(java.lang.ClassLoader, java.lang.String, java.lang.Class, java.security.ProtectionDomain, byte:A)
javax.xml.crypto.dsig.Transform.transform(javax.xml.crypto.Data, javax.xml.crypto.XMLCryptoContext)
javax.xml.crypto.dsig.Transform.transform(javax.xml.crypto.Data, javax.xml.crypto.XMLCryptoContext, java.io.OutputStream)
javax.xml.transform
javax.xml.transform.Transformer.transform(javax.xml.transform.Source, javax.xml.transform.Result)


Occurences of TransformerConfigurationException (constructors)

TransformerConfigurationException (constructors) occurences:
javax.xml.transform.TransformerConfigurationException()
javax.xml.transform.TransformerConfigurationException(java.lang.String)
javax.xml.transform.TransformerConfigurationException(java.lang.String, java.lang.Throwable)
javax.xml.transform.TransformerConfigurationException(java.lang.String, javax.xml.transform.SourceLocator)
javax.xml.transform.TransformerConfigurationException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable)
javax.xml.transform.TransformerConfigurationException(java.lang.Throwable)


Occurences of TransformerException (constructors)

TransformerException (constructors) occurences:
javax.xml.transform.TransformerException(java.lang.String)
javax.xml.transform.TransformerException(java.lang.String, java.lang.Throwable)
javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator)
javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable)
javax.xml.transform.TransformerException(java.lang.Throwable)


Occurences of TransformerFactoryConfigurationError (constructors)

TransformerFactoryConfigurationError (constructors) occurences:
javax.xml.transform.TransformerFactoryConfigurationError()
javax.xml.transform.TransformerFactoryConfigurationError(java.lang.Exception)
javax.xml.transform.TransformerFactoryConfigurationError(java.lang.Exception, java.lang.String)
javax.xml.transform.TransformerFactoryConfigurationError(java.lang.String)


Occurences of TransformException (constructors)

TransformException (constructors) occurences:
javax.xml.crypto.dsig.TransformException()
javax.xml.crypto.dsig.TransformException(java.lang.String)
javax.xml.crypto.dsig.TransformException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.dsig.TransformException(java.lang.Throwable)


Occurences of TRANSIENT

TRANSIENT occurences:
java.lang.reflect.TRANSIENT
javax.accessibility.TRANSIENT
javax.lang.model.element.TRANSIENT
org.omg.CORBA.TRANSIENT
org.omg.PortableServer.TRANSIENT


Occurences of TRANSIENT (constructors)

TRANSIENT (constructors) occurences:
org.omg.CORBA.TRANSIENT()
org.omg.CORBA.TRANSIENT(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.TRANSIENT(java.lang.String)
org.omg.CORBA.TRANSIENT(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of translate

translate occurences:
java.awt.Event.translate(int, int)
java.awt.geom.AffineTransform.translate(double, double)
java.awt.Graphics.translate(int, int)
java.awt.Graphics2D.translate(double, double)
java.awt.Graphics2D.translate(int, int)
java.awt.Point.translate(int, int)
java.awt.Polygon.translate(int, int)
java.awt.Rectangle.translate(int, int)
javax.swing.DebugGraphics.translate(int, int)


Occurences of translateKey

translateKey occurences:
java.security.KeyFactory.translateKey(java.security.Key)
javax.crypto.SecretKeyFactory.translateKey(javax.crypto.SecretKey)


Occurences of TRANSLUCENT

TRANSLUCENT occurences:
java.awt.TRANSLUCENT
java.awt.TRANSLUCENT


Occurences of transparency

transparency occurences:
java.awt.image.transparency
java.awt.image.transparency


Occurences of TransportTimeoutException (constructors)

TransportTimeoutException (constructors) occurences:
com.sun.jdi.connect.TransportTimeoutException()
com.sun.jdi.connect.TransportTimeoutException(java.lang.String)


Occurences of TrayIcon (constructors)

TrayIcon (constructors) occurences:
java.awt.TrayIcon(java.awt.Image)
java.awt.TrayIcon(java.awt.Image, java.lang.String)
java.awt.TrayIcon(java.awt.Image, java.lang.String, java.awt.PopupMenu)


Occurences of TREE

TREE occurences:
javax.accessibility.TREE
javax.swing.plaf.synth.TREE


Occurences of tree

tree occurences:
com.sun.source.tree
javax.swing.plaf.basic.tree
javax.swing.tree
javax.swing.tree.tree
Overview


Occurences of treeCollapsed

treeCollapsed occurences:
javax.swing.event.TreeExpansionListener.treeCollapsed(javax.swing.event.TreeExpansionEvent)
javax.swing.JTree.AccessibleJTree.treeCollapsed(javax.swing.event.TreeExpansionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler.treeCollapsed(javax.swing.event.TreeExpansionEvent)


Occurences of treeExpanded

treeExpanded occurences:
javax.swing.event.TreeExpansionListener.treeExpanded(javax.swing.event.TreeExpansionEvent)
javax.swing.JTree.AccessibleJTree.treeExpanded(javax.swing.event.TreeExpansionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler.treeExpanded(javax.swing.event.TreeExpansionEvent)


Occurences of TreeMap (constructors)

TreeMap (constructors) occurences:
java.util.TreeMap()
java.util.TreeMap(java.util.Comparator)
java.util.TreeMap(java.util.Map)
java.util.TreeMap(java.util.SortedMap)


Occurences of treeModel

treeModel occurences:
javax.swing.plaf.basic.treeModel
javax.swing.tree.treeModel
javax.swing.treeModel


Occurences of TreeModelEvent (constructors)

TreeModelEvent (constructors) occurences:
javax.swing.event.TreeModelEvent(java.lang.Object, java.lang.Object:A)
javax.swing.event.TreeModelEvent(java.lang.Object, java.lang.Object:A, int:A, java.lang.Object:A)
javax.swing.event.TreeModelEvent(java.lang.Object, javax.swing.tree.TreePath)
javax.swing.event.TreeModelEvent(java.lang.Object, javax.swing.tree.TreePath, int:A, java.lang.Object:A)


Occurences of TreeModelHandler

TreeModelHandler occurences:
javax.swing.JTree.TreeModelHandler.TreeModelHandler()
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.TreeModelHandler()


Occurences of treeNodesChanged

treeNodesChanged occurences:
javax.swing.event.TreeModelListener.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.JTree.AccessibleJTree.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.JTree.TreeModelHandler.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.AbstractLayoutCache.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.FixedHeightLayoutCache.treeNodesChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.VariableHeightLayoutCache.treeNodesChanged(javax.swing.event.TreeModelEvent)


Occurences of treeNodesInserted

treeNodesInserted occurences:
javax.swing.event.TreeModelListener.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.JTree.AccessibleJTree.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.JTree.TreeModelHandler.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.tree.AbstractLayoutCache.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.tree.FixedHeightLayoutCache.treeNodesInserted(javax.swing.event.TreeModelEvent)
javax.swing.tree.VariableHeightLayoutCache.treeNodesInserted(javax.swing.event.TreeModelEvent)


Occurences of treeNodesRemoved

treeNodesRemoved occurences:
javax.swing.event.TreeModelListener.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.JTree.AccessibleJTree.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.JTree.TreeModelHandler.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.tree.AbstractLayoutCache.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.tree.FixedHeightLayoutCache.treeNodesRemoved(javax.swing.event.TreeModelEvent)
javax.swing.tree.VariableHeightLayoutCache.treeNodesRemoved(javax.swing.event.TreeModelEvent)


Occurences of TreePath

TreePath occurences:
com.sun.source.util.TreePath
javax.swing.tree.TreePath


Occurences of TreePath (constructors)

TreePath (constructors) occurences:
com.sun.source.util.TreePath(com.sun.source.tree.CompilationUnitTree)
com.sun.source.util.TreePath(com.sun.source.util.TreePath, com.sun.source.tree.Tree)
javax.swing.tree.TreePath()
javax.swing.tree.TreePath(java.lang.Object)
javax.swing.tree.TreePath(java.lang.Object:A)
javax.swing.tree.TreePath(java.lang.Object:A, int)
javax.swing.tree.TreePath(javax.swing.tree.TreePath, java.lang.Object)


Occurences of TreeSelectionEvent (constructors)

TreeSelectionEvent (constructors) occurences:
javax.swing.event.TreeSelectionEvent(java.lang.Object, javax.swing.tree.TreePath, boolean, javax.swing.tree.TreePath, javax.swing.tree.TreePath)
javax.swing.event.TreeSelectionEvent(java.lang.Object, javax.swing.tree.TreePath:A, boolean:A, javax.swing.tree.TreePath, javax.swing.tree.TreePath)


Occurences of treeSelectionModel

treeSelectionModel occurences:
javax.swing.plaf.basic.treeSelectionModel
javax.swing.tree.treeSelectionModel


Occurences of TreeSet (constructors)

TreeSet (constructors) occurences:
java.util.TreeSet()
java.util.TreeSet(java.util.Collection)
java.util.TreeSet(java.util.Comparator)
java.util.TreeSet(java.util.SortedSet)


Occurences of treeStructureChanged

treeStructureChanged occurences:
javax.swing.event.TreeModelListener.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.JTree.AccessibleJTree.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.JTree.TreeModelHandler.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.AbstractLayoutCache.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.FixedHeightLayoutCache.treeStructureChanged(javax.swing.event.TreeModelEvent)
javax.swing.tree.VariableHeightLayoutCache.treeStructureChanged(javax.swing.event.TreeModelEvent)


Occurences of trimToSize

trimToSize occurences:
java.lang.StringBuffer.trimToSize()
java.lang.StringBuilder.trimToSize()
java.util.ArrayList.trimToSize()
java.util.Vector.trimToSize()
javax.swing.DefaultListModel.trimToSize()


Occurences of Troubleshooting

Troubleshooting occurences:
Troubleshooting
Troubleshooting
Troubleshooting
Troubleshooting


Occurences of TRUE

TRUE occurences:
java.lang.TRUE
java.util.jar.TRUE
java.util.jar.TRUE


Occurences of truncate

truncate occurences:
java.nio.channels.AsynchronousFileChannel.truncate(long)
java.nio.channels.FileChannel.truncate(long)
java.nio.channels.SeekableByteChannel.truncate(long)
java.sql.Blob.truncate(long)
java.sql.Clob.truncate(long)
javax.sql.rowset.serial.SerialBlob.truncate(long)
javax.sql.rowset.serial.SerialClob.truncate(long)


Occurences of truncatedTo

truncatedTo occurences:
java.time.Instant.truncatedTo(java.time.temporal.TemporalUnit)
java.time.LocalDateTime.truncatedTo(java.time.temporal.TemporalUnit)
java.time.LocalTime.truncatedTo(java.time.temporal.TemporalUnit)
java.time.OffsetDateTime.truncatedTo(java.time.temporal.TemporalUnit)
java.time.OffsetTime.truncatedTo(java.time.temporal.TemporalUnit)
java.time.ZonedDateTime.truncatedTo(java.time.temporal.TemporalUnit)


Occurences of TrustAnchor (constructors)

TrustAnchor (constructors) occurences:
java.security.cert.TrustAnchor(java.lang.String, java.security.PublicKey, byte:A)
java.security.cert.TrustAnchor(java.security.cert.X509Certificate, byte:A)
java.security.cert.TrustAnchor(javax.security.auth.x500.X500Principal, java.security.PublicKey, byte:A)


Occurences of TrustedCertificateEntry

TrustedCertificateEntry occurences:
java.security.KeyStore.TrustedCertificateEntry.TrustedCertificateEntry(java.security.cert.Certificate)
java.security.KeyStore.TrustedCertificateEntry.TrustedCertificateEntry(java.security.cert.Certificate, java.util.Set)


Occurences of tryAcquire

tryAcquire occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquire(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquire(int)
java.util.concurrent.Semaphore.tryAcquire()
java.util.concurrent.Semaphore.tryAcquire(int)
java.util.concurrent.Semaphore.tryAcquire(int, long, java.util.concurrent.TimeUnit)
java.util.concurrent.Semaphore.tryAcquire(long, java.util.concurrent.TimeUnit)


Occurences of tryAcquireNanos

tryAcquireNanos occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquireNanos(long, long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(int, long)


Occurences of tryAcquireShared

tryAcquireShared occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquireShared(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireShared(int)


Occurences of tryAcquireSharedNanos

tryAcquireSharedNanos occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquireSharedNanos(long, long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(int, long)


Occurences of tryAdvance

tryAdvance occurences:
java.util.Spliterator.tryAdvance(java.util.function.Consumer)
java.util.Spliterator.OfDouble.tryAdvance(java.util.function.Consumer)
java.util.Spliterator.OfDouble.tryAdvance(java.util.function.DoubleConsumer)
java.util.Spliterator.OfInt.tryAdvance(java.util.function.Consumer)
java.util.Spliterator.OfInt.tryAdvance(java.util.function.IntConsumer)
java.util.Spliterator.OfLong.tryAdvance(java.util.function.Consumer)
java.util.Spliterator.OfLong.tryAdvance(java.util.function.LongConsumer)
java.util.Spliterator.OfPrimitive.tryAdvance(java.lang.Object)
java.util.Spliterator.OfPrimitive.tryAdvance(T_CONS)


Occurences of tryLock

tryLock occurences:
java.nio.channels.AsynchronousFileChannel.tryLock()
java.nio.channels.AsynchronousFileChannel.tryLock(long, long, boolean)
java.nio.channels.FileChannel.tryLock()
java.nio.channels.FileChannel.tryLock(long, long, boolean)
java.util.concurrent.locks.Lock.tryLock()
java.util.concurrent.locks.Lock.tryLock(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.ReentrantLock.tryLock()
java.util.concurrent.locks.ReentrantLock.tryLock(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.tryLock()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.tryLock(long, java.util.concurrent.TimeUnit)
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.tryLock()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.tryLock(long, java.util.concurrent.TimeUnit)


Occurences of tryReadLock

tryReadLock occurences:
java.util.concurrent.locks.StampedLock.tryReadLock()
java.util.concurrent.locks.StampedLock.tryReadLock(long, java.util.concurrent.TimeUnit)


Occurences of tryRelease

tryRelease occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryRelease(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryRelease(int)


Occurences of tryReleaseShared

tryReleaseShared occurences:
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryReleaseShared(long)
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryReleaseShared(int)


Occurences of trySplit

trySplit occurences:
java.util.Spliterator.trySplit()
java.util.Spliterator.OfDouble.trySplit()
java.util.Spliterator.OfInt.trySplit()
java.util.Spliterator.OfLong.trySplit()
java.util.Spliterator.OfPrimitive.trySplit()
java.util.Spliterators.AbstractDoubleSpliterator.trySplit()
java.util.Spliterators.AbstractIntSpliterator.trySplit()
java.util.Spliterators.AbstractLongSpliterator.trySplit()
java.util.Spliterators.AbstractSpliterator.trySplit()


Occurences of tryTransfer

tryTransfer occurences:
java.util.concurrent.LinkedTransferQueue.tryTransfer(E)
java.util.concurrent.LinkedTransferQueue.tryTransfer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.LinkedTransferQueue.tryTransfer(java.lang.Object)
java.util.concurrent.LinkedTransferQueue.tryTransfer(java.lang.Object, long, java.util.concurrent.TimeUnit)
java.util.concurrent.TransferQueue.tryTransfer(E)
java.util.concurrent.TransferQueue.tryTransfer(E, long, java.util.concurrent.TimeUnit)
java.util.concurrent.TransferQueue.tryTransfer(java.lang.Object)
java.util.concurrent.TransferQueue.tryTransfer(java.lang.Object, long, java.util.concurrent.TimeUnit)


Occurences of tryWriteLock

tryWriteLock occurences:
java.util.concurrent.locks.StampedLock.tryWriteLock()
java.util.concurrent.locks.StampedLock.tryWriteLock(long, java.util.concurrent.TimeUnit)


Occurences of TUESDAY

TUESDAY occurences:
java.time.TUESDAY
java.util.TUESDAY


Occurences of TWO_SIDED_LONG_EDGE

TWO_SIDED_LONG_EDGE occurences:
java.awt.TWO_SIDED_LONG_EDGE
javax.print.attribute.standard.TWO_SIDED_LONG_EDGE


Occurences of TWO_SIDED_SHORT_EDGE

TWO_SIDED_SHORT_EDGE occurences:
java.awt.TWO_SIDED_SHORT_EDGE
javax.print.attribute.standard.TWO_SIDED_SHORT_EDGE


Occurences of type

type occurences:
com.sun.javadoc.FieldDoc.type()
com.sun.javadoc.Parameter.type()
com.sun.jdi.Field.type()
com.sun.jdi.LocalVariable.type()
com.sun.jdi.Value.type()
com.sun.tools.attach.spi.AttachProvider.type()
compact3.javax.lang.model.type
java.lang.invoke.CallSite.type()
java.lang.invoke.MethodHandle.type()
java.lang.ProcessBuilder.Redirect.type()
java.net.Proxy.type()
java.net.SocketOption.type()
java.nio.file.attribute.AclEntry.type()
java.nio.file.FileStore.type()
java.nio.file.WatchEvent.Kind.type()
javax.annotation.Resource.type()
javax.lang.model.type
javax.naming.event.type
javax.sound.midi.type
javax.swing.event.type
javax.swing.text.html.parser.type
javax.swing.text.html.parser.type
javax.swing.text.html.parser.type
javax.swing.text.html.parser.type
javax.swing.type
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.type()
javax.xml.bind.annotation.XmlElement.type()
javax.xml.bind.annotation.XmlElementRef.type()
javax.xml.bind.annotation.XmlSchemaType.type()
javax.xml.ws.WebServiceRef.type()
org.omg.CORBA.Any.type()
org.omg.CORBA.Any.type(org.omg.CORBA.TypeCode)
org.omg.CORBA.AnySeqHelper.type()
org.omg.CORBA.BooleanSeqHelper.type()
org.omg.CORBA.CharSeqHelper.type()
org.omg.CORBA.CompletionStatusHelper.type()
org.omg.CORBA.CurrentHelper.type()
org.omg.CORBA.DefinitionKindHelper.type()
org.omg.CORBA.DoubleSeqHelper.type()
org.omg.CORBA.DynAny.type()
org.omg.CORBA.FieldNameHelper.type()
org.omg.CORBA.FloatSeqHelper.type()
org.omg.CORBA.IdentifierHelper.type()
org.omg.CORBA.IDLTypeHelper.type()
org.omg.CORBA.IDLTypeOperations.type()
org.omg.CORBA.LongLongSeqHelper.type()
org.omg.CORBA.LongSeqHelper.type()
org.omg.CORBA.NameValuePairHelper.type()
org.omg.CORBA.ObjectHelper.type()
org.omg.CORBA.OctetSeqHelper.type()
org.omg.CORBA.ParameterModeHelper.type()
org.omg.CORBA.PolicyErrorCodeHelper.type()
org.omg.CORBA.PolicyErrorHelper.type()
org.omg.CORBA.PolicyHelper.type()
org.omg.CORBA.PolicyListHelper.type()
org.omg.CORBA.PolicyTypeHelper.type()
org.omg.CORBA.RepositoryIdHelper.type()
org.omg.CORBA.ServiceDetailHelper.type()
org.omg.CORBA.ServiceInformationHelper.type()
org.omg.CORBA.SetOverrideTypeHelper.type()
org.omg.CORBA.ShortSeqHelper.type()
org.omg.CORBA.StringSeqHelper.type()
org.omg.CORBA.StringValueHelper.type()
org.omg.CORBA.StructMemberHelper.type()
org.omg.CORBA.type
org.omg.CORBA.type
org.omg.CORBA.type
org.omg.CORBA.ULongLongSeqHelper.type()
org.omg.CORBA.ULongSeqHelper.type()
org.omg.CORBA.UnionMemberHelper.type()
org.omg.CORBA.UnknownUserExceptionHelper.type()
org.omg.CORBA.UShortSeqHelper.type()
org.omg.CORBA.ValueBaseHelper.type()
org.omg.CORBA.ValueMemberHelper.type()
org.omg.CORBA.VersionSpecHelper.type()
org.omg.CORBA.VisibilityHelper.type()
org.omg.CORBA.WCharSeqHelper.type()
org.omg.CORBA.WrongTransactionHelper.type()
org.omg.CORBA.WStringSeqHelper.type()
org.omg.CORBA.WStringValueHelper.type()
org.omg.CORBA._IDLTypeStub.type()
org.omg.CosNaming.BindingHelper.type()
org.omg.CosNaming.BindingIteratorHelper.type()
org.omg.CosNaming.BindingListHelper.type()
org.omg.CosNaming.BindingTypeHelper.type()
org.omg.CosNaming.IstringHelper.type()
org.omg.CosNaming.NameComponentHelper.type()
org.omg.CosNaming.NameHelper.type()
org.omg.CosNaming.NamingContextExtHelper.type()
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.type()
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.type()
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.type()
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.type()
org.omg.CosNaming.NamingContextHelper.type()
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type()
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type()
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type()
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.type()
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type()
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.type()
org.omg.DynamicAny.AnySeqHelper.type()
org.omg.DynamicAny.DynAnyFactoryHelper.type()
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.type()
org.omg.DynamicAny.DynAnyHelper.type()
org.omg.DynamicAny.DynAnyOperations.type()
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.type()
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.type()
org.omg.DynamicAny.DynAnySeqHelper.type()
org.omg.DynamicAny.DynArrayHelper.type()
org.omg.DynamicAny.DynEnumHelper.type()
org.omg.DynamicAny.DynFixedHelper.type()
org.omg.DynamicAny.DynSequenceHelper.type()
org.omg.DynamicAny.DynStructHelper.type()
org.omg.DynamicAny.DynUnionHelper.type()
org.omg.DynamicAny.DynValueHelper.type()
org.omg.DynamicAny.FieldNameHelper.type()
org.omg.DynamicAny.NameDynAnyPairHelper.type()
org.omg.DynamicAny.NameDynAnyPairSeqHelper.type()
org.omg.DynamicAny.NameValuePairHelper.type()
org.omg.DynamicAny.NameValuePairSeqHelper.type()
org.omg.DynamicAny._DynAnyStub.type()
org.omg.DynamicAny._DynArrayStub.type()
org.omg.DynamicAny._DynEnumStub.type()
org.omg.DynamicAny._DynFixedStub.type()
org.omg.DynamicAny._DynSequenceStub.type()
org.omg.DynamicAny._DynStructStub.type()
org.omg.DynamicAny._DynUnionStub.type()
org.omg.DynamicAny._DynValueStub.type()
org.omg.IOP.CodecFactoryHelper.type()
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.type()
org.omg.IOP.CodecPackage.FormatMismatchHelper.type()
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.type()
org.omg.IOP.CodecPackage.TypeMismatchHelper.type()
org.omg.IOP.ComponentIdHelper.type()
org.omg.IOP.IORHelper.type()
org.omg.IOP.MultipleComponentProfileHelper.type()
org.omg.IOP.ProfileIdHelper.type()
org.omg.IOP.ServiceContextHelper.type()
org.omg.IOP.ServiceContextListHelper.type()
org.omg.IOP.ServiceIdHelper.type()
org.omg.IOP.TaggedComponentHelper.type()
org.omg.IOP.TaggedProfileHelper.type()
org.omg.Messaging.SyncScopeHelper.type()
org.omg.PortableInterceptor.AdapterManagerIdHelper.type()
org.omg.PortableInterceptor.AdapterNameHelper.type()
org.omg.PortableInterceptor.AdapterStateHelper.type()
org.omg.PortableInterceptor.CurrentHelper.type()
org.omg.PortableInterceptor.ForwardRequestHelper.type()
org.omg.PortableInterceptor.InvalidSlotHelper.type()
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.type()
org.omg.PortableInterceptor.ObjectIdHelper.type()
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.type()
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.type()
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.type()
org.omg.PortableInterceptor.ORBIdHelper.type()
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.type()
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.type()
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.type()
org.omg.PortableInterceptor.ServerIdHelper.type()
org.omg.PortableServer.CurrentHelper.type()
org.omg.PortableServer.CurrentPackage.NoContextHelper.type()
org.omg.PortableServer.ForwardRequestHelper.type()
org.omg.PortableServer.POAHelper.type()
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.type()
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.type()
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.type()
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.type()
org.omg.PortableServer.POAPackage.NoServantHelper.type()
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.type()
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.type()
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.type()
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.type()
org.omg.PortableServer.POAPackage.WrongAdapterHelper.type()
org.omg.PortableServer.POAPackage.WrongPolicyHelper.type()
org.omg.PortableServer.ServantActivatorHelper.type()
org.omg.PortableServer.ServantLocatorHelper.type()


Occurences of TYPE

TYPE occurences:
java.lang.annotation.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
java.lang.TYPE
javax.swing.text.html.TYPE
javax.xml.crypto.dsig.keyinfo.TYPE
javax.xml.crypto.dsig.keyinfo.TYPE
javax.xml.crypto.dsig.TYPE
javax.xml.crypto.dsig.TYPE
javax.xml.crypto.dsig.TYPE


Occurences of Type

Type occurences:
com.sun.javadoc.Type
com.sun.jdi.Type
java.lang.reflect.Type
javax.sound.sampled.AudioFileFormat.Type.Type(java.lang.String, java.lang.String)
javax.sound.sampled.BooleanControl.Type.Type(java.lang.String)
javax.sound.sampled.CompoundControl.Type.Type(java.lang.String)
javax.sound.sampled.Control.Type.Type(java.lang.String)
javax.sound.sampled.EnumControl.Type.Type(java.lang.String)
javax.sound.sampled.FloatControl.Type.Type(java.lang.String)
javax.sound.sampled.LineEvent.Type.Type(java.lang.String)


Occurences of TypeCodeHolder (constructors)

TypeCodeHolder (constructors) occurences:
org.omg.CORBA.TypeCodeHolder()
org.omg.CORBA.TypeCodeHolder(org.omg.CORBA.TypeCode)


Occurences of TypeConstraintException (constructors)

TypeConstraintException (constructors) occurences:
javax.xml.bind.TypeConstraintException(java.lang.String)
javax.xml.bind.TypeConstraintException(java.lang.String, java.lang.String)
javax.xml.bind.TypeConstraintException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.TypeConstraintException(java.lang.String, java.lang.Throwable)
javax.xml.bind.TypeConstraintException(java.lang.Throwable)


Occurences of TypeKindVisitor6 (constructors)

TypeKindVisitor6 (constructors) occurences:
javax.lang.model.util.TypeKindVisitor6()
javax.lang.model.util.TypeKindVisitor6(java.lang.Object)
javax.lang.model.util.TypeKindVisitor6(R)


Occurences of TypeKindVisitor7 (constructors)

TypeKindVisitor7 (constructors) occurences:
javax.lang.model.util.TypeKindVisitor7()
javax.lang.model.util.TypeKindVisitor7(java.lang.Object)
javax.lang.model.util.TypeKindVisitor7(R)


Occurences of TypeKindVisitor8 (constructors)

TypeKindVisitor8 (constructors) occurences:
javax.lang.model.util.TypeKindVisitor8()
javax.lang.model.util.TypeKindVisitor8(java.lang.Object)
javax.lang.model.util.TypeKindVisitor8(R)


Occurences of TypeMismatch

TypeMismatch occurences:
org.omg.CORBA.DynAnyPackage.TypeMismatch
org.omg.DynamicAny.DynAnyPackage.TypeMismatch
org.omg.IOP.CodecPackage.TypeMismatch


Occurences of TypeMismatch (constructors)

TypeMismatch (constructors) occurences:
org.omg.CORBA.DynAnyPackage.TypeMismatch()
org.omg.CORBA.DynAnyPackage.TypeMismatch(java.lang.String)
org.omg.DynamicAny.DynAnyPackage.TypeMismatch()
org.omg.DynamicAny.DynAnyPackage.TypeMismatch(java.lang.String)
org.omg.IOP.CodecPackage.TypeMismatch()
org.omg.IOP.CodecPackage.TypeMismatch(java.lang.String)


Occurences of TypeMismatchHelper

TypeMismatchHelper occurences:
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper
org.omg.IOP.CodecPackage.TypeMismatchHelper


Occurences of TypeMismatchHelper (constructors)

TypeMismatchHelper (constructors) occurences:
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper()
org.omg.IOP.CodecPackage.TypeMismatchHelper()


Occurences of typeName

typeName occurences:
com.sun.javadoc.Parameter.typeName()
com.sun.javadoc.Type.typeName()
com.sun.jdi.Field.typeName()
com.sun.jdi.LocalVariable.typeName()
java.lang.TypeNotPresentException.typeName()


Occurences of typeParameters

typeParameters occurences:
com.sun.javadoc.ClassDoc.typeParameters()
com.sun.javadoc.ExecutableMemberDoc.typeParameters()


Occurences of typeParamTags

typeParamTags occurences:
com.sun.javadoc.ClassDoc.typeParamTags()
com.sun.javadoc.ExecutableMemberDoc.typeParamTags()


Occurences of Types

Types occurences:
java.sql.Types
javax.lang.model.util.Types


Occurences of typesIn

typesIn occurences:
javax.lang.model.util.ElementFilter.typesIn(java.lang.Iterable)
javax.lang.model.util.ElementFilter.typesIn(java.util.Set)


Occurences of TypeVariable

TypeVariable occurences:
com.sun.javadoc.TypeVariable
java.lang.reflect.TypeVariable
javax.lang.model.type.TypeVariable


Occurences of type_def

type_def occurences:
org.omg.CORBA.type_def
org.omg.CORBA.type_def
org.omg.CORBA.type_def


Occurences of TYPE_PARAMETER

TYPE_PARAMETER occurences:
com.sun.source.tree.TYPE_PARAMETER
java.lang.annotation.TYPE_PARAMETER
javax.lang.model.element.TYPE_PARAMETER


Occurences of UGARITIC

UGARITIC occurences:
java.lang.UGARITIC
java.lang.UGARITIC


Occurences of ui

ui occurences:
javax.swing.plaf.basic.ui
javax.swing.ui


Occurences of UID (constructors)

UID (constructors) occurences:
java.rmi.server.UID()
java.rmi.server.UID(short)


Occurences of UIDefaults (constructors)

UIDefaults (constructors) occurences:
javax.swing.UIDefaults()
javax.swing.UIDefaults(int, float)
javax.swing.UIDefaults(java.lang.Object:A)


Occurences of UIResource

UIResource occurences:
javax.swing.DefaultListCellRenderer.UIResource.UIResource()
javax.swing.plaf.UIResource
javax.swing.plaf.basic.BasicComboBoxEditor.UIResource.UIResource()
javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource.UIResource()
javax.swing.plaf.metal.MetalComboBoxEditor.UIResource.UIResource()
javax.swing.ScrollPaneLayout.UIResource.UIResource()
javax.swing.table.DefaultTableCellRenderer.UIResource.UIResource()


Occurences of uis

uis occurences:
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis
javax.swing.plaf.multi.uis


Occurences of ULongLongSeqHolder (constructors)

ULongLongSeqHolder (constructors) occurences:
org.omg.CORBA.ULongLongSeqHolder()
org.omg.CORBA.ULongLongSeqHolder(long:A)


Occurences of ULongSeqHolder (constructors)

ULongSeqHolder (constructors) occurences:
org.omg.CORBA.ULongSeqHolder()
org.omg.CORBA.ULongSeqHolder(int:A)


Occurences of ulp

ulp occurences:
java.lang.Math.ulp(double)
java.lang.Math.ulp(float)
java.lang.StrictMath.ulp(double)
java.lang.StrictMath.ulp(float)
java.math.BigDecimal.ulp()


Occurences of unbind

unbind occurences:
java.rmi.Naming.unbind(java.lang.String)
java.rmi.registry.Registry.unbind(java.lang.String)
javax.naming.Context.unbind(java.lang.String)
javax.naming.Context.unbind(javax.naming.Name)
javax.naming.InitialContext.unbind(java.lang.String)
javax.naming.InitialContext.unbind(javax.naming.Name)
org.omg.CosNaming.NamingContextOperations.unbind(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextExtStub.unbind(org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming._NamingContextStub.unbind(org.omg.CosNaming.NameComponent:A)


Occurences of uncaughtException

uncaughtException occurences:
java.lang.Thread.UncaughtExceptionHandler.uncaughtException(java.lang.Thread, java.lang.Throwable)
java.lang.ThreadGroup.uncaughtException(java.lang.Thread, java.lang.Throwable)


Occurences of UncheckedIOException (constructors)

UncheckedIOException (constructors) occurences:
java.io.UncheckedIOException(java.io.IOException)
java.io.UncheckedIOException(java.lang.String, java.io.IOException)


Occurences of unchecked_narrow

unchecked_narrow occurences:
org.omg.CosNaming.BindingIteratorHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.CosNaming.NamingContextExtHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.CosNaming.NamingContextHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynAnyFactoryHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynAnyHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynArrayHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynEnumHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynFixedHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynSequenceHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynStructHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynUnionHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.DynamicAny.DynValueHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.IOP.CodecFactoryHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.PortableInterceptor.CurrentHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.PortableServer.ServantActivatorHelper.unchecked_narrow(org.omg.CORBA.Object)
org.omg.PortableServer.ServantLocatorHelper.unchecked_narrow(org.omg.CORBA.Object)


Occurences of unconfigureEditor

unconfigureEditor occurences:
javax.swing.plaf.basic.BasicComboBoxUI.unconfigureEditor()
javax.swing.plaf.metal.MetalComboBoxUI.unconfigureEditor()


Occurences of UndeclaredThrowableException (constructors)

UndeclaredThrowableException (constructors) occurences:
java.lang.reflect.UndeclaredThrowableException(java.lang.Throwable)
java.lang.reflect.UndeclaredThrowableException(java.lang.Throwable, java.lang.String)


Occurences of UNDEFINED

UNDEFINED occurences:
java.awt.UNDEFINED
javax.xml.bind.annotation.UNDEFINED


Occurences of undo

undo occurences:
javax.swing.text.AbstractDocument.DefaultDocumentEvent.undo()
javax.swing.text.AbstractDocument.ElementEdit.undo()
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit.undo()
javax.swing.undo
javax.swing.undo.AbstractUndoableEdit.undo()
javax.swing.undo.CompoundEdit.undo()
javax.swing.undo.StateEdit.undo()
javax.swing.undo.UndoableEdit.undo()
javax.swing.undo.UndoManager.undo()


Occurences of undoableEditHappened

undoableEditHappened occurences:
javax.swing.event.UndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)
javax.swing.undo.UndoManager.undoableEditHappened(javax.swing.event.UndoableEditEvent)


Occurences of UndoableEditSupport (constructors)

UndoableEditSupport (constructors) occurences:
javax.swing.undo.UndoableEditSupport()
javax.swing.undo.UndoableEditSupport(java.lang.Object)


Occurences of UnexpectedException (constructors)

UnexpectedException (constructors) occurences:
java.rmi.UnexpectedException(java.lang.String)
java.rmi.UnexpectedException(java.lang.String, java.lang.Exception)


Occurences of unexportObject

unexportObject occurences:
java.rmi.activation.Activatable.unexportObject(java.rmi.Remote, boolean)
java.rmi.server.UnicastRemoteObject.unexportObject(java.rmi.Remote, boolean)
javax.rmi.CORBA.PortableRemoteObjectDelegate.unexportObject(java.rmi.Remote)
javax.rmi.CORBA.Util.unexportObject(java.rmi.Remote)
javax.rmi.CORBA.UtilDelegate.unexportObject(java.rmi.Remote)
javax.rmi.PortableRemoteObject.unexportObject(java.rmi.Remote)


Occurences of UnicastRemoteObject (constructors)

UnicastRemoteObject (constructors) occurences:
java.rmi.server.UnicastRemoteObject()
java.rmi.server.UnicastRemoteObject(int)
java.rmi.server.UnicastRemoteObject(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)


Occurences of uninitialize

uninitialize occurences:
javax.swing.LookAndFeel.uninitialize()
javax.swing.plaf.basic.BasicLookAndFeel.uninitialize()
javax.swing.plaf.nimbus.NimbusLookAndFeel.uninitialize()
javax.swing.plaf.synth.SynthLookAndFeel.uninitialize()


Occurences of uninstallComponents

uninstallComponents occurences:
javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents()
javax.swing.plaf.basic.BasicDesktopIconUI.uninstallComponents()
javax.swing.plaf.basic.BasicFileChooserUI.uninstallComponents(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameUI.uninstallComponents()
javax.swing.plaf.basic.BasicLabelUI.uninstallComponents(javax.swing.JLabel)
javax.swing.plaf.basic.BasicMenuItemUI.uninstallComponents(javax.swing.JMenuItem)
javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents()
javax.swing.plaf.basic.BasicRootPaneUI.uninstallComponents(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.uninstallComponents()
javax.swing.plaf.basic.BasicTabbedPaneUI.uninstallComponents()
javax.swing.plaf.basic.BasicToolBarUI.uninstallComponents()
javax.swing.plaf.basic.BasicTreeUI.uninstallComponents()
javax.swing.plaf.metal.MetalDesktopIconUI.uninstallComponents()
javax.swing.plaf.metal.MetalFileChooserUI.uninstallComponents(javax.swing.JFileChooser)
javax.swing.plaf.metal.MetalInternalFrameUI.uninstallComponents()
javax.swing.plaf.synth.SynthInternalFrameUI.uninstallComponents()
javax.swing.plaf.synth.SynthToolBarUI.uninstallComponents()


Occurences of uninstallDefaults

uninstallDefaults occurences:
javax.swing.plaf.basic.BasicButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicColorChooserUI.uninstallDefaults()
javax.swing.plaf.basic.BasicComboBoxUI.uninstallDefaults()
javax.swing.plaf.basic.BasicDesktopIconUI.uninstallDefaults()
javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallDefaults()
javax.swing.plaf.basic.BasicFileChooserUI.uninstallDefaults(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.uninstallDefaults()
javax.swing.plaf.basic.BasicInternalFrameUI.uninstallDefaults()
javax.swing.plaf.basic.BasicLabelUI.uninstallDefaults(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.uninstallDefaults()
javax.swing.plaf.basic.BasicMenuBarUI.uninstallDefaults()
javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults()
javax.swing.plaf.basic.BasicMenuUI.uninstallDefaults()
javax.swing.plaf.basic.BasicOptionPaneUI.uninstallDefaults()
javax.swing.plaf.basic.BasicPanelUI.uninstallDefaults(javax.swing.JPanel)
javax.swing.plaf.basic.BasicPopupMenuUI.uninstallDefaults()
javax.swing.plaf.basic.BasicProgressBarUI.uninstallDefaults()
javax.swing.plaf.basic.BasicRadioButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicRootPaneUI.uninstallDefaults(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.uninstallDefaults()
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallDefaults(javax.swing.JScrollPane)
javax.swing.plaf.basic.BasicSeparatorUI.uninstallDefaults(javax.swing.JSeparator)
javax.swing.plaf.basic.BasicSliderUI.uninstallDefaults(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults()
javax.swing.plaf.basic.BasicSplitPaneUI.uninstallDefaults()
javax.swing.plaf.basic.BasicTabbedPaneUI.uninstallDefaults()
javax.swing.plaf.basic.BasicTableHeaderUI.uninstallDefaults()
javax.swing.plaf.basic.BasicTableUI.uninstallDefaults()
javax.swing.plaf.basic.BasicTextUI.uninstallDefaults()
javax.swing.plaf.basic.BasicToolBarUI.uninstallDefaults()
javax.swing.plaf.basic.BasicToolTipUI.uninstallDefaults(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.uninstallDefaults()
javax.swing.plaf.basic.BasicViewportUI.uninstallDefaults(javax.swing.JComponent)
javax.swing.plaf.metal.MetalButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalCheckBoxUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalInternalFrameTitlePane.uninstallDefaults()
javax.swing.plaf.metal.MetalRadioButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.metal.MetalToggleButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthButtonUI.uninstallDefaults(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthColorChooserUI.uninstallDefaults()
javax.swing.plaf.synth.SynthComboBoxUI.uninstallDefaults()
javax.swing.plaf.synth.SynthDesktopIconUI.uninstallDefaults()
javax.swing.plaf.synth.SynthDesktopPaneUI.uninstallDefaults()
javax.swing.plaf.synth.SynthEditorPaneUI.uninstallDefaults()
javax.swing.plaf.synth.SynthInternalFrameUI.uninstallDefaults()
javax.swing.plaf.synth.SynthLabelUI.uninstallDefaults(javax.swing.JLabel)
javax.swing.plaf.synth.SynthListUI.uninstallDefaults()
javax.swing.plaf.synth.SynthMenuBarUI.uninstallDefaults()
javax.swing.plaf.synth.SynthMenuItemUI.uninstallDefaults()
javax.swing.plaf.synth.SynthMenuUI.uninstallDefaults()
javax.swing.plaf.synth.SynthOptionPaneUI.uninstallDefaults()
javax.swing.plaf.synth.SynthPanelUI.uninstallDefaults(javax.swing.JPanel)
javax.swing.plaf.synth.SynthPopupMenuUI.uninstallDefaults()
javax.swing.plaf.synth.SynthProgressBarUI.uninstallDefaults()
javax.swing.plaf.synth.SynthRootPaneUI.uninstallDefaults(javax.swing.JRootPane)
javax.swing.plaf.synth.SynthScrollBarUI.uninstallDefaults()
javax.swing.plaf.synth.SynthScrollPaneUI.uninstallDefaults(javax.swing.JScrollPane)
javax.swing.plaf.synth.SynthSeparatorUI.uninstallDefaults(javax.swing.JSeparator)
javax.swing.plaf.synth.SynthSliderUI.uninstallDefaults(javax.swing.JSlider)
javax.swing.plaf.synth.SynthSpinnerUI.uninstallDefaults()
javax.swing.plaf.synth.SynthSplitPaneUI.uninstallDefaults()
javax.swing.plaf.synth.SynthStyle.uninstallDefaults(javax.swing.plaf.synth.SynthContext)
javax.swing.plaf.synth.SynthTabbedPaneUI.uninstallDefaults()
javax.swing.plaf.synth.SynthTableHeaderUI.uninstallDefaults()
javax.swing.plaf.synth.SynthTableUI.uninstallDefaults()
javax.swing.plaf.synth.SynthTextAreaUI.uninstallDefaults()
javax.swing.plaf.synth.SynthTextFieldUI.uninstallDefaults()
javax.swing.plaf.synth.SynthToolBarUI.uninstallDefaults()
javax.swing.plaf.synth.SynthToolTipUI.uninstallDefaults(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.uninstallDefaults()
javax.swing.plaf.synth.SynthViewportUI.uninstallDefaults(javax.swing.JComponent)


Occurences of uninstallDesktopManager

uninstallDesktopManager occurences:
javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallDesktopManager()
javax.swing.plaf.synth.SynthDesktopPaneUI.uninstallDesktopManager()


Occurences of uninstallingUI

uninstallingUI occurences:
javax.swing.plaf.basic.BasicComboPopup.uninstallingUI()
javax.swing.plaf.basic.ComboPopup.uninstallingUI()


Occurences of uninstallKeyboardActions

uninstallKeyboardActions occurences:
javax.swing.plaf.basic.BasicButtonListener.uninstallKeyboardActions(javax.swing.JComponent)
javax.swing.plaf.basic.BasicButtonUI.uninstallKeyboardActions(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicComboBoxUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicComboPopup.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicInternalFrameUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicLabelUI.uninstallKeyboardActions(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicMenuBarUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicMenuUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicOptionPaneUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicPopupMenuUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicRootPaneUI.uninstallKeyboardActions(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallKeyboardActions(javax.swing.JScrollPane)
javax.swing.plaf.basic.BasicSliderUI.uninstallKeyboardActions(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSplitPaneUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicTabbedPaneUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicTableHeaderUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicTableUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicToolBarUI.uninstallKeyboardActions()
javax.swing.plaf.basic.BasicTreeUI.uninstallKeyboardActions()
javax.swing.plaf.metal.MetalInternalFrameUI.uninstallKeyboardActions()


Occurences of uninstallListeners

uninstallListeners occurences:
javax.swing.plaf.basic.BasicButtonUI.uninstallListeners(javax.swing.AbstractButton)
javax.swing.plaf.basic.BasicColorChooserUI.uninstallListeners()
javax.swing.plaf.basic.BasicComboBoxUI.uninstallListeners()
javax.swing.plaf.basic.BasicDesktopIconUI.uninstallListeners()
javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallListeners()
javax.swing.plaf.basic.BasicFileChooserUI.uninstallListeners(javax.swing.JFileChooser)
javax.swing.plaf.basic.BasicInternalFrameTitlePane.uninstallListeners()
javax.swing.plaf.basic.BasicInternalFrameUI.uninstallListeners()
javax.swing.plaf.basic.BasicLabelUI.uninstallListeners(javax.swing.JLabel)
javax.swing.plaf.basic.BasicListUI.uninstallListeners()
javax.swing.plaf.basic.BasicMenuBarUI.uninstallListeners()
javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners()
javax.swing.plaf.basic.BasicMenuUI.uninstallListeners()
javax.swing.plaf.basic.BasicOptionPaneUI.uninstallListeners()
javax.swing.plaf.basic.BasicPopupMenuUI.uninstallListeners()
javax.swing.plaf.basic.BasicProgressBarUI.uninstallListeners()
javax.swing.plaf.basic.BasicRootPaneUI.uninstallListeners(javax.swing.JRootPane)
javax.swing.plaf.basic.BasicScrollBarUI.uninstallListeners()
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallListeners(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.uninstallListeners(javax.swing.JSeparator)
javax.swing.plaf.basic.BasicSliderUI.uninstallListeners(javax.swing.JSlider)
javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners()
javax.swing.plaf.basic.BasicSplitPaneUI.uninstallListeners()
javax.swing.plaf.basic.BasicTabbedPaneUI.uninstallListeners()
javax.swing.plaf.basic.BasicTableHeaderUI.uninstallListeners()
javax.swing.plaf.basic.BasicTableUI.uninstallListeners()
javax.swing.plaf.basic.BasicTextUI.uninstallListeners()
javax.swing.plaf.basic.BasicToolBarUI.uninstallListeners()
javax.swing.plaf.basic.BasicToolTipUI.uninstallListeners(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.uninstallListeners()
javax.swing.plaf.metal.MetalDesktopIconUI.uninstallListeners()
javax.swing.plaf.metal.MetalInternalFrameUI.uninstallListeners()
javax.swing.plaf.metal.MetalScrollPaneUI.uninstallListeners(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollPaneUI.uninstallListeners(javax.swing.JScrollPane)
javax.swing.plaf.metal.MetalToolBarUI.uninstallListeners()
javax.swing.plaf.synth.SynthButtonUI.uninstallListeners(javax.swing.AbstractButton)
javax.swing.plaf.synth.SynthColorChooserUI.uninstallListeners()
javax.swing.plaf.synth.SynthComboBoxUI.uninstallListeners()
javax.swing.plaf.synth.SynthDesktopIconUI.uninstallListeners()
javax.swing.plaf.synth.SynthDesktopPaneUI.uninstallListeners()
javax.swing.plaf.synth.SynthInternalFrameUI.uninstallListeners()
javax.swing.plaf.synth.SynthListUI.uninstallListeners()
javax.swing.plaf.synth.SynthMenuBarUI.uninstallListeners()
javax.swing.plaf.synth.SynthMenuItemUI.uninstallListeners()
javax.swing.plaf.synth.SynthMenuUI.uninstallListeners()
javax.swing.plaf.synth.SynthOptionPaneUI.uninstallListeners()
javax.swing.plaf.synth.SynthPanelUI.uninstallListeners(javax.swing.JPanel)
javax.swing.plaf.synth.SynthPopupMenuUI.uninstallListeners()
javax.swing.plaf.synth.SynthProgressBarUI.uninstallListeners()
javax.swing.plaf.synth.SynthScrollBarUI.uninstallListeners()
javax.swing.plaf.synth.SynthScrollPaneUI.uninstallListeners(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.uninstallListeners(javax.swing.JSeparator)
javax.swing.plaf.synth.SynthSliderUI.uninstallListeners(javax.swing.JSlider)
javax.swing.plaf.synth.SynthSpinnerUI.uninstallListeners()
javax.swing.plaf.synth.SynthSplitPaneUI.uninstallListeners()
javax.swing.plaf.synth.SynthTabbedPaneUI.uninstallListeners()
javax.swing.plaf.synth.SynthTableHeaderUI.uninstallListeners()
javax.swing.plaf.synth.SynthTableUI.uninstallListeners()
javax.swing.plaf.synth.SynthToolBarUI.uninstallListeners()
javax.swing.plaf.synth.SynthToolTipUI.uninstallListeners(javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.uninstallListeners()
javax.swing.plaf.synth.SynthViewportUI.uninstallListeners(javax.swing.JComponent)


Occurences of uninstallUI

uninstallUI occurences:
javax.swing.plaf.basic.BasicButtonUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicColorChooserUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicComboBoxUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopIconUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicEditorPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicFileChooserUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicInternalFrameUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicLabelUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicMenuItemUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPanelUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicPopupMenuUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicProgressBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicRootPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSeparatorUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSliderUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicSplitPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTabbedPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableHeaderUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTableUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicToolTipUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicTreeUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.basic.BasicViewportUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.LayerUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalFileChooserUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalInternalFrameUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalMenuBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalRootPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalScrollPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolTipUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.metal.MetalTreeUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuItemUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.uninstallUI(javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.uninstallUI(javax.swing.JComponent)


Occurences of UNION

UNION occurences:
javax.lang.model.type.UNION
javax.xml.crypto.dsig.spec.UNION


Occurences of union

union occurences:
java.awt.geom.Rectangle2D.union(java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D)
java.awt.Rectangle.union(java.awt.Rectangle)
javax.management.ImmutableDescriptor.union(javax.management.Descriptor...)


Occurences of UnionMember (constructors)

UnionMember (constructors) occurences:
org.omg.CORBA.UnionMember()
org.omg.CORBA.UnionMember(java.lang.String, org.omg.CORBA.Any, org.omg.CORBA.TypeCode, org.omg.CORBA.IDLType)


Occurences of UNKNOWN

UNKNOWN occurences:
java.awt.UNKNOWN
java.lang.UNKNOWN
javax.accessibility.UNKNOWN
javax.management.UNKNOWN
javax.print.attribute.standard.UNKNOWN
javax.print.attribute.standard.UNKNOWN
org.omg.CORBA.UNKNOWN
org.omg.PortableInterceptor.UNKNOWN


Occurences of UNKNOWN (constructors)

UNKNOWN (constructors) occurences:
org.omg.CORBA.UNKNOWN()
org.omg.CORBA.UNKNOWN(int, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.UNKNOWN(java.lang.String)
org.omg.CORBA.UNKNOWN(java.lang.String, int, org.omg.CORBA.CompletionStatus)


Occurences of UnknownEncoding (constructors)

UnknownEncoding (constructors) occurences:
org.omg.IOP.CodecFactoryPackage.UnknownEncoding()
org.omg.IOP.CodecFactoryPackage.UnknownEncoding(java.lang.String)


Occurences of UnknownError (constructors)

UnknownError (constructors) occurences:
java.lang.UnknownError()
java.lang.UnknownError(java.lang.String)


Occurences of UnknownHostException

UnknownHostException occurences:
java.net.UnknownHostException
java.rmi.UnknownHostException


Occurences of UnknownHostException (constructors)

UnknownHostException (constructors) occurences:
java.net.UnknownHostException()
java.net.UnknownHostException(java.lang.String)
java.rmi.UnknownHostException(java.lang.String)
java.rmi.UnknownHostException(java.lang.String, java.lang.Exception)


Occurences of UnknownServiceException (constructors)

UnknownServiceException (constructors) occurences:
java.net.UnknownServiceException()
java.net.UnknownServiceException(java.lang.String)


Occurences of UnknownUserException (constructors)

UnknownUserException (constructors) occurences:
org.omg.CORBA.UnknownUserException()
org.omg.CORBA.UnknownUserException(org.omg.CORBA.Any)


Occurences of UnknownUserExceptionHolder (constructors)

UnknownUserExceptionHolder (constructors) occurences:
org.omg.CORBA.UnknownUserExceptionHolder()
org.omg.CORBA.UnknownUserExceptionHolder(org.omg.CORBA.UnknownUserException)


Occurences of unlock

unlock occurences:
java.util.concurrent.locks.Lock.unlock()
java.util.concurrent.locks.ReentrantLock.unlock()
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.unlock()
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.unlock()
java.util.concurrent.locks.StampedLock.unlock(long)


Occurences of unmappableCharacterAction

unmappableCharacterAction occurences:
java.nio.charset.CharsetDecoder.unmappableCharacterAction()
java.nio.charset.CharsetEncoder.unmappableCharacterAction()


Occurences of unmarshal

unmarshal occurences:
javax.xml.bind.annotation.adapters.CollapsedStringAdapter.unmarshal(java.lang.String)
javax.xml.bind.annotation.adapters.HexBinaryAdapter.unmarshal(java.lang.String)
javax.xml.bind.annotation.adapters.NormalizedStringAdapter.unmarshal(java.lang.String)
javax.xml.bind.annotation.adapters.XmlAdapter.unmarshal(java.lang.Object)
javax.xml.bind.annotation.adapters.XmlAdapter.unmarshal(ValueType)
javax.xml.bind.Binder.unmarshal(java.lang.Object)
javax.xml.bind.Binder.unmarshal(java.lang.Object, java.lang.Class)
javax.xml.bind.Binder.unmarshal(XmlNode)
javax.xml.bind.Binder.unmarshal(XmlNode, java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(java.io.File)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(java.io.InputStream)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(java.io.Reader)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(java.net.URL)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLEventReader)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLStreamReader)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.transform.Source)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(javax.xml.transform.Source, java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(org.w3c.dom.Node, java.lang.Class)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(org.xml.sax.InputSource)
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)
javax.xml.bind.JAXB.unmarshal(java.io.File, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(java.io.InputStream, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(java.io.Reader, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(java.lang.String, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(java.net.URI, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(java.net.URL, java.lang.Class)
javax.xml.bind.JAXB.unmarshal(javax.xml.transform.Source, java.lang.Class)
javax.xml.bind.Unmarshaller.unmarshal(java.io.File)
javax.xml.bind.Unmarshaller.unmarshal(java.io.InputStream)
javax.xml.bind.Unmarshaller.unmarshal(java.io.Reader)
javax.xml.bind.Unmarshaller.unmarshal(java.net.URL)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.stream.XMLEventReader)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.stream.XMLStreamReader)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.transform.Source)
javax.xml.bind.Unmarshaller.unmarshal(javax.xml.transform.Source, java.lang.Class)
javax.xml.bind.Unmarshaller.unmarshal(org.w3c.dom.Node)
javax.xml.bind.Unmarshaller.unmarshal(org.w3c.dom.Node, java.lang.Class)
javax.xml.bind.Unmarshaller.unmarshal(org.xml.sax.InputSource)
org.omg.CORBA.CustomMarshal.unmarshal(org.omg.CORBA.DataInputStream)


Occurences of UnmarshalException

UnmarshalException occurences:
java.rmi.UnmarshalException
javax.xml.bind.UnmarshalException


Occurences of UnmarshalException (constructors)

UnmarshalException (constructors) occurences:
java.rmi.UnmarshalException(java.lang.String)
java.rmi.UnmarshalException(java.lang.String, java.lang.Exception)
javax.xml.bind.UnmarshalException(java.lang.String)
javax.xml.bind.UnmarshalException(java.lang.String, java.lang.String)
javax.xml.bind.UnmarshalException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.UnmarshalException(java.lang.String, java.lang.Throwable)
javax.xml.bind.UnmarshalException(java.lang.Throwable)


Occurences of unmarshalXMLSignature

unmarshalXMLSignature occurences:
javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature(javax.xml.crypto.dsig.XMLValidateContext)
javax.xml.crypto.dsig.XMLSignatureFactory.unmarshalXMLSignature(javax.xml.crypto.XMLStructure)


Occurences of UnmodifiableClassException (constructors)

UnmodifiableClassException (constructors) occurences:
java.lang.instrument.UnmodifiableClassException()
java.lang.instrument.UnmodifiableClassException(java.lang.String)


Occurences of UnmodifiableSetException (constructors)

UnmodifiableSetException (constructors) occurences:
javax.print.attribute.UnmodifiableSetException()
javax.print.attribute.UnmodifiableSetException(java.lang.String)


Occurences of unmodifiableView

unmodifiableView occurences:
javax.print.attribute.AttributeSetUtilities.unmodifiableView(javax.print.attribute.AttributeSet)
javax.print.attribute.AttributeSetUtilities.unmodifiableView(javax.print.attribute.DocAttributeSet)
javax.print.attribute.AttributeSetUtilities.unmodifiableView(javax.print.attribute.PrintJobAttributeSet)
javax.print.attribute.AttributeSetUtilities.unmodifiableView(javax.print.attribute.PrintRequestAttributeSet)
javax.print.attribute.AttributeSetUtilities.unmodifiableView(javax.print.attribute.PrintServiceAttributeSet)


Occurences of UNNECESSARY

UNNECESSARY occurences:
java.awt.UNNECESSARY
java.math.UNNECESSARY


Occurences of unpack

unpack occurences:
java.util.jar.Pack200.Unpacker.unpack(java.io.File, java.util.jar.JarOutputStream)
java.util.jar.Pack200.Unpacker.unpack(java.io.InputStream, java.util.jar.JarOutputStream)


Occurences of unpack200

unpack200 occurences:
unpack200
unpack200


Occurences of unparsedEntityDecl

unparsedEntityDecl occurences:
org.xml.sax.DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.HandlerBase.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.DefaultHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
org.xml.sax.helpers.XMLFilterImpl.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of unread

unread occurences:
java.io.PushbackInputStream.unread(byte:A)
java.io.PushbackInputStream.unread(byte:A, int, int)
java.io.PushbackInputStream.unread(int)
java.io.PushbackReader.unread(char:A)
java.io.PushbackReader.unread(char:A, int, int)
java.io.PushbackReader.unread(int)


Occurences of UnrecoverableEntryException (constructors)

UnrecoverableEntryException (constructors) occurences:
java.security.UnrecoverableEntryException()
java.security.UnrecoverableEntryException(java.lang.String)


Occurences of UnrecoverableKeyException (constructors)

UnrecoverableKeyException (constructors) occurences:
java.security.UnrecoverableKeyException()
java.security.UnrecoverableKeyException(java.lang.String)


Occurences of unreferenced

unreferenced occurences:
java.rmi.server.Unreferenced.unreferenced()
javax.management.remote.rmi.RMIConnectionImpl.unreferenced()


Occurences of unregisterListeners

unregisterListeners occurences:
java.awt.dnd.DragGestureRecognizer.unregisterListeners()
java.awt.dnd.MouseDragGestureRecognizer.unregisterListeners()


Occurences of unregisterMBean

unregisterMBean occurences:
javax.management.MBeanServer.unregisterMBean(javax.management.ObjectName)
javax.management.MBeanServerConnection.unregisterMBean(javax.management.ObjectName)
javax.management.remote.rmi.RMIConnection.unregisterMBean(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl.unregisterMBean(javax.management.ObjectName, javax.security.auth.Subject)
javax.management.remote.rmi.RMIConnectionImpl_Stub.unregisterMBean(javax.management.ObjectName, javax.security.auth.Subject)


Occurences of UnsatisfiedLinkError (constructors)

UnsatisfiedLinkError (constructors) occurences:
java.lang.UnsatisfiedLinkError()
java.lang.UnsatisfiedLinkError(java.lang.String)


Occurences of UNSET

UNSET occurences:
javax.swing.UNSET
javax.xml.bind.annotation.UNSET


Occurences of unsetCompression

unsetCompression occurences:
javax.imageio.ImageWriteParam.unsetCompression()
javax.imageio.plugins.jpeg.JPEGImageWriteParam.unsetCompression()


Occurences of unsetMatchColumn

unsetMatchColumn occurences:
javax.sql.rowset.Joinable.unsetMatchColumn(int)
javax.sql.rowset.Joinable.unsetMatchColumn(int:A)
javax.sql.rowset.Joinable.unsetMatchColumn(java.lang.String)
javax.sql.rowset.Joinable.unsetMatchColumn(java.lang.String:A)


Occurences of unsetOrdering

unsetOrdering occurences:
javax.imageio.spi.ServiceRegistry.unsetOrdering(java.lang.Class, java.lang.Object, java.lang.Object)
javax.imageio.spi.ServiceRegistry.unsetOrdering(java.lang.Class, T, T)


Occurences of UNSPECIFIED

UNSPECIFIED occurences:
java.security.cert.UNSPECIFIED
java.security.cert.UNSPECIFIED


Occurences of UnsupportedAudioFileException (constructors)

UnsupportedAudioFileException (constructors) occurences:
javax.sound.sampled.UnsupportedAudioFileException()
javax.sound.sampled.UnsupportedAudioFileException(java.lang.String)


Occurences of UnsupportedCallbackException (constructors)

UnsupportedCallbackException (constructors) occurences:
javax.security.auth.callback.UnsupportedCallbackException(javax.security.auth.callback.Callback)
javax.security.auth.callback.UnsupportedCallbackException(javax.security.auth.callback.Callback, java.lang.String)


Occurences of UnsupportedClassVersionError (constructors)

UnsupportedClassVersionError (constructors) occurences:
java.lang.UnsupportedClassVersionError()
java.lang.UnsupportedClassVersionError(java.lang.String)


Occurences of UnsupportedDataTypeException (constructors)

UnsupportedDataTypeException (constructors) occurences:
javax.activation.UnsupportedDataTypeException()
javax.activation.UnsupportedDataTypeException(java.lang.String)


Occurences of UnsupportedEncodingException (constructors)

UnsupportedEncodingException (constructors) occurences:
java.io.UnsupportedEncodingException()
java.io.UnsupportedEncodingException(java.lang.String)


Occurences of UnsupportedOperationException (constructors)

UnsupportedOperationException (constructors) occurences:
java.lang.UnsupportedOperationException()
java.lang.UnsupportedOperationException(java.lang.String)
java.lang.UnsupportedOperationException(java.lang.String, java.lang.Throwable)
java.lang.UnsupportedOperationException(java.lang.Throwable)


Occurences of UnsupportedTemporalTypeException (constructors)

UnsupportedTemporalTypeException (constructors) occurences:
java.time.temporal.UnsupportedTemporalTypeException(java.lang.String)
java.time.temporal.UnsupportedTemporalTypeException(java.lang.String, java.lang.Throwable)


Occurences of until

until occurences:
java.time.chrono.ChronoLocalDate.until(java.time.chrono.ChronoLocalDate)
java.time.chrono.ChronoLocalDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.chrono.HijrahDate.until(java.time.chrono.ChronoLocalDate)
java.time.chrono.HijrahDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.chrono.JapaneseDate.until(java.time.chrono.ChronoLocalDate)
java.time.chrono.JapaneseDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.chrono.MinguoDate.until(java.time.chrono.ChronoLocalDate)
java.time.chrono.MinguoDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.chrono.ThaiBuddhistDate.until(java.time.chrono.ChronoLocalDate)
java.time.chrono.ThaiBuddhistDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.Instant.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.LocalDate.until(java.time.chrono.ChronoLocalDate)
java.time.LocalDate.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.LocalDateTime.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.LocalTime.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.OffsetDateTime.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.OffsetTime.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.temporal.Temporal.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.Year.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.YearMonth.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)
java.time.ZonedDateTime.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)


Occurences of unwrap

unwrap occurences:
java.lang.invoke.MethodType.unwrap()
java.sql.Wrapper.unwrap(java.lang.Class)
javax.crypto.Cipher.unwrap(byte:A, java.lang.String, int)
javax.net.ssl.SSLEngine.unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.net.ssl.SSLEngine.unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer:A)
javax.net.ssl.SSLEngine.unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer:A, int, int)
javax.security.sasl.SaslClient.unwrap(byte:A, int, int)
javax.security.sasl.SaslServer.unwrap(byte:A, int, int)
javax.sql.rowset.RowSetMetaDataImpl.unwrap(java.lang.Class)
org.ietf.jgss.GSSContext.unwrap(byte:A, int, int, org.ietf.jgss.MessageProp)
org.ietf.jgss.GSSContext.unwrap(java.io.InputStream, java.io.OutputStream, org.ietf.jgss.MessageProp)


Occurences of UP

UP occurences:
java.awt.UP
java.math.UP


Occurences of update

update occurences:
java.awt.Canvas.update(java.awt.Graphics)
java.awt.Component.update(java.awt.Graphics)
java.awt.Container.update(java.awt.Graphics)
java.awt.SplashScreen.update()
java.security.MessageDigest.update(byte)
java.security.MessageDigest.update(byte:A)
java.security.MessageDigest.update(byte:A, int, int)
java.security.MessageDigest.update(java.nio.ByteBuffer)
java.security.Signature.update(byte)
java.security.Signature.update(byte:A)
java.security.Signature.update(byte:A, int, int)
java.security.Signature.update(java.nio.ByteBuffer)
java.util.Observer.update(java.util.Observable, java.lang.Object)
java.util.zip.Adler32.update(byte:A)
java.util.zip.Adler32.update(byte:A, int, int)
java.util.zip.Adler32.update(int)
java.util.zip.Adler32.update(java.nio.ByteBuffer)
java.util.zip.Checksum.update(byte:A, int, int)
java.util.zip.Checksum.update(int)
java.util.zip.CRC32.update(byte:A)
java.util.zip.CRC32.update(byte:A, int, int)
java.util.zip.CRC32.update(int)
java.util.zip.CRC32.update(java.nio.ByteBuffer)
javax.crypto.Cipher.update(byte:A)
javax.crypto.Cipher.update(byte:A, int, int)
javax.crypto.Cipher.update(byte:A, int, int, byte:A)
javax.crypto.Cipher.update(byte:A, int, int, byte:A, int)
javax.crypto.Cipher.update(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.crypto.Mac.update(byte)
javax.crypto.Mac.update(byte:A)
javax.crypto.Mac.update(byte:A, int, int)
javax.crypto.Mac.update(java.nio.ByteBuffer)
javax.sound.sampled.LineListener.update(javax.sound.sampled.LineEvent)
javax.swing.CellRendererPane.update(java.awt.Graphics)
javax.swing.JApplet.update(java.awt.Graphics)
javax.swing.JComponent.update(java.awt.Graphics)
javax.swing.JDialog.update(java.awt.Graphics)
javax.swing.JFrame.update(java.awt.Graphics)
javax.swing.JWindow.update(java.awt.Graphics)
javax.swing.plaf.basic.BasicMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.basic.BasicTextUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalButtonUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalMenuBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalTabbedPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalToggleButtonUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.metal.MetalToolBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiButtonUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiColorChooserUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiComboBoxUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopIconUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiDesktopPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiFileChooserUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiInternalFrameUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiLabelUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiListUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiOptionPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiPanelUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiPopupMenuUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiProgressBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiRootPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiScrollPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSeparatorUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSliderUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSpinnerUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiSplitPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTabbedPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableHeaderUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTableUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTextUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiToolTipUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiTreeUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.multi.MultiViewportUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthButtonUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthColorChooserUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthComboBoxUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopIconUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthDesktopPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthEditorPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthInternalFrameUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthLabelUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthListUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthMenuUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthOptionPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthPanelUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthPopupMenuUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthProgressBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthRootPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthScrollPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSeparatorUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSliderUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSpinnerUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthSplitPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTabbedPaneUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableHeaderUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTableUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextAreaUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTextFieldUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolBarUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthToolTipUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthTreeUI.update(java.awt.Graphics, javax.swing.JComponent)
javax.swing.plaf.synth.SynthViewportUI.update(java.awt.Graphics, javax.swing.JComponent)


Occurences of UPDATE

UPDATE occurences:
java.awt.event.UPDATE
javax.accessibility.UPDATE
javax.swing.event.UPDATE


Occurences of updateAAD

updateAAD occurences:
javax.crypto.Cipher.updateAAD(byte:A)
javax.crypto.Cipher.updateAAD(byte:A, int, int)
javax.crypto.Cipher.updateAAD(java.nio.ByteBuffer)


Occurences of updateAndGet

updateAndGet occurences:
java.util.concurrent.atomic.AtomicInteger.updateAndGet(java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerArray.updateAndGet(int, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.updateAndGet(java.lang.Object, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.updateAndGet(T, java.util.function.IntUnaryOperator)
java.util.concurrent.atomic.AtomicLong.updateAndGet(java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongArray.updateAndGet(int, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.updateAndGet(java.lang.Object, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicLongFieldUpdater.updateAndGet(T, java.util.function.LongUnaryOperator)
java.util.concurrent.atomic.AtomicReference.updateAndGet(java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceArray.updateAndGet(int, java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.updateAndGet(java.lang.Object, java.util.function.UnaryOperator)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.updateAndGet(T, java.util.function.UnaryOperator)


Occurences of updateArray

updateArray occurences:
java.sql.ResultSet.updateArray(int, java.sql.Array)
java.sql.ResultSet.updateArray(java.lang.String, java.sql.Array)


Occurences of updateAsciiStream

updateAsciiStream occurences:
java.sql.ResultSet.updateAsciiStream(int, java.io.InputStream)
java.sql.ResultSet.updateAsciiStream(int, java.io.InputStream, int)
java.sql.ResultSet.updateAsciiStream(int, java.io.InputStream, long)
java.sql.ResultSet.updateAsciiStream(java.lang.String, java.io.InputStream)
java.sql.ResultSet.updateAsciiStream(java.lang.String, java.io.InputStream, int)
java.sql.ResultSet.updateAsciiStream(java.lang.String, java.io.InputStream, long)


Occurences of updateBigDecimal

updateBigDecimal occurences:
java.sql.ResultSet.updateBigDecimal(int, java.math.BigDecimal)
java.sql.ResultSet.updateBigDecimal(java.lang.String, java.math.BigDecimal)


Occurences of updateBinaryStream

updateBinaryStream occurences:
java.sql.ResultSet.updateBinaryStream(int, java.io.InputStream)
java.sql.ResultSet.updateBinaryStream(int, java.io.InputStream, int)
java.sql.ResultSet.updateBinaryStream(int, java.io.InputStream, long)
java.sql.ResultSet.updateBinaryStream(java.lang.String, java.io.InputStream)
java.sql.ResultSet.updateBinaryStream(java.lang.String, java.io.InputStream, int)
java.sql.ResultSet.updateBinaryStream(java.lang.String, java.io.InputStream, long)


Occurences of updateBlob

updateBlob occurences:
java.sql.ResultSet.updateBlob(int, java.io.InputStream)
java.sql.ResultSet.updateBlob(int, java.io.InputStream, long)
java.sql.ResultSet.updateBlob(int, java.sql.Blob)
java.sql.ResultSet.updateBlob(java.lang.String, java.io.InputStream)
java.sql.ResultSet.updateBlob(java.lang.String, java.io.InputStream, long)
java.sql.ResultSet.updateBlob(java.lang.String, java.sql.Blob)


Occurences of updateBoolean

updateBoolean occurences:
java.sql.ResultSet.updateBoolean(int, boolean)
java.sql.ResultSet.updateBoolean(java.lang.String, boolean)


Occurences of updateByte

updateByte occurences:
java.sql.ResultSet.updateByte(int, byte)
java.sql.ResultSet.updateByte(java.lang.String, byte)


Occurences of updateBytes

updateBytes occurences:
java.sql.ResultSet.updateBytes(int, byte:A)
java.sql.ResultSet.updateBytes(java.lang.String, byte:A)


Occurences of updateCharacterStream

updateCharacterStream occurences:
java.sql.ResultSet.updateCharacterStream(int, java.io.Reader)
java.sql.ResultSet.updateCharacterStream(int, java.io.Reader, int)
java.sql.ResultSet.updateCharacterStream(int, java.io.Reader, long)
java.sql.ResultSet.updateCharacterStream(java.lang.String, java.io.Reader)
java.sql.ResultSet.updateCharacterStream(java.lang.String, java.io.Reader, int)
java.sql.ResultSet.updateCharacterStream(java.lang.String, java.io.Reader, long)


Occurences of updateChildren

updateChildren occurences:
javax.swing.text.View.updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory)
javax.swing.text.ZoneView.updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory)


Occurences of updateClob

updateClob occurences:
java.sql.ResultSet.updateClob(int, java.io.Reader)
java.sql.ResultSet.updateClob(int, java.io.Reader, long)
java.sql.ResultSet.updateClob(int, java.sql.Clob)
java.sql.ResultSet.updateClob(java.lang.String, java.io.Reader)
java.sql.ResultSet.updateClob(java.lang.String, java.io.Reader, long)
java.sql.ResultSet.updateClob(java.lang.String, java.sql.Clob)


Occurences of updateDate

updateDate occurences:
java.sql.ResultSet.updateDate(int, java.sql.Date)
java.sql.ResultSet.updateDate(java.lang.String, java.sql.Date)


Occurences of updateDouble

updateDouble occurences:
java.sql.ResultSet.updateDouble(int, double)
java.sql.ResultSet.updateDouble(java.lang.String, double)


Occurences of updateFloat

updateFloat occurences:
java.sql.ResultSet.updateFloat(int, float)
java.sql.ResultSet.updateFloat(java.lang.String, float)


Occurences of updateInt

updateInt occurences:
java.sql.ResultSet.updateInt(int, int)
java.sql.ResultSet.updateInt(java.lang.String, int)


Occurences of updateJAXB

updateJAXB occurences:
javax.xml.bind.Binder.updateJAXB(java.lang.Object)
javax.xml.bind.Binder.updateJAXB(XmlNode)


Occurences of updateLayout

updateLayout occurences:
javax.swing.text.AsyncBoxView.updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)
javax.swing.text.View.updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)


Occurences of updateLong

updateLong occurences:
java.sql.ResultSet.updateLong(int, long)
java.sql.ResultSet.updateLong(java.lang.String, long)


Occurences of updateNCharacterStream

updateNCharacterStream occurences:
java.sql.ResultSet.updateNCharacterStream(int, java.io.Reader)
java.sql.ResultSet.updateNCharacterStream(int, java.io.Reader, long)
java.sql.ResultSet.updateNCharacterStream(java.lang.String, java.io.Reader)
java.sql.ResultSet.updateNCharacterStream(java.lang.String, java.io.Reader, long)


Occurences of updateNClob

updateNClob occurences:
java.sql.ResultSet.updateNClob(int, java.io.Reader)
java.sql.ResultSet.updateNClob(int, java.io.Reader, long)
java.sql.ResultSet.updateNClob(int, java.sql.NClob)
java.sql.ResultSet.updateNClob(java.lang.String, java.io.Reader)
java.sql.ResultSet.updateNClob(java.lang.String, java.io.Reader, long)
java.sql.ResultSet.updateNClob(java.lang.String, java.sql.NClob)


Occurences of updateNString

updateNString occurences:
java.sql.ResultSet.updateNString(int, java.lang.String)
java.sql.ResultSet.updateNString(java.lang.String, java.lang.String)


Occurences of updateNull

updateNull occurences:
java.sql.ResultSet.updateNull(int)
java.sql.ResultSet.updateNull(java.lang.String)


Occurences of updateObject

updateObject occurences:
java.sql.ResultSet.updateObject(int, java.lang.Object)
java.sql.ResultSet.updateObject(int, java.lang.Object, int)
java.sql.ResultSet.updateObject(int, java.lang.Object, java.sql.SQLType)
java.sql.ResultSet.updateObject(int, java.lang.Object, java.sql.SQLType, int)
java.sql.ResultSet.updateObject(java.lang.String, java.lang.Object)
java.sql.ResultSet.updateObject(java.lang.String, java.lang.Object, int)
java.sql.ResultSet.updateObject(java.lang.String, java.lang.Object, java.sql.SQLType)
java.sql.ResultSet.updateObject(java.lang.String, java.lang.Object, java.sql.SQLType, int)


Occurences of updateRef

updateRef occurences:
java.sql.ResultSet.updateRef(int, java.sql.Ref)
java.sql.ResultSet.updateRef(java.lang.String, java.sql.Ref)


Occurences of updateRenderer

updateRenderer occurences:
javax.swing.plaf.basic.BasicHTML.updateRenderer(javax.swing.JComponent, java.lang.String)
javax.swing.plaf.basic.BasicTreeUI.updateRenderer()


Occurences of updateRoleMap

updateRoleMap occurences:
javax.management.relation.RelationService.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List)
javax.management.relation.RelationServiceMBean.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List)


Occurences of updateRowId

updateRowId occurences:
java.sql.ResultSet.updateRowId(int, java.sql.RowId)
java.sql.ResultSet.updateRowId(java.lang.String, java.sql.RowId)


Occurences of updateShort

updateShort occurences:
java.sql.ResultSet.updateShort(int, short)
java.sql.ResultSet.updateShort(java.lang.String, short)


Occurences of updateSQLXML

updateSQLXML occurences:
java.sql.ResultSet.updateSQLXML(int, java.sql.SQLXML)
java.sql.ResultSet.updateSQLXML(java.lang.String, java.sql.SQLXML)


Occurences of updateString

updateString occurences:
java.sql.ResultSet.updateString(int, java.lang.String)
java.sql.ResultSet.updateString(java.lang.String, java.lang.String)


Occurences of updateTime

updateTime occurences:
java.sql.ResultSet.updateTime(int, java.sql.Time)
java.sql.ResultSet.updateTime(java.lang.String, java.sql.Time)


Occurences of updateTimestamp

updateTimestamp occurences:
java.sql.ResultSet.updateTimestamp(int, java.sql.Timestamp)
java.sql.ResultSet.updateTimestamp(java.lang.String, java.sql.Timestamp)


Occurences of updateUI

updateUI occurences:
javax.swing.AbstractButton.updateUI()
javax.swing.JButton.updateUI()
javax.swing.JCheckBox.updateUI()
javax.swing.JColorChooser.updateUI()
javax.swing.JComboBox.updateUI()
javax.swing.JComponent.updateUI()
javax.swing.JDesktopPane.updateUI()
javax.swing.JFileChooser.updateUI()
javax.swing.JInternalFrame.updateUI()
javax.swing.JInternalFrame.JDesktopIcon.updateUI()
javax.swing.JLabel.updateUI()
javax.swing.JLayer.updateUI()
javax.swing.JList.updateUI()
javax.swing.JMenu.updateUI()
javax.swing.JMenuBar.updateUI()
javax.swing.JMenuItem.updateUI()
javax.swing.JOptionPane.updateUI()
javax.swing.JPanel.updateUI()
javax.swing.JPasswordField.updateUI()
javax.swing.JPopupMenu.updateUI()
javax.swing.JProgressBar.updateUI()
javax.swing.JRadioButton.updateUI()
javax.swing.JRootPane.updateUI()
javax.swing.JScrollBar.updateUI()
javax.swing.JScrollPane.updateUI()
javax.swing.JSeparator.updateUI()
javax.swing.JSlider.updateUI()
javax.swing.JSpinner.updateUI()
javax.swing.JSplitPane.updateUI()
javax.swing.JTabbedPane.updateUI()
javax.swing.JTable.updateUI()
javax.swing.JToggleButton.updateUI()
javax.swing.JToolBar.updateUI()
javax.swing.JToolTip.updateUI()
javax.swing.JTree.updateUI()
javax.swing.JViewport.updateUI()
javax.swing.plaf.LayerUI.updateUI(javax.swing.JLayer)
javax.swing.table.DefaultTableCellRenderer.updateUI()
javax.swing.table.JTableHeader.updateUI()
javax.swing.text.JTextComponent.updateUI()
javax.swing.tree.DefaultTreeCellRenderer.updateUI()


Occurences of updateUndoPositions

updateUndoPositions occurences:
javax.swing.text.GapContent.updateUndoPositions(java.util.Vector, int, int)
javax.swing.text.StringContent.updateUndoPositions(java.util.Vector)


Occurences of updateXML

updateXML occurences:
javax.xml.bind.Binder.updateXML(java.lang.Object)
javax.xml.bind.Binder.updateXML(java.lang.Object, java.lang.Object)
javax.xml.bind.Binder.updateXML(java.lang.Object, XmlNode)


Occurences of upFocusCycle

upFocusCycle occurences:
java.awt.DefaultKeyboardFocusManager.upFocusCycle(java.awt.Component)
java.awt.KeyboardFocusManager.upFocusCycle()
java.awt.KeyboardFocusManager.upFocusCycle(java.awt.Component)


Occurences of upKey

upKey occurences:
javax.swing.plaf.basic.upKey
javax.swing.plaf.basic.upKey
javax.swing.plaf.basic.upKey


Occurences of upperLeft

upperLeft occurences:
javax.swing.upperLeft
javax.swing.upperLeft


Occurences of upperRight

upperRight occurences:
javax.swing.upperRight
javax.swing.upperRight


Occurences of URI (constructors)

URI (constructors) occurences:
java.net.URI(java.lang.String)
java.net.URI(java.lang.String, java.lang.String, java.lang.String)
java.net.URI(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)
java.net.URI(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
java.net.URI(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of URIReferenceException (constructors)

URIReferenceException (constructors) occurences:
javax.xml.crypto.URIReferenceException()
javax.xml.crypto.URIReferenceException(java.lang.String)
javax.xml.crypto.URIReferenceException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.URIReferenceException(java.lang.String, java.lang.Throwable, javax.xml.crypto.URIReference)
javax.xml.crypto.URIReferenceException(java.lang.Throwable)


Occurences of URISyntaxException (constructors)

URISyntaxException (constructors) occurences:
java.net.URISyntaxException(java.lang.String, java.lang.String)
java.net.URISyntaxException(java.lang.String, java.lang.String, int)


Occurences of URL

URL occurences:
java.net.URL
javax.print.DocFlavor.URL.URL(java.lang.String)


Occurences of url

url occurences:
java.net.url
java.util.url


Occurences of URL (constructors)

URL (constructors) occurences:
java.net.URL(java.lang.String)
java.net.URL(java.lang.String, java.lang.String, int, java.lang.String)
java.net.URL(java.lang.String, java.lang.String, int, java.lang.String, java.net.URLStreamHandler)
java.net.URL(java.lang.String, java.lang.String, java.lang.String)
java.net.URL(java.net.URL, java.lang.String)
java.net.URL(java.net.URL, java.lang.String, java.net.URLStreamHandler)


Occurences of URLClassLoader (constructors)

URLClassLoader (constructors) occurences:
java.net.URLClassLoader(java.net.URL:A)
java.net.URLClassLoader(java.net.URL:A, java.lang.ClassLoader)
java.net.URLClassLoader(java.net.URL:A, java.lang.ClassLoader, java.net.URLStreamHandlerFactory)


Occurences of URLPermission (constructors)

URLPermission (constructors) occurences:
java.net.URLPermission(java.lang.String)
java.net.URLPermission(java.lang.String, java.lang.String)


Occurences of useDaylightTime

useDaylightTime occurences:
java.util.SimpleTimeZone.useDaylightTime()
java.util.TimeZone.useDaylightTime()


Occurences of useDelimiter

useDelimiter occurences:
java.util.Scanner.useDelimiter(java.lang.String)
java.util.Scanner.useDelimiter(java.util.regex.Pattern)


Occurences of User Authentication and Authorization in the Java(TM) Platform

User Authentication and Authorization in the Java(TM) Platform occurences:
User Authentication and Authorization in the Java(TM) Platform
User Authentication and Authorization in the Java(TM) Platform


Occurences of UserException (constructors)

UserException (constructors) occurences:
org.omg.CORBA.UserException()
org.omg.CORBA.UserException(java.lang.String)


Occurences of userRoot

userRoot occurences:
java.util.prefs.Preferences.userRoot()
java.util.prefs.PreferencesFactory.userRoot()


Occurences of useToString

useToString occurences:
javax.swing.DefaultRowSorter.useToString(int)
javax.swing.table.TableRowSorter.useToString(int)


Occurences of UShortSeqHolder (constructors)

UShortSeqHolder (constructors) occurences:
org.omg.CORBA.UShortSeqHolder()
org.omg.CORBA.UShortSeqHolder(short:A)


Occurences of Using Externalization and Evolution

Using Externalization and Evolution occurences:
Using Externalization and Evolution
Using Externalization and Evolution
Using Externalization and Evolution


Occurences of Using Serialization and the Serializable Fields API

Using Serialization and the Serializable Fields API occurences:
Using Serialization and the Serializable Fields API
Using Serialization and the Serializable Fields API
Using Serialization and the Serializable Fields API


Occurences of Using Serialization with a Custom Data Format

Using Serialization with a Custom Data Format occurences:
Using Serialization with a Custom Data Format
Using Serialization with a Custom Data Format
Using Serialization with a Custom Data Format


Occurences of Using Serialization with a NonSerializable Superclass

Using Serialization with a NonSerializable Superclass occurences:
Using Serialization with a NonSerializable Superclass
Using Serialization with a NonSerializable Superclass
Using Serialization with a NonSerializable Superclass


Occurences of Using Serialization with Evolution

Using Serialization with Evolution occurences:
Using Serialization with Evolution
Using Serialization with Evolution
Using Serialization with Evolution


Occurences of Using Serialization with Sockets

Using Serialization with Sockets occurences:
Using Serialization with Sockets
Using Serialization with Sockets
Using Serialization with Sockets


Occurences of UTC

UTC occurences:
java.time.UTC
java.time.zone.UTC
java.util.Date.UTC(int, int, int, int, int, int)


Occurences of UTFDataFormatException (constructors)

UTFDataFormatException (constructors) occurences:
java.io.UTFDataFormatException()
java.io.UTFDataFormatException(java.lang.String)


Occurences of util

util occurences:
com.sun.source.util
compact1.java.util
compact2.java.util
compact2.javax.xml.stream.util
compact3.java.util
compact3.javax.lang.model.util
compact3.javax.xml.stream.util
java.util
javax.lang.model.util
javax.xml.bind.util
javax.xml.stream.util


Occurences of VAI

VAI occurences:
java.awt.font.VAI
java.lang.VAI
java.lang.VAI


Occurences of validate

validate occurences:
java.awt.Component.validate()
java.awt.Container.validate()
java.awt.image.VolatileImage.validate(java.awt.GraphicsConfiguration)
java.security.cert.CertPathValidator.validate(java.security.cert.CertPath, java.security.cert.CertPathParameters)
java.util.concurrent.locks.StampedLock.validate(long)
javax.swing.DefaultListCellRenderer.validate()
javax.swing.table.DefaultTableCellRenderer.validate()
javax.swing.tree.DefaultTreeCellRenderer.validate()
javax.xml.bind.Validator.validate(java.lang.Object)
javax.xml.crypto.dsig.Reference.validate(javax.xml.crypto.dsig.XMLValidateContext)
javax.xml.crypto.dsig.XMLSignature.validate(javax.xml.crypto.dsig.XMLValidateContext)
javax.xml.crypto.dsig.XMLSignature.SignatureValue.validate(javax.xml.crypto.dsig.XMLValidateContext)
javax.xml.validation.Validator.validate(javax.xml.transform.Source)
javax.xml.validation.Validator.validate(javax.xml.transform.Source, javax.xml.transform.Result)


Occurences of validatedContents

validatedContents occurences:
java.awt.validatedContents
java.awt.validatedContents


Occurences of validation

validation occurences:
compact2.javax.xml.validation
compact3.javax.xml.validation
javax.xml.validation


Occurences of ValidationEventImpl (constructors)

ValidationEventImpl (constructors) occurences:
javax.xml.bind.helpers.ValidationEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator)
javax.xml.bind.helpers.ValidationEventImpl(int, java.lang.String, javax.xml.bind.ValidationEventLocator, java.lang.Throwable)


Occurences of ValidationEventLocatorImpl (constructors)

ValidationEventLocatorImpl (constructors) occurences:
javax.xml.bind.helpers.ValidationEventLocatorImpl()
javax.xml.bind.helpers.ValidationEventLocatorImpl(java.lang.Object)
javax.xml.bind.helpers.ValidationEventLocatorImpl(org.w3c.dom.Node)
javax.xml.bind.helpers.ValidationEventLocatorImpl(org.xml.sax.Locator)
javax.xml.bind.helpers.ValidationEventLocatorImpl(org.xml.sax.SAXParseException)


Occurences of ValidationException (constructors)

ValidationException (constructors) occurences:
javax.xml.bind.ValidationException(java.lang.String)
javax.xml.bind.ValidationException(java.lang.String, java.lang.String)
javax.xml.bind.ValidationException(java.lang.String, java.lang.String, java.lang.Throwable)
javax.xml.bind.ValidationException(java.lang.String, java.lang.Throwable)
javax.xml.bind.ValidationException(java.lang.Throwable)


Occurences of Validator

Validator occurences:
javax.xml.bind.Validator
javax.xml.validation.Validator


Occurences of validOps

validOps occurences:
java.nio.channels.DatagramChannel.validOps()
java.nio.channels.Pipe.SinkChannel.validOps()
java.nio.channels.Pipe.SourceChannel.validOps()
java.nio.channels.SelectableChannel.validOps()
java.nio.channels.ServerSocketChannel.validOps()
java.nio.channels.SocketChannel.validOps()


Occurences of VALUE

VALUE occurences:
com.sun.source.doctree.VALUE
javax.swing.text.html.VALUE


Occurences of value

value occurences:
com.sun.javadoc.AnnotationDesc.ElementValuePair.value()
com.sun.javadoc.AnnotationValue.value()
com.sun.jdi.BooleanValue.value()
com.sun.jdi.ByteValue.value()
com.sun.jdi.CharValue.value()
com.sun.jdi.connect.Connector.Argument.value()
com.sun.jdi.DoubleValue.value()
com.sun.jdi.FloatValue.value()
com.sun.jdi.IntegerValue.value()
com.sun.jdi.LongValue.value()
com.sun.jdi.ShortValue.value()
com.sun.jdi.StringReference.value()
java.beans.ConstructorProperties.value()
java.beans.Transient.value()
java.lang.annotation.Repeatable.value()
java.lang.annotation.Retention.value()
java.lang.annotation.Target.value()
java.lang.SuppressWarnings.value()
java.nio.file.attribute.FileAttribute.value()
java.sql.value
javax.annotation.Generated.value()
javax.annotation.processing.SupportedAnnotationTypes.value()
javax.annotation.processing.SupportedOptions.value()
javax.annotation.processing.SupportedSourceVersion.value()
javax.annotation.Resources.value()
javax.jws.soap.InitParam.value()
javax.jws.soap.SOAPMessageHandlers.value()
javax.management.DescriptorKey.value()
javax.management.MXBean.value()
javax.management.Query.value(boolean)
javax.management.Query.value(double)
javax.management.Query.value(float)
javax.management.Query.value(int)
javax.management.Query.value(java.lang.Number)
javax.management.Query.value(java.lang.String)
javax.management.Query.value(long)
javax.naming.ldap.value
javax.swing.text.html.parser.value
javax.swing.value
javax.swing.value
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.value()
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters.value()
javax.xml.bind.annotation.XmlAccessorOrder.value()
javax.xml.bind.annotation.XmlAccessorType.value()
javax.xml.bind.annotation.XmlAnyElement.value()
javax.xml.bind.annotation.XmlElementRefs.value()
javax.xml.bind.annotation.XmlElements.value()
javax.xml.bind.annotation.XmlEnum.value()
javax.xml.bind.annotation.XmlEnumValue.value()
javax.xml.bind.annotation.XmlMimeType.value()
javax.xml.bind.annotation.XmlSchemaTypes.value()
javax.xml.bind.annotation.XmlSeeAlso.value()
javax.xml.bind.value
javax.xml.ws.BindingType.value()
javax.xml.ws.FaultAction.value()
javax.xml.ws.ServiceMode.value()
javax.xml.ws.value
javax.xml.ws.WebServiceRef.value()
javax.xml.ws.WebServiceRefs.value()
org.omg.CORBA.CompletionStatus.value()
org.omg.CORBA.DefinitionKind.value()
org.omg.CORBA.NamedValue.value()
org.omg.CORBA.ParameterMode.value()
org.omg.CORBA.SetOverrideType.value()
org.omg.CORBA.TCKind.value()
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CORBA.value
org.omg.CosNaming.BindingType.value()
org.omg.CosNaming.NamingContextExtPackage.value
org.omg.CosNaming.NamingContextPackage.NotFoundReason.value()
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.NamingContextPackage.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.CosNaming.value
org.omg.DynamicAny.value
org.omg.DynamicAny.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.IOP.value
org.omg.Messaging.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableInterceptor.value
org.omg.PortableServer.IdAssignmentPolicyOperations.value()
org.omg.PortableServer.IdAssignmentPolicyValue.value()
org.omg.PortableServer.IdUniquenessPolicyOperations.value()
org.omg.PortableServer.IdUniquenessPolicyValue.value()
org.omg.PortableServer.ImplicitActivationPolicyOperations.value()
org.omg.PortableServer.ImplicitActivationPolicyValue.value()
org.omg.PortableServer.LifespanPolicyOperations.value()
org.omg.PortableServer.LifespanPolicyValue.value()
org.omg.PortableServer.POAManagerPackage.State.value()
org.omg.PortableServer.RequestProcessingPolicyOperations.value()
org.omg.PortableServer.RequestProcessingPolicyValue.value()
org.omg.PortableServer.ServantLocatorPackage.value
org.omg.PortableServer.ServantRetentionPolicyOperations.value()
org.omg.PortableServer.ServantRetentionPolicyValue.value()
org.omg.PortableServer.ThreadPolicyOperations.value()
org.omg.PortableServer.ThreadPolicyValue.value()
org.omg.PortableServer.value
org.omg.PortableServer.value
org.omg.PortableServer.value
org.omg.PortableServer.value
org.omg.PortableServer.value
org.omg.PortableServer.value
org.omg.PortableServer.value


Occurences of ValueBaseHolder (constructors)

ValueBaseHolder (constructors) occurences:
org.omg.CORBA.ValueBaseHolder()
org.omg.CORBA.ValueBaseHolder(java.io.Serializable)


Occurences of valueChanged

valueChanged occurences:
javax.swing.event.ListSelectionListener.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.event.TreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)
javax.swing.JList.AccessibleJList.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.JTable.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.JTable.AccessibleJTable.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.JTree.AccessibleJTree.valueChanged(javax.swing.event.TreeSelectionEvent)
javax.swing.JTree.TreeSelectionRedirector.valueChanged(javax.swing.event.TreeSelectionEvent)
javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.plaf.basic.BasicListUI.ListSelectionHandler.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler.valueChanged(javax.swing.event.TreeSelectionEvent)
javax.swing.plaf.metal.MetalFileChooserUI.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.table.DefaultTableColumnModel.valueChanged(javax.swing.event.ListSelectionEvent)
javax.swing.tree.DefaultTreeCellEditor.valueChanged(javax.swing.event.TreeSelectionEvent)


Occurences of valueForPathChanged

valueForPathChanged occurences:
javax.swing.tree.DefaultTreeModel.valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)
javax.swing.tree.TreeModel.valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)


Occurences of valueForXPosition

valueForXPosition occurences:
javax.swing.plaf.basic.BasicSliderUI.valueForXPosition(int)
javax.swing.plaf.synth.SynthSliderUI.valueForXPosition(int)


Occurences of valueForYPosition

valueForYPosition occurences:
javax.swing.plaf.basic.BasicSliderUI.valueForYPosition(int)
javax.swing.plaf.synth.SynthSliderUI.valueForYPosition(int)


Occurences of ValueMember (constructors)

ValueMember (constructors) occurences:
org.omg.CORBA.ValueMember()
org.omg.CORBA.ValueMember(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.omg.CORBA.TypeCode, org.omg.CORBA.IDLType, short)


Occurences of valueOf

valueOf occurences:
com.sun.javadoc.LanguageVersion.valueOf(java.lang.String)
com.sun.source.doctree.AttributeTree.ValueKind.valueOf(java.lang.String)
com.sun.source.doctree.DocTree.Kind.valueOf(java.lang.String)
com.sun.source.tree.LambdaExpressionTree.BodyKind.valueOf(java.lang.String)
com.sun.source.tree.MemberReferenceTree.ReferenceMode.valueOf(java.lang.String)
com.sun.source.tree.Tree.Kind.valueOf(java.lang.String)
com.sun.source.util.TaskEvent.Kind.valueOf(java.lang.String)
com.sun.tools.jconsole.JConsoleContext.ConnectionState.valueOf(java.lang.String)
java.awt.Component.BaselineResizeBehavior.valueOf(java.lang.String)
java.awt.Desktop.Action.valueOf(java.lang.String)
java.awt.Dialog.ModalExclusionType.valueOf(java.lang.String)
java.awt.Dialog.ModalityType.valueOf(java.lang.String)
java.awt.font.NumericShaper.Range.valueOf(java.lang.String)
java.awt.GraphicsDevice.WindowTranslucency.valueOf(java.lang.String)
java.awt.MultipleGradientPaint.ColorSpaceType.valueOf(java.lang.String)
java.awt.MultipleGradientPaint.CycleMethod.valueOf(java.lang.String)
java.awt.TrayIcon.MessageType.valueOf(java.lang.String)
java.awt.Window.Type.valueOf(java.lang.String)
java.lang.annotation.ElementType.valueOf(java.lang.String)
java.lang.annotation.RetentionPolicy.valueOf(java.lang.String)
java.lang.Boolean.valueOf(boolean)
java.lang.Boolean.valueOf(java.lang.String)
java.lang.Byte.valueOf(byte)
java.lang.Byte.valueOf(java.lang.String)
java.lang.Byte.valueOf(java.lang.String, int)
java.lang.Character.valueOf(char)
java.lang.Character.UnicodeScript.valueOf(java.lang.String)
java.lang.Double.valueOf(double)
java.lang.Double.valueOf(java.lang.String)
java.lang.Enum.valueOf(java.lang.Class, java.lang.String)
java.lang.Float.valueOf(float)
java.lang.Float.valueOf(java.lang.String)
java.lang.Integer.valueOf(int)
java.lang.Integer.valueOf(java.lang.String)
java.lang.Integer.valueOf(java.lang.String, int)
java.lang.Long.valueOf(java.lang.String)
java.lang.Long.valueOf(java.lang.String, int)
java.lang.Long.valueOf(long)
java.lang.management.MemoryType.valueOf(java.lang.String)
java.lang.ProcessBuilder.Redirect.Type.valueOf(java.lang.String)
java.lang.Short.valueOf(java.lang.String)
java.lang.Short.valueOf(java.lang.String, int)
java.lang.Short.valueOf(short)
java.lang.String.valueOf(boolean)
java.lang.String.valueOf(char)
java.lang.String.valueOf(char:A)
java.lang.String.valueOf(char:A, int, int)
java.lang.String.valueOf(double)
java.lang.String.valueOf(float)
java.lang.String.valueOf(int)
java.lang.String.valueOf(java.lang.Object)
java.lang.String.valueOf(long)
java.lang.Thread.State.valueOf(java.lang.String)
java.math.BigDecimal.valueOf(double)
java.math.BigDecimal.valueOf(long)
java.math.BigDecimal.valueOf(long, int)
java.math.BigInteger.valueOf(long)
java.math.RoundingMode.valueOf(int)
java.math.RoundingMode.valueOf(java.lang.String)
java.net.Authenticator.RequestorType.valueOf(java.lang.String)
java.net.Proxy.Type.valueOf(java.lang.String)
java.net.StandardProtocolFamily.valueOf(java.lang.String)
java.nio.file.AccessMode.valueOf(java.lang.String)
java.nio.file.attribute.AclEntryFlag.valueOf(java.lang.String)
java.nio.file.attribute.AclEntryPermission.valueOf(java.lang.String)
java.nio.file.attribute.AclEntryType.valueOf(java.lang.String)
java.nio.file.attribute.PosixFilePermission.valueOf(java.lang.String)
java.nio.file.FileVisitOption.valueOf(java.lang.String)
java.nio.file.FileVisitResult.valueOf(java.lang.String)
java.nio.file.LinkOption.valueOf(java.lang.String)
java.nio.file.StandardCopyOption.valueOf(java.lang.String)
java.nio.file.StandardOpenOption.valueOf(java.lang.String)
java.security.cert.CertPathValidatorException.BasicReason.valueOf(java.lang.String)
java.security.cert.CRLReason.valueOf(java.lang.String)
java.security.cert.PKIXReason.valueOf(java.lang.String)
java.security.cert.PKIXRevocationChecker.Option.valueOf(java.lang.String)
java.security.CryptoPrimitive.valueOf(java.lang.String)
java.security.KeyRep.Type.valueOf(java.lang.String)
java.sql.ClientInfoStatus.valueOf(java.lang.String)
java.sql.Date.valueOf(java.lang.String)
java.sql.Date.valueOf(java.time.LocalDate)
java.sql.JDBCType.valueOf(int)
java.sql.JDBCType.valueOf(java.lang.String)
java.sql.PseudoColumnUsage.valueOf(java.lang.String)
java.sql.RowIdLifetime.valueOf(java.lang.String)
java.sql.Time.valueOf(java.lang.String)
java.sql.Time.valueOf(java.time.LocalTime)
java.sql.Timestamp.valueOf(java.lang.String)
java.sql.Timestamp.valueOf(java.time.LocalDateTime)
java.text.Normalizer.Form.valueOf(java.lang.String)
java.time.chrono.HijrahEra.valueOf(java.lang.String)
java.time.chrono.IsoEra.valueOf(java.lang.String)
java.time.chrono.JapaneseEra.valueOf(java.lang.String)
java.time.chrono.MinguoEra.valueOf(java.lang.String)
java.time.chrono.ThaiBuddhistEra.valueOf(java.lang.String)
java.time.DayOfWeek.valueOf(java.lang.String)
java.time.format.FormatStyle.valueOf(java.lang.String)
java.time.format.ResolverStyle.valueOf(java.lang.String)
java.time.format.SignStyle.valueOf(java.lang.String)
java.time.format.TextStyle.valueOf(java.lang.String)
java.time.Month.valueOf(java.lang.String)
java.time.temporal.ChronoField.valueOf(java.lang.String)
java.time.temporal.ChronoUnit.valueOf(java.lang.String)
java.time.zone.ZoneOffsetTransitionRule.TimeDefinition.valueOf(java.lang.String)
java.util.BitSet.valueOf(byte:A)
java.util.BitSet.valueOf(java.nio.ByteBuffer)
java.util.BitSet.valueOf(java.nio.LongBuffer)
java.util.BitSet.valueOf(long:A)
java.util.concurrent.TimeUnit.valueOf(java.lang.String)
java.util.Formatter.BigDecimalLayoutForm.valueOf(java.lang.String)
java.util.Locale.Category.valueOf(java.lang.String)
java.util.Locale.FilteringMode.valueOf(java.lang.String)
java.util.stream.Collector.Characteristics.valueOf(java.lang.String)
javax.annotation.Resource.AuthenticationType.valueOf(java.lang.String)
javax.jws.soap.SOAPBinding.ParameterStyle.valueOf(java.lang.String)
javax.jws.soap.SOAPBinding.Style.valueOf(java.lang.String)
javax.jws.soap.SOAPBinding.Use.valueOf(java.lang.String)
javax.jws.WebParam.Mode.valueOf(java.lang.String)
javax.lang.model.element.ElementKind.valueOf(java.lang.String)
javax.lang.model.element.Modifier.valueOf(java.lang.String)
javax.lang.model.element.NestingKind.valueOf(java.lang.String)
javax.lang.model.SourceVersion.valueOf(java.lang.String)
javax.lang.model.type.TypeKind.valueOf(java.lang.String)
javax.net.ssl.SSLEngineResult.HandshakeStatus.valueOf(java.lang.String)
javax.net.ssl.SSLEngineResult.Status.valueOf(java.lang.String)
javax.swing.DropMode.valueOf(java.lang.String)
javax.swing.event.RowSorterEvent.Type.valueOf(java.lang.String)
javax.swing.GroupLayout.Alignment.valueOf(java.lang.String)
javax.swing.JTable.PrintMode.valueOf(java.lang.String)
javax.swing.LayoutStyle.ComponentPlacement.valueOf(java.lang.String)
javax.swing.plaf.nimbus.AbstractRegionPainter.PaintContext.CacheMode.valueOf(java.lang.String)
javax.swing.RowFilter.ComparisonType.valueOf(java.lang.String)
javax.swing.SortOrder.valueOf(java.lang.String)
javax.swing.SwingWorker.StateValue.valueOf(java.lang.String)
javax.swing.text.html.FormSubmitEvent.MethodType.valueOf(java.lang.String)
javax.tools.Diagnostic.Kind.valueOf(java.lang.String)
javax.tools.DocumentationTool.Location.valueOf(java.lang.String)
javax.tools.JavaFileObject.Kind.valueOf(java.lang.String)
javax.tools.StandardLocation.valueOf(java.lang.String)
javax.xml.bind.annotation.XmlAccessOrder.valueOf(java.lang.String)
javax.xml.bind.annotation.XmlAccessType.valueOf(java.lang.String)
javax.xml.bind.annotation.XmlNsForm.valueOf(java.lang.String)
javax.xml.namespace.QName.valueOf(java.lang.String)
javax.xml.ws.handler.MessageContext.Scope.valueOf(java.lang.String)
javax.xml.ws.Service.Mode.valueOf(java.lang.String)
javax.xml.ws.soap.AddressingFeature.Responses.valueOf(java.lang.String)


Occurences of values

values occurences:
com.sun.javadoc.LanguageVersion.values()
com.sun.source.doctree.AttributeTree.ValueKind.values()
com.sun.source.doctree.DocTree.Kind.values()
com.sun.source.tree.LambdaExpressionTree.BodyKind.values()
com.sun.source.tree.MemberReferenceTree.ReferenceMode.values()
com.sun.source.tree.Tree.Kind.values()
com.sun.source.util.TaskEvent.Kind.values()
com.sun.tools.jconsole.JConsoleContext.ConnectionState.values()
java.awt.Component.BaselineResizeBehavior.values()
java.awt.Desktop.Action.values()
java.awt.Dialog.ModalExclusionType.values()
java.awt.Dialog.ModalityType.values()
java.awt.font.NumericShaper.Range.values()
java.awt.GraphicsDevice.WindowTranslucency.values()
java.awt.MultipleGradientPaint.ColorSpaceType.values()
java.awt.MultipleGradientPaint.CycleMethod.values()
java.awt.RenderingHints.values()
java.awt.TrayIcon.MessageType.values()
java.awt.Window.Type.values()
java.lang.annotation.ElementType.values()
java.lang.annotation.RetentionPolicy.values()
java.lang.Character.UnicodeScript.values()
java.lang.management.MemoryType.values()
java.lang.ProcessBuilder.Redirect.Type.values()
java.lang.Thread.State.values()
java.math.RoundingMode.values()
java.net.Authenticator.RequestorType.values()
java.net.Proxy.Type.values()
java.net.StandardProtocolFamily.values()
java.nio.file.AccessMode.values()
java.nio.file.attribute.AclEntryFlag.values()
java.nio.file.attribute.AclEntryPermission.values()
java.nio.file.attribute.AclEntryType.values()
java.nio.file.attribute.PosixFilePermission.values()
java.nio.file.FileVisitOption.values()
java.nio.file.FileVisitResult.values()
java.nio.file.LinkOption.values()
java.nio.file.StandardCopyOption.values()
java.nio.file.StandardOpenOption.values()
java.security.cert.CertPathValidatorException.BasicReason.values()
java.security.cert.CRLReason.values()
java.security.cert.PKIXReason.values()
java.security.cert.PKIXRevocationChecker.Option.values()
java.security.CryptoPrimitive.values()
java.security.KeyRep.Type.values()
java.security.Provider.values()
java.sql.ClientInfoStatus.values()
java.sql.JDBCType.values()
java.sql.PseudoColumnUsage.values()
java.sql.RowIdLifetime.values()
java.text.Normalizer.Form.values()
java.time.chrono.HijrahEra.values()
java.time.chrono.IsoEra.values()
java.time.chrono.JapaneseEra.values()
java.time.chrono.MinguoEra.values()
java.time.chrono.ThaiBuddhistEra.values()
java.time.DayOfWeek.values()
java.time.format.FormatStyle.values()
java.time.format.ResolverStyle.values()
java.time.format.SignStyle.values()
java.time.format.TextStyle.values()
java.time.Month.values()
java.time.temporal.ChronoField.values()
java.time.temporal.ChronoUnit.values()
java.time.zone.ZoneOffsetTransitionRule.TimeDefinition.values()
java.util.AbstractMap.values()
java.util.concurrent.ConcurrentHashMap.values()
java.util.concurrent.ConcurrentSkipListMap.values()
java.util.concurrent.TimeUnit.values()
java.util.EnumMap.values()
java.util.Formatter.BigDecimalLayoutForm.values()
java.util.HashMap.values()
java.util.Hashtable.values()
java.util.IdentityHashMap.values()
java.util.jar.Attributes.values()
java.util.LinkedHashMap.values()
java.util.Locale.Category.values()
java.util.Locale.FilteringMode.values()
java.util.Map.values()
java.util.SortedMap.values()
java.util.stream.Collector.Characteristics.values()
java.util.TreeMap.values()
java.util.WeakHashMap.values()
javax.annotation.Resource.AuthenticationType.values()
javax.jws.soap.SOAPBinding.ParameterStyle.values()
javax.jws.soap.SOAPBinding.Style.values()
javax.jws.soap.SOAPBinding.Use.values()
javax.jws.WebParam.Mode.values()
javax.lang.model.element.ElementKind.values()
javax.lang.model.element.Modifier.values()
javax.lang.model.element.NestingKind.values()
javax.lang.model.SourceVersion.values()
javax.lang.model.type.TypeKind.values()
javax.management.openmbean.CompositeData.values()
javax.management.openmbean.CompositeDataSupport.values()
javax.management.openmbean.TabularData.values()
javax.management.openmbean.TabularDataSupport.values()
javax.naming.directory.values
javax.net.ssl.SSLEngineResult.HandshakeStatus.values()
javax.net.ssl.SSLEngineResult.Status.values()
javax.script.SimpleBindings.values()
javax.swing.DropMode.values()
javax.swing.event.RowSorterEvent.Type.values()
javax.swing.GroupLayout.Alignment.values()
javax.swing.JTable.PrintMode.values()
javax.swing.LayoutStyle.ComponentPlacement.values()
javax.swing.plaf.nimbus.AbstractRegionPainter.PaintContext.CacheMode.values()
javax.swing.RowFilter.ComparisonType.values()
javax.swing.SortOrder.values()
javax.swing.SwingWorker.StateValue.values()
javax.swing.text.html.FormSubmitEvent.MethodType.values()
javax.swing.text.html.parser.values
javax.tools.Diagnostic.Kind.values()
javax.tools.DocumentationTool.Location.values()
javax.tools.JavaFileObject.Kind.values()
javax.tools.StandardLocation.values()
javax.xml.bind.annotation.XmlAccessOrder.values()
javax.xml.bind.annotation.XmlAccessType.values()
javax.xml.bind.annotation.XmlNsForm.values()
javax.xml.ws.handler.MessageContext.Scope.values()
javax.xml.ws.Service.Mode.values()
javax.xml.ws.soap.AddressingFeature.Responses.values()


Occurences of valueToString

valueToString occurences:
javax.swing.JFormattedTextField.AbstractFormatter.valueToString(java.lang.Object)
javax.swing.text.DefaultFormatter.valueToString(java.lang.Object)
javax.swing.text.InternationalFormatter.valueToString(java.lang.Object)
javax.swing.text.MaskFormatter.valueToString(java.lang.Object)


Occurences of value_as_string

value_as_string occurences:
org.omg.CORBA.DynEnum.value_as_string()
org.omg.CORBA.DynEnum.value_as_string(java.lang.String)


Occurences of value_as_ulong

value_as_ulong occurences:
org.omg.CORBA.DynEnum.value_as_ulong()
org.omg.CORBA.DynEnum.value_as_ulong(int)


Occurences of VARBINARY

VARBINARY occurences:
java.sql.VARBINARY
java.sql.VARBINARY


Occurences of VARCHAR

VARCHAR occurences:
java.sql.VARCHAR
java.sql.VARCHAR


Occurences of Vector (constructors)

Vector (constructors) occurences:
java.util.Vector()
java.util.Vector(int)
java.util.Vector(int, int)
java.util.Vector(java.util.Collection)


Occurences of verify

verify occurences:
java.security.cert.Certificate.verify(java.security.PublicKey)
java.security.cert.Certificate.verify(java.security.PublicKey, java.lang.String)
java.security.cert.Certificate.verify(java.security.PublicKey, java.security.Provider)
java.security.cert.X509Certificate.verify(java.security.PublicKey, java.security.Provider)
java.security.cert.X509CRL.verify(java.security.PublicKey)
java.security.cert.X509CRL.verify(java.security.PublicKey, java.lang.String)
java.security.cert.X509CRL.verify(java.security.PublicKey, java.security.Provider)
java.security.Signature.verify(byte:A)
java.security.Signature.verify(byte:A, int, int)
java.security.SignedObject.verify(java.security.PublicKey, java.security.Signature)
javax.net.ssl.HostnameVerifier.verify(java.lang.String, javax.net.ssl.SSLSession)
javax.security.cert.Certificate.verify(java.security.PublicKey)
javax.security.cert.Certificate.verify(java.security.PublicKey, java.lang.String)
javax.swing.InputVerifier.verify(javax.swing.JComponent)


Occurences of VERIFY

VERIFY occurences:
java.security.VERIFY
javax.xml.crypto.VERIFY


Occurences of VerifyError (constructors)

VerifyError (constructors) occurences:
java.lang.VerifyError()
java.lang.VerifyError(java.lang.String)


Occurences of verifyMIC

verifyMIC occurences:
org.ietf.jgss.GSSContext.verifyMIC(byte:A, int, int, byte:A, int, int, org.ietf.jgss.MessageProp)
org.ietf.jgss.GSSContext.verifyMIC(java.io.InputStream, java.io.InputStream, org.ietf.jgss.MessageProp)


Occurences of VERSION

VERSION occurences:
com.sun.source.doctree.VERSION
javax.swing.text.html.VERSION
javax.xml.transform.VERSION


Occurences of version

version occurences:
com.sun.jdi.VirtualMachine.version()
java.util.UUID.version()
javax.imageio.spi.version
org.omg.CORBA.version


Occurences of VERTICAL

VERTICAL occurences:
java.awt.VERTICAL
java.awt.VERTICAL
java.awt.VERTICAL
javax.accessibility.VERTICAL
javax.swing.VERTICAL
javax.swing.VERTICAL


Occurences of vetoableChange

vetoableChange occurences:
java.beans.beancontext.BeanContextSupport.vetoableChange(java.beans.PropertyChangeEvent)
java.beans.VetoableChangeListener.vetoableChange(java.beans.PropertyChangeEvent)
java.beans.VetoableChangeListenerProxy.vetoableChange(java.beans.PropertyChangeEvent)


Occurences of viewport

viewport occurences:
javax.swing.viewport
javax.swing.viewport


Occurences of VIEWPORT

VIEWPORT occurences:
javax.accessibility.VIEWPORT
javax.swing.plaf.synth.VIEWPORT
javax.swing.VIEWPORT


Occurences of views

views occurences:
compact2.org.w3c.dom.views
compact3.org.w3c.dom.views
java.nio.views
org.w3c.dom.views


Occurences of viewToModel

viewToModel occurences:
javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias:A)
javax.swing.plaf.multi.MultiTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.plaf.multi.MultiTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias:A)
javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)
javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias:A)
javax.swing.text.AsyncBoxView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.BoxView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.ComponentView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.CompositeView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.FieldView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.GlyphView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.GlyphView.GlyphPainter.viewToModel(javax.swing.text.GlyphView, float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.html.ImageView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.IconView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.JTextComponent.viewToModel(java.awt.Point)
javax.swing.text.PasswordView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.PlainView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)
javax.swing.text.View.viewToModel(float, float, java.awt.Shape)
javax.swing.text.View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias:A)


Occurences of VirtualMachine

VirtualMachine occurences:
com.sun.jdi.VirtualMachine
com.sun.tools.attach.VirtualMachine


Occurences of VirtualMachineDescriptor (constructors)

VirtualMachineDescriptor (constructors) occurences:
com.sun.tools.attach.VirtualMachineDescriptor(com.sun.tools.attach.spi.AttachProvider, java.lang.String)
com.sun.tools.attach.VirtualMachineDescriptor(com.sun.tools.attach.spi.AttachProvider, java.lang.String, java.lang.String)


Occurences of VirtualMachineError (constructors)

VirtualMachineError (constructors) occurences:
java.lang.VirtualMachineError()
java.lang.VirtualMachineError(java.lang.String)
java.lang.VirtualMachineError(java.lang.String, java.lang.Throwable)
java.lang.VirtualMachineError(java.lang.Throwable)


Occurences of visit

visit occurences:
com.sun.source.util.SimpleDocTreeVisitor.visit(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visit(com.sun.source.doctree.DocTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visit(java.lang.Iterable, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visit(java.lang.Iterable, P)
com.sun.source.util.SimpleTreeVisitor.visit(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visit(com.sun.source.tree.Tree, P)
com.sun.source.util.SimpleTreeVisitor.visit(java.lang.Iterable, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visit(java.lang.Iterable, P)
javax.lang.model.element.AnnotationValueVisitor.visit(javax.lang.model.element.AnnotationValue)
javax.lang.model.element.AnnotationValueVisitor.visit(javax.lang.model.element.AnnotationValue, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visit(javax.lang.model.element.AnnotationValue, P)
javax.lang.model.element.ElementVisitor.visit(javax.lang.model.element.Element)
javax.lang.model.element.ElementVisitor.visit(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.element.ElementVisitor.visit(javax.lang.model.element.Element, P)
javax.lang.model.type.TypeVisitor.visit(javax.lang.model.type.TypeMirror)
javax.lang.model.type.TypeVisitor.visit(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.type.TypeVisitor.visit(javax.lang.model.type.TypeMirror, P)
javax.lang.model.util.AbstractAnnotationValueVisitor6.visit(javax.lang.model.element.AnnotationValue)
javax.lang.model.util.AbstractAnnotationValueVisitor6.visit(javax.lang.model.element.AnnotationValue, java.lang.Object)
javax.lang.model.util.AbstractAnnotationValueVisitor6.visit(javax.lang.model.element.AnnotationValue, P)
javax.lang.model.util.AbstractElementVisitor6.visit(javax.lang.model.element.Element)
javax.lang.model.util.AbstractElementVisitor6.visit(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.util.AbstractElementVisitor6.visit(javax.lang.model.element.Element, P)
javax.lang.model.util.AbstractTypeVisitor6.visit(javax.lang.model.type.TypeMirror)
javax.lang.model.util.AbstractTypeVisitor6.visit(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor6.visit(javax.lang.model.type.TypeMirror, P)


Occurences of visitAnnotatedType

visitAnnotatedType occurences:
com.sun.source.tree.TreeVisitor.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, P)
com.sun.source.util.TreeScanner.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree, P)


Occurences of visitAnnotation

visitAnnotation occurences:
com.sun.source.tree.TreeVisitor.visitAnnotation(com.sun.source.tree.AnnotationTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitAnnotation(com.sun.source.tree.AnnotationTree, P)
com.sun.source.util.SimpleTreeVisitor.visitAnnotation(com.sun.source.tree.AnnotationTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitAnnotation(com.sun.source.tree.AnnotationTree, P)
com.sun.source.util.TreeScanner.visitAnnotation(com.sun.source.tree.AnnotationTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitAnnotation(com.sun.source.tree.AnnotationTree, P)
javax.lang.model.element.AnnotationValueVisitor.visitAnnotation(javax.lang.model.element.AnnotationMirror, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitAnnotation(javax.lang.model.element.AnnotationMirror, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitAnnotation(javax.lang.model.element.AnnotationMirror, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitAnnotation(javax.lang.model.element.AnnotationMirror, P)


Occurences of visitArray

visitArray occurences:
javax.lang.model.element.AnnotationValueVisitor.visitArray(java.util.List, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitArray(java.util.List, P)
javax.lang.model.type.TypeVisitor.visitArray(javax.lang.model.type.ArrayType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitArray(javax.lang.model.type.ArrayType, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitArray(java.util.List, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitArray(java.util.List, P)
javax.lang.model.util.SimpleTypeVisitor6.visitArray(javax.lang.model.type.ArrayType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitArray(javax.lang.model.type.ArrayType, P)


Occurences of visitArrayAccess

visitArrayAccess occurences:
com.sun.source.tree.TreeVisitor.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, P)
com.sun.source.util.SimpleTreeVisitor.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, P)
com.sun.source.util.TreeScanner.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitArrayAccess(com.sun.source.tree.ArrayAccessTree, P)


Occurences of visitArrayType

visitArrayType occurences:
com.sun.source.tree.TreeVisitor.visitArrayType(com.sun.source.tree.ArrayTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitArrayType(com.sun.source.tree.ArrayTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitArrayType(com.sun.source.tree.ArrayTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitArrayType(com.sun.source.tree.ArrayTypeTree, P)
com.sun.source.util.TreeScanner.visitArrayType(com.sun.source.tree.ArrayTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitArrayType(com.sun.source.tree.ArrayTypeTree, P)


Occurences of visitAssert

visitAssert occurences:
com.sun.source.tree.TreeVisitor.visitAssert(com.sun.source.tree.AssertTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitAssert(com.sun.source.tree.AssertTree, P)
com.sun.source.util.SimpleTreeVisitor.visitAssert(com.sun.source.tree.AssertTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitAssert(com.sun.source.tree.AssertTree, P)
com.sun.source.util.TreeScanner.visitAssert(com.sun.source.tree.AssertTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitAssert(com.sun.source.tree.AssertTree, P)


Occurences of visitAssignment

visitAssignment occurences:
com.sun.source.tree.TreeVisitor.visitAssignment(com.sun.source.tree.AssignmentTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitAssignment(com.sun.source.tree.AssignmentTree, P)
com.sun.source.util.SimpleTreeVisitor.visitAssignment(com.sun.source.tree.AssignmentTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitAssignment(com.sun.source.tree.AssignmentTree, P)
com.sun.source.util.TreeScanner.visitAssignment(com.sun.source.tree.AssignmentTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitAssignment(com.sun.source.tree.AssignmentTree, P)


Occurences of visitAttribute

visitAttribute occurences:
com.sun.source.doctree.DocTreeVisitor.visitAttribute(com.sun.source.doctree.AttributeTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitAttribute(com.sun.source.doctree.AttributeTree, P)
com.sun.source.util.DocTreeScanner.visitAttribute(com.sun.source.doctree.AttributeTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitAttribute(com.sun.source.doctree.AttributeTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitAttribute(com.sun.source.doctree.AttributeTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitAttribute(com.sun.source.doctree.AttributeTree, P)


Occurences of visitAuthor

visitAuthor occurences:
com.sun.source.doctree.DocTreeVisitor.visitAuthor(com.sun.source.doctree.AuthorTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitAuthor(com.sun.source.doctree.AuthorTree, P)
com.sun.source.util.DocTreeScanner.visitAuthor(com.sun.source.doctree.AuthorTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitAuthor(com.sun.source.doctree.AuthorTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitAuthor(com.sun.source.doctree.AuthorTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitAuthor(com.sun.source.doctree.AuthorTree, P)


Occurences of visitBinary

visitBinary occurences:
com.sun.source.tree.TreeVisitor.visitBinary(com.sun.source.tree.BinaryTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitBinary(com.sun.source.tree.BinaryTree, P)
com.sun.source.util.SimpleTreeVisitor.visitBinary(com.sun.source.tree.BinaryTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitBinary(com.sun.source.tree.BinaryTree, P)
com.sun.source.util.TreeScanner.visitBinary(com.sun.source.tree.BinaryTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitBinary(com.sun.source.tree.BinaryTree, P)


Occurences of visitBlock

visitBlock occurences:
com.sun.source.tree.TreeVisitor.visitBlock(com.sun.source.tree.BlockTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitBlock(com.sun.source.tree.BlockTree, P)
com.sun.source.util.SimpleTreeVisitor.visitBlock(com.sun.source.tree.BlockTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitBlock(com.sun.source.tree.BlockTree, P)
com.sun.source.util.TreeScanner.visitBlock(com.sun.source.tree.BlockTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitBlock(com.sun.source.tree.BlockTree, P)


Occurences of visitBoolean

visitBoolean occurences:
javax.lang.model.element.AnnotationValueVisitor.visitBoolean(boolean, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitBoolean(boolean, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitBoolean(boolean, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitBoolean(boolean, P)


Occurences of visitBreak

visitBreak occurences:
com.sun.source.tree.TreeVisitor.visitBreak(com.sun.source.tree.BreakTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitBreak(com.sun.source.tree.BreakTree, P)
com.sun.source.util.SimpleTreeVisitor.visitBreak(com.sun.source.tree.BreakTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitBreak(com.sun.source.tree.BreakTree, P)
com.sun.source.util.TreeScanner.visitBreak(com.sun.source.tree.BreakTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitBreak(com.sun.source.tree.BreakTree, P)


Occurences of visitByte

visitByte occurences:
javax.lang.model.element.AnnotationValueVisitor.visitByte(byte, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitByte(byte, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitByte(byte, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitByte(byte, P)


Occurences of visitCase

visitCase occurences:
com.sun.source.tree.TreeVisitor.visitCase(com.sun.source.tree.CaseTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitCase(com.sun.source.tree.CaseTree, P)
com.sun.source.util.SimpleTreeVisitor.visitCase(com.sun.source.tree.CaseTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitCase(com.sun.source.tree.CaseTree, P)
com.sun.source.util.TreeScanner.visitCase(com.sun.source.tree.CaseTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitCase(com.sun.source.tree.CaseTree, P)


Occurences of visitCatch

visitCatch occurences:
com.sun.source.tree.TreeVisitor.visitCatch(com.sun.source.tree.CatchTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitCatch(com.sun.source.tree.CatchTree, P)
com.sun.source.util.SimpleTreeVisitor.visitCatch(com.sun.source.tree.CatchTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitCatch(com.sun.source.tree.CatchTree, P)
com.sun.source.util.TreeScanner.visitCatch(com.sun.source.tree.CatchTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitCatch(com.sun.source.tree.CatchTree, P)


Occurences of visitChar

visitChar occurences:
javax.lang.model.element.AnnotationValueVisitor.visitChar(char, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitChar(char, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitChar(char, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitChar(char, P)


Occurences of visitClass

visitClass occurences:
com.sun.source.tree.TreeVisitor.visitClass(com.sun.source.tree.ClassTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitClass(com.sun.source.tree.ClassTree, P)
com.sun.source.util.SimpleTreeVisitor.visitClass(com.sun.source.tree.ClassTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitClass(com.sun.source.tree.ClassTree, P)
com.sun.source.util.TreeScanner.visitClass(com.sun.source.tree.ClassTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitClass(com.sun.source.tree.ClassTree, P)


Occurences of visitComment

visitComment occurences:
com.sun.source.doctree.DocTreeVisitor.visitComment(com.sun.source.doctree.CommentTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitComment(com.sun.source.doctree.CommentTree, P)
com.sun.source.util.DocTreeScanner.visitComment(com.sun.source.doctree.CommentTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitComment(com.sun.source.doctree.CommentTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitComment(com.sun.source.doctree.CommentTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitComment(com.sun.source.doctree.CommentTree, P)


Occurences of visitCompilationUnit

visitCompilationUnit occurences:
com.sun.source.tree.TreeVisitor.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, P)
com.sun.source.util.SimpleTreeVisitor.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, P)
com.sun.source.util.TreeScanner.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitCompilationUnit(com.sun.source.tree.CompilationUnitTree, P)


Occurences of visitCompoundAssignment

visitCompoundAssignment occurences:
com.sun.source.tree.TreeVisitor.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, P)
com.sun.source.util.SimpleTreeVisitor.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, P)
com.sun.source.util.TreeScanner.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree, P)


Occurences of visitConditionalExpression

visitConditionalExpression occurences:
com.sun.source.tree.TreeVisitor.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, P)
com.sun.source.util.SimpleTreeVisitor.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, P)
com.sun.source.util.TreeScanner.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree, P)


Occurences of visitContinue

visitContinue occurences:
com.sun.source.tree.TreeVisitor.visitContinue(com.sun.source.tree.ContinueTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitContinue(com.sun.source.tree.ContinueTree, P)
com.sun.source.util.SimpleTreeVisitor.visitContinue(com.sun.source.tree.ContinueTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitContinue(com.sun.source.tree.ContinueTree, P)
com.sun.source.util.TreeScanner.visitContinue(com.sun.source.tree.ContinueTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitContinue(com.sun.source.tree.ContinueTree, P)


Occurences of visitDeclared

visitDeclared occurences:
javax.lang.model.type.TypeVisitor.visitDeclared(javax.lang.model.type.DeclaredType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitDeclared(javax.lang.model.type.DeclaredType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitDeclared(javax.lang.model.type.DeclaredType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitDeclared(javax.lang.model.type.DeclaredType, P)


Occurences of visitDeprecated

visitDeprecated occurences:
com.sun.source.doctree.DocTreeVisitor.visitDeprecated(com.sun.source.doctree.DeprecatedTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitDeprecated(com.sun.source.doctree.DeprecatedTree, P)
com.sun.source.util.DocTreeScanner.visitDeprecated(com.sun.source.doctree.DeprecatedTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitDeprecated(com.sun.source.doctree.DeprecatedTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitDeprecated(com.sun.source.doctree.DeprecatedTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitDeprecated(com.sun.source.doctree.DeprecatedTree, P)


Occurences of visitDocComment

visitDocComment occurences:
com.sun.source.doctree.DocTreeVisitor.visitDocComment(com.sun.source.doctree.DocCommentTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitDocComment(com.sun.source.doctree.DocCommentTree, P)
com.sun.source.util.DocTreeScanner.visitDocComment(com.sun.source.doctree.DocCommentTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitDocComment(com.sun.source.doctree.DocCommentTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitDocComment(com.sun.source.doctree.DocCommentTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitDocComment(com.sun.source.doctree.DocCommentTree, P)


Occurences of visitDocRoot

visitDocRoot occurences:
com.sun.source.doctree.DocTreeVisitor.visitDocRoot(com.sun.source.doctree.DocRootTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitDocRoot(com.sun.source.doctree.DocRootTree, P)
com.sun.source.util.DocTreeScanner.visitDocRoot(com.sun.source.doctree.DocRootTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitDocRoot(com.sun.source.doctree.DocRootTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitDocRoot(com.sun.source.doctree.DocRootTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitDocRoot(com.sun.source.doctree.DocRootTree, P)


Occurences of visitDouble

visitDouble occurences:
javax.lang.model.element.AnnotationValueVisitor.visitDouble(double, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitDouble(double, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitDouble(double, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitDouble(double, P)


Occurences of visitDoWhileLoop

visitDoWhileLoop occurences:
com.sun.source.tree.TreeVisitor.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, P)
com.sun.source.util.SimpleTreeVisitor.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, P)
com.sun.source.util.TreeScanner.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree, P)


Occurences of visitEmptyStatement

visitEmptyStatement occurences:
com.sun.source.tree.TreeVisitor.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, P)
com.sun.source.util.SimpleTreeVisitor.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, P)
com.sun.source.util.TreeScanner.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitEmptyStatement(com.sun.source.tree.EmptyStatementTree, P)


Occurences of visitEndElement

visitEndElement occurences:
com.sun.source.doctree.DocTreeVisitor.visitEndElement(com.sun.source.doctree.EndElementTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitEndElement(com.sun.source.doctree.EndElementTree, P)
com.sun.source.util.DocTreeScanner.visitEndElement(com.sun.source.doctree.EndElementTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitEndElement(com.sun.source.doctree.EndElementTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitEndElement(com.sun.source.doctree.EndElementTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitEndElement(com.sun.source.doctree.EndElementTree, P)


Occurences of visitEnhancedForLoop

visitEnhancedForLoop occurences:
com.sun.source.tree.TreeVisitor.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, P)
com.sun.source.util.SimpleTreeVisitor.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, P)
com.sun.source.util.TreeScanner.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree, P)


Occurences of visitEntity

visitEntity occurences:
com.sun.source.doctree.DocTreeVisitor.visitEntity(com.sun.source.doctree.EntityTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitEntity(com.sun.source.doctree.EntityTree, P)
com.sun.source.util.DocTreeScanner.visitEntity(com.sun.source.doctree.EntityTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitEntity(com.sun.source.doctree.EntityTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitEntity(com.sun.source.doctree.EntityTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitEntity(com.sun.source.doctree.EntityTree, P)


Occurences of visitEnumConstant

visitEnumConstant occurences:
javax.lang.model.element.AnnotationValueVisitor.visitEnumConstant(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitEnumConstant(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitEnumConstant(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitEnumConstant(javax.lang.model.element.VariableElement, P)


Occurences of visitErroneous

visitErroneous occurences:
com.sun.source.doctree.DocTreeVisitor.visitErroneous(com.sun.source.doctree.ErroneousTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitErroneous(com.sun.source.doctree.ErroneousTree, P)
com.sun.source.tree.TreeVisitor.visitErroneous(com.sun.source.tree.ErroneousTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitErroneous(com.sun.source.tree.ErroneousTree, P)
com.sun.source.util.DocTreeScanner.visitErroneous(com.sun.source.doctree.ErroneousTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitErroneous(com.sun.source.doctree.ErroneousTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitErroneous(com.sun.source.doctree.ErroneousTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitErroneous(com.sun.source.doctree.ErroneousTree, P)
com.sun.source.util.SimpleTreeVisitor.visitErroneous(com.sun.source.tree.ErroneousTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitErroneous(com.sun.source.tree.ErroneousTree, P)
com.sun.source.util.TreeScanner.visitErroneous(com.sun.source.tree.ErroneousTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitErroneous(com.sun.source.tree.ErroneousTree, P)


Occurences of visitError

visitError occurences:
javax.lang.model.type.TypeVisitor.visitError(javax.lang.model.type.ErrorType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitError(javax.lang.model.type.ErrorType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitError(javax.lang.model.type.ErrorType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitError(javax.lang.model.type.ErrorType, P)


Occurences of visitExecutable

visitExecutable occurences:
javax.lang.model.element.ElementVisitor.visitExecutable(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitExecutable(javax.lang.model.element.ExecutableElement, P)
javax.lang.model.type.TypeVisitor.visitExecutable(javax.lang.model.type.ExecutableType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitExecutable(javax.lang.model.type.ExecutableType, P)
javax.lang.model.util.ElementKindVisitor6.visitExecutable(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitExecutable(javax.lang.model.element.ExecutableElement, P)
javax.lang.model.util.ElementScanner6.visitExecutable(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementScanner6.visitExecutable(javax.lang.model.element.ExecutableElement, P)
javax.lang.model.util.SimpleElementVisitor6.visitExecutable(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.visitExecutable(javax.lang.model.element.ExecutableElement, P)
javax.lang.model.util.SimpleTypeVisitor6.visitExecutable(javax.lang.model.type.ExecutableType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitExecutable(javax.lang.model.type.ExecutableType, P)


Occurences of visitExecutableAsConstructor

visitExecutableAsConstructor occurences:
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsConstructor(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsConstructor(javax.lang.model.element.ExecutableElement, P)


Occurences of visitExecutableAsInstanceInit

visitExecutableAsInstanceInit occurences:
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsInstanceInit(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsInstanceInit(javax.lang.model.element.ExecutableElement, P)


Occurences of visitExecutableAsMethod

visitExecutableAsMethod occurences:
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsMethod(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsMethod(javax.lang.model.element.ExecutableElement, P)


Occurences of visitExecutableAsStaticInit

visitExecutableAsStaticInit occurences:
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsStaticInit(javax.lang.model.element.ExecutableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitExecutableAsStaticInit(javax.lang.model.element.ExecutableElement, P)


Occurences of visitExpressionStatement

visitExpressionStatement occurences:
com.sun.source.tree.TreeVisitor.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, P)
com.sun.source.util.SimpleTreeVisitor.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, P)
com.sun.source.util.TreeScanner.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree, P)


Occurences of visitFile

visitFile occurences:
java.nio.file.FileVisitor.visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.FileVisitor.visitFile(T, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.SimpleFileVisitor.visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
java.nio.file.SimpleFileVisitor.visitFile(T, java.nio.file.attribute.BasicFileAttributes)


Occurences of visitFileFailed

visitFileFailed occurences:
java.nio.file.FileVisitor.visitFileFailed(java.lang.Object, java.io.IOException)
java.nio.file.FileVisitor.visitFileFailed(T, java.io.IOException)
java.nio.file.SimpleFileVisitor.visitFileFailed(java.lang.Object, java.io.IOException)
java.nio.file.SimpleFileVisitor.visitFileFailed(T, java.io.IOException)


Occurences of visitFloat

visitFloat occurences:
javax.lang.model.element.AnnotationValueVisitor.visitFloat(float, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitFloat(float, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitFloat(float, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitFloat(float, P)


Occurences of visitForLoop

visitForLoop occurences:
com.sun.source.tree.TreeVisitor.visitForLoop(com.sun.source.tree.ForLoopTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitForLoop(com.sun.source.tree.ForLoopTree, P)
com.sun.source.util.SimpleTreeVisitor.visitForLoop(com.sun.source.tree.ForLoopTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitForLoop(com.sun.source.tree.ForLoopTree, P)
com.sun.source.util.TreeScanner.visitForLoop(com.sun.source.tree.ForLoopTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitForLoop(com.sun.source.tree.ForLoopTree, P)


Occurences of visitIdentifier

visitIdentifier occurences:
com.sun.source.doctree.DocTreeVisitor.visitIdentifier(com.sun.source.doctree.IdentifierTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitIdentifier(com.sun.source.doctree.IdentifierTree, P)
com.sun.source.tree.TreeVisitor.visitIdentifier(com.sun.source.tree.IdentifierTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitIdentifier(com.sun.source.tree.IdentifierTree, P)
com.sun.source.util.DocTreeScanner.visitIdentifier(com.sun.source.doctree.IdentifierTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitIdentifier(com.sun.source.doctree.IdentifierTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitIdentifier(com.sun.source.doctree.IdentifierTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitIdentifier(com.sun.source.doctree.IdentifierTree, P)
com.sun.source.util.SimpleTreeVisitor.visitIdentifier(com.sun.source.tree.IdentifierTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitIdentifier(com.sun.source.tree.IdentifierTree, P)
com.sun.source.util.TreeScanner.visitIdentifier(com.sun.source.tree.IdentifierTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitIdentifier(com.sun.source.tree.IdentifierTree, P)


Occurences of visitIf

visitIf occurences:
com.sun.source.tree.TreeVisitor.visitIf(com.sun.source.tree.IfTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitIf(com.sun.source.tree.IfTree, P)
com.sun.source.util.SimpleTreeVisitor.visitIf(com.sun.source.tree.IfTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitIf(com.sun.source.tree.IfTree, P)
com.sun.source.util.TreeScanner.visitIf(com.sun.source.tree.IfTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitIf(com.sun.source.tree.IfTree, P)


Occurences of visitImport

visitImport occurences:
com.sun.source.tree.TreeVisitor.visitImport(com.sun.source.tree.ImportTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitImport(com.sun.source.tree.ImportTree, P)
com.sun.source.util.SimpleTreeVisitor.visitImport(com.sun.source.tree.ImportTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitImport(com.sun.source.tree.ImportTree, P)
com.sun.source.util.TreeScanner.visitImport(com.sun.source.tree.ImportTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitImport(com.sun.source.tree.ImportTree, P)


Occurences of visitInheritDoc

visitInheritDoc occurences:
com.sun.source.doctree.DocTreeVisitor.visitInheritDoc(com.sun.source.doctree.InheritDocTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitInheritDoc(com.sun.source.doctree.InheritDocTree, P)
com.sun.source.util.DocTreeScanner.visitInheritDoc(com.sun.source.doctree.InheritDocTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitInheritDoc(com.sun.source.doctree.InheritDocTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitInheritDoc(com.sun.source.doctree.InheritDocTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitInheritDoc(com.sun.source.doctree.InheritDocTree, P)


Occurences of visitInstanceOf

visitInstanceOf occurences:
com.sun.source.tree.TreeVisitor.visitInstanceOf(com.sun.source.tree.InstanceOfTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitInstanceOf(com.sun.source.tree.InstanceOfTree, P)
com.sun.source.util.SimpleTreeVisitor.visitInstanceOf(com.sun.source.tree.InstanceOfTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitInstanceOf(com.sun.source.tree.InstanceOfTree, P)
com.sun.source.util.TreeScanner.visitInstanceOf(com.sun.source.tree.InstanceOfTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitInstanceOf(com.sun.source.tree.InstanceOfTree, P)


Occurences of visitInt

visitInt occurences:
javax.lang.model.element.AnnotationValueVisitor.visitInt(int, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitInt(int, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitInt(int, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitInt(int, P)


Occurences of visitIntersection

visitIntersection occurences:
javax.lang.model.type.TypeVisitor.visitIntersection(javax.lang.model.type.IntersectionType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitIntersection(javax.lang.model.type.IntersectionType, P)
javax.lang.model.util.AbstractTypeVisitor6.visitIntersection(javax.lang.model.type.IntersectionType, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor6.visitIntersection(javax.lang.model.type.IntersectionType, P)
javax.lang.model.util.AbstractTypeVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, P)
javax.lang.model.util.SimpleTypeVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, P)
javax.lang.model.util.TypeKindVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor8.visitIntersection(javax.lang.model.type.IntersectionType, P)


Occurences of visitIntersectionType

visitIntersectionType occurences:
com.sun.source.tree.TreeVisitor.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, P)
com.sun.source.util.TreeScanner.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitIntersectionType(com.sun.source.tree.IntersectionTypeTree, P)


Occurences of visitLabeledStatement

visitLabeledStatement occurences:
com.sun.source.tree.TreeVisitor.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, P)
com.sun.source.util.SimpleTreeVisitor.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, P)
com.sun.source.util.TreeScanner.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitLabeledStatement(com.sun.source.tree.LabeledStatementTree, P)


Occurences of visitLambdaExpression

visitLambdaExpression occurences:
com.sun.source.tree.TreeVisitor.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, P)
com.sun.source.util.SimpleTreeVisitor.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, P)
com.sun.source.util.TreeScanner.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree, P)


Occurences of visitLink

visitLink occurences:
com.sun.source.doctree.DocTreeVisitor.visitLink(com.sun.source.doctree.LinkTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitLink(com.sun.source.doctree.LinkTree, P)
com.sun.source.util.DocTreeScanner.visitLink(com.sun.source.doctree.LinkTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitLink(com.sun.source.doctree.LinkTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitLink(com.sun.source.doctree.LinkTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitLink(com.sun.source.doctree.LinkTree, P)


Occurences of visitLiteral

visitLiteral occurences:
com.sun.source.doctree.DocTreeVisitor.visitLiteral(com.sun.source.doctree.LiteralTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitLiteral(com.sun.source.doctree.LiteralTree, P)
com.sun.source.tree.TreeVisitor.visitLiteral(com.sun.source.tree.LiteralTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitLiteral(com.sun.source.tree.LiteralTree, P)
com.sun.source.util.DocTreeScanner.visitLiteral(com.sun.source.doctree.LiteralTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitLiteral(com.sun.source.doctree.LiteralTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitLiteral(com.sun.source.doctree.LiteralTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitLiteral(com.sun.source.doctree.LiteralTree, P)
com.sun.source.util.SimpleTreeVisitor.visitLiteral(com.sun.source.tree.LiteralTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitLiteral(com.sun.source.tree.LiteralTree, P)
com.sun.source.util.TreeScanner.visitLiteral(com.sun.source.tree.LiteralTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitLiteral(com.sun.source.tree.LiteralTree, P)


Occurences of visitLong

visitLong occurences:
javax.lang.model.element.AnnotationValueVisitor.visitLong(long, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitLong(long, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitLong(long, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitLong(long, P)


Occurences of visitMemberReference

visitMemberReference occurences:
com.sun.source.tree.TreeVisitor.visitMemberReference(com.sun.source.tree.MemberReferenceTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitMemberReference(com.sun.source.tree.MemberReferenceTree, P)
com.sun.source.util.SimpleTreeVisitor.visitMemberReference(com.sun.source.tree.MemberReferenceTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitMemberReference(com.sun.source.tree.MemberReferenceTree, P)
com.sun.source.util.TreeScanner.visitMemberReference(com.sun.source.tree.MemberReferenceTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitMemberReference(com.sun.source.tree.MemberReferenceTree, P)


Occurences of visitMemberSelect

visitMemberSelect occurences:
com.sun.source.tree.TreeVisitor.visitMemberSelect(com.sun.source.tree.MemberSelectTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitMemberSelect(com.sun.source.tree.MemberSelectTree, P)
com.sun.source.util.SimpleTreeVisitor.visitMemberSelect(com.sun.source.tree.MemberSelectTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitMemberSelect(com.sun.source.tree.MemberSelectTree, P)
com.sun.source.util.TreeScanner.visitMemberSelect(com.sun.source.tree.MemberSelectTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitMemberSelect(com.sun.source.tree.MemberSelectTree, P)


Occurences of visitMethod

visitMethod occurences:
com.sun.source.tree.TreeVisitor.visitMethod(com.sun.source.tree.MethodTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitMethod(com.sun.source.tree.MethodTree, P)
com.sun.source.util.SimpleTreeVisitor.visitMethod(com.sun.source.tree.MethodTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitMethod(com.sun.source.tree.MethodTree, P)
com.sun.source.util.TreeScanner.visitMethod(com.sun.source.tree.MethodTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitMethod(com.sun.source.tree.MethodTree, P)


Occurences of visitMethodInvocation

visitMethodInvocation occurences:
com.sun.source.tree.TreeVisitor.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, P)
com.sun.source.util.SimpleTreeVisitor.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, P)
com.sun.source.util.TreeScanner.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitMethodInvocation(com.sun.source.tree.MethodInvocationTree, P)


Occurences of visitModifiers

visitModifiers occurences:
com.sun.source.tree.TreeVisitor.visitModifiers(com.sun.source.tree.ModifiersTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitModifiers(com.sun.source.tree.ModifiersTree, P)
com.sun.source.util.SimpleTreeVisitor.visitModifiers(com.sun.source.tree.ModifiersTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitModifiers(com.sun.source.tree.ModifiersTree, P)
com.sun.source.util.TreeScanner.visitModifiers(com.sun.source.tree.ModifiersTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitModifiers(com.sun.source.tree.ModifiersTree, P)


Occurences of visitNewArray

visitNewArray occurences:
com.sun.source.tree.TreeVisitor.visitNewArray(com.sun.source.tree.NewArrayTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitNewArray(com.sun.source.tree.NewArrayTree, P)
com.sun.source.util.SimpleTreeVisitor.visitNewArray(com.sun.source.tree.NewArrayTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitNewArray(com.sun.source.tree.NewArrayTree, P)
com.sun.source.util.TreeScanner.visitNewArray(com.sun.source.tree.NewArrayTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitNewArray(com.sun.source.tree.NewArrayTree, P)


Occurences of visitNewClass

visitNewClass occurences:
com.sun.source.tree.TreeVisitor.visitNewClass(com.sun.source.tree.NewClassTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitNewClass(com.sun.source.tree.NewClassTree, P)
com.sun.source.util.SimpleTreeVisitor.visitNewClass(com.sun.source.tree.NewClassTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitNewClass(com.sun.source.tree.NewClassTree, P)
com.sun.source.util.TreeScanner.visitNewClass(com.sun.source.tree.NewClassTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitNewClass(com.sun.source.tree.NewClassTree, P)


Occurences of visitNoType

visitNoType occurences:
javax.lang.model.type.TypeVisitor.visitNoType(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitNoType(javax.lang.model.type.NoType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitNoType(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitNoType(javax.lang.model.type.NoType, P)
javax.lang.model.util.TypeKindVisitor6.visitNoType(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitNoType(javax.lang.model.type.NoType, P)


Occurences of visitNoTypeAsNone

visitNoTypeAsNone occurences:
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsNone(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsNone(javax.lang.model.type.NoType, P)


Occurences of visitNoTypeAsPackage

visitNoTypeAsPackage occurences:
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsPackage(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsPackage(javax.lang.model.type.NoType, P)


Occurences of visitNoTypeAsVoid

visitNoTypeAsVoid occurences:
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsVoid(javax.lang.model.type.NoType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitNoTypeAsVoid(javax.lang.model.type.NoType, P)


Occurences of visitNull

visitNull occurences:
javax.lang.model.type.TypeVisitor.visitNull(javax.lang.model.type.NullType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitNull(javax.lang.model.type.NullType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitNull(javax.lang.model.type.NullType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitNull(javax.lang.model.type.NullType, P)


Occurences of visitOther

visitOther occurences:
com.sun.source.doctree.DocTreeVisitor.visitOther(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitOther(com.sun.source.doctree.DocTree, P)
com.sun.source.tree.TreeVisitor.visitOther(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitOther(com.sun.source.tree.Tree, P)
com.sun.source.util.DocTreeScanner.visitOther(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitOther(com.sun.source.doctree.DocTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitOther(com.sun.source.doctree.DocTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitOther(com.sun.source.doctree.DocTree, P)
com.sun.source.util.SimpleTreeVisitor.visitOther(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitOther(com.sun.source.tree.Tree, P)
com.sun.source.util.TreeScanner.visitOther(com.sun.source.tree.Tree, java.lang.Object)
com.sun.source.util.TreeScanner.visitOther(com.sun.source.tree.Tree, P)


Occurences of visitPackage

visitPackage occurences:
javax.lang.model.element.ElementVisitor.visitPackage(javax.lang.model.element.PackageElement, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitPackage(javax.lang.model.element.PackageElement, P)
javax.lang.model.util.ElementKindVisitor6.visitPackage(javax.lang.model.element.PackageElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitPackage(javax.lang.model.element.PackageElement, P)
javax.lang.model.util.ElementScanner6.visitPackage(javax.lang.model.element.PackageElement, java.lang.Object)
javax.lang.model.util.ElementScanner6.visitPackage(javax.lang.model.element.PackageElement, P)
javax.lang.model.util.SimpleElementVisitor6.visitPackage(javax.lang.model.element.PackageElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.visitPackage(javax.lang.model.element.PackageElement, P)


Occurences of visitParam

visitParam occurences:
com.sun.source.doctree.DocTreeVisitor.visitParam(com.sun.source.doctree.ParamTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitParam(com.sun.source.doctree.ParamTree, P)
com.sun.source.util.DocTreeScanner.visitParam(com.sun.source.doctree.ParamTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitParam(com.sun.source.doctree.ParamTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitParam(com.sun.source.doctree.ParamTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitParam(com.sun.source.doctree.ParamTree, P)


Occurences of visitParameterizedType

visitParameterizedType occurences:
com.sun.source.tree.TreeVisitor.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, P)
com.sun.source.util.TreeScanner.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree, P)


Occurences of visitParenthesized

visitParenthesized occurences:
com.sun.source.tree.TreeVisitor.visitParenthesized(com.sun.source.tree.ParenthesizedTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitParenthesized(com.sun.source.tree.ParenthesizedTree, P)
com.sun.source.util.SimpleTreeVisitor.visitParenthesized(com.sun.source.tree.ParenthesizedTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitParenthesized(com.sun.source.tree.ParenthesizedTree, P)
com.sun.source.util.TreeScanner.visitParenthesized(com.sun.source.tree.ParenthesizedTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitParenthesized(com.sun.source.tree.ParenthesizedTree, P)


Occurences of visitPrimitive

visitPrimitive occurences:
javax.lang.model.type.TypeVisitor.visitPrimitive(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitPrimitive(javax.lang.model.type.PrimitiveType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitPrimitive(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitPrimitive(javax.lang.model.type.PrimitiveType, P)
javax.lang.model.util.TypeKindVisitor6.visitPrimitive(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitive(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsBoolean

visitPrimitiveAsBoolean occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsBoolean(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsBoolean(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsByte

visitPrimitiveAsByte occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsByte(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsByte(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsChar

visitPrimitiveAsChar occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsChar(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsChar(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsDouble

visitPrimitiveAsDouble occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsDouble(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsDouble(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsFloat

visitPrimitiveAsFloat occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsFloat(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsFloat(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsInt

visitPrimitiveAsInt occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsInt(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsInt(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsLong

visitPrimitiveAsLong occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsLong(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsLong(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveAsShort

visitPrimitiveAsShort occurences:
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsShort(javax.lang.model.type.PrimitiveType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor6.visitPrimitiveAsShort(javax.lang.model.type.PrimitiveType, P)


Occurences of visitPrimitiveType

visitPrimitiveType occurences:
com.sun.source.tree.TreeVisitor.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, P)
com.sun.source.util.TreeScanner.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree, P)


Occurences of visitReference

visitReference occurences:
com.sun.source.doctree.DocTreeVisitor.visitReference(com.sun.source.doctree.ReferenceTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitReference(com.sun.source.doctree.ReferenceTree, P)
com.sun.source.util.DocTreeScanner.visitReference(com.sun.source.doctree.ReferenceTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitReference(com.sun.source.doctree.ReferenceTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitReference(com.sun.source.doctree.ReferenceTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitReference(com.sun.source.doctree.ReferenceTree, P)


Occurences of visitReturn

visitReturn occurences:
com.sun.source.doctree.DocTreeVisitor.visitReturn(com.sun.source.doctree.ReturnTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitReturn(com.sun.source.doctree.ReturnTree, P)
com.sun.source.tree.TreeVisitor.visitReturn(com.sun.source.tree.ReturnTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitReturn(com.sun.source.tree.ReturnTree, P)
com.sun.source.util.DocTreeScanner.visitReturn(com.sun.source.doctree.ReturnTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitReturn(com.sun.source.doctree.ReturnTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitReturn(com.sun.source.doctree.ReturnTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitReturn(com.sun.source.doctree.ReturnTree, P)
com.sun.source.util.SimpleTreeVisitor.visitReturn(com.sun.source.tree.ReturnTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitReturn(com.sun.source.tree.ReturnTree, P)
com.sun.source.util.TreeScanner.visitReturn(com.sun.source.tree.ReturnTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitReturn(com.sun.source.tree.ReturnTree, P)


Occurences of visitSee

visitSee occurences:
com.sun.source.doctree.DocTreeVisitor.visitSee(com.sun.source.doctree.SeeTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitSee(com.sun.source.doctree.SeeTree, P)
com.sun.source.util.DocTreeScanner.visitSee(com.sun.source.doctree.SeeTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitSee(com.sun.source.doctree.SeeTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitSee(com.sun.source.doctree.SeeTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitSee(com.sun.source.doctree.SeeTree, P)


Occurences of visitSerial

visitSerial occurences:
com.sun.source.doctree.DocTreeVisitor.visitSerial(com.sun.source.doctree.SerialTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitSerial(com.sun.source.doctree.SerialTree, P)
com.sun.source.util.DocTreeScanner.visitSerial(com.sun.source.doctree.SerialTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitSerial(com.sun.source.doctree.SerialTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitSerial(com.sun.source.doctree.SerialTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitSerial(com.sun.source.doctree.SerialTree, P)


Occurences of visitSerialData

visitSerialData occurences:
com.sun.source.doctree.DocTreeVisitor.visitSerialData(com.sun.source.doctree.SerialDataTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitSerialData(com.sun.source.doctree.SerialDataTree, P)
com.sun.source.util.DocTreeScanner.visitSerialData(com.sun.source.doctree.SerialDataTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitSerialData(com.sun.source.doctree.SerialDataTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitSerialData(com.sun.source.doctree.SerialDataTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitSerialData(com.sun.source.doctree.SerialDataTree, P)


Occurences of visitSerialField

visitSerialField occurences:
com.sun.source.doctree.DocTreeVisitor.visitSerialField(com.sun.source.doctree.SerialFieldTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitSerialField(com.sun.source.doctree.SerialFieldTree, P)
com.sun.source.util.DocTreeScanner.visitSerialField(com.sun.source.doctree.SerialFieldTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitSerialField(com.sun.source.doctree.SerialFieldTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitSerialField(com.sun.source.doctree.SerialFieldTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitSerialField(com.sun.source.doctree.SerialFieldTree, P)


Occurences of visitShort

visitShort occurences:
javax.lang.model.element.AnnotationValueVisitor.visitShort(short, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitShort(short, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitShort(short, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitShort(short, P)


Occurences of visitSince

visitSince occurences:
com.sun.source.doctree.DocTreeVisitor.visitSince(com.sun.source.doctree.SinceTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitSince(com.sun.source.doctree.SinceTree, P)
com.sun.source.util.DocTreeScanner.visitSince(com.sun.source.doctree.SinceTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitSince(com.sun.source.doctree.SinceTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitSince(com.sun.source.doctree.SinceTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitSince(com.sun.source.doctree.SinceTree, P)


Occurences of visitStartElement

visitStartElement occurences:
com.sun.source.doctree.DocTreeVisitor.visitStartElement(com.sun.source.doctree.StartElementTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitStartElement(com.sun.source.doctree.StartElementTree, P)
com.sun.source.util.DocTreeScanner.visitStartElement(com.sun.source.doctree.StartElementTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitStartElement(com.sun.source.doctree.StartElementTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitStartElement(com.sun.source.doctree.StartElementTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitStartElement(com.sun.source.doctree.StartElementTree, P)


Occurences of visitString

visitString occurences:
javax.lang.model.element.AnnotationValueVisitor.visitString(java.lang.String, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitString(java.lang.String, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitString(java.lang.String, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitString(java.lang.String, P)


Occurences of visitSwitch

visitSwitch occurences:
com.sun.source.tree.TreeVisitor.visitSwitch(com.sun.source.tree.SwitchTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitSwitch(com.sun.source.tree.SwitchTree, P)
com.sun.source.util.SimpleTreeVisitor.visitSwitch(com.sun.source.tree.SwitchTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitSwitch(com.sun.source.tree.SwitchTree, P)
com.sun.source.util.TreeScanner.visitSwitch(com.sun.source.tree.SwitchTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitSwitch(com.sun.source.tree.SwitchTree, P)


Occurences of visitSynchronized

visitSynchronized occurences:
com.sun.source.tree.TreeVisitor.visitSynchronized(com.sun.source.tree.SynchronizedTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitSynchronized(com.sun.source.tree.SynchronizedTree, P)
com.sun.source.util.SimpleTreeVisitor.visitSynchronized(com.sun.source.tree.SynchronizedTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitSynchronized(com.sun.source.tree.SynchronizedTree, P)
com.sun.source.util.TreeScanner.visitSynchronized(com.sun.source.tree.SynchronizedTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitSynchronized(com.sun.source.tree.SynchronizedTree, P)


Occurences of visitText

visitText occurences:
com.sun.source.doctree.DocTreeVisitor.visitText(com.sun.source.doctree.TextTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitText(com.sun.source.doctree.TextTree, P)
com.sun.source.util.DocTreeScanner.visitText(com.sun.source.doctree.TextTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitText(com.sun.source.doctree.TextTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitText(com.sun.source.doctree.TextTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitText(com.sun.source.doctree.TextTree, P)


Occurences of visitThrow

visitThrow occurences:
com.sun.source.tree.TreeVisitor.visitThrow(com.sun.source.tree.ThrowTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitThrow(com.sun.source.tree.ThrowTree, P)
com.sun.source.util.SimpleTreeVisitor.visitThrow(com.sun.source.tree.ThrowTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitThrow(com.sun.source.tree.ThrowTree, P)
com.sun.source.util.TreeScanner.visitThrow(com.sun.source.tree.ThrowTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitThrow(com.sun.source.tree.ThrowTree, P)


Occurences of visitThrows

visitThrows occurences:
com.sun.source.doctree.DocTreeVisitor.visitThrows(com.sun.source.doctree.ThrowsTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitThrows(com.sun.source.doctree.ThrowsTree, P)
com.sun.source.util.DocTreeScanner.visitThrows(com.sun.source.doctree.ThrowsTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitThrows(com.sun.source.doctree.ThrowsTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitThrows(com.sun.source.doctree.ThrowsTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitThrows(com.sun.source.doctree.ThrowsTree, P)


Occurences of visitTry

visitTry occurences:
com.sun.source.tree.TreeVisitor.visitTry(com.sun.source.tree.TryTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitTry(com.sun.source.tree.TryTree, P)
com.sun.source.util.SimpleTreeVisitor.visitTry(com.sun.source.tree.TryTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitTry(com.sun.source.tree.TryTree, P)
com.sun.source.util.TreeScanner.visitTry(com.sun.source.tree.TryTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitTry(com.sun.source.tree.TryTree, P)


Occurences of visitType

visitType occurences:
javax.lang.model.element.AnnotationValueVisitor.visitType(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitType(javax.lang.model.type.TypeMirror, P)
javax.lang.model.element.ElementVisitor.visitType(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitType(javax.lang.model.element.TypeElement, P)
javax.lang.model.util.ElementKindVisitor6.visitType(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitType(javax.lang.model.element.TypeElement, P)
javax.lang.model.util.ElementScanner6.visitType(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementScanner6.visitType(javax.lang.model.element.TypeElement, P)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitType(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.util.SimpleAnnotationValueVisitor6.visitType(javax.lang.model.type.TypeMirror, P)
javax.lang.model.util.SimpleElementVisitor6.visitType(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.visitType(javax.lang.model.element.TypeElement, P)


Occurences of visitTypeAsAnnotationType

visitTypeAsAnnotationType occurences:
javax.lang.model.util.ElementKindVisitor6.visitTypeAsAnnotationType(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitTypeAsAnnotationType(javax.lang.model.element.TypeElement, P)


Occurences of visitTypeAsClass

visitTypeAsClass occurences:
javax.lang.model.util.ElementKindVisitor6.visitTypeAsClass(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitTypeAsClass(javax.lang.model.element.TypeElement, P)


Occurences of visitTypeAsEnum

visitTypeAsEnum occurences:
javax.lang.model.util.ElementKindVisitor6.visitTypeAsEnum(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitTypeAsEnum(javax.lang.model.element.TypeElement, P)


Occurences of visitTypeAsInterface

visitTypeAsInterface occurences:
javax.lang.model.util.ElementKindVisitor6.visitTypeAsInterface(javax.lang.model.element.TypeElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitTypeAsInterface(javax.lang.model.element.TypeElement, P)


Occurences of visitTypeCast

visitTypeCast occurences:
com.sun.source.tree.TreeVisitor.visitTypeCast(com.sun.source.tree.TypeCastTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitTypeCast(com.sun.source.tree.TypeCastTree, P)
com.sun.source.util.SimpleTreeVisitor.visitTypeCast(com.sun.source.tree.TypeCastTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitTypeCast(com.sun.source.tree.TypeCastTree, P)
com.sun.source.util.TreeScanner.visitTypeCast(com.sun.source.tree.TypeCastTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitTypeCast(com.sun.source.tree.TypeCastTree, P)


Occurences of visitTypeParameter

visitTypeParameter occurences:
com.sun.source.tree.TreeVisitor.visitTypeParameter(com.sun.source.tree.TypeParameterTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitTypeParameter(com.sun.source.tree.TypeParameterTree, P)
com.sun.source.util.SimpleTreeVisitor.visitTypeParameter(com.sun.source.tree.TypeParameterTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitTypeParameter(com.sun.source.tree.TypeParameterTree, P)
com.sun.source.util.TreeScanner.visitTypeParameter(com.sun.source.tree.TypeParameterTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitTypeParameter(com.sun.source.tree.TypeParameterTree, P)
javax.lang.model.element.ElementVisitor.visitTypeParameter(javax.lang.model.element.TypeParameterElement, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitTypeParameter(javax.lang.model.element.TypeParameterElement, P)
javax.lang.model.util.ElementKindVisitor6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, P)
javax.lang.model.util.ElementScanner6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, java.lang.Object)
javax.lang.model.util.ElementScanner6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, P)
javax.lang.model.util.SimpleElementVisitor6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.visitTypeParameter(javax.lang.model.element.TypeParameterElement, P)


Occurences of visitTypeVariable

visitTypeVariable occurences:
javax.lang.model.type.TypeVisitor.visitTypeVariable(javax.lang.model.type.TypeVariable, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitTypeVariable(javax.lang.model.type.TypeVariable, P)
javax.lang.model.util.SimpleTypeVisitor6.visitTypeVariable(javax.lang.model.type.TypeVariable, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitTypeVariable(javax.lang.model.type.TypeVariable, P)


Occurences of visitUnary

visitUnary occurences:
com.sun.source.tree.TreeVisitor.visitUnary(com.sun.source.tree.UnaryTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitUnary(com.sun.source.tree.UnaryTree, P)
com.sun.source.util.SimpleTreeVisitor.visitUnary(com.sun.source.tree.UnaryTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitUnary(com.sun.source.tree.UnaryTree, P)
com.sun.source.util.TreeScanner.visitUnary(com.sun.source.tree.UnaryTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitUnary(com.sun.source.tree.UnaryTree, P)


Occurences of visitUnion

visitUnion occurences:
javax.lang.model.type.TypeVisitor.visitUnion(javax.lang.model.type.UnionType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitUnion(javax.lang.model.type.UnionType, P)
javax.lang.model.util.AbstractTypeVisitor6.visitUnion(javax.lang.model.type.UnionType, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor6.visitUnion(javax.lang.model.type.UnionType, P)
javax.lang.model.util.AbstractTypeVisitor7.visitUnion(javax.lang.model.type.UnionType, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor7.visitUnion(javax.lang.model.type.UnionType, P)
javax.lang.model.util.SimpleTypeVisitor7.visitUnion(javax.lang.model.type.UnionType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor7.visitUnion(javax.lang.model.type.UnionType, P)
javax.lang.model.util.TypeKindVisitor7.visitUnion(javax.lang.model.type.UnionType, java.lang.Object)
javax.lang.model.util.TypeKindVisitor7.visitUnion(javax.lang.model.type.UnionType, P)


Occurences of visitUnionType

visitUnionType occurences:
com.sun.source.tree.TreeVisitor.visitUnionType(com.sun.source.tree.UnionTypeTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitUnionType(com.sun.source.tree.UnionTypeTree, P)
com.sun.source.util.SimpleTreeVisitor.visitUnionType(com.sun.source.tree.UnionTypeTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitUnionType(com.sun.source.tree.UnionTypeTree, P)
com.sun.source.util.TreeScanner.visitUnionType(com.sun.source.tree.UnionTypeTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitUnionType(com.sun.source.tree.UnionTypeTree, P)


Occurences of visitUnknown

visitUnknown occurences:
javax.lang.model.element.AnnotationValueVisitor.visitUnknown(javax.lang.model.element.AnnotationValue, java.lang.Object)
javax.lang.model.element.AnnotationValueVisitor.visitUnknown(javax.lang.model.element.AnnotationValue, P)
javax.lang.model.element.ElementVisitor.visitUnknown(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitUnknown(javax.lang.model.element.Element, P)
javax.lang.model.type.TypeVisitor.visitUnknown(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitUnknown(javax.lang.model.type.TypeMirror, P)
javax.lang.model.util.AbstractAnnotationValueVisitor6.visitUnknown(javax.lang.model.element.AnnotationValue, java.lang.Object)
javax.lang.model.util.AbstractAnnotationValueVisitor6.visitUnknown(javax.lang.model.element.AnnotationValue, P)
javax.lang.model.util.AbstractElementVisitor6.visitUnknown(javax.lang.model.element.Element, java.lang.Object)
javax.lang.model.util.AbstractElementVisitor6.visitUnknown(javax.lang.model.element.Element, P)
javax.lang.model.util.AbstractTypeVisitor6.visitUnknown(javax.lang.model.type.TypeMirror, java.lang.Object)
javax.lang.model.util.AbstractTypeVisitor6.visitUnknown(javax.lang.model.type.TypeMirror, P)


Occurences of visitUnknownBlockTag

visitUnknownBlockTag occurences:
com.sun.source.doctree.DocTreeVisitor.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, P)
com.sun.source.util.DocTreeScanner.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitUnknownBlockTag(com.sun.source.doctree.UnknownBlockTagTree, P)


Occurences of visitUnknownInlineTag

visitUnknownInlineTag occurences:
com.sun.source.doctree.DocTreeVisitor.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, P)
com.sun.source.util.DocTreeScanner.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitUnknownInlineTag(com.sun.source.doctree.UnknownInlineTagTree, P)


Occurences of visitValue

visitValue occurences:
com.sun.source.doctree.DocTreeVisitor.visitValue(com.sun.source.doctree.ValueTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitValue(com.sun.source.doctree.ValueTree, P)
com.sun.source.util.DocTreeScanner.visitValue(com.sun.source.doctree.ValueTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitValue(com.sun.source.doctree.ValueTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitValue(com.sun.source.doctree.ValueTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitValue(com.sun.source.doctree.ValueTree, P)


Occurences of visitVariable

visitVariable occurences:
com.sun.source.tree.TreeVisitor.visitVariable(com.sun.source.tree.VariableTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitVariable(com.sun.source.tree.VariableTree, P)
com.sun.source.util.SimpleTreeVisitor.visitVariable(com.sun.source.tree.VariableTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitVariable(com.sun.source.tree.VariableTree, P)
com.sun.source.util.TreeScanner.visitVariable(com.sun.source.tree.VariableTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitVariable(com.sun.source.tree.VariableTree, P)
javax.lang.model.element.ElementVisitor.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.element.ElementVisitor.visitVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.ElementKindVisitor6.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.ElementScanner6.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementScanner6.visitVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.ElementScanner7.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementScanner7.visitVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.SimpleElementVisitor6.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor6.visitVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.SimpleElementVisitor7.visitVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.SimpleElementVisitor7.visitVariable(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsEnumConstant

visitVariableAsEnumConstant occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsEnumConstant(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsEnumConstant(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsExceptionParameter

visitVariableAsExceptionParameter occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsExceptionParameter(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsExceptionParameter(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsField

visitVariableAsField occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsField(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsField(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsLocalVariable

visitVariableAsLocalVariable occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsLocalVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsLocalVariable(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsParameter

visitVariableAsParameter occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsParameter(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsParameter(javax.lang.model.element.VariableElement, P)


Occurences of visitVariableAsResourceVariable

visitVariableAsResourceVariable occurences:
javax.lang.model.util.ElementKindVisitor6.visitVariableAsResourceVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor6.visitVariableAsResourceVariable(javax.lang.model.element.VariableElement, P)
javax.lang.model.util.ElementKindVisitor7.visitVariableAsResourceVariable(javax.lang.model.element.VariableElement, java.lang.Object)
javax.lang.model.util.ElementKindVisitor7.visitVariableAsResourceVariable(javax.lang.model.element.VariableElement, P)


Occurences of visitVersion

visitVersion occurences:
com.sun.source.doctree.DocTreeVisitor.visitVersion(com.sun.source.doctree.VersionTree, java.lang.Object)
com.sun.source.doctree.DocTreeVisitor.visitVersion(com.sun.source.doctree.VersionTree, P)
com.sun.source.util.DocTreeScanner.visitVersion(com.sun.source.doctree.VersionTree, java.lang.Object)
com.sun.source.util.DocTreeScanner.visitVersion(com.sun.source.doctree.VersionTree, P)
com.sun.source.util.SimpleDocTreeVisitor.visitVersion(com.sun.source.doctree.VersionTree, java.lang.Object)
com.sun.source.util.SimpleDocTreeVisitor.visitVersion(com.sun.source.doctree.VersionTree, P)


Occurences of visitWhileLoop

visitWhileLoop occurences:
com.sun.source.tree.TreeVisitor.visitWhileLoop(com.sun.source.tree.WhileLoopTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitWhileLoop(com.sun.source.tree.WhileLoopTree, P)
com.sun.source.util.SimpleTreeVisitor.visitWhileLoop(com.sun.source.tree.WhileLoopTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitWhileLoop(com.sun.source.tree.WhileLoopTree, P)
com.sun.source.util.TreeScanner.visitWhileLoop(com.sun.source.tree.WhileLoopTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitWhileLoop(com.sun.source.tree.WhileLoopTree, P)


Occurences of visitWildcard

visitWildcard occurences:
com.sun.source.tree.TreeVisitor.visitWildcard(com.sun.source.tree.WildcardTree, java.lang.Object)
com.sun.source.tree.TreeVisitor.visitWildcard(com.sun.source.tree.WildcardTree, P)
com.sun.source.util.SimpleTreeVisitor.visitWildcard(com.sun.source.tree.WildcardTree, java.lang.Object)
com.sun.source.util.SimpleTreeVisitor.visitWildcard(com.sun.source.tree.WildcardTree, P)
com.sun.source.util.TreeScanner.visitWildcard(com.sun.source.tree.WildcardTree, java.lang.Object)
com.sun.source.util.TreeScanner.visitWildcard(com.sun.source.tree.WildcardTree, P)
javax.lang.model.type.TypeVisitor.visitWildcard(javax.lang.model.type.WildcardType, java.lang.Object)
javax.lang.model.type.TypeVisitor.visitWildcard(javax.lang.model.type.WildcardType, P)
javax.lang.model.util.SimpleTypeVisitor6.visitWildcard(javax.lang.model.type.WildcardType, java.lang.Object)
javax.lang.model.util.SimpleTypeVisitor6.visitWildcard(javax.lang.model.type.WildcardType, P)


Occurences of VMCannotBeModifiedException (constructors)

VMCannotBeModifiedException (constructors) occurences:
com.sun.jdi.VMCannotBeModifiedException()
com.sun.jdi.VMCannotBeModifiedException(java.lang.String)


Occurences of VMDisconnectedException (constructors)

VMDisconnectedException (constructors) occurences:
com.sun.jdi.VMDisconnectedException()
com.sun.jdi.VMDisconnectedException(java.lang.String)


Occurences of VMMismatchException (constructors)

VMMismatchException (constructors) occurences:
com.sun.jdi.VMMismatchException()
com.sun.jdi.VMMismatchException(java.lang.String)


Occurences of VMOutOfMemoryException (constructors)

VMOutOfMemoryException (constructors) occurences:
com.sun.jdi.VMOutOfMemoryException()
com.sun.jdi.VMOutOfMemoryException(java.lang.String)


Occurences of VMStartException (constructors)

VMStartException (constructors) occurences:
com.sun.jdi.connect.VMStartException(java.lang.Process)
com.sun.jdi.connect.VMStartException(java.lang.String, java.lang.Process)


Occurences of VOID

VOID occurences:
javax.lang.model.type.VOID
javax.management.openmbean.VOID


Occurences of VOLATILE

VOLATILE occurences:
java.lang.reflect.VOLATILE
javax.lang.model.element.VOLATILE


Occurences of VolatileCallSite (constructors)

VolatileCallSite (constructors) occurences:
java.lang.invoke.VolatileCallSite(java.lang.invoke.MethodHandle)
java.lang.invoke.VolatileCallSite(java.lang.invoke.MethodType)


Occurences of W3CDomHandler (constructors)

W3CDomHandler (constructors) occurences:
javax.xml.bind.annotation.W3CDomHandler()
javax.xml.bind.annotation.W3CDomHandler(javax.xml.parsers.DocumentBuilder)


Occurences of W3CEndpointReference (constructors)

W3CEndpointReference (constructors) occurences:
javax.xml.ws.wsaddressing.W3CEndpointReference()
javax.xml.ws.wsaddressing.W3CEndpointReference(javax.xml.transform.Source)


Occurences of wait

wait occurences:
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long, int)


Occurences of waitFor

waitFor occurences:
java.lang.Process.waitFor()
java.lang.Process.waitFor(long, java.util.concurrent.TimeUnit)


Occurences of waitForAll

waitForAll occurences:
java.awt.MediaTracker.waitForAll()
java.awt.MediaTracker.waitForAll(long)


Occurences of waitForID

waitForID occurences:
java.awt.MediaTracker.waitForID(int)
java.awt.MediaTracker.waitForID(int, long)


Occurences of WAIT_CURSOR

WAIT_CURSOR occurences:
java.awt.WAIT_CURSOR
java.awt.WAIT_CURSOR


Occurences of walk

walk occurences:
java.nio.file.Files.walk(java.nio.file.Path, int, java.nio.file.FileVisitOption...)
java.nio.file.Files.walk(java.nio.file.Path, java.nio.file.FileVisitOption...)


Occurences of walkFileTree

walkFileTree occurences:
java.nio.file.Files.walkFileTree(java.nio.file.Path, java.nio.file.FileVisitor)
java.nio.file.Files.walkFileTree(java.nio.file.Path, java.util.Set, int, java.nio.file.FileVisitor)


Occurences of warning

warning occurences:
java.util.logging.Logger.warning(java.lang.String)
java.util.logging.Logger.warning(java.util.function.Supplier)
javax.xml.transform.ErrorListener.warning(javax.xml.transform.TransformerException)
org.xml.sax.ErrorHandler.warning(org.xml.sax.SAXParseException)
org.xml.sax.HandlerBase.warning(org.xml.sax.SAXParseException)
org.xml.sax.helpers.DefaultHandler.warning(org.xml.sax.SAXParseException)
org.xml.sax.helpers.XMLFilterImpl.warning(org.xml.sax.SAXParseException)


Occurences of WARNING

WARNING occurences:
java.awt.WARNING
java.util.logging.WARNING
javax.print.attribute.standard.WARNING
javax.security.auth.callback.WARNING
javax.security.auth.callback.WARNING
javax.tools.WARNING
javax.xml.bind.WARNING


Occurences of warningListeners

warningListeners occurences:
javax.imageio.warningListeners
javax.imageio.warningListeners


Occurences of warningLocales

warningLocales occurences:
javax.imageio.warningLocales
javax.imageio.warningLocales


Occurences of warningOccurred

warningOccurred occurences:
javax.imageio.event.IIOReadWarningListener.warningOccurred(javax.imageio.ImageReader, java.lang.String)
javax.imageio.event.IIOWriteWarningListener.warningOccurred(javax.imageio.ImageWriter, int, java.lang.String)


Occurences of wasNull

wasNull occurences:
java.sql.CallableStatement.wasNull()
java.sql.ResultSet.wasNull()
java.sql.SQLInput.wasNull()
javax.sql.rowset.serial.SQLInputImpl.wasNull()


Occurences of WCharSeqHolder (constructors)

WCharSeqHolder (constructors) occurences:
org.omg.CORBA.WCharSeqHolder()
org.omg.CORBA.WCharSeqHolder(char:A)


Occurences of weakCompareAndSet

weakCompareAndSet occurences:
java.util.concurrent.atomic.AtomicBoolean.weakCompareAndSet(boolean, boolean)
java.util.concurrent.atomic.AtomicInteger.weakCompareAndSet(int, int)
java.util.concurrent.atomic.AtomicIntegerArray.weakCompareAndSet(int, int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.weakCompareAndSet(java.lang.Object, int, int)
java.util.concurrent.atomic.AtomicIntegerFieldUpdater.weakCompareAndSet(T, int, int)
java.util.concurrent.atomic.AtomicLong.weakCompareAndSet(long, long)
java.util.concurrent.atomic.AtomicLongArray.weakCompareAndSet(int, long, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.weakCompareAndSet(java.lang.Object, long, long)
java.util.concurrent.atomic.AtomicLongFieldUpdater.weakCompareAndSet(T, long, long)
java.util.concurrent.atomic.AtomicMarkableReference.weakCompareAndSet(java.lang.Object, java.lang.Object, boolean, boolean)
java.util.concurrent.atomic.AtomicMarkableReference.weakCompareAndSet(V, V, boolean, boolean)
java.util.concurrent.atomic.AtomicReference.weakCompareAndSet(java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReference.weakCompareAndSet(V, V)
java.util.concurrent.atomic.AtomicReferenceArray.weakCompareAndSet(int, E, E)
java.util.concurrent.atomic.AtomicReferenceArray.weakCompareAndSet(int, java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.weakCompareAndSet(java.lang.Object, java.lang.Object, java.lang.Object)
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.weakCompareAndSet(T, V, V)
java.util.concurrent.atomic.AtomicStampedReference.weakCompareAndSet(java.lang.Object, java.lang.Object, int, int)
java.util.concurrent.atomic.AtomicStampedReference.weakCompareAndSet(V, V, int, int)


Occurences of WeakHashMap (constructors)

WeakHashMap (constructors) occurences:
java.util.WeakHashMap()
java.util.WeakHashMap(int)
java.util.WeakHashMap(int, float)
java.util.WeakHashMap(java.util.Map)


Occurences of WeakReference (constructors)

WeakReference (constructors) occurences:
java.lang.ref.WeakReference(java.lang.Object)
java.lang.ref.WeakReference(java.lang.Object, java.lang.ref.ReferenceQueue)
java.lang.ref.WeakReference(T)
java.lang.ref.WeakReference(T, java.lang.ref.ReferenceQueue)


Occurences of Web Services

Web Services occurences:
Web Services
Web Services


Occurences of WebServiceException (constructors)

WebServiceException (constructors) occurences:
javax.xml.ws.WebServiceException()
javax.xml.ws.WebServiceException(java.lang.String)
javax.xml.ws.WebServiceException(java.lang.String, java.lang.Throwable)
javax.xml.ws.WebServiceException(java.lang.Throwable)


Occurences of WebServicePermission (constructors)

WebServicePermission (constructors) occurences:
javax.xml.ws.WebServicePermission(java.lang.String)
javax.xml.ws.WebServicePermission(java.lang.String, java.lang.String)


Occurences of WEDNESDAY

WEDNESDAY occurences:
java.time.WEDNESDAY
java.util.WEDNESDAY


Occurences of WEEK_BASED_YEARS

WEEK_BASED_YEARS occurences:
java.time.temporal.WEEK_BASED_YEARS
java.time.temporal.WEEK_BASED_YEARS


Occurences of WEEK_OF_MONTH

WEEK_OF_MONTH occurences:
java.text.WEEK_OF_MONTH
java.util.WEEK_OF_MONTH


Occurences of WEEK_OF_YEAR

WEEK_OF_YEAR occurences:
java.text.WEEK_OF_YEAR
java.util.WEEK_OF_YEAR


Occurences of WEST

WEST occurences:
java.awt.WEST
java.awt.WEST
javax.swing.WEST
javax.swing.WEST


Occurences of whenComplete

whenComplete occurences:
java.util.concurrent.CompletableFuture.whenComplete(java.util.function.BiConsumer)
java.util.concurrent.CompletionStage.whenComplete(java.util.function.BiConsumer)


Occurences of whenCompleteAsync

whenCompleteAsync occurences:
java.util.concurrent.CompletableFuture.whenCompleteAsync(java.util.function.BiConsumer)
java.util.concurrent.CompletableFuture.whenCompleteAsync(java.util.function.BiConsumer, java.util.concurrent.Executor)
java.util.concurrent.CompletionStage.whenCompleteAsync(java.util.function.BiConsumer)
java.util.concurrent.CompletionStage.whenCompleteAsync(java.util.function.BiConsumer, java.util.concurrent.Executor)


Occurences of width

width occurences:
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.geom.width
java.awt.image.width
java.awt.image.width
java.awt.width
java.awt.width
java.awt.width
javax.swing.Spring.width(java.awt.Component)
javax.swing.table.width


Occurences of WIDTH

WIDTH occurences:
java.awt.font.WIDTH
java.awt.image.WIDTH
javax.swing.text.html.WIDTH
javax.swing.text.html.WIDTH
javax.swing.WIDTH


Occurences of WILDCARD

WILDCARD occurences:
javax.lang.model.type.WILDCARD
javax.management.WILDCARD


Occurences of WildcardType

WildcardType occurences:
com.sun.javadoc.WildcardType
java.lang.reflect.WildcardType
javax.lang.model.type.WildcardType


Occurences of WINDOW

WINDOW occurences:
java.awt.WINDOW
javax.accessibility.WINDOW


Occurences of Window (constructors)

Window (constructors) occurences:
java.awt.Window(java.awt.Frame)
java.awt.Window(java.awt.Window)
java.awt.Window(java.awt.Window, java.awt.GraphicsConfiguration)


Occurences of windowActivated

windowActivated occurences:
java.awt.AWTEventMulticaster.windowActivated(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowActivated(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowActivated(java.awt.event.WindowEvent)


Occurences of windowClosed

windowClosed occurences:
java.awt.AWTEventMulticaster.windowClosed(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowClosed(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowClosed(java.awt.event.WindowEvent)


Occurences of windowClosing

windowClosing occurences:
java.awt.AWTEventMulticaster.windowClosing(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowClosing(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowClosing(java.awt.event.WindowEvent)
javax.swing.JMenu.WinListener.windowClosing(java.awt.event.WindowEvent)
javax.swing.plaf.basic.BasicToolBarUI.FrameListener.windowClosing(java.awt.event.WindowEvent)


Occurences of windowDeactivated

windowDeactivated occurences:
java.awt.AWTEventMulticaster.windowDeactivated(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowDeactivated(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowDeactivated(java.awt.event.WindowEvent)


Occurences of windowDeiconified

windowDeiconified occurences:
java.awt.AWTEventMulticaster.windowDeiconified(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowDeiconified(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowDeiconified(java.awt.event.WindowEvent)


Occurences of WindowEvent (constructors)

WindowEvent (constructors) occurences:
java.awt.event.WindowEvent(java.awt.Window, int)
java.awt.event.WindowEvent(java.awt.Window, int, int, int)
java.awt.event.WindowEvent(java.awt.Window, int, java.awt.Window)
java.awt.event.WindowEvent(java.awt.Window, int, java.awt.Window, int, int)


Occurences of windowGainedFocus

windowGainedFocus occurences:
java.awt.AWTEventMulticaster.windowGainedFocus(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowGainedFocus(java.awt.event.WindowEvent)
java.awt.event.WindowFocusListener.windowGainedFocus(java.awt.event.WindowEvent)


Occurences of windowIconified

windowIconified occurences:
java.awt.AWTEventMulticaster.windowIconified(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowIconified(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowIconified(java.awt.event.WindowEvent)


Occurences of windowLostFocus

windowLostFocus occurences:
java.awt.AWTEventMulticaster.windowLostFocus(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowLostFocus(java.awt.event.WindowEvent)
java.awt.event.WindowFocusListener.windowLostFocus(java.awt.event.WindowEvent)


Occurences of windowOpened

windowOpened occurences:
java.awt.AWTEventMulticaster.windowOpened(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowOpened(java.awt.event.WindowEvent)
java.awt.event.WindowListener.windowOpened(java.awt.event.WindowEvent)


Occurences of windowStateChanged

windowStateChanged occurences:
java.awt.AWTEventMulticaster.windowStateChanged(java.awt.event.WindowEvent)
java.awt.event.WindowAdapter.windowStateChanged(java.awt.event.WindowEvent)
java.awt.event.WindowStateListener.windowStateChanged(java.awt.event.WindowEvent)


Occurences of WIND_EVEN_ODD

WIND_EVEN_ODD occurences:
java.awt.geom.WIND_EVEN_ODD
java.awt.geom.WIND_EVEN_ODD


Occurences of WIND_NON_ZERO

WIND_NON_ZERO occurences:
java.awt.geom.WIND_NON_ZERO
java.awt.geom.WIND_NON_ZERO


Occurences of with

with occurences:
java.time.chrono.ChronoLocalDate.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.ChronoLocalDate.with(java.time.temporal.TemporalField, long)
java.time.chrono.ChronoLocalDateTime.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.ChronoLocalDateTime.with(java.time.temporal.TemporalField, long)
java.time.chrono.ChronoZonedDateTime.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.ChronoZonedDateTime.with(java.time.temporal.TemporalField, long)
java.time.chrono.HijrahDate.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.HijrahDate.with(java.time.temporal.TemporalField, long)
java.time.chrono.JapaneseDate.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.JapaneseDate.with(java.time.temporal.TemporalField, long)
java.time.chrono.MinguoDate.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.MinguoDate.with(java.time.temporal.TemporalField, long)
java.time.chrono.ThaiBuddhistDate.with(java.time.temporal.TemporalAdjuster)
java.time.chrono.ThaiBuddhistDate.with(java.time.temporal.TemporalField, long)
java.time.Instant.with(java.time.temporal.TemporalAdjuster)
java.time.Instant.with(java.time.temporal.TemporalField, long)
java.time.LocalDate.with(java.time.temporal.TemporalAdjuster)
java.time.LocalDate.with(java.time.temporal.TemporalField, long)
java.time.LocalDateTime.with(java.time.temporal.TemporalAdjuster)
java.time.LocalDateTime.with(java.time.temporal.TemporalField, long)
java.time.LocalTime.with(java.time.temporal.TemporalAdjuster)
java.time.LocalTime.with(java.time.temporal.TemporalField, long)
java.time.MonthDay.with(java.time.Month)
java.time.OffsetDateTime.with(java.time.temporal.TemporalAdjuster)
java.time.OffsetDateTime.with(java.time.temporal.TemporalField, long)
java.time.OffsetTime.with(java.time.temporal.TemporalAdjuster)
java.time.OffsetTime.with(java.time.temporal.TemporalField, long)
java.time.temporal.Temporal.with(java.time.temporal.TemporalAdjuster)
java.time.temporal.Temporal.with(java.time.temporal.TemporalField, long)
java.time.Year.with(java.time.temporal.TemporalAdjuster)
java.time.Year.with(java.time.temporal.TemporalField, long)
java.time.YearMonth.with(java.time.temporal.TemporalAdjuster)
java.time.YearMonth.with(java.time.temporal.TemporalField, long)
java.time.ZonedDateTime.with(java.time.temporal.TemporalAdjuster)
java.time.ZonedDateTime.with(java.time.temporal.TemporalField, long)


Occurences of withDayOfMonth

withDayOfMonth occurences:
java.time.LocalDate.withDayOfMonth(int)
java.time.LocalDateTime.withDayOfMonth(int)
java.time.MonthDay.withDayOfMonth(int)
java.time.OffsetDateTime.withDayOfMonth(int)
java.time.ZonedDateTime.withDayOfMonth(int)


Occurences of withDayOfYear

withDayOfYear occurences:
java.time.LocalDate.withDayOfYear(int)
java.time.LocalDateTime.withDayOfYear(int)
java.time.OffsetDateTime.withDayOfYear(int)
java.time.ZonedDateTime.withDayOfYear(int)


Occurences of withEarlierOffsetAtOverlap

withEarlierOffsetAtOverlap occurences:
java.time.chrono.ChronoZonedDateTime.withEarlierOffsetAtOverlap()
java.time.ZonedDateTime.withEarlierOffsetAtOverlap()


Occurences of withHour

withHour occurences:
java.time.LocalDateTime.withHour(int)
java.time.LocalTime.withHour(int)
java.time.OffsetDateTime.withHour(int)
java.time.OffsetTime.withHour(int)
java.time.ZonedDateTime.withHour(int)


Occurences of withLaterOffsetAtOverlap

withLaterOffsetAtOverlap occurences:
java.time.chrono.ChronoZonedDateTime.withLaterOffsetAtOverlap()
java.time.ZonedDateTime.withLaterOffsetAtOverlap()


Occurences of withMinute

withMinute occurences:
java.time.LocalDateTime.withMinute(int)
java.time.LocalTime.withMinute(int)
java.time.OffsetDateTime.withMinute(int)
java.time.OffsetTime.withMinute(int)
java.time.ZonedDateTime.withMinute(int)


Occurences of withMonth

withMonth occurences:
java.time.LocalDate.withMonth(int)
java.time.LocalDateTime.withMonth(int)
java.time.MonthDay.withMonth(int)
java.time.OffsetDateTime.withMonth(int)
java.time.YearMonth.withMonth(int)
java.time.ZonedDateTime.withMonth(int)


Occurences of withNano

withNano occurences:
java.time.LocalDateTime.withNano(int)
java.time.LocalTime.withNano(int)
java.time.OffsetDateTime.withNano(int)
java.time.OffsetTime.withNano(int)
java.time.ZonedDateTime.withNano(int)


Occurences of withOffsetSameInstant

withOffsetSameInstant occurences:
java.time.OffsetDateTime.withOffsetSameInstant(java.time.ZoneOffset)
java.time.OffsetTime.withOffsetSameInstant(java.time.ZoneOffset)


Occurences of withOffsetSameLocal

withOffsetSameLocal occurences:
java.time.OffsetDateTime.withOffsetSameLocal(java.time.ZoneOffset)
java.time.OffsetTime.withOffsetSameLocal(java.time.ZoneOffset)


Occurences of withResolverFields

withResolverFields occurences:
java.time.format.DateTimeFormatter.withResolverFields(java.time.temporal.TemporalField...)
java.time.format.DateTimeFormatter.withResolverFields(java.util.Set)


Occurences of withSecond

withSecond occurences:
java.time.LocalDateTime.withSecond(int)
java.time.LocalTime.withSecond(int)
java.time.OffsetDateTime.withSecond(int)
java.time.OffsetTime.withSecond(int)
java.time.ZonedDateTime.withSecond(int)


Occurences of withYear

withYear occurences:
java.time.LocalDate.withYear(int)
java.time.LocalDateTime.withYear(int)
java.time.OffsetDateTime.withYear(int)
java.time.YearMonth.withYear(int)
java.time.ZonedDateTime.withYear(int)


Occurences of withZone

withZone occurences:
java.time.Clock.withZone(java.time.ZoneId)
java.time.format.DateTimeFormatter.withZone(java.time.ZoneId)


Occurences of withZoneSameInstant

withZoneSameInstant occurences:
java.time.chrono.ChronoZonedDateTime.withZoneSameInstant(java.time.ZoneId)
java.time.ZonedDateTime.withZoneSameInstant(java.time.ZoneId)


Occurences of withZoneSameLocal

withZoneSameLocal occurences:
java.time.chrono.ChronoZonedDateTime.withZoneSameLocal(java.time.ZoneId)
java.time.ZonedDateTime.withZoneSameLocal(java.time.ZoneId)


Occurences of wrap

wrap occurences:
java.lang.invoke.MethodType.wrap()
java.nio.ByteBuffer.wrap(byte:A)
java.nio.ByteBuffer.wrap(byte:A, int, int)
java.nio.CharBuffer.wrap(char:A)
java.nio.CharBuffer.wrap(char:A, int, int)
java.nio.CharBuffer.wrap(java.lang.CharSequence)
java.nio.CharBuffer.wrap(java.lang.CharSequence, int, int)
java.nio.DoubleBuffer.wrap(double:A)
java.nio.DoubleBuffer.wrap(double:A, int, int)
java.nio.FloatBuffer.wrap(float:A)
java.nio.FloatBuffer.wrap(float:A, int, int)
java.nio.IntBuffer.wrap(int:A)
java.nio.IntBuffer.wrap(int:A, int, int)
java.nio.LongBuffer.wrap(long:A)
java.nio.LongBuffer.wrap(long:A, int, int)
java.nio.ShortBuffer.wrap(short:A)
java.nio.ShortBuffer.wrap(short:A, int, int)
java.util.Base64.Decoder.wrap(java.io.InputStream)
java.util.Base64.Encoder.wrap(java.io.OutputStream)
javax.crypto.Cipher.wrap(java.security.Key)
javax.net.ssl.SSLEngine.wrap(java.nio.ByteBuffer, java.nio.ByteBuffer)
javax.net.ssl.SSLEngine.wrap(java.nio.ByteBuffer:A, int, int, java.nio.ByteBuffer)
javax.net.ssl.SSLEngine.wrap(java.nio.ByteBuffer:A, java.nio.ByteBuffer)
javax.security.sasl.SaslClient.wrap(byte:A, int, int)
javax.security.sasl.SaslServer.wrap(byte:A, int, int)
org.ietf.jgss.GSSContext.wrap(byte:A, int, int, org.ietf.jgss.MessageProp)
org.ietf.jgss.GSSContext.wrap(java.io.InputStream, java.io.OutputStream, org.ietf.jgss.MessageProp)


Occurences of wrapException

wrapException occurences:
javax.rmi.CORBA.Util.wrapException(java.lang.Throwable)
javax.rmi.CORBA.UtilDelegate.wrapException(java.lang.Throwable)


Occurences of WrappedPlainView (constructors)

WrappedPlainView (constructors) occurences:
javax.swing.text.WrappedPlainView(javax.swing.text.Element)
javax.swing.text.WrappedPlainView(javax.swing.text.Element, boolean)


Occurences of WritableRaster (constructors)

WritableRaster (constructors) occurences:
java.awt.image.WritableRaster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Point)
java.awt.image.WritableRaster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Rectangle, java.awt.Point, java.awt.image.WritableRaster)
java.awt.image.WritableRaster(java.awt.image.SampleModel, java.awt.Point)


Occurences of WRITE

WRITE occurences:
java.lang.WRITE
java.nio.file.WRITE
java.nio.file.WRITE


Occurences of write

write occurences:
java.awt.color.ICC_Profile.write(java.io.OutputStream)
java.awt.color.ICC_Profile.write(java.lang.String)
java.io.BufferedOutputStream.write(byte:A, int, int)
java.io.BufferedOutputStream.write(int)
java.io.BufferedWriter.write(char:A, int, int)
java.io.BufferedWriter.write(int)
java.io.BufferedWriter.write(java.lang.String, int, int)
java.io.ByteArrayOutputStream.write(byte:A, int, int)
java.io.ByteArrayOutputStream.write(int)
java.io.CharArrayWriter.write(char:A, int, int)
java.io.CharArrayWriter.write(int)
java.io.CharArrayWriter.write(java.lang.String, int, int)
java.io.DataOutput.write(byte:A)
java.io.DataOutput.write(byte:A, int, int)
java.io.DataOutput.write(int)
java.io.DataOutputStream.write(byte:A, int, int)
java.io.DataOutputStream.write(int)
java.io.FileOutputStream.write(byte:A)
java.io.FileOutputStream.write(byte:A, int, int)
java.io.FileOutputStream.write(int)
java.io.FilterOutputStream.write(byte:A)
java.io.FilterOutputStream.write(byte:A, int, int)
java.io.FilterOutputStream.write(int)
java.io.FilterWriter.write(char:A, int, int)
java.io.FilterWriter.write(int)
java.io.FilterWriter.write(java.lang.String, int, int)
java.io.ObjectOutput.write(byte:A)
java.io.ObjectOutput.write(byte:A, int, int)
java.io.ObjectOutput.write(int)
java.io.ObjectOutputStream.write(byte:A)
java.io.ObjectOutputStream.write(byte:A, int, int)
java.io.ObjectOutputStream.write(int)
java.io.ObjectOutputStream.PutField.write(java.io.ObjectOutput)
java.io.OutputStream.write(byte:A)
java.io.OutputStream.write(byte:A, int, int)
java.io.OutputStream.write(int)
java.io.OutputStreamWriter.write(char:A, int, int)
java.io.OutputStreamWriter.write(int)
java.io.OutputStreamWriter.write(java.lang.String, int, int)
java.io.PipedOutputStream.write(byte:A, int, int)
java.io.PipedOutputStream.write(int)
java.io.PipedWriter.write(char:A, int, int)
java.io.PipedWriter.write(int)
java.io.PrintStream.write(byte:A, int, int)
java.io.PrintStream.write(int)
java.io.PrintWriter.write(char:A)
java.io.PrintWriter.write(char:A, int, int)
java.io.PrintWriter.write(int)
java.io.PrintWriter.write(java.lang.String)
java.io.PrintWriter.write(java.lang.String, int, int)
java.io.RandomAccessFile.write(byte:A)
java.io.RandomAccessFile.write(byte:A, int, int)
java.io.RandomAccessFile.write(int)
java.io.StringWriter.write(char:A, int, int)
java.io.StringWriter.write(int)
java.io.StringWriter.write(java.lang.String)
java.io.StringWriter.write(java.lang.String, int, int)
java.io.Writer.write(char:A)
java.io.Writer.write(char:A, int, int)
java.io.Writer.write(int)
java.io.Writer.write(java.lang.String)
java.io.Writer.write(java.lang.String, int, int)
java.nio.channels.AsynchronousByteChannel.write(java.nio.ByteBuffer)
java.nio.channels.AsynchronousByteChannel.write(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousByteChannel.write(java.nio.ByteBuffer, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.write(java.nio.ByteBuffer, long)
java.nio.channels.AsynchronousFileChannel.write(java.nio.ByteBuffer, long, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousFileChannel.write(java.nio.ByteBuffer, long, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer:A, int, int, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler)
java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer:A, int, int, long, java.util.concurrent.TimeUnit, java.lang.Object, java.nio.channels.CompletionHandler)
java.nio.channels.DatagramChannel.write(java.nio.ByteBuffer)
java.nio.channels.DatagramChannel.write(java.nio.ByteBuffer:A)
java.nio.channels.DatagramChannel.write(java.nio.ByteBuffer:A, int, int)
java.nio.channels.FileChannel.write(java.nio.ByteBuffer)
java.nio.channels.FileChannel.write(java.nio.ByteBuffer, long)
java.nio.channels.FileChannel.write(java.nio.ByteBuffer:A)
java.nio.channels.FileChannel.write(java.nio.ByteBuffer:A, int, int)
java.nio.channels.GatheringByteChannel.write(java.nio.ByteBuffer:A)
java.nio.channels.GatheringByteChannel.write(java.nio.ByteBuffer:A, int, int)
java.nio.channels.SeekableByteChannel.write(java.nio.ByteBuffer)
java.nio.channels.SocketChannel.write(java.nio.ByteBuffer)
java.nio.channels.SocketChannel.write(java.nio.ByteBuffer:A)
java.nio.channels.SocketChannel.write(java.nio.ByteBuffer:A, int, int)
java.nio.channels.WritableByteChannel.write(java.nio.ByteBuffer)
java.nio.file.attribute.UserDefinedFileAttributeView.write(java.lang.String, java.nio.ByteBuffer)
java.nio.file.Files.write(java.nio.file.Path, byte:A, java.nio.file.OpenOption...)
java.nio.file.Files.write(java.nio.file.Path, java.lang.Iterable, java.nio.charset.Charset, java.nio.file.OpenOption...)
java.nio.file.Files.write(java.nio.file.Path, java.lang.Iterable, java.nio.file.OpenOption...)
java.rmi.server.LogStream.write(byte:A, int, int)
java.rmi.server.LogStream.write(int)
java.rmi.server.ObjID.write(java.io.ObjectOutput)
java.rmi.server.UID.write(java.io.DataOutput)
java.security.DigestOutputStream.write(byte:A, int, int)
java.security.DigestOutputStream.write(int)
java.util.jar.Manifest.write(java.io.OutputStream)
java.util.zip.CheckedOutputStream.write(byte:A, int, int)
java.util.zip.CheckedOutputStream.write(int)
java.util.zip.DeflaterOutputStream.write(byte:A, int, int)
java.util.zip.DeflaterOutputStream.write(int)
java.util.zip.GZIPOutputStream.write(byte:A, int, int)
java.util.zip.InflaterOutputStream.write(byte:A, int, int)
java.util.zip.InflaterOutputStream.write(int)
java.util.zip.ZipOutputStream.write(byte:A, int, int)
javax.crypto.CipherOutputStream.write(byte:A)
javax.crypto.CipherOutputStream.write(byte:A, int, int)
javax.crypto.CipherOutputStream.write(int)
javax.imageio.ImageIO.write(java.awt.image.RenderedImage, java.lang.String, java.io.File)
javax.imageio.ImageIO.write(java.awt.image.RenderedImage, java.lang.String, java.io.OutputStream)
javax.imageio.ImageIO.write(java.awt.image.RenderedImage, java.lang.String, javax.imageio.stream.ImageOutputStream)
javax.imageio.ImageWriter.write(java.awt.image.RenderedImage)
javax.imageio.ImageWriter.write(javax.imageio.IIOImage)
javax.imageio.ImageWriter.write(javax.imageio.metadata.IIOMetadata, javax.imageio.IIOImage, javax.imageio.ImageWriteParam)
javax.imageio.stream.FileCacheImageOutputStream.write(byte:A, int, int)
javax.imageio.stream.FileCacheImageOutputStream.write(int)
javax.imageio.stream.FileImageOutputStream.write(byte:A, int, int)
javax.imageio.stream.FileImageOutputStream.write(int)
javax.imageio.stream.ImageOutputStream.write(byte:A)
javax.imageio.stream.ImageOutputStream.write(byte:A, int, int)
javax.imageio.stream.ImageOutputStream.write(int)
javax.imageio.stream.ImageOutputStreamImpl.write(byte:A)
javax.imageio.stream.ImageOutputStreamImpl.write(byte:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.write(int)
javax.imageio.stream.MemoryCacheImageOutputStream.write(byte:A, int, int)
javax.imageio.stream.MemoryCacheImageOutputStream.write(int)
javax.sound.midi.MidiSystem.write(javax.sound.midi.Sequence, int, java.io.File)
javax.sound.midi.MidiSystem.write(javax.sound.midi.Sequence, int, java.io.OutputStream)
javax.sound.midi.spi.MidiFileWriter.write(javax.sound.midi.Sequence, int, java.io.File)
javax.sound.midi.spi.MidiFileWriter.write(javax.sound.midi.Sequence, int, java.io.OutputStream)
javax.sound.sampled.AudioSystem.write(javax.sound.sampled.AudioInputStream, javax.sound.sampled.AudioFileFormat.Type, java.io.File)
javax.sound.sampled.AudioSystem.write(javax.sound.sampled.AudioInputStream, javax.sound.sampled.AudioFileFormat.Type, java.io.OutputStream)
javax.sound.sampled.SourceDataLine.write(byte:A, int, int)
javax.sound.sampled.spi.AudioFileWriter.write(javax.sound.sampled.AudioInputStream, javax.sound.sampled.AudioFileFormat.Type, java.io.File)
javax.sound.sampled.spi.AudioFileWriter.write(javax.sound.sampled.AudioInputStream, javax.sound.sampled.AudioFileFormat.Type, java.io.OutputStream)
javax.swing.text.AbstractWriter.write()
javax.swing.text.AbstractWriter.write(char)
javax.swing.text.AbstractWriter.write(char:A, int, int)
javax.swing.text.AbstractWriter.write(java.lang.String)
javax.swing.text.DefaultEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int)
javax.swing.text.DefaultEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int)
javax.swing.text.EditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int)
javax.swing.text.EditorKit.write(java.io.Writer, javax.swing.text.Document, int, int)
javax.swing.text.html.HTMLEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int)
javax.swing.text.html.HTMLWriter.write()
javax.swing.text.html.MinimalHTMLWriter.write()
javax.swing.text.JTextComponent.write(java.io.Writer)
javax.swing.text.rtf.RTFEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int)
javax.swing.text.rtf.RTFEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int)
org.omg.CORBA.AnySeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Any:A)
org.omg.CORBA.BooleanSeqHelper.write(org.omg.CORBA.portable.OutputStream, boolean:A)
org.omg.CORBA.CharSeqHelper.write(org.omg.CORBA.portable.OutputStream, char:A)
org.omg.CORBA.CompletionStatusHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.CompletionStatus)
org.omg.CORBA.CurrentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Current)
org.omg.CORBA.DefinitionKindHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.DefinitionKind)
org.omg.CORBA.DoubleSeqHelper.write(org.omg.CORBA.portable.OutputStream, double:A)
org.omg.CORBA.FieldNameHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CORBA.FloatSeqHelper.write(org.omg.CORBA.portable.OutputStream, float:A)
org.omg.CORBA.IdentifierHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CORBA.IDLTypeHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.IDLType)
org.omg.CORBA.LongLongSeqHelper.write(org.omg.CORBA.portable.OutputStream, long:A)
org.omg.CORBA.LongSeqHelper.write(org.omg.CORBA.portable.OutputStream, int:A)
org.omg.CORBA.NameValuePairHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.NameValuePair)
org.omg.CORBA.ObjectHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Object)
org.omg.CORBA.OctetSeqHelper.write(org.omg.CORBA.portable.OutputStream, byte:A)
org.omg.CORBA.ParameterModeHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.ParameterMode)
org.omg.CORBA.PolicyErrorCodeHelper.write(org.omg.CORBA.portable.OutputStream, short)
org.omg.CORBA.PolicyErrorHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.PolicyError)
org.omg.CORBA.PolicyHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Policy)
org.omg.CORBA.PolicyListHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Policy:A)
org.omg.CORBA.PolicyTypeHelper.write(org.omg.CORBA.portable.OutputStream, int)
org.omg.CORBA.portable.OutputStream.write(int)
org.omg.CORBA.RepositoryIdHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CORBA.ServiceDetailHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.ServiceDetail)
org.omg.CORBA.ServiceInformationHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.ServiceInformation)
org.omg.CORBA.SetOverrideTypeHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.SetOverrideType)
org.omg.CORBA.ShortSeqHelper.write(org.omg.CORBA.portable.OutputStream, short:A)
org.omg.CORBA.StringSeqHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String:A)
org.omg.CORBA.StringValueHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CORBA.StructMemberHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.StructMember)
org.omg.CORBA.ULongLongSeqHelper.write(org.omg.CORBA.portable.OutputStream, long:A)
org.omg.CORBA.ULongSeqHelper.write(org.omg.CORBA.portable.OutputStream, int:A)
org.omg.CORBA.UnionMemberHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.UnionMember)
org.omg.CORBA.UnknownUserExceptionHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.UnknownUserException)
org.omg.CORBA.UShortSeqHelper.write(org.omg.CORBA.portable.OutputStream, short:A)
org.omg.CORBA.ValueBaseHelper.write(org.omg.CORBA.portable.OutputStream, java.io.Serializable)
org.omg.CORBA.ValueMemberHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.ValueMember)
org.omg.CORBA.VersionSpecHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CORBA.VisibilityHelper.write(org.omg.CORBA.portable.OutputStream, short)
org.omg.CORBA.WCharSeqHelper.write(org.omg.CORBA.portable.OutputStream, char:A)
org.omg.CORBA.WrongTransactionHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.WrongTransaction)
org.omg.CORBA.WStringSeqHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String:A)
org.omg.CORBA.WStringValueHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CosNaming.BindingHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.Binding)
org.omg.CosNaming.BindingIteratorHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.BindingIterator)
org.omg.CosNaming.BindingListHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.Binding:A)
org.omg.CosNaming.BindingTypeHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.BindingType)
org.omg.CosNaming.IstringHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CosNaming.NameComponentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NameComponent)
org.omg.CosNaming.NameHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NameComponent:A)
org.omg.CosNaming.NamingContextExtHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextExt)
org.omg.CosNaming.NamingContextExtPackage.AddressHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextExtPackage.InvalidAddress)
org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.CosNaming.NamingContextHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContext)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.AlreadyBound)
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.CannotProceed)
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.InvalidName)
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.NotEmpty)
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.NotFound)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CosNaming.NamingContextPackage.NotFoundReason)
org.omg.DynamicAny.AnySeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.CORBA.Any:A)
org.omg.DynamicAny.DynAnyFactoryHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAnyFactory)
org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode)
org.omg.DynamicAny.DynAnyHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAny)
org.omg.DynamicAny.DynAnyPackage.InvalidValueHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAnyPackage.InvalidValue)
org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAnyPackage.TypeMismatch)
org.omg.DynamicAny.DynAnySeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynAny:A)
org.omg.DynamicAny.DynArrayHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynArray)
org.omg.DynamicAny.DynEnumHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynEnum)
org.omg.DynamicAny.DynFixedHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynFixed)
org.omg.DynamicAny.DynSequenceHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynSequence)
org.omg.DynamicAny.DynStructHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynStruct)
org.omg.DynamicAny.DynUnionHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynUnion)
org.omg.DynamicAny.DynValueHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.DynValue)
org.omg.DynamicAny.FieldNameHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.DynamicAny.NameDynAnyPairHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.NameDynAnyPair)
org.omg.DynamicAny.NameDynAnyPairSeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.NameDynAnyPair:A)
org.omg.DynamicAny.NameValuePairHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.NameValuePair)
org.omg.DynamicAny.NameValuePairSeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.DynamicAny.NameValuePair:A)
org.omg.IOP.CodecFactoryHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.CodecFactory)
org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.CodecFactoryPackage.UnknownEncoding)
org.omg.IOP.CodecPackage.FormatMismatchHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.CodecPackage.FormatMismatch)
org.omg.IOP.CodecPackage.InvalidTypeForEncodingHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.CodecPackage.InvalidTypeForEncoding)
org.omg.IOP.CodecPackage.TypeMismatchHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.CodecPackage.TypeMismatch)
org.omg.IOP.ComponentIdHelper.write(org.omg.CORBA.portable.OutputStream, int)
org.omg.IOP.IORHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.IOR)
org.omg.IOP.MultipleComponentProfileHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.TaggedComponent:A)
org.omg.IOP.ProfileIdHelper.write(org.omg.CORBA.portable.OutputStream, int)
org.omg.IOP.ServiceContextHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.ServiceContext)
org.omg.IOP.ServiceContextListHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.ServiceContext:A)
org.omg.IOP.ServiceIdHelper.write(org.omg.CORBA.portable.OutputStream, int)
org.omg.IOP.TaggedComponentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.TaggedComponent)
org.omg.IOP.TaggedProfileHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.IOP.TaggedProfile)
org.omg.Messaging.SyncScopeHelper.write(org.omg.CORBA.portable.OutputStream, short)
org.omg.PortableInterceptor.AdapterManagerIdHelper.write(org.omg.CORBA.portable.OutputStream, int)
org.omg.PortableInterceptor.AdapterNameHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String:A)
org.omg.PortableInterceptor.AdapterStateHelper.write(org.omg.CORBA.portable.OutputStream, short)
org.omg.PortableInterceptor.CurrentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.Current)
org.omg.PortableInterceptor.ForwardRequestHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ForwardRequest)
org.omg.PortableInterceptor.InvalidSlotHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.InvalidSlot)
org.omg.PortableInterceptor.IORInterceptor_3_0Helper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.IORInterceptor_3_0)
org.omg.PortableInterceptor.ObjectIdHelper.write(org.omg.CORBA.portable.OutputStream, byte:A)
org.omg.PortableInterceptor.ObjectReferenceFactoryHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ObjectReferenceFactory)
org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ObjectReferenceTemplate)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ObjectReferenceTemplate:A)
org.omg.PortableInterceptor.ORBIdHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName)
org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidNameHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName)
org.omg.PortableInterceptor.ORBInitInfoPackage.ObjectIdHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.PortableInterceptor.ServerIdHelper.write(org.omg.CORBA.portable.OutputStream, java.lang.String)
org.omg.PortableServer.CurrentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.Current)
org.omg.PortableServer.CurrentPackage.NoContextHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.CurrentPackage.NoContext)
org.omg.PortableServer.ForwardRequestHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.ForwardRequest)
org.omg.PortableServer.POAHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POA)
org.omg.PortableServer.POAManagerPackage.AdapterInactiveHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAManagerPackage.AdapterInactive)
org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.AdapterAlreadyExists)
org.omg.PortableServer.POAPackage.AdapterNonExistentHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.AdapterNonExistent)
org.omg.PortableServer.POAPackage.InvalidPolicyHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.InvalidPolicy)
org.omg.PortableServer.POAPackage.NoServantHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.NoServant)
org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.ObjectAlreadyActive)
org.omg.PortableServer.POAPackage.ObjectNotActiveHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.ObjectNotActive)
org.omg.PortableServer.POAPackage.ServantAlreadyActiveHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.ServantAlreadyActive)
org.omg.PortableServer.POAPackage.ServantNotActiveHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.ServantNotActive)
org.omg.PortableServer.POAPackage.WrongAdapterHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.WrongAdapter)
org.omg.PortableServer.POAPackage.WrongPolicyHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.POAPackage.WrongPolicy)
org.omg.PortableServer.ServantActivatorHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.ServantActivator)
org.omg.PortableServer.ServantLocatorHelper.write(org.omg.CORBA.portable.OutputStream, org.omg.PortableServer.ServantLocator)
org.w3c.dom.ls.LSSerializer.write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput)


Occurences of writeAbstractObject

writeAbstractObject occurences:
javax.rmi.CORBA.Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object)
javax.rmi.CORBA.UtilDelegate.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object)


Occurences of writeAny

writeAny occurences:
javax.rmi.CORBA.Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object)
javax.rmi.CORBA.UtilDelegate.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object)


Occurences of writeArray

writeArray occurences:
java.sql.SQLOutput.writeArray(java.sql.Array)
javax.sql.rowset.serial.SQLOutputImpl.writeArray(java.sql.Array)


Occurences of writeAsciiStream

writeAsciiStream occurences:
java.sql.SQLOutput.writeAsciiStream(java.io.InputStream)
javax.sql.rowset.serial.SQLOutputImpl.writeAsciiStream(java.io.InputStream)


Occurences of writeAttribute

writeAttribute occurences:
javax.xml.stream.XMLStreamWriter.writeAttribute(java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamWriter.writeAttribute(java.lang.String, java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamWriter.writeAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String)


Occurences of writeAttributes

writeAttributes occurences:
javax.swing.text.AbstractWriter.writeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.html.HTMLWriter.writeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.html.MinimalHTMLWriter.writeAttributes(javax.swing.text.AttributeSet)
javax.swing.text.StyleContext.writeAttributes(java.io.ObjectOutputStream, javax.swing.text.AttributeSet)


Occurences of writeBigDecimal

writeBigDecimal occurences:
java.sql.SQLOutput.writeBigDecimal(java.math.BigDecimal)
javax.sql.rowset.serial.SQLOutputImpl.writeBigDecimal(java.math.BigDecimal)


Occurences of writeBinaryStream

writeBinaryStream occurences:
java.sql.SQLOutput.writeBinaryStream(java.io.InputStream)
javax.sql.rowset.serial.SQLOutputImpl.writeBinaryStream(java.io.InputStream)


Occurences of writeBit

writeBit occurences:
javax.imageio.stream.ImageOutputStream.writeBit(int)
javax.imageio.stream.ImageOutputStreamImpl.writeBit(int)


Occurences of writeBits

writeBits occurences:
javax.imageio.stream.ImageOutputStream.writeBits(long, int)
javax.imageio.stream.ImageOutputStreamImpl.writeBits(long, int)


Occurences of writeBlob

writeBlob occurences:
java.sql.SQLOutput.writeBlob(java.sql.Blob)
javax.sql.rowset.serial.SQLOutputImpl.writeBlob(java.sql.Blob)


Occurences of writeBoolean

writeBoolean occurences:
java.io.DataOutput.writeBoolean(boolean)
java.io.DataOutputStream.writeBoolean(boolean)
java.io.ObjectOutputStream.writeBoolean(boolean)
java.io.RandomAccessFile.writeBoolean(boolean)
java.sql.SQLOutput.writeBoolean(boolean)
javax.imageio.stream.ImageOutputStream.writeBoolean(boolean)
javax.imageio.stream.ImageOutputStreamImpl.writeBoolean(boolean)
javax.sql.rowset.serial.SQLOutputImpl.writeBoolean(boolean)


Occurences of writeByte

writeByte occurences:
java.io.DataOutput.writeByte(int)
java.io.DataOutputStream.writeByte(int)
java.io.ObjectOutputStream.writeByte(int)
java.io.RandomAccessFile.writeByte(int)
java.sql.SQLOutput.writeByte(byte)
javax.imageio.stream.ImageOutputStream.writeByte(int)
javax.imageio.stream.ImageOutputStreamImpl.writeByte(int)
javax.sql.rowset.serial.SQLOutputImpl.writeByte(byte)


Occurences of writeBytes

writeBytes occurences:
java.io.DataOutput.writeBytes(java.lang.String)
java.io.DataOutputStream.writeBytes(java.lang.String)
java.io.ObjectOutputStream.writeBytes(java.lang.String)
java.io.RandomAccessFile.writeBytes(java.lang.String)
java.sql.SQLOutput.writeBytes(byte:A)
javax.imageio.stream.ImageOutputStream.writeBytes(java.lang.String)
javax.imageio.stream.ImageOutputStreamImpl.writeBytes(java.lang.String)
javax.sql.rowset.serial.SQLOutputImpl.writeBytes(byte:A)


Occurences of writeChar

writeChar occurences:
java.io.DataOutput.writeChar(int)
java.io.DataOutputStream.writeChar(int)
java.io.ObjectOutputStream.writeChar(int)
java.io.RandomAccessFile.writeChar(int)
javax.imageio.stream.ImageOutputStream.writeChar(int)
javax.imageio.stream.ImageOutputStreamImpl.writeChar(int)


Occurences of writeCharacters

writeCharacters occurences:
javax.xml.stream.XMLStreamWriter.writeCharacters(char:A, int, int)
javax.xml.stream.XMLStreamWriter.writeCharacters(java.lang.String)


Occurences of writeCharacterStream

writeCharacterStream occurences:
java.sql.SQLOutput.writeCharacterStream(java.io.Reader)
javax.sql.rowset.serial.SQLOutputImpl.writeCharacterStream(java.io.Reader)


Occurences of writeChars

writeChars occurences:
java.io.DataOutput.writeChars(java.lang.String)
java.io.DataOutputStream.writeChars(java.lang.String)
java.io.ObjectOutputStream.writeChars(java.lang.String)
java.io.RandomAccessFile.writeChars(java.lang.String)
javax.imageio.stream.ImageOutputStream.writeChars(char:A, int, int)
javax.imageio.stream.ImageOutputStream.writeChars(java.lang.String)
javax.imageio.stream.ImageOutputStreamImpl.writeChars(char:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeChars(java.lang.String)


Occurences of writeClob

writeClob occurences:
java.sql.SQLOutput.writeClob(java.sql.Clob)
javax.sql.rowset.serial.SQLOutputImpl.writeClob(java.sql.Clob)


Occurences of writeDate

writeDate occurences:
java.sql.SQLOutput.writeDate(java.sql.Date)
javax.sql.rowset.serial.SQLOutputImpl.writeDate(java.sql.Date)


Occurences of writeDouble

writeDouble occurences:
java.io.DataOutput.writeDouble(double)
java.io.DataOutputStream.writeDouble(double)
java.io.ObjectOutputStream.writeDouble(double)
java.io.RandomAccessFile.writeDouble(double)
java.sql.SQLOutput.writeDouble(double)
javax.imageio.stream.ImageOutputStream.writeDouble(double)
javax.imageio.stream.ImageOutputStreamImpl.writeDouble(double)
javax.sql.rowset.serial.SQLOutputImpl.writeDouble(double)


Occurences of writeDoubles

writeDoubles occurences:
javax.imageio.stream.ImageOutputStream.writeDoubles(double:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeDoubles(double:A, int, int)


Occurences of writeEmptyElement

writeEmptyElement occurences:
javax.xml.stream.XMLStreamWriter.writeEmptyElement(java.lang.String)
javax.xml.stream.XMLStreamWriter.writeEmptyElement(java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamWriter.writeEmptyElement(java.lang.String, java.lang.String, java.lang.String)


Occurences of writeExpression

writeExpression occurences:
java.beans.Encoder.writeExpression(java.beans.Expression)
java.beans.XMLEncoder.writeExpression(java.beans.Expression)


Occurences of writeExternal

writeExternal occurences:
java.awt.datatransfer.DataFlavor.writeExternal(java.io.ObjectOutput)
java.io.Externalizable.writeExternal(java.io.ObjectOutput)
javax.activation.MimeType.writeExternal(java.io.ObjectOutput)
javax.management.loading.MLet.writeExternal(java.io.ObjectOutput)


Occurences of writeFloat

writeFloat occurences:
java.io.DataOutput.writeFloat(float)
java.io.DataOutputStream.writeFloat(float)
java.io.ObjectOutputStream.writeFloat(float)
java.io.RandomAccessFile.writeFloat(float)
java.sql.SQLOutput.writeFloat(float)
javax.imageio.stream.ImageOutputStream.writeFloat(float)
javax.imageio.stream.ImageOutputStreamImpl.writeFloat(float)
javax.sql.rowset.serial.SQLOutputImpl.writeFloat(float)


Occurences of writeFloats

writeFloats occurences:
javax.imageio.stream.ImageOutputStream.writeFloats(float:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeFloats(float:A, int, int)


Occurences of writeInt

writeInt occurences:
java.io.DataOutput.writeInt(int)
java.io.DataOutputStream.writeInt(int)
java.io.ObjectOutputStream.writeInt(int)
java.io.RandomAccessFile.writeInt(int)
java.sql.SQLOutput.writeInt(int)
javax.imageio.stream.ImageOutputStream.writeInt(int)
javax.imageio.stream.ImageOutputStreamImpl.writeInt(int)
javax.sql.rowset.serial.SQLOutputImpl.writeInt(int)


Occurences of writeInts

writeInts occurences:
javax.imageio.stream.ImageOutputStream.writeInts(int:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeInts(int:A, int, int)


Occurences of writeLineSeparator

writeLineSeparator occurences:
javax.swing.text.AbstractWriter.writeLineSeparator()
javax.swing.text.html.HTMLWriter.writeLineSeparator()


Occurences of writeLock

writeLock occurences:
java.util.concurrent.locks.ReadWriteLock.writeLock()
java.util.concurrent.locks.ReentrantReadWriteLock.writeLock()
java.util.concurrent.locks.StampedLock.writeLock()
javax.swing.text.AbstractDocument.writeLock()


Occurences of writeLong

writeLong occurences:
java.io.DataOutput.writeLong(long)
java.io.DataOutputStream.writeLong(long)
java.io.ObjectOutputStream.writeLong(long)
java.io.RandomAccessFile.writeLong(long)
java.sql.SQLOutput.writeLong(long)
javax.imageio.stream.ImageOutputStream.writeLong(long)
javax.imageio.stream.ImageOutputStreamImpl.writeLong(long)
javax.sql.rowset.serial.SQLOutputImpl.writeLong(long)


Occurences of writeLongs

writeLongs occurences:
javax.imageio.stream.ImageOutputStream.writeLongs(long:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeLongs(long:A, int, int)


Occurences of writeNClob

writeNClob occurences:
java.sql.SQLOutput.writeNClob(java.sql.NClob)
javax.sql.rowset.serial.SQLOutputImpl.writeNClob(java.sql.NClob)


Occurences of writeNString

writeNString occurences:
java.sql.SQLOutput.writeNString(java.lang.String)
javax.sql.rowset.serial.SQLOutputImpl.writeNString(java.lang.String)


Occurences of writeObject

writeObject occurences:
java.beans.Encoder.writeObject(java.lang.Object)
java.beans.PersistenceDelegate.writeObject(java.lang.Object, java.beans.Encoder)
java.beans.XMLEncoder.writeObject(java.lang.Object)
java.io.ObjectOutput.writeObject(java.lang.Object)
java.io.ObjectOutputStream.writeObject(java.lang.Object)
java.sql.SQLOutput.writeObject(java.lang.Object, java.sql.SQLType)
java.sql.SQLOutput.writeObject(java.sql.SQLData)
javax.rmi.CORBA.StubDelegate.writeObject(javax.rmi.CORBA.Stub, java.io.ObjectOutputStream)
javax.sql.rowset.serial.SQLOutputImpl.writeObject(java.sql.SQLData)


Occurences of writeProcessingInstruction

writeProcessingInstruction occurences:
javax.xml.stream.XMLStreamWriter.writeProcessingInstruction(java.lang.String)
javax.xml.stream.XMLStreamWriter.writeProcessingInstruction(java.lang.String, java.lang.String)


Occurences of writer

writer occurences:
java.io.Console.writer()
javax.script.writer


Occurences of Writer (constructors)

Writer (constructors) occurences:
java.io.Writer()
java.io.Writer(java.lang.Object)


Occurences of writeRef

writeRef occurences:
java.sql.SQLOutput.writeRef(java.sql.Ref)
javax.sql.rowset.serial.SQLOutputImpl.writeRef(java.sql.Ref)


Occurences of writeRemoteObject

writeRemoteObject occurences:
javax.rmi.CORBA.Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object)
javax.rmi.CORBA.UtilDelegate.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object)


Occurences of writeReplace

writeReplace occurences:
java.security.cert.Certificate.writeReplace()
java.security.cert.CertPath.writeReplace()
javax.rmi.CORBA.ValueHandler.writeReplace(java.io.Serializable)


Occurences of writeRowId

writeRowId occurences:
java.sql.SQLOutput.writeRowId(java.sql.RowId)
javax.sql.rowset.serial.SQLOutputImpl.writeRowId(java.sql.RowId)


Occurences of writeShort

writeShort occurences:
java.io.DataOutput.writeShort(int)
java.io.DataOutputStream.writeShort(int)
java.io.ObjectOutputStream.writeShort(int)
java.io.RandomAccessFile.writeShort(int)
java.sql.SQLOutput.writeShort(short)
javax.imageio.stream.ImageOutputStream.writeShort(int)
javax.imageio.stream.ImageOutputStreamImpl.writeShort(int)
javax.sql.rowset.serial.SQLOutputImpl.writeShort(short)


Occurences of writeShorts

writeShorts occurences:
javax.imageio.stream.ImageOutputStream.writeShorts(short:A, int, int)
javax.imageio.stream.ImageOutputStreamImpl.writeShorts(short:A, int, int)


Occurences of writeSQLXML

writeSQLXML occurences:
java.sql.SQLOutput.writeSQLXML(java.sql.SQLXML)
javax.sql.rowset.serial.SQLOutputImpl.writeSQLXML(java.sql.SQLXML)


Occurences of writeStartDocument

writeStartDocument occurences:
javax.xml.stream.XMLStreamWriter.writeStartDocument()
javax.xml.stream.XMLStreamWriter.writeStartDocument(java.lang.String)
javax.xml.stream.XMLStreamWriter.writeStartDocument(java.lang.String, java.lang.String)


Occurences of writeStartElement

writeStartElement occurences:
javax.xml.stream.XMLStreamWriter.writeStartElement(java.lang.String)
javax.xml.stream.XMLStreamWriter.writeStartElement(java.lang.String, java.lang.String)
javax.xml.stream.XMLStreamWriter.writeStartElement(java.lang.String, java.lang.String, java.lang.String)


Occurences of writeStatement

writeStatement occurences:
java.beans.Encoder.writeStatement(java.beans.Statement)
java.beans.XMLEncoder.writeStatement(java.beans.Statement)


Occurences of writeString

writeString occurences:
java.sql.SQLOutput.writeString(java.lang.String)
javax.sql.rowset.serial.SQLOutputImpl.writeString(java.lang.String)


Occurences of writeStruct

writeStruct occurences:
java.sql.SQLOutput.writeStruct(java.sql.Struct)
javax.sql.rowset.serial.SQLOutputImpl.writeStruct(java.sql.Struct)


Occurences of writeTime

writeTime occurences:
java.sql.SQLOutput.writeTime(java.sql.Time)
javax.sql.rowset.serial.SQLOutputImpl.writeTime(java.sql.Time)


Occurences of writeTimestamp

writeTimestamp occurences:
java.sql.SQLOutput.writeTimestamp(java.sql.Timestamp)
javax.sql.rowset.serial.SQLOutputImpl.writeTimestamp(java.sql.Timestamp)


Occurences of writeTo

writeTo occurences:
java.io.ByteArrayOutputStream.writeTo(java.io.OutputStream)
java.io.CharArrayWriter.writeTo(java.io.Writer)
javax.activation.DataContentHandler.writeTo(java.lang.Object, java.lang.String, java.io.OutputStream)
javax.activation.DataHandler.writeTo(java.io.OutputStream)
javax.xml.soap.SOAPMessage.writeTo(java.io.OutputStream)
javax.xml.ws.EndpointReference.writeTo(javax.xml.transform.Result)
javax.xml.ws.wsaddressing.W3CEndpointReference.writeTo(javax.xml.transform.Result)


Occurences of writeURL

writeURL occurences:
java.sql.SQLOutput.writeURL(java.net.URL)
javax.sql.rowset.serial.SQLOutputImpl.writeURL(java.net.URL)


Occurences of writeUTF

writeUTF occurences:
java.io.DataOutput.writeUTF(java.lang.String)
java.io.DataOutputStream.writeUTF(java.lang.String)
java.io.ObjectOutputStream.writeUTF(java.lang.String)
java.io.RandomAccessFile.writeUTF(java.lang.String)
javax.imageio.stream.ImageOutputStream.writeUTF(java.lang.String)
javax.imageio.stream.ImageOutputStreamImpl.writeUTF(java.lang.String)


Occurences of writeValue

writeValue occurences:
javax.rmi.CORBA.ValueHandler.writeValue(org.omg.CORBA.portable.OutputStream, java.io.Serializable)
javax.rmi.CORBA.ValueHandlerMultiFormat.writeValue(org.omg.CORBA.portable.OutputStream, java.io.Serializable, byte)


Occurences of writeXml

writeXml occurences:
javax.sql.rowset.WebRowSet.writeXml(java.io.OutputStream)
javax.sql.rowset.WebRowSet.writeXml(java.io.Writer)
javax.sql.rowset.WebRowSet.writeXml(java.sql.ResultSet, java.io.OutputStream)
javax.sql.rowset.WebRowSet.writeXml(java.sql.ResultSet, java.io.Writer)


Occurences of write_any

write_any occurences:
org.omg.CORBA.DataOutputStream.write_any(org.omg.CORBA.Any)
org.omg.CORBA.portable.OutputStream.write_any(org.omg.CORBA.Any)


Occurences of write_boolean

write_boolean occurences:
org.omg.CORBA.DataOutputStream.write_boolean(boolean)
org.omg.CORBA.portable.OutputStream.write_boolean(boolean)


Occurences of write_boolean_array

write_boolean_array occurences:
org.omg.CORBA.DataOutputStream.write_boolean_array(boolean:A, int, int)
org.omg.CORBA.portable.OutputStream.write_boolean_array(boolean:A, int, int)


Occurences of write_char

write_char occurences:
org.omg.CORBA.DataOutputStream.write_char(char)
org.omg.CORBA.portable.OutputStream.write_char(char)


Occurences of write_char_array

write_char_array occurences:
org.omg.CORBA.DataOutputStream.write_char_array(char:A, int, int)
org.omg.CORBA.portable.OutputStream.write_char_array(char:A, int, int)


Occurences of write_double

write_double occurences:
org.omg.CORBA.DataOutputStream.write_double(double)
org.omg.CORBA.portable.OutputStream.write_double(double)


Occurences of write_double_array

write_double_array occurences:
org.omg.CORBA.DataOutputStream.write_double_array(double:A, int, int)
org.omg.CORBA.portable.OutputStream.write_double_array(double:A, int, int)


Occurences of write_float

write_float occurences:
org.omg.CORBA.DataOutputStream.write_float(float)
org.omg.CORBA.portable.OutputStream.write_float(float)


Occurences of write_float_array

write_float_array occurences:
org.omg.CORBA.DataOutputStream.write_float_array(float:A, int, int)
org.omg.CORBA.portable.OutputStream.write_float_array(float:A, int, int)


Occurences of write_long

write_long occurences:
org.omg.CORBA.DataOutputStream.write_long(int)
org.omg.CORBA.portable.OutputStream.write_long(int)


Occurences of write_longlong

write_longlong occurences:
org.omg.CORBA.DataOutputStream.write_longlong(long)
org.omg.CORBA.portable.OutputStream.write_longlong(long)


Occurences of write_longlong_array

write_longlong_array occurences:
org.omg.CORBA.DataOutputStream.write_longlong_array(long:A, int, int)
org.omg.CORBA.portable.OutputStream.write_longlong_array(long:A, int, int)


Occurences of write_long_array

write_long_array occurences:
org.omg.CORBA.DataOutputStream.write_long_array(int:A, int, int)
org.omg.CORBA.portable.OutputStream.write_long_array(int:A, int, int)


Occurences of write_Object

write_Object occurences:
org.omg.CORBA.DataOutputStream.write_Object(org.omg.CORBA.Object)
org.omg.CORBA.portable.OutputStream.write_Object(org.omg.CORBA.Object)


Occurences of write_octet

write_octet occurences:
org.omg.CORBA.DataOutputStream.write_octet(byte)
org.omg.CORBA.portable.OutputStream.write_octet(byte)


Occurences of write_octet_array

write_octet_array occurences:
org.omg.CORBA.DataOutputStream.write_octet_array(byte:A, int, int)
org.omg.CORBA.portable.OutputStream.write_octet_array(byte:A, int, int)


Occurences of write_short

write_short occurences:
org.omg.CORBA.DataOutputStream.write_short(short)
org.omg.CORBA.portable.OutputStream.write_short(short)


Occurences of write_short_array

write_short_array occurences:
org.omg.CORBA.DataOutputStream.write_short_array(short:A, int, int)
org.omg.CORBA.portable.OutputStream.write_short_array(short:A, int, int)


Occurences of write_string

write_string occurences:
org.omg.CORBA.DataOutputStream.write_string(java.lang.String)
org.omg.CORBA.portable.OutputStream.write_string(java.lang.String)


Occurences of write_TypeCode

write_TypeCode occurences:
org.omg.CORBA.DataOutputStream.write_TypeCode(org.omg.CORBA.TypeCode)
org.omg.CORBA.portable.OutputStream.write_TypeCode(org.omg.CORBA.TypeCode)


Occurences of write_ulong

write_ulong occurences:
org.omg.CORBA.DataOutputStream.write_ulong(int)
org.omg.CORBA.portable.OutputStream.write_ulong(int)


Occurences of write_ulonglong

write_ulonglong occurences:
org.omg.CORBA.DataOutputStream.write_ulonglong(long)
org.omg.CORBA.portable.OutputStream.write_ulonglong(long)


Occurences of write_ulonglong_array

write_ulonglong_array occurences:
org.omg.CORBA.DataOutputStream.write_ulonglong_array(long:A, int, int)
org.omg.CORBA.portable.OutputStream.write_ulonglong_array(long:A, int, int)


Occurences of write_ulong_array

write_ulong_array occurences:
org.omg.CORBA.DataOutputStream.write_ulong_array(int:A, int, int)
org.omg.CORBA.portable.OutputStream.write_ulong_array(int:A, int, int)


Occurences of write_ushort

write_ushort occurences:
org.omg.CORBA.DataOutputStream.write_ushort(short)
org.omg.CORBA.portable.OutputStream.write_ushort(short)


Occurences of write_ushort_array

write_ushort_array occurences:
org.omg.CORBA.DataOutputStream.write_ushort_array(short:A, int, int)
org.omg.CORBA.portable.OutputStream.write_ushort_array(short:A, int, int)


Occurences of write_value

write_value occurences:
org.omg.CORBA.Any.write_value(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.portable.BoxedValueHelper.write_value(org.omg.CORBA.portable.OutputStream, java.io.Serializable)
org.omg.CORBA.StringValueHelper.write_value(org.omg.CORBA.portable.OutputStream, java.io.Serializable)
org.omg.CORBA.WStringValueHelper.write_value(org.omg.CORBA.portable.OutputStream, java.io.Serializable)
org.omg.CORBA_2_3.portable.OutputStream.write_value(java.io.Serializable)
org.omg.CORBA_2_3.portable.OutputStream.write_value(java.io.Serializable, java.lang.Class)
org.omg.CORBA_2_3.portable.OutputStream.write_value(java.io.Serializable, java.lang.String)
org.omg.CORBA_2_3.portable.OutputStream.write_value(java.io.Serializable, org.omg.CORBA.portable.BoxedValueHelper)


Occurences of write_wchar

write_wchar occurences:
org.omg.CORBA.DataOutputStream.write_wchar(char)
org.omg.CORBA.portable.OutputStream.write_wchar(char)


Occurences of write_wchar_array

write_wchar_array occurences:
org.omg.CORBA.DataOutputStream.write_wchar_array(char:A, int, int)
org.omg.CORBA.portable.OutputStream.write_wchar_array(char:A, int, int)


Occurences of write_wstring

write_wstring occurences:
org.omg.CORBA.DataOutputStream.write_wstring(java.lang.String)
org.omg.CORBA.portable.OutputStream.write_wstring(java.lang.String)


Occurences of WrongAdapter (constructors)

WrongAdapter (constructors) occurences:
org.omg.PortableServer.POAPackage.WrongAdapter()
org.omg.PortableServer.POAPackage.WrongAdapter(java.lang.String)


Occurences of WrongMethodTypeException (constructors)

WrongMethodTypeException (constructors) occurences:
java.lang.invoke.WrongMethodTypeException()
java.lang.invoke.WrongMethodTypeException(java.lang.String)


Occurences of WrongPolicy (constructors)

WrongPolicy (constructors) occurences:
org.omg.PortableServer.POAPackage.WrongPolicy()
org.omg.PortableServer.POAPackage.WrongPolicy(java.lang.String)


Occurences of WrongTransaction (constructors)

WrongTransaction (constructors) occurences:
org.omg.CORBA.WrongTransaction()
org.omg.CORBA.WrongTransaction(java.lang.String)


Occurences of WrongTransactionHolder (constructors)

WrongTransactionHolder (constructors) occurences:
org.omg.CORBA.WrongTransactionHolder()
org.omg.CORBA.WrongTransactionHolder(org.omg.CORBA.WrongTransaction)


Occurences of wsdlLocation

wsdlLocation occurences:
javax.jws.WebService.wsdlLocation()
javax.xml.ws.WebServiceClient.wsdlLocation()
javax.xml.ws.WebServiceProvider.wsdlLocation()
javax.xml.ws.WebServiceRef.wsdlLocation()


Occurences of WSDL_PORT

WSDL_PORT occurences:
javax.xml.ws.handler.WSDL_PORT
javax.xml.ws.WSDL_PORT


Occurences of WSDL_SERVICE

WSDL_SERVICE occurences:
javax.xml.ws.handler.WSDL_SERVICE
javax.xml.ws.WSDL_SERVICE


Occurences of wsgen

wsgen occurences:
wsgen
wsgen


Occurences of wsimport

wsimport occurences:
wsimport
wsimport


Occurences of WStringSeqHolder (constructors)

WStringSeqHolder (constructors) occurences:
org.omg.CORBA.WStringSeqHolder()
org.omg.CORBA.WStringSeqHolder(java.lang.String:A)


Occurences of W_RESIZE_CURSOR

W_RESIZE_CURSOR occurences:
java.awt.W_RESIZE_CURSOR
java.awt.W_RESIZE_CURSOR


Occurences of x

x occurences:
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.geom.x
java.awt.x
java.awt.x
java.awt.x


Occurences of x1

x1 occurences:
java.awt.geom.x1
java.awt.geom.x1
java.awt.geom.x1
java.awt.geom.x1
java.awt.geom.x1
java.awt.geom.x1


Occurences of x2

x2 occurences:
java.awt.geom.x2
java.awt.geom.x2
java.awt.geom.x2
java.awt.geom.x2
java.awt.geom.x2
java.awt.geom.x2


Occurences of x500

x500 occurences:
compact1.javax.security.auth.x500
compact2.javax.security.auth.x500
compact3.javax.security.auth.x500
javax.security.auth.x500


Occurences of X500Principal (constructors)

X500Principal (constructors) occurences:
javax.security.auth.x500.X500Principal(byte:A)
javax.security.auth.x500.X500Principal(java.io.InputStream)
javax.security.auth.x500.X500Principal(java.lang.String)
javax.security.auth.x500.X500Principal(java.lang.String, java.util.Map)


Occurences of X500PrivateCredential (constructors)

X500PrivateCredential (constructors) occurences:
javax.security.auth.x500.X500PrivateCredential(java.security.cert.X509Certificate, java.security.PrivateKey)
javax.security.auth.x500.X500PrivateCredential(java.security.cert.X509Certificate, java.security.PrivateKey, java.lang.String)


Occurences of X509Certificate

X509Certificate occurences:
java.security.cert.X509Certificate
javax.security.cert.X509Certificate


Occurences of X509Certificate (constructors)

X509Certificate (constructors) occurences:
java.security.cert.X509Certificate()
javax.security.cert.X509Certificate()


Occurences of xa

xa occurences:
compact2.javax.transaction.xa
compact3.javax.transaction.xa
javax.transaction.xa


Occurences of XAException (constructors)

XAException (constructors) occurences:
javax.transaction.xa.XAException()
javax.transaction.xa.XAException(int)
javax.transaction.xa.XAException(java.lang.String)


Occurences of XA_RDONLY

XA_RDONLY occurences:
javax.transaction.xa.XA_RDONLY
javax.transaction.xa.XA_RDONLY


Occurences of xjc

xjc occurences:
xjc
xjc


Occurences of xml

xml occurences:
compact2.javax.xml
compact3.javax.xml
javax.xml


Occurences of XMLDecoder (constructors)

XMLDecoder (constructors) occurences:
java.beans.XMLDecoder(java.io.InputStream)
java.beans.XMLDecoder(java.io.InputStream, java.lang.Object)
java.beans.XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener)
java.beans.XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener, java.lang.ClassLoader)
java.beans.XMLDecoder(org.xml.sax.InputSource)


Occurences of XMLEncoder (constructors)

XMLEncoder (constructors) occurences:
java.beans.XMLEncoder(java.io.OutputStream)
java.beans.XMLEncoder(java.io.OutputStream, java.lang.String, boolean, int)


Occurences of XMLFilterImpl (constructors)

XMLFilterImpl (constructors) occurences:
org.xml.sax.helpers.XMLFilterImpl()
org.xml.sax.helpers.XMLFilterImpl(org.xml.sax.XMLReader)


Occurences of XMLNS

XMLNS occurences:
javax.xml.crypto.dsig.XMLNS
org.xml.sax.helpers.XMLNS


Occurences of XMLParseException (constructors)

XMLParseException (constructors) occurences:
javax.management.modelmbean.XMLParseException()
javax.management.modelmbean.XMLParseException(java.lang.Exception, java.lang.String)
javax.management.modelmbean.XMLParseException(java.lang.String)


Occurences of XMLReaderAdapter (constructors)

XMLReaderAdapter (constructors) occurences:
org.xml.sax.helpers.XMLReaderAdapter()
org.xml.sax.helpers.XMLReaderAdapter(org.xml.sax.XMLReader)


Occurences of XMLSignatureException (constructors)

XMLSignatureException (constructors) occurences:
javax.xml.crypto.dsig.XMLSignatureException()
javax.xml.crypto.dsig.XMLSignatureException(java.lang.String)
javax.xml.crypto.dsig.XMLSignatureException(java.lang.String, java.lang.Throwable)
javax.xml.crypto.dsig.XMLSignatureException(java.lang.Throwable)


Occurences of XMLStreamException (constructors)

XMLStreamException (constructors) occurences:
javax.xml.stream.XMLStreamException()
javax.xml.stream.XMLStreamException(java.lang.String)
javax.xml.stream.XMLStreamException(java.lang.String, java.lang.Throwable)
javax.xml.stream.XMLStreamException(java.lang.String, javax.xml.stream.Location)
javax.xml.stream.XMLStreamException(java.lang.String, javax.xml.stream.Location, java.lang.Throwable)
javax.xml.stream.XMLStreamException(java.lang.Throwable)


Occurences of XOR

XOR occurences:
com.sun.source.tree.XOR
java.awt.XOR


Occurences of xor

xor occurences:
java.math.BigInteger.xor(java.math.BigInteger)
java.util.BitSet.xor(java.util.BitSet)


Occurences of xpath

xpath occurences:
compact2.javax.xml.xpath
compact3.javax.xml.xpath
javax.xml.xpath


Occurences of XPathException (constructors)

XPathException (constructors) occurences:
javax.xml.xpath.XPathException(java.lang.String)
javax.xml.xpath.XPathException(java.lang.Throwable)


Occurences of XPathExpressionException (constructors)

XPathExpressionException (constructors) occurences:
javax.xml.xpath.XPathExpressionException(java.lang.String)
javax.xml.xpath.XPathExpressionException(java.lang.Throwable)


Occurences of XPathFactoryConfigurationException (constructors)

XPathFactoryConfigurationException (constructors) occurences:
javax.xml.xpath.XPathFactoryConfigurationException(java.lang.String)
javax.xml.xpath.XPathFactoryConfigurationException(java.lang.Throwable)


Occurences of XPathFilterParameterSpec (constructors)

XPathFilterParameterSpec (constructors) occurences:
javax.xml.crypto.dsig.spec.XPathFilterParameterSpec(java.lang.String)
javax.xml.crypto.dsig.spec.XPathFilterParameterSpec(java.lang.String, java.util.Map)


Occurences of XPathFunctionException (constructors)

XPathFunctionException (constructors) occurences:
javax.xml.xpath.XPathFunctionException(java.lang.String)
javax.xml.xpath.XPathFunctionException(java.lang.Throwable)


Occurences of XPathType (constructors)

XPathType (constructors) occurences:
javax.xml.crypto.dsig.spec.XPathType(java.lang.String, javax.xml.crypto.dsig.spec.XPathType.Filter)
javax.xml.crypto.dsig.spec.XPathType(java.lang.String, javax.xml.crypto.dsig.spec.XPathType.Filter, java.util.Map)


Occurences of xPositionForValue

xPositionForValue occurences:
javax.swing.plaf.basic.BasicSliderUI.xPositionForValue(int)
javax.swing.plaf.synth.SynthSliderUI.xPositionForValue(int)


Occurences of X_AXIS

X_AXIS occurences:
javax.swing.text.X_AXIS
javax.swing.X_AXIS


Occurences of y

y occurences:
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.geom.y
java.awt.y
java.awt.y
java.awt.y


Occurences of y1

y1 occurences:
java.awt.geom.y1
java.awt.geom.y1
java.awt.geom.y1
java.awt.geom.y1
java.awt.geom.y1
java.awt.geom.y1


Occurences of y2

y2 occurences:
java.awt.geom.y2
java.awt.geom.y2
java.awt.geom.y2
java.awt.geom.y2
java.awt.geom.y2
java.awt.geom.y2


Occurences of YEAR

YEAR occurences:
java.text.YEAR
java.time.temporal.YEAR
java.util.YEAR


Occurences of YEARS

YEARS occurences:
java.time.temporal.YEARS
javax.xml.datatype.YEARS


Occurences of YES_NO_CANCEL_OPTION

YES_NO_CANCEL_OPTION occurences:
javax.security.auth.callback.YES_NO_CANCEL_OPTION
javax.swing.YES_NO_CANCEL_OPTION


Occurences of YES_NO_OPTION

YES_NO_OPTION occurences:
javax.security.auth.callback.YES_NO_OPTION
javax.swing.YES_NO_OPTION


Occurences of yPositionForValue

yPositionForValue occurences:
javax.swing.plaf.basic.BasicSliderUI.yPositionForValue(int)
javax.swing.plaf.basic.BasicSliderUI.yPositionForValue(int, int, int)
javax.swing.plaf.synth.SynthSliderUI.yPositionForValue(int, int, int)


Occurences of Y_AXIS

Y_AXIS occurences:
javax.swing.text.Y_AXIS
javax.swing.Y_AXIS


Occurences of Z:Z_all_interfaces

Z:Z_all_interfaces occurences:
org.omg.CosNaming.BindingIteratorPOA.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)
org.omg.CosNaming.NamingContextExtPOA.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)
org.omg.CosNaming.NamingContextPOA.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)
org.omg.PortableServer.Servant.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)
org.omg.PortableServer.ServantActivatorPOA.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)
org.omg.PortableServer.ServantLocatorPOA.Z:Z_all_interfaces(org.omg.PortableServer.POA, byte:A)


Occurences of Z:Z_create_request

Z:Z_create_request occurences:
org.omg.CORBA.LocalObject.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue)
org.omg.CORBA.LocalObject.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue, org.omg.CORBA.ExceptionList, org.omg.CORBA.ContextList)
org.omg.CORBA.Object.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue)
org.omg.CORBA.Object.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue, org.omg.CORBA.ExceptionList, org.omg.CORBA.ContextList)
org.omg.CORBA.portable.ObjectImpl.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue)
org.omg.CORBA.portable.ObjectImpl.Z:Z_create_request(org.omg.CORBA.Context, java.lang.String, org.omg.CORBA.NVList, org.omg.CORBA.NamedValue, org.omg.CORBA.ExceptionList, org.omg.CORBA.ContextList)


Occurences of Z:Z_duplicate

Z:Z_duplicate occurences:
org.omg.CORBA.LocalObject.Z:Z_duplicate()
org.omg.CORBA.Object.Z:Z_duplicate()
org.omg.CORBA.portable.ObjectImpl.Z:Z_duplicate()


Occurences of Z:Z_get_delegate

Z:Z_get_delegate occurences:
org.omg.CORBA.portable.ObjectImpl.Z:Z_get_delegate()
org.omg.PortableServer.Servant.Z:Z_get_delegate()


Occurences of Z:Z_get_domain_managers

Z:Z_get_domain_managers occurences:
org.omg.CORBA.LocalObject.Z:Z_get_domain_managers()
org.omg.CORBA.Object.Z:Z_get_domain_managers()
org.omg.CORBA.portable.ObjectImpl.Z:Z_get_domain_managers()


Occurences of Z:Z_get_interface_def

Z:Z_get_interface_def occurences:
org.omg.CORBA.LocalObject.Z:Z_get_interface_def()
org.omg.CORBA.Object.Z:Z_get_interface_def()
org.omg.CORBA.portable.ObjectImpl.Z:Z_get_interface_def()
org.omg.PortableServer.Servant.Z:Z_get_interface_def()


Occurences of Z:Z_get_policy

Z:Z_get_policy occurences:
org.omg.CORBA.LocalObject.Z:Z_get_policy(int)
org.omg.CORBA.Object.Z:Z_get_policy(int)
org.omg.CORBA.portable.ObjectImpl.Z:Z_get_policy(int)


Occurences of Z:Z_hash

Z:Z_hash occurences:
org.omg.CORBA.LocalObject.Z:Z_hash(int)
org.omg.CORBA.Object.Z:Z_hash(int)
org.omg.CORBA.portable.ObjectImpl.Z:Z_hash(int)


Occurences of Z:Z_IDLTypeStub

Z:Z_IDLTypeStub occurences:
org.omg.CORBA._IDLTypeStub.Z:Z_IDLTypeStub()
org.omg.CORBA._IDLTypeStub.Z:Z_IDLTypeStub(org.omg.CORBA.portable.Delegate)


Occurences of Z:Z_ids

Z:Z_ids occurences:
org.omg.CORBA.DynamicImplementation.Z:Z_ids()
org.omg.CORBA.portable.ObjectImpl.Z:Z_ids()
org.omg.CORBA._IDLTypeStub.Z:Z_ids()
org.omg.CORBA._PolicyStub.Z:Z_ids()
org.omg.CosNaming._BindingIteratorImplBase.Z:Z_ids()
org.omg.CosNaming._BindingIteratorStub.Z:Z_ids()
org.omg.CosNaming._NamingContextExtStub.Z:Z_ids()
org.omg.CosNaming._NamingContextImplBase.Z:Z_ids()
org.omg.CosNaming._NamingContextStub.Z:Z_ids()
org.omg.DynamicAny._DynAnyFactoryStub.Z:Z_ids()
org.omg.DynamicAny._DynAnyStub.Z:Z_ids()
org.omg.DynamicAny._DynArrayStub.Z:Z_ids()
org.omg.DynamicAny._DynEnumStub.Z:Z_ids()
org.omg.DynamicAny._DynFixedStub.Z:Z_ids()
org.omg.DynamicAny._DynSequenceStub.Z:Z_ids()
org.omg.DynamicAny._DynStructStub.Z:Z_ids()
org.omg.DynamicAny._DynUnionStub.Z:Z_ids()
org.omg.DynamicAny._DynValueStub.Z:Z_ids()
org.omg.PortableServer._ServantActivatorStub.Z:Z_ids()
org.omg.PortableServer._ServantLocatorStub.Z:Z_ids()
org.omg.stub.java.rmi._Remote_Stub.Z:Z_ids()


Occurences of Z:Z_invoke

Z:Z_invoke occurences:
org.omg.CORBA.LocalObject.Z:Z_invoke(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.portable.InvokeHandler.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
org.omg.CORBA.portable.ObjectImpl.Z:Z_invoke(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.BindingIteratorPOA.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
org.omg.CosNaming.NamingContextExtPOA.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
org.omg.CosNaming.NamingContextPOA.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
org.omg.PortableServer.ServantActivatorPOA.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
org.omg.PortableServer.ServantLocatorPOA.Z:Z_invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)


Occurences of Z:Z_is_a

Z:Z_is_a occurences:
org.omg.CORBA.LocalObject.Z:Z_is_a(java.lang.String)
org.omg.CORBA.Object.Z:Z_is_a(java.lang.String)
org.omg.CORBA.portable.ObjectImpl.Z:Z_is_a(java.lang.String)
org.omg.PortableServer.Servant.Z:Z_is_a(java.lang.String)


Occurences of Z:Z_is_equivalent

Z:Z_is_equivalent occurences:
org.omg.CORBA.LocalObject.Z:Z_is_equivalent(org.omg.CORBA.Object)
org.omg.CORBA.Object.Z:Z_is_equivalent(org.omg.CORBA.Object)
org.omg.CORBA.portable.ObjectImpl.Z:Z_is_equivalent(org.omg.CORBA.Object)


Occurences of Z:Z_is_local

Z:Z_is_local occurences:
org.omg.CORBA.LocalObject.Z:Z_is_local()
org.omg.CORBA.portable.ObjectImpl.Z:Z_is_local()


Occurences of Z:Z_non_existent

Z:Z_non_existent occurences:
org.omg.CORBA.LocalObject.Z:Z_non_existent()
org.omg.CORBA.Object.Z:Z_non_existent()
org.omg.CORBA.portable.ObjectImpl.Z:Z_non_existent()
org.omg.PortableServer.Servant.Z:Z_non_existent()


Occurences of Z:Z_opsClass

Z:Z_opsClass occurences:
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.DynamicAny.Z:Z_opsClass
org.omg.PortableServer.Z:Z_opsClass
org.omg.PortableServer.Z:Z_opsClass


Occurences of Z:Z_orb

Z:Z_orb occurences:
org.omg.CORBA.LocalObject.Z:Z_orb()
org.omg.CORBA.portable.ObjectImpl.Z:Z_orb()
org.omg.PortableServer.Servant.Z:Z_orb()


Occurences of Z:Z_PolicyStub

Z:Z_PolicyStub occurences:
org.omg.CORBA._PolicyStub.Z:Z_PolicyStub()
org.omg.CORBA._PolicyStub.Z:Z_PolicyStub(org.omg.CORBA.portable.Delegate)


Occurences of Z:Z_read

Z:Z_read occurences:
org.omg.CORBA.AnyHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.AnySeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.BooleanHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.BooleanSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ByteHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CharHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CharSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.CurrentHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.DoubleHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.DoubleSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.FixedHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.FloatHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.FloatSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.IntHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.LongHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.LongLongSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.LongSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ObjectHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.OctetSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ParameterModeHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyErrorHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PolicyListHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.portable.Streamable.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.PrincipalHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ServiceInformationHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ShortHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ShortSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.StringHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.StringSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.TypeCodeHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ULongLongSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ULongSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.UnknownUserExceptionHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.UShortSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.ValueBaseHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WCharSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WrongTransactionHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.WStringSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingIteratorHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingListHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.BindingTypeHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NameComponentHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NameHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.IORHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.MultipleComponentProfileHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ServiceContextHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.ServiceContextListHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.TaggedComponentHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.IOP.TaggedProfileHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.IORInterceptor_3_0Holder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)
org.omg.PortableServer.ServantLocatorPackage.CookieHolder.Z:Z_read(org.omg.CORBA.portable.InputStream)


Occurences of Z:Z_release

Z:Z_release occurences:
org.omg.CORBA.LocalObject.Z:Z_release()
org.omg.CORBA.Object.Z:Z_release()
org.omg.CORBA.portable.ObjectImpl.Z:Z_release()


Occurences of Z:Z_releaseReply

Z:Z_releaseReply occurences:
org.omg.CORBA.LocalObject.Z:Z_releaseReply(org.omg.CORBA.portable.InputStream)
org.omg.CORBA.portable.ObjectImpl.Z:Z_releaseReply(org.omg.CORBA.portable.InputStream)


Occurences of Z:Z_request

Z:Z_request occurences:
org.omg.CORBA.LocalObject.Z:Z_request(java.lang.String)
org.omg.CORBA.LocalObject.Z:Z_request(java.lang.String, boolean)
org.omg.CORBA.Object.Z:Z_request(java.lang.String)
org.omg.CORBA.portable.ObjectImpl.Z:Z_request(java.lang.String)
org.omg.CORBA.portable.ObjectImpl.Z:Z_request(java.lang.String, boolean)


Occurences of Z:Z_servant_postinvoke

Z:Z_servant_postinvoke occurences:
org.omg.CORBA.LocalObject.Z:Z_servant_postinvoke(org.omg.CORBA.portable.ServantObject)
org.omg.CORBA.portable.ObjectImpl.Z:Z_servant_postinvoke(org.omg.CORBA.portable.ServantObject)


Occurences of Z:Z_servant_preinvoke

Z:Z_servant_preinvoke occurences:
org.omg.CORBA.LocalObject.Z:Z_servant_preinvoke(java.lang.String, java.lang.Class)
org.omg.CORBA.portable.ObjectImpl.Z:Z_servant_preinvoke(java.lang.String, java.lang.Class)


Occurences of Z:Z_set_delegate

Z:Z_set_delegate occurences:
org.omg.CORBA.portable.ObjectImpl.Z:Z_set_delegate(org.omg.CORBA.portable.Delegate)
org.omg.PortableServer.Servant.Z:Z_set_delegate(org.omg.PortableServer.portable.Delegate)


Occurences of Z:Z_set_policy_override

Z:Z_set_policy_override occurences:
org.omg.CORBA.LocalObject.Z:Z_set_policy_override(org.omg.CORBA.Policy:A, org.omg.CORBA.SetOverrideType)
org.omg.CORBA.Object.Z:Z_set_policy_override(org.omg.CORBA.Policy:A, org.omg.CORBA.SetOverrideType)
org.omg.CORBA.portable.ObjectImpl.Z:Z_set_policy_override(org.omg.CORBA.Policy:A, org.omg.CORBA.SetOverrideType)


Occurences of Z:Z_this

Z:Z_this occurences:
org.omg.CosNaming.BindingIteratorPOA.Z:Z_this()
org.omg.CosNaming.BindingIteratorPOA.Z:Z_this(org.omg.CORBA.ORB)
org.omg.CosNaming.NamingContextExtPOA.Z:Z_this()
org.omg.CosNaming.NamingContextExtPOA.Z:Z_this(org.omg.CORBA.ORB)
org.omg.CosNaming.NamingContextPOA.Z:Z_this()
org.omg.CosNaming.NamingContextPOA.Z:Z_this(org.omg.CORBA.ORB)
org.omg.PortableServer.ServantActivatorPOA.Z:Z_this()
org.omg.PortableServer.ServantActivatorPOA.Z:Z_this(org.omg.CORBA.ORB)
org.omg.PortableServer.ServantLocatorPOA.Z:Z_this()
org.omg.PortableServer.ServantLocatorPOA.Z:Z_this(org.omg.CORBA.ORB)


Occurences of Z:Z_this_object

Z:Z_this_object occurences:
org.omg.PortableServer.Servant.Z:Z_this_object()
org.omg.PortableServer.Servant.Z:Z_this_object(org.omg.CORBA.ORB)


Occurences of Z:Z_type

Z:Z_type occurences:
org.omg.CORBA.AnyHolder.Z:Z_type()
org.omg.CORBA.AnySeqHolder.Z:Z_type()
org.omg.CORBA.BooleanHolder.Z:Z_type()
org.omg.CORBA.BooleanSeqHolder.Z:Z_type()
org.omg.CORBA.ByteHolder.Z:Z_type()
org.omg.CORBA.CharHolder.Z:Z_type()
org.omg.CORBA.CharSeqHolder.Z:Z_type()
org.omg.CORBA.CurrentHolder.Z:Z_type()
org.omg.CORBA.DoubleHolder.Z:Z_type()
org.omg.CORBA.DoubleSeqHolder.Z:Z_type()
org.omg.CORBA.FixedHolder.Z:Z_type()
org.omg.CORBA.FloatHolder.Z:Z_type()
org.omg.CORBA.FloatSeqHolder.Z:Z_type()
org.omg.CORBA.IntHolder.Z:Z_type()
org.omg.CORBA.LongHolder.Z:Z_type()
org.omg.CORBA.LongLongSeqHolder.Z:Z_type()
org.omg.CORBA.LongSeqHolder.Z:Z_type()
org.omg.CORBA.ObjectHolder.Z:Z_type()
org.omg.CORBA.OctetSeqHolder.Z:Z_type()
org.omg.CORBA.ParameterModeHolder.Z:Z_type()
org.omg.CORBA.PolicyErrorHolder.Z:Z_type()
org.omg.CORBA.PolicyHolder.Z:Z_type()
org.omg.CORBA.PolicyListHolder.Z:Z_type()
org.omg.CORBA.portable.Streamable.Z:Z_type()
org.omg.CORBA.PrincipalHolder.Z:Z_type()
org.omg.CORBA.ServiceInformationHolder.Z:Z_type()
org.omg.CORBA.ShortHolder.Z:Z_type()
org.omg.CORBA.ShortSeqHolder.Z:Z_type()
org.omg.CORBA.StringHolder.Z:Z_type()
org.omg.CORBA.StringSeqHolder.Z:Z_type()
org.omg.CORBA.TypeCodeHolder.Z:Z_type()
org.omg.CORBA.ULongLongSeqHolder.Z:Z_type()
org.omg.CORBA.ULongSeqHolder.Z:Z_type()
org.omg.CORBA.UnknownUserExceptionHolder.Z:Z_type()
org.omg.CORBA.UShortSeqHolder.Z:Z_type()
org.omg.CORBA.ValueBaseHolder.Z:Z_type()
org.omg.CORBA.WCharSeqHolder.Z:Z_type()
org.omg.CORBA.WrongTransactionHolder.Z:Z_type()
org.omg.CORBA.WStringSeqHolder.Z:Z_type()
org.omg.CosNaming.BindingHolder.Z:Z_type()
org.omg.CosNaming.BindingIteratorHolder.Z:Z_type()
org.omg.CosNaming.BindingListHolder.Z:Z_type()
org.omg.CosNaming.BindingTypeHolder.Z:Z_type()
org.omg.CosNaming.NameComponentHolder.Z:Z_type()
org.omg.CosNaming.NameHolder.Z:Z_type()
org.omg.CosNaming.NamingContextExtHolder.Z:Z_type()
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder.Z:Z_type()
org.omg.CosNaming.NamingContextHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.NotFoundHolder.Z:Z_type()
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder.Z:Z_type()
org.omg.IOP.IORHolder.Z:Z_type()
org.omg.IOP.MultipleComponentProfileHolder.Z:Z_type()
org.omg.IOP.ServiceContextHolder.Z:Z_type()
org.omg.IOP.ServiceContextListHolder.Z:Z_type()
org.omg.IOP.TaggedComponentHolder.Z:Z_type()
org.omg.IOP.TaggedProfileHolder.Z:Z_type()
org.omg.PortableInterceptor.IORInterceptor_3_0Holder.Z:Z_type()
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder.Z:Z_type()
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder.Z:Z_type()
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder.Z:Z_type()
org.omg.PortableServer.ServantLocatorPackage.CookieHolder.Z:Z_type()


Occurences of Z:Z_write

Z:Z_write occurences:
org.omg.CORBA.AnyHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.AnySeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.BooleanHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.BooleanSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ByteHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.CharHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.CharSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.CurrentHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.DoubleHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.DoubleSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.FixedHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.FloatHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.FloatSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.IntHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.LongHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.LongLongSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.LongSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ObjectHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.OctetSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ParameterModeHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.PolicyErrorHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.PolicyHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.PolicyListHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.portable.Streamable.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.PrincipalHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ServiceInformationHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ShortHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ShortSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.StringHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.StringSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.TypeCodeHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ULongLongSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ULongSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.UnknownUserExceptionHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.UShortSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.ValueBaseHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.WCharSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.WrongTransactionHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CORBA.WStringSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.BindingHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.BindingIteratorHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.BindingListHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.BindingTypeHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NameComponentHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NameHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextExtHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.IORHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.MultipleComponentProfileHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.ServiceContextHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.ServiceContextListHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.TaggedComponentHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.IOP.TaggedProfileHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.PortableInterceptor.IORInterceptor_3_0Holder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.PortableInterceptor.ObjectReferenceFactoryHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)
org.omg.PortableServer.ServantLocatorPackage.CookieHolder.Z:Z_write(org.omg.CORBA.portable.OutputStream)


Occurences of ZERO

ZERO occurences:
java.math.ZERO
java.math.ZERO
java.time.ZERO
java.time.ZERO


Occurences of zip

zip occurences:
compact1.java.util.zip
compact2.java.util.zip
compact3.java.util.zip
java.util.zip


Occurences of ZipEntry (constructors)

ZipEntry (constructors) occurences:
java.util.zip.ZipEntry(java.lang.String)
java.util.zip.ZipEntry(java.util.zip.ZipEntry)


Occurences of ZipException (constructors)

ZipException (constructors) occurences:
java.util.zip.ZipException()
java.util.zip.ZipException(java.lang.String)


Occurences of ZipFile (constructors)

ZipFile (constructors) occurences:
java.util.zip.ZipFile(java.io.File)
java.util.zip.ZipFile(java.io.File, int)
java.util.zip.ZipFile(java.io.File, int, java.nio.charset.Charset)
java.util.zip.ZipFile(java.io.File, java.nio.charset.Charset)
java.util.zip.ZipFile(java.lang.String)
java.util.zip.ZipFile(java.lang.String, java.nio.charset.Charset)


Occurences of ZipInputStream (constructors)

ZipInputStream (constructors) occurences:
java.util.zip.ZipInputStream(java.io.InputStream)
java.util.zip.ZipInputStream(java.io.InputStream, java.nio.charset.Charset)


Occurences of ZipOutputStream (constructors)

ZipOutputStream (constructors) occurences:
java.util.zip.ZipOutputStream(java.io.OutputStream)
java.util.zip.ZipOutputStream(java.io.OutputStream, java.nio.charset.Charset)


Occurences of zone

zone occurences:
compact1.java.time.zone
compact2.java.time.zone
compact3.java.time.zone
java.time.temporal.TemporalQueries.zone()
java.time.zone


Occurences of zonedDateTime

zonedDateTime occurences:
java.time.chrono.Chronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.Chronology.zonedDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.HijrahChronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.HijrahChronology.zonedDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.IsoChronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.IsoChronology.zonedDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.JapaneseChronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.JapaneseChronology.zonedDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.MinguoChronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.MinguoChronology.zonedDateTime(java.time.temporal.TemporalAccessor)
java.time.chrono.ThaiBuddhistChronology.zonedDateTime(java.time.Instant, java.time.ZoneId)
java.time.chrono.ThaiBuddhistChronology.zonedDateTime(java.time.temporal.TemporalAccessor)


Occurences of ZoneRulesException (constructors)

ZoneRulesException (constructors) occurences:
java.time.zone.ZoneRulesException(java.lang.String)
java.time.zone.ZoneRulesException(java.lang.String, java.lang.Throwable)


Overview List

Attach API

All Classes

Packages

  • com.sun.tools.attach
  • com.sun.tools.attach.spi


com.sun.tools.attach

Classes

  • AttachPermission
  • VirtualMachine
  • VirtualMachineDescriptor

Exceptions

  • AgentInitializationException
  • AgentLoadException
  • AttachNotSupportedException


com.sun.tools.attach.spi

Classes

  • AttachProvider


Overview List

Compiler Tree API

All ClassesAll Profiles

Packages

  • com.sun.source.doctree
  • com.sun.source.tree
  • com.sun.source.util
  • jdk


Overview List

Compiler Tree API

All ClassesAll Packages

Profiles

  • compact1
  • compact2
  • compact3


com.sun.source.doctree

Interfaces

  • AttributeTree
  • AuthorTree
  • BlockTagTree
  • CommentTree
  • DeprecatedTree
  • DocCommentTree
  • DocRootTree
  • DocTree
  • DocTreeVisitor
  • EndElementTree
  • EntityTree
  • ErroneousTree
  • IdentifierTree
  • InheritDocTree
  • InlineTagTree
  • LinkTree
  • LiteralTree
  • ParamTree
  • ReferenceTree
  • ReturnTree
  • SeeTree
  • SerialDataTree
  • SerialFieldTree
  • SerialTree
  • SinceTree
  • StartElementTree
  • TextTree
  • ThrowsTree
  • UnknownBlockTagTree
  • UnknownInlineTagTree
  • ValueTree
  • VersionTree

Enums

  • AttributeTree.ValueKind
  • DocTree.Kind


com.sun.source.tree

Interfaces

  • AnnotatedTypeTree
  • AnnotationTree
  • ArrayAccessTree
  • ArrayTypeTree
  • AssertTree
  • AssignmentTree
  • BinaryTree
  • BlockTree
  • BreakTree
  • CaseTree
  • CatchTree
  • ClassTree
  • CompilationUnitTree
  • CompoundAssignmentTree
  • ConditionalExpressionTree
  • ContinueTree
  • DoWhileLoopTree
  • EmptyStatementTree
  • EnhancedForLoopTree
  • ErroneousTree
  • ExpressionStatementTree
  • ExpressionTree
  • ForLoopTree
  • IdentifierTree
  • IfTree
  • ImportTree
  • InstanceOfTree
  • IntersectionTypeTree
  • LabeledStatementTree
  • LambdaExpressionTree
  • LineMap
  • LiteralTree
  • MemberReferenceTree
  • MemberSelectTree
  • MethodInvocationTree
  • MethodTree
  • ModifiersTree
  • NewArrayTree
  • NewClassTree
  • ParameterizedTypeTree
  • ParenthesizedTree
  • PrimitiveTypeTree
  • ReturnTree
  • Scope
  • StatementTree
  • SwitchTree
  • SynchronizedTree
  • ThrowTree
  • Tree
  • TreeVisitor
  • TryTree
  • TypeCastTree
  • TypeParameterTree
  • UnaryTree
  • UnionTypeTree
  • VariableTree
  • WhileLoopTree
  • WildcardTree

Enums

  • LambdaExpressionTree.BodyKind
  • MemberReferenceTree.ReferenceMode
  • Tree.Kind


com.sun.source.util

Interfaces

  • DocSourcePositions
  • Plugin
  • SourcePositions
  • TaskListener

Classes

  • DocTreePath
  • DocTreePathScanner
  • DocTrees
  • DocTreeScanner
  • JavacTask
  • SimpleDocTreeVisitor
  • SimpleTreeVisitor
  • TaskEvent
  • TreePath
  • TreePathScanner
  • Trees
  • TreeScanner

Enums

  • TaskEvent.Kind


compact1 - jdk

Annotation Types

  • Exported


jdk

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact1

Package jdk

  • Annotation Types Summary
    Annotation Type Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


compact2 - jdk

Annotation Types

  • Exported


jdk

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact2

Package jdk

  • Annotation Types Summary
    Annotation Type Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


compact3 - jdk

Annotation Types

  • Exported


jdk

Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes
compact3

Package jdk

  • Annotation Types Summary
    Annotation Type Description
    Exported
    Indicates whether or not a JDK specific type or package is an exported part of the JDK suitable for use outside of the JDK implementation itself.
Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
Compiler Tree API
  • Prev Package
  • Next Package
  • Frames
  • No Frames
  • All Classes

Copyright © 2005, 2014, Oracle and/or its affiliates. All rights reserved.


jdk

Annotation Types

  • Exported


com.sun.javadoc

Interfaces

  • AnnotatedType
  • AnnotationDesc
  • AnnotationDesc.ElementValuePair
  • AnnotationTypeDoc
  • AnnotationTypeElementDoc
  • AnnotationValue
  • ClassDoc
  • ConstructorDoc
  • Doc
  • DocErrorReporter
  • ExecutableMemberDoc
  • FieldDoc
  • MemberDoc
  • MethodDoc
  • PackageDoc
  • Parameter
  • ParameterizedType
  • ParamTag
  • ProgramElementDoc
  • RootDoc
  • SeeTag
  • SerialFieldTag
  • SourcePosition
  • Tag
  • ThrowsTag
  • Type
  • TypeVariable
  • WildcardType

Classes

  • Doclet

Enums

  • LanguageVersion


com.sun.tools.doclets

Interfaces

  • Taglet


com.sun.tools.jconsole

Interfaces

  • JConsoleContext

Classes

  • JConsolePlugin

Enums

  • JConsoleContext.ConnectionState


Overview List

Java Debug Interface

All Classes

Packages

  • com.sun.jdi
  • com.sun.jdi.connect
  • com.sun.jdi.connect.spi
  • com.sun.jdi.event
  • com.sun.jdi.request


com.sun.jdi

Interfaces

  • Accessible
  • ArrayReference
  • ArrayType
  • BooleanType
  • BooleanValue
  • ByteType
  • ByteValue
  • CharType
  • CharValue
  • ClassLoaderReference
  • ClassObjectReference
  • ClassType
  • DoubleType
  • DoubleValue
  • Field
  • FloatType
  • FloatValue
  • IntegerType
  • IntegerValue
  • InterfaceType
  • LocalVariable
  • Locatable
  • Location
  • LongType
  • LongValue
  • Method
  • Mirror
  • MonitorInfo
  • ObjectReference
  • PathSearchingVirtualMachine
  • PrimitiveType
  • PrimitiveValue
  • ReferenceType
  • ShortType
  • ShortValue
  • StackFrame
  • StringReference
  • ThreadGroupReference
  • ThreadReference
  • Type
  • TypeComponent
  • Value
  • VirtualMachine
  • VirtualMachineManager
  • VoidType
  • VoidValue

Classes

  • Bootstrap
  • JDIPermission

Exceptions

  • AbsentInformationException
  • ClassNotLoadedException
  • ClassNotPreparedException
  • IncompatibleThreadStateException
  • InconsistentDebugInfoException
  • InternalException
  • InvalidCodeIndexException
  • InvalidLineNumberException
  • InvalidStackFrameException
  • InvalidTypeException
  • InvocationException
  • NativeMethodException
  • ObjectCollectedException
  • VMCannotBeModifiedException
  • VMDisconnectedException
  • VMMismatchException
  • VMOutOfMemoryException


com.sun.jdi.connect

Interfaces

  • AttachingConnector
  • Connector
  • Connector.Argument
  • Connector.BooleanArgument
  • Connector.IntegerArgument
  • Connector.SelectedArgument
  • Connector.StringArgument
  • LaunchingConnector
  • ListeningConnector
  • Transport

Exceptions

  • IllegalConnectorArgumentsException
  • TransportTimeoutException
  • VMStartException


com.sun.jdi.connect.spi

Classes

  • Connection
  • TransportService
  • TransportService.Capabilities
  • TransportService.ListenKey

Exceptions

  • ClosedConnectionException


com.sun.jdi.event

Interfaces

  • AccessWatchpointEvent
  • BreakpointEvent
  • ClassPrepareEvent
  • ClassUnloadEvent
  • Event
  • EventIterator
  • EventQueue
  • EventSet
  • ExceptionEvent
  • LocatableEvent
  • MethodEntryEvent
  • MethodExitEvent
  • ModificationWatchpointEvent
  • MonitorContendedEnteredEvent
  • MonitorContendedEnterEvent
  • MonitorWaitedEvent
  • MonitorWaitEvent
  • StepEvent
  • ThreadDeathEvent
  • ThreadStartEvent
  • VMDeathEvent
  • VMDisconnectEvent
  • VMStartEvent
  • WatchpointEvent


com.sun.jdi.request

Interfaces

  • AccessWatchpointRequest
  • BreakpointRequest
  • ClassPrepareRequest
  • ClassUnloadRequest
  • EventRequest
  • EventRequestManager
  • ExceptionRequest
  • MethodEntryRequest
  • MethodExitRequest
  • ModificationWatchpointRequest
  • MonitorContendedEnteredRequest
  • MonitorContendedEnterRequest
  • MonitorWaitedRequest
  • MonitorWaitRequest
  • StepRequest
  • ThreadDeathRequest
  • ThreadStartRequest
  • VMDeathRequest
  • WatchpointRequest

Exceptions

  • DuplicateRequestException
  • InvalidRequestStateException


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

Exceptions In RMI

APPENDIX A

Topics:

  • Exceptions During Remote Object Export
  • Exceptions During RMI Call
  • Exceptions or Errors During Return
  • Naming Exceptions
  • Activation Exceptions
  • Other Exceptions

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.1 Exceptions During Remote Object Export

When a remote object class is created that extends UnicastRemoteObject, the object is exported, meaning it can receive calls from external Java virtual machines and can be passed in an RMI call as either a parameter or return value. An object can either be exported on an anonymous port or on a specified port. For objects not extended from UnicastRemoteObject, the java.rmi.server.UnicastRemoteObject.exportObject method is used to explicitly export the object.
Exception
 Context

java.rmi.StubNotFoundException

Class of stub not found.

Name collision with class of same name as stub causes one of these errors:

  • Stub can't be instantiated
  • Stub not of correct class

Bad URL due to wrong codebase.

Stub not of correct class.

java.rmi.server.SkeletonNotFoundException

note: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2

Class of skeleton not found.

Name collision with class of same name as skeleton causes one of these errors:

  • Skeleton can't be instantiated
  • Skeleton not of correct class

Bad URL due to wrong codebase.

Skeleton not of correct class.

java.rmi.server.ExportException

The port is in use by another VM.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.2 Exceptions During RMI Call

Exception | Context
java.rmi.UnknownHostException | Unknown host.
java.rmi.ConnectException | Connection refused to host.
java.rmi.ConnectIOException | I/O error creating connection.
java.rmi.MarshalException | I/O error marshaling transport header, marshaling call header, or marshaling arguments.
java.rmi.NoSuchObjectException | Attempt to invoke a method on an object that is no longer available.
java.rmi.StubNotFoundException | Remote object not exported.
java.rmi.activation.ActivateFailedException | Thrown by RMI runtime when activation fails during a remote call to an activatable object

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.3 Exceptions or Errors During Return

Exception
 Context

java.rmi.UnmarshalException

Corrupted stream leads to either an I/O or protocol error when:

  • Marshaling return header
  • Checking return type
  • Checking return code
  • Unmarshaling return

Return value class not found.

java.rmi.UnexpectedException

An exception not mentioned in the method signature occurred (excluding runtime exceptions). The UnexpectedException exception object contains the underlying exception that was thrown by the server.

java.rmi.ServerError

Any error that occurs while the server is executing a remote method. The ServerError exception object contains the underlying error that was thrown by the server,

java.rmi.ServerException

This exception is thrown as a result of a remote method invocation when a RemoteException is thrown while processing the invocation on the server, either while unmarshalling the arguments or executing the remote method itself. For examples, see Section A.3.1, "Possible Causes of java.rmi.ServerException".

java.rmi.ServerRuntimeException

note: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2

This exception is not thrown by servers running Java 2 SDK, Standard Edition, v1.2-compatible versions. A RuntimeException is propagated to clients intact.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.3.1 Possible Causes of java.rmi.ServerException

These are some of the underlying exceptions which can occur on the server when the server is itself executing a remote method invocation. These exceptions are wrapped in a java.rmi.ServerException; that is the java.rmi.ServerException contains the original exception for the client to extract. These exceptions are wrapped by ServerException so that the client will know that its own remote method invocation on the server did not fail, but that a secondary remote method invocation made by the server failed.

Exception | Context
java.rmi.server.SkeletonMismatchException note: this exception is deprecated as of the Java 2 SDK, Standard Edition, v1.2 | Hash mismatch of stub and skeleton.
java.rmi.UnmarshalException | I/O error unmarshaling call header. I/O error unmarshaling arguments. Invalid method number or method hash.
java.rmi.MarshalException | Protocol error marshaling return.
java.rmi.RemoteException | A RemoteException occurring as a result of a remote invocation by the server.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.4 Naming Exceptions

The following table lists the exceptions specified in methods of the java.rmi.Naming class and the java.rmi.registry.Registry interface.

Exception | Context
java.rmi.AccessException | Operation disallowed. The registry restricts bind, rebind, and unbind to the same host. The lookup operation can originate from any host.
java.rmi.AlreadyBoundException | Attempt to bind a name that is already bound.
java.rmi.NotBoundException | Attempt to look up a name that is not bound.
java.rmi.UnknownHostException | Attempt to contact a registry on an unknown host.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.5 Activation Exceptions

The following table lists the exceptions that can be thrown in activities involving activatable objects. The activation API is in the package java.rmi.activation.
Exception | Context
java.rmi.activation.ActivateFailedException | Thrown by RMI runtime when activation fails during a remote call to an activatable object.
java.rmi.activation.ActivationException | General exception class used by the activation interfaces and classes.
java.rmi.activation.UnknownGroupException | Thrown by methods of the activation classes and interfaces when the ActivationGroupID parameter or ActivationGroupID in an ActivationGroupDesc parameter is invalid.
java.rmi.activation.UnknownObjectException | Thrown by methods of the activation classes and interfaces when the ActivationID parameter is invalid.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

A.6 Other Exceptions

Exception | Context
java.rmi.RMISecurityException note: this exception is deprecated as of the Java 2 SDK, Standard Edition, v1.2 | A security exception that is thrown by the RMISecurityManager.
java.rmi.server.ServerCloneException | Clone failed.
java.rmi.server.ServerNotActiveException | Attempt to get the client host via the RemoteServer.getClientHost method when the remote server is not executing in a remote method.
java.rmi.server.SocketSecurityException | Attempt to export object on an illegal port.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Properties In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

Properties In RMI

APPENDIX B

Topics:

  • Server Properties
  • Activation Properties
  • Other Properties

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Properties In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

B.1 Server Properties

The following table contains a list of properties typically used by servers for configuration. Note that properties are typically restricted from being set from applets.
Property | Description
java.rmi.server.codebase | Indicates the codebase URL of classes originating from the JVM. The codebase property is used to annotate class descriptors of classes originating from a JVM so that the class for an object sent as a parameter or return value in a remote method call can be loaded at the receiver.
java.rmi.server.disableHttp | If set to true, disables the use of HTTP for RMI calls. This means that RMI will never resort to using HTTP to invoke a call via a firewall. Defaults to false (HTTP usage is enabled).
java.rmi.server.hostname | RMI uses IP addresses to indicate the location of a server (embedded in a remote reference). If the use of a hostname is desired, this property is used to specify the fully-qualified hostname for RMI to use for remote objects exported to the local JVM. The property can also be set to an IP address. Not set by default.
java.rmi.dgc.leaseValue | Sets the lease duration that the RMI runtime grants to clients referencing remote objects in the JVM. Defaults to 10 minutes.
java.rmi.server.logCalls | If set to true, server call logging is turned on and prints to stderr. Defaults to false.
java.rmi.server.useCodebaseOnly | If set to true, when RMI loads classes (if not available via CLASSPATH) they are only loaded using the URL specified by the property java.rmi.server.codebase.
java.rmi.server.useLocalHostname | If the java.rmi.server.hostname property is not set and this property is set, then RMI will not use an IP address to denote the location (embedded in remote references) of remote objects that are exported into the JVM. Instead, RMI will use the value of the call to the method java.net.InetAddress.getLocalHost.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Properties In RMI

CONTENTS | PREV | NEXT Java Remote Method Invocation

B.2 Activation Properties

The following table contains a list of properties used in activation.
Property | Description
java.rmi.activation.port | The port number on which the ActivationSystem is exported. This port number should be specified in a JVM if the activation daemon rmid uses a port other than the default.
java.rmi.activation.activator.class | The class that implements the interface java.rmi.activation.Activator. This property is used internally to locate the resident implementation of the Activator from which the stub class name can be found.

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Properties In RMI

CONTENTS | PREV Java Remote Method Invocation

B.3 Other Properties

These properties are used to locate specific implementation classes within implementation packages. Note: all these properties have been deprecated as of Java 2 SDK, Standard Edition, v1.2.
Property | Description
java.rmi.loader.packagePrefix note: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2 | The package prefix for the class that implements the interface java.rmi.server.LoaderHandler. Defaults to sun.rmi.server.
java.rmi.registry.packagePrefix note: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2 | The package prefix for the class that implements the interface java.rmi.registry.RegistryHandler. Defaults to sun.rmi.registry.
java.rmi.server.packagePrefix note: this exception is deprecated as of Java 2 SDK, Standard Edition, v1.2 | The server package prefix. Assumes that the implementation of the server reference classes (such as UnicastRef and UnicastServerRef) are located in the package defined by the prefix. Defaults to sun.rmi.server.

CONTENTS | PREV
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


- Contents

CONTENTS | PREV | NEXT Java Remote Method Invocation

Table of Contents

1 Introduction

1.1 Background
1.2 System Goals

2 Java Distributed Object Model

2.1 Distributed Object Applications
2.2 Definition of Terms
2.3 The Distributed and Nondistributed Models Contrasted
2.4 Overview of RMI Interfaces and Classes
2.5 Implementing a Remote Interface
2.6 Parameter Passing in Remote Method Invocation
2.7 Locating Remote Objects

3 RMI System Overview

3.1 Stubs and Skeletons
3.2 Thread Usage in Remote Method Invocations
3.3 Garbage Collection of Remote Objects
3.4 Dynamic Class Loading
3.5 RMI Through Firewalls Via Proxies

4 Client Interfaces

4.1 The Remote Interface
4.2 The RemoteException Class
4.3 The Naming Class

5 Server Interfaces

5.1 The RemoteObject Class
5.2 The RemoteServer Class
5.3 The UnicastRemoteObject Class
5.4 The Unreferenced Interface
5.5 The RMISecurityManager Class
5.6 The RMIClassLoader Class
5.7 The LoaderHandler Interface
5.8 RMI Socket Factories
5.9 The RMIFailureHandler Interface
5.10 The LogStream Class
5.11 Stub and Skeleton Compiler

6 Registry Interfaces

6.1 The Registry Interface
6.2 The LocateRegistry Class
6.3 The RegistryHandler Interface

7 Remote Object Activation

7.1 Overview
7.2 Activation Protocol
7.3 Implementation Model for an "Activatable" Remote Object
7.4 Activation Interfaces

8 Stub/Skeleton Interfaces

8.1 The RemoteStub Class
8.2 The RemoteCall Interface
8.3 The RemoteRef Interface
8.4 The ServerRef Interface
8.5 The Skeleton Interface
8.6 The Operation Class

9 Garbage Collector Interfaces

9.1 The DGC Interface
9.2 The Lease Class
9.3 The ObjID Class
9.4 The UID Class
9.5 The VMID Class

10 RMI Wire Protocol

10.1 Overview
10.2 RMI Transport Protocol
10.3 RMI's Use of Object Serialization Protocol
10.4 RMI's Use of HTTP POST Protocol
10.5 Application-Specific Values for RMI
10.6 RMI's Multiplexing Protocol

A Exceptions In RMI

A.1 Exceptions During Remote Object Export
A.2 Exceptions During RMI Call
A.3 Exceptions or Errors During Return
A.4 Naming Exceptions
A.5 Activation Exceptions
A.6 Other Exceptions

B Properties In RMI

B.1 Server Properties
B.2 Activation Properties
B.3 Other Properties

CONTENTS | PREV | NEXT
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved.


-

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Change History

May 12, 2005 Updates for JavaTM SE Development Kit, v6 Beta 1

  • Added statement about how an array object returned by a readResolve invocation for an unshared read is handled.
  • Clarified the behavior in the event of an invalid serialPersistentFields value.
  • Clarified that serialVersionUID matching is waived for array classes.
  • Clarified when IllegalArgumentException is thrown by ObjectOutputStream.PutFields methods.

July 24, 2003 Updates for JavaTM 2 SDK, Standard Edition, v1.5 Beta 1

  • Added support for serializing enum constants.
  • Added specification of class modifier flags used in the computation of default serialVersionUID values to Section 4.6, "Stream Unique Identifiers".

Aug. 16, 2001 Updates for JavaTM 2 SDK, Standard Edition, v1.4 Beta 2

  • Added support for class-defined readObjectNoData methods, to be used for initializing serializable class fields in cases not covered by class-defined readObject methods. See Section 3.5, "The readObjectNoData Method", as well as Appendix A, "Security in Object Serialization".
  • New methods ObjectOutputStream.writeUnshared and ObjectInputStream.readUnshared provide a mechanism for ensuring unique references to deserialized objects. See Section 2.1, "The ObjectOutputStream Class", Section 3.1, "The ObjectInputStream Class", as well as Appendix A, "Security in Object Serialization".
  • Documented new security checks in the one-argument constructors for ObjectOutputStream and ObjectInputStream. See Section 2.1, "The ObjectOutputStream Class" and Section 3.1, "The ObjectInputStream Class".
  • Added caution against using inner classes for serialization in Section 1.10, "The Serializable Interface".
  • Clarified requirement that class-defined writeObject methods invoke ObjectOutputStream.defaultWriteObject or writeFields once before writing optional data, and that class-defined readObject methods invoke ObjectInputStream.defaultReadObject or readFields once before reading optional data. See Section 2.3, "The writeObject Method" and Section 3.4, "The readObject Method".
  • Clarified the behavior of ObjectInputStream when class-defined readObject or readExternal methods attempt read operations which exceed the bounds of available data; see Section 3.4, "The readObject Method" and Section 3.6, "The readExternal Method".
  • Clarified the description of non-proxy class descriptor field type strings to require that they be written in "field descriptor" format; see Section 6.2, "Stream Elements".

July 30, 1999 Updates for JavaTM 2 SDK, Standard Edition, v1.3 Beta

  • Added the ability to write String objects for which the UTF encoding is longer than 65535 bytes in length. See Section 6.2, "Stream Elements".
  • New methods ObjectOutputStream.writeClassDescriptor and ObjectInputStream.readClassDescriptor provide a means of customizing the serialized representation of ObjectStreamClass class descriptors. See Section 2.1, "The ObjectOutputStream Class" and Section 3.1, "The ObjectInputStream Class".
  • Expanded Appendix A, "Security in Object Serialization".

Sept. 30, 1998 Updates for JDKTM 1.2 Beta4 RC1

  • Documentation corrections only.

June 22, 1998 Updates for JDKTM 1.2 Beta4

  • Eliminated JDKTM 1.2 java.io interfaces, Replaceable and Resolvable.References to either of these classes as an interface should be replaced with java.io.Serializable. Serialization will use reflection to invoke the methods, writeReplace and readResolve, if the Serializable class defines these methods. See Section 2.5, "The writeReplace Method" and Section 3.7, "The readResolve Method."
  • New javadoc tags @serial, @serialField, and @serialData provide a way to document the Serialized Form of a Serializable class. Javadoc generates a serialization specification based on the contents of these tags. See Section 1.6, "Documenting Serializable Fields and Data for a Class."
  • Special Serializable class member, serialPersistentFields, must be declared private. See Section 1.5, "Defining Serializable Fields for a Class."
  • Clarified the steps involved in computing the serialVersionUID in Section 4.6, "Stream Unique Identifiers."

Feb. 6, 1998 Updates for JDKTM 1.2 Beta 3

  • Introduced the concept of STREAM_PROTOCOL versions. Added the STREAM_PROTOCOL_2 version to indicate a new format for Externalizable objects that enable skipping by an Externalizable object within the stream, even when the object's class is not available in the local Virtual Machine. Compatibility issues are discussed in Section 6.3, "Stream Protocol Versions."
  • The ObjectInputStream.resolveClass method can return a local class in a different package than the name of the class within the stream. This capability enables renaming of packages between releases. The serialVersionUID and the base class name must be the same in the stream and in the local version of the class. See Section 3.1, "The ObjectInputStream Class."
  • Allow substitution of String or array objects when writing them to or reading them from the stream. See Section 2.1, "The ObjectOutputStream Class" and Section 3.1, "The ObjectInputStream Class."

Sept. 4, 1997 Updates for JDKTM 1.2 Beta1

  • Separated the Replaceable interface into two interfaces: Replaceable and Resolvable. The Replaceable interface allows a class to nominate its own replacement just before serializing the object to the stream. The Resolvable interface allows a class to nominate its own replacement when reading an object from the stream.
  • Modified serialization to use the JDKTM 1.2 security model. There is a check for SerializablePermission "enableSubstitution" within the ObjectInputStream.enableReplace and ObjectOutputStream.enableResolve methods. See Section 2.1, "The ObjectOutputStream Class" and Section 3.1, "The ObjectInputStream Class."
  • Updated writeObject's exception handler to write handled IOExceptions into the stream. See Section 2.1, "The ObjectOutputStream Class."

July 3, 1997 Updates for JDKTM 1.2 Alpha

  • Documented the requirements for specifying the serialized state of classes. See Section 1.5, "Defining Serializable Fields for a Class."
  • Added the Serializable Fields API to allow classes more flexibility in accessing the serialized fields of a class. The stream protocol is unchanged. See Section 1.7, "Accessing Serializable Fields of a Class," Section 2.2, "The ObjectOutputStream.PutField Class," and Section 3.2, "The ObjectInputStream.GetField Class."
  • Clarified that field descriptors and data are written to and read from the stream in canonical order. See Section 4.1, "The ObjectStreamClass Class."

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


- Example of Serializable Fields

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Example of Serializable Fields

APPENDIX C

Topics:

  • Example Alternate Implementation of java.io.File

C.1 Example Alternate Implementation of java.io.File

This appendix provides a brief example of how an existing class could be specified and implemented to interoperate with the existing implementation but without requiring the same assumptions about the representation of the file name as a String.

The system class java.io.File represents a filename and has methods for parsing, manipulating files and directories by name. It has a single private field that contains the current file name. The semantics of the methods that parse paths depend on the current path separator which is held in a static field. This path separator is part of the serialized state of a file so that file name can be adjusted when read.

The serialized state of a File object is defined as the serializable fields and the sequence of data values for the file. In this case, there is one of each.

Serializable Fields:
    String path;     // path name with embedded separators
Serializable Data:
    char            // path name separator for path name
An alternate implementation might be defined as follows:
class File implements java.io.Serializable {
    ...
    private String[] pathcomponents;
    // Define serializable fields with the ObjectStreamClass

   /**

    * @serialField path String

     *              Path components separated by separator.

     */

   private static final ObjectStreamField[] serialPersistentFields
        = { new ObjectStreamField("path", String.class) };
    ...
        /**

      * @serialData  Default fields followed by separator character.

    */

    private void writeObject(ObjectOutputStream s)
        throws IOException
    {
        ObjectOutputStream.PutField fields = s.putFields();
        StringBuffer str = new StringBuffer();
        for(int i = 0; i < pathcomponents; i++) {
            str.append(separator);
            str.append(pathcomponents[i]);
        }
        fields.put("path", str.toString());
        s.writeFields();
        s.writeChar(separatorChar); // Add the separator character
    }
    ...

    private void readObject(ObjectInputStream s)
        throws IOException
    {
        ObjectInputStream.GetField fields = s.readFields();
        String path = (String)fields.get("path", null);
        ...
        char sep = s.readChar(); // read the previous separator char

        // parse path into components using the separator
        // and store into pathcomponents array.
    }
}

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


- Exceptions In Object Serialization

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Exceptions In Object Serialization

APPENDIX B

All exceptions thrown by serialization classes are subclasses of ObjectStreamException which is a subclass of IOException.

Exception | Description
ObjectStreamException | Superclass of all serialization exceptions.
InvalidClassException Thrown when a class cannot be used to restore objects for any of these reasons:
  • The class does not match the serial version of the class in the stream.
  • The class contains fields with invalid primitive data types.
  • The Externalizable class does not have a public no-arg constructor.
  • The Serializable class can not access the no-arg constructor of its closest non-Serializable superclass.
NotSerializableException | Thrown by a readObject or writeObject method to terminate serialization or deserialization.
StreamCorruptedException Thrown:
  • If the stream header is invalid.
  • If control information not found.
  • If control information is invalid.
  • JDK 1.1.5 or less attempts to call readExternal on a PROTOCOL_VERSION_2 stream.
NotActiveException

Thrown if writeObject state is invalid within the following ObjectOutputStream methods:

  • defaultWriteObject
  • putFields
  • writeFields

Thrown if readObject state is invalid within the following ObjectInputStream methods:

  • defaultReadObject
  • readFields
  • registerValidation
InvalidObjectException | Thrown when a restored object cannot be made valid.
OptionalDataException | Thrown by readObject when there is primitive data in the stream and an object is expected. The length field of the exception indicates the number of bytes that are available in the current block.
WriteAbortedException | Thrown when reading a stream terminated by an exception that occurred while the stream was being written.
CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


- Security in Object Serialization

CONTENTS | PREV | NEXT Java Object Serialization Specification
version 6.0

Security in Object Serialization

APPENDIX A

Refer to the Secure Coding Guidelines for the Java Programming Language for information about security in object serialization.

CONTENTS | PREV | NEXT
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.


--                    LDAP Schema for JSR 160 Lookup
--                    ------------------------------

-- AttributeTypes:
-----------------

-- jmxServiceURL attribute is an IA5 String

( 1.3.6.1.4.1.42.2.27.11.1.1 NAME 'jmxServiceURL'
  DESC 'String representation of a JMX Service URL'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
  SINGLE-VALUE )

-- jmxAgentName attribute is an IA5 String

( 1.3.6.1.4.1.42.2.27.11.1.2 NAME 'jmxAgentName'
  DESC 'Name of the JMX Agent'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
  SINGLE-VALUE )

-- jmxProtocolType attribute is an IA5 String

( 1.3.6.1.4.1.42.2.27.11.1.3 NAME 'jmxProtocolType'
  DESC 'Protocol used by the registered connector'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
  SINGLE-VALUE )

-- jmxAgentHost attribute is an IA5 String

( 1.3.6.1.4.1.42.2.27.11.1.4 NAME 'jmxAgentHost'
  DESC 'Names or IP Addresses of the host on which the agent is running.
        When multiple values are given, they should be aliases to the
        same host.'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26  )

-- jmxProperty attribute is an IA5 String

( 1.3.6.1.4.1.42.2.27.11.1.5 NAME 'jmxProperty'
  DESC 'Java-like property characterizing the registered object.
        The form of each value should be: "<property-name>=<value>".
        For instance: "com.sun.jmx.remote.tcp.timeout=200"'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

-- jmxExpirationDate attribute is a Generalized Time
-- see [RFC 2252] - or X.208 for a description of
-- Generalized Time

( 1.3.6.1.4.1.42.2.27.11.1.6 NAME 'jmxExpirationDate'
  DESC 'Date at which the JMX Service URL will be considered obsolete
        and may be removed from the directory tree'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
  SINGLE-VALUE )

-- ObjectClasses:
-----------------

-- jmxConnector class - represents a JMX Connector.
-- must contain the JMX Service URL
-- and the JMX Agent Name

( 1.3.6.1.4.1.42.2.27.11.2.1 NAME 'jmxConnector'
  DESC  'A class representing a JMX Connector, and containing a
         JMX Service URL. The jmxServiceURL is not present if the server
         is not accepting connections'
  AUXILIARY
  MUST  ( jmxAgentName  )
  MAY   ( jmxServiceURL $ jmxAgentHost $ jmxProtocolType $ jmxProperty $
          jmxExpirationDate $ description ) )


Documentation Contents
CONTENTS | PREV | NEXT

Contents

1. Introduction

2. Goals and Design Principles

3. Overview of the Architecture

4. Fundamentals
4.1 Naming -- The Foundation
4.2 Directory Objects
4.3 URLs and Composite Names
4.4 Events
5. Overview of the Interface
5.1 The Naming Package -- javax.naming
5.1.1 Contexts
5.1.2 The Initial Context
5.1.3 Names
5.1.4 Bindings
5.1.5 References
5.1.6 Referrals
5.2 The Directory Package -- javax.naming.directory
5.2.1 Directory Objects
5.2.2 Attributes
5.2.3 Directory Objects as Naming Contexts
5.2.4 The Initial Context
5.2.5 Searches
5.2.6 Schema
5.3 The Event Package -- javax.naming.event
5.3.1 Naming Events
5.3.2 Naming Listeners
5.3.3 Event Registration and Deregistration
5.3.4 Exception Handling
5.4 The LDAP Package -- javax.naming.ldap
5.4.1 Extended Operations
5.4.2 Controls
5.4.3 The Initial Context
5.4.4 Unsolicited Notifications
6. Configuration
6.1 Environment Properties
6.2 Context Environment
6.3 Resource Files
6.4 Application/Applet-scope Standard JNDI Properties
6.5 How the Environment Properties are Set
6.6 Modifications to the Environment
7. Scenarios
7.1 User authentication
7.2 Electronic Mail
7.3 Databases
7.4 Browsing
7.5 Network Printing
8. Security Considerations
8.1 JNDI Classes
8.2 Security Model
8.3 Access To Servers
8.4 Sharing Context Handles
8.5 Context Environment
8.6 Class Loading
8.7 Serializable Objects
8.8 Responsibilities of Service Providers
9. Design Choices
9.1 Separation of Interfaces into Context and DirContext
9.2 Separation of JNDI into Different Functional Packages
9.3 Separation of Client APIs and Service Provider Interfaces
9.4 Multiple methods for listing Context
9.5 Support for Federation
9.6 DirContext versus DirObject
9.7 Support for Schemas
9.8 Overloaded Methods in Context and DirContext
9.9 Reference and Referenceable
9.10 Automatically Turning References into Objects

Appendix A: JNDI Standard Environment Properties

Appendix B: Examples for LDAP Programmers

Appendix C: Legend for Class Diagram

Appendix D: JNDI Change History

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents

See Legal Notices

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
[Top] [Prev] [Next] [Bottom]
1 Introduction
1.1 Document Overview
1.2 Interface Overview
1.2.1 NamingManager and DirectoryManager
1.2.2 Initial Contexts
1.2.3 Object Factories
1.2.4 State Factories
1.2.5 Federation Support
2 Building a Context Implementation
2.1 Ownership of Parameters
2.2 Reentrancy
2.3 Basic Support-Implementing the Context Interface(s)
2.4 Object Support
2.4.1 Reading an Object
2.4.2 Storing an Object
2.5 Federation Support
2.5.1 Names
2.5.2 Resolving Through a Context
2.5.3 Resolving Through to Subinterfaces of Context
2.5.4 Naming System Boundaries
2.5.5 Continuing an Operation in a Federation
2.5.6 "Dynamic" Location of Next Naming System
2.5.7 More about CannotProceedException
2.5.8 Contextual Information
2.6 Referral Support
2.7 Schema Support
2.8 Event Support
2.9 Context Environment Support
2.9.1 Property Naming Convention
2.9.2 Initializing a Context's Environment
2.9.3 Inheritance
2.9.4 Updates to the Environment
2.9.5 Provider Resource Files
2.10 Connection Management
3 The Initial Context
3.1 The Initial Context Factory
3.1.1 Exceptions
3.2 URL Support
3.2.1 URL Context
3.2.2 URL Context Factory
3.2.3 Service Provider's Responsibility
3.3 Overriding the Default Behavior
3.3.1 Removing URL Support
3.3.2 Removing All Policy
3.4 Implementing a Subclass of InitialContext
3.4.1 URL Support
3.4.2 New Method Support
3.4.3 Constructors
4 Customizing A Context Implementation
4.1 Reading Objects: Object Factories
4.1.1 Handling Structured References
4.1.2 Handling URL References
4.1.3 Handling Arbitrary References: The java.naming.factory.object Property
4.1.4 Overriding the Default Behavior
4.1.5 Context Factory
4.1.6 URL Context Factory
4.2 Storing Objects: State Factories
4.2.1 Input/Output Options
4.2.2 Locating State Factories: The java.naming.factory.state Property
4.3 Narrowing LDAP v3 Controls: Response Control Factories
4.3.1 Locating Response Control Factories: The java.naming.factory.control Property
4.4 Ownership of Parameters
4.5 Reentrancy
Appendix A: Service Provider Example
Appendix B: Legend for Class Diagram
Appendix C: JNDI Change History

[Top] [Prev] [Next] [Bottom]
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


Documentation Contents
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


- Java Print Service Glossary

Documentation Contents
CONTENTS | PREV | NEXT

APPENDIX G

Java Print Service Glossary

attribute
a description of: a capability of a print service, a charactaristic of a doc, an instruction for processing a doc or an entire print job, or the state of a print job or printer.
attribute category
the name of the attribute without its range of values. The Java Print Service represents the attribute category with a class, such as the OrientationRequested class. An instance of an attribute class, such as an OrientationRequested object, is an attribute value.
attribute set
an attribute collection that usually is restricted to contain only a certain kind of attribute. The Java Print Service defines a superinterface for all attribute sets called AttributeSet and an interface for each kind of attribute set. The kinds of attribute sets are: doc attribute set, print request attribute set, print job attribute set, and print service attribute set.
attribute value
one of the range of values that an attribute supports. The Java Print Service represents each supported attribute with one of the attribute classes, such as the OrientationRequested class. The class itself is the attribute category. An instance of the class, such as an OrientationRequested object, is the attribute value. The term attribute often refers to the attribute value because the value of an attribute implies the attribute itself.
doc
a piece of print data. the Java Print Service uses the Doc interface to represent a piece of print data.
doc attribute
an attribute that specifies a characteristic of an individual document and the print job settings to be applied to an individual document.
doc attribute set
a collection of attributes that is restricted to only contain doc attributes.
doc flavor
a document type. The Java Print Service uses the DocFlavor class to represent a document type. A DocFlavor object encapsulates a String representing a MIME type, which indicates the format of the document, and a String representing a Java class, such as "java.io.InputStream", that indicates how the document is sent to the printer.
hash attribute set
an attribute set that can contain different kinds of attributes. The Java Print Service represents this attribute set with the HashAttributeSet class, which implements AttributeSet.
print job
a submitted print request, which includes one or more pieces of print data and a set of processing instructions. The Java Print Service represents a print job with the DocPrintJob object, which is obtained from a print service.
print job attribute
an attribute that reports the status of a print job. A client usually does not specify these attributes since these attributes describe the print job after the client has submitted it. To specify settings for a whole print job, the client instead uses the print request attributes.
print job attribute set
a collection of attributes that is restricted to only contain print job attributes.
print request
an unsubmitted print job.
print request attribute
an attribute that specifies a setting applied to a whole print job and to all the documents in the print job.
print request attribute set
a collection of attributes that is restricted to only contain print request attributes.
print service
an interface that represents a particular printer and is a factory for print jobs.
print service attribute
an attribute that describes a printer. An example of such an attribute is one that describes the printer's location.
print service attribute set
a collection of attributes that is restricted to only contain print service attributes.
print-service lookup
the action of attempting to locate a set of print services representing printers that can print a given set of print data according to a given set of processing instructions. A client uses the PrintServiceLookup class to perform this action.
stream print service
a print service that prints data to a client-provided output stream.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

1. Introduction

History of Printing on the Java Platform
What the Java Print Service API Offers
Java Print Service Architecture
The javax.print Package
Discover Print Services
Specify the Print Data Format
Create Print Jobs
The javax.print.event Package
How Applications Use the Java Print Service
A Basic Example

2. Attributes

Attribute Categories and Values
Attribute Roles
Attribute Sets
How to Specify Attributes
Standard Attributes
OrientationRequested
Copies
Media
MediaSize
MediaPrintableArea
Destination
SheetCollate
Sides
Fidelity
Uses of JPS Attributes

3. Specifying Document Types

Client-Formatted Print Data
MIME Types for Preformatted Data
Text Data
Page Description Language Documents
Image Data
Autosense Print Data
Representation Classes
Importance of Character Encoding
Service-Formatted Print Data
How to Use DocFlavor

4. Printing and Streaming Documents

StreamPrintService Versus PrintService
Locating Services
Discovering Print Services
Discovering Stream Print Services
Obtaining a Print Job
Creating a Doc
Registering for Events
Print Service Events
Print Job Events
PrintJobAttributeListener
PrintJobListener
Submitting the Print Job
Submitting the Print Job to the Printer
Submitting the Print Job to the Stream
Print Service Providers

5. Printing and Streaming 2D Graphics

Using PrinterJob to Print or Stream Graphics
Printing 2D Graphics
Streaming 2D Graphics
Using Service-Formatted Data
Printing the Service-Formatted Data
Streaming Service-Formatted Print Data

A. Example: PrintPS.java

B. Example: PrintGIFtoStream.java

C. Example: Print2DPrinterJob.java

D. Example: Print2DGraphics.java

E. Example: Print2DtoStream.java

F. Example: PrintGIF.java

G. Java Print Service Glossary

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


UML Sequence diagram shows how a client and a server normally make a TCP
connection with ServerSocket and Socket classes.


UML Sequence diagram show how a datagram packet is sent with
DatagramPacket and DatagramSocket classes.


UML Sequence diagram shows how to open a connection and access a URL with
the URL and URLConnection classes.


                Java(tm) Secure Socket Extension
            for the JavaTM 2 Standard Edition, v5.0

                        Sample Code

                          README

----------------------------------------------------------------------
CONTENTS
----------------------------------------------------------------------
    - Introduction
    - Sample KeyStores
    - Code Examples
    - Troubleshooting

----------------------------------------------------------------------
Introduction
----------------------------------------------------------------------
This JSSE sample code bundle provides some simple examples of how
the JSSE can be used to secure communications in the Java(tm) network
environment.

The samples do require some familiarity with Java and the JSSE API, so
please consult the appropriate documentation for more information.

JDK:	http://java.sun.com/doc/

JSSE:	Documentation for the JSSE API can be found in Sun's
    JDK implementation or documentation bundles, or at
    http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html

    If you use a JSSE implementation from a vendor other than Sun,
    also consult that JSSE implementation's documentation.  Follow any
    instructions given by the vendor as to how to configure the
    security provider, set the classpaths (if necessary), enable the
    https protocol handler, define HTTPS proxy servers, and so on.

----------------------------------------------------------------------
Sample Truststores
----------------------------------------------------------------------

This bundle includes sample KeyStore files that are used with
the sample code.  They are stored in the "JKS" KeyStore format,
which is the default format used by Sun's JDK implementation.  (If
another KeyStore format is desired, the JDK will need to be configured
to recognize the new default format.)

JSSE uses the following certificate KeyStore files to authenticate the
clients and servers.

*/testkeys      These files are used by the code samples as the source
        of public/private key and certificate material.  In the
        client program directories, the testkeys files contains
        the certificate entry for the Java mascot "Duke".  In
        the server program directories (./sockets/server and
        rmi), the file contains a certificate entry for the
        server "localhost".

        The sample code expects the testkeys file to be in the
        current working directory.

        NOTE:  These are very simple certificates and are not
        appropriate for a production environment, but they
        should be sufficient for running the samples here.

        The password for these keystores is:  passphrase

samplecacerts	This truststore file is very similar to the stock
        JDK cacerts file, in that it contains trust
        certificates from several vendors.  It also contains
        the trusted certificates from "Duke" and "localhost"
        above.

        The password for this keystore is the same as the
        JDK cacert's initial password:  changeit

        Please see your provider's documentation for
        how to configure the location of your trusted cert
        file.

        NOTES FOR RUNNING WITH SUN's JDK:
        ---------------------------------

            Users of the Sun JDK can specify the location of
            the truststore by using one of the following
            methods (and are described more fully in the Sun
            JDK JSSE Reference Guide):

            1.  System properties:

            java -Djavax.net.ssl.trustStore=samplecacerts \
                -Djavax.net.ssl.trustStorePassword=changeit
                Application

            2.  Install the file into:

            <java-home>/lib/security/jssecacerts

            3.  Install the file into:

            <java-home>/lib/security/cacerts

            If you choose 2) or 3), be sure to replace this
            file with a production cacerts file before
            deployment.

The Sun JDK utility "keytool" can be used to generate alternate
certificates and keystore files.

*******************************************

IMPORTANT NOTE:  Verify Your cacerts File

Since you trust the CAs in the cacerts file as entities for signing and
issuing certificates to other entities, you must manage the cacerts
file carefully.  The cacerts file should contain only certificates of
the entities and CAs you trust.  It is your responsibility to verify the
trusted root CA certificates bundled in the cacerts file and make your
own trust decisions.  To remove an untrusted CA certificate from the
cacerts file, use the delete option of the keytool command. You can
find the cacerts file in the JRE installation directory. Contact your
system administrator if you do not have permission to edit this file.

----------------------------------------------------------------------
Code Examples
----------------------------------------------------------------------
The sample code bundle is broken into several directories, based on
the style of SSL connections.

urls

    URLReader.java

    This example illustrates using a URL to access resources on a
    secure site.  By default, this example connects to
    www.verisign.com, but it can be adapted to connect to the
    ClassFileServer below.  To do so, the URL will need to be
    modified to point to the correct address.  You may also need to
    update the server's certificate or provide a custom
    HostNameVerifier (see HttpsURLConnection) if the hostname in
    the server's certificate doesn't match the URL's hostname.

    SPECIAL NOTES:
        If you are behind a firewall, you may need to set
        the "https.proxyHost" and "https.proxyPort" System
        properties to correctly specify the proxy.

    USAGE:
        java URLReader

    URLReaderWithOptions.java

    This example is very similar to URLReader above, but
    allows you to set the system properties via arguments to the
    main method, rather than as -D options to the java runtime
    environment.

    USAGE:
        java URLReaderWithOptions [-h proxyhost] [-p proxyport] \
            [-k protocolhandlerpkgs] [-c ciphersarray]

        proxyHost = secure proxy server hostname (https.proxyHost)
        proxyPort = secure proxy server port (https.proxyPort)
        protocolhandlerpkgs = a "|" separated list of protocol handlers
            (java.protocol.handler.pkgs)
        ciphersarray = enabled cipher suites as a comma separated list
            (https.cipherSuites)

sockets

    server

    ClassServer.java
    ClassFileServer.java

        This sample demonstrates the implementation of a
        mini-webserver, which can service simple HTTP or HTTPS
        requests (only the GET method is supported).

        By default, the server does not use SSL/TLS.  However,
        a command line option enables SSL/TLS.

        Requests must be of the form:

        GET /<filename>

        USAGE:
        java ClassFileServer port docroot [TLS [true]]

            port = the port on which the server resides
            docroot = the root of the local directory hierarchy
            TLS = an optional flag which enables SSL/TLS
            services
            true = an optional flag which requires that clients
            authenticate themselves.  This option requires
            that SSL/TLS support be enabled.

        The secure server comes preinstalled with a certificate for
        "localhost".  If server is on the same host as the client,
        URLs of the form "https://localhost:port/file" should pass
        hostname verification.  If you choose to run on separate
        hosts, you should create a new host certificate for the
        https hostname being used, otherwise there will be hostname
        mismatch problems.  (Note:  in Java this can be corrected
        in the HttpsURLConnection class by providing a custom
        HostnameVerifier implementation, or in a browswer by
        "Accept"ing the dialog box that describes the hostname
        mismatch.)

        If you are using the TLS variant (HTTPS), remember to
        specify the https protocol:

        https://hostname:2001/dir1/file1

        NOTE:  If you use a browser such as Microsoft's Internet
        Explorer or Netscape's Navigator you will see a dialog
        popup with the message that the application doesn't
        recognize the "localhost" certificate.  This is normal
        because the self-signed certificate being presented to the
        browser is not initially trusted.  If desired, you could
        import the "localhost" certificate into the browser's
        truststore.

    client

    SSLSocketClient.java

        This example demonstrates how to use a SSLSocket as a client to
        send a HTTP request and get a response from an HTTPS server.
        By default, this example connects to www.verisign.com, but
        it can easily be adapted to connect to the ClassFileServer
        above.  (Note:  The GET request must be slightly modified,
        so that a file is specified.)

        This application assumes the client is not behind a firewall.

        USAGE:
        java SSLSocketClient

    SSLSocketClientWithClientAuth.java

        This example is similar to SSLSocketClient above, but
        this shows how to set up a key manager to do client
        authentication if required by server.

        This application also assumes the client is not behind a
        firewall.

        USAGE:
        java SSLSocketClientWithClientAuth host port requestedfilepath

        NOTE:  If you are connecting to the ClassFileServer
        application above, be sure that it can find "duke"'s
        credentials.  See the "Sample Key Stores" section above.

    SSLSocketClientWithTunneling.java

        This example illustrates how to do proxy Tunneling to access a
        secure web server from behind a firewall.

        The System properties "https.proxyHost" and "https.proxyPort"
        are used to make a socket connection to the proxy host, and
        then the SSLSocket is layered on top of that Socket.

        USAGE:
        java SSLSocketClientWithTunneling

rmi

     Hello.java
     HelloImpl.java
     RMISSLClientSocketFactory.java
     RMISSLServerSocketFactory.java
     HelloClient.java

    This example illustrates how to use RMI over an SSL transport
    layer using JSSE.  The server runs HelloImpl, which sets up
    an internal RMI registry (rather than using the rmiregistry
    command).  The client runs HelloClient and communicates over
    a secured connection.

    Setting up this sample can be a little tricky, here are the
    necessary steps:

        % javac *.java
        % rmic HelloImpl
        % java \
        -Djava.security.policy=policy \
        HelloImpl   (run in another window)
        % java HelloClient (run in another window)

    For the server, the RMI security manager will be installed, and
    the supplied policy file grants permission to accept
    connections from any host.  Obviously, giving all permissions
    should not be done in a production environment.  You will need
    to give it the appropriate restrictive network privileges, such
    as:

        permission java.net.SocketPermission \
        "hostname:1024-", "accept,resolve";

    In addition, this example can be easily updated to run with
    the new standard SSL/TLS-based RMI Socket Factories. To do this,
    modify the HelloImpl.java file to use:

        javax.rmi.ssl.SslRMIClientSocketFactory
        javax.rmi.ssl.SslRMIServerSocketFactory

    instead of:

        RMISSLClientSocketFactory
        RMISSLServerSocketFactory

    These new classes use SSLSocketFactory.getDefault() and
    SSLServerSocketFactory.getDefault(), so you will need to
    configure the system properly to locate your key and trust
    material.

    NOTES FOR RUNNING WITH SUN's JDK:
    ---------------------------------

        If you use the new classes mentioned above, you can specify
        the key stores using the System properties:

        -Djavax.net.ssl.keyStore=testkeys
        -Djavax.net.ssl.keyStorePassword=passphrase

sslengine

    SSLEngineSimpleDemo.java

    This example demonstrates a very simple client/server
    application using SSLEngines.  It demonstrates the APIs without
    taking into account I/O or compute issues.

    USAGE:
    java SSLEngineSimpleDemo

NOTE:  There is a much more extensive SSLEngine sample available.
Please see the <jdk-home>/sample/nio/server directory for a
NIO/SSLEngine-based HTTP/HTTPS server.

----------------------------------------------------------------------
Troubleshooting
----------------------------------------------------------------------
One of the most common problems people have in using JSSE is when the
JSSE receives a certificate that is unknown to the mechanism that makes
trust decisions.  If an unknown certificate is received, the trust
mechanism will throw an exception saying that the certificate is
untrusted.  Make sure that the correct trust store is being used,
and that the JSSE is installed and configured correctly.

If you are using the "localhost" or "duke" credentials, be sure that
you have correctly specified the location of the samplecacerts file,
otherwise your application will not work.  (See "Sample Key Stores" for
more information.)

The SSL debug mechanism can be used to investigate such trust
problems.  See the implementation documentation for more information
about this subject.


More detailed instructions on how to compile/run this example can be
found in the sample top-level README file.

The following urls have more information about RMI and the
HelloWorld example:

        http://java.sun.com/j2se/1.5.0/docs/guide/rmi/index.html
    http://java.sun.com/docs/books/tutorial/rmi/index.html


Long description needed.


-

Documentation Contents
CONTENTS | PREV | NEXT

1 Introduction

Since the inception of Java technology, there has been strong and growing interest around the security of the Java platform as well as new security issues raised by the deployment of Java technology.

From a technology provider's point of view, Java security includes two aspects:

  • Provide the Java platform as a secure, ready-built platform on which to run Java-enabled applications in a secure fashion.
  • Provide security tools and services implemented in the Java programming language that enable a wider range of security-sensitive applications, for example, in the enterprise world.
This document discusses issues related to the first aspect, where the customers for such technologies include vendors that bundle or embed Java technology in their products (such as browsers and operating systems).

1.1 The Original Sandbox Model

The original security model provided by the Java platform is known as the sandbox model, which existed in order to provide a very restricted environment in which to run untrusted code obtained from the open network. The essence of the sandbox model is that local code is trusted to have full access to vital system resources (such as the file system) while downloaded remote code (an applet) is not trusted and can access only the limited resources provided inside the sandbox. This sandbox model is illustrated in the figure below.

The previous context describes this graphic.

The sandbox model was deployed through the Java Development Kit (JDK), and was generally adopted by applications built with JDK 1.0, including Java-enabled web browsers.

Overall security is enforced through a number of mechanisms. First of all, the language is designed to be type-safe and easy to use. The hope is that the burden on the programmer is such that the likelihood of making subtle mistakes is lessened compared with using other programming languages such as C or C++. Language features such as automatic memory management, garbage collection, and range checking on strings and arrays are examples of how the language helps the programmer to write safe code.

Second, compilers and a bytecode verifier ensure that only legitimate Java bytecodes are executed. The bytecode verifier, together with the Java Virtual Machine, guarantees language safety at run time.

Moreover, a classloader defines a local name space, which can be used to ensure that an untrusted applet cannot interfere with the running of other programs.

Finally, access to crucial system resources is mediated by the Java Virtual Machine and is checked in advance by a SecurityManager class that restricts the actions of a piece of untrusted code to the bare minimum.

JDK 1.1 introduced the concept of a "signed applet", as illustrated by the figure below. In that release, a correctly digitally signed applet is treated as if it is trusted local code if the signature key is recognized as trusted by the end system that receives the applet. Signed applets, together with their signatures, are delivered in the JAR (Java Archive) format. In JDK 1.1, unsigned applets still run in the sandbox.

The previous context describes this graphic

1.2 Evolving the Sandbox Model

The new Java SE Platform Security Architecture, illustrated in the figure below, is introduced primarily for the following purposes.

See long description [D]

  • Fine-grained access control.
This capability existed in the JDK from the beginning, but to use it, the application writer had to do substantial programming (e.g., by subclassing and customizing the SecurityManager and ClassLoader classes). The HotJava browser 1.0 is such an application, as it allows the browser user to choose from a small number of different security levels.

However, such programming is extremely security-sensitive and requires sophisticated skills and in-depth knowledge of computer security. The new architecture will make this exercise simpler and safer.

  • Easily configurable security policy.
Once again, this capability existed previously in the JDK but was not easy to use. Moreover, writing security code is not straightforward, so it is desirable to allow application builders and users to configure security policies without having to program.
  • Easily extensible access control structure.
Up to JDK 1.1, in order to create a new access permission, you had to add a new check method to the SecurityManager class. The new architecture allows typed permissions (each representing an access to a system resource) and automatic handling of all permissions (including yet-to-be-defined permissions) of the correct type. No new method in the SecurityManager class needs to be created in most cases. (In fact, we have so far not encountered a situation where a new method must be created.)
  • Extension of security checks to all Java programs, including applications as well as applets.
There is no longer a built-in concept that all local code is trusted. Instead, local code (e.g., non-system code, application packages installed on the local file system) is subjected to the same security control as applets, although it is possible, if desired, to declare that the policy on local code (or remote code) be the most liberal, thus enabling such code to effectively run as totally trusted. The same principle applies to signed applets and any Java application.

Finally, an implicit goal is to make internal adjustment to the design of security classes (including the SecurityManager and ClassLoader classes) to reduce the risks of creating subtle security holes in future programming.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

2 New Protection Mechanisms -- Overview of Basic Concepts

We now go over, in some detail, the new protection architecture and give a brief explanation of its functionality. We start with an overview of the basic concepts behind the new architecture. We then introduce the major new classes in a natural order, starting with permission specifications, going on to the policy and related features, followed by access control and its usage, and then covering secure class loading and resolution.

A fundamental concept and important building block of system security is the protection domain [Saltzer and Schroeder 75]. A domain can be scoped by the set of objects that are currently directly accessible by a principal, where a principal is an entity in the computer system to which permissions (and as a result, accountability) are granted. The sandbox utilized in JDK 1.0 is one example of a protection domain with a fixed boundary.

The protection domain concept serves as a convenient mechanism for grouping and isolation between units of protection. For example, it is possible (but not yet provided as a built-in feature) to separate protection domains from interacting with each other so that any permitted interaction must be either through trusted system code or explicitly allowed by the domains concerned. Note that existing object accessibility rules remain valid under the new security architecture.

Protection domains generally fall into two distinct categories: system domain and application domain. It is important that all protected external resources, such as the file system, the networking facility, and the screen and keyboard, be accessible only via system domains. The figure below illustrates the domain composition of a Java application environment.

See long description [D]

A domain conceptually encloses a set of classes whose instances are granted the same set of permissions. Protection domains are determined by the policy currently in effect. The Java application environment maintains a mapping from code (classes and instances) to their protection domains and then to their permissions, as illustrated by the figure below.

See long description [D]

A thread of execution (which is often, but not necessarily tied to, a single Java thread, which in turn is not necessarily tied to the thread concept of the underlying operation system) may occur completely within a single protection domain or may involve an application domain and also the system domain. For example, an application that prints a message out will have to interact with the system domain that is the only access point to an output stream. In this case, it is crucial that at any time the application domain does not gain additional permissions by calling the system domain. Otherwise, there can be serious security implications.

In the reverse situation where a system domain invokes a method from an application domain, such as when the AWT system domain calls an applet's paint method to display the applet, it is again crucial that at any time the effective access rights are the same as current rights enabled in the application domain.

In other words, a less "powerful" domain cannot gain additional permissions as a result of calling or being called by a more powerful domain.

This discussion of one thread involving two protection domains naturally generalizes to a thread that traverses multiple protection domains. A simple and prudent rule of thumb for calculating permissions is the following:

  • The permission set of an execution thread is considered to be the intersection of the permissions of all protection domains traversed by the execution thread.
  • When a piece of code calls the doPrivileged method (see below), the permission set of the execution thread is considered to include a permission if it is allowed by the said code's protection domain and by all protection domains that are called or entered directly or indirectly subsequently.
As you can see, the doPrivileged method enables a piece of trusted code to temporarily enable access to more resources than are available directly to the application that called it. This is necessary in some situations. For example, an application may not be allowed direct access to files that contain fonts, but the system utility to display a document must obtain those fonts, on behalf of the user. We provide the doPrivileged method for the system domain to deal with this situation, and the method is in fact available to all domains.

During execution, when access to a critical system resource (such as file I/O and network I/O) is requested, the resource-handling code directly or indirectly invokes a special AccessController class method that evaluates the request and decides if the request should be granted or denied.

Such an evaluation follows and generalizes the "rule of thumb" given above. The actual way in which the evaluation is conducted can vary between implementations. The basic principle is to examine the call history and the permissions granted to the relevant protection domains, and to return silently if the request is granted or throw a security exception if the request is denied.

Finally, each domain (system or application) may also implement additional protection of its internal resources within its own domain boundary. For example, a banking application may need to support and protect internal concepts such as checking accounts, deposits and withdrawals. Because the semantics of such protection is unlikely to be predictable or enforceable by the Java 2 SDK, the protection system at this level is best left to the system or application developers. Nevertheless, whenever appropriate, we provide helpful primitives to simplify developers' tasks. One such primitive is the SignedObject class, whose detail we will describe later.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents

3 Permissions and Security Policy

3.1 The Permission Classes

The permission classes represent access to system resources. The java.security.Permission class is an abstract class and is subclassed, as appropriate, to represent specific accesses.

As an example of a permission, the following code can be used to produce a permission to read the file named "abc" in the /tmp directory:

    perm = new java.io.FilePermission("/tmp/abc", "read");
New permissions are subclassed either from the Permission class or one of its subclasses, such as java.security.BasicPermission. Subclassed permissions (other than BasicPermission) generally belong to their own packages. Thus, FilePermission is found in the java.io package.

A crucial abstract method that needs to be implemented for each new class of permission is the implies method. Basically, "a implies b" means that if one is granted permission "a", one is naturally granted permission "b". This is important when making access control decisions.

Associated with the abstract class java.security.Permission are the abstract class named java.security.PermissionCollection and the final class java.security.Permissions.

Class java.security.PermissionCollection represents a collection (i.e., a set that allows duplicates) of Permission objects for a single category (such as file permissions), for ease of grouping. In cases where permissions can be added to the PermissionCollection object in any order, such as for file permissions, it is crucial that the PermissionCollection object ensure that the correct semantics are followed when the implies function is called.

Class java.security.Permissions represents a collection of collections of Permission objects, or in other words, a super collection of heterogeneous permissions.

Applications are free to add new categories of permissions that the system supports. How to add such application-specific permissions is discussed later in this document.

Now we describe the syntax and semantics of all built-in permissions.

3.1.1 java.security.Permission

This abstract class is the ancestor of all permissions. It defines the essential functionalities required for all permissions.

Each permission instance is typically generated by passing one or more string parameters to the constructor. In a common case with two parameters, the first parameter is usually "the name of the target" (such as the name of a file for which the permission is aimed), and the second parameter is the action (such as "read" action on a file). Generally, a set of actions can be specified together as a comma-separated composite string.

3.1.2 java.security.PermissionCollection

This class holds a homogeneous collection of permissions. In other words, each instance of the class holds only permissions of the same type.

3.1.3 java.security.Permissions

This class is designed to hold a heterogeneous collection of permissions. Basically, it is a collection of java.security.PermissionCollection objects.

3.1.4 java.security.UnresolvedPermission

Recall that the internal state of a security policy is normally expressed by the permission objects that are associated with each code source. Given the dynamic nature of Java technology, however, it is possible that when the policy is initialized the actual code that implements a particular permission class has not yet been loaded and defined in the Java application environment. For example, a referenced permission class may be in a JAR file that will later be loaded.

The UnresolvedPermission class is used to hold such "unresolved" permissions. Similarly, the class java.security.UnresolvedPermissionCollection stores a collection of UnresolvedPermission permissions.

During access control checking on a permission of a type that was previously unresolved, but whose class has since been loaded, the unresolved permission is "resolved" and the appropriate access control decision is made. That is, a new object of the appropriate class type is instantiated, if possible, based on the information in the UnresolvedPermission. This new object replaces the UnresolvedPermission, which is removed.

If the permission is still unresolvable at this time, the permission is considered invalid, as if it is never granted in a security policy.

3.1.5 java.io.FilePermission

The targets for this class can be specified in the following ways, where directory and file names are strings that cannot contain white spaces.
file
directory (same as directory/)
directory/file
directory/* (all files in this directory)
* (all files in the current directory)
directory/- (all files in the file system under this directory)
- (all files in the file system under the current directory)
"<<ALL FILES>>" (all files in the file system)
Note that "<<ALL FILES>>" is a special string denoting all files in the system. On a Solaris, Linux, or Mac OS X system, this includes all files under the root directory. On an MS-DOS system, this includes all files on all drives.

The actions are: read, write, delete, and execute. Therefore, the following are valid code samples for creating file permissions:

import java.io.FilePermission;

FilePermission p = new FilePermission("myfile", "read,write");
FilePermission p = new FilePermission("/home/gong/", "read");
FilePermission p = new FilePermission("/tmp/mytmp", "read,delete");
FilePermission p = new FilePermission("/bin/*", "execute");
FilePermission p = new FilePermission("*", "read");
FilePermission p = new FilePermission("/-", "read,execute");
FilePermission p = new FilePermission("-", "read,execute");
FilePermission p = new FilePermission("<<ALL FILES>>", "read");
> The implies method in this class correctly interprets the file system. For example, FilePermission("/-", "read,execute") implies FilePermission("/home/gong/public_html/index.html", "read"), and FilePermission("bin/*", "execute") implies FilePermission("bin/emacs19.31", "execute").

Note: Most of these strings are given in platform-dependent format. For example, to represent read access to the file named "foo" in the "temp" directory on the C drive of a Windows system, you would use

FilePermission p = new FilePermission("c:\\temp\\foo", "read");
The double backslashes are necessary to represent a single backslash because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above FilePermission target string, converting double backslashes to single backslashes, the end result is the actual path
"c:\temp\foo"
It is necessary that the strings be given in platform-dependent format until there is a universal file description language. Note also that the use of meta symbols such as "*" and "-" prevents the use of specific file names. We think this is a small limitation that can be tolerated for the moment. Finally, note that "/-" and "<<ALL FILES>>" are the same target on Solaris, Linux, and Mac OS X systems in that they both refer to the entire file system. (They can refer to multiple file systems if they are all available). The two targets are potentially different on other operating systems, such as MS Windows and MacOS.

Also note that a target name that specifies just a directory, with a "read" action, as in

FilePermission p = new FilePermission("/home/gong/", "read");
means you are only giving permission to list the files in that directory, not read any of them. To allow read access to files, you must specify either an explicit file name, or an "*" or "-", as in
FilePermission p = new FilePermission("/home/gong/myfile", "read");
FilePermission p = new FilePermission("/home/gong/*", "read");
FilePermission p = new FilePermission("/home/gong/-", "read");
And finally, note that code always automatically has permission to read files from its same (URL) location, and subdirectories of that location; it does not need explicit permission to do so.

3.1.6 java.net.SocketPermission

This class represents access to a network via sockets. The target for this class can be given as "hostname:port_range", where hostname can be given in the following ways:
hostname (a single host)
IP address (a single host)
localhost (the local machine)
"" (equivalent to "localhost")
hostname.domain (a single host within the domain)
hostname.subdomain.domain
*.domain (all hosts in the domain)
*.subdomain.domain
* (all hosts)
That is, the host is expressed as a DNS name, as a numerical IP address, as "localhost" (for the local machine) or as "" (which is equivalent to specifying "localhost").

The wildcard "*" may be included once in a DNS name host specification. If it is included, it must be in the leftmost position, as in "*.sun.com".

The port_range can be given as follows:

N (a single port)
N- (all ports numbered N and above)
-N (all ports numbered N and below)
N1-N2 (all ports between N1 and N2, inclusive)
Here N, N1, and N2 are non-negative integers ranging from 0 to 65535 (2^16-1).

The actions on sockets are accept, connect, listen, and resolve (which is basically DNS lookup). Note that implicitly, the action "resolve" is implied by "accept", "connect", and "listen" -- i.e., those who can listen or accept incoming connections from or initiate out-going connections to a host should be able to look up the name of the remote host.

Below are some examples of socket permissions.

import java.net.SocketPermission;

SocketPermission p = new SocketPermission("java.example.com","accept");
p = new SocketPermission("192.0.2.99","accept");
p = new SocketPermission("*.com","connect");
p = new SocketPermission("*.example.com:80","accept");
p = new SocketPermission("*.example.com:-1023","accept");
p = new SocketPermission("*.example.com:1024-","connect");
p = new SocketPermission("java.example.com:8000-9000",
         "connect,accept");
p = new SocketPermission("localhost:1024-",
          "accept,connect,listen");
Note that SocketPermission("java.example.com:80,8080","accept") and SocketPermission("java.example.com,javasun.example.com","accept") are not valid socket permissions.

Moreover, because listen is an action that applies only to ports on the local host, whereas accept is an action that applies to ports on both the local and remote host, both actions are necessary.

3.1.7 java.security.BasicPermission

The BasicPermission class extends the Permission class. It can be used as the base class for permissions that want to follow the same naming convention as BasicPermission (see below).

The name for a BasicPermission is the name of the given permission (for example, "exitVM", "setFactory", "queuePrintJob", etc). The naming convention follows the hierarchical property naming convention. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The action string (inherited from Permission) is unused.Thus, BasicPermission is commonly used as the base class for "named" permissions (ones that contain a name but no actions list; you either have the named permission or you don't.) Subclasses may implement actions on top of BasicPermission, if desired.

Some of the BasicPermission subclasses are java.lang.RuntimePermission, java.security.SecurityPermission, java.util.PropertyPermission, and java.net.NetPermission.

3.1.8 java.util.PropertyPermission

The targets for this class are basically the names of Java properties as set in various property files. Examples are the "java.home" and "os.name" properties. Targets can be specified as "*" (any property), "a.*" (any property whose name has a prefix "a."), "a.b.*", and so on. Note that the wildcard can occur only once and can only be at the rightmost position.

This is one of the BasicPermission subclasses that implements actions on top of BasicPermission. The actions are read and write. Their meaning is defined as follows: "read" permission allows the getProperty method in java.lang.System to be called to get the property value, and "write" permission allows the setProperty method to be called to set the property value.

3.1.9 java.lang.RuntimePermission

The target for a RuntimePermission can be represented by any string, and there is no action associated with the targets. For example, RuntimePermission("exitVM") denotes the permission to exit the Java Virtual Machine.

The target names are:

createClassLoader
getClassLoader
setContextClassLoader
setSecurityManager
createSecurityManager
exitVM
setFactory
setIO
modifyThread
stopThread
modifyThreadGroup
getProtectionDomain
readFileDescriptor
writeFileDescriptor
loadLibrary.{library name}
accessClassInPackage.{package name}
defineClassInPackage.{package name}
accessDeclaredMembers.{class name}
queuePrintJob

3.1.10 java.awt.AWTPermission

This is in the same spirit as the RuntimePermission; it's a permission without actions. The targets for this class are:
accessClipboard
accessEventQueue
listenToAllAWTEvents
showWindowWithoutWarningBanner

3.1.11 java.net.NetPermission

This class contains the following targets and no actions:
requestPasswordAuthentication
setDefaultAuthenticator
specifyStreamHandler

3.1.12 java.lang.reflect.ReflectPermission

This is the Permission class for reflective operations. A ReflectPermission is a named permission (like RuntimePermission) and has no actions. The only name currently defined is
suppressAccessChecks
which allows suppressing the standard Java programming language access checks -- for public, default (package) access, protected, and private members -- performed by reflected objects at their point of use.

3.1.13 java.io.SerializablePermission

This class contains the following targets and no actions:
enableSubclassImplementation
enableSubstitution

3.1.14 java.security.SecurityPermission

SecurityPermissions control access to security-related objects, such as Security, Policy, Provider, Signer, and Identity objects. This class contains the following targets and no actions:
getPolicy
setPolicy
getProperty.{key}
setProperty.{key}
insertProvider.{provider name}
removeProvider.{provider name}
setSystemScope
setIdentityPublicKey
setIdentityInfo
printIdentity
addIdentityCertificate
removeIdentityCertificate
clearProviderProperties.{provider name}
putProviderProperty.{provider name}
removeProviderProperty.{provider name}
getSignerPrivateKey
setSignerKeyPair

3.1.15 java.security.AllPermission

This permission implies all permissions. It is introduced to simplify the work of system administrators who might need to perform multiple tasks that require all (or numerous) permissions. It would be inconvenient to require the security policy to iterate through all permissions. Note that AllPermission also implies new permissions that are defined in the future.

Clearly much caution is necessary when considering granting this permission.

3.1.16 javax.security.auth.AuthPermsision

AuthPermission handles authentication permissions and authentication-related object such as Subject, SubjectDomainCombiner, LoginContext, and Configuration. This class contains the following targets and no actions:
doAs
doAsPrivileged
getSubject
getSubjectFromDomainCombiner
setReadOnly
modifyPrincipals
modifyPublicCredentials
modifyPrivateCredentials
refreshCredential
destroyCredential
createLoginContext.{name}
getLoginConfiguration
setLoginConfiguration
refreshLoginConfiguration

3.1.17 Discussion of Permission Implications

Recall that permissions are often compared against each other, and to facilitate such comparisons, we require that each permission class defines an implies method that represents how the particular permission class relates to other permission classes. For example, java.io.FilePermission("/tmp/*", "read") implies java.io.FilePermission("/tmp/a.txt", "read") but does not imply any java.net.NetPermission.

There is another layer of implication that may not be immediately obvious to some readers. Suppose that one applet has been granted the permission to write to the entire file system. This presumbly allows the applet to replace the system binary, including the JVM runtime environment. This effectively means that the applet has been granted all permissions.

Another example is that if an applet is granted the runtime permission to create class loaders, it is effectively granted many more permissions, as a class loader can perform sensitive operations.

Other permissions that are "dangerous" to give out include those that allow the setting of system properties, runtime permissions for defining packages and for loading native code libraries (because the Java security architecture is not designed to and does not prevent malicious behavior at the level of native code), and of course the AllPermission.

For more information about permissions, including tables enumerating the risks of assigning specific permissions as well as a table of all the Java 2 SDK built-in methods that require permissions, see Permissions in the Java Development Kit.

3.1.18 How To Create New Types of Permissions

It is essential that no one except Sun Microsystems should extend the permissions that are built into the Java 2 SDK, either by adding new functionality or by introducing additional target keywords into a class such as java.lang.RuntimePermission. This maintains consistency.

To create a new permission, the following steps are recommended, as shown by an example. Suppose an application developer from company ABC wants to create a customized permission to "watch TV".

First, create a new class com.abc.Permission that extends the abstract class java.security.Permission (or one of its subclasses), and another new class com.abc.TVPermission that extends the com.abc.Permission. Make sure that the implies method, among others, is correctly implemented. (Of course, com.abc.TVPermission can directly extend java.security.Permission; the intermediate com.abc.Permission is not required.)

public class com.abc.Permission extends java.security.Permission

public class com.abc.TVPermission extends com.abc.Permission
The following figure shows the subclass relationship.

Flow chart showing the logic flows from Permission to the subclass com.abc.Permission and then to com.abc.TVPermission

Second, include these new classes with the application package.

Each user that wants to allow this new type of permission for specific code does so by adding an entry in a policy file. (Details of the policy file syntax are given in a later section.) An example of a policy file entry granting code from http://example.com/ permission to watch channel 5 would be:

grant codeBase  "http://example.com/" {
    permission com.abc.TVPermission "channel-5", "watch";
    }
In the application's resource management code, when checking to see if a permission should be granted, call AccessController's checkPermission method using a com.abc.TVPermission object as the parameter.
   com.abc.TVPermission tvperm = new
        com.abc.TVPermission("channel-5", "watch");
   AccessController.checkPermission(tvperm);
Note that, when adding a new permission, one should create a new (permission) class and not add a new method to the security manager. (In the past, in order to enable checking of a new type of access, you had to add a new method to the SecurityManager class.)

If more elaborate TVPermissions such as "channel-1:13" or "channel-*" are allowed, then it may be necessary to implement a TVPermissionCollection object that knows how to deal with the semantics of these pseudo names.

New code should always invoke a permission check by calling the checkPermission method of the AccessController class in order to exercise the built-in access control algorithm. There is no essential need to examine whether there is a ClassLoader or a SecurityManager. On the other hand, if the algorithm should be left to the installed security manager class, then the method SecurityManager.checkPermission should be invoked instead.

3.2 java.security.CodeSource

This class extends the concept of a codebase within HTML to encapsulate not only the code location (URL) but also the certificate(s) containing public keys that should be used to verify signed code originating from that location. Note that this is not the equivalent of the CodeBase tag in HTML files. Each certificate is represented as a java.security.cert.Certificate, and each URL as a java.net.URL.

3.3 java.security.Policy

The system security policy for a Java application environment, specifying which permissions are available for code from various sources, is represented by a Policy object. More specifically, it is represented by a Policy subclass providing an implementation of the abstract methods in the Policy class.

In order for an applet (or an application running under a SecurityManager) to be allowed to perform secured actions, such as reading or writing a file, the applet (or application) must be granted permission for that particular action. The only exception is that code always automatically has permission to read files from its same CodeSource, and subdirectories of that CodeSource; it does not need explicit permission to do so.

There could be multiple instances of the Policy object, although only one is "in effect" at any time. The currently-installed Policy object can be obtained by calling the getPolicy method, and it can be changed by a call to the setPolicy method (by code with permission to reset the Policy).

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The policy configuration may be stored, for example, as a flat ASCII file, as a serialized binary file of the Policy class, or as a database. There is a Policy reference implementation that obtains its information from static policy configuration files.

3.3.1 Policy File Format

In the Policy reference implementation, the policy can be specified within one or more policy configuration files. The configuration files indicate what permissions are allowed for code from specified code sources. Each configuration file must be encoded in UTF-8.

A policy configuration file essentially contains a list of entries. It may contain a "keystore" entry, and contains zero or more "grant" entries.

A keystore is a database of private keys and their associated digital certificates such as X.509 certificate chains authenticating the corresponding public keys. The keytool utility is used to create and administer keystores. The keystore specified in a policy configuration file is used to look up the public keys of the signers specified in the grant entries of the file. A keystore entry must appear in a policy configuration file if any grant entries specify signer aliases, or if any grant entries specify a principal alias (see below).

At this time, there can be only one keystore entry in the policy file (others after the first one are ignored), and it can appear anywhere outside the file's grant entries . It has the following syntax:

keystore "some_keystore_url", "keystore_type";
Here, "some_keystore_url" specifies the URL location of the keystore, and "keystore_type" specifies the keystore type. The latter is optional. If not specified, the type is assumed to be that specified by the "keystore.type" property in the security properties file.

The URL is relative to the policy file location. Thus if the policy file is specified in the security properties file as:

policy.url.1=http://foo.bar.example.com/blah/some.policy
and that policy file has an entry:
keystore ".keystore";
then the keystore will be loaded from:
http://foo.bar.example.com/blah/.keystore
The URL can also be absolute.

A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. The default type supported by Sun Microsystems is a proprietary keystore type named "JKS".

Each grant entry in a policy file essentially consists of a CodeSource and its permissions. Actually, a CodeSource consists of a URL and a set of certificates, while a policy file entry includes a URL and a list of signer names. The system creates the corresponding CodeSource after consulting the keystore to determine the certificate(s) of the specified signers.

Each grant entry in the policy file is of the following format, where the leading "grant" is a reserved word that signifies the beginning of a new entry and optional items appear in brackets. Within each entry, a leading "permission" is another reserved word that marks the beginning of a new permission in the entry. Each grant entry grants a set of permissions to a specified code source and principals.

grant [SignedBy "signer_names"] [, CodeBase "URL"]
      [, Principal [principal_class_name] "principal_name"]
      [, Principal [principal_class_name] "principal_name"] ... {
    permission permission_class_name [ "target_name" ]
               [, "action"] [, SignedBy "signer_names"];
    permission ...
};
White spaces are allowed immediately before or after any comma. The name of the permission class must be a fully qualified class name, such as java.io.FilePermission, and cannot be abbreviated (for example, to FilePermission).

Note that the action field is optional in that it can be omitted if the permission class does not require it. If it is present, then it must come immediately after the target field.

The exact meaning of a CodeBase URL value depends on the characters at the end. A CodeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A CodeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A CodeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory.

The CodeBase field (URL) is optional in that, if it is omitted, it signifies "any code base".

The first signer name field is a string alias that is mapped, via a separate mechanism, to a set of public keys (within certificates in the keystore) that are associated with the signers. These keys are used to verify that certain signed classes are really signed by these signers.

This signer field can be a comma-separated string containing names of multiple signers, an example of which is "Adam,Eve,Charles", which means signed by Adam and Eve and Charles (i.e., the relationship is AND, not OR).

This field is optional in that, if it is omitted, it signifies "any signer", or in other words, "It doesn't matter whether the code is signed or not".

The second signer field, inside a Permission entry, represents the alias to the keystore entry containing the public key corresponding to the private key used to sign the bytecodes that implemented the said permission class. This permission entry is effective (i.e., access control permission will be granted based on this entry) only if the bytecode implementation is verified to be correctly signed by the said alias.

A principal value specifies a class_name/principal_name pair which must be present within the executing threads principal set. The principal set is associated with the executing code by way of a Subject. The principal field is optional in that, if it is omitted, it signifies "any principals".

Note on KeyStore Alias Replacement:

If the principal class_name/principal_name pair is specified as a single quoted string, it is treated as a keystore alias. The keystore is consulted and queried (via the alias) for an X509 Certificate. If one is found, the principal_class is automatically treated as javax.security.auth.x500.X500Principal, and the principal_name is automatically treated as the subject distinguished name from the certificate. If an X509 Certificate mapping is not found, the entire grant entry is ignored.

The order between the CodeBase, SignedBy, and Principal fields does not matter.

An informal BNF grammer for the Policy file format is given below, where non-capitalized terms are terminals:

PolicyFile -> PolicyEntry | PolicyEntry; PolicyFile
PolicyEntry -> grant {PermissionEntry}; |
           grant SignerEntry {PermissionEntry} |
           grant CodebaseEntry {PermissionEntry} |
           grant PrincipalEntry {PermissionEntry} |
           grant SignerEntry, CodebaseEntry {PermissionEntry} |
           grant CodebaseEntry, SignerEntry {PermissionEntry} |
           grant SignerEntry, PrincipalEntry {PermissionEntry} |
           grant PrincipalEntry, SignerEntry {PermissionEntry} |
           grant CodebaseEntry, PrincipalEntry {PermissionEntry} |
           grant PrincipalEntry, CodebaseEntry {PermissionEntry} |
           grant SignerEntry, CodebaseEntry, PrincipalEntry {PermissionEntry} |
           grant CodebaseEntry, SignerEntry, PrincipalEntry {PermissionEntry} |
           grant SignerEntry, PrincipalEntry, CodebaseEntry {PermissionEntry} |
           grant CodebaseEntry, PrincipalEntry, SignerEntry {PermissionEntry} |
           grant PrincipalEntry, CodebaseEntry, SignerEntry {PermissionEntry} |
           grant PrincipalEntry, SignerEntry, CodebaseEntry {PermissionEntry} |
           keystore "url"
SignerEntry -> signedby (a comma-separated list of strings)
CodebaseEntry -> codebase (a string representation of a URL)
PrincipalEntry -> OnePrincipal | OnePrincipal, PrincipalEntry
OnePrincipal -> principal [ principal_class_name ] "principal_name" (a principal)
PermissionEntry -> OnePermission | OnePermission PermissionEntry
OnePermission -> permission permission_class_name
                 [ "target_name" ] [, "action_list"]
                 [, SignerEntry];
Now we give some examples. The following policy grants permission a.b.Foo to code signed by Roland:
grant signedBy "Roland" {
    permission a.b.Foo;
};
The following grants a FilePermission to all code (regardless of the signer and/or codeBase):
grant {
   permission java.io.FilePermission ".tmp", "read";
};
The following grants two permissions to code that is signed by both Li and Roland:
grant signedBy "Roland,Li" {
  permission java.io.FilePermission "/tmp/*", "read";
  permission java.util.PropertyPermission "user.*";
};
The following grants two permissions to code that is signed by Li and that comes from http://example.com:
grant codeBase "http://example.com/*", signedBy "Li" {
    permission java.io.FilePermission "/tmp/*", "read";
    permission java.io.SocketPermission "*", "connect";
};
The following grants two permissions to code that is signed by both Li and Roland, and only if the bytecodes implementing com.abc.TVPermission are genuinely signed by Li.
grant signedBy "Roland,Li" {
  permission java.io.FilePermission "/tmp/*", "read";
  permission com.abc.TVPermission "channel-5", "watch",
     signedBy "Li";
};
The reason for including the second signer field is to prevent spoofing when a permission class does not reside with the Java runtime installation. For example, a copy of the com.abc.TVPermission class can be downloaded as part of a remote JAR archive, and the user policy might include an entry that refers to it. Because the archive is not long-lived, the second time the com.abc.TVPermission class is downloaded, posssibly from a different web site, it is crucial that the second copy is authentic, as the presence of the permission entry in the user policy might reflect the user's confidence or belief in the first copy of the class bytecode.

The reason we chose to use digital signatures to ensure authenticity, rather than storing (a hash value of) the first copy of the bytecodes and using it to compare with the second copy, is because the author of the permission class can legitimately update the class file to reflect a new design or implementation.

Please note: The strings for a file path must be specified in a platform-dependent format; this is necessary until there is a universal file description language. The above examples have shown strings appropriate on Solaris systems. On Windows systems, when you directly specify a file path in a string, you need to include two backslashes for each actual single backslash in the path, as in

grant signedBy "Roland" {
  permission java.io.FilePermission "C:\\users\\Cathy\\*", "read";
};
This is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above FilePermission target string, converting double backslashes to single backslashes, the end result is the actual path
"C:\users\Cathy\*"
Finally, here are some principal-based grant entries:
grant principal javax.security.auth.x500.X500Principal "cn=Alice" {
  permission java.io.FilePermission "/home/Alice", "read, write";
};
This permits any code executing as the X500Principal, "cn=Alice", permission to read and write to "/home/Alice".

The following example shows a grant statement with both codesource and principal information.

  grant codebase "http://www.games.example.com",
        signedBy "Duke",
        principal javax.security.auth.x500.X500Principal "cn=Alice" {
    permission java.io.FilePermission "/tmp/games", "read, write";
  };
This allows code downloaded from "www.games.example.com", signed by "Duke", and executed by "cn=Alice", permission to read and write into the "/tmp/games" directory.

The following example shows a grant statement with KeyStore alias replacement:

  keystore "http://foo.bar.example.com/blah/.keystore";

  grant principal "alice" {
    permission java.io.FilePermission "/tmp/games", "read, write";
  };
"alice" will be replaced by javax.security.auth.x500.X500Principal "cn=Alice" assuming the X.509 certificate associated with the keystore alias, alice, has a subject distinguished name of "cn=Alice". This allows code executed by the X500Principal "cn=Alice" permission to read and write into the "/tmp/games" directory.

3.3.2 Property Expansion in Policy Files

Property expansion is possible in policy files and in the security properties file.

Property expansion is similar to expanding variables in a shell. That is, when a string like

"${some.property}"

appears in a policy file, or in the security properties file, it will be expanded to the value of the specified system property. For example,

permission java.io.FilePermission "${user.home}", "read";
will expand "${user.home}" to use the value of the "user.home" system property. If that property's value is "/home/cathy", then the above is equivalent to
permission java.io.FilePermission "/home/cathy", "read";
In order to assist in platform-independent policy files, you can also use the special notation of "${/}", which is a shortcut for "${file.separator}". This allows permission designations such as
permission java.io.FilePermission "${user.home}${/}*", "read";
If user.home is /home/cathy, and you are on Solaris, the above gets converted to:
permission java.io.FilePermission "/home/cathy/*", "read";
If on the other hand user.home is C:\users\cathy and you are on a Windows system, the above gets converted to:
permission java.io.FilePermission "C:\users\cathy\*", "read";
Also, as a special case, if you expand a property in a codebase, such as
grant codeBase "file:/${java.home}/lib/ext/"
then any file.separator characters will be automatically converted to /'s, which is desirable since codebases are URLs. Thus on a Windows system, even if java.home is set to C:\j2sdk1.2, the above would get converted to
grant codeBase "file:/C:/j2sdk1.2/lib/ext/"
Thus you don't need to use ${/} in codebase strings (and you shouldn't).

Property expansion takes place anywhere a double quoted string is allowed in the policy file. This includes the signedby, codebase, target names, and actions fields.

Whether or not property expansion is allowed is controlled by the value of the "policy.expandProperties" property in the security properties file. If the value of this property is true (the default), expansion is allowed.

Please note: You can't use nested properties; they will not work. For example,

"${user.${foo}}"
doesn't work, even if the "foo" property is set to "home". The reason is the property parser doesn't recognize nested properties; it simply looks for the first "${", and then keeps looking until it finds the first "}" and tries to interpret the result "${user.$foo}" as a property, but fails if there is no such property.

Also note: If a property can't be expanded in a grant entry, permission entry, or keystore entry, that entry is ignored. For example, if the system property "foo" is not defined and you have:

grant codeBase "${foo}" {
  permission ...;
  permission ...;
};
then all the permissions in this grant entry are ignored. If you have
grant {
  permission Foo "${foo}";
  permission Bar;
};
then only the "permission Foo..." entry is ignored. And finally, if you have
keystore "${foo}";
then the keystore entry is ignored.

One final note: On Windows systems, when you directly specify a file path in a string, you need to include two backslashes for each actual single backslash in the path, as in

"C:\\users\\cathy\\foo.bat"
This is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above string, converting double backslashes to single backslashes, the end result is
"C:\users\cathy\foo.bat"
Expansion of a property in a string takes place after the tokenizer has processed the string. Thus if you have the string
"${user.home}\\foo.bat"
then first the tokenizer processes the string, converting the double backslashes to a single backslash, and the result is
"${user.home}\foo.bat"
Then the ${user.home} property is expanded and the end result is
"C:\users\cathy\foo.bat"
assuming the user.home value is "C:\users\cathy". Of course, for platform independence, it would be better if the string was initially specified without any explicit slashes, i.e., using the ${/} property instead, as in
"${user.home}${/}foo.bat"

3.3.3 General Expansion in Policy Files

Generalized forms of expansion are also supported in policy files. For example, permission names may contain a string of the form: ${{protocol:protocol_data}} If such a string occurs in a permission name, then the value in protocol determines the exact type of expansion that should occur, and protocol_data is used to help perform the expansion. protocol_data may be empty, in which case the above string should simply take the form: ${{protocol}}

There are two protocols supported in the default policy file implementation:

  1. ${{self}}

    The protocol, self, denotes a replacement of the entire string, ${{self}}, with one or more principal class/name pairs. The exact replacement performed depends upon the contents of the grant clause to which the permission belongs.

    If the grant clause does not contain any principal information, the permission will be ignored (permissions containing ${{self}} in their target names are only valid in the context of a principal-based grant clause). For example, BarPermission will always be ignored in the following grant clause:

                grant codebase "www.foo.example.com", signedby "duke" {
                permission BarPermission "... ${{self}} ...";
            };
    If the grant clause contains principal information, ${{self}} will be replaced with that same principal information. For example, ${{self}} in BarPermission will be replaced by javax.security.auth.x500.X500Principal "cn=Duke" in the following grant clause:
                grant principal javax.security.auth.x500.X500Principal "cn=Duke" {
                permission BarPermission "... ${{self}} ...";
            };
    If there is a comma-separated list of principals in the grant clause, then ${{self}} will be replaced by the same comma-separated list or principals. In the case where both the principal class and name are wildcarded in the grant clause, ${{self}} is replaced with all the principals associated with the Subject in the current AccessControlContext.

    The following example describes a scenario involving both self and KeyStore alias replacement together:

                keystore "http://foo.bar.example.com/blah/.keystore";

            grant principal "duke" {
                permission BarPermission "... ${{self}} ...";
            };
    In the above example, "duke" will first be expanded into javax.security.auth.x500.X500Principal "cn=Duke" assuming the X.509 certificate associated with the KeyStore alias, "duke", has a subject distinguished name of "cn=Duke". Next, ${{self}} will be replaced with the same principal information that just got expanded in the grant clause: javax.security.auth.x500.X500Principal "cn=Duke".
  2. ${{alias:alias_name}}

    The protocol, alias, denotes a java.security.KeyStore alias substitution. The KeyStore used is the one specified in the KeyStore entry. alias_name represents an alias into the KeyStore. ${{alias:alias_name}} is replaced with javax.security.auth.x500.X500Principal "DN", where DN represents the subject distinguished name of the certificate belonging to alias_name. For example:

                keystore "http://foo.bar.example.com/blah/.keystore";

            grant codebase "www.foo.example.com" {
                permission BarPermission "... ${{alias:duke}} ...";
            };
    In the above example the X.509 certificate associated with the alias, duke, is retrieved from the KeyStore, foo.bar.example.com/blah/.keystore. Assuming duke's certificate specifies "o=dukeOrg, cn=duke" as the subject distinguished name, then ${{alias:duke}} is replaced with javax.security.auth.x500.X500Principal "o=dukeOrg, cn=duke".

    The permission entry is ignored under the following error conditions:

    • The keystore entry is unspecified
    • The alias_name is not provided
    • The certificate for alias_name can not be retrieved
    • The certificate retrieved is not an X.509 certificate

3.3.4 Assigning Permissions

When a principal executes a class that originated from a particular CodeSource, the security mechanism consults the policy object to determine what permissions to grant. This is done by invoking the getPermissions or implies method on the Policy object that is installed in the VM.

Clearly, a given code source in a ProtectionDomain can match the code source given in multiple entries in the policy, for example because the wildcard "*" is allowed.

The following algorithm is used to locate the appropriate set of permissions in the policy.

1. match the public keys, if code is signed.
2. if a key is not recognized in the policy, ignore the key
   if every key is ignored, treat the code as unsigned.
3. if the keys are matched, or no signer was specified {
       try to match all URLs in the policy for the keys
   }
4. if the keys are matched (or no signer was specified),
   and the URLs are matched (or no codebase was specified) {
       try to match all principals in the policy with
       the principals associated with the current executing thread.
5. if either key, URL, or principals are not matched, use built-in default
       permission, which is the original sandbox permission.
The exact meaning of a policy entry codeBase URL value depends on the characters at the end. A codeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A codeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A codeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory.

As an example, given "http://example.com/-" in the policy, then any code base that is on this web site matches the policy entry. Matching code bases include "http://example.com/j2se/sdk/" and "http://example.com/people/gong/appl.jar".

If multiple entries are matched, then all the permissions given in those entries are granted. In other words, permission assignment is additive. For example, if code signed with key A gets permission X and code signed by key B gets permission Y and no particular codebase is specified, then code signed by both A and B gets permissions X and Y. Similarly, if code with codeBase "http://example.com/-" is given permission X, and "http://example.com/people/*" is given permission Y, and no particular signers are specified, then an applet from "http://example.com/people/applet.jar" gets both X and Y.

Note that URL matching here is purely syntactic. For example, a policy can give an entry that specifies a URL "ftp://ftp.sun.com". Such an entry is useful only when one can obtain Java code directly from ftp for execution.

To specify URLs for the local file system, a file URL can be used. For example, to specify files in the /home/cathy/temp directory in a Solaris system, you'd use

"file:/home/cathy/temp/*"
To specify files in the "temp" directory on the C drive in a Windows system, use
"file:/c:/temp/*"
Note: code base URLs always use slashes (no backlashes), regardless of the platform they apply to.

You can also use an absolute path name such as

"/home/gong/bin/MyWonderfulJava"

3.3.5 Default System and User Policy Files

In the Policy reference implementation, the policy can be specified within one or more policy configuration files. The configuration files specify what permissions are allowed for code from specified code sources.

A policy file can be composed via a simple text editor, or via a graphical PolicyTool utility that is described later.

There is by default a single system-wide policy file, and a single user policy file.

The system policy file is by default located at

{java.home}/lib/security/java.policy  (Solaris)
{java.home}\lib\security\java.policy  (Windows)
Here, java.home is a system property specifying the directory into which the Java 2 SDK was installed.

The user policy file is by default located at

{user.home}/.java.policy  (Solaris)
{user.home}\.java.policy  (Windows)
Here, user.home is a system property specifying the user's home directory.

When the Policy is initialized, the system policy is loaded in first, and then the user policy is added to it. If neither policy is present, a built-in policy is used. This built-in policy is the same as the original sandbox policy.

Policy file locations are specified in the security properties file, which is located at

{java.home}/lib/security/java.security  (Solaris)
{java.home}\lib/security\java.security  (Windows)
The policy file locations are specified as the values of properties whose names are of the form
policy.url.n
Here, n is a number. You specify each such property value in a line of the following form:
policy.url.n=URL
Here, URL is a URL specification. For example, the default system and user policy files are defined in the security properties file as
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy
You can actually specify a number of URLs, including ones of the form "http://", and all the designated policy files will get loaded. You can also comment out or change the second one to disable reading the default user policy file.

The algorithm starts at policy.url.1, and keeps incrementing until it does not find a URL. Thus if you have policy.url.1 and policy.url.3, policy.url.3 will never be read.

It is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command-line argument, which sets the value of the java.security.policy property. For example, if you use

java -Djava.security.manager -Djava.security.policy=pURL SomeApp
Here, pURL is a URL specifying the location of a policy file, then the specified policy file will be loaded in addition to all the policy files that are specified in the security properties file. (The "-Djava.security.manager" argument ensures that the default security manager is installed, and thus the application is subject to policy checks, as described in "Security Management for Applets and Applications". It is not required if the application SomeApp installs a security manager.)

If you use the following, with a double equals, then just the specified policy file will be used; all others will be ignored.

java -Djava.security.manager -Djava.security.policy==pURL SomeApp
If you want to pass a policy file to the appletviewer, again use a "-Djava.security.policy" argument as follows:
appletviewer -J-Djava.security.policy=pURL  myApplet
Please note: The "-Djava.security.policy" policy file value will be ignored (for both java and appletviewer commands) if the "policy.allowSystemProperty" property in the security properties file is set to false. The default is true.

3.3.6 Customizing Policy Evaluation

The current design of the Policy class is not as comprehensive as it could be. We have given the issues much thought and are progressing cautiously, partly to ensure that we define method calls that are appropriate for the most common cases. For the meantime, an alternative policy class can be given to replace the default policy class, as long as the former is a subclass of the abstract Policy class and implements the getPermissions method (and other methods as necessary).

The Policy reference implementation can be changed by resetting the value of the "policy.provider" security property (in the security properties file) to the fully qualified name of the desired Policy implementation class. The security properties file is located in the file named

{java.home}/lib/security/java.security (Solaris)
{java.home}\lib\security\java.security (Windows)
Here, {java.home} refers to the directory where the runtime environment is installed -- either the jre directory inside the Java 2 SDK, or the top-level directory of the Java 2 Runtime Environment.

The property policy.provider specifies the name of the policy class, and the default is the following:

policy.provider=sun.security.provider.PolicyFile
To customize, you can change the property value to specify another class, as in
policy.provider=com.mycom.MyPolicy
Note that the MyPolicy class must be a subclass of java.security.Policy. It is perhaps worth emphasizing that such an override of the policy class is a temporary solution and a more comprehensive policy API will probably make this unnecessary.

3.4 java.security.GeneralSecurityException

This is a new exception class that is a subclass of java.lang.Exception. The intention is that there should be two types of exceptions associated with security and the security packages.
  • java.lang.SecurityException and its subclasses should be runtime exceptions (unchecked, not declared) that are likely to cause the execution of a program to stop.
Such an exception is thrown only when some sort of security violation is detected. For example, such an exception is thrown when some code attempts to access a file, but it does not have permission for the access. Application developers may catch these exceptions, if they want.
  • java.security.GeneralSecurityException, which is a subclass of java.lang.Exception (must be declared or caught) that is thrown in all other cases from within the security packages.
Such an exception is security related but non-vital. For example, passing in an invalid key is probably not a security violation and should be caught and dealt with by a developer.

There are currently still two exceptions within the java.security package that are subclasses from RuntimeException. We at this moment cannot change these due to backward compatibility requirements. We will revisit this issue in the future.

CONTENTS| PREV| NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

4 Access Control Mechanisms and Algorithms

4.1 java.security.ProtectionDomain

The ProtectionDomain class encapsulates the characteristics of a domain. Such a domain encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.

A ProtectionDomain is constructed with a CodeSource, a ClassLoader, an array of Principals, and a collection of Permissions. The CodeSource encapsulates the codebase (java.net.URL) for all classes in this domain, as well as a set of certificates (of type java.security.cert.Certificate) for public keys that correspond to the private keys that signed all code in this domain. The Principals represent the user on whose behalf the code is running.

The permissions passed in at ProtectionDomain construction time represent a static set of permissions bound to the domain regardless of the Policy in force. The ProtectionDomain subsequently consults the current policy during each security check to retrieve dynamic permissions granted to the domain.

Classes from different CodeSources, or that are being executed on behalf of different principals, belong to different domains.

Today all code shipped as part of the Java 2 SDK is considered system code and run inside the unique system domain. Each applet or application runs in its appropriate domain, determined by policy.

It is possible to ensure that objects in any non-system domain cannot automatically discover objects in another non-system domain. This partition can be achieved by careful class resolution and loading, for example, using different classloaders for different domains. However, SecureClassLoader (or its subclasses) can, at its choice, load classes from different domains, thus allowing these classes to co-exist within the same name space (as partitioned by a classloader).

4.2 java.security.AccessController

The AccessController class is used for three purposes, each of which is described in further detail in sections below:
  • to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,
  • to mark code as being "privileged", thus affecting subsequent access determinations, and
  • to obtain a "snapshot" of the current calling context so access-control decisions from a different context can be made with respect to the saved context.
Any code that controls access to system resources should invoke AccessController methods if it wishes to use the specific security model and access control algorithm utilized by these methods. If, on the other hand, the application wishes to defer the security model to that of the SecurityManager installed at runtime, then it should instead invoke corresponding methods in the SecurityManager class.

For example, the typical way to invoke access control has been the following code (taken from an earlier version of JDK):

 ClassLoader loader = this.getClass().getClassLoader();
        if (loader != null) {
                SecurityManager security = System.getSecurityManager();
            if (security != null) {
                security.checkRead("path/file");
            }
        }
Under the new architecture, the check typically should be invoked whether or not there is a classloader associated with a calling class. It could be simply, for example:
FilePermission perm = new FilePermission("path/file", "read");
AccessController.checkPermission(perm);
The AccessController checkPermission method examines the current execution context and makes the right decision as to whether or not the requested access is allowed. If it is, this check returns quietly. Otherwise, an AccessControlException (a subclass of java.lang.SecurityException) is thrown.

Note that there are (legacy) cases, for example, in some browsers, where whether there is a SecurityManager installed signifies one or the other security state that may result in different actions being taken. For backward compatibility, the checkPermission method on SecurityManager can be used.

SecurityManager security = System.getSecurityManager();
if (security != null) {
    FilePermission perm = new FilePermission("path/file", "read");
    security.checkPermission(perm);
}
We currently do not change this aspect of the SecurityManager usage, but would encourage application developers to use new techniques introduced in the Java 2 SDK in their future programming when the built-in access control algorithm is appropriate.

The default behavior of the SecurityManager checkPermission method is actually to call the AccessController checkPermission method. A different SecurityManager implementation may implement its own security management approach, possibly including the addition of further constraints used in determining whether or not an access is permitted.

4.2.1 Algorithm for Checking Permissions

Suppose access control checking occurs in a thread of computation that has a chain of multiple callers (think of this as multiple method calls that cross the protection domain boundaries), as illustrated in the next figure.

Illustration of access control

When the checkPermission method of the AccessController is invoked by the most recent caller (e.g., a method in the File class), the basic algorithm for deciding whether to allow or deny the requested access is as follows.

If any caller in the call chain does not have the requested permission, AccessControlException is thrown, unless the following is true -- a caller whose domain is granted the said permission has been marked as "privileged" (see the next section) and all parties subsequently called by this caller (directly or indirectly) all have the said permission. There are obviously two implementation strategies:
  • In an "eager evaluation" implementation, whenever a thread enters a new protection domain or exits from one, the set of effective permissions is updated dynamically.
The benefit is that checking whether a permission is allowed is simplified and can be faster in many cases. The disadvantage is that, because permission checking occurs much less frequently than cross-domain calls, a large percentage of permission updates are likely to be useless effort.
  • In a "lazy evaluation" implementation, whenever permission checking is requested, the thread state (as reflected by the current state, including the current thread's call stack or its equivalent) is examined and a decision is reached to either deny or grant the particular access requested.
One potential downside of this approach is performance penalty at permission checking time, although this penalty would have been incurred anyway in the "eager evaluation" approach (albeit at earlier times and spread out among each cross-domain call). Our implementation so far has yielded acceptable performance, so we feel that lazy evaluation is the most economical approach overall.

Therefore, the algorithm for checking permissions is currently implemented as "lazy evaluation". Suppose the current thread traversed m callers, in the order of caller 1 to caller 2 to caller m. Then caller m invoked the checkPermission method. The basic algorithm checkPermission uses to determine whether access is granted or denied is the following (see subsequent sections for refinements):

 i = m;
 while (i > 0) {
     if (caller i's domain does not have the permission)
         throw AccessControlException
     else if (caller i is marked as privileged)
         return;
     i = i - 1;
 };

4.2.2 Handling Privileges

A new, static method in the AccessController class allows code in a class instance to inform the AccessController that a body of its code is "privileged" in that it is solely responsible for requesting access to its available resources, no matter what code caused it to do so.

That is, a caller can be marked as being "privileged" when it calls the doPrivileged method. When making access control decisions, the checkPermission method stops checking if it reaches a caller that was marked as "privileged" via a doPrivileged call without a context argument (see a subsequent section for information about a context argument). If that caller's domain has the specified permission, no further checking is done and checkPermission returns quietly, indicating that the requested access is allowed. If that domain does not have the specified permission, an exception is thrown, as usual.

The normal use of the "privileged" feature is as follows:

If you don't need to return a value from within the "privileged" block, do the following:

  somemethod() {
       ...normal code here...
       AccessController.doPrivileged(new PrivilegedAction() {
           public Object run() {
               // privileged code goes here, for example:
               System.loadLibrary("awt");
               return null; // nothing to return
           }
       });
       ...normal code here...
  }
PrivilegedAction is an interface with a single method, named run, that returns an Object. The above example shows creation of an anonymous inner class implementing that interface; a concrete implementation of the run method is supplied. When the call to doPrivileged is made, an instance of the PrivilegedAction implementation is passed to it. The doPrivileged method calls the run method from the PrivilegedAction implementation after enabling privileges, and returns the run method's return value as the doPrivileged return value, which is ignored in this example.

(For more information about inner classes, see Nested Classes in the Java Tutorials.

If you need to return a value, you can do something like the following:

  somemethod() {
       ...normal code here...
       String user = (String) AccessController.doPrivileged(
         new PrivilegedAction() {
           public Object run() {
               return System.getProperty("user.name");
           }
         }
       );
       ...normal code here...
  }
If the action performed in your run method could throw a "checked" exception (one listed in the throws clause of a method), then you need to use the PrivilegedExceptionAction interface instead of the PrivilegedAction interface:
  somemethod() throws FileNotFoundException {
       ...normal code here...
     try {
       FileInputStream fis = (FileInputStream)
        AccessController.doPrivileged(
         new PrivilegedExceptionAction() {
           public Object run() throws FileNotFoundException {
               return new FileInputStream("someFile");
           }
         }
       );
     } catch (PrivilegedActionException e) {
       // e.getException() should be an instance of
       // FileNotFoundException,
       // as only "checked" exceptions will be "wrapped" in a
       // <code>PrivilegedActionException</code>.
       throw (FileNotFoundException) e.getException();
     }
       ...normal code here...
 }
Some important points about being privileged: Firstly, this concept only exists within a single thread. As soon as the privileged code completes, the privilege is guaranteed to be erased or revoked.

Secondly, in this example, the body of code in the run method is privileged. However, if it calls less trustworthy code that is less privileged, that code will not gain any privileges as a result; a permission is only granted if the privileged code has the permission and so do all the subsequent callers in the call chain up to the checkPermission call.

For more information about marking code as "privileged," see API for Privileged Blocks.

4.3 Inheritence of Access Control Context

When a thread creates a new thread, a new stack is created. If the current security context was not retained when this new thread was created, then when AccessController.checkPermission was called inside the new thread, a security decision would be made based solely upon the new thread's context, not taking into consideration that of the parent thread.

This clean stack issue would not be a security problem per se, but it would make the writing of secure code, and especially system code, more prone to subtle errors. For example, a non-expert developer might assume, quite reasonably, that a child thread (e.g., one that does not involve untrusted code) inherits the same security context from the parent thread (e.g., one that involves untrusted code). This would cause unintended security holes when accessing controlled resources from inside the new thread (and then passing the resources along to less trusted code), if the parent context was not in fact saved.

Thus, when a new thread is created, we actually ensure (via thread creation and other code) that it automatically inherits the parent thread's security context at the time of creation of the child thread, in such a way that subsequent checkPermission calls in the child thread will take into consideration the inherited parent context.

In other words, the logical thread context is expanded to include both the parent context (in the form of an AccessControlContext, described in the next section) and the current context, and the algorithm for checking permissions is expanded to the following. (Recall there are m callers up to the call to checkPermission, and see the next section for information about the AccessControlContext checkPermission method.)

 i = m;
 while (i > 0) {
     if (caller i's domain does not have the permission)
         throw AccessControlException
     else if (caller i is marked as privileged)
         return;
     i = i - 1;
 };

 // Next, check the context inherited when
 // the thread was created. Whenever a new thread is created, the
 // AccessControlContext at that time is
 // stored and associated with the new thread, as the "inherited"
 // context.

 inheritedContext.checkPermission(permission);
Note that this inheritance is transitive so that, for example, a grandchild inherits both from the parent and the grandparent. Also note that the inherited context snapshot is taken when the new child is created, and not when the child is first run. There is no public API change for the inheritance feature.

4.4 java.security.AccessControlContext

Recall that the AccessController checkPermission method performs security checks within the context of the current execution thread (including the inherited context). A difficulty arises when such a security check can only be done in a different context. That is, sometimes a security check that should be made within a given context will actually need to be done from within a different context. For example, when one thread posts an event to another thread, the second thread serving the requesting event would not have the proper context to complete access control, if the service requests access to controller resources.

To address this issue, we provide the AccessController getContext method and AccessControlContext class. The getContext method takes a "snapshot" of the current calling context, and places it in an AccessControlContext object, which it returns. A sample call is the following:

AccessControlContext acc = AccessController.getContext();
This context captures relevant information so that an access control decision can be made by checking, from within a different context, against this context information. For example, one thread can post a request event to a second thread, while also supplying this context information. AccessControlContext itself has a checkPermission method that makes access decisions based on the context it encapsulates, rather than that of the current execution thread. Thus, the second thread can perform an appropriate security check if necessary by invoking the following:
acc.checkPermission(permission);
The above method call is equivalent to performing the same security check in the context of the first thread, even though it is done in the second thread.

There are also times where one or more permissions must be checked against an access control context, but it is unclear a priori which permissions are to be checked. In these cases you can use the doPrivileged method that takes a context:

  somemethod() {
        AccessController.doPrivileged(new PrivilegedAction() {
             public Object run() {
                // Code goes here. Any permission checks from
                // this point forward require both the current
                // context and the snapshot's context to have
                // the desired permission.
             }
        }, acc);
        ...normal code here...
Now the complete algorithm utilized by the AccessController checkPermission method can be given. Suppose the current thread traversed m callers, in the order of caller 1 to caller 2 to caller m. Then caller m invoked the checkPermission method. The algorithm checkPermission uses to determine whether access is granted or denied is the following
  i = m;
  while (i > 0) {
     if (caller i's domain does not have the permission)
        throw AccessControlException
     else if (caller i is marked as privileged) {
        if (a context was specified in the call to doPrivileged)
           context.checkPermission(permission);
        return;
     }
     i = i - 1;
  };

  // Next, check the context inherited when
  // the thread was created. Whenever a new thread is created, the
  // AccessControlContext at that time is
  // stored and associated with the new thread, as the "inherited"
  // context.

  inheritedContext.checkPermission(permission);

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

5 Secure Class Loading

Dynamic class loading is an important feature of the Java Virtual Machine because it provides the Java platform with the ability to install software components at run-time. It has a number of unique characteristics. First of all, lazy loading means that classes are loaded on demand and at the last moment possible. Second, dynamic class loading maintains the type safety of the Java Virtual Machine by adding link-time checks, which replace certain run-time checks and are performed only once. Moreover, programmers can define their own class loaders that, for example, specify the remote location from which certain classes are loaded, or assign appropriate security attributes to them. Finally, class loaders can be used to provide separate name spaces for various software components. For example, a browser can load applets from different web pages using separate class loaders, thus maintaining a degree of isolation between those applet classes. In fact, these applets can contain classes of the same name -- these classes are treated as distinct types by the Java Virtual Machine.

The class loading mechanism is not only central to the dynamic nature of the Java programming language. It also plays a critical role in providing security because the class loader is responsible for locating and fetching the class file, consulting the security policy, and defining the class object with the appropriate permissions.

5.1 Class Loader Class Hierarchies

When loading a class, because there can be multiple instances of class loader objects in one Java Virtual Machine, an important question is how do we determine which class loader to use. The Java 2 SDK has introduced multiple class loader classes are introduced that have distinct properties, so another important question is what type of class loader we should use.

The root of the class loader class hierarchy is an abstract class called java.lang.ClassLoader, originally defined in JDK 1.0 and since expanded. Class java.security.SecureClassLoader, introduced in Java 2 SDK, v 1.2, is a subclass and a concrete implementation of the abstract ClassLoader class. Class java.net.URLClassLoader is a subclass of SecureClassLoader.

A utility program called Appletviewer uses a private class sun.applet.AppletClassLoader to load applets. In JDK 1.0, AppletClassLoader is a subclass and concrete implementation of ClassLoader. In Java 2 SDK, it is a subclass of URLClassLoader.

When creating a custom class loader class, one can subclass from any of the above class loader classes, depending on the particular needs of the custom class loader. Because AppletClassLoader is a private class defined in the sun.* package, it is not supported and is subject to change, so one should not subclass from it.

5.2 The Primordial Class Loader

Because each class is loaded by its class loader, and each class loader itself is a class and must be loaded by another class loader, we seem to have the obvious chicken-and-egg problem, i.e., where does the first class loader come from? There is a "primordial'' class loader that bootstraps the class loading process. The primordial class loader is generally written in a native language, such as C, and does not manifest itself within the Java context. The primordial class loader often loads classes from the local file system in a platform-dependent manner.

Some classes, such as those defined in the java.* package, are essential for the correct functioning of the Java Virtual Machine and runtime system. They are often referred to as base classes. Due to historical reasons, all such classes have a class loader that is a null. This null class loader is perhaps the only sign of the existence of a primordial class loader. In fact, it is easier to simply view the null class loader as the primordial class loader.

Given all classes in one Java application environment, we can easily form a class loading tree to reflect the class loading relationship. Each class that is not a class loader is a leaf node. Each class's parent node is its class loader, with the null class loader being the root class. Such a structure is a tree because there cannot be cycles -- a class loader cannot have loaded its own ancestor class loader.

5.3 Class Loader Delegation

When one class loader is asked to load a class, this class loader either loads the class itself or it can ask another class loader to do so. In other words, the first class loader can delegate to the second class loader. The delegation relationship is virtual in the sense that it has nothing to do with which class loader loads which other class loader. Instead, the delegation relationship is formed when class loader objects are created, and in the form of a parent-child relationship. Nevertheless, the system class loader is the delegation root ancestor of all class loaders. Care must be taken to ensure that the delegation relationship does not contain cycles. Otherwise, the delegation process may enter into an infinite loop.

5.4 Class Resolution Algorithm

The default implementation of the Java 2 SDK ClassLoader method for loading a class searches for classes in the following order:
  • Check if the class has already been loaded.
  • If the current class loader has a specified delegation parent, delegate to the parent to try to load this class. If there is no parent, delegate to the primordial class loader.
  • Call a customizable method to find the class elsewhere.
Here, the first step looks into the class loader's local cache (or its functional equivalent, such as a global cache) to see if a loaded class matches the target class. The last step provides a way to customize the mechanism for looking for classes; thus a custom class loader can override this method to specify how a class should be looked up. For example, an applet class loader can override this method to go back to the applet host and try to locate the class file and load it over the network.

If at any step a class is located, it is returned. If the class is not found using the above steps, a ClassNotFound exception is thrown.

Observe that it is critical for type safety that the same class not be loaded more than once by the same class loader. If the class is not among those already loaded, the current class loader attempts to delegate the task to the parent class loader. This can occur recursively. This ensures that the appropriate class loader is used. For example, when locating a system class, the delegation process continues until the system class loader is reached.

We have seen the delegation algorithm earlier. But, given the name of any class, which class loader do we start with in trying to load the class? The rules for determining the class loader are the following:

  • When loading the first class of an application, a new instance of the URLClassLoader is used.
  • When loading the first class of an applet, a new instance of the AppletClassLoader is used.
  • When java.lang.Class.ForName is directly called, the primordial class loader is used.
  • If the request to load a class is triggered by a reference to it from an existing class, the class loader for the existing class is asked to load the class.
Note that rules about the use of URLClassLoader and AppletClassLoader instances have exceptions and can vary depending on the particular system environment. For example, a web browser may choose to reuse an existing AppletClassLoader to load applet classes from the same web page.

Due to the power of class loaders, we severely restrict who can create class loader instances. On the other hand, it is desirable to provide a convenient mechanism for applications or applets to specify URL locations and load classes from them. We provide static methods to allow any program to create instances of the URLClassLoader class, although not other types of class loaders.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

6 Security Management

6.1 Managing Applets and Applications

Currently, all Java 2 SDK system code invokes SecurityManager methods to check the policy currently in effect and perform access control checks. There is typically a security manager (SecurityManager implementation) installed whenever an applet is running; the appletviewer and most browsers, including those from Netscape and Microsoft, install a security manager.

A security manager is not automatically installed when an application is running. To apply the same security policy to an application found on the local file system as to downloaded applets, either the user running the application must invoke the Java Virtual Machine with the new "-Djava.security.manager" command-line argument (which sets the value of the java.security.manager property), as in

    java -Djava.security.manager  SomeApp
or the application itself must call the setSecurityManager method in the java.lang.System class to install a security manager.

It is possible to specify on the command line a particular security manager to be utilized, by following "-Djava.security.manager" with an equals and the name of the class to be used as the security manager, as in

    java -Djava.security.manager=COM.abc.MySecMgr  SomeApp
If no security manager is specified, the built-in default security manager is utilized (unless the application installs a different security manager). All of the following are equivalent and result in usage of the default security manager:
    java -Djava.security.manager  SomeApp
    java -Djava.security.manager=""  SomeApp
    java -Djava.security.manager=default  SomeApp
Java 2 SDK includes a property named java.class.path. Classes that are stored on the local file system but should not be treated as base classes (e.g., classes built into the SDK) should be on this path. Classes on this path are loaded with a secure class loader and are thus subjected to the security policy being enforced.

There is also a "-Djava.security.policy" command-line argument whose usage determines what policy files are utilized. This command-line argument is described in detail in the "Default System and User Policy Files" section. Basically, if you don't include "-Djava.security.policy" on the command line, then the policy files specified in the security properties file will be used.

You can use a "-Djava.security.policy" command-line argument to specify an additional or a different policy file when invoking execution of an application. For example, if you type the following, where pURL is a URL specifying the location of a policy file, then the specified policy file will be loaded in addition to all the policy files specified in the security properties file:

    java -Djava.security.manager -Djava.security.policy=pURL SomeApp
If you instead type the following command, using a double equals, then just the specified policy file will be used; all others will be ignored:
java -Djava.security.manager -Djava.security.policy==pURL SomeApp

6.2 SecurityManager versus AccessController

The new access control mechanism is fully backward compatible. For example, all check methods in SecurityManager are still supported, although most of their implementations are changed to call the new SecurityManager checkPermission method, whose default implementation calls the AccessController checkPermission method. Note that certain internal security checks may stay in the SecurityManager class, unless it can be parameterized.

We have not at this time revised any system code to call AccessController instead of calling SecurityManager (and checking for the existence of a classloader), because of the potential of existing third-party applications that subclass the SecurityManager and customize the check methods. In fact, we added a new method SecurityManager.checkPermission that by default simply invokes AccessController.checkPermission.

To understand the relationship between SecurityManager and AccessController, it is sufficient to note that SecurityManager represents the concept of a central point of access control, while AccessController implements a particular access control algorithm, with special features such as the doPrivileged method. By keeping SecurityManager up to date, we maintain backward compatibility (e.g., for those applications that have written their own security manager classes based on earlier versions of the JDK) and flexibility (e.g., for someone wanting to customize the security model to implement mandatory access control or multilevel security). By providing AccessController, we build in the algorithm that we believe is the most restrictive and that relieves the typical programmer from the burden of having to write extensive security code in most scenarios.

We encourage the use of AccessController in application code, while customization of a security manager (via subclassing) should be the last resort and should be done with extreme care. Moreover, a customized security manager, such as one that always checks the time of the day before invoking standard security checks, could and should utilize the algorithm provided by AccessController whenever appropriate.

One thing to remember is that, when you implement your own SecurityManager, you should install it as trusted software and grant it java.security.AllPermission. There are several ways to do this:

  • You can install your SecurityManager as an extension, because all extensions are granted AllPermission by default. For more information, see Lesson: Creating and Using Extensions.

  • You can adjust the policy file to grant AllPermission to your SecurityManager. For more information, see Default Policy Implementation and Policy File Syntax.

6.3 Auxiliary Tools

This section briefly describes the usage of three tools that assist in the deployment of the new security features. These tools may be packaged together in the future.

6.3.1 The Key and Certificate Management Tool

keytool is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. The authentication information includes both a sequence (chain) of X.509 certificates, and an associated private key, which can be referenced by a so-called "alias". This tool also manages certificates (that are "trusted" by the user), which are stored in the same database as the authentication information, and can be referenced by an "alias".

keytool stores the keys and certificates in a so-called keystore. The default keystore implementation implements the keystore as a file. It protects private keys with a password.

The chains of X.509 certificates are provided by organizations called Certification Authorities, or CAs. Identities (including CAs) use their private keys to authenticate their association with objects (such as with channels which are secured using SSL), with archives of code they signed, or (for CAs) with X.509 certificates they have issued. As a bootstrapping tool, certificates generated using the -genkey command may be used until a Certification Authority returns a certificate chain.

The private keys in this database are always stored in encrypted form, to make it difficult to disclose these private keys inappropriately. A password is required to access or modify the database. These private keys are encrypted using the "password", which should be several words long. If the password is lost, those authentication keys cannot be recovered.

In fact, each private key in the keystore can be protected using its own individual password, which may or may not be the same as the password that protects the keystore's overall integrity.

This tool is (currently) intended to be used from the command line, where one simply types "keytool" as a shell prompt. keytool is a script that executes the appropriate Java classes and is built together with the SDK.

The command line options for each command may be provided in any order. Typing an incorrect option or typing "keytool -help" will cause the tool's usage to be summarized on the output device (such as a shell window), as given below.

% keytool -help
KeyTool usage:

-certreq     [-v] [-alias <alias>] [-sigalg <sigalg>]
             [-file <certreq_file>] [-keypass <keypass>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-delete      [-v] -alias <alias>
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-export      [-v] [rfc] [-alias <alias>] [-file <cert_file>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-genkey      [-v] [-alias <alias>] [-keyalg <keyalg>]
             [-keysize <keysize>] [-sigalg <sigalg>]
             [-dname <distinguished_name>] [-validity <valDays>]
             [-keypass <keypass>] [-keystore <keystore>]
             [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-help

-identitydb  [-v] [-file <idb_file>] [-keystore <keystore>]
             [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-import      [-v] [-noprompt] [-alias <alias>]
             [-file <cert_file>] [-keypass <keypass>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-keyclone    [-v] [-alias <alias>] -dest <dest_alias>
             [-keypass <keypass>] [-new <new_keypass>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-keypasswd   [-v] [-alias <alias>]
             [-keypass <old_keypass>] [-new <new_keypass>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-list        [-v | -rfc] [-alias <alias>]
             [-keystore <keystore>] [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-printcert   [-v] [-file <cert_file>]

-selfcert    [-v] [-alias <alias>] [-sigalg <sigalg>]
             [-dname <distinguished_name>] [-validity <valDays>]
             [-keypass <keypass>] [-keystore <keystore>]
             [-storepass <storepass>]
             [-storetype <i>storetype</i>]

-storepasswd  [-v] [-new <new_storepass>]
             [-keystore <keystore>] [-storepass <storepass>]
              [-storetype <i>storetype</i>]

6.3.2 PolicyTool

The PolicyTool is a graphical user interface (illustrated below with a screen shot) that assists a user (such as a system administrator) in specifying, generating, editing, exporting, or importing a security policy. The tool is invoked from the command line as policytool. This again is a script built with the SDK that invokes the appropriate (non-public) implementation classes.

See the PolicyTool documentation for usage information and examples with up-to-date screen shots. The documentation can be found in the policytool.html file in the

/docs/technotes/tools/unix/
or
/docs/technotes/tools/windows/
directory in the directory in which the SDK was installed (where the file separators are actually backslashes on Windows systems).

screenshot od PolicyTool window

6.3.3 The JAR Signing and Verification Tool

The jarsigner tool can be used to digitally sign Java archives (JAR files), and to verify such signatures. This tool, like the PolicyTool, depends on the keystore that is managed by the keytool. Its usage is quickly summarized below.
% jarsigner
Usage: jarsigner [options] jar-file alias
       jarsigner -verify [options] jar-file
  [-keystore <url>]         keystore file location
  [-storepass <password>]   password for keystore integrity
  [-keypass <password>]     password for private key (if different)
  [-sigfile <file>]         name of .SF/.DSA file
  [-signedjar <file>]       name of signed JAR file
  [-verify]                 verify a signed JAR file
  [-verbose]                verbose output when signing/verifying
  [-certs]          display certificates when verbose and verifying
  [-internalsf]             include .SF file inside signature block
  [-sectionsonly]           don't compute hash of entire manifest
Again, this tool is a script built with the SDK. Note that it is expected that this tool and the existing jar tool script may be merged in the near future to form a single command-line primitive to create JARs, either signed or unsigned.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

7 GuardedObject and SignedObject

7.1 java.security.GuardedObject and java.security.Guard

Recall that the class AccessControlContext is useful when an access control decision has to be made in a different context. There is another such scenario, where the supplier of a resource is not in the same thread as the comsumer of that resource, and the consumer thread cannot provide the supplier thread the access control context information (because the context is security-sensitive, or the context is too large to pass, or for other reasons). For this case, we provide a class called GuardedObject to protect access to the resource, illustrated in the figure below.

Illustration of previous context

The basic idea is that the supplier of the resource can create an object representing the resource, create a GuardedObject that embeds the resource object inside, and then provide the GuardedObject to the consumer. In creating the GuardedObject, the supplier also specifies a Guard object such that anyone (including the consumer) can only obtain the resource object if certain (security) checks inside the Guard are satisfied.

Guard is an interface, so any object can choose to become a Guard. The only method in this interface is called checkGuard. It takes an Object argument and it performs certain (security) checks. The Permission class in java.security implements the Guard interface.

For example, suppose a system thread is asked to open a file /a/b/c.txt for read access, but the system thread does not know who the requestor is or under what circumstances the request is made. Therefore, the correct access control decision cannot be made at the server side. The system thread can use GuardedObject to delay the access control checking, as follows.

FileInputStream f = new FileInputStream("/a/b/c.txt");
FilePermission p = new FilePermission("/a/b/c.txt", "read");
GuardedObject g = new GuardedObject(f, p);
Now the system thread can pass g to the consumer thread. For that thread to obtain the file input stream, it has to call
FileInputStream fis = (FileInputStream) g.getObject();
This method in turn invokes the checkGuard method on the Guard object p, and because p is a Permission, its checkGuard method is in fact:
SecurityManager sm = System.getSecurityManager();
if (sm != null) sm.checkPermission(this);
This ensures that a proper access control check takes place within the consumer context. In fact, one can replace often-used hash tables and access control lists in many cases and simply store a hash table of GuardedObjects.

This basic pattern of GuardedObject and Guard is very general, and we expect that by extending the basic Guard and GuardedObject classes, developers can easily obtain quite powerful access control tools. For example, per-method invocation can be achieved with an appropriate Guard for each method, and a Guard can check the time of the day, the signer or other identification of the caller, or any other relevant information.

Note that certain typing information is lost because GuardedObject returns an Object. GuardedObject is intended to be used between cooperating parties so that the receiving party should know what type of object to expect (and to cast for). In fact, we envision that most usage of GuardedObject involves subclassing it (say to form a GuardedFileInputStream class), thus encapsulating typing information, and casting can happen suitably in the subclass.

7.2 java.security.SignedObject

This class is an essential building block for other security primitives. SignedObject contains another Serializable object, the (to-be-)signed object and its signature. If the signature is not null, it contains a valid digital signature of the signed object. This is illustrated in the figure below.

The previous context describes this graphic

The underlying signing algorithm is set through a Signature object as a parameter to the sign method call, and the algorithm can be, among others, the NIST standard DSA, using DSA and SHA-1. The algorithm is specified using the same convention for signatures, such as "SHA/DSA".

The signed object is a "deep copy" (in serialized form) of an original object. Once the copy is made, further manipulation of the original object has no side effect on the copy. A signed object is immutable.

A typical example of creating a signed object is the following:

Signature signingEngine =
    Signature.getInstance(algorithm,provider);
SignedObject so =
    new SignedObject(myobject, signingKey, signingEngine);
A typical example of verification is the following (having received SignedObject so), where the first line is not needed if the name of the algorithm is known:
String algorithm = so.getAlgorithm();
Signature verificationEngine =
    Signature.getInstance(algorithm, provider);
so.verify(verificationEngine);
Potential applications of SignedObject include:
  • It can be used internally to any Java application environment as an unforgeable authorization token -- one that can be passed around without the fear that the token can be maliciously modified without being detected.
  • It can be used to sign and serialize data/object for storage outside the Java runtime (e.g., storing critical access control data on disk).
  • Nested SignedObjects can be used to construct a logical sequence of signatures, resembling a chain of authorization and delegation.
It is intended that this class can be subclassed in the future to allow multiple signatures on the same signed object. In that case, existing method calls in this base class will be fully compatible in semantics. In particular, any get method will return the unique value if there is only one signature, and will return an arbitrary one from the set of signatures if there is more than one signature.
CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

8 Discussion and Future Directions

8.1 Resource Consumption Management

Resource consumption management is relatively easy to implement in some cases (e.g., to limit the number of windows any application can pop up at any one time), while it can be quite hard to implement efficiently in other cases (e.g., to limit memory or file system usage). We plan to coherently address such issues in the future.

8.2 Arbitrary Grouping of Permissions

Sometimes it is convenient to group a number of permissions together and use a short-hand name to refer to them. For example, if we would like to have a permission called "SuperPermission" to include (and imply) both FilePermission("-", "read,write") and SocketPermission("*", "connect,accept"), technically we can use the class Permissions or a similar class to implement this super permission by using the add methods to add the required permissions. And such grouping can be arbitrarily complicated.

The more difficult issues are the following. First, to understand what actual permissions one is granting when giving out such a super permission, either a fixed and named permission class is created to denote a statically specified group of permissions, or the member permissions need to be spelled out in the policy file. Second, processing the policy (file) can become more complicated because the grouped permissions may need to be expanded. Moreover, nesting of grouped permission increases complexity even more.

8.3 Object-Level Protection

Given the object-oriented nature of the Java programming language, it is conceivable that developers will benefit from a set of appropriate object-level protection mechanisms that (1) goes beyond the natural protection provided by the Java programming language and that (2) supplements the thread-based access control mechanism.

One such mechanism is SignedObject. Parallel to this primitive, we will provide SealedObject that uses encryption to hide the content of an object. (Due to current U.S. export control regulations on the use of encryption, the SealedObject class will likely be provided separate from the SDK.)

GuardedObject is a general way to enforce access control at a per class/object per method level. This method, however, should be used only selectively, partly because this type of control can be difficult to administer at a high level.

8.4 Subdividing Protection Domains

A potentially useful concept not currently implemented is that of "subdomains." A subdomain is one that is enclosed in another. A subdomain would not have more permissions or privileges than the domain of which it is a subpart. A domain could be created, for example, to selectively further limit what a program can do.

Often a domain is thought of as supporting inheritance: a subdomain would automatically inherit the parent domain's security attributes, except in certain cases where the parent further restricts the subdomain explicitly. Relaxing a subdomain by right amplification is a possibility with the notion of trusted code.

For convenience, we can think of the system domain as a single, big collection of all system code. For better protection, though, system code should be run in multiple system domains, where each domain protects a particular type of resource and is given a special set of rights. For example, if file system code and network system code run in separate domains, where the former has no rights to the networking resources and the latter has no rights to the file system resources, the risks and consequence of an error or security flaw in one system domain is more likely to be confined within its boundary.

8.5 Running Applets with Signed Content

The JAR and Manifest specifications on code signing allow a very flexible format. Classes within the same archive can be signed with different keys, and a class can be unsigned, signed with one key, or signed with multiple keys. Other resources within the archive, such as audio clips and graphic images, can also be signed or unsigned, just like classes can.

This flexibility brings about the issue of interpretation. The following questions need to be answered, especially when keys are treated differently:

1. Should images and audios be required to be signed with the
   same key if any class in the archive is signed?
2. If images and audios are signed with different keys, can
   they be placed in the same appletviewer (or browser page),
   or should they be sent to different viewers for processing?
These questions are not easy to answer, and require consistency across platforms and products to be the most effective. Our intermediate approach is to provide a simple answer -- all images and audio clips are forwarded to be processed within the same applet classloader, whether they are signed or not. This temporary solution will be improved once a consensus is reached.

Moreover, if a digital signature cannot be verified because the bytecode content of a class file does not match the signed hash value in the JAR, a security exception is thrown, as the original intention of the JAR author is clearly altered. Previously, there was a suggestion to run such code as untrusted. This idea is undesirable because the applet classloader allows the loading of code signed by multiple parties. This means that accepting a partially modified JAR file would allow an untrusted piece of code to run together with and access other code through the same classloader.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

9 Summary

This document gives an overview of the motivation and the new security architecture of the major security features that are implemented for the Java SE Platform.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

10 Acknowledgments

The design and implementation of new security features in Java 2 SDK is the work of primarily members of the JavaSoft security group. Other (past and present) members of the JavaSoft community provided invaluable insight, detailed reviews, and much needed technical assistance. Significant contributors, in alphabetical order, include but are not limited to: Gigi Ankeny, Josh Bloch, Satya Dodda, Charlie Lai, Sheng Liang, Jan Luehe, Marianne Mueller, Jeff Nisewanger, Hemma Prafullchandra, Roger Riggs, Nakul Saraiya, Bill Shannon, Roland Schemers, and Vijay Srinivasan.

This work is not possible without strong support from JavaSoft management (our thanks go to Dick Neiss, Jon Kannegaard, and Alan Baratz), and the testing and documentation groups (especially Mary Dageforde). We are grateful for technical guidance from James Gosling, Graham Hamilton, and Jim Mitchell.

We received numerous suggestions from our corporate partners and licensees, whom we could not fully list here.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

11 References

M. Gasser. Building a Secure Computer System. Van Nostrand Reinhold Co., New York, 1988.

L. Gong, "Java Security: Present and Near Future". IEEE Micro, 17(3):14--19, May/June 1997.

L. Gong, T.M.A. Lomas, R.M. Needham, and J.H. Saltzer, "Protecting Poorly Chosen Secrets from Guessing Attacks". IEEE Journal on Selected Areas in Communications, 11(5):648--656, June, 1993.

J. Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, Menlo Park, California, August 1996.

A.K. Jones. Protection in Programmed Systems. Ph.D. dissertation, Carnegie-Mellon University, Pittsburgh, PA 15213, June 1973.

B.W. Lampson. Protection. In Proceedings of the 5th Princeton Symposium on Information Sciences and Systems, Princeton University, March 1971. Reprinted in ACM Operating Systems Review, 8(1):18--24, January, 1974.

T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, Menlo Park, California, 1997.

P.G. Neumann. Computer-Related Risks. Addison-Wesley, Menlo Park, California, 1995.

U.S. General Accounting Office. Information Security: Computer Attacks at Department of Defense Pose Increasing Risks. Technical Report GAO/AIMD-96-84, Washington, D.C. 20548, May 1996.

J.H. Saltzer. Protection and the Control of Information Sharing in Multics. Communications of the ACM, 17(7):388--402, July 1974.

J.H. Saltzer and M.D. Schroeder. The Protection of Information in Computer Systems}. Proceedings of the IEEE, 63(9):1278--1308, September 1975.

M.D. Schroeder. Cooperation of Mutually Suspicious Subsystems in a Computer Utility. Ph.D. dissertation, Massachusetts Institute of Technology, Cambridge, MA 02139, September 1972.

W.A. Wulf, R. Levin, and S.P. Harbison. HYDRA/C.mmp -- An Experimental Computer System. McGraw-Hill, 1981.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

12 Revision History

Various drafts on Java 2 Security Architecture, under different disguises, existed since August of 1996.

Java SE Platform Security Architecture Specification v0.1 was drafted on March 12, 1997.

Revision 0.2 on March 27, 1997

Revision 0.3 on March 31, 1997

Revision 0.4 on June 3, 1997. Reflected changes in design and implementation based on comments and feedbacks of revision 0.3. Introduced SignedObject.

Revision 0.5 on July 10, 1997. Major reorganization. It now includes a detailed syntax and semantics for policy and permissions. The class java.lang.SecurityManager is changed from abstract to concrete, with a default implementation.

Revision 0.6 on September 3, 1997. Reorganized sections under clearer headings. Syntactical changes to policy file format, including adding an optional signer field to each permission entry. Introduced GuardedObject class and Guard interface. The Permission class is now Serializable and implements the Guard interface. Added a new AccessControlContext class that helps cross-thread access control decision making. Gave descriptions of keytool, policytool, and jarsigner. Revised Acknowledgements.

Revision 0.7 on October 1, 1997. Added description of a feature that automatically makes a new thread, at its creation time, inherit the parent thread's security context so that access control checking in the new child thread considers both the first current context and also the inherited context.

Revision 0.8 on March 9, 1998. The previously package private class java.security.ProtectionDomain is now made public, and suitable get, set, and define methods to use this class are added in java.lang.Class and java.security.SecureClassLoader. The class java.security.SignedObject is now immutable. Introduced a new class java.security.UnresolvedPermission. Added new method SecurityManager.checkPermission that, by default, invokes AccessController.checkPermission. Syntax change for FilePermission in the case of "*", "-", and introduced "<<ALL FILES>>". Other minor additions and changes, including two new options for jarsigner. Revised Acknowledgements.

Revision 0.9 on June 10, 1998. Some permission names have been modified to make permission naming clearer and more consistent. Added sections for Permission classes not previously documented herein. The evaluate method in Policy has been renamed getPermissions. Class.setProtectionDomain no longer exists. Corrected "file:" URL examples. The "-usepolicy" command-line argument for the "java" command has been replaced by "-Djava.security.manager" and "-Djava.security.policy". Updated command lists for the keytool and jarsigner tools. The AccessController beginPrivileged and endPrivileged methods have been replaced by the doPrivileged method.

Revision 1.0 on October 2, 1998. Updated description of the class loading mechanism with a new chapter. Rearranged some chapters and sections.

Revision 1.1 on December 20, 2000. Updated the document to reflect the new Policy and ProtectionDomain updates to support dynamic policies. Also added updates for the integration of the Java Authentication and Authorization Service (JAAS) into the core SDK. New policy syntax was described and examples were added.

Revision 1.2 (the current version) on March 22, 2002. Added notes on KeyStore Alias Replacement including an example of a grant statement with KeyStore alias replacement. Added new section 3.3 explaining generalized expansion in policy files including examples.

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


-

Documentation Contents
CONTENTS | PREV | NEXT

Table of Contents

1 Introduction
1.1 The Original Sandbox Model
1.2 Evolving the Sandbox Model

2 New Protection Mechanisms -- Overview of Basic Concepts

3 Permissions and Security Policy
3.1 The Permission Classes
3.1.1 java.security.Permission
3.1.2 java.security.PermissionCollection
3.1.3 java.security.Permissions
3.1.4 java.security.UnresolvedPermission
3.1.5 java.io.FilePermission
3.1.6 java.net.SocketPermission
3.1.7 java.security.BasicPermission
3.1.8 java.util.PropertyPermission
3.1.9 java.lang.RuntimePermission
3.1.10 java.awt.AWTPermission
3.1.11 java.net.NetPermission
3.1.12 java.lang.reflect.ReflectPermission
3.1.13 java.io.SerializablePermission
3.1.14 java.security.SecurityPermission
3.1.15 java.security.AllPermission
3.1.16 javax.security.auth.AuthPermission
3.1.17 Discussion of Permission Implications
3.1.18 How To Create New Types of Permissions
3.2 java.security.CodeSource
3.3 java.security.Policy
3.3.1 Policy File Format
3.3.2 Property Expansion in Policy Files
3.3.3 General Expansion in Policy Files
3.3.4 Assigning Permissions
3.3.5 Default System and User Policy Files
3.3.6 Customizing Policy Evaluation
3.4 java.security.GeneralSecurityException

4 Access Control Mechanisms and Algorithms
4.1 java.security.ProtectionDomain
4.2 java.security.AccessController
4.2.1 Algorithm for Checking Permissions
4.2.2 Handling Privileges
4.3 Inheritence of Access Control Context
4.4 java.security.AccessControlContext

5 Secure Class Loading
5.1 Class Loader Class Hierarchies
5.2 The Primordial Class Loader
5.3 Class Loader Delegation
5.4 Class Resolution Algorithm

6 Security Management
6.1 Managing Applets and Applications
6.2 SecurityManager versus AccessController
6.3 Auxiliary Tools
6.3.1 The Key and Certificate Management Tool
6.3.2 PolicyTool
6.3.3 The JAR Signing and Verification Tool

7 GuardedObject and SignedObject
7.1 java.security.GuardedObject and java.security.Guard
7.2 java.security.SignedObject

8 Discussion and Future Directions
8.1 Resource Consumption Management
8.2 Arbitrary Grouping of Permissions
8.3 Object-Level Protection
8.4 Subdividing Protection Domains
8.5 Running Applets with Signed Content

9 Summary

10 Acknowledgments

11 References

12 Revision History

CONTENTS | PREV | NEXT
Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us


The top interface is Line. Subinterfaces of Line are Port, Mixer, DataLine and GroupLine. Subinterfaces of DataLine are SourceDataLine, TargetDataLine and Clip.


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0xe6a1067
Function name=Java_NativeSEGV_foo
Library=D:\testcases\NativeSEGV\NativeSEGV.dll
Source file = NativeSEGV.c : 7

Current Java thread:
    at NativeSEGV.foo(Native Method)
    at NativeSEGV.main(NativeSEGV.java:26)

Dynamic libraries:
0x00400000 - 0x00405000 	d:\jdk1.3.1\bin\java.exe
0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC4000 	C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78040000 	C:\WINNT\system32\MSVCRT.dll
0x10000000 - 0x10018000 	C:\WINNT\System32\NVDESK32.DLL
0x08000000 - 0x08273000 	d:\jdk1.3.1\jre\bin\server\jvm.dll
0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
0x4FA00000 - 0x4FA77000 	C:\WINNT\System32\cwcmmsys.dll
0x50220000 - 0x50227000 	d:\jdk1.3.1\jre\bin\hpi.dll
0x503B0000 - 0x503BD000 	d:\jdk1.3.1\jre\bin\verify.dll
0x50250000 - 0x50266000 	d:\jdk1.3.1\jre\bin\java.dll
0x503C0000 - 0x503CD000 	d:\jdk1.3.1\jre\bin\zip.dll
0x0E6A0000 - 0x0E6C2000 	D:\testcases\NativeSEGV\NativeSEGV.dll
0x77920000 - 0x77942000 	C:\WINNT\System32\imagehlp.dll
0x72A00000 - 0x72A2D000 	C:\WINNT\System32\DBGHELP.dll
0x731B0000 - 0x731BA000 	C:\WINNT\System32\PSAPI.DLL

Local Time = Fri Dec 15 17:14:02 2000
Elapsed Time = 1
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Server VM (internal-release mixed mode)
#
# An error report file has been saved as hs_err_pid102.log.
# Please refer to the file for further information.
#